summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-xetex/test
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/icu/icu-xetex/test')
-rw-r--r--Build/source/libs/icu/icu-xetex/test/Makefile.in84
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/Makefile.in109
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/bocu1tst.c1031
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.c1303
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.h54
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/calldata.h109
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/calltest.c78
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/capitst.c2148
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/capitst.h124
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.c708
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.h35
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cbididat.c434
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.c3860
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.h82
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cbkittst.c31
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.c1337
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.h80
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.c3575
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.h25
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.c157
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.h56
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cconvtst.c39
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cctest.c36
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.c167
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.h35
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.c958
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.h54
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.c139
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.h42
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.c350
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.h57
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.c536
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.h50
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cestst.c123
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cestst.h44
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.c112
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.h43
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.c78
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.h33
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.c335
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.h44
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.c310
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.h71
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/chashtst.c384
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.c725
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.h108
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.vcproj721
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/citertst.c1923
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/citertst.h118
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.c255
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.h63
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cldrtest.c1294
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.c2774
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.h114
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cmsccoll.c5075
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.c1093
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.h60
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.c951
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.h60
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.c1517
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.h43
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.c1399
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.h61
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/colutil.c17
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cposxtst.c107
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/crestst.c1014
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/crestst.h55
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/creststn.c2950
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/creststn.h85
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cstrcase.c944
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cstrtest.c286
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.c131
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.h41
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.c356
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.h9
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cucdtst.c3342
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/currtest.c243
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/custrtrn.c1185
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/custrtst.c1817
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/cutiltst.c48
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/encoll.c357
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/encoll.h44
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/eurocreg.c188
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/hpmufn.c530
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/idnatest.c885
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.c3354
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.h69
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.c755
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.h36
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ncnvtst.c2055
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.c310
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.h113
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.c5369
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.h23
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/putiltst.c371
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/reapits.c1038
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/sorttest.c89
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/spreptst.c641
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/sprpdata.c312
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/stdnmtst.c297
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/tracetst.c379
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/trietest.c877
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/ucsdetst.c355
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/udatatst.c1761
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/udatpg_test.c307
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/uenumtst.c307
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/usettest.c646
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/usrchdat.c498
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/usrchtst.c2249
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/utexttst.c250
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/utf16tst.c734
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/utf8tst.c956
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/utmstest.c487
-rw-r--r--Build/source/libs/icu/icu-xetex/test/cintltst/utransts.c707
-rw-r--r--Build/source/libs/icu/icu-xetex/test/compat/Makefile.in75
-rw-r--r--Build/source/libs/icu/icu-xetex/test/compat/readme.txt40
-rw-r--r--Build/source/libs/icu/icu-xetex/test/compat/tzdate.c140
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/compat/tzone.pl65
-rw-r--r--Build/source/libs/icu/icu-xetex/test/hdrtst/Makefile.in188
-rw-r--r--Build/source/libs/icu/icu-xetex/test/hdrtst/cxxfiles.txt88
-rw-r--r--Build/source/libs/icu/icu-xetex/test/hdrtst/dfiles.txt4
-rw-r--r--Build/source/libs/icu/icu-xetex/test/hdrtst/pfiles.txt3
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/Makefile.in114
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/aliastst.cpp287
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/aliastst.h30
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/allcoll.cpp212
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/allcoll.h57
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/apicoll.cpp2325
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/apicoll.h179
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/astrotst.cpp436
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/astrotst.h49
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/calcasts.cpp386
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/calcasts.h63
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/callimts.cpp135
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/callimts.h41
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/calregts.cpp2658
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/calregts.h92
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/caltest.cpp1994
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/caltest.h224
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/caltztst.cpp240
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/caltztst.h65
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/canittst.cpp330
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/canittst.h59
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/citrtest.cpp1185
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/citrtest.h46
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.cpp249
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.h41
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/convtest.cpp1423
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/convtest.h104
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.cpp442
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.h64
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/csdetest.cpp518
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/csdetest.h39
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/currcoll.cpp158
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/currcoll.h39
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.cpp457
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.h52
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.cpp290
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.h59
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.cpp318
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.h52
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.cpp419
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.h35
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/decoll.cpp146
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/decoll.h50
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.cpp354
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.h43
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.cpp1461
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.h59
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.cpp558
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.h96
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.cpp2937
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.h217
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.cpp442
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.h31
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/encoll.cpp334
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/encoll.h48
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/escoll.cpp116
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/escoll.h49
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ficoll.cpp102
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ficoll.h48
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/fldset.cpp351
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/fldset.h186
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/frcoll.cpp217
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/frcoll.h52
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/g7coll.cpp302
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/g7coll.h77
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.cpp1511
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.h62
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.cpp352
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.h49
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/idnaref.cpp1048
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/idnaref.h228
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/incaltst.cpp813
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/incaltst.h53
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/intltest.cpp1590
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/intltest.h250
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/intltest.vcproj1269
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itercoll.cpp647
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itercoll.h119
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itformat.cpp132
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itformat.h27
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itmajor.cpp203
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itmajor.h26
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.cpp48
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.h31
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.cpp1938
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.h147
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.cpp183
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.h48
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.cpp364
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.h99
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ittrans.cpp56
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ittrans.h31
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itutil.cpp66
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/itutil.h24
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/jacoll.cpp199
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/jacoll.h65
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/jamotest.cpp553
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/jamotest.h60
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.cpp88
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.h40
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/loctest.cpp2136
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/loctest.h167
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.cpp378
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.h37
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.cpp269
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.h54
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.cpp966
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.h55
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.cpp409
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.h33
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.cpp351
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.h77
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/normconf.cpp581
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/normconf.h105
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/nptrans.cpp289
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/nptrans.h164
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.cpp2412
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.h219
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/numrgts.cpp2647
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/numrgts.h103
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/pptest.cpp227
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/pptest.h37
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/punyref.c302
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/punyref.h116
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.cpp1118
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.h97
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.cpp4287
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.h130
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/regcoll.cpp1215
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/regcoll.h244
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/regextst.cpp2127
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/regextst.h46
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/reptest.cpp322
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/reptest.h43
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/restest.cpp628
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/restest.h55
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/restsnew.cpp1180
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/restsnew.h59
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.cpp176
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.h29
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.cpp238
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.h31
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.cpp120
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.h77
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/srchtest.cpp2350
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/srchtest.h96
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/strcase.cpp542
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/strtest.cpp192
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/strtest.h38
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/svccoll.cpp586
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/svccoll.h46
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.cpp652
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.h55
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/testidn.cpp450
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/testidna.cpp1583
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/testidna.h120
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/testutil.cpp37
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/testutil.h34
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/textfile.cpp179
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/textfile.h72
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.cpp387
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.h27
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/thcoll.cpp459
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/thcoll.h80
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.cpp1256
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.h96
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tokiter.cpp107
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tokiter.h71
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/transapi.cpp984
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/transapi.h78
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/transrt.cpp1708
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/transrt.h49
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/transtst.cpp4652
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/transtst.h421
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/trcoll.cpp106
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/trcoll.h49
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/trnserr.cpp283
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/trnserr.h54
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tscoll.cpp513
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tscoll.h52
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsdate.cpp288
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsdate.h82
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.cpp185
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.h35
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.cpp347
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.h39
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.cpp1585
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.h46
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.cpp441
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.h89
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsputil.cpp565
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tsputil.h47
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.cpp1798
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.h84
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tstnrapi.cpp187
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.cpp513
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.h99
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.cpp458
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.h27
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.cpp329
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.h26
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzregts.cpp1219
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzregts.h61
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.cpp2087
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.h50
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tztest.cpp1664
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/tztest.h101
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.cpp265
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.h52
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.cpp217
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.h45
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.cpp466
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.h42
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/usettest.cpp3773
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/usettest.h190
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.cpp1703
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.h96
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/utxttest.cpp1400
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/utxttest.h61
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/uvectest.cpp200
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/uvectest.h34
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/v32test.cpp495
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/v32test.h32
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/wbnf.cpp1771
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/wbnf.h157
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/windttst.cpp197
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/windttst.h41
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.cpp323
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.h41
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/winutil.cpp81
-rw-r--r--Build/source/libs/icu/icu-xetex/test/intltest/winutil.h46
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/Makefile.in96
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/filetst.c1454
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/iotest.cpp844
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/iotest.h42
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/iotest.vcproj254
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/stream.cpp247
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/strtst.c790
-rw-r--r--Build/source/libs/icu/icu-xetex/test/iotest/trnstst.c316
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/FontObject.cpp240
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/FontObject.h235
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.cpp86
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.h40
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/Makefile.in105
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.cpp441
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.h118
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.cpp132
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.h71
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/cfonts.cpp55
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/cfonts.h28
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/cletest.c726
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/cletest.sln20
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/cletest.vcproj273
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/cmaps.cpp200
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/cmaps.h85
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/gendata.cpp295
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/gendata.sln19
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/gendata.vcproj269
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/gendata.xml115
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/letest.cpp1116
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/letest.h49
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/letest.sln30
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/letest.vcproj290
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/letsutil.cpp98
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/letsutil.h36
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/readme.html114
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/sfnt.h449
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/testdata.cpp638
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/xmlreader.cpp259
-rw-r--r--Build/source/libs/icu/icu-xetex/test/letest/xmlreader.h25
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf.pl48
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf_r.pl51
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/charperf/Makefile.in79
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.cpp255
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.h239
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.vcproj252
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/collperf/CollPerf.pl82
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/collperf/Makefile.in79
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.cpp880
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.vcproj246
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/convperf/ConvPerf_r.pl61
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/convperf/Makefile.in79
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.cpp654
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.h568
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.vcproj256
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/convperf/convperf_ansi.pl49
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/convperf/convperf_iml.pl55
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/convperf/data.h2731
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/normperf/Makefile.in79
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf.pl58
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf_r.pl79
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.cpp505
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.h353
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.vcproj252
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/perf.sln61
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/perldriver/Dataset.pm139
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/perldriver/Format.pm166
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/perldriver/Output.pm389
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/perldriver/PerfFramework.pm391
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/Makefile.in79
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf.pl82
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf_r.pl77
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.cpp251
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.dsp172
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.h137
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.vcproj250
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf20.dsp172
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.cpp771
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.dsp168
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/unisetperf/Makefile.in78
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/bitset.cpp197
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.bat19
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.sh23
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.bat19
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.sh23
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.bat19
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.sh23
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/trieset.cpp111
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/unicont.h34
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.cpp441
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.pl76
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.vcproj209
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/usetperf/Makefile.in79
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/usetperf/UsetPerf.pl45
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.cpp63
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.h38
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.cpp143
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.vcproj277
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ustrperf/Makefile.in79
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf.pl68
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf_r.pl70
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.cpp377
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.h549
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.vcproj252
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/utfperf/Makefile.in79
-rwxr-xr-xBuild/source/libs/icu/icu-xetex/test/perf/utfperf/UtfPerf.pl46
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.cpp365
-rw-r--r--Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.vcproj223
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt4335
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt4335
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/DataDrivenCollationTest.txt518
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/GraphemeBreakTest.txt123
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/GraphemeClusterBreakTest.txt116
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/Makefile.in220
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/NormalizationTest-3.2.0.txt17055
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/NumberFormatTestCases.txt85
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/SentenceBreakTest.txt307
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/TestFont1.otfbin0 -> 3704 bytes
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/WordBreakTest.txt519
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/calendar.txt92
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/casing.txt64
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/conversion.txt1356
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/csdetest.xml551
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/default.txt96
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/format.txt105
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/ibm9027.ucm20292
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/icu26_testtypes.resbin0 -> 13944 bytes
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/icu26e_testtypes.resbin0 -> 13944 bytes
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/icuio.txt178
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/idna_conf.txt1267
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/idna_rules.txt1500
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/importtest.binbin0 -> 15 bytes
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/iscii.bin19
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/letest.xml1302
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/mc.txt25
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cis_prep.txt1945
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_ci.txt1902
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_cs.txt522
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_p.txt565
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_s.txt1945
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/pkgdata.inc.in20
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/ra.txt125
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/ra.xlf247
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/rbbitst.txt562
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/re_tests.txt923
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/readme.txt8
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/regextst.txt1835
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/riwords.txt32943
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/root.txt109
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/sh.txt14
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/sh_YU.txt12
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/structLocale.txt10966
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/te.txt165
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/te_IN.txt96
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/te_IN_REVISED.txt13
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/test1.ucm35
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/test3.ucm60
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/test4.ucm64
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/test4x.ucm20
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/testaliases.txt65
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/testdata.mak144
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/testempty.txt10
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/testtypes.txt81
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/translit_rules.txt146
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/tstfiles.mk10
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testdata/uni-text.binbin0 -> 372 bytes
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testmap/Makefile.in80
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testmap/testmap.c76
-rw-r--r--Build/source/libs/icu/icu-xetex/test/testmap/testmap.dsp102
-rw-r--r--Build/source/libs/icu/icu-xetex/test/thaitest/Makefile.in80
-rw-r--r--Build/source/libs/icu/icu-xetex/test/thaitest/space.txt322
-rw-r--r--Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.cpp571
-rw-r--r--Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.dsp101
-rw-r--r--Build/source/libs/icu/icu-xetex/test/threadtest/Makefile.in90
-rw-r--r--Build/source/libs/icu/icu-xetex/test/threadtest/converttest.cpp88
-rw-r--r--Build/source/libs/icu/icu-xetex/test/threadtest/stringtest.cpp143
-rw-r--r--Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.cpp536
-rw-r--r--Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsp166
-rw-r--r--Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsw29
-rw-r--r--Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.h46
532 files changed, 320519 insertions, 0 deletions
diff --git a/Build/source/libs/icu/icu-xetex/test/Makefile.in b/Build/source/libs/icu/icu-xetex/test/Makefile.in
new file mode 100644
index 00000000000..07023095710
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/Makefile.in
@@ -0,0 +1,84 @@
+## Makefile.in for ICU tests
+## Copyright (c) 1999-2007, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test
+
+@ICUIO_TRUE@IOTEST = iotest
+
+## Files to remove for 'make clean'
+CLEANFILES = *~
+
+SUBDIRS = testdata intltest $(IOTEST) cintltst
+
+## List of phony targets
+.PHONY : everything all all-local all-recursive install install-local \
+install-recursive clean clean-local clean-recursive distclean \
+distclean-local distclean-recursive dist dist-recursive dist-local \
+check check-recursive check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+everything: all-recursive all-local
+all:
+ifneq ($(RECURSIVE),YES)
+ @echo simply use \`make\' \(or \`make everything\'\) to do all
+endif
+
+install: install-recursive install-local
+clean: clean-recursive clean-local
+distclean : distclean-recursive distclean-local
+ $(RMV) hdrtst/Makefile
+ $(RMV) perf/convperf/Makefile
+
+dist: dist-recursive dist-local
+check: everything check-recursive check-local
+check-recursive: all-recursive
+
+## Recursive targets
+all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive:
+ @dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-local"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $$local_target) || exit; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) "$$target-local" || exit; \
+ fi
+
+all-local:
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/Makefile.in b/Build/source/libs/icu/icu-xetex/test/cintltst/Makefile.in
new file mode 100644
index 00000000000..262b7abf1bc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/Makefile.in
@@ -0,0 +1,109 @@
+#******************************************************************************
+#
+# Copyright (C) 1999-2006, International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+#******************************************************************************
+## Makefile.in for ICU - test/cintltst
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+## All the flags and other definitions are included here.
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/cintltst
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = cintltst$(EXEEXT)
+
+BUILDDIR := $(CURR_SRCCODE_FULL_DIR)/../../
+# Simplify the path for Unix
+BUILDDIR := $(BUILDDIR:test/cintltst/../../=)
+# Simplify the path for Windows
+BUILDDIR := $(BUILDDIR:test\\cintltst/../../=)
+# Simplify the path for Windows 98
+BUILDDIR := $(BUILDDIR:TEST\\CINTLTST/../../=)
+
+ifneq ($(top_builddir),$(top_srcdir))
+CPPFLAGS += -I$(top_builddir)/common
+endif
+# we define ICU_UNICODE_VERSION so we can test it
+CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil
+DEFS += -D'ICU_UNICODE_VERSION="$(UNICODE_VERSION)"' -D'ICU_VERSION="@VERSION@"' -D'ICUDATA_NAME="$(ICUDATA_PLATFORM_NAME)"' -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = callcoll.o calltest.o colutil.o capitst.o cbiapts.o cbkittst.o \
+ccaltst.o cctest.o ccapitst.o ccolltst.o encoll.o cconvtst.o ccurrtst.o \
+cdattst.o cdetst.o cdtdptst.o cdtrgtst.o cestst.o cfintst.o cformtst.o \
+cfrtst.o cg7coll.o chashtst.o cintltst.o citertst.o cjaptst.o cloctst.o \
+cmsccoll.o cmsgtst.o cposxtst.o cldrtest.o \
+cnmdptst.o cnormtst.o cnumtst.o crestst.o creststn.o cturtst.o \
+cucdapi.o cucdtst.o custrtst.o cstrcase.o cutiltst.o nucnvtst.o nccbtst.o bocu1tst.o \
+cbiditst.o cbididat.o eurocreg.o udatatst.o utf16tst.o utransts.o \
+ncnvfbts.o ncnvtst.o putiltst.o cstrtest.o udatpg_test.o utf8tst.o \
+stdnmtst.o usrchtst.o custrtrn.o sorttest.o trietest.o usettest.o \
+uenumtst.o utmstest.o currtest.o \
+idnatest.o nfsprep.o spreptst.o sprpdata.o \
+hpmufn.o tracetst.o reapits.o utexttst.o ucsdetst.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+-include Makefile.local
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+ $(INVOKE) ./$(TARGET) $(CINTLTST_OPTS)
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.c) $(OUTOPT)$@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/bocu1tst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/bocu1tst.c
new file mode 100644
index 00000000000..0616b1cff9e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/bocu1tst.c
@@ -0,0 +1,1031 @@
+/*
+******************************************************************************
+*
+* Copyright (C) 2002-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+******************************************************************************
+* file name: bocu1tst.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2002may27
+* created by: Markus W. Scherer
+*
+* This is the reference implementation of BOCU-1,
+* the MIME-friendly form of the Binary Ordered Compression for Unicode,
+* taken directly from ### http://source.icu-project.org/repos/icu/icuhtml/trunk/design/conversion/bocu1/
+* The files bocu1.h and bocu1.c from the design folder are taken
+* verbatim (minus copyright and #include) and copied together into this file.
+* The reference code and some of the reference bocu1tst.c
+* is modified to run as part of the ICU cintltst
+* test framework (minus main(), log_ln() etc. instead of printf()).
+*
+* This reference implementation is used here to verify
+* the ICU BOCU-1 implementation, which is
+* adapted for ICU conversion APIs and optimized.
+* ### links in design doc to here and to ucnvbocu.c
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "unicode/ucnv.h"
+#include "cmemory.h"
+#include "cintltst.h"
+
+#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
+
+/* icuhtml/design/conversion/bocu1/bocu1.h ---------------------------------- */
+
+/* BOCU-1 constants and macros ---------------------------------------------- */
+
+/*
+ * BOCU-1 encodes the code points of a Unicode string as
+ * a sequence of byte-encoded differences (slope detection),
+ * preserving lexical order.
+ *
+ * Optimize the difference-taking for runs of Unicode text within
+ * small scripts:
+ *
+ * Most small scripts are allocated within aligned 128-blocks of Unicode
+ * code points. Lexical order is preserved if the "previous code point" state
+ * is always moved into the middle of such a block.
+ *
+ * Additionally, "prev" is moved from anywhere in the Unihan and Hangul
+ * areas into the middle of those areas.
+ *
+ * C0 control codes and space are encoded with their US-ASCII bytes.
+ * "prev" is reset for C0 controls but not for space.
+ */
+
+/* initial value for "prev": middle of the ASCII range */
+#define BOCU1_ASCII_PREV 0x40
+
+/* bounding byte values for differences */
+#define BOCU1_MIN 0x21
+#define BOCU1_MIDDLE 0x90
+#define BOCU1_MAX_LEAD 0xfe
+
+/* add the L suffix to make computations with BOCU1_MAX_TRAIL work on 16-bit compilers */
+#define BOCU1_MAX_TRAIL 0xffL
+#define BOCU1_RESET 0xff
+
+/* number of lead bytes */
+#define BOCU1_COUNT (BOCU1_MAX_LEAD-BOCU1_MIN+1)
+
+/* adjust trail byte counts for the use of some C0 control byte values */
+#define BOCU1_TRAIL_CONTROLS_COUNT 20
+#define BOCU1_TRAIL_BYTE_OFFSET (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
+
+/* number of trail bytes */
+#define BOCU1_TRAIL_COUNT ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
+
+/*
+ * number of positive and negative single-byte codes
+ * (counting 0==BOCU1_MIDDLE among the positive ones)
+ */
+#define BOCU1_SINGLE 64
+
+/* number of lead bytes for positive and negative 2/3/4-byte sequences */
+#define BOCU1_LEAD_2 43
+#define BOCU1_LEAD_3 3
+#define BOCU1_LEAD_4 1
+
+/* The difference value range for single-byters. */
+#define BOCU1_REACH_POS_1 (BOCU1_SINGLE-1)
+#define BOCU1_REACH_NEG_1 (-BOCU1_SINGLE)
+
+/* The difference value range for double-byters. */
+#define BOCU1_REACH_POS_2 (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
+#define BOCU1_REACH_NEG_2 (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
+
+/* The difference value range for 3-byters. */
+#define BOCU1_REACH_POS_3 \
+ (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
+
+#define BOCU1_REACH_NEG_3 (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
+
+/* The lead byte start values. */
+#define BOCU1_START_POS_2 (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
+#define BOCU1_START_POS_3 (BOCU1_START_POS_2+BOCU1_LEAD_2)
+#define BOCU1_START_POS_4 (BOCU1_START_POS_3+BOCU1_LEAD_3)
+ /* ==BOCU1_MAX_LEAD */
+
+#define BOCU1_START_NEG_2 (BOCU1_MIDDLE+BOCU1_REACH_NEG_1)
+#define BOCU1_START_NEG_3 (BOCU1_START_NEG_2-BOCU1_LEAD_2)
+#define BOCU1_START_NEG_4 (BOCU1_START_NEG_3-BOCU1_LEAD_3)
+ /* ==BOCU1_MIN+1 */
+
+/* The length of a byte sequence, according to the lead byte (!=BOCU1_RESET). */
+#define BOCU1_LENGTH_FROM_LEAD(lead) \
+ ((BOCU1_START_NEG_2<=(lead) && (lead)<BOCU1_START_POS_2) ? 1 : \
+ (BOCU1_START_NEG_3<=(lead) && (lead)<BOCU1_START_POS_3) ? 2 : \
+ (BOCU1_START_NEG_4<=(lead) && (lead)<BOCU1_START_POS_4) ? 3 : 4)
+
+/* The length of a byte sequence, according to its packed form. */
+#define BOCU1_LENGTH_FROM_PACKED(packed) \
+ ((uint32_t)(packed)<0x04000000 ? (packed)>>24 : 4)
+
+/*
+ * 12 commonly used C0 control codes (and space) are only used to encode
+ * themselves directly,
+ * which makes BOCU-1 MIME-usable and reasonably safe for
+ * ASCII-oriented software.
+ *
+ * These controls are
+ * 0 NUL
+ *
+ * 7 BEL
+ * 8 BS
+ *
+ * 9 TAB
+ * a LF
+ * b VT
+ * c FF
+ * d CR
+ *
+ * e SO
+ * f SI
+ *
+ * 1a SUB
+ * 1b ESC
+ *
+ * The other 20 C0 controls are also encoded directly (to preserve order)
+ * but are also used as trail bytes in difference encoding
+ * (for better compression).
+ */
+#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
+
+/*
+ * Byte value map for control codes,
+ * from external byte values 0x00..0x20
+ * to trail byte values 0..19 (0..0x13) as used in the difference calculation.
+ * External byte values that are illegal as trail bytes are mapped to -1.
+ */
+static const int8_t
+bocu1ByteToTrail[BOCU1_MIN]={
+/* 0 1 2 3 4 5 6 7 */
+ -1, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, -1,
+
+/* 8 9 a b c d e f */
+ -1, -1, -1, -1, -1, -1, -1, -1,
+
+/* 10 11 12 13 14 15 16 17 */
+ 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
+
+/* 18 19 1a 1b 1c 1d 1e 1f */
+ 0x0e, 0x0f, -1, -1, 0x10, 0x11, 0x12, 0x13,
+
+/* 20 */
+ -1
+};
+
+/*
+ * Byte value map for control codes,
+ * from trail byte values 0..19 (0..0x13) as used in the difference calculation
+ * to external byte values 0x00..0x20.
+ */
+static const int8_t
+bocu1TrailToByte[BOCU1_TRAIL_CONTROLS_COUNT]={
+/* 0 1 2 3 4 5 6 7 */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x10, 0x11,
+
+/* 8 9 a b c d e f */
+ 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
+
+/* 10 11 12 13 */
+ 0x1c, 0x1d, 0x1e, 0x1f
+};
+
+/**
+ * Integer division and modulo with negative numerators
+ * yields negative modulo results and quotients that are one more than
+ * what we need here.
+ * This macro adjust the results so that the modulo-value m is always >=0.
+ *
+ * For positive n, the if() condition is always FALSE.
+ *
+ * @param n Number to be split into quotient and rest.
+ * Will be modified to contain the quotient.
+ * @param d Divisor.
+ * @param m Output variable for the rest (modulo result).
+ */
+#define NEGDIVMOD(n, d, m) { \
+ (m)=(n)%(d); \
+ (n)/=(d); \
+ if((m)<0) { \
+ --(n); \
+ (m)+=(d); \
+ } \
+}
+
+/* State for BOCU-1 decoder function. */
+struct Bocu1Rx {
+ int32_t prev, count, diff;
+};
+
+typedef struct Bocu1Rx Bocu1Rx;
+
+/* Function prototypes ------------------------------------------------------ */
+
+/* see bocu1.c */
+U_CFUNC int32_t
+packDiff(int32_t diff);
+
+U_CFUNC int32_t
+encodeBocu1(int32_t *pPrev, int32_t c);
+
+U_CFUNC int32_t
+decodeBocu1(Bocu1Rx *pRx, uint8_t b);
+
+/* icuhtml/design/conversion/bocu1/bocu1.c ---------------------------------- */
+
+/* BOCU-1 implementation functions ------------------------------------------ */
+
+/**
+ * Compute the next "previous" value for differencing
+ * from the current code point.
+ *
+ * @param c current code point, 0..0x10ffff
+ * @return "previous code point" state value
+ */
+static U_INLINE int32_t
+bocu1Prev(int32_t c) {
+ /* compute new prev */
+ if(0x3040<=c && c<=0x309f) {
+ /* Hiragana is not 128-aligned */
+ return 0x3070;
+ } else if(0x4e00<=c && c<=0x9fa5) {
+ /* CJK Unihan */
+ return 0x4e00-BOCU1_REACH_NEG_2;
+ } else if(0xac00<=c && c<=0xd7a3) {
+ /* Korean Hangul (cast to int32_t to avoid wraparound on 16-bit compilers) */
+ return ((int32_t)0xd7a3+(int32_t)0xac00)/2;
+ } else {
+ /* mostly small scripts */
+ return (c&~0x7f)+BOCU1_ASCII_PREV;
+ }
+}
+
+/**
+ * Encode a difference -0x10ffff..0x10ffff in 1..4 bytes
+ * and return a packed integer with them.
+ *
+ * The encoding favors small absolut differences with short encodings
+ * to compress runs of same-script characters.
+ *
+ * @param diff difference value -0x10ffff..0x10ffff
+ * @return
+ * 0x010000zz for 1-byte sequence zz
+ * 0x0200yyzz for 2-byte sequence yy zz
+ * 0x03xxyyzz for 3-byte sequence xx yy zz
+ * 0xwwxxyyzz for 4-byte sequence ww xx yy zz (ww>0x03)
+ */
+U_CFUNC int32_t
+packDiff(int32_t diff) {
+ int32_t result, m, lead, count, shift;
+
+ if(diff>=BOCU1_REACH_NEG_1) {
+ /* mostly positive differences, and single-byte negative ones */
+ if(diff<=BOCU1_REACH_POS_1) {
+ /* single byte */
+ return 0x01000000|(BOCU1_MIDDLE+diff);
+ } else if(diff<=BOCU1_REACH_POS_2) {
+ /* two bytes */
+ diff-=BOCU1_REACH_POS_1+1;
+ lead=BOCU1_START_POS_2;
+ count=1;
+ } else if(diff<=BOCU1_REACH_POS_3) {
+ /* three bytes */
+ diff-=BOCU1_REACH_POS_2+1;
+ lead=BOCU1_START_POS_3;
+ count=2;
+ } else {
+ /* four bytes */
+ diff-=BOCU1_REACH_POS_3+1;
+ lead=BOCU1_START_POS_4;
+ count=3;
+ }
+ } else {
+ /* two- and four-byte negative differences */
+ if(diff>=BOCU1_REACH_NEG_2) {
+ /* two bytes */
+ diff-=BOCU1_REACH_NEG_1;
+ lead=BOCU1_START_NEG_2;
+ count=1;
+ } else if(diff>=BOCU1_REACH_NEG_3) {
+ /* three bytes */
+ diff-=BOCU1_REACH_NEG_2;
+ lead=BOCU1_START_NEG_3;
+ count=2;
+ } else {
+ /* four bytes */
+ diff-=BOCU1_REACH_NEG_3;
+ lead=BOCU1_START_NEG_4;
+ count=3;
+ }
+ }
+
+ /* encode the length of the packed result */
+ if(count<3) {
+ result=(count+1)<<24;
+ } else /* count==3, MSB used for the lead byte */ {
+ result=0;
+ }
+
+ /* calculate trail bytes like digits in itoa() */
+ shift=0;
+ do {
+ NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m);
+ result|=BOCU1_TRAIL_TO_BYTE(m)<<shift;
+ shift+=8;
+ } while(--count>0);
+
+ /* add lead byte */
+ result|=(lead+diff)<<shift;
+
+ return result;
+}
+
+/**
+ * BOCU-1 encoder function.
+ *
+ * @param pPrev pointer to the integer that holds
+ * the "previous code point" state;
+ * the initial value should be 0 which
+ * encodeBocu1 will set to the actual BOCU-1 initial state value
+ * @param c the code point to encode
+ * @return the packed 1/2/3/4-byte encoding, see packDiff(),
+ * or 0 if an error occurs
+ *
+ * @see packDiff
+ */
+U_CFUNC int32_t
+encodeBocu1(int32_t *pPrev, int32_t c) {
+ int32_t prev;
+
+ if(pPrev==NULL || c<0 || c>0x10ffff) {
+ /* illegal argument */
+ return 0;
+ }
+
+ prev=*pPrev;
+ if(prev==0) {
+ /* lenient handling of initial value 0 */
+ prev=*pPrev=BOCU1_ASCII_PREV;
+ }
+
+ if(c<=0x20) {
+ /*
+ * ISO C0 control & space:
+ * Encode directly for MIME compatibility,
+ * and reset state except for space, to not disrupt compression.
+ */
+ if(c!=0x20) {
+ *pPrev=BOCU1_ASCII_PREV;
+ }
+ return 0x01000000|c;
+ }
+
+ /*
+ * all other Unicode code points c==U+0021..U+10ffff
+ * are encoded with the difference c-prev
+ *
+ * a new prev is computed from c,
+ * placed in the middle of a 0x80-block (for most small scripts) or
+ * in the middle of the Unihan and Hangul blocks
+ * to statistically minimize the following difference
+ */
+ *pPrev=bocu1Prev(c);
+ return packDiff(c-prev);
+}
+
+/**
+ * Function for BOCU-1 decoder; handles multi-byte lead bytes.
+ *
+ * @param pRx pointer to the decoder state structure
+ * @param b lead byte;
+ * BOCU1_MIN<=b<BOCU1_START_NEG_2 or BOCU1_START_POS_2<=b<=BOCU1_MAX_LEAD
+ * @return -1 (state change only)
+ *
+ * @see decodeBocu1
+ */
+static int32_t
+decodeBocu1LeadByte(Bocu1Rx *pRx, uint8_t b) {
+ int32_t c, count;
+
+ if(b>=BOCU1_START_NEG_2) {
+ /* positive difference */
+ if(b<BOCU1_START_POS_3) {
+ /* two bytes */
+ c=((int32_t)b-BOCU1_START_POS_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_POS_1+1;
+ count=1;
+ } else if(b<BOCU1_START_POS_4) {
+ /* three bytes */
+ c=((int32_t)b-BOCU1_START_POS_3)*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT+BOCU1_REACH_POS_2+1;
+ count=2;
+ } else {
+ /* four bytes */
+ c=BOCU1_REACH_POS_3+1;
+ count=3;
+ }
+ } else {
+ /* negative difference */
+ if(b>=BOCU1_START_NEG_3) {
+ /* two bytes */
+ c=((int32_t)b-BOCU1_START_NEG_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_NEG_1;
+ count=1;
+ } else if(b>BOCU1_MIN) {
+ /* three bytes */
+ c=((int32_t)b-BOCU1_START_NEG_3)*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT+BOCU1_REACH_NEG_2;
+ count=2;
+ } else {
+ /* four bytes */
+ c=-BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT+BOCU1_REACH_NEG_3;
+ count=3;
+ }
+ }
+
+ /* set the state for decoding the trail byte(s) */
+ pRx->diff=c;
+ pRx->count=count;
+ return -1;
+}
+
+/**
+ * Function for BOCU-1 decoder; handles multi-byte trail bytes.
+ *
+ * @param pRx pointer to the decoder state structure
+ * @param b trail byte
+ * @return result value, same as decodeBocu1
+ *
+ * @see decodeBocu1
+ */
+static int32_t
+decodeBocu1TrailByte(Bocu1Rx *pRx, uint8_t b) {
+ int32_t t, c, count;
+
+ if(b<=0x20) {
+ /* skip some C0 controls and make the trail byte range contiguous */
+ t=bocu1ByteToTrail[b];
+ if(t<0) {
+ /* illegal trail byte value */
+ pRx->prev=BOCU1_ASCII_PREV;
+ pRx->count=0;
+ return -99;
+ }
+#if BOCU1_MAX_TRAIL<0xff
+ } else if(b>BOCU1_MAX_TRAIL) {
+ return -99;
+#endif
+ } else {
+ t=(int32_t)b-BOCU1_TRAIL_BYTE_OFFSET;
+ }
+
+ /* add trail byte into difference and decrement count */
+ c=pRx->diff;
+ count=pRx->count;
+
+ if(count==1) {
+ /* final trail byte, deliver a code point */
+ c=pRx->prev+c+t;
+ if(0<=c && c<=0x10ffff) {
+ /* valid code point result */
+ pRx->prev=bocu1Prev(c);
+ pRx->count=0;
+ return c;
+ } else {
+ /* illegal code point result */
+ pRx->prev=BOCU1_ASCII_PREV;
+ pRx->count=0;
+ return -99;
+ }
+ }
+
+ /* intermediate trail byte */
+ if(count==2) {
+ pRx->diff=c+t*BOCU1_TRAIL_COUNT;
+ } else /* count==3 */ {
+ pRx->diff=c+t*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT;
+ }
+ pRx->count=count-1;
+ return -1;
+}
+
+/**
+ * BOCU-1 decoder function.
+ *
+ * @param pRx pointer to the decoder state structure;
+ * the initial values should be 0 which
+ * decodeBocu1 will set to actual initial state values
+ * @param b an input byte
+ * @return
+ * 0..0x10ffff for a result code point
+ * -1 if only the state changed without code point output
+ * <-1 if an error occurs
+ */
+U_CFUNC int32_t
+decodeBocu1(Bocu1Rx *pRx, uint8_t b) {
+ int32_t prev, c, count;
+
+ if(pRx==NULL) {
+ /* illegal argument */
+ return -99;
+ }
+
+ prev=pRx->prev;
+ if(prev==0) {
+ /* lenient handling of initial 0 values */
+ prev=pRx->prev=BOCU1_ASCII_PREV;
+ count=pRx->count=0;
+ } else {
+ count=pRx->count;
+ }
+
+ if(count==0) {
+ /* byte in lead position */
+ if(b<=0x20) {
+ /*
+ * Direct-encoded C0 control code or space.
+ * Reset prev for C0 control codes but not for space.
+ */
+ if(b!=0x20) {
+ pRx->prev=BOCU1_ASCII_PREV;
+ }
+ return b;
+ }
+
+ /*
+ * b is a difference lead byte.
+ *
+ * Return a code point directly from a single-byte difference.
+ *
+ * For multi-byte difference lead bytes, set the decoder state
+ * with the partial difference value from the lead byte and
+ * with the number of trail bytes.
+ *
+ * For four-byte differences, the signedness also affects the
+ * first trail byte, which has special handling farther below.
+ */
+ if(b>=BOCU1_START_NEG_2 && b<BOCU1_START_POS_2) {
+ /* single-byte difference */
+ c=prev+((int32_t)b-BOCU1_MIDDLE);
+ pRx->prev=bocu1Prev(c);
+ return c;
+ } else if(b==BOCU1_RESET) {
+ /* only reset the state, no code point */
+ pRx->prev=BOCU1_ASCII_PREV;
+ return -1;
+ } else {
+ return decodeBocu1LeadByte(pRx, b);
+ }
+ } else {
+ /* trail byte in any position */
+ return decodeBocu1TrailByte(pRx, b);
+ }
+}
+
+/* icuhtml/design/conversion/bocu1/bocu1tst.c ------------------------------- */
+
+/* test code ---------------------------------------------------------------- */
+
+/* test code options */
+
+/* ignore comma when processing name lists in testText() */
+#define TEST_IGNORE_COMMA 1
+
+/**
+ * Write a packed BOCU-1 byte sequence into a byte array,
+ * without overflow check.
+ * Test function.
+ *
+ * @param packed packed BOCU-1 byte sequence, see packDiff()
+ * @param p pointer to byte array
+ * @return number of bytes
+ *
+ * @see packDiff
+ */
+static int32_t
+writePacked(int32_t packed, uint8_t *p) {
+ int32_t count=BOCU1_LENGTH_FROM_PACKED(packed);
+ switch(count) {
+ case 4:
+ *p++=(uint8_t)(packed>>24);
+ case 3:
+ *p++=(uint8_t)(packed>>16);
+ case 2:
+ *p++=(uint8_t)(packed>>8);
+ case 1:
+ *p++=(uint8_t)packed;
+ default:
+ break;
+ }
+
+ return count;
+}
+
+/**
+ * Unpack a packed BOCU-1 non-C0/space byte sequence and get
+ * the difference to initialPrev.
+ * Used only for round-trip testing of the difference encoding and decoding.
+ * Test function.
+ *
+ * @param initialPrev bogus "previous code point" value to make sure that
+ * the resulting code point is in the range 0..0x10ffff
+ * @param packed packed BOCU-1 byte sequence
+ * @return the difference to initialPrev
+ *
+ * @see packDiff
+ * @see writeDiff
+ */
+static int32_t
+unpackDiff(int32_t initialPrev, int32_t packed) {
+ Bocu1Rx rx={ 0, 0, 0 };
+ int32_t count;
+
+ rx.prev=initialPrev;
+ count=BOCU1_LENGTH_FROM_PACKED(packed);
+ switch(count) {
+ case 4:
+ decodeBocu1(&rx, (uint8_t)(packed>>24));
+ case 3:
+ decodeBocu1(&rx, (uint8_t)(packed>>16));
+ case 2:
+ decodeBocu1(&rx, (uint8_t)(packed>>8));
+ case 1:
+ /* subtract initial prev */
+ return decodeBocu1(&rx, (uint8_t)packed)-initialPrev;
+ default:
+ return -0x7fffffff;
+ }
+}
+
+/**
+ * Encode one difference value -0x10ffff..+0x10ffff in 1..4 bytes,
+ * preserving lexical order.
+ * Also checks for roundtripping of the difference encoding.
+ * Test function.
+ *
+ * @param diff difference value to test, -0x10ffff..0x10ffff
+ * @param p pointer to output byte array
+ * @return p advanced by number of bytes output
+ *
+ * @see unpackDiff
+ */
+static uint8_t *
+writeDiff(int32_t diff, uint8_t *p) {
+ /* generate the difference as a packed value and serialize it */
+ int32_t packed, initialPrev;
+
+ packed=packDiff(diff);
+
+ /*
+ * bogus initial "prev" to work around
+ * code point range check in decodeBocu1()
+ */
+ if(diff<=0) {
+ initialPrev=0x10ffff;
+ } else {
+ initialPrev=-1;
+ }
+
+ if(diff!=unpackDiff(initialPrev, packed)) {
+ log_err("error: unpackDiff(packDiff(diff=%ld)=0x%08lx)=%ld!=diff\n",
+ diff, packed, unpackDiff(initialPrev, packed));
+ }
+ return p+writePacked(packed, p);
+}
+
+/**
+ * Encode a UTF-16 string in BOCU-1.
+ * Does not check for overflows, but otherwise useful function.
+ *
+ * @param s input UTF-16 string
+ * @param length number of UChar code units in s
+ * @param p pointer to output byte array
+ * @return number of bytes output
+ */
+static int32_t
+writeString(const UChar *s, int32_t length, uint8_t *p) {
+ uint8_t *p0;
+ int32_t c, prev, i;
+
+ prev=0;
+ p0=p;
+ i=0;
+ while(i<length) {
+ UTF_NEXT_CHAR(s, i, length, c);
+ p+=writePacked(encodeBocu1(&prev, c), p);
+ }
+ return (int32_t)(p-p0);
+}
+
+/**
+ * Decode a BOCU-1 byte sequence to a UTF-16 string.
+ * Does not check for overflows, but otherwise useful function.
+ *
+ * @param p pointer to input BOCU-1 bytes
+ * @param length number of input bytes
+ * @param s point to output UTF-16 string array
+ * @return number of UChar code units output
+ */
+static int32_t
+readString(const uint8_t *p, int32_t length, UChar *s) {
+ Bocu1Rx rx={ 0, 0, 0 };
+ int32_t c, i, sLength;
+
+ i=sLength=0;
+ while(i<length) {
+ c=decodeBocu1(&rx, p[i++]);
+ if(c<-1) {
+ log_err("error: readString detects encoding error at string index %ld\n", i);
+ return -1;
+ }
+ if(c>=0) {
+ UTF_APPEND_CHAR_UNSAFE(s, sLength, c);
+ }
+ }
+ return sLength;
+}
+
+static U_INLINE char
+hexDigit(uint8_t digit) {
+ return digit<=9 ? (char)('0'+digit) : (char)('a'-10+digit);
+}
+
+/**
+ * Pretty-print 0-terminated byte values.
+ * Helper function for test output.
+ *
+ * @param bytes 0-terminated byte array to print
+ */
+static void
+printBytes(uint8_t *bytes, char *out) {
+ int i;
+ uint8_t b;
+
+ i=0;
+ while((b=*bytes++)!=0) {
+ *out++=' ';
+ *out++=hexDigit((uint8_t)(b>>4));
+ *out++=hexDigit((uint8_t)(b&0xf));
+ ++i;
+ }
+ i=3*(5-i);
+ while(i>0) {
+ *out++=' ';
+ --i;
+ }
+ *out=0;
+}
+
+/**
+ * Basic BOCU-1 test function, called when there are no command line arguments.
+ * Prints some of the #define values and performs round-trip tests of the
+ * difference encoding and decoding.
+ */
+static void
+TestBOCU1RefDiff(void) {
+ char buf1[80], buf2[80];
+ uint8_t prev[5], level[5];
+ int32_t i, cmp, countErrors;
+
+ log_verbose("reach of single bytes: %ld\n", 1+BOCU1_REACH_POS_1-BOCU1_REACH_NEG_1);
+ log_verbose("reach of 2 bytes : %ld\n", 1+BOCU1_REACH_POS_2-BOCU1_REACH_NEG_2);
+ log_verbose("reach of 3 bytes : %ld\n\n", 1+BOCU1_REACH_POS_3-BOCU1_REACH_NEG_3);
+
+ log_verbose(" BOCU1_REACH_NEG_1 %8ld BOCU1_REACH_POS_1 %8ld\n", BOCU1_REACH_NEG_1, BOCU1_REACH_POS_1);
+ log_verbose(" BOCU1_REACH_NEG_2 %8ld BOCU1_REACH_POS_2 %8ld\n", BOCU1_REACH_NEG_2, BOCU1_REACH_POS_2);
+ log_verbose(" BOCU1_REACH_NEG_3 %8ld BOCU1_REACH_POS_3 %8ld\n\n", BOCU1_REACH_NEG_3, BOCU1_REACH_POS_3);
+
+ log_verbose(" BOCU1_MIDDLE 0x%02x\n", BOCU1_MIDDLE);
+ log_verbose(" BOCU1_START_NEG_2 0x%02x BOCU1_START_POS_2 0x%02x\n", BOCU1_START_NEG_2, BOCU1_START_POS_2);
+ log_verbose(" BOCU1_START_NEG_3 0x%02x BOCU1_START_POS_3 0x%02x\n\n", BOCU1_START_NEG_3, BOCU1_START_POS_3);
+
+ /* test packDiff() & unpackDiff() with some specific values */
+ writeDiff(0, level);
+ writeDiff(1, level);
+ writeDiff(65, level);
+ writeDiff(130, level);
+ writeDiff(30000, level);
+ writeDiff(1000000, level);
+ writeDiff(-65, level);
+ writeDiff(-130, level);
+ writeDiff(-30000, level);
+ writeDiff(-1000000, level);
+
+ /* test that each value is smaller than any following one */
+ countErrors=0;
+ i=-0x10ffff;
+ *writeDiff(i, prev)=0;
+
+ /* show first number and bytes */
+ printBytes(prev, buf1);
+ log_verbose(" wD(%8ld) %s\n", i, buf1);
+
+ for(++i; i<=0x10ffff; ++i) {
+ *writeDiff(i, level)=0;
+ cmp=strcmp((const char *)prev, (const char *)level);
+ if(BOCU1_LENGTH_FROM_LEAD(level[0])!=(int32_t)strlen((const char *)level)) {
+ log_verbose("BOCU1_LENGTH_FROM_LEAD(0x%02x)=%ld!=%ld=strlen(writeDiff(%ld))\n",
+ level[0], BOCU1_LENGTH_FROM_LEAD(level[0]), strlen((const char *)level), i);
+ }
+ if(cmp<0) {
+ if(i==0 || i==1 || strlen((const char *)prev)!=strlen((const char *)level)) {
+ /*
+ * if the result is good, then print only if the length changed
+ * to get little but interesting output
+ */
+ printBytes(prev, buf1);
+ printBytes(level, buf2);
+ log_verbose("ok: strcmp(wD(%8ld), wD(%8ld))=%2d %s%s\n", i-1, i, cmp, buf1, buf2);
+ }
+ } else {
+ ++countErrors;
+ printBytes(prev, buf1);
+ printBytes(level, buf2);
+ log_verbose("wrong: strcmp(wD(%8ld), wD(%8ld))=%2d %s%s\n", i-1, i, cmp, buf1, buf2);
+ }
+ /* remember the previous bytes */
+ memcpy(prev, level, 4);
+ }
+
+ /* show last number and bytes */
+ printBytes((uint8_t *)"", buf1);
+ printBytes(prev, buf2);
+ log_verbose(" wD(%8ld) %s%s\n", i-1, buf1, buf2);
+
+ if(countErrors==0) {
+ log_verbose("writeDiff(-0x10ffff..0x10ffff) works fine\n");
+ } else {
+ log_err("writeDiff(-0x10ffff..0x10ffff) violates lexical ordering in %d cases\n", countErrors);
+ }
+
+ /* output signature byte sequence */
+ i=0;
+ writePacked(encodeBocu1(&i, 0xfeff), level);
+ log_verbose("\nBOCU-1 signature byte sequence: %02x %02x %02x\n",
+ level[0], level[1], level[2]);
+}
+
+/* cintltst code ------------------------------------------------------------ */
+
+static const int32_t DEFAULT_BUFFER_SIZE = 30000;
+
+
+/* test one string with the ICU and the reference BOCU-1 implementations */
+static void
+roundtripBOCU1(UConverter *bocu1, int32_t number, const UChar *text, int32_t length) {
+ UChar *roundtripRef, *roundtripICU;
+ char *bocu1Ref, *bocu1ICU;
+
+ int32_t bocu1RefLength, bocu1ICULength, roundtripRefLength, roundtripICULength;
+ UErrorCode errorCode;
+
+ roundtripRef = malloc(DEFAULT_BUFFER_SIZE * sizeof(UChar));
+ roundtripICU = malloc(DEFAULT_BUFFER_SIZE * sizeof(UChar));
+ bocu1Ref = malloc(DEFAULT_BUFFER_SIZE);
+ bocu1ICU = malloc(DEFAULT_BUFFER_SIZE);
+
+ /* Unicode -> BOCU-1 */
+ bocu1RefLength=writeString(text, length, (uint8_t *)bocu1Ref);
+
+ errorCode=U_ZERO_ERROR;
+ bocu1ICULength=ucnv_fromUChars(bocu1, bocu1ICU, DEFAULT_BUFFER_SIZE, text, length, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_fromUChars(BOCU-1, text(%d)[%d]) failed: %s\n", number, length, u_errorName(errorCode));
+ return;
+ }
+
+ if(bocu1RefLength!=bocu1ICULength || 0!=uprv_memcmp(bocu1Ref, bocu1ICU, bocu1RefLength)) {
+ log_err("Unicode(%d)[%d] -> BOCU-1: reference[%d]!=ICU[%d]\n", number, length, bocu1RefLength, bocu1ICULength);
+ return;
+ }
+
+ /* BOCU-1 -> Unicode */
+ roundtripRefLength=readString((uint8_t *)bocu1Ref, bocu1RefLength, roundtripRef);
+ if(roundtripRefLength<0) {
+ return; /* readString() found an error and reported it */
+ }
+
+ roundtripICULength=ucnv_toUChars(bocu1, roundtripICU, DEFAULT_BUFFER_SIZE, bocu1ICU, bocu1ICULength, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_toUChars(BOCU-1, text(%d)[%d]) failed: %s\n", number, length, u_errorName(errorCode));
+ return;
+ }
+
+ if(length!=roundtripRefLength || 0!=u_memcmp(text, roundtripRef, length)) {
+ log_err("BOCU-1 -> Unicode: original(%d)[%d]!=reference[%d]\n", number, length, roundtripRefLength);
+ return;
+ }
+ if(roundtripRefLength!=roundtripICULength || 0!=u_memcmp(roundtripRef, roundtripICU, roundtripRefLength)) {
+ log_err("BOCU-1 -> Unicode: reference(%d)[%d]!=ICU[%d]\n", number, roundtripRefLength, roundtripICULength);
+ return;
+ }
+ free(roundtripRef);
+ free(roundtripICU);
+ free(bocu1Ref);
+ free(bocu1ICU);
+}
+
+static const UChar feff[]={ 0xfeff };
+static const UChar ascii[]={ 0x61, 0x62, 0x20, 0x63, 0x61 };
+static const UChar crlf[]={ 0xd, 0xa, 0x20 };
+static const UChar nul[]={ 0 };
+static const UChar latin[]={ 0xdf, 0xe6 };
+static const UChar devanagari[]={ 0x930, 0x20, 0x918, 0x909 };
+static const UChar hiragana[]={ 0x3086, 0x304d, 0x20, 0x3053, 0x4000 };
+static const UChar unihan[]={ 0x4e00, 0x7777, 0x20, 0x9fa5, 0x4e00 };
+static const UChar hangul[]={ 0xac00, 0xbcde, 0x20, 0xd7a3 };
+static const UChar surrogates[]={ 0xdc00, 0xd800 }; /* single surrogates, unmatched! */
+static const UChar plane1[]={ 0xd800, 0xdc00 };
+static const UChar plane2[]={ 0xd845, 0xdddd };
+static const UChar plane15[]={ 0xdbbb, 0xddee, 0x20 };
+static const UChar plane16[]={ 0xdbff, 0xdfff };
+static const UChar c0[]={ 1, 0xe40, 0x20, 9 };
+
+static const struct {
+ const UChar *s;
+ int32_t length;
+} strings[]={
+ { feff, LENGTHOF(feff) },
+ { ascii, LENGTHOF(ascii) },
+ { crlf, LENGTHOF(crlf) },
+ { nul, LENGTHOF(nul) },
+ { latin, LENGTHOF(latin) },
+ { devanagari, LENGTHOF(devanagari) },
+ { hiragana, LENGTHOF(hiragana) },
+ { unihan, LENGTHOF(unihan) },
+ { hangul, LENGTHOF(hangul) },
+ { surrogates, LENGTHOF(surrogates) },
+ { plane1, LENGTHOF(plane1) },
+ { plane2, LENGTHOF(plane2) },
+ { plane15, LENGTHOF(plane15) },
+ { plane16, LENGTHOF(plane16) },
+ { c0, LENGTHOF(c0) }
+};
+
+/*
+ * Verify that the ICU BOCU-1 implementation produces the same results as
+ * the reference implementation from the design folder.
+ * Generate some texts and convert them with both converters, verifying
+ * identical results and roundtripping.
+ */
+static void
+TestBOCU1(void) {
+ UChar *text;
+ int32_t i, length;
+
+ UConverter *bocu1;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ bocu1=ucnv_open("BOCU-1", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: unable to open BOCU-1 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ text = malloc(DEFAULT_BUFFER_SIZE * sizeof(UChar));
+
+ /* text 1: each of strings[] once */
+ length=0;
+ for(i=0; i<LENGTHOF(strings); ++i) {
+ u_memcpy(text+length, strings[i].s, strings[i].length);
+ length+=strings[i].length;
+ }
+ roundtripBOCU1(bocu1, 1, text, length);
+
+ /* text 2: each of strings[] twice */
+ length=0;
+ for(i=0; i<LENGTHOF(strings); ++i) {
+ u_memcpy(text+length, strings[i].s, strings[i].length);
+ length+=strings[i].length;
+ u_memcpy(text+length, strings[i].s, strings[i].length);
+ length+=strings[i].length;
+ }
+ roundtripBOCU1(bocu1, 2, text, length);
+
+ /* text 3: each of strings[] many times (set step vs. |strings| so that all strings are used) */
+ length=0;
+ for(i=1; length<5000; i+=7) {
+ if(i>=LENGTHOF(strings)) {
+ i-=LENGTHOF(strings);
+ }
+ u_memcpy(text+length, strings[i].s, strings[i].length);
+ length+=strings[i].length;
+ }
+ roundtripBOCU1(bocu1, 3, text, length);
+
+ ucnv_close(bocu1);
+ free(text);
+}
+
+U_CFUNC void addBOCU1Tests(TestNode** root);
+
+U_CFUNC void
+addBOCU1Tests(TestNode** root) {
+ addTest(root, TestBOCU1RefDiff, "tsconv/bocu1tst/TestBOCU1RefDiff");
+ addTest(root, TestBOCU1, "tsconv/bocu1tst/TestBOCU1");
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.c b/Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.c
new file mode 100644
index 00000000000..d898eea25f2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.c
@@ -0,0 +1,1303 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*******************************************************************************
+*
+* File CALLCOLL.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+********************************************************************************
+*/
+
+/*
+ * Important: This file is included into intltest/allcoll.cpp so that the
+ * test data is shared. This makes it easier to maintain the test data,
+ * especially since the Unicode data must be portable and quoted character
+ * literals will not work.
+ * If it is included, then there will be a #define INCLUDE_CALLCOLL_C
+ * that must prevent the actual code in here from being part of the
+ * allcoll.cpp compilation.
+ */
+
+/**
+ * CollationDummyTest is a third level test class. This tests creation of
+ * a customized collator object. For example, number 1 to be sorted
+ * equlivalent to word 'one'.
+ */
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "unicode/ucoleitr.h"
+#include "unicode/ustring.h"
+#include "unicode/uclean.h"
+#include "unicode/putil.h"
+#include "unicode/uenum.h"
+
+#include "cintltst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "calldata.h"
+#include "cstring.h"
+#include "cmemory.h"
+#include "ucol_imp.h"
+
+/* perform test with strength PRIMARY */
+static void TestPrimary(void);
+
+/* perform test with strength SECONDARY */
+static void TestSecondary(void);
+
+/* perform test with strength tertiary */
+static void TestTertiary(void);
+
+/*perform tests with strength Identical */
+static void TestIdentical(void);
+
+/* perform extra tests */
+static void TestExtra(void);
+
+/* Test jitterbug 581 */
+static void TestJB581(void);
+
+/* Test jitterbug 1401 */
+static void TestJB1401(void);
+
+/* Test [variable top] in the rule syntax */
+static void TestVariableTop(void);
+
+/* Test surrogates */
+static void TestSurrogates(void);
+
+static void TestInvalidRules(void);
+
+static void TestJitterbug1098(void);
+
+static void TestFCDCrash(void);
+
+static void TestJ5298(void);
+
+const UCollationResult results[] = {
+ UCOL_LESS,
+ UCOL_LESS, /*UCOL_GREATER,*/
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ UCOL_LESS, /* 10 */
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ /* test primary > 17 */
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_EQUAL, /* 20 */
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_LESS,
+ /* test secondary > 26 */
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_EQUAL, /* 30 */
+ UCOL_EQUAL,
+ UCOL_LESS,
+ UCOL_EQUAL, /* 34 */
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_LESS /* 37 */
+};
+
+
+static
+void uprv_appendByteToHexString(char *dst, uint8_t val) {
+ uint32_t len = (uint32_t)uprv_strlen(dst);
+ *(dst+len) = T_CString_itosOffset((val >> 4));
+ *(dst+len+1) = T_CString_itosOffset((val & 0xF));
+ *(dst+len+2) = 0;
+}
+
+/* this function makes a string with representation of a sortkey */
+static char* U_EXPORT2 sortKeyToString(const UCollator *coll, const uint8_t *sortkey, char *buffer, uint32_t *len) {
+ int32_t strength = UCOL_PRIMARY;
+ uint32_t res_size = 0;
+ UBool doneCase = FALSE;
+
+ char *current = buffer;
+ const uint8_t *currentSk = sortkey;
+
+ uprv_strcpy(current, "[");
+
+ while(strength <= UCOL_QUATERNARY && strength <= coll->strength) {
+ if(strength > UCOL_PRIMARY) {
+ uprv_strcat(current, " . ");
+ }
+ while(*currentSk != 0x01 && *currentSk != 0x00) { /* print a level */
+ uprv_appendByteToHexString(current, *currentSk++);
+ uprv_strcat(current, " ");
+ }
+ if(coll->caseLevel == UCOL_ON && strength == UCOL_SECONDARY && doneCase == FALSE) {
+ doneCase = TRUE;
+ } else if(coll->caseLevel == UCOL_OFF || doneCase == TRUE || strength != UCOL_SECONDARY) {
+ strength ++;
+ }
+ uprv_appendByteToHexString(current, *currentSk++); /* This should print '01' */
+ if(strength == UCOL_QUATERNARY && coll->alternateHandling == UCOL_NON_IGNORABLE) {
+ break;
+ }
+ }
+
+ if(coll->strength == UCOL_IDENTICAL) {
+ uprv_strcat(current, " . ");
+ while(*currentSk != 0) {
+ uprv_appendByteToHexString(current, *currentSk++);
+ uprv_strcat(current, " ");
+ }
+
+ uprv_appendByteToHexString(current, *currentSk++);
+ }
+ uprv_strcat(current, "]");
+
+ if(res_size > *len) {
+ return NULL;
+ }
+
+ return buffer;
+}
+
+void addAllCollTest(TestNode** root)
+{
+
+
+ addTest(root, &TestPrimary, "tscoll/callcoll/TestPrimary");
+ addTest(root, &TestSecondary, "tscoll/callcoll/TestSecondary");
+ addTest(root, &TestTertiary, "tscoll/callcoll/TestTertiary");
+ addTest(root, &TestIdentical, "tscoll/callcoll/TestIdentical");
+ addTest(root, &TestExtra, "tscoll/callcoll/TestExtra");
+ addTest(root, &TestJB581, "tscoll/callcoll/TestJB581");
+ addTest(root, &TestVariableTop, "tscoll/callcoll/TestVariableTop");
+ addTest(root, &TestSurrogates, "tscoll/callcoll/TestSurrogates");
+ addTest(root, &TestInvalidRules, "tscoll/callcoll/TestInvalidRules");
+ addTest(root, &TestJB1401, "tscoll/callcoll/TestJB1401");
+ addTest(root, &TestJitterbug1098, "tscoll/callcoll/TestJitterbug1098");
+ addTest(root, &TestFCDCrash, "tscoll/callcoll/TestFCDCrash");
+ addTest(root, &TestJ5298, "tscoll/callcoll/TestJ5298");
+}
+
+UBool hasCollationElements(const char *locName) {
+
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *ColEl = NULL;
+
+ UResourceBundle *loc = ures_open(U_ICUDATA_COLL, locName, &status);;
+
+ if(U_SUCCESS(status)) {
+ status = U_ZERO_ERROR;
+ ColEl = ures_getByKey(loc, "collations", ColEl, &status);
+ if(status == U_ZERO_ERROR) { /* do the test - there are real elements */
+ ures_close(ColEl);
+ ures_close(loc);
+ return TRUE;
+ }
+ ures_close(ColEl);
+ ures_close(loc);
+ }
+ return FALSE;
+}
+
+static UCollationResult compareUsingPartials(UCollator *coll, const UChar source[], int32_t sLen, const UChar target[], int32_t tLen, int32_t pieceSize, UErrorCode *status) {
+ int32_t partialSKResult = 0;
+ UCharIterator sIter, tIter;
+ uint32_t sState[2], tState[2];
+ int32_t sSize = pieceSize, tSize = pieceSize;
+ /*int32_t i = 0;*/
+ uint8_t sBuf[16384], tBuf[16384];
+ if(pieceSize > 16384) {
+ log_err("Partial sortkey size buffer too small. Please consider increasing the buffer!\n");
+ *status = U_BUFFER_OVERFLOW_ERROR;
+ return UCOL_EQUAL;
+ }
+ *status = U_ZERO_ERROR;
+ sState[0] = 0; sState[1] = 0;
+ tState[0] = 0; tState[1] = 0;
+ while(sSize == pieceSize && tSize == pieceSize && partialSKResult == 0) {
+ uiter_setString(&sIter, source, sLen);
+ uiter_setString(&tIter, target, tLen);
+ sSize = ucol_nextSortKeyPart(coll, &sIter, sState, sBuf, pieceSize, status);
+ tSize = ucol_nextSortKeyPart(coll, &tIter, tState, tBuf, pieceSize, status);
+
+ if(sState[0] != 0 || tState[0] != 0) {
+ /*log_verbose("State != 0 : %08X %08X\n", sState[0], tState[0]);*/
+ }
+ /*log_verbose("%i ", i++);*/
+
+ partialSKResult = memcmp(sBuf, tBuf, pieceSize);
+ }
+
+ if(partialSKResult < 0) {
+ return UCOL_LESS;
+ } else if(partialSKResult > 0) {
+ return UCOL_GREATER;
+ } else {
+ return UCOL_EQUAL;
+ }
+}
+
+static void doTestVariant(UCollator* myCollation, const UChar source[], const UChar target[], UCollationResult result)
+{
+ int32_t sortklen1, sortklen2, sortklenmax, sortklenmin;
+ int temp=0, gSortklen1=0,gSortklen2=0;
+ UCollationResult compareResult, compareResulta, keyResult, compareResultIter = result;
+ uint8_t *sortKey1, *sortKey2, *sortKey1a, *sortKey2a;
+ uint32_t sLen = u_strlen(source);
+ uint32_t tLen = u_strlen(target);
+ char buffer[256];
+ uint32_t len;
+ UErrorCode status = U_ZERO_ERROR;
+ UColAttributeValue norm = ucol_getAttribute(myCollation, UCOL_NORMALIZATION_MODE, &status);
+
+ UCharIterator sIter, tIter;
+ uiter_setString(&sIter, source, sLen);
+ uiter_setString(&tIter, target, tLen);
+ compareResultIter = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
+ if(compareResultIter != result) {
+ log_err("different results in iterative comparison for UTF-16 encoded strings. %s, %s\n", aescstrdup(source,-1), aescstrdup(target,-1));
+ }
+
+ /* convert the strings to UTF-8 and do try comparing with char iterator */
+ if(QUICK <= 0) { /*!QUICK*/
+ char utf8Source[256], utf8Target[256];
+ int32_t utf8SourceLen = 0, utf8TargetLen = 0;
+ u_strToUTF8(utf8Source, 256, &utf8SourceLen, source, sLen, &status);
+ if(U_FAILURE(status)) { /* probably buffer is not big enough */
+ log_verbose("Src UTF-8 buffer too small! Will not compare!\n");
+ } else {
+ u_strToUTF8(utf8Target, 256, &utf8TargetLen, target, tLen, &status);
+ if(U_SUCCESS(status)) { /* probably buffer is not big enough */
+ UCollationResult compareResultUTF8 = result, compareResultUTF8Norm = result;
+ /*UCharIterator sIter, tIter;*/
+ /*log_verbose("Strings converted to UTF-8:%s, %s\n", aescstrdup(source,-1), aescstrdup(target,-1));*/
+ uiter_setUTF8(&sIter, utf8Source, utf8SourceLen);
+ uiter_setUTF8(&tIter, utf8Target, utf8TargetLen);
+ /*uiter_setString(&sIter, source, sLen);
+ uiter_setString(&tIter, target, tLen);*/
+ compareResultUTF8 = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ sIter.move(&sIter, 0, UITER_START);
+ tIter.move(&tIter, 0, UITER_START);
+ compareResultUTF8Norm = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, norm, &status);
+ if(compareResultUTF8 != compareResultIter) {
+ log_err("different results in iterative comparison for UTF-16 and UTF-8 encoded strings. %s, %s\n", aescstrdup(source,-1), aescstrdup(target,-1));
+ }
+ if(compareResultUTF8 != compareResultUTF8Norm) {
+ log_err("different results in iterative when normalization is turned on with UTF-8 strings. %s, %s\n", aescstrdup(source,-1), aescstrdup(target,-1));
+ }
+ } else {
+ log_verbose("Target UTF-8 buffer too small! Did not compare!\n");
+ }
+ if(U_FAILURE(status)) {
+ log_verbose("UTF-8 strcoll failed! Ignoring result\n");
+ }
+ }
+ }
+
+ /* testing the partial sortkeys */
+ if(1) { /*!QUICK*/
+ int32_t i = 0;
+ int32_t partialSizes[] = { 3, 1, 2, 4, 8, 20, 80 }; /* just size 3 in the quick mode */
+ int32_t partialSizesSize = 1;
+ if(QUICK <= 0) {
+ partialSizesSize = 7;
+ }
+ /*log_verbose("partial sortkey test piecesize=");*/
+ for(i = 0; i < partialSizesSize; i++) {
+ UCollationResult partialSKResult = result, partialNormalizedSKResult = result;
+ /*log_verbose("%i ", partialSizes[i]);*/
+
+ partialSKResult = compareUsingPartials(myCollation, source, sLen, target, tLen, partialSizes[i], &status);
+ if(partialSKResult != result) {
+ log_err("Partial sortkey comparison returned wrong result (%i exp. %i): %s, %s (size %i)\n",
+ partialSKResult, result,
+ aescstrdup(source,-1), aescstrdup(target,-1), partialSizes[i]);
+ }
+
+ if(QUICK <= 0 && norm != UCOL_ON) {
+ /*log_verbose("N ");*/
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ partialNormalizedSKResult = compareUsingPartials(myCollation, source, sLen, target, tLen, partialSizes[i], &status);
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, norm, &status);
+ if(partialSKResult != partialNormalizedSKResult) {
+ log_err("Partial sortkey comparison gets different result when normalization is on: %s, %s (size %i)\n",
+ aescstrdup(source,-1), aescstrdup(target,-1), partialSizes[i]);
+ }
+ }
+ }
+ /*log_verbose("\n");*/
+ }
+
+
+ compareResult = ucol_strcoll(myCollation, source, sLen, target, tLen);
+ compareResulta = ucol_strcoll(myCollation, source, -1, target, -1);
+ if (compareResult != compareResulta) {
+ log_err("ucol_strcoll result from null terminated and explicit length strings differs.\n");
+ }
+
+ sortklen1=ucol_getSortKey(myCollation, source, sLen, NULL, 0);
+ sortklen2=ucol_getSortKey(myCollation, target, tLen, NULL, 0);
+
+ sortklenmax = (sortklen1>sortklen2?sortklen1:sortklen2);
+ sortklenmin = (sortklen1<sortklen2?sortklen1:sortklen2);
+
+ sortKey1 =(uint8_t*)malloc(sizeof(uint8_t) * (sortklenmax+1));
+ sortKey1a=(uint8_t*)malloc(sizeof(uint8_t) * (sortklenmax+1));
+ ucol_getSortKey(myCollation, source, sLen, sortKey1, sortklen1+1);
+ ucol_getSortKey(myCollation, source, -1, sortKey1a, sortklen1+1);
+
+ sortKey2 =(uint8_t*)malloc(sizeof(uint8_t) * (sortklenmax+1));
+ sortKey2a=(uint8_t*)malloc(sizeof(uint8_t) * (sortklenmax+1));
+ ucol_getSortKey(myCollation, target, tLen, sortKey2, sortklen2+1);
+ ucol_getSortKey(myCollation, target, -1, sortKey2a, sortklen2+1);
+
+ /* Check that sort key generated with null terminated string is identical */
+ /* to that generted with a length specified. */
+ if (uprv_strcmp((const char *)sortKey1, (const char *)sortKey1a) != 0 ||
+ uprv_strcmp((const char *)sortKey2, (const char *)sortKey2a) != 0 ) {
+ log_err("Sort Keys from null terminated and explicit length strings differ.\n");
+ }
+
+ /*memcmp(sortKey1, sortKey2,sortklenmax);*/
+ temp= uprv_strcmp((const char *)sortKey1, (const char *)sortKey2);
+ gSortklen1 = uprv_strlen((const char *)sortKey1)+1;
+ gSortklen2 = uprv_strlen((const char *)sortKey2)+1;
+ if(sortklen1 != gSortklen1){
+ log_err("SortKey length does not match Expected: %i Got: %i\n",sortklen1, gSortklen1);
+ log_verbose("Generated sortkey: %s\n", sortKeyToString(myCollation, sortKey1, buffer, &len));
+ }
+ if(sortklen2!= gSortklen2){
+ log_err("SortKey length does not match Expected: %i Got: %i\n", sortklen2, gSortklen2);
+ log_verbose("Generated sortkey: %s\n", sortKeyToString(myCollation, sortKey2, buffer, &len));
+ }
+
+ if(temp < 0) {
+ keyResult=UCOL_LESS;
+ }
+ else if(temp > 0) {
+ keyResult= UCOL_GREATER;
+ }
+ else {
+ keyResult = UCOL_EQUAL;
+ }
+ reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResultIter, result );
+ free(sortKey1);
+ free(sortKey2);
+ free(sortKey1a);
+ free(sortKey2a);
+
+}
+
+void doTest(UCollator* myCollation, const UChar source[], const UChar target[], UCollationResult result)
+{
+ if(myCollation) {
+ doTestVariant(myCollation, source, target, result);
+ if(result == UCOL_LESS) {
+ doTestVariant(myCollation, target, source, UCOL_GREATER);
+ } else if(result == UCOL_GREATER) {
+ doTestVariant(myCollation, target, source, UCOL_LESS);
+ } else {
+ doTestVariant(myCollation, target, source, UCOL_EQUAL);
+ }
+ } else {
+ log_data_err("No collator! Any data around?\n");
+ }
+}
+
+
+/**
+ * Return an integer array containing all of the collation orders
+ * returned by calls to next on the specified iterator
+ */
+int32_t* getOrders(UCollationElements *iter, int32_t *orderLength)
+{
+ UErrorCode status;
+ int32_t order;
+ int32_t maxSize = 100;
+ int32_t size = 0;
+ int32_t *temp;
+ int32_t *orders =(int32_t*)malloc(sizeof(int32_t) * maxSize);
+ status= U_ZERO_ERROR;
+
+
+ while ((order=ucol_next(iter, &status)) != UCOL_NULLORDER)
+ {
+ if (size == maxSize)
+ {
+ maxSize *= 2;
+ temp = (int32_t*)malloc(sizeof(int32_t) * maxSize);
+
+ memcpy(temp, orders, size * sizeof(int32_t));
+ free(orders);
+ orders = temp;
+
+ }
+
+ orders[size++] = order;
+ }
+
+ if (maxSize > size && size > 0)
+ {
+ temp = (int32_t*)malloc(sizeof(int32_t) * size);
+
+ memcpy(temp, orders, size * sizeof(int32_t));
+ free(orders);
+ orders = temp;
+
+
+ }
+
+ *orderLength = size;
+ return orders;
+}
+
+
+void
+backAndForth(UCollationElements *iter)
+{
+ /* Run through the iterator forwards and stick it into an array */
+ int32_t index, o;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t orderLength = 0;
+ int32_t *orders;
+ orders= getOrders(iter, &orderLength);
+
+
+ /* Now go through it backwards and make sure we get the same values */
+ index = orderLength;
+ ucol_reset(iter);
+
+ /* synwee : changed */
+ while ((o = ucol_previous(iter, &status)) != UCOL_NULLORDER)
+ {
+ if (o != orders[-- index])
+ {
+ if (o == 0)
+ index ++;
+ else
+ {
+ while (index > 0 && orders[-- index] == 0)
+ {
+ }
+ if (o != orders[index])
+ {
+ log_err("Mismatch at index : 0x%x\n", index);
+ return;
+ }
+
+ }
+ }
+ }
+
+ while (index != 0 && orders[index - 1] == 0) {
+ index --;
+ }
+
+ if (index != 0)
+ {
+ log_err("Didn't get back to beginning - index is %d\n", index);
+
+ ucol_reset(iter);
+ log_err("\nnext: ");
+ if ((o = ucol_next(iter, &status)) != UCOL_NULLORDER)
+ {
+ log_err("Error at %x\n", o);
+ }
+ log_err("\nprev: ");
+ if ((o = ucol_previous(iter, &status)) != UCOL_NULLORDER)
+ {
+ log_err("Error at %x\n", o);
+ }
+ log_verbose("\n");
+ }
+
+ free(orders);
+}
+
+void genericOrderingTestWithResult(UCollator *coll, const char * const s[], uint32_t size, UCollationResult result) {
+ UChar t1[2048] = {0};
+ UChar t2[2048] = {0};
+ UCollationElements *iter;
+ UErrorCode status = U_ZERO_ERROR;
+
+ uint32_t i = 0, j = 0;
+ log_verbose("testing sequence:\n");
+ for(i = 0; i < size; i++) {
+ log_verbose("%s\n", s[i]);
+ }
+
+ iter = ucol_openElements(coll, t1, u_strlen(t1), &status);
+ if (U_FAILURE(status)) {
+ log_err("Creation of iterator failed\n");
+ }
+ for(i = 0; i < size-1; i++) {
+ for(j = i+1; j < size; j++) {
+ u_unescape(s[i], t1, 2048);
+ u_unescape(s[j], t2, 2048);
+ doTest(coll, t1, t2, result);
+ /* synwee : added collation element iterator test */
+ ucol_setText(iter, t1, u_strlen(t1), &status);
+ backAndForth(iter);
+ ucol_setText(iter, t2, u_strlen(t2), &status);
+ backAndForth(iter);
+ }
+ }
+ ucol_closeElements(iter);
+}
+
+void genericOrderingTest(UCollator *coll, const char * const s[], uint32_t size) {
+ genericOrderingTestWithResult(coll, s, size, UCOL_LESS);
+}
+
+void genericLocaleStarter(const char *locale, const char * const s[], uint32_t size) {
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open(locale, &status);
+
+ log_verbose("Locale starter for %s\n", locale);
+
+ if(U_SUCCESS(status)) {
+ genericOrderingTest(coll, s, size);
+ } else if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else {
+ log_err("Unable to open collator for locale %s\n", locale);
+ }
+ ucol_close(coll);
+}
+
+void genericLocaleStarterWithResult(const char *locale, const char * const s[], uint32_t size, UCollationResult result) {
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open(locale, &status);
+
+ log_verbose("Locale starter for %s\n", locale);
+
+ if(U_SUCCESS(status)) {
+ genericOrderingTestWithResult(coll, s, size, result);
+ } else if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else {
+ log_err("Unable to open collator for locale %s\n", locale);
+ }
+ ucol_close(coll);
+}
+
+/* currently not used with options */
+void genericRulesStarterWithOptionsAndResult(const char *rules, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rlz[RULE_BUFFER_LEN] = { 0 };
+ uint32_t rlen = u_unescape(rules, rlz, RULE_BUFFER_LEN);
+ uint32_t i;
+
+ UCollator *coll = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT,NULL, &status);
+
+ log_verbose("Rules starter for %s\n", rules);
+
+ if(U_SUCCESS(status)) {
+ log_verbose("Setting attributes\n");
+ for(i = 0; i < attsize; i++) {
+ ucol_setAttribute(coll, attrs[i], values[i], &status);
+ }
+
+ genericOrderingTestWithResult(coll, s, size, result);
+ } else {
+ log_err("Unable to open collator with rules %s\n", rules);
+ }
+ ucol_close(coll);
+}
+
+void genericLocaleStarterWithOptionsAndResult(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result) {
+ UErrorCode status = U_ZERO_ERROR;
+ uint32_t i;
+
+ UCollator *coll = ucol_open(locale, &status);
+
+ log_verbose("Locale starter for %s\n", locale);
+
+ if(U_SUCCESS(status)) {
+
+ log_verbose("Setting attributes\n");
+ for(i = 0; i < attsize; i++) {
+ ucol_setAttribute(coll, attrs[i], values[i], &status);
+ }
+
+ genericOrderingTestWithResult(coll, s, size, result);
+ } else {
+ log_err("Unable to open collator for locale %s\n", locale);
+ }
+ ucol_close(coll);
+}
+
+void genericLocaleStarterWithOptions(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize) {
+ genericLocaleStarterWithOptionsAndResult(locale, s, size, attrs, values, attsize, UCOL_LESS);
+}
+
+void genericRulesStarterWithResult(const char *rules, const char * const s[], uint32_t size, UCollationResult result) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rlz[RULE_BUFFER_LEN] = { 0 };
+ uint32_t rlen = u_unescape(rules, rlz, RULE_BUFFER_LEN);
+
+ UCollator *coll = NULL;
+ coll = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT,NULL, &status);
+ log_verbose("Rules starter for %s\n", rules);
+
+ if(U_SUCCESS(status)) {
+ genericOrderingTestWithResult(coll, s, size, result);
+ ucol_close(coll);
+ } else if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ } else {
+ log_err("Unable to open collator with rules %s\n", rules);
+ }
+}
+
+void genericRulesStarter(const char *rules, const char * const s[], uint32_t size) {
+ genericRulesStarterWithResult(rules, s, size, UCOL_LESS);
+}
+
+static void TestTertiary()
+{
+ int32_t len,i;
+ UChar *rules;
+ UCollator *myCollation;
+ UErrorCode status=U_ZERO_ERROR;
+ const char* str="& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ";
+ len = strlen(str);
+ rules=(UChar*)malloc(sizeof(UChar*) * (len+1));
+ u_uastrcpy(rules, str);
+
+ myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator :%s\n", myErrorName(status));
+ }
+
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 17 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ free(rules);
+ ucol_close(myCollation);
+ myCollation = 0;
+}
+
+static void TestPrimary( )
+{
+ int32_t len,i;
+ UChar *rules;
+ UCollator *myCollation;
+ UErrorCode status=U_ZERO_ERROR;
+ const char* str="& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ";
+ len = strlen(str);
+ rules=(UChar*)malloc(sizeof(UChar*) * (len+1));
+ u_uastrcpy(rules, str);
+
+ myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator :%s\n", myErrorName(status));
+ }
+ ucol_setStrength(myCollation, UCOL_PRIMARY);
+
+ for (i = 17; i < 26 ; i++)
+ {
+
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ free(rules);
+ ucol_close(myCollation);
+ myCollation = 0;
+}
+
+static void TestSecondary()
+{
+ int32_t i;
+ int32_t len;
+ UChar *rules;
+ UCollator *myCollation;
+ UErrorCode status=U_ZERO_ERROR;
+ const char* str="& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ";
+ len = strlen(str);
+ rules=(UChar*)malloc(sizeof(UChar*) * (len+1));
+ u_uastrcpy(rules, str);
+
+ myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator :%s\n", myErrorName(status));
+ }
+ ucol_setStrength(myCollation, UCOL_SECONDARY);
+ for (i = 26; i < 34 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ free(rules);
+ ucol_close(myCollation);
+ myCollation = 0;
+}
+
+static void TestIdentical()
+{
+ int32_t i;
+ int32_t len;
+ UChar *rules = 0;
+ UCollator *myCollation;
+ UErrorCode status=U_ZERO_ERROR;
+ const char* str="& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ";
+ len = strlen(str);
+ rules=(UChar*)malloc(sizeof(UChar*) * (len+1));
+ u_uastrcpy(rules, str);
+
+ myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_IDENTICAL, NULL,&status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator :%s\n", myErrorName(status));
+ }
+ for(i= 34; i<37; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ free(rules);
+ ucol_close(myCollation);
+ myCollation = 0;
+}
+
+static void TestExtra()
+{
+ int32_t i, j;
+ int32_t len;
+ UChar *rules;
+ UCollator *myCollation;
+ UErrorCode status = U_ZERO_ERROR;
+ const char* str="& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ";
+ len = strlen(str);
+ rules=(UChar*)malloc(sizeof(UChar*) * (len+1));
+ u_uastrcpy(rules, str);
+
+ myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator :%s\n", myErrorName(status));
+ }
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < COUNT_TEST_CASES-1 ; i++)
+ {
+ for (j = i + 1; j < COUNT_TEST_CASES; j += 1)
+ {
+
+ doTest(myCollation, testCases[i], testCases[j], UCOL_LESS);
+ }
+ }
+ free(rules);
+ ucol_close(myCollation);
+ myCollation = 0;
+}
+
+static void TestJB581(void)
+{
+ UChar dispName [100];
+ int32_t bufferLen = 0;
+ UChar source [100];
+ UChar target [100];
+ UCollationResult result = UCOL_EQUAL;
+ uint8_t sourceKeyArray [100];
+ uint8_t targetKeyArray [100];
+ int32_t sourceKeyOut = 0,
+ targetKeyOut = 0;
+ UCollator *myCollator = 0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ /*u_uastrcpy(source, "This is a test.");*/
+ /*u_uastrcpy(target, "THISISATEST.");*/
+ u_uastrcpy(source, "THISISATEST.");
+ u_uastrcpy(target, "Thisisatest.");
+
+ myCollator = ucol_open("en_US", &status);
+ if (U_FAILURE(status)){
+ bufferLen = uloc_getDisplayName("en_US", 0, dispName, 100, &status);
+ /*Report the error with display name... */
+ log_err("ERROR: Failed to create the collator for : \"%s\"\n", dispName);
+ return;
+ }
+ result = ucol_strcoll(myCollator, source, -1, target, -1);
+ /* result is 1, secondary differences only for ignorable space characters*/
+ if (result != 1)
+ {
+ log_err("Comparing two strings with only secondary differences in C failed.\n");
+ }
+ /* To compare them with just primary differences */
+ ucol_setStrength(myCollator, UCOL_PRIMARY);
+ result = ucol_strcoll(myCollator, source, -1, target, -1);
+ /* result is 0 */
+ if (result != 0)
+ {
+ log_err("Comparing two strings with no differences in C failed.\n");
+ }
+ /* Now, do the same comparison with keys */
+ sourceKeyOut = ucol_getSortKey(myCollator, source, -1, sourceKeyArray, 100);
+ targetKeyOut = ucol_getSortKey(myCollator, target, -1, targetKeyArray, 100);
+ bufferLen = ((targetKeyOut > 100) ? 100 : targetKeyOut);
+ if (memcmp(sourceKeyArray, targetKeyArray, bufferLen) != 0)
+ {
+ log_err("Comparing two strings with sort keys in C failed.\n");
+ }
+ ucol_close(myCollator);
+}
+
+static void TestJB1401(void)
+{
+ UCollator *myCollator = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ static UChar NFD_UnsafeStartChars[] = {
+ 0x0f73, /* Tibetan Vowel Sign II */
+ 0x0f75, /* Tibetan Vowel Sign UU */
+ 0x0f81, /* Tibetan Vowel Sign Reversed II */
+ 0
+ };
+ int i;
+
+
+ myCollator = ucol_open("en_US", &status);
+ if (U_FAILURE(status)){
+ int32_t bufferLen = 0;
+ UChar dispName [100];
+ bufferLen = uloc_getDisplayName("en_US", 0, dispName, 100, &status);
+ /*Report the error with display name... */
+ log_err("ERROR: Failed to create the collator for : \"%s\"\n", dispName);
+ return;
+ }
+ ucol_setAttribute(myCollator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ if (U_FAILURE(status)){
+ log_err("ERROR: Failed to set normalization mode ON for collator.\n");
+ return;
+ }
+
+ for (i=0; ; i++) {
+ UChar c;
+ UChar X[4];
+ UChar Y[20];
+ UChar Z[20];
+
+ /* Get the next funny character to be tested, and set up the
+ * three test strings X, Y, Z, consisting of an A-grave + test char,
+ * in original form, NFD, and then NFC form.
+ */
+ c = NFD_UnsafeStartChars[i];
+ if (c==0) {break;}
+
+ X[0]=0xC0; X[1]=c; X[2]=0; /* \u00C0 is A Grave*/
+
+ unorm_normalize(X, -1, UNORM_NFD, 0, Y, 20, &status);
+ unorm_normalize(Y, -1, UNORM_NFC, 0, Z, 20, &status);
+ if (U_FAILURE(status)){
+ log_err("ERROR: Failed to normalize test of character %x\n", c);
+ return;
+ }
+
+ /* Collation test. All three strings should be equal.
+ * doTest does both strcoll and sort keys, with params in both orders.
+ */
+ doTest(myCollator, X, Y, UCOL_EQUAL);
+ doTest(myCollator, X, Z, UCOL_EQUAL);
+ doTest(myCollator, Y, Z, UCOL_EQUAL);
+
+ /* Run collation element iterators over the three strings. Results should be same for each.
+ */
+ {
+ UCollationElements *ceiX, *ceiY, *ceiZ;
+ int32_t ceX, ceY, ceZ;
+ int j;
+
+ ceiX = ucol_openElements(myCollator, X, -1, &status);
+ ceiY = ucol_openElements(myCollator, Y, -1, &status);
+ ceiZ = ucol_openElements(myCollator, Z, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: uucol_openElements failed.\n");
+ return;
+ }
+
+ for (j=0;; j++) {
+ ceX = ucol_next(ceiX, &status);
+ ceY = ucol_next(ceiY, &status);
+ ceZ = ucol_next(ceiZ, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: ucol_next failed for iteration #%d.\n", j);
+ break;
+ }
+ if (ceX != ceY || ceY != ceZ) {
+ log_err("ERROR: ucol_next failed for iteration #%d.\n", j);
+ break;
+ }
+ if (ceX == UCOL_NULLORDER) {
+ break;
+ }
+ }
+ ucol_closeElements(ceiX);
+ ucol_closeElements(ceiY);
+ ucol_closeElements(ceiZ);
+ }
+ }
+ ucol_close(myCollator);
+}
+
+
+
+/**
+* Tests the [variable top] tag in rule syntax. Since the default [alternate]
+* tag has the value shifted, any codepoints before [variable top] should give
+* a primary ce of 0.
+*/
+static void TestVariableTop(void)
+{
+ const char *str = "&z = [variable top]";
+ int len = strlen(str);
+ UChar *rules;
+ UCollator *myCollation;
+ UCollator *enCollation;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar source[1];
+ UChar ch;
+ uint8_t result[20];
+ uint8_t expected[20];
+
+ rules = (UChar*)malloc(sizeof(UChar*) * (len + 1));
+ u_uastrcpy(rules, str);
+
+ enCollation = ucol_open("en_US", &status);
+ myCollation = ucol_openRules(rules, len, UCOL_OFF,
+ UCOL_PRIMARY,NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: in creation of rule based collator :%s\n",
+ myErrorName(status));
+ return;
+ }
+
+ ucol_setStrength(enCollation, UCOL_PRIMARY);
+ ucol_setAttribute(enCollation, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED,
+ &status);
+ ucol_setAttribute(myCollation, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED,
+ &status);
+
+ if (ucol_getAttribute(myCollation, UCOL_ALTERNATE_HANDLING, &status) !=
+ UCOL_SHIFTED || U_FAILURE(status)) {
+ log_err("ERROR: ALTERNATE_HANDLING value can not be set to SHIFTED\n");
+ }
+
+ uprv_memset(expected, 0, 20);
+
+ /* space is supposed to be a variable */
+ source[0] = ' ';
+ len = ucol_getSortKey(enCollation, source, 1, result,
+ sizeof(result));
+
+ if (uprv_memcmp(expected, result, len) != 0) {
+ log_err("ERROR: SHIFTED alternate does not return 0 for primary of space\n");
+ }
+
+ ch = 'a';
+ while (ch < 'z') {
+ source[0] = ch;
+ len = ucol_getSortKey(myCollation, source, 1, result,
+ sizeof(result));
+ if (uprv_memcmp(expected, result, len) != 0) {
+ log_err("ERROR: SHIFTED alternate does not return 0 for primary of %c\n",
+ ch);
+ }
+ ch ++;
+ }
+
+ free(rules);
+ ucol_close(enCollation);
+ ucol_close(myCollation);
+ enCollation = NULL;
+ myCollation = NULL;
+}
+
+/**
+ * Tests surrogate support.
+ * NOTE: This test used \\uD801\\uDC01 pair, which is now assigned to Desseret
+ * Therefore, another (unassigned) code point was used for this test.
+ */
+static void TestSurrogates(void)
+{
+ const char *str =
+ "&z<'\\uD800\\uDC00'<'\\uD800\\uDC0A\\u0308'<A";
+ int len = strlen(str);
+ int rlen = 0;
+ UChar *rules;
+ UCollator *myCollation;
+ UCollator *enCollation;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar source[][4] =
+ {{'z', 0, 0}, {0xD800, 0xDC00, 0}, {0xD800, 0xDC0A, 0x0308, 0}, {0xD800, 0xDC02}};
+ UChar target[][4] =
+ {{0xD800, 0xDC00, 0}, {0xD800, 0xDC0A, 0x0308, 0}, {'A', 0, 0}, {0xD800, 0xDC03}};
+ int count = 0;
+ uint8_t enresult[20], myresult[20];
+ int enlen, mylen;
+
+ /* tests for open rules with surrogate rules */
+ rules = (UChar*)malloc(sizeof(UChar*) * (len + 1));
+ rlen = u_unescape(str, rules, len);
+
+ enCollation = ucol_open("en_US", &status);
+ myCollation = ucol_openRules(rules, rlen, UCOL_OFF,
+ UCOL_TERTIARY,NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: in creation of rule based collator :%s\n",
+ myErrorName(status));
+ return;
+ }
+
+ /*
+ this test is to verify the supplementary sort key order in the english
+ collator
+ */
+ log_verbose("start of english collation supplementary characters test\n");
+ while (count < 2) {
+ doTest(enCollation, source[count], target[count], UCOL_LESS);
+ count ++;
+ }
+ doTest(enCollation, source[count], target[count], UCOL_GREATER);
+
+ log_verbose("start of tailored collation supplementary characters test\n");
+ count = 0;
+ /* tests getting collation elements for surrogates for tailored rules */
+ while (count < 4) {
+ doTest(myCollation, source[count], target[count], UCOL_LESS);
+ count ++;
+ }
+
+ /* tests that \uD800\uDC02 still has the same value, not changed */
+ enlen = ucol_getSortKey(enCollation, source[3], 2, enresult, 20);
+ mylen = ucol_getSortKey(myCollation, source[3], 2, myresult, 20);
+ if (enlen != mylen ||
+ uprv_memcmp(enresult, myresult, enlen) != 0) {
+ log_verbose("Failed : non-tailored supplementary characters should have the same value\n");
+ }
+
+ free(rules);
+ ucol_close(enCollation);
+ ucol_close(myCollation);
+ enCollation = NULL;
+ myCollation = NULL;
+}
+
+/*
+ *### TODO: Add more invalid rules to test all different scenarios.
+ *
+ */
+static void
+TestInvalidRules(){
+#define MAX_ERROR_STATES 2
+
+ static const char* rulesArr[MAX_ERROR_STATES] = {
+ "& C < ch, cH, Ch[this should fail]<d",
+ "& C < ch, cH, & Ch[variable top]"
+ };
+ static const char* preContextArr[MAX_ERROR_STATES] = {
+ "his should fail",
+ "& C < ch, cH, ",
+
+ };
+ static const char* postContextArr[MAX_ERROR_STATES] = {
+ "<d",
+ " Ch[variable t"
+ };
+ int i;
+
+ for(i = 0;i<MAX_ERROR_STATES;i++){
+ UChar rules[1000] = { '\0' };
+ UChar preContextExp[1000] = { '\0' };
+ UChar postContextExp[1000] = { '\0' };
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator* coll=0;
+ u_charsToUChars(rulesArr[i],rules,uprv_strlen(rulesArr[i])+1);
+ u_charsToUChars(preContextArr[i],preContextExp,uprv_strlen(preContextArr[i])+1);
+ u_charsToUChars(postContextArr[i],postContextExp,uprv_strlen(postContextArr[i])+1);
+ /* clean up stuff in parseError */
+ u_memset(parseError.preContext,0x0000,U_PARSE_CONTEXT_LEN);
+ u_memset(parseError.postContext,0x0000,U_PARSE_CONTEXT_LEN);
+ /* open the rules and test */
+ coll = ucol_openRules(rules,u_strlen(rules),UCOL_OFF,UCOL_DEFAULT_STRENGTH,&parseError,&status);
+ if(u_strcmp(parseError.preContext,preContextExp)!=0){
+ log_err("preContext in UParseError for ucol_openRules does not match\n");
+ }
+ if(u_strcmp(parseError.postContext,postContextExp)!=0){
+ log_err("postContext in UParseError for ucol_openRules does not match\n");
+ }
+ }
+}
+
+static void
+TestJitterbug1098(){
+ UChar rule[1000];
+ UCollator* c1 = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ char preContext[200]={0};
+ char postContext[200]={0};
+ int i=0;
+ const char* rules[] = {
+ "&''<\\\\",
+ "&\\'<\\\\",
+ "&\\\"<'\\'",
+ "&'\"'<\\'",
+ '\0'
+
+ };
+ const UCollationResult results1098[] = {
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ };
+ const UChar input[][2]= {
+ {0x0027,0x005c},
+ {0x0027,0x005c},
+ {0x0022,0x005c},
+ {0x0022,0x0027},
+ };
+ UChar X[2] ={0};
+ UChar Y[2] ={0};
+ u_memset(parseError.preContext,0x0000,U_PARSE_CONTEXT_LEN);
+ u_memset(parseError.postContext,0x0000,U_PARSE_CONTEXT_LEN);
+ for(;rules[i]!=0;i++){
+ u_uastrcpy(rule, rules[i]);
+ c1 = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, &parseError, &status);
+ if(U_FAILURE(status)){
+ log_err("Could not parse the rules syntax. Error: %s ", u_errorName(status));
+
+ if (status == U_PARSE_ERROR) {
+ u_UCharsToChars(parseError.preContext,preContext,20);
+ u_UCharsToChars(parseError.postContext,postContext,20);
+ log_verbose("\n\tPre-Context: %s \n\tPost-Context:%s \n",preContext,postContext);
+ }
+
+ return;
+ }
+ X[0] = input[i][0];
+ Y[0] = input[i][1];
+ doTest(c1,X,Y,results1098[i]);
+ ucol_close(c1);
+ }
+}
+
+/* These tests do cleanup and reinitialize ICU in the course of their operation.
+ * The ICU data directory must be preserved across these operations.
+ * Here is a helper function to assist with that.
+ */
+static char *safeGetICUDataDirectory() {
+ const char *dataDir = u_getDataDirectory(); /* Returned string vanashes with u_cleanup */
+ char *retStr = NULL;
+ if (dataDir != NULL) {
+ retStr = (char *)malloc(strlen(dataDir)+1);
+ strcpy(retStr, dataDir);
+ }
+ return retStr;
+}
+
+
+static void
+TestFCDCrash(void) {
+ static const char *test[] = {
+ "Gr\\u00F6\\u00DFe",
+ "Grossist"
+ };
+
+ char *icuDataDir = safeGetICUDataDirectory();
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("es", &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't open collator\n");
+ return;
+ }
+ ucol_close(coll);
+ coll = NULL;
+ u_cleanup();
+ u_setDataDirectory(icuDataDir);
+ coll = ucol_open("de_DE", &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't open collator\n");
+ return;
+ }
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ genericOrderingTest(coll, test, 2);
+ ucol_close(coll);
+ free(icuDataDir);
+
+}
+
+/*static UBool
+find(UEnumeration* list, const char* str, UErrorCode* status){
+ const char* value = NULL;
+ int32_t length=0;
+ if(U_FAILURE(*status)){
+ return FALSE;
+ }
+ uenum_reset(list, status);
+ while( (value= uenum_next(list, &length, status))!=NULL){
+ if(strcmp(value, str)==0){
+ return TRUE;
+ }
+ }
+ return FALSE;
+}*/
+
+static void TestJ5298(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ char input[256], output[256];
+ UBool isAvailable;
+ int32_t i = 0;
+ UEnumeration* values = NULL;
+ const char *keywordValue = NULL;
+ log_verbose("Number of collator locales returned : %i \n", ucol_countAvailable());
+ values = ucol_getKeywordValues("collation", &status);
+ for (i = 0; i < ucol_countAvailable(); i++) {
+ uenum_reset(values, &status);
+ while ((keywordValue = uenum_next(values, NULL, &status)) != NULL) {
+ strcpy(input, ucol_getAvailable(i));
+ if (strcmp(keywordValue, "standard") != 0) {
+ strcat(input, "@collation=");
+ strcat(input, keywordValue);
+ }
+
+ ucol_getFunctionalEquivalent(output, 256, "collation", input, &isAvailable, &status);
+ if (strcmp(input, output) == 0) { /* Unique locale, print it out */
+ log_verbose("%s, \n", output);
+ }
+ }
+ }
+ uenum_close(values);
+ log_verbose("\n");
+}
+#endif /* #if !UCONFIG_NO_COLLATION */
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.h b/Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.h
new file mode 100644
index 00000000000..ae07b1257ab
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/callcoll.h
@@ -0,0 +1,54 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CALLCOLL.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported to C
+*********************************************************************************
+*/
+/**
+ * CollationDummyTest is a third level test class. This tests creation of
+ * a customized collator object. For example, number 1 to be sorted
+ * equlivalent to word 'one'.
+ */
+#ifndef _CALLCOLLTST
+#define _CALLCOLLTST
+
+#include "unicode/utypes.h"
+#include "unicode/ucoleitr.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+#define RULE_BUFFER_LEN 8192
+
+
+ /* tests comparison of custom collation with different strengths */
+void doTest(UCollator*, const UChar* source, const UChar* target, UCollationResult result);
+/* verify that iterating forward and backwards over the string yields same CEs */
+void backAndForth(UCollationElements *iter);
+/* gets an array of CEs for a string in UCollationElements iterator. */
+int32_t* getOrders(UCollationElements *iter, int32_t *orderLength);
+
+void genericOrderingTestWithResult(UCollator *coll, const char * const s[], uint32_t size, UCollationResult result);
+void genericOrderingTest(UCollator *coll, const char * const s[], uint32_t size);
+void genericLocaleStarter(const char *locale, const char * const s[], uint32_t size);
+void genericLocaleStarterWithResult(const char *locale, const char * const s[], uint32_t size, UCollationResult result);
+void genericLocaleStarterWithOptions(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize);
+void genericLocaleStarterWithOptionsAndResult(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
+void genericRulesStarterWithResult(const char *rules, const char * const s[], uint32_t size, UCollationResult result);
+void genericRulesStarter(const char *rules, const char * const s[], uint32_t size);
+void genericRulesStarterWithOptionsAndResult(const char *rules, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
+UBool hasCollationElements(const char *locName);
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/calldata.h b/Build/source/libs/icu/icu-xetex/test/cintltst/calldata.h
new file mode 100644
index 00000000000..4d3cb3983d2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/calldata.h
@@ -0,0 +1,109 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef COLLATION_TEST_DATA
+#define COLLATION_TEST_DATA
+
+#define COUNT_TEST_CASES 13
+
+const UChar testSourceCases[][16] = {
+ {0x61, 0x62, 0x27, 0x63, 0},
+ {0x63, 0x6f, 0x2d, 0x6f, 0x70, 0},
+ {0x61, 0x62, 0},
+ {0x61, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x61, 0x64, 0},
+ {0x61, 0x6c, 0x6c, 0},
+ {0x66, 0x6f, 0x75, 0x72, 0},
+ {0x66, 0x69, 0x76, 0x65, 0},
+ {0x31, 0},
+ {0x31, 0},
+ {0x31, 0}, /* 10 */
+ {0x32, 0},
+ {0x32, 0},
+ {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0},
+ {0x61, 0x3c, 0x62, 0},
+ {0x61, 0x3c, 0x62, 0},
+ {0x61, 0x63, 0x63, 0},
+ {0x61, 0x63, 0x48, 0x63, 0}, /* simple test */
+ {0x70, 0x00EA, 0x63, 0x68, 0x65, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x62, 0x63, 0}, /* 20 */
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x00E6, 0x63, 0},
+ {0x61, 0x63, 0x48, 0x63, 0}, /* primary test */
+ {0x62, 0x6c, 0x61, 0x63, 0x6b, 0},
+ {0x66, 0x6f, 0x75, 0x72, 0},
+ {0x66, 0x69, 0x76, 0x65, 0},
+ {0x31, 0},
+ {0x61, 0x62, 0x63, 0}, /* 30 */
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x62, 0x63, 0x48, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x63, 0x48, 0x63, 0}, /* 34 */
+ {0x61, 0x63, 0x65, 0x30},
+ {0x31, 0x30},
+ {0x70, 0x00EA,0x30} /* 37 */
+};
+
+const UChar testTargetCases[][16] = {
+ {0x61, 0x62, 0x63, 0x27, 0},
+ {0x43, 0x4f, 0x4f, 0x50, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x26, 0},
+ {0x26, 0},
+ {0x34, 0},
+ {0x35, 0},
+ {0x6f, 0x6e, 0x65, 0},
+ {0x6e, 0x6e, 0x65, 0},
+ {0x70, 0x6e, 0x65, 0}, /* 10 */
+ {0x74, 0x77, 0x6f, 0},
+ {0x75, 0x77, 0x6f, 0},
+ {0x68, 0x65, 0x6c, 0x6c, 0x4f, 0},
+ {0x61, 0x3c, 0x3d, 0x62, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x43, 0x48, 0x63, 0},
+ {0x61, 0x43, 0x48, 0x63, 0}, /* simple test */
+ {0x70, (UChar)0x00E9, 0x63, 0x68, 0x00E9, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x42, 0x43, 0}, /* 20 */
+ {0x61, 0x62, 0x63, 0x68, 0},
+ {0x61, 0x62, 0x64, 0},
+ {(UChar)0x00E4, 0x62, 0x63, 0},
+ {0x61, (UChar)0x00C6, 0x63, 0},
+ {0x61, 0x43, 0x48, 0x63, 0}, /* primary test */
+ {0x62, 0x6c, 0x61, 0x63, 0x6b, 0x2d, 0x62, 0x69, 0x72, 0x64, 0},
+ {0x34, 0},
+ {0x35, 0},
+ {0x6f, 0x6e, 0x65, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x61, 0x42, 0x63, 0}, /* 30 */
+ {0x61, 0x62, 0x63, 0x68, 0},
+ {0x61, 0x62, 0x64, 0},
+ {0x61, 0x43, 0x48, 0x63, 0}, /* 34 */
+ {0x61, 0x63, 0x65, 0x30},
+ {0x31, 0x30},
+ {0x70, (UChar)0x00EB,0x30} /* 37 */
+};
+
+const UChar testCases[][4] =
+{
+ {0x61, 0},
+ {0x41, 0},
+ {0x00e4, 0},
+ {0x00c4, 0},
+ {0x61, 0x65, 0},
+ {0x61, 0x45, 0},
+ {0x41, 0x65, 0},
+ {0x41, 0x45, 0},
+ {(UChar)0x00e6, 0},
+ {(UChar)0x00c6, 0},
+ {0x62, 0},
+ {0x63, 0},
+ {0x7a, 0}
+};
+
+#endif /* #ifndef COLLATION_TEST_DATA */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/calltest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/calltest.c
new file mode 100644
index 00000000000..8e5f192dbe1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/calltest.c
@@ -0,0 +1,78 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1996-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CALLTEST.C
+*
+* Modification History:
+* Creation: Madhu Katragadda
+*********************************************************************************
+*/
+/* THE FILE WHERE ALL C API TESTS ARE ADDED TO THE ROOT */
+
+
+#include "cintltst.h"
+
+void addUtility(TestNode** root);
+void addBreakIter(TestNode** root);
+void addStandardNamesTest(TestNode **root);
+void addFormatTest(TestNode** root);
+void addConvert(TestNode** root);
+void addCollTest(TestNode** root);
+void addComplexTest(TestNode** root);
+void addUDataTest(TestNode** root);
+void addUTF16Test(TestNode** root);
+void addUTF8Test(TestNode** root);
+void addUTransTest(TestNode** root);
+void addPUtilTest(TestNode** root);
+void addUCharTransformTest(TestNode** root);
+void addUSetTest(TestNode** root);
+void addUStringPrepTest(TestNode** root);
+void addIDNATest(TestNode** root);
+void addHeapMutexTest(TestNode **root);
+void addUTraceTest(TestNode** root);
+void addURegexTest(TestNode** root);
+void addUTextTest(TestNode** root);
+void addUCsdetTest(TestNode** root);
+
+
+void addAllTests(TestNode** root)
+{
+ addUDataTest(root);
+ addHeapMutexTest(root);
+ addPUtilTest(root);
+ addUTF16Test(root);
+ addUTF8Test(root);
+ addUtility(root);
+ addUTraceTest(root);
+ addUTextTest(root);
+ addConvert(root);
+ addUCharTransformTest(root);
+ addStandardNamesTest(root);
+ addUCsdetTest(root);
+ addComplexTest(root);
+ addUSetTest(root);
+#if !UCONFIG_NO_IDNA
+ addUStringPrepTest(root);
+ addIDNATest(root);
+#endif
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ addURegexTest(root);
+#endif
+#if !UCONFIG_NO_BREAK_ITERATION
+ addBreakIter(root);
+#endif
+#if !UCONFIG_NO_FORMATTING
+ addFormatTest(root);
+#endif
+#if !UCONFIG_NO_COLLATION
+ addCollTest(root);
+#endif
+#if !UCONFIG_NO_TRANSLITERATION
+ addUTransTest(root);
+#endif
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/capitst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/capitst.c
new file mode 100644
index 00000000000..db1de56f54a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/capitst.c
@@ -0,0 +1,2148 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CAPITEST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************
+*//* C API TEST For COLLATOR */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/uloc.h"
+#include "unicode/ustring.h"
+#include "unicode/ures.h"
+#include "unicode/ucoleitr.h"
+#include "cintltst.h"
+#include "capitst.h"
+#include "ccolltst.h"
+#include "putilimp.h"
+
+static void TestAttribute(void);
+static void TestDefault(void);
+ int TestBufferSize(); /* defined in "colutil.c" */
+
+
+
+
+/* next two function is modified from "i18n/ucol.cpp" to avoid include "ucol_imp.h" */
+static void uprv_appendByteToHexString(char *dst, uint8_t val) {
+ uint32_t len = (uint32_t)strlen(dst);
+ sprintf(dst+len, "%02X", val);
+}
+
+static char* U_EXPORT2 ucol_sortKeyToString(const UCollator *coll, const uint8_t *sortkey, char *buffer, uint32_t *len) {
+ int32_t strength = UCOL_PRIMARY;
+ uint32_t res_size = 0;
+ UBool doneCase = FALSE;
+
+ char *current = buffer;
+ const uint8_t *currentSk = sortkey;
+
+ UErrorCode error_code = U_ZERO_ERROR;
+
+ strcpy(current, "[");
+
+ while(strength <= UCOL_QUATERNARY && strength <= ucol_getAttribute(coll,UCOL_STRENGTH, &error_code)) {
+ if(U_FAILURE(error_code)) {
+ log_err("ucol_getAttribute returned error: %s\n", u_errorName(error_code));
+ }
+ if(strength > UCOL_PRIMARY) {
+ strcat(current, " . ");
+ }
+ while(*currentSk != 0x01 && *currentSk != 0x00) { /* print a level */
+ uprv_appendByteToHexString(current, *currentSk++);
+ strcat(current, " ");
+ }
+ if(ucol_getAttribute(coll,UCOL_CASE_LEVEL, &error_code) == UCOL_ON && strength == UCOL_SECONDARY && doneCase == FALSE) {
+ doneCase = TRUE;
+ } else if(ucol_getAttribute(coll,UCOL_CASE_LEVEL, &error_code) == UCOL_OFF || doneCase == TRUE || strength != UCOL_SECONDARY) {
+ strength ++;
+ }
+ if(U_FAILURE(error_code)) {
+ log_err("ucol_getAttribute returned error: %s\n", u_errorName(error_code));
+ }
+ uprv_appendByteToHexString(current, *currentSk++); /* This should print '01' */
+ if(strength == UCOL_QUATERNARY && ucol_getAttribute(coll,UCOL_ALTERNATE_HANDLING, &error_code) == UCOL_NON_IGNORABLE) {
+ break;
+ }
+ }
+
+ if(ucol_getAttribute(coll,UCOL_STRENGTH, &error_code) == UCOL_IDENTICAL) {
+ strcat(current, " . ");
+ while(*currentSk != 0) {
+ uprv_appendByteToHexString(current, *currentSk++);
+ strcat(current, " ");
+ }
+
+ uprv_appendByteToHexString(current, *currentSk++);
+ }
+ if(U_FAILURE(error_code)) {
+ log_err("ucol_getAttribute returned error: %s\n", u_errorName(error_code));
+ }
+ strcat(current, "]");
+
+ if(res_size > *len) {
+ return NULL;
+ }
+
+ return buffer;
+}
+/* end of avoid include "ucol_imp.h" */
+
+
+void addCollAPITest(TestNode** root)
+{
+ /* WEIVTODO: return tests here */
+ addTest(root, &TestProperty, "tscoll/capitst/TestProperty");
+ addTest(root, &TestRuleBasedColl, "tscoll/capitst/TestRuleBasedColl");
+ addTest(root, &TestCompare, "tscoll/capitst/TestCompare");
+ addTest(root, &TestSortKey, "tscoll/capitst/TestSortKey");
+ addTest(root, &TestHashCode, "tscoll/capitst/TestHashCode");
+ addTest(root, &TestElemIter, "tscoll/capitst/TestElemIter");
+ addTest(root, &TestGetAll, "tscoll/capitst/TestGetAll");
+ /*addTest(root, &TestGetDefaultRules, "tscoll/capitst/TestGetDefaultRules");*/
+ addTest(root, &TestDecomposition, "tscoll/capitst/TestDecomposition");
+ addTest(root, &TestSafeClone, "tscoll/capitst/TestSafeClone");
+ addTest(root, &TestCloneBinary, "tscoll/capitst/TestCloneBinary");
+ addTest(root, &TestGetSetAttr, "tscoll/capitst/TestGetSetAttr");
+ addTest(root, &TestBounds, "tscoll/capitst/TestBounds");
+ addTest(root, &TestGetLocale, "tscoll/capitst/TestGetLocale");
+ addTest(root, &TestSortKeyBufferOverrun, "tscoll/capitst/TestSortKeyBufferOverrun");
+ addTest(root, &TestAttribute, "tscoll/capitst/TestAttribute");
+ addTest(root, &TestGetTailoredSet, "tscoll/capitst/TestGetTailoredSet");
+ addTest(root, &TestMergeSortKeys, "tscoll/capitst/TestMergeSortKeys");
+ addTest(root, &TestShortString, "tscoll/capitst/TestShortString");
+ addTest(root, &TestGetContractionsAndUnsafes, "tscoll/capitst/TestGetContractionsAndUnsafes");
+ addTest(root, &TestOpenBinary, "tscoll/capitst/TestOpenBinary");
+ addTest(root, &TestDefault, "tscoll/capitst/TestDefault");
+}
+
+void TestGetSetAttr(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open(NULL, &status);
+ struct attrTest {
+ UColAttribute att;
+ UColAttributeValue val[5];
+ uint32_t valueSize;
+ UColAttributeValue nonValue;
+ } attrs[] = {
+ {UCOL_FRENCH_COLLATION, {UCOL_ON, UCOL_OFF}, 2, UCOL_SHIFTED},
+ {UCOL_ALTERNATE_HANDLING, {UCOL_NON_IGNORABLE, UCOL_SHIFTED}, 2, UCOL_OFF},/* attribute for handling variable elements*/
+ {UCOL_CASE_FIRST, {UCOL_OFF, UCOL_LOWER_FIRST, UCOL_UPPER_FIRST}, 3, UCOL_SHIFTED},/* who goes first, lower case or uppercase */
+ {UCOL_CASE_LEVEL, {UCOL_ON, UCOL_OFF}, 2, UCOL_SHIFTED},/* do we have an extra case level */
+ {UCOL_NORMALIZATION_MODE, {UCOL_ON, UCOL_OFF}, 2, UCOL_SHIFTED},/* attribute for normalization */
+ {UCOL_DECOMPOSITION_MODE, {UCOL_ON, UCOL_OFF}, 2, UCOL_SHIFTED},
+ {UCOL_STRENGTH, {UCOL_PRIMARY, UCOL_SECONDARY, UCOL_TERTIARY, UCOL_QUATERNARY, UCOL_IDENTICAL}, 5, UCOL_SHIFTED},/* attribute for strength */
+ {UCOL_HIRAGANA_QUATERNARY_MODE, {UCOL_ON, UCOL_OFF}, 2, UCOL_SHIFTED},/* when turned on, this attribute */
+ };
+ UColAttribute currAttr;
+ UColAttributeValue value;
+ uint32_t i = 0, j = 0;
+
+ for(i = 0; i<sizeof(attrs)/sizeof(attrs[0]); i++) {
+ currAttr = attrs[i].att;
+ ucol_setAttribute(coll, currAttr, UCOL_DEFAULT, &status);
+ if(U_FAILURE(status)) {
+ log_err("ucol_setAttribute with the default value returned error: %s\n", u_errorName(status));
+ break;
+ }
+ value = ucol_getAttribute(coll, currAttr, &status);
+ if(U_FAILURE(status)) {
+ log_err("ucol_getAttribute returned error: %s\n", u_errorName(status));
+ break;
+ }
+ for(j = 0; j<attrs[i].valueSize; j++) {
+ ucol_setAttribute(coll, currAttr, attrs[i].val[j], &status);
+ if(U_FAILURE(status)) {
+ log_err("ucol_setAttribute with the value %i returned error: %s\n", attrs[i].val[j], u_errorName(status));
+ break;
+ }
+ }
+ status = U_ZERO_ERROR;
+ ucol_setAttribute(coll, currAttr, attrs[i].nonValue, &status);
+ if(U_SUCCESS(status)) {
+ log_err("ucol_setAttribute with the bad value didn't return an error\n");
+ break;
+ }
+ status = U_ZERO_ERROR;
+
+ ucol_setAttribute(coll, currAttr, value, &status);
+ if(U_FAILURE(status)) {
+ log_err("ucol_setAttribute with the default valuereturned error: %s\n", u_errorName(status));
+ break;
+ }
+
+ }
+ status = U_ZERO_ERROR;
+ value = ucol_getAttribute(coll, UCOL_ATTRIBUTE_COUNT, &status);
+ if(U_SUCCESS(status)) {
+ log_err("ucol_getAttribute for UCOL_ATTRIBUTE_COUNT didn't return an error\n");
+ }
+ status = U_ZERO_ERROR;
+ ucol_setAttribute(coll, UCOL_ATTRIBUTE_COUNT, UCOL_DEFAULT, &status);
+ if(U_SUCCESS(status)) {
+ log_err("ucol_setAttribute for UCOL_ATTRIBUTE_COUNT didn't return an error\n");
+ }
+ status = U_ZERO_ERROR;
+ ucol_close(coll);
+}
+
+
+static void doAssert(int condition, const char *message)
+{
+ if (condition==0) {
+ log_err("ERROR : %s\n", message);
+ }
+}
+
+#if 0
+/* We don't have default rules, at least not in the previous sense */
+void TestGetDefaultRules(){
+ uint32_t size=0;
+ UErrorCode status=U_ZERO_ERROR;
+ UCollator *coll=NULL;
+ int32_t len1 = 0, len2=0;
+ uint8_t *binColData = NULL;
+
+ UResourceBundle *res = NULL;
+ UResourceBundle *binColl = NULL;
+ uint8_t *binResult = NULL;
+
+
+ const UChar * defaultRulesArray=ucol_getDefaultRulesArray(&size);
+ log_verbose("Test the function ucol_getDefaultRulesArray()\n");
+
+ coll = ucol_openRules(defaultRulesArray, size, UCOL_ON, UCOL_PRIMARY, &status);
+ if(U_SUCCESS(status) && coll !=NULL) {
+ binColData = (uint8_t*)ucol_cloneRuleData(coll, &len1, &status);
+
+ }
+
+
+ status=U_ZERO_ERROR;
+ res=ures_open(NULL, "root", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: Failed to get resource for \"root Locale\" with %s", myErrorName(status));
+ return;
+ }
+ binColl=ures_getByKey(res, "%%Collation", binColl, &status);
+ if(U_SUCCESS(status)){
+ binResult=(uint8_t*)ures_getBinary(binColl, &len2, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: ures_getBinary() failed\n");
+ }
+ }else{
+ log_err("ERROR: ures_getByKey(locale(default), %%Collation) failed");
+ }
+
+
+ if(len1 != len2){
+ log_err("Error: ucol_getDefaultRulesArray() failed to return the correct length.\n");
+ }
+ if(memcmp(binColData, binResult, len1) != 0){
+ log_err("Error: ucol_getDefaultRulesArray() failed\n");
+ }
+
+ free(binColData);
+ ures_close(binColl);
+ ures_close(res);
+ ucol_close(coll);
+
+}
+#endif
+
+/* Collator Properties
+ ucol_open, ucol_strcoll, getStrength/setStrength
+ getDecomposition/setDecomposition, getDisplayName*/
+void TestProperty()
+{
+ UCollator *col, *ruled;
+ UChar *disName;
+ int32_t len = 0, i = 0;
+ UChar *source, *target;
+ int32_t tempLength;
+ UErrorCode status = U_ZERO_ERROR;
+ /*
+ All the collations have the same version in an ICU
+ version.
+ ICU 2.0 currVersionArray = {0x18, 0xC0, 0x02, 0x02};
+ ICU 2.1 currVersionArray = {0x19, 0x00, 0x03, 0x03};
+ ICU 2.2 currVersionArray = {0x21, 0x40, 0x04, 0x04};
+ ICU 2.4 currVersionArray = {0x21, 0x40, 0x04, 0x04};
+ ICU 2.6 currVersionArray = {0x21, 0x40, 0x03, 0x03};
+ ICU 2.8 currVersionArray = {0x29, 0x80, 0x00, 0x04};
+ ICU 3.4 currVersionArray = {0x31, 0xC0, 0x00, 0x04};
+ */
+ UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x05};
+ /* ICU 3.4 had UCA 4.1 */
+ /*UVersionInfo currUCAVersionArray = {4, 1, 0, 0};*/
+ UVersionInfo currUCAVersionArray = {5, 0, 0, 0};
+ UVersionInfo versionArray = {0, 0, 0, 0};
+ UVersionInfo versionUCAArray = {0, 0, 0, 0};
+
+ log_verbose("The property tests begin : \n");
+ log_verbose("Test ucol_strcoll : \n");
+ col = ucol_open("en_US", &status);
+ if (U_FAILURE(status)) {
+ log_err("Default Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+
+ ucol_getVersion(col, versionArray);
+ for (i=0; i<4; ++i) {
+ if (versionArray[i] != currVersionArray[i]) {
+ log_err("Testing ucol_getVersion() - unexpected result: %hu.%hu.%hu.%hu\n",
+ versionArray[0], versionArray[1], versionArray[2], versionArray[3]);
+ break;
+ }
+ }
+
+ ucol_getUCAVersion(col, versionUCAArray);
+ for (i=0; i<4; ++i) {
+ if (versionUCAArray[i] != currUCAVersionArray[i]) {
+ log_err("Testing ucol_getUCAVersion() - unexpected result: %hu.%hu.%hu.%hu\n",
+ versionUCAArray[0], versionUCAArray[1], versionUCAArray[2], versionUCAArray[3]);
+ break;
+ }
+ }
+
+ source=(UChar*)malloc(sizeof(UChar) * 12);
+ target=(UChar*)malloc(sizeof(UChar) * 12);
+
+
+ u_uastrcpy(source, "ab");
+ u_uastrcpy(target, "abc");
+
+ doAssert((ucol_strcoll(col, source, u_strlen(source), target, u_strlen(target)) == UCOL_LESS), "ab < abc comparison failed");
+
+ u_uastrcpy(source, "ab");
+ u_uastrcpy(target, "AB");
+
+ doAssert((ucol_strcoll(col, source, u_strlen(source), target, u_strlen(target)) == UCOL_LESS), "ab < AB comparison failed");
+/* u_uastrcpy(source, "black-bird");
+ u_uastrcpy(target, "blackbird"); */
+ u_uastrcpy(target, "black-bird");
+ u_uastrcpy(source, "blackbird");
+
+ doAssert((ucol_strcoll(col, source, u_strlen(source), target, u_strlen(target)) == UCOL_GREATER),
+ "black-bird > blackbird comparison failed");
+ u_uastrcpy(source, "black bird");
+ u_uastrcpy(target, "black-bird");
+ doAssert((ucol_strcoll(col, source, u_strlen(source), target, u_strlen(target)) == UCOL_LESS),
+ "black bird < black-bird comparison failed");
+ u_uastrcpy(source, "Hello");
+ u_uastrcpy(target, "hello");
+
+ doAssert((ucol_strcoll(col, source, u_strlen(source), target, u_strlen(target)) == UCOL_GREATER),
+ "Hello > hello comparison failed");
+ free(source);
+ free(target);
+ log_verbose("Test ucol_strcoll ends.\n");
+
+ log_verbose("testing ucol_getStrength() method ...\n");
+ doAssert( (ucol_getStrength(col) == UCOL_TERTIARY), "collation object has the wrong strength");
+ doAssert( (ucol_getStrength(col) != UCOL_PRIMARY), "collation object's strength is primary difference");
+
+ log_verbose("testing ucol_setStrength() method ...\n");
+ ucol_setStrength(col, UCOL_SECONDARY);
+ doAssert( (ucol_getStrength(col) != UCOL_TERTIARY), "collation object's strength is secondary difference");
+ doAssert( (ucol_getStrength(col) != UCOL_PRIMARY), "collation object's strength is primary difference");
+ doAssert( (ucol_getStrength(col) == UCOL_SECONDARY), "collation object has the wrong strength");
+
+
+ log_verbose("Get display name for the default collation in German : \n");
+
+ len=ucol_getDisplayName("en_US", "de_DE", NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ disName=(UChar*)malloc(sizeof(UChar) * (len+1));
+ ucol_getDisplayName("en_US", "de_DE", disName, len+1, &status);
+ log_verbose("the display name for default collation in german: %s\n", austrdup(disName) );
+ free(disName);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: in getDisplayName: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Default collation getDisplayName ended.\n");
+
+ ruled = ucol_open("da_DK", &status);
+ log_verbose("ucol_getRules() testing ...\n");
+ ucol_getRules(ruled, &tempLength);
+ doAssert( tempLength != 0, "getRules() result incorrect" );
+ log_verbose("getRules tests end.\n");
+ {
+ UChar *buffer = (UChar *)malloc(200000*sizeof(UChar));
+ int32_t bufLen = 200000;
+ buffer[0] = '\0';
+ log_verbose("ucol_getRulesEx() testing ...\n");
+ tempLength = ucol_getRulesEx(col,UCOL_TAILORING_ONLY,buffer,bufLen );
+ doAssert( tempLength == 0x0a, "getRulesEx() result incorrect" );
+ log_verbose("getRules tests end.\n");
+
+ log_verbose("ucol_getRulesEx() testing ...\n");
+ tempLength=ucol_getRulesEx(col,UCOL_FULL_RULES,buffer,bufLen );
+ doAssert( tempLength != 0, "getRulesEx() result incorrect" );
+ log_verbose("getRules tests end.\n");
+ free(buffer);
+ }
+ ucol_close(ruled);
+ ucol_close(col);
+
+ log_verbose("open an collator for french locale");
+ col = ucol_open("fr_FR", &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: Creating French collation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ ucol_setStrength(col, UCOL_PRIMARY);
+ log_verbose("testing ucol_getStrength() method again ...\n");
+ doAssert( (ucol_getStrength(col) != UCOL_TERTIARY), "collation object has the wrong strength");
+ doAssert( (ucol_getStrength(col) == UCOL_PRIMARY), "collation object's strength is not primary difference");
+
+ log_verbose("testing French ucol_setStrength() method ...\n");
+ ucol_setStrength(col, UCOL_TERTIARY);
+ doAssert( (ucol_getStrength(col) == UCOL_TERTIARY), "collation object's strength is not tertiary difference");
+ doAssert( (ucol_getStrength(col) != UCOL_PRIMARY), "collation object's strength is primary difference");
+ doAssert( (ucol_getStrength(col) != UCOL_SECONDARY), "collation object's strength is secondary difference");
+ ucol_close(col);
+
+ log_verbose("Get display name for the french collation in english : \n");
+ len=ucol_getDisplayName("fr_FR", "en_US", NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ disName=(UChar*)malloc(sizeof(UChar) * (len+1));
+ ucol_getDisplayName("fr_FR", "en_US", disName, len+1, &status);
+ log_verbose("the display name for french collation in english: %s\n", austrdup(disName) );
+ free(disName);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: in getDisplayName: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Default collation getDisplayName ended.\n");
+
+}
+
+/* Test RuleBasedCollator and getRules*/
+void TestRuleBasedColl()
+{
+ UCollator *col1, *col2, *col3, *col4;
+ UCollationElements *iter1, *iter2;
+ UChar ruleset1[60];
+ UChar ruleset2[50];
+ UChar teststr[10];
+ UChar teststr2[10];
+ const UChar *rule1, *rule2, *rule3, *rule4;
+ int32_t tempLength;
+ UErrorCode status = U_ZERO_ERROR;
+ u_uastrcpy(ruleset1, "&9 < a, A < b, B < c, C; ch, cH, Ch, CH < d, D, e, E");
+ u_uastrcpy(ruleset2, "&9 < a, A < b, B < c, C < d, D, e, E");
+
+
+ col1 = ucol_openRules(ruleset1, u_strlen(ruleset1), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH, NULL,&status);
+ if (U_FAILURE(status)) {
+ log_err("RuleBased Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ else
+ log_verbose("PASS: RuleBased Collator creation passed\n");
+
+ status = U_ZERO_ERROR;
+ col2 = ucol_openRules(ruleset2, u_strlen(ruleset2), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("RuleBased Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ else
+ log_verbose("PASS: RuleBased Collator creation passed\n");
+
+
+ status = U_ZERO_ERROR;
+ col3= ucol_open(NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Default Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ else
+ log_verbose("PASS: Default Collator creation passed\n");
+
+ rule1 = ucol_getRules(col1, &tempLength);
+ rule2 = ucol_getRules(col2, &tempLength);
+ rule3 = ucol_getRules(col3, &tempLength);
+
+ doAssert((u_strcmp(rule1, rule2) != 0), "Default collator getRules failed");
+ doAssert((u_strcmp(rule2, rule3) != 0), "Default collator getRules failed");
+ doAssert((u_strcmp(rule1, rule3) != 0), "Default collator getRules failed");
+
+ col4=ucol_openRules(rule2, u_strlen(rule2), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("RuleBased Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ rule4= ucol_getRules(col4, &tempLength);
+ doAssert((u_strcmp(rule2, rule4) == 0), "Default collator getRules failed");
+
+ ucol_close(col1);
+ ucol_close(col2);
+ ucol_close(col3);
+ ucol_close(col4);
+
+ /* tests that modifier ! is always ignored */
+ u_uastrcpy(ruleset1, "!&a<b");
+ teststr[0] = 0x0e40;
+ teststr[1] = 0x0e01;
+ teststr[2] = 0x0e2d;
+ col1 = ucol_openRules(ruleset1, u_strlen(ruleset1), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("RuleBased Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ col2 = ucol_open("en_US", &status);
+ if (U_FAILURE(status)) {
+ log_err("en_US Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ iter1 = ucol_openElements(col1, teststr, 3, &status);
+ iter2 = ucol_openElements(col2, teststr, 3, &status);
+ if(U_FAILURE(status)) {
+ log_err("ERROR: CollationElement iterator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ while (TRUE) {
+ /* testing with en since thai has its own tailoring */
+ uint32_t ce = ucol_next(iter1, &status);
+ uint32_t ce2 = ucol_next(iter2, &status);
+ if(U_FAILURE(status)) {
+ log_err("ERROR: CollationElement iterator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ if (ce2 != ce) {
+ log_err("! modifier test failed");
+ }
+ if (ce == UCOL_NULLORDER) {
+ break;
+ }
+ }
+ ucol_closeElements(iter1);
+ ucol_closeElements(iter2);
+ ucol_close(col1);
+ ucol_close(col2);
+ /* test that we can start a rule without a & or < */
+ u_uastrcpy(ruleset1, "< z < a");
+ col1 = ucol_openRules(ruleset1, u_strlen(ruleset1), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("RuleBased Collator creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ u_uastrcpy(teststr, "z");
+ u_uastrcpy(teststr2, "a");
+ if (ucol_greaterOrEqual(col1, teststr, 1, teststr2, 1)) {
+ log_err("Rule \"z < a\" fails");
+ }
+ ucol_close(col1);
+}
+
+void TestCompare()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *col;
+ UChar* test1;
+ UChar* test2;
+
+ log_verbose("The compare tests begin : \n");
+ status=U_ZERO_ERROR;
+ col = ucol_open("en_US", &status);
+ if(U_FAILURE(status)) {
+ log_err("ucal_open() collation creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ test1=(UChar*)malloc(sizeof(UChar) * 6);
+ test2=(UChar*)malloc(sizeof(UChar) * 6);
+ u_uastrcpy(test1, "Abcda");
+ u_uastrcpy(test2, "abcda");
+
+ log_verbose("Use tertiary comparison level testing ....\n");
+
+ doAssert( (!ucol_equal(col, test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"Abcda\" != \"abcda\" ");
+ doAssert( (ucol_greater(col, test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"Abcda\" >>> \"abcda\" ");
+ doAssert( (ucol_greaterOrEqual(col, test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"Abcda\" >>> \"abcda\"");
+
+ ucol_setStrength(col, UCOL_SECONDARY);
+ log_verbose("Use secondary comparison level testing ....\n");
+
+ doAssert( (ucol_equal(col, test1, u_strlen(test1), test2, u_strlen(test2) )), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert( (!ucol_greater(col, test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert( (ucol_greaterOrEqual(col, test1, u_strlen(test1), test2, u_strlen(test2) )), "Result should be \"Abcda\" == \"abcda\"");
+
+ ucol_setStrength(col, UCOL_PRIMARY);
+ log_verbose("Use primary comparison level testing ....\n");
+
+ doAssert( (ucol_equal(col, test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert( (!ucol_greater(col, test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert( (ucol_greaterOrEqual(col, test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"Abcda\" == \"abcda\"");
+
+
+ log_verbose("The compare tests end.\n");
+ ucol_close(col);
+ free(test1);
+ free(test2);
+
+}
+/*
+---------------------------------------------
+ tests decomposition setting
+*/
+void TestDecomposition() {
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *en_US, *el_GR, *vi_VN;
+ en_US = ucol_open("en_US", &status);
+ el_GR = ucol_open("el_GR", &status);
+ vi_VN = ucol_open("vi_VN", &status);
+
+ if (U_FAILURE(status)) {
+ log_err("ERROR: collation creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+
+ if (ucol_getAttribute(vi_VN, UCOL_NORMALIZATION_MODE, &status) != UCOL_ON ||
+ U_FAILURE(status))
+ {
+ log_err("ERROR: vi_VN collation did not have cannonical decomposition for normalization!\n");
+ }
+
+ status = U_ZERO_ERROR;
+ if (ucol_getAttribute(el_GR, UCOL_NORMALIZATION_MODE, &status) != UCOL_ON ||
+ U_FAILURE(status))
+ {
+ log_err("ERROR: el_GR collation did not have cannonical decomposition for normalization!\n");
+ }
+
+ status = U_ZERO_ERROR;
+ if (ucol_getAttribute(en_US, UCOL_NORMALIZATION_MODE, &status) != UCOL_OFF ||
+ U_FAILURE(status))
+ {
+ log_err("ERROR: en_US collation had cannonical decomposition for normalization!\n");
+ }
+
+ ucol_close(en_US);
+ ucol_close(el_GR);
+ ucol_close(vi_VN);
+}
+
+#define CLONETEST_COLLATOR_COUNT 4
+
+void TestSafeClone() {
+ UChar* test1;
+ UChar* test2;
+ static const UChar umlautUStr[] = {0x00DC, 0};
+ static const UChar oeStr[] = {0x0055, 0x0045, 0};
+ UCollator * someCollators [CLONETEST_COLLATOR_COUNT];
+ UCollator * someClonedCollators [CLONETEST_COLLATOR_COUNT];
+ UCollator * col;
+ UErrorCode err = U_ZERO_ERROR;
+ int8_t testSize = 6; /* Leave this here to test buffer alingment in memory*/
+ uint8_t buffer [CLONETEST_COLLATOR_COUNT] [U_COL_SAFECLONE_BUFFERSIZE];
+ int32_t bufferSize = U_COL_SAFECLONE_BUFFERSIZE;
+ const char sampleRuleChars[] = "&Z < CH";
+ UChar sampleRule[sizeof(sampleRuleChars)];
+ int index;
+
+ if (TestBufferSize()) {
+ log_err("U_COL_SAFECLONE_BUFFERSIZE should be larger than sizeof(UCollator)\n");
+ return;
+ }
+
+ test1=(UChar*)malloc(sizeof(UChar) * testSize);
+ test2=(UChar*)malloc(sizeof(UChar) * testSize);
+ u_uastrcpy(test1, "abCda");
+ u_uastrcpy(test2, "abcda");
+ u_uastrcpy(sampleRule, sampleRuleChars);
+
+ /* one default collator & two complex ones */
+ someCollators[0] = ucol_open("en_US", &err);
+ someCollators[1] = ucol_open("ko", &err);
+ someCollators[2] = ucol_open("ja_JP", &err);
+ someCollators[3] = ucol_openRules(sampleRule, -1, UCOL_ON, UCOL_TERTIARY, NULL, &err);
+ if(U_FAILURE(err)) {
+ log_data_err("Couldn't open one or more collators\n");
+ return;
+ }
+
+ /* Check the various error & informational states: */
+
+ /* Null status - just returns NULL */
+ if (0 != ucol_safeClone(someCollators[0], buffer[0], &bufferSize, 0))
+ {
+ log_err("FAIL: Cloned Collator failed to deal correctly with null status\n");
+ }
+ /* error status - should return 0 & keep error the same */
+ err = U_MEMORY_ALLOCATION_ERROR;
+ if (0 != ucol_safeClone(someCollators[0], buffer[0], &bufferSize, &err) || err != U_MEMORY_ALLOCATION_ERROR)
+ {
+ log_err("FAIL: Cloned Collator failed to deal correctly with incoming error status\n");
+ }
+ err = U_ZERO_ERROR;
+
+ /* Null buffer size pointer - just returns NULL & set error to U_ILLEGAL_ARGUMENT_ERROR*/
+ if (0 != ucol_safeClone(someCollators[0], buffer[0], 0, &err) || err != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("FAIL: Cloned Collator failed to deal correctly with null bufferSize pointer\n");
+ }
+ err = U_ZERO_ERROR;
+
+ /* buffer size pointer is 0 - fill in pbufferSize with a size */
+ bufferSize = 0;
+ if (0 != ucol_safeClone(someCollators[0], buffer[0], &bufferSize, &err) || U_FAILURE(err) || bufferSize <= 0)
+ {
+ log_err("FAIL: Cloned Collator failed a sizing request ('preflighting')\n");
+ }
+ /* Verify our define is large enough */
+ if (U_COL_SAFECLONE_BUFFERSIZE < bufferSize)
+ {
+ log_err("FAIL: Pre-calculated buffer size is too small\n");
+ }
+ /* Verify we can use this run-time calculated size */
+ if (0 == (col = ucol_safeClone(someCollators[0], buffer[0], &bufferSize, &err)) || U_FAILURE(err))
+ {
+ log_err("FAIL: Collator can't be cloned with run-time size\n");
+ }
+ if (col) ucol_close(col);
+ /* size one byte too small - should allocate & let us know */
+ --bufferSize;
+ if (0 == (col = ucol_safeClone(someCollators[0], 0, &bufferSize, &err)) || err != U_SAFECLONE_ALLOCATED_WARNING)
+ {
+ log_err("FAIL: Cloned Collator failed to deal correctly with too-small buffer size\n");
+ }
+ if (col) ucol_close(col);
+ err = U_ZERO_ERROR;
+ bufferSize = U_COL_SAFECLONE_BUFFERSIZE;
+
+
+ /* Null buffer pointer - return Collator & set error to U_SAFECLONE_ALLOCATED_ERROR */
+ if (0 == (col = ucol_safeClone(someCollators[0], 0, &bufferSize, &err)) || err != U_SAFECLONE_ALLOCATED_WARNING)
+ {
+ log_err("FAIL: Cloned Collator failed to deal correctly with null buffer pointer\n");
+ }
+ if (col) ucol_close(col);
+ err = U_ZERO_ERROR;
+
+ /* Null Collator - return NULL & set U_ILLEGAL_ARGUMENT_ERROR */
+ if (0 != ucol_safeClone(0, buffer[0], &bufferSize, &err) || err != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("FAIL: Cloned Collator failed to deal correctly with null Collator pointer\n");
+ }
+
+ err = U_ZERO_ERROR;
+
+ /* Test that a cloned collator doesn't accidentally use UCA. */
+ col=ucol_open("de@collation=phonebook", &err);
+ bufferSize = U_COL_SAFECLONE_BUFFERSIZE;
+ someClonedCollators[0] = ucol_safeClone(col, buffer[0], &bufferSize, &err);
+ doAssert( (ucol_greater(col, umlautUStr, u_strlen(umlautUStr), oeStr, u_strlen(oeStr))), "Original German phonebook collation sorts differently than expected");
+ doAssert( (ucol_greater(someClonedCollators[0], umlautUStr, u_strlen(umlautUStr), oeStr, u_strlen(oeStr))), "Cloned German phonebook collation sorts differently than expected");
+ if (!ucol_equals(someClonedCollators[0], col)) {
+ log_err("FAIL: Cloned German phonebook collator is not equal to original.\n");
+ }
+ ucol_close(col);
+ ucol_close(someClonedCollators[0]);
+
+ err = U_ZERO_ERROR;
+
+ /* change orig & clone & make sure they are independent */
+
+ for (index = 0; index < CLONETEST_COLLATOR_COUNT; index++)
+ {
+ ucol_setStrength(someCollators[index], UCOL_IDENTICAL);
+ bufferSize = 1;
+ err = U_ZERO_ERROR;
+ ucol_close(ucol_safeClone(someCollators[index], buffer[index], &bufferSize, &err));
+ if (err != U_SAFECLONE_ALLOCATED_WARNING) {
+ log_err("FAIL: collator number %d was not allocated.\n", index);
+ }
+
+ bufferSize = U_COL_SAFECLONE_BUFFERSIZE;
+ err = U_ZERO_ERROR;
+ someClonedCollators[index] = ucol_safeClone(someCollators[index], buffer[index], &bufferSize, &err);
+ if (someClonedCollators[index] == NULL
+ || someClonedCollators[index] < (UCollator *)buffer[index]
+ || someClonedCollators[index] > (UCollator *)(buffer[index]+(U_COL_SAFECLONE_BUFFERSIZE-1)))
+ {
+ log_err("FAIL: Cloned collator didn't use provided buffer.\n");
+ return;
+ }
+ if (!ucol_equals(someClonedCollators[index], someCollators[index])) {
+ log_err("FAIL: Cloned collator is not equal to original at index = %d.\n", index);
+ }
+
+ /* Check the usability */
+ ucol_setStrength(someCollators[index], UCOL_PRIMARY);
+ ucol_setAttribute(someCollators[index], UCOL_CASE_LEVEL, UCOL_OFF, &err);
+
+ doAssert( (ucol_equal(someCollators[index], test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"abcda\" == \"abCda\"");
+
+ /* Close the original to make sure that the clone is usable. */
+ ucol_close(someCollators[index]);
+
+ ucol_setStrength(someClonedCollators[index], UCOL_TERTIARY);
+ ucol_setAttribute(someClonedCollators[index], UCOL_CASE_LEVEL, UCOL_OFF, &err);
+ doAssert( (ucol_greater(someClonedCollators[index], test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"abCda\" >>> \"abcda\" ");
+
+ ucol_close(someClonedCollators[index]);
+ }
+ free(test1);
+ free(test2);
+}
+
+void TestCloneBinary(){
+ UErrorCode err = U_ZERO_ERROR;
+ UCollator * col = ucol_open("en_US", &err);
+ UCollator * c;
+ int32_t size;
+ uint8_t * buffer;
+
+ if (U_FAILURE(err)) {
+ log_data_err("Couldn't open collator. Error: %s\n", u_errorName(err));
+ return;
+ }
+
+ size = ucol_cloneBinary(col, NULL, 0, &err);
+ if(size==0 || err!=U_BUFFER_OVERFLOW_ERROR) {
+ log_err("ucol_cloneBinary - couldn't check size. Error: %s\n", u_errorName(err));
+ return;
+ }
+ err = U_ZERO_ERROR;
+
+ buffer = (uint8_t *) malloc(size);
+ ucol_cloneBinary(col, buffer, size, &err);
+ if(U_FAILURE(err)) {
+ log_err("ucol_cloneBinary - couldn't clone.. Error: %s\n", u_errorName(err));
+ free(buffer);
+ return;
+ }
+
+ /* how to check binary result ? */
+
+ c = ucol_openBinary(buffer, size, col, &err);
+ if(U_FAILURE(err)) {
+ log_err("ucol_openBinary failed. Error: %s\n", u_errorName(err));
+ } else {
+ UChar t[] = {0x41, 0x42, 0x43, 0}; /* ABC */
+ uint8_t *k1, *k2;
+ int l1, l2;
+ l1 = ucol_getSortKey(col, t, -1, NULL,0);
+ l2 = ucol_getSortKey(c, t, -1, NULL,0);
+ k1 = (uint8_t *) malloc(sizeof(uint8_t) * l1);
+ k2 = (uint8_t *) malloc(sizeof(uint8_t) * l2);
+ ucol_getSortKey(col, t, -1, k1, l1);
+ ucol_getSortKey(col, t, -1, k2, l2);
+ if (strcmp((char *)k1,(char *)k2) != 0){
+ log_err("ucol_openBinary - new collator should equal to old one\n");
+ };
+ free(k1);
+ free(k2);
+ }
+ free(buffer);
+ ucol_close(c);
+ ucol_close(col);
+}
+/*
+----------------------------------------------------------------------------
+ ctor -- Tests the getSortKey
+*/
+void TestSortKey()
+{
+ uint8_t *sortk1 = NULL, *sortk2 = NULL, *sortk3 = NULL, *sortkEmpty = NULL;
+ uint8_t sortk2_compat[] = {
+ /* 3.6 key, from UCA 5.0 */
+ 0x29, 0x2b, 0x2d, 0x2f, 0x29, 0x01,
+ 0x09, 0x01, 0x09, 0x01, 0x28, 0x01,
+ 0x92, 0x93, 0x94, 0x95, 0x92, 0x00
+ /* 3.4 key, from UCA 4.1 */
+ /* 0x28, 0x2a, 0x2c, 0x2e, 0x28, 0x01, 0x09, 0x01, 0x09, 0x01, 0x27, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 */
+ /* 2.6.1 key */
+ /* 0x26, 0x28, 0x2A, 0x2C, 0x26, 0x01, 0x09, 0x01, 0x09, 0x01, 0x25, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 */
+ /* 2.2 key */
+ /*0x1D, 0x1F, 0x21, 0x23, 0x1D, 0x01, 0x09, 0x01, 0x09, 0x01, 0x1C, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00*/
+ /* 2.0 key */
+ /*0x19, 0x1B, 0x1D, 0x1F, 0x19, 0x01, 0x09, 0x01, 0x09, 0x01, 0x18, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00*/
+ /* 1.8.1 key.*/
+ /*0x19, 0x1B, 0x1D, 0x1F, 0x19, 0x01, 0x0A, 0x01, 0x0A, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00*/
+ /*this is a 1.8 sortkey */
+ /*0x17, 0x19, 0x1B, 0x1D, 0x17, 0x01, 0x08, 0x01, 0x08, 0x00*/
+ /*this is a 1.7 sortkey */
+ /*0x02, 0x54, 0x02, 0x55, 0x02, 0x56, 0x02, 0x57, 0x02, 0x54, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00*/
+ /* this is a 1.6 sortkey */
+ /*0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x53, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00*/
+ };
+
+ int32_t sortklen, osortklen;
+ uint32_t toStringLen=0;
+ UCollator *col;
+ UChar *test1, *test2, *test3;
+ UErrorCode status = U_ZERO_ERROR;
+ char toStringBuffer[256], *resultP;
+
+
+ uint8_t s1[] = { 0x9f, 0x00 };
+ uint8_t s2[] = { 0x61, 0x00 };
+ int strcmpResult;
+
+ strcmpResult = strcmp((const char *)s1, (const char *)s2);
+ log_verbose("strcmp(0x9f..., 0x61...) = %d\n", strcmpResult);
+
+ if(strcmpResult <= 0) {
+ log_err("ERR: expected strcmp(\"9f 00\", \"61 00\") to be >=0 (GREATER).. got %d. Calling strcmp() for sortkeys may not work! \n",
+ strcmpResult);
+ }
+
+
+ log_verbose("testing SortKey begins...\n");
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* col = ucol_open(NULL, &status); */
+ col = ucol_open("en_US", &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: Default collation creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+
+
+ if(ucol_getStrength(col) != UCOL_DEFAULT_STRENGTH)
+ {
+ log_err("ERROR: default collation did not have UCOL_DEFAULT_STRENGTH !\n");
+ }
+ /* Need to use identical strength */
+ ucol_setAttribute(col, UCOL_STRENGTH, UCOL_IDENTICAL, &status);
+
+ test1=(UChar*)malloc(sizeof(UChar) * 6);
+ test2=(UChar*)malloc(sizeof(UChar) * 6);
+ test3=(UChar*)malloc(sizeof(UChar) * 6);
+
+ memset(test1,0xFE, sizeof(UChar)*6);
+ memset(test2,0xFE, sizeof(UChar)*6);
+ memset(test3,0xFE, sizeof(UChar)*6);
+
+
+ u_uastrcpy(test1, "Abcda");
+ u_uastrcpy(test2, "abcda");
+ u_uastrcpy(test3, "abcda");
+
+ log_verbose("Use tertiary comparison level testing ....\n");
+
+ sortklen=ucol_getSortKey(col, test1, u_strlen(test1), NULL, 0);
+ sortk1=(uint8_t*)malloc(sizeof(uint8_t) * (sortklen+1));
+ memset(sortk1,0xFE, sortklen);
+ ucol_getSortKey(col, test1, u_strlen(test1), sortk1, sortklen+1);
+
+ sortklen=ucol_getSortKey(col, test2, u_strlen(test2), NULL, 0);
+ sortk2=(uint8_t*)malloc(sizeof(uint8_t) * (sortklen+1));
+ memset(sortk2,0xFE, sortklen);
+ ucol_getSortKey(col, test2, u_strlen(test2), sortk2, sortklen+1);
+
+ osortklen = sortklen;
+ sortklen=ucol_getSortKey(col, test2, u_strlen(test3), NULL, 0);
+ sortk3=(uint8_t*)malloc(sizeof(uint8_t) * (sortklen+1));
+ memset(sortk3,0xFE, sortklen);
+ ucol_getSortKey(col, test2, u_strlen(test2), sortk3, sortklen+1);
+
+ doAssert( (sortklen == osortklen), "Sortkey length should be the same (abcda, abcda)");
+
+ doAssert( (memcmp(sortk1, sortk2, sortklen) > 0), "Result should be \"Abcda\" > \"abcda\"");
+ doAssert( (memcmp(sortk2, sortk1, sortklen) < 0), "Result should be \"abcda\" < \"Abcda\"");
+ doAssert( (memcmp(sortk2, sortk3, sortklen) == 0), "Result should be \"abcda\" == \"abcda\"");
+
+ doAssert( (memcmp(sortk2, sortk2_compat, sortklen) == 0), "Binary format for 'abcda' sortkey different!");
+
+ resultP = ucol_sortKeyToString(col, sortk2_compat, toStringBuffer, &toStringLen);
+ doAssert( (resultP != 0), "sortKeyToString failed!");
+
+#if 1 /* verobse log of sortkeys */
+ {
+ char junk2[1000];
+ char junk3[1000];
+ int i;
+
+ strcpy(junk2, "abcda[2] ");
+ strcpy(junk3, " abcda[3] ");
+
+ for(i=0;i<sortklen;i++)
+ {
+ sprintf(junk2+strlen(junk2), "%02X ",(int)( 0xFF & sortk2[i]));
+ sprintf(junk3+strlen(junk3), "%02X ",(int)( 0xFF & sortk3[i]));
+ }
+
+ log_verbose("%s\n", junk2);
+ log_verbose("%s\n", junk3);
+ }
+#endif
+
+ free(sortk1);
+ free(sortk2);
+ free(sortk3);
+
+ log_verbose("Use secondary comparision level testing ...\n");
+ ucol_setStrength(col, UCOL_SECONDARY);
+ sortklen=ucol_getSortKey(col, test1, u_strlen(test1), NULL, 0);
+ sortk1=(uint8_t*)malloc(sizeof(uint8_t) * (sortklen+1));
+ ucol_getSortKey(col, test1, u_strlen(test1), sortk1, sortklen+1);
+ sortklen=ucol_getSortKey(col, test2, u_strlen(test2), NULL, 0);
+ sortk2=(uint8_t*)malloc(sizeof(uint8_t) * (sortklen+1));
+ ucol_getSortKey(col, test2, u_strlen(test2), sortk2, sortklen+1);
+
+ doAssert( !(memcmp(sortk1, sortk2, sortklen) > 0), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert( !(memcmp(sortk2, sortk1, sortklen) < 0), "Result should be \"abcda\" == \"Abcda\"");
+ doAssert( (memcmp(sortk1, sortk2, sortklen) == 0), "Result should be \"abcda\" == \"abcda\"");
+
+ log_verbose("getting sortkey for an empty string\n");
+ ucol_setAttribute(col, UCOL_STRENGTH, UCOL_TERTIARY, &status);
+ sortklen = ucol_getSortKey(col, test1, 0, NULL, 0);
+ sortkEmpty = (uint8_t*)malloc(sizeof(uint8_t) * sortklen+1);
+ sortklen = ucol_getSortKey(col, test1, 0, sortkEmpty, sortklen+1);
+ if(sortklen != 3 || sortkEmpty[0] != 1 || sortkEmpty[0] != 1 || sortkEmpty[2] != 0) {
+ log_err("Empty string generated wrong sortkey!\n");
+ }
+ free(sortkEmpty);
+
+ log_verbose("testing passing invalid string\n");
+ sortklen = ucol_getSortKey(col, NULL, 0, NULL, 0);
+ if(sortklen != 0) {
+ log_err("Invalid string didn't return sortkey size of 0\n");
+ }
+
+
+ log_verbose("testing sortkey ends...\n");
+ ucol_close(col);
+ free(test1);
+ free(test2);
+ free(test3);
+ free(sortk1);
+ free(sortk2);
+
+}
+void TestHashCode()
+{
+ uint8_t *sortk1, *sortk2, *sortk3;
+ int32_t sortk1len, sortk2len, sortk3len;
+ UCollator *col;
+ UChar *test1, *test2, *test3;
+ UErrorCode status = U_ZERO_ERROR;
+ log_verbose("testing getHashCode begins...\n");
+ col = ucol_open("en_US", &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: Default collation creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ test1=(UChar*)malloc(sizeof(UChar) * 6);
+ test2=(UChar*)malloc(sizeof(UChar) * 6);
+ test3=(UChar*)malloc(sizeof(UChar) * 6);
+ u_uastrcpy(test1, "Abcda");
+ u_uastrcpy(test2, "abcda");
+ u_uastrcpy(test3, "abcda");
+
+ log_verbose("Use tertiary comparison level testing ....\n");
+ sortk1len=ucol_getSortKey(col, test1, u_strlen(test1), NULL, 0);
+ sortk1=(uint8_t*)malloc(sizeof(uint8_t) * (sortk1len+1));
+ ucol_getSortKey(col, test1, u_strlen(test1), sortk1, sortk1len+1);
+ sortk2len=ucol_getSortKey(col, test2, u_strlen(test2), NULL, 0);
+ sortk2=(uint8_t*)malloc(sizeof(uint8_t) * (sortk2len+1));
+ ucol_getSortKey(col, test2, u_strlen(test2), sortk2, sortk2len+1);
+ sortk3len=ucol_getSortKey(col, test2, u_strlen(test3), NULL, 0);
+ sortk3=(uint8_t*)malloc(sizeof(uint8_t) * (sortk3len+1));
+ ucol_getSortKey(col, test2, u_strlen(test2), sortk3, sortk3len+1);
+
+
+ log_verbose("ucol_hashCode() testing ...\n");
+
+ doAssert( ucol_keyHashCode(sortk1, sortk1len) != ucol_keyHashCode(sortk2, sortk2len), "Hash test1 result incorrect" );
+ doAssert( !(ucol_keyHashCode(sortk1, sortk1len) == ucol_keyHashCode(sortk2, sortk2len)), "Hash test2 result incorrect" );
+ doAssert( ucol_keyHashCode(sortk2, sortk2len) == ucol_keyHashCode(sortk3, sortk3len), "Hash result not equal" );
+
+ log_verbose("hashCode tests end.\n");
+ ucol_close(col);
+ free(sortk1);
+ free(sortk2);
+ free(sortk3);
+ free(test1);
+ free(test2);
+ free(test3);
+
+
+}
+/*
+ *----------------------------------------------------------------------------
+ * Tests the UCollatorElements API.
+ *
+ */
+void TestElemIter()
+{
+ int32_t offset;
+ int32_t order1, order2, order3;
+ UChar *testString1, *testString2;
+ UCollator *col;
+ UCollationElements *iterator1, *iterator2, *iterator3;
+ UErrorCode status = U_ZERO_ERROR;
+ log_verbose("testing UCollatorElements begins...\n");
+ col = ucol_open("en_US", &status);
+ ucol_setAttribute(col, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: Default collation creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+
+ testString1=(UChar*)malloc(sizeof(UChar) * 150);
+ testString2=(UChar*)malloc(sizeof(UChar) * 150);
+ u_uastrcpy(testString1, "XFILE What subset of all possible test cases has the highest probability of detecting the most errors?");
+ u_uastrcpy(testString2, "Xf_ile What subset of all possible test cases has the lowest probability of detecting the least errors?");
+
+ log_verbose("Constructors and comparison testing....\n");
+
+ iterator1 = ucol_openElements(col, testString1, u_strlen(testString1), &status);
+ if(U_FAILURE(status)) {
+ log_err("ERROR: Default collationElement iterator creation failed.: %s\n", myErrorName(status));
+ ucol_close(col);
+ return;
+ }
+ else{ log_verbose("PASS: Default collationElement iterator1 creation passed\n");}
+
+ iterator2 = ucol_openElements(col, testString1, u_strlen(testString1), &status);
+ if(U_FAILURE(status)) {
+ log_err("ERROR: Default collationElement iterator creation failed.: %s\n", myErrorName(status));
+ ucol_close(col);
+ return;
+ }
+ else{ log_verbose("PASS: Default collationElement iterator2 creation passed\n");}
+
+ iterator3 = ucol_openElements(col, testString2, u_strlen(testString2), &status);
+ if(U_FAILURE(status)) {
+ log_err("ERROR: Default collationElement iterator creation failed.: %s\n", myErrorName(status));
+ ucol_close(col);
+ return;
+ }
+ else{ log_verbose("PASS: Default collationElement iterator3 creation passed\n");}
+
+ offset=ucol_getOffset(iterator1);
+ ucol_setOffset(iterator1, 6, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error in setOffset for UCollatorElements iterator.: %s\n", myErrorName(status));
+ return;
+ }
+ if(ucol_getOffset(iterator1)==6)
+ log_verbose("setOffset and getOffset working fine\n");
+ else{
+ log_err("error in set and get Offset got %d instead of 6\n", ucol_getOffset(iterator1));
+ }
+
+ ucol_setOffset(iterator1, 0, &status);
+ order1 = ucol_next(iterator1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Somehow ran out of memory stepping through the iterator1.: %s\n", myErrorName(status));
+ return;
+ }
+ order2=ucol_getOffset(iterator2);
+ doAssert((order1 != order2), "The first iterator advance failed");
+ order2 = ucol_next(iterator2, &status);
+ if (U_FAILURE(status)) {
+ log_err("Somehow ran out of memory stepping through the iterator2.: %s\n", myErrorName(status));
+ return;
+ }
+ order3 = ucol_next(iterator3, &status);
+ if (U_FAILURE(status)) {
+ log_err("Somehow ran out of memory stepping through the iterator3.: %s\n", myErrorName(status));
+ return;
+ }
+
+ doAssert((order1 == order2), "The second iterator advance failed should be the same as first one");
+
+doAssert( (ucol_primaryOrder(order1) == ucol_primaryOrder(order3)), "The primary orders should be identical");
+doAssert( (ucol_secondaryOrder(order1) == ucol_secondaryOrder(order3)), "The secondary orders should be identical");
+doAssert( (ucol_tertiaryOrder(order1) == ucol_tertiaryOrder(order3)), "The tertiary orders should be identical");
+
+ order1=ucol_next(iterator1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Somehow ran out of memory stepping through the iterator2.: %s\n", myErrorName(status));
+ return;
+ }
+ order3=ucol_next(iterator3, &status);
+ if (U_FAILURE(status)) {
+ log_err("Somehow ran out of memory stepping through the iterator2.: %s\n", myErrorName(status));
+ return;
+ }
+doAssert( (ucol_primaryOrder(order1) == ucol_primaryOrder(order3)), "The primary orders should be identical");
+doAssert( (ucol_tertiaryOrder(order1) != ucol_tertiaryOrder(order3)), "The tertiary orders should be different");
+
+ order1=ucol_next(iterator1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Somehow ran out of memory stepping through the iterator2.: %s\n", myErrorName(status));
+ return;
+ }
+ order3=ucol_next(iterator3, &status);
+ if (U_FAILURE(status)) {
+ log_err("Somehow ran out of memory stepping through the iterator2.: %s\n", myErrorName(status));
+ return;
+ }
+ /* this here, my friends, is either pure lunacy or something so obsolete that even it's mother
+ * doesn't care about it. Essentialy, this test complains if secondary values for 'I' and '_'
+ * are the same. According to the UCA, this is not true. Therefore, remove the test.
+ * Besides, if primary strengths for two code points are different, it doesn't matter one bit
+ * what is the relation between secondary or any other strengths.
+ * killed by weiv 06/11/2002.
+ */
+ /*
+ doAssert( ((order1 & UCOL_SECONDARYMASK) != (order3 & UCOL_SECONDARYMASK)), "The secondary orders should be different");
+ */
+ doAssert( (order1 != UCOL_NULLORDER), "Unexpected end of iterator reached");
+
+ free(testString1);
+ free(testString2);
+ ucol_closeElements(iterator1);
+ ucol_closeElements(iterator2);
+ ucol_closeElements(iterator3);
+ ucol_close(col);
+
+ log_verbose("testing CollationElementIterator ends...\n");
+}
+
+void TestGetLocale() {
+ UErrorCode status = U_ZERO_ERROR;
+ const char *rules = "&a<x<y<z";
+ UChar rlz[256] = {0};
+ uint32_t rlzLen = u_unescape(rules, rlz, 256);
+
+ UCollator *coll = NULL;
+ const char *locale = NULL;
+
+ int32_t i = 0;
+
+ /* Now that the collation tree is separate, actual==valid at all times. [alan] */
+ static const struct {
+ const char* requestedLocale;
+ const char* validLocale;
+ const char* actualLocale;
+ } testStruct[] = {
+ { "sr_RS", "sr_Cyrl_RS", "ru" },
+ { "sh_YU", "sr_Latn_RS", "hr" }, /* this used to be sh, but now sh collation aliases hr */
+ { "en_BE_FOO", "en_BE", "en_BE" },
+ { "fr_FR_NONEXISTANT", "fr_FR", "fr" }
+ };
+
+ /* test opening collators for different locales */
+ for(i = 0; i<sizeof(testStruct)/sizeof(testStruct[0]); i++) {
+ status = U_ZERO_ERROR;
+ coll = ucol_open(testStruct[i].requestedLocale, &status);
+ if(U_FAILURE(status)) {
+ log_err("Failed to open collator for %s with %s\n", testStruct[i].requestedLocale, u_errorName(status));
+ ucol_close(coll);
+ continue;
+ }
+ locale = ucol_getLocale(coll, ULOC_REQUESTED_LOCALE, &status);
+ if(strcmp(locale, testStruct[i].requestedLocale) != 0) {
+ log_err("[Coll %s]: Error in requested locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].requestedLocale, locale);
+ }
+ locale = ucol_getLocale(coll, ULOC_VALID_LOCALE, &status);
+ if(strcmp(locale, testStruct[i].validLocale) != 0) {
+ log_err("[Coll %s]: Error in valid locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].validLocale, locale);
+ }
+ locale = ucol_getLocale(coll, ULOC_ACTUAL_LOCALE, &status);
+ if(strcmp(locale, testStruct[i].actualLocale) != 0) {
+ log_err("[Coll %s]: Error in actual locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].actualLocale, locale);
+ }
+ ucol_close(coll);
+ }
+
+ /* completely non-existant locale for collator should get a default collator */
+ {
+ UCollator *defaultColl = ucol_open(NULL, &status);
+ coll = ucol_open("blahaha", &status);
+ if(U_SUCCESS(status)) {
+ if(strcmp(ucol_getLocale(coll, ULOC_REQUESTED_LOCALE, &status), "blahaha")) {
+ log_err("Nonexisting locale didn't preserve the requested locale\n");
+ }
+ if(strcmp(ucol_getLocale(coll, ULOC_VALID_LOCALE, &status),
+ ucol_getLocale(defaultColl, ULOC_VALID_LOCALE, &status))) {
+ log_err("Valid locale for nonexisting locale locale collator differs "
+ "from valid locale for default collator\n");
+ }
+ if(strcmp(ucol_getLocale(coll, ULOC_ACTUAL_LOCALE, &status),
+ ucol_getLocale(defaultColl, ULOC_ACTUAL_LOCALE, &status))) {
+ log_err("Actual locale for nonexisting locale locale collator differs "
+ "from actual locale for default collator\n");
+ }
+ ucol_close(coll);
+ ucol_close(defaultColl);
+ } else {
+ log_data_err("Couldn't open collators\n");
+ }
+ }
+
+
+
+ /* collator instantiated from rules should have all three locales NULL */
+ coll = ucol_openRules(rlz, rlzLen, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
+ locale = ucol_getLocale(coll, ULOC_REQUESTED_LOCALE, &status);
+ if(locale != NULL) {
+ log_err("For collator instantiated from rules, requested locale returned %s instead of NULL\n", locale);
+ }
+ locale = ucol_getLocale(coll, ULOC_VALID_LOCALE, &status);
+ if(locale != NULL) {
+ log_err("For collator instantiated from rules, valid locale returned %s instead of NULL\n", locale);
+ }
+ locale = ucol_getLocale(coll, ULOC_ACTUAL_LOCALE, &status);
+ if(locale != NULL) {
+ log_err("For collator instantiated from rules, actual locale returned %s instead of NULL\n", locale);
+ }
+ ucol_close(coll);
+
+}
+
+
+void TestGetAll()
+{
+ int32_t i, count;
+ count=ucol_countAvailable();
+ /* use something sensible w/o hardcoding the count */
+ if(count < 0){
+ log_err("Error in countAvailable(), it returned %d\n", count);
+ }
+ else{
+ log_verbose("PASS: countAvailable() successful, it returned %d\n", count);
+ }
+ for(i=0;i<count;i++)
+ log_verbose("%s\n", ucol_getAvailable(i));
+
+
+}
+
+
+struct teststruct {
+ const char *original;
+ uint8_t key[256];
+} ;
+
+static int compare_teststruct(const void *string1, const void *string2) {
+ return(strcmp((const char *)((struct teststruct *)string1)->key, (const char *)((struct teststruct *)string2)->key));
+}
+
+void TestBounds() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ UCollator *coll = ucol_open("sh", &status);
+
+ uint8_t sortkey[512], lower[512], upper[512];
+ UChar buffer[512];
+
+ static const char * const test[] = {
+ "John Smith",
+ "JOHN SMITH",
+ "john SMITH",
+ "j\\u00F6hn sm\\u00EFth",
+ "J\\u00F6hn Sm\\u00EFth",
+ "J\\u00D6HN SM\\u00CFTH",
+ "john smithsonian",
+ "John Smithsonian",
+ };
+
+ struct teststruct tests[] = {
+ {"\\u010CAKI MIHALJ" } ,
+ {"\\u010CAKI MIHALJ" } ,
+ {"\\u010CAKI PIRO\\u0160KA" },
+ {"\\u010CABAI ANDRIJA" } ,
+ {"\\u010CABAI LAJO\\u0160" } ,
+ {"\\u010CABAI MARIJA" } ,
+ {"\\u010CABAI STEVAN" } ,
+ {"\\u010CABAI STEVAN" } ,
+ {"\\u010CABARKAPA BRANKO" } ,
+ {"\\u010CABARKAPA MILENKO" } ,
+ {"\\u010CABARKAPA MIROSLAV" } ,
+ {"\\u010CABARKAPA SIMO" } ,
+ {"\\u010CABARKAPA STANKO" } ,
+ {"\\u010CABARKAPA TAMARA" } ,
+ {"\\u010CABARKAPA TOMA\\u0160" } ,
+ {"\\u010CABDARI\\u0106 NIKOLA" } ,
+ {"\\u010CABDARI\\u0106 ZORICA" } ,
+ {"\\u010CABI NANDOR" } ,
+ {"\\u010CABOVI\\u0106 MILAN" } ,
+ {"\\u010CABRADI AGNEZIJA" } ,
+ {"\\u010CABRADI IVAN" } ,
+ {"\\u010CABRADI JELENA" } ,
+ {"\\u010CABRADI LJUBICA" } ,
+ {"\\u010CABRADI STEVAN" } ,
+ {"\\u010CABRDA MARTIN" } ,
+ {"\\u010CABRILO BOGDAN" } ,
+ {"\\u010CABRILO BRANISLAV" } ,
+ {"\\u010CABRILO LAZAR" } ,
+ {"\\u010CABRILO LJUBICA" } ,
+ {"\\u010CABRILO SPASOJA" } ,
+ {"\\u010CADE\\u0160 ZDENKA" } ,
+ {"\\u010CADESKI BLAGOJE" } ,
+ {"\\u010CADOVSKI VLADIMIR" } ,
+ {"\\u010CAGLJEVI\\u0106 TOMA" } ,
+ {"\\u010CAGOROVI\\u0106 VLADIMIR" } ,
+ {"\\u010CAJA VANKA" } ,
+ {"\\u010CAJI\\u0106 BOGOLJUB" } ,
+ {"\\u010CAJI\\u0106 BORISLAV" } ,
+ {"\\u010CAJI\\u0106 RADOSLAV" } ,
+ {"\\u010CAK\\u0160IRAN MILADIN" } ,
+ {"\\u010CAKAN EUGEN" } ,
+ {"\\u010CAKAN EVGENIJE" } ,
+ {"\\u010CAKAN IVAN" } ,
+ {"\\u010CAKAN JULIJAN" } ,
+ {"\\u010CAKAN MIHAJLO" } ,
+ {"\\u010CAKAN STEVAN" } ,
+ {"\\u010CAKAN VLADIMIR" } ,
+ {"\\u010CAKAN VLADIMIR" } ,
+ {"\\u010CAKAN VLADIMIR" } ,
+ {"\\u010CAKARA ANA" } ,
+ {"\\u010CAKAREVI\\u0106 MOMIR" } ,
+ {"\\u010CAKAREVI\\u0106 NEDELJKO" } ,
+ {"\\u010CAKI \\u0160ANDOR" } ,
+ {"\\u010CAKI AMALIJA" } ,
+ {"\\u010CAKI ANDRA\\u0160" } ,
+ {"\\u010CAKI LADISLAV" } ,
+ {"\\u010CAKI LAJO\\u0160" } ,
+ {"\\u010CAKI LASLO" } ,
+ };
+
+
+
+ int32_t i = 0, j = 0, k = 0, buffSize = 0, skSize = 0, lowerSize = 0, upperSize = 0;
+ int32_t arraySize = sizeof(tests)/sizeof(tests[0]);
+
+ if(U_SUCCESS(status) && coll) {
+ for(i = 0; i<arraySize; i++) {
+ buffSize = u_unescape(tests[i].original, buffer, 512);
+ skSize = ucol_getSortKey(coll, buffer, buffSize, tests[i].key, 512);
+ }
+
+ qsort(tests, arraySize, sizeof(struct teststruct), compare_teststruct);
+
+ for(i = 0; i < arraySize-1; i++) {
+ for(j = i+1; j < arraySize; j++) {
+ lowerSize = ucol_getBound(tests[i].key, -1, UCOL_BOUND_LOWER, 1, lower, 512, &status);
+ upperSize = ucol_getBound(tests[j].key, -1, UCOL_BOUND_UPPER, 1, upper, 512, &status);
+ for(k = i; k <= j; k++) {
+ if(strcmp((const char *)lower, (const char *)tests[k].key) > 0) {
+ log_err("Problem with lower! j = %i (%s vs %s)\n", k, tests[k].original, tests[i].original);
+ }
+ if(strcmp((const char *)upper, (const char *)tests[k].key) <= 0) {
+ log_err("Problem with upper! j = %i (%s vs %s)\n", k, tests[k].original, tests[j].original);
+ }
+ }
+ }
+ }
+
+
+#if 0
+ for(i = 0; i < 1000; i++) {
+ lowerRND = (rand()/(RAND_MAX/arraySize));
+ upperRND = lowerRND + (rand()/(RAND_MAX/(arraySize-lowerRND)));
+
+ lowerSize = ucol_getBound(tests[lowerRND].key, -1, UCOL_BOUND_LOWER, 1, lower, 512, &status);
+ upperSize = ucol_getBound(tests[upperRND].key, -1, UCOL_BOUND_UPPER_LONG, 1, upper, 512, &status);
+
+ for(j = lowerRND; j<=upperRND; j++) {
+ if(strcmp(lower, tests[j].key) > 0) {
+ log_err("Problem with lower! j = %i (%s vs %s)\n", j, tests[j].original, tests[lowerRND].original);
+ }
+ if(strcmp(upper, tests[j].key) <= 0) {
+ log_err("Problem with upper! j = %i (%s vs %s)\n", j, tests[j].original, tests[upperRND].original);
+ }
+ }
+ }
+#endif
+
+
+
+
+
+ for(i = 0; i<sizeof(test)/sizeof(test[0]); i++) {
+ buffSize = u_unescape(test[i], buffer, 512);
+ skSize = ucol_getSortKey(coll, buffer, buffSize, sortkey, 512);
+ lowerSize = ucol_getBound(sortkey, skSize, UCOL_BOUND_LOWER, 1, lower, 512, &status);
+ upperSize = ucol_getBound(sortkey, skSize, UCOL_BOUND_UPPER_LONG, 1, upper, 512, &status);
+ for(j = i+1; j<sizeof(test)/sizeof(test[0]); j++) {
+ buffSize = u_unescape(test[j], buffer, 512);
+ skSize = ucol_getSortKey(coll, buffer, buffSize, sortkey, 512);
+ if(strcmp((const char *)lower, (const char *)sortkey) > 0) {
+ log_err("Problem with lower! i = %i, j = %i (%s vs %s)\n", i, j, test[i], test[j]);
+ }
+ if(strcmp((const char *)upper, (const char *)sortkey) <= 0) {
+ log_err("Problem with upper! i = %i, j = %i (%s vs %s)\n", i, j, test[i], test[j]);
+ }
+ }
+ }
+ ucol_close(coll);
+ } else {
+ log_data_err("Couldn't open collator\n");
+ }
+
+}
+
+static void doOverrunTest(UCollator *coll, const UChar *uString, int32_t strLen) {
+ int32_t skLen = 0, skLen2 = 0;
+ uint8_t sortKey[256];
+ int32_t i, j;
+ uint8_t filler = 0xFF;
+
+ skLen = ucol_getSortKey(coll, uString, strLen, NULL, 0);
+
+ for(i = 0; i < skLen; i++) {
+ memset(sortKey, filler, 256);
+ skLen2 = ucol_getSortKey(coll, uString, strLen, sortKey, i);
+ if(skLen != skLen2) {
+ log_err("For buffer size %i, got different sortkey length. Expected %i got %i\n", i, skLen, skLen2);
+ }
+ for(j = i; j < 256; j++) {
+ if(sortKey[j] != filler) {
+ log_err("Something run over index %i\n", j);
+ break;
+ }
+ }
+ }
+}
+
+/* j1865 reports that if a shorter buffer is passed to
+* to get sort key, a buffer overrun happens in some
+* cases. This test tries to check this.
+*/
+void TestSortKeyBufferOverrun(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char* cString = "A very Merry liTTle-lamB..";
+ UChar uString[256];
+ int32_t strLen = 0;
+ UCollator *coll = ucol_open("root", &status);
+ strLen = u_unescape(cString, uString, 256);
+
+ if(U_SUCCESS(status)) {
+ log_verbose("testing non ignorable\n");
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status);
+ doOverrunTest(coll, uString, strLen);
+
+ log_verbose("testing shifted\n");
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ doOverrunTest(coll, uString, strLen);
+
+ log_verbose("testing shifted quaternary\n");
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
+ doOverrunTest(coll, uString, strLen);
+
+ log_verbose("testing with french secondaries\n");
+ ucol_setAttribute(coll, UCOL_FRENCH_COLLATION, UCOL_ON, &status);
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &status);
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status);
+ doOverrunTest(coll, uString, strLen);
+
+ }
+ ucol_close(coll);
+}
+
+static void TestAttribute()
+{
+ UErrorCode error = U_ZERO_ERROR;
+ UCollator *coll = ucol_open(NULL, &error);
+
+ if (U_FAILURE(error)) {
+ log_err("Creation of default collator failed");
+ return;
+ }
+
+ ucol_setAttribute(coll, UCOL_FRENCH_COLLATION, UCOL_OFF, &error);
+ if (ucol_getAttribute(coll, UCOL_FRENCH_COLLATION, &error) != UCOL_OFF ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the french collation failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_FRENCH_COLLATION, UCOL_ON, &error);
+ if (ucol_getAttribute(coll, UCOL_FRENCH_COLLATION, &error) != UCOL_ON ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the french collation failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &error);
+ if (ucol_getAttribute(coll, UCOL_ALTERNATE_HANDLING, &error) != UCOL_SHIFTED ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the alternate handling failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &error);
+ if (ucol_getAttribute(coll, UCOL_ALTERNATE_HANDLING, &error) != UCOL_NON_IGNORABLE ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the alternate handling failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, &error);
+ if (ucol_getAttribute(coll, UCOL_CASE_FIRST, &error) != UCOL_LOWER_FIRST ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the case first attribute failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, &error);
+ if (ucol_getAttribute(coll, UCOL_CASE_FIRST, &error) != UCOL_UPPER_FIRST ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the case first attribute failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_ON, &error);
+ if (ucol_getAttribute(coll, UCOL_CASE_LEVEL, &error) != UCOL_ON ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the case level attribute failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_OFF, &error);
+ if (ucol_getAttribute(coll, UCOL_CASE_LEVEL, &error) != UCOL_OFF ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the case level attribute failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &error);
+ if (ucol_getAttribute(coll, UCOL_NORMALIZATION_MODE, &error) != UCOL_ON ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the normalization on/off attribute failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_OFF, &error);
+ if (ucol_getAttribute(coll, UCOL_NORMALIZATION_MODE, &error) != UCOL_OFF ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the normalization on/off attribute failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_PRIMARY, &error);
+ if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_PRIMARY ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the collation strength failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_SECONDARY, &error);
+ if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_SECONDARY ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the collation strength failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &error);
+ if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_TERTIARY ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the collation strength failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_QUATERNARY, &error);
+ if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_QUATERNARY ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the collation strength failed");
+ }
+
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_IDENTICAL, &error);
+ if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_IDENTICAL ||
+ U_FAILURE(error)) {
+ log_err("Setting and retrieving of the collation strength failed");
+ }
+
+ ucol_close(coll);
+}
+
+void TestGetTailoredSet() {
+ struct {
+ const char *rules;
+ const char *tests[20];
+ int32_t testsize;
+ } setTest[] = {
+ { "&a < \\u212b", { "\\u212b", "A\\u030a", "\\u00c5" }, 3},
+ { "& S < \\u0161 <<< \\u0160", { "\\u0161", "s\\u030C", "\\u0160", "S\\u030C" }, 4}
+ };
+
+ int32_t i = 0, j = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError pError;
+
+ UCollator *coll = NULL;
+ UChar buff[1024];
+ int32_t buffLen = 0;
+ USet *set = NULL;
+
+ for(i = 0; i < sizeof(setTest)/sizeof(setTest[0]); i++) {
+ buffLen = u_unescape(setTest[i].rules, buff, 1024);
+ coll = ucol_openRules(buff, buffLen, UCOL_DEFAULT, UCOL_DEFAULT, &pError, &status);
+ if(U_SUCCESS(status)) {
+ set = ucol_getTailoredSet(coll, &status);
+ if(uset_size(set) != setTest[i].testsize) {
+ log_err("Tailored set size different (%d) than expected (%d)\n", uset_size(set), setTest[i].testsize);
+ }
+ for(j = 0; j < setTest[i].testsize; j++) {
+ buffLen = u_unescape(setTest[i].tests[j], buff, 1024);
+ if(!uset_containsString(set, buff, buffLen)) {
+ log_err("Tailored set doesn't contain %s... It should\n", setTest[i].tests[j]);
+ }
+ }
+ uset_close(set);
+ } else {
+ log_err("Couldn't open collator with rules %s\n", setTest[i].rules);
+ }
+ ucol_close(coll);
+ }
+}
+
+static int tMemCmp(const uint8_t *first, const uint8_t *second) {
+ int32_t firstLen = (int32_t)strlen((const char *)first);
+ int32_t secondLen = (int32_t)strlen((const char *)second);
+ return memcmp(first, second, uprv_min(firstLen, secondLen));
+}
+static const char * strengthsC[] = {
+ "UCOL_PRIMARY",
+ "UCOL_SECONDARY",
+ "UCOL_TERTIARY",
+ "UCOL_QUATERNARY",
+ "UCOL_IDENTICAL"
+};
+
+void TestMergeSortKeys(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("en", &status);
+ if(U_SUCCESS(status)) {
+
+ const char* cases[] = {
+ "abc",
+ "abcd",
+ "abcde"
+ };
+ uint32_t casesSize = sizeof(cases)/sizeof(cases[0]);
+ const char* prefix = "foo";
+ const char* suffix = "egg";
+ char outBuff1[256], outBuff2[256];
+
+ uint8_t **sortkeys = (uint8_t **)malloc(casesSize*sizeof(uint8_t *));
+ uint8_t **mergedPrefixkeys = (uint8_t **)malloc(casesSize*sizeof(uint8_t *));
+ uint8_t **mergedSuffixkeys = (uint8_t **)malloc(casesSize*sizeof(uint8_t *));
+ uint32_t *sortKeysLen = (uint32_t *)malloc(casesSize*sizeof(uint32_t));
+ uint8_t prefixKey[256], suffixKey[256];
+ uint32_t prefixKeyLen = 0, suffixKeyLen = 0, i = 0;
+ UChar buffer[256];
+ uint32_t unescapedLen = 0, l1 = 0, l2 = 0;
+ UColAttributeValue strength;
+
+ log_verbose("ucol_mergeSortkeys test\n");
+ log_verbose("Testing order of the test cases\n");
+ genericLocaleStarter("en", cases, casesSize);
+
+ for(i = 0; i<casesSize; i++) {
+ sortkeys[i] = (uint8_t *)malloc(256*sizeof(uint8_t));
+ mergedPrefixkeys[i] = (uint8_t *)malloc(256*sizeof(uint8_t));
+ mergedSuffixkeys[i] = (uint8_t *)malloc(256*sizeof(uint8_t));
+ }
+
+ unescapedLen = u_unescape(prefix, buffer, 256);
+ prefixKeyLen = ucol_getSortKey(coll, buffer, unescapedLen, prefixKey, 256);
+
+ unescapedLen = u_unescape(suffix, buffer, 256);
+ suffixKeyLen = ucol_getSortKey(coll, buffer, unescapedLen, suffixKey, 256);
+
+ log_verbose("Massaging data with prefixes and different strengths\n");
+ strength = UCOL_PRIMARY;
+ while(strength <= UCOL_IDENTICAL) {
+ log_verbose("Strength %s\n", strengthsC[strength<=UCOL_QUATERNARY?strength:4]);
+ ucol_setAttribute(coll, UCOL_STRENGTH, strength, &status);
+ for(i = 0; i<casesSize; i++) {
+ unescapedLen = u_unescape(cases[i], buffer, 256);
+ sortKeysLen[i] = ucol_getSortKey(coll, buffer, unescapedLen, sortkeys[i], 256);
+ ucol_mergeSortkeys(prefixKey, prefixKeyLen, sortkeys[i], sortKeysLen[i], mergedPrefixkeys[i], 256);
+ ucol_mergeSortkeys(sortkeys[i], sortKeysLen[i], suffixKey, suffixKeyLen, mergedSuffixkeys[i], 256);
+ if(i>0) {
+ if(tMemCmp(mergedPrefixkeys[i-1], mergedPrefixkeys[i]) >= 0) {
+ log_err("Error while comparing prefixed keys @ strength %s:\n", strengthsC[strength<=UCOL_QUATERNARY?strength:4]);
+ log_err("%s\n%s\n",
+ ucol_sortKeyToString(coll, mergedPrefixkeys[i-1], outBuff1, &l1),
+ ucol_sortKeyToString(coll, mergedPrefixkeys[i], outBuff2, &l2));
+ }
+ if(tMemCmp(mergedSuffixkeys[i-1], mergedSuffixkeys[i]) >= 0) {
+ log_err("Error while comparing suffixed keys @ strength %s:\n", strengthsC[strength<=UCOL_QUATERNARY?strength:4]);
+ log_err("%s\n%s\n",
+ ucol_sortKeyToString(coll, mergedSuffixkeys[i-1], outBuff1, &l1),
+ ucol_sortKeyToString(coll, mergedSuffixkeys[i], outBuff2, &l2));
+ }
+ }
+ }
+ if(strength == UCOL_QUATERNARY) {
+ strength = UCOL_IDENTICAL;
+ } else {
+ strength++;
+ }
+ }
+
+ {
+ uint8_t smallBuf[3];
+ uint32_t reqLen = 0;
+ log_verbose("testing buffer overflow\n");
+ reqLen = ucol_mergeSortkeys(prefixKey, prefixKeyLen, suffixKey, suffixKeyLen, smallBuf, 3);
+ if(reqLen != (prefixKeyLen+suffixKeyLen-1)) {
+ log_err("Wrong preflight size for merged sortkey\n");
+ }
+ }
+
+ {
+ UChar empty = 0;
+ uint8_t emptyKey[20], abcKey[50], mergedKey[100];
+ int32_t emptyKeyLen = 0, abcKeyLen = 0, mergedKeyLen = 0;
+
+ log_verbose("testing merging with sortkeys generated for empty strings\n");
+ emptyKeyLen = ucol_getSortKey(coll, &empty, 0, emptyKey, 20);
+ unescapedLen = u_unescape(cases[0], buffer, 256);
+ abcKeyLen = ucol_getSortKey(coll, buffer, unescapedLen, abcKey, 50);
+ mergedKeyLen = ucol_mergeSortkeys(emptyKey, emptyKeyLen, abcKey, abcKeyLen, mergedKey, 100);
+ if(mergedKey[0] != 2) {
+ log_err("Empty sortkey didn't produce a level separator\n");
+ }
+ /* try with zeros */
+ mergedKeyLen = ucol_mergeSortkeys(emptyKey, 0, abcKey, abcKeyLen, mergedKey, 100);
+ if(mergedKeyLen != 0 || mergedKey[0] != 0) {
+ log_err("Empty key didn't produce null mergedKey\n");
+ }
+ mergedKeyLen = ucol_mergeSortkeys(abcKey, abcKeyLen, emptyKey, 0, mergedKey, 100);
+ if(mergedKeyLen != 0 || mergedKey[0] != 0) {
+ log_err("Empty key didn't produce null mergedKey\n");
+ }
+
+ }
+
+ for(i = 0; i<casesSize; i++) {
+ free(sortkeys[i]);
+ free(mergedPrefixkeys[i]);
+ free(mergedSuffixkeys[i]);
+ }
+ free(sortkeys);
+ free(mergedPrefixkeys);
+ free(mergedSuffixkeys);
+ free(sortKeysLen);
+ ucol_close(coll);
+ /* need to finish this up */
+ } else {
+ log_data_err("Couldn't open collator");
+ }
+}
+static void TestShortString(void)
+{
+ struct {
+ const char *input;
+ const char *expectedOutput;
+ const char *locale;
+ UErrorCode expectedStatus;
+ int32_t expectedOffset;
+ uint32_t expectedIdentifier;
+ } testCases[] = {
+ {"LDE_RDE_KPHONEBOOK_T0041_ZLATN","B2900_KPHONEBOOK_LDE", "de@collation=phonebook", U_USING_FALLBACK_WARNING, 0, 0 },
+ {"LEN_RUS_NO_AS_S4","AS_LEN_NO_S4", NULL, U_USING_FALLBACK_WARNING, 0, 0 },
+ {"LDE_VPHONEBOOK_EO_SI","EO_KPHONEBOOK_LDE_SI", "de@collation=phonebook", U_ZERO_ERROR, 0, 0 },
+ {"LDE_Kphonebook","KPHONEBOOK_LDE", "de@collation=phonebook", U_ZERO_ERROR, 0, 0 },
+ {"Xqde_DE@collation=phonebookq_S3_EX","KPHONEBOOK_LDE", "de@collation=phonebook", U_USING_FALLBACK_WARNING, 0, 0 },
+ {"LFR_FO", "LFR", NULL, U_ZERO_ERROR, 0, 0 },
+ {"SO_LX_AS", "", NULL, U_ILLEGAL_ARGUMENT_ERROR, 8, 0 },
+ {"S3_ASS_MMM", "", NULL, U_ILLEGAL_ARGUMENT_ERROR, 5, 0 }
+ };
+
+ int32_t i = 0, j = 0;
+ UCollator *coll = NULL, *fromID = NULL, *fromNormalized = NULL;
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ char fromShortBuffer[256], fromIDBuffer[256], fromIDRoundtrip[256], normalizedBuffer[256], fromNormalizedBuffer[256];
+ uint32_t identifier = 0, idFromSS = 0;
+ const char* locale = NULL;
+
+
+ for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
+ status = U_ZERO_ERROR;
+ if(testCases[i].locale) {
+ locale = testCases[i].locale;
+ } else {
+ locale = NULL;
+ }
+
+ coll = ucol_openFromShortString(testCases[i].input, FALSE, &parseError, &status);
+ if(status != testCases[i].expectedStatus) {
+ log_err("Got status '%s' that is different from expected '%s' for '%s'\n",
+ u_errorName(status), u_errorName(testCases[i].expectedStatus), testCases[i].input);
+ }
+
+ if(U_SUCCESS(status)) {
+ ucol_getShortDefinitionString(coll, locale, fromShortBuffer, 256, &status);
+
+ if(strcmp(fromShortBuffer, testCases[i].expectedOutput)) {
+ log_err("Got short string '%s' from the collator. Expected '%s' for input '%s'\n",
+ fromShortBuffer, testCases[i].expectedOutput, testCases[i].input);
+ }
+
+ ucol_normalizeShortDefinitionString(testCases[i].input, normalizedBuffer, 256, &parseError, &status);
+ fromNormalized = ucol_openFromShortString(normalizedBuffer, FALSE, &parseError, &status);
+ ucol_getShortDefinitionString(fromNormalized, locale, fromNormalizedBuffer, 256, &status);
+
+ if(strcmp(fromShortBuffer, fromNormalizedBuffer)) {
+ log_err("Strings obtained from collators instantiated by short string ('%s') and from normalized string ('%s') differ\n",
+ fromShortBuffer, fromNormalizedBuffer);
+ }
+
+
+ if(!ucol_equals(coll, fromNormalized)) {
+ log_err("Collator from short string ('%s') differs from one obtained through a normalized version ('%s')\n",
+ testCases[i].input, normalizedBuffer);
+ }
+
+ /* test identifiers */
+ identifier = ucol_collatorToIdentifier(coll, locale, &status);
+ if(identifier < UCOL_SIT_COLLATOR_NOT_ENCODABLE) {
+ ucol_identifierToShortString(identifier, fromIDBuffer, 256, FALSE, &status);
+ fromID = ucol_openFromIdentifier(identifier, FALSE, &status);
+ if(!ucol_equals(coll, fromID)) {
+ log_err("Collator from short string ('%s') differs from one obtained through an identifier ('%s')\n",
+ testCases[i].input, fromIDBuffer);
+ }
+ ucol_close(fromID);
+ }
+
+ /* round-trip short string - identifier */
+ for(j = 1; j < 2; j++) {
+ idFromSS = ucol_shortStringToIdentifier(testCases[i].input, (UBool)j, &status);
+ ucol_identifierToShortString(idFromSS, fromIDBuffer, 256, (UBool)j, &status);
+ identifier = ucol_shortStringToIdentifier(fromIDBuffer, (UBool)j, &status);
+ ucol_identifierToShortString(identifier, fromIDRoundtrip, 256, (UBool)j, &status);
+
+ if(idFromSS != identifier) {
+ log_err("FD = %i, id didn't round trip. %08X vs %08X (%s)\n",
+ j, idFromSS, identifier, testCases[i].input);
+ }
+ if(strcmp(fromIDBuffer, fromIDRoundtrip)) {
+ log_err("FD = %i, SS didn't round trip. %s vs %s (%s)\n",
+ j, fromIDBuffer, fromIDRoundtrip, testCases[i].input);
+ }
+ }
+
+ ucol_close(fromNormalized);
+ ucol_close(coll);
+
+ } else {
+ if(parseError.offset != testCases[i].expectedOffset) {
+ log_err("Got parse error offset %i, but expected %i instead for '%s'\n",
+ parseError.offset, testCases[i].expectedOffset, testCases[i].input);
+ }
+ }
+ }
+
+}
+
+static void
+doSetsTest(const char *locale, const USet *ref, USet *set, const char* inSet, const char* outSet, UErrorCode *status) {
+ UChar buffer[512];
+ int32_t bufLen;
+
+ uset_clear(set);
+ bufLen = u_unescape(inSet, buffer, 512);
+ uset_applyPattern(set, buffer, bufLen, 0, status);
+ if(U_FAILURE(*status)) {
+ log_err("%s: Failure setting pattern %s\n", locale, u_errorName(*status));
+ }
+
+ if(!uset_containsAll(ref, set)) {
+ log_err("%s: Some stuff from %s is not present in the set\n", locale, inSet);
+ }
+
+ uset_clear(set);
+ bufLen = u_unescape(outSet, buffer, 512);
+ uset_applyPattern(set, buffer, bufLen, 0, status);
+ if(U_FAILURE(*status)) {
+ log_err("%s: Failure setting pattern %s\n", locale, u_errorName(*status));
+ }
+
+ if(!uset_containsNone(ref, set)) {
+ log_err("%s: Some stuff from %s is present in the set\n", locale, outSet);
+ }
+}
+
+
+
+
+static void
+TestGetContractionsAndUnsafes(void)
+{
+ static struct {
+ const char* locale;
+ const char* inConts;
+ const char* outConts;
+ const char* inExp;
+ const char* outExp;
+ const char* unsafeCodeUnits;
+ const char* safeCodeUnits;
+ } tests[] = {
+ { "ru",
+ "[{\\u0474\\u030F}{\\u0475\\u030F}{\\u04D8\\u0308}{\\u04D9\\u0308}{\\u04E8\\u0308}{\\u04E9\\u0308}]",
+ "[{\\u0430\\u0306}{\\u0410\\u0306}{\\u0430\\u0308}{\\u0410\\u0306}{\\u0433\\u0301}{\\u0413\\u0301}]",
+ "[\\u00e6]",
+ "[a]",
+ "[\\u0474\\u0475\\u04d8\\u04d9\\u04e8\\u04e9]",
+ "[aAbB\\u0430\\u0410\\u0433\\u0413]"
+ },
+ { "uk",
+ "[{\\u0474\\u030F}{\\u0475\\u030F}{\\u04D8\\u0308}{\\u04D9\\u0308}{\\u04E8\\u0308}{\\u04E9\\u0308}"
+ "{\\u0430\\u0306}{\\u0410\\u0306}{\\u0430\\u0308}{\\u0410\\u0306}{\\u0433\\u0301}{\\u0413\\u0301}]",
+ "[]",
+ "[\\u00e6]",
+ "[a]",
+ "[\\u0474\\u0475\\u04D8\\u04D9\\u04E8\\u04E9\\u0430\\u0410\\u0433\\u0413]",
+ "[aAbBxv]",
+ },
+ { "sh",
+ "[{C\\u0301}{C\\u030C}{C\\u0341}{DZ\\u030C}{Dz\\u030C}{D\\u017D}{D\\u017E}{lj}{nj}]",
+ "[{\\u309d\\u3099}{\\u30fd\\u3099}]",
+ "[\\u00e6]",
+ "[a]",
+ "[nlcdzNLCDZ]",
+ "[jabv]"
+ },
+ { "ja",
+ "[{\\u3053\\u3099\\u309D}{\\u3053\\u3099\\u309D\\u3099}{\\u3053\\u3099\\u309E}{\\u3053\\u3099\\u30FC}{\\u3053\\u309D}{\\u3053\\u309D\\u3099}{\\u3053\\u309E}{\\u3053\\u30FC}{\\u30B3\\u3099\\u30FC}{\\u30B3\\u3099\\u30FD}{\\u30B3\\u3099\\u30FD\\u3099}{\\u30B3\\u3099\\u30FE}{\\u30B3\\u30FC}{\\u30B3\\u30FD}{\\u30B3\\u30FD\\u3099}{\\u30B3\\u30FE}]",
+ "[{\\u30FD\\u3099}{\\u309D\\u3099}{\\u3053\\u3099}{\\u30B3\\u3099}{lj}{nj}]",
+ "[\\u30FE\\u00e6]",
+ "[a]",
+ "[\\u3099]",
+ "[]"
+ }
+ };
+
+
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = NULL;
+ int32_t i = 0;
+ int32_t noConts = 0;
+ USet *conts = uset_open(0,0);
+ USet *exp = uset_open(0, 0);
+ USet *set = uset_open(0,0);
+ int32_t setBufferLen = 65536;
+ UChar buffer[65536];
+ int32_t setLen = 0;
+
+ for(i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
+ log_verbose("Testing locale: %s\n", tests[i].locale);
+ coll = ucol_open(tests[i].locale, &status);
+ ucol_getContractionsAndExpansions(coll, conts, exp, TRUE, &status);
+ doSetsTest(tests[i].locale, conts, set, tests[i].inConts, tests[i].outConts, &status);
+ setLen = uset_toPattern(conts, buffer, setBufferLen, TRUE, &status);
+ if(U_SUCCESS(status)) {
+ /*log_verbose("Contractions %i: %s\n", uset_getItemCount(conts), aescstrdup(buffer, setLen));*/
+ } else {
+ log_err("error %s. %i\n", u_errorName(status), setLen);
+ status = U_ZERO_ERROR;
+ }
+ doSetsTest(tests[i].locale, exp, set, tests[i].inExp, tests[i].outExp, &status);
+ setLen = uset_toPattern(exp, buffer, setBufferLen, TRUE, &status);
+ if(U_SUCCESS(status)) {
+ /*log_verbose("Expansions %i: %s\n", uset_getItemCount(exp), aescstrdup(buffer, setLen));*/
+ } else {
+ log_err("error %s. %i\n", u_errorName(status), setLen);
+ status = U_ZERO_ERROR;
+ }
+
+ noConts = ucol_getUnsafeSet(coll, conts, &status);
+ doSetsTest(tests[i].locale, conts, set, tests[i].unsafeCodeUnits, tests[i].safeCodeUnits, &status);
+ setLen = uset_toPattern(conts, buffer, setBufferLen, TRUE, &status);
+ if(U_SUCCESS(status)) {
+ log_verbose("Unsafe %i: %s\n", uset_getItemCount(exp), aescstrdup(buffer, setLen));
+ } else {
+ log_err("error %s. %i\n", u_errorName(status), setLen);
+ status = U_ZERO_ERROR;
+ }
+
+ ucol_close(coll);
+ }
+
+
+ uset_close(conts);
+ uset_close(exp);
+ uset_close(set);
+}
+
+static void
+TestOpenBinary(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ /*
+ char rule[] = "&h < d < c < b";
+ char *wUCA[] = { "a", "h", "d", "c", "b", "i" };
+ char *noUCA[] = {"d", "c", "b", "a", "h", "i" };
+ */
+ /* we have to use Cyrillic letters because latin-1 always gets copied */
+ const char rule[] = "&\\u0452 < \\u0434 < \\u0433 < \\u0432"; /* &dje < d < g < v */
+ const char *wUCA[] = { "\\u0430", "\\u0452", "\\u0434", "\\u0433", "\\u0432", "\\u0435" }; /* a, dje, d, g, v, e */
+ const char *noUCA[] = {"\\u0434", "\\u0433", "\\u0432", "\\u0430", "\\u0435", "\\u0452" }; /* d, g, v, a, e, dje */
+
+ UChar uRules[256];
+ int32_t uRulesLen = u_unescape(rule, uRules, 256);
+
+ UCollator *coll = ucol_openRules(uRules, uRulesLen, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
+ UCollator *UCA = ucol_open("root", &status);
+ UCollator *cloneNOUCA = NULL, *cloneWUCA = NULL;
+
+ uint8_t imageBuffer[32768];
+ uint8_t *image = imageBuffer;
+ int32_t imageBufferCapacity = 32768;
+
+ int32_t imageSize;
+
+ if((coll==NULL)||(UCA==NULL)||(U_FAILURE(status))) {
+ log_data_err("could not load collators or error occured: %s\n",
+ u_errorName(status));
+ return;
+ }
+ imageSize = ucol_cloneBinary(coll, image, imageBufferCapacity, &status);
+ if(U_FAILURE(status)) {
+ image = (uint8_t *)malloc(imageSize*sizeof(uint8_t));
+ status = U_ZERO_ERROR;
+ imageSize = ucol_cloneBinary(coll, imageBuffer, imageSize, &status);
+ }
+
+
+ cloneWUCA = ucol_openBinary(image, imageSize, UCA, &status);
+ cloneNOUCA = ucol_openBinary(image, imageSize, NULL, &status);
+
+ genericOrderingTest(coll, wUCA, sizeof(wUCA)/sizeof(wUCA[0]));
+
+ genericOrderingTest(cloneWUCA, wUCA, sizeof(wUCA)/sizeof(wUCA[0]));
+ genericOrderingTest(cloneNOUCA, noUCA, sizeof(noUCA)/sizeof(noUCA[0]));
+
+ if(image != imageBuffer) {
+ free(image);
+ }
+ ucol_close(coll);
+ ucol_close(cloneNOUCA);
+ ucol_close(cloneWUCA);
+ ucol_close(UCA);
+}
+
+static void TestDefault(void) {
+ /* Tests for code coverage. */
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("es@collation=pinyin", &status);
+ if (status != U_USING_DEFAULT_WARNING) {
+ /* What do you mean that you know about using pinyin collation in Spanish!? This should be in the zh locale. */
+ log_err("es@collation=pinyin should return U_USING_DEFAULT_WARNING, but returned %s\n", u_errorName(status));
+ }
+ ucol_close(coll);
+ if (ucol_getKeywordValues("funky", &status) != NULL) {
+ log_err("Collators should not know about the funky keyword.\n");
+ }
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("funky keyword didn't fail as expected %s\n", u_errorName(status));
+ }
+ if (ucol_getKeywordValues("collation", &status) != NULL) {
+ log_err("ucol_getKeywordValues should not work when given a bad status.\n");
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/capitst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/capitst.h
new file mode 100644
index 00000000000..49f8b7533c6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/capitst.h
@@ -0,0 +1,124 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CAPITEST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************
+*//* C API TEST For COLLATOR */
+
+#ifndef _CCOLLAPITST
+#define _CCOLLAPITST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+#include "callcoll.h"
+#define MAX_TOKEN_LEN 16
+
+
+ /**
+ * error reporting utility method
+ **/
+
+ static void doAssert(int condition, const char *message);
+ /**
+ * Collator Class Properties
+ * ctor, dtor, createInstance, compare, getStrength/setStrength
+ * getDecomposition/setDecomposition, getDisplayName
+ */
+ void TestProperty(void);
+ /**
+ * Test RuleBasedCollator and getRules
+ **/
+ void TestRuleBasedColl(void);
+
+ /**
+ * Test compare
+ **/
+ void TestCompare(void);
+ /**
+ * Test hashCode functionality
+ **/
+ void TestHashCode(void);
+ /**
+ * Tests the constructor and numerous other methods for CollationKey
+ **/
+ void TestSortKey(void);
+ /**
+ * test the CollationElementIterator methods
+ **/
+ void TestElemIter(void);
+ /**
+ * Test ucol_getAvailable and ucol_countAvailable()
+ **/
+ void TestGetAll(void);
+ /**
+ * Test ucol_GetDefaultRules ()
+ void TestGetDefaultRules(void);
+ **/
+
+ void TestDecomposition(void);
+ /**
+ * Test ucol_safeClone ()
+ **/
+ void TestSafeClone(void);
+
+ /**
+ * Test ucol_cloneBinary(), ucol_openBinary()
+ **/
+ void TestCloneBinary(void);
+
+ /**
+ * Test getting bounds for a sortkey
+ */
+ void TestBounds(void);
+
+ /**
+ * Test ucol_getLocale function
+ */
+ void TestGetLocale(void);
+
+ /**
+ * Test buffer overrun while having smaller buffer for sortkey (j1865)
+ */
+ void TestSortKeyBufferOverrun(void);
+ /**
+ * Test getting and setting of attributes
+ */
+ void TestGetSetAttr(void);
+ /**
+ * Test getTailoredSet
+ */
+ void TestGetTailoredSet(void);
+
+ /**
+ * Test mergeSortKeys
+ */
+ void TestMergeSortKeys(void);
+
+ /**
+ * test short string and collator identifier functions
+ */
+ static void TestShortString(void);
+
+ /**
+ * test getContractions and getUnsafeSet
+ */
+ static void TestGetContractionsAndUnsafes(void);
+
+ /**
+ * Test funny stuff with open binary
+ */
+ static void TestOpenBinary(void);
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.c
new file mode 100644
index 00000000000..fe597ae1857
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.c
@@ -0,0 +1,708 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CBIAPTS.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************/
+/*C API TEST FOR BREAKITERATOR */
+/**
+* This is an API test. It doesn't test very many cases, and doesn't
+* try to test the full functionality. It just calls each function in the class and
+* verifies that it works on a basic level.
+**/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/uloc.h"
+#include "unicode/ubrk.h"
+#include "unicode/ustring.h"
+#include "unicode/ucnv.h"
+#include "unicode/utext.h"
+#include "cintltst.h"
+#include "cbiapts.h"
+
+#define TEST_ASSERT_SUCCESS(status) {if (U_FAILURE(status)) { \
+log_err("Failure at file %s, line %d, error = %s\n", __FILE__, __LINE__, u_errorName(status));}}
+
+#define TEST_ASSERT(expr) {if ((expr)==FALSE) { \
+log_err("Test Failure at file %s, line %d\n", __FILE__, __LINE__);}}
+
+static void TestBreakIteratorSafeClone(void);
+static void TestBreakIteratorRules(void);
+static void TestBreakIteratorRuleError(void);
+static void TestBreakIteratorStatusVec(void);
+static void TestBreakIteratorUText(void);
+
+void addBrkIterAPITest(TestNode** root);
+
+void addBrkIterAPITest(TestNode** root)
+{
+ addTest(root, &TestBreakIteratorCAPI, "tstxtbd/cbiapts/TestBreakIteratorCAPI");
+ addTest(root, &TestBreakIteratorSafeClone, "tstxtbd/cbiapts/TestBreakIteratorSafeClone");
+ addTest(root, &TestBreakIteratorRules, "tstxtbd/cbiapts/TestBreakIteratorRules");
+ addTest(root, &TestBreakIteratorRuleError, "tstxtbd/cbiapts/TestBreakIteratorRuleError");
+ addTest(root, &TestBreakIteratorStatusVec, "tstxtbd/cbiapts/TestBreakIteratorStatusVec");
+ addTest(root, &TestBreakIteratorUText, "tstxtbd/cbiapts/TestBreakIteratorUText");
+}
+
+#define CLONETEST_ITERATOR_COUNT 2
+
+/*
+ * Utility function for converting char * to UChar * strings, to
+ * simplify the test code. Converted strings are put in heap allocated
+ * storage. A hook (probably a local in the caller's code) allows all
+ * strings converted with that hook to be freed with a single call.
+ */
+typedef struct StringStruct {
+ struct StringStruct *link;
+ UChar str[1];
+ } StringStruct;
+
+
+static UChar* toUChar(const char *src, void **freeHook) {
+ /* Structure of the memory that we allocate on the heap */
+
+ int32_t numUChars;
+ int32_t destSize;
+ UChar stackBuf[2000 + sizeof(void *)/sizeof(UChar)];
+ StringStruct *dest;
+ UConverter *cnv;
+
+ UErrorCode status = U_ZERO_ERROR;
+ if (src == NULL) {
+ return NULL;
+ };
+
+ cnv = ucnv_open(NULL, &status);
+ if(U_FAILURE(status) || cnv == NULL) {
+ return NULL;
+ }
+ ucnv_reset(cnv);
+ numUChars = ucnv_toUChars(cnv,
+ stackBuf,
+ 2000,
+ src, -1,
+ &status);
+
+ destSize = (numUChars+1) * sizeof(UChar) + sizeof(struct StringStruct);
+ dest = (StringStruct *)malloc(destSize);
+ if (dest != NULL) {
+ if (status == U_BUFFER_OVERFLOW_ERROR || status == U_STRING_NOT_TERMINATED_WARNING) {
+ ucnv_toUChars(cnv, dest->str, numUChars+1, src, -1, &status);
+ } else if (status == U_ZERO_ERROR) {
+ u_strcpy(dest->str, stackBuf);
+ } else {
+ free(dest);
+ dest = NULL;
+ }
+ }
+
+ ucnv_reset(cnv); /* be good citizens */
+ ucnv_close(cnv);
+ if (dest == NULL) {
+ return NULL;
+ }
+
+ dest->link = (StringStruct*)(*freeHook);
+ *freeHook = dest;
+ return dest->str;
+}
+
+static void freeToUCharStrings(void **hook) {
+ StringStruct *s = *(StringStruct **)hook;
+ while (s != NULL) {
+ StringStruct *next = s->link;
+ free(s);
+ s = next;
+ }
+}
+
+
+static void TestBreakIteratorCAPI()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UBreakIterator *word, *sentence, *line, *character, *b, *bogus;
+ int32_t start,pos,end,to;
+ int32_t i;
+ int32_t count = 0;
+
+ UChar text[50];
+
+ /* Note: the adjacent "" are concatenating strings, not adding a \" to the
+ string, which is probably what whoever wrote this intended. Don't fix,
+ because it would throw off the hard coded break positions in the following
+ tests. */
+ u_uastrcpy(text, "He's from Africa. ""Mr. Livingston, I presume?"" Yeah");
+
+
+/*test ubrk_open()*/
+ log_verbose("\nTesting BreakIterator open functions\n");
+
+ /* Use french for fun */
+ word = ubrk_open(UBRK_WORD, "en_US", text, u_strlen(text), &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Check your data - it doesn't seem to be around\n");
+ return;
+ } else if(U_FAILURE(status)){
+ log_err("FAIL: Error in ubrk_open() for word breakiterator: %s\n", myErrorName(status));
+ }
+ else{
+ log_verbose("PASS: Successfully opened word breakiterator\n");
+ }
+
+ sentence = ubrk_open(UBRK_SENTENCE, "en_US", text, u_strlen(text), &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: Error in ubrk_open() for sentence breakiterator: %s\n", myErrorName(status));
+ return;
+ }
+ else{
+ log_verbose("PASS: Successfully opened sentence breakiterator\n");
+ }
+
+ line = ubrk_open(UBRK_LINE, "en_US", text, u_strlen(text), &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: Error in ubrk_open() for line breakiterator: %s\n", myErrorName(status));
+ return;
+ }
+ else{
+ log_verbose("PASS: Successfully opened line breakiterator\n");
+ }
+
+ character = ubrk_open(UBRK_CHARACTER, "en_US", text, u_strlen(text), &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: Error in ubrk_open() for character breakiterator: %s\n", myErrorName(status));
+ return;
+ }
+ else{
+ log_verbose("PASS: Successfully opened character breakiterator\n");
+ }
+ /*trying to open an illegal iterator*/
+ bogus = ubrk_open((UBreakIteratorType)5, "en_US", text, u_strlen(text), &status);
+ if(U_SUCCESS(status)){
+ log_err("FAIL: Error in ubrk_open() for BOGUS breakiterator. Expected U_ILLEGAL_ARGUMENT_ERROR\n");
+ }
+ if(U_FAILURE(status)){
+ if(status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("FAIL: Error in ubrk_open() for BOGUS breakiterator. Expected U_ILLEGAL_ARGUMENT_ERROR\n Got %s\n", myErrorName(status));
+ }
+ }
+ status=U_ZERO_ERROR;
+
+
+/* ======= Test ubrk_countAvialable() and ubrk_getAvialable() */
+
+ log_verbose("\nTesting ubrk_countAvailable() and ubrk_getAvailable()\n");
+ count=ubrk_countAvailable();
+ /* use something sensible w/o hardcoding the count */
+ if(count < 0){
+ log_err("FAIL: Error in ubrk_countAvialable() returned %d\n", count);
+ }
+ else{
+ log_verbose("PASS: ubrk_countAvialable() successful returned %d\n", count);
+ }
+ for(i=0;i<count;i++)
+ {
+ log_verbose("%s\n", ubrk_getAvailable(i));
+ if (ubrk_getAvailable(i) == 0)
+ log_err("No locale for which breakiterator is applicable\n");
+ else
+ log_verbose("A locale %s for which breakiterator is applicable\n",ubrk_getAvailable(i));
+ }
+
+/*========Test ubrk_first(), ubrk_last()...... and other functions*/
+
+ log_verbose("\nTesting the functions for word\n");
+ start = ubrk_first(word);
+ if(start!=0)
+ log_err("error ubrk_start(word) did not return 0\n");
+ log_verbose("first (word = %d\n", (int32_t)start);
+ pos=ubrk_next(word);
+ if(pos!=4)
+ log_err("error ubrk_next(word) did not return 4\n");
+ log_verbose("next (word = %d\n", (int32_t)pos);
+ pos=ubrk_following(word, 4);
+ if(pos!=5)
+ log_err("error ubrl_following(word,4) did not return 6\n");
+ log_verbose("next (word = %d\n", (int32_t)pos);
+ end=ubrk_last(word);
+ if(end!=49)
+ log_err("error ubrk_last(word) did not return 49\n");
+ log_verbose("last (word = %d\n", (int32_t)end);
+
+ pos=ubrk_previous(word);
+ log_verbose("%d %d\n", end, pos);
+
+ pos=ubrk_previous(word);
+ log_verbose("%d \n", pos);
+
+ if (ubrk_isBoundary(word, 2) != FALSE) {
+ log_err("error ubrk_isBoundary(word, 2) did not return FALSE\n");
+ }
+ pos=ubrk_current(word);
+ if (pos != 4) {
+ log_err("error ubrk_current() != 4 after ubrk_isBoundary(word, 2)\n");
+ }
+ if (ubrk_isBoundary(word, 4) != TRUE) {
+ log_err("error ubrk_isBoundary(word, 4) did not return TRUE\n");
+ }
+
+
+
+ log_verbose("\nTesting the functions for character\n");
+ ubrk_first(character);
+ pos = ubrk_following(character, 5);
+ if(pos!=6)
+ log_err("error ubrk_following(character,5) did not return 6\n");
+ log_verbose("Following (character,5) = %d\n", (int32_t)pos);
+ pos=ubrk_following(character, 18);
+ if(pos!=19)
+ log_err("error ubrk_following(character,18) did not return 19\n");
+ log_verbose("Followingcharacter,18) = %d\n", (int32_t)pos);
+ pos=ubrk_preceding(character, 22);
+ if(pos!=21)
+ log_err("error ubrk_preceding(character,22) did not return 21\n");
+ log_verbose("preceding(character,22) = %d\n", (int32_t)pos);
+
+
+ log_verbose("\nTesting the functions for line\n");
+ pos=ubrk_first(line);
+ if(pos != 0)
+ log_err("error ubrk_first(line) returned %d, expected 0\n", (int32_t)pos);
+ pos = ubrk_next(line);
+ pos=ubrk_following(line, 18);
+ if(pos!=22)
+ log_err("error ubrk_following(line) did not return 22\n");
+ log_verbose("following (line) = %d\n", (int32_t)pos);
+
+
+ log_verbose("\nTesting the functions for sentence\n");
+ ubrk_first(sentence);
+ pos = ubrk_current(sentence);
+ log_verbose("Current(sentence) = %d\n", (int32_t)pos);
+ pos = ubrk_last(sentence);
+ if(pos!=49)
+ log_err("error ubrk_last for sentence did not return 49\n");
+ log_verbose("Last (sentence) = %d\n", (int32_t)pos);
+ ubrk_first(sentence);
+ to = ubrk_following( sentence, 0 );
+ if (to == 0) log_err("ubrk_following returned 0\n");
+ to = ubrk_preceding( sentence, to );
+ if (to != 0) log_err("ubrk_preceding didn't return 0\n");
+ if (ubrk_first(sentence)!=ubrk_current(sentence)) {
+ log_err("error in ubrk_first() or ubrk_current()\n");
+ }
+
+
+ /*---- */
+ /*Testing ubrk_open and ubrk_close()*/
+ log_verbose("\nTesting open and close for us locale\n");
+ b = ubrk_open(UBRK_WORD, "fr_FR", text, u_strlen(text), &status);
+ if (U_FAILURE(status)) {
+ log_err("ubrk_open for word returned NULL: %s\n", myErrorName(status));
+ }
+ ubrk_close(b);
+
+ /* Test setText and setUText */
+ {
+ UChar s1[] = {0x41, 0x42, 0x20, 0};
+ UChar s2[] = {0x41, 0x42, 0x43, 0x44, 0x45, 0};
+ UText *ut = NULL;
+ UBreakIterator *bb;
+ int j;
+
+ log_verbose("\nTesting ubrk_setText() and ubrk_setUText()\n");
+ status = U_ZERO_ERROR;
+ bb = ubrk_open(UBRK_WORD, "en_US", NULL, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ ubrk_setText(bb, s1, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+ ubrk_first(bb);
+ j = ubrk_next(bb);
+ TEST_ASSERT(j == 2);
+ ut = utext_openUChars(ut, s2, -1, &status);
+ ubrk_setUText(bb, ut, &status);
+ TEST_ASSERT_SUCCESS(status);
+ j = ubrk_next(bb);
+ TEST_ASSERT(j == 5);
+
+ ubrk_close(bb);
+ utext_close(ut);
+ }
+
+ ubrk_close(word);
+ ubrk_close(sentence);
+ ubrk_close(line);
+ ubrk_close(character);
+}
+
+static void TestBreakIteratorSafeClone(void)
+{
+ UChar text[51]; /* Keep this odd to test for 64-bit memory alignment */
+ /* NOTE: This doesn't reliably force mis-alignment of following items. */
+ uint8_t buffer [CLONETEST_ITERATOR_COUNT] [U_BRK_SAFECLONE_BUFFERSIZE];
+ int32_t bufferSize = U_BRK_SAFECLONE_BUFFERSIZE;
+
+ UBreakIterator * someIterators [CLONETEST_ITERATOR_COUNT];
+ UBreakIterator * someClonedIterators [CLONETEST_ITERATOR_COUNT];
+
+ UBreakIterator * brk;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t start,pos;
+ int32_t i;
+
+ /*Testing ubrk_safeClone */
+
+ /* Note: the adjacent "" are concatenating strings, not adding a \" to the
+ string, which is probably what whoever wrote this intended. Don't fix,
+ because it would throw off the hard coded break positions in the following
+ tests. */
+ u_uastrcpy(text, "He's from Africa. ""Mr. Livingston, I presume?"" Yeah");
+
+ /* US & Thai - rule-based & dictionary based */
+ someIterators[0] = ubrk_open(UBRK_WORD, "en_US", text, u_strlen(text), &status);
+ if(!someIterators[0] || U_FAILURE(status)) {
+ log_data_err("Couldn't open en_US word break iterator - %s\n", u_errorName(status));
+ return;
+ }
+
+ someIterators[1] = ubrk_open(UBRK_WORD, "th_TH", text, u_strlen(text), &status);
+ if(!someIterators[1] || U_FAILURE(status)) {
+ log_data_err("Couldn't open th_TH word break iterator - %s\n", u_errorName(status));
+ return;
+ }
+
+ /* test each type of iterator */
+ for (i = 0; i < CLONETEST_ITERATOR_COUNT; i++)
+ {
+
+ /* Check the various error & informational states */
+
+ /* Null status - just returns NULL */
+ if (0 != ubrk_safeClone(someIterators[i], buffer[i], &bufferSize, 0))
+ {
+ log_err("FAIL: Cloned Iterator failed to deal correctly with null status\n");
+ }
+ /* error status - should return 0 & keep error the same */
+ status = U_MEMORY_ALLOCATION_ERROR;
+ if (0 != ubrk_safeClone(someIterators[i], buffer[i], &bufferSize, &status) || status != U_MEMORY_ALLOCATION_ERROR)
+ {
+ log_err("FAIL: Cloned Iterator failed to deal correctly with incoming error status\n");
+ }
+ status = U_ZERO_ERROR;
+
+ /* Null buffer size pointer - just returns NULL & set error to U_ILLEGAL_ARGUMENT_ERROR*/
+ if (0 != ubrk_safeClone(someIterators[i], buffer[i], 0, &status) || status != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("FAIL: Cloned Iterator failed to deal correctly with null bufferSize pointer\n");
+ }
+ status = U_ZERO_ERROR;
+
+ /* buffer size pointer is 0 - fill in pbufferSize with a size */
+ bufferSize = 0;
+ if (0 != ubrk_safeClone(someIterators[i], buffer[i], &bufferSize, &status) || U_FAILURE(status) || bufferSize <= 0)
+ {
+ log_err("FAIL: Cloned Iterator failed a sizing request ('preflighting')\n");
+ }
+ /* Verify our define is large enough */
+ if (U_BRK_SAFECLONE_BUFFERSIZE < bufferSize)
+ {
+ log_err("FAIL: Pre-calculated buffer size is too small\n");
+ }
+ /* Verify we can use this run-time calculated size */
+ if (0 == (brk = ubrk_safeClone(someIterators[i], buffer[i], &bufferSize, &status)) || U_FAILURE(status))
+ {
+ log_err("FAIL: Iterator can't be cloned with run-time size\n");
+ }
+ if (brk)
+ ubrk_close(brk);
+ /* size one byte too small - should allocate & let us know */
+ --bufferSize;
+ if (0 == (brk = ubrk_safeClone(someIterators[i], 0, &bufferSize, &status)) || status != U_SAFECLONE_ALLOCATED_WARNING)
+ {
+ log_err("FAIL: Cloned Iterator failed to deal correctly with too-small buffer size\n");
+ }
+ if (brk)
+ ubrk_close(brk);
+ status = U_ZERO_ERROR;
+ bufferSize = U_BRK_SAFECLONE_BUFFERSIZE;
+
+ /* Null buffer pointer - return Iterator & set error to U_SAFECLONE_ALLOCATED_ERROR */
+ if (0 == (brk = ubrk_safeClone(someIterators[i], 0, &bufferSize, &status)) || status != U_SAFECLONE_ALLOCATED_WARNING)
+ {
+ log_err("FAIL: Cloned Iterator failed to deal correctly with null buffer pointer\n");
+ }
+ if (brk)
+ ubrk_close(brk);
+ status = U_ZERO_ERROR;
+
+ /* Mis-aligned buffer pointer. */
+ {
+ char stackBuf[U_BRK_SAFECLONE_BUFFERSIZE+sizeof(void *)];
+ void *p;
+ int32_t offset;
+
+ brk = ubrk_safeClone(someIterators[i], &stackBuf[1], &bufferSize, &status);
+ if (U_FAILURE(status) || brk == 0) {
+ log_err("FAIL: Cloned Iterator failed with misaligned buffer pointer\n");
+ }
+ if (status == U_SAFECLONE_ALLOCATED_WARNING) {
+ log_err("FAIL: Cloned Iterator allocated when using a mis-aligned buffer.\n");
+ }
+ offset = (int32_t)((char *)&p-(char*)brk);
+ if (offset < 0) {
+ offset = -offset;
+ }
+ if (offset % sizeof(void *) != 0) {
+ log_err("FAIL: Cloned Iterator failed to align correctly with misaligned buffer pointer\n");
+ }
+ if (brk)
+ ubrk_close(brk);
+ }
+
+
+ /* Null Iterator - return NULL & set U_ILLEGAL_ARGUMENT_ERROR */
+ if (0 != ubrk_safeClone(0, buffer[i], &bufferSize, &status) || status != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("FAIL: Cloned Iterator failed to deal correctly with null Iterator pointer\n");
+ }
+ status = U_ZERO_ERROR;
+
+ /* Do these cloned Iterators work at all - make a first & next call */
+ bufferSize = U_BRK_SAFECLONE_BUFFERSIZE;
+ someClonedIterators[i] = ubrk_safeClone(someIterators[i], buffer[i], &bufferSize, &status);
+
+ start = ubrk_first(someClonedIterators[i]);
+ if(start!=0)
+ log_err("error ubrk_start(clone) did not return 0\n");
+ pos=ubrk_next(someClonedIterators[i]);
+ if(pos!=4)
+ log_err("error ubrk_next(clone) did not return 4\n");
+
+ ubrk_close(someClonedIterators[i]);
+ ubrk_close(someIterators[i]);
+ }
+}
+
+
+/*
+// Open a break iterator from char * rules. Take care of conversion
+// of the rules and error checking.
+*/
+static UBreakIterator * testOpenRules(char *rules) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *ruleSourceU = NULL;
+ void *strCleanUp = NULL;
+ UParseError parseErr;
+ UBreakIterator *bi;
+
+ ruleSourceU = toUChar(rules, &strCleanUp);
+
+ bi = ubrk_openRules(ruleSourceU, -1, /* The rules */
+ NULL, -1, /* The text to be iterated over. */
+ &parseErr, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("FAIL: ubrk_openRules: ICU Error \"%s\"\n", u_errorName(status));
+ bi = 0;
+ };
+ freeToUCharStrings(&strCleanUp);
+ return bi;
+
+}
+
+/*
+ * TestBreakIteratorRules - Verify that a break iterator can be created from
+ * a set of source rules.
+ */
+static void TestBreakIteratorRules() {
+ /* Rules will keep together any run of letters not including 'a', OR
+ * keep together 'abc', but only when followed by 'def', OTHERWISE
+ * just return one char at a time.
+ */
+ char rules[] = "abc{666}/def;\n [\\p{L} - [a]]* {2}; . {1};";
+ /* 0123456789012345678 */
+ char data[] = "abcdex abcdefgh-def"; /* the test data string */
+ char breaks[] = "** ** * ** *"; /* * the expected break positions */
+ char tags[] = "01 21 6 21 2"; /* expected tag values at break positions */
+ int32_t tagMap[] = {0, 1, 2, 3, 4, 5, 666};
+
+ UChar *uData;
+ void *freeHook = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t pos;
+ int i;
+
+ UBreakIterator *bi = testOpenRules(rules);
+ if (bi == NULL) {return;}
+ uData = toUChar(data, &freeHook);
+ ubrk_setText(bi, uData, -1, &status);
+
+ pos = ubrk_first(bi);
+ for (i=0; i<sizeof(breaks); i++) {
+ if (pos == i && breaks[i] != '*') {
+ log_err("FAIL: unexpected break at position %d found\n", pos);
+ break;
+ }
+ if (pos != i && breaks[i] == '*') {
+ log_err("FAIL: expected break at position %d not found.\n", i);
+ break;
+ }
+ if (pos == i) {
+ int32_t tag, expectedTag;
+ tag = ubrk_getRuleStatus(bi);
+ expectedTag = tagMap[tags[i]&0xf];
+ if (tag != expectedTag) {
+ log_err("FAIL: incorrect tag value. Position = %d; expected tag %d, got %d",
+ pos, expectedTag, tag);
+ break;
+ }
+ pos = ubrk_next(bi);
+ }
+ }
+
+ freeToUCharStrings(&freeHook);
+ ubrk_close(bi);
+}
+
+static void TestBreakIteratorRuleError() {
+/*
+ * TestBreakIteratorRuleError - Try to create a BI from rules with syntax errors,
+ * check that the error is reported correctly.
+ */
+ char rules[] = " # This is a rule comment on line 1\n"
+ "[:L:]; # this rule is OK.\n"
+ "abcdefg); # Error, mismatched parens\n";
+ UChar *uRules;
+ void *freeHook = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseErr;
+ UBreakIterator *bi;
+
+ uRules = toUChar(rules, &freeHook);
+ bi = ubrk_openRules(uRules, -1, /* The rules */
+ NULL, -1, /* The text to be iterated over. */
+ &parseErr, &status);
+ if (U_SUCCESS(status)) {
+ log_err("FAIL: construction of break iterator succeeded when it should have failed.\n");
+ ubrk_close(bi);
+ } else {
+ if (parseErr.line != 3 || parseErr.offset != 8) {
+ log_err("FAIL: incorrect error position reported. Got line %d, char %d, expected line 3, char 7",
+ parseErr.line, parseErr.offset);
+ }
+ }
+ freeToUCharStrings(&freeHook);
+}
+
+
+/*
+* TestsBreakIteratorStatusVals() Test the ubrk_getRuleStatusVec() funciton
+*/
+static void TestBreakIteratorStatusVec() {
+ #define RULE_STRING_LENGTH 200
+ UChar rules[RULE_STRING_LENGTH];
+
+ #define TEST_STRING_LENGTH 25
+ UChar testString[TEST_STRING_LENGTH];
+ UBreakIterator *bi = NULL;
+ int32_t pos = 0;
+ int32_t vals[10];
+ int32_t numVals;
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_uastrncpy(rules, "[A-N]{100}; \n"
+ "[a-w]{200}; \n"
+ "[\\p{L}]{300}; \n"
+ "[\\p{N}]{400}; \n"
+ "[0-5]{500}; \n"
+ "!.*;\n", RULE_STRING_LENGTH);
+ u_uastrncpy(testString, "ABC", TEST_STRING_LENGTH);
+
+
+ bi = ubrk_openRules(rules, -1, testString, -1, NULL, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(bi != NULL);
+
+ /* The TEST_ASSERT above should change too... */
+ if (bi != NULL) {
+ pos = ubrk_next(bi);
+ TEST_ASSERT(pos == 1);
+
+ memset(vals, -1, sizeof(vals));
+ numVals = ubrk_getRuleStatusVec(bi, vals, 10, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numVals == 2);
+ TEST_ASSERT(vals[0] == 100);
+ TEST_ASSERT(vals[1] == 300);
+ TEST_ASSERT(vals[2] == -1);
+
+ numVals = ubrk_getRuleStatusVec(bi, vals, 0, &status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(numVals == 2);
+ }
+
+ ubrk_close(bi);
+}
+
+
+/*
+ * static void TestBreakIteratorUText(void);
+ *
+ * Test that ubrk_setUText() is present and works for a simple case.
+ */
+static void TestBreakIteratorUText(void) {
+ const char *UTF8Str = "\x41\xc3\x85\x5A\x20\x41\x52\x69\x6E\x67"; /* c3 85 is utf-8 for A with a ring on top */
+ /* 0 1 2 34567890 */
+
+ UErrorCode status = U_ZERO_ERROR;
+ UBreakIterator *bi = NULL;
+ int32_t pos = 0;
+
+
+ UText *ut = utext_openUTF8(NULL, UTF8Str, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ bi = ubrk_open(UBRK_WORD, "en_US", NULL, 0, &status);
+ if (U_FAILURE(status)) {
+ log_err("Failure at file %s, line %d, error = %s\n", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+
+ ubrk_setUText(bi, ut, &status);
+ if (U_FAILURE(status)) {
+ log_err("Failure at file %s, line %d, error = %s\n", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+
+ pos = ubrk_first(bi);
+ TEST_ASSERT(pos == 0);
+
+ pos = ubrk_next(bi);
+ TEST_ASSERT(pos == 4);
+
+ pos = ubrk_next(bi);
+ TEST_ASSERT(pos == 5);
+
+ pos = ubrk_next(bi);
+ TEST_ASSERT(pos == 10);
+
+ pos = ubrk_next(bi);
+ TEST_ASSERT(pos == UBRK_DONE);
+ ubrk_close(bi);
+ utext_close(ut);
+}
+
+
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.h
new file mode 100644
index 00000000000..ea6769fcf08
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiapts.h
@@ -0,0 +1,35 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CBIAPTS.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************/
+/* C API TEST FOR BREAKITERATOR */
+
+#ifndef _CBRKITRAPITST
+#define _CBRKITRAPITST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "cintltst.h"
+
+/**
+* This is an API test. It doesn't test very many cases, and doesn't
+* try to test the full functionality. It just calls each function in the class and
+* verifies that it works on a basic level.
+**/
+/* The function used to test the BreakIterator API*/
+static void TestBreakIteratorCAPI(void);
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cbididat.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cbididat.c
new file mode 100644
index 00000000000..a73f3a74655
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cbididat.c
@@ -0,0 +1,434 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/* file name: cbididat.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 1999sep22
+* created by: Markus W. Scherer
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/ubidi.h"
+#include "cbiditst.h"
+
+const char * const
+dirPropNames[U_CHAR_DIRECTION_COUNT]={
+ "L", "R", "EN", "ES", "ET", "AN", "CS", "B", "S", "WS", "ON",
+ "LRE", "LRO", "AL", "RLE", "RLO", "PDF", "NSM", "BN"
+};
+
+UChar
+charFromDirProp[U_CHAR_DIRECTION_COUNT]={
+ /* L R EN ES ET AN CS B S WS ON */
+ 0x61, 0x5d0, 0x30, 0x2f, 0x25, 0x660, 0x2c, 0xa, 0x9, 0x20, 0x26,
+ /* LRE LRO AL RLE RLO PDF NSM BN */
+ 0x202a, 0x202d, 0x627, 0x202b, 0x202e, 0x202c, 0x308, 0x200c
+};
+
+static const uint8_t
+testText1[]={
+ L, L, WS, L, WS, EN, L, B
+};
+
+static const UBiDiLevel
+testLevels1[]={
+ 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static const uint8_t
+testVisualMap1[]={
+ 0, 1, 2, 3, 4, 5, 6, 7
+};
+
+static const uint8_t
+testText2[]={
+ R, AL, WS, R, AL, WS, R
+};
+
+static const UBiDiLevel
+testLevels2[]={
+ 1, 1, 1, 1, 1, 1, 1
+};
+
+static const uint8_t
+testVisualMap2[]={
+ 6, 5, 4, 3, 2, 1, 0
+};
+
+static const uint8_t
+testText3[]={
+ L, L, WS, EN, CS, WS, EN, CS, EN, WS, L, L
+};
+
+static const UBiDiLevel
+testLevels3[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static const uint8_t
+testVisualMap3[]={
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
+};
+
+static const uint8_t
+testText4[]={
+ L, AL, AL, AL, L, AL, AL, L, WS, EN, CS, WS, EN, CS, EN, WS, L, L
+};
+
+static const UBiDiLevel
+testLevels4[]={
+ 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static const uint8_t
+testVisualMap4[]={
+ 0, 3, 2, 1, 4, 6, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
+};
+
+static const uint8_t
+testText5[]={
+ AL, R, AL, WS, EN, CS, WS, EN, CS, EN, WS, R, R, WS, L, L
+};
+
+static const UBiDiLevel
+testLevels5[]={
+ 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2
+};
+
+static const uint8_t
+testVisualMap5[]={
+ 15, 14, 13, 12, 11, 10, 9, 6, 7, 8, 5, 4, 3, 2, 0, 1
+};
+
+static const uint8_t
+testText6[]={
+ R, EN, NSM, ET
+};
+
+static const UBiDiLevel
+testLevels6[]={
+ 1, 2, 2, 2
+};
+
+static const uint8_t
+testVisualMap6[]={
+ 3, 0, 1, 2
+};
+
+#if 0
+static const uint8_t
+testText7[]={
+ /* empty */
+};
+
+static const UBiDiLevel
+testLevels7[]={
+};
+
+static const uint8_t
+testVisualMap7[]={
+};
+
+#endif
+
+static const uint8_t
+testText8[]={
+ RLE, WS, R, R, R, WS, PDF, WS, B
+};
+
+static const UBiDiLevel
+testLevels8[]={
+ 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+static const uint8_t
+testVisualMap8[]={
+ 8, 7, 6, 5, 4, 3, 2, 1, 0
+};
+
+static const uint8_t
+testText9[]={
+ LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE,
+ LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE,
+ AN, RLO, NSM, LRE, PDF, RLE, ES, EN, ON
+};
+
+static const UBiDiLevel
+testLevels9[]={
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 61, 61
+};
+
+static const uint8_t
+testVisualMap9[]={
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 7, 6, 5, 4, 3, 2, 1, 0
+};
+
+static const uint8_t
+testText10[]={
+ LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE,
+ LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE, LRE,
+ LRE, BN, CS, RLO, S, PDF, EN, LRO, AN, ES
+};
+
+static const UBiDiLevel
+testLevels10[]={
+ 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 0, 0, 62, 62, 62, 62, 60
+};
+
+static const uint8_t
+testVisualMap10[]={
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39
+};
+
+static const uint8_t
+testText11[]={
+ S, WS, NSM, RLE, WS, L, L, L, WS, LRO, WS, R, R, R, WS, RLO, WS, L, L,
+ L, WS, LRE, WS, R, R, R, WS, PDF, WS, L, L, L, WS, PDF, WS,
+ AL, AL, AL, WS, PDF, WS, L, L, L, WS, PDF, WS, L, L, L, WS, PDF,
+ ON, PDF, BN, BN, ON, PDF
+};
+
+static const UBiDiLevel
+testLevels11[]={
+ 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static const uint8_t
+testVisualMap11[]={
+ 0, 1, 2, 44, 43, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 31, 30, 29, 28, 27, 26, 20, 21, 24, 23, 22, 25, 19, 18, 17, 16, 15, 14, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 3, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
+};
+
+static const uint8_t
+testText12[]={
+ NSM, WS, L, L, L, L, L, L, L, WS, L, L, L, L, WS,
+ R, R, R, R, R, WS, L, L, L, L, L, L, L, WS, WS, AL,
+ AL, AL, AL, WS, EN, EN, ES, EN, EN, CS, S, EN, EN, CS, WS,
+ EN, EN, WS, AL, AL, AL, AL, AL, B, L, L, L, L, L, L,
+ L, L, WS, AN, AN, CS, AN, AN, WS
+};
+
+static const UBiDiLevel
+testLevels12[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0
+};
+
+static const uint8_t
+testVisualMap12[]={
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 19, 18, 17, 16, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 39, 38, 37, 36, 34, 35, 33, 31, 32, 30, 41, 52, 53, 51, 50, 48, 49, 47, 46, 45, 44, 43, 42, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
+};
+
+static const UBiDiLevel
+testLevels13[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0
+};
+
+static const uint8_t
+testVisualMap13[]={
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 19, 18, 17, 16, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 39, 38, 37, 36, 34, 35, 33, 31, 32, 30, 41, 52, 53, 51, 50, 48, 49, 47, 46, 45, 44, 43, 42, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
+};
+
+static const UBiDiLevel
+testLevels14[]={
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 2, 4, 4, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2
+};
+
+static const uint8_t
+testVisualMap14[]={
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 19, 18, 17, 16, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 39, 38, 37, 36, 34, 35, 33, 31, 32, 30, 41, 52, 53, 51, 50, 48, 49, 47, 46, 45, 44, 43, 42, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
+};
+
+static const UBiDiLevel
+testLevels15[]={
+ 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5, 6, 6, 5, 5, 6, 6, 5, 5, 6, 6, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5
+};
+
+static const uint8_t
+testVisualMap15[]={
+ 69, 68, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 55, 54, 53, 52, 51, 50, 49, 42, 43, 44, 45, 46, 47, 48, 41, 40, 39, 38, 37, 36, 35, 33, 34, 32, 30, 31, 29, 28, 26, 27, 25, 24, 22, 23, 21, 20, 19, 18, 17, 16, 15, 7, 8, 9, 10, 11, 12, 13, 14, 6, 1, 2, 3, 4, 5, 0
+};
+
+static const UBiDiLevel
+testLevels16[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0
+};
+
+static const uint8_t
+testVisualMap16[]={
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 19, 18, 17, 16, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 39, 38, 37, 36, 34, 35, 33, 31, 32, 30, 41, 52, 53, 51, 50, 48, 49, 47, 46, 45, 44, 43, 42, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
+};
+
+static const uint8_t
+testText13[]={
+ ON, L, RLO, CS, R, WS, AN, AN, PDF, LRE, R, L, LRO, WS, BN, ON, S, LRE, LRO, B
+};
+
+static const UBiDiLevel
+testLevels17[]={
+ 0, 0, 1, 1, 1, 1, 1, 1, 3, 3, 3, 2, 4, 4, 4, 4, 0, 0, 0, 0
+};
+
+static const uint8_t
+testVisualMap17[]={
+ 0, 1, 15, 14, 13, 12, 11, 10, 4, 3, 2, 5, 6, 7, 8, 9, 16, 17, 18, 19
+};
+
+static const UBiDiLevel
+testLevels18[]={
+ 0, 0, 1, 1, 1, 0
+};
+
+static const uint8_t
+testVisualMap18[]={
+ 0, 1, 4, 3, 2, 5
+};
+
+static const uint8_t
+testText14[]={
+ RLO, RLO, AL, AL, WS, EN, ES, ON, WS, S, S, PDF, LRO, WS, AL, ET, RLE, ON, EN, B
+};
+
+static const UBiDiLevel
+testLevels19[]={
+ 1
+};
+
+static const uint8_t
+testVisualMap19[]={
+ 0
+};
+
+static const uint8_t
+testText15[]={
+ R, L, CS, L
+};
+
+static const UBiDiLevel
+testLevels20[]={
+ 2
+};
+
+static const uint8_t
+testText16[]={
+ L, L, L, WS, L, L, L, WS, L, L, L
+};
+
+static const UBiDiLevel
+testLevels21[]={
+ 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+static const uint8_t
+testVisualMap20[]={
+ 1, 2, 3, 4, 5, 6, 7, 0
+};
+
+static const uint8_t
+testText17[]={
+ R, R, R, WS, R, R, R, WS, R, R, R
+};
+
+static const UBiDiLevel
+testLevels22[]={
+ 1, 1, 1, 1, 1, 1, 1, 0
+};
+
+static const uint8_t
+testVisualMap21[]={
+ 6, 5, 4, 3, 2, 1, 0, 7
+};
+
+static const uint8_t
+testTextXX[]={
+ L
+};
+
+static const UBiDiLevel
+testLevelsXX[]={
+ 2
+};
+
+static const uint8_t
+testVisualMapXX[]={
+ 0
+};
+
+const BiDiTestData
+tests[]={
+ {testText1, ARRAY_LENGTH(testText1), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_LTR, 0,
+ testLevels1, testVisualMap1},
+ {testText2, ARRAY_LENGTH(testText2), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_RTL, 1,
+ testLevels2, testVisualMap2},
+ {testText3, ARRAY_LENGTH(testText3), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_LTR, 0,
+ testLevels3, testVisualMap3},
+ {testText4, ARRAY_LENGTH(testText4), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels4, testVisualMap4},
+ {testText5, ARRAY_LENGTH(testText5), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 1,
+ testLevels5, testVisualMap5},
+ {testText6, ARRAY_LENGTH(testText6), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 1,
+ testLevels6, testVisualMap6},
+ {NULL, 0, UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_LTR, 0,
+ NULL, NULL},
+ {testText8, ARRAY_LENGTH(testText8), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_RTL, 1,
+ testLevels8, testVisualMap8},
+ {testText9, ARRAY_LENGTH(testText9), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels9, testVisualMap9},
+ {testText10, ARRAY_LENGTH(testText10), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels10, testVisualMap10},
+ {testText11, ARRAY_LENGTH(testText11), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels11, testVisualMap11},
+ {testText12, ARRAY_LENGTH(testText12), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels12, testVisualMap12},
+ {testText12, ARRAY_LENGTH(testText12), UBIDI_DEFAULT_RTL, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels13, testVisualMap13},
+ {testText12, ARRAY_LENGTH(testText12), 2, -1, -1,
+ UBIDI_MIXED, 2,
+ testLevels14, testVisualMap14},
+ {testText12, ARRAY_LENGTH(testText12), 5, -1, -1,
+ UBIDI_MIXED, 5,
+ testLevels15, testVisualMap15},
+ {testText12, ARRAY_LENGTH(testText12), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels16, testVisualMap16},
+ {testText13, ARRAY_LENGTH(testText13), UBIDI_DEFAULT_LTR, -1, -1,
+ UBIDI_MIXED, 0,
+ testLevels17, testVisualMap17},
+ {testText13, ARRAY_LENGTH(testText13), UBIDI_DEFAULT_LTR, 0, 6,
+ UBIDI_MIXED, 0,
+ testLevels18, testVisualMap18},
+ {testText14, ARRAY_LENGTH(testText14), UBIDI_DEFAULT_LTR, 13, 14,
+ UBIDI_RTL, 1,
+ testLevels19, testVisualMap19},
+ {testText15, ARRAY_LENGTH(testText15), UBIDI_DEFAULT_LTR, 2, 3,
+ UBIDI_LTR, 2,
+ testLevels20, testVisualMap19},
+ {testText16, ARRAY_LENGTH(testText16), UBIDI_RTL, 0, 8,
+ UBIDI_MIXED, 1,
+ testLevels21, testVisualMap20},
+ {testText17, ARRAY_LENGTH(testText17), UBIDI_LTR, 0, 8,
+ UBIDI_MIXED, 0,
+ testLevels22, testVisualMap21},
+ {testTextXX, ARRAY_LENGTH(testTextXX), UBIDI_RTL, -1, -1,
+ UBIDI_MIXED, 1, testLevelsXX, testVisualMapXX}
+};
+
+const int
+bidiTestCount=ARRAY_LENGTH(tests);
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.c
new file mode 100644
index 00000000000..517d219df33
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.c
@@ -0,0 +1,3860 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/* file name: cbiditst.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 1999sep27
+* created by: Markus W. Scherer, updated by Matitiahu Allouche
+*/
+
+#include "cintltst.h"
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/ustring.h"
+#include "unicode/ubidi.h"
+#include "unicode/ushape.h"
+#include "cbiditst.h"
+#include "cstring.h"
+/* the following include is needed for sprintf */
+#include <stdio.h>
+
+#define MAXLEN MAX_STRING_LENGTH
+#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
+
+/* prototypes ---------------------------------------------------------------*/
+
+void addComplexTest(TestNode** root);
+
+static void testCharFromDirProp(void);
+
+static void testBidi(void);
+
+static void doTests(UBiDi *pBiDi, UBiDi *pLine, UBool countRunsFirst);
+
+static void doMisc(void);
+
+static void doTest(UBiDi *pBiDi, int testNumber, const BiDiTestData *test,
+ int32_t lineStart, UBool countRunsFirst);
+
+static void _testReordering(UBiDi *pBiDi, int testNumber);
+
+static void testInverse(void);
+
+static void _testManyInverseBidi(UBiDi *pBiDi, UBiDiLevel direction);
+
+static void _testInverseBidi(UBiDi *pBiDi, const UChar *src, int32_t srcLength,
+ UBiDiLevel direction, UErrorCode *pErrorCode);
+
+static void _testWriteReverse(void);
+
+static void _testManyAddedPoints(void);
+
+static void _testMisc(void);
+
+static void doArabicShapingTest(void);
+
+static void doLamAlefSpecialVLTRArabicShapingTest(void);
+
+static void doTashkeelSpecialVLTRArabicShapingTest(void);
+
+static void doLOGICALArabicDeShapingTest(void);
+
+static void doArabicShapingTestForBug5421(void);
+
+static void testReorder(void);
+
+static void testFailureRecovery(void);
+
+static void testMultipleParagraphs(void);
+
+/* new BIDI API */
+static void testReorderingMode(void);
+static void testReorderRunsOnly(void);
+static void testStreaming(void);
+static void testClassOverride(void);
+static const char* inverseBasic(UBiDi *pBiDi, const char *src, int32_t srcLen,
+ uint32_t option, UBiDiLevel level, char *result);
+static UBool assertRoundTrip(UBiDi *pBiDi, int32_t tc, int32_t outIndex,
+ const char *srcChars, const char *destChars,
+ const UChar *dest, int32_t destLen, int mode,
+ int option, UBiDiLevel level);
+static UBool checkResultLength(UBiDi *pBiDi, const char *srcChars,
+ const char *destChars,
+ int32_t destLen, const char *mode,
+ const char *option, UBiDiLevel level);
+static UBool checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src,
+ const char *dest, const char *mode, const char* option,
+ UBiDiLevel level, UBool forward);
+
+/* helpers ------------------------------------------------------------------ */
+
+static const char *levelString="...............................................................";
+
+static void initCharFromDirProps(void);
+
+static UChar *
+getStringFromDirProps(const uint8_t *dirProps, int32_t length, UChar *buffer);
+
+static void printUnicode(const UChar *s, int32_t length, const UBiDiLevel *levels);
+
+/* regression tests ---------------------------------------------------------*/
+
+void
+addComplexTest(TestNode** root) {
+ addTest(root, testCharFromDirProp, "complex/bidi/TestCharFromDirProp");
+ addTest(root, testBidi, "complex/bidi/TestBidi");
+ addTest(root, testInverse, "complex/bidi/TestInverse");
+ addTest(root, testReorder,"complex/bidi/TestReorder");
+ addTest(root, testFailureRecovery,"complex/bidi/TestFailureRecovery");
+ addTest(root, testMultipleParagraphs,"complex/bidi/TestMultipleParagraphs");
+ addTest(root, testReorderingMode, "complex/bidi/TestReorderingMode");
+ addTest(root, testReorderRunsOnly, "complex/bidi/TestReorderRunsOnly");
+ addTest(root, testStreaming, "complex/bidi/TestStreaming");
+ addTest(root, testClassOverride, "complex/bidi/TestClassOverride");
+
+ addTest(root, doArabicShapingTest, "complex/arabic-shaping/ArabicShapingTest");
+ addTest(root, doLamAlefSpecialVLTRArabicShapingTest, "complex/arabic-shaping/lamalef");
+ addTest(root, doTashkeelSpecialVLTRArabicShapingTest, "complex/arabic-shaping/tashkeel");
+ addTest(root, doLOGICALArabicDeShapingTest, "complex/arabic-shaping/unshaping");
+ addTest(root, doArabicShapingTestForBug5421, "complex/arabic-shaping/bug-5421");
+}
+
+static void
+testCharFromDirProp(void) {
+ /* verify that the exemplar characters have the expected bidi classes */
+ int32_t i;
+
+ log_verbose("\nEntering TestCharFromDirProp\n\n");
+ initCharFromDirProps();
+
+ for(i=0; i<U_CHAR_DIRECTION_COUNT; ++i) {
+ if(u_charDirection(charFromDirProp[i])!=(UCharDirection)i) {
+ log_err("\nu_charDirection(charFromDirProp[%d]=U+%04x)==%d!=%d\n",
+ i, charFromDirProp[i], u_charDirection(charFromDirProp[i]), i);
+ }
+ }
+ log_verbose("\nExiting TestCharFromDirProp\n\n");
+}
+
+static void
+testBidi(void) {
+ UBiDi *pBiDi, *pLine=NULL;
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ log_verbose("\nEntering TestBidi\n\n");
+
+ pBiDi=ubidi_openSized(MAXLEN, 0, &errorCode);
+ if(pBiDi!=NULL) {
+ pLine=ubidi_open();
+ if(pLine!=NULL) {
+ doTests(pBiDi, pLine, FALSE);
+ doTests(pBiDi, pLine, TRUE);
+ } else {
+ log_err("ubidi_open() returned NULL, out of memory\n");
+ }
+ } else {
+ log_err("ubidi_openSized() returned NULL, errorCode %s\n", myErrorName(errorCode));
+ }
+ doMisc();
+
+ if(pLine!=NULL) {
+ ubidi_close(pLine);
+ }
+ if(pBiDi!=NULL) {
+ ubidi_close(pBiDi);
+ }
+
+ log_verbose("\nExiting TestBidi\n\n");
+}
+
+static void
+doTests(UBiDi *pBiDi, UBiDi *pLine, UBool countRunsFirst) {
+ int testNumber;
+ UChar string[MAXLEN];
+ UErrorCode errorCode;
+ int32_t lineStart;
+ UBiDiLevel paraLevel;
+
+ for(testNumber=0; testNumber<bidiTestCount; ++testNumber) {
+ errorCode=U_ZERO_ERROR;
+ getStringFromDirProps(tests[testNumber].text, tests[testNumber].length, string);
+ paraLevel=tests[testNumber].paraLevel;
+ ubidi_setPara(pBiDi, string, -1, paraLevel, NULL, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ log_verbose("ubidi_setPara(tests[%d], paraLevel %d) ok, direction %d paraLevel=%d\n",
+ testNumber, paraLevel, ubidi_getDirection(pBiDi), paraLevel);
+ lineStart=tests[testNumber].lineStart;
+ if(lineStart==-1) {
+ doTest(pBiDi, testNumber, tests+testNumber, 0, countRunsFirst);
+ } else {
+ ubidi_setLine(pBiDi, lineStart, tests[testNumber].lineLimit, pLine, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ log_verbose("ubidi_setLine(%d, %d) ok, direction %d paraLevel=%d\n",
+ lineStart, tests[testNumber].lineLimit, ubidi_getDirection(pLine), ubidi_getParaLevel(pLine));
+ doTest(pLine, testNumber, tests+testNumber, lineStart, countRunsFirst);
+ } else {
+ log_err("ubidi_setLine(tests[%d], %d, %d) failed with errorCode %s\n",
+ testNumber, lineStart, tests[testNumber].lineLimit, myErrorName(errorCode));
+ }
+ }
+ } else {
+ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n",
+ testNumber, paraLevel, myErrorName(errorCode));
+ }
+ }
+}
+
+static const char columns[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+#define TABLE_SIZE 256
+static UBool tablesInitialized = FALSE;
+static UChar pseudoToUChar[TABLE_SIZE];
+static uint8_t UCharToPseudo[TABLE_SIZE]; /* used for Unicode chars < 0x0100 */
+static uint8_t UCharToPseud2[TABLE_SIZE]; /* used for Unicode chars >=0x0100 */
+
+static void buildPseudoTables(void)
+/*
+ The rules for pseudo-Bidi are as follows:
+ - [ == LRE
+ - ] == RLE
+ - { == LRO
+ - } == RLO
+ - ^ == PDF
+ - @ == LRM
+ - & == RLM
+ - A-F == Arabic Letters 0631-0636
+ - G-V == Hebrew letters 05d7-05e6
+ - W-Z == Unassigned RTL 08d0-08d3
+ - 0-5 == western digits 0030-0035
+ - 6-9 == Arabic-Indic digits 0666-0669
+ - ` == Combining Grave Accent 0300 (NSM)
+ - ~ == Delete 007f (BN)
+ - | == Paragraph Separator 2029 (B)
+ - _ == Info Separator 1 001f (S)
+ All other characters represent themselves as Latin-1, with the corresponding
+ Bidi properties.
+*/
+{
+ int i;
+ UChar uchar;
+ uint8_t c;
+ /* initialize all tables to unknown */
+ for (i=0; i < TABLE_SIZE; i++) {
+ pseudoToUChar[i] = 0xFFFD;
+ UCharToPseudo[i] = '?';
+ UCharToPseud2[i] = '?';
+ }
+ /* initialize non letters or digits */
+ pseudoToUChar[(uint8_t) 0 ] = 0x0000; UCharToPseudo[0x00] = (uint8_t) 0 ;
+ pseudoToUChar[(uint8_t)' '] = 0x0020; UCharToPseudo[0x20] = (uint8_t)' ';
+ pseudoToUChar[(uint8_t)'!'] = 0x0021; UCharToPseudo[0x21] = (uint8_t)'!';
+ pseudoToUChar[(uint8_t)'"'] = 0x0022; UCharToPseudo[0x22] = (uint8_t)'"';
+ pseudoToUChar[(uint8_t)'#'] = 0x0023; UCharToPseudo[0x23] = (uint8_t)'#';
+ pseudoToUChar[(uint8_t)'$'] = 0x0024; UCharToPseudo[0x24] = (uint8_t)'$';
+ pseudoToUChar[(uint8_t)'%'] = 0x0025; UCharToPseudo[0x25] = (uint8_t)'%';
+ pseudoToUChar[(uint8_t)'\'']= 0x0027; UCharToPseudo[0x27] = (uint8_t)'\'';
+ pseudoToUChar[(uint8_t)'('] = 0x0028; UCharToPseudo[0x28] = (uint8_t)'(';
+ pseudoToUChar[(uint8_t)')'] = 0x0029; UCharToPseudo[0x29] = (uint8_t)')';
+ pseudoToUChar[(uint8_t)'*'] = 0x002A; UCharToPseudo[0x2A] = (uint8_t)'*';
+ pseudoToUChar[(uint8_t)'+'] = 0x002B; UCharToPseudo[0x2B] = (uint8_t)'+';
+ pseudoToUChar[(uint8_t)','] = 0x002C; UCharToPseudo[0x2C] = (uint8_t)',';
+ pseudoToUChar[(uint8_t)'-'] = 0x002D; UCharToPseudo[0x2D] = (uint8_t)'-';
+ pseudoToUChar[(uint8_t)'.'] = 0x002E; UCharToPseudo[0x2E] = (uint8_t)'.';
+ pseudoToUChar[(uint8_t)'/'] = 0x002F; UCharToPseudo[0x2F] = (uint8_t)'/';
+ pseudoToUChar[(uint8_t)':'] = 0x003A; UCharToPseudo[0x3A] = (uint8_t)':';
+ pseudoToUChar[(uint8_t)';'] = 0x003B; UCharToPseudo[0x3B] = (uint8_t)';';
+ pseudoToUChar[(uint8_t)'<'] = 0x003C; UCharToPseudo[0x3C] = (uint8_t)'<';
+ pseudoToUChar[(uint8_t)'='] = 0x003D; UCharToPseudo[0x3D] = (uint8_t)'=';
+ pseudoToUChar[(uint8_t)'>'] = 0x003E; UCharToPseudo[0x3E] = (uint8_t)'>';
+ pseudoToUChar[(uint8_t)'?'] = 0x003F; UCharToPseudo[0x3F] = (uint8_t)'?';
+ pseudoToUChar[(uint8_t)'\\']= 0x005C; UCharToPseudo[0x5C] = (uint8_t)'\\';
+ /* initialize specially used characters */
+ pseudoToUChar[(uint8_t)'`'] = 0x0300; UCharToPseud2[0x00] = (uint8_t)'`'; /* NSM */
+ pseudoToUChar[(uint8_t)'@'] = 0x200E; UCharToPseud2[0x0E] = (uint8_t)'@'; /* LRM */
+ pseudoToUChar[(uint8_t)'&'] = 0x200F; UCharToPseud2[0x0F] = (uint8_t)'&'; /* RLM */
+ pseudoToUChar[(uint8_t)'_'] = 0x001F; UCharToPseudo[0x1F] = (uint8_t)'_'; /* S */
+ pseudoToUChar[(uint8_t)'|'] = 0x2029; UCharToPseud2[0x29] = (uint8_t)'|'; /* B */
+ pseudoToUChar[(uint8_t)'['] = 0x202A; UCharToPseud2[0x2A] = (uint8_t)'['; /* LRE */
+ pseudoToUChar[(uint8_t)']'] = 0x202B; UCharToPseud2[0x2B] = (uint8_t)']'; /* RLE */
+ pseudoToUChar[(uint8_t)'^'] = 0x202C; UCharToPseud2[0x2C] = (uint8_t)'^'; /* PDF */
+ pseudoToUChar[(uint8_t)'{'] = 0x202D; UCharToPseud2[0x2D] = (uint8_t)'{'; /* LRO */
+ pseudoToUChar[(uint8_t)'}'] = 0x202E; UCharToPseud2[0x2E] = (uint8_t)'}'; /* RLO */
+ pseudoToUChar[(uint8_t)'~'] = 0x007F; UCharToPseudo[0x7F] = (uint8_t)'~'; /* BN */
+ /* initialize western digits */
+ for (i = 0, uchar = 0x0030; i < 6; i++, uchar++) {
+ c = (uint8_t)columns[i];
+ pseudoToUChar[c] = uchar;
+ UCharToPseudo[uchar & 0x00ff] = c;
+ }
+ /* initialize Hindi digits */
+ for (i = 6, uchar = 0x0666; i < 10; i++, uchar++) {
+ c = (uint8_t)columns[i];
+ pseudoToUChar[c] = uchar;
+ UCharToPseud2[uchar & 0x00ff] = c;
+ }
+ /* initialize Arabic letters */
+ for (i = 10, uchar = 0x0631; i < 16; i++, uchar++) {
+ c = (uint8_t)columns[i];
+ pseudoToUChar[c] = uchar;
+ UCharToPseud2[uchar & 0x00ff] = c;
+ }
+ /* initialize Hebrew letters */
+ for (i = 16, uchar = 0x05D7; i < 32; i++, uchar++) {
+ c = (uint8_t)columns[i];
+ pseudoToUChar[c] = uchar;
+ UCharToPseud2[uchar & 0x00ff] = c;
+ }
+ /* initialize Unassigned code points */
+ for (i = 32, uchar=0x08D0; i < 36; i++, uchar++) {
+ c = (uint8_t)columns[i];
+ pseudoToUChar[c] = uchar;
+ UCharToPseud2[uchar & 0x00ff] = c;
+ }
+ /* initialize Latin lower case letters */
+ for (i = 36, uchar = 0x0061; i < 62; i++, uchar++) {
+ c = (uint8_t)columns[i];
+ pseudoToUChar[c] = uchar;
+ UCharToPseudo[uchar & 0x00ff] = c;
+ }
+ tablesInitialized = TRUE;
+}
+
+/*----------------------------------------------------------------------*/
+
+static int pseudoToU16(const int length, const char * input, UChar * output)
+/* This function converts a pseudo-Bidi string into a UChar string.
+ It returns the length of the UChar string.
+*/
+{
+ int i;
+ if (!tablesInitialized) {
+ buildPseudoTables();
+ }
+ for (i = 0; i < length; i++)
+ output[i] = pseudoToUChar[(uint8_t)input[i]];
+ return length;
+}
+
+/*----------------------------------------------------------------------*/
+
+static int u16ToPseudo(const int length, const UChar * input, char * output)
+/* This function converts a UChar string into a pseudo-Bidi string.
+ It returns the length of the pseudo-Bidi string.
+*/
+{
+ int i;
+ UChar uchar;
+ if (!tablesInitialized) {
+ buildPseudoTables();
+ }
+ for (i = 0; i < length; i++)
+ {
+ uchar = input[i];
+ output[i] = uchar < 0x0100 ? UCharToPseudo[uchar] :
+ UCharToPseud2[uchar & 0x00ff];
+ }
+ output[length] = '\0';
+ return length;
+}
+
+static char * formatLevels(UBiDi *bidi, char *buffer) {
+ UErrorCode ec = U_ZERO_ERROR;
+ const UBiDiLevel* gotLevels = ubidi_getLevels(bidi, &ec);
+ int len = ubidi_getLength(bidi);
+ char c;
+ int i, k;
+
+ if(U_FAILURE(ec)) {
+ strcpy(buffer, "BAD LEVELS");
+ return buffer;
+ }
+ for (i=0; i<len; i++) {
+ k = gotLevels[i];
+ if (k >= sizeof(columns))
+ c = '+';
+ else
+ c = columns[k];
+ buffer[i] = c;
+ }
+ buffer[len] = '\0';
+ return buffer;
+}
+static const char *reorderingModeNames[] = {
+ "UBIDI_REORDER_DEFAULT",
+ "UBIDI_REORDER_NUMBERS_SPECIAL",
+ "UBIDI_REORDER_GROUP_NUMBERS_WITH_R",
+ "UBIDI_REORDER_RUNS_ONLY",
+ "UBIDI_REORDER_INVERSE_NUMBERS_AS_L",
+ "UBIDI_REORDER_INVERSE_LIKE_DIRECT",
+ "UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL"};
+
+static char *reorderingOptionNames(char *buffer, int options) {
+ buffer[0] = 0;
+ if (options & UBIDI_OPTION_INSERT_MARKS) {
+ strcat(buffer, " UBIDI_OPTION_INSERT_MARKS");
+ }
+ if (options & UBIDI_OPTION_REMOVE_CONTROLS) {
+ strcat(buffer, " UBIDI_OPTION_REMOVE_CONTROLS");
+ }
+ if (options & UBIDI_OPTION_STREAMING) {
+ strcat(buffer, " UBIDI_OPTION_STREAMING");
+ }
+ return buffer;
+}
+
+static void printCaseInfo(UBiDi *bidi, const char *src, const char *dst)
+/* src and dst are char arrays encoded as pseudo Bidi */
+{
+ /* Since calls to log_err with a \n within the pattern increment the
+ * error count, new lines are issued via fputs, except when we want the
+ * increment to happen.
+ */
+ UErrorCode errorCode=U_ZERO_ERROR;
+ int32_t i, length = ubidi_getProcessedLength(bidi);
+ const UBiDiLevel *levels;
+ char levelChars[MAXLEN];
+ UBiDiLevel lev;
+ int32_t runCount;
+ char buffer[100];
+ log_err("========================================"); fputs("\n", stderr);
+ levels = ubidi_getLevels(bidi, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ strcpy(levelChars, "BAD LEVELS");
+ } else {
+ log_err("Processed length: %d", length); fputs("\n", stderr);
+ for (i = 0; i < length; i++) {
+ lev = levels[i];
+ if (lev < sizeof(columns)) {
+ levelChars[i] = columns[lev];
+ } else {
+ levelChars[i] = '+';
+ }
+ }
+ levelChars[length] = 0;
+ }
+ log_err("Levels: %s", levelChars); fputs("\n", stderr);
+ log_err("Source: %s", src); fputs("\n", stderr);
+ log_err("Result: %s", dst); fputs("\n", stderr);
+ log_err("Direction: %d", ubidi_getDirection(bidi)); fputs("\n", stderr);
+ log_err("paraLevel: %d", ubidi_getParaLevel(bidi)); fputs("\n", stderr);
+ i = ubidi_getReorderingMode(bidi);
+ log_err("reorderingMode: %d = %s", i, reorderingModeNames[i]);
+ fputs("\n", stderr);
+ i = ubidi_getReorderingOptions(bidi);
+ log_err("reorderingOptions: %d = %s", i, reorderingOptionNames(buffer, i));
+ fputs("\n", stderr);
+ runCount = ubidi_countRuns(bidi, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err( "BAD RUNS");
+ } else {
+ log_err("Runs: %d => logicalStart.length/level: ", runCount);
+ for (i = 0; i < runCount; i++) {
+ UBiDiDirection dir;
+ int32_t start, len;
+ dir = ubidi_getVisualRun(bidi, i, &start, &len);
+ log_err(" %d.%d/%d", start, len, dir);
+ }
+ }
+ fputs("\n", stderr);
+}
+
+static UBool matchingPair(UBiDi *bidi, int32_t i, char c1, char c2)
+{
+ /* No test for []{} since they have special meaning for pseudo Bidi */
+ static char mates1Chars[] = "<>()";
+ static char mates2Chars[] = "><)(";
+ UBiDiLevel level;
+ int k, len;
+
+ if (c1 == c2) {
+ return TRUE;
+ }
+ /* For UBIDI_REORDER_RUNS_ONLY, it would not be correct to check levels[i],
+ so we use the appropriate run's level, which is good for all cases.
+ */
+ ubidi_getLogicalRun(bidi, i, NULL, &level);
+ if ((level & 1) == 0) {
+ return FALSE;
+ }
+ len = strlen(mates1Chars);
+ for (k = 0; k < len; k++) {
+ if ((c1 == mates1Chars[k]) && (c2 == mates2Chars[k])) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstChars)
+/* srcChars and dstChars are char arrays encoded as pseudo Bidi */
+{
+ int32_t i, idx, logLimit, visLimit;
+ UBool testOK, errMap, errDst;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ int32_t visMap[MAXLEN];
+ int32_t logMap[MAXLEN];
+ char accumSrc[MAXLEN];
+ char accumDst[MAXLEN];
+ ubidi_getVisualMap(bidi, visMap, &errorCode);
+ ubidi_getLogicalMap(bidi, logMap, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("Error #1 invoking ICU within checkWhatYouCan\n");
+ return FALSE;
+ }
+
+ testOK = TRUE;
+ errMap = errDst = FALSE;
+ logLimit = ubidi_getProcessedLength(bidi);
+ visLimit = ubidi_getResultLength(bidi);
+ memset(accumSrc, '?', logLimit);
+ memset(accumDst, '?', visLimit);
+
+ for (i = 0; i < logLimit; i++) {
+ idx = ubidi_getVisualIndex(bidi, i, &errorCode);
+ if (idx != logMap[i]) {
+ errMap = TRUE;
+ }
+ if (idx == UBIDI_MAP_NOWHERE) {
+ continue;
+ }
+ if (idx >= visLimit) {
+ continue;
+ }
+ accumDst[idx] = srcChars[i];
+ if (!matchingPair(bidi, i, srcChars[i], dstChars[idx])) {
+ errDst = TRUE;
+ }
+ }
+ accumDst[visLimit] = 0;
+ if (U_FAILURE(errorCode)) {
+ log_err("Error #2 invoking ICU within checkWhatYouCan\n");
+ return FALSE;
+ }
+ if (errMap) {
+ if (testOK) {
+ printCaseInfo(bidi, srcChars, dstChars);
+ testOK = FALSE;
+ }
+ log_err("Mismatch between getLogicalMap() and getVisualIndex()\n");
+ log_err("Map :");
+ for (i = 0; i < logLimit; i++) {
+ log_err(" %d", logMap[i]);
+ }
+ fputs("\n", stderr);
+ log_err("Indexes:");
+ for (i = 0; i < logLimit; i++) {
+ log_err(" %d", ubidi_getVisualIndex(bidi, i, &errorCode));
+ }
+ fputs("\n", stderr);
+ }
+ if (errDst) {
+ if (testOK) {
+ printCaseInfo(bidi, srcChars, dstChars);
+ testOK = FALSE;
+ }
+ log_err("Source does not map to Result\n");
+ log_err("We got: %s", accumDst); fputs("\n", stderr);
+ }
+
+ errMap = errDst = FALSE;
+ for (i = 0; i < visLimit; i++) {
+ idx = ubidi_getLogicalIndex(bidi, i, &errorCode);
+ if (idx != visMap[i]) {
+ errMap = TRUE;
+ }
+ if (idx == UBIDI_MAP_NOWHERE) {
+ continue;
+ }
+ if (idx >= logLimit) {
+ continue;
+ }
+ accumSrc[idx] = dstChars[i];
+ if (!matchingPair(bidi, idx, srcChars[idx], dstChars[i])) {
+ errDst = TRUE;
+ }
+ }
+ accumSrc[logLimit] = 0;
+ if (U_FAILURE(errorCode)) {
+ log_err("Error #3 invoking ICU within checkWhatYouCan\n");
+ return FALSE;
+ }
+ if (errMap) {
+ if (testOK) {
+ printCaseInfo(bidi, srcChars, dstChars);
+ testOK = FALSE;
+ }
+ log_err("Mismatch between getVisualMap() and getLogicalIndex()\n");
+ log_err("Map :");
+ for (i = 0; i < visLimit; i++) {
+ log_err(" %d", visMap[i]);
+ }
+ fputs("\n", stderr);
+ log_err("Indexes:");
+ for (i = 0; i < visLimit; i++) {
+ log_err(" %d", ubidi_getLogicalIndex(bidi, i, &errorCode));
+ }
+ fputs("\n", stderr);
+ }
+ if (errDst) {
+ if (testOK) {
+ printCaseInfo(bidi, srcChars, dstChars);
+ testOK = FALSE;
+ }
+ log_err("Result does not map to Source\n");
+ log_err("We got: %s", accumSrc);
+ fputs("\n", stderr);
+ }
+ return testOK;
+}
+
+static void
+testReorder(void) {
+ static const char* const logicalOrder[] ={
+ "del(KC)add(K.C.&)",
+ "del(QDVT) add(BVDL)",
+ "del(PQ)add(R.S.)T)U.&",
+ "del(LV)add(L.V.) L.V.&",
+ "day 0 R DPDHRVR dayabbr",
+ "day 1 H DPHPDHDA dayabbr",
+ "day 2 L DPBLENDA dayabbr",
+ "day 3 J DPJQVM dayabbr",
+ "day 4 I DPIQNF dayabbr",
+ "day 5 M DPMEG dayabbr",
+ "helloDPMEG",
+ "hello WXYZ"
+ };
+ static const char* const visualOrder[]={
+ "del(CK)add(&.C.K)",
+ "del(TVDQ) add(LDVB)",
+ "del(QP)add(&.U(T(.S.R",
+ "del(VL)add(&.V.L (.V.L",
+ "day 0 RVRHDPD R dayabbr",
+ "day 1 ADHDPHPD H dayabbr",
+ "day 2 ADNELBPD L dayabbr",
+ "day 3 MVQJPD J dayabbr",
+ "day 4 FNQIPD I dayabbr",
+ "day 5 GEMPD M dayabbr",
+ "helloGEMPD",
+ "hello ZYXW"
+ };
+ static const char* const visualOrder1[]={
+ ")K.C.&(dda)KC(led",
+ ")BVDL(dda )QDVT(led",
+ "R.S.(T(U.&(dda)PQ(led",
+ "L.V.( L.V.&(dda)LV(led",
+ "rbbayad R DPDHRVR 0 yad",
+ "rbbayad H DPHPDHDA 1 yad",
+ "rbbayad L DPBLENDA 2 yad",
+ "rbbayad J DPJQVM 3 yad",
+ "rbbayad I DPIQNF 4 yad",
+ "rbbayad M DPMEG 5 yad",
+ "DPMEGolleh",
+ "WXYZ olleh"
+ };
+
+ static const char* const visualOrder2[]={
+ "@)@K.C.&@(dda)@KC@(led",
+ "@)@BVDL@(dda )@QDVT@(led",
+ "R.S.)T)U.&@(dda)@PQ@(led",
+ "L.V.) L.V.&@(dda)@LV@(led",
+ "rbbayad @R DPDHRVR@ 0 yad",
+ "rbbayad @H DPHPDHDA@ 1 yad",
+ "rbbayad @L DPBLENDA@ 2 yad",
+ "rbbayad @J DPJQVM@ 3 yad",
+ "rbbayad @I DPIQNF@ 4 yad",
+ "rbbayad @M DPMEG@ 5 yad",
+ "DPMEGolleh",
+ "WXYZ@ olleh"
+ };
+ static const char* const visualOrder3[]={
+ ")K.C.&(KC)dda(led",
+ ")BVDL(ddaQDVT) (led",
+ "R.S.)T)U.&(PQ)dda(led",
+ "L.V.) L.V.&(LV)dda(led",
+ "rbbayad DPDHRVR R 0 yad",
+ "rbbayad DPHPDHDA H 1 yad",
+ "rbbayad DPBLENDA L 2 yad",
+ "rbbayad DPJQVM J 3 yad",
+ "rbbayad DPIQNF I 4 yad",
+ "rbbayad DPMEG M 5 yad",
+ "DPMEGolleh",
+ "WXYZ olleh"
+ };
+ static const char* const visualOrder4[]={
+ "del(add(CK(.C.K)",
+ "del( (TVDQadd(LDVB)",
+ "del(add(QP(.U(T(.S.R",
+ "del(add(VL(.V.L (.V.L",
+ "day 0 R RVRHDPD dayabbr",
+ "day 1 H ADHDPHPD dayabbr",
+ "day 2 L ADNELBPD dayabbr",
+ "day 3 J MVQJPD dayabbr",
+ "day 4 I FNQIPD dayabbr",
+ "day 5 M GEMPD dayabbr",
+ "helloGEMPD",
+ "hello ZYXW"
+ };
+ char formatChars[MAXLEN];
+ UErrorCode ec = U_ZERO_ERROR;
+ UBiDi* bidi = ubidi_open();
+ int i;
+
+ log_verbose("\nEntering TestReorder\n\n");
+
+ for(i=0;i<LENGTHOF(logicalOrder);i++){
+ int32_t srcSize = (int32_t)strlen(logicalOrder[i]);
+ int32_t destSize = srcSize*2;
+ UChar src[MAXLEN];
+ UChar dest[MAXLEN];
+ char chars[MAXLEN];
+ log_verbose("Testing L2V #1 for case %d\n", i);
+ pseudoToU16(srcSize,logicalOrder[i],src);
+ ec = U_ZERO_ERROR;
+ ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR ,NULL,&ec);
+ if(U_FAILURE(ec)){
+ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n",
+ i, UBIDI_DEFAULT_LTR, u_errorName(ec));
+ }
+ /* try pre-flighting */
+ destSize = ubidi_writeReordered(bidi,dest,0,UBIDI_DO_MIRRORING,&ec);
+ if(ec!=U_BUFFER_OVERFLOW_ERROR){
+ log_err("Pre-flighting did not give expected error: Expected: U_BUFFER_OVERFLOW_ERROR. Got: %s \n",u_errorName(ec));
+ }else if(destSize!=srcSize){
+ log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);
+ }else{
+ ec= U_ZERO_ERROR;
+ }
+ destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_DO_MIRRORING,&ec);
+ u16ToPseudo(destSize,dest,chars);
+ if(destSize!=srcSize){
+ log_err("ubidi_writeReordered() destSize and srcSize do not match\n");
+ }else if(strcmp(visualOrder[i],chars)!=0){
+ log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING.\n"
+ "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n",
+ logicalOrder[i],visualOrder[i],chars,formatLevels(bidi, formatChars),i);
+ }
+ checkWhatYouCan(bidi, logicalOrder[i], chars);
+ }
+
+ for(i=0;i<LENGTHOF(logicalOrder);i++){
+ int32_t srcSize = (int32_t)strlen(logicalOrder[i]);
+ int32_t destSize = srcSize*2;
+ UChar src[MAXLEN];
+ UChar dest[MAXLEN];
+ char chars[MAXLEN];
+ log_verbose("Testing L2V #2 for case %d\n", i);
+ pseudoToU16(srcSize,logicalOrder[i],src);
+ ec = U_ZERO_ERROR;
+ ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR ,NULL,&ec);
+ if(U_FAILURE(ec)){
+ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n",
+ i, UBIDI_DEFAULT_LTR, u_errorName(ec));
+ }
+ /* try pre-flighting */
+ destSize = ubidi_writeReordered(bidi,dest,0,UBIDI_DO_MIRRORING+UBIDI_OUTPUT_REVERSE,&ec);
+ if(ec!=U_BUFFER_OVERFLOW_ERROR){
+ log_err("Pre-flighting did not give expected error: Expected: U_BUFFER_OVERFLOW_ERROR. Got: %s \n",u_errorName(ec));
+ }else if(destSize!=srcSize){
+ log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);
+ }else{
+ ec= U_ZERO_ERROR;
+ }
+ destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_DO_MIRRORING+UBIDI_OUTPUT_REVERSE,&ec);
+ u16ToPseudo(destSize,dest,chars);
+ if(destSize!=srcSize){
+ log_err("ubidi_writeReordered() destSize and srcSize do not match\n");
+ }else if(strcmp(visualOrder1[i],chars)!=0){
+ log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING+UBIDI_OUTPUT_REVERSE.\n"
+ "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n",
+ logicalOrder[i],visualOrder1[i],chars,formatLevels(bidi, formatChars),i);
+ }
+ }
+
+ for(i=0;i<LENGTHOF(logicalOrder);i++){
+ int32_t srcSize = (int32_t)strlen(logicalOrder[i]);
+ int32_t destSize = srcSize*2;
+ UChar src[MAXLEN];
+ UChar dest[MAXLEN];
+ char chars[MAXLEN];
+ log_verbose("Testing V2L #3 for case %d\n", i);
+ pseudoToU16(srcSize,logicalOrder[i],src);
+ ec = U_ZERO_ERROR;
+ ubidi_setInverse(bidi,TRUE);
+ ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR ,NULL,&ec);
+ if(U_FAILURE(ec)){
+ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n",
+ i, UBIDI_DEFAULT_LTR, u_errorName(ec));
+ }
+ /* try pre-flighting */
+ destSize = ubidi_writeReordered(bidi,dest,0,UBIDI_INSERT_LRM_FOR_NUMERIC+UBIDI_OUTPUT_REVERSE,&ec);
+ if(ec!=U_BUFFER_OVERFLOW_ERROR){
+ log_err("Pre-flighting did not give expected error: Expected: U_BUFFER_OVERFLOW_ERROR. Got: %s \n",u_errorName(ec));
+ }else{
+ ec= U_ZERO_ERROR;
+ }
+ destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_INSERT_LRM_FOR_NUMERIC+UBIDI_OUTPUT_REVERSE,&ec);
+ u16ToPseudo(destSize,dest,chars);
+ if(strcmp(visualOrder2[i],chars)!=0){
+ log_err("ubidi_writeReordered() did not give expected results for UBIDI_INSERT_LRM_FOR_NUMERIC+UBIDI_OUTPUT_REVERSE.\n"
+ "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n",
+ logicalOrder[i],visualOrder2[i],chars,formatLevels(bidi, formatChars),i);
+ }
+ }
+ /* Max Explicit level */
+ for(i=0;i<LENGTHOF(logicalOrder);i++){
+ int32_t srcSize = (int32_t)strlen(logicalOrder[i]);
+ int32_t destSize = srcSize*2;
+ UChar src[MAXLEN];
+ UChar dest[MAXLEN];
+ char chars[MAXLEN];
+ UBiDiLevel levels[UBIDI_MAX_EXPLICIT_LEVEL]={1,2,3,4,5,6,7,8,9,10};
+ log_verbose("Testing V2L #4 for case %d\n", i);
+ pseudoToU16(srcSize,logicalOrder[i],src);
+ ec = U_ZERO_ERROR;
+ ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR,levels,&ec);
+ if(U_FAILURE(ec)){
+ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n",
+ i, UBIDI_MAX_EXPLICIT_LEVEL, u_errorName(ec));
+ }
+ /* try pre-flighting */
+ destSize = ubidi_writeReordered(bidi,dest,0,UBIDI_OUTPUT_REVERSE,&ec);
+ if(ec!=U_BUFFER_OVERFLOW_ERROR){
+ log_err("Pre-flighting did not give expected error: Expected: U_BUFFER_OVERFLOW_ERROR. Got: %s \n",u_errorName(ec));
+ }else if(destSize!=srcSize){
+ log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);
+ }else{
+ ec = U_ZERO_ERROR;
+ }
+ destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_OUTPUT_REVERSE,&ec);
+ u16ToPseudo(destSize,dest,chars);
+ if(destSize!=srcSize){
+ log_err("ubidi_writeReordered() destSize and srcSize do not match. Dest Size = %d Source Size = %d\n",destSize,srcSize );
+ }else if(strcmp(visualOrder3[i],chars)!=0){
+ log_err("ubidi_writeReordered() did not give expected results for UBIDI_OUTPUT_REVERSE.\n"
+ "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n",
+ logicalOrder[i],visualOrder3[i],chars,formatLevels(bidi, formatChars),i);
+ }
+ }
+ for(i=0;i<LENGTHOF(logicalOrder);i++){
+ int32_t srcSize = (int32_t)strlen(logicalOrder[i]);
+ int32_t destSize = srcSize*2;
+ UChar src[MAXLEN];
+ UChar dest[MAXLEN];
+ char chars[MAXLEN];
+ UBiDiLevel levels[UBIDI_MAX_EXPLICIT_LEVEL]={1,2,3,4,5,6,7,8,9,10};
+ log_verbose("Testing V2L #5 for case %d\n", i);
+ pseudoToU16(srcSize,logicalOrder[i],src);
+ ec = U_ZERO_ERROR;
+ ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR,levels,&ec);
+ if(U_FAILURE(ec)){
+ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n",
+ i, UBIDI_MAX_EXPLICIT_LEVEL, u_errorName(ec));
+ }
+ /* try pre-flighting */
+ destSize = ubidi_writeReordered(bidi,dest,0,UBIDI_DO_MIRRORING+UBIDI_REMOVE_BIDI_CONTROLS,&ec);
+ if(ec!=U_BUFFER_OVERFLOW_ERROR){
+ log_err("Pre-flighting did not give expected error: Expected: U_BUFFER_OVERFLOW_ERROR. Got: %s \n",u_errorName(ec));
+ }else{
+ ec= U_ZERO_ERROR;
+ }
+ destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_DO_MIRRORING+UBIDI_REMOVE_BIDI_CONTROLS,&ec);
+ u16ToPseudo(destSize,dest,chars);
+ if(strcmp(visualOrder4[i],chars)!=0){
+ log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING+UBIDI_REMOVE_BIDI_CONTROLS.\n"
+ "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n",
+ logicalOrder[i],visualOrder4[i],chars,formatLevels(bidi, formatChars),i);
+ }
+ }
+ ubidi_close(bidi);
+
+ log_verbose("\nExiting TestReorder\n\n");
+}
+
+static void
+doTest(UBiDi *pBiDi, int testNumber, const BiDiTestData *test, int32_t lineStart, UBool countRunsFirst) {
+ const uint8_t *dirProps=test->text+lineStart;
+ const UBiDiLevel *levels=test->levels;
+ const uint8_t *visualMap=test->visualMap;
+ int32_t i, len=ubidi_getLength(pBiDi), logicalIndex, runCount = 0;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UBiDiLevel level, level2;
+
+ if (countRunsFirst) {
+ log_verbose("Calling ubidi_countRuns() first.\n");
+
+ runCount = ubidi_countRuns(pBiDi, &errorCode);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_countRuns(tests[%d]): error %s\n", testNumber, myErrorName(errorCode));
+ return;
+ }
+ } else {
+ log_verbose("Calling ubidi_getLogicalMap() first.\n");
+ }
+
+ _testReordering(pBiDi, testNumber);
+
+ for(i=0; i<len; ++i) {
+ log_verbose("%3d %3d %.*s%-3s @%d\n",
+ i, ubidi_getLevelAt(pBiDi, i), ubidi_getLevelAt(pBiDi, i), levelString,
+ dirPropNames[dirProps[i]],
+ ubidi_getVisualIndex(pBiDi, i, &errorCode));
+ }
+
+ log_verbose("\n-----levels:");
+ for(i=0; i<len; ++i) {
+ if(i>0) {
+ log_verbose(",");
+ }
+ log_verbose(" %d", ubidi_getLevelAt(pBiDi, i));
+ }
+
+ log_verbose("\n--reordered:");
+ for(i=0; i<len; ++i) {
+ if(i>0) {
+ log_verbose(",");
+ }
+ log_verbose(" %d", ubidi_getVisualIndex(pBiDi, i, &errorCode));
+ }
+ log_verbose("\n");
+
+ if(test->direction!=ubidi_getDirection(pBiDi)) {
+ log_err("ubidi_getDirection(tests[%d]): wrong direction %d\n", testNumber, ubidi_getDirection(pBiDi));
+ }
+
+ if(test->resultLevel!=ubidi_getParaLevel(pBiDi)) {
+ log_err("ubidi_getParaLevel(tests[%d]): wrong paragraph level %d\n", testNumber, ubidi_getParaLevel(pBiDi));
+ }
+
+ for(i=0; i<len; ++i) {
+ if(levels[i]!=ubidi_getLevelAt(pBiDi, i)) {
+ log_err("ubidi_getLevelAt(tests[%d], %d): wrong level %d, expected %d\n", testNumber, i, ubidi_getLevelAt(pBiDi, i), levels[i]);
+ return;
+ }
+ }
+
+ for(i=0; i<len; ++i) {
+ logicalIndex=ubidi_getVisualIndex(pBiDi, i, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_getVisualIndex(tests[%d], %d): error %s\n", testNumber, i, myErrorName(errorCode));
+ return;
+ }
+ if(visualMap[i]!=logicalIndex) {
+ log_err("ubidi_getVisualIndex(tests[%d], %d): wrong index %d\n", testNumber, i, logicalIndex);
+ return;
+ }
+ }
+
+ if (! countRunsFirst) {
+ runCount=ubidi_countRuns(pBiDi, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_countRuns(tests[%d]): error %s\n", testNumber, myErrorName(errorCode));
+ return;
+ }
+ }
+
+ for(logicalIndex=0; logicalIndex<len;) {
+ level=ubidi_getLevelAt(pBiDi, logicalIndex);
+ ubidi_getLogicalRun(pBiDi, logicalIndex, &logicalIndex, &level2);
+ if(level!=level2) {
+ log_err("ubidi_getLogicalRun(tests[%d], run ending at index %d): "
+ "wrong level %d instead of %d\n",
+ testNumber, logicalIndex, level, level2);
+ }
+ if(--runCount<0) {
+ log_err("\nubidi_getLogicalRun(tests[%d]): wrong number of runs "
+ "compared to %d=ubidi_countRuns()\n",
+ testNumber, ubidi_countRuns(pBiDi, &errorCode));
+ return;
+ }
+ }
+ if(runCount!=0) {
+ log_err("\nubidi_getLogicalRun(tests[%d]): wrong number of runs "
+ "compared to %d=ubidi_getRunCount()\n",
+ testNumber, ubidi_countRuns(pBiDi, &errorCode));
+ return;
+ }
+
+ log_verbose("\n\n");
+}
+
+static void
+_testReordering(UBiDi *pBiDi, int testNumber) {
+ int32_t
+ logicalMap1[MAXLEN], logicalMap2[MAXLEN], logicalMap3[MAXLEN],
+ visualMap1[MAXLEN], visualMap2[MAXLEN], visualMap3[MAXLEN], visualMap4[MAXLEN];
+ UErrorCode errorCode=U_ZERO_ERROR;
+ const UBiDiLevel *levels;
+ int32_t i, length=ubidi_getLength(pBiDi),
+ destLength=ubidi_getResultLength(pBiDi);
+ int32_t runCount, visualIndex, logicalStart, runLength;
+ UBool odd;
+
+ if(length<=0) {
+ return;
+ }
+
+ /* get the logical and visual maps from the object */
+ ubidi_getLogicalMap(pBiDi, logicalMap1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_getLogicalMap(tests[%d]): error %s\n", testNumber, myErrorName(errorCode));
+ return;
+ }
+
+ ubidi_getVisualMap(pBiDi, visualMap1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_getVisualMap(tests[%d]): error %s\n", testNumber, myErrorName(errorCode));
+ return;
+ }
+
+ /* invert them both */
+ ubidi_invertMap(logicalMap1, visualMap2, length);
+ ubidi_invertMap(visualMap1, logicalMap2, destLength);
+
+ /* get them from the levels array, too */
+ levels=ubidi_getLevels(pBiDi, &errorCode);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_getLevels(tests[%d]): error %s\n", testNumber, myErrorName(errorCode));
+ return;
+ }
+
+ ubidi_reorderLogical(levels, length, logicalMap3);
+ ubidi_reorderVisual(levels, length, visualMap3);
+
+ /* get the visual map from the runs, too */
+ runCount=ubidi_countRuns(pBiDi, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_countRuns(tests[%d]): error %s\n", testNumber, myErrorName(errorCode));
+ return;
+ }
+ log_verbose("\n----%2d runs:", runCount);
+ visualIndex=0;
+ for(i=0; i<runCount; ++i) {
+ odd=(UBool)ubidi_getVisualRun(pBiDi, i, &logicalStart, &runLength);
+ log_verbose(" (%c @%d[%d])", odd ? 'R' : 'L', logicalStart, runLength);
+ if(UBIDI_LTR==odd) {
+ do { /* LTR */
+ visualMap4[visualIndex++]=logicalStart++;
+ } while(--runLength>0);
+ } else {
+ logicalStart+=runLength; /* logicalLimit */
+ do { /* RTL */
+ visualMap4[visualIndex++]=--logicalStart;
+ } while(--runLength>0);
+ }
+ }
+ log_verbose("\n");
+
+ /* print all the maps */
+ log_verbose("logical maps:\n");
+ for(i=0; i<length; ++i) {
+ log_verbose("%4d", logicalMap1[i]);
+ }
+ log_verbose("\n");
+ for(i=0; i<length; ++i) {
+ log_verbose("%4d", logicalMap2[i]);
+ }
+ log_verbose("\n");
+ for(i=0; i<length; ++i) {
+ log_verbose("%4d", logicalMap3[i]);
+ }
+
+ log_verbose("\nvisual maps:\n");
+ for(i=0; i<destLength; ++i) {
+ log_verbose("%4d", visualMap1[i]);
+ }
+ log_verbose("\n");
+ for(i=0; i<destLength; ++i) {
+ log_verbose("%4d", visualMap2[i]);
+ }
+ log_verbose("\n");
+ for(i=0; i<length; ++i) {
+ log_verbose("%4d", visualMap3[i]);
+ }
+ log_verbose("\n");
+ for(i=0; i<length; ++i) {
+ log_verbose("%4d", visualMap4[i]);
+ }
+ log_verbose("\n");
+
+ /* check that the indexes are the same between these and ubidi_getLogical/VisualIndex() */
+ for(i=0; i<length; ++i) {
+ if(logicalMap1[i]!=logicalMap2[i]) {
+ log_err("bidi reordering error in tests[%d]: logicalMap1[i]!=logicalMap2[i] at i=%d\n", testNumber, i);
+ break;
+ }
+ if(logicalMap1[i]!=logicalMap3[i]) {
+ log_err("bidi reordering error in tests[%d]: logicalMap1[i]!=logicalMap3[i] at i=%d\n", testNumber, i);
+ break;
+ }
+
+ if(visualMap1[i]!=visualMap2[i]) {
+ log_err("bidi reordering error in tests[%d]: visualMap1[i]!=visualMap2[i] at i=%d\n", testNumber, i);
+ break;
+ }
+ if(visualMap1[i]!=visualMap3[i]) {
+ log_err("bidi reordering error in tests[%d]: visualMap1[i]!=visualMap3[i] at i=%d\n", testNumber, i);
+ break;
+ }
+ if(visualMap1[i]!=visualMap4[i]) {
+ log_err("bidi reordering error in tests[%d]: visualMap1[i]!=visualMap4[i] at i=%d\n", testNumber, i);
+ break;
+ }
+
+ if(logicalMap1[i]!=ubidi_getVisualIndex(pBiDi, i, &errorCode)) {
+ log_err("bidi reordering error in tests[%d]: logicalMap1[i]!=ubidi_getVisualIndex(i) at i=%d\n", testNumber, i);
+ break;
+ }
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_getVisualIndex(tests[%d], %d): error %s\n", testNumber, i, myErrorName(errorCode));
+ break;
+ }
+ if(visualMap1[i]!=ubidi_getLogicalIndex(pBiDi, i, &errorCode)) {
+ log_err("bidi reordering error in tests[%d]: visualMap1[i]!=ubidi_getLogicalIndex(i) at i=%d\n", testNumber, i);
+ break;
+ }
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_getLogicalIndex(tests[%d], %d): error %s\n", testNumber, i, myErrorName(errorCode));
+ break;
+ }
+ }
+}
+
+#define RETURN_IF_BAD_ERRCODE(x) \
+ if (U_FAILURE(errorCode)) { \
+ log_err("\nbad errorCode %d at %s\n", errorCode, (x)); \
+ return; \
+ } \
+
+
+static void doMisc(void) {
+/* Miscellaneous tests to exercize less popular code paths */
+ UBiDi *bidi, *bidiLine;
+ UChar src[MAXLEN], dest[MAXLEN];
+ int32_t srcLen, destLen, runCount, i;
+ UBiDiLevel level;
+ UBiDiDirection dir;
+ int32_t map[MAXLEN];
+ UErrorCode errorCode=U_ZERO_ERROR;
+ static const int32_t srcMap[6] = {0,1,-1,5,4};
+ static const int32_t dstMap[6] = {0,1,-1,-1,4,3};
+
+ bidi = ubidi_openSized(120, 66, &errorCode);
+ if (bidi == NULL) {
+ log_err("Error with openSized(120, 66)\n");
+ return;
+ }
+ bidiLine = ubidi_open();
+ if (bidi == NULL) {
+ log_err("Error with open()\n");
+ return;
+ }
+
+ destLen = ubidi_writeReverse(src, 0, dest, MAXLEN, 0, &errorCode);
+ if (destLen != 0) {
+ log_err("\nwriteReverse should return zero length, ",
+ "returned %d instead\n", destLen);
+ }
+ RETURN_IF_BAD_ERRCODE("#1#");
+
+ ubidi_setPara(bidi, src, 0, UBIDI_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ if (destLen != 0) {
+ log_err("\nwriteReordered should return zero length, ",
+ "returned %d instead\n", destLen);
+ }
+ RETURN_IF_BAD_ERRCODE("#2#");
+
+ srcLen = u_unescape("abc ", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ for (i = 3; i < 6; i++) {
+ level = ubidi_getLevelAt(bidiLine, i);
+ if (level != UBIDI_RTL) {
+ log_err("\nTrailing space at index %d should get paragraph level"
+ "%d, got %d instead\n", i, UBIDI_RTL, level);
+ }
+ }
+ RETURN_IF_BAD_ERRCODE("#3#");
+
+ srcLen = u_unescape("abc def", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ for (i = 3; i < 6; i++) {
+ level = ubidi_getLevelAt(bidiLine, i);
+ if (level != UBIDI_RTL) {
+ log_err("\nTrailing space at index %d should get paragraph level"
+ "%d, got %d instead\n", i, UBIDI_RTL, level);
+ }
+ }
+ RETURN_IF_BAD_ERRCODE("#4#");
+
+ srcLen = u_unescape("abcdefghi ", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ for (i = 3; i < 6; i++) {
+ level = ubidi_getLevelAt(bidiLine, i);
+ if (level != 2) {
+ log_err("\nTrailing char at index %d should get level 2, "
+ "got %d instead\n", i, level);
+ }
+ }
+ RETURN_IF_BAD_ERRCODE("#5#");
+
+ ubidi_setReorderingOptions(bidi, UBIDI_OPTION_REMOVE_CONTROLS);
+ srcLen = u_unescape("\\u200eabc def", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ destLen = ubidi_getResultLength(bidiLine);
+ if (destLen != 5) {
+ log_err("\nWrong result length, should be 5, got %d\n", destLen);
+ }
+ RETURN_IF_BAD_ERRCODE("#6#");
+
+ srcLen = u_unescape("abcdefghi", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR, NULL, &errorCode);
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ dir = ubidi_getDirection(bidiLine);
+ if (dir != UBIDI_LTR) {
+ log_err("\nWrong direction #1, should be %d, got %d\n",
+ UBIDI_LTR, dir);
+ }
+ RETURN_IF_BAD_ERRCODE("#7#");
+
+ ubidi_setPara(bidi, src, 0, UBIDI_LTR, NULL, &errorCode);
+ runCount = ubidi_countRuns(bidi, &errorCode);
+ if (runCount != 0) {
+ log_err("\nWrong number of runs #1, should be 0, got %d\n", runCount);
+ }
+ RETURN_IF_BAD_ERRCODE("#8#");
+
+ srcLen = u_unescape(" ", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ runCount = ubidi_countRuns(bidiLine, &errorCode);
+ if (runCount != 1) {
+ log_err("\nWrong number of runs #2, should be 1, got %d\n", runCount);
+ }
+ RETURN_IF_BAD_ERRCODE("#9#");
+
+ srcLen = u_unescape("a\\u05d0 bc", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ dir = ubidi_getDirection(bidi);
+ if (dir != UBIDI_MIXED) {
+ log_err("\nWrong direction #2, should be %d, got %d\n",
+ UBIDI_MIXED, dir);
+ }
+ dir = ubidi_getDirection(bidiLine);
+ if (dir != UBIDI_MIXED) {
+ log_err("\nWrong direction #3, should be %d, got %d\n",
+ UBIDI_MIXED, dir);
+ }
+ runCount = ubidi_countRuns(bidiLine, &errorCode);
+ if (runCount != 2) {
+ log_err("\nWrong number of runs #3, should be 2, got %d\n", runCount);
+ }
+ RETURN_IF_BAD_ERRCODE("#10#");
+
+ ubidi_invertMap(srcMap, map, 5);
+ if (memcmp(dstMap, map, sizeof(dstMap))) {
+ log_err("\nUnexpected inverted Map, got ");
+ for (i = 0; i < 6; i++) {
+ log_err("%d ", map[i]);
+ }
+ log_err("\n");
+ }
+
+ /* test REMOVE_BIDI_CONTROLS together with DO_MIRRORING */
+ srcLen = u_unescape("abc\\u200e", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN,
+ UBIDI_REMOVE_BIDI_CONTROLS | UBIDI_DO_MIRRORING, &errorCode);
+ if (destLen != 3 || memcmp(dest, src, 3 * sizeof(UChar))) {
+ log_err("\nWrong result #1, should be 'abc', got '%s'\n",
+ aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#11#");
+
+ /* test inverse Bidi with marks and contextual orientation */
+ ubidi_setReorderingMode(bidi, UBIDI_REORDER_INVERSE_LIKE_DIRECT);
+ ubidi_setReorderingOptions(bidi, UBIDI_OPTION_INSERT_MARKS);
+ ubidi_setPara(bidi, src, 0, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ if (destLen != 0) {
+ log_err("\nWrong result #2, length should be 0, got %d\n", destLen);
+ }
+ RETURN_IF_BAD_ERRCODE("#12#");
+ srcLen = u_unescape(" ", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ if (destLen != 3 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #3, should be ' ', got '%s'\n",
+ aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#13#");
+ srcLen = u_unescape("abc", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ if (destLen != 3 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #4, should be 'abc', got '%s'\n",
+ aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#14#");
+ srcLen = u_unescape("\\u05d0\\u05d1", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u05d1\\u05d0", src, MAXLEN);
+ if (destLen != 2 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #5, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#15#");
+ srcLen = u_unescape("abc \\u05d0\\u05d1", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u05d1\\u05d0 abc", src, MAXLEN);
+ if (destLen != 6 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #6, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#16#");
+ srcLen = u_unescape("\\u05d0\\u05d1 abc", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u200fabc \\u05d1\\u05d0", src, MAXLEN);
+ if (destLen != 7 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #7, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#17#");
+ srcLen = u_unescape("\\u05d0\\u05d1 abc .-=", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u200f=-. abc \\u05d1\\u05d0", src, MAXLEN);
+ if (destLen != 11 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #8, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#18#");
+ ubidi_orderParagraphsLTR(bidi, TRUE);
+ srcLen = u_unescape("\n\r \n\rabc\n\\u05d0\\u05d1\rabc \\u05d2\\u05d3\n\r"
+ "\\u05d4\\u05d5 abc\n\\u05d6\\u05d7 abc .-=\r\n"
+ "-* \\u05d8\\u05d9 abc .-=", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\n\r \n\rabc\n\\u05d1\\u05d0\r\\u05d3\\u05d2 abc\n\r"
+ "\\u200fabc \\u05d5\\u05d4\n\\u200f=-. abc \\u05d7\\u05d6\r\n"
+ "\\u200f=-. abc \\u05d9\\u05d8 *-", src, MAXLEN);
+ if (destLen != 57 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #9, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#19#");
+ srcLen = u_unescape("\\u05d0 \t", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u05D0\\u200e \t", src, MAXLEN);
+ if (destLen != 4 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #10, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#20#");
+ srcLen = u_unescape("\\u05d0 123 \t\\u05d1 123 \\u05d2", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u05d0 \\u200e123\\u200e \t\\u05d2 123 \\u05d1", src, MAXLEN);
+ if (destLen != 16 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #11, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#21#");
+ srcLen = u_unescape("\\u05d0 123 \\u0660\\u0661 ab", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u05d0 \\u200e123 \\u200e\\u0660\\u0661 ab", src, MAXLEN);
+ if (destLen != 13 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #12, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#22#");
+ srcLen = u_unescape("ab \t", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u200f\t ab", src, MAXLEN);
+ if (destLen != 5 || memcmp(dest, src, destLen * sizeof(UChar))) {
+ log_err("\nWrong result #13, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ RETURN_IF_BAD_ERRCODE("#23#");
+
+ /* check exceeding para level */
+ ubidi_close(bidi);
+ bidi = ubidi_open();
+ srcLen = u_unescape("A\\u202a\\u05d0\\u202aC\\u202c\\u05d1\\u202cE", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_MAX_EXPLICIT_LEVEL - 1, NULL, &errorCode);
+ level = ubidi_getLevelAt(bidi, 2);
+ if (level != 61) {
+ log_err("\nWrong level at index 2\n, should be 61, got %d\n", level);
+ }
+ RETURN_IF_BAD_ERRCODE("#24#");
+
+ /* check 1-char runs with RUNS_ONLY */
+ ubidi_setReorderingMode(bidi, UBIDI_REORDER_RUNS_ONLY);
+ srcLen = u_unescape("a \\u05d0 b \\u05d1 c \\u05d2 d ", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR, NULL, &errorCode);
+ runCount = ubidi_countRuns(bidi, &errorCode);
+ if (runCount != 14) {
+ log_err("\nWrong number of runs #3, should be 14, got %d\n", runCount);
+ }
+ RETURN_IF_BAD_ERRCODE("#25#");
+
+ ubidi_close(bidi);
+ ubidi_close(bidiLine);
+}
+
+static void
+testFailureRecovery(void) {
+ UErrorCode errorCode;
+ UBiDi *bidi, *bidiLine;
+ UChar src[MAXLEN];
+ int32_t srcLen;
+ UBiDiLevel level;
+ UBiDiReorderingMode rm;
+ static UBiDiLevel myLevels[3] = {6,5,4};
+
+ log_verbose("\nEntering TestFailureRecovery\n\n");
+ errorCode = U_FILE_ACCESS_ERROR;
+ if (ubidi_writeReordered(NULL, NULL, 0, 0, &errorCode) != 0) {
+ log_err("ubidi_writeReordered did not return 0 when passed a failing UErrorCode\n");
+ }
+ if (ubidi_writeReverse(NULL, 0, NULL, 0, 0, &errorCode) != 0) {
+ log_err("ubidi_writeReverse did not return 0 when passed a failing UErrorCode\n");
+ }
+ errorCode = U_ZERO_ERROR;
+ if (ubidi_writeReordered(NULL, NULL, 0, 0, &errorCode) != 0 || errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ubidi_writeReordered did not fail as expected\n");
+ }
+
+ bidi = ubidi_open();
+ srcLen = u_unescape("abc", src, MAXLEN);
+ errorCode = U_ZERO_ERROR;
+ ubidi_setPara(bidi, src, srcLen, UBIDI_DEFAULT_LTR - 1, NULL, &errorCode);
+ if (U_SUCCESS(errorCode)) {
+ log_err("\nubidi_setPara did not fail when passed too big para level\n");
+ }
+ errorCode = U_ZERO_ERROR;
+ if (ubidi_writeReverse(NULL, 0, NULL, 0, 0, &errorCode) != 0 || errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ubidi_writeReverse did not fail as expected\n");
+ }
+ bidiLine = ubidi_open();
+ errorCode = U_ZERO_ERROR;
+ ubidi_setLine(bidi, 0, 6, bidiLine, &errorCode);
+ if (U_SUCCESS(errorCode)) {
+ log_err("\nubidi_setLine did not fail when called before valid setPara()\n");
+ }
+ errorCode = U_ZERO_ERROR;
+ srcLen = u_unescape("abc", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR + 4, NULL, &errorCode);
+ level = ubidi_getLevelAt(bidi, 3);
+ if (level != 0) {
+ log_err("\nubidi_getLevelAt did not fail when called with bad argument\n");
+ }
+ errorCode = U_ZERO_ERROR;
+ ubidi_close(bidi);
+ bidi = ubidi_openSized(-1, 0, &errorCode);
+ if (U_SUCCESS(errorCode)) {
+ log_err("\nubidi_openSized did not fail when called with bad argument\n");
+ }
+ ubidi_close(bidi);
+ bidi = ubidi_openSized(2, 1, &errorCode);
+ errorCode = U_ZERO_ERROR;
+ srcLen = u_unescape("abc", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_LTR, NULL, &errorCode);
+ if (U_SUCCESS(errorCode)) {
+ log_err("\nsetPara did not fail when called with text too long\n");
+ }
+ errorCode = U_ZERO_ERROR;
+ srcLen = u_unescape("=2", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ ubidi_countRuns(bidi, &errorCode);
+ if (U_SUCCESS(errorCode)) {
+ log_err("\nsetPara did not fail when called for too many runs\n");
+ }
+ ubidi_close(bidi);
+ bidi = ubidi_open();
+ rm = ubidi_getReorderingMode(bidi);
+ ubidi_setReorderingMode(bidi, UBIDI_REORDER_DEFAULT - 1);
+ if (rm != ubidi_getReorderingMode(bidi)) {
+ log_err("\nsetReorderingMode with bad argument #1 should have no effect\n");
+ }
+ ubidi_setReorderingMode(bidi, 9999);
+ if (rm != ubidi_getReorderingMode(bidi)) {
+ log_err("\nsetReorderingMode with bad argument #2 should have no effect\n");
+ }
+
+ /* Try a surrogate char */
+ errorCode = U_ZERO_ERROR;
+ srcLen = u_unescape("\\uD800\\uDC00", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, UBIDI_RTL, NULL, &errorCode);
+ if (ubidi_getDirection(bidi) != UBIDI_MIXED) {
+ log_err("\ngetDirection for 1st surrogate char should be MIXED\n");
+ }
+ errorCode = U_ZERO_ERROR;
+ srcLen = u_unescape("abc", src, MAXLEN);
+ ubidi_setPara(bidi, src, srcLen, 5, myLevels, &errorCode);
+ if (U_SUCCESS(errorCode)) {
+ log_err("\nsetPara did not fail when called with bad levels\n");
+ }
+ ubidi_close(bidi);
+ ubidi_close(bidiLine);
+
+ log_verbose("\nExiting TestFailureRecovery\n\n");
+}
+
+static void
+testMultipleParagraphs(void) {
+ static const char* const text = "__ABC\\u001c" /* Para #0 offset 0 */
+ "__\\u05d0DE\\u001c" /* 1 6 */
+ "__123\\u001c" /* 2 12 */
+ "\\u000d\\u000a" /* 3 18 */
+ "FG\\u000d" /* 4 20 */
+ "\\u000d" /* 5 23 */
+ "HI\\u000d\\u000a" /* 6 24 */
+ "\\u000d\\u000a" /* 7 28 */
+ "\\u000a" /* 8 30 */
+ "\\u000a" /* 9 31 */
+ "JK\\u001c"; /* 10 32 */
+ static const int32_t paraCount=11;
+ static const int32_t paraBounds[]={0, 6, 12, 18, 20, 23, 24, 28, 30, 31, 32, 35};
+ static const UBiDiLevel paraLevels[]={UBIDI_LTR, UBIDI_RTL, UBIDI_DEFAULT_LTR, UBIDI_DEFAULT_RTL, 22, 23};
+ static const UBiDiLevel multiLevels[6][11] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
+ {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ {0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0},
+ {22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22},
+ {23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23}};
+ static const char* const text2 = "\\u05d0 1-2\\u001c\\u0630 1-2\\u001c1-2";
+ static const UBiDiLevel levels2[] = {1,1,2,2,2,0, 1,1,2,1,2,0, 2,2,2};
+ static UBiDiLevel myLevels[10] = {0,0,0,0,0,0,0,0,0,0};
+ UBiDiLevel gotLevel;
+ const UBiDiLevel* gotLevels;
+ UBool orderParagraphsLTR;
+ UChar src[MAXLEN], dest[MAXLEN];
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UBiDi* pBidi=ubidi_open();
+ UBiDi* pLine;
+ int32_t srcSize, count, paraStart, paraLimit, paraIndex, length;
+ int32_t srcLen, destLen;
+ int i, j, k;
+
+ log_verbose("\nEntering TestMultipleParagraphs\n\n");
+ u_unescape(text, src, MAXLEN);
+ srcSize=u_strlen(src);
+ ubidi_setPara(pBidi, src, srcSize, UBIDI_LTR, NULL, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ubidi_setPara failed, paraLevel=%d, errorCode %s\n",
+ UBIDI_LTR, u_errorName(errorCode));
+ ubidi_close(pBidi);
+ return;
+ }
+ /* check paragraph count and boundaries */
+ if (paraCount!=(count=ubidi_countParagraphs(pBidi))) {
+ log_err("ubidi_countParagraphs returned %d, should be %d\n",
+ count, paraCount);
+ }
+ for (i=0; i<paraCount; i++) {
+ ubidi_getParagraphByIndex(pBidi, i, &paraStart, &paraLimit, NULL, &errorCode);
+ if ((paraStart!=paraBounds[i]) || (paraLimit!=paraBounds[i+1])) {
+ log_err("Found boundaries of paragraph %d: %d-%d; expected: %d-%d\n",
+ i, paraStart, paraLimit, paraBounds[i], paraBounds[i+1]);
+ }
+ }
+ errorCode=U_ZERO_ERROR;
+ /* check with last paragraph not terminated by B */
+ src[srcSize-1]='L';
+ ubidi_setPara(pBidi, src, srcSize, UBIDI_LTR, NULL, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("2nd ubidi_setPara failed, paraLevel=%d, errorCode %s\n",
+ UBIDI_LTR, u_errorName(errorCode));
+ ubidi_close(pBidi);
+ return;
+ }
+ if (paraCount!=(count=ubidi_countParagraphs(pBidi))) {
+ log_err("2nd ubidi_countParagraphs returned %d, should be %d\n",
+ count, paraCount);
+ }
+ i=paraCount-1;
+ ubidi_getParagraphByIndex(pBidi, i, &paraStart, &paraLimit, NULL, &errorCode);
+ if ((paraStart!=paraBounds[i]) || (paraLimit!=paraBounds[i+1])) {
+ log_err("2nd Found boundaries of paragraph %d: %d-%d; expected: %d-%d\n",
+ i, paraStart, paraLimit, paraBounds[i], paraBounds[i+1]);
+ }
+ errorCode=U_ZERO_ERROR;
+ /* check paraLevel for all paragraphs under various paraLevel specs */
+ for (k=0; k<6; k++) {
+ ubidi_setPara(pBidi, src, srcSize, paraLevels[k], NULL, &errorCode);
+ for (i=0; i<paraCount; i++) {
+ paraIndex=ubidi_getParagraph(pBidi, paraBounds[i], NULL, NULL, &gotLevel, &errorCode);
+ if (paraIndex!=i) {
+ log_err("For paraLevel=%d paragraph=%d, found paragraph index=%d expected=%d\n",
+ paraLevels[k], i, paraIndex, i);
+ }
+ if (gotLevel!=multiLevels[k][i]) {
+ log_err("For paraLevel=%d paragraph=%d, found level=%d expected %d\n",
+ paraLevels[k], i, gotLevel, multiLevels[k][i]);
+ }
+ }
+ gotLevel=ubidi_getParaLevel(pBidi);
+ if (gotLevel!=multiLevels[k][0]) {
+ log_err("For paraLevel=%d getParaLevel=%d, expected %d\n",
+ paraLevels[k], gotLevel, multiLevels[k][0]);
+ }
+ }
+ errorCode=U_ZERO_ERROR;
+ /* check that the result of ubidi_getParaLevel changes if the first
+ * paragraph has a different level
+ */
+ src[0]=0x05d2; /* Hebrew letter Gimel */
+ ubidi_setPara(pBidi, src, srcSize, UBIDI_DEFAULT_LTR, NULL, &errorCode);
+ gotLevel=ubidi_getParaLevel(pBidi);
+ if (gotLevel!=UBIDI_RTL) {
+ log_err("For paraLevel=UBIDI_DEFAULT_LTR getParaLevel=%d, expected=%d\n",
+ gotLevel, UBIDI_RTL);
+ }
+ errorCode=U_ZERO_ERROR;
+ /* check that line cannot overlap paragraph boundaries */
+ pLine=ubidi_open();
+ i=paraBounds[1];
+ k=paraBounds[2]+1;
+ ubidi_setLine(pBidi, i, k, pLine, &errorCode);
+ if (U_SUCCESS(errorCode)) {
+ log_err("For line limits %d-%d got success %s\n",
+ i, k, u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ i=paraBounds[1];
+ k=paraBounds[2];
+ ubidi_setLine(pBidi, i, k, pLine, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("For line limits %d-%d got error %s\n",
+ i, k, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ }
+ /* check level of block separator at end of paragraph when orderParagraphsLTR==FALSE */
+ ubidi_setPara(pBidi, src, srcSize, UBIDI_RTL, NULL, &errorCode);
+ /* get levels through para Bidi block */
+ gotLevels=ubidi_getLevels(pBidi, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("Error on Para getLevels %s\n", u_errorName(errorCode));
+ ubidi_close(pLine);
+ ubidi_close(pBidi);
+ return;
+ }
+ for (i=26; i<32; i++) {
+ if (gotLevels[i]!=UBIDI_RTL) {
+ log_err("For char %d(%04x), level=%d, expected=%d\n",
+ i, src[i], gotLevels[i], UBIDI_RTL);
+ }
+ }
+ /* get levels through para Line block */
+ i=paraBounds[1];
+ k=paraBounds[2];
+ ubidi_setLine(pBidi, i, k, pLine, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("For line limits %d-%d got error %s\n",
+ i, k, u_errorName(errorCode));
+ ubidi_close(pLine);
+ ubidi_close(pBidi);
+ return;
+ }
+ paraIndex=ubidi_getParagraph(pLine, i, &paraStart, &paraLimit, &gotLevel, &errorCode);
+ gotLevels=ubidi_getLevels(pLine, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("Error on Line getLevels %s\n", u_errorName(errorCode));
+ ubidi_close(pLine);
+ ubidi_close(pBidi);
+ return;
+ }
+ length=ubidi_getLength(pLine);
+ if ((gotLevel!=UBIDI_RTL) || (gotLevels[length-1]!=UBIDI_RTL)) {
+ log_err("For paragraph %d with limits %d-%d, paraLevel=%d expected=%d, "
+ "level of separator=%d expected=%d\n",
+ paraIndex, paraStart, paraLimit, gotLevel, UBIDI_RTL, gotLevels[length-1], UBIDI_RTL);
+ }
+ orderParagraphsLTR=ubidi_isOrderParagraphsLTR(pBidi);
+ if (orderParagraphsLTR) {
+ log_err("Found orderParagraphsLTR=%d expected=%d\n", orderParagraphsLTR, FALSE);
+ }
+ ubidi_orderParagraphsLTR(pBidi, TRUE);
+ orderParagraphsLTR=ubidi_isOrderParagraphsLTR(pBidi);
+ if (!orderParagraphsLTR) {
+ log_err("Found orderParagraphsLTR=%d expected=%d\n", orderParagraphsLTR, TRUE);
+ }
+ /* check level of block separator at end of paragraph when orderParagraphsLTR==TRUE */
+ ubidi_setPara(pBidi, src, srcSize, UBIDI_RTL, NULL, &errorCode);
+ /* get levels through para Bidi block */
+ gotLevels=ubidi_getLevels(pBidi, &errorCode);
+ for (i=26; i<32; i++) {
+ if (gotLevels[i]!=0) {
+ log_err("For char %d(%04x), level=%d, expected=%d\n",
+ i, src[i], gotLevels[i], 0);
+ }
+ }
+ errorCode=U_ZERO_ERROR;
+ /* get levels through para Line block */
+ i=paraBounds[1];
+ k=paraBounds[2];
+ ubidi_setLine(pBidi, paraStart, paraLimit, pLine, &errorCode);
+ paraIndex=ubidi_getParagraph(pLine, i, &paraStart, &paraLimit, &gotLevel, &errorCode);
+ gotLevels=ubidi_getLevels(pLine, &errorCode);
+ length=ubidi_getLength(pLine);
+ if ((gotLevel!=UBIDI_RTL) || (gotLevels[length-1]!=0)) {
+ log_err("For paragraph %d with limits %d-%d, paraLevel=%d expected=%d, "
+ "level of separator=%d expected=%d\n",
+ paraIndex, paraStart, paraLimit, gotLevel, UBIDI_RTL, gotLevels[length-1], 0);
+ log_verbose("levels=");
+ for (count=0; count<length; count++) {
+ log_verbose(" %d", gotLevels[count]);
+ }
+ log_verbose("\n");
+ }
+
+ /* test that the concatenation of separate invocations of the bidi code
+ * on each individual paragraph in order matches the levels array that
+ * results from invoking bidi once over the entire multiparagraph tests
+ * (with orderParagraphsLTR false, of course)
+ */
+ u_unescape(text, src, MAXLEN); /* restore original content */
+ srcSize=u_strlen(src);
+ ubidi_orderParagraphsLTR(pBidi, FALSE);
+ ubidi_setPara(pBidi, src, srcSize, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ gotLevels=ubidi_getLevels(pBidi, &errorCode);
+ for (i=0; i<paraCount; i++) {
+ /* use pLine for individual paragraphs */
+ paraStart = paraBounds[i];
+ length = paraBounds[i+1] - paraStart;
+ ubidi_setPara(pLine, src+paraStart, length, UBIDI_DEFAULT_RTL, NULL, &errorCode);
+ for (j=0; j<length; j++) {
+ if ((k=ubidi_getLevelAt(pLine, j)) != (gotLevel=gotLevels[paraStart+j])) {
+ log_err("Checking paragraph concatenation: for paragraph=%d, "
+ "char=%d(%04x), level=%d, expected=%d\n",
+ i, j, src[paraStart+j], k, gotLevel);
+ }
+ }
+ }
+
+ /* ensure that leading numerics in a paragraph are not treated as arabic
+ numerals because of arabic text in a preceding paragraph
+ */
+ u_unescape(text2, src, MAXLEN);
+ srcSize=u_strlen(src);
+ ubidi_orderParagraphsLTR(pBidi, TRUE);
+ ubidi_setPara(pBidi, src, srcSize, UBIDI_RTL, NULL, &errorCode);
+ gotLevels=ubidi_getLevels(pBidi, &errorCode);
+ for (i=0; i<srcSize; i++) {
+ if (gotLevels[i]!=levels2[i]) {
+ log_err("Checking leading numerics: for char %d(%04x), level=%d, expected=%d\n",
+ i, src[i], gotLevels[i], levels2[i]);
+ }
+ }
+
+ /* check handling of whitespace before end of paragraph separator when
+ * orderParagraphsLTR==TRUE, when last paragraph has, and lacks, a terminating B
+ */
+ u_memset(src, 0x0020, MAXLEN);
+ srcSize = 5;
+ ubidi_orderParagraphsLTR(pBidi, TRUE);
+ for (i=0x001c; i<=0x0020; i+=(0x0020-0x001c)) {
+ src[4]=(UChar)i; /* with and without terminating B */
+ for (j=0x0041; j<=0x05d0; j+=(0x05d0-0x0041)) {
+ src[0]=(UChar)j; /* leading 'A' or Alef */
+ for (gotLevel=4; gotLevel<=5; gotLevel++) {
+ /* test even and odd paraLevel */
+ ubidi_setPara(pBidi, src, srcSize, gotLevel, NULL, &errorCode);
+ gotLevels=ubidi_getLevels(pBidi, &errorCode);
+ for (k=1; k<=3; k++) {
+ if (gotLevels[k]!=gotLevel) {
+ log_err("Checking trailing spaces: for leading_char=%04x, "
+ "last_char=%04x, index=%d, level=%d, expected=%d\n",
+ src[0], src[4], k, gotLevels[k], gotLevel);
+ }
+ }
+ }
+ }
+ }
+
+ /* check default orientation when inverse bidi and paragraph starts
+ * with LTR strong char and ends with RTL strong char, with and without
+ * a terminating B
+ */
+ ubidi_setReorderingMode(pBidi, UBIDI_REORDER_INVERSE_LIKE_DIRECT);
+ srcLen = u_unescape("abc \\u05d2\\u05d1\n", src, MAXLEN);
+ ubidi_setPara(pBidi, src, srcLen, UBIDI_DEFAULT_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(pBidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u05d1\\u05d2 abc\n", src, MAXLEN);
+ if (memcmp(src, dest, destLen * sizeof(UChar))) {
+ log_err("\nInvalid output #0, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ srcLen = u_unescape("abc \\u05d2\\u05d1", src, MAXLEN);
+ ubidi_setPara(pBidi, src, srcLen, UBIDI_DEFAULT_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(pBidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("\\u05d1\\u05d2 abc", src, MAXLEN);
+ if (memcmp(src, dest, destLen * sizeof(UChar))) {
+ log_err("\nInvalid output #1, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+
+ /* check multiple paragraphs together with explicit levels
+ */
+ ubidi_setReorderingMode(pBidi, UBIDI_REORDER_DEFAULT);
+ srcLen = u_unescape("ab\\u05d1\\u05d2\n\\u05d3\\u05d4123", src, MAXLEN);
+ ubidi_setPara(pBidi, src, srcLen, UBIDI_LTR, myLevels, &errorCode);
+ destLen = ubidi_writeReordered(pBidi, dest, MAXLEN, 0, &errorCode);
+ srcLen = u_unescape("ab\\u05d2\\u05d1\\n123\\u05d4\\u05d3", src, MAXLEN);
+ if (memcmp(src, dest, destLen * sizeof(UChar))) {
+ log_err("\nInvalid output #2, should be '%s', got '%s'\n",
+ aescstrdup(src, srcLen), aescstrdup(dest, destLen));
+ }
+ count = ubidi_countParagraphs(pBidi);
+ if (count != 2) {
+ log_err("\nInvalid number of paras, should be 2, got %d\n", count);
+ }
+
+ ubidi_close(pLine);
+ ubidi_close(pBidi);
+ log_verbose("\nExiting TestMultipleParagraphs\n\n");
+}
+
+
+/* inverse BiDi ------------------------------------------------------------- */
+
+static int countRoundtrips=0, countNonRoundtrips=0;
+
+#define STRING_TEST_CASE(s) { (s), LENGTHOF(s) }
+
+static void
+testInverse(void) {
+ static const UChar
+ string0[]={ 0x6c, 0x61, 0x28, 0x74, 0x69, 0x6e, 0x20, 0x5d0, 0x5d1, 0x29, 0x5d2, 0x5d3 },
+ string1[]={ 0x6c, 0x61, 0x74, 0x20, 0x5d0, 0x5d1, 0x5d2, 0x20, 0x31, 0x32, 0x33 },
+ string2[]={ 0x6c, 0x61, 0x74, 0x20, 0x5d0, 0x28, 0x5d1, 0x5d2, 0x20, 0x31, 0x29, 0x32, 0x33 },
+ string3[]={ 0x31, 0x32, 0x33, 0x20, 0x5d0, 0x5d1, 0x5d2, 0x20, 0x34, 0x35, 0x36 },
+ string4[]={ 0x61, 0x62, 0x20, 0x61, 0x62, 0x20, 0x661, 0x662 };
+
+ static const struct {
+ const UChar *s;
+ int32_t length;
+ } testCases[]={
+ STRING_TEST_CASE(string0),
+ STRING_TEST_CASE(string1),
+ STRING_TEST_CASE(string2),
+ STRING_TEST_CASE(string3),
+ STRING_TEST_CASE(string4)
+ };
+
+ UBiDi *pBiDi;
+ UErrorCode errorCode;
+ int i;
+
+ log_verbose("\nEntering TestInverse\n\n");
+ pBiDi=ubidi_open();
+ if(pBiDi==NULL) {
+ log_err("unable to open a UBiDi object (out of memory)\n");
+ return;
+ }
+
+ log_verbose("inverse Bidi: testInverse(L) with %u test cases ---\n", LENGTHOF(testCases));
+ for(i=0; i<LENGTHOF(testCases); ++i) {
+ log_verbose("Testing case %d\n", i);
+ errorCode=U_ZERO_ERROR;
+ _testInverseBidi(pBiDi, testCases[i].s, testCases[i].length, 0, &errorCode);
+ }
+
+ log_verbose("inverse Bidi: testInverse(R) with %u test cases ---\n", LENGTHOF(testCases));
+ for(i=0; i<LENGTHOF(testCases); ++i) {
+ log_verbose("Testing case %d\n", i);
+ errorCode=U_ZERO_ERROR;
+ _testInverseBidi(pBiDi, testCases[i].s, testCases[i].length, 1, &errorCode);
+ }
+
+ _testManyInverseBidi(pBiDi, 0);
+ _testManyInverseBidi(pBiDi, 1);
+
+ ubidi_close(pBiDi);
+
+ log_verbose("inverse Bidi: rountrips: %5u\nnon-roundtrips: %5u\n", countRoundtrips, countNonRoundtrips);
+
+ _testWriteReverse();
+
+ _testManyAddedPoints();
+
+ _testMisc();
+
+ log_verbose("\nExiting TestInverse\n\n");
+}
+
+#define COUNT_REPEAT_SEGMENTS 6
+
+static const UChar repeatSegments[COUNT_REPEAT_SEGMENTS][2]={
+ { 0x61, 0x62 }, /* L */
+ { 0x5d0, 0x5d1 }, /* R */
+ { 0x627, 0x628 }, /* AL */
+ { 0x31, 0x32 }, /* EN */
+ { 0x661, 0x662 }, /* AN */
+ { 0x20, 0x20 } /* WS (N) */
+};
+
+static void
+_testManyInverseBidi(UBiDi *pBiDi, UBiDiLevel direction) {
+ UChar text[8]={ 0, 0, 0x20, 0, 0, 0x20, 0, 0 };
+ int i, j, k;
+ UErrorCode errorCode;
+
+ log_verbose("inverse Bidi: testManyInverseBidi(%c) - test permutations of text snippets ---\n",
+ direction==0 ? 'L' : 'R');
+ for(i=0; i<COUNT_REPEAT_SEGMENTS; ++i) {
+ text[0]=repeatSegments[i][0];
+ text[1]=repeatSegments[i][1];
+ for(j=0; j<COUNT_REPEAT_SEGMENTS; ++j) {
+ text[3]=repeatSegments[j][0];
+ text[4]=repeatSegments[j][1];
+ for(k=0; k<COUNT_REPEAT_SEGMENTS; ++k) {
+ text[6]=repeatSegments[k][0];
+ text[7]=repeatSegments[k][1];
+
+ errorCode=U_ZERO_ERROR;
+ log_verbose("inverse Bidi: testManyInverseBidi()[%u %u %u]\n", i, j, k);
+ _testInverseBidi(pBiDi, text, 8, direction, &errorCode);
+ }
+ }
+ }
+}
+
+static void
+_testInverseBidi(UBiDi *pBiDi, const UChar *src, int32_t srcLength,
+ UBiDiLevel direction, UErrorCode *pErrorCode) {
+ UChar visualLTR[MAXLEN], logicalDest[MAXLEN], visualDest[MAXLEN];
+ int32_t ltrLength, logicalLength, visualLength;
+
+ if(direction==0) {
+ log_verbose("inverse Bidi: testInverse(L)\n");
+
+ /* convert visual to logical */
+ ubidi_setInverse(pBiDi, TRUE);
+ if (!ubidi_isInverse(pBiDi)) {
+ log_err("Error while doing ubidi_setInverse(TRUE)\n");
+ }
+ ubidi_setPara(pBiDi, src, srcLength, 0, NULL, pErrorCode);
+ if (src != ubidi_getText(pBiDi)) {
+ log_err("Wrong value returned by ubidi_getText\n");
+ }
+ logicalLength=ubidi_writeReordered(pBiDi, logicalDest, LENGTHOF(logicalDest),
+ UBIDI_DO_MIRRORING|UBIDI_INSERT_LRM_FOR_NUMERIC, pErrorCode);
+ log_verbose(" v ");
+ printUnicode(src, srcLength, ubidi_getLevels(pBiDi, pErrorCode));
+ log_verbose("\n");
+
+ /* convert back to visual LTR */
+ ubidi_setInverse(pBiDi, FALSE);
+ if (ubidi_isInverse(pBiDi)) {
+ log_err("Error while doing ubidi_setInverse(FALSE)\n");
+ }
+ ubidi_setPara(pBiDi, logicalDest, logicalLength, 0, NULL, pErrorCode);
+ visualLength=ubidi_writeReordered(pBiDi, visualDest, LENGTHOF(visualDest),
+ UBIDI_DO_MIRRORING|UBIDI_REMOVE_BIDI_CONTROLS, pErrorCode);
+ } else {
+ log_verbose("inverse Bidi: testInverse(R)\n");
+
+ /* reverse visual from RTL to LTR */
+ ltrLength=ubidi_writeReverse(src, srcLength, visualLTR, LENGTHOF(visualLTR), 0, pErrorCode);
+ log_verbose(" vr");
+ printUnicode(src, srcLength, NULL);
+ log_verbose("\n");
+
+ /* convert visual RTL to logical */
+ ubidi_setInverse(pBiDi, TRUE);
+ ubidi_setPara(pBiDi, visualLTR, ltrLength, 0, NULL, pErrorCode);
+ logicalLength=ubidi_writeReordered(pBiDi, logicalDest, LENGTHOF(logicalDest),
+ UBIDI_DO_MIRRORING|UBIDI_INSERT_LRM_FOR_NUMERIC, pErrorCode);
+ log_verbose(" vl");
+ printUnicode(visualLTR, ltrLength, ubidi_getLevels(pBiDi, pErrorCode));
+ log_verbose("\n");
+
+ /* convert back to visual RTL */
+ ubidi_setInverse(pBiDi, FALSE);
+ ubidi_setPara(pBiDi, logicalDest, logicalLength, 0, NULL, pErrorCode);
+ visualLength=ubidi_writeReordered(pBiDi, visualDest, LENGTHOF(visualDest),
+ UBIDI_DO_MIRRORING|UBIDI_REMOVE_BIDI_CONTROLS|UBIDI_OUTPUT_REVERSE, pErrorCode);
+ }
+ log_verbose(" l ");
+ printUnicode(logicalDest, logicalLength, ubidi_getLevels(pBiDi, pErrorCode));
+ log_verbose("\n");
+ log_verbose(" v ");
+ printUnicode(visualDest, visualLength, NULL);
+ log_verbose("\n");
+
+ /* check and print results */
+ if(U_FAILURE(*pErrorCode)) {
+ log_err("inverse BiDi: *** error %s\n"
+ " turn on verbose mode to see details\n", u_errorName(*pErrorCode));
+ } else if(srcLength==visualLength && memcmp(src, visualDest, srcLength*U_SIZEOF_UCHAR)==0) {
+ ++countRoundtrips;
+ log_verbose(" + roundtripped\n");
+ } else {
+ ++countNonRoundtrips;
+ log_verbose(" * did not roundtrip\n");
+ log_err("inverse BiDi: transformation visual->logical->visual did not roundtrip the text;\n"
+ " turn on verbose mode to see details\n");
+ }
+}
+
+static void
+_testWriteReverse(void) {
+ /* U+064e and U+0650 are combining marks (Mn) */
+ static const UChar forward[]={
+ 0x200f, 0x627, 0x64e, 0x650, 0x20, 0x28, 0x31, 0x29
+ }, reverseKeepCombining[]={
+ 0x29, 0x31, 0x28, 0x20, 0x627, 0x64e, 0x650, 0x200f
+ }, reverseRemoveControlsKeepCombiningDoMirror[]={
+ 0x28, 0x31, 0x29, 0x20, 0x627, 0x64e, 0x650
+ };
+ UChar reverse[10];
+ UErrorCode errorCode;
+ int32_t length;
+
+ /* test ubidi_writeReverse() with "interesting" options */
+ errorCode=U_ZERO_ERROR;
+ length=ubidi_writeReverse(forward, LENGTHOF(forward),
+ reverse, LENGTHOF(reverse),
+ UBIDI_KEEP_BASE_COMBINING,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(reverseKeepCombining) || memcmp(reverse, reverseKeepCombining, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in ubidi_writeReverse(UBIDI_KEEP_BASE_COMBINING): length=%d (should be %d), error code %s\n",
+ length, LENGTHOF(reverseKeepCombining), u_errorName(errorCode));
+ }
+
+ memset(reverse, 0xa5, LENGTHOF(reverse)*U_SIZEOF_UCHAR);
+ errorCode=U_ZERO_ERROR;
+ length=ubidi_writeReverse(forward, LENGTHOF(forward),
+ reverse, LENGTHOF(reverse),
+ UBIDI_REMOVE_BIDI_CONTROLS|UBIDI_DO_MIRRORING|UBIDI_KEEP_BASE_COMBINING,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(reverseRemoveControlsKeepCombiningDoMirror) || memcmp(reverse, reverseRemoveControlsKeepCombiningDoMirror, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in ubidi_writeReverse(UBIDI_REMOVE_BIDI_CONTROLS|UBIDI_DO_MIRRORING|UBIDI_KEEP_BASE_COMBINING):\n"
+ " length=%d (should be %d), error code %s\n",
+ length, LENGTHOF(reverseRemoveControlsKeepCombiningDoMirror), u_errorName(errorCode));
+ }
+}
+
+static void _testManyAddedPoints(void) {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UBiDi *bidi = ubidi_open();
+ UChar text[90], dest[MAXLEN], expected[120];
+ int destLen, i;
+ for (i = 0; i < LENGTHOF(text); i+=3) {
+ text[i] = 0x0061; /* 'a' */
+ text[i+1] = 0x05d0;
+ text[i+2] = 0x0033; /* '3' */
+ }
+ ubidi_setReorderingMode(bidi, UBIDI_REORDER_INVERSE_LIKE_DIRECT);
+ ubidi_setReorderingOptions(bidi, UBIDI_OPTION_INSERT_MARKS);
+ ubidi_setPara(bidi, text, LENGTHOF(text), UBIDI_LTR, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN, 0, &errorCode);
+ for (i = 0; i < LENGTHOF(expected); i+=4) {
+ expected[i] = 0x0061; /* 'a' */
+ expected[i+1] = 0x05d0;
+ expected[i+2] = 0x200e;
+ expected[i+3] = 0x0033; /* '3' */
+ }
+ if (memcmp(dest, expected, destLen * sizeof(UChar))) {
+ log_err("\nInvalid output with many added points, "
+ "expected '%s', got '%s'\n",
+ aescstrdup(expected, LENGTHOF(expected)),
+ aescstrdup(dest, destLen));
+ }
+ ubidi_close(bidi);
+}
+
+static void _testMisc(void) {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UBiDi *bidi = ubidi_open();
+ UChar src[3], dest[MAXLEN], expected[5];
+ int destLen;
+ ubidi_setInverse(bidi, TRUE);
+ src[0] = src[1] = src[2] = 0x0020;
+ ubidi_setPara(bidi, src, LENGTHOF(src), UBIDI_RTL, NULL, &errorCode);
+ destLen = ubidi_writeReordered(bidi, dest, MAXLEN,
+ UBIDI_OUTPUT_REVERSE | UBIDI_INSERT_LRM_FOR_NUMERIC,
+ &errorCode);
+ u_unescape("\\u200f \\u200f", expected, 5);
+ if (memcmp(dest, expected, destLen * sizeof(UChar))) {
+ log_err("\nInvalid output with RLM at both sides, "
+ "expected '%s', got '%s'\n",
+ aescstrdup(expected, LENGTHOF(expected)),
+ aescstrdup(dest, destLen));
+ }
+ ubidi_close(bidi);
+}
+
+/* arabic shaping ----------------------------------------------------------- */
+
+static void
+doArabicShapingTest(void) {
+ static const UChar
+ source[]={
+ 0x31, /* en:1 */
+ 0x627, /* arabic:alef */
+ 0x32, /* en:2 */
+ 0x6f3, /* an:3 */
+ 0x61, /* latin:a */
+ 0x34, /* en:4 */
+ 0
+ }, en2an[]={
+ 0x661, 0x627, 0x662, 0x6f3, 0x61, 0x664, 0
+ }, an2en[]={
+ 0x31, 0x627, 0x32, 0x33, 0x61, 0x34, 0
+ }, logical_alen2an_init_lr[]={
+ 0x31, 0x627, 0x662, 0x6f3, 0x61, 0x34, 0
+ }, logical_alen2an_init_al[]={
+ 0x6f1, 0x627, 0x6f2, 0x6f3, 0x61, 0x34, 0
+ }, reverse_alen2an_init_lr[]={
+ 0x661, 0x627, 0x32, 0x6f3, 0x61, 0x34, 0
+ }, reverse_alen2an_init_al[]={
+ 0x6f1, 0x627, 0x32, 0x6f3, 0x61, 0x6f4, 0
+ };
+ UChar dest[8];
+ UErrorCode errorCode;
+ int32_t length;
+
+ /* test number shaping */
+
+ /* european->arabic */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, en2an, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(en2an)\n");
+ }
+
+ /* arabic->european */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, -1,
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_AN2EN|U_SHAPE_DIGIT_TYPE_AN_EXTENDED,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=u_strlen(source) || memcmp(dest, an2en, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(an2en)\n");
+ }
+
+ /* european->arabic with context, logical order, initial state not AL */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_ALEN2AN_INIT_LR|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, logical_alen2an_init_lr, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(logical_alen2an_init_lr)\n");
+ }
+
+ /* european->arabic with context, logical order, initial state AL */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_ALEN2AN_INIT_AL|U_SHAPE_DIGIT_TYPE_AN_EXTENDED,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, logical_alen2an_init_al, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(logical_alen2an_init_al)\n");
+ }
+
+ /* european->arabic with context, reverse order, initial state not AL */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_ALEN2AN_INIT_LR|U_SHAPE_DIGIT_TYPE_AN|U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, reverse_alen2an_init_lr, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(reverse_alen2an_init_lr)\n");
+ }
+
+ /* european->arabic with context, reverse order, initial state AL */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_ALEN2AN_INIT_AL|U_SHAPE_DIGIT_TYPE_AN_EXTENDED|U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, reverse_alen2an_init_al, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(reverse_alen2an_init_al)\n");
+ }
+
+ /* test noop */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ 0,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, source, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(noop)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, 0,
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=0) {
+ log_err("failure in u_shapeArabic(en2an, sourceLength=0), returned %d/%s\n", u_errorName(errorCode), LENGTHOF(source));
+ }
+
+ /* preflight digit shaping */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ NULL, 0,
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=LENGTHOF(source)) {
+ log_err("failure in u_shapeArabic(en2an preflighting), returned %d/%s instead of %d/U_BUFFER_OVERFLOW_ERROR\n",
+ length, u_errorName(errorCode), LENGTHOF(source));
+ }
+
+ /* test illegal arguments */
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(NULL, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("failure in u_shapeArabic(source=NULL), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, -2,
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("failure in u_shapeArabic(sourceLength=-2), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ NULL, LENGTHOF(dest),
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("failure in u_shapeArabic(dest=NULL), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, -1,
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("failure in u_shapeArabic(destSize=-1), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_RESERVED|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("failure in u_shapeArabic(U_SHAPE_DIGITS_RESERVED), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_RESERVED,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("failure in u_shapeArabic(U_SHAPE_DIGIT_TYPE_RESERVED), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_shapeArabic(source, LENGTHOF(source),
+ (UChar *)(source+2), LENGTHOF(dest), /* overlap source and destination */
+ U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("failure in u_shapeArabic(U_SHAPE_DIGIT_TYPE_RESERVED), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
+ }
+}
+
+static void
+doLamAlefSpecialVLTRArabicShapingTest(void) {
+ static const UChar
+ source[]={
+/*a*/ 0x20 ,0x646,0x622,0x644,0x627,0x20,
+/*b*/ 0x646,0x623,0x64E,0x644,0x627,0x20,
+/*c*/ 0x646,0x627,0x670,0x644,0x627,0x20,
+/*d*/ 0x646,0x622,0x653,0x644,0x627,0x20,
+/*e*/ 0x646,0x625,0x655,0x644,0x627,0x20,
+/*f*/ 0x646,0x622,0x654,0x644,0x627,0x20,
+/*g*/ 0xFEFC,0x639
+ }, shape_near[]={
+ 0x20,0xfee5,0x20,0xfef5,0xfe8d,0x20,0xfee5,0x20,0xfe76,0xfef7,0xfe8d,0x20,
+ 0xfee5,0x20,0x670,0xfefb,0xfe8d,0x20,0xfee5,0x20,0x653,0xfef5,0xfe8d,0x20,
+ 0xfee5,0x20,0x655,0xfef9,0xfe8d,0x20,0xfee5,0x20,0x654,0xfef5,0xfe8d,0x20,
+ 0xfefc,0xfecb
+ }, shape_at_end[]={
+ 0x20,0xfee5,0xfef5,0xfe8d,0x20,0xfee5,0xfe76,0xfef7,0xfe8d,0x20,0xfee5,0x670,
+ 0xfefb,0xfe8d,0x20,0xfee5,0x653,0xfef5,0xfe8d,0x20,0xfee5,0x655,0xfef9,0xfe8d,
+ 0x20,0xfee5,0x654,0xfef5,0xfe8d,0x20,0xfefc,0xfecb,0x20,0x20,0x20,0x20,0x20,0x20
+ }, shape_at_begin[]={
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xfee5,0xfef5,0xfe8d,0x20,0xfee5,0xfe76,
+ 0xfef7,0xfe8d,0x20,0xfee5,0x670,0xfefb,0xfe8d,0x20,0xfee5,0x653,0xfef5,0xfe8d,
+ 0x20,0xfee5,0x655,0xfef9,0xfe8d,0x20,0xfee5,0x654,0xfef5,0xfe8d,0x20,0xfefc,0xfecb
+ }, shape_grow_shrink[]={
+ 0x20,0xfee5,0xfef5,0xfe8d,0x20,0xfee5,0xfe76,0xfef7,0xfe8d,0x20,0xfee5,
+ 0x670,0xfefb,0xfe8d,0x20,0xfee5,0x653,0xfef5,0xfe8d,0x20,0xfee5,0x655,0xfef9,
+ 0xfe8d,0x20,0xfee5,0x654,0xfef5,0xfe8d,0x20,0xfefc,0xfecb
+ }, shape_excepttashkeel_near[]={
+ 0x20,0xfee5,0x20,0xfef5,0xfe8d,0x20,0xfee5,0x20,0xfe76,0xfef7,0xfe8d,0x20,
+ 0xfee5,0x20,0x670,0xfefb,0xfe8d,0x20,0xfee5,0x20,0x653,0xfef5,0xfe8d,0x20,
+ 0xfee5,0x20,0x655,0xfef9,0xfe8d,0x20,0xfee5,0x20,0x654,0xfef5,0xfe8d,0x20,
+ 0xfefc,0xfecb
+ }, shape_excepttashkeel_at_end[]={
+ 0x20,0xfee5,0xfef5,0xfe8d,0x20,0xfee5,0xfe76,0xfef7,0xfe8d,0x20,0xfee5,
+ 0x670,0xfefb,0xfe8d,0x20,0xfee5,0x653,0xfef5,0xfe8d,0x20,0xfee5,0x655,0xfef9,
+ 0xfe8d,0x20,0xfee5,0x654,0xfef5,0xfe8d,0x20,0xfefc,0xfecb,0x20,0x20,0x20,
+ 0x20,0x20,0x20
+ }, shape_excepttashkeel_at_begin[]={
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xfee5,0xfef5,0xfe8d,0x20,0xfee5,0xfe76,
+ 0xfef7,0xfe8d,0x20,0xfee5,0x670,0xfefb,0xfe8d,0x20,0xfee5,0x653,0xfef5,0xfe8d,
+ 0x20,0xfee5,0x655,0xfef9,0xfe8d,0x20,0xfee5,0x654,0xfef5,0xfe8d,0x20,0xfefc,0xfecb
+ }, shape_excepttashkeel_grow_shrink[]={
+ 0x20,0xfee5,0xfef5,0xfe8d,0x20,0xfee5,0xfe76,0xfef7,0xfe8d,0x20,0xfee5,0x670,
+ 0xfefb,0xfe8d,0x20,0xfee5,0x653,0xfef5,0xfe8d,0x20,0xfee5,0x655,0xfef9,0xfe8d,
+ 0x20,0xfee5,0x654,0xfef5,0xfe8d,0x20,0xfefc,0xfecb
+ };
+
+ UChar dest[38];
+ UErrorCode errorCode;
+ int32_t length;
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_LENGTH_FIXED_SPACES_NEAR|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_near) || memcmp(dest, shape_near, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_near)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_LENGTH_FIXED_SPACES_AT_END|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_at_end) || memcmp(dest, shape_at_end, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_at_end)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_at_begin) || memcmp(dest, shape_at_begin, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_at_begin)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_LENGTH_GROW_SHRINK|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || memcmp(dest, shape_grow_shrink, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_grow_shrink)\n");
+ }
+
+ /* ==================== U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED ==================== */
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED|U_SHAPE_LENGTH_FIXED_SPACES_NEAR|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_near) || memcmp(dest, shape_excepttashkeel_near, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_near)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED|U_SHAPE_LENGTH_FIXED_SPACES_AT_END|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_at_end) || memcmp(dest,shape_excepttashkeel_at_end , length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_at_end)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED|U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_at_begin) || memcmp(dest, shape_excepttashkeel_at_begin, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_at_begin)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED|U_SHAPE_LENGTH_GROW_SHRINK|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || memcmp(dest, shape_excepttashkeel_grow_shrink, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_grow_shrink)\n");
+ }
+}
+
+static void
+doTashkeelSpecialVLTRArabicShapingTest(void) {
+ static const UChar
+ source[]={
+ 0x64A,0x628,0x631,0x639,0x20,
+ 0x64A,0x628,0x651,0x631,0x64E,0x639,0x20,
+ 0x64C,0x64A,0x628,0x631,0x64F,0x639,0x20,
+ 0x628,0x670,0x631,0x670,0x639,0x20,
+ 0x628,0x653,0x631,0x653,0x639,0x20,
+ 0x628,0x654,0x631,0x654,0x639,0x20,
+ 0x628,0x655,0x631,0x655,0x639,0x20,
+ }, shape_near[]={
+ 0xfef2,0xfe91,0xfeae,0xfecb,0x20,0xfef2,0xfe91,0xfe7c,0xfeae,0xfe77,0xfecb,
+ 0x20,0xfe72,0xfef2,0xfe91,0xfeae,0xfe79,0xfecb,0x20,0xfe8f,0x670,0xfeae,0x670,
+ 0xfecb,0x20,0xfe8f,0x653,0xfeae,0x653,0xfecb,0x20,0xfe8f,0x654,0xfeae,0x654,
+ 0xfecb,0x20,0xfe8f,0x655,0xfeae,0x655,0xfecb,0x20
+ }, shape_excepttashkeel_near[]={
+ 0xfef2,0xfe91,0xfeae,0xfecb,0x20,0xfef2,0xfe91,0xfe7c,0xfeae,0xfe76,0xfecb,0x20,
+ 0xfe72,0xfef2,0xfe91,0xfeae,0xfe78,0xfecb,0x20,0xfe8f,0x670,0xfeae,0x670,0xfecb,
+ 0x20,0xfe8f,0x653,0xfeae,0x653,0xfecb,0x20,0xfe8f,0x654,0xfeae,0x654,0xfecb,0x20,
+ 0xfe8f,0x655,0xfeae,0x655,0xfecb,0x20
+ };
+
+ UChar dest[43];
+ UErrorCode errorCode;
+ int32_t length;
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_LENGTH_FIXED_SPACES_NEAR|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_near) || memcmp(dest, shape_near, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(TASHKEEL shape_near)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED|U_SHAPE_LENGTH_FIXED_SPACES_NEAR|
+ U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_near) || memcmp(dest, shape_excepttashkeel_near, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(TASHKEEL shape_excepttashkeel_near)\n");
+ }
+}
+
+static void
+doLOGICALArabicDeShapingTest(void) {
+ static const UChar
+ source[]={
+ 0x0020,0x0020,0x0020,0xFE8D,0xFEF5,0x0020,0xFEE5,0x0020,0xFE8D,0xFEF7,0x0020,
+ 0xFED7,0xFEFC,0x0020,0xFEE1,0x0020,0xFE8D,0xFEDF,0xFECC,0xFEAE,0xFE91,0xFEF4,
+ 0xFE94,0x0020,0xFE8D,0xFEDF,0xFEA4,0xFEAE,0xFE93,0x0020,0x0020,0x0020,0x0020
+ }, unshape_near[]={
+ 0x20,0x20,0x20,0x627,0x644,0x622,0x646,0x20,0x627,0x644,0x623,0x642,0x644,0x627,
+ 0x645,0x20,0x627,0x644,0x639,0x631,0x628,0x64a,0x629,0x20,0x627,0x644,0x62d,0x631,
+ 0x629,0x20,0x20,0x20,0x20
+ }, unshape_at_end[]={
+ 0x20,0x20,0x20,0x627,0x644,0x622,0x20,0x646,0x20,0x627,0x644,0x623,0x20,0x642,
+ 0x644,0x627,0x20,0x645,0x20,0x627,0x644,0x639,0x631,0x628,0x64a,0x629,0x20,0x627,
+ 0x644,0x62d,0x631,0x629,0x20
+ }, unshape_at_begin[]={
+ 0x627,0x644,0x622,0x20,0x646,0x20,0x627,0x644,0x623,0x20,0x642,0x644,0x627,0x20,
+ 0x645,0x20,0x627,0x644,0x639,0x631,0x628,0x64a,0x629,0x20,0x627,0x644,0x62d,0x631,
+ 0x629,0x20,0x20,0x20,0x20
+ }, unshape_grow_shrink[]={
+ 0x20,0x20,0x20,0x627,0x644,0x622,0x20,0x646,0x20,0x627,0x644,0x623,0x20,0x642,
+ 0x644,0x627,0x20,0x645,0x20,0x627,0x644,0x639,0x631,0x628,0x64a,0x629,0x20,0x627,
+ 0x644,0x62d,0x631,0x629,0x20,0x20,0x20,0x20
+ };
+
+ UChar dest[36];
+ UErrorCode errorCode;
+ int32_t length;
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_UNSHAPE|U_SHAPE_LENGTH_FIXED_SPACES_NEAR|
+ U_SHAPE_TEXT_DIRECTION_LOGICAL,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_near) || memcmp(dest, unshape_near, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(unshape_near)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_UNSHAPE|U_SHAPE_LENGTH_FIXED_SPACES_AT_END|
+ U_SHAPE_TEXT_DIRECTION_LOGICAL,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_at_end) || memcmp(dest, unshape_at_end, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(unshape_at_end)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_UNSHAPE|U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING|
+ U_SHAPE_TEXT_DIRECTION_LOGICAL,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_at_begin) || memcmp(dest, unshape_at_begin, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(unshape_at_begin)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(source, LENGTHOF(source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_UNSHAPE|U_SHAPE_LENGTH_GROW_SHRINK|
+ U_SHAPE_TEXT_DIRECTION_LOGICAL,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || memcmp(dest, unshape_grow_shrink, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(unshape_grow_shrink)\n");
+ }
+
+}
+
+static void
+doArabicShapingTestForBug5421(void) {
+ static const UChar
+ persian_letters_source[]={
+ 0x0020, 0x0698, 0x067E, 0x0686, 0x06AF, 0x0020
+ }, persian_letters[]={
+ 0x0020, 0xFB8B, 0xFB59, 0xFB7D, 0xFB94, 0x0020
+ }, tashkeel_aggregation_source[]={
+ 0x0020, 0x0628, 0x0651, 0x064E, 0x062A, 0x0631, 0x0645, 0x0020,
+ 0x0628, 0x064E, 0x0651, 0x062A, 0x0631, 0x0645, 0x0020
+ }, tashkeel_aggregation[]={
+ 0x0020, 0xFE90, 0xFC60, 0xFE97, 0xFEAE, 0xFEE3,
+ 0x0020, 0xFE90, 0xFC60, 0xFE97, 0xFEAE, 0xFEE3, 0x0020
+ }, untouched_presentation_source[]={
+ 0x0020 ,0x0627, 0xfe90,0x0020
+ }, untouched_presentation[]={
+ 0x0020,0xfe8D, 0xfe90,0x0020
+ }, untouched_presentation_r_source[]={
+ 0x0020 ,0xfe90, 0x0627, 0x0020
+ }, untouched_presentation_r[]={
+ 0x0020, 0xfe90,0xfe8D,0x0020
+ };
+
+ UChar dest[38];
+ UErrorCode errorCode;
+ int32_t length;
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(persian_letters_source, LENGTHOF(persian_letters_source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(persian_letters) || memcmp(dest, persian_letters, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(persian_letters)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(tashkeel_aggregation_source, LENGTHOF(tashkeel_aggregation_source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_AGGREGATE_TASHKEEL|U_SHAPE_PRESERVE_PRESENTATION|
+ U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED|U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(tashkeel_aggregation) || memcmp(dest, tashkeel_aggregation, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(tashkeel_aggregation)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(untouched_presentation_source, LENGTHOF(untouched_presentation_source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_PRESERVE_PRESENTATION|
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(untouched_presentation) || memcmp(dest, untouched_presentation, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(untouched_presentation)\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ length=u_shapeArabic(untouched_presentation_r_source, LENGTHOF(untouched_presentation_r_source),
+ dest, LENGTHOF(dest),
+ U_SHAPE_PRESERVE_PRESENTATION|
+ U_SHAPE_LETTERS_SHAPE|U_SHAPE_TEXT_DIRECTION_LOGICAL,
+ &errorCode);
+
+ if(U_FAILURE(errorCode) || length!=LENGTHOF(untouched_presentation_r) || memcmp(dest, untouched_presentation_r, length*U_SIZEOF_UCHAR)!=0) {
+ log_err("failure in u_shapeArabic(untouched_presentation_r)\n");
+ }
+}
+
+/* helpers ------------------------------------------------------------------ */
+
+static void initCharFromDirProps(void) {
+ static const UVersionInfo ucd401={ 4, 0, 1, 0 };
+ static UVersionInfo ucdVersion={ 0, 0, 0, 0 };
+
+ /* lazy initialization */
+ if(ucdVersion[0]>0) {
+ return;
+ }
+
+ u_getUnicodeVersion(ucdVersion);
+ if(memcmp(ucdVersion, ucd401, sizeof(UVersionInfo))>=0) {
+ /* Unicode 4.0.1 changes bidi classes for +-/ */
+ charFromDirProp[U_EUROPEAN_NUMBER_SEPARATOR]=0x2b; /* change ES character from / to + */
+ }
+}
+
+/* return a string with characters according to the desired directional properties */
+static UChar *
+getStringFromDirProps(const uint8_t *dirProps, int32_t length, UChar *buffer) {
+ int32_t i;
+
+ initCharFromDirProps();
+
+ /* this part would have to be modified for UTF-x */
+ for(i=0; i<length; ++i) {
+ buffer[i]=charFromDirProp[dirProps[i]];
+ }
+ buffer[length]=0;
+ return buffer;
+}
+
+static void printUnicode(const UChar *s, int32_t length, const UBiDiLevel *levels) {
+ int32_t i;
+
+ log_verbose("{ ");
+ for(i=0; i<length; ++i) {
+ if(levels!=NULL) {
+ log_verbose("%4x.%u ", s[i], levels[i]);
+ } else {
+ log_verbose("%4x ", s[i]);
+ }
+ }
+ log_verbose(" }");
+}
+
+/* new BIDI API */
+
+/* Reordering Mode BiDi --------------------------------------------------------- */
+
+static const UBiDiLevel paraLevels[] = { UBIDI_LTR, UBIDI_RTL };
+
+static UBool
+assertSuccessful(const char* message, UErrorCode* rc) {
+ if (rc != NULL && U_FAILURE(*rc)) {
+ log_err("%s() failed with error %s.\n", message, myErrorName(*rc));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static UBool
+assertStringsEqual(const char* expected, const char* actual, const char* src,
+ const char* mode, const char* option, UBiDi* pBiDi) {
+ if (uprv_strcmp(expected, actual)) {
+ char formatChars[MAXLEN];
+ log_err("\nActual and expected output mismatch.\n"
+ "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %d %s\n%20s %u\n%20s %d %s\n",
+ "Input:", src,
+ "Actual output:", actual,
+ "Expected output:", expected,
+ "Levels:", formatLevels(pBiDi, formatChars),
+ "Reordering mode:", ubidi_getReorderingMode(pBiDi), mode,
+ "Paragraph level:", ubidi_getParaLevel(pBiDi),
+ "Reordering option:", ubidi_getReorderingOptions(pBiDi), option);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static UBiDi*
+getBiDiObject(void) {
+ UBiDi* pBiDi = ubidi_open();
+ if (pBiDi == NULL) {
+ log_err("Unable to allocate a UBiDi object. Tests are skipped.\n");
+ }
+ return pBiDi;
+}
+
+#define MAKE_ITEMS(val) val, #val
+
+static const struct {
+ UBiDiReorderingMode value;
+ const char* description;
+}
+modes[] = {
+ { MAKE_ITEMS(UBIDI_REORDER_GROUP_NUMBERS_WITH_R) },
+ { MAKE_ITEMS(UBIDI_REORDER_INVERSE_LIKE_DIRECT) },
+ { MAKE_ITEMS(UBIDI_REORDER_NUMBERS_SPECIAL) },
+ { MAKE_ITEMS(UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL) },
+ { MAKE_ITEMS(UBIDI_REORDER_INVERSE_NUMBERS_AS_L) }
+};
+static const struct {
+ uint32_t value;
+ const char* description;
+}
+options[] = {
+ { MAKE_ITEMS(UBIDI_OPTION_INSERT_MARKS) },
+ { MAKE_ITEMS(0) }
+};
+
+#define TC_COUNT LENGTHOF(textIn)
+#define MODES_COUNT LENGTHOF(modes)
+#define OPTIONS_COUNT LENGTHOF(options)
+#define LEVELS_COUNT LENGTHOF(paraLevels)
+
+static const char* const textIn[] = {
+/* (0) 123 */
+ "123",
+/* (1) .123->4.5 */
+ ".123->4.5",
+/* (2) 678 */
+ "678",
+/* (3) .678->8.9 */
+ ".678->8.9",
+/* (4) JIH1.2,3MLK */
+ "JIH1.2,3MLK",
+/* (5) FE.>12-> */
+ "FE.>12->",
+/* (6) JIH.>12->a */
+ "JIH.>12->a",
+/* (7) CBA.>67->89=a */
+ "CBA.>67->89=a",
+/* (8) CBA.123->xyz */
+ "CBA.123->xyz",
+/* (9) .>12->xyz */
+ ".>12->xyz",
+/* (10) a.>67->xyz */
+ "a.>67->xyz",
+/* (11) 123JIH */
+ "123JIH",
+/* (12) 123 JIH */
+ "123 JIH"
+};
+
+static const char* const textOut[] = {
+/* TC 0: 123 */
+ "123", /* (0) */
+/* TC 1: .123->4.5 */
+ ".123->4.5", /* (1) */
+ "4.5<-123.", /* (2) */
+/* TC 2: 678 */
+ "678", /* (3) */
+/* TC 3: .678->8.9 */
+ ".8.9<-678", /* (4) */
+ "8.9<-678.", /* (5) */
+ ".678->8.9", /* (6) */
+/* TC 4: MLK1.2,3JIH */
+ "KLM1.2,3HIJ", /* (7) */
+/* TC 5: FE.>12-> */
+ "12<.EF->", /* (8) */
+ "<-12<.EF", /* (9) */
+ "EF.>@12->", /* (10) */
+/* TC 6: JIH.>12->a */
+ "12<.HIJ->a", /* (11) */
+ "a<-12<.HIJ", /* (12) */
+ "HIJ.>@12->a", /* (13) */
+ "a&<-12<.HIJ", /* (14) */
+/* TC 7: CBA.>67->89=a */
+ "ABC.>@67->89=a", /* (15) */
+ "a=89<-67<.ABC", /* (16) */
+ "a&=89<-67<.ABC", /* (17) */
+ "89<-67<.ABC=a", /* (18) */
+/* TC 8: CBA.123->xyz */
+ "123.ABC->xyz", /* (19) */
+ "xyz<-123.ABC", /* (20) */
+ "ABC.@123->xyz", /* (21) */
+ "xyz&<-123.ABC", /* (22) */
+/* TC 9: .>12->xyz */
+ ".>12->xyz", /* (23) */
+ "xyz<-12<.", /* (24) */
+ "xyz&<-12<.", /* (25) */
+/* TC 10: a.>67->xyz */
+ "a.>67->xyz", /* (26) */
+ "a.>@67@->xyz", /* (27) */
+ "xyz<-67<.a", /* (28) */
+/* TC 11: 123JIH */
+ "123HIJ", /* (29) */
+ "HIJ123", /* (30) */
+/* TC 12: 123 JIH */
+ "123 HIJ", /* (31) */
+ "HIJ 123", /* (32) */
+};
+
+#define NO UBIDI_MAP_NOWHERE
+#define MAX_MAP_LENGTH 20
+
+static const int32_t forwardMap[][MAX_MAP_LENGTH] = {
+/* TC 0: 123 */
+ { 0, 1, 2 }, /* (0) */
+/* TC 1: .123->4.5 */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (1) */
+ { 8, 5, 6, 7, 4, 3, 0, 1, 2 }, /* (2) */
+/* TC 2: 678 */
+ { 0, 1, 2 }, /* (3) */
+/* TC 3: .678->8.9 */
+ { 0, 6, 7, 8, 5, 4, 1, 2, 3 }, /* (4) */
+ { 8, 5, 6, 7, 4, 3, 0, 1, 2 }, /* (5) */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (6) */
+/* TC 4: MLK1.2,3JIH */
+ { 10, 9, 8, 3, 4, 5, 6, 7, 2, 1, 0 }, /* (7) */
+/* TC 5: FE.>12-> */
+ { 5, 4, 3, 2, 0, 1, 6, 7 }, /* (8) */
+ { 7, 6, 5, 4, 2, 3, 1, 0 }, /* (9) */
+ { 1, 0, 2, 3, 5, 6, 7, 8 }, /* (10) */
+/* TC 6: JIH.>12->a */
+ { 6, 5, 4, 3, 2, 0, 1, 7, 8, 9 }, /* (11) */
+ { 9, 8, 7, 6, 5, 3, 4, 2, 1, 0 }, /* (12) */
+ { 2, 1, 0, 3, 4, 6, 7, 8, 9, 10 }, /* (13) */
+ { 10, 9, 8, 7, 6, 4, 5, 3, 2, 0 }, /* (14) */
+/* TC 7: CBA.>67->89=a */
+ { 2, 1, 0, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13 }, /* (15) */
+ { 12, 11, 10, 9, 8, 6, 7, 5, 4, 2, 3, 1, 0 }, /* (16) */
+ { 13, 12, 11, 10, 9, 7, 8, 6, 5, 3, 4, 2, 0 }, /* (17) */
+ { 10, 9, 8, 7, 6, 4, 5, 3, 2, 0, 1, 11, 12 }, /* (18) */
+/* TC 8: CBA.123->xyz */
+ { 6, 5, 4, 3, 0, 1, 2, 7, 8, 9, 10, 11 }, /* (19) */
+ { 11, 10, 9, 8, 5, 6, 7, 4, 3, 0, 1, 2 }, /* (20) */
+ { 2, 1, 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 }, /* (21) */
+ { 12, 11, 10, 9, 6, 7, 8, 5, 4, 0, 1, 2 }, /* (22) */
+/* TC 9: .>12->xyz */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (23) */
+ { 8, 7, 5, 6, 4, 3, 0, 1, 2 }, /* (24) */
+ { 9, 8, 6, 7, 5, 4, 0, 1, 2 }, /* (25) */
+/* TC 10: a.>67->xyz */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, /* (26) */
+ { 0, 1, 2, 4, 5, 7, 8, 9, 10, 11 }, /* (27) */
+ { 9, 8, 7, 5, 6, 4, 3, 0, 1, 2 }, /* (28) */
+/* TC 11: 123JIH */
+ { 0, 1, 2, 5, 4, 3 }, /* (29) */
+ { 3, 4, 5, 2, 1, 0 }, /* (30) */
+/* TC 12: 123 JIH */
+ { 0, 1, 2, 3, 6, 5, 4 }, /* (31) */
+ { 4, 5, 6, 3, 2, 1, 0 }, /* (32) */
+};
+
+static const int32_t inverseMap[][MAX_MAP_LENGTH] = {
+/* TC 0: 123 */
+ { 0, 1, 2 }, /* (0) */
+/* TC 1: .123->4.5 */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (1) */
+ { 6, 7, 8, 5, 4, 1, 2, 3, 0 }, /* (2) */
+/* TC 2: 678 */
+ { 0, 1, 2 }, /* (3) */
+/* TC 3: .678->8.9 */
+ { 0, 6, 7, 8, 5, 4, 1, 2, 3 }, /* (4) */
+ { 6, 7, 8, 5, 4, 1, 2, 3, 0 }, /* (5) */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (6) */
+/* TC 4: MLK1.2,3JIH */
+ { 10, 9, 8, 3, 4, 5, 6, 7, 2, 1, 0 }, /* (7) */
+/* TC 5: FE.>12-> */
+ { 4, 5, 3, 2, 1, 0, 6, 7 }, /* (8) */
+ { 7, 6, 4, 5, 3, 2, 1, 0 }, /* (9) */
+ { 1, 0, 2, 3, NO, 4, 5, 6, 7 }, /* (10) */
+/* TC 6: JIH.>12->a */
+ { 5, 6, 4, 3, 2, 1, 0, 7, 8, 9 }, /* (11) */
+ { 9, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (12) */
+ { 2, 1, 0, 3, 4, NO, 5, 6, 7, 8, 9 }, /* (13) */
+ { 9, NO, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (14) */
+/* TC 7: CBA.>67->89=a */
+ { 2, 1, 0, 3, 4, NO, 5, 6, 7, 8, 9, 10, 11, 12 }, /* (15) */
+ { 12, 11, 9, 10, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (16) */
+ { 12, NO, 11, 9, 10, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (17) */
+ { 9, 10, 8, 7, 5, 6, 4, 3, 2, 1, 0, 11, 12 }, /* (18) */
+/* TC 8: CBA.123->xyz */
+ { 4, 5, 6, 3, 2, 1, 0, 7, 8, 9, 10, 11 }, /* (19) */
+ { 9, 10, 11, 8, 7, 4, 5, 6, 3, 2, 1, 0 }, /* (20) */
+ { 2, 1, 0, 3, NO, 4, 5, 6, 7, 8, 9, 10, 11 }, /* (21) */
+ { 9, 10, 11, NO, 8, 7, 4, 5, 6, 3, 2, 1, 0 }, /* (22) */
+/* TC 9: .>12->xyz */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (23) */
+ { 6, 7, 8, 5, 4, 2, 3, 1, 0 }, /* (24) */
+ { 6, 7, 8, NO, 5, 4, 2, 3, 1, 0 }, /* (25) */
+/* TC 10: a.>67->xyz */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, /* (26) */
+ { 0, 1, 2, NO, 3, 4, NO, 5, 6, 7, 8, 9 }, /* (27) */
+ { 7, 8, 9, 6, 5, 3, 4, 2, 1, 0 }, /* (28) */
+/* TC 11: 123JIH */
+ { 0, 1, 2, 5, 4, 3 }, /* (29) */
+ { 5, 4, 3, 0, 1, 2 }, /* (30) */
+/* TC 12: 123 JIH */
+ { 0, 1, 2, 3, 6, 5, 4 }, /* (31) */
+ { 6, 5, 4, 3, 0, 1, 2 }, /* (32) */
+};
+
+static const char outIndices[TC_COUNT][MODES_COUNT - 1][OPTIONS_COUNT]
+ [LEVELS_COUNT] = {
+ { /* TC 0: 123 */
+ {{ 0, 0}, { 0, 0}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 0, 0}, { 0, 0}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 0, 0}, { 0, 0}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 0, 0}, { 0, 0}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 1: .123->4.5 */
+ {{ 1, 2}, { 1, 2}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 2}, { 1, 2}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 2}, { 1, 2}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 2}, { 1, 2}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 2: 678 */
+ {{ 3, 3}, { 3, 3}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 3, 3}, { 3, 3}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 3, 3}, { 3, 3}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 3, 3}, { 3, 3}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 3: .678->8.9 */
+ {{ 6, 5}, { 6, 5}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 4, 5}, { 4, 5}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 6, 5}, { 6, 5}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 6, 5}, { 6, 5}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 4: MLK1.2,3JIH */
+ {{ 7, 7}, { 7, 7}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 7, 7}, { 7, 7}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 7, 7}, { 7, 7}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 7, 7}, { 7, 7}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 5: FE.>12-> */
+ {{ 8, 9}, { 8, 9}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{10, 9}, { 8, 9}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 8, 9}, { 8, 9}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{10, 9}, { 8, 9}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 6: JIH.>12->a */
+ {{11, 12}, {11, 12}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{13, 14}, {11, 12}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{11, 12}, {11, 12}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{13, 14}, {11, 12}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 7: CBA.>67->89=a */
+ {{18, 16}, {18, 16}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{18, 17}, {18, 16}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{18, 16}, {18, 16}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{15, 17}, {18, 16}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 8: CBA.>124->xyz */
+ {{19, 20}, {19, 20}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{21, 22}, {19, 20}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{19, 20}, {19, 20}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{21, 22}, {19, 20}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 9: .>12->xyz */
+ {{23, 24}, {23, 24}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{23, 25}, {23, 24}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{23, 24}, {23, 24}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{23, 25}, {23, 24}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 10: a.>67->xyz */
+ {{26, 26}, {26, 26}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{26, 27}, {26, 28}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{26, 28}, {26, 28}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{26, 27}, {26, 28}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 11: 124JIH */
+ {{30, 30}, {30, 30}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{29, 30}, {29, 30}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{30, 30}, {30, 30}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{30, 30}, {30, 30}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ },
+ { /* TC 12: 124 JIH */
+ {{32, 32}, {32, 32}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{31, 32}, {31, 32}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{31, 32}, {31, 32}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{31, 32}, {31, 32}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ }
+};
+
+static UBool
+assertRoundTrip(UBiDi *pBiDi, int32_t tc, int32_t outIndex, const char *srcChars,
+ const char *destChars, const UChar *dest, int32_t destLen,
+ int mode, int option, UBiDiLevel level) {
+
+ static const char roundtrip[TC_COUNT][MODES_COUNT][OPTIONS_COUNT]
+ [LEVELS_COUNT] = {
+ { /* TC 0: 123 */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 1: .123->4.5 */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 2: 678 */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 3: .678->8.9 */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 0, 0}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 4: MLK1.2,3JIH */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 5: FE.>12-> */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 0, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 6: JIH.>12->a */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 0, 0}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 7: CBA.>67->89=a */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 0, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 0, 0}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 8: CBA.>123->xyz */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 0, 0}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 9: .>12->xyz */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 0}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 10: a.>67->xyz */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 0}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 11: 123JIH */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ },
+ { /* TC 12: 123 JIH */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */
+ {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */
+ }
+ };
+
+ #define SET_ROUND_TRIP_MODE(mode) \
+ ubidi_setReorderingMode(pBiDi, mode); \
+ desc = #mode; \
+ break;
+
+ UErrorCode rc = U_ZERO_ERROR;
+ UChar dest2[MAXLEN];
+ int32_t destLen2;
+ const char* desc;
+ char destChars2[MAXLEN];
+ char destChars3[MAXLEN];
+
+ switch (modes[mode].value) {
+ case UBIDI_REORDER_NUMBERS_SPECIAL:
+ SET_ROUND_TRIP_MODE(UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL)
+ case UBIDI_REORDER_GROUP_NUMBERS_WITH_R:
+ SET_ROUND_TRIP_MODE(UBIDI_REORDER_GROUP_NUMBERS_WITH_R)
+ case UBIDI_REORDER_RUNS_ONLY:
+ SET_ROUND_TRIP_MODE(UBIDI_REORDER_RUNS_ONLY)
+ case UBIDI_REORDER_INVERSE_NUMBERS_AS_L:
+ SET_ROUND_TRIP_MODE(UBIDI_REORDER_DEFAULT)
+ case UBIDI_REORDER_INVERSE_LIKE_DIRECT:
+ SET_ROUND_TRIP_MODE(UBIDI_REORDER_DEFAULT)
+ case UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL:
+ SET_ROUND_TRIP_MODE(UBIDI_REORDER_NUMBERS_SPECIAL)
+ default:
+ SET_ROUND_TRIP_MODE(UBIDI_REORDER_INVERSE_LIKE_DIRECT)
+ }
+ ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_REMOVE_CONTROLS);
+
+ ubidi_setPara(pBiDi, dest, destLen, level, NULL, &rc);
+ assertSuccessful("ubidi_setPara", &rc);
+ *dest2 = 0;
+ destLen2 = ubidi_writeReordered(pBiDi, dest2, MAXLEN, UBIDI_DO_MIRRORING,
+ &rc);
+ assertSuccessful("ubidi_writeReordered", &rc);
+
+ u16ToPseudo(destLen, dest, destChars3);
+ u16ToPseudo(destLen2, dest2, destChars2);
+ checkWhatYouCan(pBiDi, destChars3, destChars2);
+ if (strcmp(srcChars, destChars2)) {
+ if (roundtrip[tc][mode][option][level]) {
+ log_err("\nRound trip failed for case=%d mode=%d option=%d.\n"
+ "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %s"
+ "\n%20s %u\n", tc, mode, option,
+ "Original text:", srcChars,
+ "Round-tripped text:", destChars2,
+ "Intermediate text:", destChars3,
+ "Reordering mode:", modes[mode].description,
+ "Reordering option:", options[option].description,
+ "Paragraph level:", level);
+ }
+ else {
+ log_verbose("\nExpected round trip failure for case=%d mode=%d option=%d.\n"
+ "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %s"
+ "\n%20s %u\n", tc, mode, option,
+ "Original text:", srcChars,
+ "Round-tripped text:", destChars2,
+ "Intermediate text:", destChars3,
+ "Reordering mode:", modes[mode].description,
+ "Reordering option:", options[option].description,
+ "Paragraph level:", level);
+ }
+ return FALSE;
+ }
+ if (!checkResultLength(pBiDi, destChars, destChars2, destLen2,
+ desc, "UBIDI_OPTION_REMOVE_CONTROLS", level)) {
+ return FALSE;
+ }
+ if (outIndex > -1 && !checkMaps(pBiDi, outIndex, srcChars, destChars,
+ desc, "UBIDI_OPTION_REMOVE_CONTROLS",
+ level, FALSE)) {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static UBool
+checkResultLength(UBiDi *pBiDi, const char *srcChars, const char *destChars,
+ int32_t destLen, const char* mode,
+ const char* option, UBiDiLevel level) {
+ int32_t actualLen;
+ if (strcmp(mode, "UBIDI_REORDER_INVERSE_NUMBERS_AS_L") == 0)
+ actualLen = strlen(destChars);
+ else
+ actualLen = ubidi_getResultLength(pBiDi);
+ if (actualLen != destLen) {
+ log_err("\nubidi_getResultLength failed.\n%20s %7d\n%20s %7d\n"
+ "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %u\n",
+ "Expected:", destLen, "Actual:", actualLen,
+ "Input:", srcChars, "Output:", destChars,
+ "Reordering mode:", mode, "Reordering option:", option,
+ "Paragraph level:", level);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void
+testReorderRunsOnly(void) {
+ static const struct {
+ const char* textIn;
+ const char* textOut[2][2];
+ const char noroundtrip[2];
+ } testCases[] = {
+ {"ab 234 896 de", {{"de 896 ab 234", "de 896 ab 234"}, /*0*/
+ {"ab 234 @896@ de", "de 896 ab 234"}}, {0, 0}},
+ {"abcGHI", {{"GHIabc", "GHIabc"}, {"GHIabc", "GHIabc"}}, {0, 0}}, /*1*/
+ {"a.>67->", {{"<-67<.a", "<-67<.a"}, {"<-67<.a", "<-67<.a"}}, {0, 0}}, /*2*/
+ {"-=%$123/ *", {{"* /%$123=-", "* /%$123=-"}, /*3*/
+ {"* /%$123=-", "* /%$123=-"}}, {0, 0}},
+ {"abc->12..>JKL", {{"JKL<..12<-abc", "JKL<..abc->12"}, /*4*/
+ {"JKL<..12<-abc", "JKL<..abc->12"}}, {0, 0}},
+ {"JKL->12..>abc", {{"abc<..JKL->12", "abc<..12<-JKL"}, /*5*/
+ {"abc<..JKL->12", "abc<..12<-JKL"}}, {0, 0}},
+ {"123->abc", {{"abc<-123", "abc<-123"}, /*6*/
+ {"abc&<-123", "abc<-123"}}, {1, 0}},
+ {"123->JKL", {{"JKL<-123", "123->JKL"}, /*7*/
+ {"JKL<-123", "JKL<-@123"}}, {0, 1}},
+ {"*>12.>34->JKL", {{"JKL<-34<.12<*", "12.>34->JKL<*"}, /*8*/
+ {"JKL<-34<.12<*", "JKL<-@34<.12<*"}}, {0, 1}},
+ {"*>67.>89->JKL", {{"67.>89->JKL<*", "67.>89->JKL<*"}, /*9*/
+ {"67.>89->JKL<*", "67.>89->JKL<*"}}, {0, 0}},
+ {"* /abc-=$%123", {{"$%123=-abc/ *", "abc-=$%123/ *"}, /*10*/
+ {"$%123=-abc/ *", "abc-=$%123/ *"}}, {0, 0}},
+ {"* /$%def-=123", {{"123=-def%$/ *", "def-=123%$/ *"}, /*11*/
+ {"123=-def%$/ *", "def-=123%$/ *"}}, {0, 0}},
+ {"-=GHI* /123%$", {{"GHI* /123%$=-", "123%$/ *GHI=-"}, /*12*/
+ {"GHI* /123%$=-", "123%$/ *GHI=-"}}, {0, 0}},
+ {"-=%$JKL* /123", {{"JKL* /%$123=-", "123/ *JKL$%=-"}, /*13*/
+ {"JKL* /%$123=-", "123/ *JKL$%=-"}}, {0, 0}},
+ {"ab =#CD *?450", {{"CD *?450#= ab", "450?* CD#= ab"}, /*14*/
+ {"CD *?450#= ab", "450?* CD#= ab"}}, {0, 0}},
+ {"ab 234 896 de", {{"de 896 ab 234", "de 896 ab 234"}, /*15*/
+ {"ab 234 @896@ de", "de 896 ab 234"}}, {0, 0}},
+ {"abc-=%$LMN* /123", {{"LMN* /%$123=-abc", "123/ *LMN$%=-abc"}, /*16*/
+ {"LMN* /%$123=-abc", "123/ *LMN$%=-abc"}}, {0, 0}},
+ {"123->JKL&MN&P", {{"JKLMNP<-123", "123->JKLMNP"}, /*17*/
+ {"JKLMNP<-123", "JKLMNP<-@123"}}, {0, 1}},
+ {"123", {{"123", "123"}, /* just one run */ /*18*/
+ {"123", "123"}}, {0, 0}}
+ };
+ UBiDi *pBiDi = getBiDiObject();
+ UBiDi *pL2VBiDi = getBiDiObject();
+ UChar src[MAXLEN], dest[MAXLEN], visual1[MAXLEN], visual2[MAXLEN];
+ char destChars[MAXLEN], vis1Chars[MAXLEN], vis2Chars[MAXLEN];
+ int32_t srcLen, destLen, vis1Len, vis2Len, option, i, j, nCases, paras;
+ UErrorCode rc = U_ZERO_ERROR;
+ UBiDiLevel level;
+
+ log_verbose("\nEntering TestReorderRunsOnly\n\n");
+
+ if(!pL2VBiDi) {
+ ubidi_close(pBiDi); /* in case this one was allocated */
+ return;
+ }
+ ubidi_setReorderingMode(pBiDi, UBIDI_REORDER_RUNS_ONLY);
+ ubidi_setReorderingOptions(pL2VBiDi, UBIDI_OPTION_REMOVE_CONTROLS);
+
+ for (option = 0; option < 2; option++) {
+ ubidi_setReorderingOptions(pBiDi, option==0 ? UBIDI_OPTION_REMOVE_CONTROLS
+ : UBIDI_OPTION_INSERT_MARKS);
+ for (i = 0, nCases = LENGTHOF(testCases); i < nCases; i++) {
+ srcLen = strlen(testCases[i].textIn);
+ pseudoToU16(srcLen, testCases[i].textIn, src);
+ for(j = 0; j < 2; j++) {
+ log_verbose("Now doing test for option %d, case %d, level %d\n",
+ i, option, j);
+ level = paraLevels[j];
+ ubidi_setPara(pBiDi, src, srcLen, level, NULL, &rc);
+ assertSuccessful("ubidi_setPara", &rc);
+ *dest = 0;
+ destLen = ubidi_writeReordered(pBiDi, dest, MAXLEN, UBIDI_DO_MIRRORING, &rc);
+ assertSuccessful("ubidi_writeReordered", &rc);
+ u16ToPseudo(destLen, dest, destChars);
+ checkWhatYouCan(pBiDi, testCases[i].textIn, destChars);
+ assertStringsEqual(testCases[i].textOut[option][level], destChars,
+ testCases[i].textIn, "UBIDI_REORDER_RUNS_ONLY",
+ option==0 ? "0" : "UBIDI_OPTION_INSERT_MARKS",
+ pBiDi);
+
+ if((option==0) && testCases[i].noroundtrip[level]) {
+ continue;
+ }
+ ubidi_setPara(pL2VBiDi, src, srcLen, level, NULL, &rc);
+ assertSuccessful("ubidi_setPara1", &rc);
+ *visual1 = 0;
+ vis1Len = ubidi_writeReordered(pL2VBiDi, visual1, MAXLEN, UBIDI_DO_MIRRORING, &rc);
+ assertSuccessful("ubidi_writeReordered1", &rc);
+ u16ToPseudo(vis1Len, visual1, vis1Chars);
+ checkWhatYouCan(pL2VBiDi, testCases[i].textIn, vis1Chars);
+ ubidi_setPara(pL2VBiDi, dest, destLen, level^1, NULL, &rc);
+ assertSuccessful("ubidi_setPara2", &rc);
+ *visual2 = 0;
+ vis2Len = ubidi_writeReordered(pL2VBiDi, visual2, MAXLEN, UBIDI_DO_MIRRORING, &rc);
+ assertSuccessful("ubidi_writeReordered2", &rc);
+ u16ToPseudo(vis2Len, visual2, vis2Chars);
+ checkWhatYouCan(pL2VBiDi, destChars, vis2Chars);
+ assertStringsEqual(vis1Chars, vis2Chars,
+ testCases[i].textIn, "UBIDI_REORDER_RUNS_ONLY (2)",
+ option==0 ? "0" : "UBIDI_OPTION_INSERT_MARKS",
+ pBiDi);
+ }
+ }
+ }
+
+ /* test with null or empty text */
+ ubidi_setPara(pBiDi, src, 0, UBIDI_LTR, NULL, &rc);
+ assertSuccessful("ubidi_setPara3", &rc);
+ paras = ubidi_countParagraphs(pBiDi);
+ if (paras != 0) {
+ log_err("\nInvalid number of paras (should be 0): %d\n", paras);
+ }
+
+ ubidi_close(pBiDi);
+ ubidi_close(pL2VBiDi);
+
+ log_verbose("\nExiting TestReorderRunsOnly\n\n");
+}
+
+static void
+testReorderingMode(void) {
+
+ UChar src[MAXLEN], dest[MAXLEN];
+ char destChars[MAXLEN];
+ UBiDi *pBiDi = NULL, *pBiDi2 = NULL, *pBiDi3 = NULL;
+ UErrorCode rc;
+ int tc, mode, option, level;
+ uint32_t optionValue, optionBack;
+ UBiDiReorderingMode modeValue, modeBack;
+ int32_t srcLen, destLen, index;
+ const char *expectedChars;
+ UBool testOK = TRUE;
+
+ log_verbose("\nEntering TestReorderingMode\n\n");
+
+ pBiDi = getBiDiObject();
+ pBiDi2 = getBiDiObject();
+ pBiDi3 = getBiDiObject();
+ if(!pBiDi3) {
+ ubidi_close(pBiDi); /* in case this one was allocated */
+ ubidi_close(pBiDi2); /* in case this one was allocated */
+ return;
+ }
+
+ ubidi_setInverse(pBiDi2, TRUE);
+
+ for (tc = 0; tc < TC_COUNT; tc++) {
+ const char *srcChars = textIn[tc];
+ srcLen = strlen(srcChars);
+ pseudoToU16(srcLen, srcChars, src);
+
+ for (mode = 0; mode < MODES_COUNT; mode++) {
+ modeValue = modes[mode].value;
+ ubidi_setReorderingMode(pBiDi, modeValue);
+ modeBack = ubidi_getReorderingMode(pBiDi);
+ if (modeValue != modeBack) {
+ log_err("Error while setting reordering mode to %d, returned %d\n",
+ modeValue, modeBack);
+ }
+
+ for (option = 0; option < OPTIONS_COUNT; option++) {
+ optionValue = options[option].value;
+ ubidi_setReorderingOptions(pBiDi, optionValue);
+ optionBack = ubidi_getReorderingOptions(pBiDi);
+ if (optionValue != optionBack) {
+ log_err("Error while setting reordering option to %d, returned %d\n",
+ optionValue, optionBack);
+ }
+
+ for (level = 0; level < LEVELS_COUNT; level++) {
+ log_verbose("starting test %d mode=%d option=%d level=%d\n",
+ tc, modes[mode].value, options[option].value, level);
+ rc = U_ZERO_ERROR;
+ ubidi_setPara(pBiDi, src, srcLen, paraLevels[level], NULL, &rc);
+ assertSuccessful("ubidi_setPara", &rc);
+
+ *dest = 0;
+ destLen = ubidi_writeReordered(pBiDi, dest, MAXLEN,
+ UBIDI_DO_MIRRORING, &rc);
+ assertSuccessful("ubidi_writeReordered", &rc);
+ u16ToPseudo(destLen, dest, destChars);
+ if (!((modes[mode].value == UBIDI_REORDER_INVERSE_NUMBERS_AS_L) &&
+ (options[option].value == UBIDI_OPTION_INSERT_MARKS))) {
+ checkWhatYouCan(pBiDi, srcChars, destChars);
+ }
+
+ if (modes[mode].value == UBIDI_REORDER_INVERSE_NUMBERS_AS_L) {
+ index = -1;
+ expectedChars = inverseBasic(pBiDi2, srcChars, srcLen,
+ options[option].value, paraLevels[level], destChars);
+ }
+ else {
+ index = outIndices[tc][mode][option][level];
+ expectedChars = textOut[index];
+ }
+ if (!assertStringsEqual(expectedChars, destChars, srcChars,
+ modes[mode].description,
+ options[option].description,
+ pBiDi)) {
+ testOK = FALSE;
+ }
+ if (options[option].value == UBIDI_OPTION_INSERT_MARKS &&
+ !assertRoundTrip(pBiDi3, tc, index, srcChars,
+ destChars, dest, destLen,
+ mode, option, paraLevels[level])) {
+ testOK = FALSE;
+ }
+ else if (!checkResultLength(pBiDi, srcChars, destChars,
+ destLen, modes[mode].description,
+ options[option].description,
+ paraLevels[level])) {
+ testOK = FALSE;
+ }
+ else if (index > -1 && !checkMaps(pBiDi, index, srcChars,
+ destChars, modes[mode].description,
+ options[option].description, paraLevels[level],
+ TRUE)) {
+ testOK = FALSE;
+ }
+ }
+ }
+ }
+ }
+ if (testOK == TRUE) {
+ log_verbose("\nReordering mode test OK\n");
+ }
+ ubidi_close(pBiDi3);
+ ubidi_close(pBiDi2);
+ ubidi_close(pBiDi);
+
+ log_verbose("\nExiting TestReorderingMode\n\n");
+}
+
+static const char* inverseBasic(UBiDi *pBiDi, const char *srcChars, int32_t srcLen,
+ uint32_t option, UBiDiLevel level, char *result) {
+ UErrorCode rc = U_ZERO_ERROR;
+ int32_t destLen;
+ UChar src[MAXLEN], dest2[MAXLEN];
+
+ if (pBiDi == NULL || src == NULL) {
+ return NULL;
+ }
+ ubidi_setReorderingOptions(pBiDi, option);
+ pseudoToU16(srcLen, srcChars, src);
+ ubidi_setPara(pBiDi, src, srcLen, level, NULL, &rc);
+ assertSuccessful("ubidi_setPara", &rc);
+
+ *dest2 = 0;
+ destLen = ubidi_writeReordered(pBiDi, dest2, MAXLEN,
+ UBIDI_DO_MIRRORING, &rc);
+ assertSuccessful("ubidi_writeReordered", &rc);
+ u16ToPseudo(destLen, dest2, result);
+ if (!(option == UBIDI_OPTION_INSERT_MARKS)) {
+ checkWhatYouCan(pBiDi, srcChars, result);
+ }
+ return result;
+}
+
+#define NULL_CHAR '\0'
+
+static void
+testStreaming(void) {
+#define MAXPORTIONS 10
+
+ static const struct {
+ const char* textIn;
+ short int chunk;
+ short int nPortions[2];
+ char portionLens[2][MAXPORTIONS];
+ const char* message[2];
+ } testData[] = {
+ { "123\\u000A"
+ "abc45\\u000D"
+ "67890\\u000A"
+ "\\u000D"
+ "02468\\u000D"
+ "ghi",
+ 6, { 6, 6 }, {{ 6, 4, 6, 1, 6, 3}, { 4, 6, 6, 1, 6, 3 }},
+ {"6, 4, 6, 1, 6, 3", "4, 6, 6, 1, 6, 3"}
+ },
+ { "abcd\\u000Afgh\\u000D12345\\u000A456",
+ 6, { 4, 4 }, {{ 6, 3, 6, 3 }, { 5, 4, 6, 3 }},
+ {"6, 3, 6, 3", "5, 4, 6, 3"}
+ },
+ { "abcd\\u000Afgh\\u000D12345\\u000A45\\u000D",
+ 6, { 4, 4 }, {{ 6, 3, 6, 3 }, { 5, 4, 6, 3 }},
+ {"6, 3, 6, 3", "5, 4, 6, 3"}
+ },
+ { "abcde\\u000Afghi",
+ 10, { 1, 2 }, {{ 10 }, { 6, 4 }},
+ {"10", "6, 4"}
+ }
+ };
+ UChar src[MAXLEN];
+ UBiDi *pBiDi = NULL;
+ UChar *pSrc;
+ UErrorCode rc = U_ZERO_ERROR;
+ int32_t srcLen, processedLen, chunk, len, nPortions;
+ int i, j, levelIndex;
+ UBiDiLevel level;
+ int nTests = LENGTHOF(testData), nLevels = LENGTHOF(paraLevels);
+ UBool mismatch, testOK = TRUE;
+ char processedLenStr[MAXPORTIONS * 5];
+
+ log_verbose("\nEntering TestStreaming\n\n");
+
+ pBiDi = getBiDiObject();
+
+ ubidi_orderParagraphsLTR(pBiDi, TRUE);
+
+ for (levelIndex = 0; levelIndex < nLevels; levelIndex++) {
+ for (i = 0; i < nTests; i++) {
+ srcLen = u_unescape(testData[i].textIn, src, MAXLEN);
+ chunk = testData[i].chunk;
+ nPortions = testData[i].nPortions[levelIndex];
+ level = paraLevels[levelIndex];
+ *processedLenStr = NULL_CHAR;
+ log_verbose("Testing level %d, case %d\n", level, i);
+
+ mismatch = FALSE;
+
+ ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_STREAMING);
+ for (j = 0, pSrc = src; j < MAXPORTIONS && srcLen > 0; j++) {
+
+ len = chunk < srcLen ? chunk : srcLen;
+ ubidi_setPara(pBiDi, pSrc, len, level, NULL, &rc);
+ assertSuccessful("ubidi_setPara", &rc);
+
+ processedLen = ubidi_getProcessedLength(pBiDi);
+ if (processedLen == 0) {
+ ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_DEFAULT);
+ j--;
+ continue;
+ }
+ ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_STREAMING);
+
+ mismatch = (UBool)(j >= nPortions ||
+ processedLen != testData[i].portionLens[levelIndex][j]);
+
+ sprintf(processedLenStr + j * 4, "%4d", processedLen);
+ srcLen -= processedLen, pSrc += processedLen;
+ }
+
+ if (mismatch || j != nPortions) {
+ testOK = FALSE;
+ log_err("\nProcessed lengths mismatch.\n"
+ "\tParagraph level: %u\n"
+ "\tInput string: %s\n"
+ "\tActually processed portion lengths: { %s }\n"
+ "\tExpected portion lengths : { %s }\n",
+ paraLevels[levelIndex], testData[i].textIn,
+ processedLenStr, testData[i].message[levelIndex]);
+ }
+ }
+ }
+ ubidi_close(pBiDi);
+ if (testOK == TRUE) {
+ log_verbose("\nBiDi streaming test OK\n");
+ }
+ log_verbose("\nExiting TestStreaming\n\n");
+}
+
+U_CDECL_BEGIN
+
+static UCharDirection U_CALLCONV
+overrideBidiClass(const void *context, UChar32 c) {
+
+#define DEF U_BIDI_CLASS_DEFAULT
+
+ static const UCharDirection customClasses[] = {
+ /* 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F */
+ DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 00-07 */
+ DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 08-0F */
+ DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 10-17 */
+ DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 18-1F */
+ DEF, DEF, DEF, DEF, DEF, DEF, R, DEF, /* 20-27 */
+ DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 28-2F */
+ EN, EN, EN, EN, EN, EN, AN, AN, /* 30-37 */
+ AN, AN, DEF, DEF, DEF, DEF, DEF, DEF, /* 38-3F */
+ L, AL, AL, AL, AL, AL, AL, R, /* 40-47 */
+ R, R, R, R, R, R, R, R, /* 48-4F */
+ R, R, R, R, R, R, R, R, /* 50-57 */
+ R, R, R, LRE, DEF, RLE, PDF, S, /* 58-5F */
+ NSM, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 60-67 */
+ DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 68-6F */
+ DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 70-77 */
+ DEF, DEF, DEF, LRO, B, RLO, BN, DEF /* 78-7F */
+ };
+ static const int nEntries = LENGTHOF(customClasses);
+ const char *dummy = context; /* just to avoid a compiler warning */
+ dummy++;
+
+ return c >= nEntries ? U_BIDI_CLASS_DEFAULT : customClasses[c];
+}
+
+U_CDECL_END
+
+static void verifyCallbackParams(UBiDiClassCallback* fn, const void* context,
+ UBiDiClassCallback* expectedFn,
+ const void* expectedContext,
+ int32_t sizeOfContext) {
+ if (fn != expectedFn) {
+ log_err("Class callback pointer is not set properly.\n");
+ }
+ if (context != expectedContext) {
+ log_err("Class callback context is not set properly.\n");
+ }
+ else if (context != NULL &&
+ memcmp(context, expectedContext, sizeOfContext)) {
+ log_err("Callback context content doesn't match the expected one.\n");
+ }
+}
+
+static void
+testClassOverride(void) {
+ static const char* const textSrc = "JIH.>12->a \\u05D0\\u05D1 6 ABC78";
+ static const char* const textResult = "12<.HIJ->a 78CBA 6 \\u05D1\\u05D0";
+
+ UChar src[MAXLEN], dest[MAXLEN];
+ UErrorCode rc = U_ZERO_ERROR;
+ UBiDi *pBiDi = NULL;
+ UBiDiClassCallback* oldFn = NULL;
+ UBiDiClassCallback* newFn = overrideBidiClass;
+ const void* oldContext = NULL;
+ int32_t srcLen, destLen, textSrcSize = (int32_t)uprv_strlen(textSrc);
+ char* destChars = NULL;
+
+ log_verbose("\nEntering TestClassOverride\n\n");
+
+ pBiDi = getBiDiObject();
+ if(!pBiDi) {
+ return;
+ }
+
+ ubidi_getClassCallback(pBiDi, &oldFn, &oldContext);
+ verifyCallbackParams(oldFn, oldContext, NULL, NULL, 0);
+
+ ubidi_setClassCallback(pBiDi, newFn, textSrc, &oldFn, &oldContext, &rc);
+ if (!assertSuccessful("ubidi_setClassCallback", &rc)) {
+ ubidi_close(pBiDi);
+ return;
+ }
+ verifyCallbackParams(oldFn, oldContext, NULL, NULL, 0);
+
+ ubidi_getClassCallback(pBiDi, &oldFn, &oldContext);
+ verifyCallbackParams(oldFn, oldContext, newFn, textSrc, textSrcSize);
+
+ ubidi_setClassCallback(pBiDi, newFn, textSrc, &oldFn, &oldContext, &rc);
+ if (!assertSuccessful("ubidi_setClassCallback", &rc)) {
+ ubidi_close(pBiDi);
+ return;
+ }
+ verifyCallbackParams(oldFn, oldContext, newFn, textSrc, textSrcSize);
+
+ srcLen = u_unescape(textSrc, src, MAXLEN);
+ ubidi_setPara(pBiDi, src, srcLen, UBIDI_LTR, NULL, &rc);
+ assertSuccessful("ubidi_setPara", &rc);
+
+ destLen = ubidi_writeReordered(pBiDi, dest, MAXLEN,
+ UBIDI_DO_MIRRORING, &rc);
+ assertSuccessful("ubidi_writeReordered", &rc);
+
+ destChars = aescstrdup(dest, destLen);
+ if (uprv_strcmp(textResult, destChars)) {
+ log_err("\nActual and expected output mismatch.\n"
+ "%20s %s\n%20s %s\n%20s %s\n",
+ "Input:", textSrc, "Actual output:", destChars,
+ "Expected output:", textResult);
+ }
+ else {
+ log_verbose("\nClass override test OK\n");
+ }
+ ubidi_close(pBiDi);
+ log_verbose("\nExiting TestClassOverride\n\n");
+}
+
+static char * formatMap(const int32_t * map, int len, char * buffer)
+{
+ int32_t i, k;
+ char c;
+ for (i = 0; i < len; i++) {
+ k = map[i];
+ if (k < 0)
+ c = '-';
+ else if (k >= sizeof(columns))
+ c = '+';
+ else
+ c = columns[k];
+ buffer[i] = c;
+ }
+ buffer[len] = '\0';
+ return buffer;
+}
+
+static UBool
+checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest,
+ const char *mode, const char* option, UBiDiLevel level, UBool forward)
+{
+ int32_t actualLogicalMap[MAX_MAP_LENGTH];
+ int32_t actualVisualMap[MAX_MAP_LENGTH];
+ int32_t getIndexMap[MAX_MAP_LENGTH];
+ int32_t i, srcLen, resLen, index;
+ const int32_t *expectedLogicalMap, *expectedVisualMap;
+ UErrorCode rc = U_ZERO_ERROR;
+ UBool testOK = TRUE;
+
+ if (forward) {
+ expectedLogicalMap = forwardMap[stringIndex];
+ expectedVisualMap = inverseMap[stringIndex];
+ }
+ else {
+ expectedLogicalMap = inverseMap[stringIndex];
+ expectedVisualMap = forwardMap[stringIndex];
+ }
+ ubidi_getLogicalMap(pBiDi, actualLogicalMap, &rc);
+ if (!assertSuccessful("ubidi_getLogicalMap", &rc)) {
+ testOK = FALSE;
+ }
+ srcLen = ubidi_getProcessedLength(pBiDi);
+ if (memcmp(expectedLogicalMap, actualLogicalMap, srcLen * sizeof(int32_t))) {
+ char expChars[MAX_MAP_LENGTH];
+ char actChars[MAX_MAP_LENGTH];
+ log_err("\nubidi_getLogicalMap() returns unexpected map for output string "
+ "index %d\n"
+ "source: %s\n"
+ "dest : %s\n"
+ "Scale : %s\n"
+ "ExpMap: %s\n"
+ "Actual: %s\n"
+ "Paragraph level : %d == %d\n"
+ "Reordering mode : %s == %d\n"
+ "Reordering option: %s == %d\n"
+ "Forward flag : %d\n",
+ stringIndex, src, dest, columns,
+ formatMap(expectedLogicalMap, srcLen, expChars),
+ formatMap(actualLogicalMap, srcLen, actChars),
+ level, ubidi_getParaLevel(pBiDi),
+ mode, ubidi_getReorderingMode(pBiDi),
+ option, ubidi_getReorderingOptions(pBiDi),
+ forward
+ );
+ testOK = FALSE;
+ }
+ resLen = ubidi_getResultLength(pBiDi);
+ ubidi_getVisualMap(pBiDi, actualVisualMap, &rc);
+ assertSuccessful("ubidi_getVisualMap", &rc);
+ if (memcmp(expectedVisualMap, actualVisualMap, resLen * sizeof(int32_t))) {
+ char expChars[MAX_MAP_LENGTH];
+ char actChars[MAX_MAP_LENGTH];
+ log_err("\nubidi_getVisualMap() returns unexpected map for output string "
+ "index %d\n"
+ "source: %s\n"
+ "dest : %s\n"
+ "Scale : %s\n"
+ "ExpMap: %s\n"
+ "Actual: %s\n"
+ "Paragraph level : %d == %d\n"
+ "Reordering mode : %s == %d\n"
+ "Reordering option: %s == %d\n"
+ "Forward flag : %d\n",
+ stringIndex, src, dest, columns,
+ formatMap(expectedVisualMap, resLen, expChars),
+ formatMap(actualVisualMap, resLen, actChars),
+ level, ubidi_getParaLevel(pBiDi),
+ mode, ubidi_getReorderingMode(pBiDi),
+ option, ubidi_getReorderingOptions(pBiDi),
+ forward
+ );
+ testOK = FALSE;
+ }
+ for (i = 0; i < srcLen; i++) {
+ index = ubidi_getVisualIndex(pBiDi, i, &rc);
+ assertSuccessful("ubidi_getVisualIndex", &rc);
+ getIndexMap[i] = index;
+ }
+ if (memcmp(actualLogicalMap, getIndexMap, srcLen * sizeof(int32_t))) {
+ char actChars[MAX_MAP_LENGTH];
+ char gotChars[MAX_MAP_LENGTH];
+ log_err("\nMismatch between ubidi_getLogicalMap and ubidi_getVisualIndex for output string "
+ "index %d\n"
+ "source: %s\n"
+ "dest : %s\n"
+ "Scale : %s\n"
+ "ActMap: %s\n"
+ "IdxMap: %s\n"
+ "Paragraph level : %d == %d\n"
+ "Reordering mode : %s == %d\n"
+ "Reordering option: %s == %d\n"
+ "Forward flag : %d\n",
+ stringIndex, src, dest, columns,
+ formatMap(actualLogicalMap, srcLen, actChars),
+ formatMap(getIndexMap, srcLen, gotChars),
+ level, ubidi_getParaLevel(pBiDi),
+ mode, ubidi_getReorderingMode(pBiDi),
+ option, ubidi_getReorderingOptions(pBiDi),
+ forward
+ );
+ testOK = FALSE;
+ }
+ for (i = 0; i < resLen; i++) {
+ index = ubidi_getLogicalIndex(pBiDi, i, &rc);
+ assertSuccessful("ubidi_getLogicalIndex", &rc);
+ getIndexMap[i] = index;
+ }
+ if (memcmp(actualVisualMap, getIndexMap, resLen * sizeof(int32_t))) {
+ char actChars[MAX_MAP_LENGTH];
+ char gotChars[MAX_MAP_LENGTH];
+ log_err("\nMismatch between ubidi_getVisualMap and ubidi_getLogicalIndex for output string "
+ "index %d\n"
+ "source: %s\n"
+ "dest : %s\n"
+ "Scale : %s\n"
+ "ActMap: %s\n"
+ "IdxMap: %s\n"
+ "Paragraph level : %d == %d\n"
+ "Reordering mode : %s == %d\n"
+ "Reordering option: %s == %d\n"
+ "Forward flag : %d\n",
+ stringIndex, src, dest, columns,
+ formatMap(actualVisualMap, resLen, actChars),
+ formatMap(getIndexMap, resLen, gotChars),
+ level, ubidi_getParaLevel(pBiDi),
+ mode, ubidi_getReorderingMode(pBiDi),
+ option, ubidi_getReorderingOptions(pBiDi),
+ forward
+ );
+ testOK = FALSE;
+ }
+ return testOK;
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.h
new file mode 100644
index 00000000000..afaffb27d48
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cbiditst.h
@@ -0,0 +1,82 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/* file name: cbiditst.h
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 1999sep22
+* created by: Markus W. Scherer
+*/
+
+#ifndef CBIDITST_H
+#define CBIDITST_H
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/ubidi.h"
+
+#ifdef XP_CPLUSPLUS
+extern "C" {
+#endif
+
+#define MAX_STRING_LENGTH 200
+
+/* length of an array */
+#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
+
+/* Comparing the description of the BiDi algorithm with this implementation
+ is easier with the same names for the BiDi types in the code as there.
+ See UCharDirection in uchar.h .
+*/
+#define L U_LEFT_TO_RIGHT
+#define R U_RIGHT_TO_LEFT
+#define EN U_EUROPEAN_NUMBER
+#define ES U_EUROPEAN_NUMBER_SEPARATOR
+#define ET U_EUROPEAN_NUMBER_TERMINATOR
+#define AN U_ARABIC_NUMBER
+#define CS U_COMMON_NUMBER_SEPARATOR
+#define B U_BLOCK_SEPARATOR
+#define S U_SEGMENT_SEPARATOR
+#define WS U_WHITE_SPACE_NEUTRAL
+#define ON U_OTHER_NEUTRAL
+#define LRE U_LEFT_TO_RIGHT_EMBEDDING
+#define LRO U_LEFT_TO_RIGHT_OVERRIDE
+#define AL U_RIGHT_TO_LEFT_ARABIC
+#define RLE U_RIGHT_TO_LEFT_EMBEDDING
+#define RLO U_RIGHT_TO_LEFT_OVERRIDE
+#define PDF U_POP_DIRECTIONAL_FORMAT
+#define NSM U_DIR_NON_SPACING_MARK
+#define BN U_BOUNDARY_NEUTRAL
+
+extern const char * const
+dirPropNames[U_CHAR_DIRECTION_COUNT];
+
+extern UChar
+charFromDirProp[U_CHAR_DIRECTION_COUNT];
+
+typedef struct {
+ const uint8_t *text;
+ int32_t length;
+ UBiDiLevel paraLevel;
+ int32_t lineStart, lineLimit;
+ UBiDiDirection direction;
+ UBiDiLevel resultLevel;
+ const UBiDiLevel *levels;
+ const uint8_t *visualMap;
+} BiDiTestData;
+
+extern const BiDiTestData
+tests[];
+
+extern const int
+bidiTestCount;
+
+#ifdef XP_CPLUSPLUS
+}
+#endif
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cbkittst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cbkittst.c
new file mode 100644
index 00000000000..4d25865584d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cbkittst.c
@@ -0,0 +1,31 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CBKITTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "cintltst.h"
+
+void addBrkIterAPITest(TestNode**);
+
+void addBreakIter(TestNode** root);
+
+void addBreakIter(TestNode** root)
+{
+ addBrkIterAPITest(root);
+}
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.c
new file mode 100644
index 00000000000..bc04ceffbf0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.c
@@ -0,0 +1,1337 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************
+ *
+ * File CCALTST.C
+ *
+ * Modification History:
+ * Name Description
+ * Madhu Katragadda Creation
+ ********************************************************************
+ */
+
+/* C API AND FUNCTIONALITY TEST FOR CALENDAR (ucol.h)*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include <stdlib.h>
+
+#include "unicode/uloc.h"
+#include "unicode/ucal.h"
+#include "unicode/udat.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "ccaltst.h"
+#include "cformtst.h"
+#include "cstring.h"
+
+void TestGregorianChange(void);
+
+void addCalTest(TestNode** root);
+
+void addCalTest(TestNode** root)
+{
+
+ addTest(root, &TestCalendar, "tsformat/ccaltst/TestCalendar");
+ addTest(root, &TestGetSetDateAPI, "tsformat/ccaltst/TestGetSetDateAPI");
+ addTest(root, &TestFieldGetSet, "tsformat/ccaltst/TestFieldGetSet");
+ addTest(root, &TestAddRollExtensive, "tsformat/ccaltst/TestAddRollExtensive");
+ addTest(root, &TestGetLimits, "tsformat/ccaltst/TestGetLimits");
+ addTest(root, &TestDOWProgression, "tsformat/ccaltst/TestDOWProgression");
+ addTest(root, &TestGMTvsLocal, "tsformat/ccaltst/TestGMTvsLocal");
+ addTest(root, &TestGregorianChange, "tsformat/ccaltst/TestGregorianChange");
+}
+
+/* "GMT" */
+static const UChar fgGMTID [] = { 0x0047, 0x004d, 0x0054, 0x0000 };
+
+/* "PST" */
+static const UChar PST[] = {0x50, 0x53, 0x54, 0x00}; /* "PST" */
+
+static const UChar EUROPE_PARIS[] = {0x45, 0x75, 0x72, 0x6F, 0x70, 0x65, 0x2F, 0x50, 0x61, 0x72, 0x69, 0x73, 0x00}; /* "Europe/Paris" */
+
+static void TestCalendar()
+{
+ UCalendar *caldef = 0, *caldef2 = 0, *calfr = 0, *calit = 0;
+ UEnumeration* uenum = NULL;
+ int32_t count, count2, i,j;
+ UChar *tzID = 0;
+ UChar *tzdname = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UDate now;
+ UDateFormat *datdef = 0;
+ UChar *result = 0;
+ int32_t resultlength, resultlengthneeded;
+ char tempMsgBuf[256];
+ UChar zone1[32], zone2[32];
+ const char *tzver = 0;
+
+#ifdef U_USE_UCAL_OBSOLETE_2_8
+ /*Testing countAvailableTimeZones*/
+ int32_t offset=0;
+ log_verbose("\nTesting ucal_countAvailableTZIDs\n");
+ count=ucal_countAvailableTZIDs(offset);
+ log_verbose("The number of timezone id's present with offset 0 are %d:\n", count);
+ if(count < 5) /* Don't hard code an exact == test here! */
+ log_err("FAIL: error in the ucal_countAvailableTZIDs - got %d expected at least 5 total\n", count);
+
+ /*Testing getAvailableTZIDs*/
+ log_verbose("\nTesting ucal_getAvailableTZIDs");
+ for(i=0;i<count;i++){
+ ucal_getAvailableTZIDs(offset, i, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: ucal_getAvailableTZIDs returned %s\n", u_errorName(status));
+ }
+ log_verbose("%s\n", u_austrcpy(tempMsgBuf, ucal_getAvailableTZIDs(offset, i, &status)));
+ }
+ /*get Illegal TZID where index >= count*/
+ ucal_getAvailableTZIDs(offset, i, &status);
+ if(status != U_INDEX_OUTOFBOUNDS_ERROR){
+ log_err("FAIL:for TZID index >= count Expected INDEX_OUTOFBOUNDS_ERROR Got %s\n", u_errorName(status));
+ }
+ status=U_ZERO_ERROR;
+#endif
+
+ /*Test ucal_openTimeZones & ucal_openCountryTimeZones*/
+ for (j=0; j<2; ++j) {
+ const char* api = (j==0) ? "ucal_openTimeZones()" :
+ "ucal_openCountryTimeZones(US)";
+ uenum = (j==0) ? ucal_openTimeZones(&status) :
+ ucal_openCountryTimeZones("US", &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: %s failed with %s", api,
+ u_errorName(status));
+ } else {
+ const char* id;
+ int32_t len;
+ count = uenum_count(uenum, &status);
+ log_verbose("%s returned %d timezone id's:\n", api, count);
+ if (count < 5) { /* Don't hard code an exact == test here! */
+ log_err("FAIL: in %s, got %d, expected at least 5\n", api, count);
+ }
+ uenum_reset(uenum, &status);
+ if (U_FAILURE(status)){
+ log_err("FAIL: uenum_reset for %s returned %s\n",
+ api, u_errorName(status));
+ }
+ for (i=0; i<count; i++) {
+ id = uenum_next(uenum, &len, &status);
+ if (U_FAILURE(status)){
+ log_err("FAIL: uenum_next for %s returned %s\n",
+ api, u_errorName(status));
+ } else {
+ log_verbose("%s\n", id);
+ }
+ }
+ /* Next one should be NULL */
+ id = uenum_next(uenum, &len, &status);
+ if (id != NULL) {
+ log_err("FAIL: uenum_next for %s returned %s, expected NULL\n",
+ api, id);
+ }
+ }
+ uenum_close(uenum);
+ }
+
+ /*Test ucal_getDSTSavings*/
+ status = U_ZERO_ERROR;
+ i = ucal_getDSTSavings(fgGMTID, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: ucal_getDSTSavings(GMT) => %s\n",
+ u_errorName(status));
+ } else if (i != 0) {
+ log_err("FAIL: ucal_getDSTSavings(GMT) => %d, expect 0\n", i);
+ }
+ i = ucal_getDSTSavings(PST, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: ucal_getDSTSavings(PST) => %s\n",
+ u_errorName(status));
+ } else if (i != 1*60*60*1000) {
+ log_err("FAIL: ucal_getDSTSavings(PST) => %d, expect %d\n", i, 1*60*60*1000);
+ }
+
+ /*Test ucal_set/getDefaultTimeZone*/
+ status = U_ZERO_ERROR;
+ i = ucal_getDefaultTimeZone(zone1, sizeof(zone1)/sizeof(zone1[0]), &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: ucal_getDefaultTimeZone() => %s\n",
+ u_errorName(status));
+ } else {
+ ucal_setDefaultTimeZone(EUROPE_PARIS, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: ucal_setDefaultTimeZone(Europe/Paris) => %s\n",
+ u_errorName(status));
+ } else {
+ i = ucal_getDefaultTimeZone(zone2, sizeof(zone2)/sizeof(zone2[0]), &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: ucal_getDefaultTimeZone() => %s\n",
+ u_errorName(status));
+ } else {
+ if (u_strcmp(zone2, EUROPE_PARIS) != 0) {
+ log_err("FAIL: ucal_getDefaultTimeZone() did not return Europe/Paris\n");
+ }
+ }
+ }
+ status = U_ZERO_ERROR;
+ ucal_setDefaultTimeZone(zone1, &status);
+ }
+
+ /*Test ucal_getTZDataVersion*/
+ status = U_ZERO_ERROR;
+ tzver = ucal_getTZDataVersion(&status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: ucal_getTZDataVersion() => %s\n", u_errorName(status));
+ } else if (uprv_strlen(tzver) != 5 /*4 digits + 1 letter*/) {
+ log_err("FAIL: Bad version string was returned by ucal_getTZDataVersion\n");
+ } else {
+ log_verbose("PASS: ucal_getTZDataVersion returned %s\n", tzver);
+ }
+
+
+ /*Testing the ucal_open() function*/
+ status = U_ZERO_ERROR;
+ log_verbose("\nTesting the ucal_open()\n");
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "PST");
+ caldef=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in ucal_open caldef : %s\n", u_errorName(status));
+ }
+
+ caldef2=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in ucal_open caldef : %s\n", u_errorName(status));
+ }
+ u_strcpy(tzID, fgGMTID);
+ calfr=ucal_open(tzID, u_strlen(tzID), "fr_FR", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in ucal_open calfr : %s\n", u_errorName(status));
+ }
+ calit=ucal_open(tzID, u_strlen(tzID), "it_IT", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)) {
+ log_err("FAIL: error in ucal_open calit : %s\n", u_errorName(status));
+ }
+
+
+ /*Testing udat_getAvailable() and udat_countAvailable()*/
+ log_verbose("\nTesting getAvailableLocales and countAvailable()\n");
+ count=ucal_countAvailable();
+ /* use something sensible w/o hardcoding the count */
+ if(count > 0) {
+ log_verbose("PASS: ucal_countAvailable() works fine\n");
+ log_verbose("The no: of locales for which calendars are avilable are %d\n", count);
+ } else {
+ log_data_err("FAIL: Error in countAvailable()\n");
+ }
+
+ for(i=0;i<count;i++) {
+ log_verbose("%s\n", ucal_getAvailable(i));
+ }
+
+
+ /*Testing the equality between calendar's*/
+ log_verbose("\nTesting ucal_equivalentTo()\n");
+ if(caldef && caldef2 && calfr && calit) {
+ if(ucal_equivalentTo(caldef, caldef2) == FALSE || ucal_equivalentTo(caldef, calfr)== TRUE ||
+ ucal_equivalentTo(caldef, calit)== TRUE) {
+ log_err("FAIL: Error. equivalentTo test failed\n");
+ } else {
+ log_verbose("PASS: equivalentTo test passed\n");
+ }
+ }
+
+
+ /*Testing the current time and date using ucal_getnow()*/
+ log_verbose("\nTesting the ucal_getNow function to check if it is fetching tbe current time\n");
+ now=ucal_getNow();
+ /* open the date format and format the date to check the output */
+ datdef=udat_open(UDAT_FULL,UDAT_FULL ,NULL, NULL, 0,NULL,0,&status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in creating the dateformat : %s\n", u_errorName(status));
+ return;
+ }
+ log_verbose("PASS: The current date and time fetched is %s\n", u_austrcpy(tempMsgBuf, myDateFormat(datdef, now)) );
+
+
+ /*Testing the TimeZoneDisplayName */
+ log_verbose("\nTesting the fetching of time zone display name\n");
+ /*for the US locale */
+ resultlength=0;
+ resultlengthneeded=ucal_getTimeZoneDisplayName(caldef, UCAL_DST, "en_US", NULL, resultlength, &status);
+
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ ucal_getTimeZoneDisplayName(caldef, UCAL_DST, "en_US", result, resultlength, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("FAIL: Error in getting the timezone display name : %s\n", u_errorName(status));
+ }
+ else{
+ log_verbose("PASS: getting the time zone display name successful : %s, %d needed \n",
+ u_errorName(status), resultlengthneeded);
+ }
+
+
+#define expectPDT "Pacific Daylight Time"
+
+ tzdname=(UChar*)malloc(sizeof(UChar) * (sizeof(expectPDT)+1));
+ u_uastrcpy(tzdname, expectPDT);
+ if(u_strcmp(tzdname, result)==0){
+ log_verbose("PASS: got the correct time zone display name %s\n", u_austrcpy(tempMsgBuf, result) );
+ }
+ else{
+ log_err("FAIL: got the wrong time zone(DST) display name %s, wanted %s\n", austrdup(result) , expectPDT);
+ }
+
+ ucal_getTimeZoneDisplayName(caldef, UCAL_SHORT_DST, "en_US", result, resultlength, &status);
+ u_uastrcpy(tzdname, "PDT");
+ if(u_strcmp(tzdname, result) != 0){
+ log_err("FAIL: got the wrong time zone(SHORT_DST) display name %s, wanted %s\n", austrdup(result), austrdup(tzdname));
+ }
+
+ ucal_getTimeZoneDisplayName(caldef, UCAL_STANDARD, "en_US", result, resultlength, &status);
+ u_uastrcpy(tzdname, "Pacific Standard Time");
+ if(u_strcmp(tzdname, result) != 0){
+ log_err("FAIL: got the wrong time zone(STANDARD) display name %s, wanted %s\n", austrdup(result), austrdup(tzdname));
+ }
+
+ ucal_getTimeZoneDisplayName(caldef, UCAL_SHORT_STANDARD, "en_US", result, resultlength, &status);
+ u_uastrcpy(tzdname, "PST");
+ if(u_strcmp(tzdname, result) != 0){
+ log_err("FAIL: got the wrong time zone(SHORT_STANDARD) display name %s, wanted %s\n", austrdup(result), austrdup(tzdname));
+ }
+
+
+ /*testing the setAttributes and getAttributes of a UCalendar*/
+ log_verbose("\nTesting the getAttributes and set Attributes\n");
+ count=ucal_getAttribute(calit, UCAL_LENIENT);
+ count2=ucal_getAttribute(calfr, UCAL_LENIENT);
+ ucal_setAttribute(calit, UCAL_LENIENT, 0);
+ ucal_setAttribute(caldef, UCAL_LENIENT, count2);
+ if( ucal_getAttribute(calit, UCAL_LENIENT) !=0 ||
+ ucal_getAttribute(calfr, UCAL_LENIENT)!=ucal_getAttribute(caldef, UCAL_LENIENT) )
+ log_err("FAIL: there is an error in getAttributes or setAttributes\n");
+ else
+ log_verbose("PASS: attribute set and got successfully\n");
+ /*set it back to orginal value */
+ log_verbose("Setting it back to normal\n");
+ ucal_setAttribute(calit, UCAL_LENIENT, count);
+ if(ucal_getAttribute(calit, UCAL_LENIENT)!=count)
+ log_err("FAIL: Error in setting the attribute back to normal\n");
+
+ /*setting the first day of the week to other values */
+ count=ucal_getAttribute(calit, UCAL_FIRST_DAY_OF_WEEK);
+ for (i=1; i<=7; ++i) {
+ ucal_setAttribute(calit, UCAL_FIRST_DAY_OF_WEEK,i);
+ if (ucal_getAttribute(calit, UCAL_FIRST_DAY_OF_WEEK) != i)
+ log_err("FAIL: set/getFirstDayOfWeek failed\n");
+ }
+ /*get bogus Attribute*/
+ count=ucal_getAttribute(calit, (UCalendarAttribute)99); /* BOGUS_ATTRIBUTE */
+ if(count != -1){
+ log_err("FAIL: get/bogus attribute should return -1\n");
+ }
+
+ /*set it back to normal */
+ ucal_setAttribute(calit, UCAL_FIRST_DAY_OF_WEEK,count);
+ /*setting minimal days of the week to other values */
+ count=ucal_getAttribute(calit, UCAL_MINIMAL_DAYS_IN_FIRST_WEEK);
+ for (i=1; i<=7; ++i) {
+ ucal_setAttribute(calit, UCAL_MINIMAL_DAYS_IN_FIRST_WEEK,i);
+ if (ucal_getAttribute(calit, UCAL_MINIMAL_DAYS_IN_FIRST_WEEK) != i)
+ log_err("FAIL: set/getMinimalDaysInFirstWeek failed\n");
+ }
+ /*set it back to normal */
+ ucal_setAttribute(calit, UCAL_MINIMAL_DAYS_IN_FIRST_WEEK,count);
+
+
+ /*testing if the UCalendar's timezone is currently in day light saving's time*/
+ log_verbose("\nTesting if the UCalendar is currently in daylight saving's time\n");
+ ucal_setDateTime(caldef, 1999, UCAL_MARCH, 3, 10, 45, 20, &status);
+ ucal_inDaylightTime(caldef, &status );
+ if(U_FAILURE(status)) {
+ log_err("Error in ucal_inDaylightTime: %s\n", u_errorName(status));
+ }
+ if(!ucal_inDaylightTime(caldef, &status))
+ log_verbose("PASS: It is not in daylight saving's time\n");
+ else
+ log_err("FAIL: It is not in daylight saving's time\n");
+
+
+
+ /*closing the UCalendar*/
+ ucal_close(caldef);
+ ucal_close(caldef2);
+ ucal_close(calfr);
+ ucal_close(calit);
+ /*closing the UDateFormat used */
+ udat_close(datdef);
+ free(tzID);
+ free(result);
+ free(tzdname);
+}
+
+/*------------------------------------------------------*/
+/*Testing the getMillis, setMillis, setDate and setDateTime functions extensively*/
+
+static void TestGetSetDateAPI()
+{
+ UCalendar *caldef = 0, *caldef2 = 0;
+ UChar *tzID =0;
+ UDate d1;
+ int32_t hour;
+ int32_t zoneOffset;
+ UDateFormat *datdef = 0;
+ UErrorCode status=U_ZERO_ERROR;
+ UDate d2= 837039928046.0;
+ UChar temp[30];
+
+ log_verbose("\nOpening the calendars()\n");
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_strcpy(tzID, fgGMTID);
+ /*open the calendars used */
+ caldef=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ caldef2=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ /*open the dateformat */
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /*datdef=udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,NULL,fgGMTID,-1, &status);*/
+ datdef=udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,"en_US",fgGMTID,-1,NULL,0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in creating the dateformat : %s\n", u_errorName(status));
+ return;
+ }
+
+
+ /*Testing getMillis and setMillis */
+ log_verbose("\nTesting the date and time fetched in millis for a calendar using getMillis\n");
+ d1=ucal_getMillis(caldef, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in getMillis : %s\n", u_errorName(status));
+ }
+
+ /*testing setMillis */
+ log_verbose("\nTesting the set date and time function using setMillis\n");
+ ucal_setMillis(caldef, d2, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in setMillis : %s\n", u_errorName(status));
+ }
+
+ /*testing if the calendar date is set properly or not */
+ d1=ucal_getMillis(caldef, &status);
+ if(u_strcmp(myDateFormat(datdef, d1), myDateFormat(datdef, d2))!=0)
+ log_err("error in setMillis or getMillis\n");
+ /*-------------------*/
+
+
+
+ ctest_setTimeZone(NULL, &status);
+
+ /*testing ucal_setTimeZone() function*/
+ log_verbose("\nTesting if the function ucal_setTimeZone() works fine\n");
+ ucal_setMillis(caldef2, d2, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in getMillis : %s\n", u_errorName(status));;
+ }
+ hour=ucal_get(caldef2, UCAL_HOUR_OF_DAY, &status);
+
+ u_uastrcpy(tzID, "PST");
+ ucal_setTimeZone(caldef2,tzID, 3, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in setting the time zone using ucal_setTimeZone(): %s\n", u_errorName(status));
+ }
+ else
+ log_verbose("ucal_setTimeZone worked fine\n");
+ if(hour == ucal_get(caldef2, UCAL_HOUR_OF_DAY, &status))
+ log_err("FAIL: Error setting the time zone doesn't change the represented time\n");
+ else if((hour-8 + 1) != ucal_get(caldef2, UCAL_HOUR_OF_DAY, &status)) /*because it is not in daylight savings time */
+ log_err("FAIL: Error setTimeZone doesn't change the represented time correctly with 8 hour offset\n");
+ else
+ log_verbose("PASS: setTimeZone works fine\n");
+
+ /*testing setTimeZone roundtrip */
+ log_verbose("\nTesting setTimeZone() roundtrip\n");
+ u_strcpy(tzID, fgGMTID);
+ ucal_setTimeZone(caldef2, tzID, 3, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in setting the time zone using ucal_setTimeZone(): %s\n", u_errorName(status));
+ }
+ if(d2==ucal_getMillis(caldef2, &status))
+ log_verbose("PASS: setTimeZone roundtrip test passed\n");
+ else
+ log_err("FAIL: setTimeZone roundtrip test failed\n");
+
+ zoneOffset = ucal_get(caldef2, UCAL_ZONE_OFFSET, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in getting the time zone using ucal_get() after using ucal_setTimeZone(): %s\n", u_errorName(status));
+ }
+ else if (zoneOffset != 0) {
+ log_err("Error in getting the time zone using ucal_get() after using ucal_setTimeZone() offset=%d\n", zoneOffset);
+ }
+
+ ucal_setTimeZone(caldef2, NULL, -1, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in setting the time zone using ucal_setTimeZone(): %s\n", u_errorName(status));
+ }
+ if(ucal_getMillis(caldef2, &status))
+ log_verbose("PASS: setTimeZone roundtrip test passed\n");
+ else
+ log_err("FAIL: setTimeZone roundtrip test failed\n");
+
+ zoneOffset = ucal_get(caldef2, UCAL_ZONE_OFFSET, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in getting the time zone using ucal_get() after using ucal_setTimeZone(): %s\n", u_errorName(status));
+ }
+ else if (zoneOffset != -28800000) {
+ log_err("Error in getting the time zone using ucal_get() after using ucal_setTimeZone() offset=%d\n", zoneOffset);
+ }
+
+ ctest_resetTimeZone();
+
+/*----------------------------* */
+
+
+
+ /*Testing if setDate works fine */
+ log_verbose("\nTesting the ucal_setDate() function \n");
+ u_uastrcpy(temp, "Dec 17, 1971 11:05:28 PM");
+ ucal_setDate(caldef,1971, UCAL_DECEMBER, 17, &status);
+ if(U_FAILURE(status)){
+ log_err("error in setting the calendar date : %s\n", u_errorName(status));
+ }
+ /*checking if the calendar date is set properly or not */
+ d1=ucal_getMillis(caldef, &status);
+ if(u_strcmp(myDateFormat(datdef, d1), temp)==0)
+ log_verbose("PASS:setDate works fine\n");
+ else
+ log_err("FAIL:Error in setDate()\n");
+
+
+ /* Testing setDate Extensively with various input values */
+ log_verbose("\nTesting ucal_setDate() extensively\n");
+ ucal_setDate(caldef, 1999, UCAL_JANUARY, 10, &status);
+ verify1("1999 10th day of January is :", caldef, datdef, 1999, UCAL_JANUARY, 10);
+ ucal_setDate(caldef, 1999, UCAL_DECEMBER, 3, &status);
+ verify1("1999 3rd day of December is :", caldef, datdef, 1999, UCAL_DECEMBER, 3);
+ ucal_setDate(caldef, 2000, UCAL_MAY, 3, &status);
+ verify1("2000 3rd day of May is :", caldef, datdef, 2000, UCAL_MAY, 3);
+ ucal_setDate(caldef, 1999, UCAL_AUGUST, 32, &status);
+ verify1("1999 32th day of August is :", caldef, datdef, 1999, UCAL_SEPTEMBER, 1);
+ ucal_setDate(caldef, 1999, UCAL_MARCH, 0, &status);
+ verify1("1999 0th day of March is :", caldef, datdef, 1999, UCAL_FEBRUARY, 28);
+ ucal_setDate(caldef, 0, UCAL_MARCH, 12, &status);
+
+ /*--------------------*/
+
+ /*Testing if setDateTime works fine */
+ log_verbose("\nTesting the ucal_setDateTime() function \n");
+ u_uastrcpy(temp, "May 3, 1972 4:30:42 PM");
+ ucal_setDateTime(caldef,1972, UCAL_MAY, 3, 16, 30, 42, &status);
+ if(U_FAILURE(status)){
+ log_err("error in setting the calendar date : %s\n", u_errorName(status));
+ }
+ /*checking if the calendar date is set properly or not */
+ d1=ucal_getMillis(caldef, &status);
+ if(u_strcmp(myDateFormat(datdef, d1), temp)==0)
+ log_verbose("PASS: setDateTime works fine\n");
+ else
+ log_err("FAIL: Error in setDateTime\n");
+
+
+
+ /*Testing setDateTime extensively with various input values*/
+ log_verbose("\nTesting ucal_setDateTime() function extensively\n");
+ ucal_setDateTime(caldef, 1999, UCAL_OCTOBER, 10, 6, 45, 30, &status);
+ verify2("1999 10th day of October at 6:45:30 is :", caldef, datdef, 1999, UCAL_OCTOBER, 10, 6, 45, 30, 0 );
+ ucal_setDateTime(caldef, 1999, UCAL_MARCH, 3, 15, 10, 55, &status);
+ verify2("1999 3rd day of March at 15:10:55 is :", caldef, datdef, 1999, UCAL_MARCH, 3, 3, 10, 55, 1);
+ ucal_setDateTime(caldef, 1999, UCAL_MAY, 3, 25, 30, 45, &status);
+ verify2("1999 3rd day of May at 25:30:45 is :", caldef, datdef, 1999, UCAL_MAY, 4, 1, 30, 45, 0);
+ ucal_setDateTime(caldef, 1999, UCAL_AUGUST, 32, 22, 65, 40, &status);
+ verify2("1999 32th day of August at 22:65:40 is :", caldef, datdef, 1999, UCAL_SEPTEMBER, 1, 11, 5, 40,1);
+ ucal_setDateTime(caldef, 1999, UCAL_MARCH, 12, 0, 0, 0,&status);
+ verify2("1999 12th day of March at 0:0:0 is :", caldef, datdef, 1999, UCAL_MARCH, 12, 0, 0, 0, 0);
+ ucal_setDateTime(caldef, 1999, UCAL_MARCH, 12, -10, -10,0, &status);
+ verify2("1999 12th day of March is at -10:-10:0 :", caldef, datdef, 1999, UCAL_MARCH, 11, 1, 50, 0, 1);
+
+
+
+ /*close caldef and datdef*/
+ ucal_close(caldef);
+ ucal_close(caldef2);
+ udat_close(datdef);
+ free(tzID);
+
+}
+
+/*----------------------------------------------------------- */
+/**
+ * Confirm the functioning of the calendar field related functions.
+ */
+static void TestFieldGetSet()
+{
+ UCalendar *cal = 0;
+ UChar *tzID = 0;
+ UDateFormat *datdef = 0;
+ UDate d1;
+ UErrorCode status=U_ZERO_ERROR;
+ log_verbose("\nFetching pointer to UCalendar using the ucal_open()\n");
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_strcpy(tzID, fgGMTID);
+ /*open the calendar used */
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_open failed: %s\n", u_errorName(status));
+ return;
+ }
+ datdef=udat_open(UDAT_SHORT,UDAT_SHORT ,NULL,fgGMTID,-1,NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in creating the dateformat : %s\n", u_errorName(status));
+ }
+
+ /*Testing ucal_get()*/
+ log_verbose("\nTesting the ucal_get() function of Calendar\n");
+ ucal_setDateTime(cal, 1999, UCAL_MARCH, 12, 5, 25, 30, &status);
+ if(U_FAILURE(status)){
+ log_err("error in the setDateTime() : %s\n", u_errorName(status));
+ }
+ if(ucal_get(cal, UCAL_YEAR, &status)!=1999 || ucal_get(cal, UCAL_MONTH, &status)!=2 ||
+ ucal_get(cal, UCAL_DATE, &status)!=12 || ucal_get(cal, UCAL_HOUR, &status)!=5)
+ log_err("error in ucal_get()\n");
+ else if(ucal_get(cal, UCAL_DAY_OF_WEEK_IN_MONTH, &status)!=2 || ucal_get(cal, UCAL_DAY_OF_WEEK, &status)!=6
+ || ucal_get(cal, UCAL_WEEK_OF_MONTH, &status)!=2 || ucal_get(cal, UCAL_WEEK_OF_YEAR, &status)!= 11)
+ log_err("FAIL: error in ucal_get()\n");
+ else
+ log_verbose("PASS: ucal_get() works fine\n");
+
+ /*Testing the ucal_set() , ucal_clear() functions of calendar*/
+ log_verbose("\nTesting the set, and clear field functions of calendar\n");
+ ucal_setAttribute(cal, UCAL_LENIENT, 0);
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_MONTH, UCAL_JUNE);
+ ucal_set(cal, UCAL_DATE, 3);
+ verify1("1997 third day of June = ", cal, datdef, 1997, UCAL_JUNE, 3);
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_MONTH, UCAL_JUNE);
+ ucal_set(cal, UCAL_DAY_OF_WEEK_IN_MONTH, 1);
+ verify1("1997 first Tuesday in June = ", cal, datdef, 1997, UCAL_JUNE, 3);
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_MONTH, UCAL_JUNE);
+ ucal_set(cal, UCAL_DAY_OF_WEEK_IN_MONTH, - 1);
+ verify1("1997 last Tuesday in June = ", cal, datdef,1997, UCAL_JUNE, 24);
+ /*give undesirable input */
+ status = U_ZERO_ERROR;
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_MONTH, UCAL_JUNE);
+ ucal_set(cal, UCAL_DAY_OF_WEEK_IN_MONTH, 0);
+ d1=ucal_getMillis(cal,&status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("FAIL: No IllegalArgumentError for :");
+ log_err("1997 zero-th Tuesday in June \n");
+ }
+ else
+ log_verbose("PASS: IllegalArgumentError as expected\n");
+
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_MONTH, UCAL_JUNE);
+ ucal_set(cal, UCAL_WEEK_OF_MONTH, 1);
+ verify1("1997 Tuesday in week 1 of June = ", cal,datdef, 1997, UCAL_JUNE, 3);
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_MONTH, UCAL_JUNE);
+ ucal_set(cal, UCAL_WEEK_OF_MONTH, 5);
+ verify1("1997 Tuesday in week 5 of June = ", cal,datdef, 1997, UCAL_JULY, 1);
+ status = U_ZERO_ERROR;
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_MONTH, UCAL_JUNE);
+ ucal_set(cal, UCAL_WEEK_OF_MONTH, 0);
+ verify1("1997 Tuesday in week 0 of June = ", cal, datdef , 1997, UCAL_MAY, 27);
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR_WOY, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_WEEK_OF_YEAR, 1);
+ verify1("1997 Tuesday in week 1 of year = ", cal, datdef,1996, UCAL_DECEMBER, 31);
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1997);
+ ucal_set(cal, UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ ucal_set(cal, UCAL_WEEK_OF_YEAR, 10);
+ verify1("1997 Tuesday in week 10 of year = ", cal,datdef, 1997, UCAL_MARCH, 4);
+ ucal_clear(cal);
+ ucal_set(cal, UCAL_YEAR, 1999);
+ ucal_set(cal, UCAL_DAY_OF_YEAR, 1);
+ verify1("1999 1st day of the year =", cal, datdef, 1999, UCAL_JANUARY, 1);
+ ucal_set(cal, UCAL_MONTH, -3);
+ d1=ucal_getMillis(cal,&status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("FAIL: No IllegalArgumentError for :\"1999 -3th month \" ");
+ }
+ else
+ log_verbose("PASS: IllegalArgumentError as expected\n");
+
+ ucal_setAttribute(cal, UCAL_LENIENT, 1);
+
+ ucal_set(cal, UCAL_MONTH, -3);
+ verify1("1999 -3th month should be", cal, datdef, 1998, UCAL_OCTOBER, 1);
+
+
+ /*testing isSet and clearField()*/
+ if(!ucal_isSet(cal, UCAL_WEEK_OF_YEAR))
+ log_err("FAIL: error in isSet\n");
+ else
+ log_verbose("PASS: isSet working fine\n");
+ ucal_clearField(cal, UCAL_WEEK_OF_YEAR);
+ if(ucal_isSet(cal, UCAL_WEEK_OF_YEAR))
+ log_err("FAIL: there is an error in clearField or isSet\n");
+ else
+ log_verbose("PASS :clearField working fine\n");
+
+ /*-------------------------------*/
+
+ ucal_close(cal);
+ udat_close(datdef);
+ free(tzID);
+
+}
+
+
+
+/* ------------------------------------- */
+/**
+ * Execute adding and rolling in Calendar extensively,
+ */
+static void TestAddRollExtensive()
+{
+ UCalendar *cal = 0;
+ int32_t i,limit;
+ UChar* tzID = 0;
+ UCalendarDateFields e;
+ int32_t y,m,d,hr,min,sec,ms;
+ int32_t maxlimit = 40;
+ UErrorCode status = U_ZERO_ERROR;
+ y = 1997; m = UCAL_FEBRUARY; d = 1; hr = 1; min = 1; sec = 0; ms = 0;
+
+ log_verbose("Testing add and roll extensively\n");
+
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "PST");
+ /*open the calendar used */
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_GREGORIAN, &status);;
+ if (U_FAILURE(status)) {
+ log_err("ucal_open() failed : %s\n", u_errorName(status));
+ return;
+ }
+
+ ucal_set(cal, UCAL_YEAR, y);
+ ucal_set(cal, UCAL_MONTH, m);
+ ucal_set(cal, UCAL_DATE, d);
+
+ /* Confirm that adding to various fields works.*/
+ log_verbose("\nTesting to confirm that adding to various fields works with ucal_add()\n");
+ checkDate(cal, y, m, d);
+ ucal_add(cal,UCAL_YEAR, 1, &status);
+ if (U_FAILURE(status)) { log_err("ucal_add failed: %s\n", u_errorName(status)); return; }
+ y++;
+ checkDate(cal, y, m, d);
+ ucal_add(cal,UCAL_MONTH, 12, &status);
+ if (U_FAILURE(status)) { log_err("ucal_add failed: %s\n", u_errorName(status) ); return; }
+ y+=1;
+ checkDate(cal, y, m, d);
+ ucal_add(cal,UCAL_DATE, 1, &status);
+ if (U_FAILURE(status)) { log_err("ucal_add failed: %s\n", u_errorName(status) ); return; }
+ d++;
+ checkDate(cal, y, m, d);
+ ucal_add(cal,UCAL_DATE, 2, &status);
+ if (U_FAILURE(status)) { log_err("ucal_add failed: %s\n", u_errorName(status) ); return; }
+ d += 2;
+ checkDate(cal, y, m, d);
+ ucal_add(cal,UCAL_DATE, 28, &status);
+ if (U_FAILURE(status)) { log_err("ucal_add failed: %s\n", u_errorName(status) ); return; }
+ ++m;
+ checkDate(cal, y, m, d);
+ ucal_add(cal, (UCalendarDateFields)-1, 10, &status);
+ if(status==U_ILLEGAL_ARGUMENT_ERROR)
+ log_verbose("Pass: Illegal argument error as expected\n");
+ else{
+ log_err("Fail: No, illegal argument error as expected. Got....: %s\n", u_errorName(status));
+ }
+ status=U_ZERO_ERROR;
+
+
+ /*confirm that applying roll to various fields works fine*/
+ log_verbose("\nTesting to confirm that ucal_roll() works\n");
+ ucal_roll(cal, UCAL_DATE, -1, &status);
+ if (U_FAILURE(status)) { log_err("ucal_roll failed: %s\n", u_errorName(status) ); return; }
+ d -=1;
+ checkDate(cal, y, m, d);
+ ucal_roll(cal, UCAL_MONTH, -2, &status);
+ if (U_FAILURE(status)) { log_err("ucal_roll failed: %s\n", u_errorName(status) ); return; }
+ m -=2;
+ checkDate(cal, y, m, d);
+ ucal_roll(cal, UCAL_DATE, 1, &status);
+ if (U_FAILURE(status)) { log_err("ucal_roll failed: %s\n", u_errorName(status) ); return; }
+ d +=1;
+ checkDate(cal, y, m, d);
+ ucal_roll(cal, UCAL_MONTH, -12, &status);
+ if (U_FAILURE(status)) { log_err("ucal_roll failed: %s\n", u_errorName(status) ); return; }
+ checkDate(cal, y, m, d);
+ ucal_roll(cal, UCAL_YEAR, -1, &status);
+ if (U_FAILURE(status)) { log_err("ucal_roll failed: %s\n", u_errorName(status) ); return; }
+ y -=1;
+ checkDate(cal, y, m, d);
+ ucal_roll(cal, UCAL_DATE, 29, &status);
+ if (U_FAILURE(status)) { log_err("ucal_roll failed: %s\n", u_errorName(status) ); return; }
+ d = 2;
+ checkDate(cal, y, m, d);
+ ucal_roll(cal, (UCalendarDateFields)-1, 10, &status);
+ if(status==U_ILLEGAL_ARGUMENT_ERROR)
+ log_verbose("Pass: illegal arguement error as expected\n");
+ else{
+ log_err("Fail: no illegal argument error got..: %s\n", u_errorName(status));
+ return;
+ }
+ status=U_ZERO_ERROR;
+ ucal_clear(cal);
+ ucal_setDateTime(cal, 1999, UCAL_FEBRUARY, 28, 10, 30, 45, &status);
+ if(U_FAILURE(status)){
+ log_err("error is setting the datetime: %s\n", u_errorName(status));
+ }
+ ucal_add(cal, UCAL_MONTH, 1, &status);
+ checkDate(cal, 1999, UCAL_MARCH, 28);
+ ucal_add(cal, UCAL_MILLISECOND, 1000, &status);
+ checkDateTime(cal, 1999, UCAL_MARCH, 28, 10, 30, 46, 0, UCAL_MILLISECOND);
+
+ ucal_close(cal);
+/*--------------- */
+ status=U_ZERO_ERROR;
+ /* Testing add and roll extensively */
+ log_verbose("\nTesting the ucal_add() and ucal_roll() functions extensively\n");
+ y = 1997; m = UCAL_FEBRUARY; d = 1; hr = 1; min = 1; sec = 0; ms = 0;
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_open failed: %s\n", u_errorName(status));
+ return;
+ }
+ ucal_set(cal, UCAL_YEAR, y);
+ ucal_set(cal, UCAL_MONTH, m);
+ ucal_set(cal, UCAL_DATE, d);
+ ucal_set(cal, UCAL_HOUR, hr);
+ ucal_set(cal, UCAL_MINUTE, min);
+ ucal_set(cal, UCAL_SECOND,sec);
+ ucal_set(cal, UCAL_MILLISECOND, ms);
+ status=U_ZERO_ERROR;
+
+ log_verbose("\nTesting UCalendar add...\n");
+ for(e = UCAL_YEAR;e < UCAL_FIELD_COUNT; e=(UCalendarDateFields)((int32_t)e + 1)) {
+ limit = maxlimit;
+ status = U_ZERO_ERROR;
+ for (i = 0; i < limit; i++) {
+ ucal_add(cal, e, 1, &status);
+ if (U_FAILURE(status)) { limit = i; status = U_ZERO_ERROR; }
+ }
+ for (i = 0; i < limit; i++) {
+ ucal_add(cal, e, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_add -1 failed: %s\n", u_errorName(status));
+ return;
+ }
+ }
+ checkDateTime(cal, y, m, d, hr, min, sec, ms, e);
+ }
+ log_verbose("\nTesting calendar ucal_roll()...\n");
+ for(e = UCAL_YEAR;e < UCAL_FIELD_COUNT; e=(UCalendarDateFields)((int32_t)e + 1)) {
+ limit = maxlimit;
+ status = U_ZERO_ERROR;
+ for (i = 0; i < limit; i++) {
+ ucal_roll(cal, e, 1, &status);
+ if (U_FAILURE(status)) {
+ limit = i;
+ status = U_ZERO_ERROR;
+ }
+ }
+ for (i = 0; i < limit; i++) {
+ ucal_roll(cal, e, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_roll -1 failed: %s\n", u_errorName(status));
+ return;
+ }
+ }
+ checkDateTime(cal, y, m, d, hr, min, sec, ms, e);
+ }
+
+ ucal_close(cal);
+ free(tzID);
+}
+
+/*------------------------------------------------------ */
+/*Testing the Limits for various Fields of Calendar*/
+static void TestGetLimits()
+{
+ UCalendar *cal = 0;
+ int32_t min, max, gr_min, le_max, ac_min, ac_max, val;
+ UChar* tzID = 0;
+ UErrorCode status = U_ZERO_ERROR;
+
+
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "PST");
+ /*open the calendar used */
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_GREGORIAN, &status);;
+ if (U_FAILURE(status)) {
+ log_err("ucal_open() for gregorian calendar failed in TestGetLimits: %s\n", u_errorName(status));
+ return;
+ }
+
+ log_verbose("\nTesting the getLimits function for various fields\n");
+
+
+
+ ucal_setDate(cal, 1999, UCAL_MARCH, 5, &status); /* Set the date to be March 5, 1999 */
+ val = ucal_get(cal, UCAL_DAY_OF_WEEK, &status);
+ min = ucal_getLimit(cal, UCAL_DAY_OF_WEEK, UCAL_MINIMUM, &status);
+ max = ucal_getLimit(cal, UCAL_DAY_OF_WEEK, UCAL_MAXIMUM, &status);
+ if ( (min != UCAL_SUNDAY || max != UCAL_SATURDAY ) && (min > val && val > max) && (val != UCAL_FRIDAY)){
+ log_err("FAIL: Min/max bad\n");
+ log_err("FAIL: Day of week %d out of range\n", val);
+ log_err("FAIL: FAIL: Day of week should be SUNDAY Got %d\n", val);
+ }
+ else
+ log_verbose("getLimits successful\n");
+
+ val = ucal_get(cal, UCAL_DAY_OF_WEEK_IN_MONTH, &status);
+ min = ucal_getLimit(cal, UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_MINIMUM, &status);
+ max = ucal_getLimit(cal, UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_MAXIMUM, &status);
+ if ( (min != 0 || max != 5 ) && (min > val && val > max) && (val != 1)){
+ log_err("FAIL: Min/max bad\n");
+ log_err("FAIL: Day of week in month %d out of range\n", val);
+ log_err("FAIL: FAIL: Day of week in month should be SUNDAY Got %d\n", val);
+
+ }
+ else
+ log_verbose("getLimits successful\n");
+
+ min=ucal_getLimit(cal, UCAL_MONTH, UCAL_MINIMUM, &status);
+ max=ucal_getLimit(cal, UCAL_MONTH, UCAL_MAXIMUM, &status);
+ gr_min=ucal_getLimit(cal, UCAL_MONTH, UCAL_GREATEST_MINIMUM, &status);
+ le_max=ucal_getLimit(cal, UCAL_MONTH, UCAL_LEAST_MAXIMUM, &status);
+ ac_min=ucal_getLimit(cal, UCAL_MONTH, UCAL_ACTUAL_MINIMUM, &status);
+ ac_max=ucal_getLimit(cal, UCAL_MONTH, UCAL_ACTUAL_MAXIMUM, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in getLimits: %s\n", u_errorName(status));
+ }
+ if(min!=0 || max!=11 || gr_min!=0 || le_max!=11 || ac_min!=0 || ac_max!=11)
+ log_err("There is and error in getLimits in fetching the values\n");
+ else
+ log_verbose("getLimits successful\n");
+
+ ucal_setDateTime(cal, 1999, UCAL_MARCH, 5, 4, 10, 35, &status);
+ val=ucal_get(cal, UCAL_HOUR_OF_DAY, &status);
+ min=ucal_getLimit(cal, UCAL_HOUR_OF_DAY, UCAL_MINIMUM, &status);
+ max=ucal_getLimit(cal, UCAL_HOUR_OF_DAY, UCAL_MAXIMUM, &status);
+ gr_min=ucal_getLimit(cal, UCAL_MINUTE, UCAL_GREATEST_MINIMUM, &status);
+ le_max=ucal_getLimit(cal, UCAL_MINUTE, UCAL_LEAST_MAXIMUM, &status);
+ ac_min=ucal_getLimit(cal, UCAL_MINUTE, UCAL_ACTUAL_MINIMUM, &status);
+ ac_max=ucal_getLimit(cal, UCAL_SECOND, UCAL_ACTUAL_MAXIMUM, &status);
+ if( (min!=0 || max!= 11 || gr_min!=0 || le_max!=60 || ac_min!=0 || ac_max!=60) &&
+ (min>val && val>max) && val!=4){
+
+ log_err("FAIL: Min/max bad\n");
+ log_err("FAIL: Hour of Day %d out of range\n", val);
+ log_err("FAIL: HOUR_OF_DAY should be 4 Got %d\n", val);
+ }
+ else
+ log_verbose("getLimits successful\n");
+
+
+ /*get BOGUS_LIMIT type*/
+ val=ucal_getLimit(cal, UCAL_SECOND, (UCalendarLimitType)99, &status);
+ if(val != -1){
+ log_err("FAIL: ucal_getLimit() with BOGUS type should return -1\n");
+ }
+ status=U_ZERO_ERROR;
+
+
+ ucal_close(cal);
+ free(tzID);
+}
+
+
+
+/* ------------------------------------- */
+
+/**
+ * Test that the days of the week progress properly when add is called repeatedly
+ * for increments of 24 days.
+ */
+static void TestDOWProgression()
+{
+ int32_t initialDOW, DOW, newDOW, expectedDOW;
+ UCalendar *cal = 0;
+ UDateFormat *datfor = 0;
+ UDate date1;
+ int32_t delta=24;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar* tzID = 0;
+ char tempMsgBuf[256];
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_strcpy(tzID, fgGMTID);
+ /*open the calendar used */
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);;
+ if (U_FAILURE(status)) {
+ log_err("ucal_open failed: %s\n", u_errorName(status));
+ return;
+ }
+
+ datfor=udat_open(UDAT_MEDIUM,UDAT_MEDIUM ,NULL, fgGMTID,-1,NULL, 0, &status);
+ if(U_FAILURE(status)){
+ log_err("error in creating the dateformat : %s\n", u_errorName(status));
+ }
+
+
+ ucal_setDate(cal, 1999, UCAL_JANUARY, 1, &status);
+
+ log_verbose("\nTesting the DOW progression\n");
+
+ initialDOW = ucal_get(cal, UCAL_DAY_OF_WEEK, &status);
+ if (U_FAILURE(status)) { log_err("ucal_get() failed: %s\n", u_errorName(status) ); return; }
+ newDOW = initialDOW;
+ do {
+ DOW = newDOW;
+ log_verbose("DOW = %d...\n", DOW);
+ date1=ucal_getMillis(cal, &status);
+ if(U_FAILURE(status)){ log_err("ucal_getMiilis() failed: %s\n", u_errorName(status)); return;}
+ log_verbose("%s\n", u_austrcpy(tempMsgBuf, myDateFormat(datfor, date1)));
+
+ ucal_add(cal,UCAL_DAY_OF_WEEK, delta, &status);
+ if (U_FAILURE(status)) { log_err("ucal_add() failed: %s\n", u_errorName(status)); return; }
+
+ newDOW = ucal_get(cal, UCAL_DAY_OF_WEEK, &status);
+ if (U_FAILURE(status)) { log_err("ucal_get() failed: %s\n", u_errorName(status)); return; }
+ expectedDOW = 1 + (DOW + delta - 1) % 7;
+ date1=ucal_getMillis(cal, &status);
+ if(U_FAILURE(status)){ log_err("ucal_getMiilis() failed: %s\n", u_errorName(status)); return;}
+ if (newDOW != expectedDOW) {
+ log_err("Day of week should be %d instead of %d on %s", expectedDOW, newDOW,
+ u_austrcpy(tempMsgBuf, myDateFormat(datfor, date1)) );
+ return;
+ }
+ }
+ while (newDOW != initialDOW);
+
+ ucal_close(cal);
+ udat_close(datfor);
+ free(tzID);
+
+}
+
+/* ------------------------------------- */
+
+/**
+ * Confirm that the offset between local time and GMT behaves as expected.
+ */
+static void TestGMTvsLocal()
+{
+ log_verbose("\nTesting the offset between the GMT and local time\n");
+ testZones(1999, 1, 1, 12, 0, 0);
+ testZones(1999, 4, 16, 18, 30, 0);
+ testZones(1998, 12, 17, 19, 0, 0);
+}
+
+/* ------------------------------------- */
+
+static void testZones(int32_t yr, int32_t mo, int32_t dt, int32_t hr, int32_t mn, int32_t sc)
+{
+ int32_t offset,utc, expected;
+ UCalendar *gmtcal = 0, *cal = 0;
+ UDate date1;
+ double temp;
+ UDateFormat *datfor = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar* tzID = 0;
+ char tempMsgBuf[256];
+
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_strcpy(tzID, fgGMTID);
+ gmtcal=ucal_open(tzID, 3, "en_US", UCAL_TRADITIONAL, &status);;
+ if (U_FAILURE(status)) {
+ log_err("ucal_open failed: %s\n", u_errorName(status));
+ return;
+ }
+ u_uastrcpy(tzID, "PST");
+ cal = ucal_open(tzID, 3, "en_US", UCAL_TRADITIONAL, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_open failed: %s\n", u_errorName(status));
+ return;
+ }
+
+ datfor=udat_open(UDAT_MEDIUM,UDAT_MEDIUM ,NULL, fgGMTID,-1,NULL, 0, &status);
+ if(U_FAILURE(status)){
+ log_err("error in creating the dateformat : %s\n", u_errorName(status));
+ }
+
+ ucal_setDateTime(gmtcal, yr, mo - 1, dt, hr, mn, sc, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_setDateTime failed: %s\n", u_errorName(status));
+ return;
+ }
+ ucal_set(gmtcal, UCAL_MILLISECOND, 0);
+ date1 = ucal_getMillis(gmtcal, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_getMillis failed: %s\n", u_errorName(status));
+ return;
+ }
+ log_verbose("date = %s\n", u_austrcpy(tempMsgBuf, myDateFormat(datfor, date1)) );
+
+
+ ucal_setMillis(cal, date1, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_setMillis() failed: %s\n", u_errorName(status));
+ return;
+ }
+
+ offset = ucal_get(cal, UCAL_ZONE_OFFSET, &status);
+ offset += ucal_get(cal, UCAL_DST_OFFSET, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("ucal_get() failed: %s\n", u_errorName(status));
+ return;
+ }
+ temp=(double)((double)offset / 1000.0 / 60.0 / 60.0);
+ /*printf("offset for %s %f hr\n", austrdup(myDateFormat(datfor, date1)), temp);*/
+
+ utc = ((ucal_get(cal, UCAL_HOUR_OF_DAY, &status) * 60 +
+ ucal_get(cal, UCAL_MINUTE, &status)) * 60 +
+ ucal_get(cal, UCAL_SECOND, &status)) * 1000 +
+ ucal_get(cal, UCAL_MILLISECOND, &status) - offset;
+ if (U_FAILURE(status)) {
+ log_err("ucal_get() failed: %s\n", u_errorName(status));
+ return;
+ }
+
+ expected = ((hr * 60 + mn) * 60 + sc) * 1000;
+ if (utc != expected) {
+ temp=(double)(utc - expected)/ 1000 / 60 / 60.0;
+ log_err("FAIL: Discrepancy of %d millis = %fhr\n", utc-expected, temp );
+ }
+ else
+ log_verbose("PASS: the offset between local and GMT is correct\n");
+ ucal_close(gmtcal);
+ ucal_close(cal);
+ udat_close(datfor);
+ free(tzID);
+}
+
+/* ------------------------------------- */
+
+
+
+
+/* INTERNAL FUNCTIONS USED */
+/*------------------------------------------------------------------------------------------- */
+
+/* ------------------------------------- */
+static void checkDateTime(UCalendar* c,
+ int32_t y, int32_t m, int32_t d,
+ int32_t hr, int32_t min, int32_t sec,
+ int32_t ms, UCalendarDateFields field)
+
+{
+ UErrorCode status = U_ZERO_ERROR;
+ if (ucal_get(c, UCAL_YEAR, &status) != y ||
+ ucal_get(c, UCAL_MONTH, &status) != m ||
+ ucal_get(c, UCAL_DATE, &status) != d ||
+ ucal_get(c, UCAL_HOUR, &status) != hr ||
+ ucal_get(c, UCAL_MINUTE, &status) != min ||
+ ucal_get(c, UCAL_SECOND, &status) != sec ||
+ ucal_get(c, UCAL_MILLISECOND, &status) != ms) {
+ log_err("U_FAILURE for field %d, Expected y/m/d h:m:s:ms of %d/%d/%d %d:%d:%d:%d got %d/%d/%d %d:%d:%d:%d\n",
+ (int32_t)field, y, m + 1, d, hr, min, sec, ms,
+ ucal_get(c, UCAL_YEAR, &status),
+ ucal_get(c, UCAL_MONTH, &status) + 1,
+ ucal_get(c, UCAL_DATE, &status),
+ ucal_get(c, UCAL_HOUR, &status),
+ ucal_get(c, UCAL_MINUTE, &status) + 1,
+ ucal_get(c, UCAL_SECOND, &status),
+ ucal_get(c, UCAL_MILLISECOND, &status) );
+
+ if (U_FAILURE(status)){
+ log_err("ucal_get failed: %s\n", u_errorName(status));
+ return;
+ }
+
+ }
+ else
+ log_verbose("Confirmed: %d/%d/%d %d:%d:%d:%d\n", y, m + 1, d, hr, min, sec, ms);
+
+}
+
+/* ------------------------------------- */
+static void checkDate(UCalendar* c, int32_t y, int32_t m, int32_t d)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ if (ucal_get(c,UCAL_YEAR, &status) != y ||
+ ucal_get(c, UCAL_MONTH, &status) != m ||
+ ucal_get(c, UCAL_DATE, &status) != d) {
+
+ log_err("FAILURE: Expected y/m/d of %d/%d/%d got %d/%d/%d\n", y, m + 1, d,
+ ucal_get(c, UCAL_YEAR, &status),
+ ucal_get(c, UCAL_MONTH, &status) + 1,
+ ucal_get(c, UCAL_DATE, &status) );
+
+ if (U_FAILURE(status)) {
+ log_err("ucal_get failed: %s\n", u_errorName(status));
+ return;
+ }
+ }
+ else
+ log_verbose("Confirmed: %d/%d/%d\n", y, m + 1, d);
+
+
+}
+
+/* ------------------------------------- */
+
+/* ------------------------------------- */
+
+static void verify1(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day)
+{
+ UDate d1;
+ UErrorCode status = U_ZERO_ERROR;
+ if (ucal_get(c, UCAL_YEAR, &status) == year &&
+ ucal_get(c, UCAL_MONTH, &status) == month &&
+ ucal_get(c, UCAL_DATE, &status) == day) {
+ if (U_FAILURE(status)) {
+ log_err("FAIL: Calendar::get failed: %s\n", u_errorName(status));
+ return;
+ }
+ log_verbose("PASS: %s\n", msg);
+ d1=ucal_getMillis(c, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_getMillis failed: %s\n", u_errorName(status));
+ return;
+ }
+ /*log_verbose(austrdup(myDateFormat(dat, d1)) );*/
+ }
+ else {
+ log_err("FAIL: %s\n", msg);
+ d1=ucal_getMillis(c, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_getMillis failed: %s\n", u_errorName(status) );
+ return;
+ }
+ log_err("Got %s Expected %d/%d/%d \n", austrdup(myDateFormat(dat, d1)), year, month + 1, day );
+ return;
+ }
+
+
+}
+
+/* ------------------------------------ */
+static void verify2(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day,
+ int32_t hour, int32_t min, int32_t sec, int32_t am_pm)
+{
+ UDate d1;
+ UErrorCode status = U_ZERO_ERROR;
+ char tempMsgBuf[256];
+
+ if (ucal_get(c, UCAL_YEAR, &status) == year &&
+ ucal_get(c, UCAL_MONTH, &status) == month &&
+ ucal_get(c, UCAL_DATE, &status) == day &&
+ ucal_get(c, UCAL_HOUR, &status) == hour &&
+ ucal_get(c, UCAL_MINUTE, &status) == min &&
+ ucal_get(c, UCAL_SECOND, &status) == sec &&
+ ucal_get(c, UCAL_AM_PM, &status) == am_pm ){
+ if (U_FAILURE(status)) {
+ log_err("FAIL: Calendar::get failed: %s\n", u_errorName(status));
+ return;
+ }
+ log_verbose("PASS: %s\n", msg);
+ d1=ucal_getMillis(c, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_getMillis failed: %s\n", u_errorName(status));
+ return;
+ }
+ log_verbose("%s\n" , u_austrcpy(tempMsgBuf, myDateFormat(dat, d1)) );
+ }
+ else {
+ log_err("FAIL: %s\n", msg);
+ d1=ucal_getMillis(c, &status);
+ if (U_FAILURE(status)) {
+ log_err("ucal_getMillis failed: %s\n", u_errorName(status));
+ return;
+ }
+ log_err("Got %s Expected %d/%d/%d/ %d:%d:%d %s\n", austrdup(myDateFormat(dat, d1)),
+ year, month + 1, day, hour, min, sec, (am_pm==0) ? "AM": "PM");
+
+ return;
+ }
+
+
+}
+
+void TestGregorianChange() {
+ static const UChar utc[] = { 0x45, 0x74, 0x63, 0x2f, 0x47, 0x4d, 0x54, 0 }; /* "Etc/GMT" */
+ const int32_t dayMillis = 86400 * INT64_C(1000); /* 1 day = 86400 seconds */
+ UCalendar *cal;
+ UDate date;
+ UErrorCode errorCode = U_ZERO_ERROR;
+
+ /* Test ucal_setGregorianChange() on a Gregorian calendar. */
+ errorCode = U_ZERO_ERROR;
+ cal = ucal_open(utc, -1, "", UCAL_GREGORIAN, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucal_open(UTC) failed: %s\n", u_errorName(errorCode));
+ return;
+ }
+ ucal_setGregorianChange(cal, -365 * (dayMillis * (UDate)1), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucal_setGregorianChange(1969) failed: %s\n", u_errorName(errorCode));
+ } else {
+ date = ucal_getGregorianChange(cal, &errorCode);
+ if(U_FAILURE(errorCode) || date != -365 * (dayMillis * (UDate)1)) {
+ log_err("ucal_getGregorianChange() failed: %s, date = %f\n", u_errorName(errorCode), date);
+ }
+ }
+ ucal_close(cal);
+
+ /* Test ucal_setGregorianChange() on a non-Gregorian calendar where it should fail. */
+ errorCode = U_ZERO_ERROR;
+ cal = ucal_open(utc, -1, "th@calendar=buddhist", UCAL_TRADITIONAL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucal_open(UTC, non-Gregorian) failed: %s\n", u_errorName(errorCode));
+ return;
+ }
+ ucal_setGregorianChange(cal, -730 * (dayMillis * (UDate)1), &errorCode);
+ if(errorCode != U_UNSUPPORTED_ERROR) {
+ log_err("ucal_setGregorianChange(non-Gregorian calendar) did not yield U_UNSUPPORTED_ERROR but %s\n",
+ u_errorName(errorCode));
+ }
+ errorCode = U_ZERO_ERROR;
+ date = ucal_getGregorianChange(cal, &errorCode);
+ if(errorCode != U_UNSUPPORTED_ERROR) {
+ log_err("ucal_getGregorianChange(non-Gregorian calendar) did not yield U_UNSUPPORTED_ERROR but %s\n",
+ u_errorName(errorCode));
+ }
+ ucal_close(cal);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.h
new file mode 100644
index 00000000000..e4ec3fdafe0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccaltst.h
@@ -0,0 +1,80 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CAPITEST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************/
+/* C API TEST FOR CALENDAR */
+#ifndef _CCALTST
+#define _CCALTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+
+
+ /**
+ * The function used to test the Calendar API
+ **/
+ static void TestCalendar(void);
+ /**
+ * The function used to test getMillis, setMillis, setDate and setDateTime functions extensively
+ **/
+ static void TestGetSetDateAPI(void);
+ /**
+ * This function is used to test and confirm the functioning of
+ * the calendar get and set functions of calendar fields.
+ **/
+ static void TestFieldGetSet(void);
+ /**
+ * Execute and test adding and rolling extensively.
+ **/
+ static void TestAddRollExtensive(void);
+ /**
+ *Testing the Limits for various Fields of Calendar
+ **/
+ static void TestGetLimits(void);
+ /**
+ * Test that the days of the week progress properly when add is called repeatedly
+ * for increments of 24 days.
+ **/
+ static void TestDOWProgression(void);
+ /**
+ * Confirm that the offset between local time and GMT behaves as expected.
+ **/
+ static void TestGMTvsLocal(void);
+ /**
+ * test subroutine used by TestGMTvsLocal()
+ */
+ static void testZones(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
+
+/*Internal functions used*/
+ /**
+ * test subroutines used by TestAddRollExtensive()
+ **/
+ static void checkDate(UCalendar* c, int32_t y, int32_t m, int32_t d);
+
+ static void checkDateTime(UCalendar* c, int32_t y, int32_t m, int32_t d,
+ int32_t hr, int32_t min, int32_t sec, int32_t ms,
+ UCalendarDateFields field);
+
+ /**
+ * test subroutines used by TestGetSetDateAPI and TestFieldGetSet
+ **/
+ static void verify1(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day);
+
+ static void verify2(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day,
+ int32_t hour, int32_t min, int32_t sec, int32_t am_pm);
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.c
new file mode 100644
index 00000000000..4864ccd6260
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.c
@@ -0,0 +1,3575 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*****************************************************************************
+*
+* File CU_CAPITST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+******************************************************************************
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include "unicode/uloc.h"
+#include "unicode/ucnv.h"
+#include "unicode/ucnv_err.h"
+#include "unicode/putil.h"
+#include "unicode/uset.h"
+#include "unicode/ustring.h"
+#include "ucnv_bld.h" /* for sizeof(UConverter) */
+#include "cmemory.h" /* for UAlignedMemory */
+#include "cintltst.h"
+#include "ccapitst.h"
+
+/* for not including "cstring.h" -begin*/
+#ifdef U_WINDOWS
+# define ctest_stricmp(str1, str2) U_STANDARD_CPP_NAMESPACE _stricmp(str1, str2)
+#elif defined(POSIX)
+# define ctest_stricmp(str1, str2) U_STANDARD_CPP_NAMESPACE strcasecmp(str1, str2)
+#else
+# define ctest_stricmp(str1, str2) T_CString_stricmp(str1, str2)
+#endif
+
+static int U_EXPORT2
+T_CString_stricmp(const char *str1, const char *str2) {
+ if(str1==NULL) {
+ if(str2==NULL) {
+ return 0;
+ } else {
+ return -1;
+ }
+ } else if(str2==NULL) {
+ return 1;
+ } else {
+ /* compare non-NULL strings lexically with lowercase */
+ int rc;
+ unsigned char c1, c2;
+ for(;;) {
+ c1=(unsigned char)*str1;
+ c2=(unsigned char)*str2;
+ if(c1==0) {
+ if(c2==0) {
+ return 0;
+ } else {
+ return -1;
+ }
+ } else if(c2==0) {
+ return 1;
+ } else {
+ /* compare non-zero characters with lowercase */
+ rc=(int)(unsigned char)tolower(c1)-(int)(unsigned char)tolower(c2);
+ if(rc!=0) {
+ return rc;
+ }
+ }
+ ++str1;
+ ++str2;
+ }
+ }
+}
+/* for not including "cstring.h" -end*/
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+#define NUM_CODEPAGE 1
+#define MAX_FILE_LEN 1024*20
+#define UCS_FILE_NAME_SIZE 512
+
+/*returns an action other than the one provided*/
+static UConverterFromUCallback otherUnicodeAction(UConverterFromUCallback MIA);
+static UConverterToUCallback otherCharAction(UConverterToUCallback MIA);
+
+static UConverter *
+cnv_open(const char *name, UErrorCode *pErrorCode) {
+ if(name!=NULL && name[0]=='*') {
+ return ucnv_openPackage(loadTestData(pErrorCode), name+1, pErrorCode);
+ } else {
+ return ucnv_open(name, pErrorCode);
+ }
+}
+
+
+static void ListNames(void);
+static void TestFlushCache(void);
+static void TestDuplicateAlias(void);
+static void TestCCSID(void);
+static void TestJ932(void);
+static void TestJ1968(void);
+static void TestLMBCSMaxChar(void);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestConvertSafeCloneCallback(void);
+#endif
+
+static void TestEBCDICSwapLFNL(void);
+static void TestConvertEx(void);
+static void TestConvertExFromUTF8(void);
+static void TestConvertAlgorithmic(void);
+ void TestDefaultConverterError(void); /* defined in cctest.c */
+static void TestToUCountPending(void);
+static void TestFromUCountPending(void);
+static void TestDefaultName(void);
+static void TestCompareNames(void);
+static void TestSubstString(void);
+static void InvalidArguments(void);
+
+void addTestConvert(TestNode** root);
+
+void addTestConvert(TestNode** root)
+{
+ addTest(root, &ListNames, "tsconv/ccapitst/ListNames");
+ addTest(root, &TestConvert, "tsconv/ccapitst/TestConvert");
+ addTest(root, &TestFlushCache, "tsconv/ccapitst/TestFlushCache");
+ addTest(root, &TestAlias, "tsconv/ccapitst/TestAlias");
+ addTest(root, &TestDuplicateAlias, "tsconv/ccapitst/TestDuplicateAlias");
+ addTest(root, &TestConvertSafeClone, "tsconv/ccapitst/TestConvertSafeClone");
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestConvertSafeCloneCallback,"tsconv/ccapitst/TestConvertSafeCloneCallback");
+#endif
+ addTest(root, &TestCCSID, "tsconv/ccapitst/TestCCSID");
+ addTest(root, &TestJ932, "tsconv/ccapitst/TestJ932");
+ addTest(root, &TestJ1968, "tsconv/ccapitst/TestJ1968");
+ addTest(root, &TestLMBCSMaxChar, "tsconv/ccapitst/TestLMBCSMaxChar");
+ addTest(root, &TestEBCDICSwapLFNL, "tsconv/ccapitst/TestEBCDICSwapLFNL");
+ addTest(root, &TestConvertEx, "tsconv/ccapitst/TestConvertEx");
+ addTest(root, &TestConvertExFromUTF8, "tsconv/ccapitst/TestConvertExFromUTF8");
+ addTest(root, &TestConvertAlgorithmic, "tsconv/ccapitst/TestConvertAlgorithmic");
+ addTest(root, &TestDefaultConverterError, "tsconv/ccapitst/TestDefaultConverterError");
+ addTest(root, &TestToUCountPending, "tsconv/ccapitst/TestToUCountPending");
+ addTest(root, &TestFromUCountPending, "tsconv/ccapitst/TestFromUCountPending");
+ addTest(root, &TestDefaultName, "tsconv/ccapitst/TestDefaultName");
+ addTest(root, &TestCompareNames, "tsconv/ccapitst/TestCompareNames");
+ addTest(root, &TestSubstString, "tsconv/ccapitst/TestSubstString");
+ addTest(root, &InvalidArguments, "tsconv/ccapitst/InvalidArguments");
+}
+
+static void ListNames(void) {
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t testLong1 = 0;
+ const char* available_conv;
+ UEnumeration *allNamesEnum = NULL;
+ int32_t allNamesCount = 0;
+ uint16_t count;
+
+ log_verbose("Testing ucnv_openAllNames()...");
+ allNamesEnum = ucnv_openAllNames(&err);
+ if(U_FAILURE(err)) {
+ log_err("FAILURE! ucnv_openAllNames() -> %s\n", myErrorName(err));
+ }
+ else {
+ const char *string = NULL;
+ int32_t len = 0;
+ int32_t count1 = 0;
+ int32_t count2 = 0;
+ allNamesCount = uenum_count(allNamesEnum, &err);
+ while ((string = uenum_next(allNamesEnum, &len, &err))) {
+ count1++;
+ log_verbose("read \"%s\", length %i\n", string, len);
+ }
+ if (U_FAILURE(err)) {
+ log_err("FAILURE! uenum_next(allNamesEnum...) set an error: %s\n", u_errorName(err));
+ err = U_ZERO_ERROR;
+ }
+ uenum_reset(allNamesEnum, &err);
+ while ((string = uenum_next(allNamesEnum, &len, &err))) {
+ count2++;
+ ucnv_close(ucnv_open(string, &err));
+ log_verbose("read \"%s\", length %i (%s)\n", string, len, U_SUCCESS(err) ? "available" : "unavailable");
+ err = U_ZERO_ERROR;
+ }
+ if (count1 != count2) {
+ log_err("FAILURE! uenum_reset(allNamesEnum, &err); doesn't work\n");
+ }
+ }
+ uenum_close(allNamesEnum);
+ err = U_ZERO_ERROR;
+
+ /*Tests ucnv_getAvailableName(), getAvialableCount()*/
+
+ log_verbose("Testing ucnv_countAvailable()...");
+
+ testLong1=ucnv_countAvailable();
+ log_info("Number of available codepages: %d/%d\n", testLong1, allNamesCount);
+
+ log_verbose("\n---Testing ucnv_getAvailableName.."); /*need to check this out */
+
+ available_conv = ucnv_getAvailableName(testLong1);
+ /*test ucnv_getAvailableName with err condition*/
+ log_verbose("\n---Testing ucnv_getAvailableName..with index < 0 ");
+ available_conv = ucnv_getAvailableName(-1);
+ if(available_conv != NULL){
+ log_err("ucnv_getAvailableName() with index < 0) should return NULL\n");
+ }
+
+ /* Test ucnv_countAliases() etc. */
+ count = ucnv_countAliases("utf-8", &err);
+ if(U_FAILURE(err)) {
+ log_err("FAILURE! ucnv_countAliases(\"utf-8\") -> %s\n", myErrorName(err));
+ } else if(count <= 0) {
+ log_err("FAILURE! ucnv_countAliases(\"utf-8\") -> %d aliases\n", count);
+ } else {
+ /* try to get the aliases individually */
+ const char *alias;
+ alias = ucnv_getAlias("utf-8", 0, &err);
+ if(U_FAILURE(err)) {
+ log_err("FAILURE! ucnv_getAlias(\"utf-8\", 0) -> %s\n", myErrorName(err));
+ } else if(strcmp("UTF-8", alias) != 0) {
+ log_err("FAILURE! ucnv_getAlias(\"utf-8\", 0) -> %s instead of UTF-8\n", alias);
+ } else {
+ uint16_t aliasNum;
+ for(aliasNum = 0; aliasNum < count; ++aliasNum) {
+ alias = ucnv_getAlias("utf-8", aliasNum, &err);
+ if(U_FAILURE(err)) {
+ log_err("FAILURE! ucnv_getAlias(\"utf-8\", %d) -> %s\n", aliasNum, myErrorName(err));
+ } else if(strlen(alias) > 20) {
+ /* sanity check */
+ log_err("FAILURE! ucnv_getAlias(\"utf-8\", %d) -> alias %s insanely long, corrupt?!\n", aliasNum, alias);
+ } else {
+ log_verbose("alias %d for utf-8: %s\n", aliasNum, alias);
+ }
+ }
+ if(U_SUCCESS(err)) {
+ /* try to fill an array with all aliases */
+ const char **aliases;
+ aliases=(const char **)malloc(count * sizeof(const char *));
+ if(aliases != 0) {
+ ucnv_getAliases("utf-8", aliases, &err);
+ if(U_FAILURE(err)) {
+ log_err("FAILURE! ucnv_getAliases(\"utf-8\") -> %s\n", myErrorName(err));
+ } else {
+ for(aliasNum = 0; aliasNum < count; ++aliasNum) {
+ /* compare the pointers with the ones returned individually */
+ alias = ucnv_getAlias("utf-8", aliasNum, &err);
+ if(U_FAILURE(err)) {
+ log_err("FAILURE! ucnv_getAlias(\"utf-8\", %d) -> %s\n", aliasNum, myErrorName(err));
+ } else if(aliases[aliasNum] != alias) {
+ log_err("FAILURE! ucnv_getAliases(\"utf-8\")[%d] != ucnv_getAlias(\"utf-8\", %d)\n", aliasNum, aliasNum);
+ }
+ }
+ }
+ free((char **)aliases);
+ }
+ }
+ }
+ }
+}
+
+
+static void TestConvert()
+{
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ char myptr[4];
+ char save[4];
+ int32_t testLong1 = 0;
+ uint16_t rest = 0;
+ int32_t len = 0;
+ int32_t x = 0;
+ FILE* ucs_file_in = NULL;
+ UChar BOM = 0x0000;
+ UChar myUChar = 0x0000;
+ char* mytarget; /* [MAX_FILE_LEN] */
+ char* mytarget_1;
+ char* mytarget_use;
+ UChar* consumedUni = NULL;
+ char* consumed = NULL;
+ char* output_cp_buffer; /* [MAX_FILE_LEN] */
+ UChar* ucs_file_buffer; /* [MAX_FILE_LEN] */
+ UChar* ucs_file_buffer_use;
+ UChar* my_ucs_file_buffer; /* [MAX_FILE_LEN] */
+ UChar* my_ucs_file_buffer_1;
+ int8_t ii = 0;
+ int32_t j = 0;
+ uint16_t codepage_index = 0;
+ int32_t cp = 0;
+ UErrorCode err = U_ZERO_ERROR;
+ char ucs_file_name[UCS_FILE_NAME_SIZE];
+ UConverterFromUCallback MIA1, MIA1_2;
+ UConverterToUCallback MIA2, MIA2_2;
+ const void *MIA1Context, *MIA1Context2, *MIA2Context, *MIA2Context2;
+ UConverter* someConverters[5];
+ UConverter* myConverter = 0;
+ UChar* displayname = 0;
+
+ const char* locale;
+
+ UChar* uchar1 = 0;
+ UChar* uchar2 = 0;
+ UChar* uchar3 = 0;
+ int32_t targetcapacity2;
+ int32_t targetcapacity;
+ int32_t targetsize;
+ int32_t disnamelen;
+
+ const UChar* tmp_ucs_buf;
+ const UChar* tmp_consumedUni=NULL;
+ const char* tmp_mytarget_use;
+ const char* tmp_consumed;
+
+ /******************************************************************
+ Checking Unicode -> ksc
+ ******************************************************************/
+
+ const char* CodePagesToTest[NUM_CODEPAGE] =
+ {
+ "ibm-949_P110-1999"
+
+
+ };
+ const uint16_t CodePageNumberToTest[NUM_CODEPAGE] =
+ {
+ 949
+ };
+
+
+ const int8_t CodePagesMinChars[NUM_CODEPAGE] =
+ {
+ 1
+
+ };
+
+ const int8_t CodePagesMaxChars[NUM_CODEPAGE] =
+ {
+ 2
+
+ };
+
+ const uint16_t CodePagesSubstitutionChars[NUM_CODEPAGE] =
+ {
+ 0xAFFE
+ };
+
+ const char* CodePagesTestFiles[NUM_CODEPAGE] =
+ {
+ "uni-text.bin"
+ };
+
+
+ const UConverterPlatform CodePagesPlatform[NUM_CODEPAGE] =
+ {
+ UCNV_IBM
+
+ };
+
+ const char* CodePagesLocale[NUM_CODEPAGE] =
+ {
+ "ko_KR"
+ };
+
+ UConverterFromUCallback oldFromUAction = NULL;
+ UConverterToUCallback oldToUAction = NULL;
+ const void* oldFromUContext = NULL;
+ const void* oldToUContext = NULL;
+
+ /* Allocate memory */
+ mytarget = (char*) malloc(MAX_FILE_LEN * sizeof(mytarget[0]));
+ output_cp_buffer = (char*) malloc(MAX_FILE_LEN * sizeof(output_cp_buffer[0]));
+ ucs_file_buffer = (UChar*) malloc(MAX_FILE_LEN * sizeof(ucs_file_buffer[0]));
+ my_ucs_file_buffer = (UChar*) malloc(MAX_FILE_LEN * sizeof(my_ucs_file_buffer[0]));
+
+ ucs_file_buffer_use = ucs_file_buffer;
+ mytarget_1=mytarget;
+ mytarget_use = mytarget;
+ my_ucs_file_buffer_1=my_ucs_file_buffer;
+
+ /* flush the converter cache to get a consistent state before the flushing is tested */
+ ucnv_flushCache();
+
+ /*Testing ucnv_openU()*/
+ {
+ UChar converterName[]={ 0x0069, 0x0062, 0x006d, 0x002d, 0x0039, 0x0034, 0x0033, 0x0000}; /*ibm-943*/
+ UChar firstSortedName[]={ 0x0021, 0x0000}; /* ! */
+ UChar lastSortedName[]={ 0x007E, 0x0000}; /* ~ */
+ const char *illegalNameChars={ "ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943"};
+ UChar illegalName[100];
+ UConverter *converter=NULL;
+ err=U_ZERO_ERROR;
+ converter=ucnv_openU(converterName, &err);
+ if(U_FAILURE(err)){
+ log_data_err("FAILURE! ucnv_openU(ibm-943, err) failed. %s\n", myErrorName(err));
+ }
+ ucnv_close(converter);
+ err=U_ZERO_ERROR;
+ converter=ucnv_openU(NULL, &err);
+ if(U_FAILURE(err)){
+ log_err("FAILURE! ucnv_openU(NULL, err) failed. %s\n", myErrorName(err));
+ }
+ ucnv_close(converter);
+ /*testing with error value*/
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ converter=ucnv_openU(converterName, &err);
+ if(!(converter == NULL)){
+ log_data_err("FAILURE! ucnv_openU(ibm-943, U_ILLEGAL_ARGUMENT_ERROR) is expected to fail\n");
+ }
+ ucnv_close(converter);
+ err=U_ZERO_ERROR;
+ u_uastrcpy(illegalName, "");
+ u_uastrcpy(illegalName, illegalNameChars);
+ ucnv_openU(illegalName, &err);
+ if(!(err==U_ILLEGAL_ARGUMENT_ERROR)){
+ log_err("FAILURE! ucnv_openU(illegalName, err) is expected to fail\n");
+ }
+
+ err=U_ZERO_ERROR;
+ ucnv_openU(firstSortedName, &err);
+ if(err!=U_FILE_ACCESS_ERROR){
+ log_err("FAILURE! ucnv_openU(firstSortedName, err) is expected to fail\n");
+ }
+
+ err=U_ZERO_ERROR;
+ ucnv_openU(lastSortedName, &err);
+ if(err!=U_FILE_ACCESS_ERROR){
+ log_err("FAILURE! ucnv_openU(lastSortedName, err) is expected to fail\n");
+ }
+
+ err=U_ZERO_ERROR;
+ }
+ log_verbose("Testing ucnv_open() with converter name greater than 7 characters\n");
+ {
+ UConverter *cnv=NULL;
+ err=U_ZERO_ERROR;
+ cnv=ucnv_open("ibm-949,Madhu", &err);
+ if(U_FAILURE(err)){
+ log_data_err("FAILURE! ucnv_open(\"ibm-949,Madhu\", err) failed. %s\n", myErrorName(err));
+ }
+ ucnv_close(cnv);
+
+ }
+ /*Testing ucnv_convert()*/
+ {
+ int32_t targetLimit=0, sourceLimit=0, i=0, targetCapacity=0;
+ const uint8_t source[]={ 0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
+ const uint8_t expectedTarget[]={ 0x00, 0x37, 0x2d, 0x2e, 0x0e, 0x49, 0x62, 0x0f, 0x00};
+ char *target=0;
+ sourceLimit=sizeof(source)/sizeof(source[0]);
+ err=U_ZERO_ERROR;
+ targetLimit=0;
+
+ targetCapacity=ucnv_convert("ibm-1364", "ibm-1363", NULL, targetLimit , (const char*)source, sourceLimit, &err);
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err=U_ZERO_ERROR;
+ targetLimit=targetCapacity+1;
+ target=(char*)malloc(sizeof(char) * targetLimit);
+ targetCapacity=ucnv_convert("ibm-1364", "ibm-1363", target, targetLimit , (const char*)source, sourceLimit, &err);
+ }
+ if(U_FAILURE(err)){
+ log_data_err("FAILURE! ucnv_convert(ibm-1363->ibm-1364) failed. %s\n", myErrorName(err));
+ }
+ else {
+ for(i=0; i<targetCapacity; i++){
+ if(target[i] != expectedTarget[i]){
+ log_err("FAIL: ucnv_convert(ibm-1363->ibm-1364) failed.at index \n i=%d, Expected: %lx Got: %lx\n", i, (UChar)expectedTarget[i], (uint8_t)target[i]);
+ }
+ }
+
+ i=ucnv_convert("ibm-1364", "ibm-1363", target, targetLimit , (const char*)source+1, -1, &err);
+ if(U_FAILURE(err) || i!=7){
+ log_err("FAILURE! ucnv_convert() with sourceLimit=-1 failed: %s, returned %d instead of 7\n",
+ u_errorName(err), i);
+ }
+
+ /*Test error conditions*/
+ err=U_ZERO_ERROR;
+ i=ucnv_convert("ibm-1364", "ibm-1363", target, targetLimit , (const char*)source, 0, &err);
+ if(i !=0){
+ log_err("FAILURE! ucnv_convert() with sourceLimit=0 is expected to return 0\n");
+ }
+
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ sourceLimit=sizeof(source)/sizeof(source[0]);
+ i=ucnv_convert("ibm-1364", "ibm-1363", target, targetLimit , (const char*)source, sourceLimit, &err);
+ if(i !=0 ){
+ log_err("FAILURE! ucnv_convert() with err=U_ILLEGAL_ARGUMENT_ERROR is expected to return 0\n");
+ }
+
+ err=U_ZERO_ERROR;
+ sourceLimit=sizeof(source)/sizeof(source[0]);
+ targetLimit=0;
+ i=ucnv_convert("ibm-1364", "ibm-1363", target, targetLimit , (const char*)source, sourceLimit, &err);
+ if(!(U_FAILURE(err) && err==U_BUFFER_OVERFLOW_ERROR)){
+ log_err("FAILURE! ucnv_convert() with targetLimit=0 is expected to throw U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ err=U_ZERO_ERROR;
+ free(target);
+ }
+ }
+
+ /*Testing ucnv_openCCSID and ucnv_open with error conditions*/
+ log_verbose("\n---Testing ucnv_open with err ! = U_ZERO_ERROR...\n");
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ if(ucnv_open(NULL, &err) != NULL){
+ log_err("ucnv_open with err != U_ZERO_ERROR is supposed to fail\n");
+ }
+ if(ucnv_openCCSID(1051, UCNV_IBM, &err) != NULL){
+ log_err("ucnv_open with err != U_ZERO_ERROR is supposed to fail\n");
+ }
+ err=U_ZERO_ERROR;
+
+ /* Testing ucnv_openCCSID(), ucnv_open(), ucnv_getName() */
+ log_verbose("\n---Testing ucnv_open default...\n");
+ someConverters[0] = ucnv_open(NULL,&err);
+ someConverters[1] = ucnv_open(NULL,&err);
+ someConverters[2] = ucnv_open("utf8", &err);
+ someConverters[3] = ucnv_openCCSID(949,UCNV_IBM,&err);
+ ucnv_close(ucnv_openCCSID(1051, UCNV_IBM, &err)); /* test for j350; ucnv_close(NULL) is safe */
+ if (U_FAILURE(err)){ log_data_err("FAILURE! %s\n", myErrorName(err));}
+
+ /* Testing ucnv_getName()*/
+ /*default code page */
+ ucnv_getName(someConverters[0], &err);
+ if(U_FAILURE(err)) {
+ log_data_err("getName[0] failed\n");
+ } else {
+ log_verbose("getName(someConverters[0]) returned %s\n", ucnv_getName(someConverters[0], &err));
+ }
+ ucnv_getName(someConverters[1], &err);
+ if(U_FAILURE(err)) {
+ log_data_err("getName[1] failed\n");
+ } else {
+ log_verbose("getName(someConverters[1]) returned %s\n", ucnv_getName(someConverters[1], &err));
+ }
+
+ ucnv_close(someConverters[0]);
+ ucnv_close(someConverters[1]);
+ ucnv_close(someConverters[2]);
+ ucnv_close(someConverters[3]);
+
+
+ for (codepage_index=0; codepage_index < NUM_CODEPAGE; ++codepage_index)
+ {
+ int32_t i = 0;
+
+ err = U_ZERO_ERROR;
+#ifdef U_TOPSRCDIR
+ strcpy(ucs_file_name, U_TOPSRCDIR U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING);
+#else
+ strcpy(ucs_file_name, loadTestData(&err));
+
+ if(U_FAILURE(err)){
+ log_err("\nCouldn't get the test data directory... Exiting...Error:%s\n", u_errorName(err));
+ return;
+ }
+
+ {
+ char* index = strrchr(ucs_file_name,(char)U_FILE_SEP_CHAR);
+
+ if((unsigned int)(index-ucs_file_name) != (strlen(ucs_file_name)-1)){
+ *(index+1)=0;
+ }
+ }
+
+ strcat(ucs_file_name,".."U_FILE_SEP_STRING);
+#endif
+ strcat(ucs_file_name, CodePagesTestFiles[codepage_index]);
+
+ ucs_file_in = fopen(ucs_file_name,"rb");
+ if (!ucs_file_in)
+ {
+ log_err("Couldn't open the Unicode file [%s]... Exiting...\n", ucs_file_name);
+ return;
+ }
+
+ /*Creates a converter and testing ucnv_openCCSID(u_int code_page, platform, errstatus*/
+
+ /* myConverter =ucnv_openCCSID(CodePageNumberToTest[codepage_index],UCNV_IBM, &err); */
+ /* ucnv_flushCache(); */
+ myConverter =ucnv_open( "ibm-949", &err);
+ if (!myConverter || U_FAILURE(err))
+ {
+ log_data_err("Error creating the ibm-949 converter - %s \n", u_errorName(err));
+
+ return;
+ }
+
+ /*testing for ucnv_getName() */
+ log_verbose("Testing ucnv_getName()...\n");
+ ucnv_getName(myConverter, &err);
+ if(U_FAILURE(err))
+ log_err("Error in getName\n");
+ else
+ {
+ log_verbose("getName o.k. %s\n", ucnv_getName(myConverter, &err));
+ }
+ if (ctest_stricmp(ucnv_getName(myConverter, &err), CodePagesToTest[codepage_index]))
+ log_err("getName failed\n");
+ else
+ log_verbose("getName ok\n");
+ /*Test getName with error condition*/
+ {
+ const char* name=0;
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ log_verbose("Testing ucnv_getName with err != U_ZERO_ERROR");
+ name=ucnv_getName(myConverter, &err);
+ if(name != NULL){
+ log_err("ucnv_getName() with err != U_ZERO_ERROR is expected to fail");
+ }
+ err=U_ZERO_ERROR;
+ }
+
+
+ /*Tests ucnv_getMaxCharSize() and ucnv_getMinCharSize()*/
+
+ log_verbose("Testing ucnv_getMaxCharSize()...\n");
+ if (ucnv_getMaxCharSize(myConverter)==CodePagesMaxChars[codepage_index])
+ log_verbose("Max byte per character OK\n");
+ else
+ log_err("Max byte per character failed\n");
+
+ log_verbose("\n---Testing ucnv_getMinCharSize()...\n");
+ if (ucnv_getMinCharSize(myConverter)==CodePagesMinChars[codepage_index])
+ log_verbose("Min byte per character OK\n");
+ else
+ log_err("Min byte per character failed\n");
+
+
+ /*Testing for ucnv_getSubstChars() and ucnv_setSubstChars()*/
+ log_verbose("\n---Testing ucnv_getSubstChars...\n");
+ ii=4;
+ ucnv_getSubstChars(myConverter, myptr, &ii, &err);
+ if (ii <= 0) {
+ log_err("ucnv_getSubstChars returned a negative number %d\n", ii);
+ }
+
+ for(x=0;x<ii;x++)
+ rest = (uint16_t)(((unsigned char)rest << 8) + (unsigned char)myptr[x]);
+ if (rest==CodePagesSubstitutionChars[codepage_index])
+ log_verbose("Substitution character ok\n");
+ else
+ log_err("Substitution character failed.\n");
+
+ log_verbose("\n---Testing ucnv_setSubstChars RoundTrip Test ...\n");
+ ucnv_setSubstChars(myConverter, myptr, ii, &err);
+ if (U_FAILURE(err))
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+ ucnv_getSubstChars(myConverter,save, &ii, &err);
+ if (U_FAILURE(err))
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ if (strncmp(save, myptr, ii))
+ log_err("Saved substitution character failed\n");
+ else
+ log_verbose("Saved substitution character ok\n");
+
+ /*Testing for ucnv_getSubstChars() and ucnv_setSubstChars() with error conditions*/
+ log_verbose("\n---Testing ucnv_getSubstChars.. with len < minBytesPerChar\n");
+ ii=1;
+ ucnv_getSubstChars(myConverter, myptr, &ii, &err);
+ if(err != U_INDEX_OUTOFBOUNDS_ERROR){
+ log_err("ucnv_getSubstChars() with len < minBytesPerChar should throw U_INDEX_OUTOFBOUNDS_ERROR Got %s\n", myErrorName(err));
+ }
+ err=U_ZERO_ERROR;
+ ii=4;
+ ucnv_getSubstChars(myConverter, myptr, &ii, &err);
+ log_verbose("\n---Testing ucnv_setSubstChars.. with len < minBytesPerChar\n");
+ ucnv_setSubstChars(myConverter, myptr, 0, &err);
+ if(err != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ucnv_setSubstChars() with len < minBytesPerChar should throw U_ILLEGAL_ARGUMENT_ERROR Got %s\n", myErrorName(err));
+ }
+ log_verbose("\n---Testing ucnv_setSubstChars.. with err != U_ZERO_ERROR \n");
+ strcpy(myptr, "abc");
+ ucnv_setSubstChars(myConverter, myptr, ii, &err);
+ err=U_ZERO_ERROR;
+ ucnv_getSubstChars(myConverter, save, &ii, &err);
+ if(strncmp(save, myptr, ii) == 0){
+ log_err("uncv_setSubstChars() with err != U_ZERO_ERROR shouldn't set the SubstChars and just return\n");
+ }
+ log_verbose("\n---Testing ucnv_getSubstChars.. with err != U_ZERO_ERROR \n");
+ err=U_ZERO_ERROR;
+ strcpy(myptr, "abc");
+ ucnv_setSubstChars(myConverter, myptr, ii, &err);
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ ucnv_getSubstChars(myConverter, save, &ii, &err);
+ if(strncmp(save, myptr, ii) == 0){
+ log_err("uncv_setSubstChars() with err != U_ZERO_ERROR shouldn't fill the SubstChars in the buffer, it just returns\n");
+ }
+ err=U_ZERO_ERROR;
+ /*------*/
+
+#ifdef U_ENABLE_GENERIC_ISO_2022
+ /*resetState ucnv_reset()*/
+ log_verbose("\n---Testing ucnv_reset()..\n");
+ ucnv_reset(myConverter);
+ {
+ UChar32 c;
+ const uint8_t in[]={ 0x1b, 0x25, 0x42, 0x31, 0x32, 0x61, 0xc0, 0x80, 0xe0, 0x80, 0x80, 0xf0, 0x80, 0x80, 0x80};
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UConverter *cnv=ucnv_open("ISO_2022", &err);
+ if(U_FAILURE(err)) {
+ log_err("Unable to open a iso-2022 converter: %s\n", u_errorName(err));
+ }
+ c=ucnv_getNextUChar(cnv, &source, limit, &err);
+ if((U_FAILURE(err) || c != (UChar32)0x0031)) {
+ log_err("ucnv_getNextUChar() failed: %s\n", u_errorName(err));
+ }
+ ucnv_reset(cnv);
+ ucnv_close(cnv);
+
+ }
+#endif
+
+ /*getDisplayName*/
+ log_verbose("\n---Testing ucnv_getDisplayName()...\n");
+ locale=CodePagesLocale[codepage_index];
+ len=0;
+ displayname=NULL;
+ disnamelen = ucnv_getDisplayName(myConverter, locale, displayname, len, &err);
+ if(err==U_BUFFER_OVERFLOW_ERROR) {
+ err=U_ZERO_ERROR;
+ displayname=(UChar*)malloc((disnamelen+1) * sizeof(UChar));
+ ucnv_getDisplayName(myConverter,locale,displayname,disnamelen+1, &err);
+ if(U_FAILURE(err)) {
+ log_err("getDisplayName failed. The error is %s\n", myErrorName(err));
+ }
+ else {
+ log_verbose(" getDisplayName o.k.\n");
+ }
+ free(displayname);
+ displayname=NULL;
+ }
+ else {
+ log_err("getDisplayName preflight doesn't work. Error is %s\n", myErrorName(err));
+ }
+ /*test ucnv_getDiaplayName with error condition*/
+ err= U_ILLEGAL_ARGUMENT_ERROR;
+ len=ucnv_getDisplayName(myConverter,locale,NULL,0, &err);
+ if( len !=0 ){
+ log_err("ucnv_getDisplayName() with err != U_ZERO_ERROR is supposed to return 0\n");
+ }
+ /*test ucnv_getDiaplayName with error condition*/
+ err=U_ZERO_ERROR;
+ len=ucnv_getDisplayName(NULL,locale,NULL,0, &err);
+ if( len !=0 || U_SUCCESS(err)){
+ log_err("ucnv_getDisplayName(NULL) with cnv == NULL is supposed to return 0\n");
+ }
+ err=U_ZERO_ERROR;
+
+ /* testing ucnv_setFromUCallBack() and ucnv_getFromUCallBack()*/
+ ucnv_getFromUCallBack(myConverter, &MIA1, &MIA1Context);
+
+ log_verbose("\n---Testing ucnv_setFromUCallBack...\n");
+ ucnv_setFromUCallBack(myConverter, otherUnicodeAction(MIA1), &BOM, &oldFromUAction, &oldFromUContext, &err);
+ if (U_FAILURE(err) || oldFromUAction != MIA1 || oldFromUContext != MIA1Context)
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ ucnv_getFromUCallBack(myConverter, &MIA1_2, &MIA1Context2);
+ if (MIA1_2 != otherUnicodeAction(MIA1) || MIA1Context2 != &BOM)
+ log_err("get From UCallBack failed\n");
+ else
+ log_verbose("get From UCallBack ok\n");
+
+ log_verbose("\n---Testing getFromUCallBack Roundtrip...\n");
+ ucnv_setFromUCallBack(myConverter,MIA1, MIA1Context, &oldFromUAction, &oldFromUContext, &err);
+ if (U_FAILURE(err) || oldFromUAction != otherUnicodeAction(MIA1) || oldFromUContext != &BOM)
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ ucnv_getFromUCallBack(myConverter, &MIA1_2, &MIA1Context2);
+ if (MIA1_2 != MIA1 || MIA1Context2 != MIA1Context)
+ log_err("get From UCallBack action failed\n");
+ else
+ log_verbose("get From UCallBack action ok\n");
+
+ /*testing ucnv_setToUCallBack with error conditions*/
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ log_verbose("\n---Testing setFromUCallBack. with err != U_ZERO_ERROR..\n");
+ ucnv_setFromUCallBack(myConverter, otherUnicodeAction(MIA1), &BOM, &oldFromUAction, &oldFromUContext, &err);
+ ucnv_getFromUCallBack(myConverter, &MIA1_2, &MIA1Context2);
+ if(MIA1_2 == otherUnicodeAction(MIA1) || MIA1Context2 == &BOM){
+ log_err("To setFromUCallBack with err != U_ZERO_ERROR is supposed to fail\n");
+ }
+ err=U_ZERO_ERROR;
+
+
+ /*testing ucnv_setToUCallBack() and ucnv_getToUCallBack()*/
+ ucnv_getToUCallBack(myConverter, &MIA2, &MIA2Context);
+
+ log_verbose("\n---Testing setTo UCallBack...\n");
+ ucnv_setToUCallBack(myConverter,otherCharAction(MIA2), &BOM, &oldToUAction, &oldToUContext, &err);
+ if (U_FAILURE(err) || oldToUAction != MIA2 || oldToUContext != MIA2Context)
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ ucnv_getToUCallBack(myConverter, &MIA2_2, &MIA2Context2);
+ if (MIA2_2 != otherCharAction(MIA2) || MIA2Context2 != &BOM)
+ log_err("To UCallBack failed\n");
+ else
+ log_verbose("To UCallBack ok\n");
+
+ log_verbose("\n---Testing setTo UCallBack Roundtrip...\n");
+ ucnv_setToUCallBack(myConverter,MIA2, MIA2Context, &oldToUAction, &oldToUContext, &err);
+ if (U_FAILURE(err) || oldToUAction != otherCharAction(MIA2) || oldToUContext != &BOM)
+ { log_err("FAILURE! %s\n", myErrorName(err)); }
+
+ ucnv_getToUCallBack(myConverter, &MIA2_2, &MIA2Context2);
+ if (MIA2_2 != MIA2 || MIA2Context2 != MIA2Context)
+ log_err("To UCallBack failed\n");
+ else
+ log_verbose("To UCallBack ok\n");
+
+ /*testing ucnv_setToUCallBack with error conditions*/
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ log_verbose("\n---Testing setToUCallBack. with err != U_ZERO_ERROR..\n");
+ ucnv_setToUCallBack(myConverter,otherCharAction(MIA2), NULL, &oldToUAction, &oldToUContext, &err);
+ ucnv_getToUCallBack(myConverter, &MIA2_2, &MIA2Context2);
+ if (MIA2_2 == otherCharAction(MIA2) || MIA2Context2 == &BOM){
+ log_err("To setToUCallBack with err != U_ZERO_ERROR is supposed to fail\n");
+ }
+ err=U_ZERO_ERROR;
+
+
+ /*getcodepageid testing ucnv_getCCSID() */
+ log_verbose("\n----Testing getCCSID....\n");
+ cp = ucnv_getCCSID(myConverter,&err);
+ if (U_FAILURE(err))
+ {
+ log_err("FAILURE!..... %s\n", myErrorName(err));
+ }
+ if (cp != CodePageNumberToTest[codepage_index])
+ log_err("Codepage number test failed\n");
+ else
+ log_verbose("Codepage number test OK\n");
+
+ /*testing ucnv_getCCSID() with err != U_ZERO_ERROR*/
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ if( ucnv_getCCSID(myConverter,&err) != -1){
+ log_err("ucnv_getCCSID() with err != U_ZERO_ERROR is supposed to fail\n");
+ }
+ err=U_ZERO_ERROR;
+
+ /*getCodepagePlatform testing ucnv_getPlatform()*/
+ log_verbose("\n---Testing getCodepagePlatform ..\n");
+ if (CodePagesPlatform[codepage_index]!=ucnv_getPlatform(myConverter, &err))
+ log_err("Platform codepage test failed\n");
+ else
+ log_verbose("Platform codepage test ok\n");
+
+ if (U_FAILURE(err))
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+ /*testing ucnv_getPlatform() with err != U_ZERO_ERROR*/
+ err= U_ILLEGAL_ARGUMENT_ERROR;
+ if(ucnv_getPlatform(myConverter, &err) != UCNV_UNKNOWN){
+ log_err("ucnv)getPlatform with err != U_ZERO_ERROR is supposed to fail\n");
+ }
+ err=U_ZERO_ERROR;
+
+
+ /*Reads the BOM*/
+ fread(&BOM, sizeof(UChar), 1, ucs_file_in);
+ if (BOM!=0xFEFF && BOM!=0xFFFE)
+ {
+ log_err("File Missing BOM...Bailing!\n");
+ return;
+ }
+
+
+ /*Reads in the file*/
+ while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, sizeof(UChar), 1, ucs_file_in)))
+ {
+ myUChar = ucs_file_buffer[i-1];
+
+ ucs_file_buffer[i-1] = (UChar)((BOM==0xFEFF)?myUChar:((myUChar >> 8) | (myUChar << 8))); /*adjust if BIG_ENDIAN*/
+ }
+
+ myUChar = ucs_file_buffer[i-1];
+ ucs_file_buffer[i-1] = (UChar)((BOM==0xFEFF)?myUChar:((myUChar >> 8) | (myUChar << 8))); /*adjust if BIG_ENDIAN Corner Case*/
+
+
+ /*testing ucnv_fromUChars() and ucnv_toUChars() */
+ /*uchar1---fromUChar--->output_cp_buffer --toUChar--->uchar2*/
+
+ uchar1=(UChar*)malloc(sizeof(UChar) * (i+1));
+ u_uastrcpy(uchar1,"");
+ u_strncpy(uchar1,ucs_file_buffer,i);
+ uchar1[i] = 0;
+
+ uchar3=(UChar*)malloc(sizeof(UChar)*(i+1));
+ u_uastrcpy(uchar3,"");
+ u_strncpy(uchar3,ucs_file_buffer,i);
+ uchar3[i] = 0;
+
+ /*Calls the Conversion Routine */
+ testLong1 = MAX_FILE_LEN;
+ log_verbose("\n---Testing ucnv_fromUChars()\n");
+ targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, -1, &err);
+ if (U_FAILURE(err))
+ {
+ log_err("\nFAILURE...%s\n", myErrorName(err));
+ }
+ else
+ log_verbose(" ucnv_fromUChars() o.k.\n");
+
+ /*test the conversion routine */
+ log_verbose("\n---Testing ucnv_toUChars()\n");
+ /*call it first time for trapping the targetcapacity and size needed to allocate memory for the buffer uchar2 */
+ targetcapacity2=0;
+ targetsize = ucnv_toUChars(myConverter,
+ NULL,
+ targetcapacity2,
+ output_cp_buffer,
+ strlen(output_cp_buffer),
+ &err);
+ /*if there is an buffer overflow then trap the values and pass them and make the actual call*/
+
+ if(err==U_BUFFER_OVERFLOW_ERROR)
+ {
+ err=U_ZERO_ERROR;
+ uchar2=(UChar*)malloc((targetsize+1) * sizeof(UChar));
+ targetsize = ucnv_toUChars(myConverter,
+ uchar2,
+ targetsize+1,
+ output_cp_buffer,
+ strlen(output_cp_buffer),
+ &err);
+
+ if(U_FAILURE(err))
+ log_err("ucnv_toUChars() FAILED %s\n", myErrorName(err));
+ else
+ log_verbose(" ucnv_toUChars() o.k.\n");
+
+ if(u_strcmp(uchar1,uchar2)!=0)
+ log_err("equality test failed with conversion routine\n");
+ }
+ else
+ {
+ log_err("ERR: calling toUChars: Didn't get U_BUFFER_OVERFLOW .. expected it.\n");
+ }
+ /*Testing ucnv_fromUChars and ucnv_toUChars with error conditions*/
+ err=U_ILLEGAL_ARGUMENT_ERROR;
+ log_verbose("\n---Testing ucnv_fromUChars() with err != U_ZERO_ERROR\n");
+ targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, -1, &err);
+ if (targetcapacity !=0) {
+ log_err("\nFAILURE: ucnv_fromUChars with err != U_ZERO_ERROR is expected to fail and return 0\n");
+ }
+ err=U_ZERO_ERROR;
+ log_verbose("\n---Testing ucnv_fromUChars() with converter=NULL\n");
+ targetcapacity = ucnv_fromUChars(NULL, output_cp_buffer, testLong1, uchar1, -1, &err);
+ if (targetcapacity !=0 || err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("\nFAILURE: ucnv_fromUChars with converter=NULL is expected to fail\n");
+ }
+ err=U_ZERO_ERROR;
+ log_verbose("\n---Testing ucnv_fromUChars() with sourceLength = 0\n");
+ targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, 0, &err);
+ if (targetcapacity !=0) {
+ log_err("\nFAILURE: ucnv_fromUChars with sourceLength 0 is expected to return 0\n");
+ }
+ log_verbose("\n---Testing ucnv_fromUChars() with targetLength = 0\n");
+ targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, 0, uchar1, -1, &err);
+ if (err != U_BUFFER_OVERFLOW_ERROR) {
+ log_err("\nFAILURE: ucnv_fromUChars with targetLength 0 is expected to fail and throw U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ /*toUChars with error conditions*/
+ targetsize = ucnv_toUChars(myConverter, uchar2, targetsize, output_cp_buffer, strlen(output_cp_buffer), &err);
+ if(targetsize != 0){
+ log_err("\nFAILURE: ucnv_toUChars with err != U_ZERO_ERROR is expected to fail and return 0\n");
+ }
+ err=U_ZERO_ERROR;
+ targetsize = ucnv_toUChars(myConverter, uchar2, -1, output_cp_buffer, strlen(output_cp_buffer), &err);
+ if(targetsize != 0 || err != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("\nFAILURE: ucnv_toUChars with targetsize < 0 is expected to throw U_ILLEGAL_ARGUMENT_ERROR and return 0\n");
+ }
+ err=U_ZERO_ERROR;
+ targetsize = ucnv_toUChars(myConverter, uchar2, 0, output_cp_buffer, 0, &err);
+ if (targetsize !=0) {
+ log_err("\nFAILURE: ucnv_toUChars with sourceLength 0 is expected to return 0\n");
+ }
+ targetcapacity2=0;
+ targetsize = ucnv_toUChars(myConverter, NULL, targetcapacity2, output_cp_buffer, strlen(output_cp_buffer), &err);
+ if (err != U_STRING_NOT_TERMINATED_WARNING) {
+ log_err("\nFAILURE: ucnv_toUChars(targetLength)->%s instead of U_STRING_NOT_TERMINATED_WARNING\n",
+ u_errorName(err));
+ }
+ err=U_ZERO_ERROR;
+ /*-----*/
+
+
+ /*testing for ucnv_fromUnicode() and ucnv_toUnicode() */
+ /*Clean up re-usable vars*/
+ j=0;
+ log_verbose("Testing ucnv_fromUnicode().....\n");
+ tmp_ucs_buf=ucs_file_buffer_use;
+ ucnv_fromUnicode(myConverter, &mytarget_1,
+ mytarget + MAX_FILE_LEN,
+ &tmp_ucs_buf,
+ ucs_file_buffer_use+i,
+ NULL,
+ TRUE,
+ &err);
+ consumedUni = (UChar*)tmp_consumedUni;
+
+ if (U_FAILURE(err))
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+ else
+ log_verbose("ucnv_fromUnicode() o.k.\n");
+
+ /*Uni1 ----ToUnicode----> Cp2 ----FromUnicode---->Uni3 */
+ log_verbose("Testing ucnv_toUnicode().....\n");
+ tmp_mytarget_use=mytarget_use;
+ tmp_consumed = consumed;
+ ucnv_toUnicode(myConverter, &my_ucs_file_buffer_1,
+ my_ucs_file_buffer + MAX_FILE_LEN,
+ &tmp_mytarget_use,
+ mytarget_use + (mytarget_1 - mytarget),
+ NULL,
+ FALSE,
+ &err);
+ consumed = (char*)tmp_consumed;
+ if (U_FAILURE(err))
+ {
+ log_err("FAILURE! %s\n", myErrorName(err));
+ }
+ else
+ log_verbose("ucnv_toUnicode() o.k.\n");
+
+
+ log_verbose("\n---Testing RoundTrip ...\n");
+
+
+ u_strncpy(uchar3, my_ucs_file_buffer,i);
+ uchar3[i] = 0;
+
+ if(u_strcmp(uchar1,uchar3)==0)
+ log_verbose("Equality test o.k.\n");
+ else
+ log_err("Equality test failed\n");
+
+ /*sanity compare */
+ if(uchar2 == NULL)
+ {
+ log_err("uchar2 was NULL (ccapitst.c line %d), couldn't do sanity check\n", __LINE__);
+ }
+ else
+ {
+ if(u_strcmp(uchar2, uchar3)==0)
+ log_verbose("Equality test o.k.\n");
+ else
+ log_err("Equality test failed\n");
+ }
+
+ fclose(ucs_file_in);
+ ucnv_close(myConverter);
+ if (uchar1 != 0) free(uchar1);
+ if (uchar2 != 0) free(uchar2);
+ if (uchar3 != 0) free(uchar3);
+ }
+
+ free((void*)mytarget);
+ free((void*)output_cp_buffer);
+ free((void*)ucs_file_buffer);
+ free((void*)my_ucs_file_buffer);
+#endif
+}
+
+static UConverterFromUCallback otherUnicodeAction(UConverterFromUCallback MIA)
+{
+ return (MIA==(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP)?(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_SUBSTITUTE:(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP;
+}
+
+
+static UConverterToUCallback otherCharAction(UConverterToUCallback MIA)
+{
+ return (MIA==(UConverterToUCallback)UCNV_TO_U_CALLBACK_STOP)?(UConverterToUCallback)UCNV_TO_U_CALLBACK_SUBSTITUTE:(UConverterToUCallback)UCNV_TO_U_CALLBACK_STOP;
+}
+
+static void TestFlushCache(void) {
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ UErrorCode err = U_ZERO_ERROR;
+ UConverter* someConverters[5];
+ int flushCount = 0;
+
+ /* flush the converter cache to get a consistent state before the flushing is tested */
+ ucnv_flushCache();
+
+ /*Testing ucnv_open()*/
+ /* Note: These converters have been chosen because they do NOT
+ encode the Latin characters (U+0041, ...), and therefore are
+ highly unlikely to be chosen as system default codepages */
+
+ someConverters[0] = ucnv_open("ibm-1047", &err);
+ if (U_FAILURE(err)) {
+ log_data_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ someConverters[1] = ucnv_open("ibm-1047", &err);
+ if (U_FAILURE(err)) {
+ log_data_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ someConverters[2] = ucnv_open("ibm-1047", &err);
+ if (U_FAILURE(err)) {
+ log_data_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ someConverters[3] = ucnv_open("gb18030", &err);
+ if (U_FAILURE(err)) {
+ log_data_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+ someConverters[4] = ucnv_open("ibm-954", &err);
+ if (U_FAILURE(err)) {
+ log_data_err("FAILURE! %s\n", myErrorName(err));
+ }
+
+
+ /* Testing ucnv_flushCache() */
+ log_verbose("\n---Testing ucnv_flushCache...\n");
+ if ((flushCount=ucnv_flushCache())==0)
+ log_verbose("Flush cache ok\n");
+ else
+ log_data_err("Flush Cache failed [line %d], expect 0 got %d \n", __LINE__, flushCount);
+
+ /*testing ucnv_close() and ucnv_flushCache() */
+ ucnv_close(someConverters[0]);
+ ucnv_close(someConverters[1]);
+
+ if ((flushCount=ucnv_flushCache())==0)
+ log_verbose("Flush cache ok\n");
+ else
+ log_data_err("Flush Cache failed [line %d], expect 0 got %d \n", __LINE__, flushCount);
+
+ ucnv_close(someConverters[2]);
+ ucnv_close(someConverters[3]);
+
+ if ((flushCount=ucnv_flushCache())==2)
+ log_verbose("Flush cache ok\n"); /*because first, second and third are same */
+ else
+ log_data_err("Flush Cache failed line %d, got %d expected 2 or there is an error in ucnv_close()\n",
+ __LINE__,
+ flushCount);
+
+ ucnv_close(someConverters[4]);
+ if ( (flushCount=ucnv_flushCache())==1)
+ log_verbose("Flush cache ok\n");
+ else
+ log_data_err("Flush Cache failed line %d, expected 1 got %d \n", __LINE__, flushCount);
+#endif
+}
+
+/**
+ * Test the converter alias API, specifically the fuzzy matching of
+ * alias names and the alias table integrity. Make sure each
+ * converter has at least one alias (itself), and that its listed
+ * aliases map back to itself. Check some hard-coded UTF-8 and
+ * ISO_2022 aliases to make sure they work.
+ */
+static void TestAlias() {
+ int32_t i, ncnv;
+ UErrorCode status = U_ZERO_ERROR;
+
+ /* Predetermined aliases that we expect to map back to ISO_2022
+ * and UTF-8. UPDATE THIS DATA AS NECESSARY. */
+ const char* ISO_2022_NAMES[] =
+ {"ISO_2022,locale=ja,version=2", "ISO-2022-JP-2", "csISO2022JP2",
+ "Iso-2022jP2", "isO-2022_Jp_2", "iSo--2022,locale=ja,version=2"};
+ int32_t ISO_2022_NAMES_LENGTH =
+ sizeof(ISO_2022_NAMES) / sizeof(ISO_2022_NAMES[0]);
+ const char *UTF8_NAMES[] =
+ { "UTF-8", "utf-8", "utf8", "ibm-1208",
+ "utf_8", "ibm1208", "cp1208" };
+ int32_t UTF8_NAMES_LENGTH =
+ sizeof(UTF8_NAMES) / sizeof(UTF8_NAMES[0]);
+
+ struct {
+ const char *name;
+ const char *alias;
+ } CONVERTERS_NAMES[] = {
+ { "UTF-32BE", "UTF32_BigEndian" },
+ { "UTF-32LE", "UTF32_LittleEndian" },
+ { "UTF-32", "ISO-10646-UCS-4" },
+ { "UTF32_PlatformEndian", "UTF32_PlatformEndian" },
+ { "UTF-32", "ucs-4" }
+ };
+ int32_t CONVERTERS_NAMES_LENGTH = sizeof(CONVERTERS_NAMES) / sizeof(*CONVERTERS_NAMES);
+
+ /* When there are bugs in gencnval or in ucnv_io, converters can
+ appear to have no aliases. */
+ ncnv = ucnv_countAvailable();
+ log_verbose("%d converters\n", ncnv);
+ for (i=0; i<ncnv; ++i) {
+ const char *name = ucnv_getAvailableName(i);
+ const char *alias0;
+ uint16_t na = ucnv_countAliases(name, &status);
+ uint16_t j;
+ UConverter *cnv;
+
+ if (na == 0) {
+ log_err("FAIL: Converter \"%s\" (i=%d)"
+ " has no aliases; expect at least one\n",
+ name, i);
+ continue;
+ }
+ cnv = ucnv_open(name, &status);
+ if (U_FAILURE(status)) {
+ log_data_err("FAIL: Converter \"%s\" (i=%d)"
+ " can't be opened.\n",
+ name, i);
+ }
+ else {
+ if (strcmp(ucnv_getName(cnv, &status), name) != 0
+ && (strstr(name, "PlatformEndian") == 0 && strstr(name, "OppositeEndian") == 0)) {
+ log_err("FAIL: Converter \"%s\" returned \"%s\" for getName. "
+ "The should be the same\n",
+ name, ucnv_getName(cnv, &status));
+ }
+ }
+ ucnv_close(cnv);
+
+ status = U_ZERO_ERROR;
+ alias0 = ucnv_getAlias(name, 0, &status);
+ for (j=1; j<na; ++j) {
+ const char *alias;
+ /* Make sure each alias maps back to the the same list of
+ aliases. Assume that if alias 0 is the same, the whole
+ list is the same (this should always be true). */
+ const char *mapBack;
+
+ status = U_ZERO_ERROR;
+ alias = ucnv_getAlias(name, j, &status);
+ if (status == U_AMBIGUOUS_ALIAS_WARNING) {
+ log_err("FAIL: Converter \"%s\"is ambiguous\n", name);
+ }
+
+ if (alias == NULL) {
+ log_err("FAIL: Converter \"%s\" -> "
+ "alias[%d]=NULL\n",
+ name, j);
+ continue;
+ }
+
+ mapBack = ucnv_getAlias(alias, 0, &status);
+
+ if (mapBack == NULL) {
+ log_err("FAIL: Converter \"%s\" -> "
+ "alias[%d]=\"%s\" -> "
+ "alias[0]=NULL, exp. \"%s\"\n",
+ name, j, alias, alias0);
+ continue;
+ }
+
+ if (0 != strcmp(alias0, mapBack)) {
+ int32_t idx;
+ UBool foundAlias = FALSE;
+ if (status == U_AMBIGUOUS_ALIAS_WARNING) {
+ /* Make sure that we only get this mismapping when there is
+ an ambiguous alias, and the other converter has this alias too. */
+ for (idx = 0; idx < ucnv_countAliases(mapBack, &status); idx++) {
+ if (strcmp(ucnv_getAlias(mapBack, (uint16_t)idx, &status), alias) == 0) {
+ foundAlias = TRUE;
+ break;
+ }
+ }
+ }
+ /* else not ambiguous, and this is a real problem. foundAlias = FALSE */
+
+ if (!foundAlias) {
+ log_err("FAIL: Converter \"%s\" -> "
+ "alias[%d]=\"%s\" -> "
+ "alias[0]=\"%s\", exp. \"%s\"\n",
+ name, j, alias, mapBack, alias0);
+ }
+ }
+ }
+ }
+
+
+ /* Check a list of predetermined aliases that we expect to map
+ * back to ISO_2022 and UTF-8. */
+ for (i=1; i<ISO_2022_NAMES_LENGTH; ++i) {
+ const char* mapBack = ucnv_getAlias(ISO_2022_NAMES[i], 0, &status);
+ if(!mapBack) {
+ log_data_err("Couldn't get alias for %s. You probably have no data\n", ISO_2022_NAMES[i]);
+ continue;
+ }
+ if (0 != strcmp(mapBack, ISO_2022_NAMES[0])) {
+ log_err("FAIL: \"%s\" -> \"%s\", expect \"ISO_2022,locale=ja,version=2\"\n",
+ ISO_2022_NAMES[i], mapBack);
+ }
+ }
+
+
+ for (i=1; i<UTF8_NAMES_LENGTH; ++i) {
+ const char* mapBack = ucnv_getAlias(UTF8_NAMES[i], 0, &status);
+ if(!mapBack) {
+ log_data_err("Couldn't get alias for %s. You probably have no data\n", UTF8_NAMES[i]);
+ continue;
+ }
+ if (mapBack && 0 != strcmp(mapBack, UTF8_NAMES[0])) {
+ log_err("FAIL: \"%s\" -> \"%s\", expect UTF-8\n",
+ UTF8_NAMES[i], mapBack);
+ }
+ }
+
+ /*
+ * Check a list of predetermined aliases that we expect to map
+ * back to predermined converter names.
+ */
+
+ for (i = 0; i < CONVERTERS_NAMES_LENGTH; ++i) {
+ const char* mapBack = ucnv_getAlias(CONVERTERS_NAMES[i].alias, 0, &status);
+ if(!mapBack) {
+ log_data_err("Couldn't get alias for %s. You probably have no data\n", CONVERTERS_NAMES[i].name);
+ continue;
+ }
+ if (0 != strcmp(mapBack, CONVERTERS_NAMES[i].name)) {
+ log_err("FAIL: \"%s\" -> \"%s\", expect %s\n",
+ CONVERTERS_NAMES[i].alias, mapBack, CONVERTERS_NAMES[i].name);
+ }
+ }
+
+}
+
+static void TestDuplicateAlias(void) {
+ const char *alias;
+ UErrorCode status = U_ZERO_ERROR;
+
+ status = U_ZERO_ERROR;
+ alias = ucnv_getStandardName("Shift_JIS", "IBM", &status);
+ if (alias == NULL || strcmp(alias, "ibm-943") != 0 || status != U_AMBIGUOUS_ALIAS_WARNING) {
+ log_err("FAIL: Didn't get ibm-943 for Shift_JIS {IBM}. Got %s\n", alias);
+ }
+ status = U_ZERO_ERROR;
+ alias = ucnv_getStandardName("ibm-943", "IANA", &status);
+ if (alias == NULL || strcmp(alias, "Shift_JIS") != 0 || status != U_AMBIGUOUS_ALIAS_WARNING) {
+ log_data_err("FAIL: Didn't get Shift_JIS for ibm-943 {IANA}. Got %s\n", alias);
+ }
+ status = U_ZERO_ERROR;
+ alias = ucnv_getStandardName("ibm-943_P130-2000", "IANA", &status);
+ if (alias != NULL || status == U_AMBIGUOUS_ALIAS_WARNING) {
+ log_data_err("FAIL: Didn't get NULL for ibm-943 {IANA}. Got %s\n", alias);
+ }
+}
+
+
+/* Test safe clone callback */
+
+static uint32_t TSCC_nextSerial()
+{
+ static uint32_t n = 1;
+
+ return (n++);
+}
+
+typedef struct
+{
+ uint32_t magic; /* 0xC0FFEE to identify that the object is OK */
+ uint32_t serial; /* minted from nextSerial, above */
+ UBool wasClosed; /* close happened on the object */
+} TSCCContext;
+
+static TSCCContext *TSCC_clone(TSCCContext *ctx)
+{
+ TSCCContext *newCtx = (TSCCContext *)malloc(sizeof(TSCCContext));
+
+ newCtx->serial = TSCC_nextSerial();
+ newCtx->wasClosed = 0;
+ newCtx->magic = 0xC0FFEE;
+
+ log_verbose("TSCC_clone: %p:%d -> new context %p:%d\n", ctx, ctx->serial, newCtx, newCtx->serial);
+
+ return newCtx;
+}
+
+static void TSCC_fromU(const void *context,
+ UConverterFromUnicodeArgs *fromUArgs,
+ const UChar* codeUnits,
+ int32_t length,
+ UChar32 codePoint,
+ UConverterCallbackReason reason,
+ UErrorCode * err)
+{
+ TSCCContext *ctx = (TSCCContext*)context;
+ UConverterFromUCallback junkFrom;
+
+ log_verbose("TSCC_fromU: Context %p:%d called, reason %d on cnv %p\n", ctx, ctx->serial, reason, fromUArgs->converter);
+
+ if(ctx->magic != 0xC0FFEE) {
+ log_err("TSCC_fromU: Context %p:%d magic is 0x%x should be 0xC0FFEE.\n", ctx,ctx->serial, ctx->magic);
+ return;
+ }
+
+ if(reason == UCNV_CLONE) {
+ UErrorCode subErr = U_ZERO_ERROR;
+ TSCCContext *newCtx;
+ TSCCContext *junkCtx;
+ TSCCContext **pjunkCtx = &junkCtx;
+
+ /* "recreate" it */
+ log_verbose("TSCC_fromU: cloning..\n");
+ newCtx = TSCC_clone(ctx);
+
+ if(newCtx == NULL) {
+ log_err("TSCC_fromU: internal clone failed on %p\n", ctx);
+ }
+
+ /* now, SET it */
+ ucnv_getFromUCallBack(fromUArgs->converter, &junkFrom, (const void**)pjunkCtx);
+ ucnv_setFromUCallBack(fromUArgs->converter, junkFrom, newCtx, NULL, NULL, &subErr);
+
+ if(U_FAILURE(subErr)) {
+ *err = subErr;
+ }
+ }
+
+ if(reason == UCNV_CLOSE) {
+ log_verbose("TSCC_fromU: Context %p:%d closing\n", ctx, ctx->serial);
+ ctx->wasClosed = TRUE;
+ }
+}
+
+
+static void TSCC_toU(const void *context,
+ UConverterToUnicodeArgs *toUArgs,
+ const char* codeUnits,
+ int32_t length,
+ UConverterCallbackReason reason,
+ UErrorCode * err)
+{
+ TSCCContext *ctx = (TSCCContext*)context;
+ UConverterToUCallback junkFrom;
+
+ log_verbose("TSCC_toU: Context %p:%d called, reason %d on cnv %p\n", ctx, ctx->serial, reason, toUArgs->converter);
+
+ if(ctx->magic != 0xC0FFEE) {
+ log_err("TSCC_toU: Context %p:%d magic is 0x%x should be 0xC0FFEE.\n", ctx,ctx->serial, ctx->magic);
+ return;
+ }
+
+ if(reason == UCNV_CLONE) {
+ UErrorCode subErr = U_ZERO_ERROR;
+ TSCCContext *newCtx;
+ TSCCContext *junkCtx;
+ TSCCContext **pjunkCtx = &junkCtx;
+
+ /* "recreate" it */
+ log_verbose("TSCC_toU: cloning..\n");
+ newCtx = TSCC_clone(ctx);
+
+ if(newCtx == NULL) {
+ log_err("TSCC_toU: internal clone failed on %p\n", ctx);
+ }
+
+ /* now, SET it */
+ ucnv_getToUCallBack(toUArgs->converter, &junkFrom, (const void**)pjunkCtx);
+ ucnv_setToUCallBack(toUArgs->converter, junkFrom, newCtx, NULL, NULL, &subErr);
+
+ if(U_FAILURE(subErr)) {
+ *err = subErr;
+ }
+ }
+
+ if(reason == UCNV_CLOSE) {
+ log_verbose("TSCC_toU: Context %p:%d closing\n", ctx, ctx->serial);
+ ctx->wasClosed = TRUE;
+ }
+}
+
+static void TSCC_init(TSCCContext *q)
+{
+ q->magic = 0xC0FFEE;
+ q->serial = TSCC_nextSerial();
+ q->wasClosed = 0;
+}
+
+static void TSCC_print_log(TSCCContext *q, const char *name)
+{
+ if(q==NULL) {
+ log_verbose("TSCContext: %s is NULL!!\n", name);
+ } else {
+ if(q->magic != 0xC0FFEE) {
+ log_err("TSCCContext: %p:%d's magic is %x, supposed to be 0xC0FFEE\n",
+ q,q->serial, q->magic);
+ }
+ log_verbose("TSCCContext %p:%d=%s - magic %x, %s\n",
+ q, q->serial, name, q->magic, q->wasClosed?"CLOSED":"open");
+ }
+}
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestConvertSafeCloneCallback()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ TSCCContext from1, to1;
+ TSCCContext *from2, *from3, *to2, *to3;
+ TSCCContext **pfrom2 = &from2, **pfrom3 = &from3, **pto2 = &to2, **pto3 = &to3;
+ char hunk[8192];
+ int32_t hunkSize = 8192;
+ UConverterFromUCallback junkFrom;
+ UConverterToUCallback junkTo;
+ UConverter *conv1, *conv2 = NULL;
+
+ conv1 = ucnv_open("iso-8859-3", &err);
+
+ if(U_FAILURE(err)) {
+ log_data_err("Err opening iso-8859-3, %s", u_errorName(err));
+ return;
+ }
+
+ log_verbose("Opened conv1=%p\n", conv1);
+
+ TSCC_init(&from1);
+ TSCC_init(&to1);
+
+ TSCC_print_log(&from1, "from1");
+ TSCC_print_log(&to1, "to1");
+
+ ucnv_setFromUCallBack(conv1, TSCC_fromU, &from1, NULL, NULL, &err);
+ log_verbose("Set from1 on conv1\n");
+ TSCC_print_log(&from1, "from1");
+
+ ucnv_setToUCallBack(conv1, TSCC_toU, &to1, NULL, NULL, &err);
+ log_verbose("Set to1 on conv1\n");
+ TSCC_print_log(&to1, "to1");
+
+ conv2 = ucnv_safeClone(conv1, hunk, &hunkSize, &err);
+ if(U_FAILURE(err)) {
+ log_err("safeClone failed: %s\n", u_errorName(err));
+ return;
+ }
+ log_verbose("Cloned to conv2=%p.\n", conv2);
+
+/********** from *********************/
+ ucnv_getFromUCallBack(conv2, &junkFrom, (const void**)pfrom2);
+ ucnv_getFromUCallBack(conv1, &junkFrom, (const void**)pfrom3);
+
+ TSCC_print_log(from2, "from2");
+ TSCC_print_log(from3, "from3(==from1)");
+
+ if(from2 == NULL) {
+ log_err("FAIL! from2 is null \n");
+ return;
+ }
+
+ if(from3 == NULL) {
+ log_err("FAIL! from3 is null \n");
+ return;
+ }
+
+ if(from3 != (&from1) ) {
+ log_err("FAIL! conv1's FROM context changed!\n");
+ }
+
+ if(from2 == (&from1) ) {
+ log_err("FAIL! conv1's FROM context is the same as conv2's!\n");
+ }
+
+ if(from1.wasClosed) {
+ log_err("FAIL! from1 is closed \n");
+ }
+
+ if(from2->wasClosed) {
+ log_err("FAIL! from2 was closed\n");
+ }
+
+/********** to *********************/
+ ucnv_getToUCallBack(conv2, &junkTo, (const void**)pto2);
+ ucnv_getToUCallBack(conv1, &junkTo, (const void**)pto3);
+
+ TSCC_print_log(to2, "to2");
+ TSCC_print_log(to3, "to3(==to1)");
+
+ if(to2 == NULL) {
+ log_err("FAIL! to2 is null \n");
+ return;
+ }
+
+ if(to3 == NULL) {
+ log_err("FAIL! to3 is null \n");
+ return;
+ }
+
+ if(to3 != (&to1) ) {
+ log_err("FAIL! conv1's TO context changed!\n");
+ }
+
+ if(to2 == (&to1) ) {
+ log_err("FAIL! conv1's TO context is the same as conv2's!\n");
+ }
+
+ if(to1.wasClosed) {
+ log_err("FAIL! to1 is closed \n");
+ }
+
+ if(to2->wasClosed) {
+ log_err("FAIL! to2 was closed\n");
+ }
+
+/*************************************/
+
+ ucnv_close(conv1);
+ log_verbose("ucnv_closed (conv1)\n");
+ TSCC_print_log(&from1, "from1");
+ TSCC_print_log(from2, "from2");
+ TSCC_print_log(&to1, "to1");
+ TSCC_print_log(to2, "to2");
+
+ if(from1.wasClosed == FALSE) {
+ log_err("FAIL! from1 is NOT closed \n");
+ }
+
+ if(from2->wasClosed) {
+ log_err("FAIL! from2 was closed\n");
+ }
+
+ if(to1.wasClosed == FALSE) {
+ log_err("FAIL! to1 is NOT closed \n");
+ }
+
+ if(to2->wasClosed) {
+ log_err("FAIL! to2 was closed\n");
+ }
+
+ ucnv_close(conv2);
+ log_verbose("ucnv_closed (conv2)\n");
+
+ TSCC_print_log(&from1, "from1");
+ TSCC_print_log(from2, "from2");
+
+ if(from1.wasClosed == FALSE) {
+ log_err("FAIL! from1 is NOT closed \n");
+ }
+
+ if(from2->wasClosed == FALSE) {
+ log_err("FAIL! from2 was NOT closed\n");
+ }
+
+ TSCC_print_log(&to1, "to1");
+ TSCC_print_log(to2, "to2");
+
+ if(to1.wasClosed == FALSE) {
+ log_err("FAIL! to1 is NOT closed \n");
+ }
+
+ if(to2->wasClosed == FALSE) {
+ log_err("FAIL! to2 was NOT closed\n");
+ }
+
+ if(to2 != (&to1)) {
+ free(to2); /* to1 is stack based */
+ }
+ if(from2 != (&from1)) {
+ free(from2); /* from1 is stack based */
+ }
+}
+#endif
+
+static UBool
+containsAnyOtherByte(uint8_t *p, int32_t length, uint8_t b) {
+ while(length>0) {
+ if(*p!=b) {
+ return TRUE;
+ }
+ ++p;
+ --length;
+ }
+ return FALSE;
+}
+
+static void TestConvertSafeClone()
+{
+ /* one 'regular' & all the 'private stateful' converters */
+ static const char *const names[] = {
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ "ibm-1047",
+ "ISO_2022,locale=zh,version=1",
+#endif
+ "SCSU",
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ "HZ",
+ "lmbcs",
+ "ISCII,version=0",
+ "ISO_2022,locale=kr,version=1",
+ "ISO_2022,locale=jp,version=2",
+#endif
+ "BOCU-1",
+ "UTF-7",
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ "IMAP-mailbox-name",
+ "ibm-1047-s390"
+#else
+ "IMAP=mailbox-name"
+#endif
+ };
+
+ /* store the actual sizes of each converter */
+ int32_t actualSizes[LENGTHOF(names)];
+
+ static const int32_t bufferSizes[] = {
+ U_CNV_SAFECLONE_BUFFERSIZE,
+ (int32_t)(3*sizeof(UConverter))/2, /* 1.5*sizeof(UConverter) */
+ (int32_t)sizeof(UConverter)/2 /* 0.5*sizeof(UConverter) */
+ };
+
+ char charBuffer[21]; /* Leave at an odd number for alignment testing */
+ uint8_t buffer[3] [U_CNV_SAFECLONE_BUFFERSIZE];
+ int32_t bufferSize, maxBufferSize;
+ const char *maxName;
+ UConverter * cnv, *cnv2;
+ UErrorCode err;
+
+ char *pCharBuffer;
+ const char *pConstCharBuffer;
+ const char *charBufferLimit = charBuffer + sizeof(charBuffer)/sizeof(*charBuffer);
+ UChar uniBuffer[] = {0x0058, 0x0059, 0x005A}; /* "XYZ" */
+ UChar uniCharBuffer[20];
+ char charSourceBuffer[] = { 0x1b, 0x24, 0x42 };
+ const char *pCharSource = charSourceBuffer;
+ const char *pCharSourceLimit = charSourceBuffer + sizeof(charSourceBuffer);
+ UChar *pUCharTarget = uniCharBuffer;
+ UChar *pUCharTargetLimit = uniCharBuffer + sizeof(uniCharBuffer)/sizeof(*uniCharBuffer);
+ const UChar * pUniBuffer;
+ const UChar *uniBufferLimit = uniBuffer + sizeof(uniBuffer)/sizeof(*uniBuffer);
+ int32_t index, j;
+
+ err = U_ZERO_ERROR;
+ cnv = ucnv_open(names[0], &err);
+ if(U_SUCCESS(err)) {
+ /* Check the various error & informational states: */
+
+ /* Null status - just returns NULL */
+ bufferSize = U_CNV_SAFECLONE_BUFFERSIZE;
+ if (0 != ucnv_safeClone(cnv, buffer[0], &bufferSize, 0))
+ {
+ log_err("FAIL: Cloned converter failed to deal correctly with null status\n");
+ }
+ /* error status - should return 0 & keep error the same */
+ err = U_MEMORY_ALLOCATION_ERROR;
+ if (0 != ucnv_safeClone(cnv, buffer[0], &bufferSize, &err) || err != U_MEMORY_ALLOCATION_ERROR)
+ {
+ log_err("FAIL: Cloned converter failed to deal correctly with incoming error status\n");
+ }
+ err = U_ZERO_ERROR;
+
+ /* Null buffer size pointer - just returns NULL & set error to U_ILLEGAL_ARGUMENT_ERROR*/
+ if (0 != ucnv_safeClone(cnv, buffer[0], 0, &err) || err != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("FAIL: Cloned converter failed to deal correctly with null bufferSize pointer\n");
+ }
+ err = U_ZERO_ERROR;
+
+ /* buffer size pointer is 0 - fill in pbufferSize with a size */
+ bufferSize = 0;
+ if (0 != ucnv_safeClone(cnv, buffer[0], &bufferSize, &err) || U_FAILURE(err) || bufferSize <= 0)
+ {
+ log_err("FAIL: Cloned converter failed a sizing request ('preflighting')\n");
+ }
+ /* Verify our define is large enough */
+ if (U_CNV_SAFECLONE_BUFFERSIZE < bufferSize)
+ {
+ log_err("FAIL: Pre-calculated buffer size is too small\n");
+ }
+ /* Verify we can use this run-time calculated size */
+ if (0 == (cnv2 = ucnv_safeClone(cnv, buffer[0], &bufferSize, &err)) || U_FAILURE(err))
+ {
+ log_err("FAIL: Converter can't be cloned with run-time size\n");
+ }
+ if (cnv2) {
+ ucnv_close(cnv2);
+ }
+
+ /* size one byte too small - should allocate & let us know */
+ --bufferSize;
+ if (0 == (cnv2 = ucnv_safeClone(cnv, 0, &bufferSize, &err)) || err != U_SAFECLONE_ALLOCATED_WARNING)
+ {
+ log_err("FAIL: Cloned converter failed to deal correctly with too-small buffer size\n");
+ }
+ if (cnv2) {
+ ucnv_close(cnv2);
+ }
+
+ err = U_ZERO_ERROR;
+ bufferSize = U_CNV_SAFECLONE_BUFFERSIZE;
+
+ /* Null buffer pointer - return converter & set error to U_SAFECLONE_ALLOCATED_ERROR */
+ if (0 == (cnv2 = ucnv_safeClone(cnv, 0, &bufferSize, &err)) || err != U_SAFECLONE_ALLOCATED_WARNING)
+ {
+ log_err("FAIL: Cloned converter failed to deal correctly with null buffer pointer\n");
+ }
+ if (cnv2) {
+ ucnv_close(cnv2);
+ }
+
+ err = U_ZERO_ERROR;
+
+ /* Null converter - return NULL & set U_ILLEGAL_ARGUMENT_ERROR */
+ if (0 != ucnv_safeClone(0, buffer[0], &bufferSize, &err) || err != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("FAIL: Cloned converter failed to deal correctly with null converter pointer\n");
+ }
+
+ ucnv_close(cnv);
+ }
+
+ maxBufferSize = 0;
+ maxName = "";
+
+ /* Do these cloned converters work at all - shuffle UChars to chars & back again..*/
+
+ for(j = 0; j < LENGTHOF(bufferSizes); ++j) {
+ for (index = 0; index < LENGTHOF(names); index++)
+ {
+ err = U_ZERO_ERROR;
+ cnv = ucnv_open(names[index], &err);
+ if(U_FAILURE(err)) {
+ log_data_err("ucnv_open(\"%s\") failed - %s\n", names[index], u_errorName(err));
+ continue;
+ }
+
+ if(j == 0) {
+ /* preflight to get maxBufferSize */
+ actualSizes[index] = 0;
+ ucnv_safeClone(cnv, NULL, &actualSizes[index], &err);
+ if(actualSizes[index] > maxBufferSize) {
+ maxBufferSize = actualSizes[index];
+ maxName = names[index];
+ }
+ }
+
+ memset(buffer, 0xaa, sizeof(buffer));
+
+ bufferSize = bufferSizes[j];
+ cnv2 = ucnv_safeClone(cnv, buffer[1], &bufferSize, &err);
+
+ /* close the original immediately to make sure that the clone works by itself */
+ ucnv_close(cnv);
+
+ if( actualSizes[index] <= (bufferSizes[j] - (int32_t)sizeof(UAlignedMemory)) &&
+ err == U_SAFECLONE_ALLOCATED_WARNING
+ ) {
+ log_err("ucnv_safeClone(%s) did a heap clone although the buffer was large enough\n", names[index]);
+ }
+
+ /* check if the clone function overwrote any bytes that it is not supposed to touch */
+ if(bufferSize <= bufferSizes[j]) {
+ /* used the stack buffer */
+ if( containsAnyOtherByte(buffer[0], (int32_t)sizeof(buffer[0]), 0xaa) ||
+ containsAnyOtherByte(buffer[1]+bufferSize, (int32_t)(sizeof(buffer)-(sizeof(buffer[0])+bufferSize)), 0xaa)
+ ) {
+ log_err("cloning %s in a stack buffer overwrote bytes outside the bufferSize %d (requested %d)\n",
+ names[index], bufferSize, bufferSizes[j]);
+ }
+ } else {
+ /* heap-allocated the clone */
+ if(containsAnyOtherByte(buffer[0], (int32_t)sizeof(buffer), 0xaa)) {
+ log_err("cloning %s used the heap (bufferSize %d, requested %d) but overwrote stack buffer bytes\n",
+ names[index], bufferSize, bufferSizes[j]);
+ }
+ }
+
+ pCharBuffer = charBuffer;
+ pUniBuffer = uniBuffer;
+
+ ucnv_fromUnicode(cnv2,
+ &pCharBuffer,
+ charBufferLimit,
+ &pUniBuffer,
+ uniBufferLimit,
+ NULL,
+ TRUE,
+ &err);
+ if(U_FAILURE(err)){
+ log_err("FAIL: cloned converter failed to do fromU conversion. Error: %s\n",u_errorName(err));
+ }
+ ucnv_toUnicode(cnv2,
+ &pUCharTarget,
+ pUCharTargetLimit,
+ &pCharSource,
+ pCharSourceLimit,
+ NULL,
+ TRUE,
+ &err
+ );
+
+ if(U_FAILURE(err)){
+ log_err("FAIL: cloned converter failed to do toU conversion. Error: %s\n",u_errorName(err));
+ }
+
+ pConstCharBuffer = charBuffer;
+ if (uniBuffer [0] != ucnv_getNextUChar(cnv2, &pConstCharBuffer, pCharBuffer, &err))
+ {
+ log_err("FAIL: Cloned converter failed to do conversion. Error: %s\n",u_errorName(err));
+ }
+ ucnv_close(cnv2);
+ }
+ }
+
+ log_verbose("ucnv_safeClone(): sizeof(UConverter)=%lu max preflighted clone size=%d (%s) U_CNV_SAFECLONE_BUFFERSIZE=%d\n",
+ sizeof(UConverter), maxBufferSize, maxName, (int)U_CNV_SAFECLONE_BUFFERSIZE);
+ if(maxBufferSize > U_CNV_SAFECLONE_BUFFERSIZE) {
+ log_err("ucnv_safeClone(): max preflighted clone size=%d (%s) is larger than U_CNV_SAFECLONE_BUFFERSIZE=%d\n",
+ maxBufferSize, maxName, (int)U_CNV_SAFECLONE_BUFFERSIZE);
+ }
+}
+
+static void TestCCSID() {
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ UConverter *cnv;
+ UErrorCode errorCode;
+ int32_t ccsids[]={ 37, 850, 943, 949, 950, 1047, 1252, 1392, 33722 };
+ int32_t i, ccsid;
+
+ for(i=0; i<(int32_t)(sizeof(ccsids)/sizeof(int32_t)); ++i) {
+ ccsid=ccsids[i];
+
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_openCCSID(ccsid, UCNV_IBM, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("error: ucnv_openCCSID(%ld) failed (%s)\n", ccsid, u_errorName(errorCode));
+ continue;
+ }
+
+ if(ccsid!=ucnv_getCCSID(cnv, &errorCode)) {
+ log_err("error: ucnv_getCCSID(ucnv_openCCSID(%ld))=%ld\n", ccsid, ucnv_getCCSID(cnv, &errorCode));
+ }
+
+ /* skip gb18030(ccsid 1392) */
+ if(ccsid != 1392 && UCNV_IBM!=ucnv_getPlatform(cnv, &errorCode)) {
+ log_err("error: ucnv_getPlatform(ucnv_openCCSID(%ld))=%ld!=UCNV_IBM\n", ccsid, ucnv_getPlatform(cnv, &errorCode));
+ }
+
+ ucnv_close(cnv);
+ }
+#endif
+}
+
+/* jitterbug 932: ucnv_convert() bugs --------------------------------------- */
+
+/* CHUNK_SIZE defined in common\ucnv.c: */
+#define CHUNK_SIZE 1024
+
+static void bug1(void);
+static void bug2(void);
+static void bug3(void);
+
+static void
+TestJ932(void)
+{
+ bug1(); /* Unicode intermediate buffer straddle bug */
+ bug2(); /* pre-flighting size incorrect caused by simple overflow */
+ bug3(); /* pre-flighting size incorrect caused by expansion overflow */
+}
+
+/*
+ * jitterbug 932: test chunking boundary conditions in
+
+ int32_t ucnv_convert(const char *toConverterName,
+ const char *fromConverterName,
+ char *target,
+ int32_t targetSize,
+ const char *source,
+ int32_t sourceSize,
+ UErrorCode * err)
+
+ * See discussions on the icu mailing list in
+ * 2001-April with the subject "converter 'flush' question".
+ *
+ * Bug report and test code provided by Edward J. Batutis.
+ */
+static void bug1()
+{
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ char char_in[CHUNK_SIZE+32];
+ char char_out[CHUNK_SIZE*2];
+
+ /* GB 18030 equivalent of U+10000 is 90308130 */
+ static const char test_seq[]={ (char)0x90u, 0x30, (char)0x81u, 0x30 };
+
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t i, test_seq_len = sizeof(test_seq);
+
+ /*
+ * causes straddle bug in Unicode intermediate buffer by sliding the test sequence forward
+ * until the straddle bug appears. I didn't want to hard-code everything so this test could
+ * be expanded - however this is the only type of straddle bug I can think of at the moment -
+ * a high surrogate in the last position of the Unicode intermediate buffer. Apparently no
+ * other Unicode sequences cause a bug since combining sequences are not supported by the
+ * converters.
+ */
+
+ for (i = test_seq_len; i >= 0; i--) {
+ /* put character sequence into input buffer */
+ memset(char_in, 0x61, sizeof(char_in)); /* GB 18030 'a' */
+ memcpy(char_in + (CHUNK_SIZE - i), test_seq, test_seq_len);
+
+ /* do the conversion */
+ ucnv_convert("us-ascii", /* out */
+ "gb18030", /* in */
+ char_out,
+ sizeof(char_out),
+ char_in,
+ sizeof(char_in),
+ &err);
+
+ /* bug1: */
+ if (err == U_TRUNCATED_CHAR_FOUND) {
+ /* this happens when surrogate pair straddles the intermediate buffer in
+ * T_UConverter_fromCodepageToCodepage */
+ log_err("error j932 bug 1: expected success, got U_TRUNCATED_CHAR_FOUND\n");
+ }
+ }
+#endif
+}
+
+/* bug2: pre-flighting loop bug: simple overflow causes bug */
+static void bug2()
+{
+ /* US-ASCII "1234567890" */
+ static const char source[]={ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 };
+ static const char sourceUTF8[]={ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, (char)0xef, (char)0x80, (char)0x80 };
+ static const char sourceUTF32[]={ 0x00, 0x00, 0x00, 0x30,
+ 0x00, 0x00, 0x00, 0x31,
+ 0x00, 0x00, 0x00, 0x32,
+ 0x00, 0x00, 0x00, 0x33,
+ 0x00, 0x00, 0x00, 0x34,
+ 0x00, 0x00, 0x00, 0x35,
+ 0x00, 0x00, 0x00, 0x36,
+ 0x00, 0x00, 0x00, 0x37,
+ 0x00, 0x00, 0x00, 0x38,
+ 0x00, 0x00, (char)0xf0, 0x00};
+ static char target[5];
+
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t size;
+
+ /* do the conversion */
+ size = ucnv_convert("iso-8859-1", /* out */
+ "us-ascii", /* in */
+ target,
+ sizeof(target),
+ source,
+ sizeof(source),
+ &err);
+
+ if ( size != 10 ) {
+ /* bug2: size is 5, should be 10 */
+ log_data_err("error j932 bug 2 us-ascii->iso-8859-1: got preflighting size %d instead of 10\n", size);
+ }
+
+ err = U_ZERO_ERROR;
+ /* do the conversion */
+ size = ucnv_convert("UTF-32BE", /* out */
+ "UTF-8", /* in */
+ target,
+ sizeof(target),
+ sourceUTF8,
+ sizeof(sourceUTF8),
+ &err);
+
+ if ( size != 32 ) {
+ /* bug2: size is 5, should be 32 */
+ log_err("error j932 bug 2 UTF-8->UTF-32BE: got preflighting size %d instead of 32\n", size);
+ }
+
+ err = U_ZERO_ERROR;
+ /* do the conversion */
+ size = ucnv_convert("UTF-8", /* out */
+ "UTF-32BE", /* in */
+ target,
+ sizeof(target),
+ sourceUTF32,
+ sizeof(sourceUTF32),
+ &err);
+
+ if ( size != 12 ) {
+ /* bug2: size is 5, should be 12 */
+ log_err("error j932 bug 2 UTF-32BE->UTF-8: got preflighting size %d instead of 12\n", size);
+ }
+}
+
+/*
+ * bug3: when the characters expand going from source to target codepage
+ * you get bug3 in addition to bug2
+ */
+static void bug3()
+{
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ char char_in[CHUNK_SIZE*4];
+ char target[5];
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t size;
+
+ /*
+ * first get the buggy size from bug2 then
+ * compare it to buggy size with an expansion
+ */
+ memset(char_in, 0x61, sizeof(char_in)); /* US-ASCII 'a' */
+
+ /* do the conversion */
+ size = ucnv_convert("lmbcs", /* out */
+ "us-ascii", /* in */
+ target,
+ sizeof(target),
+ char_in,
+ sizeof(char_in),
+ &err);
+
+ if ( size != sizeof(char_in) ) {
+ /*
+ * bug2: size is 0x2805 (CHUNK_SIZE*2+5 - maybe 5 is the size of the overflow buffer
+ * in the converter?), should be CHUNK_SIZE*4
+ *
+ * Markus 2001-05-18: 5 is the size of our target[] here, ucnv_convert() did not reset targetSize...
+ */
+ log_data_err("error j932 bug 2/3a: expected preflighting size 0x%04x, got 0x%04x\n", sizeof(char_in), size);
+ }
+
+ /*
+ * now do the conversion with expansion
+ * ascii 0x08 expands to 0x0F 0x28 in lmbcs
+ */
+ memset(char_in, 8, sizeof(char_in));
+ err = U_ZERO_ERROR;
+
+ /* do the conversion */
+ size = ucnv_convert("lmbcs", /* out */
+ "us-ascii", /* in */
+ target,
+ sizeof(target),
+ char_in,
+ sizeof(char_in),
+ &err);
+
+ /* expect 2X expansion */
+ if ( size != sizeof(char_in) * 2 ) {
+ /*
+ * bug3:
+ * bug2 would lead us to expect 0x2805, but it isn't that either, it is 0x3c05:
+ */
+ log_data_err("error j932 bug 3b: expected 0x%04x, got 0x%04x\n", sizeof(char_in) * 2, size);
+ }
+#endif
+}
+
+static void
+convertExStreaming(UConverter *srcCnv, UConverter *targetCnv,
+ const char *src, int32_t srcLength,
+ const char *expectTarget, int32_t expectTargetLength,
+ int32_t chunkSize,
+ const char *testName,
+ UErrorCode expectCode) {
+ UChar pivotBuffer[CHUNK_SIZE];
+ UChar *pivotSource, *pivotTarget;
+ const UChar *pivotLimit;
+
+ char targetBuffer[CHUNK_SIZE];
+ char *target;
+ const char *srcLimit, *finalSrcLimit, *targetLimit;
+
+ int32_t targetLength;
+
+ UBool flush;
+
+ UErrorCode errorCode;
+
+ /* setup */
+ if(chunkSize>CHUNK_SIZE) {
+ chunkSize=CHUNK_SIZE;
+ }
+
+ pivotSource=pivotTarget=pivotBuffer;
+ pivotLimit=pivotBuffer+chunkSize;
+
+ finalSrcLimit=src+srcLength;
+ target=targetBuffer;
+ targetLimit=targetBuffer+chunkSize;
+
+ ucnv_resetToUnicode(srcCnv);
+ ucnv_resetFromUnicode(targetCnv);
+
+ errorCode=U_ZERO_ERROR;
+ flush=FALSE;
+
+ /* convert, streaming-style (both converters and pivot keep state) */
+ for(;;) {
+ /* for testing, give ucnv_convertEx() at most <chunkSize> input/pivot/output units at a time */
+ if(src+chunkSize<=finalSrcLimit) {
+ srcLimit=src+chunkSize;
+ } else {
+ srcLimit=finalSrcLimit;
+ }
+ ucnv_convertEx(targetCnv, srcCnv,
+ &target, targetLimit,
+ &src, srcLimit,
+ pivotBuffer, &pivotSource, &pivotTarget, pivotLimit,
+ FALSE, flush, &errorCode);
+ targetLength=(int32_t)(target-targetBuffer);
+ if(target>targetLimit) {
+ log_err("ucnv_convertEx(%s) chunk[%d] target %p exceeds targetLimit %p\n",
+ testName, chunkSize, target, targetLimit);
+ break; /* TODO: major problem! */
+ }
+ if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
+ /* continue converting another chunk */
+ errorCode=U_ZERO_ERROR;
+ if(targetLength+chunkSize<=sizeof(targetBuffer)) {
+ targetLimit=target+chunkSize;
+ } else {
+ targetLimit=targetBuffer+sizeof(targetBuffer);
+ }
+ } else if(U_FAILURE(errorCode)) {
+ /* failure */
+ break;
+ } else if(flush) {
+ /* all done */
+ break;
+ } else if(src==finalSrcLimit && pivotSource==pivotTarget) {
+ /* all consumed, now flush without input (separate from conversion for testing) */
+ flush=TRUE;
+ }
+ }
+
+ if(!(errorCode==expectCode || (expectCode==U_ZERO_ERROR && errorCode==U_STRING_NOT_TERMINATED_WARNING))) {
+ log_err("ucnv_convertEx(%s) chunk[%d] results in %s instead of %s\n",
+ testName, chunkSize, u_errorName(errorCode), u_errorName(expectCode));
+ } else if(targetLength!=expectTargetLength) {
+ log_err("ucnv_convertEx(%s) chunk[%d] writes %d bytes instead of %d\n",
+ testName, chunkSize, targetLength, expectTargetLength);
+ } else if(memcmp(targetBuffer, expectTarget, targetLength)!=0) {
+ log_err("ucnv_convertEx(%s) chunk[%d] writes different bytes than expected\n",
+ testName, chunkSize);
+ }
+}
+
+static void
+convertExMultiStreaming(UConverter *srcCnv, UConverter *targetCnv,
+ const char *src, int32_t srcLength,
+ const char *expectTarget, int32_t expectTargetLength,
+ const char *testName,
+ UErrorCode expectCode) {
+ convertExStreaming(srcCnv, targetCnv,
+ src, srcLength,
+ expectTarget, expectTargetLength,
+ 1, testName, expectCode);
+ convertExStreaming(srcCnv, targetCnv,
+ src, srcLength,
+ expectTarget, expectTargetLength,
+ 3, testName, expectCode);
+ convertExStreaming(srcCnv, targetCnv,
+ src, srcLength,
+ expectTarget, expectTargetLength,
+ 7, testName, expectCode);
+}
+
+static void TestConvertEx() {
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ static const uint8_t
+ utf8[]={
+ /* 4e00 30a1 ff61 0410 */
+ 0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
+ },
+ shiftJIS[]={
+ 0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
+ },
+ errorTarget[]={
+ /*
+ * expected output when converting shiftJIS[] from UTF-8 to Shift-JIS:
+ * SUB, SUB, 0x40, SUB, SUB, 0x40
+ */
+ 0xfc, 0xfc, 0xfc, 0xfc, 0x40, 0xfc, 0xfc, 0xfc, 0xfc, 0x40
+ };
+
+ char srcBuffer[100], targetBuffer[100];
+
+ const char *src;
+ char *target;
+
+ UChar pivotBuffer[100];
+ UChar *pivotSource, *pivotTarget;
+
+ UConverter *cnv1, *cnv2;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ cnv1=ucnv_open("UTF-8", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to open a UTF-8 converter - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ cnv2=ucnv_open("Shift-JIS", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("unable to open a Shift-JIS converter - %s\n", u_errorName(errorCode));
+ ucnv_close(cnv1);
+ return;
+ }
+
+ /* test ucnv_convertEx() with streaming conversion style */
+ convertExMultiStreaming(cnv1, cnv2,
+ (const char *)utf8, sizeof(utf8), (const char *)shiftJIS, sizeof(shiftJIS),
+ "UTF-8 -> Shift-JIS", U_ZERO_ERROR);
+
+ convertExMultiStreaming(cnv2, cnv1,
+ (const char *)shiftJIS, sizeof(shiftJIS), (const char *)utf8, sizeof(utf8),
+ "Shift-JIS -> UTF-8", U_ZERO_ERROR);
+
+ /* U_ZERO_ERROR because by default the SUB callbacks are set */
+ convertExMultiStreaming(cnv1, cnv2,
+ (const char *)shiftJIS, sizeof(shiftJIS), (const char *)errorTarget, sizeof(errorTarget),
+ "shiftJIS[] UTF-8 -> Shift-JIS", U_ZERO_ERROR);
+
+ /* test some simple conversions */
+
+ /* NUL-terminated source and target */
+ errorCode=U_STRING_NOT_TERMINATED_WARNING;
+ memcpy(srcBuffer, utf8, sizeof(utf8));
+ srcBuffer[sizeof(utf8)]=0;
+ src=srcBuffer;
+ target=targetBuffer;
+ ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
+ NULL, NULL, NULL, NULL, TRUE, TRUE, &errorCode);
+ if( errorCode!=U_ZERO_ERROR ||
+ target-targetBuffer!=sizeof(shiftJIS) ||
+ *target!=0 ||
+ memcmp(targetBuffer, shiftJIS, sizeof(shiftJIS))!=0
+ ) {
+ log_err("ucnv_convertEx(simple UTF-8 -> Shift_JIS) fails: %s - writes %d bytes, expect %d\n",
+ u_errorName(errorCode), target-targetBuffer, sizeof(shiftJIS));
+ }
+
+ /* NUL-terminated source and U_STRING_NOT_TERMINATED_WARNING */
+ errorCode=U_AMBIGUOUS_ALIAS_WARNING;
+ memset(targetBuffer, 0xff, sizeof(targetBuffer));
+ src=srcBuffer;
+ target=targetBuffer;
+ ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(shiftJIS), &src, NULL,
+ NULL, NULL, NULL, NULL, TRUE, TRUE, &errorCode);
+ if( errorCode!=U_STRING_NOT_TERMINATED_WARNING ||
+ target-targetBuffer!=sizeof(shiftJIS) ||
+ *target!=(char)0xff ||
+ memcmp(targetBuffer, shiftJIS, sizeof(shiftJIS))!=0
+ ) {
+ log_err("ucnv_convertEx(simple UTF-8 -> Shift_JIS) fails: %s, expect U_STRING_NOT_TERMINATED_WARNING - writes %d bytes, expect %d\n",
+ u_errorName(errorCode), target-targetBuffer, sizeof(shiftJIS));
+ }
+
+ /* bad arguments */
+ errorCode=U_MESSAGE_PARSE_ERROR;
+ src=srcBuffer;
+ target=targetBuffer;
+ ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
+ NULL, NULL, NULL, NULL, TRUE, TRUE, &errorCode);
+ if(errorCode!=U_MESSAGE_PARSE_ERROR) {
+ log_err("ucnv_convertEx(U_MESSAGE_PARSE_ERROR) sets %s\n", u_errorName(errorCode));
+ }
+
+ /* pivotLimit==pivotStart */
+ errorCode=U_ZERO_ERROR;
+ pivotSource=pivotTarget=pivotBuffer;
+ ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
+ pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer, TRUE, TRUE, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_convertEx(pivotLimit==pivotStart) sets %s\n", u_errorName(errorCode));
+ }
+
+ /* *pivotSource==NULL */
+ errorCode=U_ZERO_ERROR;
+ pivotSource=NULL;
+ ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
+ pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+1, TRUE, TRUE, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_convertEx(*pivotSource==NULL) sets %s\n", u_errorName(errorCode));
+ }
+
+ /* *source==NULL */
+ errorCode=U_ZERO_ERROR;
+ src=NULL;
+ pivotSource=pivotBuffer;
+ ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
+ pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+1, TRUE, TRUE, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_convertEx(*source==NULL) sets %s\n", u_errorName(errorCode));
+ }
+
+ /* streaming conversion without a pivot buffer */
+ errorCode=U_ZERO_ERROR;
+ src=srcBuffer;
+ pivotSource=pivotBuffer;
+ ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
+ NULL, &pivotSource, &pivotTarget, pivotBuffer+1, TRUE, FALSE, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_convertEx(pivotStart==NULL) sets %s\n", u_errorName(errorCode));
+ }
+
+ ucnv_close(cnv1);
+ ucnv_close(cnv2);
+#endif
+}
+
+/* Test illegal UTF-8 input: Data and functions for TestConvertExFromUTF8(). */
+static const char *const badUTF8[]={
+ /* trail byte */
+ "\x80",
+
+ /* truncated multi-byte sequences */
+ "\xd0",
+ "\xe0",
+ "\xe1",
+ "\xed",
+ "\xee",
+ "\xf0",
+ "\xf1",
+ "\xf4",
+ "\xf8",
+ "\xfc",
+
+ "\xe0\x80",
+ "\xe0\xa0",
+ "\xe1\x80",
+ "\xed\x80",
+ "\xed\xa0",
+ "\xee\x80",
+ "\xf0\x80",
+ "\xf0\x90",
+ "\xf1\x80",
+ "\xf4\x80",
+ "\xf4\x90",
+ "\xf8\x80",
+ "\xfc\x80",
+
+ "\xf0\x80\x80",
+ "\xf0\x90\x80",
+ "\xf1\x80\x80",
+ "\xf4\x80\x80",
+ "\xf4\x90\x80",
+ "\xf8\x80\x80",
+ "\xfc\x80\x80",
+
+ "\xf8\x80\x80\x80",
+ "\xfc\x80\x80\x80",
+
+ "\xfc\x80\x80\x80\x80",
+
+ /* complete sequences but non-shortest forms or out of range etc. */
+ "\xc0\x80",
+ "\xe0\x80\x80",
+ "\xed\xa0\x80",
+ "\xf0\x80\x80\x80",
+ "\xf4\x90\x80\x80",
+ "\xf8\x80\x80\x80\x80",
+ "\xfc\x80\x80\x80\x80\x80",
+ "\xfe",
+ "\xff"
+};
+
+/* get some character that can be converted and convert it */
+static UBool getTestChar(UConverter *cnv, const char *converterName,
+ char charUTF8[4], int32_t *pCharUTF8Length,
+ char char0[8], int32_t *pChar0Length,
+ char char1[8], int32_t *pChar1Length) {
+ UChar utf16[U16_MAX_LENGTH];
+ int32_t utf16Length;
+
+ const UChar *utf16Source;
+ char *target;
+
+ USet *set;
+ UChar32 c;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ set=uset_open(1, 0);
+ ucnv_getUnicodeSet(cnv, set, UCNV_ROUNDTRIP_SET, &errorCode);
+ c=uset_charAt(set, uset_size(set)/2);
+ uset_close(set);
+
+ utf16Length=0;
+ U16_APPEND_UNSAFE(utf16, utf16Length, c);
+ *pCharUTF8Length=0;
+ U8_APPEND_UNSAFE(charUTF8, *pCharUTF8Length, c);
+
+ utf16Source=utf16;
+ target=char0;
+ ucnv_fromUnicode(cnv,
+ &target, char0+sizeof(char0),
+ &utf16Source, utf16+utf16Length,
+ NULL, FALSE, &errorCode);
+ *pChar0Length=(int32_t)(target-char0);
+
+ utf16Source=utf16;
+ target=char1;
+ ucnv_fromUnicode(cnv,
+ &target, char1+sizeof(char1),
+ &utf16Source, utf16+utf16Length,
+ NULL, FALSE, &errorCode);
+ *pChar1Length=(int32_t)(target-char1);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to get test character for %s - %s\n", converterName, u_errorName(errorCode));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void testFromTruncatedUTF8(UConverter *utf8Cnv, UConverter *cnv, const char *converterName,
+ char charUTF8[4], int32_t charUTF8Length,
+ char char0[8], int32_t char0Length,
+ char char1[8], int32_t char1Length) {
+ char utf8[16];
+ int32_t utf8Length;
+
+ char output[16];
+ int32_t outputLength;
+
+ char invalidChars[8];
+ int8_t invalidLength;
+
+ const char *source;
+ char *target;
+
+ UChar pivotBuffer[8];
+ UChar *pivotSource, *pivotTarget;
+
+ UErrorCode errorCode;
+ int32_t i;
+
+ /* test truncated sequences */
+ errorCode=U_ZERO_ERROR;
+ ucnv_setToUCallBack(utf8Cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+
+ memcpy(utf8, charUTF8, charUTF8Length);
+
+ for(i=0; i<LENGTHOF(badUTF8); ++i) {
+ /* truncated sequence? */
+ int32_t length=strlen(badUTF8[i]);
+ if(length>=(1+U8_COUNT_TRAIL_BYTES(badUTF8[i][0]))) {
+ continue;
+ }
+
+ /* assemble a string with the test character and the truncated sequence */
+ memcpy(utf8+charUTF8Length, badUTF8[i], length);
+ utf8Length=charUTF8Length+length;
+
+ /* convert and check the invalidChars */
+ source=utf8;
+ target=output;
+ pivotSource=pivotTarget=pivotBuffer;
+ errorCode=U_ZERO_ERROR;
+ ucnv_convertEx(cnv, utf8Cnv,
+ &target, output+sizeof(output),
+ &source, utf8+utf8Length,
+ pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+LENGTHOF(pivotBuffer),
+ TRUE, TRUE, /* reset & flush */
+ &errorCode);
+ outputLength=(int32_t)(target-output);
+ if(errorCode!=U_TRUNCATED_CHAR_FOUND || pivotSource!=pivotBuffer) {
+ log_err("unexpected error %s from %s badUTF8[%ld]\n", u_errorName(errorCode), converterName, (long)i);
+ continue;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ invalidLength=(int8_t)sizeof(invalidChars);
+ ucnv_getInvalidChars(utf8Cnv, invalidChars, &invalidLength, &errorCode);
+ if(invalidLength!=length || 0!=memcmp(invalidChars, badUTF8[i], length)) {
+ log_err("wrong invalidChars from %s badUTF8[%ld]\n", converterName, (long)i);
+ }
+ }
+}
+
+static void testFromBadUTF8(UConverter *utf8Cnv, UConverter *cnv, const char *converterName,
+ char charUTF8[4], int32_t charUTF8Length,
+ char char0[8], int32_t char0Length,
+ char char1[8], int32_t char1Length) {
+ char utf8[600], expect[600];
+ int32_t utf8Length, expectLength;
+
+ char testName[32];
+
+ UErrorCode errorCode;
+ int32_t i;
+
+ errorCode=U_ZERO_ERROR;
+ ucnv_setToUCallBack(utf8Cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, NULL, NULL, &errorCode);
+
+ /*
+ * assemble an input string with the test character between each
+ * bad sequence,
+ * and an expected string with repeated test character output
+ */
+ memcpy(utf8, charUTF8, charUTF8Length);
+ utf8Length=charUTF8Length;
+
+ memcpy(expect, char0, char0Length);
+ expectLength=char0Length;
+
+ for(i=0; i<LENGTHOF(badUTF8); ++i) {
+ int32_t length=strlen(badUTF8[i]);
+ memcpy(utf8+utf8Length, badUTF8[i], length);
+ utf8Length+=length;
+
+ memcpy(utf8+utf8Length, charUTF8, charUTF8Length);
+ utf8Length+=charUTF8Length;
+
+ memcpy(expect+expectLength, char1, char1Length);
+ expectLength+=char1Length;
+ }
+
+ /* expect that each bad UTF-8 sequence is detected and skipped */
+ strcpy(testName, "from bad UTF-8 to ");
+ strcat(testName, converterName);
+
+ convertExMultiStreaming(utf8Cnv, cnv,
+ utf8, utf8Length,
+ expect, expectLength,
+ testName,
+ U_ZERO_ERROR);
+}
+
+/* Test illegal UTF-8 input. */
+static void TestConvertExFromUTF8() {
+ static const char *const converterNames[]={
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ "windows-1252",
+ "shift-jis",
+#endif
+ "us-ascii",
+ "iso-8859-1",
+ "utf-8"
+ };
+
+ UConverter *utf8Cnv, *cnv;
+ UErrorCode errorCode;
+ int32_t i;
+
+ /* fromUnicode versions of some character, from initial state and later */
+ char charUTF8[4], char0[8], char1[8];
+ int32_t charUTF8Length, char0Length, char1Length;
+
+ errorCode=U_ZERO_ERROR;
+ utf8Cnv=ucnv_open("UTF-8", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to open UTF-8 converter - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ for(i=0; i<LENGTHOF(converterNames); ++i) {
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open(converterNames[i], &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to open %s converter - %s\n", converterNames[i], u_errorName(errorCode));
+ continue;
+ }
+ if(!getTestChar(cnv, converterNames[i], charUTF8, &charUTF8Length, char0, &char0Length, char1, &char1Length)) {
+ continue;
+ }
+ testFromTruncatedUTF8(utf8Cnv, cnv, converterNames[i], charUTF8, charUTF8Length, char0, char0Length, char1, char1Length);
+ testFromBadUTF8(utf8Cnv, cnv, converterNames[i], charUTF8, charUTF8Length, char0, char0Length, char1, char1Length);
+ ucnv_close(cnv);
+ }
+ ucnv_close(utf8Cnv);
+}
+
+static void
+TestConvertAlgorithmic() {
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ static const uint8_t
+ utf8[]={
+ /* 4e00 30a1 ff61 0410 */
+ 0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
+ },
+ shiftJIS[]={
+ 0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
+ },
+ /*errorTarget[]={*/
+ /*
+ * expected output when converting shiftJIS[] from UTF-8 to Shift-JIS:
+ * SUB, SUB, 0x40, SUB, SUB, 0x40
+ */
+ /* 0x81, 0xa1, 0x81, 0xa1, 0x40, 0x81, 0xa1, 0x81, 0xa1, 0x40*/
+ /*},*/
+ utf16[]={
+ 0xfe, 0xff /* BOM only, no text */
+ },
+ utf32[]={
+ 0xff, 0xfe, 0, 0 /* BOM only, no text */
+ };
+
+ char target[100], utf8NUL[100], shiftJISNUL[100];
+
+ UConverter *cnv;
+ UErrorCode errorCode;
+
+ int32_t length;
+
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open("Shift-JIS", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("unable to open a Shift-JIS converter - %s\n", u_errorName(errorCode));
+ ucnv_close(cnv);
+ return;
+ }
+
+ memcpy(utf8NUL, utf8, sizeof(utf8));
+ utf8NUL[sizeof(utf8)]=0;
+ memcpy(shiftJISNUL, shiftJIS, sizeof(shiftJIS));
+ shiftJISNUL[sizeof(shiftJIS)]=0;
+
+ /*
+ * The to/from algorithmic convenience functions share a common implementation,
+ * so we need not test all permutations of them.
+ */
+
+ /* length in, not terminated out */
+ errorCode=U_ZERO_ERROR;
+ length=ucnv_fromAlgorithmic(cnv, UCNV_UTF8, target, sizeof(shiftJIS), (const char *)utf8, sizeof(utf8), &errorCode);
+ if( errorCode!=U_STRING_NOT_TERMINATED_WARNING ||
+ length!=sizeof(shiftJIS) ||
+ memcmp(target, shiftJIS, length)!=0
+ ) {
+ log_err("ucnv_fromAlgorithmic(UTF-8 -> Shift-JIS) fails (%s expect U_STRING_NOT_TERMINATED_WARNING), returns %d expect %d\n",
+ u_errorName(errorCode), length, sizeof(shiftJIS));
+ }
+
+ /* terminated in and out */
+ memset(target, 0x55, sizeof(target));
+ errorCode=U_STRING_NOT_TERMINATED_WARNING;
+ length=ucnv_toAlgorithmic(UCNV_UTF8, cnv, target, sizeof(target), shiftJISNUL, -1, &errorCode);
+ if( errorCode!=U_ZERO_ERROR ||
+ length!=sizeof(utf8) ||
+ memcmp(target, utf8, length)!=0
+ ) {
+ log_err("ucnv_toAlgorithmic(Shift-JIS -> UTF-8) fails (%s expect U_ZERO_ERROR), returns %d expect %d\n",
+ u_errorName(errorCode), length, sizeof(shiftJIS));
+ }
+
+ /* empty string, some target buffer */
+ errorCode=U_STRING_NOT_TERMINATED_WARNING;
+ length=ucnv_toAlgorithmic(UCNV_UTF8, cnv, target, sizeof(target), shiftJISNUL, 0, &errorCode);
+ if( errorCode!=U_ZERO_ERROR ||
+ length!=0
+ ) {
+ log_err("ucnv_toAlgorithmic(empty string -> UTF-8) fails (%s expect U_ZERO_ERROR), returns %d expect 0\n",
+ u_errorName(errorCode), length);
+ }
+
+ /* pseudo-empty string, no target buffer */
+ errorCode=U_ZERO_ERROR;
+ length=ucnv_fromAlgorithmic(cnv, UCNV_UTF16, target, 0, (const char *)utf16, 2, &errorCode);
+ if( errorCode!=U_STRING_NOT_TERMINATED_WARNING ||
+ length!=0
+ ) {
+ log_err("ucnv_fromAlgorithmic(UTF-16 only BOM -> Shift-JIS) fails (%s expect U_STRING_NOT_TERMINATED_WARNING), returns %d expect 0\n",
+ u_errorName(errorCode), length);
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=ucnv_fromAlgorithmic(cnv, UCNV_UTF32, target, 0, (const char *)utf32, 4, &errorCode);
+ if( errorCode!=U_STRING_NOT_TERMINATED_WARNING ||
+ length!=0
+ ) {
+ log_err("ucnv_fromAlgorithmic(UTF-32 only BOM -> Shift-JIS) fails (%s expect U_STRING_NOT_TERMINATED_WARNING), returns %d expect 0\n",
+ u_errorName(errorCode), length);
+ }
+
+ /* bad arguments */
+ errorCode=U_MESSAGE_PARSE_ERROR;
+ length=ucnv_fromAlgorithmic(cnv, UCNV_UTF16, target, 0, (const char *)utf16, 2, &errorCode);
+ if(errorCode!=U_MESSAGE_PARSE_ERROR) {
+ log_err("ucnv_fromAlgorithmic(U_MESSAGE_PARSE_ERROR) sets %s\n", u_errorName(errorCode));
+ }
+
+ /* source==NULL */
+ errorCode=U_ZERO_ERROR;
+ length=ucnv_fromAlgorithmic(cnv, UCNV_UTF16, target, 0, NULL, 2, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_fromAlgorithmic(source==NULL) sets %s\n", u_errorName(errorCode));
+ }
+
+ /* illegal alg. type */
+ errorCode=U_ZERO_ERROR;
+ length=ucnv_fromAlgorithmic(cnv, (UConverterType)99, target, 0, (const char *)utf16, 2, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_fromAlgorithmic(illegal alg. type) sets %s\n", u_errorName(errorCode));
+ }
+ucnv_close(cnv);
+#endif
+}
+
+static void TestLMBCSMaxChar(void) {
+ static const struct {
+ int8_t maxSize;
+ const char *name;
+ } converter[] = {
+ /* some non-LMBCS converters - perfect test setup here */
+ { 1, "US-ASCII"},
+ { 1, "ISO-8859-1"},
+
+ { 2, "UTF-16"},
+ { 2, "UTF-16BE"},
+ { 3, "UTF-8"},
+ { 3, "CESU-8"},
+ { 3, "SCSU"},
+ { 4, "UTF-32"},
+ { 4, "UTF-7"},
+ { 4, "IMAP-mailbox-name"},
+ { 4, "BOCU-1"},
+
+ { 1, "windows-1256"},
+ { 2, "Shift-JIS"},
+ { 2, "ibm-16684"},
+ { 3, "ibm-930"},
+ { 3, "ibm-1390"},
+ { 4, "*test3"},
+ { 16,"*test4"},
+
+ { 4, "ISCII"},
+ { 4, "HZ"},
+
+ { 3, "ISO-2022"},
+ { 3, "ISO-2022-KR"},
+ { 6, "ISO-2022-JP"},
+ { 8, "ISO-2022-CN"},
+
+ /* LMBCS */
+ { 3, "LMBCS-1"},
+ { 3, "LMBCS-2"},
+ { 3, "LMBCS-3"},
+ { 3, "LMBCS-4"},
+ { 3, "LMBCS-5"},
+ { 3, "LMBCS-6"},
+ { 3, "LMBCS-8"},
+ { 3, "LMBCS-11"},
+ { 3, "LMBCS-16"},
+ { 3, "LMBCS-17"},
+ { 3, "LMBCS-18"},
+ { 3, "LMBCS-19"}
+ };
+ int32_t idx;
+
+ for (idx = 0; idx < LENGTHOF(converter); idx++) {
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *cnv = cnv_open(converter[idx].name, &status);
+ if (U_FAILURE(status)) {
+ continue;
+ }
+ if (converter[idx].maxSize != ucnv_getMaxCharSize(cnv)) {
+ log_err("error: ucnv_getMaxCharSize(%s) expected %d, got %d\n",
+ converter[idx].name, converter[idx].maxSize, ucnv_getMaxCharSize(cnv));
+ }
+ ucnv_close(cnv);
+ }
+
+ /* mostly test that the macro compiles */
+ if(UCNV_GET_MAX_BYTES_FOR_STRING(1, 2)<10) {
+ log_err("error UCNV_GET_MAX_BYTES_FOR_STRING(1, 2)<10\n");
+ }
+}
+
+
+static void TestJ1968(void) {
+ UErrorCode err = U_ZERO_ERROR;
+ UConverter *cnv;
+ char myConvName[] = "My really really really really really really really really really really really"
+ " really really really really really really really really really really really"
+ " really really really really really really really really long converter name";
+ UChar myConvNameU[sizeof(myConvName)];
+
+ u_charsToUChars(myConvName, myConvNameU, sizeof(myConvName));
+
+ err = U_ZERO_ERROR;
+ myConvNameU[UCNV_MAX_CONVERTER_NAME_LENGTH+1] = 0;
+ cnv = ucnv_openU(myConvNameU, &err);
+ if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("1U) Didn't get U_ILLEGAL_ARGUMENT_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ err = U_ZERO_ERROR;
+ myConvNameU[UCNV_MAX_CONVERTER_NAME_LENGTH] = 0;
+ cnv = ucnv_openU(myConvNameU, &err);
+ if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("2U) Didn't get U_ILLEGAL_ARGUMENT_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ err = U_ZERO_ERROR;
+ myConvNameU[UCNV_MAX_CONVERTER_NAME_LENGTH-1] = 0;
+ cnv = ucnv_openU(myConvNameU, &err);
+ if (cnv || err != U_FILE_ACCESS_ERROR) {
+ log_err("3U) Didn't get U_FILE_ACCESS_ERROR as expected %s\n", u_errorName(err));
+ }
+
+
+
+
+ err = U_ZERO_ERROR;
+ cnv = ucnv_open(myConvName, &err);
+ if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("1) Didn't get U_ILLEGAL_ARGUMENT_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ err = U_ZERO_ERROR;
+ myConvName[UCNV_MAX_CONVERTER_NAME_LENGTH] = ',';
+ cnv = ucnv_open(myConvName, &err);
+ if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("2) Didn't get U_ILLEGAL_ARGUMENT_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ err = U_ZERO_ERROR;
+ myConvName[UCNV_MAX_CONVERTER_NAME_LENGTH-1] = ',';
+ cnv = ucnv_open(myConvName, &err);
+ if (cnv || err != U_FILE_ACCESS_ERROR) {
+ log_err("3) Didn't get U_FILE_ACCESS_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ err = U_ZERO_ERROR;
+ myConvName[UCNV_MAX_CONVERTER_NAME_LENGTH-1] = ',';
+ strncpy(myConvName + UCNV_MAX_CONVERTER_NAME_LENGTH, "locale=", 7);
+ cnv = ucnv_open(myConvName, &err);
+ if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("4) Didn't get U_ILLEGAL_ARGUMENT_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ /* The comma isn't really a part of the converter name. */
+ err = U_ZERO_ERROR;
+ myConvName[UCNV_MAX_CONVERTER_NAME_LENGTH] = 0;
+ cnv = ucnv_open(myConvName, &err);
+ if (cnv || err != U_FILE_ACCESS_ERROR) {
+ log_err("5) Didn't get U_FILE_ACCESS_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ err = U_ZERO_ERROR;
+ myConvName[UCNV_MAX_CONVERTER_NAME_LENGTH-1] = ' ';
+ cnv = ucnv_open(myConvName, &err);
+ if (cnv || err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("6) Didn't get U_ILLEGAL_ARGUMENT_ERROR as expected %s\n", u_errorName(err));
+ }
+
+ err = U_ZERO_ERROR;
+ myConvName[UCNV_MAX_CONVERTER_NAME_LENGTH-1] = 0;
+ cnv = ucnv_open(myConvName, &err);
+ if (cnv || err != U_FILE_ACCESS_ERROR) {
+ log_err("7) Didn't get U_FILE_ACCESS_ERROR as expected %s\n", u_errorName(err));
+ }
+
+}
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void
+testSwap(const char *name, UBool swap) {
+ /*
+ * Test Unicode text.
+ * Contains characters that are the highest for some of the
+ * tested conversions, to make sure that the ucnvmbcs.c code that modifies the
+ * tables copies the entire tables.
+ */
+ static const UChar text[]={
+ 0x61, 0xd, 0x62, 0xa, 0x4e00, 0x3000, 0xfffd, 0xa, 0x20, 0x85, 0xff5e, 0x7a
+ };
+
+ UChar uNormal[32], uSwapped[32];
+ char normal[32], swapped[32];
+ const UChar *pcu;
+ UChar *pu;
+ char *pc;
+ int32_t i, normalLength, swappedLength;
+ UChar u;
+ char c;
+
+ const char *swappedName;
+ UConverter *cnv, *swapCnv;
+ UErrorCode errorCode;
+
+ /* if the swap flag is FALSE, then the test encoding is not EBCDIC and must not swap */
+
+ /* open both the normal and the LF/NL-swapping converters */
+ strcpy(swapped, name);
+ strcat(swapped, UCNV_SWAP_LFNL_OPTION_STRING);
+
+ errorCode=U_ZERO_ERROR;
+ swapCnv=ucnv_open(swapped, &errorCode);
+ cnv=ucnv_open(name, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("TestEBCDICSwapLFNL error: unable to open %s or %s (%s)\n", name, swapped, u_errorName(errorCode));
+ goto cleanup;
+ }
+
+ /* the name must contain the swap option if and only if we expect the converter to swap */
+ swappedName=ucnv_getName(swapCnv, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("TestEBCDICSwapLFNL error: ucnv_getName(%s,swaplfnl) failed (%s)\n", name, u_errorName(errorCode));
+ goto cleanup;
+ }
+
+ pc=strstr(swappedName, UCNV_SWAP_LFNL_OPTION_STRING);
+ if(swap != (pc!=NULL)) {
+ log_err("TestEBCDICSwapLFNL error: ucnv_getName(%s,swaplfnl)=%s should (%d) contain 'swaplfnl'\n", name, swappedName, swap);
+ goto cleanup;
+ }
+
+ /* convert to EBCDIC */
+ pcu=text;
+ pc=normal;
+ ucnv_fromUnicode(cnv, &pc, normal+LENGTHOF(normal), &pcu, text+LENGTHOF(text), NULL, TRUE, &errorCode);
+ normalLength=(int32_t)(pc-normal);
+
+ pcu=text;
+ pc=swapped;
+ ucnv_fromUnicode(swapCnv, &pc, swapped+LENGTHOF(swapped), &pcu, text+LENGTHOF(text), NULL, TRUE, &errorCode);
+ swappedLength=(int32_t)(pc-swapped);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("TestEBCDICSwapLFNL error converting to %s - (%s)\n", name, u_errorName(errorCode));
+ goto cleanup;
+ }
+
+ /* compare EBCDIC output */
+ if(normalLength!=swappedLength) {
+ log_err("TestEBCDICSwapLFNL error converting to %s - output lengths %d vs. %d\n", name, normalLength, swappedLength);
+ goto cleanup;
+ }
+ for(i=0; i<normalLength; ++i) {
+ /* swap EBCDIC LF/NL for comparison */
+ c=normal[i];
+ if(swap) {
+ if(c==0x15) {
+ c=0x25;
+ } else if(c==0x25) {
+ c=0x15;
+ }
+ }
+
+ if(c!=swapped[i]) {
+ log_err("TestEBCDICSwapLFNL error converting to %s - did not swap properly, output[%d]=0x%02x\n", name, i, (uint8_t)swapped[i]);
+ goto cleanup;
+ }
+ }
+
+ /* convert back to Unicode (may not roundtrip) */
+ pc=normal;
+ pu=uNormal;
+ ucnv_toUnicode(cnv, &pu, uNormal+LENGTHOF(uNormal), (const char **)&pc, normal+normalLength, NULL, TRUE, &errorCode);
+ normalLength=(int32_t)(pu-uNormal);
+
+ pc=normal;
+ pu=uSwapped;
+ ucnv_toUnicode(swapCnv, &pu, uSwapped+LENGTHOF(uSwapped), (const char **)&pc, normal+swappedLength, NULL, TRUE, &errorCode);
+ swappedLength=(int32_t)(pu-uSwapped);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("TestEBCDICSwapLFNL error converting from %s - (%s)\n", name, u_errorName(errorCode));
+ goto cleanup;
+ }
+
+ /* compare EBCDIC output */
+ if(normalLength!=swappedLength) {
+ log_err("TestEBCDICSwapLFNL error converting from %s - output lengths %d vs. %d\n", name, normalLength, swappedLength);
+ goto cleanup;
+ }
+ for(i=0; i<normalLength; ++i) {
+ /* swap EBCDIC LF/NL for comparison */
+ u=uNormal[i];
+ if(swap) {
+ if(u==0xa) {
+ u=0x85;
+ } else if(u==0x85) {
+ u=0xa;
+ }
+ }
+
+ if(u!=uSwapped[i]) {
+ log_err("TestEBCDICSwapLFNL error converting from %s - did not swap properly, output[%d]=U+%04x\n", name, i, uSwapped[i]);
+ goto cleanup;
+ }
+ }
+
+ /* clean up */
+cleanup:
+ ucnv_close(cnv);
+ ucnv_close(swapCnv);
+}
+
+static void
+TestEBCDICSwapLFNL() {
+ static const struct {
+ const char *name;
+ UBool swap;
+ } tests[]={
+ { "ibm-37", TRUE },
+ { "ibm-1047", TRUE },
+ { "ibm-1140", TRUE },
+ { "ibm-930", TRUE },
+ { "iso-8859-3", FALSE }
+ };
+
+ int i;
+
+ for(i=0; i<LENGTHOF(tests); ++i) {
+ testSwap(tests[i].name, tests[i].swap);
+ }
+}
+#else
+static void
+TestEBCDICSwapLFNL() {
+ /* test nothing... */
+}
+#endif
+
+static const UVersionInfo ICU_34 = {3,4,0,0};
+
+static void TestFromUCountPending(){
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ UErrorCode status = U_ZERO_ERROR;
+/* const UChar expectedUnicode[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56, 0xfffd}; */
+ static const struct {
+ UChar input[6];
+ int32_t len;
+ int32_t exp;
+ }fromUnicodeTests[] = {
+ /*m:n conversion*/
+ {{0xdbc4},1,1},
+ {{ 0xdbc4, 0xde34, 0xd84d},3,1},
+ {{ 0xdbc4, 0xde34, 0xd900},3,3},
+ };
+ int i;
+ UConverter* cnv = ucnv_openPackage(loadTestData(&status), "test3", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not create converter for test3. Error: %s\n", u_errorName(status));
+ return;
+ }
+ for(i=0; i<LENGTHOF(fromUnicodeTests); ++i) {
+ char tgt[10];
+ char* target = tgt;
+ char* targetLimit = target + 10;
+ const UChar* source = fromUnicodeTests[i].input;
+ const UChar* sourceLimit = source + fromUnicodeTests[i].len;
+ int32_t len = 0;
+ ucnv_reset(cnv);
+ ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ len = ucnv_fromUCountPending(cnv, &status);
+ if(U_FAILURE(status)){
+ log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ continue;
+ }
+ if(len != fromUnicodeTests[i].exp){
+ log_err("Did not get the expeced output for ucnv_fromUInputConsumed.\n");
+ }
+ }
+ status = U_ZERO_ERROR;
+ {
+ /*
+ * The converter has to read the tail before it knows that
+ * only head alone matches.
+ * At the end, the output for head will overflow the target,
+ * middle will be pending, and tail will not have been consumed.
+ */
+ /*
+ \U00101234 -> x (<U101234> \x07 |0)
+ \U00101234\U00050005 -> y (<U101234>+<U50005> \x07+\x00+\x01\x02\x0e+\x05 |0)
+ \U00101234\U00050005\U00060006 -> z (<U101234>+<U50005>+<U60006> \x07+\x00+\x01\x02\x0f+\x09 |0)
+ \U00060007 -> unassigned
+ */
+ static const UChar head[] = {0xDBC4,0xDE34,0xD900,0xDC05,0x0000};/* \U00101234\U00050005 */
+ static const UChar middle[] = {0xD940,0x0000}; /* first half of \U00060006 or \U00060007 */
+ static const UChar tail[] = {0xDC07,0x0000};/* second half of \U00060007 */
+ char tgt[10];
+ char* target = tgt;
+ char* targetLimit = target + 2; /* expect overflow from converting \U00101234\U00050005 */
+ const UChar* source = head;
+ const UChar* sourceLimit = source + u_strlen(head);
+ int32_t len = 0;
+ ucnv_reset(cnv);
+ ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ len = ucnv_fromUCountPending(cnv, &status);
+ if(U_FAILURE(status)){
+ log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+ if(len!=4){
+ log_err("ucnv_fromUInputHeld did not return correct length for head\n");
+ }
+ source = middle;
+ sourceLimit = source + u_strlen(middle);
+ ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ len = ucnv_fromUCountPending(cnv, &status);
+ if(U_FAILURE(status)){
+ log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+ if(len!=5){
+ log_err("ucnv_fromUInputHeld did not return correct length for middle\n");
+ }
+ source = tail;
+ sourceLimit = source + u_strlen(tail);
+ ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ if(status != U_BUFFER_OVERFLOW_ERROR){
+ log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ len = ucnv_fromUCountPending(cnv, &status);
+ /* middle[1] is pending, tail has not been consumed */
+ if(U_FAILURE(status)){
+ log_err("ucnv_fromUInputHeld call did not succeed. Error: %s\n", u_errorName(status));
+ }
+ if(len!=1){
+ log_err("ucnv_fromUInputHeld did not return correct length for tail\n");
+ }
+ }
+ ucnv_close(cnv);
+#endif
+}
+
+static void
+TestToUCountPending(){
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ UErrorCode status = U_ZERO_ERROR;
+ static const struct {
+ char input[6];
+ int32_t len;
+ int32_t exp;
+ }toUnicodeTests[] = {
+ /*m:n conversion*/
+ {{0x05, 0x01, 0x02},3,3},
+ {{0x01, 0x02},2,2},
+ {{0x07, 0x00, 0x01, 0x02},4,4},
+ };
+
+ int i;
+ UConverterToUCallback *oldToUAction= NULL;
+ UConverter* cnv = ucnv_openPackage(loadTestData(&status), "test3", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not create converter for test3. Error: %s\n", u_errorName(status));
+ return;
+ }
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, oldToUAction, NULL, &status);
+ for(i=0; i<LENGTHOF(toUnicodeTests); ++i) {
+ UChar tgt[10];
+ UChar* target = tgt;
+ UChar* targetLimit = target + 20;
+ const char* source = toUnicodeTests[i].input;
+ const char* sourceLimit = source + toUnicodeTests[i].len;
+ int32_t len = 0;
+ ucnv_reset(cnv);
+ ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ len = ucnv_toUCountPending(cnv,&status);
+ if(U_FAILURE(status)){
+ log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ continue;
+ }
+ if(len != toUnicodeTests[i].exp){
+ log_err("Did not get the expeced output for ucnv_toUInputConsumed.\n");
+ }
+ }
+ status = U_ZERO_ERROR;
+ ucnv_close(cnv);
+
+ {
+ /*
+ * The converter has to read the tail before it knows that
+ * only head alone matches.
+ * At the end, the output for head will overflow the target,
+ * mid will be pending, and tail will not have been consumed.
+ */
+ char head[] = { 0x01, 0x02, 0x03, 0x0a , 0x00};
+ char mid[] = { 0x01, 0x02, 0x03, 0x0b, 0x00 };
+ char tail[] = { 0x01, 0x02, 0x03, 0x0d, 0x00 };
+ /*
+ 0x01, 0x02, 0x03, 0x0a -> x (<U23456> \x01\x02\x03\x0a |0)
+ 0x01, 0x02, 0x03, 0x0b -> y (<U000b> \x01\x02\x03\x0b |0)
+ 0x01, 0x02, 0x03, 0x0d -> z (<U34567> \x01\x02\x03\x0d |3)
+ 0x01, 0x02, 0x03, 0x0a + 0x01, 0x02, 0x03, 0x0b + 0x01 + many more -> z (see test4 "many bytes, and bytes per UChar")
+ */
+ UChar tgt[10];
+ UChar* target = tgt;
+ UChar* targetLimit = target + 1; /* expect overflow from converting */
+ const char* source = head;
+ const char* sourceLimit = source + strlen(head);
+ int32_t len = 0;
+ cnv = ucnv_openPackage(loadTestData(&status), "test4", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not create converter for test3. Error: %s\n", u_errorName(status));
+ return;
+ }
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, oldToUAction, NULL, &status);
+ ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ len = ucnv_toUCountPending(cnv,&status);
+ if(U_FAILURE(status)){
+ log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ }
+ if(len != 4){
+ log_err("Did not get the expected len for head.\n");
+ }
+ source=mid;
+ sourceLimit = source+strlen(mid);
+ ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ len = ucnv_toUCountPending(cnv,&status);
+ if(U_FAILURE(status)){
+ log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ }
+ if(len != 8){
+ log_err("Did not get the expected len for mid.\n");
+ }
+
+ source=tail;
+ sourceLimit = source+strlen(tail);
+ targetLimit = target;
+ ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+ if(status != U_BUFFER_OVERFLOW_ERROR){
+ log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ len = ucnv_toUCountPending(cnv,&status);
+ /* mid[4] is pending, tail has not been consumed */
+ if(U_FAILURE(status)){
+ log_err("ucnv_toUCountPending call did not succeed. Error: %s\n", u_errorName(status));
+ }
+ if(len != 4){
+ log_err("Did not get the expected len for tail.\n");
+ }
+ ucnv_close(cnv);
+ }
+#endif
+}
+
+static void TestOneDefaultNameChange(const char *name) {
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *cnv;
+ ucnv_setDefaultName(name);
+ if(strcmp(ucnv_getDefaultName(), name)==0)
+ log_verbose("setDefaultName of %s works.\n", name);
+ else
+ log_err("setDefaultName of %s failed\n", name);
+ cnv=ucnv_open(NULL, &status);
+ if (U_FAILURE(status) || cnv == NULL) {
+ log_err("opening the default converter of %s failed\n", name);
+ return;
+ }
+ if(strcmp(ucnv_getName(cnv, &status), name)==0)
+ log_verbose("ucnv_getName of %s works.\n", name);
+ else
+ log_err("ucnv_getName of %s failed\n", name);
+ ucnv_close(cnv);
+}
+
+static void TestDefaultName(void) {
+ /*Testing ucnv_getDefaultName() and ucnv_setDefaultNAme()*/
+ static char defaultName[UCNV_MAX_CONVERTER_NAME_LENGTH + 1];
+ strcpy(defaultName, ucnv_getDefaultName());
+
+ log_verbose("getDefaultName returned %s\n", defaultName);
+
+ /*change the default name by setting it */
+ TestOneDefaultNameChange("UTF-8");
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ TestOneDefaultNameChange("ISCII,version=1");
+ TestOneDefaultNameChange("ISCII,version=2");
+#endif
+ TestOneDefaultNameChange("ISO-8859-1");
+
+ /*set the default name back*/
+ ucnv_setDefaultName(defaultName);
+}
+
+/* Test that ucnv_compareNames() matches names according to spec. ----------- */
+
+static U_INLINE int
+sign(int n) {
+ if(n==0) {
+ return 0;
+ } else if(n<0) {
+ return -1;
+ } else /* n>0 */ {
+ return 1;
+ }
+}
+
+static void
+compareNames(const char **names) {
+ const char *relation, *name1, *name2;
+ int rel, result;
+
+ relation=*names++;
+ if(*relation=='=') {
+ rel = 0;
+ } else if(*relation=='<') {
+ rel = -1;
+ } else {
+ rel = 1;
+ }
+
+ name1=*names++;
+ if(name1==NULL) {
+ return;
+ }
+ while((name2=*names++)!=NULL) {
+ result=ucnv_compareNames(name1, name2);
+ if(sign(result)!=rel) {
+ log_err("ucnv_compareNames(\"%s\", \"%s\")=%d, sign!=%d\n", name1, name2, result, rel);
+ }
+ name1=name2;
+ }
+}
+
+static void
+TestCompareNames() {
+ static const char *equalUTF8[]={ "=", "UTF-8", "utf_8", "u*T@f08", "Utf 8", NULL };
+ static const char *equalIBM[]={ "=", "ibm-37", "IBM037", "i-B-m 00037", "ibm-0037", "IBM00037", NULL };
+ static const char *lessMac[]={ "<", "macos-0_1-10.2", "macos-1-10.0.2", "macos-1-10.2", NULL };
+ static const char *lessUTF080[]={ "<", "UTF-0008", "utf$080", "u*T@f0800", "Utf 0000000009", NULL };
+
+ compareNames(equalUTF8);
+ compareNames(equalIBM);
+ compareNames(lessMac);
+ compareNames(lessUTF080);
+}
+
+static void
+TestSubstString() {
+ static const UChar surrogate[1]={ 0xd900 };
+ char buffer[16];
+
+ static const UChar sub[5]={ 0x61, 0x62, 0x63, 0x64, 0x65 };
+ static const char subChars[5]={ 0x61, 0x62, 0x63, 0x64, 0x65 };
+ UConverter *cnv;
+ UErrorCode errorCode;
+ int32_t length;
+ int8_t len8;
+
+ /* UTF-16/32: test that the BOM is output before the sub character */
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open("UTF-16", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_open(UTF-16) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode);
+ ucnv_close(cnv);
+ if(U_FAILURE(errorCode) ||
+ length!=4 ||
+ NULL == ucnv_detectUnicodeSignature(buffer, length, NULL, &errorCode)
+ ) {
+ log_err("ucnv_fromUChars(UTF-16, U+D900) did not write a BOM\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open("UTF-32", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_open(UTF-32) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode);
+ ucnv_close(cnv);
+ if(U_FAILURE(errorCode) ||
+ length!=8 ||
+ NULL == ucnv_detectUnicodeSignature(buffer, length, NULL, &errorCode)
+ ) {
+ log_err("ucnv_fromUChars(UTF-32, U+D900) did not write a BOM\n");
+ }
+
+ /* Simple API test of ucnv_setSubstString() + ucnv_getSubstChars(). */
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open("ISO-8859-1", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_open(ISO-8859-1) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ ucnv_setSubstString(cnv, sub, LENGTHOF(sub), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_setSubstString(ISO-8859-1, sub[5]) failed - %s\n", u_errorName(errorCode));
+ } else {
+ len8 = sizeof(buffer);
+ ucnv_getSubstChars(cnv, buffer, &len8, &errorCode);
+ /* Stateless converter, we expect the string converted to charset bytes. */
+ if(U_FAILURE(errorCode) || len8!=sizeof(subChars) || 0!=uprv_memcmp(buffer, subChars, len8)) {
+ log_err("ucnv_getSubstChars(ucnv_setSubstString(ISO-8859-1, sub[5])) failed - %s\n", u_errorName(errorCode));
+ }
+ }
+ ucnv_close(cnv);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open("HZ", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_open(HZ) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ ucnv_setSubstString(cnv, sub, LENGTHOF(sub), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_setSubstString(HZ, sub[5]) failed - %s\n", u_errorName(errorCode));
+ } else {
+ len8 = sizeof(buffer);
+ ucnv_getSubstChars(cnv, buffer, &len8, &errorCode);
+ /* Stateful converter, we expect that the Unicode string was set and that we get an empty char * string now. */
+ if(U_FAILURE(errorCode) || len8!=0) {
+ log_err("ucnv_getSubstChars(ucnv_setSubstString(HZ, sub[5])) failed - %s\n", u_errorName(errorCode));
+ }
+ }
+ ucnv_close(cnv);
+#endif
+ /*
+ * Further testing of ucnv_setSubstString() is done via intltest convert.
+ * We do not test edge cases of illegal arguments and similar because the
+ * function implementation uses all of its parameters in calls to other
+ * functions with UErrorCode parameters.
+ */
+}
+
+static void
+InvalidArguments() {
+ UConverter *cnv;
+ UErrorCode errorCode;
+ char charBuffer[2] = {1, 1};
+ char ucharAsCharBuffer[2] = {2, 2};
+ char *charsPtr = charBuffer;
+ UChar *ucharsPtr = (UChar *)ucharAsCharBuffer;
+ UChar *ucharsBadPtr = (UChar *)(ucharAsCharBuffer + 1);
+
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open("UTF-8", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_open() failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ /* This one should fail because an incomplete UChar is being passed in */
+ ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsPtr, ucharsBadPtr, NULL, TRUE, &errorCode);
+ if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_fromUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for incomplete UChar * buffer - %s\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ /* This one should fail because ucharsBadPtr is > than ucharsPtr */
+ ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsBadPtr, ucharsPtr, NULL, TRUE, &errorCode);
+ if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_fromUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for bad limit pointer - %s\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ /* This one should fail because an incomplete UChar is being passed in */
+ ucnv_toUnicode(cnv, &ucharsPtr, ucharsBadPtr, (const char **)&charsPtr, charsPtr, NULL, TRUE, &errorCode);
+ if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_toUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for incomplete UChar * buffer - %s\n", u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ /* This one should fail because ucharsBadPtr is > than ucharsPtr */
+ ucnv_toUnicode(cnv, &ucharsBadPtr, ucharsPtr, (const char **)&charsPtr, charsPtr, NULL, TRUE, &errorCode);
+ if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucnv_toUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for bad limit pointer - %s\n", u_errorName(errorCode));
+ }
+
+ if (charBuffer[0] != 1 || charBuffer[1] != 1
+ || ucharAsCharBuffer[0] != 2 || ucharAsCharBuffer[1] != 2)
+ {
+ log_err("Data was incorrectly written to buffers\n");
+ }
+
+ ucnv_close(cnv);
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.h
new file mode 100644
index 00000000000..a15dfc67d88
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccapitst.h
@@ -0,0 +1,25 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CAPITEST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************
+*/
+#ifndef _CU_CAPITSTST
+#define _CU_CAPITSTST
+/* C API TEST FOR CODESET CONVERSION COMPONENT */
+#include "cintltst.h"
+#include "unicode/utypes.h"
+
+static void TestConvert(void);
+static void TestAlias(void);
+static void TestConvertSafeClone(void);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.c
new file mode 100644
index 00000000000..c2e4fd93bc0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.c
@@ -0,0 +1,157 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CCOLLTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+#include <stdio.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+#include "ccolltst.h"
+#include "unicode/ucol.h"
+#include "unicode/ustring.h"
+#include "cmemory.h"
+
+void addCollTest(TestNode** root);
+
+void addCollTest(TestNode** root)
+{
+ addCollAPITest(root);
+ addCurrencyCollTest(root);
+ addNormTest(root);
+ addGermanCollTest(root);
+ addSpanishCollTest(root);
+ addFrenchCollTest(root);
+ addKannaCollTest(root);
+ addTurkishCollTest(root);
+ addEnglishCollTest(root);
+ addFinnishCollTest(root);
+
+ /* WEIVTODO: return tests here */
+ addRuleBasedCollTest(root);
+ addCollIterTest(root);
+ addAllCollTest(root);
+ addMiscCollTest(root);
+
+ addSearchTest(root);
+}
+
+
+
+/*Internal functions used*/
+static char* dumpSk(uint8_t *sourceKey, char *sk) {
+ uint32_t kLen = (uint32_t)strlen((const char *)sourceKey);
+ uint32_t i = 0;
+
+ *sk = 0;
+
+ for(i = 0; i<kLen; i++) {
+ sprintf(sk+2*i, "%02X", sourceKey[i]);
+ }
+ return sk;
+}
+
+void reportCResult( const UChar source[], const UChar target[],
+ uint8_t *sourceKey, uint8_t *targetKey,
+ UCollationResult compareResult,
+ UCollationResult keyResult,
+ UCollationResult incResult,
+ UCollationResult expectedResult )
+{
+ UChar *sResult, *sExpect;
+ sResult=(UChar*)malloc(sizeof(UChar) * 10);
+ sExpect=(UChar*)malloc(sizeof(UChar) * 10);
+ if (expectedResult < -1 || expectedResult > 1)
+ {
+ log_err("***** invalid call to reportCResult ****\n");
+ return;
+ }
+
+ if (compareResult != expectedResult)
+ {
+
+ appendCompareResult(compareResult, sResult);
+ appendCompareResult(expectedResult, sExpect);
+ log_err("Compare(%s , %s) returned: %s expected: %s\n", aescstrdup(source,-1), aescstrdup(target,-1),
+ austrdup(sResult), austrdup(sExpect) );
+ }
+
+ if (incResult != expectedResult)
+ {
+
+ appendCompareResult(incResult, sResult);
+ appendCompareResult(expectedResult, sExpect);
+ log_err("incCompare(%s , %s) returned: %s expected: %s\n", aescstrdup(source,-1), aescstrdup(target,-1),
+ austrdup(sResult), austrdup(sExpect) );
+ }
+
+ if (keyResult != expectedResult)
+ {
+
+ appendCompareResult(keyResult, sResult);
+ appendCompareResult(expectedResult, sExpect);
+
+ log_err("KeyCompare(%s , %s) returned: %s expected: %s\n", aescstrdup(source,-1), aescstrdup(target,-1),
+ austrdup(sResult), austrdup(sExpect) );
+
+
+ }
+
+ if (keyResult != compareResult)
+ {
+
+ appendCompareResult(keyResult, sResult);
+ appendCompareResult(compareResult, sExpect);
+
+ log_err("difference between sortkey and compare result for (%s , %s) Keys: %s compare %s\n", aescstrdup(source,-1), aescstrdup(target,-1),
+ austrdup(sResult), austrdup(sExpect) );
+
+
+ }
+
+ if(keyResult != expectedResult || keyResult != compareResult)
+ {
+ char sk[10000];
+ log_verbose("SortKey1: %s\n", dumpSk(sourceKey, sk));
+ log_verbose("SortKey2: %s\n", dumpSk(targetKey, sk));
+ }
+
+ free(sExpect);
+ free(sResult);
+}
+
+UChar* appendCompareResult(UCollationResult result, UChar* target)
+{
+ if (result == UCOL_LESS)
+ {
+ u_uastrcpy(target, "LESS");
+ }
+ else if (result == UCOL_EQUAL)
+ {
+ u_uastrcpy(target, "EQUAL");
+ }
+ else if (result == UCOL_GREATER)
+ {
+ u_uastrcpy(target, "GREATER");
+ }
+ else
+ {
+ u_uastrcpy(target, "huh???");
+ }
+
+ return target;
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.h
new file mode 100644
index 00000000000..d3e7f51da3b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccolltst.h
@@ -0,0 +1,56 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CCOLLTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+#ifndef _CCOLLTST
+#define _CCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+#include "unicode/ucol.h"
+
+/* Internal Functions used*/
+
+void reportCResult( const UChar source[], const UChar target[],
+ uint8_t *sourceKey, uint8_t *targetKey,
+ UCollationResult compareResult,
+ UCollationResult keyResult,
+ UCollationResult incResult,
+ UCollationResult expectedResult );
+
+UChar* appendCompareResult(UCollationResult result, UChar* target);
+
+void addCollAPITest(TestNode**);
+void addCurrencyCollTest(TestNode**);
+void addNormTest(TestNode**);
+void addDanishCollTest(TestNode**);
+void addGermanCollTest(TestNode**);
+void addSpanishCollTest(TestNode**);
+void addFrenchCollTest(TestNode**);
+void addKannaCollTest(TestNode**);
+void addTurkishCollTest(TestNode**);
+void addEnglishCollTest(TestNode**);
+void addFinnishCollTest(TestNode**);
+
+void addRuleBasedCollTest(TestNode**);
+void addCollIterTest(TestNode**);
+void addAllCollTest(TestNode**);
+void addMiscCollTest(TestNode**);
+void addSearchTest(TestNode**);
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cconvtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cconvtst.c
new file mode 100644
index 00000000000..c4d431b72a9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cconvtst.c
@@ -0,0 +1,39 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CCONVTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+#include "cintltst.h"
+
+void addTestConvert(TestNode**);
+void addTestNewConvert(TestNode**);
+void addTestConvertErrorCallBack(TestNode** root);
+void addTestEuroRegression(TestNode** root);
+void addTestConverterFallBack(TestNode** root);
+void addExtraTests(TestNode** root);
+
+/* bocu1tst.c */
+U_CFUNC void
+addBOCU1Tests(TestNode** root);
+
+void addConvert(TestNode** root);
+
+void addConvert(TestNode** root)
+{
+ addTestConvert(root);
+ addTestNewConvert(root);
+ addBOCU1Tests(root);
+ addTestConvertErrorCallBack(root);
+ addTestEuroRegression(root);
+ addTestConverterFallBack(root);
+ addExtraTests(root);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cctest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cctest.c
new file mode 100644
index 00000000000..c7085a12b6a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cctest.c
@@ -0,0 +1,36 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/ucnv.h"
+#include "unicode/ucnv_err.h"
+
+#include "cintltst.h"
+#include "ustr_cnv.h"
+void TestDefaultConverterError(void); /* keep gcc happy */
+
+
+/* This makes sure that a converter isn't leaked when an error is passed to
+ u_getDefaultConverter */
+void TestDefaultConverterError(void) {
+ UErrorCode err = U_ZERO_ERROR;
+
+ /* Remove the default converter */
+ ucnv_close(u_getDefaultConverter(&err));
+
+ if (U_FAILURE(err)) {
+ log_err("Didn't expect a failure yet %s\n", myErrorName(err));
+ return;
+ }
+
+ /* Set to any radom error state */
+ err = U_FILE_ACCESS_ERROR;
+ if (u_getDefaultConverter(&err) != NULL) {
+ log_err("Didn't expect to get a converter on a failure\n");
+ }
+}
+
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.c
new file mode 100644
index 00000000000..a768be7c8e3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.c
@@ -0,0 +1,167 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CCURRTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************
+*/
+
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if (!UCONFIG_NO_COLLATION) /* This is not a formatting test. This is a collation test. */
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "ccurrtst.h"
+#include "ccolltst.h"
+#include "unicode/ustring.h"
+#include "cmemory.h"
+
+#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0])
+
+void addCurrencyCollTest(TestNode** root)
+{
+
+ addTest(root, &currTest, "tscoll/ccurrtst/currTest");
+
+}
+
+
+void currTest()
+{
+ /* All the currency symbols, in UCA order*/
+ static const UChar currency[][2] =
+ {
+ { 0x00A4, 0x0000}, /*00A4; L; [14 36, 03, 03] # [082B.0020.0002] # CURRENCY SIGN*/
+ { 0x00A2, 0x0000}, /*00A2; L; [14 38, 03, 03] # [082C.0020.0002] # CENT SIGN*/
+ { 0xFFE0, 0x0000}, /*FFE0; L; [14 38, 03, 05] # [082C.0020.0003] # FULLWIDTH CENT SIGN*/
+ { 0x0024, 0x0000}, /*0024; L; [14 3A, 03, 03] # [082D.0020.0002] # DOLLAR SIGN*/
+ { 0xFF04, 0x0000}, /*FF04; L; [14 3A, 03, 05] # [082D.0020.0003] # FULLWIDTH DOLLAR SIGN*/
+ { 0xFE69, 0x0000}, /*FE69; L; [14 3A, 03, 1D] # [082D.0020.000F] # SMALL DOLLAR SIGN*/
+ { 0x00A3, 0x0000}, /*00A3; L; [14 3C, 03, 03] # [082E.0020.0002] # POUND SIGN*/
+ { 0xFFE1, 0x0000}, /*FFE1; L; [14 3C, 03, 05] # [082E.0020.0003] # FULLWIDTH POUND SIGN*/
+ { 0x00A5, 0x0000}, /*00A5; L; [14 3E, 03, 03] # [082F.0020.0002] # YEN SIGN*/
+ { 0xFFE5, 0x0000}, /*FFE5; L; [14 3E, 03, 05] # [082F.0020.0003] # FULLWIDTH YEN SIGN*/
+ { 0x09F2, 0x0000}, /*09F2; L; [14 40, 03, 03] # [0830.0020.0002] # BENGALI RUPEE MARK*/
+ { 0x09F3, 0x0000}, /*09F3; L; [14 42, 03, 03] # [0831.0020.0002] # BENGALI RUPEE SIGN*/
+ { 0x0E3F, 0x0000}, /*0E3F; L; [14 44, 03, 03] # [0832.0020.0002] # THAI CURRENCY SYMBOL BAHT*/
+ { 0x17DB, 0x0000}, /*17DB; L; [14 46, 03, 03] # [0833.0020.0002] # KHMER CURRENCY SYMBOL RIEL*/
+ { 0x20A0, 0x0000}, /*20A0; L; [14 48, 03, 03] # [0834.0020.0002] # EURO-CURRENCY SIGN*/
+ { 0x20A1, 0x0000}, /*20A1; L; [14 4A, 03, 03] # [0835.0020.0002] # COLON SIGN*/
+ { 0x20A2, 0x0000}, /*20A2; L; [14 4C, 03, 03] # [0836.0020.0002] # CRUZEIRO SIGN*/
+ { 0x20A3, 0x0000}, /*20A3; L; [14 4E, 03, 03] # [0837.0020.0002] # FRENCH FRANC SIGN*/
+ { 0x20A4, 0x0000}, /*20A4; L; [14 50, 03, 03] # [0838.0020.0002] # LIRA SIGN*/
+ { 0x20A5, 0x0000}, /*20A5; L; [14 52, 03, 03] # [0839.0020.0002] # MILL SIGN*/
+ { 0x20A6, 0x0000}, /*20A6; L; [14 54, 03, 03] # [083A.0020.0002] # NAIRA SIGN*/
+ { 0x20A7, 0x0000}, /*20A7; L; [14 56, 03, 03] # [083B.0020.0002] # PESETA SIGN*/
+ { 0x20A9, 0x0000}, /*20A9; L; [14 58, 03, 03] # [083C.0020.0002] # WON SIGN*/
+ { 0xFFE6, 0x0000}, /*FFE6; L; [14 58, 03, 05] # [083C.0020.0003] # FULLWIDTH WON SIGN*/
+ { 0x20AA, 0x0000}, /*20AA; L; [14 5A, 03, 03] # [083D.0020.0002] # NEW SHEQEL SIGN*/
+ { 0x20AB, 0x0000}, /*20AB; L; [14 5C, 03, 03] # [083E.0020.0002] # DONG SIGN*/
+ { 0x20AC, 0x0000}, /*20AC; L; [14 5E, 03, 03] # [083F.0020.0002] # EURO SIGN*/
+ { 0x20AD, 0x0000}, /*20AD; L; [14 60, 03, 03] # [0840.0020.0002] # KIP SIGN*/
+ { 0x20AE, 0x0000}, /*20AE; L; [14 62, 03, 03] # [0841.0020.0002] # TUGRIK SIGN*/
+ { 0x20AF, 0x0000}, /*20AF; L; [14 64, 03, 03] # [0842.0020.0002] # DRACHMA SIGN*/
+ };
+
+#if 0
+ /* All the currency symbols, in collation order*/
+ static const UChar currency[][2] =
+ {
+ { 0x00a4, 0x0000}, /* generic currency*/
+ { 0x0e3f, 0x0000}, /* baht*/
+ { 0x00a2, 0x0000}, /* cent*/
+ { 0x20a1, 0x0000}, /* colon*/
+ { 0x20a2, 0x0000}, /* cruzeiro*/
+ { 0x0024, 0x0000}, /* dollar */
+ { 0x20ab, 0x0000}, /* dong */
+ { 0x20ac, 0x0000}, /* euro */
+ { 0x20a3, 0x0000}, /* franc */
+ { 0x20a4, 0x0000}, /* lira */
+ { 0x20a5, 0x0000}, /* mill */
+ { 0x20a6, 0x0000}, /* naira */
+ { 0x20a7, 0x0000}, /* peseta */
+ { 0x00a3, 0x0000}, /* pound */
+ { 0x20a8, 0x0000}, /* rupee */
+ { 0x20aa, 0x0000}, /* shekel*/
+ { 0x20a9, 0x0000}, /* won*/
+ { 0x00a5, 0x0000} /* yen*/
+ };
+#endif
+
+ UChar source[2], target[2];
+ int32_t i, j, sortklen;
+ int res;
+ UCollator *c;
+ uint8_t *sortKey1, *sortKey2;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollationResult compareResult, keyResult;
+ UCollationResult expectedResult = UCOL_EQUAL;
+ log_verbose("Testing currency of all locales\n");
+ c = ucol_open("en_US", &status);
+ if (U_FAILURE(status))
+ {
+ log_err("collator open failed! :%s\n", myErrorName(status));
+ return;
+ }
+
+ /*Compare each currency symbol against all the
+ currency symbols, including itself*/
+ for (i = 0; i < ARRAY_LENGTH(currency); i += 1)
+ {
+ for (j = 0; j < ARRAY_LENGTH(currency); j += 1)
+ {
+ u_strcpy(source, currency[i]);
+ u_strcpy(target, currency[j]);
+
+ if (i < j)
+ {
+ expectedResult = UCOL_LESS;
+ }
+ else if ( i == j)
+ {
+ expectedResult = UCOL_EQUAL;
+ }
+ else
+ {
+ expectedResult = UCOL_GREATER;
+ }
+
+ compareResult = ucol_strcoll(c, source, u_strlen(source), target, u_strlen(target));
+
+ status = U_ZERO_ERROR;
+
+ sortklen=ucol_getSortKey(c, source, u_strlen(source), NULL, 0);
+ sortKey1=(uint8_t*)malloc(sizeof(uint8_t) * (sortklen+1));
+ ucol_getSortKey(c, source, u_strlen(source), sortKey1, sortklen+1);
+
+ sortklen=ucol_getSortKey(c, target, u_strlen(target), NULL, 0);
+ sortKey2=(uint8_t*)malloc(sizeof(uint8_t) * (sortklen+1));
+ ucol_getSortKey(c, target, u_strlen(target), sortKey2, sortklen+1);
+
+ res = uprv_memcmp(sortKey1, sortKey2, sortklen);
+ if (res < 0) keyResult = (UCollationResult)-1;
+ else if (res > 0) keyResult = (UCollationResult)1;
+ else keyResult = (UCollationResult)0;
+
+ reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, expectedResult );
+
+ free(sortKey1);
+ free(sortKey2);
+
+ }
+ }
+ ucol_close(c);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.h
new file mode 100644
index 00000000000..bec5e99815e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ccurrtst.h
@@ -0,0 +1,35 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CCURRTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************
+*/
+/**
+ * Collation currency tests.
+ * (It's important to stay current!)
+ */
+
+#ifndef _CCURRCOLLTST
+#define _CCURRCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+#define MAX_TOKEN_LEN 16
+ /* Perform Collation Currency Test */
+ void currTest(void);
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.c
new file mode 100644
index 00000000000..0bdd4906dd3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.c
@@ -0,0 +1,958 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDATTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+
+/* C API TEST FOR DATE FORMAT */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/uloc.h"
+#include "unicode/udat.h"
+#include "unicode/ucal.h"
+#include "unicode/unum.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "cdattst.h"
+#include "cformtst.h"
+#include "cmemory.h"
+
+#include <math.h>
+
+static void TestExtremeDates(void);
+static void TestAllLocales(void);
+
+#define LEN(a) (sizeof(a)/sizeof(a[0]))
+
+void addDateForTest(TestNode** root);
+
+#define TESTCASE(x) addTest(root, &x, "tsformat/cdattst/" #x)
+
+void addDateForTest(TestNode** root)
+{
+ TESTCASE(TestDateFormat);
+ TESTCASE(TestSymbols);
+ TESTCASE(TestDateFormatCalendar);
+ TESTCASE(TestExtremeDates);
+ TESTCASE(TestAllLocales);
+}
+/* Testing the DateFormat API */
+static void TestDateFormat()
+{
+ UDateFormat *def, *fr, *it, *de, *def1, *fr_pat;
+ UDateFormat *any;
+ UDateFormat *copy;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar* result = NULL;
+ const UCalendar *cal;
+ const UNumberFormat *numformat1, *numformat2;
+ UChar temp[50];
+ int32_t numlocales;
+ UDate d1;
+ int i;
+ int32_t resultlength;
+ int32_t resultlengthneeded;
+ int32_t parsepos;
+ UDate d = 837039928046.0;
+ double num = -10456.37;
+ /*const char* str="yyyy.MM.dd G 'at' hh:mm:ss z";
+ const char t[]="2/3/76 2:50 AM";*/
+ /*Testing udat_open() to open a dateformat */
+
+ ctest_setTimeZone(NULL, &status);
+
+ log_verbose("\nTesting udat_open() with various parameters\n");
+ fr = udat_open(UDAT_FULL, UDAT_DEFAULT, "fr_FR", NULL,0, NULL, 0,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using full time style with french locale\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* def = udat_open(UDAT_SHORT, UDAT_SHORT, NULL, NULL, 0, &status); */
+ def = udat_open(UDAT_SHORT, UDAT_SHORT, "en_US", NULL, 0,NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using short date and time style\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+ it = udat_open(UDAT_DEFAULT, UDAT_MEDIUM, "it_IT", NULL, 0, NULL, 0,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using medium date style with italian locale\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+ de = udat_open(UDAT_LONG, UDAT_LONG, "de_DE", NULL, 0, NULL, 0,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using long time and date styles with german locale\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ /*creating a default dateformat */
+ def1 = udat_open(UDAT_SHORT, UDAT_SHORT, NULL, NULL, 0,NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using short date and time style\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+
+
+ /*Testing udat_getAvailable() and udat_countAvailable()*/
+ log_verbose("\nTesting getAvailableLocales and countAvailable()\n");
+ numlocales=udat_countAvailable();
+ /* use something sensible w/o hardcoding the count */
+ if(numlocales < 0)
+ log_data_err("FAIL: error in countAvailable\n");
+ log_verbose("The number of locales for which date/time formatting patterns are available is %d\n", numlocales);
+
+ for(i=0;i<numlocales;i++) {
+ UErrorCode subStatus = U_ZERO_ERROR;
+ log_verbose("Testing open of %s\n", udat_getAvailable(i));
+ any = udat_open(UDAT_SHORT, UDAT_SHORT, udat_getAvailable(i), NULL ,0, NULL, 0, &subStatus);
+ if(U_FAILURE(subStatus)) {
+ log_data_err("FAIL: date format %s (getAvailable(%d)) is not instantiable: %s\n", udat_getAvailable(i), i, u_errorName(subStatus));
+ }
+ udat_close(any);
+ }
+
+ /*Testing udat_clone()*/
+ log_verbose("\nTesting the udat_clone() function of date format\n");
+ copy=udat_clone(def, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in creating the clone using udat_clone: %s\n", myErrorName(status) );
+ }
+ /*if(def != copy)
+ log_err("Error in udat_clone");*/ /*how should i check for equality???? */
+
+ /*Testing udat_format()*/
+ log_verbose("\nTesting the udat_format() function of date format\n");
+ u_uastrcpy(temp, "7/10/96 4:05 PM");
+ /*format using def */
+ resultlength=0;
+ resultlengthneeded=udat_format(def, d, NULL, resultlength, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_format(def, d, result, resultlength, NULL, &status);
+ }
+ if(U_FAILURE(status) || !result)
+ {
+ log_err("FAIL: Error in formatting using udat_format(.....) %s\n", myErrorName(status) );
+ return;
+ }
+ else
+ log_verbose("PASS: formatting successful\n");
+ if(u_strcmp(result, temp)==0)
+ log_verbose("PASS: Date Format for US locale successful uisng udat_format()\n");
+ else
+ log_err("FAIL: Date Format for US locale failed using udat_format()\n");
+ /*format using fr */
+
+ u_unescape("10 juil. 1996 16:05:28 \\u00C9tats-Unis (Los Angeles)", temp, 50);
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+ result=myDateFormat(fr, d);
+ if(u_strcmp(result, temp)==0)
+ log_verbose("PASS: Date Format for french locale successful using udat_format()\n");
+ else
+ log_data_err("FAIL: Date Format for french locale failed using udat_format().\n" );
+
+ /*format using it */
+ u_uastrcpy(temp, "10/lug/1996 16:05:28");
+
+ {
+ UChar *fmtted;
+ char g[100];
+ char x[100];
+
+ fmtted = myDateFormat(it,d);
+ u_austrcpy(g, fmtted);
+ u_austrcpy(x, temp);
+ if(u_strcmp(fmtted, temp)==0) {
+ log_verbose("PASS: Date Format for italian locale successful uisng udat_format() - wanted %s, got %s\n", x, g);
+ } else {
+ log_data_err("FAIL: Date Format for italian locale failed using udat_format() - wanted %s, got %s\n", x, g);
+ }
+ }
+
+ /*Testing parsing using udat_parse()*/
+ log_verbose("\nTesting parsing using udat_parse()\n");
+ u_uastrcpy(temp,"2/3/76 2:50 AM");
+ parsepos=0;
+ status=U_ZERO_ERROR;
+
+ d1=udat_parse(def, temp, u_strlen(temp), &parsepos, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in parsing using udat_parse(.....) %s\n", myErrorName(status) );
+ }
+ else
+ log_verbose("PASS: parsing succesful\n");
+ /*format it back and check for equality */
+
+
+ if(u_strcmp(myDateFormat(def, d1),temp)!=0)
+ log_err("FAIL: error in parsing\n");
+
+ /*Testing parsing using udat_parse()*/
+ log_verbose("\nTesting parsing using udat_parse()\n");
+ u_uastrcpy(temp,"2/Don't parse this part");
+ status=U_ZERO_ERROR;
+
+ d1=udat_parse(def, temp, u_strlen(temp), NULL, &status);
+ if(status != U_PARSE_ERROR)
+ {
+ log_err("FAIL: udat_parse(\"bad string\") passed when it should have failed\n");
+ }
+ else
+ log_verbose("PASS: parsing succesful\n");
+
+
+
+ /*Testing udat_openPattern() */
+ status=U_ZERO_ERROR;
+ log_verbose("\nTesting the udat_openPattern with a specified pattern\n");
+ /*for french locale */
+ fr_pat=udat_open(UDAT_IGNORE, UDAT_IGNORE,"fr_FR",NULL,0,temp, u_strlen(temp), &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in creating a date format using udat_openPattern \n %s\n",
+ myErrorName(status) );
+ }
+ else
+ log_verbose("PASS: creating dateformat using udat_openPattern() succesful\n");
+
+
+ /*Testing applyPattern and toPattern */
+ log_verbose("\nTesting applyPattern and toPattern()\n");
+ udat_applyPattern(def1, FALSE, temp, u_strlen(temp));
+ log_verbose("Extracting the pattern\n");
+
+ resultlength=0;
+ resultlengthneeded=udat_toPattern(def1, FALSE, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded + 1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_toPattern(def1, FALSE, result, resultlength, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in extracting the pattern from UNumberFormat\n %s\n",
+ myErrorName(status) );
+ }
+ if(u_strcmp(result, temp)!=0)
+ log_err("FAIL: Error in extracting the pattern\n");
+ else
+ log_verbose("PASS: applyPattern and toPattern work fine\n");
+
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+
+
+ /*Testing getter and setter functions*/
+ /*isLenient and setLenient()*/
+ log_verbose("\nTesting the isLenient and setLenient properties\n");
+ udat_setLenient(fr, udat_isLenient(it));
+ if(udat_isLenient(fr) != udat_isLenient(it))
+ log_err("ERROR: setLenient() failed\n");
+ else
+ log_verbose("PASS: setLenient() successful\n");
+
+
+ /*Test get2DigitYearStart set2DigitYearStart */
+ log_verbose("\nTesting the get and set 2DigitYearStart properties\n");
+ d1= udat_get2DigitYearStart(fr_pat,&status);
+ if(U_FAILURE(status)) {
+ log_err("ERROR: udat_get2DigitYearStart failed %s\n", myErrorName(status) );
+ }
+ status = U_ZERO_ERROR;
+ udat_set2DigitYearStart(def1 ,d1, &status);
+ if(U_FAILURE(status)) {
+ log_err("ERROR: udat_set2DigitYearStart failed %s\n", myErrorName(status) );
+ }
+ if(udat_get2DigitYearStart(fr_pat, &status) != udat_get2DigitYearStart(def1, &status))
+ log_err("FAIL: error in set2DigitYearStart\n");
+ else
+ log_verbose("PASS: set2DigitYearStart successful\n");
+ /*try setting it to another value */
+ udat_set2DigitYearStart(de, 2000.0, &status);
+ if(U_FAILURE(status)){
+ log_verbose("ERROR: udat_set2DigitYearStart failed %s\n", myErrorName(status) );
+ }
+ if(udat_get2DigitYearStart(de, &status) != 2000)
+ log_err("FAIL: error in set2DigitYearStart\n");
+ else
+ log_verbose("PASS: set2DigitYearStart successful\n");
+
+
+
+ /*Test getNumberFormat() and setNumberFormat() */
+ log_verbose("\nTesting the get and set NumberFormat properties of date format\n");
+ numformat1=udat_getNumberFormat(fr_pat);
+ udat_setNumberFormat(def1, numformat1);
+ numformat2=udat_getNumberFormat(def1);
+ if(u_strcmp(myNumformat(numformat1, num), myNumformat(numformat2, num)) !=0)
+ log_err("FAIL: error in setNumberFormat or getNumberFormat()\n");
+ else
+ log_verbose("PASS:setNumberFormat and getNumberFormat succesful\n");
+
+ /*try setting the number format to another format */
+ numformat1=udat_getNumberFormat(def);
+ udat_setNumberFormat(def1, numformat1);
+ numformat2=udat_getNumberFormat(def1);
+ if(u_strcmp(myNumformat(numformat1, num), myNumformat(numformat2, num)) !=0)
+ log_err("FAIL: error in setNumberFormat or getNumberFormat()\n");
+ else
+ log_verbose("PASS: setNumberFormat and getNumberFormat succesful\n");
+
+
+
+ /*Test getCalendar and setCalendar*/
+ log_verbose("\nTesting the udat_getCalendar() and udat_setCalendar() properties\n");
+ cal=udat_getCalendar(fr_pat);
+
+
+ udat_setCalendar(def1, cal);
+ if(!ucal_equivalentTo(udat_getCalendar(fr_pat), udat_getCalendar(def1)))
+ log_err("FAIL: Error in setting and getting the calendar\n");
+ else
+ log_verbose("PASS: getting and setting calendar successful\n");
+
+ if(result!=NULL) {
+ free(result);
+ }
+
+ /*Closing the UDateForamt */
+ udat_close(def);
+ udat_close(fr);
+ udat_close(it);
+ udat_close(de);
+ udat_close(def1);
+ udat_close(fr_pat);
+ udat_close(copy);
+
+ ctest_resetTimeZone();
+}
+
+/*Testing udat_getSymbols() and udat_setSymbols() and udat_countSymbols()*/
+static void TestSymbols()
+{
+ UDateFormat *def, *fr;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *value=NULL;
+ UChar *result = NULL;
+ int32_t resultlength;
+ int32_t resultlengthout;
+ UChar *pattern;
+
+
+ /*creating a dateformat with french locale */
+ log_verbose("\ncreating a date format with french locale\n");
+ fr = udat_open(UDAT_FULL, UDAT_DEFAULT, "fr_FR", NULL, 0, NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in creating the dateformat using full time style with french locale\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+ /*creating a default dateformat */
+ log_verbose("\ncreating a date format with default locale\n");
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* def = udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,NULL, NULL, 0, &status); */
+ def = udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,"en_US", NULL, 0, NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in creating the dateformat using short date and time style\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+
+
+ /*Testing countSymbols, getSymbols and setSymbols*/
+ log_verbose("\nTesting countSymbols\n");
+ /*since the month names has the last string empty and week names are 1 based 1.e first string in the weeknames array is empty */
+ if(udat_countSymbols(def, UDAT_ERAS)!=2 || udat_countSymbols(def, UDAT_MONTHS)!=12 ||
+ udat_countSymbols(def, UDAT_SHORT_MONTHS)!=12 || udat_countSymbols(def, UDAT_WEEKDAYS)!=8 ||
+ udat_countSymbols(def, UDAT_SHORT_WEEKDAYS)!=8 || udat_countSymbols(def, UDAT_AM_PMS)!=2 ||
+ udat_countSymbols(def, UDAT_QUARTERS) != 4 || udat_countSymbols(def, UDAT_SHORT_QUARTERS) != 4 ||
+ udat_countSymbols(def, UDAT_LOCALIZED_CHARS)!=1)
+ {
+ log_err("FAIL: error in udat_countSymbols\n");
+ }
+ else
+ log_verbose("PASS: udat_countSymbols() successful\n");
+
+ /*testing getSymbols*/
+ log_verbose("\nTesting getSymbols\n");
+ pattern=(UChar*)malloc(sizeof(UChar) * 10);
+ u_uastrcpy(pattern, "jeudi");
+ resultlength=0;
+ resultlengthout=udat_getSymbols(fr, UDAT_WEEKDAYS, 5 , NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout+1;
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_getSymbols(fr, UDAT_WEEKDAYS, 5, result, resultlength, &status);
+
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in udat_getSymbols().... %s\n", myErrorName(status) );
+ }
+ else
+ log_verbose("PASS: getSymbols succesful\n");
+
+ if(u_strcmp(result, pattern)==0)
+ log_verbose("PASS: getSymbols retrieved the right value\n");
+ else
+ log_data_err("FAIL: getSymbols retrieved the wrong value\n");
+
+ /*run series of tests to test getsymbols regressively*/
+ log_verbose("\nTesting getSymbols() regressively\n");
+ VerifygetSymbols(fr, UDAT_WEEKDAYS, 1, "dimanche");
+ VerifygetSymbols(def, UDAT_WEEKDAYS, 1, "Sunday");
+ VerifygetSymbols(fr, UDAT_SHORT_WEEKDAYS, 7, "sam.");
+ VerifygetSymbols(def, UDAT_SHORT_WEEKDAYS, 7, "Sat");
+ VerifygetSymbols(def, UDAT_MONTHS, 11, "December");
+ VerifygetSymbols(def, UDAT_MONTHS, 0, "January");
+ VerifygetSymbols(fr, UDAT_ERAS, 0, "av. J.-C.");
+ VerifygetSymbols(def, UDAT_AM_PMS, 0, "AM");
+ VerifygetSymbols(def, UDAT_AM_PMS, 1, "PM");
+ VerifygetSymbols(fr, UDAT_SHORT_MONTHS, 0, "janv.");
+ VerifygetSymbols(def, UDAT_SHORT_MONTHS, 11, "Dec");
+ VerifygetSymbols(fr, UDAT_QUARTERS, 0, "1er trimestre");
+ VerifygetSymbols(def, UDAT_QUARTERS, 3, "4th quarter");
+ VerifygetSymbols(fr, UDAT_SHORT_QUARTERS, 1, "T2");
+ VerifygetSymbols(def, UDAT_SHORT_QUARTERS, 2, "Q3");
+ VerifygetSymbols(def,UDAT_LOCALIZED_CHARS, 0, "GyMdkHmsSEDFwWahKzYeugAZvcLQqV");
+
+
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+free(pattern);
+
+ log_verbose("\nTesting setSymbols\n");
+ /*applying the pattern so that setSymbolss works */
+ resultlength=0;
+ resultlengthout=udat_toPattern(fr, FALSE, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout + 1;
+ pattern=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_toPattern(fr, FALSE, pattern, resultlength, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in extracting the pattern from UNumberFormat\n %s\n",
+ myErrorName(status) );
+ }
+
+ udat_applyPattern(def, FALSE, pattern, u_strlen(pattern));
+ resultlength=0;
+ resultlengthout=udat_toPattern(def, FALSE, NULL, resultlength,&status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout + 1;
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_toPattern(fr, FALSE,result, resultlength, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in extracting the pattern from UNumberFormat\n %s\n",
+ myErrorName(status) );
+ }
+ if(u_strcmp(result, pattern)==0)
+ log_verbose("Pattern applied properly\n");
+ else
+ log_err("pattern could not be applied properly\n");
+
+free(pattern);
+ /*testing set symbols */
+ resultlength=0;
+ resultlengthout=udat_getSymbols(fr, UDAT_MONTHS, 11 , NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout+1;
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_getSymbols(fr, UDAT_MONTHS, 11, result, resultlength, &status);
+
+ }
+ if(U_FAILURE(status))
+ log_err("FAIL: error in getSymbols() %s\n", myErrorName(status) );
+ resultlength=resultlengthout+1;
+
+ udat_setSymbols(def, UDAT_MONTHS, 11, result, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in udat_setSymbols() : %s\n", myErrorName(status) );
+ }
+ else
+ log_verbose("PASS: SetSymbols successful\n");
+
+ resultlength=0;
+ resultlengthout=udat_getSymbols(def, UDAT_MONTHS, 11, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout+1;
+ value=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_getSymbols(def, UDAT_MONTHS, 11, value, resultlength, &status);
+ }
+ if(U_FAILURE(status))
+ log_err("FAIL: error in retrieving the value using getSymbols i.e roundtrip\n");
+
+ if(u_strcmp(result, value)!=0)
+ log_data_err("FAIL: Error in settting and getting symbols\n");
+ else
+ log_verbose("PASS: setSymbols successful\n");
+
+
+ /*run series of tests to test setSymbols regressively*/
+ log_verbose("\nTesting setSymbols regressively\n");
+ VerifysetSymbols(def, UDAT_ERAS, 0, "BeforeChrist");
+ VerifysetSymbols(def, UDAT_ERA_NAMES, 1, "AnnoDomini");
+ VerifysetSymbols(def, UDAT_WEEKDAYS, 1, "Sundayweek");
+ VerifysetSymbols(def, UDAT_SHORT_WEEKDAYS, 7, "Satweek");
+ VerifysetSymbols(def, UDAT_NARROW_WEEKDAYS, 4, "M");
+ VerifysetSymbols(def, UDAT_STANDALONE_WEEKDAYS, 1, "Sonntagweek");
+ VerifysetSymbols(def, UDAT_STANDALONE_SHORT_WEEKDAYS, 7, "Sams");
+ VerifysetSymbols(def, UDAT_STANDALONE_NARROW_WEEKDAYS, 4, "V");
+ VerifysetSymbols(fr, UDAT_MONTHS, 11, "december");
+ VerifysetSymbols(fr, UDAT_SHORT_MONTHS, 0, "Jan");
+ VerifysetSymbols(fr, UDAT_NARROW_MONTHS, 1, "R");
+ VerifysetSymbols(fr, UDAT_STANDALONE_MONTHS, 11, "dezember");
+ VerifysetSymbols(fr, UDAT_STANDALONE_SHORT_MONTHS, 7, "Aug");
+ VerifysetSymbols(fr, UDAT_STANDALONE_NARROW_MONTHS, 2, "M");
+ VerifysetSymbols(fr, UDAT_QUARTERS, 0, "1. Quart");
+ VerifysetSymbols(fr, UDAT_SHORT_QUARTERS, 1, "QQ2");
+ VerifysetSymbols(fr, UDAT_STANDALONE_QUARTERS, 2, "3rd Quar.");
+ VerifysetSymbols(fr, UDAT_STANDALONE_SHORT_QUARTERS, 3, "4QQ");
+
+
+ /*run series of tests to test get and setSymbols regressively*/
+ log_verbose("\nTesting get and set symbols regressively\n");
+ VerifygetsetSymbols(fr, def, UDAT_WEEKDAYS, 1);
+ VerifygetsetSymbols(fr, def, UDAT_WEEKDAYS, 7);
+ VerifygetsetSymbols(fr, def, UDAT_SHORT_WEEKDAYS, 1);
+ VerifygetsetSymbols(fr, def, UDAT_SHORT_WEEKDAYS, 7);
+ VerifygetsetSymbols(fr, def, UDAT_MONTHS, 0);
+ VerifygetsetSymbols(fr, def, UDAT_SHORT_MONTHS, 0);
+ VerifygetsetSymbols(fr, def, UDAT_ERAS,1);
+ VerifygetsetSymbols(fr, def, UDAT_LOCALIZED_CHARS, 0);
+ VerifygetsetSymbols(fr, def, UDAT_AM_PMS, 1);
+
+
+ /*closing*/
+
+ udat_close(fr);
+ udat_close(def);
+ if(result != NULL) {
+ free(result);
+ result = NULL;
+ }
+ free(value);
+
+}
+
+/**
+ * Test DateFormat(Calendar) API
+ */
+static void TestDateFormatCalendar() {
+ UDateFormat *date=0, *time=0, *full=0;
+ UCalendar *cal=0;
+ UChar buf[256];
+ char cbuf[256];
+ int32_t pos;
+ UDate when;
+ UErrorCode ec = U_ZERO_ERROR;
+
+ ctest_setTimeZone(NULL, &ec);
+
+ /* Create a formatter for date fields. */
+ date = udat_open(UDAT_NONE, UDAT_SHORT, "en_US", NULL, 0, NULL, 0, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: udat_open(NONE, SHORT, en_US) failed with %s\n",
+ u_errorName(ec));
+ goto FAIL;
+ }
+
+ /* Create a formatter for time fields. */
+ time = udat_open(UDAT_SHORT, UDAT_NONE, "en_US", NULL, 0, NULL, 0, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: udat_open(SHORT, NONE, en_US) failed with %s\n",
+ u_errorName(ec));
+ goto FAIL;
+ }
+
+ /* Create a full format for output */
+ full = udat_open(UDAT_FULL, UDAT_FULL, "en_US", NULL, 0, NULL, 0, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: udat_open(FULL, FULL, en_US) failed with %s\n",
+ u_errorName(ec));
+ goto FAIL;
+ }
+
+ /* Create a calendar */
+ cal = ucal_open(NULL, 0, "en_US", UCAL_GREGORIAN, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: ucal_open(en_US) failed with %s\n",
+ u_errorName(ec));
+ goto FAIL;
+ }
+
+ /* Parse the date */
+ ucal_clear(cal);
+ u_uastrcpy(buf, "4/5/2001");
+ pos = 0;
+ udat_parseCalendar(date, cal, buf, -1, &pos, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: udat_parseCalendar(4/5/2001) failed at %d with %s\n",
+ pos, u_errorName(ec));
+ goto FAIL;
+ }
+
+ /* Parse the time */
+ u_uastrcpy(buf, "5:45 PM");
+ pos = 0;
+ udat_parseCalendar(time, cal, buf, -1, &pos, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: udat_parseCalendar(17:45) failed at %d with %s\n",
+ pos, u_errorName(ec));
+ goto FAIL;
+ }
+
+ /* Check result */
+ when = ucal_getMillis(cal, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: ucal_getMillis() failed with %s\n", u_errorName(ec));
+ goto FAIL;
+ }
+ udat_format(full, when, buf, sizeof(buf), NULL, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: udat_format() failed with %s\n", u_errorName(ec));
+ goto FAIL;
+ }
+ u_austrcpy(cbuf, buf);
+ /* Thursday, April 5, 2001 5:45:00 PM PDT 986517900000 */
+ if (when == 986517900000.0) {
+ log_verbose("Ok: Parsed result: %s\n", cbuf);
+ } else {
+ log_err("FAIL: Parsed result: %s, exp 4/5/2001 5:45 PM\n", cbuf);
+ }
+
+ FAIL:
+ udat_close(date);
+ udat_close(time);
+ udat_close(full);
+ ucal_close(cal);
+
+ ctest_resetTimeZone();
+}
+
+/*INTERNAL FUNCTIONS USED*/
+static void VerifygetSymbols(UDateFormat* datfor, UDateFormatSymbolType type, int32_t index, const char* expected)
+{
+ UChar *pattern=NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *result=NULL;
+ int32_t resultlength, resultlengthout;
+
+
+ pattern=(UChar*)malloc(sizeof(UChar) * (strlen(expected)+1));
+ u_uastrcpy(pattern, expected);
+ resultlength=0;
+ resultlengthout=udat_getSymbols(datfor, type, index , NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_getSymbols(datfor, type, index, result, resultlength, &status);
+
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in udat_getSymbols()... %s\n", myErrorName(status) );
+ return;
+ }
+ if(u_strcmp(result, pattern)==0)
+ log_verbose("PASS: getSymbols retrieved the right value\n");
+ else{
+ log_data_err("FAIL: getSymbols retrieved the wrong value\n Expected %s Got %s\n", austrdup(pattern),
+ austrdup(result) );
+ }
+ free(result);
+ free(pattern);
+}
+
+static void VerifysetSymbols(UDateFormat* datfor, UDateFormatSymbolType type, int32_t index, const char* expected)
+{
+ UChar *result=NULL;
+ UChar *value=NULL;
+ int32_t resultlength, resultlengthout;
+ UErrorCode status = U_ZERO_ERROR;
+
+ value=(UChar*)malloc(sizeof(UChar) * (strlen(expected) + 1));
+ u_uastrcpy(value, expected);
+ udat_setSymbols(datfor, type, index, value, u_strlen(value), &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in udat_setSymbols() %s\n", myErrorName(status) );
+ return;
+ }
+
+ resultlength=0;
+ resultlengthout=udat_getSymbols(datfor, type, index, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_getSymbols(datfor, type, index, result, resultlength, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in retrieving the value using getSymbols after setting it previously\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+
+ if(u_strcmp(result, value)!=0){
+ log_err("FAIL:Error in setting and then getting symbols\n Expected %s Got %s\n", austrdup(value),
+ austrdup(result) );
+ }
+ else
+ log_verbose("PASS: setSymbols successful\n");
+
+ free(value);
+ free(result);
+}
+
+
+static void VerifygetsetSymbols(UDateFormat* from, UDateFormat* to, UDateFormatSymbolType type, int32_t index)
+{
+ UChar *result=NULL;
+ UChar *value=NULL;
+ int32_t resultlength, resultlengthout;
+ UErrorCode status = U_ZERO_ERROR;
+
+ resultlength=0;
+ resultlengthout=udat_getSymbols(from, type, index , NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_getSymbols(from, type, index, result, resultlength, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in getSymbols() %s\n", myErrorName(status) );
+ return;
+ }
+
+ resultlength=resultlengthout+1;
+ udat_setSymbols(to, type, index, result, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in udat_setSymbols() : %s\n", myErrorName(status) );
+ return;
+ }
+
+ resultlength=0;
+ resultlengthout=udat_getSymbols(to, type, index, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthout+1;
+ value=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_getSymbols(to, type, index, value, resultlength, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in retrieving the value using getSymbols i.e roundtrip\n %s\n",
+ myErrorName(status) );
+ return;
+ }
+
+ if(u_strcmp(result, value)!=0){
+ log_data_err("FAIL:Error in setting and then getting symbols\n Expected %s Got %s\n", austrdup(result),
+ austrdup(value) );
+ }
+ else
+ log_verbose("PASS: setSymbols successful\n");
+
+ free(value);
+ free(result);
+}
+
+
+static UChar* myNumformat(const UNumberFormat* numfor, double d)
+{
+ UChar *result2=NULL;
+ int32_t resultlength, resultlengthneeded;
+ UErrorCode status = U_ZERO_ERROR;
+
+ resultlength=0;
+ resultlengthneeded=unum_formatDouble(numfor, d, NULL, resultlength, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ /*result2=(UChar*)malloc(sizeof(UChar) * resultlength);*/ /* this leaks */
+ result2=(UChar*)ctst_malloc(sizeof(UChar) * resultlength); /*this won't*/
+ unum_formatDouble(numfor, d, result2, resultlength, NULL, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in formatting using unum_format(.....) %s\n", myErrorName(status) );
+ return 0;
+ }
+
+ return result2;
+}
+
+/**
+ * The search depth for TestExtremeDates. The total number of
+ * dates that will be tested is (2^EXTREME_DATES_DEPTH) - 1.
+ */
+#define EXTREME_DATES_DEPTH 8
+
+/**
+ * Support for TestExtremeDates (below).
+ *
+ * Test a single date to see whether udat_format handles it properly.
+ */
+static UBool _aux1ExtremeDates(UDateFormat* fmt, UDate date,
+ UChar* buf, int32_t buflen, char* cbuf,
+ UErrorCode* ec) {
+ int32_t len = udat_format(fmt, date, buf, buflen, 0, ec);
+ if (!assertSuccess("udat_format", ec)) return FALSE;
+ u_austrncpy(cbuf, buf, buflen);
+ if (len < 4) {
+ log_err("FAIL: udat_format(%g) => \"%s\"\n", date, cbuf);
+ } else {
+ log_verbose("udat_format(%g) => \"%s\"\n", date, cbuf);
+ }
+ return TRUE;
+}
+
+/**
+ * Support for TestExtremeDates (below).
+ *
+ * Recursively test between 'small' and 'large', up to the depth
+ * limit specified by EXTREME_DATES_DEPTH.
+ */
+static UBool _aux2ExtremeDates(UDateFormat* fmt, UDate small, UDate large,
+ UChar* buf, int32_t buflen, char* cbuf,
+ int32_t count,
+ UErrorCode* ec) {
+ /* Logarithmic midpoint; see below */
+ UDate mid = (UDate) exp((log(small) + log(large)) / 2);
+ if (count == EXTREME_DATES_DEPTH) {
+ return TRUE;
+ }
+ return
+ _aux1ExtremeDates(fmt, mid, buf, buflen, cbuf, ec) &&
+ _aux2ExtremeDates(fmt, small, mid, buf, buflen, cbuf, count+1, ec) &&
+ _aux2ExtremeDates(fmt, mid, large, buf, buflen, cbuf, count+1, ec);
+}
+
+/**
+ * http://www.jtcsv.com/cgibin/icu-bugs?findid=3659
+ *
+ * For certain large dates, udat_format crashes on MacOS. This test
+ * attempts to reproduce this problem by doing a recursive logarithmic*
+ * binary search of a predefined interval (from 'small' to 'large').
+ *
+ * The limit of the search is given by EXTREME_DATES_DEPTH, above.
+ *
+ * *The search has to be logarithmic, not linear. A linear search of the
+ * range 0..10^30, for example, will find 0.5*10^30, then 0.25*10^30 and
+ * 0.75*10^30, etc. A logarithmic search will find 10^15, then 10^7.5
+ * and 10^22.5, etc.
+ */
+static void TestExtremeDates() {
+ UDateFormat *fmt;
+ UErrorCode ec;
+ UChar buf[256];
+ char cbuf[256];
+ const double small = 1000; /* 1 sec */
+ const double large = 1e+30; /* well beyond usable UDate range */
+
+ /* There is no need to test larger values from 1e+30 to 1e+300;
+ the failures occur around 1e+27, and never above 1e+30. */
+
+ ec = U_ZERO_ERROR;
+ fmt = udat_open(UDAT_LONG, UDAT_LONG, "en_US",
+ 0, 0, 0, 0, &ec);
+ if (!assertSuccess("udat_open", &ec)) return;
+
+ _aux2ExtremeDates(fmt, small, large, buf, LEN(buf), cbuf, 0, &ec);
+
+ udat_close(fmt);
+}
+
+static void TestAllLocales(void) {
+ int32_t idx, dateIdx, timeIdx, localeCount;
+ static const UDateFormatStyle style[] = {
+ UDAT_FULL, UDAT_LONG, UDAT_MEDIUM, UDAT_SHORT
+ };
+ localeCount = uloc_countAvailable();
+ for (idx = 0; idx < localeCount; idx++) {
+ for (dateIdx = 0; dateIdx < (int32_t)(sizeof(style)/sizeof(style[0])); dateIdx++) {
+ for (timeIdx = 0; timeIdx < (int32_t)(sizeof(style)/sizeof(style[0])); timeIdx++) {
+ UErrorCode status = U_ZERO_ERROR;
+ udat_close(udat_open(style[dateIdx], style[timeIdx],
+ uloc_getAvailable(idx), NULL, 0, NULL, 0, &status));
+ if (U_FAILURE(status)) {
+ log_err("FAIL: udat_open(%s) failed with (%s) dateIdx=%d, timeIdx=%d\n",
+ uloc_getAvailable(idx), u_errorName(status), dateIdx, timeIdx);
+ }
+ }
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.h
new file mode 100644
index 00000000000..861a1087645
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdattst.h
@@ -0,0 +1,54 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDATTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* C API TEST FOR DATE FORMAT */
+#ifndef _CDATFRMTST
+#define _CDATFRMTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+
+ /**
+ * The function used to test the Date format API
+ **/
+ static void TestDateFormat(void);
+
+ /**
+ * The function used to test API udat_getSymbols(), udat_setSymbols() and udat_countSymbols()
+ **/
+ static void TestSymbols(void);
+
+ /**
+ * Test DateFormat(Calendar) API
+ */
+ static void TestDateFormatCalendar(void);
+
+ /**
+ * test subroutines used by TestSymbols
+ **/
+ static void VerifygetSymbols(UDateFormat*, UDateFormatSymbolType, int32_t, const char*);
+ static void VerifysetSymbols(UDateFormat*, UDateFormatSymbolType, int32_t, const char*);
+ static void VerifygetsetSymbols(UDateFormat*, UDateFormat*, UDateFormatSymbolType, int32_t);
+
+ /**
+ * test subroutine used by the testing functions
+ **/
+ static UChar* myNumformat(const UNumberFormat* numfor, double d);
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.c
new file mode 100644
index 00000000000..6d53b74e602
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.c
@@ -0,0 +1,139 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDETST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************/
+/**
+ * CollationGermanTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "cdetst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "unicode/ustring.h"
+#include "string.h"
+
+static UCollator *myCollation;
+const static UChar testSourceCases[][MAX_TOKEN_LEN] =
+{
+ {0x0047/*'G'*/, 0x0072/*'r'*/, 0x00F6, 0x00DF, 0x0065/*'e'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0054/*'T'*/, 0x00F6, 0x006e/*'n'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0054/*'T'*/, 0x00F6, 0x006e/*'n'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0054/*'T'*/, 0x00F6, 0x006e/*'n'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0308, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000},
+ {0x00E4, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000}, /*doubt in primary here */
+ {0x00E4, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000}, /*doubt in primary here*/
+ {0x0053/*'S'*/, 0x0074/*'t'*/, 0x0072/*'r'*/, 0x0061/*'a'*/, 0x00DF, 0x0065/*'e'*/, 0x0000},
+ {0x0065/*'e'*/, 0x0066/*'f'*/, 0x0067/*'g'*/, 0x0000},
+ {0x00E4, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000}, /*doubt in primary here*/
+ {0x0053/*'S'*/, 0x0074/*'t'*/, 0x0072/*'r'*/, 0x0061/*'a'*/, 0x00DF, 0x0065/*'e'*/, 0x0000}
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] =
+{
+ {0x0047/*'G'*/, 0x0072/*'r'*/, 0x006f/*'o'*/, 0x0073/*'s'*/, 0x0073/*'s'*/, 0x0069/*'i'*/, 0x0073/*'s'*/, 0x0074/*'t'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0308, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0054/*'T'*/, 0x006f/*'o'*/, 0x006e/*'n'*/, 0x0000},
+ {0x0054/*'T'*/, 0x006f/*'o'*/, 0x0064/*'d'*/, 0x0000},
+ {0x0054/*'T'*/, 0x006f/*'o'*/, 0x0066/*'f'*/, 0x0075/*'u'*/, 0x0000},
+ {0x0041/*'A'*/, 0x0308, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0308, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000}, /*doubt in primary here*/
+ {0x0061/*'a'*/, 0x0065/*'e'*/, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000}, /*doubt in primary here*/
+ {0x0053/*'S'*/, 0x0074/*'t'*/, 0x0072/*'r'*/, 0x0061/*'a'*/, 0x0073/*'s'*/, 0x0073/*'s'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0065/*'e'*/, 0x0066/*'f'*/, 0x0067/*'g'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0065/*'e'*/, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000}, /*doubt in primary here*/
+ {0x0053/*'S'*/, 0x0074/*'t'*/, 0x0072/*'r'*/, 0x0061/*'a'*/, 0x0073/*'s'*/, 0x0073/*'s'*/, 0x0065/*'e'*/, 0x0000}
+};
+
+const static UCollationResult results[][2] =
+{
+ /* Primary*/ /* Tertiary*/
+ { UCOL_LESS, UCOL_LESS }, /*should be UCOL_GREATER for primary*/
+ { UCOL_EQUAL, UCOL_LESS },
+ { UCOL_GREATER, UCOL_GREATER },
+ { UCOL_GREATER, UCOL_GREATER },
+ { UCOL_GREATER, UCOL_GREATER },
+ { UCOL_EQUAL, UCOL_LESS },
+ { UCOL_EQUAL, UCOL_EQUAL }, /*should be UCOL_GREATER for primary*/
+ { UCOL_LESS, UCOL_LESS }, /*should be UCOL_GREATER for primary*/
+ { UCOL_EQUAL, UCOL_GREATER },
+ { UCOL_EQUAL, UCOL_EQUAL },
+ { UCOL_LESS, UCOL_LESS }, /*should be UCOL_GREATER for primary*/
+ { UCOL_EQUAL, UCOL_GREATER }
+};
+
+
+
+
+void addGermanCollTest(TestNode** root)
+{
+
+
+ addTest(root, &TestTertiary, "tscoll/cdetst/TestTertiary");
+ addTest(root, &TestPrimary, "tscoll/cdetst/TestPrimary");
+
+
+
+}
+
+static void TestTertiary( )
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("de_DE", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing German Collation with Tertiary strength\n");
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 12 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i][1]);
+ }
+ ucol_close(myCollation);
+}
+
+static void TestPrimary()
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("de_DE", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: %s: in creation of rule based collator: %s\n", __FILE__, myErrorName(status));
+ return;
+ }
+ log_verbose("Testing German Collation with primary strength\n");
+ ucol_setStrength(myCollation, UCOL_PRIMARY);
+ for (i = 0; i < 12 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i][0]);
+ }
+ ucol_close(myCollation);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.h
new file mode 100644
index 00000000000..36696a5c2ec
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdetst.h
@@ -0,0 +1,42 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDETST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+/**
+ * CollationGERMANTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _CGERCOLLTST
+#define _CGERCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+
+#define MAX_TOKEN_LEN 16
+
+ /* performs test with strength PRIMARY */
+static void TestPrimary(void);
+
+ /* perform test with strength TERTIARY */
+static void TestTertiary(void);
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.c
new file mode 100644
index 00000000000..d19b7eedac4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.c
@@ -0,0 +1,350 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDTDPTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* INDEPTH TEST FOR DATE FORMAT */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/uloc.h"
+#include "unicode/udat.h"
+#include "unicode/ucal.h"
+#include "unicode/unum.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "cdtdptst.h"
+#include "cformtst.h"
+
+#include "cmemory.h"
+
+void addDtFrDepTest(TestNode** root);
+
+void addDtFrDepTest(TestNode** root)
+{
+ addTest(root, &TestTwoDigitYearDSTParse, "tsformat/cdtdptst/TestTwoDigitYearDSTParse");
+ addTest(root, &TestPartialParse994, "tsformat/cdtdptst/TestPartialParse994");
+ addTest(root, &TestRunTogetherPattern985, "tsformat/cdtdptst/TestRunTogetherPattern985");
+ addTest(root, &TestCzechMonths459, "tsformat/cdtdptst/TestCzechMonths459");
+ addTest(root, &TestQuotePattern161, "tsformat/cdtdptst/TestQuotePattern161");
+
+}
+
+/**
+ * Test the parsing of 2-digit years.
+ */
+void TestTwoDigitYearDSTParse()
+{
+ UDateFormat *fullFmt, *fmt;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *pattern;
+ UDate d;
+ UChar *s;
+ int32_t pos;
+
+ ctest_setTimeZone(NULL, &status);
+
+ pattern=(UChar*)malloc(sizeof(UChar) * (strlen("EEE MMM dd HH:mm:ss.SSS zzz yyyy G")+1 ));
+ u_uastrcpy(pattern, "EEE MMM dd HH:mm:ss.SSS zzz yyyy G");
+ fullFmt= udat_open(UDAT_IGNORE, UDAT_IGNORE,"en_US",NULL,0,pattern, u_strlen(pattern),&status);
+ if(U_FAILURE(status)) {
+ log_err("FAIL: Error in creating a date format using udat_openPattern \n %s\n",
+ myErrorName(status) );
+ }
+ else {log_verbose("PASS: creating dateformat using udat_openPattern() succesful\n");}
+
+ u_uastrcpy(pattern, "dd-MMM-yy h:mm:ss 'o''clock' a z");
+ fmt= udat_open(UDAT_IGNORE,UDAT_IGNORE,"en_US", NULL, 0,pattern, u_strlen(pattern), &status);
+
+
+ s=(UChar*)malloc(sizeof(UChar) * (strlen("03-Apr-04 2:20:47 o'clock AM PST")+1) );
+ u_uastrcpy(s, "03-Apr-04 2:20:47 o'clock AM PST");
+ pos=0;
+ d = udat_parse(fmt, s, u_strlen(s), &pos, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: Could not parse \"%s\"\n", austrdup(s));
+ } else {
+ UCalendar *cal = ucal_open(NULL, 0, uloc_getDefault(), UCAL_TRADITIONAL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: Could not open calendar");
+ } else {
+ int32_t h;
+ ucal_setMillis(cal, d, &status);
+ h = ucal_get(cal, UCAL_HOUR_OF_DAY, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: Some calendar operations failed");
+ } else if (h != 2) {
+ log_err("FAIL: Parse of \"%s\" returned HOUR_OF_DAY %d\n",
+ austrdup(s), h);
+ }
+ ucal_close(cal);
+ }
+ }
+
+ udat_close(fullFmt);
+ udat_close(fmt);
+ free(pattern);
+ free(s);
+
+ ctest_resetTimeZone();
+}
+
+
+/**
+ * Verify that strings which contain incomplete specifications are parsed
+ * correctly. In some instances, this means not being parsed at all, and
+ * returning an appropriate error.
+ */
+void TestPartialParse994()
+{
+ int32_t pos;
+ UDateFormat *f;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *s;
+ UChar *fmtChars;
+ UDate d, null;
+ null=0;
+
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* f = udat_open(UDAT_DEFAULT, UDAT_SHORT, NULL, NULL, 0, &status); */
+ f = udat_open(UDAT_DEFAULT, UDAT_SHORT, "en_US", NULL, 0, NULL, 0,&status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: ErrorCode received during test: %s\n", myErrorName(status));
+ return;
+ }
+ s=(UChar*)malloc(sizeof(UChar) * (strlen("01/01/1997 10:11:42 AM")+1) );
+ u_uastrcpy(s, "01/01/1997 10:11:42 AM");
+ pos=0;
+ d = udat_parse(f, s, u_strlen(s), &pos, &status);
+ if(U_FAILURE(status)) {
+ log_data_err("FAIL: could not parse - exitting");
+ return;
+ }
+ fmtChars = myDateFormat(f, d);
+ if(fmtChars) {
+ log_verbose("%s\n", fmtChars);
+ } else {
+ log_data_err("FAIL: could not format \n");
+ return;
+ }
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/01 10:11:42", d);
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/01 10:", null);
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/01 10", null);
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/01 ", null);
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/01", null);
+ udat_close(f);
+ free(s);
+}
+
+
+
+void tryPat994(UDateFormat* format, const char* pattern, const char* s, UDate expected)
+{
+ UChar *f;
+ UChar *str, *pat;
+ UDate date;
+ UDate null=0;
+ int32_t pos;
+ UErrorCode status = U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (strlen(s) + 1) );
+ u_uastrcpy(str, s);
+ pat=(UChar*)malloc(sizeof(UChar) * (strlen(pattern) + 1) );
+ u_uastrcpy(pat, pattern);
+ log_verbose("Pattern : %s ; String : %s\n", austrdup(pat), austrdup(str));
+ udat_applyPattern(format, FALSE, pat, u_strlen(pat));
+ pos=0;
+ date = udat_parse(format, str, u_strlen(str), &pos, &status);
+ if(U_FAILURE(status) || date == null) {
+ log_verbose("ParseException: : %s\n", myErrorName(status) );
+ if (expected != null)
+ log_err("FAIL: Expected: %s\n", austrdup(myDateFormat(format, expected)) );
+ }
+ else {
+ f=myDateFormat(format, date);
+ log_verbose(" parse( %s ) -> %s\n", austrdup(str), austrdup(f));
+ if (expected == null || date != expected)
+ log_err("FAIL: Expected null for \"%s\"\n", s);
+ if (u_strcmp(f, str) !=0)
+ log_err("FAIL: Expected : %s\n", austrdup(str) );
+ }
+
+ free(str);
+ free(pat);
+}
+
+
+/**
+ * Verify the behavior of patterns in which digits for different fields run together
+ * without intervening separators.
+ */
+void TestRunTogetherPattern985()
+{
+ int32_t pos;
+ UChar *pattern=NULL, *now=NULL, *then=NULL;
+ UDateFormat *format;
+ UDate date1, date2;
+ UErrorCode status = U_ZERO_ERROR;
+ pattern=(UChar*)malloc(sizeof(UChar) * (strlen("yyyyMMddHHmmssSSS")+1) );
+ u_uastrcpy(pattern, "yyyyMMddHHmmssSSS");
+ format = udat_open(UDAT_IGNORE, UDAT_IGNORE, NULL, NULL, 0,pattern, u_strlen(pattern), &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: Error in date format construction with pattern: %s\n", myErrorName(status));
+ return;
+ }
+ date1 = ucal_getNow();
+ now=myDateFormat(format, date1);
+ log_verbose("%s\n", austrdup(now) );
+ pos = 0;
+ date2 = udat_parse(format, now, u_strlen(now), &pos, &status);
+ if (date2 == 0) log_verbose("Parse stopped at : %d\n", pos);
+ else then=myDateFormat(format, date2);
+ log_verbose("%s\n", austrdup(then) );
+ if (!(date2 == date1)) log_err("FAIL\n");
+
+ udat_close(format);
+ free(pattern);
+
+}
+
+/**
+ * Verify the handling of Czech June and July, which have the unique attribute that
+ * one is a proper prefix substring of the other.
+ */
+void TestCzechMonths459()
+{
+ int32_t lneed, pos;
+ UChar *pattern=NULL, *tzID=NULL;
+ UChar *juneStr, *julyStr;
+ UDateFormat *fmt;
+ UCalendar *cal;
+ UDate june, july, d;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *date;
+
+ ctest_setTimeZone(NULL, &status);
+ fmt = udat_open(UDAT_FULL, UDAT_FULL, "cs", NULL, 0, NULL, 0, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in constructing the date format\n");
+ ctest_resetTimeZone();
+ return;
+ }
+ lneed=0;
+ lneed=udat_toPattern(fmt, TRUE, NULL, lneed, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ pattern=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ udat_toPattern(fmt, TRUE, pattern, lneed+1, &status);
+ }
+ if(U_FAILURE(status)){ log_err("Error in extracting the pattern\n"); }
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "GMT");
+ cal=ucal_open(tzID, u_strlen(tzID), "cs", UCAL_GREGORIAN, &status);
+ if(U_FAILURE(status)){ log_err("error in ucal_open caldef : %s\n", myErrorName(status)); }
+
+ ucal_setDate(cal, 1997, UCAL_JUNE, 15, &status);
+ june=ucal_getMillis(cal, &status);
+ ucal_setDate(cal, 1997, UCAL_JULY, 15, &status);
+ july=ucal_getMillis(cal, &status);
+
+ juneStr = myDateFormat(fmt, june);
+ julyStr = myDateFormat(fmt, july);
+ pos=0;
+ if(juneStr == NULL) {
+ log_data_err("Can't load juneStr. Quitting.\n");
+ return;
+ }
+ d = udat_parse(fmt, juneStr, u_strlen(juneStr), &pos, &status);
+ date = myDateFormat(fmt, d);
+
+ if(U_SUCCESS(status)){
+ UChar* out1 = myDateFormat(fmt, june);
+ UChar* out2 = myDateFormat(fmt, d);
+ if(u_strcmp(out1, out2) !=0)
+ log_err("Error in handling the czech month june\n");
+ else
+ log_verbose("Pass: Date = %s (czech month June)\n", aescstrdup(date, -1));
+ }else{
+ log_err("udat_parse failed. Error. %s\n",u_errorName(status));
+ }
+ pos=0;
+ d = udat_parse(fmt, julyStr, u_strlen(julyStr), &pos, &status);
+ date = myDateFormat(fmt, d);
+ if(u_strcmp(myDateFormat(fmt, july), myDateFormat(fmt, d) ) !=0)
+ log_err("Error in handling the czech month july\n");
+ else
+ log_verbose("Pass: Date = %s (czech month July)\n", aescstrdup(date, -1));
+
+ ctest_resetTimeZone();
+ udat_close(fmt);
+ ucal_close(cal);
+ free(pattern);
+ free(tzID);
+}
+
+/**
+ * Test the handling of single quotes in patterns.
+ */
+void TestQuotePattern161()
+{
+ UDateFormat *format;
+ UCalendar *cal;
+ UDate currentTime_1;
+ UChar *pattern, *tzID, *exp;
+ UChar *dateString;
+ UErrorCode status = U_ZERO_ERROR;
+ const char* expStr = "04/13/1999 at 10:42:28 AM ";
+
+ ctest_setTimeZone(NULL, &status);
+
+ pattern=(UChar*)malloc(sizeof(UChar) * (strlen("MM/dd/yyyy 'at' hh:mm:ss a zzz")+1) );
+ u_uastrcpy(pattern, "MM/dd/yyyy 'at' hh:mm:ss a zzz");
+
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* format= udat_openPattern(pattern, u_strlen(pattern), NULL, &status); */
+ format= udat_open(UDAT_IGNORE, UDAT_IGNORE,"en_US", NULL, 0,pattern, u_strlen(pattern), &status);
+ if(U_FAILURE(status)){
+ log_err("error in udat_open: %s\n", myErrorName(status));
+ return;
+ }
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "PST");
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* cal=ucal_open(tzID, u_strlen(tzID), NULL, UCAL_TRADITIONAL, &status); */
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)){ log_err("error in ucal_open cal : %s\n", myErrorName(status)); }
+
+ ucal_setDateTime(cal, 1999, UCAL_APRIL, 13, 10, 42, 28, &status);
+ currentTime_1 = ucal_getMillis(cal, &status);
+
+ dateString = myDateFormat(format, currentTime_1);
+ exp=(UChar*)malloc(sizeof(UChar) * (strlen(expStr) + 1) );
+ u_uastrcpy(exp, expStr);
+
+ log_verbose("%s\n", austrdup(dateString) );
+ if(u_strncmp(dateString, exp, (int32_t)strlen(expStr)) !=0)
+ log_err("Error in formatting a pattern with single quotes\n");
+
+ udat_close(format);
+ ucal_close(cal);
+ free(exp);
+ free(tzID);
+ free(pattern);
+
+ ctest_resetTimeZone();
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.h
new file mode 100644
index 00000000000..11fd9e5faaa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtdptst.h
@@ -0,0 +1,57 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDTDPTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* INDEPTH TEST FOR DATE FORMAT */
+#ifndef _CDTFRRGSTST
+#define _CDTFRRGSTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+
+/**
+ * Test the parsing of 2-digit years.
+ */
+void TestTwoDigitYearDSTParse(void);
+/**
+ * Verify that strings which contain incomplete specifications are parsed
+ * correctly. In some instances, this means not being parsed at all, and
+ * returning an appropriate error.
+ */
+void TestPartialParse994(void);
+/**
+ * Verify the behavior of patterns in which digits for different fields run together
+ * without intervening separators.
+ */
+void TestRunTogetherPattern985(void);
+
+/**
+ * Verify the handling of Czech June and July, which have the unique attribute that
+ * one is a proper prefix substring of the other.
+ */
+void TestCzechMonths459(void);
+
+/**
+ * Test the handling of single quotes in patterns.
+ */
+void TestQuotePattern161(void);
+
+/*Internal functions used*/
+void tryPat994(UDateFormat* format, const char* pat, const char* s, UDate expected);
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.c
new file mode 100644
index 00000000000..3ef0f780af0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.c
@@ -0,0 +1,536 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDTRGTST.C
+*
+* Madhu Katragadda Ported for C API
+* Modification History:
+* Date Name Description
+* 07/15/99 helena Ported to HPUX 10/11 CC.
+*********************************************************************************
+*/
+/* REGRESSION TEST FOR DATE FORMAT */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/uloc.h"
+#include "unicode/udat.h"
+#include "unicode/ucal.h"
+#include "unicode/unum.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "cdtrgtst.h"
+#include "cmemory.h"
+
+void addDateForRgrTest(TestNode** root);
+
+void addDateForRgrTest(TestNode** root)
+{
+ addTest(root, &Test4029195, "tsformat/cdtrgtst/Test4029195");
+ addTest(root, &Test4056591, "tsformat/cdtrgtst/Test4056591");
+ addTest(root, &Test4059917, "tsformat/cdtrgtst/Test4059917");
+ addTest(root, &Test4060212, "tsformat/cdtrgtst/Test4060212");
+ addTest(root, &Test4061287, "tsformat/cdtrgtst/Test4061287");
+ addTest(root, &Test4073003, "tsformat/cdtrgtst/Test4073003");
+ addTest(root, &Test4162071, "tsformat/cdtrgtst/Test4162071");
+ addTest(root, &Test714, "tsformat/cdtrgtst/Test714");
+}
+
+/**
+ * @bug 4029195
+ */
+void Test4029195()
+{
+ int32_t resultlength, resultlengthneeded;
+ UChar *fmdt, *todayS, *rt;
+ UChar *pat=NULL;
+ UChar *temp;
+ UDate today, d1;
+ UDateFormat *df;
+ int32_t parsepos;
+ UErrorCode status = U_ZERO_ERROR;
+
+ log_verbose("Testing date format and parse function in regression test\n");
+ today = ucal_getNow();
+
+ df = udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,"en_US", NULL, 0, NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using default date and time style : %s\n", myErrorName(status));
+ return;
+ }
+ resultlength=0;
+ resultlengthneeded=udat_toPattern(df, TRUE, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded + 1;
+ pat=(UChar*)malloc(sizeof(UChar) * resultlength);
+ udat_toPattern(df, TRUE, pat, resultlength, &status);
+ }
+
+ log_verbose("pattern: %s\n", austrdup(pat));
+
+
+ fmdt = myFormatit(df, today);
+ if(fmdt) {
+ log_verbose("today: %s\n", austrdup(fmdt));
+ } else {
+ log_data_err("ERROR: couldn't format, exitting test");
+ return;
+ }
+
+ temp=(UChar*)malloc(sizeof(UChar) * 10);
+ u_uastrcpy(temp, "M yyyy dd");
+ udat_applyPattern(df, TRUE, temp, u_strlen(temp));
+
+ todayS =myFormatit(df, today);
+ log_verbose("After teh pattern is applied\n today: %s\n", austrdup(todayS) );
+ parsepos=0;
+ d1=udat_parse(df, todayS, u_strlen(todayS), &parsepos, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in parsing using udat_parse(.....): %s\n", myErrorName(status));
+ }
+
+ rt =myFormatit(df, d1);
+ log_verbose("today: %s\n", austrdup(rt) );
+
+ log_verbose("round trip: %s\n", austrdup(rt) );
+
+ if(u_strcmp(rt, todayS)!=0) {
+ log_err("Fail: Want %s Got %s\n", austrdup(todayS), austrdup(rt) );
+ }
+ else
+ log_verbose("Pass: parse and format working fine\n");
+ udat_close(df);
+ free(temp);
+ if(pat != NULL) {
+ free(pat);
+ }
+}
+
+
+/**
+ * @bug 4056591
+ * Verify the function of the [s|g]et2DigitYearStart() API.
+ */
+void Test4056591()
+{
+ int i;
+ UCalendar *cal;
+ UDateFormat *def;
+ UDate start,exp,got;
+ UChar s[10];
+ UChar *gotdate, *expdate;
+ UChar pat[10];
+ UDate d[4];
+ UErrorCode status = U_ZERO_ERROR;
+ const char* strings[] = {
+ "091225",
+ "091224",
+ "611226",
+ "991227"
+ };
+
+ log_verbose("Testing s[get] 2 digit year start regressively\n");
+ cal=ucal_open(NULL, 0, "en_US", UCAL_GREGORIAN, &status);
+ if(U_FAILURE(status)){
+ log_err("error in ucal_open caldef : %s\n", myErrorName(status));
+ }
+ ucal_setDateTime(cal, 1809, UCAL_DECEMBER, 25, 17, 40, 30, &status);
+ d[0]=ucal_getMillis(cal, &status);
+ if(U_FAILURE(status)){
+ log_err("Error: failure in get millis: %s\n", myErrorName(status));
+ }
+ ucal_setDateTime(cal, 1909, UCAL_DECEMBER, 24, 17, 40, 30, &status);
+ d[1]=ucal_getMillis(cal, &status);
+ ucal_setDateTime(cal, 1861, UCAL_DECEMBER, 26, 17, 40, 30, &status);
+ d[2]=ucal_getMillis(cal, &status);
+ ucal_setDateTime(cal, 1999, UCAL_DECEMBER, 27, 17, 40, 30, &status);
+ d[3]=ucal_getMillis(cal, &status);
+
+
+ u_uastrcpy(pat, "yyMMdd");
+ def = udat_open(UDAT_IGNORE,UDAT_IGNORE,NULL, NULL, 0, pat, u_strlen(pat), &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using u_openPattern(): %s\n", myErrorName(status));
+ return;
+ }
+ start = 1800;
+ udat_set2DigitYearStart(def, start, &status);
+ if(U_FAILURE(status))
+ log_err("ERROR: in setTwoDigitStartDate: %s\n", myErrorName(status));
+ if( (udat_get2DigitYearStart(def, &status) != start))
+ log_err("ERROR: get2DigitYearStart broken\n");
+
+
+ for(i = 0; i < 4; ++i) {
+ u_uastrcpy(s, strings[i]);
+ exp = d[i];
+ got = udat_parse(def, s, u_strlen(s), 0, &status);
+ gotdate=myFormatit(def, got);
+ expdate=myFormatit(def, exp);
+
+ if (gotdate == NULL || expdate == NULL) {
+ log_err("myFormatit failed!\n");
+ }
+ else if(u_strcmp(gotdate, expdate) !=0){
+ log_err("set2DigitYearStart broken for %s \n got: %s, expected: %s\n", austrdup(s),
+ austrdup(gotdate), austrdup(expdate) );
+ }
+ }
+
+ udat_close(def);
+ ucal_close(cal);
+}
+
+
+/**
+ * SimpleDateFormat does not properly parse date strings without delimiters
+ * @bug 4059917
+ */
+void Test4059917()
+{
+ UDateFormat* def;
+ UChar *myDate;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *pattern;
+ UChar tzID[4];
+
+ log_verbose("Testing apply pattern and to pattern regressively\n");
+ u_uastrcpy(tzID, "PST");
+ pattern=(UChar*)malloc(sizeof(UChar) * 11);
+ u_uastrcpy(pattern, "yyyy/MM/dd");
+ log_verbose("%s\n", austrdup(pattern) );
+ def = udat_open(UDAT_IGNORE,UDAT_IGNORE,NULL,tzID,-1,pattern, u_strlen(pattern),&status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using openPattern: %s\n", myErrorName(status));
+ return;
+ }
+ myDate=(UChar*)malloc(sizeof(UChar) * 11);
+ u_uastrcpy(myDate, "1970/01/12");
+
+ aux917( def, myDate );
+ udat_close(def);
+
+ u_uastrcpy(pattern, "yyyyMMdd");
+ def = udat_open(UDAT_IGNORE,UDAT_IGNORE,NULL,tzID,-1,pattern, u_strlen(pattern),&status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using openPattern: %s\n", myErrorName(status));
+ return;
+ }
+ u_uastrcpy(myDate, "19700112");
+ aux917( def, myDate );
+ udat_close(def);
+ free(pattern);
+ free(myDate);
+
+}
+
+void aux917( UDateFormat *fmt, UChar* str)
+{
+ int32_t resultlength, resultlengthneeded;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar* formatted=NULL;
+ UChar *pat=NULL;
+ UDate d1=1000000000.0;
+
+ resultlength=0;
+ resultlengthneeded=udat_toPattern(fmt, TRUE, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded + 1;
+ pat=(UChar*)malloc(sizeof(UChar) * (resultlength));
+ udat_toPattern(fmt, TRUE, pat, resultlength, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("failure in retrieving the pattern: %s\n", myErrorName(status));
+ }
+ log_verbose("pattern: %s\n", austrdup(pat) );
+
+ status = U_ZERO_ERROR;
+ formatted = myFormatit(fmt, d1);
+ if( u_strcmp(formatted,str)!=0) {
+ log_err("Fail: Want %s Got: %s\n", austrdup(str), austrdup(formatted) );
+ }
+ free(pat);
+}
+
+/**
+ * @bug 4060212
+ */
+void Test4060212()
+{
+ int32_t pos;
+ UCalendar *cal;
+ UDateFormat *formatter, *fmt;
+ UErrorCode status = U_ZERO_ERROR;
+ UDate myDate;
+ UChar *myString;
+ UChar dateString[30], pattern[20], tzID[4];
+ u_uastrcpy(dateString, "1995-040.05:01:29 -8");
+ u_uastrcpy(pattern, "yyyy-DDD.hh:mm:ss z");
+
+ log_verbose( "dateString= %s Using yyyy-DDD.hh:mm:ss\n", austrdup(dateString) );
+ status = U_ZERO_ERROR;
+ u_uastrcpy(tzID, "PST");
+
+ formatter = udat_open(UDAT_IGNORE,UDAT_IGNORE,"en_US",tzID,-1,pattern, u_strlen(pattern), &status);
+ pos=0;
+ myDate = udat_parse(formatter, dateString, u_strlen(dateString), &pos, &status);
+
+
+ fmt = udat_open(UDAT_FULL,UDAT_LONG ,NULL, tzID, -1, NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using default date and time style: %s\n",
+ myErrorName(status) );
+ return;
+ }
+ myString = myFormatit(fmt, myDate);
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_GREGORIAN, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: error in ucal_open caldef : %s\n", myErrorName(status));
+ }
+ ucal_setMillis(cal, myDate, &status);
+ if ((ucal_get(cal, UCAL_DAY_OF_YEAR, &status) != 40)){
+ log_err("Fail: Got %d Expected 40\n", ucal_get(cal, UCAL_DAY_OF_YEAR, &status));
+ }
+
+ udat_close(formatter);
+ ucal_close(cal);
+ udat_close(fmt);
+
+}
+
+/**
+ * @bug 4061287
+ */
+void Test4061287()
+{
+ UBool ok;
+ int32_t pos;
+ UDateFormat *df;
+ UErrorCode status = U_ZERO_ERROR;
+ UDate myDate;
+ UChar pattern[21], dateString[11];
+
+ u_uastrcpy(dateString, "35/13/1971");
+ u_uastrcpy(pattern, "dd/mm/yyyy");
+ status = U_ZERO_ERROR;
+ log_verbose("Testing parsing by changing the attribute lenient\n");
+ df = udat_open(UDAT_IGNORE,UDAT_IGNORE,NULL,NULL,0,pattern, u_strlen(pattern),&status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in open pattern of test4061287: %s\n", myErrorName(status));
+ return;
+ }
+
+ pos=0;
+
+ udat_setLenient(df, FALSE);
+ ok=udat_isLenient(df);
+ if(ok==TRUE)
+ log_err("setLenient nor working\n");
+ ok = FALSE;
+ myDate = udat_parse(df, dateString, u_strlen(dateString), &pos, &status);
+ if(U_FAILURE(status))
+ ok = TRUE;
+ if(ok!=TRUE)
+ log_err("Fail: Lenient not working: does lenient parsing in spite of setting Leninent as FALSE ");
+
+ udat_close(df);
+
+}
+
+
+
+/* The java.text.DateFormat.parse(String) method expects for the
+ US locale a string formatted according to mm/dd/yy and parses it
+ correctly.
+
+ When given a string mm/dd/yyyy it only parses up to the first
+ two y's, typically resulting in a date in the year 1919.
+
+ Please extend the parsing method(s) to handle strings with
+ four-digit year values (probably also applicable to various
+ other locales. */
+/**
+ * @bug 4073003
+ */
+void Test4073003()
+{
+ int32_t pos,i;
+ UDate d,dd;
+ UChar *datestr;
+ UChar temp[15];
+ UErrorCode status = U_ZERO_ERROR;
+ UDateFormat *fmt;
+ UChar *result, *result2;
+ const char* tests [] = {
+ "12/25/61",
+ "12/25/1961",
+ "4/3/1999",
+ "4/3/99"
+ };
+
+ fmt= udat_open(UDAT_SHORT,UDAT_SHORT ,NULL, NULL, 0, NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using short date and time style: %s\n",
+ myErrorName(status));
+ return;
+ }
+ u_uastrcpy(temp, "m/D/yy");
+ udat_applyPattern(fmt, FALSE, temp, u_strlen(temp));
+
+ for(i= 0; i < 4; i+=2) {
+ status=U_ZERO_ERROR;
+ datestr=(UChar*)malloc(sizeof(UChar) * (strlen(tests[i])+1));
+ u_uastrcpy(datestr, tests[i]);
+
+ pos=0;
+ d = udat_parse(fmt, datestr, u_strlen(datestr), &pos, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR : in test 4073003: %s\n", myErrorName(status));
+ }
+
+ free(datestr);
+ datestr=(UChar*)malloc(sizeof(UChar) * (strlen(tests[i+1])+1));
+ u_uastrcpy(datestr, tests[i+1]);
+
+ pos=0;
+ status=U_ZERO_ERROR;
+ dd = udat_parse(fmt, datestr, u_strlen(datestr), &pos, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR : in test 4073003: %s\n", myErrorName(status));
+ }
+ free(datestr);
+
+ result =myFormatit(fmt, d);
+ result2 =myFormatit(fmt, dd);
+ if(!result || !result2) {
+ log_data_err("Fail: could not format - exitting test\n");
+ return;
+ }
+ if (u_strcmp(result, result2)!=0){
+ log_err("Fail: %s != %s\n", austrdup(result), austrdup(result2) );
+ }
+ else{
+ log_verbose("Ok: %s == %s\n", austrdup(result), austrdup(result2) );
+ }
+
+ }
+ udat_close(fmt);
+}
+
+/**
+ * @bug 4162071
+ **/
+void Test4162071()
+{
+ int32_t pos;
+ UDate x;
+ UErrorCode status = U_ZERO_ERROR;
+ UDateFormat *df;
+ UChar datestr[30];
+ UChar format[50];
+ u_uastrcpy(datestr, "Thu, 30-Jul-1999 11:51:14 GMT");
+ u_uastrcpy(format, "EEE', 'dd-MMM-yyyy HH:mm:ss z"); /* RFC 822/1123 */
+ status = U_ZERO_ERROR;
+ /* Can't hardcode the result to assume the default locale is "en_US". */
+ df = udat_open(UDAT_IGNORE,UDAT_IGNORE,"en_US",NULL,0,format, u_strlen(format),&status);
+ if(U_FAILURE(status)){
+ log_data_err("ERROR: couldn't create date format: %s\n", myErrorName(status));
+ return;
+ }
+ pos=0;
+ x = udat_parse(df, datestr, u_strlen(datestr), &pos, &status);
+ if(U_FAILURE(status)){
+ log_data_err("ERROR : parse format %s fails : %s\n", austrdup(format), myErrorName(status));
+ }
+ else{
+ log_verbose("Parse format \"%s \" ok.\n", austrdup(format) );
+ }
+ /*log_verbose("date= %s\n", austrdup(myFormatit(df, x)) );*/
+ udat_close(df);
+}
+
+void Test714(void)
+{
+ UDate d=978103543000.0;
+ UChar temp[20];
+ UErrorCode status = U_ZERO_ERROR;
+ UDateFormat *fmt;
+ UChar *result;
+ const char* expect = "7:25:43 AM";
+
+ ctest_setTimeZone(NULL, &status);
+
+ fmt= udat_open(UDAT_MEDIUM,UDAT_NONE ,"en_US_CA", NULL, -1, NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error in creating the dateformat using medium time style and NO date style: %s\n",
+ myErrorName(status));
+ return;
+ }
+ result =myFormatit(fmt, d);
+ if(!result) {
+ log_data_err("Fail: could not format - exitting test\n");
+ return;
+ }
+ u_uastrcpy(temp, expect);
+ if (u_strcmp(result, temp)!=0){
+ log_err("Fail: %s != %s\n", austrdup(result), expect);
+ }
+ else{
+ log_verbose("Ok: %s == %s\n", austrdup(result), expect );
+ }
+
+ udat_close(fmt);
+
+ ctest_resetTimeZone();
+}
+
+/*INTERNAL FUNCTION USED */
+
+UChar* myFormatit(UDateFormat* datdef, UDate d1)
+{
+ UChar *result1=NULL;
+ int32_t resultlength, resultlengthneeded;
+ UErrorCode status = U_ZERO_ERROR;
+
+ resultlength=0;
+ resultlengthneeded=udat_format(datdef, d1, NULL, resultlength, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ /*result1=(UChar*)malloc(sizeof(UChar) * resultlength);*/ /*this leaks*/
+ result1=(UChar*)ctst_malloc(sizeof(UChar) * resultlength); /*this won't*/
+ udat_format(datdef, d1, result1, resultlength, NULL, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: Error in formatting using udat_format(.....): %s\n", myErrorName(status));
+ return 0;
+ }
+
+
+ return result1;
+
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+/*eof*/
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.h
new file mode 100644
index 00000000000..18df92e5ed2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cdtrgtst.h
@@ -0,0 +1,50 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CDTRGTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************
+*/
+/* REGRESSION TEST FOR DATE FORMAT */
+#ifndef _CDTFRRGSTST
+#define _CDTFRRGSTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+
+ /**
+ * DateFormat Regresstion tests
+ **/
+
+ void Test4029195(void);
+ void Test4056591(void);
+ void Test4059917(void);
+ void Test4060212(void);
+ void Test4061287(void);
+ void Test4073003(void);
+ void Test4162071(void);
+ void Test714(void);
+
+ /**
+ * test subroutine
+ **/
+ void aux917(UDateFormat *fmt, UChar* str );
+
+ /**
+ * test subroutine used by the testing functions
+ **/
+ UChar* myFormatit(UDateFormat* datdef, UDate d1);
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cestst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cestst.c
new file mode 100644
index 00000000000..650143fb1bc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cestst.c
@@ -0,0 +1,123 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CESTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************/
+/**
+ * CollationSpanishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "cestst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "unicode/ustring.h"
+#include "string.h"
+
+static UCollator *myCollation;
+const static UChar testSourceCases[][MAX_TOKEN_LEN] = {
+ {0x0062/*'a'*/, 0x006c/*'l'*/, 0x0069/*'i'*/, 0x0061/*'a'*/, 0x0073/*'s'*/, 0x0000},
+ {0x0045/*'E'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x0069/*'i'*/, 0x006f/*'o'*/, 0x0074/*'t'*/, 0x0000},
+ {0x0048/*'H'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x006f/*'o'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0063/*'c'*/, 0x0048/*'H'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0063/*'c'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0061/*'a'*/, 0x006c/*'l'*/, 0x0069/*'i'*/, 0x0061/*'a'*/, 0x0073/*'s'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0063/*'c'*/, 0x0048/*'H'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0063/*'c'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0048/*'H'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x006f/*'o'*/, 0x0000},
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] = {
+ {0x0062/*'a'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x0069/*'i'*/, 0x0061/*'a'*/, 0x0073/*'s'*/, 0x0000},
+ {0x0045/*'E'*/, 0x006d/*'m'*/, 0x0069/*'i'*/, 0x006f/*'o'*/, 0x0074/*'t'*/, 0x0000},
+ {0x0068/*'h'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x006f/*'O'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0043/*'C'*/, 0x0048/*'H'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0043/*'C'*/, 0x0048/*'H'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0062/*'a'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x0069/*'i'*/, 0x0061/*'a'*/, 0x0073/*'s'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0043/*'C'*/, 0x0048/*'H'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0043/*'C'*/, 0x0048/*'H'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0068/*'h'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x006f/*'O'*/, 0x0000},
+};
+
+const static UCollationResult results[] = {
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_LESS,
+ /* test primary > 5*/
+ UCOL_LESS,
+ UCOL_EQUAL,
+ UCOL_LESS,
+ UCOL_EQUAL
+};
+
+
+void addSpanishCollTest(TestNode** root)
+{
+
+
+ addTest(root, &TestPrimary, "tscoll/cestst/TestPrimary");
+ addTest(root, &TestTertiary, "tscoll/cestst/TestTertiary");
+
+}
+
+
+static void TestTertiary( )
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("es_ES", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: %s: in creation of rule based collator: %s\n", __FILE__, myErrorName(status));
+ return;
+ }
+ log_verbose("Testing Spanish Collation with Tertiary strength\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 5 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+static void TestPrimary()
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("es_ES", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: %s: in creation of rule based collator: %s\n", __FILE__, myErrorName(status));
+ return;
+ }
+ log_verbose("Testing Spanish Collation with Primary strength\n");
+ ucol_setStrength(myCollation, UCOL_PRIMARY);
+ for (i = 5; i < 9; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cestst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cestst.h
new file mode 100644
index 00000000000..e15f32d4875
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cestst.h
@@ -0,0 +1,44 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CESTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+/**
+ * CollationSpanishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _CESCOLLTST
+#define _CESCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+
+#define MAX_TOKEN_LEN 16
+
+
+ /* perform test with strength SECONDARY */
+ static void TestPrimary(void);
+
+ /* perform test with strength TERTIARY */
+ static void TestTertiary(void);
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.c
new file mode 100644
index 00000000000..3ab68dfde1a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.c
@@ -0,0 +1,112 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************
+ *
+ * File CFINTST.C
+ *
+ * Modification History:
+ * Name Description
+ * Madhu Katragadda Ported for C API
+ ********************************************************************
+ */
+
+/**
+ * CollationFinnishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "cfintst.h"
+#include "unicode/ustring.h"
+#include "string.h"
+
+static UCollator *myCollation;
+const static UChar testSourceCases[][MAX_TOKEN_LEN] = {
+ {0x0077/*'w'*/, 0x0061/*'a'*/, 0x0074/*'t'*/, 0x0000},
+ {0x0076/*'v'*/, 0x0061/*'a'*/, 0x0074/*'t'*/, 0x0000},
+ {0x0061/*'a'*/, 0x00FC, 0x0062/*'b'*/, 0x0065/*'e'*/, 0x0063/*'c'*/, 0x006b/*'k'*/, 0x0000},
+ {0x004c/*'L'*/, 0x00E5, 0x0076/*'v'*/, 0x0069/*'i'*/, 0x0000},
+ {0x0077/*'w'*/, 0x0061/*'a'*/, 0x0074/*'t'*/, 0x0000}
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] = {
+ {0x0076/*'v'*/, 0x0061/*'a'*/, 0x0074/*'t'*/, 0x0000},
+ {0x0077/*'w'*/, 0x0061/*'a'*/, 0x0079/*'y'*/, 0x0000},
+ {0x0061/*'a'*/, 0x0078/*'x'*/, 0x0062/*'b'*/, 0x0065/*'e'*/, 0x0063/*'c'*/, 0x006b/*'k'*/, 0x0000},
+ {0x004c/*'L'*/, 0x00E4, 0x0077/*'w'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0076/*'v'*/, 0x0061/*'a'*/, 0x0074/*'t'*/, 0x0000}
+};
+
+const static UCollationResult results[] = {
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_LESS,
+ /* test primary > 4*/
+ UCOL_EQUAL
+};
+
+
+
+void addFinnishCollTest(TestNode** root)
+{
+
+
+ addTest(root, &TestPrimary, "tscoll/cficoll/TestPrimary");
+ addTest(root, &TestTertiary, "tscoll/cficoll/TestTertiary");
+
+
+
+}
+
+
+static void TestTertiary( )
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("fi_FI@collation=standard", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ }
+ log_verbose("Testing Finnish Collation with Tertiary strength\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 4 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+static void TestPrimary()
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("fi_FI@collation=standard", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ }
+ log_verbose("Testing Finnish Collation with Tertiary strength\n");
+ ucol_setStrength(myCollation, UCOL_PRIMARY);
+ for (i = 4; i < 5; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.h
new file mode 100644
index 00000000000..4edd517611e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cfintst.h
@@ -0,0 +1,43 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CFINTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+/**
+ * CollationFinnishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _CFINCOLLTST
+#define _CFINCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+
+#define MAX_TOKEN_LEN 16
+
+
+ /* perform test with strength SECONDARY*/
+static void TestPrimary(void);
+
+ /* perform test with strength TERTIARY */
+ static void TestTertiary(void);
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.c
new file mode 100644
index 00000000000..cbbcf1ff54a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.c
@@ -0,0 +1,78 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CFORMTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+
+/* FormatTest is a medium top level test for everything in the C FORMAT API */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+#include "cformtst.h"
+
+void addCalTest(TestNode**);
+void addDateForTest(TestNode**);
+void addDateTimePatternGeneratorTest(TestNode** root);
+void addNumForTest(TestNode**);
+void addMsgForTest(TestNode**);
+void addDateForRgrTest(TestNode**);
+void addNumFrDepTest(TestNode**);
+void addDtFrDepTest(TestNode**);
+void addUtmsTest(TestNode**);
+void addCurrencyTest(TestNode**);
+
+void addFormatTest(TestNode** root);
+
+void addFormatTest(TestNode** root)
+{
+ addCalTest(root);
+ addDateForTest(root);
+ addDateTimePatternGeneratorTest(root);
+ addNumForTest(root);
+ addNumFrDepTest(root);
+ addMsgForTest(root);
+ addDateForRgrTest(root);
+ addDtFrDepTest(root);
+ addUtmsTest(root);
+ addCurrencyTest(root);
+}
+/*Internal functions used*/
+
+UChar* myDateFormat(UDateFormat* dat, UDate d1)
+{
+ UChar *result1=NULL;
+ int32_t resultlength, resultlengthneeded;
+ UErrorCode status = U_ZERO_ERROR;
+
+
+ resultlength=0;
+ resultlengthneeded=udat_format(dat, d1, NULL, resultlength, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result1=(UChar*)ctst_malloc(sizeof(UChar) * resultlength);
+ udat_format(dat, d1, result1, resultlength, NULL, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using udat_format(.....): %s\n", myErrorName(status));
+ return 0;
+ }
+ return result1;
+
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.h
new file mode 100644
index 00000000000..e5c0e44ccea
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cformtst.h
@@ -0,0 +1,33 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CFORMTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* FormatTest is a medium top level test for everything in the C FORMAT API */
+
+#ifndef _CFORMATTST
+#define _CFORMATTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+#include "unicode/udat.h"
+
+
+/* Internal fucntion used by all the test format files */
+UChar* myDateFormat(UDateFormat *dat, UDate d);
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.c
new file mode 100644
index 00000000000..63a01284f85
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.c
@@ -0,0 +1,335 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CFRTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************/
+/**
+ * CollationFrenchTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "cfrtst.h"
+#include "unicode/ustring.h"
+#include "string.h"
+
+static UCollator *myCollation;
+const static UChar testSourceCases[][MAX_TOKEN_LEN] =
+{
+ {0x0061/*'a'*/, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0043/*'C'*/, 0x004f/*'O'*/, 0x0054/*'T'*/, 0x0045/*'E'*/, 0x0000},
+ {0x0063/*'c'*/, 0x006f/*'o'*/, 0x002d/*'-'*/, 0x006f/*'o'*/, 0x0070/*'p'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0048/*'H'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x006f/*'o'*/, 0x0000},
+ {0x01f1, 0x0000},
+ {0xfb00, 0x0000},
+ {0x01fa, 0x0000},
+ {0x0101, 0x0000}
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] =
+{
+ {0x0041/*'A'*/, 0x0042/*'B'*/, 0x0043/*'C'*/, 0x0000},
+ {0x0063/*'c'*/, 0x00f4, 0x0074/*'t'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0043/*'C'*/, 0x004f/*'O'*/, 0x004f/*'O'*/, 0x0050/*'P'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x00E9, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x00E9, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0068/*'h'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x004f/*'O'*/, 0x0000},
+ {0x01ee, 0x0000},
+ {0x25ca, 0x0000},
+ {0x00e0, 0x0000},
+ {0x01df, 0x0000}
+};
+
+const static UCollationResult results[] =
+{
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS, /*UCOL_GREATER,*/
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_LESS, /*UCOL_GREATER,*/
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_LESS
+};
+
+/* 0x0300 is grave, 0x0301 is acute*/
+/* the order of elements in this array must be different than the order in CollationEnglishTest*/
+const static UChar testAcute[][MAX_TOKEN_LEN] =
+{
+/*00*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0000},
+/*01*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0000},
+/*02*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0000},
+/*03*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0000},
+/*04*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0000},
+/*05*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*06*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*07*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*08*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*09*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*0a*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0b*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0c*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0d*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0e*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0f*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*10*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*11*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*12*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*13*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*14*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*15*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*16*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*17*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*18*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000}
+};
+
+const static UChar testBugs[][MAX_TOKEN_LEN] =
+{
+ {0x0061/*'a'*/, 0x000},
+ {0x0041/*'A'*/, 0x000},
+ {0x0065/*'e'*/, 0x000},
+ {0x0045/*'E'*/, 0x000},
+ {0x00e9, 0x000},
+ {0x00e8, 0x000},
+ {0x00ea, 0x000},
+ {0x00eb, 0x000},
+ {0x0065/*'e'*/, 0x0061/*'a'*/, 0x000},
+ {0x0078/*'x'*/, 0x000}
+};
+
+
+static void TestGetSortKey(void);
+
+
+void addFrenchCollTest(TestNode** root)
+{
+ addTest(root, &TestSecondary, "tscoll/cfrtst/TestSecondary");
+ addTest(root, &TestTertiary, "tscoll/cfrtst/TestTertiary");
+ addTest(root, &TestExtra, "tscoll/cfrtst/TestExtra");
+ addTest(root, &TestGetSortKey, "tscoll/cfrtst/TestGetSortKey");
+}
+
+
+static void TestTertiary( )
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("fr_FR", &status);
+ if(U_FAILURE(status) || !myCollation){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+
+ ucol_setAttribute(myCollation, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing French Collation with Tertiary strength\n");
+ ucol_setStrength(myCollation, UCOL_QUATERNARY);
+ for (i = 0; i < 12 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+static void TestSecondary()
+{
+ int32_t i,j, testAcuteSize;
+ UCollationResult expected=UCOL_EQUAL;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("fr_FR", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ ucol_setAttribute(myCollation, UCOL_STRENGTH, UCOL_SECONDARY, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing French Collation with Secondary strength\n");
+ /*test acute and grave ordering (compare to french collation)*/
+ testAcuteSize = sizeof(testAcute) / sizeof(testAcute[0]);
+ for (i = 0; i < testAcuteSize; i++)
+ {
+ for (j = 0; j < testAcuteSize; j++)
+ {
+ if (i < j) expected = UCOL_LESS;
+ if (i == j) expected = UCOL_EQUAL;
+ if (i > j) expected = UCOL_GREATER;
+ doTest(myCollation, testAcute[i], testAcute[j], expected );
+ }
+ }
+ ucol_close(myCollation);
+}
+
+static void TestExtra()
+{
+ int32_t i, j;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("fr_FR", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing French Collation extra with secondary strength\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 9 ; i++)
+ {
+ for (j = i + 1; j < 10; j += 1)
+ {
+ doTest(myCollation, testBugs[i], testBugs[j], UCOL_LESS);
+ }
+ }
+ ucol_close(myCollation);
+}
+
+static void TestGetSortKey() {
+ /* This is meant to test a buffer reallocation crash while using
+ French secondary sorting with a large buffer.
+ The fact that Japanese characters are used is irrelevant. */
+ static const UChar pucUTF16[] = {
+ 0x3049,0x30b9,0x3088,0xfffd,0xfffd,0x308f,0xfffd,0x3042,
+ 0xfffd,0xfffd,0x305e,0xfffd,0x30b6,0x30bb,0x305b,0x30b1,
+ 0x3050,0x30af,0x304e,0x30bd,0xfffd,0x30c6,0xfffd,0xfffd,
+ 0x30e1,0xfffd,0xfffd,0x30d9,0xfffd,0x3092,0x3075,0x304a,
+ 0x3074,0x3070,0x30f5,0x30c4,0x306e,0x30df,0x3053,0xfffd,
+ 0x30a6,0x30b6,0x30e0,0xfffd,0x30bc,0x30ef,0x3087,0x30cc,
+ 0x305f,0x30de,0xfffd,0x3090,0x3063,0x30dc,0x30b6,0x30b9,
+ 0x30d2,0x3072,0x3061,0xfffd,0xfffd,0xfffd,0x307b,0x3092,
+ 0x30a5,0x30a9,0x30b1,0x30e7,0xfffd,0xfffd,0xfffd,0xfffd,
+ 0xfffd,0x305e,0xfffd,0x30c7,0x30ae,0x305b,0x308b,0x30c0,
+ 0x30f5,0xfffd,0xfffd,0xfffd,0x307d,0x304e,0xfffd,0xfffd,
+ 0x30c0,0x30c8,0x306f,0x307a,0x30dd,0x30e4,0x3084,0xfffd,
+ 0x308c,0x30f1,0xfffd,0x30c6,0xfffd,0x307a,0xfffd,0x3052,
+ 0x3056,0x305d,0x30b7,0xfffd,0x305b,0x30b0,0x30b9,0xfffd,
+ 0x30b2,0x306d,0x3044,0xfffd,0x3073,0xfffd,0x30be,0x30cf,
+ 0x3080,0xfffd,0x30a8,0x30f5,0x30a5,0x30c7,0x307c,0xfffd,
+ 0x30d1,0x305f,0x30b2,0xfffd,0x3053,0x30ca,0xfffd,0x30dd,
+ 0x3058,0x30c0,0x305d,0x30e1,0xfffd,0x30bb,0x305f,0x30d1,
+ 0x30f2,0x3058,0x3086,0x30ce,0x30db,0x30cb,0x30e9,0xfffd,
+ 0x308c,0xfffd,0xfffd,0x30af,0x30c4,0x3076,0x304c,0x30f5,
+ 0x30e8,0x308c,0xfffd,0x30e2,0x3073,0x30a3,0x304e,0x30ea,
+ 0xfffd,0x304f,0xfffd,0x306c,0x3044,0xfffd,0xfffd,0x30c9,
+ 0xfffd,0x30f5,0xfffd,0xfffd,0xfffd,0x30eb,0x30a8,0xfffd,
+ 0x306d,0x307d,0x30d8,0x3069,0xfffd,0xfffd,0x3086,0x30a9,
+ 0xfffd,0x3076,0x30e9,0x30cc,0x3074,0x30e0,0xfffd,0xfffd,
+ 0xfffd,0x30f0,0x3086,0x30ac,0x3076,0x3068,0x30c7,0xfffd,
+ 0x30b7,0x30d2,0x3048,0x308e,0x30e8,0x30d9,0x30ce,0x30d0,
+ 0x308b,0x30ee,0x30e6,0x3079,0x30f3,0x30af,0xfffd,0x3079,
+ 0xfffd,0xfffd,0x30ca,0x30bf,0xfffd,0x30b5,0xfffd,0xfffd,
+ 0x3093,0xfffd,0x30ba,0xfffd,0x3076,0x3047,0x304a,0xfffd,
+ 0xfffd,0x3086,0xfffd,0x3081,0xfffd,0x30f6,0x3066,0xfffd,
+ 0xfffd,0x30b6,0x30ef,0x30e2,0x30bf,0xfffd,0x3053,0x304a,
+ 0xfffd,0xfffd,0x304a,0x30e8,0xfffd,0x30e2,0xfffd,0xfffd,
+ 0x305c,0x3081,0x30c6,0xfffd,0x3091,0x3046,0x306a,0x3059,
+ 0xfffd,0xfffd,0x30dd,0x30d1,0x308a,0x30ee,0xfffd,0xfffd,
+ 0x308a,0x3042,0x30da,0xfffd,0x3064,0x30ef,0x305c,0x306b,
+ 0xfffd,0x30ca,0x3085,0x3067,0x30ea,0x30c2,0x30c8,0xfffd,
+ 0x30f5,0xfffd,0xfffd,0xfffd,0x30ca,0xfffd,0x3050,0x30f1,
+ 0x3050,0x3053,0x3072,0xfffd,0xfffd,0xfffd,0x3074,0xfffd,
+ 0x304b,0x30dd,0x306d,0xfffd,0x3049,0x30a1,0x30cc,0x30de,
+ 0x30ae,0x307b,0x308a,0xfffd,0x3065,0xfffd,0xfffd,0x30c0,
+ 0xfffd,0x3048,0x30dc,0x304f,0x3085,0x3059,0x304b,0x30d3,
+ 0x30eb,0x30a4,0x3073,0xfffd,0x30ba,0x308f,0x30a7,0x30c3,
+ 0x3074,0x30cf,0x306c,0x3053,0x30c0,0xfffd,0x3066,0xfffd,
+ 0x308f,0xfffd,0x30b5,0xfffd,0x3092,0x30c4,0xfffd,0x30d6,
+ 0x3056,0x30ad,0x30d2,0x30ba,0xfffd,0x30e6,0x304c,0x3088,
+ 0x30b6,0x3048,0x3077,0x30d1,0xfffd,0x3050,0xfffd,0x3042,
+ 0xfffd,0xfffd,0x308f,0xfffd,0x30c1,0xfffd,0x3074,0x3061,
+ 0x3056,0x30e5,0xfffd,0xfffd,0x3057,0xfffd,0xfffd,0xfffd,
+ 0xfffd,0x30bd,0x30b3,0x30ee,0xfffd,0x30f2,0x3084,0x3050,
+ 0xfffd,0x30e7,0xfffd,0xfffd,0x3060,0x3049,0x30f2,0x30ad,
+ 0x30bf,0x30f1,0x30a2,0xfffd,0x30af,0xfffd,0x3060,0x30a1,
+ 0x30e9,0x30c3,0xfffd,0x3072,0x3093,0x3070,0xfffd,0x308f,
+ 0x3060,0xfffd,0x3067,0x306f,0x3082,0x308b,0x3051,0xfffd,
+ 0x3058,0xfffd,0xfffd,0x30a8,0x3051,0x3054,0x30ad,0x30f0,
+ 0x3053,0xfffd,0x30e1,0x30d7,0x308d,0x307f,0x30be,0x30b0,
+ 0xfffd,0x30db,0xfffd,0x30d1,0xfffd,0x3054,0x30a5,0xfffd,
+ 0x306a,0xfffd,0x305c,0xfffd,0x3052,0x3088,0xfffd,0x306e,
+ 0xfffd,0x30a9,0x30a1,0x30b4,0x3083,0x30bd,0xfffd,0xfffd,
+ 0x306a,0x3070,0x30cd,0xfffd,0x3072,0x30ed,0x30c6,0x30be,
+ 0x30c4,0x305e,0x30b3,0x30e1,0x308a,0xfffd,0x305b,0xfffd,
+ 0x3042,0x3088,0xfffd,0x304c,0xfffd,0x3089,0x3071,0xfffd,
+ 0xfffd,0x30c6,0x3062,0x3079,0xfffd,0x304b,0x304a,0xfffd,
+ 0x30ad,0x3045,0x3045,0x3087,0xfffd,0x306a,0x308b,0x0000,
+ 0x30bd,0x3065,0x30b8,0x3086,0x30d3,0x3076,0xfffd,0xfffd,
+ 0x308f,0x3053,0x307c,0x3053,0x3084,0x30ae,0x30c4,0x3045,
+ 0x30a8,0x30d0,0x30e1,0x308c,0x30e6,0x30b7,0xfffd,0xfffd,
+ 0xfffd,0x3046,0x305f,0xfffd,0x3086,0x30ab,0xfffd,0xfffd,
+ 0x30c8,0xfffd,0x30a1,0x3052,0x3059,0xfffd,0x30a4,0xfffd,
+ 0xfffd,0x308c,0x3085,0x30ab,0x30b5,0x3091,0x30bf,0x30e3,
+ 0xfffd,0xfffd,0x3087,0xfffd,0x30f6,0x3051,0x30bd,0x3092,
+ 0x3063,0xfffd,0x30a9,0x3063,0x306e,0xfffd,0xfffd,0xfffd,
+ 0x306c,0xfffd,0x307e,0x30ad,0x3077,0x30c2,0x30e9,0x30d5,
+ 0xfffd,0xfffd,0x30c6,0x305c,0xfffd,0xfffd,0x3089,0xfffd,
+ 0x3048,0x30cb,0x308c,0xfffd,0xfffd,0x3044,0xfffd,0x3080,
+ 0x3063,0x3079,0xfffd,0x308a,0x30cb,0x3042,0x3057,0xfffd,
+ 0x307c,0x30c1,0x30a8,0x30cf,0xfffd,0x3083,0xfffd,0xfffd,
+ 0x306c,0xfffd,0x305e,0x3092,0xfffd,0x30dc,0x30b0,0x3081,
+ 0x30e3,0x30f0,0x304e,0x30cc,0x308e,0x30c4,0x30ad
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *pCollator;
+ int32_t lenActualSortKey;
+ uint8_t pucSortKey[4096];
+ static const int32_t LENSORTKEY = (int32_t)sizeof(pucSortKey);
+
+ ucol_prepareShortStringOpen("LFR_AN_CX_EX_FO_HX_NX_S3", 0, NULL, &status);
+
+ pCollator = ucol_openFromShortString("LFR_AN_CX_EX_FO_HX_NX_S3", 0, NULL, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("error opening collator\n");
+ return;
+ }
+
+ lenActualSortKey = ucol_getSortKey(pCollator,
+ (const UChar *)pucUTF16,
+ sizeof(pucUTF16) / sizeof(pucUTF16[0]),
+ pucSortKey,
+ LENSORTKEY);
+
+ if (lenActualSortKey > LENSORTKEY) {
+ log_err("sort key too big for original buffer. Got: %d Expected: %d\n", lenActualSortKey, LENSORTKEY);
+ return;
+ }
+ /* If the test didn't crash, then the test succeeded. */
+ ucol_close(pCollator);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.h
new file mode 100644
index 00000000000..1fe136a3f88
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cfrtst.h
@@ -0,0 +1,44 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CFRTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+/**
+ * CollationFrenchTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _CFRCOLLTST
+#define _CFRCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+#define MAX_TOKEN_LEN 16
+
+ /* performs Extra tests*/
+ static void TestExtra(void);
+
+ /* perform test with strength SECONDARY*/
+ static void TestSecondary(void);
+
+ /*perform test with strength TERTIARY*/
+static void TestTertiary(void);
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.c
new file mode 100644
index 00000000000..a493450ee6c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.c
@@ -0,0 +1,310 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CG7COLL.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************/
+/**
+ * G7CollationTest is a third level test class. This test performs the examples
+ * mentioned on the IBM Java international demos web site.
+ * Sample Rules: & Z < p , P
+ * Effect : Making P sort after Z.
+ *
+ * Sample Rules: & c < ch , cH, Ch, CH
+ * Effect : As well as adding sequences of characters that act as a single character (this is
+ * known as contraction), you can also add characters that act like a sequence of
+ * characters (this is known as expansion).
+ *
+ * Sample Rules: & Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'
+ * Effect : Expansion and contraction can actually be combined.
+ *
+ * Sample Rules: & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-'
+ * Effect : sorted sequence as the following,
+ * aardvark
+ * a-rdvark
+ * abbot
+ * coop
+ * co-p
+ * cop
+ */
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "cg7coll.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "unicode/ustring.h"
+
+
+const char* locales[8] = {
+ "en_US",
+ "en_GB",
+ "en_CA",
+ "fr_FR",
+ "fr_CA",
+ "de_DE",
+ "it_IT",
+ "ja_JP"
+};
+
+
+
+const static UChar testCases[][MAX_TOKEN_LEN] = {
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0073 /*'s'*/, 0x0000}, /* 9 */
+ { 0x0050 /*'P'*/, 0x0061 /*'a'*/, 0x0074/*'t'*/, 0x0000}, /* 1 */
+ { 0x0070 /*'p'*/, 0x00E9, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x00E9, 0x0000}, /* 2 */
+ { 0x0070 /*'p'*/, 0x00EA, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0065 /*'e'*/, 0x0000}, /* 3 */
+ { 0x0070 /*'p'*/, 0x00E9, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0065 /*'e'*/, 0x0072 /*'r'*/, 0x0000}, /* 4 */
+ { 0x0070 /*'p'*/, 0x00EA, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0065 /*'e'*/, 0x0072 /*'r'*/, 0x0000}, /* 5 */
+ { 0x0054 /*'T'*/, 0x006f /*'o'*/, 0x0064 /*'d'*/, 0x0000}, /* 6 */
+ { 0x0054 /*'T'*/, 0x00F6, 0x006e /*'n'*/, 0x0065 /*'e'*/, 0x0000}, /* 7 */
+ { 0x0054 /*'T'*/, 0x006f /*'o'*/, 0x0066 /*'f'*/, 0x0075 /*'u'*/, 0x0000}, /* 8 */
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0000}, /* 12 */
+ { 0x0054 /*'T'*/, 0x006f /*'o'*/, 0x006e /*'n'*/, 0x0000}, /* 10 */
+ { 0x0050 /*'P'*/, 0x0041 /*'A'*/, 0x0054 /*'T'*/, 0x0000}, /* 11 */
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x002d /*'-'*/, 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0000}, /* 13 */
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x002d /*'-'*/, 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0073/*'s'*/, 0x0000}, /* 0 */
+ {0x0070 /*'p'*/, 0x0061 /*'a'*/, 0x0074 /*'t'*/, 0x0000}, /* 14 */
+ /* Additional tests */
+ { 0x0063 /*'c'*/, 0x007a /*'z'*/, 0x0061 /*'a'*/, 0x0072 /*'r'*/, 0x0000 }, /* 15 */
+ { 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0075 /*'u'*/, 0x0072 /*'r'*/, 0x006f /*'o'*/, 0x0000 }, /* 16 */
+ { 0x0063 /*'c'*/, 0x0061 /*'a'*/, 0x0074 /*'t'*/, 0x000 }, /* 17 */
+ { 0x0064 /*'d'*/, 0x0061 /*'a'*/, 0x0072 /*'r'*/, 0x006e /*'n'*/, 0x0000 }, /* 18 */
+ { 0x003f /*'?'*/, 0x0000 }, /* 19 */
+ { 0x0071 /*'q'*/, 0x0075 /*'u'*/, 0x0069 /*'i'*/, 0x0063 /*'c'*/, 0x006b /*'k'*/, 0x0000 }, /* 20 */
+ { 0x0023 /*'#'*/, 0x0000 }, /* 21 */
+ { 0x0026 /*'&'*/, 0x0000 }, /* 22 */
+ { 0x0061 /*'a'*/, 0x002d /*'-'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0076 /*'v'*/, 0x0061 /*'a'*/,
+ 0x0072/*'r'*/, 0x006b/*'k'*/, 0x0000}, /* 24 */
+ { 0x0061 /*'a'*/, 0x0061 /*'a'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0076 /*'v'*/, 0x0061 /*'a'*/,
+ 0x0072/*'r'*/, 0x006b/*'k'*/, 0x0000}, /* 23 */
+ { 0x0061 /*'a'*/, 0x0062 /*'b'*/, 0x0062 /*'b'*/, 0x006f /*'o'*/, 0x0074 /*'t'*/, 0x0000}, /* 25 */
+ { 0x0063 /*'c'*/, 0x006f /*'o'*/, 0x002d /*'-'*/, 0x0070 /*'p'*/, 0x0000}, /* 27 */
+ { 0x0063 /*'c'*/, 0x006f /*'o'*/, 0x0070 /*'p'*/, 0x0000}, /* 28 */
+ { 0x0063 /*'c'*/, 0x006f /*'o'*/, 0x006f /*'o'*/, 0x0070 /*'p'*/, 0x0000}, /* 26 */
+ { 0x007a /*'z'*/, 0x0065 /*'e'*/, 0x0062 /*'b'*/, 0x0072 /*'r'*/, 0x0061 /*'a'*/, 0x0000} /* 29 */
+};
+
+const static int32_t results[TESTLOCALES][TOTALTESTSET] = {
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_US */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_GB */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_CA */
+ { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */
+ { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_CA */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* de_DE */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* it_IT */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* ja_JP */
+ /* new table collation with rules "& Z < p, P" loop to FIXEDTESTSET */
+ { 12, 13, 9, 0, 6, 8, 10, 7, 14, 1, 11, 2, 3, 4, 5, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 },
+ /* new table collation with rules "& C < ch , cH, Ch, CH " loop to TOTALTESTSET */
+ { 19, 22, 21, 23, 24, 25, 12, 13, 9, 0, 17, 26, 28, 27, 15, 16, 18, 14, 1, 11, 2, 3, 4, 5, 20, 6, 8, 10, 7, 29 },
+ /* new table collation with rules "& Question-mark ; ? & Hash-mark ; # & Ampersand ; '&' " loop to TOTALTESTSET */
+ { 23, 24, 25, 22, 12, 13, 9, 0, 17, 16, 26, 28, 27, 15, 18, 21, 14, 1, 11, 2, 3, 4, 5, 19, 20, 6, 8, 10, 7, 29 },
+ /* analogous to Japanese rules " & aa ; a- & ee ; e- & ii ; i- & oo ; o- & uu ; u- " */ /* loop to TOTALTESTSET */
+ { 19, 22, 21, 24, 23, 25, 12, 13, 9, 0, 17, 16, 28, 26, 27, 15, 18, 14, 1, 11, 2, 3, 4, 5, 20, 6, 8, 10, 7, 29 }
+};
+
+void addRuleBasedCollTest(TestNode** root)
+{
+ addTest(root, &TestG7Locales, "tscoll/cg7coll/TestG7Locales");
+ addTest(root, &TestDemo1, "tscoll/cg7coll/TestDemo1");
+ addTest(root, &TestDemo2, "tscoll/cg7coll/TestDemo2");
+ addTest(root, &TestDemo3, "tscoll/cg7coll/TestDemo3");
+ addTest(root, &TestDemo4, "tscoll/cg7coll/TestDemo4");
+
+
+}
+
+static void TestG7Locales()
+{
+ UCollator *myCollation, *tblColl1;
+ UErrorCode status = U_ZERO_ERROR;
+ const UChar *defRules;
+ int32_t i, rlen, j, n;
+ log_verbose("Testing ucol_openRules for all the locales\n");
+ for (i = 0; i < 8; i++)
+ {
+ status = U_ZERO_ERROR;
+ myCollation = ucol_open(locales[i], &status);
+ ucol_setAttribute(myCollation, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
+ ucol_setAttribute(myCollation, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+
+ if (U_FAILURE(status))
+ {
+ log_err("Error in creating collator in %s: %s\n", locales[i], myErrorName(status));
+ continue;
+ }
+
+ defRules = ucol_getRules(myCollation, &rlen);
+ status = U_ZERO_ERROR;
+ tblColl1 = ucol_openRules(defRules, rlen, UCOL_OFF,
+ UCOL_DEFAULT_STRENGTH,NULL, &status);
+ if (U_FAILURE(status))
+ {
+
+ log_err("Error in creating collator in %s: %s\n", locales[i], myErrorName(status));
+ continue;
+ }
+
+
+ log_verbose("Locale %s\n", locales[i]);
+ log_verbose(" tests start...\n");
+
+ j = 0;
+ n = 0;
+ for (j = 0; j < FIXEDTESTSET; j++)
+ {
+ for (n = j+1; n < FIXEDTESTSET; n++)
+ {
+ doTest(tblColl1, testCases[results[i][j]], testCases[results[i][n]], UCOL_LESS);
+ }
+ }
+
+ ucol_close(myCollation);
+ ucol_close(tblColl1);
+ }
+}
+
+static void TestDemo1()
+{
+ UCollator *myCollation;
+ int32_t j, n;
+ const char *rules = "& Z < p, P";
+ int32_t len=(int32_t)strlen(rules);
+ UChar *temp = (UChar*)malloc(sizeof(UChar) * (len+1));
+ UErrorCode status = U_ZERO_ERROR;
+ u_uastrcpy(temp, rules);
+
+ log_verbose("Demo Test 1 : Create a new table collation with rules \" & Z < p, P \" \n");
+
+ myCollation = ucol_openRules(temp, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
+
+ if (U_FAILURE(status))
+ {
+ log_err( "Demo Test 1 Rule collation object creation failed. : %s\n", myErrorName(status));
+ return;
+ }
+
+ for (j = 0; j < FIXEDTESTSET; j++)
+ {
+ for (n = j+1; n < FIXEDTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[8][j]], testCases[results[8][n]], UCOL_LESS);
+ }
+ }
+
+ ucol_close(myCollation);
+ free(temp);
+}
+
+static void TestDemo2()
+{
+ UCollator *myCollation;
+ int32_t j, n;
+ const char *rules = "& C < ch , cH, Ch, CH";
+ int32_t len=(int32_t)strlen(rules);
+ UChar *temp = (UChar*)malloc(sizeof(UChar) * (len+1));
+ UErrorCode status = U_ZERO_ERROR;
+ u_uastrcpy(temp, rules);
+
+ log_verbose("Demo Test 2 : Create a new table collation with rules \"& C < ch , cH, Ch, CH\"");
+
+ myCollation = ucol_openRules(temp, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status);
+
+ if (U_FAILURE(status))
+ {
+ log_err( "Demo Test 2 Rule collation object creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ for (j = 0; j < TOTALTESTSET; j++)
+ {
+ for (n = j+1; n < TOTALTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[9][j]], testCases[results[9][n]], UCOL_LESS);
+ }
+ }
+ ucol_close(myCollation);
+ free(temp);
+}
+
+static void TestDemo3()
+{
+ UCollator *myCollation;
+ int32_t j, n;
+ const char *rules = "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'";
+ int32_t len=(int32_t)strlen(rules);
+ UChar *temp = (UChar*)malloc(sizeof(UChar) * (len+1));
+ UErrorCode status = U_ZERO_ERROR;
+ u_uastrcpy(temp, rules);
+
+ log_verbose("Demo Test 3 : Create a new table collation with rules \"& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'\" \n");
+
+ myCollation = ucol_openRules(temp, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status);
+
+ if (U_FAILURE(status))
+ {
+ log_err( "Demo Test 3 Rule collation object creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+
+ for (j = 0; j < TOTALTESTSET; j++)
+ {
+ for (n = j+1; n < TOTALTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[10][j]], testCases[results[10][n]], UCOL_LESS);
+ }
+ }
+ ucol_close(myCollation);
+ free(temp);
+}
+
+static void TestDemo4()
+{
+ UCollator *myCollation;
+ int32_t j, n;
+ const char *rules = " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' ";
+ int32_t len=(int32_t)strlen(rules);
+ UChar *temp = (UChar*)malloc(sizeof(UChar) * (len+1));
+ UErrorCode status = U_ZERO_ERROR;
+ u_uastrcpy(temp, rules);
+
+ log_verbose("Demo Test 4 : Create a new table collation with rules \" & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' \"\n");
+
+ myCollation = ucol_openRules(temp, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status);
+
+ if (U_FAILURE(status))
+ {
+ log_err( "Demo Test 4 Rule collation object creation failed.: %s\n", myErrorName(status));
+ return;
+ }
+ for (j = 0; j < TOTALTESTSET; j++)
+ {
+ for (n = j+1; n < TOTALTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[11][j]], testCases[results[11][n]], UCOL_LESS);
+ }
+ }
+ ucol_close(myCollation);
+ free(temp);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.h
new file mode 100644
index 00000000000..d45461cdb12
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cg7coll.h
@@ -0,0 +1,71 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CG7COLL.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+/**
+ * G7CollationTest is a third level test class. This test performs the examples
+ * mentioned on the IBM Java international demos web site.
+ * Sample Rules: & Z < p , P
+ * Effect : Making P sort after Z.
+ *
+ * Sample Rules: & c < ch , cH, Ch, CH
+ * Effect : As well as adding sequences of characters that act as a single character (this is
+ * known as contraction), you can also add characters that act like a sequence of
+ * characters (this is known as expansion).
+ *
+ * Sample Rules: & Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'
+ * Effect : Expansion and contraction can actually be combined.
+ *
+ * Sample Rules: & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-'
+ * Effect : sorted sequence as the following,
+ * aardvark
+ * a-rdvark
+ * abbot
+ * coop
+ * co-p
+ * cop
+ */
+
+#ifndef _CG7COLLTST
+#define _CG7COLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+#define MAX_TOKEN_LEN 16
+#define TESTLOCALES 12
+#define FIXEDTESTSET 15
+#define TOTALTESTSET 30
+
+ /* perform test for G7 locales */
+ static void TestG7Locales(void);
+
+ /* perform test with added rules " & Z < p, P" */
+ static void TestDemo1(void);
+
+ /* perorm test with added rules "& C < ch , cH, Ch, CH" */
+ static void TestDemo2(void);
+
+ /* perform test with added rules */
+ /* "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'" */
+ static void TestDemo3(void);
+
+ /* perform test with added rules */
+ /* " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' " */
+ static void TestDemo4(void);
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/chashtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/chashtst.c
new file mode 100644
index 00000000000..c70ae2bca5d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/chashtst.c
@@ -0,0 +1,384 @@
+/*
+*******************************************************************************
+* Copyright (C) 2000-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+*******************************************************************************
+* Date Name Description
+* 03/22/00 aliu Creation.
+* 07/13/00 Madhu Added more tests
+*******************************************************************************
+*/
+
+#include "cintltst.h"
+#include "uhash.h"
+#include "unicode/ctest.h"
+#include "unicode/ustring.h"
+#include "cstring.h"
+
+/**********************************************************************
+ * Prototypes
+ *********************************************************************/
+
+static void TestBasic(void);
+static void TestOtherAPI(void);
+static void hashIChars(void);
+
+static int32_t U_EXPORT2 U_CALLCONV hashChars(const UHashTok key);
+
+static UBool U_EXPORT2 U_CALLCONV isEqualChars(const UHashTok key1, const UHashTok key2);
+
+static void _put(UHashtable* hash,
+ const char* key,
+ int32_t value,
+ int32_t expectedOldValue);
+
+static void _get(UHashtable* hash,
+ const char* key,
+ int32_t expectedValue);
+
+static void _remove(UHashtable* hash,
+ const char* key,
+ int32_t expectedValue);
+
+void addHashtableTest(TestNode** root);
+
+/**********************************************************************
+ * UHashTok wrapper functions
+ *********************************************************************/
+
+static UBool
+_compareChars(void* a, void* b) {
+ UHashTok s, t;
+ s.pointer = a;
+ t.pointer = b;
+ return uhash_compareChars(s, t);
+}
+
+static UBool
+_compareIChars(void* a, void* b) {
+ UHashTok s, t;
+ s.pointer = a;
+ t.pointer = b;
+ return uhash_compareIChars(s, t);
+}
+
+static UBool
+_compareUChars(void* a, void* b) {
+ UHashTok s, t;
+ s.pointer = a;
+ t.pointer = b;
+ return uhash_compareUChars(s, t);
+}
+
+static UBool
+_compareLong(int32_t a, int32_t b) {
+ UHashTok s, t;
+ s.integer = a;
+ t.integer = b;
+ return uhash_compareLong(s, t);
+}
+
+/**********************************************************************
+ * FW Registration
+ *********************************************************************/
+
+void addHashtableTest(TestNode** root) {
+
+ addTest(root, &TestBasic, "tsutil/chashtst/TestBasic");
+ addTest(root, &TestOtherAPI, "tsutil/chashtst/TestOtherAPI");
+ addTest(root, &hashIChars, "tsutil/chashtst/hashIChars");
+
+}
+
+/**********************************************************************
+ * Test Functions
+ *********************************************************************/
+
+static void TestBasic(void) {
+ static const char one[4] = {0x6F, 0x6E, 0x65, 0}; /* "one" */
+ static const char one2[4] = {0x6F, 0x6E, 0x65, 0}; /* Get around compiler optimizations */
+ static const char two[4] = {0x74, 0x77, 0x6F, 0}; /* "two" */
+ static const char three[6] = {0x74, 0x68, 0x72, 0x65, 0x65, 0}; /* "three" */
+ static const char omega[6] = {0x6F, 0x6D, 0x65, 0x67, 0x61, 0}; /* "omega" */
+ UErrorCode status = U_ZERO_ERROR;
+ UHashtable *hash;
+
+ hash = uhash_open(hashChars, isEqualChars, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n",
+ u_errorName(status), hash);
+ return;
+ }
+ if (hash == NULL) {
+ log_err("FAIL: uhash_open returned NULL\n");
+ return;
+ }
+ log_verbose("Ok: uhash_open returned 0x%08X\n", hash);
+
+ _put(hash, one, 1, 0);
+ _put(hash, omega, 24, 0);
+ _put(hash, two, 2, 0);
+ _put(hash, three, 3, 0);
+ _put(hash, one, -1, 1);
+ _put(hash, two, -2, 2);
+ _put(hash, omega, 48, 24);
+ _put(hash, one, 100, -1);
+ _get(hash, three, 3);
+ _remove(hash, two, -2);
+ _get(hash, two, 0);
+ _get(hash, one, 100);
+ _put(hash, two, 200, 0);
+ _get(hash, omega, 48);
+ _get(hash, two, 200);
+
+ if(_compareChars((void*)one, (void*)three) == TRUE ||
+ _compareChars((void*)one, (void*)one2) != TRUE ||
+ _compareChars((void*)one, (void*)one) != TRUE ||
+ _compareChars((void*)one, NULL) == TRUE ) {
+ log_err("FAIL: compareChars failed\n");
+ }
+ if(_compareIChars((void*)one, (void*)three) == TRUE ||
+ _compareIChars((void*)one, (void*)one) != TRUE ||
+ _compareIChars((void*)one, (void*)one2) != TRUE ||
+ _compareIChars((void*)one, NULL) == TRUE ) {
+ log_err("FAIL: compareIChars failed\n");
+ }
+
+ uhash_close(hash);
+
+}
+
+static void TestOtherAPI(void){
+
+ UErrorCode status = U_ZERO_ERROR;
+ UHashtable *hash;
+
+ /* Use the correct type when cast to void * */
+ static const UChar one[4] = {0x006F, 0x006E, 0x0065, 0}; /* L"one" */
+ static const UChar one2[4] = {0x006F, 0x006E, 0x0065, 0}; /* Get around compiler optimizations */
+ static const UChar two[4] = {0x0074, 0x0077, 0x006F, 0}; /* L"two" */
+ static const UChar two2[4] = {0x0074, 0x0077, 0x006F, 0}; /* L"two" */
+ static const UChar three[6] = {0x0074, 0x0068, 0x0072, 0x0065, 0x0065, 0}; /* L"three" */
+ static const UChar four[6] = {0x0066, 0x006F, 0x0075, 0x0072, 0}; /* L"four" */
+ static const UChar five[6] = {0x0066, 0x0069, 0x0076, 0x0065, 0}; /* L"five" */
+ static const UChar five2[6] = {0x0066, 0x0069, 0x0076, 0x0065, 0}; /* L"five" */
+
+ hash = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n",
+ u_errorName(status), hash);
+ return;
+ }
+ if (hash == NULL) {
+ log_err("FAIL: uhash_open returned NULL\n");
+ return;
+ }
+ log_verbose("Ok: uhash_open returned 0x%08X\n", hash);
+
+ uhash_puti(hash, (void*)one, 1, &status);
+ if(uhash_count(hash) != 1){
+ log_err("FAIL: uhas_count() failed. Expected: 1, Got: %d\n", uhash_count(hash));
+ }
+ if(uhash_find(hash, (void*)two) != NULL){
+ log_err("FAIL: uhash_find failed\n");
+ }
+ uhash_puti(hash, (void*)two, 2, &status);
+ uhash_puti(hash, (void*)three, 3, &status);
+ uhash_puti(hash, (void*)four, 4, &status);
+ uhash_puti(hash, (void*)five, 5, &status);
+
+ if(uhash_count(hash) != 5){
+ log_err("FAIL: uhas_count() failed. Expected: 5, Got: %d\n", uhash_count(hash));
+ }
+
+ if(uhash_geti(hash, (void*)two2) != 2){
+ log_err("FAIL: uhash_geti failed\n");
+ }
+
+ if(uhash_find(hash, (void*)two2) == NULL){
+ log_err("FAIL: uhash_find of \"two\" failed\n");
+ }
+
+ if(uhash_removei(hash, (void*)five2) != 5){
+ log_err("FAIL: uhash_remove() failed\n");
+ }
+ if(uhash_count(hash) != 4){
+ log_err("FAIL: uhas_count() failed. Expected: 4, Got: %d\n", uhash_count(hash));
+ }
+
+ uhash_put(hash, (void*)one, NULL, &status);
+ if(uhash_count(hash) != 3){
+ log_err("FAIL: uhash_put() with value=NULL didn't remove the key value pair\n");
+ }
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ uhash_puti(hash, (void*)one, 1, &status);
+ if(uhash_count(hash) != 3){
+ log_err("FAIL: uhash_put() with value!=NULL should fail when status != U_ZERO_ERROR \n");
+ }
+
+ status=U_ZERO_ERROR;
+ uhash_puti(hash, (void*)one, 1, &status);
+ if(uhash_count(hash) != 4){
+ log_err("FAIL: uhash_put() with value!=NULL didn't replace the key value pair\n");
+ }
+
+ if(_compareUChars((void*)one, (void*)two) == TRUE ||
+ _compareUChars((void*)one, (void*)one) != TRUE ||
+ _compareUChars((void*)one, (void*)one2) != TRUE ||
+ _compareUChars((void*)one, NULL) == TRUE ) {
+ log_err("FAIL: compareUChars failed\n");
+ }
+
+ uhash_removeAll(hash);
+ if(uhash_count(hash) != 0){
+ log_err("FAIL: uhas_count() failed. Expected: 0, Got: %d\n", uhash_count(hash));
+ }
+
+ uhash_setKeyComparator(hash, uhash_compareLong);
+ uhash_setKeyHasher(hash, uhash_hashLong);
+ uhash_iputi(hash, 1001, 1, &status);
+ uhash_iputi(hash, 1002, 2, &status);
+ uhash_iputi(hash, 1003, 3, &status);
+ if(_compareLong(1001, 1002) == TRUE ||
+ _compareLong(1001, 1001) != TRUE ||
+ _compareLong(1001, 0) == TRUE ) {
+ log_err("FAIL: compareLong failed\n");
+ }
+ /*set the resize policy to just GROW and SHRINK*/
+ /*how to test this??*/
+ uhash_setResizePolicy(hash, U_GROW_AND_SHRINK);
+ uhash_iputi(hash, 1004, 4, &status);
+ uhash_iputi(hash, 1005, 5, &status);
+ uhash_iputi(hash, 1006, 6, &status);
+ if(uhash_count(hash) != 6){
+ log_err("FAIL: uhash_count() failed. Expected: 6, Got: %d\n", uhash_count(hash));
+ }
+ if(uhash_iremovei(hash, 1004) != 4){
+ log_err("FAIL: uhash_remove failed\n");
+ }
+ if(uhash_iremovei(hash, 1004) != 0){
+ log_err("FAIL: uhash_remove failed\n");
+ }
+
+ uhash_removeAll(hash);
+ uhash_iput(hash, 2004, (void*)one, &status);
+ uhash_iput(hash, 2005, (void*)two, &status);
+ if(uhash_count(hash) != 2){
+ log_err("FAIL: uhash_count() failed. Expected: 2, Got: %d\n", uhash_count(hash));
+ }
+ if(uhash_iremove(hash, 2004) != (void*)one){
+ log_err("FAIL: uhash_remove failed\n");
+ }
+ if(uhash_iremove(hash, 2004) != NULL){
+ log_err("FAIL: uhash_remove failed\n");
+ }
+ if(uhash_count(hash) != 1){
+ log_err("FAIL: uhash_count() failed. Expected: 1, Got: %d\n", uhash_count(hash));
+ }
+
+ uhash_close(hash);
+
+}
+
+static void hashIChars(void) {
+ static const char which[] = "which";
+ static const char WHICH2[] = "WHICH";
+ static const char where[] = "where";
+ UErrorCode status = U_ZERO_ERROR;
+ UHashtable *hash;
+
+ hash = uhash_open(uhash_hashIChars, uhash_compareIChars, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n",
+ u_errorName(status), hash);
+ return;
+ }
+ if (hash == NULL) {
+ log_err("FAIL: uhash_open returned NULL\n");
+ return;
+ }
+ log_verbose("Ok: uhash_open returned 0x%08X\n", hash);
+
+ _put(hash, which, 1, 0);
+ _put(hash, WHICH2, 2, 1);
+ _put(hash, where, 3, 0);
+ if(uhash_count(hash) != 2){
+ log_err("FAIL: uhas_count() failed. Expected: 1, Got: %d\n", uhash_count(hash));
+ }
+ _remove(hash, which, 2);
+
+ uhash_close(hash);
+}
+
+
+/**********************************************************************
+ * uhash Callbacks
+ *********************************************************************/
+
+/**
+ * This hash function is designed to collide a lot to test key equality
+ * resolution. It only uses the first char.
+ */
+static int32_t U_EXPORT2 U_CALLCONV hashChars(const UHashTok key) {
+ return *(const char*) key.pointer;
+}
+
+static UBool U_EXPORT2 U_CALLCONV isEqualChars(const UHashTok key1, const UHashTok key2) {
+ return (UBool)((key1.pointer != NULL) &&
+ (key2.pointer != NULL) &&
+ (uprv_strcmp((const char*)key1.pointer, (const char*)key2.pointer) == 0));
+}
+
+/**********************************************************************
+ * Wrapper Functions
+ *********************************************************************/
+
+static void _put(UHashtable* hash,
+ const char* key,
+ int32_t value,
+ int32_t expectedOldValue) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t oldValue =
+ uhash_puti(hash, (void*) key, value, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uhash_put(%s) failed with %s and returned %ld\n",
+ key, u_errorName(status), oldValue);
+ } else if (oldValue != expectedOldValue) {
+ log_err("FAIL: uhash_put(%s) returned old value %ld; expected %ld\n",
+ key, oldValue, expectedOldValue);
+ } else {
+ log_verbose("Ok: uhash_put(%s, %d) returned old value %ld\n",
+ key, value, oldValue);
+ }
+}
+
+static void _get(UHashtable* hash,
+ const char* key,
+ int32_t expectedValue) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t value = uhash_geti(hash, key);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uhash_get(%s) failed with %s and returned %ld\n",
+ key, u_errorName(status), value);
+ } else if (value != expectedValue) {
+ log_err("FAIL: uhash_get(%s) returned %ld; expected %ld\n",
+ key, value, expectedValue);
+ } else {
+ log_verbose("Ok: uhash_get(%s) returned value %ld\n",
+ key, value);
+ }
+}
+
+static void _remove(UHashtable* hash,
+ const char* key,
+ int32_t expectedValue) {
+ int32_t value = uhash_removei(hash, key);
+ if (value != expectedValue) {
+ log_err("FAIL: uhash_remove(%s) returned %ld; expected %ld\n",
+ key, value, expectedValue);
+ } else {
+ log_verbose("Ok: uhash_remove(%s) returned old value %ld\n",
+ key, value);
+ }
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.c
new file mode 100644
index 00000000000..03efad93248
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.c
@@ -0,0 +1,725 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CINTLTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+
+/*The main root for C API tests*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "unicode/utypes.h"
+#include "unicode/putil.h"
+#include "cstring.h"
+#include "cintltst.h"
+#include "umutex.h"
+#include "uassert.h"
+#include "cmemory.h"
+#include "unicode/uchar.h"
+#include "unicode/ustring.h"
+#include "unicode/ucnv.h"
+#include "unicode/ures.h"
+#include "unicode/uclean.h"
+#include "unicode/ucal.h"
+#include "uoptions.h"
+#include "putilimp.h" /* for uprv_getUTCtime() */
+
+#ifdef XP_MAC_CONSOLE
+# include <console.h>
+#endif
+
+#define CTST_LEAK_CHECK 1
+#ifdef CTST_LEAK_CHECK
+U_CFUNC void ctst_freeAll(void);
+#endif
+
+static char* _testDataPath=NULL;
+
+/*
+ * Forward Declarations
+ */
+void ctest_setICU_DATA(void);
+
+
+
+#if UCONFIG_NO_LEGACY_CONVERSION
+# define TRY_CNV_1 "iso-8859-1"
+# define TRY_CNV_2 "ibm-1208"
+#else
+# define TRY_CNV_1 "iso-8859-7"
+# define TRY_CNV_2 "sjis"
+#endif
+
+
+/*
+ * Tracing functions.
+ */
+static int traceFnNestingDepth = 0;
+U_CDECL_BEGIN
+static void U_CALLCONV TraceEntry(const void *context, int32_t fnNumber) {
+ char buf[500];
+ utrace_format(buf, sizeof(buf), traceFnNestingDepth*3, "%s() enter.\n", utrace_functionName(fnNumber));
+ buf[sizeof(buf)-1]=0;
+ fputs(buf, stdout);
+ traceFnNestingDepth++;
+}
+
+static void U_CALLCONV TraceExit(const void *context, int32_t fnNumber, const char *fmt, va_list args) {
+ char buf[500];
+
+ if (traceFnNestingDepth>0) {
+ traceFnNestingDepth--;
+ }
+ utrace_format(buf, sizeof(buf), traceFnNestingDepth*3, "%s() ", utrace_functionName(fnNumber));
+ buf[sizeof(buf)-1]=0;
+ fputs(buf, stdout);
+ utrace_vformat(buf, sizeof(buf), traceFnNestingDepth*3, fmt, args);
+ buf[sizeof(buf)-1]=0;
+ fputs(buf, stdout);
+ putc('\n', stdout);
+}
+
+static void U_CALLCONV TraceData(const void *context, int32_t fnNumber,
+ int32_t level, const char *fmt, va_list args) {
+ char buf[500];
+ utrace_vformat(buf, sizeof(buf), traceFnNestingDepth*3, fmt, args);
+ buf[sizeof(buf)-1]=0;
+ fputs(buf, stdout);
+ putc('\n', stdout);
+}
+U_CDECL_END
+
+
+
+int main(int argc, const char* const argv[])
+{
+ int nerrors = 0;
+ int warnOnMissingData = 0;
+ int i, j;
+ UBool defaultDataFound;
+ TestNode *root;
+ const char *warnOrErr = "Failure";
+ const char** argv2;
+ UDate startTime, endTime;
+ int32_t diffTime;
+
+ /* initial check for the default converter */
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UResourceBundle *rb;
+ UConverter *cnv;
+
+ U_MAIN_INIT_ARGS(argc, argv);
+
+ startTime = uprv_getUTCtime();
+
+ argv2 = (const char**) malloc(sizeof(char*) * argc);
+ if (argv2 == NULL) {
+ printf("*** Error: Out of memory (too many cmd line args?)\n");
+ return 1;
+ }
+ argv2[0] = argv[0];
+
+
+ /* Checkargs */
+ /* TODO: Test framework arg handling needs to be decoupled from test execution
+ * so that the args being processed here don't need special handling,
+ * separate from the other test args.
+ */
+ ICU_TRACE = UTRACE_OFF;
+ for(i=1,j=1;i<argc;i++) {
+ argv2[j++] = argv[i];
+ if(!strcmp(argv[i],"-w")) {
+ warnOnMissingData = 1;
+ warnOrErr = "Warning";
+ }
+ else if (strcmp( argv[i], "-t_error") == 0) {
+ ICU_TRACE = UTRACE_ERROR;
+ }
+ else if (strcmp( argv[i], "-t_warn") == 0) {
+ ICU_TRACE = UTRACE_WARNING;
+ }
+ else if (strcmp( argv[i], "-t_oc") == 0) {
+ ICU_TRACE = UTRACE_OPEN_CLOSE;
+ }
+ else if (strcmp( argv[i], "-t_info") == 0) {
+ ICU_TRACE = UTRACE_INFO;
+ }
+ else if (strcmp( argv[i], "-t_verbose") == 0) {
+ ICU_TRACE = UTRACE_VERBOSE;
+ }
+ }
+ argc = j;
+
+
+ utrace_setFunctions(NULL, TraceEntry, TraceExit, TraceData);
+ utrace_setLevel(ICU_TRACE);
+
+
+ while (REPEAT_TESTS > 0) { /* Loop runs once per complete execution of the tests
+ * used for -r (repeat) test option. */
+
+ /* Check whether ICU will initialize without forcing the build data directory into
+ * the ICU_DATA path. Success here means either the data dll contains data, or that
+ * this test program was run with ICU_DATA set externally. Failure of this check
+ * is normal when ICU data is not packaged into a shared library.
+ *
+ * Whether or not this test succeeds, we want to cleanup and reinitialize
+ * with a data path so that data loading from individual files can be tested.
+ */
+ defaultDataFound = TRUE;
+ u_init(&errorCode);
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### Note: ICU Init without build-specific setDataDirectory() failed. %s\n", u_errorName(errorCode));
+ defaultDataFound = FALSE;
+ }
+ u_cleanup();
+ errorCode = U_ZERO_ERROR;
+ utrace_setFunctions(NULL, TraceEntry, TraceExit, TraceData);
+ utrace_setLevel(ICU_TRACE);
+
+ /* Initialize ICU */
+ if (!defaultDataFound) {
+ ctest_setICU_DATA(); /* u_setDataDirectory() must happen Before u_init() */
+ }
+ u_init(&errorCode);
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### ERROR! %s: u_init() failed with status = \"%s\".\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", argv[0], u_errorName(errorCode));
+ if(warnOnMissingData == 0) {
+ fprintf(stderr, "*** Exiting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
+ u_cleanup();
+ return 1;
+ }
+ }
+
+
+
+ /* try more data */
+ cnv = ucnv_open(TRY_CNV_2, &errorCode);
+ if(cnv != 0) {
+ /* ok */
+ ucnv_close(cnv);
+ } else {
+ fprintf(stderr,
+ "*** %s! The converter for " TRY_CNV_2 " cannot be opened.\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", warnOrErr);
+ if(warnOnMissingData == 0) {
+ fprintf(stderr, "*** Exitting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
+ u_cleanup();
+ return 1;
+ }
+ }
+
+ rb = ures_open(NULL, "en", &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ /* ok */
+ ures_close(rb);
+ } else {
+ fprintf(stderr,
+ "*** %s! The \"en\" locale resource bundle cannot be opened.\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", warnOrErr);
+ if(warnOnMissingData == 0) {
+ fprintf(stderr, "*** Exitting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
+ u_cleanup();
+ return 1;
+ }
+ }
+
+ errorCode = U_ZERO_ERROR;
+ rb = ures_open(NULL, NULL, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ /* ok */
+ if (errorCode == U_USING_DEFAULT_WARNING || errorCode == U_USING_FALLBACK_WARNING) {
+ fprintf(stderr,
+ "#### Note: The default locale %s is not available\n", uloc_getDefault());
+ }
+ ures_close(rb);
+ } else {
+ fprintf(stderr,
+ "*** %s! Can not open a resource bundle for the default locale %s\n", warnOrErr, uloc_getDefault());
+ if(warnOnMissingData == 0) {
+ fprintf(stderr, "*** Exitting. Use the '-w' option if data files were\n"
+ "*** purposely removed, to continue test anyway.\n");
+ u_cleanup();
+ return 1;
+ }
+ }
+ fprintf(stdout, "Default locale for this run is %s\n", uloc_getDefault());
+
+ /* Build a tree of all tests.
+ * Subsequently will be used to find / iterate the tests to run */
+ root = NULL;
+ addAllTests(&root);
+
+ /* Tests acutally run HERE. TODO: separate command line option parsing & setting from test execution!! */
+ nerrors = processArgs(root, argc, argv2);
+
+ if (--REPEAT_TESTS > 0) {
+ printf("Repeating tests %d more time(s)\n", REPEAT_TESTS);
+ }
+ cleanUpTestTree(root);
+
+#ifdef CTST_LEAK_CHECK
+ ctst_freeAll();
+ /* To check for leaks */
+ u_cleanup(); /* nuke the hashtable.. so that any still-open cnvs are leaked */
+#endif
+
+ } /* End of loop that repeats the entire test, if requested. (Normally doesn't loop) */
+
+ free((void*)argv2);
+
+ endTime = uprv_getUTCtime();
+ diffTime = (int32_t)(endTime - startTime);
+ printf("Elapsed Time: %02d:%02d:%02d.%03d\n",
+ (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR),
+ (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE),
+ (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND),
+ (int)(diffTime%U_MILLIS_PER_SECOND));
+
+ return nerrors ? 1 : 0;
+}
+
+/*
+static void ctest_appendToDataDirectory(const char *toAppend)
+{
+ const char *oldPath ="";
+ char newBuf [1024];
+ char *newPath = newBuf;
+ int32_t oldLen;
+ int32_t newLen;
+
+ if((toAppend == NULL) || (*toAppend == 0)) {
+ return;
+ }
+
+ oldPath = u_getDataDirectory();
+ if( (oldPath==NULL) || (*oldPath == 0)) {
+ u_setDataDirectory(toAppend);
+ } else {
+ oldLen = strlen(oldPath);
+ newLen = strlen(toAppend)+1+oldLen;
+
+ if(newLen > 1022)
+ {
+ newPath = (char *)ctst_malloc(newLen);
+ }
+
+ strcpy(newPath, oldPath);
+ strcpy(newPath+oldLen, U_PATH_SEP_STRING);
+ strcpy(newPath+oldLen+1, toAppend);
+
+ u_setDataDirectory(newPath);
+
+ if(newPath != newBuf)
+ {
+ free(newPath);
+ }
+ }
+}
+*/
+
+/* returns the path to icu/source/data */
+const char * ctest_dataSrcDir()
+{
+ static const char *dataSrcDir = NULL;
+
+ if(dataSrcDir) {
+ return dataSrcDir;
+ }
+
+ /* U_TOPSRCDIR is set by the makefiles on UNIXes when building cintltst and intltst
+ // to point to the top of the build hierarchy, which may or
+ // may not be the same as the source directory, depending on
+ // the configure options used. At any rate,
+ // set the data path to the built data from this directory.
+ // The value is complete with quotes, so it can be used
+ // as-is as a string constant.
+ */
+#if defined (U_TOPSRCDIR)
+ {
+ dataSrcDir = U_TOPSRCDIR U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+#else
+
+ /* On Windows, the file name obtained from __FILE__ includes a full path.
+ * This file is "wherever\icu\source\test\cintltst\cintltst.c"
+ * Change to "wherever\icu\source\data"
+ */
+ {
+ static char p[sizeof(__FILE__) + 20];
+ char *pBackSlash;
+ int i;
+
+ strcpy(p, __FILE__);
+ /* We want to back over three '\' chars. */
+ /* Only Windows should end up here, so looking for '\' is safe. */
+ for (i=1; i<=3; i++) {
+ pBackSlash = strrchr(p, U_FILE_SEP_CHAR);
+ if (pBackSlash != NULL) {
+ *pBackSlash = 0; /* Truncate the string at the '\' */
+ }
+ }
+
+ if (pBackSlash != NULL) {
+ /* We found and truncated three names from the path.
+ * Now append "source\data" and set the environment
+ */
+ strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING );
+ dataSrcDir = p;
+ }
+ else {
+ /* __FILE__ on MSVC7 does not contain the directory */
+ FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r");
+ if (file) {
+ fclose(file);
+ dataSrcDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+ else {
+ dataSrcDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+ }
+ }
+#endif
+
+ return dataSrcDir;
+
+}
+
+/* returns the path to icu/source/data/out */
+const char *ctest_dataOutDir()
+{
+ static const char *dataOutDir = NULL;
+
+ if(dataOutDir) {
+ return dataOutDir;
+ }
+
+ /* U_TOPBUILDDIR is set by the makefiles on UNIXes when building cintltst and intltst
+ // to point to the top of the build hierarchy, which may or
+ // may not be the same as the source directory, depending on
+ // the configure options used. At any rate,
+ // set the data path to the built data from this directory.
+ // The value is complete with quotes, so it can be used
+ // as-is as a string constant.
+ */
+#if defined (U_TOPBUILDDIR)
+ {
+ dataOutDir = U_TOPBUILDDIR "data"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ }
+#else
+
+ /* On Windows, the file name obtained from __FILE__ includes a full path.
+ * This file is "wherever\icu\source\test\cintltst\cintltst.c"
+ * Change to "wherever\icu\source\data"
+ */
+ {
+ static char p[sizeof(__FILE__) + 20];
+ char *pBackSlash;
+ int i;
+
+ strcpy(p, __FILE__);
+ /* We want to back over three '\' chars. */
+ /* Only Windows should end up here, so looking for '\' is safe. */
+ for (i=1; i<=3; i++) {
+ pBackSlash = strrchr(p, U_FILE_SEP_CHAR);
+ if (pBackSlash != NULL) {
+ *pBackSlash = 0; /* Truncate the string at the '\' */
+ }
+ }
+
+ if (pBackSlash != NULL) {
+ /* We found and truncated three names from the path.
+ * Now append "source\data" and set the environment
+ */
+ strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING);
+ dataOutDir = p;
+ }
+ else {
+ /* __FILE__ on MSVC7 does not contain the directory */
+ FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r");
+ if (file) {
+ fclose(file);
+ dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
+ }
+ else {
+ dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
+ }
+ }
+ }
+#endif
+
+ return dataOutDir;
+}
+
+/* ctest_setICU_DATA - if the ICU_DATA environment variable is not already
+ * set, try to deduce the directory in which ICU was built,
+ * and set ICU_DATA to "icu/source/data" in that location.
+ * The intent is to allow the tests to have a good chance
+ * of running without requiring that the user manually set
+ * ICU_DATA. Common data isn't a problem, since it is
+ * picked up via a static (build time) reference, but the
+ * tests dynamically load some data.
+ */
+void ctest_setICU_DATA() {
+
+ /* No location for the data dir was identifiable.
+ * Add other fallbacks for the test data location here if the need arises
+ */
+ if (getenv("ICU_DATA") == NULL) {
+ /* If ICU_DATA isn't set, set it to the usual location */
+ u_setDataDirectory(ctest_dataOutDir());
+ }
+}
+
+UChar* CharsToUChars(const char* str) {
+ /* Might be faster to just use uprv_strlen() as the preflight len - liu */
+ int32_t len = u_unescape(str, 0, 0); /* preflight */
+ /* Do NOT use malloc() - we are supposed to be acting like user code! */
+ UChar *buf = (UChar*) malloc(sizeof(UChar) * (len + 1));
+ u_unescape(str, buf, len + 1);
+ return buf;
+}
+
+char *austrdup(const UChar* unichars)
+{
+ int length;
+ char *newString;
+
+ length = u_strlen ( unichars );
+ /*newString = (char*)malloc ( sizeof( char ) * 4 * ( length + 1 ) );*/ /* this leaks for now */
+ newString = (char*)ctst_malloc ( sizeof( char ) * 4 * ( length + 1 ) ); /* this shouldn't */
+
+ if ( newString == NULL )
+ return NULL;
+
+ u_austrcpy ( newString, unichars );
+
+ return newString;
+}
+
+char *aescstrdup(const UChar* unichars,int32_t length){
+ char *newString,*targetLimit,*target;
+ UConverterFromUCallback cb;
+ const void *p;
+ UErrorCode errorCode = U_ZERO_ERROR;
+#if U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+# ifdef OS390
+ static const char convName[] = "ibm-1047";
+# else
+ static const char convName[] = "ibm-37";
+# endif
+#else
+ static const char convName[] = "US-ASCII";
+#endif
+ UConverter* conv = ucnv_open(convName, &errorCode);
+ if(length==-1){
+ length = u_strlen( unichars);
+ }
+ newString = (char*)ctst_malloc ( sizeof(char) * 8 * (length +1));
+ target = newString;
+ targetLimit = newString+sizeof(char) * 8 * (length +1);
+ ucnv_setFromUCallBack(conv, UCNV_FROM_U_CALLBACK_ESCAPE, UCNV_ESCAPE_JAVA, &cb, &p, &errorCode);
+ ucnv_fromUnicode(conv,&target,targetLimit, &unichars, (UChar*)(unichars+length),NULL,TRUE,&errorCode);
+ ucnv_close(conv);
+ *target = '\0';
+ return newString;
+}
+
+const char* loadTestData(UErrorCode* err){
+ if( _testDataPath == NULL){
+ const char* directory=NULL;
+ UResourceBundle* test =NULL;
+ char* tdpath=NULL;
+ const char* tdrelativepath;
+#if defined (U_TOPBUILDDIR)
+ tdrelativepath = "test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ directory = U_TOPBUILDDIR;
+#else
+ tdrelativepath = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ directory= ctest_dataOutDir();
+#endif
+
+ tdpath = (char*) ctst_malloc(sizeof(char) *(( strlen(directory) * strlen(tdrelativepath)) + 10));
+
+
+ /* u_getDataDirectory shoul return \source\data ... set the
+ * directory to ..\source\data\..\test\testdata\out\testdata
+ *
+ * Fallback: When Memory mapped file is built
+ * ..\source\data\out\..\..\test\testdata\out\testdata
+ */
+ strcpy(tdpath, directory);
+ strcat(tdpath, tdrelativepath);
+ strcat(tdpath,"testdata");
+
+
+ test=ures_open(tdpath, "testtypes", err);
+
+ /* Fall back did not succeed either so return */
+ if(U_FAILURE(*err)){
+ *err = U_FILE_ACCESS_ERROR;
+ log_err("Could not load testtypes.res in testdata bundle with path %s - %s\n", tdpath, u_errorName(*err));
+ return "";
+ }
+ ures_close(test);
+ _testDataPath = tdpath;
+ return _testDataPath;
+ }
+ return _testDataPath;
+}
+
+#define CTEST_MAX_TIMEZONE_SIZE 256
+static UChar gOriginalTimeZone[CTEST_MAX_TIMEZONE_SIZE] = {0};
+
+/**
+ * Call this once to get a consistent timezone. Use ctest_resetTimeZone to set it back to the original value.
+ * @param optionalTimeZone Set this to a requested timezone.
+ * Set to NULL to use the standard test timezone (Pacific Time)
+ */
+U_CFUNC void ctest_setTimeZone(const char *optionalTimeZone, UErrorCode *status) {
+#if !UCONFIG_NO_FORMATTING
+ UChar zoneID[CTEST_MAX_TIMEZONE_SIZE];
+
+ if (optionalTimeZone == NULL) {
+ optionalTimeZone = "America/Los_Angeles";
+ }
+ if (gOriginalTimeZone[0]) {
+ log_err("*** Error: time zone saved twice. New value will be %s\n",
+ optionalTimeZone);
+ }
+ ucal_getDefaultTimeZone(gOriginalTimeZone, CTEST_MAX_TIMEZONE_SIZE, status);
+ if (U_FAILURE(*status)) {
+ log_err("*** Error: Failed to save default time zone: %s\n",
+ u_errorName(*status));
+ *status = U_ZERO_ERROR;
+ }
+
+ u_uastrncpy(zoneID, optionalTimeZone, CTEST_MAX_TIMEZONE_SIZE-1);
+ zoneID[CTEST_MAX_TIMEZONE_SIZE-1] = 0;
+ ucal_setDefaultTimeZone(zoneID, status);
+ if (U_FAILURE(*status)) {
+ log_err("*** Error: Failed to set default time zone to \"%s\": %s\n",
+ optionalTimeZone, u_errorName(*status));
+ }
+#endif
+}
+
+/**
+ * Call this once get back the original timezone
+ */
+U_CFUNC void ctest_resetTimeZone(void) {
+#if !UCONFIG_NO_FORMATTING
+ UErrorCode status = U_ZERO_ERROR;
+
+ ucal_setDefaultTimeZone(gOriginalTimeZone, &status);
+ if (U_FAILURE(status)) {
+ log_err("*** Error: Failed to reset default time zone: %s\n",
+ u_errorName(status));
+ }
+ /* Set to an empty state */
+ gOriginalTimeZone[0] = 0;
+#endif
+}
+
+#define CTST_MAX_ALLOC 8192
+/* Array used as a queue */
+static void * ctst_allocated_stuff[CTST_MAX_ALLOC] = {0};
+static int ctst_allocated = 0;
+static UBool ctst_free = FALSE;
+
+void *ctst_malloc(size_t size) {
+ if(ctst_allocated >= CTST_MAX_ALLOC - 1) {
+ ctst_allocated = 0;
+ ctst_free = TRUE;
+ }
+ if(ctst_allocated_stuff[ctst_allocated]) {
+ free(ctst_allocated_stuff[ctst_allocated]);
+ }
+ return ctst_allocated_stuff[ctst_allocated++] = malloc(size);
+}
+
+#ifdef CTST_LEAK_CHECK
+void ctst_freeAll() {
+ int i;
+ if(ctst_free == 0) {
+ for(i=0; i<ctst_allocated; i++) {
+ free(ctst_allocated_stuff[i]);
+ ctst_allocated_stuff[i] = NULL;
+ }
+ } else {
+ for(i=0; i<CTST_MAX_ALLOC; i++) {
+ free(ctst_allocated_stuff[i]);
+ ctst_allocated_stuff[i] = NULL;
+ }
+ }
+ ctst_allocated = 0;
+ _testDataPath=NULL;
+}
+
+#define VERBOSE_ASSERTIONS
+
+U_CFUNC UBool assertSuccess(const char* msg, UErrorCode* ec) {
+ U_ASSERT(ec!=NULL);
+ if (U_FAILURE(*ec)) {
+ log_err("FAIL: %s (%s)\n", msg, u_errorName(*ec));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/* if 'condition' is a UBool, the compiler complains bitterly about
+ expressions like 'a > 0' which it evaluates as int */
+U_CFUNC UBool assertTrue(const char* msg, int /*not UBool*/ condition) {
+ if (!condition) {
+ log_err("FAIL: assertTrue() failed: %s\n", msg);
+ }
+#ifdef VERBOSE_ASSERTIONS
+ else {
+ log_verbose("Ok: %s\n", msg);
+ }
+#endif
+ return (UBool)condition;
+}
+
+U_CFUNC UBool assertEquals(const char* message, const char* expected,
+ const char* actual) {
+ if (uprv_strcmp(expected, actual) != 0) {
+ log_err("FAIL: %s; got \"%s\"; expected \"%s\"\n",
+ message, actual, expected);
+ return FALSE;
+ }
+#ifdef VERBOSE_ASSERTIONS
+ else {
+ log_verbose("Ok: %s; got \"%s\"\n", message, actual);
+ }
+#endif
+ return TRUE;
+}
+/*--------------------------------------------------------------------
+ * Time bomb - allows temporary behavior that expires at a given
+ * release
+ *--------------------------------------------------------------------
+ */
+
+U_CFUNC UBool isICUVersionAtLeast(const UVersionInfo x) {
+ UVersionInfo v;
+ u_getVersion(v);
+ return (uprv_memcmp(v, x, U_MAX_VERSION_LENGTH) >= 0);
+}
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.h
new file mode 100644
index 00000000000..e750424b895
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.h
@@ -0,0 +1,108 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CINTLTST.H
+*
+* Madhu Katragadda Creation
+* Modification History:
+* Date Name Description
+* 07/13/99 helena HPUX 11 CC port.
+*********************************************************************************
+
+The main root for C API tests
+*/
+
+#ifndef _CINTLTST
+#define _CINTLTST
+
+#include "unicode/utypes.h"
+#include "unicode/putil.h"
+#include "unicode/ctest.h"
+#include <stdlib.h>
+
+#ifndef U_USE_DEPRECATED_API
+#define U_USE_DEPRECATED_API 1
+#endif
+
+U_CFUNC void addAllTests(TestNode** root);
+
+/**
+ * Return the path to the icu/source/data/out directory
+ */
+U_CFUNC const char* ctest_dataOutDir(void);
+
+/**
+ * Return the path to the icu/source/data/ directory
+ * for out of source builds too returns the source directory
+ */
+U_CFUNC const char* ctest_dataSrcDir(void);
+
+U_CFUNC UChar* CharsToUChars(const char* chars);
+
+/**
+ * Convert a const UChar* into a char*
+ * Caller owns storage, but in practice this function
+ * LEAKS so be aware of that.
+ * @param unichars UChars (null terminated) to be converted
+ * @return new char* to the unichars in host format
+ */
+
+U_CFUNC char *austrdup(const UChar* unichars);
+U_CFUNC char *aescstrdup(const UChar* unichars, int32_t length);
+U_CFUNC void *ctst_malloc(size_t size);
+U_CFUNC void ctst_freeAll(void);
+
+U_CFUNC const char* loadTestData(UErrorCode* err);
+
+/**
+ * function used to specify the error
+ * converts the errorcode to an error descriptive string(const char*)
+ * @param status the error code
+ */
+#define myErrorName(errorCode) u_errorName(errorCode)
+
+
+/**
+ * Call this once to get a consistent timezone. Use ctest_resetTimeZone to set it back to the original value.
+ * @param optionalTimeZone Set this to a requested timezone.
+ * Set to NULL to use the standard test timezone (Pacific Time)
+ */
+U_CFUNC void ctest_setTimeZone(const char *optionalTimeZone, UErrorCode *status);
+/**
+ * Call this once get back the original timezone
+ */
+U_CFUNC void ctest_resetTimeZone(void);
+
+/**
+ * Assert that the given UErrorCode succeeds, and return TRUE if it does.
+ */
+U_CFUNC UBool assertSuccess(const char* msg, UErrorCode* ec);
+
+/**
+ * Assert that the UBool is TRUE, and return TRUE if it does.
+ *
+ * NOTE: Use 'int condition' rather than 'UBool condition' so the
+ * compiler doesn't complain about integral conversion of expressions
+ * like 'p != 0'.
+ */
+U_CFUNC UBool assertTrue(const char* msg, int condition);
+
+/**
+ * Assert that the actualString equals the expectedString, and return
+ * TRUE if it does.
+ */
+U_CFUNC UBool assertEquals(const char* msg, const char* expectedString,
+ const char* actualString);
+
+/**
+ * Time bomb - allows temporary behavior that expires at a given
+ * release
+ *
+ */
+U_CFUNC UBool isICUVersionAtLeast(const UVersionInfo x);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.vcproj b/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.vcproj
new file mode 100644
index 00000000000..65c4c1b935c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cintltst.vcproj
@@ -0,0 +1,721 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="cintltst"
+ ProjectGUID="{3D1246AE-1B32-479B-BECA-AEFA97BE2321}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/cintltst.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include;..\..\tools\ctestfw;..\..\common;..\..\i18n;..\..\tools\toolutil"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ DisableLanguageExtensions="true"
+ TreatWChar_tAsBuiltInType="true"
+ PrecompiledHeaderFile=".\Debug/cintltst.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Debug/cintltst.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/cintltst.pdb"
+ SubSystem="1"
+ FixedBaseAddress="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseFAT32Workaround="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/cintltst.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\include;..\..\tools\ctestfw;..\..\common;..\..\i18n;..\..\tools\toolutil"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ DisableLanguageExtensions="true"
+ TreatWChar_tAsBuiltInType="true"
+ PrecompiledHeaderFile=".\Release/cintltst.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Release/cintltst.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Release/cintltst.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="bidi"
+ >
+ <File
+ RelativePath=".\cbididat.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cbiditst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cbiditst.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="break iteration"
+ >
+ <File
+ RelativePath=".\cbiapts.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cbiapts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cbkittst.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="collation"
+ >
+ <File
+ RelativePath=".\callcoll.c"
+ >
+ </File>
+ <File
+ RelativePath=".\callcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\capitst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\capitst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ccolltst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\ccolltst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ccurrtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\ccurrtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cdetst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cdetst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cestst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cestst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cfintst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cfintst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cfrtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cfrtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cg7coll.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cg7coll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\citertst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\citertst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cjaptst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cjaptst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cmsccoll.c"
+ >
+ </File>
+ <File
+ RelativePath=".\colutil.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cturtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cturtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\encoll.c"
+ >
+ </File>
+ <File
+ RelativePath=".\encoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\usrchdat.c"
+ >
+ </File>
+ <File
+ RelativePath=".\usrchtst.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="collections"
+ >
+ <File
+ RelativePath=".\chashtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\sorttest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\trietest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\uenumtst.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="conversion"
+ >
+ <File
+ RelativePath=".\bocu1tst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\ccapitst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\ccapitst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cconvtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cctest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\eurocreg.c"
+ >
+ </File>
+ <File
+ RelativePath=".\nccbtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\nccbtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ncnvfbts.c"
+ >
+ </File>
+ <File
+ RelativePath=".\ncnvfbts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ncnvtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\nucnvtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\nucnvtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\stdnmtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\ucsdetst.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="data &amp; memory"
+ >
+ <File
+ RelativePath=".\udatatst.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="formatting"
+ >
+ <File
+ RelativePath=".\ccaltst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\ccaltst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cdattst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cdattst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cdtdptst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cdtdptst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cdtrgtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cdtrgtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cformtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cformtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cmsgtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cmsgtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cnmdptst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cnmdptst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cnumtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cnumtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\currtest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\udatpg_test.c"
+ >
+ </File>
+ <File
+ RelativePath=".\utmstest.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="locales &amp; resources"
+ >
+ <File
+ RelativePath=".\cldrtest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cloctst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cloctst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cposxtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\crestst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\crestst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\creststn.c"
+ >
+ </File>
+ <File
+ RelativePath=".\creststn.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="misc"
+ >
+ <File
+ RelativePath=".\calltest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cintltst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cintltst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cutiltst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\hpmufn.c"
+ >
+ </File>
+ <File
+ RelativePath=".\putiltst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\tracetst.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="normalization"
+ >
+ <File
+ RelativePath=".\cnormtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cnormtst.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="properties &amp; sets"
+ >
+ <File
+ RelativePath=".\cucdapi.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cucdapi.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cucdtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\usettest.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="strings"
+ >
+ <File
+ RelativePath=".\cstrcase.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cstrtest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\custrtrn.c"
+ >
+ </File>
+ <File
+ RelativePath=".\custrtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\utexttst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\utf16tst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\utf8tst.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="transforms"
+ >
+ <File
+ RelativePath=".\utransts.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="regex"
+ >
+ <File
+ RelativePath=".\reapits.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="sprep &amp; idna"
+ >
+ <File
+ RelativePath="idnatest.c"
+ >
+ </File>
+ <File
+ RelativePath="nfsprep.c"
+ >
+ </File>
+ <File
+ RelativePath="nfsprep.h"
+ >
+ </File>
+ <File
+ RelativePath="spreptst.c"
+ >
+ </File>
+ <File
+ RelativePath="sprpdata.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/citertst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/citertst.c
new file mode 100644
index 00000000000..dc24f4acea5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/citertst.c
@@ -0,0 +1,1923 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CITERTST.C
+*
+* Modification History:
+* Date Name Description
+* Madhu Katragadda Ported for C API
+* 02/19/01 synwee Modified test case for new collation iterator
+*********************************************************************************/
+/*
+ * Collation Iterator tests.
+ * (Let me reiterate my position...)
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "unicode/uchar.h"
+#include "unicode/ustring.h"
+#include "unicode/putil.h"
+#include "callcoll.h"
+#include "cmemory.h"
+#include "cintltst.h"
+#include "citertst.h"
+#include "ccolltst.h"
+#include "filestrm.h"
+#include "cstring.h"
+#include "ucol_imp.h"
+#include "ucol_tok.h"
+#include <stdio.h>
+
+extern uint8_t ucol_uprv_getCaseBits(const UChar *, uint32_t, UErrorCode *);
+
+void addCollIterTest(TestNode** root)
+{
+ addTest(root, &TestPrevious, "tscoll/citertst/TestPrevious");
+ addTest(root, &TestOffset, "tscoll/citertst/TestOffset");
+ addTest(root, &TestSetText, "tscoll/citertst/TestSetText");
+ addTest(root, &TestMaxExpansion, "tscoll/citertst/TestMaxExpansion");
+ addTest(root, &TestUnicodeChar, "tscoll/citertst/TestUnicodeChar");
+ addTest(root, &TestNormalizedUnicodeChar,
+ "tscoll/citertst/TestNormalizedUnicodeChar");
+ addTest(root, &TestNormalization, "tscoll/citertst/TestNormalization");
+ addTest(root, &TestBug672, "tscoll/citertst/TestBug672");
+ addTest(root, &TestBug672Normalize, "tscoll/citertst/TestBug672Normalize");
+ addTest(root, &TestSmallBuffer, "tscoll/citertst/TestSmallBuffer");
+ addTest(root, &TestCEs, "tscoll/citertst/TestCEs");
+ addTest(root, &TestDiscontiguos, "tscoll/citertst/TestDiscontiguos");
+ addTest(root, &TestCEBufferOverflow, "tscoll/citertst/TestCEBufferOverflow");
+ addTest(root, &TestCEValidity, "tscoll/citertst/TestCEValidity");
+ addTest(root, &TestSortKeyValidity, "tscoll/citertst/TestSortKeyValidity");
+}
+
+/* The locales we support */
+
+static const char * LOCALES[] = {"en_AU", "en_BE", "en_CA"};
+
+static void TestBug672() {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[20];
+ UChar text[50];
+ int i;
+ int result[3][3];
+
+ u_uastrcpy(pattern, "resume");
+ u_uastrcpy(text, "Time to resume updating my resume.");
+
+ for (i = 0; i < 3; ++ i) {
+ UCollator *coll = ucol_open(LOCALES[i], &status);
+ UCollationElements *pitr = ucol_openElements(coll, pattern, -1,
+ &status);
+ UCollationElements *titer = ucol_openElements(coll, text, -1,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: in creation of either the collator or the collation iterator :%s\n",
+ myErrorName(status));
+ return;
+ }
+
+ log_verbose("locale tested %s\n", LOCALES[i]);
+
+ while (ucol_next(pitr, &status) != UCOL_NULLORDER &&
+ U_SUCCESS(status)) {
+ }
+ if (U_FAILURE(status)) {
+ log_err("ERROR: reversing collation iterator :%s\n",
+ myErrorName(status));
+ return;
+ }
+ ucol_reset(pitr);
+
+ ucol_setOffset(titer, u_strlen(pattern), &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: setting offset in collator :%s\n",
+ myErrorName(status));
+ return;
+ }
+ result[i][0] = ucol_getOffset(titer);
+ log_verbose("Text iterator set to offset %d\n", result[i][0]);
+
+ /* Use previous() */
+ ucol_previous(titer, &status);
+ result[i][1] = ucol_getOffset(titer);
+ log_verbose("Current offset %d after previous\n", result[i][1]);
+
+ /* Add one to index */
+ log_verbose("Adding one to current offset...\n");
+ ucol_setOffset(titer, ucol_getOffset(titer) + 1, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: setting offset in collator :%s\n",
+ myErrorName(status));
+ return;
+ }
+ result[i][2] = ucol_getOffset(titer);
+ log_verbose("Current offset in text = %d\n", result[i][2]);
+ ucol_closeElements(pitr);
+ ucol_closeElements(titer);
+ ucol_close(coll);
+ }
+
+ if (uprv_memcmp(result[0], result[1], 3) != 0 ||
+ uprv_memcmp(result[1], result[2], 3) != 0) {
+ log_err("ERROR: Different locales have different offsets at the same character\n");
+ }
+}
+
+
+
+/* Running this test with normalization enabled showed up a bug in the incremental
+ normalization code. */
+static void TestBug672Normalize() {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[20];
+ UChar text[50];
+ int i;
+ int result[3][3];
+
+ u_uastrcpy(pattern, "resume");
+ u_uastrcpy(text, "Time to resume updating my resume.");
+
+ for (i = 0; i < 3; ++ i) {
+ UCollator *coll = ucol_open(LOCALES[i], &status);
+ UCollationElements *pitr = NULL;
+ UCollationElements *titer = NULL;
+
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+
+ pitr = ucol_openElements(coll, pattern, -1, &status);
+ titer = ucol_openElements(coll, text, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: in creation of either the collator or the collation iterator :%s\n",
+ myErrorName(status));
+ return;
+ }
+
+ log_verbose("locale tested %s\n", LOCALES[i]);
+
+ while (ucol_next(pitr, &status) != UCOL_NULLORDER &&
+ U_SUCCESS(status)) {
+ }
+ if (U_FAILURE(status)) {
+ log_err("ERROR: reversing collation iterator :%s\n",
+ myErrorName(status));
+ return;
+ }
+ ucol_reset(pitr);
+
+ ucol_setOffset(titer, u_strlen(pattern), &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: setting offset in collator :%s\n",
+ myErrorName(status));
+ return;
+ }
+ result[i][0] = ucol_getOffset(titer);
+ log_verbose("Text iterator set to offset %d\n", result[i][0]);
+
+ /* Use previous() */
+ ucol_previous(titer, &status);
+ result[i][1] = ucol_getOffset(titer);
+ log_verbose("Current offset %d after previous\n", result[i][1]);
+
+ /* Add one to index */
+ log_verbose("Adding one to current offset...\n");
+ ucol_setOffset(titer, ucol_getOffset(titer) + 1, &status);
+ if (U_FAILURE(status)) {
+ log_err("ERROR: setting offset in collator :%s\n",
+ myErrorName(status));
+ return;
+ }
+ result[i][2] = ucol_getOffset(titer);
+ log_verbose("Current offset in text = %d\n", result[i][2]);
+ ucol_closeElements(pitr);
+ ucol_closeElements(titer);
+ ucol_close(coll);
+ }
+
+ if (uprv_memcmp(result[0], result[1], 3) != 0 ||
+ uprv_memcmp(result[1], result[2], 3) != 0) {
+ log_err("ERROR: Different locales have different offsets at the same character\n");
+ }
+}
+
+
+
+
+/**
+ * Test for CollationElementIterator previous and next for the whole set of
+ * unicode characters.
+ */
+static void TestUnicodeChar()
+{
+ UChar source[0x100];
+ UCollator *en_us;
+ UCollationElements *iter;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar codepoint;
+
+ UChar *test;
+ en_us = ucol_open("en_US", &status);
+ if (U_FAILURE(status)){
+ log_err("ERROR: in creation of collation data using ucol_open()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ for (codepoint = 1; codepoint < 0xFFFE;)
+ {
+ test = source;
+
+ while (codepoint % 0xFF != 0)
+ {
+ if (u_isdefined(codepoint))
+ *(test ++) = codepoint;
+ codepoint ++;
+ }
+
+ if (u_isdefined(codepoint))
+ *(test ++) = codepoint;
+
+ if (codepoint != 0xFFFF)
+ codepoint ++;
+
+ *test = 0;
+ iter=ucol_openElements(en_us, source, u_strlen(source), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(en_us);
+ return;
+ }
+ /* A basic test to see if it's working at all */
+ log_verbose("codepoint testing %x\n", codepoint);
+ backAndForth(iter);
+ ucol_closeElements(iter);
+
+ /* null termination test */
+ iter=ucol_openElements(en_us, source, -1, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(en_us);
+ return;
+ }
+ /* A basic test to see if it's working at all */
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ }
+
+ ucol_close(en_us);
+}
+
+/**
+ * Test for CollationElementIterator previous and next for the whole set of
+ * unicode characters with normalization on.
+ */
+static void TestNormalizedUnicodeChar()
+{
+ UChar source[0x100];
+ UCollator *th_th;
+ UCollationElements *iter;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar codepoint;
+
+ UChar *test;
+ /* thai should have normalization on */
+ th_th = ucol_open("th_TH", &status);
+ if (U_FAILURE(status)){
+ log_err("ERROR: in creation of thai collation using ucol_open()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ for (codepoint = 1; codepoint < 0xFFFE;)
+ {
+ test = source;
+
+ while (codepoint % 0xFF != 0)
+ {
+ if (u_isdefined(codepoint))
+ *(test ++) = codepoint;
+ codepoint ++;
+ }
+
+ if (u_isdefined(codepoint))
+ *(test ++) = codepoint;
+
+ if (codepoint != 0xFFFF)
+ codepoint ++;
+
+ *test = 0;
+ iter=ucol_openElements(th_th, source, u_strlen(source), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(th_th);
+ return;
+ }
+
+ backAndForth(iter);
+ ucol_closeElements(iter);
+
+ iter=ucol_openElements(th_th, source, -1, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(th_th);
+ return;
+ }
+
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ }
+
+ ucol_close(th_th);
+}
+
+/**
+* Test the incremental normalization
+*/
+static void TestNormalization()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ const char *str =
+ "&a < \\u0300\\u0315 < A\\u0300\\u0315 < \\u0316\\u0315B < \\u0316\\u0300\\u0315";
+ UCollator *coll;
+ UChar rule[50];
+ int rulelen = u_unescape(str, rule, 50);
+ int count = 0;
+ const char *testdata[] =
+ {"\\u1ED9", "o\\u0323\\u0302",
+ "\\u0300\\u0315", "\\u0315\\u0300",
+ "A\\u0300\\u0315B", "A\\u0315\\u0300B",
+ "A\\u0316\\u0315B", "A\\u0315\\u0316B",
+ "\\u0316\\u0300\\u0315", "\\u0315\\u0300\\u0316",
+ "A\\u0316\\u0300\\u0315B", "A\\u0315\\u0300\\u0316B",
+ "\\u0316\\u0315\\u0300", "A\\u0316\\u0315\\u0300B"};
+ int32_t srclen;
+ UChar source[10];
+ UCollationElements *iter;
+
+ coll = ucol_openRules(rule, rulelen, UCOL_ON, UCOL_TERTIARY, NULL, &status);
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ if (U_FAILURE(status)){
+ log_err("ERROR: in creation of collator using ucol_openRules()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ srclen = u_unescape(testdata[0], source, 10);
+ iter = ucol_openElements(coll, source, srclen, &status);
+ backAndForth(iter);
+ ucol_closeElements(iter);
+
+ srclen = u_unescape(testdata[1], source, 10);
+ iter = ucol_openElements(coll, source, srclen, &status);
+ backAndForth(iter);
+ ucol_closeElements(iter);
+
+ while (count < 12) {
+ srclen = u_unescape(testdata[count], source, 10);
+ iter = ucol_openElements(coll, source, srclen, &status);
+
+ if (U_FAILURE(status)){
+ log_err("ERROR: in creation of collator element iterator\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+
+ iter = ucol_openElements(coll, source, -1, &status);
+
+ if (U_FAILURE(status)){
+ log_err("ERROR: in creation of collator element iterator\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ count ++;
+ }
+ ucol_close(coll);
+}
+
+/**
+ * Test for CollationElementIterator.previous()
+ *
+ * @bug 4108758 - Make sure it works with contracting characters
+ *
+ */
+static void TestPrevious()
+{
+ UCollator *coll=NULL;
+ UChar rule[50];
+ UChar *source;
+ UCollator *c1, *c2, *c3;
+ UCollationElements *iter;
+ UErrorCode status = U_ZERO_ERROR;
+
+ test1=(UChar*)malloc(sizeof(UChar) * 50);
+ test2=(UChar*)malloc(sizeof(UChar) * 50);
+ u_uastrcpy(test1, "What subset of all possible test cases?");
+ u_uastrcpy(test2, "has the highest probability of detecting");
+ coll = ucol_open("en_US", &status);
+
+ iter=ucol_openElements(coll, test1, u_strlen(test1), &status);
+ log_verbose("English locale testing back and forth\n");
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(coll);
+ return;
+ }
+ /* A basic test to see if it's working at all */
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ ucol_close(coll);
+
+ /* Test with a contracting character sequence */
+ u_uastrcpy(rule, "&a,A < b,B < c,C, d,D < z,Z < ch,cH,Ch,CH");
+ c1 = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status);
+
+ log_verbose("Contraction rule testing back and forth with no normalization\n");
+
+ if (c1 == NULL || U_FAILURE(status))
+ {
+ log_err("Couldn't create a RuleBasedCollator with a contracting sequence\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ source=(UChar*)malloc(sizeof(UChar) * 20);
+ u_uastrcpy(source, "abchdcba");
+ iter=ucol_openElements(c1, source, u_strlen(source), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ ucol_close(c1);
+
+ /* Test with an expanding character sequence */
+ u_uastrcpy(rule, "&a < b < c/abd < d");
+ c2 = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status);
+ log_verbose("Expansion rule testing back and forth with no normalization\n");
+ if (c2 == NULL || U_FAILURE(status))
+ {
+ log_err("Couldn't create a RuleBasedCollator with a contracting sequence.\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ u_uastrcpy(source, "abcd");
+ iter=ucol_openElements(c2, source, u_strlen(source), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ ucol_close(c2);
+ /* Now try both */
+ u_uastrcpy(rule, "&a < b < c/aba < d < z < ch");
+ c3 = ucol_openRules(rule, u_strlen(rule), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH,NULL, &status);
+ log_verbose("Expansion/contraction rule testing back and forth with no normalization\n");
+
+ if (c3 == NULL || U_FAILURE(status))
+ {
+ log_err("Couldn't create a RuleBasedCollator with a contracting sequence.\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ u_uastrcpy(source, "abcdbchdc");
+ iter=ucol_openElements(c3, source, u_strlen(source), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ ucol_close(c3);
+ source[0] = 0x0e41;
+ source[1] = 0x0e02;
+ source[2] = 0x0e41;
+ source[3] = 0x0e02;
+ source[4] = 0x0e27;
+ source[5] = 0x61;
+ source[6] = 0x62;
+ source[7] = 0x63;
+ source[8] = 0;
+
+ coll = ucol_open("th_TH", &status);
+ log_verbose("Thai locale testing back and forth with normalization\n");
+ iter=ucol_openElements(coll, source, u_strlen(source), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ ucol_close(coll);
+
+ /* prev test */
+ source[0] = 0x0061;
+ source[1] = 0x30CF;
+ source[2] = 0x3099;
+ source[3] = 0x30FC;
+ source[4] = 0;
+
+ coll = ucol_open("ja_JP", &status);
+ log_verbose("Japanese locale testing back and forth with normalization\n");
+ iter=ucol_openElements(coll, source, u_strlen(source), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ ucol_close(coll);
+
+ free(source);
+ free(test1);
+ free(test2);
+}
+
+/**
+ * Test for getOffset() and setOffset()
+ */
+static void TestOffset()
+{
+ UErrorCode status= U_ZERO_ERROR;
+ UCollator *en_us=NULL;
+ UCollationElements *iter, *pristine;
+ int32_t offset;
+ int32_t *orders;
+ int32_t orderLength=0;
+ int count = 0;
+ test1=(UChar*)malloc(sizeof(UChar) * 50);
+ test2=(UChar*)malloc(sizeof(UChar) * 50);
+ u_uastrcpy(test1, "What subset of all possible test cases?");
+ u_uastrcpy(test2, "has the highest probability of detecting");
+ en_us = ucol_open("en_US", &status);
+ log_verbose("Testing getOffset and setOffset for collations\n");
+ iter = ucol_openElements(en_us, test1, u_strlen(test1), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(en_us);
+ return;
+ }
+
+ /* testing boundaries */
+ ucol_setOffset(iter, 0, &status);
+ if (U_FAILURE(status) || ucol_previous(iter, &status) != UCOL_NULLORDER) {
+ log_err("Error: After setting offset to 0, we should be at the end "
+ "of the backwards iteration");
+ }
+ ucol_setOffset(iter, u_strlen(test1), &status);
+ if (U_FAILURE(status) || ucol_next(iter, &status) != UCOL_NULLORDER) {
+ log_err("Error: After setting offset to end of the string, we should "
+ "be at the end of the backwards iteration");
+ }
+
+ /* Run all the way through the iterator, then get the offset */
+
+ orders = getOrders(iter, &orderLength);
+
+ offset = ucol_getOffset(iter);
+
+ if (offset != u_strlen(test1))
+ {
+ log_err("offset at end != length %d vs %d\n", offset,
+ u_strlen(test1) );
+ }
+
+ /* Now set the offset back to the beginning and see if it works */
+ pristine=ucol_openElements(en_us, test1, u_strlen(test1), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(en_us);
+ return;
+ }
+ status = U_ZERO_ERROR;
+
+ ucol_setOffset(iter, 0, &status);
+ if (U_FAILURE(status))
+ {
+ log_err("setOffset failed. %s\n", myErrorName(status));
+ }
+ else
+ {
+ assertEqual(iter, pristine);
+ }
+
+ ucol_closeElements(pristine);
+ ucol_closeElements(iter);
+ free(orders);
+
+ /* testing offsets in normalization buffer */
+ test1[0] = 0x61;
+ test1[1] = 0x300;
+ test1[2] = 0x316;
+ test1[3] = 0x62;
+ test1[4] = 0;
+ ucol_setAttribute(en_us, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ iter = ucol_openElements(en_us, test1, 4, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(en_us);
+ return;
+ }
+
+ count = 0;
+ while (ucol_next(iter, &status) != UCOL_NULLORDER &&
+ U_SUCCESS(status)) {
+ switch (count) {
+ case 0:
+ if (ucol_getOffset(iter) != 1) {
+ log_err("ERROR: Offset of iteration should be 0\n");
+ }
+ break;
+ case 3:
+ if (ucol_getOffset(iter) != 4) {
+ log_err("ERROR: Offset of iteration should be 4\n");
+ }
+ break;
+ default:
+ if (ucol_getOffset(iter) != 3) {
+ log_err("ERROR: Offset of iteration should be 3\n");
+ }
+ }
+ count ++;
+ }
+
+ ucol_reset(iter);
+ count = 0;
+ while (ucol_previous(iter, &status) != UCOL_NULLORDER &&
+ U_SUCCESS(status)) {
+ switch (count) {
+ case 0:
+ if (ucol_getOffset(iter) != 3) {
+ log_err("ERROR: Offset of iteration should be 3\n");
+ }
+ break;
+ default:
+ if (ucol_getOffset(iter) != 0) {
+ log_err("ERROR: Offset of iteration should be 0\n");
+ }
+ }
+ count ++;
+ }
+
+ if(U_FAILURE(status)){
+ log_err("ERROR: in iterating collation elements %s\n",
+ myErrorName(status));
+ }
+
+ ucol_closeElements(iter);
+ ucol_close(en_us);
+ free(test1);
+ free(test2);
+}
+
+/**
+ * Test for setText()
+ */
+static void TestSetText()
+{
+ int32_t c,i;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *en_us=NULL;
+ UCollationElements *iter1, *iter2;
+ test1=(UChar*)malloc(sizeof(UChar) * 50);
+ test2=(UChar*)malloc(sizeof(UChar) * 50);
+ u_uastrcpy(test1, "What subset of all possible test cases?");
+ u_uastrcpy(test2, "has the highest probability of detecting");
+ en_us = ucol_open("en_US", &status);
+ log_verbose("testing setText for Collation elements\n");
+ iter1=ucol_openElements(en_us, test1, u_strlen(test1), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator1 using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(en_us);
+ return;
+ }
+ iter2=ucol_openElements(en_us, test2, u_strlen(test2), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of collation element iterator2 using ucol_openElements()\n %s\n",
+ myErrorName(status));
+ ucol_close(en_us);
+ return;
+ }
+
+ /* Run through the second iterator just to exercise it */
+ c = ucol_next(iter2, &status);
+ i = 0;
+
+ while ( ++i < 10 && (c != UCOL_NULLORDER))
+ {
+ if (U_FAILURE(status))
+ {
+ log_err("iter2->next() returned an error. %s\n", myErrorName(status));
+ ucol_closeElements(iter2);
+ ucol_closeElements(iter1);
+ ucol_close(en_us);
+ return;
+ }
+
+ c = ucol_next(iter2, &status);
+ }
+
+ /* Now set it to point to the same string as the first iterator */
+ ucol_setText(iter2, test1, u_strlen(test1), &status);
+ if (U_FAILURE(status))
+ {
+ log_err("call to iter2->setText(test1) failed. %s\n", myErrorName(status));
+ }
+ else
+ {
+ assertEqual(iter1, iter2);
+ }
+
+ /* Now set it to point to a null string with fake length*/
+ ucol_setText(iter2, NULL, 2, &status);
+ if (U_FAILURE(status))
+ {
+ log_err("call to iter2->setText(null) failed. %s\n", myErrorName(status));
+ }
+ else
+ {
+ if (ucol_next(iter2, &status) != UCOL_NULLORDER) {
+ log_err("iter2 with null text expected to return UCOL_NULLORDER\n");
+ }
+ }
+
+ ucol_closeElements(iter2);
+ ucol_closeElements(iter1);
+ ucol_close(en_us);
+ free(test1);
+ free(test2);
+}
+
+/** @bug 4108762
+ * Test for getMaxExpansion()
+ */
+static void TestMaxExpansion()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll ;/*= ucol_open("en_US", &status);*/
+ UChar ch = 0;
+ UChar32 unassigned = 0xEFFFD;
+ UChar supplementary[2];
+ uint32_t index = 0;
+ UBool isError = FALSE;
+ uint32_t sorder = 0;
+ UCollationElements *iter ;/*= ucol_openElements(coll, &ch, 1, &status);*/
+ uint32_t temporder = 0;
+
+ UChar rule[256];
+ u_uastrcpy(rule, "&a < ab < c/aba < d < z < ch");
+ coll = ucol_openRules(rule, u_strlen(rule), UCOL_DEFAULT,
+ UCOL_DEFAULT_STRENGTH,NULL, &status);
+ if(U_SUCCESS(status) && coll) {
+ iter = ucol_openElements(coll, &ch, 1, &status);
+
+ while (ch < 0xFFFF && U_SUCCESS(status)) {
+ int count = 1;
+ uint32_t order;
+ int32_t size = 0;
+
+ ch ++;
+
+ ucol_setText(iter, &ch, 1, &status);
+ order = ucol_previous(iter, &status);
+
+ /* thai management */
+ if (order == 0)
+ order = ucol_previous(iter, &status);
+
+ while (U_SUCCESS(status) &&
+ ucol_previous(iter, &status) != UCOL_NULLORDER) {
+ count ++;
+ }
+
+ size = ucol_getMaxExpansion(iter, order);
+ if (U_FAILURE(status) || size < count) {
+ log_err("Failure at codepoint %d, maximum expansion count < %d\n",
+ ch, count);
+ }
+ }
+
+ /* testing for exact max expansion */
+ ch = 0;
+ while (ch < 0x61) {
+ uint32_t order;
+ int32_t size;
+ ucol_setText(iter, &ch, 1, &status);
+ order = ucol_previous(iter, &status);
+ size = ucol_getMaxExpansion(iter, order);
+ if (U_FAILURE(status) || size != 1) {
+ log_err("Failure at codepoint %d, maximum expansion count < %d\n",
+ ch, 1);
+ }
+ ch ++;
+ }
+
+ ch = 0x63;
+ ucol_setText(iter, &ch, 1, &status);
+ temporder = ucol_previous(iter, &status);
+
+ if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 3) {
+ log_err("Failure at codepoint %d, maximum expansion count != %d\n",
+ ch, 3);
+ }
+
+ ch = 0x64;
+ ucol_setText(iter, &ch, 1, &status);
+ temporder = ucol_previous(iter, &status);
+
+ if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 1) {
+ log_err("Failure at codepoint %d, maximum expansion count != %d\n",
+ ch, 3);
+ }
+
+ U16_APPEND(supplementary, index, 2, unassigned, isError);
+ ucol_setText(iter, supplementary, 2, &status);
+ sorder = ucol_previous(iter, &status);
+
+ if (U_FAILURE(status) || ucol_getMaxExpansion(iter, sorder) != 2) {
+ log_err("Failure at codepoint %d, maximum expansion count < %d\n",
+ ch, 2);
+ }
+
+ /* testing jamo */
+ ch = 0x1165;
+
+ ucol_setText(iter, &ch, 1, &status);
+ temporder = ucol_previous(iter, &status);
+ if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) > 3) {
+ log_err("Failure at codepoint %d, maximum expansion count > %d\n",
+ ch, 3);
+ }
+
+ ucol_closeElements(iter);
+ ucol_close(coll);
+
+ /* testing special jamo &a<\u1160 */
+ rule[0] = 0x26;
+ rule[1] = 0x71;
+ rule[2] = 0x3c;
+ rule[3] = 0x1165;
+ rule[4] = 0x2f;
+ rule[5] = 0x71;
+ rule[6] = 0x71;
+ rule[7] = 0x71;
+ rule[8] = 0x71;
+ rule[9] = 0;
+
+ coll = ucol_openRules(rule, u_strlen(rule), UCOL_DEFAULT,
+ UCOL_DEFAULT_STRENGTH,NULL, &status);
+ iter = ucol_openElements(coll, &ch, 1, &status);
+
+ temporder = ucol_previous(iter, &status);
+ if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 6) {
+ log_err("Failure at codepoint %d, maximum expansion count > %d\n",
+ ch, 5);
+ }
+
+ ucol_closeElements(iter);
+ ucol_close(coll);
+ } else {
+ log_data_err("Couldn't open collator\n");
+ }
+
+}
+
+
+static void assertEqual(UCollationElements *i1, UCollationElements *i2)
+{
+ int32_t c1, c2;
+ int32_t count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ do
+ {
+ c1 = ucol_next(i1, &status);
+ c2 = ucol_next(i2, &status);
+
+ if (c1 != c2)
+ {
+ log_err("Error in iteration %d assetEqual between\n %d and %d, they are not equal\n", count, c1, c2);
+ break;
+ }
+
+ count += 1;
+ }
+ while (c1 != UCOL_NULLORDER);
+}
+
+/**
+ * Testing iterators with extremely small buffers
+ */
+static void TestSmallBuffer()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll;
+ UCollationElements *testiter,
+ *iter;
+ int32_t count = 0;
+ int32_t *testorders,
+ *orders;
+
+ UChar teststr[500];
+ UChar str[] = {0x300, 0x31A, 0};
+ /*
+ creating a long string of decomposable characters,
+ since by default the writable buffer is of size 256
+ */
+ while (count < 500) {
+ if ((count & 1) == 0) {
+ teststr[count ++] = 0x300;
+ }
+ else {
+ teststr[count ++] = 0x31A;
+ }
+ }
+
+ coll = ucol_open("th_TH", &status);
+ if(U_SUCCESS(status) && coll) {
+ testiter = ucol_openElements(coll, teststr, 500, &status);
+ iter = ucol_openElements(coll, str, 2, &status);
+
+ orders = getOrders(iter, &count);
+ if (count != 2) {
+ log_err("Error collation elements size is not 2 for \\u0300\\u031A\n");
+ }
+
+ /*
+ this will rearrange the string data to 250 characters of 0x300 first then
+ 250 characters of 0x031A
+ */
+ testorders = getOrders(testiter, &count);
+
+ if (count != 500) {
+ log_err("Error decomposition does not give the right sized collation elements\n");
+ }
+
+ while (count != 0) {
+ /* UCA collation element for 0x0F76 */
+ if ((count > 250 && testorders[-- count] != orders[1]) ||
+ (count <= 250 && testorders[-- count] != orders[0])) {
+ log_err("Error decomposition does not give the right collation element at %d count\n", count);
+ break;
+ }
+ }
+
+ free(testorders);
+ free(orders);
+
+ ucol_reset(testiter);
+ /* ensures that the writable buffer was cleared */
+ if (testiter->iteratordata_.writableBuffer !=
+ testiter->iteratordata_.stackWritableBuffer) {
+ log_err("Error Writable buffer in collation element iterator not reset\n");
+ }
+
+ /* ensures closing of elements done properly to clear writable buffer */
+ ucol_next(testiter, &status);
+ ucol_next(testiter, &status);
+ ucol_closeElements(testiter);
+ ucol_closeElements(iter);
+ ucol_close(coll);
+ } else {
+ log_data_err("Couldn't open collator\n");
+ }
+}
+
+/**
+* Sniplets of code from genuca
+*/
+static int32_t hex2num(char hex) {
+ if(hex>='0' && hex <='9') {
+ return hex-'0';
+ } else if(hex>='a' && hex<='f') {
+ return hex-'a'+10;
+ } else if(hex>='A' && hex<='F') {
+ return hex-'A'+10;
+ } else {
+ return 0;
+ }
+}
+
+/**
+* Getting codepoints from a string
+* @param str character string contain codepoints seperated by space and ended
+* by a semicolon
+* @param codepoints array for storage, assuming size > 5
+* @return position at the end of the codepoint section
+*/
+static char * getCodePoints(char *str, UChar *codepoints) {
+ char *pStartCP = str;
+ char *pEndCP = str + 4;
+
+ *codepoints = (UChar)((hex2num(*pStartCP) << 12) |
+ (hex2num(*(pStartCP + 1)) << 8) |
+ (hex2num(*(pStartCP + 2)) << 4) |
+ (hex2num(*(pStartCP + 3))));
+ codepoints ++;
+ while (*pEndCP != ';') {
+ pStartCP = pEndCP + 1;
+ *codepoints = (UChar)((hex2num(*pStartCP) << 12) |
+ (hex2num(*(pStartCP + 1)) << 8) |
+ (hex2num(*(pStartCP + 2)) << 4) |
+ (hex2num(*(pStartCP + 3))));
+ codepoints ++;
+ pEndCP = pStartCP + 4;
+ }
+ *codepoints = 0;
+ return pEndCP + 1;
+}
+
+/**
+* Sniplets of code from genuca
+*/
+static int32_t
+readElement(char **from, char *to, char separator, UErrorCode *status)
+{
+ if (U_SUCCESS(*status)) {
+ char buffer[1024];
+ int32_t i = 0;
+ while (**from != separator) {
+ if (**from != ' ') {
+ *(buffer+i++) = **from;
+ }
+ (*from)++;
+ }
+ (*from)++;
+ *(buffer + i) = 0;
+ strcpy(to, buffer);
+ return i/2;
+ }
+
+ return 0;
+}
+
+/**
+* Sniplets of code from genuca
+*/
+static uint32_t
+getSingleCEValue(char *primary, char *secondary, char *tertiary,
+ UErrorCode *status)
+{
+ if (U_SUCCESS(*status)) {
+ uint32_t value = 0;
+ char primsave = '\0';
+ char secsave = '\0';
+ char tersave = '\0';
+ char *primend = primary+4;
+ char *secend = secondary+2;
+ char *terend = tertiary+2;
+ uint32_t primvalue;
+ uint32_t secvalue;
+ uint32_t tervalue;
+
+ if (uprv_strlen(primary) > 4) {
+ primsave = *primend;
+ *primend = '\0';
+ }
+
+ if (uprv_strlen(secondary) > 2) {
+ secsave = *secend;
+ *secend = '\0';
+ }
+
+ if (uprv_strlen(tertiary) > 2) {
+ tersave = *terend;
+ *terend = '\0';
+ }
+
+ primvalue = (*primary!='\0')?uprv_strtoul(primary, &primend, 16):0;
+ secvalue = (*secondary!='\0')?uprv_strtoul(secondary, &secend, 16):0;
+ tervalue = (*tertiary!='\0')?uprv_strtoul(tertiary, &terend, 16):0;
+ if(primvalue <= 0xFF) {
+ primvalue <<= 8;
+ }
+
+ value = ((primvalue << UCOL_PRIMARYORDERSHIFT) & UCOL_PRIMARYORDERMASK)
+ | ((secvalue << UCOL_SECONDARYORDERSHIFT) & UCOL_SECONDARYORDERMASK)
+ | (tervalue & UCOL_TERTIARYORDERMASK);
+
+ if(primsave!='\0') {
+ *primend = primsave;
+ }
+ if(secsave!='\0') {
+ *secend = secsave;
+ }
+ if(tersave!='\0') {
+ *terend = tersave;
+ }
+ return value;
+ }
+ return 0;
+}
+
+/**
+* Getting collation elements generated from a string
+* @param str character string contain collation elements contained in [] and
+* seperated by space
+* @param ce array for storage, assuming size > 20
+* @param status error status
+* @return position at the end of the codepoint section
+*/
+static char * getCEs(char *str, uint32_t *ces, UErrorCode *status) {
+ char *pStartCP = uprv_strchr(str, '[');
+ int count = 0;
+ char *pEndCP;
+ char primary[100];
+ char secondary[100];
+ char tertiary[100];
+
+ while (*pStartCP == '[') {
+ uint32_t primarycount = 0;
+ uint32_t secondarycount = 0;
+ uint32_t tertiarycount = 0;
+ uint32_t CEi = 1;
+ pEndCP = strchr(pStartCP, ']');
+ if(pEndCP == NULL) {
+ break;
+ }
+ pStartCP ++;
+
+ primarycount = readElement(&pStartCP, primary, ',', status);
+ secondarycount = readElement(&pStartCP, secondary, ',', status);
+ tertiarycount = readElement(&pStartCP, tertiary, ']', status);
+
+ /* I want to get the CEs entered right here, including continuation */
+ ces[count ++] = getSingleCEValue(primary, secondary, tertiary, status);
+ if (U_FAILURE(*status)) {
+ break;
+ }
+
+ while (2 * CEi < primarycount || CEi < secondarycount ||
+ CEi < tertiarycount) {
+ uint32_t value = UCOL_CONTINUATION_MARKER; /* Continuation marker */
+ if (2 * CEi < primarycount) {
+ value |= ((hex2num(*(primary + 4 * CEi)) & 0xF) << 28);
+ value |= ((hex2num(*(primary + 4 * CEi + 1)) & 0xF) << 24);
+ }
+
+ if (2 * CEi + 1 < primarycount) {
+ value |= ((hex2num(*(primary + 4 * CEi + 2)) & 0xF) << 20);
+ value |= ((hex2num(*(primary + 4 * CEi + 3)) &0xF) << 16);
+ }
+
+ if (CEi < secondarycount) {
+ value |= ((hex2num(*(secondary + 2 * CEi)) & 0xF) << 12);
+ value |= ((hex2num(*(secondary + 2 * CEi + 1)) & 0xF) << 8);
+ }
+
+ if (CEi < tertiarycount) {
+ value |= ((hex2num(*(tertiary + 2 * CEi)) & 0x3) << 4);
+ value |= (hex2num(*(tertiary + 2 * CEi + 1)) & 0xF);
+ }
+
+ CEi ++;
+ ces[count ++] = value;
+ }
+
+ pStartCP = pEndCP + 1;
+ }
+ ces[count] = 0;
+ return pStartCP;
+}
+
+/**
+* Getting the FractionalUCA.txt file stream
+*/
+static FileStream * getFractionalUCA(void)
+{
+ char newPath[256];
+ char backupPath[256];
+ FileStream *result = NULL;
+
+ /* Look inside ICU_DATA first */
+ uprv_strcpy(newPath, ctest_dataSrcDir());
+ uprv_strcat(newPath, "unidata" U_FILE_SEP_STRING );
+ uprv_strcat(newPath, "FractionalUCA.txt");
+
+ /* As a fallback, try to guess where the source data was located
+ * at the time ICU was built, and look there.
+ */
+#if defined (U_TOPSRCDIR)
+ strcpy(backupPath, U_TOPSRCDIR U_FILE_SEP_STRING "data");
+#else
+ {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ strcpy(backupPath, loadTestData(&errorCode));
+ strcat(backupPath, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING "data");
+ }
+#endif
+ strcat(backupPath, U_FILE_SEP_STRING "unidata" U_FILE_SEP_STRING "FractionalUCA.txt");
+
+ result = T_FileStream_open(newPath, "rb");
+
+ if (result == NULL) {
+ result = T_FileStream_open(backupPath, "rb");
+ if (result == NULL) {
+ log_err("Failed to open either %s or %s\n", newPath, backupPath);
+ }
+ }
+ return result;
+}
+
+/**
+* Testing the CEs returned by the iterator
+*/
+static void TestCEs() {
+ FileStream *file = NULL;
+ char line[1024];
+ char *str;
+ UChar codepoints[5];
+ uint32_t ces[20];
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("", &status);
+ uint32_t lineNo = 0;
+
+ if (U_FAILURE(status)) {
+ log_err("Error in opening root collator\n");
+ return;
+ }
+
+ file = getFractionalUCA();
+
+ if (file == NULL) {
+ log_err("*** unable to open input FractionalUCA.txt file ***\n");
+ return;
+ }
+
+
+ while (T_FileStream_readLine(file, line, sizeof(line)) != NULL) {
+ int count = 0;
+ UCollationElements *iter;
+ lineNo++;
+ /* skip this line if it is empty or a comment or is a return value
+ or start of some variable section */
+ if(line[0] == 0 || line[0] == '#' || line[0] == '\n' ||
+ line[0] == 0x000D || line[0] == '[') {
+ continue;
+ }
+
+ str = getCodePoints(line, codepoints);
+
+ /* these are 'fake' codepoints in the fractional UCA, and are used just
+ * for positioning of indirect values. They should not go through this
+ * test.
+ */
+ if(*codepoints == 0xFDD0) {
+ continue;
+ }
+
+ getCEs(str, ces, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error in parsing collation elements in FractionalUCA.txt\n");
+ break;
+ }
+ iter = ucol_openElements(coll, codepoints, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error in opening collation elements\n");
+ break;
+ }
+ for (;;) {
+ uint32_t ce = (uint32_t)ucol_next(iter, &status);
+ if (ce == 0xFFFFFFFF) {
+ ce = 0;
+ }
+ /* we now unconditionally reorder Thai/Lao prevowels, so this
+ * test would fail if we don't skip here.
+ */
+ if(UCOL_ISTHAIPREVOWEL(*codepoints) && ce == 0 && count == 0) {
+ continue;
+ }
+ if (ce != ces[count] || U_FAILURE(status)) {
+ log_err("Collation elements in FractionalUCA.txt and iterators do not match!\n");
+ break;
+ }
+ if (ces[count] == 0) {
+ break;
+ }
+ count ++;
+ }
+ ucol_closeElements(iter);
+ }
+
+ T_FileStream_close(file);
+ ucol_close(coll);
+}
+
+/**
+* Testing the discontigous contractions
+*/
+static void TestDiscontiguos() {
+ const char *rulestr =
+ "&z < AB < X\\u0300 < ABC < X\\u0300\\u0315";
+ UChar rule[50];
+ int rulelen = u_unescape(rulestr, rule, 50);
+ const char *src[] = {
+ "ADB", "ADBC", "A\\u0315B", "A\\u0315BC",
+ /* base character blocked */
+ "XD\\u0300", "XD\\u0300\\u0315",
+ /* non blocking combining character */
+ "X\\u0319\\u0300", "X\\u0319\\u0300\\u0315",
+ /* blocking combining character */
+ "X\\u0314\\u0300", "X\\u0314\\u0300\\u0315",
+ /* contraction prefix */
+ "ABDC", "AB\\u0315C","X\\u0300D\\u0315", "X\\u0300\\u0319\\u0315",
+ "X\\u0300\\u031A\\u0315",
+ /* ends not with a contraction character */
+ "X\\u0319\\u0300D", "X\\u0319\\u0300\\u0315D", "X\\u0300D\\u0315D",
+ "X\\u0300\\u0319\\u0315D", "X\\u0300\\u031A\\u0315D"
+ };
+ const char *tgt[] = {
+ /* non blocking combining character */
+ "A D B", "A D BC", "A \\u0315 B", "A \\u0315 BC",
+ /* base character blocked */
+ "X D \\u0300", "X D \\u0300\\u0315",
+ /* non blocking combining character */
+ "X\\u0300 \\u0319", "X\\u0300\\u0315 \\u0319",
+ /* blocking combining character */
+ "X \\u0314 \\u0300", "X \\u0314 \\u0300\\u0315",
+ /* contraction prefix */
+ "AB DC", "AB \\u0315 C","X\\u0300 D \\u0315", "X\\u0300\\u0315 \\u0319",
+ "X\\u0300 \\u031A \\u0315",
+ /* ends not with a contraction character */
+ "X\\u0300 \\u0319D", "X\\u0300\\u0315 \\u0319D", "X\\u0300 D\\u0315D",
+ "X\\u0300\\u0315 \\u0319D", "X\\u0300 \\u031A\\u0315D"
+ };
+ int size = 20;
+ UCollator *coll;
+ UErrorCode status = U_ZERO_ERROR;
+ int count = 0;
+ UCollationElements *iter;
+ UCollationElements *resultiter;
+
+ coll = ucol_openRules(rule, rulelen, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
+ iter = ucol_openElements(coll, rule, 1, &status);
+ resultiter = ucol_openElements(coll, rule, 1, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("Error opening collation rules\n");
+ return;
+ }
+
+ while (count < size) {
+ UChar str[20];
+ UChar tstr[20];
+ int strLen = u_unescape(src[count], str, 20);
+ UChar *s;
+
+ ucol_setText(iter, str, strLen, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening collation iterator\n");
+ return;
+ }
+
+ u_unescape(tgt[count], tstr, 20);
+ s = tstr;
+
+ log_verbose("count %d\n", count);
+
+ for (;;) {
+ uint32_t ce;
+ UChar *e = u_strchr(s, 0x20);
+ if (e == 0) {
+ e = u_strchr(s, 0);
+ }
+ ucol_setText(resultiter, s, (int32_t)(e - s), &status);
+ ce = ucol_next(resultiter, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error manipulating collation iterator\n");
+ return;
+ }
+ while (ce != UCOL_NULLORDER) {
+ if (ce != (uint32_t)ucol_next(iter, &status) ||
+ U_FAILURE(status)) {
+ log_err("Discontiguos contraction test mismatch\n");
+ return;
+ }
+ ce = ucol_next(resultiter, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error getting next collation element\n");
+ return;
+ }
+ }
+ s = e + 1;
+ if (*e == 0) {
+ break;
+ }
+ }
+ ucol_reset(iter);
+ backAndForth(iter);
+ count ++;
+ }
+ ucol_closeElements(resultiter);
+ ucol_closeElements(iter);
+ ucol_close(coll);
+}
+
+static void TestCEBufferOverflow()
+{
+ UChar str[UCOL_EXPAND_CE_BUFFER_SIZE + 1];
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rule[10];
+ UCollator *coll;
+ UCollationElements *iter;
+
+ u_uastrcpy(rule, "&z < AB");
+ coll = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL,&status);
+ if (U_FAILURE(status)) {
+ log_err("Rule based collator not created for testing ce buffer overflow\n");
+ return;
+ }
+
+ /* 0xDCDC is a trail surrogate hence deemed unsafe by the heuristic
+ test. this will cause an overflow in getPrev */
+ str[0] = 0x0041; /* 'A' */
+ /*uprv_memset(str + 1, 0xE0, sizeof(UChar) * UCOL_EXPAND_CE_BUFFER_SIZE);*/
+ uprv_memset(str + 1, 0xDC, sizeof(UChar) * UCOL_EXPAND_CE_BUFFER_SIZE);
+ str[UCOL_EXPAND_CE_BUFFER_SIZE] = 0x0042; /* 'B' */
+ iter = ucol_openElements(coll, str, UCOL_EXPAND_CE_BUFFER_SIZE + 1,
+ &status);
+ if (ucol_previous(iter, &status) != UCOL_NULLORDER ||
+ status != U_BUFFER_OVERFLOW_ERROR) {
+ log_err("CE buffer expected to overflow with long string of trail surrogates\n");
+ }
+ ucol_closeElements(iter);
+ ucol_close(coll);
+}
+
+/**
+* Byte bounds checks. Checks if each byte in data is between upper and lower
+* inclusive.
+*/
+static UBool checkByteBounds(uint32_t data, char upper, char lower)
+{
+ int count = 4;
+ while (count > 0) {
+ char b = (char)(data & 0xFF);
+ if (b > upper || b < lower) {
+ return FALSE;
+ }
+ data = data >> 8;
+ count --;
+ }
+ return TRUE;
+}
+
+/**
+* Determines case of the string of codepoints.
+* If it is a multiple codepoints it has to treated as a contraction.
+*/
+#if 0
+static uint8_t getCase(const UChar *s, uint32_t len) {
+ UBool lower = FALSE;
+ UBool upper = FALSE;
+ UBool title = FALSE;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar str[256];
+ const UChar *ps = s;
+
+ if (len == 0) {
+ return UCOL_LOWER_CASE;
+ }
+
+ while (len > 0) {
+ UChar c = *ps ++;
+
+ if (u_islower(c)) {
+ lower = TRUE;
+ }
+ if (u_isupper(c)) {
+ upper = TRUE;
+ }
+ if (u_istitle(c)) {
+ title = TRUE;
+ }
+
+ len --;
+ }
+ if ((lower && !upper && !title) || (!lower && !upper && !title)){
+ return UCOL_LOWER_CASE;
+ }
+ if (upper && !lower && !title) {
+ return UCOL_UPPER_CASE;
+ }
+ /* mix of cases here */
+ /* len = unorm_normalize(s, len, UNORM_NFKD, 0, str, 256, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error normalizing data string\n");
+ return UCOL_LOWER_CASE;
+ }*/
+
+ if ((title && len >= 2) || (lower && upper)) {
+ return UCOL_MIXED_CASE;
+ }
+ if (u_isupper(s[0])) {
+ return UCOL_UPPER_CASE;
+ }
+ return UCOL_LOWER_CASE;
+}
+#endif
+
+/**
+* Checking collation element validity given the boundary arguments.
+*/
+static UBool checkCEValidity(const UCollator *coll, const UChar *codepoints,
+ int length, uint32_t primarymax,
+ uint32_t secondarymax)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCollationElements *iter = ucol_openElements(coll, codepoints, length,
+ &status);
+ uint32_t ce;
+ UBool first = TRUE;
+/*
+ UBool upper = FALSE;
+ UBool lower = FALSE;
+*/
+
+ if (U_FAILURE(status)) {
+ log_err("Error creating iterator for testing validity\n");
+ }
+
+ ce = ucol_next(iter, &status);
+
+ while (ce != UCOL_NULLORDER) {
+ if (ce != 0) {
+ uint32_t primary = UCOL_PRIMARYORDER(ce);
+ uint32_t secondary = UCOL_SECONDARYORDER(ce);
+ uint32_t tertiary = UCOL_TERTIARYORDER(ce);
+/* uint32_t scasebits = tertiary & 0xC0;*/
+
+ if ((tertiary == 0 && secondary != 0) ||
+ (tertiary < 0xC0 && secondary == 0 && primary != 0)) {
+ /* n-1th level is not zero when the nth level is
+ except for continuations, this is wrong */
+ log_err("Lower level weight not 0 when high level weight is 0\n");
+ goto fail;
+ }
+ else {
+ /* checks if any byte is illegal ie = 01 02 03. */
+ if (checkByteBounds(ce, 0x3, 0x1)) {
+ log_err("Byte range in CE lies in illegal bounds 0x1 - 0x3\n");
+ goto fail;
+ }
+ }
+ if ((primary != 0 && primary < primarymax)
+ || ((primary & 0xFF) == 0xFF) || (((primary>>8) & 0xFF) == 0xFF)
+ || ((primary & 0xFF) && ((primary & 0xFF) <= 0x03))
+ || (((primary>>8) & 0xFF) && ((primary>>8) & 0xFF) <= 0x03)
+ || (primary >= 0xFE00 && !isContinuation(ce))) {
+ log_err("UCA primary weight out of bounds: %04X for string starting with %04X\n",
+ primary, codepoints[0]);
+ goto fail;
+ }
+ /* case matching not done since data generated by ken */
+ if (first) {
+ if (secondary >= 6 && secondary <= secondarymax) {
+ log_err("Secondary weight out of range\n");
+ goto fail;
+ }
+ first = FALSE;
+ }
+ }
+ ce = ucol_next(iter, &status);
+ }
+ ucol_closeElements(iter);
+ return TRUE;
+fail :
+ ucol_closeElements(iter);
+ return FALSE;
+}
+
+static void TestCEValidity()
+{
+ /* testing UCA collation elements */
+ UErrorCode status = U_ZERO_ERROR;
+ /* en_US has no tailorings */
+ UCollator *coll = ucol_open("root", &status);
+ /* tailored locales */
+ char locale[][11] = {"fr_FR", "ko_KR", "sh_YU", "th_TH", "zh_CN", "zh__PINYIN"};
+ const char *loc;
+ FileStream *file = getFractionalUCA();
+ char line[1024];
+ UChar codepoints[10];
+ int count = 0;
+ int maxCount = 0;
+ UParseError parseError;
+ if (U_FAILURE(status)) {
+ log_err("en_US collator creation failed\n");
+ return;
+ }
+ log_verbose("Testing UCA elements\n");
+ if (file == NULL) {
+ log_err("Fractional UCA data can not be opened\n");
+ return;
+ }
+
+ while (T_FileStream_readLine(file, line, sizeof(line)) != NULL) {
+ if(line[0] == 0 || line[0] == '#' || line[0] == '\n' ||
+ line[0] == 0x000D || line[0] == '[') {
+ continue;
+ }
+
+ getCodePoints(line, codepoints);
+ checkCEValidity(coll, codepoints, u_strlen(codepoints), 5, 86);
+ }
+
+ log_verbose("Testing UCA elements for the whole range of unicode characters\n");
+ codepoints[0] = 0;
+ while (codepoints[0] < 0xFFFF) {
+ if (u_isdefined((UChar32)codepoints[0])) {
+ checkCEValidity(coll, codepoints, 1, 5, 86);
+ }
+ codepoints[0] ++;
+ }
+
+ ucol_close(coll);
+
+ /* testing tailored collation elements */
+ log_verbose("Testing tailored elements\n");
+ if(QUICK) {
+ maxCount = sizeof(locale)/sizeof(locale[0]);
+ } else {
+ maxCount = uloc_countAvailable();
+ }
+ while (count < maxCount) {
+ const UChar *rules = NULL,
+ *current = NULL;
+ UChar *rulesCopy = NULL;
+ int32_t ruleLen = 0;
+
+ uint32_t chOffset = 0;
+ uint32_t chLen = 0;
+ uint32_t exOffset = 0;
+ uint32_t exLen = 0;
+ uint32_t prefixOffset = 0;
+ uint32_t prefixLen = 0;
+ UBool startOfRules = TRUE;
+ UColOptionSet opts;
+
+ UColTokenParser src;
+ uint32_t strength = 0;
+ uint16_t specs = 0;
+ if(QUICK) {
+ loc = locale[count];
+ } else {
+ loc = uloc_getAvailable(count);
+ if(!hasCollationElements(loc)) {
+ count++;
+ continue;
+ }
+ }
+
+ log_verbose("Testing CEs for %s\n", loc);
+
+ coll = ucol_open(loc, &status);
+ if (U_FAILURE(status)) {
+ log_err("%s collator creation failed\n", loc);
+ return;
+ }
+
+ src.opts = &opts;
+ rules = ucol_getRules(coll, &ruleLen);
+
+ if (ruleLen > 0) {
+ rulesCopy = (UChar *)malloc((ruleLen +
+ UCOL_TOK_EXTRA_RULE_SPACE_SIZE) * sizeof(UChar));
+ uprv_memcpy(rulesCopy, rules, ruleLen * sizeof(UChar));
+ src.current = src.source = rulesCopy;
+ src.end = rulesCopy + ruleLen;
+ src.extraCurrent = src.end;
+ src.extraEnd = src.end + UCOL_TOK_EXTRA_RULE_SPACE_SIZE;
+
+ while ((current = ucol_tok_parseNextToken(&src, startOfRules, &parseError,&status)) != NULL) {
+ strength = src.parsedToken.strength;
+ chOffset = src.parsedToken.charsOffset;
+ chLen = src.parsedToken.charsLen;
+ exOffset = src.parsedToken.extensionOffset;
+ exLen = src.parsedToken.extensionLen;
+ prefixOffset = src.parsedToken.prefixOffset;
+ prefixLen = src.parsedToken.prefixLen;
+ specs = src.parsedToken.flags;
+
+ startOfRules = FALSE;
+ uprv_memcpy(codepoints, src.source + chOffset,
+ chLen * sizeof(UChar));
+ codepoints[chLen] = 0;
+ checkCEValidity(coll, codepoints, chLen, 4, 85);
+ }
+ free(rulesCopy);
+ }
+
+ ucol_close(coll);
+ count ++;
+ }
+ T_FileStream_close(file);
+}
+
+static void printSortKeyError(const UChar *codepoints, int length,
+ uint8_t *sortkey, int sklen)
+{
+ int count = 0;
+ log_err("Sortkey not valid for ");
+ while (length > 0) {
+ log_err("0x%04x ", *codepoints);
+ length --;
+ codepoints ++;
+ }
+ log_err("\nSortkey : ");
+ while (count < sklen) {
+ log_err("0x%02x ", sortkey[count]);
+ count ++;
+ }
+ log_err("\n");
+}
+
+/**
+* Checking sort key validity for all levels
+*/
+static UBool checkSortKeyValidity(UCollator *coll,
+ const UChar *codepoints,
+ int length)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCollationStrength strength[5] = {UCOL_PRIMARY, UCOL_SECONDARY,
+ UCOL_TERTIARY, UCOL_QUATERNARY,
+ UCOL_IDENTICAL};
+ int strengthlen = 5;
+ int index = 0;
+ int caselevel = 0;
+
+ while (caselevel < 1) {
+ if (caselevel == 0) {
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_OFF, &status);
+ }
+ else {
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_ON, &status);
+ }
+
+ while (index < strengthlen) {
+ int count01 = 0;
+ uint32_t count = 0;
+ uint8_t sortkey[128];
+ uint32_t sklen;
+
+ ucol_setStrength(coll, strength[index]);
+ sklen = ucol_getSortKey(coll, codepoints, length, sortkey, 128);
+ while (sortkey[count] != 0) {
+ if (sortkey[count] == 2 || (sortkey[count] == 3 && count01 > 0 && index != 4)) {
+ printSortKeyError(codepoints, length, sortkey, sklen);
+ return FALSE;
+ }
+ if (sortkey[count] == 1) {
+ count01 ++;
+ }
+ count ++;
+ }
+
+ if (count + 1 != sklen || (count01 != index + caselevel)) {
+ printSortKeyError(codepoints, length, sortkey, sklen);
+ return FALSE;
+ }
+ index ++;
+ }
+ caselevel ++;
+ }
+ return TRUE;
+}
+
+static void TestSortKeyValidity(void)
+{
+ /* testing UCA collation elements */
+ UErrorCode status = U_ZERO_ERROR;
+ /* en_US has no tailorings */
+ UCollator *coll = ucol_open("en_US", &status);
+ /* tailored locales */
+ char locale[][6] = {"fr_FR", "ko_KR", "sh_YU", "th_TH", "zh_CN"};
+ FileStream *file = getFractionalUCA();
+ char line[1024];
+ UChar codepoints[10];
+ int count = 0;
+ UParseError parseError;
+ if (U_FAILURE(status)) {
+ log_err("en_US collator creation failed\n");
+ return;
+ }
+ log_verbose("Testing UCA elements\n");
+ if (file == NULL) {
+ log_err("Fractional UCA data can not be opened\n");
+ return;
+ }
+
+ while (T_FileStream_readLine(file, line, sizeof(line)) != NULL) {
+ if(line[0] == 0 || line[0] == '#' || line[0] == '\n' ||
+ line[0] == 0x000D || line[0] == '[') {
+ continue;
+ }
+
+ getCodePoints(line, codepoints);
+ checkSortKeyValidity(coll, codepoints, u_strlen(codepoints));
+ }
+
+ log_verbose("Testing UCA elements for the whole range of unicode characters\n");
+ codepoints[0] = 0;
+
+ while (codepoints[0] < 0xFFFF) {
+ if (u_isdefined((UChar32)codepoints[0])) {
+ checkSortKeyValidity(coll, codepoints, 1);
+ }
+ codepoints[0] ++;
+ }
+
+ ucol_close(coll);
+
+ /* testing tailored collation elements */
+ log_verbose("Testing tailored elements\n");
+ while (count < 5) {
+ const UChar *rules = NULL,
+ *current = NULL;
+ UChar *rulesCopy = NULL;
+ int32_t ruleLen = 0;
+
+ uint32_t chOffset = 0;
+ uint32_t chLen = 0;
+ uint32_t exOffset = 0;
+ uint32_t exLen = 0;
+ uint32_t prefixOffset = 0;
+ uint32_t prefixLen = 0;
+ UBool startOfRules = TRUE;
+ UColOptionSet opts;
+
+ UColTokenParser src;
+ uint32_t strength = 0;
+ uint16_t specs = 0;
+
+ coll = ucol_open(locale[count], &status);
+ if (U_FAILURE(status)) {
+ log_err("%s collator creation failed\n", locale[count]);
+ return;
+ }
+
+ src.opts = &opts;
+ rules = ucol_getRules(coll, &ruleLen);
+
+ if (ruleLen > 0) {
+ rulesCopy = (UChar *)malloc((ruleLen +
+ UCOL_TOK_EXTRA_RULE_SPACE_SIZE) * sizeof(UChar));
+ uprv_memcpy(rulesCopy, rules, ruleLen * sizeof(UChar));
+ src.current = src.source = rulesCopy;
+ src.end = rulesCopy + ruleLen;
+ src.extraCurrent = src.end;
+ src.extraEnd = src.end + UCOL_TOK_EXTRA_RULE_SPACE_SIZE;
+
+ while ((current = ucol_tok_parseNextToken(&src, startOfRules,&parseError, &status)) != NULL) {
+ strength = src.parsedToken.strength;
+ chOffset = src.parsedToken.charsOffset;
+ chLen = src.parsedToken.charsLen;
+ exOffset = src.parsedToken.extensionOffset;
+ exLen = src.parsedToken.extensionLen;
+ prefixOffset = src.parsedToken.prefixOffset;
+ prefixLen = src.parsedToken.prefixLen;
+ specs = src.parsedToken.flags;
+
+ startOfRules = FALSE;
+ uprv_memcpy(codepoints, src.source + chOffset,
+ chLen * sizeof(UChar));
+ codepoints[chLen] = 0;
+ checkSortKeyValidity(coll, codepoints, chLen);
+ }
+ free(rulesCopy);
+ }
+
+ ucol_close(coll);
+ count ++;
+ }
+ T_FileStream_close(file);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/citertst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/citertst.h
new file mode 100644
index 00000000000..b810131c898
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/citertst.h
@@ -0,0 +1,118 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CITERTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+
+/**
+ * Collation Iterator tests.
+ * (Let me reiterate my position...)
+ */
+
+#ifndef _CITERCOLLTST
+#define _CITERCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/ucoleitr.h"
+#include "cintltst.h"
+
+#define MAX_TOKEN_LEN 16
+
+ /**
+ * Test for CollationElementIterator previous and next for the whole set of
+ * unicode characters.
+ */
+ static void TestUnicodeChar(void);
+ /**
+ * Test for CollationElementIterator previous and next for the whole set of
+ * unicode characters with normalization on.
+ */
+ static void TestNormalizedUnicodeChar(void);
+ /**
+ * Test incremental normalization
+ */
+ static void TestNormalization(void);
+ /**
+ * Test for CollationElementIterator.previous()
+ *
+ * @bug 4108758 - Make sure it works with contracting characters
+ *
+ */
+ static void TestPrevious(void);
+
+ /**
+ * Test for getOffset() and setOffset()
+ */
+ static void TestOffset(void);
+ /**
+ * Test for setText()
+ */
+ static void TestSetText(void);
+ /** @bug 4108762
+ * Test for getMaxExpansion()
+ */
+ static void TestMaxExpansion(void);
+ /**
+ * Test Bug 672, where different locales give a different offset after
+ * a previous for the same string at the same position
+ */
+ static void TestBug672(void);
+
+ /**
+ * Repeat TestBug672 with normalizatin enabled - this test revealed a bug
+ * in incremental normalization.
+ */
+ static void TestBug672Normalize(void);
+ /**
+ * Test iterators with an relatively small buffer
+ */
+ static void TestSmallBuffer(void);
+ /**
+ * Tests the CEs generated by the iterators.
+ */
+ static void TestCEs(void);
+ /**
+ * Tests the discontiguos contractions
+ */
+ static void TestDiscontiguos(void);
+ /**
+ * Tests that the iterators bails out when the CEBuffer is exhausted
+ */
+ static void TestCEBufferOverflow(void);
+ /**
+ * Tests the validity of CEs generated by the iterators.
+ * Bound checkings.
+ */
+ static void TestCEValidity(void);
+ /**
+ * Tests the validity of sortkeys generated by the iterators.
+ * Bound checkings.
+ */
+ static void TestSortKeyValidity(void);
+
+ /*------------------------------------------------------------------------
+ Internal utilities
+ */
+
+
+ static void assertEqual(UCollationElements *i1, UCollationElements *i2);
+
+
+ static UChar *test1;
+ static UChar *test2;
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.c
new file mode 100644
index 00000000000..7318e07cb93
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.c
@@ -0,0 +1,255 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CJAPTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+* synwee Added TestBase, TestPlainDakutenHandakuten,
+* TestSmallLarge, TestKatakanaHiragana,
+* TestChooonKigoo
+*********************************************************************************/
+/**
+ * CollationKannaTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "cjaptst.h"
+#include "unicode/ustring.h"
+#include "string.h"
+
+static UCollator *myCollation;
+const static UChar testSourceCases[][MAX_TOKEN_LEN] = {
+ {0xff9E, 0x0000},
+ {0x3042, 0x0000},
+ {0x30A2, 0x0000},
+ {0x3042, 0x3042, 0x0000},
+ {0x30A2, 0x30FC, 0x0000},
+ {0x30A2, 0x30FC, 0x30C8, 0x0000} /* 6 */
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] = {
+ {0xFF9F, 0x0000},
+ {0x30A2, 0x0000},
+ {0x3042, 0x3042, 0x0000},
+ {0x30A2, 0x30FC, 0x0000},
+ {0x30A2, 0x30FC, 0x30C8, 0x0000},
+ {0x3042, 0x3042, 0x3068, 0x0000} /* 6 */
+};
+
+const static UCollationResult results[] = {
+ UCOL_LESS,
+ UCOL_EQUAL, /*UCOL_LESS*/ /* Katakanas and Hiraganas are equal on tertiary level(ICU 2.0)*/
+ UCOL_LESS,
+ UCOL_GREATER, /*UCOL_LESS*/ /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/
+ UCOL_LESS,
+ UCOL_LESS, /*UCOL_GREATER*/ /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*//* 6 */
+};
+
+const static UChar testBaseCases[][MAX_TOKEN_LEN] = {
+ {0x30AB, 0x0000},
+ {0x30AB, 0x30AD, 0x0000},
+ {0x30AD, 0x0000},
+ {0x30AD, 0x30AD, 0x0000}
+};
+
+const static UChar testPlainDakutenHandakutenCases[][MAX_TOKEN_LEN] = {
+ {0x30CF, 0x30AB, 0x0000},
+ {0x30D0, 0x30AB, 0x0000},
+ {0x30CF, 0x30AD, 0x0000},
+ {0x30D0, 0x30AD, 0x0000}
+};
+
+const static UChar testSmallLargeCases[][MAX_TOKEN_LEN] = {
+ {0x30C3, 0x30CF, 0x0000},
+ {0x30C4, 0x30CF, 0x0000},
+ {0x30C3, 0x30D0, 0x0000},
+ {0x30C4, 0x30D0, 0x0000}
+};
+
+const static UChar testKatakanaHiraganaCases[][MAX_TOKEN_LEN] = {
+ {0x3042, 0x30C3, 0x0000},
+ {0x30A2, 0x30C3, 0x0000},
+ {0x3042, 0x30C4, 0x0000},
+ {0x30A2, 0x30C4, 0x0000}
+};
+
+const static UChar testChooonKigooCases[][MAX_TOKEN_LEN] = {
+ /*0*/ {0x30AB, 0x30FC, 0x3042, 0x0000},
+ /*1*/ {0x30AB, 0x30FC, 0x30A2, 0x0000},
+ /*2*/ {0x30AB, 0x30A4, 0x3042, 0x0000},
+ /*3*/ {0x30AB, 0x30A4, 0x30A2, 0x0000},
+ /*6*/ {0x30AD, 0x30FC, 0x3042, 0x0000}, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/
+ /*7*/ {0x30AD, 0x30FC, 0x30A2, 0x0000}, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/
+ /*4*/ {0x30AD, 0x30A4, 0x3042, 0x0000},
+ /*5*/ {0x30AD, 0x30A4, 0x30A2, 0x0000},
+};
+
+void addKannaCollTest(TestNode** root)
+{
+ addTest(root, &TestTertiary, "tscoll/cjacoll/TestTertiary");
+ addTest(root, &TestBase, "tscoll/cjacoll/TestBase");
+ addTest(root, &TestPlainDakutenHandakuten, "tscoll/cjacoll/TestPlainDakutenHandakuten");
+ addTest(root, &TestSmallLarge, "tscoll/cjacoll/TestSmallLarge");
+ addTest(root, &TestKatakanaHiragana, "tscoll/cjacoll/TestKatakanaHiragana");
+ addTest(root, &TestChooonKigoo, "tscoll/cjacoll/TestChooonKigoo");
+}
+
+static void TestTertiary( )
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("ja_JP", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing Kanna(Japan) Collation with Tertiary strength\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ ucol_setAttribute(myCollation, UCOL_CASE_LEVEL, UCOL_ON, &status);
+ for (i = 0; i < 6 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+/* Testing base letters */
+static void TestBase()
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("ja_JP", &status);
+ if (U_FAILURE(status))
+ {
+ log_err("ERROR: in creation of rule based collator: %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ log_verbose("Testing Japanese Base Characters Collation\n");
+ ucol_setStrength(myCollation, UCOL_PRIMARY);
+ for (i = 0; i < 3 ; i++)
+ doTest(myCollation, testBaseCases[i], testBaseCases[i + 1], UCOL_LESS);
+
+ ucol_close(myCollation);
+}
+
+/* Testing plain, Daku-ten, Handaku-ten letters */
+static void TestPlainDakutenHandakuten(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("ja_JP", &status);
+ if (U_FAILURE(status))
+ {
+ log_err("ERROR: in creation of rule based collator: %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ log_verbose("Testing plain, Daku-ten, Handaku-ten letters Japanese Characters Collation\n");
+ ucol_setStrength(myCollation, UCOL_SECONDARY);
+ for (i = 0; i < 3 ; i++)
+ doTest(myCollation, testPlainDakutenHandakutenCases[i],
+ testPlainDakutenHandakutenCases[i + 1], UCOL_LESS);
+
+ ucol_close(myCollation);
+}
+
+/*
+* Test Small, Large letters
+*/
+static void TestSmallLarge(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("ja_JP", &status);
+ if (U_FAILURE(status))
+ {
+ log_err("ERROR: in creation of rule based collator: %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ log_verbose("Testing Japanese Small and Large Characters Collation\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ ucol_setAttribute(myCollation, UCOL_CASE_LEVEL, UCOL_ON, &status);
+ for (i = 0; i < 3 ; i++)
+ doTest(myCollation, testSmallLargeCases[i], testSmallLargeCases[i + 1],
+ UCOL_LESS);
+
+ ucol_close(myCollation);
+}
+
+/*
+* Test Katakana, Hiragana letters
+*/
+static void TestKatakanaHiragana(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("ja_JP", &status);
+ if (U_FAILURE(status))
+ {
+ log_err("ERROR: in creation of rule based collator: %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ log_verbose("Testing Japanese Katakana, Hiragana Characters Collation\n");
+ ucol_setStrength(myCollation, UCOL_QUATERNARY);
+ ucol_setAttribute(myCollation, UCOL_CASE_LEVEL, UCOL_ON, &status);
+ for (i = 0; i < 3 ; i++) {
+ doTest(myCollation, testKatakanaHiraganaCases[i],
+ testKatakanaHiraganaCases[i + 1], UCOL_LESS);
+ }
+
+ ucol_close(myCollation);
+}
+
+/*
+* Test Choo-on kigoo
+*/
+static void TestChooonKigoo(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("ja_JP", &status);
+ if (U_FAILURE(status))
+ {
+ log_err("ERROR: in creation of rule based collator: %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ log_verbose("Testing Japanese Choo-on Kigoo Characters Collation\n");
+ ucol_setAttribute(myCollation, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
+ ucol_setAttribute(myCollation, UCOL_CASE_LEVEL, UCOL_ON, &status);
+ for (i = 0; i < 7 ; i++) {
+ doTest(myCollation, testChooonKigooCases[i], testChooonKigooCases[i + 1],
+ UCOL_LESS);
+ }
+
+ ucol_close(myCollation);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.h
new file mode 100644
index 00000000000..311976b706b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cjaptst.h
@@ -0,0 +1,63 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CJAPTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+* synwee Added TestBase, TestPlainDakutenHandakuten,
+* TestSmallLarge, TestKatakanaHiragana,
+* TestChooonKigoo
+*********************************************************************************/
+/**
+ * CollationKannaTest(JAPAN) is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _CJACOLLTST
+#define _CJACOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+
+#define MAX_TOKEN_LEN 16
+
+
+ /*perform test with strength TERTIARY*/
+static void TestTertiary(void);
+
+/* Testing base letters */
+static void TestBase(void);
+
+/* Testing plain, Daku-ten, Handaku-ten letters */
+static void TestPlainDakutenHandakuten(void);
+
+/*
+* Test Small, Large letters
+*/
+static void TestSmallLarge(void);
+
+/*
+* Test Katakana, Hiragana letters
+*/
+static void TestKatakanaHiragana(void);
+
+/*
+* Test Choo-on kigoo
+*/
+static void TestChooonKigoo(void);
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cldrtest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cldrtest.c
new file mode 100644
index 00000000000..b7ba4fe9b98
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cldrtest.c
@@ -0,0 +1,1294 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "cintltst.h"
+#include "unicode/ures.h"
+#include "unicode/ucurr.h"
+#include "unicode/ustring.h"
+#include "unicode/uset.h"
+#include "unicode/udat.h"
+#include "unicode/uscript.h"
+#include "unicode/ulocdata.h"
+#include "cstring.h"
+#include "locmap.h"
+#include "uresimp.h"
+
+/*--------------------------------------------------------------------
+ Time bomb - allows temporary behavior that expires at a given
+ release
+ ---------------------------------------------------------------------*/
+static const UVersionInfo ICU_37 = {3,7,0,0};
+
+/*
+returns a new UnicodeSet that is a flattened form of the original
+UnicodeSet.
+*/
+static USet*
+createFlattenSet(USet *origSet, UErrorCode *status) {
+
+
+ USet *newSet = NULL;
+ int32_t origItemCount = 0;
+ int32_t idx, graphmeSize;
+ UChar32 start, end;
+ UChar graphme[64];
+ if (U_FAILURE(*status)) {
+ log_err("createFlattenSet called with %s\n", u_errorName(*status));
+ return NULL;
+ }
+ newSet = uset_open(1, 0);
+ origItemCount = uset_getItemCount(origSet);
+ for (idx = 0; idx < origItemCount; idx++) {
+ graphmeSize = uset_getItem(origSet, idx,
+ &start, &end,
+ graphme, (int32_t)(sizeof(graphme)/sizeof(graphme[0])),
+ status);
+ if (U_FAILURE(*status)) {
+ log_err("ERROR: uset_getItem returned %s\n", u_errorName(*status));
+ *status = U_ZERO_ERROR;
+ }
+ if (graphmeSize) {
+ uset_addAllCodePoints(newSet, graphme, graphmeSize);
+ }
+ else {
+ uset_addRange(newSet, start, end);
+ }
+ }
+ return newSet;
+}
+static UBool
+isCurrencyPreEuro(const char* currencyKey){
+ if( strcmp(currencyKey, "PTE") == 0 ||
+ strcmp(currencyKey, "ESP") == 0 ||
+ strcmp(currencyKey, "LUF") == 0 ||
+ strcmp(currencyKey, "GRD") == 0 ||
+ strcmp(currencyKey, "BEF") == 0 ||
+ strcmp(currencyKey, "ITL") == 0 ||
+ strcmp(currencyKey, "EEK") == 0){
+ return TRUE;
+ }
+ return FALSE;
+}
+static void
+TestKeyInRootRecursive(UResourceBundle *root, const char *rootName,
+ UResourceBundle *currentBundle, const char *locale) {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UResourceBundle *subRootBundle = NULL, *subBundle = NULL;
+
+ ures_resetIterator(root);
+ ures_resetIterator(currentBundle);
+ while (ures_hasNext(currentBundle)) {
+ const char *subBundleKey = NULL;
+ const char *currentBundleKey = NULL;
+
+ errorCode = U_ZERO_ERROR;
+ currentBundleKey = ures_getKey(currentBundle);
+ subBundle = ures_getNextResource(currentBundle, NULL, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("Can't open a resource for locale %s. Error: %s\n", locale, u_errorName(errorCode));
+ continue;
+ }
+ subBundleKey = ures_getKey(subBundle);
+
+
+ subRootBundle = ures_getByKey(root, subBundleKey, NULL, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("Can't open a resource with key \"%s\" in \"%s\" from %s for locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ rootName,
+ locale);
+ ures_close(subBundle);
+ continue;
+ }
+ if (ures_getType(subRootBundle) != ures_getType(subBundle)) {
+ log_err("key \"%s\" in \"%s\" has a different type from root for locale \"%s\"\n"
+ "\troot=%d, locale=%d\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale,
+ ures_getType(subRootBundle),
+ ures_getType(subBundle));
+ ures_close(subBundle);
+ continue;
+ }
+ else if (ures_getType(subBundle) == URES_INT_VECTOR) {
+ int32_t minSize;
+ int32_t subBundleSize;
+ int32_t idx;
+ UBool sameArray = TRUE;
+ const int32_t *subRootBundleArr = ures_getIntVector(subRootBundle, &minSize, &errorCode);
+ const int32_t *subBundleArr = ures_getIntVector(subBundle, &subBundleSize, &errorCode);
+
+ if (minSize > subBundleSize) {
+ minSize = subBundleSize;
+ log_err("Arrays are different size with key \"%s\" in \"%s\" from root for locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ }
+
+ for (idx = 0; idx < minSize && sameArray; idx++) {
+ if (subRootBundleArr[idx] != subBundleArr[idx]) {
+ sameArray = FALSE;
+ }
+ if (strcmp(subBundleKey, "DateTimeElements") == 0
+ && (subBundleArr[idx] < 1 || 7 < subBundleArr[idx]))
+ {
+ log_err("Value out of range with key \"%s\" at index %d in \"%s\" for locale \"%s\"\n",
+ subBundleKey,
+ idx,
+ ures_getKey(currentBundle),
+ locale);
+ }
+ }
+ /* Special exception es_US and DateTimeElements */
+ if (sameArray
+ && !(strcmp(locale, "es_US") == 0 && strcmp(subBundleKey, "DateTimeElements") == 0))
+ {
+ log_err("Integer vectors are the same with key \"%s\" in \"%s\" from root for locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ }
+ }
+ else if (ures_getType(subBundle) == URES_ARRAY) {
+ UResourceBundle *subSubBundle = ures_getByIndex(subBundle, 0, NULL, &errorCode);
+ UResourceBundle *subSubRootBundle = ures_getByIndex(subRootBundle, 0, NULL, &errorCode);
+
+ if (U_SUCCESS(errorCode)
+ && (ures_getType(subSubBundle) == URES_ARRAY || ures_getType(subSubRootBundle) == URES_ARRAY))
+ {
+ /* Here is one of the recursive parts */
+ TestKeyInRootRecursive(subRootBundle, rootName, subBundle, locale);
+ }
+ else {
+ int32_t minSize = ures_getSize(subRootBundle);
+ int32_t idx;
+ UBool sameArray = TRUE;
+
+ if (minSize > ures_getSize(subBundle)) {
+ minSize = ures_getSize(subBundle);
+ }
+
+ if ((subBundleKey == NULL
+ || (subBundleKey != NULL && strcmp(subBundleKey, "LocaleScript") != 0 && !isCurrencyPreEuro(subBundleKey)))
+ && ures_getSize(subRootBundle) != ures_getSize(subBundle))
+ {
+ log_err("Different size array with key \"%s\" in \"%s\" from root for locale \"%s\"\n"
+ "\troot array size=%d, locale array size=%d\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale,
+ ures_getSize(subRootBundle),
+ ures_getSize(subBundle));
+ }
+ /*
+ if(isCurrencyPreEuro(subBundleKey) && ures_getSize(subBundle)!=3){
+ log_err("Different size array with key \"%s\" in \"%s\" for locale \"%s\" the expected size is 3 got size=%d\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale,
+ ures_getSize(subBundle));
+ }
+ */
+ for (idx = 0; idx < minSize; idx++) {
+ int32_t rootStrLen, localeStrLen;
+ const UChar *rootStr = ures_getStringByIndex(subRootBundle,idx,&rootStrLen,&errorCode);
+ const UChar *localeStr = ures_getStringByIndex(subBundle,idx,&localeStrLen,&errorCode);
+ if (rootStr && localeStr && U_SUCCESS(errorCode)) {
+ if (u_strcmp(rootStr, localeStr) != 0) {
+ sameArray = FALSE;
+ }
+ }
+ else {
+ log_err("Got a NULL string with key \"%s\" in \"%s\" at index %d for root or locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ idx,
+ locale);
+ continue;
+ }
+ if (localeStr[0] == (UChar)0x20) {
+ log_err("key \"%s\" at index %d in \"%s\" starts with a space in locale \"%s\"\n",
+ subBundleKey,
+ idx,
+ ures_getKey(currentBundle),
+ locale);
+ }
+ else if (localeStr[localeStrLen - 1] == (UChar)0x20) {
+ log_err("key \"%s\" at index %d in \"%s\" ends with a space in locale \"%s\"\n",
+ subBundleKey,
+ idx,
+ ures_getKey(currentBundle),
+ locale);
+ }
+ else if (subBundleKey != NULL
+ && strcmp(subBundleKey, "DateTimePatterns") == 0)
+ {
+ int32_t quoted = 0;
+ const UChar *localeStrItr = localeStr;
+ while (*localeStrItr) {
+ if (*localeStrItr == (UChar)0x27 /* ' */) {
+ quoted++;
+ }
+ else if ((quoted % 2) == 0) {
+ /* Search for unquoted characters */
+ if (4 <= idx && idx <= 7
+ && (*localeStrItr == (UChar)0x6B /* k */
+ || *localeStrItr == (UChar)0x48 /* H */
+ || *localeStrItr == (UChar)0x6D /* m */
+ || *localeStrItr == (UChar)0x73 /* s */
+ || *localeStrItr == (UChar)0x53 /* S */
+ || *localeStrItr == (UChar)0x61 /* a */
+ || *localeStrItr == (UChar)0x68 /* h */
+ || *localeStrItr == (UChar)0x7A /* z */))
+ {
+ log_err("key \"%s\" at index %d has time pattern chars in date for locale \"%s\"\n",
+ subBundleKey,
+ idx,
+ locale);
+ }
+ else if (0 <= idx && idx <= 3
+ && (*localeStrItr == (UChar)0x47 /* G */
+ || *localeStrItr == (UChar)0x79 /* y */
+ || *localeStrItr == (UChar)0x4D /* M */
+ || *localeStrItr == (UChar)0x64 /* d */
+ || *localeStrItr == (UChar)0x45 /* E */
+ || *localeStrItr == (UChar)0x44 /* D */
+ || *localeStrItr == (UChar)0x46 /* F */
+ || *localeStrItr == (UChar)0x77 /* w */
+ || *localeStrItr == (UChar)0x57 /* W */))
+ {
+ log_err("key \"%s\" at index %d has date pattern chars in time for locale \"%s\"\n",
+ subBundleKey,
+ idx,
+ locale);
+ }
+ }
+ localeStrItr++;
+ }
+ }
+ else if (idx == 4 && subBundleKey != NULL
+ && strcmp(subBundleKey, "NumberElements") == 0
+ && u_charDigitValue(localeStr[0]) != 0)
+ {
+ log_err("key \"%s\" at index %d has a non-zero based number for locale \"%s\"\n",
+ subBundleKey,
+ idx,
+ locale);
+ }
+ }
+/* if (sameArray && strcmp(rootName, "root") == 0) {
+ log_err("Arrays are the same with key \"%s\" in \"%s\" from root for locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ }*/
+ }
+ ures_close(subSubBundle);
+ ures_close(subSubRootBundle);
+ }
+ else if (ures_getType(subBundle) == URES_STRING) {
+ int32_t len = 0;
+ const UChar *string = ures_getString(subBundle, &len, &errorCode);
+ if (U_FAILURE(errorCode) || string == NULL) {
+ log_err("Can't open a string with key \"%s\" in \"%s\" for locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ } else if (string[0] == (UChar)0x20) {
+ log_err("key \"%s\" in \"%s\" starts with a space in locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ } else if (string[len - 1] == (UChar)0x20) {
+ log_err("key \"%s\" in \"%s\" ends with a space in locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ } else if (strcmp(subBundleKey, "localPatternChars") == 0) {
+ /* Note: We no longer import localPatternChars data starting
+ * ICU 3.8. So it never comes into this else if block. (ticket#5597)
+ */
+
+ /* Check well-formedness of localPatternChars. First, the
+ * length must match the number of fields defined by
+ * DateFormat. Second, each character in the string must
+ * be in the set [A-Za-z]. Finally, each character must be
+ * unique.
+ */
+ int32_t i,j;
+#if !UCONFIG_NO_FORMATTING
+ if (len != UDAT_FIELD_COUNT) {
+ log_err("key \"%s\" has the wrong number of characters in locale \"%s\"\n",
+ subBundleKey,
+ locale);
+ }
+#endif
+ /* Check char validity. */
+ for (i=0; i<len; ++i) {
+ if (!((string[i] >= 65/*'A'*/ && string[i] <= 90/*'Z'*/) ||
+ (string[i] >= 97/*'a'*/ && string[i] <= 122/*'z'*/))) {
+ log_err("key \"%s\" has illegal character '%c' in locale \"%s\"\n",
+ subBundleKey,
+ (char) string[i],
+ locale);
+ }
+ /* Do O(n^2) check for duplicate chars. */
+ for (j=0; j<i; ++j) {
+ if (string[j] == string[i]) {
+ log_err("key \"%s\" has duplicate character '%c' in locale \"%s\"\n",
+ subBundleKey,
+ (char) string[i],
+ locale);
+ }
+ }
+ }
+ }
+ /* No fallback was done. Check for duplicate data */
+ /* The ures_* API does not do fallback of sub-resource bundles,
+ So we can't do this now. */
+#if 0
+ else if (strcmp(locale, "root") != 0 && errorCode == U_ZERO_ERROR) {
+
+ const UChar *rootString = ures_getString(subRootBundle, &len, &errorCode);
+ if (U_FAILURE(errorCode) || rootString == NULL) {
+ log_err("Can't open a string with key \"%s\" in \"%s\" in root\n",
+ ures_getKey(subRootBundle),
+ ures_getKey(currentBundle));
+ continue;
+ } else if (u_strcmp(string, rootString) == 0) {
+ if (strcmp(locale, "de_CH") != 0 && strcmp(subBundleKey, "Countries") != 0 &&
+ strcmp(subBundleKey, "Version") != 0) {
+ log_err("Found duplicate data with key \"%s\" in \"%s\" in locale \"%s\"\n",
+ ures_getKey(subRootBundle),
+ ures_getKey(currentBundle),
+ locale);
+ }
+ else {
+ /* Ignore for now. */
+ /* Can be fixed if fallback through de locale was done. */
+ log_verbose("Skipping key %s in %s\n", subBundleKey, locale);
+ }
+ }
+ }
+#endif
+ }
+ else if (ures_getType(subBundle) == URES_TABLE) {
+ if (strcmp(subBundleKey, "availableFormats")!=0) {
+ /* Here is one of the recursive parts */
+ TestKeyInRootRecursive(subRootBundle, rootName, subBundle, locale);
+ }
+ else {
+ log_verbose("Skipping key %s in %s\n", subBundleKey, locale);
+ }
+ }
+ else if (ures_getType(subBundle) == URES_BINARY || ures_getType(subBundle) == URES_INT) {
+ /* Can't do anything to check it */
+ /* We'll assume it's all correct */
+ if (strcmp(subBundleKey, "MeasurementSystem") != 0) {
+ log_verbose("Skipping key \"%s\" in \"%s\" for locale \"%s\"\n",
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ }
+ /* Testing for MeasurementSystem is done in VerifyTranslation */
+ }
+ else {
+ log_err("Type %d for key \"%s\" in \"%s\" is unknown for locale \"%s\"\n",
+ ures_getType(subBundle),
+ subBundleKey,
+ ures_getKey(currentBundle),
+ locale);
+ }
+ ures_close(subRootBundle);
+ ures_close(subBundle);
+ }
+}
+
+
+static void
+testLCID(UResourceBundle *currentBundle,
+ const char *localeName)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ uint32_t expectedLCID;
+ char lcidStringC[64] = {0};
+
+ expectedLCID = uloc_getLCID(localeName);
+ if (expectedLCID == 0) {
+ log_verbose("INFO: %-5s does not have any LCID mapping\n",
+ localeName);
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+ uprv_strcpy(lcidStringC, uprv_convertToPosix(expectedLCID, &status));
+ if (U_FAILURE(status)) {
+ log_err("ERROR: %.4x does not have a POSIX mapping due to %s\n",
+ expectedLCID, u_errorName(status));
+ }
+
+ if(strcmp(localeName, lcidStringC) != 0) {
+ char langName[1024];
+ char langLCID[1024];
+ uloc_getLanguage(localeName, langName, sizeof(langName), &status);
+ uloc_getLanguage(lcidStringC, langLCID, sizeof(langLCID), &status);
+
+ if (strcmp(langName, langLCID) == 0) {
+ log_verbose("WARNING: %-5s resolves to %s (0x%.4x)\n",
+ localeName, lcidStringC, expectedLCID);
+ }
+ else {
+ log_err("ERROR: %-5s has 0x%.4x and the number resolves wrongfully to %s\n",
+ localeName, expectedLCID, lcidStringC);
+ }
+ }
+}
+
+static void
+TestLocaleStructure(void) {
+ UResourceBundle *root, *currentLocale;
+ int32_t locCount = uloc_countAvailable();
+ int32_t locIndex;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ const char *currLoc, *resolvedLoc;
+
+ /* TODO: Compare against parent's data too. This code can't handle fallbacks that some tools do already. */
+/* char locName[ULOC_FULLNAME_CAPACITY];
+ char *locNamePtr;
+
+ for (locIndex = 0; locIndex < locCount; locIndex++) {
+ errorCode=U_ZERO_ERROR;
+ strcpy(locName, uloc_getAvailable(locIndex));
+ locNamePtr = strrchr(locName, '_');
+ if (locNamePtr) {
+ *locNamePtr = 0;
+ }
+ else {
+ strcpy(locName, "root");
+ }
+
+ root = ures_openDirect(NULL, locName, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Can't open %s\n", locName);
+ continue;
+ }
+*/
+ if (locCount <= 1) {
+ log_data_err("At least root needs to be installed\n");
+ }
+
+ root = ures_openDirect(loadTestData(&errorCode), "structLocale", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Can't open structLocale\n");
+ return;
+ }
+ for (locIndex = 0; locIndex < locCount; locIndex++) {
+ errorCode=U_ZERO_ERROR;
+ currLoc = uloc_getAvailable(locIndex);
+ currentLocale = ures_open(NULL, currLoc, &errorCode);
+ if(errorCode != U_ZERO_ERROR) {
+ if(U_SUCCESS(errorCode)) {
+ /* It's installed, but there is no data.
+ It's installed for the g18n white paper [grhoten] */
+ log_err("ERROR: Locale %-5s not installed, and it should be!\n",
+ uloc_getAvailable(locIndex));
+ } else {
+ log_err("%%%%%%% Unexpected error %d in %s %%%%%%%",
+ u_errorName(errorCode),
+ uloc_getAvailable(locIndex));
+ }
+ ures_close(currentLocale);
+ continue;
+ }
+ ures_getStringByKey(currentLocale, "Version", NULL, &errorCode);
+ if(errorCode != U_ZERO_ERROR) {
+ log_err("No version information is available for locale %s, and it should be!\n",
+ currLoc);
+ }
+ else if (ures_getStringByKey(currentLocale, "Version", NULL, &errorCode)[0] == (UChar)(0x78)) {
+ log_verbose("WARNING: The locale %s is experimental! It shouldn't be listed as an installed locale.\n",
+ currLoc);
+ }
+ resolvedLoc = ures_getLocaleByType(currentLocale, ULOC_ACTUAL_LOCALE, &errorCode);
+ if (strcmp(resolvedLoc, currLoc) != 0) {
+ /* All locales have at least a Version resource.
+ If it's absolutely empty, then the previous test will fail too.*/
+ log_err("Locale resolves to different locale. Is %s an alias of %s?\n",
+ currLoc, resolvedLoc);
+ }
+ TestKeyInRootRecursive(root, "root", currentLocale, currLoc);
+
+ testLCID(currentLocale, currLoc);
+
+ ures_close(currentLocale);
+ }
+
+ ures_close(root);
+}
+
+static void
+compareArrays(const char *keyName,
+ UResourceBundle *fromArray, const char *fromLocale,
+ UResourceBundle *toArray, const char *toLocale,
+ int32_t start, int32_t end)
+{
+ int32_t fromSize = ures_getSize(fromArray);
+ int32_t toSize = ures_getSize(fromArray);
+ int32_t idx;
+ UErrorCode errorCode = U_ZERO_ERROR;
+
+ if (fromSize > toSize) {
+ fromSize = toSize;
+ log_err("Arrays are different size from \"%s\" to \"%s\"\n",
+ fromLocale,
+ toLocale);
+ }
+
+ for (idx = start; idx <= end; idx++) {
+ const UChar *fromBundleStr = ures_getStringByIndex(fromArray, idx, NULL, &errorCode);
+ const UChar *toBundleStr = ures_getStringByIndex(toArray, idx, NULL, &errorCode);
+ if (fromBundleStr && toBundleStr && u_strcmp(fromBundleStr, toBundleStr) != 0)
+ {
+ log_err("Difference for %s at index %d from %s= \"%s\" to %s= \"%s\"\n",
+ keyName,
+ idx,
+ fromLocale,
+ austrdup(fromBundleStr),
+ toLocale,
+ austrdup(toBundleStr));
+ }
+ }
+}
+
+static void
+compareConsistentCountryInfo(const char *fromLocale, const char *toLocale) {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UResourceBundle *fromDateTimeElements, *toDateTimeElements, *fromWeekendData = NULL, *toWeekendData = NULL;
+ UResourceBundle *fromArray, *toArray;
+ UResourceBundle *fromLocaleBund = ures_open(NULL, fromLocale, &errorCode);
+ UResourceBundle *toLocaleBund = ures_open(NULL, toLocale, &errorCode);
+ UResourceBundle *toCalendar, *fromCalendar, *toGregorian, *fromGregorian;
+
+ if(U_FAILURE(errorCode)) {
+ log_err("Can't open resource bundle %s or %s - %s\n", fromLocale, toLocale, u_errorName(errorCode));
+ return;
+ }
+ fromCalendar = ures_getByKey(fromLocaleBund, "calendar", NULL, &errorCode);
+ fromGregorian = ures_getByKeyWithFallback(fromCalendar, "gregorian", NULL, &errorCode);
+ fromDateTimeElements = ures_getByKeyWithFallback(fromGregorian, "DateTimeElements", NULL, &errorCode);
+
+ toCalendar = ures_getByKey(toLocaleBund, "calendar", NULL, &errorCode);
+ toGregorian = ures_getByKeyWithFallback(toCalendar, "gregorian", NULL, &errorCode);
+ toDateTimeElements = ures_getByKeyWithFallback(toGregorian, "DateTimeElements", NULL, &errorCode);
+
+ if(U_FAILURE(errorCode)){
+ log_err("Did not get DateTimeElements from the bundle %s or %s\n", fromLocale, toLocale);
+ goto cleanup;
+ }
+
+ fromWeekendData = ures_getByKeyWithFallback(fromGregorian, "weekend", NULL, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("Did not get weekend data from the bundle %s to compare against %s\n", fromLocale, toLocale);
+ goto cleanup;
+ }
+ toWeekendData = ures_getByKeyWithFallback(toGregorian, "weekend", NULL, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("Did not get weekend data from the bundle %s to compare against %s\n", toLocale, fromLocale);
+ goto cleanup;
+ }
+
+ if (strcmp(fromLocale, "ar_IN") != 0)
+ {
+ int32_t fromSize;
+ int32_t toSize;
+ int32_t idx;
+ const int32_t *fromBundleArr = ures_getIntVector(fromDateTimeElements, &fromSize, &errorCode);
+ const int32_t *toBundleArr = ures_getIntVector(toDateTimeElements, &toSize, &errorCode);
+
+ if (fromSize > toSize) {
+ fromSize = toSize;
+ log_err("Arrays are different size with key \"DateTimeElements\" from \"%s\" to \"%s\"\n",
+ fromLocale,
+ toLocale);
+ }
+
+ for (idx = 0; idx < fromSize; idx++) {
+ if (fromBundleArr[idx] != toBundleArr[idx]) {
+ log_err("Difference with key \"DateTimeElements\" at index %d from \"%s\" to \"%s\"\n",
+ idx,
+ fromLocale,
+ toLocale);
+ }
+ }
+ }
+
+ /* test for weekend data */
+ {
+ int32_t fromSize;
+ int32_t toSize;
+ int32_t idx;
+ const int32_t *fromBundleArr = ures_getIntVector(fromWeekendData, &fromSize, &errorCode);
+ const int32_t *toBundleArr = ures_getIntVector(toWeekendData, &toSize, &errorCode);
+
+ if (fromSize > toSize) {
+ fromSize = toSize;
+ log_err("Arrays are different size with key \"weekend\" data from \"%s\" to \"%s\"\n",
+ fromLocale,
+ toLocale);
+ }
+
+ for (idx = 0; idx < fromSize; idx++) {
+ if (fromBundleArr[idx] != toBundleArr[idx]) {
+ log_err("Difference with key \"weekend\" data at index %d from \"%s\" to \"%s\"\n",
+ idx,
+ fromLocale,
+ toLocale);
+ }
+ }
+ }
+
+ fromArray = ures_getByKey(fromLocaleBund, "CurrencyElements", NULL, &errorCode);
+ toArray = ures_getByKey(toLocaleBund, "CurrencyElements", NULL, &errorCode);
+ if (strcmp(fromLocale, "en_CA") != 0)
+ {
+ /* The first one is probably localized. */
+ compareArrays("CurrencyElements", fromArray, fromLocale, toArray, toLocale, 1, 2);
+ }
+ ures_close(fromArray);
+ ures_close(toArray);
+
+ fromArray = ures_getByKey(fromLocaleBund, "NumberPatterns", NULL, &errorCode);
+ toArray = ures_getByKey(toLocaleBund, "NumberPatterns", NULL, &errorCode);
+ if (strcmp(fromLocale, "en_CA") != 0)
+ {
+ compareArrays("NumberPatterns", fromArray, fromLocale, toArray, toLocale, 0, 3);
+ }
+ ures_close(fromArray);
+ ures_close(toArray);
+
+ /* Difficult to test properly */
+/*
+ fromArray = ures_getByKey(fromLocaleBund, "DateTimePatterns", NULL, &errorCode);
+ toArray = ures_getByKey(toLocaleBund, "DateTimePatterns", NULL, &errorCode);
+ {
+ compareArrays("DateTimePatterns", fromArray, fromLocale, toArray, toLocale);
+ }
+ ures_close(fromArray);
+ ures_close(toArray);*/
+
+ fromArray = ures_getByKey(fromLocaleBund, "NumberElements", NULL, &errorCode);
+ toArray = ures_getByKey(toLocaleBund, "NumberElements", NULL, &errorCode);
+ if (strcmp(fromLocale, "en_CA") != 0)
+ {
+ compareArrays("NumberElements", fromArray, fromLocale, toArray, toLocale, 0, 3);
+ /* Index 4 is a script based 0 */
+ compareArrays("NumberElements", fromArray, fromLocale, toArray, toLocale, 5, 10);
+ }
+ ures_close(fromArray);
+ ures_close(toArray);
+
+cleanup:
+ ures_close(fromDateTimeElements);
+ ures_close(toDateTimeElements);
+ ures_close(fromWeekendData);
+ ures_close(toWeekendData);
+
+ ures_close(fromCalendar);
+ ures_close(toCalendar);
+ ures_close(fromGregorian);
+ ures_close(toGregorian);
+
+ ures_close(fromLocaleBund);
+ ures_close(toLocaleBund);
+}
+
+static void
+TestConsistentCountryInfo(void) {
+/* UResourceBundle *fromLocale, *toLocale;*/
+ int32_t locCount = uloc_countAvailable();
+ int32_t fromLocIndex, toLocIndex;
+
+ int32_t fromCountryLen, toCountryLen;
+ char fromCountry[ULOC_FULLNAME_CAPACITY], toCountry[ULOC_FULLNAME_CAPACITY];
+
+ int32_t fromVariantLen, toVariantLen;
+ char fromVariant[ULOC_FULLNAME_CAPACITY], toVariant[ULOC_FULLNAME_CAPACITY];
+
+ UErrorCode errorCode = U_ZERO_ERROR;
+
+ for (fromLocIndex = 0; fromLocIndex < locCount; fromLocIndex++) {
+ const char *fromLocale = uloc_getAvailable(fromLocIndex);
+
+ errorCode=U_ZERO_ERROR;
+ fromCountryLen = uloc_getCountry(fromLocale, fromCountry, ULOC_FULLNAME_CAPACITY, &errorCode);
+ if (fromCountryLen <= 0) {
+ /* Ignore countryless locales */
+ continue;
+ }
+ fromVariantLen = uloc_getVariant(fromLocale, fromVariant, ULOC_FULLNAME_CAPACITY, &errorCode);
+ if (fromVariantLen > 0) {
+ /* Most variants are ignorable like PREEURO, or collation variants. */
+ continue;
+ }
+ /* Start comparing only after the current index.
+ Previous loop should have already compared fromLocIndex.
+ */
+ for (toLocIndex = fromLocIndex + 1; toLocIndex < locCount; toLocIndex++) {
+ const char *toLocale = uloc_getAvailable(toLocIndex);
+
+ toCountryLen = uloc_getCountry(toLocale, toCountry, ULOC_FULLNAME_CAPACITY, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unknown failure fromLocale=%s toLocale=%s errorCode=%s\n",
+ fromLocale, toLocale, u_errorName(errorCode));
+ continue;
+ }
+
+ if (toCountryLen <= 0) {
+ /* Ignore countryless locales */
+ continue;
+ }
+ toVariantLen = uloc_getVariant(toLocale, toVariant, ULOC_FULLNAME_CAPACITY, &errorCode);
+ if (toVariantLen > 0) {
+ /* Most variants are ignorable like PREEURO, or collation variants. */
+ /* They're a variant for a reason. */
+ continue;
+ }
+ if (strcmp(fromCountry, toCountry) == 0) {
+ log_verbose("comparing fromLocale=%s toLocale=%s\n",
+ fromLocale, toLocale);
+ compareConsistentCountryInfo(fromLocale, toLocale);
+ }
+ }
+ }
+}
+
+static int32_t
+findStringSetMismatch(const char *currLoc, const UChar *string, int32_t langSize,
+ const UChar *exemplarCharacters, int32_t exemplarLen,
+ UBool ignoreNumbers) {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ USet *origSet = uset_openPatternOptions(exemplarCharacters, exemplarLen, USET_CASE_INSENSITIVE, &errorCode);
+ USet *exemplarSet = createFlattenSet(origSet, &errorCode);
+ int32_t strIdx;
+ uset_close(origSet);
+ if (U_FAILURE(errorCode)) {
+ log_err("%s: error uset_openPattern returned %s\n", currLoc, u_errorName(errorCode));
+ return -1;
+ }
+
+ for (strIdx = 0; strIdx < langSize; strIdx++) {
+ if (!uset_contains(exemplarSet, string[strIdx])
+ && string[strIdx] != 0x0020 && string[strIdx] != 0x00A0 && string[strIdx] != 0x002e && string[strIdx] != 0x002c && string[strIdx] != 0x002d && string[strIdx] != 0x0027
+ && string[strIdx] != 0x200C && string[strIdx] != 0x200D) {
+ if (!ignoreNumbers || (ignoreNumbers && (string[strIdx] < 0x30 || string[strIdx] > 0x39))) {
+ uset_close(exemplarSet);
+ return strIdx;
+ }
+ }
+ }
+ uset_close(exemplarSet);
+ return -1;
+}
+/* include non-invariant chars */
+static int32_t
+myUCharsToChars(const UChar* us, char* cs, int32_t len){
+ int32_t i=0;
+ for(; i< len; i++){
+ if(us[i] < 0x7f){
+ cs[i] = (char)us[i];
+ }else{
+ return -1;
+ }
+ }
+ return i;
+}
+static void
+findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen,
+ USet *exemplarSet,
+ const char *locale){
+ USet *scripts[10]= {0};
+ char pattern[256] = { '[', ':', 0x000 };
+ int32_t patternLen;
+ UChar uPattern[256] = {0};
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i;
+
+ /* create the sets with script codes */
+ for(i = 0; i<scriptsLen; i++){
+ strcat(pattern, uscript_getShortName(scriptCodes[i]));
+ strcat(pattern, ":]");
+ patternLen = (int32_t)strlen(pattern);
+ u_charsToUChars(pattern, uPattern, patternLen);
+ scripts[i] = uset_openPattern(uPattern, patternLen, &status);
+ if(U_FAILURE(status)){
+ log_err("Could not create set for patter %s. Error: %s\n", pattern, u_errorName(status));
+ break;
+ }
+ pattern[2] = 0;
+ }
+ if (strcmp(locale, "uk") == 0 || strcmp(locale, "uk_UA") == 0) {
+ /* Special addition. Add the modifying apostrophe, which isn't in Cyrillic. */
+ uset_add(scripts[0], 0x2bc);
+ }
+ if(U_SUCCESS(status)){
+ UBool existsInScript = FALSE;
+ /* iterate over the exemplarSet and ascertain if all
+ * UChars in exemplarSet belong to the scripts returned
+ * by getScript
+ */
+ int32_t count = uset_getItemCount(exemplarSet);
+
+ for( i=0; i < count; i++){
+ UChar32 start = 0;
+ UChar32 end = 0;
+ UChar *str = NULL;
+ int32_t strCapacity = 0;
+
+ strCapacity = uset_getItem(exemplarSet, i, &start, &end, str, strCapacity, &status);
+ if(U_SUCCESS(status)){
+ int32_t j;
+ if(strCapacity == 0){
+ /* ok the item is a range */
+ for( j = 0; j < scriptsLen; j++){
+ if(uset_containsRange(scripts[j], start, end) == TRUE){
+ existsInScript = TRUE;
+ }
+ }
+ if(existsInScript == FALSE){
+ for( j = 0; j < scriptsLen; j++){
+ UChar toPattern[500]={'\0'};
+ char pat[500]={'\0'};
+ int32_t len = uset_toPattern(scripts[j], toPattern, 500, TRUE, &status);
+ len = myUCharsToChars(toPattern, pat, len);
+ log_err("uset_indexOf(\\u%04X)=%i uset_indexOf(\\u%04X)=%i\n", start, uset_indexOf(scripts[0], start), end, uset_indexOf(scripts[0], end));
+ if(len!=-1){
+ log_err("Pattern: %s\n",pat);
+ }
+ }
+ log_err("ExemplarCharacters and LocaleScript containment test failed for locale %s. \n", locale);
+ }
+ }else{
+ strCapacity++; /* increment for NUL termination */
+ /* allocate the str and call the api again */
+ str = (UChar*) malloc(U_SIZEOF_UCHAR * strCapacity);
+ strCapacity = uset_getItem(exemplarSet, i, &start, &end, str, strCapacity, &status);
+ /* iterate over the scripts and figure out if the string contained is actually
+ * in the script set
+ */
+ for( j = 0; j < scriptsLen; j++){
+ if(uset_containsString(scripts[j],str, strCapacity) == TRUE){
+ existsInScript = TRUE;
+ }
+ }
+ if(existsInScript == FALSE){
+ log_err("ExemplarCharacters and LocaleScript containment test failed for locale %s. \n", locale);
+ }
+ }
+ }
+ }
+
+ }
+
+ /* close the sets */
+ for(i = 0; i<scriptsLen; i++){
+ uset_close(scripts[i]);
+ }
+}
+
+static void VerifyTranslation(void) {
+ UResourceBundle *root, *currentLocale;
+ int32_t locCount = uloc_countAvailable();
+ int32_t locIndex;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ int32_t exemplarLen;
+ const UChar *exemplarCharacters;
+ const char *currLoc;
+ UScriptCode scripts[USCRIPT_CODE_LIMIT];
+ int32_t numScripts;
+ int32_t idx;
+ int32_t end;
+ UResourceBundle *resArray;
+
+ if (locCount <= 1) {
+ log_data_err("At least root needs to be installed\n");
+ }
+
+ root = ures_openDirect(NULL, "root", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Can't open root\n");
+ return;
+ }
+ for (locIndex = 0; locIndex < locCount; locIndex++) {
+ errorCode=U_ZERO_ERROR;
+ currLoc = uloc_getAvailable(locIndex);
+ currentLocale = ures_open(NULL, currLoc, &errorCode);
+ if(errorCode != U_ZERO_ERROR) {
+ if(U_SUCCESS(errorCode)) {
+ /* It's installed, but there is no data.
+ It's installed for the g18n white paper [grhoten] */
+ log_err("ERROR: Locale %-5s not installed, and it should be!\n",
+ uloc_getAvailable(locIndex));
+ } else {
+ log_err("%%%%%%% Unexpected error %d in %s %%%%%%%",
+ u_errorName(errorCode),
+ uloc_getAvailable(locIndex));
+ }
+ ures_close(currentLocale);
+ continue;
+ }
+ exemplarCharacters = ures_getStringByKey(currentLocale, "ExemplarCharacters", &exemplarLen, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("error ures_getStringByKey returned %s\n", u_errorName(errorCode));
+ }
+ else if (QUICK && exemplarLen > 2048) {
+ log_verbose("skipping test for %s\n", currLoc);
+ }
+ else {
+ UChar langBuffer[128];
+ int32_t langSize;
+ int32_t strIdx;
+ langSize = uloc_getDisplayLanguage(currLoc, currLoc, langBuffer, sizeof(langBuffer)/sizeof(langBuffer[0]), &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("error uloc_getDisplayLanguage returned %s\n", u_errorName(errorCode));
+ }
+ else {
+ strIdx = findStringSetMismatch(currLoc, langBuffer, langSize, exemplarCharacters, exemplarLen, FALSE);
+ if (strIdx >= 0) {
+ log_err("getDisplayLanguage(%s) at index %d returned characters not in the exemplar characters.\n",
+ currLoc, strIdx);
+ }
+ }
+ langSize = uloc_getDisplayCountry(currLoc, currLoc, langBuffer, sizeof(langBuffer)/sizeof(langBuffer[0]), &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("error uloc_getDisplayCountry returned %s\n", u_errorName(errorCode));
+ }
+ else {
+ strIdx = findStringSetMismatch(currLoc, langBuffer, langSize, exemplarCharacters, exemplarLen, FALSE);
+ if (strIdx >= 0) {
+ log_err("getDisplayCountry(%s) at index %d returned characters not in the exemplar characters.\n",
+ currLoc, strIdx);
+ }
+ }
+ {
+ UResourceBundle* cal = ures_getByKey(currentLocale, "calendar", NULL, &errorCode);
+ UResourceBundle* greg = ures_getByKeyWithFallback(cal, "gregorian", NULL, &errorCode);
+ UResourceBundle* names = ures_getByKeyWithFallback(greg, "dayNames", NULL, &errorCode);
+ UResourceBundle* format = ures_getByKeyWithFallback(names, "format", NULL, &errorCode);
+ resArray = ures_getByKeyWithFallback(format, "wide", NULL, &errorCode);
+
+ if (U_FAILURE(errorCode)) {
+ log_err("error ures_getByKey returned %s\n", u_errorName(errorCode));
+ }
+ if (QUICK) {
+ end = 1;
+ }
+ else {
+ end = ures_getSize(resArray);
+ }
+
+
+ for (idx = 0; idx < end; idx++) {
+ const UChar *fromBundleStr = ures_getStringByIndex(resArray, idx, &langSize, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("error ures_getStringByIndex(%d) returned %s\n", idx, u_errorName(errorCode));
+ continue;
+ }
+ strIdx = findStringSetMismatch(currLoc, fromBundleStr, langSize, exemplarCharacters, exemplarLen, TRUE);
+ if (strIdx >= 0) {
+ log_err("getDayNames(%s, %d) at index %d returned characters not in the exemplar characters.\n",
+ currLoc, idx, strIdx);
+ }
+ }
+ ures_close(resArray);
+ ures_close(format);
+ ures_close(names);
+
+ names = ures_getByKeyWithFallback(greg, "monthNames", NULL, &errorCode);
+ format = ures_getByKeyWithFallback(names,"format", NULL, &errorCode);
+ resArray = ures_getByKeyWithFallback(format, "wide", NULL, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("error ures_getByKey returned %s\n", u_errorName(errorCode));
+ }
+ if (QUICK) {
+ end = 1;
+ }
+ else {
+ end = ures_getSize(resArray);
+ }
+
+ for (idx = 0; idx < end; idx++) {
+ const UChar *fromBundleStr = ures_getStringByIndex(resArray, idx, &langSize, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ log_err("error ures_getStringByIndex(%d) returned %s\n", idx, u_errorName(errorCode));
+ continue;
+ }
+ strIdx = findStringSetMismatch(currLoc, fromBundleStr, langSize, exemplarCharacters, exemplarLen, TRUE);
+ if (strIdx >= 0) {
+ log_err("getMonthNames(%s, %d) at index %d returned characters not in the exemplar characters.\n",
+ currLoc, idx, strIdx);
+ }
+ }
+ ures_close(resArray);
+ ures_close(format);
+ ures_close(names);
+ ures_close(greg);
+ ures_close(cal);
+ }
+ errorCode = U_ZERO_ERROR;
+ numScripts = uscript_getCode(currLoc, scripts, sizeof(scripts)/sizeof(scripts[0]), &errorCode);
+ if (numScripts == 0) {
+ log_err("uscript_getCode(%s) doesn't work.\n", currLoc);
+ }else if(scripts[0] == USCRIPT_COMMON){
+ log_err("uscript_getCode(%s) returned USCRIPT_COMMON.\n", currLoc);
+ }
+
+ /* test that the scripts are a superset of exemplar characters. */
+ {
+ ULocaleData *uld = ulocdata_open(currLoc,&errorCode);
+ USet *exemplarSet = ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &errorCode);
+ /* test if exemplar characters are part of script code */
+ findSetMatch(scripts, numScripts, exemplarSet, currLoc);
+ uset_close(exemplarSet);
+ ulocdata_close(uld);
+ }
+
+ /* test that the paperSize API works */
+ {
+ int32_t height=0, width=0;
+ ulocdata_getPaperSize(currLoc, &height, &width, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ulocdata_getPaperSize failed for locale %s with error: %s \n", currLoc, u_errorName(errorCode));
+ }
+ if(strstr(currLoc, "_US")!=NULL && height != 279 && width != 216 ){
+ log_err("ulocdata_getPaperSize did not return expected data for locale %s \n", currLoc);
+ }
+ }
+ /* test that the MeasurementSystem works API works */
+ {
+ UMeasurementSystem measurementSystem = ulocdata_getMeasurementSystem(currLoc, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ulocdata_getMeasurementSystem failed for locale %s with error: %s \n", currLoc, u_errorName(errorCode));
+ }
+ if(strstr(currLoc, "_US")!=NULL){
+ if(measurementSystem != UMS_US){
+ log_err("ulocdata_getMeasurementSystem did not return expected data for locale %s \n", currLoc);
+ }
+ }else if(measurementSystem != UMS_SI){
+ log_err("ulocdata_getMeasurementSystem did not return expected data for locale %s \n", currLoc);
+ }
+ }
+ }
+ ures_close(currentLocale);
+ }
+
+ ures_close(root);
+}
+
+/* adjust this limit as appropriate */
+#define MAX_SCRIPTS_PER_LOCALE 8
+
+static void TestExemplarSet(void){
+ int32_t i, j, k, m, n;
+ int32_t equalCount = 0;
+ UErrorCode ec = U_ZERO_ERROR;
+ UEnumeration* avail;
+ USet* exemplarSets[2];
+ USet* unassignedSet;
+ UScriptCode code[MAX_SCRIPTS_PER_LOCALE];
+ USet* codeSets[MAX_SCRIPTS_PER_LOCALE];
+ int32_t codeLen;
+ char cbuf[32]; /* 9 should be enough */
+ UChar ubuf[64]; /* adjust as needed */
+ UBool existsInScript;
+ int32_t itemCount;
+ int32_t strLen;
+ UChar32 start, end;
+
+ unassignedSet = NULL;
+ exemplarSets[0] = NULL;
+ exemplarSets[1] = NULL;
+ for (i=0; i<MAX_SCRIPTS_PER_LOCALE; ++i) {
+ codeSets[i] = NULL;
+ }
+
+ avail = ures_openAvailableLocales(NULL, &ec);
+ if (!assertSuccess("ures_openAvailableLocales", &ec)) goto END;
+ n = uenum_count(avail, &ec);
+ if (!assertSuccess("uenum_count", &ec)) goto END;
+
+ u_uastrcpy(ubuf, "[:unassigned:]");
+ unassignedSet = uset_openPattern(ubuf, -1, &ec);
+ if (!assertSuccess("uset_openPattern", &ec)) goto END;
+
+ for(i=0; i<n; i++){
+ const char* locale = uenum_next(avail, NULL, &ec);
+ if (!assertSuccess("uenum_next", &ec)) goto END;
+ log_verbose("%s\n", locale);
+ for (k=0; k<2; ++k) {
+ uint32_t option = (k==0) ? 0 : USET_CASE_INSENSITIVE;
+ ULocaleData *uld = ulocdata_open(locale,&ec);
+ USet* exemplarSet = ulocdata_getExemplarSet(uld,NULL, option, ULOCDATA_ES_STANDARD, &ec);
+ uset_close(exemplarSets[k]);
+ ulocdata_close(uld);
+ exemplarSets[k] = exemplarSet;
+ if (!assertSuccess("ulocaledata_getExemplarSet", &ec)) goto END;
+
+ if (uset_containsSome(exemplarSet, unassignedSet)) {
+ log_err("ExemplarSet contains unassigned characters for locale : %s\n", locale);
+ }
+ codeLen = uscript_getCode(locale, code, 8, &ec);
+ if (!assertSuccess("uscript_getCode", &ec)) goto END;
+
+ for (j=0; j<MAX_SCRIPTS_PER_LOCALE; ++j) {
+ uset_close(codeSets[j]);
+ codeSets[j] = NULL;
+ }
+ for (j=0; j<codeLen; ++j) {
+ uprv_strcpy(cbuf, "[:");
+ if(code[j]==-1){
+ log_err("USCRIPT_INVALID_CODE returned for locale: %s\n", locale);
+ continue;
+ }
+ uprv_strcat(cbuf, uscript_getShortName(code[j]));
+ uprv_strcat(cbuf, ":]");
+ u_uastrcpy(ubuf, cbuf);
+ codeSets[j] = uset_openPattern(ubuf, -1, &ec);
+ }
+ if (!assertSuccess("uset_openPattern", &ec)) goto END;
+
+ existsInScript = FALSE;
+ itemCount = uset_getItemCount(exemplarSet);
+ for (m=0; m<itemCount && !existsInScript; ++m) {
+ strLen = uset_getItem(exemplarSet, m, &start, &end, ubuf,
+ sizeof(ubuf)/sizeof(ubuf[0]), &ec);
+ /* failure here might mean str[] needs to be larger */
+ if (!assertSuccess("uset_getItem", &ec)) goto END;
+ if (strLen == 0) {
+ for (j=0; j<codeLen; ++j) {
+ if (codeSets[j]!=NULL && uset_containsRange(codeSets[j], start, end)) {
+ existsInScript = TRUE;
+ break;
+ }
+ }
+ } else {
+ for (j=0; j<codeLen; ++j) {
+ if (codeSets[j]!=NULL && uset_containsString(codeSets[j], ubuf, strLen)) {
+ existsInScript = TRUE;
+ break;
+ }
+ }
+ }
+ }
+
+ if (existsInScript == FALSE){
+ log_err("ExemplarSet containment failed for locale : %s\n", locale);
+ }
+ }
+ assertTrue("case-folded is a superset",
+ uset_containsAll(exemplarSets[1], exemplarSets[0]));
+ if (uset_equals(exemplarSets[1], exemplarSets[0])) {
+ ++equalCount;
+ }
+ }
+ /* Note: The case-folded set should sometimes be a strict superset
+ and sometimes be equal. */
+ assertTrue("case-folded is sometimes a strict superset, and sometimes equal",
+ equalCount > 0 && equalCount < n);
+
+ END:
+ uenum_close(avail);
+ uset_close(exemplarSets[0]);
+ uset_close(exemplarSets[1]);
+ uset_close(unassignedSet);
+ for (i=0; i<MAX_SCRIPTS_PER_LOCALE; ++i) {
+ uset_close(codeSets[i]);
+ }
+}
+
+static void TestCoverage(void){
+ ULocaleDataDelimiterType types[] = {
+ ULOCDATA_QUOTATION_START, /* Quotation start */
+ ULOCDATA_QUOTATION_END, /* Quotation end */
+ ULOCDATA_ALT_QUOTATION_START, /* Alternate quotation start */
+ ULOCDATA_ALT_QUOTATION_END, /* Alternate quotation end */
+ ULOCDATA_DELIMITER_COUNT
+ };
+ int i;
+ UBool sub;
+ UErrorCode status = U_ZERO_ERROR;
+ ULocaleData *uld = ulocdata_open(uloc_getDefault(), &status);
+
+ if(U_FAILURE(status)){
+ log_err("ulocdata_open error");
+ return;
+ }
+
+
+ for(i = 0; i < ULOCDATA_DELIMITER_COUNT; i++){
+ UChar result[32] = {0,};
+ status = U_ZERO_ERROR;
+ ulocdata_getDelimiter(uld, types[i], result, 32, &status);
+ if (U_FAILURE(status)){
+ log_err("ulocdata_getgetDelimiter error with type %d", types[i]);
+ }
+ }
+
+ sub = ulocdata_getNoSubstitute(uld);
+ ulocdata_setNoSubstitute(uld,sub);
+ ulocdata_close(uld);
+}
+
+static void TestCurrencyList(void){
+#if !UCONFIG_NO_FORMATTING
+ UErrorCode errorCode = U_ZERO_ERROR;
+ int32_t structLocaleCount, currencyCount;
+ UEnumeration *en = ucurr_openISOCurrencies(UCURR_ALL, &errorCode);
+ const char *isoCode, *structISOCode;
+ UResourceBundle *subBundle;
+ UResourceBundle *currencies = ures_openDirect(loadTestData(&errorCode), "structLocale", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Can't open structLocale\n");
+ return;
+ }
+ currencies = ures_getByKey(currencies, "Currencies", currencies, &errorCode);
+ currencyCount = uenum_count(en, &errorCode);
+ structLocaleCount = ures_getSize(currencies);
+ if (currencyCount != structLocaleCount) {
+ log_err("structLocale(%d) and ISO4217(%d) currency list are out of sync.\n", structLocaleCount, currencyCount);
+#if U_CHARSET_FAMILY == U_ASCII_FAMILY
+ ures_resetIterator(currencies);
+ while ((isoCode = uenum_next(en, NULL, &errorCode)) != NULL && ures_hasNext(currencies)) {
+ subBundle = ures_getNextResource(currencies, NULL, &errorCode);
+ structISOCode = ures_getKey(subBundle);
+ ures_close(subBundle);
+ if (strcmp(structISOCode, isoCode) != 0) {
+ log_err("First difference found at structLocale(%s) and ISO4217(%s).\n", structISOCode, isoCode);
+ break;
+ }
+ }
+#endif
+ }
+ ures_close(currencies);
+ uenum_close(en);
+#endif
+}
+
+#define TESTCASE(name) addTest(root, &name, "tsutil/cldrtest/" #name)
+
+void addCLDRTest(TestNode** root);
+
+void addCLDRTest(TestNode** root)
+{
+ TESTCASE(TestLocaleStructure);
+ TESTCASE(TestConsistentCountryInfo);
+ TESTCASE(VerifyTranslation);
+ TESTCASE(TestExemplarSet);
+ TESTCASE(TestCurrencyList);
+ TESTCASE(TestCoverage);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.c
new file mode 100644
index 00000000000..d75fce50d0f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.c
@@ -0,0 +1,2774 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*****************************************************************************
+*
+* File CLOCTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+******************************************************************************
+*/
+#include "cloctst.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "cintltst.h"
+#include "cstring.h"
+#include "uparse.h"
+#include "uresimp.h"
+
+#include "unicode/putil.h"
+#include "unicode/ubrk.h"
+#include "unicode/uchar.h"
+#include "unicode/ucol.h"
+#include "unicode/udat.h"
+#include "unicode/uloc.h"
+#include "unicode/umsg.h"
+#include "unicode/ures.h"
+#include "unicode/uset.h"
+#include "unicode/ustring.h"
+#include "unicode/utypes.h"
+#include "unicode/ulocdata.h"
+#include "unicode/parseerr.h" /* may not be included with some uconfig switches */
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+static void TestNullDefault(void);
+static void TestNonexistentLanguageExemplars(void);
+static void TestLocDataErrorCodeChaining(void);
+static void TestLanguageExemplarsFallbacks(void);
+
+void PrintDataTable();
+
+/*---------------------------------------------------
+ table of valid data
+ --------------------------------------------------- */
+#define LOCALE_SIZE 9
+#define LOCALE_INFO_SIZE 28
+
+static const char* const rawData2[LOCALE_INFO_SIZE][LOCALE_SIZE] = {
+ /* language code */
+ { "en", "fr", "ca", "el", "no", "zh", "de", "es", "ja" },
+ /* script code */
+ { "", "", "", "", "", "Hans", "", "", "" },
+ /* country code */
+ { "US", "FR", "ES", "GR", "NO", "CN", "DE", "", "JP" },
+ /* variant code */
+ { "", "", "", "", "NY", "", "", "", "" },
+ /* full name */
+ { "en_US", "fr_FR", "ca_ES",
+ "el_GR", "no_NO_NY", "zh_Hans_CN",
+ "de_DE@collation=phonebook", "es@collation=traditional", "ja_JP@calendar=japanese" },
+ /* ISO-3 language */
+ { "eng", "fra", "cat", "ell", "nor", "zho", "deu", "spa", "jpn" },
+ /* ISO-3 country */
+ { "USA", "FRA", "ESP", "GRC", "NOR", "CHN", "DEU", "", "JPN" },
+ /* LCID */
+ { "409", "40c", "403", "408", "814", "804", "10407", "40a", "411" },
+
+ /* display language (English) */
+ { "English", "French", "Catalan", "Greek", "Norwegian", "Chinese", "German", "Spanish", "Japanese" },
+ /* display script code (English) */
+ { "", "", "", "", "", "Simplified Han", "", "", "" },
+ /* display country (English) */
+ { "United States", "France", "Spain", "Greece", "Norway", "China", "Germany", "", "Japan" },
+ /* display variant (English) */
+ { "", "", "", "", "NY", "", "", "", "" },
+ /* display name (English) */
+ { "English (United States)", "French (France)", "Catalan (Spain)",
+ "Greek (Greece)", "Norwegian (Norway, NY)", "Chinese (Simplified Han, China)",
+ "German (Germany, collation=Phonebook Sort Order)", "Spanish (collation=Traditional Sort Order)", "Japanese (Japan, calendar=Japanese Calendar)" },
+
+ /* display language (French) */
+ { "anglais", "fran\\u00E7ais", "catalan", "grec", "norv\\u00E9gien", "chinois", "allemand", "espagnol", "japonais" },
+ /* display script code (French) */
+ { "", "", "", "", "", "id\\u00e9ogrammes han (variante simplifi\\u00e9e)", "", "", "" },
+ /* display country (French) */
+ { "\\u00C9tats-Unis", "France", "Espagne", "Gr\\u00E8ce", "Norv\\u00E8ge", "Chine", "Allemagne", "", "Japon" },
+ /* display variant (French) */
+ { "", "", "", "", "NY", "", "", "", "" },
+ /* display name (French) */
+ { "anglais (\\u00C9tats-Unis)", "fran\\u00E7ais (France)", "catalan (Espagne)",
+ "grec (Gr\\u00E8ce)", "norv\\u00E9gien (Norv\\u00E8ge, NY)", "chinois (id\\u00e9ogrammes han (variante simplifi\\u00e9e), Chine)",
+ "allemand (Allemagne, Ordonnancement=Ordre de l\\u2019annuaire)", "espagnol (Ordonnancement=Ordre traditionnel)", "japonais (Japon, Calendrier=Calendrier japonais)" },
+
+ /* display language (Catalan) */
+ { "angl\\u00E8s", "franc\\u00E8s", "catal\\u00E0", "grec", "noruec", "xin\\u00E9s", "alemany", "espanyol", "japon\\u00E8s" },
+ /* display script code (Catalan) */
+ { "", "", "", "", "", "Hans", "", "", "" },
+ /* display country (Catalan) */
+ { "Estats Units", "Fran\\u00E7a", "Espanya", "Gr\\u00E8cia", "Noruega", "Xina", "Alemanya", "", "Jap\\u00F3" },
+ /* display variant (Catalan) */
+ { "", "", "", "", "NY", "", "", "", "" },
+ /* display name (Catalan) */
+ { "angl\\u00E8s (Estats Units)", "franc\\u00E8s (Fran\\u00E7a)", "catal\\u00E0 (Espanya)",
+ "grec (Gr\\u00E8cia)", "noruec (Noruega, NY)", "xin\\u00E9s (Hans, Xina)",
+ "alemany (Alemanya, collation=phonebook)", "espanyol (collation=traditional)", "japon\\u00E8s (Jap\\u00F3, calendar=japanese)" },
+
+ /* display language (Greek) */
+ {
+ "\\u0391\\u03b3\\u03b3\\u03bb\\u03b9\\u03ba\\u03ac",
+ "\\u0393\\u03b1\\u03bb\\u03bb\\u03b9\\u03ba\\u03ac",
+ "\\u039a\\u03b1\\u03c4\\u03b1\\u03bb\\u03b1\\u03bd\\u03b9\\u03ba\\u03ac",
+ "\\u0395\\u03bb\\u03bb\\u03b7\\u03bd\\u03b9\\u03ba\\u03ac",
+ "\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac",
+ "\\u039A\\u03B9\\u03BD\\u03B5\\u03B6\\u03B9\\u03BA\\u03AC",
+ "\\u0393\\u03B5\\u03C1\\u03BC\\u03B1\\u03BD\\u03B9\\u03BA\\u03AC",
+ "\\u0399\\u03C3\\u03C0\\u03B1\\u03BD\\u03B9\\u03BA\\u03AC",
+ "\\u0399\\u03B1\\u03C0\\u03C9\\u03BD\\u03B9\\u03BA\\u03AC"
+ },
+ /* display script code (Greek) */
+
+ { "", "", "", "", "", "\\u039a\\u03b9\\u03bd\\u03b5\\u03b6\\u03b9\\u03ba\\u03cc \\u0391\\u03c0\\u03bb\\u03bf\\u03c0\\u03bf\\u03b9\\u03b7\\u03bc\\u03ad\\u03bd\\u03bf", "", "", "" },
+ /* display country (Greek) */
+ {
+ "\\u0397\\u03bd\\u03c9\\u03bc\\u03ad\\u03bd\\u03b5\\u03c2 \\u03a0\\u03bf\\u03bb\\u03b9\\u03c4\\u03b5\\u03af\\u03b5\\u03c2",
+ "\\u0393\\u03b1\\u03bb\\u03bb\\u03af\\u03b1",
+ "\\u0399\\u03c3\\u03c0\\u03b1\\u03bd\\u03af\\u03b1",
+ "\\u0395\\u03bb\\u03bb\\u03ac\\u03b4\\u03b1",
+ "\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1",
+ "\\u039A\\u03AF\\u03BD\\u03B1",
+ "\\u0393\\u03B5\\u03C1\\u03BC\\u03B1\\u03BD\\u03AF\\u03B1",
+ "",
+ "\\u0399\\u03B1\\u03C0\\u03C9\\u03BD\\u03AF\\u03B1"
+ },
+ /* display variant (Greek) */
+ { "", "", "", "", "NY", "", "", "", "" }, /* TODO: currently there is no translation for NY in Greek fix this test when we have it */
+ /* display name (Greek) */
+ {
+ "\\u0391\\u03b3\\u03b3\\u03bb\\u03b9\\u03ba\\u03ac (\\u0397\\u03bd\\u03c9\\u03bc\\u03ad\\u03bd\\u03b5\\u03c2 \\u03a0\\u03bf\\u03bb\\u03b9\\u03c4\\u03b5\\u03af\\u03b5\\u03c2)",
+ "\\u0393\\u03b1\\u03bb\\u03bb\\u03b9\\u03ba\\u03ac (\\u0393\\u03b1\\u03bb\\u03bb\\u03af\\u03b1)",
+ "\\u039a\\u03b1\\u03c4\\u03b1\\u03bb\\u03b1\\u03bd\\u03b9\\u03ba\\u03ac (\\u0399\\u03c3\\u03c0\\u03b1\\u03bd\\u03af\\u03b1)",
+ "\\u0395\\u03bb\\u03bb\\u03b7\\u03bd\\u03b9\\u03ba\\u03ac (\\u0395\\u03bb\\u03bb\\u03ac\\u03b4\\u03b1)",
+ "\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac (\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1, NY)",
+ "\\u039A\\u03B9\\u03BD\\u03B5\\u03B6\\u03B9\\u03BA\\u03AC (\\u039a\\u03b9\\u03bd\\u03b5\\u03b6\\u03b9\\u03ba\\u03cc \\u0391\\u03c0\\u03bb\\u03bf\\u03c0\\u03bf\\u03b9\\u03b7\\u03bc\\u03ad\\u03bd\\u03bf, \\u039A\\u03AF\\u03BD\\u03B1)",
+ "\\u0393\\u03B5\\u03C1\\u03BC\\u03B1\\u03BD\\u03B9\\u03BA\\u03AC (\\u0393\\u03B5\\u03C1\\u03BC\\u03B1\\u03BD\\u03AF\\u03B1, \\u03A4\\u03B1\\u03BA\\u03C4\\u03BF\\u03C0\\u03BF\\u03AF\\u03B7\\u03C3\\u03B7=\\u03A3\\u03B5\\u03B9\\u03C1\\u03AC \\u03A4\\u03B7\\u03BB\\u03B5\\u03C6\\u03C9\\u03BD\\u03B9\\u03BA\\u03BF\\u03CD \\u039A\\u03B1\\u03C4\\u03B1\\u03BB\\u03CC\\u03B3\\u03BF\\u03C5)",
+ "\\u0399\\u03C3\\u03C0\\u03B1\\u03BD\\u03B9\\u03BA\\u03AC (\\u03A4\\u03B1\\u03BA\\u03C4\\u03BF\\u03C0\\u03BF\\u03AF\\u03B7\\u03C3\\u03B7\\u003D\\u03A0\\u03B1\\u03C1\\u03B1\\u03B4\\u03BF\\u03C3\\u03B9\\u03B1\\u03BA\\u03AE \\u03A3\\u03B5\\u03B9\\u03C1\\u03AC)",
+ "\\u0399\\u03B1\\u03C0\\u03C9\\u03BD\\u03B9\\u03BA\\u03AC (\\u0399\\u03B1\\u03C0\\u03C9\\u03BD\\u03AF\\u03B1, \\u0397\\u03BC\\u03B5\\u03C1\\u03BF\\u03BB\\u03CC\\u03B3\\u03B9\\u03BF=\\u0399\\u03B1\\u03C0\\u03C9\\u03BD\\u03B9\\u03BA\\u03CC \\u0397\\u03BC\\u03B5\\u03C1\\u03BF\\u03BB\\u03CC\\u03B3\\u03B9\\u03BF)"
+ }
+};
+
+static UChar*** dataTable=0;
+enum {
+ ENGLISH = 0,
+ FRENCH = 1,
+ CATALAN = 2,
+ GREEK = 3,
+ NORWEGIAN = 4
+};
+
+enum {
+ LANG = 0,
+ SCRIPT = 1,
+ CTRY = 2,
+ VAR = 3,
+ NAME = 4,
+ LANG3 = 5,
+ CTRY3 = 6,
+ LCID = 7,
+ DLANG_EN = 8,
+ DSCRIPT_EN = 9,
+ DCTRY_EN = 10,
+ DVAR_EN = 11,
+ DNAME_EN = 12,
+ DLANG_FR = 13,
+ DSCRIPT_FR = 14,
+ DCTRY_FR = 15,
+ DVAR_FR = 16,
+ DNAME_FR = 17,
+ DLANG_CA = 18,
+ DSCRIPT_CA = 19,
+ DCTRY_CA = 20,
+ DVAR_CA = 21,
+ DNAME_CA = 22,
+ DLANG_EL = 23,
+ DSCRIPT_EL = 24,
+ DCTRY_EL = 25,
+ DVAR_EL = 26,
+ DNAME_EL = 27
+};
+
+#define TESTCASE(name) addTest(root, &name, "tsutil/cloctst/" #name)
+
+void addLocaleTest(TestNode** root);
+
+void addLocaleTest(TestNode** root)
+{
+ TESTCASE(TestObsoleteNames); /* srl- move */
+ TESTCASE(TestBasicGetters);
+ TESTCASE(TestNullDefault);
+ TESTCASE(TestPrefixes);
+ TESTCASE(TestSimpleResourceInfo);
+ TESTCASE(TestDisplayNames);
+ TESTCASE(TestGetAvailableLocales);
+ TESTCASE(TestDataDirectory);
+ TESTCASE(TestISOFunctions);
+ TESTCASE(TestISO3Fallback);
+ TESTCASE(TestUninstalledISO3Names);
+ TESTCASE(TestSimpleDisplayNames);
+ TESTCASE(TestVariantParsing);
+ TESTCASE(TestKeywordVariants);
+ TESTCASE(TestKeywordVariantParsing);
+ TESTCASE(TestCanonicalization);
+ TESTCASE(TestKeywordSet);
+ TESTCASE(TestKeywordSetError);
+ TESTCASE(TestDisplayKeywords);
+ TESTCASE(TestDisplayKeywordValues);
+ TESTCASE(TestGetBaseName);
+ TESTCASE(TestGetLocale);
+ TESTCASE(TestDisplayNameWarning);
+ TESTCASE(TestNonexistentLanguageExemplars);
+ TESTCASE(TestLocDataErrorCodeChaining);
+ TESTCASE(TestLanguageExemplarsFallbacks);
+ TESTCASE(TestCalendar);
+ TESTCASE(TestDateFormat);
+ TESTCASE(TestCollation);
+ TESTCASE(TestULocale);
+ TESTCASE(TestUResourceBundle);
+ TESTCASE(TestDisplayName);
+ TESTCASE(TestAcceptLanguage);
+ TESTCASE(TestGetLocaleForLCID);
+}
+
+
+/* testing uloc(), uloc_getName(), uloc_getLanguage(), uloc_getVariant(), uloc_getCountry() */
+static void TestBasicGetters() {
+ int32_t i;
+ int32_t cap;
+ UErrorCode status = U_ZERO_ERROR;
+ char *testLocale = 0;
+ char *temp = 0, *name = 0;
+ log_verbose("Testing Basic Getters\n");
+ for (i = 0; i < LOCALE_SIZE; i++) {
+ testLocale=(char*)malloc(sizeof(char) * (strlen(rawData2[NAME][i])+1));
+ strcpy(testLocale,rawData2[NAME][i]);
+
+ log_verbose("Testing %s .....\n", testLocale);
+ cap=uloc_getLanguage(testLocale, NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ temp=(char*)malloc(sizeof(char) * (cap+1));
+ uloc_getLanguage(testLocale, temp, cap+1, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: in uloc_getLanguage %s\n", myErrorName(status));
+ }
+ if (0 !=strcmp(temp,rawData2[LANG][i])) {
+ log_err(" Language code mismatch: %s versus %s\n", temp, rawData2[LANG][i]);
+ }
+
+
+ cap=uloc_getCountry(testLocale, temp, cap, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ temp=(char*)realloc(temp, sizeof(char) * (cap+1));
+ uloc_getCountry(testLocale, temp, cap+1, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: in uloc_getCountry %s\n", myErrorName(status));
+ }
+ if (0 != strcmp(temp, rawData2[CTRY][i])) {
+ log_err(" Country code mismatch: %s versus %s\n", temp, rawData2[CTRY][i]);
+
+ }
+
+ cap=uloc_getVariant(testLocale, temp, cap, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ temp=(char*)realloc(temp, sizeof(char) * (cap+1));
+ uloc_getVariant(testLocale, temp, cap+1, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: in uloc_getVariant %s\n", myErrorName(status));
+ }
+ if (0 != strcmp(temp, rawData2[VAR][i])) {
+ log_err("Variant code mismatch: %s versus %s\n", temp, rawData2[VAR][i]);
+ }
+
+ cap=uloc_getName(testLocale, NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ name=(char*)malloc(sizeof(char) * (cap+1));
+ uloc_getName(testLocale, name, cap+1, &status);
+ } else if(status==U_ZERO_ERROR) {
+ log_err("ERROR: in uloc_getName(%s,NULL,0,..), expected U_BUFFER_OVERFLOW_ERROR!\n", testLocale);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: in uloc_getName %s\n", myErrorName(status));
+ }
+ if (0 != strcmp(name, rawData2[NAME][i])){
+ log_err(" Mismatch in getName: %s versus %s\n", name, rawData2[NAME][i]);
+ }
+
+ free(temp);
+ free(name);
+
+ free(testLocale);
+ }
+}
+
+static void TestNullDefault() {
+ UErrorCode status = U_ZERO_ERROR;
+ char original[ULOC_FULLNAME_CAPACITY];
+
+ uprv_strcpy(original, uloc_getDefault());
+ uloc_setDefault("qq_BLA", &status);
+ if (uprv_strcmp(uloc_getDefault(), "qq_BLA") != 0) {
+ log_err(" Mismatch in uloc_setDefault: qq_BLA versus %s\n", uloc_getDefault());
+ }
+ uloc_setDefault(NULL, &status);
+ if (uprv_strcmp(uloc_getDefault(), original) != 0) {
+ log_err(" uloc_setDefault(NULL, &status) didn't get the default locale back!\n");
+ }
+
+ {
+ /* Test that set & get of default locale work, and that
+ * default locales are cached and reused, and not overwritten.
+ */
+ const char *n_en_US;
+ const char *n_fr_FR;
+ const char *n2_en_US;
+
+ status = U_ZERO_ERROR;
+ uloc_setDefault("en_US", &status);
+ n_en_US = uloc_getDefault();
+ if (strcmp(n_en_US, "en_US") != 0) {
+ log_err("Wrong result from uloc_getDefault(). Expected \"en_US\", got \"%s\"\n", n_en_US);
+ }
+
+ uloc_setDefault("fr_FR", &status);
+ n_fr_FR = uloc_getDefault();
+ if (strcmp(n_en_US, "en_US") != 0) {
+ log_err("uloc_setDefault altered previously default string."
+ "Expected \"en_US\", got \"%s\"\n", n_en_US);
+ }
+ if (strcmp(n_fr_FR, "fr_FR") != 0) {
+ log_err("Wrong result from uloc_getDefault(). Expected \"fr_FR\", got %s\n", n_fr_FR);
+ }
+
+ uloc_setDefault("en_US", &status);
+ n2_en_US = uloc_getDefault();
+ if (strcmp(n2_en_US, "en_US") != 0) {
+ log_err("Wrong result from uloc_getDefault(). Expected \"en_US\", got \"%s\"\n", n_en_US);
+ }
+ if (n2_en_US != n_en_US) {
+ log_err("Default locale cache failed to reuse en_US locale.\n");
+ }
+
+ if (U_FAILURE(status)) {
+ log_err("Failure returned from uloc_setDefault - \"%s\"\n", u_errorName(status));
+ }
+
+ }
+
+}
+/* Test the i- and x- and @ and . functionality
+*/
+
+#define PREFIXBUFSIZ 128
+
+static void TestPrefixes() {
+ int row = 0;
+ int n;
+ const char *loc, *expected;
+
+ static const char * const testData[][7] =
+ {
+ /* NULL canonicalize() column means "expect same as getName()" */
+ {"sv", "", "FI", "AL", "sv-fi-al", "sv_FI_AL", NULL},
+ {"en", "", "GB", "", "en-gb", "en_GB", NULL},
+ {"i-hakka", "", "MT", "XEMXIJA", "i-hakka_MT_XEMXIJA", "i-hakka_MT_XEMXIJA", NULL},
+ {"i-hakka", "", "CN", "", "i-hakka_CN", "i-hakka_CN", NULL},
+ {"i-hakka", "", "MX", "", "I-hakka_MX", "i-hakka_MX", NULL},
+ {"x-klingon", "", "US", "SANJOSE", "X-KLINGON_us_SANJOSE", "x-klingon_US_SANJOSE", NULL},
+
+ {"mr", "", "", "", "mr.utf8", "mr.utf8", "mr"},
+ {"de", "", "TV", "", "de-tv.koi8r", "de_TV.koi8r", "de_TV"},
+ {"x-piglatin", "", "ML", "", "x-piglatin_ML.MBE", "x-piglatin_ML.MBE", "x-piglatin_ML"}, /* Multibyte English */
+ {"i-cherokee", "","US", "", "i-Cherokee_US.utf7", "i-cherokee_US.utf7", "i-cherokee_US"},
+ {"x-filfli", "", "MT", "FILFLA", "x-filfli_MT_FILFLA.gb-18030", "x-filfli_MT_FILFLA.gb-18030", "x-filfli_MT_FILFLA"},
+ {"no", "", "NO", "NY", "no-no-ny.utf32@B", "no_NO_NY.utf32@B", "no_NO_NY_B"},
+ {"no", "", "NO", "", "no-no.utf32@B", "no_NO.utf32@B", "no_NO_B"},
+ {"no", "", "", "NY", "no__ny", "no__NY", NULL},
+ {"no", "", "", "", "no@ny", "no@ny", "no__NY"},
+ {"el", "Latn", "", "", "el-latn", "el_Latn", NULL},
+ {"en", "Cyrl", "RU", "", "en-cyrl-ru", "en_Cyrl_RU", NULL},
+ {"zh", "Hant", "TW", "STROKE", "zh-hant_TW_STROKE", "zh_Hant_TW_STROKE", NULL},
+ {"qq", "Qqqq", "QQ", "QQ", "qq_Qqqq_QQ_QQ", "qq_Qqqq_QQ_QQ", NULL},
+ {"qq", "Qqqq", "", "QQ", "qq_Qqqq__QQ", "qq_Qqqq__QQ", NULL},
+ {"12", "3456", "78", "90", "12_3456_78_90", "12_3456_78_90", NULL}, /* total garbage */
+
+ {NULL,NULL,NULL,NULL,NULL,NULL,NULL}
+ };
+
+ static const char * const testTitles[] = {
+ "uloc_getLanguage()",
+ "uloc_getScript()",
+ "uloc_getCountry()",
+ "uloc_getVariant()",
+ "name",
+ "uloc_getName()",
+ "uloc_canonicalize()"
+ };
+
+ char buf[PREFIXBUFSIZ];
+ int32_t len;
+ UErrorCode err;
+
+
+ for(row=0;testData[row][0] != NULL;row++) {
+ loc = testData[row][NAME];
+ log_verbose("Test #%d: %s\n", row, loc);
+
+ err = U_ZERO_ERROR;
+ len=0;
+ buf[0]=0;
+ for(n=0;n<=(NAME+2);n++) {
+ if(n==NAME) continue;
+
+ for(len=0;len<PREFIXBUFSIZ;len++) {
+ buf[len] = '%'; /* Set a tripwire.. */
+ }
+ len = 0;
+
+ switch(n) {
+ case LANG:
+ len = uloc_getLanguage(loc, buf, PREFIXBUFSIZ, &err);
+ break;
+
+ case SCRIPT:
+ len = uloc_getScript(loc, buf, PREFIXBUFSIZ, &err);
+ break;
+
+ case CTRY:
+ len = uloc_getCountry(loc, buf, PREFIXBUFSIZ, &err);
+ break;
+
+ case VAR:
+ len = uloc_getVariant(loc, buf, PREFIXBUFSIZ, &err);
+ break;
+
+ case NAME+1:
+ len = uloc_getName(loc, buf, PREFIXBUFSIZ, &err);
+ break;
+
+ case NAME+2:
+ len = uloc_canonicalize(loc, buf, PREFIXBUFSIZ, &err);
+ break;
+
+ default:
+ strcpy(buf, "**??");
+ len=4;
+ }
+
+ if(U_FAILURE(err)) {
+ log_err("#%d: %s on %s: err %s\n",
+ row, testTitles[n], loc, u_errorName(err));
+ } else {
+ log_verbose("#%d: %s on %s: -> [%s] (length %d)\n",
+ row, testTitles[n], loc, buf, len);
+
+ if(len != (int32_t)strlen(buf)) {
+ log_err("#%d: %s on %s: -> [%s] (length returned %d, actual %d!)\n",
+ row, testTitles[n], loc, buf, len, strlen(buf)+1);
+
+ }
+
+ /* see if they smashed something */
+ if(buf[len+1] != '%') {
+ log_err("#%d: %s on %s: -> [%s] - wrote [%X] out ofbounds!\n",
+ row, testTitles[n], loc, buf, buf[len+1]);
+ }
+
+ expected = testData[row][n];
+ if (expected == NULL && n == (NAME+2)) {
+ /* NULL expected canonicalize() means "expect same as getName()" */
+ expected = testData[row][NAME+1];
+ }
+ if(strcmp(buf, expected)) {
+ log_err("#%d: %s on %s: -> [%s] (expected '%s'!)\n",
+ row, testTitles[n], loc, buf, expected);
+
+ }
+ }
+ }
+ }
+}
+
+
+/* testing uloc_getISO3Language(), uloc_getISO3Country(), */
+static void TestSimpleResourceInfo() {
+ int32_t i;
+ char* testLocale = 0;
+ UChar* expected = 0;
+
+ const char* temp;
+ char temp2[20];
+ testLocale=(char*)malloc(sizeof(char) * 1);
+ expected=(UChar*)malloc(sizeof(UChar) * 1);
+
+ setUpDataTable();
+ log_verbose("Testing getISO3Language and getISO3Country\n");
+ for (i = 0; i < LOCALE_SIZE; i++) {
+
+ testLocale=(char*)realloc(testLocale, sizeof(char) * (u_strlen(dataTable[NAME][i])+1));
+ u_austrcpy(testLocale, dataTable[NAME][i]);
+
+ log_verbose("Testing %s ......\n", testLocale);
+
+ temp=uloc_getISO3Language(testLocale);
+ expected=(UChar*)realloc(expected, sizeof(UChar) * (strlen(temp) + 1));
+ u_uastrcpy(expected,temp);
+ if (0 != u_strcmp(expected, dataTable[LANG3][i])) {
+ log_err(" ISO-3 language code mismatch: %s versus %s\n", austrdup(expected),
+ austrdup(dataTable[LANG3][i]));
+ }
+
+ temp=uloc_getISO3Country(testLocale);
+ expected=(UChar*)realloc(expected, sizeof(UChar) * (strlen(temp) + 1));
+ u_uastrcpy(expected,temp);
+ if (0 != u_strcmp(expected, dataTable[CTRY3][i])) {
+ log_err(" ISO-3 Country code mismatch: %s versus %s\n", austrdup(expected),
+ austrdup(dataTable[CTRY3][i]));
+ }
+ sprintf(temp2, "%x", (int)uloc_getLCID(testLocale));
+ if (strcmp(temp2, rawData2[LCID][i]) != 0) {
+ log_err("LCID mismatch: %s versus %s\n", temp2 , rawData2[LCID][i]);
+ }
+ }
+
+ free(expected);
+ free(testLocale);
+ cleanUpDataTable();
+}
+
+/*
+ * Jitterbug 2439 -- markus 20030425
+ *
+ * The lookup of display names must not fall back through the default
+ * locale because that yields useless results.
+ */
+static void TestDisplayNames()
+{
+ UChar buffer[100];
+ UErrorCode errorCode=U_ZERO_ERROR;
+ int32_t length;
+ log_verbose("Testing getDisplayName for different locales\n");
+
+ log_verbose(" In locale = en_US...\n");
+ doTestDisplayNames("en_US", DLANG_EN);
+ log_verbose(" In locale = fr_FR....\n");
+ doTestDisplayNames("fr_FR", DLANG_FR);
+ log_verbose(" In locale = ca_ES...\n");
+ doTestDisplayNames("ca_ES", DLANG_CA);
+ log_verbose(" In locale = gr_EL..\n");
+ doTestDisplayNames("el_GR", DLANG_EL);
+
+ /* test that the default locale has a display name for its own language */
+ errorCode=U_ZERO_ERROR;
+ length=uloc_getDisplayLanguage(NULL, NULL, buffer, LENGTHOF(buffer), &errorCode);
+ if(U_FAILURE(errorCode) || (length<=3 && buffer[0]<=0x7f)) {
+ /* check <=3 to reject getting the language code as a display name */
+ log_err("unable to get a display string for the language of the default locale - %s\n", u_errorName(errorCode));
+ }
+
+ /* test that we get the language code itself for an unknown language, and a default warning */
+ errorCode=U_ZERO_ERROR;
+ length=uloc_getDisplayLanguage("qq", "rr", buffer, LENGTHOF(buffer), &errorCode);
+ if(errorCode!=U_USING_DEFAULT_WARNING || length!=2 || buffer[0]!=0x71 || buffer[1]!=0x71) {
+ log_err("error getting the display string for an unknown language - %s\n", u_errorName(errorCode));
+ }
+
+ /* test that we get a default warning for a display name where one component is unknown (4255) */
+ errorCode=U_ZERO_ERROR;
+ length=uloc_getDisplayName("qq_US_POSIX", "en_US", buffer, LENGTHOF(buffer), &errorCode);
+ if(errorCode!=U_USING_DEFAULT_WARNING) {
+ log_err("error getting the display name for a locale with an unknown language - %s\n", u_errorName(errorCode));
+ }
+
+ {
+ int32_t i;
+ static const char *aLocale = "es@collation=traditional;calendar=japanese";
+ static const char *testL[] = { "en_US",
+ "fr_FR",
+ "ca_ES",
+ "el_GR" };
+ static const char *expect[] = { "Spanish (calendar=Japanese Calendar, collation=Traditional Sort Order)", /* note sorted order of keywords */
+ "espagnol (Calendrier=Calendrier japonais, Ordonnancement=Ordre traditionnel)",
+ "espanyol (calendar=japanese, collation=traditional)",
+ "\\u0399\\u03C3\\u03C0\\u03B1\\u03BD\\u03B9\\u03BA\\u03AC (\\u0397\\u03BC\\u03B5\\u03C1\\u03BF\\u03BB\\u03CC\\u03B3\\u03B9\\u03BF=\\u0399\\u03B1\\u03C0\\u03C9\\u03BD\\u03B9\\u03BA\\u03CC \\u0397\\u03BC\\u03B5\\u03C1\\u03BF\\u03BB\\u03CC\\u03B3\\u03B9\\u03BF, \\u03A4\\u03B1\\u03BA\\u03C4\\u03BF\\u03C0\\u03BF\\u03AF\\u03B7\\u03C3\\u03B7=\\u03A0\\u03B1\\u03C1\\u03B1\\u03B4\\u03BF\\u03C3\\u03B9\\u03B1\\u03BA\\u03AE \\u03A3\\u03B5\\u03B9\\u03C1\\u03AC)" };
+ UChar *expectBuffer;
+
+ for(i=0;i<LENGTHOF(testL);i++) {
+ errorCode = U_ZERO_ERROR;
+ uloc_getDisplayName(aLocale, testL[i], buffer, LENGTHOF(buffer), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("FAIL in uloc_getDisplayName(%s,%s,..) -> %s\n", aLocale, testL[i], u_errorName(errorCode));
+ } else {
+ expectBuffer = CharsToUChars(expect[i]);
+ if(u_strcmp(buffer,expectBuffer)) {
+ log_err("FAIL in uloc_getDisplayName(%s,%s,..) expected '%s' got '%s'\n", aLocale, testL[i], expect[i], austrdup(buffer));
+ } else {
+ log_verbose("pass in uloc_getDisplayName(%s,%s,..) got '%s'\n", aLocale, testL[i], expect[i]);
+ }
+ free(expectBuffer);
+ }
+ }
+ }
+}
+
+
+/* test for uloc_getAvialable() and uloc_countAvilable()*/
+static void TestGetAvailableLocales()
+{
+
+ const char *locList;
+ int32_t locCount,i;
+
+ log_verbose("Testing the no of avialable locales\n");
+ locCount=uloc_countAvailable();
+ if (locCount == 0)
+ log_data_err("countAvailable() returned an empty list!\n");
+
+ /* use something sensible w/o hardcoding the count */
+ else if(locCount < 0){
+ log_data_err("countAvailable() returned a wrong value!= %d\n", locCount);
+ }
+ else{
+ log_info("Number of locales returned = %d\n", locCount);
+ }
+ for(i=0;i<locCount;i++){
+ locList=uloc_getAvailable(i);
+
+ log_verbose(" %s\n", locList);
+ }
+}
+
+/* test for u_getDataDirectory, u_setDataDirectory, uloc_getISO3Language */
+static void TestDataDirectory()
+{
+
+ char oldDirectory[512];
+ const char *temp,*testValue1,*testValue2,*testValue3;
+ const char path[40] ="d:\\icu\\source\\test\\intltest" U_FILE_SEP_STRING; /*give the required path */
+
+ log_verbose("Testing getDataDirectory()\n");
+ temp = u_getDataDirectory();
+ strcpy(oldDirectory, temp);
+
+ testValue1=uloc_getISO3Language("en_US");
+ log_verbose("first fetch of language retrieved %s\n", testValue1);
+
+ if (0 != strcmp(testValue1,"eng")){
+ log_err("Initial check of ISO3 language failed: expected \"eng\", got %s \n", testValue1);
+ }
+
+ /*defining the path for DataDirectory */
+ log_verbose("Testing setDataDirectory\n");
+ u_setDataDirectory( path );
+ if(strcmp(path, u_getDataDirectory())==0)
+ log_verbose("setDataDirectory working fine\n");
+ else
+ log_err("Error in setDataDirectory. Directory not set correctly - came back as [%s], expected [%s]\n", u_getDataDirectory(), path);
+
+ testValue2=uloc_getISO3Language("en_US");
+ log_verbose("second fetch of language retrieved %s \n", testValue2);
+
+ u_setDataDirectory(oldDirectory);
+ testValue3=uloc_getISO3Language("en_US");
+ log_verbose("third fetch of language retrieved %s \n", testValue3);
+
+ if (0 != strcmp(testValue3,"eng")) {
+ log_err("get/setDataDirectory() failed: expected \"eng\", got \" %s \" \n", testValue3);
+ }
+}
+
+
+
+/*=========================================================== */
+
+static UChar _NUL=0;
+
+static void doTestDisplayNames(const char* displayLocale, int32_t compareIndex)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i;
+ int32_t maxresultsize;
+
+ const char *testLocale;
+
+
+ UChar *testLang = 0;
+ UChar *testScript = 0;
+ UChar *testCtry = 0;
+ UChar *testVar = 0;
+ UChar *testName = 0;
+
+
+ UChar* expectedLang = 0;
+ UChar* expectedScript = 0;
+ UChar* expectedCtry = 0;
+ UChar* expectedVar = 0;
+ UChar* expectedName = 0;
+
+setUpDataTable();
+
+ for(i=0;i<LOCALE_SIZE; ++i)
+ {
+ testLocale=rawData2[NAME][i];
+
+ log_verbose("Testing..... %s\n", testLocale);
+
+ maxresultsize=0;
+ maxresultsize=uloc_getDisplayLanguage(testLocale, displayLocale, NULL, maxresultsize, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ testLang=(UChar*)malloc(sizeof(UChar) * (maxresultsize+1));
+ uloc_getDisplayLanguage(testLocale, displayLocale, testLang, maxresultsize + 1, &status);
+ }
+ else
+ {
+ testLang=&_NUL;
+ }
+ if(U_FAILURE(status)){
+ log_err("Error in getDisplayLanguage() %s\n", myErrorName(status));
+ }
+
+ maxresultsize=0;
+ maxresultsize=uloc_getDisplayScript(testLocale, displayLocale, NULL, maxresultsize, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ testScript=(UChar*)malloc(sizeof(UChar) * (maxresultsize+1));
+ uloc_getDisplayScript(testLocale, displayLocale, testScript, maxresultsize + 1, &status);
+ }
+ else
+ {
+ testScript=&_NUL;
+ }
+ if(U_FAILURE(status)){
+ log_err("Error in getDisplayScript() %s\n", myErrorName(status));
+ }
+
+ maxresultsize=0;
+ maxresultsize=uloc_getDisplayCountry(testLocale, displayLocale, NULL, maxresultsize, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ testCtry=(UChar*)malloc(sizeof(UChar) * (maxresultsize+1));
+ uloc_getDisplayCountry(testLocale, displayLocale, testCtry, maxresultsize + 1, &status);
+ }
+ else
+ {
+ testCtry=&_NUL;
+ }
+ if(U_FAILURE(status)){
+ log_err("Error in getDisplayCountry() %s\n", myErrorName(status));
+ }
+
+ maxresultsize=0;
+ maxresultsize=uloc_getDisplayVariant(testLocale, displayLocale, NULL, maxresultsize, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ testVar=(UChar*)malloc(sizeof(UChar) * (maxresultsize+1));
+ uloc_getDisplayVariant(testLocale, displayLocale, testVar, maxresultsize + 1, &status);
+ }
+ else
+ {
+ testVar=&_NUL;
+ }
+ if(U_FAILURE(status)){
+ log_err("Error in getDisplayVariant() %s\n", myErrorName(status));
+ }
+
+ maxresultsize=0;
+ maxresultsize=uloc_getDisplayName(testLocale, displayLocale, NULL, maxresultsize, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ testName=(UChar*)malloc(sizeof(UChar) * (maxresultsize+1));
+ uloc_getDisplayName(testLocale, displayLocale, testName, maxresultsize + 1, &status);
+ }
+ else
+ {
+ testName=&_NUL;
+ }
+ if(U_FAILURE(status)){
+ log_err("Error in getDisplayName() %s\n", myErrorName(status));
+ }
+
+ expectedLang=dataTable[compareIndex][i];
+ if(u_strlen(expectedLang)== 0)
+ expectedLang=dataTable[DLANG_EN][i];
+
+ expectedScript=dataTable[compareIndex + 1][i];
+ if(u_strlen(expectedScript)== 0)
+ expectedScript=dataTable[DSCRIPT_EN][i];
+
+ expectedCtry=dataTable[compareIndex + 2][i];
+ if(u_strlen(expectedCtry)== 0)
+ expectedCtry=dataTable[DCTRY_EN][i];
+
+ expectedVar=dataTable[compareIndex + 3][i];
+ if(u_strlen(expectedVar)== 0)
+ expectedVar=dataTable[DVAR_EN][i];
+
+ expectedName=dataTable[compareIndex + 4][i];
+ if(u_strlen(expectedName) == 0)
+ expectedName=dataTable[DNAME_EN][i];
+
+ if (0 !=u_strcmp(testLang,expectedLang)) {
+ log_data_err(" Display Language mismatch: got %s expected %s displayLocale=%s\n", austrdup(testLang), austrdup(expectedLang), displayLocale);
+ }
+
+ if (0 != u_strcmp(testScript,expectedScript)) {
+ log_data_err(" Display Script mismatch: got %s expected %s displayLocale=%s\n", austrdup(testScript), austrdup(expectedScript), displayLocale);
+ }
+
+ if (0 != u_strcmp(testCtry,expectedCtry)) {
+ log_data_err(" Display Country mismatch: got %s expected %s displayLocale=%s\n", austrdup(testCtry), austrdup(expectedCtry), displayLocale);
+ }
+
+ if (0 != u_strcmp(testVar,expectedVar)) {
+ log_data_err(" Display Variant mismatch: got %s expected %s displayLocale=%s\n", austrdup(testVar), austrdup(expectedVar), displayLocale);
+ }
+
+ if(0 != u_strcmp(testName, expectedName)) {
+ log_data_err(" Display Name mismatch: got %s expected %s displayLocale=%s\n", austrdup(testName), austrdup(expectedName), displayLocale);
+ }
+
+ if(testName!=&_NUL) {
+ free(testName);
+ }
+ if(testLang!=&_NUL) {
+ free(testLang);
+ }
+ if(testScript!=&_NUL) {
+ free(testScript);
+ }
+ if(testCtry!=&_NUL) {
+ free(testCtry);
+ }
+ if(testVar!=&_NUL) {
+ free(testVar);
+ }
+ }
+cleanUpDataTable();
+}
+
+/* test for uloc_getISOLanguages, uloc_getISOCountries */
+static void TestISOFunctions()
+{
+ const char* const* str=uloc_getISOLanguages();
+ const char* const* str1=uloc_getISOCountries();
+ const char* test;
+ const char *key = NULL;
+ int32_t count = 0, skipped = 0;
+ int32_t expect;
+ UResourceBundle *res;
+ UResourceBundle *subRes;
+ UErrorCode status = U_ZERO_ERROR;
+
+ /* test getISOLanguages*/
+ /*str=uloc_getISOLanguages(); */
+ log_verbose("Testing ISO Languages: \n");
+
+ /* use structLocale - this data is no longer in root */
+ res = ures_openDirect(loadTestData(&status), "structLocale", &status);
+ subRes = ures_getByKey(res, "Languages", NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("There is an error in structLocale's ures_getByKey(\"Languages\"), status=%s\n", u_errorName(status));
+ return;
+ }
+
+ expect = ures_getSize(subRes);
+ for(count = 0; *(str+count) != 0; count++)
+ {
+ key = NULL;
+ test = *(str+count);
+ status = U_ZERO_ERROR;
+
+ do {
+ /* Skip over language tags. This API only returns language codes. */
+ skipped += (key != NULL);
+ ures_getNextString(subRes, NULL, &key, &status);
+ }
+ while (key != NULL && strchr(key, '_'));
+
+ if(key == NULL)
+ break;
+ /* TODO: Consider removing sh, which is deprecated */
+ if(strcmp(key,"root") == 0 || strcmp(key,"Fallback") == 0 || strcmp(key,"sh") == 0) {
+ ures_getNextString(subRes, NULL, &key, &status);
+ skipped++;
+ }
+#if U_CHARSET_FAMILY==U_ASCII_FAMILY
+ /* This code only works on ASCII machines where the keys are stored in ASCII order */
+ if(strcmp(test,key)) {
+ /* The first difference usually implies the place where things get out of sync */
+ log_err("FAIL Language diff at offset %d, \"%s\" != \"%s\"\n", count, test, key);
+ }
+#endif
+
+ if(!strcmp(test,"in"))
+ log_err("FAIL getISOLanguages() has obsolete language code %s\n", test);
+ if(!strcmp(test,"iw"))
+ log_err("FAIL getISOLanguages() has obsolete language code %s\n", test);
+ if(!strcmp(test,"ji"))
+ log_err("FAIL getISOLanguages() has obsolete language code %s\n", test);
+ if(!strcmp(test,"jw"))
+ log_err("FAIL getISOLanguages() has obsolete language code %s\n", test);
+ if(!strcmp(test,"sh"))
+ log_err("FAIL getISOLanguages() has obsolete language code %s\n", test);
+ }
+
+ expect -= skipped; /* Ignore the skipped resources from structLocale */
+
+ if(count!=expect) {
+ log_err("There is an error in getISOLanguages, got %d, expected %d (as per structLocale)\n", count, expect);
+ }
+
+ subRes = ures_getByKey(res, "Countries", subRes, &status);
+ log_verbose("Testing ISO Countries");
+ skipped = 0;
+ expect = ures_getSize(subRes) - 1; /* Skip ZZ */
+ for(count = 0; *(str1+count) != 0; count++)
+ {
+ key = NULL;
+ test = *(str1+count);
+ do {
+ /* Skip over numeric UN tags. This API only returns ISO-3166 codes. */
+ skipped += (key != NULL);
+ ures_getNextString(subRes, NULL, &key, &status);
+ }
+ while (key != NULL && strlen(key) != 2);
+
+ if(key == NULL)
+ break;
+ /* TODO: Consider removing CS, which is deprecated */
+ while(strcmp(key,"QO") == 0 || strcmp(key,"QU") == 0 || strcmp(key,"CS") == 0) {
+ ures_getNextString(subRes, NULL, &key, &status);
+ skipped++;
+ }
+#if U_CHARSET_FAMILY==U_ASCII_FAMILY
+ /* This code only works on ASCII machines where the keys are stored in ASCII order */
+ if(strcmp(test,key)) {
+ /* The first difference usually implies the place where things get out of sync */
+ log_err("FAIL Country diff at offset %d, \"%s\" != \"%s\"\n", count, test, key);
+ }
+#endif
+ if(!strcmp(test,"FX"))
+ log_err("FAIL getISOCountries() has obsolete country code %s\n", test);
+ if(!strcmp(test,"YU"))
+ log_err("FAIL getISOCountries() has obsolete country code %s\n", test);
+ if(!strcmp(test,"ZR"))
+ log_err("FAIL getISOCountries() has obsolete country code %s\n", test);
+ }
+
+ ures_getNextString(subRes, NULL, &key, &status);
+ if (strcmp(key, "ZZ") != 0) {
+ log_err("ZZ was expected to be the last entry in structLocale, but got %s\n", key);
+ }
+#if U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+ /* On EBCDIC machines, the numbers are sorted last. Account for those in the skipped value too. */
+ key = NULL;
+ do {
+ /* Skip over numeric UN tags. uloc_getISOCountries only returns ISO-3166 codes. */
+ skipped += (key != NULL);
+ ures_getNextString(subRes, NULL, &key, &status);
+ }
+ while (U_SUCCESS(status) && key != NULL && strlen(key) != 2);
+#endif
+ expect -= skipped; /* Ignore the skipped resources from structLocale */
+ if(count!=expect)
+ {
+ log_err("There is an error in getISOCountries, got %d, expected %d \n", count, expect);
+ }
+ ures_close(subRes);
+ ures_close(res);
+}
+
+static void setUpDataTable()
+{
+ int32_t i,j;
+ dataTable = (UChar***)(calloc(sizeof(UChar**),LOCALE_INFO_SIZE));
+
+ for (i = 0; i < LOCALE_INFO_SIZE; i++) {
+ dataTable[i] = (UChar**)(calloc(sizeof(UChar*),LOCALE_SIZE));
+ for (j = 0; j < LOCALE_SIZE; j++){
+ dataTable[i][j] = CharsToUChars(rawData2[i][j]);
+ }
+ }
+}
+
+static void cleanUpDataTable()
+{
+ int32_t i,j;
+ if(dataTable != NULL) {
+ for (i=0; i<LOCALE_INFO_SIZE; i++) {
+ for(j = 0; j < LOCALE_SIZE; j++) {
+ free(dataTable[i][j]);
+ }
+ free(dataTable[i]);
+ }
+ free(dataTable);
+ }
+ dataTable = NULL;
+}
+
+/**
+ * @bug 4011756 4011380
+ */
+static void TestISO3Fallback()
+{
+ const char* test="xx_YY";
+
+ const char * result;
+
+ result = uloc_getISO3Language(test);
+
+ /* Conform to C API usage */
+
+ if (!result || (result[0] != 0))
+ log_err("getISO3Language() on xx_YY returned %s instead of \"\"");
+
+ result = uloc_getISO3Country(test);
+
+ if (!result || (result[0] != 0))
+ log_err("getISO3Country() on xx_YY returned %s instead of \"\"");
+}
+
+/**
+ * @bug 4118587
+ */
+static void TestSimpleDisplayNames()
+{
+ /*
+ This test is different from TestDisplayNames because TestDisplayNames checks
+ fallback behavior, combination of language and country names to form locale
+ names, and other stuff like that. This test just checks specific language
+ and country codes to make sure we have the correct names for them.
+ */
+ char languageCodes[] [4] = { "he", "id", "iu", "ug", "yi", "za" };
+ const char* languageNames [] = { "Hebrew", "Indonesian", "Inuktitut", "Uighur", "Yiddish",
+ "Zhuang" };
+ UErrorCode status=U_ZERO_ERROR;
+
+ int32_t i;
+ for (i = 0; i < 6; i++) {
+ UChar *testLang=0;
+ UChar *expectedLang=0;
+ int size=0;
+ size=uloc_getDisplayLanguage(languageCodes[i], "en_US", NULL, size, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ testLang=(UChar*)malloc(sizeof(UChar) * (size + 1));
+ uloc_getDisplayLanguage(languageCodes[i], "en_US", testLang, size + 1, &status);
+ }
+ expectedLang=(UChar*)malloc(sizeof(UChar) * (strlen(languageNames[i])+1));
+ u_uastrcpy(expectedLang, languageNames[i]);
+ if (u_strcmp(testLang, expectedLang) != 0)
+ log_data_err("Got wrong display name for %s : Expected \"%s\", got \"%s\".\n",
+ languageCodes[i], languageNames[i], austrdup(testLang));
+ free(testLang);
+ free(expectedLang);
+ }
+
+}
+
+/**
+ * @bug 4118595
+ */
+static void TestUninstalledISO3Names()
+{
+ /* This test checks to make sure getISO3Language and getISO3Country work right
+ even for locales that are not installed. */
+ static const char iso2Languages [][4] = { "am", "ba", "fy", "mr", "rn",
+ "ss", "tw", "zu" };
+ static const char iso3Languages [][5] = { "amh", "bak", "fry", "mar", "run",
+ "ssw", "twi", "zul" };
+ static const char iso2Countries [][6] = { "am_AF", "ba_BW", "fy_KZ", "mr_MO", "rn_MN",
+ "ss_SB", "tw_TC", "zu_ZW" };
+ static const char iso3Countries [][4] = { "AFG", "BWA", "KAZ", "MAC", "MNG",
+ "SLB", "TCA", "ZWE" };
+ int32_t i;
+
+ for (i = 0; i < 8; i++) {
+ UErrorCode err = U_ZERO_ERROR;
+ const char *test;
+ test = uloc_getISO3Language(iso2Languages[i]);
+ if(strcmp(test, iso3Languages[i]) !=0 || U_FAILURE(err))
+ log_err("Got wrong ISO3 code for %s : Expected \"%s\", got \"%s\". %s\n",
+ iso2Languages[i], iso3Languages[i], test, myErrorName(err));
+ }
+ for (i = 0; i < 8; i++) {
+ UErrorCode err = U_ZERO_ERROR;
+ const char *test;
+ test = uloc_getISO3Country(iso2Countries[i]);
+ if(strcmp(test, iso3Countries[i]) !=0 || U_FAILURE(err))
+ log_err("Got wrong ISO3 code for %s : Expected \"%s\", got \"%s\". %s\n",
+ iso2Countries[i], iso3Countries[i], test, myErrorName(err));
+ }
+}
+
+
+static void TestVariantParsing()
+{
+ static const char* en_US_custom="en_US_De Anza_Cupertino_California_United States_Earth";
+ static const char* dispName="English (United States, DE ANZA_CUPERTINO_CALIFORNIA_UNITED STATES_EARTH)";
+ static const char* dispVar="DE ANZA_CUPERTINO_CALIFORNIA_UNITED STATES_EARTH";
+ static const char* shortVariant="fr_FR_foo";
+ static const char* bogusVariant="fr_FR__foo";
+ static const char* bogusVariant2="fr_FR_foo_";
+ static const char* bogusVariant3="fr_FR__foo_";
+
+
+ UChar displayVar[100];
+ UChar displayName[100];
+ UErrorCode status=U_ZERO_ERROR;
+ UChar* got=0;
+ int32_t size=0;
+ size=uloc_getDisplayVariant(en_US_custom, "en_US", NULL, size, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ got=(UChar*)realloc(got, sizeof(UChar) * (size+1));
+ uloc_getDisplayVariant(en_US_custom, "en_US", got, size + 1, &status);
+ }
+ else {
+ log_err("FAIL: Didn't get U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ u_uastrcpy(displayVar, dispVar);
+ if(u_strcmp(got,displayVar)!=0) {
+ log_err("FAIL: getDisplayVariant() Wanted %s, got %s\n", dispVar, austrdup(got));
+ }
+ size=0;
+ size=uloc_getDisplayName(en_US_custom, "en_US", NULL, size, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ got=(UChar*)realloc(got, sizeof(UChar) * (size+1));
+ uloc_getDisplayName(en_US_custom, "en_US", got, size + 1, &status);
+ }
+ else {
+ log_err("FAIL: Didn't get U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ u_uastrcpy(displayName, dispName);
+ if(u_strcmp(got,displayName)!=0) {
+ log_err("FAIL: getDisplayName() Wanted %s, got %s\n", dispName, austrdup(got));
+ }
+
+ size=0;
+ status=U_ZERO_ERROR;
+ size=uloc_getDisplayVariant(shortVariant, NULL, NULL, size, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ got=(UChar*)realloc(got, sizeof(UChar) * (size+1));
+ uloc_getDisplayVariant(shortVariant, NULL, got, size + 1, &status);
+ }
+ else {
+ log_err("FAIL: Didn't get U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ if(strcmp(austrdup(got),"FOO")!=0) {
+ log_err("FAIL: getDisplayVariant() Wanted: foo Got: %s\n", austrdup(got));
+ }
+ size=0;
+ status=U_ZERO_ERROR;
+ size=uloc_getDisplayVariant(bogusVariant, NULL, NULL, size, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ got=(UChar*)realloc(got, sizeof(UChar) * (size+1));
+ uloc_getDisplayVariant(bogusVariant, NULL, got, size + 1, &status);
+ }
+ else {
+ log_err("FAIL: Didn't get U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ if(strcmp(austrdup(got),"_FOO")!=0) {
+ log_err("FAIL: getDisplayVariant() Wanted: _FOO Got: %s\n", austrdup(got));
+ }
+ size=0;
+ status=U_ZERO_ERROR;
+ size=uloc_getDisplayVariant(bogusVariant2, NULL, NULL, size, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ got=(UChar*)realloc(got, sizeof(UChar) * (size+1));
+ uloc_getDisplayVariant(bogusVariant2, NULL, got, size + 1, &status);
+ }
+ else {
+ log_err("FAIL: Didn't get U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ if(strcmp(austrdup(got),"FOO_")!=0) {
+ log_err("FAIL: getDisplayVariant() Wanted: FOO_ Got: %s\n", austrdup(got));
+ }
+ size=0;
+ status=U_ZERO_ERROR;
+ size=uloc_getDisplayVariant(bogusVariant3, NULL, NULL, size, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ got=(UChar*)realloc(got, sizeof(UChar) * (size+1));
+ uloc_getDisplayVariant(bogusVariant3, NULL, got, size + 1, &status);
+ }
+ else {
+ log_err("FAIL: Didn't get U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ if(strcmp(austrdup(got),"_FOO_")!=0) {
+ log_err("FAIL: getDisplayVariant() Wanted: _FOO_ Got: %s\n", austrdup(got));
+ }
+ free(got);
+}
+
+
+static void TestObsoleteNames(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ char buff[256];
+
+ static const struct
+ {
+ char locale[9];
+ char lang3[4];
+ char lang[4];
+ char ctry3[4];
+ char ctry[4];
+ } tests[] =
+ {
+ { "eng_USA", "eng", "en", "USA", "US" },
+ { "kok", "kok", "kok", "", "" },
+ { "in", "ind", "in", "", "" },
+ { "id", "ind", "id", "", "" }, /* NO aliasing */
+ { "sh", "srp", "sh", "", "" },
+ { "zz_CS", "", "zz", "SCG", "CS" },
+ { "zz_FX", "", "zz", "FXX", "FX" },
+ { "zz_RO", "", "zz", "ROU", "RO" },
+ { "zz_TP", "", "zz", "TMP", "TP" },
+ { "zz_TL", "", "zz", "TLS", "TL" },
+ { "zz_ZR", "", "zz", "ZAR", "ZR" },
+ { "zz_FXX", "", "zz", "FXX", "FX" }, /* no aliasing. Doesn't go to PS(PSE). */
+ { "zz_ROM", "", "zz", "ROU", "RO" },
+ { "zz_ROU", "", "zz", "ROU", "RO" },
+ { "zz_ZAR", "", "zz", "ZAR", "ZR" },
+ { "zz_TMP", "", "zz", "TMP", "TP" },
+ { "zz_TLS", "", "zz", "TLS", "TL" },
+ { "zz_YUG", "", "zz", "YUG", "YU" },
+ { "mlt_PSE", "mlt", "mt", "PSE", "PS" },
+ { "iw", "heb", "iw", "", "" },
+ { "ji", "yid", "ji", "", "" },
+ { "jw", "jaw", "jw", "", "" },
+ { "sh", "srp", "sh", "", "" },
+ { "", "", "", "", "" }
+ };
+
+ for(i=0;tests[i].locale[0];i++)
+ {
+ const char *locale;
+
+ locale = tests[i].locale;
+ log_verbose("** %s:\n", locale);
+
+ status = U_ZERO_ERROR;
+ if(strcmp(tests[i].lang3,uloc_getISO3Language(locale)))
+ {
+ log_err("FAIL: uloc_getISO3Language(%s)==\t\"%s\",\t expected \"%s\"\n",
+ locale, uloc_getISO3Language(locale), tests[i].lang3);
+ }
+ else
+ {
+ log_verbose(" uloc_getISO3Language()==\t\"%s\"\n",
+ uloc_getISO3Language(locale) );
+ }
+
+ status = U_ZERO_ERROR;
+ uloc_getLanguage(locale, buff, 256, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error getting language from %s\n", locale);
+ }
+ else
+ {
+ if(strcmp(buff,tests[i].lang))
+ {
+ log_err("FAIL: uloc_getLanguage(%s)==\t\"%s\"\t expected \"%s\"\n",
+ locale, buff, tests[i].lang);
+ }
+ else
+ {
+ log_verbose(" uloc_getLanguage(%s)==\t%s\n", locale, buff);
+ }
+ }
+ if(strcmp(tests[i].lang3,uloc_getISO3Language(locale)))
+ {
+ log_err("FAIL: uloc_getISO3Language(%s)==\t\"%s\",\t expected \"%s\"\n",
+ locale, uloc_getISO3Language(locale), tests[i].lang3);
+ }
+ else
+ {
+ log_verbose(" uloc_getISO3Language()==\t\"%s\"\n",
+ uloc_getISO3Language(locale) );
+ }
+
+ if(strcmp(tests[i].ctry3,uloc_getISO3Country(locale)))
+ {
+ log_err("FAIL: uloc_getISO3Country(%s)==\t\"%s\",\t expected \"%s\"\n",
+ locale, uloc_getISO3Country(locale), tests[i].ctry3);
+ }
+ else
+ {
+ log_verbose(" uloc_getISO3Country()==\t\"%s\"\n",
+ uloc_getISO3Country(locale) );
+ }
+
+ status = U_ZERO_ERROR;
+ uloc_getCountry(locale, buff, 256, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("FAIL: error getting country from %s\n", locale);
+ }
+ else
+ {
+ if(strcmp(buff,tests[i].ctry))
+ {
+ log_err("FAIL: uloc_getCountry(%s)==\t\"%s\"\t expected \"%s\"\n",
+ locale, buff, tests[i].ctry);
+ }
+ else
+ {
+ log_verbose(" uloc_getCountry(%s)==\t%s\n", locale, buff);
+ }
+ }
+ }
+
+ if (uloc_getLCID("iw_IL") != uloc_getLCID("he_IL")) {
+ log_err("he,iw LCID mismatch: %X versus %X\n", uloc_getLCID("iw_IL"), uloc_getLCID("he_IL"));
+ }
+
+ if (uloc_getLCID("iw") != uloc_getLCID("he")) {
+ log_err("he,iw LCID mismatch: %X versus %X\n", uloc_getLCID("iw"), uloc_getLCID("he"));
+ }
+
+#if 0
+
+ i = uloc_getLanguage("kok",NULL,0,&icu_err);
+ if(U_FAILURE(icu_err))
+ {
+ log_err("FAIL: Got %s trying to do uloc_getLanguage(kok)\n", u_errorName(icu_err));
+ }
+
+ icu_err = U_ZERO_ERROR;
+ uloc_getLanguage("kok",r1_buff,12,&icu_err);
+ if(U_FAILURE(icu_err))
+ {
+ log_err("FAIL: Got %s trying to do uloc_getLanguage(kok, buff)\n", u_errorName(icu_err));
+ }
+
+ r1_addr = (char *)uloc_getISO3Language("kok");
+
+ icu_err = U_ZERO_ERROR;
+ if (strcmp(r1_buff,"kok") != 0)
+ {
+ log_err("FAIL: uloc_getLanguage(kok)==%s not kok\n",r1_buff);
+ line--;
+ }
+ r1_addr = (char *)uloc_getISO3Language("in");
+ i = uloc_getLanguage(r1_addr,r1_buff,12,&icu_err);
+ if (strcmp(r1_buff,"id") != 0)
+ {
+ printf("uloc_getLanguage error (%s)\n",r1_buff);
+ line--;
+ }
+ r1_addr = (char *)uloc_getISO3Language("sh");
+ i = uloc_getLanguage(r1_addr,r1_buff,12,&icu_err);
+ if (strcmp(r1_buff,"sr") != 0)
+ {
+ printf("uloc_getLanguage error (%s)\n",r1_buff);
+ line--;
+ }
+
+ r1_addr = (char *)uloc_getISO3Country("zz_ZR");
+ strcpy(p1_buff,"zz_");
+ strcat(p1_buff,r1_addr);
+ i = uloc_getCountry(p1_buff,r1_buff,12,&icu_err);
+ if (strcmp(r1_buff,"ZR") != 0)
+ {
+ printf("uloc_getCountry error (%s)\n",r1_buff);
+ line--;
+ }
+ r1_addr = (char *)uloc_getISO3Country("zz_FX");
+ strcpy(p1_buff,"zz_");
+ strcat(p1_buff,r1_addr);
+ i = uloc_getCountry(p1_buff,r1_buff,12,&icu_err);
+ if (strcmp(r1_buff,"FX") != 0)
+ {
+ printf("uloc_getCountry error (%s)\n",r1_buff);
+ line--;
+ }
+
+#endif
+
+}
+
+static void TestKeywordVariants(void)
+{
+ static const struct {
+ const char *localeID;
+ const char *expectedLocaleID;
+ const char *expectedLocaleIDNoKeywords;
+ const char *expectedCanonicalID;
+ const char *expectedKeywords[10];
+ int32_t numKeywords;
+ UErrorCode expectedStatus; /* from uloc_openKeywords */
+ } testCases[] = {
+ {
+ "de_DE@ currency = euro; C o ll A t i o n = Phonebook ; C alen dar = buddhist ",
+ "de_DE@calendar=buddhist;collation=Phonebook;currency=euro",
+ "de_DE",
+ "de_DE@calendar=buddhist;collation=Phonebook;currency=euro",
+ {"calendar", "collation", "currency"},
+ 3,
+ U_ZERO_ERROR
+ },
+ {
+ "de_DE@euro",
+ "de_DE@euro",
+ "de_DE",
+ "de_DE@currency=EUR",
+ {"","","","","","",""},
+ 0,
+ U_INVALID_FORMAT_ERROR /* must have '=' after '@' */
+ },
+ {
+ "de_DE@euro;collation=phonebook",
+ "de_DE", /* error result; bad format */
+ "de_DE", /* error result; bad format */
+ "de_DE", /* error result; bad format */
+ {"","","","","","",""},
+ 0,
+ U_INVALID_FORMAT_ERROR
+ }
+ };
+ UErrorCode status = U_ZERO_ERROR;
+
+ int32_t i = 0, j = 0;
+ int32_t resultLen = 0;
+ char buffer[256];
+ UEnumeration *keywords;
+ int32_t keyCount = 0;
+ const char *keyword = NULL;
+ int32_t keywordLen = 0;
+
+ for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
+ status = U_ZERO_ERROR;
+ *buffer = 0;
+ keywords = uloc_openKeywords(testCases[i].localeID, &status);
+
+ if(status != testCases[i].expectedStatus) {
+ log_err("Expected to uloc_openKeywords(\"%s\") => status %s. Got %s instead\n",
+ testCases[i].localeID,
+ u_errorName(testCases[i].expectedStatus), u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ if(keywords) {
+ if((keyCount = uenum_count(keywords, &status)) != testCases[i].numKeywords) {
+ log_err("Expected to get %i keywords, got %i\n", testCases[i].numKeywords, keyCount);
+ }
+ if(keyCount) {
+ j = 0;
+ while((keyword = uenum_next(keywords, &keywordLen, &status))) {
+ if(strcmp(keyword, testCases[i].expectedKeywords[j]) != 0) {
+ log_err("Expected to get keyword value %s, got %s\n", testCases[i].expectedKeywords[j], keyword);
+ }
+ j++;
+ }
+ j = 0;
+ uenum_reset(keywords, &status);
+ while((keyword = uenum_next(keywords, &keywordLen, &status))) {
+ if(strcmp(keyword, testCases[i].expectedKeywords[j]) != 0) {
+ log_err("Expected to get keyword value %s, got %s\n", testCases[i].expectedKeywords[j], keyword);
+ }
+ j++;
+ }
+ }
+ uenum_close(keywords);
+ }
+ resultLen = uloc_getName(testCases[i].localeID, buffer, 256, &status);
+ if (uprv_strcmp(testCases[i].expectedLocaleID, buffer) != 0) {
+ log_err("Expected uloc_getName(\"%s\") => \"%s\"; got \"%s\"\n",
+ testCases[i].localeID, testCases[i].expectedLocaleID, buffer);
+ }
+ resultLen = uloc_canonicalize(testCases[i].localeID, buffer, 256, &status);
+ if (uprv_strcmp(testCases[i].expectedCanonicalID, buffer) != 0) {
+ log_err("Expected uloc_canonicalize(\"%s\") => \"%s\"; got \"%s\"\n",
+ testCases[i].localeID, testCases[i].expectedCanonicalID, buffer);
+ }
+ }
+
+}
+
+static void TestKeywordVariantParsing(void)
+{
+ static const struct {
+ const char *localeID;
+ const char *keyword;
+ const char *expectedValue;
+ } testCases[] = {
+ { "de_DE@ C o ll A t i o n = Phonebook ", "c o ll a t i o n", "Phonebook" },
+ { "de_DE", "collation", ""},
+ { "de_DE@collation=PHONEBOOK", "collation", "PHONEBOOK" },
+ { "de_DE@currency = euro; CoLLaTion = PHONEBOOk", "collatiON", "PHONEBOOk" },
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ int32_t i = 0;
+ int32_t resultLen = 0;
+ char buffer[256];
+
+ for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
+ *buffer = 0;
+ resultLen = uloc_getKeywordValue(testCases[i].localeID, testCases[i].keyword, buffer, 256, &status);
+ if(uprv_strcmp(testCases[i].expectedValue, buffer) != 0) {
+ log_err("Expected to extract \"%s\" from \"%s\" for keyword \"%s\". Got \"%s\" instead\n",
+ testCases[i].expectedValue, testCases[i].localeID, testCases[i].keyword, buffer);
+ }
+ }
+}
+
+static const struct {
+ const char *l; /* locale */
+ const char *k; /* kw */
+ const char *v; /* value */
+ const char *x; /* expected */
+} kwSetTestCases[] = {
+#if 1
+ { "en_US", "calendar", "japanese", "en_US@calendar=japanese" },
+ { "en_US@", "calendar", "japanese", "en_US@calendar=japanese" },
+ { "en_US@calendar=islamic", "calendar", "japanese", "en_US@calendar=japanese" },
+ { "en_US@calendar=slovakian", "calendar", "gregorian", "en_US@calendar=gregorian" }, /* don't know what this means, but it has the same # of chars as gregorian */
+ { "en_US@calendar=gregorian", "calendar", "japanese", "en_US@calendar=japanese" },
+ { "de", "Currency", "CHF", "de@currency=CHF" },
+ { "de", "Currency", "CHF", "de@currency=CHF" },
+
+ { "en_US@collation=phonebook", "calendar", "japanese", "en_US@calendar=japanese;collation=phonebook" },
+ { "en_US@calendar=japanese", "collation", "phonebook", "en_US@calendar=japanese;collation=phonebook" },
+ { "de@collation=phonebook", "Currency", "CHF", "de@collation=phonebook;currency=CHF" },
+ { "en_US@calendar=gregorian;collation=phonebook", "calendar", "japanese", "en_US@calendar=japanese;collation=phonebook" },
+ { "en_US@calendar=slovakian;collation=phonebook", "calendar", "gregorian", "en_US@calendar=gregorian;collation=phonebook" }, /* don't know what this means, but it has the same # of chars as gregorian */
+ { "en_US@calendar=slovakian;collation=videobook", "collation", "phonebook", "en_US@calendar=slovakian;collation=phonebook" }, /* don't know what this means, but it has the same # of chars as gregorian */
+ { "en_US@calendar=islamic;collation=phonebook", "calendar", "japanese", "en_US@calendar=japanese;collation=phonebook" },
+ { "de@collation=phonebook", "Currency", "CHF", "de@collation=phonebook;currency=CHF" },
+#endif
+#if 1
+ { "mt@a=0;b=1;c=2;d=3", "c","j", "mt@a=0;b=1;c=j;d=3" },
+ { "mt@a=0;b=1;c=2;d=3", "x","j", "mt@a=0;b=1;c=2;d=3;x=j" },
+ { "mt@a=0;b=1;c=2;d=3", "a","f", "mt@a=f;b=1;c=2;d=3" },
+ { "mt@a=0;aa=1;aaa=3", "a","x", "mt@a=x;aa=1;aaa=3" },
+ { "mt@a=0;aa=1;aaa=3", "aa","x", "mt@a=0;aa=x;aaa=3" },
+ { "mt@a=0;aa=1;aaa=3", "aaa","x", "mt@a=0;aa=1;aaa=x" },
+ { "mt@a=0;aa=1;aaa=3", "a","yy", "mt@a=yy;aa=1;aaa=3" },
+ { "mt@a=0;aa=1;aaa=3", "aa","yy", "mt@a=0;aa=yy;aaa=3" },
+ { "mt@a=0;aa=1;aaa=3", "aaa","yy", "mt@a=0;aa=1;aaa=yy" },
+#endif
+#if 1
+ /* removal tests */
+ /* 1. removal of item at end */
+ { "de@collation=phonebook;currency=CHF", "currency", "", "de@collation=phonebook" },
+ { "de@collation=phonebook;currency=CHF", "currency", NULL, "de@collation=phonebook" },
+ /* 2. removal of item at beginning */
+ { "de@collation=phonebook;currency=CHF", "collation", "", "de@currency=CHF" },
+ { "de@collation=phonebook;currency=CHF", "collation", NULL, "de@currency=CHF" },
+ /* 3. removal of an item not there */
+ { "de@collation=phonebook;currency=CHF", "calendar", NULL, "de@collation=phonebook;currency=CHF" },
+ /* 4. removal of only item */
+ { "de@collation=phonebook", "collation", NULL, "de" },
+#endif
+ { "de@collation=phonebook", "Currency", "CHF", "de@collation=phonebook;currency=CHF" }
+};
+
+
+static void TestKeywordSet(void)
+{
+ int32_t i = 0;
+ int32_t resultLen = 0;
+ char buffer[1024];
+
+ char cbuffer[1024];
+
+ for(i = 0; i < sizeof(kwSetTestCases)/sizeof(kwSetTestCases[0]); i++) {
+ UErrorCode status = U_ZERO_ERROR;
+ memset(buffer,'%',1023);
+ strcpy(buffer, kwSetTestCases[i].l);
+
+ uloc_canonicalize(kwSetTestCases[i].l, cbuffer, 1023, &status);
+ if(strcmp(buffer,cbuffer)) {
+ log_verbose("note: [%d] wasn't canonical, should be: '%s' not '%s'. Won't check for canonicity in output.\n", i, cbuffer, buffer);
+ }
+ /* sanity check test case results for canonicity */
+ uloc_canonicalize(kwSetTestCases[i].x, cbuffer, 1023, &status);
+ if(strcmp(kwSetTestCases[i].x,cbuffer)) {
+ log_err("%s:%d: ERROR: kwSetTestCases[%d].x = '%s', should be %s (must be canonical)\n", __FILE__, __LINE__, i, kwSetTestCases[i].x, cbuffer);
+ }
+
+ resultLen = uloc_setKeywordValue(kwSetTestCases[i].k, kwSetTestCases[i].v, buffer, 1023, &status);
+ if(U_FAILURE(status)) {
+ log_err("Err on test case %d: got error %s\n", i, u_errorName(status));
+ continue;
+ }
+ if(strcmp(buffer,kwSetTestCases[i].x) || ((int32_t)strlen(buffer)!=resultLen)) {
+ log_err("FAIL: #%d: %s + [%s=%s] -> %s (%d) expected %s (%d)\n", i, kwSetTestCases[i].l, kwSetTestCases[i].k,
+ kwSetTestCases[i].v, buffer, resultLen, kwSetTestCases[i].x, strlen(buffer));
+ } else {
+ log_verbose("pass: #%d: %s + [%s=%s] -> %s\n", i, kwSetTestCases[i].l, kwSetTestCases[i].k, kwSetTestCases[i].v,buffer);
+ }
+ }
+}
+
+static void TestKeywordSetError(void)
+{
+ char buffer[1024];
+ UErrorCode status;
+ int32_t res;
+ int32_t i;
+ int32_t blen;
+
+ /* 0-test whether an error condition modifies the buffer at all */
+ blen=0;
+ i=0;
+ memset(buffer,'%',1023);
+ status = U_ZERO_ERROR;
+ res = uloc_setKeywordValue(kwSetTestCases[i].k, kwSetTestCases[i].v, buffer, blen, &status);
+ if(status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("expected illegal err got %s\n", u_errorName(status));
+ return;
+ }
+ /* if(res!=strlen(kwSetTestCases[i].x)) {
+ log_err("expected result %d got %d\n", strlen(kwSetTestCases[i].x), res);
+ return;
+ } */
+ if(buffer[blen]!='%') {
+ log_err("Buffer byte %d was modified: now %c\n", blen, buffer[blen]);
+ return;
+ }
+ log_verbose("0-buffer modify OK\n");
+
+ for(i=0;i<=2;i++) {
+ /* 1- test a short buffer with growing text */
+ blen=(int32_t)strlen(kwSetTestCases[i].l)+1;
+ memset(buffer,'%',1023);
+ strcpy(buffer,kwSetTestCases[i].l);
+ status = U_ZERO_ERROR;
+ res = uloc_setKeywordValue(kwSetTestCases[i].k, kwSetTestCases[i].v, buffer, blen, &status);
+ if(status != U_BUFFER_OVERFLOW_ERROR) {
+ log_err("expected buffer overflow on buffer %d got %s, len %d (%s + [%s=%s])\n", blen, u_errorName(status), res, kwSetTestCases[i].l, kwSetTestCases[i].k, kwSetTestCases[i].v);
+ return;
+ }
+ if(res!=(int32_t)strlen(kwSetTestCases[i].x)) {
+ log_err("expected result %d got %d\n", strlen(kwSetTestCases[i].x), res);
+ return;
+ }
+ if(buffer[blen]!='%') {
+ log_err("Buffer byte %d was modified: now %c\n", blen, buffer[blen]);
+ return;
+ }
+ log_verbose("1/%d-buffer modify OK\n",i);
+ }
+
+ for(i=3;i<=4;i++) {
+ /* 2- test a short buffer - text the same size or shrinking */
+ blen=(int32_t)strlen(kwSetTestCases[i].l)+1;
+ memset(buffer,'%',1023);
+ strcpy(buffer,kwSetTestCases[i].l);
+ status = U_ZERO_ERROR;
+ res = uloc_setKeywordValue(kwSetTestCases[i].k, kwSetTestCases[i].v, buffer, blen, &status);
+ if(status != U_ZERO_ERROR) {
+ log_err("expected zero error got %s\n", u_errorName(status));
+ return;
+ }
+ if(buffer[blen+1]!='%') {
+ log_err("Buffer byte %d was modified: now %c\n", blen+1, buffer[blen+1]);
+ return;
+ }
+ if(res!=(int32_t)strlen(kwSetTestCases[i].x)) {
+ log_err("expected result %d got %d\n", strlen(kwSetTestCases[i].x), res);
+ return;
+ }
+ if(strcmp(buffer,kwSetTestCases[i].x) || ((int32_t)strlen(buffer)!=res)) {
+ log_err("FAIL: #%d: %s + [%s=%s] -> %s (%d) expected %s (%d)\n", i, kwSetTestCases[i].l, kwSetTestCases[i].k,
+ kwSetTestCases[i].v, buffer, res, kwSetTestCases[i].x, strlen(buffer));
+ } else {
+ log_verbose("pass: #%d: %s + [%s=%s] -> %s\n", i, kwSetTestCases[i].l, kwSetTestCases[i].k, kwSetTestCases[i].v,
+ buffer);
+ }
+ log_verbose("2/%d-buffer modify OK\n",i);
+ }
+}
+
+static int32_t _canonicalize(int32_t selector, /* 0==getName, 1==canonicalize */
+ const char* localeID,
+ char* result,
+ int32_t resultCapacity,
+ UErrorCode* ec) {
+ /* YOU can change this to use function pointers if you like */
+ switch (selector) {
+ case 0:
+ return uloc_getName(localeID, result, resultCapacity, ec);
+ case 1:
+ return uloc_canonicalize(localeID, result, resultCapacity, ec);
+ default:
+ return -1;
+ }
+}
+
+static void TestCanonicalization(void)
+{
+ static const struct {
+ const char *localeID; /* input */
+ const char *getNameID; /* expected getName() result */
+ const char *canonicalID; /* expected canonicalize() result */
+ } testCases[] = {
+ { "ca_ES_PREEURO-with-extra-stuff-that really doesn't make any sense-unless-you're trying to increase code coverage",
+ "ca_ES_PREEURO_WITH_EXTRA_STUFF_THAT REALLY DOESN'T MAKE ANY SENSE_UNLESS_YOU'RE TRYING TO INCREASE CODE COVERAGE",
+ "ca_ES_PREEURO_WITH_EXTRA_STUFF_THAT REALLY DOESN'T MAKE ANY SENSE_UNLESS_YOU'RE TRYING TO INCREASE CODE COVERAGE"},
+ { "ca_ES_PREEURO", "ca_ES_PREEURO", "ca_ES@currency=ESP" },
+ { "de_AT_PREEURO", "de_AT_PREEURO", "de_AT@currency=ATS" },
+ { "de_DE_PREEURO", "de_DE_PREEURO", "de_DE@currency=DEM" },
+ { "de_LU_PREEURO", "de_LU_PREEURO", "de_LU@currency=LUF" },
+ { "el_GR_PREEURO", "el_GR_PREEURO", "el_GR@currency=GRD" },
+ { "en_BE_PREEURO", "en_BE_PREEURO", "en_BE@currency=BEF" },
+ { "en_IE_PREEURO", "en_IE_PREEURO", "en_IE@currency=IEP" },
+ { "es_ES_PREEURO", "es_ES_PREEURO", "es_ES@currency=ESP" },
+ { "eu_ES_PREEURO", "eu_ES_PREEURO", "eu_ES@currency=ESP" },
+ { "fi_FI_PREEURO", "fi_FI_PREEURO", "fi_FI@currency=FIM" },
+ { "fr_BE_PREEURO", "fr_BE_PREEURO", "fr_BE@currency=BEF" },
+ { "fr_FR_PREEURO", "fr_FR_PREEURO", "fr_FR@currency=FRF" },
+ { "fr_LU_PREEURO", "fr_LU_PREEURO", "fr_LU@currency=LUF" },
+ { "ga_IE_PREEURO", "ga_IE_PREEURO", "ga_IE@currency=IEP" },
+ { "gl_ES_PREEURO", "gl_ES_PREEURO", "gl_ES@currency=ESP" },
+ { "it_IT_PREEURO", "it_IT_PREEURO", "it_IT@currency=ITL" },
+ { "nl_BE_PREEURO", "nl_BE_PREEURO", "nl_BE@currency=BEF" },
+ { "nl_NL_PREEURO", "nl_NL_PREEURO", "nl_NL@currency=NLG" },
+ { "pt_PT_PREEURO", "pt_PT_PREEURO", "pt_PT@currency=PTE" },
+ { "de__PHONEBOOK", "de__PHONEBOOK", "de@collation=phonebook" },
+ { "en_GB_EURO", "en_GB_EURO", "en_GB@currency=EUR" },
+ { "en_GB@EURO", "en_GB@EURO", "en_GB@currency=EUR" }, /* POSIX ID */
+ { "es__TRADITIONAL", "es__TRADITIONAL", "es@collation=traditional" },
+ { "hi__DIRECT", "hi__DIRECT", "hi@collation=direct" },
+ { "ja_JP_TRADITIONAL", "ja_JP_TRADITIONAL", "ja_JP@calendar=japanese" },
+ { "th_TH_TRADITIONAL", "th_TH_TRADITIONAL", "th_TH@calendar=buddhist" },
+ { "zh_TW_STROKE", "zh_TW_STROKE", "zh_Hant_TW@collation=stroke" },
+ { "zh__PINYIN", "zh__PINYIN", "zh@collation=pinyin" },
+ { "zh@collation=pinyin", "zh@collation=pinyin", "zh@collation=pinyin" },
+ { "zh_CN@collation=pinyin", "zh_CN@collation=pinyin", "zh_CN@collation=pinyin" },
+ { "zh_CN_CA@collation=pinyin", "zh_CN_CA@collation=pinyin", "zh_CN_CA@collation=pinyin" },
+ { "en_US_POSIX", "en_US_POSIX", "en_US_POSIX" },
+ { "hy_AM_REVISED", "hy_AM_REVISED", "hy_AM_REVISED" },
+ { "no_NO_NY", "no_NO_NY", "no_NO_NY" /* not: "nn_NO" [alan ICU3.0] */ },
+ { "no@ny", "no@ny", "no__NY" /* not: "nn" [alan ICU3.0] */ }, /* POSIX ID */
+ { "no-no.utf32@B", "no_NO.utf32@B", "no_NO_B" /* not: "nb_NO_B" [alan ICU3.0] */ }, /* POSIX ID */
+ { "qz-qz@Euro", "qz_QZ@Euro", "qz_QZ@currency=EUR" }, /* qz-qz uses private use iso codes */
+ { "en-BOONT", "en_BOONT", "en__BOONT" }, /* registered name */
+ { "de-1901", "de_1901", "de__1901" }, /* registered name */
+ { "de-1906", "de_1906", "de__1906" }, /* registered name */
+ { "sr-SP-Cyrl", "sr_SP_CYRL", "sr_Cyrl_CS" }, /* .NET name */
+ { "sr-SP-Latn", "sr_SP_LATN", "sr_Latn_CS" }, /* .NET name */
+ { "sr_YU_CYRILLIC", "sr_YU_CYRILLIC", "sr_Cyrl_CS" }, /* Linux name */
+ { "uz-UZ-Cyrl", "uz_UZ_CYRL", "uz_Cyrl_UZ" }, /* .NET name */
+ { "uz-UZ-Latn", "uz_UZ_LATN", "uz_Latn_UZ" }, /* .NET name */
+ { "zh-CHS", "zh_CHS", "zh_Hans" }, /* .NET name */
+ { "zh-CHT", "zh_CHT", "zh_Hant" }, /* .NET name This may change back to zh_Hant */
+
+ /* posix behavior that used to be performed by getName */
+ { "mr.utf8", "mr.utf8", "mr" },
+ { "de-tv.koi8r", "de_TV.koi8r", "de_TV" },
+ { "x-piglatin_ML.MBE", "x-piglatin_ML.MBE", "x-piglatin_ML" },
+ { "i-cherokee_US.utf7", "i-cherokee_US.utf7", "i-cherokee_US" },
+ { "x-filfli_MT_FILFLA.gb-18030", "x-filfli_MT_FILFLA.gb-18030", "x-filfli_MT_FILFLA" },
+ { "no-no-ny.utf8@B", "no_NO_NY.utf8@B", "no_NO_NY_B" /* not: "nn_NO" [alan ICU3.0] */ }, /* @ ignored unless variant is empty */
+
+ /* fleshing out canonicalization */
+ /* trim space and sort keywords, ';' is separator so not present at end in canonical form */
+ { "en_Hant_IL_VALLEY_GIRL@ currency = EUR; calendar = Japanese ;", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR" },
+ /* already-canonical ids are not changed */
+ { "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR" },
+ /* PRE_EURO and EURO conversions don't affect other keywords */
+ { "es_ES_PREEURO@CALendar=Japanese", "es_ES_PREEURO@calendar=Japanese", "es_ES@calendar=Japanese;currency=ESP" },
+ { "es_ES_EURO@SHOUT=zipeedeedoodah", "es_ES_EURO@shout=zipeedeedoodah", "es_ES@currency=EUR;shout=zipeedeedoodah" },
+ /* currency keyword overrides PRE_EURO and EURO currency */
+ { "es_ES_PREEURO@currency=EUR", "es_ES_PREEURO@currency=EUR", "es_ES@currency=EUR" },
+ { "es_ES_EURO@currency=ESP", "es_ES_EURO@currency=ESP", "es_ES@currency=ESP" },
+ /* norwegian is just too weird, if we handle things in their full generality */
+ { "no-Hant-GB_NY@currency=$$$", "no_Hant_GB_NY@currency=$$$", "no_Hant_GB_NY@currency=$$$" /* not: "nn_Hant_GB@currency=$$$" [alan ICU3.0] */ },
+
+ /* test cases reflecting internal resource bundle usage */
+ { "root@kw=foo", "root@kw=foo", "root@kw=foo" },
+ { "@calendar=gregorian", "@calendar=gregorian", "@calendar=gregorian" },
+ { "ja_JP@calendar=Japanese", "ja_JP@calendar=Japanese", "ja_JP@calendar=Japanese" },
+ { "ja_JP", "ja_JP", "ja_JP" },
+
+ /* test case for "i-default" */
+ { "i-default", NULL, NULL }
+ };
+
+ static const char* label[] = { "getName", "canonicalize" };
+
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i, j, resultLen = 0, origResultLen;
+ char buffer[256];
+
+ for (i=0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
+ for (j=0; j<2; ++j) {
+ const char* expected = (j==0) ? testCases[i].getNameID : testCases[i].canonicalID;
+ *buffer = 0;
+ status = U_ZERO_ERROR;
+
+ if (expected == NULL) {
+ expected = uloc_getDefault();
+ }
+
+ /* log_verbose("testing %s -> %s\n", testCases[i], testCases[i].canonicalID); */
+ origResultLen = _canonicalize(j, testCases[i].localeID, NULL, 0, &status);
+ if (status != U_BUFFER_OVERFLOW_ERROR) {
+ log_err("FAIL: uloc_%s(%s) => %s, expected U_BUFFER_OVERFLOW_ERROR\n",
+ label[j], testCases[i].localeID, u_errorName(status));
+ continue;
+ }
+ status = U_ZERO_ERROR;
+ resultLen = _canonicalize(j, testCases[i].localeID, buffer, sizeof(buffer), &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uloc_%s(%s) => %s, expected U_ZERO_ERROR\n",
+ label[j], testCases[i].localeID, u_errorName(status));
+ continue;
+ }
+ if(uprv_strcmp(expected, buffer) != 0) {
+ log_err("FAIL: uloc_%s(%s) => \"%s\", expected \"%s\"\n",
+ label[j], testCases[i].localeID, buffer, expected);
+ } else {
+ log_verbose("Ok: uloc_%s(%s) => \"%s\"\n",
+ label[j], testCases[i].localeID, buffer);
+ }
+ if (resultLen != (int32_t)strlen(buffer)) {
+ log_err("FAIL: uloc_%s(%s) => len %d, expected len %d\n",
+ label[j], testCases[i].localeID, resultLen, strlen(buffer));
+ }
+ if (origResultLen != resultLen) {
+ log_err("FAIL: uloc_%s(%s) => preflight len %d != actual len %d\n",
+ label[j], testCases[i].localeID, origResultLen, resultLen);
+ }
+ }
+ }
+}
+
+static void TestDisplayKeywords(void)
+{
+ int32_t i;
+
+ static const struct {
+ const char *localeID;
+ const char *displayLocale;
+ UChar displayKeyword[200];
+ } testCases[] = {
+ { "ca_ES@currency=ESP", "de_AT",
+ {0x0057, 0x00e4, 0x0068, 0x0072, 0x0075, 0x006e, 0x0067, 0x0000},
+ },
+ { "ja_JP@calendar=japanese", "de",
+ { 0x004b, 0x0061, 0x006c, 0x0065, 0x006e, 0x0064, 0x0065, 0x0072, 0x0000}
+ },
+ { "de_DE@collation=traditional", "de_DE",
+ {0x0053, 0x006f, 0x0072, 0x0074, 0x0069, 0x0065, 0x0072, 0x0075, 0x006e, 0x0067, 0x0000}
+ },
+ };
+ for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char* keyword =NULL;
+ int32_t keywordLen = 0;
+ int32_t keywordCount = 0;
+ UChar *displayKeyword=NULL;
+ int32_t displayKeywordLen = 0;
+ UEnumeration* keywordEnum = uloc_openKeywords(testCases[i].localeID, &status);
+ for(keywordCount = uenum_count(keywordEnum, &status); keywordCount > 0 ; keywordCount--){
+ if(U_FAILURE(status)){
+ log_err("uloc_getKeywords failed for locale id: %s with error : %s \n", testCases[i].localeID, u_errorName(status));
+ break;
+ }
+ /* the uenum_next returns NUL terminated string */
+ keyword = uenum_next(keywordEnum, &keywordLen, &status);
+ /* fetch the displayKeyword */
+ displayKeywordLen = uloc_getDisplayKeyword(keyword, testCases[i].displayLocale, displayKeyword, displayKeywordLen, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR;
+ displayKeywordLen++; /* for null termination */
+ displayKeyword = (UChar*) malloc(displayKeywordLen * U_SIZEOF_UCHAR);
+ displayKeywordLen = uloc_getDisplayKeyword(keyword, testCases[i].displayLocale, displayKeyword, displayKeywordLen, &status);
+ if(U_FAILURE(status)){
+ log_err("uloc_getDisplayKeyword filed for keyword : %s in locale id: %s for display locale: %s \n", testCases[i].localeID, keyword, testCases[i].displayLocale, u_errorName(status));
+ break;
+ }
+ if(u_strncmp(displayKeyword, testCases[i].displayKeyword, displayKeywordLen)!=0){
+ log_err("uloc_getDisplayKeyword did not get the expected value for keyword : %s in locale id: %s for display locale: %s \n", testCases[i].localeID, keyword, testCases[i].displayLocale);
+ break;
+ }
+ }else{
+ log_err("uloc_getDisplayKeyword did not return the expected error. Error: %s\n", u_errorName(status));
+ }
+
+ free(displayKeyword);
+
+ }
+ uenum_close(keywordEnum);
+ }
+}
+
+static void TestDisplayKeywordValues(void){
+ int32_t i;
+
+ static const struct {
+ const char *localeID;
+ const char *displayLocale;
+ UChar displayKeywordValue[500];
+ } testCases[] = {
+ { "ca_ES@currency=ESP", "de_AT",
+ {0x0053, 0x0070, 0x0061, 0x006e, 0x0069, 0x0073, 0x0063, 0x0068, 0x0065, 0x0020, 0x0050, 0x0065, 0x0073, 0x0065, 0x0074, 0x0065, 0x0000}
+ },
+ { "de_AT@currency=ATS", "fr_FR",
+ {0x0073, 0x0063, 0x0068, 0x0069, 0x006c, 0x006c, 0x0069, 0x006e, 0x0067, 0x0020, 0x0061, 0x0075, 0x0074, 0x0072, 0x0069, 0x0063, 0x0068, 0x0069, 0x0065, 0x006e, 0x0000}
+ },
+ { "de_DE@currency=DEM", "it",
+ {0x004d, 0x0061, 0x0072, 0x0063, 0x006f, 0x0020, 0x0054, 0x0065, 0x0064, 0x0065, 0x0073, 0x0063, 0x006f, 0x0000}
+ },
+ { "el_GR@currency=GRD", "en",
+ {0x0047, 0x0072, 0x0065, 0x0065, 0x006b, 0x0020, 0x0044, 0x0072, 0x0061, 0x0063, 0x0068, 0x006d, 0x0061, 0x0000}
+ },
+ { "eu_ES@currency=ESP", "it_IT",
+ {0x0050, 0x0065, 0x0073, 0x0065, 0x0074, 0x0061, 0x0020, 0x0053, 0x0070, 0x0061, 0x0067, 0x006e, 0x006f, 0x006c, 0x0061, 0x0000}
+ },
+ { "de@collation=phonebook", "es",
+ {0x006F, 0x0072, 0x0064, 0x0065, 0x006E, 0x0020, 0x0064, 0x0065, 0x0020, 0x006C, 0x0069, 0x0073, 0x0074, 0x00ED, 0x006E, 0x0020, 0x0074, 0x0065, 0x006C, 0x0065, 0x0066, 0x00F3, 0x006E, 0x0069, 0x0063, 0x006F, 0x0000}
+ },
+
+ { "de_DE@collation=phonebook", "es",
+ {0x006F, 0x0072, 0x0064, 0x0065, 0x006E, 0x0020, 0x0064, 0x0065, 0x0020, 0x006C, 0x0069, 0x0073, 0x0074, 0x00ED, 0x006E, 0x0020, 0x0074, 0x0065, 0x006C, 0x0065, 0x0066, 0x00F3, 0x006E, 0x0069, 0x0063, 0x006F, 0x0000}
+ },
+ { "es_ES@collation=traditional","de",
+ {0x0054, 0x0072, 0x0061, 0x0064, 0x0069, 0x0074, 0x0069, 0x006f, 0x006e, 0x0065, 0x006c, 0x006c, 0x0065, 0x0020, 0x0053, 0x006f, 0x0072, 0x0074, 0x0069, 0x0065, 0x0072, 0x0072, 0x0065, 0x0067, 0x0065, 0x006c, 0x006e, 0x0000}
+ },
+ { "ja_JP@calendar=japanese", "de",
+ {0x004a, 0x0061, 0x0070, 0x0061, 0x006e, 0x0069, 0x0073, 0x0063, 0x0068, 0x0065, 0x0072, 0x0020, 0x004b, 0x0061, 0x006c, 0x0065, 0x006e, 0x0064, 0x0065, 0x0072, 0x0000}
+ },
+ };
+ for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char* keyword =NULL;
+ int32_t keywordLen = 0;
+ int32_t keywordCount = 0;
+ UChar *displayKeywordValue = NULL;
+ int32_t displayKeywordValueLen = 0;
+ UEnumeration* keywordEnum = uloc_openKeywords(testCases[i].localeID, &status);
+ for(keywordCount = uenum_count(keywordEnum, &status); keywordCount > 0 ; keywordCount--){
+ if(U_FAILURE(status)){
+ log_err("uloc_getKeywords failed for locale id: %s in display locale: % with error : %s \n", testCases[i].localeID, testCases[i].displayLocale, u_errorName(status));
+ break;
+ }
+ /* the uenum_next returns NUL terminated string */
+ keyword = uenum_next(keywordEnum, &keywordLen, &status);
+
+ /* fetch the displayKeywordValue */
+ displayKeywordValueLen = uloc_getDisplayKeywordValue(testCases[i].localeID, keyword, testCases[i].displayLocale, displayKeywordValue, displayKeywordValueLen, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR;
+ displayKeywordValueLen++; /* for null termination */
+ displayKeywordValue = (UChar*)malloc(displayKeywordValueLen * U_SIZEOF_UCHAR);
+ displayKeywordValueLen = uloc_getDisplayKeywordValue(testCases[i].localeID, keyword, testCases[i].displayLocale, displayKeywordValue, displayKeywordValueLen, &status);
+ if(U_FAILURE(status)){
+ log_err("uloc_getDisplayKeywordValue failed for keyword : %s in locale id: %s for display locale: %s with error : %s \n", testCases[i].localeID, keyword, testCases[i].displayLocale, u_errorName(status));
+ break;
+ }
+ if(u_strncmp(displayKeywordValue, testCases[i].displayKeywordValue, displayKeywordValueLen)!=0){
+ log_err("uloc_getDisplayKeywordValue did not return the expected value keyword : %s in locale id: %s for display locale: %s with error : %s \n", testCases[i].localeID, keyword, testCases[i].displayLocale, u_errorName(status));
+ break;
+ }
+ }else{
+ log_err("uloc_getDisplayKeywordValue did not return the expected error. Error: %s\n", u_errorName(status));
+ }
+ free(displayKeywordValue);
+ }
+ uenum_close(keywordEnum);
+ }
+ {
+ /* test a multiple keywords */
+ UErrorCode status = U_ZERO_ERROR;
+ const char* keyword =NULL;
+ int32_t keywordLen = 0;
+ int32_t keywordCount = 0;
+ const char* localeID = "es@collation=phonebook;calendar=buddhist;currency=DEM";
+ const char* displayLocale = "de";
+ static const UChar expected[][50] = {
+ {0x0042, 0x0075, 0x0064, 0x0064, 0x0068, 0x0069, 0x0073, 0x0074, 0x0069, 0x0073, 0x0063, 0x0068, 0x0065, 0x0072, 0x0020, 0x004b, 0x0061, 0x006c, 0x0065, 0x006e, 0x0064, 0x0065, 0x0072, 0x0000},
+
+ {0x0054, 0x0065, 0x006c, 0x0065, 0x0066, 0x006f, 0x006e, 0x0062, 0x0075, 0x0063, 0x0068, 0x002d, 0x0053, 0x006f, 0x0072, 0x0074, 0x0069, 0x0065, 0x0072, 0x0072, 0x0065, 0x0067, 0x0065, 0x006c, 0x006e, 0x0000},
+ {0x0044, 0x0065, 0x0075, 0x0074, 0x0073, 0x0063, 0x0068, 0x0065, 0x0020, 0x004d, 0x0061, 0x0072, 0x006b, 0x0000},
+ };
+
+ UEnumeration* keywordEnum = uloc_openKeywords(localeID, &status);
+
+ for(keywordCount = 0; keywordCount < uenum_count(keywordEnum, &status) ; keywordCount++){
+ UChar *displayKeywordValue = NULL;
+ int32_t displayKeywordValueLen = 0;
+ if(U_FAILURE(status)){
+ log_err("uloc_getKeywords failed for locale id: %s in display locale: % with error : %s \n", localeID, displayLocale, u_errorName(status));
+ break;
+ }
+ /* the uenum_next returns NUL terminated string */
+ keyword = uenum_next(keywordEnum, &keywordLen, &status);
+
+ /* fetch the displayKeywordValue */
+ displayKeywordValueLen = uloc_getDisplayKeywordValue(localeID, keyword, displayLocale, displayKeywordValue, displayKeywordValueLen, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR;
+ displayKeywordValueLen++; /* for null termination */
+ displayKeywordValue = (UChar*)malloc(displayKeywordValueLen * U_SIZEOF_UCHAR);
+ displayKeywordValueLen = uloc_getDisplayKeywordValue(localeID, keyword, displayLocale, displayKeywordValue, displayKeywordValueLen, &status);
+ if(U_FAILURE(status)){
+ log_err("uloc_getDisplayKeywordValue failed for keyword : %s in locale id: %s for display locale: %s with error : %s \n", localeID, keyword, displayLocale, u_errorName(status));
+ break;
+ }
+ if(u_strncmp(displayKeywordValue, expected[keywordCount], displayKeywordValueLen)!=0){
+ log_err("uloc_getDisplayKeywordValue did not return the expected value keyword : %s in locale id: %s for display locale: %s \n", localeID, keyword, displayLocale);
+ break;
+ }
+ }else{
+ log_err("uloc_getDisplayKeywordValue did not return the expected error. Error: %s\n", u_errorName(status));
+ }
+ free(displayKeywordValue);
+ }
+ uenum_close(keywordEnum);
+
+ }
+ {
+ /* Test non existent keywords */
+ UErrorCode status = U_ZERO_ERROR;
+ const char* localeID = "es";
+ const char* displayLocale = "de";
+ UChar *displayKeywordValue = NULL;
+ int32_t displayKeywordValueLen = 0;
+
+ /* fetch the displayKeywordValue */
+ displayKeywordValueLen = uloc_getDisplayKeywordValue(localeID, "calendar", displayLocale, displayKeywordValue, displayKeywordValueLen, &status);
+ if(U_FAILURE(status)) {
+ log_err("uloc_getDisplaykeywordValue returned error status %s\n", u_errorName(status));
+ } else if(displayKeywordValueLen != 0) {
+ log_err("uloc_getDisplaykeywordValue returned %d should be 0 \n", displayKeywordValueLen);
+ }
+ }
+}
+
+
+static void TestGetBaseName(void) {
+ static const struct {
+ const char *localeID;
+ const char *baseName;
+ } testCases[] = {
+ { "de_DE@ C o ll A t i o n = Phonebook ", "de_DE" },
+ { "de@currency = euro; CoLLaTion = PHONEBOOk", "de" },
+ { "ja@calendar = buddhist", "ja" }
+ };
+
+ int32_t i = 0, baseNameLen = 0;
+ char baseName[256];
+ UErrorCode status = U_ZERO_ERROR;
+
+ for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
+ baseNameLen = uloc_getBaseName(testCases[i].localeID, baseName, 256, &status);
+ if(strcmp(testCases[i].baseName, baseName)) {
+ log_err("For locale \"%s\" expected baseName \"%s\", but got \"%s\"\n",
+ testCases[i].localeID, testCases[i].baseName, baseName);
+ return;
+ }
+ }
+
+}
+
+
+/* Jitterbug 4115 */
+static void TestDisplayNameWarning(void) {
+ UChar name[256];
+ int32_t size;
+ UErrorCode status = U_ZERO_ERROR;
+
+ size = uloc_getDisplayLanguage("qqq", "kl", name, sizeof(name)/sizeof(name[0]), &status);
+ if (status != U_USING_DEFAULT_WARNING) {
+ log_err("For language \"qqq\" in locale \"kl\", expecting U_USING_DEFAULT_WARNING, but got %s\n",
+ u_errorName(status));
+ }
+}
+
+
+/**
+ * Compare two locale IDs. If they are equal, return 0. If `string'
+ * starts with `prefix' plus an additional element, that is, string ==
+ * prefix + '_' + x, then return 1. Otherwise return a value < 0.
+ */
+static UBool _loccmp(const char* string, const char* prefix) {
+ int32_t slen = (int32_t)uprv_strlen(string),
+ plen = (int32_t)uprv_strlen(prefix);
+ int32_t c = uprv_strncmp(string, prefix, plen);
+ /* 'root' is less than everything */
+ if (uprv_strcmp(prefix, "root") == 0) {
+ return (uprv_strcmp(string, "root") == 0) ? 0 : 1;
+ }
+ if (c) return -1; /* mismatch */
+ if (slen == plen) return 0;
+ if (string[plen] == '_') return 1;
+ return -2; /* false match, e.g. "en_USX" cmp "en_US" */
+}
+
+static void _checklocs(const char* label,
+ const char* req,
+ const char* valid,
+ const char* actual) {
+ /* We want the valid to be strictly > the bogus requested locale,
+ and the valid to be >= the actual. */
+ if (_loccmp(req, valid) > 0 &&
+ _loccmp(valid, actual) >= 0) {
+ log_verbose("%s; req=%s, valid=%s, actual=%s\n",
+ label, req, valid, actual);
+ } else {
+ log_err("FAIL: %s; req=%s, valid=%s, actual=%s\n",
+ label, req, valid, actual);
+ }
+}
+
+static void TestGetLocale(void) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ UChar EMPTY[1] = {0};
+
+ /* === udat === */
+#if !UCONFIG_NO_FORMATTING
+ {
+ UDateFormat *obj;
+ const char *req = "en_US_REDWOODSHORES", *valid, *actual;
+ obj = udat_open(UDAT_DEFAULT, UDAT_DEFAULT,
+ req,
+ NULL, 0,
+ NULL, 0, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("udat_open failed.Error %s\n", u_errorName(ec));
+ return;
+ }
+ valid = udat_getLocaleByType(obj, ULOC_VALID_LOCALE, &ec);
+ actual = udat_getLocaleByType(obj, ULOC_ACTUAL_LOCALE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("udat_getLocaleByType() failed\n");
+ return;
+ }
+ _checklocs("udat", req, valid, actual);
+ udat_close(obj);
+ }
+#endif
+
+ /* === ucal === */
+#if !UCONFIG_NO_FORMATTING
+ {
+ UCalendar *obj;
+ const char *req = "fr_FR_PROVENCAL", *valid, *actual;
+ obj = ucal_open(NULL, 0,
+ req,
+ UCAL_GREGORIAN,
+ &ec);
+ if (U_FAILURE(ec)) {
+ log_err("ucal_open failed with error: %s\n", u_errorName(ec));
+ return;
+ }
+ valid = ucal_getLocaleByType(obj, ULOC_VALID_LOCALE, &ec);
+ actual = ucal_getLocaleByType(obj, ULOC_ACTUAL_LOCALE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("ucal_getLocaleByType() failed\n");
+ return;
+ }
+ _checklocs("ucal", req, valid, actual);
+ ucal_close(obj);
+ }
+#endif
+
+ /* === unum === */
+#if !UCONFIG_NO_FORMATTING
+ {
+ UNumberFormat *obj;
+ const char *req = "zh_Hant_TW_TAINAN", *valid, *actual;
+ obj = unum_open(UNUM_DECIMAL,
+ NULL, 0,
+ req,
+ &pe, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("unum_open failed\n");
+ return;
+ }
+ valid = unum_getLocaleByType(obj, ULOC_VALID_LOCALE, &ec);
+ actual = unum_getLocaleByType(obj, ULOC_ACTUAL_LOCALE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("unum_getLocaleByType() failed\n");
+ return;
+ }
+ _checklocs("unum", req, valid, actual);
+ unum_close(obj);
+ }
+#endif
+
+ /* === umsg === */
+#if 0
+ /* commented out by weiv 01/12/2005. umsg_getLocaleByType is to be removed */
+#if !UCONFIG_NO_FORMATTING
+ {
+ UMessageFormat *obj;
+ const char *req = "ja_JP_TAKAYAMA", *valid, *actual;
+ UBool test;
+ obj = umsg_open(EMPTY, 0,
+ req,
+ &pe, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("umsg_open failed\n");
+ return;
+ }
+ valid = umsg_getLocaleByType(obj, ULOC_VALID_LOCALE, &ec);
+ actual = umsg_getLocaleByType(obj, ULOC_ACTUAL_LOCALE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("umsg_getLocaleByType() failed\n");
+ return;
+ }
+ /* We want the valid to be strictly > the bogus requested locale,
+ and the valid to be >= the actual. */
+ /* TODO MessageFormat is currently just storing the locale it is given.
+ As a result, it will return whatever it was given, even if the
+ locale is invalid. */
+ test = (_cmpversion("3.2") <= 0) ?
+ /* Here is the weakened test for 3.0: */
+ (_loccmp(req, valid) >= 0) :
+ /* Here is what the test line SHOULD be: */
+ (_loccmp(req, valid) > 0);
+
+ if (test &&
+ _loccmp(valid, actual) >= 0) {
+ log_verbose("umsg; req=%s, valid=%s, actual=%s\n", req, valid, actual);
+ } else {
+ log_err("FAIL: umsg; req=%s, valid=%s, actual=%s\n", req, valid, actual);
+ }
+ umsg_close(obj);
+ }
+#endif
+#endif
+
+ /* === ubrk === */
+#if !UCONFIG_NO_BREAK_ITERATION
+ {
+ UBreakIterator *obj;
+ const char *req = "ar_KW_ABDALI", *valid, *actual;
+ obj = ubrk_open(UBRK_WORD,
+ req,
+ EMPTY,
+ 0,
+ &ec);
+ if (U_FAILURE(ec)) {
+ log_err("ubrk_open failed. Error: %s \n", u_errorName(ec));
+ return;
+ }
+ valid = ubrk_getLocaleByType(obj, ULOC_VALID_LOCALE, &ec);
+ actual = ubrk_getLocaleByType(obj, ULOC_ACTUAL_LOCALE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("ubrk_getLocaleByType() failed\n");
+ return;
+ }
+ _checklocs("ubrk", req, valid, actual);
+ ubrk_close(obj);
+ }
+#endif
+
+ /* === ucol === */
+#if !UCONFIG_NO_COLLATION
+ {
+ UCollator *obj;
+ const char *req = "es_AR_BUENOSAIRES", *valid, *actual;
+ obj = ucol_open(req, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("ucol_open failed\n");
+ return;
+ }
+ valid = ucol_getLocaleByType(obj, ULOC_VALID_LOCALE, &ec);
+ actual = ucol_getLocaleByType(obj, ULOC_ACTUAL_LOCALE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("ucol_getLocaleByType() failed\n");
+ return;
+ }
+ _checklocs("ucol", req, valid, actual);
+ ucol_close(obj);
+ }
+#endif
+}
+
+static void TestNonexistentLanguageExemplars(void) {
+ /* JB 4068 - Nonexistent language */
+ UErrorCode ec = U_ZERO_ERROR;
+ ULocaleData *uld = ulocdata_open("qqq",&ec);
+ if (ec != U_USING_DEFAULT_WARNING) {
+ log_err("Exemplar set for \"qqq\", expecting U_USING_DEFAULT_WARNING, but got %s\n",
+ u_errorName(ec));
+ }
+ uset_close(ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &ec));
+ ulocdata_close(uld);
+}
+
+static void TestLocDataErrorCodeChaining(void) {
+ UErrorCode ec = U_USELESS_COLLATOR_ERROR;
+ ulocdata_open(NULL, &ec);
+ ulocdata_getExemplarSet(NULL, NULL, 0, ULOCDATA_ES_STANDARD, &ec);
+ ulocdata_getDelimiter(NULL, ULOCDATA_DELIMITER_COUNT, NULL, -1, &ec);
+ ulocdata_getMeasurementSystem(NULL, &ec);
+ ulocdata_getPaperSize(NULL, NULL, NULL, &ec);
+ if (ec != U_USELESS_COLLATOR_ERROR) {
+ log_err("ulocdata API changed the error code to %s\n", u_errorName(ec));
+ }
+}
+
+static void TestLanguageExemplarsFallbacks(void) {
+ /* Test that en_US fallsback, but en doesn't fallback. */
+ UErrorCode ec = U_ZERO_ERROR;
+ ULocaleData *uld = ulocdata_open("en_US",&ec);
+ uset_close(ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &ec));
+ if (ec != U_USING_FALLBACK_WARNING) {
+ log_err("Exemplar set for \"en_US\", expecting U_USING_FALLBACK_WARNING, but got %s\n",
+ u_errorName(ec));
+ }
+ ulocdata_close(uld);
+ ec = U_ZERO_ERROR;
+ uld = ulocdata_open("en",&ec);
+ uset_close(ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &ec));
+ if (ec != U_ZERO_ERROR) {
+ log_err("Exemplar set for \"en\", expecting U_ZERO_ERROR, but got %s\n",
+ u_errorName(ec));
+ }
+ ulocdata_close(uld);
+}
+
+static void TestAcceptLanguage(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UAcceptResult outResult;
+ UEnumeration *available;
+ char tmp[200];
+ int i;
+ int32_t rc = 0;
+
+ struct {
+ int32_t httpSet;
+ const char *icuSet;
+ const char *expect;
+ UAcceptResult res;
+ } tests[] = {
+ /*0*/{ 0, NULL, "mt_MT", ULOC_ACCEPT_VALID },
+ /*1*/{ 1, NULL, "en", ULOC_ACCEPT_VALID },
+ /*2*/{ 2, NULL, "en", ULOC_ACCEPT_FALLBACK },
+ /*3*/{ 3, NULL, "", ULOC_ACCEPT_FAILED },
+ /*4*/{ 4, NULL, "es", ULOC_ACCEPT_VALID },
+ };
+ const int32_t numTests = sizeof(tests)/sizeof(tests[0]);
+ static const char *http[] = {
+ /*0*/ "mt-mt, ja;q=0.76, en-us;q=0.95, en;q=0.92, en-gb;q=0.89, fr;q=0.87, iu-ca;q=0.84, iu;q=0.82, ja-jp;q=0.79, mt;q=0.97, de-de;q=0.74, de;q=0.71, es;q=0.68, it-it;q=0.66, it;q=0.63, vi-vn;q=0.61, vi;q=0.58, nl-nl;q=0.55, nl;q=0.53, th-th-traditional;q=.01",
+ /*1*/ "ja;q=0.5, en;q=0.8, tlh",
+ /*2*/ "en-wf, de-lx;q=0.8",
+ /*3*/ "mga-ie;q=0.9, tlh",
+ /*4*/ "xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, "
+ "xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, "
+ "xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, "
+ "xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, "
+ "xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, "
+ "xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, "
+ "xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xx-yy;q=.1, "
+ "es"
+ };
+
+ for(i=0;i<numTests;i++) {
+ outResult = -3;
+ status=U_ZERO_ERROR;
+ log_verbose("test #%d: http[%s], ICU[%s], expect %s, %d\n",
+ i, http[tests[i].httpSet], tests[i].icuSet, tests[i].expect, tests[i].res);
+
+ available = ures_openAvailableLocales(tests[i].icuSet, &status);
+ tmp[0]=0;
+ rc = uloc_acceptLanguageFromHTTP(tmp, 199, &outResult, http[tests[i].httpSet], available, &status);
+ uenum_close(available);
+ log_verbose(" got %s, %d [%s]\n", tmp[0]?tmp:"(EMPTY)", outResult, u_errorName(status));
+ if(outResult != tests[i].res) {
+ log_err("FAIL: #%d: expected outResult of %d but got %d\n", i, tests[i].res, outResult);
+ log_info("test #%d: http[%s], ICU[%s], expect %s, %d\n",
+ i, http[tests[i].httpSet], tests[i].icuSet, tests[i].expect, tests[i].res);
+ }
+ if((outResult>0)&&uprv_strcmp(tmp, tests[i].expect)) {
+ log_err("FAIL: #%d: expected %s but got %s\n", i, tests[i].expect, tmp);
+ log_info("test #%d: http[%s], ICU[%s], expect %s, %d\n",
+ i, http[tests[i].httpSet], tests[i].icuSet, tests[i].expect, tests[i].res);
+ }
+ }
+}
+
+static const char* LOCALE_ALIAS[][2] = {
+ {"in", "id"},
+ {"in_ID", "id_ID"},
+ {"iw", "he"},
+ {"iw_IL", "he_IL"},
+ {"ji", "yi"},
+ {"en_BU", "en_MM"},
+ {"en_DY", "en_BJ"},
+ {"en_HV", "en_BF"},
+ {"en_NH", "en_VU"},
+ {"en_RH", "en_ZW"},
+ {"en_TP", "en_TL"},
+ {"en_ZR", "en_CD"}
+};
+static UBool isLocaleAvailable(UResourceBundle* resIndex, const char* loc){
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = 0;
+ ures_getStringByKey(resIndex, loc,&len, &status);
+ if(U_FAILURE(status)){
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void TestCalendar() {
+#if !UCONFIG_NO_FORMATTING
+ int i;
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *resIndex = ures_open(NULL,"res_index", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status));
+ return;
+ }
+ for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) {
+ const char* oldLoc = LOCALE_ALIAS[i][0];
+ const char* newLoc = LOCALE_ALIAS[i][1];
+ UCalendar* c1 = NULL;
+ UCalendar* c2 = NULL;
+
+ /*Test function "getLocale(ULocale.VALID_LOCALE)"*/
+ const char* l1 = ucal_getLocaleByType(c1, ULOC_VALID_LOCALE, &status);
+ const char* l2 = ucal_getLocaleByType(c2, ULOC_VALID_LOCALE, &status);
+
+ if(!isLocaleAvailable(resIndex, newLoc)){
+ continue;
+ }
+ c1 = ucal_open(NULL, -1, oldLoc, UCAL_GREGORIAN, &status);
+ c2 = ucal_open(NULL, -1, newLoc, UCAL_GREGORIAN, &status);
+
+ if (strcmp(newLoc,l1)!=0 || strcmp(l1,l2)!=0 || status!=U_ZERO_ERROR) {
+ log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc);
+ }
+ log_verbose("ucal_getLocaleByType old:%s new:%s\n", l1, l2);
+ ucal_close(c1);
+ ucal_close(c2);
+ }
+ ures_close(resIndex);
+#endif
+}
+
+static void TestDateFormat() {
+#if !UCONFIG_NO_FORMATTING
+ int i;
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *resIndex = ures_open(NULL,"res_index", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status));
+ return;
+ }
+ for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) {
+ const char* oldLoc = LOCALE_ALIAS[i][0];
+ const char* newLoc = LOCALE_ALIAS[i][1];
+ UDateFormat* df1 = NULL;
+ UDateFormat* df2 = NULL;
+ const char* l1 = NULL;
+ const char* l2 = NULL;
+
+ if(!isLocaleAvailable(resIndex, newLoc)){
+ continue;
+ }
+ df1 = udat_open(UDAT_FULL, UDAT_FULL,oldLoc, NULL, 0, NULL, -1, &status);
+ df2 = udat_open(UDAT_FULL, UDAT_FULL,newLoc, NULL, 0, NULL, -1, &status);
+ if(U_FAILURE(status)){
+ log_err("Creation of date format failed %s\n", u_errorName(status));
+ return;
+ }
+ /*Test function "getLocale"*/
+ l1 = udat_getLocaleByType(df1, ULOC_VALID_LOCALE, &status);
+ l2 = udat_getLocaleByType(df2, ULOC_VALID_LOCALE, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the locale by type failed. %s\n", u_errorName(status));
+ }
+ if (strcmp(newLoc,l1)!=0 || strcmp(l1,l2)!=0) {
+ log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc);
+ }
+ log_verbose("udat_getLocaleByType old:%s new:%s\n", l1, l2);
+ udat_close(df1);
+ udat_close(df2);
+ }
+ ures_close(resIndex);
+#endif
+}
+
+static void TestCollation() {
+#if !UCONFIG_NO_COLLATION
+ int i;
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *resIndex = ures_open(NULL,"res_index", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status));
+ return;
+ }
+ for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) {
+ const char* oldLoc = LOCALE_ALIAS[i][0];
+ const char* newLoc = LOCALE_ALIAS[i][1];
+ UCollator* c1 = NULL;
+ UCollator* c2 = NULL;
+ const char* l1 = NULL;
+ const char* l2 = NULL;
+
+ status = U_ZERO_ERROR;
+ if(!isLocaleAvailable(resIndex, newLoc)){
+ continue;
+ }
+ if(U_FAILURE(status)){
+ log_err("Creation of collators failed %s\n", u_errorName(status));
+ return;
+ }
+ c1 = ucol_open(oldLoc, &status);
+ c2 = ucol_open(newLoc, &status);
+ l1 = ucol_getLocaleByType(c1, ULOC_VALID_LOCALE, &status);
+ l2 = ucol_getLocaleByType(c2, ULOC_VALID_LOCALE, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the locale names failed failed %s\n", u_errorName(status));
+ }
+ if (strcmp(newLoc,l1)!=0 || strcmp(l1,l2)!=0) {
+ log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc);
+ }
+ log_verbose("ucol_getLocaleByType old:%s new:%s\n", l1, l2);
+ ucol_close(c1);
+ ucol_close(c2);
+ }
+ ures_close(resIndex);
+#endif
+}
+
+static void TestULocale() {
+ int i;
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *resIndex = ures_open(NULL,"res_index", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status));
+ return;
+ }
+ for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) {
+ const char* oldLoc = LOCALE_ALIAS[i][0];
+ const char* newLoc = LOCALE_ALIAS[i][1];
+ UChar name1[256], name2[256];
+ char names1[256], names2[256];
+ int32_t capacity = 256;
+
+ status = U_ZERO_ERROR;
+ if(!isLocaleAvailable(resIndex, newLoc)){
+ continue;
+ }
+ uloc_getDisplayName(oldLoc, ULOC_US, name1, capacity, &status);
+ if(U_FAILURE(status)){
+ log_err("uloc_getDisplayName(%s) failed %s\n", oldLoc, u_errorName(status));
+ }
+
+ uloc_getDisplayName(newLoc, ULOC_US, name2, capacity, &status);
+ if(U_FAILURE(status)){
+ log_err("uloc_getDisplayName(%s) failed %s\n", newLoc, u_errorName(status));
+ }
+
+ if (u_strcmp(name1, name2)!=0) {
+ log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc);
+ }
+ u_austrcpy(names1, name1);
+ u_austrcpy(names2, name2);
+ log_verbose("uloc_getDisplayName old:%s new:%s\n", names1, names2);
+ }
+ ures_close(resIndex);
+
+}
+
+static void TestUResourceBundle() {
+ const char* us1;
+ const char* us2;
+
+ UResourceBundle* rb1 = NULL;
+ UResourceBundle* rb2 = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ int i;
+ UResourceBundle *resIndex = NULL;
+ if(U_FAILURE(status)){
+ log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status));
+ return;
+ }
+ resIndex = ures_open(NULL,"res_index", &status);
+ for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) {
+
+ const char* oldLoc = LOCALE_ALIAS[i][0];
+ const char* newLoc = LOCALE_ALIAS[i][1];
+ if(!isLocaleAvailable(resIndex, newLoc)){
+ continue;
+ }
+ rb1 = ures_open(NULL, oldLoc, &status);
+ if (U_FAILURE(status)) {
+ log_err("ures_open(%s) failed %s\n", oldLoc, u_errorName(status));
+ }
+
+ us1 = ures_getLocale(rb1, &status);
+
+ status = U_ZERO_ERROR;
+ rb2 = ures_open(NULL, newLoc, &status);
+ if (U_FAILURE(status)) {
+ log_err("ures_open(%s) failed %s\n", oldLoc, u_errorName(status));
+ }
+ us2 = ures_getLocale(rb2, &status);
+
+ if (strcmp(us1,newLoc)!=0 || strcmp(us1,us2)!=0 ) {
+ log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc);
+ }
+
+ log_verbose("ures_getStringByKey old:%s new:%s\n", us1, us2);
+ ures_close(rb1);
+ rb1 = NULL;
+ ures_close(rb2);
+ rb2 = NULL;
+ }
+ ures_close(resIndex);
+}
+
+static void TestDisplayName() {
+
+ UChar oldCountry[256] = {'\0'};
+ UChar newCountry[256] = {'\0'};
+ UChar oldLang[256] = {'\0'};
+ UChar newLang[256] = {'\0'};
+ char country[256] ={'\0'};
+ char language[256] ={'\0'};
+ int32_t capacity = 256;
+ int i =0;
+ int j=0;
+ for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) {
+ const char* oldLoc = LOCALE_ALIAS[i][0];
+ const char* newLoc = LOCALE_ALIAS[i][1];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t available = uloc_countAvailable();
+
+ for(j=0; j<available; j++){
+
+ const char* dispLoc = uloc_getAvailable(j);
+ int32_t oldCountryLen = uloc_getDisplayCountry(oldLoc,dispLoc, oldCountry, capacity, &status);
+ int32_t newCountryLen = uloc_getDisplayCountry(newLoc, dispLoc, newCountry, capacity, &status);
+ int32_t oldLangLen = uloc_getDisplayLanguage(oldLoc, dispLoc, oldLang, capacity, &status);
+ int32_t newLangLen = uloc_getDisplayLanguage(newLoc, dispLoc, newLang, capacity, &status );
+
+ int32_t countryLen = uloc_getCountry(newLoc, country, capacity, &status);
+ int32_t langLen = uloc_getLanguage(newLoc, language, capacity, &status);
+ /* there is a display name for the current country ID */
+ if(countryLen != newCountryLen ){
+ if(u_strncmp(oldCountry,newCountry,oldCountryLen)!=0){
+ log_err("uloc_getDisplayCountry() failed for %s in display locale %s \n", oldLoc, dispLoc);
+ }
+ }
+ /* there is a display name for the current lang ID */
+ if(langLen!=newLangLen){
+ if(u_strncmp(oldLang,newLang,oldLangLen)){
+ log_err("uloc_getDisplayLanguage() failed for %s in display locale %s \n", oldLoc, dispLoc); }
+ }
+ }
+ }
+}
+
+static void TestGetLocaleForLCID() {
+ int32_t i, length, lengthPre;
+ const char* testLocale = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ char temp2[40], temp3[40];
+ uint32_t lcid;
+
+ lcid = uloc_getLCID("en_US");
+ if (lcid != 0x0409) {
+ log_err(" uloc_getLCID(\"en_US\") = %d, expected 0x0409\n", lcid);
+ }
+
+ lengthPre = uloc_getLocaleForLCID(lcid, temp2, 4, &status);
+ if (status != U_BUFFER_OVERFLOW_ERROR) {
+ log_err(" unexpected result from uloc_getLocaleForLCID with small buffer: %s\n", u_errorName(status));
+ }
+ else {
+ status = U_ZERO_ERROR;
+ }
+
+ length = uloc_getLocaleForLCID(lcid, temp2, sizeof(temp2)/sizeof(char), &status);
+ if (U_FAILURE(status)) {
+ log_err(" unexpected result from uloc_getLocaleForLCID(0x0409): %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+
+ if (length != lengthPre) {
+ log_err(" uloc_getLocaleForLCID(0x0409): returned length %d does not match preflight length %d\n", length, lengthPre);
+ }
+
+ length = uloc_getLocaleForLCID(0x12345, temp2, sizeof(temp2)/sizeof(char), &status);
+ if (U_SUCCESS(status)) {
+ log_err(" unexpected result from uloc_getLocaleForLCID(0x12345): %s, status %s\n", temp2, u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+
+ log_verbose("Testing getLocaleForLCID vs. locale data\n");
+ for (i = 0; i < LOCALE_SIZE; i++) {
+
+ testLocale=rawData2[NAME][i];
+
+ log_verbose("Testing %s ......\n", testLocale);
+
+ sscanf(rawData2[LCID][i], "%x", &lcid);
+ length = uloc_getLocaleForLCID(lcid, temp2, sizeof(temp2)/sizeof(char), &status);
+ if (U_FAILURE(status)) {
+ log_err(" unexpected failure of uloc_getLocaleForLCID(%#04x), status %s\n", lcid, u_errorName(status));
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ if (length != uprv_strlen(temp2)) {
+ log_err(" returned length %d not correct for uloc_getLocaleForLCID(%#04x), expected %d\n", length, lcid, uprv_strlen(temp2));
+ }
+
+ /* Compare language, country, script */
+ length = uloc_getLanguage(temp2, temp3, sizeof(temp3)/sizeof(char), &status);
+ if (U_FAILURE(status)) {
+ log_err(" couldn't get language in uloc_getLocaleForLCID(%#04x) = %s, status %s\n", lcid, temp2, u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+ else if (uprv_strcmp(temp3, rawData2[LANG][i]) && !(uprv_strcmp(temp3, "nn") == 0 && uprv_strcmp(rawData2[VAR][i], "NY") == 0)) {
+ log_err(" language doesn't match expected %s in in uloc_getLocaleForLCID(%#04x) = %s\n", rawData2[LANG][i], lcid, temp2);
+ }
+
+ length = uloc_getScript(temp2, temp3, sizeof(temp3)/sizeof(char), &status);
+ if (U_FAILURE(status)) {
+ log_err(" couldn't get script in uloc_getLocaleForLCID(%#04x) = %s, status %s\n", lcid, temp2, u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+ else if (uprv_strcmp(temp3, rawData2[SCRIPT][i])) {
+ log_err(" script doesn't match expected %s in in uloc_getLocaleForLCID(%#04x) = %s\n", rawData2[SCRIPT][i], lcid, temp2);
+ }
+
+ length = uloc_getCountry(temp2, temp3, sizeof(temp3)/sizeof(char), &status);
+ if (U_FAILURE(status)) {
+ log_err(" couldn't get country in uloc_getLocaleForLCID(%#04x) = %s, status %s\n", lcid, temp2, u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+ else if (uprv_strlen(rawData2[CTRY][i]) && uprv_strcmp(temp3, rawData2[CTRY][i])) {
+ log_err(" country doesn't match expected %s in in uloc_getLocaleForLCID(%#04x) = %s\n", rawData2[CTRY][i], lcid, temp2);
+ }
+ }
+
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.h
new file mode 100644
index 00000000000..c82fa356aed
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cloctst.h
@@ -0,0 +1,114 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CLOCTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************
+*/
+#ifndef _CLOCTEST
+#define _CLOCTEST
+
+#include "cintltst.h"
+/*C API TEST FOR LOCALE */
+
+/**
+ * Test functions to set and get data fields
+ **/
+static void TestBasicGetters(void);
+static void TestPrefixes(void);
+/**
+ * Use Locale to access Resource file data and compare against expected values
+ **/
+static void TestSimpleResourceInfo(void);
+/**
+ * Use Locale to access Resource file display names and compare against expected values
+ **/
+static void TestDisplayNames(void);
+/**
+ * Test getAvailableLocales
+ **/
+ static void TestGetAvailableLocales(void);
+/**
+ * Test functions to set and access a custom data directory
+ **/
+ static void TestDataDirectory(void);
+/**
+ * Test functions to test get ISO countries and Languages
+ **/
+ static void TestISOFunctions(void);
+/**
+ * Test functions to test get ISO3 countries and Languages Fallback
+ **/
+ static void TestISO3Fallback(void);
+/**
+ * Test functions to test get ISO3 countries and Languages for Uninstalled locales
+ **/
+ static void TestUninstalledISO3Names(void);
+ static void TestObsoleteNames(void);
+/**
+ * Test functions uloc_getDisplaynames()
+ **/
+ static void TestSimpleDisplayNames(void);
+/**
+ * Test functions uloc_getDisplaynames()
+ **/
+ static void TestVariantParsing(void);
+
+ /* Test getting keyword enumeratin */
+ static void TestKeywordVariants(void);
+
+ static void TestKeywordSet(void);
+ static void TestKeywordSetError(void);
+
+ /* Test getting keyword values */
+ static void TestKeywordVariantParsing(void);
+
+ /* Test warning for no data in getDisplay* */
+ static void TestDisplayNameWarning(void);
+
+ /* Test uloc_getLocaleForLCID */
+ static void TestGetLocaleForLCID(void);
+
+/**
+ * routine to perform subtests, used by TestDisplayNames
+ */
+ static void doTestDisplayNames(const char* inLocale, int32_t compareIndex);
+
+ static void TestCanonicalization(void);
+
+ static void TestDisplayKeywords(void);
+
+ static void TestDisplayKeywordValues(void);
+
+ static void TestGetBaseName(void);
+
+static void TestGetLocale(void);
+
+/**
+ * additional intialization for datatables storing expected values
+ */
+static void setUpDataTable(void);
+static void cleanUpDataTable(void);
+/*static void displayDataTable(void);*/
+static void TestAcceptLanguage(void);
+
+/**
+ * test locale aliases
+*/
+static void TestCalendar(void);
+static void TestDateFormat(void);
+static void TestCollation(void);
+static void TestULocale(void);
+static void TestUResourceBundle(void);
+static void TestDisplayName(void);
+
+static void TestAcceptLanguage(void);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cmsccoll.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cmsccoll.c
new file mode 100644
index 00000000000..89581eeebdb
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cmsccoll.c
@@ -0,0 +1,5075 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*******************************************************************************
+*
+* File cmsccoll.C
+*
+*******************************************************************************/
+/**
+ * These are the tests specific to ICU 1.8 and above, that I didn't know where
+ * to fit.
+ */
+
+#include <stdio.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/ucoleitr.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "unicode/ustring.h"
+#include "string.h"
+#include "ucol_imp.h"
+#include "ucol_tok.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "uassert.h"
+#include "unicode/parseerr.h"
+#include "unicode/ucnv.h"
+#include "uparse.h"
+
+#define LEN(a) (sizeof(a)/sizeof(a[0]))
+
+#define MAX_TOKEN_LEN 16
+
+typedef UCollationResult tst_strcoll(void *collator, const int object,
+ const UChar *source, const int sLen,
+ const UChar *target, const int tLen);
+
+
+
+const static char cnt1[][10] = {
+
+ "AA",
+ "AC",
+ "AZ",
+ "AQ",
+ "AB",
+ "ABZ",
+ "ABQ",
+ "Z",
+ "ABC",
+ "Q",
+ "B"
+};
+
+const static char cnt2[][10] = {
+ "DA",
+ "DAD",
+ "DAZ",
+ "MAR",
+ "Z",
+ "DAVIS",
+ "MARK",
+ "DAV",
+ "DAVI"
+};
+
+static void IncompleteCntTest(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar temp[90];
+ UChar t1[90];
+ UChar t2[90];
+
+ UCollator *coll = NULL;
+ uint32_t i = 0, j = 0;
+ uint32_t size = 0;
+
+ u_uastrcpy(temp, " & Z < ABC < Q < B");
+
+ coll = ucol_openRules(temp, u_strlen(temp), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL,&status);
+
+ if(U_SUCCESS(status)) {
+ size = sizeof(cnt1)/sizeof(cnt1[0]);
+ for(i = 0; i < size-1; i++) {
+ for(j = i+1; j < size; j++) {
+ UCollationElements *iter;
+ u_uastrcpy(t1, cnt1[i]);
+ u_uastrcpy(t2, cnt1[j]);
+ doTest(coll, t1, t2, UCOL_LESS);
+ /* synwee : added collation element iterator test */
+ iter = ucol_openElements(coll, t2, u_strlen(t2), &status);
+ if (U_FAILURE(status)) {
+ log_err("Creation of iterator failed\n");
+ break;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ }
+ }
+ }
+
+ ucol_close(coll);
+
+
+ u_uastrcpy(temp, " & Z < DAVIS < MARK <DAV");
+ coll = ucol_openRules(temp, u_strlen(temp), UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
+
+ if(U_SUCCESS(status)) {
+ size = sizeof(cnt2)/sizeof(cnt2[0]);
+ for(i = 0; i < size-1; i++) {
+ for(j = i+1; j < size; j++) {
+ UCollationElements *iter;
+ u_uastrcpy(t1, cnt2[i]);
+ u_uastrcpy(t2, cnt2[j]);
+ doTest(coll, t1, t2, UCOL_LESS);
+
+ /* synwee : added collation element iterator test */
+ iter = ucol_openElements(coll, t2, u_strlen(t2), &status);
+ if (U_FAILURE(status)) {
+ log_err("Creation of iterator failed\n");
+ break;
+ }
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ }
+ }
+ }
+
+ ucol_close(coll);
+
+
+}
+
+const static char shifted[][20] = {
+ "black bird",
+ "black-bird",
+ "blackbird",
+ "black Bird",
+ "black-Bird",
+ "blackBird",
+ "black birds",
+ "black-birds",
+ "blackbirds"
+};
+
+const static UCollationResult shiftedTert[] = {
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_LESS,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_LESS,
+ UCOL_EQUAL,
+ UCOL_EQUAL
+};
+
+const static char nonignorable[][20] = {
+ "black bird",
+ "black Bird",
+ "black birds",
+ "black-bird",
+ "black-Bird",
+ "black-birds",
+ "blackbird",
+ "blackBird",
+ "blackbirds"
+};
+
+static void BlackBirdTest(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar t1[90];
+ UChar t2[90];
+
+ uint32_t i = 0, j = 0;
+ uint32_t size = 0;
+ UCollator *coll = ucol_open("en_US", &status);
+
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status);
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status);
+
+ if(U_SUCCESS(status)) {
+ size = sizeof(nonignorable)/sizeof(nonignorable[0]);
+ for(i = 0; i < size-1; i++) {
+ for(j = i+1; j < size; j++) {
+ u_uastrcpy(t1, nonignorable[i]);
+ u_uastrcpy(t2, nonignorable[j]);
+ doTest(coll, t1, t2, UCOL_LESS);
+ }
+ }
+ }
+
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
+
+ if(U_SUCCESS(status)) {
+ size = sizeof(shifted)/sizeof(shifted[0]);
+ for(i = 0; i < size-1; i++) {
+ for(j = i+1; j < size; j++) {
+ u_uastrcpy(t1, shifted[i]);
+ u_uastrcpy(t2, shifted[j]);
+ doTest(coll, t1, t2, UCOL_LESS);
+ }
+ }
+ }
+
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &status);
+ if(U_SUCCESS(status)) {
+ size = sizeof(shifted)/sizeof(shifted[0]);
+ for(i = 1; i < size; i++) {
+ u_uastrcpy(t1, shifted[i-1]);
+ u_uastrcpy(t2, shifted[i]);
+ doTest(coll, t1, t2, shiftedTert[i]);
+ }
+ }
+
+ ucol_close(coll);
+}
+
+const static UChar testSourceCases[][MAX_TOKEN_LEN] = {
+ {0x0041/*'A'*/, 0x0300, 0x0301, 0x0000},
+ {0x0041/*'A'*/, 0x0300, 0x0316, 0x0000},
+ {0x0041/*'A'*/, 0x0300, 0x0000},
+ {0x00C0, 0x0301, 0x0000},
+ /* this would work with forced normalization */
+ {0x00C0, 0x0316, 0x0000}
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] = {
+ {0x0041/*'A'*/, 0x0301, 0x0300, 0x0000},
+ {0x0041/*'A'*/, 0x0316, 0x0300, 0x0000},
+ {0x00C0, 0},
+ {0x0041/*'A'*/, 0x0301, 0x0300, 0x0000},
+ /* this would work with forced normalization */
+ {0x0041/*'A'*/, 0x0316, 0x0300, 0x0000}
+};
+
+const static UCollationResult results[] = {
+ UCOL_GREATER,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ UCOL_GREATER,
+ UCOL_EQUAL
+};
+
+static void FunkyATest(void)
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *myCollation;
+ myCollation = ucol_open("en_US", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing some A letters, for some reason\n");
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 4 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+UColAttributeValue caseFirst[] = {
+ UCOL_OFF,
+ UCOL_LOWER_FIRST,
+ UCOL_UPPER_FIRST
+};
+
+
+UColAttributeValue alternateHandling[] = {
+ UCOL_NON_IGNORABLE,
+ UCOL_SHIFTED
+};
+
+UColAttributeValue caseLevel[] = {
+ UCOL_OFF,
+ UCOL_ON
+};
+
+UColAttributeValue strengths[] = {
+ UCOL_PRIMARY,
+ UCOL_SECONDARY,
+ UCOL_TERTIARY,
+ UCOL_QUATERNARY,
+ UCOL_IDENTICAL
+};
+
+#if 0
+static const char * strengthsC[] = {
+ "UCOL_PRIMARY",
+ "UCOL_SECONDARY",
+ "UCOL_TERTIARY",
+ "UCOL_QUATERNARY",
+ "UCOL_IDENTICAL"
+};
+
+static const char * caseFirstC[] = {
+ "UCOL_OFF",
+ "UCOL_LOWER_FIRST",
+ "UCOL_UPPER_FIRST"
+};
+
+
+static const char * alternateHandlingC[] = {
+ "UCOL_NON_IGNORABLE",
+ "UCOL_SHIFTED"
+};
+
+static const char * caseLevelC[] = {
+ "UCOL_OFF",
+ "UCOL_ON"
+};
+
+/* not used currently - does not test only prints */
+static void PrintMarkDavis(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar m[256];
+ uint8_t sortkey[256];
+ UCollator *coll = ucol_open("en_US", &status);
+ uint32_t h,i,j,k, sortkeysize;
+ uint32_t sizem = 0;
+ char buffer[512];
+ uint32_t len = 512;
+
+ log_verbose("PrintMarkDavis");
+
+ u_uastrcpy(m, "Mark Davis");
+ sizem = u_strlen(m);
+
+
+ m[1] = 0xe4;
+
+ for(i = 0; i<sizem; i++) {
+ fprintf(stderr, "\\u%04X ", m[i]);
+ }
+ fprintf(stderr, "\n");
+
+ for(h = 0; h<sizeof(caseFirst)/sizeof(caseFirst[0]); h++) {
+ ucol_setAttribute(coll, UCOL_CASE_FIRST, caseFirst[i], &status);
+ fprintf(stderr, "caseFirst: %s\n", caseFirstC[h]);
+
+ for(i = 0; i<sizeof(alternateHandling)/sizeof(alternateHandling[0]); i++) {
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, alternateHandling[i], &status);
+ fprintf(stderr, " AltHandling: %s\n", alternateHandlingC[i]);
+
+ for(j = 0; j<sizeof(caseLevel)/sizeof(caseLevel[0]); j++) {
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, caseLevel[j], &status);
+ fprintf(stderr, " caseLevel: %s\n", caseLevelC[j]);
+
+ for(k = 0; k<sizeof(strengths)/sizeof(strengths[0]); k++) {
+ ucol_setAttribute(coll, UCOL_STRENGTH, strengths[k], &status);
+ sortkeysize = ucol_getSortKey(coll, m, sizem, sortkey, 256);
+ fprintf(stderr, " strength: %s\n Sortkey: ", strengthsC[k]);
+ fprintf(stderr, "%s\n", ucol_sortKeyToString(coll, sortkey, buffer, &len));
+ }
+
+ }
+
+ }
+
+ }
+}
+#endif
+
+static void BillFairmanTest(void) {
+/*
+** check for actual locale via ICU resource bundles
+**
+** lp points to the original locale ("fr_FR_....")
+*/
+
+ UResourceBundle *lr,*cr;
+ UErrorCode lec = U_ZERO_ERROR;
+ const char *lp = "fr_FR_you_ll_never_find_this_locale";
+
+ log_verbose("BillFairmanTest\n");
+
+ lr = ures_open(NULL,lp,&lec);
+ if (lr) {
+ cr = ures_getByKey(lr,"collations",0,&lec);
+ if (cr) {
+ lp = ures_getLocale(cr,&lec);
+ if (lp) {
+ if (U_SUCCESS(lec)) {
+ if(strcmp(lp, "fr") != 0) {
+ log_err("Wrong locale for French Collation Data, expected \"fr\" got %s", lp);
+ }
+ }
+ }
+ ures_close(cr);
+ }
+ ures_close(lr);
+ }
+}
+
+static void testPrimary(UCollator* col, const UChar* p,const UChar* q){
+ UChar source[256] = { '\0'};
+ UChar target[256] = { '\0'};
+ UChar preP = 0x31a3;
+ UChar preQ = 0x310d;
+/*
+ UChar preP = (*p>0x0400 && *p<0x0500)?0x00e1:0x491;
+ UChar preQ = (*p>0x0400 && *p<0x0500)?0x0041:0x413;
+*/
+ /*log_verbose("Testing primary\n");*/
+
+ doTest(col, p, q, UCOL_LESS);
+/*
+ UCollationResult result = ucol_strcoll(col,p,u_strlen(p),q,u_strlen(q));
+
+ if(result!=UCOL_LESS){
+ aescstrdup(p,utfSource,256);
+ aescstrdup(q,utfTarget,256);
+ fprintf(file,"Primary failed source: %s target: %s \n", utfSource,utfTarget);
+ }
+*/
+ source[0] = preP;
+ u_strcpy(source+1,p);
+ target[0] = preQ;
+ u_strcpy(target+1,q);
+ doTest(col, source, target, UCOL_LESS);
+/*
+ fprintf(file,"Primary swamps 2nd failed source: %s target: %s \n", utfSource,utfTarget);
+*/
+}
+
+static void testSecondary(UCollator* col, const UChar* p,const UChar* q){
+ UChar source[256] = { '\0'};
+ UChar target[256] = { '\0'};
+
+ /*log_verbose("Testing secondary\n");*/
+
+ doTest(col, p, q, UCOL_LESS);
+/*
+ fprintf(file,"secondary failed source: %s target: %s \n", utfSource,utfTarget);
+*/
+ source[0] = 0x0053;
+ u_strcpy(source+1,p);
+ target[0]= 0x0073;
+ u_strcpy(target+1,q);
+
+ doTest(col, source, target, UCOL_LESS);
+/*
+ fprintf(file,"secondary swamps 3rd failed source: %s target: %s \n",utfSource,utfTarget);
+*/
+
+
+ u_strcpy(source,p);
+ source[u_strlen(p)] = 0x62;
+ source[u_strlen(p)+1] = 0;
+
+
+ u_strcpy(target,q);
+ target[u_strlen(q)] = 0x61;
+ target[u_strlen(q)+1] = 0;
+
+ doTest(col, source, target, UCOL_GREATER);
+
+/*
+ fprintf(file,"secondary is swamped by 1 failed source: %s target: %s \n",utfSource,utfTarget);
+*/
+}
+
+static void testTertiary(UCollator* col, const UChar* p,const UChar* q){
+ UChar source[256] = { '\0'};
+ UChar target[256] = { '\0'};
+
+ /*log_verbose("Testing tertiary\n");*/
+
+ doTest(col, p, q, UCOL_LESS);
+/*
+ fprintf(file,"Tertiary failed source: %s target: %s \n",utfSource,utfTarget);
+*/
+ source[0] = 0x0020;
+ u_strcpy(source+1,p);
+ target[0]= 0x002D;
+ u_strcpy(target+1,q);
+
+ doTest(col, source, target, UCOL_LESS);
+/*
+ fprintf(file,"Tertiary swamps 4th failed source: %s target: %s \n", utfSource,utfTarget);
+*/
+
+ u_strcpy(source,p);
+ source[u_strlen(p)] = 0xE0;
+ source[u_strlen(p)+1] = 0;
+
+ u_strcpy(target,q);
+ target[u_strlen(q)] = 0x61;
+ target[u_strlen(q)+1] = 0;
+
+ doTest(col, source, target, UCOL_GREATER);
+
+/*
+ fprintf(file,"Tertiary is swamped by 3rd failed source: %s target: %s \n",utfSource,utfTarget);
+*/
+}
+
+static void testEquality(UCollator* col, const UChar* p,const UChar* q){
+/*
+ UChar source[256] = { '\0'};
+ UChar target[256] = { '\0'};
+*/
+
+ doTest(col, p, q, UCOL_EQUAL);
+/*
+ fprintf(file,"Primary failed source: %s target: %s \n", utfSource,utfTarget);
+*/
+}
+
+static void testCollator(UCollator *coll, UErrorCode *status) {
+ const UChar *rules = NULL, *current = NULL;
+ int32_t ruleLen = 0;
+ uint32_t strength = 0;
+ uint32_t chOffset = 0; uint32_t chLen = 0;
+ uint32_t exOffset = 0; uint32_t exLen = 0;
+ uint32_t prefixOffset = 0; uint32_t prefixLen = 0;
+ uint32_t firstEx = 0;
+/* uint32_t rExpsLen = 0; */
+ uint32_t firstLen = 0;
+ UBool varT = FALSE; UBool top_ = TRUE;
+ uint16_t specs = 0;
+ UBool startOfRules = TRUE;
+ UBool lastReset = FALSE;
+ UBool before = FALSE;
+ uint32_t beforeStrength = 0;
+ UColTokenParser src;
+ UColOptionSet opts;
+
+ UChar first[256];
+ UChar second[256];
+ UChar tempB[256];
+ uint32_t tempLen;
+ UChar *rulesCopy = NULL;
+ UParseError parseError;
+ src.opts = &opts;
+
+ rules = ucol_getRules(coll, &ruleLen);
+ if(U_SUCCESS(*status) && ruleLen > 0) {
+ rulesCopy = (UChar *)malloc((ruleLen+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar));
+ uprv_memcpy(rulesCopy, rules, ruleLen*sizeof(UChar));
+ src.current = src.source = rulesCopy;
+ src.end = rulesCopy+ruleLen;
+ src.extraCurrent = src.end;
+ src.extraEnd = src.end+UCOL_TOK_EXTRA_RULE_SPACE_SIZE;
+ *first = *second = 0;
+
+ while ((current = ucol_tok_parseNextToken(&src, startOfRules,&parseError, status)) != NULL) {
+ strength = src.parsedToken.strength;
+ chOffset = src.parsedToken.charsOffset;
+ chLen = src.parsedToken.charsLen;
+ exOffset = src.parsedToken.extensionOffset;
+ exLen = src.parsedToken.extensionLen;
+ prefixOffset = src.parsedToken.prefixOffset;
+ prefixLen = src.parsedToken.prefixLen;
+ specs = src.parsedToken.flags;
+
+ startOfRules = FALSE;
+ varT = (UBool)((specs & UCOL_TOK_VARIABLE_TOP) != 0);
+ top_ = (UBool)((specs & UCOL_TOK_TOP) != 0);
+ if(top_) { /* if reset is on top, the sequence is broken. We should have an empty string */
+ second[0] = 0;
+ } else {
+ u_strncpy(second,rulesCopy+chOffset, chLen);
+ second[chLen] = 0;
+
+ if(exLen > 0 && firstEx == 0) {
+ u_strncat(first, rulesCopy+exOffset, exLen);
+ first[firstLen+exLen] = 0;
+ }
+
+ if(lastReset == TRUE && prefixLen != 0) {
+ u_strncpy(first+prefixLen, first, firstLen);
+ u_strncpy(first, rulesCopy+prefixOffset, prefixLen);
+ first[firstLen+prefixLen] = 0;
+ firstLen = firstLen+prefixLen;
+ }
+
+ if(before == TRUE) { /* swap first and second */
+ u_strcpy(tempB, first);
+ u_strcpy(first, second);
+ u_strcpy(second, tempB);
+
+ tempLen = firstLen;
+ firstLen = chLen;
+ chLen = tempLen;
+
+ tempLen = firstEx;
+ firstEx = exLen;
+ exLen = tempLen;
+ if(beforeStrength < strength) {
+ strength = beforeStrength;
+ }
+ }
+ }
+ lastReset = FALSE;
+
+ switch(strength){
+ case UCOL_IDENTICAL:
+ testEquality(coll,first,second);
+ break;
+ case UCOL_PRIMARY:
+ testPrimary(coll,first,second);
+ break;
+ case UCOL_SECONDARY:
+ testSecondary(coll,first,second);
+ break;
+ case UCOL_TERTIARY:
+ testTertiary(coll,first,second);
+ break;
+ case UCOL_TOK_RESET:
+ lastReset = TRUE;
+ before = (UBool)((specs & UCOL_TOK_BEFORE) != 0);
+ if(before) {
+ beforeStrength = (specs & UCOL_TOK_BEFORE)-1;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if(before == TRUE && strength != UCOL_TOK_RESET) { /* first and second were swapped */
+ before = FALSE;
+ } else {
+ firstLen = chLen;
+ firstEx = exLen;
+ u_strcpy(first, second);
+ }
+ }
+ free(rulesCopy);
+ }
+}
+
+static UCollationResult ucaTest(void *collator, const int object, const UChar *source, const int sLen, const UChar *target, const int tLen) {
+ UCollator *UCA = (UCollator *)collator;
+ return ucol_strcoll(UCA, source, sLen, target, tLen);
+}
+
+/*
+static UCollationResult winTest(void *collator, const int object, const UChar *source, const int sLen, const UChar *target, const int tLen) {
+#ifdef U_WINDOWS
+ LCID lcid = (LCID)collator;
+ return (UCollationResult)CompareString(lcid, 0, source, sLen, target, tLen);
+#else
+ return 0;
+#endif
+}
+*/
+
+static UCollationResult swampEarlier(tst_strcoll* func, void *collator, int opts,
+ UChar s1, UChar s2,
+ const UChar *s, const uint32_t sLen,
+ const UChar *t, const uint32_t tLen) {
+ UChar source[256] = {0};
+ UChar target[256] = {0};
+
+ source[0] = s1;
+ u_strcpy(source+1, s);
+ target[0] = s2;
+ u_strcpy(target+1, t);
+
+ return func(collator, opts, source, sLen+1, target, tLen+1);
+}
+
+static UCollationResult swampLater(tst_strcoll* func, void *collator, int opts,
+ UChar s1, UChar s2,
+ const UChar *s, const uint32_t sLen,
+ const UChar *t, const uint32_t tLen) {
+ UChar source[256] = {0};
+ UChar target[256] = {0};
+
+ u_strcpy(source, s);
+ source[sLen] = s1;
+ u_strcpy(target, t);
+ target[tLen] = s2;
+
+ return func(collator, opts, source, sLen+1, target, tLen+1);
+}
+
+static uint32_t probeStrength(tst_strcoll* func, void *collator, int opts,
+ const UChar *s, const uint32_t sLen,
+ const UChar *t, const uint32_t tLen,
+ UCollationResult result) {
+ /*UChar fPrimary = 0x6d;*/
+ /*UChar sPrimary = 0x6e;*/
+ UChar fSecondary = 0x310d;
+ UChar sSecondary = 0x31a3;
+ UChar fTertiary = 0x310f;
+ UChar sTertiary = 0x31b7;
+
+ UCollationResult oposite;
+ if(result == UCOL_EQUAL) {
+ return UCOL_IDENTICAL;
+ } else if(result == UCOL_GREATER) {
+ oposite = UCOL_LESS;
+ } else {
+ oposite = UCOL_GREATER;
+ }
+
+ if(swampEarlier(func, collator, opts, sSecondary, fSecondary, s, sLen, t, tLen) == result) {
+ return UCOL_PRIMARY;
+ } else if((swampEarlier(func, collator, opts, sTertiary, 0x310f, s, sLen, t, tLen) == result) &&
+ (swampEarlier(func, collator, opts, 0x310f, sTertiary, s, sLen, t, tLen) == result)) {
+ return UCOL_SECONDARY;
+ } else if((swampLater(func, collator, opts, sTertiary, fTertiary, s, sLen, t, tLen) == result) &&
+ (swampLater(func, collator, opts, fTertiary, sTertiary, s, sLen, t, tLen) == result)) {
+ return UCOL_TERTIARY;
+ } else if((swampLater(func, collator, opts, sTertiary, 0x310f, s, sLen, t, tLen) == oposite) &&
+ (swampLater(func, collator, opts, fTertiary, sTertiary, s, sLen, t, tLen) == oposite)) {
+ return UCOL_QUATERNARY;
+ } else {
+ return UCOL_IDENTICAL;
+ }
+}
+
+static char *getRelationSymbol(UCollationResult res, uint32_t strength, char *buffer) {
+ uint32_t i = 0;
+
+ if(res == UCOL_EQUAL || strength == 0xdeadbeef) {
+ buffer[0] = '=';
+ buffer[1] = '=';
+ buffer[2] = '\0';
+ } else if(res == UCOL_GREATER) {
+ for(i = 0; i<strength+1; i++) {
+ buffer[i] = '>';
+ }
+ buffer[strength+1] = '\0';
+ } else {
+ for(i = 0; i<strength+1; i++) {
+ buffer[i] = '<';
+ }
+ buffer[strength+1] = '\0';
+ }
+
+ return buffer;
+}
+
+
+
+static void logFailure (const char *platform, const char *test,
+ const UChar *source, const uint32_t sLen,
+ const UChar *target, const uint32_t tLen,
+ UCollationResult realRes, uint32_t realStrength,
+ UCollationResult expRes, uint32_t expStrength, UBool error) {
+
+ uint32_t i = 0;
+
+ char sEsc[256], s[256], tEsc[256], t[256], b[256], output[512], relation[256];
+ static int32_t maxOutputLength = 0;
+ int32_t outputLength;
+
+ *sEsc = *tEsc = *s = *t = 0;
+ if(error == TRUE) {
+ log_err("Difference between expected and generated order. Run test with -v for more info\n");
+ } else if(VERBOSITY == 0) {
+ return;
+ }
+ for(i = 0; i<sLen; i++) {
+ sprintf(b, "%04X", source[i]);
+ strcat(sEsc, "\\u");
+ strcat(sEsc, b);
+ strcat(s, b);
+ strcat(s, " ");
+ if(source[i] < 0x80) {
+ sprintf(b, "(%c)", source[i]);
+ strcat(sEsc, b);
+ }
+ }
+ for(i = 0; i<tLen; i++) {
+ sprintf(b, "%04X", target[i]);
+ strcat(tEsc, "\\u");
+ strcat(tEsc, b);
+ strcat(t, b);
+ strcat(t, " ");
+ if(target[i] < 0x80) {
+ sprintf(b, "(%c)", target[i]);
+ strcat(tEsc, b);
+ }
+ }
+/*
+ strcpy(output, "[[ ");
+ strcat(output, sEsc);
+ strcat(output, getRelationSymbol(expRes, expStrength, relation));
+ strcat(output, tEsc);
+
+ strcat(output, " : ");
+
+ strcat(output, sEsc);
+ strcat(output, getRelationSymbol(realRes, realStrength, relation));
+ strcat(output, tEsc);
+ strcat(output, " ]] ");
+
+ log_verbose("%s", output);
+*/
+
+
+ strcpy(output, "DIFF: ");
+
+ strcat(output, s);
+ strcat(output, " : ");
+ strcat(output, t);
+
+ strcat(output, test);
+ strcat(output, ": ");
+
+ strcat(output, sEsc);
+ strcat(output, getRelationSymbol(expRes, expStrength, relation));
+ strcat(output, tEsc);
+
+ strcat(output, " ");
+
+ strcat(output, platform);
+ strcat(output, ": ");
+
+ strcat(output, sEsc);
+ strcat(output, getRelationSymbol(realRes, realStrength, relation));
+ strcat(output, tEsc);
+
+ outputLength = (int32_t)strlen(output);
+ if(outputLength > maxOutputLength) {
+ maxOutputLength = outputLength;
+ U_ASSERT(outputLength < sizeof(output));
+ }
+
+ log_verbose("%s\n", output);
+
+}
+
+/*
+static void printOutRules(const UChar *rules) {
+ uint32_t len = u_strlen(rules);
+ uint32_t i = 0;
+ char toPrint;
+ uint32_t line = 0;
+
+ fprintf(stdout, "Rules:");
+
+ for(i = 0; i<len; i++) {
+ if(rules[i]<0x7f && rules[i]>=0x20) {
+ toPrint = (char)rules[i];
+ if(toPrint == '&') {
+ line = 1;
+ fprintf(stdout, "\n&");
+ } else if(toPrint == ';') {
+ fprintf(stdout, "<<");
+ line+=2;
+ } else if(toPrint == ',') {
+ fprintf(stdout, "<<<");
+ line+=3;
+ } else {
+ fprintf(stdout, "%c", toPrint);
+ line++;
+ }
+ } else if(rules[i]<0x3400 || rules[i]>=0xa000) {
+ fprintf(stdout, "\\u%04X", rules[i]);
+ line+=6;
+ }
+ if(line>72) {
+ fprintf(stdout, "\n");
+ line = 0;
+ }
+ }
+
+ log_verbose("\n");
+
+}
+*/
+
+static uint32_t testSwitch(tst_strcoll* func, void *collator, int opts, uint32_t strength, const UChar *first, const UChar *second, const char* msg, UBool error) {
+ uint32_t diffs = 0;
+ UCollationResult realResult;
+ uint32_t realStrength;
+
+ uint32_t sLen = u_strlen(first);
+ uint32_t tLen = u_strlen(second);
+
+ realResult = func(collator, opts, first, sLen, second, tLen);
+ realStrength = probeStrength(func, collator, opts, first, sLen, second, tLen, realResult);
+
+ if(strength == UCOL_IDENTICAL && realResult != UCOL_IDENTICAL) {
+ logFailure(msg, "tailoring", first, sLen, second, tLen, realResult, realStrength, UCOL_EQUAL, strength, error);
+ diffs++;
+ } else if(realResult != UCOL_LESS || realStrength != strength) {
+ logFailure(msg, "tailoring", first, sLen, second, tLen, realResult, realStrength, UCOL_LESS, strength, error);
+ diffs++;
+ }
+ return diffs;
+}
+
+
+static void testAgainstUCA(UCollator *coll, UCollator *UCA, const char *refName, UBool error, UErrorCode *status) {
+ const UChar *rules = NULL, *current = NULL;
+ int32_t ruleLen = 0;
+ uint32_t strength = 0;
+ uint32_t chOffset = 0; uint32_t chLen = 0;
+ uint32_t exOffset = 0; uint32_t exLen = 0;
+ uint32_t prefixOffset = 0; uint32_t prefixLen = 0;
+/* uint32_t rExpsLen = 0; */
+ uint32_t firstLen = 0, secondLen = 0;
+ UBool varT = FALSE; UBool top_ = TRUE;
+ uint16_t specs = 0;
+ UBool startOfRules = TRUE;
+ UColTokenParser src;
+ UColOptionSet opts;
+
+ UChar first[256];
+ UChar second[256];
+ UChar *rulesCopy = NULL;
+
+ uint32_t UCAdiff = 0;
+ uint32_t Windiff = 1;
+ UParseError parseError;
+
+ src.opts = &opts;
+
+ rules = ucol_getRules(coll, &ruleLen);
+
+ /*printOutRules(rules);*/
+
+ if(U_SUCCESS(*status) && ruleLen > 0) {
+ rulesCopy = (UChar *)malloc((ruleLen+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar));
+ uprv_memcpy(rulesCopy, rules, ruleLen*sizeof(UChar));
+ src.current = src.source = rulesCopy;
+ src.end = rulesCopy+ruleLen;
+ src.extraCurrent = src.end;
+ src.extraEnd = src.end+UCOL_TOK_EXTRA_RULE_SPACE_SIZE;
+ *first = *second = 0;
+
+ while ((current = ucol_tok_parseNextToken(&src, startOfRules, &parseError,status)) != NULL) {
+ strength = src.parsedToken.strength;
+ chOffset = src.parsedToken.charsOffset;
+ chLen = src.parsedToken.charsLen;
+ exOffset = src.parsedToken.extensionOffset;
+ exLen = src.parsedToken.extensionLen;
+ prefixOffset = src.parsedToken.prefixOffset;
+ prefixLen = src.parsedToken.prefixLen;
+ specs = src.parsedToken.flags;
+
+ startOfRules = FALSE;
+ varT = (UBool)((specs & UCOL_TOK_VARIABLE_TOP) != 0);
+ top_ = (UBool)((specs & UCOL_TOK_TOP) != 0);
+
+ u_strncpy(second,rulesCopy+chOffset, chLen);
+ second[chLen] = 0;
+ secondLen = chLen;
+
+ if(exLen > 0) {
+ u_strncat(first, rulesCopy+exOffset, exLen);
+ first[firstLen+exLen] = 0;
+ firstLen += exLen;
+ }
+
+ if(strength != UCOL_TOK_RESET) {
+ if((*first<0x3400 || *first>=0xa000) && (*second<0x3400 || *second>=0xa000)) {
+ UCAdiff += testSwitch(&ucaTest, (void *)UCA, 0, strength, first, second, refName, error);
+ /*Windiff += testSwitch(&winTest, (void *)lcid, 0, strength, first, second, "Win32");*/
+ }
+ }
+
+
+ firstLen = chLen;
+ u_strcpy(first, second);
+
+ }
+ if(UCAdiff != 0 && Windiff != 0) {
+ log_verbose("\n");
+ }
+ if(UCAdiff == 0) {
+ log_verbose("No immediate difference with %s!\n", refName);
+ }
+ if(Windiff == 0) {
+ log_verbose("No immediate difference with Win32!\n");
+ }
+ free(rulesCopy);
+ }
+}
+
+/*
+ * Takes two CEs (lead and continuation) and
+ * compares them as CEs should be compared:
+ * primary vs. primary, secondary vs. secondary
+ * tertiary vs. tertiary
+ */
+static int32_t compareCEs(uint32_t s1, uint32_t s2,
+ uint32_t t1, uint32_t t2) {
+ uint32_t s = 0, t = 0;
+ if(s1 == t1 && s2 == t2) {
+ return 0;
+ }
+ s = (s1 & 0xFFFF0000)|((s2 & 0xFFFF0000)>>16);
+ t = (t1 & 0xFFFF0000)|((t2 & 0xFFFF0000)>>16);
+ if(s < t) {
+ return -1;
+ } else if(s > t) {
+ return 1;
+ } else {
+ s = (s1 & 0x0000FF00) | (s2 & 0x0000FF00)>>8;
+ t = (t1 & 0x0000FF00) | (t2 & 0x0000FF00)>>8;
+ if(s < t) {
+ return -1;
+ } else if(s > t) {
+ return 1;
+ } else {
+ s = (s1 & 0x000000FF)<<8 | (s2 & 0x000000FF);
+ t = (t1 & 0x000000FF)<<8 | (t2 & 0x000000FF);
+ if(s < t) {
+ return -1;
+ } else {
+ return 1;
+ }
+ }
+ }
+}
+
+typedef struct {
+ uint32_t startCE;
+ uint32_t startContCE;
+ uint32_t limitCE;
+ uint32_t limitContCE;
+} indirectBoundaries;
+
+/* these values are used for finding CE values for indirect positioning. */
+/* Indirect positioning is a mechanism for allowing resets on symbolic */
+/* values. It only works for resets and you cannot tailor indirect names */
+/* An indirect name can define either an anchor point or a range. An */
+/* anchor point behaves in exactly the same way as a code point in reset */
+/* would, except that it cannot be tailored. A range (we currently only */
+/* know for the [top] range will explicitly set the upper bound for */
+/* generated CEs, thus allowing for better control over how many CEs can */
+/* be squeezed between in the range without performance penalty. */
+/* In that respect, we use [top] for tailoring of locales that use CJK */
+/* characters. Other indirect values are currently a pure convenience, */
+/* they can be used to assure that the CEs will be always positioned in */
+/* the same place relative to a point with known properties (e.g. first */
+/* primary ignorable). */
+static indirectBoundaries ucolIndirectBoundaries[15];
+static UBool indirectBoundariesSet = FALSE;
+static void setIndirectBoundaries(uint32_t indexR, uint32_t *start, uint32_t *end) {
+
+ /* Set values for the top - TODO: once we have values for all the indirects, we are going */
+ /* to initalize here. */
+ ucolIndirectBoundaries[indexR].startCE = start[0];
+ ucolIndirectBoundaries[indexR].startContCE = start[1];
+ if(end) {
+ ucolIndirectBoundaries[indexR].limitCE = end[0];
+ ucolIndirectBoundaries[indexR].limitContCE = end[1];
+ } else {
+ ucolIndirectBoundaries[indexR].limitCE = 0;
+ ucolIndirectBoundaries[indexR].limitContCE = 0;
+ }
+}
+
+static void testCEs(UCollator *coll, UErrorCode *status) {
+
+ const UChar *rules = NULL, *current = NULL;
+ int32_t ruleLen = 0;
+
+ uint32_t strength = 0;
+ uint32_t maxStrength = UCOL_IDENTICAL;
+ uint32_t baseCE, baseContCE, nextCE, nextContCE, currCE, currContCE;
+ uint32_t lastCE;
+ uint32_t lastContCE;
+
+ int32_t result = 0;
+ uint32_t chOffset = 0; uint32_t chLen = 0;
+ uint32_t exOffset = 0; uint32_t exLen = 0;
+ uint32_t prefixOffset = 0; uint32_t prefixLen = 0;
+ uint32_t oldOffset = 0;
+
+ /* uint32_t rExpsLen = 0; */
+ /* uint32_t firstLen = 0; */
+ uint16_t specs = 0;
+ UBool varT = FALSE; UBool top_ = TRUE;
+ UBool startOfRules = TRUE;
+ UBool before = FALSE;
+ UColTokenParser src;
+ UColOptionSet opts;
+ UParseError parseError;
+ UChar *rulesCopy = NULL;
+ collIterate c;
+ UCollator *UCA = ucol_open("root", status);
+ UCAConstants *consts = (UCAConstants *)((uint8_t *)UCA->image + UCA->image->UCAConsts);
+ uint32_t UCOL_RESET_TOP_VALUE = consts->UCA_LAST_NON_VARIABLE[0], /*UCOL_RESET_TOP_CONT = consts->UCA_LAST_NON_VARIABLE[1], */
+ UCOL_NEXT_TOP_VALUE = consts->UCA_FIRST_IMPLICIT[0], UCOL_NEXT_TOP_CONT = consts->UCA_FIRST_IMPLICIT[1];
+
+ baseCE=baseContCE=nextCE=nextContCE=currCE=currContCE=lastCE=lastContCE = UCOL_NOT_FOUND;
+
+ src.opts = &opts;
+
+ rules = ucol_getRules(coll, &ruleLen);
+
+ src.invUCA = ucol_initInverseUCA(status);
+
+ if(indirectBoundariesSet == FALSE) {
+ /* UCOL_RESET_TOP_VALUE */
+ setIndirectBoundaries(0, consts->UCA_LAST_NON_VARIABLE, consts->UCA_FIRST_IMPLICIT);
+ /* UCOL_FIRST_PRIMARY_IGNORABLE */
+ setIndirectBoundaries(1, consts->UCA_FIRST_PRIMARY_IGNORABLE, 0);
+ /* UCOL_LAST_PRIMARY_IGNORABLE */
+ setIndirectBoundaries(2, consts->UCA_LAST_PRIMARY_IGNORABLE, 0);
+ /* UCOL_FIRST_SECONDARY_IGNORABLE */
+ setIndirectBoundaries(3, consts->UCA_FIRST_SECONDARY_IGNORABLE, 0);
+ /* UCOL_LAST_SECONDARY_IGNORABLE */
+ setIndirectBoundaries(4, consts->UCA_LAST_SECONDARY_IGNORABLE, 0);
+ /* UCOL_FIRST_TERTIARY_IGNORABLE */
+ setIndirectBoundaries(5, consts->UCA_FIRST_TERTIARY_IGNORABLE, 0);
+ /* UCOL_LAST_TERTIARY_IGNORABLE */
+ setIndirectBoundaries(6, consts->UCA_LAST_TERTIARY_IGNORABLE, 0);
+ /* UCOL_FIRST_VARIABLE */
+ setIndirectBoundaries(7, consts->UCA_FIRST_VARIABLE, 0);
+ /* UCOL_LAST_VARIABLE */
+ setIndirectBoundaries(8, consts->UCA_LAST_VARIABLE, 0);
+ /* UCOL_FIRST_NON_VARIABLE */
+ setIndirectBoundaries(9, consts->UCA_FIRST_NON_VARIABLE, 0);
+ /* UCOL_LAST_NON_VARIABLE */
+ setIndirectBoundaries(10, consts->UCA_LAST_NON_VARIABLE, consts->UCA_FIRST_IMPLICIT);
+ /* UCOL_FIRST_IMPLICIT */
+ setIndirectBoundaries(11, consts->UCA_FIRST_IMPLICIT, 0);
+ /* UCOL_LAST_IMPLICIT */
+ setIndirectBoundaries(12, consts->UCA_LAST_IMPLICIT, consts->UCA_FIRST_TRAILING);
+ /* UCOL_FIRST_TRAILING */
+ setIndirectBoundaries(13, consts->UCA_FIRST_TRAILING, 0);
+ /* UCOL_LAST_TRAILING */
+ setIndirectBoundaries(14, consts->UCA_LAST_TRAILING, 0);
+ ucolIndirectBoundaries[14].limitCE = (consts->UCA_PRIMARY_SPECIAL_MIN<<24);
+ indirectBoundariesSet = TRUE;
+ }
+
+
+ if(U_SUCCESS(*status) && ruleLen > 0) {
+ rulesCopy = (UChar *)malloc((ruleLen+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar));
+ uprv_memcpy(rulesCopy, rules, ruleLen*sizeof(UChar));
+ src.current = src.source = rulesCopy;
+ src.end = rulesCopy+ruleLen;
+ src.extraCurrent = src.end;
+ src.extraEnd = src.end+UCOL_TOK_EXTRA_RULE_SPACE_SIZE;
+
+ while ((current = ucol_tok_parseNextToken(&src, startOfRules, &parseError,status)) != NULL) {
+ strength = src.parsedToken.strength;
+ chOffset = src.parsedToken.charsOffset;
+ chLen = src.parsedToken.charsLen;
+ exOffset = src.parsedToken.extensionOffset;
+ exLen = src.parsedToken.extensionLen;
+ prefixOffset = src.parsedToken.prefixOffset;
+ prefixLen = src.parsedToken.prefixLen;
+ specs = src.parsedToken.flags;
+
+ startOfRules = FALSE;
+ varT = (UBool)((specs & UCOL_TOK_VARIABLE_TOP) != 0);
+ top_ = (UBool)((specs & UCOL_TOK_TOP) != 0);
+
+ uprv_init_collIterate(coll, rulesCopy+chOffset, chLen, &c);
+
+ currCE = ucol_getNextCE(coll, &c, status);
+ if(currCE == 0 && UCOL_ISTHAIPREVOWEL(*(rulesCopy+chOffset))) {
+ log_verbose("Thai prevowel detected. Will pick next CE\n");
+ currCE = ucol_getNextCE(coll, &c, status);
+ }
+
+ currContCE = ucol_getNextCE(coll, &c, status);
+ if(!isContinuation(currContCE)) {
+ currContCE = 0;
+ }
+
+ /* we need to repack CEs here */
+
+ if(strength == UCOL_TOK_RESET) {
+ before = (UBool)((specs & UCOL_TOK_BEFORE) != 0);
+ if(top_ == TRUE) {
+ int32_t index = src.parsedToken.indirectIndex;
+
+ nextCE = baseCE = currCE = ucolIndirectBoundaries[index].startCE;
+ nextContCE = baseContCE = currContCE = ucolIndirectBoundaries[index].startContCE;
+ } else {
+ nextCE = baseCE = currCE;
+ nextContCE = baseContCE = currContCE;
+ }
+ maxStrength = UCOL_IDENTICAL;
+ } else {
+ if(strength < maxStrength) {
+ maxStrength = strength;
+ if(baseCE == UCOL_RESET_TOP_VALUE) {
+ log_verbose("Resetting to [top]\n");
+ nextCE = UCOL_NEXT_TOP_VALUE;
+ nextContCE = UCOL_NEXT_TOP_CONT;
+ } else {
+ result = ucol_inv_getNextCE(&src, baseCE & 0xFFFFFF3F, baseContCE, &nextCE, &nextContCE, maxStrength);
+ }
+ if(result < 0) {
+ if(ucol_isTailored(coll, *(rulesCopy+oldOffset), status)) {
+ log_verbose("Reset is tailored codepoint %04X, don't know how to continue, taking next test\n", *(rulesCopy+oldOffset));
+ return;
+ } else {
+ log_err("couldn't find the CE\n");
+ return;
+ }
+ }
+ }
+
+ currCE &= 0xFFFFFF3F;
+ currContCE &= 0xFFFFFFBF;
+
+ if(maxStrength == UCOL_IDENTICAL) {
+ if(baseCE != currCE || baseContCE != currContCE) {
+ log_err("current CE (initial strength UCOL_EQUAL)\n");
+ }
+ } else {
+ if(strength == UCOL_IDENTICAL) {
+ if(lastCE != currCE || lastContCE != currContCE) {
+ log_err("current CE (initial strength UCOL_EQUAL)\n");
+ }
+ } else {
+ if(compareCEs(currCE, currContCE, nextCE, nextContCE) > 0) {
+ /*if(currCE > nextCE || (currCE == nextCE && currContCE >= nextContCE)) {*/
+ log_err("current CE is not less than base CE\n");
+ }
+ if(!before) {
+ if(compareCEs(currCE, currContCE, lastCE, lastContCE) < 0) {
+ /*if(currCE < lastCE || (currCE == lastCE && currContCE <= lastContCE)) {*/
+ log_err("sequence of generated CEs is broken\n");
+ }
+ } else {
+ before = FALSE;
+ if(compareCEs(currCE, currContCE, lastCE, lastContCE) > 0) {
+ /*if(currCE < lastCE || (currCE == lastCE && currContCE <= lastContCE)) {*/
+ log_err("sequence of generated CEs is broken\n");
+ }
+ }
+ }
+ }
+
+ }
+
+ oldOffset = chOffset;
+ lastCE = currCE & 0xFFFFFF3F;
+ lastContCE = currContCE & 0xFFFFFFBF;
+ }
+ free(rulesCopy);
+ }
+ ucol_close(UCA);
+}
+
+#if 0
+/* these locales are now picked from index RB */
+static const char* localesToTest[] = {
+"ar", "bg", "ca", "cs", "da",
+"el", "en_BE", "en_US_POSIX",
+"es", "et", "fi", "fr", "hi",
+"hr", "hu", "is", "iw", "ja",
+"ko", "lt", "lv", "mk", "mt",
+"nb", "nn", "nn_NO", "pl", "ro",
+"ru", "sh", "sk", "sl", "sq",
+"sr", "sv", "th", "tr", "uk",
+"vi", "zh", "zh_TW"
+};
+#endif
+
+static const char* rulesToTest[] = {
+ /* Funky fa rule */
+ "&\\u0622 < \\u0627 << \\u0671 < \\u0621",
+ /*"& Z < p, P",*/
+ /* Cui Mins rules */
+ "&[top]<o,O<p,P<q,Q<'?'/u<r,R<u,U", /*"<o,O<p,P<q,Q<r,R<u,U & Qu<'?'",*/
+ "&[top]<o,O<p,P<q,Q;'?'/u<r,R<u,U", /*"<o,O<p,P<q,Q<r,R<u,U & Qu;'?'",*/
+ "&[top]<o,O<p,P<q,Q,'?'/u<r,R<u,U", /*"<o,O<p,P<q,Q<r,R<u,U&'Qu','?'",*/
+ "&[top]<3<4<5<c,C<f,F<m,M<o,O<p,P<q,Q;'?'/u<r,R<u,U", /*"<'?'<3<4<5<a,A<f,F<m,M<o,O<p,P<q,Q<r,R<u,U & Qu;'?'",*/
+ "&[top]<'?';Qu<3<4<5<c,C<f,F<m,M<o,O<p,P<q,Q<r,R<u,U", /*"<'?'<3<4<5<a,A<f,F<m,M<o,O<p,P<q,Q<r,R<u,U & '?';Qu",*/
+ "&[top]<3<4<5<c,C<f,F<m,M<o,O<p,P<q,Q;'?'/um<r,R<u,U", /*"<'?'<3<4<5<a,A<f,F<m,M<o,O<p,P<q,Q<r,R<u,U & Qum;'?'",*/
+ "&[top]<'?';Qum<3<4<5<c,C<f,F<m,M<o,O<p,P<q,Q<r,R<u,U" /*"<'?'<3<4<5<a,A<f,F<m,M<o,O<p,P<q,Q<r,R<u,U & '?';Qum"*/
+};
+
+
+static void TestCollations(void) {
+ int32_t noOfLoc = uloc_countAvailable();
+ int32_t i = 0, j = 0;
+
+ UErrorCode status = U_ZERO_ERROR;
+ char cName[256];
+ UChar name[256];
+ int32_t nameSize;
+
+
+ const char *locName = NULL;
+ UCollator *coll = NULL;
+ UCollator *UCA = ucol_open("", &status);
+ UColAttributeValue oldStrength = ucol_getAttribute(UCA, UCOL_STRENGTH, &status);
+ ucol_setAttribute(UCA, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
+
+ for(i = 0; i<noOfLoc; i++) {
+ status = U_ZERO_ERROR;
+ locName = uloc_getAvailable(i);
+ if(uprv_strcmp("ja", locName) == 0) {
+ log_verbose("Don't know how to test prefixes\n");
+ continue;
+ }
+ if(hasCollationElements(locName)) {
+ nameSize = uloc_getDisplayName(locName, NULL, name, 256, &status);
+ for(j = 0; j<nameSize; j++) {
+ cName[j] = (char)name[j];
+ }
+ cName[nameSize] = 0;
+ log_verbose("\nTesting locale %s (%s)\n", locName, cName);
+ coll = ucol_open(locName, &status);
+ if(U_SUCCESS(status)) {
+ testAgainstUCA(coll, UCA, "UCA", FALSE, &status);
+ ucol_close(coll);
+ } else {
+ log_err("Couldn't instantiate collator for locale %s, error: %s\n", locName, u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+ }
+ }
+ ucol_setAttribute(UCA, UCOL_STRENGTH, oldStrength, &status);
+ ucol_close(UCA);
+}
+
+static void RamsRulesTest(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i = 0;
+ UCollator *coll = NULL;
+ UChar rule[2048];
+ uint32_t ruleLen;
+ int32_t noOfLoc = uloc_countAvailable();
+ const char *locName = NULL;
+
+ log_verbose("RamsRulesTest\n");
+
+ for(i = 0; i<noOfLoc; i++) {
+ status = U_ZERO_ERROR;
+ locName = uloc_getAvailable(i);
+ if(hasCollationElements(locName)) {
+ if (uprv_strcmp("ja", locName)==0) {
+ log_verbose("Don't know how to test Japanese because of prefixes\n");
+ continue;
+ }
+ if (uprv_strcmp("de__PHONEBOOK", locName)==0) {
+ log_verbose("Don't know how to test Phonebook because the reset is on an expanding character\n");
+ continue;
+ }
+ if (uprv_strcmp("km", locName)==0 ||
+ uprv_strcmp("km_KH", locName)==0 ||
+ uprv_strcmp("zh", locName)==0 ||
+ uprv_strcmp("zh_Hant", locName)==0 ) {
+ continue; /* TODO: enable these locale tests after trac#6040 is fixed. */
+ }
+ log_verbose("Testing locale %s\n", locName);
+ coll = ucol_open(locName, &status);
+ if(U_SUCCESS(status)) {
+ if(coll->image->jamoSpecial == TRUE) {
+ log_err("%s has special JAMOs\n", locName);
+ }
+ ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_OFF, &status);
+ testCollator(coll, &status);
+ testCEs(coll, &status);
+ ucol_close(coll);
+ }
+ }
+ }
+
+ for(i = 0; i<sizeof(rulesToTest)/sizeof(rulesToTest[0]); i++) {
+ log_verbose("Testing rule: %s\n", rulesToTest[i]);
+ ruleLen = u_unescape(rulesToTest[i], rule, 2048);
+ coll = ucol_openRules(rule, ruleLen, UCOL_OFF, UCOL_TERTIARY, NULL,&status);
+ if(U_SUCCESS(status)) {
+ testCollator(coll, &status);
+ testCEs(coll, &status);
+ ucol_close(coll);
+ }
+ }
+
+}
+
+static void IsTailoredTest(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ uint32_t i = 0;
+ UCollator *coll = NULL;
+ UChar rule[2048];
+ UChar tailored[2048];
+ UChar notTailored[2048];
+ uint32_t ruleLen, tailoredLen, notTailoredLen;
+
+ log_verbose("IsTailoredTest\n");
+
+ u_uastrcpy(rule, "&Z < A, B, C;c < d");
+ ruleLen = u_strlen(rule);
+
+ u_uastrcpy(tailored, "ABCcd");
+ tailoredLen = u_strlen(tailored);
+
+ u_uastrcpy(notTailored, "ZabD");
+ notTailoredLen = u_strlen(notTailored);
+
+ coll = ucol_openRules(rule, ruleLen, UCOL_OFF, UCOL_TERTIARY, NULL,&status);
+ if(U_SUCCESS(status)) {
+ for(i = 0; i<tailoredLen; i++) {
+ if(!ucol_isTailored(coll, tailored[i], &status)) {
+ log_err("%i: %04X should be tailored - it is reported as not\n", i, tailored[i]);
+ }
+ }
+ for(i = 0; i<notTailoredLen; i++) {
+ if(ucol_isTailored(coll, notTailored[i], &status)) {
+ log_err("%i: %04X should not be tailored - it is reported as it is\n", i, notTailored[i]);
+ }
+ }
+ ucol_close(coll);
+ }
+ else {
+ log_err("Can't tailor rules");
+ }
+ /* Code coverage */
+ status = U_ZERO_ERROR;
+ coll = ucol_open("ja", &status);
+ if(!ucol_isTailored(coll, 0x4E9C, &status)) {
+ log_err("0x4E9C should be tailored - it is reported as not\n");
+ }
+ ucol_close(coll);
+}
+
+
+const static char chTest[][20] = {
+ "c",
+ "C",
+ "ca", "cb", "cx", "cy", "CZ",
+ "c\\u030C", "C\\u030C",
+ "h",
+ "H",
+ "ha", "Ha", "harly", "hb", "HB", "hx", "HX", "hy", "HY",
+ "ch", "cH", "Ch", "CH",
+ "cha", "charly", "che", "chh", "chch", "chr",
+ "i", "I", "iarly",
+ "r", "R",
+ "r\\u030C", "R\\u030C",
+ "s",
+ "S",
+ "s\\u030C", "S\\u030C",
+ "z", "Z",
+ "z\\u030C", "Z\\u030C"
+};
+
+static void TestChMove(void) {
+ UChar t1[256] = {0};
+ UChar t2[256] = {0};
+
+ uint32_t i = 0, j = 0;
+ uint32_t size = 0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ UCollator *coll = ucol_open("cs", &status);
+
+ if(U_SUCCESS(status)) {
+ size = sizeof(chTest)/sizeof(chTest[0]);
+ for(i = 0; i < size-1; i++) {
+ for(j = i+1; j < size; j++) {
+ u_unescape(chTest[i], t1, 256);
+ u_unescape(chTest[j], t2, 256);
+ doTest(coll, t1, t2, UCOL_LESS);
+ }
+ }
+ }
+ else {
+ log_err("Can't open collator");
+ }
+ ucol_close(coll);
+}
+
+
+
+
+const static char impTest[][20] = {
+ "\\u4e00",
+ "a",
+ "A",
+ "b",
+ "B",
+ "\\u4e01"
+};
+
+
+static void TestImplicitTailoring(void) {
+ static const struct {
+ const char *rules;
+ const char *data[10];
+ const uint32_t len;
+ } tests[] = {
+ { "&[before 1]\\u4e00 < b < c &[before 1]\\u4e00 < d < e", { "d", "e", "b", "c", "\\u4e00"}, 5 },
+ { "&\\u4e00 < a <<< A < b <<< B", { "\\u4e00", "a", "A", "b", "B", "\\u4e01"}, 6 },
+ { "&[before 1]\\u4e00 < \\u4e01 < \\u4e02", { "\\u4e01", "\\u4e02", "\\u4e00"}, 3},
+ { "&[before 1]\\u4e01 < \\u4e02 < \\u4e03", { "\\u4e02", "\\u4e03", "\\u4e01"}, 3}
+ };
+
+ int32_t i = 0;
+
+ for(i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
+ genericRulesStarter(tests[i].rules, tests[i].data, tests[i].len);
+ }
+
+/*
+ UChar t1[256] = {0};
+ UChar t2[256] = {0};
+
+ const char *rule = "&\\u4e00 < a <<< A < b <<< B";
+
+ uint32_t i = 0, j = 0;
+ uint32_t size = 0;
+ uint32_t ruleLen = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = NULL;
+ ruleLen = u_unescape(rule, t1, 256);
+
+ coll = ucol_openRules(t1, ruleLen, UCOL_OFF, UCOL_TERTIARY,NULL, &status);
+
+ if(U_SUCCESS(status)) {
+ size = sizeof(impTest)/sizeof(impTest[0]);
+ for(i = 0; i < size-1; i++) {
+ for(j = i+1; j < size; j++) {
+ u_unescape(impTest[i], t1, 256);
+ u_unescape(impTest[j], t2, 256);
+ doTest(coll, t1, t2, UCOL_LESS);
+ }
+ }
+ }
+ else {
+ log_err("Can't open collator");
+ }
+ ucol_close(coll);
+ */
+}
+
+static void TestFCDProblem(void) {
+ UChar t1[256] = {0};
+ UChar t2[256] = {0};
+
+ const char *s1 = "\\u0430\\u0306\\u0325";
+ const char *s2 = "\\u04D1\\u0325";
+
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("", &status);
+ u_unescape(s1, t1, 256);
+ u_unescape(s2, t2, 256);
+
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status);
+ doTest(coll, t1, t2, UCOL_EQUAL);
+
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ doTest(coll, t1, t2, UCOL_EQUAL);
+
+ ucol_close(coll);
+}
+
+#define NORM_BUFFER_TEST_LEN 32
+typedef struct {
+ UChar32 u;
+ UChar NFC[NORM_BUFFER_TEST_LEN];
+ UChar NFD[NORM_BUFFER_TEST_LEN];
+} tester;
+
+static void TestComposeDecompose(void) {
+ int32_t noOfLoc;
+ int32_t i = 0, j = 0;
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ const char *locName = NULL;
+
+ uint32_t nfcSize;
+ uint32_t nfdSize;
+ tester **t;
+ uint32_t noCases = 0;
+ UCollator *coll = NULL;
+ UChar32 u = 0;
+ UChar comp[NORM_BUFFER_TEST_LEN];
+ uint32_t len = 0;
+ UCollationElements *iter;
+
+ noOfLoc = uloc_countAvailable();
+
+ t = malloc(0x30000 * sizeof(tester *));
+ t[0] = (tester *)malloc(sizeof(tester));
+ log_verbose("Testing UCA extensively\n");
+ coll = ucol_open("", &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+
+
+ for(u = 0; u < 0x30000; u++) {
+ len = 0;
+ UTF_APPEND_CHAR_UNSAFE(comp, len, u);
+ nfcSize = unorm_normalize(comp, len, UNORM_NFC, 0, t[noCases]->NFC, NORM_BUFFER_TEST_LEN, &status);
+ nfdSize = unorm_normalize(comp, len, UNORM_NFD, 0, t[noCases]->NFD, NORM_BUFFER_TEST_LEN, &status);
+
+ if(nfcSize != nfdSize || (uprv_memcmp(t[noCases]->NFC, t[noCases]->NFD, nfcSize * sizeof(UChar)) != 0)
+ || (len != nfdSize || (uprv_memcmp(comp, t[noCases]->NFD, nfdSize * sizeof(UChar)) != 0))) {
+ t[noCases]->u = u;
+ if(len != nfdSize || (uprv_memcmp(comp, t[noCases]->NFD, nfdSize * sizeof(UChar)) != 0)) {
+ u_strncpy(t[noCases]->NFC, comp, len);
+ t[noCases]->NFC[len] = 0;
+ }
+ noCases++;
+ t[noCases] = (tester *)malloc(sizeof(tester));
+ uprv_memset(t[noCases], 0, sizeof(tester));
+ }
+ }
+
+ for(u=0; u<(UChar32)noCases; u++) {
+ if(!ucol_equal(coll, t[u]->NFC, -1, t[u]->NFD, -1)) {
+ log_err("Failure: codePoint %05X fails TestComposeDecompose in the UCA\n", t[u]->u);
+ doTest(coll, t[u]->NFC, t[u]->NFD, UCOL_EQUAL);
+ }
+ }
+ /*
+ for(u = 0; u < 0x30000; u++) {
+ if(!(u&0xFFFF)) {
+ log_verbose("%08X ", u);
+ }
+ uprv_memset(t[noCases], 0, sizeof(tester));
+ t[noCases]->u = u;
+ len = 0;
+ UTF_APPEND_CHAR_UNSAFE(comp, len, u);
+ comp[len] = 0;
+ nfcSize = unorm_normalize(comp, len, UNORM_NFC, 0, t[noCases]->NFC, NORM_BUFFER_TEST_LEN, &status);
+ nfdSize = unorm_normalize(comp, len, UNORM_NFD, 0, t[noCases]->NFD, NORM_BUFFER_TEST_LEN, &status);
+ doTest(coll, comp, t[noCases]->NFD, UCOL_EQUAL);
+ doTest(coll, comp, t[noCases]->NFC, UCOL_EQUAL);
+ }
+ */
+
+ ucol_close(coll);
+
+ log_verbose("Testing locales, number of cases = %i\n", noCases);
+ for(i = 0; i<noOfLoc; i++) {
+ status = U_ZERO_ERROR;
+ locName = uloc_getAvailable(i);
+ if(hasCollationElements(locName)) {
+ char cName[256];
+ UChar name[256];
+ int32_t nameSize = uloc_getDisplayName(locName, NULL, name, sizeof(cName), &status);
+
+ for(j = 0; j<nameSize; j++) {
+ cName[j] = (char)name[j];
+ }
+ cName[nameSize] = 0;
+ log_verbose("\nTesting locale %s (%s)\n", locName, cName);
+
+ coll = ucol_open(locName, &status);
+ ucol_setStrength(coll, UCOL_IDENTICAL);
+ iter = ucol_openElements(coll, t[u]->NFD, u_strlen(t[u]->NFD), &status);
+
+ for(u=0; u<(UChar32)noCases; u++) {
+ if(!ucol_equal(coll, t[u]->NFC, -1, t[u]->NFD, -1)) {
+ log_err("Failure: codePoint %05X fails TestComposeDecompose for locale %s\n", t[u]->u, cName);
+ doTest(coll, t[u]->NFC, t[u]->NFD, UCOL_EQUAL);
+ log_verbose("Testing NFC\n");
+ ucol_setText(iter, t[u]->NFC, u_strlen(t[u]->NFC), &status);
+ backAndForth(iter);
+ log_verbose("Testing NFD\n");
+ ucol_setText(iter, t[u]->NFD, u_strlen(t[u]->NFD), &status);
+ backAndForth(iter);
+ }
+ }
+ ucol_closeElements(iter);
+ ucol_close(coll);
+ }
+ }
+ for(u = 0; u <= (UChar32)noCases; u++) {
+ free(t[u]);
+ }
+ free(t);
+}
+
+static void TestEmptyRule(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rulez[] = { 0 };
+ UCollator *coll = ucol_openRules(rulez, 0, UCOL_OFF, UCOL_TERTIARY,NULL, &status);
+
+ ucol_close(coll);
+}
+
+static void TestUCARules(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar b[256];
+ UChar *rules = b;
+ uint32_t ruleLen = 0;
+ UCollator *UCAfromRules = NULL;
+ UCollator *coll = ucol_open("", &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+ ruleLen = ucol_getRulesEx(coll, UCOL_FULL_RULES, rules, 256);
+
+ log_verbose("TestUCARules\n");
+ if(ruleLen > 256) {
+ rules = (UChar *)malloc((ruleLen+1)*sizeof(UChar));
+ ruleLen = ucol_getRulesEx(coll, UCOL_FULL_RULES, rules, ruleLen);
+ }
+ log_verbose("Rules length is %d\n", ruleLen);
+ UCAfromRules = ucol_openRules(rules, ruleLen, UCOL_OFF, UCOL_TERTIARY, NULL,&status);
+ if(U_SUCCESS(status)) {
+ ucol_close(UCAfromRules);
+ } else {
+ log_verbose("Unable to create a collator from UCARules!\n");
+ }
+/*
+ u_unescape(blah, b, 256);
+ ucol_getSortKey(coll, b, 1, res, 256);
+*/
+ ucol_close(coll);
+ if(rules != b) {
+ free(rules);
+ }
+}
+
+
+/* Pinyin tonal order */
+/*
+ A < .. (\u0101) < .. (\u00e1) < .. (\u01ce) < .. (\u00e0)
+ (w/macron)< (w/acute)< (w/caron)< (w/grave)
+ E < .. (\u0113) < .. (\u00e9) < .. (\u011b) < .. (\u00e8)
+ I < .. (\u012b) < .. (\u00ed) < .. (\u01d0) < .. (\u00ec)
+ O < .. (\u014d) < .. (\u00f3) < .. (\u01d2) < .. (\u00f2)
+ U < .. (\u016b) < .. (\u00fa) < .. (\u01d4) < .. (\u00f9)
+ < .. (\u01d6) < .. (\u01d8) < .. (\u01da) < .. (\u01dc) <
+.. (\u00fc)
+
+However, in testing we got the following order:
+ A < .. (\u00e1) < .. (\u00e0) < .. (\u01ce) < .. (\u0101)
+ (w/acute)< (w/grave)< (w/caron)< (w/macron)
+ E < .. (\u00e9) < .. (\u00e8) < .. (\u00ea) < .. (\u011b) <
+.. (\u0113)
+ I < .. (\u00ed) < .. (\u00ec) < .. (\u01d0) < .. (\u012b)
+ O < .. (\u00f3) < .. (\u00f2) < .. (\u01d2) < .. (\u014d)
+ U < .. (\u00fa) < .. (\u00f9) < .. (\u01d4) < .. (\u00fc) <
+.. (\u01d8)
+ < .. (\u01dc) < .. (\u01da) < .. (\u01d6) < .. (\u016b)
+*/
+
+static void TestBefore(void) {
+ const static char *data[] = {
+ "\\u0101", "\\u00e1", "\\u01ce", "\\u00e0", "A",
+ "\\u0113", "\\u00e9", "\\u011b", "\\u00e8", "E",
+ "\\u012b", "\\u00ed", "\\u01d0", "\\u00ec", "I",
+ "\\u014d", "\\u00f3", "\\u01d2", "\\u00f2", "O",
+ "\\u016b", "\\u00fa", "\\u01d4", "\\u00f9", "U",
+ "\\u01d6", "\\u01d8", "\\u01da", "\\u01dc", "\\u00fc"
+ };
+ genericRulesStarter(
+ "&[before 1]a<\\u0101<\\u00e1<\\u01ce<\\u00e0"
+ "&[before 1]e<\\u0113<\\u00e9<\\u011b<\\u00e8"
+ "&[before 1]i<\\u012b<\\u00ed<\\u01d0<\\u00ec"
+ "&[before 1]o<\\u014d<\\u00f3<\\u01d2<\\u00f2"
+ "&[before 1]u<\\u016b<\\u00fa<\\u01d4<\\u00f9"
+ "&u<\\u01d6<\\u01d8<\\u01da<\\u01dc<\\u00fc",
+ data, sizeof(data)/sizeof(data[0]));
+}
+
+#if 0
+/* superceded by TestBeforePinyin */
+static void TestJ784(void) {
+ const static char *data[] = {
+ "A", "\\u0101", "\\u00e1", "\\u01ce", "\\u00e0",
+ "E", "\\u0113", "\\u00e9", "\\u011b", "\\u00e8",
+ "I", "\\u012b", "\\u00ed", "\\u01d0", "\\u00ec",
+ "O", "\\u014d", "\\u00f3", "\\u01d2", "\\u00f2",
+ "U", "\\u016b", "\\u00fa", "\\u01d4", "\\u00f9",
+ "\\u00fc",
+ "\\u01d6", "\\u01d8", "\\u01da", "\\u01dc"
+ };
+ genericLocaleStarter("zh", data, sizeof(data)/sizeof(data[0]));
+}
+#endif
+
+#if 0
+/* superceded by the changes to the lv locale */
+static void TestJ831(void) {
+ const static char *data[] = {
+ "I",
+ "i",
+ "Y",
+ "y"
+ };
+ genericLocaleStarter("lv", data, sizeof(data)/sizeof(data[0]));
+}
+#endif
+
+static void TestJ815(void) {
+ const static char *data[] = {
+ "aa",
+ "Aa",
+ "ab",
+ "Ab",
+ "ad",
+ "Ad",
+ "ae",
+ "Ae",
+ "\\u00e6",
+ "\\u00c6",
+ "af",
+ "Af",
+ "b",
+ "B"
+ };
+ genericLocaleStarter("fr", data, sizeof(data)/sizeof(data[0]));
+ genericRulesStarter("[backwards 2]&A<<\\u00e6/e<<<\\u00c6/E", data, sizeof(data)/sizeof(data[0]));
+}
+
+
+/*
+"& a < b < c < d& r < c", "& a < b < d& r < c",
+"& a < b < c < d& c < m", "& a < b < c < m < d",
+"& a < b < c < d& a < m", "& a < m < b < c < d",
+"& a <<< b << c < d& a < m", "& a <<< b << c < m < d",
+"& a < b < c < d& [before 1] c < m", "& a < b < m < c < d",
+"& a < b <<< c << d <<< e& [before 3] e <<< x", "& a < b <<< c << d <<< x <<< e",
+"& a < b <<< c << d <<< e& [before 2] e <<< x", "& a < b <<< c <<< x << d <<< e",
+"& a < b <<< c << d <<< e& [before 1] e <<< x", "& a <<< x < b <<< c << d <<< e",
+"& a < b <<< c << d <<< e <<< f < g& [before 1] g < x", "& a < b <<< c << d <<< e <<< f < x < g",
+*/
+static void TestRedundantRules(void) {
+ int32_t i;
+
+ static const struct {
+ const char *rules;
+ const char *expectedRules;
+ const char *testdata[8];
+ uint32_t testdatalen;
+ } tests[] = {
+ /* this test conflicts with positioning of CODAN placeholder */
+ /*{
+ "& a <<< b <<< c << d <<< e& [before 1] e <<< x",
+ "&\\u2089<<<x",
+ {"\\u2089", "x"}, 2
+ }, */
+ /* this test conflicts with the [before x] syntax tightening */
+ /*{
+ "& b <<< c <<< d << e <<< f& [before 1] f <<< x",
+ "&\\u0252<<<x",
+ {"\\u0252", "x"}, 2
+ }, */
+ /* this test conflicts with the [before x] syntax tightening */
+ /*{
+ "& a < b <<< c << d <<< e& [before 1] e <<< x",
+ "& a <<< x < b <<< c << d <<< e",
+ {"a", "x", "b", "c", "d", "e"}, 6
+ }, */
+ {
+ "& a < b < c < d& [before 1] c < m",
+ "& a < b < m < c < d",
+ {"a", "b", "m", "c", "d"}, 5
+ },
+ {
+ "& a < b <<< c << d <<< e& [before 3] e <<< x",
+ "& a < b <<< c << d <<< x <<< e",
+ {"a", "b", "c", "d", "x", "e"}, 6
+ },
+ /* this test conflicts with the [before x] syntax tightening */
+ /* {
+ "& a < b <<< c << d <<< e& [before 2] e <<< x",
+ "& a < b <<< c <<< x << d <<< e",
+ {"a", "b", "c", "x", "d", "e"},, 6
+ }, */
+ {
+ "& a < b <<< c << d <<< e <<< f < g& [before 1] g < x",
+ "& a < b <<< c << d <<< e <<< f < x < g",
+ {"a", "b", "c", "d", "e", "f", "x", "g"}, 8
+ },
+ {
+ "& a <<< b << c < d& a < m",
+ "& a <<< b << c < m < d",
+ {"a", "b", "c", "m", "d"}, 5
+ },
+ {
+ "&a<b<<b\\u0301 &z<b",
+ "&a<b\\u0301 &z<b",
+ {"a", "b\\u0301", "z", "b"}, 4
+ },
+ {
+ "&z<m<<<q<<<m",
+ "&z<q<<<m",
+ {"z", "q", "m"},3
+ },
+ {
+ "&z<<<m<q<<<m",
+ "&z<q<<<m",
+ {"z", "q", "m"}, 3
+ },
+ {
+ "& a < b < c < d& r < c",
+ "& a < b < d& r < c",
+ {"a", "b", "d"}, 3
+ },
+ {
+ "& a < b < c < d& r < c",
+ "& a < b < d& r < c",
+ {"r", "c"}, 2
+ },
+ {
+ "& a < b < c < d& c < m",
+ "& a < b < c < m < d",
+ {"a", "b", "c", "m", "d"}, 5
+ },
+ {
+ "& a < b < c < d& a < m",
+ "& a < m < b < c < d",
+ {"a", "m", "b", "c", "d"}, 5
+ }
+ };
+
+
+ UCollator *credundant = NULL;
+ UCollator *cresulting = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rlz[2048] = { 0 };
+ uint32_t rlen = 0;
+
+ for(i = 0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ log_verbose("testing rule %s, expected to be %s\n", tests[i].rules, tests[i].expectedRules);
+ rlen = u_unescape(tests[i].rules, rlz, 2048);
+
+ credundant = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT, NULL,&status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+
+ rlen = u_unescape(tests[i].expectedRules, rlz, 2048);
+ cresulting = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT, NULL,&status);
+
+ testAgainstUCA(cresulting, credundant, "expected", TRUE, &status);
+
+ ucol_close(credundant);
+ ucol_close(cresulting);
+
+ log_verbose("testing using data\n");
+
+ genericRulesStarter(tests[i].rules, tests[i].testdata, tests[i].testdatalen);
+ }
+
+}
+
+static void TestExpansionSyntax(void) {
+ int32_t i;
+
+ const static char *rules[] = {
+ "&AE <<< a << b <<< c &d <<< f",
+ "&AE <<< a <<< b << c << d < e < f <<< g",
+ "&AE <<< B <<< C / D <<< F"
+ };
+
+ const static char *expectedRules[] = {
+ "&A <<< a / E << b / E <<< c /E &d <<< f",
+ "&A <<< a / E <<< b / E << c / E << d / E < e < f <<< g",
+ "&A <<< B / E <<< C / ED <<< F / E"
+ };
+
+ const static char *testdata[][8] = {
+ {"AE", "a", "b", "c"},
+ {"AE", "a", "b", "c", "d", "e", "f", "g"},
+ {"AE", "B", "C"} /* / ED <<< F / E"},*/
+ };
+
+ const static uint32_t testdatalen[] = {
+ 4,
+ 8,
+ 3
+ };
+
+
+
+ UCollator *credundant = NULL;
+ UCollator *cresulting = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rlz[2048] = { 0 };
+ uint32_t rlen = 0;
+
+ for(i = 0; i<sizeof(rules)/sizeof(rules[0]); i++) {
+ log_verbose("testing rule %s, expected to be %s\n", rules[i], expectedRules[i]);
+ rlen = u_unescape(rules[i], rlz, 2048);
+
+ credundant = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+ rlen = u_unescape(expectedRules[i], rlz, 2048);
+ cresulting = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT, NULL,&status);
+
+ /* testAgainstUCA still doesn't handle expansions correctly, so this is not run */
+ /* as a hard error test, but only in information mode */
+ testAgainstUCA(cresulting, credundant, "expected", FALSE, &status);
+
+ ucol_close(credundant);
+ ucol_close(cresulting);
+
+ log_verbose("testing using data\n");
+
+ genericRulesStarter(rules[i], testdata[i], testdatalen[i]);
+ }
+}
+
+static void TestCase(void)
+{
+ const static UChar gRules[MAX_TOKEN_LEN] =
+ /*" & 0 < 1,\u2461<a,A"*/
+ { 0x0026, 0x0030, 0x003C, 0x0031, 0x002C, 0x2460, 0x003C, 0x0061, 0x002C, 0x0041, 0x0000 };
+
+ const static UChar testCase[][MAX_TOKEN_LEN] =
+ {
+ /*0*/ {0x0031 /*'1'*/, 0x0061/*'a'*/, 0x0000},
+ /*1*/ {0x0031 /*'1'*/, 0x0041/*'A'*/, 0x0000},
+ /*2*/ {0x2460 /*circ'1'*/, 0x0061/*'a'*/, 0x0000},
+ /*3*/ {0x2460 /*circ'1'*/, 0x0041/*'A'*/, 0x0000}
+ };
+
+ const static UCollationResult caseTestResults[][9] =
+ {
+ { UCOL_LESS, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_LESS },
+ { UCOL_GREATER, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_GREATER },
+ { UCOL_LESS, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_GREATER, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_LESS },
+ { UCOL_GREATER, UCOL_LESS, UCOL_GREATER, UCOL_EQUAL, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_GREATER }
+ };
+
+ const static UColAttributeValue caseTestAttributes[][2] =
+ {
+ { UCOL_LOWER_FIRST, UCOL_OFF},
+ { UCOL_UPPER_FIRST, UCOL_OFF},
+ { UCOL_LOWER_FIRST, UCOL_ON},
+ { UCOL_UPPER_FIRST, UCOL_ON}
+ };
+ int32_t i,j,k;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollationElements *iter;
+ UCollator *myCollation;
+ myCollation = ucol_open("en_US", &status);
+
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing different case settings\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+
+ for(k = 0; k<4; k++) {
+ ucol_setAttribute(myCollation, UCOL_CASE_FIRST, caseTestAttributes[k][0], &status);
+ ucol_setAttribute(myCollation, UCOL_CASE_LEVEL, caseTestAttributes[k][1], &status);
+ log_verbose("Case first = %d, Case level = %d\n", caseTestAttributes[k][0], caseTestAttributes[k][1]);
+ for (i = 0; i < 3 ; i++) {
+ for(j = i+1; j<4; j++) {
+ doTest(myCollation, testCase[i], testCase[j], caseTestResults[k][3*i+j-1]);
+ }
+ }
+ }
+ ucol_close(myCollation);
+
+ myCollation = ucol_openRules(gRules, u_strlen(gRules), UCOL_OFF, UCOL_TERTIARY,NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing different case settings with custom rules\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+
+ for(k = 0; k<4; k++) {
+ ucol_setAttribute(myCollation, UCOL_CASE_FIRST, caseTestAttributes[k][0], &status);
+ ucol_setAttribute(myCollation, UCOL_CASE_LEVEL, caseTestAttributes[k][1], &status);
+ for (i = 0; i < 3 ; i++) {
+ for(j = i+1; j<4; j++) {
+ log_verbose("k:%d, i:%d, j:%d\n", k, i, j);
+ doTest(myCollation, testCase[i], testCase[j], caseTestResults[k][3*i+j-1]);
+ iter=ucol_openElements(myCollation, testCase[i], u_strlen(testCase[i]), &status);
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ iter=ucol_openElements(myCollation, testCase[j], u_strlen(testCase[j]), &status);
+ backAndForth(iter);
+ ucol_closeElements(iter);
+ }
+ }
+ }
+ ucol_close(myCollation);
+ {
+ const static char *lowerFirst[] = {
+ "h",
+ "H",
+ "ch",
+ "Ch",
+ "CH",
+ "cha",
+ "chA",
+ "Cha",
+ "ChA",
+ "CHa",
+ "CHA",
+ "i",
+ "I"
+ };
+
+ const static char *upperFirst[] = {
+ "H",
+ "h",
+ "CH",
+ "Ch",
+ "ch",
+ "CHA",
+ "CHa",
+ "ChA",
+ "Cha",
+ "chA",
+ "cha",
+ "I",
+ "i"
+ };
+ log_verbose("mixed case test\n");
+ log_verbose("lower first, case level off\n");
+ genericRulesStarter("[casefirst lower]&H<ch<<<Ch<<<CH", lowerFirst, sizeof(lowerFirst)/sizeof(lowerFirst[0]));
+ log_verbose("upper first, case level off\n");
+ genericRulesStarter("[casefirst upper]&H<ch<<<Ch<<<CH", upperFirst, sizeof(upperFirst)/sizeof(upperFirst[0]));
+ log_verbose("lower first, case level on\n");
+ genericRulesStarter("[casefirst lower][caselevel on]&H<ch<<<Ch<<<CH", lowerFirst, sizeof(lowerFirst)/sizeof(lowerFirst[0]));
+ log_verbose("upper first, case level on\n");
+ genericRulesStarter("[casefirst upper][caselevel on]&H<ch<<<Ch<<<CH", upperFirst, sizeof(upperFirst)/sizeof(upperFirst[0]));
+ }
+
+}
+
+static void TestIncrementalNormalize(void) {
+
+ /*UChar baseA =0x61;*/
+ UChar baseA =0x41;
+/* UChar baseB = 0x42;*/
+ static const UChar ccMix[] = {0x316, 0x321, 0x300};
+ /*UChar ccMix[] = {0x61, 0x61, 0x61};*/
+ /*
+ 0x316 is combining grave accent below, cc=220
+ 0x321 is combining palatalized hook below, cc=202
+ 0x300 is combining grave accent, cc=230
+ */
+
+ int maxSLen = 2000;
+ /*int maxSLen = 64000;*/
+ int sLen;
+ int i;
+
+ UCollator *coll;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollationResult result;
+
+ int32_t myQ = QUICK;
+
+ if(QUICK < 0) {
+ QUICK = 1;
+ }
+
+ {
+ /* Test 1. Run very long unnormalized strings, to force overflow of*/
+ /* most buffers along the way.*/
+ UChar *strA;
+ UChar *strB;
+
+ strA = malloc((maxSLen+1) * sizeof(UChar));
+ strB = malloc((maxSLen+1) * sizeof(UChar));
+
+ coll = ucol_open("en_US", &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+
+ /*for (sLen = 257; sLen<maxSLen; sLen++) {*/
+ /*for (sLen = 4; sLen<maxSLen; sLen++) {*/
+ /*for (sLen = 1000; sLen<1001; sLen++) {*/
+ for (sLen = 500; sLen<501; sLen++) {
+ /*for (sLen = 40000; sLen<65000; sLen+=1000) {*/
+ strA[0] = baseA;
+ strB[0] = baseA;
+ for (i=1; i<=sLen-1; i++) {
+ strA[i] = ccMix[i % 3];
+ strB[sLen-i] = ccMix[i % 3];
+ }
+ strA[sLen] = 0;
+ strB[sLen] = 0;
+
+ ucol_setStrength(coll, UCOL_TERTIARY); /* Do test with default strength, which runs*/
+ doTest(coll, strA, strB, UCOL_EQUAL); /* optimized functions in the impl*/
+ ucol_setStrength(coll, UCOL_IDENTICAL); /* Do again with the slow, general impl.*/
+ doTest(coll, strA, strB, UCOL_EQUAL);
+ }
+ free(strA);
+ free(strB);
+ }
+
+ QUICK = myQ;
+
+
+ /* Test 2: Non-normal sequence in a string that extends to the last character*/
+ /* of the string. Checks a couple of edge cases.*/
+
+ {
+ static const UChar strA[] = {0x41, 0x41, 0x300, 0x316, 0};
+ static const UChar strB[] = {0x41, 0xc0, 0x316, 0};
+ ucol_setStrength(coll, UCOL_TERTIARY);
+ doTest(coll, strA, strB, UCOL_EQUAL);
+ }
+
+ /* Test 3: Non-normal sequence is terminated by a surrogate pair.*/
+
+ {
+ /* New UCA 3.1.1.
+ * test below used a code point from Desseret, which sorts differently
+ * than d800 dc00
+ */
+ /*UChar strA[] = {0x41, 0x41, 0x300, 0x316, 0xD801, 0xDC00, 0};*/
+ static const UChar strA[] = {0x41, 0x41, 0x300, 0x316, 0xD800, 0xDC01, 0};
+ static const UChar strB[] = {0x41, 0xc0, 0x316, 0xD800, 0xDC00, 0};
+ ucol_setStrength(coll, UCOL_TERTIARY);
+ doTest(coll, strA, strB, UCOL_GREATER);
+ }
+
+ /* Test 4: Imbedded nulls do not terminate a string when length is specified.*/
+
+ {
+ static const UChar strA[] = {0x41, 0x00, 0x42, 0x00};
+ static const UChar strB[] = {0x41, 0x00, 0x00, 0x00};
+ char sortKeyA[50];
+ char sortKeyAz[50];
+ char sortKeyB[50];
+ char sortKeyBz[50];
+ int r;
+
+ /* there used to be -3 here. Hmmmm.... */
+ /*result = ucol_strcoll(coll, strA, -3, strB, -3);*/
+ result = ucol_strcoll(coll, strA, 3, strB, 3);
+ if (result != UCOL_GREATER) {
+ log_err("ERROR 1 in test 4\n");
+ }
+ result = ucol_strcoll(coll, strA, -1, strB, -1);
+ if (result != UCOL_EQUAL) {
+ log_err("ERROR 2 in test 4\n");
+ }
+
+ ucol_getSortKey(coll, strA, 3, (uint8_t *)sortKeyA, sizeof(sortKeyA));
+ ucol_getSortKey(coll, strA, -1, (uint8_t *)sortKeyAz, sizeof(sortKeyAz));
+ ucol_getSortKey(coll, strB, 3, (uint8_t *)sortKeyB, sizeof(sortKeyB));
+ ucol_getSortKey(coll, strB, -1, (uint8_t *)sortKeyBz, sizeof(sortKeyBz));
+
+ r = strcmp(sortKeyA, sortKeyAz);
+ if (r <= 0) {
+ log_err("Error 3 in test 4\n");
+ }
+ r = strcmp(sortKeyA, sortKeyB);
+ if (r <= 0) {
+ log_err("Error 4 in test 4\n");
+ }
+ r = strcmp(sortKeyAz, sortKeyBz);
+ if (r != 0) {
+ log_err("Error 5 in test 4\n");
+ }
+
+ ucol_setStrength(coll, UCOL_IDENTICAL);
+ ucol_getSortKey(coll, strA, 3, (uint8_t *)sortKeyA, sizeof(sortKeyA));
+ ucol_getSortKey(coll, strA, -1, (uint8_t *)sortKeyAz, sizeof(sortKeyAz));
+ ucol_getSortKey(coll, strB, 3, (uint8_t *)sortKeyB, sizeof(sortKeyB));
+ ucol_getSortKey(coll, strB, -1, (uint8_t *)sortKeyBz, sizeof(sortKeyBz));
+
+ r = strcmp(sortKeyA, sortKeyAz);
+ if (r <= 0) {
+ log_err("Error 6 in test 4\n");
+ }
+ r = strcmp(sortKeyA, sortKeyB);
+ if (r <= 0) {
+ log_err("Error 7 in test 4\n");
+ }
+ r = strcmp(sortKeyAz, sortKeyBz);
+ if (r != 0) {
+ log_err("Error 8 in test 4\n");
+ }
+ ucol_setStrength(coll, UCOL_TERTIARY);
+ }
+
+
+ /* Test 5: Null characters in non-normal source strings.*/
+
+ {
+ static const UChar strA[] = {0x41, 0x41, 0x300, 0x316, 0x00, 0x42, 0x00};
+ static const UChar strB[] = {0x41, 0x41, 0x300, 0x316, 0x00, 0x00, 0x00};
+ char sortKeyA[50];
+ char sortKeyAz[50];
+ char sortKeyB[50];
+ char sortKeyBz[50];
+ int r;
+
+ result = ucol_strcoll(coll, strA, 6, strB, 6);
+ if (result != UCOL_GREATER) {
+ log_err("ERROR 1 in test 5\n");
+ }
+ result = ucol_strcoll(coll, strA, -1, strB, -1);
+ if (result != UCOL_EQUAL) {
+ log_err("ERROR 2 in test 5\n");
+ }
+
+ ucol_getSortKey(coll, strA, 6, (uint8_t *)sortKeyA, sizeof(sortKeyA));
+ ucol_getSortKey(coll, strA, -1, (uint8_t *)sortKeyAz, sizeof(sortKeyAz));
+ ucol_getSortKey(coll, strB, 6, (uint8_t *)sortKeyB, sizeof(sortKeyB));
+ ucol_getSortKey(coll, strB, -1, (uint8_t *)sortKeyBz, sizeof(sortKeyBz));
+
+ r = strcmp(sortKeyA, sortKeyAz);
+ if (r <= 0) {
+ log_err("Error 3 in test 5\n");
+ }
+ r = strcmp(sortKeyA, sortKeyB);
+ if (r <= 0) {
+ log_err("Error 4 in test 5\n");
+ }
+ r = strcmp(sortKeyAz, sortKeyBz);
+ if (r != 0) {
+ log_err("Error 5 in test 5\n");
+ }
+
+ ucol_setStrength(coll, UCOL_IDENTICAL);
+ ucol_getSortKey(coll, strA, 6, (uint8_t *)sortKeyA, sizeof(sortKeyA));
+ ucol_getSortKey(coll, strA, -1, (uint8_t *)sortKeyAz, sizeof(sortKeyAz));
+ ucol_getSortKey(coll, strB, 6, (uint8_t *)sortKeyB, sizeof(sortKeyB));
+ ucol_getSortKey(coll, strB, -1, (uint8_t *)sortKeyBz, sizeof(sortKeyBz));
+
+ r = strcmp(sortKeyA, sortKeyAz);
+ if (r <= 0) {
+ log_err("Error 6 in test 5\n");
+ }
+ r = strcmp(sortKeyA, sortKeyB);
+ if (r <= 0) {
+ log_err("Error 7 in test 5\n");
+ }
+ r = strcmp(sortKeyAz, sortKeyBz);
+ if (r != 0) {
+ log_err("Error 8 in test 5\n");
+ }
+ ucol_setStrength(coll, UCOL_TERTIARY);
+ }
+
+
+ /* Test 6: Null character as base of a non-normal combining sequence.*/
+
+ {
+ static const UChar strA[] = {0x41, 0x0, 0x300, 0x316, 0x41, 0x302, 0x00};
+ static const UChar strB[] = {0x41, 0x0, 0x302, 0x316, 0x41, 0x300, 0x00};
+
+ result = ucol_strcoll(coll, strA, 5, strB, 5);
+ if (result != UCOL_LESS) {
+ log_err("Error 1 in test 6\n");
+ }
+ result = ucol_strcoll(coll, strA, -1, strB, -1);
+ if (result != UCOL_EQUAL) {
+ log_err("Error 2 in test 6\n");
+ }
+ }
+
+ ucol_close(coll);
+}
+
+
+
+#if 0
+static void TestGetCaseBit(void) {
+ static const char *caseBitData[] = {
+ "a", "A", "ch", "Ch", "CH",
+ "\\uFF9E", "\\u0009"
+ };
+
+ static const uint8_t results[] = {
+ UCOL_LOWER_CASE, UCOL_UPPER_CASE, UCOL_LOWER_CASE, UCOL_MIXED_CASE, UCOL_UPPER_CASE,
+ UCOL_UPPER_CASE, UCOL_LOWER_CASE
+ };
+
+ uint32_t i, blen = 0;
+ UChar b[256] = {0};
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *UCA = ucol_open("", &status);
+ uint8_t res = 0;
+
+ for(i = 0; i<sizeof(results)/sizeof(results[0]); i++) {
+ blen = u_unescape(caseBitData[i], b, 256);
+ res = ucol_uprv_getCaseBits(UCA, b, blen, &status);
+ if(results[i] != res) {
+ log_err("Expected case = %02X, got %02X for %04X\n", results[i], res, b[0]);
+ }
+ }
+}
+#endif
+
+static void TestHangulTailoring(void) {
+ static const char *koreanData[] = {
+ "\\uac00", "\\u4f3d", "\\u4f73", "\\u5047", "\\u50f9", "\\u52a0", "\\u53ef", "\\u5475",
+ "\\u54e5", "\\u5609", "\\u5ac1", "\\u5bb6", "\\u6687", "\\u67b6", "\\u67b7", "\\u67ef",
+ "\\u6b4c", "\\u73c2", "\\u75c2", "\\u7a3c", "\\u82db", "\\u8304", "\\u8857", "\\u8888",
+ "\\u8a36", "\\u8cc8", "\\u8dcf", "\\u8efb", "\\u8fe6", "\\u99d5",
+ "\\u4EEE", "\\u50A2", "\\u5496", "\\u54FF", "\\u5777", "\\u5B8A", "\\u659D", "\\u698E",
+ "\\u6A9F", "\\u73C8", "\\u7B33", "\\u801E", "\\u8238", "\\u846D", "\\u8B0C"
+ };
+
+ const char *rules =
+ "&\\uac00 <<< \\u4f3d <<< \\u4f73 <<< \\u5047 <<< \\u50f9 <<< \\u52a0 <<< \\u53ef <<< \\u5475 "
+ "<<< \\u54e5 <<< \\u5609 <<< \\u5ac1 <<< \\u5bb6 <<< \\u6687 <<< \\u67b6 <<< \\u67b7 <<< \\u67ef "
+ "<<< \\u6b4c <<< \\u73c2 <<< \\u75c2 <<< \\u7a3c <<< \\u82db <<< \\u8304 <<< \\u8857 <<< \\u8888 "
+ "<<< \\u8a36 <<< \\u8cc8 <<< \\u8dcf <<< \\u8efb <<< \\u8fe6 <<< \\u99d5 "
+ "<<< \\u4EEE <<< \\u50A2 <<< \\u5496 <<< \\u54FF <<< \\u5777 <<< \\u5B8A <<< \\u659D <<< \\u698E "
+ "<<< \\u6A9F <<< \\u73C8 <<< \\u7B33 <<< \\u801E <<< \\u8238 <<< \\u846D <<< \\u8B0C";
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rlz[2048] = { 0 };
+ uint32_t rlen = u_unescape(rules, rlz, 2048);
+
+ UCollator *coll = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT,NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+
+ log_verbose("Using start of korean rules\n");
+
+ if(U_SUCCESS(status)) {
+ genericOrderingTest(coll, koreanData, sizeof(koreanData)/sizeof(koreanData[0]));
+ } else {
+ log_err("Unable to open collator with rules %s\n", rules);
+ }
+
+ log_verbose("Setting jamoSpecial to TRUE and testing once more\n");
+ ((UCATableHeader *)coll->image)->jamoSpecial = TRUE; /* don't try this at home */
+ genericOrderingTest(coll, koreanData, sizeof(koreanData)/sizeof(koreanData[0]));
+
+ ucol_close(coll);
+
+ log_verbose("Using ko__LOTUS locale\n");
+ genericLocaleStarter("ko__LOTUS", koreanData, sizeof(koreanData)/sizeof(koreanData[0]));
+}
+
+static void TestCompressOverlap(void) {
+ UChar secstr[150];
+ UChar tertstr[150];
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll;
+ char result[200];
+ uint32_t resultlen;
+ int count = 0;
+ char *tempptr;
+
+ coll = ucol_open("", &status);
+
+ if (U_FAILURE(status)) {
+ log_err("Collator can't be created\n");
+ return;
+ }
+ while (count < 149) {
+ secstr[count] = 0x0020; /* [06, 05, 05] */
+ tertstr[count] = 0x0020;
+ count ++;
+ }
+
+ /* top down compression ----------------------------------- */
+ secstr[count] = 0x0332; /* [, 87, 05] */
+ tertstr[count] = 0x3000; /* [06, 05, 07] */
+
+ /* no compression secstr should have 150 secondary bytes, tertstr should
+ have 150 tertiary bytes.
+ with correct overlapping compression, secstr should have 4 secondary
+ bytes, tertstr should have > 2 tertiary bytes */
+ resultlen = ucol_getSortKey(coll, secstr, 150, (uint8_t *)result, 250);
+ tempptr = uprv_strchr(result, 1) + 1;
+ while (*(tempptr + 1) != 1) {
+ /* the last secondary collation element is not checked since it is not
+ part of the compression */
+ if (*tempptr < UCOL_COMMON_TOP2 - UCOL_TOP_COUNT2) {
+ log_err("Secondary compression overlapped\n");
+ }
+ tempptr ++;
+ }
+
+ /* tertiary top/bottom/common for en_US is similar to the secondary
+ top/bottom/common */
+ resultlen = ucol_getSortKey(coll, tertstr, 150, (uint8_t *)result, 250);
+ tempptr = uprv_strrchr(result, 1) + 1;
+ while (*(tempptr + 1) != 0) {
+ /* the last secondary collation element is not checked since it is not
+ part of the compression */
+ if (*tempptr < coll->tertiaryTop - coll->tertiaryTopCount) {
+ log_err("Tertiary compression overlapped\n");
+ }
+ tempptr ++;
+ }
+
+ /* bottom up compression ------------------------------------- */
+ secstr[count] = 0;
+ tertstr[count] = 0;
+ resultlen = ucol_getSortKey(coll, secstr, 150, (uint8_t *)result, 250);
+ tempptr = uprv_strchr(result, 1) + 1;
+ while (*(tempptr + 1) != 1) {
+ /* the last secondary collation element is not checked since it is not
+ part of the compression */
+ if (*tempptr > UCOL_COMMON_BOT2 + UCOL_BOT_COUNT2) {
+ log_err("Secondary compression overlapped\n");
+ }
+ tempptr ++;
+ }
+
+ /* tertiary top/bottom/common for en_US is similar to the secondary
+ top/bottom/common */
+ resultlen = ucol_getSortKey(coll, tertstr, 150, (uint8_t *)result, 250);
+ tempptr = uprv_strrchr(result, 1) + 1;
+ while (*(tempptr + 1) != 0) {
+ /* the last secondary collation element is not checked since it is not
+ part of the compression */
+ if (*tempptr > coll->tertiaryBottom + coll->tertiaryBottomCount) {
+ log_err("Tertiary compression overlapped\n");
+ }
+ tempptr ++;
+ }
+
+ ucol_close(coll);
+}
+
+static void TestCyrillicTailoring(void) {
+ static const char *test[] = {
+ "\\u0410b",
+ "\\u0410\\u0306a",
+ "\\u04d0A"
+ };
+
+ /* Russian overrides contractions, so this test is not valid anymore */
+ /*genericLocaleStarter("ru", test, 3);*/
+
+ genericLocaleStarter("root", test, 3);
+ genericRulesStarter("&\\u0410 = \\u0410", test, 3);
+ genericRulesStarter("&Z < \\u0410", test, 3);
+ genericRulesStarter("&\\u0410 = \\u0410 < \\u04d0", test, 3);
+ genericRulesStarter("&Z < \\u0410 < \\u04d0", test, 3);
+ genericRulesStarter("&\\u0410 = \\u0410 < \\u0410\\u0301", test, 3);
+ genericRulesStarter("&Z < \\u0410 < \\u0410\\u0301", test, 3);
+}
+
+static void TestSuppressContractions(void) {
+
+ static const char *testNoCont2[] = {
+ "\\u0410\\u0302a",
+ "\\u0410\\u0306b",
+ "\\u0410c"
+ };
+ static const char *testNoCont[] = {
+ "a\\u0410",
+ "A\\u0410\\u0306",
+ "\\uFF21\\u0410\\u0302"
+ };
+
+ genericRulesStarter("[suppressContractions [\\u0400-\\u047f]]", testNoCont, 3);
+ genericRulesStarter("[suppressContractions [\\u0400-\\u047f]]", testNoCont2, 3);
+}
+
+static void TestContraction(void) {
+ const static char *testrules[] = {
+ "&A = AB / B",
+ "&A = A\\u0306/\\u0306",
+ "&c = ch / h"
+ };
+ const static UChar testdata[][2] = {
+ {0x0041 /* 'A' */, 0x0042 /* 'B' */},
+ {0x0041 /* 'A' */, 0x0306 /* combining breve */},
+ {0x0063 /* 'c' */, 0x0068 /* 'h' */}
+ };
+ const static UChar testdata2[][2] = {
+ {0x0063 /* 'c' */, 0x0067 /* 'g' */},
+ {0x0063 /* 'c' */, 0x0068 /* 'h' */},
+ {0x0063 /* 'c' */, 0x006C /* 'l' */}
+ };
+ const static char *testrules3[] = {
+ "&z < xyz &xyzw << B",
+ "&z < xyz &xyz << B / w",
+ "&z < ch &achm << B",
+ "&z < ch &a << B / chm",
+ "&\\ud800\\udc00w << B",
+ "&\\ud800\\udc00 << B / w",
+ "&a\\ud800\\udc00m << B",
+ "&a << B / \\ud800\\udc00m",
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll;
+ UChar rule[256] = {0};
+ uint32_t rlen = 0;
+ int i;
+
+ for (i = 0; i < sizeof(testrules) / sizeof(testrules[0]); i ++) {
+ UCollationElements *iter1;
+ int j = 0;
+ log_verbose("Rule %s for testing\n", testrules[i]);
+ rlen = u_unescape(testrules[i], rule, 32);
+ coll = ucol_openRules(rule, rlen, UCOL_ON, UCOL_TERTIARY,NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Collator creation failed %s\n", testrules[i]);
+ return;
+ }
+ iter1 = ucol_openElements(coll, testdata[i], 2, &status);
+ if (U_FAILURE(status)) {
+ log_err("Collation iterator creation failed\n");
+ return;
+ }
+ while (j < 2) {
+ UCollationElements *iter2 = ucol_openElements(coll,
+ &(testdata[i][j]),
+ 1, &status);
+ uint32_t ce;
+ if (U_FAILURE(status)) {
+ log_err("Collation iterator creation failed\n");
+ return;
+ }
+ ce = ucol_next(iter2, &status);
+ while (ce != UCOL_NULLORDER) {
+ if ((uint32_t)ucol_next(iter1, &status) != ce) {
+ log_err("Collation elements in contraction split does not match\n");
+ return;
+ }
+ ce = ucol_next(iter2, &status);
+ }
+ j ++;
+ ucol_closeElements(iter2);
+ }
+ if (ucol_next(iter1, &status) != UCOL_NULLORDER) {
+ log_err("Collation elements not exhausted\n");
+ return;
+ }
+ ucol_closeElements(iter1);
+ ucol_close(coll);
+ }
+
+ rlen = u_unescape("& a < b < c < ch < d & c = ch / h", rule, 256);
+ coll = ucol_openRules(rule, rlen, UCOL_ON, UCOL_TERTIARY,NULL, &status);
+ if (ucol_strcoll(coll, testdata2[0], 2, testdata2[1], 2) != UCOL_LESS) {
+ log_err("Expected \\u%04x\\u%04x < \\u%04x\\u%04x\n",
+ testdata2[0][0], testdata2[0][1], testdata2[1][0],
+ testdata2[1][1]);
+ return;
+ }
+ if (ucol_strcoll(coll, testdata2[1], 2, testdata2[2], 2) != UCOL_LESS) {
+ log_err("Expected \\u%04x\\u%04x < \\u%04x\\u%04x\n",
+ testdata2[1][0], testdata2[1][1], testdata2[2][0],
+ testdata2[2][1]);
+ return;
+ }
+ ucol_close(coll);
+
+ for (i = 0; i < sizeof(testrules3) / sizeof(testrules3[0]); i += 2) {
+ UCollator *coll1,
+ *coll2;
+ UCollationElements *iter1,
+ *iter2;
+ UChar ch = 0x0042 /* 'B' */;
+ uint32_t ce;
+ rlen = u_unescape(testrules3[i], rule, 32);
+ coll1 = ucol_openRules(rule, rlen, UCOL_ON, UCOL_TERTIARY,NULL, &status);
+ rlen = u_unescape(testrules3[i + 1], rule, 32);
+ coll2 = ucol_openRules(rule, rlen, UCOL_ON, UCOL_TERTIARY,NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Collator creation failed %s\n", testrules[i]);
+ return;
+ }
+ iter1 = ucol_openElements(coll1, &ch, 1, &status);
+ iter2 = ucol_openElements(coll2, &ch, 1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Collation iterator creation failed\n");
+ return;
+ }
+ ce = ucol_next(iter1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Retrieving ces failed\n");
+ return;
+ }
+ while (ce != UCOL_NULLORDER) {
+ if (ce != (uint32_t)ucol_next(iter2, &status)) {
+ log_err("CEs does not match\n");
+ return;
+ }
+ ce = ucol_next(iter1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Retrieving ces failed\n");
+ return;
+ }
+ }
+ if (ucol_next(iter2, &status) != UCOL_NULLORDER) {
+ log_err("CEs not exhausted\n");
+ return;
+ }
+ ucol_closeElements(iter1);
+ ucol_closeElements(iter2);
+ ucol_close(coll1);
+ ucol_close(coll2);
+ }
+}
+
+static void TestExpansion(void) {
+ const static char *testrules[] = {
+ "&J << K / B & K << M",
+ "&J << K / B << M"
+ };
+ const static UChar testdata[][3] = {
+ {0x004A /*'J'*/, 0x0041 /*'A'*/, 0},
+ {0x004D /*'M'*/, 0x0041 /*'A'*/, 0},
+ {0x004B /*'K'*/, 0x0041 /*'A'*/, 0},
+ {0x004B /*'K'*/, 0x0043 /*'C'*/, 0},
+ {0x004A /*'J'*/, 0x0043 /*'C'*/, 0},
+ {0x004D /*'M'*/, 0x0043 /*'C'*/, 0}
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll;
+ UChar rule[256] = {0};
+ uint32_t rlen = 0;
+ int i;
+
+ for (i = 0; i < sizeof(testrules) / sizeof(testrules[0]); i ++) {
+ int j = 0;
+ log_verbose("Rule %s for testing\n", testrules[i]);
+ rlen = u_unescape(testrules[i], rule, 32);
+ coll = ucol_openRules(rule, rlen, UCOL_ON, UCOL_TERTIARY,NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Collator creation failed %s\n", testrules[i]);
+ return;
+ }
+
+ for (j = 0; j < 5; j ++) {
+ doTest(coll, testdata[j], testdata[j + 1], UCOL_LESS);
+ }
+ ucol_close(coll);
+ }
+}
+
+#if 0
+/* this test tests the current limitations of the engine */
+/* it always fail, so it is disabled by default */
+static void TestLimitations(void) {
+ /* recursive expansions */
+ {
+ static const char *rule = "&a=b/c&d=c/e";
+ static const char *tlimit01[] = {"add","b","adf"};
+ static const char *tlimit02[] = {"aa","b","af"};
+ log_verbose("recursive expansions\n");
+ genericRulesStarter(rule, tlimit01, sizeof(tlimit01)/sizeof(tlimit01[0]));
+ genericRulesStarter(rule, tlimit02, sizeof(tlimit02)/sizeof(tlimit02[0]));
+ }
+ /* contractions spanning expansions */
+ {
+ static const char *rule = "&a<<<c/e&g<<<eh";
+ static const char *tlimit01[] = {"ad","c","af","f","ch","h"};
+ static const char *tlimit02[] = {"ad","c","ch","af","f","h"};
+ log_verbose("contractions spanning expansions\n");
+ genericRulesStarter(rule, tlimit01, sizeof(tlimit01)/sizeof(tlimit01[0]));
+ genericRulesStarter(rule, tlimit02, sizeof(tlimit02)/sizeof(tlimit02[0]));
+ }
+ /* normalization: nulls in contractions */
+ {
+ static const char *rule = "&a<<<\\u0000\\u0302";
+ static const char *tlimit01[] = {"a","\\u0000\\u0302\\u0327"};
+ static const char *tlimit02[] = {"\\u0000\\u0302\\u0327","a"};
+ static const UColAttribute att[] = { UCOL_DECOMPOSITION_MODE };
+ static const UColAttributeValue valOn[] = { UCOL_ON };
+ static const UColAttributeValue valOff[] = { UCOL_OFF };
+
+ log_verbose("NULL in contractions\n");
+ genericRulesStarterWithOptions(rule, tlimit01, 2, att, valOn, 1);
+ genericRulesStarterWithOptions(rule, tlimit02, 2, att, valOn, 1);
+ genericRulesStarterWithOptions(rule, tlimit01, 2, att, valOff, 1);
+ genericRulesStarterWithOptions(rule, tlimit02, 2, att, valOff, 1);
+
+ }
+ /* normalization: contractions spanning normalization */
+ {
+ static const char *rule = "&a<<<\\u0000\\u0302";
+ static const char *tlimit01[] = {"a","\\u0000\\u0302\\u0327"};
+ static const char *tlimit02[] = {"\\u0000\\u0302\\u0327","a"};
+ static const UColAttribute att[] = { UCOL_DECOMPOSITION_MODE };
+ static const UColAttributeValue valOn[] = { UCOL_ON };
+ static const UColAttributeValue valOff[] = { UCOL_OFF };
+
+ log_verbose("contractions spanning normalization\n");
+ genericRulesStarterWithOptions(rule, tlimit01, 2, att, valOn, 1);
+ genericRulesStarterWithOptions(rule, tlimit02, 2, att, valOn, 1);
+ genericRulesStarterWithOptions(rule, tlimit01, 2, att, valOff, 1);
+ genericRulesStarterWithOptions(rule, tlimit02, 2, att, valOff, 1);
+
+ }
+ /* variable top: */
+ {
+ /*static const char *rule2 = "&\\u2010<x=[variable top]<z";*/
+ static const char *rule = "&\\u2010<x<[variable top]=z";
+ /*static const char *rule3 = "&' '<x<[variable top]=z";*/
+ static const char *tlimit01[] = {" ", "z", "zb", "a", " b", "xb", "b", "c" };
+ static const char *tlimit02[] = {"-", "-x", "x","xb", "-z", "z", "zb", "-a", "a", "-b", "b", "c"};
+ static const char *tlimit03[] = {" ", "xb", "z", "zb", "a", " b", "b", "c" };
+ static const UColAttribute att[] = { UCOL_ALTERNATE_HANDLING, UCOL_STRENGTH };
+ static const UColAttributeValue valOn[] = { UCOL_SHIFTED, UCOL_QUATERNARY };
+ static const UColAttributeValue valOff[] = { UCOL_NON_IGNORABLE, UCOL_TERTIARY };
+
+ log_verbose("variable top\n");
+ genericRulesStarterWithOptions(rule, tlimit03, sizeof(tlimit03)/sizeof(tlimit03[0]), att, valOn, sizeof(att)/sizeof(att[0]));
+ genericRulesStarterWithOptions(rule, tlimit01, sizeof(tlimit01)/sizeof(tlimit01[0]), att, valOn, sizeof(att)/sizeof(att[0]));
+ genericRulesStarterWithOptions(rule, tlimit02, sizeof(tlimit02)/sizeof(tlimit02[0]), att, valOn, sizeof(att)/sizeof(att[0]));
+ genericRulesStarterWithOptions(rule, tlimit01, sizeof(tlimit01)/sizeof(tlimit01[0]), att, valOff, sizeof(att)/sizeof(att[0]));
+ genericRulesStarterWithOptions(rule, tlimit02, sizeof(tlimit02)/sizeof(tlimit02[0]), att, valOff, sizeof(att)/sizeof(att[0]));
+
+ }
+ /* case level */
+ {
+ static const char *rule = "&c<ch<<<cH<<<Ch<<<CH";
+ static const char *tlimit01[] = {"c","CH","Ch","cH","ch"};
+ static const char *tlimit02[] = {"c","CH","cH","Ch","ch"};
+ static const UColAttribute att[] = { UCOL_CASE_FIRST};
+ static const UColAttributeValue valOn[] = { UCOL_UPPER_FIRST};
+ /*static const UColAttributeValue valOff[] = { UCOL_OFF};*/
+ log_verbose("case level\n");
+ genericRulesStarterWithOptions(rule, tlimit01, sizeof(tlimit01)/sizeof(tlimit01[0]), att, valOn, sizeof(att)/sizeof(att[0]));
+ genericRulesStarterWithOptions(rule, tlimit02, sizeof(tlimit02)/sizeof(tlimit02[0]), att, valOn, sizeof(att)/sizeof(att[0]));
+ /*genericRulesStarterWithOptions(rule, tlimit01, sizeof(tlimit01)/sizeof(tlimit01[0]), att, valOff, sizeof(att)/sizeof(att[0]));*/
+ /*genericRulesStarterWithOptions(rule, tlimit02, sizeof(tlimit02)/sizeof(tlimit02[0]), att, valOff, sizeof(att)/sizeof(att[0]));*/
+ }
+
+}
+#endif
+
+static void TestBocsuCoverage(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char *testString = "\\u0041\\u0441\\u4441\\U00044441\\u4441\\u0441\\u0041";
+ UChar test[256] = {0};
+ uint32_t tlen = u_unescape(testString, test, 32);
+ uint8_t key[256] = {0};
+ uint32_t klen = 0;
+
+ UCollator *coll = ucol_open("", &status);
+ if(U_SUCCESS(status)) {
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_IDENTICAL, &status);
+
+ klen = ucol_getSortKey(coll, test, tlen, key, 256);
+
+ ucol_close(coll);
+ } else {
+ log_data_err("Couldn't open UCA\n");
+ }
+}
+
+static void TestVariableTopSetting(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ const UChar *current = NULL;
+ uint32_t varTopOriginal = 0, varTop1, varTop2;
+ UCollator *coll = ucol_open("", &status);
+ if(U_SUCCESS(status)) {
+
+ uint32_t strength = 0;
+ uint16_t specs = 0;
+ uint32_t chOffset = 0;
+ uint32_t chLen = 0;
+ uint32_t exOffset = 0;
+ uint32_t exLen = 0;
+ uint32_t oldChOffset = 0;
+ uint32_t oldChLen = 0;
+ uint32_t oldExOffset = 0;
+ uint32_t oldExLen = 0;
+ uint32_t prefixOffset = 0;
+ uint32_t prefixLen = 0;
+
+ UBool startOfRules = TRUE;
+ UColTokenParser src;
+ UColOptionSet opts;
+
+ UChar *rulesCopy = NULL;
+ uint32_t rulesLen;
+
+ UCollationResult result;
+
+ UChar first[256] = { 0 };
+ UChar second[256] = { 0 };
+ UParseError parseError;
+ int32_t myQ = QUICK;
+
+ src.opts = &opts;
+
+ if(QUICK <= 0) {
+ QUICK = 1;
+ }
+
+ /* this test will fail when normalization is turned on */
+ /* therefore we always turn off exhaustive mode for it */
+ { /* QUICK > 0*/
+ log_verbose("Slide variable top over UCARules\n");
+ rulesLen = ucol_getRulesEx(coll, UCOL_FULL_RULES, rulesCopy, 0);
+ rulesCopy = (UChar *)malloc((rulesLen+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar));
+ rulesLen = ucol_getRulesEx(coll, UCOL_FULL_RULES, rulesCopy, rulesLen+UCOL_TOK_EXTRA_RULE_SPACE_SIZE);
+
+ if(U_SUCCESS(status) && rulesLen > 0) {
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ src.current = src.source = rulesCopy;
+ src.end = rulesCopy+rulesLen;
+ src.extraCurrent = src.end;
+ src.extraEnd = src.end+UCOL_TOK_EXTRA_RULE_SPACE_SIZE;
+
+ while ((current = ucol_tok_parseNextToken(&src, startOfRules, &parseError,&status)) != NULL) {
+ strength = src.parsedToken.strength;
+ chOffset = src.parsedToken.charsOffset;
+ chLen = src.parsedToken.charsLen;
+ exOffset = src.parsedToken.extensionOffset;
+ exLen = src.parsedToken.extensionLen;
+ prefixOffset = src.parsedToken.prefixOffset;
+ prefixLen = src.parsedToken.prefixLen;
+ specs = src.parsedToken.flags;
+
+ startOfRules = FALSE;
+ {
+ log_verbose("%04X %d ", *(rulesCopy+chOffset), chLen);
+ }
+ if(strength == UCOL_PRIMARY) {
+ status = U_ZERO_ERROR;
+ varTopOriginal = ucol_getVariableTop(coll, &status);
+ varTop1 = ucol_setVariableTop(coll, rulesCopy+oldChOffset, oldChLen, &status);
+ if(U_FAILURE(status)) {
+ char buffer[256];
+ char *buf = buffer;
+ uint32_t i = 0, j;
+ uint32_t CE = UCOL_NO_MORE_CES;
+
+ /* before we start screaming, let's see if there is a problem with the rules */
+ collIterate s;
+ uprv_init_collIterate(coll, rulesCopy+oldChOffset, oldChLen, &s);
+
+ CE = ucol_getNextCE(coll, &s, &status);
+
+ for(i = 0; i < oldChLen; i++) {
+ j = sprintf(buf, "%04X ", *(rulesCopy+oldChOffset+i));
+ buf += j;
+ }
+ if(status == U_PRIMARY_TOO_LONG_ERROR) {
+ log_verbose("= Expected failure for %s =", buffer);
+ } else {
+ if(s.pos == s.endp) {
+ log_err("Unexpected failure setting variable top at offset %d. Error %s. Codepoints: %s\n",
+ oldChOffset, u_errorName(status), buffer);
+ } else {
+ log_verbose("There is a goofy contraction in UCA rules that does not appear in the fractional UCA. Codepoints: %s\n",
+ buffer);
+ }
+ }
+ }
+ varTop2 = ucol_getVariableTop(coll, &status);
+ if((varTop1 & 0xFFFF0000) != (varTop2 & 0xFFFF0000)) {
+ log_err("cannot retrieve set varTop value!\n");
+ continue;
+ }
+
+ if((varTop1 & 0xFFFF0000) > 0 && oldExLen == 0) {
+
+ u_strncpy(first, rulesCopy+oldChOffset, oldChLen);
+ u_strncpy(first+oldChLen, rulesCopy+chOffset, chLen);
+ u_strncpy(first+oldChLen+chLen, rulesCopy+oldChOffset, oldChLen);
+ first[2*oldChLen+chLen] = 0;
+
+ if(oldExLen == 0) {
+ u_strncpy(second, rulesCopy+chOffset, chLen);
+ second[chLen] = 0;
+ } else { /* This is skipped momentarily, but should work once UCARules are fully UCA conformant */
+ u_strncpy(second, rulesCopy+oldExOffset, oldExLen);
+ u_strncpy(second+oldChLen, rulesCopy+chOffset, chLen);
+ u_strncpy(second+oldChLen+chLen, rulesCopy+oldExOffset, oldExLen);
+ second[2*oldExLen+chLen] = 0;
+ }
+ result = ucol_strcoll(coll, first, -1, second, -1);
+ if(result == UCOL_EQUAL) {
+ doTest(coll, first, second, UCOL_EQUAL);
+ } else {
+ log_verbose("Suspicious strcoll result for %04X and %04X\n", *(rulesCopy+oldChOffset), *(rulesCopy+chOffset));
+ }
+ }
+ }
+ if(strength != UCOL_TOK_RESET) {
+ oldChOffset = chOffset;
+ oldChLen = chLen;
+ oldExOffset = exOffset;
+ oldExLen = exLen;
+ }
+ }
+ status = U_ZERO_ERROR;
+ }
+ else {
+ log_err("Unexpected failure getting rules %s\n", u_errorName(status));
+ return;
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error parsing rules %s\n", u_errorName(status));
+ return;
+ }
+ status = U_ZERO_ERROR;
+ }
+
+ QUICK = myQ;
+
+ log_verbose("Testing setting variable top to contractions\n");
+ {
+ /* uint32_t tailoredCE = UCOL_NOT_FOUND; */
+ /*UChar *conts = (UChar *)((uint8_t *)coll->image + coll->image->UCAConsts+sizeof(UCAConstants));*/
+ UChar *conts = (UChar *)((uint8_t *)coll->image + coll->image->contractionUCACombos);
+ while(*conts != 0) {
+ if(*(conts+2) == 0) {
+ varTop1 = ucol_setVariableTop(coll, conts, -1, &status);
+ } else {
+ varTop1 = ucol_setVariableTop(coll, conts, 3, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Couldn't set variable top to a contraction %04X %04X %04X\n",
+ *conts, *(conts+1), *(conts+2));
+ status = U_ZERO_ERROR;
+ }
+ conts+=3;
+ }
+
+ status = U_ZERO_ERROR;
+
+ first[0] = 0x0040;
+ first[1] = 0x0050;
+ first[2] = 0x0000;
+
+ ucol_setVariableTop(coll, first, -1, &status);
+
+ if(U_SUCCESS(status)) {
+ log_err("Invalid contraction succeded in setting variable top!\n");
+ }
+
+ }
+
+ log_verbose("Test restoring variable top\n");
+
+ status = U_ZERO_ERROR;
+ ucol_restoreVariableTop(coll, varTopOriginal, &status);
+ if(varTopOriginal != ucol_getVariableTop(coll, &status)) {
+ log_err("Couldn't restore old variable top\n");
+ }
+
+ log_verbose("Testing calling with error set\n");
+
+ status = U_INTERNAL_PROGRAM_ERROR;
+ varTop1 = ucol_setVariableTop(coll, first, 1, &status);
+ varTop2 = ucol_getVariableTop(coll, &status);
+ ucol_restoreVariableTop(coll, varTop2, &status);
+ varTop1 = ucol_setVariableTop(NULL, first, 1, &status);
+ varTop2 = ucol_getVariableTop(NULL, &status);
+ ucol_restoreVariableTop(NULL, varTop2, &status);
+ if(status != U_INTERNAL_PROGRAM_ERROR) {
+ log_err("Bad reaction to passed error!\n");
+ }
+ free(rulesCopy);
+ ucol_close(coll);
+ } else {
+ log_data_err("Couldn't open UCA collator\n");
+ }
+
+}
+
+static void TestNonChars(void) {
+ static const char *test[] = {
+ "\\u0000",
+ "\\uFFFE", "\\uFFFF",
+ "\\U0001FFFE", "\\U0001FFFF",
+ "\\U0002FFFE", "\\U0002FFFF",
+ "\\U0003FFFE", "\\U0003FFFF",
+ "\\U0004FFFE", "\\U0004FFFF",
+ "\\U0005FFFE", "\\U0005FFFF",
+ "\\U0006FFFE", "\\U0006FFFF",
+ "\\U0007FFFE", "\\U0007FFFF",
+ "\\U0008FFFE", "\\U0008FFFF",
+ "\\U0009FFFE", "\\U0009FFFF",
+ "\\U000AFFFE", "\\U000AFFFF",
+ "\\U000BFFFE", "\\U000BFFFF",
+ "\\U000CFFFE", "\\U000CFFFF",
+ "\\U000DFFFE", "\\U000DFFFF",
+ "\\U000EFFFE", "\\U000EFFFF",
+ "\\U000FFFFE", "\\U000FFFFF",
+ "\\U0010FFFE", "\\U0010FFFF"
+ };
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("en_US", &status);
+
+ log_verbose("Test non characters\n");
+
+ if(U_SUCCESS(status)) {
+ genericOrderingTestWithResult(coll, test, 35, UCOL_EQUAL);
+ } else {
+ log_err("Unable to open collator\n");
+ }
+
+ ucol_close(coll);
+}
+
+static void TestExtremeCompression(void) {
+ static char *test[4];
+ int32_t j = 0, i = 0;
+
+ for(i = 0; i<4; i++) {
+ test[i] = (char *)malloc(2048*sizeof(char));
+ }
+
+ for(j = 20; j < 500; j++) {
+ for(i = 0; i<4; i++) {
+ uprv_memset(test[i], 'a', (j-1)*sizeof(char));
+ test[i][j-1] = (char)('a'+i);
+ test[i][j] = 0;
+ }
+ genericLocaleStarter("en_US", (const char **)test, 4);
+ }
+
+
+ for(i = 0; i<4; i++) {
+ free(test[i]);
+ }
+}
+
+#if 0
+static void TestExtremeCompression(void) {
+ static char *test[4];
+ int32_t j = 0, i = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("en_US", status);
+ for(i = 0; i<4; i++) {
+ test[i] = (char *)malloc(2048*sizeof(char));
+ }
+ for(j = 10; j < 2048; j++) {
+ for(i = 0; i<4; i++) {
+ uprv_memset(test[i], 'a', (j-2)*sizeof(char));
+ test[i][j-1] = (char)('a'+i);
+ test[i][j] = 0;
+ }
+ }
+ genericLocaleStarter("en_US", (const char **)test, 4);
+
+ for(j = 10; j < 2048; j++) {
+ for(i = 0; i<1; i++) {
+ uprv_memset(test[i], 'a', (j-1)*sizeof(char));
+ test[i][j] = 0;
+ }
+ }
+ for(i = 0; i<4; i++) {
+ free(test[i]);
+ }
+}
+#endif
+
+static void TestSurrogates(void) {
+ static const char *test[] = {
+ "z","\\ud900\\udc25", "\\ud805\\udc50",
+ "\\ud800\\udc00y", "\\ud800\\udc00r",
+ "\\ud800\\udc00f", "\\ud800\\udc00",
+ "\\ud800\\udc00c", "\\ud800\\udc00b",
+ "\\ud800\\udc00fa", "\\ud800\\udc00fb",
+ "\\ud800\\udc00a",
+ "c", "b"
+ };
+
+ static const char *rule =
+ "&z < \\ud900\\udc25 < \\ud805\\udc50"
+ "< \\ud800\\udc00y < \\ud800\\udc00r"
+ "< \\ud800\\udc00f << \\ud800\\udc00"
+ "< \\ud800\\udc00fa << \\ud800\\udc00fb"
+ "< \\ud800\\udc00a < c < b" ;
+
+ genericRulesStarter(rule, test, 14);
+}
+
+/* This is a test for prefix implementation, used by JIS X 4061 collation rules */
+static void TestPrefix(void) {
+ uint32_t i;
+
+ static const struct {
+ const char *rules;
+ const char *data[50];
+ const uint32_t len;
+ } tests[] = {
+ { "&z <<< z|a",
+ {"zz", "za"}, 2 },
+
+ { "&z <<< z| a",
+ {"zz", "za"}, 2 },
+ { "[strength I]"
+ "&a=\\ud900\\udc25"
+ "&z<<<\\ud900\\udc25|a",
+ {"aa", "az", "\\ud900\\udc25z", "\\ud900\\udc25a", "zz"}, 4 },
+ };
+
+
+ for(i = 0; i<(sizeof(tests)/sizeof(tests[0])); i++) {
+ genericRulesStarter(tests[i].rules, tests[i].data, tests[i].len);
+ }
+}
+
+/* This test uses data suplied by Masashiko Maedera to test the implementation */
+/* JIS X 4061 collation order implementation */
+static void TestNewJapanese(void) {
+
+ static const char * const test1[] = {
+ "\\u30b7\\u30e3\\u30fc\\u30ec",
+ "\\u30b7\\u30e3\\u30a4",
+ "\\u30b7\\u30e4\\u30a3",
+ "\\u30b7\\u30e3\\u30ec",
+ "\\u3061\\u3087\\u3053",
+ "\\u3061\\u3088\\u3053",
+ "\\u30c1\\u30e7\\u30b3\\u30ec\\u30fc\\u30c8",
+ "\\u3066\\u30fc\\u305f",
+ "\\u30c6\\u30fc\\u30bf",
+ "\\u30c6\\u30a7\\u30bf",
+ "\\u3066\\u3048\\u305f",
+ "\\u3067\\u30fc\\u305f",
+ "\\u30c7\\u30fc\\u30bf",
+ "\\u30c7\\u30a7\\u30bf",
+ "\\u3067\\u3048\\u305f",
+ "\\u3066\\u30fc\\u305f\\u30fc",
+ "\\u30c6\\u30fc\\u30bf\\u30a1",
+ "\\u30c6\\u30a7\\u30bf\\u30fc",
+ "\\u3066\\u3047\\u305f\\u3041",
+ "\\u3066\\u3048\\u305f\\u30fc",
+ "\\u3067\\u30fc\\u305f\\u30fc",
+ "\\u30c7\\u30fc\\u30bf\\u30a1",
+ "\\u3067\\u30a7\\u305f\\u30a1",
+ "\\u30c7\\u3047\\u30bf\\u3041",
+ "\\u30c7\\u30a8\\u30bf\\u30a2",
+ "\\u3072\\u3086",
+ "\\u3073\\u3085\\u3042",
+ "\\u3074\\u3085\\u3042",
+ "\\u3073\\u3085\\u3042\\u30fc",
+ "\\u30d3\\u30e5\\u30a2\\u30fc",
+ "\\u3074\\u3085\\u3042\\u30fc",
+ "\\u30d4\\u30e5\\u30a2\\u30fc",
+ "\\u30d2\\u30e5\\u30a6",
+ "\\u30d2\\u30e6\\u30a6",
+ "\\u30d4\\u30e5\\u30a6\\u30a2",
+ "\\u3073\\u3085\\u30fc\\u3042\\u30fc",
+ "\\u30d3\\u30e5\\u30fc\\u30a2\\u30fc",
+ "\\u30d3\\u30e5\\u30a6\\u30a2\\u30fc",
+ "\\u3072\\u3085\\u3093",
+ "\\u3074\\u3085\\u3093",
+ "\\u3075\\u30fc\\u308a",
+ "\\u30d5\\u30fc\\u30ea",
+ "\\u3075\\u3045\\u308a",
+ "\\u3075\\u30a5\\u308a",
+ "\\u3075\\u30a5\\u30ea",
+ "\\u30d5\\u30a6\\u30ea",
+ "\\u3076\\u30fc\\u308a",
+ "\\u30d6\\u30fc\\u30ea",
+ "\\u3076\\u3045\\u308a",
+ "\\u30d6\\u30a5\\u308a",
+ "\\u3077\\u3046\\u308a",
+ "\\u30d7\\u30a6\\u30ea",
+ "\\u3075\\u30fc\\u308a\\u30fc",
+ "\\u30d5\\u30a5\\u30ea\\u30fc",
+ "\\u3075\\u30a5\\u308a\\u30a3",
+ "\\u30d5\\u3045\\u308a\\u3043",
+ "\\u30d5\\u30a6\\u30ea\\u30fc",
+ "\\u3075\\u3046\\u308a\\u3043",
+ "\\u30d6\\u30a6\\u30ea\\u30a4",
+ "\\u3077\\u30fc\\u308a\\u30fc",
+ "\\u3077\\u30a5\\u308a\\u30a4",
+ "\\u3077\\u3046\\u308a\\u30fc",
+ "\\u30d7\\u30a6\\u30ea\\u30a4",
+ "\\u30d5\\u30fd",
+ "\\u3075\\u309e",
+ "\\u3076\\u309d",
+ "\\u3076\\u3075",
+ "\\u3076\\u30d5",
+ "\\u30d6\\u3075",
+ "\\u30d6\\u30d5",
+ "\\u3076\\u309e",
+ "\\u3076\\u3077",
+ "\\u30d6\\u3077",
+ "\\u3077\\u309d",
+ "\\u30d7\\u30fd",
+ "\\u3077\\u3075",
+};
+
+ static const char *test2[] = {
+ "\\u306f\\u309d", /* H\\u309d */
+ "\\u30cf\\u30fd", /* K\\u30fd */
+ "\\u306f\\u306f", /* HH */
+ "\\u306f\\u30cf", /* HK */
+ "\\u30cf\\u30cf", /* KK */
+ "\\u306f\\u309e", /* H\\u309e */
+ "\\u30cf\\u30fe", /* K\\u30fe */
+ "\\u306f\\u3070", /* HH\\u309b */
+ "\\u30cf\\u30d0", /* KK\\u309b */
+ "\\u306f\\u3071", /* HH\\u309c */
+ "\\u30cf\\u3071", /* KH\\u309c */
+ "\\u30cf\\u30d1", /* KK\\u309c */
+ "\\u3070\\u309d", /* H\\u309b\\u309d */
+ "\\u30d0\\u30fd", /* K\\u309b\\u30fd */
+ "\\u3070\\u306f", /* H\\u309bH */
+ "\\u30d0\\u30cf", /* K\\u309bK */
+ "\\u3070\\u309e", /* H\\u309b\\u309e */
+ "\\u30d0\\u30fe", /* K\\u309b\\u30fe */
+ "\\u3070\\u3070", /* H\\u309bH\\u309b */
+ "\\u30d0\\u3070", /* K\\u309bH\\u309b */
+ "\\u30d0\\u30d0", /* K\\u309bK\\u309b */
+ "\\u3070\\u3071", /* H\\u309bH\\u309c */
+ "\\u30d0\\u30d1", /* K\\u309bK\\u309c */
+ "\\u3071\\u309d", /* H\\u309c\\u309d */
+ "\\u30d1\\u30fd", /* K\\u309c\\u30fd */
+ "\\u3071\\u306f", /* H\\u309cH */
+ "\\u30d1\\u30cf", /* K\\u309cK */
+ "\\u3071\\u3070", /* H\\u309cH\\u309b */
+ "\\u3071\\u30d0", /* H\\u309cK\\u309b */
+ "\\u30d1\\u30d0", /* K\\u309cK\\u309b */
+ "\\u3071\\u3071", /* H\\u309cH\\u309c */
+ "\\u30d1\\u30d1", /* K\\u309cK\\u309c */
+ };
+ /*
+ static const char *test3[] = {
+ "\\u221er\\u221e",
+ "\\u221eR#",
+ "\\u221et\\u221e",
+ "#r\\u221e",
+ "#R#",
+ "#t%",
+ "#T%",
+ "8t\\u221e",
+ "8T\\u221e",
+ "8t#",
+ "8T#",
+ "8t%",
+ "8T%",
+ "8t8",
+ "8T8",
+ "\\u03c9r\\u221e",
+ "\\u03a9R%",
+ "rr\\u221e",
+ "rR\\u221e",
+ "Rr\\u221e",
+ "RR\\u221e",
+ "RT%",
+ "rt8",
+ "tr\\u221e",
+ "tr8",
+ "TR8",
+ "tt8",
+ "\\u30b7\\u30e3\\u30fc\\u30ec",
+ };
+ */
+ static const UColAttribute att[] = { UCOL_STRENGTH };
+ static const UColAttributeValue val[] = { UCOL_QUATERNARY };
+
+ static const UColAttribute attShifted[] = { UCOL_STRENGTH, UCOL_ALTERNATE_HANDLING};
+ static const UColAttributeValue valShifted[] = { UCOL_QUATERNARY, UCOL_SHIFTED };
+
+ genericLocaleStarterWithOptions("ja", test1, sizeof(test1)/sizeof(test1[0]), att, val, 1);
+ genericLocaleStarterWithOptions("ja", test2, sizeof(test2)/sizeof(test2[0]), att, val, 1);
+ /*genericLocaleStarter("ja", test3, sizeof(test3)/sizeof(test3[0]));*/
+ genericLocaleStarterWithOptions("ja", test1, sizeof(test1)/sizeof(test1[0]), attShifted, valShifted, 2);
+ genericLocaleStarterWithOptions("ja", test2, sizeof(test2)/sizeof(test2[0]), attShifted, valShifted, 2);
+}
+
+static void TestStrCollIdenticalPrefix(void) {
+ const char* rule = "&\\ud9b0\\udc70=\\ud9b0\\udc71";
+ const char* test[] = {
+ "ab\\ud9b0\\udc70",
+ "ab\\ud9b0\\udc71"
+ };
+ genericRulesStarterWithResult(rule, test, sizeof(test)/sizeof(test[0]), UCOL_EQUAL);
+}
+/* Contractions should have all their canonically equivalent */
+/* strings included */
+static void TestContractionClosure(void) {
+ static const struct {
+ const char *rules;
+ const char *data[10];
+ const uint32_t len;
+ } tests[] = {
+ { "&b=\\u00e4\\u00e4",
+ { "b", "\\u00e4\\u00e4", "a\\u0308a\\u0308", "\\u00e4a\\u0308", "a\\u0308\\u00e4" }, 5},
+ { "&b=\\u00C5",
+ { "b", "\\u00C5", "A\\u030A", "\\u212B" }, 4},
+ };
+ uint32_t i;
+
+
+ for(i = 0; i<(sizeof(tests)/sizeof(tests[0])); i++) {
+ genericRulesStarterWithResult(tests[i].rules, tests[i].data, tests[i].len, UCOL_EQUAL);
+ }
+}
+
+/* This tests also fails*/
+static void TestBeforePrefixFailure(void) {
+ static const struct {
+ const char *rules;
+ const char *data[10];
+ const uint32_t len;
+ } tests[] = {
+ { "&g <<< a"
+ "&[before 3]\\uff41 <<< x",
+ {"x", "\\uff41"}, 2 },
+ { "&\\u30A7=\\u30A7=\\u3047=\\uff6a"
+ "&\\u30A8=\\u30A8=\\u3048=\\uff74"
+ "&[before 3]\\u30a7<<<\\u30a9",
+ {"\\u30a9", "\\u30a7"}, 2 },
+ { "&[before 3]\\u30a7<<<\\u30a9"
+ "&\\u30A7=\\u30A7=\\u3047=\\uff6a"
+ "&\\u30A8=\\u30A8=\\u3048=\\uff74",
+ {"\\u30a9", "\\u30a7"}, 2 },
+ };
+ uint32_t i;
+
+
+ for(i = 0; i<(sizeof(tests)/sizeof(tests[0])); i++) {
+ genericRulesStarter(tests[i].rules, tests[i].data, tests[i].len);
+ }
+
+#if 0
+ const char* rule1 =
+ "&\\u30A7=\\u30A7=\\u3047=\\uff6a"
+ "&\\u30A8=\\u30A8=\\u3048=\\uff74"
+ "&[before 3]\\u30a7<<<\\u30c6|\\u30fc";
+ const char* rule2 =
+ "&[before 3]\\u30a7<<<\\u30c6|\\u30fc"
+ "&\\u30A7=\\u30A7=\\u3047=\\uff6a"
+ "&\\u30A8=\\u30A8=\\u3048=\\uff74";
+ const char* test[] = {
+ "\\u30c6\\u30fc\\u30bf",
+ "\\u30c6\\u30a7\\u30bf",
+ };
+ genericRulesStarter(rule1, test, sizeof(test)/sizeof(test[0]));
+ genericRulesStarter(rule2, test, sizeof(test)/sizeof(test[0]));
+/* this piece of code should be in some sort of verbose mode */
+/* it gets the collation elements for elements and prints them */
+/* This is useful when trying to see whether the problem is */
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ uint32_t i = 0;
+ UCollationElements *it = NULL;
+ uint32_t CE;
+ UChar string[256];
+ uint32_t uStringLen;
+ UCollator *coll = NULL;
+
+ uStringLen = u_unescape(rule1, string, 256);
+
+ coll = ucol_openRules(string, uStringLen, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
+
+ /*coll = ucol_open("ja_JP_JIS", &status);*/
+ it = ucol_openElements(coll, string, 0, &status);
+
+ for(i = 0; i < sizeof(test)/sizeof(test[0]); i++) {
+ log_verbose("%s\n", test[i]);
+ uStringLen = u_unescape(test[i], string, 256);
+ ucol_setText(it, string, uStringLen, &status);
+
+ while((CE=ucol_next(it, &status)) != UCOL_NULLORDER) {
+ log_verbose("%08X\n", CE);
+ }
+ log_verbose("\n");
+
+ }
+
+ ucol_closeElements(it);
+ ucol_close(coll);
+ }
+#endif
+}
+
+static void TestPrefixCompose(void) {
+ const char* rule1 =
+ "&\\u30a7<<<\\u30ab|\\u30fc=\\u30ac|\\u30fc";
+ /*
+ const char* test[] = {
+ "\\u30c6\\u30fc\\u30bf",
+ "\\u30c6\\u30a7\\u30bf",
+ };
+ */
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ /*uint32_t i = 0;*/
+ /*UCollationElements *it = NULL;*/
+/* uint32_t CE;*/
+ UChar string[256];
+ uint32_t uStringLen;
+ UCollator *coll = NULL;
+
+ uStringLen = u_unescape(rule1, string, 256);
+
+ coll = ucol_openRules(string, uStringLen, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
+ ucol_close(coll);
+ }
+
+
+}
+
+/*
+[last variable] last variable value
+[last primary ignorable] largest CE for primary ignorable
+[last secondary ignorable] largest CE for secondary ignorable
+[last tertiary ignorable] largest CE for tertiary ignorable
+[top] guaranteed to be above all implicit CEs, for now and in the future (in 1.8)
+*/
+
+static void TestRuleOptions(void) {
+ /* values here are hardcoded and are correct for the current UCA
+ * when the UCA changes, one might be forced to change these
+ * values. (\\u02d0, \\U00010FFFC etc...)
+ */
+ static const struct {
+ const char *rules;
+ const char *data[10];
+ const uint32_t len;
+ } tests[] = {
+ /* - all befores here amount to zero */
+ { "&[before 3][first tertiary ignorable]<<<a",
+ { "\\u0000", "a"}, 2
+ }, /* you cannot go before first tertiary ignorable */
+
+ { "&[before 3][last tertiary ignorable]<<<a",
+ { "\\u0000", "a"}, 2
+ }, /* you cannot go before last tertiary ignorable */
+
+ { "&[before 3][first secondary ignorable]<<<a",
+ { "\\u0000", "a"}, 2
+ }, /* you cannot go before first secondary ignorable */
+
+ { "&[before 3][last secondary ignorable]<<<a",
+ { "\\u0000", "a"}, 2
+ }, /* you cannot go before first secondary ignorable */
+
+ /* 'normal' befores */
+
+ { "&[before 3][first primary ignorable]<<<c<<<b &[first primary ignorable]<a",
+ { "c", "b", "\\u0332", "a" }, 4
+ },
+
+ /* we don't have a code point that corresponds to
+ * the last primary ignorable
+ */
+ { "&[before 3][last primary ignorable]<<<c<<<b &[last primary ignorable]<a",
+ { "\\u0332", "\\u20e3", "c", "b", "a" }, 5
+ },
+
+ { "&[before 3][first variable]<<<c<<<b &[first variable]<a",
+ { "c", "b", "\\u0009", "a", "\\u000a" }, 5
+ },
+
+ { "&[last variable]<a &[before 3][last variable]<<<c<<<b ",
+ { "c", "b", "\\uD834\\uDF71", "a", "\\u02d0" }, 5
+ },
+
+ { "&[first regular]<a"
+ "&[before 1][first regular]<b",
+ { "b", "\\u02d0", "a", "\\u02d1"}, 4
+ },
+
+ { "&[before 1][last regular]<b"
+ "&[last regular]<a",
+ { "b", "\\uD808\\uDF6E", "a", "\\u4e00" }, 4
+ },
+
+ { "&[before 1][first implicit]<b"
+ "&[first implicit]<a",
+ { "b", "\\u4e00", "a", "\\u4e01"}, 4
+ },
+
+ { "&[before 1][last implicit]<b"
+ "&[last implicit]<a",
+ { "b", "\\U0010FFFD", "a" }, 3
+ },
+
+ { "&[last variable]<z"
+ "&[last primary ignorable]<x"
+ "&[last secondary ignorable]<<y"
+ "&[last tertiary ignorable]<<<w"
+ "&[top]<u",
+ {"\\ufffb", "w", "y", "\\u20e3", "x", "\\u137c", "z", "u"}, 7
+ }
+
+ };
+ uint32_t i;
+
+
+ for(i = 0; i<(sizeof(tests)/sizeof(tests[0])); i++) {
+ genericRulesStarter(tests[i].rules, tests[i].data, tests[i].len);
+ }
+}
+
+
+static void TestOptimize(void) {
+ /* this is not really a test - just trying out
+ * whether copying of UCA contents will fail
+ * Cannot really test, since the functionality
+ * remains the same.
+ */
+ static const struct {
+ const char *rules;
+ const char *data[10];
+ const uint32_t len;
+ } tests[] = {
+ /* - all befores here amount to zero */
+ { "[optimize [\\uAC00-\\uD7FF]]",
+ { "a", "b"}, 2}
+ };
+ uint32_t i;
+
+ for(i = 0; i<(sizeof(tests)/sizeof(tests[0])); i++) {
+ genericRulesStarter(tests[i].rules, tests[i].data, tests[i].len);
+ }
+}
+
+/*
+cycheng@ca.ibm.c... we got inconsistent results when using the UTF-16BE iterator and the UTF-8 iterator.
+weiv ucol_strcollIter?
+cycheng@ca.ibm.c... e.g. s1 = 0xfffc0062, and s2 = d8000021
+weiv these are the input strings?
+cycheng@ca.ibm.c... yes, using the utf-16 iterator and UCA with normalization on, we have s1 > s2
+weiv will check - could be a problem with utf-8 iterator
+cycheng@ca.ibm.c... but if we use the utf-8 iterator, i.e. s1 = efbfbc62 and s2 = eda08021, we have s1 < s2
+weiv hmmm
+cycheng@ca.ibm.c... note that we have a standalone high surrogate
+weiv that doesn't sound right
+cycheng@ca.ibm.c... we got the same inconsistent results on AIX and Win2000
+weiv so you have two strings, you convert them to utf-8 and to utf-16BE
+cycheng@ca.ibm.c... yes
+weiv and then do the comparison
+cycheng@ca.ibm.c... in one case, the input strings are in utf8, and in the other case the input strings are in utf-16be
+weiv utf-16 strings look like a little endian ones in the example you sent me
+weiv It could be a bug - let me try to test it out
+cycheng@ca.ibm.c... ok
+cycheng@ca.ibm.c... we can wait till the conf. call
+cycheng@ca.ibm.c... next weke
+weiv that would be great
+weiv hmmm
+weiv I might be wrong
+weiv let me play with it some more
+cycheng@ca.ibm.c... ok
+cycheng@ca.ibm.c... also please check s3 = 0x0e3a0062 and s4 = 0x0e400021. both are in utf-16be
+cycheng@ca.ibm.c... seems with icu 2.2 we have s3 > s4, but not in icu 2.4 that's built for db2
+cycheng@ca.ibm.c... also s1 & s2 that I sent you earlier are also in utf-16be
+weiv ok
+cycheng@ca.ibm.c... i ask sherman to send you more inconsistent data
+weiv thanks
+cycheng@ca.ibm.c... the 4 strings we sent are just samples
+*/
+#if 0
+static void Alexis(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("", &status);
+
+
+ const char utf16be[2][4] = {
+ { (char)0xd8, (char)0x00, (char)0x00, (char)0x21 },
+ { (char)0xff, (char)0xfc, (char)0x00, (char)0x62 }
+ };
+
+ const char utf8[2][4] = {
+ { (char)0xed, (char)0xa0, (char)0x80, (char)0x21 },
+ { (char)0xef, (char)0xbf, (char)0xbc, (char)0x62 },
+ };
+
+ UCharIterator iterU161, iterU162;
+ UCharIterator iterU81, iterU82;
+
+ UCollationResult resU16, resU8;
+
+ uiter_setUTF16BE(&iterU161, utf16be[0], 4);
+ uiter_setUTF16BE(&iterU162, utf16be[1], 4);
+
+ uiter_setUTF8(&iterU81, utf8[0], 4);
+ uiter_setUTF8(&iterU82, utf8[1], 4);
+
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+
+ resU16 = ucol_strcollIter(coll, &iterU161, &iterU162, &status);
+ resU8 = ucol_strcollIter(coll, &iterU81, &iterU82, &status);
+
+
+ if(resU16 != resU8) {
+ log_err("different results\n");
+ }
+
+ ucol_close(coll);
+}
+#endif
+
+#define CMSCOLL_ALEXIS2_BUFFER_SIZE 256
+static void Alexis2(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar U16Source[CMSCOLL_ALEXIS2_BUFFER_SIZE], U16Target[CMSCOLL_ALEXIS2_BUFFER_SIZE];
+ char U16BESource[CMSCOLL_ALEXIS2_BUFFER_SIZE], U16BETarget[CMSCOLL_ALEXIS2_BUFFER_SIZE];
+ char U8Source[CMSCOLL_ALEXIS2_BUFFER_SIZE], U8Target[CMSCOLL_ALEXIS2_BUFFER_SIZE];
+ int32_t U16LenS = 0, U16LenT = 0, U16BELenS = 0, U16BELenT = 0, U8LenS = 0, U8LenT = 0;
+
+ UConverter *conv = NULL;
+
+ UCharIterator U16BEItS, U16BEItT;
+ UCharIterator U8ItS, U8ItT;
+
+ UCollationResult resU16, resU16BE, resU8;
+
+ static const char* const pairs[][2] = {
+ { "\\ud800\\u0021", "\\uFFFC\\u0062"},
+ { "\\u0435\\u0308\\u0334", "\\u0415\\u0334\\u0340" },
+ { "\\u0E40\\u0021", "\\u00A1\\u0021"},
+ { "\\u0E40\\u0021", "\\uFE57\\u0062"},
+ { "\\u5F20", "\\u5F20\\u4E00\\u8E3F"},
+ { "\\u0000\\u0020", "\\u0000\\u0020\\u0000"},
+ { "\\u0020", "\\u0020\\u0000"}
+/*
+5F20 (my result here)
+5F204E008E3F
+5F20 (your result here)
+*/
+ };
+
+ int32_t i = 0;
+
+ UCollator *coll = ucol_open("", &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ conv = ucnv_open("UTF16BE", &status);
+ for(i = 0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
+ U16LenS = u_unescape(pairs[i][0], U16Source, CMSCOLL_ALEXIS2_BUFFER_SIZE);
+ U16LenT = u_unescape(pairs[i][1], U16Target, CMSCOLL_ALEXIS2_BUFFER_SIZE);
+
+ resU16 = ucol_strcoll(coll, U16Source, U16LenS, U16Target, U16LenT);
+
+ log_verbose("Result of strcoll is %i\n", resU16);
+
+ U16BELenS = ucnv_fromUChars(conv, U16BESource, CMSCOLL_ALEXIS2_BUFFER_SIZE, U16Source, U16LenS, &status);
+ U16BELenT = ucnv_fromUChars(conv, U16BETarget, CMSCOLL_ALEXIS2_BUFFER_SIZE, U16Target, U16LenT, &status);
+
+ /* use the original sizes, as the result from converter is in bytes */
+ uiter_setUTF16BE(&U16BEItS, U16BESource, U16LenS);
+ uiter_setUTF16BE(&U16BEItT, U16BETarget, U16LenT);
+
+ resU16BE = ucol_strcollIter(coll, &U16BEItS, &U16BEItT, &status);
+
+ log_verbose("Result of U16BE is %i\n", resU16BE);
+
+ if(resU16 != resU16BE) {
+ log_verbose("Different results between UTF16 and UTF16BE for %s & %s\n", pairs[i][0], pairs[i][1]);
+ }
+
+ u_strToUTF8(U8Source, CMSCOLL_ALEXIS2_BUFFER_SIZE, &U8LenS, U16Source, U16LenS, &status);
+ u_strToUTF8(U8Target, CMSCOLL_ALEXIS2_BUFFER_SIZE, &U8LenT, U16Target, U16LenT, &status);
+
+ uiter_setUTF8(&U8ItS, U8Source, U8LenS);
+ uiter_setUTF8(&U8ItT, U8Target, U8LenT);
+
+ resU8 = ucol_strcollIter(coll, &U8ItS, &U8ItT, &status);
+
+ if(resU16 != resU8) {
+ log_verbose("Different results between UTF16 and UTF8 for %s & %s\n", pairs[i][0], pairs[i][1]);
+ }
+
+ }
+
+ ucol_close(coll);
+ ucnv_close(conv);
+}
+
+static void TestHebrewUCA(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ static const char *first[] = {
+ "d790d6b8d79cd795d6bcd7a9",
+ "d790d79cd79ed7a7d799d799d7a1",
+ "d790d6b4d79ed795d6bcd7a9",
+ };
+
+ char utf8String[3][256];
+ UChar utf16String[3][256];
+
+ int32_t i = 0, j = 0;
+ int32_t sizeUTF8[3];
+ int32_t sizeUTF16[3];
+
+ UCollator *coll = ucol_open("", &status);
+ /*ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);*/
+
+ for(i = 0; i < sizeof(first)/sizeof(first[0]); i++) {
+ sizeUTF8[i] = u_parseUTF8(first[i], -1, utf8String[i], 256, &status);
+ u_strFromUTF8(utf16String[i], 256, &sizeUTF16[i], utf8String[i], sizeUTF8[i], &status);
+ log_verbose("%i: ");
+ for(j = 0; j < sizeUTF16[i]; j++) {
+ /*log_verbose("\\u%04X", utf16String[i][j]);*/
+ log_verbose("%04X", utf16String[i][j]);
+ }
+ log_verbose("\n");
+ }
+ for(i = 0; i < sizeof(first)/sizeof(first[0])-1; i++) {
+ for(j = i + 1; j < sizeof(first)/sizeof(first[0]); j++) {
+ doTest(coll, utf16String[i], utf16String[j], UCOL_LESS);
+ }
+ }
+
+ ucol_close(coll);
+
+}
+
+static void TestPartialSortKeyTermination(void) {
+ static const char* cases[] = {
+ "\\u1234\\u1234\\udc00",
+ "\\udc00\\ud800\\ud800"
+ };
+
+ int32_t i = sizeof(UCollator);
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ UCollator *coll = ucol_open("", &status);
+
+ UCharIterator iter;
+
+ UChar currCase[256];
+ int32_t length = 0;
+ int32_t pKeyLen = 0;
+
+ uint8_t key[256];
+
+ for(i = 0; i < sizeof(cases)/sizeof(cases[0]); i++) {
+ uint32_t state[2] = {0, 0};
+ length = u_unescape(cases[i], currCase, 256);
+ uiter_setString(&iter, currCase, length);
+ pKeyLen = ucol_nextSortKeyPart(coll, &iter, state, key, 256, &status);
+
+ log_verbose("Done\n");
+
+ }
+ ucol_close(coll);
+}
+
+static void TestSettings(void) {
+ static const char* cases[] = {
+ "apple",
+ "Apple"
+ };
+
+ static const char* locales[] = {
+ "",
+ "en"
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ int32_t i = 0, j = 0;
+
+ UChar source[256], target[256];
+ int32_t sLen = 0, tLen = 0;
+
+ UCollator *collateObject = NULL;
+ for(i = 0; i < sizeof(locales)/sizeof(locales[0]); i++) {
+ collateObject = ucol_open(locales[i], &status);
+ ucol_setStrength(collateObject, UCOL_PRIMARY);
+ ucol_setAttribute(collateObject, UCOL_CASE_LEVEL , UCOL_OFF, &status);
+ for(j = 1; j < sizeof(cases)/sizeof(cases[0]); j++) {
+ sLen = u_unescape(cases[j-1], source, 256);
+ source[sLen] = 0;
+ tLen = u_unescape(cases[j], target, 256);
+ source[tLen] = 0;
+ doTest(collateObject, source, target, UCOL_EQUAL);
+ }
+ ucol_close(collateObject);
+ }
+}
+
+static int32_t TestEqualsForCollator(const char* locName, UCollator *source, UCollator *target) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t errorNo = 0;
+ /*const UChar *sourceRules = NULL;*/
+ /*int32_t sourceRulesLen = 0;*/
+ UColAttributeValue french = UCOL_OFF;
+ int32_t cloneSize = 0;
+
+ if(!ucol_equals(source, target)) {
+ log_err("Same collators, different address not equal\n");
+ errorNo++;
+ }
+ ucol_close(target);
+ if(uprv_strcmp(ucol_getLocale(source, ULOC_REQUESTED_LOCALE, &status), ucol_getLocale(source, ULOC_ACTUAL_LOCALE, &status)) == 0) {
+ /* currently, safeClone is implemented through getRules/openRules
+ * so it is the same as the test below - I will comment that test out.
+ */
+ /* real thing */
+ target = ucol_safeClone(source, NULL, &cloneSize, &status);
+ if(U_FAILURE(status)) {
+ log_err("Error creating clone\n");
+ errorNo++;
+ return errorNo;
+ }
+ if(!ucol_equals(source, target)) {
+ log_err("Collator different from it's clone\n");
+ errorNo++;
+ }
+ french = ucol_getAttribute(source, UCOL_FRENCH_COLLATION, &status);
+ if(french == UCOL_ON) {
+ ucol_setAttribute(target, UCOL_FRENCH_COLLATION, UCOL_OFF, &status);
+ } else {
+ ucol_setAttribute(target, UCOL_FRENCH_COLLATION, UCOL_ON, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error setting attributes\n");
+ errorNo++;
+ return errorNo;
+ }
+ if(ucol_equals(source, target)) {
+ log_err("Collators same even when options changed\n");
+ errorNo++;
+ }
+ ucol_close(target);
+ /* commented out since safeClone uses exactly the same technique */
+ /*
+ sourceRules = ucol_getRules(source, &sourceRulesLen);
+ target = ucol_openRules(sourceRules, sourceRulesLen, UCOL_DEFAULT, UCOL_DEFAULT, &parseError, &status);
+ if(U_FAILURE(status)) {
+ log_err("Error instantiating target from rules\n");
+ errorNo++;
+ return errorNo;
+ }
+ if(!ucol_equals(source, target)) {
+ log_err("Collator different from collator that was created from the same rules\n");
+ errorNo++;
+ }
+ ucol_close(target);
+ */
+ }
+ return errorNo;
+}
+
+
+static void TestEquals(void) {
+ /* ucol_equals is not currently a public API. There is a chance that it will become
+ * something like this, but currently it is only used by RuleBasedCollator::operator==
+ */
+ /* test whether the two collators instantiated from the same locale are equal */
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ int32_t noOfLoc = uloc_countAvailable();
+ const char *locName = NULL;
+ UCollator *source = NULL, *target = NULL;
+ int32_t i = 0;
+
+ const char* rules[] = {
+ "&l < lj <<< Lj <<< LJ",
+ "&n < nj <<< Nj <<< NJ",
+ "&ae <<< \\u00e4",
+ "&AE <<< \\u00c4"
+ };
+ /*
+ const char* badRules[] = {
+ "&l <<< Lj",
+ "&n < nj <<< nJ <<< NJ",
+ "&a <<< \\u00e4",
+ "&AE <<< \\u00c4 <<< x"
+ };
+ */
+
+ UChar sourceRules[1024], targetRules[1024];
+ int32_t sourceRulesSize = 0, targetRulesSize = 0;
+ int32_t rulesSize = sizeof(rules)/sizeof(rules[0]);
+
+ for(i = 0; i < rulesSize; i++) {
+ sourceRulesSize += u_unescape(rules[i], sourceRules+sourceRulesSize, 1024 - sourceRulesSize);
+ targetRulesSize += u_unescape(rules[rulesSize-i-1], targetRules+targetRulesSize, 1024 - targetRulesSize);
+ }
+
+ source = ucol_openRules(sourceRules, sourceRulesSize, UCOL_DEFAULT, UCOL_DEFAULT, &parseError, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+ target = ucol_openRules(targetRules, targetRulesSize, UCOL_DEFAULT, UCOL_DEFAULT, &parseError, &status);
+ if(!ucol_equals(source, target)) {
+ log_err("Equivalent collators not equal!\n");
+ }
+ ucol_close(source);
+ ucol_close(target);
+
+ source = ucol_open("root", &status);
+ target = ucol_open("root", &status);
+ log_verbose("Testing root\n");
+ if(!ucol_equals(source, source)) {
+ log_err("Same collator not equal\n");
+ }
+ if(TestEqualsForCollator(locName, source, target)) {
+ log_err("Errors for root\n", locName);
+ }
+ ucol_close(source);
+
+ for(i = 0; i<noOfLoc; i++) {
+ status = U_ZERO_ERROR;
+ locName = uloc_getAvailable(i);
+ /*if(hasCollationElements(locName)) {*/
+ log_verbose("Testing equality for locale %s\n", locName);
+ source = ucol_open(locName, &status);
+ target = ucol_open(locName, &status);
+ if(TestEqualsForCollator(locName, source, target)) {
+ log_err("Errors for locale %s\n", locName);
+ }
+ ucol_close(source);
+ /*}*/
+ }
+}
+
+static void TestJ2726(void) {
+ UChar a[2] = { 0x61, 0x00 }; /*"a"*/
+ UChar aSpace[3] = { 0x61, 0x20, 0x00 }; /*"a "*/
+ UChar spaceA[3] = { 0x20, 0x61, 0x00 }; /*" a"*/
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("en", &status);
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_PRIMARY, &status);
+ doTest(coll, a, aSpace, UCOL_EQUAL);
+ doTest(coll, aSpace, a, UCOL_EQUAL);
+ doTest(coll, a, spaceA, UCOL_EQUAL);
+ doTest(coll, spaceA, a, UCOL_EQUAL);
+ doTest(coll, spaceA, aSpace, UCOL_EQUAL);
+ doTest(coll, aSpace, spaceA, UCOL_EQUAL);
+ ucol_close(coll);
+}
+
+static void NullRule(void) {
+ UChar r[3] = {0};
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_openRules(r, 1, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
+ if(U_SUCCESS(status)) {
+ log_err("This should have been an error!\n");
+ ucol_close(coll);
+ } else {
+ status = U_ZERO_ERROR;
+ }
+ coll = ucol_openRules(r, 0, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
+ if(U_FAILURE(status)) {
+ log_err("Empty rules should have produced a valid collator\n");
+ } else {
+ ucol_close(coll);
+ }
+}
+
+/**
+ * Test for CollationElementIterator previous and next for the whole set of
+ * unicode characters with normalization on.
+ */
+static void TestNumericCollation(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ const static char *basicTestStrings[]={
+ "hello1",
+ "hello2",
+ "hello2002",
+ "hello2003",
+ "hello123456",
+ "hello1234567",
+ "hello10000000",
+ "hello100000000",
+ "hello1000000000",
+ "hello10000000000",
+ };
+
+ const static char *preZeroTestStrings[]={
+ "avery10000",
+ "avery010000",
+ "avery0010000",
+ "avery00010000",
+ "avery000010000",
+ "avery0000010000",
+ "avery00000010000",
+ "avery000000010000",
+ };
+
+ const static char *thirtyTwoBitNumericStrings[]={
+ "avery42949672960",
+ "avery42949672961",
+ "avery42949672962",
+ "avery429496729610"
+ };
+
+ const static char *supplementaryDigits[] = {
+ "\\uD835\\uDFCE", /* 0 */
+ "\\uD835\\uDFCF", /* 1 */
+ "\\uD835\\uDFD0", /* 2 */
+ "\\uD835\\uDFD1", /* 3 */
+ "\\uD835\\uDFCF\\uD835\\uDFCE", /* 10 */
+ "\\uD835\\uDFCF\\uD835\\uDFCF", /* 11 */
+ "\\uD835\\uDFCF\\uD835\\uDFD0", /* 12 */
+ "\\uD835\\uDFD0\\uD835\\uDFCE", /* 20 */
+ "\\uD835\\uDFD0\\uD835\\uDFCF", /* 21 */
+ "\\uD835\\uDFD0\\uD835\\uDFD0" /* 22 */
+ };
+
+ const static char *foreignDigits[] = {
+ "\\u0661",
+ "\\u0662",
+ "\\u0663",
+ "\\u0661\\u0660",
+ "\\u0661\\u0662",
+ "\\u0661\\u0663",
+ "\\u0662\\u0660",
+ "\\u0662\\u0662",
+ "\\u0662\\u0663",
+ "\\u0663\\u0660",
+ "\\u0663\\u0662",
+ "\\u0663\\u0663"
+ };
+
+ const static char *evenZeroes[] = {
+ "2000",
+ "2001",
+ "2002",
+ "2003"
+ };
+
+ UColAttribute att = UCOL_NUMERIC_COLLATION;
+ UColAttributeValue val = UCOL_ON;
+
+ /* Open our collator. */
+ UCollator* coll = ucol_open("root", &status);
+ if (U_FAILURE(status)){
+ log_err("ERROR: in using ucol_open()\n %s\n",
+ myErrorName(status));
+ return;
+ }
+ genericLocaleStarterWithOptions("root", basicTestStrings, sizeof(basicTestStrings)/sizeof(basicTestStrings[0]), &att, &val, 1);
+ genericLocaleStarterWithOptions("root", thirtyTwoBitNumericStrings, sizeof(thirtyTwoBitNumericStrings)/sizeof(thirtyTwoBitNumericStrings[0]), &att, &val, 1);
+ genericLocaleStarterWithOptions("en_US", foreignDigits, sizeof(foreignDigits)/sizeof(foreignDigits[0]), &att, &val, 1);
+ genericLocaleStarterWithOptions("root", supplementaryDigits, sizeof(supplementaryDigits)/sizeof(supplementaryDigits[0]), &att, &val, 1);
+ genericLocaleStarterWithOptions("root", evenZeroes, sizeof(evenZeroes)/sizeof(evenZeroes[0]), &att, &val, 1);
+
+ /* Setting up our collator to do digits. */
+ ucol_setAttribute(coll, UCOL_NUMERIC_COLLATION, UCOL_ON, &status);
+ if (U_FAILURE(status)){
+ log_err("ERROR: in setting UCOL_NUMERIC_COLLATION as an attribute\n %s\n",
+ myErrorName(status));
+ return;
+ }
+
+ /*
+ Testing that prepended zeroes still yield the correct collation behavior.
+ We expect that every element in our strings array will be equal.
+ */
+ genericOrderingTestWithResult(coll, preZeroTestStrings, sizeof(preZeroTestStrings)/sizeof(preZeroTestStrings[0]), UCOL_EQUAL);
+
+ ucol_close(coll);
+}
+
+static void TestTibetanConformance(void)
+{
+ const char* test[] = {
+ "\\u0FB2\\u0591\\u0F71\\u0061",
+ "\\u0FB2\\u0F71\\u0061"
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *coll = ucol_open("", &status);
+ UChar source[100];
+ UChar target[100];
+ int result;
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ if (U_SUCCESS(status)) {
+ u_unescape(test[0], source, 100);
+ u_unescape(test[1], target, 100);
+ doTest(coll, source, target, UCOL_EQUAL);
+ result = ucol_strcoll(coll, source, -1, target, -1);
+ log_verbose("result %d\n", result);
+ if (UCOL_EQUAL != result) {
+ log_err("Tibetan comparison error\n");
+ }
+ }
+ ucol_close(coll);
+
+ genericLocaleStarterWithResult("", test, 2, UCOL_EQUAL);
+}
+
+static void TestPinyinProblem(void) {
+ static const char *test[] = { "\\u4E56\\u4E56\\u7761", "\\u4E56\\u5B69\\u5B50" };
+ genericLocaleStarter("zh__PINYIN", test, sizeof(test)/sizeof(test[0]));
+}
+
+#define TST_UCOL_MAX_INPUT 0x220001
+#define topByte 0xFF000000;
+#define bottomByte 0xFF;
+#define fourBytes 0xFFFFFFFF;
+
+
+static void showImplicit(UChar32 i) {
+ if (i >= 0 && i <= TST_UCOL_MAX_INPUT) {
+ log_verbose("%08X\t%08X\n", i, uprv_uca_getImplicitFromRaw(i));
+ }
+}
+
+static void TestImplicitGeneration(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar32 last = 0;
+ UChar32 current;
+ UChar32 i = 0, j = 0;
+ UChar32 roundtrip = 0;
+ UChar32 lastBottom = 0;
+ UChar32 currentBottom = 0;
+ UChar32 lastTop = 0;
+ UChar32 currentTop = 0;
+
+ UCollator *coll = ucol_open("root", &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't open UCA\n");
+ return;
+ }
+
+ uprv_uca_getRawFromImplicit(0xE20303E7);
+
+ for (i = 0; i <= TST_UCOL_MAX_INPUT; ++i) {
+ current = uprv_uca_getImplicitFromRaw(i) & fourBytes;
+
+ /* check that it round-trips AND that all intervening ones are illegal*/
+ roundtrip = uprv_uca_getRawFromImplicit(current);
+ if (roundtrip != i) {
+ log_err("No roundtrip %08X\n", i);
+ }
+ if (last != 0) {
+ for (j = last + 1; j < current; ++j) {
+ roundtrip = uprv_uca_getRawFromImplicit(j);
+ /* raise an error if it *doesn't* find an error*/
+ if (roundtrip != -1) {
+ log_err("Fails to recognize illegal %08X\n", j);
+ }
+ }
+ }
+ /* now do other consistency checks*/
+ lastBottom = last & bottomByte;
+ currentBottom = current & bottomByte;
+ lastTop = last & topByte;
+ currentTop = current & topByte;
+
+ /* print out some values for spot-checking*/
+ if (lastTop != currentTop || i == 0x10000 || i == 0x110000) {
+ showImplicit(i-3);
+ showImplicit(i-2);
+ showImplicit(i-1);
+ showImplicit(i);
+ showImplicit(i+1);
+ showImplicit(i+2);
+ }
+ last = current;
+
+ if(uprv_uca_getCodePointFromRaw(uprv_uca_getRawFromCodePoint(i)) != i) {
+ log_err("No raw <-> code point roundtrip for 0x%08X\n", i);
+ }
+ }
+ showImplicit(TST_UCOL_MAX_INPUT-2);
+ showImplicit(TST_UCOL_MAX_INPUT-1);
+ showImplicit(TST_UCOL_MAX_INPUT);
+ ucol_close(coll);
+}
+
+/**
+ * Iterate through the given iterator, checking to see that all the strings
+ * in the expected array are present.
+ * @param expected array of strings we expect to see, or NULL
+ * @param expectedCount number of elements of expected, or 0
+ */
+static int32_t checkUEnumeration(const char* msg,
+ UEnumeration* iter,
+ const char** expected,
+ int32_t expectedCount) {
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t i = 0, n, j, bit;
+ int32_t seenMask = 0;
+
+ U_ASSERT(expectedCount >= 0 && expectedCount < 31); /* [sic] 31 not 32 */
+ n = uenum_count(iter, &ec);
+ if (!assertSuccess("count", &ec)) return -1;
+ log_verbose("%s = [", msg);
+ for (;; ++i) {
+ const char* s = uenum_next(iter, NULL, &ec);
+ if (!assertSuccess("snext", &ec) || s == NULL) break;
+ if (i != 0) log_verbose(",");
+ log_verbose("%s", s);
+ /* check expected list */
+ for (j=0, bit=1; j<expectedCount; ++j, bit<<=1) {
+ if ((seenMask&bit) == 0 &&
+ uprv_strcmp(s, expected[j]) == 0) {
+ seenMask |= bit;
+ break;
+ }
+ }
+ }
+ log_verbose("] (%d)\n", i);
+ assertTrue("count verified", i==n);
+ /* did we see all expected strings? */
+ for (j=0, bit=1; j<expectedCount; ++j, bit<<=1) {
+ if ((seenMask&bit)!=0) {
+ log_verbose("Ok: \"%s\" seen\n", expected[j]);
+ } else {
+ log_err("FAIL: \"%s\" not seen\n", expected[j]);
+ }
+ }
+ return n;
+}
+
+/**
+ * Test new API added for separate collation tree.
+ */
+static void TestSeparateTrees(void) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UEnumeration *e = NULL;
+ int32_t n = -1;
+ UBool isAvailable;
+ char loc[256];
+
+ static const char* AVAIL[] = { "en", "de" };
+
+ static const char* KW[] = { "collation" };
+
+ static const char* KWVAL[] = { "phonebook", "stroke" };
+
+#if !UCONFIG_NO_SERVICE
+ e = ucol_openAvailableLocales(&ec);
+ assertSuccess("ucol_openAvailableLocales", &ec);
+ assertTrue("ucol_openAvailableLocales!=0", e!=0);
+ n = checkUEnumeration("ucol_openAvailableLocales", e, AVAIL, LEN(AVAIL));
+ /* Don't need to check n because we check list */
+ uenum_close(e);
+#endif
+
+ e = ucol_getKeywords(&ec);
+ assertSuccess("ucol_getKeywords", &ec);
+ assertTrue("ucol_getKeywords!=0", e!=0);
+ n = checkUEnumeration("ucol_getKeywords", e, KW, LEN(KW));
+ /* Don't need to check n because we check list */
+ uenum_close(e);
+
+ e = ucol_getKeywordValues(KW[0], &ec);
+ assertSuccess("ucol_getKeywordValues", &ec);
+ assertTrue("ucol_getKeywordValues!=0", e!=0);
+ n = checkUEnumeration("ucol_getKeywordValues", e, KWVAL, LEN(KWVAL));
+ /* Don't need to check n because we check list */
+ uenum_close(e);
+
+ /* Try setting a warning before calling ucol_getKeywordValues */
+ ec = U_USING_FALLBACK_WARNING;
+ e = ucol_getKeywordValues(KW[0], &ec);
+ assertSuccess("ucol_getKeywordValues [with warning code set]", &ec);
+ assertTrue("ucol_getKeywordValues!=0 [with warning code set]", e!=0);
+ n = checkUEnumeration("ucol_getKeywordValues [with warning code set]", e, KWVAL, LEN(KWVAL));
+ /* Don't need to check n because we check list */
+ uenum_close(e);
+
+ /*
+U_DRAFT int32_t U_EXPORT2
+ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
+ const char* locale, UBool* isAvailable,
+ UErrorCode* status);
+}
+*/
+ n = ucol_getFunctionalEquivalent(loc, sizeof(loc), "collation", "fr",
+ &isAvailable, &ec);
+ assertSuccess("getFunctionalEquivalent", &ec);
+ assertEquals("getFunctionalEquivalent(fr)", "fr", loc);
+ assertTrue("getFunctionalEquivalent(fr).isAvailable==TRUE",
+ isAvailable == TRUE);
+
+ n = ucol_getFunctionalEquivalent(loc, sizeof(loc), "collation", "fr_FR",
+ &isAvailable, &ec);
+ assertSuccess("getFunctionalEquivalent", &ec);
+ assertEquals("getFunctionalEquivalent(fr_FR)", "fr", loc);
+ assertTrue("getFunctionalEquivalent(fr_FR).isAvailable==TRUE",
+ isAvailable == TRUE);
+}
+
+/* supercedes TestJ784 */
+static void TestBeforePinyin(void) {
+ const static char rules[] = {
+ "&[before 2]A<<\\u0101<<<\\u0100<<\\u00E1<<<\\u00C1<<\\u01CE<<<\\u01CD<<\\u00E0<<<\\u00C0"
+ "&[before 2]e<<\\u0113<<<\\u0112<<\\u00E9<<<\\u00C9<<\\u011B<<<\\u011A<<\\u00E8<<<\\u00C8"
+ "&[before 2]i<<\\u012B<<<\\u012A<<\\u00ED<<<\\u00CD<<\\u01D0<<<\\u01CF<<\\u00EC<<<\\u00CC"
+ "&[before 2]o<<\\u014D<<<\\u014C<<\\u00F3<<<\\u00D3<<\\u01D2<<<\\u01D1<<\\u00F2<<<\\u00D2"
+ "&[before 2]u<<\\u016B<<<\\u016A<<\\u00FA<<<\\u00DA<<\\u01D4<<<\\u01D3<<\\u00F9<<<\\u00D9"
+ "&U<<\\u01D6<<<\\u01D5<<\\u01D8<<<\\u01D7<<\\u01DA<<<\\u01D9<<\\u01DC<<<\\u01DB<<\\u00FC"
+ };
+
+ const static char *test[] = {
+ "l\\u0101",
+ "la",
+ "l\\u0101n",
+ "lan ",
+ "l\\u0113",
+ "le",
+ "l\\u0113n",
+ "len"
+ };
+
+ const static char *test2[] = {
+ "x\\u0101",
+ "x\\u0100",
+ "X\\u0101",
+ "X\\u0100",
+ "x\\u00E1",
+ "x\\u00C1",
+ "X\\u00E1",
+ "X\\u00C1",
+ "x\\u01CE",
+ "x\\u01CD",
+ "X\\u01CE",
+ "X\\u01CD",
+ "x\\u00E0",
+ "x\\u00C0",
+ "X\\u00E0",
+ "X\\u00C0",
+ "xa",
+ "xA",
+ "Xa",
+ "XA",
+ "x\\u0101x",
+ "x\\u0100x",
+ "x\\u00E1x",
+ "x\\u00C1x",
+ "x\\u01CEx",
+ "x\\u01CDx",
+ "x\\u00E0x",
+ "x\\u00C0x",
+ "xax",
+ "xAx"
+ };
+
+ genericRulesStarter(rules, test, sizeof(test)/sizeof(test[0]));
+ genericLocaleStarter("zh", test, sizeof(test)/sizeof(test[0]));
+ genericRulesStarter(rules, test2, sizeof(test2)/sizeof(test2[0]));
+ genericLocaleStarter("zh", test2, sizeof(test2)/sizeof(test2[0]));
+}
+
+static void TestBeforeTightening(void) {
+ static const struct {
+ const char *rules;
+ UErrorCode expectedStatus;
+ } tests[] = {
+ { "&[before 1]a<x", U_ZERO_ERROR },
+ { "&[before 1]a<<x", U_INVALID_FORMAT_ERROR },
+ { "&[before 1]a<<<x", U_INVALID_FORMAT_ERROR },
+ { "&[before 1]a=x", U_INVALID_FORMAT_ERROR },
+ { "&[before 2]a<x",U_INVALID_FORMAT_ERROR },
+ { "&[before 2]a<<x",U_ZERO_ERROR },
+ { "&[before 2]a<<<x",U_INVALID_FORMAT_ERROR },
+ { "&[before 2]a=x",U_INVALID_FORMAT_ERROR },
+ { "&[before 3]a<x",U_INVALID_FORMAT_ERROR },
+ { "&[before 3]a<<x",U_INVALID_FORMAT_ERROR },
+ { "&[before 3]a<<<x",U_ZERO_ERROR },
+ { "&[before 3]a=x",U_INVALID_FORMAT_ERROR },
+ { "&[before I]a = x",U_INVALID_FORMAT_ERROR }
+ };
+
+ int32_t i = 0;
+
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rlz[RULE_BUFFER_LEN] = { 0 };
+ uint32_t rlen = 0;
+
+ UCollator *coll = NULL;
+
+
+ for(i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
+ rlen = u_unescape(tests[i].rules, rlz, RULE_BUFFER_LEN);
+ coll = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT,NULL, &status);
+ if(status != tests[i].expectedStatus) {
+ log_err("Opening a collator with rules %s returned error code %s, expected %s\n",
+ tests[i].rules, u_errorName(status), u_errorName(tests[i].expectedStatus));
+ }
+ ucol_close(coll);
+ status = U_ZERO_ERROR;
+ }
+
+}
+
+#if 0
+&m < a
+&[before 1] a < x <<< X << q <<< Q < z
+assert: m <<< M < x <<< X << q <<< Q < z < a < n
+
+&m < a
+&[before 2] a << x <<< X << q <<< Q < z
+assert: m <<< M < x <<< X << q <<< Q << a < z < n
+
+&m < a
+&[before 3] a <<< x <<< X << q <<< Q < z
+assert: m <<< M < x <<< X <<< a << q <<< Q < z < n
+
+
+&m << a
+&[before 1] a < x <<< X << q <<< Q < z
+assert: x <<< X << q <<< Q < z < m <<< M << a < n
+
+&m << a
+&[before 2] a << x <<< X << q <<< Q < z
+assert: m <<< M << x <<< X << q <<< Q << a < z < n
+
+&m << a
+&[before 3] a <<< x <<< X << q <<< Q < z
+assert: m <<< M << x <<< X <<< a << q <<< Q < z < n
+
+
+&m <<< a
+&[before 1] a < x <<< X << q <<< Q < z
+assert: x <<< X << q <<< Q < z < n < m <<< a <<< M
+
+&m <<< a
+&[before 2] a << x <<< X << q <<< Q < z
+assert: x <<< X << q <<< Q << m <<< a <<< M < z < n
+
+&m <<< a
+&[before 3] a <<< x <<< X << q <<< Q < z
+assert: m <<< x <<< X <<< a <<< M << q <<< Q < z < n
+
+
+&[before 1] s < x <<< X << q <<< Q < z
+assert: r <<< R < x <<< X << q <<< Q < z < s < n
+
+&[before 2] s << x <<< X << q <<< Q < z
+assert: r <<< R < x <<< X << q <<< Q << s < z < n
+
+&[before 3] s <<< x <<< X << q <<< Q < z
+assert: r <<< R < x <<< X <<< s << q <<< Q < z < n
+
+
+&[before 1] \u24DC < x <<< X << q <<< Q < z
+assert: x <<< X << q <<< Q < z < n < m <<< \u24DC <<< M
+
+&[before 2] \u24DC << x <<< X << q <<< Q < z
+assert: x <<< X << q <<< Q << m <<< \u24DC <<< M < z < n
+
+&[before 3] \u24DC <<< x <<< X << q <<< Q < z
+assert: m <<< x <<< X <<< \u24DC <<< M << q <<< Q < z < n
+#endif
+
+
+#if 0
+/* requires features not yet supported */
+static void TestMoreBefore(void) {
+ static const struct {
+ const char* rules;
+ const char* order[16];
+ int32_t size;
+ } tests[] = {
+ { "&m < a &[before 1] a < x <<< X << q <<< Q < z",
+ { "m","M","x","X","q","Q","z","a","n" }, 9},
+ { "&m < a &[before 2] a << x <<< X << q <<< Q < z",
+ { "m","M","x","X","q","Q","a","z","n" }, 9},
+ { "&m < a &[before 3] a <<< x <<< X << q <<< Q < z",
+ { "m","M","x","X","a","q","Q","z","n" }, 9},
+ { "&m << a &[before 1] a < x <<< X << q <<< Q < z",
+ { "x","X","q","Q","z","m","M","a","n" }, 9},
+ { "&m << a &[before 2] a << x <<< X << q <<< Q < z",
+ { "m","M","x","X","q","Q","a","z","n" }, 9},
+ { "&m << a &[before 3] a <<< x <<< X << q <<< Q < z",
+ { "m","M","x","X","a","q","Q","z","n" }, 9},
+ { "&m <<< a &[before 1] a < x <<< X << q <<< Q < z",
+ { "x","X","q","Q","z","n","m","a","M" }, 9},
+ { "&m <<< a &[before 2] a << x <<< X << q <<< Q < z",
+ { "x","X","q","Q","m","a","M","z","n" }, 9},
+ { "&m <<< a &[before 3] a <<< x <<< X << q <<< Q < z",
+ { "m","x","X","a","M","q","Q","z","n" }, 9},
+ { "&[before 1] s < x <<< X << q <<< Q < z",
+ { "r","R","x","X","q","Q","z","s","n" }, 9},
+ { "&[before 2] s << x <<< X << q <<< Q < z",
+ { "r","R","x","X","q","Q","s","z","n" }, 9},
+ { "&[before 3] s <<< x <<< X << q <<< Q < z",
+ { "r","R","x","X","s","q","Q","z","n" }, 9},
+ { "&[before 1] \\u24DC < x <<< X << q <<< Q < z",
+ { "x","X","q","Q","z","n","m","\\u24DC","M" }, 9},
+ { "&[before 2] \\u24DC << x <<< X << q <<< Q < z",
+ { "x","X","q","Q","m","\\u24DC","M","z","n" }, 9},
+ { "&[before 3] \\u24DC <<< x <<< X << q <<< Q < z",
+ { "m","x","X","\\u24DC","M","q","Q","z","n" }, 9}
+ };
+
+ int32_t i = 0;
+
+ for(i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
+ genericRulesStarter(tests[i].rules, tests[i].order, tests[i].size);
+ }
+}
+#endif
+
+static void TestTailorNULL( void ) {
+ const static char* rule = "&a <<< '\\u0000'";
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rlz[RULE_BUFFER_LEN] = { 0 };
+ uint32_t rlen = 0;
+ UChar a = 1, null = 0;
+ UCollationResult res = UCOL_EQUAL;
+
+ UCollator *coll = NULL;
+
+
+ rlen = u_unescape(rule, rlz, RULE_BUFFER_LEN);
+ coll = ucol_openRules(rlz, rlen, UCOL_DEFAULT, UCOL_DEFAULT,NULL, &status);
+
+ if(U_FAILURE(status)) {
+ log_err("Could not open default collator!\n");
+ } else {
+ res = ucol_strcoll(coll, &a, 1, &null, 1);
+
+ if(res != UCOL_LESS) {
+ log_err("NULL was not tailored properly!\n");
+ }
+ }
+
+ ucol_close(coll);
+}
+
+static void
+TestThaiSortKey(void)
+{
+ UChar yamakan = 0x0E4E;
+ UErrorCode status = U_ZERO_ERROR;
+ uint8_t key[256];
+ int32_t keyLen = 0;
+ /* NOTE: there is a Thai tailoring that moves Yammakan. It should not move it, */
+ /* since it stays in the same relative position. This should be addressed in CLDR */
+ /* UCA 4.0 uint8_t expectedKey[256] = { 0x01, 0xd9, 0xb2, 0x01, 0x05, 0x00 }; */
+ /* UCA 4.1 uint8_t expectedKey[256] = { 0x01, 0xdb, 0x3a, 0x01, 0x05, 0x00 }; */
+ /* UCA 5.0 moves Yammakan */
+ uint8_t expectedKey[256] = { 0x01, 0xdc, 0xce, 0x01, 0x05, 0x00 };
+ UCollator *coll = ucol_open("th", &status);
+ if(U_FAILURE(status)) {
+ log_err("Could not open a collator, exiting (%s)\n", u_errorName(status));
+ return;
+ }
+
+ keyLen = ucol_getSortKey(coll, &yamakan, 1, key, 256);
+ if(strcmp((char *)key, (char *)expectedKey)) {
+ log_err("Yammakan key is different from ICU 34!\n");
+ }
+
+ ucol_close(coll);
+}
+
+static void
+TestUpperFirstQuaternary(void)
+{
+ const char* tests[] = { "B", "b", "Bb", "bB" };
+ UColAttribute att[] = { UCOL_STRENGTH, UCOL_CASE_FIRST };
+ UColAttributeValue attVals[] = { UCOL_QUATERNARY, UCOL_UPPER_FIRST };
+ genericLocaleStarterWithOptions("root", tests, sizeof(tests)/sizeof(tests[0]), att, attVals, sizeof(att)/sizeof(att[0]));
+}
+
+static void
+TestJ4960(void)
+{
+ const char* tests[] = { "\\u00e2T", "aT" };
+ UColAttribute att[] = { UCOL_STRENGTH, UCOL_CASE_LEVEL };
+ UColAttributeValue attVals[] = { UCOL_PRIMARY, UCOL_ON };
+ const char* tests2[] = { "a", "A" };
+ const char* rule = "&[first tertiary ignorable]=A=a";
+ UColAttribute att2[] = { UCOL_CASE_LEVEL };
+ UColAttributeValue attVals2[] = { UCOL_ON };
+ /* Test whether we correctly ignore primary ignorables on case level when */
+ /* we have only primary & case level */
+ genericLocaleStarterWithOptionsAndResult("root", tests, sizeof(tests)/sizeof(tests[0]), att, attVals, sizeof(att)/sizeof(att[0]), UCOL_EQUAL);
+ /* Test whether ICU4J will make case level for sortkeys that have primary strength */
+ /* and case level */
+ genericLocaleStarterWithOptions("root", tests2, sizeof(tests2)/sizeof(tests2[0]), att, attVals, sizeof(att)/sizeof(att[0]));
+ /* Test whether completely ignorable letters have case level info (they shouldn't) */
+ genericRulesStarterWithOptionsAndResult(rule, tests2, sizeof(tests2)/sizeof(tests2[0]), att2, attVals2, sizeof(att2)/sizeof(att2[0]), UCOL_EQUAL);
+}
+
+static void
+TestJ5223(void)
+{
+ static const char *test = "this is a test string";
+ UChar ustr[256];
+ int32_t ustr_length = u_unescape(test, ustr, 256);
+ unsigned char sortkey[256];
+ int32_t sortkey_length;
+ UErrorCode status = U_ZERO_ERROR;
+ static UCollator *coll = NULL;
+ coll = ucol_open("root", &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't open UCA\n");
+ return;
+ }
+ ucol_setStrength(coll, UCOL_PRIMARY);
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_PRIMARY, &status);
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ if (U_FAILURE(status)) {
+ log_err("Failed setting atributes\n");
+ return;
+ }
+ sortkey_length = ucol_getSortKey(coll, ustr, ustr_length, NULL, 0);
+ if (sortkey_length > 256) return;
+
+ /* we mark the position where the null byte should be written in advance */
+ sortkey[sortkey_length-1] = 0xAA;
+
+ /* we set the buffer size one byte higher than needed */
+ sortkey_length = ucol_getSortKey(coll, ustr, ustr_length, sortkey,
+ sortkey_length+1);
+
+ /* no error occurs (for me) */
+ if (sortkey[sortkey_length-1] == 0xAA) {
+ log_err("Hit bug at first try\n");
+ }
+
+ /* we mark the position where the null byte should be written again */
+ sortkey[sortkey_length-1] = 0xAA;
+
+ /* this time we set the buffer size to the exact amount needed */
+ sortkey_length = ucol_getSortKey(coll, ustr, ustr_length, sortkey,
+ sortkey_length);
+
+ /* now the trailing null byte is not written */
+ if (sortkey[sortkey_length-1] == 0xAA) {
+ log_err("Hit bug at second try\n");
+ }
+
+ ucol_close(coll);
+}
+
+/* Regression test for Thai partial sort key problem */
+static void
+TestJ5232(void)
+{
+ const static char *test[] = {
+ "\\u0e40\\u0e01\\u0e47\\u0e1a\\u0e40\\u0e25\\u0e47\\u0e21",
+ "\\u0e40\\u0e01\\u0e47\\u0e1a\\u0e40\\u0e25\\u0e48\\u0e21"
+ };
+
+ genericLocaleStarter("th", test, sizeof(test)/sizeof(test[0]));
+}
+
+static void
+TestJ5367(void)
+{
+ const static char *test[] = { "a", "y" };
+ const char* rules = "&Ny << Y &[first secondary ignorable] <<< a";
+ genericRulesStarter(rules, test, sizeof(test)/sizeof(test[0]));
+}
+
+static void
+TestVI5913(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i, j;
+ UCollator *coll =NULL;
+ uint8_t resColl[100], expColl[100];
+ int32_t rLen, tLen, ruleLen, sLen, kLen;
+ UChar rule[256]={0x26, 0x62, 0x3c, 0x1FF3, 0}; /* &a<0x1FF3-omega with Ypogegrammeni*/
+ UChar rule2[256]={0x26, 0x7a, 0x3c, 0x0161, 0}; /* &z<s with caron*/
+ UChar rule3[256]={0x26, 0x7a, 0x3c, 0x0061, 0x00ea, 0}; /* &z<a+e with circumflex.*/
+ UChar tData[][20]={
+ {0x1EAC, 0},
+ {0x0041, 0x0323, 0x0302, 0},
+ {0x1EA0, 0x0302, 0},
+ {0x00C2, 0x0323, 0},
+ {0x1ED8, 0}, /* O with dot and circumflex */
+ {0x1ECC, 0x0302, 0},
+ {0x1EB7, 0},
+ {0x1EA1, 0x0306, 0},
+ };
+ UChar tailorData[][20]={
+ {0x1FA2, 0}, /* Omega with 3 combining marks */
+ {0x03C9, 0x0313, 0x0300, 0x0345, 0},
+ {0x1FF3, 0x0313, 0x0300, 0},
+ {0x1F60, 0x0300, 0x0345, 0},
+ {0x1F62, 0x0345, 0},
+ {0x1FA0, 0x0300, 0},
+ };
+ UChar tailorData2[][20]={
+ {0x1E63, 0x030C, 0}, /* s with dot below + caron */
+ {0x0073, 0x0323, 0x030C, 0},
+ {0x0073, 0x030C, 0x0323, 0},
+ };
+ UChar tailorData3[][20]={
+ {0x007a, 0}, /* z */
+ {0x0061, 0x0065, 0}, /* a + e */
+ {0x0061, 0x00ea, 0}, /* a + e with circumflex */
+ {0x0061, 0x1EC7, 0}, /* a+ e with dot below and circumflex */
+ {0x0061, 0x1EB9, 0x0302, 0}, /* a + e with dot below + combining circumflex */
+ {0x0061, 0x00EA, 0x0323, 0}, /* a + e with circumflex + combining dot below */
+ {0x00EA, 0x0323, 0}, /* e with circumflex + combining dot below */
+ {0x00EA, 0}, /* e with circumflex */
+ };
+
+ /* Test Vietnamese sort. */
+ coll = ucol_open("vi", &status);
+ log_verbose("\n\nVI collation:");
+ if ( !ucol_equal(coll, tData[0], u_strlen(tData[0]), tData[2], u_strlen(tData[2])) ) {
+ log_err("\\u1EAC not equals to \\u1EA0+\\u0302\n");
+ }
+ if ( !ucol_equal(coll, tData[0], u_strlen(tData[0]), tData[3], u_strlen(tData[3])) ) {
+ log_err("\\u1EAC not equals to \\u00c2+\\u0323\n");
+ }
+ if ( !ucol_equal(coll, tData[5], u_strlen(tData[5]), tData[4], u_strlen(tData[4])) ) {
+ log_err("\\u1ED8 not equals to \\u1ECC+\\u0302\n");
+ }
+ if ( !ucol_equal(coll, tData[7], u_strlen(tData[7]), tData[6], u_strlen(tData[6])) ) {
+ log_err("\\u1EB7 not equals to \\u1EA1+\\u0306\n");
+ }
+
+ for (j=0; j<8; j++) {
+ tLen = u_strlen(tData[j]);
+ log_verbose("\n Data :%s \tlen: %d key: ", tData[j], tLen);
+ rLen = ucol_getSortKey(coll, tData[j], tLen, resColl, 100);
+ for(i = 0; i<rLen; i++) {
+ log_verbose(" %02X", resColl[i]);
+ }
+ }
+
+ ucol_close(coll);
+
+ /* Test Russian sort. */
+ coll = ucol_open("ro", &status);
+ log_verbose("\n\nRO collation:");
+ if ( !ucol_equal(coll, tData[0], u_strlen(tData[0]), tData[1], u_strlen(tData[1])) ) {
+ log_err("\\u1EAC not equals to \\u1EA0+\\u0302\n");
+ }
+ if ( !ucol_equal(coll, tData[4], u_strlen(tData[4]), tData[5], u_strlen(tData[5])) ) {
+ log_err("\\u1EAC not equals to \\u00c2+\\u0323\n");
+ }
+ if ( !ucol_equal(coll, tData[6], u_strlen(tData[6]), tData[7], u_strlen(tData[7])) ) {
+ log_err("\\u1EB7 not equals to \\u1EA1+\\u0306\n");
+ }
+
+ for (j=4; j<8; j++) {
+ tLen = u_strlen(tData[j]);
+ log_verbose("\n Data :%s \tlen: %d key: ", tData[j], tLen);
+ rLen = ucol_getSortKey(coll, tData[j], tLen, resColl, 100);
+ for(i = 0; i<rLen; i++) {
+ log_verbose(" %02X", resColl[i]);
+ }
+ }
+ ucol_close(coll);
+
+ /* Test the precomposed Greek character with 3 combining marks. */
+ log_verbose("\n\nTailoring test: Greek character with 3 combining marks");
+ ruleLen = u_strlen(rule);
+ coll = ucol_openRules(rule, ruleLen, UCOL_OFF, UCOL_TERTIARY, NULL,&status);
+ sLen = u_strlen(tailorData[0]);
+ for (j=1; j<6; j++) {
+ tLen = u_strlen(tailorData[j]);
+ if ( !ucol_equal(coll, tailorData[0], sLen, tailorData[j], tLen)) {
+ log_err("\n \\u1FA2 not equals to data[%d]:%s\n", j, tailorData[j]);
+ }
+ }
+ /* Test getSortKey. */
+ tLen = u_strlen(tailorData[0]);
+ kLen=ucol_getSortKey(coll, tailorData[0], tLen, expColl, 100);
+ for (j=0; j<6; j++) {
+ tLen = u_strlen(tailorData[j]);
+ rLen = ucol_getSortKey(coll, tailorData[j], tLen, resColl, 100);
+ if ( kLen!=rLen || uprv_memcmp(expColl, resColl, rLen*sizeof(uint8_t))!=0 ) {
+ log_err("\n Data[%d] :%s \tlen: %d key: ", j, tailorData[j], tLen);
+ for(i = 0; i<rLen; i++) {
+ log_err(" %02X", resColl[i]);
+ }
+ }
+ }
+ ucol_close(coll);
+
+ log_verbose("\n\nTailoring test for s with caron:");
+ ruleLen = u_strlen(rule2);
+ coll = ucol_openRules(rule2, ruleLen, UCOL_OFF, UCOL_TERTIARY, NULL,&status);
+ tLen = u_strlen(tailorData2[0]);
+ kLen=ucol_getSortKey(coll, tailorData2[0], tLen, expColl, 100);
+ for (j=1; j<3; j++) {
+ tLen = u_strlen(tailorData2[j]);
+ rLen = ucol_getSortKey(coll, tailorData2[j], tLen, resColl, 100);
+ if ( kLen!=rLen || uprv_memcmp(expColl, resColl, rLen*sizeof(uint8_t))!=0 ) {
+ log_err("\n After tailoring Data[%d] :%s \tlen: %d key: ", j, tailorData[j], tLen);
+ for(i = 0; i<rLen; i++) {
+ log_err(" %02X", resColl[i]);
+ }
+ }
+ }
+ ucol_close(coll);
+
+ log_verbose("\n\nTailoring test for &z< ae with circumflex:");
+ ruleLen = u_strlen(rule3);
+ coll = ucol_openRules(rule3, ruleLen, UCOL_OFF, UCOL_TERTIARY, NULL,&status);
+ tLen = u_strlen(tailorData3[3]);
+ kLen=ucol_getSortKey(coll, tailorData3[3], tLen, expColl, 100);
+ for (j=4; j<6; j++) {
+ tLen = u_strlen(tailorData3[j]);
+ rLen = ucol_getSortKey(coll, tailorData3[j], tLen, resColl, 100);
+
+ if ( kLen!=rLen || uprv_memcmp(expColl, resColl, rLen*sizeof(uint8_t))!=0 ) {
+ log_err("\n After tailoring Data[%d] :%s \tlen: %d key: ", j, tailorData[j], tLen);
+ for(i = 0; i<rLen; i++) {
+ log_err(" %02X", resColl[i]);
+ }
+ }
+
+ log_verbose("\n Test Data[%d] :%s \tlen: %d key: ", j, tailorData[j], tLen);
+ for(i = 0; i<rLen; i++) {
+ log_verbose(" %02X", resColl[i]);
+ }
+ }
+ ucol_close(coll);
+}
+
+#define TSKC_DATA_SIZE 5
+#define TSKC_BUF_SIZE 50
+static void
+TestSortKeyConsistency(void)
+{
+ UErrorCode icuRC = U_ZERO_ERROR;
+ UCollator* ucol;
+ UChar data[] = { 0xFFFD, 0x0006, 0x0006, 0x0006, 0xFFFD};
+
+ uint8_t bufFull[TSKC_DATA_SIZE][TSKC_BUF_SIZE];
+ uint8_t bufPart[TSKC_DATA_SIZE][TSKC_BUF_SIZE];
+ int32_t i, j, i2;
+
+ ucol = ucol_openFromShortString("LEN_S4", FALSE, NULL, &icuRC);
+ if (U_FAILURE(icuRC))
+ {
+ log_err("ucol_openFromShortString failed\n");
+ return;
+ }
+
+ for (i = 0; i < TSKC_DATA_SIZE; i++)
+ {
+ UCharIterator uiter;
+ uint32_t state[2] = { 0, 0 };
+ int32_t dataLen = i+1;
+ for (j=0; j<TSKC_BUF_SIZE; j++)
+ bufFull[i][j] = bufPart[i][j] = 0;
+
+ /* Full sort key */
+ ucol_getSortKey(ucol, data, dataLen, bufFull[i], TSKC_BUF_SIZE);
+
+ /* Partial sort key */
+ uiter_setString(&uiter, data, dataLen);
+ ucol_nextSortKeyPart(ucol, &uiter, state, bufPart[i], TSKC_BUF_SIZE, &icuRC);
+ if (U_FAILURE(icuRC))
+ {
+ log_err("ucol_nextSortKeyPart failed\n");
+ ucol_close(ucol);
+ return;
+ }
+
+ for (i2=0; i2<i; i2++)
+ {
+ UBool fullMatch = TRUE;
+ UBool partMatch = TRUE;
+ for (j=0; j<TSKC_BUF_SIZE; j++)
+ {
+ fullMatch = fullMatch && (bufFull[i][j] != bufFull[i2][j]);
+ partMatch = partMatch && (bufPart[i][j] != bufPart[i2][j]);
+ }
+ if (fullMatch != partMatch) {
+ log_err(fullMatch ? "full key was consistent, but partial key changed\n"
+ : "partial key was consistent, but full key changed\n");
+ ucol_close(ucol);
+ return;
+ }
+ }
+
+ }
+
+ /*=============================================*/
+ ucol_close(ucol);
+}
+
+
+#define TEST(x) addTest(root, &x, "tscoll/cmsccoll/" # x)
+
+void addMiscCollTest(TestNode** root)
+{
+ TEST(TestRuleOptions);
+ TEST(TestBeforePrefixFailure);
+ TEST(TestContractionClosure);
+ TEST(TestPrefixCompose);
+ TEST(TestStrCollIdenticalPrefix);
+ TEST(TestPrefix);
+ TEST(TestNewJapanese);
+ /*TEST(TestLimitations);*/
+ TEST(TestNonChars);
+ TEST(TestExtremeCompression);
+ TEST(TestSurrogates);
+ TEST(TestVariableTopSetting);
+ TEST(TestBocsuCoverage);
+ TEST(TestCyrillicTailoring);
+ TEST(TestCase);
+ TEST(IncompleteCntTest);
+ TEST(BlackBirdTest);
+ TEST(FunkyATest);
+ TEST(BillFairmanTest);
+ TEST(RamsRulesTest);
+ TEST(IsTailoredTest);
+ TEST(TestCollations);
+ TEST(TestChMove);
+ TEST(TestImplicitTailoring);
+ TEST(TestFCDProblem);
+ TEST(TestEmptyRule);
+ /*TEST(TestJ784);*/ /* 'zh' locale has changed - now it is getting tested by TestBeforePinyin */
+ TEST(TestJ815);
+ /*TEST(TestJ831);*/ /* we changed lv locale */
+ TEST(TestBefore);
+ TEST(TestRedundantRules);
+ TEST(TestExpansionSyntax);
+ TEST(TestHangulTailoring);
+ TEST(TestUCARules);
+ TEST(TestIncrementalNormalize);
+ TEST(TestComposeDecompose);
+ TEST(TestCompressOverlap);
+ TEST(TestContraction);
+ TEST(TestExpansion);
+ /*TEST(PrintMarkDavis);*/ /* this test doesn't test - just prints sortkeys */
+ /*TEST(TestGetCaseBit);*/ /*this one requires internal things to be exported */
+ TEST(TestOptimize);
+ TEST(TestSuppressContractions);
+ TEST(Alexis2);
+ TEST(TestHebrewUCA);
+ TEST(TestPartialSortKeyTermination);
+ TEST(TestSettings);
+ TEST(TestEquals);
+ TEST(TestJ2726);
+ TEST(NullRule);
+ TEST(TestNumericCollation);
+ TEST(TestTibetanConformance);
+ TEST(TestPinyinProblem);
+ TEST(TestImplicitGeneration);
+ TEST(TestSeparateTrees);
+ TEST(TestBeforePinyin);
+ TEST(TestBeforeTightening);
+ /*TEST(TestMoreBefore);*/
+ TEST(TestTailorNULL);
+ TEST(TestThaiSortKey);
+ TEST(TestUpperFirstQuaternary);
+ TEST(TestJ4960);
+ TEST(TestJ5223);
+ TEST(TestJ5232);
+ TEST(TestJ5367);
+ TEST(TestSortKeyConsistency);
+ TEST(TestVI5913); /* VI, RO tailored rules */
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.c
new file mode 100644
index 00000000000..96e01877029
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.c
@@ -0,0 +1,1093 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CMSGTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* C API TEST FOR MESSAGE FORMAT */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include "unicode/uloc.h"
+#include "unicode/umsg.h"
+#include "unicode/udat.h"
+#include "unicode/umsg.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "cmsgtst.h"
+#include "cformtst.h"
+
+static const char* const txt_testCasePatterns[] = {
+ "Quotes '', '{', a {0,number,integer} '{'0}",
+ "Quotes '', '{', a {0,number,integer} '{'0}",
+ "You deposited {0,number,integer} times an amount of {1,number,currency} on {2,date,short}",
+ "'{'2,time,full}, for {1, number }, {0,number,integer} is {2,time,full} and full date is {2,date,full}",
+ "'{'1,number,percent} for {0,number,integer} is {1,number,percent}",
+};
+
+static const char* const txt_testResultStrings[] = {
+ "Quotes ', {, a 1 {0}",
+ "Quotes ', {, a 1 {0}",
+ "You deposited 1 times an amount of $3,456.00 on 1/12/70",
+ "{2,time,full}, for 3,456, 1 is 5:46:40 AM PT and full date is Monday, January 12, 1970",
+ "{1,number,percent} for 1 is 345,600%"
+};
+
+const int32_t cnt_testCases = 5;
+static UChar* testCasePatterns[5];
+
+static UChar* testResultStrings[5];
+
+static UBool strings_initialized = FALSE;
+
+/* function used to create the test patterns for testing Message formatting */
+static void InitStrings( void )
+{
+ int32_t i;
+ if (strings_initialized)
+ return;
+
+ for (i=0; i < cnt_testCases; i++ ) {
+ uint32_t strSize = (uint32_t)strlen(txt_testCasePatterns[i]) + 1;
+ testCasePatterns[i]=(UChar*)malloc(sizeof(UChar) * strSize);
+ u_uastrncpy(testCasePatterns[i], txt_testCasePatterns[i], strSize);
+ }
+ for (i=0; i < cnt_testCases; i++ ) {
+ uint32_t strSize = (uint32_t)strlen(txt_testResultStrings[i]) + 1;
+ testResultStrings[i] = (UChar*)malloc(sizeof(UChar) * strSize);
+ u_uastrncpy(testResultStrings[i], txt_testResultStrings[i], strSize);
+ }
+
+ strings_initialized = TRUE;
+}
+
+static void FreeStrings( void )
+{
+ int32_t i;
+ if (!strings_initialized)
+ return;
+
+ for (i=0; i < cnt_testCases; i++ ) {
+ free(testCasePatterns[i]);
+ }
+ for (i=0; i < cnt_testCases; i++ ) {
+ free(testResultStrings[i]);
+ }
+ strings_initialized = FALSE;
+}
+
+/* Platform dependent test to detect if this type will return NULL when interpreted as a pointer. */
+static UBool returnsNullForType(int firstParam, ...) {
+ UBool isNULL;
+ va_list marker;
+ va_start(marker, firstParam);
+ isNULL = (UBool)(va_arg(marker, void*) == NULL);
+ va_end(marker);
+ return isNULL;
+}
+
+/* Test u_formatMessage() with various test patterns() */
+static void MessageFormatTest( void )
+{
+ UChar *str;
+ UChar* result;
+ int32_t resultLengthOut,resultlength,i, patternlength;
+ UErrorCode status = U_ZERO_ERROR;
+ UDate d1=1000000000.0;
+
+ ctest_setTimeZone(NULL, &status);
+
+ str=(UChar*)malloc(sizeof(UChar) * 7);
+ u_uastrncpy(str, "MyDisk", 7);
+ resultlength=1;
+ result=(UChar*)malloc(sizeof(UChar) * 1);
+ log_verbose("Testing u_formatMessage()\n");
+ InitStrings();
+ for (i = 0; i < cnt_testCases; i++) {
+ status=U_ZERO_ERROR;
+ patternlength=u_strlen(testCasePatterns[i]);
+ resultLengthOut=u_formatMessage( "en_US",testCasePatterns[i], patternlength, result, resultlength,
+ &status, 1, 3456.00, d1);
+ if(status== U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result,sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US",testCasePatterns[i], patternlength, result, resultlength,
+ &status, 1, 3456.00, d1);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format on testcase %d: %s\n", i, myErrorName(status) );
+ }
+ if(u_strcmp(result, testResultStrings[i])==0){
+ log_verbose("PASS: MessagFormat successful on testcase : %d\n", i);
+ }
+ else{
+ log_err("FAIL: Error in MessageFormat on testcase : %d\n GOT %s EXPECTED %s\n", i,
+ austrdup(result), austrdup(testResultStrings[i]) );
+ }
+ }
+ free(result);
+ result = NULL;
+ free(str);
+ {
+
+ for (i = 0; i < cnt_testCases; i++) {
+ UParseError parseError;
+ status=U_ZERO_ERROR;
+ patternlength=u_strlen(testCasePatterns[i]);
+ resultlength=0;
+ resultLengthOut=u_formatMessageWithError( "en_US",testCasePatterns[i], patternlength, result, resultlength,
+ &parseError,&status, 1, 3456.00, d1);
+ if(status== U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US",testCasePatterns[i], patternlength, result, resultlength,
+ &status, 1, 3456.00, d1);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format on testcase %d: %s\n", i, myErrorName(status) );
+ continue;
+ }
+ if(u_strcmp(result, testResultStrings[i])==0){
+ log_verbose("PASS: MessagFormat successful on testcase : %d\n", i);
+ }
+ else{
+ log_err("FAIL: Error in MessageFormat on testcase : %d\n GOT %s EXPECTED %s\n", i,
+ austrdup(result), austrdup(testResultStrings[i]) );
+ }
+ free(result);
+ result=NULL;
+ }
+ }
+ {
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t patternLength = u_strlen(testCasePatterns[0]);
+
+ UMessageFormat formatter = umsg_open(testCasePatterns[0],patternLength,"en_US",NULL,&ec);
+
+ if(U_FAILURE(ec)){
+ log_err("umsg_open() failed for testCasePattens[%d].\n",i);
+ return;
+ }
+ for(i = 0;i<cnt_testCases; i++){
+ UParseError parseError;
+ int32_t resultLength =0,count=0;
+ int32_t one=0;
+ int32_t two=0;
+ UDate d2=0;
+
+ result=NULL;
+ patternLength = u_strlen(testCasePatterns[i]);
+
+ umsg_applyPattern(formatter,testCasePatterns[i],patternLength,&parseError,&ec);
+ if(U_FAILURE(ec)){
+ log_err("umsg_applyPattern() failed for testCasePattens[%d].\n",i);
+ return;
+ }
+ /* pre-flight */
+ resultLength = umsg_format(formatter,result,resultLength,&ec,1,3456.00,d1);
+ if(ec==U_BUFFER_OVERFLOW_ERROR){
+ ec=U_ZERO_ERROR;
+ result = (UChar*) malloc(U_SIZEOF_UCHAR*resultLength+2);
+ resultLength = umsg_format(formatter,result,resultLength+2,&ec,1,3456.00,d1);
+ if(U_FAILURE(ec)){
+ log_err("ERROR: failure in message format on testcase %d: %s\n", i, u_errorName(status) );
+ free(result);
+ return;
+ }
+
+ if(u_strcmp(result, testResultStrings[i])==0){
+ log_verbose("PASS: MessagFormat successful on testcase : %d\n", i);
+ }
+ else{
+ log_err("FAIL: Error in MessageFormat on testcase : %d\n GOT %s EXPECTED %s\n", i,
+ austrdup(result), austrdup(testResultStrings[i]) );
+ }
+
+ if (returnsNullForType(1, (double)2.0)) {
+ /* HP/UX and possibly other platforms don't properly check for this case.
+ We pass in a UDate, but the function expects a UDate *. When va_arg is used,
+ most compilers will return NULL, but HP-UX won't do that and will return 2
+ in this case. This is a platform dependent test.
+
+ This relies upon "undefined" behavior, as indicated by C99 7.15.1.1 paragraph 2
+ */
+ umsg_parse(formatter,result,resultLength,&count,&ec,one,two,d2);
+ if(ec!=U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("FAIL: Did not get expected error for umsg_parse(). Expected: U_ILLEGAL_ARGUMENT_ERROR Got: %s \n",u_errorName(ec));
+ }else{
+ ec = U_ZERO_ERROR;
+ }
+ }
+ else {
+ log_verbose("Warning: Returning NULL for a mismatched va_arg type isn't supported on this platform.\n", i);
+ }
+
+ umsg_parse(formatter,result,resultLength,&count,&ec,&one,&two,&d2);
+ if(U_FAILURE(ec)){
+ log_err("umsg_parse could not parse the pattern. Error: %s.\n",u_errorName(ec));
+ }
+ free(result);
+ }else{
+ log_err("FAIL: Expected U_BUFFER_OVERFLOW error while preflighting got: %s for testCasePatterns[%d]",u_errorName(ec),i);
+ }
+ }
+ umsg_close(formatter);
+ }
+ FreeStrings();
+
+ ctest_resetTimeZone();
+}
+
+
+/*test u_formatMessage() with sample patterns */
+static void TestSampleMessageFormat(void)
+{
+ UChar *str;
+ UChar *result;
+ UChar pattern[100], expected[100];
+ int32_t resultLengthOut, resultlength;
+ UDate d = 837039928046.0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ ctest_setTimeZone(NULL, &status);
+
+ str=(UChar*)malloc(sizeof(UChar) * 15);
+ u_uastrcpy(str, "abc");
+
+ u_uastrcpy(pattern, "There are {0} files on {1,date}");
+ u_uastrcpy(expected, "There are abc files on Jul 10, 1996");
+ result=(UChar*)malloc(sizeof(UChar) * 1);
+ log_verbose("\nTesting a sample for Message format test#1\n");
+ resultlength=1;
+ resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, str, d);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result, sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, str, d);
+ }
+ if(U_FAILURE(status)){
+ log_err("Error: failure in message format on test#1: %s\n", myErrorName(status));
+ }
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#1\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#1 \n GOT: %s EXPECTED: %s\n",
+ austrdup(result), austrdup(expected) );
+ }
+
+
+ log_verbose("\nTesting message format with another pattern test#2\n");
+ u_uastrcpy(pattern, "The disk \"{0}\" contains {1,number,integer} file(s)");
+ u_uastrcpy(expected, "The disk \"MyDisk\" contains 23 file(s)");
+ u_uastrcpy(str, "MyDisk");
+
+ resultLengthOut=u_formatMessage( "en_US",
+ pattern,
+ u_strlen(pattern),
+ result,
+ resultlength,
+ &status,
+ str,
+ 235);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result, sizeof(UChar) * (resultlength+1));
+ u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, str, 23);
+ }
+ if(U_FAILURE(status)){
+ log_err("Error: failure in message format on test#2 : %s\n", myErrorName(status));
+ }
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#2\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#2\n GOT: %s EXPECTED: %s\n",
+ austrdup(result), austrdup(expected) );
+ }
+
+
+
+ log_verbose("\nTesting message format with another pattern test#3\n");
+ u_uastrcpy(pattern, "You made a {0} of {1,number,currency}");
+ u_uastrcpy(expected, "You made a deposit of $500.00");
+ u_uastrcpy(str, "deposit");
+ resultlength=0;
+ resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), NULL, resultlength, &status, str, 500.00);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result, sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, str, 500.00);
+ }
+ if(U_FAILURE(status)){
+ log_err("Error: failure in message format on test#3 : %s\n", myErrorName(status));
+ }
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#3\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#3\n GOT: %s EXPECTED %s\n", austrdup(result),
+ austrdup(expected) );
+ }
+
+ free(result);
+ free(str);
+
+ ctest_resetTimeZone();
+}
+
+/* Test umsg_format() and umsg_parse() , format and parse sequence and round trip */
+static void TestNewFormatAndParseAPI(void)
+{
+
+ UChar *result, *tzID, *str;
+ UChar pattern[100];
+ UChar expected[100];
+ int32_t resultLengthOut, resultlength;
+ UCalendar *cal;
+ UDate d1,d;
+ UDateFormat *def1;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t value = 0;
+ UChar ret[30];
+ UParseError parseError;
+ UMessageFormat* fmt = NULL;
+ int32_t count=0;
+
+ ctest_setTimeZone(NULL, &status);
+
+ log_verbose("Testing format and parse with parse error\n");
+
+ str=(UChar*)malloc(sizeof(UChar) * 25);
+ u_uastrcpy(str, "disturbance in force");
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "PST");
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)){
+ log_err("error in ucal_open caldef : %s\n", myErrorName(status) );
+ return;
+ }
+ ucal_setDateTime(cal, 1999, UCAL_MARCH, 18, 0, 0, 0, &status);
+ d1=ucal_getMillis(cal, &status);
+ if(U_FAILURE(status)){
+ log_err("Error: failure in get millis: %s\n", myErrorName(status) );
+ return;
+ }
+
+ log_verbose("\nTesting with pattern test#4");
+ u_uastrcpy(pattern, "On {0, date, long}, there was a {1} on planet {2,number,integer}");
+ u_uastrcpy(expected, "On March 18, 1999, there was a disturbance in force on planet 7");
+ resultlength=1;
+ fmt = umsg_open(pattern,u_strlen(pattern),"en_US",&parseError,&status);
+ if(U_FAILURE(status)){
+ log_err("error in umsg_open : %s\n", u_errorName(status) );
+ return;
+ }
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+
+ resultLengthOut=umsg_format(fmt ,result, resultlength,&status, d1, str, 7);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result, sizeof(UChar) * resultlength);
+ u_formatMessageWithError( "en_US", pattern, u_strlen(pattern), result, resultlength,&parseError, &status, d1, str, 7);
+
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format test#4: %s\n", myErrorName(status));
+ }
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#4\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#4\n GOT: %s EXPECTED: %s\n", austrdup(result),
+ austrdup(expected) );
+ }
+
+
+ /*try to parse this and check*/
+ log_verbose("\nTesting the parse Message test#5\n");
+
+ umsg_parse(fmt, result, u_strlen(result),&count,&status, &d, ret, &value);
+ if(U_FAILURE(status)){
+ log_err("ERROR: error in parsing: test#5: %s\n", myErrorName(status));
+ }
+ if(value!=7 && u_strcmp(str,ret)!=0)
+ log_err("FAIL: Error in parseMessage on test#5 \n");
+ else
+ log_verbose("PASS: parseMessage successful on test#5\n");
+
+ def1 = udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,NULL, NULL, 0, NULL,0,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in creating the dateformat using short date and time style:\n %s\n", myErrorName(status));
+ }else{
+
+ if(u_strcmp(myDateFormat(def1, d), myDateFormat(def1, d1))==0)
+ log_verbose("PASS: parseMessage successful test#5\n");
+ else{
+ log_err("FAIL: parseMessage didn't parse the date successfully\n GOT: %s EXPECTED %s\n",
+ austrdup(myDateFormat(def1,d)), austrdup(myDateFormat(def1,d1)) );
+ }
+ }
+ umsg_close(fmt);
+ udat_close(def1);
+ ucal_close(cal);
+
+ free(result);
+ free(str);
+ free(tzID);
+
+ ctest_resetTimeZone();
+}
+
+/* Test u_formatMessageWithError() and u_parseMessageWithError() , format and parse sequence and round trip */
+static void TestSampleFormatAndParseWithError(void)
+{
+
+ UChar *result, *tzID, *str;
+ UChar pattern[100];
+
+ UChar expected[100];
+ int32_t resultLengthOut, resultlength;
+ UCalendar *cal;
+ UDate d1,d;
+ UDateFormat *def1;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t value = 0;
+ UChar ret[30];
+ UParseError parseError;
+
+ ctest_setTimeZone(NULL, &status);
+
+ log_verbose("Testing format and parse with parse error\n");
+
+ str=(UChar*)malloc(sizeof(UChar) * 25);
+ u_uastrcpy(str, "disturbance in force");
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "PST");
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)){
+ log_err("error in ucal_open caldef : %s\n", myErrorName(status) );
+ }
+ ucal_setDateTime(cal, 1999, UCAL_MARCH, 18, 0, 0, 0, &status);
+ d1=ucal_getMillis(cal, &status);
+ if(U_FAILURE(status)){
+ log_err("Error: failure in get millis: %s\n", myErrorName(status) );
+ }
+
+ log_verbose("\nTesting with pattern test#4");
+ u_uastrcpy(pattern, "On {0, date, long}, there was a {1} on planet {2,number,integer}");
+ u_uastrcpy(expected, "On March 18, 1999, there was a disturbance in force on planet 7");
+ resultlength=1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ resultLengthOut=u_formatMessageWithError( "en_US", pattern, u_strlen(pattern), result, resultlength,&parseError, &status, d1, str, 7);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result, sizeof(UChar) * resultlength);
+ u_formatMessageWithError( "en_US", pattern, u_strlen(pattern), result, resultlength,&parseError, &status, d1, str, 7);
+
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format test#4: %s\n", myErrorName(status));
+ }
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#4\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#4\n GOT: %s EXPECTED: %s\n", austrdup(result),
+ austrdup(expected) );
+ }
+
+
+ /*try to parse this and check*/
+ log_verbose("\nTesting the parse Message test#5\n");
+
+ u_parseMessageWithError("en_US", pattern, u_strlen(pattern), result, u_strlen(result), &parseError,&status, &d, ret, &value);
+ if(U_FAILURE(status)){
+ log_err("ERROR: error in parsing: test#5: %s\n", myErrorName(status));
+ }
+ if(value!=7 && u_strcmp(str,ret)!=0)
+ log_err("FAIL: Error in parseMessage on test#5 \n");
+ else
+ log_verbose("PASS: parseMessage successful on test#5\n");
+
+ def1 = udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,NULL, NULL, 0, NULL,0,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in creating the dateformat using short date and time style:\n %s\n", myErrorName(status));
+ }else{
+
+ if(u_strcmp(myDateFormat(def1, d), myDateFormat(def1, d1))==0)
+ log_verbose("PASS: parseMessage successful test#5\n");
+ else{
+ log_err("FAIL: parseMessage didn't parse the date successfully\n GOT: %s EXPECTED %s\n",
+ austrdup(myDateFormat(def1,d)), austrdup(myDateFormat(def1,d1)) );
+ }
+ }
+ udat_close(def1);
+ ucal_close(cal);
+
+ free(result);
+ free(str);
+ free(tzID);
+
+ ctest_resetTimeZone();
+}
+
+/* Test u_formatMessage() and u_parseMessage() , format and parse sequence and round trip */
+static void TestSampleFormatAndParse(void)
+{
+
+ UChar *result, *tzID, *str;
+ UChar pattern[100];
+ UChar expected[100];
+ int32_t resultLengthOut, resultlength;
+ UCalendar *cal;
+ UDate d1,d;
+ UDateFormat *def1;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t value = 0;
+ UChar ret[30];
+
+ ctest_setTimeZone(NULL, &status);
+
+ log_verbose("Testing format and parse\n");
+
+ str=(UChar*)malloc(sizeof(UChar) * 25);
+ u_uastrcpy(str, "disturbance in force");
+ tzID=(UChar*)malloc(sizeof(UChar) * 4);
+ u_uastrcpy(tzID, "PST");
+ cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_TRADITIONAL, &status);
+ if(U_FAILURE(status)){
+ log_err("error in ucal_open caldef : %s\n", myErrorName(status) );
+ }
+ ucal_setDateTime(cal, 1999, UCAL_MARCH, 18, 0, 0, 0, &status);
+ d1=ucal_getMillis(cal, &status);
+ if(U_FAILURE(status)){
+ log_err("Error: failure in get millis: %s\n", myErrorName(status) );
+ }
+
+ log_verbose("\nTesting with pattern test#4");
+ u_uastrcpy(pattern, "On {0, date, long}, there was a {1} on planet {2,number,integer}");
+ u_uastrcpy(expected, "On March 18, 1999, there was a disturbance in force on planet 7");
+ resultlength=1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, d1, str, 7);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result, sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, d1, str, 7);
+
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format test#4: %s\n", myErrorName(status));
+ }
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#4\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#4\n GOT: %s EXPECTED: %s\n", austrdup(result),
+ austrdup(expected) );
+ }
+
+
+ /*try to parse this and check*/
+ log_verbose("\nTesting the parse Message test#5\n");
+
+ u_parseMessage("en_US", pattern, u_strlen(pattern), result, u_strlen(result), &status, &d, ret, &value);
+ if(U_FAILURE(status)){
+ log_err("ERROR: error in parsing: test#5: %s\n", myErrorName(status));
+ }
+ if(value!=7 && u_strcmp(str,ret)!=0)
+ log_err("FAIL: Error in parseMessage on test#5 \n");
+ else
+ log_verbose("PASS: parseMessage successful on test#5\n");
+
+ def1 = udat_open(UDAT_DEFAULT,UDAT_DEFAULT ,NULL, NULL, 0, NULL,0,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in creating the dateformat using short date and time style:\n %s\n", myErrorName(status));
+ }else{
+
+ if(u_strcmp(myDateFormat(def1, d), myDateFormat(def1, d1))==0)
+ log_verbose("PASS: parseMessage successful test#5\n");
+ else{
+ log_err("FAIL: parseMessage didn't parse the date successfully\n GOT: %s EXPECTED %s\n",
+ austrdup(myDateFormat(def1,d)), austrdup(myDateFormat(def1,d1)) );
+ }
+ }
+ udat_close(def1);
+ ucal_close(cal);
+
+ free(result);
+ free(str);
+ free(tzID);
+
+ ctest_resetTimeZone();
+}
+
+/* test message format with a choice option */
+static void TestMsgFormatChoice(void)
+{
+ UChar* str;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *result;
+ UChar pattern[100];
+ UChar expected[100];
+ int32_t resultlength,resultLengthOut;
+
+ str=(UChar*)malloc(sizeof(UChar) * 25);
+ u_uastrcpy(str, "MyDisk");
+ log_verbose("Testing message format with choice test #6\n:");
+ /*There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.*/
+ u_uastrcpy(pattern, "The disk {1} contains {0,choice,0#no files|1#one file|1<{0,number,integer} files}");
+ u_uastrcpy(expected, "The disk MyDisk contains 100 files");
+ resultlength=0;
+ resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), NULL, resultlength, &status, 100., str);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, 100., str);
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#6\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#6\n GOT %s EXPECTED %s\n", austrdup(result),
+ austrdup(expected) );
+ }
+ free(result);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format on test#6 : %s\n", myErrorName(status));
+ }
+
+ log_verbose("Testing message format with choice test #7\n:");
+ u_uastrcpy(expected, "The disk MyDisk contains no files");
+ resultlength=0;
+ resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), NULL, resultlength, &status, 0., str);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, 0., str);
+
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#7\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#7\n GOT: %s EXPECTED %s\n", austrdup(result),
+ austrdup(expected) );
+ }
+ free(result);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format on test#7 : %s\n", myErrorName(status));
+ }
+
+ log_verbose("Testing message format with choice test #8\n:");
+ u_uastrcpy(expected, "The disk MyDisk contains one file");
+ resultlength=0;
+ resultLengthOut=u_formatMessage( "en_US", pattern, u_strlen(pattern), NULL, resultlength, &status, 1., str);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ u_formatMessage( "en_US", pattern, u_strlen(pattern), result, resultlength, &status, 1., str);
+
+ if(u_strcmp(result, expected)==0)
+ log_verbose("PASS: MessagFormat successful on test#8\n");
+ else{
+ log_err("FAIL: Error in MessageFormat on test#8\n GOT %s EXPECTED: %s\n", austrdup(result),
+ austrdup(expected) );
+ }
+
+ free(result);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format on test#8 : %s\n", myErrorName(status));
+ }
+
+ free(str);
+
+}
+
+/*test u_parseMessage() with various test patterns */
+static void TestParseMessage(void)
+{
+ UChar pattern[100];
+ UChar source[100];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t value;
+ UChar str[10];
+ UChar res[10];
+
+ log_verbose("\nTesting a sample for parse Message test#9\n");
+
+ u_uastrcpy(source, "You deposited an amount of $500.00");
+ u_uastrcpy(pattern, "You {0} an amount of {1,number,currency}");
+ u_uastrcpy(res,"deposited");
+
+ u_parseMessage( "en_US", pattern, u_strlen(pattern), source, u_strlen(source), &status, str, &value);
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in parse Message on test#9: %s\n", myErrorName(status));
+ }
+ if(value==500.00 && u_strcmp(str,res)==0)
+ log_verbose("PASS: parseMessage successful on test#9\n");
+ else
+ log_err("FAIL: Error in parseMessage on test#9 \n");
+
+
+
+ log_verbose("\nTesting a sample for parse Message test#10\n");
+
+ u_uastrcpy(source, "There are 123 files on MyDisk created");
+ u_uastrcpy(pattern, "There are {0,number,integer} files on {1} created");
+ u_uastrcpy(res,"MyDisk");
+
+ u_parseMessage( "en_US", pattern, u_strlen(pattern), source, u_strlen(source), &status, &value, str);
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in parse Message on test#10: %s\n", myErrorName(status));
+ }
+ if(value==123.00 && u_strcmp(str,res)==0)
+ log_verbose("PASS: parseMessage successful on test#10\n");
+ else
+ log_err("FAIL: Error in parseMessage on test#10 \n");
+
+
+
+}
+
+static int32_t CallFormatMessage(const char* locale, UChar* testCasePattern, int32_t patternLength,
+ UChar* result, int32_t resultLength, UErrorCode *status, ...)
+{
+ int32_t len = 0;
+ va_list ap;
+ va_start(ap, status);
+ len = u_vformatMessage(locale, testCasePattern, patternLength, result, resultLength, ap, status);
+ va_end(ap);
+ return len;
+}
+
+/* Test u_vformatMessage() with various test patterns. */
+static void TestMessageFormatWithValist( void )
+{
+
+ UChar *str;
+ UChar* result;
+ int32_t resultLengthOut,resultlength,i, patternlength;
+ UErrorCode status = U_ZERO_ERROR;
+ UDate d1=1000000000.0;
+
+ ctest_setTimeZone(NULL, &status);
+
+ str=(UChar*)malloc(sizeof(UChar) * 7);
+ u_uastrcpy(str, "MyDisk");
+ resultlength=1;
+ result=(UChar*)malloc(sizeof(UChar) * 1);
+ log_verbose("Testing u_formatMessage90\n");
+ InitStrings();
+ for (i = 0; i < cnt_testCases; i++) {
+ status=U_ZERO_ERROR;
+ patternlength=u_strlen(testCasePatterns[i]);
+ resultLengthOut=CallFormatMessage( "en_US",testCasePatterns[i], patternlength, result, resultlength,
+ &status, 1, 3456.00, d1);
+ if(status== U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultLengthOut+1;
+ result=(UChar*)realloc(result,sizeof(UChar) * resultlength);
+ CallFormatMessage( "en_US",testCasePatterns[i], patternlength, result, resultlength,
+ &status, 1, 3456.00, d1);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in message format on testcase %d: %s\n", i, myErrorName(status) );
+ }
+ if(u_strcmp(result, testResultStrings[i])==0){
+ log_verbose("PASS: MessagFormat successful on testcase : %d\n", i);
+ }
+ else{
+ log_err("FAIL: Error in MessageFormat on testcase : %d\n GOT %s EXPECTED %s\n", i,
+ austrdup(result), austrdup(testResultStrings[i]) );
+ }
+ }
+ free(result);
+ free(str);
+ FreeStrings();
+
+ ctest_resetTimeZone();
+}
+
+static void CallParseMessage(const char* locale, UChar* pattern, int32_t patternLength,
+ UChar* source, int32_t sourceLength, UErrorCode *status, ...)
+{
+ va_list ap;
+ va_start(ap, status);
+ u_vparseMessage(locale, pattern, patternLength, source, sourceLength, ap, status);
+ va_end(ap);
+}
+
+/*test u_vparseMessage() with various test patterns */
+static void TestParseMessageWithValist(void)
+{
+ UChar pattern[100];
+ UChar source[100];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t value;
+ UChar str[10];
+ UChar res[10];
+
+ log_verbose("\nTesting a sample for parse Message test#9\n");
+
+ u_uastrcpy(source, "You deposited an amount of $500.00");
+ u_uastrcpy(pattern, "You {0} an amount of {1,number,currency}");
+ u_uastrcpy(res,"deposited");
+
+ CallParseMessage( "en_US", pattern, u_strlen(pattern), source, u_strlen(source), &status, str, &value);
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in parse Message on test#9: %s\n", myErrorName(status));
+ }
+ if(value==500.00 && u_strcmp(str,res)==0)
+ log_verbose("PASS: parseMessage successful on test#9\n");
+ else
+ log_err("FAIL: Error in parseMessage on test#9 \n");
+
+
+ log_verbose("\nTesting a sample for parse Message test#10\n");
+
+ u_uastrcpy(source, "There are 123 files on MyDisk created");
+ u_uastrcpy(pattern, "There are {0,number,integer} files on {1} created");
+ u_uastrcpy(res,"MyDisk");
+
+ CallParseMessage( "en_US", pattern, u_strlen(pattern), source, u_strlen(source), &status, &value, str);
+ if(U_FAILURE(status)){
+ log_err("ERROR: failure in parse Message on test#10: %s\n", myErrorName(status));
+ }
+ if(value==123.00 && u_strcmp(str,res)==0)
+ log_verbose("PASS: parseMessage successful on test#10\n");
+ else
+ log_err("FAIL: Error in parseMessage on test#10 \n");
+}
+
+/**
+ * Regression test for ICU4C Jitterbug 904
+ */
+static void TestJ904(void) {
+ UChar pattern[256];
+ UChar result[256];
+ UChar string[16];
+ char cresult[256];
+ int32_t length;
+ UErrorCode status = U_ZERO_ERROR;
+ const char* PAT = "Number {1,number,#0.000}, String {0}, Date {2,date,12:mm:ss.SSS}";
+ const char* EXP = "Number 0,143, String foo, Date 12:34:56.789";
+
+ ctest_setTimeZone(NULL, &status);
+
+ u_uastrcpy(string, "foo");
+ /* Slight hack here -- instead of date pattern HH:mm:ss.SSS, use
+ * 12:mm:ss.SSS. Why? So this test generates the same output --
+ * "12:34:56.789" -- regardless of time zone (as long as we aren't
+ * in one of the 30 minute offset zones!). */
+ u_uastrcpy(pattern, PAT);
+ length = u_formatMessage("nl", pattern, u_strlen(pattern),
+ result, 256, &status,
+ string, 1/7.0,
+ 789.0+1000*(56+60*(34+60*12)));
+
+ u_austrncpy(cresult, result, sizeof(cresult));
+
+ /* This test passes if it DOESN'T CRASH. However, we test the
+ * output anyway. If the string doesn't match in the date part,
+ * check to see that the machine doesn't have an unusual time zone
+ * offset, that is, one with a non-zero minutes/seconds offset
+ * from GMT -- see above. */
+ if (strcmp(cresult, EXP) == 0) {
+ log_verbose("Ok: \"%s\"\n", cresult);
+ } else {
+ log_err("FAIL: got \"%s\", expected \"%s\"\n", cresult, EXP);
+ }
+
+ ctest_resetTimeZone();
+}
+
+static void OpenMessageFormatTest(void)
+{
+ UMessageFormat *f1, *f2, *f3;
+ UChar pattern[256];
+ UChar result[256];
+ char cresult[256];
+ UParseError parseError;
+ const char* locale = "hi_IN";
+ char* retLoc;
+ const char* PAT = "Number {1,number,#0.000}, String {0}, Date {2,date,12:mm:ss.SSS}";
+ int32_t length=0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_uastrncpy(pattern, PAT, sizeof(pattern)/sizeof(pattern[0]));
+
+ /* Test umsg_open */
+ f1 = umsg_open(pattern,length,NULL,NULL,&status);
+
+ if(U_FAILURE(status))
+ {
+ log_err("umsg_open failed with pattern %s. Error: \n", PAT, u_errorName(status));
+ return;
+ }
+
+ /* Test umsg_open with parse error */
+ status = U_ZERO_ERROR;
+ f2 = umsg_open(pattern,length,NULL,&parseError,&status);
+
+ if(U_FAILURE(status))
+ {
+ log_err("umsg_open with parseError failed with pattern %s. Error: %s\n", PAT, u_errorName(status));
+ return;
+ }
+
+ /* Test umsg_clone */
+ status = U_ZERO_ERROR;
+ f3 = umsg_clone(f1,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("umsg_clone failed. Error %s \n", u_errorName(status));
+ }
+
+ /* Test umsg_setLocale */
+ umsg_setLocale(f1,locale);
+ /* Test umsg_getLocale */
+ retLoc = (char*)umsg_getLocale(f1);
+ if(strcmp(retLoc,locale)!=0)
+ {
+ log_err("umsg_setLocale and umsg_getLocale methods failed. Expected:%s Got: %s \n", locale, retLoc);
+ }
+
+ /* Test umsg_applyPattern */
+ status = U_ZERO_ERROR;
+ umsg_applyPattern(f1,pattern,(int32_t)strlen(PAT),NULL,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("umsg_applyPattern failed. Error %s \n",u_errorName(status));
+ }
+
+ /* Test umsg_toPattern */
+ umsg_toPattern(f1,result,256,&status);
+ if(U_FAILURE(status) ){
+ log_err("umsg_toPattern method failed. Error: %s \n",u_errorName(status));
+ } else {
+ if(u_strcmp(result,pattern)!=0){
+ u_UCharsToChars(result,cresult,256);
+ log_err("umsg_toPattern method failed. Expected: %s Got: %s \n",PAT,cresult);
+ }
+ }
+ /* umsg_format umsg_parse */
+
+ umsg_close(f1);
+ umsg_close(f2);
+ umsg_close(f3);
+}
+
+static void MessageLength(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ const char patChars[] = {"123{0}456{0}"};
+ const char expectedChars[] = {"123abc"};
+ UChar pattern[sizeof(patChars)];
+ UChar arg[] = {0x61,0x62,0x63,0};
+ UChar result[128] = {0};
+ UChar expected[sizeof(expectedChars)];
+
+ u_uastrncpy(pattern, patChars, sizeof(pattern)/sizeof(pattern[0]));
+ u_uastrncpy(expected, expectedChars, sizeof(expected)/sizeof(expected[0]));
+
+ u_formatMessage("en_US", pattern, 6, result, sizeof(result)/sizeof(result[0]), &status, arg);
+ if (U_FAILURE(status)) {
+ log_err("u_formatMessage method failed. Error: %s \n",u_errorName(status));
+ }
+ if (u_strcmp(result, expected) != 0) {
+ log_err("u_formatMessage didn't return expected result\n");
+ }
+}
+
+static void TestErrorChaining(void) {
+ UErrorCode status = U_USELESS_COLLATOR_ERROR;
+
+ umsg_open(NULL, 0, NULL, NULL, &status);
+ umsg_applyPattern(NULL, NULL, 0, NULL, &status);
+ umsg_toPattern(NULL, NULL, 0, &status);
+ umsg_clone(NULL, &status);
+ umsg_format(NULL, NULL, 0, &status);
+ umsg_parse(NULL, NULL, 0, NULL, &status);
+ umsg_close(NULL);
+
+ /* All of this code should have done nothing. */
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("Status got changed to %s\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ umsg_open(NULL, 0, NULL, NULL, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Status should be U_ILLEGAL_ARGUMENT_ERROR instead of %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ umsg_applyPattern(NULL, NULL, 0, NULL, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Status should be U_ILLEGAL_ARGUMENT_ERROR instead of %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ umsg_toPattern(NULL, NULL, 0, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Status should be U_ILLEGAL_ARGUMENT_ERROR instead of %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ umsg_clone(NULL, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Status should be U_ILLEGAL_ARGUMENT_ERROR instead of %s\n", u_errorName(status));
+ }
+}
+
+void addMsgForTest(TestNode** root);
+
+void addMsgForTest(TestNode** root)
+{
+ addTest(root, &OpenMessageFormatTest, "tsformat/cmsgtst/OpenMessageFormatTest");
+ addTest(root, &MessageFormatTest, "tsformat/cmsgtst/MessageFormatTest");
+ addTest(root, &TestSampleMessageFormat, "tsformat/cmsgtst/TestSampleMessageFormat");
+ addTest(root, &TestSampleFormatAndParse, "tsformat/cmsgtst/TestSampleFormatAndParse");
+ addTest(root, &TestSampleFormatAndParseWithError, "tsformat/cmsgtst/TestSampleFormatAndParseWithError");
+ addTest(root, &TestNewFormatAndParseAPI, "tsformat/cmsgtst/TestNewFormatAndParseAPI");
+ addTest(root, &TestMsgFormatChoice, "tsformat/cmsgtst/TestMsgFormatChoice");
+ addTest(root, &TestParseMessage, "tsformat/cmsgtst/TestParseMessage");
+ addTest(root, &TestMessageFormatWithValist, "tsformat/cmsgtst/TestMessageFormatWithValist");
+ addTest(root, &TestParseMessageWithValist, "tsformat/cmsgtst/TestParseMessageWithValist");
+ addTest(root, &TestJ904, "tsformat/cmsgtst/TestJ904");
+ addTest(root, &MessageLength, "tsformat/cmsgtst/MessageLength");
+ addTest(root, &TestErrorChaining, "tsformat/cmsgtst/TestErrorChaining");
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.h
new file mode 100644
index 00000000000..6936283980e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cmsgtst.h
@@ -0,0 +1,60 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CMSGTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* C API TEST FOR MESSAGE FORMAT */
+#ifndef _CMSGFRMTST
+#define _CMSGFRMTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+
+
+/* The function used to test the Message format API*/
+
+ /**
+ * Test u_formatMessage() with various test patterns
+ **/
+ static void MessageFormatTest(void);
+ /**
+ * Test u_formatMessage() with sample test Patterns
+ **/
+ static void TestSampleMessageFormat(void);
+ /**
+ * Test format and parse sequence and roundtrip
+ **/
+ static void TestSampleFormatAndParse(void);
+ /**
+ * Test u_formatMessage() with choice option
+ **/
+ static void TestMsgFormatChoice(void);
+ /**
+ * Test u_parseMessage() with various test patterns()
+ **/
+ static void TestParseMessage(void);
+ /**
+ * function used to set up various patterns used for testing u_formatMessage()
+ **/
+ static void InitStrings( void );
+
+ /**
+ * Regression test for ICU4C Jitterbug 904
+ */
+ static void TestJ904(void);
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.c
new file mode 100644
index 00000000000..152351487b5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.c
@@ -0,0 +1,951 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ********************************************************************/
+/*******************************************************************************
+*
+* File CNMDPTST.C
+*
+* Madhu Katragadda Creation
+* Modification History:
+*
+* Date Name Description
+* 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes
+*******************************************************************************
+*/
+
+/* C DEPTH TEST FOR NUMBER FORMAT */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/ucurr.h"
+#include "unicode/uloc.h"
+#include "unicode/unum.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "cnmdptst.h"
+#include "cmemory.h"
+#include "cstring.h"
+
+#define CHECK(status,str) if (U_FAILURE(status)) { log_err("FAIL: %s\n", str); return; }
+
+void addNumFrDepTest(TestNode** root);
+static void TestCurrencyPreEuro(void);
+static void TestCurrencyObject(void);
+
+void addNumFrDepTest(TestNode** root)
+{
+ addTest(root, &TestPatterns, "tsformat/cnmdptst/TestPatterns");
+ addTest(root, &TestQuotes, "tsformat/cnmdptst/TestQuotes");
+ addTest(root, &TestExponential, "tsformat/cnmdptst/TestExponential");
+ addTest(root, &TestCurrencySign, "tsformat/cnmdptst/TestCurrencySign");
+ addTest(root, &TestCurrency, "tsformat/cnmdptst/TestCurrency");
+ addTest(root, &TestCurrencyPreEuro, "tsformat/cnmdptst/TestCurrencyPreEuro");
+ addTest(root, &TestCurrencyObject, "tsformat/cnmdptst/TestCurrencyObject");
+ addTest(root, &TestRounding487, "tsformat/cnmdptst/TestRounding487");
+ addTest(root, &TestDoubleAttribute, "tsformat/cnmdptst/TestDoubleAttribute");
+ addTest(root, &TestSecondaryGrouping, "tsformat/cnmdptst/TestSecondaryGrouping");
+ addTest(root, &TestCurrencyKeywords, "tsformat/cnmdptst/TestCurrencyKeywords");
+ addTest(root, &TestRounding5350, "tsformat/cnmdptst/TestRounding5350");
+}
+
+/*Test Various format patterns*/
+static void TestPatterns(void)
+{
+ int32_t pat_length, i, lneed;
+ UNumberFormat *fmt;
+ UChar upat[5];
+ UChar unewpat[5];
+ UChar unum[5];
+ UChar *unewp=NULL;
+ UChar *str=NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ const char* pat[] = { "#.#", "#.", ".#", "#" };
+ const char* newpat[] = { "#0.#", "#0.", "#.0", "#" };
+ const char* num[] = { "0", "0.", ".0", "0" };
+
+ log_verbose("\nTesting different format patterns\n");
+ pat_length = sizeof(pat) / sizeof(pat[0]);
+ for (i=0; i < pat_length; ++i)
+ {
+ status = U_ZERO_ERROR;
+ u_uastrcpy(upat, pat[i]);
+ fmt= unum_open(UNUM_IGNORE,upat, u_strlen(upat), "en_US",NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: Number format constructor failed for pattern %s\n", pat[i]);
+ continue;
+ }
+ lneed=0;
+ lneed=unum_toPattern(fmt, FALSE, NULL, lneed, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status= U_ZERO_ERROR;
+ unewp=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_toPattern(fmt, FALSE, unewp, lneed+1, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("FAIL: Number format extracting the pattern failed for %s\n", pat[i]);
+ }
+ u_uastrcpy(unewpat, newpat[i]);
+ if(u_strcmp(unewp, unewpat) != 0)
+ log_err("FAIL: Pattern %s should be transmute to %s; %s seen instead\n", pat[i], newpat[i], austrdup(unewp) );
+
+ lneed=0;
+ lneed=unum_format(fmt, 0, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_format(fmt, 0, str, lneed+1, NULL, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ }
+ u_uastrcpy(unum, num[i]);
+ if (u_strcmp(str, unum) != 0)
+ {
+ log_err("FAIL: Pattern %s should format zero as %s; %s Seen instead\n", pat[i], num[i], austrdup(str) );
+
+ }
+ free(unewp);
+ free(str);
+ unum_close(fmt);
+ }
+}
+
+/* Test the handling of quotes*/
+static void TestQuotes(void)
+{
+ int32_t lneed;
+ UErrorCode status=U_ZERO_ERROR;
+ UChar pat[15];
+ UChar res[15];
+ UChar *str=NULL;
+ UNumberFormat *fmt;
+ char tempBuf[256];
+ log_verbose("\nTestting the handling of quotes in number format\n");
+ u_uastrcpy(pat, "a'fo''o'b#");
+ fmt =unum_open(UNUM_IGNORE,pat, u_strlen(pat), "en_US",NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in number format costruction using pattern \"a'fo''o'b#\"\n");
+ }
+ lneed=0;
+ lneed=unum_format(fmt, 123, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_format(fmt, 123, str, lneed+1, NULL, &status);
+ }
+ if(U_FAILURE(status) || !str) {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ return;
+ }
+ log_verbose("Pattern \"%s\" \n", u_austrcpy(tempBuf, pat) );
+ log_verbose("Format 123 -> %s\n", u_austrcpy(tempBuf, str) );
+ u_uastrcpy(res, "afo'ob123");
+ if(u_strcmp(str, res) != 0)
+ log_err("FAIL: Expected afo'ob123");
+
+ free(str);
+ unum_close(fmt);
+
+
+ u_uastrcpy(pat, "");
+ u_uastrcpy(pat, "a''b#");
+
+
+ fmt =unum_open(UNUM_IGNORE,pat, u_strlen(pat), "en_US",NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in number format costruction using pattern \"a''b#\"\n");
+ }
+ lneed=0;
+ lneed=unum_format(fmt, 123, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_format(fmt, 123, str, lneed+1, NULL, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ }
+ log_verbose("Pattern \"%s\" \n", u_austrcpy(tempBuf, pat) );
+ log_verbose("Format 123 -> %s\n", u_austrcpy(tempBuf, str) );
+ u_uastrcpy(res, "");
+ u_uastrcpy(res, "a'b123");
+ if(u_strcmp(str, res) != 0)
+ log_err("FAIL: Expected a'b123\n");
+
+ free(str);
+ unum_close(fmt);
+}
+
+/* Test exponential pattern*/
+static void TestExponential(void)
+{
+ int32_t pat_length, val_length, lval_length;
+ int32_t ival, ilval, p, v, lneed;
+ UNumberFormat *fmt;
+ int32_t ppos;
+ UChar *upat;
+ UChar pattern[20];
+ UChar *str=NULL;
+ UChar uvalfor[20], ulvalfor[20];
+ char tempMsgBug[256];
+ double a;
+ UErrorCode status = U_ZERO_ERROR;
+#ifdef OS390
+ static const double val[] = { 0.01234, 123456789, 1.23e75, -3.141592653e-78 };
+#else
+ static const double val[] = { 0.01234, 123456789, 1.23e300, -3.141592653e-271 };
+#endif
+ static const char* pat[] = { "0.####E0", "00.000E00", "##0.######E000", "0.###E0;[0.###E0]" };
+ static const int32_t lval[] = { 0, -1, 1, 123456789 };
+
+ static const char* valFormat[] =
+ {
+ "1.234E-2", "1.2346E8", "1.23E300", "-3.1416E-271",
+ "12.340E-03", "12.346E07", "12.300E299", "-31.416E-272",
+ "12.34E-003", "123.4568E006", "1.23E300", "-314.1593E-273",
+ "1.234E-2", "1.235E8", "1.23E300", "[3.142E-271]"
+ };
+ static const char* lvalFormat[] =
+ {
+ "0E0", "-1E0", "1E0", "1.2346E8",
+ "00.000E00", "-10.000E-01", "10.000E-01", "12.346E07",
+ "0E000", "-1E000", "1E000", "123.4568E006",
+ "0E0", "[1E0]", "1E0", "1.235E8"
+ };
+ static const double valParse[] =
+ {
+#ifdef OS390
+ 0.01234, 123460000, 1.23E75, -3.1416E-78,
+ 0.01234, 123460000, 1.23E75, -3.1416E-78,
+ 0.01234, 123456800, 1.23E75, -3.141593E-78,
+ 0.01234, 123500000, 1.23E75, -3.142E-78
+#else
+ /* We define the whole IEEE 754 number in the 4th column because
+ Visual Age 7 has a bug in rounding numbers. */
+ 0.01234, 123460000, 1.23E300, -3.1415999999999999E-271,
+ 0.01234, 123460000, 1.23E300, -3.1415999999999999E-271,
+ 0.01234, 123456800, 1.23E300, -3.1415929999999999E-271,
+ 0.01234, 123500000, 1.23E300, -3.1420000000000001E-271
+#endif
+ };
+ static const int32_t lvalParse[] =
+ {
+ 0, -1, 1, 123460000,
+ 0, -1, 1, 123460000,
+ 0, -1, 1, 123456800,
+ 0, -1, 1, 123500000
+ };
+
+
+ pat_length = sizeof(pat) / sizeof(pat[0]);
+ val_length = sizeof(val) / sizeof(val[0]);
+ lval_length = sizeof(lval) / sizeof(lval[0]);
+ ival = 0;
+ ilval = 0;
+ for (p=0; p < pat_length; ++p)
+ {
+ upat=(UChar*)malloc(sizeof(UChar) * (strlen(pat[p])+1) );
+ u_uastrcpy(upat, pat[p]);
+ fmt=unum_open(UNUM_IGNORE,upat, u_strlen(upat), "en_US",NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: Bad status returned by Number format construction with pattern %s\n, pat[i]");
+ continue;
+ }
+ lneed= u_strlen(upat) + 1;
+ unum_toPattern(fmt, FALSE, pattern, lneed, &status);
+ log_verbose("Pattern \" %s \" -toPattern-> \" %s \" \n", upat, u_austrcpy(tempMsgBug, pattern) );
+ for (v=0; v<val_length; ++v)
+ {
+ /*format*/
+ lneed=0;
+ lneed=unum_formatDouble(fmt, val[v], NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_formatDouble(fmt, val[v], str, lneed+1, NULL, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ }
+
+
+
+ u_uastrcpy(uvalfor, valFormat[v+ival]);
+ if(u_strcmp(str, uvalfor) != 0)
+ log_verbose("FAIL: Expected %s ( %s )\n", valFormat[v+ival], u_austrcpy(tempMsgBug, uvalfor) );
+
+ /*parsing*/
+ ppos=0;
+ a=unum_parseDouble(fmt, str, u_strlen(str), &ppos, &status);
+ if (ppos== u_strlen(str)) {
+ if (a != valParse[v+ival])
+ log_err("FAIL: Expected: %e, Got: %g\n", valParse[v+ival], a);
+ }
+ else
+ log_err(" FAIL: Partial parse ( %d chars ) -> %e\n", ppos, a);
+
+ free(str);
+ }
+ for (v=0; v<lval_length; ++v)
+ {
+ /*format*/
+ lneed=0;
+ lneed=unum_formatDouble(fmt, lval[v], NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_formatDouble(fmt, lval[v], str, lneed+1, NULL, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ }
+ /*printf(" Format %e -> %s\n", lval[v], austrdup(str) );*/
+ u_uastrcpy(ulvalfor, lvalFormat[v+ilval]);
+ if(u_strcmp(str, ulvalfor) != 0)
+ log_err("FAIL: Expected %s ( %s )\n", valFormat[v+ilval], austrdup(ulvalfor) );
+
+ /*parsing*/
+ ppos=0;
+ a=unum_parseDouble(fmt, str, u_strlen(str), &ppos, &status);
+ if (ppos== u_strlen(str)) {
+ /*printf(" Parse -> %e\n", a);*/
+ if (a != lvalParse[v+ilval])
+ log_err("FAIL: Expected : %e\n", valParse[v+ival]);
+ }
+ else
+ log_err(" FAIL: Partial parse ( %d chars ) -> %e\n", ppos, a);
+
+ free(str);
+
+ }
+ ival += val_length;
+ ilval += lval_length;
+ unum_close(fmt);
+ free(upat);
+ }
+}
+
+/**
+ * Test the handling of the currency symbol in patterns.
+ */
+static void TestCurrencySign(void)
+{
+ int32_t lneed;
+ UNumberFormat *fmt;
+ UChar *pattern=NULL;
+ UChar *str=NULL;
+ UChar *pat=NULL;
+ UChar *res=NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ char tempBuf[256];
+
+ pattern=(UChar*)malloc(sizeof(UChar) * (strlen("*#,##0.00;-*#,##0.00") + 1) );
+ u_uastrcpy(pattern, "*#,##0.00;-*#,##0.00");
+ pattern[0]=pattern[11]=0xa4; /* insert latin-1 currency symbol */
+ fmt = unum_open(UNUM_IGNORE,pattern, u_strlen(pattern), "en_US",NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in number format construction with pattern \"\\xA4#,##0.00;-\\xA4#,##0.00\\\" \n");
+ }
+ lneed=0;
+ lneed=unum_formatDouble(fmt, 1234.56, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_formatDouble(fmt, 1234.56, str, lneed+1, NULL, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ }
+ lneed=0;
+ lneed=unum_toPattern(fmt, FALSE, NULL, lneed, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ pat=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_formatDouble(fmt, FALSE, pat, lneed+1, NULL, &status);
+ }
+ log_verbose("Pattern \" %s \" \n", u_austrcpy(tempBuf, pat));
+ log_verbose("Format 1234.56 -> %s\n", u_austrcpy(tempBuf, str) );
+ if(U_SUCCESS(status) && str) {
+ res=(UChar*)malloc(sizeof(UChar) * (strlen("$1,234.56")+1) );
+ u_uastrcpy(res, "$1,234.56");
+ if (u_strcmp(str, res) !=0) log_err("FAIL: Expected $1,234.56\n");
+ } else {
+ log_err("Error formatting\n");
+ }
+ free(str);
+ free(res);
+ free(pat);
+
+ lneed=0;
+ lneed=unum_formatDouble(fmt, -1234.56, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ unum_formatDouble(fmt, -1234.56, str, lneed+1, NULL, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ }
+ if(str) {
+ res=(UChar*)malloc(sizeof(UChar) * (strlen("-$1,234.56")+1) );
+ u_uastrcpy(res, "-$1,234.56");
+ if (u_strcmp(str, res) != 0) log_err("FAIL: Expected -$1,234.56\n");
+ free(str);
+ free(res);
+ }
+
+ unum_close(fmt);
+ free(pattern);
+}
+
+/**
+ * Test localized currency patterns.
+ */
+static void TestCurrency(void)
+{
+ UNumberFormat *currencyFmt;
+ UChar *str;
+ int32_t lneed, i;
+ UFieldPosition pos;
+ UChar res[100];
+ UErrorCode status = U_ZERO_ERROR;
+ const char* locale[]={"fr_CA", "de_DE_PREEURO", "fr_FR_PREEURO"};
+ const char* result[]={"1,50 $", "1,50 DM", "1,50 F"};
+ log_verbose("\nTesting the number format with different currency patterns\n");
+ for(i=0; i < 3; i++)
+ {
+ str=NULL;
+ currencyFmt = unum_open(UNUM_CURRENCY, NULL,0,locale[i],NULL, &status);
+
+ if(U_FAILURE(status)){
+ log_err("Error in the construction of number format with style currency:\n%s\n",
+ myErrorName(status));
+ } else {
+ lneed=0;
+ lneed= unum_formatDouble(currencyFmt, 1.50, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ pos.field = 0;
+ unum_formatDouble(currencyFmt, 1.50, str, lneed+1, &pos, &status);
+ }
+
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status) );
+ } else {
+ u_charsToUChars(result[i], res, (int32_t)strlen(result[i])+1);
+
+ if (u_strcmp(str, res) != 0){
+ log_err("FAIL: Expected %s Got: %s for locale: %s\n", result[i], aescstrdup(str, -1), locale[i]);
+ }
+ }
+ }
+
+ unum_close(currencyFmt);
+ free(str);
+ }
+}
+/**
+ * Test localized currency patterns for PREEURO variants.
+ */
+static void TestCurrencyPreEuro(void)
+{
+ UNumberFormat *currencyFmt;
+ UChar *str=NULL, *res=NULL;
+ int32_t lneed, i;
+ UFieldPosition pos;
+ UErrorCode status = U_ZERO_ERROR;
+
+ const char* locale[]={
+ "ca_ES_PREEURO", "de_LU_PREEURO", "en_IE_PREEURO", "fi_FI_PREEURO", "fr_LU_PREEURO", "it_IT_PREEURO",
+ "pt_PT_PREEURO", "de_AT_PREEURO", "el_GR_PREEURO", "es_ES_PREEURO", "fr_BE_PREEURO", "ga_IE_PREEURO",
+ "nl_BE_PREEURO", "de_DE_PREEURO", "en_BE_PREEURO", "eu_ES_PREEURO", "fr_FR_PREEURO", "gl_ES_PREEURO",
+ "nl_NL_PREEURO",
+ };
+
+ const char* result[]={
+ "2 \\u20A7", "2 F", "\\u00A31.50", "1,50\\u00A0mk", "2 F", "\\u20A4 2",
+ "1$50 Esc.", "\\u00F6S 1,50", "1,50\\u0394\\u03C1\\u03C7", "2 \\u20A7", "1,50 FB", "\\u00a31.50",
+ "1,50 BF", "1,50 DM", "1,50 BF", "2 \\u20A7", "1,50 F", "2 \\u20A7",
+ "fl 1,50"
+ };
+
+ log_verbose("\nTesting the number format with different currency patterns\n");
+ for(i=0; i < 19; i++)
+ {
+ char curID[256] = {0};
+ uloc_canonicalize(locale[i], curID, 256, &status);
+ if(U_FAILURE(status)){
+ log_err("Could not canonicalize %s. Error: %s \n", locale[i], u_errorName(status));
+ continue;
+ }
+ currencyFmt = unum_open(UNUM_CURRENCY, NULL,0,curID,NULL, &status);
+
+ if(U_FAILURE(status)){
+ log_err("Error in the construction of number format with style currency:\n%s\n",
+ myErrorName(status));
+ } else {
+ lneed=0;
+ lneed= unum_formatDouble(currencyFmt, 1.50, NULL, lneed, NULL, &status);
+
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ pos.field = 0;
+ unum_formatDouble(currencyFmt, 1.50, str, lneed+1, &pos, &status);
+ }
+
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status) );
+ } else {
+ res=(UChar*)malloc(sizeof(UChar) * (strlen(result[i])+1) );
+ u_unescape(result[i],res,(int32_t)(strlen(result[i])+1));
+
+ if (u_strcmp(str, res) != 0){
+ log_err("FAIL: Expected %s Got: %s for locale: %s\n", result[i],aescstrdup(str, -1),locale[i]);
+ }
+ }
+ }
+
+ unum_close(currencyFmt);
+ free(str);
+ free(res);
+ }
+}
+
+/**
+ * Test currency "object" (we use this name to match the other C++
+ * test name and the Jave name). Actually, test ISO currency code
+ * support in the C API.
+ */
+static void TestCurrencyObject(void)
+{
+ UNumberFormat *currencyFmt;
+ UChar *str=NULL, *res=NULL;
+ int32_t lneed, i;
+ UFieldPosition pos;
+ UErrorCode status = U_ZERO_ERROR;
+
+ const char* locale[]={
+ "fr_FR",
+ "fr_FR",
+ };
+
+ const char* currency[]={
+ "",
+ "JPY",
+ };
+
+ const char* result[]={
+ "1\\u00A0234,56 \\u20AC",
+ "1\\u00A0235 \\u00A5JP",
+ };
+
+ log_verbose("\nTesting the number format with different currency codes\n");
+ for(i=0; i < 2; i++)
+ {
+ char cStr[20]={0};
+ UChar isoCode[16]={0};
+ currencyFmt = unum_open(UNUM_CURRENCY, NULL,0,locale[i],NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("Error in the construction of number format with style currency:\n%s\n",
+ myErrorName(status));
+ } else {
+ if (*currency[i]) {
+ u_uastrcpy(isoCode, currency[i]);
+ unum_setTextAttribute(currencyFmt, UNUM_CURRENCY_CODE,
+ isoCode, u_strlen(isoCode), &status);
+
+ if(U_FAILURE(status)) {
+ log_err("FAIL: can't set currency code %s\n", myErrorName(status) );
+ }
+ }
+
+ unum_getTextAttribute(currencyFmt, UNUM_CURRENCY_CODE,
+ isoCode, sizeof(isoCode), &status);
+
+ if(U_FAILURE(status)) {
+ log_err("FAIL: can't get currency code %s\n", myErrorName(status) );
+ }
+
+ u_UCharsToChars(isoCode,cStr,u_strlen(isoCode));
+ log_verbose("ISO code %s\n", cStr);
+ if (*currency[i] && uprv_strcmp(cStr, currency[i])) {
+ log_err("FAIL: currency should be %s, but is %s\n", currency[i], cStr);
+ }
+
+ lneed=0;
+ lneed= unum_formatDouble(currencyFmt, 1234.56, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ str=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ pos.field = 0;
+ unum_formatDouble(currencyFmt, 1234.56, str, lneed+1, &pos, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status) );
+ } else {
+ res=(UChar*)malloc(sizeof(UChar) * (strlen(result[i])+1) );
+ u_unescape(result[i],res, (int32_t)(strlen(result[i])+1));
+ if (u_strcmp(str, res) != 0){
+ log_err("FAIL: Expected %s Got: %s for locale: %s\n", result[i],aescstrdup(str, -1),locale[i]);
+ }
+ }
+ }
+
+ unum_close(currencyFmt);
+ free(str);
+ free(res);
+ }
+}
+
+/**
+ * Test proper rounding by the format method.
+ */
+static void TestRounding487(void)
+{
+ UNumberFormat *nnf;
+ UErrorCode status = U_ZERO_ERROR;
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* nnf = unum_open(UNUM_DEFAULT, NULL, &status); */
+ nnf = unum_open(UNUM_DEFAULT, NULL,0,"en_US",NULL, &status);
+
+ if(U_FAILURE(status)){
+ log_err("FAIL: failure in the construction of number format: %s\n", myErrorName(status));
+ } else {
+ roundingTest(nnf, 0.00159999, 4, "0.0016");
+ roundingTest(nnf, 0.00995, 4, "0.01");
+
+ roundingTest(nnf, 12.3995, 3, "12.4");
+
+ roundingTest(nnf, 12.4999, 0, "12");
+ roundingTest(nnf, - 19.5, 0, "-20");
+ }
+
+ unum_close(nnf);
+}
+
+/*-------------------------------------*/
+
+static void roundingTest(UNumberFormat* nf, double x, int32_t maxFractionDigits, const char* expected)
+{
+ UChar *out = NULL;
+ UChar *res;
+ UFieldPosition pos;
+ UErrorCode status;
+ int32_t lneed;
+ status=U_ZERO_ERROR;
+ unum_setAttribute(nf, UNUM_MAX_FRACTION_DIGITS, maxFractionDigits);
+ lneed=0;
+ lneed=unum_formatDouble(nf, x, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ out=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ pos.field=0;
+ unum_formatDouble(nf, x, out, lneed+1, &pos, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status) );
+ }
+ /*Need to use log_verbose here. Problem with the float*/
+ /*printf("%f format with %d fraction digits to %s\n", x, maxFractionDigits, austrdup(out) );*/
+ res=(UChar*)malloc(sizeof(UChar) * (strlen(expected)+1) );
+ u_uastrcpy(res, expected);
+ if (u_strcmp(out, res) != 0)
+ log_err("FAIL: Expected: %s or %s\n", expected, austrdup(res) );
+ free(res);
+ if(out != NULL) {
+ free(out);
+ }
+}
+
+/*
+ * Testing unum_getDoubleAttribute and unum_setDoubleAttribute()
+ */
+static void TestDoubleAttribute(void)
+{
+ double mydata[] = { 1.11, 22.22, 333.33, 4444.44, 55555.55, 666666.66, 7777777.77, 88888888.88, 999999999.99};
+ double dvalue;
+ int i;
+ UErrorCode status=U_ZERO_ERROR;
+ UNumberFormatAttribute attr;
+ UNumberFormatStyle style= UNUM_DEFAULT;
+ UNumberFormat *def;
+
+ log_verbose("\nTesting get and set DoubleAttributes\n");
+ def=unum_open(style, NULL,0,NULL,NULL, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("Fail: error creating a default number formatter\n");
+ } else {
+ attr=UNUM_ROUNDING_INCREMENT;
+ dvalue=unum_getDoubleAttribute(def, attr);
+ for (i = 0; i<9 ; i++)
+ {
+ dvalue = mydata[i];
+ unum_setDoubleAttribute(def, attr, dvalue);
+ if(unum_getDoubleAttribute(def,attr)!=mydata[i])
+ log_err("Fail: error in setting and getting double attributes for UNUM_ROUNDING_INCREMENT\n");
+ else
+ log_verbose("Pass: setting and getting double attributes for UNUM_ROUNDING_INCREMENT works fine\n");
+ }
+ }
+
+ unum_close(def);
+}
+
+/**
+ * Test the functioning of the secondary grouping value.
+ */
+static void TestSecondaryGrouping(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UNumberFormat *f = NULL, *g= NULL;
+ UNumberFormat *us = unum_open(UNUM_DECIMAL,NULL,0, "en_US", NULL,&status);
+ UFieldPosition pos;
+ UChar resultBuffer[512];
+ int32_t l = 1876543210L;
+ UBool ok = TRUE;
+ UChar buffer[512];
+ int32_t i;
+ UBool expectGroup = FALSE, isGroup = FALSE;
+
+ u_uastrcpy(buffer, "#,##,###");
+ f = unum_open(UNUM_IGNORE,buffer, -1, "en_US",NULL, &status);
+ CHECK(status, "DecimalFormat ct");
+
+ pos.field = 0;
+ unum_format(f, (int32_t)123456789L, resultBuffer, 512 , &pos, &status);
+ u_uastrcpy(buffer, "12,34,56,789");
+ if ((u_strcmp(resultBuffer, buffer) != 0) || U_FAILURE(status))
+ {
+ log_err("Fail: Formatting \"#,##,###\" pattern with 123456789 got %s, expected %s\n", resultBuffer, "12,34,56,789");
+ }
+ if (pos.beginIndex != 0 && pos.endIndex != 12) {
+ log_err("Fail: Formatting \"#,##,###\" pattern pos = (%d, %d) expected pos = (0, 12)\n", pos.beginIndex, pos.endIndex);
+ }
+ memset(resultBuffer,0, sizeof(UChar)*512);
+ unum_toPattern(f, FALSE, resultBuffer, 512, &status);
+ u_uastrcpy(buffer, "#,##,###");
+ if ((u_strcmp(resultBuffer, buffer) != 0) || U_FAILURE(status))
+ {
+ log_err("Fail: toPattern() got %s, expected %s\n", resultBuffer, "#,##,###");
+ }
+ memset(resultBuffer,0, sizeof(UChar)*512);
+ u_uastrcpy(buffer, "#,###");
+ unum_applyPattern(f, FALSE, buffer, -1,NULL,NULL);
+ if (U_FAILURE(status))
+ {
+ log_err("Fail: applyPattern call failed\n");
+ }
+ unum_setAttribute(f, UNUM_SECONDARY_GROUPING_SIZE, 4);
+ unum_format(f, (int32_t)123456789L, resultBuffer, 512 , &pos, &status);
+ u_uastrcpy(buffer, "12,3456,789");
+ if ((u_strcmp(resultBuffer, buffer) != 0) || U_FAILURE(status))
+ {
+ log_err("Fail: Formatting \"#,###\" pattern with 123456789 got %s, expected %s\n", resultBuffer, "12,3456,789");
+ }
+ memset(resultBuffer,0, sizeof(UChar)*512);
+ unum_toPattern(f, FALSE, resultBuffer, 512, &status);
+ u_uastrcpy(buffer, "#,####,###");
+ if ((u_strcmp(resultBuffer, buffer) != 0) || U_FAILURE(status))
+ {
+ log_err("Fail: toPattern() got %s, expected %s\n", resultBuffer, "#,####,###");
+ }
+ memset(resultBuffer,0, sizeof(UChar)*512);
+ g = unum_open(UNUM_DECIMAL, NULL,0,"hi_IN",NULL, &status);
+ if (U_FAILURE(status))
+ {
+ log_err("Fail: Cannot create UNumberFormat for \"hi_IN\" locale.\n");
+ }
+
+ unum_format(g, l, resultBuffer, 512, &pos, &status);
+ unum_close(g);
+ /* expect "1,87,65,43,210", but with Hindi digits */
+ /* 01234567890123 */
+ if (u_strlen(resultBuffer) != 14) {
+ ok = FALSE;
+ } else {
+ for (i=0; i<u_strlen(resultBuffer); ++i) {
+ expectGroup = FALSE;
+ switch (i) {
+ case 1:
+ case 4:
+ case 7:
+ case 10:
+ expectGroup = TRUE;
+ break;
+ }
+ /* Later -- fix this to get the actual grouping */
+ /* character from the resource bundle. */
+ isGroup = (UBool)(resultBuffer[i] == 0x002C);
+ if (isGroup != expectGroup) {
+ ok = FALSE;
+ break;
+ }
+ }
+ }
+ if (!ok) {
+ log_err("FAIL Expected %s x hi_IN -> \"1,87,65,43,210\" (with Hindi digits), got %s\n", "1876543210L", resultBuffer);
+ }
+ unum_close(f);
+ unum_close(us);
+}
+
+static void TestCurrencyKeywords(void)
+{
+ static const char * const currencies[] = {
+ "ADD", "ADP", "AED", "AFA", "AFN", "AIF", "ALK", "ALL", "ALV", "ALX", "AMD",
+ "ANG", "AOA", "AOK", "AON", "AOR", "AOS", "ARA", "ARM", "ARP", "ARS", "ATS",
+ "AUD", "AUP", "AWG", "AZM", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF",
+ "BEL", "BGL", "BGM", "BGN", "BGO", "BGX", "BHD", "BIF", "BMD", "BMP", "BND",
+ "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ",
+ "BSD", "BSP", "BTN", "BTR", "BUK", "BUR", "BWP", "BYB", "BYL", "BYR", "BZD",
+ "BZH", "CAD", "CDF", "CDG", "CDL", "CFF", "CHF", "CKD", "CLC", "CLE", "CLF",
+ "CLP", "CMF", "CNP", "CNX", "CNY", "COB", "COF", "COP", "CRC", "CSC", "CSK",
+ "CUP", "CUX", "CVE", "CWG", "CYP", "CZK", "DDM", "DEM", "DES", "DJF", "DKK",
+ "DOP", "DZD", "DZF", "DZG", "ECS", "ECV", "EEK", "EGP", "ERN", "ESP", "ETB",
+ "ETD", "EUR", "FIM", "FIN", "FJD", "FJP", "FKP", "FOK", "FRF", "FRG", "GAF",
+ "GBP", "GEK", "GEL", "GHC", "GHO", "GHP", "GHR", "GIP", "GLK", "GMD", "GMP",
+ "GNF", "GNI", "GNS", "GPF", "GQE", "GQF", "GQP", "GRD", "GRN", "GTQ", "GUF",
+ "GWE", "GWM", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IBP",
+ "IDG", "IDJ", "IDN", "IDR", "IEP", "ILL", "ILP", "ILS", "IMP", "INR", "IQD",
+ "IRR", "ISK", "ITL", "JEP", "JMD", "JMP", "JOD", "JPY", "KES", "KGS", "KHO",
+ "KHR", "KID", "KMF", "KPP", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZR",
+ "KZT", "LAK", "LBP", "LIF", "LKR", "LNR", "LRD", "LSL", "LTL", "LTT", "LUF",
+ "LVL", "LVR", "LYB", "LYD", "LYP", "MAD", "MAF", "MCF", "MCG", "MDC", "MDL",
+ "MDR", "MGA", "MGF", "MHD", "MKD", "MKN", "MLF", "MMK", "MMX", "MNT", "MOP",
+ "MQF", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MWP", "MXN", "MXP",
+ "MXV", "MYR", "MZE", "MZM", "NAD", "NCF", "NGN", "NGP", "NHF", "NIC", "NIG",
+ "NIO", "NLG", "NOK", "NPR", "NZD", "NZP", "OMR", "OMS", "PAB", "PDK", "PDN",
+ "PDR", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLX", "PLZ", "PSP",
+ "PTC", "PTE", "PYG", "QAR", "REF", "ROL", "RON", "RUB", "RUR", "RWF", "SAR",
+ "SAS", "SBD", "SCR", "SDD", "SDP", "SEK", "SGD", "SHP", "SIB", "SIT", "SKK",
+ "SLL", "SML", "SOS", "SQS", "SRG", "SSP", "STD", "STE", "SUN", "SUR", "SVC",
+ "SYP", "SZL", "TCC", "TDF", "THB", "TJR", "TJS", "TMM", "TND", "TOP", "TOS",
+ "TPE", "TPP", "TRL", "TTD", "TTO", "TVD", "TWD", "TZS", "UAH", "UAK", "UGS",
+ "UGX", "USD", "USN", "USS", "UYF", "UYP", "UYU", "UZC", "UZS", "VAL", "VDD",
+ "VDN", "VDP", "VEB", "VGD", "VND", "VNN", "VNR", "VNS", "VUV", "WSP", "WST",
+ "XAD", "XAF", "XAM", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XCF", "XDR",
+ "XEF", "XEU", "XFO", "XFU", "XID", "XMF", "XNF", "XOF", "XPF", "XPS", "XSS",
+ "XTR", "YDD", "YEI", "YER", "YUD", "YUF", "YUG", "YUM", "YUN", "YUO", "YUR",
+ "ZAL", "ZAP", "ZAR", "ZMK", "ZMP", "ZRN", "ZRZ", "ZWD"
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i = 0, j = 0;
+ int32_t noLocales = uloc_countAvailable();
+ char locale[256];
+ char currLoc[256];
+ UChar result[4];
+ UChar currBuffer[256];
+
+
+ for(i = 0; i < noLocales; i++) {
+ strcpy(currLoc, uloc_getAvailable(i));
+ for(j = 0; j < sizeof(currencies)/sizeof(currencies[0]); j++) {
+ strcpy(locale, currLoc);
+ strcat(locale, "@currency=");
+ strcat(locale, currencies[j]);
+ ucurr_forLocale(locale, result, 4, &status);
+ u_charsToUChars(currencies[j], currBuffer, 3);
+ currBuffer[3] = 0;
+ if(u_strcmp(currBuffer, result) != 0) {
+ log_err("Didn't get the right currency for %s\n", locale);
+ }
+ }
+
+ }
+}
+
+/**
+ * Test proper handling of rounding modes.
+ */
+static void TestRounding5350(void)
+{
+ UNumberFormat *nnf;
+ UErrorCode status = U_ZERO_ERROR;
+ /* this is supposed to open default date format, but later on it treats it like it is "en_US"
+ - very bad if you try to run the tests on machine where default locale is NOT "en_US" */
+ /* nnf = unum_open(UNUM_DEFAULT, NULL, &status); */
+ nnf = unum_open(UNUM_DEFAULT, NULL,0,"en_US",NULL, &status);
+
+ if(U_FAILURE(status)){
+ log_err("FAIL: failure in the construction of number format: %s\n", myErrorName(status));
+ return;
+ }
+
+ unum_setAttribute(nnf, UNUM_MAX_FRACTION_DIGITS, 2);
+ roundingTest2(nnf, -0.125, UNUM_ROUND_CEILING, "-0.12");
+ roundingTest2(nnf, -0.125, UNUM_ROUND_FLOOR, "-0.13");
+ roundingTest2(nnf, -0.125, UNUM_ROUND_DOWN, "-0.12");
+ roundingTest2(nnf, -0.125, UNUM_ROUND_UP, "-0.13");
+ roundingTest2(nnf, 0.125, UNUM_FOUND_HALFEVEN, "0.12");
+ roundingTest2(nnf, 0.135, UNUM_ROUND_HALFDOWN, "0.13");
+ roundingTest2(nnf, 0.125, UNUM_ROUND_HALFUP, "0.13");
+ roundingTest2(nnf, 0.135, UNUM_FOUND_HALFEVEN, "0.14");
+ /* The following are exactly represented, and shouldn't round */
+ roundingTest2(nnf, 1.00, UNUM_ROUND_UP, "1");
+ roundingTest2(nnf, 24.25, UNUM_ROUND_UP, "24.25");
+ roundingTest2(nnf, 24.25, UNUM_ROUND_CEILING, "24.25");
+ roundingTest2(nnf, -24.25, UNUM_ROUND_UP, "-24.25");
+
+ /* Differences pretty far out there */
+ roundingTest2(nnf, 1.0000001, UNUM_ROUND_CEILING, "1.01");
+ roundingTest2(nnf, 1.0000001, UNUM_ROUND_FLOOR, "1");
+ roundingTest2(nnf, 1.0000001, UNUM_ROUND_DOWN, "1");
+ roundingTest2(nnf, 1.0000001, UNUM_ROUND_UP, "1.01");
+ roundingTest2(nnf, 1.0000001, UNUM_FOUND_HALFEVEN, "1");
+ roundingTest2(nnf, 1.0000001, UNUM_ROUND_HALFDOWN, "1");
+ roundingTest2(nnf, 1.0000001, UNUM_ROUND_HALFUP, "1");
+
+ roundingTest2(nnf, -1.0000001, UNUM_ROUND_CEILING, "-1");
+ roundingTest2(nnf, -1.0000001, UNUM_ROUND_FLOOR, "-1.01");
+ roundingTest2(nnf, -1.0000001, UNUM_ROUND_DOWN, "-1");
+ roundingTest2(nnf, -1.0000001, UNUM_ROUND_UP, "-1.01");
+ roundingTest2(nnf, -1.0000001, UNUM_FOUND_HALFEVEN, "-1");
+ roundingTest2(nnf, -1.0000001, UNUM_ROUND_HALFDOWN, "-1");
+ roundingTest2(nnf, -1.0000001, UNUM_ROUND_HALFUP, "-1");
+
+ unum_close(nnf);
+}
+
+/*-------------------------------------*/
+
+static void roundingTest2(UNumberFormat* nf, double x, int32_t roundingMode, const char* expected)
+{
+ UChar *out = NULL;
+ UChar *res;
+ UFieldPosition pos;
+ UErrorCode status;
+ int32_t lneed;
+ status=U_ZERO_ERROR;
+ unum_setAttribute(nf, UNUM_ROUNDING_MODE, roundingMode);
+ lneed=0;
+ lneed=unum_formatDouble(nf, x, NULL, lneed, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ out=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
+ pos.field=0;
+ unum_formatDouble(nf, x, out, lneed+1, &pos, &status);
+ }
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status) );
+ }
+ /*Need to use log_verbose here. Problem with the float*/
+ /*printf("%f format with %d fraction digits to %s\n", x, maxFractionDigits, austrdup(out) );*/
+ res=(UChar*)malloc(sizeof(UChar) * (strlen(expected)+1) );
+ u_uastrcpy(res, expected);
+ if (u_strcmp(out, res) != 0)
+ log_err("FAIL: Expected: \"%s\" Got: \"%s\"\n", expected, austrdup(out) );
+ free(res);
+ if(out != NULL) {
+ free(out);
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.h
new file mode 100644
index 00000000000..c437490fabf
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cnmdptst.h
@@ -0,0 +1,60 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, 2007 International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CNMDPTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* C DEPTH TEST FOR NUMBER FORMAT */
+
+#ifndef _CNUMDEPTST
+#define _CNUMDEPTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+
+/* The function used to test differnet format patterns*/
+static void TestPatterns(void);
+
+/* Test the handling of quotes*/
+static void TestQuotes(void);
+
+/* Test patterns with exponential representation*/
+static void TestExponential(void);
+
+/* Test the handling of the currency symbol in patterns. */
+static void TestCurrencySign(void);
+
+/* Test proper rounding by the format method.*/
+static void TestRounding487(void);
+
+/* Test proper handling of rounding modes. */
+static void TestRounding5350(void);
+
+/* Test localized currency patterns. */
+static void TestCurrency(void);
+
+/* Test getDoubleAttribute and getDoubleAttribute */
+static void TestDoubleAttribute(void);
+
+static void TestSecondaryGrouping(void);
+
+/*Internal functions used*/
+static void roundingTest(UNumberFormat*, double, int32_t, const char*);
+static void roundingTest2(UNumberFormat*, double, int32_t, const char*);
+
+static void TestCurrencyKeywords(void);
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.c
new file mode 100644
index 00000000000..99e6540386a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.c
@@ -0,0 +1,1517 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CNORMTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+* synwee added test for quick check
+* synwee added test for checkFCD
+*********************************************************************************/
+/*tests for u_normalization*/
+#include "unicode/utypes.h"
+#include "unicode/unorm.h"
+#include "unormimp.h"
+#include "cintltst.h"
+
+#if UCONFIG_NO_NORMALIZATION
+
+void addNormTest(TestNode** root) {
+ /* no normalization - nothing to do */
+}
+
+#else
+
+#include <stdlib.h>
+#include <time.h>
+#include "unicode/uchar.h"
+#include "unicode/ustring.h"
+#include "unicode/unorm.h"
+#include "cnormtst.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof ((array)[0]))
+
+static void
+TestAPI(void);
+
+static void
+TestNormCoverage(void);
+
+static void
+TestConcatenate(void);
+
+static void
+TestNextPrevious(void);
+
+static void TestIsNormalized(void);
+
+static void
+TestFCNFKCClosure(void);
+
+static void
+TestQuickCheckPerCP(void);
+
+static void
+TestComposition(void);
+
+const static char* canonTests[][3] = {
+ /* Input*/ /*Decomposed*/ /*Composed*/
+ { "cat", "cat", "cat" },
+ { "\\u00e0ardvark", "a\\u0300ardvark", "\\u00e0ardvark", },
+
+ { "\\u1e0a", "D\\u0307", "\\u1e0a" }, /* D-dot_above*/
+ { "D\\u0307", "D\\u0307", "\\u1e0a" }, /* D dot_above*/
+
+ { "\\u1e0c\\u0307", "D\\u0323\\u0307", "\\u1e0c\\u0307" }, /* D-dot_below dot_above*/
+ { "\\u1e0a\\u0323", "D\\u0323\\u0307", "\\u1e0c\\u0307" }, /* D-dot_above dot_below */
+ { "D\\u0307\\u0323", "D\\u0323\\u0307", "\\u1e0c\\u0307" }, /* D dot_below dot_above */
+
+ { "\\u1e10\\u0307\\u0323", "D\\u0327\\u0323\\u0307", "\\u1e10\\u0323\\u0307" }, /*D dot_below cedilla dot_above*/
+ { "D\\u0307\\u0328\\u0323", "D\\u0328\\u0323\\u0307", "\\u1e0c\\u0328\\u0307" }, /* D dot_above ogonek dot_below*/
+
+ { "\\u1E14", "E\\u0304\\u0300", "\\u1E14" }, /* E-macron-grave*/
+ { "\\u0112\\u0300", "E\\u0304\\u0300", "\\u1E14" }, /* E-macron + grave*/
+ { "\\u00c8\\u0304", "E\\u0300\\u0304", "\\u00c8\\u0304" }, /* E-grave + macron*/
+
+ { "\\u212b", "A\\u030a", "\\u00c5" }, /* angstrom_sign*/
+ { "\\u00c5", "A\\u030a", "\\u00c5" }, /* A-ring*/
+
+ { "\\u00C4ffin", "A\\u0308ffin", "\\u00C4ffin" },
+ { "\\u00C4\\uFB03n", "A\\u0308\\uFB03n", "\\u00C4\\uFB03n" },
+
+ { "Henry IV", "Henry IV", "Henry IV" },
+ { "Henry \\u2163", "Henry \\u2163", "Henry \\u2163" },
+
+ { "\\u30AC", "\\u30AB\\u3099", "\\u30AC" }, /* ga (Katakana)*/
+ { "\\u30AB\\u3099", "\\u30AB\\u3099", "\\u30AC" }, /*ka + ten*/
+ { "\\uFF76\\uFF9E", "\\uFF76\\uFF9E", "\\uFF76\\uFF9E" }, /* hw_ka + hw_ten*/
+ { "\\u30AB\\uFF9E", "\\u30AB\\uFF9E", "\\u30AB\\uFF9E" }, /* ka + hw_ten*/
+ { "\\uFF76\\u3099", "\\uFF76\\u3099", "\\uFF76\\u3099" }, /* hw_ka + ten*/
+ { "A\\u0300\\u0316", "A\\u0316\\u0300", "\\u00C0\\u0316" } /* hw_ka + ten*/
+};
+
+const static char* compatTests[][3] = {
+ /* Input*/ /*Decomposed */ /*Composed*/
+ { "cat", "cat", "cat" },
+
+ { "\\uFB4f", "\\u05D0\\u05DC", "\\u05D0\\u05DC" }, /* Alef-Lamed vs. Alef, Lamed*/
+
+ { "\\u00C4ffin", "A\\u0308ffin", "\\u00C4ffin" },
+ { "\\u00C4\\uFB03n", "A\\u0308ffin", "\\u00C4ffin" }, /* ffi ligature -> f + f + i*/
+
+ { "Henry IV", "Henry IV", "Henry IV" },
+ { "Henry \\u2163", "Henry IV", "Henry IV" },
+
+ { "\\u30AC", "\\u30AB\\u3099", "\\u30AC" }, /* ga (Katakana)*/
+ { "\\u30AB\\u3099", "\\u30AB\\u3099", "\\u30AC" }, /*ka + ten*/
+
+ { "\\uFF76\\u3099", "\\u30AB\\u3099", "\\u30AC" }, /* hw_ka + ten*/
+
+ /*These two are broken in Unicode 2.1.2 but fixed in 2.1.5 and later*/
+ { "\\uFF76\\uFF9E", "\\u30AB\\u3099", "\\u30AC" }, /* hw_ka + hw_ten*/
+ { "\\u30AB\\uFF9E", "\\u30AB\\u3099", "\\u30AC" } /* ka + hw_ten*/
+
+};
+
+void addNormTest(TestNode** root);
+
+void addNormTest(TestNode** root)
+{
+ addTest(root, &TestAPI, "tscoll/cnormtst/TestAPI");
+ addTest(root, &TestDecomp, "tscoll/cnormtst/TestDecomp");
+ addTest(root, &TestCompatDecomp, "tscoll/cnormtst/TestCompatDecomp");
+ addTest(root, &TestCanonDecompCompose, "tscoll/cnormtst/TestCanonDecompCompose");
+ addTest(root, &TestCompatDecompCompose, "tscoll/cnormtst/CompatDecompCompose");
+ addTest(root, &TestNull, "tscoll/cnormtst/TestNull");
+ addTest(root, &TestQuickCheck, "tscoll/cnormtst/TestQuickCheck");
+ addTest(root, &TestQuickCheckPerCP, "tscoll/cnormtst/TestQuickCheckPerCP");
+ addTest(root, &TestIsNormalized, "tscoll/cnormtst/TestIsNormalized");
+ addTest(root, &TestCheckFCD, "tscoll/cnormtst/TestCheckFCD");
+ addTest(root, &TestNormCoverage, "tscoll/cnormtst/TestNormCoverage");
+ addTest(root, &TestConcatenate, "tscoll/cnormtst/TestConcatenate");
+ addTest(root, &TestNextPrevious, "tscoll/cnormtst/TestNextPrevious");
+ addTest(root, &TestFCNFKCClosure, "tscoll/cnormtst/TestFCNFKCClosure");
+ addTest(root, &TestComposition, "tscoll/cnormtst/TestComposition");
+}
+
+void TestDecomp()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t x, neededLen, resLen;
+ UChar *source=NULL, *result=NULL;
+ status = U_ZERO_ERROR;
+ resLen=0;
+ log_verbose("Testing unorm_normalize with Decomp canonical\n");
+ for(x=0; x < LENGTHOF(canonTests); x++)
+ {
+ source=CharsToUChars(canonTests[x][0]);
+ neededLen= unorm_normalize(source, u_strlen(source), UNORM_NFD, 0, NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resLen=neededLen+1;
+ result=(UChar*)malloc(sizeof(UChar*) * resLen);
+ unorm_normalize(source, u_strlen(source), UNORM_NFD, 0, result, resLen, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR in unorm_normalize at %s: %s\n", austrdup(source), myErrorName(status) );
+ } else {
+ assertEqual(result, canonTests[x][1], x);
+ }
+ free(result);
+ free(source);
+ }
+}
+
+void TestCompatDecomp()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t x, neededLen, resLen;
+ UChar *source=NULL, *result=NULL;
+ status = U_ZERO_ERROR;
+ resLen=0;
+ log_verbose("Testing unorm_normalize with Decomp compat\n");
+ for(x=0; x < LENGTHOF(compatTests); x++)
+ {
+ source=CharsToUChars(compatTests[x][0]);
+ neededLen= unorm_normalize(source, u_strlen(source), UNORM_NFKD, 0, NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resLen=neededLen+1;
+ result=(UChar*)malloc(sizeof(UChar*) * resLen);
+ unorm_normalize(source, u_strlen(source), UNORM_NFKD, 0, result, resLen, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR in unorm_normalize at %s: %s\n", austrdup(source), myErrorName(status) );
+ } else {
+ assertEqual(result, compatTests[x][1], x);
+ }
+ free(result);
+ free(source);
+ }
+}
+
+void TestCanonDecompCompose()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t x, neededLen, resLen;
+ UChar *source=NULL, *result=NULL;
+ status = U_ZERO_ERROR;
+ resLen=0;
+ log_verbose("Testing unorm_normalize with Decomp can compose compat\n");
+ for(x=0; x < LENGTHOF(canonTests); x++)
+ {
+ source=CharsToUChars(canonTests[x][0]);
+ neededLen= unorm_normalize(source, u_strlen(source), UNORM_NFC, 0, NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resLen=neededLen+1;
+ result=(UChar*)malloc(sizeof(UChar*) * resLen);
+ unorm_normalize(source, u_strlen(source), UNORM_NFC, 0, result, resLen, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR in unorm_normalize at %s: %s\n", austrdup(source),myErrorName(status) );
+ } else {
+ assertEqual(result, canonTests[x][2], x);
+ }
+ free(result);
+ free(source);
+ }
+}
+
+void TestCompatDecompCompose()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t x, neededLen, resLen;
+ UChar *source=NULL, *result=NULL;
+ status = U_ZERO_ERROR;
+ resLen=0;
+ log_verbose("Testing unorm_normalize with compat decomp compose can\n");
+ for(x=0; x < LENGTHOF(compatTests); x++)
+ {
+ source=CharsToUChars(compatTests[x][0]);
+ neededLen= unorm_normalize(source, u_strlen(source), UNORM_NFKC, 0, NULL, 0, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resLen=neededLen+1;
+ result=(UChar*)malloc(sizeof(UChar*) * resLen);
+ unorm_normalize(source, u_strlen(source), UNORM_NFKC, 0, result, resLen, &status);
+ }
+ if(U_FAILURE(status)){
+ log_err("ERROR in unorm_normalize at %s: %s\n", austrdup(source), myErrorName(status) );
+ } else {
+ assertEqual(result, compatTests[x][2], x);
+ }
+ free(result);
+ free(source);
+ }
+}
+
+
+/*
+static void assertEqual(const UChar* result, const UChar* expected, int32_t index)
+{
+ if(u_strcmp(result, expected)!=0){
+ log_err("ERROR in decomposition at index = %d. EXPECTED: %s , GOT: %s\n", index, austrdup(expected),
+ austrdup(result) );
+ }
+}
+*/
+
+static void assertEqual(const UChar* result, const char* expected, int32_t index)
+{
+ UChar *expectedUni = CharsToUChars(expected);
+ if(u_strcmp(result, expectedUni)!=0){
+ log_err("ERROR in decomposition at index = %d. EXPECTED: %s , GOT: %s\n", index, expected,
+ austrdup(result) );
+ }
+ free(expectedUni);
+}
+
+static void TestNull_check(UChar *src, int32_t srcLen,
+ UChar *exp, int32_t expLen,
+ UNormalizationMode mode,
+ const char *name)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len, i;
+
+ UChar result[50];
+
+
+ status = U_ZERO_ERROR;
+
+ for(i=0;i<50;i++)
+ {
+ result[i] = 0xFFFD;
+ }
+
+ len = unorm_normalize(src, srcLen, mode, 0, result, 50, &status);
+
+ if(U_FAILURE(status)) {
+ log_err("unorm_normalize(%s) with 0x0000 failed: %s\n", name, u_errorName(status));
+ } else if (len != expLen) {
+ log_err("unorm_normalize(%s) with 0x0000 failed: Expected len %d, got %d\n", name, expLen, len);
+ }
+
+ {
+ for(i=0;i<len;i++){
+ if(exp[i] != result[i]) {
+ log_err("unorm_normalize(%s): @%d, expected \\u%04X got \\u%04X\n",
+ name,
+ i,
+ exp[i],
+ result[i]);
+ return;
+ }
+ log_verbose(" %d: \\u%04X\n", i, result[i]);
+ }
+ }
+
+ log_verbose("unorm_normalize(%s) with 0x0000: OK\n", name);
+}
+
+void TestNull()
+{
+
+ UChar source_comp[] = { 0x0061, 0x0000, 0x0044, 0x0307 };
+ int32_t source_comp_len = 4;
+ UChar expect_comp[] = { 0x0061, 0x0000, 0x1e0a };
+ int32_t expect_comp_len = 3;
+
+ UChar source_dcmp[] = { 0x1e0A, 0x0000, 0x0929 };
+ int32_t source_dcmp_len = 3;
+ UChar expect_dcmp[] = { 0x0044, 0x0307, 0x0000, 0x0928, 0x093C };
+ int32_t expect_dcmp_len = 5;
+
+ TestNull_check(source_comp,
+ source_comp_len,
+ expect_comp,
+ expect_comp_len,
+ UNORM_NFC,
+ "UNORM_NFC");
+
+ TestNull_check(source_dcmp,
+ source_dcmp_len,
+ expect_dcmp,
+ expect_dcmp_len,
+ UNORM_NFD,
+ "UNORM_NFD");
+
+ TestNull_check(source_comp,
+ source_comp_len,
+ expect_comp,
+ expect_comp_len,
+ UNORM_NFKC,
+ "UNORM_NFKC");
+
+
+}
+
+static void TestQuickCheckResultNO()
+{
+ const UChar CPNFD[] = {0x00C5, 0x0407, 0x1E00, 0x1F57, 0x220C,
+ 0x30AE, 0xAC00, 0xD7A3, 0xFB36, 0xFB4E};
+ const UChar CPNFC[] = {0x0340, 0x0F93, 0x1F77, 0x1FBB, 0x1FEB,
+ 0x2000, 0x232A, 0xF900, 0xFA1E, 0xFB4E};
+ const UChar CPNFKD[] = {0x00A0, 0x02E4, 0x1FDB, 0x24EA, 0x32FE,
+ 0xAC00, 0xFB4E, 0xFA10, 0xFF3F, 0xFA2D};
+ const UChar CPNFKC[] = {0x00A0, 0x017F, 0x2000, 0x24EA, 0x32FE,
+ 0x33FE, 0xFB4E, 0xFA10, 0xFF3F, 0xFA2D};
+
+
+ const int SIZE = 10;
+
+ int count = 0;
+ UErrorCode error = U_ZERO_ERROR;
+
+ for (; count < SIZE; count ++)
+ {
+ if (unorm_quickCheck(&(CPNFD[count]), 1, UNORM_NFD, &error) !=
+ UNORM_NO)
+ {
+ log_err("ERROR in NFD quick check at U+%04x\n", CPNFD[count]);
+ return;
+ }
+ if (unorm_quickCheck(&(CPNFC[count]), 1, UNORM_NFC, &error) !=
+ UNORM_NO)
+ {
+ log_err("ERROR in NFC quick check at U+%04x\n", CPNFC[count]);
+ return;
+ }
+ if (unorm_quickCheck(&(CPNFKD[count]), 1, UNORM_NFKD, &error) !=
+ UNORM_NO)
+ {
+ log_err("ERROR in NFKD quick check at U+%04x\n", CPNFKD[count]);
+ return;
+ }
+ if (unorm_quickCheck(&(CPNFKC[count]), 1, UNORM_NFKC, &error) !=
+ UNORM_NO)
+ {
+ log_err("ERROR in NFKC quick check at U+%04x\n", CPNFKC[count]);
+ return;
+ }
+ }
+}
+
+
+static void TestQuickCheckResultYES()
+{
+ const UChar CPNFD[] = {0x00C6, 0x017F, 0x0F74, 0x1000, 0x1E9A,
+ 0x2261, 0x3075, 0x4000, 0x5000, 0xF000};
+ const UChar CPNFC[] = {0x0400, 0x0540, 0x0901, 0x1000, 0x1500,
+ 0x1E9A, 0x3000, 0x4000, 0x5000, 0xF000};
+ const UChar CPNFKD[] = {0x00AB, 0x02A0, 0x1000, 0x1027, 0x2FFB,
+ 0x3FFF, 0x4FFF, 0xA000, 0xF000, 0xFA27};
+ const UChar CPNFKC[] = {0x00B0, 0x0100, 0x0200, 0x0A02, 0x1000,
+ 0x2010, 0x3030, 0x4000, 0xA000, 0xFA0E};
+
+ const int SIZE = 10;
+ int count = 0;
+ UErrorCode error = U_ZERO_ERROR;
+
+ UChar cp = 0;
+ while (cp < 0xA0)
+ {
+ if (unorm_quickCheck(&cp, 1, UNORM_NFD, &error) != UNORM_YES)
+ {
+ log_err("ERROR in NFD quick check at U+%04x\n", cp);
+ return;
+ }
+ if (unorm_quickCheck(&cp, 1, UNORM_NFC, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFC quick check at U+%04x\n", cp);
+ return;
+ }
+ if (unorm_quickCheck(&cp, 1, UNORM_NFKD, &error) != UNORM_YES)
+ {
+ log_err("ERROR in NFKD quick check at U+%04x\n", cp);
+ return;
+ }
+ if (unorm_quickCheck(&cp, 1, UNORM_NFKC, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFKC quick check at U+%04x\n", cp);
+ return;
+ }
+ cp ++;
+ }
+
+ for (; count < SIZE; count ++)
+ {
+ if (unorm_quickCheck(&(CPNFD[count]), 1, UNORM_NFD, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFD quick check at U+%04x\n", CPNFD[count]);
+ return;
+ }
+ if (unorm_quickCheck(&(CPNFC[count]), 1, UNORM_NFC, &error)
+ != UNORM_YES)
+ {
+ log_err("ERROR in NFC quick check at U+%04x\n", CPNFC[count]);
+ return;
+ }
+ if (unorm_quickCheck(&(CPNFKD[count]), 1, UNORM_NFKD, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFKD quick check at U+%04x\n", CPNFKD[count]);
+ return;
+ }
+ if (unorm_quickCheck(&(CPNFKC[count]), 1, UNORM_NFKC, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFKC quick check at U+%04x\n", CPNFKC[count]);
+ return;
+ }
+ }
+}
+
+static void TestQuickCheckResultMAYBE()
+{
+ const UChar CPNFC[] = {0x0306, 0x0654, 0x0BBE, 0x102E, 0x1161,
+ 0x116A, 0x1173, 0x1175, 0x3099, 0x309A};
+ const UChar CPNFKC[] = {0x0300, 0x0654, 0x0655, 0x09D7, 0x0B3E,
+ 0x0DCF, 0xDDF, 0x102E, 0x11A8, 0x3099};
+
+
+ const int SIZE = 10;
+
+ int count = 0;
+ UErrorCode error = U_ZERO_ERROR;
+
+ /* NFD and NFKD does not have any MAYBE codepoints */
+ for (; count < SIZE; count ++)
+ {
+ if (unorm_quickCheck(&(CPNFC[count]), 1, UNORM_NFC, &error) !=
+ UNORM_MAYBE)
+ {
+ log_err("ERROR in NFC quick check at U+%04x\n", CPNFC[count]);
+ return;
+ }
+ if (unorm_quickCheck(&(CPNFKC[count]), 1, UNORM_NFKC, &error) !=
+ UNORM_MAYBE)
+ {
+ log_err("ERROR in NFKC quick check at U+%04x\n", CPNFKC[count]);
+ return;
+ }
+ }
+}
+
+static void TestQuickCheckStringResult()
+{
+ int count;
+ UChar *d = NULL;
+ UChar *c = NULL;
+ UErrorCode error = U_ZERO_ERROR;
+
+ for (count = 0; count < LENGTHOF(canonTests); count ++)
+ {
+ d = CharsToUChars(canonTests[count][1]);
+ c = CharsToUChars(canonTests[count][2]);
+ if (unorm_quickCheck(d, u_strlen(d), UNORM_NFD, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFD quick check for string at count %d\n", count);
+ return;
+ }
+
+ if (unorm_quickCheck(c, u_strlen(c), UNORM_NFC, &error) ==
+ UNORM_NO)
+ {
+ log_err("ERROR in NFC quick check for string at count %d\n", count);
+ return;
+ }
+
+ free(d);
+ free(c);
+ }
+
+ for (count = 0; count < LENGTHOF(compatTests); count ++)
+ {
+ d = CharsToUChars(compatTests[count][1]);
+ c = CharsToUChars(compatTests[count][2]);
+ if (unorm_quickCheck(d, u_strlen(d), UNORM_NFKD, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFKD quick check for string at count %d\n", count);
+ return;
+ }
+
+ if (unorm_quickCheck(c, u_strlen(c), UNORM_NFKC, &error) !=
+ UNORM_YES)
+ {
+ log_err("ERROR in NFKC quick check for string at count %d\n", count);
+ return;
+ }
+
+ free(d);
+ free(c);
+ }
+}
+
+void TestQuickCheck()
+{
+ TestQuickCheckResultNO();
+ TestQuickCheckResultYES();
+ TestQuickCheckResultMAYBE();
+ TestQuickCheckStringResult();
+}
+
+/*
+ * The intltest/NormalizerConformanceTest tests a lot of strings that _are_
+ * normalized, and some that are not.
+ * Here we pick some specific cases and test the C API.
+ */
+static void TestIsNormalized(void) {
+ static const UChar notNFC[][8]={ /* strings that are not in NFC */
+ { 0x62, 0x61, 0x300, 0x63, 0 }, /* 0061 0300 compose */
+ { 0xfb1d, 0 }, /* excluded from composition */
+ { 0x0627, 0x0653, 0 }, /* 0627 0653 compose */
+ { 0x3071, 0x306f, 0x309a, 0x3073, 0 } /* 306F 309A compose */
+ };
+ static const UChar notNFKC[][8]={ /* strings that are not in NFKC */
+ { 0x1100, 0x1161, 0 }, /* Jamo compose */
+ { 0x1100, 0x314f, 0 }, /* compatibility Jamo compose */
+ { 0x03b1, 0x1f00, 0x0345, 0x03b3, 0 } /* 1F00 0345 compose */
+ };
+
+ int32_t i;
+ UErrorCode errorCode;
+
+ /* API test */
+
+ /* normal case with length>=0 (length -1 used for special cases below) */
+ errorCode=U_ZERO_ERROR;
+ if(!unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error: !isNormalized(<U+0300>, NFC) (%s)\n", u_errorName(errorCode));
+ }
+
+ /* incoming U_FAILURE */
+ errorCode=U_TRUNCATED_CHAR_FOUND;
+ (void)unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode);
+ if(errorCode!=U_TRUNCATED_CHAR_FOUND) {
+ log_err("error: isNormalized(U_TRUNCATED_CHAR_FOUND) changed the error code to %s\n", u_errorName(errorCode));
+ }
+
+ /* NULL source */
+ errorCode=U_ZERO_ERROR;
+ (void)unorm_isNormalized(NULL, 1, UNORM_NFC, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error: isNormalized(NULL) did not set U_ILLEGAL_ARGUMENT_ERROR but %s\n", u_errorName(errorCode));
+ }
+
+ /* bad length */
+ errorCode=U_ZERO_ERROR;
+ (void)unorm_isNormalized(notNFC[0]+2, -2, UNORM_NFC, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error: isNormalized([-2]) did not set U_ILLEGAL_ARGUMENT_ERROR but %s\n", u_errorName(errorCode));
+ }
+
+ /* specific cases */
+ for(i=0; i<LENGTHOF(notNFC); ++i) {
+ errorCode=U_ZERO_ERROR;
+ if(unorm_isNormalized(notNFC[i], -1, UNORM_NFC, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error: isNormalized(notNFC[%d], NFC) is wrong (%s)\n", i, u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ if(unorm_isNormalized(notNFC[i], -1, UNORM_NFKC, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error: isNormalized(notNFC[%d], NFKC) is wrong (%s)\n", i, u_errorName(errorCode));
+ }
+ }
+ for(i=0; i<LENGTHOF(notNFKC); ++i) {
+ errorCode=U_ZERO_ERROR;
+ if(unorm_isNormalized(notNFKC[i], -1, UNORM_NFKC, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error: isNormalized(notNFKC[%d], NFKC) is wrong (%s)\n", i, u_errorName(errorCode));
+ }
+ }
+}
+
+void TestCheckFCD()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ static const UChar FAST_[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+ 0x0A};
+ static const UChar FALSE_[] = {0x0001, 0x0002, 0x02EA, 0x03EB, 0x0300, 0x0301,
+ 0x02B9, 0x0314, 0x0315, 0x0316};
+ static const UChar TRUE_[] = {0x0030, 0x0040, 0x0440, 0x056D, 0x064F, 0x06E7,
+ 0x0050, 0x0730, 0x09EE, 0x1E10};
+
+ static const UChar datastr[][5] =
+ { {0x0061, 0x030A, 0x1E05, 0x0302, 0},
+ {0x0061, 0x030A, 0x00E2, 0x0323, 0},
+ {0x0061, 0x0323, 0x00E2, 0x0323, 0},
+ {0x0061, 0x0323, 0x1E05, 0x0302, 0} };
+ static const UBool result[] = {UNORM_YES, UNORM_NO, UNORM_NO, UNORM_YES};
+
+ static const UChar datachar[] = {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+ 0x6a,
+ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
+ 0xea,
+ 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306,
+ 0x0307, 0x0308, 0x0309, 0x030a,
+ 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326,
+ 0x0327, 0x0328, 0x0329, 0x032a,
+ 0x1e00, 0x1e01, 0x1e02, 0x1e03, 0x1e04, 0x1e05, 0x1e06,
+ 0x1e07, 0x1e08, 0x1e09, 0x1e0a};
+
+ int count = 0;
+
+ if (unorm_quickCheck(FAST_, 10, UNORM_FCD, &status) != UNORM_YES)
+ log_err("unorm_quickCheck(FCD) failed: expected value for fast unorm_quickCheck is UNORM_YES\n");
+ if (unorm_quickCheck(FALSE_, 10, UNORM_FCD, &status) != UNORM_NO)
+ log_err("unorm_quickCheck(FCD) failed: expected value for error unorm_quickCheck is UNORM_NO\n");
+ if (unorm_quickCheck(TRUE_, 10, UNORM_FCD, &status) != UNORM_YES)
+ log_err("unorm_quickCheck(FCD) failed: expected value for correct unorm_quickCheck is UNORM_YES\n");
+
+ if (U_FAILURE(status))
+ log_err("unorm_quickCheck(FCD) failed: %s\n", u_errorName(status));
+
+ while (count < 4)
+ {
+ UBool fcdresult = unorm_quickCheck(datastr[count], 4, UNORM_FCD, &status);
+ if (U_FAILURE(status)) {
+ log_err("unorm_quickCheck(FCD) failed: exception occured at data set %d\n", count);
+ break;
+ }
+ else {
+ if (result[count] != fcdresult) {
+ log_err("unorm_quickCheck(FCD) failed: Data set %d expected value %d\n", count,
+ result[count]);
+ }
+ }
+ count ++;
+ }
+
+ /* random checks of long strings */
+ status = U_ZERO_ERROR;
+ srand((unsigned)time( NULL ));
+
+ for (count = 0; count < 50; count ++)
+ {
+ int size = 0;
+ UBool testresult = UNORM_YES;
+ UChar data[20];
+ UChar norm[100];
+ UChar nfd[100];
+ int normsize = 0;
+ int nfdsize = 0;
+
+ while (size != 19) {
+ data[size] = datachar[(rand() * 50) / RAND_MAX];
+ log_verbose("0x%x", data[size]);
+ normsize += unorm_normalize(data + size, 1, UNORM_NFD, 0,
+ norm + normsize, 100 - normsize, &status);
+ if (U_FAILURE(status)) {
+ log_err("unorm_quickCheck(FCD) failed: exception occured at data generation\n");
+ break;
+ }
+ size ++;
+ }
+ log_verbose("\n");
+
+ nfdsize = unorm_normalize(data, size, UNORM_NFD, 0,
+ nfd, 100, &status);
+ if (U_FAILURE(status)) {
+ log_err("unorm_quickCheck(FCD) failed: exception occured at normalized data generation\n");
+ }
+
+ if (nfdsize != normsize || u_memcmp(nfd, norm, nfdsize) != 0) {
+ testresult = UNORM_NO;
+ }
+ if (testresult == UNORM_YES) {
+ log_verbose("result UNORM_YES\n");
+ }
+ else {
+ log_verbose("result UNORM_NO\n");
+ }
+
+ if (unorm_quickCheck(data, size, UNORM_FCD, &status) != testresult || U_FAILURE(status)) {
+ log_err("unorm_quickCheck(FCD) failed: expected %d for random data\n", testresult);
+ }
+ }
+}
+
+static void
+TestAPI() {
+ static const UChar in[]={ 0x68, 0xe4 };
+ UChar out[20]={ 0xffff, 0xffff, 0xffff, 0xffff };
+ UErrorCode errorCode;
+ int32_t length;
+
+ /* try preflighting */
+ errorCode=U_ZERO_ERROR;
+ length=unorm_normalize(in, 2, UNORM_NFD, 0, NULL, 0, &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=3) {
+ log_err("unorm_normalize(pure preflighting NFD)=%ld failed with %s\n", length, u_errorName(errorCode));
+ return;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=unorm_normalize(in, 2, UNORM_NFD, 0, out, 3, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unorm_normalize(NFD)=%ld failed with %s\n", length, u_errorName(errorCode));
+ return;
+ }
+ if(length!=3 || out[2]!=0x308 || out[3]!=0xffff) {
+ log_err("unorm_normalize(NFD ma<umlaut>)=%ld failed with out[]=U+%04x U+%04x U+%04x U+%04x\n", length, out[0], out[1], out[2], out[3]);
+ return;
+ }
+}
+
+/* test cases to improve test code coverage */
+enum {
+ HANGUL_K_KIYEOK=0x3131, /* NFKD->Jamo L U+1100 */
+ HANGUL_K_WEO=0x315d, /* NFKD->Jamo V U+116f */
+ HANGUL_K_KIYEOK_SIOS=0x3133, /* NFKD->Jamo T U+11aa */
+
+ HANGUL_KIYEOK=0x1100, /* Jamo L U+1100 */
+ HANGUL_WEO=0x116f, /* Jamo V U+116f */
+ HANGUL_KIYEOK_SIOS=0x11aa, /* Jamo T U+11aa */
+
+ HANGUL_AC00=0xac00, /* Hangul syllable = Jamo LV U+ac00 */
+ HANGUL_SYLLABLE=0xac00+14*28+3, /* Hangul syllable = U+1100 * U+116f * U+11aa */
+
+ MUSICAL_VOID_NOTEHEAD=0x1d157,
+ MUSICAL_HALF_NOTE=0x1d15e, /* NFC/NFD->Notehead+Stem */
+ MUSICAL_STEM=0x1d165, /* cc=216 */
+ MUSICAL_STACCATO=0x1d17c /* cc=220 */
+};
+
+static void
+TestNormCoverage() {
+ UChar input[1000], expect[1000], output[1000];
+ UErrorCode errorCode;
+ int32_t i, length, inLength, expectLength, hangulPrefixLength, preflightLength;
+
+ /* create a long and nasty string with NFKC-unsafe characters */
+ inLength=0;
+
+ /* 3 Jamos L/V/T, all 8 combinations normal/compatibility */
+ input[inLength++]=HANGUL_KIYEOK;
+ input[inLength++]=HANGUL_WEO;
+ input[inLength++]=HANGUL_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_KIYEOK;
+ input[inLength++]=HANGUL_WEO;
+ input[inLength++]=HANGUL_K_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_KIYEOK;
+ input[inLength++]=HANGUL_K_WEO;
+ input[inLength++]=HANGUL_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_KIYEOK;
+ input[inLength++]=HANGUL_K_WEO;
+ input[inLength++]=HANGUL_K_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_K_KIYEOK;
+ input[inLength++]=HANGUL_WEO;
+ input[inLength++]=HANGUL_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_K_KIYEOK;
+ input[inLength++]=HANGUL_WEO;
+ input[inLength++]=HANGUL_K_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_K_KIYEOK;
+ input[inLength++]=HANGUL_K_WEO;
+ input[inLength++]=HANGUL_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_K_KIYEOK;
+ input[inLength++]=HANGUL_K_WEO;
+ input[inLength++]=HANGUL_K_KIYEOK_SIOS;
+
+ /* Hangul LV with normal/compatibility Jamo T */
+ input[inLength++]=HANGUL_AC00;
+ input[inLength++]=HANGUL_KIYEOK_SIOS;
+
+ input[inLength++]=HANGUL_AC00;
+ input[inLength++]=HANGUL_K_KIYEOK_SIOS;
+
+ /* compatibility Jamo L, V */
+ input[inLength++]=HANGUL_K_KIYEOK;
+ input[inLength++]=HANGUL_K_WEO;
+
+ hangulPrefixLength=inLength;
+
+ input[inLength++]=UTF16_LEAD(MUSICAL_HALF_NOTE);
+ input[inLength++]=UTF16_TRAIL(MUSICAL_HALF_NOTE);
+ for(i=0; i<200; ++i) {
+ input[inLength++]=UTF16_LEAD(MUSICAL_STACCATO);
+ input[inLength++]=UTF16_TRAIL(MUSICAL_STACCATO);
+ input[inLength++]=UTF16_LEAD(MUSICAL_STEM);
+ input[inLength++]=UTF16_TRAIL(MUSICAL_STEM);
+ }
+
+ /* (compatibility) Jamo L, T do not compose */
+ input[inLength++]=HANGUL_K_KIYEOK;
+ input[inLength++]=HANGUL_K_KIYEOK_SIOS;
+
+ /* quick checks */
+ errorCode=U_ZERO_ERROR;
+ if(UNORM_NO!=unorm_quickCheck(input, inLength, UNORM_NFD, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error unorm_quickCheck(long input, UNORM_NFD)!=NO (%s)\n", u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ if(UNORM_NO!=unorm_quickCheck(input, inLength, UNORM_NFKD, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error unorm_quickCheck(long input, UNORM_NFKD)!=NO (%s)\n", u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ if(UNORM_NO!=unorm_quickCheck(input, inLength, UNORM_NFC, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error unorm_quickCheck(long input, UNORM_NFC)!=NO (%s)\n", u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ if(UNORM_NO!=unorm_quickCheck(input, inLength, UNORM_NFKC, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error unorm_quickCheck(long input, UNORM_NFKC)!=NO (%s)\n", u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ if(UNORM_NO!=unorm_quickCheck(input, inLength, UNORM_FCD, &errorCode) || U_FAILURE(errorCode)) {
+ log_err("error unorm_quickCheck(long input, UNORM_FCD)!=NO (%s)\n", u_errorName(errorCode));
+ }
+
+ /* NFKC */
+ expectLength=0;
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_SYLLABLE;
+
+ expect[expectLength++]=HANGUL_AC00+3;
+
+ expect[expectLength++]=HANGUL_AC00+3;
+
+ expect[expectLength++]=HANGUL_AC00+14*28;
+
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_VOID_NOTEHEAD);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_VOID_NOTEHEAD);
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_STEM);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_STEM);
+ for(i=0; i<200; ++i) {
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_STEM);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_STEM);
+ }
+ for(i=0; i<200; ++i) {
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_STACCATO);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_STACCATO);
+ }
+
+ expect[expectLength++]=HANGUL_KIYEOK;
+ expect[expectLength++]=HANGUL_KIYEOK_SIOS;
+
+ /* try destination overflow first */
+ errorCode=U_ZERO_ERROR;
+ preflightLength=unorm_normalize(input, inLength,
+ UNORM_NFKC, 0,
+ output, 100, /* too short */
+ &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR) {
+ log_err("error unorm_normalize(long input, output too short, UNORM_NFKC) did not overflow but %s\n", u_errorName(errorCode));
+ }
+
+ /* real NFKC */
+ errorCode=U_ZERO_ERROR;
+ length=unorm_normalize(input, inLength,
+ UNORM_NFKC, 0,
+ output, sizeof(output)/U_SIZEOF_UCHAR,
+ &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error unorm_normalize(long input, UNORM_NFKC) failed with %s\n", u_errorName(errorCode));
+ } else if(length!=expectLength || u_memcmp(output, expect, length)!=0) {
+ log_err("error unorm_normalize(long input, UNORM_NFKC) produced wrong result\n");
+ for(i=0; i<length; ++i) {
+ if(output[i]!=expect[i]) {
+ log_err(" NFKC[%d]==U+%04lx expected U+%04lx\n", i, output[i], expect[i]);
+ break;
+ }
+ }
+ }
+ if(length!=preflightLength) {
+ log_err("error unorm_normalize(long input, UNORM_NFKC)==%ld but preflightLength==%ld\n", length, preflightLength);
+ }
+
+ /* FCD */
+ u_memcpy(expect, input, hangulPrefixLength);
+ expectLength=hangulPrefixLength;
+
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_VOID_NOTEHEAD);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_VOID_NOTEHEAD);
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_STEM);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_STEM);
+ for(i=0; i<200; ++i) {
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_STEM);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_STEM);
+ }
+ for(i=0; i<200; ++i) {
+ expect[expectLength++]=UTF16_LEAD(MUSICAL_STACCATO);
+ expect[expectLength++]=UTF16_TRAIL(MUSICAL_STACCATO);
+ }
+
+ expect[expectLength++]=HANGUL_K_KIYEOK;
+ expect[expectLength++]=HANGUL_K_KIYEOK_SIOS;
+
+ errorCode=U_ZERO_ERROR;
+ length=unorm_normalize(input, inLength,
+ UNORM_FCD, 0,
+ output, sizeof(output)/U_SIZEOF_UCHAR,
+ &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error unorm_normalize(long input, UNORM_FCD) failed with %s\n", u_errorName(errorCode));
+ } else if(length!=expectLength || u_memcmp(output, expect, length)!=0) {
+ log_err("error unorm_normalize(long input, UNORM_FCD) produced wrong result\n");
+ for(i=0; i<length; ++i) {
+ if(output[i]!=expect[i]) {
+ log_err(" FCD[%d]==U+%04lx expected U+%04lx\n", i, output[i], expect[i]);
+ break;
+ }
+ }
+ }
+}
+
+/* API test for unorm_concatenate() - for real test strings see intltest/tstnorm.cpp */
+static void
+TestConcatenate(void) {
+ /* "re + 'sume'" */
+ static const UChar
+ left[]={
+ 0x72, 0x65, 0
+ },
+ right[]={
+ 0x301, 0x73, 0x75, 0x6d, 0xe9, 0
+ },
+ expect[]={
+ 0x72, 0xe9, 0x73, 0x75, 0x6d, 0xe9, 0
+ };
+
+ UChar buffer[100];
+ UErrorCode errorCode;
+ int32_t length;
+
+ /* left with length, right NUL-terminated */
+ errorCode=U_ZERO_ERROR;
+ length=unorm_concatenate(left, 2, right, -1, buffer, 100, UNORM_NFC, 0, &errorCode);
+ if(U_FAILURE(errorCode) || length!=6 || 0!=u_memcmp(buffer, expect, length)) {
+ log_err("error: unorm_concatenate()=%ld (expect 6) failed with %s\n", length, u_errorName(errorCode));
+ }
+
+ /* preflighting */
+ errorCode=U_ZERO_ERROR;
+ length=unorm_concatenate(left, 2, right, -1, NULL, 0, UNORM_NFC, 0, &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=6) {
+ log_err("error: unorm_concatenate(preflighting)=%ld (expect 6) failed with %s\n", length, u_errorName(errorCode));
+ }
+
+ buffer[2]=0x5555;
+ errorCode=U_ZERO_ERROR;
+ length=unorm_concatenate(left, 2, right, -1, buffer, 1, UNORM_NFC, 0, &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=6 || buffer[2]!=0x5555) {
+ log_err("error: unorm_concatenate(preflighting 2)=%ld (expect 6) failed with %s\n", length, u_errorName(errorCode));
+ }
+
+ /* enter with U_FAILURE */
+ buffer[2]=0xaaaa;
+ errorCode=U_UNEXPECTED_TOKEN;
+ length=unorm_concatenate(left, 2, right, -1, buffer, 100, UNORM_NFC, 0, &errorCode);
+ if(errorCode!=U_UNEXPECTED_TOKEN || buffer[2]!=0xaaaa) {
+ log_err("error: unorm_concatenate(failure)=%ld failed with %s\n", length, u_errorName(errorCode));
+ }
+
+ /* illegal arguments */
+ buffer[2]=0xaaaa;
+ errorCode=U_ZERO_ERROR;
+ length=unorm_concatenate(NULL, 2, right, -1, buffer, 100, UNORM_NFC, 0, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || buffer[2]!=0xaaaa) {
+ log_err("error: unorm_concatenate(left=NULL)=%ld failed with %s\n", length, u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=unorm_concatenate(left, 2, right, -1, NULL, 100, UNORM_NFC, 0, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error: unorm_concatenate(buffer=NULL)=%ld failed with %s\n", length, u_errorName(errorCode));
+ }
+}
+
+enum {
+ _PLUS=0x2b
+};
+
+static const char *const _modeString[UNORM_MODE_COUNT]={
+ "0", "NONE", "NFD", "NFKD", "NFC", "NFKC", "FCD"
+};
+
+static void
+_testIter(const UChar *src, int32_t srcLength,
+ UCharIterator *iter, UNormalizationMode mode, UBool forward,
+ const UChar *out, int32_t outLength,
+ const int32_t *srcIndexes, int32_t srcIndexesLength) {
+ UChar buffer[4];
+ const UChar *expect, *outLimit, *in;
+ int32_t length, i, expectLength, expectIndex, prevIndex, index, inLength;
+ UErrorCode errorCode;
+ UBool neededToNormalize, expectNeeded;
+
+ errorCode=U_ZERO_ERROR;
+ outLimit=out+outLength;
+ if(forward) {
+ expect=out;
+ i=index=0;
+ } else {
+ expect=outLimit;
+ i=srcIndexesLength-2;
+ index=srcLength;
+ }
+
+ for(;;) {
+ prevIndex=index;
+ if(forward) {
+ if(!iter->hasNext(iter)) {
+ return;
+ }
+ length=unorm_next(iter,
+ buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ mode, 0,
+ (UBool)(out!=NULL), &neededToNormalize,
+ &errorCode);
+ expectIndex=srcIndexes[i+1];
+ in=src+prevIndex;
+ inLength=expectIndex-prevIndex;
+
+ if(out!=NULL) {
+ /* get output piece from between plus signs */
+ expectLength=0;
+ while((expect+expectLength)!=outLimit && expect[expectLength]!=_PLUS) {
+ ++expectLength;
+ }
+ expectNeeded=(UBool)(0!=u_memcmp(buffer, in, inLength));
+ } else {
+ expect=in;
+ expectLength=inLength;
+ expectNeeded=FALSE;
+ }
+ } else {
+ if(!iter->hasPrevious(iter)) {
+ return;
+ }
+ length=unorm_previous(iter,
+ buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ mode, 0,
+ (UBool)(out!=NULL), &neededToNormalize,
+ &errorCode);
+ expectIndex=srcIndexes[i];
+ in=src+expectIndex;
+ inLength=prevIndex-expectIndex;
+
+ if(out!=NULL) {
+ /* get output piece from between plus signs */
+ expectLength=0;
+ while(expect!=out && expect[-1]!=_PLUS) {
+ ++expectLength;
+ --expect;
+ }
+ expectNeeded=(UBool)(0!=u_memcmp(buffer, in, inLength));
+ } else {
+ expect=in;
+ expectLength=inLength;
+ expectNeeded=FALSE;
+ }
+ }
+ index=iter->getIndex(iter, UITER_CURRENT);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("error unorm iteration (next/previous %d %s)[%d]: %s\n",
+ forward, _modeString[mode], i, u_errorName(errorCode));
+ return;
+ }
+ if(expectIndex!=index) {
+ log_err("error unorm iteration (next/previous %d %s): index[%d] wrong, got %d expected %d\n",
+ forward, _modeString[mode], i, index, expectIndex);
+ return;
+ }
+ if(expectLength!=length) {
+ log_err("error unorm iteration (next/previous %d %s): length[%d] wrong, got %d expected %d\n",
+ forward, _modeString[mode], i, length, expectLength);
+ return;
+ }
+ if(0!=u_memcmp(expect, buffer, length)) {
+ log_err("error unorm iteration (next/previous %d %s): output string[%d] wrong\n",
+ forward, _modeString[mode], i);
+ return;
+ }
+ if(neededToNormalize!=expectNeeded) {
+ }
+
+ if(forward) {
+ expect+=expectLength+1; /* go after the + */
+ ++i;
+ } else {
+ --expect; /* go before the + */
+ --i;
+ }
+ }
+}
+
+static void
+TestNextPrevious() {
+ static const UChar
+ src[]={ /* input string */
+ 0xa0, 0xe4, 0x63, 0x302, 0x327, 0xac00, 0x3133
+ },
+ nfd[]={ /* + separates expected output pieces */
+ 0xa0, _PLUS, 0x61, 0x308, _PLUS, 0x63, 0x327, 0x302, _PLUS, 0x1100, 0x1161, _PLUS, 0x3133
+ },
+ nfkd[]={
+ 0x20, _PLUS, 0x61, 0x308, _PLUS, 0x63, 0x327, 0x302, _PLUS, 0x1100, 0x1161, _PLUS, 0x11aa
+ },
+ nfc[]={
+ 0xa0, _PLUS, 0xe4, _PLUS, 0xe7, 0x302, _PLUS, 0xac00, _PLUS, 0x3133
+ },
+ nfkc[]={
+ 0x20, _PLUS, 0xe4, _PLUS, 0xe7, 0x302, _PLUS, 0xac03
+ },
+ fcd[]={
+ 0xa0, _PLUS, 0xe4, _PLUS, 0x63, 0x327, 0x302, _PLUS, 0xac00, _PLUS, 0x3133
+ };
+
+ /* expected iterator indexes in the source string for each iteration piece */
+ static const int32_t
+ nfdIndexes[]={
+ 0, 1, 2, 5, 6, 7
+ },
+ nfkdIndexes[]={
+ 0, 1, 2, 5, 6, 7
+ },
+ nfcIndexes[]={
+ 0, 1, 2, 5, 6, 7
+ },
+ nfkcIndexes[]={
+ 0, 1, 2, 5, 7
+ },
+ fcdIndexes[]={
+ 0, 1, 2, 5, 6, 7
+ };
+
+ UCharIterator iter;
+
+ UChar buffer[4];
+ int32_t length;
+
+ UBool neededToNormalize;
+ UErrorCode errorCode;
+
+ uiter_setString(&iter, src, sizeof(src)/U_SIZEOF_UCHAR);
+
+ /* test iteration with doNormalize */
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFD, TRUE, nfd, sizeof(nfd)/U_SIZEOF_UCHAR, nfdIndexes, sizeof(nfdIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKD, TRUE, nfkd, sizeof(nfkd)/U_SIZEOF_UCHAR, nfkdIndexes, sizeof(nfkdIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFC, TRUE, nfc, sizeof(nfc)/U_SIZEOF_UCHAR, nfcIndexes, sizeof(nfcIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKC, TRUE, nfkc, sizeof(nfkc)/U_SIZEOF_UCHAR, nfkcIndexes, sizeof(nfkcIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_FCD, TRUE, fcd, sizeof(fcd)/U_SIZEOF_UCHAR, fcdIndexes, sizeof(fcdIndexes)/4);
+
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFD, FALSE, nfd, sizeof(nfd)/U_SIZEOF_UCHAR, nfdIndexes, sizeof(nfdIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKD, FALSE, nfkd, sizeof(nfkd)/U_SIZEOF_UCHAR, nfkdIndexes, sizeof(nfkdIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFC, FALSE, nfc, sizeof(nfc)/U_SIZEOF_UCHAR, nfcIndexes, sizeof(nfcIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKC, FALSE, nfkc, sizeof(nfkc)/U_SIZEOF_UCHAR, nfkcIndexes, sizeof(nfkcIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_FCD, FALSE, fcd, sizeof(fcd)/U_SIZEOF_UCHAR, fcdIndexes, sizeof(fcdIndexes)/4);
+
+ /* test iteration without doNormalize */
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFD, TRUE, NULL, 0, nfdIndexes, sizeof(nfdIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKD, TRUE, NULL, 0, nfkdIndexes, sizeof(nfkdIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFC, TRUE, NULL, 0, nfcIndexes, sizeof(nfcIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKC, TRUE, NULL, 0, nfkcIndexes, sizeof(nfkcIndexes)/4);
+ iter.index=0;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_FCD, TRUE, NULL, 0, fcdIndexes, sizeof(fcdIndexes)/4);
+
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFD, FALSE, NULL, 0, nfdIndexes, sizeof(nfdIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKD, FALSE, NULL, 0, nfkdIndexes, sizeof(nfkdIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFC, FALSE, NULL, 0, nfcIndexes, sizeof(nfcIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_NFKC, FALSE, NULL, 0, nfkcIndexes, sizeof(nfkcIndexes)/4);
+ iter.index=iter.length;
+ _testIter(src, sizeof(src)/U_SIZEOF_UCHAR, &iter, UNORM_FCD, FALSE, NULL, 0, fcdIndexes, sizeof(fcdIndexes)/4);
+
+ /* try without neededToNormalize */
+ errorCode=U_ZERO_ERROR;
+ buffer[0]=5;
+ iter.index=1;
+ length=unorm_next(&iter, buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ UNORM_NFD, 0, TRUE, NULL,
+ &errorCode);
+ if(U_FAILURE(errorCode) || length!=2 || buffer[0]!=nfd[2] || buffer[1]!=nfd[3]) {
+ log_err("error unorm_next(without needed) %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* preflight */
+ neededToNormalize=9;
+ iter.index=1;
+ length=unorm_next(&iter, NULL, 0,
+ UNORM_NFD, 0, TRUE, &neededToNormalize,
+ &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || neededToNormalize!=FALSE || length!=2) {
+ log_err("error unorm_next(pure preflighting) %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ buffer[0]=buffer[1]=5;
+ neededToNormalize=9;
+ iter.index=1;
+ length=unorm_next(&iter, buffer, 1,
+ UNORM_NFD, 0, TRUE, &neededToNormalize,
+ &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || neededToNormalize!=FALSE || length!=2 || buffer[1]!=5) {
+ log_err("error unorm_next(preflighting) %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* no iterator */
+ errorCode=U_ZERO_ERROR;
+ buffer[0]=buffer[1]=5;
+ neededToNormalize=9;
+ iter.index=1;
+ length=unorm_next(NULL, buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ UNORM_NFD, 0, TRUE, &neededToNormalize,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error unorm_next(no iterator) %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* illegal mode */
+ buffer[0]=buffer[1]=5;
+ neededToNormalize=9;
+ iter.index=1;
+ length=unorm_next(&iter, buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ (UNormalizationMode)0, 0, TRUE, &neededToNormalize,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error unorm_next(illegal mode) %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* error coming in */
+ errorCode=U_MISPLACED_QUANTIFIER;
+ buffer[0]=5;
+ iter.index=1;
+ length=unorm_next(&iter, buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ UNORM_NFD, 0, TRUE, NULL,
+ &errorCode);
+ if(errorCode!=U_MISPLACED_QUANTIFIER) {
+ log_err("error unorm_next(U_MISPLACED_QUANTIFIER) %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* missing pErrorCode */
+ buffer[0]=5;
+ iter.index=1;
+ length=unorm_next(&iter, buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ UNORM_NFD, 0, TRUE, NULL,
+ NULL);
+ if(iter.index!=1 || buffer[0]!=5) {
+ log_err("error unorm_next(pErrorCode==NULL) %s\n", u_errorName(errorCode));
+ return;
+ }
+}
+
+static void
+TestFCNFKCClosure(void) {
+ static const struct {
+ UChar32 c;
+ const UChar s[6];
+ } tests[]={
+ { 0x037A, { 0x0020, 0x03B9, 0 } },
+ { 0x03D2, { 0x03C5, 0 } },
+ { 0x20A8, { 0x0072, 0x0073, 0 } },
+ { 0x210B, { 0x0068, 0 } },
+ { 0x210C, { 0x0068, 0 } },
+ { 0x2121, { 0x0074, 0x0065, 0x006C, 0 } },
+ { 0x2122, { 0x0074, 0x006D, 0 } },
+ { 0x2128, { 0x007A, 0 } },
+ { 0x1D5DB, { 0x0068, 0 } },
+ { 0x1D5ED, { 0x007A, 0 } },
+ { 0x0061, { 0 } }
+ };
+
+ UChar buffer[8];
+ UErrorCode errorCode;
+ int32_t i, length;
+
+ for(i=0; i<LENGTHOF(tests); ++i) {
+ errorCode=U_ZERO_ERROR;
+ length=u_getFC_NFKC_Closure(tests[i].c, buffer, LENGTHOF(buffer), &errorCode);
+ if(U_FAILURE(errorCode) || length!=u_strlen(buffer) || 0!=u_strcmp(tests[i].s, buffer)) {
+ log_err("u_getFC_NFKC_Closure(U+%04lx) is wrong (%s)\n", tests[i].c, u_errorName(errorCode));
+ }
+ }
+
+ /* error handling */
+ errorCode=U_ZERO_ERROR;
+ length=u_getFC_NFKC_Closure(0x5c, NULL, LENGTHOF(buffer), &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("u_getFC_NFKC_Closure(dest=NULL) is wrong (%s)\n", u_errorName(errorCode));
+ }
+
+ length=u_getFC_NFKC_Closure(0x5c, buffer, LENGTHOF(buffer), &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("u_getFC_NFKC_Closure(U_FAILURE) is wrong (%s)\n", u_errorName(errorCode));
+ }
+}
+
+static void
+TestQuickCheckPerCP() {
+ UErrorCode errorCode;
+ UChar32 c, lead, trail;
+ UChar s[U16_MAX_LENGTH], nfd[16];
+ int32_t length, lccc1, lccc2, tccc1, tccc2;
+ int32_t qc1, qc2;
+
+ if(
+ u_getIntPropertyMaxValue(UCHAR_NFD_QUICK_CHECK)!=(int32_t)UNORM_YES ||
+ u_getIntPropertyMaxValue(UCHAR_NFKD_QUICK_CHECK)!=(int32_t)UNORM_YES ||
+ u_getIntPropertyMaxValue(UCHAR_NFC_QUICK_CHECK)!=(int32_t)UNORM_MAYBE ||
+ u_getIntPropertyMaxValue(UCHAR_NFKC_QUICK_CHECK)!=(int32_t)UNORM_MAYBE ||
+ u_getIntPropertyMaxValue(UCHAR_LEAD_CANONICAL_COMBINING_CLASS)!=u_getIntPropertyMaxValue(UCHAR_CANONICAL_COMBINING_CLASS) ||
+ u_getIntPropertyMaxValue(UCHAR_TRAIL_CANONICAL_COMBINING_CLASS)!=u_getIntPropertyMaxValue(UCHAR_CANONICAL_COMBINING_CLASS)
+ ) {
+ log_err("wrong result from one of the u_getIntPropertyMaxValue(UCHAR_NF*_QUICK_CHECK) or UCHAR_*_CANONICAL_COMBINING_CLASS\n");
+ }
+
+ /*
+ * compare the quick check property values for some code points
+ * to the quick check results for checking same-code point strings
+ */
+ errorCode=U_ZERO_ERROR;
+ c=0;
+ while(c<0x110000) {
+ length=0;
+ U16_APPEND_UNSAFE(s, length, c);
+
+ qc1=u_getIntPropertyValue(c, UCHAR_NFC_QUICK_CHECK);
+ qc2=unorm_quickCheck(s, length, UNORM_NFC, &errorCode);
+ if(qc1!=qc2) {
+ log_err("u_getIntPropertyValue(NFC)=%d != %d=unorm_quickCheck(NFC) for U+%04x\n", qc1, qc2, c);
+ }
+
+ qc1=u_getIntPropertyValue(c, UCHAR_NFD_QUICK_CHECK);
+ qc2=unorm_quickCheck(s, length, UNORM_NFD, &errorCode);
+ if(qc1!=qc2) {
+ log_err("u_getIntPropertyValue(NFD)=%d != %d=unorm_quickCheck(NFD) for U+%04x\n", qc1, qc2, c);
+ }
+
+ qc1=u_getIntPropertyValue(c, UCHAR_NFKC_QUICK_CHECK);
+ qc2=unorm_quickCheck(s, length, UNORM_NFKC, &errorCode);
+ if(qc1!=qc2) {
+ log_err("u_getIntPropertyValue(NFKC)=%d != %d=unorm_quickCheck(NFKC) for U+%04x\n", qc1, qc2, c);
+ }
+
+ qc1=u_getIntPropertyValue(c, UCHAR_NFKD_QUICK_CHECK);
+ qc2=unorm_quickCheck(s, length, UNORM_NFKD, &errorCode);
+ if(qc1!=qc2) {
+ log_err("u_getIntPropertyValue(NFKD)=%d != %d=unorm_quickCheck(NFKD) for U+%04x\n", qc1, qc2, c);
+ }
+
+ length=unorm_normalize(s, length, UNORM_NFD, 0, nfd, LENGTHOF(nfd), &errorCode);
+ /* length-length == 0 is used to get around a compiler warning. */
+ U16_GET(nfd, 0, length-length, length, lead);
+ U16_GET(nfd, 0, length-1, length, trail);
+
+ lccc1=u_getIntPropertyValue(c, UCHAR_LEAD_CANONICAL_COMBINING_CLASS);
+ lccc2=u_getCombiningClass(lead);
+ tccc1=u_getIntPropertyValue(c, UCHAR_TRAIL_CANONICAL_COMBINING_CLASS);
+ tccc2=u_getCombiningClass(trail);
+
+ if(lccc1!=lccc2) {
+ log_err("u_getIntPropertyValue(lccc)=%d != %d=u_getCombiningClass(lead) for U+%04x\n",
+ lccc1, lccc2, c);
+ }
+ if(tccc1!=tccc2) {
+ log_err("u_getIntPropertyValue(tccc)=%d != %d=u_getCombiningClass(trail) for U+%04x\n",
+ tccc1, tccc2, c);
+ }
+
+ /* skip some code points */
+ c=(20*c)/19+1;
+ }
+}
+
+static void
+TestComposition(void) {
+ static const struct {
+ UNormalizationMode mode;
+ uint32_t options;
+ UChar input[12];
+ UChar expect[12];
+ } cases[]={
+ /*
+ * special cases for UAX #15 bug
+ * see Unicode Public Review Issue #29
+ * at http://www.unicode.org/review/resolved-pri.html#pri29
+ */
+ { UNORM_NFC, 0, { 0x1100, 0x0300, 0x1161, 0x0327 }, { 0x1100, 0x0300, 0x1161, 0x0327 } },
+ { UNORM_NFC, 0, { 0x1100, 0x0300, 0x1161, 0x0327, 0x11a8 }, { 0x1100, 0x0300, 0x1161, 0x0327, 0x11a8 } },
+ { UNORM_NFC, 0, { 0xac00, 0x0300, 0x0327, 0x11a8 }, { 0xac00, 0x0327, 0x0300, 0x11a8 } },
+ { UNORM_NFC, 0, { 0x0b47, 0x0300, 0x0b3e }, { 0x0b47, 0x0300, 0x0b3e } },
+
+ { UNORM_NFC, UNORM_BEFORE_PRI_29, { 0x1100, 0x0300, 0x1161, 0x0327 }, { 0xac00, 0x0300, 0x0327 } },
+ { UNORM_NFC, UNORM_BEFORE_PRI_29, { 0x1100, 0x0300, 0x1161, 0x0327, 0x11a8 }, { 0xac01, 0x0300, 0x0327 } },
+ { UNORM_NFC, UNORM_BEFORE_PRI_29, { 0xac00, 0x0300, 0x0327, 0x11a8 }, { 0xac01, 0x0327, 0x0300 } },
+ { UNORM_NFC, UNORM_BEFORE_PRI_29, { 0x0b47, 0x0300, 0x0b3e }, { 0x0b4b, 0x0300 } }
+
+ /* TODO: add test cases for UNORM_FCC here (j2151) */
+ };
+
+ UChar output[16];
+ UErrorCode errorCode;
+ int32_t i, length;
+
+ for(i=0; i<LENGTHOF(cases); ++i) {
+ errorCode=U_ZERO_ERROR;
+ length=unorm_normalize(
+ cases[i].input, -1,
+ cases[i].mode, cases[i].options,
+ output, LENGTHOF(output),
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=u_strlen(cases[i].expect) ||
+ 0!=u_memcmp(output, cases[i].expect, length)
+ ) {
+ log_err("unexpected result for case %d\n", i);
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.h
new file mode 100644
index 00000000000..bc213a486aa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cnormtst.h
@@ -0,0 +1,43 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CNORMTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+* synwee added test for quick check
+* synwee added test for checkFCD
+*********************************************************************************
+*/
+#ifndef _NORMTST
+#define _NORMTST
+/**
+ * tests for u_normalization
+ */
+
+#include "cintltst.h"
+
+ void TestDecomp(void);
+ void TestCompatDecomp(void);
+ void TestCanonDecompCompose(void);
+ void TestCompatDecompCompose(void);
+ void TestNull(void);
+ void TestQuickCheck(void);
+ void TestCheckFCD(void);
+
+ /*internal functions*/
+
+/* static void assertEqual(const UChar* result, const UChar* expected, int32_t index);
+*/
+ static void assertEqual(const UChar* result, const char* expected, int32_t index);
+
+
+
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.c
new file mode 100644
index 00000000000..7a8df1f70b4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.c
@@ -0,0 +1,1399 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CNUMTST.C
+*
+* Madhu Katragadda Creation
+*
+* Modification History:
+*
+* Date Name Description
+* 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes
+* 07/15/99 helena Ported to HPUX 10/11 CC.
+*********************************************************************************
+*/
+
+/* C API TEST FOR NUMBER FORMAT */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/uloc.h"
+#include "unicode/unum.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "cnumtst.h"
+#include "cmemory.h"
+#include "putilimp.h"
+
+#define LENGTH(arr) (sizeof(arr)/sizeof(arr[0]))
+
+void addNumForTest(TestNode** root);
+static void TestTextAttributeCrash(void);
+
+#define TESTCASE(x) addTest(root, &x, "tsformat/cnumtst/" #x)
+
+void addNumForTest(TestNode** root)
+{
+ TESTCASE(TestNumberFormat);
+ TESTCASE(TestSignificantDigits);
+ TESTCASE(TestNumberFormatPadding);
+ TESTCASE(TestInt64Format);
+ TESTCASE(TestNonExistentCurrency);
+ TESTCASE(TestCurrencyRegression);
+ TESTCASE(TestTextAttributeCrash);
+ TESTCASE(TestRBNFFormat);
+}
+
+/** copy src to dst with unicode-escapes for values < 0x20 and > 0x7e, null terminate if possible */
+static int32_t ustrToAstr(const UChar* src, int32_t srcLength, char* dst, int32_t dstLength) {
+ static const char hex[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+
+ char *p = dst;
+ const char *e = p + dstLength;
+ if (srcLength < 0) {
+ const UChar* s = src;
+ while (*s) {
+ ++s;
+ }
+ srcLength = (int32_t)(s - src);
+ }
+ while (p < e && --srcLength >= 0) {
+ UChar c = *src++;
+ if (c == 0xd || c == 0xa || c == 0x9 || (c>= 0x20 && c <= 0x7e)) {
+ *p++ = (char) c & 0x7f;
+ } else if (e - p >= 6) {
+ *p++ = '\\';
+ *p++ = 'u';
+ *p++ = hex[(c >> 12) & 0xf];
+ *p++ = hex[(c >> 8) & 0xf];
+ *p++ = hex[(c >> 4) & 0xf];
+ *p++ = hex[c & 0xf];
+ } else {
+ break;
+ }
+ }
+ if (p < e) {
+ *p = 0;
+ }
+ return (int32_t)(p - dst);
+}
+
+/* test Number Format API */
+static void TestNumberFormat()
+{
+ UChar *result=NULL;
+ UChar temp1[512];
+ UChar temp2[512];
+
+ UChar temp[5];
+
+ UChar prefix[5];
+ UChar suffix[5];
+ UChar symbol[20];
+ int32_t resultlength;
+ int32_t resultlengthneeded;
+ int32_t parsepos;
+ double d1 = -1.0;
+ int32_t l1;
+ double d = -10456.37;
+ double a = 1234.56, a1 = 1235.0;
+ int32_t l = 100000000;
+ UFieldPosition pos1;
+ UFieldPosition pos2;
+ int32_t numlocales;
+ int32_t i;
+
+ UNumberFormatAttribute attr;
+ UNumberFormatSymbol symType = UNUM_DECIMAL_SEPARATOR_SYMBOL;
+ int32_t newvalue;
+ UErrorCode status=U_ZERO_ERROR;
+ UNumberFormatStyle style= UNUM_DEFAULT;
+ UNumberFormat *pattern;
+ UNumberFormat *def, *fr, *cur_def, *cur_fr, *per_def, *per_fr,
+ *cur_frpattern, *myclone, *spellout_def;
+
+ /* Testing unum_open() with various Numberformat styles and locales*/
+ status = U_ZERO_ERROR;
+ log_verbose("Testing unum_open() with default style and locale\n");
+ def=unum_open(style, NULL,0,NULL, NULL,&status);
+
+ /* Might as well pack it in now if we can't even get a default NumberFormat... */
+ if(U_FAILURE(status))
+ {
+ log_err("Error in creating default NumberFormat using unum_open(): %s\n", myErrorName(status));
+ return;
+ }
+
+ log_verbose("\nTesting unum_open() with french locale and default style(decimal)\n");
+ fr=unum_open(style,NULL,0, "fr_FR",NULL, &status);
+ if(U_FAILURE(status))
+ log_err("Error: could not create NumberFormat (french): %s\n", myErrorName(status));
+
+ log_verbose("\nTesting unum_open(currency,NULL,status)\n");
+ style=UNUM_CURRENCY;
+ /* Can't hardcode the result to assume the default locale is "en_US". */
+ cur_def=unum_open(style, NULL,0,"en_US", NULL, &status);
+ if(U_FAILURE(status))
+ log_err("Error: could not create NumberFormat using \n unum_open(currency, NULL, &status) %s\n",
+ myErrorName(status) );
+
+ log_verbose("\nTesting unum_open(currency, frenchlocale, status)\n");
+ cur_fr=unum_open(style,NULL,0, "fr_FR", NULL, &status);
+ if(U_FAILURE(status))
+ log_err("Error: could not create NumberFormat using unum_open(currency, french, &status): %s\n",
+ myErrorName(status));
+
+ log_verbose("\nTesting unum_open(percent, NULL, status)\n");
+ style=UNUM_PERCENT;
+ per_def=unum_open(style,NULL,0, NULL,NULL, &status);
+ if(U_FAILURE(status))
+ log_err("Error: could not create NumberFormat using unum_open(percent, NULL, &status): %s\n", myErrorName(status));
+
+ log_verbose("\nTesting unum_open(percent,frenchlocale, status)\n");
+ per_fr=unum_open(style, NULL,0,"fr_FR", NULL,&status);
+ if(U_FAILURE(status))
+ log_err("Error: could not create NumberFormat using unum_open(percent, french, &status): %s\n", myErrorName(status));
+
+ log_verbose("\nTesting unum_open(spellout, NULL, status)");
+ style=UNUM_SPELLOUT;
+ spellout_def=unum_open(style, NULL, 0, "en_US", NULL, &status);
+ if(U_FAILURE(status))
+ log_err("Error: could not create NumberFormat using unum_open(spellout, NULL, &status): %s\n", myErrorName(status));
+
+ /* Testing unum_clone(..) */
+ log_verbose("\nTesting unum_clone(fmt, status)");
+ status = U_ZERO_ERROR;
+ myclone = unum_clone(def,&status);
+ if(U_FAILURE(status))
+ log_err("Error: could not clone unum_clone(def, &status): %s\n", myErrorName(status));
+ else
+ {
+ log_verbose("unum_clone() successful\n");
+ }
+
+ /*Testing unum_getAvailable() and unum_countAvailable()*/
+ log_verbose("\nTesting getAvailableLocales and countAvailable()\n");
+ numlocales=unum_countAvailable();
+ if(numlocales < 0)
+ log_err("error in countAvailable");
+ else{
+ log_verbose("unum_countAvialable() successful\n");
+ log_verbose("The no: of locales where number formattting is applicable is %d\n", numlocales);
+ }
+ for(i=0;i<numlocales;i++)
+ {
+ log_verbose("%s\n", unum_getAvailable(i));
+ if (unum_getAvailable(i) == 0)
+ log_err("No locale for which number formatting patterns are applicable\n");
+ else
+ log_verbose("A locale %s for which number formatting patterns are applicable\n",unum_getAvailable(i));
+ }
+
+
+ /*Testing unum_format() and unum_formatdouble()*/
+ u_uastrcpy(temp1, "$100,000,000.00");
+
+ log_verbose("\nTesting unum_format() \n");
+ resultlength=0;
+ pos1.field = 0; /* Integer Section */
+ resultlengthneeded=unum_format(cur_def, l, NULL, resultlength, &pos1, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+/* for (i = 0; i < 100000; i++) */
+ {
+ unum_format(cur_def, l, result, resultlength, &pos1, &status);
+ }
+ }
+
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status) );
+ }
+ if(u_strcmp(result, temp1)==0)
+ log_verbose("Pass: Number formatting using unum_format() successful\n");
+ else
+ log_err("Fail: Error in number Formatting using unum_format()\n");
+ if(pos1.beginIndex == 1 && pos1.endIndex == 12)
+ log_verbose("Pass: Complete number formatting using unum_format() successful\n");
+ else
+ log_err("Fail: Error in complete number Formatting using unum_format()\nGot: b=%d end=%d\nExpected: b=1 end=12\n",
+ pos1.beginIndex, pos1.endIndex);
+
+free(result);
+ result = 0;
+
+ log_verbose("\nTesting unum_formatDouble()\n");
+ u_uastrcpy(temp1, "($10,456.37)");
+ resultlength=0;
+ pos2.field = 1; /* Fractional Section */
+ resultlengthneeded=unum_formatDouble(cur_def, d, NULL, resultlength, &pos2, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+/* for (i = 0; i < 100000; i++) */
+ {
+ unum_formatDouble(cur_def, d, result, resultlength, &pos2, &status);
+ }
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status));
+ }
+ if(result && u_strcmp(result, temp1)==0)
+ log_verbose("Pass: Number Formatting using unum_formatDouble() Successful\n");
+ else
+ log_err("FAIL: Error in number formatting using unum_formatDouble()\n");
+ if(pos2.beginIndex == 9 && pos2.endIndex == 11)
+ log_verbose("Pass: Complete number formatting using unum_format() successful\n");
+ else
+ log_err("Fail: Error in complete number Formatting using unum_formatDouble()\nGot: b=%d end=%d\nExpected: b=9 end=11",
+ pos1.beginIndex, pos1.endIndex);
+
+
+ /* Testing unum_parse() and unum_parseDouble() */
+ log_verbose("\nTesting unum_parseDouble()\n");
+/* for (i = 0; i < 100000; i++)*/
+ if (result != NULL)
+ {
+ parsepos=0;
+ d1=unum_parseDouble(cur_def, result, u_strlen(result), &parsepos, &status);
+ }
+ else {
+ log_err("result is NULL\n");
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("parse failed. The error is : %s\n", myErrorName(status));
+ }
+
+ if(d1!=d)
+ log_err("Fail: Error in parsing\n");
+ else
+ log_verbose("Pass: parsing successful\n");
+ if (result)
+ free(result);
+ result = 0;
+
+
+ /* Testing unum_formatDoubleCurrency / unum_parseDoubleCurrency */
+ log_verbose("\nTesting unum_formatDoubleCurrency\n");
+ u_uastrcpy(temp1, "Y1,235");
+ temp1[0] = 0xA5; /* Yen sign */
+ u_uastrcpy(temp, "JPY");
+ resultlength=0;
+ pos2.field = 0; /* integer part */
+ resultlengthneeded=unum_formatDoubleCurrency(cur_def, a, temp, NULL, resultlength, &pos2, &status);
+ if (status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ unum_formatDoubleCurrency(cur_def, a, temp, result, resultlength, &pos2, &status);
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status));
+ }
+ if (result && u_strcmp(result, temp1)==0) {
+ log_verbose("Pass: Number Formatting using unum_formatDouble() Successful\n");
+ } else {
+ log_err("FAIL: Error in number formatting using unum_formatDouble()\n");
+ }
+ if (pos2.beginIndex == 1 && pos2.endIndex == 6) {
+ log_verbose("Pass: Complete number formatting using unum_format() successful\n");
+ } else {
+ log_err("Fail: Error in complete number Formatting using unum_formatDouble()\nGot: b=%d end=%d\nExpected: b=1 end=6\n",
+ pos1.beginIndex, pos1.endIndex);
+ }
+
+ log_verbose("\nTesting unum_parseDoubleCurrency\n");
+ parsepos=0;
+ if (result == NULL) {
+ log_err("result is NULL\n");
+ }
+ else {
+ d1=unum_parseDoubleCurrency(cur_def, result, u_strlen(result), &parsepos, temp2, &status);
+ if (U_FAILURE(status)) {
+ log_err("parse failed. The error is : %s\n", myErrorName(status));
+ }
+ /* Note: a==1234.56, but on parse expect a1=1235.0 */
+ if (d1!=a1) {
+ log_err("Fail: Error in parsing currency, got %f, expected %f\n", d1, a1);
+ } else {
+ log_verbose("Pass: parsed currency ammount successfully\n");
+ }
+ if (u_strcmp(temp2, temp)==0) {
+ log_verbose("Pass: parsed correct currency\n");
+ } else {
+ log_err("Fail: parsed incorrect currency\n");
+ }
+ }
+
+free(result);
+ result = 0;
+
+
+/* performance testing */
+ u_uastrcpy(temp1, "$462.12345");
+ resultlength=u_strlen(temp1);
+/* for (i = 0; i < 100000; i++) */
+ {
+ parsepos=0;
+ d1=unum_parseDouble(cur_def, temp1, resultlength, &parsepos, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("parse failed. The error is : %s\n", myErrorName(status));
+ }
+
+ if(d1!=462.12345)
+ log_err("Fail: Error in parsing\n");
+ else
+ log_verbose("Pass: parsing successful\n");
+
+free(result);
+
+ u_uastrcpy(temp1, "($10,456.3E1])");
+ parsepos=0;
+ d1=unum_parseDouble(cur_def, temp1, u_strlen(temp1), &parsepos, &status);
+ if(U_SUCCESS(status))
+ {
+ log_err("Error in unum_parseDouble(..., %s, ...): %s\n", temp1, myErrorName(status));
+ }
+
+
+ log_verbose("\nTesting unum_format()\n");
+ status=U_ZERO_ERROR;
+ resultlength=0;
+ parsepos=0;
+ resultlengthneeded=unum_format(per_fr, l, NULL, resultlength, &pos1, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+/* for (i = 0; i < 100000; i++)*/
+ {
+ unum_format(per_fr, l, result, resultlength, &pos1, &status);
+ }
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status));
+ }
+
+
+ log_verbose("\nTesting unum_parse()\n");
+/* for (i = 0; i < 100000; i++) */
+ {
+ parsepos=0;
+ l1=unum_parse(per_fr, result, u_strlen(result), &parsepos, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("parse failed. The error is : %s\n", myErrorName(status));
+ }
+
+ if(l1!=l)
+ log_err("Fail: Error in parsing\n");
+ else
+ log_verbose("Pass: parsing successful\n");
+
+free(result);
+
+ /* create a number format using unum_openPattern(....)*/
+ log_verbose("\nTesting unum_openPattern()\n");
+ u_uastrcpy(temp1, "#,##0.0#;(#,##0.0#)");
+ pattern=unum_open(UNUM_IGNORE,temp1, u_strlen(temp1), NULL, NULL,&status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in unum_openPattern(): %s\n", myErrorName(status) );;
+ }
+ else
+ log_verbose("Pass: unum_openPattern() works fine\n");
+
+ /*test for unum_toPattern()*/
+ log_verbose("\nTesting unum_toPattern()\n");
+ resultlength=0;
+ resultlengthneeded=unum_toPattern(pattern, FALSE, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ unum_toPattern(pattern, FALSE, result, resultlength, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("error in extracting the pattern from UNumberFormat: %s\n", myErrorName(status));
+ }
+ else
+ {
+ if(u_strcmp(result, temp1)!=0)
+ log_err("FAIL: Error in extracting the pattern using unum_toPattern()\n");
+ else
+ log_verbose("Pass: extracted the pattern correctly using unum_toPattern()\n");
+free(result);
+ }
+
+ /*Testing unum_getSymbols() and unum_setSymbols()*/
+ log_verbose("\nTesting unum_getSymbols and unum_setSymbols()\n");
+ /*when we try to change the symbols of french to default we need to apply the pattern as well to fetch correct results */
+ resultlength=0;
+ resultlengthneeded=unum_toPattern(cur_def, FALSE, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ unum_toPattern(cur_def, FALSE, result, resultlength, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("error in extracting the pattern from UNumberFormat: %s\n", myErrorName(status));
+ }
+
+ status=U_ZERO_ERROR;
+ cur_frpattern=unum_open(UNUM_IGNORE,result, u_strlen(result), "fr_FR",NULL, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in unum_openPattern(): %s\n", myErrorName(status));
+ }
+
+free(result);
+
+ /*getting the symbols of cur_def */
+ /*set the symbols of cur_frpattern to cur_def */
+ for (symType = UNUM_DECIMAL_SEPARATOR_SYMBOL; symType < UNUM_FORMAT_SYMBOL_COUNT; symType++) {
+ status=U_ZERO_ERROR;
+ unum_getSymbol(cur_def, symType, temp1, sizeof(temp1), &status);
+ unum_setSymbol(cur_frpattern, symType, temp1, -1, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Error in get/set symbols: %s\n", myErrorName(status));
+ }
+ }
+
+ /*format to check the result */
+ resultlength=0;
+ resultlengthneeded=unum_format(cur_def, l, NULL, resultlength, &pos1, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ unum_format(cur_def, l, result, resultlength, &pos1, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status));
+ }
+
+ if(U_FAILURE(status)){
+ log_err("Fail: error in unum_setSymbols: %s\n", myErrorName(status));
+ }
+ unum_applyPattern(cur_frpattern, FALSE, result, u_strlen(result),NULL,NULL);
+
+ for (symType = UNUM_DECIMAL_SEPARATOR_SYMBOL; symType < UNUM_FORMAT_SYMBOL_COUNT; symType++) {
+ status=U_ZERO_ERROR;
+ unum_getSymbol(cur_def, symType, temp1, sizeof(temp1), &status);
+ unum_getSymbol(cur_frpattern, symType, temp2, sizeof(temp2), &status);
+ if(U_FAILURE(status) || u_strcmp(temp1, temp2) != 0)
+ {
+ log_err("Fail: error in getting symbols\n");
+ }
+ else
+ log_verbose("Pass: get and set symbols successful\n");
+ }
+
+ /*format and check with the previous result */
+
+ resultlength=0;
+ resultlengthneeded=unum_format(cur_frpattern, l, NULL, resultlength, &pos1, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ unum_format(cur_frpattern, l, temp1, resultlength, &pos1, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using unum_format(.....): %s\n", myErrorName(status));
+ }
+ /* TODO:
+ * This test fails because we have not called unum_applyPattern().
+ * Currently, such an applyPattern() does not exist on the C API, and
+ * we have jitterbug 411 for it.
+ * Since it is close to the 1.5 release, I (markus) am disabling this test just
+ * for this release (I added the test itself only last week).
+ * For the next release, we need to fix this.
+ * Then, remove the uprv_strcmp("1.5", ...) and this comment, and the include "cstring.h" at the beginning of this file.
+ */
+ if(u_strcmp(result, temp1) != 0) {
+ log_err("Formatting failed after setting symbols. result=%s temp1=%s\n", result, temp1);
+ }
+
+
+ /*----------- */
+
+free(result);
+
+ /* Testing unum_get/setSymbol() */
+ for(i = 0; i < UNUM_FORMAT_SYMBOL_COUNT; ++i) {
+ symbol[0] = (UChar)(0x41 + i);
+ symbol[1] = (UChar)(0x61 + i);
+ unum_setSymbol(cur_frpattern, (UNumberFormatSymbol)i, symbol, 2, &status);
+ if(U_FAILURE(status)) {
+ log_err("Error from unum_setSymbol(%d): %s\n", i, myErrorName(status));
+ return;
+ }
+ }
+ for(i = 0; i < UNUM_FORMAT_SYMBOL_COUNT; ++i) {
+ resultlength = unum_getSymbol(cur_frpattern, (UNumberFormatSymbol)i, symbol, sizeof(symbol)/U_SIZEOF_UCHAR, &status);
+ if(U_FAILURE(status)) {
+ log_err("Error from unum_getSymbol(%d): %s\n", i, myErrorName(status));
+ return;
+ }
+ if(resultlength != 2 || symbol[0] != 0x41 + i || symbol[1] != 0x61 + i) {
+ log_err("Failure in unum_getSymbol(%d): got unexpected symbol\n", i);
+ }
+ }
+ /*try getting from a bogus symbol*/
+ unum_getSymbol(cur_frpattern, (UNumberFormatSymbol)i, symbol, sizeof(symbol)/U_SIZEOF_UCHAR, &status);
+ if(U_SUCCESS(status)){
+ log_err("Error : Expected U_ILLEGAL_ARGUMENT_ERROR for bogus symbol");
+ }
+ if(U_FAILURE(status)){
+ if(status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("Error: Expected U_ILLEGAL_ARGUMENT_ERROR for bogus symbol, Got %s\n", myErrorName(status));
+ }
+ }
+ status=U_ZERO_ERROR;
+
+ /* Testing unum_getTextAttribute() and unum_setTextAttribute()*/
+ log_verbose("\nTesting getting and setting text attributes\n");
+ resultlength=5;
+ unum_getTextAttribute(cur_fr, UNUM_NEGATIVE_SUFFIX, temp, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Failure in gettting the Text attributes of number format: %s\n", myErrorName(status));
+ }
+ unum_setTextAttribute(cur_def, UNUM_NEGATIVE_SUFFIX, temp, u_strlen(temp), &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Failure in gettting the Text attributes of number format: %s\n", myErrorName(status));
+ }
+ unum_getTextAttribute(cur_def, UNUM_NEGATIVE_SUFFIX, suffix, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Failure in gettting the Text attributes of number format: %s\n", myErrorName(status));
+ }
+ if(u_strcmp(suffix,temp)!=0)
+ log_err("Fail:Error in setTextAttribute or getTextAttribute in setting and getting suffix\n");
+ else
+ log_verbose("Pass: setting and getting suffix works fine\n");
+ /*set it back to normal */
+ u_uastrcpy(temp,"$");
+ unum_setTextAttribute(cur_def, UNUM_NEGATIVE_SUFFIX, temp, u_strlen(temp), &status);
+
+ /*checking some more text setter conditions */
+ u_uastrcpy(prefix, "+");
+ unum_setTextAttribute(def, UNUM_POSITIVE_PREFIX, prefix, u_strlen(prefix) , &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in setting the text attributes : %s\n", myErrorName(status));
+ }
+ unum_getTextAttribute(def, UNUM_POSITIVE_PREFIX, temp, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in getting the text attributes : %s\n", myErrorName(status));
+ }
+
+ if(u_strcmp(prefix, temp)!=0)
+ log_err("ERROR: get and setTextAttributes with positive prefix failed\n");
+ else
+ log_verbose("Pass: get and setTextAttributes with positive prefix works fine\n");
+
+ u_uastrcpy(prefix, "+");
+ unum_setTextAttribute(def, UNUM_NEGATIVE_PREFIX, prefix, u_strlen(prefix), &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in setting the text attributes : %s\n", myErrorName(status));
+ }
+ unum_getTextAttribute(def, UNUM_NEGATIVE_PREFIX, temp, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in getting the text attributes : %s\n", myErrorName(status));
+ }
+ if(u_strcmp(prefix, temp)!=0)
+ log_err("ERROR: get and setTextAttributes with negative prefix failed\n");
+ else
+ log_verbose("Pass: get and setTextAttributes with negative prefix works fine\n");
+
+ u_uastrcpy(suffix, "+");
+ unum_setTextAttribute(def, UNUM_NEGATIVE_SUFFIX, suffix, u_strlen(suffix) , &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in setting the text attributes: %s\n", myErrorName(status));
+ }
+
+ unum_getTextAttribute(def, UNUM_NEGATIVE_SUFFIX, temp, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in getting the text attributes : %s\n", myErrorName(status));
+ }
+ if(u_strcmp(suffix, temp)!=0)
+ log_err("ERROR: get and setTextAttributes with negative suffix failed\n");
+ else
+ log_verbose("Pass: get and settextAttributes with negative suffix works fine\n");
+
+ u_uastrcpy(suffix, "++");
+ unum_setTextAttribute(def, UNUM_POSITIVE_SUFFIX, suffix, u_strlen(suffix) , &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in setting the text attributes: %s\n", myErrorName(status));
+ }
+
+ unum_getTextAttribute(def, UNUM_POSITIVE_SUFFIX, temp, resultlength, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in getting the text attributes : %s\n", myErrorName(status));
+ }
+ if(u_strcmp(suffix, temp)!=0)
+ log_err("ERROR: get and setTextAttributes with negative suffix failed\n");
+ else
+ log_verbose("Pass: get and settextAttributes with negative suffix works fine\n");
+
+ /*Testing unum_getAttribute and unum_setAttribute() */
+ log_verbose("\nTesting get and set Attributes\n");
+ attr=UNUM_GROUPING_SIZE;
+ newvalue=unum_getAttribute(def, attr);
+ newvalue=2;
+ unum_setAttribute(def, attr, newvalue);
+ if(unum_getAttribute(def,attr)!=2)
+ log_err("Fail: error in setting and getting attributes for UNUM_GROUPING_SIZE\n");
+ else
+ log_verbose("Pass: setting and getting attributes for UNUM_GROUPING_SIZE works fine\n");
+
+ attr=UNUM_MULTIPLIER;
+ newvalue=unum_getAttribute(def, attr);
+ newvalue=8;
+ unum_setAttribute(def, attr, newvalue);
+ if(unum_getAttribute(def,attr) != 8)
+ log_err("error in setting and getting attributes for UNUM_MULTIPLIER\n");
+ else
+ log_verbose("Pass:setting and getting attributes for UNUM_MULTIPLIER works fine\n");
+
+ attr=UNUM_SECONDARY_GROUPING_SIZE;
+ newvalue=unum_getAttribute(def, attr);
+ newvalue=2;
+ unum_setAttribute(def, attr, newvalue);
+ if(unum_getAttribute(def,attr) != 2)
+ log_err("error in setting and getting attributes for UNUM_SECONDARY_GROUPING_SIZE\n");
+ else
+ log_verbose("Pass:setting and getting attributes for UNUM_SECONDARY_GROUPING_SIZE works fine\n");
+
+ /*testing set and get Attributes extensively */
+ log_verbose("\nTesting get and set attributes extensively\n");
+ for(attr=UNUM_PARSE_INT_ONLY; attr<= UNUM_PADDING_POSITION; attr=(UNumberFormatAttribute)((int32_t)attr + 1) )
+ {
+ newvalue=unum_getAttribute(fr, attr);
+ unum_setAttribute(def, attr, newvalue);
+ if(unum_getAttribute(def,attr)!=unum_getAttribute(fr, attr))
+ log_err("error in setting and getting attributes\n");
+ else
+ log_verbose("Pass: attributes set and retrieved successfully\n");
+ }
+
+ /*testing spellout format to make sure we can use it successfully.*/
+ log_verbose("\nTesting spellout format\n");
+ if (spellout_def)
+ {
+ static const int32_t values[] = { 0, -5, 105, 1005, 105050 };
+ for (i = 0; i < LENGTH(values); ++i) {
+ UChar buffer[128];
+ int32_t len;
+ int32_t value = values[i];
+ status = U_ZERO_ERROR;
+ len = unum_format(spellout_def, value, buffer, LENGTH(buffer), NULL, &status);
+ if(U_FAILURE(status)) {
+ log_err("Error in formatting using unum_format(spellout_fmt, ...): %s\n", myErrorName(status));
+ } else {
+ int32_t pp = 0;
+ int32_t parseResult;
+ char logbuf[256];
+ ustrToAstr(buffer, len, logbuf, LENGTH(logbuf));
+ log_verbose("formatted %d as '%s', length: %d\n", value, logbuf, len);
+
+ parseResult = unum_parse(spellout_def, buffer, len, &pp, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error in parsing using unum_format(spellout_fmt, ...): %s\n", myErrorName(status));
+ } else if (parseResult != value) {
+ log_err("unum_format result %d != value %d\n", parseResult, value);
+ }
+ }
+ }
+ }
+ else {
+ log_err("Spellout format is unavailable\n");
+ }
+
+ /*closing the NumberFormat() using unum_close(UNumberFormat*)")*/
+ unum_close(def);
+ unum_close(fr);
+ unum_close(cur_def);
+ unum_close(cur_fr);
+ unum_close(per_def);
+ unum_close(per_fr);
+ unum_close(spellout_def);
+ unum_close(pattern);
+ unum_close(cur_frpattern);
+ unum_close(myclone);
+
+}
+
+static void TestSignificantDigits()
+{
+ UChar temp[128];
+ int32_t resultlengthneeded;
+ int32_t resultlength;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *result = NULL;
+ UNumberFormat* fmt;
+ double d = 123456.789;
+
+ u_uastrcpy(temp, "###0.0#");
+ fmt=unum_open(UNUM_IGNORE, temp, -1, NULL, NULL,&status);
+ if (U_FAILURE(status)) {
+ log_err("got unexpected error for unum_open: '%s'\n", u_errorName(status));
+ }
+ unum_setAttribute(fmt, UNUM_SIGNIFICANT_DIGITS_USED, TRUE);
+ unum_setAttribute(fmt, UNUM_MAX_SIGNIFICANT_DIGITS, 6);
+
+ u_uastrcpy(temp, "123457");
+ resultlength=0;
+ resultlengthneeded=unum_formatDouble(fmt, d, NULL, resultlength, NULL, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ unum_formatDouble(fmt, d, result, resultlength, NULL, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status));
+ return;
+ }
+ if(u_strcmp(result, temp)==0)
+ log_verbose("Pass: Number Formatting using unum_formatDouble() Successful\n");
+ else
+ log_err("FAIL: Error in number formatting using unum_formatDouble()\n");
+ free(result);
+ unum_close(fmt);
+}
+
+static void TestNumberFormatPadding()
+{
+ UChar *result=NULL;
+ UChar temp1[512];
+
+ UErrorCode status=U_ZERO_ERROR;
+ int32_t resultlength;
+ int32_t resultlengthneeded;
+ UNumberFormat *pattern;
+ double d1;
+ double d = -10456.37;
+ UFieldPosition pos1;
+ int32_t parsepos;
+
+ /* create a number format using unum_openPattern(....)*/
+ log_verbose("\nTesting unum_openPattern() with padding\n");
+ u_uastrcpy(temp1, "*#,##0.0#*;(#,##0.0#)");
+ status=U_ZERO_ERROR;
+ pattern=unum_open(UNUM_IGNORE,temp1, u_strlen(temp1), NULL, NULL,&status);
+ if(U_SUCCESS(status))
+ {
+ log_err("error in unum_openPattern(%s): %s\n", temp1, myErrorName(status) );;
+ }
+ else
+ {
+ unum_close(pattern);
+ }
+
+/* u_uastrcpy(temp1, "*x#,###,###,##0.0#;(*x#,###,###,##0.0#)"); */
+ u_uastrcpy(temp1, "*x#,###,###,##0.0#;*x(###,###,##0.0#)");
+ status=U_ZERO_ERROR;
+ pattern=unum_open(UNUM_IGNORE,temp1, u_strlen(temp1), "en_US",NULL, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("error in padding unum_openPattern(%s): %s\n", temp1, myErrorName(status) );;
+ }
+ else {
+ log_verbose("Pass: padding unum_openPattern() works fine\n");
+
+ /*test for unum_toPattern()*/
+ log_verbose("\nTesting padding unum_toPattern()\n");
+ resultlength=0;
+ resultlengthneeded=unum_toPattern(pattern, FALSE, NULL, resultlength, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ unum_toPattern(pattern, FALSE, result, resultlength, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("error in extracting the padding pattern from UNumberFormat: %s\n", myErrorName(status));
+ }
+ else
+ {
+ if(u_strcmp(result, temp1)!=0)
+ log_err("FAIL: Error in extracting the padding pattern using unum_toPattern()\n");
+ else
+ log_verbose("Pass: extracted the padding pattern correctly using unum_toPattern()\n");
+free(result);
+ }
+/* u_uastrcpy(temp1, "(xxxxxxx10,456.37)"); */
+ u_uastrcpy(temp1, "xxxxx(10,456.37)");
+ resultlength=0;
+ pos1.field = 1; /* Fraction field */
+ resultlengthneeded=unum_formatDouble(pattern, d, NULL, resultlength, &pos1, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR)
+ {
+ status=U_ZERO_ERROR;
+ resultlength=resultlengthneeded+1;
+ result=(UChar*)malloc(sizeof(UChar) * resultlength);
+ unum_formatDouble(pattern, d, result, resultlength, NULL, &status);
+ }
+ if(U_FAILURE(status))
+ {
+ log_err("Error in formatting using unum_formatDouble(.....) with padding : %s\n", myErrorName(status));
+ }
+ else
+ {
+ if(u_strcmp(result, temp1)==0)
+ log_verbose("Pass: Number Formatting using unum_formatDouble() padding Successful\n");
+ else
+ log_err("FAIL: Error in number formatting using unum_formatDouble() with padding\n");
+ if(pos1.beginIndex == 13 && pos1.endIndex == 15)
+ log_verbose("Pass: Complete number formatting using unum_formatDouble() successful\n");
+ else
+ log_err("Fail: Error in complete number Formatting using unum_formatDouble()\nGot: b=%d end=%d\nExpected: b=13 end=15\n",
+ pos1.beginIndex, pos1.endIndex);
+
+
+ /* Testing unum_parse() and unum_parseDouble() */
+ log_verbose("\nTesting padding unum_parseDouble()\n");
+ parsepos=0;
+ d1=unum_parseDouble(pattern, result, u_strlen(result), &parsepos, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("padding parse failed. The error is : %s\n", myErrorName(status));
+ }
+
+ if(d1!=d)
+ log_err("Fail: Error in padding parsing\n");
+ else
+ log_verbose("Pass: padding parsing successful\n");
+free(result);
+ }
+ }
+
+ unum_close(pattern);
+}
+
+static UBool
+withinErr(double a, double b, double err) {
+ return uprv_fabs(a - b) < uprv_fabs(a * err);
+}
+
+static void TestInt64Format() {
+ UChar temp1[512];
+ UChar result[512];
+ UNumberFormat *fmt;
+ UErrorCode status = U_ZERO_ERROR;
+ const double doubleInt64Max = (double)U_INT64_MAX;
+ const double doubleInt64Min = (double)U_INT64_MIN;
+ const double doubleBig = 10.0 * (double)U_INT64_MAX;
+ int32_t val32;
+ int64_t val64;
+ double valDouble;
+ int32_t parsepos;
+
+ /* create a number format using unum_openPattern(....) */
+ log_verbose("\nTesting Int64Format\n");
+ u_uastrcpy(temp1, "#.#E0");
+ fmt = unum_open(UNUM_IGNORE, temp1, u_strlen(temp1), NULL, NULL, &status);
+ if(U_FAILURE(status)) {
+ log_err("error in unum_openPattern(): %s\n", myErrorName(status));
+ } else {
+ unum_setAttribute(fmt, UNUM_MAX_FRACTION_DIGITS, 20);
+ unum_formatInt64(fmt, U_INT64_MAX, result, 512, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("error in unum_format(): %s\n", myErrorName(status));
+ } else {
+ log_verbose("format int64max: '%s'\n", result);
+ parsepos = 0;
+ val32 = unum_parse(fmt, result, u_strlen(result), &parsepos, &status);
+ if (status != U_INVALID_FORMAT_ERROR) {
+ log_err("parse didn't report error: %s\n", myErrorName(status));
+ } else if (val32 != INT32_MAX) {
+ log_err("parse didn't pin return value, got: %d\n", val32);
+ }
+
+ status = U_ZERO_ERROR;
+ parsepos = 0;
+ val64 = unum_parseInt64(fmt, result, u_strlen(result), &parsepos, &status);
+ if (U_FAILURE(status)) {
+ log_err("parseInt64 returned error: %s\n", myErrorName(status));
+ } else if (val64 != U_INT64_MAX) {
+ log_err("parseInt64 returned incorrect value, got: %ld\n", val64);
+ }
+
+ status = U_ZERO_ERROR;
+ parsepos = 0;
+ valDouble = unum_parseDouble(fmt, result, u_strlen(result), &parsepos, &status);
+ if (U_FAILURE(status)) {
+ log_err("parseDouble returned error: %s\n", myErrorName(status));
+ } else if (valDouble != doubleInt64Max) {
+ log_err("parseDouble returned incorrect value, got: %g\n", valDouble);
+ }
+ }
+
+ unum_formatInt64(fmt, U_INT64_MIN, result, 512, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("error in unum_format(): %s\n", myErrorName(status));
+ } else {
+ log_verbose("format int64min: '%s'\n", result);
+ parsepos = 0;
+ val32 = unum_parse(fmt, result, u_strlen(result), &parsepos, &status);
+ if (status != U_INVALID_FORMAT_ERROR) {
+ log_err("parse didn't report error: %s\n", myErrorName(status));
+ } else if (val32 != INT32_MIN) {
+ log_err("parse didn't pin return value, got: %d\n", val32);
+ }
+
+ status = U_ZERO_ERROR;
+ parsepos = 0;
+ val64 = unum_parseInt64(fmt, result, u_strlen(result), &parsepos, &status);
+ if (U_FAILURE(status)) {
+ log_err("parseInt64 returned error: %s\n", myErrorName(status));
+ } else if (val64 != U_INT64_MIN) {
+ log_err("parseInt64 returned incorrect value, got: %ld\n", val64);
+ }
+
+ status = U_ZERO_ERROR;
+ parsepos = 0;
+ valDouble = unum_parseDouble(fmt, result, u_strlen(result), &parsepos, &status);
+ if (U_FAILURE(status)) {
+ log_err("parseDouble returned error: %s\n", myErrorName(status));
+ } else if (valDouble != doubleInt64Min) {
+ log_err("parseDouble returned incorrect value, got: %g\n", valDouble);
+ }
+ }
+
+ unum_formatDouble(fmt, doubleBig, result, 512, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("error in unum_format(): %s\n", myErrorName(status));
+ } else {
+ log_verbose("format doubleBig: '%s'\n", result);
+ parsepos = 0;
+ val32 = unum_parse(fmt, result, u_strlen(result), &parsepos, &status);
+ if (status != U_INVALID_FORMAT_ERROR) {
+ log_err("parse didn't report error: %s\n", myErrorName(status));
+ } else if (val32 != INT32_MAX) {
+ log_err("parse didn't pin return value, got: %d\n", val32);
+ }
+
+ status = U_ZERO_ERROR;
+ parsepos = 0;
+ val64 = unum_parseInt64(fmt, result, u_strlen(result), &parsepos, &status);
+ if (status != U_INVALID_FORMAT_ERROR) {
+ log_err("parseInt64 didn't report error error: %s\n", myErrorName(status));
+ } else if (val64 != U_INT64_MAX) {
+ log_err("parseInt64 returned incorrect value, got: %ld\n", val64);
+ }
+
+ status = U_ZERO_ERROR;
+ parsepos = 0;
+ valDouble = unum_parseDouble(fmt, result, u_strlen(result), &parsepos, &status);
+ if (U_FAILURE(status)) {
+ log_err("parseDouble returned error: %s\n", myErrorName(status));
+ } else if (!withinErr(valDouble, doubleBig, 1e-15)) {
+ log_err("parseDouble returned incorrect value, got: %g\n", valDouble);
+ }
+ }
+ }
+ unum_close(fmt);
+}
+
+
+static void test_fmt(UNumberFormat* fmt, UBool isDecimal) {
+ char temp[512];
+ UChar buffer[512];
+ int32_t BUFSIZE = sizeof(buffer)/sizeof(buffer[0]);
+ double vals[] = {
+ -.2, 0, .2, 5.5, 15.2, 250, 123456789
+ };
+ int i;
+
+ for (i = 0; i < sizeof(vals)/sizeof(vals[0]); ++i) {
+ UErrorCode status = U_ZERO_ERROR;
+ unum_formatDouble(fmt, vals[i], buffer, BUFSIZE, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("failed to format: %g, returned %s\n", vals[i], u_errorName(status));
+ } else {
+ u_austrcpy(temp, buffer);
+ log_verbose("formatting %g returned '%s'\n", vals[i], temp);
+ }
+ }
+
+ /* check APIs now */
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError perr;
+ u_uastrcpy(buffer, "#,##0.0#");
+ unum_applyPattern(fmt, FALSE, buffer, -1, &perr, &status);
+ if (isDecimal ? U_FAILURE(status) : (status != U_UNSUPPORTED_ERROR)) {
+ log_err("got unexpected error for applyPattern: '%s'\n", u_errorName(status));
+ }
+ }
+
+ {
+ int isLenient = unum_getAttribute(fmt, UNUM_LENIENT_PARSE);
+ log_verbose("lenient: 0x%x\n", isLenient);
+ if (isDecimal ? (isLenient != -1) : (isLenient == TRUE)) {
+ log_err("didn't expect lenient value: %d\n", isLenient);
+ }
+
+ unum_setAttribute(fmt, UNUM_LENIENT_PARSE, TRUE);
+ isLenient = unum_getAttribute(fmt, UNUM_LENIENT_PARSE);
+ if (isDecimal ? (isLenient != -1) : (isLenient == FALSE)) {
+ log_err("didn't expect lenient value after set: %d\n", isLenient);
+ }
+ }
+
+ {
+ double val2;
+ double val = unum_getDoubleAttribute(fmt, UNUM_LENIENT_PARSE);
+ if (val != -1) {
+ log_err("didn't expect double attribute\n");
+ }
+ val = unum_getDoubleAttribute(fmt, UNUM_ROUNDING_INCREMENT);
+ if ((val == -1) == isDecimal) {
+ log_err("didn't expect -1 rounding increment\n");
+ }
+ unum_setDoubleAttribute(fmt, UNUM_ROUNDING_INCREMENT, val+.5);
+ val2 = unum_getDoubleAttribute(fmt, UNUM_ROUNDING_INCREMENT);
+ if (isDecimal && (val2 - val != .5)) {
+ log_err("set rounding increment had no effect on decimal format");
+ }
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ int len = unum_getTextAttribute(fmt, UNUM_DEFAULT_RULESET, buffer, BUFSIZE, &status);
+ if (isDecimal ? (status != U_UNSUPPORTED_ERROR) : U_FAILURE(status)) {
+ log_err("got unexpected error for get default ruleset: '%s'\n", u_errorName(status));
+ }
+ if (U_SUCCESS(status)) {
+ u_austrcpy(temp, buffer);
+ log_verbose("default ruleset: '%s'\n", temp);
+ }
+
+ status = U_ZERO_ERROR;
+ len = unum_getTextAttribute(fmt, UNUM_PUBLIC_RULESETS, buffer, BUFSIZE, &status);
+ if (isDecimal ? (status != U_UNSUPPORTED_ERROR) : U_FAILURE(status)) {
+ log_err("got unexpected error for get public rulesets: '%s'\n", u_errorName(status));
+ }
+ if (U_SUCCESS(status)) {
+ u_austrcpy(temp, buffer);
+ log_verbose("public rulesets: '%s'\n", temp);
+
+ /* set the default ruleset to the first one found, and retry */
+
+ if (len > 0) {
+ for (i = 0; i < len && temp[i] != ';'; ++i){};
+ if (i < len) {
+ buffer[i] = 0;
+ unum_setTextAttribute(fmt, UNUM_DEFAULT_RULESET, buffer, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("unexpected error setting default ruleset: '%s'\n", u_errorName(status));
+ } else {
+ int len2 = unum_getTextAttribute(fmt, UNUM_DEFAULT_RULESET, buffer, BUFSIZE, &status);
+ if (U_FAILURE(status)) {
+ log_err("could not fetch default ruleset: '%s'\n", u_errorName(status));
+ } else if (len2 != i) {
+ u_austrcpy(temp, buffer);
+ log_err("unexpected ruleset len: %d ex: %d val: %s\n", len2, i, temp);
+ } else {
+ for (i = 0; i < sizeof(vals)/sizeof(vals[0]); ++i) {
+ status = U_ZERO_ERROR;
+ unum_formatDouble(fmt, vals[i], buffer, BUFSIZE, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("failed to format: %g, returned %s\n", vals[i], u_errorName(status));
+ } else {
+ u_austrcpy(temp, buffer);
+ log_verbose("formatting %g returned '%s'\n", vals[i], temp);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ unum_toPattern(fmt, FALSE, buffer, BUFSIZE, &status);
+ if (U_SUCCESS(status)) {
+ u_austrcpy(temp, buffer);
+ log_verbose("pattern: '%s'\n", temp);
+ } else if (status != U_BUFFER_OVERFLOW_ERROR) {
+ log_err("toPattern failed unexpectedly: %s\n", u_errorName(status));
+ } else {
+ log_verbose("pattern too long to display\n");
+ }
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ int len = unum_getSymbol(fmt, UNUM_CURRENCY_SYMBOL, buffer, BUFSIZE, &status);
+ if (isDecimal ? U_FAILURE(status) : (status != U_UNSUPPORTED_ERROR)) {
+ log_err("unexpected error getting symbol: '%s'\n", u_errorName(status));
+ }
+
+ unum_setSymbol(fmt, UNUM_CURRENCY_SYMBOL, buffer, len, &status);
+ if (isDecimal ? U_FAILURE(status) : (status != U_UNSUPPORTED_ERROR)) {
+ log_err("unexpected error setting symbol: '%s'\n", u_errorName(status));
+ }
+ }
+}
+
+static void TestNonExistentCurrency() {
+ UNumberFormat *format;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar currencySymbol[8];
+ static const UChar QQQ[] = {0x51, 0x51, 0x51, 0};
+
+ /* Get a non-existent currency and make sure it returns the correct currency code. */
+ format = unum_open(UNUM_CURRENCY, NULL, 0, "th_TH@currency=QQQ", NULL, &status);
+ if (format == NULL || U_FAILURE(status)) {
+ log_err("unum_open did not return expected result for non-existent requested currency: '%s'\n", u_errorName(status));
+ }
+ else {
+ unum_getSymbol(format,
+ UNUM_CURRENCY_SYMBOL,
+ currencySymbol,
+ sizeof(currencySymbol)/sizeof(currencySymbol[0]),
+ &status);
+ if (u_strcmp(currencySymbol, QQQ) != 0) {
+ log_err("unum_open set the currency to QQQ\n");
+ }
+ }
+ unum_close(format);
+}
+
+static void TestRBNFFormat() {
+ UErrorCode status;
+ UParseError perr;
+ UChar pat[1024];
+ UChar tempUChars[512];
+ UNumberFormat *formats[5];
+ int COUNT = sizeof(formats)/sizeof(formats[0]);
+ int i;
+
+ for (i = 0; i < COUNT; ++i) {
+ formats[i] = 0;
+ }
+
+ /* instantiation */
+ status = U_ZERO_ERROR;
+ u_uastrcpy(pat, "#,##0.0#;(#,##0.0#)");
+ formats[0] = unum_open(UNUM_PATTERN_DECIMAL, pat, -1, "en_US", &perr, &status);
+ if (U_FAILURE(status)) {
+ log_err("unable to open decimal pattern");
+ }
+
+ status = U_ZERO_ERROR;
+ formats[1] = unum_open(UNUM_SPELLOUT, NULL, 0, "en_US", &perr, &status);
+ if (U_FAILURE(status)) {
+ log_err("unable to open spellout");
+ }
+
+ status = U_ZERO_ERROR;
+ formats[2] = unum_open(UNUM_ORDINAL, NULL, 0, "en_US", &perr, &status);
+ if (U_FAILURE(status)) {
+ log_err("unable to open ordinal");
+ }
+
+ status = U_ZERO_ERROR;
+ formats[3] = unum_open(UNUM_DURATION, NULL, 0, "en_US", &perr, &status);
+ if (U_FAILURE(status)) {
+ log_err("unable to open duration");
+ }
+
+ status = U_ZERO_ERROR;
+ u_uastrcpy(pat,
+ "%standard:\n"
+ "-x: minus >>;\n"
+ "x.x: << point >>;\n"
+ "zero; one; two; three; four; five; six; seven; eight; nine;\n"
+ "ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen;\n"
+ "seventeen; eighteen; nineteen;\n"
+ "20: twenty[->>];\n"
+ "30: thirty[->>];\n"
+ "40: forty[->>];\n"
+ "50: fifty[->>];\n"
+ "60: sixty[->>];\n"
+ "70: seventy[->>];\n"
+ "80: eighty[->>];\n"
+ "90: ninety[->>];\n"
+ "100: =#,##0=;\n");
+ u_uastrcpy(tempUChars,
+ "%simple:\n"
+ "=%standard=;\n"
+ "20: twenty[ and change];\n"
+ "30: thirty[ and change];\n"
+ "40: forty[ and change];\n"
+ "50: fifty[ and change];\n"
+ "60: sixty[ and change];\n"
+ "70: seventy[ and change];\n"
+ "80: eighty[ and change];\n"
+ "90: ninety[ and change];\n"
+ "100: =#,##0=;\n"
+ "%bogus:\n"
+ "0.x: tiny;\n"
+ "x.x: << point something;\n"
+ "=%standard=;\n"
+ "20: some reasonable number;\n"
+ "100: some substantial number;\n"
+ "100,000,000: some huge number;\n");
+ /* This is to get around some compiler warnings about char * string length. */
+ u_strcat(pat, tempUChars);
+ formats[4] = unum_open(UNUM_PATTERN_RULEBASED, pat, -1, "en_US", &perr, &status);
+ if (U_FAILURE(status)) {
+ log_err("unable to open rulebased pattern");
+ }
+
+ for (i = 0; i < COUNT; ++i) {
+ log_verbose("\n\ntesting format %d\n", i);
+ test_fmt(formats[i], (UBool)(i == 0));
+ }
+
+ for (i = 0; i < COUNT; ++i) {
+ unum_close(formats[i]);
+ }
+}
+
+static void TestCurrencyRegression(void) {
+/*
+ I've found a case where unum_parseDoubleCurrency is not doing what I
+expect. The value I pass in is $1234567890q123460000.00 and this
+returns with a status of zero error & a parse pos of 22 (I would
+expect a parse error at position 11).
+
+I stepped into DecimalFormat::subparse() and it looks like it parses
+the first 10 digits and then stops parsing at the q but doesn't set an
+error. Then later in DecimalFormat::parse() the value gets crammed
+into a long (which greatly truncates the value).
+
+This is very problematic for me 'cause I try to remove chars that are
+invalid but this allows my users to enter bad chars and truncates
+their data!
+*/
+
+ UChar buf[1024];
+ UChar currency[8];
+ char acurrency[16];
+ double d;
+ UNumberFormat *cur;
+ int32_t pos;
+ UErrorCode status = U_ZERO_ERROR;
+ const int32_t expected = 11;
+
+ currency[0]=0;
+ u_uastrcpy(buf, "$1234567890q643210000.00");
+ cur = unum_open(UNUM_CURRENCY, NULL,0,"en_US", NULL, &status);
+
+ if(U_FAILURE(status)) {
+ log_err("unum_open failed: %s\n", u_errorName(status));
+ return;
+ }
+
+ status = U_ZERO_ERROR; /* so we can test it later. */
+ pos = 0;
+
+ d = unum_parseDoubleCurrency(cur,
+ buf,
+ -1,
+ &pos, /* 0 = start */
+ currency,
+ &status);
+
+ u_austrcpy(acurrency, currency);
+
+ if(U_FAILURE(status) || (pos != expected)) {
+ log_err("unum_parseDoubleCurrency should have failed with pos %d, but gave: value %.9f, err %s, pos=%d, currency [%s]\n",
+ expected, d, u_errorName(status), pos, acurrency);
+ } else {
+ log_verbose("unum_parseDoubleCurrency failed, value %.9f err %s, pos %d, currency [%s]\n", d, u_errorName(status), pos, acurrency);
+ }
+
+ unum_close(cur);
+}
+
+static void TestTextAttributeCrash(void) {
+ UChar ubuffer[64] = {0x0049,0x004E,0x0052,0};
+ static const UChar expectedNeg[] = {0x0049,0x004E,0x0052,0x0031,0x0032,0x0033,0x0034,0x002E,0x0035,0};
+ static const UChar expectedPos[] = {0x0031,0x0032,0x0033,0x0034,0x002E,0x0035,0};
+ int32_t used;
+ UErrorCode status = U_ZERO_ERROR;
+ UNumberFormat *nf = unum_open(UNUM_CURRENCY, NULL, 0, "en_US", NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILED 1\n");
+ return;
+ }
+ unum_setTextAttribute(nf, UNUM_CURRENCY_CODE, ubuffer, 3, &status);
+ /*
+ * the usual negative prefix and suffix seem to be '($' and ')' at this point
+ * also crashes if UNUM_NEGATIVE_SUFFIX is substituted for UNUM_NEGATIVE_PREFIX here
+ */
+ used = unum_getTextAttribute(nf, UNUM_NEGATIVE_PREFIX, ubuffer, 64, &status);
+ unum_setTextAttribute(nf, UNUM_NEGATIVE_PREFIX, ubuffer, used, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILED 2\n"); exit(1);
+ }
+ log_verbose("attempting to format...\n");
+ used = unum_formatDouble(nf, -1234.5, ubuffer, 64, NULL, &status);
+ if (U_FAILURE(status) || 64 < used) {
+ log_err("Failed formatting %s\n", u_errorName(status));
+ return;
+ }
+ if (u_strcmp(expectedNeg, ubuffer) == 0) {
+ log_err("Didn't get expected negative result\n");
+ }
+ used = unum_formatDouble(nf, 1234.5, ubuffer, 64, NULL, &status);
+ if (U_FAILURE(status) || 64 < used) {
+ log_err("Failed formatting %s\n", u_errorName(status));
+ return;
+ }
+ if (u_strcmp(expectedPos, ubuffer) == 0) {
+ log_err("Didn't get expected positive result\n");
+ }
+ unum_close(nf);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.h
new file mode 100644
index 00000000000..93851dc733e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cnumtst.h
@@ -0,0 +1,61 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CNUMTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+/* C API TEST FOR NUMBER FORMAT */
+#ifndef _CNUMFRMTST
+#define _CNUMFRMTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "cintltst.h"
+
+
+/**
+ * The function used to test the Number format API
+ **/
+static void TestNumberFormat(void);
+
+/**
+ * The function used to test significant digits in the Number format API
+ **/
+static void TestSignificantDigits(void);
+
+/**
+ * The function used to test the Number format API with padding
+ **/
+static void TestNumberFormatPadding(void);
+
+/**
+ * The function used to test the Number format API with padding
+ **/
+static void TestInt64Format(void);
+
+static void TestNonExistentCurrency(void);
+
+/**
+ * Test RBNF access through unumfmt APIs.
+ **/
+static void TestRBNFFormat(void);
+
+/**
+ * Test some Currency stuff
+ **/
+static void TestCurrencyRegression(void);
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/colutil.c b/Build/source/libs/icu/icu-xetex/test/cintltst/colutil.c
new file mode 100644
index 00000000000..8e9f3609118
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/colutil.c
@@ -0,0 +1,17 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "ucol_imp.h"
+
+#if !UCONFIG_NO_COLLATION
+
+int TestBufferSize(void); /* keep gcc happy */
+
+int TestBufferSize(void)
+{
+ return (U_COL_SAFECLONE_BUFFERSIZE < sizeof(UCollator));
+}
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cposxtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cposxtst.c
new file mode 100644
index 00000000000..8d6d7b67278
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cposxtst.c
@@ -0,0 +1,107 @@
+/*
+**********************************************************************
+* Copyright (c) 2003, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Author: Alan Liu
+* Created: March 20 2003
+* Since: ICU 2.6
+**********************************************************************
+*/
+#include "cintltst.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "unicode/ucat.h"
+#include "unicode/ustring.h"
+
+/**********************************************************************/
+/* Prototypes */
+
+void TestMessageCatalog(void);
+
+/**********************************************************************/
+/* Add our tests into the hierarchy */
+
+void addPosixTest(TestNode** root);
+
+void addPosixTest(TestNode** root)
+{
+ addTest(root, &TestMessageCatalog, "tsutil/cposxtst/TestMessageCatalog");
+}
+
+/**********************************************************************/
+/* Test basic ucat.h API */
+
+void TestMessageCatalog(void) {
+
+ UErrorCode ec = U_ZERO_ERROR;
+ u_nl_catd catd;
+ const char* DATA[] = {
+ /* set_num, msg_num, expected string result, expected error code */
+ "1", "4", "Good morning.", "U_ZERO_ERROR",
+ "1", "5", "Good afternoon.", "U_ZERO_ERROR",
+ "1", "6", "FAIL", "U_MISSING_RESOURCE_ERROR",
+ "1", "7", "Good evening.", "U_ZERO_ERROR",
+ "1", "8", "Good night.", "U_ZERO_ERROR",
+ "1", "9", "FAIL", "U_MISSING_RESOURCE_ERROR",
+ "3", "1", "FAIL", "U_MISSING_RESOURCE_ERROR",
+ "4", "14", "Please ", "U_ZERO_ERROR",
+ "4", "15", "FAIL", "U_MISSING_RESOURCE_ERROR",
+ "4", "19", "Thank you.", "U_ZERO_ERROR",
+ "4", "20", "Sincerely,", "U_ZERO_ERROR",
+ NULL
+ };
+ const UChar FAIL[] = {0x46, 0x41, 0x49, 0x4C, 0x00}; /* "FAIL" */
+ int32_t i;
+ const char *path = loadTestData(&ec);
+
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: loadTestData => %s\n", u_errorName(ec));
+ return;
+ }
+
+ catd = u_catopen(path, "mc", &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: u_catopen => %s\n", u_errorName(ec));
+ return;
+ }
+
+ for (i=0; DATA[i]!=NULL; i+=4) {
+ int32_t set_num = T_CString_stringToInteger(DATA[i], 10);
+ int32_t msg_num = T_CString_stringToInteger(DATA[i+1], 10);
+ UChar exp[128];
+ int32_t len = -1;
+ const char* err;
+ char str[128];
+ const UChar* ustr;
+
+ u_uastrcpy(exp, DATA[i+2]);
+
+ ec = U_ZERO_ERROR;
+ ustr = u_catgets(catd, set_num, msg_num, FAIL, &len, &ec);
+ u_austrcpy(str, ustr);
+ err = u_errorName(ec);
+
+ log_verbose("u_catgets(%d, %d) => \"%s\", len=%d, %s\n",
+ set_num, msg_num, str, len, err);
+
+ if (u_strcmp(ustr, exp) != 0) {
+ log_err("FAIL: u_catgets => \"%s\", exp. \"%s\"\n",
+ str, DATA[i+2]);
+ }
+
+ if (len != (int32_t) uprv_strlen(DATA[i+2])) {
+ log_err("FAIL: u_catgets => len=%d, exp. %d\n",
+ len, uprv_strlen(DATA[i+2]));
+ }
+
+ if (uprv_strcmp(err, DATA[i+3]) != 0) {
+ log_err("FAIL: u_catgets => %s, exp. %s\n",
+ err, DATA[i+3]);
+ }
+ }
+
+ u_catclose(catd);
+}
+
+/*eof*/
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/crestst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/crestst.c
new file mode 100644
index 00000000000..1f5cf321aa3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/crestst.c
@@ -0,0 +1,1014 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*******************************************************************************
+*
+* File CRESTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+* 06/14/99 stephen Updated for RB API changes (no suffix).
+********************************************************************************
+*/
+
+
+#include "unicode/utypes.h"
+#include "cintltst.h"
+#include "unicode/ustring.h"
+#include "cstring.h"
+#include "filestrm.h"
+#include <stdlib.h>
+
+#define RESTEST_HEAP_CHECK 0
+
+#include "unicode/ures.h"
+#include "crestst.h"
+#include "unicode/ctest.h"
+
+#include "ucol_imp.h" /* collation */
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+static void TestOpenDirect(void);
+static void TestFallback(void);
+static void TestTable32(void);
+static void TestFileStream(void);
+/*****************************************************************************/
+
+const UChar kERROR[] = { 0x0045 /*E*/, 0x0052 /*'R'*/, 0x0052 /*'R'*/,
+ 0x004F /*'O'*/, 0x0052/*'R'*/, 0x0000 /*'\0'*/};
+
+/*****************************************************************************/
+
+enum E_Where
+{
+ e_Root,
+ e_te,
+ e_te_IN,
+ e_Where_count
+};
+typedef enum E_Where E_Where;
+/*****************************************************************************/
+
+#define CONFIRM_EQ(actual,expected) if (u_strcmp(expected,actual)==0){ record_pass(); } else { record_fail(); log_err("%s returned %s instead of %s\n", action, austrdup(actual), austrdup(expected)); }
+
+#define CONFIRM_ErrorCode(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); log_err("%s returned %s instead of %s\n", action, myErrorName(actual), myErrorName(expected)); }
+
+
+/* Array of our test objects */
+
+static struct
+{
+ const char* name;
+ UErrorCode expected_constructor_status;
+ E_Where where;
+ UBool like[e_Where_count];
+ UBool inherits[e_Where_count];
+} param[] =
+{
+ /* "te" means test */
+ /* "IN" means inherits */
+ /* "NE" or "ne" means "does not exist" */
+
+ { "root", U_ZERO_ERROR, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } },
+ { "te", U_ZERO_ERROR, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN", U_ZERO_ERROR, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "te_NE", U_USING_FALLBACK_WARNING, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN_NE", U_USING_FALLBACK_WARNING, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "ne", U_USING_DEFAULT_WARNING, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } }
+};
+
+static int32_t bundles_count = sizeof(param) / sizeof(param[0]);
+
+
+
+/***************************************************************************************/
+
+/* Array of our test objects */
+
+void addResourceBundleTest(TestNode** root);
+
+void addResourceBundleTest(TestNode** root)
+{
+ addTest(root, &TestConstruction1, "tsutil/crestst/TestConstruction1");
+ addTest(root, &TestOpenDirect, "tsutil/crestst/TestOpenDirect");
+ addTest(root, &TestResourceBundles, "tsutil/crestst/TestResourceBundles");
+ addTest(root, &TestTable32, "tsutil/crestst/TestTable32");
+ addTest(root, &TestFallback, "tsutil/crestst/TestFallback");
+ addTest(root, &TestAliasConflict, "tsutil/crestst/TestAliasConflict");
+ addTest(root, &TestFileStream, "tsutil/crestst/TestFileStream");
+ addTest(root, &TestGetSize, "tsutil/crestst/TestGetSize");
+ addTest(root, &TestGetLocaleByType, "tsutil/crestst/TestGetLocaleByType");
+}
+
+
+/***************************************************************************************/
+void TestAliasConflict(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *he = NULL;
+ UResourceBundle *iw = NULL;
+ const UChar *result = NULL;
+ int32_t resultLen;
+
+ he = ures_open(NULL, "he", &status);
+ iw = ures_open(NULL, "iw", &status);
+ if(U_FAILURE(status)) {
+ log_err("Failed to get resource with %s\n", myErrorName(status));
+ }
+ ures_close(iw);
+ result = ures_getStringByKey(he, "ExemplarCharacters", &resultLen, &status);
+ if(U_FAILURE(status) || result == NULL) {
+ log_err("Failed to get resource with %s\n", myErrorName(status));
+ }
+ ures_close(he);
+}
+
+
+void TestResourceBundles()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ testTag("only_in_Root", TRUE, FALSE, FALSE);
+ testTag("in_Root_te", TRUE, TRUE, FALSE);
+ testTag("in_Root_te_te_IN", TRUE, TRUE, TRUE);
+ testTag("in_Root_te_IN", TRUE, FALSE, TRUE);
+ testTag("only_in_te", FALSE, TRUE, FALSE);
+ testTag("only_in_te_IN", FALSE, FALSE, TRUE);
+ testTag("in_te_te_IN", FALSE, TRUE, TRUE);
+ testTag("nonexistent", FALSE, FALSE, FALSE);
+
+ log_verbose("Passed:= %d Failed= %d \n", pass, fail);
+}
+
+void TestConstruction1()
+{
+ UResourceBundle *test1 = 0, *test2 = 0;
+ const UChar *result1, *result2;
+ int32_t resultLen;
+ UChar temp[7];
+
+ UErrorCode err = U_ZERO_ERROR;
+ const char* testdatapath ;
+ const char* locale="te_IN";
+
+ log_verbose("Testing ures_open()......\n");
+
+
+ testdatapath=loadTestData(&err);
+ if(U_FAILURE(err))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(err));
+ return;
+ }
+
+ test1=ures_open(testdatapath, NULL, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("construction of %s did not succeed : %s \n",NULL, myErrorName(err));
+ return;
+ }
+
+
+ test2=ures_open(testdatapath, locale, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("construction of %s did not succeed : %s \n",locale, myErrorName(err));
+ return;
+ }
+ result1= ures_getStringByKey(test1, "string_in_Root_te_te_IN", &resultLen, &err);
+ result2= ures_getStringByKey(test2, "string_in_Root_te_te_IN", &resultLen, &err);
+
+
+ if (U_FAILURE(err)) {
+ log_err("Something threw an error in TestConstruction(): %s\n", myErrorName(err));
+ return;
+ }
+
+ u_uastrcpy(temp, "TE_IN");
+
+ if(u_strcmp(result2, temp)!=0)
+ {
+ int n;
+
+ log_err("Construction test failed for ures_open();\n");
+ if(!VERBOSITY)
+ log_info("(run verbose for more information)\n");
+
+ log_verbose("\nGot->");
+ for(n=0;result2[n];n++)
+ {
+ log_verbose("%04X ",result2[n]);
+ }
+ log_verbose("<\n");
+
+ log_verbose("\nWant>");
+ for(n=0;temp[n];n++)
+ {
+ log_verbose("%04X ",temp[n]);
+ }
+ log_verbose("<\n");
+
+ }
+
+ log_verbose("for string_in_Root_te_te_IN, default.txt had %s\n", austrdup(result1));
+ log_verbose("for string_in_Root_te_te_IN, te_IN.txt had %s\n", austrdup(result2));
+
+ /* Test getVersionNumber*/
+ log_verbose("Testing version number\n");
+ log_verbose("for getVersionNumber : %s\n", ures_getVersionNumber(test1));
+
+ ures_close(test1);
+ ures_close(test2);
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+
+UBool testTag(const char* frag,
+ UBool in_Root,
+ UBool in_te,
+ UBool in_te_IN)
+{
+ int32_t passNum=pass;
+
+ /* Make array from input params */
+
+ UBool is_in[3];
+ const char *NAME[] = { "ROOT", "TE", "TE_IN" };
+
+ /* Now try to load the desired items */
+ UResourceBundle* theBundle = NULL;
+ char tag[99];
+ char action[256];
+ UErrorCode status = U_ZERO_ERROR,expected_resource_status = U_ZERO_ERROR;
+ UChar* base = NULL;
+ UChar* expected_string = NULL;
+ const UChar* string = NULL;
+ char item_tag[10];
+ int32_t i,j;
+ int32_t actual_bundle;
+ int32_t resultLen;
+ const char *testdatapath = loadTestData(&status);
+
+ is_in[0] = in_Root;
+ is_in[1] = in_te;
+ is_in[2] = in_te_IN;
+
+ strcpy(item_tag, "tag");
+
+ status = U_ZERO_ERROR;
+ theBundle = ures_open(testdatapath, "root", &status);
+ if(U_FAILURE(status))
+ {
+ ures_close(theBundle);
+ log_err("Couldn't open root bundle in %s", testdatapath);
+ return FALSE;
+ }
+ ures_close(theBundle);
+ theBundle = NULL;
+
+
+ for (i=0; i<bundles_count; ++i)
+ {
+ strcpy(action,"construction for");
+ strcat(action, param[i].name);
+
+
+ status = U_ZERO_ERROR;
+
+ theBundle = ures_open(testdatapath, param[i].name, &status);
+ /*theBundle = ures_open("c:\\icu\\icu\\source\\test\\testdata\\testdata", param[i].name, &status);*/
+
+ CONFIRM_ErrorCode(status,param[i].expected_constructor_status);
+
+
+
+ if(i == 5)
+ actual_bundle = 0; /* ne -> default */
+ else if(i == 3)
+ actual_bundle = 1; /* te_NE -> te */
+ else if(i == 4)
+ actual_bundle = 2; /* te_IN_NE -> te_IN */
+ else
+ actual_bundle = i;
+
+ expected_resource_status = U_MISSING_RESOURCE_ERROR;
+ for (j=e_te_IN; j>=e_Root; --j)
+ {
+ if (is_in[j] && param[i].inherits[j])
+ {
+
+ if(j == actual_bundle) /* it's in the same bundle OR it's a nonexistent=default bundle (5) */
+ expected_resource_status = U_ZERO_ERROR;
+ else if(j == 0)
+ expected_resource_status = U_USING_DEFAULT_WARNING;
+ else
+ expected_resource_status = U_USING_FALLBACK_WARNING;
+
+ log_verbose("%s[%d]::%s: in<%d:%s> inherits<%d:%s>. actual_bundle=%s\n",
+ param[i].name,
+ i,
+ frag,
+ j,
+ is_in[j]?"Yes":"No",
+ j,
+ param[i].inherits[j]?"Yes":"No",
+ param[actual_bundle].name);
+
+ break;
+ }
+ }
+
+ for (j=param[i].where; j>=0; --j)
+ {
+ if (is_in[j])
+ {
+ if(base != NULL) {
+ free(base);
+ base = NULL;
+ }
+
+ base=(UChar*)malloc(sizeof(UChar)*(strlen(NAME[j]) + 1));
+ u_uastrcpy(base,NAME[j]);
+
+ break;
+ }
+ else {
+ if(base != NULL) {
+ free(base);
+ base = NULL;
+ }
+ base = (UChar*) malloc(sizeof(UChar) * 1);
+ *base = 0x0000;
+ }
+ }
+
+ /*-------------------------------------------------------------------- */
+ /* string */
+
+ strcpy(tag,"string_");
+ strcat(tag,frag);
+
+ strcpy(action,param[i].name);
+ strcat(action, ".ures_get(" );
+ strcat(action,tag);
+ strcat(action, ")");
+
+ string= kERROR;
+
+ status = U_ZERO_ERROR;
+
+ ures_getStringByKey(theBundle, tag, &resultLen, &status);
+ if(U_SUCCESS(status))
+ {
+ status = U_ZERO_ERROR;
+ string=ures_getStringByKey(theBundle, tag, &resultLen, &status);
+ }
+
+ log_verbose("%s got %d, expected %d\n", action, status, expected_resource_status);
+
+ CONFIRM_ErrorCode(status, expected_resource_status);
+
+
+ if(U_SUCCESS(status)){
+ expected_string=(UChar*)malloc(sizeof(UChar)*(u_strlen(base) + 3));
+ u_strcpy(expected_string,base);
+
+ }
+ else
+ {
+ expected_string = (UChar*)malloc(sizeof(UChar)*(u_strlen(kERROR) + 1));
+ u_strcpy(expected_string,kERROR);
+
+ }
+
+ CONFIRM_EQ(string, expected_string);
+
+ free(expected_string);
+ ures_close(theBundle);
+ }
+ free(base);
+ return (UBool)(passNum == pass);
+}
+
+void record_pass()
+{
+ ++pass;
+}
+
+void record_fail()
+{
+ ++fail;
+}
+
+/**
+ * Test to make sure that the U_USING_FALLBACK_ERROR and U_USING_DEFAULT_ERROR
+ * are set correctly
+ */
+
+static void TestFallback()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *fr_FR = NULL;
+ UResourceBundle *subResource = NULL;
+ const UChar *junk; /* ignored */
+ int32_t resultLen;
+
+ log_verbose("Opening fr_FR..");
+ fr_FR = ures_open(NULL, "fr_FR", &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Couldn't open fr_FR - %d\n", status);
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+
+
+ /* clear it out.. just do some calls to get the gears turning */
+ junk = ures_getStringByKey(fr_FR, "LocaleID", &resultLen, &status);
+ status = U_ZERO_ERROR;
+ junk = ures_getStringByKey(fr_FR, "LocaleString", &resultLen, &status);
+ status = U_ZERO_ERROR;
+ junk = ures_getStringByKey(fr_FR, "LocaleID", &resultLen, &status);
+ status = U_ZERO_ERROR;
+
+ /* OK first one. This should be a Default value. */
+ subResource = ures_getByKey(fr_FR, "MeasurementSystem", NULL, &status);
+ if(status != U_USING_DEFAULT_WARNING)
+ {
+ log_data_err("Expected U_USING_DEFAULT_ERROR when trying to get CurrencyMap from fr_FR, got %s\n",
+ u_errorName(status));
+ }
+ ures_close(subResource);
+ status = U_ZERO_ERROR;
+
+ /* and this is a Fallback, to fr */
+ junk = ures_getStringByKey(fr_FR, "Countries", &resultLen, &status);
+ if(status != U_USING_FALLBACK_WARNING)
+ {
+ log_data_err("Expected U_USING_FALLBACK_ERROR when trying to get Countries from fr_FR, got %s\n",
+ u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+
+ ures_close(fr_FR);
+}
+
+static void
+TestOpenDirect(void) {
+ UResourceBundle *idna_rules, *casing, *te_IN, *ne, *item;
+ UErrorCode errorCode;
+
+ /*
+ * test that ures_openDirect() opens a resource bundle
+ * where one can look up its own items but not fallback items
+ * from root or similar
+ */
+ errorCode=U_ZERO_ERROR;
+ idna_rules=ures_openDirect(loadTestData(&errorCode), "idna_rules", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ures_openDirect(\"idna_rules\") failed: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ if(0!=uprv_strcmp("idna_rules", ures_getLocale(idna_rules, &errorCode))) {
+ log_err("ures_openDirect(\"idna_rules\").getLocale()!=idna_rules\n");
+ }
+ errorCode=U_ZERO_ERROR;
+
+ /* try an item in idna_rules, must work */
+ item=ures_getByKey(idna_rules, "UnassignedSet", NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("translit_index.getByKey(local key) failed: %s\n", u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ } else {
+ ures_close(item);
+ }
+
+ /* try an item in root, must fail */
+ item=ures_getByKey(idna_rules, "ShortLanguage", NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errorCode=U_ZERO_ERROR;
+ } else {
+ log_err("idna_rules.getByKey(root key) succeeded!\n");
+ ures_close(item);
+ }
+ ures_close(idna_rules);
+
+ /* now make sure that "idna_rules" will not work with ures_open() */
+ errorCode=U_ZERO_ERROR;
+ idna_rules=ures_open("testdata", "idna_rules", &errorCode);
+ if(U_FAILURE(errorCode) || errorCode==U_USING_DEFAULT_WARNING || errorCode==U_USING_FALLBACK_WARNING) {
+ /* falling back to default or root is ok */
+ errorCode=U_ZERO_ERROR;
+ } else if(0!=uprv_strcmp("idna_rules", ures_getLocale(idna_rules, &errorCode))) {
+ /* Opening this file will work in "files mode" on Windows and the Mac,
+ which have case insensitive file systems */
+ log_err("ures_open(\"idna_rules\") succeeded, should fail! Got: %s\n", u_errorName(errorCode));
+ }
+ ures_close(idna_rules);
+
+ /* ures_openDirect("translit_index_WronG") must fail */
+ idna_rules=ures_openDirect(NULL, "idna_rules_WronG", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errorCode=U_ZERO_ERROR;
+ } else {
+ log_err("ures_openDirect(\"idna_rules_WronG\") succeeded, should fail!\n");
+ }
+ ures_close(idna_rules);
+
+ errorCode = U_USING_FALLBACK_WARNING;;
+ idna_rules=ures_openDirect("testdata", "idna_rules", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ures_openDirect(\"idna_rules\") failed when U_USING_FALLBACK_WARNING was set prior to call: %s\n", u_errorName(errorCode));
+ return;
+ }
+ ures_close(idna_rules);
+
+ /*
+ * ICU 3.6 has new resource bundle syntax and data for bundles that do not
+ * participate in locale fallback. Now,
+ * - ures_open() works like ures_openDirect() on a bundle with a top-level
+ * type of ":table(nofallback)" _if_ the bundle exists
+ * - ures_open() will continue to find a root bundle if the requested one
+ * does not exist, unlike ures_openDirect()
+ *
+ * Test with a different bundle than above to avoid confusion in the cache.
+ */
+
+ /*
+ * verify that ures_open("casing"), which now has a nofallback declaration,
+ * does not enable fallbacks
+ */
+ errorCode=U_ZERO_ERROR;
+ casing=ures_open("testdata", "casing", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ures_open(\"casing\") failed: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ item=ures_getByKey(casing, "Info", NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("casing.getByKey(Info) failed - %s\n", u_errorName(errorCode));
+ } else {
+ ures_close(item);
+ }
+
+ errorCode=U_ZERO_ERROR;
+ item=ures_getByKey(casing, "ShortLanguage", NULL, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ log_err("casing.getByKey(root key) succeeded despite nofallback declaration - %s\n", u_errorName(errorCode));
+ ures_close(item);
+ }
+ ures_close(casing);
+
+ /*
+ * verify that ures_open("ne") finds the root bundle but
+ * ures_openDirect("ne") does not
+ */
+ errorCode=U_ZERO_ERROR;
+ ne=ures_open("testdata", "ne", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ures_open(\"ne\") failed (expected to get root): %s\n", u_errorName(errorCode));
+ }
+ if(errorCode!=U_USING_DEFAULT_WARNING || 0!=uprv_strcmp("root", ures_getLocale(ne, &errorCode))) {
+ log_err("ures_open(\"ne\") found something other than \"root\" - %s\n", u_errorName(errorCode));
+ }
+ ures_close(ne);
+
+ errorCode=U_ZERO_ERROR;
+ ne=ures_openDirect("testdata", "ne", &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ log_err("ures_openDirect(\"ne\") succeeded unexpectedly\n");
+ ures_close(ne);
+ }
+
+ /* verify that ures_openDirect("te_IN") does not enable fallbacks */
+ errorCode=U_ZERO_ERROR;
+ te_IN=ures_openDirect("testdata", "te_IN", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ures_open(\"te_IN\") failed: %s\n", u_errorName(errorCode));
+ return;
+ }
+ errorCode=U_ZERO_ERROR;
+ item=ures_getByKey(te_IN, "ShortLanguage", NULL, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ log_err("te_IN.getByKey(root key) succeeded despite use of ures_openDirect() - %s\n", u_errorName(errorCode));
+ ures_close(item);
+ }
+ ures_close(te_IN);
+}
+
+static int32_t
+parseTable32Key(const char *key) {
+ int32_t number;
+ char c;
+
+ number=0;
+ while((c=*key++)!=0) {
+ number<<=1;
+ if(c=='1') {
+ number|=1;
+ }
+ }
+ return number;
+}
+
+static void
+TestTable32(void) {
+ static const struct {
+ const char *key;
+ int32_t number;
+ } testcases[]={
+ { "ooooooooooooooooo", 0 },
+ { "oooooooooooooooo1", 1 },
+ { "ooooooooooooooo1o", 2 },
+ { "oo11ooo1ooo11111o", 25150 },
+ { "oo11ooo1ooo111111", 25151 },
+ { "o1111111111111111", 65535 },
+ { "1oooooooooooooooo", 65536 },
+ { "1ooooooo11o11ooo1", 65969 },
+ { "1ooooooo11o11oo1o", 65970 },
+ { "1ooooooo111oo1111", 65999 }
+ };
+
+ /* ### TODO UResourceBundle staticItem={ 0 }; - need to know the size */
+ UResourceBundle *res, *item;
+ const UChar *s;
+ const char *key;
+ UErrorCode errorCode;
+ int32_t i, j, number, parsedNumber, length, count;
+
+ errorCode=U_ZERO_ERROR;
+ res=ures_open(loadTestData(&errorCode), "testtable32", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("unable to open testdata/testtable32.res - %s\n", u_errorName(errorCode));
+ return;
+ }
+ if(ures_getType(res)!=URES_TABLE) {
+ log_data_err("testdata/testtable32.res has type %d instead of URES_TABLE\n", ures_getType(res));
+ }
+
+ count=ures_getSize(res);
+ if(count!=66000) {
+ log_err("testdata/testtable32.res should have 66000 entries but has %d\n", count);
+ }
+
+ /* get the items by index */
+ item=NULL;
+ for(i=0; i<count; ++i) {
+ item=ures_getByIndex(res, i, item, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to get item %d of %d in testdata/testtable32.res - %s\n",
+ i, count, u_errorName(errorCode));
+ break;
+ }
+
+ key=ures_getKey(item);
+ parsedNumber=parseTable32Key(key);
+
+ switch(ures_getType(item)) {
+ case URES_STRING:
+ s=ures_getString(item, &length, &errorCode);
+ if(U_FAILURE(errorCode) || s==NULL) {
+ log_err("unable to access the string \"%s\" at %d in testdata/testtable32.res - %s\n",
+ key, i, u_errorName(errorCode));
+ number=-1;
+ } else {
+ j=0;
+ U16_NEXT(s, j, length, number);
+ }
+ break;
+ case URES_INT:
+ number=ures_getInt(item, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to access the integer \"%s\" at %d in testdata/testtable32.res - %s\n",
+ key, i, u_errorName(errorCode));
+ number=-1;
+ }
+ break;
+ default:
+ log_err("unexpected resource type %d for \"%s\" at %d in testdata/testtable32.res - %s\n",
+ ures_getType(item), key, i, u_errorName(errorCode));
+ number=-1;
+ break;
+ }
+
+ if(number>=0 && number!=parsedNumber) {
+ log_err("\"%s\" at %d in testdata/testtable32.res has a string/int value of %d, expected %d\n",
+ key, i, number, parsedNumber);
+ }
+ }
+
+ /* search for some items by key */
+ for(i=0; i<LENGTHOF(testcases); ++i) {
+ item=ures_getByKey(res, testcases[i].key, item, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to find the key \"%s\" in testdata/testtable32.res - %s\n",
+ testcases[i].key, u_errorName(errorCode));
+ continue;
+ }
+
+ switch(ures_getType(item)) {
+ case URES_STRING:
+ s=ures_getString(item, &length, &errorCode);
+ if(U_FAILURE(errorCode) || s==NULL) {
+ log_err("unable to access the string \"%s\" in testdata/testtable32.res - %s\n",
+ testcases[i].key, u_errorName(errorCode));
+ number=-1;
+ } else {
+ j=0;
+ U16_NEXT(s, j, length, number);
+ }
+ break;
+ case URES_INT:
+ number=ures_getInt(item, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to access the integer \"%s\" in testdata/testtable32.res - %s\n",
+ testcases[i].key, u_errorName(errorCode));
+ number=-1;
+ }
+ break;
+ default:
+ log_err("unexpected resource type %d for \"%s\" in testdata/testtable32.res - %s\n",
+ ures_getType(item), testcases[i].key, u_errorName(errorCode));
+ number=-1;
+ break;
+ }
+
+ if(number>=0 && number!=testcases[i].number) {
+ log_err("\"%s\" in testdata/testtable32.res has a string/int value of %d, expected %d\n",
+ testcases[i].key, number, testcases[i].number);
+ }
+
+ key=ures_getKey(item);
+ if(0!=uprv_strcmp(key, testcases[i].key)) {
+ log_err("\"%s\" in testdata/testtable32.res claims to have the key \"%s\"\n",
+ testcases[i].key, key);
+ }
+ }
+
+ ures_close(item);
+ ures_close(res);
+}
+
+static void TestFileStream(void){
+ int32_t c = 0;
+ int32_t c1=0;
+ UErrorCode status = U_ZERO_ERROR;
+ const char* testdatapath = loadTestData(&status);
+ char* fileName = (char*) malloc(uprv_strlen(testdatapath) +10);
+ FileStream* stream = NULL;
+ /* these should not be closed */
+ FileStream* pStdin = T_FileStream_stdin();
+ FileStream* pStdout = T_FileStream_stdout();
+ FileStream* pStderr = T_FileStream_stderr();
+
+ const char* testline = "This is a test line";
+ int32_t bufLen = (int32_t)strlen(testline)+10;
+ char* buf = (char*) malloc(bufLen);
+ int32_t retLen = 0;
+
+ if(pStdin==NULL){
+ log_err("failed to get T_FileStream_stdin()");
+ }
+ if(pStdout==NULL){
+ log_err("failed to get T_FileStream_stdout()");
+ }
+ if(pStderr==NULL){
+ log_err("failed to get T_FileStream_stderr()");
+ }
+
+ uprv_strcpy(fileName,testdatapath);
+ uprv_strcat(fileName,".dat");
+ stream = T_FileStream_open(fileName, "r");
+ if(stream==NULL){
+ log_data_err("T_FileStream_open failed to open %s\n",fileName);
+ } else {
+ if(!T_FileStream_file_exists(fileName)){
+ log_data_err("T_FileStream_file_exists failed to verify existence of %s \n",fileName);
+ }
+
+ retLen=T_FileStream_read(stream,&c,1);
+ if(retLen==0){
+ log_data_err("T_FileStream_read failed to read from %s \n",fileName);
+ }
+ retLen=0;
+ T_FileStream_rewind(stream);
+ T_FileStream_read(stream,&c1,1);
+ if(c!=c1){
+ log_data_err("T_FileStream_rewind failed to rewind %s \n",fileName);
+ }
+ T_FileStream_rewind(stream);
+ c1 = T_FileStream_peek(stream);
+ if(c!=c1){
+ log_data_err("T_FileStream_peek failed to peekd %s \n",fileName);
+ }
+ c = T_FileStream_getc(stream);
+ T_FileStream_ungetc(c,stream);
+ if(c!= T_FileStream_getc(stream)){
+ log_data_err("T_FileStream_ungetc failed to d %s \n",fileName);
+ }
+
+ if(T_FileStream_size(stream)<=0){
+ log_data_err("T_FileStream_size failed to d %s \n",fileName);
+ }
+ if(T_FileStream_error(stream)){
+ log_data_err("T_FileStream_error shouldn't have an error %s\n",fileName);
+ }
+ if(!T_FileStream_error(NULL)){
+ log_err("T_FileStream_error didn't get an error %s\n",fileName);
+ }
+ T_FileStream_putc(stream, 0x20);
+ if(!T_FileStream_error(stream)){
+ /*
+ Warning
+ writing to a read-only file may not consistently fail on all platforms
+ (e.g. HP-UX, FreeBSD, MacOSX)
+ */
+ log_verbose("T_FileStream_error didn't get an error when writing to a readonly file %s\n",fileName);
+ }
+
+ T_FileStream_close(stream);
+ }
+ /* test writing function */
+ stream=NULL;
+ uprv_strcpy(fileName,testdatapath);
+ uprv_strcat(fileName,".tmp");
+ stream = T_FileStream_open(fileName,"w+");
+
+ if(stream == NULL){
+ log_data_err("Could not open %s for writing\n",fileName);
+ } else {
+ c= '$';
+ T_FileStream_putc(stream,c);
+ T_FileStream_rewind(stream);
+ if(c != T_FileStream_getc(stream)){
+ log_data_err("T_FileStream_putc failed %s\n",fileName);
+ }
+
+ T_FileStream_rewind(stream);
+ T_FileStream_writeLine(stream,testline);
+ T_FileStream_rewind(stream);
+ T_FileStream_readLine(stream,buf,bufLen);
+ if(uprv_strncmp(testline, buf,uprv_strlen(buf))!=0){
+ log_data_err("T_FileStream_writeLine failed %s\n",fileName);
+ }
+
+ T_FileStream_rewind(stream);
+ T_FileStream_write(stream,testline,(int32_t)strlen(testline));
+ T_FileStream_rewind(stream);
+ retLen = T_FileStream_read(stream, buf, bufLen);
+ if(uprv_strncmp(testline, buf,retLen)!=0){
+ log_data_err("T_FileStream_write failed %s\n",fileName);
+ }
+
+ T_FileStream_close(stream);
+ }
+ if(!T_FileStream_remove(fileName)){
+ log_data_err("T_FileStream_remove failed to delete %s\n",fileName);
+ }
+
+
+ free(fileName);
+ free(buf);
+
+}
+
+static void TestGetSize(void) {
+ const struct {
+ const char* key;
+ int32_t size;
+ } test[] = {
+ { "zerotest", 1},
+ { "one", 1},
+ { "importtest", 1},
+ { "integerarray", 1},
+ { "emptyarray", 0},
+ { "emptytable", 0},
+ { "emptystring", 1}, /* empty string is still a string */
+ { "emptyint", 1},
+ { "emptybin", 1},
+ { "testinclude", 1},
+ { "collations", 1}, /* not 2 - there is hidden %%CollationBin */
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ UResourceBundle *rb = NULL;
+ UResourceBundle *res = NULL;
+ UResourceBundle *helper = NULL;
+ const char* testdatapath = loadTestData(&status);
+ int32_t i = 0, j = 0;
+ int32_t size = 0;
+
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s\n", u_errorName(status));
+ return;
+ }
+
+ rb = ures_open(testdatapath, "testtypes", &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not testtypes resource bundle %s\n", u_errorName(status));
+ return;
+ }
+
+ for(i = 0; i < sizeof(test)/sizeof(test[0]); i++) {
+ res = ures_getByKey(rb, test[i].key, res, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Couldn't find the key %s. Error: %s\n", test[i].key, u_errorName(status));
+ ures_close(rb);
+ return;
+ }
+ size = ures_getSize(res);
+ if(size != test[i].size) {
+ log_err("Expected size %i, got size %i for key %s\n", test[i].size, size, test[i].key);
+ for(j = 0; j < size; j++) {
+ helper = ures_getByIndex(res, j, helper, &status);
+ log_err("%s\n", ures_getKey(helper));
+ }
+ }
+ }
+ ures_close(helper);
+ ures_close(res);
+ ures_close(rb);
+}
+
+static void TestGetLocaleByType(void) {
+ static const struct {
+ const char *requestedLocale;
+ const char *resourceKey;
+ const char *validLocale;
+ const char *actualLocale;
+ } test[] = {
+ { "te_IN_BLAH", "string_only_in_te_IN", "te_IN", "te_IN" },
+ { "te_IN_BLAH", "string_only_in_te", "te_IN", "te" },
+ { "te_IN_BLAH", "string_only_in_Root", "te_IN", "root" },
+ { "te_IN_BLAH_01234567890_01234567890_01234567890_01234567890_01234567890_01234567890", "array_2d_only_in_Root", "te_IN", "root" },
+ { "te_IN_BLAH@currency=euro", "array_2d_only_in_te_IN", "te_IN", "te_IN" },
+ { "te_IN_BLAH@collation=phonebook;calendar=thai", "array_2d_only_in_te", "te_IN", "te" }
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ UResourceBundle *rb = NULL;
+ UResourceBundle *res = NULL;
+ const char* testdatapath = loadTestData(&status);
+ int32_t i = 0;
+ const char *locale = NULL;
+
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s\n", u_errorName(status));
+ return;
+ }
+
+ for(i = 0; i < sizeof(test)/sizeof(test[0]); i++) {
+ rb = ures_open(testdatapath, test[i].requestedLocale, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not open resource bundle %s (error %s)\n", test[i].requestedLocale, u_errorName(status));
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ res = ures_getByKey(rb, test[i].resourceKey, res, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Couldn't find the key %s. Error: %s\n", test[i].resourceKey, u_errorName(status));
+ ures_close(rb);
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ locale = ures_getLocaleByType(res, ULOC_REQUESTED_LOCALE, &status);
+ if(locale) {
+ log_err("Requested locale should return NULL\n");
+ }
+ locale = ures_getLocaleByType(res, ULOC_VALID_LOCALE, &status);
+ if(!locale || strcmp(locale, test[i].validLocale) != 0) {
+ log_err("Expected valid locale to be %s. Got %s\n", test[i].requestedLocale, locale);
+ }
+ locale = ures_getLocaleByType(res, ULOC_ACTUAL_LOCALE, &status);
+ if(!locale || strcmp(locale, test[i].actualLocale) != 0) {
+ log_err("Expected actual locale to be %s. Got %s\n", test[i].requestedLocale, locale);
+ }
+ ures_close(rb);
+ }
+ ures_close(res);
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/crestst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/crestst.h
new file mode 100644
index 00000000000..de11a959ddd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/crestst.h
@@ -0,0 +1,55 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CRESTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************
+*/
+#ifndef _CRESTST
+#define _CRESTST
+/* C API TEST FOR RESOURCEBUNDLE */
+#include "cintltst.h"
+
+
+
+
+ void addTestResourceBundleTest(TestNode**);
+
+ /**
+ * Perform several extensive tests using the subtest routine testTag
+ */
+ void TestResourceBundles(void);
+ /**
+ * Test construction of ResourceBundle accessing a custom test resource-file
+ */
+ void TestConstruction1(void);
+
+ void TestConstruction2(void);
+
+ void TestAliasConflict(void);
+
+ static void TestGetSize(void);
+
+ static void TestGetLocaleByType(void);
+
+ /**
+ * extensive subtests called by TestResourceBundles
+ **/
+
+ UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN);
+
+ void record_pass(void);
+ void record_fail(void);
+
+
+ int32_t pass;
+ int32_t fail;
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/creststn.c b/Build/source/libs/icu/icu-xetex/test/cintltst/creststn.c
new file mode 100644
index 00000000000..159235d4755
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/creststn.c
@@ -0,0 +1,2950 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*******************************************************************************
+*
+* File CRESTST.C
+*
+* Modification History:
+* Name Date Description
+* Madhu Katragadda 05/09/2000 Ported Tests for New ResourceBundle API
+* Madhu Katragadda 05/24/2000 Added new tests to test RES_BINARY for collationElements
+********************************************************************************
+*/
+
+
+#include <time.h>
+#include "unicode/utypes.h"
+#include "cintltst.h"
+#include "unicode/putil.h"
+#include "unicode/ustring.h"
+#include "unicode/ucnv.h"
+#include "string.h"
+#include "cstring.h"
+#include "unicode/uchar.h"
+#include "ucol_imp.h" /* for U_ICUDATA_COLL */
+#include "ubrkimpl.h" /* for U_ICUDATA_BRKITR */
+#define RESTEST_HEAP_CHECK 0
+
+#include "unicode/uloc.h"
+#include "uresimp.h"
+#include "creststn.h"
+#include "unicode/ctest.h"
+#include "ucbuf.h"
+static int32_t pass;
+static int32_t fail;
+
+/*****************************************************************************/
+/**
+ * Return a random unsigned long l where 0N <= l <= ULONG_MAX.
+ */
+
+static uint32_t
+randul()
+{
+ uint32_t l=0;
+ int32_t i;
+ static UBool initialized = FALSE;
+ if (!initialized)
+ {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+ /* Assume rand has at least 12 bits of precision */
+
+ for (i=0; i<sizeof(l); ++i)
+ ((char*)&l)[i] = (char)((rand() & 0x0FF0) >> 4);
+ return l;
+}
+
+/**
+ * Return a random double x where 0.0 <= x < 1.0.
+ */
+static double
+randd()
+{
+ return ((double)randul()) / UINT32_MAX;
+}
+
+/**
+ * Return a random integer i where 0 <= i < n.
+ */
+static int32_t randi(int32_t n)
+{
+ return (int32_t)(randd() * n);
+}
+/***************************************************************************************/
+/**
+ * Convert an integer, positive or negative, to a character string radix 10.
+ */
+static char*
+itoa1(int32_t i, char* buf)
+{
+ char *p = 0;
+ char* result = buf;
+ /* Handle negative */
+ if(i < 0) {
+ *buf++ = '-';
+ i = -i;
+ }
+
+ /* Output digits in reverse order */
+ p = buf;
+ do {
+ *p++ = (char)('0' + (i % 10));
+ i /= 10;
+ }
+ while(i);
+ *p-- = 0;
+
+ /* Reverse the string */
+ while(buf < p) {
+ char c = *buf;
+ *buf++ = *p;
+ *p-- = c;
+ }
+
+ return result;
+}
+static const int32_t kERROR_COUNT = -1234567;
+static const UChar kERROR[] = { 0x0045 /*E*/, 0x0052 /*'R'*/, 0x0052 /*'R'*/,
+ 0x004F /*'O'*/, 0x0052/*'R'*/, 0x0000 /*'\0'*/};
+
+/*****************************************************************************/
+
+enum E_Where
+{
+ e_Root,
+ e_te,
+ e_te_IN,
+ e_Where_count
+};
+typedef enum E_Where E_Where;
+/*****************************************************************************/
+
+#define CONFIRM_EQ(actual,expected) if (u_strcmp(expected,actual)==0){ record_pass(); } else { record_fail(); log_err("%s returned %s instead of %s\n", action, austrdup(actual), austrdup(expected)); }
+#define CONFIRM_INT_EQ(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); log_err("%s returned %d instead of %d\n", action, actual, expected); }
+#define CONFIRM_INT_GE(actual,expected) if ((actual)>=(expected)) { record_pass(); } else { record_fail(); log_err("%s returned %d instead of x >= %d\n", action, actual, expected); }
+#define CONFIRM_INT_NE(actual,expected) if ((expected)!=(actual)) { record_pass(); } else { record_fail(); log_err("%s returned %d instead of x != %d\n", action, actual, expected); }
+/*#define CONFIRM_ErrorCode(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); log_err("%s returned %s instead of %s\n", action, myErrorName(actual), myErrorName(expected)); } */
+static void
+CONFIRM_ErrorCode(UErrorCode actual,UErrorCode expected)
+{
+ if ((expected)==(actual))
+ {
+ record_pass();
+ } else {
+ record_fail();
+ /*log_err("%s returned %s instead of %s\n", action, myErrorName(actual), myErrorName(expected)); */
+ log_err("returned %s instead of %s\n", myErrorName(actual), myErrorName(expected));
+ }
+}
+
+
+/* Array of our test objects */
+
+static struct
+{
+ const char* name;
+ UErrorCode expected_constructor_status;
+ E_Where where;
+ UBool like[e_Where_count];
+ UBool inherits[e_Where_count];
+}
+param[] =
+{
+ /* "te" means test */
+ /* "IN" means inherits */
+ /* "NE" or "ne" means "does not exist" */
+
+ { "root", U_ZERO_ERROR, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } },
+ { "te", U_ZERO_ERROR, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN", U_ZERO_ERROR, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "te_NE", U_USING_FALLBACK_WARNING, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN_NE", U_USING_FALLBACK_WARNING, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "ne", U_USING_DEFAULT_WARNING, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } }
+};
+
+static int32_t bundles_count = sizeof(param) / sizeof(param[0]);
+
+
+/*static void printUChars(UChar*);*/
+static void TestDecodedBundle(void);
+static void TestGetKeywordValues(void);
+static void TestGetFunctionalEquivalent(void);
+static void TestCLDRStyleAliases(void);
+static void TestFallbackCodes(void);
+static void TestGetUTF8String(void);
+
+/***************************************************************************************/
+
+/* Array of our test objects */
+
+void addNEWResourceBundleTest(TestNode** root)
+{
+ addTest(root, &TestErrorCodes, "tsutil/creststn/TestErrorCodes");
+ addTest(root, &TestEmptyBundle, "tsutil/creststn/TestEmptyBundle");
+ addTest(root, &TestConstruction1, "tsutil/creststn/TestConstruction1");
+ addTest(root, &TestResourceBundles, "tsutil/creststn/TestResourceBundles");
+ addTest(root, &TestFallback, "tsutil/creststn/TestFallback");
+ addTest(root, &TestGetVersion, "tsutil/creststn/TestGetVersion");
+ addTest(root, &TestGetVersionColl, "tsutil/creststn/TestGetVersionColl");
+ addTest(root, &TestAliasConflict, "tsutil/creststn/TestAliasConflict");
+ addTest(root, &TestNewTypes, "tsutil/creststn/TestNewTypes");
+ addTest(root, &TestEmptyTypes, "tsutil/creststn/TestEmptyTypes");
+ addTest(root, &TestBinaryCollationData, "tsutil/creststn/TestBinaryCollationData");
+ addTest(root, &TestAPI, "tsutil/creststn/TestAPI");
+ addTest(root, &TestErrorConditions, "tsutil/creststn/TestErrorConditions");
+ addTest(root, &TestDecodedBundle, "tsutil/creststn/TestDecodedBundle");
+ addTest(root, &TestResourceLevelAliasing, "tsutil/creststn/TestResourceLevelAliasing");
+ addTest(root, &TestDirectAccess, "tsutil/creststn/TestDirectAccess");
+ addTest(root, &TestGetKeywordValues, "tsutil/creststn/TestGetKeywordValues");
+ addTest(root, &TestGetFunctionalEquivalent,"tsutil/creststn/TestGetFunctionalEquivalent");
+ addTest(root, &TestJB3763, "tsutil/creststn/TestJB3763");
+ addTest(root, &TestXPath, "tsutil/creststn/TestXPath");
+ addTest(root, &TestCLDRStyleAliases, "tsutil/creststn/TestCLDRStyleAliases");
+ addTest(root, &TestFallbackCodes, "tsutil/creststn/TestFallbackCodes");
+ addTest(root, &TestStackReuse, "tsutil/creststn/TestStackReuse");
+ addTest(root, &TestGetUTF8String, "tsutil/creststn/TestGetUTF8String");
+}
+
+
+/***************************************************************************************/
+static const char* norwayNames[] = {
+ "no_NO_NY",
+ "no_NO",
+ "no",
+ "nn_NO",
+ "nn",
+ "nb_NO",
+ "nb"
+};
+
+static const char* norwayLocales[] = {
+ "nn_NO",
+ "nb_NO",
+ "nb",
+ "nn_NO",
+ "nn",
+ "nb_NO",
+ "nb"
+};
+
+static void checkStatus(int32_t line, UErrorCode expected, UErrorCode status) {
+ if(U_FAILURE(status)) {
+ log_data_err("Resource not present, cannot test (%s:%d)\n", __FILE__, line);
+ }
+ if(status != expected) {
+ log_err("%s:%d: Expected error code %s, got error code %s\n", __FILE__, line, u_errorName(expected), u_errorName(status));
+ }
+}
+
+static void TestErrorCodes(void) {
+ UErrorCode status = U_USING_DEFAULT_WARNING;
+
+ UResourceBundle *r = NULL, *r2 = NULL;
+
+ /* First check with ICUDATA */
+ /* first bundle should return fallback warning */
+ r = ures_open(NULL, "ti_ER_ASSAB", &status);
+ checkStatus(__LINE__, U_USING_FALLBACK_WARNING, status);
+ ures_close(r);
+
+ /* this bundle should return zero error, so it shouldn't change the status*/
+ status = U_USING_DEFAULT_WARNING;
+ r = ures_open(NULL, "ti_ER", &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+
+ /* we look up the resource which is aliased, but it lives in fallback */
+ if(U_SUCCESS(status) && r != NULL) {
+ status = U_USING_DEFAULT_WARNING;
+ r2 = ures_getByKey(r, "Languages", NULL, &status); /* languages of 'ti' aliases to 'am' */
+ checkStatus(__LINE__, U_USING_FALLBACK_WARNING, status);
+ }
+ ures_close(r);
+
+ /* this bundle should return zero error, so it shouldn't change the status*/
+ status = U_USING_DEFAULT_WARNING;
+ r = ures_open(NULL, "ti", &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+
+ /* we look up the resource which is aliased and at our level */
+ if(U_SUCCESS(status) && r != NULL) {
+ status = U_USING_DEFAULT_WARNING;
+ r2 = ures_getByKey(r, "Languages", r2, &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+ }
+ ures_close(r);
+
+ status = U_USING_FALLBACK_WARNING;
+ r = ures_open(NULL, "nolocale", &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+ ures_close(r);
+ ures_close(r2);
+
+ /** Now, with the collation bundle **/
+
+ /* first bundle should return fallback warning */
+ r = ures_open(U_ICUDATA_COLL, "sr_YU_VOJVODINA", &status);
+ checkStatus(__LINE__, U_USING_FALLBACK_WARNING, status);
+ ures_close(r);
+
+ /* this bundle should return zero error, so it shouldn't change the status*/
+ status = U_USING_FALLBACK_WARNING;
+ r = ures_open(U_ICUDATA_COLL, "sr", &status);
+ checkStatus(__LINE__, U_USING_FALLBACK_WARNING, status);
+
+ /* we look up the resource which is aliased */
+ if(U_SUCCESS(status) && r != NULL) {
+ status = U_USING_DEFAULT_WARNING;
+ r2 = ures_getByKey(r, "collations", NULL, &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+ }
+ ures_close(r);
+
+ /* this bundle should return zero error, so it shouldn't change the status*/
+ status = U_USING_DEFAULT_WARNING;
+ r = ures_open(U_ICUDATA_COLL, "sr", &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+
+ /* we look up the resource which is aliased and at our level */
+ if(U_SUCCESS(status) && r != NULL) {
+ status = U_USING_DEFAULT_WARNING;
+ r2 = ures_getByKey(r, "collations", r2, &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+ }
+ ures_close(r);
+
+ status = U_USING_FALLBACK_WARNING;
+ r = ures_open(U_ICUDATA_COLL, "nolocale", &status);
+ checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status);
+ ures_close(r);
+ ures_close(r2);
+}
+
+static void TestAliasConflict(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *he = NULL;
+ UResourceBundle *iw = NULL;
+ UResourceBundle *norway = NULL;
+ const UChar *result = NULL;
+ int32_t resultLen;
+ uint32_t size = 0;
+ uint32_t i = 0;
+ const char *realName = NULL;
+
+ he = ures_open(NULL, "he", &status);
+ iw = ures_open(NULL, "iw", &status);
+ if(U_FAILURE(status)) {
+ log_err("Failed to get resource with %s\n", myErrorName(status));
+ }
+ ures_close(iw);
+ result = ures_getStringByKey(he, "ExemplarCharacters", &resultLen, &status);
+ if(U_FAILURE(status) || result == NULL) {
+ log_err("Failed to get resource ExemplarCharacters with %s\n", myErrorName(status));
+ }
+ ures_close(he);
+
+ size = sizeof(norwayNames)/sizeof(norwayNames[0]);
+ for(i = 0; i < size; i++) {
+ status = U_ZERO_ERROR;
+ norway = ures_open(NULL, norwayNames[i], &status);
+ if(U_FAILURE(status)) {
+ log_err("Failed to get resource with %s for %s\n", myErrorName(status), norwayNames[i]);
+ continue;
+ }
+ realName = ures_getLocale(norway, &status);
+ log_verbose("ures_getLocale(\"%s\")=%s\n", norwayNames[i], realName);
+ if(realName == NULL || strcmp(norwayLocales[i], realName) != 0) {
+ log_data_err("Wrong locale name for %s, expected %s, got %s\n", norwayNames[i], norwayLocales[i], realName);
+ }
+ ures_close(norway);
+ }
+}
+
+static void TestDecodedBundle(){
+
+ UErrorCode error = U_ZERO_ERROR;
+
+ UResourceBundle* resB;
+
+ const UChar* srcFromRes;
+ int32_t len;
+ static const UChar uSrc[] = {
+ 0x0009,0x092F,0x0941,0x0928,0x0947,0x0938,0x094D,0x0915,0x094B,0x0020,0x002E,0x0915,0x0947,0x0020,0x002E,0x090F,
+ 0x0915,0x0020,0x002E,0x0905,0x0927,0x094D,0x092F,0x092F,0x0928,0x0020,0x002E,0x0915,0x0947,0x0020,0x0905,0x0928,
+ 0x0941,0x0938,0x093E,0x0930,0x0020,0x0031,0x0039,0x0039,0x0030,0x0020,0x0924,0x0915,0x0020,0x0915,0x0902,0x092A,
+ 0x094D,0x092F,0x0942,0x091F,0x0930,0x002D,0x092A,0x094D,0x0930,0x092C,0x0902,0x0927,0x093F,0x0924,0x0020,0x0938,
+ 0x0942,0x091A,0x0928,0x093E,0x092A,0x094D,0x0930,0x0923,0x093E,0x0932,0x0940,0x0020,0x002E,0x0915,0x0947,0x0020,
+ 0x002E,0x092F,0x094B,0x0917,0x0926,0x093E,0x0928,0x0020,0x002E,0x0915,0x0947,0x0020,0x002E,0x092B,0x0932,0x0938,
+ 0x094D,0x0935,0x0930,0x0942,0x092A,0x0020,0x002E,0x0935,0x093F,0x0936,0x094D,0x0935,0x0020,0x002E,0x092E,0x0947,
+ 0x0902,0x0020,0x002E,0x0938,0x093E,0x0932,0x093E,0x0928,0x093E,0x0020,0x002E,0x0032,0x0032,0x0030,0x0030,0x0020,
+ 0x0905,0x0930,0x092C,0x0020,0x0930,0x0941,0x092A,0x092F,0x0947,0x0020,0x092E,0x0942,0x0932,0x094D,0x092F,0x0915,
+ 0x0940,0x0020,0x002E,0x0034,0x0935,0x0938,0x094D,0x0924,0x0941,0x0913,0x0902,0x0020,0x002E,0x0034,0x0915,0x093E,
+ 0x0020,0x002E,0x0034,0x0909,0x0924,0x094D,0x092A,0x093E,0x0926,0x0928,0x0020,0x002E,0x0034,0x0939,0x094B,0x0917,
+ 0x093E,0x002C,0x0020,0x002E,0x0033,0x091C,0x092C,0x0915,0x093F,0x0020,0x002E,0x0033,0x0915,0x0902,0x092A,0x094D,
+ 0x092F,0x0942,0x091F,0x0930,0x0020,0x002E,0x0033,0x0915,0x093E,0x0020,0x002E,0x0033,0x0915,0x0941,0x0932,0x0020,
+ 0x002E,0x0033,0x092F,0x094B,0x0917,0x0926,0x093E,0x0928,0x0020,0x002E,0x0033,0x0907,0x0938,0x0938,0x0947,0x0915,
+ 0x0939,0x093F,0x0020,0x002E,0x002F,0x091C,0x094D,0x092F,0x093E,0x0926,0x093E,0x0020,0x002E,0x002F,0x0939,0x094B,
+ 0x0917,0x093E,0x0964,0x0020,0x002E,0x002F,0x0905,0x0928,0x0941,0x0938,0x0902,0x0927,0x093E,0x0928,0x0020,0x002E,
+ 0x002F,0x0915,0x0940,0x0020,0x002E,0x002F,0x091A,0x0930,0x092E,0x0020,0x0938,0x0940,0x092E,0x093E,0x0913,0x0902,
+ 0x0020,0x092A,0x0930,0x0020,0x092A,0x0939,0x0941,0x0902,0x091A,0x0928,0x0947,0x0020,0x0915,0x0947,0x0020,0x0932,
+ 0x093F,0x090F,0x0020,0x0915,0x0902,0x092A,0x094D,0x092F,0x0942,0x091F,0x0930,0x090F,0x0915,0x0020,0x002E,0x002F,
+ 0x0906,0x092E,0x0020,0x002E,0x002F,0x091C,0x0930,0x0942,0x0930,0x0924,0x0020,0x002E,0x002F,0x091C,0x0948,0x0938,
+ 0x093E,0x0020,0x092C,0x0928,0x0020,0x0917,0x092F,0x093E,0x0020,0x0939,0x0948,0x0964,0x0020,0x092D,0x093E,0x0930,
+ 0x0924,0x0020,0x092E,0x0947,0x0902,0x0020,0x092D,0x0940,0x002C,0x0020,0x0916,0x093E,0x0938,0x0915,0x0930,0x0020,
+ 0x092E,0x094C,0x091C,0x0942,0x0926,0x093E,0x0020,0x0938,0x0930,0x0915,0x093E,0x0930,0x0928,0x0947,0x002C,0x0020,
+ 0x0915,0x0902,0x092A,0x094D,0x092F,0x0942,0x091F,0x0930,0x0020,0x0915,0x0947,0x0020,0x092A,0x094D,0x0930,0x092F,
+ 0x094B,0x0917,0x0020,0x092A,0x0930,0x0020,0x091C,0x092C,0x0930,0x0926,0x0938,0x094D,0x0924,0x0020,0x090F,0x095C,
+ 0x0020,0x0932,0x0917,0x093E,0x092F,0x0940,0x0020,0x0939,0x0948,0x002C,0x0020,0x0915,0x093F,0x0902,0x0924,0x0941,
+ 0x0020,0x0907,0x0938,0x0915,0x0947,0x0020,0x0938,0x0930,0x092A,0x091F,0x0020,0x0926,0x094C,0x095C,0x0932,0x0917,
+ 0x093E,0x0928,0x0947,0x0020,0x002E,0x0032,0x0915,0x0947,0x0020,0x002E,0x0032,0x0932,0x093F,0x090F,0x0020,0x002E,
+ 0x0032,0x0915,0x094D,0x092F,0x093E,0x0020,0x002E,0x0032,0x0938,0x092A,0x093E,0x091F,0x0020,0x002E,0x0032,0x0930,
+ 0x093E,0x0938,0x094D,0x0924,0x093E,0x0020,0x002E,0x0032,0x0909,0x092A,0x0932,0x092C,0x094D,0x0927,0x0020,0x002E,
+ 0x0939,0x0948,0x002C,0x0020,0x002E,0x0905,0x0925,0x0935,0x093E,0x0020,0x002E,0x0935,0x093F,0x0936,0x094D,0x0935,
+ 0x0020,0x002E,0x092E,0x0947,0x0902,0x0020,0x002E,0x0915,0x0902,0x092A,0x094D,0x092F,0x0942,0x091F,0x0930,0x0020,
+ 0x002E,0x0915,0x0940,0x0938,0x092B,0x0932,0x0924,0x093E,0x0020,0x002E,0x0033,0x0935,0x0020,0x002E,0x0033,0x0935,
+ 0x093F,0x092B,0x0932,0x0924,0x093E,0x0020,0x002E,0x0033,0x0938,0x0947,0x0020,0x002E,0x0033,0x0938,0x092C,0x0915,
+ 0x0020,0x002E,0x0033,0x0932,0x0947,0x0020,0x002E,0x0033,0x0915,0x0930,0x0020,0x002E,0x0033,0x0915,0x094D,0x092F,
+ 0x093E,0x0020,0x002E,0x0033,0x0939,0x092E,0x0020,0x002E,0x0033,0x0907,0x0938,0x0915,0x093E,0x0020,0x002E,0x0033,
+ 0x092F,0x0941,0x0915,0x094D,0x0924,0x093F,0x092A,0x0942,0x0930,0x094D,0x0923,0x0020,0x002E,0x0032,0x0935,0x093F,
+ 0x0938,0x094D,0x0924,0x093E,0x0930,0x0020,0x0905,0x092A,0x0947,0x0915,0x094D,0x0937,0x093F,0x0924,0x0020,0x0915,
+ 0x0930,0x0020,0x0938,0x0915,0x0947,0x0902,0x0917,0x0947,0x0020,0x003F,0x0020,
+ 0
+ };
+
+ /* pre-flight */
+ int32_t num =0;
+ const char *testdatapath = loadTestData(&error);
+ resB = ures_open(testdatapath, "iscii", &error);
+ srcFromRes=tres_getString(resB,-1,"str",&len,&error);
+ if(U_FAILURE(error)){
+#if UCONFIG_NO_LEGACY_CONVERSION
+ log_info("Couldn't load iscii.bin from test data bundle, (because UCONFIG_NO_LEGACY_CONVERSION is turned on)\n");
+#else
+ log_err("Could not find iscii.bin from test data bundle. Error: %s\n", u_errorName(error));
+#endif
+ ures_close(resB);
+ return;
+ }
+ if(u_strncmp(srcFromRes,uSrc,len)!=0){
+ log_err("Genrb produced res files after decoding failed\n");
+ }
+ while(num<len){
+ if(uSrc[num]!=srcFromRes[num]){
+ log_verbose(" Expected: 0x%04X Got: 0x%04X \n", uSrc[num],srcFromRes[num]);
+ }
+ num++;
+ }
+ if (len != u_strlen(uSrc)) {
+ log_err("Genrb produced a string larger than expected\n");
+ }
+ ures_close(resB);
+}
+
+static void TestNewTypes() {
+ UResourceBundle* theBundle = NULL;
+ char action[256];
+ const char* testdatapath;
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle* res = NULL;
+ uint8_t *binResult = NULL;
+ int32_t len = 0;
+ int32_t i = 0;
+ int32_t intResult = 0;
+ uint32_t uintResult = 0;
+ const UChar *empty = NULL;
+ const UChar *zeroString;
+ UChar expected[] = { 'a','b','c','\0','d','e','f' };
+ const char* expect ="tab:\t cr:\r ff:\f newline:\n backslash:\\\\ quote=\\\' doubleQuote=\\\" singlequoutes=''";
+ UChar uExpect[200];
+
+ testdatapath=loadTestData(&status);
+
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+
+ theBundle = ures_open(testdatapath, "testtypes", &status);
+
+ empty = tres_getString(theBundle, -1, "emptystring", &len, &status);
+ if(empty && (*empty != 0 || len != 0)) {
+ log_err("Empty string returned invalid value\n");
+ }
+
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+
+ CONFIRM_INT_NE(theBundle, NULL);
+
+ /* This test reads the string "abc\u0000def" from the bundle */
+ /* if everything is working correctly, the size of this string */
+ /* should be 7. Everything else is a wrong answer, esp. 3 and 6*/
+
+ strcpy(action, "getting and testing of string with embeded zero");
+ res = ures_getByKey(theBundle, "zerotest", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_STRING);
+ zeroString=tres_getString(res, -1, NULL, &len, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(len, 7);
+ CONFIRM_INT_NE(len, 3);
+ }
+ for(i=0;i<len;i++){
+ if(zeroString[i]!= expected[i]){
+ log_verbose("Output did not match Expected: \\u%4X Got: \\u%4X", expected[i], zeroString[i]);
+ }
+ }
+
+ strcpy(action, "getting and testing of binary type");
+ res = ures_getByKey(theBundle, "binarytest", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_BINARY);
+ binResult=(uint8_t*)ures_getBinary(res, &len, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(len, 15);
+ for(i = 0; i<15; i++) {
+ CONFIRM_INT_EQ(binResult[i], i);
+ }
+ }
+
+ strcpy(action, "getting and testing of imported binary type");
+ res = ures_getByKey(theBundle, "importtest", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_BINARY);
+ binResult=(uint8_t*)ures_getBinary(res, &len, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(len, 15);
+ for(i = 0; i<15; i++) {
+ CONFIRM_INT_EQ(binResult[i], i);
+ }
+ }
+
+ strcpy(action, "getting and testing of integer types");
+ res = ures_getByKey(theBundle, "one", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_INT);
+ intResult=ures_getInt(res, &status);
+ uintResult = ures_getUInt(res, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(uintResult, (uint32_t)intResult);
+ CONFIRM_INT_EQ(intResult, 1);
+ }
+
+ strcpy(action, "getting minusone");
+ res = ures_getByKey(theBundle, "minusone", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_INT);
+ intResult=ures_getInt(res, &status);
+ uintResult = ures_getUInt(res, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(uintResult, 0x0FFFFFFF); /* a 28 bit integer */
+ CONFIRM_INT_EQ(intResult, -1);
+ CONFIRM_INT_NE(uintResult, (uint32_t)intResult);
+ }
+
+ strcpy(action, "getting plusone");
+ res = ures_getByKey(theBundle, "plusone", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_INT);
+ intResult=ures_getInt(res, &status);
+ uintResult = ures_getUInt(res, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(uintResult, (uint32_t)intResult);
+ CONFIRM_INT_EQ(intResult, 1);
+ }
+
+ res = ures_getByKey(theBundle, "onehundredtwentythree", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_INT);
+ intResult=ures_getInt(res, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(intResult, 123);
+ }
+
+ /* this tests if escapes are preserved or not */
+ {
+ const UChar* str = tres_getString(theBundle,-1,"testescape",&len,&status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ if(U_SUCCESS(status)){
+ u_charsToUChars(expect,uExpect,(int32_t)strlen(expect)+1);
+ if(u_strcmp(uExpect,str)){
+ log_err("Did not get the expected string for testescape\n");
+ }
+ }
+ }
+ /* this tests if unescaping works are expected */
+ len=0;
+ {
+ char pattern[2048] = "";
+ int32_t patternLen;
+ UChar* expectedEscaped;
+ const UChar* got;
+ int32_t expectedLen;
+
+ /* This strcpy fixes compiler warnings about long strings */
+ strcpy(pattern, "[ \\\\u0020 \\\\u00A0 \\\\u1680 \\\\u2000 \\\\u2001 \\\\u2002 \\\\u2003 \\\\u2004 \\\\u2005 \\\\u2006 \\\\u2007 "
+ "\\\\u2008 \\\\u2009 \\\\u200A \\u200B \\\\u202F \\u205F \\\\u3000 \\u0000-\\u001F \\u007F \\u0080-\\u009F "
+ "\\\\u06DD \\\\u070F \\\\u180E \\\\u200C \\\\u200D \\\\u2028 \\\\u2029 \\\\u2060 \\\\u2061 \\\\u2062 \\\\u2063 "
+ "\\\\u206A-\\\\u206F \\\\uFEFF \\\\uFFF9-\\uFFFC \\U0001D173-\\U0001D17A \\U000F0000-\\U000FFFFD "
+ "\\U00100000-\\U0010FFFD \\uFDD0-\\uFDEF \\uFFFE-\\uFFFF \\U0001FFFE-\\U0001FFFF \\U0002FFFE-\\U0002FFFF "
+ );
+ strcat(pattern,
+ "\\U0003FFFE-\\U0003FFFF \\U0004FFFE-\\U0004FFFF \\U0005FFFE-\\U0005FFFF \\U0006FFFE-\\U0006FFFF "
+ "\\U0007FFFE-\\U0007FFFF \\U0008FFFE-\\U0008FFFF \\U0009FFFE-\\U0009FFFF \\U000AFFFE-\\U000AFFFF "
+ "\\U000BFFFE-\\U000BFFFF \\U000CFFFE-\\U000CFFFF \\U000DFFFE-\\U000DFFFF \\U000EFFFE-\\U000EFFFF "
+ "\\U000FFFFE-\\U000FFFFF \\U0010FFFE-\\U0010FFFF \\uD800-\\uDFFF \\\\uFFF9 \\\\uFFFA \\\\uFFFB "
+ "\\uFFFC \\uFFFD \\u2FF0-\\u2FFB \\u0340 \\u0341 \\\\u200E \\\\u200F \\\\u202A \\\\u202B \\\\u202C "
+ );
+ strcat(pattern,
+ "\\\\u202D \\\\u202E \\\\u206A \\\\u206B \\\\u206C \\\\u206D \\\\u206E \\\\u206F \\U000E0001 \\U000E0020-\\U000E007F "
+ "]"
+ );
+
+ patternLen = (int32_t)uprv_strlen(pattern);
+ expectedEscaped = (UChar*)malloc(U_SIZEOF_UCHAR * patternLen);
+ got = tres_getString(theBundle,-1,"test_unescaping",&len,&status);
+ expectedLen = u_unescape(pattern,expectedEscaped,patternLen);
+ if(got==NULL || u_strncmp(expectedEscaped,got,expectedLen)!=0 || expectedLen != len){
+ log_err("genrb failed to unescape string\n");
+ }
+ if(got != NULL){
+ for(i=0;i<expectedLen;i++){
+ if(expectedEscaped[i] != got[i]){
+ log_verbose("Expected: 0x%04X Got: 0x%04X \n",expectedEscaped[i], got[i]);
+ }
+ }
+ }
+ free(expectedEscaped);
+ status = U_ZERO_ERROR;
+ }
+ /* test for jitterbug#1435 */
+ {
+ const UChar* str = tres_getString(theBundle,-1,"test_underscores",&len,&status);
+ expect ="test message ....";
+ u_charsToUChars(expect,uExpect,(int32_t)strlen(expect)+1);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ if(u_strcmp(uExpect,str)){
+ log_err("Did not get the expected string for test_underscores.\n");
+ }
+ }
+ /* test for jitterbug#2626 */
+#if !UCONFIG_NO_COLLATION
+ {
+ UResourceBundle* resB = NULL;
+ const UChar* str = NULL;
+ int32_t strLength = 0;
+ const UChar my[] = {0x0026,0x0027,0x0075,0x0027,0x0020,0x003d,0x0020,0x0027,0xff55,0x0027,0x0000}; /* &'\u0075' = '\uFF55' */
+ status = U_ZERO_ERROR;
+ resB = ures_getByKey(theBundle, "collations", resB, &status);
+ resB = ures_getByKey(resB, "standard", resB, &status);
+ str = tres_getString(resB,-1,"Sequence",&strLength,&status);
+ if(!str || U_FAILURE(status)) {
+ log_data_err("Could not load collations from theBundle: %s\n", u_errorName(status));
+ } else if(u_strcmp(my,str) != 0){
+ log_err("Did not get the expected string for escaped \\u0075\n");
+ }
+ ures_close(resB);
+ }
+#endif
+ {
+ const char *sourcePath = ctest_dataSrcDir();
+ int32_t srcPathLen = (int32_t)strlen(sourcePath);
+ const char *deltaPath = ".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+ int32_t deltaPathLen = (int32_t)strlen(deltaPath);
+ char *testDataFileName = (char *) malloc( srcPathLen+ deltaPathLen + 50 );
+ char *path = testDataFileName;
+
+ strcpy(path, sourcePath);
+ path += srcPathLen;
+ strcpy(path, deltaPath);
+ path += deltaPathLen;
+ status = U_ZERO_ERROR;
+ {
+ int32_t strLen =0;
+ const UChar* str = tres_getString(theBundle, -1, "testincludeUTF",&strLen,&status);
+ strcpy(path, "riwords.txt");
+ path[strlen("riwords.txt")]=0;
+ if(U_FAILURE(status)){
+ log_err("Could not get testincludeUTF resource from testtypes bundle. Error: %s\n",u_errorName(status));
+ }else{
+ /* open the file */
+ const char* cp = NULL;
+ UCHARBUF* ucbuf = ucbuf_open(testDataFileName,&cp,FALSE,FALSE,&status);
+ len = 0;
+ if(U_SUCCESS(status)){
+ const UChar* buffer = ucbuf_getBuffer(ucbuf,&len,&status);
+ if(U_SUCCESS(status)){
+ /* verify the contents */
+ if(strLen != len ){
+ log_err("Did not get the expected len for riwords. Expected: %i , Got: %i\n", len ,strLen);
+ }
+ /* test string termination */
+ if(u_strlen(str) != strLen || str[strLen]!= 0 ){
+ log_err("testinclude not null terminated!\n");
+ }
+ if(u_strncmp(str, buffer,strLen)!=0){
+ log_err("Did not get the expected string from riwords. Include functionality failed for genrb.\n");
+ }
+ }else{
+ log_err("ucbuf failed to open %s. Error: %s\n", testDataFileName, u_errorName(status));
+ }
+
+ ucbuf_close(ucbuf);
+ }else{
+ log_err("Could not get riwords.txt (path : %s). Error: %s\n",testDataFileName,u_errorName(status));
+ }
+ }
+ }
+ status = U_ZERO_ERROR;
+ {
+ int32_t strLen =0;
+ const UChar* str = tres_getString(theBundle, -1, "testinclude",&strLen,&status);
+ strcpy(path, "translit_rules.txt");
+ path[strlen("translit_rules.txt")]=0;
+
+ if(U_FAILURE(status)){
+ log_err("Could not get testinclude resource from testtypes bundle. Error: %s\n",u_errorName(status));
+ }else{
+ /* open the file */
+ const char* cp=NULL;
+ UCHARBUF* ucbuf = ucbuf_open(testDataFileName,&cp,FALSE,FALSE,&status);
+ len = 0;
+ if(U_SUCCESS(status)){
+ const UChar* buffer = ucbuf_getBuffer(ucbuf,&len,&status);
+ if(U_SUCCESS(status)){
+ /* verify the contents */
+ if(strLen != len ){
+ log_err("Did not get the expected len for translit_rules. Expected: %i , Got: %i\n", len ,strLen);
+ }
+ if(u_strncmp(str, buffer,strLen)!=0){
+ log_err("Did not get the expected string from translit_rules. Include functionality failed for genrb.\n");
+ }
+ }else{
+ log_err("ucbuf failed to open %s. Error: %s\n", testDataFileName, u_errorName(status));
+ }
+ ucbuf_close(ucbuf);
+ }else{
+ log_err("Could not get translit_rules.txt (path : %s). Error: %s\n",testDataFileName,u_errorName(status));
+ }
+ }
+ }
+ free(testDataFileName);
+ }
+ ures_close(res);
+ ures_close(theBundle);
+
+}
+
+static void TestEmptyTypes() {
+ UResourceBundle* theBundle = NULL;
+ char action[256];
+ const char* testdatapath;
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle* res = NULL;
+ UResourceBundle* resArray = NULL;
+ const uint8_t *binResult = NULL;
+ int32_t len = 0;
+ int32_t intResult = 0;
+ const UChar *zeroString;
+ const int32_t *zeroIntVect;
+
+ strcpy(action, "Construction of testtypes bundle");
+ testdatapath=loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+
+ theBundle = ures_open(testdatapath, "testtypes", &status);
+
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+
+ CONFIRM_INT_NE(theBundle, NULL);
+
+ /* This test reads the string "abc\u0000def" from the bundle */
+ /* if everything is working correctly, the size of this string */
+ /* should be 7. Everything else is a wrong answer, esp. 3 and 6*/
+
+ status = U_ZERO_ERROR;
+ strcpy(action, "getting and testing of explicit string of zero length string");
+ res = ures_getByKey(theBundle, "emptyexplicitstring", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_STRING);
+ zeroString=tres_getString(res, -1, NULL, &len, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(len, 0);
+ CONFIRM_INT_EQ(u_strlen(zeroString), 0);
+ }
+ else {
+ log_err("Couldn't get emptyexplicitstring\n");
+ }
+
+ status = U_ZERO_ERROR;
+ strcpy(action, "getting and testing of normal string of zero length string");
+ res = ures_getByKey(theBundle, "emptystring", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_STRING);
+ zeroString=tres_getString(res, -1, NULL, &len, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(len, 0);
+ CONFIRM_INT_EQ(u_strlen(zeroString), 0);
+ }
+ else {
+ log_err("Couldn't get emptystring\n");
+ }
+
+ status = U_ZERO_ERROR;
+ strcpy(action, "getting and testing of empty int");
+ res = ures_getByKey(theBundle, "emptyint", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_INT);
+ intResult=ures_getInt(res, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(intResult, 0);
+ }
+ else {
+ log_err("Couldn't get emptystring\n");
+ }
+
+ status = U_ZERO_ERROR;
+ strcpy(action, "getting and testing of zero length intvector");
+ res = ures_getByKey(theBundle, "emptyintv", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_INT_VECTOR);
+
+ if(U_FAILURE(status)){
+ log_err("Couldn't get emptyintv key %s\n", u_errorName(status));
+ }
+ else {
+ zeroIntVect=ures_getIntVector(res, &len, &status);
+ if(!U_SUCCESS(status) || resArray != NULL || len != 0) {
+ log_err("Shouldn't get emptyintv\n");
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ strcpy(action, "getting and testing of zero length emptybin");
+ res = ures_getByKey(theBundle, "emptybin", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_BINARY);
+
+ if(U_FAILURE(status)){
+ log_err("Couldn't get emptybin key %s\n", u_errorName(status));
+ }
+ else {
+ binResult=ures_getBinary(res, &len, &status);
+ if(!U_SUCCESS(status) || binResult != NULL || len != 0) {
+ log_err("Shouldn't get emptybin\n");
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ strcpy(action, "getting and testing of zero length emptyarray");
+ res = ures_getByKey(theBundle, "emptyarray", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_ARRAY);
+
+ if(U_FAILURE(status)){
+ log_err("Couldn't get emptyarray key %s\n", u_errorName(status));
+ }
+ else {
+ resArray=ures_getByIndex(res, 0, resArray, &status);
+ if(U_SUCCESS(status) || resArray != NULL){
+ log_err("Shouldn't get emptyarray\n");
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ strcpy(action, "getting and testing of zero length emptytable");
+ res = ures_getByKey(theBundle, "emptytable", res, &status);
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(res), URES_TABLE);
+
+ if(U_FAILURE(status)){
+ log_err("Couldn't get emptytable key %s\n", u_errorName(status));
+ }
+ else {
+ resArray=ures_getByIndex(res, 0, resArray, &status);
+ if(U_SUCCESS(status) || resArray != NULL){
+ log_err("Shouldn't get emptytable\n");
+ }
+ }
+
+ ures_close(res);
+ ures_close(theBundle);
+}
+
+static void TestEmptyBundle(){
+ UErrorCode status = U_ZERO_ERROR;
+ const char* testdatapath=NULL;
+ UResourceBundle *resb=0, *dResB=0;
+
+ testdatapath=loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+ resb = ures_open(testdatapath, "testempty", &status);
+
+ if(U_SUCCESS(status)){
+ dResB = ures_getByKey(resb,"test",dResB,&status);
+ if(status!= U_MISSING_RESOURCE_ERROR){
+ log_err("Did not get the expected error from an empty resource bundle. Expected : %s Got: %s\n",
+ u_errorName(U_MISSING_RESOURCE_ERROR),u_errorName(status));
+ }
+ }
+ ures_close(dResB);
+ ures_close(resb);
+}
+
+static void TestBinaryCollationData(){
+ UErrorCode status=U_ZERO_ERROR;
+ const char* locale="te";
+#if !UCONFIG_NO_COLLATION
+ const char* testdatapath;
+#endif
+ UResourceBundle *teRes = NULL;
+ UResourceBundle *coll=NULL;
+ UResourceBundle *binColl = NULL;
+ uint8_t *binResult = NULL;
+ int32_t len=0;
+ const char* action="testing the binary collaton data";
+
+#if !UCONFIG_NO_COLLATION
+ log_verbose("Testing binary collation data resource......\n");
+
+ testdatapath=loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+
+
+ teRes=ures_open(testdatapath, locale, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: Failed to get resource for \"te\" with %s", myErrorName(status));
+ return;
+ }
+ status=U_ZERO_ERROR;
+ coll = ures_getByKey(teRes, "collations", coll, &status);
+ coll = ures_getByKey(coll, "standard", coll, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(coll), URES_TABLE);
+ binColl=ures_getByKey(coll, "%%CollationBin", binColl, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_EQ(ures_getType(binColl), URES_BINARY);
+ binResult=(uint8_t*)ures_getBinary(binColl, &len, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_ErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_INT_GE(len, 1);
+ }
+
+ }else{
+ log_err("ERROR: ures_getByKey(locale(te), %%CollationBin) failed\n");
+ }
+ }
+ else{
+ log_err("ERROR: ures_getByKey(locale(te), collations) failed\n");
+ return;
+ }
+ ures_close(binColl);
+ ures_close(coll);
+ ures_close(teRes);
+#endif
+}
+
+static void TestAPI() {
+ UErrorCode status=U_ZERO_ERROR;
+ int32_t len=0;
+ const char* key=NULL;
+ const UChar* value=NULL;
+ const char* testdatapath;
+ UChar* utestdatapath=NULL;
+ char convOutput[256];
+ UChar largeBuffer[1025];
+ UResourceBundle *teRes = NULL;
+ UResourceBundle *teFillin=NULL;
+ UResourceBundle *teFillin2=NULL;
+
+ log_verbose("Testing ures_openU()......\n");
+
+ testdatapath=loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+ len =(int32_t)strlen(testdatapath);
+ utestdatapath = (UChar*) malloc((len+10)*sizeof(UChar));
+
+ u_charsToUChars(testdatapath, utestdatapath, (int32_t)strlen(testdatapath)+1);
+#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR) && U_FILE_SEP_CHAR == '\\'
+ {
+ /* Convert all backslashes to forward slashes so that we can make sure that ures_openU
+ can handle invariant characters. */
+ UChar *backslash;
+ while ((backslash = u_strchr(utestdatapath, 0x005C))) {
+ *backslash = 0x002F;
+ }
+ }
+#endif
+
+ u_memset(largeBuffer, 0x0030, sizeof(largeBuffer)/sizeof(largeBuffer[0]));
+ largeBuffer[sizeof(largeBuffer)/sizeof(largeBuffer[0])-1] = 0;
+
+ /*Test ures_openU */
+
+ status = U_ZERO_ERROR;
+ ures_close(ures_openU(largeBuffer, "root", &status));
+ if(status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_openU() worked when the path is very large. It returned %s\n", myErrorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ ures_close(ures_openU(NULL, "root", &status));
+ if(U_FAILURE(status)){
+ log_err("ERROR: ures_openU() failed path = NULL with %s\n", myErrorName(status));
+ }
+
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ if(ures_openU(NULL, "root", &status) != NULL){
+ log_err("ERROR: ures_openU() worked with error status with %s\n", myErrorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ teRes=ures_openU(utestdatapath, "te", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: ures_openU() failed path =%s with %s\n", austrdup(utestdatapath), myErrorName(status));
+ return;
+ }
+ /*Test ures_getLocale() */
+ log_verbose("Testing ures_getLocale() .....\n");
+ if(strcmp(ures_getLocale(teRes, &status), "te") != 0){
+ log_err("ERROR: ures_getLocale() failed. Expected = te_TE Got = %s\n", ures_getLocale(teRes, &status));
+ }
+ /*Test ures_getNextString() */
+ teFillin=ures_getByKey(teRes, "tagged_array_in_te_te_IN", teFillin, &status);
+ key=ures_getKey(teFillin);
+ value=(UChar*)ures_getNextString(teFillin, &len, &key, &status);
+ ures_resetIterator(NULL);
+ value=(UChar*)ures_getNextString(teFillin, &len, &key, &status);
+ if(status !=U_INDEX_OUTOFBOUNDS_ERROR){
+ log_err("ERROR: calling getNextString where index out of bounds should return U_INDEX_OUTOFBOUNDS_ERROR, Got : %s\n",
+ myErrorName(status));
+ }
+ ures_resetIterator(teRes);
+ /*Test ures_getNextResource() where resource is table*/
+ status=U_ZERO_ERROR;
+#if (U_CHARSET_FAMILY == U_ASCII_FAMILY)
+ /* The next key varies depending on the charset. */
+ teFillin=ures_getNextResource(teRes, teFillin, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: ures_getNextResource() failed \n");
+ }
+ key=ures_getKey(teFillin);
+ /*if(strcmp(key, "%%CollationBin") != 0){*/
+ /*if(strcmp(key, "array_2d_in_Root_te") != 0){*/ /* added "aliasClient" that goes first */
+ if(strcmp(key, "a") != 0){
+ log_err("ERROR: ures_getNextResource() failed\n");
+ }
+#endif
+
+ /*Test ures_getByIndex on string Resource*/
+ teFillin=ures_getByKey(teRes, "string_only_in_te", teFillin, &status);
+ teFillin2=ures_getByIndex(teFillin, 0, teFillin2, &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: ures_getByIndex on string resource failed\n");
+ }
+ if(strcmp(u_austrcpy(convOutput, tres_getString(teFillin2, -1, NULL, &len, &status)), "TE") != 0){
+ status=U_ZERO_ERROR;
+ log_err("ERROR: ures_getByIndex on string resource fetched the key=%s, expected \"TE\" \n", austrdup(ures_getString(teFillin2, &len, &status)));
+ }
+
+ /*ures_close(teRes);*/
+
+ /*Test ures_openFillIn*/
+ log_verbose("Testing ures_openFillIn......\n");
+ status=U_ZERO_ERROR;
+ ures_openFillIn(teRes, testdatapath, "te", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: ures_openFillIn failed\n");
+ return;
+ }
+ if(strcmp(ures_getLocale(teRes, &status), "te") != 0){
+ log_err("ERROR: ures_openFillIn did not open the ResourceBundle correctly\n");
+ }
+ ures_getByKey(teRes, "string_only_in_te", teFillin, &status);
+ teFillin2=ures_getNextResource(teFillin, teFillin2, &status);
+ if(ures_getType(teFillin2) != URES_STRING){
+ log_err("ERROR: getType for getNextResource after ures_openFillIn failed\n");
+ }
+ teFillin2=ures_getNextResource(teFillin, teFillin2, &status);
+ if(status !=U_INDEX_OUTOFBOUNDS_ERROR){
+ log_err("ERROR: calling getNextResource where index out of bounds should return U_INDEX_OUTOFBOUNDS_ERROR, Got : %s\n",
+ myErrorName(status));
+ }
+
+ ures_close(teFillin);
+ ures_close(teFillin2);
+ ures_close(teRes);
+
+ /* Test that ures_getLocale() returns the "real" locale ID */
+ status=U_ZERO_ERROR;
+ teRes=ures_open(NULL, "dE_At_NOWHERE_TO_BE_FOUND", &status);
+ if(U_FAILURE(status)) {
+ log_data_err("unable to open a locale resource bundle from \"dE_At_NOWHERE_TO_BE_FOUND\"(%s)\n", u_errorName(status));
+ } else {
+ if(0!=strcmp("de_AT", ures_getLocale(teRes, &status))) {
+ log_data_err("ures_getLocale(\"dE_At_NOWHERE_TO_BE_FOUND\")=%s but must be de_AT\n", ures_getLocale(teRes, &status));
+ }
+ ures_close(teRes);
+ }
+
+ /* same test, but with an aliased locale resource bundle */
+ status=U_ZERO_ERROR;
+ teRes=ures_open(NULL, "iW_Il_depRecaTed_HebreW", &status);
+ if(U_FAILURE(status)) {
+ log_data_err("unable to open a locale resource bundle from \"iW_Il_depRecaTed_HebreW\"(%s)\n", u_errorName(status));
+ } else {
+ if(0!=strcmp("he_IL", ures_getLocale(teRes, &status))) {
+ log_data_err("ures_getLocale(\"iW_Il_depRecaTed_HebreW\")=%s but must be he_IL\n", ures_getLocale(teRes, &status));
+ }
+ ures_close(teRes);
+ }
+ free(utestdatapath);
+}
+
+static void TestErrorConditions(){
+ UErrorCode status=U_ZERO_ERROR;
+ const char *key=NULL;
+ const UChar *value=NULL;
+ const char* testdatapath;
+ UChar* utestdatapath;
+ int32_t len=0;
+ UResourceBundle *teRes = NULL;
+ UResourceBundle *coll=NULL;
+ UResourceBundle *binColl = NULL;
+ UResourceBundle *teFillin=NULL;
+ UResourceBundle *teFillin2=NULL;
+ uint8_t *binResult = NULL;
+ int32_t resultLen;
+
+
+ testdatapath = loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+ len = (int32_t)strlen(testdatapath);
+ utestdatapath = (UChar*) malloc(sizeof(UChar) *(len+10));
+ u_uastrcpy(utestdatapath, testdatapath);
+
+ /*Test ures_openU with status != U_ZERO_ERROR*/
+ log_verbose("Testing ures_openU() with status != U_ZERO_ERROR.....\n");
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ teRes=ures_openU(utestdatapath, "te", &status);
+ if(U_FAILURE(status)){
+ log_verbose("ures_openU() failed as expected path =%s with status != U_ZERO_ERROR\n", testdatapath);
+ }else{
+ log_err("ERROR: ures_openU() is supposed to fail path =%s with status != U_ZERO_ERROR\n", austrdup(utestdatapath));
+ ures_close(teRes);
+ }
+ /*Test ures_openFillIn with UResourceBundle = NULL*/
+ log_verbose("Testing ures_openFillIn with UResourceBundle = NULL.....\n");
+ status=U_ZERO_ERROR;
+ ures_openFillIn(NULL, testdatapath, "te", &status);
+ if(status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_openFillIn with UResourceBundle= NULL should fail. Expected U_ILLEGAL_ARGUMENT_ERROR, Got: %s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getLocale() with status != U_ZERO_ERROR*/
+ status=U_ZERO_ERROR;
+ teRes=ures_openU(utestdatapath, "te", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: ures_openU() failed path =%s with %s\n", austrdup(utestdatapath), myErrorName(status));
+ return;
+ }
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ if(ures_getLocale(teRes, &status) != NULL){
+ log_err("ERROR: ures_getLocale is supposed to fail with errorCode != U_ZERO_ERROR\n");
+ }
+ /*Test ures_getLocale() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ if(ures_getLocale(NULL, &status) != NULL && status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getLocale is supposed to fail when UResourceBundle = NULL. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getSize() with UResourceBundle = NULL */
+ status=U_ZERO_ERROR;
+ if(ures_getSize(NULL) != 0){
+ log_err("ERROR: ures_getSize() should return 0 when UResourceBundle=NULL. Got =%d\n", ures_getSize(NULL));
+ }
+ /*Test ures_getType() with UResourceBundle = NULL should return URES_NONE==-1*/
+ status=U_ZERO_ERROR;
+ if(ures_getType(NULL) != URES_NONE){
+ log_err("ERROR: ures_getType() should return URES_NONE when UResourceBundle=NULL. Got =%d\n", ures_getType(NULL));
+ }
+ /*Test ures_getKey() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ if(ures_getKey(NULL) != NULL){
+ log_err("ERROR: ures_getKey() should return NULL when UResourceBundle=NULL. Got =%d\n", ures_getKey(NULL));
+ }
+ /*Test ures_hasNext() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ if(ures_hasNext(NULL) != FALSE){
+ log_err("ERROR: ures_hasNext() should return FALSE when UResourceBundle=NULL. Got =%d\n", ures_hasNext(NULL));
+ }
+ /*Test ures_get() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ if(ures_getStringByKey(NULL, "string_only_in_te", &resultLen, &status) != NULL && status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_get is supposed to fail when UResourceBundle = NULL. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getByKey() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ teFillin=ures_getByKey(NULL, "string_only_in_te", teFillin, &status);
+ if( teFillin != NULL && status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getByKey is supposed to fail when UResourceBundle = NULL. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getByKey() with status != U_ZERO_ERROR*/
+ teFillin=ures_getByKey(NULL, "string_only_in_te", teFillin, &status);
+ if(teFillin != NULL ){
+ log_err("ERROR: ures_getByKey is supposed to fail when errorCode != U_ZERO_ERROR\n");
+ }
+ /*Test ures_getStringByKey() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ if(ures_getStringByKey(NULL, "string_only_in_te", &len, &status) != NULL && status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getStringByKey is supposed to fail when UResourceBundle = NULL. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getStringByKey() with status != U_ZERO_ERROR*/
+ if(ures_getStringByKey(teRes, "string_only_in_te", &len, &status) != NULL){
+ log_err("ERROR: ures_getStringByKey is supposed to fail when status != U_ZERO_ERROR. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getString() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ if(ures_getString(NULL, &len, &status) != NULL && status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getString is supposed to fail when UResourceBundle = NULL. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getString() with status != U_ZERO_ERROR*/
+ if(ures_getString(teRes, &len, &status) != NULL){
+ log_err("ERROR: ures_getString is supposed to fail when status != U_ZERO_ERROR. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getBinary() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ if(ures_getBinary(NULL, &len, &status) != NULL && status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getBinary is supposed to fail when UResourceBundle = NULL. Expected: errorCode = U_ILLEGAL_ARGUMENT_ERROR, Got: errorCode=%s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getBinary(0 status != U_ILLEGAL_ARGUMENT_ERROR*/
+ status=U_ZERO_ERROR;
+ coll = ures_getByKey(teRes, "collations", coll, &status);
+ coll = ures_getByKey(teRes, "standard", coll, &status);
+ binColl=ures_getByKey(coll, "%%CollationBin", binColl, &status);
+
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ binResult=(uint8_t*)ures_getBinary(binColl, &len, &status);
+ if(binResult != NULL){
+ log_err("ERROR: ures_getBinary() with status != U_ZERO_ERROR is supposed to fail\n");
+ }
+
+ /*Test ures_getNextResource() with status != U_ZERO_ERROR*/
+ teFillin=ures_getNextResource(teRes, teFillin, &status);
+ if(teFillin != NULL){
+ log_err("ERROR: ures_getNextResource() with errorCode != U_ZERO_ERROR is supposed to fail\n");
+ }
+ /*Test ures_getNextResource() with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ teFillin=ures_getNextResource(NULL, teFillin, &status);
+ if(teFillin != NULL || status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getNextResource() with UResourceBundle = NULL is supposed to fail. Expected : U_IILEGAL_ARGUMENT_ERROR, Got : %s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getNextString with errorCode != U_ZERO_ERROR*/
+ teFillin=ures_getByKey(teRes, "tagged_array_in_te_te_IN", teFillin, &status);
+ key=ures_getKey(teFillin);
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ value=(UChar*)ures_getNextString(teFillin, &len, &key, &status);
+ if(value != NULL){
+ log_err("ERROR: ures_getNextString() with errorCode != U_ZERO_ERROR is supposed to fail\n");
+ }
+ /*Test ures_getNextString with UResourceBundle = NULL*/
+ status=U_ZERO_ERROR;
+ value=(UChar*)ures_getNextString(NULL, &len, &key, &status);
+ if(value != NULL || status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getNextString() with UResourceBundle=NULL is supposed to fail\n Expected: U_ILLEGAL_ARGUMENT_ERROR, Got: %s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getByIndex with errorCode != U_ZERO_ERROR*/
+ status=U_ZERO_ERROR;
+ teFillin=ures_getByKey(teRes, "array_only_in_te", teFillin, &status);
+ if(ures_countArrayItems(teRes, "array_only_in_te", &status) != 4) {
+ log_err("ERROR: Wrong number of items in an array!\n");
+ }
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ teFillin2=ures_getByIndex(teFillin, 0, teFillin2, &status);
+ if(teFillin2 != NULL){
+ log_err("ERROR: ures_getByIndex() with errorCode != U_ZERO_ERROR is supposed to fail\n");
+ }
+ /*Test ures_getByIndex with UResourceBundle = NULL */
+ status=U_ZERO_ERROR;
+ teFillin2=ures_getByIndex(NULL, 0, teFillin2, &status);
+ if(status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getByIndex() with UResourceBundle=NULL is supposed to fail\n Expected: U_ILLEGAL_ARGUMENT_ERROR, Got: %s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getStringByIndex with errorCode != U_ZERO_ERROR*/
+ status=U_ZERO_ERROR;
+ teFillin=ures_getByKey(teRes, "array_only_in_te", teFillin, &status);
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ value=(UChar*)ures_getStringByIndex(teFillin, 0, &len, &status);
+ if( value != NULL){
+ log_err("ERROR: ures_getSringByIndex() with errorCode != U_ZERO_ERROR is supposed to fail\n");
+ }
+ /*Test ures_getStringByIndex with UResourceBundle = NULL */
+ status=U_ZERO_ERROR;
+ value=(UChar*)ures_getStringByIndex(NULL, 0, &len, &status);
+ if(value != NULL || status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getStringByIndex() with UResourceBundle=NULL is supposed to fail\n Expected: U_ILLEGAL_ARGUMENT_ERROR, Got: %s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getStringByIndex with UResourceBundle = NULL */
+ status=U_ZERO_ERROR;
+ value=(UChar*)ures_getStringByIndex(teFillin, 9999, &len, &status);
+ if(value != NULL || status != U_MISSING_RESOURCE_ERROR){
+ log_err("ERROR: ures_getStringByIndex() with index that is too big is supposed to fail\n Expected: U_MISSING_RESOURCE_ERROR, Got: %s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getInt() where UResourceBundle = NULL */
+ status=U_ZERO_ERROR;
+ if(ures_getInt(NULL, &status) != -1 && status != U_ILLEGAL_ARGUMENT_ERROR){
+ log_err("ERROR: ures_getInt() with UResourceBundle = NULL should fail. Expected: U_IILEGAL_ARGUMENT_ERROR, Got: %s\n",
+ myErrorName(status));
+ }
+ /*Test ures_getInt() where status != U_ZERO_ERROR */
+ if(ures_getInt(teRes, &status) != -1){
+ log_err("ERROR: ures_getInt() with errorCode != U_ZERO_ERROR should fail\n");
+ }
+
+ ures_close(teFillin);
+ ures_close(teFillin2);
+ ures_close(coll);
+ ures_close(binColl);
+ ures_close(teRes);
+ free(utestdatapath);
+
+
+}
+
+static void TestGetVersion(){
+ UVersionInfo minVersionArray = {0x01, 0x00, 0x00, 0x00};
+ UVersionInfo maxVersionArray = {0x50, 0xc0, 0xcf, 0xcf};
+ UVersionInfo versionArray;
+ UErrorCode status= U_ZERO_ERROR;
+ UResourceBundle* resB = NULL;
+ int i=0, j = 0;
+ int locCount = uloc_countAvailable();
+ const char *locName = "root";
+
+ log_verbose("The ures_getVersion tests begin : \n");
+
+ for(j = -1; j < locCount; j++) {
+ if(j >= 0) {
+ locName = uloc_getAvailable(j);
+ }
+ log_verbose("Testing version number for locale %s\n", locName);
+ resB = ures_open(NULL,locName, &status);
+ if (U_FAILURE(status)) {
+ log_err("Resource bundle creation for locale %s failed.: %s\n", locName, myErrorName(status));
+ ures_close(resB);
+ return;
+ }
+ ures_getVersion(resB, versionArray);
+ for (i=0; i<4; ++i) {
+ if (versionArray[i] < minVersionArray[i] ||
+ versionArray[i] > maxVersionArray[i])
+ {
+ log_err("Testing ures_getVersion(%-5s) - unexpected result: %d.%d.%d.%d\n",
+ locName, versionArray[0], versionArray[1], versionArray[2], versionArray[3]);
+ break;
+ }
+ }
+ ures_close(resB);
+ }
+}
+
+
+static void TestGetVersionColl(){
+ UVersionInfo minVersionArray = {0x00, 0x00, 0x00, 0x00};
+ UVersionInfo maxVersionArray = {0x50, 0x80, 0xcf, 0xcf};
+ UVersionInfo versionArray;
+ UErrorCode status= U_ZERO_ERROR;
+ UResourceBundle* resB = NULL;
+ UEnumeration *locs= NULL;
+ int i=0;
+ const char *locName = "root";
+ int32_t locLen;
+ const UChar* rules =NULL;
+ int32_t len = 0;
+
+ log_verbose("The ures_getVersion(%s) tests begin : \n", U_ICUDATA_COLL);
+ locs = ures_openAvailableLocales(U_ICUDATA_COLL, &status);
+ if (U_FAILURE(status)) {
+ log_err("enumeration of %s failed.: %s\n", U_ICUDATA_COLL, myErrorName(status));
+ return;
+ }
+
+ do{
+ log_verbose("Testing version number for locale %s\n", locName);
+ resB = ures_open(U_ICUDATA_COLL,locName, &status);
+ if (U_FAILURE(status)) {
+ log_err("Resource bundle creation for locale %s:%s failed.: %s\n", U_ICUDATA_COLL, locName, myErrorName(status));
+ ures_close(resB);
+ return;
+ }
+ /* test NUL termination of UCARules */
+ rules = tres_getString(resB,-1,"UCARules",&len, &status);
+ if(!rules || U_FAILURE(status)) {
+ log_data_err("Could not load UCARules for locale %s\n", locName);
+ continue;
+ }
+ if(u_strlen(rules) != len){
+ log_err("UCARules string not nul terminated! \n");
+ }
+ ures_getVersion(resB, versionArray);
+ for (i=0; i<4; ++i) {
+ if (versionArray[i] < minVersionArray[i] ||
+ versionArray[i] > maxVersionArray[i])
+ {
+ log_err("Testing ures_getVersion(%-5s) - unexpected result: %d.%d.%d.%d\n",
+ locName, versionArray[0], versionArray[1], versionArray[2], versionArray[3]);
+ break;
+ }
+ }
+ ures_close(resB);
+ } while((locName = uenum_next(locs,&locLen,&status))&&U_SUCCESS(status));
+
+ if(U_FAILURE(status)) {
+ log_err("Err %s testing Collation locales.\n", u_errorName(status));
+ }
+ uenum_close(locs);
+}
+
+static void TestResourceBundles()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ testTag("only_in_Root", TRUE, FALSE, FALSE);
+ testTag("in_Root_te", TRUE, TRUE, FALSE);
+ testTag("in_Root_te_te_IN", TRUE, TRUE, TRUE);
+ testTag("in_Root_te_IN", TRUE, FALSE, TRUE);
+ testTag("only_in_te", FALSE, TRUE, FALSE);
+ testTag("only_in_te_IN", FALSE, FALSE, TRUE);
+ testTag("in_te_te_IN", FALSE, TRUE, TRUE);
+ testTag("nonexistent", FALSE, FALSE, FALSE);
+
+ log_verbose("Passed:= %d Failed= %d \n", pass, fail);
+
+}
+
+
+static void TestConstruction1()
+{
+ UResourceBundle *test1 = 0, *test2 = 0,*empty = 0;
+ const UChar *result1, *result2;
+ UErrorCode status= U_ZERO_ERROR;
+ UErrorCode err = U_ZERO_ERROR;
+ const char* locale="te_IN";
+ const char* testdatapath;
+
+ int32_t len1=0;
+ int32_t len2=0;
+ UVersionInfo versionInfo;
+ char versionString[256];
+ char verboseOutput[256];
+
+ U_STRING_DECL(rootVal, "ROOT", 4);
+ U_STRING_DECL(te_inVal, "TE_IN", 5);
+
+ U_STRING_INIT(rootVal, "ROOT", 4);
+ U_STRING_INIT(te_inVal, "TE_IN", 5);
+
+ testdatapath=loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+
+ log_verbose("Testing ures_open()......\n");
+
+ empty = ures_open(testdatapath, "testempty", &status);
+ if(empty == NULL || U_FAILURE(status)) {
+ log_err("opening empty failed!\n");
+ }
+ ures_close(empty);
+
+ test1=ures_open(testdatapath, NULL, &err);
+
+ if(U_FAILURE(err))
+ {
+ log_err("construction of NULL did not succeed : %s \n", myErrorName(status));
+ return;
+ }
+ test2=ures_open(testdatapath, locale, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("construction of %s did not succeed : %s \n", locale, myErrorName(status));
+ return;
+ }
+ result1= tres_getString(test1, -1, "string_in_Root_te_te_IN", &len1, &err);
+ result2= tres_getString(test2, -1, "string_in_Root_te_te_IN", &len2, &err);
+ if (U_FAILURE(err) || len1==0 || len2==0) {
+ log_err("Something threw an error in TestConstruction(): %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("for string_in_Root_te_te_IN, default.txt had %s\n", u_austrcpy(verboseOutput, result1));
+ log_verbose("for string_in_Root_te_te_IN, te_IN.txt had %s\n", u_austrcpy(verboseOutput, result2));
+ if(u_strcmp(result1, rootVal) !=0 || u_strcmp(result2, te_inVal) !=0 ){
+ log_err("construction test failed. Run Verbose for more information");
+ }
+
+
+ /* Test getVersionNumber*/
+ log_verbose("Testing version number\n");
+ log_verbose("for getVersionNumber : %s\n", ures_getVersionNumber(test1));
+
+ log_verbose("Testing version \n");
+ ures_getVersion(test1, versionInfo);
+ u_versionToString(versionInfo, versionString);
+
+ log_verbose("for getVersion : %s\n", versionString);
+
+ if(strcmp(versionString, ures_getVersionNumber(test1)) != 0) {
+ log_err("Versions differ: %s vs %s\n", versionString, ures_getVersionNumber(test1));
+ }
+
+ ures_close(test1);
+ ures_close(test2);
+
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+
+static UBool testTag(const char* frag,
+ UBool in_Root,
+ UBool in_te,
+ UBool in_te_IN)
+{
+ int32_t failNum = fail;
+
+ /* Make array from input params */
+
+ UBool is_in[3];
+ const char *NAME[] = { "ROOT", "TE", "TE_IN" };
+
+ /* Now try to load the desired items */
+ UResourceBundle* theBundle = NULL;
+ char tag[99];
+ char action[256];
+ UErrorCode expected_status,status = U_ZERO_ERROR,expected_resource_status = U_ZERO_ERROR;
+ UChar* base = NULL;
+ UChar* expected_string = NULL;
+ const UChar* string = NULL;
+ char buf[5];
+ char item_tag[10];
+ int32_t i,j,row,col, len;
+ int32_t actual_bundle;
+ int32_t count = 0;
+ int32_t row_count=0;
+ int32_t column_count=0;
+ int32_t index = 0;
+ int32_t tag_count= 0;
+ const char* testdatapath;
+ char verboseOutput[256];
+ UResourceBundle* array=NULL;
+ UResourceBundle* array2d=NULL;
+ UResourceBundle* tags=NULL;
+ UResourceBundle* arrayItem1=NULL;
+
+ testdatapath = loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return FALSE;
+ }
+
+ is_in[0] = in_Root;
+ is_in[1] = in_te;
+ is_in[2] = in_te_IN;
+
+ strcpy(item_tag, "tag");
+
+ for (i=0; i<bundles_count; ++i)
+ {
+ strcpy(action,"construction for ");
+ strcat(action, param[i].name);
+
+
+ status = U_ZERO_ERROR;
+
+ theBundle = ures_open(testdatapath, param[i].name, &status);
+ CONFIRM_ErrorCode(status,param[i].expected_constructor_status);
+
+ if(i == 5)
+ actual_bundle = 0; /* ne -> default */
+ else if(i == 3)
+ actual_bundle = 1; /* te_NE -> te */
+ else if(i == 4)
+ actual_bundle = 2; /* te_IN_NE -> te_IN */
+ else
+ actual_bundle = i;
+
+ expected_resource_status = U_MISSING_RESOURCE_ERROR;
+ for (j=e_te_IN; j>=e_Root; --j)
+ {
+ if (is_in[j] && param[i].inherits[j])
+ {
+
+ if(j == actual_bundle) /* it's in the same bundle OR it's a nonexistent=default bundle (5) */
+ expected_resource_status = U_ZERO_ERROR;
+ else if(j == 0)
+ expected_resource_status = U_USING_DEFAULT_WARNING;
+ else
+ expected_resource_status = U_USING_FALLBACK_WARNING;
+
+ log_verbose("%s[%d]::%s: in<%d:%s> inherits<%d:%s>. actual_bundle=%s\n",
+ param[i].name,
+ i,
+ frag,
+ j,
+ is_in[j]?"Yes":"No",
+ j,
+ param[i].inherits[j]?"Yes":"No",
+ param[actual_bundle].name);
+
+ break;
+ }
+ }
+
+ for (j=param[i].where; j>=0; --j)
+ {
+ if (is_in[j])
+ {
+ if(base != NULL) {
+ free(base);
+ base = NULL;
+ }
+ base=(UChar*)malloc(sizeof(UChar)*(strlen(NAME[j]) + 1));
+ u_uastrcpy(base,NAME[j]);
+
+ break;
+ }
+ else {
+ if(base != NULL) {
+ free(base);
+ base = NULL;
+ }
+ base = (UChar*) malloc(sizeof(UChar) * 1);
+ *base = 0x0000;
+ }
+ }
+
+ /*----string---------------------------------------------------------------- */
+
+ strcpy(tag,"string_");
+ strcat(tag,frag);
+
+ strcpy(action,param[i].name);
+ strcat(action, ".ures_getStringByKey(" );
+ strcat(action,tag);
+ strcat(action, ")");
+
+
+ status = U_ZERO_ERROR;
+ len=0;
+
+ string=tres_getString(theBundle, -1, tag, &len, &status);
+ if(U_SUCCESS(status)) {
+ expected_string=(UChar*)malloc(sizeof(UChar)*(u_strlen(base) + 4));
+ u_strcpy(expected_string,base);
+ CONFIRM_INT_EQ(len, u_strlen(expected_string));
+ }else{
+ expected_string = (UChar*)malloc(sizeof(UChar)*(u_strlen(kERROR) + 1));
+ u_strcpy(expected_string,kERROR);
+ string=kERROR;
+ }
+ log_verbose("%s got %d, expected %d\n", action, status, expected_resource_status);
+
+ CONFIRM_ErrorCode(status, expected_resource_status);
+ CONFIRM_EQ(string, expected_string);
+
+
+
+ /*--------------array------------------------------------------------- */
+
+ strcpy(tag,"array_");
+ strcat(tag,frag);
+
+ strcpy(action,param[i].name);
+ strcat(action, ".ures_getByKey(" );
+ strcat(action,tag);
+ strcat(action, ")");
+
+ len=0;
+
+ count = kERROR_COUNT;
+ status = U_ZERO_ERROR;
+ array=ures_getByKey(theBundle, tag, array, &status);
+ CONFIRM_ErrorCode(status,expected_resource_status);
+ if (U_SUCCESS(status)) {
+ /*confirm the resource type is an array*/
+ CONFIRM_INT_EQ(ures_getType(array), URES_ARRAY);
+ /*confirm the size*/
+ count=ures_getSize(array);
+ CONFIRM_INT_GE(count,1);
+ for (j=0; j<count; ++j) {
+ UChar element[3];
+ u_strcpy(expected_string, base);
+ u_uastrcpy(element, itoa1(j,buf));
+ u_strcat(expected_string, element);
+ arrayItem1=ures_getNextResource(array, arrayItem1, &status);
+ if(U_SUCCESS(status)){
+ CONFIRM_EQ(tres_getString(arrayItem1, -1, NULL, &len, &status),expected_string);
+ }
+ }
+
+ }
+ else {
+ CONFIRM_INT_EQ(count,kERROR_COUNT);
+ CONFIRM_ErrorCode(status, U_MISSING_RESOURCE_ERROR);
+ /*CONFIRM_INT_EQ((int32_t)(unsigned long)array,(int32_t)0);*/
+ count = 0;
+ }
+
+ /*--------------arrayItem------------------------------------------------- */
+
+ strcpy(tag,"array_");
+ strcat(tag,frag);
+
+ strcpy(action,param[i].name);
+ strcat(action, ".ures_getStringByIndex(");
+ strcat(action, tag);
+ strcat(action, ")");
+
+
+ for (j=0; j<10; ++j){
+ index = count ? (randi(count * 3) - count) : (randi(200) - 100);
+ status = U_ZERO_ERROR;
+ string=kERROR;
+ array=ures_getByKey(theBundle, tag, array, &status);
+ if(!U_FAILURE(status)){
+ UChar *t=NULL;
+ t=(UChar*)ures_getStringByIndex(array, index, &len, &status);
+ if(!U_FAILURE(status)){
+ UChar element[3];
+ string=t;
+ u_strcpy(expected_string, base);
+ u_uastrcpy(element, itoa1(index,buf));
+ u_strcat(expected_string, element);
+ } else {
+ u_strcpy(expected_string, kERROR);
+ }
+
+ }
+ expected_status = (index >= 0 && index < count) ? expected_resource_status : U_MISSING_RESOURCE_ERROR;
+ CONFIRM_ErrorCode(status,expected_status);
+ CONFIRM_EQ(string,expected_string);
+
+ }
+
+
+ /*--------------2dArray------------------------------------------------- */
+
+ strcpy(tag,"array_2d_");
+ strcat(tag,frag);
+
+ strcpy(action,param[i].name);
+ strcat(action, ".ures_getByKey(" );
+ strcat(action,tag);
+ strcat(action, ")");
+
+
+
+ row_count = kERROR_COUNT, column_count = kERROR_COUNT;
+ status = U_ZERO_ERROR;
+ array2d=ures_getByKey(theBundle, tag, array2d, &status);
+
+ CONFIRM_ErrorCode(status,expected_resource_status);
+ if (U_SUCCESS(status))
+ {
+ /*confirm the resource type is an 2darray*/
+ CONFIRM_INT_EQ(ures_getType(array2d), URES_ARRAY);
+ row_count=ures_getSize(array2d);
+ CONFIRM_INT_GE(row_count,1);
+
+ for(row=0; row<row_count; ++row){
+ UResourceBundle *tableRow=NULL;
+ tableRow=ures_getByIndex(array2d, row, tableRow, &status);
+ CONFIRM_ErrorCode(status, expected_resource_status);
+ if(U_SUCCESS(status)){
+ /*confirm the resourcetype of each table row is an array*/
+ CONFIRM_INT_EQ(ures_getType(tableRow), URES_ARRAY);
+ column_count=ures_getSize(tableRow);
+ CONFIRM_INT_GE(column_count,1);
+
+ for (col=0; j<column_count; ++j) {
+ UChar element[3];
+ u_strcpy(expected_string, base);
+ u_uastrcpy(element, itoa1(row, buf));
+ u_strcat(expected_string, element);
+ u_uastrcpy(element, itoa1(col, buf));
+ u_strcat(expected_string, element);
+ arrayItem1=ures_getNextResource(tableRow, arrayItem1, &status);
+ if(U_SUCCESS(status)){
+ const UChar *stringValue=tres_getString(arrayItem1, -1, NULL, &len, &status);
+ CONFIRM_EQ(stringValue, expected_string);
+ }
+ }
+ }
+ ures_close(tableRow);
+ }
+ }else{
+ CONFIRM_INT_EQ(row_count,kERROR_COUNT);
+ CONFIRM_INT_EQ(column_count,kERROR_COUNT);
+ row_count=column_count=0;
+ }
+
+
+ /*------2dArrayItem-------------------------------------------------------------- */
+ /* 2dArrayItem*/
+ for (j=0; j<10; ++j)
+ {
+ row = row_count ? (randi(row_count * 3) - row_count) : (randi(200) - 100);
+ col = column_count ? (randi(column_count * 3) - column_count) : (randi(200) - 100);
+ status = U_ZERO_ERROR;
+ string = kERROR;
+ len=0;
+ array2d=ures_getByKey(theBundle, tag, array2d, &status);
+ if(U_SUCCESS(status)){
+ UResourceBundle *tableRow=NULL;
+ tableRow=ures_getByIndex(array2d, row, tableRow, &status);
+ if(U_SUCCESS(status)) {
+ UChar *t=NULL;
+ t=(UChar*)ures_getStringByIndex(tableRow, col, &len, &status);
+ if(U_SUCCESS(status)){
+ string=t;
+ }
+ }
+ ures_close(tableRow);
+ }
+ expected_status = (row >= 0 && row < row_count && col >= 0 && col < column_count) ?
+ expected_resource_status: U_MISSING_RESOURCE_ERROR;
+ CONFIRM_ErrorCode(status,expected_status);
+
+ if (U_SUCCESS(status)){
+ UChar element[3];
+ u_strcpy(expected_string, base);
+ u_uastrcpy(element, itoa1(row, buf));
+ u_strcat(expected_string, element);
+ u_uastrcpy(element, itoa1(col, buf));
+ u_strcat(expected_string, element);
+ } else {
+ u_strcpy(expected_string,kERROR);
+ }
+ CONFIRM_EQ(string,expected_string);
+
+ }
+
+
+ /*--------------taggedArray----------------------------------------------- */
+ strcpy(tag,"tagged_array_");
+ strcat(tag,frag);
+
+ strcpy(action,param[i].name);
+ strcat(action,".ures_getByKey(");
+ strcat(action, tag);
+ strcat(action,")");
+
+
+ status = U_ZERO_ERROR;
+ tag_count=0;
+ tags=ures_getByKey(theBundle, tag, tags, &status);
+ CONFIRM_ErrorCode(status, expected_resource_status);
+ if (U_SUCCESS(status)) {
+ UResType bundleType=ures_getType(tags);
+ CONFIRM_INT_EQ(bundleType, URES_TABLE);
+
+ tag_count=ures_getSize(tags);
+ CONFIRM_INT_GE((int32_t)tag_count, (int32_t)0);
+
+ for(index=0; index <tag_count; index++){
+ UResourceBundle *tagelement=NULL;
+ const char *key=NULL;
+ UChar* value=NULL;
+ tagelement=ures_getByIndex(tags, index, tagelement, &status);
+ key=ures_getKey(tagelement);
+ value=(UChar*)ures_getNextString(tagelement, &len, &key, &status);
+ log_verbose("tag = %s, value = %s\n", key, u_austrcpy(verboseOutput, value));
+ if(strncmp(key, "tag", 3) == 0 && u_strncmp(value, base, u_strlen(base)) == 0){
+ record_pass();
+ }else{
+ record_fail();
+ }
+ ures_close(tagelement);
+ }
+ }else{
+ tag_count=0;
+ }
+
+ /*---------taggedArrayItem----------------------------------------------*/
+ count = 0;
+ for (index=-20; index<20; ++index)
+ {
+
+ status = U_ZERO_ERROR;
+ string = kERROR;
+ strcpy(item_tag, "tag");
+ strcat(item_tag, itoa1(index,buf));
+ tags=ures_getByKey(theBundle, tag, tags, &status);
+ if(U_SUCCESS(status)){
+ UResourceBundle *tagelement=NULL;
+ UChar *t=NULL;
+ tagelement=ures_getByKey(tags, item_tag, tagelement, &status);
+ if(!U_FAILURE(status)){
+ UResType elementType=ures_getType(tagelement);
+ CONFIRM_INT_EQ(elementType, URES_STRING);
+ if(strcmp(ures_getKey(tagelement), item_tag) == 0){
+ record_pass();
+ }else{
+ record_fail();
+ }
+ t=(UChar*)tres_getString(tagelement, -1, NULL, &len, &status);
+ if(!U_FAILURE(status)){
+ string=t;
+ }
+ }
+ if (index < 0) {
+ CONFIRM_ErrorCode(status,U_MISSING_RESOURCE_ERROR);
+ }
+ else{
+ if (status != U_MISSING_RESOURCE_ERROR) {
+ UChar element[3];
+ u_strcpy(expected_string, base);
+ u_uastrcpy(element, itoa1(index,buf));
+ u_strcat(expected_string, element);
+ CONFIRM_EQ(string,expected_string);
+ count++;
+ }
+ }
+ ures_close(tagelement);
+ }
+ }
+ CONFIRM_INT_EQ(count, tag_count);
+
+ free(expected_string);
+ ures_close(theBundle);
+ }
+ ures_close(array);
+ ures_close(array2d);
+ ures_close(tags);
+ ures_close(arrayItem1);
+ free(base);
+ return (UBool)(failNum == fail);
+}
+
+static void record_pass()
+{
+ ++pass;
+}
+
+static void record_fail()
+{
+ ++fail;
+}
+
+/**
+ * Test to make sure that the U_USING_FALLBACK_ERROR and U_USING_DEFAULT_ERROR
+ * are set correctly
+ */
+
+static void TestFallback()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *fr_FR = NULL;
+ UResourceBundle *subResource = NULL;
+ const UChar *junk; /* ignored */
+ int32_t resultLen;
+
+ log_verbose("Opening fr_FR..");
+ fr_FR = ures_open(NULL, "fr_FR", &status);
+ if(U_FAILURE(status))
+ {
+ log_err("Couldn't open fr_FR - %d\n", status);
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+
+
+ /* clear it out.. just do some calls to get the gears turning */
+ junk = tres_getString(fr_FR, -1, "LocaleID", &resultLen, &status);
+ status = U_ZERO_ERROR;
+ junk = tres_getString(fr_FR, -1, "LocaleString", &resultLen, &status);
+ status = U_ZERO_ERROR;
+ junk = tres_getString(fr_FR, -1, "LocaleID", &resultLen, &status);
+ status = U_ZERO_ERROR;
+
+ /* OK first one. This should be a Default value. */
+ subResource = ures_getByKey(fr_FR, "MeasurementSystem", NULL, &status);
+ if(status != U_USING_DEFAULT_WARNING)
+ {
+ log_data_err("Expected U_USING_DEFAULT_ERROR when trying to get CurrencyMap from fr_FR, got %s\n",
+ u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ ures_close(subResource);
+
+ /* and this is a Fallback, to fr */
+ junk = tres_getString(fr_FR, -1, "Countries", &resultLen, &status);
+ if(status != U_USING_FALLBACK_WARNING)
+ {
+ log_data_err("Expected U_USING_FALLBACK_ERROR when trying to get Countries from fr_FR, got %d\n",
+ status);
+ }
+
+ status = U_ZERO_ERROR;
+
+ ures_close(fr_FR);
+ /* Temporary hack err actually should be U_USING_FALLBACK_ERROR */
+ /* Test Jitterbug 552 fallback mechanism of aliased data */
+ {
+ UErrorCode err =U_ZERO_ERROR;
+ UResourceBundle* myResB = ures_open(NULL,"no_NO_NY",&err);
+ UResourceBundle* resLocID = ures_getByKey(myResB, "Version", NULL, &err);
+ UResourceBundle* tResB;
+ const UChar* version = NULL;
+ static const UChar versionStr[] = { 0x0031, 0x002E, 0x0034, 0x0033, 0x0000};
+
+ if(err != U_ZERO_ERROR){
+ log_data_err("Expected U_ZERO_ERROR when trying to test no_NO_NY aliased to nn_NO for Version err=%s\n",u_errorName(err));
+ return;
+ }
+ version = tres_getString(resLocID, -1, NULL, &resultLen, &err);
+ if(u_strcmp(version, versionStr) != 0){
+ char x[100];
+ char g[100];
+ u_austrcpy(x, versionStr);
+ u_austrcpy(g, version);
+ log_data_err("ures_getString(resLocID, &resultLen, &err) returned an unexpected version value. Expected '%s', but got '%s'\n",
+ x, g);
+ }
+ tResB = ures_getByKey(myResB, "zoneStrings", NULL, &err);
+ if(err != U_USING_FALLBACK_WARNING){
+ log_err("Expected U_USING_FALLBACK_ERROR when trying to test no_NO_NY aliased with nn_NO_NY for zoneStrings err=%s\n",u_errorName(err));
+ }
+ ures_close(resLocID);
+ ures_close(myResB);
+ ures_close(tResB);
+
+ }
+
+}
+
+/* static void printUChars(UChar* uchars){
+/ int16_t i=0;
+/ for(i=0; i<u_strlen(uchars); i++){
+/ log_err("%04X ", *(uchars+i));
+/ }
+/ } */
+
+static void TestResourceLevelAliasing(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *aliasB = NULL, *tb = NULL;
+ UResourceBundle *en = NULL, *uk = NULL, *testtypes = NULL;
+ const char* testdatapath = NULL;
+ const UChar *string = NULL, *sequence = NULL;
+ /*const uint8_t *binary = NULL, *binSequence = NULL;*/
+ int32_t strLen = 0, seqLen = 0;/*, binLen = 0, binSeqLen = 0;*/
+ char buffer[100];
+ char *s;
+
+ testdatapath=loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+
+ aliasB = ures_open(testdatapath, "testaliases", &status);
+
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testaliases.res %s \n",myErrorName(status));
+ return;
+ }
+ /* this should fail - circular alias */
+ tb = ures_getByKey(aliasB, "aaa", tb, &status);
+ if(status != U_TOO_MANY_ALIASES_ERROR) {
+ log_err("Failed to detect circular alias\n");
+ }
+ else {
+ status = U_ZERO_ERROR;
+ }
+ tb = ures_getByKey(aliasB, "aab", tb, &status);
+ if(status != U_TOO_MANY_ALIASES_ERROR) {
+ log_err("Failed to detect circular alias\n");
+ } else {
+ status = U_ZERO_ERROR;
+ }
+ if(U_FAILURE(status) ) {
+ log_data_err("err loading tb resource\n");
+ } else {
+ /* testing aliasing to a non existing resource */
+ tb = ures_getByKey(aliasB, "nonexisting", tb, &status);
+ if(status != U_MISSING_RESOURCE_ERROR) {
+ log_err("Managed to find an alias to non-existing resource\n");
+ } else {
+ status = U_ZERO_ERROR;
+ }
+ /* testing referencing/composed alias */
+ uk = ures_findResource("ja/LocaleScript/2", uk, &status);
+ if((uk == NULL) || U_FAILURE(status)) {
+ log_err("Couldn't findResource('ja/LocaleScript/2') err %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ sequence = tres_getString(uk, -1, NULL, &seqLen, &status);
+
+ tb = ures_getByKey(aliasB, "referencingalias", tb, &status);
+ string = tres_getString(tb, -1, NULL, &strLen, &status);
+
+ if(seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) {
+ log_err("Referencing alias didn't get the right string\n");
+ }
+
+ string = tres_getString(aliasB, -1, "referencingalias", &strLen, &status);
+ if(seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) {
+ log_err("Referencing alias didn't get the right string\n");
+ }
+
+ checkStatus(__LINE__, U_ZERO_ERROR, status);
+ tb = ures_getByKey(aliasB, "LocaleScript", tb, &status);
+ checkStatus(__LINE__, U_ZERO_ERROR, status);
+ tb = ures_getByIndex(tb, 2, tb, &status);
+ checkStatus(__LINE__, U_ZERO_ERROR, status);
+ string = tres_getString(tb, -1, NULL, &strLen, &status);
+ checkStatus(__LINE__, U_ZERO_ERROR, status);
+
+ if(U_FAILURE(status)) {
+ log_err("%s trying to get string via separate getters\n", u_errorName(status));
+ } else if(seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) {
+ log_err("Referencing alias didn't get the right string\n");
+ }
+
+
+ {
+ UResourceBundle* ja = ures_open(U_ICUDATA_BRKITR,"ja", &status);
+ const UChar *got = NULL, *exp=NULL;
+ int32_t gotLen = 0, expLen=0;
+ ja = ures_getByKey(ja, "boundaries", ja, &status);
+ exp = tres_getString(ja, -1, "word", &expLen, &status);
+
+ tb = ures_getByKey(aliasB, "boundaries", tb, &status);
+ got = tres_getString(tb, -1, "word", &gotLen, &status);
+
+ if(U_FAILURE(status)) {
+ log_err("%s trying to read str boundaries\n", u_errorName(status));
+ } else if(gotLen != expLen || u_strncmp(exp, got, gotLen) != 0) {
+ log_err("Referencing alias didn't get the right data\n");
+ }
+ ures_close(ja);
+ status = U_ZERO_ERROR;
+ }
+ /* simple alias */
+ testtypes = ures_open(testdatapath, "testtypes", &status);
+ strcpy(buffer, "menu/file/open");
+ s = buffer;
+ uk = ures_findSubResource(testtypes, s, uk, &status);
+ sequence = tres_getString(uk, -1, NULL, &seqLen, &status);
+
+ tb = ures_getByKey(aliasB, "simplealias", tb, &status);
+ string = tres_getString(tb, -1, NULL, &strLen, &status);
+
+ if(U_FAILURE(status) || seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) {
+ log_err("Referencing alias didn't get the right string\n");
+ }
+
+ /* test indexed aliasing */
+
+ tb = ures_getByKey(aliasB, "zoneTests", tb, &status);
+ tb = ures_getByKey(tb, "zoneAlias2", tb, &status);
+ string = tres_getString(tb, -1, NULL, &strLen, &status);
+
+ en = ures_findResource("en/zoneStrings/3/0", en, &status);
+ sequence = tres_getString(en, -1, NULL, &seqLen, &status);
+
+ if(U_FAILURE(status) || seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) {
+ log_err("Referencing alias didn't get the right string\n");
+ }
+ }
+ /* test getting aliased string by index */
+ {
+ const char* keys[] = {
+ "KeyAlias0PST",
+ "KeyAlias1PacificStandardTime",
+ "KeyAlias2PDT",
+ "KeyAlias3LosAngeles"
+ };
+
+ const char* strings[] = {
+ "America/Los_Angeles",
+ "Pacific Standard Time",
+ "PDT",
+ "Los Angeles",
+ };
+ UChar uBuffer[256];
+ const UChar* result;
+ int32_t uBufferLen = 0, resultLen = 0;
+ int32_t i = 0;
+ const char *key = NULL;
+ tb = ures_getByKey(aliasB, "testGetStringByKeyAliasing", tb, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't get testGetStringByKeyAliasing resource\n");
+ }
+ for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
+ result = tres_getString(tb, -1, keys[i], &resultLen, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status));
+ continue;
+ }
+ uBufferLen = u_unescape(strings[i], uBuffer, 256);
+ if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
+ log_err("Didn't get correct string while accesing alias table by key (%s)\n", keys[i]);
+ }
+ }
+ for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
+ result = tres_getString(tb, i, NULL, &resultLen, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status));
+ continue;
+ }
+ uBufferLen = u_unescape(strings[i], uBuffer, 256);
+ if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
+ log_err("Didn't get correct string while accesing alias table by index (%s)\n", strings[i]);
+ }
+ }
+ for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
+ result = ures_getNextString(tb, &resultLen, &key, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status));
+ continue;
+ }
+ uBufferLen = u_unescape(strings[i], uBuffer, 256);
+ if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
+ log_err("Didn't get correct string while iterating over alias table (%s)\n", strings[i]);
+ }
+ }
+ tb = ures_getByKey(aliasB, "testGetStringByIndexAliasing", tb, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't get testGetStringByIndexAliasing resource\n");
+ }
+ for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
+ result = tres_getString(tb, i, NULL, &resultLen, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status));
+ continue;
+ }
+ uBufferLen = u_unescape(strings[i], uBuffer, 256);
+ if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
+ log_err("Didn't get correct string while accesing alias by index in an array (%s)\n", strings[i]);
+ }
+ }
+ for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
+ result = ures_getNextString(tb, &resultLen, &key, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status));
+ continue;
+ }
+ uBufferLen = u_unescape(strings[i], uBuffer, 256);
+ if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
+ log_err("Didn't get correct string while iterating over aliases in an array (%s)\n", strings[i]);
+ }
+ }
+ }
+ tb = ures_getByKey(aliasB, "testAliasToTree", tb, &status);
+ if(U_FAILURE(status)){
+ log_err("Fetching the resource with key \"testAliasToTree\" failed. Error: %s\n", u_errorName(status));
+ }
+ if (strcmp(ures_getKey(tb), "collations") != 0) {
+ log_err("ures_getKey(aliasB) unexpectedly returned %s instead of \"collations\"\n", ures_getKey(tb));
+ }
+cleanup:
+ ures_close(aliasB);
+ ures_close(tb);
+ ures_close(en);
+ ures_close(uk);
+ ures_close(testtypes);
+}
+
+static void TestDirectAccess(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *t = NULL, *t2 = NULL;
+ const char* key = NULL;
+
+ char buffer[100];
+ char *s;
+ /*const char* testdatapath=loadTestData(&status);
+ if(U_FAILURE(status)){
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }*/
+
+ t = ures_findResource("/testdata/te/zoneStrings/3/2", t, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't access indexed resource, error %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ } else {
+ key = ures_getKey(t);
+ if(key != NULL) {
+ log_err("Got a strange key, expected NULL, got %s\n", key);
+ }
+ }
+ t = ures_findResource("en/calendar/gregorian/DateTimePatterns/3", t, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't access indexed resource, error %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ } else {
+ key = ures_getKey(t);
+ if(key != NULL) {
+ log_err("Got a strange key, expected NULL, got %s\n", key);
+ }
+ }
+
+ t = ures_findResource("ja/LocaleScript", t, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't access keyed resource, error %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ } else {
+ key = ures_getKey(t);
+ if(strcmp(key, "LocaleScript")!=0) {
+ log_err("Got a strange key, expected 'LocaleScript', got %s\n", key);
+ }
+ }
+
+ t2 = ures_open(NULL, "sr", &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't open 'sr' resource bundle, error %s\n", u_errorName(status));
+ log_data_err("No 'sr', no test - you have bigger problems than testing direct access. "
+ "You probably have no data! Aborting this test\n");
+ }
+
+ if(U_SUCCESS(status)) {
+ strcpy(buffer, "Languages/hr");
+ s = buffer;
+ t = ures_findSubResource(t2, s, t, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't access keyed resource, error %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ } else {
+ key = ures_getKey(t);
+ if(strcmp(key, "hr")!=0) {
+ log_err("Got a strange key, expected 'hr', got %s\n", key);
+ }
+ }
+ }
+
+ t = ures_findResource("root/calendar/islamic-civil/DateTime", t, &status);
+ if(U_SUCCESS(status)) {
+ log_err("This resource does not exist. How did it get here?\n");
+ }
+ status = U_ZERO_ERROR;
+
+ /* this one will freeze */
+ t = ures_findResource("root/calendar/islamic-civil/eras/abbreviated/0/mikimaus/pera", t, &status);
+ if(U_SUCCESS(status)) {
+ log_err("Second resource does not exist. How did it get here?\n");
+ }
+ status = U_ZERO_ERROR;
+
+ ures_close(t2);
+ t2 = ures_open(NULL, "he", &status);
+ t2 = ures_getByKeyWithFallback(t2, "calendar", t2, &status);
+ t2 = ures_getByKeyWithFallback(t2, "islamic-civil", t2, &status);
+ t2 = ures_getByKeyWithFallback(t2, "DateTime", t2, &status);
+ if(U_SUCCESS(status)) {
+ log_err("This resource does not exist. How did it get here?\n");
+ }
+ status = U_ZERO_ERROR;
+
+ ures_close(t2);
+ t2 = ures_open(NULL, "he", &status);
+ /* George's fix */
+ t2 = ures_getByKeyWithFallback(t2, "calendar", t2, &status);
+ t2 = ures_getByKeyWithFallback(t2, "islamic-civil", t2, &status);
+ t2 = ures_getByKeyWithFallback(t2, "eras", t2, &status);
+ if(U_FAILURE(status)) {
+ log_err("Didn't get Eras. I know they are there!\n");
+ }
+ status = U_ZERO_ERROR;
+
+ ures_close(t2);
+ t2 = ures_open(NULL, "root", &status);
+ t2 = ures_getByKeyWithFallback(t2, "calendar", t2, &status);
+ t2 = ures_getByKeyWithFallback(t2, "islamic-civil", t2, &status);
+ t2 = ures_getByKeyWithFallback(t2, "DateTime", t2, &status);
+ if(U_SUCCESS(status)) {
+ log_err("This resource does not exist. How did it get here?\n");
+ }
+ status = U_ZERO_ERROR;
+
+ ures_close(t2);
+ ures_close(t);
+}
+
+static void TestJB3763(void) {
+ /* Nasty bug prevented using parent as fill-in, since it would
+ * stomp the path information.
+ */
+ UResourceBundle *t = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ t = ures_open(NULL, "sr_Latn", &status);
+ t = ures_getByKeyWithFallback(t, "calendar", t, &status);
+ t = ures_getByKeyWithFallback(t, "gregorian", t, &status);
+ t = ures_getByKeyWithFallback(t, "AmPmMarkers", t, &status);
+ if(U_FAILURE(status)) {
+ log_err("This resource should be available?\n");
+ }
+ status = U_ZERO_ERROR;
+
+ ures_close(t);
+
+}
+
+static void TestGetKeywordValues(void) {
+ UEnumeration *kwVals;
+ UBool foundStandard = FALSE;
+ UErrorCode status = U_ZERO_ERROR;
+ const char *kw;
+#if !UCONFIG_NO_COLLATION
+ kwVals = ures_getKeywordValues( U_ICUDATA_COLL, "collations", &status);
+
+ log_verbose("Testing getting collation keyword values:\n");
+
+ while((kw=uenum_next(kwVals, NULL, &status))) {
+ log_verbose(" %s\n", kw);
+ if(!strcmp(kw,"standard")) {
+ if(foundStandard == FALSE) {
+ foundStandard = TRUE;
+ } else {
+ log_err("'standard' was found twice in the keyword list.\n");
+ }
+ }
+ }
+ if(foundStandard == FALSE) {
+ log_err("'standard' was not found in the keyword list.\n");
+ }
+ uenum_close(kwVals);
+ if(U_FAILURE(status)) {
+ log_err("err %s getting collation values\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+#endif
+ foundStandard = FALSE;
+ kwVals = ures_getKeywordValues( "ICUDATA", "calendar", &status);
+
+ log_verbose("Testing getting calendar keyword values:\n");
+
+ while((kw=uenum_next(kwVals, NULL, &status))) {
+ log_verbose(" %s\n", kw);
+ if(!strcmp(kw,"japanese")) {
+ if(foundStandard == FALSE) {
+ foundStandard = TRUE;
+ } else {
+ log_err("'japanese' was found twice in the calendar keyword list.\n");
+ }
+ }
+ }
+ if(foundStandard == FALSE) {
+ log_err("'japanese' was not found in the calendar keyword list.\n");
+ }
+ uenum_close(kwVals);
+ if(U_FAILURE(status)) {
+ log_err("err %s getting calendar values\n", u_errorName(status));
+ }
+}
+
+static void TestGetFunctionalEquivalentOf(const char *path, const char *resName, const char *keyword, UBool truncate, const char * const testCases[]) {
+ int32_t i;
+ for(i=0;testCases[i];i+=3) {
+ UBool expectAvail = (testCases[i][0]=='t')?TRUE:FALSE;
+ UBool gotAvail = FALSE;
+ const char *inLocale = testCases[i+1];
+ const char *expectLocale = testCases[i+2];
+ char equivLocale[256];
+ int32_t len;
+ UErrorCode status = U_ZERO_ERROR;
+ log_verbose("%d: %c %s\texpect %s\n",i/3, expectAvail?'t':'f', inLocale, expectLocale);
+ len = ures_getFunctionalEquivalent(equivLocale, 255, path,
+ resName, keyword, inLocale,
+ &gotAvail, truncate, &status);
+ if(U_FAILURE(status) || (len <= 0)) {
+ log_err("FAIL: got len %d, err %s on #%d: %c\t%s\t%s\n",
+ len, u_errorName(status),
+ i/3,expectAvail?'t':'f', inLocale, expectLocale);
+ } else {
+ log_verbose("got: %c %s\n", expectAvail?'t':'f',equivLocale);
+
+ if((gotAvail != expectAvail) || strcmp(equivLocale, expectLocale)) {
+ log_err("FAIL: got avail=%c, loc=%s but expected #%d: %c\t%s\t-> loc=%s\n",
+ gotAvail?'t':'f', equivLocale,
+ i/3,
+ expectAvail?'t':'f', inLocale, expectLocale);
+
+ }
+ }
+ }
+}
+
+static void TestGetFunctionalEquivalent(void) {
+ static const char * const collCases[] = {
+ /* avail locale equiv */
+ "f", "de_US_CALIFORNIA", "de",
+ "f", "zh_TW@collation=stroke", "zh@collation=stroke", /* alias of zh_Hant_TW */
+ "t", "zh_Hant_TW@collation=stroke", "zh@collation=stroke",
+ "f", "de_CN@collation=pinyin", "de",
+ "t", "zh@collation=pinyin", "zh",
+ "f", "zh_CN@collation=pinyin", "zh", /* alias of zh_Hans_CN */
+ "t", "zh_Hans_CN@collation=pinyin", "zh",
+ "f", "zh_HK@collation=pinyin", "zh", /* alias of zh_Hant_HK */
+ "t", "zh_Hant_HK@collation=pinyin", "zh",
+ "f", "zh_HK@collation=stroke", "zh@collation=stroke", /* alias of zh_Hant_HK */
+ "t", "zh_Hant_HK@collation=stroke", "zh@collation=stroke",
+ "f", "zh_HK", "zh@collation=stroke", /* alias of zh_Hant_HK */
+ "t", "zh_Hant_HK", "zh@collation=stroke",
+ "f", "zh_MO", "zh@collation=stroke", /* alias of zh_Hant_MO */
+ "t", "zh_Hant_MO", "zh@collation=stroke",
+ "f", "zh_TW_STROKE", "zh@collation=stroke",
+ "f", "zh_TW_STROKE@collation=big5han", "zh@collation=big5han",
+ "f", "de_CN@calendar=japanese", "de",
+ "t", "de@calendar=japanese", "de",
+ "f", "zh_TW@collation=big5han", "zh@collation=big5han", /* alias of zh_Hant_TW */
+ "t", "zh_Hant_TW@collation=big5han", "zh@collation=big5han",
+ "f", "zh_TW@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hant_TW */
+ "t", "zh_Hant_TW@collation=gb2312han", "zh@collation=gb2312han",
+ "f", "zh_CN@collation=big5han", "zh@collation=big5han", /* alias of zh_Hans_CN */
+ "t", "zh_Hans_CN@collation=big5han", "zh@collation=big5han",
+ "f", "zh_CN@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hans_CN */
+ "t", "zh_Hans_CN@collation=gb2312han", "zh@collation=gb2312han",
+ "t", "zh@collation=big5han", "zh@collation=big5han",
+ "t", "zh@collation=gb2312han", "zh@collation=gb2312han",
+ "t", "hi_IN@collation=direct", "hi@collation=direct",
+ "t", "hi@collation=standard", "hi",
+ "t", "hi@collation=direct", "hi@collation=direct",
+ "f", "hi_AU@collation=direct;currency=CHF;calendar=buddhist", "hi@collation=direct",
+ "f", "hi_AU@collation=standard;currency=CHF;calendar=buddhist", "hi",
+ "t", "de_DE@collation=pinyin", "de", /* bug 4582 tests */
+ "f", "de_DE_BONN@collation=pinyin", "de",
+ "t", "nl", "root",
+ "t", "nl_NL", "root",
+ "f", "nl_NL_EEXT", "root",
+ "t", "nl@collation=stroke", "root",
+ "t", "nl_NL@collation=stroke", "root",
+ "f", "nl_NL_EEXT@collation=stroke", "root",
+ NULL
+ };
+
+ static const char *calCases[] = {
+ /* avail locale equiv */
+ "t", "en_US_POSIX", "en_US@calendar=gregorian",
+ "f", "ja_JP_TOKYO", "ja_JP@calendar=gregorian",
+ "f", "ja_JP_TOKYO@calendar=japanese", "ja@calendar=japanese",
+ "t", "sr@calendar=gregorian", "sr@calendar=gregorian",
+ "t", "en", "en@calendar=gregorian",
+ NULL
+ };
+
+#if !UCONFIG_NO_COLLATION
+ TestGetFunctionalEquivalentOf(U_ICUDATA_COLL, "collations", "collation", TRUE, collCases);
+#endif
+ TestGetFunctionalEquivalentOf("ICUDATA", "calendar", "calendar", FALSE, calCases);
+
+#if !UCONFIG_NO_COLLATION
+ log_verbose("Testing error conditions:\n");
+ {
+ char equivLocale[256] = "???";
+ int32_t len;
+ UErrorCode status = U_ZERO_ERROR;
+ UBool gotAvail = FALSE;
+
+ len = ures_getFunctionalEquivalent(equivLocale, 255, U_ICUDATA_COLL,
+ "calendar", "calendar", "ar_EG@calendar=islamic",
+ &gotAvail, FALSE, &status);
+
+ if(status == U_MISSING_RESOURCE_ERROR) {
+ log_verbose("PASS: Got expected U_MISSING_RESOURCE_ERROR\n");
+ } else {
+ log_err("ures_getFunctionalEquivalent returned locale %s, avail %c, err %s, but expected U_MISSING_RESOURCE_ERROR \n",
+ equivLocale, gotAvail?'t':'f', u_errorName(status));
+ }
+ }
+#endif
+}
+
+static void TestXPath(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *rb = NULL, *alias = NULL;
+ int32_t len = 0;
+ const UChar* result = NULL;
+ const UChar expResult[] = { 0x0063, 0x006F, 0x0072, 0x0072, 0x0065, 0x0063, 0x0074, 0x0000 }; /* "correct" */
+ /*const UChar expResult[] = { 0x0074, 0x0065, 0x0069, 0x006E, 0x0064, 0x0065, 0x0073, 0x0074, 0x0000 }; *//*teindest*/
+
+ const char *testdatapath=loadTestData(&status);
+ if(U_FAILURE(status))
+ {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+
+ log_verbose("Testing ures_open()......\n");
+
+ rb = ures_open(testdatapath, "te_IN", &status);
+ if(U_FAILURE(status)) {
+ log_err("Could not open te_IN (%s)\n", myErrorName(status));
+ return;
+ }
+ alias = ures_getByKey(rb, "rootAliasClient", alias, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't find the aliased resource (%s)\n", myErrorName(status));
+ ures_close(rb);
+ return;
+ }
+
+ result = tres_getString(alias, -1, NULL, &len, &status);
+ if(U_FAILURE(status) || result == NULL || u_strcmp(result, expResult)) {
+ log_err("Couldn't get correct string value (%s)\n", myErrorName(status));
+ }
+
+ alias = ures_getByKey(rb, "aliasClient", alias, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't find the aliased resource (%s)\n", myErrorName(status));
+ ures_close(rb);
+ return;
+ }
+
+ result = tres_getString(alias, -1, NULL, &len, &status);
+ if(U_FAILURE(status) || result == NULL || u_strcmp(result, expResult)) {
+ log_err("Couldn't get correct string value (%s)\n", myErrorName(status));
+ }
+
+ alias = ures_getByKey(rb, "nestedRootAliasClient", alias, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't find the aliased resource (%s)\n", myErrorName(status));
+ ures_close(rb);
+ return;
+ }
+
+ result = tres_getString(alias, -1, NULL, &len, &status);
+ if(U_FAILURE(status) || result == NULL || u_strcmp(result, expResult)) {
+ log_err("Couldn't get correct string value (%s)\n", myErrorName(status));
+ }
+
+ ures_close(alias);
+ ures_close(rb);
+}
+static void TestCLDRStyleAliases(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *rb = NULL, *alias = NULL, *a=NULL;
+ int32_t i, len;
+ char resource[256];
+ const UChar *result = NULL;
+ UChar expected[256];
+ const char *expects[7] = { "", "a41", "a12", "a03", "ar4" };
+ const char *testdatapath=loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat %s \n",myErrorName(status));
+ return;
+ }
+ log_verbose("Testing CLDR style aliases......\n");
+
+ rb = ures_open(testdatapath, "te_IN_REVISED", &status);
+ if(U_FAILURE(status)) {
+ log_err("Could not open te_IN (%s)\n", myErrorName(status));
+ return;
+ }
+ alias = ures_getByKey(rb, "a", alias, &status);
+ if(U_FAILURE(status)) {
+ log_err("Couldn't find the aliased with name \"a\" resource (%s)\n", myErrorName(status));
+ ures_close(rb);
+ return;
+ }
+ for(i = 1; i < 5 ; i++) {
+ resource[0]='a';
+ resource[1]='0'+i;
+ resource[2]=0;
+ /* instead of sprintf(resource, "a%i", i); */
+ a = ures_getByKeyWithFallback(alias, resource, a, &status);
+ result = tres_getString(a, -1, NULL, &len, &status);
+ u_charsToUChars(expects[i], expected, strlen(expects[i])+1);
+ if(U_FAILURE(status) || !result || u_strcmp(result, expected)) {
+ log_err("CLDR style aliases failed resource with name \"%s\" resource, exp %s, got %S (%s)\n", resource, expects[i], result, myErrorName(status));
+ status = U_ZERO_ERROR;
+ }
+ }
+
+ ures_close(a);
+ ures_close(alias);
+ ures_close(rb);
+}
+
+static void TestFallbackCodes(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char *testdatapath=loadTestData(&status);
+
+ UResourceBundle *res = ures_open(testdatapath, "te_IN", &status);
+
+ UResourceBundle *r = NULL, *fall = NULL;
+
+ r = ures_getByKey(res, "tagged_array_in_Root_te_te_IN", r, &status);
+
+ status = U_ZERO_ERROR;
+ fall = ures_getByKeyWithFallback(r, "tag2", fall, &status);
+
+ if(status != U_ZERO_ERROR) {
+ log_err("Expected error code to be U_ZERO_ERROR, got %s\n", u_errorName(status));
+ status = U_ZERO_ERROR;
+ }
+
+ fall = ures_getByKeyWithFallback(r, "tag7", fall, &status);
+
+ if(status != U_USING_FALLBACK_WARNING) {
+ log_err("Expected error code to be U_USING_FALLBACK_WARNING, got %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+
+ fall = ures_getByKeyWithFallback(r, "tag1", fall, &status);
+
+ if(status != U_USING_DEFAULT_WARNING) {
+ log_err("Expected error code to be U_USING_DEFAULT_WARNING, got %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+
+ ures_close(fall);
+ ures_close(r);
+ ures_close(res);
+}
+
+/* This test will crash if this doesn't work. Results don't need testing. */
+static void TestStackReuse(void) {
+ UResourceBundle table;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UResourceBundle *rb = ures_open(NULL, "en_US", &errorCode);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("Could not load en_US locale. status=%s\n",myErrorName(errorCode));
+ return;
+ }
+ ures_initStackObject(&table);
+ ures_getByKeyWithFallback(rb, "Types", &table, &errorCode);
+ ures_getByKeyWithFallback(&table, "collation", &table, &errorCode);
+ ures_close(rb);
+ ures_close(&table);
+}
+
+/* Test ures_getUTF8StringXYZ() --------------------------------------------- */
+
+/*
+ * Replace most ures_getStringXYZ() with this function which wraps the
+ * desired call and also calls the UTF-8 variant and checks that it works.
+ */
+extern const UChar *
+tres_getString(const UResourceBundle *resB,
+ int32_t index, const char *key,
+ int32_t *length,
+ UErrorCode *status) {
+ char buffer8[16];
+ char *p8;
+ const UChar *s16;
+ const char *s8;
+ UChar32 c16, c8;
+ int32_t length16, length8, i16, i8;
+ UBool forceCopy;
+
+ if(length == NULL) {
+ length = &length16;
+ }
+ if(index >= 0) {
+ s16 = ures_getStringByIndex(resB, index, length, status);
+ } else if(key != NULL) {
+ s16 = ures_getStringByKey(resB, key, length, status);
+ } else {
+ s16 = ures_getString(resB, length, status);
+ }
+ if(U_FAILURE(*status)) {
+ return s16;
+ }
+ length16 = *length;
+
+ /* try the UTF-8 variant of ures_getStringXYZ() */
+ for(forceCopy = FALSE; forceCopy <= TRUE; ++forceCopy) {
+ p8 = buffer8;
+ length8 = (int32_t)sizeof(buffer8);
+ if(index >= 0) {
+ s8 = ures_getUTF8StringByIndex(resB, index, p8, &length8, forceCopy, status);
+ } else if(key != NULL) {
+ s8 = ures_getUTF8StringByKey(resB, key, p8, &length8, forceCopy, status);
+ } else {
+ s8 = ures_getUTF8String(resB, p8, &length8, forceCopy, status);
+ }
+ if(*status == U_INVALID_CHAR_FOUND) {
+ /* the UTF-16 string contains an unpaired surrogate, can't test UTF-8 variant */
+ return s16;
+ }
+ if(*status == U_BUFFER_OVERFLOW_ERROR) {
+ *status = U_ZERO_ERROR;
+ p8 = (char *)malloc(++length8);
+ if(p8 == NULL) {
+ return s16;
+ }
+ if(index >= 0) {
+ s8 = ures_getUTF8StringByIndex(resB, index, p8, &length8, forceCopy, status);
+ } else if(key != NULL) {
+ s8 = ures_getUTF8StringByKey(resB, key, p8, &length8, forceCopy, status);
+ } else {
+ s8 = ures_getUTF8String(resB, p8, &length8, forceCopy, status);
+ }
+ }
+ if(U_FAILURE(*status)) {
+ /* something unexpected happened */
+ if(p8 != buffer8) {
+ free(p8);
+ }
+ return s16;
+ }
+
+ if(forceCopy && s8 != p8) {
+ log_err("ures_getUTF8String(%p, %ld, '%s') did not write the string to dest\n",
+ resB, (long)index, key);
+ }
+
+ /* verify NUL-termination */
+ if((p8 != buffer8 || length8 < sizeof(buffer8)) && s8[length8] != 0) {
+ log_err("ures_getUTF8String(%p, %ld, '%s') did not NUL-terminate\n",
+ resB, (long)index, key);
+ }
+ /* verify correct string */
+ i16 = i8 = 0;
+ while(i16 < length16 && i8 < length8) {
+ U16_NEXT(s16, i16, length16, c16);
+ U8_NEXT(s8, i8, length8, c8);
+ if(c16 != c8) {
+ log_err("ures_getUTF8String(%p, %ld, '%s') got a bad string, c16=U+%04lx!=U+%04lx=c8 before i16=%ld\n",
+ resB, (long)index, key, (long)c16, (long)c8, (long)i16);
+ }
+ }
+ /* verify correct length */
+ if(i16 < length16) {
+ log_err("ures_getUTF8String(%p, %ld, '%s') UTF-8 string too short, length8=%ld, length16=%ld\n",
+ resB, (long)index, key, (long)length8, (long)length16);
+ }
+ if(i8 < length8) {
+ log_err("ures_getUTF8String(%p, %ld, '%s') UTF-8 string too long, length8=%ld, length16=%ld\n",
+ resB, (long)index, key, (long)length8, (long)length16);
+ }
+
+ /* clean up */
+ if(p8 != buffer8) {
+ free(p8);
+ }
+ }
+ return s16;
+}
+
+/*
+ * API tests for ures_getUTF8String().
+ * Most cases are handled by tres_getString(), which leaves argument checking
+ * to be tested here.
+ * Since the variants share most of their implementation, we only need to test
+ * one of them.
+ * We also need not test for checking arguments which will be checked by the
+ * UTF-16 ures_getStringXYZ() that are called internally.
+ */
+static void
+TestGetUTF8String() {
+ UResourceBundle *res;
+ const char *testdatapath;
+ char buffer8[16];
+ const char *s8;
+ int32_t length8;
+ UErrorCode status;
+
+ status = U_ZERO_ERROR;
+ testdatapath = loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat - %s\n", u_errorName(status));
+ return;
+ }
+
+ res = ures_open(testdatapath, "", &status);
+ if(U_FAILURE(status)) {
+ log_err("Unable to ures_open(testdata, \"\") - %s\n", u_errorName(status));
+ return;
+ }
+
+ /* one good call */
+ status = U_ZERO_ERROR;
+ length8 = (int32_t)sizeof(buffer8);
+ s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, FALSE, &status);
+ if(status != U_ZERO_ERROR) {
+ log_err("ures_getUTF8StringByKey(testdata/root string) malfunctioned - %s\n", u_errorName(status));
+ }
+
+ /* negative capacity */
+ status = U_ZERO_ERROR;
+ length8 = -1;
+ s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, FALSE, &status);
+ if(status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ures_getUTF8StringByKey(capacity<0) malfunctioned - %s\n", u_errorName(status));
+ }
+
+ /* capacity>0 but dest=NULL */
+ status = U_ZERO_ERROR;
+ length8 = (int32_t)sizeof(buffer8);
+ s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", NULL, &length8, FALSE, &status);
+ if(status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ures_getUTF8StringByKey(dest=NULL capacity>0) malfunctioned - %s\n", u_errorName(status));
+ }
+
+ ures_close(res);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/creststn.h b/Build/source/libs/icu/icu-xetex/test/cintltst/creststn.h
new file mode 100644
index 00000000000..f6becdb979c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/creststn.h
@@ -0,0 +1,85 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/***************************************************************************
+*
+* File CRESTST.H
+*
+* Modification History:
+* Name Date Description
+* Madhu Katragadda 05/09/2000 Ported Tests for New ResourceBundle API
+* Madhu Katragadda 05/24/2000 Added new tests to test RES_BINARY for collationElements
+*************************************************************************************************
+*/
+#ifndef _CRESTSTN
+#define _CRESTSTN
+/* C TEST FOR NEW RESOURCEBUNDLE API*/
+#include "cintltst.h"
+
+/*
+ * Test wrapper for ures_getStringXYZ(), for testing other variants of
+ * these functions as well.
+ * If index>=0, calls ures_getStringByIndex().
+ * If key!=NULL, calls ures_getStringByKey().
+ */
+extern const UChar *
+tres_getString(const UResourceBundle *resB,
+ int32_t index, const char *key,
+ int32_t *length,
+ UErrorCode *status);
+
+void addNEWResourceBundleTest(TestNode**);
+
+/**
+*Perform several extensive tests using the subtest routine testTag
+*/
+static void TestResourceBundles(void);
+/**
+* Test construction of ResourceBundle accessing a custom test resource-file
+**/
+static void TestConstruction1(void);
+
+static void TestAliasConflict(void);
+
+static void TestFallback(void);
+
+static void TestBinaryCollationData(void);
+
+static void TestNewTypes(void);
+
+static void TestEmptyTypes(void);
+
+static void TestAPI(void);
+
+static void TestErrorConditions(void);
+
+static void TestGetVersion(void);
+
+static void TestGetVersionColl(void);
+
+static void TestEmptyBundle(void);
+
+static void TestDirectAccess(void);
+
+static void TestResourceLevelAliasing(void);
+
+static void TestErrorCodes(void);
+
+static void TestJB3763(void);
+
+static void TestXPath(void);
+
+static void TestStackReuse(void);
+
+/**
+* extensive subtests called by TestResourceBundles
+**/
+static UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN);
+
+static void record_pass(void);
+static void record_fail(void);
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cstrcase.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cstrcase.c
new file mode 100644
index 00000000000..befc6d4dc2d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cstrcase.c
@@ -0,0 +1,944 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 2002-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: cstrcase.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2002feb21
+* created by: Markus W. Scherer
+*
+* Test file for string casing C API functions.
+*/
+
+#include <string.h>
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/ustring.h"
+#include "unicode/uloc.h"
+#include "unicode/ubrk.h"
+#include "unicode/ucasemap.h"
+#include "cmemory.h"
+#include "cintltst.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+/* test string case mapping functions --------------------------------------- */
+
+static void
+TestCaseLower(void) {
+ static const UChar
+
+ beforeLower[]= { 0x61, 0x42, 0x49, 0x3a3, 0xdf, 0x3a3, 0x2f, 0xd93f, 0xdfff },
+ lowerRoot[]= { 0x61, 0x62, 0x69, 0x3c3, 0xdf, 0x3c2, 0x2f, 0xd93f, 0xdfff },
+ lowerTurkish[]={ 0x61, 0x62, 0x131, 0x3c3, 0xdf, 0x3c2, 0x2f, 0xd93f, 0xdfff };
+
+ UChar buffer[32];
+ int32_t length;
+ UErrorCode errorCode;
+
+ /* lowercase with root locale and separate buffers */
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToLower(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ beforeLower, sizeof(beforeLower)/U_SIZEOF_UCHAR,
+ "",
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(lowerRoot)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(lowerRoot, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strToLower(root locale)=%ld error=%s string matches: %s\t\nlowerRoot=%s\t\nbuffer=%s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(lowerRoot, buffer, length*U_SIZEOF_UCHAR)==0 &&
+buffer[length]==0 ? "yes" : "no",
+ aescstrdup(lowerRoot,-1),
+ aescstrdup(buffer,-1));
+ }
+
+ /* lowercase with turkish locale and in the same buffer */
+ uprv_memcpy(buffer, beforeLower, sizeof(beforeLower));
+ buffer[sizeof(beforeLower)/U_SIZEOF_UCHAR]=0;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToLower(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ buffer, -1, /* implicit srcLength */
+ "tr",
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(lowerTurkish)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(lowerTurkish, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strToLower(turkish locale)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(lowerTurkish, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+
+ /* test preflighting */
+ buffer[0]=buffer[2]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToLower(buffer, 2, /* set destCapacity=2 */
+ beforeLower, sizeof(beforeLower)/U_SIZEOF_UCHAR,
+ "",
+ &errorCode);
+ if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ length!=(sizeof(lowerRoot)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(lowerRoot, buffer, 2*U_SIZEOF_UCHAR)!=0 ||
+ buffer[2]!=0xabcd
+ ) {
+ log_err("error in u_strToLower(root locale preflighting)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(lowerRoot, buffer, 2*U_SIZEOF_UCHAR)==0 && buffer[2]==0xabcd ? "yes" : "no");
+ }
+
+ /* test error handling */
+ errorCode=U_ZERO_ERROR;
+ length=u_strToLower(NULL, sizeof(buffer)/U_SIZEOF_UCHAR,
+ beforeLower, sizeof(beforeLower)/U_SIZEOF_UCHAR,
+ "",
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error in u_strToLower(root locale dest=NULL)=%ld error=%s\n",
+ length,
+ u_errorName(errorCode));
+ }
+
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToLower(buffer, -1,
+ beforeLower, sizeof(beforeLower)/U_SIZEOF_UCHAR,
+ "",
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strToLower(root locale destCapacity=-1)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+}
+
+static void
+TestCaseUpper(void) {
+ static const UChar
+
+ beforeUpper[]= { 0x61, 0x42, 0x69, 0x3c2, 0xdf, 0x3c3, 0x2f, 0xfb03, 0xd93f, 0xdfff },
+ upperRoot[]= { 0x41, 0x42, 0x49, 0x3a3, 0x53, 0x53, 0x3a3, 0x2f, 0x46, 0x46, 0x49, 0xd93f, 0xdfff },
+ upperTurkish[]={ 0x41, 0x42, 0x130, 0x3a3, 0x53, 0x53, 0x3a3, 0x2f, 0x46, 0x46, 0x49, 0xd93f, 0xdfff };
+
+ UChar buffer[32];
+ int32_t length;
+ UErrorCode errorCode;
+
+ /* uppercase with root locale and in the same buffer */
+ uprv_memcpy(buffer, beforeUpper, sizeof(beforeUpper));
+ errorCode=U_ZERO_ERROR;
+ length=u_strToUpper(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ buffer, sizeof(beforeUpper)/U_SIZEOF_UCHAR,
+ "",
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(upperRoot)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(upperRoot, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strToUpper(root locale)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(upperRoot, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+
+ /* uppercase with turkish locale and separate buffers */
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToUpper(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ beforeUpper, sizeof(beforeUpper)/U_SIZEOF_UCHAR,
+ "tr",
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(upperTurkish)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(upperTurkish, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strToUpper(turkish locale)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(upperTurkish, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+
+ /* test preflighting */
+ errorCode=U_ZERO_ERROR;
+ length=u_strToUpper(NULL, 0,
+ beforeUpper, sizeof(beforeUpper)/U_SIZEOF_UCHAR,
+ "tr",
+ &errorCode);
+ if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ length!=(sizeof(upperTurkish)/U_SIZEOF_UCHAR)
+ ) {
+ log_err("error in u_strToUpper(turkish locale pure preflighting)=%ld error=%s\n",
+ length,
+ u_errorName(errorCode));
+ }
+
+ /* test error handling */
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToUpper(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ NULL, sizeof(beforeUpper)/U_SIZEOF_UCHAR,
+ "tr",
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strToUpper(turkish locale src=NULL)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToUpper(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ beforeUpper, -2,
+ "tr",
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strToUpper(turkish locale srcLength=-2)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+}
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+static void
+TestCaseTitle(void) {
+ static const UChar
+
+ beforeTitle[]= { 0x61, 0x42, 0x20, 0x69, 0x3c2, 0x20, 0xdf, 0x3c3, 0x2f, 0xfb03, 0xd93f, 0xdfff },
+ titleWord[]= { 0x41, 0x62, 0x20, 0x49, 0x3c2, 0x20, 0x53, 0x73, 0x3c3, 0x2f, 0x46, 0x66, 0x69, 0xd93f, 0xdfff },
+ titleChar[]= { 0x41, 0x42, 0x20, 0x49, 0x3a3, 0x20, 0x53, 0x73, 0x3a3, 0x2f, 0x46, 0x66, 0x69, 0xd93f, 0xdfff };
+
+ UChar buffer[32];
+ UBreakIterator *titleIterChars;
+ int32_t length;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ titleIterChars=ubrk_open(UBRK_CHARACTER, "", beforeTitle, sizeof(beforeTitle)/U_SIZEOF_UCHAR, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ubrk_open(UBRK_CHARACTER)->%s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* titlecase with standard break iterator and in the same buffer */
+ uprv_memcpy(buffer, beforeTitle, sizeof(beforeTitle));
+ errorCode=U_ZERO_ERROR;
+ length=u_strToTitle(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ buffer, sizeof(beforeTitle)/U_SIZEOF_UCHAR,
+ NULL, "",
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(titleWord)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(titleWord, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strToTitle(standard iterator)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(titleWord, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+
+ /* titlecase with UBRK_CHARACTERS and separate buffers */
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToTitle(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ beforeTitle, sizeof(beforeTitle)/U_SIZEOF_UCHAR,
+ titleIterChars, "",
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(titleChar)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(titleChar, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strToTitle(UBRK_CHARACTERS)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(titleChar, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+
+ /* test preflighting */
+ errorCode=U_ZERO_ERROR;
+ length=u_strToTitle(NULL, 0,
+ beforeTitle, sizeof(beforeTitle)/U_SIZEOF_UCHAR,
+ titleIterChars, "",
+ &errorCode);
+ if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ length!=(sizeof(titleChar)/U_SIZEOF_UCHAR)
+ ) {
+ log_err("error in u_strToTitle(UBRK_CHARACTERS pure preflighting)=%ld error=%s\n",
+ length,
+ u_errorName(errorCode));
+ }
+
+ /* test error handling */
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToTitle(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ NULL, sizeof(beforeTitle)/U_SIZEOF_UCHAR,
+ titleIterChars, "",
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strToTitle(UBRK_CHARACTERS src=NULL)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strToTitle(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ beforeTitle, -2,
+ titleIterChars, "",
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strToTitle(UBRK_CHARACTERS srcLength=-2)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+
+ ubrk_close(titleIterChars);
+}
+
+#endif
+
+/* test case folding and case-insensitive string compare -------------------- */
+
+static void
+TestCaseFolding(void) {
+ /*
+ * CaseFolding.txt says about i and its cousins:
+ * 0049; C; 0069; # LATIN CAPITAL LETTER I
+ * 0049; T; 0131; # LATIN CAPITAL LETTER I
+ *
+ * 0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE
+ * 0130; T; 0069; # LATIN CAPITAL LETTER I WITH DOT ABOVE
+ * That's all.
+ * See CaseFolding.txt and the Unicode Standard for how to apply the case foldings.
+ */
+ static const UChar32
+ simple[]={
+ /* input, default, exclude special i */
+ 0x61, 0x61, 0x61,
+ 0x49, 0x69, 0x131,
+ 0x130, 0x130, 0x69,
+ 0x131, 0x131, 0x131,
+ 0xdf, 0xdf, 0xdf,
+ 0xfb03, 0xfb03, 0xfb03,
+ 0x1040e,0x10436,0x10436,
+ 0x5ffff,0x5ffff,0x5ffff
+ };
+
+ static const UChar
+ mixed[]= { 0x61, 0x42, 0x130, 0x49, 0x131, 0x3d0, 0xdf, 0xfb03, 0xd93f, 0xdfff },
+ foldedDefault[]= { 0x61, 0x62, 0x69, 0x307, 0x69, 0x131, 0x3b2, 0x73, 0x73, 0x66, 0x66, 0x69, 0xd93f, 0xdfff },
+ foldedExcludeSpecialI[]={ 0x61, 0x62, 0x69, 0x131, 0x131, 0x3b2, 0x73, 0x73, 0x66, 0x66, 0x69, 0xd93f, 0xdfff };
+
+ UVersionInfo unicodeVersion={ 0, 0, 17, 89 }, unicode_3_1={ 3, 1, 0, 0 };
+
+ const UChar32 *p;
+ int32_t i;
+
+ UChar buffer[32];
+ int32_t length;
+ UErrorCode errorCode;
+ UBool isUnicode_3_1;
+
+ /* if unicodeVersion()>=3.1 then test exclude-special-i cases as well */
+ u_getUnicodeVersion(unicodeVersion);
+ isUnicode_3_1= uprv_memcmp(unicodeVersion, unicode_3_1, 4)>=0;
+
+ /* test simple case folding */
+ p=simple;
+ for(i=0; i<sizeof(simple)/12; p+=3, ++i) {
+ if(u_foldCase(p[0], U_FOLD_CASE_DEFAULT)!=p[1]) {
+ log_err("error: u_foldCase(0x%04lx, default)=0x%04lx instead of 0x%04lx\n",
+ p[0], u_foldCase(p[0], U_FOLD_CASE_DEFAULT), p[1]);
+ return;
+ }
+
+ if(isUnicode_3_1 && u_foldCase(p[0], U_FOLD_CASE_EXCLUDE_SPECIAL_I)!=p[2]) {
+ log_err("error: u_foldCase(0x%04lx, exclude special i)=0x%04lx instead of 0x%04lx\n",
+ p[0], u_foldCase(p[0], U_FOLD_CASE_EXCLUDE_SPECIAL_I), p[2]);
+ return;
+ }
+ }
+
+ /* test full string case folding with default option and separate buffers */
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ mixed, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_DEFAULT,
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(foldedDefault)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(foldedDefault, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strFoldCase(default)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(foldedDefault, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+
+ /* exclude special i */
+ if(isUnicode_3_1) {
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ mixed, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_EXCLUDE_SPECIAL_I,
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(foldedExcludeSpecialI)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(foldedExcludeSpecialI, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strFoldCase(exclude special i)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(foldedExcludeSpecialI, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+ }
+
+ /* test full string case folding with default option and in the same buffer */
+ uprv_memcpy(buffer, mixed, sizeof(mixed));
+ buffer[sizeof(mixed)/U_SIZEOF_UCHAR]=0;
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ buffer, -1, /* implicit srcLength */
+ U_FOLD_CASE_DEFAULT,
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(foldedDefault)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(foldedDefault, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strFoldCase(default same buffer)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(foldedDefault, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+
+ /* test full string case folding, exclude special i, in the same buffer */
+ if(isUnicode_3_1) {
+ uprv_memcpy(buffer, mixed, sizeof(mixed));
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ buffer, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_EXCLUDE_SPECIAL_I,
+ &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=(sizeof(foldedExcludeSpecialI)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(foldedExcludeSpecialI, buffer, length*U_SIZEOF_UCHAR)!=0 ||
+ buffer[length]!=0
+ ) {
+ log_err("error in u_strFoldCase(exclude special i same buffer)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(foldedExcludeSpecialI, buffer, length*U_SIZEOF_UCHAR)==0 && buffer[length]==0 ? "yes" : "no");
+ }
+ }
+
+ /* test preflighting */
+ buffer[0]=buffer[2]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, 2, /* set destCapacity=2 */
+ mixed, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_DEFAULT,
+ &errorCode);
+ if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ length!=(sizeof(foldedDefault)/U_SIZEOF_UCHAR) ||
+ uprv_memcmp(foldedDefault, buffer, 2*U_SIZEOF_UCHAR)!=0 ||
+ buffer[2]!=0xabcd
+ ) {
+ log_err("error in u_strFoldCase(default preflighting)=%ld error=%s string matches: %s\n",
+ length,
+ u_errorName(errorCode),
+ uprv_memcmp(foldedDefault, buffer, 2*U_SIZEOF_UCHAR)==0 && buffer[2]==0xabcd ? "yes" : "no");
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(NULL, 0,
+ mixed, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_DEFAULT,
+ &errorCode);
+ if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ length!=(sizeof(foldedDefault)/U_SIZEOF_UCHAR)
+ ) {
+ log_err("error in u_strFoldCase(default pure preflighting)=%ld error=%s\n",
+ length,
+ u_errorName(errorCode));
+ }
+
+ /* test error handling */
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(NULL, sizeof(buffer)/U_SIZEOF_UCHAR,
+ mixed, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_DEFAULT,
+ &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error in u_strFoldCase(default dest=NULL)=%ld error=%s\n",
+ length,
+ u_errorName(errorCode));
+ }
+
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, -1,
+ mixed, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_DEFAULT,
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strFoldCase(default destCapacity=-1)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ NULL, sizeof(mixed)/U_SIZEOF_UCHAR,
+ U_FOLD_CASE_EXCLUDE_SPECIAL_I,
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strFoldCase(exclude special i src=NULL)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+
+ buffer[0]=0xabcd;
+ errorCode=U_ZERO_ERROR;
+ length=u_strFoldCase(buffer, sizeof(buffer)/U_SIZEOF_UCHAR,
+ mixed, -2,
+ U_FOLD_CASE_EXCLUDE_SPECIAL_I,
+ &errorCode);
+ if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
+ buffer[0]!=0xabcd
+ ) {
+ log_err("error in u_strFoldCase(exclude special i srcLength=-2)=%ld error=%s buffer[0]==0x%lx\n",
+ length,
+ u_errorName(errorCode),
+ buffer[0]);
+ }
+}
+
+static void
+TestCaseCompare(void) {
+ static const UChar
+
+ mixed[]= { 0x61, 0x42, 0x131, 0x3a3, 0xdf, 0xfb03, 0xd93f, 0xdfff, 0 },
+ otherDefault[]= { 0x41, 0x62, 0x131, 0x3c3, 0x73, 0x53, 0x46, 0x66, 0x49, 0xd93f, 0xdfff, 0 },
+ otherExcludeSpecialI[]={ 0x41, 0x62, 0x131, 0x3c3, 0x53, 0x73, 0x66, 0x46, 0x69, 0xd93f, 0xdfff, 0 },
+ different[]= { 0x41, 0x62, 0x131, 0x3c3, 0x73, 0x53, 0x46, 0x66, 0x49, 0xd93f, 0xdffd, 0 };
+
+ UVersionInfo unicodeVersion={ 0, 0, 17, 89 }, unicode_3_1={ 3, 1, 0, 0 };
+
+ int32_t result, lenMixed, lenOtherDefault, lenOtherExcludeSpecialI, lenDifferent;
+ UErrorCode errorCode;
+ UBool isUnicode_3_1;
+
+ errorCode=U_ZERO_ERROR;
+
+ lenMixed=u_strlen(mixed);
+ lenOtherDefault=u_strlen(otherDefault);
+ lenOtherExcludeSpecialI=u_strlen(otherExcludeSpecialI);
+ lenDifferent=u_strlen(different);
+
+ /* if unicodeVersion()>=3.1 then test exclude-special-i cases as well */
+ u_getUnicodeVersion(unicodeVersion);
+ isUnicode_3_1= uprv_memcmp(unicodeVersion, unicode_3_1, 4)>=0;
+
+ /* test u_strcasecmp() */
+ result=u_strcasecmp(mixed, otherDefault, U_FOLD_CASE_DEFAULT);
+ if(result!=0) {
+ log_err("error: u_strcasecmp(mixed, other, default)=%ld instead of 0\n", result);
+ }
+ result=u_strCaseCompare(mixed, -1, otherDefault, -1, U_FOLD_CASE_DEFAULT, &errorCode);
+ if(result!=0) {
+ log_err("error: u_strCaseCompare(mixed, other, default)=%ld instead of 0\n", result);
+ }
+
+ /* test u_strcasecmp() - exclude special i */
+ result=u_strcasecmp(mixed, otherExcludeSpecialI, U_FOLD_CASE_EXCLUDE_SPECIAL_I);
+ if(result!=0) {
+ log_err("error: u_strcasecmp(mixed, other, exclude special i)=%ld instead of 0\n", result);
+ }
+ result=u_strCaseCompare(mixed, lenMixed, otherExcludeSpecialI, lenOtherExcludeSpecialI, U_FOLD_CASE_EXCLUDE_SPECIAL_I, &errorCode);
+ if(result!=0) {
+ log_err("error: u_strCaseCompare(mixed, other, exclude special i)=%ld instead of 0\n", result);
+ }
+
+ /* test u_strcasecmp() */
+ result=u_strcasecmp(mixed, different, U_FOLD_CASE_DEFAULT);
+ if(result<=0) {
+ log_err("error: u_strcasecmp(mixed, different, default)=%ld instead of positive\n", result);
+ }
+ result=u_strCaseCompare(mixed, -1, different, lenDifferent, U_FOLD_CASE_DEFAULT, &errorCode);
+ if(result<=0) {
+ log_err("error: u_strCaseCompare(mixed, different, default)=%ld instead of positive\n", result);
+ }
+
+ /* test u_strncasecmp() - stop before the sharp s (U+00df) */
+ result=u_strncasecmp(mixed, different, 4, U_FOLD_CASE_DEFAULT);
+ if(result!=0) {
+ log_err("error: u_strncasecmp(mixed, different, 4, default)=%ld instead of 0\n", result);
+ }
+ result=u_strCaseCompare(mixed, 4, different, 4, U_FOLD_CASE_DEFAULT, &errorCode);
+ if(result!=0) {
+ log_err("error: u_strCaseCompare(mixed, 4, different, 4, default)=%ld instead of 0\n", result);
+ }
+
+ /* test u_strncasecmp() - stop in the middle of the sharp s (U+00df) */
+ result=u_strncasecmp(mixed, different, 5, U_FOLD_CASE_DEFAULT);
+ if(result<=0) {
+ log_err("error: u_strncasecmp(mixed, different, 5, default)=%ld instead of positive\n", result);
+ }
+ result=u_strCaseCompare(mixed, 5, different, 5, U_FOLD_CASE_DEFAULT, &errorCode);
+ if(result<=0) {
+ log_err("error: u_strCaseCompare(mixed, 5, different, 5, default)=%ld instead of positive\n", result);
+ }
+
+ /* test u_memcasecmp() - stop before the sharp s (U+00df) */
+ result=u_memcasecmp(mixed, different, 4, U_FOLD_CASE_DEFAULT);
+ if(result!=0) {
+ log_err("error: u_memcasecmp(mixed, different, 4, default)=%ld instead of 0\n", result);
+ }
+
+ /* test u_memcasecmp() - stop in the middle of the sharp s (U+00df) */
+ result=u_memcasecmp(mixed, different, 5, U_FOLD_CASE_DEFAULT);
+ if(result<=0) {
+ log_err("error: u_memcasecmp(mixed, different, 5, default)=%ld instead of positive\n", result);
+ }
+}
+
+/* test UCaseMap ------------------------------------------------------------ */
+
+/*
+ * API test for UCaseMap;
+ * test cases for actual case mappings using UCaseMap see
+ * intltest utility/UnicodeStringTest/StringCaseTest/TestCasing
+ */
+static void
+TestUCaseMap(void) {
+ static const char
+ aBc[] ={ 0x61, 0x42, 0x63, 0 },
+ abc[] ={ 0x61, 0x62, 0x63, 0 },
+ ABCg[]={ 0x41, 0x42, 0x43, 0x67, 0 },
+ defg[]={ 0x64, 0x65, 0x66, 0x67, 0 };
+ char utf8Out[8];
+
+ UCaseMap *csm;
+ const char *locale;
+ uint32_t options;
+ int32_t length;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ csm=ucasemap_open("tur", 0xa5, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucasemap_open(\"tur\") failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ locale=ucasemap_getLocale(csm);
+ if(0!=strcmp(locale, "tr")) {
+ log_err("ucasemap_getLocale(ucasemap_open(\"tur\"))==%s!=\"tr\"\n", locale);
+ }
+ /* overly long locale IDs get truncated to their language code to avoid unnecessary allocation */
+ ucasemap_setLocale(csm, "I-kLInGOn-the-quick-brown-fox-jumps-over-the-lazy-dog", &errorCode);
+ locale=ucasemap_getLocale(csm);
+ if(0!=strcmp(locale, "i-klingon")) {
+ log_err("ucasemap_getLocale(ucasemap_setLocale(\"I-kLInGOn-the-quick-br...\"))==%s!=\"i-klingon\"\n", locale);
+ }
+
+ errorCode=U_ZERO_ERROR;
+ options=ucasemap_getOptions(csm);
+ if(options!=0xa5) {
+ log_err("ucasemap_getOptions(ucasemap_open(0xa5))==0x%lx!=0xa5\n", (long)options);
+ }
+ ucasemap_setOptions(csm, 0x333333, &errorCode);
+ options=ucasemap_getOptions(csm);
+ if(options!=0x333333) {
+ log_err("ucasemap_getOptions(ucasemap_setOptions(0x333333))==0x%lx!=0x333333\n", (long)options);
+ }
+
+ /* test case mapping API; not all permutations necessary due to shared implementation code */
+
+ /* NUL terminated source */
+ errorCode=U_ZERO_ERROR;
+ length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
+ if(U_FAILURE(errorCode) || length!=3 || 0!=strcmp(abc, utf8Out)) {
+ log_err("ucasemap_utf8ToLower(aBc\\0) failed\n");
+ }
+
+ /* incoming failure code */
+ errorCode=U_PARSE_ERROR;
+ strcpy(utf8Out, defg);
+ length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
+ if(errorCode!=U_PARSE_ERROR || 0!=strcmp(defg, utf8Out)) {
+ log_err("ucasemap_utf8ToLower(failure) failed\n");
+ }
+
+ /* overlapping input & output */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, aBc);
+ length=ucasemap_utf8ToUpper(csm, utf8Out, 2, utf8Out+1, 2, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(aBc, utf8Out)) {
+ log_err("ucasemap_utf8ToUpper(overlap 1) failed\n");
+ }
+
+ /* overlap in the other direction */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, aBc);
+ length=ucasemap_utf8ToUpper(csm, utf8Out+1, 2, utf8Out, 2, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(aBc, utf8Out)) {
+ log_err("ucasemap_utf8ToUpper(overlap 2) failed\n");
+ }
+
+ /* NULL destination */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, defg);
+ length=ucasemap_utf8ToLower(csm, NULL, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
+ log_err("ucasemap_utf8ToLower(dest=NULL) failed\n");
+ }
+
+ /* destCapacity<0 */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, defg);
+ length=ucasemap_utf8ToLower(csm, utf8Out, -2, aBc, -1, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
+ log_err("ucasemap_utf8ToLower(destCapacity<0) failed\n");
+ }
+
+ /* NULL source */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, defg);
+ length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), NULL, -1, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
+ log_err("ucasemap_utf8ToLower(src=NULL) failed\n");
+ }
+
+ /* srcLength<-1 */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, defg);
+ length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -2, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
+ log_err("ucasemap_utf8ToLower(srcLength<-1) failed\n");
+ }
+
+ /* buffer overflow */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, defg);
+ length=ucasemap_utf8ToUpper(csm, utf8Out, 2, aBc, 3, &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=3 || 0!=strcmp(defg+2, utf8Out+2)) {
+ log_err("ucasemap_utf8ToUpper(overflow) failed\n");
+ }
+
+ /* dest not terminated (leaves g from defg alone) */
+ errorCode=U_ZERO_ERROR;
+ strcpy(utf8Out, defg);
+ length=ucasemap_utf8ToUpper(csm, utf8Out, 3, aBc, 3, &errorCode);
+ if(errorCode!=U_STRING_NOT_TERMINATED_WARNING || length!=3 || 0!=strcmp(ABCg, utf8Out)) {
+ log_err("ucasemap_utf8ToUpper(overflow) failed\n");
+ }
+
+ /* C API coverage for case folding. More thorough test via C++ intltest's StringCaseTest::TestCasing(). */
+ errorCode=U_ZERO_ERROR;
+ utf8Out[0]=0;
+ length=ucasemap_utf8FoldCase(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, 3, &errorCode);
+ if(U_FAILURE(errorCode) || length!=3 || 0!=strcmp(abc, utf8Out)) {
+ log_err("ucasemap_utf8FoldCase(aBc) failed\n");
+ }
+
+ ucasemap_close(csm);
+}
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+/* Try titlecasing with options. */
+static void
+TestUCaseMapToTitle(void) {
+ /* "a 'CaT. A 'dOg! 'eTc." where '=U+02BB */
+ /*
+ * Note: The sentence BreakIterator does not recognize a '.'
+ * as a sentence terminator if it is followed by lowercase.
+ * That is why the example has the '!'.
+ */
+ static const UChar
+
+ beforeTitle[]= { 0x61, 0x20, 0x2bb, 0x43, 0x61, 0x54, 0x2e, 0x20, 0x41, 0x20, 0x2bb, 0x64, 0x4f, 0x67, 0x21, 0x20, 0x2bb, 0x65, 0x54, 0x63, 0x2e },
+ titleWord[]= { 0x41, 0x20, 0x2bb, 0x43, 0x61, 0x74, 0x2e, 0x20, 0x41, 0x20, 0x2bb, 0x44, 0x6f, 0x67, 0x21, 0x20, 0x2bb, 0x45, 0x74, 0x63, 0x2e },
+ titleWordNoAdjust[]={ 0x41, 0x20, 0x2bb, 0x63, 0x61, 0x74, 0x2e, 0x20, 0x41, 0x20, 0x2bb, 0x64, 0x6f, 0x67, 0x21, 0x20, 0x2bb, 0x65, 0x74, 0x63, 0x2e },
+ titleSentNoLower[]= { 0x41, 0x20, 0x2bb, 0x43, 0x61, 0x54, 0x2e, 0x20, 0x41, 0x20, 0x2bb, 0x64, 0x4f, 0x67, 0x21, 0x20, 0x2bb, 0x45, 0x54, 0x63, 0x2e };
+
+ UChar buffer[32];
+ UCaseMap *csm;
+ UBreakIterator *sentenceIter;
+ const UBreakIterator *iter;
+ int32_t length;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ csm=ucasemap_open("", 0, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucasemap_open(\"\") failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ iter=ucasemap_getBreakIterator(csm);
+ if(iter!=NULL) {
+ log_err("ucasemap_getBreakIterator() returns %p!=NULL before setting any iterator or titlecasing\n", iter);
+ }
+
+ /* Use default UBreakIterator: Word breaks. */
+ length=ucasemap_toTitle(csm, buffer, LENGTHOF(buffer), beforeTitle, LENGTHOF(beforeTitle), &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=LENGTHOF(titleWord) ||
+ 0!=u_memcmp(buffer, titleWord, length) ||
+ buffer[length]!=0
+ ) {
+ log_err("ucasemap_toTitle(default iterator)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
+ }
+
+ iter=ucasemap_getBreakIterator(csm);
+ if(iter==NULL) {
+ log_err("ucasemap_getBreakIterator() returns NULL after titlecasing\n");
+ }
+
+ /* Try U_TITLECASE_NO_BREAK_ADJUSTMENT. */
+ ucasemap_setOptions(csm, U_TITLECASE_NO_BREAK_ADJUSTMENT, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ucasemap_setOptions(U_TITLECASE_NO_BREAK_ADJUSTMENT) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ length=ucasemap_toTitle(csm, buffer, LENGTHOF(buffer), beforeTitle, LENGTHOF(beforeTitle), &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=LENGTHOF(titleWordNoAdjust) ||
+ 0!=u_memcmp(buffer, titleWordNoAdjust, length) ||
+ buffer[length]!=0
+ ) {
+ log_err("ucasemap_toTitle(default iterator, no break adjustment)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
+ }
+
+ /* Set a sentence break iterator. */
+ errorCode=U_ZERO_ERROR;
+ sentenceIter=ubrk_open(UBRK_SENTENCE, "", NULL, 0, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ubrk_open(UBRK_SENTENCE) failed - %s\n", u_errorName(errorCode));
+ ucasemap_close(csm);
+ return;
+ }
+ ucasemap_setBreakIterator(csm, sentenceIter, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ucasemap_setBreakIterator(sentence iterator) failed - %s\n", u_errorName(errorCode));
+ ubrk_close(sentenceIter);
+ ucasemap_close(csm);
+ return;
+ }
+ iter=ucasemap_getBreakIterator(csm);
+ if(iter!=sentenceIter) {
+ log_err("ucasemap_getBreakIterator() returns %p!=%p after setting the iterator\n", iter, sentenceIter);
+ }
+
+ ucasemap_setOptions(csm, U_TITLECASE_NO_LOWERCASE, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ucasemap_setOptions(U_TITLECASE_NO_LOWERCASE) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* Use the sentence break iterator with the option. Preflight first. */
+ length=ucasemap_toTitle(csm, NULL, 0, beforeTitle, LENGTHOF(beforeTitle), &errorCode);
+ if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ length!=LENGTHOF(titleSentNoLower)
+ ) {
+ log_err("ucasemap_toTitle(preflight sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ buffer[0]=0;
+ length=ucasemap_toTitle(csm, buffer, LENGTHOF(buffer), beforeTitle, LENGTHOF(beforeTitle), &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=LENGTHOF(titleSentNoLower) ||
+ 0!=u_memcmp(buffer, titleSentNoLower, length) ||
+ buffer[length]!=0
+ ) {
+ log_err("ucasemap_toTitle(sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
+ }
+
+ /* UTF-8 C API coverage. More thorough test via C++ intltest's StringCaseTest::TestCasing(). */
+ {
+ char utf8BeforeTitle[64], utf8TitleSentNoLower[64], utf8[64];
+ int32_t utf8BeforeTitleLength, utf8TitleSentNoLowerLength;
+
+ errorCode=U_ZERO_ERROR;
+ u_strToUTF8(utf8BeforeTitle, (int32_t)sizeof(utf8BeforeTitle), &utf8BeforeTitleLength, beforeTitle, LENGTHOF(beforeTitle), &errorCode);
+ u_strToUTF8(utf8TitleSentNoLower, (int32_t)sizeof(utf8TitleSentNoLower), &utf8TitleSentNoLowerLength, titleSentNoLower, LENGTHOF(titleSentNoLower), &errorCode);
+
+ length=ucasemap_utf8ToTitle(csm, utf8, (int32_t)sizeof(utf8), utf8BeforeTitle, utf8BeforeTitleLength, &errorCode);
+ if( U_FAILURE(errorCode) ||
+ length!=utf8TitleSentNoLowerLength ||
+ 0!=uprv_memcmp(utf8, utf8TitleSentNoLower, length) ||
+ utf8[length]!=0
+ ) {
+ log_err("ucasemap_utf8ToTitle(sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
+ }
+ }
+
+ ucasemap_close(csm);
+}
+
+#endif
+
+void addCaseTest(TestNode** root);
+
+void addCaseTest(TestNode** root) {
+ /* cstrcase.c functions, declared in cucdtst.h */
+ addTest(root, &TestCaseLower, "tsutil/cstrcase/TestCaseLower");
+ addTest(root, &TestCaseUpper, "tsutil/cstrcase/TestCaseUpper");
+#if !UCONFIG_NO_BREAK_ITERATION
+ addTest(root, &TestCaseTitle, "tsutil/cstrcase/TestCaseTitle");
+#endif
+ addTest(root, &TestCaseFolding, "tsutil/cstrcase/TestCaseFolding");
+ addTest(root, &TestCaseCompare, "tsutil/cstrcase/TestCaseCompare");
+ addTest(root, &TestUCaseMap, "tsutil/cstrcase/TestUCaseMap");
+#if !UCONFIG_NO_BREAK_ITERATION
+ addTest(root, &TestUCaseMapToTitle, "tsutil/cstrcase/TestUCaseMapToTitle");
+#endif
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cstrtest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cstrtest.c
new file mode 100644
index 00000000000..ea6fe5cbeaa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cstrtest.c
@@ -0,0 +1,286 @@
+/*
+**********************************************************************
+* Copyright (C) 1998-2004, International Business Machines Corporation
+* and others. All Rights Reserved.
+**********************************************************************
+*
+* File cstrtest.c
+*
+* Modification History:
+*
+* Date Name Description
+* 07/13/2000 Madhu created
+*******************************************************************************
+*/
+
+#include "unicode/ustring.h"
+#include "unicode/ucnv.h"
+#include "cstring.h"
+#include "uinvchar.h"
+#include "cintltst.h"
+#include "cmemory.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+static void TestAPI(void);
+void addCStringTest(TestNode** root);
+
+static void TestInvariant(void);
+
+void addCStringTest(TestNode** root) {
+ addTest(root, &TestAPI, "tsutil/cstrtest/TestAPI");
+ addTest(root, &TestInvariant, "tsutil/cstrtest/TestInvariant");
+}
+
+static void TestAPI(void)
+{
+ int32_t intValue=0;
+ char src[30]="HELLO THERE", dest[30];
+ static const char *const abc="abcdefghijklmnopqrstuvwxyz", *const ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ const char *temp;
+ int32_t i;
+
+ log_verbose("Testing uprv_tolower() and uprv_toupper()\n");
+ for(i=0; i<=26; ++i) {
+ dest[i]=uprv_tolower(abc[i]);
+ }
+ if(0!=strcmp(abc, dest)) {
+ log_err("uprv_tolower(abc) failed\n");
+ }
+
+ for(i=0; i<=26; ++i) {
+ dest[i]=uprv_tolower(ABC[i]);
+ }
+ if(0!=strcmp(abc, dest)) {
+ log_err("uprv_tolower(ABC) failed\n");
+ }
+
+ for(i=0; i<=26; ++i) {
+ dest[i]=uprv_toupper(abc[i]);
+ }
+ if(0!=strcmp(ABC, dest)) {
+ log_err("uprv_toupper(abc) failed\n");
+ }
+
+ for(i=0; i<=26; ++i) {
+ dest[i]=uprv_toupper(ABC[i]);
+ }
+ if(0!=strcmp(ABC, dest)) {
+ log_err("uprv_toupper(ABC) failed\n");
+ }
+
+ log_verbose("Testing the API in cstring\n");
+ T_CString_toLowerCase(src);
+ if(uprv_strcmp(src, "hello there") != 0){
+ log_err("FAIL: *** T_CString_toLowerCase() failed. Expected: \"hello there\", Got: \"%s\"\n", src);
+ }
+ T_CString_toUpperCase(src);
+ if(uprv_strcmp(src, "HELLO THERE") != 0){
+ log_err("FAIL: *** T_CString_toUpperCase() failed. Expected: \"HELLO THERE\", Got: \"%s\"\n", src);
+ }
+
+ intValue=T_CString_stringToInteger("34556", 10);
+ if(intValue != 34556){
+ log_err("FAIL: ****T_CString_stringToInteger(\"34556\", 10) failed. Expected: 34556, Got: %d\n", intValue);
+ }
+ intValue=T_CString_stringToInteger("100", 16);
+ if(intValue != 256){
+ log_err("FAIL: ****T_CString_stringToInteger(\"100\", 16) failed. Expected: 256, Got: %d\n", intValue);
+ }
+ i = T_CString_integerToString(src, 34556, 10);
+ if(uprv_strcmp(src, "34556") != 0 || i != 5){
+ log_err("FAIL: ****integerToString(src, 34566, 10); failed. Expected: \"34556\", Got: %s\n", src);
+ }
+ i = T_CString_integerToString(src, 431, 16);
+ if(uprv_stricmp(src, "1AF") != 0 || i != 3){
+ log_err("FAIL: ****integerToString(src, 431, 16); failed. Expected: \"1AF\", Got: %s\n", src);
+ }
+ i = T_CString_int64ToString(src, U_INT64_MAX, 10);
+ if(uprv_strcmp(src, "9223372036854775807") != 0 || i != 19){
+ log_err("FAIL: ****integerToString(src, 9223372036854775807, 10); failed. Got: %s\n", src);
+ }
+ i = T_CString_int64ToString(src, U_INT64_MAX, 16);
+ if(uprv_stricmp(src, "7FFFFFFFFFFFFFFF") != 0 || i != 16){
+ log_err("FAIL: ****integerToString(src, 7FFFFFFFFFFFFFFF, 16); failed. Got: %s\n", src);
+ }
+
+ uprv_strcpy(src, "this is lower case");
+ if(T_CString_stricmp(src, "THIS is lower CASE") != 0){
+ log_err("FAIL: *****T_CString_stricmp() failed.");
+ }
+ if((intValue=T_CString_stricmp(NULL, "first string is null") )!= -1){
+ log_err("FAIL: T_CString_stricmp() where the first string is null failed. Expected: -1, returned %d\n", intValue);
+ }
+ if((intValue=T_CString_stricmp("second string is null", NULL)) != 1){
+ log_err("FAIL: T_CString_stricmp() where the second string is null failed. Expected: 1, returned %d\n", intValue);
+ }
+ if((intValue=T_CString_stricmp(NULL, NULL)) != 0){
+ log_err("FAIL: T_CString_stricmp(NULL, NULL) failed. Expected: 0, returned %d\n", intValue);;
+ }
+ if((intValue=T_CString_stricmp("", "")) != 0){
+ log_err("FAIL: T_CString_stricmp(\"\", \"\") failed. Expected: 0, returned %d\n", intValue);;
+ }
+ if((intValue=T_CString_stricmp("", "abc")) != -1){
+ log_err("FAIL: T_CString_stricmp(\"\", \"abc\") failed. Expected: -1, returned %d\n", intValue);
+ }
+ if((intValue=T_CString_stricmp("abc", "")) != 1){
+ log_err("FAIL: T_CString_stricmp(\"abc\", \"\") failed. Expected: 1, returned %d\n", intValue);
+ }
+
+ temp=uprv_strdup("strdup");
+ if(uprv_strcmp(temp, "strdup") !=0 ){
+ log_err("FAIL: uprv_strdup() failed. Expected: \"strdup\", Got: %s\n", temp);
+ }
+ uprv_free((char *)temp);
+
+ uprv_strcpy(src, "this is lower case");
+ if(T_CString_strnicmp(src, "THIS", 4 ) != 0){
+ log_err("FAIL: *****T_CString_strnicmp() failed.");
+ }
+ if((intValue=T_CString_strnicmp(NULL, "first string is null", 10) )!= -1){
+ log_err("FAIL: T_CString_strnicmp() where the first string is null failed. Expected: -1, returned %d\n", intValue);
+ }
+ if((intValue=T_CString_strnicmp("second string is null", NULL, 10)) != 1){
+ log_err("FAIL: T_CString_strnicmp() where the second string is null failed. Expected: 1, returned %d\n", intValue);
+ }
+ if((intValue=T_CString_strnicmp(NULL, NULL, 10)) != 0){
+ log_err("FAIL: T_CString_strnicmp(NULL, NULL, 10) failed. Expected: 0, returned %d\n", intValue);;
+ }
+ if((intValue=T_CString_strnicmp("", "", 10)) != 0){
+ log_err("FAIL: T_CString_strnicmp(\"\", \"\") failed. Expected: 0, returned %d\n", intValue);;
+ }
+ if((intValue=T_CString_strnicmp("", "abc", 10)) != -1){
+ log_err("FAIL: T_CString_stricmp(\"\", \"abc\", 10) failed. Expected: -1, returned %d\n", intValue);
+ }
+ if((intValue=T_CString_strnicmp("abc", "", 10)) != 1){
+ log_err("FAIL: T_CString_strnicmp(\"abc\", \"\", 10) failed. Expected: 1, returned %d\n", intValue);
+ }
+
+}
+
+/* test invariant-character handling */
+static void
+TestInvariant() {
+ /* all invariant graphic chars and some control codes (not \n!) */
+ const char invariantChars[]=
+ "\t\r \"%&'()*+,-./"
+ "0123456789:;<=>?"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ_"
+ "abcdefghijklmnopqrstuvwxyz";
+
+ const UChar invariantUChars[]={
+ 9, 0xd, 0x20, 0x22, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
+ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5f,
+ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0
+ };
+
+ const char variantChars[]="\n!#$@[\\]^`{|}~";
+
+ const UChar variantUChars[]={
+ 0x0a, 0x21, 0x23, 0x24, 0x40, 0x5b, 0x5c, 0x5d, 0x5e, 0x60, 0x7b, 0x7c, 0x7d, 0x7e, 0
+ };
+
+ const UChar nonASCIIUChars[]={ 0x80, 0xa0, 0x900, 0xff51 };
+
+ UChar us[120];
+ char cs[120];
+
+ int32_t i, length;
+
+ /* make sure that all invariant characters convert both ways */
+ length=sizeof(invariantChars);
+ u_charsToUChars(invariantChars, us, length);
+ if(u_strcmp(us, invariantUChars)!=0) {
+ log_err("u_charsToUChars(invariantChars) failed\n");
+ }
+
+ u_UCharsToChars(invariantUChars, cs, length);
+ if(strcmp(cs, invariantChars)!=0) {
+ log_err("u_UCharsToChars(invariantUChars) failed\n");
+ }
+
+
+ /*
+ * make sure that variant characters convert from source code literals to Unicode
+ * but not back to char *
+ */
+ length=sizeof(variantChars);
+ u_charsToUChars(variantChars, us, length);
+ if(u_strcmp(us, variantUChars)!=0) {
+ log_err("u_charsToUChars(variantChars) failed\n");
+ }
+
+#ifdef NDEBUG
+ /*
+ * Test u_UCharsToChars(variantUChars) only in release mode because it will
+ * cause an assertion failure in debug builds.
+ */
+ u_UCharsToChars(variantUChars, cs, length);
+ for(i=0; i<length; ++i) {
+ if(cs[i]!=0) {
+ log_err("u_UCharsToChars(variantUChars) converted the %d-th character to %02x instead of 00\n", i, cs[i]);
+ }
+ }
+#endif
+
+ /*
+ * Verify that invariant characters roundtrip from Unicode to the
+ * default converter and back.
+ */
+ {
+ UConverter *cnv;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open(NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to open the default converter\n");
+ } else {
+ length=ucnv_fromUChars(cnv, cs, sizeof(cs), invariantUChars, -1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_fromUChars(invariantUChars) failed - %s\n", u_errorName(errorCode));
+ } else if(length!=sizeof(invariantChars)-1 || strcmp(cs, invariantChars)!=0) {
+ log_err("ucnv_fromUChars(invariantUChars) failed\n");
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=ucnv_toUChars(cnv, us, LENGTHOF(us), invariantChars, -1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_toUChars(invariantChars) failed - %s\n", u_errorName(errorCode));
+ } else if(length!=LENGTHOF(invariantUChars)-1 || u_strcmp(us, invariantUChars)!=0) {
+ log_err("ucnv_toUChars(invariantChars) failed\n");
+ }
+
+ ucnv_close(cnv);
+ }
+ }
+
+ /* API tests */
+ if(!uprv_isInvariantString(invariantChars, -1)) {
+ log_err("uprv_isInvariantString(invariantChars) failed\n");
+ }
+ if(!uprv_isInvariantUString(invariantUChars, -1)) {
+ log_err("uprv_isInvariantUString(invariantUChars) failed\n");
+ }
+ if(!uprv_isInvariantString(invariantChars+strlen(invariantChars), 1)) {
+ log_err("uprv_isInvariantString(\"\\0\") failed\n");
+ }
+
+ for(i=0; i<(sizeof(variantChars)-1); ++i) {
+ if(uprv_isInvariantString(variantChars+i, 1)) {
+ log_err("uprv_isInvariantString(variantChars[%d]) failed\n", i);
+ }
+ if(uprv_isInvariantUString(variantUChars+i, 1)) {
+ log_err("uprv_isInvariantUString(variantUChars[%d]) failed\n", i);
+ }
+ }
+
+ for(i=0; i<LENGTHOF(nonASCIIUChars); ++i) {
+ if(uprv_isInvariantUString(nonASCIIUChars+i, 1)) {
+ log_err("uprv_isInvariantUString(nonASCIIUChars[%d]) failed\n", i);
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.c
new file mode 100644
index 00000000000..c4a1767d0f9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.c
@@ -0,0 +1,131 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CTURTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************/
+/**
+ * CollationTurkishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "cturtst.h"
+#include "unicode/ustring.h"
+#include "string.h"
+
+static UCollator *myCollation;
+const static UChar testSourceCases[][MAX_TOKEN_LEN] = {
+ {0x0073/*'s'*/, 0x0327, 0x0000},
+ {0x0076/*'v'*/, 0x00E4, 0x0074/*'t'*/, 0x0000},
+ {0x006f/*'o'*/, 0x006c/*'l'*/, 0x0064/*'d'*/, 0x0000},
+ {0x00FC, 0x006f/*'o'*/, 0x0069/*'i'*/, 0x0064/*'d'*/, 0x0000},
+ {0x0068/*'h'*/, 0x011E, 0x0061/*'a'*/, 0x006c/*'l'*/, 0x0074/*'t'*/, 0x0000},
+ {0x0073/*'s'*/, 0x0074/*'t'*/, 0x0072/*'r'*/, 0x0065/*'e'*/, 0x0073/*'s'*/, 0x015E, 0x0000},
+ {0x0076/*'v'*/, 0x006f/*'o'*/, 0x0131, 0x0064/*'d'*/, 0x0000},
+ {0x0069/*'i'*/, 0x0064/*'d'*/, 0x0065/*'e'*/, 0x0061/*'a'*/, 0x0000},
+ {0x00FC, 0x006f/*'o'*/, 0x0069/*'i'*/, 0x0064 /*d'*/, 0x0000},
+ {0x0076/*'v'*/, 0x006f/*'o'*/, 0x0131, 0x0064 /*d'*/, 0x0000},
+ {0x0069/*'i'*/, 0x0064/*'d'*/, 0x0065/*'e'*/, 0x0061/*'a'*/, 0x0000},
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] = {
+ {0x0075/*'u'*/, 0x0308, 0x0000},
+ {0x0076/*'v'*/, 0x0062/*'b'*/, 0x0074/*'t'*/, 0x0000},
+ {0x00D6, 0x0061/*'a'*/, 0x0079/*'y'*/, 0x0000},
+ {0x0076/*'v'*/, 0x006f/*'o'*/, 0x0069/*'i'*/, 0x0064 /*d'*/, 0x0000},
+ {0x0068/*'h'*/, 0x0061/*'a'*/, 0x006c/*'l'*/, 0x0074/*'t'*/, 0x0000},
+ {0x015E, 0x0074/*'t'*/, 0x0072/*'r'*/, 0x0065/*'e'*/, 0x015E, 0x0073/*'s'*/, 0x0000},
+ {0x0076/*'v'*/, 0x006f/*'o'*/, 0x0069/*'i'*/, 0x0064 /*d'*/, 0x0000},
+ {0x0049/*'I'*/, 0x0064/*'d'*/, 0x0065/*'e'*/, 0x0061/*'a'*/, 0x0000},
+ {0x0076/*'v'*/, 0x006f/*'o'*/, 0x0069/*'i'*/, 0x0064 /*d'*/, 0x0000},
+ {0x0076/*'v'*/, 0x006f/*'o'*/, 0x0069/*'i'*/, 0x0064 /*d'*/, 0x0000},
+ {0x0049/*'I'*/, 0x0064/*'d'*/, 0x0065/*'e'*/, 0x0061/*'a'*/, 0x0000},
+};
+
+const static UCollationResult results[] = {
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_GREATER,
+ /* test priamry > 8 */
+ UCOL_LESS,
+ UCOL_LESS, /*Turkish translator made a primary differnce between dotted and dotless I */
+ UCOL_GREATER
+};
+
+
+
+void addTurkishCollTest(TestNode** root)
+{
+
+ addTest(root, &TestPrimary, "tscoll/cturtst/TestPrimary");
+ addTest(root, &TestTertiary, "tscoll/cturtst/TestTertiary");
+
+
+}
+
+static void TestTertiary( )
+{
+
+ int32_t i;
+
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("tr", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing Turkish Collation with Tertiary strength\n");
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 8 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+static void TestPrimary()
+{
+
+ int32_t i;
+
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("tr", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing Turkish Collation with Primary strength\n");
+ ucol_setStrength(myCollation, UCOL_PRIMARY);
+ for (i = 8; i < 11; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.h
new file mode 100644
index 00000000000..542a484fc0c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cturtst.h
@@ -0,0 +1,41 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CTURTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+/**
+ * CollationTurkishTest(JAPAN) is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _CTRCOLLTST
+#define _CTRCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+#define MAX_TOKEN_LEN 16
+
+
+ /*perform test with strength PRIMARY */
+static void TestPrimary(void);
+ /* perform test with strength TERTIARY */
+static void TestTertiary(void);
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.c
new file mode 100644
index 00000000000..f59acfef16c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.c
@@ -0,0 +1,356 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************/
+
+#include <string.h>
+#include "unicode/utypes.h"
+#include "unicode/uscript.h"
+#include "unicode/uchar.h"
+#include "cintltst.h"
+#include "cucdapi.h"
+
+#define ARRAY_SIZE(array) (int32_t)(sizeof array / sizeof array[0])
+
+void TestUScriptCodeAPI(){
+ int i =0;
+ int numErrors =0;
+ {
+ const char* testNames[]={
+ /* test locale */
+ "en", "en_US", "sr", "ta" , "te_IN",
+ "hi", "he", "ar",
+ /* test abbr */
+ "Hani", "Hang","Hebr","Hira",
+ "Knda","Kana","Khmr","Lao",
+ "Latn",/*"Latf","Latg",*/
+ "Mlym", "Mong",
+
+ /* test names */
+ "CYRILLIC","DESERET","DEVANAGARI","ETHIOPIC","GEORGIAN",
+ "GOTHIC", "GREEK", "GUJARATI", "COMMON", "INHERITED",
+ /* test lower case names */
+ "malayalam", "mongolian", "myanmar", "ogham", "old-italic",
+ "oriya", "runic", "sinhala", "syriac","tamil",
+ "telugu", "thaana", "thai", "tibetan",
+ /* test the bounds*/
+ "tagb", "arabic",
+ /* test bogus */
+ "asfdasd", "5464", "12235",
+ /* test the last index */
+ "zyyy", "YI",
+ '\0'
+ };
+ UScriptCode expected[] ={
+ /* locales should return */
+ USCRIPT_LATIN, USCRIPT_LATIN, USCRIPT_CYRILLIC, USCRIPT_TAMIL, USCRIPT_TELUGU,
+ USCRIPT_DEVANAGARI, USCRIPT_HEBREW, USCRIPT_ARABIC,
+ /* abbr should return */
+ USCRIPT_HAN, USCRIPT_HANGUL, USCRIPT_HEBREW, USCRIPT_HIRAGANA,
+ USCRIPT_KANNADA, USCRIPT_KATAKANA, USCRIPT_KHMER, USCRIPT_LAO,
+ USCRIPT_LATIN,/* USCRIPT_LATIN, USCRIPT_LATIN,*/
+ USCRIPT_MALAYALAM, USCRIPT_MONGOLIAN,
+ /* names should return */
+ USCRIPT_CYRILLIC, USCRIPT_DESERET, USCRIPT_DEVANAGARI, USCRIPT_ETHIOPIC, USCRIPT_GEORGIAN,
+ USCRIPT_GOTHIC, USCRIPT_GREEK, USCRIPT_GUJARATI, USCRIPT_COMMON, USCRIPT_INHERITED,
+ /* lower case names should return */
+ USCRIPT_MALAYALAM, USCRIPT_MONGOLIAN, USCRIPT_MYANMAR, USCRIPT_OGHAM, USCRIPT_OLD_ITALIC,
+ USCRIPT_ORIYA, USCRIPT_RUNIC, USCRIPT_SINHALA, USCRIPT_SYRIAC, USCRIPT_TAMIL,
+ USCRIPT_TELUGU, USCRIPT_THAANA, USCRIPT_THAI, USCRIPT_TIBETAN,
+ /* bounds */
+ USCRIPT_TAGBANWA, USCRIPT_ARABIC,
+ /* bogus names should return invalid code */
+ USCRIPT_INVALID_CODE, USCRIPT_INVALID_CODE, USCRIPT_INVALID_CODE,
+ USCRIPT_COMMON, USCRIPT_YI,
+ };
+
+ UErrorCode err = U_ZERO_ERROR;
+
+ const int32_t capacity = 10;
+
+ for( ; testNames[i]!='\0'; i++){
+ UScriptCode script[10]={USCRIPT_INVALID_CODE};
+ uscript_getCode(testNames[i],script,capacity, &err);
+ if( script[0] != expected[i]){
+ log_err("Error getting script code Got: %i Expected: %i for name %s\n",
+ script[0],expected[i],testNames[i]);
+ numErrors++;
+ }
+ }
+ if(numErrors >0 ){
+ log_data_err("Errors uchar_getScriptCode() : %i \n",numErrors);
+ }
+ }
+
+ {
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t capacity=0;
+ int32_t j;
+ UScriptCode jaCode[]={USCRIPT_KATAKANA, USCRIPT_HIRAGANA, USCRIPT_HAN };
+ UScriptCode script[10]={USCRIPT_INVALID_CODE};
+ int32_t num = uscript_getCode("ja",script,capacity, &err);
+ /* preflight */
+ if(err==U_BUFFER_OVERFLOW_ERROR){
+ err = U_ZERO_ERROR;
+ capacity = 10;
+ num = uscript_getCode("ja",script,capacity, &err);
+ if(num!=(sizeof(jaCode)/sizeof(UScriptCode))){
+ log_err("Errors uscript_getScriptCode() for Japanese locale: num=%d, expected %d \n",
+ num, (sizeof(jaCode)/sizeof(UScriptCode)));
+ }
+ for(j=0;j<sizeof(jaCode)/sizeof(UScriptCode);j++) {
+ if(script[j]!=jaCode[j]) {
+ log_err("Japanese locale: code #%d was %d (%s) but expected %d (%s)\n", j,
+ script[j], uscript_getName(script[j]),
+ jaCode[j], uscript_getName(jaCode[j]));
+
+ }
+ }
+ }else{
+ log_data_err("Errors in uscript_getScriptCode() expected error : %s got: %s \n",
+ "U_BUFFER_OVERFLOW_ERROR",
+ u_errorName(err));
+ }
+
+ }
+
+ {
+ UScriptCode testAbbr[]={
+ /* names should return */
+ USCRIPT_CYRILLIC, USCRIPT_DESERET, USCRIPT_DEVANAGARI, USCRIPT_ETHIOPIC, USCRIPT_GEORGIAN,
+ USCRIPT_GOTHIC, USCRIPT_GREEK, USCRIPT_GUJARATI,
+ };
+
+ const char* expectedNames[]={
+
+ /* test names */
+ "Cyrillic","Deseret","Devanagari","Ethiopic","Georgian",
+ "Gothic", "Greek", "Gujarati",
+ '\0'
+ };
+ i=0;
+ while(i<sizeof(testAbbr)/sizeof(UScriptCode)){
+ const char* name = uscript_getName(testAbbr[i]);
+ if(name == NULL) {
+ log_data_err("Couldn't get script name\n");
+ return;
+ }
+ numErrors=0;
+ if(strcmp(expectedNames[i],name)!=0){
+ log_err("Error getting abbreviations Got: %s Expected: %s\n",name,expectedNames[i]);
+ numErrors++;
+ }
+ if(numErrors > 0){
+ if(numErrors >0 ){
+ log_err("Errors uchar_getScriptAbbr() : %i \n",numErrors);
+ }
+ }
+ i++;
+ }
+
+ }
+
+ {
+ UScriptCode testAbbr[]={
+ /* abbr should return */
+ USCRIPT_HAN, USCRIPT_HANGUL, USCRIPT_HEBREW, USCRIPT_HIRAGANA,
+ USCRIPT_KANNADA, USCRIPT_KATAKANA, USCRIPT_KHMER, USCRIPT_LAO,
+ USCRIPT_LATIN,
+ USCRIPT_MALAYALAM, USCRIPT_MONGOLIAN,
+ };
+
+ const char* expectedAbbr[]={
+ /* test abbr */
+ "Hani", "Hang","Hebr","Hira",
+ "Knda","Kana","Khmr","Laoo",
+ "Latn",
+ "Mlym", "Mong",
+ '\0'
+ };
+ i=0;
+ while(i<sizeof(testAbbr)/sizeof(UScriptCode)){
+ const char* name = uscript_getShortName(testAbbr[i]);
+ numErrors=0;
+ if(strcmp(expectedAbbr[i],name)!=0){
+ log_err("Error getting abbreviations Got: %s Expected: %s\n",name,expectedAbbr[i]);
+ numErrors++;
+ }
+ if(numErrors > 0){
+ if(numErrors >0 ){
+ log_err("Errors uchar_getScriptAbbr() : %i \n",numErrors);
+ }
+ }
+ i++;
+ }
+
+ }
+ /* now test uscript_getScript() API */
+ {
+#define MAX_ARRAY_SIZE 23
+ uint32_t codepoints[] = {
+ 0x0000FF9D, /* USCRIPT_KATAKANA*/
+ 0x0000FFBE, /* USCRIPT_HANGUL*/
+ 0x0000FFC7, /* USCRIPT_HANGUL*/
+ 0x0000FFCF, /* USCRIPT_HANGUL*/
+ 0x0000FFD7, /* USCRIPT_HANGUL*/
+ 0x0000FFDC, /* USCRIPT_HANGUL*/
+ 0x00010300, /* USCRIPT_OLD_ITALIC*/
+ 0x00010330, /* USCRIPT_GOTHIC*/
+ 0x0001034A, /* USCRIPT_GOTHIC*/
+ 0x00010400, /* USCRIPT_DESERET*/
+ 0x00010428, /* USCRIPT_DESERET*/
+ 0x0001D167, /* USCRIPT_INHERITED*/
+ 0x0001D17B, /* USCRIPT_INHERITED*/
+ 0x0001D185, /* USCRIPT_INHERITED*/
+ 0x0001D1AA, /* USCRIPT_INHERITED*/
+ 0x00020000, /* USCRIPT_HAN*/
+ 0x00000D02, /* USCRIPT_MALAYALAM*/
+ 0x00000D00, /* USCRIPT_UNKNOWN (new Zzzz value in Unicode 5.0) */
+ 0x00000000, /* USCRIPT_COMMON*/
+ 0x0001D169, /* USCRIPT_INHERITED*/
+ 0x0001D182, /* USCRIPT_INHERITED*/
+ 0x0001D18B, /* USCRIPT_INHERITED*/
+ 0x0001D1AD, /* USCRIPT_INHERITED*/
+ 0x00110000, /* USCRIPT_INVALID_CODE */
+ };
+
+ UScriptCode expected[] = {
+ USCRIPT_KATAKANA ,
+ USCRIPT_HANGUL ,
+ USCRIPT_HANGUL ,
+ USCRIPT_HANGUL ,
+ USCRIPT_HANGUL ,
+ USCRIPT_HANGUL ,
+ USCRIPT_OLD_ITALIC,
+ USCRIPT_GOTHIC ,
+ USCRIPT_GOTHIC ,
+ USCRIPT_DESERET ,
+ USCRIPT_DESERET ,
+ USCRIPT_INHERITED,
+ USCRIPT_INHERITED,
+ USCRIPT_INHERITED,
+ USCRIPT_INHERITED,
+ USCRIPT_HAN ,
+ USCRIPT_MALAYALAM,
+ USCRIPT_UNKNOWN,
+ USCRIPT_COMMON,
+ USCRIPT_INHERITED ,
+ USCRIPT_INHERITED ,
+ USCRIPT_INHERITED ,
+ USCRIPT_INHERITED ,
+ USCRIPT_INVALID_CODE,
+ };
+ UScriptCode code = USCRIPT_INVALID_CODE;
+ UErrorCode status = U_ZERO_ERROR;
+ UBool passed = TRUE;
+
+ i =0;
+ while(i< MAX_ARRAY_SIZE){
+ code = uscript_getScript(codepoints[i],&status);
+ if(U_SUCCESS(status)){
+ if( code != expected[i] ||
+ code != (UScriptCode)u_getIntPropertyValue(codepoints[i], UCHAR_SCRIPT)
+ ) {
+ log_err("uscript_getScript for codepoint \\U%08X failed\n",codepoints[i]);
+ passed = FALSE;
+ }
+ }else{
+ log_err("uscript_getScript for codepoint \\U%08X failed. Error: %s\n",
+ codepoints[i],u_errorName(status));
+ break;
+ }
+ i++;
+ }
+
+ if(passed==FALSE){
+ log_err("uscript_getScript failed.\n");
+ }
+ }
+ {
+ UScriptCode code= USCRIPT_INVALID_CODE;
+ UErrorCode status = U_ZERO_ERROR;
+ code = uscript_getScript(0x001D169,&status);
+ if(code != USCRIPT_INHERITED){
+ log_err("\\U001D169 is not contained in USCRIPT_INHERITED");
+ }
+ }
+ {
+ UScriptCode code= USCRIPT_INVALID_CODE;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t err = 0;
+
+ for(i = 0; i<=0x10ffff; i++){
+ code = uscript_getScript(i,&status);
+ if(code == USCRIPT_INVALID_CODE){
+ err++;
+ log_err("uscript_getScript for codepoint \\U%08X failed.\n", i);
+ }
+ }
+ if(err>0){
+ log_err("uscript_getScript failed for %d codepoints\n", err);
+ }
+ }
+ {
+ for(i=0; (UScriptCode)i< USCRIPT_CODE_LIMIT; i++){
+ const char* name = uscript_getName((UScriptCode)i);
+ if(name==NULL || strcmp(name,"")==0){
+ log_err("uscript_getName failed for code %i: name is NULL or \"\"\n",i);
+ }
+ }
+ }
+
+ {
+ /*
+ * These script codes were originally added to ICU pre-3.6, so that ICU would
+ * have all ISO 15924 script codes. ICU was then based on Unicode 4.1.
+ * These script codes were added with only short names because we don't
+ * want to invent long names ourselves.
+ * Unicode 5 and later encode some of these scripts and give them long names.
+ * Whenever this happens, the long script names here need to be updated.
+ */
+ static const char* expectedLong[] = {
+ "Balinese", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
+ "Geok", "Hans", "Hant", "Hmng", "Hung", "Inds", "Java", "Kali", "Latf", "Latg",
+ "Lepc", "Lina", "Mand", "Maya", "Mero", "Nko", "Orkh", "Perm", "Phags_Pa", "Phoenician",
+ "Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Cuneiform",
+ "Zxxx", "Unknown",
+ "Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
+ "Moon", "Mtei",
+ };
+ static const char* expectedShort[] = {
+ "Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
+ "Geok", "Hans", "Hant", "Hmng", "Hung", "Inds", "Java", "Kali", "Latf", "Latg",
+ "Lepc", "Lina", "Mand", "Maya", "Mero", "Nkoo", "Orkh", "Perm", "Phag", "Phnx",
+ "Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Xsux",
+ "Zxxx", "Zzzz",
+ "Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
+ "Moon", "Mtei",
+ };
+ int32_t j = 0;
+ for(i=USCRIPT_BALINESE; (UScriptCode)i<USCRIPT_CODE_LIMIT; i++, j++){
+ const char* name = uscript_getName((UScriptCode)i);
+ if(name==NULL || strcmp(name,expectedLong[j])!=0){
+ log_err("uscript_getName failed for code %i: %s!=%s\n", i, name, expectedLong[j]);
+ }
+ name = uscript_getShortName((UScriptCode)i);
+ if(name==NULL || strcmp(name,expectedShort[j])!=0){
+ log_err("uscript_getShortName failed for code %i: %s!=%s\n", i, name, expectedShort[j]);
+ }
+ }
+ for(i=0; i<ARRAY_SIZE(expectedLong); i++){
+ UScriptCode fillIn[5] = {USCRIPT_INVALID_CODE};
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = 0;
+ len = uscript_getCode(expectedShort[i], fillIn, ARRAY_SIZE(fillIn), &status);
+ if(U_FAILURE(status)){
+ log_err("uscript_getCode failed for script name %s. Error: %s\n",expectedShort[i], u_errorName(status));
+ }
+ if(len>1){
+ log_err("uscript_getCode did not return expected number of codes for script %s. EXPECTED: 1 GOT: %i\n", expectedShort[i], len);
+ }
+ if(fillIn[0]!= (UScriptCode)(USCRIPT_BALINESE+i)){
+ log_err("uscript_getCode did not return expected code for script %s. EXPECTED: %i GOT: %i\n", expectedShort[i], (USCRIPT_BALINESE+i), fillIn[0] );
+ }
+ }
+ }
+ }
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.h b/Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.h
new file mode 100644
index 00000000000..a61b52da4f3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cucdapi.h
@@ -0,0 +1,9 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2003-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+void TestUScriptCodeAPI(void);
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cucdtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cucdtst.c
new file mode 100644
index 00000000000..f132d12e6f2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cucdtst.c
@@ -0,0 +1,3342 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*******************************************************************************
+*
+* File CUCDTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API, added tests for string functions
+********************************************************************************
+*/
+
+#include <string.h>
+#include <math.h>
+#include <stdlib.h>
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/putil.h"
+#include "unicode/ustring.h"
+#include "unicode/uloc.h"
+
+#include "cintltst.h"
+#include "putilimp.h"
+#include "uparse.h"
+#include "ucase.h"
+#include "ubidi_props.h"
+#include "uprops.h"
+#include "uset_imp.h"
+#include "usc_impl.h"
+#include "unormimp.h"
+#include "udatamem.h" /* for testing ucase_openBinary() */
+#include "cucdapi.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+/* prototypes --------------------------------------------------------------- */
+
+static void TestUpperLower(void);
+static void TestLetterNumber(void);
+static void TestMisc(void);
+static void TestPOSIX(void);
+static void TestControlPrint(void);
+static void TestIdentifier(void);
+static void TestUnicodeData(void);
+static void TestCodeUnit(void);
+static void TestCodePoint(void);
+static void TestCharLength(void);
+static void TestCharNames(void);
+static void TestMirroring(void);
+/* void TestUScriptCodeAPI(void);*/ /* defined in cucdapi.h */
+static void TestUScriptRunAPI(void);
+static void TestAdditionalProperties(void);
+static void TestNumericProperties(void);
+static void TestPropertyNames(void);
+static void TestPropertyValues(void);
+static void TestConsistency(void);
+static void TestUCase(void);
+static void TestUBiDiProps(void);
+static void TestCaseFolding(void);
+
+/* internal methods used */
+static int32_t MakeProp(char* str);
+static int32_t MakeDir(char* str);
+
+/* helpers ------------------------------------------------------------------ */
+
+static void
+parseUCDFile(const char *filename,
+ char *fields[][2], int32_t fieldCount,
+ UParseLineFn *lineFn, void *context,
+ UErrorCode *pErrorCode) {
+ char path[256];
+ char backupPath[256];
+
+ if(U_FAILURE(*pErrorCode)) {
+ return;
+ }
+
+ /* Look inside ICU_DATA first */
+ strcpy(path, u_getDataDirectory());
+ strcat(path, ".." U_FILE_SEP_STRING "unidata" U_FILE_SEP_STRING);
+ strcat(path, filename);
+
+ /* As a fallback, try to guess where the source data was located
+ * at the time ICU was built, and look there.
+ */
+ strcpy(backupPath, ctest_dataSrcDir());
+ strcat(backupPath, U_FILE_SEP_STRING);
+ strcat(backupPath, "unidata" U_FILE_SEP_STRING);
+ strcat(backupPath, filename);
+
+ u_parseDelimitedFile(path, ';', fields, fieldCount, lineFn, context, pErrorCode);
+ if(*pErrorCode==U_FILE_ACCESS_ERROR) {
+ *pErrorCode=U_ZERO_ERROR;
+ u_parseDelimitedFile(backupPath, ';', fields, fieldCount, lineFn, context, pErrorCode);
+ }
+ if(U_FAILURE(*pErrorCode)) {
+ log_err("error parsing %s: %s\n", filename, u_errorName(*pErrorCode));
+ }
+}
+
+/* test data ---------------------------------------------------------------- */
+
+static const UChar LAST_CHAR_CODE_IN_FILE = 0xFFFD;
+static const char tagStrings[] = "MnMcMeNdNlNoZsZlZpCcCfCsCoCnLuLlLtLmLoPcPdPsPePoSmScSkSoPiPf";
+static const int32_t tagValues[] =
+ {
+ /* Mn */ U_NON_SPACING_MARK,
+ /* Mc */ U_COMBINING_SPACING_MARK,
+ /* Me */ U_ENCLOSING_MARK,
+ /* Nd */ U_DECIMAL_DIGIT_NUMBER,
+ /* Nl */ U_LETTER_NUMBER,
+ /* No */ U_OTHER_NUMBER,
+ /* Zs */ U_SPACE_SEPARATOR,
+ /* Zl */ U_LINE_SEPARATOR,
+ /* Zp */ U_PARAGRAPH_SEPARATOR,
+ /* Cc */ U_CONTROL_CHAR,
+ /* Cf */ U_FORMAT_CHAR,
+ /* Cs */ U_SURROGATE,
+ /* Co */ U_PRIVATE_USE_CHAR,
+ /* Cn */ U_UNASSIGNED,
+ /* Lu */ U_UPPERCASE_LETTER,
+ /* Ll */ U_LOWERCASE_LETTER,
+ /* Lt */ U_TITLECASE_LETTER,
+ /* Lm */ U_MODIFIER_LETTER,
+ /* Lo */ U_OTHER_LETTER,
+ /* Pc */ U_CONNECTOR_PUNCTUATION,
+ /* Pd */ U_DASH_PUNCTUATION,
+ /* Ps */ U_START_PUNCTUATION,
+ /* Pe */ U_END_PUNCTUATION,
+ /* Po */ U_OTHER_PUNCTUATION,
+ /* Sm */ U_MATH_SYMBOL,
+ /* Sc */ U_CURRENCY_SYMBOL,
+ /* Sk */ U_MODIFIER_SYMBOL,
+ /* So */ U_OTHER_SYMBOL,
+ /* Pi */ U_INITIAL_PUNCTUATION,
+ /* Pf */ U_FINAL_PUNCTUATION
+ };
+
+static const char dirStrings[][5] = {
+ "L",
+ "R",
+ "EN",
+ "ES",
+ "ET",
+ "AN",
+ "CS",
+ "B",
+ "S",
+ "WS",
+ "ON",
+ "LRE",
+ "LRO",
+ "AL",
+ "RLE",
+ "RLO",
+ "PDF",
+ "NSM",
+ "BN"
+};
+
+void addUnicodeTest(TestNode** root);
+
+void addUnicodeTest(TestNode** root)
+{
+ addTest(root, &TestUnicodeData, "tsutil/cucdtst/TestUnicodeData");
+ addTest(root, &TestCodeUnit, "tsutil/cucdtst/TestCodeUnit");
+ addTest(root, &TestCodePoint, "tsutil/cucdtst/TestCodePoint");
+ addTest(root, &TestCharLength, "tsutil/cucdtst/TestCharLength");
+ addTest(root, &TestAdditionalProperties, "tsutil/cucdtst/TestAdditionalProperties");
+ addTest(root, &TestNumericProperties, "tsutil/cucdtst/TestNumericProperties");
+ addTest(root, &TestUpperLower, "tsutil/cucdtst/TestUpperLower");
+ addTest(root, &TestLetterNumber, "tsutil/cucdtst/TestLetterNumber");
+ addTest(root, &TestMisc, "tsutil/cucdtst/TestMisc");
+ addTest(root, &TestPOSIX, "tsutil/cucdtst/TestPOSIX");
+ addTest(root, &TestControlPrint, "tsutil/cucdtst/TestControlPrint");
+ addTest(root, &TestIdentifier, "tsutil/cucdtst/TestIdentifier");
+ addTest(root, &TestCharNames, "tsutil/cucdtst/TestCharNames");
+ addTest(root, &TestMirroring, "tsutil/cucdtst/TestMirroring");
+ addTest(root, &TestUScriptCodeAPI, "tsutil/cucdtst/TestUScriptCodeAPI");
+ addTest(root, &TestUScriptRunAPI, "tsutil/cucdtst/TestUScriptRunAPI");
+ addTest(root, &TestPropertyNames, "tsutil/cucdtst/TestPropertyNames");
+ addTest(root, &TestPropertyValues, "tsutil/cucdtst/TestPropertyValues");
+ addTest(root, &TestConsistency, "tsutil/cucdtst/TestConsistency");
+ addTest(root, &TestUCase, "tsutil/cucdtst/TestUCase");
+ addTest(root, &TestUBiDiProps, "tsutil/cucdtst/TestUBiDiProps");
+ addTest(root, &TestCaseFolding, "tsutil/cucdtst/TestCaseFolding");
+}
+
+/*==================================================== */
+/* test u_toupper() and u_tolower() */
+/*==================================================== */
+static void TestUpperLower()
+{
+ const UChar upper[] = {0x41, 0x42, 0x00b2, 0x01c4, 0x01c6, 0x01c9, 0x01c8, 0x01c9, 0x000c, 0x0000};
+ const UChar lower[] = {0x61, 0x62, 0x00b2, 0x01c6, 0x01c6, 0x01c9, 0x01c9, 0x01c9, 0x000c, 0x0000};
+ U_STRING_DECL(upperTest, "abcdefg123hij.?:klmno", 21);
+ U_STRING_DECL(lowerTest, "ABCDEFG123HIJ.?:KLMNO", 21);
+ int32_t i;
+
+ U_STRING_INIT(upperTest, "abcdefg123hij.?:klmno", 21);
+ U_STRING_INIT(lowerTest, "ABCDEFG123HIJ.?:KLMNO", 21);
+
+/*
+Checks LetterLike Symbols which were previously a source of confusion
+[Bertrand A. D. 02/04/98]
+*/
+ for (i=0x2100;i<0x2138;i++)
+ {
+ /* Unicode 5.0 adds lowercase U+214E (TURNED SMALL F) to U+2132 (TURNED CAPITAL F) */
+ if(i!=0x2126 && i!=0x212a && i!=0x212b && i!=0x2132)
+ {
+ if (i != (int)u_tolower(i)) /* itself */
+ log_err("Failed case conversion with itself: U+%04x\n", i);
+ if (i != (int)u_toupper(i))
+ log_err("Failed case conversion with itself: U+%04x\n", i);
+ }
+ }
+
+ for(i=0; i < u_strlen(upper); i++){
+ if(u_tolower(upper[i]) != lower[i]){
+ log_err("FAILED u_tolower() for %lx Expected %lx Got %lx\n", upper[i], lower[i], u_tolower(upper[i]));
+ }
+ }
+
+ log_verbose("testing upper lower\n");
+ for (i = 0; i < 21; i++) {
+
+ if (u_isalpha(upperTest[i]) && !u_islower(upperTest[i]))
+ {
+ log_err("Failed isLowerCase test at %c\n", upperTest[i]);
+ }
+ else if (u_isalpha(lowerTest[i]) && !u_isupper(lowerTest[i]))
+ {
+ log_err("Failed isUpperCase test at %c\n", lowerTest[i]);
+ }
+ else if (upperTest[i] != u_tolower(lowerTest[i]))
+ {
+ log_err("Failed case conversion from %c To %c :\n", lowerTest[i], upperTest[i]);
+ }
+ else if (lowerTest[i] != u_toupper(upperTest[i]))
+ {
+ log_err("Failed case conversion : %c To %c \n", upperTest[i], lowerTest[i]);
+ }
+ else if (upperTest[i] != u_tolower(upperTest[i]))
+ {
+ log_err("Failed case conversion with itself: %c\n", upperTest[i]);
+ }
+ else if (lowerTest[i] != u_toupper(lowerTest[i]))
+ {
+ log_err("Failed case conversion with itself: %c\n", lowerTest[i]);
+ }
+ }
+ log_verbose("done testing upper lower\n");
+
+ log_verbose("testing u_istitle\n");
+ {
+ static const UChar expected[] = {
+ 0x1F88,
+ 0x1F89,
+ 0x1F8A,
+ 0x1F8B,
+ 0x1F8C,
+ 0x1F8D,
+ 0x1F8E,
+ 0x1F8F,
+ 0x1F88,
+ 0x1F89,
+ 0x1F8A,
+ 0x1F8B,
+ 0x1F8C,
+ 0x1F8D,
+ 0x1F8E,
+ 0x1F8F,
+ 0x1F98,
+ 0x1F99,
+ 0x1F9A,
+ 0x1F9B,
+ 0x1F9C,
+ 0x1F9D,
+ 0x1F9E,
+ 0x1F9F,
+ 0x1F98,
+ 0x1F99,
+ 0x1F9A,
+ 0x1F9B,
+ 0x1F9C,
+ 0x1F9D,
+ 0x1F9E,
+ 0x1F9F,
+ 0x1FA8,
+ 0x1FA9,
+ 0x1FAA,
+ 0x1FAB,
+ 0x1FAC,
+ 0x1FAD,
+ 0x1FAE,
+ 0x1FAF,
+ 0x1FA8,
+ 0x1FA9,
+ 0x1FAA,
+ 0x1FAB,
+ 0x1FAC,
+ 0x1FAD,
+ 0x1FAE,
+ 0x1FAF,
+ 0x1FBC,
+ 0x1FBC,
+ 0x1FCC,
+ 0x1FCC,
+ 0x1FFC,
+ 0x1FFC,
+ };
+ int32_t num = sizeof(expected)/sizeof(expected[0]);
+ for(i=0; i<num; i++){
+ if(!u_istitle(expected[i])){
+ log_err("u_istitle failed for 0x%4X. Expected TRUE, got FALSE\n",expected[i]);
+ }
+ }
+
+ }
+}
+
+/* compare two sets and verify that their difference or intersection is empty */
+static UBool
+showADiffB(const USet *a, const USet *b,
+ const char *a_name, const char *b_name,
+ UBool expect, UBool diffIsError) {
+ USet *aa;
+ int32_t i, start, end, length;
+ UErrorCode errorCode;
+
+ /*
+ * expect:
+ * TRUE -> a-b should be empty, that is, b should contain all of a
+ * FALSE -> a&b should be empty, that is, a should contain none of b (and vice versa)
+ */
+ if(expect ? uset_containsAll(b, a) : uset_containsNone(a, b)) {
+ return TRUE;
+ }
+
+ /* clone a to aa because a is const */
+ aa=uset_open(1, 0);
+ if(aa==NULL) {
+ /* unusual problem - out of memory? */
+ return FALSE;
+ }
+ uset_addAll(aa, a);
+
+ /* compute the set in question */
+ if(expect) {
+ /* a-b */
+ uset_removeAll(aa, b);
+ } else {
+ /* a&b */
+ uset_retainAll(aa, b);
+ }
+
+ /* aa is not empty because of the initial tests above; show its contents */
+ errorCode=U_ZERO_ERROR;
+ i=0;
+ for(;;) {
+ length=uset_getItem(aa, i, &start, &end, NULL, 0, &errorCode);
+ if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
+ break; /* done */
+ }
+ if(U_FAILURE(errorCode)) {
+ log_err("error comparing %s with %s at difference item %d: %s\n",
+ a_name, b_name, i, u_errorName(errorCode));
+ break;
+ }
+ if(length!=0) {
+ break; /* done with code points, got a string or -1 */
+ }
+
+ if(diffIsError) {
+ if(expect) {
+ log_err("error: %s contains U+%04x..U+%04x but %s does not\n", a_name, start, end, b_name);
+ } else {
+ log_err("error: %s and %s both contain U+%04x..U+%04x but should not intersect\n", a_name, b_name, start, end);
+ }
+ } else {
+ if(expect) {
+ log_verbose("info: %s contains U+%04x..U+%04x but %s does not\n", a_name, start, end, b_name);
+ } else {
+ log_verbose("info: %s and %s both contain U+%04x..U+%04x but should not intersect\n", a_name, b_name, start, end);
+ }
+ }
+
+ ++i;
+ }
+
+ uset_close(aa);
+ return FALSE;
+}
+
+static UBool
+showAMinusB(const USet *a, const USet *b,
+ const char *a_name, const char *b_name,
+ UBool diffIsError) {
+ return showADiffB(a, b, a_name, b_name, TRUE, diffIsError);
+}
+
+static UBool
+showAIntersectB(const USet *a, const USet *b,
+ const char *a_name, const char *b_name,
+ UBool diffIsError) {
+ return showADiffB(a, b, a_name, b_name, FALSE, diffIsError);
+}
+
+static UBool
+compareUSets(const USet *a, const USet *b,
+ const char *a_name, const char *b_name,
+ UBool diffIsError) {
+ /*
+ * Use an arithmetic & not a logical && so that both branches
+ * are always taken and all differences are shown.
+ */
+ return
+ showAMinusB(a, b, a_name, b_name, diffIsError) &
+ showAMinusB(b, a, b_name, a_name, diffIsError);
+}
+
+/* test isLetter(u_isapha()) and isDigit(u_isdigit()) */
+static void TestLetterNumber()
+{
+ UChar i = 0x0000;
+
+ log_verbose("Testing for isalpha\n");
+ for (i = 0x0041; i < 0x005B; i++) {
+ if (!u_isalpha(i))
+ {
+ log_err("Failed isLetter test at %.4X\n", i);
+ }
+ }
+ for (i = 0x0660; i < 0x066A; i++) {
+ if (u_isalpha(i))
+ {
+ log_err("Failed isLetter test with numbers at %.4X\n", i);
+ }
+ }
+
+ log_verbose("Testing for isdigit\n");
+ for (i = 0x0660; i < 0x066A; i++) {
+ if (!u_isdigit(i))
+ {
+ log_verbose("Failed isNumber test at %.4X\n", i);
+ }
+ }
+
+ log_verbose("Testing for isalnum\n");
+ for (i = 0x0041; i < 0x005B; i++) {
+ if (!u_isalnum(i))
+ {
+ log_err("Failed isAlNum test at %.4X\n", i);
+ }
+ }
+ for (i = 0x0660; i < 0x066A; i++) {
+ if (!u_isalnum(i))
+ {
+ log_err("Failed isAlNum test at %.4X\n", i);
+ }
+ }
+
+ {
+ /*
+ * The following checks work only starting from Unicode 4.0.
+ * Check the version number here.
+ */
+ static UVersionInfo u401={ 4, 0, 1, 0 };
+ UVersionInfo version;
+ u_getUnicodeVersion(version);
+ if(version[0]<4 || 0==memcmp(version, u401, 4)) {
+ return;
+ }
+ }
+
+ {
+ /*
+ * Sanity check:
+ * Verify that exactly the digit characters have decimal digit values.
+ * This assumption is used in the implementation of u_digit()
+ * (which checks nt=de)
+ * compared with the parallel java.lang.Character.digit()
+ * (which checks Nd).
+ *
+ * This was not true in Unicode 3.2 and earlier.
+ * Unicode 4.0 fixed discrepancies.
+ * Unicode 4.0.1 re-introduced problems in this area due to an
+ * unintentionally incomplete last-minute change.
+ */
+ U_STRING_DECL(digitsPattern, "[:Nd:]", 6);
+ U_STRING_DECL(decimalValuesPattern, "[:Numeric_Type=Decimal:]", 24);
+
+ USet *digits, *decimalValues;
+ UErrorCode errorCode;
+
+ U_STRING_INIT(digitsPattern, "[:Nd:]", 6);
+ U_STRING_INIT(decimalValuesPattern, "[:Numeric_Type=Decimal:]", 24);
+ errorCode=U_ZERO_ERROR;
+ digits=uset_openPattern(digitsPattern, 6, &errorCode);
+ decimalValues=uset_openPattern(decimalValuesPattern, 24, &errorCode);
+
+ if(U_SUCCESS(errorCode)) {
+ compareUSets(digits, decimalValues, "[:Nd:]", "[:Numeric_Type=Decimal:]", TRUE);
+ }
+
+ uset_close(digits);
+ uset_close(decimalValues);
+ }
+}
+
+/* Tests for isDefined(u_isdefined)(, isBaseForm(u_isbase()), isSpaceChar(u_isspace()), isWhiteSpace(), u_CharDigitValue() */
+static void TestMisc()
+{
+ static const UChar sampleSpaces[] = {0x0020, 0x00a0, 0x2000, 0x2001, 0x2005};
+ static const UChar sampleNonSpaces[] = {0x61, 0x62, 0x63, 0x64, 0x74};
+ static const UChar sampleUndefined[] = {0xfff1, 0xfff7, 0xfa6b };
+ static const UChar sampleDefined[] = {0x523E, 0x4f88, 0xfffd};
+ static const UChar sampleBase[] = {0x0061, 0x0031, 0x03d2};
+ static const UChar sampleNonBase[] = {0x002B, 0x0020, 0x203B};
+/* static const UChar sampleChars[] = {0x000a, 0x0045, 0x4e00, 0xDC00, 0xFFE8, 0xFFF0};*/
+ static const UChar sampleDigits[]= {0x0030, 0x0662, 0x0F23, 0x0ED5};
+ static const UChar sampleNonDigits[] = {0x0010, 0x0041, 0x0122, 0x68FE};
+ static const UChar sampleWhiteSpaces[] = {0x2008, 0x2009, 0x200a, 0x001c, 0x000c};
+ static const UChar sampleNonWhiteSpaces[] = {0x61, 0x62, 0x3c, 0x28, 0x3f};
+
+
+ static const int32_t sampleDigitValues[] = {0, 2, 3, 5};
+
+ uint32_t mask;
+
+ int32_t i;
+ char icuVersion[U_MAX_VERSION_STRING_LENGTH];
+ UVersionInfo realVersion;
+
+ memset(icuVersion, 0, U_MAX_VERSION_STRING_LENGTH);
+
+ log_verbose("Testing for isspace and nonspaces\n");
+ for (i = 0; i < 5; i++) {
+ if (!(u_isspace(sampleSpaces[i])) ||
+ (u_isspace(sampleNonSpaces[i])))
+ {
+ log_err("Space char test error : %d or %d \n", (int32_t)sampleSpaces[i], (int32_t)sampleNonSpaces[i]);
+ }
+ if (!(u_isJavaSpaceChar(sampleSpaces[i])) ||
+ (u_isJavaSpaceChar(sampleNonSpaces[i])))
+ {
+ log_err("u_isJavaSpaceChar() test error : %d or %d \n", (int32_t)sampleSpaces[i], (int32_t)sampleNonSpaces[i]);
+ }
+ }
+
+ log_verbose("Testing for isspace and nonspaces\n");
+ for (i = 0; i < 5; i++) {
+ if (!(u_isWhitespace(sampleWhiteSpaces[i])) ||
+ (u_isWhitespace(sampleNonWhiteSpaces[i])))
+ {
+ log_err("White Space char test error : %lx or %lx \n", sampleWhiteSpaces[i], sampleNonWhiteSpaces[i]);
+ }
+ }
+
+ log_verbose("Testing for isdefined\n");
+ for (i = 0; i < 3; i++) {
+ if ((u_isdefined(sampleUndefined[i])) ||
+ !(u_isdefined(sampleDefined[i])))
+ {
+ log_err("Undefined char test error : U+%04x or U+%04x\n", (int32_t)sampleUndefined[i], (int32_t)sampleDefined[i]);
+ }
+ }
+
+ log_verbose("Testing for isbase\n");
+ for (i = 0; i < 3; i++) {
+ if ((u_isbase(sampleNonBase[i])) ||
+ !(u_isbase(sampleBase[i])))
+ {
+ log_err("Non-baseform char test error : U+%04x or U+%04x",(int32_t)sampleNonBase[i], (int32_t)sampleBase[i]);
+ }
+ }
+
+ log_verbose("Testing for isdigit \n");
+ for (i = 0; i < 4; i++) {
+ if ((u_isdigit(sampleDigits[i]) &&
+ (u_charDigitValue(sampleDigits[i])!= sampleDigitValues[i])) ||
+ (u_isdigit(sampleNonDigits[i]))) {
+ log_err("Digit char test error : %lx or %lx\n", sampleDigits[i], sampleNonDigits[i]);
+ }
+ }
+
+ /* Tests the ICU version #*/
+ u_getVersion(realVersion);
+ u_versionToString(realVersion, icuVersion);
+ if (strncmp(icuVersion, U_ICU_VERSION, uprv_min((int32_t)strlen(icuVersion), (int32_t)strlen(U_ICU_VERSION))) != 0)
+ {
+ log_err("ICU version test failed. Header says=%s, got=%s \n", U_ICU_VERSION, icuVersion);
+ }
+#if defined(ICU_VERSION)
+ /* test only happens where we have configure.in with VERSION - sanity check. */
+ if(strcmp(U_ICU_VERSION, ICU_VERSION))
+ {
+ log_err("ICU version mismatch: Header says %s, build environment says %s.\n", U_ICU_VERSION, ICU_VERSION);
+ }
+#endif
+
+ /* test U_GC_... */
+ if(
+ U_GET_GC_MASK(0x41)!=U_GC_LU_MASK ||
+ U_GET_GC_MASK(0x662)!=U_GC_ND_MASK ||
+ U_GET_GC_MASK(0xa0)!=U_GC_ZS_MASK ||
+ U_GET_GC_MASK(0x28)!=U_GC_PS_MASK ||
+ U_GET_GC_MASK(0x2044)!=U_GC_SM_MASK ||
+ U_GET_GC_MASK(0xe0063)!=U_GC_CF_MASK
+ ) {
+ log_err("error: U_GET_GC_MASK does not work properly\n");
+ }
+
+ mask=0;
+ mask=(mask&~U_GC_CN_MASK)|U_GC_CN_MASK;
+
+ mask=(mask&~U_GC_LU_MASK)|U_GC_LU_MASK;
+ mask=(mask&~U_GC_LL_MASK)|U_GC_LL_MASK;
+ mask=(mask&~U_GC_LT_MASK)|U_GC_LT_MASK;
+ mask=(mask&~U_GC_LM_MASK)|U_GC_LM_MASK;
+ mask=(mask&~U_GC_LO_MASK)|U_GC_LO_MASK;
+
+ mask=(mask&~U_GC_MN_MASK)|U_GC_MN_MASK;
+ mask=(mask&~U_GC_ME_MASK)|U_GC_ME_MASK;
+ mask=(mask&~U_GC_MC_MASK)|U_GC_MC_MASK;
+
+ mask=(mask&~U_GC_ND_MASK)|U_GC_ND_MASK;
+ mask=(mask&~U_GC_NL_MASK)|U_GC_NL_MASK;
+ mask=(mask&~U_GC_NO_MASK)|U_GC_NO_MASK;
+
+ mask=(mask&~U_GC_ZS_MASK)|U_GC_ZS_MASK;
+ mask=(mask&~U_GC_ZL_MASK)|U_GC_ZL_MASK;
+ mask=(mask&~U_GC_ZP_MASK)|U_GC_ZP_MASK;
+
+ mask=(mask&~U_GC_CC_MASK)|U_GC_CC_MASK;
+ mask=(mask&~U_GC_CF_MASK)|U_GC_CF_MASK;
+ mask=(mask&~U_GC_CO_MASK)|U_GC_CO_MASK;
+ mask=(mask&~U_GC_CS_MASK)|U_GC_CS_MASK;
+
+ mask=(mask&~U_GC_PD_MASK)|U_GC_PD_MASK;
+ mask=(mask&~U_GC_PS_MASK)|U_GC_PS_MASK;
+ mask=(mask&~U_GC_PE_MASK)|U_GC_PE_MASK;
+ mask=(mask&~U_GC_PC_MASK)|U_GC_PC_MASK;
+ mask=(mask&~U_GC_PO_MASK)|U_GC_PO_MASK;
+
+ mask=(mask&~U_GC_SM_MASK)|U_GC_SM_MASK;
+ mask=(mask&~U_GC_SC_MASK)|U_GC_SC_MASK;
+ mask=(mask&~U_GC_SK_MASK)|U_GC_SK_MASK;
+ mask=(mask&~U_GC_SO_MASK)|U_GC_SO_MASK;
+
+ mask=(mask&~U_GC_PI_MASK)|U_GC_PI_MASK;
+ mask=(mask&~U_GC_PF_MASK)|U_GC_PF_MASK;
+
+ if(mask!=(U_CHAR_CATEGORY_COUNT<32 ? U_MASK(U_CHAR_CATEGORY_COUNT)-1: 0xffffffff)) {
+ log_err("error: problems with U_GC_XX_MASK constants\n");
+ }
+
+ mask=0;
+ mask=(mask&~U_GC_C_MASK)|U_GC_C_MASK;
+ mask=(mask&~U_GC_L_MASK)|U_GC_L_MASK;
+ mask=(mask&~U_GC_M_MASK)|U_GC_M_MASK;
+ mask=(mask&~U_GC_N_MASK)|U_GC_N_MASK;
+ mask=(mask&~U_GC_Z_MASK)|U_GC_Z_MASK;
+ mask=(mask&~U_GC_P_MASK)|U_GC_P_MASK;
+ mask=(mask&~U_GC_S_MASK)|U_GC_S_MASK;
+
+ if(mask!=(U_CHAR_CATEGORY_COUNT<32 ? U_MASK(U_CHAR_CATEGORY_COUNT)-1: 0xffffffff)) {
+ log_err("error: problems with U_GC_Y_MASK constants\n");
+ }
+ {
+ static const UChar32 digit[10]={ 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039 };
+ for(i=0; i<10; i++){
+ if(digit[i]!=u_forDigit(i,10)){
+ log_err("u_forDigit failed for %i. Expected: 0x%4X Got: 0x%4X\n",i,digit[i],u_forDigit(i,10));
+ }
+ }
+ }
+
+ /* test u_digit() */
+ {
+ static const struct {
+ UChar32 c;
+ int8_t radix, value;
+ } data[]={
+ /* base 16 */
+ { 0x0031, 16, 1 },
+ { 0x0038, 16, 8 },
+ { 0x0043, 16, 12 },
+ { 0x0066, 16, 15 },
+ { 0x00e4, 16, -1 },
+ { 0x0662, 16, 2 },
+ { 0x06f5, 16, 5 },
+ { 0xff13, 16, 3 },
+ { 0xff41, 16, 10 },
+
+ /* base 8 */
+ { 0x0031, 8, 1 },
+ { 0x0038, 8, -1 },
+ { 0x0043, 8, -1 },
+ { 0x0066, 8, -1 },
+ { 0x00e4, 8, -1 },
+ { 0x0662, 8, 2 },
+ { 0x06f5, 8, 5 },
+ { 0xff13, 8, 3 },
+ { 0xff41, 8, -1 },
+
+ /* base 36 */
+ { 0x5a, 36, 35 },
+ { 0x7a, 36, 35 },
+ { 0xff3a, 36, 35 },
+ { 0xff5a, 36, 35 },
+
+ /* wrong radix values */
+ { 0x0031, 1, -1 },
+ { 0xff3a, 37, -1 }
+ };
+
+ for(i=0; i<LENGTHOF(data); ++i) {
+ if(u_digit(data[i].c, data[i].radix)!=data[i].value) {
+ log_err("u_digit(U+%04x, %d)=%d expected %d\n",
+ data[i].c,
+ data[i].radix,
+ u_digit(data[i].c, data[i].radix),
+ data[i].value);
+ }
+ }
+ }
+}
+
+/* test C/POSIX-style functions --------------------------------------------- */
+
+/* bit flags */
+#define ISAL 1
+#define ISLO 2
+#define ISUP 4
+
+#define ISDI 8
+#define ISXD 0x10
+
+#define ISAN 0x20
+
+#define ISPU 0x40
+#define ISGR 0x80
+#define ISPR 0x100
+
+#define ISSP 0x200
+#define ISBL 0x400
+#define ISCN 0x800
+
+/* C/POSIX-style functions, in the same order as the bit flags */
+typedef UBool U_EXPORT2 IsPOSIXClass(UChar32 c);
+
+static const struct {
+ IsPOSIXClass *fn;
+ const char *name;
+} posixClasses[]={
+ { u_isalpha, "isalpha" },
+ { u_islower, "islower" },
+ { u_isupper, "isupper" },
+ { u_isdigit, "isdigit" },
+ { u_isxdigit, "isxdigit" },
+ { u_isalnum, "isalnum" },
+ { u_ispunct, "ispunct" },
+ { u_isgraph, "isgraph" },
+ { u_isprint, "isprint" },
+ { u_isspace, "isspace" },
+ { u_isblank, "isblank" },
+ { u_iscntrl, "iscntrl" }
+};
+
+static const struct {
+ UChar32 c;
+ uint32_t posixResults;
+} posixData[]={
+ { 0x0008, ISCN }, /* backspace */
+ { 0x0009, ISSP|ISBL|ISCN }, /* TAB */
+ { 0x000a, ISSP| ISCN }, /* LF */
+ { 0x000c, ISSP| ISCN }, /* FF */
+ { 0x000d, ISSP| ISCN }, /* CR */
+ { 0x0020, ISPR|ISSP|ISBL }, /* space */
+ { 0x0021, ISPU|ISGR|ISPR }, /* ! */
+ { 0x0033, ISDI|ISXD|ISAN| ISGR|ISPR }, /* 3 */
+ { 0x0040, ISPU|ISGR|ISPR }, /* @ */
+ { 0x0041, ISAL| ISUP| ISXD|ISAN| ISGR|ISPR }, /* A */
+ { 0x007a, ISAL|ISLO| ISAN| ISGR|ISPR }, /* z */
+ { 0x007b, ISPU|ISGR|ISPR }, /* { */
+ { 0x0085, ISSP| ISCN }, /* NEL */
+ { 0x00a0, ISPR|ISSP|ISBL }, /* NBSP */
+ { 0x00a4, ISGR|ISPR }, /* currency sign */
+ { 0x00e4, ISAL|ISLO| ISAN| ISGR|ISPR }, /* a-umlaut */
+ { 0x0300, ISGR|ISPR }, /* combining grave */
+ { 0x0600, ISCN }, /* arabic number sign */
+ { 0x0627, ISAL| ISAN| ISGR|ISPR }, /* alef */
+ { 0x0663, ISDI|ISXD|ISAN| ISGR|ISPR }, /* arabic 3 */
+ { 0x2002, ISPR|ISSP|ISBL }, /* en space */
+ { 0x2007, ISPR|ISSP|ISBL }, /* figure space */
+ { 0x2009, ISPR|ISSP|ISBL }, /* thin space */
+ { 0x200b, ISCN }, /* ZWSP */
+ /*{ 0x200b, ISPR|ISSP },*/ /* ZWSP */ /* ZWSP became a control char in 4.0.1*/
+ { 0x200e, ISCN }, /* LRM */
+ { 0x2028, ISPR|ISSP| ISCN }, /* LS */
+ { 0x2029, ISPR|ISSP| ISCN }, /* PS */
+ { 0x20ac, ISGR|ISPR }, /* Euro */
+ { 0xff15, ISDI|ISXD|ISAN| ISGR|ISPR }, /* fullwidth 5 */
+ { 0xff25, ISAL| ISUP| ISXD|ISAN| ISGR|ISPR }, /* fullwidth E */
+ { 0xff35, ISAL| ISUP| ISAN| ISGR|ISPR }, /* fullwidth U */
+ { 0xff45, ISAL|ISLO| ISXD|ISAN| ISGR|ISPR }, /* fullwidth e */
+ { 0xff55, ISAL|ISLO| ISAN| ISGR|ISPR } /* fullwidth u */
+};
+
+static void
+TestPOSIX() {
+ uint32_t mask;
+ int32_t cl, i;
+ UBool expect;
+
+ mask=1;
+ for(cl=0; cl<12; ++cl) {
+ for(i=0; i<LENGTHOF(posixData); ++i) {
+ expect=(UBool)((posixData[i].posixResults&mask)!=0);
+ if(posixClasses[cl].fn(posixData[i].c)!=expect) {
+ log_err("u_%s(U+%04x)=%s is wrong\n",
+ posixClasses[cl].name, posixData[i].c, expect ? "FALSE" : "TRUE");
+ }
+ }
+ mask<<=1;
+ }
+}
+
+/* Tests for isControl(u_iscntrl()) and isPrintable(u_isprint()) */
+static void TestControlPrint()
+{
+ const UChar sampleControl[] = {0x1b, 0x97, 0x82, 0x2028, 0x2029, 0x200c, 0x202b};
+ const UChar sampleNonControl[] = {0x61, 0x0031, 0x00e2};
+ const UChar samplePrintable[] = {0x0042, 0x005f, 0x2014};
+ const UChar sampleNonPrintable[] = {0x200c, 0x009f, 0x001b};
+ UChar32 c;
+ int i;
+
+ log_verbose("Testing for iscontrol\n");
+ for (i = 0; i < LENGTHOF(sampleControl); i++) {
+ if (!u_iscntrl(sampleControl[i]))
+ {
+ log_err("Control char test error : U+%04x should be control but is not\n", (int32_t)sampleControl[i]);
+ }
+ }
+
+ log_verbose("Testing for !iscontrol\n");
+ for (i = 0; i < LENGTHOF(sampleNonControl); i++) {
+ if (u_iscntrl(sampleNonControl[i]))
+ {
+ log_err("Control char test error : U+%04x should not be control but is\n", (int32_t)sampleNonControl[i]);
+ }
+ }
+
+ log_verbose("testing for isprintable\n");
+ for (i = 0; i < 3; i++) {
+ if (!u_isprint(samplePrintable[i]))
+ {
+ log_err("Printable char test error : U+%04x should be printable but is not\n", (int32_t)samplePrintable[i]);
+ }
+ if (u_isprint(sampleNonPrintable[i]))
+ {
+ log_err("Printable char test error : U+%04x should not be printable but is\n", (int32_t)sampleNonPrintable[i]);
+ }
+ }
+
+ /* test all ISO 8 controls */
+ for(c=0; c<=0x9f; ++c) {
+ if(c==0x20) {
+ /* skip ASCII graphic characters and continue with DEL */
+ c=0x7f;
+ }
+ if(!u_iscntrl(c)) {
+ log_err("error: u_iscntrl(ISO 8 control U+%04x)=FALSE\n", c);
+ }
+ if(!u_isISOControl(c)) {
+ log_err("error: u_isISOControl(ISO 8 control U+%04x)=FALSE\n", c);
+ }
+ if(u_isprint(c)) {
+ log_err("error: u_isprint(ISO 8 control U+%04x)=TRUE\n", c);
+ }
+ }
+
+ /* test all Latin-1 graphic characters */
+ for(c=0x20; c<=0xff; ++c) {
+ if(c==0x7f) {
+ c=0xa0;
+ } else if(c==0xad) {
+ /* Unicode 4 changes 00AD Soft Hyphen to Cf (and it is in fact not printable) */
+ ++c;
+ }
+ if(!u_isprint(c)) {
+ log_err("error: u_isprint(Latin-1 graphic character U+%04x)=FALSE\n", c);
+ }
+ }
+}
+
+/* u_isJavaIDStart, u_isJavaIDPart, u_isIDStart(), u_isIDPart(), u_isIDIgnorable()*/
+static void TestIdentifier()
+{
+ const UChar sampleJavaIDStart[] = {0x0071, 0x00e4, 0x005f};
+ const UChar sampleNonJavaIDStart[] = {0x0020, 0x2030, 0x0082};
+ const UChar sampleJavaIDPart[] = {0x005f, 0x0032, 0x0045};
+ const UChar sampleNonJavaIDPart[] = {0x2030, 0x2020, 0x0020};
+ const UChar sampleUnicodeIDStart[] = {0x0250, 0x00e2, 0x0061};
+ const UChar sampleNonUnicodeIDStart[] = {0x2000, 0x000a, 0x2019};
+ const UChar sampleUnicodeIDPart[] = {0x005f, 0x0032, 0x0045};
+ const UChar sampleNonUnicodeIDPart[] = {0x2030, 0x00a3, 0x0020};
+ const UChar sampleIDIgnore[] = {0x0006, 0x0010, 0x206b};
+ const UChar sampleNonIDIgnore[] = {0x0075, 0x00a3, 0x0061};
+
+ int i;
+
+ log_verbose("Testing sampleJavaID start \n");
+ for (i = 0; i < 3; i++) {
+ if (!(u_isJavaIDStart(sampleJavaIDStart[i])) ||
+ (u_isJavaIDStart(sampleNonJavaIDStart[i])))
+ log_err("Java ID Start char test error : %lx or %lx\n",
+ sampleJavaIDStart[i], sampleNonJavaIDStart[i]);
+ }
+
+ log_verbose("Testing sampleJavaID part \n");
+ for (i = 0; i < 3; i++) {
+ if (!(u_isJavaIDPart(sampleJavaIDPart[i])) ||
+ (u_isJavaIDPart(sampleNonJavaIDPart[i])))
+ log_err("Java ID Part char test error : %lx or %lx\n",
+ sampleJavaIDPart[i], sampleNonJavaIDPart[i]);
+ }
+
+ log_verbose("Testing sampleUnicodeID start \n");
+ for (i = 0; i < 3; i++) {
+ /* T_test_logln_ustr((int32_t)i); */
+ if (!(u_isIDStart(sampleUnicodeIDStart[i])) ||
+ (u_isIDStart(sampleNonUnicodeIDStart[i])))
+ {
+ log_err("Unicode ID Start char test error : %lx or %lx\n", sampleUnicodeIDStart[i],
+ sampleNonUnicodeIDStart[i]);
+ }
+ }
+
+ log_verbose("Testing sample unicode ID part \n");
+ for (i = 2; i < 3; i++) { /* nos *** starts with 2 instead of 0, until clarified */
+ /* T_test_logln_ustr((int32_t)i); */
+ if (!(u_isIDPart(sampleUnicodeIDPart[i])) ||
+ (u_isIDPart(sampleNonUnicodeIDPart[i])))
+ {
+ log_err("Unicode ID Part char test error : %lx or %lx", sampleUnicodeIDPart[i], sampleNonUnicodeIDPart[i]);
+ }
+ }
+
+ log_verbose("Testing sampleId ignore\n");
+ for (i = 0; i < 3; i++) {
+ /*T_test_logln_ustr((int32_t)i); */
+ if (!(u_isIDIgnorable(sampleIDIgnore[i])) ||
+ (u_isIDIgnorable(sampleNonIDIgnore[i])))
+ {
+ log_err("ID ignorable char test error : U+%04x or U+%04x\n", sampleIDIgnore[i], sampleNonIDIgnore[i]);
+ }
+ }
+}
+
+/* for each line of UnicodeData.txt, check some of the properties */
+/*
+ * ### TODO
+ * This test fails incorrectly if the First or Last code point of a repetitive area
+ * is overridden, which is allowed and is encouraged for the PUAs.
+ * Currently, this means that both area First/Last and override lines are
+ * tested against the properties from the API,
+ * and the area boundary will not match and cause an error.
+ *
+ * This function should detect area boundaries and skip them for the test of individual
+ * code points' properties.
+ * Then it should check that the areas contain all the same properties except where overridden.
+ * For this, it would have had to set a flag for which code points were listed explicitly.
+ */
+static void U_CALLCONV
+unicodeDataLineFn(void *context,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode)
+{
+ char buffer[100];
+ char *end;
+ uint32_t value;
+ UChar32 c;
+ int32_t i;
+ int8_t type;
+
+ /* get the character code, field 0 */
+ c=strtoul(fields[0][0], &end, 16);
+ if(end<=fields[0][0] || end!=fields[0][1]) {
+ log_err("error: syntax error in field 0 at %s\n", fields[0][0]);
+ return;
+ }
+ if((uint32_t)c>=UCHAR_MAX_VALUE + 1) {
+ log_err("error in UnicodeData.txt: code point %lu out of range\n", c);
+ return;
+ }
+
+ /* get general category, field 2 */
+ *fields[2][1]=0;
+ type = (int8_t)tagValues[MakeProp(fields[2][0])];
+ if(u_charType(c)!=type) {
+ log_err("error: u_charType(U+%04lx)==%u instead of %u\n", c, u_charType(c), type);
+ }
+ if((uint32_t)u_getIntPropertyValue(c, UCHAR_GENERAL_CATEGORY_MASK)!=U_MASK(type)) {
+ log_err("error: (uint32_t)u_getIntPropertyValue(U+%04lx, UCHAR_GENERAL_CATEGORY_MASK)!=U_MASK(u_charType())\n", c);
+ }
+
+ /* get canonical combining class, field 3 */
+ value=strtoul(fields[3][0], &end, 10);
+ if(end<=fields[3][0] || end!=fields[3][1]) {
+ log_err("error: syntax error in field 3 at code 0x%lx\n", c);
+ return;
+ }
+ if(value>255) {
+ log_err("error in UnicodeData.txt: combining class %lu out of range\n", value);
+ return;
+ }
+#if !UCONFIG_NO_NORMALIZATION
+ if(value!=u_getCombiningClass(c) || value!=(uint32_t)u_getIntPropertyValue(c, UCHAR_CANONICAL_COMBINING_CLASS)) {
+ log_err("error: u_getCombiningClass(U+%04lx)==%hu instead of %lu\n", c, u_getCombiningClass(c), value);
+ }
+#endif
+
+ /* get BiDi category, field 4 */
+ *fields[4][1]=0;
+ i=MakeDir(fields[4][0]);
+ if(i!=u_charDirection(c) || i!=u_getIntPropertyValue(c, UCHAR_BIDI_CLASS)) {
+ log_err("error: u_charDirection(U+%04lx)==%u instead of %u (%s)\n", c, u_charDirection(c), MakeDir(fields[4][0]), fields[4][0]);
+ }
+
+ /* get ISO Comment, field 11 */
+ *fields[11][1]=0;
+ i=u_getISOComment(c, buffer, sizeof(buffer), pErrorCode);
+ if(U_FAILURE(*pErrorCode) || 0!=strcmp(fields[11][0], buffer)) {
+ log_err("error: u_getISOComment(U+%04lx) wrong (%s): \"%s\" should be \"%s\"\n",
+ c, u_errorName(*pErrorCode),
+ U_FAILURE(*pErrorCode) ? buffer : "[error]",
+ fields[11][0]);
+ }
+
+ /* get uppercase mapping, field 12 */
+ if(fields[12][0]!=fields[12][1]) {
+ value=strtoul(fields[12][0], &end, 16);
+ if(end!=fields[12][1]) {
+ log_err("error: syntax error in field 12 at code 0x%lx\n", c);
+ return;
+ }
+ if((UChar32)value!=u_toupper(c)) {
+ log_err("error: u_toupper(U+%04lx)==U+%04lx instead of U+%04lx\n", c, u_toupper(c), value);
+ }
+ } else {
+ /* no case mapping: the API must map the code point to itself */
+ if(c!=u_toupper(c)) {
+ log_err("error: U+%04lx does not have an uppercase mapping but u_toupper()==U+%04lx\n", c, u_toupper(c));
+ }
+ }
+
+ /* get lowercase mapping, field 13 */
+ if(fields[13][0]!=fields[13][1]) {
+ value=strtoul(fields[13][0], &end, 16);
+ if(end!=fields[13][1]) {
+ log_err("error: syntax error in field 13 at code 0x%lx\n", c);
+ return;
+ }
+ if((UChar32)value!=u_tolower(c)) {
+ log_err("error: u_tolower(U+%04lx)==U+%04lx instead of U+%04lx\n", c, u_tolower(c), value);
+ }
+ } else {
+ /* no case mapping: the API must map the code point to itself */
+ if(c!=u_tolower(c)) {
+ log_err("error: U+%04lx does not have a lowercase mapping but u_tolower()==U+%04lx\n", c, u_tolower(c));
+ }
+ }
+
+ /* get titlecase mapping, field 14 */
+ if(fields[14][0]!=fields[14][1]) {
+ value=strtoul(fields[14][0], &end, 16);
+ if(end!=fields[14][1]) {
+ log_err("error: syntax error in field 14 at code 0x%lx\n", c);
+ return;
+ }
+ if((UChar32)value!=u_totitle(c)) {
+ log_err("error: u_totitle(U+%04lx)==U+%04lx instead of U+%04lx\n", c, u_totitle(c), value);
+ }
+ } else {
+ /* no case mapping: the API must map the code point to itself */
+ if(c!=u_totitle(c)) {
+ log_err("error: U+%04lx does not have a titlecase mapping but u_totitle()==U+%04lx\n", c, u_totitle(c));
+ }
+ }
+}
+
+static UBool U_CALLCONV
+enumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type) {
+ static const UChar32 test[][2]={
+ {0x41, U_UPPERCASE_LETTER},
+ {0x308, U_NON_SPACING_MARK},
+ {0xfffe, U_GENERAL_OTHER_TYPES},
+ {0xe0041, U_FORMAT_CHAR},
+ {0xeffff, U_UNASSIGNED}
+ };
+
+ int32_t i, count;
+
+ if(0!=strcmp((const char *)context, "a1")) {
+ log_err("error: u_enumCharTypes() passes on an incorrect context pointer\n");
+ return FALSE;
+ }
+
+ count=LENGTHOF(test);
+ for(i=0; i<count; ++i) {
+ if(start<=test[i][0] && test[i][0]<limit) {
+ if(type!=(UCharCategory)test[i][1]) {
+ log_err("error: u_enumCharTypes() has range [U+%04lx, U+%04lx[ with %ld instead of U+%04lx with %ld\n",
+ start, limit, (long)type, test[i][0], test[i][1]);
+ }
+ /* stop at the range that includes the last test code point (increases code coverage for enumeration) */
+ return i==(count-1) ? FALSE : TRUE;
+ }
+ }
+
+ if(start>test[count-1][0]) {
+ log_err("error: u_enumCharTypes() has range [U+%04lx, U+%04lx[ with %ld after it should have stopped\n",
+ start, limit, (long)type);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static UBool U_CALLCONV
+enumDefaultsRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type) {
+ /* default Bidi classes for unassigned code points */
+ static const int32_t defaultBidi[][2]={ /* { limit, class } */
+ { 0x0590, U_LEFT_TO_RIGHT },
+ { 0x0600, U_RIGHT_TO_LEFT },
+ { 0x07C0, U_RIGHT_TO_LEFT_ARABIC },
+ { 0x0900, U_RIGHT_TO_LEFT },
+ { 0xFB1D, U_LEFT_TO_RIGHT },
+ { 0xFB50, U_RIGHT_TO_LEFT },
+ { 0xFE00, U_RIGHT_TO_LEFT_ARABIC },
+ { 0xFE70, U_LEFT_TO_RIGHT },
+ { 0xFF00, U_RIGHT_TO_LEFT_ARABIC },
+ { 0x10800, U_LEFT_TO_RIGHT },
+ { 0x11000, U_RIGHT_TO_LEFT },
+ { 0x110000, U_LEFT_TO_RIGHT }
+ };
+
+ UChar32 c;
+ int32_t i;
+ UCharDirection shouldBeDir;
+
+ /*
+ * LineBreak.txt specifies:
+ * # - Assigned characters that are not listed explicitly are given the value
+ * # "AL".
+ * # - Unassigned characters are given the value "XX".
+ *
+ * PUA characters are listed explicitly with "XX".
+ * Verify that no assigned character has "XX".
+ */
+ if(type!=U_UNASSIGNED && type!=U_PRIVATE_USE_CHAR) {
+ c=start;
+ while(c<limit) {
+ if(0==u_getIntPropertyValue(c, UCHAR_LINE_BREAK)) {
+ log_err("error UCHAR_LINE_BREAK(assigned U+%04lx)=XX\n", c);
+ }
+ ++c;
+ }
+ }
+
+ /*
+ * Verify default Bidi classes.
+ * For recent Unicode versions, see UCD.html.
+ *
+ * For older Unicode versions:
+ * See table 3-7 "Bidirectional Character Types" in UAX #9.
+ * http://www.unicode.org/reports/tr9/
+ *
+ * See also DerivedBidiClass.txt for Cn code points!
+ *
+ * Unicode 4.0.1/Public Review Issue #28 (http://www.unicode.org/review/resolved-pri.html)
+ * changed some default values.
+ * In particular, non-characters and unassigned Default Ignorable Code Points
+ * change from L to BN.
+ *
+ * UCD.html version 4.0.1 does not yet reflect these changes.
+ */
+ if(type==U_UNASSIGNED || type==U_PRIVATE_USE_CHAR) {
+ /* enumerate the intersections of defaultBidi ranges with [start..limit[ */
+ c=start;
+ for(i=0; i<LENGTHOF(defaultBidi) && c<limit; ++i) {
+ if((int32_t)c<defaultBidi[i][0]) {
+ while(c<limit && (int32_t)c<defaultBidi[i][0]) {
+ if(U_IS_UNICODE_NONCHAR(c) || u_hasBinaryProperty(c, UCHAR_DEFAULT_IGNORABLE_CODE_POINT)) {
+ shouldBeDir=U_BOUNDARY_NEUTRAL;
+ } else {
+ shouldBeDir=(UCharDirection)defaultBidi[i][1];
+ }
+
+ if( u_charDirection(c)!=shouldBeDir ||
+ u_getIntPropertyValue(c, UCHAR_BIDI_CLASS)!=shouldBeDir
+ ) {
+ log_err("error: u_charDirection(unassigned/PUA U+%04lx)=%s should be %s\n",
+ c, dirStrings[u_charDirection(c)], dirStrings[shouldBeDir]);
+ }
+ ++c;
+ }
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/* tests for several properties */
+static void TestUnicodeData()
+{
+ UVersionInfo expectVersionArray;
+ UVersionInfo versionArray;
+ char *fields[15][2];
+ UErrorCode errorCode;
+ UChar32 c;
+ int8_t type;
+
+ u_versionFromString(expectVersionArray, U_UNICODE_VERSION);
+ u_getUnicodeVersion(versionArray);
+ if(memcmp(versionArray, expectVersionArray, U_MAX_VERSION_LENGTH) != 0)
+ {
+ log_err("Testing u_getUnicodeVersion() - expected " U_UNICODE_VERSION " got %d.%d.%d.%d\n",
+ versionArray[0], versionArray[1], versionArray[2], versionArray[3]);
+ }
+
+#if defined(ICU_UNICODE_VERSION)
+ /* test only happens where we have configure.in with UNICODE_VERSION - sanity check. */
+ if(strcmp(U_UNICODE_VERSION, ICU_UNICODE_VERSION))
+ {
+ log_err("Testing configure.in's ICU_UNICODE_VERSION - expected " U_UNICODE_VERSION " got " ICU_UNICODE_VERSION "\n");
+ }
+#endif
+
+ if (ublock_getCode((UChar)0x0041) != UBLOCK_BASIC_LATIN || u_getIntPropertyValue(0x41, UCHAR_BLOCK)!=(int32_t)UBLOCK_BASIC_LATIN) {
+ log_err("ublock_getCode(U+0041) property failed! Expected : %i Got: %i \n", UBLOCK_BASIC_LATIN,ublock_getCode((UChar)0x0041));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ parseUCDFile("UnicodeData.txt", fields, 15, unicodeDataLineFn, NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ return; /* if we couldn't parse UnicodeData.txt, we should return */
+ }
+
+ /* sanity check on repeated properties */
+ for(c=0xfffe; c<=0x10ffff;) {
+ type=u_charType(c);
+ if((uint32_t)u_getIntPropertyValue(c, UCHAR_GENERAL_CATEGORY_MASK)!=U_MASK(type)) {
+ log_err("error: (uint32_t)u_getIntPropertyValue(U+%04lx, UCHAR_GENERAL_CATEGORY_MASK)!=U_MASK(u_charType())\n", c);
+ }
+ if(type!=U_UNASSIGNED) {
+ log_err("error: u_charType(U+%04lx)!=U_UNASSIGNED (returns %d)\n", c, u_charType(c));
+ }
+ if((c&0xffff)==0xfffe) {
+ ++c;
+ } else {
+ c+=0xffff;
+ }
+ }
+
+ /* test that PUA is not "unassigned" */
+ for(c=0xe000; c<=0x10fffd;) {
+ type=u_charType(c);
+ if((uint32_t)u_getIntPropertyValue(c, UCHAR_GENERAL_CATEGORY_MASK)!=U_MASK(type)) {
+ log_err("error: (uint32_t)u_getIntPropertyValue(U+%04lx, UCHAR_GENERAL_CATEGORY_MASK)!=U_MASK(u_charType())\n", c);
+ }
+ if(type==U_UNASSIGNED) {
+ log_err("error: u_charType(U+%04lx)==U_UNASSIGNED\n", c);
+ } else if(type!=U_PRIVATE_USE_CHAR) {
+ log_verbose("PUA override: u_charType(U+%04lx)=%d\n", c, type);
+ }
+ if(c==0xf8ff) {
+ c=0xf0000;
+ } else if(c==0xffffd) {
+ c=0x100000;
+ } else {
+ ++c;
+ }
+ }
+
+ /* test u_enumCharTypes() */
+ u_enumCharTypes(enumTypeRange, "a1");
+
+ /* check default properties */
+ u_enumCharTypes(enumDefaultsRange, NULL);
+}
+
+static void TestCodeUnit(){
+ const UChar codeunit[]={0x0000,0xe065,0x20ac,0xd7ff,0xd800,0xd841,0xd905,0xdbff,0xdc00,0xdc02,0xddee,0xdfff,0};
+
+ int32_t i;
+
+ for(i=0; i<(int32_t)(sizeof(codeunit)/sizeof(codeunit[0])); i++){
+ UChar c=codeunit[i];
+ if(i<4){
+ if(!(UTF_IS_SINGLE(c)) || (UTF_IS_LEAD(c)) || (UTF_IS_TRAIL(c)) ||(UTF_IS_SURROGATE(c))){
+ log_err("ERROR: U+%04x is a single", c);
+ }
+
+ }
+ if(i >= 4 && i< 8){
+ if(!(UTF_IS_LEAD(c)) || UTF_IS_SINGLE(c) || UTF_IS_TRAIL(c) || !(UTF_IS_SURROGATE(c))){
+ log_err("ERROR: U+%04x is a first surrogate", c);
+ }
+ }
+ if(i >= 8 && i< 12){
+ if(!(UTF_IS_TRAIL(c)) || UTF_IS_SINGLE(c) || UTF_IS_LEAD(c) || !(UTF_IS_SURROGATE(c))){
+ log_err("ERROR: U+%04x is a second surrogate", c);
+ }
+ }
+ }
+
+}
+
+static void TestCodePoint(){
+ const UChar32 codePoint[]={
+ /*surrogate, notvalid(codepoint), not a UnicodeChar, not Error */
+ 0xd800,
+ 0xdbff,
+ 0xdc00,
+ 0xdfff,
+ 0xdc04,
+ 0xd821,
+ /*not a surrogate, valid, isUnicodeChar , not Error*/
+ 0x20ac,
+ 0xd7ff,
+ 0xe000,
+ 0xe123,
+ 0x0061,
+ 0xe065,
+ 0x20402,
+ 0x24506,
+ 0x23456,
+ 0x20402,
+ 0x10402,
+ 0x23456,
+ /*not a surrogate, not valid, isUnicodeChar, isError */
+ 0x0015,
+ 0x009f,
+ /*not a surrogate, not valid, not isUnicodeChar, isError */
+ 0xffff,
+ 0xfffe,
+ };
+ int32_t i;
+ for(i=0; i<(int32_t)(sizeof(codePoint)/sizeof(codePoint[0])); i++){
+ UChar32 c=codePoint[i];
+ if(i<6){
+ if(!UTF_IS_SURROGATE(c) || !U_IS_SURROGATE(c) || !U16_IS_SURROGATE(c)){
+ log_err("ERROR: isSurrogate() failed for U+%04x\n", c);
+ }
+ if(UTF_IS_VALID(c)){
+ log_err("ERROR: isValid() failed for U+%04x\n", c);
+ }
+ if(UTF_IS_UNICODE_CHAR(c) || U_IS_UNICODE_CHAR(c)){
+ log_err("ERROR: isUnicodeChar() failed for U+%04x\n", c);
+ }
+ if(UTF_IS_ERROR(c)){
+ log_err("ERROR: isError() failed for U+%04x\n", c);
+ }
+ }else if(i >=6 && i<18){
+ if(UTF_IS_SURROGATE(c) || U_IS_SURROGATE(c) || U16_IS_SURROGATE(c)){
+ log_err("ERROR: isSurrogate() failed for U+%04x\n", c);
+ }
+ if(!UTF_IS_VALID(c)){
+ log_err("ERROR: isValid() failed for U+%04x\n", c);
+ }
+ if(!UTF_IS_UNICODE_CHAR(c) || !U_IS_UNICODE_CHAR(c)){
+ log_err("ERROR: isUnicodeChar() failed for U+%04x\n", c);
+ }
+ if(UTF_IS_ERROR(c)){
+ log_err("ERROR: isError() failed for U+%04x\n", c);
+ }
+ }else if(i >=18 && i<20){
+ if(UTF_IS_SURROGATE(c) || U_IS_SURROGATE(c) || U16_IS_SURROGATE(c)){
+ log_err("ERROR: isSurrogate() failed for U+%04x\n", c);
+ }
+ if(UTF_IS_VALID(c)){
+ log_err("ERROR: isValid() failed for U+%04x\n", c);
+ }
+ if(!UTF_IS_UNICODE_CHAR(c) || !U_IS_UNICODE_CHAR(c)){
+ log_err("ERROR: isUnicodeChar() failed for U+%04x\n", c);
+ }
+ if(!UTF_IS_ERROR(c)){
+ log_err("ERROR: isError() failed for U+%04x\n", c);
+ }
+ }
+ else if(i >=18 && i<(int32_t)(sizeof(codePoint)/sizeof(codePoint[0]))){
+ if(UTF_IS_SURROGATE(c) || U_IS_SURROGATE(c) || U16_IS_SURROGATE(c)){
+ log_err("ERROR: isSurrogate() failed for U+%04x\n", c);
+ }
+ if(UTF_IS_VALID(c)){
+ log_err("ERROR: isValid() failed for U+%04x\n", c);
+ }
+ if(UTF_IS_UNICODE_CHAR(c) || U_IS_UNICODE_CHAR(c)){
+ log_err("ERROR: isUnicodeChar() failed for U+%04x\n", c);
+ }
+ if(!UTF_IS_ERROR(c)){
+ log_err("ERROR: isError() failed for U+%04x\n", c);
+ }
+ }
+ }
+
+ if(
+ !U_IS_BMP(0) || !U_IS_BMP(0x61) || !U_IS_BMP(0x20ac) ||
+ !U_IS_BMP(0xd9da) || !U_IS_BMP(0xdfed) || !U_IS_BMP(0xffff) ||
+ U_IS_BMP(U_SENTINEL) || U_IS_BMP(0x10000) || U_IS_BMP(0x50005) ||
+ U_IS_BMP(0x10ffff) || U_IS_BMP(0x110000) || U_IS_BMP(0x7fffffff)
+ ) {
+ log_err("error with U_IS_BMP()\n");
+ }
+
+ if(
+ U_IS_SUPPLEMENTARY(0) || U_IS_SUPPLEMENTARY(0x61) || U_IS_SUPPLEMENTARY(0x20ac) ||
+ U_IS_SUPPLEMENTARY(0xd9da) || U_IS_SUPPLEMENTARY(0xdfed) || U_IS_SUPPLEMENTARY(0xffff) ||
+ U_IS_SUPPLEMENTARY(U_SENTINEL) || !U_IS_SUPPLEMENTARY(0x10000) || !U_IS_SUPPLEMENTARY(0x50005) ||
+ !U_IS_SUPPLEMENTARY(0x10ffff) || U_IS_SUPPLEMENTARY(0x110000) || U_IS_SUPPLEMENTARY(0x7fffffff)
+ ) {
+ log_err("error with U_IS_SUPPLEMENTARY()\n");
+ }
+}
+
+static void TestCharLength()
+{
+ const int32_t codepoint[]={
+ 1, 0x0061,
+ 1, 0xe065,
+ 1, 0x20ac,
+ 2, 0x20402,
+ 2, 0x23456,
+ 2, 0x24506,
+ 2, 0x20402,
+ 2, 0x10402,
+ 1, 0xd7ff,
+ 1, 0xe000
+ };
+
+ int32_t i;
+ UBool multiple;
+ for(i=0; i<(int32_t)(sizeof(codepoint)/sizeof(codepoint[0])); i=(int16_t)(i+2)){
+ UChar32 c=codepoint[i+1];
+ if(UTF_CHAR_LENGTH(c) != codepoint[i] || U16_LENGTH(c) != codepoint[i]){
+ log_err("The no: of code units for U+%04x:- Expected: %d Got: %d\n", c, codepoint[i], UTF_CHAR_LENGTH(c));
+ }
+ multiple=(UBool)(codepoint[i] == 1 ? FALSE : TRUE);
+ if(UTF_NEED_MULTIPLE_UCHAR(c) != multiple){
+ log_err("ERROR: Unicode::needMultipleUChar() failed for U+%04x\n", c);
+ }
+ }
+}
+
+/*internal functions ----*/
+static int32_t MakeProp(char* str)
+{
+ int32_t result = 0;
+ char* matchPosition =0;
+
+ matchPosition = strstr(tagStrings, str);
+ if (matchPosition == 0)
+ {
+ log_err("unrecognized type letter ");
+ log_err(str);
+ }
+ else
+ result = (int32_t)((matchPosition - tagStrings) / 2);
+ return result;
+}
+
+static int32_t MakeDir(char* str)
+{
+ int32_t pos = 0;
+ for (pos = 0; pos < 19; pos++) {
+ if (strcmp(str, dirStrings[pos]) == 0) {
+ return pos;
+ }
+ }
+ return -1;
+}
+
+/* test u_charName() -------------------------------------------------------- */
+
+static const struct {
+ uint32_t code;
+ const char *name, *oldName, *extName;
+} names[]={
+ {0x0061, "LATIN SMALL LETTER A", "", "LATIN SMALL LETTER A"},
+ {0x0284, "LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK", "LATIN SMALL LETTER DOTLESS J BAR HOOK", "LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK" },
+ {0x3401, "CJK UNIFIED IDEOGRAPH-3401", "", "CJK UNIFIED IDEOGRAPH-3401" },
+ {0x7fed, "CJK UNIFIED IDEOGRAPH-7FED", "", "CJK UNIFIED IDEOGRAPH-7FED" },
+ {0xac00, "HANGUL SYLLABLE GA", "", "HANGUL SYLLABLE GA" },
+ {0xd7a3, "HANGUL SYLLABLE HIH", "", "HANGUL SYLLABLE HIH" },
+ {0xd800, "", "", "<lead surrogate-D800>" },
+ {0xdc00, "", "", "<trail surrogate-DC00>" },
+ {0xff08, "FULLWIDTH LEFT PARENTHESIS", "FULLWIDTH OPENING PARENTHESIS", "FULLWIDTH LEFT PARENTHESIS" },
+ {0xffe5, "FULLWIDTH YEN SIGN", "", "FULLWIDTH YEN SIGN" },
+ {0xffff, "", "", "<noncharacter-FFFF>" },
+ {0x23456, "CJK UNIFIED IDEOGRAPH-23456", "", "CJK UNIFIED IDEOGRAPH-23456" }
+};
+
+static UBool
+enumCharNamesFn(void *context,
+ UChar32 code, UCharNameChoice nameChoice,
+ const char *name, int32_t length) {
+ int32_t *pCount=(int32_t *)context;
+ int i;
+
+ if(length<=0 || length!=(int32_t)strlen(name)) {
+ /* should not be called with an empty string or invalid length */
+ log_err("u_enumCharName(0x%lx)=%s but length=%ld\n", name, length);
+ return TRUE;
+ }
+
+ ++*pCount;
+ for(i=0; i<sizeof(names)/sizeof(names[0]); ++i) {
+ if(code==(UChar32)names[i].code) {
+ switch (nameChoice) {
+ case U_EXTENDED_CHAR_NAME:
+ if(0!=strcmp(name, names[i].extName)) {
+ log_err("u_enumCharName(0x%lx - Extended)=%s instead of %s\n", code, name, names[i].extName);
+ }
+ break;
+ case U_UNICODE_CHAR_NAME:
+ if(0!=strcmp(name, names[i].name)) {
+ log_err("u_enumCharName(0x%lx)=%s instead of %s\n", code, name, names[i].name);
+ }
+ break;
+ case U_UNICODE_10_CHAR_NAME:
+ if(names[i].oldName[0]==0 || 0!=strcmp(name, names[i].oldName)) {
+ log_err("u_enumCharName(0x%lx - 1.0)=%s instead of %s\n", code, name, names[i].oldName);
+ }
+ break;
+ case U_CHAR_NAME_CHOICE_COUNT:
+ break;
+ }
+ break;
+ }
+ }
+ return TRUE;
+}
+
+struct enumExtCharNamesContext {
+ uint32_t length;
+ int32_t last;
+};
+
+static UBool
+enumExtCharNamesFn(void *context,
+ UChar32 code, UCharNameChoice nameChoice,
+ const char *name, int32_t length) {
+ struct enumExtCharNamesContext *ecncp = (struct enumExtCharNamesContext *) context;
+
+ if (ecncp->last != (int32_t) code - 1) {
+ if (ecncp->last < 0) {
+ log_err("u_enumCharName(0x%lx - Ext) after u_enumCharName(0x%lx - Ext) instead of u_enumCharName(0x%lx - Ext)\n", code, ecncp->last, ecncp->last + 1);
+ } else {
+ log_err("u_enumCharName(0x%lx - Ext) instead of u_enumCharName(0x0 - Ext)\n", code);
+ }
+ }
+ ecncp->last = (int32_t) code;
+
+ if (!*name) {
+ log_err("u_enumCharName(0x%lx - Ext) should not be an empty string\n", code);
+ }
+
+ return enumCharNamesFn(&ecncp->length, code, nameChoice, name, length);
+}
+
+/**
+ * This can be made more efficient by moving it into putil.c and having
+ * it directly access the ebcdic translation tables.
+ * TODO: If we get this method in putil.c, then delete it from here.
+ */
+static UChar
+u_charToUChar(char c) {
+ UChar uc;
+ u_charsToUChars(&c, &uc, 1);
+ return uc;
+}
+
+static void
+TestCharNames() {
+ static char name[80];
+ UErrorCode errorCode=U_ZERO_ERROR;
+ struct enumExtCharNamesContext extContext;
+ int32_t length;
+ UChar32 c;
+ int32_t i;
+
+ log_verbose("Testing uprv_getMaxCharNameLength()\n");
+ length=uprv_getMaxCharNameLength();
+ if(length==0) {
+ /* no names data available */
+ return;
+ }
+ if(length<83) { /* Unicode 3.2 max char name length */
+ log_err("uprv_getMaxCharNameLength()=%d is too short");
+ }
+ /* ### TODO same tests for max ISO comment length as for max name length */
+
+ log_verbose("Testing u_charName()\n");
+ for(i=0; i<(int32_t)(sizeof(names)/sizeof(names[0])); ++i) {
+ /* modern Unicode character name */
+ length=u_charName(names[i].code, U_UNICODE_CHAR_NAME, name, sizeof(name), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("u_charName(0x%lx) error %s\n", names[i].code, u_errorName(errorCode));
+ return;
+ }
+ if(length<0 || 0!=strcmp(name, names[i].name) || length!=(uint16_t)strlen(name)) {
+ log_err("u_charName(0x%lx) gets: %s (length %ld) instead of: %s\n", names[i].code, name, length, names[i].name);
+ }
+
+ /* find the modern name */
+ if (*names[i].name) {
+ c=u_charFromName(U_UNICODE_CHAR_NAME, names[i].name, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("u_charFromName(%s) error %s\n", names[i].name, u_errorName(errorCode));
+ return;
+ }
+ if(c!=(UChar32)names[i].code) {
+ log_err("u_charFromName(%s) gets 0x%lx instead of 0x%lx\n", names[i].name, c, names[i].code);
+ }
+ }
+
+ /* Unicode 1.0 character name */
+ length=u_charName(names[i].code, U_UNICODE_10_CHAR_NAME, name, sizeof(name), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("u_charName(0x%lx - 1.0) error %s\n", names[i].code, u_errorName(errorCode));
+ return;
+ }
+ if(length<0 || (length>0 && 0!=strcmp(name, names[i].oldName)) || length!=(uint16_t)strlen(name)) {
+ log_err("u_charName(0x%lx - 1.0) gets %s length %ld instead of nothing or %s\n", names[i].code, name, length, names[i].oldName);
+ }
+
+ /* find the Unicode 1.0 name if it is stored (length>0 means that we could read it) */
+ if(names[i].oldName[0]!=0 /* && length>0 */) {
+ c=u_charFromName(U_UNICODE_10_CHAR_NAME, names[i].oldName, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("u_charFromName(%s - 1.0) error %s\n", names[i].oldName, u_errorName(errorCode));
+ return;
+ }
+ if(c!=(UChar32)names[i].code) {
+ log_err("u_charFromName(%s - 1.0) gets 0x%lx instead of 0x%lx\n", names[i].oldName, c, names[i].code);
+ }
+ }
+ }
+
+ /* test u_enumCharNames() */
+ length=0;
+ errorCode=U_ZERO_ERROR;
+ u_enumCharNames(UCHAR_MIN_VALUE, UCHAR_MAX_VALUE + 1, enumCharNamesFn, &length, U_UNICODE_CHAR_NAME, &errorCode);
+ if(U_FAILURE(errorCode) || length<94140) {
+ log_err("u_enumCharNames(%ld..%lx) error %s names count=%ld\n", UCHAR_MIN_VALUE, UCHAR_MAX_VALUE, u_errorName(errorCode), length);
+ }
+
+ extContext.length = 0;
+ extContext.last = -1;
+ errorCode=U_ZERO_ERROR;
+ u_enumCharNames(UCHAR_MIN_VALUE, UCHAR_MAX_VALUE + 1, enumExtCharNamesFn, &extContext, U_EXTENDED_CHAR_NAME, &errorCode);
+ if(U_FAILURE(errorCode) || extContext.length<UCHAR_MAX_VALUE + 1) {
+ log_err("u_enumCharNames(%ld..0x%lx - Extended) error %s names count=%ld\n", UCHAR_MIN_VALUE, UCHAR_MAX_VALUE + 1, u_errorName(errorCode), extContext.length);
+ }
+
+ /* test that u_charFromName() uppercases the input name, i.e., works with mixed-case names (new in 2.0) */
+ if(0x61!=u_charFromName(U_UNICODE_CHAR_NAME, "LATin smALl letTER A", &errorCode)) {
+ log_err("u_charFromName(U_UNICODE_CHAR_NAME, \"LATin smALl letTER A\") did not find U+0061 (%s)\n", u_errorName(errorCode));
+ }
+
+ /* Test getCharNameCharacters */
+ if(!QUICK) {
+ enum { BUFSIZE = 256 };
+ UErrorCode ec = U_ZERO_ERROR;
+ char buf[BUFSIZE];
+ int32_t maxLength;
+ UChar32 cp;
+ UChar pat[BUFSIZE], dumbPat[BUFSIZE];
+ int32_t l1, l2;
+ UBool map[256];
+ UBool ok;
+
+ USet* set = uset_open(1, 0); /* empty set */
+ USet* dumb = uset_open(1, 0); /* empty set */
+
+ /*
+ * uprv_getCharNameCharacters() will likely return more lowercase
+ * letters than actual character names contain because
+ * it includes all the characters in lowercased names of
+ * general categories, for the full possible set of extended names.
+ */
+ {
+ USetAdder sa={
+ NULL,
+ uset_add,
+ uset_addRange,
+ uset_addString,
+ NULL /* don't need remove() */
+ };
+ sa.set=set;
+ uprv_getCharNameCharacters(&sa);
+ }
+
+ /* build set the dumb (but sure-fire) way */
+ for (i=0; i<256; ++i) {
+ map[i] = FALSE;
+ }
+
+ maxLength=0;
+ for (cp=0; cp<0x110000; ++cp) {
+ int32_t len = u_charName(cp, U_EXTENDED_CHAR_NAME,
+ buf, BUFSIZE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: u_charName failed when it shouldn't\n");
+ uset_close(set);
+ uset_close(dumb);
+ return;
+ }
+ if(len>maxLength) {
+ maxLength=len;
+ }
+
+ for (i=0; i<len; ++i) {
+ if (!map[(uint8_t) buf[i]]) {
+ uset_add(dumb, (UChar32)u_charToUChar(buf[i]));
+ map[(uint8_t) buf[i]] = TRUE;
+ }
+ }
+
+ /* test for leading/trailing whitespace */
+ if(buf[0]==' ' || buf[0]=='\t' || buf[len-1]==' ' || buf[len-1]=='\t') {
+ log_err("u_charName(U+%04x) returns a name with leading or trailing whitespace\n", cp);
+ }
+ }
+
+ if(map[(uint8_t)'\t']) {
+ log_err("u_charName() returned a name with a TAB for some code point\n", cp);
+ }
+
+ length=uprv_getMaxCharNameLength();
+ if(length!=maxLength) {
+ log_err("uprv_getMaxCharNameLength()=%d differs from the maximum length %d of all extended names\n",
+ length, maxLength);
+ }
+
+ /* compare the sets. Where is my uset_equals?!! */
+ ok=TRUE;
+ for(i=0; i<256; ++i) {
+ if(uset_contains(set, i)!=uset_contains(dumb, i)) {
+ if(0x61<=i && i<=0x7a /* a-z */ && uset_contains(set, i) && !uset_contains(dumb, i)) {
+ /* ignore lowercase a-z that are in set but not in dumb */
+ ok=TRUE;
+ } else {
+ ok=FALSE;
+ break;
+ }
+ }
+ }
+
+ l1 = uset_toPattern(set, pat, BUFSIZE, TRUE, &ec);
+ l2 = uset_toPattern(dumb, dumbPat, BUFSIZE, TRUE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: uset_toPattern failed when it shouldn't\n");
+ uset_close(set);
+ uset_close(dumb);
+ return;
+ }
+
+ if (l1 >= BUFSIZE) {
+ l1 = BUFSIZE-1;
+ pat[l1] = 0;
+ }
+ if (l2 >= BUFSIZE) {
+ l2 = BUFSIZE-1;
+ dumbPat[l2] = 0;
+ }
+
+ if (!ok) {
+ log_err("FAIL: uprv_getCharNameCharacters() returned %s, expected %s (too many lowercase a-z are ok)\n",
+ aescstrdup(pat, l1), aescstrdup(dumbPat, l2));
+ } else if(VERBOSITY) {
+ log_verbose("Ok: uprv_getCharNameCharacters() returned %s\n", aescstrdup(pat, l1));
+ }
+
+ uset_close(set);
+ uset_close(dumb);
+ }
+
+ /* ### TODO: test error cases and other interesting things */
+}
+
+/* test u_isMirrored() and u_charMirror() ----------------------------------- */
+
+static void
+TestMirroring() {
+ USet *set;
+ UErrorCode errorCode;
+
+ UChar32 start, end, c2, c3;
+ int32_t i;
+
+ U_STRING_DECL(mirroredPattern, "[:Bidi_Mirrored:]", 17);
+
+ U_STRING_INIT(mirroredPattern, "[:Bidi_Mirrored:]", 17);
+
+ log_verbose("Testing u_isMirrored()\n");
+ if(!(u_isMirrored(0x28) && u_isMirrored(0xbb) && u_isMirrored(0x2045) && u_isMirrored(0x232a) &&
+ !u_isMirrored(0x27) && !u_isMirrored(0x61) && !u_isMirrored(0x284) && !u_isMirrored(0x3400)
+ )
+ ) {
+ log_err("u_isMirrored() does not work correctly\n");
+ }
+
+ log_verbose("Testing u_charMirror()\n");
+ if(!(u_charMirror(0x3c)==0x3e && u_charMirror(0x5d)==0x5b && u_charMirror(0x208d)==0x208e && u_charMirror(0x3017)==0x3016 &&
+ u_charMirror(0xbb)==0xab && u_charMirror(0x2215)==0x29F5 && u_charMirror(0x29F5)==0x2215 && /* large delta between the code points */
+ u_charMirror(0x2e)==0x2e && u_charMirror(0x6f3)==0x6f3 && u_charMirror(0x301c)==0x301c && u_charMirror(0xa4ab)==0xa4ab &&
+ /* see Unicode Corrigendum #6 at http://www.unicode.org/versions/corrigendum6.html */
+ u_charMirror(0x2018)==0x2018 && u_charMirror(0x201b)==0x201b && u_charMirror(0x301d)==0x301d
+ )
+ ) {
+ log_err("u_charMirror() does not work correctly\n");
+ }
+
+ /* verify that Bidi_Mirroring_Glyph roundtrips */
+ errorCode=U_ZERO_ERROR;
+ set=uset_openPattern(mirroredPattern, 17, &errorCode);
+
+ if (U_FAILURE(errorCode)) {
+ log_data_err("uset_openPattern(mirroredPattern, 17, &errorCode) failed!");
+ } else {
+ for(i=0; 0==uset_getItem(set, i, &start, &end, NULL, 0, &errorCode); ++i) {
+ do {
+ c2=u_charMirror(start);
+ c3=u_charMirror(c2);
+ if(c3!=start) {
+ log_err("u_charMirror() does not roundtrip: U+%04lx->U+%04lx->U+%04lx\n", (long)start, (long)c2, (long)c3);
+ }
+ } while(++start<=end);
+ }
+ }
+
+ uset_close(set);
+}
+
+
+struct RunTestData
+{
+ const char *runText;
+ UScriptCode runCode;
+};
+
+typedef struct RunTestData RunTestData;
+
+static void
+CheckScriptRuns(UScriptRun *scriptRun, int32_t *runStarts, const RunTestData *testData, int32_t nRuns,
+ const char *prefix)
+{
+ int32_t run, runStart, runLimit;
+ UScriptCode runCode;
+
+ /* iterate over all the runs */
+ run = 0;
+ while (uscript_nextRun(scriptRun, &runStart, &runLimit, &runCode)) {
+ if (runStart != runStarts[run]) {
+ log_err("%s: incorrect start offset for run %d: expected %d, got %d\n",
+ prefix, run, runStarts[run], runStart);
+ }
+
+ if (runLimit != runStarts[run + 1]) {
+ log_err("%s: incorrect limit offset for run %d: expected %d, got %d\n",
+ prefix, run, runStarts[run + 1], runLimit);
+ }
+
+ if (runCode != testData[run].runCode) {
+ log_err("%s: incorrect script for run %d: expected \"%s\", got \"%s\"\n",
+ prefix, run, uscript_getName(testData[run].runCode), uscript_getName(runCode));
+ }
+
+ run += 1;
+
+ /* stop when we've seen all the runs we expect to see */
+ if (run >= nRuns) {
+ break;
+ }
+ }
+
+ /* Complain if we didn't see then number of runs we expected */
+ if (run != nRuns) {
+ log_err("%s: incorrect number of runs: expected %d, got %d\n", prefix, run, nRuns);
+ }
+}
+
+static void
+TestUScriptRunAPI()
+{
+ static const RunTestData testData1[] = {
+ {"\\u0020\\u0946\\u0939\\u093F\\u0928\\u094D\\u0926\\u0940\\u0020", USCRIPT_DEVANAGARI},
+ {"\\u0627\\u0644\\u0639\\u0631\\u0628\\u064A\\u0629\\u0020", USCRIPT_ARABIC},
+ {"\\u0420\\u0443\\u0441\\u0441\\u043A\\u0438\\u0439\\u0020", USCRIPT_CYRILLIC},
+ {"English (", USCRIPT_LATIN},
+ {"\\u0E44\\u0E17\\u0E22", USCRIPT_THAI},
+ {") ", USCRIPT_LATIN},
+ {"\\u6F22\\u5B75", USCRIPT_HAN},
+ {"\\u3068\\u3072\\u3089\\u304C\\u306A\\u3068", USCRIPT_HIRAGANA},
+ {"\\u30AB\\u30BF\\u30AB\\u30CA", USCRIPT_KATAKANA},
+ {"\\U00010400\\U00010401\\U00010402\\U00010403", USCRIPT_DESERET}
+ };
+
+ static const RunTestData testData2[] = {
+ {"((((((((((abc))))))))))", USCRIPT_LATIN}
+ };
+
+ static const struct {
+ const RunTestData *testData;
+ int32_t nRuns;
+ } testDataEntries[] = {
+ {testData1, LENGTHOF(testData1)},
+ {testData2, LENGTHOF(testData2)}
+ };
+
+ static const int32_t nTestEntries = LENGTHOF(testDataEntries);
+ int32_t testEntry;
+
+ for (testEntry = 0; testEntry < nTestEntries; testEntry += 1) {
+ UChar testString[1024];
+ int32_t runStarts[256];
+ int32_t nTestRuns = testDataEntries[testEntry].nRuns;
+ const RunTestData *testData = testDataEntries[testEntry].testData;
+
+ int32_t run, stringLimit;
+ UScriptRun *scriptRun = NULL;
+ UErrorCode err;
+
+ /*
+ * Fill in the test string and the runStarts array.
+ */
+ stringLimit = 0;
+ for (run = 0; run < nTestRuns; run += 1) {
+ runStarts[run] = stringLimit;
+ stringLimit += u_unescape(testData[run].runText, &testString[stringLimit], 1024 - stringLimit);
+ /*stringLimit -= 1;*/
+ }
+
+ /* The limit of the last run */
+ runStarts[nTestRuns] = stringLimit;
+
+ /*
+ * Make sure that calling uscript_OpenRun with a NULL text pointer
+ * and a non-zero text length returns the correct error.
+ */
+ err = U_ZERO_ERROR;
+ scriptRun = uscript_openRun(NULL, stringLimit, &err);
+
+ if (err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("uscript_openRun(NULL, stringLimit, &err) returned %s instead of U_ILLEGAL_ARGUMENT_ERROR.\n", u_errorName(err));
+ }
+
+ if (scriptRun != NULL) {
+ log_err("uscript_openRun(NULL, stringLimit, &err) returned a non-NULL result.\n");
+ uscript_closeRun(scriptRun);
+ }
+
+ /*
+ * Make sure that calling uscript_OpenRun with a non-NULL text pointer
+ * and a zero text length returns the correct error.
+ */
+ err = U_ZERO_ERROR;
+ scriptRun = uscript_openRun(testString, 0, &err);
+
+ if (err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("uscript_openRun(testString, 0, &err) returned %s instead of U_ILLEGAL_ARGUMENT_ERROR.\n", u_errorName(err));
+ }
+
+ if (scriptRun != NULL) {
+ log_err("uscript_openRun(testString, 0, &err) returned a non-NULL result.\n");
+ uscript_closeRun(scriptRun);
+ }
+
+ /*
+ * Make sure that calling uscript_openRun with a NULL text pointer
+ * and a zero text length doesn't return an error.
+ */
+ err = U_ZERO_ERROR;
+ scriptRun = uscript_openRun(NULL, 0, &err);
+
+ if (U_FAILURE(err)) {
+ log_err("Got error %s from uscript_openRun(NULL, 0, &err)\n", u_errorName(err));
+ }
+
+ /* Make sure that the empty iterator doesn't find any runs */
+ if (uscript_nextRun(scriptRun, NULL, NULL, NULL)) {
+ log_err("uscript_nextRun(...) returned TRUE for an empty iterator.\n");
+ }
+
+ /*
+ * Make sure that calling uscript_setRunText with a NULL text pointer
+ * and a non-zero text length returns the correct error.
+ */
+ err = U_ZERO_ERROR;
+ uscript_setRunText(scriptRun, NULL, stringLimit, &err);
+
+ if (err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("uscript_setRunText(scriptRun, NULL, stringLimit, &err) returned %s instead of U_ILLEGAL_ARGUMENT_ERROR.\n", u_errorName(err));
+ }
+
+ /*
+ * Make sure that calling uscript_OpenRun with a non-NULL text pointer
+ * and a zero text length returns the correct error.
+ */
+ err = U_ZERO_ERROR;
+ uscript_setRunText(scriptRun, testString, 0, &err);
+
+ if (err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("uscript_setRunText(scriptRun, testString, 0, &err) returned %s instead of U_ILLEGAL_ARGUMENT_ERROR.\n", u_errorName(err));
+ }
+
+ /*
+ * Now call uscript_setRunText on the empty iterator
+ * and make sure that it works.
+ */
+ err = U_ZERO_ERROR;
+ uscript_setRunText(scriptRun, testString, stringLimit, &err);
+
+ if (U_FAILURE(err)) {
+ log_err("Got error %s from uscript_setRunText(...)\n", u_errorName(err));
+ } else {
+ CheckScriptRuns(scriptRun, runStarts, testData, nTestRuns, "uscript_setRunText");
+ }
+
+ uscript_closeRun(scriptRun);
+
+ /*
+ * Now open an interator over the testString
+ * using uscript_openRun and make sure that it works
+ */
+ scriptRun = uscript_openRun(testString, stringLimit, &err);
+
+ if (U_FAILURE(err)) {
+ log_err("Got error %s from uscript_openRun(...)\n", u_errorName(err));
+ } else {
+ CheckScriptRuns(scriptRun, runStarts, testData, nTestRuns, "uscript_openRun");
+ }
+
+ /* Now reset the iterator, and make sure
+ * that it still works.
+ */
+ uscript_resetRun(scriptRun);
+
+ CheckScriptRuns(scriptRun, runStarts, testData, nTestRuns, "uscript_resetRun");
+
+ /* Close the iterator */
+ uscript_closeRun(scriptRun);
+ }
+}
+
+/* test additional, non-core properties */
+static void
+TestAdditionalProperties() {
+ /* test data for u_charAge() */
+ static const struct {
+ UChar32 c;
+ UVersionInfo version;
+ } charAges[]={
+ {0x41, { 1, 1, 0, 0 }},
+ {0xffff, { 1, 1, 0, 0 }},
+ {0x20ab, { 2, 0, 0, 0 }},
+ {0x2fffe, { 2, 0, 0, 0 }},
+ {0x20ac, { 2, 1, 0, 0 }},
+ {0xfb1d, { 3, 0, 0, 0 }},
+ {0x3f4, { 3, 1, 0, 0 }},
+ {0x10300, { 3, 1, 0, 0 }},
+ {0x220, { 3, 2, 0, 0 }},
+ {0xff60, { 3, 2, 0, 0 }}
+ };
+
+ /* test data for u_hasBinaryProperty() */
+ static const int32_t
+ props[][3]={ /* code point, property, value */
+ { 0x0627, UCHAR_ALPHABETIC, TRUE },
+ { 0x1034a, UCHAR_ALPHABETIC, TRUE },
+ { 0x2028, UCHAR_ALPHABETIC, FALSE },
+
+ { 0x0066, UCHAR_ASCII_HEX_DIGIT, TRUE },
+ { 0x0067, UCHAR_ASCII_HEX_DIGIT, FALSE },
+
+ { 0x202c, UCHAR_BIDI_CONTROL, TRUE },
+ { 0x202f, UCHAR_BIDI_CONTROL, FALSE },
+
+ { 0x003c, UCHAR_BIDI_MIRRORED, TRUE },
+ { 0x003d, UCHAR_BIDI_MIRRORED, FALSE },
+
+ /* see Unicode Corrigendum #6 at http://www.unicode.org/versions/corrigendum6.html */
+ { 0x2018, UCHAR_BIDI_MIRRORED, FALSE },
+ { 0x201d, UCHAR_BIDI_MIRRORED, FALSE },
+ { 0x201f, UCHAR_BIDI_MIRRORED, FALSE },
+ { 0x301e, UCHAR_BIDI_MIRRORED, FALSE },
+
+ { 0x058a, UCHAR_DASH, TRUE },
+ { 0x007e, UCHAR_DASH, FALSE },
+
+ { 0x0c4d, UCHAR_DIACRITIC, TRUE },
+ { 0x3000, UCHAR_DIACRITIC, FALSE },
+
+ { 0x0e46, UCHAR_EXTENDER, TRUE },
+ { 0x0020, UCHAR_EXTENDER, FALSE },
+
+#if !UCONFIG_NO_NORMALIZATION
+ { 0xfb1d, UCHAR_FULL_COMPOSITION_EXCLUSION, TRUE },
+ { 0x1d15f, UCHAR_FULL_COMPOSITION_EXCLUSION, TRUE },
+ { 0xfb1e, UCHAR_FULL_COMPOSITION_EXCLUSION, FALSE },
+
+ { 0x110a, UCHAR_NFD_INERT, TRUE }, /* Jamo L */
+ { 0x0308, UCHAR_NFD_INERT, FALSE },
+
+ { 0x1164, UCHAR_NFKD_INERT, TRUE }, /* Jamo V */
+ { 0x1d79d, UCHAR_NFKD_INERT, FALSE }, /* math compat version of xi */
+
+ { 0x0021, UCHAR_NFC_INERT, TRUE }, /* ! */
+ { 0x0061, UCHAR_NFC_INERT, FALSE }, /* a */
+ { 0x00e4, UCHAR_NFC_INERT, FALSE }, /* a-umlaut */
+ { 0x0102, UCHAR_NFC_INERT, FALSE }, /* a-breve */
+ { 0xac1c, UCHAR_NFC_INERT, FALSE }, /* Hangul LV */
+ { 0xac1d, UCHAR_NFC_INERT, TRUE }, /* Hangul LVT */
+
+ { 0x1d79d, UCHAR_NFKC_INERT, FALSE }, /* math compat version of xi */
+ { 0x2a6d6, UCHAR_NFKC_INERT, TRUE }, /* Han, last of CJK ext. B */
+
+ { 0x00e4, UCHAR_SEGMENT_STARTER, TRUE },
+ { 0x0308, UCHAR_SEGMENT_STARTER, FALSE },
+ { 0x110a, UCHAR_SEGMENT_STARTER, TRUE }, /* Jamo L */
+ { 0x1164, UCHAR_SEGMENT_STARTER, FALSE },/* Jamo V */
+ { 0xac1c, UCHAR_SEGMENT_STARTER, TRUE }, /* Hangul LV */
+ { 0xac1d, UCHAR_SEGMENT_STARTER, TRUE }, /* Hangul LVT */
+#endif
+
+ { 0x0044, UCHAR_HEX_DIGIT, TRUE },
+ { 0xff46, UCHAR_HEX_DIGIT, TRUE },
+ { 0x0047, UCHAR_HEX_DIGIT, FALSE },
+
+ { 0x30fb, UCHAR_HYPHEN, TRUE },
+ { 0xfe58, UCHAR_HYPHEN, FALSE },
+
+ { 0x2172, UCHAR_ID_CONTINUE, TRUE },
+ { 0x0307, UCHAR_ID_CONTINUE, TRUE },
+ { 0x005c, UCHAR_ID_CONTINUE, FALSE },
+
+ { 0x2172, UCHAR_ID_START, TRUE },
+ { 0x007a, UCHAR_ID_START, TRUE },
+ { 0x0039, UCHAR_ID_START, FALSE },
+
+ { 0x4db5, UCHAR_IDEOGRAPHIC, TRUE },
+ { 0x2f999, UCHAR_IDEOGRAPHIC, TRUE },
+ { 0x2f99, UCHAR_IDEOGRAPHIC, FALSE },
+
+ { 0x200c, UCHAR_JOIN_CONTROL, TRUE },
+ { 0x2029, UCHAR_JOIN_CONTROL, FALSE },
+
+ { 0x1d7bc, UCHAR_LOWERCASE, TRUE },
+ { 0x0345, UCHAR_LOWERCASE, TRUE },
+ { 0x0030, UCHAR_LOWERCASE, FALSE },
+
+ { 0x1d7a9, UCHAR_MATH, TRUE },
+ { 0x2135, UCHAR_MATH, TRUE },
+ { 0x0062, UCHAR_MATH, FALSE },
+
+ { 0xfde1, UCHAR_NONCHARACTER_CODE_POINT, TRUE },
+ { 0x10ffff, UCHAR_NONCHARACTER_CODE_POINT, TRUE },
+ { 0x10fffd, UCHAR_NONCHARACTER_CODE_POINT, FALSE },
+
+ { 0x0022, UCHAR_QUOTATION_MARK, TRUE },
+ { 0xff62, UCHAR_QUOTATION_MARK, TRUE },
+ { 0xd840, UCHAR_QUOTATION_MARK, FALSE },
+
+ { 0x061f, UCHAR_TERMINAL_PUNCTUATION, TRUE },
+ { 0xe003f, UCHAR_TERMINAL_PUNCTUATION, FALSE },
+
+ { 0x1d44a, UCHAR_UPPERCASE, TRUE },
+ { 0x2162, UCHAR_UPPERCASE, TRUE },
+ { 0x0345, UCHAR_UPPERCASE, FALSE },
+
+ { 0x0020, UCHAR_WHITE_SPACE, TRUE },
+ { 0x202f, UCHAR_WHITE_SPACE, TRUE },
+ { 0x3001, UCHAR_WHITE_SPACE, FALSE },
+
+ { 0x0711, UCHAR_XID_CONTINUE, TRUE },
+ { 0x1d1aa, UCHAR_XID_CONTINUE, TRUE },
+ { 0x007c, UCHAR_XID_CONTINUE, FALSE },
+
+ { 0x16ee, UCHAR_XID_START, TRUE },
+ { 0x23456, UCHAR_XID_START, TRUE },
+ { 0x1d1aa, UCHAR_XID_START, FALSE },
+
+ /*
+ * Version break:
+ * The following properties are only supported starting with the
+ * Unicode version indicated in the second field.
+ */
+ { -1, 0x320, 0 },
+
+ { 0x180c, UCHAR_DEFAULT_IGNORABLE_CODE_POINT, TRUE },
+ { 0xfe02, UCHAR_DEFAULT_IGNORABLE_CODE_POINT, TRUE },
+ { 0x1801, UCHAR_DEFAULT_IGNORABLE_CODE_POINT, FALSE },
+
+ { 0x0341, UCHAR_DEPRECATED, TRUE },
+ { 0xe0041, UCHAR_DEPRECATED, FALSE },
+
+ { 0x00a0, UCHAR_GRAPHEME_BASE, TRUE },
+ { 0x0a4d, UCHAR_GRAPHEME_BASE, FALSE },
+ { 0xff9f, UCHAR_GRAPHEME_BASE, TRUE }, /* changed from Unicode 3.2 to 4 */
+
+ { 0x0300, UCHAR_GRAPHEME_EXTEND, TRUE },
+ { 0xff9f, UCHAR_GRAPHEME_EXTEND, FALSE }, /* changed from Unicode 3.2 to 4 */
+ { 0x0603, UCHAR_GRAPHEME_EXTEND, FALSE },
+
+ { 0x0a4d, UCHAR_GRAPHEME_LINK, TRUE },
+ { 0xff9f, UCHAR_GRAPHEME_LINK, FALSE },
+
+ { 0x2ff7, UCHAR_IDS_BINARY_OPERATOR, TRUE },
+ { 0x2ff3, UCHAR_IDS_BINARY_OPERATOR, FALSE },
+
+ { 0x2ff3, UCHAR_IDS_TRINARY_OPERATOR, TRUE },
+ { 0x2f03, UCHAR_IDS_TRINARY_OPERATOR, FALSE },
+
+ { 0x0ec1, UCHAR_LOGICAL_ORDER_EXCEPTION, TRUE },
+ { 0xdcba, UCHAR_LOGICAL_ORDER_EXCEPTION, FALSE },
+
+ { 0x2e9b, UCHAR_RADICAL, TRUE },
+ { 0x4e00, UCHAR_RADICAL, FALSE },
+
+ { 0x012f, UCHAR_SOFT_DOTTED, TRUE },
+ { 0x0049, UCHAR_SOFT_DOTTED, FALSE },
+
+ { 0xfa11, UCHAR_UNIFIED_IDEOGRAPH, TRUE },
+ { 0xfa12, UCHAR_UNIFIED_IDEOGRAPH, FALSE },
+
+ { -1, 0x401, 0 }, /* version break for Unicode 4.0.1 */
+
+ { 0x002e, UCHAR_S_TERM, TRUE },
+ { 0x0061, UCHAR_S_TERM, FALSE },
+
+ { 0x180c, UCHAR_VARIATION_SELECTOR, TRUE },
+ { 0xfe03, UCHAR_VARIATION_SELECTOR, TRUE },
+ { 0xe01ef, UCHAR_VARIATION_SELECTOR, TRUE },
+ { 0xe0200, UCHAR_VARIATION_SELECTOR, FALSE },
+
+ /* enum/integer type properties */
+
+ /* UCHAR_BIDI_CLASS tested for assigned characters in TestUnicodeData() */
+ /* test default Bidi classes for unassigned code points */
+ { 0x0590, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0x05cf, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0x05ed, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0x07f2, UCHAR_BIDI_CLASS, U_DIR_NON_SPACING_MARK }, /* Nko, new in Unicode 5.0 */
+ { 0x07fe, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, /* unassigned R */
+ { 0x08ba, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0xfb37, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0xfb42, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0x10806, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0x10909, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+ { 0x10fe4, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT },
+
+ { 0x0606, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+ { 0x061c, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+ { 0x063f, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+ { 0x070e, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+ { 0x0775, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+ { 0xfbc2, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+ { 0xfd90, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+ { 0xfefe, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT_ARABIC },
+
+ { 0x02AF, UCHAR_BLOCK, UBLOCK_IPA_EXTENSIONS },
+ { 0x0C4E, UCHAR_BLOCK, UBLOCK_TELUGU },
+ { 0x155A, UCHAR_BLOCK, UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS },
+ { 0x1717, UCHAR_BLOCK, UBLOCK_TAGALOG },
+ { 0x1900, UCHAR_BLOCK, UBLOCK_LIMBU },
+ { 0x1AFF, UCHAR_BLOCK, UBLOCK_NO_BLOCK },
+ { 0x3040, UCHAR_BLOCK, UBLOCK_HIRAGANA },
+ { 0x1D0FF, UCHAR_BLOCK, UBLOCK_BYZANTINE_MUSICAL_SYMBOLS },
+ { 0x50000, UCHAR_BLOCK, UBLOCK_NO_BLOCK },
+ { 0xEFFFF, UCHAR_BLOCK, UBLOCK_NO_BLOCK },
+ { 0x10D0FF, UCHAR_BLOCK, UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B },
+
+ /* UCHAR_CANONICAL_COMBINING_CLASS tested for assigned characters in TestUnicodeData() */
+ { 0xd7d7, UCHAR_CANONICAL_COMBINING_CLASS, 0 },
+
+ { 0x00A0, UCHAR_DECOMPOSITION_TYPE, U_DT_NOBREAK },
+ { 0x00A8, UCHAR_DECOMPOSITION_TYPE, U_DT_COMPAT },
+ { 0x00bf, UCHAR_DECOMPOSITION_TYPE, U_DT_NONE },
+ { 0x00c0, UCHAR_DECOMPOSITION_TYPE, U_DT_CANONICAL },
+ { 0x1E9B, UCHAR_DECOMPOSITION_TYPE, U_DT_CANONICAL },
+ { 0xBCDE, UCHAR_DECOMPOSITION_TYPE, U_DT_CANONICAL },
+ { 0xFB5D, UCHAR_DECOMPOSITION_TYPE, U_DT_MEDIAL },
+ { 0x1D736, UCHAR_DECOMPOSITION_TYPE, U_DT_FONT },
+ { 0xe0033, UCHAR_DECOMPOSITION_TYPE, U_DT_NONE },
+
+ { 0x0009, UCHAR_EAST_ASIAN_WIDTH, U_EA_NEUTRAL },
+ { 0x0020, UCHAR_EAST_ASIAN_WIDTH, U_EA_NARROW },
+ { 0x00B1, UCHAR_EAST_ASIAN_WIDTH, U_EA_AMBIGUOUS },
+ { 0x20A9, UCHAR_EAST_ASIAN_WIDTH, U_EA_HALFWIDTH },
+ { 0x2FFB, UCHAR_EAST_ASIAN_WIDTH, U_EA_WIDE },
+ { 0x3000, UCHAR_EAST_ASIAN_WIDTH, U_EA_FULLWIDTH },
+ { 0x35bb, UCHAR_EAST_ASIAN_WIDTH, U_EA_WIDE },
+ { 0x58bd, UCHAR_EAST_ASIAN_WIDTH, U_EA_WIDE },
+ { 0xD7A3, UCHAR_EAST_ASIAN_WIDTH, U_EA_WIDE },
+ { 0xEEEE, UCHAR_EAST_ASIAN_WIDTH, U_EA_AMBIGUOUS },
+ { 0x1D198, UCHAR_EAST_ASIAN_WIDTH, U_EA_NEUTRAL },
+ { 0x20000, UCHAR_EAST_ASIAN_WIDTH, U_EA_WIDE },
+ { 0x2F8C7, UCHAR_EAST_ASIAN_WIDTH, U_EA_WIDE },
+ { 0x3a5bd, UCHAR_EAST_ASIAN_WIDTH, U_EA_WIDE }, /* plane 3 got default W values in Unicode 4 */
+ { 0x5a5bd, UCHAR_EAST_ASIAN_WIDTH, U_EA_NEUTRAL },
+ { 0xFEEEE, UCHAR_EAST_ASIAN_WIDTH, U_EA_AMBIGUOUS },
+ { 0x10EEEE, UCHAR_EAST_ASIAN_WIDTH, U_EA_AMBIGUOUS },
+
+ /* UCHAR_GENERAL_CATEGORY tested for assigned characters in TestUnicodeData() */
+ { 0xd7d7, UCHAR_GENERAL_CATEGORY, 0 },
+
+ { 0x0444, UCHAR_JOINING_GROUP, U_JG_NO_JOINING_GROUP },
+ { 0x0639, UCHAR_JOINING_GROUP, U_JG_AIN },
+ { 0x072A, UCHAR_JOINING_GROUP, U_JG_DALATH_RISH },
+ { 0x0647, UCHAR_JOINING_GROUP, U_JG_HEH },
+ { 0x06C1, UCHAR_JOINING_GROUP, U_JG_HEH_GOAL },
+ { 0x06C3, UCHAR_JOINING_GROUP, U_JG_HAMZA_ON_HEH_GOAL },
+
+ { 0x200C, UCHAR_JOINING_TYPE, U_JT_NON_JOINING },
+ { 0x200D, UCHAR_JOINING_TYPE, U_JT_JOIN_CAUSING },
+ { 0x0639, UCHAR_JOINING_TYPE, U_JT_DUAL_JOINING },
+ { 0x0640, UCHAR_JOINING_TYPE, U_JT_JOIN_CAUSING },
+ { 0x06C3, UCHAR_JOINING_TYPE, U_JT_RIGHT_JOINING },
+ { 0x0300, UCHAR_JOINING_TYPE, U_JT_TRANSPARENT },
+ { 0x070F, UCHAR_JOINING_TYPE, U_JT_TRANSPARENT },
+ { 0xe0033, UCHAR_JOINING_TYPE, U_JT_TRANSPARENT },
+
+ /* TestUnicodeData() verifies that no assigned character has "XX" (unknown) */
+ { 0xe7e7, UCHAR_LINE_BREAK, U_LB_UNKNOWN },
+ { 0x10fffd, UCHAR_LINE_BREAK, U_LB_UNKNOWN },
+ { 0x0028, UCHAR_LINE_BREAK, U_LB_OPEN_PUNCTUATION },
+ { 0x232A, UCHAR_LINE_BREAK, U_LB_CLOSE_PUNCTUATION },
+ { 0x3401, UCHAR_LINE_BREAK, U_LB_IDEOGRAPHIC },
+ { 0x4e02, UCHAR_LINE_BREAK, U_LB_IDEOGRAPHIC },
+ { 0x20004, UCHAR_LINE_BREAK, U_LB_IDEOGRAPHIC },
+ { 0xf905, UCHAR_LINE_BREAK, U_LB_IDEOGRAPHIC },
+ { 0xdb7e, UCHAR_LINE_BREAK, U_LB_SURROGATE },
+ { 0xdbfd, UCHAR_LINE_BREAK, U_LB_SURROGATE },
+ { 0xdffc, UCHAR_LINE_BREAK, U_LB_SURROGATE },
+ { 0x2762, UCHAR_LINE_BREAK, U_LB_EXCLAMATION },
+ { 0x002F, UCHAR_LINE_BREAK, U_LB_BREAK_SYMBOLS },
+ { 0x1D49C, UCHAR_LINE_BREAK, U_LB_ALPHABETIC },
+ { 0x1731, UCHAR_LINE_BREAK, U_LB_ALPHABETIC },
+
+ /* UCHAR_NUMERIC_TYPE tested in TestNumericProperties() */
+
+ /* UCHAR_SCRIPT tested in TestUScriptCodeAPI() */
+
+ { 0x1100, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LEADING_JAMO },
+ { 0x1111, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LEADING_JAMO },
+ { 0x1159, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LEADING_JAMO },
+ { 0x115f, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LEADING_JAMO },
+
+ { 0x1160, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_VOWEL_JAMO },
+ { 0x1161, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_VOWEL_JAMO },
+ { 0x1172, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_VOWEL_JAMO },
+ { 0x11a2, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_VOWEL_JAMO },
+
+ { 0x11a8, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_TRAILING_JAMO },
+ { 0x11b8, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_TRAILING_JAMO },
+ { 0x11c8, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_TRAILING_JAMO },
+ { 0x11f9, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_TRAILING_JAMO },
+
+ { 0x115a, UCHAR_HANGUL_SYLLABLE_TYPE, 0 },
+ { 0x115e, UCHAR_HANGUL_SYLLABLE_TYPE, 0 },
+ { 0x11a3, UCHAR_HANGUL_SYLLABLE_TYPE, 0 },
+ { 0x11a7, UCHAR_HANGUL_SYLLABLE_TYPE, 0 },
+ { 0x11fa, UCHAR_HANGUL_SYLLABLE_TYPE, 0 },
+ { 0x11ff, UCHAR_HANGUL_SYLLABLE_TYPE, 0 },
+
+ { 0xac00, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LV_SYLLABLE },
+ { 0xac1c, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LV_SYLLABLE },
+ { 0xc5ec, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LV_SYLLABLE },
+ { 0xd788, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LV_SYLLABLE },
+
+ { 0xac01, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LVT_SYLLABLE },
+ { 0xac1b, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LVT_SYLLABLE },
+ { 0xac1d, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LVT_SYLLABLE },
+ { 0xc5ee, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LVT_SYLLABLE },
+ { 0xd7a3, UCHAR_HANGUL_SYLLABLE_TYPE, U_HST_LVT_SYLLABLE },
+
+ { 0xd7a4, UCHAR_HANGUL_SYLLABLE_TYPE, 0 },
+
+ { -1, 0x410, 0 }, /* version break for Unicode 4.1 */
+
+ { 0x00d7, UCHAR_PATTERN_SYNTAX, TRUE },
+ { 0xfe45, UCHAR_PATTERN_SYNTAX, TRUE },
+ { 0x0061, UCHAR_PATTERN_SYNTAX, FALSE },
+
+ { 0x0020, UCHAR_PATTERN_WHITE_SPACE, TRUE },
+ { 0x0085, UCHAR_PATTERN_WHITE_SPACE, TRUE },
+ { 0x200f, UCHAR_PATTERN_WHITE_SPACE, TRUE },
+ { 0x00a0, UCHAR_PATTERN_WHITE_SPACE, FALSE },
+ { 0x3000, UCHAR_PATTERN_WHITE_SPACE, FALSE },
+
+ { 0x1d200, UCHAR_BLOCK, UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION },
+ { 0x2c8e, UCHAR_BLOCK, UBLOCK_COPTIC },
+ { 0xfe17, UCHAR_BLOCK, UBLOCK_VERTICAL_FORMS },
+
+ { 0x1a00, UCHAR_SCRIPT, USCRIPT_BUGINESE },
+ { 0x2cea, UCHAR_SCRIPT, USCRIPT_COPTIC },
+ { 0xa82b, UCHAR_SCRIPT, USCRIPT_SYLOTI_NAGRI },
+ { 0x103d0, UCHAR_SCRIPT, USCRIPT_OLD_PERSIAN },
+
+ { 0xcc28, UCHAR_LINE_BREAK, U_LB_H2 },
+ { 0xcc29, UCHAR_LINE_BREAK, U_LB_H3 },
+ { 0xac03, UCHAR_LINE_BREAK, U_LB_H3 },
+ { 0x115f, UCHAR_LINE_BREAK, U_LB_JL },
+ { 0x11aa, UCHAR_LINE_BREAK, U_LB_JT },
+ { 0x11a1, UCHAR_LINE_BREAK, U_LB_JV },
+
+ { 0xb2c9, UCHAR_GRAPHEME_CLUSTER_BREAK, U_GCB_LVT },
+ { 0x036f, UCHAR_GRAPHEME_CLUSTER_BREAK, U_GCB_EXTEND },
+ { 0x0000, UCHAR_GRAPHEME_CLUSTER_BREAK, U_GCB_CONTROL },
+ { 0x1160, UCHAR_GRAPHEME_CLUSTER_BREAK, U_GCB_V },
+
+ { 0x05f4, UCHAR_WORD_BREAK, U_WB_MIDLETTER },
+ { 0x4ef0, UCHAR_WORD_BREAK, U_WB_OTHER },
+ { 0x19d9, UCHAR_WORD_BREAK, U_WB_NUMERIC },
+ { 0x2044, UCHAR_WORD_BREAK, U_WB_MIDNUM },
+
+ { 0xfffd, UCHAR_SENTENCE_BREAK, U_SB_OTHER },
+ { 0x1ffc, UCHAR_SENTENCE_BREAK, U_SB_UPPER },
+ { 0xff63, UCHAR_SENTENCE_BREAK, U_SB_CLOSE },
+ { 0x2028, UCHAR_SENTENCE_BREAK, U_SB_SEP },
+
+ /* undefined UProperty values */
+ { 0x61, 0x4a7, 0 },
+ { 0x234bc, 0x15ed, 0 }
+ };
+
+ UVersionInfo version;
+ UChar32 c;
+ int32_t i, result, uVersion;
+ UProperty which;
+
+ /* what is our Unicode version? */
+ u_getUnicodeVersion(version);
+ uVersion=((int32_t)version[0]<<8)|(version[1]<<4)|version[2]; /* major/minor/update version numbers */
+
+ u_charAge(0x20, version);
+ if(version[0]==0) {
+ /* no additional properties available */
+ log_err("TestAdditionalProperties: no additional properties available, not tested\n");
+ return;
+ }
+
+ /* test u_charAge() */
+ for(i=0; i<sizeof(charAges)/sizeof(charAges[0]); ++i) {
+ u_charAge(charAges[i].c, version);
+ if(0!=memcmp(version, charAges[i].version, sizeof(UVersionInfo))) {
+ log_err("error: u_charAge(U+%04lx)={ %u, %u, %u, %u } instead of { %u, %u, %u, %u }\n",
+ charAges[i].c,
+ version[0], version[1], version[2], version[3],
+ charAges[i].version[0], charAges[i].version[1], charAges[i].version[2], charAges[i].version[3]);
+ }
+ }
+
+ if( u_getIntPropertyMinValue(UCHAR_DASH)!=0 ||
+ u_getIntPropertyMinValue(UCHAR_BIDI_CLASS)!=0 ||
+ u_getIntPropertyMinValue(UCHAR_BLOCK)!=0 || /* j2478 */
+ u_getIntPropertyMinValue(UCHAR_SCRIPT)!=0 || /*JB#2410*/
+ u_getIntPropertyMinValue(0x2345)!=0
+ ) {
+ log_err("error: u_getIntPropertyMinValue() wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_DASH)!=1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_DASH) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_ID_CONTINUE)!=1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_ID_CONTINUE) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue((UProperty)(UCHAR_BINARY_LIMIT-1))!=1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_BINARY_LIMIT-1) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)!=(int32_t)U_CHAR_DIRECTION_COUNT-1 ) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_BLOCK)!=(int32_t)UBLOCK_COUNT-1 ) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_BLOCK) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_LINE_BREAK)!=(int32_t)U_LB_COUNT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_LINE_BREAK) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_SCRIPT)!=(int32_t)USCRIPT_CODE_LIMIT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_SCRIPT) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE)!=(int32_t)U_NT_COUNT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_GENERAL_CATEGORY)!=(int32_t)U_CHAR_CATEGORY_COUNT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_GENERAL_CATEGORY) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE)!=(int32_t)U_HST_COUNT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK)!=(int32_t)U_GCB_COUNT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK)!=(int32_t)U_SB_COUNT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK) wrong\n");
+ }
+ if(u_getIntPropertyMaxValue(UCHAR_WORD_BREAK)!=(int32_t)U_WB_COUNT-1) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_WORD_BREAK) wrong\n");
+ }
+ /*JB#2410*/
+ if( u_getIntPropertyMaxValue(0x2345)!=-1) {
+ log_err("error: u_getIntPropertyMaxValue(0x2345) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE) != (int32_t) (U_DT_COUNT - 1)) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP) != (int32_t) (U_JG_COUNT -1)) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE) != (int32_t) (U_JT_COUNT -1)) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE) wrong\n");
+ }
+ if( u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH) != (int32_t) (U_EA_COUNT -1)) {
+ log_err("error: u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH) wrong\n");
+ }
+
+ /* test u_hasBinaryProperty() and u_getIntPropertyValue() */
+ for(i=0; i<sizeof(props)/sizeof(props[0]); ++i) {
+ if(props[i][0]<0) {
+ /* Unicode version break */
+ if(uVersion<props[i][1]) {
+ break; /* do not test properties that are not yet supported */
+ } else {
+ continue; /* skip this row */
+ }
+ }
+
+ c=(UChar32)props[i][0];
+ which=(UProperty)props[i][1];
+
+ if(which<UCHAR_INT_START) {
+ result=u_hasBinaryProperty(c, which);
+ if(result!=props[i][2]) {
+ log_err("error: u_hasBinaryProperty(U+%04lx, %d)=%d is wrong (props[%d])\n",
+ c, which, result, i);
+ }
+ }
+
+ result=u_getIntPropertyValue(c, which);
+ if(result!=props[i][2]) {
+ log_err("error: u_getIntPropertyValue(U+%04lx, 0x1000+%d)=%d is wrong, should be %d (props[%d])\n",
+ c, (int32_t)which-0x1000, result, props[i][2], i);
+ }
+
+ /* test separate functions, too */
+ switch((UProperty)props[i][1]) {
+ case UCHAR_ALPHABETIC:
+ if(u_isUAlphabetic((UChar32)props[i][0])!=(UBool)props[i][2]) {
+ log_err("error: u_isUAlphabetic(U+%04lx)=%d is wrong (props[%d])\n",
+ props[i][0], result, i);
+ }
+ break;
+ case UCHAR_LOWERCASE:
+ if(u_isULowercase((UChar32)props[i][0])!=(UBool)props[i][2]) {
+ log_err("error: u_isULowercase(U+%04lx)=%d is wrong (props[%d])\n",
+ props[i][0], result, i);
+ }
+ break;
+ case UCHAR_UPPERCASE:
+ if(u_isUUppercase((UChar32)props[i][0])!=(UBool)props[i][2]) {
+ log_err("error: u_isUUppercase(U+%04lx)=%d is wrong (props[%d])\n",
+ props[i][0], result, i);
+ }
+ break;
+ case UCHAR_WHITE_SPACE:
+ if(u_isUWhiteSpace((UChar32)props[i][0])!=(UBool)props[i][2]) {
+ log_err("error: u_isUWhiteSpace(U+%04lx)=%d is wrong (props[%d])\n",
+ props[i][0], result, i);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static void
+TestNumericProperties(void) {
+ /* see UnicodeData.txt, DerivedNumericValues.txt */
+ static const struct {
+ UChar32 c;
+ int32_t type;
+ double numValue;
+ } values[]={
+ { 0x0F33, U_NT_NUMERIC, -1./2. },
+ { 0x0C66, U_NT_DECIMAL, 0 },
+ { 0x96f6, U_NT_NUMERIC, 0 },
+ { 0x2159, U_NT_NUMERIC, 1./6. },
+ { 0x00BD, U_NT_NUMERIC, 1./2. },
+ { 0x0031, U_NT_DECIMAL, 1. },
+ { 0x4e00, U_NT_NUMERIC, 1. },
+ { 0x58f1, U_NT_NUMERIC, 1. },
+ { 0x10320, U_NT_NUMERIC, 1. },
+ { 0x0F2B, U_NT_NUMERIC, 3./2. },
+ { 0x00B2, U_NT_DIGIT, 2. },
+ { 0x5f10, U_NT_NUMERIC, 2. },
+ { 0x1813, U_NT_DECIMAL, 3. },
+ { 0x5f0e, U_NT_NUMERIC, 3. },
+ { 0x2173, U_NT_NUMERIC, 4. },
+ { 0x8086, U_NT_NUMERIC, 4. },
+ { 0x278E, U_NT_DIGIT, 5. },
+ { 0x1D7F2, U_NT_DECIMAL, 6. },
+ { 0x247A, U_NT_DIGIT, 7. },
+ { 0x7396, U_NT_NUMERIC, 9. },
+ { 0x1372, U_NT_NUMERIC, 10. },
+ { 0x216B, U_NT_NUMERIC, 12. },
+ { 0x16EE, U_NT_NUMERIC, 17. },
+ { 0x249A, U_NT_NUMERIC, 19. },
+ { 0x303A, U_NT_NUMERIC, 30. },
+ { 0x5345, U_NT_NUMERIC, 30. },
+ { 0x32B2, U_NT_NUMERIC, 37. },
+ { 0x1375, U_NT_NUMERIC, 40. },
+ { 0x10323, U_NT_NUMERIC, 50. },
+ { 0x0BF1, U_NT_NUMERIC, 100. },
+ { 0x964c, U_NT_NUMERIC, 100. },
+ { 0x217E, U_NT_NUMERIC, 500. },
+ { 0x2180, U_NT_NUMERIC, 1000. },
+ { 0x4edf, U_NT_NUMERIC, 1000. },
+ { 0x2181, U_NT_NUMERIC, 5000. },
+ { 0x137C, U_NT_NUMERIC, 10000. },
+ { 0x4e07, U_NT_NUMERIC, 10000. },
+ { 0x4ebf, U_NT_NUMERIC, 100000000. },
+ { 0x5146, U_NT_NUMERIC, 1000000000000. },
+ { 0x61, U_NT_NONE, U_NO_NUMERIC_VALUE },
+ { 0x3000, U_NT_NONE, U_NO_NUMERIC_VALUE },
+ { 0xfffe, U_NT_NONE, U_NO_NUMERIC_VALUE },
+ { 0x10301, U_NT_NONE, U_NO_NUMERIC_VALUE },
+ { 0xe0033, U_NT_NONE, U_NO_NUMERIC_VALUE },
+ { 0x10ffff, U_NT_NONE, U_NO_NUMERIC_VALUE }
+ };
+
+ double nv;
+ UChar32 c;
+ int32_t i, type;
+
+ for(i=0; i<LENGTHOF(values); ++i) {
+ c=values[i].c;
+ type=u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE);
+ nv=u_getNumericValue(c);
+
+ if(type!=values[i].type) {
+ log_err("UCHAR_NUMERIC_TYPE(U+%04lx)=%d should be %d\n", c, type, values[i].type);
+ }
+ if(0.000001 <= fabs(nv - values[i].numValue)) {
+ log_err("u_getNumericValue(U+%04lx)=%g should be %g\n", c, nv, values[i].numValue);
+ }
+ }
+}
+
+/**
+ * Test the property names and property value names API.
+ */
+static void
+TestPropertyNames(void) {
+ int32_t p, v, choice=0, rev;
+ UBool atLeastSomething = FALSE;
+
+ for (p=0; ; ++p) {
+ UProperty propEnum = (UProperty)p;
+ UBool sawProp = FALSE;
+ if(p > 10 && !atLeastSomething) {
+ log_data_err("Never got anything after 10 tries.\nYour data is probably fried. Quitting this test\n", p, choice);
+ return;
+ }
+
+ for (choice=0; ; ++choice) {
+ const char* name = u_getPropertyName(propEnum, (UPropertyNameChoice)choice);
+ if (name) {
+ if (!sawProp)
+ log_verbose("prop 0x%04x+%2d:", p&~0xfff, p&0xfff);
+ log_verbose("%d=\"%s\"", choice, name);
+ sawProp = TRUE;
+ atLeastSomething = TRUE;
+
+ /* test reverse mapping */
+ rev = u_getPropertyEnum(name);
+ if (rev != p) {
+ log_err("Property round-trip failure: %d -> %s -> %d\n",
+ p, name, rev);
+ }
+ }
+ if (!name && choice>0) break;
+ }
+ if (sawProp) {
+ /* looks like a valid property; check the values */
+ const char* pname = u_getPropertyName(propEnum, U_LONG_PROPERTY_NAME);
+ int32_t max = 0;
+ if (p == UCHAR_CANONICAL_COMBINING_CLASS) {
+ max = 255;
+ } else if (p == UCHAR_GENERAL_CATEGORY_MASK) {
+ /* it's far too slow to iterate all the way up to
+ the real max, U_GC_P_MASK */
+ max = U_GC_NL_MASK;
+ } else if (p == UCHAR_BLOCK) {
+ /* UBlockCodes, unlike other values, start at 1 */
+ max = 1;
+ }
+ log_verbose("\n");
+ for (v=-1; ; ++v) {
+ UBool sawValue = FALSE;
+ for (choice=0; ; ++choice) {
+ const char* vname = u_getPropertyValueName(propEnum, v, (UPropertyNameChoice)choice);
+ if (vname) {
+ if (!sawValue) log_verbose(" %s, value %d:", pname, v);
+ log_verbose("%d=\"%s\"", choice, vname);
+ sawValue = TRUE;
+
+ /* test reverse mapping */
+ rev = u_getPropertyValueEnum(p, vname);
+ if (rev != v) {
+ log_err("Value round-trip failure (%s): %d -> %s -> %d\n",
+ pname, v, vname, rev);
+ }
+ }
+ if (!vname && choice>0) break;
+ }
+ if (sawValue) {
+ log_verbose("\n");
+ }
+ if (!sawValue && v>=max) break;
+ }
+ }
+ if (!sawProp) {
+ if (p>=UCHAR_STRING_LIMIT) {
+ break;
+ } else if (p>=UCHAR_DOUBLE_LIMIT) {
+ p = UCHAR_STRING_START - 1;
+ } else if (p>=UCHAR_MASK_LIMIT) {
+ p = UCHAR_DOUBLE_START - 1;
+ } else if (p>=UCHAR_INT_LIMIT) {
+ p = UCHAR_MASK_START - 1;
+ } else if (p>=UCHAR_BINARY_LIMIT) {
+ p = UCHAR_INT_START - 1;
+ }
+ }
+ }
+}
+
+/**
+ * Test the property values API. See JB#2410.
+ */
+static void
+TestPropertyValues(void) {
+ int32_t i, p, min, max;
+ UErrorCode ec;
+
+ /* Min should be 0 for everything. */
+ /* Until JB#2478 is fixed, the one exception is UCHAR_BLOCK. */
+ for (p=UCHAR_INT_START; p<UCHAR_INT_LIMIT; ++p) {
+ UProperty propEnum = (UProperty)p;
+ min = u_getIntPropertyMinValue(propEnum);
+ if (min != 0) {
+ if (p == UCHAR_BLOCK) {
+ /* This is okay...for now. See JB#2487.
+ TODO Update this for JB#2487. */
+ } else {
+ const char* name;
+ name = u_getPropertyName(propEnum, U_LONG_PROPERTY_NAME);
+ if (name == NULL)
+ name = "<ERROR>";
+ log_err("FAIL: u_getIntPropertyMinValue(%s) = %d, exp. 0\n",
+ name, min);
+ }
+ }
+ }
+
+ if( u_getIntPropertyMinValue(UCHAR_GENERAL_CATEGORY_MASK)!=0 ||
+ u_getIntPropertyMaxValue(UCHAR_GENERAL_CATEGORY_MASK)!=-1) {
+ log_err("error: u_getIntPropertyMin/MaxValue(UCHAR_GENERAL_CATEGORY_MASK) is wrong\n");
+ }
+
+ /* Max should be -1 for invalid properties. */
+ max = u_getIntPropertyMaxValue(UCHAR_INVALID_CODE);
+ if (max != -1) {
+ log_err("FAIL: u_getIntPropertyMaxValue(-1) = %d, exp. -1\n",
+ max);
+ }
+
+ /* Script should return USCRIPT_INVALID_CODE for an invalid code point. */
+ for (i=0; i<2; ++i) {
+ int32_t script;
+ const char* desc;
+ ec = U_ZERO_ERROR;
+ switch (i) {
+ case 0:
+ script = uscript_getScript(-1, &ec);
+ desc = "uscript_getScript(-1)";
+ break;
+ case 1:
+ script = u_getIntPropertyValue(-1, UCHAR_SCRIPT);
+ desc = "u_getIntPropertyValue(-1, UCHAR_SCRIPT)";
+ break;
+ default:
+ log_err("Internal test error. Too many scripts\n");
+ return;
+ }
+ /* We don't explicitly test ec. It should be U_FAILURE but it
+ isn't documented as such. */
+ if (script != (int32_t)USCRIPT_INVALID_CODE) {
+ log_err("FAIL: %s = %d, exp. 0\n",
+ desc, script);
+ }
+ }
+}
+
+/* add characters from a serialized set to a normal one */
+static void
+_setAddSerialized(USet *set, const USerializedSet *sset) {
+ UChar32 start, end;
+ int32_t i, count;
+
+ count=uset_getSerializedRangeCount(sset);
+ for(i=0; i<count; ++i) {
+ uset_getSerializedRange(sset, i, &start, &end);
+ uset_addRange(set, start, end);
+ }
+}
+
+/* various tests for consistency of UCD data and API behavior */
+static void
+TestConsistency() {
+#if !UCONFIG_NO_NORMALIZATION
+ UChar buffer16[300];
+#endif
+ char buffer[300];
+ USet *set1, *set2, *set3, *set4;
+ UErrorCode errorCode;
+
+#if !UCONFIG_NO_NORMALIZATION
+ USerializedSet sset;
+#endif
+ UChar32 start, end;
+ int32_t i, length;
+
+ U_STRING_DECL(hyphenPattern, "[:Hyphen:]", 10);
+ U_STRING_DECL(dashPattern, "[:Dash:]", 8);
+ U_STRING_DECL(lowerPattern, "[:Lowercase:]", 13);
+ U_STRING_DECL(formatPattern, "[:Cf:]", 6);
+ U_STRING_DECL(alphaPattern, "[:Alphabetic:]", 14);
+
+ U_STRING_DECL(mathBlocksPattern,
+ "[[:block=Mathematical Operators:][:block=Miscellaneous Mathematical Symbols-A:][:block=Miscellaneous Mathematical Symbols-B:][:block=Supplemental Mathematical Operators:][:block=Mathematical Alphanumeric Symbols:]]",
+ 1+32+46+46+45+43+1+1); /* +1 for NUL */
+ U_STRING_DECL(mathPattern, "[:Math:]", 8);
+ U_STRING_DECL(unassignedPattern, "[:Cn:]", 6);
+ U_STRING_DECL(unknownPattern, "[:sc=Unknown:]", 14);
+ U_STRING_DECL(reservedPattern, "[[:Cn:][:Co:][:Cs:]]", 20);
+
+ U_STRING_INIT(hyphenPattern, "[:Hyphen:]", 10);
+ U_STRING_INIT(dashPattern, "[:Dash:]", 8);
+ U_STRING_INIT(lowerPattern, "[:Lowercase:]", 13);
+ U_STRING_INIT(formatPattern, "[:Cf:]", 6);
+ U_STRING_INIT(alphaPattern, "[:Alphabetic:]", 14);
+
+ U_STRING_INIT(mathBlocksPattern,
+ "[[:block=Mathematical Operators:][:block=Miscellaneous Mathematical Symbols-A:][:block=Miscellaneous Mathematical Symbols-B:][:block=Supplemental Mathematical Operators:][:block=Mathematical Alphanumeric Symbols:]]",
+ 1+32+46+46+45+43+1+1); /* +1 for NUL */
+ U_STRING_INIT(mathPattern, "[:Math:]", 8);
+ U_STRING_INIT(unassignedPattern, "[:Cn:]", 6);
+ U_STRING_INIT(unknownPattern, "[:sc=Unknown:]", 14);
+ U_STRING_INIT(reservedPattern, "[[:Cn:][:Co:][:Cs:]]", 20);
+
+ /*
+ * It used to be that UCD.html and its precursors said
+ * "Those dashes used to mark connections between pieces of words,
+ * plus the Katakana middle dot."
+ *
+ * Unicode 4 changed 00AD Soft Hyphen to Cf and removed it from Dash
+ * but not from Hyphen.
+ * UTC 94 (2003mar) decided to leave it that way and to changed UCD.html.
+ * Therefore, do not show errors when testing the Hyphen property.
+ */
+ log_verbose("Starting with Unicode 4, inconsistencies with [:Hyphen:] are\n"
+ "known to the UTC and not considered errors.\n");
+
+ errorCode=U_ZERO_ERROR;
+ set1=uset_openPattern(hyphenPattern, 10, &errorCode);
+ set2=uset_openPattern(dashPattern, 8, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ /* remove the Katakana middle dot(s) from set1 */
+ uset_remove(set1, 0x30fb);
+ uset_remove(set1, 0xff65); /* halfwidth variant */
+ showAMinusB(set1, set2, "[:Hyphen:]", "[:Dash:]", FALSE);
+ } else {
+ log_err("error opening [:Hyphen:] or [:Dash:] - %s\n", u_errorName(errorCode));
+ }
+
+ /* check that Cf is neither Hyphen nor Dash nor Alphabetic */
+ set3=uset_openPattern(formatPattern, 6, &errorCode);
+ set4=uset_openPattern(alphaPattern, 14, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ showAIntersectB(set3, set1, "[:Cf:]", "[:Hyphen:]", FALSE);
+ showAIntersectB(set3, set2, "[:Cf:]", "[:Dash:]", TRUE);
+ showAIntersectB(set3, set4, "[:Cf:]", "[:Alphabetic:]", TRUE);
+ } else {
+ log_err("error opening [:Cf:] or [:Alpbabetic:] - %s\n", u_errorName(errorCode));
+ }
+
+ uset_close(set1);
+ uset_close(set2);
+ uset_close(set3);
+ uset_close(set4);
+
+ /*
+ * Check that each lowercase character has "small" in its name
+ * and not "capital".
+ * There are some such characters, some of which seem odd.
+ * Use the verbose flag to see these notices.
+ */
+ errorCode=U_ZERO_ERROR;
+ set1=uset_openPattern(lowerPattern, 13, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ for(i=0;; ++i) {
+ length=uset_getItem(set1, i, &start, &end, NULL, 0, &errorCode);
+ if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
+ break; /* done */
+ }
+ if(U_FAILURE(errorCode)) {
+ log_err("error iterating over [:Lowercase:] at item %d: %s\n",
+ i, u_errorName(errorCode));
+ break;
+ }
+ if(length!=0) {
+ break; /* done with code points, got a string or -1 */
+ }
+
+ while(start<=end) {
+ length=u_charName(start, U_UNICODE_CHAR_NAME, buffer, sizeof(buffer), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error getting the name of U+%04x - %s\n", start, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ if( (strstr(buffer, "SMALL")==NULL || strstr(buffer, "CAPITAL")!=NULL) &&
+ strstr(buffer, "SMALL CAPITAL")==NULL
+ ) {
+ log_verbose("info: [:Lowercase:] contains U+%04x whose name does not suggest lowercase: %s\n", start, buffer);
+ }
+ ++start;
+ }
+ }
+ } else {
+ log_err("error opening [:Lowercase:] - %s\n", u_errorName(errorCode));
+ }
+ uset_close(set1);
+
+#if !UCONFIG_NO_NORMALIZATION
+
+ /*
+ * Test for an example that unorm_getCanonStartSet() delivers
+ * all characters that compose from the input one,
+ * even in multiple steps.
+ * For example, the set for "I" (0049) should contain both
+ * I-diaeresis (00CF) and I-diaeresis-acute (1E2E).
+ * In general, the set for the middle such character should be a subset
+ * of the set for the first.
+ */
+ set1=uset_open(1, 0);
+ set2=uset_open(1, 0);
+
+ if (unorm_getCanonStartSet(0x49, &sset)) {
+ _setAddSerialized(set1, &sset);
+
+ /* enumerate all characters that are plausible to be latin letters */
+ for(start=0xa0; start<0x2000; ++start) {
+ if(unorm_getDecomposition(start, FALSE, buffer16, LENGTHOF(buffer16))>1 && buffer16[0]==0x49) {
+ uset_add(set2, start);
+ }
+ }
+
+ compareUSets(set1, set2,
+ "[canon start set of 0049]", "[all c with canon decomp with 0049]",
+ TRUE);
+ } else {
+ log_err("error calling unorm_getCanonStartSet()\n");
+ }
+
+ uset_close(set1);
+ uset_close(set2);
+
+#endif
+
+ /* verify that all assigned characters in Math blocks are exactly Math characters */
+ errorCode=U_ZERO_ERROR;
+ set1=uset_openPattern(mathBlocksPattern, -1, &errorCode);
+ set2=uset_openPattern(mathPattern, 8, &errorCode);
+ set3=uset_openPattern(unassignedPattern, 6, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ uset_retainAll(set2, set1); /* [math blocks]&[:Math:] */
+ uset_complement(set3); /* assigned characters */
+ uset_retainAll(set1, set3); /* [math blocks]&[assigned] */
+ compareUSets(set1, set2,
+ "[assigned Math block chars]", "[math blocks]&[:Math:]",
+ TRUE);
+ } else {
+ log_err("error opening [math blocks] or [:Math:] or [:Cn:] - %s\n", u_errorName(errorCode));
+ }
+ uset_close(set1);
+ uset_close(set2);
+ uset_close(set3);
+
+ /* new in Unicode 5.0: exactly all unassigned+PUA+surrogate code points have script=Unknown */
+ errorCode=U_ZERO_ERROR;
+ set1=uset_openPattern(unknownPattern, 14, &errorCode);
+ set2=uset_openPattern(reservedPattern, 20, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ compareUSets(set1, set2,
+ "[:sc=Unknown:]", "[[:Cn:][:Co:][:Cs:]]",
+ TRUE);
+ } else {
+ log_err("error opening [:sc=Unknown:] or [[:Cn:][:Co:][:Cs:]] - %s\n", u_errorName(errorCode));
+ }
+ uset_close(set1);
+ uset_close(set2);
+}
+
+/*
+ * Starting with ICU4C 3.4, the core Unicode properties files
+ * (uprops.icu, ucase.icu, ubidi.icu, unorm.icu)
+ * are hardcoded in the common DLL and therefore not included
+ * in the data package any more.
+ * Test requiring these files are disabled so that
+ * we need not jump through hoops (like adding snapshots of these files
+ * to testdata).
+ * See Jitterbug 4497.
+ */
+#define HARDCODED_DATA_4497 1
+
+/* API coverage for ucase.c */
+static void TestUCase() {
+#if !HARDCODED_DATA_4497
+ UDataMemory *pData;
+ UCaseProps *csp;
+#endif
+ const UCaseProps *ccsp;
+ UErrorCode errorCode;
+
+#if !HARDCODED_DATA_4497
+ /* coverage for ucase_openBinary() */
+ errorCode=U_ZERO_ERROR;
+ pData=udata_open(NULL, UCASE_DATA_TYPE, UCASE_DATA_NAME, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("unable to open " UCASE_DATA_NAME "." UCASE_DATA_TYPE ": %s\n",
+ u_errorName(errorCode));
+ return;
+ }
+
+ csp=ucase_openBinary((const uint8_t *)pData->pHeader, -1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucase_openBinary() fails for the contents of " UCASE_DATA_NAME "." UCASE_DATA_TYPE ": %s\n",
+ u_errorName(errorCode));
+ udata_close(pData);
+ return;
+ }
+
+ if(UCASE_LOWER!=ucase_getType(csp, 0xdf)) { /* verify islower(sharp s) */
+ log_err("ucase_openBinary() does not seem to return working UCaseProps\n");
+ }
+
+ ucase_close(csp);
+ udata_close(pData);
+#endif
+
+ /* coverage for ucase_getDummy() */
+ errorCode=U_ZERO_ERROR;
+ ccsp=ucase_getDummy(&errorCode);
+ if(ucase_tolower(ccsp, 0x41)!=0x41) {
+ log_err("ucase_tolower(dummy, A)!=A\n");
+ }
+}
+
+/* API coverage for ubidi_props.c */
+static void TestUBiDiProps() {
+#if !HARDCODED_DATA_4497
+ UDataMemory *pData;
+ UBiDiProps *bdp;
+#endif
+ const UBiDiProps *cbdp;
+ UErrorCode errorCode;
+
+#if !HARDCODED_DATA_4497
+ /* coverage for ubidi_openBinary() */
+ errorCode=U_ZERO_ERROR;
+ pData=udata_open(NULL, UBIDI_DATA_TYPE, UBIDI_DATA_NAME, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("unable to open " UBIDI_DATA_NAME "." UBIDI_DATA_TYPE ": %s\n",
+ u_errorName(errorCode));
+ return;
+ }
+
+ bdp=ubidi_openBinary((const uint8_t *)pData->pHeader, -1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ubidi_openBinary() fails for the contents of " UBIDI_DATA_NAME "." UBIDI_DATA_TYPE ": %s\n",
+ u_errorName(errorCode));
+ udata_close(pData);
+ return;
+ }
+
+ if(0x2215!=ubidi_getMirror(bdp, 0x29F5)) { /* verify some data */
+ log_err("ubidi_openBinary() does not seem to return working UBiDiProps\n");
+ }
+
+ ubidi_closeProps(bdp);
+ udata_close(pData);
+#endif
+
+ /* coverage for ubidi_getDummy() */
+ errorCode=U_ZERO_ERROR;
+ cbdp=ubidi_getDummy(&errorCode);
+ if(ubidi_getClass(cbdp, 0x20)!=0) {
+ log_err("ubidi_getClass(dummy, space)!=0\n");
+ }
+}
+
+/* test case folding, compare return values with CaseFolding.txt ------------ */
+
+/* bit set for which case foldings for a character have been tested already */
+enum {
+ CF_SIMPLE=1,
+ CF_FULL=2,
+ CF_TURKIC=4,
+ CF_ALL=7
+};
+
+static void
+testFold(UChar32 c, int which,
+ UChar32 simple, UChar32 turkic,
+ const UChar *full, int32_t fullLength,
+ const UChar *turkicFull, int32_t turkicFullLength) {
+ UChar s[2], t[32];
+ UChar32 c2;
+ int32_t length, length2;
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ length=0;
+ U16_APPEND_UNSAFE(s, length, c);
+
+ if((which&CF_SIMPLE)!=0 && (c2=u_foldCase(c, 0))!=simple) {
+ log_err("u_foldCase(U+%04lx, default)=U+%04lx != U+%04lx\n", (long)c, (long)c2, (long)simple);
+ }
+ if((which&CF_FULL)!=0) {
+ length2=u_strFoldCase(t, LENGTHOF(t), s, length, 0, &errorCode);
+ if(length2!=fullLength || 0!=u_memcmp(t, full, fullLength)) {
+ log_err("u_strFoldCase(U+%04lx, default) does not fold properly\n", (long)c);
+ }
+ }
+ if((which&CF_TURKIC)!=0) {
+ if((c2=u_foldCase(c, U_FOLD_CASE_EXCLUDE_SPECIAL_I))!=turkic) {
+ log_err("u_foldCase(U+%04lx, turkic)=U+%04lx != U+%04lx\n", (long)c, (long)c2, (long)simple);
+ }
+
+ length2=u_strFoldCase(t, LENGTHOF(t), s, length, U_FOLD_CASE_EXCLUDE_SPECIAL_I, &errorCode);
+ if(length2!=turkicFullLength || 0!=u_memcmp(t, turkicFull, length2)) {
+ log_err("u_strFoldCase(U+%04lx, turkic) does not fold properly\n", (long)c);
+ }
+ }
+}
+
+/* test that c case-folds to itself */
+static void
+testFoldToSelf(UChar32 c, int which) {
+ UChar s[2];
+ int32_t length;
+
+ length=0;
+ U16_APPEND_UNSAFE(s, length, c);
+ testFold(c, which, c, c, s, length, s, length);
+}
+
+struct CaseFoldingData {
+ USet *notSeen;
+ UChar32 prev, prevSimple;
+ UChar prevFull[32];
+ int32_t prevFullLength;
+ int which;
+};
+typedef struct CaseFoldingData CaseFoldingData;
+
+static void U_CALLCONV
+caseFoldingLineFn(void *context,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode) {
+ CaseFoldingData *pData=(CaseFoldingData *)context;
+ char *end;
+ UChar full[32];
+ UChar32 c, prev, simple;
+ int32_t count;
+ int which;
+ char status;
+
+ /* get code point */
+ c=(UChar32)strtoul(u_skipWhitespace(fields[0][0]), &end, 16);
+ end=(char *)u_skipWhitespace(end);
+ if(end<=fields[0][0] || end!=fields[0][1]) {
+ log_err("syntax error in CaseFolding.txt field 0 at %s\n", fields[0][0]);
+ *pErrorCode=U_PARSE_ERROR;
+ return;
+ }
+
+ /* get the status of this mapping */
+ status=*u_skipWhitespace(fields[1][0]);
+ if(status!='C' && status!='S' && status!='F' && status!='T') {
+ log_err("unrecognized status field in CaseFolding.txt at %s\n", fields[0][0]);
+ *pErrorCode=U_PARSE_ERROR;
+ return;
+ }
+
+ /* get the mapping */
+ count=u_parseString(fields[2][0], full, 32, (uint32_t *)&simple, pErrorCode);
+ if(U_FAILURE(*pErrorCode)) {
+ log_err("error parsing CaseFolding.txt mapping at %s\n", fields[0][0]);
+ return;
+ }
+
+ /* there is a simple mapping only if there is exactly one code point (count is in UChars) */
+ if(count==0 || count>2 || (count==2 && U16_IS_SINGLE(full[1]))) {
+ simple=c;
+ }
+
+ if(c!=(prev=pData->prev)) {
+ /*
+ * Test remaining mappings for the previous code point.
+ * If a turkic folding was not mentioned, then it should fold the same
+ * as the regular simple case folding.
+ */
+ UChar s[2];
+ int32_t length;
+
+ length=0;
+ U16_APPEND_UNSAFE(s, length, prev);
+ testFold(prev, (~pData->which)&CF_ALL,
+ prev, pData->prevSimple,
+ s, length,
+ pData->prevFull, pData->prevFullLength);
+ pData->prev=pData->prevSimple=c;
+ length=0;
+ U16_APPEND_UNSAFE(pData->prevFull, length, c);
+ pData->prevFullLength=length;
+ pData->which=0;
+ }
+
+ /*
+ * Turn the status into a bit set of case foldings to test.
+ * Remember non-Turkic case foldings as defaults for Turkic mode.
+ */
+ switch(status) {
+ case 'C':
+ which=CF_SIMPLE|CF_FULL;
+ pData->prevSimple=simple;
+ u_memcpy(pData->prevFull, full, count);
+ pData->prevFullLength=count;
+ break;
+ case 'S':
+ which=CF_SIMPLE;
+ pData->prevSimple=simple;
+ break;
+ case 'F':
+ which=CF_FULL;
+ u_memcpy(pData->prevFull, full, count);
+ pData->prevFullLength=count;
+ break;
+ case 'T':
+ which=CF_TURKIC;
+ break;
+ default:
+ which=0;
+ break; /* won't happen because of test above */
+ }
+
+ testFold(c, which, simple, simple, full, count, full, count);
+
+ /* remember which case foldings of c have been tested */
+ pData->which|=which;
+
+ /* remove c from the set of ones not mentioned in CaseFolding.txt */
+ uset_remove(pData->notSeen, c);
+}
+
+static void
+TestCaseFolding() {
+ CaseFoldingData data={ NULL };
+ char *fields[3][2];
+ UErrorCode errorCode;
+
+ static char *lastLine= (char *)"10FFFF; C; 10FFFF;";
+
+ errorCode=U_ZERO_ERROR;
+ /* test BMP & plane 1 - nothing interesting above */
+ data.notSeen=uset_open(0, 0x1ffff);
+ data.prevFullLength=1; /* length of full case folding of U+0000 */
+
+ parseUCDFile("CaseFolding.txt", fields, 3, caseFoldingLineFn, &data, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ int32_t i, start, end;
+
+ /* add a pseudo-last line to finish testing of the actual last one */
+ fields[0][0]=lastLine;
+ fields[0][1]=lastLine+6;
+ fields[1][0]=lastLine+7;
+ fields[1][1]=lastLine+9;
+ fields[2][0]=lastLine+10;
+ fields[2][1]=lastLine+17;
+ caseFoldingLineFn(&data, fields, 3, &errorCode);
+
+ /* verify that all code points that are not mentioned in CaseFolding.txt fold to themselves */
+ for(i=0;
+ 0==uset_getItem(data.notSeen, i, &start, &end, NULL, 0, &errorCode) &&
+ U_SUCCESS(errorCode);
+ ++i
+ ) {
+ do {
+ testFoldToSelf(start, CF_ALL);
+ } while(++start<=end);
+ }
+ }
+
+ uset_close(data.notSeen);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/currtest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/currtest.c
new file mode 100644
index 00000000000..adce0854037
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/currtest.c
@@ -0,0 +1,243 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2005-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+#include "unicode/unum.h"
+#include "unicode/ucurr.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "cstring.h"
+
+static void expectInList(const char *isoCurrency, uint32_t currencyType, UBool isExpected) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char *foundCurrency = NULL;
+ const char *currentCurrency;
+ UEnumeration *en = ucurr_openISOCurrencies(currencyType, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error: ucurr_openISOCurrencies returned %s\n", myErrorName(status));
+ return;
+ }
+
+ while ((currentCurrency = uenum_next(en, NULL, &status)) != NULL) {
+ if (strcmp(isoCurrency, currentCurrency) == 0) {
+ foundCurrency = currentCurrency;
+ break;
+ }
+ }
+
+ if ((foundCurrency != NULL) != isExpected) {
+ log_err("Error: could not find %s as expected. isExpected = %s type=0x%X\n",
+ isoCurrency, isExpected ? "TRUE" : "FALSE", currencyType);
+ }
+ uenum_close(en);
+}
+
+static void TestEnumList(void) {
+ expectInList("ADP", UCURR_ALL, TRUE); /* First in list */
+ expectInList("ZWD", UCURR_ALL, TRUE); /* Last in list */
+
+ expectInList("USD", UCURR_ALL, TRUE);
+ expectInList("USD", UCURR_COMMON, TRUE);
+ expectInList("USD", UCURR_UNCOMMON, FALSE);
+ expectInList("USD", UCURR_DEPRECATED, FALSE);
+ expectInList("USD", UCURR_NON_DEPRECATED, TRUE);
+ expectInList("USD", UCURR_COMMON|UCURR_DEPRECATED, FALSE);
+ expectInList("USD", UCURR_COMMON|UCURR_NON_DEPRECATED, TRUE);
+ expectInList("USD", UCURR_UNCOMMON|UCURR_DEPRECATED, FALSE);
+ expectInList("USD", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, FALSE);
+
+ expectInList("USN", UCURR_ALL, TRUE);
+ expectInList("USN", UCURR_COMMON, FALSE);
+ expectInList("USN", UCURR_UNCOMMON, TRUE);
+ expectInList("USN", UCURR_DEPRECATED, FALSE);
+ expectInList("USN", UCURR_NON_DEPRECATED, TRUE);
+ expectInList("USN", UCURR_COMMON|UCURR_DEPRECATED, FALSE);
+ expectInList("USN", UCURR_COMMON|UCURR_NON_DEPRECATED, FALSE);
+ expectInList("USN", UCURR_UNCOMMON|UCURR_DEPRECATED, FALSE);
+ expectInList("USN", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, TRUE);
+
+ expectInList("DEM", UCURR_ALL, TRUE);
+ expectInList("DEM", UCURR_COMMON, TRUE);
+ expectInList("DEM", UCURR_UNCOMMON, FALSE);
+ expectInList("DEM", UCURR_DEPRECATED, TRUE);
+ expectInList("DEM", UCURR_NON_DEPRECATED, FALSE);
+ expectInList("DEM", UCURR_COMMON|UCURR_DEPRECATED, TRUE);
+ expectInList("DEM", UCURR_COMMON|UCURR_NON_DEPRECATED, FALSE);
+ expectInList("DEM", UCURR_UNCOMMON|UCURR_DEPRECATED, FALSE);
+ expectInList("DEM", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, FALSE);
+
+ expectInList("XEU", UCURR_ALL, TRUE);
+ expectInList("XEU", UCURR_COMMON, FALSE);
+ expectInList("XEU", UCURR_UNCOMMON, TRUE);
+ expectInList("XEU", UCURR_DEPRECATED, TRUE);
+ expectInList("XEU", UCURR_NON_DEPRECATED, FALSE);
+ expectInList("XEU", UCURR_COMMON|UCURR_DEPRECATED, FALSE);
+ expectInList("XEU", UCURR_COMMON|UCURR_NON_DEPRECATED, FALSE);
+ expectInList("XEU", UCURR_UNCOMMON|UCURR_DEPRECATED, TRUE);
+ expectInList("XEU", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, FALSE);
+
+}
+
+static void TestEnumListReset(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char *currency1;
+ const char *currency2;
+ UEnumeration *en = ucurr_openISOCurrencies(UCURR_ALL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error: ucurr_openISOCurrencies returned %s\n", myErrorName(status));
+ return;
+ }
+
+ currency1 = uenum_next(en, NULL, &status);
+ uenum_reset(en, &status);
+ currency2 = uenum_next(en, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error: uenum_next or uenum_reset returned %s\n", myErrorName(status));
+ return;
+ }
+ /* The first item's pointer in the list should be the same between resets. */
+ if (currency1 != currency2) {
+ log_err("Error: reset doesn't work %s != %s\n", currency1, currency2);
+ }
+ uenum_close(en);
+}
+
+static int32_t checkItemCount(uint32_t currencyType) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t originalCount, count;
+ UEnumeration *en = ucurr_openISOCurrencies(currencyType, &status);
+ int32_t expectedLen = 3, len;
+ if (U_FAILURE(status)) {
+ log_err("Error: ucurr_openISOCurrencies returned %s\n", myErrorName(status));
+ return -1;
+ }
+
+ originalCount = uenum_count(en, &status);
+ for (count=0;;count++) {
+ const char *str = uenum_next(en, &len, &status);
+ if (str == NULL || len != expectedLen || strlen(str) != expectedLen) {
+ break;
+ }
+ }
+
+ if (originalCount != count) {
+ log_err("Error: uenum_count returned the wrong value (type = 0x%X). Got: %d Expected %d\n",
+ currencyType, count, originalCount);
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error: uenum_next got an error: %s\n", u_errorName(status));
+ }
+ uenum_close(en);
+ return count;
+}
+
+static void TestEnumListCount(void) {
+ checkItemCount(UCURR_ALL);
+ checkItemCount(UCURR_COMMON);
+ checkItemCount(UCURR_UNCOMMON);
+ checkItemCount(UCURR_DEPRECATED);
+ checkItemCount(UCURR_NON_DEPRECATED);
+ checkItemCount(UCURR_COMMON|UCURR_DEPRECATED);
+ checkItemCount(UCURR_COMMON|UCURR_NON_DEPRECATED);
+ checkItemCount(UCURR_UNCOMMON|UCURR_DEPRECATED);
+ checkItemCount(UCURR_UNCOMMON|UCURR_NON_DEPRECATED);
+
+ if (checkItemCount(UCURR_DEPRECATED|UCURR_NON_DEPRECATED) != 0) {
+ log_err("Error: UCURR_DEPRECATED|UCURR_NON_DEPRECATED should return 0 items\n");
+ }
+ if (checkItemCount(UCURR_COMMON|UCURR_UNCOMMON) != 0) {
+ log_err("Error: UCURR_DEPRECATED|UCURR_NON_DEPRECATED should return 0 items\n");
+ }
+}
+
+static void TestFractionDigitOverride(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UNumberFormat *fmt = unum_open(UNUM_CURRENCY, NULL, 0, "hu_HU", NULL, &status);
+ UChar buffer[256];
+ UChar expectedBuf[256];
+ const char expectedFirst[] = "123,46 Ft";
+ const char expectedSecond[] = "123 Ft";
+ const char expectedThird[] = "123,456 Ft";
+ if (U_FAILURE(status)) {
+ log_err("Error: unum_open returned %s\n", myErrorName(status));
+ return;
+ }
+ /* Make sure that you can format normal fraction digits. */
+ unum_formatDouble(fmt, 123.456, buffer, sizeof(buffer)/sizeof(buffer[0]), NULL, &status);
+ u_charsToUChars(expectedFirst, expectedBuf, strlen(expectedFirst)+1);
+ if (u_strcmp(buffer, expectedBuf) != 0) {
+ log_err("Error: unum_formatDouble didn't return %s\n", expectedFirst);
+ }
+ /* Make sure that you can format no fraction digits. */
+ unum_setAttribute(fmt, UNUM_FRACTION_DIGITS, 0);
+ unum_formatDouble(fmt, 123.456, buffer, sizeof(buffer)/sizeof(buffer[0]), NULL, &status);
+ u_charsToUChars(expectedSecond, expectedBuf, strlen(expectedSecond)+1);
+ if (u_strcmp(buffer, expectedBuf) != 0) {
+ log_err("Error: unum_formatDouble didn't return %s\n", expectedSecond);
+ }
+ /* Make sure that you can format more fraction digits. */
+ unum_setAttribute(fmt, UNUM_FRACTION_DIGITS, 3);
+ unum_formatDouble(fmt, 123.456, buffer, sizeof(buffer)/sizeof(buffer[0]), NULL, &status);
+ u_charsToUChars(expectedThird, expectedBuf, strlen(expectedThird)+1);
+ if (u_strcmp(buffer, expectedBuf) != 0) {
+ log_err("Error: unum_formatDouble didn't return %s\n", expectedThird);
+ }
+ unum_close(fmt);
+}
+
+static void TestPrefixSuffix(void) {
+ int32_t pos;
+ UErrorCode status;
+ double result1 = 0.0, result2 = 0.0;
+ UNumberFormat* parser;
+ UChar buffer[4];
+ static const UChar TEST_NUMBER[] = {0x0024,0x0031,0x0032,0x002E,0x0030,0x0030,0}; /* $12.00 */
+ static const UChar NEG_PREFIX[] = {0x005B,0}; /* "[" */
+ static const UChar NEG_SUFFIX[] = {0x005D,0}; /* "]" */
+
+
+ status = U_ZERO_ERROR;
+ parser = unum_open(UNUM_CURRENCY, NULL, -1, "en_US", NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error: unum_open returned %s\n", u_errorName(status));
+ return;
+ }
+
+ pos = 0;
+ status = U_ZERO_ERROR;
+ result1 = unum_parseDoubleCurrency(parser, TEST_NUMBER, -1, &pos, buffer, &status);
+
+ unum_setTextAttribute(parser, UNUM_NEGATIVE_SUFFIX, NEG_SUFFIX, -1, &status);
+ unum_setTextAttribute(parser, UNUM_NEGATIVE_PREFIX, NEG_PREFIX, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error: unum_setTextAttribute returned %s\n", u_errorName(status));
+ return;
+ }
+
+ pos = 0;
+ result2 = unum_parseDoubleCurrency(parser, TEST_NUMBER, -1, &pos, buffer, &status);
+ if (result1 != result2 || U_FAILURE(status)) {
+ log_err("Error: unum_parseDoubleCurrency didn't return the same value for same string %f %f %s\n",
+ result1, result2, u_errorName(status));
+ }
+ unum_close(parser);
+}
+
+void addCurrencyTest(TestNode** root);
+
+#define TESTCASE(x) addTest(root, &x, "tsformat/currtest/" #x)
+
+void addCurrencyTest(TestNode** root)
+{
+ TESTCASE(TestEnumList);
+ TESTCASE(TestEnumListReset);
+ TESTCASE(TestEnumListCount);
+ TESTCASE(TestFractionDigitOverride);
+ TESTCASE(TestPrefixSuffix);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/custrtrn.c b/Build/source/libs/icu/icu-xetex/test/cintltst/custrtrn.c
new file mode 100644
index 00000000000..90cc00ae5c4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/custrtrn.c
@@ -0,0 +1,1185 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File custrtrn.C
+*
+* Modification History:
+* Name Description
+* Ram String transformations test
+*********************************************************************************
+*/
+/****************************************************************************/
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "unicode/ures.h"
+#include "ustr_imp.h"
+#include "cintltst.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "cwchar.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+void addUCharTransformTest(TestNode** root);
+
+static void Test_UChar_UTF32_API(void);
+static void Test_UChar_UTF8_API(void);
+static void Test_FromUTF8Lenient(void);
+static void Test_UChar_WCHART_API(void);
+static void Test_widestrs(void);
+static void Test_WCHART_LongString(void);
+
+void
+addUCharTransformTest(TestNode** root)
+{
+ addTest(root, &Test_UChar_UTF32_API, "custrtrn/Test_UChar_UTF32_API");
+ addTest(root, &Test_UChar_UTF8_API, "custrtrn/Test_UChar_UTF8_API");
+ addTest(root, &Test_FromUTF8Lenient, "custrtrn/Test_FromUTF8Lenient");
+ addTest(root, &Test_UChar_WCHART_API, "custrtrn/Test_UChar_WCHART_API");
+ addTest(root, &Test_widestrs, "custrtrn/Test_widestrs");
+ addTest(root, &Test_WCHART_LongString, "custrtrn/Test_WCHART_LongString");
+}
+
+static const UChar32 src32[]={
+ 0x00A8, 0x3003, 0x3005, 0x2015, 0xFF5E, 0x2016, 0x2026, 0x2018, 0x000D, 0x000A,
+ 0x2019, 0x201C, 0x201D, 0x3014, 0x3015, 0x3008, 0x3009, 0x300A, 0x000D, 0x000A,
+ 0x300B, 0x300C, 0x300D, 0x300E, 0x300F, 0x3016, 0x3017, 0x3010, 0x000D, 0x000A,
+ 0x3011, 0x00B1, 0x00D7, 0x00F7, 0x2236, 0x2227, 0x7FC1, 0x8956, 0x000D, 0x000A,
+ 0x9D2C, 0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104, 0x5C4B, 0x000D, 0x000A,
+ 0x61B6, 0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378, 0x57F7, 0x000D, 0x000A,
+ 0x57F4, 0x57F9, 0x57FA, 0x57FC, 0x5800, 0x5802, 0x5805, 0x5806, 0x000D, 0x000A,
+ 0x580A, 0x581E, 0x6BB5, 0x6BB7, 0x6BBA, 0x6BBC, 0x9CE2, 0x977C, 0x000D, 0x000A,
+ 0x6BBF, 0x6BC1, 0x6BC5, 0x6BC6, 0x6BCB, 0x6BCD, 0x6BCF, 0x6BD2, 0x000D, 0x000A,
+ 0x6BD3, 0x6BD4, 0x6BD6, 0x6BD7, 0x6BD8, 0x6BDB, 0x6BEB, 0x6BEC, 0x000D, 0x000A,
+ 0x6C05, 0x6C08, 0x6C0F, 0x6C11, 0x6C13, 0x6C23, 0x6C34, 0x0041, 0x000D, 0x000A,
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x005B, 0x9792, 0x9CCC, 0x9CCD, 0x9CCE, 0x9CCF, 0x9CD0, 0x9CD3, 0x000D, 0x000A,
+ 0x9CD4, 0x9CD5, 0x9CD7, 0x9CD8, 0x9CD9, 0x9CDC, 0x9CDD, 0x9CDF, 0x000D, 0x000A,
+ 0x9785, 0x9791, 0x00BD, 0x0390, 0x0385, 0x0386, 0x0388, 0x0389, 0x000D, 0x000A,
+ 0x038E, 0x038F, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x000D, 0x000A,
+ 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x038A, 0x038C, 0x039C, 0x000D, 0x000A,
+ /* test non-BMP code points */
+ 0x0002A699,
+ 0x0002A69C, 0x0002A69D, 0x0002A69E, 0x0002A69F, 0x0002A6A0, 0x0002A6A5, 0x0002A6A6, 0x0002A6A7, 0x0002A6A8, 0x0002A6AB,
+ 0x0002A6AC, 0x0002A6AD, 0x0002A6AE, 0x0002A6AF, 0x0002A6B0, 0x0002A6B1, 0x0002A6B3, 0x0002A6B5, 0x0002A6B6, 0x0002A6B7,
+ 0x0002A6B8, 0x0002A6B9, 0x0002A6BA, 0x0002A6BB, 0x0002A6BC, 0x0002A6BD, 0x0002A6BE, 0x0002A6BF, 0x0002A6C0, 0x0002A6C1,
+ 0x0002A6C2, 0x0002A6C3, 0x0002A6C4, 0x0002A6C8, 0x0002A6CA, 0x0002A6CB, 0x0002A6CD, 0x0002A6CE, 0x0002A6CF, 0x0002A6D0,
+ 0x0002A6D1, 0x0002A6D2, 0x0002A6D3, 0x0002A6D4, 0x0002A6D5,
+
+ 0x4DB3, 0x4DB4, 0x4DB5, 0x4E00, 0x4E00, 0x4E01, 0x4E02, 0x4E03, 0x000D, 0x000A,
+ 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x33E0, 0x33E6, 0x000D, 0x000A,
+ 0x4E05, 0x4E07, 0x4E04, 0x4E08, 0x4E08, 0x4E09, 0x4E0A, 0x4E0B, 0x000D, 0x000A,
+ 0x4E0C, 0x0021, 0x0022, 0x0023, 0x0024, 0xFF40, 0xFF41, 0xFF42, 0x000D, 0x000A,
+ 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0x000D, 0x000A,0x0000
+};
+
+static const UChar src16[] = {
+ 0x00A8, 0x3003, 0x3005, 0x2015, 0xFF5E, 0x2016, 0x2026, 0x2018, 0x000D, 0x000A,
+ 0x2019, 0x201C, 0x201D, 0x3014, 0x3015, 0x3008, 0x3009, 0x300A, 0x000D, 0x000A,
+ 0x300B, 0x300C, 0x300D, 0x300E, 0x300F, 0x3016, 0x3017, 0x3010, 0x000D, 0x000A,
+ 0x3011, 0x00B1, 0x00D7, 0x00F7, 0x2236, 0x2227, 0x7FC1, 0x8956, 0x000D, 0x000A,
+ 0x9D2C, 0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104, 0x5C4B, 0x000D, 0x000A,
+ 0x61B6, 0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378, 0x57F7, 0x000D, 0x000A,
+ 0x57F4, 0x57F9, 0x57FA, 0x57FC, 0x5800, 0x5802, 0x5805, 0x5806, 0x000D, 0x000A,
+ 0x580A, 0x581E, 0x6BB5, 0x6BB7, 0x6BBA, 0x6BBC, 0x9CE2, 0x977C, 0x000D, 0x000A,
+ 0x6BBF, 0x6BC1, 0x6BC5, 0x6BC6, 0x6BCB, 0x6BCD, 0x6BCF, 0x6BD2, 0x000D, 0x000A,
+ 0x6BD3, 0x6BD4, 0x6BD6, 0x6BD7, 0x6BD8, 0x6BDB, 0x6BEB, 0x6BEC, 0x000D, 0x000A,
+ 0x6C05, 0x6C08, 0x6C0F, 0x6C11, 0x6C13, 0x6C23, 0x6C34, 0x0041, 0x000D, 0x000A,
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x005B, 0x9792, 0x9CCC, 0x9CCD, 0x9CCE, 0x9CCF, 0x9CD0, 0x9CD3, 0x000D, 0x000A,
+ 0x9CD4, 0x9CD5, 0x9CD7, 0x9CD8, 0x9CD9, 0x9CDC, 0x9CDD, 0x9CDF, 0x000D, 0x000A,
+ 0x9785, 0x9791, 0x00BD, 0x0390, 0x0385, 0x0386, 0x0388, 0x0389, 0x000D, 0x000A,
+ 0x038E, 0x038F, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x000D, 0x000A,
+ 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x038A, 0x038C, 0x039C, 0x000D, 0x000A,
+
+ /* test non-BMP code points */
+ 0xD869, 0xDE99, 0xD869, 0xDE9C, 0xD869, 0xDE9D, 0xD869, 0xDE9E, 0xD869, 0xDE9F,
+ 0xD869, 0xDEA0, 0xD869, 0xDEA5, 0xD869, 0xDEA6, 0xD869, 0xDEA7, 0xD869, 0xDEA8,
+ 0xD869, 0xDEAB, 0xD869, 0xDEAC, 0xD869, 0xDEAD, 0xD869, 0xDEAE, 0xD869, 0xDEAF,
+ 0xD869, 0xDEB0, 0xD869, 0xDEB1, 0xD869, 0xDEB3, 0xD869, 0xDEB5, 0xD869, 0xDEB6,
+ 0xD869, 0xDEB7, 0xD869, 0xDEB8, 0xD869, 0xDEB9, 0xD869, 0xDEBA, 0xD869, 0xDEBB,
+ 0xD869, 0xDEBC, 0xD869, 0xDEBD, 0xD869, 0xDEBE, 0xD869, 0xDEBF, 0xD869, 0xDEC0,
+ 0xD869, 0xDEC1, 0xD869, 0xDEC2, 0xD869, 0xDEC3, 0xD869, 0xDEC4, 0xD869, 0xDEC8,
+ 0xD869, 0xDECA, 0xD869, 0xDECB, 0xD869, 0xDECD, 0xD869, 0xDECE, 0xD869, 0xDECF,
+ 0xD869, 0xDED0, 0xD869, 0xDED1, 0xD869, 0xDED2, 0xD869, 0xDED3, 0xD869, 0xDED4,
+ 0xD869, 0xDED5,
+
+ 0x4DB3, 0x4DB4, 0x4DB5, 0x4E00, 0x4E00, 0x4E01, 0x4E02, 0x4E03, 0x000D, 0x000A,
+ 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x33E0, 0x33E6, 0x000D, 0x000A,
+ 0x4E05, 0x4E07, 0x4E04, 0x4E08, 0x4E08, 0x4E09, 0x4E0A, 0x4E0B, 0x000D, 0x000A,
+ 0x4E0C, 0x0021, 0x0022, 0x0023, 0x0024, 0xFF40, 0xFF41, 0xFF42, 0x000D, 0x000A,
+ 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0x000D, 0x000A,0x0000
+};
+
+
+static void Test_UChar_UTF32_API(void){
+
+ UErrorCode err = U_ZERO_ERROR;
+ UChar uTemp[1];
+ UChar32 u32Temp[1];
+ UChar* uTarget=uTemp;
+ const UChar32* u32Src = src32;
+ int32_t u32SrcLen = sizeof(src32)/4;
+ int32_t uTargetLength = 0;
+ int32_t uDestLen=0;
+ const UChar* uSrc = src16;
+ int32_t uSrcLen = sizeof(src16)/2;
+ UChar32* u32Target = u32Temp;
+ uint32_t u32TargetLength =0;
+ int32_t u32DestLen =0;
+ UBool failed = FALSE;
+ int i= 0;
+ {
+ /* preflight */
+ u_strToUTF32(u32Target,u32TargetLength, &u32DestLen, uSrc, uSrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err = U_ZERO_ERROR;
+ u32Target = (UChar32*) malloc (sizeof(uint32_t) * (u32DestLen+1));
+ u32TargetLength = u32DestLen+1;
+
+ u_strToUTF32(u32Target,u32TargetLength, &u32DestLen, uSrc, uSrcLen,&err);
+ }
+ else {
+ log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR");
+ }
+ failed = FALSE;
+ /*for(i=0; i< u32DestLen; i++){
+ printf("0x%08X, ",uTarget[i]);
+ if(i%10==0){
+ printf("\n");
+ }
+ }*/
+ for(i=0; i< u32SrcLen; i++){
+ if(u32Target[i] != src32[i]){
+ log_verbose("u_strToUTF32() failed expected: \\U%08X got: \\U%08X at index: %i \n", src32[i], u32Target[i],i);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("u_strToUTF32() failed \n");
+ }
+
+ /* preflight */
+ u_strFromUTF32(uTarget,uTargetLength,&uDestLen,u32Src,u32SrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err = U_ZERO_ERROR;
+ uTarget = (UChar*) malloc( sizeof(UChar) * (uDestLen+1));
+ uTargetLength = uDestLen+1;
+ u_strFromUTF32(uTarget,uTargetLength,&uDestLen,u32Src,u32SrcLen,&err);
+
+ }
+ /*for(i=0; i< uDestLen; i++){
+ printf("0x%04X, ",uTarget[i]);
+ if(i%10==0){
+ printf("\n");
+ }
+ }*/
+
+ for(i=0; i< uDestLen; i++){
+ if(uTarget[i] != src16[i]){
+ log_verbose("u_strFromUTF32() failed expected: \\U%08X got: \\U%08X at index: %i \n", src16[i] ,uTarget[i],i);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("u_strToUTF32() failed \n");
+ }
+
+ free(u32Target);
+ free(uTarget);
+ }
+ {
+ u32SrcLen = -1;
+ uTargetLength = 0;
+ uSrcLen =-1;
+ u32TargetLength=0;
+ failed = FALSE;
+
+ /* preflight */
+ u_strToUTF32(NULL,u32TargetLength, &u32DestLen, uSrc, uSrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err = U_ZERO_ERROR;
+ u32Target = (UChar32*) malloc (sizeof(uint32_t) * (u32DestLen+1));
+ u32TargetLength = u32DestLen+1;
+
+ u_strToUTF32(u32Target,u32TargetLength, &u32DestLen, uSrc, uSrcLen,&err);
+ }
+ else {
+ log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR");
+ }
+ failed = FALSE;
+
+ for(i=0; i< u32SrcLen; i++){
+ if(u32Target[i] != src32[i]){
+ log_verbose("u_strToUTF32() failed expected: \\U%08X got: \\U%08X \n", src32[i], u32Target[i]);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("u_strToUTF32() failed \n");
+ }
+
+ /* preflight */
+ u_strFromUTF32(NULL,uTargetLength,&uDestLen,u32Src,u32SrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err = U_ZERO_ERROR;
+ uTarget = (UChar*) malloc( sizeof(UChar) * (uDestLen+1));
+ uTargetLength = uDestLen+1;
+ u_strFromUTF32(uTarget,uTargetLength,&uDestLen,u32Src,u32SrcLen,&err);
+
+ }
+
+ for(i=0; i< uDestLen; i++){
+ if(uTarget[i] != src16[i]){
+ log_verbose("u_strFromUTF32() failed expected: \\U%08X got: \\U%08X \n", src16[i] ,uTarget[i]);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("u_strToUTF32() failed \n");
+ }
+
+ free(u32Target);
+ free(uTarget);
+ }
+}
+
+
+static void Test_UChar_UTF8_API(void){
+
+ UErrorCode err = U_ZERO_ERROR;
+ UChar uTemp[1];
+ char u8Temp[1];
+ UChar* uTarget=uTemp;
+ const char* u8Src;
+ int32_t u8SrcLen = 0;
+ int32_t uTargetLength = 0;
+ int32_t uDestLen=0;
+ const UChar* uSrc = src16;
+ int32_t uSrcLen = sizeof(src16)/2;
+ char* u8Target = u8Temp;
+ int32_t u8TargetLength =0;
+ int32_t u8DestLen =0;
+ UBool failed = FALSE;
+ int i= 0;
+ int32_t numSubstitutions;
+
+ {
+ /* preflight */
+ u8Temp[0] = 0x12;
+ u_strToUTF8(u8Target,u8TargetLength, &u8DestLen, uSrc, uSrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR && u8Temp[0] == 0x12){
+ err = U_ZERO_ERROR;
+ u8Target = (char*) malloc (sizeof(uint8_t) * (u8DestLen+1));
+ u8TargetLength = u8DestLen;
+
+ u8Target[u8TargetLength] = (char)0xfe;
+ u8DestLen = -1;
+ u_strToUTF8(u8Target,u8TargetLength, &u8DestLen, uSrc, uSrcLen,&err);
+ if(U_FAILURE(err) || u8DestLen != u8TargetLength || u8Target[u8TargetLength] != (char)0xfe){
+ log_err("u_strToUTF8 failed after preflight. Error: %s\n", u_errorName(err));
+ return;
+ }
+
+ }
+ else {
+ log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR");
+ }
+ failed = FALSE;
+ /*for(i=0; i< u8DestLen; i++){
+ printf("0x%04X, ",u8Target[i]);
+ if(i%10==0){
+ printf("\n");
+ }
+ }*/
+ /*for(i=0; i< u8DestLen; i++){
+ if(u8Target[i] != src8[i]){
+ log_verbose("u_strToUTF8() failed expected: \\U%08X got: \\U%08X \n", src8[i], u8Target[i]);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("u_strToUTF8() failed \n");
+ }*/
+ u8Src = u8Target;
+ u8SrcLen = u8DestLen;
+
+ /* preflight */
+ uTemp[0] = 0x1234;
+ u_strFromUTF8(uTarget,uTargetLength,&uDestLen,u8Src,u8SrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR && uTemp[0] == 0x1234){
+ err = U_ZERO_ERROR;
+ uTarget = (UChar*) malloc( sizeof(UChar) * (uDestLen+1));
+ uTargetLength = uDestLen;
+
+ uTarget[uTargetLength] = 0xfff0;
+ uDestLen = -1;
+ u_strFromUTF8(uTarget,uTargetLength,&uDestLen,u8Src,u8SrcLen,&err);
+ }
+ else {
+ log_err("error: u_strFromUTF8(preflight) should have gotten U_BUFFER_OVERFLOW_ERROR\n");
+ }
+ /*for(i=0; i< uDestLen; i++){
+ printf("0x%04X, ",uTarget[i]);
+ if(i%10==0){
+ printf("\n");
+ }
+ }*/
+
+ if(U_FAILURE(err) || uDestLen != uTargetLength || uTarget[uTargetLength] != 0xfff0) {
+ failed = TRUE;
+ }
+ for(i=0; i< uSrcLen; i++){
+ if(uTarget[i] != src16[i]){
+ log_verbose("u_strFromUTF8() failed expected: \\u%04X got: \\u%04X at index: %i \n", src16[i] ,uTarget[i],i);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("error: u_strFromUTF8(after preflighting) failed\n");
+ }
+
+ free(u8Target);
+ free(uTarget);
+ }
+ {
+ u8SrcLen = -1;
+ uTargetLength = 0;
+ uSrcLen =-1;
+ u8TargetLength=0;
+ failed = FALSE;
+ /* preflight */
+ u_strToUTF8(NULL,u8TargetLength, &u8DestLen, uSrc, uSrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err = U_ZERO_ERROR;
+ u8Target = (char*) malloc (sizeof(uint8_t) * (u8DestLen+1));
+ u8TargetLength = u8DestLen;
+
+ u_strToUTF8(u8Target,u8TargetLength, &u8DestLen, uSrc, uSrcLen,&err);
+
+ }
+ else {
+ log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR");
+ }
+ failed = FALSE;
+ /*for(i=0; i< u8DestLen; i++){
+ printf("0x%04X, ",u8Target[i]);
+ if(i%10==0){
+ printf("\n");
+ }
+ }*/
+ /*for(i=0; i< u8DestLen; i++){
+ if(u8Target[i] != src8[i]){
+ log_verbose("u_strToUTF8() failed expected: \\U%08X got: \\U%08X \n", src8[i], u8Target[i]);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("u_strToUTF8() failed \n");
+ }*/
+ u8Src = u8Target;
+ u8SrcLen = u8DestLen;
+
+ /* preflight */
+ u_strFromUTF8(NULL,uTargetLength,&uDestLen,u8Src,u8SrcLen,&err);
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err = U_ZERO_ERROR;
+ uTarget = (UChar*) malloc( sizeof(UChar) * (uDestLen+1));
+ uTargetLength = uDestLen;
+
+ u_strFromUTF8(uTarget,uTargetLength,&uDestLen,u8Src,u8SrcLen,&err);
+ }
+ else {
+ log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR");
+ }
+ /*for(i=0; i< uDestLen; i++){
+ printf("0x%04X, ",uTarget[i]);
+ if(i%10==0){
+ printf("\n");
+ }
+ }*/
+
+ for(i=0; i< uSrcLen; i++){
+ if(uTarget[i] != src16[i]){
+ log_verbose("u_strFromUTF8() failed expected: \\u%04X got: \\u%04X at index: %i \n", src16[i] ,uTarget[i],i);
+ failed =TRUE;
+ }
+ }
+ if(failed){
+ log_err("u_strToUTF8() failed \n");
+ }
+
+ free(u8Target);
+ free(uTarget);
+ }
+
+ /* test UTF-8 with single surrogates - illegal in Unicode 3.2 */
+ {
+ static const UChar
+ withLead16[]={ 0x1800, 0xd89a, 0x0061 },
+ withTrail16[]={ 0x1800, 0xdcba, 0x0061, 0 },
+ withTrail16SubFFFD[]={ 0x1800, 0xfffd, 0x0061, 0 }, /* sub==U+FFFD */
+ withTrail16Sub50005[]={ 0x1800, 0xd900, 0xdc05, 0x0061, 0 }; /* sub==U+50005 */
+ static const uint8_t
+ withLead8[]={ 0xe1, 0xa0, 0x80, 0xed, 0xa2, 0x9a, 0x61 },
+ withTrail8[]={ 0xe1, 0xa0, 0x80, 0xed, 0xb2, 0xba, 0x61, 0 },
+ withTrail8Sub1A[]={ 0xe1, 0xa0, 0x80, 0x1a, 0x61, 0 }, /* sub==U+001A */
+ withTrail8SubFFFD[]={ 0xe1, 0xa0, 0x80, 0xef, 0xbf, 0xbd, 0x61, 0 }; /* sub==U+FFFD */
+ UChar out16[10];
+ char out8[10];
+
+ if(
+ (err=U_ZERO_ERROR, u_strToUTF8(out8, LENGTHOF(out8), NULL, withLead16, LENGTHOF(withLead16), &err), err!=U_INVALID_CHAR_FOUND) ||
+ (err=U_ZERO_ERROR, u_strToUTF8(out8, LENGTHOF(out8), NULL, withTrail16, -1, &err), err!=U_INVALID_CHAR_FOUND) ||
+ (err=U_ZERO_ERROR, u_strFromUTF8(out16, LENGTHOF(out16), NULL, (const char *)withLead8, LENGTHOF(withLead8), &err), err!=U_INVALID_CHAR_FOUND) ||
+ (err=U_ZERO_ERROR, u_strFromUTF8(out16, LENGTHOF(out16), NULL, (const char *)withTrail8, -1, &err), err!=U_INVALID_CHAR_FOUND)
+ ) {
+ log_err("error: u_strTo/FromUTF8(string with single surrogate) fails to report error\n");
+ }
+
+ /* test error handling with substitution characters */
+
+ /* from UTF-8 with length */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out16[0]=0x55aa;
+ uDestLen=0;
+ u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen,
+ (const char *)withTrail8, uprv_strlen((const char *)withTrail8),
+ 0x50005, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || uDestLen!=u_strlen(withTrail16Sub50005) ||
+ 0!=u_memcmp(withTrail16Sub50005, out16, uDestLen+1) ||
+ numSubstitutions!=1) {
+ log_err("error: u_strFromUTF8WithSub(length) failed\n");
+ }
+
+ /* from UTF-8 with NUL termination */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out16[0]=0x55aa;
+ uDestLen=0;
+ u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen,
+ (const char *)withTrail8, -1,
+ 0xfffd, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || uDestLen!=u_strlen(withTrail16SubFFFD) ||
+ 0!=u_memcmp(withTrail16SubFFFD, out16, uDestLen+1) ||
+ numSubstitutions!=1) {
+ log_err("error: u_strFromUTF8WithSub(NUL termination) failed\n");
+ }
+
+ /* preflight from UTF-8 with NUL termination */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out16[0]=0x55aa;
+ uDestLen=0;
+ u_strFromUTF8WithSub(out16, 1, &uDestLen,
+ (const char *)withTrail8, -1,
+ 0x50005, &numSubstitutions,
+ &err);
+ if(err!=U_BUFFER_OVERFLOW_ERROR || uDestLen!=u_strlen(withTrail16Sub50005) || numSubstitutions!=1) {
+ log_err("error: u_strFromUTF8WithSub(preflight/NUL termination) failed\n");
+ }
+
+ /* to UTF-8 with length */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out8[0]=(char)0xf5;
+ u8DestLen=0;
+ u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen,
+ withTrail16, u_strlen(withTrail16),
+ 0xfffd, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || u8DestLen!=uprv_strlen((const char *)withTrail8SubFFFD) ||
+ 0!=uprv_memcmp((const char *)withTrail8SubFFFD, out8, u8DestLen+1) ||
+ numSubstitutions!=1) {
+ log_err("error: u_strToUTF8WithSub(length) failed\n");
+ }
+
+ /* to UTF-8 with NUL termination */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out8[0]=(char)0xf5;
+ u8DestLen=0;
+ u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen,
+ withTrail16, -1,
+ 0x1a, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || u8DestLen!=uprv_strlen((const char *)withTrail8Sub1A) ||
+ 0!=uprv_memcmp((const char *)withTrail8Sub1A, out8, u8DestLen+1) ||
+ numSubstitutions!=1) {
+ log_err("error: u_strToUTF8WithSub(NUL termination) failed\n");
+ }
+
+ /* preflight to UTF-8 with NUL termination */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out8[0]=(char)0xf5;
+ u8DestLen=0;
+ u_strToUTF8WithSub(out8, 1, &u8DestLen,
+ withTrail16, -1,
+ 0xfffd, &numSubstitutions,
+ &err);
+ if(err!=U_BUFFER_OVERFLOW_ERROR || u8DestLen!=uprv_strlen((const char *)withTrail8SubFFFD) ||
+ numSubstitutions!=1) {
+ log_err("error: u_strToUTF8WithSub(preflight/NUL termination) failed\n");
+ }
+
+ /* test that numSubstitutions==0 if there are no substitutions */
+
+ /* from UTF-8 with length (just first 3 bytes which are valid) */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out16[0]=0x55aa;
+ uDestLen=0;
+ u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen,
+ (const char *)withTrail8, 3,
+ 0x50005, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || uDestLen!=1 ||
+ 0!=u_memcmp(withTrail16Sub50005, out16, uDestLen) ||
+ numSubstitutions!=0) {
+ log_err("error: u_strFromUTF8WithSub(no subs) failed\n");
+ }
+
+ /* to UTF-8 with length (just first UChar which is valid) */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out8[0]=(char)0xf5;
+ u8DestLen=0;
+ u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen,
+ withTrail16, 1,
+ 0xfffd, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || u8DestLen!=3 ||
+ 0!=uprv_memcmp((const char *)withTrail8SubFFFD, out8, u8DestLen) ||
+ numSubstitutions!=0) {
+ log_err("error: u_strToUTF8WithSub(no subs) failed\n");
+ }
+
+ /* test that numSubstitutions==0 if subchar==U_SENTINEL (no subchar) */
+
+ /* from UTF-8 with length (just first 3 bytes which are valid) */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out16[0]=0x55aa;
+ uDestLen=0;
+ u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen,
+ (const char *)withTrail8, 3,
+ U_SENTINEL, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || uDestLen!=1 ||
+ 0!=u_memcmp(withTrail16Sub50005, out16, uDestLen) ||
+ numSubstitutions!=0) {
+ log_err("error: u_strFromUTF8WithSub(no subchar) failed\n");
+ }
+
+ /* to UTF-8 with length (just first UChar which is valid) */
+ err=U_ZERO_ERROR;
+ numSubstitutions=-1;
+ out8[0]=(char)0xf5;
+ u8DestLen=0;
+ u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen,
+ withTrail16, 1,
+ U_SENTINEL, &numSubstitutions,
+ &err);
+ if(U_FAILURE(err) || u8DestLen!=3 ||
+ 0!=uprv_memcmp((const char *)withTrail8SubFFFD, out8, u8DestLen) ||
+ numSubstitutions!=0) {
+ log_err("error: u_strToUTF8WithSub(no subchar) failed\n");
+ }
+ }
+}
+
+/* compare if two strings are equal, but match 0xfffd in the second string with anything in the first */
+static UBool
+equalAnyFFFD(const UChar *s, const UChar *t, int32_t length) {
+ UChar c1, c2;
+
+ while(length>0) {
+ c1=*s++;
+ c2=*t++;
+ if(c1!=c2 && c2!=0xfffd) {
+ return FALSE;
+ }
+ --length;
+ }
+ return TRUE;
+}
+
+/* test u_strFromUTF8Lenient() */
+static void
+Test_FromUTF8Lenient(void) {
+ /*
+ * Multiple input strings, each NUL-terminated.
+ * Terminate with a string starting with 0xff.
+ */
+ static const uint8_t bytes[]={
+ /* well-formed UTF-8 */
+ 0x61, 0xc3, 0x9f, 0xe0, 0xa0, 0x80, 0xf0, 0xa0, 0x80, 0x80,
+ 0x62, 0xc3, 0xa0, 0xe0, 0xa0, 0x81, 0xf0, 0xa0, 0x80, 0x81, 0,
+
+ /* various malformed sequences */
+ 0xc3, 0xc3, 0x9f, 0xc3, 0xa0, 0xe0, 0x80, 0x8a, 0xf0, 0x41, 0x42, 0x43, 0,
+
+ /* truncated input */
+ 0xc3, 0,
+ 0xe0, 0,
+ 0xe0, 0xa0, 0,
+ 0xf0, 0,
+ 0xf0, 0x90, 0,
+ 0xf0, 0x90, 0x80, 0,
+
+ /* non-ASCII characters in the last few bytes */
+ 0x61, 0xc3, 0x9f, 0xe0, 0xa0, 0x80, 0,
+ 0x61, 0xe0, 0xa0, 0x80, 0xc3, 0x9f, 0,
+
+ /* empty string */
+ 0,
+
+ /* finish */
+ 0xff, 0
+ };
+
+ /* Multiple output strings, each NUL-terminated. 0xfffd matches anything. */
+ static const UChar uchars[]={
+ 0x61, 0xdf, 0x800, 0xd840, 0xdc00,
+ 0x62, 0xe0, 0x801, 0xd840, 0xdc01, 0,
+
+ 0xfffd, 0x9f, 0xe0, 0xa, 0xfffd, 0xfffd, 0,
+
+ 0xfffd, 0,
+ 0xfffd, 0,
+ 0xfffd, 0,
+ 0xfffd, 0,
+ 0xfffd, 0,
+ 0xfffd, 0,
+
+ 0x61, 0xdf, 0x800, 0,
+ 0x61, 0x800, 0xdf, 0,
+
+ 0,
+
+ 0
+ };
+
+ UChar dest[64];
+ const char *pb;
+ const UChar *pu, *pDest;
+ int32_t srcLength, destLength0, destLength;
+ int number;
+ UErrorCode errorCode;
+
+ /* verify checking for some illegal arguments */
+ dest[0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, 1, &destLength, NULL, -1, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || dest[0]!=0x1234) {
+ log_err("u_strFromUTF8Lenient(src=NULL) failed\n");
+ }
+
+ dest[0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(NULL, 1, &destLength, (const char *)bytes, -1, &errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("u_strFromUTF8Lenient(dest=NULL[1]) failed\n");
+ }
+
+ dest[0]=0x1234;
+ destLength=-1;
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, 1, &destLength, (const char *)bytes, -1, &errorCode);
+ if(errorCode!=U_MEMORY_ALLOCATION_ERROR || dest[0]!=0x1234) {
+ log_err("u_strFromUTF8Lenient(U_MEMORY_ALLOCATION_ERROR) failed\n");
+ }
+
+ dest[0]=0x1234;
+ destLength=-1;
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, 1, &destLength, (const char *)bytes, -1, NULL);
+ if(dest[0]!=0x1234) {
+ log_err("u_strFromUTF8Lenient(pErrorCode=NULL) failed\n");
+ }
+
+ /* test normal behavior */
+ number=0; /* string number for log_err() */
+
+ for(pb=(const char *)bytes, pu=uchars;
+ *pb!=(char)0xff;
+ pb+=srcLength+1, pu+=destLength0+1, ++number
+ ) {
+ srcLength=uprv_strlen(pb);
+ destLength0=u_strlen(pu);
+
+ /* preflighting with NUL-termination */
+ dest[0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(NULL, 0, &destLength, pb, -1, &errorCode);
+ if (errorCode!= (destLength0==0 ? U_STRING_NOT_TERMINATED_WARNING : U_BUFFER_OVERFLOW_ERROR) ||
+ pDest!=NULL || dest[0]!=0x1234 || destLength!=destLength0
+ ) {
+ log_err("u_strFromUTF8Lenient(%d preflighting with NUL-termination) failed\n", number);
+ }
+
+ /* preflighting/some capacity with NUL-termination */
+ if(srcLength>0) {
+ dest[destLength0-1]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, destLength0-1, &destLength, pb, -1, &errorCode);
+ if (errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ dest[destLength0-1]!=0x1234 || destLength!=destLength0
+ ) {
+ log_err("u_strFromUTF8Lenient(%d preflighting/some capacity with NUL-termination) failed\n", number);
+ }
+ }
+
+ /* conversion with NUL-termination, much capacity */
+ dest[0]=dest[destLength0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, LENGTHOF(dest), &destLength, pb, -1, &errorCode);
+ if (errorCode!=U_ZERO_ERROR ||
+ pDest!=dest || dest[destLength0]!=0 ||
+ destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength)
+ ) {
+ log_err("u_strFromUTF8Lenient(%d conversion with NUL-termination, much capacity) failed\n", number);
+ }
+
+ /* conversion with NUL-termination, exact capacity */
+ dest[0]=dest[destLength0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, destLength0, &destLength, pb, -1, &errorCode);
+ if (errorCode!=U_STRING_NOT_TERMINATED_WARNING ||
+ pDest!=dest || dest[destLength0]!=0x1234 ||
+ destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength)
+ ) {
+ log_err("u_strFromUTF8Lenient(%d conversion with NUL-termination, exact capacity) failed\n", number);
+ }
+
+ /* preflighting with length */
+ dest[0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(NULL, 0, &destLength, pb, srcLength, &errorCode);
+ if (errorCode!= (destLength0==0 ? U_STRING_NOT_TERMINATED_WARNING : U_BUFFER_OVERFLOW_ERROR) ||
+ pDest!=NULL || dest[0]!=0x1234 || destLength!=srcLength
+ ) {
+ log_err("u_strFromUTF8Lenient(%d preflighting with length) failed\n", number);
+ }
+
+ /* preflighting/some capacity with length */
+ if(srcLength>0) {
+ dest[srcLength-1]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, srcLength-1, &destLength, pb, srcLength, &errorCode);
+ if (errorCode!=U_BUFFER_OVERFLOW_ERROR ||
+ dest[srcLength-1]!=0x1234 || destLength!=srcLength
+ ) {
+ log_err("u_strFromUTF8Lenient(%d preflighting/some capacity with length) failed\n", number);
+ }
+ }
+
+ /* conversion with length, much capacity */
+ dest[0]=dest[destLength0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, LENGTHOF(dest), &destLength, pb, srcLength, &errorCode);
+ if (errorCode!=U_ZERO_ERROR ||
+ pDest!=dest || dest[destLength0]!=0 ||
+ destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength)
+ ) {
+ log_err("u_strFromUTF8Lenient(%d conversion with length, much capacity) failed\n", number);
+ }
+
+ /* conversion with length, srcLength capacity */
+ dest[0]=dest[srcLength]=dest[destLength0]=0x1234;
+ destLength=-1;
+ errorCode=U_ZERO_ERROR;
+ pDest=u_strFromUTF8Lenient(dest, srcLength, &destLength, pb, srcLength, &errorCode);
+ if(srcLength==destLength0) {
+ if (errorCode!=U_STRING_NOT_TERMINATED_WARNING ||
+ pDest!=dest || dest[destLength0]!=0x1234 ||
+ destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength)
+ ) {
+ log_err("u_strFromUTF8Lenient(%d conversion with length, srcLength capacity/not terminated) failed\n", number);
+ }
+ } else {
+ if (errorCode!=U_ZERO_ERROR ||
+ pDest!=dest || dest[destLength0]!=0 ||
+ destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength)
+ ) {
+ log_err("u_strFromUTF8Lenient(%d conversion with length, srcLength capacity/terminated) failed\n", number);
+ }
+ }
+ }
+}
+
+static const uint16_t src16j[] = {
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x0000,
+ /* Test only ASCII */
+
+};
+static const uint16_t src16WithNulls[] = {
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0000,
+ 0x0048, 0x0049, 0x004A, 0x000D, 0x000A, 0x0000,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0000,
+ 0x0050, 0x0051, 0x0052, 0x000D, 0x000A, 0x0000,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0000,
+ 0x0058, 0x0059, 0x005A, 0x000D, 0x000A, 0x0000,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0000,
+ 0x0058, 0x0059, 0x005A, 0x000D, 0x000A, 0x0000,
+ /* test only ASCII */
+ /*
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD,
+ 0x00AE, 0x00AF, 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, 0x00C0, 0x00C1,
+ 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB,
+ 0x00CC, 0x00CD, 0x00CE, 0x00CF, 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5,
+ 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9,
+ 0x0054, 0x0000 */
+
+};
+static void Test_UChar_WCHART_API(void){
+#if (defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32)) || (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION)
+ UErrorCode err = U_ZERO_ERROR;
+ const UChar* uSrc = src16j;
+ int32_t uSrcLen = sizeof(src16j)/2;
+ wchar_t* wDest = NULL;
+ int32_t wDestLen = 0;
+ int32_t reqLen= 0 ;
+ UBool failed = FALSE;
+ UChar* uDest = NULL;
+ int32_t uDestLen = 0;
+ int i =0;
+ {
+ /* Bad UErrorCode arguments. Make sure that the API doesn't crash, and that Purify doesn't complain. */
+ if (u_strFromWCS(NULL,0,NULL,NULL,0,NULL) != NULL) {
+ log_err("u_strFromWCS() should return NULL with a bad argument\n");
+ }
+ if (u_strToWCS(NULL,0,NULL,NULL,0,NULL) != NULL) {
+ log_err("u_strToWCS() should return NULL with a bad argument\n");
+ }
+
+ /* Bad UErrorCode arguments. */
+ err = U_ZERO_ERROR;
+ u_strFromWCS(NULL,0,NULL,NULL,0,&err);
+ if (err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("u_strFromWCS() didn't fail as expected with bad arguments. Error: %s \n", u_errorName(err));
+ }
+ err = U_ZERO_ERROR;
+ u_strToWCS(NULL,0,NULL,NULL,0,&err);
+ if (err != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("u_strToWCS() didn't fail as expected with bad arguments. Error: %s \n", u_errorName(err));
+ }
+ err = U_ZERO_ERROR;
+
+ /* pre-flight*/
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err=U_ZERO_ERROR;
+ wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1));
+ wDestLen = reqLen+1;
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err);
+ }
+
+ /* pre-flight */
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,reqLen,&err);
+
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err =U_ZERO_ERROR;
+ uDest = (UChar*) malloc(sizeof(UChar) * (reqLen+1));
+ uDestLen = reqLen + 1;
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,reqLen,&err);
+ }else if(U_FAILURE(err)){
+
+ log_err("u_strFromWCS() failed. Error: %s \n", u_errorName(err));
+ return;
+ }
+
+ for(i=0; i< uSrcLen; i++){
+ if(uDest[i] != src16j[i]){
+ log_verbose("u_str*WCS() failed for unterminated string expected: \\u%04X got: \\u%04X at index: %i \n", src16j[i] ,uDest[i],i);
+ failed =TRUE;
+ }
+ }
+
+ if(U_FAILURE(err)){
+ failed = TRUE;
+ }
+ if(failed){
+ log_err("u_strToWCS() failed \n");
+ }
+ free(wDest);
+ free(uDest);
+
+
+ /* test with embeded nulls */
+ uSrc = src16WithNulls;
+ uSrcLen = sizeof(src16WithNulls)/2;
+ wDestLen =0;
+ uDestLen =0;
+ wDest = NULL;
+ uDest = NULL;
+ /* pre-flight*/
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err=U_ZERO_ERROR;
+ wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1));
+ wDestLen = reqLen+1;
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err);
+ }
+
+ /* pre-flight */
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,reqLen,&err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err =U_ZERO_ERROR;
+ uDest = (UChar*) malloc(sizeof(UChar) * (reqLen+1));
+ uDestLen = reqLen + 1;
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,reqLen,&err);
+ }
+
+
+ for(i=0; i< uSrcLen; i++){
+ if(uDest[i] != src16WithNulls[i]){
+ log_verbose("u_str*WCS() failed for string with nulls expected: \\u%04X got: \\u%04X at index: %i \n", src16WithNulls[i] ,uDest[i],i);
+ failed =TRUE;
+ }
+ }
+
+ if(U_FAILURE(err)){
+ failed = TRUE;
+ }
+ if(failed){
+ log_err("u_strToWCS() failed \n");
+ }
+ free(wDest);
+ free(uDest);
+
+ }
+
+ {
+
+ uSrc = src16j;
+ uSrcLen = sizeof(src16j)/2;
+ wDestLen =0;
+ uDestLen =0;
+ wDest = NULL;
+ uDest = NULL;
+ wDestLen = 0;
+ /* pre-flight*/
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,-1,&err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err=U_ZERO_ERROR;
+ wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1));
+ wDestLen = reqLen+1;
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,-1,&err);
+ }
+ uDestLen = 0;
+ /* pre-flight */
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,-1,&err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err =U_ZERO_ERROR;
+ uDest = (UChar*) malloc(sizeof(UChar) * (reqLen+1));
+ uDestLen = reqLen + 1;
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,-1,&err);
+ }
+
+
+ for(i=0; i< uSrcLen; i++){
+ if(uDest[i] != src16j[i]){
+ log_verbose("u_str*WCS() failed for null terminated string expected: \\u%04X got: \\u%04X at index: %i \n", src16j[i] ,uDest[i],i);
+ failed =TRUE;
+ }
+ }
+
+ if(U_FAILURE(err)){
+ failed = TRUE;
+ }
+ if(failed){
+ log_err("u_strToWCS() failed \n");
+ }
+ free(wDest);
+ free(uDest);
+ }
+
+ /*
+ * Test u_terminateWChars().
+ * All u_terminateXYZ() use the same implementation macro;
+ * we test this function to improve API coverage.
+ */
+ {
+ wchar_t buffer[10];
+
+ err=U_ZERO_ERROR;
+ buffer[3]=0x20ac;
+ wDestLen=u_terminateWChars(buffer, LENGTHOF(buffer), 3, &err);
+ if(err!=U_ZERO_ERROR || wDestLen!=3 || buffer[3]!=0) {
+ log_err("u_terminateWChars(buffer, all, 3, zero) failed: %s length %d [3]==U+%04x\n",
+ u_errorName(err), wDestLen, buffer[3]);
+ }
+
+ err=U_ZERO_ERROR;
+ buffer[3]=0x20ac;
+ wDestLen=u_terminateWChars(buffer, 3, 3, &err);
+ if(err!=U_STRING_NOT_TERMINATED_WARNING || wDestLen!=3 || buffer[3]!=0x20ac) {
+ log_err("u_terminateWChars(buffer, 3, 3, zero) failed: %s length %d [3]==U+%04x\n",
+ u_errorName(err), wDestLen, buffer[3]);
+ }
+
+ err=U_STRING_NOT_TERMINATED_WARNING;
+ buffer[3]=0x20ac;
+ wDestLen=u_terminateWChars(buffer, LENGTHOF(buffer), 3, &err);
+ if(err!=U_ZERO_ERROR || wDestLen!=3 || buffer[3]!=0) {
+ log_err("u_terminateWChars(buffer, all, 3, not-terminated) failed: %s length %d [3]==U+%04x\n",
+ u_errorName(err), wDestLen, buffer[3]);
+ }
+
+ err=U_ZERO_ERROR;
+ buffer[3]=0x20ac;
+ wDestLen=u_terminateWChars(buffer, 2, 3, &err);
+ if(err!=U_BUFFER_OVERFLOW_ERROR || wDestLen!=3 || buffer[3]!=0x20ac) {
+ log_err("u_terminateWChars(buffer, 2, 3, zero) failed: %s length %d [3]==U+%04x\n",
+ u_errorName(err), wDestLen, buffer[3]);
+ }
+ }
+#else
+ log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32");
+#endif
+}
+
+static void Test_widestrs()
+{
+#if (defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32)) || (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION)
+ wchar_t ws[100];
+ UChar rts[100];
+ int32_t wcap = sizeof(ws) / sizeof(*ws);
+ int32_t wl;
+ int32_t rtcap = sizeof(rts) / sizeof(*rts);
+ int32_t rtl;
+ wchar_t *wcs;
+ UChar *cp;
+ const char *errname;
+ UChar ustr[] = {'h', 'e', 'l', 'l', 'o', 0};
+ int32_t ul = sizeof(ustr)/sizeof(*ustr) -1;
+ char astr[100];
+
+ UErrorCode err;
+
+ err = U_ZERO_ERROR;
+ wcs = u_strToWCS(ws, wcap, &wl, ustr, ul, &err);
+ if (U_FAILURE(err)) {
+ errname = u_errorName(err);
+ log_err("test_widestrs: u_strToWCS error: %s!\n",errname);
+ }
+ if(ul!=wl){
+ log_err("u_strToWCS: ustr = %s, ul = %d, ws = %S, wl = %d!\n", u_austrcpy(astr, ustr), ul, ws, wl);
+ }
+ err = U_ZERO_ERROR;
+ wl = (int32_t)uprv_wcslen(wcs);
+ cp = u_strFromWCS(rts, rtcap, &rtl, wcs, wl, &err);
+ if (U_FAILURE(err)) {
+ errname = u_errorName(err);
+ fprintf(stderr, "test_widestrs: ucnv_wcstombs error: %s!\n",errname);
+ }
+ if(wl != rtl){
+ log_err("u_strFromWCS: wcs = %S, wl = %d,rts = %s, rtl = %d!\n", wcs, wl, u_austrcpy(astr, rts), rtl);
+ }
+#else
+ log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32");
+#endif
+}
+
+static void
+Test_WCHART_LongString(){
+#if (defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32)) || (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION)
+ UErrorCode status = U_ZERO_ERROR;
+ const char* testdatapath=loadTestData(&status);
+ UResourceBundle *theBundle = ures_open(testdatapath, "testtypes", &status);
+ int32_t strLen =0;
+ const UChar* str = ures_getStringByKey(theBundle, "testinclude",&strLen,&status);
+ const UChar* uSrc = str;
+ int32_t uSrcLen = strLen;
+ int32_t wDestLen =0, reqLen=0, i=0;
+ int32_t uDestLen =0;
+ wchar_t* wDest = NULL;
+ UChar* uDest = NULL;
+ UBool failed = FALSE;
+
+ if(U_FAILURE(status)){
+ log_err("Could not get testinclude resource from testtypes bundle. Error: %s\n",u_errorName(status));
+ return;
+ }
+
+ /* pre-flight*/
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,-1,&status);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1));
+ wDestLen = reqLen+1;
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,-1,&status);
+ }
+ uDestLen = 0;
+ /* pre-flight */
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,-1,&status);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status =U_ZERO_ERROR;
+ uDest = (UChar*) malloc(sizeof(UChar) * (reqLen+1));
+ uDestLen = reqLen + 1;
+ u_strFromWCS(uDest, uDestLen,&reqLen,wDest,-1,&status);
+ }
+
+
+ for(i=0; i< uSrcLen; i++){
+ if(uDest[i] != str[i]){
+ log_verbose("u_str*WCS() failed for null terminated string expected: \\u%04X got: \\u%04X at index: %i \n", src16j[i] ,uDest[i],i);
+ failed =TRUE;
+ }
+ }
+
+ if(U_FAILURE(status)){
+ failed = TRUE;
+ }
+ if(failed){
+ log_err("u_strToWCS() failed \n");
+ }
+ free(wDest);
+ free(uDest);
+ /* close the bundle */
+ ures_close(theBundle);
+#else
+ log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32");
+#endif
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/custrtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/custrtst.c
new file mode 100644
index 00000000000..76cae0be6d7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/custrtst.c
@@ -0,0 +1,1817 @@
+/*
+******************************************************************************
+*
+* Copyright (C) 2002-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+******************************************************************************
+* file name: custrtst.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2002oct09
+* created by: Markus W. Scherer
+*
+* Tests of ustring.h Unicode string API functions.
+*/
+
+#include "unicode/ustring.h"
+#include "unicode/ucnv.h"
+#include "unicode/uiter.h"
+#include "cintltst.h"
+#include <string.h>
+
+#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
+
+/* get the sign of an integer */
+#define _SIGN(value) ((value)==0 ? 0 : ((int32_t)(value)>>31)|1)
+
+/* test setup --------------------------------------------------------------- */
+
+static void setUpDataTable(void);
+static void TestStringCopy(void);
+static void TestStringFunctions(void);
+static void TestStringSearching(void);
+static void TestSurrogateSearching(void);
+static void TestUnescape(void);
+static void TestCountChar32(void);
+static void TestUCharIterator(void);
+static void TestUNormIterator(void);
+static void TestBadUNormIterator(void);
+
+void addUStringTest(TestNode** root);
+
+void addUStringTest(TestNode** root)
+{
+ addTest(root, &TestStringCopy, "tsutil/custrtst/TestStringCopy");
+ addTest(root, &TestStringFunctions, "tsutil/custrtst/TestStringFunctions");
+ addTest(root, &TestStringSearching, "tsutil/custrtst/TestStringSearching");
+ addTest(root, &TestSurrogateSearching, "tsutil/custrtst/TestSurrogateSearching");
+ addTest(root, &TestUnescape, "tsutil/custrtst/TestUnescape");
+ addTest(root, &TestCountChar32, "tsutil/custrtst/TestCountChar32");
+ addTest(root, &TestUCharIterator, "tsutil/custrtst/TestUCharIterator");
+ addTest(root, &TestUNormIterator, "tsutil/custrtst/TestUNormIterator");
+ addTest(root, &TestBadUNormIterator, "tsutil/custrtst/TestBadUNormIterator");
+}
+
+/* test data for TestStringFunctions ---------------------------------------- */
+
+UChar*** dataTable = NULL;
+
+static const char* raw[3][4] = {
+
+ /* First String */
+ { "English_", "French_", "Croatian_", "English_"},
+ /* Second String */
+ { "United States", "France", "Croatia", "Unites States"},
+
+ /* Concatenated string */
+ { "English_United States", "French_France", "Croatian_Croatia", "English_United States"}
+};
+
+static void setUpDataTable()
+{
+ int32_t i,j;
+ if(dataTable == NULL) {
+ dataTable = (UChar***)calloc(sizeof(UChar**),3);
+
+ for (i = 0; i < 3; i++) {
+ dataTable[i] = (UChar**)calloc(sizeof(UChar*),4);
+ for (j = 0; j < 4; j++){
+ dataTable[i][j] = (UChar*) malloc(sizeof(UChar)*(strlen(raw[i][j])+1));
+ u_uastrcpy(dataTable[i][j],raw[i][j]);
+ }
+ }
+ }
+}
+
+static void cleanUpDataTable()
+{
+ int32_t i,j;
+ if(dataTable != NULL) {
+ for (i=0; i<3; i++) {
+ for(j = 0; j<4; j++) {
+ free(dataTable[i][j]);
+ }
+ free(dataTable[i]);
+ }
+ free(dataTable);
+ }
+ dataTable = NULL;
+}
+
+/*Tests for u_strcat(),u_strcmp(), u_strlen(), u_strcpy(),u_strncat(),u_strncmp(),u_strncpy, u_uastrcpy(),u_austrcpy(), u_uastrncpy(); */
+static void TestStringFunctions()
+{
+ int32_t i,j,k;
+ UChar temp[512];
+ UChar nullTemp[512];
+ char test[512];
+ char tempOut[512];
+
+ setUpDataTable();
+
+ log_verbose("Testing u_strlen()\n");
+ if( u_strlen(dataTable[0][0])!= u_strlen(dataTable[0][3]) || u_strlen(dataTable[0][0]) == u_strlen(dataTable[0][2]))
+ log_err("There is an error in u_strlen()");
+
+ log_verbose("Testing u_memcpy() and u_memcmp()\n");
+
+ for(i=0;i<3;++i)
+ {
+ for(j=0;j<4;++j)
+ {
+ log_verbose("Testing %s\n", u_austrcpy(tempOut, dataTable[i][j]));
+ temp[0] = 0;
+ temp[7] = 0xA4; /* Mark the end */
+ u_memcpy(temp,dataTable[i][j], 7);
+
+ if(temp[7] != 0xA4)
+ log_err("an error occured in u_memcpy()\n");
+ if(u_memcmp(temp, dataTable[i][j], 7)!=0)
+ log_err("an error occured in u_memcpy() or u_memcmp()\n");
+ }
+ }
+ if(u_memcmp(dataTable[0][0], dataTable[1][1], 7)==0)
+ log_err("an error occured in u_memcmp()\n");
+
+ log_verbose("Testing u_memset()\n");
+ nullTemp[0] = 0;
+ nullTemp[7] = 0;
+ u_memset(nullTemp, 0xa4, 7);
+ for (i = 0; i < 7; i++) {
+ if(nullTemp[i] != 0xa4) {
+ log_err("an error occured in u_memset()\n");
+ }
+ }
+ if(nullTemp[7] != 0) {
+ log_err("u_memset() went too far\n");
+ }
+
+ u_memset(nullTemp, 0, 7);
+ nullTemp[7] = 0xa4;
+ temp[7] = 0;
+ u_memcpy(temp,nullTemp, 7);
+ if(u_memcmp(temp, nullTemp, 7)!=0 || temp[7]!=0)
+ log_err("an error occured in u_memcpy() or u_memcmp()\n");
+
+
+ log_verbose("Testing u_memmove()\n");
+ for (i = 0; i < 7; i++) {
+ temp[i] = (UChar)i;
+ }
+ u_memmove(temp + 1, temp, 7);
+ if(temp[0] != 0) {
+ log_err("an error occured in u_memmove()\n");
+ }
+ for (i = 1; i <= 7; i++) {
+ if(temp[i] != (i - 1)) {
+ log_err("an error occured in u_memmove()\n");
+ }
+ }
+
+ log_verbose("Testing u_strcpy() and u_strcmp()\n");
+
+ for(i=0;i<3;++i)
+ {
+ for(j=0;j<4;++j)
+ {
+ log_verbose("Testing %s\n", u_austrcpy(tempOut, dataTable[i][j]));
+ temp[0] = 0;
+ u_strcpy(temp,dataTable[i][j]);
+
+ if(u_strcmp(temp,dataTable[i][j])!=0)
+ log_err("something threw an error in u_strcpy() or u_strcmp()\n");
+ }
+ }
+ if(u_strcmp(dataTable[0][0], dataTable[1][1])==0)
+ log_err("an error occured in u_memcmp()\n");
+
+ log_verbose("testing u_strcat()\n");
+ i=0;
+ for(j=0; j<2;++j)
+ {
+ u_uastrcpy(temp, "");
+ u_strcpy(temp,dataTable[i][j]);
+ u_strcat(temp,dataTable[i+1][j]);
+ if(u_strcmp(temp,dataTable[i+2][j])!=0)
+ log_err("something threw an error in u_strcat()\n");
+
+ }
+ log_verbose("Testing u_strncmp()\n");
+ for(i=0,j=0;j<4; ++j)
+ {
+ k=u_strlen(dataTable[i][j]);
+ if(u_strncmp(dataTable[i][j],dataTable[i+2][j],k)!=0)
+ log_err("Something threw an error in u_strncmp\n");
+ }
+ if(u_strncmp(dataTable[0][0], dataTable[1][1], 7)==0)
+ log_err("an error occured in u_memcmp()\n");
+
+
+ log_verbose("Testing u_strncat\n");
+ for(i=0,j=0;j<4; ++j)
+ {
+ k=u_strlen(dataTable[i][j]);
+
+ u_uastrcpy(temp,"");
+
+ if(u_strcmp(u_strncat(temp,dataTable[i+2][j],k),dataTable[i][j])!=0)
+ log_err("something threw an error in u_strncat or u_uastrcpy()\n");
+
+ }
+
+ log_verbose("Testing u_strncpy() and u_uastrcpy()\n");
+ for(i=2,j=0;j<4; ++j)
+ {
+ k=u_strlen(dataTable[i][j]);
+ u_strncpy(temp, dataTable[i][j],k);
+ temp[k] = 0xa4;
+
+ if(u_strncmp(temp, dataTable[i][j],k)!=0)
+ log_err("something threw an error in u_strncpy()\n");
+
+ if(temp[k] != 0xa4)
+ log_err("something threw an error in u_strncpy()\n");
+
+ u_memset(temp, 0x3F, (sizeof(temp) / sizeof(UChar)) - 1);
+ u_uastrncpy(temp, raw[i][j], k-1);
+ if(u_strncmp(temp, dataTable[i][j],k-1)!=0)
+ log_err("something threw an error in u_uastrncpy(k-1)\n");
+
+ if(temp[k-1] != 0x3F)
+ log_err("something threw an error in u_uastrncpy(k-1)\n");
+
+ u_memset(temp, 0x3F, (sizeof(temp) / sizeof(UChar)) - 1);
+ u_uastrncpy(temp, raw[i][j], k+1);
+ if(u_strcmp(temp, dataTable[i][j])!=0)
+ log_err("something threw an error in u_uastrncpy(k+1)\n");
+
+ if(temp[k] != 0)
+ log_err("something threw an error in u_uastrncpy(k+1)\n");
+
+ u_memset(temp, 0x3F, (sizeof(temp) / sizeof(UChar)) - 1);
+ u_uastrncpy(temp, raw[i][j], k);
+ if(u_strncmp(temp, dataTable[i][j], k)!=0)
+ log_err("something threw an error in u_uastrncpy(k)\n");
+
+ if(temp[k] != 0x3F)
+ log_err("something threw an error in u_uastrncpy(k)\n");
+ }
+
+ log_verbose("Testing u_strchr() and u_memchr()\n");
+
+ for(i=2,j=0;j<4;j++)
+ {
+ UChar saveVal = dataTable[i][j][0];
+ UChar *findPtr = u_strchr(dataTable[i][j], 0x005F);
+ int32_t dataSize = (int32_t)(u_strlen(dataTable[i][j]) + 1);
+
+ log_verbose("%s ", u_austrcpy(tempOut, findPtr));
+
+ if (findPtr == NULL || *findPtr != 0x005F) {
+ log_err("u_strchr can't find '_' in the string\n");
+ }
+
+ findPtr = u_strchr32(dataTable[i][j], 0x005F);
+ if (findPtr == NULL || *findPtr != 0x005F) {
+ log_err("u_strchr32 can't find '_' in the string\n");
+ }
+
+ findPtr = u_strchr(dataTable[i][j], 0);
+ if (findPtr != (&(dataTable[i][j][dataSize - 1]))) {
+ log_err("u_strchr can't find NULL in the string\n");
+ }
+
+ findPtr = u_strchr32(dataTable[i][j], 0);
+ if (findPtr != (&(dataTable[i][j][dataSize - 1]))) {
+ log_err("u_strchr32 can't find NULL in the string\n");
+ }
+
+ findPtr = u_memchr(dataTable[i][j], 0, dataSize);
+ if (findPtr != (&(dataTable[i][j][dataSize - 1]))) {
+ log_err("u_memchr can't find NULL in the string\n");
+ }
+
+ findPtr = u_memchr32(dataTable[i][j], 0, dataSize);
+ if (findPtr != (&(dataTable[i][j][dataSize - 1]))) {
+ log_err("u_memchr32 can't find NULL in the string\n");
+ }
+
+ dataTable[i][j][0] = 0;
+ /* Make sure we skip over the NULL termination */
+ findPtr = u_memchr(dataTable[i][j], 0x005F, dataSize);
+ if (findPtr == NULL || *findPtr != 0x005F) {
+ log_err("u_memchr can't find '_' in the string\n");
+ }
+
+ findPtr = u_memchr32(dataTable[i][j], 0x005F, dataSize);
+ if (findPtr == NULL || *findPtr != 0x005F) {
+ log_err("u_memchr32 can't find '_' in the string\n");
+ }
+ findPtr = u_memchr32(dataTable[i][j], 0xFFFD, dataSize);
+ if (findPtr != NULL) {
+ log_err("Should have found NULL when the character is not there.\n");
+ }
+ dataTable[i][j][0] = saveVal; /* Put it back for the other tests */
+ }
+
+ /*
+ * test that u_strchr32()
+ * does not find surrogate code points when they are part of matched pairs
+ * (= part of supplementary code points)
+ * Jitterbug 1542
+ */
+ {
+ static const UChar s[]={
+ /* 0 1 2 3 4 5 6 7 8 9 */
+ 0x0061, 0xd841, 0xdc02, 0xd841, 0x0062, 0xdc02, 0xd841, 0xdc02, 0x0063, 0
+ };
+
+ if(u_strchr32(s, 0xd841)!=(s+3) || u_strchr32(s, 0xdc02)!=(s+5)) {
+ log_err("error: u_strchr32(surrogate) finds a partial supplementary code point\n");
+ }
+ if(u_memchr32(s, 0xd841, 9)!=(s+3) || u_memchr32(s, 0xdc02, 9)!=(s+5)) {
+ log_err("error: u_memchr32(surrogate) finds a partial supplementary code point\n");
+ }
+ }
+
+ log_verbose("Testing u_austrcpy()");
+ u_austrcpy(test,dataTable[0][0]);
+ if(strcmp(test,raw[0][0])!=0)
+ log_err("There is an error in u_austrcpy()");
+
+
+ log_verbose("Testing u_strtok_r()");
+ {
+ const char tokString[] = " , 1 2 3 AHHHHH! 5.5 6 7 , 8\n";
+ const char *tokens[] = {",", "1", "2", "3", "AHHHHH!", "5.5", "6", "7", "8\n"};
+ UChar delimBuf[sizeof(test)];
+ UChar currTokenBuf[sizeof(tokString)];
+ UChar *state;
+ uint32_t currToken = 0;
+ UChar *ptr;
+
+ u_uastrcpy(temp, tokString);
+ u_uastrcpy(delimBuf, " ");
+
+ ptr = u_strtok_r(temp, delimBuf, &state);
+ u_uastrcpy(delimBuf, " ,");
+ while (ptr != NULL) {
+ u_uastrcpy(currTokenBuf, tokens[currToken]);
+ if (u_strcmp(ptr, currTokenBuf) != 0) {
+ log_err("u_strtok_r mismatch at %d. Got: %s, Expected: %s\n", currToken, ptr, tokens[currToken]);
+ }
+ ptr = u_strtok_r(NULL, delimBuf, &state);
+ currToken++;
+ }
+
+ if (currToken != sizeof(tokens)/sizeof(tokens[0])) {
+ log_err("Didn't get correct number of tokens\n");
+ }
+ state = delimBuf; /* Give it an "invalid" saveState */
+ u_uastrcpy(currTokenBuf, "");
+ if (u_strtok_r(currTokenBuf, delimBuf, &state) != NULL) {
+ log_err("Didn't get NULL for empty string\n");
+ }
+ if (state != NULL) {
+ log_err("State should be NULL for empty string\n");
+ }
+ state = delimBuf; /* Give it an "invalid" saveState */
+ u_uastrcpy(currTokenBuf, ", ,");
+ if (u_strtok_r(currTokenBuf, delimBuf, &state) != NULL) {
+ log_err("Didn't get NULL for a string of delimiters\n");
+ }
+ if (state != NULL) {
+ log_err("State should be NULL for a string of delimiters\n");
+ }
+
+ state = delimBuf; /* Give it an "invalid" saveState */
+ u_uastrcpy(currTokenBuf, "q, ,");
+ if (u_strtok_r(currTokenBuf, delimBuf, &state) == NULL) {
+ log_err("Got NULL for a string that does not begin with delimiters\n");
+ }
+ if (u_strtok_r(NULL, delimBuf, &state) != NULL) {
+ log_err("Didn't get NULL for a string that ends in delimiters\n");
+ }
+ if (state != NULL) {
+ log_err("State should be NULL for empty string\n");
+ }
+
+ state = delimBuf; /* Give it an "invalid" saveState */
+ u_uastrcpy(currTokenBuf, tokString);
+ u_uastrcpy(temp, tokString);
+ u_uastrcpy(delimBuf, "q"); /* Give it a delimiter that it can't find. */
+ ptr = u_strtok_r(currTokenBuf, delimBuf, &state);
+ if (ptr == NULL || u_strcmp(ptr, temp) != 0) {
+ log_err("Should have recieved the same string when there are no delimiters\n");
+ }
+ if (u_strtok_r(NULL, delimBuf, &state) != NULL) {
+ log_err("Should not have found another token in a one token string\n");
+ }
+ }
+
+ /* test u_strcmpCodePointOrder() */
+ {
+ /* these strings are in ascending order */
+ static const UChar strings[][4]={
+ { 0x61, 0 }, /* U+0061 */
+ { 0x20ac, 0xd801, 0 }, /* U+20ac U+d801 */
+ { 0x20ac, 0xd800, 0xdc00, 0 }, /* U+20ac U+10000 */
+ { 0xd800, 0 }, /* U+d800 */
+ { 0xd800, 0xff61, 0 }, /* U+d800 U+ff61 */
+ { 0xdfff, 0 }, /* U+dfff */
+ { 0xff61, 0xdfff, 0 }, /* U+ff61 U+dfff */
+ { 0xff61, 0xd800, 0xdc02, 0 }, /* U+ff61 U+10002 */
+ { 0xd800, 0xdc02, 0 }, /* U+10002 */
+ { 0xd84d, 0xdc56, 0 } /* U+23456 */
+ };
+
+ UCharIterator iter1, iter2;
+ int32_t len1, len2, r1, r2;
+
+ for(i=0; i<(sizeof(strings)/sizeof(strings[0])-1); ++i) {
+ if(u_strcmpCodePointOrder(strings[i], strings[i+1])>=0) {
+ log_err("error: u_strcmpCodePointOrder() fails for string %d and the following one\n", i);
+ }
+ if(u_strncmpCodePointOrder(strings[i], strings[i+1], 10)>=0) {
+ log_err("error: u_strncmpCodePointOrder() fails for string %d and the following one\n", i);
+ }
+
+ /* There are at least 2 UChars in each string - verify that strncmp()==memcmp(). */
+ if(u_strncmpCodePointOrder(strings[i], strings[i+1], 2)!=u_memcmpCodePointOrder(strings[i], strings[i+1], 2)) {
+ log_err("error: u_strncmpCodePointOrder(2)!=u_memcmpCodePointOrder(2) for string %d and the following one\n", i);
+ }
+
+ /* test u_strCompare(TRUE) */
+ len1=u_strlen(strings[i]);
+ len2=u_strlen(strings[i+1]);
+ if( u_strCompare(strings[i], -1, strings[i+1], -1, TRUE)>=0 ||
+ u_strCompare(strings[i], -1, strings[i+1], len2, TRUE)>=0 ||
+ u_strCompare(strings[i], len1, strings[i+1], -1, TRUE)>=0 ||
+ u_strCompare(strings[i], len1, strings[i+1], len2, TRUE)>=0
+ ) {
+ log_err("error: u_strCompare(code point order) fails for string %d and the following one\n", i);
+ }
+
+ /* test u_strCompare(FALSE) */
+ r1=u_strCompare(strings[i], -1, strings[i+1], -1, FALSE);
+ r2=u_strcmp(strings[i], strings[i+1]);
+ if(_SIGN(r1)!=_SIGN(r2)) {
+ log_err("error: u_strCompare(code unit order)!=u_strcmp() for string %d and the following one\n", i);
+ }
+
+ /* test u_strCompareIter() */
+ uiter_setString(&iter1, strings[i], len1);
+ uiter_setString(&iter2, strings[i+1], len2);
+ if(u_strCompareIter(&iter1, &iter2, TRUE)>=0) {
+ log_err("error: u_strCompareIter(code point order) fails for string %d and the following one\n", i);
+ }
+ r1=u_strCompareIter(&iter1, &iter2, FALSE);
+ if(_SIGN(r1)!=_SIGN(u_strcmp(strings[i], strings[i+1]))) {
+ log_err("error: u_strCompareIter(code unit order)!=u_strcmp() for string %d and the following one\n", i);
+ }
+ }
+ }
+
+ cleanUpDataTable();
+}
+
+static void TestStringSearching()
+{
+ const UChar testString[] = {0x0061, 0x0062, 0x0063, 0x0064, 0x0064, 0x0061, 0};
+ const UChar testSurrogateString[] = {0xdbff, 0x0061, 0x0062, 0xdbff, 0xdfff, 0x0063, 0x0064, 0x0064, 0xdbff, 0xdfff, 0xdb00, 0xdf00, 0x0061, 0};
+ const UChar surrMatchSet1[] = {0xdbff, 0xdfff, 0};
+ const UChar surrMatchSet2[] = {0x0061, 0x0062, 0xdbff, 0xdfff, 0};
+ const UChar surrMatchSet3[] = {0xdb00, 0xdf00, 0xdbff, 0xdfff, 0};
+ const UChar surrMatchSet4[] = {0x0000};
+ const UChar surrMatchSetBad[] = {0xdbff, 0x0061, 0};
+ const UChar surrMatchSetBad2[] = {0x0061, 0xdbff, 0};
+ const UChar surrMatchSetBad3[] = {0xdbff, 0x0061, 0x0062, 0xdbff, 0xdfff, 0}; /* has partial surrogate */
+ const UChar
+ empty[] = { 0 },
+ a[] = { 0x61, 0 },
+ ab[] = { 0x61, 0x62, 0 },
+ ba[] = { 0x62, 0x61, 0 },
+ abcd[] = { 0x61, 0x62, 0x63, 0x64, 0 },
+ cd[] = { 0x63, 0x64, 0 },
+ dc[] = { 0x64, 0x63, 0 },
+ cdh[] = { 0x63, 0x64, 0x68, 0 },
+ f[] = { 0x66, 0 },
+ fg[] = { 0x66, 0x67, 0 },
+ gf[] = { 0x67, 0x66, 0 };
+
+ log_verbose("Testing u_strpbrk()");
+
+ if (u_strpbrk(testString, a) != &testString[0]) {
+ log_err("u_strpbrk couldn't find first letter a.\n");
+ }
+ if (u_strpbrk(testString, dc) != &testString[2]) {
+ log_err("u_strpbrk couldn't find d or c.\n");
+ }
+ if (u_strpbrk(testString, cd) != &testString[2]) {
+ log_err("u_strpbrk couldn't find c or d.\n");
+ }
+ if (u_strpbrk(testString, cdh) != &testString[2]) {
+ log_err("u_strpbrk couldn't find c, d or h.\n");
+ }
+ if (u_strpbrk(testString, f) != NULL) {
+ log_err("u_strpbrk didn't return NULL for \"f\".\n");
+ }
+ if (u_strpbrk(testString, fg) != NULL) {
+ log_err("u_strpbrk didn't return NULL for \"fg\".\n");
+ }
+ if (u_strpbrk(testString, gf) != NULL) {
+ log_err("u_strpbrk didn't return NULL for \"gf\".\n");
+ }
+ if (u_strpbrk(testString, empty) != NULL) {
+ log_err("u_strpbrk didn't return NULL for \"\".\n");
+ }
+
+ log_verbose("Testing u_strpbrk() with surrogates");
+
+ if (u_strpbrk(testSurrogateString, a) != &testSurrogateString[1]) {
+ log_err("u_strpbrk couldn't find first letter a.\n");
+ }
+ if (u_strpbrk(testSurrogateString, dc) != &testSurrogateString[5]) {
+ log_err("u_strpbrk couldn't find d or c.\n");
+ }
+ if (u_strpbrk(testSurrogateString, cd) != &testSurrogateString[5]) {
+ log_err("u_strpbrk couldn't find c or d.\n");
+ }
+ if (u_strpbrk(testSurrogateString, cdh) != &testSurrogateString[5]) {
+ log_err("u_strpbrk couldn't find c, d or h.\n");
+ }
+ if (u_strpbrk(testSurrogateString, f) != NULL) {
+ log_err("u_strpbrk didn't return NULL for \"f\".\n");
+ }
+ if (u_strpbrk(testSurrogateString, fg) != NULL) {
+ log_err("u_strpbrk didn't return NULL for \"fg\".\n");
+ }
+ if (u_strpbrk(testSurrogateString, gf) != NULL) {
+ log_err("u_strpbrk didn't return NULL for \"gf\".\n");
+ }
+ if (u_strpbrk(testSurrogateString, surrMatchSet1) != &testSurrogateString[3]) {
+ log_err("u_strpbrk couldn't find \"0xdbff, 0xdfff\".\n");
+ }
+ if (u_strpbrk(testSurrogateString, surrMatchSet2) != &testSurrogateString[1]) {
+ log_err("u_strpbrk couldn't find \"0xdbff, a, b, 0xdbff, 0xdfff\".\n");
+ }
+ if (u_strpbrk(testSurrogateString, surrMatchSet3) != &testSurrogateString[3]) {
+ log_err("u_strpbrk couldn't find \"0xdb00, 0xdf00, 0xdbff, 0xdfff\".\n");
+ }
+ if (u_strpbrk(testSurrogateString, surrMatchSet4) != NULL) {
+ log_err("u_strpbrk should have returned NULL for empty string.\n");
+ }
+ if (u_strpbrk(testSurrogateString, surrMatchSetBad) != &testSurrogateString[0]) {
+ log_err("u_strpbrk should have found bad surrogate.\n");
+ }
+
+ log_verbose("Testing u_strcspn()");
+
+ if (u_strcspn(testString, a) != 0) {
+ log_err("u_strcspn couldn't find first letter a.\n");
+ }
+ if (u_strcspn(testString, dc) != 2) {
+ log_err("u_strcspn couldn't find d or c.\n");
+ }
+ if (u_strcspn(testString, cd) != 2) {
+ log_err("u_strcspn couldn't find c or d.\n");
+ }
+ if (u_strcspn(testString, cdh) != 2) {
+ log_err("u_strcspn couldn't find c, d or h.\n");
+ }
+ if (u_strcspn(testString, f) != u_strlen(testString)) {
+ log_err("u_strcspn didn't return NULL for \"f\".\n");
+ }
+ if (u_strcspn(testString, fg) != u_strlen(testString)) {
+ log_err("u_strcspn didn't return NULL for \"fg\".\n");
+ }
+ if (u_strcspn(testString, gf) != u_strlen(testString)) {
+ log_err("u_strcspn didn't return NULL for \"gf\".\n");
+ }
+
+ log_verbose("Testing u_strcspn() with surrogates");
+
+ if (u_strcspn(testSurrogateString, a) != 1) {
+ log_err("u_strcspn couldn't find first letter a.\n");
+ }
+ if (u_strcspn(testSurrogateString, dc) != 5) {
+ log_err("u_strcspn couldn't find d or c.\n");
+ }
+ if (u_strcspn(testSurrogateString, cd) != 5) {
+ log_err("u_strcspn couldn't find c or d.\n");
+ }
+ if (u_strcspn(testSurrogateString, cdh) != 5) {
+ log_err("u_strcspn couldn't find c, d or h.\n");
+ }
+ if (u_strcspn(testSurrogateString, f) != u_strlen(testSurrogateString)) {
+ log_err("u_strcspn didn't return NULL for \"f\".\n");
+ }
+ if (u_strcspn(testSurrogateString, fg) != u_strlen(testSurrogateString)) {
+ log_err("u_strcspn didn't return NULL for \"fg\".\n");
+ }
+ if (u_strcspn(testSurrogateString, gf) != u_strlen(testSurrogateString)) {
+ log_err("u_strcspn didn't return NULL for \"gf\".\n");
+ }
+ if (u_strcspn(testSurrogateString, surrMatchSet1) != 3) {
+ log_err("u_strcspn couldn't find \"0xdbff, 0xdfff\".\n");
+ }
+ if (u_strcspn(testSurrogateString, surrMatchSet2) != 1) {
+ log_err("u_strcspn couldn't find \"a, b, 0xdbff, 0xdfff\".\n");
+ }
+ if (u_strcspn(testSurrogateString, surrMatchSet3) != 3) {
+ log_err("u_strcspn couldn't find \"0xdb00, 0xdf00, 0xdbff, 0xdfff\".\n");
+ }
+ if (u_strcspn(testSurrogateString, surrMatchSet4) != u_strlen(testSurrogateString)) {
+ log_err("u_strcspn should have returned strlen for empty string.\n");
+ }
+
+
+ log_verbose("Testing u_strspn()");
+
+ if (u_strspn(testString, a) != 1) {
+ log_err("u_strspn couldn't skip first letter a.\n");
+ }
+ if (u_strspn(testString, ab) != 2) {
+ log_err("u_strspn couldn't skip a or b.\n");
+ }
+ if (u_strspn(testString, ba) != 2) {
+ log_err("u_strspn couldn't skip a or b.\n");
+ }
+ if (u_strspn(testString, f) != 0) {
+ log_err("u_strspn didn't return 0 for \"f\".\n");
+ }
+ if (u_strspn(testString, dc) != 0) {
+ log_err("u_strspn couldn't find first letter a (skip d or c).\n");
+ }
+ if (u_strspn(testString, abcd) != u_strlen(testString)) {
+ log_err("u_strspn couldn't skip over the whole string.\n");
+ }
+ if (u_strspn(testString, empty) != 0) {
+ log_err("u_strspn should have returned 0 for empty string.\n");
+ }
+
+ log_verbose("Testing u_strspn() with surrogates");
+ if (u_strspn(testSurrogateString, surrMatchSetBad) != 2) {
+ log_err("u_strspn couldn't skip 0xdbff or a.\n");
+ }
+ if (u_strspn(testSurrogateString, surrMatchSetBad2) != 2) {
+ log_err("u_strspn couldn't skip 0xdbff or a.\n");
+ }
+ if (u_strspn(testSurrogateString, f) != 0) {
+ log_err("u_strspn couldn't skip d or c (skip first letter).\n");
+ }
+ if (u_strspn(testSurrogateString, dc) != 0) {
+ log_err("u_strspn couldn't skip d or c (skip first letter).\n");
+ }
+ if (u_strspn(testSurrogateString, cd) != 0) {
+ log_err("u_strspn couldn't skip d or c (skip first letter).\n");
+ }
+ if (u_strspn(testSurrogateString, testSurrogateString) != u_strlen(testSurrogateString)) {
+ log_err("u_strspn couldn't skip whole string.\n");
+ }
+ if (u_strspn(testSurrogateString, surrMatchSet1) != 0) {
+ log_err("u_strspn couldn't skip \"0xdbff, 0xdfff\" (get first letter).\n");
+ }
+ if (u_strspn(testSurrogateString, surrMatchSetBad3) != 5) {
+ log_err("u_strspn couldn't skip \"0xdbff, a, b, 0xdbff, 0xdfff\".\n");
+ }
+ if (u_strspn(testSurrogateString, surrMatchSet4) != 0) {
+ log_err("u_strspn should have returned 0 for empty string.\n");
+ }
+}
+
+/*
+ * All binary Unicode string searches should behave the same for equivalent input.
+ * See Jitterbug 2145.
+ * There are some new functions, too - just test them all.
+ */
+static void
+TestSurrogateSearching() {
+ static const UChar s[]={
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 */
+ 0x61, 0xd801, 0xdc02, 0x61, 0xdc02, 0x61, 0xd801, 0x61, 0xd801, 0xdc02, 0x61, 0
+ }, sub_a[]={
+ 0x61, 0
+ }, sub_b[]={
+ 0x62, 0
+ }, sub_lead[]={
+ 0xd801, 0
+ }, sub_trail[]={
+ 0xdc02, 0
+ }, sub_supp[]={
+ 0xd801, 0xdc02, 0
+ }, sub_supp2[]={
+ 0xd801, 0xdc03, 0
+ }, sub_a_lead[]={
+ 0x61, 0xd801, 0
+ }, sub_trail_a[]={
+ 0xdc02, 0x61, 0
+ }, sub_aba[]={
+ 0x61, 0x62, 0x61, 0
+ };
+ static const UChar a=0x61, b=0x62, lead=0xd801, trail=0xdc02, nul=0;
+ static const UChar32 supp=0x10402, supp2=0x10403, ill=0x123456;
+
+ const UChar *first, *last;
+
+ /* search for NUL code point: find end of string */
+ first=s+u_strlen(s);
+
+ if(
+ first!=u_strchr(s, nul) ||
+ first!=u_strchr32(s, nul) ||
+ first!=u_memchr(s, nul, LENGTHOF(s)) ||
+ first!=u_memchr32(s, nul, LENGTHOF(s)) ||
+ first!=u_strrchr(s, nul) ||
+ first!=u_strrchr32(s, nul) ||
+ first!=u_memrchr(s, nul, LENGTHOF(s)) ||
+ first!=u_memrchr32(s, nul, LENGTHOF(s))
+ ) {
+ log_err("error: one of the u_str[|mem][r]chr[32](s, nul) does not find the terminator of s\n");
+ }
+
+ /* search for empty substring: find beginning of string */
+ if(
+ s!=u_strstr(s, &nul) ||
+ s!=u_strFindFirst(s, -1, &nul, -1) ||
+ s!=u_strFindFirst(s, -1, &nul, 0) ||
+ s!=u_strFindFirst(s, LENGTHOF(s), &nul, -1) ||
+ s!=u_strFindFirst(s, LENGTHOF(s), &nul, 0) ||
+ s!=u_strrstr(s, &nul) ||
+ s!=u_strFindLast(s, -1, &nul, -1) ||
+ s!=u_strFindLast(s, -1, &nul, 0) ||
+ s!=u_strFindLast(s, LENGTHOF(s), &nul, -1) ||
+ s!=u_strFindLast(s, LENGTHOF(s), &nul, 0)
+ ) {
+ log_err("error: one of the u_str[str etc](s, \"\") does not find s itself\n");
+ }
+
+ /* find 'a' in s[1..10[ */
+ first=s+3;
+ last=s+7;
+ if(
+ first!=u_strchr(s+1, a) ||
+ first!=u_strchr32(s+1, a) ||
+ first!=u_memchr(s+1, a, 9) ||
+ first!=u_memchr32(s+1, a, 9) ||
+ first!=u_strstr(s+1, sub_a) ||
+ first!=u_strFindFirst(s+1, -1, sub_a, -1) ||
+ first!=u_strFindFirst(s+1, -1, &a, 1) ||
+ first!=u_strFindFirst(s+1, 9, sub_a, -1) ||
+ first!=u_strFindFirst(s+1, 9, &a, 1) ||
+ (s+10)!=u_strrchr(s+1, a) ||
+ (s+10)!=u_strrchr32(s+1, a) ||
+ last!=u_memrchr(s+1, a, 9) ||
+ last!=u_memrchr32(s+1, a, 9) ||
+ (s+10)!=u_strrstr(s+1, sub_a) ||
+ (s+10)!=u_strFindLast(s+1, -1, sub_a, -1) ||
+ (s+10)!=u_strFindLast(s+1, -1, &a, 1) ||
+ last!=u_strFindLast(s+1, 9, sub_a, -1) ||
+ last!=u_strFindLast(s+1, 9, &a, 1)
+ ) {
+ log_err("error: one of the u_str[chr etc]('a') does not find the correct place\n");
+ }
+
+ /* do not find 'b' in s[1..10[ */
+ if(
+ NULL!=u_strchr(s+1, b) ||
+ NULL!=u_strchr32(s+1, b) ||
+ NULL!=u_memchr(s+1, b, 9) ||
+ NULL!=u_memchr32(s+1, b, 9) ||
+ NULL!=u_strstr(s+1, sub_b) ||
+ NULL!=u_strFindFirst(s+1, -1, sub_b, -1) ||
+ NULL!=u_strFindFirst(s+1, -1, &b, 1) ||
+ NULL!=u_strFindFirst(s+1, 9, sub_b, -1) ||
+ NULL!=u_strFindFirst(s+1, 9, &b, 1) ||
+ NULL!=u_strrchr(s+1, b) ||
+ NULL!=u_strrchr32(s+1, b) ||
+ NULL!=u_memrchr(s+1, b, 9) ||
+ NULL!=u_memrchr32(s+1, b, 9) ||
+ NULL!=u_strrstr(s+1, sub_b) ||
+ NULL!=u_strFindLast(s+1, -1, sub_b, -1) ||
+ NULL!=u_strFindLast(s+1, -1, &b, 1) ||
+ NULL!=u_strFindLast(s+1, 9, sub_b, -1) ||
+ NULL!=u_strFindLast(s+1, 9, &b, 1)
+ ) {
+ log_err("error: one of the u_str[chr etc]('b') incorrectly finds something\n");
+ }
+
+ /* do not find a non-code point in s[1..10[ */
+ if(
+ NULL!=u_strchr32(s+1, ill) ||
+ NULL!=u_memchr32(s+1, ill, 9) ||
+ NULL!=u_strrchr32(s+1, ill) ||
+ NULL!=u_memrchr32(s+1, ill, 9)
+ ) {
+ log_err("error: one of the u_str[chr etc](illegal code point) incorrectly finds something\n");
+ }
+
+ /* find U+d801 in s[1..10[ */
+ first=s+6;
+ if(
+ first!=u_strchr(s+1, lead) ||
+ first!=u_strchr32(s+1, lead) ||
+ first!=u_memchr(s+1, lead, 9) ||
+ first!=u_memchr32(s+1, lead, 9) ||
+ first!=u_strstr(s+1, sub_lead) ||
+ first!=u_strFindFirst(s+1, -1, sub_lead, -1) ||
+ first!=u_strFindFirst(s+1, -1, &lead, 1) ||
+ first!=u_strFindFirst(s+1, 9, sub_lead, -1) ||
+ first!=u_strFindFirst(s+1, 9, &lead, 1) ||
+ first!=u_strrchr(s+1, lead) ||
+ first!=u_strrchr32(s+1, lead) ||
+ first!=u_memrchr(s+1, lead, 9) ||
+ first!=u_memrchr32(s+1, lead, 9) ||
+ first!=u_strrstr(s+1, sub_lead) ||
+ first!=u_strFindLast(s+1, -1, sub_lead, -1) ||
+ first!=u_strFindLast(s+1, -1, &lead, 1) ||
+ first!=u_strFindLast(s+1, 9, sub_lead, -1) ||
+ first!=u_strFindLast(s+1, 9, &lead, 1)
+ ) {
+ log_err("error: one of the u_str[chr etc](U+d801) does not find the correct place\n");
+ }
+
+ /* find U+dc02 in s[1..10[ */
+ first=s+4;
+ if(
+ first!=u_strchr(s+1, trail) ||
+ first!=u_strchr32(s+1, trail) ||
+ first!=u_memchr(s+1, trail, 9) ||
+ first!=u_memchr32(s+1, trail, 9) ||
+ first!=u_strstr(s+1, sub_trail) ||
+ first!=u_strFindFirst(s+1, -1, sub_trail, -1) ||
+ first!=u_strFindFirst(s+1, -1, &trail, 1) ||
+ first!=u_strFindFirst(s+1, 9, sub_trail, -1) ||
+ first!=u_strFindFirst(s+1, 9, &trail, 1) ||
+ first!=u_strrchr(s+1, trail) ||
+ first!=u_strrchr32(s+1, trail) ||
+ first!=u_memrchr(s+1, trail, 9) ||
+ first!=u_memrchr32(s+1, trail, 9) ||
+ first!=u_strrstr(s+1, sub_trail) ||
+ first!=u_strFindLast(s+1, -1, sub_trail, -1) ||
+ first!=u_strFindLast(s+1, -1, &trail, 1) ||
+ first!=u_strFindLast(s+1, 9, sub_trail, -1) ||
+ first!=u_strFindLast(s+1, 9, &trail, 1)
+ ) {
+ log_err("error: one of the u_str[chr etc](U+dc02) does not find the correct place\n");
+ }
+
+ /* find U+10402 in s[1..10[ */
+ first=s+1;
+ last=s+8;
+ if(
+ first!=u_strchr32(s+1, supp) ||
+ first!=u_memchr32(s+1, supp, 9) ||
+ first!=u_strstr(s+1, sub_supp) ||
+ first!=u_strFindFirst(s+1, -1, sub_supp, -1) ||
+ first!=u_strFindFirst(s+1, -1, sub_supp, 2) ||
+ first!=u_strFindFirst(s+1, 9, sub_supp, -1) ||
+ first!=u_strFindFirst(s+1, 9, sub_supp, 2) ||
+ last!=u_strrchr32(s+1, supp) ||
+ last!=u_memrchr32(s+1, supp, 9) ||
+ last!=u_strrstr(s+1, sub_supp) ||
+ last!=u_strFindLast(s+1, -1, sub_supp, -1) ||
+ last!=u_strFindLast(s+1, -1, sub_supp, 2) ||
+ last!=u_strFindLast(s+1, 9, sub_supp, -1) ||
+ last!=u_strFindLast(s+1, 9, sub_supp, 2)
+ ) {
+ log_err("error: one of the u_str[chr etc](U+10402) does not find the correct place\n");
+ }
+
+ /* do not find U+10402 in a single UChar */
+ if(
+ NULL!=u_memchr32(s+1, supp, 1) ||
+ NULL!=u_strFindFirst(s+1, 1, sub_supp, -1) ||
+ NULL!=u_strFindFirst(s+1, 1, sub_supp, 2) ||
+ NULL!=u_memrchr32(s+1, supp, 1) ||
+ NULL!=u_strFindLast(s+1, 1, sub_supp, -1) ||
+ NULL!=u_strFindLast(s+1, 1, sub_supp, 2) ||
+ NULL!=u_memrchr32(s+2, supp, 1) ||
+ NULL!=u_strFindLast(s+2, 1, sub_supp, -1) ||
+ NULL!=u_strFindLast(s+2, 1, sub_supp, 2)
+ ) {
+ log_err("error: one of the u_str[chr etc](U+10402) incorrectly finds a supplementary c.p. in a single UChar\n");
+ }
+
+ /* do not find U+10403 in s[1..10[ */
+ if(
+ NULL!=u_strchr32(s+1, supp2) ||
+ NULL!=u_memchr32(s+1, supp2, 9) ||
+ NULL!=u_strstr(s+1, sub_supp2) ||
+ NULL!=u_strFindFirst(s+1, -1, sub_supp2, -1) ||
+ NULL!=u_strFindFirst(s+1, -1, sub_supp2, 2) ||
+ NULL!=u_strFindFirst(s+1, 9, sub_supp2, -1) ||
+ NULL!=u_strFindFirst(s+1, 9, sub_supp2, 2) ||
+ NULL!=u_strrchr32(s+1, supp2) ||
+ NULL!=u_memrchr32(s+1, supp2, 9) ||
+ NULL!=u_strrstr(s+1, sub_supp2) ||
+ NULL!=u_strFindLast(s+1, -1, sub_supp2, -1) ||
+ NULL!=u_strFindLast(s+1, -1, sub_supp2, 2) ||
+ NULL!=u_strFindLast(s+1, 9, sub_supp2, -1) ||
+ NULL!=u_strFindLast(s+1, 9, sub_supp2, 2)
+ ) {
+ log_err("error: one of the u_str[chr etc](U+10403) incorrectly finds something\n");
+ }
+
+ /* find <0061 d801> in s[1..10[ */
+ first=s+5;
+ if(
+ first!=u_strstr(s+1, sub_a_lead) ||
+ first!=u_strFindFirst(s+1, -1, sub_a_lead, -1) ||
+ first!=u_strFindFirst(s+1, -1, sub_a_lead, 2) ||
+ first!=u_strFindFirst(s+1, 9, sub_a_lead, -1) ||
+ first!=u_strFindFirst(s+1, 9, sub_a_lead, 2) ||
+ first!=u_strrstr(s+1, sub_a_lead) ||
+ first!=u_strFindLast(s+1, -1, sub_a_lead, -1) ||
+ first!=u_strFindLast(s+1, -1, sub_a_lead, 2) ||
+ first!=u_strFindLast(s+1, 9, sub_a_lead, -1) ||
+ first!=u_strFindLast(s+1, 9, sub_a_lead, 2)
+ ) {
+ log_err("error: one of the u_str[str etc](<0061 d801>) does not find the correct place\n");
+ }
+
+ /* find <dc02 0061> in s[1..10[ */
+ first=s+4;
+ if(
+ first!=u_strstr(s+1, sub_trail_a) ||
+ first!=u_strFindFirst(s+1, -1, sub_trail_a, -1) ||
+ first!=u_strFindFirst(s+1, -1, sub_trail_a, 2) ||
+ first!=u_strFindFirst(s+1, 9, sub_trail_a, -1) ||
+ first!=u_strFindFirst(s+1, 9, sub_trail_a, 2) ||
+ first!=u_strrstr(s+1, sub_trail_a) ||
+ first!=u_strFindLast(s+1, -1, sub_trail_a, -1) ||
+ first!=u_strFindLast(s+1, -1, sub_trail_a, 2) ||
+ first!=u_strFindLast(s+1, 9, sub_trail_a, -1) ||
+ first!=u_strFindLast(s+1, 9, sub_trail_a, 2)
+ ) {
+ log_err("error: one of the u_str[str etc](<dc02 0061>) does not find the correct place\n");
+ }
+
+ /* do not find "aba" in s[1..10[ */
+ if(
+ NULL!=u_strstr(s+1, sub_aba) ||
+ NULL!=u_strFindFirst(s+1, -1, sub_aba, -1) ||
+ NULL!=u_strFindFirst(s+1, -1, sub_aba, 3) ||
+ NULL!=u_strFindFirst(s+1, 9, sub_aba, -1) ||
+ NULL!=u_strFindFirst(s+1, 9, sub_aba, 3) ||
+ NULL!=u_strrstr(s+1, sub_aba) ||
+ NULL!=u_strFindLast(s+1, -1, sub_aba, -1) ||
+ NULL!=u_strFindLast(s+1, -1, sub_aba, 3) ||
+ NULL!=u_strFindLast(s+1, 9, sub_aba, -1) ||
+ NULL!=u_strFindLast(s+1, 9, sub_aba, 3)
+ ) {
+ log_err("error: one of the u_str[str etc](\"aba\") incorrectly finds something\n");
+ }
+}
+
+static void TestStringCopy()
+{
+ UChar temp[40];
+ UChar *result=0;
+ UChar subString[5];
+ UChar uchars[]={0x61, 0x62, 0x63, 0x00};
+ char charOut[40];
+ char chars[]="abc"; /* needs default codepage */
+
+ log_verbose("Testing u_uastrncpy() and u_uastrcpy()");
+
+ u_uastrcpy(temp, "abc");
+ if(u_strcmp(temp, uchars) != 0) {
+ log_err("There is an error in u_uastrcpy() Expected %s Got %s\n", austrdup(uchars), austrdup(temp));
+ }
+
+ temp[0] = 0xFB; /* load garbage into it */
+ temp[1] = 0xFB;
+ temp[2] = 0xFB;
+ temp[3] = 0xFB;
+
+ u_uastrncpy(temp, "abcabcabc", 3);
+ if(u_strncmp(uchars, temp, 3) != 0){
+ log_err("There is an error in u_uastrncpy() Expected %s Got %s\n", austrdup(uchars), austrdup(temp));
+ }
+ if(temp[3] != 0xFB) {
+ log_err("u_uastrncpy wrote past it's bounds. Expected undisturbed byte at 3\n");
+ }
+
+ charOut[0] = (char)0x7B; /* load garbage into it */
+ charOut[1] = (char)0x7B;
+ charOut[2] = (char)0x7B;
+ charOut[3] = (char)0x7B;
+
+ temp[0] = 0x0061;
+ temp[1] = 0x0062;
+ temp[2] = 0x0063;
+ temp[3] = 0x0061;
+ temp[4] = 0x0062;
+ temp[5] = 0x0063;
+ temp[6] = 0x0000;
+
+ u_austrncpy(charOut, temp, 3);
+ if(strncmp(chars, charOut, 3) != 0){
+ log_err("There is an error in u_austrncpy() Expected %s Got %s\n", austrdup(uchars), austrdup(temp));
+ }
+ if(charOut[3] != (char)0x7B) {
+ log_err("u_austrncpy wrote past it's bounds. Expected undisturbed byte at 3\n");
+ }
+
+ /*Testing u_strchr()*/
+ log_verbose("Testing u_strchr\n");
+ temp[0]=0x42;
+ temp[1]=0x62;
+ temp[2]=0x62;
+ temp[3]=0x63;
+ temp[4]=0xd841;
+ temp[5]=0xd841;
+ temp[6]=0xdc02;
+ temp[7]=0;
+ result=u_strchr(temp, (UChar)0x62);
+ if(result != temp+1){
+ log_err("There is an error in u_strchr() Expected match at position 1 Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+ /*Testing u_strstr()*/
+ log_verbose("Testing u_strstr\n");
+ subString[0]=0x62;
+ subString[1]=0x63;
+ subString[2]=0;
+ result=u_strstr(temp, subString);
+ if(result != temp+2){
+ log_err("There is an error in u_strstr() Expected match at position 2 Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+ result=u_strstr(temp, subString+2); /* subString+2 is an empty string */
+ if(result != temp){
+ log_err("There is an error in u_strstr() Expected match at position 0 Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+ result=u_strstr(subString, temp);
+ if(result != NULL){
+ log_err("There is an error in u_strstr() Expected NULL \"not found\" Got non-NULL \"found\" result\n");
+ }
+
+ /*Testing u_strchr32*/
+ log_verbose("Testing u_strchr32\n");
+ result=u_strchr32(temp, (UChar32)0x62);
+ if(result != temp+1){
+ log_err("There is an error in u_strchr32() Expected match at position 1 Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+ result=u_strchr32(temp, (UChar32)0xfb);
+ if(result != NULL){
+ log_err("There is an error in u_strchr32() Expected NULL \"not found\" Got non-NULL \"found\" result\n");
+ }
+ result=u_strchr32(temp, (UChar32)0x20402);
+ if(result != temp+5){
+ log_err("There is an error in u_strchr32() Expected match at position 5 Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+
+ temp[7]=0xfc00;
+ result=u_memchr32(temp, (UChar32)0x20402, 7);
+ if(result != temp+5){
+ log_err("There is an error in u_memchr32() Expected match at position 5 Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+ result=u_memchr32(temp, (UChar32)0x20402, 6);
+ if(result != NULL){
+ log_err("There is an error in u_memchr32() Expected no match Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+ result=u_memchr32(temp, (UChar32)0x20402, 1);
+ if(result != NULL){
+ log_err("There is an error in u_memchr32() Expected no match Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+ result=u_memchr32(temp, (UChar32)0xfc00, 8);
+ if(result != temp+7){
+ log_err("There is an error in u_memchr32() Expected match at position 7 Got %ld (pointer 0x%lx)\n", result-temp, result);
+ }
+}
+
+/* test u_unescape() and u_unescapeAt() ------------------------------------- */
+
+static void
+TestUnescape() {
+ static UChar buffer[200];
+
+ static const char* input =
+ "Sch\\u00f6nes Auto: \\u20ac 11240.\\fPrivates Zeichen: \\U00102345\\e\\cC\\n \\x1b\\x{263a}";
+
+ static const UChar expect[]={
+ 0x53, 0x63, 0x68, 0xf6, 0x6e, 0x65, 0x73, 0x20, 0x41, 0x75, 0x74, 0x6f, 0x3a, 0x20,
+ 0x20ac, 0x20, 0x31, 0x31, 0x32, 0x34, 0x30, 0x2e, 0x0c,
+ 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x73, 0x20,
+ 0x5a, 0x65, 0x69, 0x63, 0x68, 0x65, 0x6e, 0x3a, 0x20, 0xdbc8, 0xdf45, 0x1b, 0x03, 0x0a, 0x20, 0x1b, 0x263A, 0
+ };
+ static const int32_t explength = sizeof(expect)/sizeof(expect[0])-1;
+ int32_t length;
+
+ /* test u_unescape() */
+ length=u_unescape(input, buffer, sizeof(buffer)/sizeof(buffer[0]));
+ if(length!=explength || u_strcmp(buffer, expect)!=0) {
+ log_err("failure in u_unescape(): length %d!=%d and/or incorrect result string\n", length,
+ explength);
+ }
+
+ /* try preflighting */
+ length=u_unescape(input, NULL, sizeof(buffer)/sizeof(buffer[0]));
+ if(length!=explength || u_strcmp(buffer, expect)!=0) {
+ log_err("failure in u_unescape(preflighting): length %d!=%d\n", length, explength);
+ }
+
+ /* ### TODO: test u_unescapeAt() */
+}
+
+/* test code point counting functions --------------------------------------- */
+
+/* reference implementation of u_strHasMoreChar32Than() */
+static int32_t
+_refStrHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) {
+ int32_t count=u_countChar32(s, length);
+ return count>number;
+}
+
+/* compare the real function against the reference */
+static void
+_testStrHasMoreChar32Than(const UChar *s, int32_t i, int32_t length, int32_t number) {
+ if(u_strHasMoreChar32Than(s, length, number)!=_refStrHasMoreChar32Than(s, length, number)) {
+ log_err("u_strHasMoreChar32Than(s+%d, %d, %d)=%hd is wrong\n",
+ i, length, number, u_strHasMoreChar32Than(s, length, number));
+ }
+}
+
+static void
+TestCountChar32() {
+ static const UChar string[]={
+ 0x61, 0x62, 0xd800, 0xdc00,
+ 0xd801, 0xdc01, 0x63, 0xd802,
+ 0x64, 0xdc03, 0x65, 0x66,
+ 0xd804, 0xdc04, 0xd805, 0xdc05,
+ 0x67
+ };
+ UChar buffer[100];
+ int32_t i, length, number;
+
+ /* test u_strHasMoreChar32Than() with length>=0 */
+ length=LENGTHOF(string);
+ while(length>=0) {
+ for(i=0; i<=length; ++i) {
+ for(number=-1; number<=((length-i)+2); ++number) {
+ _testStrHasMoreChar32Than(string+i, i, length-i, number);
+ }
+ }
+ --length;
+ }
+
+ /* test u_strHasMoreChar32Than() with NUL-termination (length=-1) */
+ length=LENGTHOF(string);
+ u_memcpy(buffer, string, length);
+ while(length>=0) {
+ buffer[length]=0;
+ for(i=0; i<=length; ++i) {
+ for(number=-1; number<=((length-i)+2); ++number) {
+ _testStrHasMoreChar32Than(string+i, i, -1, number);
+ }
+ }
+ --length;
+ }
+
+ /* test u_strHasMoreChar32Than() with NULL string (bad input) */
+ for(length=-1; length<=1; ++length) {
+ for(i=0; i<=length; ++i) {
+ for(number=-2; number<=2; ++number) {
+ _testStrHasMoreChar32Than(NULL, 0, length, number);
+ }
+ }
+ }
+}
+
+/* UCharIterator ------------------------------------------------------------ */
+
+/*
+ * Compare results from two iterators, should be same.
+ * Assume that the text is not empty and that
+ * iteration start==0 and iteration limit==length.
+ */
+static void
+compareIterators(UCharIterator *iter1, const char *n1,
+ UCharIterator *iter2, const char *n2) {
+ int32_t i, pos1, pos2, middle, length;
+ UChar32 c1, c2;
+
+ /* compare lengths */
+ length=iter1->getIndex(iter1, UITER_LENGTH);
+ pos2=iter2->getIndex(iter2, UITER_LENGTH);
+ if(length!=pos2) {
+ log_err("%s->getIndex(length)=%d != %d=%s->getIndex(length)\n", n1, length, pos2, n2);
+ return;
+ }
+
+ /* set into the middle */
+ middle=length/2;
+
+ pos1=iter1->move(iter1, middle, UITER_ZERO);
+ if(pos1!=middle) {
+ log_err("%s->move(from 0 to middle %d)=%d does not move to the middle\n", n1, middle, pos1);
+ return;
+ }
+
+ pos2=iter2->move(iter2, middle, UITER_ZERO);
+ if(pos2!=middle) {
+ log_err("%s->move(from 0 to middle %d)=%d does not move to the middle\n", n2, middle, pos2);
+ return;
+ }
+
+ /* test current() */
+ c1=iter1->current(iter1);
+ c2=iter2->current(iter2);
+ if(c1!=c2) {
+ log_err("%s->current()=U+%04x != U+%04x=%s->current() at middle=%d\n", n1, c1, c2, n2, middle);
+ return;
+ }
+
+ /* move forward 3 UChars */
+ for(i=0; i<3; ++i) {
+ c1=iter1->next(iter1);
+ c2=iter2->next(iter2);
+ if(c1!=c2) {
+ log_err("%s->next()=U+%04x != U+%04x=%s->next() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ }
+
+ /* move backward 5 UChars */
+ for(i=0; i<5; ++i) {
+ c1=iter1->previous(iter1);
+ c2=iter2->previous(iter2);
+ if(c1!=c2) {
+ log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ }
+
+ /* iterate forward from the beginning */
+ pos1=iter1->move(iter1, 0, UITER_START);
+ if(pos1<0) {
+ log_err("%s->move(start) failed\n", n1);
+ return;
+ }
+ if(!iter1->hasNext(iter1)) {
+ log_err("%s->hasNext() at the start returns FALSE\n", n1);
+ return;
+ }
+
+ pos2=iter2->move(iter2, 0, UITER_START);
+ if(pos2<0) {
+ log_err("%s->move(start) failed\n", n2);
+ return;
+ }
+ if(!iter2->hasNext(iter2)) {
+ log_err("%s->hasNext() at the start returns FALSE\n", n2);
+ return;
+ }
+
+ do {
+ c1=iter1->next(iter1);
+ c2=iter2->next(iter2);
+ if(c1!=c2) {
+ log_err("%s->next()=U+%04x != U+%04x=%s->next() at %d\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ } while(c1>=0);
+
+ if(iter1->hasNext(iter1)) {
+ log_err("%s->hasNext() at the end returns TRUE\n", n1);
+ return;
+ }
+ if(iter2->hasNext(iter2)) {
+ log_err("%s->hasNext() at the end returns TRUE\n", n2);
+ return;
+ }
+
+ /* back to the middle */
+ pos1=iter1->move(iter1, middle, UITER_ZERO);
+ if(pos1!=middle) {
+ log_err("%s->move(from end to middle %d)=%d does not move to the middle\n", n1, middle, pos1);
+ return;
+ }
+
+ pos2=iter2->move(iter2, middle, UITER_ZERO);
+ if(pos2!=middle) {
+ log_err("%s->move(from end to middle %d)=%d does not move to the middle\n", n2, middle, pos2);
+ return;
+ }
+
+ /* move to index 1 */
+ pos1=iter1->move(iter1, 1, UITER_ZERO);
+ if(pos1!=1) {
+ log_err("%s->move(from middle %d to 1)=%d does not move to 1\n", n1, middle, pos1);
+ return;
+ }
+
+ pos2=iter2->move(iter2, 1, UITER_ZERO);
+ if(pos2!=1) {
+ log_err("%s->move(from middle %d to 1)=%d does not move to 1\n", n2, middle, pos2);
+ return;
+ }
+
+ /* iterate backward from the end */
+ pos1=iter1->move(iter1, 0, UITER_LIMIT);
+ if(pos1<0) {
+ log_err("%s->move(limit) failed\n", n1);
+ return;
+ }
+ if(!iter1->hasPrevious(iter1)) {
+ log_err("%s->hasPrevious() at the end returns FALSE\n", n1);
+ return;
+ }
+
+ pos2=iter2->move(iter2, 0, UITER_LIMIT);
+ if(pos2<0) {
+ log_err("%s->move(limit) failed\n", n2);
+ return;
+ }
+ if(!iter2->hasPrevious(iter2)) {
+ log_err("%s->hasPrevious() at the end returns FALSE\n", n2);
+ return;
+ }
+
+ do {
+ c1=iter1->previous(iter1);
+ c2=iter2->previous(iter2);
+ if(c1!=c2) {
+ log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ } while(c1>=0);
+
+ if(iter1->hasPrevious(iter1)) {
+ log_err("%s->hasPrevious() at the start returns TRUE\n", n1);
+ return;
+ }
+ if(iter2->hasPrevious(iter2)) {
+ log_err("%s->hasPrevious() at the start returns TRUE\n", n2);
+ return;
+ }
+}
+
+/*
+ * Test the iterator's getState() and setState() functions.
+ * iter1 and iter2 must be set up for the same iterator type and the same string
+ * but may be physically different structs (different addresses).
+ *
+ * Assume that the text is not empty and that
+ * iteration start==0 and iteration limit==length.
+ * It must be 2<=middle<=length-2.
+ */
+static void
+testIteratorState(UCharIterator *iter1, UCharIterator *iter2, const char *n, int32_t middle) {
+ UChar32 u[4];
+
+ UErrorCode errorCode;
+ UChar32 c;
+ uint32_t state;
+ int32_t i, j;
+
+ /* get four UChars from the middle of the string */
+ iter1->move(iter1, middle-2, UITER_ZERO);
+ for(i=0; i<4; ++i) {
+ c=iter1->next(iter1);
+ if(c<0) {
+ /* the test violates the assumptions, see comment above */
+ log_err("test error: %s[%d]=%d\n", n, middle-2+i, c);
+ return;
+ }
+ u[i]=c;
+ }
+
+ /* move to the middle and get the state */
+ iter1->move(iter1, -2, UITER_CURRENT);
+ state=uiter_getState(iter1);
+
+ /* set the state into the second iterator and compare the results */
+ errorCode=U_ZERO_ERROR;
+ uiter_setState(iter2, state, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("%s->setState(0x%x) failed: %s\n", n, state, u_errorName(errorCode));
+ return;
+ }
+
+ c=iter2->current(iter2);
+ if(c!=u[2]) {
+ log_err("%s->current(at %d)=U+%04x!=U+%04x\n", n, middle, c, u[2]);
+ }
+
+ c=iter2->previous(iter2);
+ if(c!=u[1]) {
+ log_err("%s->previous(at %d)=U+%04x!=U+%04x\n", n, middle-1, c, u[1]);
+ }
+
+ iter2->move(iter2, 2, UITER_CURRENT);
+ c=iter2->next(iter2);
+ if(c!=u[3]) {
+ log_err("%s->next(at %d)=U+%04x!=U+%04x\n", n, middle+1, c, u[3]);
+ }
+
+ iter2->move(iter2, -3, UITER_CURRENT);
+ c=iter2->previous(iter2);
+ if(c!=u[0]) {
+ log_err("%s->previous(at %d)=U+%04x!=U+%04x\n", n, middle-2, c, u[0]);
+ }
+
+ /* move the second iterator back to the middle */
+ iter2->move(iter2, 1, UITER_CURRENT);
+ iter2->next(iter2);
+
+ /* check that both are in the middle */
+ i=iter1->getIndex(iter1, UITER_CURRENT);
+ j=iter2->getIndex(iter2, UITER_CURRENT);
+ if(i!=middle) {
+ log_err("%s->getIndex(current)=%d!=%d as expected\n", n, i, middle);
+ }
+ if(i!=j) {
+ log_err("%s->getIndex(current)=%d!=%d after setState()\n", n, j, i);
+ }
+
+ /* compare lengths */
+ i=iter1->getIndex(iter1, UITER_LENGTH);
+ j=iter2->getIndex(iter2, UITER_LENGTH);
+ if(i!=j) {
+ log_err("%s->getIndex(length)=%d!=%d before/after setState()\n", n, i, j);
+ }
+}
+
+static void
+TestUCharIterator() {
+ static const UChar text[]={
+ 0x61, 0x62, 0x63, 0xd801, 0xdffd, 0x78, 0x79, 0x7a, 0
+ };
+ char bytes[40];
+
+ UCharIterator iter, iter1, iter2;
+ UConverter *cnv;
+ UErrorCode errorCode;
+ int32_t length;
+
+ /* simple API/code coverage - test NOOP UCharIterator */
+ uiter_setString(&iter, NULL, 0);
+ if( iter.current(&iter)!=-1 || iter.next(&iter)!=-1 || iter.previous(&iter)!=-1 ||
+ iter.move(&iter, 1, UITER_CURRENT) || iter.getIndex(&iter, UITER_CURRENT)!=0 ||
+ iter.hasNext(&iter) || iter.hasPrevious(&iter)
+ ) {
+ log_err("NOOP UCharIterator behaves unexpectedly\n");
+ }
+
+ /* test get/set state */
+ length=LENGTHOF(text)-1;
+ uiter_setString(&iter1, text, -1);
+ uiter_setString(&iter2, text, length);
+ testIteratorState(&iter1, &iter2, "UTF16IteratorState", length/2);
+ testIteratorState(&iter1, &iter2, "UTF16IteratorStatePlus1", length/2+1);
+
+ /* compare the same string between UTF-16 and UTF-8 UCharIterators ------ */
+ errorCode=U_ZERO_ERROR;
+ u_strToUTF8(bytes, sizeof(bytes), &length, text, -1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("u_strToUTF8() failed, %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uiter_setString(&iter1, text, -1);
+ uiter_setUTF8(&iter2, bytes, length);
+ compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF8Iterator");
+
+ /* try again with length=-1 */
+ uiter_setUTF8(&iter2, bytes, -1);
+ compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF8Iterator_1");
+
+ /* test get/set state */
+ length=LENGTHOF(text)-1;
+ uiter_setUTF8(&iter1, bytes, -1);
+ testIteratorState(&iter1, &iter2, "UTF8IteratorState", length/2);
+ testIteratorState(&iter1, &iter2, "UTF8IteratorStatePlus1", length/2+1);
+
+ /* compare the same string between UTF-16 and UTF-16BE UCharIterators --- */
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open("UTF-16BE", &errorCode);
+ length=ucnv_fromUChars(cnv, bytes, sizeof(bytes), text, -1, &errorCode);
+ ucnv_close(cnv);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucnv_fromUChars(UTF-16BE) failed, %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* terminate with a _pair_ of 0 bytes - a UChar NUL in UTF-16BE (length is known to be ok) */
+ bytes[length]=bytes[length+1]=0;
+
+ uiter_setString(&iter1, text, -1);
+ uiter_setUTF16BE(&iter2, bytes, length);
+ compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF16BEIterator");
+
+ /* try again with length=-1 */
+ uiter_setUTF16BE(&iter2, bytes, -1);
+ compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF16BEIterator_1");
+
+ /* try again after moving the bytes up one, and with length=-1 */
+ memmove(bytes+1, bytes, length+2);
+ uiter_setUTF16BE(&iter2, bytes+1, -1);
+ compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF16BEIteratorMoved1");
+
+ /* ### TODO test other iterators: CharacterIterator, Replaceable */
+}
+
+#if UCONFIG_NO_COLLATION
+
+static void
+TestUNormIterator() {
+ /* test nothing */
+}
+
+static void
+TestBadUNormIterator(void) {
+ /* test nothing, as well */
+}
+
+#else
+
+#include "unicode/unorm.h"
+#include "unorm_it.h"
+
+/*
+ * Compare results from two iterators, should be same.
+ * Assume that the text is not empty and that
+ * iteration start==0 and iteration limit==length.
+ *
+ * Modified version of compareIterators() but does not assume that indexes
+ * are available.
+ */
+static void
+compareIterNoIndexes(UCharIterator *iter1, const char *n1,
+ UCharIterator *iter2, const char *n2,
+ int32_t middle) {
+ uint32_t state;
+ int32_t i;
+ UChar32 c1, c2;
+ UErrorCode errorCode;
+
+ /* code coverage for unorm_it.c/unormIteratorGetIndex() */
+ if(
+ iter2->getIndex(iter2, UITER_START)!=0 ||
+ iter2->getIndex(iter2, UITER_LENGTH)!=UITER_UNKNOWN_INDEX
+ ) {
+ log_err("UNormIterator.getIndex() failed\n");
+ }
+
+ /* set into the middle */
+ iter1->move(iter1, middle, UITER_ZERO);
+ iter2->move(iter2, middle, UITER_ZERO);
+
+ /* test current() */
+ c1=iter1->current(iter1);
+ c2=iter2->current(iter2);
+ if(c1!=c2) {
+ log_err("%s->current()=U+%04x != U+%04x=%s->current() at middle=%d\n", n1, c1, c2, n2, middle);
+ return;
+ }
+
+ /* move forward 3 UChars */
+ for(i=0; i<3; ++i) {
+ c1=iter1->next(iter1);
+ c2=iter2->next(iter2);
+ if(c1!=c2) {
+ log_err("%s->next()=U+%04x != U+%04x=%s->next() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ }
+
+ /* move backward 5 UChars */
+ for(i=0; i<5; ++i) {
+ c1=iter1->previous(iter1);
+ c2=iter2->previous(iter2);
+ if(c1!=c2) {
+ log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ }
+
+ /* iterate forward from the beginning */
+ iter1->move(iter1, 0, UITER_START);
+ if(!iter1->hasNext(iter1)) {
+ log_err("%s->hasNext() at the start returns FALSE\n", n1);
+ return;
+ }
+
+ iter2->move(iter2, 0, UITER_START);
+ if(!iter2->hasNext(iter2)) {
+ log_err("%s->hasNext() at the start returns FALSE\n", n2);
+ return;
+ }
+
+ do {
+ c1=iter1->next(iter1);
+ c2=iter2->next(iter2);
+ if(c1!=c2) {
+ log_err("%s->next()=U+%04x != U+%04x=%s->next() at %d\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ } while(c1>=0);
+
+ if(iter1->hasNext(iter1)) {
+ log_err("%s->hasNext() at the end returns TRUE\n", n1);
+ return;
+ }
+ if(iter2->hasNext(iter2)) {
+ log_err("%s->hasNext() at the end returns TRUE\n", n2);
+ return;
+ }
+
+ /* iterate backward */
+ do {
+ c1=iter1->previous(iter1);
+ c2=iter2->previous(iter2);
+ if(c1!=c2) {
+ log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ } while(c1>=0);
+
+ /* back to the middle */
+ iter1->move(iter1, middle, UITER_ZERO);
+ iter2->move(iter2, middle, UITER_ZERO);
+
+ /* try get/set state */
+ while((state=uiter_getState(iter2))==UITER_NO_STATE) {
+ if(!iter2->hasNext(iter2)) {
+ log_err("%s has no known state from middle=%d to the end\n", n2, middle);
+ return;
+ }
+ iter2->next(iter2);
+ }
+
+ errorCode=U_ZERO_ERROR;
+
+ c2=iter2->current(iter2);
+ iter2->move(iter2, 0, UITER_ZERO);
+ uiter_setState(iter2, state, &errorCode);
+ c1=iter2->current(iter2);
+ if(U_FAILURE(errorCode) || c1!=c2) {
+ log_err("%s->current() differs across get/set state, U+%04x vs. U+%04x\n", n2, c2, c1);
+ return;
+ }
+
+ c2=iter2->previous(iter2);
+ iter2->move(iter2, 0, UITER_ZERO);
+ uiter_setState(iter2, state, &errorCode);
+ c1=iter2->previous(iter2);
+ if(U_FAILURE(errorCode) || c1!=c2) {
+ log_err("%s->previous() differs across get/set state, U+%04x vs. U+%04x\n", n2, c2, c1);
+ return;
+ }
+
+ /* iterate backward from the end */
+ iter1->move(iter1, 0, UITER_LIMIT);
+ if(!iter1->hasPrevious(iter1)) {
+ log_err("%s->hasPrevious() at the end returns FALSE\n", n1);
+ return;
+ }
+
+ iter2->move(iter2, 0, UITER_LIMIT);
+ if(!iter2->hasPrevious(iter2)) {
+ log_err("%s->hasPrevious() at the end returns FALSE\n", n2);
+ return;
+ }
+
+ do {
+ c1=iter1->previous(iter1);
+ c2=iter2->previous(iter2);
+ if(c1!=c2) {
+ log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
+ return;
+ }
+ } while(c1>=0);
+
+ if(iter1->hasPrevious(iter1)) {
+ log_err("%s->hasPrevious() at the start returns TRUE\n", n1);
+ return;
+ }
+ if(iter2->hasPrevious(iter2)) {
+ log_err("%s->hasPrevious() at the start returns TRUE\n", n2);
+ return;
+ }
+}
+
+/* n2 must have a digit 1 at the end, will be incremented with the normalization mode */
+static void
+testUNormIteratorWithText(const UChar *text, int32_t textLength, int32_t middle,
+ const char *name1, const char *n2) {
+ UChar buffer[600];
+ char name2[40];
+
+ UCharIterator iter1, iter2, *iter;
+ UNormIterator *uni;
+
+ UNormalizationMode mode;
+ UErrorCode errorCode;
+ int32_t length;
+
+ /* open a normalizing iterator */
+ errorCode=U_ZERO_ERROR;
+ uni=unorm_openIter(NULL, 0, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unorm_openIter() fails: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* set iterator 2 to the original text */
+ uiter_setString(&iter2, text, textLength);
+
+ strcpy(name2, n2);
+
+ /* test the normalizing iterator for each mode */
+ for(mode=UNORM_NONE; mode<UNORM_MODE_COUNT; ++mode) {
+ length=unorm_normalize(text, textLength, mode, 0, buffer, LENGTHOF(buffer), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unorm_normalize(mode %d) failed: %s\n", mode, u_errorName(errorCode));
+ break;
+ }
+
+ /* set iterator 1 to the normalized text */
+ uiter_setString(&iter1, buffer, length);
+
+ /* set the normalizing iterator to use iter2 */
+ iter=unorm_setIter(uni, &iter2, mode, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unorm_setIter(mode %d) failed: %s\n", mode, u_errorName(errorCode));
+ break;
+ }
+
+ compareIterNoIndexes(&iter1, name1, iter, name2, middle);
+ ++name2[strlen(name2)-1];
+ }
+
+ unorm_closeIter(uni);
+}
+
+static void
+TestUNormIterator() {
+ static const UChar text[]={ /* must contain <00C5 0327> see u_strchr() below */
+ 0x61, /* 'a' */
+ 0xe4, 0x61, 0x308, /* variations of 'a'+umlaut */
+ 0xc5, 0x327, 0x41, 0x30a, 0x327, 0x41, 0x327, 0x30a, /* variations of 'A'+ring+cedilla */
+ 0xfb03, 0xfb00, 0x69, 0x66, 0x66, 0x69, 0x66, 0xfb01 /* variations of 'ffi' */
+ };
+ static const UChar surrogateText[]={
+ 0x6e, 0xd900, 0x6a, 0xdc00, 0xd900, 0xdc00, 0x61
+ };
+
+ UChar longText[600];
+ int32_t i, middle, length;
+
+ length=LENGTHOF(text);
+ testUNormIteratorWithText(text, length, length/2, "UCharIter", "UNormIter1");
+ testUNormIteratorWithText(text, length, length, "UCharIterEnd", "UNormIterEnd1");
+
+ /* test again, this time with an insane string to cause internal buffer overflows */
+ middle=(int32_t)(u_strchr(text, 0x327)-text); /* see comment at text[] */
+ memcpy(longText, text, middle*U_SIZEOF_UCHAR);
+ for(i=0; i<150; ++i) {
+ longText[middle+i]=0x30a; /* insert many rings between 'A-ring' and cedilla */
+ }
+ memcpy(longText+middle+i, text+middle, (LENGTHOF(text)-middle)*U_SIZEOF_UCHAR);
+ length=LENGTHOF(text)+i;
+
+ /* append another copy of this string for more overflows */
+ memcpy(longText+length, longText, length*U_SIZEOF_UCHAR);
+ length*=2;
+
+ /* the first test of the following two starts at length/4, inside the sea of combining rings */
+ testUNormIteratorWithText(longText, length, length/4, "UCharIterLong", "UNormIterLong1");
+ testUNormIteratorWithText(longText, length, length, "UCharIterLongEnd", "UNormIterLongEnd1");
+
+ length=LENGTHOF(surrogateText);
+ testUNormIteratorWithText(surrogateText, length, length/4, "UCharIterSurr", "UNormIterSurr1");
+ testUNormIteratorWithText(surrogateText, length, length, "UCharIterSurrEnd", "UNormIterSurrEnd1");
+}
+
+static void
+TestBadUNormIterator(void) {
+#if !UCONFIG_NO_NORMALIZATION
+ UErrorCode status = U_ILLEGAL_ESCAPE_SEQUENCE;
+ UNormIterator *uni;
+
+ unorm_setIter(NULL, NULL, UNORM_NONE, &status);
+ if (status != U_ILLEGAL_ESCAPE_SEQUENCE) {
+ log_err("unorm_setIter changed the error code to: %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ unorm_setIter(NULL, NULL, UNORM_NONE, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("unorm_setIter didn't react correctly to bad arguments: %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ uni=unorm_openIter(NULL, 0, &status);
+ if(U_FAILURE(status)) {
+ log_err("unorm_openIter() fails: %s\n", u_errorName(status));
+ return;
+ }
+ unorm_setIter(uni, NULL, UNORM_NONE, &status);
+ unorm_closeIter(uni);
+#endif
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/cutiltst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/cutiltst.c
new file mode 100644
index 00000000000..2bb339c6d96
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/cutiltst.c
@@ -0,0 +1,48 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File CUTILTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Creation
+*********************************************************************************
+*/
+#include "cintltst.h"
+
+void addLocaleTest(TestNode**);
+void addCLDRTest(TestNode**);
+void addUnicodeTest(TestNode**);
+void addUStringTest(TestNode**);
+void addCaseTest(TestNode**);
+void addResourceBundleTest(TestNode**);
+void addNEWResourceBundleTest(TestNode**);
+void addHashtableTest(TestNode** root);
+void addCStringTest(TestNode** root);
+void addTrieTest(TestNode** root);
+void addEnumerationTest(TestNode** root);
+void addPosixTest(TestNode** root);
+void addSortTest(TestNode** root);
+
+void addUtility(TestNode** root);
+
+void addUtility(TestNode** root)
+{
+ addCStringTest(root);
+ addTrieTest(root);
+ addLocaleTest(root);
+ addCLDRTest(root);
+ addUnicodeTest(root);
+ addUStringTest(root);
+ addCaseTest(root);
+ addResourceBundleTest(root);
+ addNEWResourceBundleTest(root);
+ addHashtableTest(root);
+ addEnumerationTest(root);
+ addPosixTest(root);
+ addSortTest(root);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/encoll.c b/Build/source/libs/icu/icu-xetex/test/cintltst/encoll.c
new file mode 100644
index 00000000000..1c48eca45aa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/encoll.c
@@ -0,0 +1,357 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File encoll.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Ported for C API
+*********************************************************************************/
+/**
+ * CollationEnglishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/ucol.h"
+#include "unicode/uloc.h"
+#include "cintltst.h"
+#include "encoll.h"
+#include "ccolltst.h"
+#include "callcoll.h"
+#include "unicode/ustring.h"
+
+static UCollator *myCollation = NULL;
+const static UChar testSourceCases[][MAX_TOKEN_LEN] = {
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0020 /* ' ' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0048 /* 'H' */, (UChar)0x0065 /* 'e' */, (UChar)0x006C /* 'l' */, (UChar)0x006C /* 'l' */, (UChar)0x006F /* 'o' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00EA, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0},
+ {0x00C4, (UChar)0x0042 /* 'B' */, 0x0308, (UChar)0x0043 /* 'C' */, 0x0308, 0},
+ {(UChar)0x0061 /* 'a' */, 0x0308, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, 0},
+ {(UChar)0x0072 /* 'r' */, (UChar)0x006F /* 'o' */, (UChar)0x006C /* 'l' */, (UChar)0x0065 /* 'e' */, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0074 /* 't' */, (UChar)0x0063 /* 'c' */, (UChar)0x006F /* 'o' */, (UChar)0x006D /* 'm' */, (UChar)0x0070 /* 'p' */, (UChar)0x0061 /* 'a' */, (UChar)0x0072 /* 'r' */, (UChar)0x0065 /* 'e' */, (UChar)0x0070 /* 'p' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0069 /* 'i' */, (UChar)0x006E /* 'n' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00E6, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x0048 /* 'H' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x0308, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0074 /* 't' */, (UChar)0x0068 /* 'h' */, (UChar)0x0069 /* 'i' */, 0x0302, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00EA, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00E6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00E6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0}
+};
+
+const static UChar testTargetCases[][MAX_TOKEN_LEN] = {
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, 0},
+ {(UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, (UChar)0x006C /* 'l' */, (UChar)0x006C /* 'l' */, (UChar)0x006F /* 'o' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, 0},
+ {0x00C4, (UChar)0x0042 /* 'B' */, 0x0308, (UChar)0x0043 /* 'C' */, 0x0308, 0},
+ {(UChar)0x0041 /* 'A' */, 0x0308, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0072 /* 'r' */, (UChar)0x006F /* 'o' */, 0x0302, (UChar)0x006C /* 'l' */, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0x00E1, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0x00E1, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0054 /* 'T' */, (UChar)0x0043 /* 'C' */, (UChar)0x006F /* 'o' */, (UChar)0x006D /* 'm' */, (UChar)0x0070 /* 'p' */, (UChar)0x0061 /* 'a' */, (UChar)0x0072 /* 'r' */, (UChar)0x0065 /* 'e' */, (UChar)0x0050 /* 'P' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0069 /* 'i' */, (UChar)0x006E /* 'n' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0042 /* 'B' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0026 /* '&' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00C4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00C4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00C4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0023 /* '#' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x003D /* '=' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0043 /* 'C' */, (UChar)0x0048 /* 'H' */, (UChar)0x0063 /* 'c' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0074 /* 't' */, (UChar)0x0068 /* 'h' */, 0x00EE, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00C6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00C6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00EA, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, 0}
+};
+
+const static UCollationResult results[] = {
+ UCOL_LESS,
+ UCOL_LESS, /*UCOL_GREATER,*/
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ UCOL_EQUAL,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS, /*UCOL_GREATER,*/ /* 10 */
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_EQUAL,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS, /* 20 */
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ UCOL_GREATER,
+ /* Test Tertiary > 26 */
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_GREATER,
+ UCOL_LESS, /* 30 */
+ UCOL_GREATER,
+ UCOL_EQUAL,
+ UCOL_GREATER,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS,
+ /* test identical > 36 */
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ /* test primary > 38 */
+ UCOL_EQUAL,
+ UCOL_EQUAL, /* 40 */
+ UCOL_LESS,
+ UCOL_EQUAL,
+ UCOL_EQUAL,
+ /* test secondary > 43 */
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_EQUAL,
+ UCOL_LESS,
+ UCOL_LESS,
+ UCOL_LESS /* 49 */
+};
+
+const static UChar testBugs[][MAX_TOKEN_LEN] = {
+ {(UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0},
+ {(UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0045 /* 'E' */, 0},
+ {0x00e9, 0},
+ {0x00e8, 0},
+ {0x00ea, 0},
+ {0x00eb, 0},
+ {(UChar)0x0065 /* 'e' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0078 /* 'x' */, 0}
+
+};
+
+/* 0x0300 is grave, 0x0301 is acute
+ the order of elements in this array must be different than the order in CollationFrenchTest */
+const static UChar testAcute[][MAX_TOKEN_LEN] = {
+ {(UChar)0x0065 /* 'e' */, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0065 /* 'e' */, (UChar)0x0065 /* 'e' */, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, (UChar)0x0065 /* 'e' */, 0x0301, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, (UChar)0x0065 /* 'e' */, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, (UChar)0x0065 /* 'e' */, 0x0300, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, (UChar)0x0065 /* 'e' */, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, (UChar)0x0065 /* 'e' */, 0x0301, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, (UChar)0x0065 /* 'e' */, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, (UChar)0x0065 /* 'e' */, 0x0300, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, 0x0300, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, 0x0300, (UChar)0x0065 /* 'e' */, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, 0x0300, (UChar)0x0065 /* 'e' */, 0x0301, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, 0x0300, (UChar)0x0065 /* 'e' */, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0301, 0x0300, (UChar)0x0065 /* 'e' */, 0x0300, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, (UChar)0x0065 /* 'e' */, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, (UChar)0x0065 /* 'e' */, 0x0301, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, (UChar)0x0065 /* 'e' */, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, (UChar)0x0065 /* 'e' */, 0x0300, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, 0x0301, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, 0x0301, (UChar)0x0065 /* 'e' */, 0x0301, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, 0x0301, (UChar)0x0065 /* 'e' */, 0x0301, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, 0x0301, (UChar)0x0065 /* 'e' */, 0x0300, 0},
+ {(UChar)0x0065 /* 'e' */, 0x0300, 0x0301, (UChar)0x0065 /* 'e' */, 0x0300, 0x0301, 0}
+};
+
+static const UChar testMore[][MAX_TOKEN_LEN] = {
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0065 /* 'e' */, 0},
+ { 0x00E6, 0},
+ { 0x00C6, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0066 /* 'f' */, 0},
+ {(UChar)0x006F /* 'o' */, (UChar)0x0065 /* 'e' */, 0},
+ { 0x0153, 0},
+ { 0x0152, 0},
+ {(UChar)0x006F /* 'o' */, (UChar)0x0066 /* 'f' */, 0},
+};
+
+
+void addEnglishCollTest(TestNode** root)
+{
+
+ addTest(root, &TestPrimary, "tscoll/encoll/TestPrimary");
+ addTest(root, &TestSecondary, "tscoll/encoll/TestSecondary");
+ addTest(root, &TestTertiary, "tscoll/encoll/TestTertiary");
+
+}
+
+static void TestTertiary( )
+{
+ int32_t testMoreSize;
+ UCollationResult expected=UCOL_EQUAL;
+ int32_t i,j;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("en_US", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ log_verbose("Testing English Collation with Tertiary strength\n");
+
+ ucol_setStrength(myCollation, UCOL_TERTIARY);
+ for (i = 0; i < 38 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+
+
+ j = 0;
+ for (i = 0; i < 10; i++)
+ {
+ for (j = i+1; j < 10; j++)
+ {
+ doTest(myCollation, testBugs[i], testBugs[j], UCOL_LESS);
+ }
+ }
+ /*test more interesting cases */
+ testMoreSize = sizeof(testMore) / sizeof(testMore[0]);
+ for (i = 0; i < testMoreSize; i++)
+ {
+ for (j = 0; j < testMoreSize; j++)
+ {
+ if (i < j) expected = UCOL_LESS;
+ if (i == j) expected = UCOL_EQUAL;
+ if (i > j) expected = UCOL_GREATER;
+ doTest(myCollation, testMore[i], testMore[j], expected );
+ }
+ }
+ ucol_close(myCollation);
+}
+
+static void TestPrimary()
+{
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("en_US", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ ucol_setStrength(myCollation, UCOL_PRIMARY);
+ log_verbose("Testing English Collation with Primary strength\n");
+ for (i = 38; i < 43 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ ucol_close(myCollation);
+}
+
+static void TestSecondary()
+{
+ UCollationResult expected=UCOL_EQUAL;
+ int32_t i,j, testAcuteSize;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = ucol_open("en_US", &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
+ return;
+ }
+ ucol_setStrength(myCollation, UCOL_SECONDARY);
+ log_verbose("Testing English Collation with Secondary strength\n");
+ for (i = 43; i < 49 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+
+
+ /*test acute and grave ordering (compare to french collation) */
+ testAcuteSize = sizeof(testAcute) / sizeof(testAcute[0]);
+ for (i = 0; i < testAcuteSize; i++)
+ {
+ for (j = 0; j < testAcuteSize; j++)
+ {
+ if (i < j) expected = UCOL_LESS;
+ if (i == j) expected = UCOL_EQUAL;
+ if (i > j) expected = UCOL_GREATER;
+ doTest(myCollation, testAcute[i], testAcute[j], expected );
+ }
+ }
+ucol_close(myCollation);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/encoll.h b/Build/source/libs/icu/icu-xetex/test/cintltst/encoll.h
new file mode 100644
index 00000000000..1102885a213
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/encoll.h
@@ -0,0 +1,44 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File encoll.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda Converted to C
+*********************************************************************************/
+/**
+ * CollationEnglishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _CENCOLLTST
+#define _CENCOLLTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cintltst.h"
+
+#define MAX_TOKEN_LEN 16
+
+ /* performs test with strength PRIMARY */
+static void TestPrimary(void);
+
+ /* perform test with strength SECONDARY */
+static void TestSecondary(void);
+
+ /* perform test with strength TERTIARY */
+static void TestTertiary(void);
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/eurocreg.c b/Build/source/libs/icu/icu-xetex/test/cintltst/eurocreg.c
new file mode 100644
index 00000000000..8e29d4c6815
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/eurocreg.c
@@ -0,0 +1,188 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1999-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "unicode/ctest.h"
+#include "unicode/ucnv.h"
+
+void TestEuroRegression(void);
+void addTestEuroRegression(TestNode** root);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+void addTestEuroRegression(TestNode** root)
+{
+ addTest(root, &TestEuroRegression, "tsconv/eurocreg/TestEuroRegression");
+}
+
+/*
+ * The table below lists codepages that are supposed to have roundtrip mappings for
+ * the U+20AC Euro sign.
+ *
+ * Changes made 2000nov28 and marked as such are due to the following:
+ *
+ * After updating all ibm-*.ucm files with precise fallback indicators (|0, |1, |3),
+ * some of these codepages failed the Euro regression test.
+ * This means that the actuall mappings changed when only the preciseness of fallback
+ * mappings should have changed.
+ * My (Markus) suspicion is that some files got Euro sign mappings added manually,
+ * changing their contents compared to the NLTC (IBM Toronto codepage database) definition.
+ * Such changes are highly undesirable because they effectively define new codepages.
+ * Codepage mapping files with "ibm-*.ucm" should always exactly match the files
+ * from the IBM codepage database.
+ * (If there are several mappings with the same number, then we choose the
+ * default mappings with Private-Use Area assignments.)
+ *
+ * Also, in the past, some aliases were set such that e.g. cp850 became an alias for ibm-858.
+ * This followed the practice of OS/2 that uses the old codepage number 850 for the new
+ * codepage 858, with the main difference being the additional Euro sign.
+ * However, we have documented that the "cp" prefix should be used for Microsoft-compatible
+ * codepages, and Microsoft Windows 2000's codepage 850 does not contain a Euro sign mapping.
+ * Therefore, cp850 must not support the Euro sign.
+ * In these cases, I have changed the codepage name here to point to a newer codepage with the
+ * Euro sign, using its new name.
+ * I could not find such "updates" for codepages 1362 and 1363 - we might want to supply them later.
+ */
+
+static const char convertersToCheck[][15] = {
+ "cp1250",
+ "cp1251",
+ "cp1252",
+ "cp1254",
+ "cp1255",
+ "cp1256",
+ "cp1257",
+ "cp1258",
+ "ibm1140",
+ "ibm1142",
+ "ibm1143",
+ "ibm1144",
+ "ibm1145",
+ "ibm1146",
+ "ibm1147",
+ "ibm1148",
+ "ibm1149",
+ "ibm1153",
+ "ibm1154",
+ "ibm1155",
+ "ibm1156",
+ "ibm1157",
+ "ibm1158",
+ /*"ibm-1159",*/ /* removed 2003Apr17 */
+ "ibm12712",
+ "ibm16804",
+ "ibm-1160",
+ "ibm-1162",
+ "ibm-1164",
+
+ "ibm-858", /* was "cp850" changed 2000nov28 */
+ /* duplicate "cp850" removed 2000nov28 */
+ /*"ibm-9049",*/ /* was "cp857" changed 2002nov25 */
+ "ibm-12712", /* was "cp424" changed 2000nov28 */
+ "ibm-4899", /* was "cp803" changed 2000nov28 */
+ "ibm-867", /* was "cp862" changed 2002nov25 */
+ "cp1258",
+ "windows-950",
+ "cp1253",
+ /* "cp819",
+ "cp13488",*/
+ "ibm-4971",
+ /*"ibm-9061",*/ /* was "cp869" changed 2002nov25 */
+ /* "cp813",*/
+ /*"ibm-9044",*/ /* was "cp852" changed 2002nov25 */
+ /*"ibm-872",*/ /* was "cp855" changed 2002nov25 */
+ /*"ibm-808",*/ /* was "cp866" changed 2002nov25 */
+/* "cp1131",
+ "cp1125",*/
+ "ibm-902", /* was "cp922" changed 2003jan08 */
+ "ibm-901", /* was "cp921" changed 2003jan09 */
+ /*"ibm-17248",*/ /* was "cp864" changed 2002nov25 */
+ /*"cp1008",
+ "cp1046",*/
+ /* "cp9066",
+ "cp1129",*/
+ "ibm-5123", /* was "cp1027" changed 2003jan08 */
+ /* "cp300",*/
+ /* "cp4930",*/
+ "ibm-1364",
+ /* "cp1362" removed 2000nov28 */
+ "cp1363",
+ /* "cp1114", removed 2002jul3
+ "cp947", removed 2002jul3 */
+ "gb18030",
+ ""};
+
+UBool isEuroAware(UConverter*);
+
+void TestEuroRegression()
+{
+ int32_t i=0;
+
+ do
+ {
+ UErrorCode err = U_ZERO_ERROR;
+ UConverter* myConv = ucnv_open(convertersToCheck[i], &err);
+ if (U_FAILURE(err)&&convertersToCheck[i][0])
+ log_data_err("%s \tMISSING [%s]\n", convertersToCheck[i], u_errorName(err));
+ else
+ {
+ if (isEuroAware(myConv))
+ log_verbose("%s \tsupports euro\n", convertersToCheck[i]);
+ else
+ log_err("%s \tDOES NOT support euro\n", convertersToCheck[i]);
+ ucnv_close(myConv);
+ }
+ } while (convertersToCheck[++i][0]);
+}
+
+UBool isEuroAware(UConverter* myConv)
+{
+ static const UChar euroString[2] = { 0x20AC, 0x0000 };
+ char target[20];
+ UChar euroBack[2];
+ int32_t targetSize, euroBackSize;
+ UErrorCode err = U_ZERO_ERROR;
+ /*const char* myName = ucnv_getName(myConv, &err);*/
+
+ targetSize = ucnv_fromUChars(myConv,
+ target,
+ sizeof(target),
+ euroString,
+ -1,
+ &err);
+ if (U_FAILURE(err))
+ {
+ log_err("Failure Occured in ucnv_fromUChars euro roundtrip test\n");
+ return FALSE;
+ }
+ euroBackSize = ucnv_toUChars(myConv,
+ euroBack,
+ 2,
+ target,
+ targetSize,
+ &err);
+ if (U_FAILURE(err))
+ {
+ log_err("Failure Occured in ucnv_toUChars euro roundtrip test\n");
+ return FALSE;
+ }
+ if (u_strcmp(euroString, euroBack))
+ {
+ /* log_err("%s FAILED Euro rountrip\n", myName);*/
+ return FALSE;
+ }
+ else
+ {
+ /* log_verbose("%s PASSED Euro rountrip\n", myName);*/
+ return TRUE;
+ }
+
+}
+#else
+void addTestEuroRegression(TestNode** root)
+{
+ /* test nothing... */
+}
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/hpmufn.c b/Build/source/libs/icu/icu-xetex/test/cintltst/hpmufn.c
new file mode 100644
index 00000000000..02cf1576cd3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/hpmufn.c
@@ -0,0 +1,530 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2003-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File hpmufn.c
+*
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/putil.h"
+#include "unicode/uclean.h"
+#include "unicode/uchar.h"
+#include "unicode/ures.h"
+#include "cintltst.h"
+#include "umutex.h"
+#include "unicode/utrace.h"
+#include <stdlib.h>
+#include <string.h>
+
+/**
+ * This should align the memory properly on any machine.
+ */
+typedef union {
+ long t1;
+ double t2;
+ void *t3;
+} ctest_AlignedMemory;
+
+static void TestHeapFunctions(void);
+static void TestMutexFunctions(void);
+static void TestIncDecFunctions(void);
+
+void addHeapMutexTest(TestNode **root);
+
+
+void
+addHeapMutexTest(TestNode** root)
+{
+ addTest(root, &TestHeapFunctions, "hpmufn/TestHeapFunctions" );
+ addTest(root, &TestMutexFunctions, "hpmufn/TestMutexFunctions" );
+ addTest(root, &TestIncDecFunctions, "hpmufn/TestIncDecFunctions");
+}
+
+static int32_t gMutexFailures = 0;
+
+#define TEST_STATUS(status, expected) \
+if (status != expected) { \
+log_err("FAIL at %s:%d. Actual status = \"%s\"; Expected status = \"%s\"\n", \
+ __FILE__, __LINE__, u_errorName(status), u_errorName(expected)); gMutexFailures++; }
+
+
+#define TEST_ASSERT(expr) \
+if (!(expr)) { \
+ log_err("FAILED Assertion \"" #expr "\" at %s:%d.\n", __FILE__, __LINE__); \
+ gMutexFailures++; \
+}
+
+
+/* These tests do cleanup and reinitialize ICU in the course of their operation.
+ * The ICU data directory must be preserved across these operations.
+ * Here is a helper function to assist with that.
+ */
+static char *safeGetICUDataDirectory() {
+ const char *dataDir = u_getDataDirectory(); /* Returned string vanashes with u_cleanup */
+ char *retStr = NULL;
+ if (dataDir != NULL) {
+ retStr = (char *)malloc(strlen(dataDir)+1);
+ strcpy(retStr, dataDir);
+ }
+ return retStr;
+}
+
+
+
+/*
+ * Test Heap Functions.
+ * Implemented on top of the standard malloc heap.
+ * All blocks increased in size by 8 to 16 bytes, and the poiner returned to ICU is
+ * offset up by 8 to 16, which should cause a good heap corruption if one of our "blocks"
+ * ends up being freed directly, without coming through us.
+ * Allocations are counted, to check that ICU actually does call back to us.
+ */
+int gBlockCount = 0;
+const void *gContext;
+
+static void * U_CALLCONV myMemAlloc(const void *context, size_t size) {
+ char *retPtr = (char *)malloc(size+sizeof(ctest_AlignedMemory));
+ if (retPtr != NULL) {
+ retPtr += sizeof(ctest_AlignedMemory);
+ }
+ gBlockCount ++;
+ return retPtr;
+}
+
+static void U_CALLCONV myMemFree(const void *context, void *mem) {
+ char *freePtr = (char *)mem;
+ if (freePtr != NULL) {
+ freePtr -= sizeof(ctest_AlignedMemory);
+ }
+ free(freePtr);
+}
+
+
+
+static void * U_CALLCONV myMemRealloc(const void *context, void *mem, size_t size) {
+ char *p = (char *)mem;
+ char *retPtr;
+
+ if (p!=NULL) {
+ p -= sizeof(ctest_AlignedMemory);
+ }
+ retPtr = realloc(p, size+sizeof(ctest_AlignedMemory));
+ if (retPtr != NULL) {
+ p += sizeof(ctest_AlignedMemory);
+ }
+ return retPtr;
+}
+
+
+static void TestHeapFunctions() {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *rb = NULL;
+ char *icuDataDir;
+ UVersionInfo unicodeVersion = {0,0,0,0};
+
+ UTraceEntry *traceEntryFunc; /* Tracing function ptrs. We need to save */
+ UTraceExit *traceExitFunc; /* and restore them across calls to */
+ UTraceData *traceDataFunc; /* u_cleanup() that we make in this test. */
+ const void *traceContext;
+ int32_t traceLevel;
+
+ icuDataDir = safeGetICUDataDirectory(); /* save icu data dir, so we can put it back
+ * after doing u_cleanup(). */
+
+ utrace_getFunctions(&traceContext, &traceEntryFunc, &traceExitFunc, &traceDataFunc);
+ traceLevel = utrace_getLevel();
+
+ /* Verify that ICU can be cleaned up and reinitialized successfully.
+ * Failure here usually means that some ICU service didn't clean up successfully,
+ * probably because some earlier test accidently left something open. */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+ status = U_ZERO_ERROR;
+ u_setDataDirectory(icuDataDir);
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ /* Can not set memory functions if ICU is already initialized */
+ u_setMemoryFunctions(&gContext, myMemAlloc, myMemRealloc, myMemFree, &status);
+ TEST_STATUS(status, U_INVALID_STATE_ERROR);
+
+ /* Un-initialize ICU */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+
+ /* Can not set memory functions with NULL values */
+ status = U_ZERO_ERROR;
+ u_setMemoryFunctions(&gContext, NULL, myMemRealloc, myMemFree, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+ status = U_ZERO_ERROR;
+ u_setMemoryFunctions(&gContext, myMemAlloc, NULL, myMemFree, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+ status = U_ZERO_ERROR;
+ u_setMemoryFunctions(&gContext, myMemAlloc, myMemRealloc, NULL, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+
+ /* u_setMemoryFunctions() should work with null or non-null context pointer */
+ status = U_ZERO_ERROR;
+ u_setMemoryFunctions(NULL, myMemAlloc, myMemRealloc, myMemFree, &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ u_setMemoryFunctions(&gContext, myMemAlloc, myMemRealloc, myMemFree, &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+
+
+ /* After reinitializing ICU, we should not be able to set the memory funcs again. */
+ status = U_ZERO_ERROR;
+ u_setDataDirectory(icuDataDir);
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ u_setMemoryFunctions(NULL, myMemAlloc, myMemRealloc, myMemFree, &status);
+ TEST_STATUS(status, U_INVALID_STATE_ERROR);
+
+ /* Doing ICU operations should cause allocations to come through our test heap */
+ gBlockCount = 0;
+ status = U_ZERO_ERROR;
+ rb = ures_open(NULL, "es", &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ if (gBlockCount == 0) {
+ log_err("Heap functions are not being called from ICU.\n");
+ }
+ ures_close(rb);
+
+ /* Cleanup should put the heap back to its default implementation. */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+ u_setDataDirectory(icuDataDir);
+ u_getUnicodeVersion(unicodeVersion);
+ if (unicodeVersion[0] <= 0) {
+ log_err("Properties doesn't reinitialize without u_init.\n");
+ }
+ status = U_ZERO_ERROR;
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+
+ /* ICU operations should no longer cause allocations to come through our test heap */
+ gBlockCount = 0;
+ status = U_ZERO_ERROR;
+ rb = ures_open(NULL, "fr", &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ if (gBlockCount != 0) {
+ log_err("Heap functions did not reset after u_cleanup.\n");
+ }
+ ures_close(rb);
+ free(icuDataDir);
+}
+
+
+/*
+ * Test u_setMutexFunctions()
+ */
+
+int gTotalMutexesInitialized = 0; /* Total number of mutexes created */
+int gTotalMutexesActive = 0; /* Total mutexes created, but not destroyed */
+int gAccumulatedLocks = 0;
+const void *gMutexContext;
+
+typedef struct DummyMutex {
+ int fLockCount;
+ int fMagic;
+} DummyMutex;
+
+
+static void U_CALLCONV myMutexInit(const void *context, UMTX *mutex, UErrorCode *status) {
+ DummyMutex *theMutex;
+
+ TEST_STATUS(*status, U_ZERO_ERROR);
+ theMutex = (DummyMutex *)malloc(sizeof(DummyMutex));
+ theMutex->fLockCount = 0;
+ theMutex->fMagic = 123456;
+ gTotalMutexesInitialized++;
+ gTotalMutexesActive++;
+ gMutexContext = context;
+ *mutex = theMutex;
+}
+
+
+static void U_CALLCONV myMutexDestroy(const void *context, UMTX *mutex) {
+ DummyMutex *This = *(DummyMutex **)mutex;
+
+ gTotalMutexesActive--;
+ TEST_ASSERT(This->fLockCount == 0);
+ TEST_ASSERT(This->fMagic == 123456);
+ This->fMagic = 0;
+ This->fLockCount = 0;
+ free(This);
+}
+
+static void U_CALLCONV myMutexLock(const void *context, UMTX *mutex) {
+ DummyMutex *This = *(DummyMutex **)mutex;
+
+ TEST_ASSERT(This->fMagic == 123456);
+ This->fLockCount++;
+ gAccumulatedLocks++;
+}
+
+static void U_CALLCONV myMutexUnlock(const void *context, UMTX *mutex) {
+ DummyMutex *This = *(DummyMutex **)mutex;
+
+ TEST_ASSERT(This->fMagic == 123456);
+ This->fLockCount--;
+ TEST_ASSERT(This->fLockCount >= 0);
+}
+
+
+
+static void TestMutexFunctions() {
+ UErrorCode status = U_ZERO_ERROR;
+ UResourceBundle *rb = NULL;
+ char *icuDataDir;
+
+ UTraceEntry *traceEntryFunc; /* Tracing function ptrs. We need to save */
+ UTraceExit *traceExitFunc; /* and restore them across calls to */
+ UTraceData *traceDataFunc; /* u_cleanup() that we make in this test. */
+ const void *traceContext;
+ int32_t traceLevel;
+
+ gMutexFailures = 0;
+
+ /* Save initial ICU state so that it can be restored later.
+ * u_cleanup(), which is called in this test, resets ICU's state.
+ */
+ icuDataDir = safeGetICUDataDirectory();
+ utrace_getFunctions(&traceContext, &traceEntryFunc, &traceExitFunc, &traceDataFunc);
+ traceLevel = utrace_getLevel();
+
+ /* Verify that ICU can be cleaned up and reinitialized successfully.
+ * Failure here usually means that some ICU service didn't clean up successfully,
+ * probably because some earlier test accidently left something open. */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+ status = U_ZERO_ERROR;
+ u_setDataDirectory(icuDataDir);
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ /* Can not set mutex functions if ICU is already initialized */
+ u_setMutexFunctions(&gContext, myMutexInit, myMutexDestroy, myMutexLock, myMutexUnlock, &status);
+ TEST_STATUS(status, U_INVALID_STATE_ERROR);
+
+ /* Un-initialize ICU */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+
+ /* Can not set Mutex functions with NULL values */
+ status = U_ZERO_ERROR;
+ u_setMutexFunctions(&gContext, NULL, myMutexDestroy, myMutexLock, myMutexUnlock, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+ status = U_ZERO_ERROR;
+ u_setMutexFunctions(&gContext, myMutexInit, NULL, myMutexLock, myMutexUnlock, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+ status = U_ZERO_ERROR;
+ u_setMutexFunctions(&gContext, myMutexInit, myMutexDestroy, NULL, myMutexUnlock, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+ status = U_ZERO_ERROR;
+ u_setMutexFunctions(&gContext, myMutexInit, myMutexDestroy, myMutexLock, NULL, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+
+ /* u_setMutexFunctions() should work with null or non-null context pointer */
+ status = U_ZERO_ERROR;
+ u_setMutexFunctions(&gContext, myMutexInit, myMutexDestroy, myMutexLock, myMutexUnlock, &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ u_setMutexFunctions(&gContext, myMutexInit, myMutexDestroy, myMutexLock, myMutexUnlock, &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+
+
+ /* After reinitializing ICU, we should not be able to set the mutex funcs again. */
+ status = U_ZERO_ERROR;
+ u_setDataDirectory(icuDataDir);
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ u_setMutexFunctions(&gContext, myMutexInit, myMutexDestroy, myMutexLock, myMutexUnlock, &status);
+ TEST_STATUS(status, U_INVALID_STATE_ERROR);
+
+ /* Doing ICU operations should cause allocations to come through our test mutexes */
+ gBlockCount = 0;
+ status = U_ZERO_ERROR;
+ rb = ures_open(NULL, "es", &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ TEST_ASSERT(gTotalMutexesInitialized > 0);
+ TEST_ASSERT(gTotalMutexesActive > 0);
+
+ ures_close(rb);
+
+ /* Cleanup should destroy all of the mutexes. */
+ u_cleanup();
+ u_setDataDirectory(icuDataDir);
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+ status = U_ZERO_ERROR;
+ TEST_ASSERT(gTotalMutexesInitialized > 0);
+ TEST_ASSERT(gTotalMutexesActive == 0);
+
+
+ /* Additional ICU operations should no longer use our dummy test mutexes */
+ gTotalMutexesInitialized = 0;
+ gTotalMutexesActive = 0;
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+
+ status = U_ZERO_ERROR;
+ rb = ures_open(NULL, "fr", &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ TEST_ASSERT(gTotalMutexesInitialized == 0);
+ TEST_ASSERT(gTotalMutexesActive == 0);
+
+ ures_close(rb);
+ free(icuDataDir);
+
+ if(gMutexFailures) {
+ log_info("Note: these failures may be caused by ICU failing to initialize/uninitialize properly.\n");
+ log_verbose("Check for prior tests which may not have closed all open resources. See the internal function ures_flushCache()\n");
+ }
+}
+
+
+
+
+/*
+ * Test Atomic Increment & Decrement Functions
+ */
+
+int gIncCount = 0;
+int gDecCount = 0;
+const void *gIncDecContext;
+const void *gExpectedContext = &gIncDecContext;
+
+
+static int32_t U_CALLCONV myIncFunc(const void *context, int32_t *p) {
+ int32_t retVal;
+ TEST_ASSERT(context == gExpectedContext);
+ gIncCount++;
+ retVal = ++(*p);
+ return retVal;
+}
+
+static int32_t U_CALLCONV myDecFunc(const void *context, int32_t *p) {
+ int32_t retVal;
+ TEST_ASSERT(context == gExpectedContext);
+ gDecCount++;
+ retVal = --(*p);
+ return retVal;
+}
+
+
+
+
+static void TestIncDecFunctions() {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t t = 1; /* random value to make sure that Inc/dec works */
+ char *dataDir;
+
+ UTraceEntry *traceEntryFunc; /* Tracing function ptrs. We need to save */
+ UTraceExit *traceExitFunc; /* and restore them across calls to */
+ UTraceData *traceDataFunc; /* u_cleanup() that we make in this test. */
+ const void *traceContext;
+ int32_t traceLevel;
+
+ /* Save ICU's data dir and tracing functions so that they can be resored
+ after cleanup and reinit. */
+ dataDir = safeGetICUDataDirectory();
+ utrace_getFunctions(&traceContext, &traceEntryFunc, &traceExitFunc, &traceDataFunc);
+ traceLevel = utrace_getLevel();
+
+ /* Verify that ICU can be cleaned up and reinitialized successfully.
+ * Failure here usually means that some ICU service didn't clean up successfully,
+ * probably because some earlier test accidently left something open. */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+ status = U_ZERO_ERROR;
+ u_setDataDirectory(dataDir);
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ /* Can not set mutex functions if ICU is already initialized */
+ u_setAtomicIncDecFunctions(&gIncDecContext, myIncFunc, myDecFunc, &status);
+ TEST_STATUS(status, U_INVALID_STATE_ERROR);
+
+ /* Clean up ICU */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+
+ /* Can not set functions with NULL values */
+ status = U_ZERO_ERROR;
+ u_setAtomicIncDecFunctions(&gIncDecContext, NULL, myDecFunc, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+ status = U_ZERO_ERROR;
+ u_setAtomicIncDecFunctions(&gIncDecContext, myIncFunc, NULL, &status);
+ TEST_STATUS(status, U_ILLEGAL_ARGUMENT_ERROR);
+
+ /* u_setIncDecFunctions() should work with null or non-null context pointer */
+ status = U_ZERO_ERROR;
+ gExpectedContext = NULL;
+ u_setAtomicIncDecFunctions(NULL, myIncFunc, myDecFunc, &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ gExpectedContext = &gIncDecContext;
+ u_setAtomicIncDecFunctions(&gIncDecContext, myIncFunc, myDecFunc, &status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+
+
+ /* After reinitializing ICU, we should not be able to set the inc/dec funcs again. */
+ status = U_ZERO_ERROR;
+ u_setDataDirectory(dataDir);
+ u_init(&status);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ gExpectedContext = &gIncDecContext;
+ u_setAtomicIncDecFunctions(&gIncDecContext, myIncFunc, myDecFunc, &status);
+ TEST_STATUS(status, U_INVALID_STATE_ERROR);
+
+ /* Doing ICU operations should cause our functions to be called */
+ gIncCount = 0;
+ gDecCount = 0;
+ umtx_atomic_inc(&t);
+ TEST_ASSERT(t == 2);
+ umtx_atomic_dec(&t);
+ TEST_ASSERT(t == 1);
+ TEST_ASSERT(gIncCount > 0);
+ TEST_ASSERT(gDecCount > 0);
+
+
+ /* Cleanup should cancel use of our inc/dec functions. */
+ /* Additional ICU operations should not use them */
+ u_cleanup();
+ utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc);
+ utrace_setLevel(traceLevel);
+ gIncCount = 0;
+ gDecCount = 0;
+ status = U_ZERO_ERROR;
+ u_setDataDirectory(dataDir);
+ u_init(&status);
+ TEST_ASSERT(gIncCount == 0);
+ TEST_ASSERT(gDecCount == 0);
+
+ status = U_ZERO_ERROR;
+ umtx_atomic_inc(&t);
+ umtx_atomic_dec(&t);
+ TEST_STATUS(status, U_ZERO_ERROR);
+ TEST_ASSERT(gIncCount == 0);
+ TEST_ASSERT(gDecCount == 0);
+
+ free(dataDir);
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/idnatest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/idnatest.c
new file mode 100644
index 00000000000..6196523087a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/idnatest.c
@@ -0,0 +1,885 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: idnatest.c
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003jul11
+ * created by: Ram Viswanadha
+ */
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+#include "unicode/ustring.h"
+#include "unicode/uidna.h"
+#include "cintltst.h"
+
+
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#define MAX_DEST_SIZE 1000
+
+static void TestToUnicode(void);
+static void TestToASCII(void);
+static void TestIDNToUnicode(void);
+static void TestIDNToASCII(void);
+static void TestCompare(void);
+static void TestUnicode32Norm(void);
+static void TestJB4490(void);
+static void TestJB4475(void);
+static void TestLength(void);
+static void TestJB5273(void);
+void addIDNATest(TestNode** root);
+
+
+typedef int32_t
+(U_EXPORT2 *TestFunc) ( const UChar *src, int32_t srcLength,
+ UChar *dest, int32_t destCapacity,
+ int32_t options, UParseError *parseError,
+ UErrorCode *status);
+typedef int32_t
+(U_EXPORT2 *CompareFunc) (const UChar *s1, int32_t s1Len,
+ const UChar *s2, int32_t s2Len,
+ int32_t options,
+ UErrorCode *status);
+
+
+void
+addIDNATest(TestNode** root)
+{
+ addTest(root, &TestToUnicode, "idna/TestToUnicode");
+ addTest(root, &TestToASCII, "idna/TestToASCII");
+ addTest(root, &TestIDNToUnicode, "idna/TestIDNToUnicode");
+ addTest(root, &TestIDNToASCII, "idna/TestIDNToASCII");
+ addTest(root, &TestCompare, "idna/TestCompare");
+ addTest(root, &TestUnicode32Norm,"idna/TestUnicode32Norm");
+ addTest(root, &TestJB4490, "idna/TestJB4490");
+ addTest(root, &TestJB4475, "idna/TestJB4475");
+ addTest(root, &TestLength, "idna/TestLength");
+ addTest(root, &TestJB5273, "idna/TestJB5273");
+}
+
+static void
+testAPI(const UChar* src, const UChar* expected, const char* testName,
+ UBool useSTD3ASCIIRules,UErrorCode expectedStatus,
+ UBool doCompare, UBool testUnassigned, TestFunc func){
+
+ UErrorCode status = U_ZERO_ERROR;
+ UChar destStack[MAX_DEST_SIZE];
+ int32_t destLen = 0;
+ UChar* dest = NULL;
+ int32_t expectedLen = (expected != NULL) ? u_strlen(expected) : 0;
+ int32_t options = (useSTD3ASCIIRules == TRUE) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
+ UParseError parseError;
+ int32_t tSrcLen = 0;
+ UChar* tSrc = NULL;
+
+ if(src != NULL){
+ tSrcLen = u_strlen(src);
+ tSrc =(UChar*) malloc( U_SIZEOF_UCHAR * tSrcLen );
+ memcpy(tSrc,src,tSrcLen * U_SIZEOF_UCHAR);
+ }
+
+ /* test null-terminated source and return value of number of UChars required */
+
+ destLen = func(src,-1,NULL,0,options, &parseError , &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; /* reset error code */
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,-1,dest,destLen+1,options, &parseError, &status);
+ /* TODO : compare output with expected */
+ if(U_SUCCESS(status) && expectedStatus != U_IDNA_STD3_ASCII_RULES_ERROR&& (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ log_err("Did not get the expected result for null terminated source.\n" );
+ }
+ }else{
+ log_err( "%s null terminated source failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+
+ if(status != expectedStatus){
+ log_err( "Did not get the expected error for %s null terminated source failed. Expected: %s Got: %s\n",testName, u_errorName(expectedStatus), u_errorName(status));
+ free(tSrc);
+ return;
+ }
+ if(testUnassigned ){
+ status = U_ZERO_ERROR;
+ destLen = func(src,-1,NULL,0,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; /* reset error code */
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,-1,dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ /* TODO : compare output with expected */
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ log_err("Did not get the expected result for %s null terminated source with both options set.\n",testName);
+
+ }
+ }else{
+ log_err( "%s null terminated source failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ /*testing query string*/
+ if(status != expectedStatus && expectedStatus != U_IDNA_UNASSIGNED_ERROR){
+ log_err( "Did not get the expected error for %s null terminated source with options set. Expected: %s Got: %s\n",testName, u_errorName(expectedStatus), u_errorName(status));
+ }
+ }
+
+ status = U_ZERO_ERROR;
+
+ /* test source with lengthand return value of number of UChars required*/
+ destLen = func(tSrc, tSrcLen, NULL,0,options, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; /* reset error code */
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,u_strlen(src),dest,destLen+1,options, &parseError, &status);
+ /* TODO : compare output with expected */
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ log_err("Did not get the expected result for %s with source length.\n",testName);
+ }
+ }else{
+ log_err( "%s with source length failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+
+ if(status != expectedStatus){
+ log_err( "Did not get the expected error for %s with source length. Expected: %s Got: %s\n",testName, u_errorName(expectedStatus), u_errorName(status));
+ }
+ if(testUnassigned){
+ status = U_ZERO_ERROR;
+
+ destLen = func(tSrc,tSrcLen,NULL,0,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; /* reset error code */
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ /* TODO : compare output with expected */
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ log_err("Did not get the expected result for %s with source length and both options set.\n",testName);
+ }
+ }else{
+ log_err( "%s with source length failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ /*testing query string*/
+ if(status != expectedStatus && expectedStatus != U_IDNA_UNASSIGNED_ERROR){
+ log_err( "Did not get the expected error for %s with source length and options set. Expected: %s Got: %s\n",testName, u_errorName(expectedStatus), u_errorName(status));
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = func(src,-1,NULL,0,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; /* reset error code*/
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,-1,dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+ /* TODO : compare output with expected*/
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ log_err("Did not get the expected result for %s null terminated source with both options set.\n",testName);
+
+ }
+ }else{
+ log_err( "%s null terminated source failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ /*testing query string*/
+ if(status != expectedStatus){
+ log_err( "Did not get the expected error for %s null terminated source with options set. Expected: %s Got: %s\n",testName, u_errorName(expectedStatus), u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+
+ destLen = func(tSrc,tSrcLen,NULL,0,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; /* reset error code*/
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+ /* TODO : compare output with expected*/
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ log_err("Did not get the expected result for %s with source length and both options set.\n",testName);
+ }
+ }else{
+ log_err( "%s with source length failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ /*testing query string*/
+ if(status != expectedStatus && expectedStatus != U_IDNA_UNASSIGNED_ERROR){
+ log_err( "Did not get the expected error for %s with source length and options set. Expected: %s Got: %s\n",testName, u_errorName(expectedStatus), u_errorName(status));
+ }
+ free(tSrc);
+}
+
+static const UChar unicodeIn[][41] ={
+ {
+ 0x0644, 0x064A, 0x0647, 0x0645, 0x0627, 0x0628, 0x062A, 0x0643, 0x0644,
+ 0x0645, 0x0648, 0x0634, 0x0639, 0x0631, 0x0628, 0x064A, 0x061F, 0x0000
+ },
+ {
+ 0x4ED6, 0x4EEC, 0x4E3A, 0x4EC0, 0x4E48, 0x4E0D, 0x8BF4, 0x4E2D, 0x6587,
+ 0x0000
+ },
+ {
+ 0x0050, 0x0072, 0x006F, 0x010D, 0x0070, 0x0072, 0x006F, 0x0073, 0x0074,
+ 0x011B, 0x006E, 0x0065, 0x006D, 0x006C, 0x0075, 0x0076, 0x00ED, 0x010D,
+ 0x0065, 0x0073, 0x006B, 0x0079, 0x0000
+ },
+ {
+ 0x05DC, 0x05DE, 0x05D4, 0x05D4, 0x05DD, 0x05E4, 0x05E9, 0x05D5, 0x05D8,
+ 0x05DC, 0x05D0, 0x05DE, 0x05D3, 0x05D1, 0x05E8, 0x05D9, 0x05DD, 0x05E2,
+ 0x05D1, 0x05E8, 0x05D9, 0x05EA, 0x0000
+ },
+ {
+ 0x092F, 0x0939, 0x0932, 0x094B, 0x0917, 0x0939, 0x093F, 0x0928, 0x094D,
+ 0x0926, 0x0940, 0x0915, 0x094D, 0x092F, 0x094B, 0x0902, 0x0928, 0x0939,
+ 0x0940, 0x0902, 0x092C, 0x094B, 0x0932, 0x0938, 0x0915, 0x0924, 0x0947,
+ 0x0939, 0x0948, 0x0902, 0x0000
+ },
+ {
+ 0x306A, 0x305C, 0x307F, 0x3093, 0x306A, 0x65E5, 0x672C, 0x8A9E, 0x3092,
+ 0x8A71, 0x3057, 0x3066, 0x304F, 0x308C, 0x306A, 0x3044, 0x306E, 0x304B,
+ 0x0000
+ },
+/*
+ {
+ 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0xC5BC, 0xB9C8, 0xB098, 0xC88B, 0xC744, 0xAE4C, 0x0000
+ },
+*/
+ {
+ 0x043F, 0x043E, 0x0447, 0x0435, 0x043C, 0x0443, 0x0436, 0x0435, 0x043E,
+ 0x043D, 0x0438, 0x043D, 0x0435, 0x0433, 0x043E, 0x0432, 0x043E, 0x0440,
+ 0x044F, 0x0442, 0x043F, 0x043E, 0x0440, 0x0443, 0x0441, 0x0441, 0x043A,
+ 0x0438, 0x0000
+ },
+ {
+ 0x0050, 0x006F, 0x0072, 0x0071, 0x0075, 0x00E9, 0x006E, 0x006F, 0x0070,
+ 0x0075, 0x0065, 0x0064, 0x0065, 0x006E, 0x0073, 0x0069, 0x006D, 0x0070,
+ 0x006C, 0x0065, 0x006D, 0x0065, 0x006E, 0x0074, 0x0065, 0x0068, 0x0061,
+ 0x0062, 0x006C, 0x0061, 0x0072, 0x0065, 0x006E, 0x0045, 0x0073, 0x0070,
+ 0x0061, 0x00F1, 0x006F, 0x006C, 0x0000
+ },
+ {
+ 0x4ED6, 0x5011, 0x7232, 0x4EC0, 0x9EBD, 0x4E0D, 0x8AAA, 0x4E2D, 0x6587,
+ 0x0000
+ },
+ {
+ 0x0054, 0x1EA1, 0x0069, 0x0073, 0x0061, 0x006F, 0x0068, 0x1ECD, 0x006B,
+ 0x0068, 0x00F4, 0x006E, 0x0067, 0x0074, 0x0068, 0x1EC3, 0x0063, 0x0068,
+ 0x1EC9, 0x006E, 0x00F3, 0x0069, 0x0074, 0x0069, 0x1EBF, 0x006E, 0x0067,
+ 0x0056, 0x0069, 0x1EC7, 0x0074, 0x0000
+ },
+ {
+ 0x0033, 0x5E74, 0x0042, 0x7D44, 0x91D1, 0x516B, 0x5148, 0x751F, 0x0000
+ },
+ {
+ 0x5B89, 0x5BA4, 0x5948, 0x7F8E, 0x6075, 0x002D, 0x0077, 0x0069, 0x0074,
+ 0x0068, 0x002D, 0x0053, 0x0055, 0x0050, 0x0045, 0x0052, 0x002D, 0x004D,
+ 0x004F, 0x004E, 0x004B, 0x0045, 0x0059, 0x0053, 0x0000
+ },
+ {
+ 0x0048, 0x0065, 0x006C, 0x006C, 0x006F, 0x002D, 0x0041, 0x006E, 0x006F,
+ 0x0074, 0x0068, 0x0065, 0x0072, 0x002D, 0x0057, 0x0061, 0x0079, 0x002D,
+ 0x305D, 0x308C, 0x305E, 0x308C, 0x306E, 0x5834, 0x6240, 0x0000
+ },
+ {
+ 0x3072, 0x3068, 0x3064, 0x5C4B, 0x6839, 0x306E, 0x4E0B, 0x0032, 0x0000
+ },
+ {
+ 0x004D, 0x0061, 0x006A, 0x0069, 0x3067, 0x004B, 0x006F, 0x0069, 0x3059,
+ 0x308B, 0x0035, 0x79D2, 0x524D, 0x0000
+ },
+ {
+ 0x30D1, 0x30D5, 0x30A3, 0x30FC, 0x0064, 0x0065, 0x30EB, 0x30F3, 0x30D0,
+ 0x0000
+ },
+ {
+ 0x305D, 0x306E, 0x30B9, 0x30D4, 0x30FC, 0x30C9, 0x3067, 0x0000
+ },
+ /* test non-BMP code points */
+ {
+ 0xD800, 0xDF00, 0xD800, 0xDF01, 0xD800, 0xDF02, 0xD800, 0xDF03, 0xD800, 0xDF05,
+ 0xD800, 0xDF06, 0xD800, 0xDF07, 0xD800, 0xDF09, 0xD800, 0xDF0A, 0xD800, 0xDF0B,
+ 0x0000
+ },
+ {
+ 0xD800, 0xDF0D, 0xD800, 0xDF0C, 0xD800, 0xDF1E, 0xD800, 0xDF0F, 0xD800, 0xDF16,
+ 0xD800, 0xDF15, 0xD800, 0xDF14, 0xD800, 0xDF12, 0xD800, 0xDF10, 0xD800, 0xDF20,
+ 0xD800, 0xDF21,
+ 0x0000
+ },
+ /* Greek */
+ {
+ 0x03b5, 0x03bb, 0x03bb, 0x03b7, 0x03bd, 0x03b9, 0x03ba, 0x03ac
+ },
+ /* Maltese */
+ {
+ 0x0062, 0x006f, 0x006e, 0x0121, 0x0075, 0x0073, 0x0061, 0x0127,
+ 0x0127, 0x0061
+ },
+ /* Russian */
+ {
+ 0x043f, 0x043e, 0x0447, 0x0435, 0x043c, 0x0443, 0x0436, 0x0435,
+ 0x043e, 0x043d, 0x0438, 0x043d, 0x0435, 0x0433, 0x043e, 0x0432,
+ 0x043e, 0x0440, 0x044f, 0x0442, 0x043f, 0x043e, 0x0440, 0x0443,
+ 0x0441, 0x0441, 0x043a, 0x0438
+ },
+ {
+ 0x0054,0x0045,0x0053,0x0054
+ }
+};
+
+static const char * const asciiIn[] = {
+ "xn--egbpdaj6bu4bxfgehfvwxn",
+ "xn--ihqwcrb4cv8a8dqg056pqjye",
+ "xn--Proprostnemluvesky-uyb24dma41a",
+ "xn--4dbcagdahymbxekheh6e0a7fei0b",
+ "xn--i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd",
+ "xn--n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa",
+/* "xn--989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c",*/
+ "xn--b1abfaaepdrnnbgefbaDotcwatmq2g4l",
+ "xn--PorqunopuedensimplementehablarenEspaol-fmd56a",
+ "xn--ihqwctvzc91f659drss3x8bo0yb",
+ "xn--TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g",
+ "xn--3B-ww4c5e180e575a65lsy2b",
+ "xn---with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n",
+ "xn--Hello-Another-Way--fc4qua05auwb3674vfr0b",
+ "xn--2-u9tlzr9756bt3uc0v",
+ "xn--MajiKoi5-783gue6qz075azm5e",
+ "xn--de-jg4avhby1noc0d",
+ "xn--d9juau41awczczp",
+ "XN--097CCDEKGHQJK",
+ "XN--db8CBHEJLGH4E0AL",
+ "xn--hxargifdar", /* Greek */
+ "xn--bonusaa-5bb1da", /* Maltese */
+ "xn--b1abfaaepdrnnbgefbadotcwatmq2g4l", /* Russian (Cyrillic)*/
+ "TEST"
+
+};
+
+static const char * const domainNames[] = {
+ "slip129-37-118-146.nc.us.ibm.net",
+ "saratoga.pe.utexas.edu",
+ "dial-120-45.ots.utexas.edu",
+ "woo-085.dorms.waller.net",
+ "hd30-049.hil.compuserve.com",
+ "pem203-31.pe.ttu.edu",
+ "56K-227.MaxTNT3.pdq.net",
+ "dial-36-2.ots.utexas.edu",
+ "slip129-37-23-152.ga.us.ibm.net",
+ "ts45ip119.cadvision.com",
+ "sdn-ts-004txaustP05.dialsprint.net",
+ "bar-tnt1s66.erols.com",
+ "101.st-louis-15.mo.dial-access.att.net",
+ "h92-245.Arco.COM",
+ "dial-13-2.ots.utexas.edu",
+ "net-redynet29.datamarkets.com.ar",
+ "ccs-shiva28.reacciun.net.ve",
+ "7.houston-11.tx.dial-access.att.net",
+ "ingw129-37-120-26.mo.us.ibm.net",
+ "dialup6.austintx.com",
+ "dns2.tpao.gov.tr",
+ "slip129-37-119-194.nc.us.ibm.net",
+ "cs7.dillons.co.uk.203.119.193.in-addr.arpa",
+ "swprd1.innovplace.saskatoon.sk.ca",
+ "bikini.bologna.maraut.it",
+ "node91.subnet159-198-79.baxter.com",
+ "cust19.max5.new-york.ny.ms.uu.net",
+ "balexander.slip.andrew.cmu.edu",
+ "pool029.max2.denver.co.dynip.alter.net",
+ "cust49.max9.new-york.ny.ms.uu.net",
+ "s61.abq-dialin2.hollyberry.com",
+ "\\u0917\\u0928\\u0947\\u0936.sanjose.ibm.com", /*':'(0x003a) produces U_IDNA_STD3_ASCII_RULES_ERROR*/
+ "www.xn--vea.com",
+ /* "www.\\u00E0\\u00B3\\u00AF.com",//' ' (0x0020) produces U_IDNA_STD3_ASCII_RULES_ERROR*/
+ "www.\\u00C2\\u00A4.com",
+ "www.\\u00C2\\u00A3.com",
+ /* "\\u0025", //'%' (0x0025) produces U_IDNA_STD3_ASCII_RULES_ERROR*/
+ /* "\\u005C\\u005C", //'\' (0x005C) produces U_IDNA_STD3_ASCII_RULES_ERROR*/
+ /*"@",*/
+ /*"\\u002F",*/
+ /*"www.\\u0021.com",*/
+ /*"www.\\u0024.com",*/
+ /*"\\u003f",*/
+ /* These yeild U_IDNA_PROHIBITED_ERROR*/
+ /*"\\u00CF\\u0082.com",*/
+ /*"\\u00CE\\u00B2\\u00C3\\u009Fss.com",*/
+ /*"\\u00E2\\u0098\\u00BA.com",*/
+ "\\u00C3\\u00BC.com"
+
+};
+
+static void
+TestToASCII(){
+
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+ const char* testName = "uidna_toASCII";
+ TestFunc func = uidna_toASCII;
+ for(i=0;i< (int32_t)(sizeof(unicodeIn)/sizeof(unicodeIn[0])); i++){
+ u_charsToUChars(asciiIn[i],buf, (int32_t)strlen(asciiIn[i])+1);
+ testAPI(unicodeIn[i], buf,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+
+ }
+}
+
+static void
+TestToUnicode(){
+
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+ const char* testName = "uidna_toUnicode";
+ TestFunc func = uidna_toUnicode;
+ for(i=0;i< (int32_t)(sizeof(asciiIn)/sizeof(asciiIn[0])); i++){
+ u_charsToUChars(asciiIn[i],buf, (int32_t)strlen(asciiIn[i])+1);
+ testAPI(buf,unicodeIn[i],testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ }
+}
+
+
+static void
+TestIDNToUnicode(){
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+ UChar expected[MAX_DEST_SIZE];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t bufLen = 0;
+ UParseError parseError;
+ const char* testName="uidna_IDNToUnicode";
+ TestFunc func = uidna_IDNToUnicode;
+ for(i=0;i< (int32_t)(sizeof(domainNames)/sizeof(domainNames[0])); i++){
+ bufLen = (int32_t)strlen(domainNames[i]);
+ bufLen = u_unescape(domainNames[i],buf, bufLen+1);
+ func(buf,bufLen,expected,MAX_DEST_SIZE, UIDNA_ALLOW_UNASSIGNED, &parseError,&status);
+ if(U_FAILURE(status)){
+ log_err( "%s failed to convert domainNames[%i].Error: %s \n",testName, i, u_errorName(status));
+ break;
+ }
+ testAPI(buf,expected,testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ /*test toUnicode with all labels in the string*/
+ testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ if(U_FAILURE(status)){
+ log_err( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
+ break;
+ }
+ }
+
+}
+
+static void
+TestIDNToASCII(){
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+ UChar expected[MAX_DEST_SIZE];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t bufLen = 0;
+ UParseError parseError;
+ const char* testName="udina_IDNToASCII";
+ TestFunc func=uidna_IDNToASCII;
+
+ for(i=0;i< (int32_t)(sizeof(domainNames)/sizeof(domainNames[0])); i++){
+ bufLen = (int32_t)strlen(domainNames[i]);
+ bufLen = u_unescape(domainNames[i],buf, bufLen+1);
+ func(buf,bufLen,expected,MAX_DEST_SIZE, UIDNA_ALLOW_UNASSIGNED, &parseError,&status);
+ if(U_FAILURE(status)){
+ log_err( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
+ break;
+ }
+ testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ /*test toASCII with all labels in the string*/
+ testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, FALSE, TRUE, func);
+ if(U_FAILURE(status)){
+ log_err( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
+ break;
+ }
+ }
+
+
+}
+
+
+static void
+testCompareWithSrc(const UChar* s1, int32_t s1Len,
+ const UChar* s2, int32_t s2Len,
+ const char* testName, CompareFunc func,
+ UBool isEqual){
+
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t retVal = func(s1,-1,s2,-1,UIDNA_DEFAULT,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ log_err("Did not get the expected result for %s with null termniated strings.\n",testName);
+ }
+ if(U_FAILURE(status)){
+ log_err( "%s null terminated source failed. Error: %s\n", testName,u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ retVal = func(s1,-1,s2,-1,UIDNA_ALLOW_UNASSIGNED,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ log_err("Did not get the expected result for %s with null termniated strings with options set.\n", testName);
+ }
+ if(U_FAILURE(status)){
+ log_err( "%s null terminated source and options set failed. Error: %s\n",testName, u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ retVal = func(s1,s1Len,s2,s2Len,UIDNA_DEFAULT,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ log_err("Did not get the expected result for %s with string length.\n",testName);
+ }
+ if(U_FAILURE(status)){
+ log_err( "%s with string length. Error: %s\n",testName, u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ retVal = func(s1,s1Len,s2,s2Len,UIDNA_ALLOW_UNASSIGNED,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ log_err("Did not get the expected result for %s with string length and options set.\n",testName);
+ }
+ if(U_FAILURE(status)){
+ log_err( "%s with string length and options set. Error: %s\n", u_errorName(status), testName);
+ }
+}
+
+
+static void
+TestCompare(){
+ int32_t i;
+
+ const char* testName ="uidna_compare";
+ CompareFunc func = uidna_compare;
+
+ UChar www[] = {0x0057, 0x0057, 0x0057, 0x002E, 0x0000};
+ UChar com[] = {0x002E, 0x0043, 0x004F, 0x004D, 0x0000};
+ UChar buf[MAX_DEST_SIZE]={0x0057, 0x0057, 0x0057, 0x002E, 0x0000};
+ UChar source[MAX_DEST_SIZE]={0},
+ uni0[MAX_DEST_SIZE]={0},
+ uni1[MAX_DEST_SIZE]={0},
+ ascii0[MAX_DEST_SIZE]={0},
+ ascii1[MAX_DEST_SIZE]={0},
+ temp[MAX_DEST_SIZE] ={0};
+
+
+ u_strcat(uni0,unicodeIn[0]);
+ u_strcat(uni0,com);
+
+ u_strcat(uni1,unicodeIn[1]);
+ u_strcat(uni1,com);
+
+ u_charsToUChars(asciiIn[0], temp, (int32_t)strlen(asciiIn[0]));
+ u_strcat(ascii0,temp);
+ u_strcat(ascii0,com);
+
+ memset(temp, 0, U_SIZEOF_UCHAR * MAX_DEST_SIZE);
+
+ u_charsToUChars(asciiIn[1], temp, (int32_t)strlen(asciiIn[1]));
+ u_strcat(ascii1,temp);
+ u_strcat(ascii1,com);
+
+ /* prepend www. */
+ u_strcat(source, www);
+
+ for(i=0;i< (int32_t)(sizeof(unicodeIn)/sizeof(unicodeIn[0])); i++){
+ UChar* src;
+ int32_t srcLen;
+
+ memset(buf+4, 0, (MAX_DEST_SIZE-4) * U_SIZEOF_UCHAR);
+
+ u_charsToUChars(asciiIn[i],buf+4, (int32_t)strlen(asciiIn[i]));
+ u_strcat(buf,com);
+
+
+ /* for every entry in unicodeIn array
+ prepend www. and append .com*/
+ source[4]=0;
+ u_strncat(source,unicodeIn[i], u_strlen(unicodeIn[i]));
+ u_strcat(source,com);
+
+ /* a) compare it with itself*/
+ src = source;
+ srcLen = u_strlen(src);
+
+ testCompareWithSrc(src,srcLen,src,srcLen,testName, func, TRUE);
+
+ /* b) compare it with asciiIn equivalent */
+ testCompareWithSrc(src,srcLen,buf,u_strlen(buf),testName, func,TRUE);
+
+ /* c) compare it with unicodeIn not equivalent*/
+ if(i==0){
+ testCompareWithSrc(src,srcLen,uni1,u_strlen(uni1),testName, func,FALSE);
+ }else{
+ testCompareWithSrc(src,srcLen,uni0,u_strlen(uni0),testName, func,FALSE);
+ }
+ /* d) compare it with asciiIn not equivalent */
+ if(i==0){
+ testCompareWithSrc(src,srcLen,ascii1,u_strlen(ascii1),testName, func,FALSE);
+ }else{
+ testCompareWithSrc(src,srcLen,ascii0,u_strlen(ascii0),testName, func,FALSE);
+ }
+
+ }
+}
+
+static void TestUnicode32Norm() {
+ /*
+ * test Unicode 3.2 normalization, before Public Review Issue #29
+ * see cnormtst.c TestComposition()
+ */
+ static const UChar strings[][8]={
+ { 0x1100, 0x0300, 0x1161, 0x0327 },
+ { 0x0b47, 0x0300, 0x0b3e, 0x0327 }
+ };
+
+ UChar ascii[20], unicode[20];
+ int32_t i, length;
+ UErrorCode errorCode;
+
+ for(i=0; i<LENGTHOF(strings); ++i) {
+ errorCode=U_ZERO_ERROR;
+ length=uidna_toASCII(strings[i], -1, ascii, LENGTHOF(ascii), 0, NULL, &errorCode);
+ length=uidna_toUnicode(ascii, length, unicode, LENGTHOF(unicode), 0, NULL, &errorCode);
+ if(u_strncmp(ascii, unicode, length)!=0) {
+ log_err("Did not get the correct output\n");
+ }
+ }
+}
+
+static void TestJB4490(){
+ static const UChar data[][50]= {
+ {0x00F5,0x00dE,0x00dF,0x00dD, 0x0000},
+ {0xFB00,0xFB01}
+ };
+ UChar output1[40] = {0};
+ UChar output2[40] = {0};
+ int32_t i;
+ for(i=0; i< sizeof(data)/sizeof(data[0]); i++){
+ const UChar* src1 = data[i];
+ int32_t src1Len = u_strlen(src1);
+ UChar* dest1 = output1;
+ int32_t dest1Len = 40;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError ps;
+ UChar* src2 = NULL;
+ int32_t src2Len = 0;
+ UChar* dest2 = output2;
+ int32_t dest2Len = 40;
+ dest1Len = uidna_toASCII(src1, src1Len, dest1, dest1Len,UIDNA_DEFAULT, &ps, &status);
+ if(U_FAILURE(status)){
+ log_err("uidna_toUnicode failed with error %s.\n", u_errorName(status));
+ }
+ src2 = dest1;
+ src2Len = dest1Len;
+ dest2Len = uidna_toUnicode(src2, src2Len, dest2, dest2Len, UIDNA_DEFAULT, &ps, &status);
+ if(U_FAILURE(status)){
+ log_err("uidna_toUnicode failed with error %s.\n", u_errorName(status));
+ }
+ }
+}
+
+static void TestJB4475(){
+
+ static const UChar input[][10] = {
+ {0x0054,0x0045,0x0053,0x0054,0x0000},/* TEST */
+ {0x0074,0x0065,0x0073,0x0074,0x0000} /* test */
+ };
+ int i;
+ UChar output[40] = {0};
+ for(i=0; i< sizeof(input)/sizeof(input[0]); i++){
+ const UChar* src = input[i];
+ int32_t srcLen = u_strlen(src);
+ UChar* dest = output;
+ int32_t destLen = 40;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError ps;
+
+ destLen = uidna_toASCII(src, srcLen, dest, destLen,UIDNA_DEFAULT, &ps, &status);
+ if(U_FAILURE(status)){
+ log_err("uidna_toASCII failed with error %s.\n", u_errorName(status));
+ }
+ if(u_strncmp(input[i], dest, srcLen)!=0){
+ log_err("uidna_toASCII did not return the expected output.\n");
+ }
+ }
+}
+
+static void TestLength(){
+ {
+ static const char* cl = "my_very_very_very_very_very_very_very_very_very_very_very_very_very_long_and_incredibly_uncreative_domain_label";
+ UChar ul[128] = {'\0'};
+ UChar dest[256] = {'\0'};
+ /* this unicode string is longer than MAX_LABEL_BUFFER_SIZE and produces an
+ IDNA prepared string (including xn--)that is exactly 63 bytes long */
+ UChar ul1[] = { 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0x00AD, 0x034F, 0x1806, 0x180B,
+ 0x180C, 0x180D, 0x200B, 0x200C, 0x200D, 0x2060, 0xFE00, 0xFE01, 0xFE02,
+ 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07, 0xFE08, 0xFE09, 0xFE0A, 0xFE0B,
+ 0xFE0C, 0xFE0D, 0xFE0E, 0xFE0F, 0xFEFF, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0xC138, 0x0041, 0x00AD, 0x034F, 0x1806, 0x180B, 0x180C, 0x180D, 0x200B,
+ 0x200C, 0x200D, 0x2060, 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05,
+ 0xFE06, 0xFE07, 0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E,
+ 0xFE0F, 0xFEFF, 0x00AD, 0x034F, 0x1806, 0x180B, 0x180C, 0x180D, 0x200B,
+ 0x200C, 0x200D, 0x2060, 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05,
+ 0xFE06, 0xFE07, 0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E,
+ 0xFE0F, 0xFEFF, 0x00AD, 0x034F, 0x1806, 0x180B, 0x180C, 0x180D, 0x200B,
+ 0x200C, 0x200D, 0x2060, 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05,
+ 0xFE06, 0xFE07, 0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E,
+ 0xFE0F, 0xFEFF, 0x0000
+ };
+
+ int32_t len1 = LENGTHOF(ul1)-1/*remove the null termination*/;
+ int32_t destLen = LENGTHOF(dest);
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError ps;
+ int32_t len = (int32_t)strlen(cl);
+ u_charsToUChars(cl, ul, len+1);
+ destLen = uidna_toUnicode(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_ZERO_ERROR){
+ log_err("uidna_toUnicode failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ len = -1;
+ destLen = uidna_toUnicode(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_ZERO_ERROR){
+ log_err("uidna_toUnicode failed with error %s.\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ len = (int32_t)strlen(cl);
+ destLen = uidna_toASCII(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_IDNA_LABEL_TOO_LONG_ERROR){
+ log_err("uidna_toASCII failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ len = -1;
+ destLen = uidna_toASCII(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_IDNA_LABEL_TOO_LONG_ERROR){
+ log_err("uidna_toASCII failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ destLen = uidna_toASCII(ul1, len1, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_ZERO_ERROR){
+ log_err("uidna_toASCII failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ len1 = -1;
+ destLen = uidna_toASCII(ul1, len1, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_ZERO_ERROR){
+ log_err("uidna_toASCII failed with error %s.\n", u_errorName(status));
+ }
+ }
+ {
+ static const char* cl = "my_very_very_long_and_incredibly_uncreative_domain_label.my_very_very_long_and_incredibly_uncreative_domain_label.my_very_very_long_and_incredibly_uncreative_domain_label.my_very_very_long_and_incredibly_uncreative_domain_label.my_very_very_long_and_incredibly_uncreative_domain_label.my_very_very_long_and_incredibly_uncreative_domain_label.ibm.com";
+ UChar ul[400] = {'\0'};
+ UChar dest[400] = {'\0'};
+ int32_t destLen = LENGTHOF(dest);
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError ps;
+ int32_t len = (int32_t)strlen(cl);
+ u_charsToUChars(cl, ul, len+1);
+
+ destLen = uidna_IDNToUnicode(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR){
+ log_err("uidna_IDNToUnicode failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ len = -1;
+ destLen = uidna_IDNToUnicode(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR){
+ log_err("uidna_IDNToUnicode failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ len = (int32_t)strlen(cl);
+ destLen = uidna_IDNToASCII(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR){
+ log_err("uidna_IDNToASCII failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ destLen = LENGTHOF(dest);
+ len = -1;
+ destLen = uidna_IDNToASCII(ul, len, dest, destLen, UIDNA_DEFAULT, &ps, &status);
+ if(status != U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR){
+ log_err("uidna_IDNToASCII failed with error %s.\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ uidna_compare(ul, len, ul, len, UIDNA_DEFAULT, &status);
+ if(status != U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR){
+ log_err("uidna_compare failed with error %s.\n", u_errorName(status));
+ }
+ uidna_compare(ul, -1, ul, -1, UIDNA_DEFAULT, &status);
+ if(status != U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR){
+ log_err("uidna_compare failed with error %s.\n", u_errorName(status));
+ }
+ }
+}
+static void TestJB5273(){
+ static const char INVALID_DOMAIN_NAME[] = "xn--m\\u00FCller.de";
+ UChar invalid_idn[25] = {'\0'};
+ int32_t len = u_unescape(INVALID_DOMAIN_NAME, invalid_idn, strlen(INVALID_DOMAIN_NAME));
+ UChar output[50] = {'\0'};
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError prsError;
+ int32_t outLen = uidna_toUnicode(invalid_idn, len, output, 50, UIDNA_DEFAULT, &prsError, &status);
+ if(U_FAILURE(status)){
+ log_err("uidna_toUnicode failed with error: %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ outLen = uidna_toUnicode(invalid_idn, len, output, 50, UIDNA_USE_STD3_RULES, &prsError, &status);
+ if(U_FAILURE(status)){
+ log_err("uidna_toUnicode failed with error: %s\n", u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ outLen = uidna_IDNToUnicode(invalid_idn, len, output, 50, UIDNA_DEFAULT, &prsError, &status);
+ if(U_FAILURE(status)){
+ log_err("uidna_toUnicode failed with error: %s\n", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ outLen = uidna_IDNToUnicode(invalid_idn, len, output, 50, UIDNA_USE_STD3_RULES, &prsError, &status);
+ if(U_FAILURE(status)){
+ log_err("uidna_toUnicode failed with error: %s\n", u_errorName(status));
+ }
+}
+#endif
+
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.c
new file mode 100644
index 00000000000..d82d37b9e6d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.c
@@ -0,0 +1,3354 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+********************************************************************************
+* File NCCBTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda 7/21/1999 Testing error callback routines
+********************************************************************************
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include "cstring.h"
+#include "unicode/uloc.h"
+#include "unicode/ucnv.h"
+#include "unicode/ucnv_err.h"
+#include "cintltst.h"
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "nccbtst.h"
+#include "unicode/ucnv_cb.h"
+#define NEW_MAX_BUFFER 999
+
+#define nct_min(x,y) ((x<y) ? x : y)
+#define ARRAY_LENGTH(array) (sizeof(array)/sizeof((array)[0]))
+
+static int32_t gInBufferSize = 0;
+static int32_t gOutBufferSize = 0;
+static char gNuConvTestName[1024];
+
+static void printSeq(const uint8_t* a, int len)
+{
+ int i=0;
+ log_verbose("\n{");
+ while (i<len)
+ log_verbose("0x%02X, ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printUSeq(const UChar* a, int len)
+{
+ int i=0;
+ log_verbose("{");
+ while (i<len)
+ log_verbose(" 0x%04x, ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printSeqErr(const uint8_t* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "{");
+ while (i<len)
+ fprintf(stderr, " 0x%02x, ", a[i++]);
+ fprintf(stderr, "}\n");
+}
+
+static void printUSeqErr(const UChar* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "{");
+ while (i<len)
+ fprintf(stderr, "0x%04x, ", a[i++]);
+ fprintf(stderr,"}\n");
+}
+
+static void setNuConvTestName(const char *codepage, const char *direction)
+{
+ sprintf(gNuConvTestName, "[testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
+ codepage,
+ direction,
+ (int)gInBufferSize,
+ (int)gOutBufferSize);
+}
+
+
+static void TestCallBackFailure(void);
+
+void addTestConvertErrorCallBack(TestNode** root);
+
+void addTestConvertErrorCallBack(TestNode** root)
+{
+ addTest(root, &TestSkipCallBack, "tsconv/nccbtst/TestSkipCallBack");
+ addTest(root, &TestStopCallBack, "tsconv/nccbtst/TestStopCallBack");
+ addTest(root, &TestSubCallBack, "tsconv/nccbtst/TestSubCallBack");
+ addTest(root, &TestSubWithValueCallBack, "tsconv/nccbtst/TestSubWithValueCallBack");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestLegalAndOtherCallBack, "tsconv/nccbtst/TestLegalAndOtherCallBack");
+ addTest(root, &TestSingleByteCallBack, "tsconv/nccbtst/TestSingleByteCallBack");
+#endif
+
+ addTest(root, &TestCallBackFailure, "tsconv/nccbtst/TestCallBackFailure");
+}
+
+static void TestSkipCallBack()
+{
+ TestSkip(NEW_MAX_BUFFER, NEW_MAX_BUFFER);
+ TestSkip(1,NEW_MAX_BUFFER);
+ TestSkip(1,1);
+ TestSkip(NEW_MAX_BUFFER, 1);
+}
+
+static void TestStopCallBack()
+{
+ TestStop(NEW_MAX_BUFFER, NEW_MAX_BUFFER);
+ TestStop(1,NEW_MAX_BUFFER);
+ TestStop(1,1);
+ TestStop(NEW_MAX_BUFFER, 1);
+}
+
+static void TestSubCallBack()
+{
+ TestSub(NEW_MAX_BUFFER, NEW_MAX_BUFFER);
+ TestSub(1,NEW_MAX_BUFFER);
+ TestSub(1,1);
+ TestSub(NEW_MAX_BUFFER, 1);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ TestEBCDIC_STATEFUL_Sub(1, 1);
+ TestEBCDIC_STATEFUL_Sub(1, NEW_MAX_BUFFER);
+ TestEBCDIC_STATEFUL_Sub(NEW_MAX_BUFFER, 1);
+ TestEBCDIC_STATEFUL_Sub(NEW_MAX_BUFFER, NEW_MAX_BUFFER);
+#endif
+}
+
+static void TestSubWithValueCallBack()
+{
+ TestSubWithValue(NEW_MAX_BUFFER, NEW_MAX_BUFFER);
+ TestSubWithValue(1,NEW_MAX_BUFFER);
+ TestSubWithValue(1,1);
+ TestSubWithValue(NEW_MAX_BUFFER, 1);
+}
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestLegalAndOtherCallBack()
+{
+ TestLegalAndOthers(NEW_MAX_BUFFER, NEW_MAX_BUFFER);
+ TestLegalAndOthers(1,NEW_MAX_BUFFER);
+ TestLegalAndOthers(1,1);
+ TestLegalAndOthers(NEW_MAX_BUFFER, 1);
+}
+
+static void TestSingleByteCallBack()
+{
+ TestSingleByte(NEW_MAX_BUFFER, NEW_MAX_BUFFER);
+ TestSingleByte(1,NEW_MAX_BUFFER);
+ TestSingleByte(1,1);
+ TestSingleByte(NEW_MAX_BUFFER, 1);
+}
+#endif
+
+static void TestSkip(int32_t inputsize, int32_t outputsize)
+{
+ static const uint8_t expskipIBM_949[]= {
+ 0x00, 0xb0, 0xa1, 0xb0, 0xa2, 0xc8, 0xd3 };
+
+ static const uint8_t expskipIBM_943[] = {
+ 0x9f, 0xaf, 0x9f, 0xb1, 0x89, 0x59 };
+
+ static const uint8_t expskipIBM_930[] = {
+ 0x0e, 0x5d, 0x5f, 0x5d, 0x63, 0x46, 0x6b, 0x0f };
+
+ gInBufferSize = inputsize;
+ gOutBufferSize = outputsize;
+
+ /*From Unicode*/
+ log_verbose("Testing fromUnicode with UCNV_FROM_U_CALLBACK_SKIP \n");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ {
+ static const UChar sampleText[] = { 0x0000, 0xAC00, 0xAC01, 0xEF67, 0xD700 };
+ static const UChar sampleText2[] = { 0x6D63, 0x6D64, 0x6D65, 0x6D66 };
+
+ static const int32_t toIBM949Offsskip [] = { 0, 1, 1, 2, 2, 4, 4 };
+ static const int32_t toIBM943Offsskip [] = { 0, 0, 1, 1, 3, 3 };
+
+ if(!testConvertFromUnicode(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expskipIBM_949, sizeof(expskipIBM_949), "ibm-949",
+ UCNV_FROM_U_CALLBACK_SKIP, toIBM949Offsskip, NULL, 0 ))
+ log_err("u-> ibm-949 with skip did not match.\n");
+ if(!testConvertFromUnicode(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expskipIBM_943, sizeof(expskipIBM_943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_SKIP, toIBM943Offsskip, NULL, 0 ))
+ log_err("u-> ibm-943 with skip did not match.\n");
+ }
+
+ {
+ static const UChar fromU[] = { 0x61, 0xff5e, 0x62, 0x6d63, 0xff5e, 0x6d64, 0x63, 0xff5e, 0x6d66 };
+ static const uint8_t fromUBytes[] = { 0x62, 0x63, 0x0e, 0x5d, 0x5f, 0x5d, 0x63, 0x0f, 0x64, 0x0e, 0x46, 0x6b, 0x0f };
+ static const int32_t fromUOffsets[] = { 0, 2, 3, 3, 3, 5, 5, 6, 6, 8, 8, 8, 8 };
+
+ /* test ibm-930 (EBCDIC_STATEFUL) with fallbacks that are not taken to check correct state transitions */
+ if(!testConvertFromUnicode(fromU, sizeof(fromU)/U_SIZEOF_UCHAR,
+ fromUBytes, sizeof(fromUBytes),
+ "ibm-930",
+ UCNV_FROM_U_CALLBACK_SKIP, fromUOffsets,
+ NULL, 0)
+ ) {
+ log_err("u->ibm-930 with skip with untaken fallbacks did not match.\n");
+ }
+ }
+#endif
+
+ {
+ static const UChar usasciiFromU[] = { 0x61, 0x80, 0x4e00, 0x31, 0xd800, 0xdfff, 0x39 };
+ static const uint8_t usasciiFromUBytes[] = { 0x61, 0x31, 0x39 };
+ static const int32_t usasciiFromUOffsets[] = { 0, 3, 6 };
+
+ static const UChar latin1FromU[] = { 0x61, 0xa0, 0x4e00, 0x31, 0xd800, 0xdfff, 0x39 };
+ static const uint8_t latin1FromUBytes[] = { 0x61, 0xa0, 0x31, 0x39 };
+ static const int32_t latin1FromUOffsets[] = { 0, 1, 3, 6 };
+
+ /* US-ASCII */
+ if(!testConvertFromUnicode(usasciiFromU, sizeof(usasciiFromU)/U_SIZEOF_UCHAR,
+ usasciiFromUBytes, sizeof(usasciiFromUBytes),
+ "US-ASCII",
+ UCNV_FROM_U_CALLBACK_SKIP, usasciiFromUOffsets,
+ NULL, 0)
+ ) {
+ log_err("u->US-ASCII with skip did not match.\n");
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /* SBCS NLTC codepage 367 for US-ASCII */
+ if(!testConvertFromUnicode(usasciiFromU, sizeof(usasciiFromU)/U_SIZEOF_UCHAR,
+ usasciiFromUBytes, sizeof(usasciiFromUBytes),
+ "ibm-367",
+ UCNV_FROM_U_CALLBACK_SKIP, usasciiFromUOffsets,
+ NULL, 0)
+ ) {
+ log_err("u->ibm-367 with skip did not match.\n");
+ }
+#endif
+
+ /* ISO-Latin-1 */
+ if(!testConvertFromUnicode(latin1FromU, sizeof(latin1FromU)/U_SIZEOF_UCHAR,
+ latin1FromUBytes, sizeof(latin1FromUBytes),
+ "LATIN_1",
+ UCNV_FROM_U_CALLBACK_SKIP, latin1FromUOffsets,
+ NULL, 0)
+ ) {
+ log_err("u->LATIN_1 with skip did not match.\n");
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /* windows-1252 */
+ if(!testConvertFromUnicode(latin1FromU, sizeof(latin1FromU)/U_SIZEOF_UCHAR,
+ latin1FromUBytes, sizeof(latin1FromUBytes),
+ "windows-1252",
+ UCNV_FROM_U_CALLBACK_SKIP, latin1FromUOffsets,
+ NULL, 0)
+ ) {
+ log_err("u->windows-1252 with skip did not match.\n");
+ }
+ }
+
+ {
+ static const UChar inputTest[] = { 0x0061, 0xd801, 0xdc01, 0xd801, 0x0061 };
+ static const uint8_t toIBM943[]= { 0x61, 0x61 };
+ static const int32_t offset[]= {0, 4};
+
+ /* EUC_JP*/
+ static const UChar euc_jp_inputText[]={ 0x0061, 0x4edd, 0x5bec, 0xd801, 0xdc01, 0xd801, 0x0061, 0x00a2 };
+ static const uint8_t to_euc_jp[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,
+ 0x61, 0x8e, 0xe0,
+ };
+ static const int32_t fromEUC_JPOffs [] ={ 0, 1, 1, 2, 2, 2, 6, 7, 7};
+
+ /*EUC_TW*/
+ static const UChar euc_tw_inputText[]={ 0x0061, 0x2295, 0x5BF2, 0xd801, 0xdc01, 0xd801, 0x0061, 0x8706, 0x8a, };
+ static const uint8_t to_euc_tw[]={
+ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,
+ 0x61, 0xe6, 0xca, 0x8a,
+ };
+ static const int32_t from_euc_twOffs [] ={ 0, 1, 1, 2, 2, 2, 2, 6, 7, 7, 8,};
+
+ /*ISO-2022-JP*/
+ static const UChar iso_2022_jp_inputText[]={0x0041, 0x00E9/*unassigned*/,0x0042, };
+ static const uint8_t to_iso_2022_jp[]={
+ 0x41,
+ 0x42,
+
+ };
+ static const int32_t from_iso_2022_jpOffs [] ={0,2};
+
+ /*ISO-2022-JP*/
+ UChar const iso_2022_jp_inputText2[]={0x0041, 0x00E9/*unassigned*/,0x43,0xd800/*illegal*/,0x0042, };
+ static const uint8_t to_iso_2022_jp2[]={
+ 0x41,
+ 0x43,
+
+ };
+ static const int32_t from_iso_2022_jpOffs2 [] ={0,2};
+
+ /*ISO-2022-cn*/
+ static const UChar iso_2022_cn_inputText[]={ 0x0041, 0x3712/*unassigned*/, 0x0042, };
+ static const uint8_t to_iso_2022_cn[]={
+ 0x41, 0x42
+ };
+ static const int32_t from_iso_2022_cnOffs [] ={
+ 0, 2
+ };
+
+ /*ISO-2022-CN*/
+ static const UChar iso_2022_cn_inputText1[]={0x0041, 0x3712/*unassigned*/,0x43,0xd800/*illegal*/,0x0042, };
+ static const uint8_t to_iso_2022_cn1[]={
+ 0x41, 0x43
+
+ };
+ static const int32_t from_iso_2022_cnOffs1 [] ={ 0, 2 };
+
+ /*ISO-2022-kr*/
+ static const UChar iso_2022_kr_inputText[]={ 0x0041, 0x03A0,0x3712/*unassigned*/,0x03A0, 0x0042, };
+ static const uint8_t to_iso_2022_kr[]={
+ 0x1b, 0x24, 0x29, 0x43,
+ 0x41,
+ 0x0e, 0x25, 0x50,
+ 0x25, 0x50,
+ 0x0f, 0x42,
+ };
+ static const int32_t from_iso_2022_krOffs [] ={
+ -1,-1,-1,-1,
+ 0,
+ 1,1,1,
+ 3,3,
+ 4,4
+ };
+
+ /*ISO-2022-kr*/
+ static const UChar iso_2022_kr_inputText1[]={ 0x0041, 0x03A0,0x3712/*unassigned*/,0x03A0,0xd801/*illegal*/, 0x0042, };
+ static const uint8_t to_iso_2022_kr1[]={
+ 0x1b, 0x24, 0x29, 0x43,
+ 0x41,
+ 0x0e, 0x25, 0x50,
+ 0x25, 0x50,
+
+ };
+ static const int32_t from_iso_2022_krOffs1 [] ={
+ -1,-1,-1,-1,
+ 0,
+ 1,1,1,
+ 3,3,
+
+ };
+ /* HZ encoding */
+ static const UChar hz_inputText[]={ 0x0041, 0x03A0,0x0662/*unassigned*/,0x03A0, 0x0042, };
+
+ static const uint8_t to_hz[]={
+ 0x7e, 0x7d, 0x41,
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x26, 0x30,
+ 0x7e, 0x7d, 0x42,
+
+ };
+ static const int32_t from_hzOffs [] ={
+ 0,0,0,
+ 1,1,1,1,
+ 3,3,
+ 4,4,4,4
+ };
+
+ static const UChar hz_inputText1[]={ 0x0041, 0x03A0,0x0662/*unassigned*/,0x03A0,0xd801/*illegal*/, 0x0042, };
+
+ static const uint8_t to_hz1[]={
+ 0x7e, 0x7d, 0x41,
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x26, 0x30,
+
+
+ };
+ static const int32_t from_hzOffs1 [] ={
+ 0,0,0,
+ 1,1,1,1,
+ 3,3,
+
+ };
+
+#endif
+
+ static const UChar SCSU_inputText[]={ 0x0041, 0xd801/*illegal*/, 0x0042, };
+
+ static const uint8_t to_SCSU[]={
+ 0x41,
+ 0x42
+
+
+ };
+ static const int32_t from_SCSUOffs [] ={
+ 0,
+ 2,
+
+ };
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /* ISCII */
+ static const UChar iscii_inputText[]={ 0x0041, 0x3712/*unassigned*/, 0x0042, };
+ static const uint8_t to_iscii[]={
+ 0x41,
+ 0x42,
+ };
+ static const int32_t from_isciiOffs [] ={
+ 0,2,
+
+ };
+ /*ISCII*/
+ static const UChar iscii_inputText1[]={0x0044, 0x3712/*unassigned*/,0x43,0xd800/*illegal*/,0x0042, };
+ static const uint8_t to_iscii1[]={
+ 0x44,
+ 0x43,
+
+ };
+ static const int32_t from_isciiOffs1 [] ={0,2};
+
+ if(!testConvertFromUnicode(inputTest, sizeof(inputTest)/sizeof(inputTest[0]),
+ toIBM943, sizeof(toIBM943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_SKIP, offset, NULL, 0 ))
+ log_err("u-> ibm-943 with skip did not match.\n");
+
+ if(!testConvertFromUnicode(euc_jp_inputText, sizeof(euc_jp_inputText)/sizeof(euc_jp_inputText[0]),
+ to_euc_jp, sizeof(to_euc_jp), "euc-jp",
+ UCNV_FROM_U_CALLBACK_SKIP, fromEUC_JPOffs, NULL, 0 ))
+ log_err("u-> euc-jp with skip did not match.\n");
+
+ if(!testConvertFromUnicode(euc_tw_inputText, sizeof(euc_tw_inputText)/sizeof(euc_tw_inputText[0]),
+ to_euc_tw, sizeof(to_euc_tw), "euc-tw",
+ UCNV_FROM_U_CALLBACK_SKIP, from_euc_twOffs, NULL, 0 ))
+ log_err("u-> euc-tw with skip did not match.\n");
+
+ /*iso_2022_jp*/
+ if(!testConvertFromUnicode(iso_2022_jp_inputText, sizeof(iso_2022_jp_inputText)/sizeof(iso_2022_jp_inputText[0]),
+ to_iso_2022_jp, sizeof(to_iso_2022_jp), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_SKIP, from_iso_2022_jpOffs, NULL, 0 ))
+ log_err("u-> iso-2022-jp with skip did not match.\n");
+
+ /* with context */
+ if(!testConvertFromUnicodeWithContext(iso_2022_jp_inputText2, sizeof(iso_2022_jp_inputText2)/sizeof(iso_2022_jp_inputText2[0]),
+ to_iso_2022_jp2, sizeof(to_iso_2022_jp2), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_SKIP, from_iso_2022_jpOffs2, NULL, 0,UCNV_SKIP_STOP_ON_ILLEGAL,U_ILLEGAL_CHAR_FOUND ))
+ log_err("u-> iso-2022-jp with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n");
+
+ /*iso_2022_cn*/
+ if(!testConvertFromUnicode(iso_2022_cn_inputText, sizeof(iso_2022_cn_inputText)/sizeof(iso_2022_cn_inputText[0]),
+ to_iso_2022_cn, sizeof(to_iso_2022_cn), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_SKIP, from_iso_2022_cnOffs, NULL, 0 ))
+ log_err("u-> iso-2022-cn with skip did not match.\n");
+ /*with context*/
+ if(!testConvertFromUnicodeWithContext(iso_2022_cn_inputText1, sizeof(iso_2022_cn_inputText1)/sizeof(iso_2022_cn_inputText1[0]),
+ to_iso_2022_cn1, sizeof(to_iso_2022_cn1), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_SKIP, from_iso_2022_cnOffs1, NULL, 0,UCNV_SKIP_STOP_ON_ILLEGAL,U_ILLEGAL_CHAR_FOUND ))
+ log_err("u-> iso-2022-cn with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n");
+
+ /*iso_2022_kr*/
+ if(!testConvertFromUnicode(iso_2022_kr_inputText, sizeof(iso_2022_kr_inputText)/sizeof(iso_2022_kr_inputText[0]),
+ to_iso_2022_kr, sizeof(to_iso_2022_kr), "iso-2022-kr",
+ UCNV_FROM_U_CALLBACK_SKIP, from_iso_2022_krOffs, NULL, 0 ))
+ log_err("u-> iso-2022-kr with skip did not match.\n");
+ /*with context*/
+ if(!testConvertFromUnicodeWithContext(iso_2022_kr_inputText1, sizeof(iso_2022_kr_inputText1)/sizeof(iso_2022_kr_inputText1[0]),
+ to_iso_2022_kr1, sizeof(to_iso_2022_kr1), "iso-2022-kr",
+ UCNV_FROM_U_CALLBACK_SKIP, from_iso_2022_krOffs1, NULL, 0,UCNV_SKIP_STOP_ON_ILLEGAL,U_ILLEGAL_CHAR_FOUND ))
+ log_err("u-> iso-2022-kr with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n");
+
+ /*hz*/
+ if(!testConvertFromUnicode(hz_inputText, sizeof(hz_inputText)/sizeof(hz_inputText[0]),
+ to_hz, sizeof(to_hz), "HZ",
+ UCNV_FROM_U_CALLBACK_SKIP, from_hzOffs, NULL, 0 ))
+ log_err("u-> HZ with skip did not match.\n");
+ /*with context*/
+ if(!testConvertFromUnicodeWithContext(hz_inputText1, sizeof(hz_inputText1)/sizeof(hz_inputText1[0]),
+ to_hz1, sizeof(to_hz1), "hz",
+ UCNV_FROM_U_CALLBACK_SKIP, from_hzOffs1, NULL, 0,UCNV_SKIP_STOP_ON_ILLEGAL,U_ILLEGAL_CHAR_FOUND ))
+ log_err("u-> hz with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n");
+#endif
+
+ /*SCSU*/
+ if(!testConvertFromUnicode(SCSU_inputText, sizeof(SCSU_inputText)/sizeof(SCSU_inputText[0]),
+ to_SCSU, sizeof(to_SCSU), "SCSU",
+ UCNV_FROM_U_CALLBACK_SKIP, from_SCSUOffs, NULL, 0 ))
+ log_err("u-> SCSU with skip did not match.\n");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /*ISCII*/
+ if(!testConvertFromUnicode(iscii_inputText, sizeof(iscii_inputText)/sizeof(iscii_inputText[0]),
+ to_iscii, sizeof(to_iscii), "ISCII,version=0",
+ UCNV_FROM_U_CALLBACK_SKIP, from_isciiOffs, NULL, 0 ))
+ log_err("u-> iscii with skip did not match.\n");
+ /*with context*/
+ if(!testConvertFromUnicodeWithContext(iscii_inputText1, sizeof(iscii_inputText1)/sizeof(iscii_inputText1[0]),
+ to_iscii1, sizeof(to_iscii1), "ISCII,version=0",
+ UCNV_FROM_U_CALLBACK_SKIP, from_isciiOffs1, NULL, 0,UCNV_SKIP_STOP_ON_ILLEGAL,U_ILLEGAL_CHAR_FOUND ))
+ log_err("u-> iscii with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n");
+#endif
+ }
+
+ log_verbose("Testing fromUnicode for BOCU-1 with UCNV_TO_U_CALLBACK_SKIP\n");
+ {
+ static const uint8_t sampleText[]={ /* from cintltst/bocu1tst.c/TestBOCU1 text 1 */
+ 0xFB, 0xEE, 0x28, /* from source offset 0 */
+ 0x24, 0x1E, 0x52,
+ 0xB2,
+ 0x20,
+ 0xB3,
+ 0xB1,
+ 0x0D,
+ 0x0A,
+
+ 0x20, /* from 8 */
+ 0x00,
+ 0xD0, 0x6C,
+ 0xB6,
+ 0xD8, 0xA5,
+ 0x20,
+ 0x68,
+ 0x59,
+
+ 0xF9, 0x28, /* from 16 */
+ 0x6D,
+ 0x20,
+ 0x73,
+ 0xE0, 0x2D,
+ 0xDE, 0x43,
+ 0xD0, 0x33,
+ 0x20,
+
+ 0xFA, 0x83, /* from 24 */
+ 0x25, 0x01,
+ 0xFB, 0x16, 0x87,
+ 0x4B, 0x16,
+ 0x20,
+ 0xE6, 0xBD,
+ 0xEB, 0x5B,
+ 0x4B, 0xCC,
+
+ 0xF9, 0xA2, /* from 32 */
+ 0xFC, 0x10, 0x3E,
+ 0xFE, 0x16, 0x3A, 0x8C,
+ 0x20,
+ 0xFC, 0x03, 0xAC,
+
+ 0x01, /* from 41 */
+ 0xDE, 0x83,
+ 0x20,
+ 0x09
+ };
+ static const UChar expected[]={
+ 0xFEFF, 0x0061, 0x0062, 0x0020, /* 0 */
+ 0x0063, 0x0061, 0x000D, 0x000A,
+
+ 0x0020, 0x0000, 0x00DF, 0x00E6, /* 8 */
+ 0x0930, 0x0020, 0x0918, 0x0909,
+
+ 0x3086, 0x304D, 0x0020, 0x3053, /* 16 */
+ 0x4000, 0x4E00, 0x7777, 0x0020,
+
+ 0x9FA5, 0x4E00, 0xAC00, 0xBCDE, /* 24 */
+ 0x0020, 0xD7A3, 0xDC00, 0xD800,
+
+ 0xD800, 0xDC00, 0xD845, 0xDDDD, /* 32 */
+ 0xDBBB, 0xDDEE, 0x0020, 0xDBFF,
+
+ 0xDFFF, 0x0001, 0x0E40, 0x0020, /* 40 */
+ 0x0009
+ };
+ static const int32_t offsets[]={
+ 0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 10, 11, 12, 12, 13, 14, 15,
+ 16, 16, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23,
+ 24, 24, 25, 25, 26, 26, 26, 27, 27, 28, 29, 29, 30, 30, 31, 31,
+ 32, 32, 34, 34, 34, 36, 36, 36, 36, 38, 39, 39, 39,
+ 41, 42, 42, 43, 44
+ };
+
+ /* BOCU-1 fromUnicode never calls callbacks, so this only tests single-byte and offsets behavior */
+ if(!testConvertFromUnicode(expected, ARRAY_LENGTH(expected),
+ sampleText, sizeof(sampleText),
+ "BOCU-1",
+ UCNV_FROM_U_CALLBACK_SKIP, offsets, NULL, 0)
+ ) {
+ log_err("u->BOCU-1 with skip did not match.\n");
+ }
+ }
+
+ log_verbose("Testing fromUnicode for CESU-8 with UCNV_TO_U_CALLBACK_SKIP\n");
+ {
+ const uint8_t sampleText[]={
+ 0x61, /* 'a' */
+ 0xc4, 0xb5, /* U+0135 */
+ 0xed, 0x80, 0xa0, /* Hangul U+d020 */
+ 0xed, 0xa0, 0x81, 0xed, 0xb0, 0x81, /* surrogate pair for U+10401 */
+ 0xee, 0x80, 0x80, /* PUA U+e000 */
+ 0xed, 0xb0, 0x81, /* unpaired trail surrogate U+dc01 */
+ 0x62, /* 'b' */
+ 0xed, 0xa0, 0x81, /* unpaired lead surrogate U+d801 */
+ 0xd0, 0x80 /* U+0400 */
+ };
+ UChar expected[]={
+ 0x0061,
+ 0x0135,
+ 0xd020,
+ 0xd801, 0xdc01,
+ 0xe000,
+ 0xdc01,
+ 0x0062,
+ 0xd801,
+ 0x0400
+ };
+ int32_t offsets[]={
+ 0,
+ 1, 1,
+ 2, 2, 2,
+ 3, 3, 3, 4, 4, 4,
+ 5, 5, 5,
+ 6, 6, 6,
+ 7,
+ 8, 8, 8,
+ 9, 9
+ };
+
+ /* CESU-8 fromUnicode never calls callbacks, so this only tests conversion and offsets behavior */
+
+ /* without offsets */
+ if(!testConvertFromUnicode(expected, ARRAY_LENGTH(expected),
+ sampleText, sizeof(sampleText),
+ "CESU-8",
+ UCNV_FROM_U_CALLBACK_SKIP, NULL, NULL, 0)
+ ) {
+ log_err("u->CESU-8 with skip did not match.\n");
+ }
+
+ /* with offsets */
+ if(!testConvertFromUnicode(expected, ARRAY_LENGTH(expected),
+ sampleText, sizeof(sampleText),
+ "CESU-8",
+ UCNV_FROM_U_CALLBACK_SKIP, offsets, NULL, 0)
+ ) {
+ log_err("u->CESU-8 with skip did not match.\n");
+ }
+ }
+
+ /*to Unicode*/
+ log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_SKIP \n");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ {
+
+ static const UChar IBM_949skiptoUnicode[]= {0x0000, 0xAC00, 0xAC01, 0xD700 };
+ static const UChar IBM_943skiptoUnicode[]= { 0x6D63, 0x6D64, 0x6D66 };
+ static const UChar IBM_930skiptoUnicode[]= { 0x6D63, 0x6D64, 0x6D66 };
+
+ static const int32_t fromIBM949Offs [] = { 0, 1, 3, 5};
+ static const int32_t fromIBM943Offs [] = { 0, 2, 4};
+ static const int32_t fromIBM930Offs [] = { 1, 3, 5};
+
+ if(!testConvertToUnicode(expskipIBM_949, sizeof(expskipIBM_949),
+ IBM_949skiptoUnicode, sizeof(IBM_949skiptoUnicode)/sizeof(IBM_949skiptoUnicode),"ibm-949",
+ UCNV_TO_U_CALLBACK_SKIP, fromIBM949Offs, NULL, 0 ))
+ log_err("ibm-949->u with skip did not match.\n");
+ if(!testConvertToUnicode(expskipIBM_943, sizeof(expskipIBM_943),
+ IBM_943skiptoUnicode, sizeof(IBM_943skiptoUnicode)/sizeof(IBM_943skiptoUnicode[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_SKIP, fromIBM943Offs, NULL, 0 ))
+ log_err("ibm-943->u with skip did not match.\n");
+
+
+ if(!testConvertToUnicode(expskipIBM_930, sizeof(expskipIBM_930),
+ IBM_930skiptoUnicode, sizeof(IBM_930skiptoUnicode)/sizeof(IBM_930skiptoUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_SKIP, fromIBM930Offs, NULL, 0 ))
+ log_err("ibm-930->u with skip did not match.\n");
+
+
+ if(!testConvertToUnicodeWithContext(expskipIBM_930, sizeof(expskipIBM_930),
+ IBM_930skiptoUnicode, sizeof(IBM_930skiptoUnicode)/sizeof(IBM_930skiptoUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_SKIP, fromIBM930Offs, NULL, 0,"i",U_ILLEGAL_CHAR_FOUND ))
+ log_err("ibm-930->u with skip did not match.\n");
+ }
+#endif
+
+ {
+ static const uint8_t usasciiToUBytes[] = { 0x61, 0x80, 0x31 };
+ static const UChar usasciiToU[] = { 0x61, 0x31 };
+ static const int32_t usasciiToUOffsets[] = { 0, 2 };
+
+ static const uint8_t latin1ToUBytes[] = { 0x61, 0xa0, 0x31 };
+ static const UChar latin1ToU[] = { 0x61, 0xa0, 0x31 };
+ static const int32_t latin1ToUOffsets[] = { 0, 1, 2 };
+
+ /* US-ASCII */
+ if(!testConvertToUnicode(usasciiToUBytes, sizeof(usasciiToUBytes),
+ usasciiToU, sizeof(usasciiToU)/U_SIZEOF_UCHAR,
+ "US-ASCII",
+ UCNV_TO_U_CALLBACK_SKIP, usasciiToUOffsets,
+ NULL, 0)
+ ) {
+ log_err("US-ASCII->u with skip did not match.\n");
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /* SBCS NLTC codepage 367 for US-ASCII */
+ if(!testConvertToUnicode(usasciiToUBytes, sizeof(usasciiToUBytes),
+ usasciiToU, sizeof(usasciiToU)/U_SIZEOF_UCHAR,
+ "ibm-367",
+ UCNV_TO_U_CALLBACK_SKIP, usasciiToUOffsets,
+ NULL, 0)
+ ) {
+ log_err("ibm-367->u with skip did not match.\n");
+ }
+#endif
+
+ /* ISO-Latin-1 */
+ if(!testConvertToUnicode(latin1ToUBytes, sizeof(latin1ToUBytes),
+ latin1ToU, sizeof(latin1ToU)/U_SIZEOF_UCHAR,
+ "LATIN_1",
+ UCNV_TO_U_CALLBACK_SKIP, latin1ToUOffsets,
+ NULL, 0)
+ ) {
+ log_err("LATIN_1->u with skip did not match.\n");
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /* windows-1252 */
+ if(!testConvertToUnicode(latin1ToUBytes, sizeof(latin1ToUBytes),
+ latin1ToU, sizeof(latin1ToU)/U_SIZEOF_UCHAR,
+ "windows-1252",
+ UCNV_TO_U_CALLBACK_SKIP, latin1ToUOffsets,
+ NULL, 0)
+ ) {
+ log_err("windows-1252->u with skip did not match.\n");
+ }
+#endif
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ {
+ static const uint8_t sampleTxtEBCIDIC_STATEFUL [] ={
+ 0x0e, 0x5d, 0x5f , 0x41, 0x79, 0x41, 0x44
+ };
+ static const UChar EBCIDIC_STATEFUL_toUnicode[] ={ 0x6d63, 0x03b4
+ };
+ static const int32_t from_EBCIDIC_STATEFULOffsets []={ 1, 5};
+
+
+ /* euc-jp*/
+ static const uint8_t sampleTxt_euc_jp[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,
+ 0x8f, 0xda, 0xa1, /*unassigned*/
+ 0x8e, 0xe0,
+ };
+ static const UChar euc_jptoUnicode[]={ 0x0061, 0x4edd, 0x5bec, 0x00a2};
+ static const int32_t from_euc_jpOffs [] ={ 0, 1, 3, 9};
+
+ /*EUC_TW*/
+ static const uint8_t sampleTxt_euc_tw[]={ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,
+ 0x8e, 0xaa, 0xbb, 0xcc,/*unassigned*/
+ 0xe6, 0xca, 0x8a,
+ };
+ static const UChar euc_twtoUnicode[]={ 0x0061, 0x2295, 0x5BF2, 0x8706, 0x8a, };
+ static const int32_t from_euc_twOffs [] ={ 0, 1, 3, 11, 13};
+ /*iso-2022-jp*/
+ static const uint8_t sampleTxt_iso_2022_jp[]={
+ 0x41,
+ 0x1b, 0x24, 0x42, 0x2A, 0x44, /*unassigned*/
+ 0x1b, 0x28, 0x42, 0x42,
+
+ };
+ static const UChar iso_2022_jptoUnicode[]={ 0x41,0x42 };
+ static const int32_t from_iso_2022_jpOffs [] ={ 0,9 };
+
+ /*iso-2022-cn*/
+ static const uint8_t sampleTxt_iso_2022_cn[]={
+ 0x0f, 0x41, 0x44,
+ 0x1B, 0x24, 0x29, 0x47,
+ 0x0E, 0x40, 0x6f, /*unassigned*/
+ 0x0f, 0x42,
+
+ };
+
+ static const UChar iso_2022_cntoUnicode[]={ 0x41, 0x44,0x42 };
+ static const int32_t from_iso_2022_cnOffs [] ={ 1, 2, 11 };
+
+ /*iso-2022-kr*/
+ static const uint8_t sampleTxt_iso_2022_kr[]={
+ 0x1b, 0x24, 0x29, 0x43,
+ 0x41,
+ 0x0E, 0x7f, 0x1E,
+ 0x0e, 0x25, 0x50,
+ 0x0f, 0x51,
+ 0x42, 0x43,
+
+ };
+ static const UChar iso_2022_krtoUnicode[]={ 0x41,0x03A0,0x51, 0x42,0x43};
+ static const int32_t from_iso_2022_krOffs [] ={ 4, 9, 12, 13 , 14 };
+
+ /*hz*/
+ static const uint8_t sampleTxt_hz[]={
+ 0x41,
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x7f, 0x1E, /*unassigned*/
+ 0x26, 0x30,
+ 0x7e, 0x7d, 0x42,
+ 0x7e, 0x7b, 0x7f, 0x1E,/*unassigned*/
+ 0x7e, 0x7d, 0x42,
+ };
+ static const UChar hztoUnicode[]={
+ 0x41,
+ 0x03a0,
+ 0x03A0,
+ 0x42,
+ 0x42,};
+
+ static const int32_t from_hzOffs [] ={0,3,7,11,18, };
+
+ /*ISCII*/
+ static const uint8_t sampleTxt_iscii[]={
+ 0x41,
+ 0xa1,
+ 0xEB, /*unassigned*/
+ 0x26,
+ 0x30,
+ 0xa2,
+ 0xEC, /*unassigned*/
+ 0x42,
+ };
+ static const UChar isciitoUnicode[]={
+ 0x41,
+ 0x0901,
+ 0x26,
+ 0x30,
+ 0x0902,
+ 0x42,
+ };
+
+ static const int32_t from_isciiOffs [] ={0,1,3,4,5,7 };
+
+ /*LMBCS*/
+ static const uint8_t sampleTxtLMBCS[]={ 0x12, 0xc9, 0x50,
+ 0x12, 0x92, 0xa0, /*unassigned*/
+ 0x12, 0x92, 0xA1,
+ };
+ static const UChar LMBCSToUnicode[]={ 0x4e2e, 0xe5c4};
+ static const int32_t fromLMBCS[] = {0, 6};
+
+ if(!testConvertToUnicode(sampleTxtEBCIDIC_STATEFUL, sizeof(sampleTxtEBCIDIC_STATEFUL),
+ EBCIDIC_STATEFUL_toUnicode, sizeof(EBCIDIC_STATEFUL_toUnicode)/sizeof(EBCIDIC_STATEFUL_toUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_SKIP, from_EBCIDIC_STATEFULOffsets, NULL, 0 ))
+ log_err("EBCIDIC_STATEFUL->u with skip did not match.\n");
+
+ if(!testConvertToUnicodeWithContext(sampleTxtEBCIDIC_STATEFUL, sizeof(sampleTxtEBCIDIC_STATEFUL),
+ EBCIDIC_STATEFUL_toUnicode, sizeof(EBCIDIC_STATEFUL_toUnicode)/sizeof(EBCIDIC_STATEFUL_toUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_SKIP, from_EBCIDIC_STATEFULOffsets, NULL, 0,"i",U_ILLEGAL_CHAR_FOUND ))
+ log_err("EBCIDIC_STATEFUL->u with skip did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_euc_jp, sizeof(sampleTxt_euc_jp),
+ euc_jptoUnicode, sizeof(euc_jptoUnicode)/sizeof(euc_jptoUnicode[0]),"euc-jp",
+ UCNV_TO_U_CALLBACK_SKIP, from_euc_jpOffs , NULL, 0))
+ log_err("euc-jp->u with skip did not match.\n");
+
+
+
+ if(!testConvertToUnicode(sampleTxt_euc_tw, sizeof(sampleTxt_euc_tw),
+ euc_twtoUnicode, sizeof(euc_twtoUnicode)/sizeof(euc_twtoUnicode[0]),"euc-tw",
+ UCNV_TO_U_CALLBACK_SKIP, from_euc_twOffs , NULL, 0))
+ log_err("euc-tw->u with skip did not match.\n");
+
+
+ if(!testConvertToUnicode(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp),
+ iso_2022_jptoUnicode, sizeof(iso_2022_jptoUnicode)/sizeof(iso_2022_jptoUnicode[0]),"iso-2022-jp",
+ UCNV_TO_U_CALLBACK_SKIP, from_iso_2022_jpOffs , NULL, 0))
+ log_err("iso-2022-jp->u with skip did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_iso_2022_cn, sizeof(sampleTxt_iso_2022_cn),
+ iso_2022_cntoUnicode, sizeof(iso_2022_cntoUnicode)/sizeof(iso_2022_cntoUnicode[0]),"iso-2022-cn",
+ UCNV_TO_U_CALLBACK_SKIP, from_iso_2022_cnOffs , NULL, 0))
+ log_err("iso-2022-cn->u with skip did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_iso_2022_kr, sizeof(sampleTxt_iso_2022_kr),
+ iso_2022_krtoUnicode, sizeof(iso_2022_krtoUnicode)/sizeof(iso_2022_krtoUnicode[0]),"iso-2022-kr",
+ UCNV_TO_U_CALLBACK_SKIP, from_iso_2022_krOffs , NULL, 0))
+ log_err("iso-2022-kr->u with skip did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_hz, sizeof(sampleTxt_hz),
+ hztoUnicode, sizeof(hztoUnicode)/sizeof(hztoUnicode[0]),"HZ",
+ UCNV_TO_U_CALLBACK_SKIP, from_hzOffs , NULL, 0))
+ log_err("HZ->u with skip did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_iscii, sizeof(sampleTxt_iscii),
+ isciitoUnicode, sizeof(isciitoUnicode)/sizeof(isciitoUnicode[0]),"ISCII,version=0",
+ UCNV_TO_U_CALLBACK_SKIP, from_isciiOffs , NULL, 0))
+ log_err("iscii->u with skip did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxtLMBCS, sizeof(sampleTxtLMBCS),
+ LMBCSToUnicode, sizeof(LMBCSToUnicode)/sizeof(LMBCSToUnicode[0]),"LMBCS-1",
+ UCNV_TO_U_CALLBACK_SKIP, fromLMBCS , NULL, 0))
+ log_err("LMBCS->u with skip did not match.\n");
+
+ }
+#endif
+
+ log_verbose("Testing to Unicode for UTF-8 with UCNV_TO_U_CALLBACK_SKIP \n");
+ {
+ const uint8_t sampleText1[] = { 0x31, 0xe4, 0xba, 0x8c,
+ 0xe0, 0x80, 0x61,};
+ UChar expected1[] = { 0x0031, 0x4e8c, 0x0061};
+ int32_t offsets1[] = { 0x0000, 0x0001, 0x0006};
+
+ if(!testConvertToUnicode(sampleText1, sizeof(sampleText1),
+ expected1, sizeof(expected1)/sizeof(expected1[0]),"utf8",
+ UCNV_TO_U_CALLBACK_SKIP, offsets1, NULL, 0 ))
+ log_err("utf8->u with skip did not match.\n");;
+ }
+
+ log_verbose("Testing toUnicode for SCSU with UCNV_TO_U_CALLBACK_SKIP \n");
+ {
+ const uint8_t sampleText1[] = { 0xba, 0x8c,0xF8, 0x61,0x0c, 0x0c,};
+ UChar expected1[] = { 0x00ba, 0x008c, 0x00f8, 0x0061,0xfffe,0xfffe};
+ int32_t offsets1[] = { 0x0000, 0x0001,0x0002,0x0003,4,5};
+
+ if(!testConvertToUnicode(sampleText1, sizeof(sampleText1),
+ expected1, sizeof(expected1)/sizeof(expected1[0]),"SCSU",
+ UCNV_TO_U_CALLBACK_SKIP, offsets1, NULL, 0 ))
+ log_err("scsu->u with skip did not match.\n");
+ }
+
+ log_verbose("Testing toUnicode for BOCU-1 with UCNV_TO_U_CALLBACK_SKIP\n");
+ {
+ const uint8_t sampleText[]={ /* modified from cintltst/bocu1tst.c/TestBOCU1 text 1 */
+ 0xFB, 0xEE, 0x28, /* single-code point sequence at offset 0 */
+ 0x24, 0x1E, 0x52, /* 3 */
+ 0xB2, /* 6 */
+ 0x20, /* 7 */
+ 0x40, 0x07, /* 8 - wrong trail byte */
+ 0xB3, /* 10 */
+ 0xB1, /* 11 */
+ 0xD0, 0x20, /* 12 - wrong trail byte */
+ 0x0D, /* 14 */
+ 0x0A, /* 15 */
+ 0x20, /* 16 */
+ 0x00, /* 17 */
+ 0xD0, 0x6C, /* 18 */
+ 0xB6, /* 20 */
+ 0xD8, 0xA5, /* 21 */
+ 0x20, /* 23 */
+ 0x68, /* 24 */
+ 0x59, /* 25 */
+ 0xF9, 0x28, /* 26 */
+ 0x6D, /* 28 */
+ 0x20, /* 29 */
+ 0x73, /* 30 */
+ 0xE0, 0x2D, /* 31 */
+ 0xDE, 0x43, /* 33 */
+ 0xD0, 0x33, /* 35 */
+ 0x20, /* 37 */
+ 0xFA, 0x83, /* 38 */
+ 0x25, 0x01, /* 40 */
+ 0xFB, 0x16, 0x87, /* 42 */
+ 0x4B, 0x16, /* 45 */
+ 0x20, /* 47 */
+ 0xE6, 0xBD, /* 48 */
+ 0xEB, 0x5B, /* 50 */
+ 0x4B, 0xCC, /* 52 */
+ 0xF9, 0xA2, /* 54 */
+ 0xFC, 0x10, 0x3E, /* 56 */
+ 0xFE, 0x16, 0x3A, 0x8C, /* 59 */
+ 0x20, /* 63 */
+ 0xFC, 0x03, 0xAC, /* 64 */
+ 0xFF, /* 67 - FF just resets the state without encoding anything */
+ 0x01, /* 68 */
+ 0xDE, 0x83, /* 69 */
+ 0x20, /* 71 */
+ 0x09 /* 72 */
+ };
+ UChar expected[]={
+ 0xFEFF, 0x0061, 0x0062, 0x0020,
+ 0x0063, 0x0061, 0x000D, 0x000A,
+ 0x0020, 0x0000, 0x00DF, 0x00E6,
+ 0x0930, 0x0020, 0x0918, 0x0909,
+ 0x3086, 0x304D, 0x0020, 0x3053,
+ 0x4000, 0x4E00, 0x7777, 0x0020,
+ 0x9FA5, 0x4E00, 0xAC00, 0xBCDE,
+ 0x0020, 0xD7A3, 0xDC00, 0xD800,
+ 0xD800, 0xDC00, 0xD845, 0xDDDD,
+ 0xDBBB, 0xDDEE, 0x0020, 0xDBFF,
+ 0xDFFF, 0x0001, 0x0E40, 0x0020,
+ 0x0009
+ };
+ int32_t offsets[]={
+ 0, 3, 6, 7, /* skip 8, */
+ 10, 11, /* skip 12, */
+ 14, 15, 16, 17, 18,
+ 20, 21, 23, 24, 25, 26, 28, 29,
+ 30, 31, 33, 35, 37, 38,
+ 40, 42, 45, 47, 48,
+ 50, 52, 54, /* trail */ 54, 56, /* trail */ 56, 59, /* trail */ 59,
+ 63, 64, /* trail */ 64, /* reset only 67, */
+ 68, 69,
+ 71, 72
+ };
+
+ if(!testConvertToUnicode(sampleText, sizeof(sampleText),
+ expected, ARRAY_LENGTH(expected), "BOCU-1",
+ UCNV_TO_U_CALLBACK_SKIP, offsets, NULL, 0)
+ ) {
+ log_err("BOCU-1->u with skip did not match.\n");
+ }
+ }
+
+ log_verbose("Testing toUnicode for CESU-8 with UCNV_TO_U_CALLBACK_SKIP\n");
+ {
+ const uint8_t sampleText[]={
+ 0x61, /* 0 'a' */
+ 0xc0, 0x80, /* 1 non-shortest form */
+ 0xc4, 0xb5, /* 3 U+0135 */
+ 0xed, 0x80, 0xa0, /* 5 Hangul U+d020 */
+ 0xed, 0xa0, 0x81, 0xed, 0xb0, 0x81, /* 8 surrogate pair for U+10401 */
+ 0xee, 0x80, 0x80, /* 14 PUA U+e000 */
+ 0xed, 0xb0, 0x81, /* 17 unpaired trail surrogate U+dc01 */
+ 0xf0, 0x90, 0x80, 0x80, /* 20 illegal 4-byte form for U+10000 */
+ 0x62, /* 24 'b' */
+ 0xed, 0xa0, 0x81, /* 25 unpaired lead surrogate U+d801 */
+ 0xed, 0xa0, /* 28 incomplete sequence */
+ 0xd0, 0x80 /* 30 U+0400 */
+ };
+ UChar expected[]={
+ 0x0061,
+ /* skip */
+ 0x0135,
+ 0xd020,
+ 0xd801, 0xdc01,
+ 0xe000,
+ 0xdc01,
+ /* skip */
+ 0x0062,
+ 0xd801,
+ 0x0400
+ };
+ int32_t offsets[]={
+ 0,
+ /* skip 1, */
+ 3,
+ 5,
+ 8, 11,
+ 14,
+ 17,
+ /* skip 20, 20, */
+ 24,
+ 25,
+ /* skip 28 */
+ 30
+ };
+
+ /* without offsets */
+ if(!testConvertToUnicode(sampleText, sizeof(sampleText),
+ expected, ARRAY_LENGTH(expected), "CESU-8",
+ UCNV_TO_U_CALLBACK_SKIP, NULL, NULL, 0)
+ ) {
+ log_err("CESU-8->u with skip did not match.\n");
+ }
+
+ /* with offsets */
+ if(!testConvertToUnicode(sampleText, sizeof(sampleText),
+ expected, ARRAY_LENGTH(expected), "CESU-8",
+ UCNV_TO_U_CALLBACK_SKIP, offsets, NULL, 0)
+ ) {
+ log_err("CESU-8->u with skip did not match.\n");
+ }
+ }
+}
+
+static void TestStop(int32_t inputsize, int32_t outputsize)
+{
+ static const UChar sampleText[] = { 0x0000, 0xAC00, 0xAC01, 0xEF67, 0xD700 };
+ static const UChar sampleText2[] = { 0x6D63, 0x6D64, 0x6D65, 0x6D66 };
+
+ static const uint8_t expstopIBM_949[]= {
+ 0x00, 0xb0, 0xa1, 0xb0, 0xa2};
+
+ static const uint8_t expstopIBM_943[] = {
+ 0x9f, 0xaf, 0x9f, 0xb1};
+
+ static const uint8_t expstopIBM_930[] = {
+ 0x0e, 0x5d, 0x5f, 0x5d, 0x63};
+
+ static const UChar IBM_949stoptoUnicode[]= {0x0000, 0xAC00, 0xAC01};
+ static const UChar IBM_943stoptoUnicode[]= { 0x6D63, 0x6D64};
+ static const UChar IBM_930stoptoUnicode[]= { 0x6D63, 0x6D64};
+
+
+ static const int32_t toIBM949Offsstop [] = { 0, 1, 1, 2, 2};
+ static const int32_t toIBM943Offsstop [] = { 0, 0, 1, 1};
+ static const int32_t toIBM930Offsstop [] = { 0, 0, 0, 1, 1};
+
+ static const int32_t fromIBM949Offs [] = { 0, 1, 3};
+ static const int32_t fromIBM943Offs [] = { 0, 2};
+ static const int32_t fromIBM930Offs [] = { 1, 3};
+
+ gInBufferSize = inputsize;
+ gOutBufferSize = outputsize;
+
+ /*From Unicode*/
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ if(!testConvertFromUnicode(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expstopIBM_949, sizeof(expstopIBM_949), "ibm-949",
+ UCNV_FROM_U_CALLBACK_STOP, toIBM949Offsstop, NULL, 0 ))
+ log_err("u-> ibm-949 with stop did not match.\n");
+ if(!testConvertFromUnicode(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expstopIBM_943, sizeof(expstopIBM_943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_STOP, toIBM943Offsstop , NULL, 0))
+ log_err("u-> ibm-943 with stop did not match.\n");
+ if(!testConvertFromUnicode(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expstopIBM_930, sizeof(expstopIBM_930), "ibm-930",
+ UCNV_FROM_U_CALLBACK_STOP, toIBM930Offsstop, NULL, 0 ))
+ log_err("u-> ibm-930 with stop did not match.\n");
+
+ log_verbose("Testing fromUnicode with UCNV_FROM_U_CALLBACK_STOP \n");
+ {
+ static const UChar inputTest[] = { 0x0061, 0xd801, 0xdc01, 0xd801, 0x0061 };
+ static const uint8_t toIBM943[]= { 0x61,};
+ static const int32_t offset[]= {0,} ;
+
+ /*EUC_JP*/
+ static const UChar euc_jp_inputText[]={ 0x0061, 0x4edd, 0x5bec, 0xd801, 0xdc01, 0xd801, 0x0061, 0x00a2 };
+ static const uint8_t to_euc_jp[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,};
+ static const int32_t fromEUC_JPOffs [] ={ 0, 1, 1, 2, 2, 2,};
+
+ /*EUC_TW*/
+ static const UChar euc_tw_inputText[]={ 0x0061, 0x2295, 0x5BF2, 0xd801, 0xdc01, 0xd801, 0x0061, 0x8706, 0x8a, };
+ static const uint8_t to_euc_tw[]={
+ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,};
+ static const int32_t from_euc_twOffs [] ={ 0, 1, 1, 2, 2, 2, 2,};
+
+ /*ISO-2022-JP*/
+ static const UChar iso_2022_jp_inputText[]={0x0041, 0x00E9, 0x0042, };
+ static const uint8_t to_iso_2022_jp[]={
+ 0x41,
+
+ };
+ static const int32_t from_iso_2022_jpOffs [] ={0,};
+
+ /*ISO-2022-cn*/
+ static const UChar iso_2022_cn_inputText[]={ 0x0041, 0x3712, 0x0042, };
+ static const uint8_t to_iso_2022_cn[]={
+ 0x41,
+
+ };
+ static const int32_t from_iso_2022_cnOffs [] ={
+ 0,0,
+ 2,2,
+ };
+
+ /*ISO-2022-kr*/
+ static const UChar iso_2022_kr_inputText[]={ 0x0041, 0x03A0,0x3712/*unassigned*/,0x03A0, 0x0042, };
+ static const uint8_t to_iso_2022_kr[]={
+ 0x1b, 0x24, 0x29, 0x43,
+ 0x41,
+ 0x0e, 0x25, 0x50,
+ };
+ static const int32_t from_iso_2022_krOffs [] ={
+ -1,-1,-1,-1,
+ 0,
+ 1,1,1,
+ };
+
+ /* HZ encoding */
+ static const UChar hz_inputText[]={ 0x0041, 0x03A0,0x0662/*unassigned*/,0x03A0, 0x0042, };
+
+ static const uint8_t to_hz[]={
+ 0x7e, 0x7d, 0x41,
+ 0x7e, 0x7b, 0x26, 0x30,
+
+ };
+ static const int32_t from_hzOffs [] ={
+ 0, 0,0,
+ 1,1,1,1,
+ };
+
+ /*ISCII*/
+ static const UChar iscii_inputText[]={ 0x0041, 0x3712, 0x0042, };
+ static const uint8_t to_iscii[]={
+ 0x41,
+ };
+ static const int32_t from_isciiOffs [] ={
+ 0,
+ };
+
+ if(!testConvertFromUnicode(inputTest, sizeof(inputTest)/sizeof(inputTest[0]),
+ toIBM943, sizeof(toIBM943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_STOP, offset, NULL, 0 ))
+ log_err("u-> ibm-943 with stop did not match.\n");
+
+ if(!testConvertFromUnicode(euc_jp_inputText, sizeof(euc_jp_inputText)/sizeof(euc_jp_inputText[0]),
+ to_euc_jp, sizeof(to_euc_jp), "euc-jp",
+ UCNV_FROM_U_CALLBACK_STOP, fromEUC_JPOffs, NULL, 0 ))
+ log_err("u-> euc-jp with stop did not match.\n");
+
+ if(!testConvertFromUnicode(euc_tw_inputText, sizeof(euc_tw_inputText)/sizeof(euc_tw_inputText[0]),
+ to_euc_tw, sizeof(to_euc_tw), "euc-tw",
+ UCNV_FROM_U_CALLBACK_STOP, from_euc_twOffs, NULL, 0 ))
+ log_err("u-> euc-tw with stop did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_jp_inputText, sizeof(iso_2022_jp_inputText)/sizeof(iso_2022_jp_inputText[0]),
+ to_iso_2022_jp, sizeof(to_iso_2022_jp), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_STOP, from_iso_2022_jpOffs, NULL, 0 ))
+ log_err("u-> iso-2022-jp with stop did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_jp_inputText, sizeof(iso_2022_jp_inputText)/sizeof(iso_2022_jp_inputText[0]),
+ to_iso_2022_jp, sizeof(to_iso_2022_jp), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_STOP, from_iso_2022_jpOffs, NULL, 0 ))
+ log_err("u-> iso-2022-jp with stop did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_cn_inputText, sizeof(iso_2022_cn_inputText)/sizeof(iso_2022_cn_inputText[0]),
+ to_iso_2022_cn, sizeof(to_iso_2022_cn), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_STOP, from_iso_2022_cnOffs, NULL, 0 ))
+ log_err("u-> iso-2022-cn with stop did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_kr_inputText, sizeof(iso_2022_kr_inputText)/sizeof(iso_2022_kr_inputText[0]),
+ to_iso_2022_kr, sizeof(to_iso_2022_kr), "iso-2022-kr",
+ UCNV_FROM_U_CALLBACK_STOP, from_iso_2022_krOffs, NULL, 0 ))
+ log_err("u-> iso-2022-kr with stop did not match.\n");
+
+ if(!testConvertFromUnicode(hz_inputText, sizeof(hz_inputText)/sizeof(hz_inputText[0]),
+ to_hz, sizeof(to_hz), "HZ",
+ UCNV_FROM_U_CALLBACK_STOP, from_hzOffs, NULL, 0 ))
+ log_err("u-> HZ with stop did not match.\n");\
+
+ if(!testConvertFromUnicode(iscii_inputText, sizeof(iscii_inputText)/sizeof(iscii_inputText[0]),
+ to_iscii, sizeof(to_iscii), "ISCII,version=0",
+ UCNV_FROM_U_CALLBACK_STOP, from_isciiOffs, NULL, 0 ))
+ log_err("u-> iscii with stop did not match.\n");
+
+
+ }
+#endif
+
+ log_verbose("Testing fromUnicode for SCSU with UCNV_FROM_U_CALLBACK_STOP \n");
+ {
+ static const UChar SCSU_inputText[]={ 0x0041, 0xd801/*illegal*/, 0x0042, };
+
+ static const uint8_t to_SCSU[]={
+ 0x41,
+
+ };
+ int32_t from_SCSUOffs [] ={
+ 0,
+
+ };
+ if(!testConvertFromUnicode(SCSU_inputText, sizeof(SCSU_inputText)/sizeof(SCSU_inputText[0]),
+ to_SCSU, sizeof(to_SCSU), "SCSU",
+ UCNV_FROM_U_CALLBACK_STOP, from_SCSUOffs, NULL, 0 ))
+ log_err("u-> SCSU with skip did not match.\n");
+
+ }
+
+ /*to Unicode*/
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ if(!testConvertToUnicode(expstopIBM_949, sizeof(expstopIBM_949),
+ IBM_949stoptoUnicode, sizeof(IBM_949stoptoUnicode)/sizeof(IBM_949stoptoUnicode[0]),"ibm-949",
+ UCNV_TO_U_CALLBACK_STOP, fromIBM949Offs, NULL, 0 ))
+ log_err("ibm-949->u with stop did not match.\n");
+ if(!testConvertToUnicode(expstopIBM_943, sizeof(expstopIBM_943),
+ IBM_943stoptoUnicode, sizeof(IBM_943stoptoUnicode)/sizeof(IBM_943stoptoUnicode[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_STOP, fromIBM943Offs, NULL, 0 ))
+ log_err("ibm-943->u with stop did not match.\n");
+ if(!testConvertToUnicode(expstopIBM_930, sizeof(expstopIBM_930),
+ IBM_930stoptoUnicode, sizeof(IBM_930stoptoUnicode)/sizeof(IBM_930stoptoUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_STOP, fromIBM930Offs, NULL, 0 ))
+ log_err("ibm-930->u with stop did not match.\n");
+
+ log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_STOP \n");
+ {
+
+ static const uint8_t sampleTxtEBCIDIC_STATEFUL [] ={
+ 0x0e, 0x5d, 0x5f , 0x41, 0x79, 0x41, 0x44
+ };
+ static const UChar EBCIDIC_STATEFUL_toUnicode[] ={ 0x6d63 };
+ static const int32_t from_EBCIDIC_STATEFULOffsets []={ 1};
+
+
+ /*EUC-JP*/
+ static const uint8_t sampleTxt_euc_jp[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,
+ 0x8f, 0xda, 0xa1, /*unassigned*/
+ 0x8e, 0xe0,
+ };
+ static const UChar euc_jptoUnicode[]={ 0x0061, 0x4edd, 0x5bec};
+ static const int32_t from_euc_jpOffs [] ={ 0, 1, 3};
+
+ /*EUC_TW*/
+ static const uint8_t sampleTxt_euc_tw[]={ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,
+ 0x8e, 0xaa, 0xbb, 0xcc,/*unassigned*/
+ 0xe6, 0xca, 0x8a,
+ };
+ UChar euc_twtoUnicode[]={ 0x0061, 0x2295, 0x5BF2};
+ int32_t from_euc_twOffs [] ={ 0, 1, 3};
+
+
+
+ if(!testConvertToUnicode(sampleTxtEBCIDIC_STATEFUL, sizeof(sampleTxtEBCIDIC_STATEFUL),
+ EBCIDIC_STATEFUL_toUnicode, sizeof(EBCIDIC_STATEFUL_toUnicode)/sizeof(EBCIDIC_STATEFUL_toUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_STOP, from_EBCIDIC_STATEFULOffsets, NULL, 0 ))
+ log_err("EBCIDIC_STATEFUL->u with stop did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_euc_jp, sizeof(sampleTxt_euc_jp),
+ euc_jptoUnicode, sizeof(euc_jptoUnicode)/sizeof(euc_jptoUnicode[0]),"euc-jp",
+ UCNV_TO_U_CALLBACK_STOP, from_euc_jpOffs , NULL, 0))
+ log_err("euc-jp->u with stop did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_euc_tw, sizeof(sampleTxt_euc_tw),
+ euc_twtoUnicode, sizeof(euc_twtoUnicode)/sizeof(euc_twtoUnicode[0]),"euc-tw",
+ UCNV_TO_U_CALLBACK_STOP, from_euc_twOffs, NULL, 0 ))
+ log_err("euc-tw->u with stop did not match.\n");
+ }
+#endif
+
+ log_verbose("Testing toUnicode for UTF-8 with UCNV_TO_U_CALLBACK_STOP \n");
+ {
+ static const uint8_t sampleText1[] = { 0x31, 0xe4, 0xba, 0x8c,
+ 0xe0, 0x80, 0x61,};
+ static const UChar expected1[] = { 0x0031, 0x4e8c,};
+ static const int32_t offsets1[] = { 0x0000, 0x0001};
+
+ if(!testConvertToUnicode(sampleText1, sizeof(sampleText1),
+ expected1, sizeof(expected1)/sizeof(expected1[0]),"utf8",
+ UCNV_TO_U_CALLBACK_STOP, offsets1, NULL, 0 ))
+ log_err("utf8->u with stop did not match.\n");;
+ }
+ log_verbose("Testing toUnicode for SCSU with UCNV_TO_U_CALLBACK_STOP \n");
+ {
+ static const uint8_t sampleText1[] = { 0xba, 0x8c,0xF8, 0x61,0x0c, 0x0c,0x04};
+ static const UChar expected1[] = { 0x00ba, 0x008c, 0x00f8, 0x0061};
+ static const int32_t offsets1[] = { 0x0000, 0x0001,0x0002,0x0003};
+
+ if(!testConvertToUnicode(sampleText1, sizeof(sampleText1),
+ expected1, sizeof(expected1)/sizeof(expected1[0]),"SCSU",
+ UCNV_TO_U_CALLBACK_STOP, offsets1, NULL, 0 ))
+ log_err("scsu->u with stop did not match.\n");;
+ }
+
+}
+
+static void TestSub(int32_t inputsize, int32_t outputsize)
+{
+ static const UChar sampleText[] = { 0x0000, 0xAC00, 0xAC01, 0xEF67, 0xD700 };
+ static const UChar sampleText2[]= { 0x6D63, 0x6D64, 0x6D65, 0x6D66 };
+
+ static const uint8_t expsubIBM_949[] =
+ { 0x00, 0xb0, 0xa1, 0xb0, 0xa2, 0xaf, 0xfe, 0xc8, 0xd3 };
+
+ static const uint8_t expsubIBM_943[] = {
+ 0x9f, 0xaf, 0x9f, 0xb1, 0xfc, 0xfc, 0x89, 0x59 };
+
+ static const uint8_t expsubIBM_930[] = {
+ 0x0e, 0x5d, 0x5f, 0x5d, 0x63, 0xfe, 0xfe, 0x46, 0x6b, 0x0f };
+
+ static const UChar IBM_949subtoUnicode[]= {0x0000, 0xAC00, 0xAC01, 0xfffd, 0xD700 };
+ static const UChar IBM_943subtoUnicode[]= {0x6D63, 0x6D64, 0xfffd, 0x6D66 };
+ static const UChar IBM_930subtoUnicode[]= {0x6D63, 0x6D64, 0xfffd, 0x6D66 };
+
+ static const int32_t toIBM949Offssub [] ={ 0, 1, 1, 2, 2, 3, 3, 4, 4 };
+ static const int32_t toIBM943Offssub [] ={ 0, 0, 1, 1, 2, 2, 3, 3 };
+ static const int32_t toIBM930Offssub [] ={ 0, 0, 0, 1, 1, 2, 2, 3, 3, 3 };
+
+ static const int32_t fromIBM949Offs [] = { 0, 1, 3, 5, 7 };
+ static const int32_t fromIBM943Offs [] = { 0, 2, 4, 6 };
+ static const int32_t fromIBM930Offs [] = { 1, 3, 5, 7 };
+
+ gInBufferSize = inputsize;
+ gOutBufferSize = outputsize;
+
+ /*from unicode*/
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ if(!testConvertFromUnicode(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expsubIBM_949, sizeof(expsubIBM_949), "ibm-949",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, toIBM949Offssub, NULL, 0 ))
+ log_err("u-> ibm-949 with subst did not match.\n");
+ if(!testConvertFromUnicode(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expsubIBM_943, sizeof(expsubIBM_943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, toIBM943Offssub , NULL, 0))
+ log_err("u-> ibm-943 with subst did not match.\n");
+ if(!testConvertFromUnicode(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expsubIBM_930, sizeof(expsubIBM_930), "ibm-930",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, toIBM930Offssub, NULL, 0 ))
+ log_err("u-> ibm-930 with subst did not match.\n");
+
+ log_verbose("Testing fromUnicode with UCNV_FROM_U_CALLBACK_SUBSTITUTE \n");
+ {
+ static const UChar inputTest[] = { 0x0061, 0xd801, 0xdc01, 0xd801, 0x0061 };
+ static const uint8_t toIBM943[]= { 0x61, 0xfc, 0xfc, 0xfc, 0xfc, 0x61 };
+ static const int32_t offset[]= {0, 1, 1, 3, 3, 4};
+
+
+ /* EUC_JP*/
+ static const UChar euc_jp_inputText[]={ 0x0061, 0x4edd, 0x5bec, 0xd801, 0xdc01, 0xd801, 0x0061, 0x00a2 };
+ static const uint8_t to_euc_jp[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,
+ 0xf4, 0xfe, 0xf4, 0xfe,
+ 0x61, 0x8e, 0xe0,
+ };
+ static const int32_t fromEUC_JPOffs [] ={ 0, 1, 1, 2, 2, 2, 3, 3, 5, 5, 6, 7, 7};
+
+ /*EUC_TW*/
+ static const UChar euc_tw_inputText[]={ 0x0061, 0x2295, 0x5BF2, 0xd801, 0xdc01, 0xd801, 0x0061, 0x8706, 0x8a, };
+ static const uint8_t to_euc_tw[]={
+ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,
+ 0xfd, 0xfe, 0xfd, 0xfe,
+ 0x61, 0xe6, 0xca, 0x8a,
+ };
+
+ static const int32_t from_euc_twOffs [] ={ 0, 1, 1, 2, 2, 2, 2, 3, 3, 5, 5, 6, 7, 7, 8,};
+
+ if(!testConvertFromUnicode(inputTest, sizeof(inputTest)/sizeof(inputTest[0]),
+ toIBM943, sizeof(toIBM943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, offset, NULL, 0 ))
+ log_err("u-> ibm-943 with substitute did not match.\n");
+
+ if(!testConvertFromUnicode(euc_jp_inputText, sizeof(euc_jp_inputText)/sizeof(euc_jp_inputText[0]),
+ to_euc_jp, sizeof(to_euc_jp), "euc-jp",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, fromEUC_JPOffs, NULL, 0 ))
+ log_err("u-> euc-jp with substitute did not match.\n");
+
+ if(!testConvertFromUnicode(euc_tw_inputText, sizeof(euc_tw_inputText)/sizeof(euc_tw_inputText[0]),
+ to_euc_tw, sizeof(to_euc_tw), "euc-tw",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, from_euc_twOffs, NULL, 0 ))
+ log_err("u-> euc-tw with substitute did not match.\n");
+ }
+#endif
+
+ log_verbose("Testing fromUnicode for SCSU with UCNV_FROM_U_CALLBACK_SUBSTITUTE \n");
+ {
+ UChar SCSU_inputText[]={ 0x0041, 0xd801/*illegal*/, 0x0042, };
+
+ const uint8_t to_SCSU[]={
+ 0x41,
+ 0x0e, 0xff,0xfd,
+ 0x42
+
+
+ };
+ int32_t from_SCSUOffs [] ={
+ 0,
+ 1,1,1,
+ 2,
+
+ };
+ const uint8_t to_SCSU_1[]={
+ 0x41,
+
+ };
+ int32_t from_SCSUOffs_1 [] ={
+ 0,
+
+ };
+ if(!testConvertFromUnicode(SCSU_inputText, sizeof(SCSU_inputText)/sizeof(SCSU_inputText[0]),
+ to_SCSU, sizeof(to_SCSU), "SCSU",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, from_SCSUOffs, NULL, 0 ))
+ log_err("u-> SCSU with substitute did not match.\n");
+
+ if(!testConvertFromUnicodeWithContext(SCSU_inputText, sizeof(SCSU_inputText)/sizeof(SCSU_inputText[0]),
+ to_SCSU_1, sizeof(to_SCSU_1), "SCSU",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, from_SCSUOffs_1, NULL, 0,"i",U_ILLEGAL_CHAR_FOUND ))
+ log_err("u-> SCSU with substitute did not match.\n");
+ }
+
+ log_verbose("Testing fromUnicode for UTF-8 with UCNV_FROM_U_CALLBACK_SUBSTITUTE\n");
+ {
+ static const UChar testinput[]={ 0x20ac, 0xd801, 0xdc01, 0xdc01, 0xd801, 0xffff, 0x0061,};
+ static const uint8_t expectedUTF8[]= { 0xe2, 0x82, 0xac,
+ 0xf0, 0x90, 0x90, 0x81,
+ 0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd,
+ 0xef, 0xbf, 0xbf, 0x61,
+
+ };
+ static const int32_t offsets[]={ 0, 0, 0, 1, 1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6 };
+ if(!testConvertFromUnicode(testinput, sizeof(testinput)/sizeof(testinput[0]),
+ expectedUTF8, sizeof(expectedUTF8), "utf8",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, offsets, NULL, 0 )) {
+ log_err("u-> utf8 with stop did not match.\n");
+ }
+ }
+
+ log_verbose("Testing fromUnicode for UTF-16 with UCNV_FROM_U_CALLBACK_SUBSTITUTE\n");
+ {
+ static const UChar in[]={ 0x0041, 0xfeff };
+
+ static const uint8_t out[]={
+#if U_IS_BIG_ENDIAN
+ 0xfe, 0xff,
+ 0x00, 0x41,
+ 0xfe, 0xff
+#else
+ 0xff, 0xfe,
+ 0x41, 0x00,
+ 0xff, 0xfe
+#endif
+ };
+ static const int32_t offsets[]={
+ -1, -1, 0, 0, 1, 1
+ };
+
+ if(!testConvertFromUnicode(in, ARRAY_LENGTH(in),
+ out, sizeof(out), "UTF-16",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, offsets, NULL, 0)
+ ) {
+ log_err("u->UTF-16 with substitute did not match.\n");
+ }
+ }
+
+ log_verbose("Testing fromUnicode for UTF-32 with UCNV_FROM_U_CALLBACK_SUBSTITUTE\n");
+ {
+ static const UChar in[]={ 0x0041, 0xfeff };
+
+ static const uint8_t out[]={
+#if U_IS_BIG_ENDIAN
+ 0x00, 0x00, 0xfe, 0xff,
+ 0x00, 0x00, 0x00, 0x41,
+ 0x00, 0x00, 0xfe, 0xff
+#else
+ 0xff, 0xfe, 0x00, 0x00,
+ 0x41, 0x00, 0x00, 0x00,
+ 0xff, 0xfe, 0x00, 0x00
+#endif
+ };
+ static const int32_t offsets[]={
+ -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1
+ };
+
+ if(!testConvertFromUnicode(in, ARRAY_LENGTH(in),
+ out, sizeof(out), "UTF-32",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, offsets, NULL, 0)
+ ) {
+ log_err("u->UTF-32 with substitute did not match.\n");
+ }
+ }
+
+ /*to unicode*/
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ if(!testConvertToUnicode(expsubIBM_949, sizeof(expsubIBM_949),
+ IBM_949subtoUnicode, sizeof(IBM_949subtoUnicode)/sizeof(IBM_949subtoUnicode[0]),"ibm-949",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, fromIBM949Offs, NULL, 0 ))
+ log_err("ibm-949->u with substitute did not match.\n");
+ if(!testConvertToUnicode(expsubIBM_943, sizeof(expsubIBM_943),
+ IBM_943subtoUnicode, sizeof(IBM_943subtoUnicode)/sizeof(IBM_943subtoUnicode[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, fromIBM943Offs, NULL, 0 ))
+ log_err("ibm-943->u with substitute did not match.\n");
+ if(!testConvertToUnicode(expsubIBM_930, sizeof(expsubIBM_930),
+ IBM_930subtoUnicode, sizeof(IBM_930subtoUnicode)/sizeof(IBM_930subtoUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, fromIBM930Offs, NULL, 0 ))
+ log_err("ibm-930->u with substitute did not match.\n");
+
+ log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_SUBSTITUTE \n");
+ {
+
+ const uint8_t sampleTxtEBCIDIC_STATEFUL [] ={
+ 0x0e, 0x5d, 0x5f , 0x41, 0x79, 0x41, 0x44
+ };
+ UChar EBCIDIC_STATEFUL_toUnicode[] ={ 0x6d63, 0xfffd, 0x03b4
+ };
+ int32_t from_EBCIDIC_STATEFULOffsets []={ 1, 3, 5};
+
+
+ /* EUC_JP*/
+ const uint8_t sampleTxt_euc_jp[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,
+ 0x8f, 0xda, 0xa1, /*unassigned*/
+ 0x8e, 0xe0, 0x8a
+ };
+ UChar euc_jptoUnicode[]={ 0x0061, 0x4edd, 0x5bec, 0xfffd, 0x00a2, 0x008a };
+ int32_t from_euc_jpOffs [] ={ 0, 1, 3, 6, 9, 11 };
+
+ /*EUC_TW*/
+ const uint8_t sampleTxt_euc_tw[]={
+ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,
+ 0x8e, 0xaa, 0xbb, 0xcc,/*unassigned*/
+ 0xe6, 0xca, 0x8a,
+ };
+ UChar euc_twtoUnicode[]={ 0x0061, 0x2295, 0x5BF2, 0xfffd, 0x8706, 0x8a, };
+ int32_t from_euc_twOffs [] ={ 0, 1, 3, 7, 11, 13};
+
+
+ if(!testConvertToUnicode(sampleTxtEBCIDIC_STATEFUL, sizeof(sampleTxtEBCIDIC_STATEFUL),
+ EBCIDIC_STATEFUL_toUnicode, sizeof(EBCIDIC_STATEFUL_toUnicode)/sizeof(EBCIDIC_STATEFUL_toUnicode[0]),"ibm-930",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, from_EBCIDIC_STATEFULOffsets, NULL, 0 ))
+ log_err("EBCIDIC_STATEFUL->u with substitute did not match.\n");
+
+
+ if(!testConvertToUnicode(sampleTxt_euc_jp, sizeof(sampleTxt_euc_jp),
+ euc_jptoUnicode, sizeof(euc_jptoUnicode)/sizeof(euc_jptoUnicode[0]),"euc-jp",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, from_euc_jpOffs, NULL, 0 ))
+ log_err("euc-jp->u with substitute did not match.\n");
+
+
+ if(!testConvertToUnicode(sampleTxt_euc_tw, sizeof(sampleTxt_euc_tw),
+ euc_twtoUnicode, sizeof(euc_twtoUnicode)/sizeof(euc_twtoUnicode[0]),"euc-tw",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, from_euc_twOffs, NULL, 0 ))
+ log_err("euc-tw->u with substitute did not match.\n");
+
+
+ if(!testConvertToUnicodeWithContext(sampleTxt_euc_jp, sizeof(sampleTxt_euc_jp),
+ euc_jptoUnicode, sizeof(euc_jptoUnicode)/sizeof(euc_jptoUnicode[0]),"euc-jp",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, from_euc_jpOffs, NULL, 0 ,"i", U_ILLEGAL_CHAR_FOUND))
+ log_err("euc-jp->u with substitute did not match.\n");
+ }
+#endif
+
+ log_verbose("Testing toUnicode for UTF-8 with UCNV_TO_U_CALLBACK_SUBSTITUTE \n");
+ {
+ const uint8_t sampleText1[] = { 0x31, 0xe4, 0xba, 0x8c,
+ 0xe0, 0x80, 0x61,};
+ UChar expected1[] = { 0x0031, 0x4e8c, 0xfffd, 0x0061};
+ int32_t offsets1[] = { 0x0000, 0x0001, 0x0004, 0x0006};
+
+ if(!testConvertToUnicode(sampleText1, sizeof(sampleText1),
+ expected1, sizeof(expected1)/sizeof(expected1[0]),"utf8",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1, NULL, 0 ))
+ log_err("utf8->u with substitute did not match.\n");;
+ }
+ log_verbose("Testing toUnicode for SCSU with UCNV_TO_U_CALLBACK_SUBSTITUTE \n");
+ {
+ const uint8_t sampleText1[] = { 0xba, 0x8c,0xF8, 0x61,0x0c, 0x0c,};
+ UChar expected1[] = { 0x00ba, 0x008c, 0x00f8, 0x0061,0xfffd,0xfffd};
+ int32_t offsets1[] = { 0x0000, 0x0001,0x0002,0x0003,4,5};
+
+ if(!testConvertToUnicode(sampleText1, sizeof(sampleText1),
+ expected1, sizeof(expected1)/sizeof(expected1[0]),"SCSU",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1, NULL, 0 ))
+ log_err("scsu->u with stop did not match.\n");;
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ log_verbose("Testing ibm-930 subchar/subchar1\n");
+ {
+ static const UChar u1[]={ 0x6d63, 0x6d64, 0x6d65, 0x6d66, 0xdf };
+ static const uint8_t s1[]={ 0x0e, 0x5d, 0x5f, 0x5d, 0x63, 0xfe, 0xfe, 0x46, 0x6b, 0x0f, 0x3f };
+ static const int32_t offsets1[]={ 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4 };
+
+ static const UChar u2[]={ 0x6d63, 0x6d64, 0xfffd, 0x6d66, 0x1a };
+ static const uint8_t s2[]={ 0x0e, 0x5d, 0x5f, 0x5d, 0x63, 0xfc, 0xfc, 0x46, 0x6b, 0x0f, 0x57 };
+ static const int32_t offsets2[]={ 1, 3, 5, 7, 10 };
+
+ if(!testConvertFromUnicode(u1, ARRAY_LENGTH(u1), s1, ARRAY_LENGTH(s1), "ibm-930",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, offsets1, NULL, 0)
+ ) {
+ log_err("u->ibm-930 subchar/subchar1 did not match.\n");
+ }
+
+ if(!testConvertToUnicode(s2, ARRAY_LENGTH(s2), u2, ARRAY_LENGTH(u2), "ibm-930",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets2, NULL, 0)
+ ) {
+ log_err("ibm-930->u subchar/subchar1 did not match.\n");
+ }
+ }
+
+ log_verbose("Testing GB 18030 with substitute callbacks\n");
+ {
+ static const UChar u2[]={
+ 0x24, 0x7f, 0x80, 0x1f9, 0x20ac, 0x4e00, 0x9fa6, 0xffff, 0xd800, 0xdc00, 0xfffd, 0xdbff, 0xdfff };
+ static const uint8_t gb2[]={
+ 0x24, 0x7f, 0x81, 0x30, 0x81, 0x30, 0xa8, 0xbf, 0xa2, 0xe3, 0xd2, 0xbb, 0x82, 0x35, 0x8f, 0x33, 0x84, 0x31, 0xa4, 0x39, 0x90, 0x30, 0x81, 0x30, 0xe3, 0x32, 0x9a, 0x36, 0xe3, 0x32, 0x9a, 0x35 };
+ static const int32_t offsets2[]={
+ 0, 1, 2, 6, 8, 10, 12, 16, 20, 20, 24, 28, 28 };
+
+ if(!testConvertToUnicode(gb2, ARRAY_LENGTH(gb2), u2, ARRAY_LENGTH(u2), "gb18030",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets2, NULL, 0)
+ ) {
+ log_err("gb18030->u with substitute did not match.\n");
+ }
+ }
+#endif
+
+ log_verbose("Testing UTF-7 toUnicode with substitute callbacks\n");
+ {
+ static const uint8_t utf7[]={
+ /* a~ a+AB~ a+AB\x0c a+AB- a+AB. a+. */
+ 0x61, 0x7e, 0x61, 0x2b, 0x41, 0x42, 0x7e, 0x61, 0x2b, 0x41, 0x42, 0x0c, 0x61, 0x2b, 0x41, 0x42, 0x2d, 0x61, 0x2b, 0x41, 0x42, 0x2e, 0x61, 0x2b, 0x2e
+ };
+ static const UChar unicode[]={
+ 0x61, 0xfffd, 0x61, 0xfffd, 0x61, 0xfffd, 0x61, 0xfffd, 0x61, 0xfffd, 0x61, 0xfffd
+ };
+ static const int32_t offsets[]={
+ 0, 1, 2, 4, 7, 9, 12, 14, 17, 19, 22, 23
+ };
+
+ if(!testConvertToUnicode(utf7, ARRAY_LENGTH(utf7), unicode, ARRAY_LENGTH(unicode), "UTF-7",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets, NULL, 0)
+ ) {
+ log_err("UTF-7->u with substitute did not match.\n");
+ }
+ }
+
+ log_verbose("Testing UTF-16 toUnicode with substitute callbacks\n");
+ {
+ static const uint8_t
+ in1[]={ 0xfe, 0xff, 0x4e, 0x00, 0xfe, 0xff },
+ in2[]={ 0xff, 0xfe, 0x4e, 0x00, 0xfe, 0xff },
+ in3[]={ 0xfe, 0xfd, 0x4e, 0x00, 0xfe, 0xff };
+
+ static const UChar
+ out1[]={ 0x4e00, 0xfeff },
+ out2[]={ 0x004e, 0xfffe },
+ out3[]={ 0xfefd, 0x4e00, 0xfeff };
+
+ static const int32_t
+ offsets1[]={ 2, 4 },
+ offsets2[]={ 2, 4 },
+ offsets3[]={ 0, 2, 4 };
+
+ if(!testConvertToUnicode(in1, ARRAY_LENGTH(in1), out1, ARRAY_LENGTH(out1), "UTF-16",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1, NULL, 0)
+ ) {
+ log_err("UTF-16 (BE BOM)->u with substitute did not match.\n");
+ }
+
+ if(!testConvertToUnicode(in2, ARRAY_LENGTH(in2), out2, ARRAY_LENGTH(out2), "UTF-16",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets2, NULL, 0)
+ ) {
+ log_err("UTF-16 (LE BOM)->u with substitute did not match.\n");
+ }
+
+ if(!testConvertToUnicode(in3, ARRAY_LENGTH(in3), out3, ARRAY_LENGTH(out3), "UTF-16",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets3, NULL, 0)
+ ) {
+ log_err("UTF-16 (no BOM)->u with substitute did not match.\n");
+ }
+ }
+
+ log_verbose("Testing UTF-32 toUnicode with substitute callbacks\n");
+ {
+ static const uint8_t
+ in1[]={ 0x00, 0x00, 0xfe, 0xff, 0x00, 0x10, 0x0f, 0x00, 0x00, 0x00, 0xfe, 0xff },
+ in2[]={ 0xff, 0xfe, 0x00, 0x00, 0x00, 0x10, 0x0f, 0x00, 0xfe, 0xff, 0x00, 0x00 },
+ in3[]={ 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x10, 0x0f, 0x00, 0x00, 0x00, 0xd8, 0x40, 0x00, 0x00, 0xdc, 0x01 },
+ in4[]={ 0x00, 0x01, 0x02, 0x03, 0x00, 0x11, 0x12, 0x00, 0x00, 0x00, 0x4e, 0x00 };
+
+ static const UChar
+ out1[]={ UTF16_LEAD(0x100f00), UTF16_TRAIL(0x100f00), 0xfeff },
+ out2[]={ UTF16_LEAD(0x0f1000), UTF16_TRAIL(0x0f1000), 0xfffe },
+ out3[]={ 0xfefe, UTF16_LEAD(0x100f00), UTF16_TRAIL(0x100f00), 0xfffd, 0xfffd },
+ out4[]={ UTF16_LEAD(0x10203), UTF16_TRAIL(0x10203), 0xfffd, 0x4e00 };
+
+ static const int32_t
+ offsets1[]={ 4, 4, 8 },
+ offsets2[]={ 4, 4, 8 },
+ offsets3[]={ 0, 4, 4, 8, 12 },
+ offsets4[]={ 0, 0, 4, 8 };
+
+ if(!testConvertToUnicode(in1, ARRAY_LENGTH(in1), out1, ARRAY_LENGTH(out1), "UTF-32",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1, NULL, 0)
+ ) {
+ log_err("UTF-32 (BE BOM)->u with substitute did not match.\n");
+ }
+
+ if(!testConvertToUnicode(in2, ARRAY_LENGTH(in2), out2, ARRAY_LENGTH(out2), "UTF-32",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets2, NULL, 0)
+ ) {
+ log_err("UTF-32 (LE BOM)->u with substitute did not match.\n");
+ }
+
+ if(!testConvertToUnicode(in3, ARRAY_LENGTH(in3), out3, ARRAY_LENGTH(out3), "UTF-32",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets3, NULL, 0)
+ ) {
+ log_err("UTF-32 (no BOM)->u with substitute did not match.\n");
+ }
+
+ if(!testConvertToUnicode(in4, ARRAY_LENGTH(in4), out4, ARRAY_LENGTH(out4), "UTF-32",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets4, NULL, 0)
+ ) {
+ log_err("UTF-32 (no BOM, with error)->u with substitute did not match.\n");
+ }
+ }
+}
+
+static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
+{
+ UChar sampleText[] = { 0x0000, 0xAC00, 0xAC01, 0xEF67, 0xD700 };
+ UChar sampleText2[] = { 0x6D63, 0x6D64, 0x6D65, 0x6D66 };
+
+ const uint8_t expsubwvalIBM_949[]= {
+ 0x00, 0xb0, 0xa1, 0xb0, 0xa2,
+ 0x25, 0x55, 0x45, 0x46, 0x36, 0x37, 0xc8, 0xd3 };
+
+ const uint8_t expsubwvalIBM_943[]= {
+ 0x9f, 0xaf, 0x9f, 0xb1,
+ 0x25, 0x55, 0x36, 0x44, 0x36, 0x35, 0x89, 0x59 };
+
+ const uint8_t expsubwvalIBM_930[] = {
+ 0x0e, 0x5d, 0x5f, 0x5d, 0x63, 0x0f, 0x6c, 0xe4, 0xf6, 0xc4, 0xf6, 0xf5, 0x0e, 0x46, 0x6b, 0x0f };
+
+ int32_t toIBM949Offs [] ={ 0, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4 };
+ int32_t toIBM943Offs [] = { 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3 };
+ int32_t toIBM930Offs [] = { 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 }; /* last item: 3,3,3,3 because there's SO+DBCS+SI */
+
+ gInBufferSize = inputsize;
+ gOutBufferSize = outputsize;
+
+ /*from Unicode*/
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ if(!testConvertFromUnicode(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expsubwvalIBM_949, sizeof(expsubwvalIBM_949), "ibm-949",
+ UCNV_FROM_U_CALLBACK_ESCAPE, toIBM949Offs, NULL, 0 ))
+ log_err("u-> ibm-949 with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expsubwvalIBM_943, sizeof(expsubwvalIBM_943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_ESCAPE, toIBM943Offs, NULL, 0 ))
+ log_err("u-> ibm-943 with sub with value did not match.\n");
+
+ if(!testConvertFromUnicode(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expsubwvalIBM_930, sizeof(expsubwvalIBM_930), "ibm-930",
+ UCNV_FROM_U_CALLBACK_ESCAPE, toIBM930Offs, NULL, 0 ))
+ log_err("u-> ibm-930 with subst with value did not match.\n");
+
+
+ log_verbose("Testing fromUnicode with UCNV_FROM_U_CALLBACK_ESCAPE \n");
+ {
+ static const UChar inputTest[] = { 0x0061, 0xd801, 0xdc01, 0xd801, 0x0061 };
+ static const uint8_t toIBM943[]= { 0x61,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x43, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x61 };
+ static const int32_t offset[]= {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 4};
+
+
+ /* EUC_JP*/
+ static const UChar euc_jp_inputText[]={ 0x0061, 0x4edd, 0x5bec, 0xd801, 0xdc01, 0xd801, 0x0061, 0x00a2, };
+ static const uint8_t to_euc_jp[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x43, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x61, 0x8e, 0xe0,
+ };
+ static const int32_t fromEUC_JPOffs [] ={ 0, 1, 1, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3,
+ 5, 5, 5, 5, 5, 5,
+ 6, 7, 7,
+ };
+
+ /*EUC_TW*/
+ static const UChar euc_tw_inputText[]={ 0x0061, 0x2295, 0x5BF2, 0xd801, 0xdc01, 0xd801, 0x0061, 0x8706, 0x8a, };
+ static const uint8_t to_euc_tw[]={
+ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x43, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x61, 0xe6, 0xca, 0x8a,
+ };
+ static const int32_t from_euc_twOffs [] ={ 0, 1, 1, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5,
+ 6, 7, 7, 8,
+ };
+ /*ISO-2022-JP*/
+ static const UChar iso_2022_jp_inputText1[]={ 0x3000, 0x00E9, 0x3001,0x00E9, 0x0042} ;
+ static const uint8_t to_iso_2022_jp1[]={
+ 0x1b, 0x24, 0x42, 0x21, 0x21,
+ 0x1b, 0x28, 0x42, 0x25, 0x55, 0x30, 0x30, 0x45, 0x39,
+ 0x1b, 0x24, 0x42, 0x21, 0x22,
+ 0x1b, 0x28, 0x42, 0x25, 0x55, 0x30, 0x30, 0x45, 0x39,
+ 0x42,
+ };
+
+ static const int32_t from_iso_2022_jpOffs1 [] ={
+ 0,0,0,0,0,
+ 1,1,1,1,1,1,1,1,1,
+ 2,2,2,2,2,
+ 3,3,3,3,3,3,3,3,3,
+ 4,
+ };
+ /* surrogate pair*/
+ static const UChar iso_2022_jp_inputText2[]={ 0x3000, 0xD84D, 0xDC56, 0x3001,0xD84D,0xDC56, 0x0042} ;
+ static const uint8_t to_iso_2022_jp2[]={
+ 0x1b, 0x24, 0x42, 0x21, 0x21,
+ 0x1b, 0x28, 0x42, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x1b, 0x24, 0x42, 0x21, 0x22,
+ 0x1b, 0x28, 0x42, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x42,
+ };
+ static const int32_t from_iso_2022_jpOffs2 [] ={
+ 0,0,0,0,0,
+ 1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,
+ 3,3,3,3,3,
+ 4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,
+ 6,
+ };
+
+ /*ISO-2022-cn*/
+ static const UChar iso_2022_cn_inputText[]={ 0x0041, 0x3712, 0x0042, };
+ static const uint8_t to_iso_2022_cn[]={
+ 0x41,
+ 0x25, 0x55, 0x33, 0x37, 0x31, 0x32,
+ 0x42,
+ };
+ static const int32_t from_iso_2022_cnOffs [] ={
+ 0,
+ 1,1,1,1,1,1,
+ 2,
+ };
+
+ static const UChar iso_2022_cn_inputText4[]={ 0x3000, 0xD84D, 0xDC56, 0x3001,0xD84D,0xDC56, 0x0042};
+
+ static const uint8_t to_iso_2022_cn4[]={
+ 0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x21,
+ 0x0f, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x0e, 0x21, 0x22,
+ 0x0f, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x42,
+ };
+ static const int32_t from_iso_2022_cnOffs4 [] ={
+ 0,0,0,0,0,0,0,
+ 1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,
+ 3,3,3,
+ 4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,
+ 6
+
+ };
+
+ /*ISO-2022-kr*/
+ static const UChar iso_2022_kr_inputText2[]={ 0x0041, 0x03A0,0xD84D, 0xDC56/*unassigned*/,0x03A0, 0x0042,0xD84D, 0xDC56/*unassigned*/,0x43 };
+ static const uint8_t to_iso_2022_kr2[]={
+ 0x1b, 0x24, 0x29, 0x43,
+ 0x41,
+ 0x0e, 0x25, 0x50,
+ 0x0f, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x0e, 0x25, 0x50,
+ 0x0f, 0x42,
+ 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x43
+ };
+ static const int32_t from_iso_2022_krOffs2 [] ={
+ -1,-1,-1,-1,
+ 0,
+ 1,1,1,
+ 2,2,2,2,2,2,2,
+ 2,2,2,2,2,2,
+ 4,4,4,
+ 5,5,
+ 6,6,6,6,6,6,
+ 6,6,6,6,6,6,
+ 8,
+ };
+
+ static const UChar iso_2022_kr_inputText[]={ 0x0041, 0x03A0,0x3712/*unassigned*/,0x03A0, 0x0042,0x3712/*unassigned*/,0x43 };
+ static const uint8_t to_iso_2022_kr[]={
+ 0x1b, 0x24, 0x29, 0x43,
+ 0x41,
+ 0x0e, 0x25, 0x50,
+ 0x0f, 0x25, 0x55, 0x33, 0x37, 0x31, 0x32, /*unassigned*/
+ 0x0e, 0x25, 0x50,
+ 0x0f, 0x42,
+ 0x25, 0x55, 0x33, 0x37, 0x31, 0x32, /*unassigned*/
+ 0x43
+ };
+
+
+ static const int32_t from_iso_2022_krOffs [] ={
+ -1,-1,-1,-1,
+ 0,
+ 1,1,1,
+ 2,2,2,2,2,2,2,
+ 3,3,3,
+ 4,4,
+ 5,5,5,5,5,5,
+ 6,
+ };
+ /* HZ encoding */
+ static const UChar hz_inputText[]={ 0x0041, 0x03A0,0x0662/*unassigned*/,0x03A0, 0x0042, };
+
+ static const uint8_t to_hz[]={
+ 0x7e, 0x7d, 0x41,
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x7e, 0x7d, 0x25, 0x55, 0x30, 0x36, 0x36, 0x32, /*unassigned*/
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x7e, 0x7d, 0x42,
+
+ };
+ static const int32_t from_hzOffs [] ={
+ 0,0,0,
+ 1,1,1,1,
+ 2,2,2,2,2,2,2,2,
+ 3,3,3,3,
+ 4,4,4
+ };
+
+ static const UChar hz_inputText2[]={ 0x0041, 0x03A0,0xD84D, 0xDC56/*unassigned*/,0x03A0, 0x0042,0xD84D, 0xDC56/*unassigned*/,0x43 };
+ static const uint8_t to_hz2[]={
+ 0x7e, 0x7d, 0x41,
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x7e, 0x7d, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x7e, 0x7d, 0x42,
+ 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
+ 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x43
+ };
+ static const int32_t from_hzOffs2 [] ={
+ 0,0,0,
+ 1,1,1,1,
+ 2,2,2,2,2,2,2,2,
+ 2,2,2,2,2,2,
+ 4,4,4,4,
+ 5,5,5,
+ 6,6,6,6,6,6,
+ 6,6,6,6,6,6,
+ 8,
+ };
+
+ /*ISCII*/
+ static const UChar iscii_inputText[]={ 0x0041, 0x0901,0x3712/*unassigned*/,0x0902, 0x0042,0x3712/*unassigned*/,0x43 };
+ static const uint8_t to_iscii[]={
+ 0x41,
+ 0xef, 0x42, 0xa1,
+ 0x25, 0x55, 0x33, 0x37, 0x31, 0x32, /*unassigned*/
+ 0xa2,
+ 0x42,
+ 0x25, 0x55, 0x33, 0x37, 0x31, 0x32, /*unassigned*/
+ 0x43
+ };
+
+
+ static const int32_t from_isciiOffs [] ={
+ 0,
+ 1,1,1,
+ 2,2,2,2,2,2,
+ 3,
+ 4,
+ 5,5,5,5,5,5,
+ 6,
+ };
+
+ if(!testConvertFromUnicode(inputTest, sizeof(inputTest)/sizeof(inputTest[0]),
+ toIBM943, sizeof(toIBM943), "ibm-943",
+ UCNV_FROM_U_CALLBACK_ESCAPE, offset, NULL, 0 ))
+ log_err("u-> ibm-943 with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(euc_jp_inputText, sizeof(euc_jp_inputText)/sizeof(euc_jp_inputText[0]),
+ to_euc_jp, sizeof(to_euc_jp), "euc-jp",
+ UCNV_FROM_U_CALLBACK_ESCAPE, fromEUC_JPOffs, NULL, 0 ))
+ log_err("u-> euc-jp with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(euc_tw_inputText, sizeof(euc_tw_inputText)/sizeof(euc_tw_inputText[0]),
+ to_euc_tw, sizeof(to_euc_tw), "euc-tw",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_euc_twOffs, NULL, 0 ))
+ log_err("u-> euc-tw with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_jp_inputText1, sizeof(iso_2022_jp_inputText1)/sizeof(iso_2022_jp_inputText1[0]),
+ to_iso_2022_jp1, sizeof(to_iso_2022_jp1), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_jpOffs1, NULL, 0 ))
+ log_err("u-> iso_2022_jp with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_jp_inputText1, sizeof(iso_2022_jp_inputText1)/sizeof(iso_2022_jp_inputText1[0]),
+ to_iso_2022_jp1, sizeof(to_iso_2022_jp1), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_jpOffs1, NULL, 0 ))
+ log_err("u-> iso_2022_jp with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_jp_inputText2, sizeof(iso_2022_jp_inputText2)/sizeof(iso_2022_jp_inputText2[0]),
+ to_iso_2022_jp2, sizeof(to_iso_2022_jp2), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_jpOffs2, NULL, 0 ))
+ log_err("u-> iso_2022_jp with subst with value did not match.\n");
+ /*ESCAPE OPTIONS*/
+ {
+ /* surrogate pair*/
+ static const UChar iso_2022_jp_inputText3[]={ 0x3000, 0xD84D, 0xDC56, 0x3001,0xD84D,0xDC56, 0x0042,0x0901c } ;
+ static const uint8_t to_iso_2022_jp3_v2[]={
+ 0x1b, 0x24, 0x42, 0x21, 0x21,
+ 0x1b, 0x28, 0x42, 0x26, 0x23, 0x31, 0x34, 0x34, 0x34, 0x37, 0x30, 0x3b,
+
+ 0x1b, 0x24, 0x42, 0x21, 0x22,
+ 0x1b, 0x28, 0x42, 0x26, 0x23, 0x31, 0x34, 0x34, 0x34, 0x37, 0x30, 0x3b,
+
+ 0x42,
+ 0x26, 0x23, 0x33, 0x36, 0x38, 0x39, 0x32, 0x3b,
+ };
+
+ static const int32_t from_iso_2022_jpOffs3_v2 [] ={
+ 0,0,0,0,0,
+ 1,1,1,1,1,1,1,1,1,1,1,1,
+
+ 3,3,3,3,3,
+ 4,4,4,4,4,4,4,4,4,4,4,4,
+
+ 6,
+ 7,7,7,7,7,7,7,7,7
+ };
+
+ if(!testConvertFromUnicodeWithContext(iso_2022_jp_inputText3, sizeof(iso_2022_jp_inputText3)/sizeof(iso_2022_jp_inputText3[0]),
+ to_iso_2022_jp3_v2, sizeof(to_iso_2022_jp3_v2), "iso-2022-jp",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_jpOffs3_v2, NULL, 0,UCNV_ESCAPE_XML_DEC,U_ZERO_ERROR ))
+ log_err("u-> iso-2022-jp with sub & UCNV_ESCAPE_XML_DEC did not match.\n");
+ }
+ {
+ static const UChar iso_2022_cn_inputText5[]={ 0x3000, 0xD84D, 0xDC56, 0x3001,0xD84D,0xDC56, 0x0042,0x0902};
+ static const uint8_t to_iso_2022_cn5_v2[]={
+ 0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x21,
+ 0x0f, 0x5c, 0x75, 0x44, 0x38, 0x34, 0x44,
+ 0x5c, 0x75, 0x44, 0x43, 0x35, 0x36,
+ 0x0e, 0x21, 0x22,
+ 0x0f, 0x5c, 0x75, 0x44, 0x38, 0x34, 0x44,
+ 0x5c, 0x75, 0x44, 0x43, 0x35, 0x36,
+ 0x42,
+ 0x5c, 0x75, 0x30, 0x39, 0x30, 0x32,
+ };
+ static const int32_t from_iso_2022_cnOffs5_v2 [] ={
+ 0,0,0,0,0,0,0,
+ 1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,
+ 3,3,3,
+ 4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,
+ 6,
+ 7,7,7,7,7,7
+ };
+ if(!testConvertFromUnicodeWithContext(iso_2022_cn_inputText5, sizeof(iso_2022_cn_inputText5)/sizeof(iso_2022_cn_inputText5[0]),
+ to_iso_2022_cn5_v2, sizeof(to_iso_2022_cn5_v2), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_cnOffs5_v2, NULL, 0,UCNV_ESCAPE_JAVA,U_ZERO_ERROR ))
+ log_err("u-> iso-2022-cn with sub & UCNV_ESCAPE_JAVA did not match.\n");
+
+ }
+ {
+ static const UChar iso_2022_cn_inputText6[]={ 0x3000, 0xD84D, 0xDC56, 0x3001,0xD84D,0xDC56, 0x0042,0x0902};
+ static const uint8_t to_iso_2022_cn6_v2[]={
+ 0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x21,
+ 0x0f, 0x7b, 0x55, 0x2b, 0x32, 0x33, 0x34, 0x35, 0x36, 0x7d,
+ 0x0e, 0x21, 0x22,
+ 0x0f, 0x7b, 0x55, 0x2b, 0x32, 0x33, 0x34, 0x35, 0x36, 0x7d,
+ 0x42,
+ 0x7b, 0x55, 0x2b, 0x30, 0x39, 0x30, 0x32, 0x7d
+ };
+ static const int32_t from_iso_2022_cnOffs6_v2 [] ={
+ 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 3, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 6,
+ 7, 7, 7, 7, 7, 7, 7, 7,
+ };
+ if(!testConvertFromUnicodeWithContext(iso_2022_cn_inputText6, sizeof(iso_2022_cn_inputText6)/sizeof(iso_2022_cn_inputText6[0]),
+ to_iso_2022_cn6_v2, sizeof(to_iso_2022_cn6_v2), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_cnOffs6_v2, NULL, 0,UCNV_ESCAPE_UNICODE,U_ZERO_ERROR ))
+ log_err("u-> iso-2022-cn with sub & UCNV_ESCAPE_UNICODE did not match.\n");
+
+ }
+ {
+ static const UChar iso_2022_cn_inputText7[]={ 0x3000, 0xD84D, 0xDC56, 0x3001,0xD84D,0xDC56, 0x0042,0x0902};
+ static const uint8_t to_iso_2022_cn7_v2[]={
+ 0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x21,
+ 0x0f, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44, 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x0e, 0x21, 0x22,
+ 0x0f, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44, 0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
+ 0x42, 0x25, 0x55, 0x30, 0x39, 0x30, 0x32,
+ };
+ static const int32_t from_iso_2022_cnOffs7_v2 [] ={
+ 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 3, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 6,
+ 7, 7, 7, 7, 7, 7,
+ };
+ if(!testConvertFromUnicodeWithContext(iso_2022_cn_inputText7, sizeof(iso_2022_cn_inputText7)/sizeof(iso_2022_cn_inputText7[0]),
+ to_iso_2022_cn7_v2, sizeof(to_iso_2022_cn7_v2), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_cnOffs7_v2, NULL, 0,"K" ,U_ZERO_ERROR ))
+ log_err("u-> iso-2022-cn with sub & K did not match.\n");
+
+ }
+ {
+ static const uint8_t to_iso_2022_cn4_v3[]={
+ 0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x21,
+ 0x0f, 0x5c, 0x55, 0x30, 0x30, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36,
+ 0x0e, 0x21, 0x22,
+ 0x0f, 0x5c, 0x55, 0x30, 0x30, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36,
+ 0x42
+ };
+
+
+ static const int32_t from_iso_2022_cnOffs4_v3 [] ={
+ 0,0,0,0,0,0,0,
+ 1,1,1,1,1,1,1,1,1,1,1,
+
+ 3,3,3,
+ 4,4,4,4,4,4,4,4,4,4,4,
+
+ 6
+
+ };
+ if(!testConvertFromUnicodeWithContext(iso_2022_cn_inputText4, sizeof(iso_2022_cn_inputText4)/sizeof(iso_2022_cn_inputText4[0]),
+ to_iso_2022_cn4_v3, sizeof(to_iso_2022_cn4_v3), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_cnOffs4_v3, NULL, 0,UCNV_ESCAPE_C,U_ZERO_ERROR ))
+ {
+ log_err("u-> iso-2022-cn with skip & UCNV_ESCAPE_C did not match.\n");
+ }
+ }
+ if(!testConvertFromUnicode(iso_2022_cn_inputText, sizeof(iso_2022_cn_inputText)/sizeof(iso_2022_cn_inputText[0]),
+ to_iso_2022_cn, sizeof(to_iso_2022_cn), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_cnOffs, NULL, 0 ))
+ log_err("u-> iso_2022_cn with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(iso_2022_cn_inputText4, sizeof(iso_2022_cn_inputText4)/sizeof(iso_2022_cn_inputText4[0]),
+ to_iso_2022_cn4, sizeof(to_iso_2022_cn4), "iso-2022-cn",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_cnOffs4, NULL, 0 ))
+ log_err("u-> iso_2022_cn with subst with value did not match.\n");
+ if(!testConvertFromUnicode(iso_2022_kr_inputText, sizeof(iso_2022_kr_inputText)/sizeof(iso_2022_kr_inputText[0]),
+ to_iso_2022_kr, sizeof(to_iso_2022_kr), "iso-2022-kr",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_krOffs, NULL, 0 ))
+ log_err("u-> iso_2022_kr with subst with value did not match.\n");
+ if(!testConvertFromUnicode(iso_2022_kr_inputText2, sizeof(iso_2022_kr_inputText2)/sizeof(iso_2022_kr_inputText2[0]),
+ to_iso_2022_kr2, sizeof(to_iso_2022_kr2), "iso-2022-kr",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_krOffs2, NULL, 0 ))
+ log_err("u-> iso_2022_kr2 with subst with value did not match.\n");
+ if(!testConvertFromUnicode(hz_inputText, sizeof(hz_inputText)/sizeof(hz_inputText[0]),
+ to_hz, sizeof(to_hz), "HZ",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_hzOffs, NULL, 0 ))
+ log_err("u-> hz with subst with value did not match.\n");
+ if(!testConvertFromUnicode(hz_inputText2, sizeof(hz_inputText2)/sizeof(hz_inputText2[0]),
+ to_hz2, sizeof(to_hz2), "HZ",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_hzOffs2, NULL, 0 ))
+ log_err("u-> hz with subst with value did not match.\n");
+
+ if(!testConvertFromUnicode(iscii_inputText, sizeof(iscii_inputText)/sizeof(iscii_inputText[0]),
+ to_iscii, sizeof(to_iscii), "ISCII,version=0",
+ UCNV_FROM_U_CALLBACK_ESCAPE, from_isciiOffs, NULL, 0 ))
+ log_err("u-> iscii with subst with value did not match.\n");
+ }
+#endif
+
+ log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_ESCAPE \n");
+ /*to Unicode*/
+ {
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ static const uint8_t sampleTxtToU[]= { 0x00, 0x9f, 0xaf,
+ 0x81, 0xad, /*unassigned*/
+ 0x89, 0xd3 };
+ static const UChar IBM_943toUnicode[] = { 0x0000, 0x6D63,
+ 0x25, 0x58, 0x38, 0x31, 0x25, 0x58, 0x41, 0x44,
+ 0x7B87};
+ static const int32_t fromIBM943Offs [] = { 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5};
+
+ /* EUC_JP*/
+ static const uint8_t sampleTxt_EUC_JP[]={ 0x61, 0xa1, 0xb8, 0x8f, 0xf4, 0xae,
+ 0x8f, 0xda, 0xa1, /*unassigned*/
+ 0x8e, 0xe0,
+ };
+ static const UChar EUC_JPtoUnicode[]={ 0x0061, 0x4edd, 0x5bec,
+ 0x25, 0x58, 0x38, 0x46, 0x25, 0x58, 0x44, 0x41, 0x25, 0x58, 0x41, 0x31,
+ 0x00a2 };
+ static const int32_t fromEUC_JPOffs [] ={ 0, 1, 3,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 9,
+ };
+
+ /*EUC_TW*/
+ static const uint8_t sampleTxt_euc_tw[]={
+ 0x61, 0xa2, 0xd3, 0x8e, 0xa2, 0xdc, 0xe5,
+ 0x8e, 0xaa, 0xbb, 0xcc,/*unassigned*/
+ 0xe6, 0xca, 0x8a,
+ };
+ static const UChar euc_twtoUnicode[]={ 0x0061, 0x2295, 0x5BF2,
+ 0x25, 0x58, 0x38, 0x45, 0x25, 0x58, 0x41, 0x41, 0x25, 0x58, 0x42, 0x42, 0x25, 0x58, 0x43, 0x43,
+ 0x8706, 0x8a, };
+ static const int32_t from_euc_twOffs [] ={ 0, 1, 3,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 11, 13};
+
+ /*iso-2022-jp*/
+ static const uint8_t sampleTxt_iso_2022_jp[]={
+ 0x1b, 0x28, 0x42, 0x41,
+ 0x1b, 0x24, 0x42, 0x2A, 0x44, /*unassigned*/
+ 0x1b, 0x28, 0x42, 0x42,
+
+ };
+ static const UChar iso_2022_jptoUnicode[]={ 0x41,0x25,0x58,0x32,0x41,0x25,0x58,0x34,0x34, 0x42 };
+ static const int32_t from_iso_2022_jpOffs [] ={ 3, 7, 7, 7, 7, 7, 7, 7, 7, 12 };
+
+ /*iso-2022-cn*/
+ static const uint8_t sampleTxt_iso_2022_cn[]={
+ 0x0f, 0x41, 0x44,
+ 0x1B, 0x24, 0x29, 0x47,
+ 0x0E, 0x40, 0x6c, /*unassigned*/
+ 0x0f, 0x42,
+
+ };
+ static const UChar iso_2022_cntoUnicode[]={ 0x41, 0x44,0x25,0x58,0x34,0x30,0x25,0x58,0x36,0x43,0x42 };
+ static const int32_t from_iso_2022_cnOffs [] ={ 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 11 };
+
+ /*iso-2022-kr*/
+ static const uint8_t sampleTxt_iso_2022_kr[]={
+ 0x1b, 0x24, 0x29, 0x43,
+ 0x41,
+ 0x0E, 0x7f, 0x1E,
+ 0x0e, 0x25, 0x50,
+ 0x0f, 0x51,
+ 0x42, 0x43,
+
+ };
+ static const UChar iso_2022_krtoUnicode[]={ 0x41,0x25,0x58,0x37,0x46,0x25,0x58,0x31,0x45,0x03A0,0x51, 0x42,0x43};
+ static const int32_t from_iso_2022_krOffs [] ={ 4, 6, 6, 6, 6, 6, 6, 6, 6, 9, 12, 13 , 14 };
+
+ /*hz*/
+ static const uint8_t sampleTxt_hz[]={
+ 0x41,
+ 0x7e, 0x7b, 0x26, 0x30,
+ 0x7f, 0x1E, /*unassigned*/
+ 0x26, 0x30,
+ 0x7e, 0x7d, 0x42,
+ 0x7e, 0x7b, 0x7f, 0x1E,/*unassigned*/
+ 0x7e, 0x7d, 0x42,
+ };
+ static const UChar hztoUnicode[]={
+ 0x41,
+ 0x03a0,
+ 0x25,0x58,0x37,0x46,0x25,0x58,0x31,0x45,
+ 0x03A0,
+ 0x42,
+ 0x25,0x58,0x37,0x46,0x25,0x58,0x31,0x45,
+ 0x42,};
+
+ static const int32_t from_hzOffs [] ={0,3,5,5,5,5,5,5,5,5,7,11,14,14,14,14,14,14,14,14,18, };
+
+
+ /*iscii*/
+ static const uint8_t sampleTxt_iscii[]={
+ 0x41,
+ 0x30,
+ 0xEB, /*unassigned*/
+ 0xa3,
+ 0x42,
+ 0xEC, /*unassigned*/
+ 0x42,
+ };
+ static const UChar isciitoUnicode[]={
+ 0x41,
+ 0x30,
+ 0x25, 0x58, 0x45, 0x42,
+ 0x0903,
+ 0x42,
+ 0x25, 0x58, 0x45, 0x43,
+ 0x42,};
+
+ static const int32_t from_isciiOffs [] ={0,1,2,2,2,2,3,4,5,5,5,5,6 };
+#endif
+
+ /*UTF8*/
+ static const uint8_t sampleTxtUTF8[]={
+ 0x20, 0x64, 0x50,
+ 0xC2, 0x7E, /* truncated char */
+ 0x20,
+ 0xE0, 0xB5, 0x7E, /* truncated char */
+ 0x40,
+ };
+ static const UChar UTF8ToUnicode[]={
+ 0x0020, 0x0064, 0x0050,
+ 0x0025, 0x0058, 0x0043, 0x0032, 0x007E, /* \xC2~ */
+ 0x0020,
+ 0x0025, 0x0058, 0x0045, 0x0030, 0x0025, 0x0058, 0x0042, 0x0035, 0x007E,
+ 0x0040
+ };
+ static const int32_t fromUTF8[] = {
+ 0, 1, 2,
+ 3, 3, 3, 3, 4,
+ 5,
+ 6, 6, 6, 6, 6, 6, 6, 6, 8,
+ 9
+ };
+ static const UChar UTF8ToUnicodeXML_DEC[]={
+ 0x0020, 0x0064, 0x0050,
+ 0x0026, 0x0023, 0x0031, 0x0039, 0x0034, 0x003B, 0x007E, /* &#194;~ */
+ 0x0020,
+ 0x0026, 0x0023, 0x0032, 0x0032, 0x0034, 0x003B, 0x0026, 0x0023, 0x0031, 0x0038, 0x0031, 0x003B, 0x007E,
+ 0x0040
+ };
+ static const int32_t fromUTF8XML_DEC[] = {
+ 0, 1, 2,
+ 3, 3, 3, 3, 3, 3, 4,
+ 5,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8,
+ 9
+ };
+
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ if(!testConvertToUnicode(sampleTxtToU, sizeof(sampleTxtToU),
+ IBM_943toUnicode, sizeof(IBM_943toUnicode)/sizeof(IBM_943toUnicode[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_ESCAPE, fromIBM943Offs, NULL, 0 ))
+ log_err("ibm-943->u with substitute with value did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_EUC_JP, sizeof(sampleTxt_EUC_JP),
+ EUC_JPtoUnicode, sizeof(EUC_JPtoUnicode)/sizeof(EUC_JPtoUnicode[0]),"euc-jp",
+ UCNV_TO_U_CALLBACK_ESCAPE, fromEUC_JPOffs, NULL, 0))
+ log_err("euc-jp->u with substitute with value did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_euc_tw, sizeof(sampleTxt_euc_tw),
+ euc_twtoUnicode, sizeof(euc_twtoUnicode)/sizeof(euc_twtoUnicode[0]),"euc-tw",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_euc_twOffs, NULL, 0))
+ log_err("euc-tw->u with substitute with value did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp),
+ iso_2022_jptoUnicode, sizeof(iso_2022_jptoUnicode)/sizeof(iso_2022_jptoUnicode[0]),"iso-2022-jp",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_iso_2022_jpOffs, NULL, 0))
+ log_err("iso-2022-jp->u with substitute with value did not match.\n");
+
+ if(!testConvertToUnicodeWithContext(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp),
+ iso_2022_jptoUnicode, sizeof(iso_2022_jptoUnicode)/sizeof(iso_2022_jptoUnicode[0]),"iso-2022-jp",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_iso_2022_jpOffs, NULL, 0,"K",U_ZERO_ERROR))
+ log_err("iso-2022-jp->u with substitute with value did not match.\n");
+
+ {/* test UCNV_TO_U_CALLBACK_ESCAPE with options */
+ {
+ static const UChar iso_2022_jptoUnicodeDec[]={
+ 0x0041,
+ 0x0026, 0x0023, 0x0034, 0x0032, 0x003b,
+ 0x0026, 0x0023, 0x0036, 0x0038, 0x003b,
+ 0x0042 };
+ static const int32_t from_iso_2022_jpOffsDec [] ={ 3,7,7,7,7,7,7,7,7,7,7,12, };
+ if(!testConvertToUnicodeWithContext(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp),
+ iso_2022_jptoUnicodeDec, sizeof(iso_2022_jptoUnicodeDec)/sizeof(iso_2022_jptoUnicode[0]),"iso-2022-jp",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_iso_2022_jpOffsDec, NULL, 0,UCNV_ESCAPE_XML_DEC,U_ZERO_ERROR ))
+ log_err("iso-2022-jp->u with substitute with value and UCNV_ESCAPE_XML_DEC did not match.\n");
+ }
+ {
+ static const UChar iso_2022_jptoUnicodeHex[]={
+ 0x0041,
+ 0x0026, 0x0023, 0x0078, 0x0032, 0x0041, 0x003b,
+ 0x0026, 0x0023, 0x0078, 0x0034, 0x0034, 0x003b,
+ 0x0042 };
+ static const int32_t from_iso_2022_jpOffsHex [] ={ 3,7,7,7,7,7,7,7,7,7,7,7,7,12 };
+ if(!testConvertToUnicodeWithContext(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp),
+ iso_2022_jptoUnicodeHex, sizeof(iso_2022_jptoUnicodeHex)/sizeof(iso_2022_jptoUnicode[0]),"iso-2022-jp",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_iso_2022_jpOffsHex, NULL, 0,UCNV_ESCAPE_XML_HEX,U_ZERO_ERROR ))
+ log_err("iso-2022-jp->u with substitute with value and UCNV_ESCAPE_XML_HEX did not match.\n");
+ }
+ {
+ static const UChar iso_2022_jptoUnicodeC[]={
+ 0x0041,
+ 0x005C, 0x0078, 0x0032, 0x0041,
+ 0x005C, 0x0078, 0x0034, 0x0034,
+ 0x0042 };
+ int32_t from_iso_2022_jpOffsC [] ={ 3,7,7,7,7,7,7,7,7,12 };
+ if(!testConvertToUnicodeWithContext(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp),
+ iso_2022_jptoUnicodeC, sizeof(iso_2022_jptoUnicodeC)/sizeof(iso_2022_jptoUnicode[0]),"iso-2022-jp",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_iso_2022_jpOffsC, NULL, 0,UCNV_ESCAPE_C,U_ZERO_ERROR ))
+ log_err("iso-2022-jp->u with substitute with value and UCNV_ESCAPE_C did not match.\n");
+ }
+ }
+ if(!testConvertToUnicode(sampleTxt_iso_2022_cn, sizeof(sampleTxt_iso_2022_cn),
+ iso_2022_cntoUnicode, sizeof(iso_2022_cntoUnicode)/sizeof(iso_2022_cntoUnicode[0]),"iso-2022-cn",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_iso_2022_cnOffs, NULL, 0))
+ log_err("iso-2022-cn->u with substitute with value did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_iso_2022_kr, sizeof(sampleTxt_iso_2022_kr),
+ iso_2022_krtoUnicode, sizeof(iso_2022_krtoUnicode)/sizeof(iso_2022_krtoUnicode[0]),"iso-2022-kr",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_iso_2022_krOffs, NULL, 0))
+ log_err("iso-2022-kr->u with substitute with value did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_hz, sizeof(sampleTxt_hz),
+ hztoUnicode, sizeof(hztoUnicode)/sizeof(hztoUnicode[0]),"HZ",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_hzOffs, NULL, 0))
+ log_err("hz->u with substitute with value did not match.\n");
+
+ if(!testConvertToUnicode(sampleTxt_iscii, sizeof(sampleTxt_iscii),
+ isciitoUnicode, sizeof(isciitoUnicode)/sizeof(isciitoUnicode[0]),"ISCII,version=0",
+ UCNV_TO_U_CALLBACK_ESCAPE, from_isciiOffs, NULL, 0))
+ log_err("ISCII ->u with substitute with value did not match.\n");
+#endif
+
+ if(!testConvertToUnicode(sampleTxtUTF8, sizeof(sampleTxtUTF8),
+ UTF8ToUnicode, sizeof(UTF8ToUnicode)/sizeof(UTF8ToUnicode[0]),"UTF-8",
+ UCNV_TO_U_CALLBACK_ESCAPE, fromUTF8, NULL, 0))
+ log_err("UTF8->u with UCNV_TO_U_CALLBACK_ESCAPE with value did not match.\n");
+ if(!testConvertToUnicodeWithContext(sampleTxtUTF8, sizeof(sampleTxtUTF8),
+ UTF8ToUnicodeXML_DEC, sizeof(UTF8ToUnicodeXML_DEC)/sizeof(UTF8ToUnicodeXML_DEC[0]),"UTF-8",
+ UCNV_TO_U_CALLBACK_ESCAPE, fromUTF8XML_DEC, NULL, 0, UCNV_ESCAPE_XML_DEC, U_ZERO_ERROR))
+ log_err("UTF8->u with UCNV_TO_U_CALLBACK_ESCAPE with value did not match.\n");
+ }
+}
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestLegalAndOthers(int32_t inputsize, int32_t outputsize)
+{
+ static const UChar legalText[] = { 0x0000, 0xAC00, 0xAC01, 0xD700 };
+ static const uint8_t templegal949[] ={ 0x00, 0xb0, 0xa1, 0xb0, 0xa2, 0xc8, 0xd3 };
+ static const int32_t to949legal[] = {0, 1, 1, 2, 2, 3, 3};
+
+
+ static const uint8_t text943[] = {
+ 0x82, 0xa9, 0x82, 0x20, /*0xc8,*/ 0x61, 0x8a, 0xbf, 0x8e, 0x9a };
+ static const UChar toUnicode943sub[] = { 0x304b, 0xfffd, /*0xff88,*/ 0x0061, 0x6f22, 0x5b57};
+ static const UChar toUnicode943skip[]= { 0x304b, /*0xff88,*/ 0x0061, 0x6f22, 0x5b57};
+ static const UChar toUnicode943stop[]= { 0x304b};
+
+ static const int32_t fromIBM943Offssub[] = {0, 2, 4, 5, 7};
+ static const int32_t fromIBM943Offsskip[] = { 0, 4, 5, 7};
+ static const int32_t fromIBM943Offsstop[] = { 0};
+
+ gInBufferSize = inputsize;
+ gOutBufferSize = outputsize;
+ /*checking with a legal value*/
+ if(!testConvertFromUnicode(legalText, sizeof(legalText)/sizeof(legalText[0]),
+ templegal949, sizeof(templegal949), "ibm-949",
+ UCNV_FROM_U_CALLBACK_SKIP, to949legal, NULL, 0 ))
+ log_err("u-> ibm-949 with skip did not match.\n");
+
+ /*checking illegal value for ibm-943 with substitute*/
+ if(!testConvertToUnicode(text943, sizeof(text943),
+ toUnicode943sub, sizeof(toUnicode943sub)/sizeof(toUnicode943sub[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, fromIBM943Offssub, NULL, 0 ))
+ log_err("ibm-943->u with subst did not match.\n");
+ /*checking illegal value for ibm-943 with skip */
+ if(!testConvertToUnicode(text943, sizeof(text943),
+ toUnicode943skip, sizeof(toUnicode943skip)/sizeof(toUnicode943skip[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_SKIP, fromIBM943Offsskip, NULL, 0 ))
+ log_err("ibm-943->u with skip did not match.\n");
+
+ /*checking illegal value for ibm-943 with stop */
+ if(!testConvertToUnicode(text943, sizeof(text943),
+ toUnicode943stop, sizeof(toUnicode943stop)/sizeof(toUnicode943stop[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_STOP, fromIBM943Offsstop, NULL, 0 ))
+ log_err("ibm-943->u with stop did not match.\n");
+
+}
+
+static void TestSingleByte(int32_t inputsize, int32_t outputsize)
+{
+ static const uint8_t sampleText[] = {
+ 0x82, 0xa9, 0x61, 0x62, 0x63 , 0x82,
+ 0xff, /*0x82, 0xa9,*/ 0x32, 0x33};
+ static const UChar toUnicode943sub[] = {0x304b, 0x0061, 0x0062, 0x0063, 0xfffd,/*0x304b,*/ 0x0032, 0x0033};
+ static const int32_t fromIBM943Offssub[] = {0, 2, 3, 4, 5, 7, 8};
+ /*checking illegal value for ibm-943 with substitute*/
+ gInBufferSize = inputsize;
+ gOutBufferSize = outputsize;
+
+ if(!testConvertToUnicode(sampleText, sizeof(sampleText),
+ toUnicode943sub, sizeof(toUnicode943sub)/sizeof(toUnicode943sub[0]),"ibm-943",
+ UCNV_TO_U_CALLBACK_SUBSTITUTE, fromIBM943Offssub, NULL, 0 ))
+ log_err("ibm-943->u with subst did not match.\n");
+}
+
+static void TestEBCDIC_STATEFUL_Sub(int32_t inputsize, int32_t outputsize)
+{
+ /*EBCDIC_STATEFUL*/
+ static const UChar ebcdic_inputTest[] = { 0x0061, 0x6d64, 0x0061, 0x00A2, 0x6d65, 0x0061 };
+ static const uint8_t toIBM930[]= { 0x62, 0x0e, 0x5d, 0x63, 0x0f, 0x62, 0xb1, 0x0e, 0xfe, 0xfe, 0x0f, 0x62 };
+ static const int32_t offset_930[]= { 0, 1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5 };
+/* s SO doubl SI sng s SO fe fe SI s */
+
+ /*EBCDIC_STATEFUL with subChar=3f*/
+ static const uint8_t toIBM930_subvaried[]= { 0x62, 0x0e, 0x5d, 0x63, 0x0f, 0x62, 0xb1, 0x3f, 0x62 };
+ static const int32_t offset_930_subvaried[]= { 0, 1, 1, 1, 2, 2, 3, 4, 5 };
+ static const char mySubChar[]={ 0x3f};
+
+ gInBufferSize = inputsize;
+ gOutBufferSize = outputsize;
+
+ if(!testConvertFromUnicode(ebcdic_inputTest, sizeof(ebcdic_inputTest)/sizeof(ebcdic_inputTest[0]),
+ toIBM930, sizeof(toIBM930), "ibm-930",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, offset_930, NULL, 0 ))
+ log_err("u-> ibm-930(EBCDIC_STATEFUL) with subst did not match.\n");
+
+ if(!testConvertFromUnicode(ebcdic_inputTest, sizeof(ebcdic_inputTest)/sizeof(ebcdic_inputTest[0]),
+ toIBM930_subvaried, sizeof(toIBM930_subvaried), "ibm-930",
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE, offset_930_subvaried, mySubChar, 1 ))
+ log_err("u-> ibm-930(EBCDIC_STATEFUL) with subst(setSubChar=0x3f) did not match.\n");
+}
+#endif
+
+UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UConverterFromUCallback callback , const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len)
+{
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ char junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ const UChar *src;
+ char *end;
+ char *targ;
+ int32_t *offs;
+ int i;
+ int32_t realBufferSize;
+ char *realBufferEnd;
+ const UChar *realSourceEnd;
+ const UChar *sourceLimit;
+ UBool checkOffsets = TRUE;
+ UBool doFlush;
+ char junk[9999];
+ char offset_str[9999];
+ char *p;
+ UConverterFromUCallback oldAction = NULL;
+ const void* oldContext = NULL;
+
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = (char)0xF0;
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = 0xFF;
+ setNuConvTestName(codepage, "FROM");
+
+ log_verbose("\nTesting========= %s FROM \n inputbuffer= %d outputbuffer= %d\n", codepage, gInBufferSize,
+ gOutBufferSize);
+
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",codepage);
+ return TRUE;
+ }
+
+ log_verbose("Converter opened..\n");
+
+ /*----setting the callback routine----*/
+ ucnv_setFromUCallBack (conv, callback, NULL, &oldAction, &oldContext, &status);
+ if (U_FAILURE(status))
+ {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ /*------------------------*/
+ /*setting the subChar*/
+ if(mySubChar != NULL){
+ ucnv_setSubstChars(conv, mySubChar, len, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ }
+ /*------------*/
+
+ src = source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = source + sourceLen;
+
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min(targ + gOutBufferSize, realBufferEnd);
+ sourceLimit = nct_min(src + gInBufferSize, realSourceEnd);
+
+ doFlush = (UBool)(sourceLimit == realSourceEnd);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+
+
+ status = U_ZERO_ERROR;
+
+ ucnv_fromUnicode (conv,
+ (char **)&targ,
+ (const char *)end,
+ &src,
+ sourceLimit,
+ checkOffsets ? offs : NULL,
+ doFlush, /* flush if we're at the end of the input data */
+ &status);
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && (sourceLimit < realSourceEnd)) );
+
+
+ if(status==U_INVALID_CHAR_FOUND || status == U_ILLEGAL_CHAR_FOUND){
+ UChar errChars[50]; /* should be sufficient */
+ int8_t errLen = 50;
+ UErrorCode err = U_ZERO_ERROR;
+ const UChar* limit= NULL;
+ const UChar* start= NULL;
+ ucnv_getInvalidUChars(conv,errChars, &errLen, &err);
+ if(U_FAILURE(err)){
+ log_err("ucnv_getInvalidUChars failed with error : %s\n",u_errorName(err));
+ }
+ /* src points to limit of invalid chars */
+ limit = src;
+ /* length of in invalid chars should be equal to returned length*/
+ start = src - errLen;
+ if(u_strncmp(errChars,start,errLen)!=0){
+ log_err("ucnv_getInvalidUChars did not return the correct invalid chars for encoding %s \n", ucnv_getName(conv,&err));
+ }
+ }
+ /* allow failure codes for the stop callback */
+ if(U_FAILURE(status) &&
+ (callback != UCNV_FROM_U_CALLBACK_STOP || (status != U_INVALID_CHAR_FOUND && status != U_ILLEGAL_CHAR_FOUND)))
+ {
+ log_err("Problem in fromUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
+ sourceLen, targ-junkout);
+ if(VERBOSITY)
+ {
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+ for(p = junkout;p<targ;p++)
+ {
+ sprintf(junk + strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
+ sprintf(offset_str + strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
+ }
+
+ log_verbose(junk);
+ printSeq(expect, expectLen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+
+ if(expectLen != targ-junkout)
+ {
+ log_err("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout));
+ printSeqErr(expect, expectLen);
+ return FALSE;
+ }
+
+ if (checkOffsets && (expectOffsets != 0) )
+ {
+ log_verbose("comparing %d offsets..\n", targ-junkout);
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t) )){
+ log_err("did not get the expected offsets while %s \n", gNuConvTestName);
+ log_err("Got Output : ");
+ printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout));
+ log_err("Got Offsets: ");
+ for(p=junkout;p<targ;p++)
+ log_err("%d,", junokout[p-junkout]);
+ log_err("\n");
+ log_err("Expected Offsets: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("%d,", expectOffsets[i]);
+ log_err("\n");
+ return FALSE;
+ }
+ }
+
+ if(!memcmp(junkout, expect, expectLen))
+ {
+ log_verbose("String matches! %s\n", gNuConvTestName);
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_err("source: ");
+ printUSeqErr(source, sourceLen);
+ log_err("Got: ");
+ printSeqErr((const uint8_t *)junkout, expectLen);
+ log_err("Expected: ");
+ printSeqErr(expect, expectLen);
+ return FALSE;
+ }
+}
+
+UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ UChar junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ const char *src;
+ const char *realSourceEnd;
+ const char *srcLimit;
+ UChar *targ;
+ UChar *end;
+ int32_t *offs;
+ int i;
+ UBool checkOffsets = TRUE;
+ char junk[9999];
+ char offset_str[9999];
+ UChar *p;
+ UConverterToUCallback oldAction = NULL;
+ const void* oldContext = NULL;
+
+ int32_t realBufferSize;
+ UChar *realBufferEnd;
+
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = 0xFFFE;
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = -1;
+
+ setNuConvTestName(codepage, "TO");
+
+ log_verbose("\n========= %s\n", gNuConvTestName);
+
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",gNuConvTestName);
+ return TRUE;
+ }
+
+ log_verbose("Converter opened..\n");
+
+ src = (const char *)source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = src + sourcelen;
+ /*----setting the callback routine----*/
+ ucnv_setToUCallBack (conv, callback, NULL, &oldAction, &oldContext, &status);
+ if (U_FAILURE(status))
+ {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ /*-------------------------------------*/
+ /*setting the subChar*/
+ if(mySubChar != NULL){
+ ucnv_setSubstChars(conv, mySubChar, len, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ }
+ /*------------*/
+
+
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min( targ + gOutBufferSize, realBufferEnd);
+ srcLimit = nct_min(realSourceEnd, src + gInBufferSize);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
+
+
+
+ status = U_ZERO_ERROR;
+
+ ucnv_toUnicode (conv,
+ &targ,
+ end,
+ (const char **)&src,
+ (const char *)srcLimit,
+ checkOffsets ? offs : NULL,
+ (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of the source data */
+ &status);
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && (srcLimit < realSourceEnd)) ); /* while we just need another buffer */
+
+ if(status==U_INVALID_CHAR_FOUND || status == U_ILLEGAL_CHAR_FOUND){
+ char errChars[50]; /* should be sufficient */
+ int8_t errLen = 50;
+ UErrorCode err = U_ZERO_ERROR;
+ const char* limit= NULL;
+ const char* start= NULL;
+ ucnv_getInvalidChars(conv,errChars, &errLen, &err);
+ if(U_FAILURE(err)){
+ log_err("ucnv_getInvalidChars failed with error : %s\n",u_errorName(err));
+ }
+ /* src points to limit of invalid chars */
+ limit = src;
+ /* length of in invalid chars should be equal to returned length*/
+ start = src - errLen;
+ if(uprv_strncmp(errChars,start,errLen)!=0){
+ log_err("ucnv_getInvalidChars did not return the correct invalid chars for encoding %s \n", ucnv_getName(conv,&err));
+ }
+ }
+ /* allow failure codes for the stop callback */
+ if(U_FAILURE(status) &&
+ (callback != UCNV_TO_U_CALLBACK_STOP || (status != U_INVALID_CHAR_FOUND && status != U_ILLEGAL_CHAR_FOUND && status != U_TRUNCATED_CHAR_FOUND)))
+ {
+ log_err("Problem doing toUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
+ sourcelen, targ-junkout);
+ if(VERBOSITY)
+ {
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+
+ for(p = junkout;p<targ;p++)
+ {
+ sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
+ sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
+ }
+
+ log_verbose(junk);
+ printUSeq(expect, expectlen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+ log_verbose("comparing %d uchars (%d bytes)..\n",expectlen,expectlen*2);
+
+ if (checkOffsets && (expectOffsets != 0))
+ {
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t)))
+ {
+ log_err("did not get the expected offsets while %s \n", gNuConvTestName);
+ log_err("Got offsets: ");
+ for(p=junkout;p<targ;p++)
+ log_err(" %2d,", junokout[p-junkout]);
+ log_err("\n");
+ log_err("Expected offsets: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err(" %2d,", expectOffsets[i]);
+ log_err("\n");
+ log_err("Got output: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("0x%04x,", junkout[i]);
+ log_err("\n");
+ log_err("From source: ");
+ for(i=0; i<(src-(const char *)source); i++)
+ log_err(" 0x%02x,", (unsigned char)source[i]);
+ log_err("\n");
+ }
+ }
+
+ if(!memcmp(junkout, expect, expectlen*2))
+ {
+ log_verbose("Matches!\n");
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_verbose("String does not match. %s\n", gNuConvTestName);
+ log_err("Got: ");
+ printUSeqErr(junkout, expectlen);
+ log_err("Expected: ");
+ printUSeqErr(expect, expectlen);
+ log_err("\n");
+ return FALSE;
+ }
+}
+
+UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UConverterFromUCallback callback , const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len, const void* context, UErrorCode expectedError)
+{
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ char junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ const UChar *src;
+ char *end;
+ char *targ;
+ int32_t *offs;
+ int i;
+ int32_t realBufferSize;
+ char *realBufferEnd;
+ const UChar *realSourceEnd;
+ const UChar *sourceLimit;
+ UBool checkOffsets = TRUE;
+ UBool doFlush;
+ char junk[9999];
+ char offset_str[9999];
+ char *p;
+ UConverterFromUCallback oldAction = NULL;
+ const void* oldContext = NULL;
+
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = (char)0xF0;
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = 0xFF;
+ setNuConvTestName(codepage, "FROM");
+
+ log_verbose("\nTesting========= %s FROM \n inputbuffer= %d outputbuffer= %d\n", codepage, gInBufferSize,
+ gOutBufferSize);
+
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",codepage);
+ return TRUE; /* Because the err has already been logged. */
+ }
+
+ log_verbose("Converter opened..\n");
+
+ /*----setting the callback routine----*/
+ ucnv_setFromUCallBack (conv, callback, context, &oldAction, &oldContext, &status);
+ if (U_FAILURE(status))
+ {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ /*------------------------*/
+ /*setting the subChar*/
+ if(mySubChar != NULL){
+ ucnv_setSubstChars(conv, mySubChar, len, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILURE in setting substitution chars! %s\n", myErrorName(status));
+ }
+ }
+ /*------------*/
+
+ src = source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = source + sourceLen;
+
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min(targ + gOutBufferSize, realBufferEnd);
+ sourceLimit = nct_min(src + gInBufferSize, realSourceEnd);
+
+ doFlush = (UBool)(sourceLimit == realSourceEnd);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+
+
+ status = U_ZERO_ERROR;
+
+ ucnv_fromUnicode (conv,
+ (char **)&targ,
+ (const char *)end,
+ &src,
+ sourceLimit,
+ checkOffsets ? offs : NULL,
+ doFlush, /* flush if we're at the end of the input data */
+ &status);
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && (sourceLimit < realSourceEnd)) );
+
+ /* allow failure codes for the stop callback */
+ if(U_FAILURE(status) && status != expectedError)
+ {
+ log_err("Problem in fromUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
+ sourceLen, targ-junkout);
+ if(VERBOSITY)
+ {
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+ for(p = junkout;p<targ;p++)
+ {
+ sprintf(junk + strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
+ sprintf(offset_str + strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
+ }
+
+ log_verbose(junk);
+ printSeq(expect, expectLen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+
+ if(expectLen != targ-junkout)
+ {
+ log_err("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout));
+ printSeqErr(expect, expectLen);
+ return FALSE;
+ }
+
+ if (checkOffsets && (expectOffsets != 0) )
+ {
+ log_verbose("comparing %d offsets..\n", targ-junkout);
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t) )){
+ log_err("did not get the expected offsets while %s \n", gNuConvTestName);
+ log_err("Got Output : ");
+ printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout));
+ log_err("Got Offsets: ");
+ for(p=junkout;p<targ;p++)
+ log_err("%d,", junokout[p-junkout]);
+ log_err("\n");
+ log_err("Expected Offsets: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("%d,", expectOffsets[i]);
+ log_err("\n");
+ return FALSE;
+ }
+ }
+
+ if(!memcmp(junkout, expect, expectLen))
+ {
+ log_verbose("String matches! %s\n", gNuConvTestName);
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_err("source: ");
+ printUSeqErr(source, sourceLen);
+ log_err("Got: ");
+ printSeqErr((const uint8_t *)junkout, expectLen);
+ log_err("Expected: ");
+ printSeqErr(expect, expectLen);
+ return FALSE;
+ }
+}
+UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len, const void* context, UErrorCode expectedError)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ UChar junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ const char *src;
+ const char *realSourceEnd;
+ const char *srcLimit;
+ UChar *targ;
+ UChar *end;
+ int32_t *offs;
+ int i;
+ UBool checkOffsets = TRUE;
+ char junk[9999];
+ char offset_str[9999];
+ UChar *p;
+ UConverterToUCallback oldAction = NULL;
+ const void* oldContext = NULL;
+
+ int32_t realBufferSize;
+ UChar *realBufferEnd;
+
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = 0xFFFE;
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = -1;
+
+ setNuConvTestName(codepage, "TO");
+
+ log_verbose("\n========= %s\n", gNuConvTestName);
+
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",gNuConvTestName);
+ return TRUE;
+ }
+
+ log_verbose("Converter opened..\n");
+
+ src = (const char *)source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = src + sourcelen;
+ /*----setting the callback routine----*/
+ ucnv_setToUCallBack (conv, callback, context, &oldAction, &oldContext, &status);
+ if (U_FAILURE(status))
+ {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ /*-------------------------------------*/
+ /*setting the subChar*/
+ if(mySubChar != NULL){
+ ucnv_setSubstChars(conv, mySubChar, len, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ }
+ /*------------*/
+
+
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min( targ + gOutBufferSize, realBufferEnd);
+ srcLimit = nct_min(realSourceEnd, src + gInBufferSize);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
+
+
+
+ status = U_ZERO_ERROR;
+
+ ucnv_toUnicode (conv,
+ &targ,
+ end,
+ (const char **)&src,
+ (const char *)srcLimit,
+ checkOffsets ? offs : NULL,
+ (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of the source data */
+ &status);
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && (srcLimit < realSourceEnd)) ); /* while we just need another buffer */
+
+ /* allow failure codes for the stop callback */
+ if(U_FAILURE(status) && status!=expectedError)
+ {
+ log_err("Problem doing toUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
+ sourcelen, targ-junkout);
+ if(VERBOSITY)
+ {
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+
+ for(p = junkout;p<targ;p++)
+ {
+ sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
+ sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
+ }
+
+ log_verbose(junk);
+ printUSeq(expect, expectlen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+ log_verbose("comparing %d uchars (%d bytes)..\n",expectlen,expectlen*2);
+
+ if (checkOffsets && (expectOffsets != 0))
+ {
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t)))
+ {
+ log_err("did not get the expected offsets while %s \n", gNuConvTestName);
+ log_err("Got offsets: ");
+ for(p=junkout;p<targ;p++)
+ log_err(" %2d,", junokout[p-junkout]);
+ log_err("\n");
+ log_err("Expected offsets: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err(" %2d,", expectOffsets[i]);
+ log_err("\n");
+ log_err("Got output: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("0x%04x,", junkout[i]);
+ log_err("\n");
+ log_err("From source: ");
+ for(i=0; i<(src-(const char *)source); i++)
+ log_err(" 0x%02x,", (unsigned char)source[i]);
+ log_err("\n");
+ }
+ }
+
+ if(!memcmp(junkout, expect, expectlen*2))
+ {
+ log_verbose("Matches!\n");
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_verbose("String does not match. %s\n", gNuConvTestName);
+ log_err("Got: ");
+ printUSeqErr(junkout, expectlen);
+ log_err("Expected: ");
+ printUSeqErr(expect, expectlen);
+ log_err("\n");
+ return FALSE;
+ }
+}
+
+static void TestCallBackFailure(void) {
+ UErrorCode status = U_USELESS_COLLATOR_ERROR;
+ ucnv_cbFromUWriteBytes(NULL, NULL, -1, -1, &status);
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("Error: ucnv_cbFromUWriteBytes did not react correctly to a bad UErrorCode\n");
+ }
+ ucnv_cbFromUWriteUChars(NULL, NULL, NULL, -1, &status);
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("Error: ucnv_cbFromUWriteUChars did not react correctly to a bad UErrorCode\n");
+ }
+ ucnv_cbFromUWriteSub(NULL, -1, &status);
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("Error: ucnv_cbFromUWriteSub did not react correctly to a bad UErrorCode\n");
+ }
+ ucnv_cbToUWriteUChars(NULL, NULL, -1, -1, &status);
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("Error: ucnv_cbToUWriteUChars did not react correctly to a bad UErrorCode\n");
+ }
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.h
new file mode 100644
index 00000000000..ebce4ae8d2b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/nccbtst.h
@@ -0,0 +1,69 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File NCCBTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda creation
+*********************************************************************************
+*/
+#ifndef _NCCBTST
+#define _NCCBTST
+/* C API TEST FOR CALL BACK ROUTINES OF CODESET CONVERSION COMPONENT */
+#include "cintltst.h"
+#include "unicode/utypes.h"
+
+
+static void TestSkipCallBack(void);
+static void TestStopCallBack(void);
+static void TestSubCallBack(void);
+static void TestSubWithValueCallBack(void);
+static void TestLegalAndOtherCallBack(void);
+static void TestSingleByteCallBack(void);
+
+
+static void TestSkip(int32_t inputsize, int32_t outputsize);
+
+static void TestStop(int32_t inputsize, int32_t outputsize);
+
+static void TestSub(int32_t inputsize, int32_t outputsize);
+
+static void TestSubWithValue(int32_t inputsize, int32_t outputsize);
+
+static void TestLegalAndOthers(int32_t inputsize, int32_t outputsize);
+static void TestSingleByte(int32_t inputsize, int32_t outputsize);
+static void TestEBCDIC_STATEFUL_Sub(int32_t inputsize, int32_t outputsize);
+
+/* Following will return FALSE *only* on a mismach. They will return TRUE on any other error OR success, because
+ * the error would have been emitted to log_err separately. */
+
+UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UConverterFromUCallback callback, const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len);
+
+
+UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len);
+
+UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UConverterFromUCallback callback , const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len, const void* context, UErrorCode expectedError);
+
+UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
+ const char *mySubChar, int8_t len, const void* context, UErrorCode expectedError);
+
+static void printSeq(const uint8_t* a, int len);
+static void printUSeq(const UChar* a, int len);
+static void printSeqErr(const uint8_t* a, int len);
+static void printUSeqErr(const UChar* a, int len);
+static void setNuConvTestName(const char *codepage, const char *direction);
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.c b/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.c
new file mode 100644
index 00000000000..2158bfd41c3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.c
@@ -0,0 +1,755 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ***************************************************************************/
+/*****************************************************************************
+*
+* File NCNVCBTS
+*
+* Modification History:
+* Name Date Description
+* Madhu Katragadda 06/23/2000 Tests for Conveter FallBack API and Functionality
+******************************************************************************
+*/
+#include <stdio.h>
+#include "unicode/uloc.h"
+#include "unicode/ucnv.h"
+#include "unicode/ucnv_err.h"
+#include "cintltst.h"
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "ncnvfbts.h"
+#include "cmemory.h"
+#include "cstring.h"
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+#define NEW_MAX_BUFFER 999
+
+
+#define nct_min(x,y) ((x<y) ? x : y)
+
+static int32_t gInBufferSize = 0;
+static int32_t gOutBufferSize = 0;
+static char gNuConvTestName[1024];
+
+static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err)
+{
+ if(cnv && cnv[0] == '@') {
+ return ucnv_openPackage("testdata", cnv+1, err);
+ } else {
+ return ucnv_open(cnv, err);
+ }
+}
+
+
+static void printSeq(const unsigned char* a, int len)
+{
+ int i=0;
+ log_verbose("{");
+ while (i<len)
+ log_verbose("0x%02x ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printUSeq(const UChar* a, int len)
+{
+ int i=0;
+ log_verbose("{U+");
+ while (i<len)
+ log_verbose("0x%04x ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printSeqErr(const unsigned char* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "{");
+ while (i<len)
+ fprintf(stderr, "0x%02x ", a[i++]);
+ fprintf(stderr, "}\n");
+}
+
+static void printUSeqErr(const UChar* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "{U+");
+ while (i<len)
+ fprintf(stderr, "0x%04x ", a[i++]);
+ fprintf(stderr,"}\n");
+}
+
+static void TestConverterFallBack(void)
+{
+ TestConvertFallBackWithBufferSizes(10,10);
+ TestConvertFallBackWithBufferSizes(2,3);
+ TestConvertFallBackWithBufferSizes(3,2);
+ TestConvertFallBackWithBufferSizes(NEW_MAX_BUFFER,1);
+ TestConvertFallBackWithBufferSizes(NEW_MAX_BUFFER,2);
+ TestConvertFallBackWithBufferSizes(NEW_MAX_BUFFER,3);
+ TestConvertFallBackWithBufferSizes(NEW_MAX_BUFFER,4);
+ TestConvertFallBackWithBufferSizes(NEW_MAX_BUFFER,5);
+ TestConvertFallBackWithBufferSizes(NEW_MAX_BUFFER,6);
+ TestConvertFallBackWithBufferSizes(1,NEW_MAX_BUFFER);
+ TestConvertFallBackWithBufferSizes(2,NEW_MAX_BUFFER);
+ TestConvertFallBackWithBufferSizes(3,NEW_MAX_BUFFER);
+ TestConvertFallBackWithBufferSizes(4,NEW_MAX_BUFFER);
+ TestConvertFallBackWithBufferSizes(5,NEW_MAX_BUFFER);
+ TestConvertFallBackWithBufferSizes(NEW_MAX_BUFFER,NEW_MAX_BUFFER);
+
+}
+
+
+void addTestConverterFallBack(TestNode** root);
+
+void addTestConverterFallBack(TestNode** root)
+{
+ addTest(root, &TestConverterFallBack, "tsconv/ncnvfbts/TestConverterFallBack");
+
+}
+
+
+/* Note that this test already makes use of statics, so it's not really
+ multithread safe.
+ This convenience function lets us make the error messages actually useful.
+*/
+
+static void setNuConvTestName(const char *codepage, const char *direction)
+{
+ sprintf(gNuConvTestName, "[Testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
+ codepage,
+ direction,
+ (int)gInBufferSize,
+ (int)gOutBufferSize);
+}
+
+
+static UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UBool fallback, const int32_t *expectOffsets)
+{
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ char junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ const UChar *src;
+ char *end;
+ char *targ;
+ int32_t *offs;
+ int i;
+ int32_t realBufferSize;
+ char *realBufferEnd;
+ const UChar *realSourceEnd;
+ const UChar *sourceLimit;
+ UBool checkOffsets = TRUE;
+ UBool doFlush;
+ UBool action=FALSE;
+ char *p;
+
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = (char)0xF0;
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = 0xFF;
+ setNuConvTestName(codepage, "FROM");
+
+ log_verbose("\nTesting========= %s FROM \n inputbuffer= %d outputbuffer= %d\n", codepage, gInBufferSize,
+ gOutBufferSize);
+
+ conv = my_ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",codepage);
+ return TRUE;
+ }
+
+ log_verbose("Converter opened..\n");
+ /*----setting the callback routine----*/
+ ucnv_setFallback (conv, fallback);
+ action = ucnv_usesFallback(conv);
+ if(action != fallback){
+ log_err("FAIL: Error is setting fallback. Errocode=%s\n", myErrorName(status));
+ }
+ /*------------------------*/
+ src = source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = source + sourceLen;
+
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min(targ + gOutBufferSize, realBufferEnd);
+ sourceLimit = nct_min(src + gInBufferSize, realSourceEnd);
+
+ doFlush = (UBool)(sourceLimit == realSourceEnd);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+
+
+ status = U_ZERO_ERROR;
+
+ ucnv_fromUnicode (conv,
+ (char **)&targ,
+ (const char *)end,
+ &src,
+ sourceLimit,
+ checkOffsets ? offs : NULL,
+ doFlush, /* flush if we're at the end of the input data */
+ &status);
+
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (sourceLimit < realSourceEnd) );
+
+ if(U_FAILURE(status))
+ {
+ log_err("Problem doing toUnicode, errcode %d %s\n", myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
+ sourceLen, targ-junkout);
+ if(VERBOSITY)
+ {
+ char junk[9999];
+ char offset_str[9999];
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+ for(p = junkout;p<targ;p++)
+ {
+ sprintf(junk + uprv_strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
+ sprintf(offset_str + strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
+ }
+
+ log_verbose(junk);
+ printSeq((const unsigned char*)expect, expectLen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+
+ if(expectLen != targ-junkout)
+ {
+ log_err("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
+ printSeqErr((const unsigned char*)expect, expectLen);
+ return FALSE;
+ }
+
+ if (checkOffsets && (expectOffsets != 0) )
+ {
+ log_verbose("\ncomparing %d offsets..\n", targ-junkout);
+ if(uprv_memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t) )){
+ log_err("\ndid not get the expected offsets while %s \n", gNuConvTestName);
+ log_err("Got : ");
+ printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
+ for(p=junkout;p<targ;p++)
+ log_err("%d, ", junokout[p-junkout]);
+ log_err("\nExpected: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("%d,", expectOffsets[i]);
+ }
+ }
+
+ log_verbose("\n\ncomparing..\n");
+ if(!memcmp(junkout, expect, expectLen))
+ {
+ log_verbose("Matches!\n");
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_verbose("String does not match. %s\n", gNuConvTestName);
+ printSeqErr((const unsigned char*)junkout, expectLen);
+ printSeqErr((const unsigned char*)expect, expectLen);
+ return FALSE;
+ }
+}
+
+static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UBool fallback, const int32_t *expectOffsets)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ UChar junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ const char *src;
+ const char *realSourceEnd;
+ const char *srcLimit;
+ UChar *targ;
+ UChar *end;
+ int32_t *offs;
+ int i;
+ UBool checkOffsets = TRUE;
+ char junk[9999];
+ char offset_str[9999];
+ UChar *p;
+ UBool action;
+
+ int32_t realBufferSize;
+ UChar *realBufferEnd;
+
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = 0xFFFE;
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = -1;
+
+ setNuConvTestName(codepage, "TO");
+
+ log_verbose("\n========= %s\n", gNuConvTestName);
+
+ conv = my_ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",gNuConvTestName);
+ return TRUE; /* because it has been logged */
+ }
+
+ log_verbose("Converter opened..\n");
+
+ src = (const char *)source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = src + sourcelen;
+ /*----setting the fallback routine----*/
+ ucnv_setFallback (conv, fallback);
+ action = ucnv_usesFallback(conv);
+ if(action != fallback){
+ log_err("FAIL: Error is setting fallback. Errocode=%s\n", myErrorName(status));
+ }
+ /*-------------------------------------*/
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min( targ + gOutBufferSize, realBufferEnd);
+ srcLimit = nct_min(realSourceEnd, src + gInBufferSize);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
+
+
+
+ status = U_ZERO_ERROR;
+
+ ucnv_toUnicode (conv,
+ &targ,
+ end,
+ (const char **)&src,
+ (const char *)srcLimit,
+ checkOffsets ? offs : NULL,
+ (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
+ &status);
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (srcLimit < realSourceEnd) ); /* while we just need another buffer */
+
+
+ if(U_FAILURE(status))
+ {
+ log_err("Problem doing toUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
+ sourcelen, targ-junkout);
+ if(VERBOSITY)
+ {
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+
+ for(p = junkout;p<targ;p++)
+ {
+ sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
+ sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
+ }
+
+ log_verbose(junk);
+ printUSeq(expect, expectlen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+ log_verbose("comparing %d uchars (%d bytes)..\n",expectlen,expectlen*2);
+
+ if (checkOffsets && (expectOffsets != 0))
+ {
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t)))
+ {
+ log_err("\n\ndid not get the expected offsets while %s \n", gNuConvTestName);
+ log_err("\nGot : ");
+ for(p=junkout;p<targ;p++)
+ log_err("%d, ", junokout[p-junkout]);
+ log_err("\nExpected: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("%d,", expectOffsets[i]);
+ log_err("");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("0x%04X,", junkout[i]);
+ log_err("");
+ for(i=0; i<(src-(const char *)source); i++)
+ log_err("0x%04X,", (unsigned char)source[i]);
+ }
+ }
+
+ if(!memcmp(junkout, expect, expectlen*2))
+ {
+ log_verbose("Matches!\n");
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_verbose("String does not match. %s\n", gNuConvTestName);
+ printUSeqErr(junkout, expectlen);
+ printf("\n");
+ printUSeqErr(expect, expectlen);
+ return FALSE;
+ }
+}
+
+
+
+static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
+{
+
+ static const UChar SBCSText[] =
+ { 0x0021, 0xFF01, 0x0022, 0xFF02, 0x0023, 0xFF03, 0x003A, 0xFF1A, 0x003B, 0xFF1B, 0x003C, 0xFF1C };
+ /* 21, ?, 22, ?, 23, ?, 3a, ?, 3b, ?, 3c, ? SBCS*/
+ static const uint8_t expectedNative[] =
+ { 0x21, 0x21, 0x22, 0x22, 0x23, 0x23, 0x3a, 0x3a, 0x3b, 0x3b, 0x3c, 0x3c};
+ static const UChar retrievedSBCSText[]=
+ { 0x0021, 0x0021, 0x0022, 0x0022, 0x0023, 0x0023, 0x003A, 0x003A, 0x003B, 0x003B, 0x003C, 0x003C };
+ static const int32_t toNativeOffs [] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b};
+ static const int32_t fromNativeoffs [] =
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
+
+
+ /* 1363 isn't DBCS, but it has the DBCS section */
+ static const UChar DBCSText[] =
+ { 0x00a1, 0x00ad, 0x2010, 0x00b7, 0x30fb};
+ static const uint8_t expectedIBM1363_DBCS[] =
+ { 0xa2, 0xae, 0xa1 ,0xa9, 0xa1, 0xa9,0xa1 ,0xa4, 0xa1, 0xa4};
+ static const UChar retrievedDBCSText[]=
+ { 0x00a1, 0x2010, 0x2010, 0x30fb, 0x30fb };
+ static const int32_t toIBM1363Offs_DBCS[] =
+ { 0x00, 0x00, 0x01,0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04};
+ static const int32_t fromIBM1363offs_DBCS[] =
+ { 0, 2, 4, 6, 8};
+
+
+ static const UChar MBCSText[] =
+ { 0x0001, 0x263a, 0x2013, 0x2014, 0x263b, 0x0002};
+ static const uint8_t expectedIBM950[] =
+ { 0x01, 0x01, 0xa1, 0x56, 0xa1, 0x56, 0x02, 0x02};
+ static const UChar retrievedMBCSText[]=
+ { 0x0001, 0x0001, 0x2014, 0x2014, 0x0002, 0x0002};
+ static const int32_t toIBM950Offs [] =
+ { 0x00, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05};
+ static const int32_t fromIBM950offs [] =
+ { 0, 1, 2, 4, 6, 7};
+
+ static const UChar MBCSText1363[] =
+ { 0x0005,
+ 0xffe8,
+ 0x0007,
+ 0x2022,
+ 0x005c,
+ 0x00b7,
+ 0x3016,
+ 0x30fb,
+ 0x9a36};
+ static const uint8_t expectedIBM1363[] =
+ { 0x05,
+ 0x05,
+ 0x07,
+ 0x07,
+ 0x7f,
+ 0xa1, 0xa4,
+ 0xa1, 0xe0,
+ 0xa1, 0xa4,
+ 0xf5, 0xe2};
+ static const UChar retrievedMBCSText1363[]=
+ { 0x0005, 0x0005, 0x0007, 0x0007, 0x001a, 0x30fb, 0x25a1, 0x30fb, 0x9a36};
+ static const int32_t toIBM1363Offs [] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x08, 0x08};
+ static const int32_t fromIBM1363offs [] =
+ { 0, 1, 2, 3, 4, 5, 7, 9, 11};
+
+
+
+ static const char* nativeCodePage[]={
+ /*NLCS Mapping*/
+ "ibm-437",
+ "ibm-850",
+ "ibm-878",
+ "ibm-923",
+ "ibm-1051",
+ "ibm-1089",
+ "ibm-1250",
+ "ibm-1251",
+ "ibm-1253",
+ "ibm-1254",
+ "ibm-1255",
+ "ibm-1256",
+ "ibm-1257",
+ "ibm-1258",
+ "ibm-1276"
+ };
+
+ int32_t i=0;
+ gInBufferSize = insize;
+ gOutBufferSize = outsize;
+
+ for(i=0; i<sizeof(nativeCodePage)/sizeof(nativeCodePage[0]); i++){
+ log_verbose("Testing %s\n", nativeCodePage[i]);
+ if(!testConvertFromUnicode(SBCSText, sizeof(SBCSText)/sizeof(SBCSText[0]),
+ expectedNative, sizeof(expectedNative), nativeCodePage[i], TRUE, toNativeOffs ))
+ log_err("u-> %s(SBCS) with FallBack did not match.\n", nativeCodePage[i]);
+
+ if(!testConvertToUnicode(expectedNative, sizeof(expectedNative),
+ retrievedSBCSText, sizeof(retrievedSBCSText)/sizeof(retrievedSBCSText[0]), nativeCodePage[i], TRUE, fromNativeoffs ))
+ log_err("%s->u(SBCS) with Fallback did not match.\n", nativeCodePage[i]);
+ }
+
+ /*DBCS*/
+ if(!testConvertFromUnicode(DBCSText, sizeof(DBCSText)/sizeof(DBCSText[0]),
+ expectedIBM1363_DBCS, sizeof(expectedIBM1363_DBCS), "ibm-1363", TRUE, toIBM1363Offs_DBCS ))
+ log_err("u-> ibm-1363(DBCS portion) with FallBack did not match.\n");
+
+ if(!testConvertToUnicode(expectedIBM1363_DBCS, sizeof(expectedIBM1363_DBCS),
+ retrievedDBCSText, sizeof(retrievedDBCSText)/sizeof(retrievedDBCSText[0]),"ibm-1363", TRUE, fromIBM1363offs_DBCS ))
+ log_err("ibm-1363->u(DBCS portion) with Fallback did not match.\n");
+
+
+ /*MBCS*/
+ if(!testConvertFromUnicode(MBCSText, sizeof(MBCSText)/sizeof(MBCSText[0]),
+ expectedIBM950, sizeof(expectedIBM950), "ibm-950", TRUE, toIBM950Offs ))
+ log_err("u-> ibm-950(MBCS) with FallBack did not match.\n");
+
+ if(!testConvertToUnicode(expectedIBM950, sizeof(expectedIBM950),
+ retrievedMBCSText, sizeof(retrievedMBCSText)/sizeof(retrievedMBCSText[0]),"ibm-950", TRUE, fromIBM950offs ))
+ log_err("ibm-950->u(MBCS) with Fallback did not match.\n");
+
+ /*commented untill data table is available*/
+ log_verbose("toUnicode fallback with fallback data for MBCS\n");
+ {
+ const uint8_t IBM950input[] = {
+ 0xf4, 0x87, 0xa4, 0x4a, 0xf4, 0x88, 0xa4, 0x4b,
+ 0xf9, 0x92, 0xdc, 0xb0, };
+ UChar expectedUnicodeText[]= { 0x5165, 0x5165, 0x516b, 0x516b, 0x9ef9, 0x9ef9};
+ int32_t fromIBM950inputOffs [] = { 0, 2, 4, 6, 8, 10};
+ /* for testing reverse fallback behavior */
+ UChar expectedFallbackFalse[]= { 0x5165, 0x5165, 0x516b, 0x516b, 0x9ef9, 0x9ef9};
+
+ if(!testConvertToUnicode(IBM950input, sizeof(IBM950input),
+ expectedUnicodeText, sizeof(expectedUnicodeText)/sizeof(expectedUnicodeText[0]),"ibm-950", TRUE, fromIBM950inputOffs ))
+ log_err("ibm-950->u(MBCS) with Fallback did not match.\n");
+ if(!testConvertToUnicode(IBM950input, sizeof(IBM950input),
+ expectedFallbackFalse, sizeof(expectedFallbackFalse)/sizeof(expectedFallbackFalse[0]),"ibm-950", FALSE, fromIBM950inputOffs ))
+ log_err("ibm-950->u(MBCS) with Fallback did not match.\n");
+
+ }
+ log_verbose("toUnicode fallback with fallback data for euc-tw\n");
+ {
+ const uint8_t euc_tw_input[] = {
+ 0xA7, 0xCC, 0x8E, 0xA2, 0xA1, 0xAB,
+ 0xA8, 0xC7, 0xC8, 0xDE,
+ 0xA8, 0xCD, 0x8E, 0xA2, 0xA2, 0xEA,};
+ UChar expectedUnicodeText[]= { 0x5C6E, 0x5C6E, 0x81FC, 0x81FC, 0x8278, 0x8278};
+ int32_t from_euc_tw_offs [] = { 0, 2, 6, 8, 10, 12};
+ /* for testing reverse fallback behavior */
+ UChar expectedFallbackFalse[]= { 0x5C6E, 0x5C6E, 0x81FC, 0x81FC, 0x8278, 0x8278};
+
+ if(!testConvertToUnicode(euc_tw_input, sizeof(euc_tw_input),
+ expectedUnicodeText, sizeof(expectedUnicodeText)/sizeof(expectedUnicodeText[0]),"euc-tw", TRUE, from_euc_tw_offs ))
+ log_err("from euc-tw->u with Fallback did not match.\n");
+
+ if(!testConvertToUnicode(euc_tw_input, sizeof(euc_tw_input),
+ expectedFallbackFalse, sizeof(expectedFallbackFalse)/sizeof(expectedFallbackFalse[0]),"euc-tw", FALSE, from_euc_tw_offs ))
+ log_err("from euc-tw->u with Fallback false did not match.\n");
+
+
+ }
+ log_verbose("fromUnicode to euc-tw with fallback data euc-tw\n");
+ {
+ UChar inputText[]= { 0x0001, 0x008e, 0x203e, 0x2223, 0xff5c, 0x5296,
+ 0x5C6E, 0x5C6E, 0x81FC, 0x81FC, 0x8278, 0x8278, 0xEDEC};
+ const uint8_t expected_euc_tw[] = {
+ 0x01, 0x1a, 0xa2, 0xa3,
+ 0xa2, 0xde, 0xa2, 0xde,
+ 0x8e, 0xa2, 0xe5, 0xb9,
+ 0x8e, 0xa2, 0xa1, 0xab, 0x8e, 0xa2, 0xa1, 0xab,
+ 0xc8, 0xde, 0xc8, 0xde,
+ 0x8e, 0xa2, 0xa2, 0xea, 0x8e, 0xa2, 0xa2, 0xea,
+ 0x8e, 0xac, 0xc6, 0xf7};
+ int32_t to_euc_tw_offs [] = { 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6,
+ 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12};
+
+ if(!testConvertFromUnicode(inputText, sizeof(inputText)/sizeof(inputText[0]),
+ expected_euc_tw, sizeof(expected_euc_tw), "euc-tw", TRUE, to_euc_tw_offs ))
+ log_err("u-> euc-tw with FallBack did not match.\n");
+
+ }
+
+ /*MBCS 1363*/
+ if(!testConvertFromUnicode(MBCSText1363, sizeof(MBCSText1363)/sizeof(MBCSText1363[0]),
+ expectedIBM1363, sizeof(expectedIBM1363), "ibm-1363", TRUE, toIBM1363Offs ))
+ log_err("u-> ibm-1363(MBCS) with FallBack did not match.\n");
+
+ if(!testConvertToUnicode(expectedIBM1363, sizeof(expectedIBM1363),
+ retrievedMBCSText1363, sizeof(retrievedMBCSText1363)/sizeof(retrievedMBCSText1363[0]),"ibm-1363", TRUE, fromIBM1363offs ))
+ log_err("ibm-1363->u(MBCS) with Fallback did not match.\n");
+
+
+ /*some more test to increase the code coverage in MBCS. Create an test converter from test1.ucm
+ which is test file for MBCS conversion with single-byte codepage data.*/
+ {
+
+ /* MBCS with single byte codepage data test1.ucm*/
+ const UChar unicodeInput[] = { 0x20ac, 0x0005, 0x0006, 0xdbc4, 0xde34, 0xdbba, 0xdfcd, 0x0003};
+ const uint8_t expectedtest1[] = { 0x00, 0x05, 0xff, 0x07, 0x08, 0xff,};
+ int32_t totest1Offs[] = { 0, 1, 2, 3, 5, 7};
+
+ const uint8_t test1input[] = { 0x00, 0x05, 0x06, 0x07, 0x08, 0x09};
+ const UChar expectedUnicode[] = { 0x20ac, 0x0005, 0x0006, 0xdbc4, 0xde34, 0xfffd, 0xfffd, 0xfffe};
+ int32_t fromtest1Offs[] = { 0, 1, 2, 3, 3, 4,5};
+
+ /*from Unicode*/
+ if(!testConvertFromUnicode(unicodeInput, sizeof(unicodeInput)/sizeof(unicodeInput[0]),
+ expectedtest1, sizeof(expectedtest1), "@test1", TRUE, totest1Offs ))
+ log_err("u-> test1(MBCS conversion with single-byte) did not match.\n");
+
+ /*to Unicode*/
+ if(!testConvertToUnicode(test1input, sizeof(test1input),
+ expectedUnicode, sizeof(expectedUnicode)/sizeof(expectedUnicode[0]), "@test1", TRUE, fromtest1Offs ))
+ log_err("test1(MBCS conversion with single-byte) -> u did not match.\n");
+
+ }
+
+ /*some more test to increase the code coverage in MBCS. Create an test converter from test3.ucm
+ which is test file for MBCS conversion with three-byte codepage data.*/
+ {
+
+ /* MBCS with three byte codepage data test3.ucm*/
+ const UChar unicodeInput[] = { 0x20ac, 0x0005, 0x0006, 0xdbc4, 0xde34, 0xdbba, 0xdfcd, 0x000b, 0xd84d, 0xdc56, 0x000e, 0x0003, };
+ const uint8_t expectedtest3[] = { 0x00, 0x05, 0xff, 0x07, 0xff, 0x01, 0x02, 0x0b, 0x01, 0x02, 0x0a, 0xff, 0xff,};
+ int32_t totest3Offs[] = { 0, 1, 2, 3, 5, 7, 7, 7, 8, 8, 8, 10, 11};
+
+ const uint8_t test3input[] = { 0x00, 0x05, 0x06, 0x01, 0x02, 0x0b, 0x07, 0x01, 0x02, 0x0a,
+ 0x01, 0x02, 0x0e, 0x01, 0x02, 0x0d, 0x03, 0x01, 0x02, 0x0f,};
+ const UChar expectedUnicode[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56,
+ 0x000e, 0xd891, 0xdd67, 0xfffd, 0xfffd };
+ int32_t fromtest3Offs[] = { 0, 1, 2, 3, 6, 6, 7, 7, 10, 13, 13, 16, 17};
+
+ /*from Unicode*/
+ if(!testConvertFromUnicode(unicodeInput, sizeof(unicodeInput)/sizeof(unicodeInput[0]),
+ expectedtest3, sizeof(expectedtest3), "@test3", TRUE, totest3Offs ))
+ log_err("u-> test3(MBCS conversion with three-byte) did not match.\n");
+
+ /*to Unicode*/
+ if(!testConvertToUnicode(test3input, sizeof(test3input),
+ expectedUnicode, sizeof(expectedUnicode)/sizeof(expectedUnicode[0]), "@test3", TRUE, fromtest3Offs ))
+ log_err("test3(MBCS conversion with three-byte) -> u did not match.\n");
+
+ }
+
+ /*some more test to increase the code coverage in MBCS. Create an test converter from test4.ucm
+ which is test file for MBCS conversion with four-byte codepage data.*/
+ {
+
+ /* MBCS with three byte codepage data test4.ucm*/
+ const UChar unicodeInput[] =
+ { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xdbba, 0xdfcd,
+ 0xd84d, 0xdc56, 0x000e, 0xd891, 0xdd67, 0x000f};
+ const uint8_t expectedtest4[] =
+ { 0x00, 0x05, 0xff, 0x01, 0x02, 0x03, 0x0b, 0x07, 0xff,
+ 0x01, 0x02, 0x03, 0x0a, 0xff, 0xff, 0xff};
+ int32_t totest4Offs[] =
+ { 0, 1, 2, 3, 3, 3, 3, 4, 6, 8, 8, 8, 8, 10, 11, 13};
+
+ const uint8_t test4input[] =
+ { 0x00, 0x05, 0x06, 0x01, 0x02, 0x03, 0x0b, 0x07, 0x08,
+ 0x01, 0x02, 0x03, 0x0a, 0x01, 0x02, 0x03, 0x0e, 0x01, 0x02, 0x03, 0x0d, 0x03, 0x01, 0x02, 0x03, 0x0c,};
+ const UChar expectedUnicode[] =
+ { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xdbba, 0xdfcd,
+ 0xd84d, 0xdc56, 0x000e, 0xd891, 0xdd67, 0x1a, 0xfffd};
+ int32_t fromtest4Offs[] =
+ { 0, 1, 2, 3, 7, 7, 8, 8, 9, 9, 13, 17, 17, 21, 22,};
+
+ /*from Unicode*/
+ if(!testConvertFromUnicode(unicodeInput, sizeof(unicodeInput)/sizeof(unicodeInput[0]),
+ expectedtest4, sizeof(expectedtest4), "@test4", TRUE, totest4Offs ))
+ log_err("u-> test4(MBCS conversion with four-byte) did not match.\n");
+
+ /*to Unicode*/
+ if(!testConvertToUnicode(test4input, sizeof(test4input),
+ expectedUnicode, sizeof(expectedUnicode)/sizeof(expectedUnicode[0]), "@test4", TRUE, fromtest4Offs ))
+ log_err("test4(MBCS conversion with four-byte) -> u did not match.\n");
+
+ }
+ /* Test for jitterbug 509 EBCDIC_STATEFUL Converters*/
+ {
+ const UChar unicodeInput[] = {0x00AF, 0x2013, 0x2223, 0x004C, 0x5F5D, 0xFF5E };
+ const uint8_t expectedtest1[] = {0x0E,0x42,0xA1, 0x44,0x4A, 0x42,0x4F, 0x0F,0xD3, 0x0E,0x65,0x60, 0x43,0xA1,0x0f };
+ int32_t totest1Offs[] = {0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5 };
+ const uint8_t test1input[] = {0x0E,0x42,0xA1, 0x44,0x4A, 0x42,0x4F, 0x0F,0xD3, 0x0E,0x65,0x60, 0x43,0xA1 };
+ const UChar expectedUnicode[] = {0x203e, 0x2014, 0xff5c, 0x004c, 0x5f5e, 0x223c };
+ int32_t fromtest1Offs[] = {1, 3, 5, 8, 10, 12 };
+ /*from Unicode*/
+ if(!testConvertFromUnicode(unicodeInput, sizeof(unicodeInput)/sizeof(unicodeInput[0]),
+ expectedtest1, sizeof(expectedtest1), "ibm-1371", TRUE, totest1Offs ))
+ log_err("u-> ibm-1371(MBCS conversion with single-byte) did not match.,\n");
+ /*to Unicode*/
+ if(!testConvertToUnicode(test1input, sizeof(test1input),
+ expectedUnicode, sizeof(expectedUnicode)/sizeof(expectedUnicode[0]), "ibm-1371", TRUE, fromtest1Offs ))
+ log_err("ibm-1371(MBCS conversion with single-byte) -> u did not match.,\n");
+ }
+
+}
+#else
+void addTestConverterFallBack(TestNode** root)
+{
+ /* test nothing... */
+
+}
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.h b/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.h
new file mode 100644
index 00000000000..a47e141ccfc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvfbts.h
@@ -0,0 +1,36 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File NCCBTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda creation
+*********************************************************************************
+*/
+#ifndef _NCNVFBTS
+#define _NCNVFBTS
+/* C API TEST FOR FALL BACK ROUTINES OF CODESET CONVERSION COMPONENT */
+#include "cintltst.h"
+#include "unicode/utypes.h"
+
+static void TestConverterFallBack(void);
+static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize );
+static UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UBool fallback, const int32_t *expectOffsets);
+static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UBool fallback, const int32_t *expectOffsets);
+
+
+static void printSeq(const unsigned char* a, int len);
+static void printUSeq(const UChar* a, int len);
+static void printSeqErr(const unsigned char* a, int len);
+static void printUSeqErr(const UChar* a, int len);
+static void setNuConvTestName(const char *codepage, const char *direction);
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvtst.c
new file mode 100644
index 00000000000..2f56c15f88d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ncnvtst.c
@@ -0,0 +1,2055 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*****************************************************************************
+*
+* File CCONVTST.C
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda 7/7/2000 Converter Tests for extended code coverage
+******************************************************************************
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/uloc.h"
+#include "unicode/ucnv.h"
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "unicode/uset.h"
+#include "cintltst.h"
+
+#define MAX_LENGTH 999
+
+#define UNICODE_LIMIT 0x10FFFF
+#define SURROGATE_HIGH_START 0xD800
+#define SURROGATE_LOW_END 0xDFFF
+
+static int32_t gInBufferSize = 0;
+static int32_t gOutBufferSize = 0;
+static char gNuConvTestName[1024];
+
+#define nct_min(x,y) ((x<y) ? x : y)
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+static void printSeq(const unsigned char* a, int len);
+static void printSeqErr(const unsigned char* a, int len);
+static void printUSeq(const UChar* a, int len);
+static void printUSeqErr(const UChar* a, int len);
+static UBool convertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, const int32_t *expectOffsets, UBool doFlush, UErrorCode expectedStatus);
+static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expect, int expectLen,
+ const char *codepage, const int32_t *expectOffsets, UBool doFlush, UErrorCode expectedStatus);
+
+static UBool testConvertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UConverterFromUCallback callback, const int32_t *expectOffsets, UBool testReset);
+static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets, UBool testReset);
+
+static void setNuConvTestName(const char *codepage, const char *direction)
+{
+ sprintf(gNuConvTestName, "[Testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
+ codepage,
+ direction,
+ (int)gInBufferSize,
+ (int)gOutBufferSize);
+}
+
+
+static void TestSurrogateBehaviour(void);
+static void TestErrorBehaviour(void);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestToUnicodeErrorBehaviour(void);
+static void TestGetNextErrorBehaviour(void);
+#endif
+
+static void TestRegressionUTF8(void);
+static void TestRegressionUTF32(void);
+static void TestAvailableConverters(void);
+static void TestFlushInternalBuffer(void); /*for improved code coverage in ucnv_cnv.c*/
+static void TestResetBehaviour(void);
+static void TestTruncated(void);
+static void TestUnicodeSet(void);
+
+static void TestWithBufferSize(int32_t osize, int32_t isize);
+
+
+static void printSeq(const unsigned char* a, int len)
+{
+ int i=0;
+ log_verbose("\n{");
+ while (i<len)
+ log_verbose("0x%02X ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printUSeq(const UChar* a, int len)
+{
+ int i=0;
+ log_verbose("\n{");
+ while (i<len)
+ log_verbose("%0x04X ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printSeqErr(const unsigned char* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "\n{");
+ while (i<len) fprintf(stderr, "0x%02X ", a[i++]);
+ fprintf(stderr, "}\n");
+}
+
+static void printUSeqErr(const UChar* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "\n{");
+ while (i<len)
+ fprintf(stderr, "0x%04X ", a[i++]);
+ fprintf(stderr,"}\n");
+}
+
+void addExtraTests(TestNode** root);
+
+void addExtraTests(TestNode** root)
+{
+ addTest(root, &TestSurrogateBehaviour, "tsconv/ncnvtst/TestSurrogateBehaviour");
+ addTest(root, &TestErrorBehaviour, "tsconv/ncnvtst/TestErrorBehaviour");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestToUnicodeErrorBehaviour, "tsconv/ncnvtst/ToUnicodeErrorBehaviour");
+ addTest(root, &TestGetNextErrorBehaviour, "tsconv/ncnvtst/TestGetNextErrorBehaviour");
+#endif
+
+ addTest(root, &TestAvailableConverters, "tsconv/ncnvtst/TestAvailableConverters");
+ addTest(root, &TestFlushInternalBuffer, "tsconv/ncnvtst/TestFlushInternalBuffer");
+ addTest(root, &TestResetBehaviour, "tsconv/ncnvtst/TestResetBehaviour");
+ addTest(root, &TestRegressionUTF8, "tsconv/ncnvtst/TestRegressionUTF8");
+ addTest(root, &TestRegressionUTF32, "tsconv/ncnvtst/TestRegressionUTF32");
+ addTest(root, &TestTruncated, "tsconv/ncnvtst/TestTruncated");
+ addTest(root, &TestUnicodeSet, "tsconv/ncnvtst/TestUnicodeSet");
+}
+
+/*test surrogate behaviour*/
+static void TestSurrogateBehaviour(){
+ log_verbose("Testing for SBCS and LATIN_1\n");
+ {
+ UChar sampleText[] = {0x0031, 0xd801, 0xdc01, 0x0032};
+ const uint8_t expected[] = {0x31, 0x1a, 0x32};
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /*SBCS*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-920", 0 , TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-920 [UCNV_SBCS] not match.\n");
+#endif
+
+ /*LATIN_1*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "LATIN_1", 0, TRUE, U_ZERO_ERROR ))
+ log_err("u-> LATIN_1 not match.\n");
+
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ log_verbose("Testing for DBCS and MBCS\n");
+ {
+ UChar sampleText[] = {0x00a1, 0xd801, 0xdc01, 0x00a4};
+ const uint8_t expected[] = {0xa2, 0xae, 0xa1, 0xe0, 0xa2, 0xb4};
+ int32_t offsets[] = {0x00, 0x00, 0x01, 0x01, 0x03, 0x03 };
+
+ /*DBCS*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", 0 , TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", offsets , TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
+ /*MBCS*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", 0 , TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", offsets, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
+ }
+
+ log_verbose("Testing for ISO-2022-jp\n");
+ {
+ UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ const uint8_t expected[] = {0x1b, 0x24, 0x42,0x30,0x6c,0x43,0x7a,0x1b,0x28,0x42,
+ 0x31,0x1A, 0x32};
+
+
+ int32_t offsets[] = {0,0,0,0,0,1,1,2,2,2,2,3,5 };
+
+ /*iso-2022-jp*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-jp", 0 , TRUE, U_ZERO_ERROR))
+ log_err("u-> not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-jp", offsets , TRUE, U_ZERO_ERROR))
+ log_err("u-> not match.\n");
+ }
+
+ log_verbose("Testing for ISO-2022-cn\n");
+ {
+ static const UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ static const uint8_t expected[] = {
+ 0x1B, 0x24, 0x29, 0x41, 0x0E, 0x52, 0x3B,
+ 0x36, 0x21,
+ 0x0F, 0x31,
+ 0x1A,
+ 0x32
+ };
+
+
+
+ static const int32_t offsets[] = {
+ 0, 0, 0, 0, 0, 0, 0,
+ 1, 1,
+ 2, 2,
+ 3,
+ 5, };
+
+ /*iso-2022-CN*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-cn", 0 , TRUE, U_ZERO_ERROR))
+ log_err("u-> not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-cn", offsets , TRUE, U_ZERO_ERROR))
+ log_err("u-> not match.\n");
+ }
+
+ log_verbose("Testing for ISO-2022-kr\n");
+ {
+ static const UChar sampleText[] = { 0x4e00,0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ static const uint8_t expected[] = {0x1B, 0x24, 0x29, 0x43,
+ 0x0E, 0x6C, 0x69,
+ 0x0f, 0x1A,
+ 0x0e, 0x6F, 0x4B,
+ 0x0F, 0x31,
+ 0x1A,
+ 0x32 };
+
+ static const int32_t offsets[] = {-1, -1, -1, -1,
+ 0, 0, 0,
+ 1, 1,
+ 3, 3, 3,
+ 4, 4,
+ 5,
+ 7,
+ };
+
+ /*iso-2022-kr*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-kr", 0 , TRUE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-kr", offsets , TRUE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
+ }
+
+ log_verbose("Testing for HZ\n");
+ {
+ static const UChar sampleText[] = { 0x4e00, 0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ static const uint8_t expected[] = {0x7E, 0x7B, 0x52, 0x3B,
+ 0x7E, 0x7D, 0x1A,
+ 0x7E, 0x7B, 0x36, 0x21,
+ 0x7E, 0x7D, 0x31,
+ 0x1A,
+ 0x32 };
+
+
+ static const int32_t offsets[] = {0,0,0,0,
+ 1,1,1,
+ 3,3,3,3,
+ 4,4,4,
+ 5,
+ 7,};
+
+ /*hz*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "HZ", 0 , TRUE, U_ZERO_ERROR))
+ log_err("u-> HZ not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "HZ", offsets , TRUE, U_ZERO_ERROR))
+ log_err("u-> HZ not match.\n");
+ }
+#endif
+
+ /*UTF-8*/
+ log_verbose("Testing for UTF8\n");
+ {
+ static const UChar sampleText[] = { 0x4e00, 0x0701, 0x0031, 0xbfc1, 0xd801, 0xdc01, 0x0032};
+ static const int32_t offsets[]={0x00, 0x00, 0x00, 0x01, 0x01, 0x02,
+ 0x03, 0x03, 0x03, 0x04, 0x04, 0x04,
+ 0x04, 0x06 };
+ static const uint8_t expected[] = {0xe4, 0xb8, 0x80, 0xdc, 0x81, 0x31,
+ 0xeb, 0xbf, 0x81, 0xF0, 0x90, 0x90, 0x81, 0x32};
+
+
+ static const int32_t fromOffsets[] = { 0x0000, 0x0003, 0x0005, 0x0006, 0x0009, 0x0009, 0x000D };
+ /*UTF-8*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", offsets, TRUE, U_ZERO_ERROR ))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", 0, TRUE, U_ZERO_ERROR ))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", offsets, FALSE, U_ZERO_ERROR ))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", 0, FALSE, U_ZERO_ERROR ))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+
+ if(!convertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", 0, TRUE, U_ZERO_ERROR ))
+ log_err("UTF8 -> u did not match.\n");
+ if(!convertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", 0, FALSE, U_ZERO_ERROR ))
+ log_err("UTF8 -> u did not match.\n");
+ if(!convertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", fromOffsets, TRUE, U_ZERO_ERROR ))
+ log_err("UTF8 ->u did not match.\n");
+ if(!convertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", fromOffsets, FALSE, U_ZERO_ERROR ))
+ log_err("UTF8 -> u did not match.\n");
+
+ }
+}
+
+/*test various error behaviours*/
+static void TestErrorBehaviour(){
+ log_verbose("Testing for SBCS and LATIN_1\n");
+ {
+ static const UChar sampleText[] = { 0x0031, 0xd801};
+ static const UChar sampleText2[] = { 0x0031, 0xd801, 0x0032};
+ static const uint8_t expected0[] = { 0x31};
+ static const uint8_t expected[] = { 0x31, 0x1a};
+ static const uint8_t expected2[] = { 0x31, 0x1a, 0x32};
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /*SBCS*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-920", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-920 [UCNV_SBCS] \n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected0, sizeof(expected0), "ibm-920", 0, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-920 [UCNV_SBCS] \n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "ibm-920", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-920 [UCNV_SBCS] did not match\n");
+#endif
+
+ /*LATIN_1*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "LATIN_1", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> LATIN_1 is supposed to fail\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected0, sizeof(expected0), "LATIN_1", 0, FALSE, U_ZERO_ERROR))
+ log_err("u-> LATIN_1 is supposed to fail\n");
+
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "LATIN_1", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> LATIN_1 did not match\n");
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ log_verbose("Testing for DBCS and MBCS\n");
+ {
+ static const UChar sampleText[] = { 0x00a1, 0xd801};
+ static const uint8_t expected[] = { 0xa2, 0xae};
+ static const int32_t offsets[] = { 0x00, 0x00};
+ static const uint8_t expectedSUB[] = { 0xa2, 0xae, 0xa1, 0xe0};
+ static const int32_t offsetsSUB[] = { 0x00, 0x00, 0x01, 0x01};
+
+ static const UChar sampleText2[] = { 0x00a1, 0xd801, 0x00a4};
+ static const uint8_t expected2[] = { 0xa2, 0xae, 0xa1, 0xe0, 0xa2, 0xb4};
+ static const int32_t offsets2[] = { 0x00, 0x00, 0x01, 0x01, 0x02, 0x02};
+
+ static const UChar sampleText3MBCS[] = { 0x0001, 0x00a4, 0xdc01};
+ static const uint8_t expected3MBCS[] = { 0x01, 0xa2, 0xb4, 0xa1, 0xe0};
+ static const int32_t offsets3MBCS[] = { 0x00, 0x01, 0x01, 0x02, 0x02};
+
+ static const UChar sampleText4MBCS[] = { 0x0061, 0xFFE4, 0xdc01};
+ static const uint8_t expected4MBCS[] = { 0x61, 0x8f, 0xa2, 0xc3, 0xf4, 0xfe};
+ static const int32_t offsets4MBCS[] = { 0x00, 0x01, 0x01, 0x01, 0x02, 0x02 };
+
+ /*DBCS*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedSUB, sizeof(expectedSUB), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", 0, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
+
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedSUB, sizeof(expectedSUB), "ibm-1363", offsetsSUB, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", offsets, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
+
+
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] did not match \n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "ibm-1363", offsets2, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] did not match \n");
+
+ /*MBCS*/
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedSUB, sizeof(expectedSUB), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", 0, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "ibm-1363", 0, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "ibm-1363", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_DBCS] did not match\n");
+
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "ibm-1363", offsets3MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "ibm-1363", offsets3MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "euc-jp", offsets4MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u-> euc-jp [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "euc-jp", offsets4MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> euc-jp [UCNV_MBCS] \n");
+ }
+
+ /*iso-2022-jp*/
+ log_verbose("Testing for iso-2022-jp\n");
+ {
+ static const UChar sampleText[] = { 0x0031, 0xd801};
+ static const uint8_t expected[] = { 0x31};
+ static const uint8_t expectedSUB[] = { 0x31, 0x1a};
+ static const int32_t offsets[] = { 0x00, 1};
+
+ static const UChar sampleText2[] = { 0x0031, 0xd801, 0x0032};
+ static const uint8_t expected2[] = { 0x31,0x1A,0x32};
+ static const int32_t offsets2[] = { 0x00,0x01,0x02};
+
+ static const UChar sampleText4MBCS[] = { 0x0061, 0x4e00, 0xdc01};
+ static const uint8_t expected4MBCS[] = { 0x61, 0x1b, 0x24, 0x42, 0x30, 0x6c,0x1b,0x28,0x42,0x1a};
+ static const int32_t offsets4MBCS[] = { 0x00, 0x01, 0x01 ,0x01, 0x01, 0x01,0x02,0x02,0x02,0x02 };
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedSUB, sizeof(expectedSUB), "iso-2022-jp", offsets, TRUE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-jp [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-jp", offsets, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-jp", offsets2, TRUE, U_ZERO_ERROR))
+ log_err("u->iso-2022-jp[UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-jp", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-jp [UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-jp", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-jp [UCNV_DBCS] did not match\n");
+
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "iso-2022-jp", offsets4MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-jp [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "iso-2022-jp", offsets4MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-jp [UCNV_MBCS] \n");
+ }
+
+ /*iso-2022-cn*/
+ log_verbose("Testing for iso-2022-cn\n");
+ {
+ static const UChar sampleText[] = { 0x0031, 0xd801};
+ static const uint8_t expected[] = { 0x31};
+ static const uint8_t expectedSUB[] = { 0x31, 0x1A};
+ static const int32_t offsets[] = { 0x00, 1};
+
+ static const UChar sampleText2[] = { 0x0031, 0xd801, 0x0032};
+ static const uint8_t expected2[] = { 0x31, 0x1A,0x32};
+ static const int32_t offsets2[] = { 0x00, 0x01,0x02};
+
+ static const UChar sampleText3MBCS[] = { 0x0051, 0x0050, 0xdc01};
+ static const uint8_t expected3MBCS[] = {0x51, 0x50, 0x1A};
+ static const int32_t offsets3MBCS[] = { 0x00, 0x01, 0x02 };
+
+ static const UChar sampleText4MBCS[] = { 0x0061, 0x4e00, 0xdc01};
+ static const uint8_t expected4MBCS[] = { 0x61, 0x1b, 0x24, 0x29, 0x41, 0x0e, 0x52, 0x3b, 0x0f, 0x1a };
+ static const int32_t offsets4MBCS[] = { 0x00, 0x01, 0x01 ,0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02 };
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedSUB, sizeof(expectedSUB), "iso-2022-cn", offsets, TRUE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-cn [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-cn", offsets, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-cn", offsets2, TRUE, U_ZERO_ERROR))
+ log_err("u->iso-2022-cn[UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-cn", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-cn [UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-cn", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-cn [UCNV_DBCS] did not match\n");
+
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "iso-2022-cn", offsets3MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u->iso-2022-cn [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "iso-2022-cn", offsets3MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-cn[UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "iso-2022-cn", offsets4MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-cn [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "iso-2022-cn", offsets4MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-cn [UCNV_MBCS] \n");
+ }
+
+ /*iso-2022-kr*/
+ log_verbose("Testing for iso-2022-kr\n");
+ {
+ static const UChar sampleText[] = { 0x0031, 0xd801};
+ static const uint8_t expected[] = { 0x1b, 0x24, 0x29, 0x43, 0x31};
+ static const uint8_t expectedSUB[] = { 0x1b, 0x24, 0x29, 0x43, 0x31, 0x1A};
+ static const int32_t offsets[] = { -1, -1, -1, -1, 0x00, 1};
+
+ static const UChar sampleText2[] = { 0x0031, 0xd801, 0x0032};
+ static const uint8_t expected2[] = { 0x1b, 0x24, 0x29, 0x43, 0x31, 0x1A, 0x32};
+ static const int32_t offsets2[] = { -1, -1, -1, -1, 0x00, 0x01, 0x02};
+
+ static const UChar sampleText3MBCS[] = { 0x0051, 0x0050, 0xdc01};
+ static const uint8_t expected3MBCS[] = { 0x1b, 0x24, 0x29, 0x43, 0x51, 0x50, 0x1A };
+ static const int32_t offsets3MBCS[] = { -1, -1, -1, -1, 0x00, 0x01, 0x02, 0x02 };
+
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedSUB, sizeof(expectedSUB), "iso-2022-kr", offsets, TRUE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-kr [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-kr", offsets, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-kr", offsets2, TRUE, U_ZERO_ERROR))
+ log_err("u->iso-2022-kr[UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-kr", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-kr [UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "iso-2022-kr", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-kr [UCNV_DBCS] did not match\n");
+
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "iso-2022-kr", offsets3MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u->iso-2022-kr [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "iso-2022-kr", offsets3MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> iso-2022-kr[UCNV_MBCS] \n");
+ }
+
+ /*HZ*/
+ log_verbose("Testing for HZ\n");
+ {
+ static const UChar sampleText[] = { 0x0031, 0xd801};
+ static const uint8_t expected[] = { 0x7e, 0x7d, 0x31};
+ static const uint8_t expectedSUB[] = { 0x7e, 0x7d, 0x31, 0x1A};
+ static const int32_t offsets[] = { 0x00, 0x00, 0x00, 1};
+
+ static const UChar sampleText2[] = { 0x0031, 0xd801, 0x0032};
+ static const uint8_t expected2[] = { 0x7e, 0x7d, 0x31, 0x1A, 0x32 };
+ static const int32_t offsets2[] = { 0x00, 0x00, 0x00, 0x01, 0x02 };
+
+ static const UChar sampleText3MBCS[] = { 0x0051, 0x0050, 0xdc01};
+ static const uint8_t expected3MBCS[] = { 0x7e, 0x7d, 0x51, 0x50, 0x1A };
+ static const int32_t offsets3MBCS[] = { 0x00, 0x00, 0x00, 0x01, 0x02};
+
+ static const UChar sampleText4MBCS[] = { 0x0061, 0x4e00, 0xdc01};
+ static const uint8_t expected4MBCS[] = { 0x7e, 0x7d, 0x61, 0x7e, 0x7b, 0x52, 0x3b, 0x7e, 0x7d, 0x1a };
+ static const int32_t offsets4MBCS[] = { 0x00, 0x00, 0x00, 0x01, 0x01, 0x01 ,0x01, 0x02, 0x02, 0x02 };
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedSUB, sizeof(expectedSUB), "HZ", offsets, TRUE, U_ZERO_ERROR))
+ log_err("u-> HZ [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "HZ", offsets, FALSE, U_ZERO_ERROR))
+ log_err("u-> ibm-1363 [UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "HZ", offsets2, TRUE, U_ZERO_ERROR))
+ log_err("u->HZ[UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "HZ", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> HZ [UCNV_DBCS] did not match\n");
+ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]),
+ expected2, sizeof(expected2), "HZ", offsets2, FALSE, U_ZERO_ERROR))
+ log_err("u-> HZ [UCNV_DBCS] did not match\n");
+
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "HZ", offsets3MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u->HZ [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText3MBCS, sizeof(sampleText3MBCS)/sizeof(sampleText3MBCS[0]),
+ expected3MBCS, sizeof(expected3MBCS), "HZ", offsets3MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> HZ[UCNV_MBCS] \n");
+
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "HZ", offsets4MBCS, TRUE, U_ZERO_ERROR))
+ log_err("u-> HZ [UCNV_MBCS] \n");
+ if(!convertFromU(sampleText4MBCS, sizeof(sampleText4MBCS)/sizeof(sampleText4MBCS[0]),
+ expected4MBCS, sizeof(expected4MBCS), "HZ", offsets4MBCS, FALSE, U_ZERO_ERROR))
+ log_err("u-> HZ [UCNV_MBCS] \n");
+ }
+#endif
+}
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+/*test different convertToUnicode error behaviours*/
+static void TestToUnicodeErrorBehaviour()
+{
+ log_verbose("Testing error conditions for DBCS\n");
+ {
+ uint8_t sampleText[] = { 0xa2, 0xae, 0x03, 0x04};
+ const UChar expected[] = { 0x00a1 };
+
+ if(!convertToU(sampleText, sizeof(sampleText),
+ expected, sizeof(expected)/sizeof(expected[0]), "ibm-1363", 0, TRUE, U_ZERO_ERROR ))
+ log_err("DBCS (ibm-1363)->Unicode did not match.\n");
+ if(!convertToU(sampleText, sizeof(sampleText),
+ expected, sizeof(expected)/sizeof(expected[0]), "ibm-1363", 0, FALSE, U_ZERO_ERROR ))
+ log_err("DBCS (ibm-1363)->Unicode with flush = false did not match.\n");
+ }
+ log_verbose("Testing error conditions for SBCS\n");
+ {
+ uint8_t sampleText[] = { 0xa2, 0xFF};
+ const UChar expected[] = { 0x00c2 };
+
+ /* uint8_t sampleText2[] = { 0xa2, 0x70 };
+ const UChar expected2[] = { 0x0073 };*/
+
+ if(!convertToU(sampleText, sizeof(sampleText),
+ expected, sizeof(expected)/sizeof(expected[0]), "ibm-1051", 0, TRUE, U_ZERO_ERROR ))
+ log_err("SBCS (ibm-1051)->Unicode did not match.\n");
+ if(!convertToU(sampleText, sizeof(sampleText),
+ expected, sizeof(expected)/sizeof(expected[0]), "ibm-1051", 0, FALSE, U_ZERO_ERROR ))
+ log_err("SBCS (ibm-1051)->Unicode with flush = false did not match.\n");
+
+ }
+}
+
+static void TestGetNextErrorBehaviour(){
+ /*Test for unassigned character*/
+#define INPUT_SIZE 1
+ static const char input1[INPUT_SIZE]={ 0x70 };
+ const char* source=(const char*)input1;
+ UErrorCode err=U_ZERO_ERROR;
+ UChar32 c=0;
+ UConverter *cnv=ucnv_open("ibm-424", &err);
+ if(U_FAILURE(err)) {
+ log_data_err("Unable to open a SBCS(ibm-424) converter: %s\n", u_errorName(err));
+ return;
+ }
+ c=ucnv_getNextUChar(cnv, &source, source + INPUT_SIZE, &err);
+ if(err != U_INVALID_CHAR_FOUND && c!=0xfffd){
+ log_err("FAIL in TestGetNextErrorBehaviour(unassigned): Expected: U_INVALID_CHAR_ERROR or 0xfffd ----Got:%s and 0x%lx\n", myErrorName(err), c);
+ }
+ ucnv_close(cnv);
+}
+#endif
+
+#define MAX_UTF16_LEN 2
+#define MAX_UTF8_LEN 4
+
+/*Regression test for utf8 converter*/
+static void TestRegressionUTF8(){
+ UChar32 currCh = 0;
+ int32_t offset8;
+ int32_t offset16;
+ UChar *standardForm = (UChar*)malloc(MAX_LENGTH*sizeof(UChar));
+ uint8_t *utf8 = (uint8_t*)malloc(MAX_LENGTH);
+
+ while (currCh <= UNICODE_LIMIT) {
+ offset16 = 0;
+ offset8 = 0;
+ while(currCh <= UNICODE_LIMIT
+ && offset16 < (MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN)
+ && offset8 < (MAX_LENGTH - MAX_UTF8_LEN))
+ {
+ if (currCh == SURROGATE_HIGH_START) {
+ currCh = SURROGATE_LOW_END + 1; /* Skip surrogate range */
+ }
+ UTF16_APPEND_CHAR_SAFE(standardForm, offset16, MAX_LENGTH, currCh);
+ UTF8_APPEND_CHAR_SAFE(utf8, offset8, MAX_LENGTH, currCh);
+ currCh++;
+ }
+ if(!convertFromU(standardForm, offset16,
+ utf8, offset8, "UTF8", 0, TRUE, U_ZERO_ERROR )) {
+ log_err("Unicode->UTF8 did not match.\n");
+ }
+ if(!convertToU(utf8, offset8,
+ standardForm, offset16, "UTF8", 0, TRUE, U_ZERO_ERROR )) {
+ log_err("UTF8->Unicode did not match.\n");
+ }
+ }
+
+ free(standardForm);
+ free(utf8);
+
+ {
+ static const char src8[] = { (char)0xCC, (char)0x81, (char)0xCC, (char)0x80 };
+ static const UChar expected[] = { 0x0301, 0x0300 };
+ UConverter *conv8;
+ UErrorCode err = U_ZERO_ERROR;
+ UChar pivotBuffer[100];
+ const UChar* const pivEnd = pivotBuffer + 100;
+ const char* srcBeg;
+ const char* srcEnd;
+ UChar* pivBeg;
+
+ conv8 = ucnv_open("UTF-8", &err);
+
+ srcBeg = src8;
+ pivBeg = pivotBuffer;
+ srcEnd = src8 + 3;
+ ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err);
+ if (srcBeg != srcEnd) {
+ log_err("Did not consume whole buffer on first call.\n");
+ }
+
+ srcEnd = src8 + 4;
+ ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err);
+ if (srcBeg != srcEnd) {
+ log_err("Did not consume whole buffer on second call.\n");
+ }
+
+ if (U_FAILURE(err) || (int32_t)(pivBeg - pivotBuffer) != 2 || u_strncmp(pivotBuffer, expected, 2) != 0) {
+ log_err("Did not get expected results for UTF-8.\n");
+ }
+ ucnv_close(conv8);
+ }
+}
+
+#define MAX_UTF32_LEN 1
+
+static void TestRegressionUTF32(){
+ UChar32 currCh = 0;
+ int32_t offset32;
+ int32_t offset16;
+ UChar *standardForm = (UChar*)malloc(MAX_LENGTH*sizeof(UChar));
+ UChar32 *utf32 = (UChar32*)malloc(MAX_LENGTH*sizeof(UChar32));
+
+ while (currCh <= UNICODE_LIMIT) {
+ offset16 = 0;
+ offset32 = 0;
+ while(currCh <= UNICODE_LIMIT
+ && offset16 < (MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN)
+ && offset32 < (MAX_LENGTH/sizeof(UChar32) - MAX_UTF32_LEN))
+ {
+ if (currCh == SURROGATE_HIGH_START) {
+ currCh = SURROGATE_LOW_END + 1; /* Skip surrogate range */
+ }
+ UTF16_APPEND_CHAR_SAFE(standardForm, offset16, MAX_LENGTH, currCh);
+ UTF32_APPEND_CHAR_SAFE(utf32, offset32, MAX_LENGTH, currCh);
+ currCh++;
+ }
+ if(!convertFromU(standardForm, offset16,
+ (const uint8_t *)utf32, offset32*sizeof(UChar32), "UTF32_PlatformEndian", 0, TRUE, U_ZERO_ERROR )) {
+ log_err("Unicode->UTF32 did not match.\n");
+ }
+ if(!convertToU((const uint8_t *)utf32, offset32*sizeof(UChar32),
+ standardForm, offset16, "UTF32_PlatformEndian", 0, TRUE, U_ZERO_ERROR )) {
+ log_err("UTF32->Unicode did not match.\n");
+ }
+ }
+ free(standardForm);
+ free(utf32);
+
+ {
+ /* Check for lone surrogate error handling. */
+ static const UChar sampleBadStartSurrogate[] = { 0x0031, 0xD800, 0x0032 };
+ static const UChar sampleBadEndSurrogate[] = { 0x0031, 0xDC00, 0x0032 };
+ static const uint8_t expectedUTF32BE[] = {
+ 0x00, 0x00, 0x00, 0x31,
+ 0x00, 0x00, 0xff, 0xfd,
+ 0x00, 0x00, 0x00, 0x32
+ };
+ static const uint8_t expectedUTF32LE[] = {
+ 0x31, 0x00, 0x00, 0x00,
+ 0xfd, 0xff, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x00
+ };
+ static const int32_t offsetsUTF32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x01,
+ 0x02, 0x02, 0x02, 0x02
+ };
+
+ if(!convertFromU(sampleBadStartSurrogate, sizeof(sampleBadStartSurrogate)/sizeof(sampleBadStartSurrogate[0]),
+ expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+ log_err("u->UTF-32BE\n");
+ if(!convertFromU(sampleBadEndSurrogate, sizeof(sampleBadEndSurrogate)/sizeof(sampleBadEndSurrogate[0]),
+ expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+ log_err("u->UTF-32BE\n");
+
+ if(!convertFromU(sampleBadStartSurrogate, sizeof(sampleBadStartSurrogate)/sizeof(sampleBadStartSurrogate[0]),
+ expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+ log_err("u->UTF-32LE\n");
+ if(!convertFromU(sampleBadEndSurrogate, sizeof(sampleBadEndSurrogate)/sizeof(sampleBadEndSurrogate[0]),
+ expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+ log_err("u->UTF-32LE\n");
+ }
+
+ {
+ static const char srcBE[] = { 0, 0, 0, 0x31, 0, 0, 0, 0x30 };
+ static const UChar expected[] = { 0x0031, 0x0030 };
+ UConverter *convBE;
+ UErrorCode err = U_ZERO_ERROR;
+ UChar pivotBuffer[100];
+ const UChar* const pivEnd = pivotBuffer + 100;
+ const char* srcBeg;
+ const char* srcEnd;
+ UChar* pivBeg;
+
+ convBE = ucnv_open("UTF-32BE", &err);
+
+ srcBeg = srcBE;
+ pivBeg = pivotBuffer;
+ srcEnd = srcBE + 5;
+ ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err);
+ if (srcBeg != srcEnd) {
+ log_err("Did not consume whole buffer on first call.\n");
+ }
+
+ srcEnd = srcBE + 8;
+ ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err);
+ if (srcBeg != srcEnd) {
+ log_err("Did not consume whole buffer on second call.\n");
+ }
+
+ if (U_FAILURE(err) || (int32_t)(pivBeg - pivotBuffer) != 2 || u_strncmp(pivotBuffer, expected, 2) != 0) {
+ log_err("Did not get expected results for UTF-32BE.\n");
+ }
+ ucnv_close(convBE);
+ }
+ {
+ static const char srcLE[] = { 0x31, 0, 0, 0, 0x30, 0, 0, 0 };
+ static const UChar expected[] = { 0x0031, 0x0030 };
+ UConverter *convLE;
+ UErrorCode err = U_ZERO_ERROR;
+ UChar pivotBuffer[100];
+ const UChar* const pivEnd = pivotBuffer + 100;
+ const char* srcBeg;
+ const char* srcEnd;
+ UChar* pivBeg;
+
+ convLE = ucnv_open("UTF-32LE", &err);
+
+ srcBeg = srcLE;
+ pivBeg = pivotBuffer;
+ srcEnd = srcLE + 5;
+ ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err);
+ if (srcBeg != srcEnd) {
+ log_err("Did not consume whole buffer on first call.\n");
+ }
+
+ srcEnd = srcLE + 8;
+ ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err);
+ if (srcBeg != srcEnd) {
+ log_err("Did not consume whole buffer on second call.\n");
+ }
+
+ if (U_FAILURE(err) || (int32_t)(pivBeg - pivotBuffer) != 2 || u_strncmp(pivotBuffer, expected, 2) != 0) {
+ log_err("Did not get expected results for UTF-32LE.\n");
+ }
+ ucnv_close(convLE);
+ }
+}
+
+/*Walk through the available converters*/
+static void TestAvailableConverters(){
+ UErrorCode status=U_ZERO_ERROR;
+ UConverter *conv=NULL;
+ int32_t i=0;
+ for(i=0; i < ucnv_countAvailable(); i++){
+ status=U_ZERO_ERROR;
+ conv=ucnv_open(ucnv_getAvailableName(i), &status);
+ if(U_FAILURE(status)){
+ log_err("ERROR: converter creation failed. Failure in alias table or the data table for \n converter=%s. Error=%s\n",
+ ucnv_getAvailableName(i), myErrorName(status));
+ continue;
+ }
+ ucnv_close(conv);
+ }
+
+}
+
+static void TestFlushInternalBuffer(){
+ TestWithBufferSize(MAX_LENGTH, 1);
+ TestWithBufferSize(1, 1);
+ TestWithBufferSize(1, MAX_LENGTH);
+ TestWithBufferSize(MAX_LENGTH, MAX_LENGTH);
+}
+
+static void TestWithBufferSize(int32_t insize, int32_t outsize){
+
+ gInBufferSize =insize;
+ gOutBufferSize = outsize;
+
+ log_verbose("Testing fromUnicode for UTF-8 with UCNV_TO_U_CALLBACK_SUBSTITUTE \n");
+ {
+ UChar sampleText[] =
+ { 0x0031, 0x0032, 0x0033, 0x0000, 0x4e00, 0x4e8c, 0x4e09, 0x002E };
+ const uint8_t expectedUTF8[] =
+ { 0x31, 0x32, 0x33, 0x00, 0xe4, 0xb8, 0x80, 0xe4, 0xba, 0x8c, 0xe4, 0xb8, 0x89, 0x2E };
+ int32_t toUTF8Offs[] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x07};
+ /* int32_t fmUTF8Offs[] =
+ { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0007, 0x000a, 0x000d };*/
+
+ /*UTF-8*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedUTF8, sizeof(expectedUTF8), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE, toUTF8Offs ,FALSE))
+ log_err("u-> UTF8 did not match.\n");
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ log_verbose("Testing fromUnicode with UCNV_FROM_U_CALLBACK_ESCAPE \n");
+ {
+ UChar inputTest[] = { 0x0061, 0xd801, 0xdc01, 0xd801, 0x0061 };
+ const uint8_t toIBM943[]= { 0x61,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x43, 0x30, 0x31,
+ 0x25, 0x55, 0x44, 0x38, 0x30, 0x31,
+ 0x61 };
+ int32_t offset[]= {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 4};
+
+ if(!testConvertFromU(inputTest, sizeof(inputTest)/sizeof(inputTest[0]),
+ toIBM943, sizeof(toIBM943), "ibm-943",
+ (UConverterFromUCallback)UCNV_FROM_U_CALLBACK_ESCAPE, offset,FALSE))
+ log_err("u-> ibm-943 with subst with value did not match.\n");
+ }
+#endif
+
+ log_verbose("Testing fromUnicode for UTF-8 with UCNV_TO_U_CALLBACK_SUBSTITUTE \n");
+ {
+ const uint8_t sampleText1[] = { 0x31, 0xe4, 0xba, 0x8c,
+ 0xe0, 0x80, 0x61};
+ UChar expected1[] = { 0x0031, 0x4e8c, 0xfffd, 0x0061};
+ int32_t offsets1[] = { 0x0000, 0x0001, 0x0004, 0x0006};
+
+ if(!testConvertToU(sampleText1, sizeof(sampleText1),
+ expected1, sizeof(expected1)/sizeof(expected1[0]),"utf8", UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1,FALSE))
+ log_err("utf8->u with substitute did not match.\n");;
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_ESCAPE \n");
+ /*to Unicode*/
+ {
+ const uint8_t sampleTxtToU[]= { 0x00, 0x9f, 0xaf,
+ 0x81, 0xad, /*unassigned*/
+ 0x89, 0xd3 };
+ UChar IBM_943toUnicode[] = { 0x0000, 0x6D63,
+ 0x25, 0x58, 0x38, 0x31, 0x25, 0x58, 0x41, 0x44,
+ 0x7B87};
+ int32_t fromIBM943Offs [] = { 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5};
+
+ if(!testConvertToU(sampleTxtToU, sizeof(sampleTxtToU),
+ IBM_943toUnicode, sizeof(IBM_943toUnicode)/sizeof(IBM_943toUnicode[0]),"ibm-943",
+ (UConverterToUCallback)UCNV_TO_U_CALLBACK_ESCAPE, fromIBM943Offs,FALSE))
+ log_err("ibm-943->u with substitute with value did not match.\n");
+
+ }
+#endif
+}
+
+static UBool convertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, const int32_t *expectOffsets, UBool doFlush, UErrorCode expectedStatus)
+{
+
+ int32_t i=0;
+ char *p=0;
+ const UChar *src;
+ char buffer[MAX_LENGTH];
+ int32_t offsetBuffer[MAX_LENGTH];
+ int32_t *offs=0;
+ char *targ;
+ char *targetLimit;
+ UChar *sourceLimit=0;
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",codepage);
+ return TRUE;
+ }
+ log_verbose("Converter %s opened..\n", ucnv_getName(conv, &status));
+
+ for(i=0; i<MAX_LENGTH; i++){
+ buffer[i]=(char)0xF0;
+ offsetBuffer[i]=0xFF;
+ }
+
+ src=source;
+ sourceLimit=(UChar*)src+(sourceLen);
+ targ=buffer;
+ targetLimit=targ+MAX_LENGTH;
+ offs=offsetBuffer;
+ ucnv_fromUnicode (conv,
+ (char **)&targ,
+ (const char *)targetLimit,
+ &src,
+ sourceLimit,
+ expectOffsets ? offs : NULL,
+ doFlush,
+ &status);
+ ucnv_close(conv);
+ if(status != expectedStatus){
+ log_err("ucnv_fromUnicode() failed for codepage=%s. Error =%s Expected=%s\n", codepage, myErrorName(status), myErrorName(expectedStatus));
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
+ sourceLen, targ-buffer);
+
+ if(expectLen != targ-buffer)
+ {
+ log_err("Expected %d chars out, got %d FROM Unicode to %s\n", expectLen, targ-buffer, codepage);
+ log_verbose("Expected %d chars out, got %d FROM Unicode to %s\n", expectLen, targ-buffer, codepage);
+ printSeqErr((const unsigned char *)buffer, (int32_t)(targ-buffer));
+ printSeqErr((const unsigned char*)expect, expectLen);
+ return FALSE;
+ }
+
+ if(memcmp(buffer, expect, expectLen)){
+ log_err("String does not match. FROM Unicode to codePage%s\n", codepage);
+ log_info("\nGot:");
+ printSeqErr((const unsigned char *)buffer, expectLen);
+ log_info("\nExpected:");
+ printSeqErr((const unsigned char *)expect, expectLen);
+ return FALSE;
+ }
+ else {
+ log_verbose("Matches!\n");
+ }
+
+ if (expectOffsets != 0){
+ log_verbose("comparing %d offsets..\n", targ-buffer);
+ if(memcmp(offsetBuffer,expectOffsets,(targ-buffer) * sizeof(int32_t) )){
+ log_err("did not get the expected offsets. for FROM Unicode to %s\n", codepage);
+ log_info("\nGot : ");
+ printSeqErr((const unsigned char*)buffer, (int32_t)(targ-buffer));
+ for(p=buffer;p<targ;p++)
+ log_info("%d, ", offsetBuffer[p-buffer]);
+ log_info("\nExpected: ");
+ for(i=0; i< (targ-buffer); i++)
+ log_info("%d,", expectOffsets[i]);
+ }
+ }
+
+ return TRUE;
+}
+
+
+static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expect, int expectLen,
+ const char *codepage, const int32_t *expectOffsets, UBool doFlush, UErrorCode expectedStatus)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ int32_t i=0;
+ UChar *p=0;
+ const char* src;
+ UChar buffer[MAX_LENGTH];
+ int32_t offsetBuffer[MAX_LENGTH];
+ int32_t *offs=0;
+ UChar *targ;
+ UChar *targetLimit;
+ uint8_t *sourceLimit=0;
+
+
+
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",codepage);
+ return TRUE;
+ }
+ log_verbose("Converter %s opened..\n", ucnv_getName(conv, &status));
+
+
+
+ for(i=0; i<MAX_LENGTH; i++){
+ buffer[i]=0xFFFE;
+ offsetBuffer[i]=-1;
+ }
+
+ src=(const char *)source;
+ sourceLimit=(uint8_t*)(src+(sourceLen));
+ targ=buffer;
+ targetLimit=targ+MAX_LENGTH;
+ offs=offsetBuffer;
+
+
+
+ ucnv_toUnicode (conv,
+ &targ,
+ targetLimit,
+ (const char **)&src,
+ (const char *)sourceLimit,
+ expectOffsets ? offs : NULL,
+ doFlush,
+ &status);
+
+ ucnv_close(conv);
+ if(status != expectedStatus){
+ log_err("ucnv_fromUnicode() failed for codepage=%s. Error =%s Expected=%s\n", codepage, myErrorName(status), myErrorName(expectedStatus));
+ return FALSE;
+ }
+ log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
+ sourceLen, targ-buffer);
+
+
+
+
+ log_verbose("comparing %d uchars (%d bytes)..\n",expectLen,expectLen*2);
+
+ if (expectOffsets != 0) {
+ if(memcmp(offsetBuffer, expectOffsets, (targ-buffer) * sizeof(int32_t))){
+
+ log_err("did not get the expected offsets from %s To UNICODE\n", codepage);
+ log_info("\nGot : ");
+ for(p=buffer;p<targ;p++)
+ log_info("%d, ", offsetBuffer[p-buffer]);
+ log_info("\nExpected: ");
+ for(i=0; i<(targ-buffer); i++)
+ log_info("%d, ", expectOffsets[i]);
+ log_info("\nGot result:");
+ for(i=0; i<(targ-buffer); i++)
+ log_info("0x%04X,", buffer[i]);
+ log_info("\nFrom Input:");
+ for(i=0; i<(src-(const char *)source); i++)
+ log_info("0x%02X,", (unsigned char)source[i]);
+ log_info("\n");
+ }
+ }
+ if(memcmp(buffer, expect, expectLen*2)){
+ log_err("String does not match. from codePage %s TO Unicode\n", codepage);
+ log_info("\nGot:");
+ printUSeqErr(buffer, expectLen);
+ log_info("\nExpected:");
+ printUSeqErr(expect, expectLen);
+ return FALSE;
+ }
+ else {
+ log_verbose("Matches!\n");
+ }
+
+ return TRUE;
+}
+
+
+static UBool testConvertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, UConverterFromUCallback callback , const int32_t *expectOffsets, UBool testReset)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ char junkout[MAX_LENGTH]; /* FIX */
+ int32_t junokout[MAX_LENGTH]; /* FIX */
+ char *p;
+ const UChar *src;
+ char *end;
+ char *targ;
+ int32_t *offs;
+ int i;
+ int32_t realBufferSize;
+ char *realBufferEnd;
+ const UChar *realSourceEnd;
+ const UChar *sourceLimit;
+ UBool checkOffsets = TRUE;
+ UBool doFlush;
+
+ UConverterFromUCallback oldAction = NULL;
+ const void* oldContext = NULL;
+
+ for(i=0;i<MAX_LENGTH;i++)
+ junkout[i] = (char)0xF0;
+ for(i=0;i<MAX_LENGTH;i++)
+ junokout[i] = 0xFF;
+
+ setNuConvTestName(codepage, "FROM");
+
+ log_verbose("\n========= %s\n", gNuConvTestName);
+
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",codepage);
+ return TRUE;
+ }
+
+ log_verbose("Converter opened..\n");
+ /*----setting the callback routine----*/
+ ucnv_setFromUCallBack (conv, callback, NULL, &oldAction, &oldContext, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ /*------------------------*/
+
+ src = source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = source + sourceLen;
+
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != MAX_LENGTH )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min(targ + gOutBufferSize, realBufferEnd);
+ sourceLimit = nct_min(src + gInBufferSize, realSourceEnd);
+
+ doFlush = (UBool)(sourceLimit == realSourceEnd);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+
+
+ status = U_ZERO_ERROR;
+ if(gInBufferSize ==999 && gOutBufferSize==999)
+ doFlush = FALSE;
+ ucnv_fromUnicode (conv,
+ (char **)&targ,
+ (const char *)end,
+ &src,
+ sourceLimit,
+ offs,
+ doFlush, /* flush if we're at the end of the input data */
+ &status);
+ if(testReset)
+ ucnv_resetToUnicode(conv);
+ if(gInBufferSize ==999 && gOutBufferSize==999)
+ ucnv_resetToUnicode(conv);
+
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && sourceLimit < realSourceEnd) );
+
+ if(U_FAILURE(status)) {
+ log_err("Problem doing fromUnicode to %s, errcode %s %s\n", codepage, myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
+ sourceLen, targ-junkout);
+ if(VERBOSITY)
+ {
+ char junk[999];
+ char offset_str[999];
+ char *ptr;
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+ for(ptr = junkout;ptr<targ;ptr++)
+ {
+ sprintf(junk + strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*ptr);
+ sprintf(offset_str + strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[ptr-junkout]);
+ }
+
+ log_verbose(junk);
+ printSeq((const unsigned char *)expect, expectLen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+
+ if(expectLen != targ-junkout)
+ {
+ log_err("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ log_info("\nGot:");
+ printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
+ log_info("\nExpected:");
+ printSeqErr((const unsigned char*)expect, expectLen);
+ return FALSE;
+ }
+
+ if (checkOffsets && (expectOffsets != 0) )
+ {
+ log_verbose("comparing %d offsets..\n", targ-junkout);
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t) )){
+ log_err("did not get the expected offsets. %s", gNuConvTestName);
+ log_err("Got : ");
+ printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
+ for(p=junkout;p<targ;p++)
+ log_err("%d, ", junokout[p-junkout]);
+ log_err("\nExpected: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("%d,", expectOffsets[i]);
+ }
+ }
+
+ log_verbose("comparing..\n");
+ if(!memcmp(junkout, expect, expectLen))
+ {
+ log_verbose("Matches!\n");
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ printUSeqErr(source, sourceLen);
+ log_info("\nGot:");
+ printSeqErr((const unsigned char *)junkout, expectLen);
+ log_info("\nExpected:");
+ printSeqErr((const unsigned char *)expect, expectLen);
+
+ return FALSE;
+ }
+}
+
+static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets, UBool testReset)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ UChar junkout[MAX_LENGTH]; /* FIX */
+ int32_t junokout[MAX_LENGTH]; /* FIX */
+ const char *src;
+ const char *realSourceEnd;
+ const char *srcLimit;
+ UChar *p;
+ UChar *targ;
+ UChar *end;
+ int32_t *offs;
+ int i;
+ UBool checkOffsets = TRUE;
+ int32_t realBufferSize;
+ UChar *realBufferEnd;
+ UBool doFlush;
+
+ UConverterToUCallback oldAction = NULL;
+ const void* oldContext = NULL;
+
+
+ for(i=0;i<MAX_LENGTH;i++)
+ junkout[i] = 0xFFFE;
+
+ for(i=0;i<MAX_LENGTH;i++)
+ junokout[i] = -1;
+
+ setNuConvTestName(codepage, "TO");
+
+ log_verbose("\n========= %s\n", gNuConvTestName);
+
+ conv = ucnv_open(codepage, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",gNuConvTestName);
+ return TRUE;
+ }
+
+ log_verbose("Converter opened..\n");
+ /*----setting the callback routine----*/
+ ucnv_setToUCallBack (conv, callback, NULL, &oldAction, &oldContext, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAILURE in setting the callback Function! %s\n", myErrorName(status));
+ }
+ /*-------------------------------------*/
+
+ src = (const char *)source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = src + sourcelen;
+
+ if ( gOutBufferSize != realBufferSize )
+ checkOffsets = FALSE;
+
+ if( gInBufferSize != MAX_LENGTH )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min( targ + gOutBufferSize, realBufferEnd);
+ srcLimit = nct_min(realSourceEnd, src + gInBufferSize);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
+ return FALSE;
+ }
+ log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
+
+ /* oldTarg = targ; */
+
+ status = U_ZERO_ERROR;
+ doFlush=(UBool)((gInBufferSize ==999 && gOutBufferSize==999)?(srcLimit == realSourceEnd) : FALSE);
+
+ ucnv_toUnicode (conv,
+ &targ,
+ end,
+ (const char **)&src,
+ (const char *)srcLimit,
+ offs,
+ doFlush, /* flush if we're at the end of hte source data */
+ &status);
+ if(testReset)
+ ucnv_resetFromUnicode(conv);
+ if(gInBufferSize ==999 && gOutBufferSize==999)
+ ucnv_resetToUnicode(conv);
+ /* offs += (targ-oldTarg); */
+
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && (srcLimit < realSourceEnd)) ); /* while we just need another buffer */
+
+ if(U_FAILURE(status))
+ {
+ log_err("Problem doing %s toUnicode, errcode %s %s\n", codepage, myErrorName(status), gNuConvTestName);
+ return FALSE;
+ }
+
+ log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
+ sourcelen, targ-junkout);
+ if(VERBOSITY)
+ {
+ char junk[999];
+ char offset_str[999];
+
+ UChar *ptr;
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+
+ for(ptr = junkout;ptr<targ;ptr++)
+ {
+ sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*ptr);
+ sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[ptr-junkout]);
+ }
+
+ log_verbose(junk);
+
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+ log_verbose("comparing %d uchars (%d bytes)..\n",expectlen,expectlen*2);
+
+ if (checkOffsets && (expectOffsets != 0))
+ {
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t))){
+
+ log_err("did not get the expected offsets. %s",gNuConvTestName);
+ for(p=junkout;p<targ;p++)
+ log_err("%d, ", junokout[p-junkout]);
+ log_err("\nExpected: ");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("%d,", expectOffsets[i]);
+ log_err("");
+ for(i=0; i<(targ-junkout); i++)
+ log_err("%X,", junkout[i]);
+ log_err("");
+ for(i=0; i<(src-(const char *)source); i++)
+ log_err("%X,", (unsigned char)source[i]);
+ }
+ }
+
+ if(!memcmp(junkout, expect, expectlen*2))
+ {
+ log_verbose("Matches!\n");
+ return TRUE;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_verbose("String does not match. %s\n", gNuConvTestName);
+ log_info("\nGot:");
+ printUSeq(junkout, expectlen);
+ log_info("\nExpected:");
+ printUSeq(expect, expectlen);
+ return FALSE;
+ }
+}
+
+
+static void TestResetBehaviour(void){
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ log_verbose("Testing Reset for DBCS and MBCS\n");
+ {
+ static const UChar sampleText[] = {0x00a1, 0xd801, 0xdc01, 0x00a4};
+ static const uint8_t expected[] = {0xa2, 0xae, 0xa1, 0xe0, 0xa2, 0xb4};
+ static const int32_t offsets[] = {0x00, 0x00, 0x01, 0x01, 0x03, 0x03 };
+
+
+ static const UChar sampleText1[] = {0x00a1, 0x00a4, 0x00a7, 0x00a8};
+ static const uint8_t expected1[] = {0xa2, 0xae,0xA2,0xB4,0xA1,0xD7,0xA1,0xA7};
+ static const int32_t offsets1[] = { 0,2,4,6};
+
+ /*DBCS*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
+
+ if(!testConvertToU(expected1, sizeof(expected1),
+ sampleText1, sizeof(sampleText1)/sizeof(sampleText1[0]), "ibm-1363",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
+ offsets1, TRUE))
+ log_err("ibm-1363 -> did not match.\n");
+ /*MBCS*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+ log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
+
+ if(!testConvertToU(expected1, sizeof(expected1),
+ sampleText1, sizeof(sampleText1)/sizeof(sampleText1[0]), "ibm-1363",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
+ offsets1, TRUE))
+ log_err("ibm-1363 -> did not match.\n");
+
+ }
+
+ log_verbose("Testing Reset for ISO-2022-jp\n");
+ {
+ static const UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ static const uint8_t expected[] = {0x1b, 0x24, 0x42,0x30,0x6c,0x43,0x7a,0x1b,0x28,0x42,
+ 0x31,0x1A, 0x32};
+
+
+ static const int32_t offsets[] = {0,0,0,0,0,1,1,2,2,2,2,3,5 };
+
+
+ static const UChar sampleText1[] = {0x4e00, 0x04e01, 0x0031,0x001A, 0x0032};
+ static const uint8_t expected1[] = {0x1b, 0x24, 0x42,0x30,0x6c,0x43,0x7a,0x1b,0x28,0x42,
+ 0x31,0x1A, 0x32};
+ static const int32_t offsets1[] = { 3,5,10,11,12};
+
+ /*iso-2022-jp*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-jp", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+ log_err("u-> not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-jp", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> not match.\n");
+
+ if(!testConvertToU(expected1, sizeof(expected1),
+ sampleText1, sizeof(sampleText1)/sizeof(sampleText1[0]), "iso-2022-jp",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
+ offsets1, TRUE))
+ log_err("iso-2022-jp -> did not match.\n");
+
+ }
+
+ log_verbose("Testing Reset for ISO-2022-cn\n");
+ {
+ static const UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ static const uint8_t expected[] = {
+ 0x1B, 0x24, 0x29, 0x41, 0x0E, 0x52, 0x3B,
+ 0x36, 0x21,
+ 0x0f, 0x31,
+ 0x1A,
+ 0x32
+ };
+
+
+ static const int32_t offsets[] = {
+ 0, 0, 0, 0, 0, 0, 0,
+ 1, 1,
+ 2, 2,
+ 3,
+ 5, };
+
+ UChar sampleText1[] = {0x4e00, 0x04e01, 0x0031,0x001A, 0x0032};
+ static const uint8_t expected1[] = {
+ 0x1B, 0x24, 0x29, 0x41, 0x0E, 0x52, 0x3B,
+ 0x36, 0x21,
+ 0x1B, 0x24, 0x29, 0x47, 0x24, 0x22,
+ 0x0f, 0x1A,
+ 0x32
+ };
+ static const int32_t offsets1[] = { 5,7,13,16,17};
+
+ /*iso-2022-CN*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-cn", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+ log_err("u-> not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-cn", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> not match.\n");
+
+ if(!testConvertToU(expected1, sizeof(expected1),
+ sampleText1, sizeof(sampleText1)/sizeof(sampleText1[0]), "iso-2022-cn",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
+ offsets1, TRUE))
+ log_err("iso-2022-cn -> did not match.\n");
+ }
+
+ log_verbose("Testing Reset for ISO-2022-kr\n");
+ {
+ UChar sampleText[] = { 0x4e00,0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ static const uint8_t expected[] = {0x1B, 0x24, 0x29, 0x43,
+ 0x0E, 0x6C, 0x69,
+ 0x0f, 0x1A,
+ 0x0e, 0x6F, 0x4B,
+ 0x0F, 0x31,
+ 0x1A,
+ 0x32 };
+
+ static const int32_t offsets[] = {-1, -1, -1, -1,
+ 0, 0, 0,
+ 1, 1,
+ 3, 3, 3,
+ 4, 4,
+ 5,
+ 7,
+ };
+ static const UChar sampleText1[] = { 0x4e00,0x0041, 0x04e01, 0x0031, 0x0042, 0x0032};
+
+ static const uint8_t expected1[] = {0x1B, 0x24, 0x29, 0x43,
+ 0x0E, 0x6C, 0x69,
+ 0x0f, 0x41,
+ 0x0e, 0x6F, 0x4B,
+ 0x0F, 0x31,
+ 0x42,
+ 0x32 };
+
+ static const int32_t offsets1[] = {
+ 5, 8, 10,
+ 13, 14, 15
+
+ };
+ /*iso-2022-kr*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-kr", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+ log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "iso-2022-kr", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
+ if(!testConvertToU(expected1, sizeof(expected1),
+ sampleText1, sizeof(sampleText1)/sizeof(sampleText1[0]), "iso-2022-kr",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
+ offsets1, TRUE))
+ log_err("iso-2022-kr -> did not match.\n");
+ }
+
+ log_verbose("Testing Reset for HZ\n");
+ {
+ static const UChar sampleText[] = { 0x4e00, 0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032};
+
+ static const uint8_t expected[] = {0x7E, 0x7B, 0x52, 0x3B,
+ 0x7E, 0x7D, 0x1A,
+ 0x7E, 0x7B, 0x36, 0x21,
+ 0x7E, 0x7D, 0x31,
+ 0x1A,
+ 0x32 };
+
+
+ static const int32_t offsets[] = {0,0,0,0,
+ 1,1,1,
+ 3,3,3,3,
+ 4,4,4,
+ 5,
+ 7,};
+ static const UChar sampleText1[] = { 0x4e00, 0x0035, 0x04e01, 0x0031, 0x0041, 0x0032};
+
+ static const uint8_t expected1[] = {0x7E, 0x7B, 0x52, 0x3B,
+ 0x7E, 0x7D, 0x35,
+ 0x7E, 0x7B, 0x36, 0x21,
+ 0x7E, 0x7D, 0x31,
+ 0x41,
+ 0x32 };
+
+
+ static const int32_t offsets1[] = {2,6,9,13,14,15
+ };
+
+ /*hz*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "HZ", UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , TRUE))
+ log_err("u-> not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "HZ", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> not match.\n");
+ if(!testConvertToU(expected1, sizeof(expected1),
+ sampleText1, sizeof(sampleText1)/sizeof(sampleText1[0]), "hz",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
+ offsets1, TRUE))
+ log_err("hz -> did not match.\n");
+ }
+#endif
+
+ /*UTF-8*/
+ log_verbose("Testing for UTF8\n");
+ {
+ static const UChar sampleText[] = { 0x4e00, 0x0701, 0x0031, 0xbfc1, 0xd801, 0xdc01, 0x0032};
+ int32_t offsets[]={0x00, 0x00, 0x00, 0x01, 0x01, 0x02,
+ 0x03, 0x03, 0x03, 0x04, 0x04, 0x04,
+ 0x04, 0x06 };
+ static const uint8_t expected[] = {0xe4, 0xb8, 0x80, 0xdc, 0x81, 0x31,
+ 0xeb, 0xbf, 0x81, 0xF0, 0x90, 0x90, 0x81, 0x32};
+
+
+ static const int32_t fromOffsets[] = { 0x0000, 0x0003, 0x0005, 0x0006, 0x0009, 0x0009, 0x000D };
+ /*UTF-8*/
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , TRUE))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+ if(!testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , TRUE))
+ log_err("u-> UTF8 with offsets and flush true did not match.\n");
+ if(!testConvertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8",UCNV_TO_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+ log_err("UTF8 -> did not match.\n");
+ if(!testConvertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", UCNV_TO_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+ log_err("UTF8 -> did not match.\n");
+ if(!testConvertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8",UCNV_TO_U_CALLBACK_SUBSTITUTE , fromOffsets, TRUE))
+ log_err("UTF8 -> did not match.\n");
+ if(!testConvertToU(expected, sizeof(expected),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", UCNV_TO_U_CALLBACK_SUBSTITUTE , fromOffsets, TRUE))
+ log_err("UTF8 -> did not match.\n");
+
+ }
+
+}
+
+/* Test that U_TRUNCATED_CHAR_FOUND is set. */
+static void
+doTestTruncated(const char *cnvName, const uint8_t *bytes, int32_t length) {
+ UConverter *cnv;
+
+ UChar buffer[2];
+ UChar *target, *targetLimit;
+ const char *source, *sourceLimit;
+
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ cnv=ucnv_open(cnvName, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("error TestTruncated: unable to open \"%s\" - %s\n", cnvName, u_errorName(errorCode));
+ return;
+ }
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("error TestTruncated: unable to set the stop callback on \"%s\" - %s\n",
+ cnvName, u_errorName(errorCode));
+ ucnv_close(cnv);
+ return;
+ }
+
+ source=(const char *)bytes;
+ sourceLimit=source+length;
+ target=buffer;
+ targetLimit=buffer+LENGTHOF(buffer);
+
+ /* 1. input bytes with flush=FALSE, then input nothing with flush=TRUE */
+ ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, FALSE, &errorCode);
+ if(U_FAILURE(errorCode) || source!=sourceLimit || target!=buffer) {
+ log_err("error TestTruncated(%s, 1a): input bytes[%d], flush=FALSE: %s, input left %d, output %d\n",
+ cnvName, length, u_errorName(errorCode), (int)(sourceLimit-source), (int)(target-buffer));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ source=sourceLimit;
+ target=buffer;
+ ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &errorCode);
+ if(errorCode!=U_TRUNCATED_CHAR_FOUND || target!=buffer) {
+ log_err("error TestTruncated(%s, 1b): no input (previously %d), flush=TRUE: %s (should be U_TRUNCATED_CHAR_FOUND), output %d\n",
+ cnvName, (int)length, u_errorName(errorCode), (int)(target-buffer));
+ }
+
+ /* 2. input bytes with flush=TRUE */
+ ucnv_resetToUnicode(cnv);
+
+ errorCode=U_ZERO_ERROR;
+ source=(const char *)bytes;
+ target=buffer;
+ ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &errorCode);
+ if(errorCode!=U_TRUNCATED_CHAR_FOUND || source!=sourceLimit || target!=buffer) {
+ log_err("error TestTruncated(%s, 2): input bytes[%d], flush=TRUE: %s (should be U_TRUNCATED_CHAR_FOUND), input left %d, output %d\n",
+ cnvName, length, u_errorName(errorCode), (int)(sourceLimit-source), (int)(target-buffer));
+ }
+
+
+ ucnv_close(cnv);
+}
+
+static void
+TestTruncated() {
+ static const struct {
+ const char *cnvName;
+ uint8_t bytes[8]; /* partial input bytes resulting in no output */
+ int32_t length;
+ } testCases[]={
+ { "IMAP-mailbox-name", { 0x26 }, 1 }, /* & */
+ { "IMAP-mailbox-name", { 0x26, 0x42 }, 2 }, /* &B */
+ { "IMAP-mailbox-name", { 0x26, 0x42, 0x42 }, 3 }, /* &BB */
+ { "IMAP-mailbox-name", { 0x26, 0x41, 0x41 }, 3 }, /* &AA */
+
+ { "UTF-7", { 0x2b, 0x42 }, 2 }, /* +B */
+ { "UTF-8", { 0xd1 }, 1 },
+
+ { "UTF-16BE", { 0x4e }, 1 },
+ { "UTF-16LE", { 0x4e }, 1 },
+ { "UTF-16", { 0x4e }, 1 },
+ { "UTF-16", { 0xff }, 1 },
+ { "UTF-16", { 0xfe, 0xff, 0x4e }, 3 },
+
+ { "UTF-32BE", { 0, 0, 0x4e }, 3 },
+ { "UTF-32LE", { 0x4e }, 1 },
+ { "UTF-32", { 0, 0, 0x4e }, 3 },
+ { "UTF-32", { 0xff }, 1 },
+ { "UTF-32", { 0, 0, 0xfe, 0xff, 0 }, 5 },
+ { "SCSU", { 0x0e, 0x4e }, 2 }, /* SQU 0x4e */
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ { "BOCU-1", { 0xd5 }, 1 },
+
+ { "Shift-JIS", { 0xe0 }, 1 },
+
+ { "ibm-939", { 0x0e, 0x41 }, 2 } /* SO 0x41 */
+#else
+ { "BOCU-1", { 0xd5 }, 1 ,}
+#endif
+ };
+ int32_t i;
+
+ for(i=0; i<LENGTHOF(testCases); ++i) {
+ doTestTruncated(testCases[i].cnvName, testCases[i].bytes, testCases[i].length);
+ }
+}
+
+typedef struct NameRange {
+ const char *name;
+ UChar32 start, end, start2, end2, notStart, notEnd;
+} NameRange;
+
+static void
+TestUnicodeSet() {
+ UErrorCode errorCode;
+ UConverter *cnv;
+ USet *set;
+ const char *name;
+ int32_t i, count;
+
+ static const char *const completeSetNames[]={
+ "UTF-7",
+ "UTF-8",
+ "UTF-16",
+ "UTF-16BE",
+ "UTF-16LE",
+ "UTF-32",
+ "UTF-32BE",
+ "UTF-32LE",
+ "SCSU",
+ "BOCU-1",
+ "CESU-8",
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ "gb18030",
+#endif
+ "IMAP-mailbox-name"
+ };
+
+ static const char *const lmbcsNames[]={
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ "LMBCS-1",
+ "LMBCS-2",
+ "LMBCS-3",
+ "LMBCS-4",
+ "LMBCS-5",
+ "LMBCS-6",
+ "LMBCS-8",
+ "LMBCS-11",
+ "LMBCS-16",
+ "LMBCS-17",
+ "LMBCS-18",
+ "LMBCS-19"
+#endif
+ };
+
+ static const NameRange nameRanges[]={
+ { "US-ASCII", 0, 0x7f, -1, -1, 0x80, 0x10ffff },
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ { "ibm-367", 0, 0x7f, -1, -1, 0x80, 0x10ffff },
+#endif
+ { "ISO-8859-1", 0, 0x7f, -1, -1, 0x100, 0x10ffff },
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ { "UTF-8", 0, 0xd7ff, 0xe000, 0x10ffff, 0xd800, 0xdfff },
+ { "windows-1251", 0, 0x7f, 0x410, 0x44f, 0x3000, 0xd7ff },
+ { "HZ", 0x410, 0x44f, 0x4e00, 0x4eff, 0xac00, 0xd7ff },
+ { "shift-jis", 0x3041, 0x3093, 0x30a1, 0x30f3, 0x900, 0x1cff }
+#else
+ { "UTF-8", 0, 0xd7ff, 0xe000, 0x10ffff, 0xd800, 0xdfff }
+#endif
+ };
+
+ /* open an empty set */
+ set=uset_open(1, 0);
+
+ count=ucnv_countAvailable();
+ for(i=0; i<count; ++i) {
+ errorCode=U_ZERO_ERROR;
+ name=ucnv_getAvailableName(i);
+ cnv=ucnv_open(name, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: unable to open converter %s - %s\n",
+ name, u_errorName(errorCode));
+ continue;
+ }
+
+ uset_clear(set);
+ ucnv_getUnicodeSet(cnv, set, UCNV_ROUNDTRIP_SET, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ucnv_getUnicodeSet(%s) failed - %s\n",
+ name, u_errorName(errorCode));
+ } else if(uset_size(set)==0) {
+ log_err("error: ucnv_getUnicodeSet(%s) returns an empty set\n", name);
+ }
+
+ ucnv_close(cnv);
+ }
+
+ /* test converters that are known to convert all of Unicode (except maybe for surrogates) */
+ for(i=0; i<LENGTHOF(completeSetNames); ++i) {
+ errorCode=U_ZERO_ERROR;
+ name=completeSetNames[i];
+ cnv=ucnv_open(name, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: unable to open converter %s - %s\n",
+ name, u_errorName(errorCode));
+ continue;
+ }
+
+ uset_clear(set);
+ ucnv_getUnicodeSet(cnv, set, UCNV_ROUNDTRIP_SET, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ucnv_getUnicodeSet(%s) failed - %s\n",
+ name, u_errorName(errorCode));
+ } else if(!uset_containsRange(set, 0, 0xd7ff) || !uset_containsRange(set, 0xe000, 0x10ffff)) {
+ log_err("error: ucnv_getUnicodeSet(%s) does not return an all-Unicode set\n", name);
+ }
+
+ ucnv_close(cnv);
+ }
+
+ /* test LMBCS variants which convert all of Unicode except for U+F6xx */
+ for(i=0; i<LENGTHOF(lmbcsNames); ++i) {
+ errorCode=U_ZERO_ERROR;
+ name=lmbcsNames[i];
+ cnv=ucnv_open(name, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: unable to open converter %s - %s\n",
+ name, u_errorName(errorCode));
+ continue;
+ }
+
+ uset_clear(set);
+ ucnv_getUnicodeSet(cnv, set, UCNV_ROUNDTRIP_SET, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ucnv_getUnicodeSet(%s) failed - %s\n",
+ name, u_errorName(errorCode));
+ } else if(!uset_containsRange(set, 0, 0xf5ff) || !uset_containsRange(set, 0xf700, 0x10ffff)) {
+ log_err("error: ucnv_getUnicodeSet(%s) does not return an all-Unicode set (minus U+F6xx)\n", name);
+ }
+
+ ucnv_close(cnv);
+ }
+
+ /* test specific sets */
+ for(i=0; i<LENGTHOF(nameRanges); ++i) {
+ errorCode=U_ZERO_ERROR;
+ name=nameRanges[i].name;
+ cnv=ucnv_open(name, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("error: unable to open converter %s - %s\n",
+ name, u_errorName(errorCode));
+ continue;
+ }
+
+ uset_clear(set);
+ ucnv_getUnicodeSet(cnv, set, UCNV_ROUNDTRIP_SET, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: ucnv_getUnicodeSet(%s) failed - %s\n",
+ name, u_errorName(errorCode));
+ } else if(
+ !uset_containsRange(set, nameRanges[i].start, nameRanges[i].end) ||
+ (nameRanges[i].start2>=0 && !uset_containsRange(set, nameRanges[i].start2, nameRanges[i].end2))
+ ) {
+ log_err("error: ucnv_getUnicodeSet(%s) does not contain the expected ranges\n", name);
+ } else if(nameRanges[i].notStart>=0) {
+ /* simulate containsAny() with the C API */
+ uset_complement(set);
+ if(!uset_containsRange(set, nameRanges[i].notStart, nameRanges[i].notEnd)) {
+ log_err("error: ucnv_getUnicodeSet(%s) contains part of the unexpected range\n", name);
+ }
+ }
+
+ ucnv_close(cnv);
+ }
+
+ errorCode = U_ZERO_ERROR;
+ ucnv_getUnicodeSet(NULL, set, UCNV_ROUNDTRIP_SET, &errorCode);
+ if (errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("error: ucnv_getUnicodeSet(NULL) returned wrong status code %s\n", u_errorName(errorCode));
+ }
+ errorCode = U_PARSE_ERROR;
+ /* Make sure that it does nothing if an error is passed in. Difficult to proper test for. */
+ ucnv_getUnicodeSet(NULL, NULL, UCNV_ROUNDTRIP_SET, &errorCode);
+ if (errorCode != U_PARSE_ERROR) {
+ log_err("error: ucnv_getUnicodeSet(NULL) returned wrong status code %s\n", u_errorName(errorCode));
+ }
+
+ uset_close(set);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.c b/Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.c
new file mode 100644
index 00000000000..61b11214beb
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.c
@@ -0,0 +1,310 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: nfsprep.c
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003jul11
+ * created by: Ram Viswanadha
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+#include "nfsprep.h"
+#include "ustr_imp.h"
+#include "cintltst.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#define NFS4_MAX_BUFFER_SIZE 1000
+#define PREFIX_SUFFIX_SEPARATOR 0x0040 /* '@' */
+
+
+const char* NFS4DataFileNames[5] ={
+ "nfscss",
+ "nfscsi",
+ "nfscis",
+ "nfsmxp",
+ "nfsmxs"
+};
+
+
+int32_t
+nfs4_prepare( const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ NFS4ProfileState state,
+ UParseError* parseError,
+ UErrorCode* status){
+
+ UChar b1Stack[NFS4_MAX_BUFFER_SIZE],
+ b2Stack[NFS4_MAX_BUFFER_SIZE];
+ char b3Stack[NFS4_MAX_BUFFER_SIZE];
+
+ /* initialize pointers to stack buffers */
+ UChar *b1 = b1Stack, *b2 = b2Stack;
+ char *b3=b3Stack;
+ int32_t b1Len=0, b2Len=0, b3Len=0,
+ b1Capacity = NFS4_MAX_BUFFER_SIZE,
+ b2Capacity = NFS4_MAX_BUFFER_SIZE,
+ b3Capacity = NFS4_MAX_BUFFER_SIZE,
+ reqLength=0;
+
+ UStringPrepProfile* profile = NULL;
+ /* get the test data path */
+ const char *testdatapath = NULL;
+
+ if(status==NULL || U_FAILURE(*status)){
+ return 0;
+ }
+ if((src==NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+ testdatapath = loadTestData(status);
+
+ /* convert the string from UTF-8 to UTF-16 */
+ u_strFromUTF8(b1,b1Capacity,&b1Len,src,srcLength,status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+
+ /* reset the status */
+ *status = U_ZERO_ERROR;
+
+ b1 = (UChar*) malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ b1Capacity = b1Len;
+ u_strFromUTF8(b1, b1Capacity, &b1Len, src, srcLength, status);
+ }
+
+ /* open the profile */
+ profile = usprep_open(testdatapath, NFS4DataFileNames[state], status);
+ /* prepare the string */
+ b2Len = usprep_prepare(profile, b1, b1Len, b2, b2Capacity, USPREP_DEFAULT, parseError, status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ *status = U_ZERO_ERROR;
+ b2 = (UChar*) malloc(b2Len * U_SIZEOF_UCHAR);
+ if(b2== NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+ b2Len = usprep_prepare(profile, b1, b1Len, b2, b2Len, USPREP_DEFAULT, parseError, status);
+ }
+
+ /* convert the string back to UTF-8 */
+ u_strToUTF8(b3,b3Capacity, &b3Len, b2, b2Len, status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ *status = U_ZERO_ERROR;
+ b3 = (char*) malloc(b3Len);
+ if(b3== NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+ b3Capacity = b3Len;
+ u_strToUTF8(b3,b3Capacity, &b3Len, b2, b2Len, status);
+ }
+
+ reqLength = b3Len;
+ if(dest!=NULL && reqLength <= destCapacity){
+ memmove(dest, b3, reqLength);
+ }
+
+CLEANUP:
+ if(b1!=b1Stack){
+ free(b1);
+ }
+ if(b2!=b2Stack){
+ free(b2);
+ }
+ if(b3!=b3Stack){
+ free(b3);
+ }
+
+ return u_terminateChars(dest, destCapacity, reqLength, status);
+}
+
+/* sorted array for binary search*/
+static const char* special_prefixes[]={
+ "\x0041\x004e\x004f\x004e\x0059\x004d\x004f\x0055\x0053",
+ "\x0041\x0055\x0054\x0048\x0045\x004e\x0054\x0049\x0043\x0041\x0054\x0045\x0044",
+ "\x0042\x0041\x0054\x0043\x0048",
+ "\x0044\x0049\x0041\x004c\x0055\x0050",
+ "\x0045\x0056\x0045\x0052\x0059\x004f\x004e\x0045",
+ "\x0047\x0052\x004f\x0055\x0050",
+ "\x0049\x004e\x0054\x0045\x0052\x0041\x0043\x0054\x0049\x0056\x0045",
+ "\x004e\x0045\x0054\x0057\x004f\x0052\x004b",
+ "\x004f\x0057\x004e\x0045\x0052",
+};
+
+
+/* binary search the sorted array */
+static int
+findStringIndex(const char* const *sortedArr, int32_t sortedArrLen, const char* target, int32_t targetLen){
+
+ int left, middle, right,rc;
+
+ left =0;
+ right= sortedArrLen-1;
+
+ while(left <= right){
+ middle = (left+right)/2;
+ rc=strncmp(sortedArr[middle],target, targetLen);
+
+ if(rc<0){
+ left = middle+1;
+ }else if(rc >0){
+ right = middle -1;
+ }else{
+ return middle;
+ }
+ }
+ return -1;
+}
+
+static void
+getPrefixSuffix(const char *src, int32_t srcLength,
+ const char **prefix, int32_t *prefixLen,
+ const char **suffix, int32_t *suffixLen,
+ UErrorCode *status){
+
+ int32_t i=0;
+ *prefix = src;
+ while(i<srcLength){
+ if(src[i] == PREFIX_SUFFIX_SEPARATOR){
+ if((i+1) == srcLength){
+ /* we reached the end of the string */
+ *suffix = NULL;
+ i++;
+ break;
+ }
+ i++;/* the prefix contains the separator */
+ *suffix = src + i;
+ break;
+ }
+ i++;
+ }
+ *prefixLen = i;
+ *suffixLen = srcLength - i;
+ /* special prefixes must not be followed by suffixes! */
+ if((findStringIndex(special_prefixes,LENGTHOF(special_prefixes), *prefix, *prefixLen-1) != -1) && (*suffix != NULL)){
+ *status = U_PARSE_ERROR;
+ return;
+ }
+
+}
+
+int32_t
+nfs4_mixed_prepare( const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ UParseError* parseError,
+ UErrorCode* status){
+
+ const char *prefix = NULL, *suffix = NULL;
+ int32_t prefixLen=0, suffixLen=0;
+ char pStack[NFS4_MAX_BUFFER_SIZE],
+ sStack[NFS4_MAX_BUFFER_SIZE];
+ char *p=pStack, *s=sStack;
+ int32_t pLen=0, sLen=0, reqLen=0,
+ pCapacity = NFS4_MAX_BUFFER_SIZE,
+ sCapacity = NFS4_MAX_BUFFER_SIZE;
+
+
+ if(status==NULL || U_FAILURE(*status)){
+ return 0;
+ }
+ if((src==NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+ if(srcLength == -1){
+ srcLength = (int32_t)strlen(src);
+ }
+ getPrefixSuffix(src, srcLength, &prefix, &prefixLen, &suffix, &suffixLen, status);
+
+ /* prepare the prefix */
+ pLen = nfs4_prepare(prefix, prefixLen, p, pCapacity, NFS4_MIXED_PREP_PREFIX, parseError, status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ *status = U_ZERO_ERROR;
+ p = (char*) malloc(pLen);
+ if(p == NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+ pLen = nfs4_prepare(prefix, prefixLen, p, pLen, NFS4_MIXED_PREP_PREFIX, parseError, status);
+ }
+
+ /* prepare the suffix */
+ if(suffix != NULL){
+ sLen = nfs4_prepare(suffix, suffixLen, s, sCapacity, NFS4_MIXED_PREP_SUFFIX, parseError, status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ *status = U_ZERO_ERROR;
+ s = (char*) malloc(pLen);
+ if(s == NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+ sLen = nfs4_prepare(suffix, suffixLen, s, sLen, NFS4_MIXED_PREP_SUFFIX, parseError, status);
+ }
+ }
+ reqLen = pLen+sLen+1 /* for the delimiter */;
+ if(dest != NULL && reqLen <= destCapacity){
+ memmove(dest, p, pLen);
+ /* add the suffix */
+ if(suffix!=NULL){
+ dest[pLen++] = PREFIX_SUFFIX_SEPARATOR;
+ memmove(dest+pLen, s, sLen);
+ }
+ }
+
+CLEANUP:
+ if(p != pStack){
+ free(p);
+ }
+ if(s != sStack){
+ free(s);
+ }
+
+ return u_terminateChars(dest, destCapacity, reqLen, status);
+}
+
+int32_t
+nfs4_cis_prepare( const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ UParseError* parseError,
+ UErrorCode* status){
+ return nfs4_prepare(src, srcLength, dest, destCapacity, NFS4_CIS_PREP, parseError, status);
+}
+
+
+int32_t
+nfs4_cs_prepare( const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ UBool isCaseSensitive,
+ UParseError* parseError,
+ UErrorCode* status){
+ if(isCaseSensitive){
+ return nfs4_prepare(src, srcLength, dest, destCapacity, NFS4_CS_PREP_CS, parseError, status);
+ }else{
+ return nfs4_prepare(src, srcLength, dest, destCapacity, NFS4_CS_PREP_CI, parseError, status);
+ }
+}
+
+#endif
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.h b/Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.h
new file mode 100644
index 00000000000..fe3e63d5429
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/nfsprep.h
@@ -0,0 +1,113 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: nfsprep.h
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003jul11
+ * created by: Ram Viswanadha
+ */
+#ifndef _NFSPREP_H
+#define _NFSPREP_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+#include "unicode/ustring.h"
+#include "unicode/usprep.h"
+#include <stdlib.h>
+#include <string.h>
+
+
+/* this enum must be kept in syn with NFS4DataFileNames array in nfsprep.c */
+enum NFS4ProfileState{
+ NFS4_CS_PREP_CS,
+ NFS4_CS_PREP_CI,
+ NFS4_CIS_PREP,
+ NFS4_MIXED_PREP_PREFIX,
+ NFS4_MIXED_PREP_SUFFIX
+};
+
+typedef enum NFS4ProfileState NFS4ProfileState;
+
+/**
+ * Prepares the source UTF-8 string for use in file names and
+ * returns UTF-8 string on output.
+ * @param src
+ * @param srcLen
+ * @param dest
+ * @param destCapacity
+ * @param state
+ * @param parseError
+ * @param status
+ */
+int32_t
+nfs4_prepare(const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ NFS4ProfileState state,
+ UParseError* parseError,
+ UErrorCode* status);
+
+/**
+ * @param dest
+ * @param destCapacity
+ * @param src
+ * @param srcLen
+ * @param state
+ * @param parseError
+ * @param status
+ */
+int32_t
+nfs4_mixed_prepare( const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ UParseError* parseError,
+ UErrorCode* status);
+
+/**
+ * @param dest
+ * @param destCapacity
+ * @param src
+ * @param srcLen
+ * @param state
+ * @param parseError
+ * @param status
+ */
+int32_t
+nfs4_cis_prepare( const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ UParseError* parseError,
+ UErrorCode* status);
+
+/**
+ * @param dest
+ * @param destCapacity
+ * @param src
+ * @param srcLen
+ * @param state
+ * @param parseError
+ * @param status
+ */
+int32_t
+nfs4_cs_prepare( const char* src, int32_t srcLength,
+ char* dest, int32_t destCapacity,
+ UBool isCaseSensitive,
+ UParseError* parseError,
+ UErrorCode* status);
+#endif
+
+#endif
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.c
new file mode 100644
index 00000000000..bdd84eb0023
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.c
@@ -0,0 +1,5369 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*******************************************************************************
+*
+* File CCONVTST.C
+*
+* Modification History:
+* Name Description
+* Steven R. Loomis 7/8/1999 Adding input buffer test
+********************************************************************************
+*/
+#include <stdio.h>
+#include "cstring.h"
+#include "unicode/uloc.h"
+#include "unicode/ucnv.h"
+#include "unicode/ucnv_err.h"
+#include "cintltst.h"
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "unicode/ucol.h"
+#include "cmemory.h"
+
+static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message);
+static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message);
+#if !UCONFIG_NO_COLLATION
+static void TestJitterbug981(void);
+#endif
+static void TestJitterbug1293(void);
+static void TestNewConvertWithBufferSizes(int32_t osize, int32_t isize) ;
+static void TestConverterTypesAndStarters(void);
+static void TestAmbiguous(void);
+static void TestSignatureDetection(void);
+static void TestUTF7(void);
+static void TestIMAP(void);
+static void TestUTF8(void);
+static void TestCESU8(void);
+static void TestUTF16(void);
+static void TestUTF16BE(void);
+static void TestUTF16LE(void);
+static void TestUTF32(void);
+static void TestUTF32BE(void);
+static void TestUTF32LE(void);
+static void TestLATIN1(void);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestSBCS(void);
+static void TestDBCS(void);
+static void TestMBCS(void);
+
+#ifdef U_ENABLE_GENERIC_ISO_2022
+static void TestISO_2022(void);
+#endif
+
+static void TestISO_2022_JP(void);
+static void TestISO_2022_JP_1(void);
+static void TestISO_2022_JP_2(void);
+static void TestISO_2022_KR(void);
+static void TestISO_2022_KR_1(void);
+static void TestISO_2022_CN(void);
+static void TestISO_2022_CN_EXT(void);
+static void TestJIS(void);
+static void TestHZ(void);
+#endif
+
+static void TestSCSU(void);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestEBCDIC_STATEFUL(void);
+static void TestGB18030(void);
+static void TestLMBCS(void);
+static void TestJitterbug255(void);
+static void TestEBCDICUS4XML(void);
+static void TestJitterbug915(void);
+static void TestISCII(void);
+
+static void TestCoverageMBCS(void);
+static void TestJitterbug2346(void);
+static void TestJitterbug2411(void);
+static void TestJB5275(void);
+static void TestJB5275_1(void);
+#endif
+
+static void TestRoundTrippingAllUTF(void);
+static void TestConv(const uint16_t in[],
+ int len,
+ const char* conv,
+ const char* lang,
+ char byteArr[],
+ int byteArrLen);
+void addTestNewConvert(TestNode** root);
+
+/* open a converter, using test data if it begins with '@' */
+static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
+
+
+#define NEW_MAX_BUFFER 999
+
+static int32_t gInBufferSize = NEW_MAX_BUFFER;
+static int32_t gOutBufferSize = NEW_MAX_BUFFER;
+static char gNuConvTestName[1024];
+
+#define nct_min(x,y) ((x<y) ? x : y)
+
+static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err)
+{
+ if(cnv && cnv[0] == '@') {
+ return ucnv_openPackage(loadTestData(err), cnv+1, err);
+ } else {
+ return ucnv_open(cnv, err);
+ }
+}
+
+static void printSeq(const unsigned char* a, int len)
+{
+ int i=0;
+ log_verbose("{");
+ while (i<len)
+ log_verbose("0x%02x ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printUSeq(const UChar* a, int len)
+{
+ int i=0;
+ log_verbose("{U+");
+ while (i<len) log_verbose("0x%04x ", a[i++]);
+ log_verbose("}\n");
+}
+
+static void printSeqErr(const unsigned char* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "{");
+ while (i<len)
+ fprintf(stderr, "0x%02x ", a[i++]);
+ fprintf(stderr, "}\n");
+}
+
+static void printUSeqErr(const UChar* a, int len)
+{
+ int i=0;
+ fprintf(stderr, "{U+");
+ while (i<len)
+ fprintf(stderr, "0x%04x ", a[i++]);
+ fprintf(stderr,"}\n");
+}
+
+static void
+TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message)
+{
+ const char* s0;
+ const char* s=(char*)source;
+ const int32_t *r=results;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UChar32 c;
+
+ while(s<limit) {
+ s0=s;
+ c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
+ if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
+ break; /* no more significant input */
+ } else if(U_FAILURE(errorCode)) {
+ log_err("%s ucnv_getNextUChar() failed: %s\n", message, u_errorName(errorCode));
+ break;
+ } else if(
+ /* test the expected number of input bytes only if >=0 */
+ (*r>=0 && (int32_t)(s-s0)!=*r) ||
+ c!=*(r+1)
+ ) {
+ log_err("%s ucnv_getNextUChar() result %lx from %d bytes, should have been %lx from %d bytes.\n",
+ message, c, (s-s0), *(r+1), *r);
+ break;
+ }
+ r+=2;
+ }
+}
+
+static void
+TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message)
+{
+ const char* s=(char*)source;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ uint32_t c;
+ c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
+ if(errorCode != expected){
+ log_err("FAIL: Expected:%s when %s-----Got:%s\n", myErrorName(expected), message, myErrorName(errorCode));
+ }
+ if(c != 0xFFFD && c != 0xffff){
+ log_err("FAIL: Expected return value of 0xfffd or 0xffff when %s-----Got 0x%lx\n", message, c);
+ }
+
+}
+
+static void TestInBufSizes(void)
+{
+ TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,1);
+#if 1
+ TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,2);
+ TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,3);
+ TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,4);
+ TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,5);
+ TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,6);
+ TestNewConvertWithBufferSizes(1,1);
+ TestNewConvertWithBufferSizes(2,3);
+ TestNewConvertWithBufferSizes(3,2);
+#endif
+}
+
+static void TestOutBufSizes(void)
+{
+#if 1
+ TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,NEW_MAX_BUFFER);
+ TestNewConvertWithBufferSizes(1,NEW_MAX_BUFFER);
+ TestNewConvertWithBufferSizes(2,NEW_MAX_BUFFER);
+ TestNewConvertWithBufferSizes(3,NEW_MAX_BUFFER);
+ TestNewConvertWithBufferSizes(4,NEW_MAX_BUFFER);
+ TestNewConvertWithBufferSizes(5,NEW_MAX_BUFFER);
+
+#endif
+}
+
+
+void addTestNewConvert(TestNode** root)
+{
+ addTest(root, &TestInBufSizes, "tsconv/nucnvtst/TestInBufSizes");
+ addTest(root, &TestOutBufSizes, "tsconv/nucnvtst/TestOutBufSizes");
+ addTest(root, &TestConverterTypesAndStarters, "tsconv/nucnvtst/TestConverterTypesAndStarters");
+ addTest(root, &TestAmbiguous, "tsconv/nucnvtst/TestAmbiguous");
+ addTest(root, &TestSignatureDetection, "tsconv/nucnvtst/TestSignatureDetection");
+ addTest(root, &TestUTF7, "tsconv/nucnvtst/TestUTF7");
+ addTest(root, &TestIMAP, "tsconv/nucnvtst/TestIMAP");
+ addTest(root, &TestUTF8, "tsconv/nucnvtst/TestUTF8");
+
+ /* test ucnv_getNextUChar() for charsets that encode single surrogates with complete byte sequences */
+ addTest(root, &TestCESU8, "tsconv/nucnvtst/TestCESU8");
+ addTest(root, &TestUTF16, "tsconv/nucnvtst/TestUTF16");
+ addTest(root, &TestUTF16BE, "tsconv/nucnvtst/TestUTF16BE");
+ addTest(root, &TestUTF16LE, "tsconv/nucnvtst/TestUTF16LE");
+ addTest(root, &TestUTF32, "tsconv/nucnvtst/TestUTF32");
+ addTest(root, &TestUTF32BE, "tsconv/nucnvtst/TestUTF32BE");
+ addTest(root, &TestUTF32LE, "tsconv/nucnvtst/TestUTF32LE");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestLMBCS, "tsconv/nucnvtst/TestLMBCS");
+#endif
+
+ addTest(root, &TestLATIN1, "tsconv/nucnvtst/TestLATIN1");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestSBCS, "tsconv/nucnvtst/TestSBCS");
+ addTest(root, &TestDBCS, "tsconv/nucnvtst/TestDBCS");
+ addTest(root, &TestMBCS, "tsconv/nucnvtst/TestMBCS");
+
+#ifdef U_ENABLE_GENERIC_ISO_2022
+ addTest(root, &TestISO_2022, "tsconv/nucnvtst/TestISO_2022");
+#endif
+
+ addTest(root, &TestISO_2022_JP, "tsconv/nucnvtst/TestISO_2022_JP");
+ addTest(root, &TestJIS, "tsconv/nucnvtst/TestJIS");
+ addTest(root, &TestISO_2022_JP_1, "tsconv/nucnvtst/TestISO_2022_JP_1");
+ addTest(root, &TestISO_2022_JP_2, "tsconv/nucnvtst/TestISO_2022_JP_2");
+ addTest(root, &TestISO_2022_KR, "tsconv/nucnvtst/TestISO_2022_KR");
+ addTest(root, &TestISO_2022_KR_1, "tsconv/nucnvtst/TestISO_2022_KR_1");
+ addTest(root, &TestISO_2022_CN, "tsconv/nucnvtst/TestISO_2022_CN");
+ addTest(root, &TestISO_2022_CN_EXT, "tsconv/nucnvtst/TestISO_2022_CN_EXT");
+ addTest(root, &TestJitterbug915, "tsconv/nucnvtst/TestJitterbug915");
+ addTest(root, &TestHZ, "tsconv/nucnvtst/TestHZ");
+#endif
+
+ addTest(root, &TestSCSU, "tsconv/nucnvtst/TestSCSU");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestEBCDIC_STATEFUL, "tsconv/nucnvtst/TestEBCDIC_STATEFUL");
+ addTest(root, &TestGB18030, "tsconv/nucnvtst/TestGB18030");
+ addTest(root, &TestJitterbug255, "tsconv/nucnvtst/TestJitterbug255");
+ addTest(root, &TestEBCDICUS4XML, "tsconv/nucnvtst/TestEBCDICUS4XML");
+ addTest(root, &TestISCII, "tsconv/nucnvtst/TestISCII");
+ addTest(root, &TestJB5275, "tsconv/nucnvtst/TestJB5275");
+ addTest(root, &TestJB5275_1, "tsconv/nucnvtst/TestJB5275_1");
+#if !UCONFIG_NO_COLLATION
+ addTest(root, &TestJitterbug981, "tsconv/nucnvtst/TestJitterbug981");
+#endif
+
+ addTest(root, &TestJitterbug1293, "tsconv/nucnvtst/TestJitterbug1293");
+#endif
+
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestCoverageMBCS, "tsconv/nucnvtst/TestCoverageMBCS");
+#endif
+
+ addTest(root, &TestRoundTrippingAllUTF, "tsconv/nucnvtst/TestRoundTrippingAllUTF");
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ addTest(root, &TestJitterbug2346, "tsconv/nucnvtst/TestJitterbug2346");
+ addTest(root, &TestJitterbug2411, "tsconv/nucnvtst/TestJitterbug2411");
+#endif
+
+}
+
+
+/* Note that this test already makes use of statics, so it's not really
+ multithread safe.
+ This convenience function lets us make the error messages actually useful.
+*/
+
+static void setNuConvTestName(const char *codepage, const char *direction)
+{
+ sprintf(gNuConvTestName, "[Testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
+ codepage,
+ direction,
+ (int)gInBufferSize,
+ (int)gOutBufferSize);
+}
+
+typedef enum
+{
+ TC_OK = 0, /* test was OK */
+ TC_MISMATCH = 1, /* Match failed - err was printed */
+ TC_FAIL = 2 /* Test failed, don't print an err because it was already printed. */
+} ETestConvertResult;
+
+/* Note: This function uses global variables and it will not do offset
+checking without gOutBufferSize and gInBufferSize set to NEW_MAX_BUFFER */
+static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
+ const char *codepage, const int32_t *expectOffsets , UBool useFallback)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ char junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ char *p;
+ const UChar *src;
+ char *end;
+ char *targ;
+ int32_t *offs;
+ int i;
+ int32_t realBufferSize;
+ char *realBufferEnd;
+ const UChar *realSourceEnd;
+ const UChar *sourceLimit;
+ UBool checkOffsets = TRUE;
+ UBool doFlush;
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = (char)0xF0;
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = 0xFF;
+
+ setNuConvTestName(codepage, "FROM");
+
+ log_verbose("\n========= %s\n", gNuConvTestName);
+
+ conv = my_ucnv_open(codepage, &status);
+
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",codepage);
+ return TC_FAIL;
+ }
+ if(useFallback){
+ ucnv_setFallback(conv,useFallback);
+ }
+
+ log_verbose("Converter opened..\n");
+
+ src = source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = source + sourceLen;
+
+ if ( gOutBufferSize != realBufferSize || gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min(targ + gOutBufferSize, realBufferEnd);
+ sourceLimit = nct_min(src + gInBufferSize, realSourceEnd);
+
+ doFlush = (UBool)(sourceLimit == realSourceEnd);
+
+ if(targ == realBufferEnd) {
+ log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
+ return TC_FAIL;
+ }
+ log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+
+
+ status = U_ZERO_ERROR;
+
+ ucnv_fromUnicode (conv,
+ &targ,
+ end,
+ &src,
+ sourceLimit,
+ checkOffsets ? offs : NULL,
+ doFlush, /* flush if we're at the end of the input data */
+ &status);
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && sourceLimit < realSourceEnd) );
+
+ if(U_FAILURE(status)) {
+ log_err("Problem doing fromUnicode to %s, errcode %s %s\n", codepage, myErrorName(status), gNuConvTestName);
+ return TC_FAIL;
+ }
+
+ log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
+ sourceLen, targ-junkout);
+
+ if(VERBOSITY)
+ {
+ char junk[9999];
+ char offset_str[9999];
+ char *ptr;
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+ for(ptr = junkout;ptr<targ;ptr++) {
+ sprintf(junk + strlen(junk), "0x%02x, ", (int)(0xFF & *ptr));
+ sprintf(offset_str + strlen(offset_str), "0x%02x, ", (int)(0xFF & junokout[ptr-junkout]));
+ }
+
+ log_verbose(junk);
+ printSeq((const uint8_t *)expect, expectLen);
+ if ( checkOffsets ) {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+ if(expectLen != targ-junkout) {
+ log_err("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
+ printf("\nGot:");
+ printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
+ printf("\nExpected:");
+ printSeqErr((const unsigned char*)expect, expectLen);
+ return TC_MISMATCH;
+ }
+
+ if (checkOffsets && (expectOffsets != 0) ) {
+ log_verbose("comparing %d offsets..\n", targ-junkout);
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t) )){
+ log_err("did not get the expected offsets. %s\n", gNuConvTestName);
+ printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
+ log_err("\n");
+ log_err("Got : ");
+ for(p=junkout;p<targ;p++) {
+ log_err("%d,", junokout[p-junkout]);
+ }
+ log_err("\n");
+ log_err("Expected: ");
+ for(i=0; i<(targ-junkout); i++) {
+ log_err("%d,", expectOffsets[i]);
+ }
+ log_err("\n");
+ }
+ }
+
+ log_verbose("comparing..\n");
+ if(!memcmp(junkout, expect, expectLen)) {
+ log_verbose("Matches!\n");
+ return TC_OK;
+ } else {
+ log_err("String does not match u->%s\n", gNuConvTestName);
+ printUSeqErr(source, sourceLen);
+ printf("\nGot:");
+ printSeqErr((const unsigned char *)junkout, expectLen);
+ printf("\nExpected:");
+ printSeqErr((const unsigned char *)expect, expectLen);
+
+ return TC_MISMATCH;
+ }
+}
+
+/* Note: This function uses global variables and it will not do offset
+checking without gOutBufferSize and gInBufferSize set to NEW_MAX_BUFFER */
+static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
+ const char *codepage, const int32_t *expectOffsets, UBool useFallback)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *conv = 0;
+ UChar junkout[NEW_MAX_BUFFER]; /* FIX */
+ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */
+ const char *src;
+ const char *realSourceEnd;
+ const char *srcLimit;
+ UChar *p;
+ UChar *targ;
+ UChar *end;
+ int32_t *offs;
+ int i;
+ UBool checkOffsets = TRUE;
+
+ int32_t realBufferSize;
+ UChar *realBufferEnd;
+
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junkout[i] = 0xFFFE;
+
+ for(i=0;i<NEW_MAX_BUFFER;i++)
+ junokout[i] = -1;
+
+ setNuConvTestName(codepage, "TO");
+
+ log_verbose("\n========= %s\n", gNuConvTestName);
+
+ conv = my_ucnv_open(codepage, &status);
+
+ if(U_FAILURE(status))
+ {
+ log_data_err("Couldn't open converter %s\n",gNuConvTestName);
+ return TC_FAIL;
+ }
+ if(useFallback){
+ ucnv_setFallback(conv,useFallback);
+ }
+ log_verbose("Converter opened..\n");
+
+ src = (const char *)source;
+ targ = junkout;
+ offs = junokout;
+
+ realBufferSize = (sizeof(junkout)/sizeof(junkout[0]));
+ realBufferEnd = junkout + realBufferSize;
+ realSourceEnd = src + sourcelen;
+
+ if ( gOutBufferSize != realBufferSize || gInBufferSize != NEW_MAX_BUFFER )
+ checkOffsets = FALSE;
+
+ do
+ {
+ end = nct_min( targ + gOutBufferSize, realBufferEnd);
+ srcLimit = nct_min(realSourceEnd, src + gInBufferSize);
+
+ if(targ == realBufferEnd)
+ {
+ log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjet=%08lx %s",targ,gNuConvTestName);
+ return TC_FAIL;
+ }
+ log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
+
+ /* oldTarg = targ; */
+
+ status = U_ZERO_ERROR;
+
+ ucnv_toUnicode (conv,
+ &targ,
+ end,
+ &src,
+ srcLimit,
+ checkOffsets ? offs : NULL,
+ (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
+ &status);
+
+ /* offs += (targ-oldTarg); */
+
+ } while ( (status == U_BUFFER_OVERFLOW_ERROR) || (U_SUCCESS(status) && (srcLimit < realSourceEnd)) ); /* while we just need another buffer */
+
+ if(U_FAILURE(status))
+ {
+ log_err("Problem doing %s toUnicode, errcode %s %s\n", codepage, myErrorName(status), gNuConvTestName);
+ return TC_FAIL;
+ }
+
+ log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
+ sourcelen, targ-junkout);
+ if(VERBOSITY)
+ {
+ char junk[9999];
+ char offset_str[9999];
+ UChar *ptr;
+
+ junk[0] = 0;
+ offset_str[0] = 0;
+
+ for(ptr = junkout;ptr<targ;ptr++)
+ {
+ sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*ptr);
+ sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[ptr-junkout]);
+ }
+
+ log_verbose(junk);
+ printUSeq(expect, expectlen);
+ if ( checkOffsets )
+ {
+ log_verbose("\nOffsets:");
+ log_verbose(offset_str);
+ }
+ log_verbose("\n");
+ }
+ ucnv_close(conv);
+
+ log_verbose("comparing %d uchars (%d bytes)..\n",expectlen,expectlen*2);
+
+ if (checkOffsets && (expectOffsets != 0))
+ {
+ if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t))){
+ log_err("did not get the expected offsets. %s\n",gNuConvTestName);
+ log_err("Got: ");
+ for(p=junkout;p<targ;p++) {
+ log_err("%d,", junokout[p-junkout]);
+ }
+ log_err("\n");
+ log_err("Expected: ");
+ for(i=0; i<(targ-junkout); i++) {
+ log_err("%d,", expectOffsets[i]);
+ }
+ log_err("\n");
+ log_err("output: ");
+ for(i=0; i<(targ-junkout); i++) {
+ log_err("%X,", junkout[i]);
+ }
+ log_err("\n");
+ log_err("input: ");
+ for(i=0; i<(src-(const char *)source); i++) {
+ log_err("%X,", (unsigned char)source[i]);
+ }
+ log_err("\n");
+ }
+ }
+
+ if(!memcmp(junkout, expect, expectlen*2))
+ {
+ log_verbose("Matches!\n");
+ return TC_OK;
+ }
+ else
+ {
+ log_err("String does not match. %s\n", gNuConvTestName);
+ log_verbose("String does not match. %s\n", gNuConvTestName);
+ printf("\nGot:");
+ printUSeqErr(junkout, expectlen);
+ printf("\nExpected:");
+ printUSeqErr(expect, expectlen);
+ return TC_MISMATCH;
+ }
+}
+
+
+static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize )
+{
+/** test chars #1 */
+ /* 1 2 3 1Han 2Han 3Han . */
+ static const UChar sampleText[] =
+ { 0x0031, 0x0032, 0x0033, 0x0000, 0x4e00, 0x4e8c, 0x4e09, 0x002E };
+
+
+ static const uint8_t expectedUTF8[] =
+ { 0x31, 0x32, 0x33, 0x00, 0xe4, 0xb8, 0x80, 0xe4, 0xba, 0x8c, 0xe4, 0xb8, 0x89, 0x2E };
+ static const int32_t toUTF8Offs[] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x07};
+ static const int32_t fmUTF8Offs[] =
+ { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0007, 0x000a, 0x000d };
+
+#ifdef U_ENABLE_GENERIC_ISO_2022
+ /* Same as UTF8, but with ^[%B preceeding */
+ static const const uint8_t expectedISO2022[] =
+ { 0x1b, 0x25, 0x42, 0x31, 0x32, 0x33, 0x00, 0xe4, 0xb8, 0x80, 0xe4, 0xba, 0x8c, 0xe4, 0xb8, 0x89, 0x2E };
+ static const int32_t toISO2022Offs[] =
+ { -1, -1, -1, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04,
+ 0x04, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x07 }; /* right? */
+ static const int32_t fmISO2022Offs[] =
+ { 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x000a, 0x000d, 0x0010 }; /* is this right? */
+#endif
+
+ /* 1 2 3 0, <SO> h1 h2 h3 <SI> . EBCDIC_STATEFUL */
+ static const uint8_t expectedIBM930[] =
+ { 0xF1, 0xF2, 0xF3, 0x00, 0x0E, 0x45, 0x41, 0x45, 0x42, 0x45, 0x43, 0x0F, 0x4B };
+ static const int32_t toIBM930Offs[] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, };
+ static const int32_t fmIBM930Offs[] =
+ { 0x0000, 0x0001, 0x0002, 0x0003, 0x0005, 0x0007, 0x0009, 0x000c};
+
+ /* 1 2 3 0 h1 h2 h3 . MBCS*/
+ static const uint8_t expectedIBM943[] =
+ { 0x31, 0x32, 0x33, 0x00, 0x88, 0xea, 0x93, 0xf1, 0x8e, 0x4f, 0x2e };
+ static const int32_t toIBM943Offs [] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07 };
+ static const int32_t fmIBM943Offs[] =
+ { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0006, 0x0008, 0x000a};
+
+ /* 1 2 3 0 h1 h2 h3 . DBCS*/
+ static const uint8_t expectedIBM9027[] =
+ { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x4c, 0x41, 0x4c, 0x48, 0x4c, 0x55, 0xfe, 0xfe};
+ static const int32_t toIBM9027Offs [] =
+ { 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07};
+
+ /* 1 2 3 0 <?> <?> <?> . SBCS*/
+ static const uint8_t expectedIBM920[] =
+ { 0x31, 0x32, 0x33, 0x00, 0x1a, 0x1a, 0x1a, 0x2e };
+ static const int32_t toIBM920Offs [] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
+
+ /* 1 2 3 0 <?> <?> <?> . SBCS*/
+ static const uint8_t expectedISO88593[] =
+ { 0x31, 0x32, 0x33, 0x00, 0x1a, 0x1a, 0x1a, 0x2E };
+ static const int32_t toISO88593Offs[] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
+
+ /* 1 2 3 0 <?> <?> <?> . <?> LATIN_1*/
+ static const uint8_t expectedLATIN1[] =
+ { 0x31, 0x32, 0x33, 0x00, 0x1a, 0x1a, 0x1a, 0x2E };
+ static const int32_t toLATIN1Offs[] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
+
+
+ /* etc */
+ static const uint8_t expectedUTF16BE[] =
+ { 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x00, 0x4e, 0x00, 0x4e, 0x8c, 0x4e, 0x09, 0x00, 0x2e };
+ static const int32_t toUTF16BEOffs[]=
+ { 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07};
+ static const int32_t fmUTF16BEOffs[] =
+ { 0x0000, 0x0002, 0x0004, 0x0006, 0x0008, 0x000a, 0x000c, 0x000e };
+
+ static const uint8_t expectedUTF16LE[] =
+ { 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x8c, 0x4e, 0x09, 0x4e, 0x2e, 0x00 };
+ static const int32_t toUTF16LEOffs[]=
+ { 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07};
+ static const int32_t fmUTF16LEOffs[] =
+ { 0x0000, 0x0002, 0x0004, 0x0006, 0x0008, 0x000a, 0x000c, 0x000e };
+
+ static const uint8_t expectedUTF32BE[] =
+ { 0x00, 0x00, 0x00, 0x31,
+ 0x00, 0x00, 0x00, 0x32,
+ 0x00, 0x00, 0x00, 0x33,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x4e, 0x00,
+ 0x00, 0x00, 0x4e, 0x8c,
+ 0x00, 0x00, 0x4e, 0x09,
+ 0x00, 0x00, 0x00, 0x2e };
+ static const int32_t toUTF32BEOffs[]=
+ { 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x01,
+ 0x02, 0x02, 0x02, 0x02,
+ 0x03, 0x03, 0x03, 0x03,
+ 0x04, 0x04, 0x04, 0x04,
+ 0x05, 0x05, 0x05, 0x05,
+ 0x06, 0x06, 0x06, 0x06,
+ 0x07, 0x07, 0x07, 0x07,
+ 0x08, 0x08, 0x08, 0x08 };
+ static const int32_t fmUTF32BEOffs[] =
+ { 0x0000, 0x0004, 0x0008, 0x000c, 0x0010, 0x0014, 0x0018, 0x001c };
+
+ static const uint8_t expectedUTF32LE[] =
+ { 0x31, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x00,
+ 0x33, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0x00, 0x00,
+ 0x8c, 0x4e, 0x00, 0x00,
+ 0x09, 0x4e, 0x00, 0x00,
+ 0x2e, 0x00, 0x00, 0x00 };
+ static const int32_t toUTF32LEOffs[]=
+ { 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x01,
+ 0x02, 0x02, 0x02, 0x02,
+ 0x03, 0x03, 0x03, 0x03,
+ 0x04, 0x04, 0x04, 0x04,
+ 0x05, 0x05, 0x05, 0x05,
+ 0x06, 0x06, 0x06, 0x06,
+ 0x07, 0x07, 0x07, 0x07,
+ 0x08, 0x08, 0x08, 0x08 };
+ static const int32_t fmUTF32LEOffs[] =
+ { 0x0000, 0x0004, 0x0008, 0x000c, 0x0010, 0x0014, 0x0018, 0x001c };
+
+
+
+
+/** Test chars #2 **/
+
+ /* Sahha [health], slashed h's */
+ static const UChar malteseUChars[] = { 0x0053, 0x0061, 0x0127, 0x0127, 0x0061 };
+ static const uint8_t expectedMaltese913[] = { 0x53, 0x61, 0xB1, 0xB1, 0x61 };
+
+ /* LMBCS */
+ static const UChar LMBCSUChars[] = { 0x0027, 0x010A, 0x0000, 0x0127, 0x2666, 0x0220 };
+ static const uint8_t expectedLMBCS[] = { 0x27, 0x06, 0x04, 0x00, 0x01, 0x73, 0x01, 0x04, 0x14, 0x02, 0x20 };
+ static const int32_t toLMBCSOffs[] = { 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x04 , 0x05, 0x05, 0x05 };
+ static const int32_t fmLMBCSOffs[] = { 0x0000, 0x0001, 0x0003, 0x0004, 0x0006, 0x0008};
+ /*********************************** START OF CODE finally *************/
+
+ gInBufferSize = insize;
+ gOutBufferSize = outsize;
+
+ log_verbose("\n\n\nTesting conversions with InputBufferSize = %d, OutputBufferSize = %d\n", gInBufferSize, gOutBufferSize);
+
+
+ /*UTF-8*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedUTF8, sizeof(expectedUTF8), "UTF8", toUTF8Offs,FALSE );
+
+ log_verbose("Test surrogate behaviour for UTF8\n");
+ {
+ static const UChar testinput[]={ 0x20ac, 0xd801, 0xdc01, 0xdc01 };
+ static const uint8_t expectedUTF8test2[]= { 0xe2, 0x82, 0xac,
+ 0xf0, 0x90, 0x90, 0x81,
+ 0xef, 0xbf, 0xbd
+ };
+ static const int32_t offsets[]={ 0, 0, 0, 1, 1, 1, 1, 3, 3, 3 };
+ testConvertFromU(testinput, sizeof(testinput)/sizeof(testinput[0]),
+ expectedUTF8test2, sizeof(expectedUTF8test2), "UTF8", offsets,FALSE );
+
+
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION && defined(U_ENABLE_GENERIC_ISO_2022)
+ /*ISO-2022*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedISO2022, sizeof(expectedISO2022), "ISO_2022", toISO2022Offs,FALSE );
+#endif
+
+ /*UTF16 LE*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedUTF16LE, sizeof(expectedUTF16LE), "utf-16le", toUTF16LEOffs,FALSE );
+ /*UTF16 BE*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedUTF16BE, sizeof(expectedUTF16BE), "utf-16be", toUTF16BEOffs,FALSE );
+ /*UTF32 LE*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedUTF32LE, sizeof(expectedUTF32LE), "utf-32le", toUTF32LEOffs,FALSE );
+ /*UTF32 BE*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedUTF32BE, sizeof(expectedUTF32BE), "utf-32be", toUTF32BEOffs,FALSE );
+
+ /*LATIN_1*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedLATIN1, sizeof(expectedLATIN1), "LATIN_1", toLATIN1Offs,FALSE );
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /*EBCDIC_STATEFUL*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedIBM930, sizeof(expectedIBM930), "ibm-930", toIBM930Offs,FALSE );
+
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedISO88593, sizeof(expectedISO88593), "iso-8859-3", toISO88593Offs,FALSE );
+
+ /*MBCS*/
+
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedIBM943, sizeof(expectedIBM943), "ibm-943", toIBM943Offs,FALSE );
+ /*DBCS*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedIBM9027, sizeof(expectedIBM9027), "@ibm9027", toIBM9027Offs,FALSE );
+ /*SBCS*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedIBM920, sizeof(expectedIBM920), "ibm-920", toIBM920Offs,FALSE );
+ /*SBCS*/
+ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]),
+ expectedISO88593, sizeof(expectedISO88593), "iso-8859-3", toISO88593Offs,FALSE );
+#endif
+
+
+/****/
+
+ /*UTF-8*/
+ testConvertToU(expectedUTF8, sizeof(expectedUTF8),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf8", fmUTF8Offs,FALSE);
+#if !UCONFIG_NO_LEGACY_CONVERSION && defined(U_ENABLE_GENERIC_ISO_2022)
+ /*ISO-2022*/
+ testConvertToU(expectedISO2022, sizeof(expectedISO2022),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "ISO_2022", fmISO2022Offs,FALSE);
+#endif
+
+ /*UTF16 LE*/
+ testConvertToU(expectedUTF16LE, sizeof(expectedUTF16LE),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-16le", fmUTF16LEOffs,FALSE);
+ /*UTF16 BE*/
+ testConvertToU(expectedUTF16BE, sizeof(expectedUTF16BE),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-16be", fmUTF16BEOffs,FALSE);
+ /*UTF32 LE*/
+ testConvertToU(expectedUTF32LE, sizeof(expectedUTF32LE),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-32le", fmUTF32LEOffs,FALSE);
+ /*UTF32 BE*/
+ testConvertToU(expectedUTF32BE, sizeof(expectedUTF32BE),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-32be", fmUTF32BEOffs,FALSE);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /*EBCDIC_STATEFUL*/
+ testConvertToU(expectedIBM930, sizeof(expectedIBM930),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "ibm-930", fmIBM930Offs,FALSE);
+ /*MBCS*/
+ testConvertToU(expectedIBM943, sizeof(expectedIBM943),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "ibm-943", fmIBM943Offs,FALSE);
+#endif
+
+ /* Try it again to make sure it still works */
+ testConvertToU(expectedUTF16LE, sizeof(expectedUTF16LE),
+ sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-16le", fmUTF16LEOffs,FALSE);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ testConvertToU(expectedMaltese913, sizeof(expectedMaltese913),
+ malteseUChars, sizeof(malteseUChars)/sizeof(malteseUChars[0]), "latin3", NULL,FALSE);
+
+ testConvertFromU(malteseUChars, sizeof(malteseUChars)/sizeof(malteseUChars[0]),
+ expectedMaltese913, sizeof(expectedMaltese913), "iso-8859-3", NULL,FALSE );
+
+ /*LMBCS*/
+ testConvertFromU(LMBCSUChars, sizeof(LMBCSUChars)/sizeof(LMBCSUChars[0]),
+ expectedLMBCS, sizeof(expectedLMBCS), "LMBCS-1", toLMBCSOffs,FALSE );
+ testConvertToU(expectedLMBCS, sizeof(expectedLMBCS),
+ LMBCSUChars, sizeof(LMBCSUChars)/sizeof(LMBCSUChars[0]), "LMBCS-1", fmLMBCSOffs,FALSE);
+#endif
+
+ /* UTF-7 examples are mostly from http://www.imc.org/rfc2152 */
+ {
+ /* encode directly set D and set O */
+ static const uint8_t utf7[] = {
+ /*
+ Hi Mom -+Jjo--!
+ A+ImIDkQ.
+ +-
+ +ZeVnLIqe
+ */
+ 0x48, 0x69, 0x20, 0x4d, 0x6f, 0x6d, 0x20, 0x2d, 0x2b, 0x4a, 0x6a, 0x6f, 0x2d, 0x2d, 0x21,
+ 0x41, 0x2b, 0x49, 0x6d, 0x49, 0x44, 0x6b, 0x51, 0x2e,
+ 0x2b, 0x2d,
+ 0x2b, 0x5a, 0x65, 0x56, 0x6e, 0x4c, 0x49, 0x71, 0x65
+ };
+ static const UChar unicode[] = {
+ /*
+ Hi Mom -<WHITE SMILING FACE>-!
+ A<NOT IDENTICAL TO><ALPHA>.
+ +
+ [Japanese word "nihongo"]
+ */
+ 0x48, 0x69, 0x20, 0x4d, 0x6f, 0x6d, 0x20, 0x2d, 0x263a, 0x2d, 0x21,
+ 0x41, 0x2262, 0x0391, 0x2e,
+ 0x2b,
+ 0x65e5, 0x672c, 0x8a9e
+ };
+ static const int32_t toUnicodeOffsets[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 9, 13, 14,
+ 15, 17, 19, 23,
+ 24,
+ 27, 29, 32
+ };
+ static const int32_t fromUnicodeOffsets[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 9, 10,
+ 11, 12, 12, 12, 13, 13, 13, 13, 14,
+ 15, 15,
+ 16, 16, 16, 17, 17, 17, 18, 18, 18
+ };
+
+ /* same but escaping set O (the exclamation mark) */
+ static const uint8_t utf7Restricted[] = {
+ /*
+ Hi Mom -+Jjo--+ACE-
+ A+ImIDkQ.
+ +-
+ +ZeVnLIqe
+ */
+ 0x48, 0x69, 0x20, 0x4d, 0x6f, 0x6d, 0x20, 0x2d, 0x2b, 0x4a, 0x6a, 0x6f, 0x2d, 0x2d, 0x2b, 0x41, 0x43, 0x45, 0x2d,
+ 0x41, 0x2b, 0x49, 0x6d, 0x49, 0x44, 0x6b, 0x51, 0x2e,
+ 0x2b, 0x2d,
+ 0x2b, 0x5a, 0x65, 0x56, 0x6e, 0x4c, 0x49, 0x71, 0x65
+ };
+ static const int32_t toUnicodeOffsetsR[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 9, 13, 15,
+ 19, 21, 23, 27,
+ 28,
+ 31, 33, 36
+ };
+ static const int32_t fromUnicodeOffsetsR[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 9, 10, 10, 10, 10, 10,
+ 11, 12, 12, 12, 13, 13, 13, 13, 14,
+ 15, 15,
+ 16, 16, 16, 17, 17, 17, 18, 18, 18
+ };
+
+ testConvertFromU(unicode, sizeof(unicode)/U_SIZEOF_UCHAR, utf7, sizeof(utf7), "UTF-7", fromUnicodeOffsets,FALSE);
+
+ testConvertToU(utf7, sizeof(utf7), unicode, sizeof(unicode)/U_SIZEOF_UCHAR, "UTF-7", toUnicodeOffsets,FALSE);
+
+ testConvertFromU(unicode, sizeof(unicode)/U_SIZEOF_UCHAR, utf7Restricted, sizeof(utf7Restricted), "UTF-7,version=1", fromUnicodeOffsetsR,FALSE);
+
+ testConvertToU(utf7Restricted, sizeof(utf7Restricted), unicode, sizeof(unicode)/U_SIZEOF_UCHAR, "UTF-7,version=1", toUnicodeOffsetsR,FALSE);
+ }
+
+ /*
+ * IMAP-mailbox-name examples are mostly from http://www.imc.org/rfc2152,
+ * modified according to RFC 2060,
+ * and supplemented with the one example in RFC 2060 itself.
+ */
+ {
+ static const uint8_t imap[] = {
+ /* Hi Mom -&Jjo--!
+ A&ImIDkQ-.
+ &-
+ &ZeVnLIqe-
+ \
+ ~peter
+ /mail
+ /&ZeVnLIqe-
+ /&U,BTFw-
+ */
+ 0x48, 0x69, 0x20, 0x4d, 0x6f, 0x6d, 0x20, 0x2d, 0x26, 0x4a, 0x6a, 0x6f, 0x2d, 0x2d, 0x21,
+ 0x41, 0x26, 0x49, 0x6d, 0x49, 0x44, 0x6b, 0x51, 0x2d, 0x2e,
+ 0x26, 0x2d,
+ 0x26, 0x5a, 0x65, 0x56, 0x6e, 0x4c, 0x49, 0x71, 0x65, 0x2d,
+ 0x5c,
+ 0x7e, 0x70, 0x65, 0x74, 0x65, 0x72,
+ 0x2f, 0x6d, 0x61, 0x69, 0x6c,
+ 0x2f, 0x26, 0x5a, 0x65, 0x56, 0x6e, 0x4c, 0x49, 0x71, 0x65, 0x2d,
+ 0x2f, 0x26, 0x55, 0x2c, 0x42, 0x54, 0x46, 0x77, 0x2d
+ };
+ static const UChar unicode[] = {
+ /* Hi Mom -<WHITE SMILING FACE>-!
+ A<NOT IDENTICAL TO><ALPHA>.
+ &
+ [Japanese word "nihongo"]
+ \
+ ~peter
+ /mail
+ /<65e5, 672c, 8a9e>
+ /<53f0, 5317>
+ */
+ 0x48, 0x69, 0x20, 0x4d, 0x6f, 0x6d, 0x20, 0x2d, 0x263a, 0x2d, 0x21,
+ 0x41, 0x2262, 0x0391, 0x2e,
+ 0x26,
+ 0x65e5, 0x672c, 0x8a9e,
+ 0x5c,
+ 0x7e, 0x70, 0x65, 0x74, 0x65, 0x72,
+ 0x2f, 0x6d, 0x61, 0x69, 0x6c,
+ 0x2f, 0x65e5, 0x672c, 0x8a9e,
+ 0x2f, 0x53f0, 0x5317
+ };
+ static const int32_t toUnicodeOffsets[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 9, 13, 14,
+ 15, 17, 19, 24,
+ 25,
+ 28, 30, 33,
+ 37,
+ 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48,
+ 49, 51, 53, 56,
+ 60, 62, 64
+ };
+ static const int32_t fromUnicodeOffsets[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 9, 10,
+ 11, 12, 12, 12, 13, 13, 13, 13, 13, 14,
+ 15, 15,
+ 16, 16, 16, 17, 17, 17, 18, 18, 18, 18,
+ 19,
+ 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30,
+ 31, 32, 32, 32, 33, 33, 33, 34, 34, 34, 34,
+ 35, 36, 36, 36, 37, 37, 37, 37, 37
+ };
+
+ testConvertFromU(unicode, sizeof(unicode)/U_SIZEOF_UCHAR, imap, sizeof(imap), "IMAP-mailbox-name", fromUnicodeOffsets,FALSE);
+
+ testConvertToU(imap, sizeof(imap), unicode, sizeof(unicode)/U_SIZEOF_UCHAR, "IMAP-mailbox-name", toUnicodeOffsets,FALSE);
+ }
+
+ /* Test UTF-8 bad data handling*/
+ {
+ static const uint8_t utf8[]={
+ 0x61,
+ 0xf7, 0xbf, 0xbf, 0xbf, /* > 10FFFF */
+ 0x00,
+ 0x62,
+ 0xfb, 0xbf, 0xbf, 0xbf, 0xbf, /* > 10FFFF */
+ 0xfb, 0xbf, 0xbf, 0xbf, 0xbf, /* > 10FFFF */
+ 0xf4, 0x8f, 0xbf, 0xbf, /* 10FFFF */
+ 0xdf, 0xbf, /* 7ff */
+ 0xbf, /* truncated tail */
+ 0xf4, 0x90, 0x80, 0x80, /* 11FFFF */
+ 0x02
+ };
+
+ static const uint16_t utf8Expected[]={
+ 0x0061,
+ 0xfffd,
+ 0x0000,
+ 0x0062,
+ 0xfffd,
+ 0xfffd,
+ 0xdbff, 0xdfff,
+ 0x07ff,
+ 0xfffd,
+ 0xfffd,
+ 0x0002
+ };
+
+ static const int32_t utf8Offsets[]={
+ 0, 1, 5, 6, 7, 12, 17, 17, 21, 23, 24, 28
+ };
+ testConvertToU(utf8, sizeof(utf8),
+ utf8Expected, sizeof(utf8Expected)/sizeof(utf8Expected[0]), "utf-8", utf8Offsets ,FALSE);
+
+ }
+
+ /* Test UTF-32BE bad data handling*/
+ {
+ static const uint8_t utf32[]={
+ 0x00, 0x00, 0x00, 0x61,
+ 0x00, 0x11, 0x00, 0x00, /* 0x110000 out of range */
+ 0x00, 0x10, 0xff, 0xff, /* 0x10FFFF in range */
+ 0x00, 0x00, 0x00, 0x62,
+ 0xff, 0xff, 0xff, 0xff, /* 0xffffffff out of range */
+ 0x7f, 0xff, 0xff, 0xff, /* 0x7fffffff out of range */
+ 0x00, 0x00, 0x01, 0x62,
+ 0x00, 0x00, 0x02, 0x62
+ };
+ static const uint16_t utf32Expected[]={
+ 0x0061,
+ 0xfffd, /* 0x110000 out of range */
+ 0xDBFF, /* 0x10FFFF in range */
+ 0xDFFF,
+ 0x0062,
+ 0xfffd, /* 0xffffffff out of range */
+ 0xfffd, /* 0x7fffffff out of range */
+ 0x0162,
+ 0x0262
+ };
+ static const int32_t utf32Offsets[]={
+ 0, 4, 8, 8, 12, 16, 20, 24, 28
+ };
+ static const uint8_t utf32ExpectedBack[]={
+ 0x00, 0x00, 0x00, 0x61,
+ 0x00, 0x00, 0xff, 0xfd, /* 0x110000 out of range */
+ 0x00, 0x10, 0xff, 0xff, /* 0x10FFFF in range */
+ 0x00, 0x00, 0x00, 0x62,
+ 0x00, 0x00, 0xff, 0xfd, /* 0xffffffff out of range */
+ 0x00, 0x00, 0xff, 0xfd, /* 0x7fffffff out of range */
+ 0x00, 0x00, 0x01, 0x62,
+ 0x00, 0x00, 0x02, 0x62
+ };
+ static const int32_t utf32OffsetsBack[]={
+ 0,0,0,0,
+ 1,1,1,1,
+ 2,2,2,2,
+ 4,4,4,4,
+ 5,5,5,5,
+ 6,6,6,6,
+ 7,7,7,7,
+ 8,8,8,8
+ };
+
+ testConvertToU(utf32, sizeof(utf32),
+ utf32Expected, sizeof(utf32Expected)/sizeof(utf32Expected[0]), "utf-32be", utf32Offsets ,FALSE);
+ testConvertFromU(utf32Expected, sizeof(utf32Expected)/sizeof(utf32Expected[0]),
+ utf32ExpectedBack, sizeof(utf32ExpectedBack), "utf-32be", utf32OffsetsBack, FALSE);
+ }
+
+ /* Test UTF-32LE bad data handling*/
+ {
+ static const uint8_t utf32[]={
+ 0x61, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x11, 0x00, /* 0x110000 out of range */
+ 0xff, 0xff, 0x10, 0x00, /* 0x10FFFF in range */
+ 0x62, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, /* 0xffffffff out of range */
+ 0xff, 0xff, 0xff, 0x7f, /* 0x7fffffff out of range */
+ 0x62, 0x01, 0x00, 0x00,
+ 0x62, 0x02, 0x00, 0x00,
+ };
+
+ static const uint16_t utf32Expected[]={
+ 0x0061,
+ 0xfffd, /* 0x110000 out of range */
+ 0xDBFF, /* 0x10FFFF in range */
+ 0xDFFF,
+ 0x0062,
+ 0xfffd, /* 0xffffffff out of range */
+ 0xfffd, /* 0x7fffffff out of range */
+ 0x0162,
+ 0x0262
+ };
+ static const int32_t utf32Offsets[]={
+ 0, 4, 8, 8, 12, 16, 20, 24, 28
+ };
+ static const uint8_t utf32ExpectedBack[]={
+ 0x61, 0x00, 0x00, 0x00,
+ 0xfd, 0xff, 0x00, 0x00, /* 0x110000 out of range */
+ 0xff, 0xff, 0x10, 0x00, /* 0x10FFFF in range */
+ 0x62, 0x00, 0x00, 0x00,
+ 0xfd, 0xff, 0x00, 0x00, /* 0xffffffff out of range */
+ 0xfd, 0xff, 0x00, 0x00, /* 0x7fffffff out of range */
+ 0x62, 0x01, 0x00, 0x00,
+ 0x62, 0x02, 0x00, 0x00
+ };
+ static const int32_t utf32OffsetsBack[]={
+ 0,0,0,0,
+ 1,1,1,1,
+ 2,2,2,2,
+ 4,4,4,4,
+ 5,5,5,5,
+ 6,6,6,6,
+ 7,7,7,7,
+ 8,8,8,8
+ };
+ testConvertToU(utf32, sizeof(utf32),
+ utf32Expected, sizeof(utf32Expected)/sizeof(utf32Expected[0]), "utf-32le", utf32Offsets,FALSE );
+ testConvertFromU(utf32Expected, sizeof(utf32Expected)/sizeof(utf32Expected[0]),
+ utf32ExpectedBack, sizeof(utf32ExpectedBack), "utf-32le", utf32OffsetsBack, FALSE);
+ }
+}
+
+static void TestCoverageMBCS(){
+#if 0
+ UErrorCode status = U_ZERO_ERROR;
+ const char *directory = loadTestData(&status);
+ char* tdpath = NULL;
+ char* saveDirectory = (char*)malloc(sizeof(char) *(strlen(u_getDataDirectory())+1));
+ int len = strlen(directory);
+ char* index=NULL;
+
+ tdpath = (char*) malloc(sizeof(char) * (len * 2));
+ uprv_strcpy(saveDirectory,u_getDataDirectory());
+ log_verbose("Retrieved data directory %s \n",saveDirectory);
+ uprv_strcpy(tdpath,directory);
+ index=strrchr(tdpath,(char)U_FILE_SEP_CHAR);
+
+ if((unsigned int)(index-tdpath) != (strlen(tdpath)-1)){
+ *(index+1)=0;
+ }
+ u_setDataDirectory(tdpath);
+ log_verbose("ICU data directory is set to: %s \n" ,tdpath);
+#endif
+
+ /*some more test to increase the code coverage in MBCS. Create an test converter from test1.ucm
+ which is test file for MBCS conversion with single-byte codepage data.*/
+ {
+
+ /* MBCS with single byte codepage data test1.ucm*/
+ const UChar unicodeInput[] = { 0x20ac, 0x0005, 0x0006, 0xdbc4, 0xde34, 0x0003};
+ const uint8_t expectedtest1[] = { 0x00, 0x05, 0xff, 0x07, 0xff,};
+ int32_t totest1Offs[] = { 0, 1, 2, 3, 5, };
+
+ /*from Unicode*/
+ testConvertFromU(unicodeInput, sizeof(unicodeInput)/sizeof(unicodeInput[0]),
+ expectedtest1, sizeof(expectedtest1), "@test1", totest1Offs,FALSE );
+ }
+
+ /*some more test to increase the code coverage in MBCS. Create an test converter from test3.ucm
+ which is test file for MBCS conversion with three-byte codepage data.*/
+ {
+
+ /* MBCS with three byte codepage data test3.ucm*/
+ const UChar unicodeInput[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56, 0x000e};
+ const uint8_t expectedtest3[] = { 0x00, 0x05, 0xff, 0x01, 0x02, 0x0b, 0x07, 0x01, 0x02, 0x0a, 0xff,};
+ int32_t totest3Offs[] = { 0, 1, 2, 3, 3, 3, 4, 6, 6, 6, 8};
+
+ const uint8_t test3input[] = { 0x00, 0x05, 0x06, 0x01, 0x02, 0x0b, 0x07, 0x01, 0x02, 0x0a, 0x01, 0x02, 0x0c,};
+ const UChar expectedUnicode[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56, 0xfffd};
+ int32_t fromtest3Offs[] = { 0, 1, 2, 3, 6, 6, 7, 7, 10 };
+
+ /*from Unicode*/
+ testConvertFromU(unicodeInput, sizeof(unicodeInput)/sizeof(unicodeInput[0]),
+ expectedtest3, sizeof(expectedtest3), "@test3", totest3Offs,FALSE );
+
+ /*to Unicode*/
+ testConvertToU(test3input, sizeof(test3input),
+ expectedUnicode, sizeof(expectedUnicode)/sizeof(expectedUnicode[0]), "@test3", fromtest3Offs ,FALSE);
+
+ }
+
+ /*some more test to increase the code coverage in MBCS. Create an test converter from test4.ucm
+ which is test file for MBCS conversion with four-byte codepage data.*/
+ {
+
+ /* MBCS with three byte codepage data test4.ucm*/
+ static const UChar unicodeInput[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56, 0x000e};
+ static const uint8_t expectedtest4[] = { 0x00, 0x05, 0xff, 0x01, 0x02, 0x03, 0x0b, 0x07, 0x01, 0x02, 0x03, 0x0a, 0xff,};
+ static const int32_t totest4Offs[] = { 0, 1, 2, 3, 3, 3, 3, 4, 6, 6, 6, 6, 8,};
+
+ static const uint8_t test4input[] = { 0x00, 0x05, 0x06, 0x01, 0x02, 0x03, 0x0b, 0x07, 0x01, 0x02, 0x03, 0x0a, 0x01, 0x02, 0x03, 0x0c,};
+ static const UChar expectedUnicode[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56, 0xfffd};
+ static const int32_t fromtest4Offs[] = { 0, 1, 2, 3, 7, 7, 8, 8, 12,};
+
+ /*from Unicode*/
+ testConvertFromU(unicodeInput, sizeof(unicodeInput)/sizeof(unicodeInput[0]),
+ expectedtest4, sizeof(expectedtest4), "@test4", totest4Offs,FALSE );
+
+ /*to Unicode*/
+ testConvertToU(test4input, sizeof(test4input),
+ expectedUnicode, sizeof(expectedUnicode)/sizeof(expectedUnicode[0]), "@test4", fromtest4Offs,FALSE );
+
+ }
+#if 0
+ free(tdpath);
+ /* restore the original data directory */
+ log_verbose("Setting the data directory to %s \n", saveDirectory);
+ u_setDataDirectory(saveDirectory);
+ free(saveDirectory);
+#endif
+
+}
+
+static void TestConverterType(const char *convName, UConverterType convType) {
+ UConverter* myConverter;
+ UErrorCode err = U_ZERO_ERROR;
+
+ myConverter = my_ucnv_open(convName, &err);
+
+ if (U_FAILURE(err)) {
+ log_data_err("Failed to create an %s converter\n", convName);
+ return;
+ }
+ else
+ {
+ if (ucnv_getType(myConverter)!=convType) {
+ log_err("ucnv_getType Failed for %s. Got enum value 0x%X\n",
+ convName, convType);
+ }
+ else {
+ log_verbose("ucnv_getType %s ok\n", convName);
+ }
+ }
+ ucnv_close(myConverter);
+}
+
+static void TestConverterTypesAndStarters()
+{
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ UConverter* myConverter;
+ UErrorCode err = U_ZERO_ERROR;
+ UBool mystarters[256];
+
+/* const UBool expectedKSCstarters[256] = {
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE};*/
+
+
+ log_verbose("Testing KSC, ibm-930, ibm-878 for starters and their conversion types.");
+
+ myConverter = ucnv_open("ksc", &err);
+ if (U_FAILURE(err)) {
+ log_data_err("Failed to create an ibm-ksc converter\n");
+ return;
+ }
+ else
+ {
+ if (ucnv_getType(myConverter)!=UCNV_MBCS)
+ log_err("ucnv_getType Failed for ibm-949\n");
+ else
+ log_verbose("ucnv_getType ibm-949 ok\n");
+
+ if(myConverter!=NULL)
+ ucnv_getStarters(myConverter, mystarters, &err);
+
+ /*if (memcmp(expectedKSCstarters, mystarters, sizeof(expectedKSCstarters)))
+ log_err("Failed ucnv_getStarters for ksc\n");
+ else
+ log_verbose("ucnv_getStarters ok\n");*/
+
+ }
+ ucnv_close(myConverter);
+
+ TestConverterType("ibm-930", UCNV_EBCDIC_STATEFUL);
+ TestConverterType("ibm-878", UCNV_SBCS);
+#endif
+
+ TestConverterType("iso-8859-1", UCNV_LATIN_1);
+
+ TestConverterType("ibm-1208", UCNV_UTF8);
+
+ TestConverterType("utf-8", UCNV_UTF8);
+ TestConverterType("UTF-16BE", UCNV_UTF16_BigEndian);
+ TestConverterType("UTF-16LE", UCNV_UTF16_LittleEndian);
+ TestConverterType("UTF-32BE", UCNV_UTF32_BigEndian);
+ TestConverterType("UTF-32LE", UCNV_UTF32_LittleEndian);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+
+#if defined(U_ENABLE_GENERIC_ISO_2022)
+ TestConverterType("iso-2022", UCNV_ISO_2022);
+#endif
+
+ TestConverterType("hz", UCNV_HZ);
+#endif
+
+ TestConverterType("scsu", UCNV_SCSU);
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ TestConverterType("x-iscii-de", UCNV_ISCII);
+#endif
+
+ TestConverterType("ascii", UCNV_US_ASCII);
+ TestConverterType("utf-7", UCNV_UTF7);
+ TestConverterType("IMAP-mailbox-name", UCNV_IMAP_MAILBOX);
+ TestConverterType("bocu-1", UCNV_BOCU1);
+}
+
+static void
+TestAmbiguousConverter(UConverter *cnv) {
+ static const char inBytes[3]={ 0x61, 0x5B, 0x5c };
+ UChar outUnicode[20]={ 0, 0, 0, 0 };
+
+ const char *s;
+ UChar *u;
+ UErrorCode errorCode;
+ UBool isAmbiguous;
+
+ /* try to convert an 'a', a square bracket and a US-ASCII backslash */
+ errorCode=U_ZERO_ERROR;
+ s=inBytes;
+ u=outUnicode;
+ ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ /* we do not care about general failures in this test; the input may just not be mappable */
+ return;
+ }
+
+ if(outUnicode[0]!=0x61 || outUnicode[1]!=0x5B || outUnicode[2]==0xfffd) {
+ /* not a close ASCII-family encoding, or 0x5c is unassigned/illegal: this test is not applicable */
+ /* There are some encodings that are partially ASCII based,
+ like the ISO-7 and GSM series of codepages, which we ignore. */
+ return;
+ }
+
+ isAmbiguous=ucnv_isAmbiguous(cnv);
+
+ /* check that outUnicode[1]!=0x5c is exactly the same as ucnv_isAmbiguous() */
+ if((outUnicode[2]!=0x5c)!=isAmbiguous) {
+ log_err("error: converter \"%s\" needs a backslash fix: %d but ucnv_isAmbiguous()==%d\n",
+ ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous);
+ return;
+ }
+
+ if(outUnicode[2]!=0x5c) {
+ /* needs fixup, fix it */
+ ucnv_fixFileSeparator(cnv, outUnicode, (int32_t)(u-outUnicode));
+ if(outUnicode[2]!=0x5c) {
+ /* the fix failed */
+ log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode));
+ return;
+ }
+ }
+}
+
+static void TestAmbiguous()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *ascii_cnv = 0, *sjis_cnv = 0, *cnv;
+ static const char target[] = {
+ /* "\\usr\\local\\share\\data\\icutest.txt" */
+ 0x5c, 0x75, 0x73, 0x72,
+ 0x5c, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
+ 0x5c, 0x64, 0x61, 0x74, 0x61,
+ 0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
+ 0
+ };
+ UChar asciiResult[200], sjisResult[200];
+ int32_t asciiLength = 0, sjisLength = 0, i;
+ const char *name;
+
+ /* enumerate all converters */
+ status=U_ZERO_ERROR;
+ for(i=0; (name=ucnv_getAvailableName(i))!=NULL; ++i) {
+ cnv=ucnv_open(name, &status);
+ if(U_SUCCESS(status)) {
+ TestAmbiguousConverter(cnv);
+ ucnv_close(cnv);
+ } else {
+ log_err("error: unable to open available converter \"%s\"\n", name);
+ status=U_ZERO_ERROR;
+ }
+ }
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ sjis_cnv = ucnv_open("ibm-943", &status);
+ if (U_FAILURE(status))
+ {
+ log_data_err("Failed to create a SJIS converter\n");
+ return;
+ }
+ ascii_cnv = ucnv_open("LATIN-1", &status);
+ if (U_FAILURE(status))
+ {
+ log_data_err("Failed to create a LATIN-1 converter\n");
+ ucnv_close(sjis_cnv);
+ return;
+ }
+ /* convert target from SJIS to Unicode */
+ sjisLength = ucnv_toUChars(sjis_cnv, sjisResult, sizeof(sjisResult)/U_SIZEOF_UCHAR, target, (int32_t)strlen(target), &status);
+ if (U_FAILURE(status))
+ {
+ log_err("Failed to convert the SJIS string.\n");
+ ucnv_close(sjis_cnv);
+ ucnv_close(ascii_cnv);
+ return;
+ }
+ /* convert target from Latin-1 to Unicode */
+ asciiLength = ucnv_toUChars(ascii_cnv, asciiResult, sizeof(asciiResult)/U_SIZEOF_UCHAR, target, (int32_t)strlen(target), &status);
+ if (U_FAILURE(status))
+ {
+ log_err("Failed to convert the Latin-1 string.\n");
+ ucnv_close(sjis_cnv);
+ ucnv_close(ascii_cnv);
+ return;
+ }
+ if (!ucnv_isAmbiguous(sjis_cnv))
+ {
+ log_err("SJIS converter should contain ambiguous character mappings.\n");
+ ucnv_close(sjis_cnv);
+ ucnv_close(ascii_cnv);
+ return;
+ }
+ if (u_strcmp(sjisResult, asciiResult) == 0)
+ {
+ log_err("File separators for SJIS don't need to be fixed.\n");
+ }
+ ucnv_fixFileSeparator(sjis_cnv, sjisResult, sjisLength);
+ if (u_strcmp(sjisResult, asciiResult) != 0)
+ {
+ log_err("Fixing file separator for SJIS failed.\n");
+ }
+ ucnv_close(sjis_cnv);
+ ucnv_close(ascii_cnv);
+#endif
+}
+
+static void
+TestSignatureDetection(){
+ /* with null terminated strings */
+ {
+ static const char* data[] = {
+ "\xFE\xFF\x00\x00", /* UTF-16BE */
+ "\xFF\xFE\x00\x00", /* UTF-16LE */
+ "\xEF\xBB\xBF\x00", /* UTF-8 */
+ "\x0E\xFE\xFF\x00", /* SCSU */
+
+ "\xFE\xFF", /* UTF-16BE */
+ "\xFF\xFE", /* UTF-16LE */
+ "\xEF\xBB\xBF", /* UTF-8 */
+ "\x0E\xFE\xFF", /* SCSU */
+
+ "\xFE\xFF\x41\x42", /* UTF-16BE */
+ "\xFF\xFE\x41\x41", /* UTF-16LE */
+ "\xEF\xBB\xBF\x41", /* UTF-8 */
+ "\x0E\xFE\xFF\x41", /* SCSU */
+
+ "\x2B\x2F\x76\x38\x2D", /* UTF-7 */
+ "\x2B\x2F\x76\x38\x41", /* UTF-7 */
+ "\x2B\x2F\x76\x39\x41", /* UTF-7 */
+ "\x2B\x2F\x76\x2B\x41", /* UTF-7 */
+ "\x2B\x2F\x76\x2F\x41", /* UTF-7 */
+
+ "\xDD\x73\x66\x73" /* UTF-EBCDIC */
+ };
+ static const char* expected[] = {
+ "UTF-16BE",
+ "UTF-16LE",
+ "UTF-8",
+ "SCSU",
+
+ "UTF-16BE",
+ "UTF-16LE",
+ "UTF-8",
+ "SCSU",
+
+ "UTF-16BE",
+ "UTF-16LE",
+ "UTF-8",
+ "SCSU",
+
+ "UTF-7",
+ "UTF-7",
+ "UTF-7",
+ "UTF-7",
+ "UTF-7",
+ "UTF-EBCDIC"
+ };
+ static const int32_t expectedLength[] ={
+ 2,
+ 2,
+ 3,
+ 3,
+
+ 2,
+ 2,
+ 3,
+ 3,
+
+ 2,
+ 2,
+ 3,
+ 3,
+
+ 5,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4
+ };
+ int i=0;
+ UErrorCode err;
+ int32_t signatureLength = -1;
+ const char* source = NULL;
+ const char* enc = NULL;
+ for( ; i<sizeof(data)/sizeof(char*); i++){
+ err = U_ZERO_ERROR;
+ source = data[i];
+ enc = ucnv_detectUnicodeSignature(source, -1 , &signatureLength, &err);
+ if(U_FAILURE(err)){
+ log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i. Error: %s\n", source,i,u_errorName(err));
+ continue;
+ }
+ if(enc == NULL || strcmp(enc,expected[i]) !=0){
+ log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i. Expected: %s. Got: %s\n",source,i,expected[i],enc);
+ continue;
+ }
+ if(signatureLength != expectedLength[i]){
+ log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i.Expected Length: %i. Got length: %i\n",source,i,signatureLength,expectedLength[i]);
+ }
+ }
+ }
+ {
+ static const char* data[] = {
+ "\xFE\xFF\x00", /* UTF-16BE */
+ "\xFF\xFE\x00", /* UTF-16LE */
+ "\xEF\xBB\xBF\x00", /* UTF-8 */
+ "\x0E\xFE\xFF\x00", /* SCSU */
+ "\x00\x00\xFE\xFF", /* UTF-32BE */
+ "\xFF\xFE\x00\x00", /* UTF-32LE */
+ "\xFE\xFF", /* UTF-16BE */
+ "\xFF\xFE", /* UTF-16LE */
+ "\xEF\xBB\xBF", /* UTF-8 */
+ "\x0E\xFE\xFF", /* SCSU */
+ "\x00\x00\xFE\xFF", /* UTF-32BE */
+ "\xFF\xFE\x00\x00", /* UTF-32LE */
+ "\xFE\xFF\x41\x42", /* UTF-16BE */
+ "\xFF\xFE\x41\x41", /* UTF-16LE */
+ "\xEF\xBB\xBF\x41", /* UTF-8 */
+ "\x0E\xFE\xFF\x41", /* SCSU */
+ "\x00\x00\xFE\xFF\x41", /* UTF-32BE */
+ "\xFF\xFE\x00\x00\x42", /* UTF-32LE */
+ "\xFB\xEE\x28", /* BOCU-1 */
+ "\xFF\x41\x42" /* NULL */
+ };
+ static const int len[] = {
+ 3,
+ 3,
+ 4,
+ 4,
+ 4,
+ 4,
+ 2,
+ 2,
+ 3,
+ 3,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 5,
+ 5,
+ 3,
+ 3
+ };
+
+ static const char* expected[] = {
+ "UTF-16BE",
+ "UTF-16LE",
+ "UTF-8",
+ "SCSU",
+ "UTF-32BE",
+ "UTF-32LE",
+ "UTF-16BE",
+ "UTF-16LE",
+ "UTF-8",
+ "SCSU",
+ "UTF-32BE",
+ "UTF-32LE",
+ "UTF-16BE",
+ "UTF-16LE",
+ "UTF-8",
+ "SCSU",
+ "UTF-32BE",
+ "UTF-32LE",
+ "BOCU-1",
+ NULL
+ };
+ static const int32_t expectedLength[] ={
+ 2,
+ 2,
+ 3,
+ 3,
+ 4,
+ 4,
+ 2,
+ 2,
+ 3,
+ 3,
+ 4,
+ 4,
+ 2,
+ 2,
+ 3,
+ 3,
+ 4,
+ 4,
+ 3,
+ 0
+ };
+ int i=0;
+ UErrorCode err;
+ int32_t signatureLength = -1;
+ int32_t sourceLength=-1;
+ const char* source = NULL;
+ const char* enc = NULL;
+ for( ; i<sizeof(data)/sizeof(char*); i++){
+ err = U_ZERO_ERROR;
+ source = data[i];
+ sourceLength = len[i];
+ enc = ucnv_detectUnicodeSignature(source, sourceLength , &signatureLength, &err);
+ if(U_FAILURE(err)){
+ log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i. Error: %s\n", source,i,u_errorName(err));
+ continue;
+ }
+ if(enc == NULL || strcmp(enc,expected[i]) !=0){
+ if(expected[i] !=NULL){
+ log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i. Expected: %s. Got: %s\n",source,i,expected[i],enc);
+ continue;
+ }
+ }
+ if(signatureLength != expectedLength[i]){
+ log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i.Expected Length: %i. Got length: %i\n",source,i,signatureLength,expectedLength[i]);
+ }
+ }
+ }
+}
+
+void
+static TestUTF7() {
+ /* test input */
+ static const uint8_t in[]={
+ /* H - +Jjo- - ! +- +2AHcAQ */
+ 0x48,
+ 0x2d,
+ 0x2b, 0x4a, 0x6a, 0x6f,
+ 0x2d, 0x2d,
+ 0x21,
+ 0x2b, 0x2d,
+ 0x2b, 0x32, 0x41, 0x48, 0x63, 0x41, 0x51
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x48,
+ 1, 0x2d,
+ 4, 0x263a, /* <WHITE SMILING FACE> */
+ 2, 0x2d,
+ 1, 0x21,
+ 2, 0x2b,
+ 7, 0x10401
+ };
+
+ const char *cnvName;
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("UTF-7", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF-7 converter: %s\n", u_errorName(errorCode)); /* sholdn't be a data err */
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "UTF-7");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ cnvName = ucnv_getName(cnv, &errorCode);
+ if (U_FAILURE(errorCode) || uprv_strcmp(cnvName, "UTF-7") != 0) {
+ log_err("UTF-7 converter is called %s: %s\n", cnvName, u_errorName(errorCode));
+ }
+ ucnv_close(cnv);
+}
+
+void
+static TestIMAP() {
+ /* test input */
+ static const uint8_t in[]={
+ /* H - &Jjo- - ! &- &2AHcAQ- \ */
+ 0x48,
+ 0x2d,
+ 0x26, 0x4a, 0x6a, 0x6f,
+ 0x2d, 0x2d,
+ 0x21,
+ 0x26, 0x2d,
+ 0x26, 0x32, 0x41, 0x48, 0x63, 0x41, 0x51, 0x2d
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x48,
+ 1, 0x2d,
+ 4, 0x263a, /* <WHITE SMILING FACE> */
+ 2, 0x2d,
+ 1, 0x21,
+ 2, 0x26,
+ 7, 0x10401
+ };
+
+ const char *cnvName;
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a IMAP-mailbox-name converter: %s\n", u_errorName(errorCode)); /* sholdn't be a data err */
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ cnvName = ucnv_getName(cnv, &errorCode);
+ if (U_FAILURE(errorCode) || uprv_strcmp(cnvName, "IMAP-mailbox-name") != 0) {
+ log_err("IMAP-mailbox-name converter is called %s: %s\n", cnvName, u_errorName(errorCode));
+ }
+ ucnv_close(cnv);
+}
+
+void
+static TestUTF8() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x61,
+ 0xc2, 0x80,
+ 0xe0, 0xa0, 0x80,
+ 0xf0, 0x90, 0x80, 0x80,
+ 0xf4, 0x84, 0x8c, 0xa1,
+ 0xf0, 0x90, 0x90, 0x81
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x61,
+ 2, 0x80,
+ 3, 0x800,
+ 4, 0x10000,
+ 4, 0x104321,
+ 4, 0x10401
+ };
+
+ /* error test input */
+ static const uint8_t in2[]={
+ 0x61,
+ 0xc0, 0x80, /* illegal non-shortest form */
+ 0xe0, 0x80, 0x80, /* illegal non-shortest form */
+ 0xf0, 0x80, 0x80, 0x80, /* illegal non-shortest form */
+ 0xc0, 0xc0, /* illegal trail byte */
+ 0xf4, 0x90, 0x80, 0x80, /* 0x110000 out of range */
+ 0xf8, 0x80, 0x80, 0x80, 0x80, /* too long */
+ 0xfe, /* illegal byte altogether */
+ 0x62
+ };
+
+ /* expected error test results */
+ static const int32_t results2[]={
+ /* number of bytes read, code point */
+ 1, 0x61,
+ 22, 0x62
+ };
+
+ UConverterToUCallback cb;
+ const void *p;
+
+ const char *source=(const char *)in,*limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("UTF-8", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF-8 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "UTF-8");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+
+ /* test error behavior with a skip callback */
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
+ source=(const char *)in2;
+ limit=(const char *)(in2+sizeof(in2));
+ TestNextUChar(cnv, source, limit, results2, "UTF-8");
+
+ ucnv_close(cnv);
+}
+
+void
+static TestCESU8() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x61,
+ 0xc2, 0x80,
+ 0xe0, 0xa0, 0x80,
+ 0xed, 0xa0, 0x80, 0xed, 0xb0, 0x80,
+ 0xed, 0xb0, 0x81, 0xed, 0xa0, 0x82,
+ 0xed, 0xaf, 0xbf, 0xed, 0xbf, 0xbf,
+ 0xef, 0xbf, 0xbc
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x61,
+ 2, 0x80,
+ 3, 0x800,
+ 6, 0x10000,
+ 3, 0xdc01,
+ -1,0xd802, /* may read 3 or 6 bytes */
+ -1,0x10ffff,/* may read 0 or 3 bytes */
+ 3, 0xfffc
+ };
+
+ /* error test input */
+ static const uint8_t in2[]={
+ 0x61,
+ 0xc0, 0x80, /* illegal non-shortest form */
+ 0xe0, 0x80, 0x80, /* illegal non-shortest form */
+ 0xf0, 0x80, 0x80, 0x80, /* illegal non-shortest form */
+ 0xc0, 0xc0, /* illegal trail byte */
+ 0xf0, 0x90, 0x80, 0x80, /* illegal 4-byte supplementary code point */
+ 0xf4, 0x84, 0x8c, 0xa1, /* illegal 4-byte supplementary code point */
+ 0xf0, 0x90, 0x90, 0x81, /* illegal 4-byte supplementary code point */
+ 0xf4, 0x90, 0x80, 0x80, /* 0x110000 out of range */
+ 0xf8, 0x80, 0x80, 0x80, 0x80, /* too long */
+ 0xfe, /* illegal byte altogether */
+ 0x62
+ };
+
+ /* expected error test results */
+ static const int32_t results2[]={
+ /* number of bytes read, code point */
+ 1, 0x61,
+ 34, 0x62
+ };
+
+ UConverterToUCallback cb;
+ const void *p;
+
+ const char *source=(const char *)in,*limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("CESU-8", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a CESU-8 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "CESU-8");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+
+ /* test error behavior with a skip callback */
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
+ source=(const char *)in2;
+ limit=(const char *)(in2+sizeof(in2));
+ TestNextUChar(cnv, source, limit, results2, "CESU-8");
+
+ ucnv_close(cnv);
+}
+
+void
+static TestUTF16() {
+ /* test input */
+ static const uint8_t in1[]={
+ 0xfe, 0xff, 0x4e, 0x00, 0xfe, 0xff
+ };
+ static const uint8_t in2[]={
+ 0xff, 0xfe, 0x4e, 0x00, 0xfe, 0xff
+ };
+ static const uint8_t in3[]={
+ 0xfe, 0xfe, 0x4e, 0x00, 0xfe, 0xff, 0xd8, 0x40, 0xdc, 0x01
+ };
+
+ /* expected test results */
+ static const int32_t results1[]={
+ /* number of bytes read, code point */
+ 4, 0x4e00,
+ 2, 0xfeff
+ };
+ static const int32_t results2[]={
+ /* number of bytes read, code point */
+ 4, 0x004e,
+ 2, 0xfffe
+ };
+ static const int32_t results3[]={
+ /* number of bytes read, code point */
+ 2, 0xfefe,
+ 2, 0x4e00,
+ 2, 0xfeff,
+ 4, 0x20001
+ };
+
+ const char *source, *limit;
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("UTF-16", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF-16 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ source=(const char *)in1, limit=(const char *)in1+sizeof(in1);
+ TestNextUChar(cnv, source, limit, results1, "UTF-16");
+
+ source=(const char *)in2, limit=(const char *)in2+sizeof(in2);
+ ucnv_resetToUnicode(cnv);
+ TestNextUChar(cnv, source, limit, results2, "UTF-16");
+
+ source=(const char *)in3, limit=(const char *)in3+sizeof(in3);
+ ucnv_resetToUnicode(cnv);
+ TestNextUChar(cnv, source, limit, results3, "UTF-16");
+
+ /* Test the condition when source >= sourceLimit */
+ ucnv_resetToUnicode(cnv);
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+
+ ucnv_close(cnv);
+}
+
+void
+static TestUTF16BE() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x00, 0x61,
+ 0x00, 0xc0,
+ 0x00, 0x31,
+ 0x00, 0xf4,
+ 0xce, 0xfe,
+ 0xd8, 0x01, 0xdc, 0x01
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 2, 0x61,
+ 2, 0xc0,
+ 2, 0x31,
+ 2, 0xf4,
+ 2, 0xcefe,
+ 4, 0x10401
+ };
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("utf-16be", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF16-BE converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "UTF-16BE");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ /*Test for the condition where there is an invalid character*/
+ {
+ static const uint8_t source2[]={0x61};
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
+ }
+#if 0
+ /*
+ * Test disabled because currently the UTF-16BE/LE converters are supposed
+ * to not set errors for unpaired surrogates.
+ * This may change with
+ * Jitterbug 1838 - forbid converting surrogate code points in UTF-16/32
+ */
+
+ /*Test for the condition where there is a surrogate pair*/
+ {
+ const uint8_t source2[]={0xd8, 0x01};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
+ }
+#endif
+ ucnv_close(cnv);
+}
+
+static void
+TestUTF16LE() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x61, 0x00,
+ 0x31, 0x00,
+ 0x4e, 0x2e,
+ 0x4e, 0x00,
+ 0x01, 0xd8, 0x01, 0xdc
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 2, 0x61,
+ 2, 0x31,
+ 2, 0x2e4e,
+ 2, 0x4e,
+ 4, 0x10401
+ };
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("utf-16le", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF16-LE converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "UTF-16LE");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ /*Test for the condition where there is an invalid character*/
+ {
+ static const uint8_t source2[]={0x61};
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an invalid character");
+ }
+#if 0
+ /*
+ * Test disabled because currently the UTF-16BE/LE converters are supposed
+ * to not set errors for unpaired surrogates.
+ * This may change with
+ * Jitterbug 1838 - forbid converting surrogate code points in UTF-16/32
+ */
+
+ /*Test for the condition where there is a surrogate character*/
+ {
+ static const uint8_t source2[]={0x01, 0xd8};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CHAR_FOUND, "an truncated surrogate character");
+ }
+#endif
+
+ ucnv_close(cnv);
+}
+
+void
+static TestUTF32() {
+ /* test input */
+ static const uint8_t in1[]={
+ 0x00, 0x00, 0xfe, 0xff, 0x00, 0x10, 0x0f, 0x00, 0x00, 0x00, 0xfe, 0xff
+ };
+ static const uint8_t in2[]={
+ 0xff, 0xfe, 0x00, 0x00, 0x00, 0x10, 0x0f, 0x00, 0xfe, 0xff, 0x00, 0x00
+ };
+ static const uint8_t in3[]={
+ 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x10, 0x0f, 0x00, 0x00, 0x00, 0xd8, 0x40, 0x00, 0x00, 0xdc, 0x01
+ };
+
+ /* expected test results */
+ static const int32_t results1[]={
+ /* number of bytes read, code point */
+ 8, 0x100f00,
+ 4, 0xfeff
+ };
+ static const int32_t results2[]={
+ /* number of bytes read, code point */
+ 8, 0x0f1000,
+ 4, 0xfffe
+ };
+ static const int32_t results3[]={
+ /* number of bytes read, code point */
+ 4, 0xfefe,
+ 4, 0x100f00,
+ 4, 0xfffd, /* unmatched surrogate */
+ 4, 0xfffd /* unmatched surrogate */
+ };
+
+ const char *source, *limit;
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("UTF-32", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF-32 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ source=(const char *)in1, limit=(const char *)in1+sizeof(in1);
+ TestNextUChar(cnv, source, limit, results1, "UTF-32");
+
+ source=(const char *)in2, limit=(const char *)in2+sizeof(in2);
+ ucnv_resetToUnicode(cnv);
+ TestNextUChar(cnv, source, limit, results2, "UTF-32");
+
+ source=(const char *)in3, limit=(const char *)in3+sizeof(in3);
+ ucnv_resetToUnicode(cnv);
+ TestNextUChar(cnv, source, limit, results3, "UTF-32");
+
+ /* Test the condition when source >= sourceLimit */
+ ucnv_resetToUnicode(cnv);
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+
+ ucnv_close(cnv);
+}
+
+static void
+TestUTF32BE() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x00, 0x00, 0x00, 0x61,
+ 0x00, 0x00, 0x30, 0x61,
+ 0x00, 0x00, 0xdc, 0x00,
+ 0x00, 0x00, 0xd8, 0x00,
+ 0x00, 0x00, 0xdf, 0xff,
+ 0x00, 0x00, 0xff, 0xfe,
+ 0x00, 0x10, 0xab, 0xcd,
+ 0x00, 0x10, 0xff, 0xff
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 4, 0x61,
+ 4, 0x3061,
+ 4, 0xfffd,
+ 4, 0xfffd,
+ 4, 0xfffd,
+ 4, 0xfffe,
+ 4, 0x10abcd,
+ 4, 0x10ffff
+ };
+
+ /* error test input */
+ static const uint8_t in2[]={
+ 0x00, 0x00, 0x00, 0x61,
+ 0x00, 0x11, 0x00, 0x00, /* 0x110000 out of range */
+ 0x00, 0x00, 0x00, 0x62,
+ 0xff, 0xff, 0xff, 0xff, /* 0xffffffff out of range */
+ 0x7f, 0xff, 0xff, 0xff, /* 0x7fffffff out of range */
+ 0x00, 0x00, 0x01, 0x62,
+ 0x00, 0x00, 0x02, 0x62
+ };
+
+ /* expected error test results */
+ static const int32_t results2[]={
+ /* number of bytes read, code point */
+ 4, 0x61,
+ 8, 0x62,
+ 12, 0x162,
+ 4, 0x262
+ };
+
+ UConverterToUCallback cb;
+ const void *p;
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("UTF-32BE", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF-32BE converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "UTF-32BE");
+
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+
+ /* test error behavior with a skip callback */
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
+ source=(const char *)in2;
+ limit=(const char *)(in2+sizeof(in2));
+ TestNextUChar(cnv, source, limit, results2, "UTF-32BE");
+
+ ucnv_close(cnv);
+}
+
+static void
+TestUTF32LE() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x61, 0x00, 0x00, 0x00,
+ 0x61, 0x30, 0x00, 0x00,
+ 0x00, 0xdc, 0x00, 0x00,
+ 0x00, 0xd8, 0x00, 0x00,
+ 0xff, 0xdf, 0x00, 0x00,
+ 0xfe, 0xff, 0x00, 0x00,
+ 0xcd, 0xab, 0x10, 0x00,
+ 0xff, 0xff, 0x10, 0x00
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 4, 0x61,
+ 4, 0x3061,
+ 4, 0xfffd,
+ 4, 0xfffd,
+ 4, 0xfffd,
+ 4, 0xfffe,
+ 4, 0x10abcd,
+ 4, 0x10ffff
+ };
+
+ /* error test input */
+ static const uint8_t in2[]={
+ 0x61, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x11, 0x00, /* 0x110000 out of range */
+ 0x62, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, /* 0xffffffff out of range */
+ 0xff, 0xff, 0xff, 0x7f, /* 0x7fffffff out of range */
+ 0x62, 0x01, 0x00, 0x00,
+ 0x62, 0x02, 0x00, 0x00,
+ };
+
+ /* expected error test results */
+ static const int32_t results2[]={
+ /* number of bytes read, code point */
+ 4, 0x61,
+ 8, 0x62,
+ 12, 0x162,
+ 4, 0x262,
+ };
+
+ UConverterToUCallback cb;
+ const void *p;
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("UTF-32LE", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a UTF-32LE converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "UTF-32LE");
+
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+
+ /* test error behavior with a skip callback */
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode);
+ source=(const char *)in2;
+ limit=(const char *)(in2+sizeof(in2));
+ TestNextUChar(cnv, source, limit, results2, "UTF-32LE");
+
+ ucnv_close(cnv);
+}
+
+static void
+TestLATIN1() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x61,
+ 0x31,
+ 0x32,
+ 0xc0,
+ 0xf0,
+ 0xf4,
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x61,
+ 1, 0x31,
+ 1, 0x32,
+ 1, 0xc0,
+ 1, 0xf0,
+ 1, 0xf4,
+ };
+ static const uint16_t in1[] = {
+ 0x08, 0x00, 0x1b, 0x4c, 0xea, 0x16, 0xca, 0xd3, 0x94, 0x0f, 0x53, 0xef, 0x61, 0x1b, 0xe5, 0x84,
+ 0xc4, 0x0f, 0x53, 0xef, 0x61, 0x1b, 0xe5, 0x84, 0xc4, 0x16, 0xca, 0xd3, 0x94, 0x08, 0x02, 0x0f,
+ 0x53, 0x4a, 0x4e, 0x16, 0x7d, 0x00, 0x30, 0x82, 0x52, 0x4d, 0x30, 0x6b, 0x6d, 0x41, 0x88, 0x4c,
+ 0xe5, 0x97, 0x9f, 0x08, 0x0c, 0x16, 0xca, 0xd3, 0x94, 0x15, 0xae, 0x0e, 0x6b, 0x4c, 0x08, 0x0d,
+ 0x8c, 0xb4, 0xa3, 0x9f, 0xca, 0x99, 0xcb, 0x8b, 0xc2, 0x97, 0xcc, 0xaa, 0x84, 0x08, 0x02, 0x0e,
+ 0x7c, 0x73, 0xe2, 0x16, 0xa3, 0xb7, 0xcb, 0x93, 0xd3, 0xb4, 0xc5, 0xdc, 0x9f, 0x0e, 0x79, 0x3e,
+ 0x06, 0xae, 0xb1, 0x9d, 0x93, 0xd3, 0x08, 0x0c, 0xbe, 0xa3, 0x8f, 0x08, 0x88, 0xbe, 0xa3, 0x8d,
+ 0xd3, 0xa8, 0xa3, 0x97, 0xc5, 0x17, 0x89, 0x08, 0x0d, 0x15, 0xd2, 0x08, 0x01, 0x93, 0xc8, 0xaa,
+ 0x8f, 0x0e, 0x61, 0x1b, 0x99, 0xcb, 0x0e, 0x4e, 0xba, 0x9f, 0xa1, 0xae, 0x93, 0xa8, 0xa0, 0x08,
+ 0x02, 0x08, 0x0c, 0xe2, 0x16, 0xa3, 0xb7, 0xcb, 0x0f, 0x4f, 0xe1, 0x80, 0x05, 0xec, 0x60, 0x8d,
+ 0xea, 0x06, 0xd3, 0xe6, 0x0f, 0x8a, 0x00, 0x30, 0x44, 0x65, 0xb9, 0xe4, 0xfe, 0xe7, 0xc2, 0x06,
+ 0xcb, 0x82
+ };
+ static const uint8_t out1[] = {
+ 0x08, 0x00, 0x1b, 0x4c, 0xea, 0x16, 0xca, 0xd3, 0x94, 0x0f, 0x53, 0xef, 0x61, 0x1b, 0xe5, 0x84,
+ 0xc4, 0x0f, 0x53, 0xef, 0x61, 0x1b, 0xe5, 0x84, 0xc4, 0x16, 0xca, 0xd3, 0x94, 0x08, 0x02, 0x0f,
+ 0x53, 0x4a, 0x4e, 0x16, 0x7d, 0x00, 0x30, 0x82, 0x52, 0x4d, 0x30, 0x6b, 0x6d, 0x41, 0x88, 0x4c,
+ 0xe5, 0x97, 0x9f, 0x08, 0x0c, 0x16, 0xca, 0xd3, 0x94, 0x15, 0xae, 0x0e, 0x6b, 0x4c, 0x08, 0x0d,
+ 0x8c, 0xb4, 0xa3, 0x9f, 0xca, 0x99, 0xcb, 0x8b, 0xc2, 0x97, 0xcc, 0xaa, 0x84, 0x08, 0x02, 0x0e,
+ 0x7c, 0x73, 0xe2, 0x16, 0xa3, 0xb7, 0xcb, 0x93, 0xd3, 0xb4, 0xc5, 0xdc, 0x9f, 0x0e, 0x79, 0x3e,
+ 0x06, 0xae, 0xb1, 0x9d, 0x93, 0xd3, 0x08, 0x0c, 0xbe, 0xa3, 0x8f, 0x08, 0x88, 0xbe, 0xa3, 0x8d,
+ 0xd3, 0xa8, 0xa3, 0x97, 0xc5, 0x17, 0x89, 0x08, 0x0d, 0x15, 0xd2, 0x08, 0x01, 0x93, 0xc8, 0xaa,
+ 0x8f, 0x0e, 0x61, 0x1b, 0x99, 0xcb, 0x0e, 0x4e, 0xba, 0x9f, 0xa1, 0xae, 0x93, 0xa8, 0xa0, 0x08,
+ 0x02, 0x08, 0x0c, 0xe2, 0x16, 0xa3, 0xb7, 0xcb, 0x0f, 0x4f, 0xe1, 0x80, 0x05, 0xec, 0x60, 0x8d,
+ 0xea, 0x06, 0xd3, 0xe6, 0x0f, 0x8a, 0x00, 0x30, 0x44, 0x65, 0xb9, 0xe4, 0xfe, 0xe7, 0xc2, 0x06,
+ 0xcb, 0x82
+ };
+ static const uint16_t in2[]={
+ 0x1B, 0x24, 0x29, 0x47, 0x0E, 0x23, 0x21, 0x23, 0x22, 0x23,
+ 0x23, 0x23, 0x24, 0x23, 0x25, 0x23, 0x26, 0x23, 0x27, 0x23,
+ 0x28, 0x23, 0x29, 0x23, 0x2A, 0x23, 0x2B, 0x0F, 0x2F, 0x2A,
+ 0x70, 0x6C, 0x61, 0x6E, 0x65, 0x20, 0x31, 0x20, 0x2A, 0x2F,
+ 0x0D, 0x0A, 0x1B, 0x24, 0x2A, 0x48, 0x1B, 0x4E, 0x22, 0x21,
+ 0x1B, 0x4E, 0x22, 0x22, 0x1B, 0x4E, 0x22, 0x23, 0x1B, 0x4E,
+ 0x22, 0x24, 0x1B, 0x4E, 0x22, 0x25, 0x0F, 0x2F, 0x2A, 0x70,
+ 0x6C, 0x61, 0x6E, 0x65, 0x32, 0x2A, 0x2F, 0x20, 0x0D, 0x0A,
+ 0x1B, 0x24, 0x2B, 0x49, 0x1B, 0x4F, 0x22, 0x44, 0x1B, 0x4F,
+ 0x22, 0x45, 0x1B, 0x4F, 0x22, 0x46, 0x1B, 0x4F, 0x22, 0x47,
+ 0x1B, 0x4F, 0x22, 0x48, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61,
+ 0x6E, 0x65, 0x20, 0x33, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B,
+ 0x24, 0x2B, 0x4A, 0x1B, 0x4F, 0x21, 0x44, 0x1B, 0x4F, 0x21,
+ 0x45, 0x1B, 0x4F, 0x22, 0x6A, 0x1B, 0x4F, 0x22, 0x6B, 0x1B,
+ 0x4F, 0x22, 0x6C, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E,
+ 0x65, 0x20, 0x34, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24,
+ 0x2B, 0x4B, 0x1B, 0x4F, 0x21, 0x74, 0x1B, 0x4F, 0x22, 0x50,
+ 0x1B, 0x4F, 0x22, 0x51, 0x1B, 0x4F, 0x23, 0x37, 0x1B, 0x4F,
+ 0x22, 0x5C, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E,
+ 0x65, 0x20, 0x35, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24,
+ 0x2B, 0x4C, 0x1B, 0x4F, 0x21, 0x23, 0x1B, 0x4F, 0x22, 0x2C,
+ 0x1B, 0x4F, 0x23, 0x4E, 0x1B, 0x4F, 0x21, 0x6E, 0x1B, 0x4F,
+ 0x23, 0x71, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E, 0x65,
+ 0x20, 0x36, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24, 0x2B,
+ 0x4D, 0x1B, 0x4F, 0x22, 0x71, 0x1B, 0x4F, 0x21, 0x4E, 0x1B,
+ 0x4F, 0x21, 0x6A, 0x1B, 0x4F, 0x23, 0x3A, 0x1B, 0x4F, 0x23,
+ 0x6F, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E, 0x65, 0x20,
+ 0x37, 0x20, 0x2A, 0x2F,
+ };
+ static const unsigned char out2[]={
+ 0x1B, 0x24, 0x29, 0x47, 0x0E, 0x23, 0x21, 0x23, 0x22, 0x23,
+ 0x23, 0x23, 0x24, 0x23, 0x25, 0x23, 0x26, 0x23, 0x27, 0x23,
+ 0x28, 0x23, 0x29, 0x23, 0x2A, 0x23, 0x2B, 0x0F, 0x2F, 0x2A,
+ 0x70, 0x6C, 0x61, 0x6E, 0x65, 0x20, 0x31, 0x20, 0x2A, 0x2F,
+ 0x0D, 0x0A, 0x1B, 0x24, 0x2A, 0x48, 0x1B, 0x4E, 0x22, 0x21,
+ 0x1B, 0x4E, 0x22, 0x22, 0x1B, 0x4E, 0x22, 0x23, 0x1B, 0x4E,
+ 0x22, 0x24, 0x1B, 0x4E, 0x22, 0x25, 0x0F, 0x2F, 0x2A, 0x70,
+ 0x6C, 0x61, 0x6E, 0x65, 0x32, 0x2A, 0x2F, 0x20, 0x0D, 0x0A,
+ 0x1B, 0x24, 0x2B, 0x49, 0x1B, 0x4F, 0x22, 0x44, 0x1B, 0x4F,
+ 0x22, 0x45, 0x1B, 0x4F, 0x22, 0x46, 0x1B, 0x4F, 0x22, 0x47,
+ 0x1B, 0x4F, 0x22, 0x48, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61,
+ 0x6E, 0x65, 0x20, 0x33, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B,
+ 0x24, 0x2B, 0x4A, 0x1B, 0x4F, 0x21, 0x44, 0x1B, 0x4F, 0x21,
+ 0x45, 0x1B, 0x4F, 0x22, 0x6A, 0x1B, 0x4F, 0x22, 0x6B, 0x1B,
+ 0x4F, 0x22, 0x6C, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E,
+ 0x65, 0x20, 0x34, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24,
+ 0x2B, 0x4B, 0x1B, 0x4F, 0x21, 0x74, 0x1B, 0x4F, 0x22, 0x50,
+ 0x1B, 0x4F, 0x22, 0x51, 0x1B, 0x4F, 0x23, 0x37, 0x1B, 0x4F,
+ 0x22, 0x5C, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E,
+ 0x65, 0x20, 0x35, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24,
+ 0x2B, 0x4C, 0x1B, 0x4F, 0x21, 0x23, 0x1B, 0x4F, 0x22, 0x2C,
+ 0x1B, 0x4F, 0x23, 0x4E, 0x1B, 0x4F, 0x21, 0x6E, 0x1B, 0x4F,
+ 0x23, 0x71, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E, 0x65,
+ 0x20, 0x36, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24, 0x2B,
+ 0x4D, 0x1B, 0x4F, 0x22, 0x71, 0x1B, 0x4F, 0x21, 0x4E, 0x1B,
+ 0x4F, 0x21, 0x6A, 0x1B, 0x4F, 0x23, 0x3A, 0x1B, 0x4F, 0x23,
+ 0x6F, 0x0F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E, 0x65, 0x20,
+ 0x37, 0x20, 0x2A, 0x2F,
+ };
+ const char *source=(const char *)in;
+ const char *limit=(const char *)in+sizeof(in);
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("LATIN_1", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a LATIN_1 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "LATIN_1");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ TestConv((uint16_t*)in1,sizeof(in1)/2,"LATIN_1","LATIN-1",(char*)out1,sizeof(out1));
+ TestConv((uint16_t*)in2,sizeof(in2)/2,"ASCII","ASCII",(char*)out2,sizeof(out2));
+
+ ucnv_close(cnv);
+}
+
+static void
+TestSBCS() {
+ /* test input */
+ static const uint8_t in[]={ 0x61, 0xc0, 0x80, 0xe0, 0xf0, 0xf4};
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x61,
+ 1, 0xbf,
+ 1, 0xc4,
+ 1, 0x2021,
+ 1, 0xf8ff,
+ 1, 0x00d9
+ };
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a SBCS(x-mac-turkish) converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ /*Test for Illegal character */ /*
+ {
+ static const uint8_t input1[]={ 0xA1 };
+ const char* illegalsource=(const char*)input1;
+ TestNextUCharError(cnv, illegalsource, illegalsource+sizeof(illegalsource), U_INVALID_CHAR_FOUND, "source has a illegal characte");
+ }
+ */
+ ucnv_close(cnv);
+}
+
+static void
+TestDBCS() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x44, 0x6a,
+ 0xc4, 0x9c,
+ 0x7a, 0x74,
+ 0x46, 0xab,
+ 0x42, 0x5b,
+
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 2, 0x00a7,
+ 2, 0xe1d2,
+ 2, 0x6962,
+ 2, 0xf842,
+ 2, 0xffe5,
+ };
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a DBCS(@ibm9027) converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ /*Test for the condition where there is an invalid character*/
+ {
+ static const uint8_t source2[]={0x1a, 0x1b};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
+ }
+ /*Test for the condition where we have a truncated char*/
+ {
+ static const uint8_t source1[]={0xc4};
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
+ }
+ ucnv_close(cnv);
+}
+
+static void
+TestMBCS() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x01,
+ 0xa6, 0xa3,
+ 0x00,
+ 0xa6, 0xa1,
+ 0x08,
+ 0xc2, 0x76,
+ 0xc2, 0x78,
+
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x0001,
+ 2, 0x250c,
+ 1, 0x0000,
+ 2, 0x2500,
+ 1, 0x0008,
+ 2, 0xd60c,
+ 2, 0xd60e,
+ };
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ UConverter *cnv=ucnv_open("ibm-1363", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a MBCS(ibm-1363) converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)");
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ /*Test for the condition where there is an invalid character*/
+ {
+ static const uint8_t source2[]={0xa1, 0x01};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character");
+ }
+ /*Test for the condition where we have a truncated char*/
+ {
+ static const uint8_t source1[]={0xc4};
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
+ }
+ ucnv_close(cnv);
+
+}
+
+#ifdef U_ENABLE_GENERIC_ISO_2022
+
+static void
+TestISO_2022() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x1b, 0x25, 0x42,
+ 0x31,
+ 0x32,
+ 0x61,
+ 0xc2, 0x80,
+ 0xe0, 0xa0, 0x80,
+ 0xf0, 0x90, 0x80, 0x80
+ };
+
+
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 4, 0x0031, /* 4 bytes including the escape sequence */
+ 1, 0x0032,
+ 1, 0x61,
+ 2, 0x80,
+ 3, 0x800,
+ 4, 0x10000
+ };
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+
+ cnv=ucnv_open("ISO_2022", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "ISO_2022");
+
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source");
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ /*Test for the condition where we have a truncated char*/
+ {
+ static const uint8_t source1[]={0xc4};
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CHAR_FOUND, "a character is truncated");
+ }
+ /*Test for the condition where there is an invalid character*/
+ {
+ static const uint8_t source2[]={0xa1, 0x01};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR_FOUND, "an invalid character");
+ }
+ ucnv_close(cnv);
+}
+
+#endif
+
+static void
+TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ int len=0;
+ int i=2;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 10);
+ ucnv_reset(cnv);
+ for(;--i>0; ){
+ uSource = (UChar*) source;
+ uSourceLimit=(const UChar*)sourceLimit;
+ cTarget = cBuf;
+ uTarget = uBuf;
+ cSource = cBuf;
+ cTargetLimit = cBuf;
+ uTargetLimit = uBuf;
+
+ do{
+
+ cTargetLimit = cTargetLimit+ i;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
+ if(errorCode==U_BUFFER_OVERFLOW_ERROR){
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ }while (uSource<uSourceLimit);
+
+ cSourceLimit =cTarget;
+ do{
+ uTargetLimit=uTargetLimit+i;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
+ if(errorCode==U_BUFFER_OVERFLOW_ERROR){
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ }while(cSource<cSourceLimit);
+
+ uSource = source;
+ test =uBuf;
+ for(len=0;len<(int)(source - sourceLimit);len++){
+ if(uBuf[len]!=uSource[len]){
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",uSource[len],(int)uBuf[len]) ;
+ }
+ }
+ }
+ free(uBuf);
+ free(cBuf);
+}
+/* Test for Jitterbug 778 */
+static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ int numCharsInTarget=0;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 5);
+ uSource = source;
+ uSourceLimit=sourceLimit;
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_reset(cnv);
+ numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)(uSourceLimit-uSource), &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ test =uBuf;
+ ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUChars conversion failed, reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = source;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ free(uBuf);
+ free(cBuf);
+}
+
+static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ int len=0;
+ int i=2;
+ const UChar *temp = sourceLimit;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 10);
+
+ ucnv_reset(cnv);
+ for(;--i>0;){
+ uSource = (UChar*) source;
+ cTarget = cBuf;
+ uTarget = uBuf;
+ cSource = cBuf;
+ cTargetLimit = cBuf;
+ uTargetLimit = uBuf+uBufSize*5;
+ cTargetLimit = cTargetLimit+uBufSize*10;
+ uSourceLimit=uSource;
+ do{
+
+ if (uSourceLimit < sourceLimit) {
+ uSourceLimit = uSourceLimit+1;
+ }
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode);
+ if(errorCode==U_BUFFER_OVERFLOW_ERROR){
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ }while (uSource<temp);
+
+ cSourceLimit =cBuf;
+ do{
+ if (cSourceLimit < cBuf + (cTarget - cBuf)) {
+ cSourceLimit = cSourceLimit+1;
+ }
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode);
+ if(errorCode==U_BUFFER_OVERFLOW_ERROR){
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ }while(cSource<cTarget);
+
+ uSource = source;
+ test =uBuf;
+ for(;len<(int)(source - sourceLimit);len++){
+ if(uBuf[len]!=uSource[len]){
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",uSource[len],(int)uBuf[len]) ;
+ }
+ }
+ }
+ free(uBuf);
+ free(cBuf);
+}
+static void
+TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit,
+ const uint16_t results[], const char* message){
+ const char* s0;
+ const char* s=(char*)source;
+ const uint16_t *r=results;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ uint32_t c,exC;
+ ucnv_reset(cnv);
+ while(s<limit) {
+ s0=s;
+ c=ucnv_getNextUChar(cnv, &s, limit, &errorCode);
+ if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
+ break; /* no more significant input */
+ } else if(U_FAILURE(errorCode)) {
+ log_err("%s ucnv_getNextUChar() failed: %s\n", message, u_errorName(errorCode));
+ break;
+ } else {
+ if(UTF_IS_FIRST_SURROGATE(*r)){
+ int i =0, len = 2;
+ UTF_NEXT_CHAR_SAFE(r, i, len, exC, FALSE);
+ r++;
+ }else{
+ exC = *r;
+ }
+ if(c!=(uint32_t)(exC))
+ log_err("%s ucnv_getNextUChar() Expected: \\u%04X Got: \\u%04X \n",message,(uint32_t) (*r),c);
+ }
+ r++;
+ }
+}
+
+static int TestJitterbug930(const char* enc){
+ UErrorCode err = U_ZERO_ERROR;
+ UConverter*converter;
+ char out[80];
+ char*target = out;
+ UChar in[4];
+ const UChar*source = in;
+ int32_t off[80];
+ int32_t* offsets = off;
+ int numOffWritten=0;
+ UBool flush = 0;
+ converter = my_ucnv_open(enc, &err);
+
+ in[0] = 0x41; /* 0x4E00;*/
+ in[1] = 0x4E01;
+ in[2] = 0x4E02;
+ in[3] = 0x4E03;
+
+ memset(off, '*', sizeof(off));
+
+ ucnv_fromUnicode (converter,
+ &target,
+ target+2,
+ &source,
+ source+3,
+ offsets,
+ flush,
+ &err);
+
+ /* writes three bytes into the output buffer: 41 1B 24
+ * but offsets contains 0 1 1
+ */
+ while(*offsets< off[10]){
+ numOffWritten++;
+ offsets++;
+ }
+ log_verbose("Testing Jitterbug 930 for encoding %s",enc);
+ if(numOffWritten!= (int)(target-out)){
+ log_err("Jitterbug 930 test for enc: %s failed. Expected: %i Got: %i",enc, (int)(target-out),numOffWritten);
+ }
+
+ err = U_ZERO_ERROR;
+
+ memset(off,'*' , sizeof(off));
+
+ flush = 1;
+ offsets=off;
+ ucnv_fromUnicode (converter,
+ &target,
+ target+4,
+ &source,
+ source,
+ offsets,
+ flush,
+ &err);
+ numOffWritten=0;
+ while(*offsets< off[10]){
+ numOffWritten++;
+ if(*offsets!= -1){
+ log_err("Jitterbug 930 test for enc: %s failed. Expected: %i Got: %i",enc,-1,*offsets) ;
+ }
+ offsets++;
+ }
+
+ /* writes 42 43 7A into output buffer,
+ * offsets contains -1 -1 -1
+ */
+ ucnv_close(converter);
+ return 0;
+}
+
+static void
+TestHZ() {
+ /* test input */
+ static const uint16_t in[]={
+ 0x3000, 0x3001, 0x3002, 0x00B7, 0x02C9, 0x02C7, 0x00A8, 0x3003, 0x3005, 0x2014,
+ 0xFF5E, 0x2016, 0x2026, 0x007E, 0x997C, 0x70B3, 0x75C5, 0x5E76, 0x73BB, 0x83E0,
+ 0x64AD, 0x62E8, 0x94B5, 0x000A, 0x6CE2, 0x535A, 0x52C3, 0x640F, 0x94C2, 0x7B94,
+ 0x4F2F, 0x5E1B, 0x8236, 0x000A, 0x8116, 0x818A, 0x6E24, 0x6CCA, 0x9A73, 0x6355,
+ 0x535C, 0x54FA, 0x8865, 0x000A, 0x57E0, 0x4E0D, 0x5E03, 0x6B65, 0x7C3F, 0x90E8,
+ 0x6016, 0x248F, 0x2490, 0x000A, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496,
+ 0x2497, 0x2498, 0x2499, 0x000A, 0x249A, 0x249B, 0x2474, 0x2475, 0x2476, 0x2477,
+ 0x2478, 0x2479, 0x247A, 0x000A, 0x247B, 0x247C, 0x247D, 0x247E, 0x247F, 0x2480,
+ 0x2481, 0x2482, 0x2483, 0x000A, 0x0041, 0x0043, 0x0044, 0x0045, 0x0046, 0x007E,
+ 0x0048, 0x0049, 0x004A, 0x000A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050,
+ 0x0051, 0x0052, 0x0053, 0x000A, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059,
+ 0x005A, 0x005B, 0x005C, 0x000A
+ };
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) * 5);
+ int32_t* myOff= offsets;
+ cnv=ucnv_open("HZ", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open HZ converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 5);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding");
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestJitterbug930("csISO2022JP");
+ ucnv_close(cnv);
+ free(offsets);
+ free(uBuf);
+ free(cBuf);
+}
+
+static void
+TestISCII(){
+ /* test input */
+ static const uint16_t in[]={
+ /* test full range of Devanagari */
+ 0x0901,0x0902,0x0903,0x0905,0x0906,0x0907,0x0908,0x0909,0x090A,
+ 0x090B,0x090E,0x090F,0x0910,0x090D,0x0912,0x0913,0x0914,0x0911,
+ 0x0915,0x0916,0x0917,0x0918,0x0919,0x091A,0x091B,0x091C,0x091D,
+ 0x091E,0x091F,0x0920,0x0921,0x0922,0x0923,0x0924,0x0925,0x0926,
+ 0x0927,0x0928,0x0929,0x092A,0x092B,0x092C,0x092D,0x092E,0x092F,
+ 0x095F,0x0930,0x0931,0x0932,0x0933,0x0934,0x0935,0x0936,0x0937,
+ 0x0938,0x0939,0x200D,0x093E,0x093F,0x0940,0x0941,0x0942,0x0943,
+ 0x0946,0x0947,0x0948,0x0945,0x094A,0x094B,0x094C,0x0949,0x094D,
+ 0x093d,0x0966,0x0967,0x0968,0x0969,0x096A,0x096B,0x096C,
+ 0x096D,0x096E,0x096F,
+ /* test Soft halant*/
+ 0x0915,0x094d, 0x200D,
+ /* test explicit halant */
+ 0x0915,0x094d, 0x200c,
+ /* test double danda */
+ 0x965,
+ /* test ASCII */
+ 0x1B, 0x24, 0x29, 0x47, 0x0E, 0x23, 0x21, 0x23, 0x22, 0x23,
+ 0x23, 0x23, 0x24, 0x23, 0x25, 0x23, 0x26, 0x23, 0x27, 0x23,
+ 0x28, 0x23, 0x29, 0x23, 0x2A, 0x23, 0x2B, 0x0F, 0x2F, 0x2A,
+ /* tests from Lotus */
+ 0x0061,0x0915,0x000D,0x000A,0x0996,0x0043,
+ 0x0930,0x094D,0x200D,
+ 0x0901,0x000D,0x000A,0x0905,0x0985,0x0043,
+ 0x0915,0x0921,0x002B,0x095F,
+ /* tamil range */
+ 0x0B86, 0xB87, 0xB88,
+ /* telugu range */
+ 0x0C05, 0x0C02, 0x0C03,0x0c31,
+ /* kannada range */
+ 0x0C85, 0xC82, 0x0C83,
+ /* test Abbr sign and Anudatta */
+ 0x0970, 0x952,
+ /* 0x0958,
+ 0x0959,
+ 0x095A,
+ 0x095B,
+ 0x095C,
+ 0x095D,
+ 0x095E,
+ 0x095F,*/
+ 0x0960 /* Vocallic RRI 0xAB, 0xE9*/,
+ 0x0944 /* Vowel Sign Vocallic RRI 0xDF, 0xE9 */,
+ 0x090C ,
+ 0x0962,
+ 0x0961 /* Vocallic LL 0xa6, 0xE9 */,
+ 0x0963 /* Vowel Sign Vocallic LL 0xdb, 0xE9, */,
+ 0x0950 /* OM Symbol 0xa1, 0xE9,*/,
+ 0x093D /* Avagraha 0xEA, 0xE9*/,
+ 0x0958,
+ 0x0959,
+ 0x095A,
+ 0x095B,
+ 0x095C,
+ 0x095D,
+ 0x095E,
+ 0x0020, 0x094D, 0x0930, 0x0000, 0x00A0
+ };
+ static const unsigned char byteArr[]={
+
+ 0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,
+ 0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,
+ 0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,
+ 0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,
+ 0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,
+ 0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,
+ 0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
+ 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
+ 0xea,0xe9,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
+ 0xf8,0xf9,0xfa,
+ /* test soft halant */
+ 0xb3, 0xE8, 0xE9,
+ /* test explicit halant */
+ 0xb3, 0xE8, 0xE8,
+ /* test double danda */
+ 0xea, 0xea,
+ /* test ASCII */
+ 0x1B, 0x24, 0x29, 0x47, 0x0E, 0x23, 0x21, 0x23, 0x22, 0x23,
+ 0x23, 0x23, 0x24, 0x23, 0x25, 0x23, 0x26, 0x23, 0x27, 0x23,
+ 0x28, 0x23, 0x29, 0x23, 0x2A, 0x23, 0x2B, 0x0F, 0x2F, 0x2A,
+ /* test ATR code */
+
+ /* tests from Lotus */
+ 0x61,0xEF,0x42,0xEF,0x30,0xB3,0x0D,0x0A,0xEF,0x43,0xB4,0x43,
+ 0xEF,0x42,0xCF,0xE8,0xD9,
+ 0xEF,0x42,0xA1,0x0D,0x0A,0xEF,0x42,0xA4,0xEF,0x43,0xA4,0x43,
+ 0xEF,0x42,0xB3,0xBF,0x2B,0xEF,0x42,0xCE,
+ /* tamil range */
+ 0xEF, 0x44, 0xa5, 0xa6, 0xa7,
+ /* telugu range */
+ 0xEF, 0x45,0xa4, 0xa2, 0xa3,0xd0,
+ /* kannada range */
+ 0xEF, 0x48,0xa4, 0xa2, 0xa3,
+ /* anudatta and abbreviation sign */
+ 0xEF, 0x42, 0xF0, 0xBF, 0xF0, 0xB8,
+
+
+ 0xAA, 0xE9,/* RI + NUKTA 0x0960*/
+
+ 0xDF, 0xE9,/* Vowel sign RI + NUKTA 0x0944*/
+
+ 0xa6, 0xE9,/* Vowel I + NUKTA 0x090C*/
+
+ 0xdb, 0xE9,/* Vowel sign I + Nukta 0x0962*/
+
+ 0xa7, 0xE9,/* Vowel II + NUKTA 0x0961*/
+
+ 0xdc, 0xE9,/* Vowel sign II + Nukta 0x0963*/
+
+ 0xa1, 0xE9,/* chandrabindu + Nukta 0x0950*/
+
+ 0xEA, 0xE9, /* Danda + Nukta 0x093D*/
+
+ 0xB3, 0xE9, /* Ka + NUKTA */
+
+ 0xB4, 0xE9, /* Kha + NUKTA */
+
+ 0xB5, 0xE9, /* Ga + NUKTA */
+
+ 0xBA, 0xE9,
+
+ 0xBF, 0xE9,
+
+ 0xC0, 0xE9,
+
+ 0xC9, 0xE9,
+ /* INV halant RA */
+ 0xD9, 0xE8, 0xCF,
+ 0x00, 0x00A0,
+ /* just consume unhandled codepoints */
+ 0xEF, 0x30,
+
+ };
+ testConvertToU(byteArr,(sizeof(byteArr)),in,(sizeof(in)/U_SIZEOF_UCHAR),"x-iscii-de",NULL,TRUE);
+ TestConv(in,(sizeof(in)/2),"ISCII,version=0","hindi", (char *)byteArr,sizeof(byteArr));
+
+}
+
+static void
+TestISO_2022_JP() {
+ /* test input */
+ static const uint16_t in[]={
+ 0x0041,/*0x00E9,*/0x3000, 0x3001, 0x3002, 0x0020, 0x000D, 0x000A,
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A,
+ 0x3005, 0x3006, 0x3007, 0x30FC, 0x2015, 0x2010, 0xFF0F, 0x005C, 0x000D, 0x000A,
+ 0x301C, 0x2016, 0x2026, 0x2025, 0x2018, 0x2019, 0x201C, 0x000D, 0x000A,
+ 0x201D, 0x3014, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ };
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) * 5);
+ int32_t* myOff= offsets;
+ cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open an ISO_2022_JP_1 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 5);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding");
+ TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestJitterbug930("csISO2022JP");
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+ free(offsets);
+}
+
+static void TestConv(const uint16_t in[],int len, const char* conv, const char* lang, char byteArr[],int byteArrLen){
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120*10;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) );
+ int32_t* myOff= offsets;
+ cnv=my_ucnv_open(conv, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a %s converter: %s\n", conv, u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar));
+ cBuf =(char*)malloc(uBufSize * sizeof(char));
+ uSource = (const UChar*)in;
+ uSourceLimit=uSource+len;
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ /*log_verbose("length of compressed string for language %s using %s:%i \n",conv,lang,(cTarget-cBuf));*/
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed, reason: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+ log_err("for codepage %s : Expected : \\u%04X \t Got: \\u%04X\n",conv,*uSource,(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv);
+ TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv);
+ TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv);
+ if(byteArr && byteArrLen!=0){
+ TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang);
+ TestToAndFromUChars(in,(const UChar*)&in[len],cnv);
+ {
+ cSource = byteArr;
+ cSourceLimit = cSource+byteArrLen;
+ test=uBuf;
+ myOff = offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ }
+ }
+
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+ free(offsets);
+}
+static UChar U_CALLCONV
+_charAt(int32_t offset, void *context) {
+ return ((char*)context)[offset];
+}
+
+static int32_t
+unescape(UChar* dst, int32_t dstLen,const char* src,int32_t srcLen,UErrorCode *status){
+ int32_t srcIndex=0;
+ int32_t dstIndex=0;
+ if(U_FAILURE(*status)){
+ return 0;
+ }
+ if((dst==NULL && dstLen>0) || (src==NULL ) || dstLen < -1 || srcLen <-1 ){
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+ if(srcLen==-1){
+ srcLen = (int32_t)uprv_strlen(src);
+ }
+
+ for (; srcIndex<srcLen; ) {
+ UChar32 c = src[srcIndex++];
+ if (c == 0x005C /*'\\'*/) {
+ c = u_unescapeAt(_charAt,&srcIndex,srcLen,(void*)src); /* advances i*/
+ if (c == (UChar32)0xFFFFFFFF) {
+ *status=U_INVALID_CHAR_FOUND; /* return empty string */
+ break; /* invalid escape sequence */
+ }
+ }
+ if(dstIndex < dstLen){
+ if(c>0xFFFF){
+ dst[dstIndex++] = UTF16_LEAD(c);
+ if(dstIndex<dstLen){
+ dst[dstIndex]=UTF16_TRAIL(c);
+ }else{
+ *status=U_BUFFER_OVERFLOW_ERROR;
+ }
+ }else{
+ dst[dstIndex]=(UChar)c;
+ }
+
+ }else{
+ *status = U_BUFFER_OVERFLOW_ERROR;
+ }
+ dstIndex++; /* for preflighting */
+ }
+ return dstIndex;
+}
+
+static void
+TestFullRoundtrip(const char* cp){
+ UChar usource[10] ={0};
+ UChar nsrc[10] = {0};
+ uint32_t i=1;
+ int len=0, ulen;
+ nsrc[0]=0x0061;
+ /* Test codepoint 0 */
+ TestConv(usource,1,cp,"",NULL,0);
+ TestConv(usource,2,cp,"",NULL,0);
+ nsrc[2]=0x5555;
+ TestConv(nsrc,3,cp,"",NULL,0);
+
+ for(;i<=0x10FFFF;i++){
+ if(i==0xD800){
+ i=0xDFFF;
+ continue;
+ }
+ if(i<=0xFFFF){
+ usource[0] =(UChar) i;
+ len=1;
+ }else{
+ usource[0]=UTF16_LEAD(i);
+ usource[1]=UTF16_TRAIL(i);
+ len=2;
+ }
+ ulen=len;
+ if(i==0x80) {
+ usource[2]=0;
+ }
+ /* Test only single code points */
+ TestConv(usource,ulen,cp,"",NULL,0);
+ /* Test codepoint repeated twice */
+ usource[ulen]=usource[0];
+ usource[ulen+1]=usource[1];
+ ulen+=len;
+ TestConv(usource,ulen,cp,"",NULL,0);
+ /* Test codepoint repeated 3 times */
+ usource[ulen]=usource[0];
+ usource[ulen+1]=usource[1];
+ ulen+=len;
+ TestConv(usource,ulen,cp,"",NULL,0);
+ /* Test codepoint in between 2 codepoints */
+ nsrc[1]=usource[0];
+ nsrc[2]=usource[1];
+ nsrc[len+1]=0x5555;
+ TestConv(nsrc,len+2,cp,"",NULL,0);
+ uprv_memset(usource,0,sizeof(UChar)*10);
+ }
+}
+
+static void
+TestRoundTrippingAllUTF(void){
+ if(!QUICK){
+ log_verbose("Running exhaustive round trip test for BOCU-1\n");
+ TestFullRoundtrip("BOCU-1");
+ log_verbose("Running exhaustive round trip test for SCSU\n");
+ TestFullRoundtrip("SCSU");
+ log_verbose("Running exhaustive round trip test for UTF-8\n");
+ TestFullRoundtrip("UTF-8");
+ log_verbose("Running exhaustive round trip test for CESU-8\n");
+ TestFullRoundtrip("CESU-8");
+ log_verbose("Running exhaustive round trip test for UTF-16BE\n");
+ TestFullRoundtrip("UTF-16BE");
+ log_verbose("Running exhaustive round trip test for UTF-16LE\n");
+ TestFullRoundtrip("UTF-16LE");
+ log_verbose("Running exhaustive round trip test for UTF-16\n");
+ TestFullRoundtrip("UTF-16");
+ log_verbose("Running exhaustive round trip test for UTF-32BE\n");
+ TestFullRoundtrip("UTF-32BE");
+ log_verbose("Running exhaustive round trip test for UTF-32LE\n");
+ TestFullRoundtrip("UTF-32LE");
+ log_verbose("Running exhaustive round trip test for UTF-32\n");
+ TestFullRoundtrip("UTF-32");
+ log_verbose("Running exhaustive round trip test for UTF-7\n");
+ TestFullRoundtrip("UTF-7");
+ log_verbose("Running exhaustive round trip test for UTF-7\n");
+ TestFullRoundtrip("UTF-7,version=1");
+ log_verbose("Running exhaustive round trip test for IMAP-mailbox-name\n");
+ TestFullRoundtrip("IMAP-mailbox-name");
+ log_verbose("Running exhaustive round trip test for GB18030\n");
+ TestFullRoundtrip("GB18030");
+ }
+}
+
+static void
+TestSCSU() {
+
+ static const uint16_t germanUTF16[]={
+ 0x00d6, 0x006c, 0x0020, 0x0066, 0x006c, 0x0069, 0x0065, 0x00df, 0x0074
+ };
+
+ static const uint8_t germanSCSU[]={
+ 0xd6, 0x6c, 0x20, 0x66, 0x6c, 0x69, 0x65, 0xdf, 0x74
+ };
+
+ static const uint16_t russianUTF16[]={
+ 0x041c, 0x043e, 0x0441, 0x043a, 0x0432, 0x0430
+ };
+
+ static const uint8_t russianSCSU[]={
+ 0x12, 0x9c, 0xbe, 0xc1, 0xba, 0xb2, 0xb0
+ };
+
+ static const uint16_t japaneseUTF16[]={
+ 0x3000, 0x266a, 0x30ea, 0x30f3, 0x30b4, 0x53ef, 0x611b,
+ 0x3044, 0x3084, 0x53ef, 0x611b, 0x3044, 0x3084, 0x30ea, 0x30f3,
+ 0x30b4, 0x3002, 0x534a, 0x4e16, 0x7d00, 0x3082, 0x524d, 0x306b,
+ 0x6d41, 0x884c, 0x3057, 0x305f, 0x300c, 0x30ea, 0x30f3, 0x30b4,
+ 0x306e, 0x6b4c, 0x300d, 0x304c, 0x3074, 0x3063, 0x305f, 0x308a,
+ 0x3059, 0x308b, 0x304b, 0x3082, 0x3057, 0x308c, 0x306a, 0x3044,
+ 0x3002, 0x7c73, 0x30a2, 0x30c3, 0x30d7, 0x30eb, 0x30b3, 0x30f3,
+ 0x30d4, 0x30e5, 0x30fc, 0x30bf, 0x793e, 0x306e, 0x30d1, 0x30bd,
+ 0x30b3, 0x30f3, 0x300c, 0x30de, 0x30c3, 0x30af, 0xff08, 0x30de,
+ 0x30c3, 0x30ad, 0x30f3, 0x30c8, 0x30c3, 0x30b7, 0x30e5, 0xff09,
+ 0x300d, 0x3092, 0x3001, 0x3053, 0x3088, 0x306a, 0x304f, 0x611b,
+ 0x3059, 0x308b, 0x4eba, 0x305f, 0x3061, 0x306e, 0x3053, 0x3068,
+ 0x3060, 0x3002, 0x300c, 0x30a2, 0x30c3, 0x30d7, 0x30eb, 0x4fe1,
+ 0x8005, 0x300d, 0x306a, 0x3093, 0x3066, 0x8a00, 0x3044, 0x65b9,
+ 0x307e, 0x3067, 0x3042, 0x308b, 0x3002
+ };
+
+ /* SCSUEncoder produces a slightly longer result (179B vs. 178B) because of one different choice:
+ it uses an SQn once where a longer look-ahead could have shown that SCn is more efficient */
+ static const uint8_t japaneseSCSU[]={
+ 0x08, 0x00, 0x1b, 0x4c, 0xea, 0x16, 0xca, 0xd3, 0x94, 0x0f, 0x53, 0xef, 0x61, 0x1b, 0xe5, 0x84,
+ 0xc4, 0x0f, 0x53, 0xef, 0x61, 0x1b, 0xe5, 0x84, 0xc4, 0x16, 0xca, 0xd3, 0x94, 0x08, 0x02, 0x0f,
+ 0x53, 0x4a, 0x4e, 0x16, 0x7d, 0x00, 0x30, 0x82, 0x52, 0x4d, 0x30, 0x6b, 0x6d, 0x41, 0x88, 0x4c,
+ 0xe5, 0x97, 0x9f, 0x08, 0x0c, 0x16, 0xca, 0xd3, 0x94, 0x15, 0xae, 0x0e, 0x6b, 0x4c, 0x08, 0x0d,
+ 0x8c, 0xb4, 0xa3, 0x9f, 0xca, 0x99, 0xcb, 0x8b, 0xc2, 0x97, 0xcc, 0xaa, 0x84, 0x08, 0x02, 0x0e,
+ 0x7c, 0x73, 0xe2, 0x16, 0xa3, 0xb7, 0xcb, 0x93, 0xd3, 0xb4, 0xc5, 0xdc, 0x9f, 0x0e, 0x79, 0x3e,
+ 0x06, 0xae, 0xb1, 0x9d, 0x93, 0xd3, 0x08, 0x0c, 0xbe, 0xa3, 0x8f, 0x08, 0x88, 0xbe, 0xa3, 0x8d,
+ 0xd3, 0xa8, 0xa3, 0x97, 0xc5, 0x17, 0x89, 0x08, 0x0d, 0x15, 0xd2, 0x08, 0x01, 0x93, 0xc8, 0xaa,
+ 0x8f, 0x0e, 0x61, 0x1b, 0x99, 0xcb, 0x0e, 0x4e, 0xba, 0x9f, 0xa1, 0xae, 0x93, 0xa8, 0xa0, 0x08,
+ 0x02, 0x08, 0x0c, 0xe2, 0x16, 0xa3, 0xb7, 0xcb, 0x0f, 0x4f, 0xe1, 0x80, 0x05, 0xec, 0x60, 0x8d,
+ 0xea, 0x06, 0xd3, 0xe6, 0x0f, 0x8a, 0x00, 0x30, 0x44, 0x65, 0xb9, 0xe4, 0xfe, 0xe7, 0xc2, 0x06,
+ 0xcb, 0x82
+ };
+
+ static const uint16_t allFeaturesUTF16[]={
+ 0x0041, 0x00df, 0x0401, 0x015f, 0x00df, 0x01df, 0xf000, 0xdbff,
+ 0xdfff, 0x000d, 0x000a, 0x0041, 0x00df, 0x0401, 0x015f, 0x00df,
+ 0x01df, 0xf000, 0xdbff, 0xdfff
+ };
+
+ /* see comment at japaneseSCSU: the same kind of different choice yields a slightly shorter
+ * result here (34B vs. 35B)
+ */
+ static const uint8_t allFeaturesSCSU[]={
+ 0x41, 0xdf, 0x12, 0x81, 0x03, 0x5f, 0x10, 0xdf, 0x1b, 0x03,
+ 0xdf, 0x1c, 0x88, 0x80, 0x0b, 0xbf, 0xff, 0xff, 0x0d, 0x0a,
+ 0x41, 0x10, 0xdf, 0x12, 0x81, 0x03, 0x5f, 0x10, 0xdf, 0x13,
+ 0xdf, 0x14, 0x80, 0x15, 0xff
+ };
+ static const uint16_t monkeyIn[]={
+ 0x00A8, 0x3003, 0x3005, 0x2015, 0xFF5E, 0x2016, 0x2026, 0x2018, 0x000D, 0x000A,
+ 0x2019, 0x201C, 0x201D, 0x3014, 0x3015, 0x3008, 0x3009, 0x300A, 0x000D, 0x000A,
+ 0x300B, 0x300C, 0x300D, 0x300E, 0x300F, 0x3016, 0x3017, 0x3010, 0x000D, 0x000A,
+ 0x3011, 0x00B1, 0x00D7, 0x00F7, 0x2236, 0x2227, 0x7FC1, 0x8956, 0x000D, 0x000A,
+ 0x9D2C, 0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104, 0x5C4B, 0x000D, 0x000A,
+ 0x61B6, 0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378, 0x57F7, 0x000D, 0x000A,
+ 0x57F4, 0x57F9, 0x57FA, 0x57FC, 0x5800, 0x5802, 0x5805, 0x5806, 0x000D, 0x000A,
+ 0x580A, 0x581E, 0x6BB5, 0x6BB7, 0x6BBA, 0x6BBC, 0x9CE2, 0x977C, 0x000D, 0x000A,
+ 0x6BBF, 0x6BC1, 0x6BC5, 0x6BC6, 0x6BCB, 0x6BCD, 0x6BCF, 0x6BD2, 0x000D, 0x000A,
+ 0x6BD3, 0x6BD4, 0x6BD6, 0x6BD7, 0x6BD8, 0x6BDB, 0x6BEB, 0x6BEC, 0x000D, 0x000A,
+ 0x6C05, 0x6C08, 0x6C0F, 0x6C11, 0x6C13, 0x6C23, 0x6C34, 0x0041, 0x000D, 0x000A,
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x005B, 0x9792, 0x9CCC, 0x9CCD, 0x9CCE, 0x9CCF, 0x9CD0, 0x9CD3, 0x000D, 0x000A,
+ 0x9CD4, 0x9CD5, 0x9CD7, 0x9CD8, 0x9CD9, 0x9CDC, 0x9CDD, 0x9CDF, 0x000D, 0x000A,
+ 0x9785, 0x9791, 0x00BD, 0x0390, 0x0385, 0x0386, 0x0388, 0x0389, 0x000D, 0x000A,
+ 0x038E, 0x038F, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x000D, 0x000A,
+ 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x038A, 0x038C, 0x039C, 0x000D, 0x000A,
+ /* test non-BMP code points */
+ 0xD869, 0xDE99, 0xD869, 0xDE9C, 0xD869, 0xDE9D, 0xD869, 0xDE9E, 0xD869, 0xDE9F,
+ 0xD869, 0xDEA0, 0xD869, 0xDEA5, 0xD869, 0xDEA6, 0xD869, 0xDEA7, 0xD869, 0xDEA8,
+ 0xD869, 0xDEAB, 0xD869, 0xDEAC, 0xD869, 0xDEAD, 0xD869, 0xDEAE, 0xD869, 0xDEAF,
+ 0xD869, 0xDEB0, 0xD869, 0xDEB1, 0xD869, 0xDEB3, 0xD869, 0xDEB5, 0xD869, 0xDEB6,
+ 0xD869, 0xDEB7, 0xD869, 0xDEB8, 0xD869, 0xDEB9, 0xD869, 0xDEBA, 0xD869, 0xDEBB,
+ 0xD869, 0xDEBC, 0xD869, 0xDEBD, 0xD869, 0xDEBE, 0xD869, 0xDEBF, 0xD869, 0xDEC0,
+ 0xD869, 0xDEC1, 0xD869, 0xDEC2, 0xD869, 0xDEC3, 0xD869, 0xDEC4, 0xD869, 0xDEC8,
+ 0xD869, 0xDECA, 0xD869, 0xDECB, 0xD869, 0xDECD, 0xD869, 0xDECE, 0xD869, 0xDECF,
+ 0xD869, 0xDED0, 0xD869, 0xDED1, 0xD869, 0xDED2, 0xD869, 0xDED3, 0xD869, 0xDED4,
+ 0xD869, 0xDED5, 0xD800, 0xDC00, 0xD800, 0xDC00, 0xD800, 0xDC00, 0xDBFF, 0xDFFF,
+ 0xDBFF, 0xDFFF, 0xDBFF, 0xDFFF,
+
+
+ 0x4DB3, 0x4DB4, 0x4DB5, 0x4E00, 0x4E00, 0x4E01, 0x4E02, 0x4E03, 0x000D, 0x000A,
+ 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x33E0, 0x33E6, 0x000D, 0x000A,
+ 0x4E05, 0x4E07, 0x4E04, 0x4E08, 0x4E08, 0x4E09, 0x4E0A, 0x4E0B, 0x000D, 0x000A,
+ 0x4E0C, 0x0021, 0x0022, 0x0023, 0x0024, 0xFF40, 0xFF41, 0xFF42, 0x000D, 0x000A,
+ 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0x000D, 0x000A,
+ };
+ static const char *fTestCases [] = {
+ "\\ud800\\udc00", /* smallest surrogate*/
+ "\\ud8ff\\udcff",
+ "\\udBff\\udFff", /* largest surrogate pair*/
+ "\\ud834\\udc00",
+ "\\U0010FFFF",
+ "Hello \\u9292 \\u9192 World!",
+ "Hell\\u0429o \\u9292 \\u9192 W\\u00e4rld!",
+ "Hell\\u0429o \\u9292 \\u9292W\\u00e4rld!",
+
+ "\\u0648\\u06c8", /* catch missing reset*/
+ "\\u0648\\u06c8",
+
+ "\\u4444\\uE001", /* lowest quotable*/
+ "\\u4444\\uf2FF", /* highest quotable*/
+ "\\u4444\\uf188\\u4444",
+ "\\u4444\\uf188\\uf288",
+ "\\u4444\\uf188abc\\u0429\\uf288",
+ "\\u9292\\u2222",
+ "Hell\\u0429\\u04230o \\u9292 \\u9292W\\u00e4\\u0192rld!",
+ "Hell\\u0429o \\u9292 \\u9292W\\u00e4rld!",
+ "Hello World!123456",
+ "Hello W\\u0081\\u011f\\u0082!", /* Latin 1 run*/
+
+ "abc\\u0301\\u0302", /* uses SQn for u301 u302*/
+ "abc\\u4411d", /* uses SQU*/
+ "abc\\u4411\\u4412d",/* uses SCU*/
+ "abc\\u0401\\u0402\\u047f\\u00a5\\u0405", /* uses SQn for ua5*/
+ "\\u9191\\u9191\\u3041\\u9191\\u3041\\u3041\\u3000", /* SJIS like data*/
+ "\\u9292\\u2222",
+ "\\u9191\\u9191\\u3041\\u9191\\u3041\\u3041\\u3000",
+ "\\u9999\\u3051\\u300c\\u9999\\u9999\\u3060\\u9999\\u3065\\u3065\\u3065\\u300c",
+ "\\u3000\\u266a\\u30ea\\u30f3\\u30b4\\u53ef\\u611b\\u3044\\u3084\\u53ef\\u611b\\u3044\\u3084\\u30ea\\u30f3\\u30b4\\u3002",
+
+ "", /* empty input*/
+ "\\u0000", /* smallest BMP character*/
+ "\\uFFFF", /* largest BMP character*/
+
+ /* regression tests*/
+ "\\u6441\\ub413\\ua733\\uf8fe\\ueedb\\u587f\\u195f\\u4899\\uf23d\\u49fd\\u0aac\\u5792\\ufc22\\ufc3c\\ufc46\\u00aa",
+ "\\u00df\\u01df\\uf000\\udbff\\udfff\\u000d\n\\u0041\\u00df\\u0401\\u015f\\u00df\\u01df\\uf000\\udbff\\udfff",
+ "\\u30f9\\u8321\\u05e5\\u181c\\ud72b\\u2019\\u99c9\\u2f2f\\uc10c\\u82e1\\u2c4d\\u1ebc\\u6013\\u66dc\\ubbde\\u94a5\\u4726\\u74af\\u3083\\u55b9\\u000c",
+ "\\u0041\\u00df\\u0401\\u015f",
+ "\\u9066\\u2123abc",
+ "\\ud266\\u43d7\\u\\ue386\\uc9c0\\u4a6b\\u9222\\u901f\\u7410\\ua63f\\u539b\\u9596\\u482e\\u9d47\\ucfe4\\u7b71\\uc280\\uf26a\\u982f\\u862a\\u4edd\\uf513\\ufda6\\u869d\\u2ee0\\ua216\\u3ff6\\u3c70\\u89c0\\u9576\\ud5ec\\ubfda\\u6cca\\u5bb3\\ubcea\\u554c\\u914e\\ufa4a\\uede3\\u2990\\ud2f5\\u2729\\u5141\\u0f26\\uccd8\\u5413\\ud196\\ubbe2\\u51b9\\u9b48\\u0dc8\\u2195\\u21a2\\u21e9\\u00e4\\u9d92\\u0bc0\\u06c5",
+ "\\uf95b\\u2458\\u2468\\u0e20\\uf51b\\ue36e\\ubfc1\\u0080\\u02dd\\uf1b5\\u0cf3\\u6059\\u7489",
+ };
+ int i=0;
+ for(;i<sizeof(fTestCases)/sizeof(*fTestCases);i++){
+ const char* cSrc = fTestCases[i];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t cSrcLen,srcLen;
+ UChar* src;
+ /* UConverter* cnv = ucnv_open("SCSU",&status); */
+ cSrcLen = srcLen = (int32_t)uprv_strlen(fTestCases[i]);
+ src = (UChar*) malloc((sizeof(UChar) * srcLen) + sizeof(UChar));
+ srcLen=unescape(src,srcLen,cSrc,cSrcLen,&status);
+ log_verbose("Testing roundtrip for src: %s at index :%d\n",cSrc,i);
+ TestConv(src,srcLen,"SCSU","Coverage",NULL,0);
+ free(src);
+ }
+ TestConv(allFeaturesUTF16,(sizeof(allFeaturesUTF16)/2),"SCSU","all features", (char *)allFeaturesSCSU,sizeof(allFeaturesSCSU));
+ TestConv(allFeaturesUTF16,(sizeof(allFeaturesUTF16)/2),"SCSU","all features",(char *)allFeaturesSCSU,sizeof(allFeaturesSCSU));
+ TestConv(japaneseUTF16,(sizeof(japaneseUTF16)/2),"SCSU","japaneese",(char *)japaneseSCSU,sizeof(japaneseSCSU));
+ TestConv(japaneseUTF16,(sizeof(japaneseUTF16)/2),"SCSU,locale=ja","japaneese",(char *)japaneseSCSU,sizeof(japaneseSCSU));
+ TestConv(germanUTF16,(sizeof(germanUTF16)/2),"SCSU","german",(char *)germanSCSU,sizeof(germanSCSU));
+ TestConv(russianUTF16,(sizeof(russianUTF16)/2), "SCSU","russian",(char *)russianSCSU,sizeof(russianSCSU));
+ TestConv(monkeyIn,(sizeof(monkeyIn)/2),"SCSU","monkey",NULL,0);
+}
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+static void TestJitterbug2346(){
+ char source[] = { 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a,
+ 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a};
+ uint16_t expected[] = {0x91CD,0x000D,0x000A,0x91CD,0x000D,0x000A};
+
+ UChar uTarget[500]={'\0'};
+ UChar* utarget=uTarget;
+ UChar* utargetLimit=uTarget+sizeof(uTarget)/2;
+
+ char cTarget[500]={'\0'};
+ char* ctarget=cTarget;
+ char* ctargetLimit=cTarget+sizeof(cTarget);
+ const char* csource=source;
+ UChar* temp = expected;
+ UErrorCode err=U_ZERO_ERROR;
+
+ UConverter* conv =ucnv_open("ISO_2022_JP",&err);
+ if(U_FAILURE(err)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(err));
+ return;
+ }
+ ucnv_toUnicode(conv,&utarget,utargetLimit,&csource,csource+sizeof(source),NULL,TRUE,&err);
+ if(U_FAILURE(err)) {
+ log_err("ISO_2022_JP to Unicode conversion failed: %s\n", u_errorName(err));
+ return;
+ }
+ utargetLimit=utarget;
+ utarget = uTarget;
+ while(utarget<utargetLimit){
+ if(*temp!=*utarget){
+
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*utarget,(int)*temp) ;
+ }
+ utarget++;
+ temp++;
+ }
+ ucnv_fromUnicode(conv,&ctarget,ctargetLimit,(const UChar**)&utarget,utargetLimit,NULL,TRUE,&err);
+ if(U_FAILURE(err)) {
+ log_err("ISO_2022_JP from Unicode conversion failed: %s\n", u_errorName(err));
+ return;
+ }
+ ctargetLimit=ctarget;
+ ctarget =cTarget;
+ ucnv_close(conv);
+
+
+}
+
+static void
+TestISO_2022_JP_1() {
+ /* test input */
+ static const uint16_t in[]={
+ 0x3000, 0x3001, 0x3002, 0x0020, 0xFF0E, 0x30FB, 0xFF1A, 0xFF1B, 0x000D, 0x000A,
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A,
+ 0x52C8, 0x52CC, 0x52CF, 0x52D1, 0x52D4, 0x52D6, 0x52DB, 0x52DC, 0x000D, 0x000A,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A,
+ 0x3005, 0x3006, 0x3007, 0x30FC, 0x2015, 0x2010, 0xFF0F, 0x005C, 0x000D, 0x000A,
+ 0x301C, 0x2016, 0x2026, 0x2025, 0x2018, 0x2019, 0x201C, 0x000D, 0x000A,
+ 0x201D, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x4F94, 0x4F97, 0x52BA, 0x52BB, 0x52BD, 0x52C0, 0x52C4, 0x52C6, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x4F78, 0x4F79, 0x4F7A, 0x4F7D, 0x4F7E, 0x4F81, 0x4F82, 0x4F84, 0x000D, 0x000A,
+ 0x4F85, 0x4F89, 0x4F8A, 0x4F8C, 0x4F8E, 0x4F90, 0x4F92, 0x4F93, 0x000D, 0x000A,
+ 0x52E1, 0x52E5, 0x52E8, 0x52E9, 0x000D, 0x000A
+ };
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+
+ cnv=ucnv_open("ISO_2022_JP_1", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 5);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ /*ucnv_close(cnv);
+ cnv=ucnv_open("ISO_2022,locale=jp,version=1", &errorCode);*/
+ /*Test for the condition where there is an invalid character*/
+ ucnv_reset(cnv);
+ {
+ static const uint8_t source2[]={0x0e,0x24,0x053};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-JP-1]");
+ }
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+}
+
+static void
+TestISO_2022_JP_2() {
+ /* test input */
+ static const uint16_t in[]={
+ 0x00A8, 0x3003, 0x3005, 0x2015, 0xFF5E, 0x2016, 0x2026, 0x2018, 0x000D, 0x000A,
+ 0x2019, 0x201C, 0x201D, 0x3014, 0x3015, 0x3008, 0x3009, 0x300A, 0x000D, 0x000A,
+ 0x300B, 0x300C, 0x300D, 0x300E, 0x300F, 0x3016, 0x3017, 0x3010, 0x000D, 0x000A,
+ 0x3011, 0x00B1, 0x00D7, 0x00F7, 0x2236, 0x2227, 0x7FC1, 0x8956, 0x000D, 0x000A,
+ 0x9D2C, 0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104, 0x5C4B, 0x000D, 0x000A,
+ 0x61B6, 0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378, 0x57F7, 0x000D, 0x000A,
+ 0x57F4, 0x57F9, 0x57FA, 0x57FC, 0x5800, 0x5802, 0x5805, 0x5806, 0x000D, 0x000A,
+ 0x580A, 0x581E, 0x6BB5, 0x6BB7, 0x6BBA, 0x6BBC, 0x9CE2, 0x977C, 0x000D, 0x000A,
+ 0x6BBF, 0x6BC1, 0x6BC5, 0x6BC6, 0x6BCB, 0x6BCD, 0x6BCF, 0x6BD2, 0x000D, 0x000A,
+ 0x6BD3, 0x6BD4, 0x6BD6, 0x6BD7, 0x6BD8, 0x6BDB, 0x6BEB, 0x6BEC, 0x000D, 0x000A,
+ 0x6C05, 0x6C08, 0x6C0F, 0x6C11, 0x6C13, 0x6C23, 0x6C34, 0x0041, 0x000D, 0x000A,
+ 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A,
+ 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x000D, 0x000A,
+ 0x005B, 0x9792, 0x9CCC, 0x9CCD, 0x9CCE, 0x9CCF, 0x9CD0, 0x9CD3, 0x000D, 0x000A,
+ 0x9CD4, 0x9CD5, 0x9CD7, 0x9CD8, 0x9CD9, 0x9CDC, 0x9CDD, 0x9CDF, 0x000D, 0x000A,
+ 0x9785, 0x9791, 0x00BD, 0x0390, 0x0385, 0x0386, 0x0388, 0x0389, 0x000D, 0x000A,
+ 0x038E, 0x038F, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x000D, 0x000A,
+ 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x038A, 0x038C, 0x039C, 0x000D, 0x000A
+ };
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) * 5);
+ int32_t* myOff= offsets;
+ cnv=ucnv_open("ISO_2022_JP_2", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 5);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ /*Test for the condition where there is an invalid character*/
+ ucnv_reset(cnv);
+ {
+ static const uint8_t source2[]={0x0e,0x24,0x053};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-JP-2]");
+ }
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+ free(offsets);
+}
+
+static void
+TestISO_2022_KR() {
+ /* test input */
+ static const uint16_t in[]={
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F66,0x9F67,0x9F6A,0x000A,0x000D
+ ,0x9F6C,0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC02,0xAC04
+ ,0xAC07,0xAC08,0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029
+ ,0x002A,0x002B,0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB
+ ,0x53CD,0x53D4,0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53DF,0x53E1,0x53E2
+ ,0x53E3,0x53E4,0x000A,0x000D};
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) * 5);
+ int32_t* myOff= offsets;
+ cnv=ucnv_open("ISO_2022,locale=kr", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 5);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestJitterbug930("csISO2022KR");
+ /*Test for the condition where there is an invalid character*/
+ ucnv_reset(cnv);
+ {
+ static const uint8_t source2[]={0x1b,0x24,0x053};
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
+ }
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+ free(offsets);
+}
+
+static void
+TestISO_2022_KR_1() {
+ /* test input */
+ static const uint16_t in[]={
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D
+ ,0x9F6C,0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04
+ ,0xAC07,0xAC08,0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029
+ ,0x002A,0x002B,0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB
+ ,0x53CD,0x53D4,0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2
+ ,0x53E3,0x53E4,0x000A,0x000D};
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 120;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) * 5);
+ int32_t* myOff= offsets;
+ cnv=ucnv_open("ibm-25546", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 5);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ ucnv_reset(cnv);
+ TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding");
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ ucnv_reset(cnv);
+ TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ /*Test for the condition where there is an invalid character*/
+ ucnv_reset(cnv);
+ {
+ static const uint8_t source2[]={0x1b,0x24,0x053};
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCAPE_SEQUENCE, "an invalid character [ISO-2022-KR]");
+ }
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+ free(offsets);
+}
+
+static void TestJitterbug2411(){
+ static const char* source = "\x1b\x24\x29\x43\x6b\x6b\x6e\x6e\x6a\x68\x70\x6f\x69\x75\x79\x71\x77\x65\x68\x67\x0A"
+ "\x1b\x24\x29\x43\x6a\x61\x73\x64\x66\x6a\x61\x73\x64\x66\x68\x6f\x69\x75\x79\x1b\x24\x29\x43";
+ UConverter* kr=NULL, *kr1=NULL;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UChar tgt[100]={'\0'};
+ UChar* target = tgt;
+ UChar* targetLimit = target+100;
+ kr=ucnv_open("iso-2022-kr", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022-kr converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("iso-2022-kr cannot handle multiple escape sequences : %s\n", u_errorName(errorCode));
+ return;
+ }
+ kr1 = ucnv_open("ibm-25546", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022-kr_1 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ target = tgt;
+ targetLimit = target+100;
+ ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
+
+ if(U_FAILURE(errorCode)) {
+ log_err("iso-2022-kr_1 cannot handle multiple escape sequences : %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ ucnv_close(kr);
+ ucnv_close(kr1);
+
+}
+
+static void
+TestJIS(){
+ /* From Unicode moved to testdata/conversion.txt */
+ /*To Unicode*/
+ {
+ static const uint8_t sampleTextJIS[] = {
+ 0x1b,0x28,0x48,0x41,0x42, /*jis-Roman*/
+ 0x1b,0x28,0x49,0x41,0x42, /*Katakana Set*/
+ 0x1b,0x26,0x40,0x1b,0x24,0x42,0x21,0x21 /*recognize and ignore <esc>&@*/
+ };
+ static const uint16_t expectedISO2022JIS[] = {
+ 0x0041, 0x0042,
+ 0xFF81, 0xFF82,
+ 0x3000
+ };
+ static const int32_t toISO2022JISOffs[]={
+ 3,4,
+ 8,9,
+ 16
+ };
+
+ static const uint8_t sampleTextJIS7[] = {
+ 0x1b,0x28,0x48,0x41,0x42, /*JIS7-Roman*/
+ 0x1b,0x28,0x49,0x41,0x42, /*Katakana Set*/
+ 0x1b,0x24,0x42,0x21,0x21,
+ 0x0e,0x41,0x42,0x0f, /*Test Katakana set with SI and SO */
+ 0x21,0x22,
+ 0x1b,0x26,0x40,0x1b,0x24,0x42,0x21,0x21 /*recognize and ignore <esc>&@*/
+ };
+ static const uint16_t expectedISO2022JIS7[] = {
+ 0x0041, 0x0042,
+ 0xFF81, 0xFF82,
+ 0x3000,
+ 0xFF81, 0xFF82,
+ 0x3001,
+ 0x3000
+ };
+ static const int32_t toISO2022JIS7Offs[]={
+ 3,4,
+ 8,9,
+ 13,16,
+ 17,
+ 19,27
+ };
+ static const uint8_t sampleTextJIS8[] = {
+ 0x1b,0x28,0x48,0x41,0x42, /*JIS8-Roman*/
+ 0xa1,0xc8,0xd9,/*Katakana Set*/
+ 0x1b,0x28,0x42,
+ 0x41,0x42,
+ 0xb1,0xc3, /*Katakana Set*/
+ 0x1b,0x24,0x42,0x21,0x21
+ };
+ static const uint16_t expectedISO2022JIS8[] = {
+ 0x0041, 0x0042,
+ 0xff61, 0xff88, 0xff99,
+ 0x0041, 0x0042,
+ 0xff71, 0xff83,
+ 0x3000
+ };
+ static const int32_t toISO2022JIS8Offs[]={
+ 3, 4, 5, 6,
+ 7, 11, 12, 13,
+ 14, 18,
+ };
+
+ testConvertToU(sampleTextJIS,sizeof(sampleTextJIS),expectedISO2022JIS,
+ sizeof(expectedISO2022JIS)/sizeof(expectedISO2022JIS[0]),"JIS", toISO2022JISOffs,TRUE);
+ testConvertToU(sampleTextJIS7,sizeof(sampleTextJIS7),expectedISO2022JIS7,
+ sizeof(expectedISO2022JIS7)/sizeof(expectedISO2022JIS7[0]),"JIS7", toISO2022JIS7Offs,TRUE);
+ testConvertToU(sampleTextJIS8,sizeof(sampleTextJIS8),expectedISO2022JIS8,
+ sizeof(expectedISO2022JIS8)/sizeof(expectedISO2022JIS8[0]),"JIS8", toISO2022JIS8Offs,TRUE);
+ }
+
+}
+
+static void TestJitterbug915(){
+/* tests for roundtripping of the below sequence
+\x1b$)G\x0E#!#"###$#%#&#'#(#)#*#+ / *plane 1 * /
+\x1b$*H\x1bN"!\x1bN""\x1bN"#\x1bN"$\x1bN"% / *plane 2 * /
+\x1b$+I\x1bO"D\x1bO"E\x1bO"F\x1bO"G\x1bO"H / *plane 3 * /
+\x1b$+J\x1bO!D\x1bO!E\x1bO"j\x1bO"k\x1bO"l / *plane 4 * /
+\x1b$+K\x1bO!t\x1bO"P\x1bO"Q\x1bO#7\x1bO"\ / *plane 5 * /
+\x1b$+L\x1bO!#\x1bO",\x1bO#N\x1bO!n\x1bO#q / *plane 6 * /
+\x1b$+M\x1bO"q\x1bO!N\x1bO!j\x1bO#:\x1bO#o / *plane 7 * /
+*/
+ static const char cSource[]={
+ 0x1B, 0x24, 0x29, 0x47, 0x0E, 0x23, 0x21, 0x23, 0x22, 0x23,
+ 0x23, 0x23, 0x24, 0x23, 0x25, 0x23, 0x26, 0x23, 0x27, 0x23,
+ 0x28, 0x23, 0x29, 0x23, 0x2A, 0x23, 0x2B, 0x0F, 0x2F, 0x2A,
+ 0x70, 0x6C, 0x61, 0x6E, 0x65, 0x20, 0x31, 0x20, 0x2A, 0x2F,
+ 0x0D, 0x0A, 0x1B, 0x24, 0x2A, 0x48, 0x1B, 0x4E, 0x22, 0x21,
+ 0x1B, 0x4E, 0x22, 0x22, 0x1B, 0x4E, 0x22, 0x23, 0x1B, 0x4E,
+ 0x22, 0x24, 0x1B, 0x4E, 0x22, 0x25, 0x2F, 0x2A, 0x70,
+ 0x6C, 0x61, 0x6E, 0x65, 0x32, 0x2A, 0x2F, 0x20, 0x0D, 0x0A,
+ 0x1B, 0x24, 0x2B, 0x49, 0x1B, 0x4F, 0x22, 0x44, 0x1B, 0x4F,
+ 0x22, 0x45, 0x1B, 0x4F, 0x22, 0x46, 0x1B, 0x4F, 0x22, 0x47,
+ 0x1B, 0x4F, 0x22, 0x48, 0x2F, 0x2A, 0x70, 0x6C, 0x61,
+ 0x6E, 0x65, 0x20, 0x33, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B,
+ 0x24, 0x2B, 0x4A, 0x1B, 0x4F, 0x21, 0x44, 0x1B, 0x4F, 0x21,
+ 0x45, 0x1B, 0x4F, 0x22, 0x6A, 0x1B, 0x4F, 0x22, 0x6B, 0x1B,
+ 0x4F, 0x22, 0x6C, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E,
+ 0x65, 0x20, 0x34, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24,
+ 0x2B, 0x4B, 0x1B, 0x4F, 0x21, 0x74, 0x1B, 0x4F, 0x22, 0x50,
+ 0x1B, 0x4F, 0x22, 0x51, 0x1B, 0x4F, 0x23, 0x37, 0x1B, 0x4F,
+ 0x22, 0x5C, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E,
+ 0x65, 0x20, 0x35, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24,
+ 0x2B, 0x4C, 0x1B, 0x4F, 0x21, 0x23, 0x1B, 0x4F, 0x22, 0x2C,
+ 0x1B, 0x4F, 0x23, 0x4E, 0x1B, 0x4F, 0x21, 0x6E, 0x1B, 0x4F,
+ 0x23, 0x71, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E, 0x65,
+ 0x20, 0x36, 0x20, 0x2A, 0x2F, 0x0D, 0x0A, 0x1B, 0x24, 0x2B,
+ 0x4D, 0x1B, 0x4F, 0x22, 0x71, 0x1B, 0x4F, 0x21, 0x4E, 0x1B,
+ 0x4F, 0x21, 0x6A, 0x1B, 0x4F, 0x23, 0x3A, 0x1B, 0x4F, 0x23,
+ 0x6F, 0x2F, 0x2A, 0x70, 0x6C, 0x61, 0x6E, 0x65, 0x20,
+ 0x37, 0x20, 0x2A, 0x2F
+ };
+ UChar uTarget[500]={'\0'};
+ UChar* utarget=uTarget;
+ UChar* utargetLimit=uTarget+sizeof(uTarget)/2;
+
+ char cTarget[500]={'\0'};
+ char* ctarget=cTarget;
+ char* ctargetLimit=cTarget+sizeof(cTarget);
+ const char* csource=cSource;
+ const char* tempSrc = cSource;
+ UErrorCode err=U_ZERO_ERROR;
+
+ UConverter* conv =ucnv_open("ISO_2022_CN_EXT",&err);
+ if(U_FAILURE(err)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(err));
+ return;
+ }
+ ucnv_toUnicode(conv,&utarget,utargetLimit,&csource,csource+sizeof(cSource),NULL,TRUE,&err);
+ if(U_FAILURE(err)) {
+ log_err("iso-2022-CN to Unicode conversion failed: %s\n", u_errorName(err));
+ return;
+ }
+ utargetLimit=utarget;
+ utarget = uTarget;
+ ucnv_fromUnicode(conv,&ctarget,ctargetLimit,(const UChar**)&utarget,utargetLimit,NULL,TRUE,&err);
+ if(U_FAILURE(err)) {
+ log_err("iso-2022-CN from Unicode conversion failed: %s\n", u_errorName(err));
+ return;
+ }
+ ctargetLimit=ctarget;
+ ctarget =cTarget;
+ while(ctarget<ctargetLimit){
+ if(*ctarget != *tempSrc){
+ log_err("j915[%d] Expected : \\x%02X \t Got: \\x%02X\n", (int)(ctarget-cTarget), *ctarget,(int)*tempSrc) ;
+ }
+ ++ctarget;
+ ++tempSrc;
+ }
+
+ ucnv_close(conv);
+}
+
+static void
+TestISO_2022_CN_EXT() {
+ /* test input */
+ static const uint16_t in[]={
+ /* test Non-BMP code points */
+ 0xD869, 0xDE99, 0xD869, 0xDE9C, 0xD869, 0xDE9D, 0xD869, 0xDE9E, 0xD869, 0xDE9F,
+ 0xD869, 0xDEA0, 0xD869, 0xDEA5, 0xD869, 0xDEA6, 0xD869, 0xDEA7, 0xD869, 0xDEA8,
+ 0xD869, 0xDEAB, 0xD869, 0xDEAC, 0xD869, 0xDEAD, 0xD869, 0xDEAE, 0xD869, 0xDEAF,
+ 0xD869, 0xDEB0, 0xD869, 0xDEB1, 0xD869, 0xDEB3, 0xD869, 0xDEB5, 0xD869, 0xDEB6,
+ 0xD869, 0xDEB7, 0xD869, 0xDEB8, 0xD869, 0xDEB9, 0xD869, 0xDEBA, 0xD869, 0xDEBB,
+ 0xD869, 0xDEBC, 0xD869, 0xDEBD, 0xD869, 0xDEBE, 0xD869, 0xDEBF, 0xD869, 0xDEC0,
+ 0xD869, 0xDEC1, 0xD869, 0xDEC2, 0xD869, 0xDEC3, 0xD869, 0xDEC4, 0xD869, 0xDEC8,
+ 0xD869, 0xDECA, 0xD869, 0xDECB, 0xD869, 0xDECD, 0xD869, 0xDECE, 0xD869, 0xDECF,
+ 0xD869, 0xDED0, 0xD869, 0xDED1, 0xD869, 0xDED2, 0xD869, 0xDED3, 0xD869, 0xDED4,
+ 0xD869, 0xDED5,
+
+ 0x4DB3, 0x4DB4, 0x4DB5, 0x4E00, 0x4E00, 0x4E01, 0x4E02, 0x4E03, 0x000D, 0x000A,
+ 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x33E0, 0x33E6, 0x000D, 0x000A,
+ 0x4E05, 0x4E07, 0x4E04, 0x4E08, 0x4E08, 0x4E09, 0x4E0A, 0x4E0B, 0x000D, 0x000A,
+ 0x4E0C, 0x0021, 0x0022, 0x0023, 0x0024, 0xFF40, 0xFF41, 0xFF42, 0x000D, 0x000A,
+ 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0x000D, 0x000A,
+ 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0x6332, 0x63B0, 0x643F, 0x000D, 0x000A,
+ 0x64D8, 0x8004, 0x6BEA, 0x6BF3, 0x6BFD, 0x6BF5, 0x6BF9, 0x6C05, 0x000D, 0x000A,
+ 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x000D, 0x000A,
+ 0x6C07, 0x6C06, 0x6C0D, 0x6C15, 0x9CD9, 0x9CDC, 0x9CDD, 0x9CDF, 0x000D, 0x000A,
+ 0x9CE2, 0x977C, 0x9785, 0x9791, 0x9792, 0x9794, 0x97AF, 0x97AB, 0x000D, 0x000A,
+ 0x97A3, 0x97B2, 0x97B4, 0x9AB1, 0x9AB0, 0x9AB7, 0x9E58, 0x9AB6, 0x000D, 0x000A,
+ 0x9ABA, 0x9ABC, 0x9AC1, 0x9AC0, 0x9AC5, 0x9AC2, 0x9ACB, 0x9ACC, 0x000D, 0x000A,
+ 0x9AD1, 0x9B45, 0x9B43, 0x9B47, 0x9B49, 0x9B48, 0x9B4D, 0x9B51, 0x000D, 0x000A,
+ 0x98E8, 0x990D, 0x992E, 0x9955, 0x9954, 0x9ADF, 0x3443, 0x3444, 0x000D, 0x000A,
+ 0x3445, 0x3449, 0x344A, 0x344B, 0x60F2, 0x60F3, 0x60F4, 0x60F5, 0x000D, 0x000A,
+ 0x60F6, 0x60F7, 0x60F8, 0x60F9, 0x60FA, 0x60FB, 0x60FC, 0x60FD, 0x000D, 0x000A,
+ 0x60FE, 0x60FF, 0x6100, 0x6101, 0x6102, 0x0041, 0x0042, 0x0043, 0x000D, 0x000A,
+ 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x000D, 0x000A,
+
+ 0x33E7, 0x33E8, 0x33E9, 0x33EA, 0x000D, 0x000A
+
+ };
+
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 180;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) * 5);
+ int32_t* myOff= offsets;
+ cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 10);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ else{
+ log_verbose(" Got: \\u%04X\n",(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ /*Test for the condition where there is an invalid character*/
+ ucnv_reset(cnv);
+ {
+ static const uint8_t source2[]={0x0e,0x24,0x053};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN-EXT]");
+ }
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+ free(offsets);
+}
+
+static void
+TestISO_2022_CN() {
+ /* test input */
+ static const uint16_t in[]={
+ /* jitterbug 951 */
+ 0xFF2D, 0xFF49, 0xFF58, 0xFF45, 0xFF44, 0x0020, 0xFF43, 0xFF48, 0xFF41, 0xFF52,
+ 0x0020, 0xFF06, 0x0020, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17,
+ 0xFF18, 0xFF19, 0xFF10, 0x0020, 0xFF4E, 0xFF55, 0xFF4D, 0xFF42, 0xFF45, 0xFF52,
+ 0x0020, 0xFF54, 0xFF45, 0xFF53, 0xFF54, 0x0020, 0xFF4C, 0xFF49, 0xFF4E, 0xFF45,
+ 0x0020, 0x0045, 0x004e, 0x0044,
+ /**/
+ 0x4E00, 0x4E00, 0x4E01, 0x4E03, 0x60F6, 0x60F7, 0x60F8, 0x60FB, 0x000D, 0x000A,
+ 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x60FB, 0x60FC, 0x000D, 0x000A,
+ 0x4E07, 0x4E08, 0x4E08, 0x4E09, 0x4E0A, 0x4E0B, 0x0042, 0x0043, 0x000D, 0x000A,
+ 0x4E0C, 0x0021, 0x0022, 0x0023, 0x0024, 0xFF40, 0xFF41, 0xFF42, 0x000D, 0x000A,
+ 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0x000D, 0x000A,
+ 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0x6332, 0x63B0, 0x643F, 0x000D, 0x000A,
+ 0x64D8, 0x8004, 0x6BEA, 0x6BF3, 0x6BFD, 0x6BF5, 0x6BF9, 0x6C05, 0x000D, 0x000A,
+ 0x6C07, 0x6C06, 0x6C0D, 0x6C15, 0x9CD9, 0x9CDC, 0x9CDD, 0x9CDF, 0x000D, 0x000A,
+ 0x9CE2, 0x977C, 0x9785, 0x9791, 0x9792, 0x9794, 0x97AF, 0x97AB, 0x000D, 0x000A,
+ 0x97A3, 0x97B2, 0x97B4, 0x9AB1, 0x9AB0, 0x9AB7, 0x9E58, 0x9AB6, 0x000D, 0x000A,
+ 0x9ABA, 0x9ABC, 0x9AC1, 0x9AC0, 0x9AC5, 0x9AC2, 0x9ACB, 0x9ACC, 0x000D, 0x000A,
+ 0x9AD1, 0x9B45, 0x9B43, 0x9B47, 0x9B49, 0x9B48, 0x9B4D, 0x9B51, 0x000D, 0x000A,
+ 0x98E8, 0x990D, 0x992E, 0x9955, 0x9954, 0x9ADF, 0x60FE, 0x60FF, 0x000D, 0x000A,
+ 0x60F2, 0x60F3, 0x60F4, 0x60F5, 0x000D, 0x000A, 0x60F9, 0x60FA, 0x000D, 0x000A,
+ 0x6100, 0x6101, 0x0041, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x000D, 0x000A,
+ 0x247D, 0x247E, 0x247F, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486,
+ 0x2487, 0x2460, 0x2461, 0xFF20, 0xFF21, 0xFF22, 0x0049, 0x004A, 0x000D, 0x000A,
+
+ };
+ const UChar* uSource;
+ const UChar* uSourceLimit;
+ const char* cSource;
+ const char* cSourceLimit;
+ UChar *uTargetLimit =NULL;
+ UChar *uTarget;
+ char *cTarget;
+ const char *cTargetLimit;
+ char *cBuf;
+ UChar *uBuf,*test;
+ int32_t uBufSize = 180;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv;
+ int32_t* offsets = (int32_t*) malloc(uBufSize * sizeof(int32_t) * 5);
+ int32_t* myOff= offsets;
+ cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a iso-2022 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5);
+ cBuf =(char*)malloc(uBufSize * sizeof(char) * 10);
+ uSource = (const UChar*)in;
+ uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0]));
+ cTarget = cBuf;
+ cTargetLimit = cBuf +uBufSize*5;
+ uTarget = uBuf;
+ uTargetLimit = uBuf+ uBufSize*5;
+ ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_fromUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ cSource = cBuf;
+ cSourceLimit =cTarget;
+ test =uBuf;
+ myOff=offsets;
+ ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
+ if(U_FAILURE(errorCode)){
+ log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode));
+ return;
+ }
+ uSource = (const UChar*)in;
+ while(uSource<uSourceLimit){
+ if(*test!=*uSource){
+ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ;
+ }
+ else{
+ log_verbose(" Got: \\u%04X\n",(int)*test) ;
+ }
+ uSource++;
+ test++;
+ }
+ TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding");
+ TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
+ TestJitterbug930("csISO2022CN");
+ /*Test for the condition where there is an invalid character*/
+ ucnv_reset(cnv);
+ {
+ static const uint8_t source2[]={0x0e,0x24,0x053};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-CN]");
+ }
+
+ ucnv_close(cnv);
+ free(uBuf);
+ free(cBuf);
+ free(offsets);
+}
+
+static void
+TestEBCDIC_STATEFUL() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x61,
+ 0x1a,
+ 0x0f, 0x4b,
+ 0x42,
+ 0x40,
+ 0x36,
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x002f,
+ 1, 0x0092,
+ 2, 0x002e,
+ 1, 0xff62,
+ 1, 0x0020,
+ 1, 0x0096,
+
+ };
+ static const uint8_t in2[]={
+ 0x0f,
+ 0xa1,
+ 0x01
+ };
+
+ /* expected test results */
+ static const int32_t results2[]={
+ /* number of bytes read, code point */
+ 2, 0x203E,
+ 1, 0x0001,
+ };
+
+ const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("ibm-930", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a EBCDIC_STATEFUL(ibm-930) converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)");
+ ucnv_reset(cnv);
+ /* Test the condition when source >= sourceLimit */
+ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
+ ucnv_reset(cnv);
+ /*Test for the condition where source > sourcelimit after consuming the shift chracter */
+ {
+ static const uint8_t source1[]={0x0f};
+ TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFBOUNDS_ERROR, "a character is truncated");
+ }
+ /*Test for the condition where there is an invalid character*/
+ ucnv_reset(cnv);
+ {
+ static const uint8_t source2[]={0x0e, 0x7F, 0xFF};
+ TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [EBCDIC STATEFUL]");
+ }
+ ucnv_reset(cnv);
+ source=(const char*)in2;
+ limit=(const char*)in2+sizeof(in2);
+ TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2");
+ ucnv_close(cnv);
+
+}
+
+static void
+TestGB18030() {
+ /* test input */
+ static const uint8_t in[]={
+ 0x24,
+ 0x7f,
+ 0x81, 0x30, 0x81, 0x30,
+ 0xa8, 0xbf,
+ 0xa2, 0xe3,
+ 0xd2, 0xbb,
+ 0x82, 0x35, 0x8f, 0x33,
+ 0x84, 0x31, 0xa4, 0x39,
+ 0x90, 0x30, 0x81, 0x30,
+ 0xe3, 0x32, 0x9a, 0x35
+#if 0
+ /*
+ * Feature removed markus 2000-oct-26
+ * Only some codepages must match surrogate pairs into supplementary code points -
+ * see javadoc for ucnv_getNextUChar() and implementation notes in ucnvmbcs.c .
+ * GB 18030 provides direct encodings for supplementary code points, therefore
+ * it must not combine two single-encoded surrogates into one code point.
+ */
+ 0x83, 0x36, 0xc8, 0x30, 0x83, 0x37, 0xb0, 0x34 /* separately encoded surrogates */
+#endif
+ };
+
+ /* expected test results */
+ static const int32_t results[]={
+ /* number of bytes read, code point */
+ 1, 0x24,
+ 1, 0x7f,
+ 4, 0x80,
+ 2, 0x1f9,
+ 2, 0x20ac,
+ 2, 0x4e00,
+ 4, 0x9fa6,
+ 4, 0xffff,
+ 4, 0x10000,
+ 4, 0x10ffff
+#if 0
+ /* Feature removed. See comment above. */
+ 8, 0x10000
+#endif
+ };
+
+/* const char *source=(const char *)in,*limit=(const char *)in+sizeof(in); */
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("gb18030", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a gb18030 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030");
+ ucnv_close(cnv);
+}
+
+static void
+TestLMBCS() {
+ /* LMBCS-1 string */
+ static const uint8_t pszLMBCS[]={
+ 0x61,
+ 0x01, 0x29,
+ 0x81,
+ 0xA0,
+ 0x0F, 0x27,
+ 0x0F, 0x91,
+ 0x14, 0x0a, 0x74,
+ 0x14, 0xF6, 0x02,
+ 0x14, 0xd8, 0x4d, 0x14, 0xdc, 0x56, /* UTF-16 surrogate pair */
+ 0x10, 0x88, 0xA0,
+ };
+
+ /* Unicode UChar32 equivalents */
+ static const UChar32 pszUnicode32[]={
+ /* code point */
+ 0x00000061,
+ 0x00002013,
+ 0x000000FC,
+ 0x000000E1,
+ 0x00000007,
+ 0x00000091,
+ 0x00000a74,
+ 0x00000200,
+ 0x00023456, /* code point for surrogate pair */
+ 0x00005516
+ };
+
+/* Unicode UChar equivalents */
+ static const UChar pszUnicode[]={
+ /* code point */
+ 0x0061,
+ 0x2013,
+ 0x00FC,
+ 0x00E1,
+ 0x0007,
+ 0x0091,
+ 0x0a74,
+ 0x0200,
+ 0xD84D, /* low surrogate */
+ 0xDC56, /* high surrogate */
+ 0x5516
+ };
+
+/* expected test results */
+ static const int offsets32[]={
+ /* number of bytes read, code point */
+ 0,
+ 1,
+ 3,
+ 4,
+ 5,
+ 7,
+ 9,
+ 12,
+ 15,
+ 21,
+ 24
+ };
+
+/* expected test results */
+ static const int offsets[]={
+ /* number of bytes read, code point */
+ 0,
+ 1,
+ 3,
+ 4,
+ 5,
+ 7,
+ 9,
+ 12,
+ 15,
+ 18,
+ 21,
+ 24
+ };
+
+
+ UConverter *cnv;
+
+#define NAME_LMBCS_1 "LMBCS-1"
+#define NAME_LMBCS_2 "LMBCS-2"
+
+
+ /* Some basic open/close/property tests on some LMBCS converters */
+ {
+
+ char expected_subchars[] = {0x3F}; /* ANSI Question Mark */
+ char new_subchars [] = {0x7F}; /* subst char used by SmartSuite..*/
+ char get_subchars [1];
+ const char * get_name;
+ UConverter *cnv1;
+ UConverter *cnv2;
+
+ int8_t len = sizeof(get_subchars);
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ /* Open */
+ cnv1=ucnv_open(NAME_LMBCS_1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ cnv2=ucnv_open(NAME_LMBCS_2, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a LMBCS-2 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* Name */
+ get_name = ucnv_getName (cnv1, &errorCode);
+ if (strcmp(NAME_LMBCS_1,get_name)){
+ log_err("Unexpected converter name: %s\n", get_name);
+ }
+ get_name = ucnv_getName (cnv2, &errorCode);
+ if (strcmp(NAME_LMBCS_2,get_name)){
+ log_err("Unexpected converter name: %s\n", get_name);
+ }
+
+ /* substitution chars */
+ ucnv_getSubstChars (cnv1, get_subchars, &len, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Failure on get subst chars: %s\n", u_errorName(errorCode));
+ }
+ if (len!=1){
+ log_err("Unexpected length of sub chars\n");
+ }
+ if (get_subchars[0] != expected_subchars[0]){
+ log_err("Unexpected value of sub chars\n");
+ }
+ ucnv_setSubstChars (cnv2,new_subchars, len, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Failure on set subst chars: %s\n", u_errorName(errorCode));
+ }
+ ucnv_getSubstChars (cnv2, get_subchars, &len, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Failure on get subst chars: %s\n", u_errorName(errorCode));
+ }
+ if (len!=1){
+ log_err("Unexpected length of sub chars\n");
+ }
+ if (get_subchars[0] != new_subchars[0]){
+ log_err("Unexpected value of sub chars\n");
+ }
+ ucnv_close(cnv1);
+ ucnv_close(cnv2);
+
+ }
+
+ /* LMBCS to Unicode - offsets */
+ {
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ const char * pSource = (const char *)pszLMBCS;
+ const char * sourceLimit = (const char *)pszLMBCS + sizeof(pszLMBCS);
+
+ UChar Out [sizeof(pszUnicode) + 1];
+ UChar * pOut = Out;
+ UChar * OutLimit = Out + sizeof(pszUnicode)/sizeof(UChar);
+
+ int32_t off [sizeof(offsets)];
+
+ /* last 'offset' in expected results is just the final size.
+ (Makes other tests easier). Compensate here: */
+
+ off[(sizeof(offsets)/sizeof(offsets[0]))-1] = sizeof(pszLMBCS);
+
+
+
+ cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a LMBCS converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+
+
+ ucnv_toUnicode (cnv,
+ &pOut,
+ OutLimit,
+ &pSource,
+ sourceLimit,
+ off,
+ TRUE,
+ &errorCode);
+
+
+ if (memcmp(off,offsets,sizeof(offsets)))
+ {
+ log_err("LMBCS->Uni: Calculated offsets do not match expected results\n");
+ }
+ if (memcmp(Out,pszUnicode,sizeof(pszUnicode)))
+ {
+ log_err("LMBCS->Uni: Calculated codepoints do not match expected results\n");
+ }
+ ucnv_close(cnv);
+ }
+ {
+ /* LMBCS to Unicode - getNextUChar */
+ const char * sourceStart;
+ const char *source=(const char *)pszLMBCS;
+ const char *limit=(const char *)pszLMBCS+sizeof(pszLMBCS);
+ const UChar32 *results= pszUnicode32;
+ const int *off = offsets32;
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UChar32 uniChar;
+
+ cnv=ucnv_open("LMBCS-1", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_data_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+ else
+ {
+
+ while(source<limit) {
+ sourceStart=source;
+ uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("LMBCS-1 ucnv_getNextUChar() failed: %s\n", u_errorName(errorCode));
+ break;
+ } else if(source-sourceStart != off[1] - off[0] || uniChar != *results) {
+ log_err("LMBCS-1 ucnv_getNextUChar() result %lx from %d bytes, should have been %lx from %d bytes.\n",
+ uniChar, (source-sourceStart), *results, *off);
+ break;
+ }
+ results++;
+ off++;
+ }
+ }
+ ucnv_close(cnv);
+ }
+ { /* test locale & optimization group operations: Unicode to LMBCS */
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv16he = ucnv_open("LMBCS-16,locale=he", &errorCode);
+ UConverter *cnv16jp = ucnv_open("LMBCS-16,locale=ja_JP", &errorCode);
+ UConverter *cnv01us = ucnv_open("LMBCS-1,locale=us_EN", &errorCode);
+ UChar uniString [] = {0x0192}; /* Latin Small letter f with hook */
+ const UChar * pUniOut = uniString;
+ UChar * pUniIn = uniString;
+ uint8_t lmbcsString [4];
+ const char * pLMBCSOut = (const char *)lmbcsString;
+ char * pLMBCSIn = (char *)lmbcsString;
+
+ /* 0192 (hook) converts to both group 3 & group 1. input locale should differentiate */
+ ucnv_fromUnicode (cnv16he,
+ &pLMBCSIn, (pLMBCSIn + sizeof(lmbcsString)/sizeof(lmbcsString[0])),
+ &pUniOut, pUniOut + sizeof(uniString)/sizeof(uniString[0]),
+ NULL, 1, &errorCode);
+
+ if (lmbcsString[0] != 0x3 || lmbcsString[1] != 0x83)
+ {
+ log_err("LMBCS-16,locale=he gives unexpected translation\n");
+ }
+
+ pLMBCSIn= (char *)lmbcsString;
+ pUniOut = uniString;
+ ucnv_fromUnicode (cnv01us,
+ &pLMBCSIn, (const char *)(lmbcsString + sizeof(lmbcsString)/sizeof(lmbcsString[0])),
+ &pUniOut, pUniOut + sizeof(uniString)/sizeof(uniString[0]),
+ NULL, 1, &errorCode);
+
+ if (lmbcsString[0] != 0x9F)
+ {
+ log_err("LMBCS-1,locale=US gives unexpected translation\n");
+ }
+
+ /* single byte char from mbcs char set */
+ lmbcsString[0] = 0xAE; /* 1/2 width katakana letter small Yo */
+ pLMBCSOut = (const char *)lmbcsString;
+ pUniIn = uniString;
+ ucnv_toUnicode (cnv16jp,
+ &pUniIn, pUniIn + 1,
+ &pLMBCSOut, (pLMBCSOut + 1),
+ NULL, 1, &errorCode);
+ if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+1 || pUniIn != uniString+1 || uniString[0] != 0xFF6E)
+ {
+ log_err("Unexpected results from LMBCS-16 single byte char\n");
+ }
+ /* convert to group 1: should be 3 bytes */
+ pLMBCSIn = (char *)lmbcsString;
+ pUniOut = uniString;
+ ucnv_fromUnicode (cnv01us,
+ &pLMBCSIn, (const char *)(pLMBCSIn + 3),
+ &pUniOut, pUniOut + 1,
+ NULL, 1, &errorCode);
+ if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+3 || pUniOut != uniString+1
+ || lmbcsString[0] != 0x10 || lmbcsString[1] != 0x10 || lmbcsString[2] != 0xAE)
+ {
+ log_err("Unexpected results to LMBCS-1 single byte mbcs char\n");
+ }
+ pLMBCSOut = (const char *)lmbcsString;
+ pUniIn = uniString;
+ ucnv_toUnicode (cnv01us,
+ &pUniIn, pUniIn + 1,
+ &pLMBCSOut, (const char *)(pLMBCSOut + 3),
+ NULL, 1, &errorCode);
+ if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+3 || pUniIn != uniString+1 || uniString[0] != 0xFF6E)
+ {
+ log_err("Unexpected results from LMBCS-1 single byte mbcs char\n");
+ }
+ pLMBCSIn = (char *)lmbcsString;
+ pUniOut = uniString;
+ ucnv_fromUnicode (cnv16jp,
+ &pLMBCSIn, (const char *)(pLMBCSIn + 1),
+ &pUniOut, pUniOut + 1,
+ NULL, 1, &errorCode);
+ if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+1 || pUniOut != uniString+1 || lmbcsString[0] != 0xAE)
+ {
+ log_err("Unexpected results to LMBCS-16 single byte mbcs char\n");
+ }
+ ucnv_close(cnv16he);
+ ucnv_close(cnv16jp);
+ ucnv_close(cnv01us);
+ }
+ {
+ /* Small source buffer testing, LMBCS -> Unicode */
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ const char * pSource = (const char *)pszLMBCS;
+ const char * sourceLimit = (const char *)pszLMBCS + sizeof(pszLMBCS);
+ int codepointCount = 0;
+
+ UChar Out [sizeof(pszUnicode) + 1];
+ UChar * pOut = Out;
+ UChar * OutLimit = Out + sizeof(pszUnicode)/sizeof(UChar);
+
+
+ cnv = ucnv_open(NAME_LMBCS_1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Unable to open a LMBCS-1 converter: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+
+ while ((pSource < sourceLimit) && U_SUCCESS (errorCode))
+ {
+ ucnv_toUnicode (cnv,
+ &pOut,
+ OutLimit,
+ &pSource,
+ (pSource+1), /* claim that this is a 1- byte buffer */
+ NULL,
+ FALSE, /* FALSE means there might be more chars in the next buffer */
+ &errorCode);
+
+ if (U_SUCCESS (errorCode))
+ {
+ if ((pSource - (const char *)pszLMBCS) == offsets [codepointCount+1])
+ {
+ /* we are on to the next code point: check value */
+
+ if (Out[0] != pszUnicode[codepointCount]){
+ log_err("LMBCS->Uni result %lx should have been %lx \n",
+ Out[0], pszUnicode[codepointCount]);
+ }
+
+ pOut = Out; /* reset for accumulating next code point */
+ codepointCount++;
+ }
+ }
+ else
+ {
+ log_err("Unexpected Error on toUnicode: %s\n", u_errorName(errorCode));
+ }
+ }
+ {
+ /* limits & surrogate error testing */
+ char LIn [sizeof(pszLMBCS)];
+ const char * pLIn = LIn;
+
+ char LOut [sizeof(pszLMBCS)];
+ char * pLOut = LOut;
+
+ UChar UOut [sizeof(pszUnicode)];
+ UChar * pUOut = UOut;
+
+ UChar UIn [sizeof(pszUnicode)];
+ const UChar * pUIn = UIn;
+
+ int32_t off [sizeof(offsets)];
+ UChar32 uniChar;
+
+ errorCode=U_ZERO_ERROR;
+
+ /* negative source request should always return U_ILLEGAL_ARGUMENT_ERROR */
+ ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn-1,off,FALSE, &errorCode);
+ if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("Unexpected Error on negative source request to ucnv_fromUnicode: %s\n", u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCode);
+ if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("Unexpected Error on negative source request to ucnv_toUnicode: %s\n", u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+
+ uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode);
+ if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("Unexpected Error on negative source request to ucnv_getNextUChar: %s\n", u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+
+ /* 0 byte source request - no error, no pointer movement */
+ ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode);
+ ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("0 byte source request: unexpected error: %s\n", u_errorName(errorCode));
+ }
+ if ((pUOut != UOut) || (pUIn != UIn) || (pLOut != LOut) || (pLIn != LIn))
+ {
+ log_err("Unexpected pointer move in 0 byte source request \n");
+ }
+ /*0 byte source request - GetNextUChar : error & value == fffe or ffff */
+ uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode);
+ if (errorCode != U_INDEX_OUTOFBOUNDS_ERROR)
+ {
+ log_err("Unexpected Error on 0-byte source request to ucnv_getnextUChar: %s\n", u_errorName(errorCode));
+ }
+ if (((uint32_t)uniChar - 0xfffe) > 1) /* not 0xfffe<=uniChar<=0xffff */
+ {
+ log_err("Unexpected value on 0-byte source request to ucnv_getnextUChar \n");
+ }
+ errorCode = U_ZERO_ERROR;
+
+ /* running out of target room : U_BUFFER_OVERFLOW_ERROR */
+
+ pUIn = pszUnicode;
+ ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALSE, &errorCode);
+ if (errorCode != U_BUFFER_OVERFLOW_ERROR || pLOut != LOut + offsets[4] || pUIn != pszUnicode+4 )
+ {
+ log_err("Unexpected results on out of target room to ucnv_fromUnicode\n");
+ }
+
+ errorCode = U_ZERO_ERROR;
+
+ pLIn = (const char *)pszLMBCS;
+ ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode);
+ if (errorCode != U_BUFFER_OVERFLOW_ERROR || pUOut != UOut + 4 || pLIn != (const char *)pszLMBCS+offsets[4])
+ {
+ log_err("Unexpected results on out of target room to ucnv_toUnicode\n");
+ }
+
+ /* unpaired or chopped LMBCS surrogates */
+
+ /* OK high surrogate, Low surrogate is chopped */
+ LIn [0] = (char)0x14;
+ LIn [1] = (char)0xD8;
+ LIn [2] = (char)0x01;
+ LIn [3] = (char)0x14;
+ LIn [4] = (char)0xDC;
+ pLIn = LIn;
+ errorCode = U_ZERO_ERROR;
+ pUOut = UOut;
+
+ ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
+ if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
+ {
+ log_err("Unexpected results on chopped low surrogate\n");
+ }
+
+ /* chopped at surrogate boundary */
+ LIn [0] = (char)0x14;
+ LIn [1] = (char)0xD8;
+ LIn [2] = (char)0x01;
+ pLIn = LIn;
+ errorCode = U_ZERO_ERROR;
+ pUOut = UOut;
+
+ ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+3),off,TRUE, &errorCode);
+ if (UOut[0] != 0xD801 || U_FAILURE(errorCode) || pUOut != UOut + 1 || pLIn != LIn + 3)
+ {
+ log_err("Unexpected results on chopped at surrogate boundary \n");
+ }
+
+ /* unpaired surrogate plus valid Unichar */
+ LIn [0] = (char)0x14;
+ LIn [1] = (char)0xD8;
+ LIn [2] = (char)0x01;
+ LIn [3] = (char)0x14;
+ LIn [4] = (char)0xC9;
+ LIn [5] = (char)0xD0;
+ pLIn = LIn;
+ errorCode = U_ZERO_ERROR;
+ pUOut = UOut;
+
+ ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+6),off,TRUE, &errorCode);
+ if (UOut[0] != 0xD801 || UOut[1] != 0xC9D0 || U_FAILURE(errorCode) || pUOut != UOut + 2 || pLIn != LIn + 6)
+ {
+ log_err("Unexpected results after unpaired surrogate plus valid Unichar \n");
+ }
+
+ /* unpaired surrogate plus chopped Unichar */
+ LIn [0] = (char)0x14;
+ LIn [1] = (char)0xD8;
+ LIn [2] = (char)0x01;
+ LIn [3] = (char)0x14;
+ LIn [4] = (char)0xC9;
+
+ pLIn = LIn;
+ errorCode = U_ZERO_ERROR;
+ pUOut = UOut;
+
+ ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
+ if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
+ {
+ log_err("Unexpected results after unpaired surrogate plus chopped Unichar \n");
+ }
+
+ /* unpaired surrogate plus valid non-Unichar */
+ LIn [0] = (char)0x14;
+ LIn [1] = (char)0xD8;
+ LIn [2] = (char)0x01;
+ LIn [3] = (char)0x0F;
+ LIn [4] = (char)0x3B;
+
+ pLIn = LIn;
+ errorCode = U_ZERO_ERROR;
+ pUOut = UOut;
+
+ ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
+ if (UOut[0] != 0xD801 || UOut[1] != 0x1B || U_FAILURE(errorCode) || pUOut != UOut + 2 || pLIn != LIn + 5)
+ {
+ log_err("Unexpected results after unpaired surrogate plus valid non-Unichar\n");
+ }
+
+ /* unpaired surrogate plus chopped non-Unichar */
+ LIn [0] = (char)0x14;
+ LIn [1] = (char)0xD8;
+ LIn [2] = (char)0x01;
+ LIn [3] = (char)0x0F;
+
+ pLIn = LIn;
+ errorCode = U_ZERO_ERROR;
+ pUOut = UOut;
+
+ ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pLIn+4),off,TRUE, &errorCode);
+
+ if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 4)
+ {
+ log_err("Unexpected results after unpaired surrogate plus chopped non-Unichar\n");
+ }
+ }
+ }
+ ucnv_close(cnv); /* final cleanup */
+}
+
+
+static void TestJitterbug255()
+{
+ static const uint8_t testBytes[] = { 0x95, 0xcf, 0x8a, 0xb7, 0x0d, 0x0a, 0x00 };
+ const char *testBuffer = (const char *)testBytes;
+ const char *testEnd = (const char *)testBytes + sizeof(testBytes);
+ UErrorCode status = U_ZERO_ERROR;
+ UChar32 result;
+ UConverter *cnv = 0;
+
+ cnv = ucnv_open("shift-jis", &status);
+ if (U_FAILURE(status) || cnv == 0) {
+ log_data_err("Failed to open the converter for SJIS.\n");
+ return;
+ }
+ while (testBuffer != testEnd)
+ {
+ result = ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status);
+ if (U_FAILURE(status))
+ {
+ log_err("Failed to convert the next UChar for SJIS.\n");
+ break;
+ }
+ }
+ ucnv_close(cnv);
+}
+
+static void TestEBCDICUS4XML()
+{
+ UChar unicodes_x[] = {0x0000, 0x0000, 0x0000, 0x0000};
+ static const UChar toUnicodeMaps_x[] = {0x000A, 0x000A, 0x000D, 0x0000};
+ static const char fromUnicodeMaps_x[] = {0x25, 0x25, 0x0D, 0x00};
+ static const char newLines_x[] = {0x25, 0x15, 0x0D, 0x00};
+ char target_x[] = {0x00, 0x00, 0x00, 0x00};
+ UChar *unicodes = unicodes_x;
+ const UChar *toUnicodeMaps = toUnicodeMaps_x;
+ char *target = target_x;
+ const char* fromUnicodeMaps = fromUnicodeMaps_x, *newLines = newLines_x;
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *cnv = 0;
+
+ cnv = ucnv_open("ebcdic-xml-us", &status);
+ if (U_FAILURE(status) || cnv == 0) {
+ log_data_err("Failed to open the converter for EBCDIC-XML-US.\n");
+ return;
+ }
+ ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &status);
+ if (U_FAILURE(status) || memcmp(unicodes_x, toUnicodeMaps, sizeof(UChar)*3) != 0) {
+ log_err("To Unicode conversion failed in EBCDICUS4XML test. %s\n",
+ u_errorName(status));
+ printUSeqErr(unicodes_x, 3);
+ printUSeqErr(toUnicodeMaps, 3);
+ }
+ status = U_ZERO_ERROR;
+ ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRUE, &status);
+ if (U_FAILURE(status) || memcmp(target_x, fromUnicodeMaps, sizeof(char)*3) != 0) {
+ log_err("From Unicode conversion failed in EBCDICUS4XML test. %s\n",
+ u_errorName(status));
+ printSeqErr((const unsigned char*)target_x, 3);
+ printSeqErr((const unsigned char*)fromUnicodeMaps, 3);
+ }
+ ucnv_close(cnv);
+}
+#endif /* #if !UCONFIG_NO_LEGACY_COLLATION */
+
+#if !UCONFIG_NO_COLLATION
+
+static void TestJitterbug981(){
+ const UChar* rules;
+ int32_t rules_length, target_cap, bytes_needed, buff_size;
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *utf8cnv;
+ UCollator* myCollator;
+ char *buff;
+ int numNeeded=0;
+ utf8cnv = ucnv_open ("utf8", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not open UTF-8 converter. Error: %s", u_errorName(status));
+ return;
+ }
+ myCollator = ucol_open("zh", &status);
+ if(U_FAILURE(status)){
+ log_err("Could not open collator for zh locale. Error: %s", u_errorName(status));
+ return;
+ }
+
+ rules = ucol_getRules(myCollator, &rules_length);
+ buff_size = rules_length * ucnv_getMaxCharSize(utf8cnv);
+ buff = malloc(buff_size);
+
+ target_cap = 0;
+ do {
+ ucnv_reset(utf8cnv);
+ status = U_ZERO_ERROR;
+ if(target_cap >= buff_size) {
+ log_err("wanted %d bytes, only %d available\n", target_cap, buff_size);
+ break;
+ }
+ bytes_needed = ucnv_fromUChars(utf8cnv, buff, target_cap,
+ rules, rules_length, &status);
+ target_cap = (bytes_needed > target_cap) ? bytes_needed : target_cap +1;
+ if(numNeeded!=0 && numNeeded!= bytes_needed){
+ log_err("ucnv_fromUChars returns different values for required capacity in pre-flight and conversion modes");
+ break;
+ }
+ numNeeded = bytes_needed;
+ } while (status == U_BUFFER_OVERFLOW_ERROR);
+ ucol_close(myCollator);
+ ucnv_close(utf8cnv);
+ free(buff);
+}
+
+#endif
+
+static void TestJitterbug1293(){
+ static const UChar src[] = {0x30DE, 0x30A4, 0x5E83, 0x544A, 0x30BF, 0x30A4, 0x30D7,0x000};
+ char target[256];
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter* conv=NULL;
+ int32_t target_cap, bytes_needed, numNeeded = 0;
+ conv = ucnv_open("shift-jis",&status);
+ if(U_FAILURE(status)){
+ log_data_err("Could not open Shift-Jis converter. Error: %s", u_errorName(status));
+ return;
+ }
+
+ do{
+ target_cap =0;
+ bytes_needed = ucnv_fromUChars(conv,target,256,src,u_strlen(src),&status);
+ target_cap = (bytes_needed > target_cap) ? bytes_needed : target_cap +1;
+ if(numNeeded!=0 && numNeeded!= bytes_needed){
+ log_err("ucnv_fromUChars returns different values for required capacity in pre-flight and conversion modes");
+ }
+ numNeeded = bytes_needed;
+ } while (status == U_BUFFER_OVERFLOW_ERROR);
+ if(U_FAILURE(status)){
+ log_err("An error occured in ucnv_fromUChars. Error: %s", u_errorName(status));
+ return;
+ }
+ ucnv_close(conv);
+}
+static void TestJB5275_1(){
+
+ static const char* data = "\x3B\xB3\x0A" /* Easy characters */
+ "\xC0\xE9\xBF\xE9\xE8\xD8\x0A" /* Gurmukhi test */
+ /* Switch script: */
+ "\xEF\x43\xC0\xE9\xBF\xE9\xE8\xD8\x0A" /* Bengali test */
+ "\x3B\xB3\x0A" /* Easy characters - new line, so should default!*/
+ "\xEF\x40\x3B\xB3\x0A";
+ static const UChar expected[] ={
+ 0x003b, 0x0a15, 0x000a, /* Easy characters */
+ 0x0a22, 0x0a3c, 0x0a5c, 0x0a4d, 0x0a39, 0x000a, /* Gurmukhi test */
+ 0x09dd, 0x09dc, 0x09cd, 0x09b9, 0x000a, /* Switch script: to Bengali*/
+ 0x003b, 0x0a15, 0x000a, /* Easy characters - new line, so should default!*/
+ 0x003b, 0x0a15, 0x000a /* Back to Gurmukhi*/
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter* conv = ucnv_open("iscii-gur", &status);
+ UChar dest[100] = {'\0'};
+ UChar* target = dest;
+ UChar* targetLimit = dest+100;
+ const char* source = data;
+ const char* sourceLimit = data+strlen(data);
+ const UChar* exp = expected;
+ log_verbose("Testing switching back to default script when new line is encountered.\n");
+ ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &status);
+ if(U_FAILURE(status)){
+ log_err("conversion failed: %s \n", u_errorName(status));
+ }
+ targetLimit = target;
+ target = dest;
+ printUSeq(target, targetLimit-target);
+ while(target<targetLimit){
+ if(*exp!=*target){
+ log_err("did not get the expected output. \\u%04X != \\u%04X (got)\n", *exp, *target);
+ }
+ target++;
+ exp++;
+ }
+ ucnv_close(conv);
+}
+
+static void TestJB5275(){
+ static const char* data =
+ /* "\xEF\x42\xEF\x41\xA4\xD5\xE5\xB3\xEA\x0A" unsupported sequence \xEF\x41 */
+ /* "\xEF\x42\xEF\x41\xD4\xDA\xB3\xE8\xEA\x0A" unsupported sequence \xEF\x41 */
+ /* "\xEF\x44\xEF\x41\xC8\xE1\x8B\xDB\xB3\xE8 \xB3\xE4\xC1\xE8\x0A" unsupported sequence \xEF\x41 */
+ "\xEF\x4B\xC0\xE9\xBF\xE9\xE8\xD8\x0A" /* Gurmukhi test */
+ "\xEF\x4A\xC0\xD4\xBF\xD4\xE8\xD8\x0A" /* Gujarati test */
+ "\xEF\x48\x38\xB3\x0A" /* Kannada test */
+ "\xEF\x49\x39\xB3\x0A" /* Malayalam test */
+ "\xEF\x4A\x3A\xB3\x0A" /* Gujarati test */
+ "\xEF\x4B\x3B\xB3\x0A" /* Punjabi test */
+ /* "\xEF\x4C\x3C\xB3\x0A" unsupported sequence \xEF\x41 */;
+ static const UChar expected[] ={
+ 0x0A22, 0x0A3C, 0x0A5C, 0x0A4D, 0x0A39, 0x000A, /* Gurmukhi test */
+ 0x0AA2, 0x0AB5, 0x0AA1, 0x0AB5, 0x0ACD, 0x0AB9, 0x000A, /* Gujarati test */
+ 0x0038, 0x0C95, 0x000A, /* Kannada test */
+ 0x0039, 0x0D15, 0x000A, /* Malayalam test */
+ 0x003A, 0x0A95, 0x000A, /* Gujarati test */
+ 0x003B, 0x0A15, 0x000A, /* Punjabi test */
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter* conv = ucnv_open("iscii", &status);
+ UChar dest[100] = {'\0'};
+ UChar* target = dest;
+ UChar* targetLimit = dest+100;
+ const char* source = data;
+ const char* sourceLimit = data+strlen(data);
+ const UChar* exp = expected;
+ ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &status);
+ if(U_FAILURE(status)){
+ log_err("conversion failed: %s \n", u_errorName(status));
+ }
+ targetLimit = target;
+ target = dest;
+
+ printUSeq(target, targetLimit-target);
+
+ while(target<targetLimit){
+ if(*exp!=*target){
+ log_err("did not get the expected output. \\u%04X != \\u%04X (got)\n", *exp, *target);
+ }
+ target++;
+ exp++;
+ }
+ ucnv_close(conv);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.h b/Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.h
new file mode 100644
index 00000000000..e70bc08163f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/nucnvtst.h
@@ -0,0 +1,23 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File NUCNVTST.H
+*
+* Modification History:
+* Name Description
+* Madhu Katragadda creation
+*********************************************************************************
+*/
+#ifndef _NUCNVTST
+#define _NUCNVTST
+/* C API TEST FOR CODESET CONVERSION COMPONENT */
+#include "cintltst.h"
+#include "unicode/utypes.h"
+
+static void TestInBufSizes(void);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/putiltst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/putiltst.c
new file mode 100644
index 00000000000..e6cff642b23
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/putiltst.c
@@ -0,0 +1,371 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1998-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File putiltst.c (Tests the API in putil)
+*
+* Modification History:
+*
+* Date Name Description
+* 07/12/2000 Madhu Creation
+*******************************************************************************
+*/
+
+#include "unicode/utypes.h"
+#include "cintltst.h"
+#include "cmemory.h"
+#include "unicode/putil.h"
+#include "unicode/ustring.h"
+#include "cstring.h"
+#include "putilimp.h"
+
+static UBool compareWithNAN(double x, double y);
+static void doAssert(double expect, double got, const char *message);
+
+static void TestPUtilAPI(void){
+
+ double n1=0.0, y1=0.0, expn1, expy1;
+ double value1 = 0.021;
+ UVersionInfo versionArray = {0x01, 0x00, 0x02, 0x02};
+ char versionString[17]; /* xxx.xxx.xxx.xxx\0 */
+ char *str=0;
+ UBool isTrue=FALSE;
+
+ log_verbose("Testing the API uprv_modf()\n");
+ y1 = uprv_modf(value1, &n1);
+ expn1=0;
+ expy1=0.021;
+ if(y1 != expy1 || n1 != expn1){
+ log_err("Error in uprv_modf. Expected IntegralValue=%f, Got=%f, \n Expected FractionalValue=%f, Got=%f\n",
+ expn1, n1, expy1, y1);
+ }
+ if(VERBOSITY){
+ log_verbose("[float] x = %f n = %f y = %f\n", value1, n1, y1);
+ }
+ log_verbose("Testing the API uprv_fmod()\n");
+ expn1=uprv_fmod(30.50, 15.00);
+ doAssert(expn1, 0.5, "uprv_fmod(30.50, 15.00) failed.");
+
+ log_verbose("Testing the API uprv_ceil()\n");
+ expn1=uprv_ceil(value1);
+ doAssert(expn1, 1, "uprv_ceil(0.021) failed.");
+
+ log_verbose("Testing the API uprv_floor()\n");
+ expn1=uprv_floor(value1);
+ doAssert(expn1, 0, "uprv_floor(0.021) failed.");
+
+ log_verbose("Testing the API uprv_fabs()\n");
+ expn1=uprv_fabs((2.02-1.345));
+ doAssert(expn1, 0.675, "uprv_fabs(2.02-1.345) failed.");
+
+ log_verbose("Testing the API uprv_fmax()\n");
+ doAssert(uprv_fmax(2.4, 1.2), 2.4, "uprv_fmax(2.4, 1.2) failed.");
+
+ log_verbose("Testing the API uprv_fmax() with x value= NaN\n");
+ expn1=uprv_fmax(uprv_getNaN(), 1.2);
+ doAssert(expn1, uprv_getNaN(), "uprv_fmax(uprv_getNaN(), 1.2) failed. when one parameter is NaN");
+
+ log_verbose("Testing the API uprv_fmin()\n");
+ doAssert(uprv_fmin(2.4, 1.2), 1.2, "uprv_fmin(2.4, 1.2) failed.");
+
+ log_verbose("Testing the API uprv_fmin() with x value= NaN\n");
+ expn1=uprv_fmin(uprv_getNaN(), 1.2);
+ doAssert(expn1, uprv_getNaN(), "uprv_fmin(uprv_getNaN(), 1.2) failed. when one parameter is NaN");
+
+ log_verbose("Testing the API uprv_max()\n");
+ doAssert(uprv_max(4, 2), 4, "uprv_max(4, 2) failed.");
+
+ log_verbose("Testing the API uprv_min()\n");
+ doAssert(uprv_min(-4, 2), -4, "uprv_min(-4, 2) failed.");
+
+ log_verbose("Testing the API uprv_trunc()\n");
+ doAssert(uprv_trunc(12.3456), 12, "uprv_trunc(12.3456) failed.");
+ doAssert(uprv_trunc(12.234E2), 1223, "uprv_trunc(12.234E2) failed.");
+ doAssert(uprv_trunc(uprv_getNaN()), uprv_getNaN(), "uprv_trunc(uprv_getNaN()) failed. with parameter=NaN");
+ doAssert(uprv_trunc(uprv_getInfinity()), uprv_getInfinity(), "uprv_trunc(uprv_getInfinity()) failed. with parameter=Infinity");
+
+
+ log_verbose("Testing the API uprv_pow10()\n");
+ doAssert(uprv_pow10(4), 10000, "uprv_pow10(4) failed.");
+
+ log_verbose("Testing the API uprv_isNegativeInfinity()\n");
+ isTrue=uprv_isNegativeInfinity(uprv_getInfinity() * -1);
+ if(isTrue != TRUE){
+ log_err("ERROR: uprv_isNegativeInfinity failed.\n");
+ }
+ log_verbose("Testing the API uprv_isPositiveInfinity()\n");
+ isTrue=uprv_isPositiveInfinity(uprv_getInfinity());
+ if(isTrue != TRUE){
+ log_err("ERROR: uprv_isPositiveInfinity failed.\n");
+ }
+ log_verbose("Testing the API uprv_isInfinite()\n");
+ isTrue=uprv_isInfinite(uprv_getInfinity());
+ if(isTrue != TRUE){
+ log_err("ERROR: uprv_isInfinite failed.\n");
+ }
+
+#if 0
+ log_verbose("Testing the API uprv_digitsAfterDecimal()....\n");
+ doAssert(uprv_digitsAfterDecimal(value1), 3, "uprv_digitsAfterDecimal() failed.");
+ doAssert(uprv_digitsAfterDecimal(1.2345E2), 2, "uprv_digitsAfterDecimal(1.2345E2) failed.");
+ doAssert(uprv_digitsAfterDecimal(1.2345E-2), 6, "uprv_digitsAfterDecimal(1.2345E-2) failed.");
+ doAssert(uprv_digitsAfterDecimal(1.2345E2), 2, "uprv_digitsAfterDecimal(1.2345E2) failed.");
+ doAssert(uprv_digitsAfterDecimal(-1.2345E-20), 24, "uprv_digitsAfterDecimal(1.2345E-20) failed.");
+ doAssert(uprv_digitsAfterDecimal(1.2345E20), 0, "uprv_digitsAfterDecimal(1.2345E20) failed.");
+ doAssert(uprv_digitsAfterDecimal(-0.021), 3, "uprv_digitsAfterDecimal(-0.021) failed.");
+ doAssert(uprv_digitsAfterDecimal(23.0), 0, "uprv_digitsAfterDecimal(23.0) failed.");
+ doAssert(uprv_digitsAfterDecimal(0.022223333321), 9, "uprv_digitsAfterDecimal(0.022223333321) failed.");
+#endif
+
+
+ log_verbose("Testing the API u_versionToString().....\n");
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, "1.0.2.2") != 0){
+ log_err("ERROR: u_versionToString() failed. Expected: 1.0.2.2, Got=%s\n", versionString);
+ }
+ log_verbose("Testing the API u_versionToString().....with versionArray=NULL\n");
+ u_versionToString(NULL, versionString);
+ if(strcmp(versionString, "") != 0){
+ log_err("ERROR: u_versionToString() failed. with versionArray=NULL. It should just return\n");
+ }
+ log_verbose("Testing the API u_versionToString().....with versionArray=NULL\n");
+ u_versionToString(NULL, versionString);
+ if(strcmp(versionString, "") != 0){
+ log_err("ERROR: u_versionToString() failed . It should just return\n");
+ }
+ log_verbose("Testing the API u_versionToString().....with versionString=NULL\n");
+ u_versionToString(versionArray, NULL);
+ if(strcmp(versionString, "") != 0){
+ log_err("ERROR: u_versionToString() failed. with versionArray=NULL It should just return\n");
+ }
+ versionArray[0] = 0x0a;
+ log_verbose("Testing the API u_versionToString().....\n");
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, "10.0.2.2") != 0){
+ log_err("ERROR: u_versionToString() failed. Expected: 10.0.2.2, Got=%s\n", versionString);
+ }
+ versionArray[0] = 0xa0;
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, "160.0.2.2") != 0){
+ log_err("ERROR: u_versionToString() failed. Expected: 160.0.2.2, Got=%s\n", versionString);
+ }
+ versionArray[0] = 0xa0;
+ versionArray[1] = 0xa0;
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, "160.160.2.2") != 0){
+ log_err("ERROR: u_versionToString() failed. Expected: 160.160.2.2, Got=%s\n", versionString);
+ }
+ versionArray[0] = 0x01;
+ versionArray[1] = 0x0a;
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, "1.10.2.2") != 0){
+ log_err("ERROR: u_versionToString() failed. Expected: 160.160.2.2, Got=%s\n", versionString);
+ }
+
+ log_verbose("Testing the API u_versionFromString() ....\n");
+ u_versionFromString(versionArray, "1.3.5.6");
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, "1.3.5.6") != 0){
+ log_err("ERROR: u_getVersion() failed. Expected: 1.3.5.6, Got=%s\n", versionString);
+ }
+ log_verbose("Testing the API u_versionFromString() where versionArray=NULL....\n");
+ u_versionFromString(NULL, "1.3.5.6");
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, "1.3.5.6") != 0){
+ log_err("ERROR: u_getVersion() failed. Expected: 1.3.5.6, Got=%s\n", versionString);
+ }
+
+ log_verbose("Testing the API u_getVersion().....\n");
+ u_getVersion(versionArray);
+ u_versionToString(versionArray, versionString);
+ if(strcmp(versionString, U_ICU_VERSION) != 0){
+ log_err("ERROR: u_getVersion() failed. Got=%s, expected %s\n", versionString, U_ICU_VERSION);
+ }
+ log_verbose("Testing the API u_errorName()...\n");
+ str=(char*)u_errorName((UErrorCode)0);
+ if(strcmp(str, "U_ZERO_ERROR") != 0){
+ log_err("ERROR: u_getVersion() failed. Expected: U_ZERO_ERROR Got=%s\n", str);
+ }
+ log_verbose("Testing the API u_errorName()...\n");
+ str=(char*)u_errorName((UErrorCode)-127);
+ if(strcmp(str, "U_USING_DEFAULT_WARNING") != 0){
+ log_err("ERROR: u_getVersion() failed. Expected: U_USING_DEFAULT_WARNING Got=%s\n", str);
+ }
+ log_verbose("Testing the API u_errorName().. with BOGUS ERRORCODE...\n");
+ str=(char*)u_errorName((UErrorCode)200);
+ if(strcmp(str, "[BOGUS UErrorCode]") != 0){
+ log_err("ERROR: u_getVersion() failed. Expected: [BOGUS UErrorCode] Got=%s\n", str);
+ }
+
+ {
+ const char* dataDirectory;
+ int32_t dataDirectoryLen;
+ UChar *udataDir=0;
+ UChar temp[100];
+ char *charvalue=0;
+ log_verbose("Testing chars to UChars\n");
+
+ /* This cannot really work on a japanese system. u_uastrcpy will have different results than */
+ /* u_charsToUChars when there is a backslash in the string! */
+ /*dataDirectory=u_getDataDirectory();*/
+
+ dataDirectory="directory1"; /*no backslashes*/
+ dataDirectoryLen=(int32_t)strlen(dataDirectory);
+ udataDir=(UChar*)malloc(sizeof(UChar) * (dataDirectoryLen + 1));
+ u_charsToUChars(dataDirectory, udataDir, (dataDirectoryLen + 1));
+ u_uastrcpy(temp, dataDirectory);
+
+ if(u_strcmp(temp, udataDir) != 0){
+ log_err("ERROR: u_charsToUChars failed. Expected %s, Got %s\n", austrdup(temp), austrdup(udataDir));
+ }
+ log_verbose("Testing UChars to chars\n");
+ charvalue=(char*)malloc(sizeof(char) * (u_strlen(udataDir) + 1));
+
+ u_UCharsToChars(udataDir, charvalue, (u_strlen(udataDir)+1));
+ if(strcmp(charvalue, dataDirectory) != 0){
+ log_err("ERROR: u_UCharsToChars failed. Expected %s, Got %s\n", charvalue, dataDirectory);
+ }
+ free(charvalue);
+ free(udataDir);
+ }
+
+ log_verbose("Testing uprv_timezone()....\n");
+ {
+ int32_t tzoffset = uprv_timezone();
+ log_verbose("Value returned from uprv_timezone = %d\n", tzoffset);
+ if (tzoffset != 28800) {
+ log_verbose("***** WARNING: If testing in the PST timezone, t_timezone should return 28800! *****");
+ }
+ if ((tzoffset % 1800 != 0)) {
+ log_err("FAIL: t_timezone may be incorrect. It is not a multiple of 30min.");
+ }
+ /*tzoffset=uprv_getUTCtime();*/
+
+ }
+}
+
+#if 0
+static void testIEEEremainder()
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+/* double pzero = 0.0;*/
+/* double nzero = 0.0;
+ nzero *= -1;*/
+
+ /* simple remainder checks*/
+ remainderTest(7.0, 2.5, -0.5);
+ remainderTest(7.0, -2.5, -0.5);
+ /* this should work
+ remainderTest(43.7, 2.5, 1.2);
+ */
+
+ /* infinity and real*/
+ remainderTest(1.0, pinf, 1.0);
+ remainderTest(1.0, ninf, 1.0);
+
+ /*test infinity and real*/
+ remainderTest(nan, 1.0, nan);
+ remainderTest(1.0, nan, nan);
+ /*test infinity and nan*/
+ remainderTest(ninf, nan, nan);
+ remainderTest(pinf, nan, nan);
+
+ /* test infinity and zero */
+/* remainderTest(pinf, pzero, 1.25);
+ remainderTest(pinf, nzero, 1.25);
+ remainderTest(ninf, pzero, 1.25);
+ remainderTest(ninf, nzero, 1.25); */
+}
+
+static void remainderTest(double x, double y, double exp)
+{
+ double result = uprv_IEEEremainder(x,y);
+
+ if( uprv_isNaN(result) &&
+ ! ( uprv_isNaN(x) || uprv_isNaN(y))) {
+ log_err("FAIL: got NaN as result without NaN as argument");
+ log_err(" IEEEremainder(%f, %f) is %f, expected %f\n", x, y, result, exp);
+ }
+ else if(!compareWithNAN(result, exp)) {
+ log_err("FAIL: IEEEremainder(%f, %f) is %f, expected %f\n", x, y, result, exp);
+ } else{
+ log_verbose("OK: IEEEremainder(%f, %f) is %f\n", x, y, result);
+ }
+
+}
+#endif
+
+static UBool compareWithNAN(double x, double y)
+{
+ if( uprv_isNaN(x) || uprv_isNaN(y) ) {
+ if(!uprv_isNaN(x) || !uprv_isNaN(y) ) {
+ return FALSE;
+ }
+ }
+ else if (y != x) { /* no NaN's involved */
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void doAssert(double got, double expect, const char *message)
+{
+ if(! compareWithNAN(expect, got) ) {
+ log_err("ERROR : %s. Expected : %lf, Got: %lf\n", message, expect, got);
+ }
+}
+
+
+#define _CODE_ARR_LEN 8
+static const UErrorCode errorCode[_CODE_ARR_LEN] = {
+ U_USING_FALLBACK_WARNING,
+ U_STRING_NOT_TERMINATED_WARNING,
+ U_ILLEGAL_ARGUMENT_ERROR,
+ U_STATE_TOO_OLD_ERROR,
+ U_BAD_VARIABLE_DEFINITION,
+ U_RULE_MASK_ERROR,
+ U_UNEXPECTED_TOKEN,
+ U_UNSUPPORTED_ATTRIBUTE
+};
+
+static const char* str[] = {
+ "U_USING_FALLBACK_WARNING",
+ "U_STRING_NOT_TERMINATED_WARNING",
+ "U_ILLEGAL_ARGUMENT_ERROR",
+ "U_STATE_TOO_OLD_ERROR",
+ "U_BAD_VARIABLE_DEFINITION",
+ "U_RULE_MASK_ERROR",
+ "U_UNEXPECTED_TOKEN",
+ "U_UNSUPPORTED_ATTRIBUTE"
+};
+
+static void TestErrorName(void){
+ int32_t code=0;
+ const char* errorName ;
+ for(;code<U_ERROR_LIMIT;code++){
+ errorName = u_errorName((UErrorCode)code);
+ }
+
+ for(code=0;code<_CODE_ARR_LEN; code++){
+ errorName = u_errorName(errorCode[code]);
+ if(uprv_strcmp(str[code],errorName )!=0){
+ log_err("Error : u_errorName failed. Expected: %s Got: %s \n",str[code],errorName);
+ }
+ }
+}
+
+void addPUtilTest(TestNode** root);
+
+void
+addPUtilTest(TestNode** root)
+{
+ addTest(root, &TestPUtilAPI, "putiltst/TestPUtilAPI");
+/* addTest(root, &testIEEEremainder, "putiltst/testIEEEremainder"); */
+ addTest(root, &TestErrorName, "putiltst/TestErrorName");
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/reapits.c b/Build/source/libs/icu/icu-xetex/test/cintltst/reapits.c
new file mode 100644
index 00000000000..74fe674f7dc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/reapits.c
@@ -0,0 +1,1038 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2004-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/********************************************************************************
+*
+* File reapits.c
+*
+*********************************************************************************/
+/*C API TEST FOR Regular Expressions */
+/**
+* This is an API test for ICU regular expressions in C. It doesn't test very many cases, and doesn't
+* try to test the full functionality. It just calls each function and verifies that it
+* works on a basic level.
+*
+* More complete testing of regular expression functionality is done with the C++ tests.
+**/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/uloc.h"
+#include "unicode/uregex.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+
+#define TEST_ASSERT_SUCCESS(status) {if (U_FAILURE(status)) { \
+log_err("Failure at file %s, line %d, error = %s\n", __FILE__, __LINE__, u_errorName(status));}}
+
+#define TEST_ASSERT(expr) {if ((expr)==FALSE) { \
+log_err("Test Failure at file %s, line %d\n", __FILE__, __LINE__);}}
+
+static void test_assert_string(const char *expected, const UChar *actual, UBool nulTerm, const char *file, int line) {
+ char buf_inside_macro[120];
+ int32_t len = (int32_t)strlen(expected);
+ UBool success;
+ if (nulTerm) {
+ u_austrncpy(buf_inside_macro, (actual), len+1);
+ buf_inside_macro[len+2] = 0;
+ success = (strcmp((expected), buf_inside_macro) == 0);
+ } else {
+ u_austrncpy(buf_inside_macro, (actual), len);
+ buf_inside_macro[len+1] = 0;
+ success = (strncmp((expected), buf_inside_macro, len) == 0);
+ }
+ if (success == FALSE) {
+ log_err("Failure at file %s, line %d, expected \"%s\", got \"%s\"\n",
+ file, line, (expected), buf_inside_macro);
+ }
+}
+
+#define TEST_ASSERT_STRING(expected, actual, nulTerm) test_assert_string(expected, actual, nulTerm, __FILE__, __LINE__)
+
+
+
+
+
+static void TestRegexCAPI(void);
+static void TestBug4315(void);
+
+void addURegexTest(TestNode** root);
+
+void addURegexTest(TestNode** root)
+{
+ addTest(root, &TestRegexCAPI, "regex/TestRegexCAPI");
+ addTest(root, &TestBug4315, "regex/TestBug4315");
+}
+
+
+static void TestRegexCAPI(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ URegularExpression *re;
+ UChar pat[200];
+ UChar *minus1;
+
+ memset(&minus1, -1, sizeof(minus1));
+
+ /* Mimimalist open/close */
+ u_uastrncpy(pat, "abc*", sizeof(pat)/2);
+ re = uregex_open(pat, -1, 0, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ uregex_close(re);
+
+ /* Open with all flag values set */
+ status = U_ZERO_ERROR;
+ re = uregex_open(pat, -1,
+ UREGEX_CASE_INSENSITIVE | UREGEX_COMMENTS | UREGEX_DOTALL | UREGEX_MULTILINE | UREGEX_UWORD,
+ 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ uregex_close(re);
+
+ /* Open with an invalid flag */
+ status = U_ZERO_ERROR;
+ re = uregex_open(pat, -1, 0x40000000, 0, &status);
+ TEST_ASSERT(status == U_REGEX_INVALID_FLAG);
+ uregex_close(re);
+
+ /* openC with an invalid parameter */
+ status = U_ZERO_ERROR;
+ re = uregex_openC(NULL,
+ UREGEX_CASE_INSENSITIVE | UREGEX_COMMENTS | UREGEX_DOTALL | UREGEX_MULTILINE | UREGEX_UWORD, 0, &status);
+ TEST_ASSERT(status == U_ILLEGAL_ARGUMENT_ERROR && re == NULL);
+
+ /* openC with an invalid parameter */
+ status = U_USELESS_COLLATOR_ERROR;
+ re = uregex_openC(NULL,
+ UREGEX_CASE_INSENSITIVE | UREGEX_COMMENTS | UREGEX_DOTALL | UREGEX_MULTILINE | UREGEX_UWORD, 0, &status);
+ TEST_ASSERT(status == U_USELESS_COLLATOR_ERROR && re == NULL);
+
+ /* openC open from a C string */
+ {
+ const UChar *p;
+ int32_t len;
+ status = U_ZERO_ERROR;
+ re = uregex_openC("abc*", 0, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ p = uregex_pattern(re, &len, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS above should change too... */
+ if(U_SUCCESS(status)) {
+ u_uastrncpy(pat, "abc*", sizeof(pat)/2);
+ TEST_ASSERT(u_strcmp(pat, p) == 0);
+ TEST_ASSERT(len==(int32_t)strlen("abc*"));
+ }
+
+ uregex_close(re);
+
+ /* TODO: Open with ParseError parameter */
+ }
+
+ /*
+ * clone
+ */
+ {
+ URegularExpression *clone1;
+ URegularExpression *clone2;
+ URegularExpression *clone3;
+ UChar testString1[30];
+ UChar testString2[30];
+ UBool result;
+
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC("abc*", 0, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ clone1 = uregex_clone(re, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(clone1 != NULL);
+
+ status = U_ZERO_ERROR;
+ clone2 = uregex_clone(re, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(clone2 != NULL);
+ uregex_close(re);
+
+ status = U_ZERO_ERROR;
+ clone3 = uregex_clone(clone2, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(clone3 != NULL);
+
+ u_uastrncpy(testString1, "abcccd", sizeof(pat)/2);
+ u_uastrncpy(testString2, "xxxabcccd", sizeof(pat)/2);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(clone1, testString1, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+ result = uregex_lookingAt(clone1, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(result==TRUE);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(clone2, testString2, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+ result = uregex_lookingAt(clone2, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(result==FALSE);
+ result = uregex_find(clone2, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(result==TRUE);
+
+ uregex_close(clone1);
+ uregex_close(clone2);
+ uregex_close(clone3);
+
+ }
+
+ /*
+ * pattern()
+ */
+ {
+ const UChar *resultPat;
+ int32_t resultLen;
+ u_uastrncpy(pat, "hello", sizeof(pat)/2);
+ status = U_ZERO_ERROR;
+ re = uregex_open(pat, -1, 0, NULL, &status);
+ resultPat = uregex_pattern(re, &resultLen, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS above should change too... */
+ if (U_SUCCESS(status)) {
+ TEST_ASSERT(resultLen == -1);
+ TEST_ASSERT(u_strcmp(resultPat, pat) == 0);
+ }
+
+ uregex_close(re);
+
+ status = U_ZERO_ERROR;
+ re = uregex_open(pat, 3, 0, NULL, &status);
+ resultPat = uregex_pattern(re, &resultLen, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS above should change too... */
+ if (U_SUCCESS(status)) {
+ TEST_ASSERT(resultLen == 3);
+ TEST_ASSERT(u_strncmp(resultPat, pat, 3) == 0);
+ TEST_ASSERT(u_strlen(resultPat) == 3);
+ }
+
+ uregex_close(re);
+ }
+
+ /*
+ * flags()
+ */
+ {
+ int32_t t;
+
+ status = U_ZERO_ERROR;
+ re = uregex_open(pat, -1, 0, NULL, &status);
+ t = uregex_flags(re, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(t == 0);
+ uregex_close(re);
+
+ status = U_ZERO_ERROR;
+ re = uregex_open(pat, -1, 0, NULL, &status);
+ t = uregex_flags(re, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(t == 0);
+ uregex_close(re);
+
+ status = U_ZERO_ERROR;
+ re = uregex_open(pat, -1, UREGEX_CASE_INSENSITIVE | UREGEX_DOTALL, NULL, &status);
+ t = uregex_flags(re, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(t == (UREGEX_CASE_INSENSITIVE | UREGEX_DOTALL));
+ uregex_close(re);
+ }
+
+ /*
+ * setText() and lookingAt()
+ */
+ {
+ UChar text1[50];
+ UChar text2[50];
+ UBool result;
+
+ u_uastrncpy(text1, "abcccd", sizeof(text1)/2);
+ u_uastrncpy(text2, "abcccxd", sizeof(text2)/2);
+ status = U_ZERO_ERROR;
+ u_uastrncpy(pat, "abc*d", sizeof(pat)/2);
+ re = uregex_open(pat, -1, 0, NULL, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* Operation before doing a setText should fail... */
+ status = U_ZERO_ERROR;
+ uregex_lookingAt(re, 0, &status);
+ TEST_ASSERT( status== U_REGEX_INVALID_STATE);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, -1, &status);
+ result = uregex_lookingAt(re, 0, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text2, -1, &status);
+ result = uregex_lookingAt(re, 0, &status);
+ TEST_ASSERT(result == FALSE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, -1, &status);
+ result = uregex_lookingAt(re, 0, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, 5, &status);
+ result = uregex_lookingAt(re, 0, &status);
+ TEST_ASSERT(result == FALSE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, 6, &status);
+ result = uregex_lookingAt(re, 0, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT_SUCCESS(status);
+
+ uregex_close(re);
+ }
+
+
+ /*
+ * getText()
+ */
+ {
+ UChar text1[50];
+ UChar text2[50];
+ const UChar *result;
+ int32_t textLength;
+
+ u_uastrncpy(text1, "abcccd", sizeof(text1)/2);
+ u_uastrncpy(text2, "abcccxd", sizeof(text2)/2);
+ status = U_ZERO_ERROR;
+ u_uastrncpy(pat, "abc*d", sizeof(pat)/2);
+ re = uregex_open(pat, -1, 0, NULL, &status);
+
+ uregex_setText(re, text1, -1, &status);
+ result = uregex_getText(re, &textLength, &status);
+ TEST_ASSERT(result == text1);
+ TEST_ASSERT(textLength == -1);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text2, 7, &status);
+ result = uregex_getText(re, &textLength, &status);
+ TEST_ASSERT(result == text2);
+ TEST_ASSERT(textLength == 7);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text2, 4, &status);
+ result = uregex_getText(re, &textLength, &status);
+ TEST_ASSERT(result == text2);
+ TEST_ASSERT(textLength == 4);
+ TEST_ASSERT_SUCCESS(status);
+ uregex_close(re);
+ }
+
+ /*
+ * matches()
+ */
+ {
+ UChar text1[50];
+ UBool result;
+ int len;
+ UChar nullString[] = {0,0,0};
+
+ u_uastrncpy(text1, "abcccde", sizeof(text1)/2);
+ status = U_ZERO_ERROR;
+ u_uastrncpy(pat, "abc*d", sizeof(pat)/2);
+ re = uregex_open(pat, -1, 0, NULL, &status);
+
+ uregex_setText(re, text1, -1, &status);
+ result = uregex_matches(re, 0, &status);
+ TEST_ASSERT(result == FALSE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, 6, &status);
+ result = uregex_matches(re, 0, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, 6, &status);
+ result = uregex_matches(re, 1, &status);
+ TEST_ASSERT(result == FALSE);
+ TEST_ASSERT_SUCCESS(status);
+ uregex_close(re);
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC(".?", 0, NULL, &status);
+ uregex_setText(re, text1, -1, &status);
+ len = u_strlen(text1);
+ result = uregex_matches(re, len, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_setText(re, nullString, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+ result = uregex_matches(re, 0, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT_SUCCESS(status);
+ uregex_close(re);
+ }
+
+
+ /*
+ * lookingAt() Used in setText test.
+ */
+
+
+ /*
+ * find(), findNext, start, end, reset
+ */
+ {
+ UChar text1[50];
+ UBool result;
+ u_uastrncpy(text1, "012rx5rx890rxrx...", sizeof(text1)/2);
+ status = U_ZERO_ERROR;
+ re = uregex_openC("rx", 0, NULL, &status);
+
+ uregex_setText(re, text1, -1, &status);
+ result = uregex_find(re, 0, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT(uregex_start(re, 0, &status) == 3);
+ TEST_ASSERT(uregex_end(re, 0, &status) == 5);
+ TEST_ASSERT_SUCCESS(status);
+
+ result = uregex_find(re, 9, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT(uregex_start(re, 0, &status) == 11);
+ TEST_ASSERT(uregex_end(re, 0, &status) == 13);
+ TEST_ASSERT_SUCCESS(status);
+
+ result = uregex_find(re, 14, &status);
+ TEST_ASSERT(result == FALSE);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_reset(re, 0, &status);
+
+ result = uregex_findNext(re, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT(uregex_start(re, 0, &status) == 3);
+ TEST_ASSERT(uregex_end(re, 0, &status) == 5);
+ TEST_ASSERT_SUCCESS(status);
+
+ result = uregex_findNext(re, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT(uregex_start(re, 0, &status) == 6);
+ TEST_ASSERT(uregex_end(re, 0, &status) == 8);
+ TEST_ASSERT_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ uregex_reset(re, 12, &status);
+
+ result = uregex_findNext(re, &status);
+ TEST_ASSERT(result == TRUE);
+ TEST_ASSERT(uregex_start(re, 0, &status) == 13);
+ TEST_ASSERT(uregex_end(re, 0, &status) == 15);
+ TEST_ASSERT_SUCCESS(status);
+
+ result = uregex_findNext(re, &status);
+ TEST_ASSERT(result == FALSE);
+ TEST_ASSERT_SUCCESS(status);
+
+ uregex_close(re);
+ }
+
+ /*
+ * groupCount
+ */
+ {
+ int32_t result;
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC("abc", 0, NULL, &status);
+ result = uregex_groupCount(re, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(result == 0);
+ uregex_close(re);
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC("abc(def)(ghi(j))", 0, NULL, &status);
+ result = uregex_groupCount(re, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(result == 3);
+ uregex_close(re);
+
+ }
+
+
+ /*
+ * group()
+ */
+ {
+ UChar text1[80];
+ UChar buf[80];
+ UBool result;
+ int32_t resultSz;
+ u_uastrncpy(text1, "noise abc interior def, and this is off the end", sizeof(text1)/2);
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC("abc(.*?)def", 0, NULL, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+
+ uregex_setText(re, text1, -1, &status);
+ result = uregex_find(re, 0, &status);
+ TEST_ASSERT(result==TRUE);
+
+ /* Capture Group 0, the full match. Should succeed. */
+ status = U_ZERO_ERROR;
+ resultSz = uregex_group(re, 0, buf, sizeof(buf)/2, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("abc interior def", buf, TRUE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("abc interior def"));
+
+ /* Capture group #1. Should succeed. */
+ status = U_ZERO_ERROR;
+ resultSz = uregex_group(re, 1, buf, sizeof(buf)/2, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING(" interior ", buf, TRUE);
+ TEST_ASSERT(resultSz == (int32_t)strlen(" interior "));
+
+ /* Capture group out of range. Error. */
+ status = U_ZERO_ERROR;
+ uregex_group(re, 2, buf, sizeof(buf)/2, &status);
+ TEST_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+
+ /* NULL buffer, pure pre-flight */
+ status = U_ZERO_ERROR;
+ resultSz = uregex_group(re, 0, NULL, 0, &status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(resultSz == (int32_t)strlen("abc interior def"));
+
+ /* Too small buffer, truncated string */
+ status = U_ZERO_ERROR;
+ memset(buf, -1, sizeof(buf));
+ resultSz = uregex_group(re, 0, buf, 5, &status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT_STRING("abc i", buf, FALSE);
+ TEST_ASSERT(buf[5] == (UChar)0xffff);
+ TEST_ASSERT(resultSz == (int32_t)strlen("abc interior def"));
+
+ /* Output string just fits buffer, no NUL term. */
+ status = U_ZERO_ERROR;
+ resultSz = uregex_group(re, 0, buf, (int32_t)strlen("abc interior def"), &status);
+ TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ TEST_ASSERT_STRING("abc interior def", buf, FALSE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("abc interior def"));
+ TEST_ASSERT(buf[strlen("abc interior def")] == (UChar)0xffff);
+
+ uregex_close(re);
+
+ }
+
+ /*
+ * replaceFirst()
+ */
+ {
+ UChar text1[80];
+ UChar text2[80];
+ UChar replText[80];
+ UChar buf[80];
+ int32_t resultSz;
+ u_uastrncpy(text1, "Replace xaax x1x x...x.", sizeof(text1)/2);
+ u_uastrncpy(text2, "No match here.", sizeof(text2)/2);
+ u_uastrncpy(replText, "<$1>", sizeof(replText)/2);
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC("x(.*?)x", 0, NULL, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* Normal case, with match */
+ uregex_setText(re, text1, -1, &status);
+ resultSz = uregex_replaceFirst(re, replText, -1, buf, sizeof(buf)/2, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("Replace <aa> x1x x...x.", buf, TRUE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
+
+ /* No match. Text should copy to output with no changes. */
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text2, -1, &status);
+ resultSz = uregex_replaceFirst(re, replText, -1, buf, sizeof(buf)/2, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("No match here.", buf, TRUE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("No match here."));
+
+ /* Match, output just fills buffer, no termination warning. */
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, -1, &status);
+ memset(buf, -1, sizeof(buf));
+ resultSz = uregex_replaceFirst(re, replText, -1, buf, strlen("Replace <aa> x1x x...x."), &status);
+ TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ TEST_ASSERT_STRING("Replace <aa> x1x x...x.", buf, FALSE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
+ TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
+
+ /* Do the replaceFirst again, without first resetting anything.
+ * Should give the same results.
+ */
+ status = U_ZERO_ERROR;
+ memset(buf, -1, sizeof(buf));
+ resultSz = uregex_replaceFirst(re, replText, -1, buf, strlen("Replace <aa> x1x x...x."), &status);
+ TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ TEST_ASSERT_STRING("Replace <aa> x1x x...x.", buf, FALSE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
+ TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
+
+ /* NULL buffer, zero buffer length */
+ status = U_ZERO_ERROR;
+ resultSz = uregex_replaceFirst(re, replText, -1, NULL, 0, &status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
+
+ /* Buffer too small by one */
+ status = U_ZERO_ERROR;
+ memset(buf, -1, sizeof(buf));
+ resultSz = uregex_replaceFirst(re, replText, -1, buf, strlen("Replace <aa> x1x x...x.")-1, &status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT_STRING("Replace <aa> x1x x...x", buf, FALSE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
+ TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
+
+ uregex_close(re);
+ }
+
+
+ /*
+ * replaceAll()
+ */
+ {
+ UChar text1[80];
+ UChar text2[80];
+ UChar replText[80];
+ UChar buf[80];
+ int32_t resultSz;
+ int32_t expectedResultSize;
+ int32_t i;
+
+ u_uastrncpy(text1, "Replace xaax x1x x...x.", sizeof(text1)/2);
+ u_uastrncpy(text2, "No match here.", sizeof(text2)/2);
+ u_uastrncpy(replText, "<$1>", sizeof(replText)/2);
+ expectedResultSize = u_strlen(text1);
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC("x(.*?)x", 0, NULL, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* Normal case, with match */
+ uregex_setText(re, text1, -1, &status);
+ resultSz = uregex_replaceAll(re, replText, -1, buf, sizeof(buf)/2, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("Replace <aa> <1> <...>.", buf, TRUE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
+
+ /* No match. Text should copy to output with no changes. */
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text2, -1, &status);
+ resultSz = uregex_replaceAll(re, replText, -1, buf, sizeof(buf)/2, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("No match here.", buf, TRUE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("No match here."));
+
+ /* Match, output just fills buffer, no termination warning. */
+ status = U_ZERO_ERROR;
+ uregex_setText(re, text1, -1, &status);
+ memset(buf, -1, sizeof(buf));
+ resultSz = uregex_replaceAll(re, replText, -1, buf, strlen("Replace xaax x1x x...x."), &status);
+ TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ TEST_ASSERT_STRING("Replace <aa> <1> <...>.", buf, FALSE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace <aa> <1> <...>."));
+ TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
+
+ /* Do the replaceFirst again, without first resetting anything.
+ * Should give the same results.
+ */
+ status = U_ZERO_ERROR;
+ memset(buf, -1, sizeof(buf));
+ resultSz = uregex_replaceAll(re, replText, -1, buf, strlen("Replace xaax x1x x...x."), &status);
+ TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ TEST_ASSERT_STRING("Replace <aa> <1> <...>.", buf, FALSE);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace <aa> <1> <...>."));
+ TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
+
+ /* NULL buffer, zero buffer length */
+ status = U_ZERO_ERROR;
+ resultSz = uregex_replaceAll(re, replText, -1, NULL, 0, &status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(resultSz == (int32_t)strlen("Replace <aa> <1> <...>."));
+
+ /* Buffer too small. Try every size, which will tickle edge cases
+ * in uregex_appendReplacement (used by replaceAll) */
+ for (i=0; i<expectedResultSize; i++) {
+ char expected[80];
+ status = U_ZERO_ERROR;
+ memset(buf, -1, sizeof(buf));
+ resultSz = uregex_replaceAll(re, replText, -1, buf, i, &status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ strcpy(expected, "Replace <aa> <1> <...>.");
+ expected[i] = 0;
+ TEST_ASSERT_STRING(expected, buf, FALSE);
+ TEST_ASSERT(resultSz == expectedResultSize);
+ TEST_ASSERT(buf[i] == (UChar)0xffff);
+ }
+
+ uregex_close(re);
+ }
+
+
+ /*
+ * appendReplacement()
+ */
+ {
+ UChar text[100];
+ UChar repl[100];
+ UChar buf[100];
+ UChar *bufPtr;
+ int32_t bufCap;
+
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC(".*", 0, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ u_uastrncpy(text, "whatever", sizeof(text)/2);
+ u_uastrncpy(repl, "some other", sizeof(repl)/2);
+ uregex_setText(re, text, -1, &status);
+
+ /* match covers whole target string */
+ uregex_find(re, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ bufPtr = buf;
+ bufCap = sizeof(buf) / 2;
+ uregex_appendReplacement(re, repl, -1, &bufPtr, &bufCap, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("some other", buf, TRUE);
+
+ /* Match has \u \U escapes */
+ uregex_find(re, 0, &status);
+ TEST_ASSERT_SUCCESS(status);
+ bufPtr = buf;
+ bufCap = sizeof(buf) / 2;
+ u_uastrncpy(repl, "abc\\u0041\\U00000042 \\\\ $ \\abc", sizeof(repl)/2);
+ uregex_appendReplacement(re, repl, -1, &bufPtr, &bufCap, &status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("abcAB \\ $ abc", buf, TRUE);
+
+ uregex_close(re);
+ }
+
+
+ /*
+ * appendTail(). Checked in ReplaceFirst(), replaceAll().
+ */
+
+ /*
+ * split()
+ */
+ {
+ UChar textToSplit[80];
+ UChar text2[80];
+ UChar buf[200];
+ UChar *fields[10];
+ int32_t numFields;
+ int32_t requiredCapacity;
+ int32_t spaceNeeded;
+ int32_t sz;
+
+ u_uastrncpy(textToSplit, "first : second: third", sizeof(textToSplit)/2);
+ u_uastrncpy(text2, "No match here.", sizeof(text2)/2);
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC(":", 0, NULL, &status);
+
+
+ /* Simple split */
+
+ uregex_setText(re, textToSplit, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if (U_SUCCESS(status)) {
+ memset(fields, -1, sizeof(fields));
+ numFields =
+ uregex_split(re, buf, sizeof(buf)/2, &requiredCapacity, fields, 10, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ TEST_ASSERT(numFields == 3);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING(" second", fields[1], TRUE);
+ TEST_ASSERT_STRING(" third", fields[2], TRUE);
+ TEST_ASSERT(fields[3] == NULL);
+
+ spaceNeeded = u_strlen(textToSplit) -
+ (numFields - 1) + /* Field delimiters do not appear in output */
+ numFields; /* Each field gets a NUL terminator */
+
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+ }
+ }
+
+ uregex_close(re);
+
+
+ /* Split with too few output strings available */
+ status = U_ZERO_ERROR;
+ re = uregex_openC(":", 0, NULL, &status);
+ uregex_setText(re, textToSplit, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ memset(fields, -1, sizeof(fields));
+ numFields =
+ uregex_split(re, buf, sizeof(buf)/2, &requiredCapacity, fields, 2, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ TEST_ASSERT(numFields == 2);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING(" second: third", fields[1], TRUE);
+ TEST_ASSERT(!memcmp(&fields[2],&minus1,sizeof(UChar*)));
+
+ spaceNeeded = u_strlen(textToSplit) -
+ (numFields - 1) + /* Field delimiters do not appear in output */
+ numFields; /* Each field gets a NUL terminator */
+
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+
+ /* Split with a range of output buffer sizes. */
+ spaceNeeded = u_strlen(textToSplit) -
+ (numFields - 1) + /* Field delimiters do not appear in output */
+ numFields; /* Each field gets a NUL terminator */
+
+ for (sz=0; sz < spaceNeeded+1; sz++) {
+ memset(fields, -1, sizeof(fields));
+ status = U_ZERO_ERROR;
+ numFields =
+ uregex_split(re, buf, sz, &requiredCapacity, fields, 10, &status);
+ if (sz >= spaceNeeded) {
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING(" second", fields[1], TRUE);
+ TEST_ASSERT_STRING(" third", fields[2], TRUE);
+ } else {
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ }
+ TEST_ASSERT(numFields == 3);
+ TEST_ASSERT(fields[3] == NULL);
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+ }
+ }
+ }
+
+ uregex_close(re);
+ }
+
+
+
+
+ /* Split(), part 2. Patterns with capture groups. The capture group text
+ * comes out as additional fields. */
+ {
+ UChar textToSplit[80];
+ UChar buf[200];
+ UChar *fields[10];
+ int32_t numFields;
+ int32_t requiredCapacity;
+ int32_t spaceNeeded;
+ int32_t sz;
+
+ u_uastrncpy(textToSplit, "first <tag-a> second<tag-b> third", sizeof(textToSplit)/2);
+
+ status = U_ZERO_ERROR;
+ re = uregex_openC("<(.*?)>", 0, NULL, &status);
+
+ uregex_setText(re, textToSplit, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ memset(fields, -1, sizeof(fields));
+ numFields =
+ uregex_split(re, buf, sizeof(buf)/2, &requiredCapacity, fields, 10, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ TEST_ASSERT(numFields == 5);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING("tag-a", fields[1], TRUE);
+ TEST_ASSERT_STRING(" second", fields[2], TRUE);
+ TEST_ASSERT_STRING("tag-b", fields[3], TRUE);
+ TEST_ASSERT_STRING(" third", fields[4], TRUE);
+ TEST_ASSERT(fields[5] == NULL);
+ spaceNeeded = strlen("first .tag-a. second.tag-b. third."); /* "." at NUL positions */
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+ }
+ }
+
+ /* Split with too few output strings available (2) */
+ status = U_ZERO_ERROR;
+ memset(fields, -1, sizeof(fields));
+ numFields =
+ uregex_split(re, buf, sizeof(buf)/2, &requiredCapacity, fields, 2, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ TEST_ASSERT(numFields == 2);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING(" second<tag-b> third", fields[1], TRUE);
+ TEST_ASSERT(!memcmp(&fields[2],&minus1,sizeof(UChar*)));
+
+ spaceNeeded = strlen("first . second<tag-b> third."); /* "." at NUL positions */
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+ }
+
+ /* Split with too few output strings available (3) */
+ status = U_ZERO_ERROR;
+ memset(fields, -1, sizeof(fields));
+ numFields =
+ uregex_split(re, buf, sizeof(buf)/2, &requiredCapacity, fields, 3, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ TEST_ASSERT(numFields == 3);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING("tag-a", fields[1], TRUE);
+ TEST_ASSERT_STRING(" second<tag-b> third", fields[2], TRUE);
+ TEST_ASSERT(!memcmp(&fields[3],&minus1,sizeof(UChar*)));
+
+ spaceNeeded = strlen("first .tag-a. second<tag-b> third."); /* "." at NUL positions */
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+ }
+
+ /* Split with just enough output strings available (5) */
+ status = U_ZERO_ERROR;
+ memset(fields, -1, sizeof(fields));
+ numFields =
+ uregex_split(re, buf, sizeof(buf)/2, &requiredCapacity, fields, 5, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ TEST_ASSERT(numFields == 5);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING("tag-a", fields[1], TRUE);
+ TEST_ASSERT_STRING(" second", fields[2], TRUE);
+ TEST_ASSERT_STRING("tag-b", fields[3], TRUE);
+ TEST_ASSERT_STRING(" third", fields[4], TRUE);
+ TEST_ASSERT(!memcmp(&fields[5],&minus1,sizeof(UChar*)));
+
+ spaceNeeded = strlen("first .tag-a. second.tag-b. third."); /* "." at NUL positions */
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+ }
+
+ /* Split, end of text is a field delimiter. */
+ status = U_ZERO_ERROR;
+ sz = strlen("first <tag-a> second<tag-b>");
+ uregex_setText(re, textToSplit, sz, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ memset(fields, -1, sizeof(fields));
+ numFields =
+ uregex_split(re, buf, sizeof(buf)/2, &requiredCapacity, fields, 9, &status);
+ TEST_ASSERT_SUCCESS(status);
+
+ /* The TEST_ASSERT_SUCCESS call above should change too... */
+ if(U_SUCCESS(status)) {
+ TEST_ASSERT(numFields == 4);
+ TEST_ASSERT_STRING("first ", fields[0], TRUE);
+ TEST_ASSERT_STRING("tag-a", fields[1], TRUE);
+ TEST_ASSERT_STRING(" second", fields[2], TRUE);
+ TEST_ASSERT_STRING("tag-b", fields[3], TRUE);
+ TEST_ASSERT(fields[4] == NULL);
+ TEST_ASSERT(fields[8] == NULL);
+ TEST_ASSERT(!memcmp(&fields[9],&minus1,sizeof(UChar*)));
+ spaceNeeded = strlen("first .tag-a. second.tag-b."); /* "." at NUL positions */
+ TEST_ASSERT(spaceNeeded == requiredCapacity);
+ }
+ }
+
+ uregex_close(re);
+ }
+
+}
+
+static void TestBug4315(void) {
+ UErrorCode theICUError = U_ZERO_ERROR;
+ URegularExpression *theRegEx;
+ UChar *textBuff;
+ const char *thePattern;
+ UChar theString[100];
+ UChar *destFields[24];
+ int32_t neededLength1;
+ int32_t neededLength2;
+
+ int32_t wordCount = 0;
+ int32_t destFieldsSize = 24;
+
+ thePattern = "ck ";
+ u_uastrcpy(theString, "The quick brown fox jumped over the slow black turtle.");
+
+ /* open a regex */
+ theRegEx = uregex_openC(thePattern, 0, NULL, &theICUError);
+ TEST_ASSERT_SUCCESS(theICUError);
+
+ /* set the input string */
+ uregex_setText(theRegEx, theString, u_strlen(theString), &theICUError);
+ TEST_ASSERT_SUCCESS(theICUError);
+
+ /* split */
+ /*explicitly pass NULL and 0 to force the overflow error -> this is where the
+ * error occurs! */
+ wordCount = uregex_split(theRegEx, NULL, 0, &neededLength1, destFields,
+ destFieldsSize, &theICUError);
+
+ TEST_ASSERT(theICUError == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(wordCount==3);
+
+ if(theICUError == U_BUFFER_OVERFLOW_ERROR)
+ {
+ theICUError = U_ZERO_ERROR;
+ textBuff = (UChar *) malloc(sizeof(UChar) * (neededLength1 + 1));
+ wordCount = uregex_split(theRegEx, textBuff, neededLength1+1, &neededLength2,
+ destFields, destFieldsSize, &theICUError);
+ TEST_ASSERT(wordCount==3);
+ TEST_ASSERT_SUCCESS(theICUError);
+ TEST_ASSERT(neededLength1 == neededLength2);
+ TEST_ASSERT_STRING("The qui", destFields[0], TRUE);
+ TEST_ASSERT_STRING("brown fox jumped over the slow bla", destFields[1], TRUE);
+ TEST_ASSERT_STRING("turtle.", destFields[2], TRUE);
+ TEST_ASSERT(destFields[3] == NULL);
+ free(textBuff);
+ }
+ uregex_close(theRegEx);
+}
+
+#endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/sorttest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/sorttest.c
new file mode 100644
index 00000000000..c99ce507196
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/sorttest.c
@@ -0,0 +1,89 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 2003, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: csorttst.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2003aug04
+* created by: Markus W. Scherer
+*
+* Test internal sorting functions.
+*/
+
+#include "unicode/utypes.h"
+#include "cmemory.h"
+#include "cintltst.h"
+#include "uarrsort.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+static void
+SortTest(void) {
+ uint16_t small[]={ 8, 1, 2, 5, 4, 3, 7, 6 };
+ int32_t medium[]={ 10, 8, 1, 2, 5, 5, -1, 6, 4, 3, 9, 7, 5 };
+ uint32_t large[]={ 21, 10, 20, 19, 11, 12, 13, 10, 10, 10, 10,
+ 8, 1, 2, 5, 10, 10, 4, 17, 18, 3, 9, 10, 7, 6, 14, 15, 16 };
+
+ int32_t i;
+ UErrorCode errorCode;
+
+ /* sort small array (stable) */
+ errorCode=U_ZERO_ERROR;
+ uprv_sortArray(small, LENGTHOF(small), sizeof(small[0]), uprv_uint16Comparator, NULL, TRUE, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("uprv_sortArray(small) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ for(i=1; i<LENGTHOF(small); ++i) {
+ if(small[i-1]>small[i]) {
+ log_err("uprv_sortArray(small) mis-sorted [%d]=%u > [%d]=%u\n", i-1, small[i-1], i, small[i]);
+ return;
+ }
+ }
+
+ /* for medium, add bits that will not be compared, to test stability */
+ for(i=0; i<LENGTHOF(medium); ++i) {
+ medium[i]=(medium[i]<<4)|i;
+ }
+
+ /* sort medium array (stable) */
+ uprv_sortArray(medium, LENGTHOF(medium), sizeof(medium[0]), uprv_int32Comparator, NULL, TRUE, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("uprv_sortArray(medium) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ for(i=1; i<LENGTHOF(medium); ++i) {
+ if(medium[i-1]>=medium[i]) {
+ log_err("uprv_sortArray(medium) mis-sorted [%d]=%u > [%d]=%u\n", i-1, medium[i-1], i, medium[i]);
+ return;
+ }
+ }
+
+ /* sort large array (not stable) */
+ errorCode=U_ZERO_ERROR;
+ uprv_sortArray(large, LENGTHOF(large), sizeof(large[0]), uprv_uint32Comparator, NULL, FALSE, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("uprv_sortArray(large) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ for(i=1; i<LENGTHOF(large); ++i) {
+ if(large[i-1]>large[i]) {
+ log_err("uprv_sortArray(large) mis-sorted [%d]=%u > [%d]=%u\n", i-1, large[i-1], i, large[i]);
+ return;
+ }
+ }
+}
+
+void
+addSortTest(TestNode** root);
+
+void
+addSortTest(TestNode** root) {
+ addTest(root, &SortTest, "tsutil/sorttest/SortTest");
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/spreptst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/spreptst.c
new file mode 100644
index 00000000000..1652984b520
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/spreptst.c
@@ -0,0 +1,641 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: spreptst.c
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003jul11
+ * created by: Ram Viswanadha
+ */
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+#include "unicode/ustring.h"
+#include "unicode/usprep.h"
+#include "cintltst.h"
+#include "nfsprep.h"
+
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+void addUStringPrepTest(TestNode** root);
+void doStringPrepTest(const char* binFileName, const char* txtFileName,
+ int32_t options, UErrorCode* errorCode);
+
+static void Test_nfs4_cs_prep_data(void);
+static void Test_nfs4_cis_prep_data(void);
+static void Test_nfs4_mixed_prep_data(void);
+static void Test_nfs4_cs_prep(void);
+static void Test_nfs4_cis_prep(void);
+static void Test_nfs4_mixed_prep(void);
+static void TestBEAMWarning(void);
+static void TestCoverage(void);
+
+void
+addUStringPrepTest(TestNode** root)
+{
+ addTest(root, &Test_nfs4_cs_prep_data, "spreptst/Test_nfs4_cs_prep_data");
+ addTest(root, &Test_nfs4_cis_prep_data, "spreptst/Test_nfs4_cis_prep_data");
+ addTest(root, &Test_nfs4_mixed_prep_data, "spreptst/Test_nfs4_mixed_prep_data");
+ addTest(root, &Test_nfs4_cs_prep, "spreptst/Test_nfs4_cs_prep");
+ addTest(root, &Test_nfs4_cis_prep, "spreptst/Test_nfs4_cis_prep");
+ addTest(root, &Test_nfs4_mixed_prep, "spreptst/Test_nfs4_mixed_prep");
+ addTest(root, &TestBEAMWarning, "spreptst/TestBEAMWarning");
+ addTest(root, &TestCoverage, "spreptst/TestCoverage");
+}
+
+static void
+Test_nfs4_cs_prep_data(void){
+ UErrorCode errorCode = U_ZERO_ERROR;
+ loadTestData(&errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ log_verbose("Testing nfs4_cs_prep_ci.txt\n");
+ doStringPrepTest("nfscsi","nfs4_cs_prep_ci.txt", USPREP_DEFAULT, &errorCode);
+
+ log_verbose("Testing nfs4_cs_prep_cs.txt\n");
+ errorCode = U_ZERO_ERROR;
+ doStringPrepTest("nfscss","nfs4_cs_prep_cs.txt", USPREP_DEFAULT, &errorCode);
+
+
+}
+static void
+Test_nfs4_cis_prep_data(void){
+ UErrorCode errorCode = U_ZERO_ERROR;
+ log_verbose("Testing nfs4_cis_prep.txt\n");
+ doStringPrepTest("nfscis","nfs4_cis_prep.txt", USPREP_DEFAULT, &errorCode);
+}
+static void
+Test_nfs4_mixed_prep_data(void){
+ UErrorCode errorCode = U_ZERO_ERROR;
+ loadTestData(&errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ log_verbose("Testing nfs4_mixed_prep_s.txt\n");
+ doStringPrepTest("nfsmxs","nfs4_mixed_prep_s.txt", USPREP_DEFAULT, &errorCode);
+
+ errorCode = U_ZERO_ERROR;
+ log_verbose("Testing nfs4_mixed_prep_p.txt\n");
+ doStringPrepTest("nfsmxp","nfs4_mixed_prep_p.txt", USPREP_DEFAULT, &errorCode);
+
+}
+
+static const struct ConformanceTestCases
+ {
+ const char *comment;
+ const char *in;
+ const char *out;
+ const char *profile;
+ UErrorCode expectedStatus;
+ }
+ conformanceTestCases[] =
+ {
+
+ {/*0*/
+ "Case folding ASCII U+0043 U+0041 U+0046 U+0045",
+ "\x43\x41\x46\x45", "\x63\x61\x66\x65",
+ "nfs4_cis_prep",
+ U_ZERO_ERROR
+
+ },
+ {/*1*/
+ "Case folding 8bit U+00DF (german sharp s)",
+ "\xC3\x9F", "\x73\x73",
+ "nfs4_cis_prep",
+ U_ZERO_ERROR
+ },
+ {/*2*/
+ "Non-ASCII multibyte space character U+1680",
+ "\xE1\x9A\x80", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*3*/
+ "Non-ASCII 8bit control character U+0085",
+ "\xC2\x85", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*4*/
+ "Non-ASCII multibyte control character U+180E",
+ "\xE1\xA0\x8E", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*5*/
+ "Non-ASCII control character U+1D175",
+ "\xF0\x9D\x85\xB5", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*6*/
+ "Plane 0 private use character U+F123",
+ "\xEF\x84\xA3", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*7*/
+ "Plane 15 private use character U+F1234",
+ "\xF3\xB1\x88\xB4", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*8*/
+ "Plane 16 private use character U+10F234",
+ "\xF4\x8F\x88\xB4", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*9*/
+ "Non-character code point U+8FFFE",
+ "\xF2\x8F\xBF\xBE", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*10*/
+ "Non-character code point U+10FFFF",
+ "\xF4\x8F\xBF\xBF", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ /*
+ {
+ "Surrogate code U+DF42",
+ "\xED\xBD\x82", NULL, "nfs4_cis_prep", UIDNA_DEFAULT,
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+*/
+ {/*11*/
+ "Non-plain text character U+FFFD",
+ "\xEF\xBF\xBD", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*12*/
+ "Ideographic description character U+2FF5",
+ "\xE2\xBF\xB5", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*13*/
+ "Display property character U+0341",
+ "\xCD\x81", "\xCC\x81",
+ "nfs4_cis_prep", U_ZERO_ERROR
+
+ },
+
+ {/*14*/
+ "Left-to-right mark U+200E",
+ "\xE2\x80\x8E", "\xCC\x81",
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*15*/
+
+ "Deprecated U+202A",
+ "\xE2\x80\xAA", "\xCC\x81",
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*16*/
+ "Language tagging character U+E0001",
+ "\xF3\xA0\x80\x81", "\xCC\x81",
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*17*/
+ "Language tagging character U+E0042",
+ "\xF3\xA0\x81\x82", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_PROHIBITED_ERROR
+ },
+ {/*18*/
+ "Bidi: RandALCat character U+05BE and LCat characters",
+ "\x66\x6F\x6F\xD6\xBE\x62\x61\x72", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_CHECK_BIDI_ERROR
+ },
+ {/*19*/
+ "Bidi: RandALCat character U+FD50 and LCat characters",
+ "\x66\x6F\x6F\xEF\xB5\x90\x62\x61\x72", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_CHECK_BIDI_ERROR
+ },
+ {/*20*/
+ "Bidi: RandALCat character U+FB38 and LCat characters",
+ "\x66\x6F\x6F\xEF\xB9\xB6\x62\x61\x72", "\x66\x6F\x6F\x20\xd9\x8e\x62\x61\x72",
+ "nfs4_cis_prep",
+ U_ZERO_ERROR
+ },
+ {/*21*/
+ "Bidi: RandALCat without trailing RandALCat U+0627 U+0031",
+ "\xD8\xA7\x31", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_CHECK_BIDI_ERROR
+ },
+ {/*22*/
+ "Bidi: RandALCat character U+0627 U+0031 U+0628",
+ "\xD8\xA7\x31\xD8\xA8", "\xD8\xA7\x31\xD8\xA8",
+ "nfs4_cis_prep",
+ U_ZERO_ERROR
+ },
+ {/*23*/
+ "Unassigned code point U+E0002",
+ "\xF3\xA0\x80\x82", NULL,
+ "nfs4_cis_prep",
+ U_STRINGPREP_UNASSIGNED_ERROR
+ },
+
+/* // Invalid UTF-8
+ {
+ "Larger test (shrinking)",
+ "X\xC2\xAD\xC3\xDF\xC4\xB0\xE2\x84\xA1\x6a\xcc\x8c\xc2\xa0\xc2"
+ "\xaa\xce\xb0\xe2\x80\x80", "xssi\xcc\x87""tel\xc7\xb0 a\xce\xb0 ",
+ "nfs4_cis_prep",
+ U_ZERO_ERROR
+ },
+ {
+
+ "Larger test (expanding)",
+ "X\xC3\xDF\xe3\x8c\x96\xC4\xB0\xE2\x84\xA1\xE2\x92\x9F\xE3\x8c\x80",
+ "xss\xe3\x82\xad\xe3\x83\xad\xe3\x83\xa1\xe3\x83\xbc\xe3\x83\x88"
+ "\xe3\x83\xab""i\xcc\x87""tel\x28""d\x29\xe3\x82\xa2\xe3\x83\x91"
+ "\xe3\x83\xbc\xe3\x83\x88"
+ "nfs4_cis_prep",
+ U_ZERO_ERROR
+ },
+ */
+};
+
+#define MAX_BUFFER_SIZE 1000
+
+static int32_t
+unescapeData(const char* src, int32_t srcLen,
+ char* dest, int32_t destCapacity,
+ UErrorCode* status){
+
+ UChar b1Stack[MAX_BUFFER_SIZE];
+ int32_t b1Capacity = MAX_BUFFER_SIZE,
+ b1Len = 0,
+ destLen = 0;
+
+ UChar* b1 = b1Stack;
+
+ b1Len = u_unescape(src,b1,b1Capacity);
+
+ u_strToUTF8(dest, destCapacity, &destLen, b1, b1Len, status);
+
+ return destLen;
+}
+
+
+static void Test_nfs4_cis_prep(void){
+ int32_t i=0;
+ UErrorCode loadStatus = U_ZERO_ERROR;
+ loadTestData(&loadStatus);
+ if (U_FAILURE(loadStatus)) {
+ log_err("Test could not initialize. Got %s\n", u_errorName(loadStatus));
+ return;
+ }
+
+ for(i=0;i< (int32_t)(sizeof(conformanceTestCases)/sizeof(conformanceTestCases[0]));i++){
+ const char* src = conformanceTestCases[i].in;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ UErrorCode expectedStatus = conformanceTestCases[i].expectedStatus;
+ const char* expectedDest = conformanceTestCases[i].out;
+ char* dest = NULL;
+ int32_t destLen = 0;
+
+ destLen = nfs4_cis_prepare(src , (int32_t)strlen(src), dest, destLen, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR;
+ dest = (char*) malloc(++destLen);
+ destLen = nfs4_cis_prepare( src , (int32_t)strlen(src), dest, destLen, &parseError, &status);
+ }
+
+ if(expectedStatus != status){
+ log_err("Did not get the expected status for nfs4_cis_prep at index %i. Expected: %s Got: %s\n",i, u_errorName(expectedStatus), u_errorName(status));
+ }
+ if(U_SUCCESS(status) && (strcmp(expectedDest,dest) !=0)){
+ log_err("Did not get the expected output for nfs4_cis_prep at index %i.\n", i);
+ }
+ free(dest);
+ }
+}
+
+
+
+/*
+ There are several special identifiers ("who") which need to be
+ understood universally, rather than in the context of a particular
+ DNS domain. Some of these identifiers cannot be understood when an
+ NFS client accesses the server, but have meaning when a local process
+ accesses the file. The ability to display and modify these
+ permissions is permitted over NFS, even if none of the access methods
+ on the server understands the identifiers.
+
+ Who Description
+ _______________________________________________________________
+
+ "OWNER" The owner of the file.
+ "GROUP" The group associated with the file.
+ "EVERYONE" The world.
+ "INTERACTIVE" Accessed from an interactive terminal.
+ "NETWORK" Accessed via the network.
+ "DIALUP" Accessed as a dialup user to the server.
+ "BATCH" Accessed from a batch job.
+ "ANONYMOUS" Accessed without any authentication.
+ "AUTHENTICATED" Any authenticated user (opposite of
+ ANONYMOUS)
+ "SERVICE" Access from a system service.
+
+ To avoid conflict, these special identifiers are distinguish by an
+ appended "@" and should appear in the form "xxxx@" (note: no domain
+ name after the "@"). For example: ANONYMOUS@.
+*/
+static const char* mixed_prep_data[] ={
+ "OWNER@",
+ "GROUP@",
+ "EVERYONE@",
+ "INTERACTIVE@",
+ "NETWORK@",
+ "DIALUP@",
+ "BATCH@",
+ "ANONYMOUS@",
+ "AUTHENTICATED@",
+ "\\u0930\\u094D\\u092E\\u094D\\u0915\\u094D\\u0937\\u0947\\u0924\\u094D@slip129-37-118-146.nc.us.ibm.net",
+ "\\u0936\\u094d\\u0930\\u0940\\u092e\\u0926\\u094d@saratoga.pe.utexas.edu",
+ "\\u092d\\u0917\\u0935\\u0926\\u094d\\u0917\\u0940\\u0924\\u093e@dial-120-45.ots.utexas.edu",
+ "\\u0905\\u0927\\u094d\\u092f\\u093e\\u092f@woo-085.dorms.waller.net",
+ "\\u0905\\u0930\\u094d\\u091c\\u0941\\u0928@hd30-049.hil.compuserve.com",
+ "\\u0935\\u093f\\u0937\\u093e\\u0926@pem203-31.pe.ttu.edu",
+ "\\u092f\\u094b\\u0917@56K-227.MaxTNT3.pdq.net",
+ "\\u0927\\u0943\\u0924\\u0930\\u093e\\u0937\\u094d\\u091f\\u094d\\u0930@dial-36-2.ots.utexas.edu",
+ "\\u0909\\u0935\\u093E\\u091A\\u0943@slip129-37-23-152.ga.us.ibm.net",
+ "\\u0927\\u0930\\u094d\\u092e\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947@ts45ip119.cadvision.com",
+ "\\u0915\\u0941\\u0930\\u0941\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947@sdn-ts-004txaustP05.dialsprint.net",
+ "\\u0938\\u092e\\u0935\\u0947\\u0924\\u093e@bar-tnt1s66.erols.com",
+ "\\u092f\\u0941\\u092f\\u0941\\u0924\\u094d\\u0938\\u0935\\u0903@101.st-louis-15.mo.dial-access.att.net",
+ "\\u092e\\u093e\\u092e\\u0915\\u093e\\u0903@h92-245.Arco.COM",
+ "\\u092a\\u093e\\u0923\\u094d\\u0921\\u0935\\u093e\\u0936\\u094d\\u091a\\u0948\\u0935@dial-13-2.ots.utexas.edu",
+ "\\u0915\\u093f\\u092e\\u0915\\u0941\\u0930\\u094d\\u0935\\u0924@net-redynet29.datamarkets.com.ar",
+ "\\u0938\\u0902\\u091c\\u0935@ccs-shiva28.reacciun.net.ve",
+ "\\u0c30\\u0c18\\u0c41\\u0c30\\u0c3e\\u0c2e\\u0c4d@7.houston-11.tx.dial-access.att.net",
+ "\\u0c35\\u0c3f\\u0c36\\u0c4d\\u0c35\\u0c28\\u0c3e\\u0c27@ingw129-37-120-26.mo.us.ibm.net",
+ "\\u0c06\\u0c28\\u0c02\\u0c26\\u0c4d@dialup6.austintx.com",
+ "\\u0C35\\u0C26\\u0C4D\\u0C26\\u0C3F\\u0C30\\u0C3E\\u0C1C\\u0C41@dns2.tpao.gov.tr",
+ "\\u0c30\\u0c3e\\u0c1c\\u0c40\\u0c35\\u0c4d@slip129-37-119-194.nc.us.ibm.net",
+ "\\u0c15\\u0c36\\u0c30\\u0c2c\\u0c3e\\u0c26@cs7.dillons.co.uk.203.119.193.in-addr.arpa",
+ "\\u0c38\\u0c02\\u0c1c\\u0c40\\u0c35\\u0c4d@swprd1.innovplace.saskatoon.sk.ca",
+ "\\u0c15\\u0c36\\u0c30\\u0c2c\\u0c3e\\u0c26@bikini.bologna.maraut.it",
+ "\\u0c38\\u0c02\\u0c1c\\u0c40\\u0c2c\\u0c4d@node91.subnet159-198-79.baxter.com",
+ "\\u0c38\\u0c46\\u0c28\\u0c4d\\u0c17\\u0c41\\u0c2a\\u0c4d\\u0c24@cust19.max5.new-york.ny.ms.uu.net",
+ "\\u0c05\\u0c2e\\u0c30\\u0c47\\u0c02\\u0c26\\u0c4d\\u0c30@balexander.slip.andrew.cmu.edu",
+ "\\u0c39\\u0c28\\u0c41\\u0c2e\\u0c3e\\u0c28\\u0c41\\u0c32@pool029.max2.denver.co.dynip.alter.net",
+ "\\u0c30\\u0c35\\u0c3f@cust49.max9.new-york.ny.ms.uu.net",
+ "\\u0c15\\u0c41\\u0c2e\\u0c3e\\u0c30\\u0c4d@s61.abq-dialin2.hollyberry.com",
+ "\\u0c35\\u0c3f\\u0c36\\u0c4d\\u0c35\\u0c28\\u0c3e\\u0c27@\\u0917\\u0928\\u0947\\u0936.sanjose.ibm.com",
+ "\\u0c06\\u0c26\\u0c3f\\u0c24\\u0c4d\\u0c2f@www.\\u00E0\\u00B3\\u00AF.com",
+ "\\u0C15\\u0C02\\u0C26\\u0C4D\\u0C30\\u0C47\\u0C17\\u0C41\\u0c32@www.\\u00C2\\u00A4.com",
+ "\\u0c36\\u0c4d\\u0c30\\u0c40\\u0C27\\u0C30\\u0C4D@www.\\u00C2\\u00A3.com",
+ "\\u0c15\\u0c02\\u0c1f\\u0c2e\\u0c36\\u0c46\\u0c1f\\u0c4d\\u0c1f\\u0c3f@\\u0025",
+ "\\u0c2e\\u0c3e\\u0c27\\u0c35\\u0c4d@\\u005C\\u005C",
+ "\\u0c26\\u0c46\\u0c36\\u0c46\\u0c1f\\u0c4d\\u0c1f\\u0c3f@www.\\u0021.com",
+ "test@www.\\u0024.com",
+ "help@\\u00C3\\u00BC.com",
+
+};
+
+
+static void
+Test_nfs4_mixed_prep(void){
+ UErrorCode loadStatus = U_ZERO_ERROR;
+ loadTestData(&loadStatus);
+ if (U_FAILURE(loadStatus)) {
+ log_err("Test could not initialize. Got %s\n", u_errorName(loadStatus));
+ return;
+ }
+
+ {
+ int32_t i=0;
+ char src[MAX_BUFFER_SIZE];
+ int32_t srcLen;
+
+ for(i=0; i< LENGTHOF(mixed_prep_data); i++){
+ int32_t destLen=0;
+ char* dest = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ srcLen = unescapeData(mixed_prep_data[i], (int32_t)strlen(mixed_prep_data[i]), src, MAX_BUFFER_SIZE, &status);
+ if(U_FAILURE(status)){
+ log_err("Conversion of data at index %i failed. Error: %s\n", i, u_errorName(status));
+ continue;
+ }
+ destLen = nfs4_mixed_prepare(src, srcLen, NULL, 0, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR;
+ dest = (char*)malloc(++destLen);
+ destLen = nfs4_mixed_prepare(src, srcLen, dest, destLen, &parseError, &status);
+ }
+ free(dest);
+ if(U_FAILURE(status)){
+ log_err("Preparation of string at index %i failed. Error: %s\n", i, u_errorName(status));
+ continue;
+ }
+ }
+ }
+ /* test the error condition */
+ {
+ const char* source = "OWNER@oss.software.ibm.com";
+ char dest[MAX_BUFFER_SIZE];
+ char src[MAX_BUFFER_SIZE] = {0};
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+
+ int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
+
+ nfs4_mixed_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, &parseError, &status);
+
+ if(status != U_PARSE_ERROR){
+ log_err("Did not get the expected error.Expected: %s Got: %s\n", u_errorName(U_PARSE_ERROR), u_errorName(status));
+ }
+ }
+
+
+}
+
+static void
+Test_nfs4_cs_prep(void){
+ UErrorCode errorCode = U_ZERO_ERROR;
+ loadTestData(&errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ {
+ /* BiDi checking is turned off */
+ const char *source = "\\uC138\\uACC4\\uC758\\uBAA8\\uB4E0\\uC0AC\\uB78C\\uB4E4\\uC774\\u0644\\u064A\\u0647\\uD55C\\uAD6D\\uC5B4\\uB97C\\uC774\\uD574\\uD55C\\uB2E4\\uBA74";
+ UErrorCode status = U_ZERO_ERROR;
+ char src[MAX_BUFFER_SIZE]={'\0'};
+ UParseError parseError;
+ int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
+ if(U_SUCCESS(status)){
+ char dest[MAX_BUFFER_SIZE] = {'\0'};
+ int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, FALSE, &parseError, &status);
+ if(U_FAILURE(status)){
+ log_err("StringPrep failed for case: BiDi Checking Turned OFF with error: %s\n", u_errorName(status));
+ }
+ if(strcmp(dest,src)!=0){
+ log_err("Did not get the expected output for case: BiDi Checking Turned OFF\n");
+ }
+ if(destLen != srcLen){
+ log_err("Did not get the expected length for the output for case: BiDi Checking Turned OFF. Expected: %i Got: %i\n", srcLen, destLen);
+ }
+ }else{
+ log_err("Conversion failed for case: BiDi Checking Turned OFF with error: %s\n", u_errorName(status));
+ }
+ }
+ {
+ /* Normalization turned off */
+ const char *source = "www.\\u00E0\\u00B3\\u00AF.com";
+ UErrorCode status = U_ZERO_ERROR;
+ char src[MAX_BUFFER_SIZE]={'\0'};
+ UParseError parseError;
+ int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
+ if(U_SUCCESS(status)){
+ char dest[MAX_BUFFER_SIZE] = {'\0'};
+ int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, FALSE, &parseError, &status);
+ if(U_FAILURE(status)){
+ log_err("StringPrep failed for case: Normalization Turned OFF with error: %s\n", u_errorName(status));
+ }
+ if(strcmp(dest,src)!=0){
+ log_err("Did not get the expected output for case: Normalization Turned OFF\n");
+ }
+ if(destLen != srcLen){
+ log_err("Did not get the expected length for the output for case: Normalization Turned OFF. Expected: %i Got: %i\n", srcLen, destLen);
+ }
+ }else{
+ log_err("Conversion failed for case: Normalization Turned OFF with error: %s\n", u_errorName(status));
+ }
+ }
+ {
+ /* case mapping turned off */
+ const char *source = "THISISATEST";
+ UErrorCode status = U_ZERO_ERROR;
+ char src[MAX_BUFFER_SIZE]={'\0'};
+ UParseError parseError;
+ int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
+ if(U_SUCCESS(status)){
+ char dest[MAX_BUFFER_SIZE] = {'\0'};
+ int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, TRUE, &parseError, &status);
+ if(U_FAILURE(status)){
+ log_err("StringPrep failed for case: Case Mapping Turned OFF with error: %s\n", u_errorName(status));
+ }
+ if(strcmp(dest,src)!=0){
+ log_err("Did not get the expected output for case: Case Mapping Turned OFF\n");
+ }
+ if(destLen != srcLen){
+ log_err("Did not get the expected length for the output for case: Case Mapping Turned OFF. Expected: %i Got: %i\n", srcLen, destLen);
+ }
+ }else{
+ log_err("Conversion failed for case: Case Mapping Turned OFF with error: %s\n", u_errorName(status));
+ }
+ }
+ {
+ /* case mapping turned on */
+ const char *source = "THISISATEST";
+ const char *expected = "thisisatest";
+ UErrorCode status = U_ZERO_ERROR;
+ char src[MAX_BUFFER_SIZE]={'\0'};
+ char exp[MAX_BUFFER_SIZE]={'\0'};
+ UParseError parseError;
+ int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
+ int32_t expLen = unescapeData(expected, (int32_t)strlen(expected), exp, MAX_BUFFER_SIZE, &status);
+ if(U_SUCCESS(status)){
+ char dest[MAX_BUFFER_SIZE] = {'\0'};
+ int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, FALSE, &parseError, &status);
+ if(U_FAILURE(status)){
+ log_err("StringPrep failed for case: Case Mapping Turned On with error: %s\n", u_errorName(status));
+ }
+ if(strcmp(exp, dest)!=0){
+ log_err("Did not get the expected output for case: Case Mapping Turned On!\n");
+ }
+ if(destLen != expLen){
+ log_err("Did not get the expected length for the outputfor case: Case Mapping Turned On. Expected: %i Got: %i\n", strlen(expected), destLen);
+ }
+ }else{
+ log_err("Conversion failed for case: Case Mapping Turned ON with error: %s\n", u_errorName(status));
+ }
+ }
+}
+
+
+
+static void TestBEAMWarning(){
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ UStringPrepProfile* profile = NULL;
+ /* get the test data path */
+ const char *testdatapath = NULL;
+ UChar src =0x0000;
+ testdatapath = loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+ /* open the profile */
+ profile = usprep_open(testdatapath, "nfscis", &status);
+ usprep_prepare(profile,&src , 0, NULL, 0, USPREP_DEFAULT, &parseError, &status);
+
+ usprep_close(profile);
+}
+
+static void TestCoverage(void) {
+ UErrorCode status = U_USELESS_COLLATOR_ERROR;
+ UParseError parseError;
+
+ usprep_open(NULL, NULL, &status);
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("usprep_open didn't react correctly to a bad UErrorCode\n");
+ }
+ usprep_prepare(NULL, NULL, 0, NULL, 0, USPREP_DEFAULT, &parseError, &status);
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("usprep_prepare didn't react correctly to a bad UErrorCode\n");
+ }
+ status = U_ZERO_ERROR;
+ usprep_prepare(NULL, NULL, 0, NULL, 0, USPREP_DEFAULT, &parseError, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("usprep_prepare didn't check its arguments\n");
+ }
+
+ /* Don't crash */
+ usprep_close(NULL);
+}
+
+#endif
+
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/sprpdata.c b/Build/source/libs/icu/icu-xetex/test/cintltst/sprpdata.c
new file mode 100644
index 00000000000..0349541c4be
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/sprpdata.c
@@ -0,0 +1,312 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2004, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: spreptst.c
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003jul11
+ * created by: Ram Viswanadha
+ */
+#define USPREP_TYPE_NAMES_ARRAY
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+#include "unicode/ustring.h"
+#include "unicode/putil.h"
+#include "cintltst.h"
+#include "unicode/usprep.h"
+#include "sprpimpl.h"
+#include "uparse.h"
+#include "cmemory.h"
+#include "ustr_imp.h"
+#include "cstring.h"
+
+static void
+parseMappings(const char *filename, UStringPrepProfile* data, UBool reportError, UErrorCode *pErrorCode);
+
+static void
+compareMapping(UStringPrepProfile* data, uint32_t codepoint, uint32_t* mapping, int32_t mapLength,
+ UStringPrepType option);
+
+static void
+compareFlagsForRange(UStringPrepProfile* data, uint32_t start, uint32_t end,UStringPrepType option);
+
+void
+doStringPrepTest(const char* binFileName, const char* txtFileName, int32_t options, UErrorCode* errorCode);
+
+static void U_CALLCONV
+strprepProfileLineFn(void *context,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode) {
+ uint32_t mapping[40];
+ char *end, *map;
+ uint32_t code;
+ int32_t length;
+ UStringPrepProfile* data = (UStringPrepProfile*) context;
+ const char* typeName;
+ uint32_t rangeStart=0,rangeEnd =0;
+
+ typeName = fields[2][0];
+ map = fields[1][0];
+
+ if(strstr(typeName, usprepTypeNames[USPREP_UNASSIGNED])!=NULL){
+
+ u_parseCodePointRange(fields[0][0], &rangeStart,&rangeEnd, pErrorCode);
+
+ /* store the range */
+ compareFlagsForRange(data, rangeStart,rangeEnd,USPREP_UNASSIGNED);
+
+ }else if(strstr(typeName, usprepTypeNames[USPREP_PROHIBITED])!=NULL){
+
+ u_parseCodePointRange(fields[0][0], &rangeStart,&rangeEnd, pErrorCode);
+
+ /* store the range */
+ compareFlagsForRange(data, rangeStart,rangeEnd,USPREP_PROHIBITED);
+
+ }else if(strstr(typeName, usprepTypeNames[USPREP_MAP])!=NULL){
+ /* get the character code, field 0 */
+ code=(uint32_t)uprv_strtoul(fields[0][0], &end, 16);
+
+ /* parse the mapping string */
+ length=u_parseCodePoints(map, mapping, sizeof(mapping)/4, pErrorCode);
+
+ /* compare the mapping */
+ compareMapping(data, code,mapping, length,USPREP_MAP);
+ }else{
+ *pErrorCode = U_INVALID_FORMAT_ERROR;
+ }
+
+}
+
+
+
+static void
+parseMappings(const char *filename, UStringPrepProfile* data, UBool reportError, UErrorCode *pErrorCode) {
+ char *fields[3][2];
+
+ if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ return;
+ }
+
+ u_parseDelimitedFile(filename, ';', fields, 3, strprepProfileLineFn, (void*)data, pErrorCode);
+
+ /*fprintf(stdout,"Number of code points that have mappings with length >1 : %i\n",len);*/
+
+ if(U_FAILURE(*pErrorCode) && (reportError || *pErrorCode!=U_FILE_ACCESS_ERROR)) {
+ log_err( "testidn error: u_parseDelimitedFile(\"%s\") failed - %s\n", filename, u_errorName(*pErrorCode));
+ }
+}
+
+
+static UStringPrepType
+getValues(uint32_t result, int32_t* value, UBool* isIndex){
+
+ UStringPrepType type;
+ if(result == 0){
+ /*
+ * Initial value stored in the mapping table
+ * just return USPREP_TYPE_LIMIT .. so that
+ * the source codepoint is copied to the destination
+ */
+ type = USPREP_TYPE_LIMIT;
+ }else if(result >= _SPREP_TYPE_THRESHOLD){
+ type = (UStringPrepType) (result - _SPREP_TYPE_THRESHOLD);
+ }else{
+ /* get the type */
+ type = USPREP_MAP;
+ /* ascertain if the value is index or delta */
+ if(result & 0x02){
+ *isIndex = TRUE;
+ *value = result >> 2;
+
+ }else{
+ *isIndex = FALSE;
+ *value = (int16_t)result;
+ *value = (*value >> 2);
+
+ }
+ if((result>>2) == _SPREP_MAX_INDEX_VALUE){
+ type = USPREP_DELETE;
+ isIndex =FALSE;
+ value = 0;
+ }
+ }
+ return type;
+}
+
+static void
+compareMapping(UStringPrepProfile* data, uint32_t codepoint, uint32_t* mapping,int32_t mapLength,
+ UStringPrepType type){
+ uint32_t result = 0;
+ int32_t length=0;
+ UBool isIndex = FALSE;
+ UStringPrepType retType;
+ int32_t value=0, index=0, delta=0;
+ int32_t* indexes = data->indexes;
+ UTrie trie = data->sprepTrie;
+ const uint16_t* mappingData = data->mappingData;
+ int32_t realLength =0;
+ int32_t j=0;
+ int8_t i=0;
+
+ UTRIE_GET16(&trie, codepoint, result);
+ retType = getValues(result,&value,&isIndex);
+
+
+ if(type != retType && retType != USPREP_DELETE){
+
+ log_err( "Did not get the assigned type for codepoint 0x%08X. Expected: %i Got: %i\n",codepoint, USPREP_MAP, type);
+
+ }
+
+ if(isIndex){
+ index = value;
+ if(index >= indexes[_SPREP_ONE_UCHAR_MAPPING_INDEX_START] &&
+ index < indexes[_SPREP_TWO_UCHARS_MAPPING_INDEX_START]){
+ length = 1;
+ }else if(index >= indexes[_SPREP_TWO_UCHARS_MAPPING_INDEX_START] &&
+ index < indexes[_SPREP_THREE_UCHARS_MAPPING_INDEX_START]){
+ length = 2;
+ }else if(index >= indexes[_SPREP_THREE_UCHARS_MAPPING_INDEX_START] &&
+ index < indexes[_SPREP_FOUR_UCHARS_MAPPING_INDEX_START]){
+ length = 3;
+ }else{
+ length = mappingData[index++];
+ }
+ }else{
+ delta = value;
+ length = (retType == USPREP_DELETE)? 0 : 1;
+ }
+
+ /* figure out the real length */
+ for(j=0; j<mapLength; j++){
+ if(mapping[j] > 0xFFFF){
+ realLength +=2;
+ }else{
+ realLength++;
+ }
+ }
+
+ if(realLength != length){
+ log_err( "Did not get the expected length. Expected: %i Got: %i\n", mapLength, length);
+ }
+
+ if(isIndex){
+ for(i =0; i< mapLength; i++){
+ if(mapping[i] <= 0xFFFF){
+ if(mappingData[index+i] != (uint16_t)mapping[i]){
+ log_err("Did not get the expected result. Expected: 0x%04X Got: 0x%04X \n", mapping[i], mappingData[index+i]);
+ }
+ }else{
+ UChar lead = UTF16_LEAD(mapping[i]);
+ UChar trail = UTF16_TRAIL(mapping[i]);
+ if(mappingData[index+i] != lead ||
+ mappingData[index+i+1] != trail){
+ log_err( "Did not get the expected result. Expected: 0x%04X 0x%04X Got: 0x%04X 0x%04X\n", lead, trail, mappingData[index+i], mappingData[index+i+1]);
+ }
+ }
+ }
+ }else{
+ if(retType!=USPREP_DELETE && (codepoint-delta) != (uint16_t)mapping[0]){
+ log_err("Did not get the expected result. Expected: 0x%04X Got: 0x%04X \n", mapping[0],(codepoint-delta));
+ }
+ }
+
+}
+
+static void
+compareFlagsForRange(UStringPrepProfile* data,
+ uint32_t start, uint32_t end,
+ UStringPrepType type){
+
+ uint32_t result =0 ;
+ UStringPrepType retType;
+ UBool isIndex=FALSE;
+ int32_t value=0;
+ UTrie trie = data->sprepTrie;
+/*
+ // supplementary code point
+ UChar __lead16=UTF16_LEAD(0x2323E);
+ int32_t __offset;
+
+ // get data for lead surrogate
+ (result)=_UTRIE_GET_RAW((&idnTrie), index, 0, (__lead16));
+ __offset=(&idnTrie)->getFoldingOffset(result);
+
+ // get the real data from the folded lead/trail units
+ if(__offset>0) {
+ (result)=_UTRIE_GET_RAW((&idnTrie), index, __offset, (0x2323E)&0x3ff);
+ } else {
+ (result)=(uint32_t)((&idnTrie)->initialValue);
+ }
+
+ UTRIE_GET16(&idnTrie,0x2323E, result);
+*/
+ while(start < end+1){
+ UTRIE_GET16(&trie,start, result);
+ retType = getValues(result, &value, &isIndex);
+ if(result > _SPREP_TYPE_THRESHOLD){
+ if(retType != type){
+ log_err( "FAIL: Did not get the expected type for 0x%06X. Expected: %s Got: %s\n",start,usprepTypeNames[type], usprepTypeNames[retType]);
+ }
+ }else{
+ if(type == USPREP_PROHIBITED && ((result & 0x01) != 0x01)){
+ log_err( "FAIL: Did not get the expected type for 0x%06X. Expected: %s Got: %s\n",start,usprepTypeNames[type], usprepTypeNames[retType]);
+ }
+ }
+
+ start++;
+ }
+
+}
+
+void
+doStringPrepTest(const char* binFileName, const char* txtFileName, int32_t options, UErrorCode* errorCode){
+
+ const char *testdatapath = loadTestData(errorCode);
+ const char *srcdatapath = NULL;
+ const char *relativepath = NULL;
+ char *filename = NULL;
+ UStringPrepProfile* profile = NULL;
+
+#ifdef U_TOPSRCDIR
+ srcdatapath = U_TOPSRCDIR;
+ relativepath = U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+#else
+ srcdatapath = ctest_dataOutDir();
+ relativepath = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+#endif
+
+ filename = (char*) malloc(strlen(srcdatapath)+strlen(relativepath)+strlen(txtFileName)+10 );
+ profile = usprep_open(testdatapath, binFileName, errorCode);
+
+ if(U_FAILURE(*errorCode)){
+ log_err("Failed to load %s data file. Error: %s \n", binFileName, u_errorName(*errorCode));
+ return;
+ }
+ /* open and load the txt file */
+ strcpy(filename,srcdatapath);
+ strcat(filename,relativepath);
+ strcat(filename,txtFileName);
+
+ parseMappings(filename,profile, TRUE,errorCode);
+
+ free(filename);
+}
+#endif
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/stdnmtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/stdnmtst.c
new file mode 100644
index 00000000000..2da96145b3c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/stdnmtst.c
@@ -0,0 +1,297 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2000-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File stdnmtst.c
+*
+* Modification History:
+*
+* Date Name Description
+* 08/05/2000 Yves Creation
+******************************************************************************
+*/
+
+#include "unicode/ucnv.h"
+#include "unicode/ustring.h"
+#include "cstring.h"
+#include "cintltst.h"
+
+#define ARRAY_SIZE(array) (int32_t)(sizeof array / sizeof array[0])
+
+static void TestStandardName(void);
+static void TestStandardNames(void);
+static void TestCanonicalName(void);
+
+void addStandardNamesTest(TestNode** root);
+
+
+void
+addStandardNamesTest(TestNode** root)
+{
+ addTest(root, &TestStandardName, "tsconv/stdnmtst/TestStandardName");
+ addTest(root, &TestStandardNames, "tsconv/stdnmtst/TestStandardNames");
+ addTest(root, &TestCanonicalName, "tsconv/stdnmtst/TestCanonicalName");
+}
+
+static int dotestname(const char *name, const char *standard, const char *expected) {
+ int res = 1;
+
+ UErrorCode error;
+ const char *tag;
+
+ error = U_ZERO_ERROR;
+ tag = ucnv_getStandardName(name, standard, &error);
+ if (!tag && expected) {
+ log_err("FAIL: could not find %s standard name for %s\n", standard, name);
+ res = 0;
+ } else if (expected && (name == tag || uprv_strcmp(expected, tag))) {
+ log_err("FAIL: expected %s for %s standard name for %s, got %s\n", expected, standard, name, tag);
+ res = 0;
+ }
+
+ return res;
+}
+
+static void TestStandardName()
+{
+ int res = 1;
+
+ uint16_t i, count;
+ UErrorCode err;
+
+ /* Iterate over all standards. */
+ for (i = 0, count = ucnv_countStandards(); i < count-1; ++i) {
+ const char *standard;
+
+ err = U_ZERO_ERROR;
+ standard = ucnv_getStandard(i, &err);
+ if (U_FAILURE(err)) {
+ log_err("FAIL: ucnv_getStandard(%d), error=%s\n", i, u_errorName(err));
+ res = 0;
+ } else if (!standard || !*standard) {
+ log_err("FAIL: %s standard name at index %d\n", (standard ? "empty" :
+ "null"), i);
+ res = 0;
+ }
+ }
+ err = U_ZERO_ERROR;
+ /* "" must be last */
+ if(!count) {
+ log_data_err("No standards. You probably have no data.\n");
+ } else if (*ucnv_getStandard((uint16_t)(count-1), &err) != 0) {
+ log_err("FAIL: ucnv_getStandard(%d) should return ""\n", count-1);
+ res = 0;
+ }
+ err = U_ZERO_ERROR;
+ if (ucnv_getStandard(++i, &err)) {
+ log_err("FAIL: ucnv_getStandard(%d) should return NULL\n", i);
+ res = 0;
+ }
+
+ if (res) {
+ log_verbose("PASS: iterating over standard names works\n");
+ }
+
+ /* Test for some expected results. */
+
+ if (dotestname("ibm-1208", "MIME", "UTF-8") &&
+ /*dotestname("cp1252", "MIME", "windows-1252") &&*/
+ dotestname("ascii", "MIME", "US-ASCII") &&
+ dotestname("csiso2022jp2", "MIME", "ISO-2022-JP-2") &&
+ dotestname("Iso20-22__cN", "IANA", "ISO-2022-CN") &&
+ dotestname("ascii", "IANA", "ANSI_X3.4-1968") &&
+ dotestname("cp850", "IANA", "IBM850") &&
+ dotestname("crazy", "MIME", NULL) &&
+ dotestname("ASCII", "crazy", NULL) &&
+ dotestname("LMBCS-1", "MIME", NULL))
+ {
+ log_verbose("PASS: getting IANA and MIME standard names works\n");
+ }
+}
+
+static int dotestconv(const char *name, const char *standard, const char *expected) {
+ int res = 1;
+
+ UErrorCode error;
+ const char *tag;
+
+ error = U_ZERO_ERROR;
+ tag = ucnv_getCanonicalName(name, standard, &error);
+ if (tag && !expected) {
+ log_err("FAIL: Unexpectedly found %s canonical name for %s, got %s\n", standard, name, tag);
+ res = 0;
+ }
+ else if (!tag && expected) {
+ log_err("FAIL: could not find %s canonical name for %s\n", (standard ? "\"\"" : standard), name);
+ res = 0;
+ }
+ else if (expected && (name == tag || uprv_strcmp(expected, tag) != 0)) {
+ log_err("FAIL: expected %s for %s canonical name for %s, got %s\n", expected, standard, name, tag);
+ res = 0;
+ }
+ else {
+ log_verbose("PASS: (\"%s\", \"%s\") -> %s == %s \n", name, standard, tag, expected);
+ }
+
+ return res;
+}
+
+static void TestCanonicalName()
+{
+ /* Test for some expected results. */
+
+ if (dotestconv("UTF-8", "IANA", "UTF-8") && /* default name */
+ dotestconv("UTF-8", "MIME", "UTF-8") && /* default name */
+ dotestconv("ibm-1208", "IBM", "UTF-8") && /* default name */
+ dotestconv("ibm-5305", "IBM", "UTF-8") && /* non-default name */
+ dotestconv("ibm-5305", "MIME", NULL) && /* mapping does not exist */
+ dotestconv("ascii", "MIME", NULL) && /* mapping does not exist */
+ dotestconv("ibm-1208", "IANA", NULL) && /* mapping does not exist */
+ dotestconv("ibm-5305", "IANA", NULL) && /* mapping does not exist */
+ dotestconv("cp1208", "", "UTF-8") && /* default name due to ordering */
+ dotestconv("UTF16_BigEndian", "", "UTF-16BE") && /* non-default name due to ordering */
+ dotestconv("ISO-2022-CN", "IANA", "ISO_2022,locale=zh,version=0") &&/* default name */
+ dotestconv("Shift_JIS", "MIME", "ibm-943_P15A-2003") &&/* ambiguous alias */
+ dotestconv("Shift_JIS", "", "ibm-943_P130-1999") &&/* ambiguous alias */
+ dotestconv("ibm-943", "", "ibm-943_P15A-2003") &&/* ambiguous alias */
+ dotestconv("ibm-943", "IBM", "ibm-943_P130-1999") &&/* ambiguous alias */
+ dotestconv("ibm-1363", "", "ibm-1363_P11B-1998") &&/* ambiguous alias */
+ dotestconv("ibm-1363", "IBM", "ibm-1363_P110-1997") &&/* ambiguous alias */
+ dotestconv("crazy", "MIME", NULL) &&
+ dotestconv("ASCII", "crazy", NULL))
+ {
+ log_verbose("PASS: getting IANA and MIME canonical names works\n");
+ }
+}
+
+
+static UBool doTestNames(const char *name, const char *standard, const char **expected, int32_t size) {
+ UErrorCode err = U_ZERO_ERROR;
+ UEnumeration *myEnum = ucnv_openStandardNames(name, standard, &err);
+ const char *enumName, *testName;
+ int32_t enumCount = uenum_count(myEnum, &err);
+ int32_t idx, len, repeatTimes = 3;
+ if (size != enumCount) {
+ log_err("FAIL: different size arrays for %s. Got %d. Expected %d\n", name, enumCount, size);
+ return 0;
+ }
+ if (size < 0 && myEnum) {
+ log_err("FAIL: size < 0, but recieved an actual object\n");
+ return 0;
+ }
+ log_verbose("\n%s %s\n", name, standard);
+ while (repeatTimes-- > 0) {
+ for (idx = 0; idx < enumCount; idx++) {
+ enumName = uenum_next(myEnum, &len, &err);
+ testName = expected[idx];
+ if (uprv_strcmp(enumName, testName) != 0 || U_FAILURE(err)
+ || len != (int32_t)uprv_strlen(expected[idx]))
+ {
+ log_err("FAIL: uenum_next(%d) == \"%s\". expected \"%s\", len=%d, error=%s\n",
+ idx, enumName, testName, len, u_errorName(err));
+ }
+ log_verbose("%s\n", enumName);
+ err = U_ZERO_ERROR;
+ }
+ if (enumCount >= 0) {
+ /* one past the list of all names must return NULL */
+ enumName = uenum_next(myEnum, &len, &err);
+ if (enumName != NULL || len != 0 || U_FAILURE(err)) {
+ log_err("FAIL: uenum_next(past the list) did not return NULL[0] with U_SUCCESS(). name=%s standard=%s len=%d err=%s\n", name, standard, len, u_errorName(err));
+ }
+ }
+ log_verbose("\n reset\n");
+ uenum_reset(myEnum, &err);
+ if (U_FAILURE(err)) {
+ log_err("FAIL: uenum_reset() for %s{%s} failed with %s\n",
+ name, standard, u_errorName(err));
+ err = U_ZERO_ERROR;
+ }
+ }
+ uenum_close(myEnum);
+ return 1;
+}
+
+static UBool doTestUCharNames(const char *name, const char *standard, const char **expected, int32_t size) {
+ UErrorCode err = U_ZERO_ERROR;
+ UEnumeration *myEnum = ucnv_openStandardNames(name, standard, &err);
+ int32_t enumCount = uenum_count(myEnum, &err);
+ int32_t idx, repeatTimes = 3;
+ if (size != enumCount) {
+ log_err("FAIL: different size arrays. Got %d. Expected %d\n", enumCount, size);
+ return 0;
+ }
+ if (size < 0 && myEnum) {
+ log_err("FAIL: size < 0, but recieved an actual object\n");
+ return 0;
+ }
+ log_verbose("\n%s %s\n", name, standard);
+ while (repeatTimes-- > 0) {
+ for (idx = 0; idx < enumCount; idx++) {
+ UChar testName[256];
+ int32_t len;
+ const UChar *enumName = uenum_unext(myEnum, &len, &err);
+ u_uastrncpy(testName, expected[idx], sizeof(testName)/sizeof(testName[0]));
+ if (u_strcmp(enumName, testName) != 0 || U_FAILURE(err)
+ || len != (int32_t)uprv_strlen(expected[idx]))
+ {
+ log_err("FAIL: uenum_next(%d) == \"%s\". expected \"%s\", len=%d, error=%s\n",
+ idx, enumName, testName, len, u_errorName(err));
+ }
+ log_verbose("%s\n", expected[idx]);
+ err = U_ZERO_ERROR;
+ }
+ log_verbose("\n reset\n");
+ uenum_reset(myEnum, &err);
+ if (U_FAILURE(err)) {
+ log_err("FAIL: uenum_reset() for %s{%s} failed with %s\n",
+ name, standard, u_errorName(err));
+ err = U_ZERO_ERROR;
+ }
+ }
+ uenum_close(myEnum);
+ return 1;
+}
+
+static void TestStandardNames()
+{
+ static const char *asciiIANA[] = {
+ "ANSI_X3.4-1968",
+ "US-ASCII",
+ "ASCII",
+ "ANSI_X3.4-1986",
+ "ISO_646.irv:1991",
+ "ISO646-US",
+ "us",
+ "csASCII",
+ "iso-ir-6",
+ "cp367",
+ "IBM367",
+ };
+ static const char *asciiMIME[] = {
+ "US-ASCII"
+ };
+
+ static const char *iso2022MIME[] = {
+ "ISO-2022-KR",
+ };
+
+ doTestNames("ASCII", "IANA", asciiIANA, ARRAY_SIZE(asciiIANA));
+ doTestNames("US-ASCII", "IANA", asciiIANA, ARRAY_SIZE(asciiIANA));
+ doTestNames("ASCII", "MIME", asciiMIME, ARRAY_SIZE(asciiMIME));
+ doTestNames("ascii", "mime", asciiMIME, ARRAY_SIZE(asciiMIME));
+
+ doTestNames("ASCII", "crazy", asciiMIME, -1);
+ doTestNames("crazy", "MIME", asciiMIME, -1);
+
+ doTestNames("LMBCS-1", "MIME", asciiMIME, 0);
+
+ doTestNames("ISO_2022,locale=ko,version=0", "MIME", iso2022MIME, ARRAY_SIZE(iso2022MIME));
+ doTestNames("csiso2022kr", "MIME", iso2022MIME, ARRAY_SIZE(iso2022MIME));
+
+ log_verbose(" Testing unext()\n");
+ doTestUCharNames("ASCII", "IANA", asciiIANA, ARRAY_SIZE(asciiIANA));
+
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/tracetst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/tracetst.c
new file mode 100644
index 00000000000..d61804482a1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/tracetst.c
@@ -0,0 +1,379 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2003-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+ * File tracetst.c
+ *
+ */
+
+
+#include "unicode/utypes.h"
+#include "unicode/utrace.h"
+#include "unicode/uclean.h"
+#include "unicode/uchar.h"
+#include "unicode/ures.h"
+#include "unicode/ucnv.h"
+#include "cintltst.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+/* We define the following to always test tracing, even when it's off in the library. */
+#if U_ENABLE_TRACING
+#define ENABLE_TRACING_ORIG_VAL 1
+#else
+#define ENABLE_TRACING_ORIG_VAL 0
+#endif
+#undef U_ENABLE_TRACING
+#define U_ENABLE_TRACING 1
+#include "utracimp.h"
+
+
+static void TestTraceAPI(void);
+
+
+void
+addUTraceTest(TestNode** root);
+
+void
+addUTraceTest(TestNode** root)
+{
+ addTest(root, &TestTraceAPI, "tsutil/TraceTest/TestTraceAPI" );
+}
+
+
+/*
+ * Macro for assert style tests.
+ */
+#define TEST_ASSERT(expr) \
+if (!(expr)) { \
+ log_err("FAILED Assertion \"" #expr "\" at %s:%d.\n", __FILE__, __LINE__); \
+}
+
+
+/*
+ * test_format. Helper function for checking the results of a formatting
+ * operation. Executes the format op and compares actual
+ * results with the expected results.
+ *
+ * params: format: the format to be applied.
+ * bufCap buffer size to pass to formatter.
+ * indent: indent value to give to formatter
+ * result expected result. Do not truncate for short bufCap -
+ * this function will do it.
+ * line __LINE__, so we can report where failure happened.
+ * ... variable args to pass to formatter
+ *
+ */
+static void test_format(const char *format, int32_t bufCap, int32_t indent,
+ const char *result, int32_t line, ...) {
+ int32_t len;
+ va_list args;
+ char buf[300];
+ char expectedResult[300];
+
+ /* check that local buffers are big enough for the test case */
+ if (sizeof(buf) <= bufCap) {
+ log_err("At file:line %s:%d, requested bufCap too large.\n");
+ return;
+ }
+ if (strlen(result) >= sizeof(expectedResult)) {
+ log_err("At file:line %s:%d, expected result too large.\n");
+ return;
+ }
+
+ /* Guarantee a nul term if buffer is smaller than output */
+ strcpy(expectedResult, result);
+ expectedResult[bufCap] = 0;
+
+ /* run the formatter */
+ va_start(args, line);
+ memset(buf, 0, sizeof(buf));
+ len = utrace_vformat(buf, bufCap, indent, format, args);
+
+ /* Check results. */
+ if (strcmp(expectedResult, buf) != 0) {
+ log_err("At file:line %s:%d Expected \"%s\", got \"%s\" \n",
+ __FILE__, line, expectedResult, buf);
+ }
+ va_end(args);
+}
+
+
+/*
+ * define trace functions for use in this test.
+ */
+static int gTraceEntryCount;
+static int gTraceExitCount;
+static int gTraceDataCount;
+static UBool gFnNameError = FALSE;
+static UBool gFnFormatError = FALSE;
+
+static void U_CALLCONV testTraceEntry(const void *context, int32_t fnNumber) {
+ const char *fnName;
+ const char *bogusFnName;
+
+ gTraceEntryCount++;
+
+ /* Verify that a name is available for the fnNumber passed to us */
+ bogusFnName = utrace_functionName(-1);
+ fnName = utrace_functionName(fnNumber);
+ if (strcmp(fnName, bogusFnName) == 0) {
+ gFnNameError = TRUE;
+ }
+ /* printf("%s() Enter\n", fnName); */
+
+}
+
+static void U_CALLCONV testTraceExit(const void *context, int32_t fnNumber,
+ const char *fmt, va_list args) {
+ char buf[1000];
+ const char *fnName;
+ const char *bogusFnName;
+
+ gTraceExitCount++;
+
+ /* Verify that a name is available for the fnNumber passed to us */
+ bogusFnName = utrace_functionName(-1);
+ fnName = utrace_functionName(fnNumber);
+ if (strcmp(fnName, bogusFnName) == 0) {
+ gFnNameError = TRUE;
+ }
+
+ /* Verify that the format can be used. */
+ buf[0] = 0;
+ utrace_vformat(buf, sizeof(buf), 0, fmt, args);
+ if (strlen(buf) == 0) {
+ gFnFormatError = TRUE;
+ }
+
+ /* printf("%s() %s\n", fnName, buf); */
+
+}
+
+static void U_CALLCONV testTraceData(const void *context, int32_t fnNumber, int32_t level,
+ const char *fmt, va_list args) {
+ char buf[1000];
+ const char *fnName;
+ const char *bogusFnName;
+
+ gTraceDataCount++;
+
+ /* Verify that a name is available for the fnNumber passed to us */
+ bogusFnName = utrace_functionName(-1);
+ fnName = utrace_functionName(fnNumber);
+ if (strcmp(fnName, bogusFnName) == 0) {
+ gFnNameError = TRUE;
+ }
+
+ /* Verify that the format can be used. */
+ buf[0] = 0;
+ utrace_vformat(buf, sizeof(buf), 0, fmt, args);
+ if (strlen(buf) == 0) {
+ gFnFormatError = TRUE;
+ }
+
+ /* printf(" %s() %s\n", fnName, buf); */
+}
+
+static UConverter * psuedo_ucnv_open(const char *name, UErrorCode * err)
+{
+ UTRACE_ENTRY_OC(UTRACE_UCNV_LOAD);
+
+ UTRACE_DATA2(UTRACE_OPEN_CLOSE, "error code is %s for %s", u_errorName(*err), name);
+
+ UTRACE_EXIT_PTR_STATUS(NULL, *err);
+ return NULL;
+}
+static void psuedo_ucnv_close(UConverter * cnv)
+{
+ UTRACE_ENTRY_OC(UTRACE_UCNV_UNLOAD);
+ UTRACE_DATA1(UTRACE_OPEN_CLOSE, "unload converter %p", cnv);
+ UTRACE_EXIT_VALUE((int32_t)TRUE);
+}
+
+
+/*
+ * TestTraceAPI
+ */
+static void TestTraceAPI() {
+
+
+ UTraceEntry *originalTEntryFunc;
+ UTraceExit *originalTExitFunc;
+ UTraceData *originalTDataFunc;
+ const void *originalTContext;
+ int32_t originalLevel;
+
+ /*
+ * Save the original tracing state so that we can restore it after the test.
+ */
+ utrace_getFunctions(&originalTContext, &originalTEntryFunc, &originalTExitFunc,
+ &originalTDataFunc);
+ originalLevel = utrace_getLevel();
+
+
+ /* verify that set/get of tracing functions returns what was set. */
+ {
+ UTraceEntry *e;
+ UTraceExit *x;
+ UTraceData *d;
+ const void *context;
+ const void *newContext = (const char *)originalTContext + 1;
+
+ TEST_ASSERT(originalTEntryFunc != testTraceEntry);
+ TEST_ASSERT(originalTExitFunc != testTraceExit);
+ TEST_ASSERT(originalTDataFunc != testTraceData);
+
+ utrace_setFunctions(newContext, testTraceEntry, testTraceExit, testTraceData);
+ utrace_getFunctions(&context, &e, &x, &d);
+ TEST_ASSERT(e == testTraceEntry);
+ TEST_ASSERT(x == testTraceExit);
+ TEST_ASSERT(d == testTraceData);
+ TEST_ASSERT(context == newContext);
+ }
+
+ /* verify that set/get level work as a pair, and that the level
+ * identifiers all exist.
+ */
+
+ {
+ int32_t level;
+
+ utrace_setLevel(UTRACE_OFF);
+ level = utrace_getLevel();
+ TEST_ASSERT(level==UTRACE_OFF);
+ utrace_setLevel(UTRACE_VERBOSE);
+ level = utrace_getLevel();
+ TEST_ASSERT(level==UTRACE_VERBOSE);
+ utrace_setLevel(UTRACE_ERROR);
+ utrace_setLevel(UTRACE_WARNING);
+ utrace_setLevel(UTRACE_OPEN_CLOSE);
+ utrace_setLevel(UTRACE_INFO);
+ }
+
+ /*
+ * Open and close a converter with tracing enabled.
+ * Verify that our tracing callback functions get called.
+ */
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *cnv;
+
+ gTraceEntryCount = 0;
+ gTraceExitCount = 0;
+ gTraceDataCount = 0;
+ gFnNameError = FALSE;
+ gFnFormatError = FALSE;
+ utrace_setLevel(UTRACE_OPEN_CLOSE);
+#if ENABLE_TRACING_ORIG_VAL
+ cnv = ucnv_open(NULL, &status);
+ TEST_ASSERT(U_SUCCESS(status));
+ ucnv_close(cnv);
+#else
+ cnv = psuedo_ucnv_open(NULL, &status);
+ TEST_ASSERT(U_SUCCESS(status));
+ psuedo_ucnv_close(cnv);
+#endif
+ TEST_ASSERT(gTraceEntryCount > 0);
+ TEST_ASSERT(gTraceExitCount > 0);
+ TEST_ASSERT(gTraceDataCount > 0);
+ TEST_ASSERT(gFnNameError == FALSE);
+ TEST_ASSERT(gFnFormatError == FALSE);
+ }
+
+
+
+ /*
+ * trace data formatter operation.
+ */
+ {
+ UChar s1[] = {0x41fe, 0x42, 0x43, 00};
+ const char *a1[] = {"s1", "s2", "s3"};
+ void *ptr;
+
+ test_format("hello, world", 50, 0, "hello, world", __LINE__);
+ test_format("hello, world", 50, 4, " hello, world", __LINE__);
+ test_format("hello, world", 3, 0, "hello, world", __LINE__);
+
+ test_format("a character %c", 50, 0, "a character x", __LINE__, 'x');
+ test_format("a string %s ", 50, 0, "a string hello ", __LINE__, "hello");
+ test_format("uchars %S ", 50, 0, "uchars 41fe 0042 0043 0000 ", __LINE__, s1, -1);
+ test_format("uchars %S ", 50, 0, "uchars 41fe 0042 ", __LINE__, s1, 2);
+
+ test_format("a byte %b--", 50, 0, "a byte dd--", __LINE__, 0xdd);
+ test_format("a 16 bit val %h", 50, 0, "a 16 bit val 1234", __LINE__, 0x1234);
+ test_format("a 32 bit val %d...", 50, 0, "a 32 bit val 6789abcd...", __LINE__, 0x6789abcd);
+ test_format("a 64 bit val %l", 50, 0, "a 64 bit val 123456780abcdef0"
+ , __LINE__, INT64_C(0x123456780abcdef0));
+
+ if (sizeof(void *) == 4) {
+ ptr = (void *)0xdeadbeef;
+ test_format("a 32 bit ptr %p", 50, 0, "a 32 bit ptr deadbeef", __LINE__, ptr);
+ } else if (sizeof(void *) == 8) {
+ ptr = (void *) INT64_C(0x1000200030004000);
+ test_format("a 64 bit ptr %p", 50, 0, "a 64 bit ptr 1000200030004000", __LINE__, ptr);
+ } else if (sizeof(void *) == 16) {
+ /* iSeries */
+ union {
+ int32_t arr[4];
+ void *ptr;
+ } massiveBigEndianPtr = {{ 0x10002000, 0x30004000, 0x50006000, 0x70008000 }};
+ ptr = massiveBigEndianPtr.ptr;
+ test_format("a 128 bit ptr %p", 50, 0, "a 128 bit ptr 10002000300040005000600070008000", __LINE__, ptr);
+ } else {
+ TEST_ASSERT(FALSE);
+ /* TODO: others? */
+ }
+
+ test_format("%vc", 100, 0, "abc[ffffffff]", __LINE__, "abc", -1);
+ test_format("%vs", 100, 0, "s1\ns2\n[00000002]", __LINE__, a1, 2);
+ test_format("%vs", 100, 4, " s1\n s2\n [00000002]", __LINE__, a1, 2);
+
+ test_format("%vb", 100, 0, "41 42 43 [00000003]", __LINE__, "\x41\x42\x43", 3);
+
+ /* Null ptrs for strings, vectors */
+ test_format("Null string - %s", 50, 0, "Null string - *NULL*", __LINE__, NULL);
+ test_format("Null string - %S", 50, 0, "Null string - *NULL*", __LINE__, NULL);
+ test_format("Null vector - %vc", 50, 0, "Null vector - *NULL* [00000002]", __LINE__, NULL, 2);
+ test_format("Null vector - %vC", 50, 0, "Null vector - *NULL* [00000002]", __LINE__, NULL, 2);
+ test_format("Null vector - %vd", 50, 0, "Null vector - *NULL* [00000002]", __LINE__, NULL, 2);
+
+ }
+
+ /*
+ * utrace_format. Only need a minimal test to see that the function works at all.
+ * Full functionality is tested via utrace_vformat.
+ */
+ {
+ char buf[100];
+ int32_t x;
+ x = utrace_format(buf, 100, 0, "%s", "Hello, World.");
+ TEST_ASSERT(strcmp(buf, "Hello, World.") == 0);
+ TEST_ASSERT(x == 14);
+ }
+
+ /*
+ * utrace_functionName. Just spot-check a couple of them.
+ */
+ {
+ const char *name;
+ name = utrace_functionName(UTRACE_U_INIT);
+ TEST_ASSERT(strcmp(name, "u_init") == 0);
+ name = utrace_functionName(UTRACE_UCNV_OPEN);
+ TEST_ASSERT(strcmp(name, "ucnv_open") == 0);
+ name = utrace_functionName(UTRACE_UCOL_GET_SORTKEY);
+ TEST_ASSERT(strcmp(name, "ucol_getSortKey") == 0);
+ }
+
+
+
+ /* Restore the trace function settings to their original values. */
+ utrace_setFunctions(originalTContext, originalTEntryFunc, originalTExitFunc, originalTDataFunc);
+ utrace_setLevel(originalLevel);
+}
+
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/trietest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/trietest.c
new file mode 100644
index 00000000000..c4a7c1733fc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/trietest.c
@@ -0,0 +1,877 @@
+/*
+******************************************************************************
+*
+* Copyright (C) 2001-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+******************************************************************************
+* file name: trietest.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2001nov20
+* created by: Markus W. Scherer
+*/
+
+#include <stdio.h>
+#include "unicode/utypes.h"
+#include "utrie.h"
+#include "cstring.h"
+#include "cmemory.h"
+
+#if 1
+#include "cintltst.h"
+#else
+/* definitions from standalone utrie development */
+#define log_err printf
+#define log_verbose printf
+
+#undef u_errorName
+#define u_errorName(errorCode) "some error code"
+#endif
+
+#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
+
+/* Values for setting possibly overlapping, out-of-order ranges of values */
+typedef struct SetRange {
+ UChar32 start, limit;
+ uint32_t value;
+ UBool overwrite;
+} SetRange;
+
+/*
+ * Values for testing:
+ * value is set from the previous boundary's limit to before
+ * this boundary's limit
+ */
+typedef struct CheckRange {
+ UChar32 limit;
+ uint32_t value;
+} CheckRange;
+
+
+static uint32_t U_CALLCONV
+_testFoldedValue32(UNewTrie *trie, UChar32 start, int32_t offset) {
+ uint32_t foldedValue, value;
+ UChar32 limit;
+ UBool inBlockZero;
+
+ foldedValue=0;
+
+ limit=start+0x400;
+ while(start<limit) {
+ value=utrie_get32(trie, start, &inBlockZero);
+ if(inBlockZero) {
+ start+=UTRIE_DATA_BLOCK_LENGTH;
+ } else {
+ foldedValue|=value;
+ ++start;
+ }
+ }
+
+ if(foldedValue!=0) {
+ return ((uint32_t)offset<<16)|foldedValue;
+ } else {
+ return 0;
+ }
+}
+
+static int32_t U_CALLCONV
+_testFoldingOffset32(uint32_t data) {
+ return (int32_t)(data>>16);
+}
+
+static uint32_t U_CALLCONV
+_testFoldedValue16(UNewTrie *trie, UChar32 start, int32_t offset) {
+ uint32_t foldedValue, value;
+ UChar32 limit;
+ UBool inBlockZero;
+
+ foldedValue=0;
+
+ limit=start+0x400;
+ while(start<limit) {
+ value=utrie_get32(trie, start, &inBlockZero);
+ if(inBlockZero) {
+ start+=UTRIE_DATA_BLOCK_LENGTH;
+ } else {
+ foldedValue|=value;
+ ++start;
+ }
+ }
+
+ if(foldedValue!=0) {
+ return (uint32_t)(offset|0x8000);
+ } else {
+ return 0;
+ }
+}
+
+static int32_t U_CALLCONV
+_testFoldingOffset16(uint32_t data) {
+ if(data&0x8000) {
+ return (int32_t)(data&0x7fff);
+ } else {
+ return 0;
+ }
+}
+
+static uint32_t U_CALLCONV
+_testEnumValue(const void *context, uint32_t value) {
+ return value^0x5555;
+}
+
+static UBool U_CALLCONV
+_testEnumRange(const void *context, UChar32 start, UChar32 limit, uint32_t value) {
+ const CheckRange **pb=(const CheckRange **)context;
+ const CheckRange *b=(*pb)++;
+
+ value^=0x5555;
+ if(start!=(b-1)->limit || limit!=b->limit || value!=b->value) {
+ log_err("error: utrie_enum() delivers wrong range [U+%04lx..U+%04lx[.0x%lx instead of [U+%04lx..U+%04lx[.0x%lx\n",
+ start, limit, value,
+ (b-1)->limit, b->limit, b->value);
+ }
+ return TRUE;
+}
+
+static void
+testTrieIteration(const char *testName,
+ const UTrie *trie,
+ const CheckRange checkRanges[], int32_t countCheckRanges) {
+ UChar s[100];
+ uint32_t values[30];
+
+ const UChar *p, *limit;
+
+ uint32_t value;
+ UChar32 c;
+ int32_t i, length, countValues;
+ UChar c2;
+
+ /* write a string */
+ length=countValues=0;
+ for(i=0; i<countCheckRanges; ++i) {
+ c=checkRanges[i].limit;
+ if(c!=0) {
+ --c;
+ UTF_APPEND_CHAR_UNSAFE(s, length, c);
+ values[countValues++]=checkRanges[i].value;
+ }
+ }
+ limit=s+length;
+
+ /* try forward */
+ p=s;
+ i=0;
+ while(p<limit) {
+ c=c2=0x33;
+ if(trie->data32!=NULL) {
+ UTRIE_NEXT32(trie, p, limit, c, c2, value);
+ } else {
+ UTRIE_NEXT16(trie, p, limit, c, c2, value);
+ }
+ if(value!=values[i]) {
+ log_err("error: wrong value from UTRIE_NEXT(%s)(U+%04lx, U+%04lx): 0x%lx instead of 0x%lx\n",
+ testName, c, c2, value, values[i]);
+ }
+ if(
+ c2==0 ?
+ c!=*(p-1) :
+ !UTF_IS_LEAD(c) || !UTF_IS_TRAIL(c2) || c!=*(p-2) || c2!=*(p-1)
+ ) {
+ log_err("error: wrong (c, c2) from UTRIE_NEXT(%s): (U+%04lx, U+%04lx)\n",
+ testName, c, c2);
+ continue;
+ }
+ if(c2!=0) {
+ int32_t offset;
+
+ if(trie->data32==NULL) {
+ value=UTRIE_GET16_FROM_LEAD(trie, c);
+ offset=trie->getFoldingOffset(value);
+ if(offset>0) {
+ value=UTRIE_GET16_FROM_OFFSET_TRAIL(trie, offset, c2);
+ } else {
+ value=trie->initialValue;
+ }
+ } else {
+ value=UTRIE_GET32_FROM_LEAD(trie, c);
+ offset=trie->getFoldingOffset(value);
+ if(offset>0) {
+ value=UTRIE_GET32_FROM_OFFSET_TRAIL(trie, offset, c2);
+ } else {
+ value=trie->initialValue;
+ }
+ }
+ if(value!=values[i]) {
+ log_err("error: wrong value from UTRIE_GETXX_FROM_OFFSET_TRAIL(%s)(U+%04lx, U+%04lx): 0x%lx instead of 0x%lx\n",
+ testName, c, c2, value, values[i]);
+ }
+ }
+ if(c2!=0) {
+ value=0x44;
+ if(trie->data32==NULL) {
+ UTRIE_GET16_FROM_PAIR(trie, c, c2, value);
+ } else {
+ UTRIE_GET32_FROM_PAIR(trie, c, c2, value);
+ }
+ if(value!=values[i]) {
+ log_err("error: wrong value from UTRIE_GETXX_FROM_PAIR(%s)(U+%04lx, U+%04lx): 0x%lx instead of 0x%lx\n",
+ testName, c, c2, value, values[i]);
+ }
+ }
+ ++i;
+ }
+
+ /* try backward */
+ p=limit;
+ i=countValues;
+ while(s<p) {
+ --i;
+ c=c2=0x33;
+ if(trie->data32!=NULL) {
+ UTRIE_PREVIOUS32(trie, s, p, c, c2, value);
+ } else {
+ UTRIE_PREVIOUS16(trie, s, p, c, c2, value);
+ }
+ if(value!=values[i]) {
+ log_err("error: wrong value from UTRIE_PREVIOUS(%s)(U+%04lx, U+%04lx): 0x%lx instead of 0x%lx\n",
+ testName, c, c2, value, values[i]);
+ }
+ if(
+ c2==0 ?
+ c!=*p:
+ !UTF_IS_LEAD(c) || !UTF_IS_TRAIL(c2) || c!=*p || c2!=*(p+1)
+ ) {
+ log_err("error: wrong (c, c2) from UTRIE_PREVIOUS(%s): (U+%04lx, U+%04lx)\n",
+ testName, c, c2);
+ }
+ }
+}
+
+static void
+testTrieRangesWithMalloc(const char *testName,
+ const SetRange setRanges[], int32_t countSetRanges,
+ const CheckRange checkRanges[], int32_t countCheckRanges,
+ UBool dataIs32, UBool latin1Linear) {
+ UTrieGetFoldingOffset *getFoldingOffset;
+ const CheckRange *enumRanges;
+ UNewTrie *newTrie;
+ UTrie trie={ 0 };
+ uint32_t value, value2;
+ UChar32 start, limit;
+ int32_t i, length;
+ UErrorCode errorCode;
+ UBool overwrite, ok;
+ uint8_t* storage =NULL;
+ static const int32_t DEFAULT_STORAGE_SIZE = 32768;
+ storage = (uint8_t*) uprv_malloc(sizeof(uint8_t)*DEFAULT_STORAGE_SIZE);
+
+ log_verbose("\ntesting Trie '%s'\n", testName);
+ newTrie=utrie_open(NULL, NULL, 2000,
+ checkRanges[0].value, checkRanges[0].value,
+ latin1Linear);
+
+ /* set values from setRanges[] */
+ ok=TRUE;
+ for(i=0; i<countSetRanges; ++i) {
+ start=setRanges[i].start;
+ limit=setRanges[i].limit;
+ value=setRanges[i].value;
+ overwrite=setRanges[i].overwrite;
+ if((limit-start)==1 && overwrite) {
+ ok&=utrie_set32(newTrie, start, value);
+ } else {
+ ok&=utrie_setRange32(newTrie, start, limit, value, overwrite);
+ }
+ }
+ if(!ok) {
+ log_err("error: setting values into a trie failed (%s)\n", testName);
+ return;
+ }
+
+ /* verify that all these values are in the new Trie */
+ start=0;
+ for(i=0; i<countCheckRanges; ++i) {
+ limit=checkRanges[i].limit;
+ value=checkRanges[i].value;
+
+ while(start<limit) {
+ if(value!=utrie_get32(newTrie, start, NULL)) {
+ log_err("error: newTrie(%s)[U+%04lx]==0x%lx instead of 0x%lx\n",
+ testName, start, utrie_get32(newTrie, start, NULL), value);
+ }
+ ++start;
+ }
+ }
+
+ if(dataIs32) {
+ getFoldingOffset=_testFoldingOffset32;
+ } else {
+ getFoldingOffset=_testFoldingOffset16;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=utrie_serialize(newTrie, storage, DEFAULT_STORAGE_SIZE,
+ dataIs32 ? _testFoldedValue32 : _testFoldedValue16,
+ (UBool)!dataIs32,
+ &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: utrie_serialize(%s) failed: %s\n", testName, u_errorName(errorCode));
+ utrie_close(newTrie);
+ return;
+ }
+
+ /* test linear Latin-1 range from utrie_getData() */
+ if(latin1Linear) {
+ uint32_t *data;
+ int32_t dataLength;
+
+ data=utrie_getData(newTrie, &dataLength);
+ start=0;
+ for(i=0; i<countCheckRanges && start<=0xff; ++i) {
+ limit=checkRanges[i].limit;
+ value=checkRanges[i].value;
+
+ while(start<limit && start<=0xff) {
+ if(value!=data[UTRIE_DATA_BLOCK_LENGTH+start]) {
+ log_err("error: newTrie(%s).latin1Data[U+%04lx]==0x%lx instead of 0x%lx\n",
+ testName, start, data[UTRIE_DATA_BLOCK_LENGTH+start], value);
+ }
+ ++start;
+ }
+ }
+ }
+
+ utrie_close(newTrie);
+
+ errorCode=U_ZERO_ERROR;
+ if(!utrie_unserialize(&trie, storage, length, &errorCode)) {
+ log_err("error: utrie_unserialize() failed, %s\n", u_errorName(errorCode));
+ return;
+ }
+ trie.getFoldingOffset=getFoldingOffset;
+
+ if(dataIs32!=(trie.data32!=NULL)) {
+ log_err("error: trie serialization (%s) did not preserve 32-bitness\n", testName);
+ }
+ if(latin1Linear!=trie.isLatin1Linear) {
+ log_err("error: trie serialization (%s) did not preserve Latin-1-linearity\n", testName);
+ }
+
+ /* verify that all these values are in the unserialized Trie */
+ start=0;
+ for(i=0; i<countCheckRanges; ++i) {
+ limit=checkRanges[i].limit;
+ value=checkRanges[i].value;
+
+ if(start==0xd800) {
+ /* skip surrogates */
+ start=limit;
+ continue;
+ }
+
+ while(start<limit) {
+ if(start<=0xffff) {
+ if(dataIs32) {
+ value2=UTRIE_GET32_FROM_BMP(&trie, start);
+ } else {
+ value2=UTRIE_GET16_FROM_BMP(&trie, start);
+ }
+ if(value!=value2) {
+ log_err("error: unserialized trie(%s).fromBMP(U+%04lx)==0x%lx instead of 0x%lx\n",
+ testName, start, value2, value);
+ }
+ if(!UTF_IS_LEAD(start)) {
+ if(dataIs32) {
+ value2=UTRIE_GET32_FROM_LEAD(&trie, start);
+ } else {
+ value2=UTRIE_GET16_FROM_LEAD(&trie, start);
+ }
+ if(value!=value2) {
+ log_err("error: unserialized trie(%s).fromLead(U+%04lx)==0x%lx instead of 0x%lx\n",
+ testName, start, value2, value);
+ }
+ }
+ }
+ if(dataIs32) {
+ UTRIE_GET32(&trie, start, value2);
+ } else {
+ UTRIE_GET16(&trie, start, value2);
+ }
+ if(value!=value2) {
+ log_err("error: unserialized trie(%s).get(U+%04lx)==0x%lx instead of 0x%lx\n",
+ testName, start, value2, value);
+ }
+ ++start;
+ }
+ }
+
+ /* enumerate and verify all ranges */
+ enumRanges=checkRanges+1;
+ utrie_enum(&trie, _testEnumValue, _testEnumRange, &enumRanges);
+
+ /* test linear Latin-1 range */
+ if(trie.isLatin1Linear) {
+ if(trie.data32!=NULL) {
+ const uint32_t *latin1=UTRIE_GET32_LATIN1(&trie);
+
+ for(start=0; start<0x100; ++start) {
+ if(latin1[start]!=UTRIE_GET32_FROM_LEAD(&trie, start)) {
+ log_err("error: (%s) trie.latin1[U+%04lx]=0x%lx!=0x%lx=trie.get32(U+%04lx)\n",
+ testName, start, latin1[start], UTRIE_GET32_FROM_LEAD(&trie, start), start);
+ }
+ }
+ } else {
+ const uint16_t *latin1=UTRIE_GET16_LATIN1(&trie);
+
+ for(start=0; start<0x100; ++start) {
+ if(latin1[start]!=UTRIE_GET16_FROM_LEAD(&trie, start)) {
+ log_err("error: (%s) trie.latin1[U+%04lx]=0x%lx!=0x%lx=trie.get16(U+%04lx)\n",
+ testName, start, latin1[start], UTRIE_GET16_FROM_LEAD(&trie, start), start);
+ }
+ }
+ }
+ }
+
+ testTrieIteration(testName, &trie, checkRanges, countCheckRanges);
+ uprv_free(storage);
+}
+
+static void
+testTrieRanges(const char *testName,
+ const SetRange setRanges[], int32_t countSetRanges,
+ const CheckRange checkRanges[], int32_t countCheckRanges,
+ UBool dataIs32, UBool latin1Linear) {
+ union{
+ double bogus; /* needed for aligining the storage */
+ uint8_t storage[32768];
+ } storageHolder;
+ UTrieGetFoldingOffset *getFoldingOffset;
+ UNewTrieGetFoldedValue *getFoldedValue;
+ const CheckRange *enumRanges;
+ UNewTrie *newTrie;
+ UTrie trie={ 0 };
+ uint32_t value, value2;
+ UChar32 start, limit;
+ int32_t i, length;
+ UErrorCode errorCode;
+ UBool overwrite, ok;
+
+ log_verbose("\ntesting Trie '%s'\n", testName);
+ newTrie=utrie_open(NULL, NULL, 2000,
+ checkRanges[0].value, checkRanges[0].value,
+ latin1Linear);
+
+ /* set values from setRanges[] */
+ ok=TRUE;
+ for(i=0; i<countSetRanges; ++i) {
+ start=setRanges[i].start;
+ limit=setRanges[i].limit;
+ value=setRanges[i].value;
+ overwrite=setRanges[i].overwrite;
+ if((limit-start)==1 && overwrite) {
+ ok&=utrie_set32(newTrie, start, value);
+ } else {
+ ok&=utrie_setRange32(newTrie, start, limit, value, overwrite);
+ }
+ }
+ if(!ok) {
+ log_err("error: setting values into a trie failed (%s)\n", testName);
+ return;
+ }
+
+ /* verify that all these values are in the new Trie */
+ start=0;
+ for(i=0; i<countCheckRanges; ++i) {
+ limit=checkRanges[i].limit;
+ value=checkRanges[i].value;
+
+ while(start<limit) {
+ if(value!=utrie_get32(newTrie, start, NULL)) {
+ log_err("error: newTrie(%s)[U+%04lx]==0x%lx instead of 0x%lx\n",
+ testName, start, utrie_get32(newTrie, start, NULL), value);
+ }
+ ++start;
+ }
+ }
+
+ if(dataIs32) {
+ getFoldingOffset=_testFoldingOffset32;
+ getFoldedValue=_testFoldedValue32;
+ } else {
+ getFoldingOffset=_testFoldingOffset16;
+ getFoldedValue=_testFoldedValue16;
+ }
+
+ /*
+ * code coverage for utrie.c/defaultGetFoldedValue(),
+ * pick some combination of parameters for selecting the UTrie defaults
+ */
+ if(!dataIs32 && latin1Linear) {
+ getFoldingOffset=NULL;
+ getFoldedValue=NULL;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=utrie_serialize(newTrie, storageHolder.storage, sizeof(storageHolder.storage),
+ getFoldedValue,
+ (UBool)!dataIs32,
+ &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("error: utrie_serialize(%s) failed: %s\n", testName, u_errorName(errorCode));
+ utrie_close(newTrie);
+ return;
+ }
+ if (length >= (int32_t)sizeof(storageHolder.storage)) {
+ log_err("error: utrie_serialize(%s) needs more memory\n", testName);
+ utrie_close(newTrie);
+ return;
+ }
+
+ /* test linear Latin-1 range from utrie_getData() */
+ if(latin1Linear) {
+ uint32_t *data;
+ int32_t dataLength;
+
+ data=utrie_getData(newTrie, &dataLength);
+ start=0;
+ for(i=0; i<countCheckRanges && start<=0xff; ++i) {
+ limit=checkRanges[i].limit;
+ value=checkRanges[i].value;
+
+ while(start<limit && start<=0xff) {
+ if(value!=data[UTRIE_DATA_BLOCK_LENGTH+start]) {
+ log_err("error: newTrie(%s).latin1Data[U+%04lx]==0x%lx instead of 0x%lx\n",
+ testName, start, data[UTRIE_DATA_BLOCK_LENGTH+start], value);
+ }
+ ++start;
+ }
+ }
+ }
+
+ utrie_close(newTrie);
+
+ errorCode=U_ZERO_ERROR;
+ if(!utrie_unserialize(&trie, storageHolder.storage, length, &errorCode)) {
+ log_err("error: utrie_unserialize() failed, %s\n", u_errorName(errorCode));
+ return;
+ }
+ if(getFoldingOffset!=NULL) {
+ trie.getFoldingOffset=getFoldingOffset;
+ }
+
+ if(dataIs32!=(trie.data32!=NULL)) {
+ log_err("error: trie serialization (%s) did not preserve 32-bitness\n", testName);
+ }
+ if(latin1Linear!=trie.isLatin1Linear) {
+ log_err("error: trie serialization (%s) did not preserve Latin-1-linearity\n", testName);
+ }
+
+ /* verify that all these values are in the unserialized Trie */
+ start=0;
+ for(i=0; i<countCheckRanges; ++i) {
+ limit=checkRanges[i].limit;
+ value=checkRanges[i].value;
+
+ if(start==0xd800) {
+ /* skip surrogates */
+ start=limit;
+ continue;
+ }
+
+ while(start<limit) {
+ if(start<=0xffff) {
+ if(dataIs32) {
+ value2=UTRIE_GET32_FROM_BMP(&trie, start);
+ } else {
+ value2=UTRIE_GET16_FROM_BMP(&trie, start);
+ }
+ if(value!=value2) {
+ log_err("error: unserialized trie(%s).fromBMP(U+%04lx)==0x%lx instead of 0x%lx\n",
+ testName, start, value2, value);
+ }
+ if(!UTF_IS_LEAD(start)) {
+ if(dataIs32) {
+ value2=UTRIE_GET32_FROM_LEAD(&trie, start);
+ } else {
+ value2=UTRIE_GET16_FROM_LEAD(&trie, start);
+ }
+ if(value!=value2) {
+ log_err("error: unserialized trie(%s).fromLead(U+%04lx)==0x%lx instead of 0x%lx\n",
+ testName, start, value2, value);
+ }
+ }
+ }
+ if(dataIs32) {
+ UTRIE_GET32(&trie, start, value2);
+ } else {
+ UTRIE_GET16(&trie, start, value2);
+ }
+ if(value!=value2) {
+ log_err("error: unserialized trie(%s).get(U+%04lx)==0x%lx instead of 0x%lx\n",
+ testName, start, value2, value);
+ }
+ ++start;
+ }
+ }
+
+ /* enumerate and verify all ranges */
+ enumRanges=checkRanges+1;
+ utrie_enum(&trie, _testEnumValue, _testEnumRange, &enumRanges);
+
+ /* test linear Latin-1 range */
+ if(trie.isLatin1Linear) {
+ if(trie.data32!=NULL) {
+ const uint32_t *latin1=UTRIE_GET32_LATIN1(&trie);
+
+ for(start=0; start<0x100; ++start) {
+ if(latin1[start]!=UTRIE_GET32_FROM_LEAD(&trie, start)) {
+ log_err("error: (%s) trie.latin1[U+%04lx]=0x%lx!=0x%lx=trie.get32(U+%04lx)\n",
+ testName, start, latin1[start], UTRIE_GET32_FROM_LEAD(&trie, start), start);
+ }
+ }
+ } else {
+ const uint16_t *latin1=UTRIE_GET16_LATIN1(&trie);
+
+ for(start=0; start<0x100; ++start) {
+ if(latin1[start]!=UTRIE_GET16_FROM_LEAD(&trie, start)) {
+ log_err("error: (%s) trie.latin1[U+%04lx]=0x%lx!=0x%lx=trie.get16(U+%04lx)\n",
+ testName, start, latin1[start], UTRIE_GET16_FROM_LEAD(&trie, start), start);
+ }
+ }
+ }
+ }
+
+ testTrieIteration(testName, &trie, checkRanges, countCheckRanges);
+}
+
+static void
+testTrieRanges2(const char *testName,
+ const SetRange setRanges[], int32_t countSetRanges,
+ const CheckRange checkRanges[], int32_t countCheckRanges,
+ UBool dataIs32) {
+ char name[40];
+
+ testTrieRanges(testName,
+ setRanges, countSetRanges,
+ checkRanges, countCheckRanges,
+ dataIs32, FALSE);
+ testTrieRangesWithMalloc(testName,
+ setRanges, countSetRanges,
+ checkRanges, countCheckRanges,
+ dataIs32, FALSE);
+
+ uprv_strcpy(name, testName);
+ uprv_strcat(name, "-latin1Linear");
+ testTrieRanges(name,
+ setRanges, countSetRanges,
+ checkRanges, countCheckRanges,
+ dataIs32, TRUE);
+ testTrieRangesWithMalloc(name,
+ setRanges, countSetRanges,
+ checkRanges, countCheckRanges,
+ dataIs32, TRUE);
+}
+
+static void
+testTrieRanges4(const char *testName,
+ const SetRange setRanges[], int32_t countSetRanges,
+ const CheckRange checkRanges[], int32_t countCheckRanges) {
+ char name[40];
+
+ uprv_strcpy(name, testName);
+ uprv_strcat(name, ".32");
+ testTrieRanges2(name,
+ setRanges, countSetRanges,
+ checkRanges, countCheckRanges,
+ TRUE);
+
+ uprv_strcpy(name, testName);
+ uprv_strcat(name, ".16");
+ testTrieRanges2(name,
+ setRanges, countSetRanges,
+ checkRanges, countCheckRanges,
+ FALSE);
+}
+
+/* test data ----------------------------------------------------------------*/
+
+/* set consecutive ranges, even with value 0 */
+static const SetRange
+setRanges1[]={
+ {0, 0x20, 0, FALSE},
+ {0x20, 0xa7, 0x1234, FALSE},
+ {0xa7, 0x3400, 0, FALSE},
+ {0x3400, 0x9fa6, 0x6162, FALSE},
+ {0x9fa6, 0xda9e, 0x3132, FALSE},
+ {0xdada, 0xeeee, 0x87ff, FALSE}, /* try to disrupt _testFoldingOffset16() */
+ {0xeeee, 0x11111, 1, FALSE},
+ {0x11111, 0x44444, 0x6162, FALSE},
+ {0x44444, 0x60003, 0, FALSE},
+ {0xf0003, 0xf0004, 0xf, FALSE},
+ {0xf0004, 0xf0006, 0x10, FALSE},
+ {0xf0006, 0xf0007, 0x11, FALSE},
+ {0xf0007, 0xf0020, 0x12, FALSE},
+ {0xf0020, 0x110000, 0, FALSE}
+};
+
+static const CheckRange
+checkRanges1[]={
+ {0, 0}, /* dummy start range to make _testEnumRange() simpler */
+ {0x20, 0},
+ {0xa7, 0x1234},
+ {0x3400, 0},
+ {0x9fa6, 0x6162},
+ {0xda9e, 0x3132},
+ {0xdada, 0},
+ {0xeeee, 0x87ff},
+ {0x11111,1},
+ {0x44444,0x6162},
+ {0xf0003,0},
+ {0xf0004,0xf},
+ {0xf0006,0x10},
+ {0xf0007,0x11},
+ {0xf0020,0x12},
+ {0x110000, 0}
+};
+
+/* set some interesting overlapping ranges */
+static const SetRange
+setRanges2[]={
+ {0x21, 0x7f, 0x5555, TRUE},
+ {0x2f800,0x2fedc, 0x7a, TRUE},
+ {0x72, 0xdd, 3, TRUE},
+ {0xdd, 0xde, 4, FALSE},
+ {0x2f987,0x2fa98, 5, TRUE},
+ {0x2f777,0x2f833, 0, TRUE},
+ {0x2f900,0x2ffee, 1, FALSE},
+ {0x2ffee,0x2ffef, 2, TRUE}
+};
+
+static const CheckRange
+checkRanges2[]={
+ {0, 0}, /* dummy start range to make _testEnumRange() simpler */
+ {0x21, 0},
+ {0x72, 0x5555},
+ {0xdd, 3},
+ {0xde, 4},
+ {0x2f833,0},
+ {0x2f987,0x7a},
+ {0x2fa98,5},
+ {0x2fedc,0x7a},
+ {0x2ffee,1},
+ {0x2ffef,2},
+ {0x110000, 0}
+};
+
+/* use a non-zero initial value */
+static const SetRange
+setRanges3[]={
+ {0x31, 0xa4, 1, FALSE},
+ {0x3400, 0x6789, 2, FALSE},
+ {0x30000,0x34567,9, TRUE},
+ {0x45678,0x56789,3, TRUE}
+};
+
+static const CheckRange
+checkRanges3[]={
+ {0, 9}, /* dummy start range, also carries the initial value */
+ {0x31, 9},
+ {0xa4, 1},
+ {0x3400, 9},
+ {0x6789, 2},
+ {0x45678,9},
+ {0x56789,3},
+ {0x110000,9}
+};
+
+static void
+TrieTest(void) {
+ testTrieRanges4("set1",
+ setRanges1, ARRAY_LENGTH(setRanges1),
+ checkRanges1, ARRAY_LENGTH(checkRanges1));
+ testTrieRanges4("set2-overlap",
+ setRanges2, ARRAY_LENGTH(setRanges2),
+ checkRanges2, ARRAY_LENGTH(checkRanges2));
+ testTrieRanges4("set3-initial-9",
+ setRanges3, ARRAY_LENGTH(setRanges3),
+ checkRanges3, ARRAY_LENGTH(checkRanges3));
+}
+
+/* test utrie_unserializeDummy() -------------------------------------------- */
+
+static int32_t U_CALLCONV
+dummyGetFoldingOffset(uint32_t data) {
+ return -1; /* never get non-initialValue data for supplementary code points */
+}
+
+static void
+dummyTest(UBool make16BitTrie) {
+ int32_t mem[UTRIE_DUMMY_SIZE/4];
+
+ UTrie trie;
+ UErrorCode errorCode;
+ UChar32 c;
+
+ uint32_t value, initialValue, leadUnitValue;
+
+ if(make16BitTrie) {
+ initialValue=0x313;
+ leadUnitValue=0xaffe;
+ } else {
+ initialValue=0x01234567;
+ leadUnitValue=0x89abcdef;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ utrie_unserializeDummy(&trie, mem, sizeof(mem), initialValue, leadUnitValue, make16BitTrie, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("utrie_unserializeDummy(make16BitTrie=%d) failed - %s\n", make16BitTrie, u_errorName(errorCode));
+ return;
+ }
+ trie.getFoldingOffset=dummyGetFoldingOffset;
+
+ /* test that all code points have initialValue */
+ for(c=0; c<=0x10ffff; ++c) {
+ if(make16BitTrie) {
+ UTRIE_GET16(&trie, c, value);
+ } else {
+ UTRIE_GET32(&trie, c, value);
+ }
+ if(value!=initialValue) {
+ log_err("UTRIE_GET%s(dummy, U+%04lx)=0x%lx instead of 0x%lx\n",
+ make16BitTrie ? "16" : "32", (long)c, (long)value, (long)initialValue);
+ }
+ }
+
+ /* test that the lead surrogate code units have leadUnitValue */
+ for(c=0xd800; c<=0xdbff; ++c) {
+ if(make16BitTrie) {
+ value=UTRIE_GET16_FROM_LEAD(&trie, c);
+ } else {
+ value=UTRIE_GET32_FROM_LEAD(&trie, c);
+ }
+ if(value!=leadUnitValue) {
+ log_err("UTRIE_GET%s_FROM_LEAD(dummy, U+%04lx)=0x%lx instead of 0x%lx\n",
+ make16BitTrie ? "16" : "32", (long)c, (long)value, (long)leadUnitValue);
+ }
+ }
+}
+
+static void
+DummyTrieTest(void) {
+ dummyTest(TRUE);
+ dummyTest(FALSE);
+}
+
+void
+addTrieTest(TestNode** root);
+
+void
+addTrieTest(TestNode** root) {
+ addTest(root, &TrieTest, "tsutil/trietest/TrieTest");
+ addTest(root, &DummyTrieTest, "tsutil/trietest/DummyTrieTest");
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/ucsdetst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/ucsdetst.c
new file mode 100644
index 00000000000..9bc18d329ea
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/ucsdetst.c
@@ -0,0 +1,355 @@
+/*
+ ****************************************************************************
+ * Copyright (c) 2005-2006, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ ****************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#include "unicode/ucsdet.h"
+#include "unicode/ucnv.h"
+#include "unicode/ustring.h"
+
+#include "cintltst.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+
+#define NEW_ARRAY(type,count) (type *) malloc((count) * sizeof(type))
+#define DELETE_ARRAY(array) free(array)
+
+static void TestConstruction(void);
+static void TestUTF8(void);
+static void TestUTF16(void);
+static void TestC1Bytes(void);
+static void TestInputFilter(void);
+static void TestChaining(void);
+
+void addUCsdetTest(TestNode** root);
+
+void addUCsdetTest(TestNode** root)
+{
+ addTest(root, &TestConstruction, "ucsdetst/TestConstruction");
+ addTest(root, &TestUTF8, "ucsdetst/TestUTF8");
+ addTest(root, &TestUTF16, "ucsdetst/TestUTF16");
+ addTest(root, &TestC1Bytes, "ucsdetst/TestC1Bytes");
+ addTest(root, &TestInputFilter, "ucsdetst/TestInputFilter");
+ addTest(root, &TestChaining, "ucsdetst/TestErrorChaining");
+}
+
+static int32_t preflight(const UChar *src, int32_t length, UConverter *cnv)
+{
+ UErrorCode status;
+ char buffer[1024];
+ char *dest, *destLimit = buffer + sizeof(buffer);
+ const UChar *srcLimit = src + length;
+ int32_t result = 0;
+
+ do {
+ dest = buffer;
+ status = U_ZERO_ERROR;
+ ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &status);
+ result += (int32_t) (dest - buffer);
+ } while (status == U_BUFFER_OVERFLOW_ERROR);
+
+ return result;
+}
+
+static char *extractBytes(const UChar *src, int32_t length, const char *codepage, int32_t *byteLength)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *cnv = ucnv_open(codepage, &status);
+ int32_t byteCount = preflight(src, length, cnv);
+ const UChar *srcLimit = src + length;
+ char *bytes = NEW_ARRAY(char, byteCount + 1);
+ char *dest = bytes, *destLimit = bytes + byteCount + 1;
+
+ ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &status);
+ ucnv_close(cnv);
+
+ *byteLength = byteCount;
+ return bytes;
+}
+
+static void freeBytes(char *bytes)
+{
+ DELETE_ARRAY(bytes);
+}
+
+static void TestConstruction(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCharsetDetector *csd = ucsdet_open(&status);
+ UEnumeration *e = ucsdet_getAllDetectableCharsets(csd, &status);
+ const char *name;
+ int32_t count = uenum_count(e, &status);
+ int32_t i, length;
+
+ for(i = 0; i < count; i += 1) {
+ name = uenum_next(e, &length, &status);
+
+ if(name == NULL || length <= 0) {
+ log_err("ucsdet_getAllDetectableCharsets() returned a null or empty name!\n");
+ }
+ }
+ /* one past the list of all names must return NULL */
+ name = uenum_next(e, &length, &status);
+ if(name != NULL || length != 0 || U_FAILURE(status)) {
+ log_err("ucsdet_getAllDetectableCharsets(past the list) returned a non-null name!\n");
+ }
+
+ uenum_close(e);
+ ucsdet_close(csd);
+}
+
+static void TestUTF8(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ static const char ss[] = "This is a string with some non-ascii characters that will "
+ "be converted to UTF-8, then shoved through the detection process. "
+ "\\u0391\\u0392\\u0393\\u0394\\u0395"
+ "Sure would be nice if our source could contain Unicode directly!";
+ int32_t byteLength = 0, sLength = 0, dLength = 0;
+ UChar s[sizeof(ss)];
+ char *bytes;
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ UChar detected[sizeof(ss)];
+
+ sLength = u_unescape(ss, s, sizeof(ss));
+ bytes = extractBytes(s, sLength, "UTF-8", &byteLength);
+
+ ucsdet_setText(csd, bytes, byteLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ log_err("Detection failure for UTF-8: got no matches.\n");
+ goto bail;
+ }
+
+ dLength = ucsdet_getUChars(match, detected, sLength, &status);
+
+ if (u_strCompare(detected, dLength, s, sLength, FALSE) != 0) {
+ log_err("Round-trip test failed!\n");
+ }
+
+ ucsdet_setDeclaredEncoding(csd, "UTF-8", 5, &status); /* for coverage */
+
+bail:
+ freeBytes(bytes);
+ ucsdet_close(csd);
+}
+
+static void TestUTF16(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ /* Notice the BOM on the start of this string */
+ static const UChar chars[] = {
+ 0xFEFF, 0x0623, 0x0648, 0x0631, 0x0648, 0x0628, 0x0627, 0x002C,
+ 0x0020, 0x0628, 0x0631, 0x0645, 0x062c, 0x064a, 0x0627, 0x062a,
+ 0x0020, 0x0627, 0x0644, 0x062d, 0x0627, 0x0633, 0x0648, 0x0628,
+ 0x0020, 0x002b, 0x0020, 0x0627, 0x0646, 0x062a, 0x0631, 0x0646,
+ 0x064a, 0x062a, 0x0000};
+ int32_t beLength = 0, leLength = 0, cLength = ARRAY_SIZE(chars);
+ char *beBytes = extractBytes(chars, cLength, "UTF-16BE", &beLength);
+ char *leBytes = extractBytes(chars, cLength, "UTF-16LE", &leLength);
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ const char *name;
+ int32_t conf;
+
+ ucsdet_setText(csd, beBytes, beLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ log_err("Encoding detection failure for UTF-16BE: got no matches.\n");
+ goto try_le;
+ }
+
+ name = ucsdet_getName(match, &status);
+ conf = ucsdet_getConfidence(match, &status);
+
+ if (strcmp(name, "UTF-16BE") != 0) {
+ log_err("Encoding detection failure for UTF-16BE: got %s\n", name);
+ }
+
+ if (conf != 100) {
+ log_err("Did not get 100%% confidence for UTF-16BE: got %d\n", conf);
+ }
+
+try_le:
+ ucsdet_setText(csd, leBytes, leLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ log_err("Encoding detection failure for UTF-16LE: got no matches.\n");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+ conf = ucsdet_getConfidence(match, &status);
+
+
+ if (strcmp(name, "UTF-16LE") != 0) {
+ log_err("Enconding detection failure for UTF-16LE: got %s\n", name);
+ }
+
+ if (conf != 100) {
+ log_err("Did not get 100%% confidence for UTF-16LE: got %d\n", conf);
+ }
+
+bail:
+ freeBytes(leBytes);
+ freeBytes(beBytes);
+ ucsdet_close(csd);
+}
+
+static void TestC1Bytes(void)
+{
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ UErrorCode status = U_ZERO_ERROR;
+ static const char ssISO[] = "This is a small sample of some English text. Just enough to be sure that it detects correctly.";
+ static const char ssWindows[] = "This is another small sample of some English text. Just enough to be sure that it detects correctly. It also includes some \\u201CC1\\u201D bytes.";
+ int32_t sISOLength = 0, sWindowsLength = 0;
+ UChar sISO[sizeof(ssISO)];
+ UChar sWindows[sizeof(ssWindows)];
+ int32_t lISO = 0, lWindows = 0;
+ char *bISO;
+ char *bWindows;
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ const char *name;
+
+ sISOLength = u_unescape(ssISO, sISO, sizeof(ssISO));
+ sWindowsLength = u_unescape(ssWindows, sWindows, sizeof(ssWindows));
+ bISO = extractBytes(sISO, sISOLength, "ISO-8859-1", &lISO);
+ bWindows = extractBytes(sWindows, sWindowsLength, "windows-1252", &lWindows);
+
+ ucsdet_setText(csd, bWindows, lWindows, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ log_err("English test with C1 bytes got no matches.\n");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (strcmp(name, "windows-1252") != 0) {
+ log_err("English text with C1 bytes does not detect as windows-1252, but as %s\n", name);
+ }
+
+ ucsdet_setText(csd, bISO, lISO, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ log_err("English text without C1 bytes got no matches.\n");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (strcmp(name, "ISO-8859-1") != 0) {
+ log_err("English text without C1 bytes does not detect as ISO-8859-1, but as %s\n", name);
+ }
+
+bail:
+ freeBytes(bWindows);
+ freeBytes(bISO);
+
+ ucsdet_close(csd);
+#endif
+}
+
+static void TestInputFilter(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ static const char ss[] = "<a> <lot> <of> <English> <inside> <the> <markup> Un tr\\u00E8s petit peu de Fran\\u00E7ais. <to> <confuse> <the> <detector>";
+ int32_t sLength = 0;
+ UChar s[sizeof(ss)];
+ int32_t byteLength = 0;
+ char *bytes;
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ const char *lang, *name;
+
+ sLength = u_unescape(ss, s, sizeof(ss));
+ bytes = extractBytes(s, sLength, "ISO-8859-1", &byteLength);
+
+ ucsdet_enableInputFilter(csd, TRUE);
+
+ if (!ucsdet_isInputFilterEnabled(csd)) {
+ log_err("ucsdet_enableInputFilter(csd, TRUE) did not enable input filter!\n");
+ }
+
+
+ ucsdet_setText(csd, bytes, byteLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ log_err("Turning on the input filter resulted in no matches.\n");
+ goto turn_off;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (name == NULL || strcmp(name, "ISO-8859-1") != 0) {
+ log_err("Turning on the input filter resulted in %s rather than ISO-8859-1\n", name);
+ } else {
+ lang = ucsdet_getLanguage(match, &status);
+
+ if (lang == NULL || strcmp(lang, "fr") != 0) {
+ log_err("Input filter did not strip markup!\n");
+ }
+ }
+
+turn_off:
+ ucsdet_enableInputFilter(csd, FALSE);
+ ucsdet_setText(csd, bytes, byteLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ log_err("Turning off the input filter resulted in no matches.\n");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (name == NULL || strcmp(name, "ISO-8859-1") != 0) {
+ log_err("Turning off the input filter resulted in %s rather than ISO-8859-1\n", name);
+ } else {
+ lang = ucsdet_getLanguage(match, &status);
+
+ if (lang == NULL || strcmp(lang, "en") != 0) {
+ log_err("Unfiltered input did not detect as English!\n");
+ }
+ }
+
+bail:
+ freeBytes(bytes);
+ ucsdet_close(csd);
+}
+
+static void TestChaining(void) {
+ UErrorCode status = U_USELESS_COLLATOR_ERROR;
+
+ ucsdet_open(&status);
+ ucsdet_setText(NULL, NULL, 0, &status);
+ ucsdet_getName(NULL, &status);
+ ucsdet_getConfidence(NULL, &status);
+ ucsdet_getLanguage(NULL, &status);
+ ucsdet_detect(NULL, &status);
+ ucsdet_setDeclaredEncoding(NULL, NULL, 0, &status);
+ ucsdet_detectAll(NULL, NULL, &status);
+ ucsdet_getUChars(NULL, NULL, 0, &status);
+ ucsdet_getUChars(NULL, NULL, 0, &status);
+ ucsdet_close(NULL);
+
+ /* All of this code should have done nothing. */
+ if (status != U_USELESS_COLLATOR_ERROR) {
+ log_err("Status got changed to %s\n", u_errorName(status));
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/udatatst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/udatatst.c
new file mode 100644
index 00000000000..73b8f089ca3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/udatatst.c
@@ -0,0 +1,1761 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1998-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File test.c
+*
+* Modification History:
+*
+* Date Name Description
+* 02/22/2000 Madhu Creation
+******************************************************************************
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/putil.h"
+#include "unicode/udata.h"
+#include "unicode/uchar.h"
+#include "unicode/ucnv.h"
+#include "unicode/ures.h"
+#include "unicode/ustring.h"
+#include "unicode/uclean.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "filestrm.h"
+#include "udatamem.h"
+#include "cintltst.h"
+#include "ubrkimpl.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef U_WINDOWS
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+/* includes for TestSwapData() */
+#include "udataswp.h"
+
+/* swapping implementations in common */
+#include "uresdata.h"
+#include "ucnv_io.h"
+#include "uprops.h"
+#include "ucase.h"
+#include "ucol_swp.h"
+#include "ucnv_bld.h"
+#include "unormimp.h"
+#include "sprpimpl.h"
+#include "propname.h"
+#include "rbbidata.h"
+
+/* other definitions and prototypes */
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+static void TestUDataOpen(void);
+static void TestUDataOpenChoiceDemo1(void);
+static void TestUDataOpenChoiceDemo2(void);
+static void TestUDataGetInfo(void);
+static void TestUDataGetMemory(void);
+static void TestUDataSetAppData(void);
+static void TestErrorConditions(void);
+static void TestAppData(void);
+static void TestICUDataName(void);
+static void TestSwapData(void);
+static void PointerTableOfContents(void);
+static void SetBadCommonData(void);
+static void TestUDataFileAccess(void);
+
+
+void addUDataTest(TestNode** root);
+
+void
+addUDataTest(TestNode** root)
+{
+ addTest(root, &TestUDataOpen, "udatatst/TestUDataOpen" );
+ addTest(root, &TestUDataOpenChoiceDemo1, "udatatst/TestUDataOpenChoiceDemo1");
+ addTest(root, &TestUDataOpenChoiceDemo2, "udatatst/TestUDataOpenChoiceDemo2");
+ addTest(root, &TestUDataGetInfo, "udatatst/TestUDataGetInfo" );
+ addTest(root, &TestUDataGetMemory, "udatatst/TestUDataGetMemory" );
+ addTest(root, &TestUDataSetAppData, "udatatst/TestUDataSetAppData" );
+ addTest(root, &TestErrorConditions, "udatatst/TestErrorConditions");
+ addTest(root, &TestAppData, "udatatst/TestAppData" );
+ addTest(root, &TestICUDataName, "udatatst/TestICUDataName" );
+ addTest(root, &TestSwapData, "udatatst/TestSwapData" );
+ addTest(root, &PointerTableOfContents, "udatatst/PointerTableOfContents" );
+ addTest(root, &SetBadCommonData, "udatatst/SetBadCommonData" );
+ addTest(root, &TestUDataFileAccess, "udatatst/TestUDataFileAccess" );
+}
+
+#if 0
+static void lots_of_mallocs()
+{
+ int q;
+ for(q=1;q<100;q++)
+ {
+ free(malloc(q));
+ malloc(q*2);
+ }
+
+}
+#endif
+
+static void TestUDataOpen(){
+ UDataMemory *result;
+ UErrorCode status=U_ZERO_ERROR;
+ const char* memMap[][2]={
+ {"root", "res"},
+ {"pnames", "icu"},
+ {"cnvalias", "icu"},
+ {"unames", "icu"},
+ {"ibm-37_P100-1995", "cnv"}
+ };
+ const char* name = "test";
+ const char* type = "icu";
+ const char dirSepString[] = {U_FILE_SEP_CHAR, 0};
+ const char pathSepString[] = {U_PATH_SEP_CHAR, 0};
+
+
+ char* path=(char*)malloc(sizeof(char) * (strlen(ctest_dataOutDir())
+ + strlen(U_ICUDATA_NAME)
+ + strlen("/build")+1 ) );
+
+ char *icuDataFilePath = 0;
+ struct stat stat_buf;
+
+ const char* testPath=loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ /* lots_of_mallocs(); */
+
+ strcat(strcpy(path, ctest_dataOutDir()), U_ICUDATA_NAME);
+
+ log_verbose("Testing udata_open()\n");
+ result=udata_open(testPath, type, name, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_open() failed for path = %s, name=%s, type=%s, \n errorcode=%s\n", testPath, name, type, myErrorName(status));
+ } else {
+ log_verbose("PASS: udata_open worked\n");
+ udata_close(result);
+ }
+
+ /* If the ICU system common data file is present in this confiugration,
+ * verify that udata_open can explicitly fetch items from it.
+ * If packaging mode == dll, the file may not exist. So, if the file is
+ * missing, skip this test without error.
+ */
+ icuDataFilePath = (char *)malloc(strlen(path) + 10);
+ strcpy(icuDataFilePath, path);
+ strcat(icuDataFilePath, ".dat");
+ /* lots_of_mallocs(); */
+ if (stat(icuDataFilePath, &stat_buf) == 0)
+ {
+ int i;
+ log_verbose("Testing udata_open() on %s\n", icuDataFilePath);
+ for(i=0; i<sizeof(memMap)/sizeof(memMap[0]); i++){
+ /* lots_of_mallocs(); */
+ status=U_ZERO_ERROR;
+ result=udata_open(path, memMap[i][1], memMap[i][0], &status);
+ if(U_FAILURE(status)) {
+ log_data_err("FAIL: udata_open() failed for path = %s, name=%s, type=%s, \n errorcode=%s\n", path, memMap[i][0], memMap[i][1], myErrorName(status));
+ } else {
+ log_verbose("PASS: udata_open worked for path = %s, name=%s, type=%s\n", path, memMap[i][0], memMap[i][1]);
+ udata_close(result);
+ }
+ }
+ }
+ else
+ {
+ /* lots_of_mallocs(); */
+ log_verbose("Skipping tests of udata_open() on %s. File not present in this configuration.\n",
+ icuDataFilePath);
+ }
+ free(icuDataFilePath);
+ icuDataFilePath = NULL;
+ /* lots_of_mallocs(); */
+
+ /* If the ICU individual files used to build the ICU system common data are
+ * present in this configuration,
+ * verify that udata_open can explicitly open them.
+ * These data files are present in the ICU data/build directory after a build
+ * completes. Tests are most commonly run with the data directory pointing
+ * back into this directory structure, but this is not required. Soooo, if
+ * the files are missing, skip this test without error.
+ */
+ /* lots_of_mallocs(); */
+ icuDataFilePath = (char *)malloc(strlen(ctest_dataOutDir()) + 50);
+ strcpy(icuDataFilePath, ctest_dataOutDir());
+ strcat(icuDataFilePath, "build");
+ strcat(icuDataFilePath, dirSepString);
+ strcat(icuDataFilePath, U_ICUDATA_NAME);
+ strcat(icuDataFilePath, "_");
+ strcat(icuDataFilePath, "cnvalias.icu");
+
+ /* lots_of_mallocs(); */
+ if (stat(icuDataFilePath, &stat_buf) == 0)
+ {
+ int i;
+ log_verbose("%s exists, so..\n", icuDataFilePath);
+ strcpy(icuDataFilePath, ctest_dataOutDir());
+ strcat(icuDataFilePath, "build");
+ strcat(icuDataFilePath, dirSepString);
+ strcat(icuDataFilePath, U_ICUDATA_NAME);
+ log_verbose("Testing udata_open() on %s\n", icuDataFilePath);
+ for(i=0; i<sizeof(memMap)/sizeof(memMap[0]); i++){
+ status=U_ZERO_ERROR;
+ result=udata_open(icuDataFilePath, memMap[i][1], memMap[i][0], &status);
+ if(U_FAILURE(status)) {
+ log_data_err("FAIL: udata_open() failed for path = %s, name=%s, type=%s, \n errorcode=%s\n", icuDataFilePath, memMap[i][0], memMap[i][1], myErrorName(status));
+ } else {
+ log_verbose("PASS: udata_open worked for path = %s, name=%s, type=%s\n", icuDataFilePath, memMap[i][0], memMap[i][1]);
+ udata_close(result);
+ }
+ }
+ }
+ else
+ {
+ log_verbose("Skipping tests of udata_open() on %s. File not present in this configuration.\n",
+ icuDataFilePath);
+ }
+
+ free(icuDataFilePath);
+ icuDataFilePath = NULL;
+
+ /*
+ * Test fallback file names for open of separate data files.
+ * With these params to udata_open:
+ * path = wherever/testdata
+ * type = typ
+ * name = nam
+ * these files will be tried first:
+ * wherever/testudata_nam.typ
+ * testudata_nam.typ
+ * A test data file named testudata_nam.typ exists for the purpose of testing this.
+ */
+ log_verbose("Testing udata_open, with base_name.type style fallback to individual file.\n");
+
+ status = U_ZERO_ERROR;
+ result = udata_open( testPath, "typ", "nam", &status);
+ if (status != U_ZERO_ERROR) {
+ log_err("FAIL: udata_open( \"%s\", \"typ\", \"nam\") returned status %s\n", testPath, u_errorName(status));
+ }
+ udata_close(result);
+ free(icuDataFilePath);
+
+
+ /* This type of path is deprecated */
+ /*
+ * Another fallback test. Paths ending with a trailing directory separator
+ * take a slightly different code path, with the "base name" from the path
+ * being empty in the internal udata_open logic.
+ */
+
+/* log_verbose("Testing udata_open, with path containing a trailing directory separator.\n"); */
+/* icuDataFilePath = (char *)malloc(strlen(u_getDataDirectory()) + 50); */
+/* strcpy(icuDataFilePath, testPath); */
+/* status = U_ZERO_ERROR; */
+/* result = udata_open( icuDataFilePath, "cnv", "test1", &status); */
+/* if (status != U_ZERO_ERROR) { */
+/* log_err("FAIL: udata_open( \"%s\", \"cnv\", \"test1\") returned status %s\n", icuDataFilePath, u_errorName(status)); */
+/* } */
+/* udata_close(result); */
+/* free(icuDataFilePath); */
+
+
+ log_verbose("Testing udata_open() with a non existing binary file\n");
+ result=udata_open("testdata", "tst", "nonexist", &status);
+ if(status==U_FILE_ACCESS_ERROR){
+ log_verbose("Opening udata_open with non-existing file handled correctly.\n");
+ status=U_ZERO_ERROR;
+ } else {
+ log_err("calling udata_open with non-existing file [testdata | nonexist.tst] not handled correctly\n. Expected: U_FILE_ACCESS_ERROR, Got: %s\n", myErrorName(status));
+ if(U_SUCCESS(status)) {
+ udata_close(result);
+ }
+ }
+
+ if(result != NULL){
+ log_err("calling udata_open with non-existing file didn't return a null value\n");
+ } else {
+ log_verbose("calling udat_open with non-existing file returned null as expected\n");
+ }
+
+ /*
+ * Try opening data with absurdly long path and name, to trigger buffer size
+ * overflow handling code.
+ */
+ {
+ char longTestPath[1024]; /* Implementation goes to heap at length of 128. */
+ char longName[1024];
+
+ /* Try a very long nonexistent directory path.
+ * udata_open should still succeed. Opening with the path will fail,
+ * then fall back to skipping the directory portion of the path.
+ */
+ log_verbose("Testing udata_open() with really long names\n");
+ longTestPath[0] = 0;
+ strcat(longTestPath, "bogus_directory_name");
+ while (strlen(longTestPath) < 500) {
+ strcat(longTestPath, dirSepString);
+ strcat(longTestPath, "bogus_directory_name");
+ }
+ strcat(longTestPath, pathSepString);
+ strcat(longTestPath, testPath);
+ result=udata_open(longTestPath, type, name, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_open() failed for path = %s\n name=%s, type=%s, \n errorcode=%s\n",
+ longTestPath, name, type, myErrorName(status));
+ } else {
+ log_verbose("PASS: udata_open worked\n");
+ udata_close(result);
+ }
+
+ /* Try a very long name. Won't open, but shouldn't blow up.
+ */
+ longName[0] = 0;
+ while (strlen(longName) < 500) {
+ strcat(longName, name);
+ strcat(longName, "_");
+ }
+ strcat(longName, dirSepString);
+ strcat(longName, name);
+
+ result=udata_open(longTestPath, type, longName, &status);
+ if (status != U_FILE_ACCESS_ERROR) {
+ log_err("FAIL: udata_open() failed for path = %s\n name=%s, type=%s, \n errorcode=%s\n",
+ longTestPath, longName, type, myErrorName(status));
+ }
+ udata_close(result);
+ }
+
+ free(path);
+}
+
+typedef struct {
+ uint16_t headerSize;
+ uint8_t magic1, magic2;
+ UDataInfo info;
+ char padding[8];
+ uint32_t count, reserved;
+ /*
+ const struct {
+ const char *const name;
+ const void *const data;
+ } toc[1];
+ */
+ int32_t fakeNameAndData[4];
+} ICU_COMMON_Data_Header;
+
+static const ICU_COMMON_Data_Header gEmptyHeader = {
+ 32, /* headerSize */
+ 0xda, /* magic1, (see struct MappedData in udata.c) */
+ 0x27, /* magic2 */
+ { /*UDataInfo */
+ sizeof(UDataInfo), /* size */
+ 0, /* reserved */
+
+#if U_IS_BIG_ENDIAN
+ 1,
+#else
+ 0,
+#endif
+
+ U_CHARSET_FAMILY,
+ sizeof(UChar),
+ 0, /* reserved */
+ { /* data format identifier */
+ 0x43, 0x6d, 0x6e, 0x44}, /* "CmnD" */
+ {1, 0, 0, 0}, /* format version major, minor, milli, micro */
+ {0, 0, 0, 0} /* dataVersion */
+ },
+ {0,0,0,0,0,0,0,0}, /* Padding[8] */
+ 0, /* count */
+ 0, /* Reserved */
+ { /* TOC structure */
+/* { */
+ 0 , 0 , 0, 0 /* name and data entries. Count says there are none, */
+ /* but put one in just in case. */
+/* } */
+ }
+};
+
+
+static void TestUDataSetAppData(){
+/* UDataMemory *dataItem;*/
+
+ UErrorCode status=U_ZERO_ERROR;
+
+ /*
+ * First we try some monkey business and try to do bad things.
+ */
+
+ status=U_ZERO_ERROR;
+ udata_setAppData("appData1", NULL, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("FAIL: TestUDataSetAppData(): udata_setAppData(\"appData1\", NULL, status) should have failed."
+ " It returned status of %s\n", u_errorName(status));
+ return;
+ }
+ /* The following call should fail.
+ If the following works with a bad UErrorCode, then later calls to appData1 should fail. */
+ udata_setAppData("appData1", &gEmptyHeader, &status);
+
+ /*
+ * Got testdata.dat into memory, now we try setAppData using the memory image.
+ */
+
+ status=U_ZERO_ERROR;
+ udata_setAppData("appData1", &gEmptyHeader, &status);
+ if (status != U_ZERO_ERROR) {
+ log_err("FAIL: TestUDataSetAppData(): udata_setAppData(\"appData1\", fileBuf, status) "
+ " returned status of %s\n", u_errorName(status));
+ return;
+ }
+
+ udata_setAppData("appData2", &gEmptyHeader, &status);
+ if (status != U_ZERO_ERROR) {
+ log_err("FAIL: TestUDataSetAppData(): udata_setAppData(\"appData2\", fileBuf, status) "
+ " returned status of %s\n", u_errorName(status));
+ return;
+ }
+
+ /* If we try to setAppData with the same name a second time, we should get a
+ * a using default warning.
+ */
+ udata_setAppData("appData2", &gEmptyHeader, &status);
+ if (status != U_USING_DEFAULT_WARNING) {
+ log_err("FAIL: TestUDataSetAppData(): udata_setAppData(\"appData2\", fileBuf, status) "
+ " returned status of %s, expected U_USING_DEFAULT_WARNING.\n", u_errorName(status));
+ }
+
+
+ /** It is no longer correct to use udata_setAppData to change the
+ package of a contained item.
+
+ dataItem = udata_open("appData1", "res", "te_IN", &status); **/
+}
+
+static char *safeGetICUDataDirectory() {
+ const char *dataDir = u_getDataDirectory(); /* Returned string vanashes with u_cleanup */
+ char *retStr = NULL;
+ if (dataDir != NULL) {
+ retStr = (char *)malloc(strlen(dataDir)+1);
+ strcpy(retStr, dataDir);
+ }
+ return retStr;
+}
+
+static void TestUDataFileAccess(){
+ UErrorCode status;
+ char *icuDataDir;
+ icuDataDir = safeGetICUDataDirectory(); /* save icu data dir, so we can put it back
+ * after doing u_cleanup(). */
+
+ /** UDATA_NO_FILES, ICU does not access the file system for data loading. */
+ status=U_ZERO_ERROR;
+ u_cleanup();
+ udata_setFileAccess(UDATA_NO_FILES,&status);
+ u_init(&status);
+ if(U_FAILURE(status) && *icuDataDir == 0){
+ log_data_err("udata_setFileAccess(UDATA_NO_FILES) failed with ICU_DATA=\"\" err=%s\n", u_errorName(status));
+ }
+
+ /** UDATA_ONLY_PACKAGES, ICU only loads data from packages, not from single files. */
+ status=U_ZERO_ERROR;
+ u_cleanup();
+ udata_setFileAccess(UDATA_ONLY_PACKAGES,&status);
+ u_init(&status);
+
+ /** UDATA_PACKAGES_FIRST, ICU loads data from packages first, and only from single files
+ if the data cannot be found in a package. */
+ status=U_ZERO_ERROR;
+ u_cleanup();
+ udata_setFileAccess(UDATA_PACKAGES_FIRST,&status);
+ u_init(&status);
+
+ /** UDATA_FILES_FIRST, ICU looks for data in single files first, then in packages. (default) */
+ status=U_ZERO_ERROR;
+ u_cleanup();
+ udata_setFileAccess(UDATA_FILES_FIRST,&status);
+ u_init(&status);
+
+ /** An alias for the default access mode. */
+ status=U_ZERO_ERROR;
+ u_cleanup();
+ udata_setFileAccess(UDATA_DEFAULT_ACCESS,&status);
+ u_setDataDirectory(icuDataDir);
+ u_init(&status);
+ if(U_FAILURE(status)){
+ log_err("%s\n", u_errorName(status));
+ }
+ free(icuDataDir);
+}
+
+
+static UBool U_CALLCONV
+isAcceptable1(void *context,
+ const char *type, const char *name,
+ const UDataInfo *pInfo) {
+
+ if( pInfo->size>=20 &&
+ pInfo->isBigEndian==U_IS_BIG_ENDIAN &&
+ pInfo->charsetFamily==U_CHARSET_FAMILY &&
+ pInfo->dataFormat[0]==0x43 && /* dataFormat="CvAl" */
+ pInfo->dataFormat[1]==0x76 &&
+ pInfo->dataFormat[2]==0x41 &&
+ pInfo->dataFormat[3]==0x6c &&
+ pInfo->formatVersion[0]==3 )
+ {
+ log_verbose("The data from \"%s.%s\" IS acceptable using the verifing function isAcceptable1()\n", name, type);
+ return TRUE;
+ } else {
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable1():-\n"
+ "\tsize = %d\n"
+ "\tisBigEndian = %d\n"
+ "\tcharsetFamily = %d\n"
+ "\tformatVersion[0] = %d\n"
+ "\tdataVersion[0] = %d\n"
+ "\tdataFormat = %c%c%c%c\n",
+ name, type, pInfo->size, pInfo->isBigEndian, pInfo->charsetFamily, pInfo->formatVersion[0],
+ pInfo->dataVersion[0], pInfo->dataFormat[0], pInfo->dataFormat[1], pInfo->dataFormat[2],
+ pInfo->dataFormat[3]);
+ log_verbose("Call another verifing function to accept the data\n");
+ return FALSE;
+ }
+}
+
+static UBool U_CALLCONV
+isAcceptable2(void *context,
+ const char *type, const char *name,
+ const UDataInfo *pInfo){
+ UVersionInfo unicodeVersion;
+
+ u_getUnicodeVersion(unicodeVersion);
+
+ if( pInfo->size>=20 &&
+ pInfo->isBigEndian==U_IS_BIG_ENDIAN &&
+ pInfo->charsetFamily==U_CHARSET_FAMILY &&
+ pInfo->dataFormat[0]==0x75 && /* dataFormat="unam" */
+ pInfo->dataFormat[1]==0x6e &&
+ pInfo->dataFormat[2]==0x61 &&
+ pInfo->dataFormat[3]==0x6d &&
+ pInfo->formatVersion[0]==1 &&
+ pInfo->dataVersion[0]==unicodeVersion[0] )
+ {
+ log_verbose("The data from \"%s.%s\" IS acceptable using the verifing function isAcceptable2()\n", name, type);
+ return TRUE;
+ } else {
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable2()\n", name, type);
+
+ return FALSE;
+ }
+
+
+}
+static UBool U_CALLCONV
+isAcceptable3(void *context,
+ const char *type, const char *name,
+ const UDataInfo *pInfo){
+
+ if( pInfo->size>=20 &&
+ pInfo->isBigEndian==U_IS_BIG_ENDIAN &&
+ pInfo->charsetFamily==U_CHARSET_FAMILY &&
+ pInfo->dataFormat[0]==0x54 && /* dataFormat="test" */
+ pInfo->dataFormat[1]==0x65 &&
+ pInfo->dataFormat[2]==0x73 &&
+ pInfo->dataFormat[3]==0x74 &&
+ pInfo->formatVersion[0]==1 &&
+ pInfo->dataVersion[0]==1 ) {
+ log_verbose("The data from \"%s.%s\" IS acceptable using the verifing function isAcceptable3()\n", name, type);
+
+ return TRUE;
+ } else {
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable3()\n", name, type);
+ return FALSE;
+ }
+
+
+}
+
+static void TestUDataOpenChoiceDemo1() {
+ UDataMemory *result;
+ UErrorCode status=U_ZERO_ERROR;
+
+ const char* name[]={
+ "cnvalias",
+ "unames",
+ "test",
+ "nam"
+ };
+ const char* type="icu";
+ const char* testPath="testdata";
+ const char* fullTestDataPath = loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ result=udata_openChoice(NULL, "icu", name[0], isAcceptable1, NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_openChoice() failed name=%s, type=%s, \n errorcode=%s\n", name[0], type, myErrorName(status));
+ } else {
+ log_verbose("PASS: udata_openChoice worked\n");
+ udata_close(result);
+ }
+
+ status=U_ZERO_ERROR;
+ result=udata_openChoice(NULL, type, name[1], isAcceptable1, NULL, &status);
+ if(U_FAILURE(status)){
+ status=U_ZERO_ERROR;
+ result=udata_openChoice(NULL, type, name[1], isAcceptable2, NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_openChoice() failed name=%s, type=%s, \n errorcode=%s\n", name[1], type, myErrorName(status));
+ }
+ }
+ else {
+ log_err("FAIL: udata_openChoice() unexpectedly passed. name=%s, type=%s, \n errorcode=%s\n", name[1], type, myErrorName(status));
+ }
+
+ if(U_SUCCESS(status)){
+ udata_close(result);
+ }
+
+ status=U_ZERO_ERROR;
+ result=udata_openChoice(testPath, type, name[2], isAcceptable1, NULL, &status);
+ if(U_FAILURE(status)){
+ status=U_ZERO_ERROR;
+ result=udata_openChoice(testPath, type, name[2], isAcceptable3, NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_openChoice() failed path=%s name=%s, type=%s, \n errorcode=%s\n", testPath, name[2], type, myErrorName(status));
+ }
+ }
+ else {
+ log_err("FAIL: udata_openChoice() unexpectedly passed. name=%s, type=%s, \n errorcode=%s\n", name[2], type, myErrorName(status));
+ }
+
+ if(U_SUCCESS(status)){
+ udata_close(result);
+ }
+
+ status=U_ZERO_ERROR;
+ type="typ";
+ result=udata_openChoice(fullTestDataPath, type, name[3], isAcceptable1, NULL, &status);
+ if(status != U_INVALID_FORMAT_ERROR){
+ log_err("FAIL: udata_openChoice() did not fail as expected. name=%s, type=%s, \n errorcode=%s\n", name[3], type, myErrorName(status));
+ }
+
+ status=U_USELESS_COLLATOR_ERROR;
+ result=udata_openChoice(fullTestDataPath, type, name[3], isAcceptable1, NULL, &status);
+ if(status != U_USELESS_COLLATOR_ERROR){
+ log_err("FAIL: udata_openChoice() did not fail as expected. name=%s, type=%s, \n errorcode=%s\n", name[3], type, myErrorName(status));
+ }
+}
+
+static UBool U_CALLCONV
+isAcceptable(void *context,
+ const char *type, const char *name,
+ const UDataInfo *pInfo){
+ if( pInfo->size>=20 &&
+ pInfo->isBigEndian==U_IS_BIG_ENDIAN &&
+ pInfo->charsetFamily==U_CHARSET_FAMILY &&
+ pInfo->dataFormat[0]==0x54 && /* dataFormat="test" */
+ pInfo->dataFormat[1]==0x65 &&
+ pInfo->dataFormat[2]==0x73 &&
+ pInfo->dataFormat[3]==0x74 &&
+ pInfo->formatVersion[0]==1 &&
+ pInfo->dataVersion[0]==1 &&
+ *((int*)context) == 2 ) {
+ log_verbose("The data from\"%s.%s\" IS acceptable using the verifing function isAcceptable()\n", name, type);
+
+ return TRUE;
+ } else {
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable()\n", name, type);
+ return FALSE;
+ }
+}
+
+
+/* This test checks to see if the isAcceptable function is being called correctly. */
+
+static void TestUDataOpenChoiceDemo2() {
+ UDataMemory *result;
+ UErrorCode status=U_ZERO_ERROR;
+ int i;
+ int p=2;
+
+ const char* name="test";
+ const char* type="icu";
+ const char* path = loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ result=udata_openChoice(path, type, name, isAcceptable, &p, &status);
+ if(U_FAILURE(status)){
+ log_err("failed to load data at p=%s t=%s n=%s, isAcceptable", path, type, name);
+ }
+ if(U_SUCCESS(status) ) {
+ udata_close(result);
+ }
+
+ p=0;
+ for(i=0;i<2; i++){
+ result=udata_openChoice(path, type, name, isAcceptable, &p, &status);
+ if(p<2) {
+ if(U_FAILURE(status) && status==U_INVALID_FORMAT_ERROR){
+ log_verbose("Loads the data but rejects it as expected %s\n", myErrorName(status));
+ status=U_ZERO_ERROR;
+ p++;
+ }
+ else {
+ log_err("FAIL: failed to either load the data or to reject the loaded data. ERROR=%s\n", myErrorName(status) );
+ }
+ }
+ else if(p == 2) {
+ if(U_FAILURE(status)) {
+ log_err("FAIL: failed to load the data and accept it. ERROR=%s\n", myErrorName(status) );
+ }
+ else {
+ log_verbose("Loads the data and accepts it for p==2 as expected\n");
+ udata_close(result);
+ }
+ }
+ }
+}
+
+
+static void TestUDataGetInfo() {
+
+ UDataMemory *result;
+ /* UDataInfo cf. udata.h */
+ static UDataInfo dataInfo={
+ 30, /*sizeof(UDataInfo),*/
+ 0,
+
+ U_IS_BIG_ENDIAN,
+ U_CHARSET_FAMILY,
+ sizeof(UChar),
+ 0,
+
+ {0x54, 0x65, 0x73, 0x74}, /* dataFormat="Test" */
+ {9, 0, 0, 0}, /* formatVersion */
+ {4, 0, 0, 0} /* dataVersion */
+ };
+ UErrorCode status=U_ZERO_ERROR;
+ const char* name="cnvalias";
+ const char* name2="test";
+ const char* type="icu";
+
+ const char* testPath=loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ log_verbose("Testing udata_getInfo() for cnvalias.icu\n");
+ result=udata_open(NULL, "icu", name, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_open() failed for path = NULL, name=%s, type=%s, \n errorcode=%s\n", name, type, myErrorName(status));
+ return;
+ }
+ udata_getInfo(result, &dataInfo);
+ if(dataInfo.size==20 && dataInfo.size!=30 &&
+ dataInfo.isBigEndian==U_IS_BIG_ENDIAN &&
+ dataInfo.charsetFamily==U_CHARSET_FAMILY &&
+ dataInfo.dataFormat[0]==0x43 && dataInfo.dataFormat[0]!=0x54 && /* dataFormat="CvAl" and not "Test". The values are set for cnvalias.dat*/
+ dataInfo.dataFormat[1]==0x76 && dataInfo.dataFormat[1]!=0x65 &&
+ dataInfo.dataFormat[2]==0x41 && dataInfo.dataFormat[2]!=0x73 &&
+ dataInfo.dataFormat[3]==0x6c && dataInfo.dataFormat[3]!=0x74 &&
+ dataInfo.formatVersion[0]!=9 && /*formatVersion is also set to the one for cnvalias*/
+ dataInfo.dataVersion[0]!=4 && /*dataVersion*/
+ dataInfo.dataVersion[1]!=0 ){
+ log_verbose("PASS: udata_getInfo() filled in the right values\n");
+ } else {
+ log_err("FAIL: udata_getInfo() filled in the wrong values\n");
+ }
+ udata_close(result);
+
+
+ log_verbose("Testing udata_getInfo() for test.icu\n");
+ result=udata_open(testPath, type, name2, &status);
+ if(U_FAILURE(status)) {
+ log_err("FAIL: udata_open() failed for path=%s name2=%s, type=%s, \n errorcode=%s\n", testPath, name2, type, myErrorName(status));
+ return;
+ }
+ udata_getInfo(result, &dataInfo);
+ if(dataInfo.size==20 &&
+ dataInfo.isBigEndian==U_IS_BIG_ENDIAN &&
+ dataInfo.charsetFamily==U_CHARSET_FAMILY &&
+ dataInfo.dataFormat[0]==0x54 && /* dataFormat="Test". The values are set for test.dat*/
+ dataInfo.dataFormat[1]==0x65 &&
+ dataInfo.dataFormat[2]==0x73 &&
+ dataInfo.dataFormat[3]==0x74 &&
+ dataInfo.formatVersion[0]==1 && /*formatVersion is also set to the one for test*/
+ dataInfo.dataVersion[0]==1 && /*dataVersion*/
+ dataInfo.dataVersion[1]==0 )
+ {
+ log_verbose("PASS: udata_getInfo() filled in the right values\n");
+ } else {
+ log_err("FAIL: udata_getInfo() filled in the wrong values\n");
+ }
+ udata_close(result);
+}
+
+static void TestUDataGetMemory() {
+
+ UDataMemory *result;
+ const int32_t *table=NULL;
+ uint16_t* intValue=0;
+ UErrorCode status=U_ZERO_ERROR;
+ const char* name="cnvalias";
+ const char* type;
+
+ const char* name2="test";
+
+ const char* testPath = loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ type="icu";
+ log_verbose("Testing udata_getMemory() for \"cnvalias.icu\"\n");
+ result=udata_openChoice(NULL, type, name, isAcceptable1, NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_openChoice() failed for name=%s, type=%s, \n errorcode=%s\n", name, type, myErrorName(status));
+ return;
+ }
+ table=(const int32_t *)udata_getMemory(result);
+
+ /* The alias table may list more converters than what's actually available now. [grhoten] */
+ if(ucnv_countAvailable() > table[1]) /*???*/
+ log_err("FAIL: udata_getMemory() failed ucnv_countAvailable returned = %d, expected = %d\n", ucnv_countAvailable(), table[1+2*(*table)]);
+
+ udata_close(result);
+
+ type="icu";
+ log_verbose("Testing udata_getMemory for \"test.icu\"()\n");
+ result=udata_openChoice(testPath, type, name2, isAcceptable3, NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: udata_openChoice() failed for path=%s name=%s, type=%s, \n errorcode=%s\n", testPath, name2, type, myErrorName(status));
+ return;
+ }
+ intValue=(uint16_t *)udata_getMemory(result);
+ /*printf("%d ..... %s", *(intValue), intValue+1));*/
+ if( *intValue != 2000 || strcmp((char*)(intValue+1), "YEAR") != 0 )
+ log_err("FAIL: udata_getMemory() failed: intValue :- Expected:2000 Got:%d \n\tstringValue:- Expected:YEAR Got:%s\n", *intValue, (intValue+1));
+
+ udata_close(result);
+
+}
+
+static void TestErrorConditions(){
+
+ UDataMemory *result=NULL;
+ UErrorCode status=U_ZERO_ERROR;
+ uint16_t* intValue=0;
+ static UDataInfo dataInfo={
+ 30, /*sizeof(UDataInfo),*/
+ 0,
+
+ U_IS_BIG_ENDIAN,
+ U_CHARSET_FAMILY,
+ sizeof(UChar),
+ 0,
+
+ {0x54, 0x65, 0x73, 0x74}, /* dataFormat="Test" */
+ {9, 0, 0, 0}, /* formatVersion */
+ {4, 0, 0, 0} /* dataVersion */
+ };
+
+ const char* name = "test";
+ const char* type="icu";
+
+ const char *testPath = loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ /*Try udata_open with status != U_ZERO_ERROR*/
+ log_verbose("Testing udata_open() with status != U_ZERO_ERROR\n");
+ result=udata_open(testPath, type, name, &status);
+ if(result != NULL){
+ log_err("FAIL: udata_open() is supposed to fail for path = %s, name=%s, type=%s, \n errorcode !=U_ZERO_ERROR\n", testPath, name, type);
+ udata_close(result);
+
+ } else {
+ log_verbose("PASS: udata_open with errorCode != U_ZERO_ERROR failed as expected\n");
+ }
+
+ /*Try udata_open with data name=NULL*/
+ log_verbose("Testing udata_open() with data name=NULL\n");
+ status=U_ZERO_ERROR;
+ result=udata_open(testPath, type, NULL, &status);
+ if(U_FAILURE(status)){
+ if(status != U_ILLEGAL_ARGUMENT_ERROR || result != NULL){
+ log_err("FAIL: udata_open() with name=NULL should return NULL and errocode U_ILLEGAL_ARGUMENT_ERROR, GOT: errorcode=%s\n", myErrorName(status));
+ }else{
+ log_verbose("PASS: udata_open with name=NULL failed as expected and errorcode = %s as expected\n", myErrorName(status));
+ }
+ }else{
+ log_err("FAIL: udata_open() with data name=NULL is supposed to fail for path = %s, name=NULL type=%s errorcode=U_ZERO_ERROR \n", testPath, type);
+ udata_close(result);
+ }
+
+
+ /*Try udata_openChoice with status != U_ZERO_ERROR*/
+ log_verbose("Testing udata_openChoice() with status != U_ZERO_ERROR\n");
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ result=udata_openChoice(testPath, type, name, isAcceptable3, NULL, &status);
+ if(result != NULL){
+ log_err("FAIL: udata_openChoice() is supposed to fail for path = %s, name=%s, type=%s, \n errorcode != U_ZERO_ERROR\n", testPath, name, type);
+ udata_close(result);
+ } else {
+ log_verbose("PASS: udata_openChoice() with errorCode != U_ZERO_ERROR failed as expected\n");
+ }
+
+ /*Try udata_open with data name=NULL*/
+ log_verbose("Testing udata_openChoice() with data name=NULL\n");
+ status=U_ZERO_ERROR;
+ result=udata_openChoice(testPath, type, NULL, isAcceptable3, NULL, &status);
+ if(U_FAILURE(status)){
+ if(status != U_ILLEGAL_ARGUMENT_ERROR || result != NULL){
+ log_err("FAIL: udata_openChoice() with name=NULL should return NULL and errocode U_ILLEGAL_ARGUMENT_ERROR, GOT: errorcode=%s\n", myErrorName(status));
+ }else{
+ log_verbose("PASS: udata_openChoice with name=NULL failed as expected and errorcode = %s as expected\n", myErrorName(status));
+ }
+ }else{
+ log_err("FAIL: udata_openChoice() with data name=NULL is supposed to fail for path = %s, name=NULL type=%s errorcode=U_ZERO_ERROR \n", testPath, type);
+ udata_close(result);
+ }
+
+ /*Try udata_getMemory with UDataMemory=NULL*/
+ log_verbose("Testing udata_getMemory with UDataMemory=NULL\n");
+ intValue=(uint16_t*)udata_getMemory(NULL);
+ if(intValue != NULL){
+ log_err("FAIL: udata_getMemory with UDataMemory = NULL is supposed to fail\n");
+ }
+
+ /*Try udata_getInfo with UDataMemory=NULL*/
+ status=U_ZERO_ERROR;
+ udata_getInfo(NULL, &dataInfo);
+ if(dataInfo.size != 0){
+ log_err("FAIL : udata_getInfo with UDataMemory = NULL us supposed to fail\n");
+ }
+
+ /*Try udata_openChoice with a non existing binary file*/
+ log_verbose("Testing udata_openChoice() with a non existing binary file\n");
+ result=udata_openChoice(testPath, "tst", "nonexist", isAcceptable3, NULL, &status);
+ if(status==U_FILE_ACCESS_ERROR){
+ log_verbose("Opening udata_openChoice with non-existing file handled correctly.\n");
+ status=U_ZERO_ERROR;
+ } else {
+ log_err("calling udata_open with non-existing file not handled correctly\n. Expected: U_FILE_ACCESS_ERROR, Got: %s\n", myErrorName(status));
+ if(U_SUCCESS(status)) {
+ udata_close(result);
+ }
+ }
+
+ if(result != NULL){
+ log_err("calling udata_open with non-existing file didn't return a null value\n");
+ } else {
+ log_verbose("calling udat_open with non-existing file returned null as expected\n");
+ }
+}
+
+/* Test whether apps and ICU can each have their own root.res */
+static void TestAppData()
+{
+ UResourceBundle *icu, *app;
+ UResourceBundle *tmp = NULL;
+ UResourceBundle *tmp2 = NULL;
+
+ const UChar *appString;
+ const UChar *icuString;
+
+ int32_t len;
+
+ UErrorCode status = U_ZERO_ERROR;
+ char testMsgBuf[256];
+
+ const char* testPath=loadTestData(&status);
+ if(U_FAILURE(status)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
+ return;
+ }
+
+ icu = ures_open(NULL, "root", &status);
+ if(U_FAILURE(status))
+ {
+ log_err("%s:%d: Couldn't open root ICU bundle- %s", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+ /* log_info("Open icu root: %s size_%d\n", u_errorName(status), ures_getSize(icu)); */
+ status = U_ZERO_ERROR;
+
+ app = ures_open(testPath, "root", &status);
+ if(U_FAILURE(status))
+ {
+ log_err("%s:%d: Couldn't open app ICU bundle [%s]- %s", __FILE__, __LINE__, testPath, u_errorName(status));
+ return;
+ }
+ /* log_info("Open app: %s, size %d\n", u_errorName(status), ures_getSize(app)); */
+
+ tmp = ures_getByKey(icu, "Version", tmp, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("%s:%d: Couldn't get Version string from ICU root bundle- %s", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+
+ icuString = ures_getString(tmp, &len, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("%s:%d: Couldn't get string from Version string from ICU root bundle- %s", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+ /* log_info("icuString=%p - %s\n", icuString, austrdup(icuString)); */
+
+
+ tmp2 = ures_getByKey(app, "Version", tmp2, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("%s:%d: Couldn't get Version string from App root bundle- %s", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+
+ appString = ures_getString(tmp2, &len, &status);
+ if(U_FAILURE(status))
+ {
+ log_err("%s:%d: Couldn't get string from Version string from App root bundle- %s", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+
+ /* log_info("appString=%p - %s\n", appString, austrdup(appString)); */
+
+
+ if(!u_strcmp(icuString, appString))
+ {
+ log_err("%s:%d: Error! Expected ICU and App root version strings to be DIFFERENT but they are both %s and %s\n", __FILE__, __LINE__, austrdup(icuString),
+ austrdup(appString));
+ }
+ else
+ {
+ log_verbose("%s:%d: appstr=%s, icustr=%s\n", __FILE__,
+ __LINE__, u_austrcpy(testMsgBuf, appString), u_austrcpy(testMsgBuf, icuString));
+ }
+
+ ures_close(tmp);
+ ures_close(tmp2);
+ ures_close(icu);
+ ures_close(app);
+}
+
+static void TestICUDataName()
+{
+ UVersionInfo icuVersion;
+ char expectDataName[20];
+ unsigned int expectLen = 8;
+
+ char typeChar = '?';
+
+ /* Print out the version # we have .. */
+ log_verbose("utypes.h says U_ICUDATA_NAME = %s\n", U_ICUDATA_NAME);
+
+ /* Build up the version # we expect to get */
+ u_getVersion(icuVersion);
+
+ switch(U_CHARSET_FAMILY)
+ {
+ case U_ASCII_FAMILY:
+ switch(U_IS_BIG_ENDIAN)
+ {
+ case 1:
+ typeChar = 'b';
+ break;
+ case 0:
+ typeChar = 'l';
+ break;
+ default:
+ log_err("Expected 1 or 0 for U_IS_BIG_ENDIAN, got %d!\n", (int)U_IS_BIG_ENDIAN);
+ /* return; */
+ }
+ break;
+ case U_EBCDIC_FAMILY:
+ typeChar = 'e';
+ break;
+ }
+
+ sprintf(expectDataName, "%s%d%d%c",
+ "icudt",
+ (int)icuVersion[0],
+ (int)icuVersion[1],
+ typeChar);
+
+ log_verbose("Expected: %s\n", expectDataName);
+ if(uprv_strlen(expectDataName) != expectLen)
+ {
+ log_err("*Expected* length is wrong (test err?), should be %d is %d\n",
+ expectLen, uprv_strlen(expectDataName));
+ }
+
+ if(uprv_strlen(U_ICUDATA_NAME) != expectLen)
+ {
+ log_err("U_ICUDATA_NAME length should be %d is %d\n",
+ expectLen, uprv_strlen(U_ICUDATA_NAME));
+ }
+
+ if(uprv_strcmp(U_ICUDATA_NAME, expectDataName))
+ {
+ log_err("U_ICUDATA_NAME should be %s but is %s\n",
+ expectDataName, U_ICUDATA_NAME);
+ }
+
+ /* ICUDATA_NAME comes from the build system on *nix */
+#ifdef ICUDATA_NAME
+ if(uprv_strcmp(U_ICUDATA_NAME, ICUDATA_NAME))
+ {
+ log_err("ICUDATA_NAME and U_ICUDATA_NAME don't match: "
+ "ICUDATA_NAME=%s, U_ICUDATA_NAME=%s. Check configure.in, icudefs.mk.in, utypes.h...\n", ICUDATA_NAME, U_ICUDATA_NAME);
+ }
+ else
+ {
+ log_verbose("ICUDATA_NAME=%s (from icudefs.mk), U_ICUDATA_NAME=%s (from utypes.h)\n", ICUDATA_NAME, U_ICUDATA_NAME);
+ }
+#endif
+
+}
+
+/* test data swapping ------------------------------------------------------- */
+
+#ifdef OS400
+/* See comments in genccode.c on when this special implementation can be removed. */
+static const struct {
+ double bogus;
+ const char *bytes;
+} gOffsetTOCAppDataItem1={ 0.0, /* alignment bytes */
+ "\x00\x14" /* sizeof(UDataInfo) *//* MappedData { */
+ "\xda"
+ "\x27" /* } */
+ "\x00\x14" /* sizeof(UDataInfo) *//* UDataInfo { */
+ "\0\0"
+ "\1" /* U_IS_BIG_ENDIAN */
+ "\1" /* U_CHARSET_FAMILY */
+ "\2" /* U_SIZEOF_WHAR_T */
+ "\0"
+ "\x31\x31\x31\x31"
+ "\0\0\0\0"
+ "\0\0\0\0" /* } */
+};
+#else
+static const struct {
+ double bogus;
+ MappedData bytes1;
+ UDataInfo bytes2;
+ uint8_t bytes3;
+} gOffsetTOCAppDataItem1={
+ 0.0, /* alignment bytes */
+ { sizeof(UDataInfo), 0xda, 0x27 }, /* MappedData */
+
+ {sizeof(UDataInfo),
+ 0,
+
+ U_IS_BIG_ENDIAN,
+ U_CHARSET_FAMILY,
+ sizeof(UChar),
+ 0,
+
+ {0x31, 0x31, 0x31, 0x31}, /* dataFormat="1111" */
+ {0, 0, 0, 0}, /* formatVersion */
+ {0, 0, 0, 0}} /* dataVersion */
+};
+#endif
+
+static const UChar gOffsetTOCGarbage[] = { /* "I have been very naughty!" */
+ 0x49, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6E,
+ 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6E, 0x61, 0x75, 0x67, 0x68, 0x74, 0x79, 0x21
+};
+
+/* Original source: icu/source/tools/genccode */
+static const struct {
+ uint16_t headerSize;
+ uint8_t magic1, magic2;
+ UDataInfo info;
+ char padding[8];
+ uint32_t count, reserved;
+ const struct {
+ const char *const name;
+ const void *const data;
+ } toc[3];
+} gOffsetTOCAppData_dat = {
+ 32, /* headerSize */
+ 0xda, /* magic1, (see struct MappedData in udata.c) */
+ 0x27, /* magic2 */
+ { /*UDataInfo */
+ sizeof(UDataInfo), /* size */
+ 0, /* reserved */
+ U_IS_BIG_ENDIAN,
+ U_CHARSET_FAMILY,
+ sizeof(UChar),
+ 0, /* reserved */
+ { /* data format identifier */
+ 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */
+ {1, 0, 0, 0}, /* format version major, minor, milli, micro */
+ {0, 0, 0, 0} /* dataVersion */
+ },
+ {0,0,0,0,0,0,0,0}, /* Padding[8] */
+ 3, /* count */
+ 0, /* Reserved */
+ { /* TOC structure */
+ { "OffsetTOCAppData/a/b", &gOffsetTOCAppDataItem1 },
+ { "OffsetTOCAppData/gOffsetTOCAppDataItem1", &gOffsetTOCAppDataItem1 },
+ { "OffsetTOCAppData/gOffsetTOCGarbage", &gOffsetTOCGarbage }
+ }
+};
+
+/* Unfortunately, trie dictionaries are in a C++ header */
+int32_t
+triedict_swap(const UDataSwapper *ds,
+ const void *inData, int32_t length, void *outData,
+ UErrorCode *pErrorCode);
+
+/* test cases for maximum data swapping code coverage */
+static const struct {
+ const char *name, *type;
+ UDataSwapFn *swapFn;
+} swapCases[]={
+ /* resource bundles */
+
+ /* resource bundle with many data types */
+ {"*testtypes", "res", ures_swap},
+ /* resource bundle with collation data */
+ {"ja", "res", ures_swap},
+ /* resource bundle with options-only collation data */
+ {"ru", "res", ures_swap},
+ {"el", "res", ures_swap},
+ /* ICU's root */
+ {"root", "res", ures_swap},
+ /* Test a 32-bit key table. This is large. */
+ {"*testtable32", "res", ures_swap},
+
+ /* ICU 2.6 resource bundle - data format 1.0, without indexes[] (little-endian ASCII) */
+ {"*icu26_testtypes", "res", ures_swap},
+ /* same for big-endian EBCDIC */
+ {"*icu26e_testtypes", "res", ures_swap},
+
+#if !UCONFIG_NO_COLLATION
+ /* standalone collation data files */
+ {"ucadata", "icu", ucol_swap},
+ {"invuca", "icu", ucol_swapInverseUCA},
+#endif
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ /* conversion table files */
+
+ /* SBCS conversion table file without extension */
+ {"ibm-913_P100-2000", "cnv", ucnv_swap},
+ /* EBCDIC_STATEFUL conversion table file with extension */
+ {"ibm-1390_P110-2003", "cnv", ucnv_swap},
+ /* DBCS extension-only conversion table file */
+ {"ibm-16684_P110-2003", "cnv", ucnv_swap},
+ /* EUC-TW (3-byte) conversion table file without extension */
+ {"ibm-964_P110-1999", "cnv", ucnv_swap},
+ /* GB 18030 (4-byte) conversion table file without extension */
+ {"gb18030", "cnv", ucnv_swap},
+ /* MBCS conversion table file with extension */
+ {"*test4x", "cnv", ucnv_swap},
+ /*
+ * MBCS conversion table file without extension,
+ * to test swapping and preflighting of UTF-8-friendly mbcsIndex[].
+ */
+ {"jisx-208", "cnv", ucnv_swap},
+#endif
+
+#if !UCONFIG_NO_CONVERSION
+ /* alias table */
+ {"cnvalias", "icu", ucnv_swapAliases},
+#endif
+
+#if !UCONFIG_NO_IDNA
+ {"uidna", "spp", usprep_swap},
+#endif
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ {"char", "brk", ubrk_swap},
+ {"thaidict", "ctd", triedict_swap},
+#endif
+
+ /* the last item should not be #if'ed so that it can reliably omit the last comma */
+
+ /* Unicode properties */
+ {"pnames", "icu", upname_swap},
+#if 0
+ /*
+ * Starting with ICU4C 3.4, the core Unicode properties files
+ * (uprops.icu, ucase.icu, ubidi.icu, unorm.icu)
+ * are hardcoded in the common DLL and therefore not included
+ * in the data package any more.
+ * Their swapping code is moved from the common DLL to the icuswap tool so that
+ * we need not jump through hoops (like adding snapshots of these files
+ * to testdata) for code coverage in tests.
+ * See Jitterbug 4497.
+ */
+#if !UCONFIG_NO_NORMALIZATION
+ {"unorm", "icu", unorm_swap},
+#endif
+ {"uprops", "icu", uprops_swap},
+ {"ucase", "icu", ucase_swap},
+ {"ubidi", "icu", ubidi_swap},
+#endif
+ {"unames", "icu", uchar_swapNames}
+};
+
+/* Large enough for the largest swappable data item. */
+#define SWAP_BUFFER_SIZE 1800000
+
+static void U_CALLCONV
+printError(void *context, const char *fmt, va_list args) {
+ vlog_info("[swap] ", fmt, args);
+ log_err("\n"); /* Register error */
+}
+
+static void
+TestSwapCase(UDataMemory *pData, const char *name,
+ UDataSwapFn *swapFn,
+ uint8_t *buffer, uint8_t *buffer2) {
+ UDataSwapper *ds;
+ const void *inData, *inHeader;
+ int32_t length, dataLength, length2, headerLength;
+
+ UErrorCode errorCode;
+ UErrorCode badStatus;
+
+ UBool inEndian, oppositeEndian;
+ uint8_t inCharset, oppositeCharset;
+
+ /* First we check that swapFn handles failures as expected. */
+ errorCode = U_UNSUPPORTED_ERROR;
+ length = swapFn(NULL, NULL, 0, buffer, &errorCode);
+ if (length != 0 || errorCode != U_UNSUPPORTED_ERROR) {
+ log_err("%s() did not fail as expected - %s\n", name, u_errorName(errorCode));
+ }
+ errorCode = U_ZERO_ERROR;
+ length = swapFn(NULL, NULL, 0, buffer, &errorCode);
+ if (length != 0 || errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("%s() did not fail as expected with bad arguments - %s\n", name, u_errorName(errorCode));
+ }
+
+
+ /* Continue with the rest of the tests. */
+ errorCode = U_ZERO_ERROR;
+ inData=udata_getMemory(pData);
+
+ /*
+ * get the data length if possible, to verify that swapping and preflighting
+ * handles the entire data
+ */
+ dataLength=udata_getLength(pData);
+
+ /*
+ * get the header and its length
+ * all of the swap implementation functions require the header to be included
+ */
+ inHeader=udata_getRawMemory(pData);
+ headerLength=(int32_t)((const char *)inData-(const char *)inHeader);
+
+ /* first swap to opposite endianness but same charset family */
+ errorCode=U_ZERO_ERROR;
+ ds=udata_openSwapperForInputData(inHeader, headerLength,
+ !U_IS_BIG_ENDIAN, U_CHARSET_FAMILY, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udata_openSwapperForInputData(%s->!isBig+same charset) failed - %s\n",
+ name, u_errorName(errorCode));
+ return;
+ }
+
+ inEndian=ds->inIsBigEndian;
+ inCharset=ds->inCharset;
+
+ oppositeEndian=!inEndian;
+ oppositeCharset= inCharset==U_ASCII_FAMILY ? U_EBCDIC_FAMILY : U_ASCII_FAMILY;
+
+ /* make this test work with data files that are built for a different platform */
+ if(inEndian!=U_IS_BIG_ENDIAN || inCharset!=U_CHARSET_FAMILY) {
+ udata_closeSwapper(ds);
+ ds=udata_openSwapper(inEndian, inCharset, oppositeEndian, inCharset, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udata_openSwapper(%s->!isBig+same charset) failed - %s\n",
+ name, u_errorName(errorCode));
+ return;
+ }
+ }
+
+ /*
+ Check error checking of swappable data not specific to this swapper.
+ This should always fail.
+ */
+ badStatus = U_ZERO_ERROR;
+ length=swapFn(ds, &gOffsetTOCAppData_dat, -1, NULL, &badStatus);
+ if(badStatus != U_UNSUPPORTED_ERROR) {
+ log_err("swapFn(%s->!isBig+same charset) unexpectedly succeeded on bad data - %s\n",
+ name, u_errorName(errorCode));
+ udata_closeSwapper(ds);
+ return;
+ }
+
+ /* Now allow errors to be printed */
+ ds->printError=printError;
+
+ /* preflight the length */
+ length=swapFn(ds, inHeader, -1, NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("swapFn(preflight %s->!isBig+same charset) failed - %s\n",
+ name, u_errorName(errorCode));
+ udata_closeSwapper(ds);
+ return;
+ }
+
+ /* compare the preflighted length against the data length */
+ if(dataLength>=0 && (length+15)<(headerLength+dataLength)) {
+ log_err("swapFn(preflight %s->!isBig+same charset) length too small: %d < data length %d\n",
+ name, length, (headerLength+dataLength));
+ udata_closeSwapper(ds);
+ return;
+ }
+
+ /* swap, not in-place */
+ length2=swapFn(ds, inHeader, length, buffer, &errorCode);
+ udata_closeSwapper(ds);
+ if(U_FAILURE(errorCode)) {
+ log_err("swapFn(%s->!isBig+same charset) failed - %s\n",
+ name, u_errorName(errorCode));
+ return;
+ }
+
+ /* compare the swap length against the preflighted length */
+ if(length2!=length) {
+ log_err("swapFn(%s->!isBig+same charset) length differs from preflighting: %d != preflighted %d\n",
+ name, length2, length);
+ return;
+ }
+
+ /* next swap to opposite charset family */
+ ds=udata_openSwapper(oppositeEndian, inCharset,
+ oppositeEndian, oppositeCharset,
+ &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udata_openSwapper(%s->!isBig+other charset) failed - %s\n",
+ name, u_errorName(errorCode));
+ return;
+ }
+ ds->printError=printError;
+
+ /* swap in-place */
+ length2=swapFn(ds, buffer, length, buffer, &errorCode);
+ udata_closeSwapper(ds);
+ if(U_FAILURE(errorCode)) {
+ log_err("swapFn(%s->!isBig+other charset) failed - %s\n",
+ name, u_errorName(errorCode));
+ return;
+ }
+
+ /* compare the swap length against the original length */
+ if(length2!=length) {
+ log_err("swapFn(%s->!isBig+other charset) length differs from original: %d != original %d\n",
+ name, length2, length);
+ return;
+ }
+
+ /* finally swap to original platform values */
+ ds=udata_openSwapper(oppositeEndian, oppositeCharset,
+ inEndian, inCharset,
+ &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udata_openSwapper(%s->back to original) failed - %s\n",
+ name, u_errorName(errorCode));
+ return;
+ }
+ ds->printError=printError;
+
+ /* swap, not in-place */
+ length2=swapFn(ds, buffer, length, buffer2, &errorCode);
+ udata_closeSwapper(ds);
+ if(U_FAILURE(errorCode)) {
+ log_err("swapFn(%s->back to original) failed - %s\n",
+ name, u_errorName(errorCode));
+ return;
+ }
+
+ /* compare the swap length against the original length */
+ if(length2!=length) {
+ log_err("swapFn(%s->back to original) length differs from original: %d != original %d\n",
+ name, length2, length);
+ return;
+ }
+
+ /* compare the final contents with the original */
+ if(0!=uprv_memcmp(inHeader, buffer2, length)) {
+ const uint8_t *original;
+ uint8_t diff[8];
+ int32_t i, j;
+
+ log_err("swapFn(%s->back to original) contents differs from original\n",
+ name);
+
+ /* find the first difference */
+ original=(const uint8_t *)inHeader;
+ for(i=0; i<length && original[i]==buffer2[i]; ++i) {}
+
+ /* find the next byte that is the same */
+ for(j=i+1; j<length && original[j]!=buffer2[j]; ++j) {}
+ log_info(" difference at index %d=0x%x, until index %d=0x%x\n", i, i, j, j);
+
+ /* round down to the last 4-boundary for better result output */
+ i&=~3;
+ log_info("showing bytes from index %d=0x%x (length %d=0x%x):\n", i, i, length, length);
+
+ /* print 8 bytes but limit to the buffer contents */
+ length2=i+sizeof(diff);
+ if(length2>length) {
+ length2=length;
+ }
+
+ /* print the original bytes */
+ uprv_memset(diff, 0, sizeof(diff));
+ for(j=i; j<length2; ++j) {
+ diff[j-i]=original[j];
+ }
+ log_info(" original: %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ diff[0], diff[1], diff[2], diff[3], diff[4], diff[5], diff[6], diff[7]);
+
+ /* print the swapped bytes */
+ uprv_memset(diff, 0, sizeof(diff));
+ for(j=i; j<length2; ++j) {
+ diff[j-i]=buffer2[j];
+ }
+ log_info(" swapped: %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ diff[0], diff[1], diff[2], diff[3], diff[4], diff[5], diff[6], diff[7]);
+ }
+}
+
+static void U_CALLCONV
+printErrorToString(void *context, const char *fmt, va_list args) {
+ vsprintf((char *)context, fmt, args);
+}
+
+static void
+TestSwapData() {
+ char name[100];
+ UDataSwapper *ds;
+ UDataMemory *pData;
+ uint8_t *buffer;
+ const char *pkg, *nm, *testPath;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ int32_t i;
+
+ buffer=(uint8_t *)uprv_malloc(2*SWAP_BUFFER_SIZE);
+ if(buffer==NULL) {
+ log_err("unable to allocate %d bytes\n", 2*SWAP_BUFFER_SIZE);
+ return;
+ }
+
+ testPath=loadTestData(&errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("Could not load testdata.dat, status = %s\n", u_errorName(errorCode));
+ }
+
+ /* Test that printError works as expected. */
+ errorCode=U_USELESS_COLLATOR_ERROR;
+ ds=udata_openSwapper(U_IS_BIG_ENDIAN, U_ASCII_FAMILY,
+ !U_IS_BIG_ENDIAN, U_ASCII_FAMILY,
+ &errorCode);
+ if (ds != NULL || errorCode != U_USELESS_COLLATOR_ERROR) {
+ log_err("udata_openSwapper should have returned NULL with bad argument\n", name);
+ }
+ errorCode=U_ZERO_ERROR;
+ ds=udata_openSwapper(U_IS_BIG_ENDIAN, U_ASCII_FAMILY,
+ !U_IS_BIG_ENDIAN, U_ASCII_FAMILY,
+ &errorCode);
+ ds->printError=printErrorToString;
+ ds->printErrorContext=name;
+ udata_printError(ds, "This %s a %s", "is", "test");
+ udata_closeSwapper(ds);
+ if (strcmp(name, "This is a test") != 0) {
+ log_err("udata_printError can't properly print error messages. Got = %s\n", name);
+ }
+ errorCode = U_USELESS_COLLATOR_ERROR;
+ ds=udata_openSwapperForInputData(NULL, 0,
+ !U_IS_BIG_ENDIAN, U_ASCII_FAMILY,
+ &errorCode);
+ if (ds != NULL || errorCode != U_USELESS_COLLATOR_ERROR) {
+ log_err("udata_openSwapperForInputData should have returned NULL with bad argument\n", name);
+ }
+ errorCode=U_ZERO_ERROR;
+ ds=udata_openSwapperForInputData(NULL, 0,
+ !U_IS_BIG_ENDIAN, U_ASCII_FAMILY,
+ &errorCode);
+ if (ds != NULL || errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("udata_openSwapperForInputData should have returned NULL with bad argument\n", name);
+ }
+ errorCode=U_ZERO_ERROR;
+ memset(buffer, 0, sizeof(2*SWAP_BUFFER_SIZE));
+ ds=udata_openSwapperForInputData(buffer, 2*SWAP_BUFFER_SIZE,
+ !U_IS_BIG_ENDIAN, U_ASCII_FAMILY,
+ &errorCode);
+ if (ds != NULL || errorCode != U_UNSUPPORTED_ERROR) {
+ log_err("udata_openSwapperForInputData should have returned NULL with bad argument\n", name);
+ }
+ errorCode=U_ZERO_ERROR;
+
+ /* Test argument checking. ucol_swapBinary is normally tested via ures_swap, and isn't normally called directly. */
+#if !UCONFIG_NO_COLLATION
+ ucol_swapBinary(NULL, NULL, -1, NULL, NULL);
+ ucol_swapBinary(NULL, NULL, -1, NULL, &errorCode);
+ if (errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("ucol_swapBinary did not fail as expected\n", name);
+ }
+ errorCode=U_ZERO_ERROR;
+#endif
+
+ for(i=0; i<LENGTHOF(swapCases); ++i) {
+ /* build the name for logging */
+ errorCode=U_ZERO_ERROR;
+ if(swapCases[i].name[0]=='*') {
+ pkg=testPath;
+ nm=swapCases[i].name+1;
+ uprv_strcpy(name, "testdata");
+ } else if (uprv_strcmp(swapCases[i].type, "brk")==0
+ || uprv_strcmp(swapCases[i].type, "ctd")==0) {
+ pkg=U_ICUDATA_BRKITR;
+ nm=swapCases[i].name;
+ uprv_strcpy(name, U_ICUDATA_BRKITR);
+ } else {
+ pkg=NULL;
+ nm=swapCases[i].name;
+ uprv_strcpy(name, "NULL");
+ }
+ uprv_strcat(name, "/");
+ uprv_strcat(name, nm);
+ uprv_strcat(name, ".");
+ uprv_strcat(name, swapCases[i].type);
+
+ pData=udata_open(pkg, swapCases[i].type, nm, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ TestSwapCase(pData, name, swapCases[i].swapFn, buffer, buffer+SWAP_BUFFER_SIZE);
+ udata_close(pData);
+ } else {
+ log_data_err("udata_open(%s) failed - %s\n",
+ name, u_errorName(errorCode));
+ }
+ }
+
+ uprv_free(buffer);
+}
+
+
+static void PointerTableOfContents() {
+ UDataMemory *dataItem;
+ UErrorCode status=U_ZERO_ERROR;
+
+ /*
+ * Got testdata.dat into memory, now we try setAppData using the memory image.
+ */
+
+ status=U_ZERO_ERROR;
+ udata_setAppData("OffsetTOCAppData", &gOffsetTOCAppData_dat, &status);
+ if (status != U_ZERO_ERROR) {
+ log_err("FAIL: TestUDataSetAppData(): udata_setAppData(\"appData1\", fileBuf, status) \n"
+ " returned status of %s\n", u_errorName(status));
+ return;
+ }
+
+ dataItem = udata_open("OffsetTOCAppData", "", "gOffsetTOCAppDataItem1", &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: gOffsetTOCAppDataItem1 could not be opened. status = %s\n", u_errorName(status));
+ }
+ if (udata_getMemory(dataItem) != NULL) {
+ log_verbose("FAIL: udata_getMemory(dataItem) passed\n");
+ }
+ else {
+ log_err("FAIL: udata_getMemory returned NULL\n", u_errorName(status));
+ }
+ udata_close(dataItem);
+
+ dataItem = udata_open("OffsetTOCAppData-a", "", "b", &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: gOffsetTOCAppDataItem1 in tree \"a\" could not be opened. status = %s\n", u_errorName(status));
+ }
+ if (udata_getMemory(dataItem) != NULL) {
+ log_verbose("FAIL: udata_getMemory(dataItem) in tree \"a\" passed\n");
+ }
+ else {
+ log_err("FAIL: udata_getMemory returned NULL\n", u_errorName(status));
+ }
+ udata_close(dataItem);
+
+ dataItem = udata_open("OffsetTOCAppData", "", "gOffsetTOCGarbage", &status);
+ if (U_SUCCESS(status)) {
+ log_err("FAIL: gOffsetTOCGarbage should not be opened. status = %s\n", u_errorName(status));
+ }
+ dataItem = udata_open("OffsetTOCAppData", "", "gOffsetTOCNonExistent", &status);
+ if (U_SUCCESS(status)) {
+ log_err("FAIL: gOffsetTOCNonExistent should not be found. status = %s\n", u_errorName(status));
+ }
+
+}
+
+static void SetBadCommonData(void) {
+ /* It's difficult to test that udata_setCommonData really works within the test framework.
+ So we just test that foolish people can't do bad things. */
+ UErrorCode status;
+ char badBuffer[sizeof(gOffsetTOCAppData_dat)];
+
+ memset(badBuffer, 0, sizeof(badBuffer));
+ strcpy(badBuffer, "Hello! I'm not good data.");
+
+ /* Check that we don't do anything */
+ status = U_FILE_ACCESS_ERROR;
+ udata_setCommonData(&gOffsetTOCAppData_dat, &status);
+ if (status != U_FILE_ACCESS_ERROR) {
+ log_err("FAIL: udata_setCommonData changed the failure code.\n");
+ }
+ /* Check that we fail correctly */
+ status = U_ZERO_ERROR;
+ udata_setCommonData(NULL, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("FAIL: udata_setCommonData did not fail with bad arguments.\n");
+ }
+ if (u_getDataDirectory() == NULL || u_getDataDirectory()[0] == 0) {
+ /* Check that we don't change the common data. Many ICU tests will fail after this test, if this works. */
+ /* We could do a better test, if we called u_cleanup and udata_setCommonData returned the last value. */
+ status = U_ZERO_ERROR;
+ udata_setCommonData(&gOffsetTOCAppData_dat, &status);
+ if (status != U_USING_DEFAULT_WARNING) {
+ log_err("FAIL: udata_setCommonData allowed the data to be changed after initialization!\n");
+ }
+ }
+ else {
+ log_verbose("Can't test setting common data because files mode may have been used.\n");
+ }
+
+ /* Check that we verify that the data isn't bad */
+ status = U_ZERO_ERROR;
+ udata_setAppData("invalid path", badBuffer, &status);
+ if (status != U_INVALID_FORMAT_ERROR) {
+ log_err("FAIL: udata_setAppData doesn't verify data validity.\n");
+ }
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/udatpg_test.c b/Build/source/libs/icu/icu-xetex/test/cintltst/udatpg_test.c
new file mode 100644
index 00000000000..34542b0bcda
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/udatpg_test.c
@@ -0,0 +1,307 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: udatpg_test.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2007aug01
+* created by: Markus W. Scherer
+*
+* Test of the C wrapper for the DateTimePatternGenerator.
+* Calls each C API function and exercises code paths in the wrapper,
+* but the full functionality is tested in the C++ intltest.
+*
+* One item to note: C API functions which return a const UChar *
+* should return a NUL-terminated string.
+* (The C++ implementation needs to use getTerminatedBuffer()
+* on UnicodeString objects which end up being returned this way.)
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/udatpg.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+
+void addDateTimePatternGeneratorTest(TestNode** root);
+
+#define TESTCASE(x) addTest(root, &x, "tsformat/udatpg_test/" #x)
+
+static void TestOpenClose(void);
+static void TestUsage(void);
+static void TestBuilder(void);
+
+void addDateTimePatternGeneratorTest(TestNode** root) {
+ TESTCASE(TestOpenClose);
+ TESTCASE(TestUsage);
+ TESTCASE(TestBuilder);
+}
+
+/*
+ * Pipe symbol '|'. We pass only the first UChar without NUL-termination.
+ * The second UChar is just to verify that the API does not pick that up.
+ */
+static const UChar pipeString[]={ 0x7c, 0x0a };
+
+static const UChar testSkeleton1[]={ 0x48, 0x48, 0x6d, 0x6d, 0 }; /* HHmm */
+static const UChar expectingBestPattern[]={ 0x48, 0x48, 0x2e, 0x6d, 0x6d, 0 }; /* HH.mm */
+static const UChar testPattern[]={ 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0 }; /* HH:mm */
+static const UChar expectingSkeleton[]= { 0x48, 0x48, 0x6d, 0x6d, 0 }; /* HHmm */
+static const UChar expectingBaseSkeleton[]= { 0x48, 0x6d, 0 }; /* HHmm */
+static const UChar redundantPattern[]={ 0x79, 0x79, 0x4d, 0x4d, 0x4d, 0 }; /* yyMMM */
+static const UChar testFormat[]= {0x7B, 0x31, 0x7D, 0x20, 0x7B, 0x30, 0x7D, 0}; /* {1} {0} */
+static const UChar appendItemName[]= {0x68, 0x72, 0}; /* hr */
+static const UChar testPattern2[]={ 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x20, 0x76, 0 }; /* HH:mm v */
+static const UChar replacedStr[]={ 0x76, 0x76, 0x76, 0x76, 0 }; /* vvvv */
+/* results for getBaseSkeletons() - {Hmv}, {yMMM} */
+static const UChar resultBaseSkeletons[2][10] = {{0x48,0x6d, 0x76, 0}, {0x79, 0x4d, 0x4d, 0x4d, 0 } };
+
+
+static void TestOpenClose() {
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UDateTimePatternGenerator *dtpg, *dtpg2;
+ const UChar *s;
+ int32_t length;
+
+ /* Open a DateTimePatternGenerator for the default locale. */
+ dtpg=udatpg_open(NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_open(NULL) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ udatpg_close(dtpg);
+
+ /* Now one for German. */
+ dtpg=udatpg_open("de", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_open(de) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* Make some modification which we verify gets passed on to the clone. */
+ udatpg_setDecimal(dtpg, pipeString, 1);
+
+ /* Clone the generator. */
+ dtpg2=udatpg_clone(dtpg, &errorCode);
+ if(U_FAILURE(errorCode) || dtpg2==NULL) {
+ log_err("udatpg_clone() failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* Verify that the clone has the custom decimal symbol. */
+ s=udatpg_getDecimal(dtpg2, &length);
+ if(s==pipeString || length!=1 || 0!=u_memcmp(s, pipeString, length) || s[length]!=0) {
+ log_err("udatpg_getDecimal(cloned object) did not return the expected string\n");
+ return;
+ }
+
+ udatpg_close(dtpg);
+ udatpg_close(dtpg2);
+}
+
+static void TestUsage() {
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UDateTimePatternGenerator *dtpg;
+ UChar bestPattern[20];
+ UChar result[20];
+ int32_t length;
+ UChar *s;
+ const UChar *r;
+
+ dtpg=udatpg_open("fi", &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_open(fi) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ length = udatpg_getBestPattern(dtpg, testSkeleton1, 4,
+ bestPattern, 20, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_getBestPattern failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ if((u_memcmp(bestPattern, expectingBestPattern, length)!=0) || bestPattern[length]!=0) {
+ log_err("udatpg_getBestPattern did not return the expected string\n");
+ return;
+ }
+
+
+ /* Test skeleton == NULL */
+ s=NULL;
+ length = udatpg_getBestPattern(dtpg, s, 0, bestPattern, 20, &errorCode);
+ if(!U_FAILURE(errorCode)&&(length!=0) ) {
+ log_err("udatpg_getBestPattern failed in illegal argument - skeleton is NULL.\n");
+ return;
+ }
+
+ /* Test udatpg_getSkeleton */
+ length = udatpg_getSkeleton(dtpg, testPattern, 5, result, 20, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_getSkeleton failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ if((u_memcmp(result, expectingSkeleton, length)!=0) || result[length]!=0) {
+ log_err("udatpg_getSkeleton did not return the expected string\n");
+ return;
+ }
+
+ /* Test pattern == NULL */
+ s=NULL;
+ length = udatpg_getSkeleton(dtpg, s, 0, result, 20, &errorCode);
+ if(!U_FAILURE(errorCode)&&(length!=0) ) {
+ log_err("udatpg_getSkeleton failed in illegal argument - pattern is NULL.\n");
+ return;
+ }
+
+ /* Test udatpg_getBaseSkeleton */
+ length = udatpg_getBaseSkeleton(dtpg, testPattern, 5, result, 20, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_getBaseSkeleton failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ if((u_memcmp(result, expectingBaseSkeleton, length)!=0) || result[length]!=0) {
+ log_err("udatpg_getBaseSkeleton did not return the expected string\n");
+ return;
+ }
+
+ /* Test pattern == NULL */
+ s=NULL;
+ length = udatpg_getBaseSkeleton(dtpg, s, 0, result, 20, &errorCode);
+ if(!U_FAILURE(errorCode)&&(length!=0) ) {
+ log_err("udatpg_getBaseSkeleton failed in illegal argument - pattern is NULL.\n");
+ return;
+ }
+
+ /* set append format to {1}{0} */
+ udatpg_setAppendItemFormat( dtpg, UDATPG_MONTH_FIELD, testFormat, 7 );
+ r = udatpg_getAppendItemFormat(dtpg, UDATPG_MONTH_FIELD, &length);
+
+
+ if(length!=7 || 0!=u_memcmp(r, testFormat, length) || r[length]!=0) {
+ log_err("udatpg_setAppendItemFormat did not return the expected string\n");
+ return;
+ }
+
+ /* set append name to hr */
+ udatpg_setAppendItemName( dtpg, UDATPG_HOUR_FIELD, appendItemName, 7 );
+ r = udatpg_getAppendItemName(dtpg, UDATPG_HOUR_FIELD, &length);
+
+ if(length!=7 || 0!=u_memcmp(r, appendItemName, length) || r[length]!=0) {
+ log_err("udatpg_setAppendItemName did not return the expected string\n");
+ return;
+ }
+
+ /* set date time format to {1}{0} */
+ udatpg_setDateTimeFormat( dtpg, testFormat, 7 );
+ r = udatpg_getDateTimeFormat(dtpg, &length);
+
+ if(length!=7 || 0!=u_memcmp(r, testFormat, length) || r[length]!=0) {
+ log_err("udatpg_setDateTimeFormat did not return the expected string\n");
+ return;
+ }
+ udatpg_close(dtpg);
+}
+
+static void TestBuilder() {
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UDateTimePatternGenerator *dtpg;
+ UDateTimePatternConflict conflict;
+ UEnumeration *en;
+ UChar result[20];
+ int32_t length, pLength;
+ const UChar *s, *p;
+ const UChar* ptrResult[2];
+ int32_t count=0;
+
+ /* test create an empty DateTimePatternGenerator */
+ dtpg=udatpg_openEmpty(&errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_openEmpty() failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ /* Add a pattern */
+ conflict = udatpg_addPattern(dtpg, redundantPattern, 5, FALSE, result, 20,
+ &length, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("udatpg_addPattern() failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+ /* Add a redundant pattern */
+ conflict = udatpg_addPattern(dtpg, redundantPattern, 5, FALSE, result, 20,
+ &length, &errorCode);
+ if(conflict == UDATPG_NO_CONFLICT) {
+ log_err("udatpg_addPattern() failed to find the duplicate pattern.\n");
+ return;
+ }
+ /* Test pattern == NULL */
+ s=NULL;
+ length = udatpg_addPattern(dtpg, s, 0, FALSE, result, 20,
+ &length, &errorCode);
+ if(!U_FAILURE(errorCode)&&(length!=0) ) {
+ log_err("udatpg_addPattern failed in illegal argument - pattern is NULL.\n");
+ return;
+ }
+
+ /* replace field type */
+ errorCode=U_ZERO_ERROR;
+ conflict = udatpg_addPattern(dtpg, testPattern2, 7, FALSE, result, 20,
+ &length, &errorCode);
+ if((conflict != UDATPG_NO_CONFLICT)||U_FAILURE(errorCode)) {
+ log_err("udatpg_addPattern() failed to add HH:mm v. - %s\n", u_errorName(errorCode));
+ return;
+ }
+ length = udatpg_replaceFieldTypes(dtpg, testPattern2, 7, replacedStr, 4,
+ result, 20, &errorCode);
+ if (U_FAILURE(errorCode) || (length==0) ) {
+ log_err("udatpg_replaceFieldTypes failed!\n");
+ return;
+ }
+
+ /* Get all skeletons and the crroespong pattern for each skeleton. */
+ ptrResult[0] = testPattern2;
+ ptrResult[1] = redundantPattern;
+ count=0;
+ en = udatpg_openSkeletons(dtpg, &errorCode);
+ if (U_FAILURE(errorCode) || (length==0) ) {
+ log_err("udatpg_openSkeletons failed!\n");
+ return;
+ }
+ while ( (s=uenum_unext(en, &length, &errorCode))!= NULL) {
+ p = udatpg_getPatternForSkeleton(dtpg, s, length, &pLength);
+ if (U_FAILURE(errorCode) || p==NULL || u_memcmp(p, ptrResult[count], pLength)!=0 ) {
+ log_err("udatpg_getPatternForSkeleton failed!\n");
+ return;
+ }
+ count++;
+ }
+ uenum_close(en);
+
+ /* Get all baseSkeletons */
+ en = udatpg_openBaseSkeletons(dtpg, &errorCode);
+ count=0;
+ while ( (s=uenum_unext(en, &length, &errorCode))!= NULL) {
+ p = udatpg_getPatternForSkeleton(dtpg, s, length, &pLength);
+ if (U_FAILURE(errorCode) || p==NULL || u_memcmp(p, resultBaseSkeletons[count], pLength)!=0 ) {
+ log_err("udatpg_getPatternForSkeleton failed!\n");
+ return;
+ }
+ count++;
+ }
+ if (U_FAILURE(errorCode) || (length==0) ) {
+ log_err("udatpg_openSkeletons failed!\n");
+ return;
+ }
+ uenum_close(en);
+
+ udatpg_close(dtpg);
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/uenumtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/uenumtst.c
new file mode 100644
index 00000000000..2d9ed6c0ab8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/uenumtst.c
@@ -0,0 +1,307 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 2002-2003, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: uenumtst.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:2
+*
+* created on: 2002jul08
+* created by: Vladimir Weinstein
+*/
+
+#include "cintltst.h"
+#include "uenumimp.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "unicode/ustring.h"
+
+static char quikBuf[256];
+static char* quikU2C(const UChar* str, int32_t len) {
+ u_UCharsToChars(str, quikBuf, len);
+ quikBuf[len] = 0;
+ return quikBuf;
+}
+
+static const char* test1[] = {
+ "first",
+ "second",
+ "third",
+ "fourth"
+};
+
+struct chArrayContext {
+ int32_t currIndex;
+ int32_t maxIndex;
+ char *currChar;
+ UChar *currUChar;
+ char **array;
+};
+
+typedef struct chArrayContext chArrayContext;
+
+#define cont ((chArrayContext *)en->context)
+
+static void U_CALLCONV
+chArrayClose(UEnumeration *en) {
+ if(cont->currUChar != NULL) {
+ free(cont->currUChar);
+ cont->currUChar = NULL;
+ }
+ free(en);
+}
+
+static int32_t U_CALLCONV
+chArrayCount(UEnumeration *en, UErrorCode *status) {
+ return cont->maxIndex;
+}
+
+static const UChar* U_CALLCONV
+chArrayUNext(UEnumeration *en, int32_t *resultLength, UErrorCode *status) {
+ if(cont->currIndex >= cont->maxIndex) {
+ return NULL;
+ }
+
+ if(cont->currUChar == NULL) {
+ cont->currUChar = (UChar *)malloc(1024*sizeof(UChar));
+ }
+
+ cont->currChar = (cont->array)[cont->currIndex];
+ *resultLength = (int32_t)strlen(cont->currChar);
+ u_charsToUChars(cont->currChar, cont->currUChar, *resultLength);
+ cont->currIndex++;
+ return cont->currUChar;
+}
+
+static const char* U_CALLCONV
+chArrayNext(UEnumeration *en, int32_t *resultLength, UErrorCode *status) {
+ if(cont->currIndex >= cont->maxIndex) {
+ return NULL;
+ }
+
+ cont->currChar = (cont->array)[cont->currIndex];
+ *resultLength = (int32_t)strlen(cont->currChar);
+ cont->currIndex++;
+ return cont->currChar;
+}
+
+static void U_CALLCONV
+chArrayReset(UEnumeration *en, UErrorCode *status) {
+ cont->currIndex = 0;
+}
+
+chArrayContext myCont = {
+ 0, 0,
+ NULL, NULL,
+ NULL
+};
+
+UEnumeration chEnum = {
+ NULL,
+ &myCont,
+ chArrayClose,
+ chArrayCount,
+ chArrayUNext,
+ chArrayNext,
+ chArrayReset
+};
+
+static const UEnumeration emptyEnumerator = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+};
+
+static const UEnumeration emptyPartialEnumerator = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ uenum_unextDefault,
+ NULL,
+ NULL,
+};
+
+/********************************************************************/
+static const UChar _first[] = {102,105,114,115,116,0}; /* "first" */
+static const UChar _second[]= {115,101,99,111,110,100,0}; /* "second" */
+static const UChar _third[] = {116,104,105,114,100,0}; /* "third" */
+static const UChar _fourth[]= {102,111,117,114,116,104,0};/* "fourth" */
+
+static const UChar* test2[] = {
+ _first, _second, _third, _fourth
+};
+
+struct uchArrayContext {
+ int32_t currIndex;
+ int32_t maxIndex;
+ UChar *currUChar;
+ UChar **array;
+};
+
+typedef struct uchArrayContext uchArrayContext;
+
+#define ucont ((uchArrayContext *)en->context)
+
+static void U_CALLCONV
+uchArrayClose(UEnumeration *en) {
+ free(en);
+}
+
+static int32_t U_CALLCONV
+uchArrayCount(UEnumeration *en, UErrorCode *status) {
+ return ucont->maxIndex;
+}
+
+static const UChar* U_CALLCONV
+uchArrayUNext(UEnumeration *en, int32_t *resultLength, UErrorCode *status) {
+ if(ucont->currIndex >= ucont->maxIndex) {
+ return NULL;
+ }
+
+ ucont->currUChar = (ucont->array)[ucont->currIndex];
+ *resultLength = u_strlen(ucont->currUChar);
+ ucont->currIndex++;
+ return ucont->currUChar;
+}
+
+static void U_CALLCONV
+uchArrayReset(UEnumeration *en, UErrorCode *status) {
+ ucont->currIndex = 0;
+}
+
+uchArrayContext myUCont = {
+ 0, 0,
+ NULL, NULL
+};
+
+UEnumeration uchEnum = {
+ NULL,
+ &myUCont,
+ uchArrayClose,
+ uchArrayCount,
+ uchArrayUNext,
+ uenum_nextDefault,
+ uchArrayReset
+};
+
+/********************************************************************/
+
+static UEnumeration *getchArrayEnum(const char** source, int32_t size) {
+ UEnumeration *en = (UEnumeration *)malloc(sizeof(UEnumeration));
+ memcpy(en, &chEnum, sizeof(UEnumeration));
+ cont->array = (char **)source;
+ cont->maxIndex = size;
+ return en;
+}
+
+static void EnumerationTest(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = 0;
+ UEnumeration *en = getchArrayEnum(test1, sizeof(test1)/sizeof(test1[0]));
+ const char *string = NULL;
+ const UChar *uString = NULL;
+ while ((string = uenum_next(en, &len, &status))) {
+ log_verbose("read \"%s\", length %i\n", string, len);
+ }
+ uenum_reset(en, &status);
+ while ((uString = uenum_unext(en, &len, &status))) {
+ log_verbose("read \"%s\" (UChar), length %i\n", quikU2C(uString, len), len);
+ }
+
+ uenum_close(en);
+}
+
+static void EmptyEnumerationTest(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UEnumeration *emptyEnum = uprv_malloc(sizeof(UEnumeration));
+
+ uprv_memcpy(emptyEnum, &emptyEnumerator, sizeof(UEnumeration));
+ if (uenum_count(emptyEnum, &status) != -1 || status != U_UNSUPPORTED_ERROR) {
+ log_err("uenum_count failed\n");
+ }
+ status = U_ZERO_ERROR;
+ if (uenum_next(emptyEnum, NULL, &status) != NULL || status != U_UNSUPPORTED_ERROR) {
+ log_err("uenum_next failed\n");
+ }
+ status = U_ZERO_ERROR;
+ if (uenum_unext(emptyEnum, NULL, &status) != NULL || status != U_UNSUPPORTED_ERROR) {
+ log_err("uenum_unext failed\n");
+ }
+ status = U_ZERO_ERROR;
+ uenum_reset(emptyEnum, &status);
+ if (status != U_UNSUPPORTED_ERROR) {
+ log_err("uenum_reset failed\n");
+ }
+ uenum_close(emptyEnum);
+
+ status = U_ZERO_ERROR;
+ if (uenum_next(NULL, NULL, &status) != NULL || status != U_ZERO_ERROR) {
+ log_err("uenum_next(NULL) failed\n");
+ }
+ status = U_ZERO_ERROR;
+ if (uenum_unext(NULL, NULL, &status) != NULL || status != U_ZERO_ERROR) {
+ log_err("uenum_unext(NULL) failed\n");
+ }
+ status = U_ZERO_ERROR;
+ uenum_reset(NULL, &status);
+ if (status != U_ZERO_ERROR) {
+ log_err("uenum_reset(NULL) failed\n");
+ }
+
+ emptyEnum = uprv_malloc(sizeof(UEnumeration));
+ uprv_memcpy(emptyEnum, &emptyPartialEnumerator, sizeof(UEnumeration));
+ status = U_ZERO_ERROR;
+ if (uenum_unext(emptyEnum, NULL, &status) != NULL || status != U_UNSUPPORTED_ERROR) {
+ log_err("partial uenum_unext failed\n");
+ }
+ uenum_close(emptyEnum);
+}
+
+static UEnumeration *getuchArrayEnum(const UChar** source, int32_t size) {
+ UEnumeration *en = (UEnumeration *)malloc(sizeof(UEnumeration));
+ memcpy(en, &uchEnum, sizeof(UEnumeration));
+ ucont->array = (UChar **)source;
+ ucont->maxIndex = size;
+ return en;
+}
+
+static void DefaultNextTest(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = 0;
+ UEnumeration *en = getuchArrayEnum(test2, sizeof(test2)/sizeof(test2[0]));
+ const char *string = NULL;
+ const UChar *uString = NULL;
+ while ((uString = uenum_unext(en, &len, &status))) {
+ log_verbose("read \"%s\" (UChar), length %i\n", quikU2C(uString, len), len);
+ }
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uenum_unext => %s\n", u_errorName(status));
+ }
+ uenum_reset(en, &status);
+ while ((string = uenum_next(en, &len, &status))) {
+ log_verbose("read \"%s\", length %i\n", string, len);
+ }
+ if (U_FAILURE(status)) {
+ log_err("FAIL: uenum_next => %s\n", u_errorName(status));
+ }
+
+ uenum_close(en);
+}
+
+void addEnumerationTest(TestNode** root);
+
+void addEnumerationTest(TestNode** root)
+{
+ addTest(root, &EnumerationTest, "tsutil/uenumtst/EnumerationTest");
+ addTest(root, &EmptyEnumerationTest, "tsutil/uenumtst/EmptyEnumerationTest");
+ addTest(root, &DefaultNextTest, "tsutil/uenumtst/DefaultNextTest");
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/usettest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/usettest.c
new file mode 100644
index 00000000000..fc2a3e9b055
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/usettest.c
@@ -0,0 +1,646 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+*/
+#include "unicode/uset.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include <stdlib.h>
+#include <string.h>
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+#define TEST(x) addTest(root, &x, "uset/" # x)
+
+static void TestAPI(void);
+static void Testj2269(void);
+static void TestSerialized(void);
+static void TestNonInvariantPattern(void);
+static void TestBadPattern(void);
+static void TestFreezable(void);
+static void TestSpan(void);
+
+void addUSetTest(TestNode** root);
+
+static void expect(const USet* set,
+ const char* inList,
+ const char* outList,
+ UErrorCode* ec);
+static void expectContainment(const USet* set,
+ const char* list,
+ UBool isIn);
+static char oneUCharToChar(UChar32 c);
+static void expectItems(const USet* set,
+ const char* items);
+
+void
+addUSetTest(TestNode** root) {
+ TEST(TestAPI);
+ TEST(Testj2269);
+ TEST(TestSerialized);
+ TEST(TestNonInvariantPattern);
+ TEST(TestBadPattern);
+ TEST(TestFreezable);
+ TEST(TestSpan);
+}
+
+/*------------------------------------------------------------------
+ * Tests
+ *------------------------------------------------------------------*/
+
+static void Testj2269() {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar a[4] = { 0x61, 0x62, 0x63, 0 };
+ USet *s = uset_open(1, 0);
+ uset_addString(s, a, 3);
+ a[0] = 0x63; a[1] = 0x63;
+ expect(s, "{abc}", "{ccc}", &status);
+ uset_close(s);
+}
+
+static const UChar PAT[] = {91,97,45,99,123,97,98,125,93,0}; /* "[a-c{ab}]" */
+static const int32_t PAT_LEN = (sizeof(PAT) / sizeof(PAT[0])) - 1;
+
+static const UChar PAT_lb[] = {0x6C, 0x62, 0}; /* "lb" */
+static const int32_t PAT_lb_LEN = (sizeof(PAT_lb) / sizeof(PAT_lb[0])) - 1;
+
+static const UChar VAL_SP[] = {0x53, 0x50, 0}; /* "SP" */
+static const int32_t VAL_SP_LEN = (sizeof(VAL_SP) / sizeof(VAL_SP[0])) - 1;
+
+static const UChar STR_bc[] = {98,99,0}; /* "bc" */
+static const int32_t STR_bc_LEN = (sizeof(STR_bc) / sizeof(STR_bc[0])) - 1;
+
+static const UChar STR_ab[] = {97,98,0}; /* "ab" */
+static const int32_t STR_ab_LEN = (sizeof(STR_ab) / sizeof(STR_ab[0])) - 1;
+
+/**
+ * Basic API test for uset.x
+ */
+static void TestAPI() {
+ USet* set;
+ USet* set2;
+ UErrorCode ec;
+
+ /* [] */
+ set = uset_open(1, 1);
+ uset_clear(set);
+ expect(set, "", "abc{ab}", NULL);
+ uset_close(set);
+
+ /* [ABC] */
+ set = uset_open(0x0041, 0x0043);
+ expect(set, "ABC", "DEF{ab}", NULL);
+ uset_close(set);
+
+ /* [a-c{ab}] */
+ ec = U_ZERO_ERROR;
+ set = uset_openPattern(PAT, PAT_LEN, &ec);
+ if(U_FAILURE(ec)) {
+ log_err("uset_openPattern([a-c{ab}]) failed - %s\n", u_errorName(ec));
+ return;
+ }
+ if(!uset_resemblesPattern(PAT, PAT_LEN, 0)) {
+ log_err("uset_resemblesPattern of PAT failed\n");
+ }
+ expect(set, "abc{ab}", "def{bc}", &ec);
+
+ /* [a-d{ab}] */
+ uset_add(set, 0x64);
+ expect(set, "abcd{ab}", "ef{bc}", NULL);
+
+ /* [acd{ab}{bc}] */
+ uset_remove(set, 0x62);
+ uset_addString(set, STR_bc, STR_bc_LEN);
+ expect(set, "acd{ab}{bc}", "bef{cd}", NULL);
+
+ /* [acd{bc}] */
+ uset_removeString(set, STR_ab, STR_ab_LEN);
+ expect(set, "acd{bc}", "bfg{ab}", NULL);
+
+ /* [^acd{bc}] */
+ uset_complement(set);
+ expect(set, "bef{bc}", "acd{ac}", NULL);
+
+ /* [a-e{bc}] */
+ uset_complement(set);
+ uset_addRange(set, 0x0062, 0x0065);
+ expect(set, "abcde{bc}", "fg{ab}", NULL);
+
+ /* [de{bc}] */
+ uset_removeRange(set, 0x0050, 0x0063);
+ expect(set, "de{bc}", "bcfg{ab}", NULL);
+
+ /* [g-l] */
+ uset_set(set, 0x0067, 0x006C);
+ expect(set, "ghijkl", "de{bc}", NULL);
+
+ if (uset_indexOf(set, 0x0067) != 0) {
+ log_err("uset_indexOf failed finding correct index of 'g'\n");
+ }
+
+ if (uset_charAt(set, 0) != 0x0067) {
+ log_err("uset_charAt failed finding correct char 'g' at index 0\n");
+ }
+
+ /* How to test this one...? */
+ uset_compact(set);
+
+ /* [g-i] */
+ uset_retain(set, 0x0067, 0x0069);
+ expect(set, "ghi", "dejkl{bc}", NULL);
+
+ /* UCHAR_ASCII_HEX_DIGIT */
+ uset_applyIntPropertyValue(set, UCHAR_ASCII_HEX_DIGIT, 1, &ec);
+ if(U_FAILURE(ec)) {
+ log_err("uset_applyIntPropertyValue([UCHAR_ASCII_HEX_DIGIT]) failed - %s\n", u_errorName(ec));
+ return;
+ }
+ expect(set, "0123456789ABCDEFabcdef", "GHIjkl{bc}", NULL);
+
+ /* [ab] */
+ uset_clear(set);
+ uset_addAllCodePoints(set, STR_ab, STR_ab_LEN);
+ expect(set, "ab", "def{ab}", NULL);
+ if (uset_containsAllCodePoints(set, STR_bc, STR_bc_LEN)){
+ log_err("set should not conatin all characters of \"bc\" \n");
+ }
+
+ /* [] */
+ set2 = uset_open(1, 1);
+ uset_clear(set2);
+
+ /* space */
+ uset_applyPropertyAlias(set2, PAT_lb, PAT_lb_LEN, VAL_SP, VAL_SP_LEN, &ec);
+ expect(set2, " ", "abcdefghi{bc}", NULL);
+
+ /* [a-c] */
+ uset_set(set2, 0x0061, 0x0063);
+ /* [g-i] */
+ uset_set(set, 0x0067, 0x0069);
+
+ /* [a-c g-i] */
+ if (uset_containsSome(set, set2)) {
+ log_err("set should not contain some of set2 yet\n");
+ }
+ uset_complementAll(set, set2);
+ if (!uset_containsSome(set, set2)) {
+ log_err("set should contain some of set2\n");
+ }
+ expect(set, "abcghi", "def{bc}", NULL);
+
+ /* [g-i] */
+ uset_removeAll(set, set2);
+ expect(set, "ghi", "abcdef{bc}", NULL);
+
+ /* [a-c g-i] */
+ uset_addAll(set2, set);
+ expect(set2, "abcghi", "def{bc}", NULL);
+
+ /* [g-i] */
+ uset_retainAll(set2, set);
+ expect(set2, "ghi", "abcdef{bc}", NULL);
+
+ uset_close(set);
+ uset_close(set2);
+}
+
+/*------------------------------------------------------------------
+ * Support
+ *------------------------------------------------------------------*/
+
+/**
+ * Verifies that the given set contains the characters and strings in
+ * inList, and does not contain those in outList. Also verifies that
+ * 'set' is not NULL and that 'ec' succeeds.
+ * @param set the set to test, or NULL (on error)
+ * @param inList list of set contents, in iteration order. Format is
+ * list of individual strings, in iteration order, followed by sorted
+ * list of strings, delimited by {}. This means we do not test
+ * characters '{' or '}' and we do not test strings containing those
+ * characters either.
+ * @param outList list of things not in the set. Same format as
+ * inList.
+ * @param ec an error code, checked for success. May be NULL in which
+ * case it is ignored.
+ */
+static void expect(const USet* set,
+ const char* inList,
+ const char* outList,
+ UErrorCode* ec) {
+ if (ec!=NULL && U_FAILURE(*ec)) {
+ log_err("FAIL: %s\n", u_errorName(*ec));
+ return;
+ }
+ if (set == NULL) {
+ log_err("FAIL: USet is NULL\n");
+ return;
+ }
+ expectContainment(set, inList, TRUE);
+ expectContainment(set, outList, FALSE);
+ expectItems(set, inList);
+}
+
+static void expectContainment(const USet* set,
+ const char* list,
+ UBool isIn) {
+ const char* p = list;
+ UChar ustr[4096];
+ char *pat;
+ UErrorCode ec;
+ int32_t rangeStart = -1, rangeEnd = -1, length;
+
+ ec = U_ZERO_ERROR;
+ length = uset_toPattern(set, ustr, sizeof(ustr), TRUE, &ec);
+ if(U_FAILURE(ec)) {
+ log_err("FAIL: uset_toPattern() fails in expectContainment() - %s\n", u_errorName(ec));
+ return;
+ }
+ pat=aescstrdup(ustr, length);
+
+ while (*p) {
+ if (*p=='{') {
+ const char* stringStart = ++p;
+ int32_t stringLength = 0;
+ char strCopy[64];
+
+ while (*p++ != '}') {
+ }
+ stringLength = (int32_t)(p - stringStart - 1);
+ strncpy(strCopy, stringStart, stringLength);
+ strCopy[stringLength] = 0;
+
+ u_charsToUChars(stringStart, ustr, stringLength);
+
+ if (uset_containsString(set, ustr, stringLength) == isIn) {
+ log_verbose("Ok: %s %s \"%s\"\n", pat,
+ (isIn ? "contains" : "does not contain"),
+ strCopy);
+ } else {
+ log_err("FAIL: %s %s \"%s\"\n", pat,
+ (isIn ? "does not contain" : "contains"),
+ strCopy);
+ }
+ }
+
+ else {
+ UChar32 c;
+
+ u_charsToUChars(p, ustr, 1);
+ c = ustr[0];
+
+ if (uset_contains(set, c) == isIn) {
+ log_verbose("Ok: %s %s '%c'\n", pat,
+ (isIn ? "contains" : "does not contain"),
+ *p);
+ } else {
+ log_err("FAIL: %s %s '%c'\n", pat,
+ (isIn ? "does not contain" : "contains"),
+ *p);
+ }
+
+ /* Test the range API too by looking for ranges */
+ if (c == rangeEnd+1) {
+ rangeEnd = c;
+ } else {
+ if (rangeStart >= 0) {
+ if (uset_containsRange(set, rangeStart, rangeEnd) == isIn) {
+ log_verbose("Ok: %s %s U+%04X-U+%04X\n", pat,
+ (isIn ? "contains" : "does not contain"),
+ rangeStart, rangeEnd);
+ } else {
+ log_err("FAIL: %s %s U+%04X-U+%04X\n", pat,
+ (isIn ? "does not contain" : "contains"),
+ rangeStart, rangeEnd);
+ }
+ }
+ rangeStart = rangeEnd = c;
+ }
+
+ ++p;
+ }
+ }
+
+ if (rangeStart >= 0) {
+ if (uset_containsRange(set, rangeStart, rangeEnd) == isIn) {
+ log_verbose("Ok: %s %s U+%04X-U+%04X\n", pat,
+ (isIn ? "contains" : "does not contain"),
+ rangeStart, rangeEnd);
+ } else {
+ log_err("FAIL: %s %s U+%04X-U+%04X\n", pat,
+ (isIn ? "does not contain" : "contains"),
+ rangeStart, rangeEnd);
+ }
+ }
+}
+
+/* This only works for invariant BMP chars */
+static char oneUCharToChar(UChar32 c) {
+ UChar ubuf[1];
+ char buf[1];
+ ubuf[0] = (UChar) c;
+ u_UCharsToChars(ubuf, buf, 1);
+ return buf[0];
+}
+
+static void expectItems(const USet* set,
+ const char* items) {
+ const char* p = items;
+ UChar ustr[4096], itemStr[4096];
+ char buf[4096];
+ char *pat;
+ UErrorCode ec;
+ int32_t expectedSize = 0;
+ int32_t itemCount = uset_getItemCount(set);
+ int32_t itemIndex = 0;
+ UChar32 start = 1, end = 0;
+ int32_t itemLen = 0, length;
+
+ ec = U_ZERO_ERROR;
+ length = uset_toPattern(set, ustr, sizeof(ustr), TRUE, &ec);
+ if (U_FAILURE(ec)) {
+ log_err("FAIL: uset_toPattern => %s\n", u_errorName(ec));
+ return;
+ }
+ pat=aescstrdup(ustr, length);
+
+ if (uset_isEmpty(set) != (strlen(items)==0)) {
+ log_err("FAIL: %s should return %s from isEmpty\n",
+ pat,
+ strlen(items)==0 ? "TRUE" : "FALSE");
+ }
+
+ /* Don't test patterns starting with "[^" */
+ if (u_strlen(ustr) > 2 && ustr[1] == 0x5e /*'^'*/) {
+ return;
+ }
+
+ while (*p) {
+
+ ++expectedSize;
+
+ if (start > end || start == -1) {
+ /* Fetch our next item */
+ if (itemIndex >= itemCount) {
+ log_err("FAIL: ran out of items iterating %s\n", pat);
+ return;
+ }
+
+ itemLen = uset_getItem(set, itemIndex, &start, &end,
+ itemStr, sizeof(itemStr), &ec);
+ if (U_FAILURE(ec) || itemLen < 0) {
+ log_err("FAIL: uset_getItem => %s\n", u_errorName(ec));
+ return;
+ }
+
+ if (itemLen == 0) {
+ log_verbose("Ok: %s item %d is %c-%c\n", pat,
+ itemIndex, oneUCharToChar(start),
+ oneUCharToChar(end));
+ } else {
+ itemStr[itemLen] = 0;
+ u_UCharsToChars(itemStr, buf, itemLen+1);
+ log_verbose("Ok: %s item %d is \"%s\"\n", pat, itemIndex, buf);
+ }
+
+ ++itemIndex;
+ }
+
+ if (*p=='{') {
+ const char* stringStart = ++p;
+ int32_t stringLength = 0;
+ char strCopy[64];
+
+ while (*p++ != '}') {
+ }
+ stringLength = (int32_t)(p - stringStart - 1);
+ strncpy(strCopy, stringStart, stringLength);
+ strCopy[stringLength] = 0;
+
+ u_charsToUChars(stringStart, ustr, stringLength);
+ ustr[stringLength] = 0;
+
+ if (itemLen == 0) {
+ log_err("FAIL: for %s expect \"%s\" next, but got a char\n",
+ pat, strCopy);
+ return;
+ }
+
+ if (u_strcmp(ustr, itemStr) != 0) {
+ log_err("FAIL: for %s expect \"%s\" next\n",
+ pat, strCopy);
+ return;
+ }
+ }
+
+ else {
+ UChar32 c;
+
+ u_charsToUChars(p, ustr, 1);
+ c = ustr[0];
+
+ if (itemLen != 0) {
+ log_err("FAIL: for %s expect '%c' next, but got a string\n",
+ pat, *p);
+ return;
+ }
+
+ if (c != start++) {
+ log_err("FAIL: for %s expect '%c' next\n",
+ pat, *p);
+ return;
+ }
+
+ ++p;
+ }
+ }
+
+ if (uset_size(set) == expectedSize) {
+ log_verbose("Ok: %s size is %d\n", pat, expectedSize);
+ } else {
+ log_err("FAIL: %s size is %d, expected %d\n",
+ pat, uset_size(set), expectedSize);
+ }
+}
+
+static void
+TestSerialized() {
+ uint16_t buffer[1000];
+ USerializedSet sset;
+ USet *set;
+ UErrorCode errorCode;
+ UChar32 c;
+ int32_t length;
+
+ /* use a pattern that generates both BMP and supplementary code points */
+ U_STRING_DECL(pattern, "[:Cf:]", 6);
+ U_STRING_INIT(pattern, "[:Cf:]", 6);
+
+ errorCode=U_ZERO_ERROR;
+ set=uset_openPattern(pattern, -1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("uset_openPattern([:Cf:]) failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ length=uset_serialize(set, buffer, LENGTHOF(buffer), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("unable to uset_serialize([:Cf:]) - %s\n", u_errorName(errorCode));
+ uset_close(set);
+ return;
+ }
+
+ uset_getSerializedSet(&sset, buffer, length);
+ for(c=0; c<=0x10ffff; ++c) {
+ if(uset_contains(set, c)!=uset_serializedContains(&sset, c)) {
+ log_err("uset_contains(U+%04x)!=uset_serializedContains(U+%04x)\n", c);
+ break;
+ }
+ }
+
+ uset_close(set);
+}
+
+/**
+ * Make sure that when non-invariant chars are passed to uset_openPattern
+ * they do not cause an ugly failure mode (e.g. assertion failure).
+ * JB#3795.
+ */
+static void
+TestNonInvariantPattern() {
+ UErrorCode ec = U_ZERO_ERROR;
+ /* The critical part of this test is that the following pattern
+ must contain a non-invariant character. */
+ static const char *pattern = "[:ccc!=0:]";
+ UChar buf[256];
+ int32_t len = u_unescape(pattern, buf, 256);
+ /* This test 'fails' by having an assertion failure within the
+ following call. It passes by running to completion with no
+ assertion failure. */
+ USet *set = uset_openPattern(buf, len, &ec);
+ uset_close(set);
+}
+
+static void TestBadPattern(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ USet *pat;
+ U_STRING_DECL(pattern, "[", 1);
+ U_STRING_INIT(pattern, "[", 1);
+ pat = uset_openPatternOptions(pattern, u_strlen(pattern), 0, &status);
+ if (pat != NULL || U_SUCCESS(status)) {
+ log_err("uset_openPatternOptions did not fail as expected %s\n", u_errorName(status));
+ }
+}
+
+static USet *openIDSet() {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ U_STRING_DECL(pattern, "[:ID_Continue:]", 15);
+ U_STRING_INIT(pattern, "[:ID_Continue:]", 15);
+ return uset_openPattern(pattern, 15, &errorCode);
+}
+
+static void TestFreezable() {
+ USet *idSet;
+ USet *frozen;
+ USet *thawed;
+
+ idSet=openIDSet();
+
+ if (idSet == NULL) {
+ log_err("openIDSet() returned NULL");
+ uset_close(idSet);
+ return;
+ }
+
+ frozen=uset_clone(idSet);
+
+ if (frozen == NULL) {
+ log_err("uset_Clone() returned NULL");
+ return;
+ }
+
+ if(!uset_equals(frozen, idSet)) {
+ log_err("uset_clone() did not make an equal copy\n");
+ }
+
+ uset_freeze(frozen);
+ uset_addRange(frozen, 0xd802, 0xd805);
+
+ if(uset_isFrozen(idSet) || !uset_isFrozen(frozen) || !uset_equals(frozen, idSet)) {
+ log_err("uset_freeze() or uset_isFrozen() does not work\n");
+ }
+
+ thawed=uset_cloneAsThawed(frozen);
+
+ if (thawed == NULL) {
+ log_err("uset_cloneAsThawed(frozen) returned NULL");
+ uset_close(frozen);
+ uset_close(idSet);
+ return;
+ }
+
+ uset_addRange(thawed, 0xd802, 0xd805);
+
+ if(uset_isFrozen(thawed) || uset_equals(thawed, idSet) || !uset_containsRange(thawed, 0xd802, 0xd805)) {
+ log_err("uset_cloneAsThawed() does not work\n");
+ }
+
+ uset_close(idSet);
+ uset_close(frozen);
+ uset_close(thawed);
+}
+
+static void TestSpan() {
+ static const UChar s16[2]={ 0xe01, 0x3000 };
+ static const char* s8="\xE0\xB8\x81\xE3\x80\x80";
+
+ USet *idSet=openIDSet();
+
+ if (idSet == NULL) {
+ log_err("openIDSet() returned NULL");
+ return;
+ }
+
+ if(
+ 1!=uset_span(idSet, s16, 2, USET_SPAN_CONTAINED) ||
+ 0!=uset_span(idSet, s16, 2, USET_SPAN_NOT_CONTAINED) ||
+ 2!=uset_spanBack(idSet, s16, 2, USET_SPAN_CONTAINED) ||
+ 1!=uset_spanBack(idSet, s16, 2, USET_SPAN_NOT_CONTAINED)
+ ) {
+ log_err("uset_span() or uset_spanBack() does not work\n");
+ }
+
+ if(
+ 3!=uset_spanUTF8(idSet, s8, 6, USET_SPAN_CONTAINED) ||
+ 0!=uset_spanUTF8(idSet, s8, 6, USET_SPAN_NOT_CONTAINED) ||
+ 6!=uset_spanBackUTF8(idSet, s8, 6, USET_SPAN_CONTAINED) ||
+ 3!=uset_spanBackUTF8(idSet, s8, 6, USET_SPAN_NOT_CONTAINED)
+ ) {
+ log_err("uset_spanUTF8() or uset_spanBackUTF8() does not work\n");
+ }
+
+ uset_freeze(idSet);
+
+ if(
+ 1!=uset_span(idSet, s16, 2, USET_SPAN_CONTAINED) ||
+ 0!=uset_span(idSet, s16, 2, USET_SPAN_NOT_CONTAINED) ||
+ 2!=uset_spanBack(idSet, s16, 2, USET_SPAN_CONTAINED) ||
+ 1!=uset_spanBack(idSet, s16, 2, USET_SPAN_NOT_CONTAINED)
+ ) {
+ log_err("uset_span(frozen) or uset_spanBack(frozen) does not work\n");
+ }
+
+ if(
+ 3!=uset_spanUTF8(idSet, s8, 6, USET_SPAN_CONTAINED) ||
+ 0!=uset_spanUTF8(idSet, s8, 6, USET_SPAN_NOT_CONTAINED) ||
+ 6!=uset_spanBackUTF8(idSet, s8, 6, USET_SPAN_CONTAINED) ||
+ 3!=uset_spanBackUTF8(idSet, s8, 6, USET_SPAN_NOT_CONTAINED)
+ ) {
+ log_err("uset_spanUTF8(frozen) or uset_spanBackUTF8(frozen) does not work\n");
+ }
+
+ uset_close(idSet);
+}
+
+/*eof*/
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/usrchdat.c b/Build/source/libs/icu/icu-xetex/test/cintltst/usrchdat.c
new file mode 100644
index 00000000000..7f79e770db9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/usrchdat.c
@@ -0,0 +1,498 @@
+/********************************************************************
+ * Copyright (c) 2001-2007 International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************
+ * File USRCHDAT.H
+ * Modification History:
+ * Name date Description
+ * synwee July 31 2001 creation
+ ********************************************************************/
+
+
+/*
+Note: This file is included by other C and C++ files. This file should not be directly compiled.
+*/
+#ifndef USRCHDAT_C
+#define USRCHDAT_C
+
+#include "unicode/ucol.h"
+
+#if !UCONFIG_NO_COLLATION
+
+U_CDECL_BEGIN
+struct SearchData {
+ const char *text;
+ const char *pattern;
+ const char *collator;
+ UCollationStrength strength;
+ const char *breaker;
+ int8_t offset[32];
+ uint8_t size[32];
+};
+U_CDECL_END
+
+typedef struct SearchData SearchData;
+
+static const char *TESTCOLLATORRULE = "& o,O ; p,P";
+
+static const char *EXTRACOLLATIONRULE = " & ae ; \\u00e4 & AE ; \\u00c4 & oe ; \\u00f6 & OE ; \\u00d6 & ue ; \\u00fc & UE ; \\u00dc";
+
+static const SearchData BASIC[] = {
+ {"xxxxxxxxxxxxxxxxxxxx", "fisher", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"silly spring string", "string", NULL, UCOL_TERTIARY, NULL, {13, -1},
+ {6}},
+ {"silly spring string string", "string", NULL, UCOL_TERTIARY, NULL,
+ {13, 20, -1}, {6, 6}},
+ {"silly string spring string", "string", NULL, UCOL_TERTIARY, NULL,
+ {6, 20, -1}, {6, 6}},
+ {"string spring string", "string", NULL, UCOL_TERTIARY, NULL, {0, 14, -1},
+ {6, 6}},
+ {"Scott Ganyo", "c", NULL, UCOL_TERTIARY, NULL, {1, -1}, {1}},
+ {"Scott Ganyo", " ", NULL, UCOL_TERTIARY, NULL, {5, -1}, {1}},
+ {"\\u0300\\u0325", "\\u0300", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"a\\u0300\\u0325", "\\u0300", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"a\\u0300\\u0325", "\\u0300\\u0325", NULL, UCOL_TERTIARY, NULL, {1, -1},
+ {2}},
+ {"a\\u0300b", "\\u0300", NULL, UCOL_TERTIARY, NULL, {1, -1}, {1}},
+ {"\\u00c9", "e", NULL, UCOL_PRIMARY, NULL, {0, -1}, {1}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData BREAKITERATOREXACT[] = {
+ {"foxy fox", "fox", NULL, UCOL_TERTIARY, "characterbreaker", {0, 5, -1},
+ {3, 3}},
+ {"foxy fox", "fox", NULL, UCOL_TERTIARY, "wordbreaker", {5, -1}, {3}},
+ {"This is a toe T\\u00F6ne", "toe", "de", UCOL_PRIMARY,
+ "characterbreaker", {10, 14, -1}, {3, 2}},
+ {"This is a toe T\\u00F6ne", "toe", "de", UCOL_PRIMARY, "wordbreaker",
+ {10, -1}, {3}},
+ {"Channel, another channel, more channels, and one last Channel",
+ "Channel", "es", UCOL_TERTIARY, "wordbreaker", {0, 54, -1}, {7, 7}},
+ /* jitterbug 1745 */
+ {"testing that \\u00e9 does not match e", "e", NULL, UCOL_TERTIARY,
+ "characterbreaker", {1, 17, 30, -1}, {1, 1, 1}},
+ {"testing that string ab\\u00e9cd does not match e", "e", NULL,
+ UCOL_TERTIARY, "characterbreaker", {1, 28, 41, -1}, {1, 1, 1}},
+ {"\\u00c9", "e", "fr", UCOL_PRIMARY, "characterbreaker", {0, -1}, {1}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData STRENGTH[] = {
+ /*012345678901234567890123456789012345678901234567890123456789*/
+ {"The quick brown fox jumps over the lazy foxes", "fox", "en",
+ UCOL_PRIMARY, NULL, {16, 40, -1}, {3, 3}},
+ {"The quick brown fox jumps over the lazy foxes", "fox", "en",
+ UCOL_PRIMARY, "wordbreaker", {16, -1}, {3}},
+ {"blackbirds Pat p\\u00E9ch\\u00E9 p\\u00EAche p\\u00E9cher p\\u00EAcher Tod T\\u00F6ne black Tofu blackbirds Ton PAT toehold blackbird black-bird pat toe big Toe",
+ "peche", "fr", UCOL_PRIMARY, NULL, {15, 21, 27, 34, -1}, {5, 5, 5, 5}},
+ {"This is a toe T\\u00F6ne", "toe", "de", UCOL_PRIMARY, NULL,
+ {10, 14, -1}, {3, 2}},
+ {"A channel, another CHANNEL, more Channels, and one last channel...",
+ "channel", "es", UCOL_PRIMARY, NULL, {2, 19, 33, 56, -1},
+ {7, 7, 7, 7}},
+ {"\\u00c0 should match but not A", "A\\u0300", "en", UCOL_IDENTICAL,
+ NULL, {0, -1}, {1, 0}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData VARIABLE[] = {
+ /*012345678901234567890123456789012345678901234567890123456789*/
+ {"blackbirds black blackbirds blackbird black-bird",
+ "blackbird", NULL, UCOL_TERTIARY, NULL, {0, 17, 28, 38, -1},
+ {9, 9, 9, 10}},
+ /* to see that it doesn't go into an infinite loop if the start of text
+ is a ignorable character */
+ {" on", "go", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"abcdefghijklmnopqrstuvwxyz", " ", NULL, UCOL_PRIMARY, NULL,
+ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, -1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
+ /* testing tightest match */
+ {" abc a bc ab c a bc ab c", "abc", NULL, UCOL_QUATERNARY,
+ NULL, {1, -1}, {3}},
+ /*012345678901234567890123456789012345678901234567890123456789 */
+ {" abc a bc ab c a bc ab c", "abc", NULL, UCOL_SECONDARY,
+ NULL, {1, 6, 13, 21, 31, -1}, {3, 4, 4, 5, 5}},
+ /* totally ignorable text */
+ {" ---------------", "abc", NULL, UCOL_SECONDARY,
+ NULL, {-1}, {0}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData NORMEXACT[] = {
+ {"a\\u0300\\u0325", "\\u0325\\u0300", NULL, UCOL_TERTIARY, NULL, {1, -1},
+ {2}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData NONNORMEXACT[] = {
+ {"a\\u0300\\u0325", "\\u0325\\u0300", NULL, UCOL_TERTIARY, NULL, {-1},
+ {0}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData OVERLAP[] = {
+ {"abababab", "abab", NULL, UCOL_TERTIARY, NULL, {0, 2, 4, -1},
+ {4, 4, 4}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData NONOVERLAP[] = {
+ {"abababab", "abab", NULL, UCOL_TERTIARY, NULL, {0, 4, -1}, {4, 4}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData COLLATOR[] = {
+ /* english */
+ {"fox fpx", "fox", NULL, UCOL_TERTIARY, NULL, {0, -1}, {3}},
+ /* tailored */
+ {"fox fpx", "fox", NULL, UCOL_PRIMARY, NULL, {0, 4, -1}, {3, 3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData PATTERN[] = {
+ {"The quick brown fox jumps over the lazy foxes", "the", NULL,
+ UCOL_PRIMARY, NULL, {0, 31, -1}, {3, 3}},
+ {"The quick brown fox jumps over the lazy foxes", "fox", NULL,
+ UCOL_PRIMARY, NULL, {16, 40, -1}, {3, 3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData TEXT[] = {
+ {"the foxy brown fox", "fox", NULL, UCOL_TERTIARY, NULL, {4, 15, -1},
+ {3, 3}},
+ {"the quick brown fox", "fox", NULL, UCOL_TERTIARY, NULL, {16, -1},
+ {3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData COMPOSITEBOUNDARIES[] = {
+ {"\\u00C0", "A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"A\\u00C0C", "A", NULL, UCOL_TERTIARY, NULL, {0, 1, -1}, {1, 1}},
+ {"\\u00C0A", "A", NULL, UCOL_TERTIARY, NULL, {0, 1, -1}, {1, 1}},
+ {"B\\u00C0", "A", NULL, UCOL_TERTIARY, NULL, {1, -1}, {1}},
+ {"\\u00C0B", "A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u00C0", "\\u0300", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u0300\\u00C0", "\\u0300", NULL, UCOL_TERTIARY, NULL, {0, 1, -1},
+ {1, 1}},
+ {"\\u00C0\\u0300", "\\u0300", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ /* A + 030A + 0301 */
+ {"\\u01FA", "\\u01FA", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u01FA", "\\u030A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "A\\u030A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "\\u030AA", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "\\u0301", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "A\\u0301", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "\\u0301A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "\\u030A\\u0301", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"A\\u01FA", "A\\u030A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FAA", "\\u0301A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u0F73", "\\u0F73", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u0F73", "\\u0F71", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u0F73", "\\u0F72", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u0F73", "\\u0F71\\u0F72", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"A\\u0F73", "A\\u0F71", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u0F73A", "\\u0F72A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData MATCH[] = {
+ {"a busy bee is a very busy beeee", "bee", NULL, UCOL_TERTIARY, NULL,
+ {7, 26, -1}, {3, 3}},
+ /* 012345678901234567890123456789012345678901234567890 */
+ {"a busy bee is a very busy beeee with no bee life", "bee", NULL,
+ UCOL_TERTIARY, NULL, {7, 26, 40, -1}, {3, 3, 3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData SUPPLEMENTARY[] = {
+ /* 012345678901234567890123456789012345678901234567890012345678901234567890123456789012345678901234567890012345678901234567890123456789 */
+ {"abc \\uD800\\uDC00 \\uD800\\uDC01 \\uD801\\uDC00 \\uD800\\uDC00abc abc\\uD800\\uDC00 \\uD800\\uD800\\uDC00 \\uD800\\uDC00\\uDC00",
+ "\\uD800\\uDC00", NULL, UCOL_TERTIARY, NULL, {4, 13, 22, 26, 29, -1},
+ {2, 2, 2, 2, 2}},
+ {"and\\uD834\\uDDB9this sentence", "\\uD834\\uDDB9", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {2}},
+ {"and \\uD834\\uDDB9 this sentence", " \\uD834\\uDDB9 ", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {"and-\\uD834\\uDDB9-this sentence", "-\\uD834\\uDDB9-", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {"and,\\uD834\\uDDB9,this sentence", ",\\uD834\\uDDB9,", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {"and?\\uD834\\uDDB9?this sentence", "?\\uD834\\uDDB9?", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const char *CONTRACTIONRULE =
+ "&z = ab/c < AB < X\\u0300 < ABC < X\\u0300\\u0315";
+
+static const SearchData CONTRACTION[] = {
+ /* common discontiguous */
+ {"A\\u0300\\u0315", "\\u0300", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"A\\u0300\\u0315", "\\u0300\\u0315", NULL, UCOL_TERTIARY, NULL, {1, -1},
+ {2}},
+ /* contraction prefix */
+ {"AB\\u0315C", "A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"AB\\u0315C", "AB", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"AB\\u0315C", "\\u0315", NULL, UCOL_TERTIARY, NULL, {2, -1}, {1}},
+ /* discontiguous problem here for backwards iteration.
+ accents not found because discontiguous stores all information */
+ {"X\\u0300\\u0319\\u0315", "\\u0319", NULL, UCOL_TERTIARY, NULL, {-1},
+ {0}},
+ /* ends not with a contraction character */
+ {"X\\u0315\\u0300D", "\\u0300\\u0315", NULL, UCOL_TERTIARY, NULL, {-1},
+ {0}},
+ {"X\\u0315\\u0300D", "X\\u0300\\u0315", NULL, UCOL_TERTIARY, NULL,
+ {0, -1}, {3}},
+ {"X\\u0300\\u031A\\u0315D", "X\\u0300", NULL, UCOL_TERTIARY, NULL, {-1},
+ {0}},
+ /* blocked discontiguous */
+ {"X\\u0300\\u031A\\u0315D", "\\u031A\\u0315D", NULL, UCOL_TERTIARY, NULL,
+ {-1}, {0}},
+ {"ab", "z", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const char *IGNORABLERULE = "&a = \\u0300";
+
+static const SearchData IGNORABLE[] = {
+ {"\\u0300\\u0315 \\u0300\\u0315 ", "\\u0300", NULL, UCOL_PRIMARY, NULL,
+ {0, 3, -1}, {2, 2}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData BASICCANONICAL[] = {
+ {"xxxxxxxxxxxxxxxxxxxx", "fisher", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"silly spring string", "string", NULL, UCOL_TERTIARY, NULL, {13, -1},
+ {6}},
+ {"silly spring string string", "string", NULL, UCOL_TERTIARY, NULL,
+ {13, 20, -1}, {6, 6}},
+ {"silly string spring string", "string", NULL, UCOL_TERTIARY, NULL,
+ {6, 20, -1}, {6, 6}},
+ {"string spring string", "string", NULL, UCOL_TERTIARY, NULL, {0, 14, -1},
+ {6, 6}},
+ {"Scott Ganyo", "c", NULL, UCOL_TERTIARY, NULL, {1, -1}, {1}},
+ {"Scott Ganyo", " ", NULL, UCOL_TERTIARY, NULL, {5, -1}, {1}},
+ {"\\u0300\\u0325", "\\u0300", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"a\\u0300\\u0325", "\\u0300", NULL, UCOL_TERTIARY, NULL, {1, -1}, {2}},
+ {"a\\u0300\\u0325", "\\u0300\\u0325", NULL, UCOL_TERTIARY, NULL, {1, -1},
+ {2}},
+ {"a\\u0300b", "\\u0300", NULL, UCOL_TERTIARY, NULL, {1, -1}, {1}},
+ {"a\\u0300\\u0325b", "\\u0300b", NULL, UCOL_TERTIARY, NULL, {1, -1}, {3}},
+ {"\\u0325\\u0300A\\u0325\\u0300", "\\u0300A\\u0300", NULL, UCOL_TERTIARY,
+ NULL, {0, -1}, {5}},
+ {"\\u0325\\u0300A\\u0325\\u0300", "\\u0325A\\u0325", NULL, UCOL_TERTIARY,
+ NULL, {0, -1}, {5}},
+ {"a\\u0300\\u0325b\\u0300\\u0325c \\u0325b\\u0300 \\u0300b\\u0325",
+ "\\u0300b\\u0325", NULL, UCOL_TERTIARY, NULL, {1, 12, -1}, {5, 3}},
+ {"\\u00c4\\u0323", "A\\u0323\\u0308", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"\\u0308\\u0323", "\\u0323\\u0308", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData NORMCANONICAL[] = {
+ {"\\u0300\\u0325", "\\u0300", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"\\u0300\\u0325", "\\u0325", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"a\\u0300\\u0325", "\\u0325\\u0300", NULL, UCOL_TERTIARY, NULL, {1, -1},
+ {2}},
+ {"a\\u0300\\u0325", "\\u0300\\u0325", NULL, UCOL_TERTIARY, NULL, {1, -1},
+ {2}},
+ {"a\\u0300\\u0325", "\\u0325", NULL, UCOL_TERTIARY, NULL, {1, -1}, {2}},
+ {"a\\u0300\\u0325", "\\u0300", NULL, UCOL_TERTIARY, NULL, {1, -1}, {2}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData BREAKITERATORCANONICAL[] = {
+ {"foxy fox", "fox", NULL, UCOL_TERTIARY, "characterbreaker", {0, 5, -1},
+ {3, 3}},
+ {"foxy fox", "fox", NULL, UCOL_TERTIARY, "wordbreaker", {5, -1}, {3}},
+ {"This is a toe T\\u00F6ne", "toe", "de", UCOL_PRIMARY,
+ "characterbreaker", {10, 14, -1}, {3, 2}},
+ {"This is a toe T\\u00F6ne", "toe", "de", UCOL_PRIMARY, "wordbreaker",
+ {10, -1}, {3}},
+ {"Channel, another channel, more channels, and one last Channel",
+ "Channel", "es", UCOL_TERTIARY, "wordbreaker", {0, 54, -1}, {7, 7}},
+ /* jitterbug 1745 */
+ {"testing that \\u00e9 does not match e", "e", NULL, UCOL_TERTIARY,
+ "characterbreaker", {1, 17, 30, -1}, {1, 1, 1}},
+ {"testing that string ab\\u00e9cd does not match e", "e", NULL,
+ UCOL_TERTIARY, "characterbreaker", {1, 28, 41, -1}, {1, 1, 1}},
+ {"\\u00c9", "e", "fr", UCOL_PRIMARY, "characterbreaker", {0, -1}, {1}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData STRENGTHCANONICAL[] = {
+ /*012345678901234567890123456789012345678901234567890123456789 */
+ {"The quick brown fox jumps over the lazy foxes", "fox", "en",
+ UCOL_PRIMARY, NULL, {16, 40, -1}, {3, 3}},
+ {"The quick brown fox jumps over the lazy foxes", "fox", "en",
+ UCOL_PRIMARY, "wordbreaker", {16, -1}, {3}},
+ {"blackbirds Pat p\\u00E9ch\\u00E9 p\\u00EAche p\\u00E9cher p\\u00EAcher Tod T\\u00F6ne black Tofu blackbirds Ton PAT toehold blackbird black-bird pat toe big Toe",
+ "peche", "fr", UCOL_PRIMARY, NULL, {15, 21, 27, 34, -1}, {5, 5, 5, 5}},
+ {"This is a toe T\\u00F6ne", "toe", "de", UCOL_PRIMARY, NULL,
+ {10, 14, -1}, {3, 2}},
+ {"A channel, another CHANNEL, more Channels, and one last channel...",
+ "channel", "es", UCOL_PRIMARY, NULL, {2, 19, 33, 56, -1},
+ {7, 7, 7, 7}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData VARIABLECANONICAL[] = {
+ /*012345678901234567890123456789012345678901234567890123456789 */
+ {"blackbirds black blackbirds blackbird black-bird",
+ "blackbird", NULL, UCOL_TERTIARY, NULL, {0, 17, 28, 38, -1},
+ {9, 9, 9, 10}},
+ /* to see that it doesn't go into an infinite loop if the start of text
+ is a ignorable character */
+ {" on", "go", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"abcdefghijklmnopqrstuvwxyz", " ", NULL, UCOL_PRIMARY, NULL,
+ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, -1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
+ /* testing tightest match */
+ {" abc a bc ab c a bc ab c", "abc", NULL, UCOL_QUATERNARY,
+ NULL, {1, -1}, {3}},
+ /*012345678901234567890123456789012345678901234567890123456789 */
+ {" abc a bc ab c a bc ab c", "abc", NULL, UCOL_SECONDARY,
+ NULL, {1, 6, 13, 21, 31, -1}, {3, 4, 4, 5, 5}},
+ /* totally ignorable text */
+ {" ---------------", "abc", NULL, UCOL_SECONDARY,
+ NULL, {-1}, {0}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData OVERLAPCANONICAL[] = {
+ {"abababab", "abab", NULL, UCOL_TERTIARY, NULL, {0, 2, 4, -1},
+ {4, 4, 4}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData NONOVERLAPCANONICAL[] = {
+ {"abababab", "abab", NULL, UCOL_TERTIARY, NULL, {0, 4, -1}, {4, 4}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData COLLATORCANONICAL[] = {
+ /* english */
+ {"fox fpx", "fox", NULL, UCOL_TERTIARY, NULL, {0, -1}, {3}},
+ /* tailored */
+ {"fox fpx", "fox", NULL, UCOL_PRIMARY, NULL, {0, 4, -1}, {3, 3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData PATTERNCANONICAL[] = {
+ {"The quick brown fox jumps over the lazy foxes", "the", NULL,
+ UCOL_PRIMARY, NULL, {0, 31, -1}, {3, 3}},
+ {"The quick brown fox jumps over the lazy foxes", "fox", NULL,
+ UCOL_PRIMARY, NULL, {16, 40, -1}, {3, 3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData TEXTCANONICAL[] = {
+ {"the foxy brown fox", "fox", NULL, UCOL_TERTIARY, NULL, {4, 15, -1},
+ {3, 3}},
+ {"the quick brown fox", "fox", NULL, UCOL_TERTIARY, NULL, {16, -1},
+ {3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData COMPOSITEBOUNDARIESCANONICAL[] = {
+ {"\\u00C0", "A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"A\\u00C0C", "A", NULL, UCOL_TERTIARY, NULL, {0, 1, -1}, {1, 1}},
+ {"\\u00C0A", "A", NULL, UCOL_TERTIARY, NULL, {0, 1, -1}, {1, 1}},
+ {"B\\u00C0", "A", NULL, UCOL_TERTIARY, NULL, {1, -1}, {1}},
+ {"\\u00C0B", "A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u00C0", "\\u0300", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u0300\\u00C0", "\\u0300", NULL, UCOL_TERTIARY, NULL, {0, 1, -1},
+ {1, 1}},
+ /* \\u0300 blocked by \\u0300 */
+ {"\\u00C0\\u0300", "\\u0300", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ /* A + 030A + 0301 */
+ {"\\u01FA", "\\u01FA", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u01FA", "\\u030A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u01FA", "A\\u030A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u01FA", "\\u030AA", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "\\u0301", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ /* blocked accent */
+ {"\\u01FA", "A\\u0301", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "\\u0301A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"\\u01FA", "\\u030A\\u0301", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"A\\u01FA", "A\\u030A", NULL, UCOL_TERTIARY, NULL, {1, -1}, {1}},
+ {"\\u01FAA", "\\u0301A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"\\u0F73", "\\u0F73", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u0F73", "\\u0F71", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u0F73", "\\u0F72", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"\\u0F73", "\\u0F71\\u0F72", NULL, UCOL_TERTIARY, NULL, {0, -1}, {1}},
+ {"A\\u0F73", "A\\u0F71", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"\\u0F73A", "\\u0F72A", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"\\u01FA A\\u0301\\u030A A\\u030A\\u0301 A\\u030A \\u01FA", "A\\u030A",
+ NULL, UCOL_TERTIARY, NULL, {0, 6, 10, 13, -1}, {1, 3, 2, 1}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData MATCHCANONICAL[] = {
+ {"a busy bee is a very busy beeee", "bee", NULL, UCOL_TERTIARY, NULL,
+ {7, 26, -1}, {3, 3}},
+ /*012345678901234567890123456789012345678901234567890 */
+ {"a busy bee is a very busy beeee with no bee life", "bee", NULL,
+ UCOL_TERTIARY, NULL, {7, 26, 40, -1}, {3, 3, 3}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData SUPPLEMENTARYCANONICAL[] = {
+ /*012345678901234567890123456789012345678901234567890012345678901234567890123456789012345678901234567890012345678901234567890123456789 */
+ {"abc \\uD800\\uDC00 \\uD800\\uDC01 \\uD801\\uDC00 \\uD800\\uDC00abc abc\\uD800\\uDC00 \\uD800\\uD800\\uDC00 \\uD800\\uDC00\\uDC00",
+ "\\uD800\\uDC00", NULL, UCOL_TERTIARY, NULL, {4, 13, 22, 26, 29, -1},
+ {2, 2, 2, 2, 2}},
+ {"and\\uD834\\uDDB9this sentence", "\\uD834\\uDDB9", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {2}},
+ {"and \\uD834\\uDDB9 this sentence", " \\uD834\\uDDB9 ", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {"and-\\uD834\\uDDB9-this sentence", "-\\uD834\\uDDB9-", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {"and,\\uD834\\uDDB9,this sentence", ",\\uD834\\uDDB9,", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {"and?\\uD834\\uDDB9?this sentence", "?\\uD834\\uDDB9?", NULL,
+ UCOL_TERTIARY, NULL, {3, -1}, {4}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData CONTRACTIONCANONICAL[] = {
+ /* common discontiguous */
+ {"A\\u0300\\u0315", "\\u0300", NULL, UCOL_TERTIARY, NULL, {1, -1}, {2}},
+ {"A\\u0300\\u0315", "\\u0300\\u0315", NULL, UCOL_TERTIARY, NULL, {1, -1},
+ {2}},
+ /* contraction prefix */
+ {"AB\\u0315C", "A", NULL, UCOL_TERTIARY, NULL, {-1}, {0}},
+ {"AB\\u0315C", "AB", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {"AB\\u0315C", "\\u0315", NULL, UCOL_TERTIARY, NULL, {2, -1}, {1}},
+ /* discontiguous problem here for backwards iteration.
+ forwards gives 0, 4 but backwards give 1, 3 */
+ /* {"X\\u0300\\u0319\\u0315", "\\u0319", NULL, UCOL_TERTIARY, NULL, {0, -1},
+ {4}}, */
+
+ /* ends not with a contraction character */
+ {"X\\u0315\\u0300D", "\\u0300\\u0315", NULL, UCOL_TERTIARY, NULL, {-1},
+ {0}},
+ {"X\\u0315\\u0300D", "X\\u0300\\u0315", NULL, UCOL_TERTIARY, NULL,
+ {0, -1}, {3}},
+ {"X\\u0300\\u031A\\u0315D", "X\\u0300", NULL, UCOL_TERTIARY, NULL,
+ {0, -1}, {4}},
+ /* blocked discontiguous */
+ {"X\\u0300\\u031A\\u0315D", "\\u031A\\u0315D", NULL, UCOL_TERTIARY, NULL,
+ {1, -1}, {4}},
+ {"ab", "z", NULL, UCOL_TERTIARY, NULL, {0, -1}, {2}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+static const SearchData DIACTRICMATCH[] = {
+ {"\\u03BA\\u03B1\\u03B9\\u0300\\u0020\\u03BA\\u03B1\\u1F76", "\\u03BA\\u03B1\\u03B9", NULL, UCOL_PRIMARY, NULL, {0, 5,-1}, {4, 3}},
+ {"\\u0061\\u0061\\u00E1", "\\u0061\\u00E1", NULL, UCOL_SECONDARY, NULL, {1, -1}, {2}},
+ {"\\u0020\\u00C2\\u0303\\u0020\\u0041\\u0061\\u1EAA\\u0041\\u0302\\u0303\\u00C2\\u0303\\u1EAB\\u0061\\u0302\\u0303\\u00E2\\u0303\\uD806\\uDC01\\u0300\\u0020",
+ "\\u00C2\\u0303", "LDE_AN_CX_EX_FX_HX_NX_S1", UCOL_PRIMARY, NULL, {1, 4, 5, 6, 7, 10, 12, 13, 16,-1}, {2, 1, 1, 1, 3, 2, 1, 3, 2}},
+ {NULL, NULL, NULL, UCOL_TERTIARY, NULL, {-1}, {0}}
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/usrchtst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/usrchtst.c
new file mode 100644
index 00000000000..80a9f9247da
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/usrchtst.c
@@ -0,0 +1,2249 @@
+/********************************************************************
+ * Copyright (c) 2001-2007 International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************
+ * File usrchtst.c
+ * Modification History:
+ * Name Date Description
+ * synwee July 19 2001 creation
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/usearch.h"
+#include "unicode/ustring.h"
+#include "ccolltst.h"
+#include "cmemory.h"
+#include <stdio.h>
+#include "usrchdat.c"
+#include "unicode/ubrk.h"
+
+static UBool TOCLOSE_ = TRUE;
+static UCollator *EN_US_;
+static UCollator *FR_FR_;
+static UCollator *DE_;
+static UCollator *ES_;
+
+/**
+ * CHECK_BREAK(char *brk)
+ * Test if a break iterator is passed in AND break iteration is disabled.
+ * Skip the test if so.
+ * CHECK_BREAK_BOOL(char *brk)
+ * Same as above, but returns 'TRUE' as a passing result
+ */
+
+#if !UCONFIG_NO_BREAK_ITERATION
+static UBreakIterator *EN_WORDBREAKER_;
+static UBreakIterator *EN_CHARACTERBREAKER_;
+#define CHECK_BREAK(x)
+#define CHECK_BREAK_BOOL(x)
+#else
+#define CHECK_BREAK(x) if(x) { log_info("Skipping test on %s:%d because UCONFIG_NO_BREAK_ITERATION is on\n", __FILE__, __LINE__); return; }
+#define CHECK_BREAK_BOOL(x) if(x) { log_info("Skipping test on %s:%d because UCONFIG_NO_BREAK_ITERATION is on\n", __FILE__, __LINE__); return TRUE; }
+#endif
+
+/**
+* Opening all static collators and break iterators
+*/
+static void open(void)
+{
+ if (TOCLOSE_) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar rules[1024];
+ int32_t rulelength = 0;
+
+ EN_US_ = ucol_open("en_US", &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator\n");
+ return;
+ }
+ FR_FR_ = ucol_open("fr_FR", &status);
+ DE_ = ucol_open("de_DE", &status);
+ ES_ = ucol_open("es_ES", &status);
+
+ u_strcpy(rules, ucol_getRules(DE_, &rulelength));
+ u_unescape(EXTRACOLLATIONRULE, rules + rulelength, 1024 - rulelength);
+
+ ucol_close(DE_);
+
+ DE_ = ucol_openRules(rules, u_strlen(rules), UCOL_ON, UCOL_TERTIARY,
+ (UParseError *)NULL, &status);
+ u_strcpy(rules, ucol_getRules(ES_, &rulelength));
+ u_unescape(EXTRACOLLATIONRULE, rules + rulelength, 1024 - rulelength);
+
+ ucol_close(ES_);
+ ES_ = ucol_openRules(rules, u_strlen(rules), UCOL_ON, UCOL_TERTIARY,
+ NULL, &status);
+#if !UCONFIG_NO_BREAK_ITERATION
+ EN_WORDBREAKER_ = ubrk_open(UBRK_WORD, "en_US", NULL, 0, &status);
+ EN_CHARACTERBREAKER_ = ubrk_open(UBRK_CHARACTER, "en_US", NULL, 0,
+ &status);
+#endif
+ TOCLOSE_ = TRUE;
+ }
+}
+
+/**
+* Start opening all static collators and break iterators
+*/
+static void TestStart(void)
+{
+ open();
+ TOCLOSE_ = FALSE;
+}
+
+/**
+* Closing all static collators and break iterators
+*/
+static void close(void)
+{
+ if (TOCLOSE_) {
+ ucol_close(EN_US_);
+ ucol_close(FR_FR_);
+ ucol_close(DE_);
+ ucol_close(ES_);
+#if !UCONFIG_NO_BREAK_ITERATION
+ ubrk_close(EN_WORDBREAKER_);
+ ubrk_close(EN_CHARACTERBREAKER_);
+#endif
+ }
+ TOCLOSE_ = FALSE;
+}
+
+/**
+* End closing all static collators and break iterators
+*/
+static void TestEnd(void)
+{
+ TOCLOSE_ = TRUE;
+ close();
+ TOCLOSE_ = TRUE;
+}
+
+/**
+* output UChar strings for printing.
+*/
+static char *toCharString(const UChar* unichars)
+{
+ static char result[1024];
+ char *temp = result;
+ int count = 0;
+ int length = u_strlen(unichars);
+
+ for (; count < length; count ++) {
+ UChar ch = unichars[count];
+ if (ch >= 0x20 && ch <= 0x7e) {
+ *temp ++ = (char)ch;
+ }
+ else {
+ sprintf(temp, "\\u%04x", ch);
+ temp += 6; /* \uxxxx */
+ }
+ }
+ *temp = 0;
+
+ return result;
+}
+
+/**
+* Getting the collator
+*/
+static UCollator *getCollator(const char *collator)
+{
+ if (collator == NULL) {
+ return EN_US_;
+ }
+ if (strcmp(collator, "fr") == 0) {
+ return FR_FR_;
+ }
+ else if (strcmp(collator, "de") == 0) {
+ return DE_;
+ }
+ else if (strcmp(collator, "es") == 0) {
+ return ES_;
+ }
+ else {
+ return EN_US_;
+ }
+}
+
+/**
+* Getting the breakiterator
+*/
+static UBreakIterator *getBreakIterator(const char *breaker)
+{
+ if (breaker == NULL) {
+ return NULL;
+ }
+#if !UCONFIG_NO_BREAK_ITERATION
+ if (strcmp(breaker, "wordbreaker") == 0) {
+ return EN_WORDBREAKER_;
+ }
+ else {
+ return EN_CHARACTERBREAKER_;
+ }
+#else
+ return NULL;
+#endif
+}
+
+static void TestOpenClose(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UStringSearch *result;
+ const UChar pattern[] = {0x61, 0x62, 0x63, 0x64, 0x65, 0x66};
+ const UChar text[] = {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67};
+#if !UCONFIG_NO_BREAK_ITERATION
+ UBreakIterator *breakiter = ubrk_open(UBRK_WORD, "en_US",
+ text, 6, &status);
+#endif
+ /* testing null arguments */
+ result = usearch_open(NULL, 0, NULL, 0, NULL, NULL, &status);
+ if (U_SUCCESS(status) || result != NULL) {
+ log_err("Error: NULL arguments should produce an error and a NULL result\n");
+ }
+ status = U_ZERO_ERROR;
+ result = usearch_openFromCollator(NULL, 0, NULL, 0, NULL, NULL, &status);
+ if (U_SUCCESS(status) || result != NULL) {
+ log_err("Error: NULL arguments should produce an error and a NULL result\n");
+ }
+
+ status = U_ZERO_ERROR;
+ result = usearch_open(pattern, 3, NULL, 0, NULL, NULL, &status);
+ if (U_SUCCESS(status) || result != NULL) {
+ log_err("Error: NULL arguments should produce an error and a NULL result\n");
+ }
+ status = U_ZERO_ERROR;
+ result = usearch_openFromCollator(pattern, 3, NULL, 0, NULL, NULL,
+ &status);
+ if (U_SUCCESS(status) || result != NULL) {
+ log_err("Error: NULL arguments should produce an error and a NULL result\n");
+ }
+
+ status = U_ZERO_ERROR;
+ result = usearch_open(pattern, 3, text, 6, NULL, NULL, &status);
+ if (U_SUCCESS(status) || result != NULL) {
+ log_err("Error: NULL arguments should produce an error and a NULL result\n");
+ }
+ status = U_ZERO_ERROR;
+ result = usearch_openFromCollator(pattern, 3, text, 6, NULL, NULL,
+ &status);
+ if (U_SUCCESS(status) || result != NULL) {
+ log_err("Error: NULL arguments should produce an error and a NULL result\n");
+ }
+
+ status = U_ZERO_ERROR;
+ result = usearch_open(pattern, 3, text, 6, "en_US", NULL, &status);
+ if (U_FAILURE(status) || result == NULL) {
+ log_err("Error: NULL break iterator is valid for opening search\n");
+ }
+ else {
+ usearch_close(result);
+ }
+ open();
+ status = U_ZERO_ERROR;
+ result = usearch_openFromCollator(pattern, 3, text, 6, EN_US_, NULL,
+ &status);
+ if (U_FAILURE(status) || result == NULL) {
+ log_err("Error: NULL break iterator is valid for opening search\n");
+ }
+ else {
+ usearch_close(result);
+ }
+
+
+ status = U_ZERO_ERROR;
+#if !UCONFIG_NO_BREAK_ITERATION
+
+ result = usearch_open(pattern, 3, text, 6, "en_US", breakiter, &status);
+ if (U_FAILURE(status) || result == NULL) {
+ log_err("Error: Break iterator is valid for opening search\n");
+ }
+ else {
+ usearch_close(result);
+ }
+ status = U_ZERO_ERROR;
+ result = usearch_openFromCollator(pattern, 3, text, 6, EN_US_, breakiter,
+ &status);
+ if (U_FAILURE(status) || result == NULL) {
+ log_err("Error: Break iterator is valid for opening search\n");
+ }
+ else {
+ usearch_close(result);
+ }
+ ubrk_close(breakiter);
+#endif
+ close();
+}
+
+static void TestInitialization(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[512];
+ const UChar text[] = {0x61, 0x62, 0x63, 0x64, 0x65, 0x66};
+ int32_t i = 0;
+ UStringSearch *result;
+
+ /* simple test on the pattern ce construction */
+ pattern[0] = 0x41;
+ pattern[1] = 0x42;
+ open();
+ result = usearch_openFromCollator(pattern, 2, text, 3, EN_US_, NULL,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening search %s\n", u_errorName(status));
+ }
+ usearch_close(result);
+
+ /* testing if an extremely large pattern will fail the initialization */
+ for(i = 0; i < 512; i++) {
+ pattern[i] = 0x41;
+ }
+ /*uprv_memset(pattern, 0x41, 512);*/
+ result = usearch_openFromCollator(pattern, 512, text, 3, EN_US_, NULL,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening search %s\n", u_errorName(status));
+ }
+ usearch_close(result);
+ close();
+}
+
+static UBool assertEqualWithUStringSearch( UStringSearch *strsrch,
+ const SearchData search)
+{
+ int count = 0;
+ int matchlimit = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t matchindex = search.offset[count];
+ int32_t textlength;
+ UChar matchtext[128];
+
+ if (usearch_getMatchedStart(strsrch) != USEARCH_DONE ||
+ usearch_getMatchedLength(strsrch) != 0) {
+ log_err("Error with the initialization of match start and length\n");
+ }
+ /* start of following matches */
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ uint32_t matchlength = search.size[count];
+ usearch_next(strsrch, &status);
+ if (matchindex != usearch_getMatchedStart(strsrch) ||
+ matchlength != (uint32_t)usearch_getMatchedLength(strsrch)) {
+ char *str = toCharString(usearch_getText(strsrch, &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error following match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return FALSE;
+ }
+ count ++;
+
+ if (usearch_getMatchedText(strsrch, matchtext, 128, &status) !=
+ (int32_t) matchlength || U_FAILURE(status) ||
+ memcmp(matchtext,
+ usearch_getText(strsrch, &textlength) + matchindex,
+ matchlength * sizeof(UChar)) != 0) {
+ log_err("Error getting following matched text\n");
+ }
+
+ matchindex = search.offset[count];
+ }
+ usearch_next(strsrch, &status);
+ if (usearch_getMatchedStart(strsrch) != USEARCH_DONE ||
+ usearch_getMatchedLength(strsrch) != 0) {
+ char *str = toCharString(usearch_getText(strsrch, &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error following match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return FALSE;
+ }
+ /* start of preceding matches */
+ count = count == 0 ? 0 : count - 1;
+ matchlimit = count;
+ matchindex = search.offset[count];
+
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ uint32_t matchlength = search.size[count];
+ usearch_previous(strsrch, &status);
+ if (matchindex != usearch_getMatchedStart(strsrch) ||
+ matchlength != (uint32_t)usearch_getMatchedLength(strsrch)) {
+ char *str = toCharString(usearch_getText(strsrch, &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error preceding match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return FALSE;
+ }
+
+ if (usearch_getMatchedText(strsrch, matchtext, 128, &status) !=
+ (int32_t) matchlength || U_FAILURE(status) ||
+ memcmp(matchtext,
+ usearch_getText(strsrch, &textlength) + matchindex,
+ matchlength * sizeof(UChar)) != 0) {
+ log_err("Error getting preceding matched text\n");
+ }
+
+ matchindex = count > 0 ? search.offset[count - 1] : -1;
+ count --;
+ }
+ usearch_previous(strsrch, &status);
+ if (usearch_getMatchedStart(strsrch) != USEARCH_DONE ||
+ usearch_getMatchedLength(strsrch) != 0) {
+ char *str = toCharString(usearch_getText(strsrch, &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error preceding match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static UBool assertEqual(const SearchData search)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[32];
+ UChar text[128];
+ UCollator *collator = getCollator(search.collator);
+ UBreakIterator *breaker = getBreakIterator(search.breaker);
+ UStringSearch *strsrch;
+
+ CHECK_BREAK_BOOL(search.breaker);
+
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 32);
+ ucol_setStrength(collator, search.strength);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator,
+ breaker, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ return FALSE;
+ }
+
+ if (!assertEqualWithUStringSearch(strsrch, search)) {
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ return FALSE;
+ }
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ return TRUE;
+}
+
+static UBool assertCanonicalEqual(const SearchData search)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[32];
+ UChar text[128];
+ UCollator *collator = getCollator(search.collator);
+ UBreakIterator *breaker = getBreakIterator(search.breaker);
+ UStringSearch *strsrch;
+
+ CHECK_BREAK_BOOL(search.breaker);
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 32);
+ ucol_setStrength(collator, search.strength);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator,
+ breaker, &status);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ return FALSE;
+ }
+
+ if (!assertEqualWithUStringSearch(strsrch, search)) {
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ return FALSE;
+ }
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ return TRUE;
+}
+
+static UBool assertEqualWithAttribute(const SearchData search,
+ USearchAttributeValue canonical,
+ USearchAttributeValue overlap)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[32];
+ UChar text[128];
+ UCollator *collator = getCollator(search.collator);
+ UBreakIterator *breaker = getBreakIterator(search.breaker);
+ UStringSearch *strsrch;
+
+ CHECK_BREAK_BOOL(search.breaker);
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 32);
+ ucol_setStrength(collator, search.strength);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator,
+ breaker, &status);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, canonical,
+ &status);
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, overlap, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ return FALSE;
+ }
+
+ if (!assertEqualWithUStringSearch(strsrch, search)) {
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ return FALSE;
+ }
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ return TRUE;
+}
+
+static void TestBasic(void)
+{
+ int count = 0;
+ open();
+ while (BASIC[count].text != NULL) {
+ if (!assertEqual(BASIC[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestNormExact(void)
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ open();
+ ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting collation normalization %s\n",
+ u_errorName(status));
+ }
+ while (BASIC[count].text != NULL) {
+ if (!assertEqual(BASIC[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ count = 0;
+ while (NORMEXACT[count].text != NULL) {
+ if (!assertEqual(NORMEXACT[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status);
+ count = 0;
+ while (NONNORMEXACT[count].text != NULL) {
+ if (!assertEqual(NONNORMEXACT[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestStrength(void)
+{
+ int count = 0;
+ open();
+ while (STRENGTH[count].text != NULL) {
+ if (!assertEqual(STRENGTH[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestBreakIterator(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UStringSearch *strsrch;
+ UChar text[128];
+ UChar pattern[32];
+ int count = 0;
+
+ CHECK_BREAK("x");
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ open();
+ if (usearch_getBreakIterator(NULL) != NULL) {
+ log_err("Expected NULL breakiterator from NULL string search\n");
+ }
+ u_unescape(BREAKITERATOREXACT[0].text, text, 128);
+ u_unescape(BREAKITERATOREXACT[0].pattern, pattern, 32);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_, NULL,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ goto ENDTESTBREAKITERATOR;
+ }
+
+ usearch_setBreakIterator(strsrch, NULL, &status);
+ if (U_FAILURE(status) || usearch_getBreakIterator(strsrch) != NULL) {
+ log_err("Error usearch_getBreakIterator returned wrong object");
+ goto ENDTESTBREAKITERATOR;
+ }
+
+ usearch_setBreakIterator(strsrch, EN_CHARACTERBREAKER_, &status);
+ if (U_FAILURE(status) ||
+ usearch_getBreakIterator(strsrch) != EN_CHARACTERBREAKER_) {
+ log_err("Error usearch_getBreakIterator returned wrong object");
+ goto ENDTESTBREAKITERATOR;
+ }
+
+ usearch_setBreakIterator(strsrch, EN_WORDBREAKER_, &status);
+ if (U_FAILURE(status) ||
+ usearch_getBreakIterator(strsrch) != EN_WORDBREAKER_) {
+ log_err("Error usearch_getBreakIterator returned wrong object");
+ goto ENDTESTBREAKITERATOR;
+ }
+
+ usearch_close(strsrch);
+
+ count = 0;
+ while (count < 4) {
+ /* 0-3 test are fixed */
+ const SearchData *search = &(BREAKITERATOREXACT[count]);
+ UCollator *collator = getCollator(search->collator);
+ UBreakIterator *breaker = getBreakIterator(search->breaker);
+
+ u_unescape(search->text, text, 128);
+ u_unescape(search->pattern, pattern, 32);
+ ucol_setStrength(collator, search->strength);
+
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator,
+ breaker, &status);
+ if (U_FAILURE(status) ||
+ usearch_getBreakIterator(strsrch) != breaker) {
+ log_err("Error setting break iterator\n");
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ }
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ goto ENDTESTBREAKITERATOR;
+ }
+ search = &(BREAKITERATOREXACT[count + 1]);
+ breaker = getBreakIterator(search->breaker);
+ usearch_setBreakIterator(strsrch, breaker, &status);
+ if (U_FAILURE(status) ||
+ usearch_getBreakIterator(strsrch) != breaker) {
+ log_err("Error setting break iterator\n");
+ usearch_close(strsrch);
+ goto ENDTESTBREAKITERATOR;
+ }
+ usearch_reset(strsrch);
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ log_err("Error at test number %d\n", count);
+ goto ENDTESTBREAKITERATOR;
+ }
+ usearch_close(strsrch);
+ count += 2;
+ }
+ count = 0;
+ while (BREAKITERATOREXACT[count].text != NULL) {
+ if (!assertEqual(BREAKITERATOREXACT[count])) {
+ log_err("Error at test number %d\n", count);
+ goto ENDTESTBREAKITERATOR;
+ }
+ count ++;
+ }
+
+ENDTESTBREAKITERATOR:
+ close();
+#endif
+}
+
+static void TestVariable(void)
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ open();
+ ucol_setAttribute(EN_US_, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting collation alternate attribute %s\n",
+ u_errorName(status));
+ }
+ while (VARIABLE[count].text != NULL) {
+ log_verbose("variable %d\n", count);
+ if (!assertEqual(VARIABLE[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ ucol_setAttribute(EN_US_, UCOL_ALTERNATE_HANDLING,
+ UCOL_NON_IGNORABLE, &status);
+ close();
+}
+
+static void TestOverlap(void)
+{
+ int count = 0;
+ open();
+ while (OVERLAP[count].text != NULL) {
+ if (!assertEqualWithAttribute(OVERLAP[count], USEARCH_OFF,
+ USEARCH_ON)) {
+ log_err("Error at overlap test number %d\n", count);
+ }
+ count ++;
+ }
+ count = 0;
+ while (NONOVERLAP[count].text != NULL) {
+ if (!assertEqual(NONOVERLAP[count])) {
+ log_err("Error at non overlap test number %d\n", count);
+ }
+ count ++;
+ }
+
+ count = 0;
+ while (count < 1) {
+ UChar pattern[32];
+ UChar text[128];
+ const SearchData *search = &(OVERLAP[count]);
+ UCollator *collator = getCollator(search->collator);
+ UStringSearch *strsrch;
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_unescape(search->text, text, 128);
+ u_unescape(search->pattern, pattern, 32);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator,
+ NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening searcher\n");
+ return;
+ }
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_ON) {
+ log_err("Error setting overlap option\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ usearch_close(strsrch);
+ return;
+ }
+ search = &(NONOVERLAP[count]);
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_OFF, &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_OFF) {
+ log_err("Error setting overlap option\n");
+ }
+ usearch_reset(strsrch);
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ usearch_close(strsrch);
+ log_err("Error at test number %d\n", count);
+ }
+
+ count ++;
+ usearch_close(strsrch);
+ }
+ close();
+}
+
+static void TestCollator(void)
+{
+ /* test collator that thinks "o" and "p" are the same thing */
+ UChar rules[32];
+ UCollator *tailored = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[32];
+ UChar text[128];
+ UStringSearch *strsrch;
+
+ text[0] = 0x41;
+ text[1] = 0x42;
+ text[2] = 0x43;
+ text[3] = 0x44;
+ text[4] = 0x45;
+ pattern[0] = 0x62;
+ pattern[1] = 0x63;
+ strsrch = usearch_open(pattern, 2, text, 5, "en_US", NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening searcher\n");
+ return;
+ }
+ tailored = usearch_getCollator(strsrch);
+ if (usearch_next(strsrch, &status) != -1) {
+ log_err("Error: Found case insensitive match, when we shouldn't\n");
+ }
+ ucol_setStrength(tailored, UCOL_PRIMARY);
+ usearch_reset(strsrch);
+ if (usearch_next(strsrch, &status) != 1) {
+ log_err("Error: Found case insensitive match not found\n");
+ }
+ usearch_close(strsrch);
+
+ open();
+
+ if (usearch_getCollator(NULL) != NULL) {
+ log_err("Expected NULL collator from NULL string search\n");
+ }
+ u_unescape(COLLATOR[0].text, text, 128);
+ u_unescape(COLLATOR[0].pattern, pattern, 32);
+
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, COLLATOR[0])) {
+ goto ENDTESTCOLLATOR;
+ }
+
+ u_unescape(TESTCOLLATORRULE, rules, 32);
+ tailored = ucol_openRules(rules, -1, UCOL_ON, COLLATOR[1].strength,
+ NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening rule based collator %s\n", u_errorName(status));
+ }
+
+ usearch_setCollator(strsrch, tailored, &status);
+ if (U_FAILURE(status) || usearch_getCollator(strsrch) != tailored) {
+ log_err("Error setting rule based collator\n");
+ }
+ usearch_reset(strsrch);
+ if (!assertEqualWithUStringSearch(strsrch, COLLATOR[1])) {
+ goto ENDTESTCOLLATOR;
+ }
+
+ usearch_setCollator(strsrch, EN_US_, &status);
+ usearch_reset(strsrch);
+ if (U_FAILURE(status) || usearch_getCollator(strsrch) != EN_US_) {
+ log_err("Error setting rule based collator\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, COLLATOR[0])) {
+ goto ENDTESTCOLLATOR;
+ }
+
+ENDTESTCOLLATOR:
+ usearch_close(strsrch);
+ if (tailored != NULL) {
+ ucol_close(tailored);
+ }
+ close();
+}
+
+static void TestPattern(void)
+{
+ UStringSearch *strsrch;
+ UChar pattern[32];
+ UChar bigpattern[512];
+ UChar text[128];
+ const UChar *temp;
+ int32_t templength;
+ UErrorCode status = U_ZERO_ERROR;
+
+ open();
+ if (usearch_getPattern(NULL, &templength) != NULL) {
+ log_err("Error NULL string search expected returning NULL pattern\n");
+ }
+ usearch_setPattern(NULL, pattern, 3, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error expected setting pattern in NULL strings search\n");
+ }
+ status = U_ZERO_ERROR;
+ u_unescape(PATTERN[0].text, text, 128);
+ u_unescape(PATTERN[0].pattern, pattern, 32);
+
+ ucol_setStrength(EN_US_, PATTERN[0].strength);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening searcher\n");
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+ usearch_setPattern(strsrch, NULL, 3, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error expected setting NULL pattern in strings search\n");
+ }
+ status = U_ZERO_ERROR;
+ usearch_setPattern(strsrch, pattern, 0, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error expected setting pattern with length 0 in strings search\n");
+ }
+ status = U_ZERO_ERROR;
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ goto ENDTESTPATTERN;
+ }
+ temp = usearch_getPattern(strsrch, &templength);
+ if (u_strcmp(pattern, temp) != 0) {
+ log_err("Error setting pattern\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, PATTERN[0])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(PATTERN[1].pattern, pattern, 32);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ temp = usearch_getPattern(strsrch, &templength);
+ if (u_strcmp(pattern, temp) != 0) {
+ log_err("Error setting pattern\n");
+ goto ENDTESTPATTERN;
+ }
+ usearch_reset(strsrch);
+ if (U_FAILURE(status)) {
+ log_err("Error setting pattern %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, PATTERN[1])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(PATTERN[0].pattern, pattern, 32);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ temp = usearch_getPattern(strsrch, &templength);
+ if (u_strcmp(pattern, temp) != 0) {
+ log_err("Error setting pattern\n");
+ goto ENDTESTPATTERN;
+ }
+ usearch_reset(strsrch);
+ if (U_FAILURE(status)) {
+ log_err("Error setting pattern %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, PATTERN[0])) {
+ goto ENDTESTPATTERN;
+ }
+ /* enormous pattern size to see if this crashes */
+ for (templength = 0; templength != 512; templength ++) {
+ bigpattern[templength] = 0x61;
+ }
+ bigpattern[511] = 0;
+ usearch_setPattern(strsrch, bigpattern, -1, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting pattern with size 512, %s \n",
+ u_errorName(status));
+ }
+ENDTESTPATTERN:
+ ucol_setStrength(EN_US_, UCOL_TERTIARY);
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ close();
+}
+
+static void TestText(void)
+{
+ UStringSearch *strsrch;
+ UChar pattern[32];
+ UChar text[128];
+ const UChar *temp;
+ int32_t templength;
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_unescape(TEXT[0].text, text, 128);
+ u_unescape(TEXT[0].pattern, pattern, 32);
+
+ open();
+
+ if (usearch_getText(NULL, &templength) != NULL) {
+ log_err("Error NULL string search should return NULL text\n");
+ }
+
+ usearch_setText(NULL, text, 10, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error NULL string search should have an error when setting text\n");
+ }
+
+ status = U_ZERO_ERROR;
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ goto ENDTESTPATTERN;
+ }
+ temp = usearch_getText(strsrch, &templength);
+ if (u_strcmp(text, temp) != 0) {
+ log_err("Error setting text\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, TEXT[0])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(TEXT[1].text, text, 32);
+ usearch_setText(strsrch, text, -1, &status);
+ temp = usearch_getText(strsrch, &templength);
+ if (u_strcmp(text, temp) != 0) {
+ log_err("Error setting text\n");
+ goto ENDTESTPATTERN;
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error setting text %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, TEXT[1])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(TEXT[0].text, text, 32);
+ usearch_setText(strsrch, text, -1, &status);
+ temp = usearch_getText(strsrch, &templength);
+ if (u_strcmp(text, temp) != 0) {
+ log_err("Error setting text\n");
+ goto ENDTESTPATTERN;
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error setting pattern %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, TEXT[0])) {
+ goto ENDTESTPATTERN;
+ }
+ENDTESTPATTERN:
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ close();
+}
+
+static void TestCompositeBoundaries(void)
+{
+ int count = 0;
+ open();
+ while (COMPOSITEBOUNDARIES[count].text != NULL) {
+ log_verbose("composite %d\n", count);
+ if (!assertEqual(COMPOSITEBOUNDARIES[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestGetSetOffset(void)
+{
+ int index = 0;
+ UChar pattern[32];
+ UChar text[128];
+ UErrorCode status = U_ZERO_ERROR;
+ UStringSearch *strsrch;
+ memset(pattern, 0, 32*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ open();
+ if (usearch_getOffset(NULL) != USEARCH_DONE) {
+ log_err("usearch_getOffset(NULL) expected USEARCH_DONE\n");
+ }
+ strsrch = usearch_openFromCollator(pattern, 16, text, 32, EN_US_, NULL,
+ &status);
+ /* testing out of bounds error */
+ usearch_setOffset(strsrch, -1, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error expecting set offset error\n");
+ }
+ usearch_setOffset(strsrch, 128, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error expecting set offset error\n");
+ }
+ while (BASIC[index].text != NULL) {
+ int count = 0;
+ SearchData search = BASIC[index ++];
+ int32_t matchindex = search.offset[count];
+ int32_t textlength;
+
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 32);
+ status = U_ZERO_ERROR;
+ usearch_setText(strsrch, text, -1, &status);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ ucol_setStrength(usearch_getCollator(strsrch), search.strength);
+ usearch_reset(strsrch);
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ uint32_t matchlength = search.size[count];
+ usearch_next(strsrch, &status);
+ if (matchindex != usearch_getMatchedStart(strsrch) ||
+ matchlength != (uint32_t)usearch_getMatchedLength(strsrch)) {
+ char *str = toCharString(usearch_getText(strsrch,
+ &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return;
+ }
+ usearch_setOffset(strsrch, matchindex + matchlength, &status);
+ usearch_previous(strsrch, &status);
+ if (matchindex != usearch_getMatchedStart(strsrch) ||
+ matchlength != (uint32_t)usearch_getMatchedLength(strsrch)) {
+ char *str = toCharString(usearch_getText(strsrch,
+ &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return;
+ }
+ usearch_setOffset(strsrch, matchindex + matchlength, &status);
+ matchindex = search.offset[count + 1] == -1 ? -1 :
+ search.offset[count + 2];
+ if (search.offset[count + 1] != -1) {
+ usearch_setOffset(strsrch, search.offset[count + 1] + 1,
+ &status);
+ if (usearch_getOffset(strsrch) != search.offset[count + 1] + 1) {
+ log_err("Error setting offset\n");
+ return;
+ }
+ }
+
+ count += 2;
+ }
+ usearch_next(strsrch, &status);
+ if (usearch_getMatchedStart(strsrch) != USEARCH_DONE) {
+ char *str = toCharString(usearch_getText(strsrch, &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return;
+ }
+ }
+ ucol_setStrength(usearch_getCollator(strsrch), UCOL_TERTIARY);
+ usearch_close(strsrch);
+ close();
+}
+
+static void TestGetSetAttribute(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[32];
+ UChar text[128];
+ UStringSearch *strsrch;
+
+ memset(pattern, 0, 32*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ open();
+ if (usearch_getAttribute(NULL, USEARCH_OVERLAP) != USEARCH_DEFAULT ||
+ usearch_getAttribute(NULL, USEARCH_CANONICAL_MATCH) !=
+ USEARCH_DEFAULT) {
+ log_err(
+ "Attributes for NULL string search should be USEARCH_DEFAULT\n");
+ }
+ strsrch = usearch_openFromCollator(pattern, 16, text, 32, EN_US_, NULL,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening search %s\n", u_errorName(status));
+ return;
+ }
+
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_DEFAULT, &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_OFF) {
+ log_err("Error setting overlap to the default\n");
+ }
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_ON) {
+ log_err("Error setting overlap true\n");
+ }
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_OFF, &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_OFF) {
+ log_err("Error setting overlap false\n");
+ }
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP,
+ USEARCH_ATTRIBUTE_VALUE_COUNT, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error setting overlap to illegal value\n");
+ }
+ status = U_ZERO_ERROR;
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_DEFAULT,
+ &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_CANONICAL_MATCH) !=
+ USEARCH_OFF) {
+ log_err("Error setting canonical match to the default\n");
+ }
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_CANONICAL_MATCH) !=
+ USEARCH_ON) {
+ log_err("Error setting canonical match true\n");
+ }
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_OFF,
+ &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_CANONICAL_MATCH) !=
+ USEARCH_OFF) {
+ log_err("Error setting canonical match false\n");
+ }
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH,
+ USEARCH_ATTRIBUTE_VALUE_COUNT, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error setting canonical match to illegal value\n");
+ }
+ status = U_ZERO_ERROR;
+ usearch_setAttribute(strsrch, USEARCH_ATTRIBUTE_COUNT, USEARCH_DEFAULT,
+ &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error setting illegal attribute success\n");
+ }
+
+ usearch_close(strsrch);
+ close();
+}
+
+static void TestGetMatch(void)
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar text[128];
+ UChar pattern[32];
+ SearchData search = MATCH[0];
+ int32_t matchindex = search.offset[count];
+ UStringSearch *strsrch;
+ int32_t textlength;
+ UChar matchtext[128];
+
+ open();
+
+ if (usearch_getMatchedStart(NULL) != USEARCH_DONE ||
+ usearch_getMatchedLength(NULL) != USEARCH_DONE) {
+ log_err(
+ "Expected start and length of NULL string search should be USEARCH_DONE\n");
+ }
+
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 32);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ return;
+ }
+
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ int32_t matchlength = search.size[count];
+ usearch_next(strsrch, &status);
+ if (matchindex != usearch_getMatchedStart(strsrch) ||
+ matchlength != usearch_getMatchedLength(strsrch)) {
+ char *str = toCharString(usearch_getText(strsrch, &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return;
+ }
+ count ++;
+
+ status = U_ZERO_ERROR;
+ if (usearch_getMatchedText(NULL, matchtext, 128, &status) !=
+ USEARCH_DONE || U_SUCCESS(status)){
+ log_err("Error expecting errors with NULL string search\n");
+ }
+ status = U_ZERO_ERROR;
+ if (usearch_getMatchedText(strsrch, NULL, 0, &status) !=
+ (int32_t)matchlength || U_SUCCESS(status)){
+ log_err("Error pre-flighting match length\n");
+ }
+ status = U_ZERO_ERROR;
+ if (usearch_getMatchedText(strsrch, matchtext, 0, &status) !=
+ (int32_t)matchlength || U_SUCCESS(status)){
+ log_err("Error getting match text with buffer size 0\n");
+ }
+ status = U_ZERO_ERROR;
+ if (usearch_getMatchedText(strsrch, matchtext, matchlength, &status)
+ != (int32_t)matchlength || matchtext[matchlength - 1] == 0 ||
+ U_FAILURE(status)){
+ log_err("Error getting match text with exact size\n");
+ }
+ status = U_ZERO_ERROR;
+ if (usearch_getMatchedText(strsrch, matchtext, 128, &status) !=
+ (int32_t) matchlength || U_FAILURE(status) ||
+ memcmp(matchtext,
+ usearch_getText(strsrch, &textlength) + matchindex,
+ matchlength * sizeof(UChar)) != 0 ||
+ matchtext[matchlength] != 0) {
+ log_err("Error getting matched text\n");
+ }
+
+ matchindex = search.offset[count];
+ }
+ status = U_ZERO_ERROR;
+ usearch_next(strsrch, &status);
+ if (usearch_getMatchedStart(strsrch) != USEARCH_DONE ||
+ usearch_getMatchedLength(strsrch) != 0) {
+ log_err("Error end of match not found\n");
+ }
+ status = U_ZERO_ERROR;
+ if (usearch_getMatchedText(strsrch, matchtext, 128, &status) !=
+ USEARCH_DONE) {
+ log_err("Error getting null matches\n");
+ }
+ usearch_close(strsrch);
+ close();
+}
+
+static void TestSetMatch(void)
+{
+ int count = 0;
+
+ open();
+ while (MATCH[count].text != NULL) {
+ SearchData search = MATCH[count];
+ int size = 0;
+ int index = 0;
+ UChar text[128];
+ UChar pattern[32];
+ UStringSearch *strsrch;
+ UErrorCode status = U_ZERO_ERROR;
+
+ if (usearch_first(NULL, &status) != USEARCH_DONE ||
+ usearch_last(NULL, &status) != USEARCH_DONE) {
+ log_err("Error getting the first and last match of a NULL string search\n");
+ }
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 32);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ return;
+ }
+
+ size = 0;
+ while (search.offset[size] != -1) {
+ size ++;
+ }
+
+ if (usearch_first(strsrch, &status) != search.offset[0] ||
+ U_FAILURE(status)) {
+ log_err("Error getting first match\n");
+ }
+ if (usearch_last(strsrch, &status) != search.offset[size -1] ||
+ U_FAILURE(status)) {
+ log_err("Error getting last match\n");
+ }
+
+ while (index < size) {
+ if (index + 2 < size) {
+ if (usearch_following(strsrch, search.offset[index + 2] - 1,
+ &status) != search.offset[index + 2] ||
+ U_FAILURE(status)) {
+ log_err("Error getting following match at index %d\n",
+ search.offset[index + 2] - 1);
+ }
+ }
+ if (index + 1 < size) {
+ if (usearch_preceding(strsrch, search.offset[index + 1] +
+ search.size[index + 1] + 1,
+ &status) != search.offset[index + 1] ||
+ U_FAILURE(status)) {
+ log_err("Error getting preceeding match at index %d\n",
+ search.offset[index + 1] + 1);
+ }
+ }
+ index += 2;
+ }
+ status = U_ZERO_ERROR;
+ if (usearch_following(strsrch, u_strlen(text), &status) !=
+ USEARCH_DONE) {
+ log_err("Error expecting out of bounds match\n");
+ }
+ if (usearch_preceding(strsrch, 0, &status) != USEARCH_DONE) {
+ log_err("Error expecting out of bounds match\n");
+ }
+ count ++;
+ usearch_close(strsrch);
+ }
+ close();
+}
+
+static void TestReset(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar text[] = {0x66, 0x69, 0x73, 0x68, 0x20,
+ 0x66, 0x69, 0x73, 0x68};
+ UChar pattern[] = {0x73};
+ UStringSearch *strsrch;
+
+ open();
+ strsrch = usearch_openFromCollator(pattern, 1, text, 9,
+ EN_US_, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ return;
+ }
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ usearch_setOffset(strsrch, 9, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting attributes and offsets\n");
+ }
+ else {
+ usearch_reset(strsrch);
+ if (usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_OFF ||
+ usearch_getAttribute(strsrch, USEARCH_CANONICAL_MATCH) !=
+ USEARCH_OFF ||
+ usearch_getOffset(strsrch) != 0 ||
+ usearch_getMatchedLength(strsrch) != 0 ||
+ usearch_getMatchedStart(strsrch) != USEARCH_DONE) {
+ log_err("Error resetting string search\n");
+ }
+ usearch_previous(strsrch, &status);
+ if (usearch_getMatchedStart(strsrch) != 7 ||
+ usearch_getMatchedLength(strsrch) != 1) {
+ log_err("Error resetting string search\n");
+ }
+ }
+ usearch_close(strsrch);
+ close();
+}
+
+static void TestSupplementary(void)
+{
+ int count = 0;
+ open();
+ while (SUPPLEMENTARY[count].text != NULL) {
+ if (!assertEqual(SUPPLEMENTARY[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestContraction(void)
+{
+ UChar rules[128];
+ UChar pattern[128];
+ UChar text[128];
+ UCollator *collator;
+ UErrorCode status = U_ZERO_ERROR;
+ int count = 0;
+ UStringSearch *strsrch;
+ memset(rules, 0, 128*sizeof(UChar));
+ memset(pattern, 0, 128*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ u_unescape(CONTRACTIONRULE, rules, 128);
+ collator = ucol_openRules(rules, u_strlen(rules), UCOL_ON,
+ UCOL_TERTIARY, NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator %s\n", u_errorName(status));
+ return;
+ }
+ strsrch = usearch_openFromCollator(pattern, 1, text, 1, collator, NULL,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ }
+
+ while (CONTRACTION[count].text != NULL) {
+ u_unescape(CONTRACTION[count].text, text, 128);
+ u_unescape(CONTRACTION[count].pattern, pattern, 128);
+ usearch_setText(strsrch, text, -1, &status);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ if (!assertEqualWithUStringSearch(strsrch, CONTRACTION[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ usearch_close(strsrch);
+ ucol_close(collator);
+}
+
+static void TestIgnorable(void)
+{
+ UChar rules[128];
+ UChar pattern[128];
+ UChar text[128];
+ UCollator *collator;
+ UErrorCode status = U_ZERO_ERROR;
+ UStringSearch *strsrch;
+ uint32_t count = 0;
+
+ memset(rules, 0, 128*sizeof(UChar));
+ memset(pattern, 0, 128*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ u_unescape(IGNORABLERULE, rules, 128);
+ collator = ucol_openRules(rules, u_strlen(rules), UCOL_ON,
+ IGNORABLE[count].strength, NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator %s\n", u_errorName(status));
+ return;
+ }
+ strsrch = usearch_openFromCollator(pattern, 1, text, 1, collator, NULL,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ }
+
+ while (IGNORABLE[count].text != NULL) {
+ u_unescape(IGNORABLE[count].text, text, 128);
+ u_unescape(IGNORABLE[count].pattern, pattern, 128);
+ usearch_setText(strsrch, text, -1, &status);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ if (!assertEqualWithUStringSearch(strsrch, IGNORABLE[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ usearch_close(strsrch);
+ ucol_close(collator);
+}
+
+static void TestDiactricMatch(void)
+{
+ UChar pattern[128];
+ UChar text[128];
+ UErrorCode status = U_ZERO_ERROR;
+ UStringSearch *strsrch = NULL;
+ UCollator *coll = NULL;
+ uint32_t count = 0;
+ SearchData search;
+
+ memset(pattern, 0, 128*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ strsrch = usearch_open(pattern, 1, text, 1, uloc_getDefault(), NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ return;
+ }
+
+ search = DIACTRICMATCH[count];
+ while (search.text != NULL) {
+ if (search.collator != NULL) {
+ coll = ucol_openFromShortString(search.collator, FALSE, NULL, &status);
+ } else {
+ coll = ucol_open(uloc_getDefault(), &status);
+ ucol_setStrength(coll, search.strength);
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search collator %s\n", u_errorName(status));
+ return;
+ }
+
+ usearch_setCollator(strsrch, coll, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting string search collator %s\n", u_errorName(status));
+ return;
+ }
+
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 128);
+ usearch_setText(strsrch, text, -1, &status);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ if (!assertEqualWithUStringSearch(strsrch, search)) {
+ log_err("Error at test number %d\n", count);
+ }
+ ucol_close(coll);
+
+ search = DIACTRICMATCH[++count];
+ }
+ usearch_close(strsrch);
+}
+
+static void TestCanonical(void)
+{
+ int count = 0;
+ open();
+ while (BASICCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(BASICCANONICAL[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestNormCanonical(void)
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ open();
+ ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ count = 0;
+ while (NORMCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(NORMCANONICAL[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status);
+ close();
+}
+
+static void TestStrengthCanonical(void)
+{
+ int count = 0;
+ open();
+ while (STRENGTHCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(STRENGTHCANONICAL[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestBreakIteratorCanonical(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ int count = 0;
+
+ CHECK_BREAK("x");
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+ open();
+ while (count < 4) {
+ /* 0-3 test are fixed */
+ UChar pattern[32];
+ UChar text[128];
+ const SearchData *search = &(BREAKITERATORCANONICAL[count]);
+ UCollator *collator = getCollator(search->collator);
+ UBreakIterator *breaker = getBreakIterator(search->breaker);
+ UStringSearch *strsrch;
+
+ u_unescape(search->text, text, 128);
+ u_unescape(search->pattern, pattern, 32);
+ ucol_setStrength(collator, search->strength);
+
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator,
+ breaker, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening searcher\n");
+ return;
+ }
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status) ||
+ usearch_getBreakIterator(strsrch) != breaker) {
+ log_err("Error setting break iterator\n");
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ }
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ ucol_setStrength(collator, UCOL_TERTIARY);
+ usearch_close(strsrch);
+ goto ENDTESTBREAKITERATOR;
+ }
+ search = &(BREAKITERATOREXACT[count + 1]);
+ breaker = getBreakIterator(search->breaker);
+ usearch_setBreakIterator(strsrch, breaker, &status);
+ if (U_FAILURE(status) ||
+ usearch_getBreakIterator(strsrch) != breaker) {
+ log_err("Error setting break iterator\n");
+ usearch_close(strsrch);
+ goto ENDTESTBREAKITERATOR;
+ }
+ usearch_reset(strsrch);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ log_err("Error at test number %d\n", count);
+ goto ENDTESTBREAKITERATOR;
+ }
+ usearch_close(strsrch);
+ count += 2;
+ }
+ count = 0;
+ while (BREAKITERATORCANONICAL[count].text != NULL) {
+ if (!assertEqual(BREAKITERATORCANONICAL[count])) {
+ log_err("Error at test number %d\n", count);
+ goto ENDTESTBREAKITERATOR;
+ }
+ count ++;
+ }
+
+ENDTESTBREAKITERATOR:
+ close();
+#endif
+}
+
+static void TestVariableCanonical(void)
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ open();
+ ucol_setAttribute(EN_US_, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting collation alternate attribute %s\n",
+ u_errorName(status));
+ }
+ while (VARIABLE[count].text != NULL) {
+ log_verbose("variable %d\n", count);
+ if (!assertCanonicalEqual(VARIABLE[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ ucol_setAttribute(EN_US_, UCOL_ALTERNATE_HANDLING,
+ UCOL_NON_IGNORABLE, &status);
+ close();
+}
+
+static void TestOverlapCanonical(void)
+{
+ int count = 0;
+ open();
+ while (OVERLAPCANONICAL[count].text != NULL) {
+ if (!assertEqualWithAttribute(OVERLAPCANONICAL[count], USEARCH_ON,
+ USEARCH_ON)) {
+ log_err("Error at overlap test number %d\n", count);
+ }
+ count ++;
+ }
+ count = 0;
+ while (NONOVERLAP[count].text != NULL) {
+ if (!assertCanonicalEqual(NONOVERLAPCANONICAL[count])) {
+ log_err("Error at non overlap test number %d\n", count);
+ }
+ count ++;
+ }
+
+ count = 0;
+ while (count < 1) {
+ UChar pattern[32];
+ UChar text[128];
+ const SearchData *search = &(OVERLAPCANONICAL[count]);
+ UCollator *collator = getCollator(search->collator);
+ UStringSearch *strsrch;
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_unescape(search->text, text, 128);
+ u_unescape(search->pattern, pattern, 32);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator,
+ NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening searcher\n");
+ return;
+ }
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_ON) {
+ log_err("Error setting overlap option\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ usearch_close(strsrch);
+ return;
+ }
+ search = &(NONOVERLAPCANONICAL[count]);
+ usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_OFF, &status);
+ if (U_FAILURE(status) ||
+ usearch_getAttribute(strsrch, USEARCH_OVERLAP) != USEARCH_OFF) {
+ log_err("Error setting overlap option\n");
+ }
+ usearch_reset(strsrch);
+ if (!assertEqualWithUStringSearch(strsrch, *search)) {
+ usearch_close(strsrch);
+ log_err("Error at test number %d\n", count);
+ }
+
+ count ++;
+ usearch_close(strsrch);
+ }
+ close();
+}
+
+static void TestCollatorCanonical(void)
+{
+ /* test collator that thinks "o" and "p" are the same thing */
+ UChar rules[32];
+ UCollator *tailored = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar pattern[32];
+ UChar text[128];
+ UStringSearch *strsrch;
+
+ open();
+ u_unescape(COLLATORCANONICAL[0].text, text, 128);
+ u_unescape(COLLATORCANONICAL[0].pattern, pattern, 32);
+
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening searcher\n");
+ return;
+ }
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, COLLATORCANONICAL[0])) {
+ goto ENDTESTCOLLATOR;
+ }
+
+ u_unescape(TESTCOLLATORRULE, rules, 32);
+ tailored = ucol_openRules(rules, -1, UCOL_ON,
+ COLLATORCANONICAL[1].strength, NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening rule based collator %s\n", u_errorName(status));
+ }
+
+ usearch_setCollator(strsrch, tailored, &status);
+ if (U_FAILURE(status) || usearch_getCollator(strsrch) != tailored) {
+ log_err("Error setting rule based collator\n");
+ }
+ usearch_reset(strsrch);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (!assertEqualWithUStringSearch(strsrch, COLLATORCANONICAL[1])) {
+ goto ENDTESTCOLLATOR;
+ }
+
+ usearch_setCollator(strsrch, EN_US_, &status);
+ usearch_reset(strsrch);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status) || usearch_getCollator(strsrch) != EN_US_) {
+ log_err("Error setting rule based collator\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, COLLATORCANONICAL[0])) {
+ goto ENDTESTCOLLATOR;
+ }
+
+ENDTESTCOLLATOR:
+ usearch_close(strsrch);
+ if (tailored != NULL) {
+ ucol_close(tailored);
+ }
+ close();
+}
+
+static void TestPatternCanonical(void)
+{
+ UStringSearch *strsrch;
+ UChar pattern[32];
+ UChar text[128];
+ const UChar *temp;
+ int32_t templength;
+ UErrorCode status = U_ZERO_ERROR;
+
+ open();
+ u_unescape(PATTERNCANONICAL[0].text, text, 128);
+ u_unescape(PATTERNCANONICAL[0].pattern, pattern, 32);
+
+ ucol_setStrength(EN_US_, PATTERNCANONICAL[0].strength);
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ goto ENDTESTPATTERN;
+ }
+ temp = usearch_getPattern(strsrch, &templength);
+ if (u_strcmp(pattern, temp) != 0) {
+ log_err("Error setting pattern\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, PATTERNCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(PATTERNCANONICAL[1].pattern, pattern, 32);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ temp = usearch_getPattern(strsrch, &templength);
+ if (u_strcmp(pattern, temp) != 0) {
+ log_err("Error setting pattern\n");
+ goto ENDTESTPATTERN;
+ }
+ usearch_reset(strsrch);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting pattern %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, PATTERNCANONICAL[1])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(PATTERNCANONICAL[0].pattern, pattern, 32);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ temp = usearch_getPattern(strsrch, &templength);
+ if (u_strcmp(pattern, temp) != 0) {
+ log_err("Error setting pattern\n");
+ goto ENDTESTPATTERN;
+ }
+ usearch_reset(strsrch);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error setting pattern %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, PATTERNCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+ENDTESTPATTERN:
+ ucol_setStrength(EN_US_, UCOL_TERTIARY);
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ close();
+}
+
+static void TestTextCanonical(void)
+{
+ UStringSearch *strsrch;
+ UChar pattern[32];
+ UChar text[128];
+ const UChar *temp;
+ int32_t templength;
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_unescape(TEXTCANONICAL[0].text, text, 128);
+ u_unescape(TEXTCANONICAL[0].pattern, pattern, 32);
+
+ open();
+ strsrch = usearch_openFromCollator(pattern, -1, text, -1, EN_US_,
+ NULL, &status);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ goto ENDTESTPATTERN;
+ }
+ temp = usearch_getText(strsrch, &templength);
+ if (u_strcmp(text, temp) != 0) {
+ log_err("Error setting text\n");
+ }
+ if (!assertEqualWithUStringSearch(strsrch, TEXTCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(TEXTCANONICAL[1].text, text, 32);
+ usearch_setText(strsrch, text, -1, &status);
+ temp = usearch_getText(strsrch, &templength);
+ if (u_strcmp(text, temp) != 0) {
+ log_err("Error setting text\n");
+ goto ENDTESTPATTERN;
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error setting text %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, TEXTCANONICAL[1])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(TEXTCANONICAL[0].text, text, 32);
+ usearch_setText(strsrch, text, -1, &status);
+ temp = usearch_getText(strsrch, &templength);
+ if (u_strcmp(text, temp) != 0) {
+ log_err("Error setting text\n");
+ goto ENDTESTPATTERN;
+ }
+ if (U_FAILURE(status)) {
+ log_err("Error setting pattern %s\n", u_errorName(status));
+ }
+ if (!assertEqualWithUStringSearch(strsrch, TEXTCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+ENDTESTPATTERN:
+ if (strsrch != NULL) {
+ usearch_close(strsrch);
+ }
+ close();
+}
+
+static void TestCompositeBoundariesCanonical(void)
+{
+ int count = 0;
+ open();
+ while (COMPOSITEBOUNDARIESCANONICAL[count].text != NULL) {
+ log_verbose("composite %d\n", count);
+ if (!assertCanonicalEqual(COMPOSITEBOUNDARIESCANONICAL[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestGetSetOffsetCanonical(void)
+{
+ int index = 0;
+ UChar pattern[32];
+ UChar text[128];
+ UErrorCode status = U_ZERO_ERROR;
+ UStringSearch *strsrch;
+
+ memset(pattern, 0, 32*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ open();
+ strsrch = usearch_openFromCollator(pattern, 16, text, 32, EN_US_, NULL,
+ &status);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ /* testing out of bounds error */
+ usearch_setOffset(strsrch, -1, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error expecting set offset error\n");
+ }
+ usearch_setOffset(strsrch, 128, &status);
+ if (U_SUCCESS(status)) {
+ log_err("Error expecting set offset error\n");
+ }
+ while (BASICCANONICAL[index].text != NULL) {
+ int count = 0;
+ SearchData search = BASICCANONICAL[index ++];
+ int32_t matchindex = search.offset[count];
+ int32_t textlength;
+
+ if (BASICCANONICAL[index].text == NULL) {
+ /* skip the last one */
+ break;
+ }
+
+ u_unescape(search.text, text, 128);
+ u_unescape(search.pattern, pattern, 32);
+ status = U_ZERO_ERROR;
+ usearch_setText(strsrch, text, -1, &status);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ uint32_t matchlength = search.size[count];
+ usearch_next(strsrch, &status);
+ if (matchindex != usearch_getMatchedStart(strsrch) ||
+ matchlength != (uint32_t)usearch_getMatchedLength(strsrch)) {
+ char *str = toCharString(usearch_getText(strsrch,
+ &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return;
+ }
+ matchindex = search.offset[count + 1] == -1 ? -1 :
+ search.offset[count + 2];
+ if (search.offset[count + 1] != -1) {
+ usearch_setOffset(strsrch, search.offset[count + 1] + 1,
+ &status);
+ if (usearch_getOffset(strsrch) != search.offset[count + 1] + 1) {
+ log_err("Error setting offset\n");
+ return;
+ }
+ }
+
+ count += 2;
+ }
+ usearch_next(strsrch, &status);
+ if (usearch_getMatchedStart(strsrch) != USEARCH_DONE) {
+ char *str = toCharString(usearch_getText(strsrch, &textlength));
+ log_err("Text: %s\n", str);
+ str = toCharString(usearch_getPattern(strsrch, &textlength));
+ log_err("Pattern: %s\n", str);
+ log_err("Error match found at %d %d\n",
+ usearch_getMatchedStart(strsrch),
+ usearch_getMatchedLength(strsrch));
+ return;
+ }
+ }
+ usearch_close(strsrch);
+ close();
+}
+
+static void TestSupplementaryCanonical(void)
+{
+ int count = 0;
+ open();
+ while (SUPPLEMENTARYCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(SUPPLEMENTARYCANONICAL[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ close();
+}
+
+static void TestContractionCanonical(void)
+{
+ UChar rules[128];
+ UChar pattern[128];
+ UChar text[128];
+ UCollator *collator = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ int count = 0;
+ UStringSearch *strsrch = NULL;
+ memset(rules, 0, 128*sizeof(UChar));
+ memset(pattern, 0, 128*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ u_unescape(CONTRACTIONRULE, rules, 128);
+ collator = ucol_openRules(rules, u_strlen(rules), UCOL_ON,
+ UCOL_TERTIARY, NULL, &status);
+ if(status == U_FILE_ACCESS_ERROR) {
+ log_data_err("Is your data around?\n");
+ return;
+ } else if(U_FAILURE(status)) {
+ log_err("Error opening collator %s\n", u_errorName(status));
+ return;
+ }
+ strsrch = usearch_openFromCollator(pattern, 1, text, 1, collator, NULL,
+ &status);
+ usearch_setAttribute(strsrch, USEARCH_CANONICAL_MATCH, USEARCH_ON,
+ &status);
+ if (U_FAILURE(status)) {
+ log_err("Error opening string search %s\n", u_errorName(status));
+ }
+
+ while (CONTRACTIONCANONICAL[count].text != NULL) {
+ u_unescape(CONTRACTIONCANONICAL[count].text, text, 128);
+ u_unescape(CONTRACTIONCANONICAL[count].pattern, pattern, 128);
+ usearch_setText(strsrch, text, -1, &status);
+ usearch_setPattern(strsrch, pattern, -1, &status);
+ if (!assertEqualWithUStringSearch(strsrch,
+ CONTRACTIONCANONICAL[count])) {
+ log_err("Error at test number %d\n", count);
+ }
+ count ++;
+ }
+ usearch_close(strsrch);
+ ucol_close(collator);
+}
+
+static void TestNumeric(void) {
+ UCollator *coll = NULL;
+ UStringSearch *strsrch = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+
+ UChar pattern[128];
+ UChar text[128];
+ memset(pattern, 0, 128*sizeof(UChar));
+ memset(text, 0, 128*sizeof(UChar));
+
+ coll = ucol_open("", &status);
+ if(U_FAILURE(status)) {
+ log_data_err("Could not open UCA. Is your data around?\n");
+ return;
+ }
+
+ ucol_setAttribute(coll, UCOL_NUMERIC_COLLATION, UCOL_ON, &status);
+
+ strsrch = usearch_openFromCollator(pattern, 1, text, 1, coll, NULL, &status);
+
+ if(status != U_UNSUPPORTED_ERROR || U_SUCCESS(status)) {
+ log_err("Expected U_UNSUPPORTED_ERROR when trying to instantiate a search object from a CODAN collator, got %s instead\n", u_errorName(status));
+ if(strsrch) {
+ usearch_close(strsrch);
+ }
+ }
+
+ ucol_close(coll);
+
+}
+
+void addSearchTest(TestNode** root)
+{
+ addTest(root, &TestStart, "tscoll/usrchtst/TestStart");
+ addTest(root, &TestOpenClose, "tscoll/usrchtst/TestOpenClose");
+ addTest(root, &TestInitialization, "tscoll/usrchtst/TestInitialization");
+ addTest(root, &TestBasic, "tscoll/usrchtst/TestBasic");
+ addTest(root, &TestNormExact, "tscoll/usrchtst/TestNormExact");
+ addTest(root, &TestStrength, "tscoll/usrchtst/TestStrength");
+ addTest(root, &TestBreakIterator, "tscoll/usrchtst/TestBreakIterator");
+ addTest(root, &TestVariable, "tscoll/usrchtst/TestVariable");
+ addTest(root, &TestOverlap, "tscoll/usrchtst/TestOverlap");
+ addTest(root, &TestCollator, "tscoll/usrchtst/TestCollator");
+ addTest(root, &TestPattern, "tscoll/usrchtst/TestPattern");
+ addTest(root, &TestText, "tscoll/usrchtst/TestText");
+ addTest(root, &TestCompositeBoundaries,
+ "tscoll/usrchtst/TestCompositeBoundaries");
+ addTest(root, &TestGetSetOffset, "tscoll/usrchtst/TestGetSetOffset");
+ addTest(root, &TestGetSetAttribute,
+ "tscoll/usrchtst/TestGetSetAttribute");
+ addTest(root, &TestGetMatch, "tscoll/usrchtst/TestGetMatch");
+ addTest(root, &TestSetMatch, "tscoll/usrchtst/TestSetMatch");
+ addTest(root, &TestReset, "tscoll/usrchtst/TestReset");
+ addTest(root, &TestSupplementary, "tscoll/usrchtst/TestSupplementary");
+ addTest(root, &TestContraction, "tscoll/usrchtst/TestContraction");
+ addTest(root, &TestIgnorable, "tscoll/usrchtst/TestIgnorable");
+ addTest(root, &TestCanonical, "tscoll/usrchtst/TestCanonical");
+ addTest(root, &TestNormCanonical, "tscoll/usrchtst/TestNormCanonical");
+ addTest(root, &TestStrengthCanonical,
+ "tscoll/usrchtst/TestStrengthCanonical");
+ addTest(root, &TestBreakIteratorCanonical,
+ "tscoll/usrchtst/TestBreakIteratorCanonical");
+ addTest(root, &TestVariableCanonical,
+ "tscoll/usrchtst/TestVariableCanonical");
+ addTest(root, &TestOverlapCanonical,
+ "tscoll/usrchtst/TestOverlapCanonical");
+ addTest(root, &TestCollatorCanonical,
+ "tscoll/usrchtst/TestCollatorCanonical");
+ addTest(root, &TestPatternCanonical,
+ "tscoll/usrchtst/TestPatternCanonical");
+ addTest(root, &TestTextCanonical, "tscoll/usrchtst/TestTextCanonical");
+ addTest(root, &TestCompositeBoundariesCanonical,
+ "tscoll/usrchtst/TestCompositeBoundariesCanonical");
+ addTest(root, &TestGetSetOffsetCanonical,
+ "tscoll/usrchtst/TestGetSetOffsetCanonical");
+ addTest(root, &TestSupplementaryCanonical,
+ "tscoll/usrchtst/TestSupplementaryCanonical");
+ addTest(root, &TestContractionCanonical,
+ "tscoll/usrchtst/TestContractionCanonical");
+ addTest(root, &TestEnd, "tscoll/usrchtst/TestEnd");
+ addTest(root, &TestNumeric, "tscoll/usrchtst/TestNumeric");
+ addTest(root, &TestDiactricMatch, "tscoll/usrchtst/TestDiactricMatch");
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/utexttst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/utexttst.c
new file mode 100644
index 00000000000..be5941df403
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/utexttst.c
@@ -0,0 +1,250 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2005-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File utexttst.c
+*
+* Modification History:
+*
+* Date Name Description
+* 06/13/2005 Andy Heninger Creation
+*******************************************************************************
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/utext.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+#include "memory.h"
+#include "string.h"
+
+
+static void TestAPI(void);
+void addUTextTest(TestNode** root);
+
+
+void
+addUTextTest(TestNode** root)
+{
+ addTest(root, &TestAPI , "tsutil/UTextTest/TestAPI");
+}
+
+
+#define TEST_ASSERT(x) \
+ {if ((x)==FALSE) {log_err("Test failure in file %s at line %d\n", __FILE__, __LINE__);\
+ gFailed = TRUE;\
+ }}
+
+
+#define TEST_SUCCESS(status) \
+ {if (U_FAILURE(status)) {log_err("Test failure in file %s at line %d. Error = \"%s\"\n", \
+ __FILE__, __LINE__, u_errorName(status)); \
+ gFailed = TRUE;\
+ }}
+
+
+
+/*
+ * TestAPI verify that the UText API is accessible from C programs.
+ * This is not intended to be a complete test of the API functionality. That is
+ * in the C++ intltest program.
+ * This test is intended to check that everything can be accessed and built in
+ * a pure C enviornment.
+ */
+
+
+static void TestAPI(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UBool gFailed = FALSE;
+
+ /* Open */
+ {
+ UText utLoc = UTEXT_INITIALIZER;
+ const char * cString = "\x61\x62\x63\x64";
+ UChar uString[] = {0x41, 0x42, 0x43, 0};
+ UText *uta;
+ UText *utb;
+ UChar c;
+
+ uta = utext_openUChars(NULL, uString, -1, &status);
+ TEST_SUCCESS(status);
+ c = utext_next32(uta);
+ TEST_ASSERT(c == 0x41);
+ utb = utext_close(uta);
+ TEST_ASSERT(utb == NULL);
+
+ uta = utext_openUTF8(&utLoc, cString, -1, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(uta == &utLoc);
+
+ uta = utext_close(&utLoc);
+ TEST_ASSERT(uta == &utLoc);
+ }
+
+ /* utext_clone() */
+ {
+ UChar uString[] = {0x41, 0x42, 0x43, 0};
+ int64_t len;
+ UText *uta;
+ UText *utb;
+
+ status = U_ZERO_ERROR;
+ uta = utext_openUChars(NULL, uString, -1, &status);
+ TEST_SUCCESS(status);
+ utb = utext_clone(NULL, uta, FALSE, FALSE, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(utb != NULL);
+ TEST_ASSERT(utb != uta);
+ len = utext_nativeLength(uta);
+ TEST_ASSERT(len == u_strlen(uString));
+ utext_close(uta);
+ utext_close(utb);
+ }
+
+ /* basic access functions */
+ {
+ UChar uString[] = {0x41, 0x42, 0x43, 0};
+ UText *uta;
+ UChar32 c;
+ int64_t len;
+ UBool b;
+ int64_t i;
+
+ status = U_ZERO_ERROR;
+ uta = utext_openUChars(NULL, uString, -1, &status);
+ TEST_ASSERT(uta!=NULL);
+ TEST_SUCCESS(status);
+ b = utext_isLengthExpensive(uta);
+ TEST_ASSERT(b==TRUE);
+ len = utext_nativeLength(uta);
+ TEST_ASSERT(len == u_strlen(uString));
+ b = utext_isLengthExpensive(uta);
+ TEST_ASSERT(b==FALSE);
+
+ c = utext_char32At(uta, 0);
+ TEST_ASSERT(c==uString[0]);
+
+ c = utext_current32(uta);
+ TEST_ASSERT(c==uString[0]);
+
+ c = utext_next32(uta);
+ TEST_ASSERT(c==uString[0]);
+ c = utext_current32(uta);
+ TEST_ASSERT(c==uString[1]);
+
+ c = utext_previous32(uta);
+ TEST_ASSERT(c==uString[0]);
+ c = utext_current32(uta);
+ TEST_ASSERT(c==uString[0]);
+
+ c = utext_next32From(uta, 1);
+ TEST_ASSERT(c==uString[1]);
+ c = utext_next32From(uta, u_strlen(uString));
+ TEST_ASSERT(c==U_SENTINEL);
+
+ c = utext_previous32From(uta, 2);
+ TEST_ASSERT(c==uString[1]);
+ i = utext_getNativeIndex(uta);
+ TEST_ASSERT(i == 1);
+
+ utext_setNativeIndex(uta, 0);
+ b = utext_moveIndex32(uta, 1);
+ TEST_ASSERT(b==TRUE);
+ i = utext_getNativeIndex(uta);
+ TEST_ASSERT(i==1);
+
+ b = utext_moveIndex32(uta, u_strlen(uString)-1);
+ TEST_ASSERT(b==TRUE);
+ i = utext_getNativeIndex(uta);
+ TEST_ASSERT(i==u_strlen(uString));
+
+ b = utext_moveIndex32(uta, 1);
+ TEST_ASSERT(b==FALSE);
+ i = utext_getNativeIndex(uta);
+ TEST_ASSERT(i==u_strlen(uString));
+
+ utext_setNativeIndex(uta, 0);
+ c = UTEXT_NEXT32(uta);
+ TEST_ASSERT(c==uString[0]);
+ c = utext_current32(uta);
+ TEST_ASSERT(c==uString[1]);
+
+ c = UTEXT_PREVIOUS32(uta);
+ TEST_ASSERT(c==uString[0]);
+ c = UTEXT_PREVIOUS32(uta);
+ TEST_ASSERT(c==U_SENTINEL);
+
+
+ utext_close(uta);
+ }
+
+ {
+ /*
+ * extract
+ */
+ UText *uta;
+ UChar uString[] = {0x41, 0x42, 0x43, 0};
+ UChar buf[100];
+ int32_t i;
+
+ status = U_ZERO_ERROR;
+ uta = utext_openUChars(NULL, uString, -1, &status);
+ TEST_SUCCESS(status);
+
+ status = U_ZERO_ERROR;
+ i = utext_extract(uta, 0, 100, NULL, 0, &status);
+ TEST_ASSERT(status==U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(i == u_strlen(uString));
+
+ status = U_ZERO_ERROR;
+ memset(buf, 0, sizeof(buf));
+ i = utext_extract(uta, 0, 100, buf, 100, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(i == u_strlen(uString));
+ i = u_strcmp(uString, buf);
+ TEST_ASSERT(i == 0);
+ utext_close(uta);
+ }
+
+ {
+ /*
+ * Copy, Replace, isWritable
+ * Can't create an editable UText from plain C, so all we
+ * can easily do is check that errors returned.
+ */
+ UText *uta;
+ UChar uString[] = {0x41, 0x42, 0x43, 0};
+ UBool b;
+
+ status = U_ZERO_ERROR;
+ uta = utext_openUChars(NULL, uString, -1, &status);
+ TEST_SUCCESS(status);
+
+ b = utext_isWritable(uta);
+ TEST_ASSERT(b == FALSE);
+
+ b = utext_hasMetaData(uta);
+ TEST_ASSERT(b == FALSE);
+
+ utext_replace(uta,
+ 0, 1, /* start, limit */
+ uString, -1, /* replacement, replacement length */
+ &status);
+ TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
+
+
+ utext_copy(uta,
+ 0, 1, /* start, limit */
+ 2, /* destination index */
+ FALSE, /* move flag */
+ &status);
+ TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
+
+ utext_close(uta);
+ }
+
+
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/utf16tst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/utf16tst.c
new file mode 100644
index 00000000000..38b8fb5fcc2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/utf16tst.c
@@ -0,0 +1,734 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1998-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File test.c
+*
+* Modification History:
+*
+* Date Name Description
+* 05/01/2000 Madhu Creation
+*******************************************************************************
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/utf16.h"
+#include "unicode/ustring.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "cintltst.h"
+#include <stdio.h>
+
+#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
+
+static void printUChars(const UChar *uchars);
+
+static void TestCodeUnitValues(void);
+static void TestCharLength(void);
+static void TestGetChar(void);
+static void TestNextPrevChar(void);
+static void TestFwdBack(void);
+static void TestSetChar(void);
+static void TestAppendChar(void);
+static void TestAppend(void);
+static void TestSurrogate(void);
+
+void addUTF16Test(TestNode** root);
+
+void
+addUTF16Test(TestNode** root)
+{
+ addTest(root, &TestCodeUnitValues, "utf16tst/TestCodeUnitValues");
+ addTest(root, &TestCharLength, "utf16tst/TestCharLength" );
+ addTest(root, &TestGetChar, "utf16tst/TestGetChar" );
+ addTest(root, &TestNextPrevChar, "utf16tst/TestNextPrevChar" );
+ addTest(root, &TestFwdBack, "utf16tst/TestFwdBack" );
+ addTest(root, &TestSetChar, "utf16tst/TestSetChar" );
+ addTest(root, &TestAppendChar, "utf16tst/TestAppendChar" );
+ addTest(root, &TestAppend, "utf16tst/TestAppend" );
+ addTest(root, &TestSurrogate, "utf16tst/TestSurrogate" );
+}
+
+static void TestCodeUnitValues()
+{
+ static uint16_t codeunit[]={0x0000,0xe065,0x20ac,0xd7ff,0xd800,0xd841,0xd905,0xdbff,0xdc00,0xdc02,0xddee,0xdfff,0};
+
+ int16_t i;
+ for(i=0; i<sizeof(codeunit)/sizeof(codeunit[0]); i++){
+ UChar c=codeunit[i];
+ log_verbose("Testing code unit value of %x\n", c);
+ if(i<4){
+ if(!UTF16_IS_SINGLE(c) || UTF16_IS_LEAD(c) || UTF16_IS_TRAIL(c) || !U16_IS_SINGLE(c) || U16_IS_LEAD(c) || U16_IS_TRAIL(c)){
+ log_err("ERROR: %x is a single character\n", c);
+ }
+ }
+ if(i >= 4 && i< 8){
+ if(!UTF16_IS_LEAD(c) || UTF16_IS_SINGLE(c) || UTF16_IS_TRAIL(c) || !U16_IS_LEAD(c) || U16_IS_SINGLE(c) || U16_IS_TRAIL(c)){
+ log_err("ERROR: %x is a first surrogate\n", c);
+ }
+ }
+ if(i >= 8 && i< 12){
+ if(!UTF16_IS_TRAIL(c) || UTF16_IS_SINGLE(c) || UTF16_IS_LEAD(c) || !U16_IS_TRAIL(c) || U16_IS_SINGLE(c) || U16_IS_LEAD(c)){
+ log_err("ERROR: %x is a second surrogate\n", c);
+ }
+ }
+ }
+}
+
+static void TestCharLength()
+{
+ static uint32_t codepoint[]={
+ 1, 0x0061,
+ 1, 0xe065,
+ 1, 0x20ac,
+ 2, 0x20402,
+ 2, 0x23456,
+ 2, 0x24506,
+ 2, 0x20402,
+ 2, 0x10402,
+ 1, 0xd7ff,
+ 1, 0xe000
+ };
+
+ int16_t i;
+ UBool multiple;
+ for(i=0; i<sizeof(codepoint)/sizeof(codepoint[0]); i=(int16_t)(i+2)){
+ UChar32 c=codepoint[i+1];
+ if(UTF16_CHAR_LENGTH(c) != (uint16_t)codepoint[i] || U16_LENGTH(c) != (uint16_t)codepoint[i]){
+ log_err("The no: of code units for %lx:- Expected: %d Got: %d\n", c, codepoint[i], UTF16_CHAR_LENGTH(c));
+ }else{
+ log_verbose("The no: of code units for %lx is %d\n",c, UTF16_CHAR_LENGTH(c) );
+ }
+ multiple=(UBool)(codepoint[i] == 1 ? FALSE : TRUE);
+ if(UTF16_NEED_MULTIPLE_UCHAR(c) != multiple){
+ log_err("ERROR: UTF16_NEED_MULTIPLE_UCHAR failed for %lx\n", c);
+ }
+ }
+}
+
+static void TestGetChar()
+{
+ static UChar input[]={
+ /* code unit,*/
+ 0xdc00,
+ 0x20ac,
+ 0xd841,
+ 0x61,
+ 0xd841,
+ 0xdc02,
+ 0xd842,
+ 0xdc06,
+ 0,
+ 0xd842,
+ 0xd7ff,
+ 0xdc41,
+ 0xe000,
+ 0xd800
+ };
+ static UChar32 result[]={
+ /*codepoint-unsafe, codepoint-safe(not strict) codepoint-safe(strict)*/
+ (UChar32)0xfca10000, 0xdc00, UTF_ERROR_VALUE,
+ 0x20ac, 0x20ac, 0x20ac,
+ 0x12861, 0xd841, UTF_ERROR_VALUE,
+ 0x61, 0x61, 0x61,
+ 0x20402, 0x20402, 0x20402,
+ 0x20402, 0x20402, 0x20402,
+ 0x20806, 0x20806, 0x20806,
+ 0x20806, 0x20806, 0x20806,
+ 0x00, 0x00, 0x00,
+ 0x203ff, 0xd842, UTF_ERROR_VALUE,
+ 0xd7ff, 0xd7ff, 0xd7ff,
+ 0xfc41, 0xdc41, UTF_ERROR_VALUE,
+ 0xe000, 0xe000, 0xe000,
+ 0x11734, 0xd800, UTF_ERROR_VALUE
+ };
+ uint16_t i=0;
+ UChar32 c;
+ uint16_t offset=0;
+ for(offset=0; offset<sizeof(input)/U_SIZEOF_UCHAR; offset++) {
+ if(0<offset && offset<sizeof(input)/U_SIZEOF_UCHAR-1){
+ UTF16_GET_CHAR_UNSAFE(input, offset, c);
+ if(c != result[i]){
+ log_err("ERROR: UTF16_GET_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+ }
+
+ U16_GET_UNSAFE(input, offset, c);
+ if(c != result[i]){
+ log_err("ERROR: U16_GET_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+ }
+ }
+
+ UTF16_GET_CHAR_SAFE(input, 0, offset, sizeof(input)/U_SIZEOF_UCHAR, c, FALSE);
+ if(c != result[i+1]){
+ log_err("ERROR: UTF16_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ U16_GET(input, 0, offset, sizeof(input)/U_SIZEOF_UCHAR, c);
+ if(c != result[i+1]){
+ log_err("ERROR: U16_GET failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ UTF16_GET_CHAR_SAFE(input, 0, offset, sizeof(input)/U_SIZEOF_UCHAR, c, TRUE);
+ if(c != result[i+2]){
+ log_err("ERROR: UTF16_GET_CHAR_SAFE(strict) failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
+ }
+ i=(uint16_t)(i+3);
+ }
+
+}
+
+static void TestNextPrevChar(){
+
+ static UChar input[]={0x0061, 0xd800, 0xdc00, 0xdbff, 0xdfff, 0x0062, 0xd841, 0xd7ff, 0xd841, 0xdc41, 0xdc00, 0x0000};
+ static UChar32 result[]={
+ /*next_unsafe next_safe_ns next_safe_s prev_unsafe prev_safe_ns prev_safe_s*/
+ 0x0061, 0x0061, 0x0061, 0x0000, 0x0000, 0x0000,
+ 0x10000, 0x10000, 0x10000, 0x120400, 0xdc00, UTF_ERROR_VALUE,
+ 0xdc00, 0xdc00, UTF_ERROR_VALUE, 0x20441, 0x20441, 0x20441,
+ 0x10ffff, 0x10ffff, 0x10ffff, 0xd841, 0xd841, UTF_ERROR_VALUE,
+ 0xdfff, 0xdfff, UTF_ERROR_VALUE, 0xd7ff, 0xd7ff, 0xd7ff,
+ 0x0062, 0x0062, 0x0062, 0xd841, 0xd841, UTF_ERROR_VALUE,
+ 0x1ffff, 0xd841, UTF_ERROR_VALUE, 0x0062, 0x0062, 0x0062,
+ 0xd7ff, 0xd7ff, 0xd7ff, 0x10ffff, 0x10ffff, 0x10ffff,
+ 0x20441, 0x20441, 0x20441, 0xdbff, 0xdbff, UTF_ERROR_VALUE,
+ 0xdc41, 0xdc41, UTF_ERROR_VALUE, 0x10000, 0x10000, 0x10000,
+ 0xdc00, 0xdc00, UTF_ERROR_VALUE, 0xd800, 0xd800, UTF_ERROR_VALUE,
+ 0x0000, 0x0000, 0x0000, 0x0061, 0x0061, 0x0061
+ };
+ static uint16_t movedOffset[]={
+ /*next_unsafe next_safe_ns next_safe_s prev_unsafe prev_safe_ns prev_safe_s*/
+ 1, 1, 1, 11, 11, 11,
+ 3, 3, 3, 9, 10 , 10,
+ 3, 3, 3, 8, 8, 8,
+ 5, 5, 4, 8, 8, 8,
+ 5, 5, 5, 7, 7, 7,
+ 6, 6, 6, 6, 6, 6,
+ 8, 7, 7, 5, 5, 5,
+ 8, 8, 8, 3, 3, 3,
+ 10, 10, 10, 3, 3, 3,
+ 10, 10, 10, 1, 1, 1,
+ 11, 11, 11, 1, 1, 1,
+ 12, 12, 12, 0, 0, 0,
+ };
+
+
+ UChar32 c=0x0000;
+ uint16_t i=0;
+ uint16_t offset=0, setOffset=0;
+ for(offset=0; offset<sizeof(input)/U_SIZEOF_UCHAR; offset++){
+ setOffset=offset;
+ UTF16_NEXT_CHAR_UNSAFE(input, setOffset, c);
+ if(setOffset != movedOffset[i]){
+ log_err("ERROR: UTF16_NEXT_CHAR_UNSAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i], setOffset);
+ }
+ if(c != result[i]){
+ log_err("ERROR: UTF16_NEXT_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+ }
+
+ setOffset=offset;
+ U16_NEXT_UNSAFE(input, setOffset, c);
+ if(setOffset != movedOffset[i]){
+ log_err("ERROR: U16_NEXT_CHAR_UNSAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i], setOffset);
+ }
+ if(c != result[i]){
+ log_err("ERROR: U16_NEXT_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+ }
+
+ setOffset=offset;
+ UTF16_NEXT_CHAR_SAFE(input, setOffset, sizeof(input)/U_SIZEOF_UCHAR, c, FALSE);
+ if(setOffset != movedOffset[i+1]){
+ log_err("ERROR: UTF16_NEXT_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+1], setOffset);
+ }
+ if(c != result[i+1]){
+ log_err("ERROR: UTF16_NEXT_CHAR_SAFE failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ setOffset=offset;
+ U16_NEXT(input, setOffset, sizeof(input)/U_SIZEOF_UCHAR, c);
+ if(setOffset != movedOffset[i+1]){
+ log_err("ERROR: U16_NEXT failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+1], setOffset);
+ }
+ if(c != result[i+1]){
+ log_err("ERROR: U16_NEXT failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ setOffset=offset;
+ UTF16_NEXT_CHAR_SAFE(input, setOffset, sizeof(input)/U_SIZEOF_UCHAR, c, TRUE);
+ if(setOffset != movedOffset[i+1]){
+ log_err("ERROR: UTF16_NEXT_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+2], setOffset);
+ }
+ if(c != result[i+2]){
+ log_err("ERROR: UTF16_NEXT_CHAR_SAFE(strict) failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
+ }
+
+ i=(uint16_t)(i+6);
+ }
+ i=0;
+ for(offset=(uint16_t)sizeof(input)/U_SIZEOF_UCHAR; offset > 0; --offset){
+ setOffset=offset;
+ UTF16_PREV_CHAR_UNSAFE(input, setOffset, c);
+ if(setOffset != movedOffset[i+3]){
+ log_err("ERROR: UTF16_PREV_CHAR_UNSAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+3], setOffset);
+ }
+ if(c != result[i+3]){
+ log_err("ERROR: UTF16_PREV_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+3], c);
+ }
+
+ setOffset=offset;
+ U16_PREV_UNSAFE(input, setOffset, c);
+ if(setOffset != movedOffset[i+3]){
+ log_err("ERROR: U16_PREV_CHAR_UNSAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+3], setOffset);
+ }
+ if(c != result[i+3]){
+ log_err("ERROR: U16_PREV_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+3], c);
+ }
+
+ setOffset=offset;
+ UTF16_PREV_CHAR_SAFE(input, 0, setOffset, c, FALSE);
+ if(setOffset != movedOffset[i+4]){
+ log_err("ERROR: UTF16_PREV_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+4], setOffset);
+ }
+ if(c != result[i+4]){
+ log_err("ERROR: UTF16_PREV_CHAR_SAFE failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+4], c);
+ }
+
+ setOffset=offset;
+ U16_PREV(input, 0, setOffset, c);
+ if(setOffset != movedOffset[i+4]){
+ log_err("ERROR: U16_PREV failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+4], setOffset);
+ }
+ if(c != result[i+4]){
+ log_err("ERROR: U16_PREV failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+4], c);
+ }
+
+ setOffset=offset;
+ UTF16_PREV_CHAR_SAFE(input, 0, setOffset, c, TRUE);
+ if(setOffset != movedOffset[i+5]){
+ log_err("ERROR: UTF16_PREV_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+5], setOffset);
+ }
+ if(c != result[i+5]){
+ log_err("ERROR: UTF16_PREV_CHAR_SAFE(strict) failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+5], c);
+ }
+
+ i=(uint16_t)(i+6);
+ }
+
+}
+
+static void TestFwdBack(){
+ static UChar input[]={0x0061, 0xd800, 0xdc00, 0xdbff, 0xdfff, 0x0062, 0xd841, 0xd7ff, 0xd841, 0xdc41, 0xdc00, 0x0000};
+ static uint16_t fwd_unsafe[] ={1, 3, 5, 6, 8, 10, 11, 12};
+ static uint16_t fwd_safe[] ={1, 3, 5, 6, 7, 8, 10, 11, 12};
+ static uint16_t back_unsafe[]={11, 9, 8, 7, 6, 5, 3, 1, 0};
+ static uint16_t back_safe[] ={11, 10, 8, 7, 6, 5, 3, 1, 0};
+
+ static uint16_t Nvalue[]= {0, 1, 2, 3, 1, 2, 1};
+ static uint16_t fwd_N_unsafe[] ={0, 1, 5, 10, 11};
+ static uint16_t fwd_N_safe[] ={0, 1, 5, 8, 10, 12, 12}; /*safe macro keeps it at the end of the string */
+ static uint16_t back_N_unsafe[]={12, 11, 8, 5, 3};
+ static uint16_t back_N_safe[] ={12, 11, 8, 5, 3, 0, 0};
+
+ uint16_t offunsafe=0, offsafe=0;
+ uint16_t i=0;
+ while(offunsafe < sizeof(input)/U_SIZEOF_UCHAR){
+ UTF16_FWD_1_UNSAFE(input, offunsafe);
+ if(offunsafe != fwd_unsafe[i]){
+ log_err("ERROR: Forward_unsafe offset expected:%d, Got:%d\n", fwd_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ offunsafe=0, offsafe=0;
+ i=0;
+ while(offunsafe < sizeof(input)/U_SIZEOF_UCHAR){
+ U16_FWD_1_UNSAFE(input, offunsafe);
+ if(offunsafe != fwd_unsafe[i]){
+ log_err("ERROR: U16_FWD_1_UNSAFE offset expected:%d, Got:%d\n", fwd_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ while(offsafe < sizeof(input)/U_SIZEOF_UCHAR){
+ UTF16_FWD_1_SAFE(input, offsafe, sizeof(input)/U_SIZEOF_UCHAR);
+ if(offsafe != fwd_safe[i]){
+ log_err("ERROR: Forward_safe offset expected:%d, Got:%d\n", fwd_safe[i], offsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ while(offsafe < sizeof(input)/U_SIZEOF_UCHAR){
+ U16_FWD_1(input, offsafe, sizeof(input)/U_SIZEOF_UCHAR);
+ if(offsafe != fwd_safe[i]){
+ log_err("ERROR: U16_FWD_1 offset expected:%d, Got:%d\n", fwd_safe[i], offsafe);
+ }
+ i++;
+ }
+
+ offunsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ offsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ i=0;
+ while(offunsafe > 0){
+ UTF16_BACK_1_UNSAFE(input, offunsafe);
+ if(offunsafe != back_unsafe[i]){
+ log_err("ERROR: Backward_unsafe offset expected:%d, Got:%d\n", back_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ offunsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ offsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ i=0;
+ while(offunsafe > 0){
+ U16_BACK_1_UNSAFE(input, offunsafe);
+ if(offunsafe != back_unsafe[i]){
+ log_err("ERROR: U16_BACK_1_UNSAFE offset expected:%d, Got:%d\n", back_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ while(offsafe > 0){
+ UTF16_BACK_1_SAFE(input,0, offsafe);
+ if(offsafe != back_safe[i]){
+ log_err("ERROR: Backward_safe offset expected:%d, Got:%d\n", back_unsafe[i], offsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ while(offsafe > 0){
+ U16_BACK_1(input,0, offsafe);
+ if(offsafe != back_safe[i]){
+ log_err("ERROR: U16_BACK_1 offset expected:%d, Got:%d\n", back_unsafe[i], offsafe);
+ }
+ i++;
+ }
+
+ offunsafe=0;
+ offsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){ /*didn't want it to fail(we assume 0<i<length)*/
+ UTF16_FWD_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != fwd_N_unsafe[i]){
+ log_err("ERROR: Forward_N_unsafe offset expected:%d, Got:%d\n", fwd_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offunsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){ /*didn't want it to fail(we assume 0<i<length)*/
+ U16_FWD_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != fwd_N_unsafe[i]){
+ log_err("ERROR: U16_FWD_N_UNSAFE offset expected:%d, Got:%d\n", fwd_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ UTF16_FWD_N_SAFE(input, offsafe, sizeof(input)/U_SIZEOF_UCHAR, Nvalue[i]);
+ if(offsafe != fwd_N_safe[i]){
+ log_err("ERROR: Forward_N_safe offset expected:%d, Got:%d\n", fwd_N_safe[i], offsafe);
+ }
+
+ }
+
+ offsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ U16_FWD_N(input, offsafe, sizeof(input)/U_SIZEOF_UCHAR, Nvalue[i]);
+ if(offsafe != fwd_N_safe[i]){
+ log_err("ERROR: U16_FWD_N offset expected:%d, Got:%d\n", fwd_N_safe[i], offsafe);
+ }
+
+ }
+
+ offunsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){
+ UTF16_BACK_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != back_N_unsafe[i]){
+ log_err("ERROR: backward_N_unsafe offset expected:%d, Got:%d\n", back_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offunsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){
+ U16_BACK_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != back_N_unsafe[i]){
+ log_err("ERROR: U16_BACK_N_UNSAFE offset expected:%d, Got:%d\n", back_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ UTF16_BACK_N_SAFE(input, 0, offsafe, Nvalue[i]);
+ if(offsafe != back_N_safe[i]){
+ log_err("ERROR: backward_N_safe offset expected:%d, Got:%d\n", back_N_safe[i], offsafe);
+ }
+ }
+
+ offsafe=sizeof(input)/U_SIZEOF_UCHAR;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ U16_BACK_N(input, 0, offsafe, Nvalue[i]);
+ if(offsafe != back_N_safe[i]){
+ log_err("ERROR: U16_BACK_N offset expected:%d, Got:%d\n", back_N_safe[i], offsafe);
+ }
+ }
+}
+
+static void TestSetChar(){
+ static UChar input[]={0x0061, 0xd800, 0xdc00, 0xdbff, 0xdfff, 0x0062, 0xd841, 0xd7ff, 0xd841, 0xdc41, 0xdc00, 0x0000};
+ static uint16_t start_unsafe[]={0, 1, 1, 3, 3, 5, 6, 7, 8, 8, 9, 11};
+ static uint16_t start_safe[] ={0, 1, 1, 3, 3, 5, 6, 7, 8, 8, 10, 11};
+ static uint16_t limit_unsafe[]={0, 1, 3, 3, 5, 5, 6, 8, 8, 10, 10, 11};
+ static uint16_t limit_safe[] ={0, 1, 3, 3, 5, 5, 6, 7, 8, 10, 10, 11};
+
+ uint16_t i=0;
+ uint16_t offset=0, setOffset=0;
+ for(offset=0; offset<sizeof(input)/U_SIZEOF_UCHAR; offset++){
+ setOffset=offset;
+ UTF16_SET_CHAR_START_UNSAFE(input, setOffset);
+ if(setOffset != start_unsafe[i]){
+ log_err("ERROR: UTF16_SET_CHAR_START_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, start_unsafe[i], setOffset);
+ }
+
+ setOffset=offset;
+ U16_SET_CP_START_UNSAFE(input, setOffset);
+ if(setOffset != start_unsafe[i]){
+ log_err("ERROR: U16_SET_CHAR_START_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, start_unsafe[i], setOffset);
+ }
+
+ setOffset=offset;
+ UTF16_SET_CHAR_START_SAFE(input, 0, setOffset);
+ if(setOffset != start_safe[i]){
+ log_err("ERROR: UTF16_SET_CHAR_START_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, start_safe[i], setOffset);
+ }
+
+ setOffset=offset;
+ U16_SET_CP_START(input, 0, setOffset);
+ if(setOffset != start_safe[i]){
+ log_err("ERROR: U16_SET_CHAR_START failed for offset=%ld. Expected:%lx Got:%lx\n", offset, start_safe[i], setOffset);
+ }
+
+ if (offset > 0) {
+ setOffset=offset;
+ UTF16_SET_CHAR_LIMIT_UNSAFE(input, setOffset);
+ if(setOffset != limit_unsafe[i]){
+ log_err("ERROR: UTF16_SET_CHAR_LIMIT_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, limit_unsafe[i], setOffset);
+ }
+
+ setOffset=offset;
+ U16_SET_CP_LIMIT_UNSAFE(input, setOffset);
+ if(setOffset != limit_unsafe[i]){
+ log_err("ERROR: U16_SET_CHAR_LIMIT_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, limit_unsafe[i], setOffset);
+ }
+ }
+
+ setOffset=offset;
+ U16_SET_CP_LIMIT(input,0, setOffset, sizeof(input)/U_SIZEOF_UCHAR);
+ if(setOffset != limit_safe[i]){
+ log_err("ERROR: U16_SET_CHAR_LIMIT failed for offset=%ld. Expected:%lx Got:%lx\n", offset, limit_safe[i], setOffset);
+ }
+
+ i++;
+ }
+}
+
+static void TestAppendChar(){
+ static UChar s[5]={0x0061, 0x0062, 0x0063, 0x0064, 0x0000};
+ static uint32_t test[]={
+ /*append-position(unsafe), CHAR to be appended */
+ 0, 0x20441,
+ 2, 0x0028,
+ 2, 0xdc00,
+ 3, 0xd800,
+ 1, 0x20402,
+
+ /*append-position(safe), CHAR to be appended */
+ 0, 0x20441,
+ 2, 0xdc00,
+ 3, 0xd800,
+ 1, 0x20402,
+ 3, 0x20402,
+ 3, 0x10402,
+ 2, 0x10402,
+
+ };
+ static uint16_t movedOffset[]={
+ /*offset-moved-to(unsafe)*/
+ 2, /*for append-pos: 0 , CHAR 0x20441*/
+ 3,
+ 3,
+ 4,
+ 3,
+ /*offse-moved-to(safe)*/
+ 2, /*for append-pos: 0, CHAR 0x20441*/
+ 3,
+ 4,
+ 3,
+ 4,
+ 4,
+ 4
+ };
+
+ static UChar result[][5]={
+ /*unsafe*/
+ {0xd841, 0xdc41, 0x0063, 0x0064, 0x0000},
+ {0x0061, 0x0062, 0x0028, 0x0064, 0x0000},
+ {0x0061, 0x0062, 0xdc00, 0x0064, 0x0000},
+ {0x0061, 0x0062, 0x0063, 0xd800, 0x0000},
+ {0x0061, 0xd841, 0xdc02, 0x0064, 0x0000},
+
+ /*safe*/
+ {0xd841, 0xdc41, 0x0063, 0x0064, 0x0000},
+ {0x0061, 0x0062, 0xdc00, 0x0064, 0x0000},
+ {0x0061, 0x0062, 0x0063, 0xd800, 0x0000},
+ {0x0061, 0xd841, 0xdc02, 0x0064, 0x0000},
+ {0x0061, 0x0062, 0x0063, UTF_ERROR_VALUE, 0x0000},
+ {0x0061, 0x0062, 0x0063, UTF_ERROR_VALUE, 0x0000},
+ {0x0061, 0x0062, 0xd801, 0xdc02, 0x0000},
+
+
+ };
+ uint16_t i, count=0;
+ UChar *str=(UChar*)malloc(sizeof(UChar) * (u_strlen(s)+1));
+ uint16_t offset;
+ for(i=0; i<sizeof(test)/sizeof(test[0]); i=(uint16_t)(i+2)){
+ if(count<5){
+ u_strcpy(str, s);
+ offset=(uint16_t)test[i];
+ UTF16_APPEND_CHAR_UNSAFE(str, offset, test[i+1]);
+ if(offset != movedOffset[count]){
+ log_err("ERROR: UTF16_APPEND_CHAR_UNSAFE failed to move the offset correctly for count=%d.\nExpectedOffset=%d currentOffset=%d\n",
+ count, movedOffset[count], offset);
+
+ }
+ if(u_strcmp(str, result[count]) !=0){
+ log_err("ERROR: UTF16_APPEND_CHAR_UNSAFE failed for count=%d. Expected:", count);
+ printUChars(result[count]);
+ printf("\nGot:");
+ printUChars(str);
+ printf("\n");
+ }
+ }else{
+ u_strcpy(str, s);
+ offset=(uint16_t)test[i];
+ UTF16_APPEND_CHAR_SAFE(str, offset, (uint16_t)u_strlen(str), test[i+1]);
+ if(offset != movedOffset[count]){
+ log_err("ERROR: UTF16_APPEND_CHAR_SAFE failed to move the offset correctly for count=%d.\nExpectedOffset=%d currentOffset=%d\n",
+ count, movedOffset[count], offset);
+
+ }
+ if(u_strcmp(str, result[count]) !=0){
+ log_err("ERROR: UTF16_APPEND_CHAR_SAFE failed for count=%d. Expected:", count);
+ printUChars(result[count]);
+ printf("\nGot:");
+ printUChars(str);
+ printf("\n");
+ }
+ }
+ count++;
+ }
+ free(str);
+
+}
+
+static void TestAppend() {
+ static const UChar32 codePoints[]={
+ 0x61, 0xdf, 0x901, 0x3040,
+ 0xac00, 0xd800, 0xdbff, 0xdcde,
+ 0xdffd, 0xe000, 0xffff, 0x10000,
+ 0x12345, 0xe0021, 0x10ffff, 0x110000,
+ 0x234567, 0x7fffffff, -1, -1000,
+ 0, 0x400
+ };
+ static const UChar expectUnsafe[]={
+ 0x61, 0xdf, 0x901, 0x3040,
+ 0xac00, 0xd800, 0xdbff, 0xdcde,
+ 0xdffd, 0xe000, 0xffff, 0xd800, 0xdc00,
+ 0xd808, 0xdf45, 0xdb40, 0xdc21, 0xdbff, 0xdfff, /* not 0x110000 */
+ /* none from this line */
+ 0, 0x400
+ }, expectSafe[]={
+ 0x61, 0xdf, 0x901, 0x3040,
+ 0xac00, 0xd800, 0xdbff, 0xdcde,
+ 0xdffd, 0xe000, 0xffff, 0xd800, 0xdc00,
+ 0xd808, 0xdf45, 0xdb40, 0xdc21, 0xdbff, 0xdfff, /* not 0x110000 */
+ /* none from this line */
+ 0, 0x400
+ };
+
+ UChar buffer[100];
+ UChar32 c;
+ int32_t i, length;
+ UBool isError, expectIsError, wrongIsError;
+
+ length=0;
+ for(i=0; i<LENGTHOF(codePoints); ++i) {
+ c=codePoints[i];
+ if(c<0 || 0x10ffff<c) {
+ continue; /* skip non-code points for U16_APPEND_UNSAFE */
+ }
+
+ U16_APPEND_UNSAFE(buffer, length, c);
+ }
+ if(length!=LENGTHOF(expectUnsafe) || 0!=memcmp(buffer, expectUnsafe, length*U_SIZEOF_UCHAR)) {
+ log_err("U16_APPEND_UNSAFE did not generate the expected output\n");
+ }
+
+ length=0;
+ wrongIsError=FALSE;
+ for(i=0; i<LENGTHOF(codePoints); ++i) {
+ c=codePoints[i];
+ expectIsError= c<0 || 0x10ffff<c; /* || U_IS_SURROGATE(c); */ /* surrogates in UTF-32 shouldn't be used, but it's okay to pass them around internally. */
+ isError=FALSE;
+
+ U16_APPEND(buffer, length, LENGTHOF(buffer), c, isError);
+ wrongIsError|= isError!=expectIsError;
+ }
+ if(wrongIsError) {
+ log_err("U16_APPEND did not set isError correctly\n");
+ }
+ if(length!=LENGTHOF(expectSafe) || 0!=memcmp(buffer, expectSafe, length*U_SIZEOF_UCHAR)) {
+ log_err("U16_APPEND did not generate the expected output\n");
+ }
+}
+
+static void TestSurrogate(){
+ static UChar32 s[] = {0x10000, 0x10ffff, 0x50000, 0x100000, 0x1abcd};
+ int i = 0;
+ while (i < 5) {
+ UChar first = UTF_FIRST_SURROGATE(s[i]);
+ UChar second = UTF_SECOND_SURROGATE(s[i]);
+ /* algorithm from the Unicode consortium */
+ UChar firstresult = (UChar)(((s[i] - 0x10000) / 0x400) + 0xD800);
+ UChar secondresult = (UChar)(((s[i] - 0x10000) % 0x400) + 0xDC00);
+
+ if (first != UTF16_LEAD(s[i]) || first != U16_LEAD(s[i]) || first != firstresult) {
+ log_err("Failure in first surrogate in 0x%x expected to be 0x%x\n",
+ s[i], firstresult);
+ }
+ if (second != UTF16_TRAIL(s[i]) || second != U16_TRAIL(s[i]) || second != secondresult) {
+ log_err("Failure in second surrogate in 0x%x expected to be 0x%x\n",
+ s[i], secondresult);
+ }
+ i ++;
+ }
+}
+
+static void printUChars(const UChar *uchars){
+ int16_t i=0;
+ for(i=0; i<u_strlen(uchars); i++){
+ printf("%x ", *(uchars+i));
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/utf8tst.c b/Build/source/libs/icu/icu-xetex/test/cintltst/utf8tst.c
new file mode 100644
index 00000000000..eaa8fb28c54
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/utf8tst.c
@@ -0,0 +1,956 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1998-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File test.c
+*
+* Modification History:
+*
+* Date Name Description
+* 07/24/2000 Madhu Creation
+*******************************************************************************
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/utf8.h"
+#include "cmemory.h"
+#include "cintltst.h"
+
+#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
+
+/* lenient UTF-8 ------------------------------------------------------------ */
+
+/*
+ * Lenient UTF-8 differs from conformant UTF-8 in that it allows surrogate
+ * code points with their "natural" encoding.
+ * Effectively, this allows a mix of UTF-8 and CESU-8 as well as encodings of
+ * single surrogates.
+ *
+ * This is not conformant with UTF-8.
+ *
+ * Supplementary code points may be encoded as pairs of 3-byte sequences, but
+ * the macros below do not attempt to assemble such pairs.
+ */
+
+#define L8_NEXT(s, i, length, c) { \
+ (c)=(uint8_t)(s)[(i)++]; \
+ if((c)>=0x80) { \
+ if(U8_IS_LEAD(c)) { \
+ (c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (int32_t)(length), c, -2); \
+ } else { \
+ (c)=U_SENTINEL; \
+ } \
+ } \
+}
+
+#define L8_PREV(s, start, i, c) { \
+ (c)=(uint8_t)(s)[--(i)]; \
+ if((c)>=0x80) { \
+ if((c)<=0xbf) { \
+ (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -2); \
+ } else { \
+ (c)=U_SENTINEL; \
+ } \
+ } \
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void printUChars(const uint8_t *uchars, int16_t len);
+
+static void TestCodeUnitValues(void);
+static void TestCharLength(void);
+static void TestGetChar(void);
+static void TestNextPrevChar(void);
+static void TestFwdBack(void);
+static void TestSetChar(void);
+static void TestAppendChar(void);
+static void TestAppend(void);
+static void TestSurrogates(void);
+
+void addUTF8Test(TestNode** root);
+
+void
+addUTF8Test(TestNode** root)
+{
+ addTest(root, &TestCodeUnitValues, "utf8tst/TestCodeUnitValues");
+ addTest(root, &TestCharLength, "utf8tst/TestCharLength" );
+ addTest(root, &TestGetChar, "utf8tst/TestGetChar" );
+ addTest(root, &TestNextPrevChar, "utf8tst/TestNextPrevChar" );
+ addTest(root, &TestFwdBack, "utf8tst/TestFwdBack" );
+ addTest(root, &TestSetChar, "utf8tst/TestSetChar" );
+ addTest(root, &TestAppendChar, "utf8tst/TestAppendChar" );
+ addTest(root, &TestAppend, "utf8tst/TestAppend" );
+ addTest(root, &TestSurrogates, "utf8tst/TestSurrogates" );
+}
+
+static void TestCodeUnitValues()
+{
+ static const uint8_t codeunit[]={0x00, 0x65, 0x7e, 0x7f, 0xc0, 0xc4, 0xf0, 0xfd, 0x80, 0x81, 0xbc, 0xbe,};
+
+ int16_t i;
+ for(i=0; i<sizeof(codeunit)/sizeof(codeunit[0]); i++){
+ uint8_t c=codeunit[i];
+ log_verbose("Testing code unit value of %x\n", c);
+ if(i<4){
+ if(!UTF8_IS_SINGLE(c) || UTF8_IS_LEAD(c) || UTF8_IS_TRAIL(c) || !U8_IS_SINGLE(c) || U8_IS_LEAD(c) || U8_IS_TRAIL(c)){
+ log_err("ERROR: 0x%02x is a single byte but results in single: %c lead: %c trail: %c\n",
+ c, UTF8_IS_SINGLE(c) ? 'y' : 'n', UTF8_IS_LEAD(c) ? 'y' : 'n', UTF8_IS_TRAIL(c) ? 'y' : 'n');
+ }
+ } else if(i< 8){
+ if(!UTF8_IS_LEAD(c) || UTF8_IS_SINGLE(c) || UTF8_IS_TRAIL(c) || !U8_IS_LEAD(c) || U8_IS_SINGLE(c) || U8_IS_TRAIL(c)){
+ log_err("ERROR: 0x%02x is a lead byte but results in single: %c lead: %c trail: %c\n",
+ c, UTF8_IS_SINGLE(c) ? 'y' : 'n', UTF8_IS_LEAD(c) ? 'y' : 'n', UTF8_IS_TRAIL(c) ? 'y' : 'n');
+ }
+ } else if(i< 12){
+ if(!UTF8_IS_TRAIL(c) || UTF8_IS_SINGLE(c) || UTF8_IS_LEAD(c) || !U8_IS_TRAIL(c) || U8_IS_SINGLE(c) || U8_IS_LEAD(c)){
+ log_err("ERROR: 0x%02x is a trail byte but results in single: %c lead: %c trail: %c\n",
+ c, UTF8_IS_SINGLE(c) ? 'y' : 'n', UTF8_IS_LEAD(c) ? 'y' : 'n', UTF8_IS_TRAIL(c) ? 'y' : 'n');
+ }
+ }
+ }
+}
+
+static void TestCharLength()
+{
+ static const uint32_t codepoint[]={
+ 1, 0x0061,
+ 1, 0x007f,
+ 2, 0x016f,
+ 2, 0x07ff,
+ 3, 0x0865,
+ 3, 0x20ac,
+ 4, 0x20402,
+ 4, 0x23456,
+ 4, 0x24506,
+ 4, 0x20402,
+ 4, 0x10402,
+ 3, 0xd7ff,
+ 3, 0xe000,
+
+ };
+
+ int16_t i;
+ UBool multiple;
+ for(i=0; i<sizeof(codepoint)/sizeof(codepoint[0]); i=(int16_t)(i+2)){
+ UChar32 c=codepoint[i+1];
+ if(UTF8_CHAR_LENGTH(c) != (uint16_t)codepoint[i] || U8_LENGTH(c) != (uint16_t)codepoint[i]){
+ log_err("The no: of code units for %lx:- Expected: %d Got: %d\n", c, codepoint[i], UTF8_CHAR_LENGTH(c));
+ }else{
+ log_verbose("The no: of code units for %lx is %d\n",c, UTF8_CHAR_LENGTH(c) );
+ }
+ multiple=(UBool)(codepoint[i] == 1 ? FALSE : TRUE);
+ if(UTF8_NEED_MULTIPLE_UCHAR(c) != multiple){
+ log_err("ERROR: UTF8_NEED_MULTIPLE_UCHAR failed for %lx\n", c);
+ }
+ }
+}
+
+static void TestGetChar()
+{
+ static const uint8_t input[]={
+ /* code unit,*/
+ 0x61,
+ 0x7f,
+ 0xe4,
+ 0xba,
+ 0x8c,
+ 0xF0,
+ 0x90,
+ 0x90,
+ 0x81,
+ 0xc0,
+ 0x65,
+ 0x31,
+ 0x9a,
+ 0xc9
+ };
+ static const UChar32 result[]={
+ /*codepoint-unsafe, codepoint-safe(not strict) codepoint-safe(strict)*/
+ 0x61, 0x61, 0x61,
+ 0x7f, 0x7f, 0x7f,
+ 0x4e8c, 0x4e8c, 0x4e8c,
+ 0x4e8c, 0x4e8c, 0x4e8c ,
+ 0x4e8c, 0x4e8c, 0x4e8c,
+ 0x10401, 0x10401, 0x10401 ,
+ 0x10401, 0x10401, 0x10401 ,
+ 0x10401, 0x10401, 0x10401 ,
+ 0x10401, 0x10401, 0x10401,
+ 0x25, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x65, 0x65, 0x65,
+ 0x31, 0x31, 0x31,
+ 0x31, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x240, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1
+ };
+ uint16_t i=0;
+ UChar32 c;
+ uint32_t offset=0;
+
+ for(offset=0; offset<sizeof(input); offset++) {
+ if (offset < sizeof(input) - 1) {
+ UTF8_GET_CHAR_UNSAFE(input, offset, c);
+ if(c != result[i]){
+ log_err("ERROR: UTF8_GET_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+
+ }
+
+ U8_GET_UNSAFE(input, offset, c);
+ if(c != result[i]){
+ log_err("ERROR: U8_GET_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+
+ }
+ }
+
+ U8_GET(input, 0, offset, sizeof(input), c);
+ if(UTF_IS_ERROR(result[i+1]) ? c >= 0 : c != result[i+1]){
+ log_err("ERROR: UTF8_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, FALSE);
+ if(c != result[i+1]){
+ log_err("ERROR: UTF8_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, TRUE);
+ if(c != result[i+2]){
+ log_err("ERROR: UTF8_GET_CHAR_SAFE(strict) failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
+ }
+
+ i=(uint16_t)(i+3);
+ }
+}
+
+static void TestNextPrevChar(){
+ static const uint8_t input[]={0x61, 0xf0, 0x90, 0x90, 0x81, 0xc0, 0x80, 0xfd, 0xbe, 0xc2, 0x61, 0x81, 0x90, 0x90, 0xf0, 0x00};
+ static const UChar32 result[]={
+ /*next_unsafe next_safe_ns next_safe_s prev_unsafe prev_safe_ns prev_safe_s*/
+ 0x0061, 0x0061, 0x0061, 0x0000, 0x0000, 0x0000,
+ 0x10401, 0x10401, 0x10401, 0xf0, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x90, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0x2841410, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x90, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0xa1050, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x81, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0x2841, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x00, UTF8_ERROR_VALUE_2, UTF8_ERROR_VALUE_2, 0x61, 0x61, 0x61,
+ 0x80, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0xc2, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0xfd, UTF8_ERROR_VALUE_2, UTF8_ERROR_VALUE_2, 0x77e, UTF8_ERROR_VALUE_2, UTF8_ERROR_VALUE_2,
+ 0xbe, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0xfd, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0xa1, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0x00, UTF8_ERROR_VALUE_2, UTF8_ERROR_VALUE_2,
+ 0x61, 0x61, 0x61, 0xc0, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x81, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0x10401, 0x10401, 0x10401,
+ 0x90, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0x410, UTF_ERROR_VALUE, UTF_ERROR_VALUE,
+ 0x90, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0x410, UTF8_ERROR_VALUE_2, UTF8_ERROR_VALUE_2,
+ 0x0840, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1, 0xf0, UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_1,
+ 0x0000, 0x0000, 0x0000, 0x0061, 0x0061, 0x0061
+ };
+ static const int32_t movedOffset[]={
+ /*next_unsafe next_safe_ns next_safe_s prev_unsafe prev_safe_ns prev_safe_s*/
+ 1, 1, 1, 15, 15, 15,
+ 5, 5, 5, 14, 14 , 14,
+ 3, 3, 3, 9, 13, 13,
+ 4, 4, 4, 9, 12, 12,
+ 5, 5, 5, 9, 11, 11,
+ 7, 7, 7, 10, 10, 10,
+ 7, 7, 7, 9, 9, 9,
+ 8, 9, 9, 7, 7, 7,
+ 9, 9, 9, 7, 7, 7,
+ 11, 10, 10, 5, 5, 5,
+ 11, 11, 11, 5, 5, 5,
+ 12, 12, 12, 1, 1, 1,
+ 13, 13, 13, 1, 1, 1,
+ 14, 14, 14, 1, 1, 1,
+ 14, 15, 15, 1, 1, 1,
+ 14, 16, 16, 0, 0, 0,
+
+
+ };
+
+
+ UChar32 c=0x0000;
+ uint32_t i=0;
+ uint32_t offset=0;
+ int32_t setOffset=0;
+ for(offset=0; offset<sizeof(input); offset++){
+ if (offset < sizeof(input) - 2) { /* Can't have it go off the end of the array based on input */
+ setOffset=offset;
+ UTF8_NEXT_CHAR_UNSAFE(input, setOffset, c);
+ if(setOffset != movedOffset[i]){
+ log_err("ERROR: UTF8_NEXT_CHAR_UNSAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i], setOffset);
+ }
+ if(c != result[i]){
+ log_err("ERROR: UTF8_NEXT_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+ }
+
+ setOffset=offset;
+ U8_NEXT_UNSAFE(input, setOffset, c);
+ if(setOffset != movedOffset[i]){
+ log_err("ERROR: U8_NEXT_UNSAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i], setOffset);
+ }
+ if(c != result[i]){
+ log_err("ERROR: U8_NEXT_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c);
+ }
+ }
+
+ setOffset=offset;
+ UTF8_NEXT_CHAR_SAFE(input, setOffset, sizeof(input), c, FALSE);
+ if(setOffset != movedOffset[i+1]){
+ log_err("ERROR: UTF8_NEXT_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+1], setOffset);
+ }
+ if(c != result[i+1]){
+ log_err("ERROR: UTF8_NEXT_CHAR_SAFE failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ setOffset=offset;
+ U8_NEXT(input, setOffset, sizeof(input), c);
+ if(setOffset != movedOffset[i+1]){
+ log_err("ERROR: U8_NEXT failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+1], setOffset);
+ }
+ if(UTF_IS_ERROR(result[i+1]) ? c >= 0 : c != result[i+1]){
+ log_err("ERROR: U8_NEXT failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
+ }
+
+ setOffset=offset;
+ UTF8_NEXT_CHAR_SAFE(input, setOffset, sizeof(input), c, TRUE);
+ if(setOffset != movedOffset[i+1]){
+ log_err("ERROR: UTF8_NEXT_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+2], setOffset);
+ }
+ if(c != result[i+2]){
+ log_err("ERROR: UTF8_NEXT_CHAR_SAFE(strict) failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
+ }
+
+ i=i+6;
+ }
+
+ i=0;
+ for(offset=sizeof(input); offset > 0; --offset){
+ setOffset=offset;
+ UTF8_PREV_CHAR_UNSAFE(input, setOffset, c);
+ if(setOffset != movedOffset[i+3]){
+ log_err("ERROR: UTF8_PREV_CHAR_UNSAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+3], setOffset);
+ }
+ if(c != result[i+3]){
+ log_err("ERROR: UTF8_PREV_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+3], c);
+ }
+
+ setOffset=offset;
+ UTF8_PREV_CHAR_SAFE(input, 0, setOffset, c, FALSE);
+ if(setOffset != movedOffset[i+4]){
+ log_err("ERROR: UTF8_PREV_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+4], setOffset);
+ }
+ if(c != result[i+4]){
+ log_err("ERROR: UTF8_PREV_CHAR_SAFE failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+4], c);
+ }
+
+ setOffset=offset;
+ U8_PREV(input, 0, setOffset, c);
+ if(setOffset != movedOffset[i+4]){
+ log_err("ERROR: U8_PREV failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+4], setOffset);
+ }
+ if(UTF_IS_ERROR(result[i+4]) ? c >= 0 : c != result[i+4]){
+ log_err("ERROR: U8_PREV failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+4], c);
+ }
+
+ setOffset=offset;
+ UTF8_PREV_CHAR_SAFE(input, 0, setOffset, c, TRUE);
+ if(setOffset != movedOffset[i+5]){
+ log_err("ERROR: UTF8_PREV_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
+ offset, movedOffset[i+5], setOffset);
+ }
+ if(c != result[i+5]){
+ log_err("ERROR: UTF8_PREV_CHAR_SAFE(strict) failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+5], c);
+ }
+
+ i=i+6;
+ }
+
+ {
+ /* test non-characters */
+ static const uint8_t nonChars[]={
+ 0xef, 0xb7, 0x90, /* U+fdd0 */
+ 0xef, 0xbf, 0xbf, /* U+feff */
+ 0xf0, 0x9f, 0xbf, 0xbe, /* U+1fffe */
+ 0xf0, 0xbf, 0xbf, 0xbf, /* U+3ffff */
+ 0xf4, 0x8f, 0xbf, 0xbe /* U+10fffe */
+ };
+
+ UChar32 ch;
+ int32_t idx;
+
+ for(idx=0; idx<(int32_t)sizeof(nonChars);) {
+ U8_NEXT(nonChars, idx, sizeof(nonChars), ch);
+ if(!U_IS_UNICODE_NONCHAR(ch)) {
+ log_err("U8_NEXT(before %d) failed to read a non-character\n", idx);
+ }
+ }
+ for(idx=(int32_t)sizeof(nonChars); idx>0;) {
+ U8_PREV(nonChars, 0, idx, ch);
+ if(!U_IS_UNICODE_NONCHAR(ch)) {
+ log_err("U8_PREV(at %d) failed to read a non-character\n", idx);
+ }
+ }
+ }
+}
+
+static void TestFwdBack(){
+ static const uint8_t input[]={0x61, 0xF0, 0x90, 0x90, 0x81, 0xff, 0x62, 0xc0, 0x80, 0x7f, 0x8f, 0xc0, 0x63, 0x81, 0x90, 0x90, 0xF0, 0x00};
+ static const uint16_t fwd_unsafe[] ={1, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 20, };
+ static const uint16_t fwd_safe[] ={1, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18};
+ static const uint16_t back_unsafe[]={17, 16, 12, 11, 9, 7, 6, 5, 1, 0};
+ static const uint16_t back_safe[] ={17, 16, 15, 14, 13, 12, 11, 10, 9, 7, 6, 5, 1, 0};
+
+ static const uint16_t Nvalue[]= {0, 1, 2, 3, 1, 2, 1, 5};
+ static const uint16_t fwd_N_unsafe[] ={0, 1, 6, 10, 11, 14, 15};
+ static const uint16_t fwd_N_safe[] ={0, 1, 6, 10, 11, 13, 14, 18}; /*safe macro keeps it at the end of the string */
+ static const uint16_t back_N_unsafe[]={18, 17, 12, 7, 6, 1, 0};
+ static const uint16_t back_N_safe[] ={18, 17, 15, 12, 11, 9, 7, 0};
+
+
+ uint32_t offunsafe=0, offsafe=0;
+
+ uint32_t i=0;
+ while(offunsafe < sizeof(input)){
+ UTF8_FWD_1_UNSAFE(input, offunsafe);
+ if(offunsafe != fwd_unsafe[i]){
+ log_err("ERROR: Forward_unsafe offset expected:%d, Got:%d\n", fwd_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ while(offunsafe < sizeof(input)){
+ U8_FWD_1_UNSAFE(input, offunsafe);
+ if(offunsafe != fwd_unsafe[i]){
+ log_err("ERROR: U8_FWD_1_UNSAFE offset expected:%d, Got:%d\n", fwd_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ while(offsafe < sizeof(input)){
+ UTF8_FWD_1_SAFE(input, offsafe, sizeof(input));
+ if(offsafe != fwd_safe[i]){
+ log_err("ERROR: Forward_safe offset expected:%d, Got:%d\n", fwd_safe[i], offsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ while(offsafe < sizeof(input)){
+ U8_FWD_1(input, offsafe, sizeof(input));
+ if(offsafe != fwd_safe[i]){
+ log_err("ERROR: U8_FWD_1 offset expected:%d, Got:%d\n", fwd_safe[i], offsafe);
+ }
+ i++;
+ }
+
+ offunsafe=sizeof(input);
+ i=0;
+ while(offunsafe > 0){
+ UTF8_BACK_1_UNSAFE(input, offunsafe);
+ if(offunsafe != back_unsafe[i]){
+ log_err("ERROR: Backward_unsafe offset expected:%d, Got:%d\n", back_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ offunsafe=sizeof(input);
+ i=0;
+ while(offunsafe > 0){
+ U8_BACK_1_UNSAFE(input, offunsafe);
+ if(offunsafe != back_unsafe[i]){
+ log_err("ERROR: U8_BACK_1_UNSAFE offset expected:%d, Got:%d\n", back_unsafe[i], offunsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ offsafe=sizeof(input);
+ while(offsafe > 0){
+ UTF8_BACK_1_SAFE(input, 0, offsafe);
+ if(offsafe != back_safe[i]){
+ log_err("ERROR: Backward_safe offset expected:%d, Got:%d\n", back_unsafe[i], offsafe);
+ }
+ i++;
+ }
+
+ i=0;
+ offsafe=sizeof(input);
+ while(offsafe > 0){
+ U8_BACK_1(input, 0, offsafe);
+ if(offsafe != back_safe[i]){
+ log_err("ERROR: U8_BACK_1 offset expected:%d, Got:%d\n", back_unsafe[i], offsafe);
+ }
+ i++;
+ }
+
+ offunsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){
+ UTF8_FWD_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != fwd_N_unsafe[i]){
+ log_err("ERROR: Forward_N_unsafe offset=%d expected:%d, Got:%d\n", i, fwd_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offunsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){
+ U8_FWD_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != fwd_N_unsafe[i]){
+ log_err("ERROR: U8_FWD_N_UNSAFE offset=%d expected:%d, Got:%d\n", i, fwd_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ UTF8_FWD_N_SAFE(input, offsafe, sizeof(input), Nvalue[i]);
+ if(offsafe != fwd_N_safe[i]){
+ log_err("ERROR: Forward_N_safe offset=%d expected:%d, Got:%d\n", i, fwd_N_safe[i], offsafe);
+ }
+
+ }
+
+ offsafe=0;
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ U8_FWD_N(input, offsafe, sizeof(input), Nvalue[i]);
+ if(offsafe != fwd_N_safe[i]){
+ log_err("ERROR: U8_FWD_N offset=%d expected:%d, Got:%d\n", i, fwd_N_safe[i], offsafe);
+ }
+
+ }
+
+ offunsafe=sizeof(input);
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){
+ UTF8_BACK_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != back_N_unsafe[i]){
+ log_err("ERROR: backward_N_unsafe offset=%d expected:%d, Got:%d\n", i, back_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offunsafe=sizeof(input);
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0])-2; i++){
+ U8_BACK_N_UNSAFE(input, offunsafe, Nvalue[i]);
+ if(offunsafe != back_N_unsafe[i]){
+ log_err("ERROR: U8_BACK_N_UNSAFE offset=%d expected:%d, Got:%d\n", i, back_N_unsafe[i], offunsafe);
+ }
+ }
+
+ offsafe=sizeof(input);
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ UTF8_BACK_N_SAFE(input, 0, offsafe, Nvalue[i]);
+ if(offsafe != back_N_safe[i]){
+ log_err("ERROR: backward_N_safe offset=%d expected:%d, Got:%ld\n", i, back_N_safe[i], offsafe);
+ }
+ }
+
+ offsafe=sizeof(input);
+ for(i=0; i<sizeof(Nvalue)/sizeof(Nvalue[0]); i++){
+ U8_BACK_N(input, 0, offsafe, Nvalue[i]);
+ if(offsafe != back_N_safe[i]){
+ log_err("ERROR: U8_BACK_N offset=%d expected:%d, Got:%ld\n", i, back_N_safe[i], offsafe);
+ }
+ }
+}
+
+static void TestSetChar(){
+ static const uint8_t input[]
+ = {0x61, 0xe4, 0xba, 0x8c, 0x7f, 0xfe, 0x62, 0xc5, 0x7f, 0x61, 0x80, 0x80, 0xe0, 0x00 };
+ static const int16_t start_unsafe[]
+ = {0, 1, 1, 1, 4, 5, 6, 7, 8, 9, 9, 9, 12, 13 };
+ static const int16_t start_safe[]
+ = {0, 1, 1, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 };
+ static const int16_t limit_unsafe[]
+ = {0, 1, 4, 4, 4, 5, 6, 7, 9, 9, 10, 10, 10, 15 };
+ static const int16_t limit_safe[]
+ = {0, 1, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 };
+
+ uint32_t i=0;
+ int32_t offset=0, setOffset=0;
+ for(offset=0; offset<(int32_t)sizeof(input); offset++){
+ setOffset=offset;
+ UTF8_SET_CHAR_START_UNSAFE(input, setOffset);
+ if(setOffset != start_unsafe[i]){
+ log_err("ERROR: UTF8_SET_CHAR_START_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_unsafe[i], setOffset);
+ }
+
+ setOffset=offset;
+ U8_SET_CP_START_UNSAFE(input, setOffset);
+ if(setOffset != start_unsafe[i]){
+ log_err("ERROR: U8_SET_CP_START_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_unsafe[i], setOffset);
+ }
+
+ setOffset=offset;
+ UTF8_SET_CHAR_START_SAFE(input, 0, setOffset);
+ if(setOffset != start_safe[i]){
+ log_err("ERROR: UTF8_SET_CHAR_START_SAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_safe[i], setOffset);
+ }
+
+ setOffset=offset;
+ U8_SET_CP_START(input, 0, setOffset);
+ if(setOffset != start_safe[i]){
+ log_err("ERROR: U8_SET_CP_START failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_safe[i], setOffset);
+ }
+
+ if (offset != 0) { /* Can't have it go off the end of the array */
+ setOffset=offset;
+ UTF8_SET_CHAR_LIMIT_UNSAFE(input, setOffset);
+ if(setOffset != limit_unsafe[i]){
+ log_err("ERROR: UTF8_SET_CHAR_LIMIT_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_unsafe[i], setOffset);
+ }
+
+ setOffset=offset;
+ U8_SET_CP_LIMIT_UNSAFE(input, setOffset);
+ if(setOffset != limit_unsafe[i]){
+ log_err("ERROR: U8_SET_CP_LIMIT_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_unsafe[i], setOffset);
+ }
+ }
+
+ setOffset=offset;
+ UTF8_SET_CHAR_LIMIT_SAFE(input,0, setOffset, sizeof(input));
+ if(setOffset != limit_safe[i]){
+ log_err("ERROR: UTF8_SET_CHAR_LIMIT_SAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_safe[i], setOffset);
+ }
+
+ setOffset=offset;
+ U8_SET_CP_LIMIT(input,0, setOffset, sizeof(input));
+ if(setOffset != limit_safe[i]){
+ log_err("ERROR: U8_SET_CP_LIMIT failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_safe[i], setOffset);
+ }
+
+ i++;
+ }
+}
+
+static void TestAppendChar(){
+ static const uint8_t s[11]={0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00};
+ static const uint32_t test[]={
+ /*append-position(unsafe), CHAR to be appended */
+ 0, 0x10401,
+ 2, 0x0028,
+ 2, 0x007f,
+ 3, 0xd801,
+ 1, 0x20402,
+ 8, 0x10401,
+ 5, 0xc0,
+ 5, 0xc1,
+ 5, 0xfd,
+ 6, 0x80,
+ 6, 0x81,
+ 6, 0xbf,
+ 7, 0xfe,
+
+ /*append-position(safe), CHAR to be appended */
+ 0, 0x10401,
+ 2, 0x0028,
+ 3, 0x7f,
+ 3, 0xd801, /* illegal for UTF-8 starting with Unicode 3.2 */
+ 1, 0x20402,
+ 9, 0x10401,
+ 5, 0xc0,
+ 5, 0xc1,
+ 5, 0xfd,
+ 6, 0x80,
+ 6, 0x81,
+ 6, 0xbf,
+ 7, 0xfe,
+
+ };
+ static const uint16_t movedOffset[]={
+ /*offset-moved-to(unsafe)*/
+ 4, /*for append-pos: 0 , CHAR 0x10401*/
+ 3,
+ 3,
+ 6,
+ 5,
+ 12,
+ 7,
+ 7,
+ 7,
+ 8,
+ 8,
+ 8,
+ 9,
+
+ /*offset-moved-to(safe)*/
+ 4, /*for append-pos: 0, CHAR 0x10401*/
+ 3,
+ 4,
+ 6,
+ 5,
+ 11,
+ 7,
+ 7,
+ 7,
+ 8,
+ 8,
+ 8,
+ 9,
+
+ };
+
+ static const uint8_t result[][11]={
+ /*unsafe*/
+ {0xF0, 0x90, 0x90, 0x81, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x28, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x7f, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0xed, 0xa0, 0x81, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0xF0, 0xa0, 0x90, 0x82, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0xF0, 0x90, 0x90},
+
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0xc3, 0x80, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0xc3, 0x81, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0xc3, 0xbd, 0x68, 0x69, 0x6a, 0x00},
+
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0xc2, 0x80, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0xc2, 0x81, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0xc2, 0xbf, 0x69, 0x6a, 0x00},
+
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0xc3, 0xbe, 0x6a, 0x00},
+ /*safe*/
+ {0xF0, 0x90, 0x90, 0x81, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x28, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x7f, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0xef, 0xbf, 0xbf, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0xF0, 0xa0, 0x90, 0x82, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xc2, 0x9f}, /*gets UTF8_ERROR_VALUE_2 which takes 2 bytes 0xc0, 0x9f*/
+
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0xc3, 0x80, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0xc3, 0x81, 0x68, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0xc3, 0xbd, 0x68, 0x69, 0x6a, 0x00},
+
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0xc2, 0x80, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0xc2, 0x81, 0x69, 0x6a, 0x00},
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0xc2, 0xbf, 0x69, 0x6a, 0x00},
+
+ {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0xc3, 0xbe, 0x6a, 0x00},
+
+ };
+ uint16_t i, count=0;
+ uint8_t str[12];
+ uint32_t offset;
+/* UChar32 c=0;*/
+ uint16_t size=sizeof(s)/sizeof(s[0]);
+ for(i=0; i<sizeof(test)/sizeof(test[0]); i=(uint16_t)(i+2)){
+ uprv_memcpy(str, s, size);
+ offset=test[i];
+ if(count<13){
+ UTF8_APPEND_CHAR_UNSAFE(str, offset, test[i+1]);
+ if(offset != movedOffset[count]){
+ log_err("ERROR: UTF8_APPEND_CHAR_UNSAFE failed to move the offset correctly for count=%d.\nExpectedOffset=%d currentOffset=%d\n",
+ count, movedOffset[count], offset);
+
+ }
+ if(uprv_memcmp(str, result[count], size) !=0){
+ log_err("ERROR: UTF8_APPEND_CHAR_UNSAFE failed for count=%d. \nExpected:", count);
+ printUChars(result[count], size);
+ log_err("\nGot: ");
+ printUChars(str, size);
+ log_err("\n");
+ }
+ }else{
+ UTF8_APPEND_CHAR_SAFE(str, offset, size, test[i+1]);
+ if(offset != movedOffset[count]){
+ log_err("ERROR: UTF8_APPEND_CHAR_SAFE failed to move the offset correctly for count=%d.\nExpectedOffset=%d currentOffset=%d\n",
+ count, movedOffset[count], offset);
+
+ }
+ if(uprv_memcmp(str, result[count], size) !=0){
+ log_err("ERROR: UTF8_APPEND_CHAR_SAFE failed for count=%d. \nExpected:", count);
+ printUChars(result[count], size);
+ log_err("\nGot: ");
+ printUChars(str, size);
+ log_err("\n");
+ }
+ /*call the API instead of MACRO
+ uprv_memcpy(str, s, size);
+ offset=test[i];
+ c=test[i+1];
+ if((uint32_t)(c)<=0x7f) {
+ (str)[(offset)++]=(uint8_t)(c);
+ } else {
+ (offset)=utf8_appendCharSafeBody(str, (int32_t)(offset), (int32_t)(size), c);
+ }
+ if(offset != movedOffset[count]){
+ log_err("ERROR: utf8_appendCharSafeBody() failed to move the offset correctly for count=%d.\nExpectedOffset=%d currentOffset=%d\n",
+ count, movedOffset[count], offset);
+
+ }
+ if(uprv_memcmp(str, result[count], size) !=0){
+ log_err("ERROR: utf8_appendCharSafeBody() failed for count=%d. \nExpected:", count);
+ printUChars(result[count], size);
+ printf("\nGot: ");
+ printUChars(str, size);
+ printf("\n");
+ }
+ */
+ }
+ count++;
+ }
+
+
+}
+
+static void TestAppend() {
+ static const UChar32 codePoints[]={
+ 0x61, 0xdf, 0x901, 0x3040,
+ 0xac00, 0xd800, 0xdbff, 0xdcde,
+ 0xdffd, 0xe000, 0xffff, 0x10000,
+ 0x12345, 0xe0021, 0x10ffff, 0x110000,
+ 0x234567, 0x7fffffff, -1, -1000,
+ 0, 0x400
+ };
+ static const uint8_t expectUnsafe[]={
+ 0x61, 0xc3, 0x9f, 0xe0, 0xa4, 0x81, 0xe3, 0x81, 0x80,
+ 0xea, 0xb0, 0x80, 0xed, 0xa0, 0x80, 0xed, 0xaf, 0xbf, 0xed, 0xb3, 0x9e,
+ 0xed, 0xbf, 0xbd, 0xee, 0x80, 0x80, 0xef, 0xbf, 0xbf, 0xf0, 0x90, 0x80, 0x80,
+ 0xf0, 0x92, 0x8d, 0x85, 0xf3, 0xa0, 0x80, 0xa1, 0xf4, 0x8f, 0xbf, 0xbf, /* not 0x110000 */
+ /* none from this line */
+ 0, 0xd0, 0x80
+ }, expectSafe[]={
+ 0x61, 0xc3, 0x9f, 0xe0, 0xa4, 0x81, 0xe3, 0x81, 0x80,
+ 0xea, 0xb0, 0x80, /* no surrogates */
+ /* no surrogates */ 0xee, 0x80, 0x80, 0xef, 0xbf, 0xbf, 0xf0, 0x90, 0x80, 0x80,
+ 0xf0, 0x92, 0x8d, 0x85, 0xf3, 0xa0, 0x80, 0xa1, 0xf4, 0x8f, 0xbf, 0xbf, /* not 0x110000 */
+ /* none from this line */
+ 0, 0xd0, 0x80
+ };
+
+ uint8_t buffer[100];
+ UChar32 c;
+ int32_t i, length;
+ UBool isError, expectIsError, wrongIsError;
+
+ length=0;
+ for(i=0; i<LENGTHOF(codePoints); ++i) {
+ c=codePoints[i];
+ if(c<0 || 0x10ffff<c) {
+ continue; /* skip non-code points for U8_APPEND_UNSAFE */
+ }
+
+ U8_APPEND_UNSAFE(buffer, length, c);
+ }
+ if(length!=LENGTHOF(expectUnsafe) || 0!=memcmp(buffer, expectUnsafe, length)) {
+ log_err("U8_APPEND_UNSAFE did not generate the expected output\n");
+ }
+
+ length=0;
+ wrongIsError=FALSE;
+ for(i=0; i<LENGTHOF(codePoints); ++i) {
+ c=codePoints[i];
+ expectIsError= c<0 || 0x10ffff<c || U_IS_SURROGATE(c);
+ isError=FALSE;
+
+ U8_APPEND(buffer, length, LENGTHOF(buffer), c, isError);
+ wrongIsError|= isError!=expectIsError;
+ }
+ if(wrongIsError) {
+ log_err("U8_APPEND did not set isError correctly\n");
+ }
+ if(length!=LENGTHOF(expectSafe) || 0!=memcmp(buffer, expectSafe, length)) {
+ log_err("U8_APPEND did not generate the expected output\n");
+ }
+}
+
+static void
+TestSurrogates() {
+ static const uint8_t b[]={
+ 0xc3, 0x9f, /* 00DF */
+ 0xed, 0x9f, 0xbf, /* D7FF */
+ 0xed, 0xa0, 0x81, /* D801 */
+ 0xed, 0xbf, 0xbe, /* DFFE */
+ 0xee, 0x80, 0x80, /* E000 */
+ 0xf0, 0x97, 0xbf, 0xbe /* 17FFE */
+ };
+ static const UChar32 cp[]={
+ 0xdf, 0xd7ff, 0xd801, 0xdffe, 0xe000, 0x17ffe
+ };
+
+ UChar32 cu, cs, cl;
+ int32_t i, j, k, iu, is, il, length;
+
+ k=0; /* index into cp[] */
+ length=LENGTHOF(b);
+ for(i=0; i<length;) {
+ j=i;
+ U8_NEXT_UNSAFE(b, j, cu);
+ iu=j;
+
+ j=i;
+ U8_NEXT(b, j, length, cs);
+ is=j;
+
+ j=i;
+ L8_NEXT(b, j, length, cl);
+ il=j;
+
+ if(cu!=cp[k]) {
+ log_err("U8_NEXT_UNSAFE(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cu, (long)cp[k]);
+ }
+
+ /* U8_NEXT() returns <0 for surrogate code points */
+ if(U_IS_SURROGATE(cu) ? cs>=0 : cs!=cu) {
+ log_err("U8_NEXT(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cs, (long)cu);
+ }
+
+ /* L8_NEXT() returns surrogate code points like U8_NEXT_UNSAFE() */
+ if(cl!=cu) {
+ log_err("L8_NEXT(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cl, (long)cu);
+ }
+
+ if(is!=iu || il!=iu) {
+ log_err("U8_NEXT(b[%ld]) or L8_NEXT(b[%ld]) did not advance the index correctly\n", (long)i, (long)i);
+ }
+
+ ++k; /* next code point */
+ i=iu; /* advance by one UTF-8 sequence */
+ }
+
+ while(i>0) {
+ --k; /* previous code point */
+
+ j=i;
+ U8_PREV_UNSAFE(b, j, cu);
+ iu=j;
+
+ j=i;
+ U8_PREV(b, 0, j, cs);
+ is=j;
+
+ j=i;
+ L8_PREV(b, 0, j, cl);
+ il=j;
+
+ if(cu!=cp[k]) {
+ log_err("U8_PREV_UNSAFE(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cu, (long)cp[k]);
+ }
+
+ /* U8_PREV() returns <0 for surrogate code points */
+ if(U_IS_SURROGATE(cu) ? cs>=0 : cs!=cu) {
+ log_err("U8_PREV(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cs, (long)cu);
+ }
+
+ /* L8_PREV() returns surrogate code points like U8_PREV_UNSAFE() */
+ if(cl!=cu) {
+ log_err("L8_PREV(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cl, (long)cu);
+ }
+
+ if(is!=iu || il !=iu) {
+ log_err("U8_PREV(b[%ld]) or L8_PREV(b[%ld]) did not advance the index correctly\n", (long)i, (long)i);
+ }
+
+ i=iu; /* go back by one UTF-8 sequence */
+ }
+}
+
+static void printUChars(const uint8_t *uchars, int16_t len){
+ int16_t i=0;
+ for(i=0; i<len; i++){
+ log_err("0x%02x ", *(uchars+i));
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/utmstest.c b/Build/source/libs/icu/icu-xetex/test/cintltst/utmstest.c
new file mode 100644
index 00000000000..069a8039479
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/utmstest.c
@@ -0,0 +1,487 @@
+/*
+ ****************************************************************************
+ * Copyright (c) 1997-2007, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ ****************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/utmscale.h"
+#include "unicode/ucal.h"
+
+#include "cintltst.h"
+
+#include <stdlib.h>
+#include <time.h>
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+#define LOOP_COUNT 10000
+
+static void TestAPI(void);
+static void TestData(void);
+static void TestMonkey(void);
+static void TestDotNet(void);
+
+void addUtmsTest(TestNode** root);
+
+void addUtmsTest(TestNode** root)
+{
+ addTest(root, &TestAPI, "tsformat/utmstest/TestAPI");
+ addTest(root, &TestData, "tsformat/utmstest/TestData");
+ addTest(root, &TestMonkey, "tsformat/utmstest/TestMonkey");
+ addTest(root, &TestDotNet, "tsformat/utmstest/TestDotNet");
+}
+
+/**
+ * Return a random int64_t where U_INT64_MIN <= ran <= U_INT64_MAX.
+ */
+static uint64_t randomInt64(void)
+{
+ int64_t ran = 0;
+ int32_t i;
+ static UBool initialized = FALSE;
+
+ if (!initialized) {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+
+ /* Assume rand has at least 12 bits of precision */
+ for (i = 0; i < sizeof(ran); i += 1) {
+ ((char*)&ran)[i] = (char)((rand() & 0x0FF0) >> 4);
+ }
+
+ return ran;
+}
+
+static int64_t ranInt;
+static int64_t ranMin;
+static int64_t ranMax;
+
+static void initRandom(int64_t min, int64_t max)
+{
+ uint64_t interval = max - min;
+
+ ranMin = min;
+ ranMax = max;
+ ranInt = 0;
+
+ /* Verify that we don't have a huge interval. */
+ if (interval < (uint64_t)U_INT64_MAX) {
+ ranInt = interval;
+ }
+}
+
+static int64_t randomInRange(void)
+{
+ int64_t value;
+
+ if (ranInt != 0) {
+ value = randomInt64() % ranInt;
+
+ if (value < 0) {
+ value = -value;
+ }
+
+ value += ranMin;
+ } else {
+ do {
+ value = randomInt64();
+ } while (value < ranMin || value > ranMax);
+ }
+
+ return value;
+}
+
+static void roundTripTest(int64_t value, UDateTimeScale scale)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int64_t rt = utmscale_toInt64(utmscale_fromInt64(value, scale, &status), scale, &status);
+
+ if (rt != value) {
+ log_err("Round-trip error: time scale = %d, value = %lld, round-trip = %lld.\n", scale, value, rt);
+ }
+}
+
+static void toLimitTest(int64_t toLimit, int64_t fromLimit, UDateTimeScale scale)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int64_t result = utmscale_toInt64(toLimit, scale, &status);
+
+ if (result != fromLimit) {
+ log_err("toLimit failure: scale = %d, toLimit = %lld , utmscale_toInt64(toLimit, scale, &status) = %lld, fromLimit = %lld.\n",
+ scale, toLimit, result, fromLimit);
+ }
+}
+
+static void epochOffsetTest(int64_t epochOffset, int64_t units, UDateTimeScale scale)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int64_t universal = 0;
+ int64_t universalEpoch = epochOffset * units;
+ int64_t local = utmscale_toInt64(universalEpoch, scale, &status);
+
+ if (local != 0) {
+ log_err("utmscale_toInt64(epochOffset, scale, &status): scale = %d epochOffset = %lld, result = %lld.\n", scale, epochOffset, local);
+ }
+
+ local = utmscale_toInt64(0, scale, &status);
+
+ if (local != -epochOffset) {
+ log_err("utmscale_toInt64(0, scale): scale = %d, result = %lld.\n", scale, local);
+ }
+
+ universal = utmscale_fromInt64(-epochOffset, scale, &status);
+
+ if (universal != 0) {
+ log_err("from(-epochOffest, scale): scale = %d, epochOffset = %lld, result = %lld.\n", scale, epochOffset, universal);
+ }
+
+ universal = utmscale_fromInt64(0, scale, &status);
+
+ if (universal != universalEpoch) {
+ log_err("utmscale_fromInt64(0, scale): scale = %d, result = %lld.\n", scale, universal);
+ }
+}
+
+static void TestEpochOffsets(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t scale;
+
+ for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) {
+ int64_t units = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_UNITS_VALUE, &status);
+ int64_t epochOffset = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_EPOCH_OFFSET_VALUE, &status);
+
+ epochOffsetTest(epochOffset, units, (UDateTimeScale)scale);
+ }
+}
+
+static void TestFromLimits(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t scale;
+
+ for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) {
+ int64_t fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status);
+ int64_t fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status);
+
+ roundTripTest(fromMin, (UDateTimeScale)scale);
+ roundTripTest(fromMax, (UDateTimeScale)scale);
+ }
+}
+
+static void TestToLimits(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t scale;
+
+ for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) {
+ int64_t fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status);
+ int64_t fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status);
+ int64_t toMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_TO_MIN_VALUE, &status);
+ int64_t toMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_TO_MAX_VALUE, &status);
+
+ toLimitTest(toMin, fromMin, (UDateTimeScale)scale);
+ toLimitTest(toMax, fromMax, (UDateTimeScale)scale);
+ }
+}
+
+static void TestFromInt64(void)
+{
+ int32_t scale;
+ int64_t result;
+ UErrorCode status = U_ZERO_ERROR;
+
+ result = utmscale_fromInt64(0, -1, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_fromInt64(0, -1, status) did not set status to U_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) {
+ int64_t fromMin, fromMax;
+
+ status = U_ZERO_ERROR;
+ fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status);
+ fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status);
+
+ status = U_ZERO_ERROR;
+ result = utmscale_fromInt64(0, (UDateTimeScale)scale, &status);
+ if (status == U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_fromInt64(0, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+
+ status = U_ZERO_ERROR;
+ result = utmscale_fromInt64(fromMin, (UDateTimeScale)scale, &status);
+ if (status == U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_fromInt64(fromMin, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+
+ if (fromMin > U_INT64_MIN) {
+ status = U_ZERO_ERROR;
+ result = utmscale_fromInt64(fromMin - 1, (UDateTimeScale)scale, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_fromInt64(fromMin - 1, %d, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ result = utmscale_fromInt64(fromMax, (UDateTimeScale)scale, &status);
+ if (status == U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_fromInt64(fromMax, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+
+ if (fromMax < U_INT64_MAX) {
+ status = U_ZERO_ERROR;
+ result = utmscale_fromInt64(fromMax + 1, (UDateTimeScale)scale, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_fromInt64(fromMax + 1, %d, &status) didn't generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ result = utmscale_fromInt64(0, UDTS_MAX_SCALE, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_fromInt64(0, UDTS_MAX_SCALE, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+}
+
+static void TestToInt64(void)
+{
+ int32_t scale;
+ int64_t result;
+ UErrorCode status = U_ZERO_ERROR;
+
+ result = utmscale_toInt64(0, -1, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_toInt64(0, -1, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) {
+ int64_t toMin, toMax;
+
+ status = U_ZERO_ERROR;
+ toMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_TO_MIN_VALUE, &status);
+ toMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_TO_MAX_VALUE, &status);
+
+ status = U_ZERO_ERROR;
+ result = utmscale_toInt64(0, (UDateTimeScale)scale, &status);
+ if (status == U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_toInt64(0, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+
+ status = U_ZERO_ERROR;
+ result = utmscale_toInt64(toMin, (UDateTimeScale)scale, &status);
+ if (status == U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_toInt64(toMin, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+
+ if (toMin > U_INT64_MIN) {
+ status = U_ZERO_ERROR;
+ result = utmscale_toInt64(toMin - 1, (UDateTimeScale)scale, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_toInt64(toMin - 1, %d, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+ }
+
+
+ status = U_ZERO_ERROR;
+ result = utmscale_toInt64(toMax, (UDateTimeScale)scale, &status);
+ if (status == U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_toInt64(toMax, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+
+ if (toMax < U_INT64_MAX) {
+ status = U_ZERO_ERROR;
+ result = utmscale_toInt64(toMax + 1, (UDateTimeScale)scale, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_toInt64(toMax + 1, %d, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale);
+ }
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ result = utmscale_toInt64(0, UDTS_MAX_SCALE, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("utmscale_toInt64(0, UDTS_MAX_SCALE, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+}
+
+static void TestAPI(void)
+{
+ TestFromInt64();
+ TestToInt64();
+}
+
+static void TestData(void)
+{
+ TestEpochOffsets();
+ TestFromLimits();
+ TestToLimits();
+}
+
+static void TestMonkey(void)
+{
+ int32_t scale;
+ UErrorCode status = U_ZERO_ERROR;
+
+ for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) {
+ int64_t fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status);
+ int64_t fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status);
+ int32_t i;
+
+ initRandom(fromMin, fromMax);
+
+ for (i = 0; i < LOOP_COUNT; i += 1) {
+ int64_t value = randomInRange();
+
+ roundTripTest(value, (UDateTimeScale)scale);
+ }
+ }
+}
+
+struct DotNetDateTimeTicks {
+ int32_t year;
+ int32_t month;
+ int32_t day;
+ int64_t ticks;
+};
+typedef struct DotNetDateTimeTicks DotNetDateTimeTicks;
+
+/*
+ * This data was generated by C++.Net code like
+ * Console::WriteLine(L" {{ {0}, 1, 1, INT64_C({1}) }},", year, DateTime(year, 1, 1).Ticks);
+ * with the DateTime constructor taking int values for year, month, and date.
+ */
+static const DotNetDateTimeTicks dotNetDateTimeTicks[]={
+ /* year, month, day, ticks */
+ { 100, 1, 1, INT64_C(31241376000000000) },
+ { 100, 3, 1, INT64_C(31292352000000000) },
+ { 200, 1, 1, INT64_C(62798112000000000) },
+ { 200, 3, 1, INT64_C(62849088000000000) },
+ { 300, 1, 1, INT64_C(94354848000000000) },
+ { 300, 3, 1, INT64_C(94405824000000000) },
+ { 400, 1, 1, INT64_C(125911584000000000) },
+ { 400, 3, 1, INT64_C(125963424000000000) },
+ { 500, 1, 1, INT64_C(157469184000000000) },
+ { 500, 3, 1, INT64_C(157520160000000000) },
+ { 600, 1, 1, INT64_C(189025920000000000) },
+ { 600, 3, 1, INT64_C(189076896000000000) },
+ { 700, 1, 1, INT64_C(220582656000000000) },
+ { 700, 3, 1, INT64_C(220633632000000000) },
+ { 800, 1, 1, INT64_C(252139392000000000) },
+ { 800, 3, 1, INT64_C(252191232000000000) },
+ { 900, 1, 1, INT64_C(283696992000000000) },
+ { 900, 3, 1, INT64_C(283747968000000000) },
+ { 1000, 1, 1, INT64_C(315253728000000000) },
+ { 1000, 3, 1, INT64_C(315304704000000000) },
+ { 1100, 1, 1, INT64_C(346810464000000000) },
+ { 1100, 3, 1, INT64_C(346861440000000000) },
+ { 1200, 1, 1, INT64_C(378367200000000000) },
+ { 1200, 3, 1, INT64_C(378419040000000000) },
+ { 1300, 1, 1, INT64_C(409924800000000000) },
+ { 1300, 3, 1, INT64_C(409975776000000000) },
+ { 1400, 1, 1, INT64_C(441481536000000000) },
+ { 1400, 3, 1, INT64_C(441532512000000000) },
+ { 1500, 1, 1, INT64_C(473038272000000000) },
+ { 1500, 3, 1, INT64_C(473089248000000000) },
+ { 1600, 1, 1, INT64_C(504595008000000000) },
+ { 1600, 3, 1, INT64_C(504646848000000000) },
+ { 1700, 1, 1, INT64_C(536152608000000000) },
+ { 1700, 3, 1, INT64_C(536203584000000000) },
+ { 1800, 1, 1, INT64_C(567709344000000000) },
+ { 1800, 3, 1, INT64_C(567760320000000000) },
+ { 1900, 1, 1, INT64_C(599266080000000000) },
+ { 1900, 3, 1, INT64_C(599317056000000000) },
+ { 2000, 1, 1, INT64_C(630822816000000000) },
+ { 2000, 3, 1, INT64_C(630874656000000000) },
+ { 2100, 1, 1, INT64_C(662380416000000000) },
+ { 2100, 3, 1, INT64_C(662431392000000000) },
+ { 2200, 1, 1, INT64_C(693937152000000000) },
+ { 2200, 3, 1, INT64_C(693988128000000000) },
+ { 2300, 1, 1, INT64_C(725493888000000000) },
+ { 2300, 3, 1, INT64_C(725544864000000000) },
+ { 2400, 1, 1, INT64_C(757050624000000000) },
+ { 2400, 3, 1, INT64_C(757102464000000000) },
+ { 2500, 1, 1, INT64_C(788608224000000000) },
+ { 2500, 3, 1, INT64_C(788659200000000000) },
+ { 2600, 1, 1, INT64_C(820164960000000000) },
+ { 2600, 3, 1, INT64_C(820215936000000000) },
+ { 2700, 1, 1, INT64_C(851721696000000000) },
+ { 2700, 3, 1, INT64_C(851772672000000000) },
+ { 2800, 1, 1, INT64_C(883278432000000000) },
+ { 2800, 3, 1, INT64_C(883330272000000000) },
+ { 2900, 1, 1, INT64_C(914836032000000000) },
+ { 2900, 3, 1, INT64_C(914887008000000000) },
+ { 3000, 1, 1, INT64_C(946392768000000000) },
+ { 3000, 3, 1, INT64_C(946443744000000000) },
+ { 1, 1, 1, INT64_C(0) },
+ { 1601, 1, 1, INT64_C(504911232000000000) },
+ { 1899, 12, 31, INT64_C(599265216000000000) },
+ { 1904, 1, 1, INT64_C(600527520000000000) },
+ { 1970, 1, 1, INT64_C(621355968000000000) },
+ { 2001, 1, 1, INT64_C(631139040000000000) },
+ { 9900, 3, 1, INT64_C(3123873216000000000) },
+ { 9999, 12, 31, INT64_C(3155378112000000000) }
+};
+
+/*
+ * ICU's Universal Time Scale is designed to be tick-for-tick compatible with
+ * .Net System.DateTime. Verify that this is so for the
+ * .Net-supported date range (years 1-9999 AD).
+ * This requires a proleptic Gregorian calendar because that's what .Net uses.
+ * Proleptic: No Julian/Gregorian switchover, or a switchover before
+ * any date that we test, that is, before 0001 AD.
+ */
+static void
+TestDotNet() {
+ static const UChar utc[] = { 0x45, 0x74, 0x63, 0x2f, 0x47, 0x4d, 0x54, 0 }; /* "Etc/GMT" */
+ const int32_t dayMillis = 86400 * INT64_C(1000); /* 1 day = 86400 seconds */
+ const int64_t dayTicks = 86400 * INT64_C(10000000);
+ const DotNetDateTimeTicks *dt;
+ UCalendar *cal;
+ UErrorCode errorCode;
+ UDate icuDate;
+ int64_t ticks, millis;
+ int32_t i;
+
+ /* Open a proleptic Gregorian calendar. */
+ errorCode = U_ZERO_ERROR;
+ cal = ucal_open(utc, -1, "", UCAL_GREGORIAN, &errorCode);
+ ucal_setGregorianChange(cal, -1000000 * (dayMillis * (UDate)1), &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("ucal_open(UTC/proleptic Gregorian) failed: %s\n", u_errorName(errorCode));
+ ucal_close(cal);
+ return;
+ }
+ for(i = 0; i < LENGTHOF(dotNetDateTimeTicks); ++i) {
+ /* Test conversion from .Net/Universal time to ICU time. */
+ dt = dotNetDateTimeTicks + i;
+ millis = utmscale_toInt64(dt->ticks, UDTS_ICU4C_TIME, &errorCode);
+ ucal_clear(cal);
+ ucal_setDate(cal, dt->year, dt->month - 1, dt->day, &errorCode); /* Java & ICU use January = month 0. */
+ icuDate = ucal_getMillis(cal, &errorCode);
+ if(millis != icuDate) {
+ /* Print days not millis to stay within printf() range. */
+ log_err("utmscale_toInt64(ticks[%d], ICU4C)=%dd != %dd=ucal_getMillis(%04d-%02d-%02d)\n",
+ (int)i, (int)(millis/dayMillis), (int)(icuDate/dayMillis), (int)dt->year, (int)dt->month, (int)dt->day);
+ }
+
+ /* Test conversion from ICU time to .Net/Universal time. */
+ ticks = utmscale_fromInt64((int64_t)icuDate, UDTS_ICU4C_TIME, &errorCode);
+ if(ticks != dt->ticks) {
+ /* Print days not ticks to stay within printf() range. */
+ log_err("utmscale_fromInt64(date[%d], ICU4C)=%dd != %dd=.Net System.DateTime(%04d-%02d-%02d).Ticks\n",
+ (int)i, (int)(ticks/dayTicks), (int)(dt->ticks/dayTicks), (int)dt->year, (int)dt->month, (int)dt->day);
+ }
+ }
+
+ ucal_close(cal);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/cintltst/utransts.c b/Build/source/libs/icu/icu-xetex/test/cintltst/utransts.c
new file mode 100644
index 00000000000..ec99292aa9f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/cintltst/utransts.c
@@ -0,0 +1,707 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 1997-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *******************************************************************************
+ * Date Name Description
+ * 06/23/00 aliu Creation.
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/utrans.h"
+#include "unicode/ustring.h"
+#include "cintltst.h"
+
+#define TEST(x) addTest(root, &x, "utrans/" # x)
+
+static void TestAPI(void);
+static void TestSimpleRules(void);
+static void TestFilter(void);
+static void TestOpenInverse(void);
+static void TestClone(void);
+static void TestRegisterUnregister(void);
+static void TestExtractBetween(void);
+static void TestUnicodeIDs(void);
+
+static void _expectRules(const char*, const char*, const char*);
+static void _expect(const UTransliterator* trans, const char* cfrom, const char* cto);
+
+void addUTransTest(TestNode** root);
+
+
+void
+addUTransTest(TestNode** root) {
+ TEST(TestAPI);
+ TEST(TestSimpleRules);
+ TEST(TestFilter);
+ TEST(TestOpenInverse);
+ TEST(TestClone);
+ TEST(TestRegisterUnregister);
+ TEST(TestExtractBetween);
+ TEST(TestUnicodeIDs);
+}
+
+/*------------------------------------------------------------------
+ * Replaceable glue
+ *
+ * To test the Replaceable glue we have to dummy up a C-based
+ * Replaceable callback. This code is for testing purposes only.
+ *------------------------------------------------------------------*/
+
+typedef struct XReplaceable {
+ UChar* text; /* MUST BE null-terminated */
+} XReplaceable;
+
+static void InitXReplaceable(XReplaceable* rep, const char* cstring) {
+ rep->text = malloc(sizeof(UChar) * (strlen(cstring)+1));
+ u_uastrcpy(rep->text, cstring);
+}
+
+static void FreeXReplaceable(XReplaceable* rep) {
+ if (rep->text != NULL) {
+ free(rep->text);
+ rep->text = NULL;
+ }
+}
+
+/* UReplaceableCallbacks callback */
+static int32_t Xlength(const UReplaceable* rep) {
+ const XReplaceable* x = (const XReplaceable*)rep;
+ return u_strlen(x->text);
+}
+
+/* UReplaceableCallbacks callback */
+static UChar XcharAt(const UReplaceable* rep, int32_t offset) {
+ const XReplaceable* x = (const XReplaceable*)rep;
+ return x->text[offset];
+}
+
+/* UReplaceableCallbacks callback */
+static UChar32 Xchar32At(const UReplaceable* rep, int32_t offset) {
+ const XReplaceable* x = (const XReplaceable*)rep;
+ return x->text[offset];
+}
+
+/* UReplaceableCallbacks callback */
+static void Xreplace(UReplaceable* rep, int32_t start, int32_t limit,
+ const UChar* text, int32_t textLength) {
+ XReplaceable* x = (XReplaceable*)rep;
+ int32_t newLen = Xlength(rep) + limit - start + textLength;
+ UChar* newText = (UChar*) malloc(sizeof(UChar) * (newLen+1));
+ u_strncpy(newText, x->text, start);
+ u_strncpy(newText + start, text, textLength);
+ u_strcpy(newText + start + textLength, x->text + limit);
+ free(x->text);
+ x->text = newText;
+}
+
+/* UReplaceableCallbacks callback */
+static void Xcopy(UReplaceable* rep, int32_t start, int32_t limit, int32_t dest) {
+ XReplaceable* x = (XReplaceable*)rep;
+ int32_t newLen = Xlength(rep) + limit - start;
+ UChar* newText = (UChar*) malloc(sizeof(UChar) * (newLen+1));
+ u_strncpy(newText, x->text, dest);
+ u_strncpy(newText + dest, x->text + start, limit - start);
+ u_strcpy(newText + dest + limit - start, x->text + dest);
+ free(x->text);
+ x->text = newText;
+}
+
+/* UReplaceableCallbacks callback */
+static void Xextract(UReplaceable* rep, int32_t start, int32_t limit, UChar* dst) {
+ XReplaceable* x = (XReplaceable*)rep;
+ int32_t len = limit - start;
+ u_strncpy(dst, x->text, len);
+}
+
+static void InitXReplaceableCallbacks(UReplaceableCallbacks* callbacks) {
+ callbacks->length = Xlength;
+ callbacks->charAt = XcharAt;
+ callbacks->char32At = Xchar32At;
+ callbacks->replace = Xreplace;
+ callbacks->extract = Xextract;
+ callbacks->copy = Xcopy;
+}
+
+/*------------------------------------------------------------------
+ * Tests
+ *------------------------------------------------------------------*/
+
+static void TestAPI() {
+ enum { BUF_CAP = 128 };
+ char buf[BUF_CAP], buf2[BUF_CAP];
+ UErrorCode status = U_ZERO_ERROR;
+ UTransliterator* trans = NULL;
+ int32_t i, n;
+
+ /* Test getAvailableIDs */
+ n = utrans_countAvailableIDs();
+ if (n < 1) {
+ log_err("FAIL: utrans_countAvailableIDs() returned %d\n", n);
+ } else {
+ log_verbose("System ID count: %d\n", n);
+ }
+ for (i=0; i<n; ++i) {
+ utrans_getAvailableID(i, buf, BUF_CAP);
+ if (*buf == 0) {
+ log_err("FAIL: System transliterator %d: \"\"\n", i);
+ } else {
+ log_verbose("System transliterator %d: \"%s\"\n", i, buf);
+ }
+ }
+
+ /* Test open */
+ utrans_getAvailableID(0, buf, BUF_CAP);
+ trans = utrans_open(buf, UTRANS_FORWARD,NULL,0,NULL, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_open(%s) failed, error=%s\n",
+ buf, u_errorName(status));
+ }
+
+ else {
+ /* Test getID */
+ utrans_getID(trans, buf2, BUF_CAP);
+ if (0 != strcmp(buf, buf2)) {
+ log_err("FAIL: utrans_getID(%s) returned %s\n",
+ buf, buf2);
+ }
+ utrans_close(trans);
+ }
+}
+
+static void TestUnicodeIDs() {
+ UEnumeration *uenum;
+ UTransliterator *utrans;
+ const UChar *id, *id2;
+ int32_t idLength, id2Length, count, count2;
+
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ uenum=utrans_openIDs(&errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("utrans_openIDs() failed - %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ count=uenum_count(uenum, &errorCode);
+ if(U_FAILURE(errorCode) || count<1) {
+ log_err("uenum_count(transliterator IDs)=%d - %s\n", count, u_errorName(errorCode));
+ }
+
+ count=0;
+ for(;;) {
+ id=uenum_unext(uenum, &idLength, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("uenum_unext(transliterator ID %d) failed - %s\n", count, u_errorName(errorCode));
+ break;
+ }
+ if(id==NULL) {
+ break;
+ }
+
+ if(++count>10) {
+ /* try to actually open only a few transliterators */
+ continue;
+ }
+
+ utrans=utrans_openU(id, idLength, UTRANS_FORWARD, NULL, 0, NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ log_err("utrans_openU(%s) failed - %s\n", aescstrdup(id, idLength), u_errorName(errorCode));
+ continue;
+ }
+
+ id2=utrans_getUnicodeID(utrans, &id2Length);
+ if(idLength!=id2Length || 0!=u_memcmp(id, id2, idLength)) {
+ log_err("utrans_getUnicodeID(%s) does not match the original ID\n", aescstrdup(id, idLength));
+ }
+
+ utrans_close(utrans);
+ }
+
+ uenum_reset(uenum, &errorCode);
+ if(U_FAILURE(errorCode) || count<1) {
+ log_err("uenum_reset(transliterator IDs) failed - %s\n", u_errorName(errorCode));
+ } else {
+ count2=uenum_count(uenum, &errorCode);
+ if(U_FAILURE(errorCode) || count<1) {
+ log_err("2nd uenum_count(transliterator IDs)=%d - %s\n", count2, u_errorName(errorCode));
+ } else if(count!=count2) {
+ log_err("uenum_unext(transliterator IDs) returned %d IDs but uenum_count() after uenum_reset() claims there are %d\n", count, count2);
+ }
+ }
+
+ uenum_close(uenum);
+}
+
+static void TestOpenInverse(){
+ UErrorCode status=U_ZERO_ERROR;
+ UTransliterator* t1=NULL;
+ UTransliterator* inverse1=NULL;
+ enum { BUF_CAP = 128 };
+ char buf1[BUF_CAP];
+ int32_t i=0;
+
+ const char TransID[][25]={
+ "Halfwidth-Fullwidth",
+ "Fullwidth-Halfwidth",
+ "Greek-Latin" ,
+ "Latin-Greek",
+ /*"Arabic-Latin", // Removed in 2.0*/
+ /*"Latin-Arabic", // Removed in 2.0*/
+ "Katakana-Latin",
+ "Latin-Katakana",
+ /*"Hebrew-Latin", // Removed in 2.0*/
+ /*"Latin-Hebrew", // Removed in 2.0*/
+ "Cyrillic-Latin",
+ "Latin-Cyrillic",
+ "Devanagari-Latin",
+ "Latin-Devanagari",
+ "Any-Hex",
+ "Hex-Any"
+ };
+
+ for(i=0; i<sizeof(TransID)/sizeof(TransID[0]); i=i+2){
+ status = U_ZERO_ERROR;
+ t1=utrans_open(TransID[i], UTRANS_FORWARD,NULL,0,NULL, &status);
+ if(t1 == NULL || U_FAILURE(status)){
+ log_err("FAIL: in instantiation for id=%s\n", TransID[i]);
+ continue;
+ }
+ inverse1=utrans_openInverse(t1, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: utrans_openInverse() failed for id=%s. Error=%s\n", TransID[i], myErrorName(status));
+ continue;
+ }
+ utrans_getID(inverse1, buf1, BUF_CAP);
+ if(strcmp(buf1, TransID[i+1]) != 0){
+ log_err("FAIL :openInverse() for %s returned %s instead of %s\n", TransID[i], buf1, TransID[i+1]);
+ }
+ utrans_close(t1);
+ utrans_close(inverse1);
+ }
+}
+
+static void TestClone(){
+ UErrorCode status=U_ZERO_ERROR;
+ UTransliterator* t1=NULL;
+ UTransliterator* t2=NULL;
+ UTransliterator* t3=NULL;
+ UTransliterator* t4=NULL;
+ enum { BUF_CAP = 128 };
+ char buf1[BUF_CAP], buf2[BUF_CAP], buf3[BUF_CAP];
+
+ t1=utrans_open("Latin-Devanagari", UTRANS_FORWARD, NULL,0,NULL,&status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: construction\n");
+ return;
+ }
+ t2=utrans_open("Latin-Greek", UTRANS_FORWARD, NULL,0,NULL,&status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: construction\n");
+ utrans_close(t1);
+ return;
+ }
+
+ t3=utrans_clone(t1, &status);
+ t4=utrans_clone(t2, &status);
+
+ utrans_getID(t1, buf1, BUF_CAP);
+ utrans_getID(t2, buf2, BUF_CAP);
+ utrans_getID(t3, buf3, BUF_CAP);
+
+ if(strcmp(buf1, buf3) != 0 ||
+ strcmp(buf1, buf2) == 0) {
+ log_err("FAIL: utrans_clone() failed\n");
+ }
+
+ utrans_getID(t4, buf3, BUF_CAP);
+
+ if(strcmp(buf2, buf3) != 0 ||
+ strcmp(buf1, buf3) == 0) {
+ log_err("FAIL: utrans_clone() failed\n");
+ }
+
+ utrans_close(t1);
+ utrans_close(t2);
+ utrans_close(t3);
+ utrans_close(t4);
+
+}
+
+static void TestRegisterUnregister(){
+ UErrorCode status=U_ZERO_ERROR;
+ UTransliterator* t1=NULL;
+ UTransliterator* rules=NULL, *rules2;
+ UTransliterator* inverse1=NULL;
+ UChar rule[]={ 0x0061, 0x003c, 0x003e, 0x0063}; /*a<>b*/
+
+ U_STRING_DECL(ID, "TestA-TestB", 11);
+ U_STRING_INIT(ID, "TestA-TestB", 11);
+
+ /* Make sure it doesn't exist */
+ t1=utrans_open("TestA-TestB", UTRANS_FORWARD,NULL,0,NULL, &status);
+ if(t1 != NULL || U_SUCCESS(status)) {
+ log_err("FAIL: TestA-TestB already registered\n");
+ return;
+ }
+ status=U_ZERO_ERROR;
+ /* Check inverse too */
+ inverse1=utrans_open("TestA-TestB", UTRANS_REVERSE, NULL,0,NULL,&status);
+ if(inverse1 != NULL || U_SUCCESS(status)) {
+ log_err("FAIL: TestA-TestB already registered\n");
+ return;
+ }
+ status=U_ZERO_ERROR;
+ /* Create it */
+ rules=utrans_open("TestA-TestB",UTRANS_FORWARD, rule, 4, NULL, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: utrans_openRules(a<>B) failed with error=%s\n", myErrorName(status));
+ return;
+ }
+
+ /* clone it so we can register it a second time */
+ rules2=utrans_clone(rules, &status);
+ if(U_FAILURE(status)) {
+ log_err("FAIL: utrans_clone(a<>B) failed with error=%s\n", myErrorName(status));
+ return;
+ }
+
+ status=U_ZERO_ERROR;
+ /* Register it */
+ utrans_register(rules, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: utrans_register failed with error=%s\n", myErrorName(status));
+ return;
+ }
+ status=U_ZERO_ERROR;
+ /* Now check again -- should exist now*/
+ t1= utrans_open("TestA-TestB", UTRANS_FORWARD, NULL,0,NULL,&status);
+ if(U_FAILURE(status) || t1 == NULL){
+ log_err("FAIL: TestA-TestB not registered\n");
+ return;
+ }
+ utrans_close(t1);
+
+ /*unregister the instance*/
+ status=U_ZERO_ERROR;
+ utrans_unregister("TestA-TestB");
+ /* now Make sure it doesn't exist */
+ t1=utrans_open("TestA-TestB", UTRANS_FORWARD,NULL,0,NULL, &status);
+ if(U_SUCCESS(status) || t1 != NULL) {
+ log_err("FAIL: TestA-TestB isn't unregistered\n");
+ return;
+ }
+ utrans_close(t1);
+
+ /* now with utrans_unregisterID(const UChar *) */
+ status=U_ZERO_ERROR;
+ utrans_register(rules2, &status);
+ if(U_FAILURE(status)){
+ log_err("FAIL: 2nd utrans_register failed with error=%s\n", myErrorName(status));
+ return;
+ }
+ status=U_ZERO_ERROR;
+ /* Now check again -- should exist now*/
+ t1= utrans_open("TestA-TestB", UTRANS_FORWARD, NULL,0,NULL,&status);
+ if(U_FAILURE(status) || t1 == NULL){
+ log_err("FAIL: 2nd TestA-TestB not registered\n");
+ return;
+ }
+ utrans_close(t1);
+
+ /*unregister the instance*/
+ status=U_ZERO_ERROR;
+ utrans_unregisterID(ID, -1);
+ /* now Make sure it doesn't exist */
+ t1=utrans_openU(ID, -1, UTRANS_FORWARD,NULL,0,NULL, &status);
+ if(U_SUCCESS(status) || t1 != NULL) {
+ log_err("FAIL: 2nd TestA-TestB isn't unregistered\n");
+ return;
+ }
+
+ utrans_close(t1);
+ utrans_close(inverse1);
+}
+
+static void TestSimpleRules() {
+ /* Test rules */
+ /* Example: rules 1. ab>x|y
+ * 2. yc>z
+ *
+ * []|eabcd start - no match, copy e to tranlated buffer
+ * [e]|abcd match rule 1 - copy output & adjust cursor
+ * [ex|y]cd match rule 2 - copy output & adjust cursor
+ * [exz]|d no match, copy d to transliterated buffer
+ * [exzd]| done
+ */
+ _expectRules("ab>x|y;"
+ "yc>z",
+ "eabcd", "exzd");
+
+ /* Another set of rules:
+ * 1. ab>x|yzacw
+ * 2. za>q
+ * 3. qc>r
+ * 4. cw>n
+ *
+ * []|ab Rule 1
+ * [x|yzacw] No match
+ * [xy|zacw] Rule 2
+ * [xyq|cw] Rule 4
+ * [xyqn]| Done
+ */
+ _expectRules("ab>x|yzacw;"
+ "za>q;"
+ "qc>r;"
+ "cw>n",
+ "ab", "xyqn");
+
+ /* Test categories
+ */
+ _expectRules("$dummy=" "\\uE100" ";" /* careful here with E100 */
+ "$vowel=[aeiouAEIOU];"
+ "$lu=[:Lu:];"
+ "$vowel } $lu > '!';"
+ "$vowel > '&';"
+ "'!' { $lu > '^';"
+ "$lu > '*';"
+ "a > ERROR",
+ "abcdefgABCDEFGU", "&bcd&fg!^**!^*&");
+}
+
+static void TestFilter() {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar filt[128];
+ UChar buf[128];
+ UChar exp[128];
+ char *cbuf;
+ int32_t limit;
+ const char* DATA[] = {
+ "[^c]", /* Filter out 'c' */
+ "abcde",
+ "\\u0061\\u0062c\\u0064\\u0065",
+
+ "", /* No filter */
+ "abcde",
+ "\\u0061\\u0062\\u0063\\u0064\\u0065"
+ };
+ int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]);
+ int32_t i;
+
+ UTransliterator* hex = utrans_open("Any-Hex", UTRANS_FORWARD, NULL,0,NULL,&status);
+
+ if (hex == 0 || U_FAILURE(status)) {
+ log_err("FAIL: utrans_open(Unicode-Hex) failed, error=%s\n",
+ u_errorName(status));
+ goto exit;
+ }
+
+ for (i=0; i<DATA_length; i+=3) {
+ /*u_uastrcpy(filt, DATA[i]);*/
+ u_charsToUChars(DATA[i], filt, (int32_t)strlen(DATA[i])+1);
+ utrans_setFilter(hex, filt, -1, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_setFilter() failed, error=%s\n",
+ u_errorName(status));
+ goto exit;
+ }
+
+ /*u_uastrcpy(buf, DATA[i+1]);*/
+ u_charsToUChars(DATA[i+1], buf, (int32_t)strlen(DATA[i+1])+1);
+ limit = 5;
+ utrans_transUChars(hex, buf, NULL, 128, 0, &limit, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_transUChars() failed, error=%s\n",
+ u_errorName(status));
+ goto exit;
+ }
+
+ cbuf=aescstrdup(buf, -1);
+ u_charsToUChars(DATA[i+2], exp, (int32_t)strlen(DATA[i+2])+1);
+ if (0 == u_strcmp(buf, exp)) {
+ log_verbose("Ok: %s | %s -> %s\n", DATA[i+1], DATA[i], cbuf);
+ } else {
+ log_err("FAIL: %s | %s -> %s, expected %s\n", DATA[i+1], DATA[i], cbuf, DATA[i+2]);
+ }
+ }
+
+ exit:
+ utrans_close(hex);
+}
+
+/**
+ * Test the UReplaceableCallback extractBetween support. We use a
+ * transliterator known to rely on this call.
+ */
+static void TestExtractBetween() {
+
+ UTransliterator *trans;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseErr;
+
+ trans = utrans_open("Lower", UTRANS_FORWARD, NULL, -1,
+ &parseErr, &status);
+
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_open(Lower) failed, error=%s\n",
+ u_errorName(status));
+ } else {
+ _expect(trans, "ABC", "abc");
+
+ utrans_close(trans);
+ }
+}
+
+static void _expectRules(const char* crules,
+ const char* cfrom,
+ const char* cto) {
+ /* u_uastrcpy has no capacity param for the buffer -- so just
+ * make all buffers way too big */
+ enum { CAP = 256 };
+ UChar rules[CAP];
+ UTransliterator *trans;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseErr;
+
+ u_uastrcpy(rules, crules);
+
+ trans = utrans_open(crules /*use rules as ID*/, UTRANS_FORWARD, rules, -1,
+ &parseErr, &status);
+ if (U_FAILURE(status)) {
+ utrans_close(trans);
+ log_err("FAIL: utrans_openRules(%s) failed, error=%s\n",
+ crules, u_errorName(status));
+ return;
+ }
+
+ _expect(trans, cfrom, cto);
+
+ utrans_close(trans);
+}
+
+static void _expect(const UTransliterator* trans,
+ const char* cfrom,
+ const char* cto) {
+ /* u_uastrcpy has no capacity param for the buffer -- so just
+ * make all buffers way too big */
+ enum { CAP = 256 };
+ UChar from[CAP];
+ UChar to[CAP];
+ UChar buf[CAP];
+ const UChar *ID;
+ int32_t IDLength;
+ const char *id;
+
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t limit;
+ UTransPosition pos;
+ XReplaceable xrep;
+ XReplaceable *xrepPtr = &xrep;
+ UReplaceableCallbacks xrepVtable;
+
+ u_uastrcpy(from, cfrom);
+ u_uastrcpy(to, cto);
+
+ ID = utrans_getUnicodeID(trans, &IDLength);
+ id = aescstrdup(ID, IDLength);
+
+ /* utrans_transUChars() */
+ u_strcpy(buf, from);
+ limit = u_strlen(buf);
+ utrans_transUChars(trans, buf, NULL, CAP, 0, &limit, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_transUChars() failed, error=%s\n",
+ u_errorName(status));
+ return;
+ }
+
+ if (0 == u_strcmp(buf, to)) {
+ log_verbose("Ok: utrans_transUChars(%s) x %s -> %s\n",
+ id, cfrom, cto);
+ } else {
+ char actual[CAP];
+ u_austrcpy(actual, buf);
+ log_err("FAIL: utrans_transUChars(%s) x %s -> %s, expected %s\n",
+ id, cfrom, actual, cto);
+ }
+
+ /* utrans_transIncrementalUChars() */
+ u_strcpy(buf, from);
+ pos.start = pos.contextStart = 0;
+ pos.limit = pos.contextLimit = u_strlen(buf);
+ utrans_transIncrementalUChars(trans, buf, NULL, CAP, &pos, &status);
+ utrans_transUChars(trans, buf, NULL, CAP, pos.start, &pos.limit, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_transIncrementalUChars() failed, error=%s\n",
+ u_errorName(status));
+ return;
+ }
+
+ if (0 == u_strcmp(buf, to)) {
+ log_verbose("Ok: utrans_transIncrementalUChars(%s) x %s -> %s\n",
+ id, cfrom, cto);
+ } else {
+ char actual[CAP];
+ u_austrcpy(actual, buf);
+ log_err("FAIL: utrans_transIncrementalUChars(%s) x %s -> %s, expected %s\n",
+ id, cfrom, actual, cto);
+ }
+
+ /* utrans_trans() */
+ InitXReplaceableCallbacks(&xrepVtable);
+ InitXReplaceable(&xrep, cfrom);
+ limit = u_strlen(from);
+ utrans_trans(trans, (UReplaceable*)xrepPtr, &xrepVtable, 0, &limit, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_trans() failed, error=%s\n",
+ u_errorName(status));
+ FreeXReplaceable(&xrep);
+ return;
+ }
+
+ if (0 == u_strcmp(xrep.text, to)) {
+ log_verbose("Ok: utrans_trans(%s) x %s -> %s\n",
+ id, cfrom, cto);
+ } else {
+ char actual[CAP];
+ u_austrcpy(actual, xrep.text);
+ log_err("FAIL: utrans_trans(%s) x %s -> %s, expected %s\n",
+ id, cfrom, actual, cto);
+ }
+ FreeXReplaceable(&xrep);
+
+ /* utrans_transIncremental() */
+ InitXReplaceable(&xrep, cfrom);
+ pos.start = pos.contextStart = 0;
+ pos.limit = pos.contextLimit = u_strlen(from);
+ utrans_transIncremental(trans, (UReplaceable*)xrepPtr, &xrepVtable, &pos, &status);
+ utrans_trans(trans, (UReplaceable*)xrepPtr, &xrepVtable, pos.start, &pos.limit, &status);
+ if (U_FAILURE(status)) {
+ log_err("FAIL: utrans_transIncremental() failed, error=%s\n",
+ u_errorName(status));
+ FreeXReplaceable(&xrep);
+ return;
+ }
+
+ if (0 == u_strcmp(xrep.text, to)) {
+ log_verbose("Ok: utrans_transIncremental(%s) x %s -> %s\n",
+ id, cfrom, cto);
+ } else {
+ char actual[CAP];
+ u_austrcpy(actual, xrep.text);
+ log_err("FAIL: utrans_transIncremental(%s) x %s -> %s, expected %s\n",
+ id, cfrom, actual, cto);
+ }
+ FreeXReplaceable(&xrep);
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/compat/Makefile.in b/Build/source/libs/icu/icu-xetex/test/compat/Makefile.in
new file mode 100644
index 00000000000..af87cf8e8bd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/compat/Makefile.in
@@ -0,0 +1,75 @@
+## Makefile.in for ICU - samples/tzdate
+## Copyright (c) 1999-2007, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+
+srcdir=@srcdir@
+top_srcdir=@top_srcdir@
+
+top_builddir = ../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/compat
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = tzdate$(EXEEXT)
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n
+LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = tzdate.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local: all-local
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local:
+ -$(INVOKE) ./$(TARGET) $(TZDATE_OPTS)
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.c) $(OUTOPT)$@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
diff --git a/Build/source/libs/icu/icu-xetex/test/compat/readme.txt b/Build/source/libs/icu/icu-xetex/test/compat/readme.txt
new file mode 100644
index 00000000000..8d56675e97e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/compat/readme.txt
@@ -0,0 +1,40 @@
+Copyright (c) 2007, International Business Machines Corporation and others. All Rights Reserved.
+
+tzone.pl : A perl script that test the timezone information between the system time and ICU time.
+
+
+Files:
+ tzdate.c Source file that compares the ICU time and system time.
+ Makefile.in Use to create the Makefile
+ tzone.pl Perl script that calls the tzdate program with the correct TZ and arguments.
+
+To Build on Unixes
+ 1. Build ICU. tzdate is not built automatically.
+ Specify an ICU install directory when running configure,
+ using the --prefix option. The steps to build ICU will look something
+ like this:
+ cd <icu directory>/source
+ runConfigureICU <platform-name> --prefix <icu install directory> [other options]
+ gmake all
+
+ 2. Install ICU,
+ gmake install
+
+ To Run on Unixes
+ cd <icu directory>/source/test/compat
+
+ export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
+ gmake
+
+ tzone.pl
+ -This will use the current date.
+ -To use a different date, you must specify by:
+ tzone.pl year month day
+ -All three arguments are integer values
+
+
+ Note: The name of the LD_LIBRARY_PATH variable is different on some systems.
+ If in doubt, run the sample using "gmake check", and note the name of
+ the variable that is used there. LD_LIBRARY_PATH is the correct name
+ for Linux and Solaris.
+
diff --git a/Build/source/libs/icu/icu-xetex/test/compat/tzdate.c b/Build/source/libs/icu/icu-xetex/test/compat/tzdate.c
new file mode 100644
index 00000000000..2615a7630ad
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/compat/tzdate.c
@@ -0,0 +1,140 @@
+/*
+**********************************************************************
+* Copyright (C) 2007-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+*
+* File tzdate.c
+*
+* Author: Michael Ow
+*
+**********************************************************************
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <string.h>
+
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "unicode/uclean.h"
+
+#include "unicode/ucnv.h"
+#include "unicode/udat.h"
+#include "unicode/ucal.h"
+
+#include "putilimp.h"
+
+#define SIZE 80
+#define OFFSET_MONTH 1
+
+int64_t getSystemCurrentTime(char* systime, int year, int month, int day, int hour, int minute, int useCurrentTime);
+void getICUCurrentTime(char* icutime, double timeToCheck);
+void printTime(char* systime, char* icutime);
+
+int main(int argc, char** argv) {
+ char systime[SIZE];
+ char icutime[SIZE];
+ int year, month, day, hour, minute;
+ int sysyear;
+ int useCurrentTime;
+ int64_t systemtime;
+
+ sysyear = year = month = day = 0;
+
+ if (argc <= 6) {
+ fprintf(stderr, "Not enough arguments\n");
+ return -1;
+ }
+
+ year = atoi(argv[1]);
+ month = atoi(argv[2]);
+ day = atoi(argv[3]);
+ hour = atoi(argv[4]);
+ minute = atoi(argv[5]);
+ useCurrentTime = atoi(argv[6]);
+
+ /* format year for system time */
+ sysyear = year - 1900;
+
+ systemtime = getSystemCurrentTime(systime, sysyear, month, day, hour, minute, useCurrentTime);
+ getICUCurrentTime(icutime, systemtime * U_MILLIS_PER_SECOND);
+
+ /* print out the times if failed */
+ if (strcmp(systime, icutime) != 0) {
+ printf("Failed\n");
+ printTime(systime, icutime);
+ }
+
+ return 0;
+}
+
+void getICUCurrentTime(char* icutime, double timeToCheck) {
+ UDateFormat *fmt;
+ const UChar *tz = 0;
+ UChar *s = 0;
+ UDateFormatStyle style = UDAT_RELATIVE;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = 0;
+ int i;
+
+ fmt = udat_open(style, style, 0, tz, -1,NULL,0, &status);
+
+ len = udat_format(fmt, timeToCheck, 0, len, 0, &status);
+
+ if (status == U_BUFFER_OVERFLOW_ERROR)
+ status = U_ZERO_ERROR;
+
+ s = (UChar*) malloc(sizeof(UChar) * (len+1));
+
+ if(s == 0)
+ goto finish;
+
+ udat_format(fmt, timeToCheck, s, len + 1, 0, &status);
+
+ if (U_FAILURE(status))
+ goto finish;
+
+ /* +1 to NULL terminate */
+ for(i = 0; i < len+1; i++) {
+ icutime[i] = (char)s[i];
+ }
+
+finish:
+ udat_close(fmt);
+ free(s);
+}
+
+int64_t getSystemCurrentTime(char* systime, int year, int month, int day, int hour, int minute, int useCurrentTime) {
+ time_t now;
+ struct tm ts;
+
+ if (useCurrentTime){
+ time(&now);
+ ts = *localtime(&now);
+ }
+ else {
+ memset(&ts, 0, sizeof(ts));
+ ts.tm_year = year;
+ ts.tm_mon = month - OFFSET_MONTH;
+ ts.tm_mday = day;
+ ts.tm_hour = hour;
+ ts.tm_min = minute;
+
+ now = mktime(&ts);
+ ts = *localtime(&now);
+ }
+
+ /* Format the string */
+ strftime(systime, sizeof(char) * 80, "%Y%m%d %I:%M %p", &ts);
+
+ return (double)now;
+}
+
+void printTime(char* systime, char* icutime) {
+ printf("System Time: %s\n", systime);
+ printf("ICU Time: %s\n", icutime);
+ printf("STD=%s DST=%s OFFSET=%d\n", uprv_tzname(0), uprv_tzname(1), uprv_timezone());
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/compat/tzone.pl b/Build/source/libs/icu/icu-xetex/test/compat/tzone.pl
new file mode 100755
index 00000000000..583c9812855
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/compat/tzone.pl
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2007-2007, International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+
+if ($ARGV[0] eq '-h' || $ARGV[0] eq '--help') {
+ print "Usage: tzone [year month day hour minute]\n";
+ exit(0);
+}
+
+my $LIBRARY = '../../lib';
+
+my @TZONE_RAW = `locate zoneinfo | grep '^/usr/share/zoneinfo/' | grep -v 'tab\$' | grep -v '/right/' | grep -v '/posix/' | grep -v '/posixrules\$' | grep -v '/Factory\$'`;
+my @TZONE;
+my $index = 0;
+my $USECURRENT = 0;
+my $year = 0;
+my $month = 0;
+my $day = 0;
+my $hour = 0;
+my $minute = 0;
+
+
+if (scalar(@ARGV) == 5) {
+ ($year, $month, $day, $hour, $minute) = @ARGV;
+ print "The date we are using is: $month-$day-$year $hour:$minute.\n";
+} else {
+ print "We are using the current date.\n";
+ $USECURRENT = 1;
+}
+
+#filter out the time zones
+foreach my $tzone (@TZONE_RAW) {
+ chomp($tzone);
+ if (-e $tzone) {
+ $TZONE[$index] = substr($tzone, 20);
+ $index++;
+ }
+}
+
+#go through each timezone and test
+$count = 0;
+$ENV{'LD_LIBRARY_PATH'} = $LIBRARY;
+
+print "The following time zones had wrong results.\n";
+
+foreach my $tzone (@TZONE) {
+ #set system time zone
+ $ENV{'TZ'} = "$tzone";
+
+ my @result = `./tzdate $year $month $day $hour $minute $USECURRENT`;
+
+ #if the result is wrong print the time zone information to a log file
+ if (scalar(@result) > 0) {
+ print "\nTIME ZONE: $tzone\n";
+ print "@result\n";
+ $count++;
+ }
+}
+
+print "\nThe number of time zones with wrong results: $count out of $index\n";
+
+print("\n\nGood Bye!\n");
+exit(0);
diff --git a/Build/source/libs/icu/icu-xetex/test/hdrtst/Makefile.in b/Build/source/libs/icu/icu-xetex/test/hdrtst/Makefile.in
new file mode 100644
index 00000000000..ff8d964b095
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/hdrtst/Makefile.in
@@ -0,0 +1,188 @@
+##
+## Copyright (c) 1999-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+##
+##
+## THE PURPOSE OF THIS TEST
+##
+## This tests all public header files (
+##
+## To run it simply type 'make check'. You SHOULD see:
+##
+## unicode/uchar.h - 0
+## unicode/uchriter.h - 0
+## unicode/ucnv.h - 0
+##
+## .. etc. Anything other than zero is an error. (except for the deprecation tests, where '1' is the correct value)
+##
+##
+## If a header fails the C compile because it's a C++ header, add it to the
+## file named 'cxxfiles.txt' in this directory.
+##
+## If a header fails because it is deprecated, add it to the 'dfiles.txt'
+##
+##
+
+
+include $(shell icu-config --incfile)
+srcdir=@srcdir@
+DIRS=$(prefix)/include/unicode
+LDIRS=$(prefix)/include/layout
+
+all:
+ @echo Please read this Makefile for more information.
+ @echo run \'$(MAKE) check\' to run the test
+
+check: dtest ctest cpptest lotest doclean drafttest deprtest internaltest obsoletetest
+ @echo "All header tests have finished. If deprecation #errors appeared, "
+ @echo " add files to hdrtst/dfiles.txt"
+ @echo "#################################################################"
+ @echo
+
+# break dependency
+doclean:
+ make clean
+
+cpptest:
+ @echo "C++ test #######################################################"
+ @rm -f Makefile.sub
+ @echo 'Testing all header files under C++'
+ @echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
+ @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
+ incfile=`basename $$file .h` ; \
+ echo -n "C++ unicode/$$incfile.h - " ; \
+ echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
+ echo 'void junk(){}' >> ht_$$incfile.cpp ; \
+ $(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp ; \
+ echo $$? ; \
+ done
+
+lotest:
+ @echo "Layout test #######################################################"
+ @rm -f Makefile.sub
+ @echo 'Testing all layout files under C++'
+ @echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
+ @for file in $(prefix)/include/layout/*.h; do \
+ incfile=`basename $$file .h` ; \
+ echo -n "C++ layout/$$incfile.h - " ; \
+ echo '#include "'layout/$$incfile'.h"' > ht_$$incfile.cpp ; \
+ echo 'void junk(){}' >> ht_$$incfile.cpp ; \
+ $(COMPILE.cc) -c $(cppflags) -I$(prefix)/include/layout ht_$$incfile.cpp ; \
+ echo $$? ; \
+ done
+
+dtest:
+ @rm -f Makefile.sub
+ @echo "Deprecation #######################################################"
+ @echo 'Should be 1 in each case if file is properly obsoleted.'
+ @for stub in `cat $(srcdir)/dfiles.txt | grep -v '^#'` ; do \
+ file=unicode/$$stub \
+ incfile=`basename $$file .h` ; \
+ echo -n "C++ unicode/$$incfile.h - " ; \
+ echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
+ echo 'void junk(){}' >> ht_$$incfile.cpp ; \
+ echo > ht_dep.junk ; \
+ $(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp 2>&1 | sed -e 's/^.*#error[^"]*"//' | fgrep -v ht_ | tee ht_dep.junk | fgrep -v "$$incfile.h header is obsolete" ; \
+ RES=$$? ; \
+ echo $$RES ; \
+ fgrep -q "$$incfile.h header is obsolete" ht_dep.junk || echo "** FAIL Header unicode/$$incfile.h is not obsoleted properly" ; \
+ rm -f unicode/$$stub ; \
+ done
+
+# < ht_dep.junk && ; \
+
+
+ctest:
+ @echo "C Test #######################################################"
+ @echo " (if any C++ files show up here, stop the test and add them to hdrtst/cxxfiles.txt) "
+ @rm -f Makefile.sub
+ @echo Building test harness for header files in ../../common and ../../i18n
+ @echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
+ @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/cxxfiles.txt | tee cfiles.txt`; do \
+ incfile=`basename $$file .h` ; \
+ echo -n "C unicode/$$incfile.h - " ; \
+ echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.c ; \
+ echo 'void junk(void);' >> ht_$$incfile.c ; \
+ echo 'void junk(){}' >> ht_$$incfile.c ; \
+ $(COMPILE.c) -c $(cppflags) ht_$$incfile.c ; \
+ RES=$$? ; \
+ echo $$RES ; \
+ done
+
+drafttest:
+ @echo "U_HIDE_DRAFT_API Test #######################################################"
+ @rm -f Makefile.sub
+ @echo Building test harness for header files in ../../common and ../../i18n
+ @echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
+ @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
+ incfile=`basename $$file .h` ; \
+ echo -n " unicode/$$incfile.h - " ; \
+ echo '#define U_HIDE_DRAFT_API' > hd_$$incfile.c; \
+ echo '#include "'unicode/$$incfile'.h"' >> ht_$$incfile.c ; \
+ echo 'void junk(void);' >> hd_$$incfile.c ; \
+ echo 'void junk(){}' >> hd_$$incfile.c ; \
+ $(COMPILE.cc) -c $(cppflags) hd_$$incfile.c ; \
+ RES=$$? ; \
+ echo $$RES ; \
+ done
+
+deprtest:
+ @echo "U_HIDE_DEPRECATED_API Test #######################################################"
+ @rm -f Makefile.sub
+ @echo Building test harness for header files in ../../common and ../../i18n
+ @echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
+ @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
+ incfile=`basename $$file .h` ; \
+ echo -n " unicode/$$incfile.h - " ; \
+ echo '#define U_HIDE_DEPRECATED_API' > hdp_$$incfile.c; \
+ echo '#include "'unicode/$$incfile'.h"' >> hdp_$$incfile.c ; \
+ echo 'void junk(void);' >> hdp_$$incfile.c ; \
+ echo 'void junk(){}' >> hdp_$$incfile.c ; \
+ $(COMPILE.cc) -c $(cppflags) hdp_$$incfile.c ; \
+ RES=$$? ; \
+ echo $$RES ; \
+ done
+
+internaltest:
+ @echo "U_HIDE_INTERNAL_API Test #######################################################"
+ @rm -f Makefile.sub
+ @echo Building test harness for header files in ../../common and ../../i18n
+ @echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
+ @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
+ incfile=`basename $$file .h` ; \
+ echo -n " unicode/$$incfile.h - " ; \
+ echo '#define U_HIDE_INTERNAL_API' > hin_$$incfile.c; \
+ echo '#include "'unicode/$$incfile'.h"' >> hin_$$incfile.c ; \
+ echo 'void junk(void);' >> hin_$$incfile.c ; \
+ echo 'void junk(){}' >> hin_$$incfile.c ; \
+ $(COMPILE.cc) -c $(cppflags) hin_$$incfile.c ; \
+ RES=$$? ; \
+ echo $$RES ; \
+ done
+
+obsoletetest:
+ @echo "U_HIDE_OBSOLETE_API Test #######################################################"
+ @rm -f Makefile.sub
+ @echo Building test harness for header files in ../../common and ../../i18n
+ @echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
+ @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
+ incfile=`basename $$file .h` ; \
+ echo -n " unicode/$$incfile.h - " ; \
+ echo '#define U_HIDE_OBSOLETE_API' > hob_$$incfile.c; \
+ echo '#include "'unicode/$$incfile'.h"' >> hob_$$incfile.c ; \
+ echo 'void junk(void);' >> hob_$$incfile.c ; \
+ echo 'void junk(){}' >> hob_$$incfile.c ; \
+ $(COMPILE.cc) -c $(cppflags) hob_$$incfile.c ; \
+ RES=$$? ; \
+ echo $$RES ; \
+ done
+
+clean:
+ -@rm -f *.h *.c *.cpp *.o *.junk
+
+distclean: clean
+ -@rm -f Makefile
+
+
+.PHONY: doclean check all cpptest lotest dtest ctest clean distclean
+
diff --git a/Build/source/libs/icu/icu-xetex/test/hdrtst/cxxfiles.txt b/Build/source/libs/icu/icu-xetex/test/hdrtst/cxxfiles.txt
new file mode 100644
index 00000000000..1fbb604e122
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/hdrtst/cxxfiles.txt
@@ -0,0 +1,88 @@
+# Copyright (c) 2001-2007 International Business Machines
+# Corporation and others. All Rights Reserved.
+bidi.h
+basictz.h
+brkiter.h
+calendar.h
+caniter.h
+chariter.h
+choicfmt.h
+coleitr.h
+coll.h
+convert.h
+cpdtrans.h
+datefmt.h
+dbbi.h
+dcfmtsym.h
+decimfmt.h
+dtfmtsym.h
+dtptngen.h
+dtrule.h
+fieldpos.h
+fmtable.h
+format.h
+gregocal.h
+hextouni.h
+locid.h
+msgfmt.h
+normlzr.h
+nultrans.h
+numfmt.h
+parsepos.h
+rbbi.h
+rbnf.h
+rbt.h
+rbtz.h
+regex.h
+rep.h
+resbund.h
+schriter.h
+search.h
+simpletz.h
+smpdtfmt.h
+sortkey.h
+strenum.h
+stsearch.h
+tblcoll.h
+timezone.h
+translit.h
+tzrule.h
+tztrans.h
+uchriter.h
+unicode.h
+unifilt.h
+unifltlg.h
+unifunct.h
+unimatch.h
+unirepl.h
+uniset.h
+unistr.h
+unitohex.h
+uobject.h
+usetiter.h
+vtzone.h
+#added
+loengine.h
+#the following are C++ also
+ustream.h
+symtable.h
+#layout, layoutex are C++ only
+LayoutEngine.h
+LEFontInstance.h
+LEGlyphFilter.h
+LELanguages.h
+LEScripts.h
+LESwaps.h
+LETypes.h
+ParagraphLayout.h
+RunArrays.h
+# currency...
+curramt.h
+currunit.h
+measfmt.h
+measunit.h
+measure.h
+# platform specific
+pmacos.h
+pos400.h
+pwin32.h
diff --git a/Build/source/libs/icu/icu-xetex/test/hdrtst/dfiles.txt b/Build/source/libs/icu/icu-xetex/test/hdrtst/dfiles.txt
new file mode 100644
index 00000000000..ecc60dac51d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/hdrtst/dfiles.txt
@@ -0,0 +1,4 @@
+# Copyright (c) 2001-2003 International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+# in 2.6 - no deprecated headers.
diff --git a/Build/source/libs/icu/icu-xetex/test/hdrtst/pfiles.txt b/Build/source/libs/icu/icu-xetex/test/hdrtst/pfiles.txt
new file mode 100644
index 00000000000..95502b7f8b5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/hdrtst/pfiles.txt
@@ -0,0 +1,3 @@
+# Copyright (c) 2001-2004 International Business Machines
+# Corporation and others. All Rights Reserved.
+pwin32.h
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/Makefile.in b/Build/source/libs/icu/icu-xetex/test/intltest/Makefile.in
new file mode 100644
index 00000000000..27a0424b3bd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/Makefile.in
@@ -0,0 +1,114 @@
+#******************************************************************************
+#
+# Copyright (C) 1999-2007, International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+#******************************************************************************
+## Makefile.in for ICU - test/intltest
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+## All the flags and other definitions are included here.
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/intltest
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = intltest$(EXEEXT)
+
+BUILDDIR := $(CURR_SRCCODE_FULL_DIR)/../../
+# Simplify the path for Unix
+BUILDDIR := $(BUILDDIR:test/intltest/../../=)
+# Simplify the path for Windows
+BUILDDIR := $(BUILDDIR:test\\intltest/../../=)
+# Simplify the path for Windows 98
+BUILDDIR := $(BUILDDIR:TEST\\INTLTEST/../../=)
+
+ifneq ($(top_builddir),$(top_srcdir))
+CPPFLAGS += -I$(top_builddir)/common
+endif
+CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) $(LIB_THREAD)
+
+OBJECTS = aliastst.o allcoll.o apicoll.o astrotst.o callimts.o calregts.o caltest.o \
+caltztst.o canittst.o citrtest.o cntabcol.o convtest.o currcoll.o \
+fldset.o dadrfmt.o dadrcal.o dadrcoll.o dcfmapts.o decoll.o dtfmapts.o dtfmrgts.o dtfmtrtts.o dtfmttst.o \
+dtptngts.o encoll.o escoll.o ficoll.o frcoll.o g7coll.o intltest.o \
+itercoll.o itformat.o itmajor.o itutil.o jacoll.o lcukocol.o \
+loctest.o miscdtfm.o mnkytst.o msfmrgts.o nmfmapts.o nmfmtrt.o \
+numfmtst.o numrgts.o pptest.o regcoll.o restest.o restsnew.o \
+sdtfmtts.o svccoll.o tchcfmt.o \
+tfsmalls.o tmsgfmt.o trcoll.o tscoll.o tsdate.o tsdcfmsy.o tsdtfmsy.o \
+tsmthred.o tsnmfmt.o tsputil.o tstnrapi.o tstnorm.o tzbdtest.o \
+tzregts.o tztest.o ucdtest.o usettest.o ustrtest.o strcase.o transtst.o strtest.o thcoll.o \
+itrbbi.o rbbiapts.o rbbitst.o ittrans.o transapi.o cpdtrtst.o \
+testutil.o transrt.o trnserr.o normconf.o sfwdchit.o \
+jamotest.o srchtest.o reptest.o regextst.o \
+itrbnf.o itrbnfrt.o itrbnfp.o ucaconf.o icusvtst.o \
+uobjtest.o idnaref.o idnaconf.o nptrans.o punyref.o testidn.o testidna.o incaltst.o \
+calcasts.o v32test.o uvectest.o textfile.o tokiter.o utxttest.o \
+windttst.o winnmtst.o winutil.o csdetest.o tzrulets.o tzoffloc.o tzfmttst.o
+
+
+DEPS = $(OBJECTS:.o=.d)
+
+-include Makefile.local
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+ $(INVOKE) ./$(TARGET) $(INTLTEST_OPTS) || true
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/aliastst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/aliastst.cpp
new file mode 100644
index 00000000000..3abb2959edb
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/aliastst.cpp
@@ -0,0 +1,287 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2005-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "aliastst.h"
+#include "unicode/calendar.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/datefmt.h"
+#include "unicode/unistr.h"
+#include "unicode/coll.h"
+#include "unicode/resbund.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+const char* _LOCALE_ALIAS[][2] = {
+ {"in", "id"},
+ {"in_ID", "id_ID"},
+ {"iw", "he"},
+ {"iw_IL", "he_IL"},
+ {"ji", "yi"},
+ {"en_BU", "en_MM"},
+ {"en_DY", "en_BJ"},
+ {"en_HV", "en_BF"},
+ {"en_NH", "en_VU"},
+ {"en_RH", "en_ZW"},
+ {"en_TP", "en_TL"},
+ {"en_ZR", "en_CD"}
+};
+
+const int _LOCALE_NUMBER = 12;
+
+void LocaleAliasTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ){
+ switch (index) {
+ TESTCASE(0, TestCalendar);
+ TESTCASE(1, TestDateFormat);
+ TESTCASE(2, TestCollation);
+ TESTCASE(3, TestULocale);
+ TESTCASE(4, TestUResourceBundle);
+ TESTCASE(5, TestDisplayName);
+ // keep the last index in sync with the condition in default:
+
+ default:
+ if (index <= 5) { // keep this in sync with the last index!
+ name = "(test omitted by !UCONFIG_NO_FORMATTING)";
+ } else {
+ name = "";
+ }
+ break; //needed to end loop
+ }
+}
+
+void LocaleAliasTest::TestCalendar() {
+#if !UCONFIG_NO_FORMATTING
+ UErrorCode status = U_ZERO_ERROR;
+ for (int i=0; i<_LOCALE_NUMBER; i++) {
+ Locale oldLoc(_LOCALE_ALIAS[i][0]);
+ Locale newLoc(_LOCALE_ALIAS[i][1]);
+ if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){
+ logln(UnicodeString(newLoc.getName())+" is not available. Skipping!");
+ continue;
+ }
+ logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName());
+ Calendar* c1 = Calendar::createInstance(oldLoc, status);
+ Calendar* c2 = Calendar::createInstance(newLoc, status);
+
+ //Test function "getLocale(ULocale.VALID_LOCALE)"
+ const char* l1 = c1->getLocaleID(ULOC_VALID_LOCALE, status);
+ const char* l2 = c2->getLocaleID(ULOC_VALID_LOCALE, status);
+ if (strcmp(newLoc.getName(), l1)!=0) {
+ errln("CalendarTest: newLoc!=l1: newLoc= "+UnicodeString(newLoc.getName()) +" l1= "+UnicodeString(l1));
+ }
+ if (strcmp(l1, l2)!=0) {
+ errln("CalendarTest: l1!=l2: l1= "+UnicodeString(l1) +" l2= "+UnicodeString(l2));
+ }
+ if(!(c1==c2)){
+ errln("CalendarTest: c1!=c2. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName()));
+ }
+ logln("Calendar(getLocale) old:"+UnicodeString(l1)+" new:"+UnicodeString(l2));
+ delete c1;
+ delete c2;
+ }
+#endif
+}
+void LocaleAliasTest::TestDateFormat() {
+#if !UCONFIG_NO_FORMATTING
+ UErrorCode status = U_ZERO_ERROR;
+ for (int i=0; i<_LOCALE_NUMBER; i++) {
+ Locale oldLoc(_LOCALE_ALIAS[i][0]);
+ Locale newLoc(_LOCALE_ALIAS[i][1]);
+ if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){
+ logln(UnicodeString(newLoc.getName())+" is not available. Skipping!");
+ continue;
+ }
+ logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName());
+
+ DateFormat* df1 = DateFormat::createDateInstance(DateFormat::FULL, oldLoc);
+ DateFormat* df2 = DateFormat::createDateInstance(DateFormat::FULL, newLoc);
+
+ //Test function "getLocale"
+ const char* l1 = df1->getLocaleID(ULOC_VALID_LOCALE, status);
+ const char* l2 = df2->getLocaleID(ULOC_VALID_LOCALE, status);
+ if (strcmp(newLoc.getName(), l1)!=0) {
+ errln("CalendarTest: newLoc!=l1: newLoc= "+UnicodeString(newLoc.getName()) +" l1= "+UnicodeString(l1));
+ }
+ if (strcmp(l1, l2)!=0) {
+ errln("TestDateFormat: l1!=l2: l1= "+UnicodeString(l1) +" l2= "+UnicodeString(l2));
+ }
+ if(!(df1==df2)){
+ errln("TestDateFormat: c1!=c2. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName()));
+ }
+ logln("DateFormat(getLocale) old:%s new:%s",l1,l2);
+
+ delete df1;
+ delete df2;
+ }
+#endif
+}
+void LocaleAliasTest::TestCollation() {
+#if !UCONFIG_NO_COLLATION
+ UErrorCode status = U_ZERO_ERROR;
+ for (int i=0; i<_LOCALE_NUMBER; i++) {
+ Locale oldLoc(_LOCALE_ALIAS[i][0]);
+ Locale newLoc(_LOCALE_ALIAS[i][1]);
+ if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){
+ logln(UnicodeString(newLoc.getName())+" is not available. Skipping!");
+ continue;
+ }
+ logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName());
+
+ Collator* c1 = Collator::createInstance(oldLoc, status);
+ Collator* c2 = Collator::createInstance(newLoc, status);
+
+ Locale l1 = c1->getLocale(ULOC_VALID_LOCALE, status);
+ Locale l2 = c2->getLocale(ULOC_VALID_LOCALE, status);
+
+ if (strcmp(newLoc.getName(), l1.getName())!=0) {
+ errln("CalendarTest: newLoc!=l1: newLoc= "+UnicodeString(newLoc.getName()) +" l1= "+UnicodeString(l1.getName()));
+ }
+ if (strcmp(l1.getName(), l2.getName())!=0) {
+ errln("CollationTest: l1!=l2: l1= "+UnicodeString(l1.getName()) +" l2= "+UnicodeString(l2.getName()));
+ }
+ if(!(c1==c2)){
+ errln("CollationTest: c1!=c2. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName()));
+ }
+ logln("Collator(getLocale) old:%s new:%s", l1.getName(), l2.getName());
+ delete c1;
+ delete c2;
+ }
+#endif
+}
+void LocaleAliasTest::TestULocale() {
+ for (int i=0; i<_LOCALE_NUMBER; i++) {
+ Locale oldLoc(_LOCALE_ALIAS[i][0]);
+ Locale newLoc(_LOCALE_ALIAS[i][1]);
+ if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){
+ logln(UnicodeString(newLoc.getName())+" is not available. Skipping!");
+ continue;
+ }
+ logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName());
+
+ UnicodeString name1, name2;
+ oldLoc.getDisplayName(name1);
+ newLoc.getDisplayName(name2);
+ if (name1!=name2) {
+ errln("DisplayNames are not equal. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName()));
+ }
+ log("ULocale(getDisplayName) old:");
+ log(name1);
+ log(" new:");
+ logln(name2);
+ }
+}
+LocaleAliasTest::LocaleAliasTest(){
+ UErrorCode status = U_ZERO_ERROR;
+ resIndex = ures_open(NULL,"res_index", &status);
+ if(U_FAILURE(status)){
+ errln("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status));
+ resIndex=NULL;
+ }
+ defLocale = Locale::getDefault();
+ Locale::setDefault(Locale::getUS(), status);
+}
+LocaleAliasTest::~LocaleAliasTest(){
+ /* reset the default locale */
+ UErrorCode status = U_ZERO_ERROR;
+ Locale::setDefault(defLocale, status);
+ ures_close(resIndex);
+ if(U_FAILURE(status)){
+ errln("Could not reset the default locale. Exiting. Error: %s\n", u_errorName(status));
+ }
+}
+UBool LocaleAliasTest::isLocaleAvailable(const char* loc){
+ if(resIndex==NULL){
+ return FALSE;
+ }
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = 0;
+ ures_getStringByKey(resIndex, loc,&len, &status);
+ if(U_FAILURE(status)){
+ return FALSE;
+ }
+ return TRUE;
+}
+void LocaleAliasTest::TestDisplayName() {
+ int32_t availableNum =0;
+ const Locale* available = Locale::getAvailableLocales(availableNum);
+ for (int i=0; i<_LOCALE_NUMBER; i++) {
+ Locale oldLoc(_LOCALE_ALIAS[i][0]);
+ Locale newLoc(_LOCALE_ALIAS[i][1]);
+ if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){
+ logln(UnicodeString(newLoc.getName())+" is not available. Skipping!");
+ continue;
+ }
+ for(int j=0; j<availableNum; j++){
+ UnicodeString dipLocName = UnicodeString(available[j].getName());
+ const UnicodeString oldCountry = oldLoc.getDisplayCountry(dipLocName);
+ const UnicodeString newCountry = newLoc.getDisplayCountry(dipLocName);
+ const UnicodeString oldLang = oldLoc.getDisplayLanguage(dipLocName);
+ const UnicodeString newLang = newLoc.getDisplayLanguage(dipLocName);
+
+ // is there display name for the current country ID
+ if(newCountry != newLoc.getCountry()){
+ if(oldCountry!=newCountry){
+ errln("getCountry() failed for "+ UnicodeString(oldLoc.getName()) +" oldCountry= "+ prettify(oldCountry) +" newCountry = "+prettify(newCountry)+ " in display locale "+ UnicodeString(available[j].getName()));
+ }
+ }
+ //there is a display name for the current lang ID
+ if(newLang != newLoc.getLanguage()){
+ if(oldLang != newLang){
+ errln("getLanguage() failed for " + UnicodeString(oldLoc.getName()) + " oldLang = "+ prettify(oldLang) +" newLang = "+prettify(newLang)+ " in display locale "+UnicodeString(available[j].getName()));
+ }
+ }
+ }
+ }
+}
+void LocaleAliasTest::TestUResourceBundle() {
+
+ UErrorCode status = U_ZERO_ERROR;
+ for (int i=0; i<_LOCALE_NUMBER; i++) {
+ Locale oldLoc(_LOCALE_ALIAS[i][0]);
+ Locale newLoc(_LOCALE_ALIAS[i][1]);
+ if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){
+ logln(UnicodeString(newLoc.getName())+" is not available. Skipping!");
+ continue;
+ }
+ logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName());
+
+ ResourceBundle* rb1 = NULL;
+ ResourceBundle* rb2 = NULL;
+
+ const char* testdatapath=loadTestData(status);
+
+ UnicodeString us1("NULL");
+ UnicodeString us2("NULL");
+ rb1 = new ResourceBundle(testdatapath, oldLoc, status);
+ if (U_FAILURE(U_ZERO_ERROR)) {
+
+ } else {
+ us1 = rb1->getStringEx("locale", status);
+ }
+ rb2 = new ResourceBundle(testdatapath, newLoc, status);
+ if (U_FAILURE(U_ZERO_ERROR)){
+
+ } else {
+ us2 = rb2->getStringEx("locale", status);
+ }
+ UnicodeString uNewLoc(newLoc.getName());
+ if (us1.compare(uNewLoc)!=0 || us1.compare(us2)!=0 || status!=U_ZERO_ERROR) {
+
+ }
+ log("UResourceBundle(getStringEx) old:");
+ log(us1);
+ log(" new:");
+ logln(us2);
+
+ if (rb1!=NULL) {
+ delete rb1;
+ }
+ if (rb2!=NULL) {
+ delete rb2;
+ }
+ }
+
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/aliastst.h b/Build/source/libs/icu/icu-xetex/test/intltest/aliastst.h
new file mode 100644
index 00000000000..e9a0db4638d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/aliastst.h
@@ -0,0 +1,30 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2005-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+#ifndef _ALIASTST
+#define _ALIASTST
+
+#include "intltest.h"
+#include "unicode/locid.h"
+#include "unicode/ures.h"
+
+class LocaleAliasTest: public IntlTest {
+public:
+ void TestCalendar();
+ void TestDateFormat();
+ void TestCollation();
+ void TestULocale();
+ void TestUResourceBundle();
+ void TestDisplayName();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ LocaleAliasTest();
+ virtual ~LocaleAliasTest();
+private:
+ UResourceBundle* resIndex;
+ UBool isLocaleAvailable(const char*);
+ Locale defLocale;
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/allcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/allcoll.cpp
new file mode 100644
index 00000000000..f7518f03078
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/allcoll.cpp
@@ -0,0 +1,212 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "allcoll.h"
+#include "sfwdchit.h"
+#include "../cintltst/calldata.h"
+
+
+CollationDummyTest::CollationDummyTest()
+: myCollation(0)
+{
+ /*UErrorCode status = U_ZERO_ERROR;
+ UnicodeString rules(TRUE, DEFAULTRULEARRAY, sizeof(DEFAULTRULEARRAY)/sizeof(DEFAULTRULEARRAY[0]));
+ UnicodeString newRules("& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ");
+ rules += newRules;
+ myCollation = new RuleBasedCollator(rules, status);
+ */
+
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString ruleset("& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ");
+ if (myCollation != NULL)
+ {
+ delete myCollation;
+ }
+ myCollation = new RuleBasedCollator(ruleset, status);
+ if(U_FAILURE(status)){
+ errln("ERROR: in creation of rule based collator from ruleset");
+ delete myCollation;
+ myCollation = 0;
+ }
+}
+
+CollationDummyTest::~CollationDummyTest()
+{
+ delete myCollation;
+}
+
+const Collator::EComparisonResult CollationDummyTest::results[] = {
+ Collator::LESS,
+ Collator::LESS, /*Collator::GREATER,*/
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::GREATER,
+ Collator::LESS, /* 10 */
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ /* test primary > 17 */
+ Collator::EQUAL,
+ Collator::EQUAL,
+ Collator::EQUAL, /* 20 */
+ Collator::LESS,
+ Collator::LESS,
+ Collator::EQUAL,
+ Collator::EQUAL,
+ Collator::EQUAL,
+ Collator::LESS,
+ /* test secondary > 26 */
+ Collator::EQUAL,
+ Collator::EQUAL,
+ Collator::EQUAL,
+ Collator::EQUAL,
+ Collator::EQUAL, /* 30 */
+ Collator::EQUAL,
+ Collator::LESS,
+ Collator::EQUAL, /* 34 */
+ Collator::EQUAL,
+ Collator::EQUAL,
+ Collator::LESS
+};
+
+
+void CollationDummyTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ myCollation->setStrength(Collator::TERTIARY);
+ for (i = 0; i < 17 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+void CollationDummyTest::TestPrimary(/* char* par */)
+{
+ /* problem in strcollinc for unfinshed contractions */
+ UErrorCode status = U_ZERO_ERROR;
+
+ myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ myCollation->setStrength(Collator::PRIMARY);
+
+ if (U_FAILURE(status))
+ {
+ errln("Failure in setting attribute for normalization mode\n");
+ }
+
+ for (int i = 17; i < 26 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void CollationDummyTest::TestSecondary(/* char* par */)
+{
+ int32_t i;
+ myCollation->setStrength(Collator::SECONDARY);
+ for (i = 26; i < 34; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void CollationDummyTest::TestExtra(/* char* par */)
+{
+ int32_t i, j;
+ myCollation->setStrength(Collator::TERTIARY);
+ for (i = 0; i < COUNT_TEST_CASES-1; i++)
+ {
+ for (j = i + 1; j < COUNT_TEST_CASES; j += 1)
+ {
+ doTest(myCollation, testCases[i], testCases[j], Collator::LESS);
+ }
+ }
+}
+
+void CollationDummyTest::TestIdentical()
+{
+ int32_t i;
+ myCollation->setStrength(Collator::IDENTICAL);
+ for (i= 34; i<37; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void CollationDummyTest::TestJB581(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ UnicodeString source("THISISATEST.");
+ UnicodeString target("Thisisatest.");
+
+ Collator *coll = Collator::createInstance("en_US", status);
+ if (U_FAILURE(status)){
+ errln("ERROR: Failed to create the collator for : en_US\n");
+ return;
+ }
+
+ Collator::EComparisonResult result = coll->compare(source, target);
+ /* result is 1, secondary differences only for ignorable space characters*/
+ if (result != 1)
+ {
+ errln("Comparing two strings with only secondary differences in C failed.\n");
+ }
+ /* To compare them with just primary differences */
+ coll->setStrength(Collator::PRIMARY);
+ result = coll->compare(source, target);
+ /* result is 0 */
+ if (result != 0)
+ {
+ errln("Comparing two strings with no differences in C failed.\n");
+ }
+ /* Now, do the same comparison with keys */
+ CollationKey sourceKeyOut,
+ targetKeyOut;
+ coll->getCollationKey(source, sourceKeyOut, status);
+ coll->getCollationKey(target, targetKeyOut, status);
+ result = sourceKeyOut.compareTo(targetKeyOut);
+ if (result != 0)
+ {
+ errln("Comparing two strings with sort keys in C failed.\n");
+ }
+ delete coll;
+}
+
+void CollationDummyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationDummyTest: ");
+ if(myCollation) {
+ switch (index) {
+ case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break;
+ case 1: name = "TestSecondary"; if (exec) TestSecondary(/* par */); break;
+ case 2: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ case 3: name = "TestExtra"; if (exec) TestExtra(/* par */); break;
+ case 4: name = "TestIdentical"; if (exec) TestIdentical(/* par */); break;
+ case 5: name = "TestJB581"; if (exec) TestJB581(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ errln("Collator couldn't be instantiated!");
+ name = "";
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/allcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/allcoll.h
new file mode 100644
index 00000000000..040a7501f56
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/allcoll.h
@@ -0,0 +1,57 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+/**
+ * CollationDummyTest is a third level test class. This tests creation of
+ * a customized collator object. For example, number 1 to be sorted
+ * equlivalent to word 'one'.
+ */
+
+#ifndef _ALLCOLL
+#define _ALLCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/tblcoll.h"
+#include "tscoll.h"
+
+class CollationDummyTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationDummyTest();
+ virtual ~CollationDummyTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+
+ // perform test with strength PRIMARY
+ void TestPrimary(/* char* par */);
+
+ // perform test with strength SECONDARY
+ void TestSecondary(/* char* par */);
+
+ // perform test with strength tertiary
+ void TestTertiary(/* char* par */);
+
+ // perform extra tests
+ void TestExtra(/* char* par */);
+
+ void TestIdentical();
+
+ void TestJB581();
+
+private:
+ static const Collator::EComparisonResult results[];
+
+ RuleBasedCollator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/apicoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/apicoll.cpp
new file mode 100644
index 00000000000..0150f1a9198
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/apicoll.cpp
@@ -0,0 +1,2325 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+//===============================================================================
+//
+// File apitest.cpp
+//
+//
+//
+// Created by: Helena Shih
+//
+// Modification History:
+//
+// Date Name Description
+// 2/5/97 aliu Added streamIn and streamOut methods. Added
+// constructor which reads RuleBasedCollator object from
+// a binary file. Added writeToFile method which streams
+// RuleBasedCollator out to a binary file. The streamIn
+// and streamOut methods use istream and ostream objects
+// in binary mode.
+// 6/30/97 helena Added tests for CollationElementIterator::setText, getOffset
+// setOffset and DecompositionIterator::getOffset, setOffset.
+// DecompositionIterator is made public so add class scope
+// testing.
+// 02/10/98 damiba Added test for compare(UnicodeString&, UnicodeString&, int32_t)
+//===============================================================================
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/coleitr.h"
+#include "unicode/sortkey.h"
+#include "apicoll.h"
+#include "unicode/chariter.h"
+#include "unicode/schriter.h"
+#include "unicode/ustring.h"
+#include "unicode/ucol.h"
+
+#include "sfwdchit.h"
+#include "cmemory.h"
+#include <stdlib.h>
+
+void
+CollationAPITest::doAssert(UBool condition, const char *message)
+{
+ if (!condition) {
+ errln(UnicodeString("ERROR : ") + message);
+ }
+}
+
+#ifdef U_USE_COLLATION_OBSOLETE_2_6
+/*
+ * Test Collator::createInstance(... version...) for some locale. Called by TestProperty().
+ */
+static void
+TestOpenVersion(IntlTest &test, const Locale &locale) {
+ UVersionInfo version1, version2;
+ Collator *collator1, *collator2;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ collator1=Collator::createInstance(locale, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ /* get the current version */
+ collator1->getVersion(version1);
+ delete collator1;
+
+ /* try to get that same version again */
+ collator2=Collator::createInstance(locale, version1, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ collator2->getVersion(version2);
+ if(0!=uprv_memcmp(version1, version2, sizeof(UVersionInfo))) {
+ test.errln("error: Collator::createInstance(\"%s\", (%s collator)->getVersion()) returns a different collator\n", locale.getName(), locale.getName());
+ }
+ delete collator2;
+ } else {
+ test.errln("error: Collator::createInstance(\"%s\", (%s collator)->getVersion()) fails: %s\n", locale.getName(), locale.getName(), u_errorName(errorCode));
+ }
+ }
+}
+#endif
+
+// Collator Class Properties
+// ctor, dtor, createInstance, compare, getStrength/setStrength
+// getDecomposition/setDecomposition, getDisplayName
+void
+CollationAPITest::TestProperty(/* char* par */)
+{
+ UErrorCode success = U_ZERO_ERROR;
+ Collator *col = 0;
+ /*
+ All the collations have the same version in an ICU
+ version.
+ ICU 2.0 currVersionArray = {0x18, 0xC0, 0x02, 0x02};
+ ICU 2.1 currVersionArray = {0x19, 0x00, 0x03, 0x03};
+ ICU 2.2 currVersionArray = {0x21, 0x40, 0x04, 0x04};
+ ICU 2.4 currVersionArray = {0x21, 0x40, 0x04, 0x04};
+ ICU 2.6 currVersionArray = {0x21, 0x40, 0x03, 0x03};
+ ICU 2.8 currVersionArray = {0x29, 0x80, 0x00, 0x04};
+ ICU 3.4 currVersionArray = {0x31, 0xC0, 0x00, 0x04};
+ */
+ UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x05};
+ UVersionInfo versionArray;
+ int i = 0;
+
+ logln("The property tests begin : ");
+ logln("Test ctors : ");
+ col = Collator::createInstance(Locale::getEnglish(), success);
+
+ if (U_FAILURE(success))
+ {
+ errln("Default Collator creation failed.");
+ return;
+ }
+
+ col->getVersion(versionArray);
+ for (i=0; i<4; ++i) {
+ if (versionArray[i] != currVersionArray[i]) {
+ errln("Testing ucol_getVersion() - unexpected result: %d.%d.%d.%d",
+ versionArray[0], versionArray[1], versionArray[2], versionArray[3]);
+ break;
+ }
+ }
+
+ doAssert((col->compare("ab", "abc") == Collator::LESS), "ab < abc comparison failed");
+ doAssert((col->compare("ab", "AB") == Collator::LESS), "ab < AB comparison failed");
+ doAssert((col->compare("blackbird", "black-bird") == Collator::GREATER), "black-bird > blackbird comparison failed");
+ doAssert((col->compare("black bird", "black-bird") == Collator::LESS), "black bird > black-bird comparison failed");
+ doAssert((col->compare("Hello", "hello") == Collator::GREATER), "Hello > hello comparison failed");
+
+
+ /*start of update [Bertrand A. D. 02/10/98]*/
+ doAssert((col->compare("ab", "abc", 2) == Collator::EQUAL), "ab = abc with length 2 comparison failed");
+ doAssert((col->compare("ab", "AB", 2) == Collator::LESS), "ab < AB with length 2 comparison failed");
+ doAssert((col->compare("ab", "Aa", 1) == Collator::LESS), "ab < Aa with length 1 comparison failed");
+ doAssert((col->compare("ab", "Aa", 2) == Collator::GREATER), "ab > Aa with length 2 comparison failed");
+ doAssert((col->compare("black-bird", "blackbird", 5) == Collator::EQUAL), "black-bird = blackbird with length of 5 comparison failed");
+ doAssert((col->compare("black bird", "black-bird", 10) == Collator::LESS), "black bird < black-bird with length 10 comparison failed");
+ doAssert((col->compare("Hello", "hello", 5) == Collator::GREATER), "Hello > hello with length 5 comparison failed");
+ /*end of update [Bertrand A. D. 02/10/98]*/
+
+
+ logln("Test ctors ends.");
+ logln("testing Collator::getStrength() method ...");
+ doAssert((col->getStrength() == Collator::TERTIARY), "collation object has the wrong strength");
+ doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
+
+
+ logln("testing Collator::setStrength() method ...");
+ col->setStrength(Collator::SECONDARY);
+ doAssert((col->getStrength() != Collator::TERTIARY), "collation object's strength is secondary difference");
+ doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
+ doAssert((col->getStrength() == Collator::SECONDARY), "collation object has the wrong strength");
+
+ UnicodeString name;
+
+ logln("Get display name for the US English collation in German : ");
+ logln(Collator::getDisplayName(Locale::getUS(), Locale::getGerman(), name));
+ doAssert((name == UnicodeString("Englisch (Vereinigte Staaten)")), "getDisplayName failed");
+
+ logln("Get display name for the US English collation in English : ");
+ logln(Collator::getDisplayName(Locale::getUS(), Locale::getEnglish(), name));
+ doAssert((name == UnicodeString("English (United States)")), "getDisplayName failed");
+#if 0
+ // weiv : this test is bogus if we're running on any machine that has different default locale than English.
+ // Therefore, it is banned!
+ logln("Get display name for the US English in default locale language : ");
+ logln(Collator::getDisplayName(Locale::US, name));
+ doAssert((name == UnicodeString("English (United States)")), "getDisplayName failed if this is an English machine");
+#endif
+ delete col; col = 0;
+ RuleBasedCollator *rcol = (RuleBasedCollator *)Collator::createInstance("da_DK",
+ success);
+ doAssert(rcol->getRules().length() != 0, "da_DK rules does not have length 0");
+ delete rcol;
+
+ col = Collator::createInstance(Locale::getFrench(), success);
+ if (U_FAILURE(success))
+ {
+ errln("Creating French collation failed.");
+ return;
+ }
+
+ col->setStrength(Collator::PRIMARY);
+ logln("testing Collator::getStrength() method again ...");
+ doAssert((col->getStrength() != Collator::TERTIARY), "collation object has the wrong strength");
+ doAssert((col->getStrength() == Collator::PRIMARY), "collation object's strength is not primary difference");
+
+ logln("testing French Collator::setStrength() method ...");
+ col->setStrength(Collator::TERTIARY);
+ doAssert((col->getStrength() == Collator::TERTIARY), "collation object's strength is not tertiary difference");
+ doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
+ doAssert((col->getStrength() != Collator::SECONDARY), "collation object's strength is secondary difference");
+
+ logln("Create junk collation: ");
+ Locale abcd("ab", "CD", "");
+ success = U_ZERO_ERROR;
+ Collator *junk = 0;
+ junk = Collator::createInstance(abcd, success);
+
+ if (U_FAILURE(success))
+ {
+ errln("Junk collation creation failed, should at least return default.");
+ delete col;
+ return;
+ }
+
+ delete col;
+ col = Collator::createInstance(success);
+ if (U_FAILURE(success))
+ {
+ errln("Creating default collator failed.");
+ delete junk;
+ return;
+ }
+
+ doAssert(((RuleBasedCollator *)col)->getRules() == ((RuleBasedCollator *)junk)->getRules(),
+ "The default collation should be returned.");
+ Collator *frCol = Collator::createInstance(Locale::getFrance(), success);
+ if (U_FAILURE(success))
+ {
+ errln("Creating French collator failed.");
+ delete col;
+ delete junk;
+ return;
+ }
+
+ // If the default locale isn't French, the French and non-French collators
+ // should be different
+ if (frCol->getLocale(ULOC_ACTUAL_LOCALE, success) != Locale::getFrench()) {
+ doAssert((*frCol != *junk), "The junk is the same as the French collator.");
+ }
+ Collator *aFrCol = frCol->clone();
+ doAssert((*frCol == *aFrCol), "The cloning of a French collator failed.");
+ logln("Collator property test ended.");
+
+ delete col;
+ delete frCol;
+ delete aFrCol;
+ delete junk;
+
+#ifdef U_USE_COLLATION_OBSOLETE_2_6
+ /* test Collator::createInstance(...version...) */
+ TestOpenVersion(*this, "");
+ TestOpenVersion(*this, "da");
+ TestOpenVersion(*this, "fr");
+ TestOpenVersion(*this, "ja");
+
+ /* try some bogus version */
+ versionArray[0]=0;
+ versionArray[1]=0x99;
+ versionArray[2]=0xc7;
+ versionArray[3]=0xfe;
+ col=Collator::createInstance(Locale(), versionArray, success);
+ if(U_SUCCESS(success)) {
+ errln("error: ucol_openVersion(bogus version) succeeded");
+ delete col;
+ }
+#endif
+}
+
+void
+CollationAPITest::TestRuleBasedColl()
+{
+ RuleBasedCollator *col1, *col2, *col3, *col4;
+ UErrorCode status = U_ZERO_ERROR;
+
+ UnicodeString ruleset1("&9 < a, A < b, B < c, C; ch, cH, Ch, CH < d, D, e, E");
+ UnicodeString ruleset2("&9 < a, A < b, B < c, C < d, D, e, E");
+
+ col1 = new RuleBasedCollator(ruleset1, status);
+ if (U_FAILURE(status)) {
+ errln("RuleBased Collator creation failed.\n");
+ return;
+ }
+ else {
+ logln("PASS: RuleBased Collator creation passed\n");
+ }
+
+ status = U_ZERO_ERROR;
+ col2 = new RuleBasedCollator(ruleset2, status);
+ if (U_FAILURE(status)) {
+ errln("RuleBased Collator creation failed.\n");
+ return;
+ }
+ else {
+ logln("PASS: RuleBased Collator creation passed\n");
+ }
+
+ status = U_ZERO_ERROR;
+ Locale locale("aa", "AA");
+ col3 = (RuleBasedCollator *)Collator::createInstance(locale, status);
+ if (U_FAILURE(status)) {
+ errln("Fallback Collator creation failed.: %s\n");
+ return;
+ }
+ else {
+ logln("PASS: Fallback Collator creation passed\n");
+ }
+ delete col3;
+
+ status = U_ZERO_ERROR;
+ col3 = (RuleBasedCollator *)Collator::createInstance(status);
+ if (U_FAILURE(status)) {
+ errln("Default Collator creation failed.: %s\n");
+ return;
+ }
+ else {
+ logln("PASS: Default Collator creation passed\n");
+ }
+
+ UnicodeString rule1 = col1->getRules();
+ UnicodeString rule2 = col2->getRules();
+ UnicodeString rule3 = col3->getRules();
+
+ doAssert(rule1 != rule2, "Default collator getRules failed");
+ doAssert(rule2 != rule3, "Default collator getRules failed");
+ doAssert(rule1 != rule3, "Default collator getRules failed");
+
+ col4 = new RuleBasedCollator(rule2, status);
+ if (U_FAILURE(status)) {
+ errln("RuleBased Collator creation failed.\n");
+ return;
+ }
+
+ UnicodeString rule4 = col4->getRules();
+ doAssert(rule2 == rule4, "Default collator getRules failed");
+ int32_t length4 = 0;
+ uint8_t *clonedrule4 = col4->cloneRuleData(length4, status);
+ if (U_FAILURE(status)) {
+ errln("Cloned rule data failed.\n");
+ return;
+ }
+
+ // free(clonedrule4); BAD API!!!!
+ uprv_free(clonedrule4);
+
+
+ delete col1;
+ delete col2;
+ delete col3;
+ delete col4;
+}
+
+void
+CollationAPITest::TestRules()
+{
+ RuleBasedCollator *coll;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString rules;
+
+ coll = (RuleBasedCollator *)Collator::createInstance(Locale::getEnglish(), status);
+ if (U_FAILURE(status)) {
+ errln("English Collator creation failed.\n");
+ return;
+ }
+ else {
+ logln("PASS: RuleBased Collator creation passed\n");
+ }
+
+ coll->getRules(UCOL_TAILORING_ONLY, rules);
+ if (rules.length() != 0x0a) {
+ errln("English tailored rules failed - length is 0x%x expected 0x%x", rules.length(), 0x0e);
+ }
+
+ coll->getRules(UCOL_FULL_RULES, rules);
+ if (rules.length() < 0) {
+ errln("English full rules failed");
+ }
+ delete coll;
+}
+
+void
+CollationAPITest::TestDecomposition() {
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *en_US = Collator::createInstance("en_US", status),
+ *el_GR = Collator::createInstance("el_GR", status),
+ *vi_VN = Collator::createInstance("vi_VN", status);
+
+ if (U_FAILURE(status)) {
+ errln("ERROR: collation creation failed.\n");
+ return;
+ }
+
+ /* there is no reason to have canonical decomposition in en_US OR default locale */
+ if (vi_VN->getAttribute(UCOL_NORMALIZATION_MODE, status) != UCOL_ON)
+ {
+ errln("ERROR: vi_VN collation did not have canonical decomposition for normalization!\n");
+ }
+
+ if (el_GR->getAttribute(UCOL_NORMALIZATION_MODE, status) != UCOL_ON)
+ {
+ errln("ERROR: el_GR collation did not have canonical decomposition for normalization!\n");
+ }
+
+ if (en_US->getAttribute(UCOL_NORMALIZATION_MODE, status) != UCOL_OFF)
+ {
+ errln("ERROR: en_US collation had canonical decomposition for normalization!\n");
+ }
+
+ delete en_US;
+ delete el_GR;
+ delete vi_VN;
+}
+
+void
+CollationAPITest::TestSafeClone() {
+ static const int CLONETEST_COLLATOR_COUNT = 3;
+ Collator *someCollators [CLONETEST_COLLATOR_COUNT];
+ Collator *col;
+ UErrorCode err = U_ZERO_ERROR;
+ int index;
+
+ UnicodeString test1("abCda");
+ UnicodeString test2("abcda");
+
+ /* one default collator & two complex ones */
+ someCollators[0] = Collator::createInstance("en_US", err);
+ someCollators[1] = Collator::createInstance("ko", err);
+ someCollators[2] = Collator::createInstance("ja_JP", err);
+ if(U_FAILURE(err)) {
+ errln("Couldn't instantiate collators. Error: %s", u_errorName(err));
+ delete someCollators[0];
+ delete someCollators[1];
+ delete someCollators[2];
+ return;
+ }
+
+ /* change orig & clone & make sure they are independent */
+
+ for (index = 0; index < CLONETEST_COLLATOR_COUNT; index++)
+ {
+ col = someCollators[index]->safeClone();
+ if (col == 0) {
+ errln("SafeClone of collator should not return null\n");
+ break;
+ }
+ col->setStrength(Collator::TERTIARY);
+ someCollators[index]->setStrength(Collator::PRIMARY);
+ col->setAttribute(UCOL_CASE_LEVEL, UCOL_OFF, err);
+ someCollators[index]->setAttribute(UCOL_CASE_LEVEL, UCOL_OFF, err);
+
+ doAssert(col->greater(test1, test2), "Result should be \"abCda\" >>> \"abcda\" ");
+ doAssert(someCollators[index]->equals(test1, test2), "Result should be \"abcda\" == \"abCda\"");
+ delete col;
+ delete someCollators[index];
+ }
+}
+
+void
+CollationAPITest::TestHashCode(/* char* par */)
+{
+ logln("hashCode tests begin.");
+ UErrorCode success = U_ZERO_ERROR;
+ Collator *col1 = 0;
+ col1 = Collator::createInstance(Locale::getEnglish(), success);
+ if (U_FAILURE(success))
+ {
+ errln("Default collation creation failed.");
+ return;
+ }
+
+ Collator *col2 = 0;
+ Locale dk("da", "DK", "");
+ col2 = Collator::createInstance(dk, success);
+ if (U_FAILURE(success))
+ {
+ errln("Danish collation creation failed.");
+ return;
+ }
+
+ Collator *col3 = 0;
+ col3 = Collator::createInstance(Locale::getEnglish(), success);
+ if (U_FAILURE(success))
+ {
+ errln("2nd default collation creation failed.");
+ return;
+ }
+
+ logln("Collator::hashCode() testing ...");
+
+ doAssert(col1->hashCode() != col2->hashCode(), "Hash test1 result incorrect" );
+ doAssert(!(col1->hashCode() == col2->hashCode()), "Hash test2 result incorrect" );
+ doAssert(col1->hashCode() == col3->hashCode(), "Hash result not equal" );
+
+ logln("hashCode tests end.");
+ delete col1;
+ delete col2;
+
+ UnicodeString test1("Abcda");
+ UnicodeString test2("abcda");
+
+ CollationKey sortk1, sortk2, sortk3;
+ UErrorCode status = U_ZERO_ERROR;
+
+ col3->getCollationKey(test1, sortk1, status);
+ col3->getCollationKey(test2, sortk2, status);
+ col3->getCollationKey(test2, sortk3, status);
+
+ doAssert(sortk1.hashCode() != sortk2.hashCode(), "Hash test1 result incorrect");
+ doAssert(sortk2.hashCode() == sortk3.hashCode(), "Hash result not equal" );
+
+ delete col3;
+}
+
+//----------------------------------------------------------------------------
+// CollationKey -- Tests the CollationKey methods
+//
+void
+CollationAPITest::TestCollationKey(/* char* par */)
+{
+ logln("testing CollationKey begins...");
+ Collator *col = 0;
+ UErrorCode success=U_ZERO_ERROR;
+ col = Collator::createInstance(Locale::getEnglish(), success);
+ if (U_FAILURE(success))
+ {
+ errln("Default collation creation failed.");
+ return;
+ }
+ col->setStrength(Collator::TERTIARY);
+
+ CollationKey sortk1, sortk2;
+ UnicodeString test1("Abcda"), test2("abcda");
+ UErrorCode key1Status = U_ZERO_ERROR, key2Status = U_ZERO_ERROR;
+
+ logln("Testing weird arguments");
+ col->getCollationKey(NULL, 0, sortk1, key1Status);
+ // key gets reset here
+ int32_t length;
+ sortk1.getByteArray(length);
+ doAssert(sortk1.isBogus() == FALSE && length == 0,
+ "Empty string should return an empty collation key");
+ // bogus key returned here
+ key1Status = U_ILLEGAL_ARGUMENT_ERROR;
+ col->getCollationKey(NULL, 0, sortk1, key1Status);
+ doAssert(sortk1.getByteArray(length) == NULL && length == 0,
+ "Error code should return bogus collation key");
+
+ key1Status = U_ZERO_ERROR;
+ logln("Use tertiary comparison level testing ....");
+
+ col->getCollationKey(test1, sortk1, key1Status);
+ doAssert((sortk1.compareTo(col->getCollationKey(test2, sortk2, key2Status)))
+ == Collator::GREATER,
+ "Result should be \"Abcda\" >>> \"abcda\"");
+
+ CollationKey sortk3(sortk2), sortkNew, sortkEmpty;
+
+
+ sortkNew = sortk1;
+ doAssert((sortk1 != sortk2), "The sort keys should be different");
+ doAssert((sortk1.hashCode() != sortk2.hashCode()), "sort key hashCode() failed");
+ doAssert((sortk2 == sortk3), "The sort keys should be the same");
+ doAssert((sortk1 == sortkNew), "The sort keys assignment failed");
+ doAssert((sortk1.hashCode() == sortkNew.hashCode()), "sort key hashCode() failed");
+ doAssert((sortkNew != sortk3), "The sort keys should be different");
+ doAssert(sortk1.compareTo(sortk3) == Collator::GREATER, "Result should be \"Abcda\" >>> \"abcda\"");
+ doAssert(sortk2.compareTo(sortk3) == Collator::EQUAL, "Result should be \"abcda\" == \"abcda\"");
+ doAssert(sortkEmpty.compareTo(sortk1) == Collator::LESS, "Result should be (empty key) <<< \"Abcda\"");
+ doAssert(sortk1.compareTo(sortkEmpty) == Collator::GREATER, "Result should be \"Abcda\" >>> (empty key)");
+ doAssert(sortkEmpty.compareTo(sortkEmpty) == Collator::EQUAL, "Result should be (empty key) == (empty key)");
+ doAssert(sortk1.compareTo(sortk3, success) == UCOL_GREATER, "Result should be \"Abcda\" >>> \"abcda\"");
+ doAssert(sortk2.compareTo(sortk3, success) == UCOL_EQUAL, "Result should be \"abcda\" == \"abcda\"");
+ doAssert(sortkEmpty.compareTo(sortk1, success) == UCOL_LESS, "Result should be (empty key) <<< \"Abcda\"");
+ doAssert(sortk1.compareTo(sortkEmpty, success) == UCOL_GREATER, "Result should be \"Abcda\" >>> (empty key)");
+ doAssert(sortkEmpty.compareTo(sortkEmpty, success) == UCOL_EQUAL, "Result should be (empty key) == (empty key)");
+
+ int32_t cnt1, cnt2, cnt3, cnt4;
+
+ const uint8_t* byteArray1 = sortk1.getByteArray(cnt1);
+ const uint8_t* byteArray2 = sortk2.getByteArray(cnt2);
+
+ /*
+ this is a bad test since it is dependent on the version of uca data,
+ which changes
+ will remove it.
+ const char sortk2_compat[] = {
+ // this is a 1.8 sortkey
+ 0x17, 0x19, 0x1B, 0x1D, 0x17, 0x01, 0x08, 0x01, 0x08, 0x00
+ };
+ */
+
+ const uint8_t* byteArray3 = 0;
+ byteArray3 = sortk1.getByteArray(cnt3);
+
+ const uint8_t* byteArray4 = 0;
+ byteArray4 = sortk2.getByteArray(cnt4);
+
+ CollationKey sortk4(byteArray1, cnt1), sortk5(byteArray2, cnt2);
+ CollationKey sortk6(byteArray3, cnt3), sortk7(byteArray4, cnt4);
+
+ /*
+ doAssert(memcmp(byteArray2, sortk2_compat, strlen(sortk2_compat)) == 0,
+ "Binary format for 'abcda' sortkey different!");
+ */
+ doAssert(sortk1.compareTo(sortk4) == Collator::EQUAL, "CollationKey::toByteArray(sortk1) Failed.");
+ doAssert(sortk2.compareTo(sortk5) == Collator::EQUAL, "CollationKey::toByteArray(sortk2) Failed.");
+ doAssert(sortk4.compareTo(sortk5) == Collator::GREATER, "sortk4 >>> sortk5 Failed");
+ doAssert(sortk1.compareTo(sortk6) == Collator::EQUAL, "CollationKey::getByteArray(sortk1) Failed.");
+ doAssert(sortk2.compareTo(sortk7) == Collator::EQUAL, "CollationKey::getByteArray(sortk2) Failed.");
+ doAssert(sortk6.compareTo(sortk7) == Collator::GREATER, "sortk6 >>> sortk7 Failed");
+
+ logln("Equality tests : ");
+ doAssert(sortk1 == sortk4, "sortk1 == sortk4 Failed.");
+ doAssert(sortk2 == sortk5, "sortk2 == sortk5 Failed.");
+ doAssert(sortk1 != sortk5, "sortk1 != sortk5 Failed.");
+ doAssert(sortk1 == sortk6, "sortk1 == sortk6 Failed.");
+ doAssert(sortk2 == sortk7, "sortk2 == sortk7 Failed.");
+ doAssert(sortk1 != sortk7, "sortk1 != sortk7 Failed.");
+
+ byteArray1 = 0;
+ byteArray2 = 0;
+
+ sortk3 = sortk1;
+ doAssert(sortk1 == sortk3, "sortk1 = sortk3 assignment Failed.");
+ doAssert(sortk2 != sortk3, "sortk2 != sortk3 Failed.");
+ logln("testing sortkey ends...");
+
+ col->setStrength(Collator::SECONDARY);
+ doAssert(col->getCollationKey(test1, sortk1, key1Status).compareTo(
+ col->getCollationKey(test2, sortk2, key2Status))
+ == Collator::EQUAL,
+ "Result should be \"Abcda\" == \"abcda\"");
+ delete col;
+}
+
+//----------------------------------------------------------------------------
+// Tests the CollatorElementIterator class.
+// ctor, RuleBasedCollator::createCollationElementIterator(), operator==, operator!=
+//
+void
+CollationAPITest::TestElemIter(/* char* par */)
+{
+ logln("testing sortkey begins...");
+ Collator *col = 0;
+ UErrorCode success = U_ZERO_ERROR;
+ col = Collator::createInstance(Locale::getEnglish(), success);
+ if (U_FAILURE(success))
+ {
+ errln("Default collation creation failed.");
+ return;
+ }
+
+ UnicodeString testString1("XFILE What subset of all possible test cases has the highest probability of detecting the most errors?");
+ UnicodeString testString2("Xf_ile What subset of all possible test cases has the lowest probability of detecting the least errors?");
+ logln("Constructors and comparison testing....");
+ CollationElementIterator *iterator1 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString1);
+
+ CharacterIterator *chariter=new StringCharacterIterator(testString1);
+ CollationElementIterator *coliter=((RuleBasedCollator*)col)->createCollationElementIterator(*chariter);
+
+ // copy ctor
+ CollationElementIterator *iterator2 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString1);
+ CollationElementIterator *iterator3 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString2);
+
+ int32_t offset = iterator1->getOffset();
+ if (offset != 0) {
+ errln("Error in getOffset for collation element iterator\n");
+ return;
+ }
+ iterator1->setOffset(6, success);
+ if (U_FAILURE(success)) {
+ errln("Error in setOffset for collation element iterator\n");
+ return;
+ }
+ iterator1->setOffset(0, success);
+ int32_t order1, order2, order3;
+ doAssert((*iterator1 == *iterator2), "The two iterators should be the same");
+ doAssert((*iterator1 != *iterator3), "The two iterators should be different");
+
+ doAssert((*coliter == *iterator1), "The two iterators should be the same");
+ doAssert((*coliter == *iterator2), "The two iterators should be the same");
+ doAssert((*coliter != *iterator3), "The two iterators should be different");
+
+ order1 = iterator1->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((*iterator1 != *iterator2), "The first iterator advance failed");
+ order2 = iterator2->getOffset();
+ doAssert((order1 != order2), "The order result should not be the same");
+ order2 = iterator2->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((*iterator1 == *iterator2), "The second iterator advance failed");
+ doAssert((order1 == order2), "The order result should be the same");
+ order3 = iterator3->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((CollationElementIterator::primaryOrder(order1) ==
+ CollationElementIterator::primaryOrder(order3)), "The primary orders should be the same");
+ doAssert((CollationElementIterator::secondaryOrder(order1) ==
+ CollationElementIterator::secondaryOrder(order3)), "The secondary orders should be the same");
+ doAssert((CollationElementIterator::tertiaryOrder(order1) ==
+ CollationElementIterator::tertiaryOrder(order3)), "The tertiary orders should be the same");
+
+ order1 = iterator1->next(success); order3 = iterator3->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((CollationElementIterator::primaryOrder(order1) ==
+ CollationElementIterator::primaryOrder(order3)), "The primary orders should be identical");
+ doAssert((CollationElementIterator::tertiaryOrder(order1) !=
+ CollationElementIterator::tertiaryOrder(order3)), "The tertiary orders should be different");
+
+ order1 = iterator1->next(success);
+ order3 = iterator3->next(success);
+ /* NO! Secondary orders of two CEs are not related, especially in the case of '_' vs 'I' */
+ /*
+ doAssert((CollationElementIterator::secondaryOrder(order1) !=
+ CollationElementIterator::secondaryOrder(order3)), "The secondary orders should not be the same");
+ */
+ doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached");
+
+ iterator1->reset(); iterator2->reset(); iterator3->reset();
+ order1 = iterator1->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((*iterator1 != *iterator2), "The first iterator advance failed");
+
+ order2 = iterator2->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((*iterator1 == *iterator2), "The second iterator advance failed");
+ doAssert((order1 == order2), "The order result should be the same");
+
+ order3 = iterator3->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((CollationElementIterator::primaryOrder(order1) ==
+ CollationElementIterator::primaryOrder(order3)), "The primary orders should be the same");
+ doAssert((CollationElementIterator::secondaryOrder(order1) ==
+ CollationElementIterator::secondaryOrder(order3)), "The secondary orders should be the same");
+ doAssert((CollationElementIterator::tertiaryOrder(order1) ==
+ CollationElementIterator::tertiaryOrder(order3)), "The tertiary orders should be the same");
+
+ order1 = iterator1->next(success); order2 = iterator2->next(success); order3 = iterator3->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ doAssert((CollationElementIterator::primaryOrder(order1) ==
+ CollationElementIterator::primaryOrder(order3)), "The primary orders should be identical");
+ doAssert((CollationElementIterator::tertiaryOrder(order1) !=
+ CollationElementIterator::tertiaryOrder(order3)), "The tertiary orders should be different");
+
+ order1 = iterator1->next(success); order3 = iterator3->next(success);
+ if (U_FAILURE(success))
+ {
+ errln("Somehow ran out of memory stepping through the iterator.");
+ return;
+ }
+
+ /* NO! Secondary orders of two CEs are not related, especially in the case of '_' vs 'I' */
+ /*
+ doAssert((CollationElementIterator::secondaryOrder(order1) !=
+ CollationElementIterator::secondaryOrder(order3)), "The secondary orders should not be the same");
+ */
+ doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached");
+ doAssert((*iterator2 != *iterator3), "The iterators should be different");
+
+
+ //test error values
+ success=U_UNSUPPORTED_ERROR;
+ Collator *colerror=NULL;
+ colerror=Collator::createInstance(Locale::getEnglish(), success);
+ if (colerror != 0 || success == U_ZERO_ERROR){
+ errln("Error: createInstance(UErrorCode != U_ZERO_ERROR) should just return and not create an instance\n");
+ }
+ int32_t position=coliter->previous(success);
+ if(position != CollationElementIterator::NULLORDER){
+ errln((UnicodeString)"Expected NULLORDER got" + position);
+ }
+ coliter->reset();
+ coliter->setText(*chariter, success);
+ if(!U_FAILURE(success)){
+ errln("Expeceted error");
+ }
+ iterator1->setText((UnicodeString)"hello there", success);
+ if(!U_FAILURE(success)){
+ errln("Expeceted error");
+ }
+
+ delete chariter;
+ delete coliter;
+ delete iterator1;
+ delete iterator2;
+ delete iterator3;
+ delete col;
+
+
+
+ logln("testing CollationElementIterator ends...");
+}
+
+// Test RuleBasedCollator ctor, dtor, operator==, operator!=, clone, copy, and getRules
+void
+CollationAPITest::TestOperators(/* char* par */)
+{
+ UErrorCode success = U_ZERO_ERROR;
+ UnicodeString ruleset1("< a, A < b, B < c, C; ch, cH, Ch, CH < d, D, e, E");
+ UnicodeString ruleset2("< a, A < b, B < c, C < d, D, e, E");
+ RuleBasedCollator *col1 = new RuleBasedCollator(ruleset1, success);
+ if (U_FAILURE(success)) {
+ errln("RuleBasedCollator creation failed.");
+ return;
+ }
+ success = U_ZERO_ERROR;
+ RuleBasedCollator *col2 = new RuleBasedCollator(ruleset2, success);
+ if (U_FAILURE(success)) {
+ errln("The RuleBasedCollator constructor failed when building with the 2nd rule set.");
+ return;
+ }
+ logln("The operator tests begin : ");
+ logln("testing operator==, operator!=, clone methods ...");
+ doAssert((*col1 != *col2), "The two different table collations compared equal");
+ *col1 = *col2;
+ doAssert((*col1 == *col2), "Collator objects not equal after assignment (operator=)");
+
+ success = U_ZERO_ERROR;
+ Collator *col3 = Collator::createInstance(Locale::getEnglish(), success);
+ if (U_FAILURE(success)) {
+ errln("Default collation creation failed.");
+ return;
+ }
+ doAssert((*col1 != *col3), "The two different table collations compared equal");
+ Collator* col4 = col1->clone();
+ Collator* col5 = col3->clone();
+ doAssert((*col1 == *col4), "Cloned collation objects not equal");
+ doAssert((*col3 != *col4), "Two different table collations compared equal");
+ doAssert((*col3 == *col5), "Cloned collation objects not equal");
+ doAssert((*col4 != *col5), "Two cloned collations compared equal");
+
+ const UnicodeString& defRules = ((RuleBasedCollator*)col3)->getRules();
+ RuleBasedCollator* col6 = new RuleBasedCollator(defRules, success);
+ if (U_FAILURE(success)) {
+ errln("Creating default collation with rules failed.");
+ return;
+ }
+ doAssert((((RuleBasedCollator*)col3)->getRules() == col6->getRules()), "Default collator getRules failed");
+
+ success = U_ZERO_ERROR;
+ RuleBasedCollator *col7 = new RuleBasedCollator(ruleset2, Collator::TERTIARY, success);
+ if (U_FAILURE(success)) {
+ errln("The RuleBasedCollator constructor failed when building with the 2nd rule set with tertiary strength.");
+ return;
+ }
+ success = U_ZERO_ERROR;
+ RuleBasedCollator *col8 = new RuleBasedCollator(ruleset2, UCOL_OFF, success);
+ if (U_FAILURE(success)) {
+ errln("The RuleBasedCollator constructor failed when building with the 2nd rule set with Normalizer::NO_OP.");
+ return;
+ }
+ success = U_ZERO_ERROR;
+ RuleBasedCollator *col9 = new RuleBasedCollator(ruleset2, Collator::PRIMARY, UCOL_ON, success);
+ if (U_FAILURE(success)) {
+ errln("The RuleBasedCollator constructor failed when building with the 2nd rule set with tertiary strength and Normalizer::NO_OP.");
+ return;
+ }
+ // doAssert((*col7 == *col8), "The two equal table collations compared different");
+ doAssert((*col7 != *col9), "The two different table collations compared equal");
+ doAssert((*col8 != *col9), "The two different table collations compared equal");
+
+ logln("operator tests ended.");
+ delete col1;
+ delete col2;
+ delete col3;
+ delete col4;
+ delete col5;
+ delete col6;
+ delete col7;
+ delete col8;
+ delete col9;
+}
+
+// test clone and copy
+void
+CollationAPITest::TestDuplicate(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *col1 = Collator::createInstance(Locale::getEnglish(), status);
+ if (U_FAILURE(status)) {
+ logln("Default collator creation failed.");
+ return;
+ }
+ Collator *col2 = col1->clone();
+ doAssert((*col1 == *col2), "Cloned object is not equal to the orginal");
+ UnicodeString *ruleset = new UnicodeString("< a, A < b, B < c, C < d, D, e, E");
+ RuleBasedCollator *col3 = new RuleBasedCollator(*ruleset, status);
+ doAssert((*col1 != *col3), "Cloned object is equal to some dummy");
+ *col3 = *((RuleBasedCollator*)col1);
+ doAssert((*col1 == *col3), "Copied object is not equal to the orginal");
+
+ if (U_FAILURE(status)) {
+ logln("Collation tailoring failed.");
+ return;
+ }
+
+ UCollationResult res;
+ UnicodeString first((UChar)0x0061);
+ UnicodeString second((UChar)0x0062);
+ UnicodeString copiedEnglishRules(((RuleBasedCollator*)col1)->getRules());
+
+ delete col1;
+ delete ruleset;
+
+ // Try using the cloned collators after deleting the original data
+ res = col2->compare(first, second, status);
+ if(res != UCOL_LESS) {
+ errln("a should be less then b after tailoring");
+ }
+ if (((RuleBasedCollator*)col2)->getRules() != copiedEnglishRules) {
+ errln(UnicodeString("English rule difference. ")
+ + copiedEnglishRules + UnicodeString("\ngetRules=") + ((RuleBasedCollator*)col2)->getRules());
+ }
+ res = col3->compare(first, second, status);
+ if(res != UCOL_LESS) {
+ errln("a should be less then b after tailoring");
+ }
+ if (col3->getRules() != copiedEnglishRules) {
+ errln(UnicodeString("English rule difference. ")
+ + copiedEnglishRules + UnicodeString("\ngetRules=") + col3->getRules());
+ }
+
+ delete col2;
+ delete col3;
+}
+
+void
+CollationAPITest::TestCompare(/* char* par */)
+{
+ logln("The compare tests begin : ");
+ Collator *col = 0;
+ UErrorCode success = U_ZERO_ERROR;
+ col = Collator::createInstance(Locale::getEnglish(), success);
+ if (U_FAILURE(success)) {
+ errln("Default collation creation failed.");
+ return;
+ }
+ UnicodeString test1("Abcda"), test2("abcda");
+ logln("Use tertiary comparison level testing ....");
+
+ doAssert((!col->equals(test1, test2) ), "Result should be \"Abcda\" != \"abcda\"");
+ doAssert((col->greater(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
+ doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
+
+ col->setStrength(Collator::SECONDARY);
+ logln("Use secondary comparison level testing ....");
+
+ doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
+
+ col->setStrength(Collator::PRIMARY);
+ logln("Use primary comparison level testing ....");
+
+ doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
+ doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
+
+ // Test different APIs
+ const UChar* t1 = test1.getBuffer();
+ int32_t t1Len = test1.length();
+ const UChar* t2 = test2.getBuffer();
+ int32_t t2Len = test2.length();
+
+ doAssert((col->compare(test1, test2) == Collator::EQUAL), "Problem");
+ doAssert((col->compare(test1, test2, success) == UCOL_EQUAL), "Problem");
+ doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::EQUAL), "Problem");
+ doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_EQUAL), "Problem");
+ doAssert((col->compare(test1, test2, t1Len) == Collator::EQUAL), "Problem");
+ doAssert((col->compare(test1, test2, t1Len, success) == UCOL_EQUAL), "Problem");
+
+ col->setAttribute(UCOL_STRENGTH, UCOL_TERTIARY, success);
+ doAssert((col->compare(test1, test2) == Collator::GREATER), "Problem");
+ doAssert((col->compare(test1, test2, success) == UCOL_GREATER), "Problem");
+ doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::GREATER), "Problem");
+ doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_GREATER), "Problem");
+ doAssert((col->compare(test1, test2, t1Len) == Collator::GREATER), "Problem");
+ doAssert((col->compare(test1, test2, t1Len, success) == UCOL_GREATER), "Problem");
+
+
+
+ logln("The compare tests end.");
+ delete col;
+}
+
+void
+CollationAPITest::TestGetAll(/* char* par */)
+{
+ int32_t count1, count2;
+ UErrorCode status = U_ZERO_ERROR;
+
+ logln("Trying Collator::getAvailableLocales(int&)");
+
+ const Locale* list = Collator::getAvailableLocales(count1);
+ for (int32_t i = 0; i < count1; ++i) {
+ UnicodeString dispName;
+ logln(UnicodeString("Locale name: ")
+ + UnicodeString(list[i].getName())
+ + UnicodeString(" , the display name is : ")
+ + UnicodeString(list[i].getDisplayName(dispName)));
+ }
+
+ if (count1 == 0 || list == NULL) {
+ errln("getAvailableLocales(int&) returned an empty list");
+ }
+
+ logln("Trying Collator::getAvailableLocales()");
+ StringEnumeration* localeEnum = Collator::getAvailableLocales();
+ const UnicodeString* locStr;
+ const char *locCStr;
+ count2 = 0;
+
+ if (localeEnum == NULL) {
+ errln("getAvailableLocales() returned NULL");
+ return;
+ }
+
+ while ((locStr = localeEnum->snext(status)) != NULL)
+ {
+ logln(UnicodeString("Locale name is: ") + *locStr);
+ count2++;
+ }
+ if (count1 != count2) {
+ errln("getAvailableLocales(int&) returned %d and getAvailableLocales() returned %d", count1, count2);
+ }
+
+ logln("Trying Collator::getAvailableLocales() clone");
+ count1 = 0;
+ StringEnumeration* localeEnum2 = localeEnum->clone();
+ localeEnum2->reset(status);
+ while ((locCStr = localeEnum2->next(NULL, status)) != NULL)
+ {
+ logln(UnicodeString("Locale name is: ") + UnicodeString(locCStr));
+ count1++;
+ }
+ if (count1 != count2) {
+ errln("getAvailableLocales(3rd time) returned %d and getAvailableLocales(2nd time) returned %d", count1, count2);
+ }
+ if (localeEnum->count(status) != count1) {
+ errln("localeEnum->count() returned %d and getAvailableLocales() returned %d", localeEnum->count(status), count1);
+ }
+ delete localeEnum;
+ delete localeEnum2;
+}
+
+void CollationAPITest::TestSortKey()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ /*
+ this is supposed to open default date format, but later on it treats
+ it like it is "en_US"
+ - very bad if you try to run the tests on machine where default
+ locale is NOT "en_US"
+ */
+ Collator *col = Collator::createInstance(Locale::getEnglish(), status);
+ if (U_FAILURE(status)) {
+ errln("ERROR: Default collation creation failed.: %s\n", u_errorName(status));
+ return;
+ }
+
+ if (col->getStrength() != Collator::TERTIARY)
+ {
+ errln("ERROR: default collation did not have UCOL_DEFAULT_STRENGTH !\n");
+ }
+
+ /* Need to use identical strength */
+ col->setAttribute(UCOL_STRENGTH, UCOL_IDENTICAL, status);
+
+ uint8_t key2compat[] = {
+ /* 3.6 key, from UCA 5.0 */
+ 0x29, 0x2b, 0x2d, 0x2f, 0x29, 0x01,
+ 0x09, 0x01, 0x09, 0x01, 0x28, 0x01,
+ 0x92, 0x93, 0x94, 0x95, 0x92, 0x00
+
+ /* 3.4 key, from UCA 4.1 */
+ /*
+ 0x28, 0x2a, 0x2c, 0x2e, 0x28, 0x01,
+ 0x09, 0x01, 0x09, 0x01, 0x27, 0x01,
+ 0x92, 0x93, 0x94, 0x95, 0x92, 0x00
+ */
+ /* 2.6.1 key */
+ /*
+ 0x26, 0x28, 0x2A, 0x2C, 0x26, 0x01,
+ 0x09, 0x01, 0x09, 0x01, 0x25, 0x01,
+ 0x92, 0x93, 0x94, 0x95, 0x92, 0x00
+ */
+ /* 2.2 key */
+ /*
+ 0x1D, 0x1F, 0x21, 0x23, 0x1D, 0x01,
+ 0x09, 0x01, 0x09, 0x01, 0x1C, 0x01,
+ 0x92, 0x93, 0x94, 0x95, 0x92, 0x00
+ */
+ /* 2.0 key */
+ /*
+ 0x19, 0x1B, 0x1D, 0x1F, 0x19,
+ 0x01, 0x09, 0x01, 0x09, 0x01,
+ 0x18, 0x01,
+ 0x92, 0x93, 0x94, 0x95, 0x92,
+ 0x00
+ */
+ /* 1.8.1 key.*/
+ /*
+ 0x19, 0x1B, 0x1D, 0x1F, 0x19,
+ 0x01, 0x0A, 0x01, 0x0A, 0x01,
+ 0x92, 0x93, 0x94, 0x95, 0x92,
+ 0x00
+ */
+ };
+
+ UChar test1[6] = {0x41, 0x62, 0x63, 0x64, 0x61, 0},
+ test2[6] = {0x61, 0x62, 0x63, 0x64, 0x61, 0},
+ test3[6] = {0x61, 0x62, 0x63, 0x64, 0x61, 0};
+
+ uint8_t sortkey1[64];
+ uint8_t sortkey2[64];
+ uint8_t sortkey3[64];
+
+ logln("Use tertiary comparison level testing ....\n");
+
+ CollationKey key1;
+ col->getCollationKey(test1, u_strlen(test1), key1, status);
+
+ CollationKey key2;
+ col->getCollationKey(test2, u_strlen(test2), key2, status);
+
+ CollationKey key3;
+ col->getCollationKey(test3, u_strlen(test3), key3, status);
+
+ doAssert(key1.compareTo(key2) == Collator::GREATER,
+ "Result should be \"Abcda\" > \"abcda\"");
+ doAssert(key2.compareTo(key1) == Collator::LESS,
+ "Result should be \"abcda\" < \"Abcda\"");
+ doAssert(key2.compareTo(key3) == Collator::EQUAL,
+ "Result should be \"abcda\" == \"abcda\"");
+
+ int32_t keylength = 0;
+ doAssert(strcmp((const char *)(key2.getByteArray(keylength)),
+ (const char *)key2compat) == 0,
+ "Binary format for 'abcda' sortkey different!");
+
+ col->getSortKey(test1, sortkey1, 64);
+ col->getSortKey(test2, sortkey2, 64);
+ col->getSortKey(test3, sortkey3, 64);
+
+ const uint8_t *tempkey = key1.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
+ "Test1 string should have the same collation key and sort key");
+ tempkey = key2.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
+ "Test2 string should have the same collation key and sort key");
+ tempkey = key3.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
+ "Test3 string should have the same collation key and sort key");
+
+ col->getSortKey(test1, 5, sortkey1, 64);
+ col->getSortKey(test2, 5, sortkey2, 64);
+ col->getSortKey(test3, 5, sortkey3, 64);
+
+ tempkey = key1.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
+ "Test1 string should have the same collation key and sort key");
+ tempkey = key2.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
+ "Test2 string should have the same collation key and sort key");
+ tempkey = key3.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
+ "Test3 string should have the same collation key and sort key");
+
+ UnicodeString strtest1(test1);
+ col->getSortKey(strtest1, sortkey1, 64);
+ UnicodeString strtest2(test2);
+ col->getSortKey(strtest2, sortkey2, 64);
+ UnicodeString strtest3(test3);
+ col->getSortKey(strtest3, sortkey3, 64);
+
+ tempkey = key1.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
+ "Test1 string should have the same collation key and sort key");
+ tempkey = key2.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
+ "Test2 string should have the same collation key and sort key");
+ tempkey = key3.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
+ "Test3 string should have the same collation key and sort key");
+
+ logln("Use secondary comparision level testing ...\n");
+ col->setStrength(Collator::SECONDARY);
+
+ col->getCollationKey(test1, u_strlen(test1), key1, status);
+ col->getCollationKey(test2, u_strlen(test2), key2, status);
+ col->getCollationKey(test3, u_strlen(test3), key3, status);
+
+ doAssert(key1.compareTo(key2) == Collator::EQUAL,
+ "Result should be \"Abcda\" == \"abcda\"");
+ doAssert(key2.compareTo(key3) == Collator::EQUAL,
+ "Result should be \"abcda\" == \"abcda\"");
+
+ tempkey = key2.getByteArray(keylength);
+ doAssert(memcmp(tempkey, key2compat, keylength - 1) == 0,
+ "Binary format for 'abcda' sortkey different!");
+
+ col->getSortKey(test1, sortkey1, 64);
+ col->getSortKey(test2, sortkey2, 64);
+ col->getSortKey(test3, sortkey3, 64);
+
+ tempkey = key1.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
+ "Test1 string should have the same collation key and sort key");
+ tempkey = key2.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
+ "Test2 string should have the same collation key and sort key");
+ tempkey = key3.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
+ "Test3 string should have the same collation key and sort key");
+
+ col->getSortKey(test1, 5, sortkey1, 64);
+ col->getSortKey(test2, 5, sortkey2, 64);
+ col->getSortKey(test3, 5, sortkey3, 64);
+
+ tempkey = key1.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
+ "Test1 string should have the same collation key and sort key");
+ tempkey = key2.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
+ "Test2 string should have the same collation key and sort key");
+ tempkey = key3.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
+ "Test3 string should have the same collation key and sort key");
+
+ col->getSortKey(strtest1, sortkey1, 64);
+ col->getSortKey(strtest2, sortkey2, 64);
+ col->getSortKey(strtest3, sortkey3, 64);
+
+ tempkey = key1.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
+ "Test1 string should have the same collation key and sort key");
+ tempkey = key2.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
+ "Test2 string should have the same collation key and sort key");
+ tempkey = key3.getByteArray(keylength);
+ doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
+ "Test3 string should have the same collation key and sort key");
+
+ logln("testing sortkey ends...");
+ delete col;
+}
+
+void CollationAPITest::TestMaxExpansion()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar ch = 0;
+ UChar32 unassigned = 0xEFFFD;
+ uint32_t sorder = 0;
+ uint32_t temporder = 0;
+
+ UnicodeString rule("&a < ab < c/aba < d < z < ch");
+ RuleBasedCollator coll(rule, status);
+ if(U_FAILURE(status)) {
+ errln("Collator creation failed with error %s", u_errorName(status));
+ return;
+ }
+ UnicodeString str(ch);
+ CollationElementIterator *iter =
+ coll.createCollationElementIterator(str);
+
+ while (ch < 0xFFFF && U_SUCCESS(status)) {
+ int count = 1;
+ uint32_t order;
+ int32_t size = 0;
+
+ ch ++;
+
+ str.setCharAt(0, ch);
+ iter->setText(str, status);
+ order = iter->previous(status);
+
+ /* thai management */
+ if (order == 0)
+ order = iter->previous(status);
+
+ while (U_SUCCESS(status) && iter->previous(status) != UCOL_NULLORDER) {
+ count ++;
+ }
+
+ size = coll.getMaxExpansion(order);
+ if (U_FAILURE(status) || size < count) {
+ errln("Failure at codepoint %d, maximum expansion count < %d\n",
+ ch, count);
+ }
+ }
+
+ /* testing for exact max expansion */
+ ch = 0;
+ while (ch < 0x61) {
+ uint32_t order;
+ int32_t size;
+ str.setCharAt(0, ch);
+ iter->setText(str, status);
+ order = iter->previous(status);
+ size = coll.getMaxExpansion(order);
+ if (U_FAILURE(status) || size != 1) {
+ errln("Failure at codepoint %d, maximum expansion count < %d\n",
+ ch, 1);
+ }
+ ch ++;
+ }
+
+ ch = 0x63;
+ str.setTo(ch);
+ iter->setText(str, status);
+ temporder = iter->previous(status);
+
+ if (U_FAILURE(status) || coll.getMaxExpansion(temporder) != 3) {
+ errln("Failure at codepoint %d, maximum expansion count != %d\n",
+ ch, 3);
+ }
+
+ ch = 0x64;
+ str.setTo(ch);
+ iter->setText(str, status);
+ temporder = iter->previous(status);
+
+ if (U_FAILURE(status) || coll.getMaxExpansion(temporder) != 1) {
+ errln("Failure at codepoint %d, maximum expansion count != %d\n",
+ ch, 3);
+ }
+
+ str.setTo(unassigned);
+ iter->setText(str, status);
+ sorder = iter->previous(status);
+
+ if (U_FAILURE(status) || coll.getMaxExpansion(sorder) != 2) {
+ errln("Failure at supplementary codepoints, maximum expansion count < %d\n",
+ 2);
+ }
+
+ /* testing jamo */
+ ch = 0x1165;
+ str.setTo(ch);
+ iter->setText(str, status);
+ temporder = iter->previous(status);
+ if (U_FAILURE(status) || coll.getMaxExpansion(temporder) > 3) {
+ errln("Failure at codepoint %d, maximum expansion count > %d\n",
+ ch, 3);
+ }
+
+ delete iter;
+
+ /* testing special jamo &a<\u1160 */
+ rule = CharsToUnicodeString("\\u0026\\u0071\\u003c\\u1165\\u002f\\u0071\\u0071\\u0071\\u0071");
+
+ RuleBasedCollator jamocoll(rule, status);
+ iter = jamocoll.createCollationElementIterator(str);
+ temporder = iter->previous(status);
+ if (U_FAILURE(status) || iter->getMaxExpansion(temporder) != 6) {
+ errln("Failure at codepoint %d, maximum expansion count > %d\n",
+ ch, 5);
+ }
+
+ delete iter;
+}
+
+void CollationAPITest::TestDisplayName()
+{
+ UErrorCode error = U_ZERO_ERROR;
+ Collator *coll = Collator::createInstance("en_US", error);
+ if (U_FAILURE(error)) {
+ errln("Failure creating english collator");
+ return;
+ }
+ UnicodeString name;
+ UnicodeString result;
+ coll->getDisplayName(Locale::getCanadaFrench(), result);
+ Locale::getCanadaFrench().getDisplayName(name);
+ if (result.compare(name)) {
+ errln("Failure getting the correct name for locale en_US");
+ }
+
+ coll->getDisplayName(Locale::getSimplifiedChinese(), result);
+ Locale::getSimplifiedChinese().getDisplayName(name);
+ if (result.compare(name)) {
+ errln("Failure getting the correct name for locale zh_SG");
+ }
+ delete coll;
+}
+
+void CollationAPITest::TestAttribute()
+{
+ UErrorCode error = U_ZERO_ERROR;
+ Collator *coll = Collator::createInstance(error);
+
+ if (U_FAILURE(error)) {
+ errln("Creation of default collator failed");
+ return;
+ }
+
+ coll->setAttribute(UCOL_FRENCH_COLLATION, UCOL_OFF, error);
+ if (coll->getAttribute(UCOL_FRENCH_COLLATION, error) != UCOL_OFF ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the french collation failed");
+ }
+
+ coll->setAttribute(UCOL_FRENCH_COLLATION, UCOL_ON, error);
+ if (coll->getAttribute(UCOL_FRENCH_COLLATION, error) != UCOL_ON ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the french collation failed");
+ }
+
+ coll->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, error);
+ if (coll->getAttribute(UCOL_ALTERNATE_HANDLING, error) != UCOL_SHIFTED ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the alternate handling failed");
+ }
+
+ coll->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, error);
+ if (coll->getAttribute(UCOL_ALTERNATE_HANDLING, error) != UCOL_NON_IGNORABLE ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the alternate handling failed");
+ }
+
+ coll->setAttribute(UCOL_CASE_FIRST, UCOL_LOWER_FIRST, error);
+ if (coll->getAttribute(UCOL_CASE_FIRST, error) != UCOL_LOWER_FIRST ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the case first attribute failed");
+ }
+
+ coll->setAttribute(UCOL_CASE_FIRST, UCOL_UPPER_FIRST, error);
+ if (coll->getAttribute(UCOL_CASE_FIRST, error) != UCOL_UPPER_FIRST ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the case first attribute failed");
+ }
+
+ coll->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, error);
+ if (coll->getAttribute(UCOL_CASE_LEVEL, error) != UCOL_ON ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the case level attribute failed");
+ }
+
+ coll->setAttribute(UCOL_CASE_LEVEL, UCOL_OFF, error);
+ if (coll->getAttribute(UCOL_CASE_LEVEL, error) != UCOL_OFF ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the case level attribute failed");
+ }
+
+ coll->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, error);
+ if (coll->getAttribute(UCOL_NORMALIZATION_MODE, error) != UCOL_ON ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the normalization on/off attribute failed");
+ }
+
+ coll->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, error);
+ if (coll->getAttribute(UCOL_NORMALIZATION_MODE, error) != UCOL_OFF ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the normalization on/off attribute failed");
+ }
+
+ coll->setAttribute(UCOL_STRENGTH, UCOL_PRIMARY, error);
+ if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_PRIMARY ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the collation strength failed");
+ }
+
+ coll->setAttribute(UCOL_STRENGTH, UCOL_SECONDARY, error);
+ if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_SECONDARY ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the collation strength failed");
+ }
+
+ coll->setAttribute(UCOL_STRENGTH, UCOL_TERTIARY, error);
+ if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_TERTIARY ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the collation strength failed");
+ }
+
+ coll->setAttribute(UCOL_STRENGTH, UCOL_QUATERNARY, error);
+ if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_QUATERNARY ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the collation strength failed");
+ }
+
+ coll->setAttribute(UCOL_STRENGTH, UCOL_IDENTICAL, error);
+ if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_IDENTICAL ||
+ U_FAILURE(error)) {
+ errln("Setting and retrieving of the collation strength failed");
+ }
+
+ delete coll;
+}
+
+void CollationAPITest::TestVariableTopSetting() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ UChar vt[256] = { 0 };
+
+ Collator *coll = Collator::createInstance(status);
+ if(U_FAILURE(status)) {
+ delete coll;
+ errln("Collator creation failed with error %s", u_errorName(status));
+ return;
+ }
+
+ uint32_t oldVarTop = coll->getVariableTop(status);
+
+ vt[0] = 0x0041;
+
+ uint32_t newVarTop = coll->setVariableTop(vt, 1, status);
+
+ if((newVarTop & 0xFFFF0000) != (coll->getVariableTop(status) & 0xFFFF0000)) {
+ errln("Didn't set vartop properly\n");
+ }
+
+ coll->setVariableTop(oldVarTop, status);
+
+ uint32_t newerVarTop = coll->setVariableTop(UnicodeString(vt, 1), status);
+
+ if((newVarTop & 0xFFFF0000) != (newerVarTop & 0xFFFF0000)) {
+ errln("Didn't set vartop properly from UnicodeString!\n");
+ }
+
+ delete coll;
+
+}
+
+void CollationAPITest::TestGetLocale() {
+ UErrorCode status = U_ZERO_ERROR;
+ const char *rules = "&a<x<y<z";
+ UChar rlz[256] = {0};
+
+ Collator *coll = NULL;
+ Locale locale;
+
+ int32_t i = 0;
+
+ static const struct {
+ const char* requestedLocale;
+ const char* validLocale;
+ const char* actualLocale;
+ } testStruct[] = {
+ { "sr_YU", "sr_YU", "root" },
+ { "sh_YU", "sh_YU", "sh" },
+ { "en_US_CALIFORNIA", "en_US", "root" },
+ { "fr_FR_NONEXISTANT", "fr_FR", "fr" }
+ };
+
+ u_unescape(rules, rlz, 256);
+
+ /* test opening collators for different locales */
+ for(i = 0; i<(int32_t)(sizeof(testStruct)/sizeof(testStruct[0])); i++) {
+ status = U_ZERO_ERROR;
+ coll = Collator::createInstance(testStruct[i].requestedLocale, status);
+ if(U_FAILURE(status)) {
+ log("Failed to open collator for %s with %s\n", testStruct[i].requestedLocale, u_errorName(status));
+ delete coll;
+ continue;
+ }
+ locale = coll->getLocale(ULOC_REQUESTED_LOCALE, status);
+ if(locale != testStruct[i].requestedLocale) {
+ log("[Coll %s]: Error in requested locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].requestedLocale, locale.getName());
+ }
+ locale = coll->getLocale(ULOC_VALID_LOCALE, status);
+ if(locale != testStruct[i].validLocale) {
+ log("[Coll %s]: Error in valid locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].validLocale, locale.getName());
+ }
+ locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status);
+ if(locale != testStruct[i].actualLocale) {
+ log("[Coll %s]: Error in actual locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].actualLocale, locale.getName());
+ }
+ delete coll;
+ }
+
+ /* completely non-existant locale for collator should get a default collator */
+ {
+ Collator *defaultColl = Collator::createInstance((const Locale)NULL, status);
+ coll = Collator::createInstance("blahaha", status);
+ if(U_FAILURE(status)) {
+ log("Failed to open collator with %s\n", u_errorName(status));
+ delete coll;
+ delete defaultColl;
+ return;
+ }
+ if(coll->getLocale(ULOC_REQUESTED_LOCALE, status) != "blahaha") {
+ log("Nonexisting locale didn't preserve the requested locale\n");
+ }
+ if(coll->getLocale(ULOC_VALID_LOCALE, status) !=
+ defaultColl->getLocale(ULOC_VALID_LOCALE, status)) {
+ log("Valid locale for nonexisting locale locale collator differs "
+ "from valid locale for default collator\n");
+ }
+ if(coll->getLocale(ULOC_ACTUAL_LOCALE, status) !=
+ defaultColl->getLocale(ULOC_ACTUAL_LOCALE, status)) {
+ log("Actual locale for nonexisting locale locale collator differs "
+ "from actual locale for default collator\n");
+ }
+ delete coll;
+ delete defaultColl;
+ }
+
+
+
+ /* collator instantiated from rules should have all three locales NULL */
+ coll = new RuleBasedCollator(rlz, status);
+ locale = coll->getLocale(ULOC_REQUESTED_LOCALE, status);
+ if(!locale.isBogus()) {
+ log("For collator instantiated from rules, requested locale %s is not bogus\n", locale.getName());
+ }
+ locale = coll->getLocale(ULOC_VALID_LOCALE, status);
+ if(!locale.isBogus()) {
+ log("For collator instantiated from rules, valid locale %s is not bogus\n", locale.getName());
+ }
+ locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status);
+ if(!locale.isBogus()) {
+ log("For collator instantiated from rules, actual locale %s is not bogus\n", locale.getName());
+ }
+ delete coll;
+}
+
+struct teststruct {
+ const char *original;
+ uint8_t key[256];
+};
+
+
+
+U_CDECL_BEGIN
+static int U_CALLCONV
+compare_teststruct(const void *string1, const void *string2) {
+ return(strcmp((const char *)((struct teststruct *)string1)->key, (const char *)((struct teststruct *)string2)->key));
+}
+U_CDECL_END
+
+
+void CollationAPITest::TestBounds(void) {
+ UErrorCode status = U_ZERO_ERROR;
+
+ Collator *coll = Collator::createInstance(Locale("sh"), status);
+ if(U_FAILURE(status)) {
+ delete coll;
+ errln("Collator creation failed with %s", u_errorName(status));
+ return;
+ }
+
+ uint8_t sortkey[512], lower[512], upper[512];
+ UChar buffer[512];
+
+ static const char * const test[] = {
+ "John Smith",
+ "JOHN SMITH",
+ "john SMITH",
+ "j\\u00F6hn sm\\u00EFth",
+ "J\\u00F6hn Sm\\u00EFth",
+ "J\\u00D6HN SM\\u00CFTH",
+ "john smithsonian",
+ "John Smithsonian"
+ };
+
+ struct teststruct tests[] = {
+ {"\\u010CAKI MIHALJ", {0}},
+ {"\\u010CAKI MIHALJ", {0}},
+ {"\\u010CAKI PIRO\\u0160KA", {0}},
+ {"\\u010CABAI ANDRIJA", {0}},
+ {"\\u010CABAI LAJO\\u0160", {0}},
+ {"\\u010CABAI MARIJA", {0}},
+ {"\\u010CABAI STEVAN", {0}},
+ {"\\u010CABAI STEVAN", {0}},
+ {"\\u010CABARKAPA BRANKO", {0}},
+ {"\\u010CABARKAPA MILENKO", {0}},
+ {"\\u010CABARKAPA MIROSLAV", {0}},
+ {"\\u010CABARKAPA SIMO", {0}},
+ {"\\u010CABARKAPA STANKO", {0}},
+ {"\\u010CABARKAPA TAMARA", {0}},
+ {"\\u010CABARKAPA TOMA\\u0160", {0}},
+ {"\\u010CABDARI\\u0106 NIKOLA", {0}},
+ {"\\u010CABDARI\\u0106 ZORICA", {0}},
+ {"\\u010CABI NANDOR", {0}},
+ {"\\u010CABOVI\\u0106 MILAN", {0}},
+ {"\\u010CABRADI AGNEZIJA", {0}},
+ {"\\u010CABRADI IVAN", {0}},
+ {"\\u010CABRADI JELENA", {0}},
+ {"\\u010CABRADI LJUBICA", {0}},
+ {"\\u010CABRADI STEVAN", {0}},
+ {"\\u010CABRDA MARTIN", {0}},
+ {"\\u010CABRILO BOGDAN", {0}},
+ {"\\u010CABRILO BRANISLAV", {0}},
+ {"\\u010CABRILO LAZAR", {0}},
+ {"\\u010CABRILO LJUBICA", {0}},
+ {"\\u010CABRILO SPASOJA", {0}},
+ {"\\u010CADE\\u0160 ZDENKA", {0}},
+ {"\\u010CADESKI BLAGOJE", {0}},
+ {"\\u010CADOVSKI VLADIMIR", {0}},
+ {"\\u010CAGLJEVI\\u0106 TOMA", {0}},
+ {"\\u010CAGOROVI\\u0106 VLADIMIR", {0}},
+ {"\\u010CAJA VANKA", {0}},
+ {"\\u010CAJI\\u0106 BOGOLJUB", {0}},
+ {"\\u010CAJI\\u0106 BORISLAV", {0}},
+ {"\\u010CAJI\\u0106 RADOSLAV", {0}},
+ {"\\u010CAK\\u0160IRAN MILADIN", {0}},
+ {"\\u010CAKAN EUGEN", {0}},
+ {"\\u010CAKAN EVGENIJE", {0}},
+ {"\\u010CAKAN IVAN", {0}},
+ {"\\u010CAKAN JULIJAN", {0}},
+ {"\\u010CAKAN MIHAJLO", {0}},
+ {"\\u010CAKAN STEVAN", {0}},
+ {"\\u010CAKAN VLADIMIR", {0}},
+ {"\\u010CAKAN VLADIMIR", {0}},
+ {"\\u010CAKAN VLADIMIR", {0}},
+ {"\\u010CAKARA ANA", {0}},
+ {"\\u010CAKAREVI\\u0106 MOMIR", {0}},
+ {"\\u010CAKAREVI\\u0106 NEDELJKO", {0}},
+ {"\\u010CAKI \\u0160ANDOR", {0}},
+ {"\\u010CAKI AMALIJA", {0}},
+ {"\\u010CAKI ANDRA\\u0160", {0}},
+ {"\\u010CAKI LADISLAV", {0}},
+ {"\\u010CAKI LAJO\\u0160", {0}},
+ {"\\u010CAKI LASLO", {0}}
+ };
+
+
+
+ int32_t i = 0, j = 0, k = 0, buffSize = 0, skSize = 0, lowerSize = 0, upperSize = 0;
+ int32_t arraySize = sizeof(tests)/sizeof(tests[0]);
+
+ for(i = 0; i<arraySize; i++) {
+ buffSize = u_unescape(tests[i].original, buffer, 512);
+ skSize = coll->getSortKey(buffer, buffSize, tests[i].key, 512);
+ }
+
+ qsort(tests, arraySize, sizeof(struct teststruct), compare_teststruct);
+
+ for(i = 0; i < arraySize-1; i++) {
+ for(j = i+1; j < arraySize; j++) {
+ lowerSize = coll->getBound(tests[i].key, -1, UCOL_BOUND_LOWER, 1, lower, 512, status);
+ upperSize = coll->getBound(tests[j].key, -1, UCOL_BOUND_UPPER, 1, upper, 512, status);
+ for(k = i; k <= j; k++) {
+ if(strcmp((const char *)lower, (const char *)tests[k].key) > 0) {
+ errln("Problem with lower! j = %i (%s vs %s)", k, tests[k].original, tests[i].original);
+ }
+ if(strcmp((const char *)upper, (const char *)tests[k].key) <= 0) {
+ errln("Problem with upper! j = %i (%s vs %s)", k, tests[k].original, tests[j].original);
+ }
+ }
+ }
+ }
+
+
+ for(i = 0; i<(int32_t)(sizeof(test)/sizeof(test[0])); i++) {
+ buffSize = u_unescape(test[i], buffer, 512);
+ skSize = coll->getSortKey(buffer, buffSize, sortkey, 512);
+ lowerSize = ucol_getBound(sortkey, skSize, UCOL_BOUND_LOWER, 1, lower, 512, &status);
+ upperSize = ucol_getBound(sortkey, skSize, UCOL_BOUND_UPPER_LONG, 1, upper, 512, &status);
+ for(j = i+1; j<(int32_t)(sizeof(test)/sizeof(test[0])); j++) {
+ buffSize = u_unescape(test[j], buffer, 512);
+ skSize = coll->getSortKey(buffer, buffSize, sortkey, 512);
+ if(strcmp((const char *)lower, (const char *)sortkey) > 0) {
+ errln("Problem with lower! i = %i, j = %i (%s vs %s)", i, j, test[i], test[j]);
+ }
+ if(strcmp((const char *)upper, (const char *)sortkey) <= 0) {
+ errln("Problem with upper! i = %i, j = %i (%s vs %s)", i, j, test[i], test[j]);
+ }
+ }
+ }
+ delete coll;
+}
+
+
+void CollationAPITest::TestGetTailoredSet()
+{
+ struct {
+ const char *rules;
+ const char *tests[20];
+ int32_t testsize;
+ } setTest[] = {
+ { "&a < \\u212b", { "\\u212b", "A\\u030a", "\\u00c5" }, 3},
+ { "& S < \\u0161 <<< \\u0160", { "\\u0161", "s\\u030C", "\\u0160", "S\\u030C" }, 4}
+ };
+
+ uint32_t i = 0, j = 0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ RuleBasedCollator *coll = NULL;
+ UnicodeString buff;
+ UnicodeSet *set = NULL;
+
+ for(i = 0; i < sizeof(setTest)/sizeof(setTest[0]); i++) {
+ buff = UnicodeString(setTest[i].rules, "").unescape();
+ coll = new RuleBasedCollator(buff, status);
+ if(U_SUCCESS(status)) {
+ set = coll->getTailoredSet(status);
+ if(set->size() != setTest[i].testsize) {
+ errln("Tailored set size different (%d) than expected (%d)", set->size(), setTest[i].testsize);
+ }
+ for(j = 0; j < (uint32_t)setTest[i].testsize; j++) {
+ buff = UnicodeString(setTest[i].tests[j], "").unescape();
+ if(!set->contains(buff)) {
+ errln("Tailored set doesn't contain %s... It should", setTest[i].tests[j]);
+ }
+ }
+ delete set;
+ } else {
+ errln("Couldn't open collator with rules %s\n", setTest[i].rules);
+ }
+ delete coll;
+ }
+}
+
+void CollationAPITest::TestUClassID()
+{
+ char id = *((char *)RuleBasedCollator::getStaticClassID());
+ if (id != 0) {
+ errln("Static class id for RuleBasedCollator should be 0");
+ }
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *coll
+ = (RuleBasedCollator *)Collator::createInstance(status);
+ if(U_FAILURE(status)) {
+ delete coll;
+ errln("Collator creation failed with %s", u_errorName(status));
+ return;
+ }
+ id = *((char *)coll->getDynamicClassID());
+ if (id != 0) {
+ errln("Dynamic class id for RuleBasedCollator should be 0");
+ }
+ id = *((char *)CollationKey::getStaticClassID());
+ if (id != 0) {
+ errln("Static class id for CollationKey should be 0");
+ }
+ CollationKey *key = new CollationKey();
+ id = *((char *)key->getDynamicClassID());
+ if (id != 0) {
+ errln("Dynamic class id for CollationKey should be 0");
+ }
+ id = *((char *)CollationElementIterator::getStaticClassID());
+ if (id != 0) {
+ errln("Static class id for CollationElementIterator should be 0");
+ }
+ UnicodeString str("testing");
+ CollationElementIterator *iter = coll->createCollationElementIterator(str);
+ id = *((char *)iter->getDynamicClassID());
+ if (id != 0) {
+ errln("Dynamic class id for CollationElementIterator should be 0");
+ }
+ delete key;
+ delete iter;
+ delete coll;
+}
+
+class TestCollator : public Collator
+{
+public:
+ virtual Collator* clone(void) const;
+
+ // dang, markus says we can't use 'using' in ICU. I hate doing this for
+ // deprecated methods...
+
+ // using Collator::compare;
+
+ virtual EComparisonResult compare(const UnicodeString& source,
+ const UnicodeString& target) const
+ {
+ return Collator::compare(source, target);
+ }
+
+ virtual EComparisonResult compare(const UnicodeString& source,
+ const UnicodeString& target,
+ int32_t length) const
+ {
+ return Collator::compare(source, target, length);
+ }
+
+ virtual EComparisonResult compare(const UChar* source,
+ int32_t sourceLength,
+ const UChar* target,
+ int32_t targetLength) const
+ {
+ return Collator::compare(source, sourceLength, target, targetLength);
+ }
+
+
+ virtual UCollationResult compare(const UnicodeString& source,
+ const UnicodeString& target,
+ UErrorCode& status) const;
+ virtual UCollationResult compare(const UnicodeString& source,
+ const UnicodeString& target,
+ int32_t length,
+ UErrorCode& status) const;
+ virtual UCollationResult compare(const UChar* source,
+ int32_t sourceLength,
+ const UChar* target,
+ int32_t targetLength,
+ UErrorCode& status) const;
+ virtual CollationKey& getCollationKey(const UnicodeString& source,
+ CollationKey& key,
+ UErrorCode& status) const;
+ virtual CollationKey& getCollationKey(const UChar*source,
+ int32_t sourceLength,
+ CollationKey& key,
+ UErrorCode& status) const;
+ virtual int32_t hashCode(void) const;
+ virtual const Locale getLocale(ULocDataLocaleType type,
+ UErrorCode& status) const;
+ virtual ECollationStrength getStrength(void) const;
+ virtual void setStrength(ECollationStrength newStrength);
+ virtual UClassID getDynamicClassID(void) const;
+ virtual void getVersion(UVersionInfo info) const;
+ virtual void setAttribute(UColAttribute attr, UColAttributeValue value,
+ UErrorCode &status);
+ virtual UColAttributeValue getAttribute(UColAttribute attr,
+ UErrorCode &status);
+ virtual uint32_t setVariableTop(const UChar *varTop, int32_t len,
+ UErrorCode &status);
+ virtual uint32_t setVariableTop(const UnicodeString varTop,
+ UErrorCode &status);
+ virtual void setVariableTop(const uint32_t varTop, UErrorCode &status);
+ virtual uint32_t getVariableTop(UErrorCode &status) const;
+ virtual Collator* safeClone(void);
+ virtual int32_t getSortKey(const UnicodeString& source,
+ uint8_t* result,
+ int32_t resultLength) const;
+ virtual int32_t getSortKey(const UChar*source, int32_t sourceLength,
+ uint8_t*result, int32_t resultLength) const;
+ virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
+ virtual UBool operator!=(const Collator& other) const;
+ virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale);
+ TestCollator() : Collator() {};
+ TestCollator(UCollationStrength collationStrength,
+ UNormalizationMode decompositionMode) : Collator(collationStrength, decompositionMode) {};
+};
+
+inline UBool TestCollator::operator!=(const Collator& other) const {
+ return Collator::operator!=(other);
+}
+
+#define returnEComparisonResult(data) \
+ if (data < 0) return Collator::LESS;\
+ if (data > 0) return Collator::GREATER;\
+ return Collator::EQUAL;
+
+Collator* TestCollator::clone() const
+{
+ return new TestCollator();
+}
+
+UCollationResult TestCollator::compare(const UnicodeString& source,
+ const UnicodeString& target,
+ UErrorCode& status) const
+{
+ if(U_SUCCESS(status)) {
+ return UCollationResult(source.compare(target));
+ } else {
+ return UCOL_EQUAL;
+ }
+}
+
+UCollationResult TestCollator::compare(const UnicodeString& source,
+ const UnicodeString& target,
+ int32_t length,
+ UErrorCode& status) const
+{
+ if(U_SUCCESS(status)) {
+ return UCollationResult(source.compare(0, length, target));
+ } else {
+ return UCOL_EQUAL;
+ }
+}
+
+UCollationResult TestCollator::compare(const UChar* source,
+ int32_t sourceLength,
+ const UChar* target,
+ int32_t targetLength,
+ UErrorCode& status) const
+{
+ UnicodeString s(source, sourceLength);
+ UnicodeString t(target, targetLength);
+ return compare(s, t, status);
+}
+
+CollationKey& TestCollator::getCollationKey(const UnicodeString& source,
+ CollationKey& key,
+ UErrorCode& status) const
+{
+ char temp[100];
+ int length = 100;
+ length = source.extract(temp, length, NULL, status);
+ temp[length] = 0;
+ CollationKey tempkey((uint8_t*)temp, length);
+ key = tempkey;
+ return key;
+}
+
+CollationKey& TestCollator::getCollationKey(const UChar*source,
+ int32_t sourceLength,
+ CollationKey& key,
+ UErrorCode& status) const
+{
+ //s tack allocation used since collationkey does not keep the unicodestring
+ UnicodeString str(source, sourceLength);
+ return getCollationKey(str, key, status);
+}
+
+int32_t TestCollator::getSortKey(const UnicodeString& source, uint8_t* result,
+ int32_t resultLength) const
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t length = source.extract((char *)result, resultLength, NULL,
+ status);
+ result[length] = 0;
+ return length;
+}
+
+int32_t TestCollator::getSortKey(const UChar*source, int32_t sourceLength,
+ uint8_t*result, int32_t resultLength) const
+{
+ UnicodeString str(source, sourceLength);
+ return getSortKey(str, result, resultLength);
+}
+
+int32_t TestCollator::hashCode() const
+{
+ return 0;
+}
+
+const Locale TestCollator::getLocale(ULocDataLocaleType type,
+ UErrorCode& status) const
+{
+ // api not used, this is to make the compiler happy
+ if (U_FAILURE(status)) {
+ type = ULOC_DATA_LOCALE_TYPE_LIMIT;
+ }
+ return NULL;
+}
+
+Collator::ECollationStrength TestCollator::getStrength() const
+{
+ return TERTIARY;
+}
+
+void TestCollator::setStrength(Collator::ECollationStrength newStrength)
+{
+ // api not used, this is to make the compiler happy
+ newStrength = TERTIARY;
+}
+
+UClassID TestCollator::getDynamicClassID(void) const
+{
+ return 0;
+}
+
+void TestCollator::getVersion(UVersionInfo info) const
+{
+ // api not used, this is to make the compiler happy
+ memset(info, 0, U_MAX_VERSION_LENGTH);
+}
+
+void TestCollator::setAttribute(UColAttribute attr, UColAttributeValue value,
+ UErrorCode &status)
+{
+ // api not used, this is to make the compiler happy
+ if (U_FAILURE(status)) {
+ attr = UCOL_ATTRIBUTE_COUNT;
+ value = UCOL_OFF;
+ }
+}
+
+UColAttributeValue TestCollator::getAttribute(UColAttribute attr,
+ UErrorCode &status)
+{
+ // api not used, this is to make the compiler happy
+ if (U_FAILURE(status) || attr == UCOL_ATTRIBUTE_COUNT) {
+ return UCOL_OFF;
+ }
+ return UCOL_DEFAULT;
+}
+
+uint32_t TestCollator::setVariableTop(const UChar *varTop, int32_t len,
+ UErrorCode &status)
+{
+ // api not used, this is to make the compiler happy
+ if (U_SUCCESS(status) && (varTop == 0 || len < -1)) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+ return 0;
+}
+
+uint32_t TestCollator::setVariableTop(const UnicodeString varTop,
+ UErrorCode &status)
+{
+ // api not used, this is to make the compiler happy
+ if (U_SUCCESS(status) && varTop.length() == 0) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+ return 0;
+}
+
+void TestCollator::setVariableTop(const uint32_t varTop, UErrorCode &status)
+{
+ // api not used, this is to make the compiler happy
+ if (U_SUCCESS(status) && varTop == 0) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+}
+
+uint32_t TestCollator::getVariableTop(UErrorCode &status) const
+{
+
+ // api not used, this is to make the compiler happy
+ if (U_SUCCESS(status)) {
+ return 0;
+ }
+ return (uint32_t)(0xFFFFFFFFu);
+}
+
+Collator* TestCollator::safeClone(void)
+{
+ return new TestCollator();
+}
+
+UnicodeSet * TestCollator::getTailoredSet(UErrorCode &status) const
+{
+ return Collator::getTailoredSet(status);
+}
+
+void TestCollator::setLocales(const Locale& requestedLocale, const Locale& validLocale)
+{
+ Collator::setLocales(requestedLocale, validLocale);
+}
+
+
+void CollationAPITest::TestSubclass()
+{
+ TestCollator col1;
+ TestCollator col2;
+ doAssert(col1 != col2, "2 instance of TestCollator should be different");
+ if (col1.hashCode() != col2.hashCode()) {
+ errln("Every TestCollator has the same hashcode");
+ }
+ UnicodeString abc("abc", 3);
+ UnicodeString bcd("bcd", 3);
+ if (col1.compare(abc, bcd) != abc.compare(bcd)) {
+ errln("TestCollator compare should be the same as the default "
+ "string comparison");
+ }
+ CollationKey key;
+ UErrorCode status = U_ZERO_ERROR;
+ col1.getCollationKey(abc, key, status);
+ int32_t length = 0;
+ const char* bytes = (const char *)key.getByteArray(length);
+ UnicodeString keyarray(bytes, length, NULL, status);
+ if (abc != keyarray) {
+ errln("TestCollator collationkey API is returning wrong values");
+ }
+
+ UnicodeSet expectedset(0, 0x10FFFF);
+ UnicodeSet *defaultset = col1.getTailoredSet(status);
+ if (!defaultset->containsAll(expectedset)
+ || !expectedset.containsAll(*defaultset)) {
+ errln("Error: expected default tailoring to be 0 to 0x10ffff");
+ }
+ delete defaultset;
+
+ // use base class implementation
+ Locale loc1 = Locale::getGermany();
+ Locale loc2 = Locale::getFrance();
+ col1.setLocales(loc1, loc2); // default implementation has no effect
+
+ UnicodeString displayName;
+ col1.getDisplayName(loc1, loc2, displayName); // de_DE collator in fr_FR locale
+
+ TestCollator col3(UCOL_TERTIARY, UNORM_NONE);
+ UnicodeString a("a");
+ UnicodeString b("b");
+ Collator::EComparisonResult result = Collator::EComparisonResult(a.compare(b));
+ if(col1.compare(a, b) != result) {
+ errln("Collator doesn't give default result");
+ }
+ if(col1.compare(a, b, 1) != result) {
+ errln("Collator doesn't give default result");
+ }
+ if(col1.compare(a.getBuffer(), a.length(), b.getBuffer(), b.length()) != result) {
+ errln("Collator doesn't give default result");
+ }
+}
+
+void CollationAPITest::TestNULLCharTailoring()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UChar buf[256] = {0};
+ int32_t len = u_unescape("&a < '\\u0000'", buf, 256);
+ UnicodeString first((UChar)0x0061);
+ UnicodeString second((UChar)0);
+ RuleBasedCollator *coll = new RuleBasedCollator(UnicodeString(buf, len), status);
+ if(U_FAILURE(status)) {
+ errln("Failed to open collator");
+ }
+ UCollationResult res = coll->compare(first, second, status);
+ if(res != UCOL_LESS) {
+ errln("a should be less then NULL after tailoring");
+ }
+ delete coll;
+}
+
+void CollationAPITest::TestClone() {
+ logln("\ninit c0");
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator* c0 = (RuleBasedCollator*)Collator::createInstance(status);
+
+ if (U_FAILURE(status)) {
+ errln("Collator::CreateInstance(status) failed with %s", u_errorName(status));
+ return;
+ }
+
+ c0->setStrength(Collator::TERTIARY);
+ dump("c0", c0, status);
+
+ logln("\ninit c1");
+ RuleBasedCollator* c1 = (RuleBasedCollator*)Collator::createInstance(status);
+ c1->setStrength(Collator::TERTIARY);
+ UColAttributeValue val = c1->getAttribute(UCOL_CASE_FIRST, status);
+ if(val == UCOL_LOWER_FIRST){
+ c1->setAttribute(UCOL_CASE_FIRST, UCOL_UPPER_FIRST, status);
+ }else{
+ c1->setAttribute(UCOL_CASE_FIRST, UCOL_LOWER_FIRST, status);
+ }
+ dump("c0", c0, status);
+ dump("c1", c1, status);
+
+ logln("\ninit c2");
+ RuleBasedCollator* c2 = (RuleBasedCollator*)c1->clone();
+ val = c2->getAttribute(UCOL_CASE_FIRST, status);
+ if(val == UCOL_LOWER_FIRST){
+ c2->setAttribute(UCOL_CASE_FIRST, UCOL_UPPER_FIRST, status);
+ }else{
+ c2->setAttribute(UCOL_CASE_FIRST, UCOL_LOWER_FIRST, status);
+ }
+ if(U_FAILURE(status)){
+ errln("set and get attributes of collator failed. %s\n", u_errorName(status));
+ return;
+ }
+ dump("c0", c0, status);
+ dump("c1", c1, status);
+ dump("c2", c2, status);
+ if(*c1 == *c2){
+ errln("The cloned objects refer to same data");
+ }
+ delete c0;
+ delete c1;
+ delete c2;
+}
+
+ void CollationAPITest::dump(UnicodeString msg, RuleBasedCollator* c, UErrorCode& status) {
+ const char* bigone = "One";
+ const char* littleone = "one";
+
+ logln(msg + " " + c->compare(bigone, littleone) +
+ " s: " + c->getStrength() +
+ " u: " + c->getAttribute(UCOL_CASE_FIRST, status));
+}
+void CollationAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par */)
+{
+ if (exec) logln("TestSuite CollationAPITest: ");
+ switch (index) {
+ case 0: name = "TestProperty"; if (exec) TestProperty(/* par */); break;
+ case 1: name = "TestOperators"; if (exec) TestOperators(/* par */); break;
+ case 2: name = "TestDuplicate"; if (exec) TestDuplicate(/* par */); break;
+ case 3: name = "TestCompare"; if (exec) TestCompare(/* par */); break;
+ case 4: name = "TestHashCode"; if (exec) TestHashCode(/* par */); break;
+ case 5: name = "TestCollationKey"; if (exec) TestCollationKey(/* par */); break;
+ case 6: name = "TestElemIter"; if (exec) TestElemIter(/* par */); break;
+ case 7: name = "TestGetAll"; if (exec) TestGetAll(/* par */); break;
+ case 8: name = "TestRuleBasedColl"; if (exec) TestRuleBasedColl(/* par */); break;
+ case 9: name = "TestDecomposition"; if (exec) TestDecomposition(/* par */); break;
+ case 10: name = "TestSafeClone"; if (exec) TestSafeClone(/* par */); break;
+ case 11: name = "TestSortKey"; if (exec) TestSortKey(); break;
+ case 12: name = "TestMaxExpansion"; if (exec) TestMaxExpansion(); break;
+ case 13: name = "TestDisplayName"; if (exec) TestDisplayName(); break;
+ case 14: name = "TestAttribute"; if (exec) TestAttribute(); break;
+ case 15: name = "TestVariableTopSetting"; if (exec) TestVariableTopSetting(); break;
+ case 16: name = "TestRules"; if (exec) TestRules(); break;
+ case 17: name = "TestGetLocale"; if (exec) TestGetLocale(); break;
+ case 18: name = "TestBounds"; if (exec) TestBounds(); break;
+ case 19: name = "TestGetTailoredSet"; if (exec) TestGetTailoredSet(); break;
+ case 20: name = "TestUClassID"; if (exec) TestUClassID(); break;
+ case 21: name = "TestSubclass"; if (exec) TestSubclass(); break;
+ case 22: name = "TestNULLCharTailoring"; if (exec) TestNULLCharTailoring(); break;
+ case 23: name = "TestClone"; if (exec) TestClone(); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/apicoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/apicoll.h
new file mode 100644
index 00000000000..f3a4d2a7fda
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/apicoll.h
@@ -0,0 +1,179 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+/**
+ * CollationAPITest is a third level test class. This test performs API
+ * related tests for the Collation framework.
+ */
+
+#ifndef _APICOLL
+#define _APICOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/tblcoll.h"
+#include "tscoll.h"
+
+class CollationAPITest: public IntlTestCollator {
+public:
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+ void doAssert(UBool condition, const char *message);
+
+ /**
+ * This tests the properties of a collator object.
+ * - constructor/destructor
+ * - factory method createInstance
+ * - compare and getCollationKey
+ * - get/set decomposition mode and comparison level
+ * - displayable name in the desired locale
+ */
+ void TestProperty(/* char* par */);
+
+ /**
+ * This tests the RuleBasedCollator
+ * - constructor/destructor
+ * - getRules
+ */
+ void TestRuleBasedColl(/* char* par */);
+
+ /**
+ * This tests the RuleBasedCollator
+ * - getRules
+ */
+ void TestRules(/* char* par */);
+
+ /**
+ * Tests decomposition setting
+ */
+ void TestDecomposition();
+
+ /**
+ * SafeClone test
+ */
+ void TestSafeClone();
+
+ /**
+ * This tests the properties of a rule based collator object.
+ * - constructor/destructor
+ * - == and != operators
+ * - clone and copy
+ * - collation rules access
+ */
+ void TestOperators(/* char* par */);
+
+ /**
+ * This tests the duplication of a collator object.
+ */
+ void TestDuplicate(/* char* par */);
+
+ /**
+ * This tests the comparison convenience methods of a collator object.
+ * - greater than
+ * - greater than or equal to
+ * - equal to
+ */
+ void TestCompare(/* char* par */);
+
+ /**
+ * This tests the hashCode method of a collator object.
+ */
+ void TestHashCode(/* char* par */);
+
+ /**
+ * This tests the collation key related APIs.
+ * - constructor/destructor
+ * - Collator::getCollationKey
+ * - == and != operators
+ * - comparison between collation keys
+ * - creating collation key with a byte array and vice versa
+ */
+ void TestCollationKey(/* char* par */);
+
+ /**
+ * This tests the CollationElementIterator related APIs.
+ * - creation of a CollationElementIterator object
+ * - == and != operators
+ * - iterating forward
+ * - reseting the iterator index
+ * - requesting the order properties(primary, secondary or tertiary)
+ */
+ void TestElemIter(/* char* par */);
+
+ /**
+ * This tests the list the all available locales.
+ */
+ void TestGetAll(/* char* par */);
+
+ /**
+ * This tests the sort keys generated by collator
+ */
+ void TestSortKey();
+
+ /**
+ * This tests getMaxExpansion
+ */
+ void TestMaxExpansion();
+
+ /**
+ * Tests the retrieval of names given a locale
+ */
+ void TestDisplayName();
+
+ /**
+ * Tests the collator attributes
+ */
+ void TestAttribute();
+
+ /**
+ * Tests the setters and getters of variable top
+ */
+ void TestVariableTopSetting();
+
+ /**
+ * Tests GetLocale for a Collator
+ */
+ void TestGetLocale();
+
+ /**
+ * Tests bounds API
+ */
+ void TestBounds();
+
+ /**
+ * Tests getTailoredSet API
+ */
+ void TestGetTailoredSet();
+
+ /**
+ * Tests the subclassability
+ */
+ void TestSubclass();
+
+ /**
+ * Tests the dynamic and static ids of collation classes
+ */
+ void TestUClassID();
+
+ /**
+ * Test NULL
+ */
+ void TestNULLCharTailoring();
+
+ void TestClone();
+private:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ void dump(UnicodeString msg, RuleBasedCollator* c, UErrorCode& status);
+
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/astrotst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/astrotst.cpp
new file mode 100644
index 00000000000..ba7b5711396
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/astrotst.cpp
@@ -0,0 +1,436 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1996-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/* Test CalendarAstronomer for C++ */
+
+#include "unicode/utypes.h"
+#include "string.h"
+#include "unicode/locid.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "astro.h"
+#include "astrotst.h"
+#include "gregoimp.h" // for Math
+#include "unicode/simpletz.h"
+
+
+static const double DAY_MS = 24.*60.*60.*1000.;
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+
+AstroTest::AstroTest(): astro(NULL), gc(NULL) {
+}
+
+void AstroTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite AstroTest");
+ switch (index) {
+ // CASE(0,FooTest);
+ CASE(0,TestSolarLongitude);
+ CASE(1,TestLunarPosition);
+ CASE(2,TestCoordinates);
+ CASE(3,TestCoverage);
+ CASE(4,TestSunriseTimes);
+ CASE(5,TestBasics);
+ default: name = ""; break;
+ }
+}
+
+#undef CASE
+
+#define ASSERT_OK(x) if(U_FAILURE(x)) { errln("%s:%d: %s\n", __FILE__, __LINE__, u_errorName(x)); return; }
+
+
+void AstroTest::initAstro(UErrorCode &status) {
+ if(U_FAILURE(status)) return;
+
+ if((astro != NULL) || (gc != NULL)) {
+ errln("Err: initAstro() called twice!");
+ closeAstro(status);
+ if(U_SUCCESS(status)) {
+ status = U_INTERNAL_PROGRAM_ERROR;
+ }
+ }
+
+ if(U_FAILURE(status)) return;
+
+ astro = new CalendarAstronomer();
+ gc = Calendar::createInstance(TimeZone::getGMT()->clone(), status);
+}
+
+void AstroTest::closeAstro(UErrorCode &/*status*/) {
+ if(astro != NULL) {
+ delete astro;
+ astro = NULL;
+ }
+ if(gc != NULL) {
+ delete gc;
+ gc = NULL;
+ }
+}
+
+void AstroTest::TestSolarLongitude(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ initAstro(status);
+ ASSERT_OK(status);
+
+ struct {
+ int32_t d[5]; double f ;
+ } tests[] = {
+ { { 1980, 7, 27, 0, 00 }, 124.114347 },
+ { { 1988, 7, 27, 00, 00 }, 124.187732 }
+ };
+
+ logln("");
+ for (uint32_t i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
+ gc->clear();
+ gc->set(tests[i].d[0], tests[i].d[1]-1, tests[i].d[2], tests[i].d[3], tests[i].d[4]);
+
+ astro->setDate(gc->getTime(status));
+
+ double longitude = astro->getSunLongitude();
+ //longitude = 0;
+ CalendarAstronomer::Equatorial result;
+ astro->getSunPosition(result);
+ logln((UnicodeString)"Sun position is " + result.toString() + (UnicodeString)"; " /* + result.toHmsString()*/ + " Sun longitude is " + longitude );
+ }
+ closeAstro(status);
+ ASSERT_OK(status);
+}
+
+
+
+void AstroTest::TestLunarPosition(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ initAstro(status);
+ ASSERT_OK(status);
+
+ static const double tests[][7] = {
+ { 1979, 2, 26, 16, 00, 0, 0 }
+ };
+ logln("");
+
+ for (int32_t i = 0; i < (int32_t)(sizeof(tests)/sizeof(tests[0])); i++) {
+ gc->clear();
+ gc->set((int32_t)tests[i][0], (int32_t)tests[i][1]-1, (int32_t)tests[i][2], (int32_t)tests[i][3], (int32_t)tests[i][4]);
+ astro->setDate(gc->getTime(status));
+
+ const CalendarAstronomer::Equatorial& result = astro->getMoonPosition();
+ logln((UnicodeString)"Moon position is " + result.toString() + (UnicodeString)"; " /* + result->toHmsString()*/);
+ }
+
+ closeAstro(status);
+ ASSERT_OK(status);
+}
+
+
+
+void AstroTest::TestCoordinates(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ initAstro(status);
+ ASSERT_OK(status);
+
+ CalendarAstronomer::Equatorial result;
+ astro->eclipticToEquatorial(result, 139.686111 * CalendarAstronomer::PI / 180.0, 4.875278* CalendarAstronomer::PI / 180.0);
+ logln((UnicodeString)"result is " + result.toString() + (UnicodeString)"; " /* + result.toHmsString()*/ );
+ closeAstro(status);
+ ASSERT_OK(status);
+}
+
+
+
+void AstroTest::TestCoverage(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ initAstro(status);
+ ASSERT_OK(status);
+ GregorianCalendar *cal = new GregorianCalendar(1958, UCAL_AUGUST, 15,status);
+ UDate then = cal->getTime(status);
+ CalendarAstronomer *myastro = new CalendarAstronomer(then);
+ ASSERT_OK(status);
+
+ //Latitude: 34 degrees 05' North
+ //Longitude: 118 degrees 22' West
+ double laLat = 34 + 5./60, laLong = 360 - (118 + 22./60);
+ CalendarAstronomer *myastro2 = new CalendarAstronomer(laLong, laLat);
+
+ double eclLat = laLat * CalendarAstronomer::PI / 360;
+ double eclLong = laLong * CalendarAstronomer::PI / 360;
+
+ CalendarAstronomer::Ecliptic ecl(eclLat, eclLong);
+ CalendarAstronomer::Equatorial eq;
+ CalendarAstronomer::Horizon hor;
+
+ logln("ecliptic: " + ecl.toString());
+ CalendarAstronomer *myastro3 = new CalendarAstronomer();
+ myastro3->setJulianDay((4713 + 2000) * 365.25);
+
+ CalendarAstronomer *astronomers[] = {
+ myastro, myastro2, myastro3, myastro2 // check cache
+ };
+
+ for (uint32_t i = 0; i < sizeof(astronomers)/sizeof(astronomers[0]); ++i) {
+ CalendarAstronomer *anAstro = astronomers[i];
+
+ //logln("astro: " + astro);
+ logln((UnicodeString)" date: " + anAstro->getTime());
+ logln((UnicodeString)" cent: " + anAstro->getJulianCentury());
+ logln((UnicodeString)" gw sidereal: " + anAstro->getGreenwichSidereal());
+ logln((UnicodeString)" loc sidereal: " + anAstro->getLocalSidereal());
+ logln((UnicodeString)" equ ecl: " + (anAstro->eclipticToEquatorial(eq,ecl)).toString());
+ logln((UnicodeString)" equ long: " + (anAstro->eclipticToEquatorial(eq, eclLong)).toString());
+ logln((UnicodeString)" horiz: " + (anAstro->eclipticToHorizon(hor, eclLong)).toString());
+ logln((UnicodeString)" sunrise: " + (anAstro->getSunRiseSet(TRUE)));
+ logln((UnicodeString)" sunset: " + (anAstro->getSunRiseSet(FALSE)));
+ logln((UnicodeString)" moon phase: " + anAstro->getMoonPhase());
+ logln((UnicodeString)" moonrise: " + (anAstro->getMoonRiseSet(TRUE)));
+ logln((UnicodeString)" moonset: " + (anAstro->getMoonRiseSet(FALSE)));
+ logln((UnicodeString)" prev summer solstice: " + (anAstro->getSunTime(CalendarAstronomer::SUMMER_SOLSTICE(), FALSE)));
+ logln((UnicodeString)" next summer solstice: " + (anAstro->getSunTime(CalendarAstronomer::SUMMER_SOLSTICE(), TRUE)));
+ logln((UnicodeString)" prev full moon: " + (anAstro->getMoonTime(CalendarAstronomer::FULL_MOON(), FALSE)));
+ logln((UnicodeString)" next full moon: " + (anAstro->getMoonTime(CalendarAstronomer::FULL_MOON(), TRUE)));
+ }
+
+ delete myastro2;
+ delete myastro3;
+ delete myastro;
+ delete cal;
+
+ closeAstro(status);
+ ASSERT_OK(status);
+}
+
+
+
+void AstroTest::TestSunriseTimes(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ initAstro(status);
+ ASSERT_OK(status);
+
+ // logln("Sunrise/Sunset times for San Jose, California, USA");
+ // CalendarAstronomer *astro2 = new CalendarAstronomer(-121.55, 37.20);
+ // TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles");
+
+ // We'll use a table generated by the UNSO website as our reference
+ // From: http://aa.usno.navy.mil/
+ //-Location: W079 25, N43 40
+ //-Rise and Set for the Sun for 2001
+ //-Zone: 4h West of Greenwich
+ int32_t USNO[] = {
+ 6,59, 19,45,
+ 6,57, 19,46,
+ 6,56, 19,47,
+ 6,54, 19,48,
+ 6,52, 19,49,
+ 6,50, 19,51,
+ 6,48, 19,52,
+ 6,47, 19,53,
+ 6,45, 19,54,
+ 6,43, 19,55,
+ 6,42, 19,57,
+ 6,40, 19,58,
+ 6,38, 19,59,
+ 6,36, 20, 0,
+ 6,35, 20, 1,
+ 6,33, 20, 3,
+ 6,31, 20, 4,
+ 6,30, 20, 5,
+ 6,28, 20, 6,
+ 6,27, 20, 7,
+ 6,25, 20, 8,
+ 6,23, 20,10,
+ 6,22, 20,11,
+ 6,20, 20,12,
+ 6,19, 20,13,
+ 6,17, 20,14,
+ 6,16, 20,16,
+ 6,14, 20,17,
+ 6,13, 20,18,
+ 6,11, 20,19,
+ };
+
+ logln("Sunrise/Sunset times for Toronto, Canada");
+ // long = 79 25", lat = 43 40"
+ CalendarAstronomer *astro3 = new CalendarAstronomer(-(79+25/60), 43+40/60);
+
+ // As of ICU4J 2.8 the ICU4J time zones implement pass-through
+ // to the underlying JDK. Because of variation in the
+ // underlying JDKs, we have to use a fixed-offset
+ // SimpleTimeZone to get consistent behavior between JDKs.
+ // The offset we want is [-18000000, 3600000] (raw, dst).
+ // [aliu 10/15/03]
+
+ // TimeZone tz = TimeZone.getTimeZone("America/Montreal");
+ TimeZone *tz = new SimpleTimeZone(-18000000 + 3600000, "Montreal(FIXED)");
+
+ GregorianCalendar *cal = new GregorianCalendar(tz->clone(), Locale::getUS(), status);
+ GregorianCalendar *cal2 = new GregorianCalendar(tz->clone(), Locale::getUS(), status);
+ cal->clear();
+ cal->set(UCAL_YEAR, 2001);
+ cal->set(UCAL_MONTH, UCAL_APRIL);
+ cal->set(UCAL_DAY_OF_MONTH, 1);
+ cal->set(UCAL_HOUR_OF_DAY, 12); // must be near local noon for getSunRiseSet to work
+
+ DateFormat *df_t = DateFormat::createTimeInstance(DateFormat::MEDIUM,Locale::getUS());
+ DateFormat *df_d = DateFormat::createDateInstance(DateFormat::MEDIUM,Locale::getUS());
+ DateFormat *df_dt = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::MEDIUM, Locale::getUS());
+ if(!df_t || !df_d || !df_dt) {
+ errln("couldn't create dateformats.");
+ return;
+ }
+ df_t->adoptTimeZone(tz->clone());
+ df_d->adoptTimeZone(tz->clone());
+ df_dt->adoptTimeZone(tz->clone());
+
+ for (int32_t i=0; i < 30; i++) {
+ logln("setDate\n");
+ astro3->setDate(cal->getTime(status));
+ logln("getRiseSet(TRUE)\n");
+ UDate sunrise = astro3->getSunRiseSet(TRUE);
+ logln("getRiseSet(FALSE)\n");
+ UDate sunset = astro3->getSunRiseSet(FALSE);
+ logln("end of getRiseSet\n");
+
+ cal2->setTime(cal->getTime(status), status);
+ cal2->set(UCAL_SECOND, 0);
+ cal2->set(UCAL_MILLISECOND, 0);
+
+ cal2->set(UCAL_HOUR_OF_DAY, USNO[4*i+0]);
+ cal2->set(UCAL_MINUTE, USNO[4*i+1]);
+ UDate exprise = cal2->getTime(status);
+ cal2->set(UCAL_HOUR_OF_DAY, USNO[4*i+2]);
+ cal2->set(UCAL_MINUTE, USNO[4*i+3]);
+ UDate expset = cal2->getTime(status);
+ // Compute delta of what we got to the USNO data, in seconds
+ int32_t deltarise = (int32_t)uprv_fabs((sunrise - exprise) / 1000);
+ int32_t deltaset = (int32_t)uprv_fabs((sunset - expset) / 1000);
+
+ // Allow a deviation of 0..MAX_DEV seconds
+ // It would be nice to get down to 60 seconds, but at this
+ // point that appears to be impossible without a redo of the
+ // algorithm using something more advanced than Duffett-Smith.
+ int32_t MAX_DEV = 180;
+ UnicodeString s1, s2, s3, s4, s5;
+ if (deltarise > MAX_DEV || deltaset > MAX_DEV) {
+ if (deltarise > MAX_DEV) {
+ errln("FAIL: (rise) " + df_d->format(cal->getTime(status),s1) +
+ ", Sunrise: " + df_dt->format(sunrise, s2) +
+ " (USNO " + df_t->format(exprise,s3) +
+ " d=" + deltarise + "s)");
+ } else {
+ logln(df_d->format(cal->getTime(status),s1) +
+ ", Sunrise: " + df_dt->format(sunrise,s2) +
+ " (USNO " + df_t->format(exprise,s3) + ")");
+ }
+ s1.remove(); s2.remove(); s3.remove(); s4.remove(); s5.remove();
+ if (deltaset > MAX_DEV) {
+ errln("FAIL: (set) " + df_d->format(cal->getTime(status),s1) +
+ ", Sunset: " + df_dt->format(sunset,s2) +
+ " (USNO " + df_t->format(expset,s3) +
+ " d=" + deltaset + "s)");
+ } else {
+ logln(df_d->format(cal->getTime(status),s1) +
+ ", Sunset: " + df_dt->format(sunset,s2) +
+ " (USNO " + df_t->format(expset,s3) + ")");
+ }
+ } else {
+ logln(df_d->format(cal->getTime(status),s1) +
+ ", Sunrise: " + df_dt->format(sunrise,s2) +
+ " (USNO " + df_t->format(exprise,s3) + ")" +
+ ", Sunset: " + df_dt->format(sunset,s4) +
+ " (USNO " + df_t->format(expset,s5) + ")");
+ }
+ cal->add(UCAL_DATE, 1, status);
+ }
+
+ // CalendarAstronomer a = new CalendarAstronomer(-(71+5/60), 42+37/60);
+ // cal.clear();
+ // cal.set(cal.YEAR, 1986);
+ // cal.set(cal.MONTH, cal.MARCH);
+ // cal.set(cal.DATE, 10);
+ // cal.set(cal.YEAR, 1988);
+ // cal.set(cal.MONTH, cal.JULY);
+ // cal.set(cal.DATE, 27);
+ // a.setDate(cal.getTime());
+ // long r = a.getSunRiseSet2(true);
+ delete astro3;
+ delete tz;
+ delete cal;
+ delete cal2;
+ delete df_t;
+ delete df_d;
+ delete df_dt;
+ closeAstro(status);
+ ASSERT_OK(status);
+}
+
+
+
+void AstroTest::TestBasics(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ initAstro(status);
+ ASSERT_OK(status);
+
+ // Check that our JD computation is the same as the book's (p. 88)
+ GregorianCalendar *cal3 = new GregorianCalendar(TimeZone::getGMT()->clone(), Locale::getUS(), status);
+ DateFormat *d3 = DateFormat::createDateTimeInstance(DateFormat::MEDIUM,DateFormat::MEDIUM,Locale::getUS());
+ d3->setTimeZone(*TimeZone::getGMT());
+ cal3->clear();
+ cal3->set(UCAL_YEAR, 1980);
+ cal3->set(UCAL_MONTH, UCAL_JULY);
+ cal3->set(UCAL_DATE, 2);
+ logln("cal3[a]=%.1lf, d=%d\n", cal3->getTime(status), cal3->get(UCAL_JULIAN_DAY,status));
+ {
+ UnicodeString s;
+ logln(UnicodeString("cal3[a] = ") + d3->format(cal3->getTime(status),s));
+ }
+ cal3->clear();
+ cal3->set(UCAL_YEAR, 1980);
+ cal3->set(UCAL_MONTH, UCAL_JULY);
+ cal3->set(UCAL_DATE, 27);
+ logln("cal3=%.1lf, d=%d\n", cal3->getTime(status), cal3->get(UCAL_JULIAN_DAY,status));
+
+ ASSERT_OK(status);
+ {
+ UnicodeString s;
+ logln(UnicodeString("cal3 = ") + d3->format(cal3->getTime(status),s));
+ }
+ astro->setTime(cal3->getTime(status));
+ double jd = astro->getJulianDay() - 2447891.5;
+ double exp = -3444.;
+ if (jd == exp) {
+ UnicodeString s;
+ logln(d3->format(cal3->getTime(status),s) + " => " + jd);
+ } else {
+ UnicodeString s;
+ errln("FAIL: " + d3->format(cal3->getTime(status), s) + " => " + jd +
+ ", expected " + exp);
+ }
+
+ // cal3.clear();
+ // cal3.set(cal3.YEAR, 1990);
+ // cal3.set(cal3.MONTH, Calendar.JANUARY);
+ // cal3.set(cal3.DATE, 1);
+ // cal3.add(cal3.DATE, -1);
+ // astro.setDate(cal3.getTime());
+ // astro.foo();
+
+ delete cal3;
+ delete d3;
+ ASSERT_OK(status);
+ closeAstro(status);
+ ASSERT_OK(status);
+
+}
+
+
+// TODO: try finding next new moon after 07/28/1984 16:00 GMT
+
+
+#endif
+
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/astrotst.h b/Build/source/libs/icu/icu-xetex/test/intltest/astrotst.h
new file mode 100644
index 00000000000..2ca062cf9ea
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/astrotst.h
@@ -0,0 +1,49 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef __AstroTest__
+#define __AstroTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/calendar.h"
+#include "unicode/gregocal.h"
+#include "unicode/smpdtfmt.h"
+#include "astro.h"
+#include "caltztst.h"
+
+class AstroTest: public CalendarTimeZoneTest {
+public:
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+ AstroTest();
+
+ void TestSolarLongitude(void);
+
+ void TestLunarPosition(void);
+
+ void TestCoordinates(void);
+
+ void TestCoverage(void);
+
+ void TestSunriseTimes(void);
+
+ void TestBasics(void);
+ private:
+ void initAstro(UErrorCode&);
+ void closeAstro(UErrorCode&);
+
+ CalendarAstronomer *astro;
+ Calendar *gc;
+
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // __AstroTest__
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/calcasts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/calcasts.cpp
new file mode 100644
index 00000000000..5246808b194
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/calcasts.cpp
@@ -0,0 +1,386 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2003-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ********************************************************************
+ * Calendar Case Test is a type of CalendarTest which compares the
+ * behavior of a calendar to a certain set of 'test cases', involving
+ * conversion between julian-day to fields and vice versa.
+ ********************************************************************/
+
+#include "calcasts.h"
+
+#if !UCONFIG_NO_FORMATTING
+// ======= 'Main' ===========================
+
+#include "hebrwcal.h" // for Eras
+#include "indiancal.h"
+#include "unicode/datefmt.h"
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+
+
+void CalendarCaseTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CalendarCaseTest");
+ switch (index) {
+ CASE(0,IslamicCivil);
+ CASE(1,Hebrew);
+ CASE(2,Indian);
+ default: name = ""; break;
+ }
+}
+
+#undef CASE
+
+// ======= Utility functions =================
+
+void CalendarCaseTest::doTestCases(const TestCase *cases, Calendar *cal) {
+ static const int32_t ONE_SECOND = 1000;
+ static const int32_t ONE_MINUTE = 60*ONE_SECOND;
+ static const int32_t ONE_HOUR = 60*ONE_MINUTE;
+ static const double ONE_DAY = 24*ONE_HOUR;
+ static const double JULIAN_EPOCH = -210866760000000.; // 1/1/4713 BC 12:00
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ cal->adoptTimeZone(TimeZone::getGMT()->clone());
+ for(i=0;cases[i].era>=0;i++) {
+ UDate t = (JULIAN_EPOCH+(ONE_DAY*cases[i].julian));
+
+ logln("Test case %d: julianday%f -> date %f\n", i, cases[i].julian, t);
+
+ // Millis -> fields
+ cal->setTime(t, status);
+
+ logln(calToStr(*cal));
+
+ checkField(cal, UCAL_ERA, cases[i].era, status);
+ checkField(cal, UCAL_YEAR, cases[i].year,status);
+ checkField(cal, UCAL_MONTH, cases[i].month - 1,status);
+ checkField(cal, UCAL_DATE, cases[i].day,status);
+ checkField(cal, UCAL_DAY_OF_WEEK, cases[i].dayOfWeek,status);
+ checkField(cal, UCAL_HOUR, cases[i].hour,status);
+ checkField(cal, UCAL_MINUTE, cases[i].min,status);
+ checkField(cal, UCAL_SECOND, cases[i].sec,status);
+
+ // Fields -> millis
+ cal->clear();
+
+ cal->set(UCAL_ERA, cases[i].era);
+ cal->set(UCAL_YEAR, cases[i].year);
+ cal->set(UCAL_MONTH, cases[i].month - 1);
+ cal->set(UCAL_DATE, cases[i].day);
+ cal->set(UCAL_DAY_OF_WEEK, cases[i].dayOfWeek);
+ cal->set(UCAL_HOUR, cases[i].hour);
+ cal->set(UCAL_MINUTE, cases[i].min);
+ cal->set(UCAL_SECOND, cases[i].sec);
+
+ UDate t2 = cal->getTime(status);
+
+ if(t != t2) {
+ errln("Field->millis: Expected %.0f but got %.0f\n", t, t2);
+ logln(calToStr(*cal));
+ }
+ }
+}
+
+UBool CalendarCaseTest::checkField(Calendar *cal, UCalendarDateFields field, int32_t value, UErrorCode &status)
+{
+ if(U_FAILURE(status)) return FALSE;
+ int32_t res = cal->get(field, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"Checking field " + fieldName(field) + " and got " + u_errorName(status));
+ return FALSE;
+ }
+ if(res != value) {
+ errln((UnicodeString)"FAIL: Checking field " + fieldName(field) + " expected " + value + " and got " + res + UnicodeString("\n"));
+ return FALSE;
+ } else {
+ logln((UnicodeString)"Checking field " + fieldName(field) + " == " + value + UnicodeString("\n"));
+ }
+ return TRUE;
+}
+
+// =========== Test Cases =====================
+enum { SUN=UCAL_SUNDAY,
+ MON=UCAL_MONDAY,
+ TUE=UCAL_TUESDAY,
+ WED=UCAL_WEDNESDAY,
+ THU=UCAL_THURSDAY,
+ FRI=UCAL_FRIDAY,
+ SAT=UCAL_SATURDAY};
+
+void CalendarCaseTest::IslamicCivil()
+{
+ static const TestCase tests[] = {
+ //
+ // Most of these test cases were taken from the back of
+ // "Calendrical Calculations", with some extras added to help
+ // debug a few of the problems that cropped up in development.
+ //
+ // The months in this table are 1-based rather than 0-based,
+ // because it's easier to edit that way.
+ // Islamic
+ // Julian Day Era Year Month Day WkDay Hour Min Sec
+ { 1507231.5, 0, -1245, 12, 9, SUN, 0, 0, 0},
+ { 1660037.5, 0, -813, 2, 23, WED, 0, 0, 0},
+ { 1746893.5, 0, -568, 4, 1, WED, 0, 0, 0},
+ { 1770641.5, 0, -501, 4, 6, SUN, 0, 0, 0},
+ { 1892731.5, 0, -157, 10, 17, WED, 0, 0, 0},
+ { 1931579.5, 0, -47, 6, 3, MON, 0, 0, 0},
+ { 1974851.5, 0, 75, 7, 13, SAT, 0, 0, 0},
+ { 2091164.5, 0, 403, 10, 5, SUN, 0, 0, 0},
+ { 2121509.5, 0, 489, 5, 22, SUN, 0, 0, 0},
+ { 2155779.5, 0, 586, 2, 7, FRI, 0, 0, 0},
+ { 2174029.5, 0, 637, 8, 7, SAT, 0, 0, 0},
+ { 2191584.5, 0, 687, 2, 20, FRI, 0, 0, 0},
+ { 2195261.5, 0, 697, 7, 7, SUN, 0, 0, 0},
+ { 2229274.5, 0, 793, 7, 1, SUN, 0, 0, 0},
+ { 2245580.5, 0, 839, 7, 6, WED, 0, 0, 0},
+ { 2266100.5, 0, 897, 6, 1, SAT, 0, 0, 0},
+ { 2288542.5, 0, 960, 9, 30, SAT, 0, 0, 0},
+ { 2290901.5, 0, 967, 5, 27, SAT, 0, 0, 0},
+ { 2323140.5, 0, 1058, 5, 18, WED, 0, 0, 0},
+ { 2334848.5, 0, 1091, 6, 2, SUN, 0, 0, 0},
+ { 2348020.5, 0, 1128, 8, 4, FRI, 0, 0, 0},
+ { 2366978.5, 0, 1182, 2, 3, SUN, 0, 0, 0},
+ { 2385648.5, 0, 1234, 10, 10, MON, 0, 0, 0},
+ { 2392825.5, 0, 1255, 1, 11, WED, 0, 0, 0},
+ { 2416223.5, 0, 1321, 1, 21, SUN, 0, 0, 0},
+ { 2425848.5, 0, 1348, 3, 19, SUN, 0, 0, 0},
+ { 2430266.5, 0, 1360, 9, 8, MON, 0, 0, 0},
+ { 2430833.5, 0, 1362, 4, 13, MON, 0, 0, 0},
+ { 2431004.5, 0, 1362, 10, 7, THU, 0, 0, 0},
+ { 2448698.5, 0, 1412, 9, 13, TUE, 0, 0, 0},
+ { 2450138.5, 0, 1416, 10, 5, SUN, 0, 0, 0},
+ { 2465737.5, 0, 1460, 10, 12, WED, 0, 0, 0},
+ { 2486076.5, 0, 1518, 3, 5, SUN, 0, 0, 0},
+ { -1,-1,-1,-1,-1,-1,-1,-1,-1 }
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *c = Calendar::createInstance("ar@calendar=islamic-civil", status);
+ c->setLenient(TRUE);
+ doTestCases(tests, c);
+
+ static const UChar expectedUChars[] = {
+ 0x0627, 0x0644, 0x062e, 0x0645, 0x064a, 0x0633, 0x002c, 0x0020, 0x0662, 0x0662,
+ 0x0020, 0x0634, 0x0648, 0x0627, 0x0644, 0x002c, 0x0020, 0x0661, 0x0663, 0x0668,
+ 0x0669, 0
+ };
+ UnicodeString result;
+ DateFormat *fmt = DateFormat::createDateInstance(DateFormat::kFull, Locale("ar_JO@calendar=islamic-civil"));
+ if (fmt == NULL) {
+ dataerrln("Error calling DateFormat::createDateInstance");
+ delete c;
+ delete fmt;
+ return;
+ }
+
+ fmt->setTimeZone(*TimeZone::getGMT());
+ fmt->format((UDate)2486076.5, result);
+ if (result != expectedUChars) {
+ errln((UnicodeString)"FAIL: DateFormatting failed. Got " + result + " and expected " + UnicodeString(expectedUChars) + UnicodeString("\n"));
+ errln("Maybe the resource aliasing isn't working");
+ }
+ delete fmt;
+ delete c;
+}
+
+void CalendarCaseTest::Hebrew() {
+ static const int32_t TISHRI = HebrewCalendar::TISHRI;
+ //static const int32_t HESHVAN = HebrewCalendar::HESHVAN;
+ //static const int32_t KISLEV = HebrewCalendar::KISLEV;
+ //static const int32_t TEVET = HebrewCalendar::TEVET;
+ //static const int32_t SHEVAT = HebrewCalendar::SHEVAT;
+ //static const int32_t ADAR_1 = HebrewCalendar::ADAR_1;
+ //static const int32_t ADAR = HebrewCalendar::ADAR;
+ //static const int32_t NISAN = HebrewCalendar::NISAN;
+ //static const int32_t IYAR = HebrewCalendar::IYAR;
+ //static const int32_t SIVAN = HebrewCalendar::SIVAN;
+ //static const int32_t TAMUZ = HebrewCalendar::TAMUZ;
+ static const int32_t AV = HebrewCalendar::AV;
+ static const int32_t ELUL = HebrewCalendar::ELUL;
+
+ static const TestCase tests[] = {
+ //
+ // Most of these test cases were taken from the back of
+ // "Calendrical Calculations", with some extras added to help
+ // debug a few of the problems that cropped up in development.
+ //
+ // The months in this table are 1-based rather than 0-based,
+ // because it's easier to edit that way.
+ //
+ // Julian Day Era Year Month Day WkDay Hour Min Sec
+ {1507231.5, 0, 3174, 12, 10, SUN, 0, 0, 0},
+ {1660037.5, 0, 3593, 3, 25, WED, 0, 0, 0},
+ {1746893.5, 0, 3831, 1, 3, WED, 0, 0, 0},
+ {1770641.5, 0, 3896, 1, 9, SUN, 0, 0, 0},
+ {1892731.5, 0, 4230, 4, 18, WED, 0, 0, 0},
+ {1931579.5, 0, 4336, 10, 4, MON, 0, 0, 0},
+ {1974851.5, 0, 4455, 2, 13, SAT, 0, 0, 0},
+ {2091164.5, 0, 4773, 9, 6, SUN, 0, 0, 0},
+ {2121509.5, 0, 4856, 9, 23, SUN, 0, 0, 0},
+ {2155779.5, 0, 4950, 8, 7, FRI, 0, 0, 0},
+ {2174029.5, 0, 5000, 7, 8, SAT, 0, 0, 0},
+ {2191584.5, 0, 5048, 8, 21, FRI, 0, 0, 0},
+ {2195261.5, 0, 5058, 9, 7, SUN, 0, 0, 0},
+ {2229274.5, 0, 5151, 11, 1, SUN, 0, 0, 0},
+ {2245580.5, 0, 5196, 5, 7, WED, 0, 0, 0},
+ {2266100.5, 0, 5252, 8, 3, SAT, 0, 0, 0},
+ {2288542.5, 0, 5314, 1, 1, SAT, 0, 0, 0},
+ {2290901.5, 0, 5320, 6, 27, SAT, 0, 0, 0},
+ {2323140.5, 0, 5408, 10, 20, WED, 0, 0, 0},
+ {2334551.5, 0, 5440, 1, 1, THU, 0, 0, 0},
+ {2334581.5, 0, 5440, 2, 1, SAT, 0, 0, 0},
+ {2334610.5, 0, 5440, 3, 1, SUN, 0, 0, 0},
+ {2334639.5, 0, 5440, 4, 1, MON, 0, 0, 0},
+ {2334668.5, 0, 5440, 5, 1, TUE, 0, 0, 0},
+ {2334698.5, 0, 5440, 6, 1, THU, 0, 0, 0},
+ {2334728.5, 0, 5440, 7, 1, SAT, 0, 0, 0},
+ {2334757.5, 0, 5440, 8, 1, SUN, 0, 0, 0},
+ {2334787.5, 0, 5440, 9, 1, TUE, 0, 0, 0},
+ {2334816.5, 0, 5440, 10, 1, WED, 0, 0, 0},
+ {2334846.5, 0, 5440, 11, 1, FRI, 0, 0, 0},
+ {2334848.5, 0, 5440, 11, 3, SUN, 0, 0, 0},
+ {2334934.5, 0, 5441, 1, 1, TUE, 0, 0, 0},
+ {2348020.5, 0, 5476, 12, 5, FRI, 0, 0, 0},
+ {2366978.5, 0, 5528, 11, 4, SUN, 0, 0, 0},
+ {2385648.5, 0, 5579, 12, 11, MON, 0, 0, 0},
+ {2392825.5, 0, 5599, 8, 12, WED, 0, 0, 0},
+ {2416223.5, 0, 5663, 8, 22, SUN, 0, 0, 0},
+ {2425848.5, 0, 5689, 12, 19, SUN, 0, 0, 0},
+ {2430266.5, 0, 5702, 1, 8, MON, 0, 0, 0},
+ {2430833.5, 0, 5703, 8, 14, MON, 0, 0, 0},
+ {2431004.5, 0, 5704, 1, 8, THU, 0, 0, 0},
+ {2448698.5, 0, 5752, 7, 12, TUE, 0, 0, 0},
+ {2450138.5, 0, 5756, 7, 5, SUN, 0, 0, 0},
+ {2465737.5, 0, 5799, 2, 12, WED, 0, 0, 0},
+ {2486076.5, 0, 5854, 12, 5, SUN, 0, 0, 0},
+
+ // Test cases taken from a table of 14 "year types" in the Help file
+ // of the application "Hebrew Calendar"
+ {2456187.5, 0, 5773, 1, 1, MON, 0, 0, 0},
+ {2459111.5, 0, 5781, 1, 1, SAT, 0, 0, 0},
+ {2453647.5, 0, 5766, 1, 1, TUE, 0, 0, 0},
+ {2462035.5, 0, 5789, 1, 1, THU, 0, 0, 0},
+ {2458756.5, 0, 5780, 1, 1, MON, 0, 0, 0},
+ {2460586.5, 0, 5785, 1, 1, THU, 0, 0, 0},
+ {2463864.5, 0, 5794, 1, 1, SAT, 0, 0, 0},
+ {2463481.5, 0, 5793, 1, 1, MON, 0, 0, 0},
+ {2470421.5, 0, 5812, 1, 1, THU, 0, 0, 0},
+ {2460203.5, 0, 5784, 1, 1, SAT, 0, 0, 0},
+ {2459464.5, 0, 5782, 1, 1, TUE, 0, 0, 0},
+ {2467142.5, 0, 5803, 1, 1, MON, 0, 0, 0},
+ {2455448.5, 0, 5771, 1, 1, THU, 0, 0, 0},
+ // Test cases for JB#2327
+ // http://www.fourmilab.com/documents/calendar/
+ // http://www.calendarhome.com/converter/
+ // 2452465.5, 2002, JULY, 10, 5762, AV, 1,
+ // 2452494.5, 2002, AUGUST, 8, 5762, AV, 30,
+ // 2452495.5, 2002, AUGUST, 9, 5762, ELUL, 1,
+ // 2452523.5, 2002, SEPTEMBER, 6, 5762, ELUL, 29,
+ // 2452524.5, 2002, SEPTEMBER, 7, 5763, TISHRI, 1,
+ // Julian Day Era Year Month Day WkDay Hour Min Sec
+ {2452465.5, 0, 5762, AV+1, 1, WED, 0, 0, 0},
+ {2452494.5, 0, 5762, AV+1, 30, THU, 0, 0, 0},
+ {2452495.5, 0, 5762, ELUL+1, 1, FRI, 0, 0, 0},
+ {2452523.5, 0, 5762, ELUL+1, 29, FRI, 0, 0, 0},
+ {2452524.5, 0, 5763, TISHRI+1, 1, SAT, 0, 0, 0},
+ { -1,-1,-1,-1,-1,-1,-1,-1,-1 }
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *c = Calendar::createInstance("he_HE@calendar=hebrew", status);
+ c->setLenient(TRUE);
+ doTestCases(tests, c);
+
+
+ // Additional test cases for bugs found during development
+ // G.YY/MM/DD Era Year Month Day WkDay Hour Min Sec
+ //{1013, 9, 8, 0, 4774, 1, 1, TUE, 0, 0, 0},
+ //{1239, 9, 1, 0, 5000, 1, 1, THU, 0, 0, 0},
+ //{1240, 9,18, 0, 5001, 1, 1, TUE, 0, 0, 0},
+
+
+ delete c;
+}
+
+void CalendarCaseTest::Indian() {
+ // Months in indian calendar are 0-based. Here taking 1-based names:
+ static const int32_t CHAITRA = IndianCalendar::CHAITRA + 1;
+ static const int32_t VAISAKHA = IndianCalendar::VAISAKHA + 1;
+ static const int32_t JYAISTHA = IndianCalendar::JYAISTHA + 1;
+ static const int32_t ASADHA = IndianCalendar::ASADHA + 1;
+ static const int32_t SRAVANA = IndianCalendar::SRAVANA + 1 ;
+ static const int32_t BHADRA = IndianCalendar::BHADRA + 1 ;
+ static const int32_t ASVINA = IndianCalendar::ASVINA + 1 ;
+ static const int32_t KARTIKA = IndianCalendar::KARTIKA + 1 ;
+ static const int32_t AGRAHAYANA = IndianCalendar::AGRAHAYANA + 1 ;
+ static const int32_t PAUSA = IndianCalendar::PAUSA + 1 ;
+ static const int32_t MAGHA = IndianCalendar::MAGHA + 1 ;
+ static const int32_t PHALGUNA = IndianCalendar::PHALGUNA + 1 ;
+
+
+ static const TestCase tests[] = {
+ // Test dates generated from:
+ // http://www.fourmilab.ch/documents/calendar/
+
+ // A huge list of test cases to make sure that computeTime and computeFields
+ // work properly for a wide range of data in the Indian civil calendar.
+ //
+ // Julian Day Era Year Month Day WkDay Hour Min Sec
+ {1770641.5, 0, 57, ASVINA, 10, SUN, 0, 0, 0},
+ {1892731.5, 0, 391, PAUSA, 18, WED, 0, 0, 0},
+ {1931579.5, 0, 498, VAISAKHA, 30, MON, 0, 0, 0},
+ {1974851.5, 0, 616, KARTIKA, 19, SAT, 0, 0, 0},
+ {2091164.5, 0, 935, VAISAKHA, 5, SUN, 0, 0, 0},
+ {2121509.5, 0, 1018, JYAISTHA, 3, SUN, 0, 0, 0},
+ {2155779.5, 0, 1112, CHAITRA, 2, FRI, 0, 0, 0},
+ {2174029.5, 0, 1161, PHALGUNA, 20, SAT, 0, 0, 0},
+ {2191584.5, 0, 1210, CHAITRA, 13, FRI, 0, 0, 0},
+ {2195261.5, 0, 1220, VAISAKHA, 7, SUN, 0, 0, 0},
+ {2229274.5, 0, 1313, JYAISTHA, 22, SUN, 0, 0, 0},
+ {2245580.5, 0, 1357, MAGHA, 14, WED, 0, 0, 0},
+ {2266100.5, 0, 1414, CHAITRA, 20, SAT, 0, 0, 0},
+ {2288542.5, 0, 1475, BHADRA, 28, SAT, 0, 0, 0},
+ {2290901.5, 0, 1481, PHALGUNA, 15, SAT, 0, 0, 0},
+ {2323140.5, 0, 1570, JYAISTHA, 20, WED, 0, 0, 0},
+ {2334551.5, 0, 1601, BHADRA, 16, THU, 0, 0, 0},
+ {2334581.5, 0, 1601, ASVINA, 15, SAT, 0, 0, 0},
+ {2334610.5, 0, 1601, KARTIKA, 14, SUN, 0, 0, 0},
+ {2334639.5, 0, 1601, AGRAHAYANA, 13, MON, 0, 0, 0},
+ {2334668.5, 0, 1601, PAUSA, 12, TUE, 0, 0, 0},
+ {2334698.5, 0, 1601, MAGHA, 12, THU, 0, 0, 0},
+ {2334728.5, 0, 1601, PHALGUNA, 12, SAT, 0, 0, 0},
+ {2334757.5, 0, 1602, CHAITRA, 11, SUN, 0, 0, 0},
+ {2334787.5, 0, 1602, VAISAKHA, 10, TUE, 0, 0, 0},
+ {2334816.5, 0, 1602, JYAISTHA, 8, WED, 0, 0, 0},
+ {2334846.5, 0, 1602, ASADHA, 7, FRI, 0, 0, 0},
+ {2334848.5, 0, 1602, ASADHA, 9, SUN, 0, 0, 0},
+ {2348020.5, 0, 1638, SRAVANA, 2, FRI, 0, 0, 0},
+ {2334934.5, 0, 1602, ASVINA, 2, TUE, 0, 0, 0},
+ {2366978.5, 0, 1690, JYAISTHA, 29, SUN, 0, 0, 0},
+ {2385648.5, 0, 1741, SRAVANA, 11, MON, 0, 0, 0},
+ {2392825.5, 0, 1761, CHAITRA, 6, WED, 0, 0, 0},
+ {2416223.5, 0, 1825, CHAITRA, 29, SUN, 0, 0, 0},
+ {2425848.5, 0, 1851, BHADRA, 3, SUN, 0, 0, 0},
+ {2430266.5, 0, 1863, ASVINA, 7, MON, 0, 0, 0},
+ {2430833.5, 0, 1865, CHAITRA, 29, MON, 0, 0, 0},
+ {2431004.5, 0, 1865, ASVINA, 15, THU, 0, 0, 0},
+ {2448698.5, 0, 1913, PHALGUNA, 27, TUE, 0, 0, 0},
+ {2450138.5, 0, 1917, PHALGUNA, 6, SUN, 0, 0, 0},
+ {2465737.5, 0, 1960, KARTIKA, 19, WED, 0, 0, 0},
+ {2486076.5, 0, 2016, ASADHA, 27, SUN, 0, 0, 0},
+ { -1,-1,-1,-1,-1,-1,-1,-1,-1 }
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *c = Calendar::createInstance("hi_IN@calendar=indian", status);
+ c->setLenient(TRUE);
+ doTestCases(tests, c);
+
+ delete c;
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/calcasts.h b/Build/source/libs/icu/icu-xetex/test/intltest/calcasts.h
new file mode 100644
index 00000000000..6085c229f70
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/calcasts.h
@@ -0,0 +1,63 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2003-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ********************************************************************
+ * Calendar Case Test is a type of CalendarTest which compares the
+ * behavior of a calendar to a certain set of 'test cases', involving
+ * conversion between julian-day to fields and vice versa.
+ ********************************************************************/
+
+#ifndef __CalendarCaseTest__
+#define __CalendarCaseTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/calendar.h"
+#include "unicode/smpdtfmt.h"
+#include "caltest.h"
+
+class CalendarCaseTest: public CalendarTest {
+ public:
+ virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+
+ /* Test case struct */
+ struct TestCase {
+ double julian; // Julian Date
+ int32_t era;
+ int32_t year;
+ int32_t month;
+ int32_t day;
+ int32_t dayOfWeek;
+ int32_t hour;
+ int32_t min;
+ int32_t sec;
+ };
+
+ /**
+ * @param cases array of items to test. Terminate with a "-1" for era.
+ */
+ void doTestCases(const TestCase *cases, Calendar *cal);
+
+ private:
+ /**
+ * Utility function to test out a specific field
+ * @param cal calendar
+ * @param field which field
+ * @param value expected value
+ * @param status err status
+ * @return boolean indicating success (TRUE) or failure (FALSE) of the test.
+ */
+ UBool checkField(Calendar *cal, UCalendarDateFields field, int32_t value, UErrorCode &status);
+
+ private:
+ // test cases
+ void IslamicCivil();
+ void Hebrew();
+ void Indian();
+};
+
+#endif
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/callimts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/callimts.cpp
new file mode 100644
index 00000000000..40ad122bf47
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/callimts.cpp
@@ -0,0 +1,135 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "callimts.h"
+#include "caltest.h"
+#include "unicode/calendar.h"
+#include "unicode/gregocal.h"
+#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
+#include "putilimp.h"
+
+U_NAMESPACE_USE
+void CalendarLimitTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite TestCalendarLimit");
+ switch (index) {
+ // Re-enable this later
+ case 0:
+ name = "TestCalendarLimit";
+ if (exec) {
+ logln("TestCalendarLimit---"); logln("");
+ TestCalendarLimit();
+ }
+ break;
+ default: name = ""; break;
+ }
+}
+
+
+// *****************************************************************************
+// class CalendarLimitTest
+// *****************************************************************************
+
+// -------------------------------------
+void
+CalendarLimitTest::test(UDate millis, U_NAMESPACE_QUALIFIER Calendar* cal, U_NAMESPACE_QUALIFIER DateFormat* fmt)
+{
+ static const UDate kDrift = 1e-10;
+ UErrorCode exception = U_ZERO_ERROR;
+ UnicodeString theDate;
+ UErrorCode status = U_ZERO_ERROR;
+ cal->setTime(millis, exception);
+ if (U_SUCCESS(exception)) {
+ fmt->format(millis, theDate);
+ UDate dt = fmt->parse(theDate, status);
+ // allow a small amount of error (drift)
+ if(! withinErr(dt, millis, kDrift)) {
+ errln("FAIL:round trip for large milli, got: %.1lf wanted: %.1lf. (delta %.2lf greater than %.2lf)",
+ dt, millis, uprv_fabs(millis-dt), uprv_fabs(dt*kDrift));
+ logln(UnicodeString(" ") + theDate + " " + CalendarTest::calToStr(*cal));
+ } else {
+ logln(UnicodeString("OK: got ") + dt + ", wanted " + millis);
+ logln(UnicodeString(" ") + theDate);
+ }
+ }
+}
+
+// -------------------------------------
+
+// bug 986c: deprecate nextDouble/previousDouble
+//|double
+//|CalendarLimitTest::nextDouble(double a)
+//|{
+//| return uprv_nextDouble(a, TRUE);
+//|}
+//|
+//|double
+//|CalendarLimitTest::previousDouble(double a)
+//|{
+//| return uprv_nextDouble(a, FALSE);
+//|}
+
+UBool
+CalendarLimitTest::withinErr(double a, double b, double err)
+{
+ return ( uprv_fabs(a - b) < uprv_fabs(a * err) );
+}
+
+void
+CalendarLimitTest::TestCalendarLimit()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if (failure(status, "Calendar::createInstance")) return;
+ cal->adoptTimeZone(TimeZone::createTimeZone("GMT"));
+ DateFormat *fmt = DateFormat::createDateTimeInstance();
+ if(!fmt || !cal) {
+ dataerrln("can't open cal and/or fmt");
+ return;
+ }
+ fmt->adoptCalendar(cal);
+ ((SimpleDateFormat*) fmt)->applyPattern("HH:mm:ss.SSS zzz, EEEE, MMMM d, yyyy G");
+
+
+ // This test used to test the algorithmic limits of the dates that
+ // GregorianCalendar could handle. However, the algorithm has
+ // been rewritten completely since then and the prior limits no
+ // longer apply. Instead, we now do basic round-trip testing of
+ // some extreme (but still manageable) dates.
+ UDate m;
+ logln("checking 1e16..1e17");
+ for ( m = 1e16; m < 1e17; m *= 1.1) {
+ test(m, cal, fmt);
+ }
+ logln("checking -1e14..-1e15");
+ for ( m = -1e14; m > -1e15; m *= 1.1) {
+ test(m, cal, fmt);
+ }
+
+ // This is 2^52 - 1, the largest allowable mantissa with a 0
+ // exponent in a 64-bit double
+ UDate VERY_EARLY_MILLIS = - 4503599627370495.0;
+ UDate VERY_LATE_MILLIS = 4503599627370495.0;
+
+ // I am removing the previousDouble and nextDouble calls below for
+ // two reasons: 1. As part of jitterbug 986, I am deprecating
+ // these methods and removing calls to them. 2. This test is a
+ // non-critical boundary behavior test.
+ test(VERY_EARLY_MILLIS, cal, fmt);
+ //test(previousDouble(VERY_EARLY_MILLIS), cal, fmt);
+ test(VERY_LATE_MILLIS, cal, fmt);
+ //test(nextDouble(VERY_LATE_MILLIS), cal, fmt);
+ delete fmt;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+// eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/callimts.h b/Build/source/libs/icu/icu-xetex/test/intltest/callimts.h
new file mode 100644
index 00000000000..9ef1af36b5b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/callimts.h
@@ -0,0 +1,41 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef __CalendarLimitTest__
+#define __CalendarLimitTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "caltztst.h"
+
+/**
+ * This test verifies the behavior of Calendar around the very earliest limits
+ * which it can handle. It also verifies the behavior for large values of millis.
+ *
+ * Bug ID 4033662.
+ */
+class CalendarLimitTest: public CalendarTimeZoneTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public: // package
+ //test routine used by TestCalendarLimit
+ virtual void test(UDate millis, Calendar *cal, DateFormat *fmt);
+
+ // bug 986c: deprecate nextDouble/previousDouble
+ //static double nextDouble(double a);
+ //static double previousDouble(double a);
+ static UBool withinErr(double a, double b, double err);
+
+public:
+ // test behaviour and error reporting at boundaries of defined range
+ virtual void TestCalendarLimit(void);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // __CalendarLimitTest__
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/calregts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/calregts.cpp
new file mode 100644
index 00000000000..d5f8c670ac4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/calregts.cpp
@@ -0,0 +1,2658 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "calregts.h"
+
+#include "unicode/gregocal.h"
+#include "unicode/simpletz.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/strenum.h"
+#include "cmemory.h"
+#include "caltest.h"
+
+#include <float.h>
+
+// *****************************************************************************
+// class CalendarRegressionTest
+// *****************************************************************************
+
+// these numbers correspond to using LONG_MIN and LONG_MAX in Java
+// this is 2^52 - 1, the largest allowable mantissa with a 0 exponent in a 64-bit double
+const UDate CalendarRegressionTest::EARLIEST_SUPPORTED_MILLIS = - 4503599627370495.0;
+const UDate CalendarRegressionTest::LATEST_SUPPORTED_MILLIS = 4503599627370495.0;
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+
+void
+CalendarRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite NumberFormatRegressionTest");
+ switch (index) {
+ CASE(0,test4100311);
+ CASE(1,test4074758);
+ CASE(2,test4028518);
+ CASE(3,test4031502);
+ CASE(4,test4035301);
+ CASE(5,test4040996);
+ CASE(6,test4051765);
+ CASE(7,test4061476);
+ CASE(8,test4070502);
+ CASE(9,test4071197);
+ CASE(10,test4071385);
+ CASE(11,test4073929);
+ CASE(12,test4083167);
+ CASE(13,test4086724);
+ CASE(14,test4095407);
+ CASE(15,test4096231);
+ CASE(16,test4096539);
+ CASE(17,test41003112);
+ CASE(18,test4103271);
+ CASE(19,test4106136);
+ CASE(20,test4108764);
+ CASE(21,test4114578);
+ CASE(22,test4118384);
+ CASE(23,test4125881);
+ CASE(24,test4125892);
+ CASE(25,test4141665);
+ CASE(26,test4142933);
+ CASE(27,test4145158);
+ CASE(28,test4145983);
+ CASE(29,test4147269);
+
+ CASE(30,Test4149677);
+ CASE(31,Test4162587);
+ CASE(32,Test4165343);
+ CASE(33,Test4166109);
+ CASE(34,Test4167060);
+ CASE(35,Test4197699);
+ CASE(36,TestJ81);
+ CASE(37,TestJ438);
+ CASE(38,TestLeapFieldDifference);
+ CASE(39,TestMalaysianInstance);
+ CASE(40,test4059654);
+ CASE(41,test4092362);
+ CASE(42,TestWeekShift);
+ CASE(43,TestTimeZoneTransitionAdd);
+ CASE(44,TestDeprecates);
+ CASE(45,TestT5555);
+ default: name = ""; break;
+ }
+}
+
+const char* CalendarRegressionTest::FIELD_NAME [] = {
+ "ERA",
+ "YEAR",
+ "MONTH",
+ "WEEK_OF_YEAR",
+ "WEEK_OF_MONTH",
+ "DAY_OF_MONTH",
+ "DAY_OF_YEAR",
+ "DAY_OF_WEEK",
+ "DAY_OF_WEEK_IN_MONTH",
+ "AM_PM",
+ "HOUR",
+ "HOUR_OF_DAY",
+ "MINUTE",
+ "SECOND",
+ "MILLISECOND",
+ "ZONE_OFFSET",
+ "DST_OFFSET",
+ "YEAR_WOY",
+ "DOW_LOCAL"
+};
+
+UBool
+CalendarRegressionTest::failure(UErrorCode status, const char* msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/*
+ * bug 4100311
+ */
+void
+CalendarRegressionTest::test4100311()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal = (GregorianCalendar*)Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ failure(status, "Calendar::createInstance(status)");
+ cal->set(UCAL_YEAR, 1997);
+ cal->set(UCAL_DAY_OF_YEAR, 1);
+ UDate d = cal->getTime(status); // Should be Jan 1
+ failure(status, "cal->getTime");
+ logln(UnicodeString("") + d);
+ delete cal;
+}
+
+
+/**
+ * @bug 4074758
+ */
+void
+CalendarRegressionTest::test4074758()
+{ //Set system time to between 12-1 (am or pm) and then run
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal = new GregorianCalendar(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ failure(status, "new GregorianCalendar");
+ for (int32_t h=0; h<25; ++h) {
+ cal->set(97, UCAL_JANUARY, 1, h, 34);
+ //System.out.print(d);
+ logln(UnicodeString("HOUR=") + cal->get(UCAL_HOUR, status)); //prints 0
+ failure(status, "cal->get");
+ logln(UnicodeString("HOUR_OF_DAY=") + cal->get(UCAL_HOUR_OF_DAY, status));
+ failure(status, "cal->get");
+ }
+
+ delete cal;
+}
+
+void
+CalendarRegressionTest::test4028518()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal1 = new GregorianCalendar(status) ;
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal1;
+ return;
+ }
+ failure(status, "new GregorianCalendar");
+ GregorianCalendar *cal2 = (GregorianCalendar*) cal1->clone() ;
+
+ printdate(cal1, "cal1: ") ;
+ printdate(cal2, "cal2 - cloned(): ") ;
+ cal1->add(UCAL_DATE, 1, status) ;
+ failure(status, "cal1->add");
+ printdate(cal1, "cal1 after adding 1 day:") ;
+ printdate(cal2, "cal2 should be unmodified:") ;
+ delete cal1;
+ delete cal2;
+}
+
+void
+CalendarRegressionTest::printdate(GregorianCalendar *cal, const char *string)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ logln(UnicodeString(string, ""));
+ log(UnicodeString("") + cal->get(UCAL_MONTH, status)) ;
+ failure(status, "cal->get");
+ int32_t date = cal->get(UCAL_DATE, status) + 1 ;
+ failure(status, "cal->get");
+ log(UnicodeString("/") + date) ;
+ logln(UnicodeString("/") + cal->get(UCAL_YEAR, status)) ;
+ failure(status, "cal->get");
+}
+
+/**
+ * @bug 4031502
+ */
+void
+CalendarRegressionTest::test4031502()
+{
+ // This bug actually occurs on Windows NT as well, and doesn't
+ // require the host zone to be set; it can be set in Java.
+ UErrorCode status = U_ZERO_ERROR;
+ StringEnumeration* ids = TimeZone::createEnumeration();
+ UBool bad = FALSE;
+ TimeZone* tz =TimeZone::createTimeZone("Asia/Riyadh87");
+ failure(status, "new TimeZone");
+ GregorianCalendar *cl = new GregorianCalendar(tz, status);
+ failure(status, "new GregorianCalendar");
+ cl->clear();
+ cl->set(1900, 15, 5, 5, 8, 13);
+ cl->get(UCAL_HOUR, status);
+ failure(status, "cl->get(UCAL_HOUR, status)");
+ status = U_ZERO_ERROR;
+ delete cl;
+ for (int32_t i=0; i<ids->count(status); ++i) {
+ TimeZone *zone = TimeZone::createTimeZone(*ids->snext(status));
+ GregorianCalendar *cal = new GregorianCalendar(zone, status);
+ failure(status, "new GregorianCalendar");
+ cal->clear();
+ cal->set(1900, 15, 5, 5, 8, 13);
+ if (cal->get(UCAL_HOUR, status) != 5 || U_FAILURE(status)) {
+ UnicodeString temp;
+ logln(zone->getID(temp) + " " +
+ //zone.useDaylightTime() + " " +
+ cal->get(UCAL_DST_OFFSET,status) / (60*60*1000) + " " +
+ zone->getRawOffset() / (60*60*1000) +
+ ": HOUR = " + cal->get(UCAL_HOUR,status));
+ bad = TRUE;
+ }
+ delete cal;
+ }
+ if (bad)
+ errln("TimeZone problems with GC");
+ // delete [] ids; // TODO: bad APIs
+ delete ids;
+}
+
+/**
+ * @bug 4035301
+ */
+void CalendarRegressionTest::test4035301()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *c = new GregorianCalendar(98, 8, 7,status);
+ GregorianCalendar *d = new GregorianCalendar(98, 8, 7,status);
+ if (c->after(*d,status) ||
+ c->after(*c,status) ||
+ c->before(*d,status) ||
+ c->before(*c,status) ||
+ *c != *c ||
+ *c != *d)
+ errln("Fail");
+ delete c;
+ delete d;
+}
+
+/**
+ * @bug 4040996
+ */
+void CalendarRegressionTest::test4040996()
+{
+ int32_t count = 0;
+ StringEnumeration* ids = TimeZone::createEnumeration(-8 * 60 * 60 * 1000);
+ UErrorCode status = U_ZERO_ERROR;
+ count = ids->count(status);
+ SimpleTimeZone *pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, *ids->snext(status));
+ pdt->setStartRule(UCAL_APRIL, 1, UCAL_SUNDAY, 2 * 60 * 60 * 1000, status);
+ pdt->setEndRule(UCAL_OCTOBER, -1, UCAL_SUNDAY, 2 * 60 * 60 * 1000, status);
+ Calendar *calendar = new GregorianCalendar(pdt, status);
+
+ calendar->set(UCAL_MONTH,3);
+ calendar->set(UCAL_DATE,18);
+ calendar->set(UCAL_SECOND, 30);
+
+ logln(UnicodeString("MONTH: ") + calendar->get(UCAL_MONTH, status));
+ logln(UnicodeString("DAY_OF_MONTH: ") +
+ calendar->get(UCAL_DATE, status));
+ logln(UnicodeString("MINUTE: ") + calendar->get(UCAL_MINUTE, status));
+ logln(UnicodeString("SECOND: ") + calendar->get(UCAL_SECOND, status));
+
+ calendar->add(UCAL_SECOND,6, status);
+ //This will print out todays date for MONTH and DAY_OF_MONTH
+ //instead of the date it was set to.
+ //This happens when adding MILLISECOND or MINUTE also
+ logln(UnicodeString("MONTH: ") + calendar->get(UCAL_MONTH, status));
+ logln(UnicodeString("DAY_OF_MONTH: ") +
+ calendar->get(UCAL_DATE, status));
+ logln(UnicodeString("MINUTE: ") + calendar->get(UCAL_MINUTE, status));
+ logln(UnicodeString("SECOND: ") + calendar->get(UCAL_SECOND, status));
+ if (calendar->get(UCAL_MONTH, status) != 3 ||
+ calendar->get(UCAL_DATE, status) != 18 ||
+ calendar->get(UCAL_SECOND, status) != 36)
+ errln(UnicodeString("Fail: Calendar::add misbehaves"));
+
+ delete calendar;
+ delete ids;
+ // delete ids; // TODO: BAD API
+}
+
+/**
+ * @bug 4051765
+ */
+void CalendarRegressionTest::test4051765()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ cal->setLenient(FALSE);
+ cal->set(UCAL_DAY_OF_WEEK, 0);
+ //try {
+ cal->getTime(status);
+ if( ! U_FAILURE(status))
+ errln("Fail: DAY_OF_WEEK 0 should be disallowed");
+ /*}
+ catch (IllegalArgumentException e) {
+ return;
+ }*/
+
+ delete cal;
+}
+
+/* User error - no bug here
+void CalendarRegressionTest::test4059524() {
+ // Create calendar for April 10, 1997
+ GregorianCalendar calendar = new GregorianCalendar(status);
+ // print out a bunch of interesting things
+ logln("ERA: " + Calendar::get(Calendar::ERA));
+ logln("YEAR: " + Calendar::get(Calendar::YEAR));
+ logln("MONTH: " + Calendar::get(Calendar::MONTH));
+ logln("WEEK_OF_YEAR: " +
+ Calendar::get(Calendar::WEEK_OF_YEAR));
+ logln("WEEK_OF_MONTH: " +
+ Calendar::get(Calendar::WEEK_OF_MONTH));
+ logln("DATE: " + Calendar::get(Calendar::DATE));
+ logln("DAY_OF_MONTH: " +
+ Calendar::get(Calendar::DAY_OF_MONTH));
+ logln("DAY_OF_YEAR: " + Calendar::get(Calendar::DAY_OF_YEAR));
+ logln("DAY_OF_WEEK: " + Calendar::get(Calendar::DAY_OF_WEEK));
+ logln("DAY_OF_WEEK_IN_MONTH: " +
+ Calendar::get(Calendar::DAY_OF_WEEK_IN_MONTH));
+ logln("AM_PM: " + Calendar::get(Calendar::AM_PM));
+ logln("HOUR: " + Calendar::get(Calendar::HOUR));
+ logln("HOUR_OF_DAY: " + Calendar::get(Calendar::HOUR_OF_DAY));
+ logln("MINUTE: " + Calendar::get(Calendar::MINUTE));
+ logln("SECOND: " + Calendar::get(Calendar::SECOND));
+ logln("MILLISECOND: " + Calendar::get(Calendar::MILLISECOND));
+ logln("ZONE_OFFSET: "
+ + (Calendar::get(Calendar::ZONE_OFFSET)/(60*60*1000)));
+ logln("DST_OFFSET: "
+ + (Calendar::get(Calendar::DST_OFFSET)/(60*60*1000)));
+ calendar = new GregorianCalendar(1997,3,10);
+ Calendar::getTime();
+ logln("April 10, 1997");
+ logln("ERA: " + Calendar::get(Calendar::ERA));
+ logln("YEAR: " + Calendar::get(Calendar::YEAR));
+ logln("MONTH: " + Calendar::get(Calendar::MONTH));
+ logln("WEEK_OF_YEAR: " +
+ Calendar::get(Calendar::WEEK_OF_YEAR));
+ logln("WEEK_OF_MONTH: " +
+ Calendar::get(Calendar::WEEK_OF_MONTH));
+ logln("DATE: " + Calendar::get(Calendar::DATE));
+ logln("DAY_OF_MONTH: " +
+ Calendar::get(Calendar::DAY_OF_MONTH));
+ logln("DAY_OF_YEAR: " + Calendar::get(Calendar::DAY_OF_YEAR));
+ logln("DAY_OF_WEEK: " + Calendar::get(Calendar::DAY_OF_WEEK));
+ logln("DAY_OF_WEEK_IN_MONTH: " + Calendar::get(Calendar::DAY_OF_WEEK_IN_MONTH));
+ logln("AM_PM: " + Calendar::get(Calendar::AM_PM));
+ logln("HOUR: " + Calendar::get(Calendar::HOUR));
+ logln("HOUR_OF_DAY: " + Calendar::get(Calendar::HOUR_OF_DAY));
+ logln("MINUTE: " + Calendar::get(Calendar::MINUTE));
+ logln("SECOND: " + Calendar::get(Calendar::SECOND));
+ logln("MILLISECOND: " + Calendar::get(Calendar::MILLISECOND));
+ logln("ZONE_OFFSET: "
+ + (Calendar::get(Calendar::ZONE_OFFSET)/(60*60*1000))); // in hours
+ logln("DST_OFFSET: "
+ + (Calendar::get(Calendar::DST_OFFSET)/(60*60*1000))); // in hours
+}
+*/
+
+/**
+ * @bug 4059654
+ */
+void CalendarRegressionTest::test4059654() {
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *gc = new GregorianCalendar(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete gc;
+ return;
+ }
+
+ gc->set(1997, 3, 1, 15, 16, 17); // April 1, 1997
+
+ gc->set(UCAL_HOUR, 0);
+ gc->set(UCAL_AM_PM, UCAL_AM);
+ gc->set(UCAL_MINUTE, 0);
+ gc->set(UCAL_SECOND, 0);
+ gc->set(UCAL_MILLISECOND, 0);
+
+ UDate cd = gc->getTime(status);
+ GregorianCalendar *exp = new GregorianCalendar(1997, 3, 1, 0, 0, 0, status);
+ if (cd != exp->getTime(status))
+ errln(UnicodeString("Fail: Calendar::set broken. Got ") + cd + " Want " + exp->getTime(status));
+
+ delete gc;
+ delete exp;
+}
+
+/**
+ * @bug 4061476
+ */
+void CalendarRegressionTest::test4061476()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("ddMMMyy"), Locale::getUK(),status);
+ Calendar *cal = Calendar::createInstance(TimeZone::createTimeZone("GMT"),
+ Locale::getUK(),status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ delete fmt;
+ return;
+ }
+ fmt->adoptCalendar(cal);
+ // try {
+ UDate date = fmt->parse("29MAY97", status);
+ failure(status, "fmt->parse");
+ cal->setTime(date, status);
+ failure(status, "cal->setTime");
+ // }
+ //catch (Exception e) {;}
+ cal->set(UCAL_HOUR_OF_DAY, 13);
+ logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status));
+ cal->add(UCAL_HOUR_OF_DAY, 6,status);
+ logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status));
+ if (cal->get(UCAL_HOUR_OF_DAY, status) != 19)
+ errln(UnicodeString("Fail: Want 19 Got ") + cal->get(UCAL_HOUR_OF_DAY, status));
+
+ delete fmt;
+}
+
+/**
+ * @bug 4070502
+ */
+void CalendarRegressionTest::test4070502()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = new GregorianCalendar(status);
+ if(status == U_USING_FALLBACK_WARNING) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ UDate d = getAssociatedDate(makeDate(1998,0,30), status);
+ cal->setTime(d,status);
+ if (cal->get(UCAL_DAY_OF_WEEK,status) == UCAL_SATURDAY ||
+ cal->get(UCAL_DAY_OF_WEEK,status) == UCAL_SUNDAY)
+ errln(UnicodeString("Fail: Want weekday Got ") + d);
+
+ delete cal;
+}
+
+/**
+ * Get the associated date starting from a specified date
+ * NOTE: the unnecessary "getTime()'s" below are a work-around for a
+ * bug in jdk 1.1.3 (and probably earlier versions also)
+ * <p>
+ * @param date The date to start from
+ */
+UDate
+CalendarRegressionTest::getAssociatedDate(UDate d, UErrorCode& status)
+{
+ GregorianCalendar *cal = new GregorianCalendar(status);
+ cal->setTime(d,status);
+ //cal.add(field, amount); //<-- PROBLEM SEEN WITH field = DATE,MONTH
+ // cal.getTime(); // <--- REMOVE THIS TO SEE BUG
+ for (;;) {
+ int32_t wd = cal->get(UCAL_DAY_OF_WEEK, status);
+ if (wd == UCAL_SATURDAY || wd == UCAL_SUNDAY) {
+ cal->add(UCAL_DATE, 1, status);
+ // cal.getTime();
+ }
+ else
+ break;
+ }
+
+ UDate dd = cal->getTime(status);
+ delete cal;
+ return dd;
+}
+
+/**
+ * @bug 4071197
+ */
+void CalendarRegressionTest::test4071197()
+{
+ dowTest(FALSE);
+ dowTest(TRUE);
+}
+
+void CalendarRegressionTest::dowTest(UBool lenient)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal = new GregorianCalendar(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ cal->set(1997, UCAL_AUGUST, 12); // Wednesday
+ // cal.getTime(); // Force update
+ cal->setLenient(lenient);
+ cal->set(1996, UCAL_DECEMBER, 1); // Set the date to be December 1, 1996
+ int32_t dow = cal->get(UCAL_DAY_OF_WEEK, status);
+ int32_t min = cal->getMinimum(UCAL_DAY_OF_WEEK);
+ int32_t max = cal->getMaximum(UCAL_DAY_OF_WEEK);
+ //logln(cal.getTime().toString());
+ if (min != UCAL_SUNDAY || max != UCAL_SATURDAY)
+ errln("FAIL: Min/max bad");
+ if (dow < min || dow > max)
+ errln("FAIL: Day of week %d out of range [%d,%d]\n", dow, min, max);
+ if (dow != UCAL_SUNDAY)
+ errln("FAIL: Day of week should be SUNDAY Got " + dow);
+
+ if(U_FAILURE(status)) {
+ errln("Error checking Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+
+ if(cal->getActualMinimum(UCAL_DAY_OF_WEEK, status) != min) {
+ errln("FAIL: actual minimum differs from minimum");
+ }
+ if(cal->getActualMinimum(Calendar::DAY_OF_WEEK, status) != min) {
+ errln("FAIL: actual minimum (Calendar::DAY_OF_WEEK, status) differs from minimum");
+ }
+ if(cal->getActualMinimum(Calendar::DAY_OF_WEEK) != min) {
+ errln("FAIL: actual minimum (Calendar::DAY_OF_WEEK) differs from minimum");
+ }
+ if(((Calendar*)cal)->getActualMinimum(UCAL_DAY_OF_WEEK, status) != min) {
+ errln("FAIL: actual minimum (UCAL_DAY_OF_WEEK, status) differs from minimum");
+ }
+// NOTE: This function does not exist! jitterbug #3016
+// if(((Calendar*)cal)->getActualMinimum(Calendar::DAY_OF_WEEK, status) != min) {
+// errln("FAIL: actual minimum (Calendar::DAY_OF_WEEK, status) differs from minimum");
+// }
+ if(U_FAILURE(status)) {
+ errln("Error getting actual minimum: %s", u_errorName(status));
+ return;
+ }
+
+ delete cal;
+}
+
+/**
+ * @bug 4071385
+ */
+void CalendarRegressionTest::test4071385()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ cal->setTime(makeDate(1998, UCAL_JUNE, 24),status);
+ cal->set(UCAL_MONTH, UCAL_NOVEMBER); // change a field
+ //logln(cal.getTime().toString());
+ if (cal->getTime(status) != makeDate(1998, UCAL_NOVEMBER, 24))
+ errln("Fail");
+
+ delete cal;
+}
+
+/**
+ * @bug 4073929
+ */
+void CalendarRegressionTest::test4073929()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *foo1 = new GregorianCalendar(1997, 8, 27,status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete foo1;
+ return;
+ }
+ logln("foo1@%.0f - %d-%d-%d %d:%d:%d.%ds\n", foo1->getTime(status),
+ foo1->get(UCAL_YEAR, status),
+ foo1->get(UCAL_MONTH, status),
+ foo1->get(UCAL_DATE, status),
+ foo1->get(UCAL_HOUR, status),
+ foo1->get(UCAL_MINUTE, status),
+ foo1->get(UCAL_SECOND, status),
+ foo1->get(UCAL_MILLISECOND,status));
+ foo1->add(UCAL_DATE, + 1, status);
+ logln("foo1@%.0f - %d-%d-%d %d:%d:%d.%ds after +\n", foo1->getTime(status),
+ foo1->get(UCAL_YEAR, status),
+ foo1->get(UCAL_MONTH, status),
+ foo1->get(UCAL_DATE, status),
+ foo1->get(UCAL_HOUR, status),
+ foo1->get(UCAL_MINUTE, status),
+ foo1->get(UCAL_SECOND, status),
+ foo1->get(UCAL_MILLISECOND ,status));
+ foo1->add(UCAL_DATE, - 1, status);
+ logln("foo1@%.0f - %d-%d-%d %d:%d:%d.%ds after -\n", foo1->getTime(status),
+ foo1->get(UCAL_YEAR, status),
+ foo1->get(UCAL_MONTH, status),
+ foo1->get(UCAL_DATE, status),
+ foo1->get(UCAL_HOUR, status),
+ foo1->get(UCAL_MINUTE, status),
+ foo1->get(UCAL_SECOND, status),
+ foo1->get(UCAL_MILLISECOND, status));
+
+ foo1->add(UCAL_DATE, + 1, status);
+ int32_t testyear = foo1->get(UCAL_YEAR, status);
+ int32_t testmonth = foo1->get(UCAL_MONTH, status);
+ int32_t testday = foo1->get(UCAL_DATE, status);
+ if (testyear != 1997 ||
+ testmonth != 8 ||
+ testday != 28)
+ errln("Fail: Calendar not initialized");
+
+ delete foo1;
+}
+
+/**
+ * @bug 4083167
+ */
+void CalendarRegressionTest::test4083167()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone *saveZone = TimeZone::createDefault();
+ //try {
+ TimeZone *newZone = TimeZone::createTimeZone("UTC");
+ TimeZone::setDefault(*newZone);
+ UDate firstDate = Calendar::getNow();
+ Calendar *cal = new GregorianCalendar(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ cal->setTime(firstDate,status);
+ int32_t hr = cal->get(UCAL_HOUR_OF_DAY, status);
+ int32_t min = cal->get(UCAL_MINUTE, status);
+ int32_t sec = cal->get(UCAL_SECOND, status);
+ int32_t msec = cal->get(UCAL_MILLISECOND, status);
+ double firstMillisInDay = hr * 3600000 + min * 60000 + sec * 1000 + msec;
+
+ //logln("Current time: " + firstDate.toString());
+
+ for (int32_t validity=0; validity<30; validity++) {
+ UDate lastDate = firstDate + validity*1000*24*60*60.0;
+ cal->setTime(lastDate, status);
+ hr = cal->get(UCAL_HOUR_OF_DAY, status);
+ min = cal->get(UCAL_MINUTE, status);
+ sec = cal->get(UCAL_SECOND, status);
+ msec = cal->get(UCAL_MILLISECOND, status);
+ double millisInDay = hr * 3600000.0 + min * 60000.0 + sec * 1000.0 + msec;
+ if (firstMillisInDay != millisInDay)
+ errln(UnicodeString("Day has shifted ") + lastDate);
+ }
+ //}
+ //finally {
+ TimeZone::setDefault(*saveZone);
+ //}
+
+ delete saveZone;
+ delete newZone;
+ delete cal;
+}
+
+/**
+ * @bug 4086724
+ */
+void CalendarRegressionTest::test4086724()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *date;
+ TimeZone *saveZone = TimeZone::createDefault();
+ Locale saveLocale = Locale::getDefault();
+ //try {
+ Locale::setDefault(Locale::getUK(),status);
+ TimeZone *newZone = TimeZone::createTimeZone("GMT");
+ TimeZone::setDefault(*newZone);
+ date = new SimpleDateFormat(UnicodeString("dd MMM yyy (zzzz) 'is in week' ww"),status);
+ Calendar *cal = Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating Calendar: %s", u_errorName(status));
+ delete cal;
+ delete newZone;
+ delete date;
+ return;
+ }
+ cal->set(1997,UCAL_SEPTEMBER,30);
+ UDate now = cal->getTime(status);
+ UnicodeString temp;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ logln(date->format(now, temp, pos));
+ cal->set(1997,UCAL_JANUARY,1);
+ now=cal->getTime(status);
+ logln(date->format(now,temp, pos));
+ cal->set(1997,UCAL_JANUARY,8);
+ now=cal->getTime(status);
+ logln(date->format(now,temp, pos));
+ cal->set(1996,UCAL_DECEMBER,31);
+ now=cal->getTime(status);
+ logln(date->format(now,temp, pos));
+ //}
+ //finally {
+ Locale::setDefault(saveLocale,status);
+ TimeZone::setDefault(*saveZone);
+ //}
+ logln("*** THE RESULTS OF THIS TEST MUST BE VERIFIED MANUALLY ***");
+
+delete newZone;
+delete cal;
+delete date;
+delete saveZone;
+}
+
+/**
+ * @bug 4092362
+ */
+void CalendarRegressionTest::test4092362() {
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal1 = new GregorianCalendar(1997, 10, 11, 10, 20, 40,status);
+ /*cal1.set( Calendar::YEAR, 1997 );
+ cal1.set( Calendar::MONTH, 10 );
+ cal1.set( Calendar::DATE, 11 );
+ cal1.set( Calendar::HOUR, 10 );
+ cal1.set( Calendar::MINUTE, 20 );
+ cal1.set( Calendar::SECOND, 40 ); */
+
+ logln( UnicodeString(" Cal1 = ") + cal1->getTime(status) );
+ logln( UnicodeString(" Cal1 time in ms = ") + cal1->get(UCAL_MILLISECOND,status) );
+ for( int32_t k = 0; k < 100 ; k++ );
+
+ GregorianCalendar *cal2 = new GregorianCalendar(1997, 10, 11, 10, 20, 40,status);
+ /*cal2.set( Calendar::YEAR, 1997 );
+ cal2.set( Calendar::MONTH, 10 );
+ cal2.set( Calendar::DATE, 11 );
+ cal2.set( Calendar::HOUR, 10 );
+ cal2.set( Calendar::MINUTE, 20 );
+ cal2.set( Calendar::SECOND, 40 ); */
+
+ logln( UnicodeString(" Cal2 = ") + cal2->getTime(status) );
+ logln( UnicodeString(" Cal2 time in ms = ") + cal2->get(UCAL_MILLISECOND,status) );
+ if( *cal1 != *cal2 )
+ errln("Fail: Milliseconds randomized");
+
+ delete cal1;
+ delete cal2;
+}
+
+/**
+ * @bug 4095407
+ */
+void CalendarRegressionTest::test4095407()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *a = new GregorianCalendar(1997,UCAL_NOVEMBER, 13,status);
+ int32_t dow = a->get(UCAL_DAY_OF_WEEK, status);
+ if (dow != UCAL_THURSDAY)
+ errln("Fail: Want THURSDAY Got " + dow);
+
+ delete a;
+}
+
+/**
+ * @bug 4096231
+ */
+void CalendarRegressionTest::test4096231()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone *GMT = TimeZone::createTimeZone("GMT");
+ TimeZone *PST = TimeZone::createTimeZone("PST");
+ int32_t sec = 0, min = 0, hr = 0, day = 1, month = 10, year = 1997;
+
+ Calendar *cal1 = new GregorianCalendar(*PST,status);
+ cal1->setTime(880698639000.0,status);
+ // Issue 1: Changing the timezone doesn't change the
+ // represented time. The old API, pre 1.2.2a requires
+ // setTime to be called in order to update the time fields after the time
+ // zone has been set.
+ int32_t h1,h2;
+ logln(UnicodeString("PST 1 is: ") + (h1=cal1->get(UCAL_HOUR_OF_DAY, status)));
+ cal1->setTimeZone(*GMT);
+ logln(UnicodeString("GMT 2 is: ") + (h2=cal1->get(UCAL_HOUR_OF_DAY, status)));
+ if ((*GMT != *PST) && (h1 == h2))
+ errln("Fail: Hour same in different zones");
+
+ Calendar *cal2 = new GregorianCalendar(*GMT,status);
+ Calendar *cal3 = new GregorianCalendar(*PST,status);
+
+ cal2->set(cal1->get(UCAL_YEAR,status),
+ cal1->get(UCAL_MONTH,status),
+ cal1->get(UCAL_DATE,status),
+ cal1->get(UCAL_HOUR_OF_DAY,status),
+ cal1->get(UCAL_MINUTE,status),
+ cal1->get(UCAL_SECOND,status));
+
+ double t1,t2,t3,t4;
+ logln(UnicodeString("RGMT 1 is: ") + (t1=cal2->getTime(status)));
+ cal3->set(year, month, day, hr, min, sec);
+ logln(UnicodeString("RPST 1 is: ") + (t2=cal3->getTime(status)));
+ cal3->setTimeZone(*GMT);
+ logln(UnicodeString("RGMT 2 is: ") + (t3=cal3->getTime(status)));
+ cal3->set(cal1->get(UCAL_YEAR,status),
+ cal1->get(UCAL_MONTH,status),
+ cal1->get(UCAL_DATE,status),
+ cal1->get(UCAL_HOUR_OF_DAY,status),
+ cal1->get(UCAL_MINUTE,status),
+ cal1->get(UCAL_SECOND,status));
+ // Issue 2: Calendar continues to use the timezone in its
+ // constructor for set() conversions, regardless
+ // of calls to setTimeZone()
+ logln(UnicodeString("RGMT 3 is: ") + (t4=cal3->getTime(status)));
+ if (t1 == t2 ||
+ t1 != t4 ||
+ t2 != t3)
+ errln("Fail: Calendar zone behavior faulty");
+
+ delete cal1;
+ delete cal2;
+ delete cal3;
+ delete GMT;
+ delete PST;
+}
+
+/**
+ * @bug 4096539
+ */
+void CalendarRegressionTest::test4096539()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t y [] = {31,28,31,30,31,30,31,31,30,31,30,31};
+
+ for (int32_t x=0;x<12;x++) {
+ GregorianCalendar *gc = new
+ GregorianCalendar(1997,x,y[x], status);
+ int32_t m1,m2;
+ log(UnicodeString("") + (m1=gc->get(UCAL_MONTH,status)+1)+UnicodeString("/")+
+ gc->get(UCAL_DATE,status)+"/"+gc->get(UCAL_YEAR,status)+
+ " + 1mo = ");
+
+ gc->add(UCAL_MONTH, 1,status);
+ logln(UnicodeString("") + (m2=gc->get(UCAL_MONTH,status)+1)+UnicodeString("/")+
+ gc->get(UCAL_DATE,status)+"/"+gc->get(UCAL_YEAR,status)
+ );
+ int32_t m = (m1 % 12) + 1;
+ if (m2 != m)
+ errln(UnicodeString("Fail: Want ") + m + " Got " + m2);
+ delete gc;
+ }
+
+}
+
+/**
+ * @bug 4100311
+ */
+void CalendarRegressionTest::test41003112()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal = (GregorianCalendar*)Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar: %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ cal->set(UCAL_YEAR, 1997);
+ cal->set(UCAL_DAY_OF_YEAR, 1);
+ //UDate d = cal->getTime(status); // Should be Jan 1
+ //logln(d.toString());
+ if (cal->get(UCAL_DAY_OF_YEAR, status) != 1)
+ errln("Fail: DAY_OF_YEAR not set");
+ delete cal;
+}
+
+/**
+ * @bug 4103271
+ */
+void CalendarRegressionTest::test4103271()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat sdf(status);
+ int32_t numYears=40, startYear=1997, numDays=15;
+ UnicodeString output, testDesc, str, str2;
+ GregorianCalendar *testCal = (GregorianCalendar*)Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar: %s", u_errorName(status));
+ delete testCal;
+ return;
+ }
+ testCal->clear();
+ sdf.adoptCalendar(testCal);
+ sdf.applyPattern("EEE dd MMM yyyy 'WOY'ww'-'YYYY 'DOY'DDD");
+ UBool fail = FALSE;
+ for (int32_t firstDay=1; firstDay<=2; firstDay++) {
+ for (int32_t minDays=1; minDays<=7; minDays++) {
+ testCal->setMinimalDaysInFirstWeek((uint8_t)minDays);
+ testCal->setFirstDayOfWeek((UCalendarDaysOfWeek)firstDay);
+ testDesc = (UnicodeString("Test") + firstDay + minDays);
+ logln(testDesc + " => 1st day of week=" +
+ firstDay +
+ ", minimum days in first week=" +
+ minDays);
+ for (int32_t j=startYear; j<=startYear+numYears; j++) {
+ testCal->set(j,11,25);
+ for(int32_t i=0; i<numDays; i++) {
+ testCal->add(UCAL_DATE,1,status);
+ UnicodeString calWOY;
+ int32_t actWOY = testCal->get(UCAL_WEEK_OF_YEAR,status);
+ if (actWOY < 1 || actWOY > 53) {
+ UDate d = testCal->getTime(status);
+ //calWOY = String.valueOf(actWOY);
+ UnicodeString temp;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ output = testDesc + " - " + sdf.format(d,temp,pos) + "\t";
+ output = output + "\t" + actWOY;
+ logln(output);
+ fail = TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ int32_t DATA [] = {
+ 3, 52, 52, 52, 52, 52, 52, 52,
+ 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2,
+ 4, 52, 52, 52, 52, 52, 52, 52,
+ 53, 53, 53, 53, 53, 53, 53,
+ 1, 1, 1, 1, 1, 1, 1,
+ };
+ testCal->setFirstDayOfWeek(UCAL_SUNDAY);
+ for (int32_t j=0; j<44; j+=22) {
+ logln(UnicodeString("Minimal days in first week = ") + DATA[j] +
+ " Week starts on Sunday");
+ testCal->setMinimalDaysInFirstWeek((uint8_t)DATA[j]);
+ testCal->set(1997, UCAL_DECEMBER, 21);
+ for (int32_t i=0; i<21; ++i) {
+ int32_t woy = testCal->get(UCAL_WEEK_OF_YEAR,status);
+ str.remove();
+ log(UnicodeString("") + sdf.format(testCal->getTime(status), str) +
+ UnicodeString(" ") + woy);
+ if (woy != DATA[j + 1 + i]) {
+ log(" ERROR");
+ fail = TRUE;
+ }
+ logln("");
+
+ // Now compute the time from the fields, and make sure we
+ // get the same answer back. This is a round-trip test.
+ UDate save = testCal->getTime(status);
+ testCal->clear();
+ testCal->set(UCAL_YEAR_WOY, DATA[j+1+i] < 25 ? 1998 : 1997);
+ testCal->set(UCAL_WEEK_OF_YEAR, DATA[j+1+i]);
+ testCal->set(UCAL_DAY_OF_WEEK, (i%7) + UCAL_SUNDAY);
+ if (testCal->getTime(status) != save) {
+ str.remove();
+ logln(UnicodeString(" Parse failed: ") +
+ sdf.format(testCal->getTime(status), str));
+ fail= TRUE;
+ }
+
+ testCal->setTime(save,status);
+ testCal->add(UCAL_DATE, 1,status);
+ }
+ }
+ // Test field disambiguation with a few special hard-coded cases.
+ // This shouldn't fail if the above cases aren't failing.
+ int32_t DISAM_int [] = {
+ // y y_woy woy dow
+ 1997, 1998, 1, UCAL_SUNDAY,
+ (1998), (1998), (2), (UCAL_SATURDAY),
+ (1998), (1998), (53), (UCAL_THURSDAY),
+ (1999), (1998), (53), (UCAL_FRIDAY)
+ };
+
+ UDate DISAM_date [] = {
+ makeDate(1997, UCAL_DECEMBER, 28),
+ makeDate(1998, UCAL_JANUARY, 10),
+ makeDate(1998, UCAL_DECEMBER, 31),
+ makeDate(1999, UCAL_JANUARY, 1)
+ };
+
+ testCal->setMinimalDaysInFirstWeek(3);
+ testCal->setFirstDayOfWeek(UCAL_SUNDAY);
+ int32_t i = 0;
+
+ /* Enable this code to display various WOY values
+ testCal->clear();
+ for (i=25; i<38; ++i) {
+ testCal->set(1996, Calendar::DECEMBER, i);
+ UDate got = testCal->getTime(status);
+ str.remove();
+ logln(UnicodeString("") + sdf.format(got, str));
+ }
+ for (i=25; i<38; ++i) {
+ testCal->set(1997, Calendar::DECEMBER, i);
+ UDate got = testCal->getTime(status);
+ str.remove();
+ logln(UnicodeString("") + sdf.format(got, str));
+ }
+ for (i=25; i<38; ++i) {
+ testCal->set(1998, UCAL_DECEMBER, i);
+ UDate got = testCal->getTime(status);
+ str.remove();
+ logln(UnicodeString("") + sdf.format(got, str));
+ }
+ */
+
+ for (i=0; i < 16; i += 4) {
+ int32_t y = DISAM_int[i];
+ int32_t ywoy = DISAM_int[i+1];
+ int32_t woy = DISAM_int[i+2];
+ int32_t dow = DISAM_int[i+3];
+ UDate exp = DISAM_date[i/4];
+ testCal->clear();
+ testCal->set(UCAL_YEAR, y);
+ testCal->set(UCAL_WEEK_OF_YEAR, woy);
+ testCal->set(UCAL_DAY_OF_WEEK, dow);
+ UDate got = testCal->getTime(status);
+ str.remove();
+ str2.remove();
+ log(UnicodeString("Y") + y + "-W" + woy +
+ "-DOW" + dow + " expect:" + sdf.format(exp, str) +
+ " got:" + sdf.format(got, str2));
+ if (got != exp) {
+ log(" FAIL (%s:%d, i=%d)", __FILE__, __LINE__, i);
+ logln(CalendarTest::calToStr(*testCal));
+ testCal->setTime(exp, status);
+ logln(CalendarTest::calToStr(*testCal) + UnicodeString( " <<< expected "));
+ fail = TRUE;
+ }
+ logln("");
+
+ testCal->clear();
+ testCal->set(UCAL_YEAR_WOY, ywoy);
+ testCal->set(UCAL_WEEK_OF_YEAR, woy);
+ testCal->set(UCAL_DAY_OF_WEEK, dow);
+ got = testCal->getTime(status);
+ str.remove();
+ str2.remove();
+ log(UnicodeString("YWOY") + ywoy + "-W" + woy +
+ "-DOW" + dow + " expect:" + sdf.format(exp, str) +
+ " got:" + sdf.format(got, str2));
+ if (got != exp) {
+ log(" FAIL");
+ fail = TRUE;
+ }
+ logln("");
+ }
+ // Now try adding and rolling
+ UDate ADDROLL_date [] = {
+ makeDate(1998, UCAL_DECEMBER, 25), makeDate(1999, UCAL_JANUARY, 1),
+ makeDate(1997, UCAL_DECEMBER, 28), makeDate(1998, UCAL_JANUARY, 4),
+ makeDate(1998, UCAL_DECEMBER, 27), makeDate(1997, UCAL_DECEMBER, 28),
+ makeDate(1999, UCAL_JANUARY, 2), makeDate(1998, UCAL_JANUARY, 3),
+ };
+
+ int32_t ADDROLL_int []= {
+ (1),
+ (1),
+ (1),
+ (1)
+ };
+
+
+ UBool ADDROLL_bool [] = {
+ TRUE,//ADD,
+ TRUE,
+ FALSE,
+ FALSE
+ };
+
+ testCal->setMinimalDaysInFirstWeek(3);
+ testCal->setFirstDayOfWeek(UCAL_SUNDAY);
+ for (i=0; i<8; i += 2) {
+ int32_t amount = ADDROLL_int[i/2];
+ UDate before = ADDROLL_date[i];
+ UDate after = ADDROLL_date[i+1];
+
+ testCal->setTime(before,status);
+ if (ADDROLL_bool[i/2])
+ testCal->add(UCAL_WEEK_OF_YEAR, amount,status);
+ else
+ testCal->roll(UCAL_WEEK_OF_YEAR, amount,status);
+ UDate got = testCal->getTime(status);
+ str.remove();
+ str2.remove();
+ UnicodeString opTypeStr;
+ if (ADDROLL_bool[i/2]) {
+ opTypeStr = UnicodeString("add(WOY,", "");
+ } else {
+ opTypeStr = UnicodeString("roll(WOY,", "");
+ }
+ log(opTypeStr + amount + ") " + sdf.format(before, str) + " => " +
+ sdf.format(got, str2));
+ if (after != got) {
+ str.remove();
+ logln(UnicodeString(" exp:") + sdf.format(after, str) + " FAIL");
+ fail = TRUE;
+ }
+ else logln(" ok");
+
+ testCal->setTime(after,status);
+ if (ADDROLL_bool[i/2])
+ testCal->add(UCAL_WEEK_OF_YEAR, -amount,status);
+ else
+ testCal->roll(UCAL_WEEK_OF_YEAR, -amount,status);
+ got = testCal->getTime(status);
+ str.remove();
+ str2.remove();
+ log(opTypeStr + (-amount) + ") " + sdf.format(after, str) + " => " +
+ sdf.format(got, str2));
+ if (before != got) {
+ str.remove();
+ logln(UnicodeString(" exp:") + sdf.format(before, str) + " FAIL");
+ fail = TRUE;
+ }
+ else logln(" ok");
+ }
+ if (fail)
+ errln("Fail: Week of year misbehaving");
+}
+
+/**
+ * @bug 4106136
+ */
+void CalendarRegressionTest::test4106136()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Locale saveLocale = Locale::getDefault();
+ //try {
+ Locale locales [] = { Locale::getChinese(), Locale::getChina() };
+ for (int32_t i=0; i<2; ++i) {
+ Locale::setDefault(locales[i], status);
+ failure(status, "Locale::setDefault");
+ int32_t count1, count2, count3;
+ Calendar::getAvailableLocales(count1);
+ DateFormat::getAvailableLocales(count2);
+ NumberFormat::getAvailableLocales(count3);
+ int32_t n [] = {
+ count1, count2, count3
+ };
+ for (int32_t j=0; j<3; ++j) {
+ UnicodeString temp;
+ if (n[j] == 0)
+ errln(UnicodeString("Fail: No locales for ") + locales[i].getName());
+ }
+ }
+ //}
+ //finally {
+ Locale::setDefault(saveLocale,status);
+ //}
+}
+
+/**
+ * @bug 4108764
+ */
+void CalendarRegressionTest::test4108764()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ UDate d00 = makeDate(1997, UCAL_MARCH, 15, 12, 00, 00);
+ UDate d01 = makeDate(1997, UCAL_MARCH, 15, 12, 00, 56);
+ UDate d10 = makeDate(1997, UCAL_MARCH, 15, 12, 34, 00);
+ UDate d11 = makeDate(1997, UCAL_MARCH, 15, 12, 34, 56);
+ UDate epoch = makeDate(1970, UCAL_JANUARY, 1);
+
+ cal->setTime(d11,status);
+
+ cal->clear( UCAL_MINUTE );
+ logln(UnicodeString("") + cal->getTime(status));
+ if (cal->getTime(status) != d01)
+ errln("Fail: clear(MINUTE) broken");
+
+ cal->set( UCAL_SECOND, 0 );
+ logln(UnicodeString("") + cal->getTime(status));
+ if (cal->getTime(status) != d00)
+ errln("Fail: set(SECOND, 0) broken");
+
+ cal->setTime(d11,status);
+ cal->set( UCAL_SECOND, 0 );
+ logln(UnicodeString("") + cal->getTime(status));
+ if (cal->getTime(status) != d10)
+ errln("Fail: set(SECOND, 0) broken #2");
+
+ cal->clear( UCAL_MINUTE );
+ logln(UnicodeString("") + cal->getTime(status));
+ if (cal->getTime(status) != d00)
+ errln("Fail: clear(MINUTE) broken #2");
+
+ cal->clear();
+ logln(UnicodeString("") + cal->getTime(status));
+ if (cal->getTime(status) != epoch)
+ errln(UnicodeString("Fail: clear() broken Want ") + epoch);
+
+ delete cal;
+}
+
+/**
+ * @bug 4114578
+ */
+void CalendarRegressionTest::test4114578()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t ONE_HOUR = 60*60*1000;
+ Calendar *cal = Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ cal->adoptTimeZone(TimeZone::createTimeZone("PST"));
+ UDate onset = makeDate(1998, UCAL_APRIL, 5, 1, 0) + ONE_HOUR;
+ UDate cease = makeDate(1998, UCAL_OCTOBER, 25, 0, 0) + 2*ONE_HOUR;
+
+ UBool fail = FALSE;
+
+ const int32_t ADD = 1;
+ const int32_t ROLL = 2;
+
+ double DATA []= {
+ // Start Action Amt Expected_change
+ onset - ONE_HOUR, ADD, 1, ONE_HOUR,
+ onset, ADD, -1, -ONE_HOUR,
+ onset - ONE_HOUR, ROLL, 1, ONE_HOUR,
+ onset, ROLL, -1, -ONE_HOUR,
+ cease - ONE_HOUR, ADD, 1, ONE_HOUR,
+ cease, ADD, -1, -ONE_HOUR,
+ cease - ONE_HOUR, ROLL, 1, ONE_HOUR,
+ cease, ROLL, -1, -ONE_HOUR,
+ };
+
+ for (int32_t i=0; i<32; i+=4) {
+ UDate date = DATA[i];
+ int32_t amt = (int32_t) DATA[i+2];
+ double expectedChange = DATA[i+3];
+
+ log(UnicodeString("") + date);
+ cal->setTime(date,status);
+
+ switch ((int32_t) DATA[i+1]) {
+ case ADD:
+ log(UnicodeString(" add (HOUR,") + (amt<0?"":"+")+amt + ")= ");
+ cal->add(UCAL_HOUR, amt,status);
+ break;
+ case ROLL:
+ log(UnicodeString(" roll(HOUR,") + (amt<0?"":"+")+amt + ")= ");
+ cal->roll(UCAL_HOUR, amt,status);
+ break;
+ }
+
+ log(UnicodeString("") + cal->getTime(status));
+
+ double change = cal->getTime(status) - date;
+ if (change != expectedChange) {
+ fail = TRUE;
+ logln(" FAIL");
+ }
+ else logln(" OK");
+ }
+
+ if (fail) errln("Fail: roll/add misbehaves around DST onset/cease");
+
+ delete cal;
+}
+
+/**
+ * @bug 4118384
+ * Make sure maximum for HOUR field is 11, not 12.
+ */
+void CalendarRegressionTest::test4118384()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ if (cal->getMaximum(UCAL_HOUR) != 11 ||
+ cal->getLeastMaximum(UCAL_HOUR) != 11 ||
+ cal->getActualMaximum(UCAL_HOUR,status) != 11)
+ errln("Fail: maximum of HOUR field should be 11");
+
+ // test deprecated functions
+ if (cal->getLeastMaximum(Calendar::HOUR) != 11 ||
+ cal->getMaximum(Calendar::HOUR) != 11) {
+ errln("Fail: [deprecated functions] maximum of HOUR field should be 11\n");
+ }
+
+ if (cal->getGreatestMinimum(Calendar::HOUR) != 0 ||
+ cal->getMinimum(Calendar::HOUR) != 0) {
+ errln("Fail: [deprecated functions] minimum of HOUR field should be 1\n");
+ }
+
+ delete cal;
+ cal = Calendar::createInstance(Locale("th_TH@calendar=buddhist"),status);
+ // test deprecated functions
+ if (cal->getLeastMaximum(Calendar::HOUR) != 11 ||
+ cal->getMaximum(Calendar::HOUR) != 11) {
+ errln("Fail: Buddhist:[deprecated functions] maximum of HOUR field should be 11\n");
+ }
+
+ if (cal->getGreatestMinimum(Calendar::HOUR) != 0 ||
+ cal->getMinimum(Calendar::HOUR) != 0) {
+ errln("Fail: Buddhist:[deprecated functions] minimum of HOUR field should be 1\n");
+ }
+
+ delete cal;
+ // test deprecated functions
+ cal = Calendar::createInstance(Locale("ja_JP@calendar=japanese"),status);
+ if (cal->getLeastMaximum(Calendar::HOUR) != 11 ||
+ cal->getMaximum(Calendar::HOUR) != 11) {
+ errln("Fail: Japanese:[deprecated functions] maximum of HOUR field should be 11\n");
+ }
+
+ if (cal->getGreatestMinimum(Calendar::HOUR) != 0 ||
+ cal->getMinimum(Calendar::HOUR) != 0) {
+ errln("Fail: Japanese:[deprecated functions] minimum of HOUR field should be 1\n");
+ }
+
+ delete cal;
+}
+
+/**
+ * @bug 4125881
+ * Check isLeapYear for BC years.
+ */
+void CalendarRegressionTest::test4125881()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal = (GregorianCalendar*) Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ DateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"),status);
+ if(!assertSuccess("trying to construct", status))return;
+ cal->clear();
+ for (int32_t y=-20; y<=10; ++y) {
+ cal->set(UCAL_ERA, y < 1 ? GregorianCalendar::BC : GregorianCalendar::AD);
+ cal->set(UCAL_YEAR, y < 1 ? 1 - y : y);
+ UnicodeString temp;
+ logln(UnicodeString("") + y + UnicodeString(" = ") + fmt->format(cal->getTime(status), temp) + " " +
+ cal->isLeapYear(y));
+ if (cal->isLeapYear(y) != ((y+40)%4 == 0))
+ errln("Leap years broken");
+ }
+
+ delete cal;
+ delete fmt;
+}
+
+/**
+ * @bug 4125892
+ * Prove that GregorianCalendar is proleptic (it used to cut off
+ * at 45 BC, and not have leap years before then).
+ */
+void CalendarRegressionTest::test4125892() {
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal = (GregorianCalendar*) Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ DateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"),status);
+ if(!assertSuccess("trying to construct", status))return;
+ cal->clear();
+ cal->set(UCAL_ERA, GregorianCalendar::BC);
+ cal->set(UCAL_YEAR, 81); // 81 BC is a leap year (proleptically)
+ cal->set(UCAL_MONTH, UCAL_FEBRUARY);
+ cal->set(UCAL_DATE, 28);
+ cal->add(UCAL_DATE, 1,status);
+ if(U_FAILURE(status))
+ errln("add(DATE,1) failed");
+ if (cal->get(UCAL_DATE,status) != 29 ||
+ !cal->isLeapYear(-80)) // -80 == 81 BC
+ errln("Calendar not proleptic");
+
+ delete cal;
+ delete fmt;
+}
+
+/**
+ * @bug 4141665
+ * GregorianCalendar::equals() ignores cutover date
+ */
+void CalendarRegressionTest::test4141665()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *cal = new GregorianCalendar(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ GregorianCalendar *cal2 = (GregorianCalendar*)cal->clone();
+ UDate cut = cal->getGregorianChange();
+ UDate cut2 = cut + 100*24*60*60*1000.0; // 100 days later
+ if (*cal != *cal2) {
+ errln("Cloned GregorianCalendars not equal");
+ }
+ cal2->setGregorianChange(cut2,status);
+ if ( *cal == *cal2) {
+ errln("GregorianCalendar::equals() ignores cutover");
+ }
+
+ delete cal;
+ delete cal2;
+}
+
+/**
+ * @bug 4142933
+ * Bug states that ArrayIndexOutOfBoundsException is thrown by GregorianCalendar::roll()
+ * when IllegalArgumentException should be.
+ */
+void CalendarRegressionTest::test4142933()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *calendar = new GregorianCalendar(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete calendar;
+ return;
+ }
+ //try {
+ calendar->roll((UCalendarDateFields)-1, TRUE, status);
+ if(U_SUCCESS(status))
+ errln("Test failed, no exception thrown");
+ //}
+ //catch (IllegalArgumentException e) {
+ // OK: Do nothing
+ // logln("Test passed");
+ //}
+ //catch (Exception e) {
+ //errln("Test failed. Unexpected exception is thrown: " + e);
+ //e.printStackTrace();
+ //}
+
+ delete calendar;
+}
+
+/**
+ * @bug 4145158
+ * GregorianCalendar handling of Dates Long.MIN_VALUE and Long.MAX_VALUE is
+ * confusing; unless the time zone has a raw offset of zero, one or the
+ * other of these will wrap. We've modified the test given in the bug
+ * report to therefore only check the behavior of a calendar with a zero raw
+ * offset zone.
+ */
+void CalendarRegressionTest::test4145158()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *calendar = new GregorianCalendar(status);
+ if(status == U_USING_FALLBACK_WARNING || U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete calendar;
+ return;
+ }
+
+ calendar->adoptTimeZone(TimeZone::createTimeZone("GMT"));
+
+ calendar->setTime(makeDate(INT32_MIN),status);
+ int32_t year1 = calendar->get(UCAL_YEAR,status);
+ int32_t era1 = calendar->get(UCAL_ERA,status);
+
+ calendar->setTime(makeDate(INT32_MAX),status);
+ int32_t year2 = calendar->get(UCAL_YEAR,status);
+ int32_t era2 = calendar->get(UCAL_ERA,status);
+
+ if (year1 == year2 && era1 == era2) {
+ errln("Fail: Long.MIN_VALUE or Long.MAX_VALUE wrapping around");
+ }
+
+ delete calendar;
+}
+
+/**
+ * @bug 4145983
+ * Maximum value for YEAR field wrong.
+ */
+// {sfb} this is not directly applicable in C++, since all
+// possible doubles are not representable by our Calendar.
+// In Java, all longs are representable.
+// We can determine limits programmatically
+// Using DBL_MAX is a bit of a hack, since for large doubles
+// Calendar gets squirrely and doesn't behave in any sort
+// of linear fashion (ie years jump around, up/down, etc) for a
+// small change in millis.
+void CalendarRegressionTest::test4145983()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *calendar = new GregorianCalendar(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete calendar;
+ return;
+ }
+ calendar->adoptTimeZone(TimeZone::createTimeZone("GMT"));
+ UDate DATES [] = { LATEST_SUPPORTED_MILLIS, EARLIEST_SUPPORTED_MILLIS };
+ for (int32_t i=0; i<2; ++i) {
+ calendar->setTime(DATES[i], status);
+ int32_t year = calendar->get(UCAL_YEAR,status);
+ int32_t maxYear = calendar->getMaximum(UCAL_YEAR);
+ if (year > maxYear) {
+ errln(UnicodeString("Failed for ")+DATES[i]+" ms: year=" +
+ year + ", maxYear=" + maxYear);
+ }
+ }
+
+ delete calendar;
+}
+
+/**
+ * @bug 4147269
+ * This is a bug in the validation code of GregorianCalendar:: As reported,
+ * the bug seems worse than it really is, due to a bug in the way the bug
+ * report test was written. In reality the bug is restricted to the DAY_OF_YEAR
+ * field. - liu 6/29/98
+ */
+void CalendarRegressionTest::test4147269()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *calendar = new GregorianCalendar(status);
+ if(status == U_USING_FALLBACK_WARNING || U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete calendar;
+ return;
+ }
+ calendar->setLenient(FALSE);
+ UDate date = makeDate(1996, UCAL_JANUARY, 3); // Arbitrary date
+ for (int32_t field = 0; field < UCAL_FIELD_COUNT; field++) {
+ calendar->setTime(date,status);
+ // Note: In the bug report, getActualMaximum() was called instead
+ // of getMaximum() -- this was an error. The validation code doesn't
+ // use getActualMaximum(), since that's too costly.
+ int32_t max = calendar->getMaximum((UCalendarDateFields)field);
+ int32_t value = max+1;
+ calendar->set((UCalendarDateFields)field, value);
+ //try {
+ calendar->getTime(status); // Force time computation
+ // We expect an exception to be thrown. If we fall through
+ // to the next line, then we have a bug.
+ if(U_SUCCESS(status))
+ errln(UnicodeString("Test failed with field ") + FIELD_NAME[field] +
+ ", date before: " + date +
+ ", date after: " + calendar->getTime(status) +
+ ", value: " + value + " (max = " + max +")");
+ //} catch (IllegalArgumentException e) {}
+ }
+
+ delete calendar;
+}
+
+/**
+ * @bug 4149677
+ * Reported bug is that a GregorianCalendar with a cutover of Date(Long.MAX_VALUE)
+ * doesn't behave as a pure Julian calendar.
+ * CANNOT REPRODUCE THIS BUG
+ */
+void
+CalendarRegressionTest::Test4149677()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ TimeZone *zones [] = {
+ TimeZone::createTimeZone("GMT"),
+ TimeZone::createTimeZone("PST"),
+ TimeZone::createTimeZone("EAT")
+ };
+ if(U_FAILURE(status)) {
+ errln("Couldn't create zones");
+ return;
+ // could leak memory
+ }
+
+ for (int32_t i=0; i < 3; ++i) {
+ GregorianCalendar *calendar = new GregorianCalendar(zones[i], status);
+ if(U_FAILURE(status)) {
+ errln("Couldnt' create calendar.");
+ return;
+ }
+
+ // Make sure extreme values don't wrap around
+ calendar->setTime(EARLIEST_SUPPORTED_MILLIS, status);
+ if(U_FAILURE(status))
+ errln("setTime failed");
+ if (calendar->get(UCAL_ERA, status) != GregorianCalendar::BC || U_FAILURE(status)) {
+ errln("Fail: Date(EARLIEST_SUPPORTED_MILLIS) has an AD year");
+ }
+ calendar->setTime(LATEST_SUPPORTED_MILLIS, status);
+ if(U_FAILURE(status))
+ errln("setTime failed");
+ if (calendar->get(UCAL_ERA, status) != GregorianCalendar::AD || U_FAILURE(status)) {
+ errln("Fail: Date(LATEST_SUPPORTED_MILLIS) has a BC year");
+ }
+
+ calendar->setGregorianChange(LATEST_SUPPORTED_MILLIS, status);
+ if(U_FAILURE(status))
+ errln("setGregorianChange failed");
+ // to obtain a pure Julian calendar
+
+ UBool is100Leap = calendar->isLeapYear(100);
+ if (!is100Leap) {
+ UnicodeString temp;
+ errln("test failed with zone " + zones[i]->getID(temp));
+ errln(" cutover date is Date(Long.MAX_VALUE)");
+ errln(" isLeapYear(100) returns: " + is100Leap);
+ }
+ delete calendar;
+ }
+
+ // no need for cleanup- zones were adopted
+}
+
+/**
+ * @bug 4162587
+ * Calendar and Date HOUR broken. If HOUR is out-of-range, Calendar
+ * and Date classes will misbehave.
+ */
+void
+CalendarRegressionTest::Test4162587()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone *savedef = TimeZone::createDefault();
+ TimeZone *tz = TimeZone::createTimeZone("PST");
+ //TimeZone::adoptDefault(tz);
+ TimeZone::setDefault(*tz);
+
+ GregorianCalendar *cal = new GregorianCalendar(tz, status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create calendar");
+ return;
+ }
+ UDate d0, dPlus, dMinus;
+
+ for(int32_t i=0; i<5; ++i) {
+ if (i>0) logln("---");
+
+ cal->clear();
+ cal->set(1998, UCAL_APRIL, 5, i, 0);
+ d0 = cal->getTime(status);
+ if(U_FAILURE(status))
+ errln("Coudln't get time (1)");
+ //String s0 = d.toString();
+ logln(UnicodeString("0 ") + i + ": " + d0/*s0*/);
+
+ cal->clear();
+ cal->set(1998, UCAL_APRIL, 4, i+24, 0);
+ dPlus = cal->getTime(status);
+ if(U_FAILURE(status))
+ errln("Coudln't get time (2)");
+ //String sPlus = d.toString();
+ logln(UnicodeString("+ ") + i + ": " + dPlus/*sPlus*/);
+
+ cal->clear();
+ cal->set(1998, UCAL_APRIL, 6, i-24, 0);
+ dMinus = cal->getTime(status);
+ if(U_FAILURE(status))
+ errln("Coudln't get time (3)");
+ //String sMinus = d.toString();
+ logln(UnicodeString("- ") + i + ": " + dMinus/*sMinus*/);
+
+ if (d0 != dPlus || d0 != dMinus) {
+ errln("Fail: All three lines must match");
+ }
+ }
+ TimeZone::setDefault(*savedef);
+ //delete tz;
+ delete cal;
+ delete savedef;
+}
+
+/**
+ * @bug 4165343
+ * Adding 12 months behaves differently from adding 1 year
+ */
+void
+CalendarRegressionTest::Test4165343()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *calendar = new GregorianCalendar(1996, UCAL_FEBRUARY, 29, status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create calendar");
+ return;
+ }
+ UDate start = calendar->getTime(status);
+ if(U_FAILURE(status))
+ errln("Couldn't getTime (1)");
+ logln(UnicodeString("init date: ") + start);
+ calendar->add(UCAL_MONTH, 12, status);
+ if(U_FAILURE(status))
+ errln("Couldn't add(MONTH, 12)");
+ UDate date1 = calendar->getTime(status);
+ if(U_FAILURE(status))
+ errln("Couldn't getTime (2)");
+ logln(UnicodeString("after adding 12 months: ") + date1);
+ calendar->setTime(start, status);
+ if(U_FAILURE(status))
+ errln("Couldn't setTime");
+ calendar->add(UCAL_YEAR, 1, status);
+ if(U_FAILURE(status))
+ errln("Couldn't add(YEAR, 1)");
+ UDate date2 = calendar->getTime(status);
+ if(U_FAILURE(status))
+ errln("Couldn't getTime (3)");
+ logln(UnicodeString("after adding one year : ") + date2);
+ if (date1 == date2) {
+ logln("Test passed");
+ } else {
+ errln("Test failed");
+ }
+ delete calendar;
+}
+
+/**
+ * @bug 4166109
+ * GregorianCalendar.getActualMaximum() does not account for first day of week.
+ */
+void
+CalendarRegressionTest::Test4166109()
+{
+ /* Test month:
+ *
+ * March 1998
+ * Su Mo Tu We Th Fr Sa
+ * 1 2 3 4 5 6 7
+ * 8 9 10 11 12 13 14
+ * 15 16 17 18 19 20 21
+ * 22 23 24 25 26 27 28
+ * 29 30 31
+ */
+ UBool passed = TRUE;
+ UErrorCode status = U_ZERO_ERROR;
+ UCalendarDateFields field = UCAL_WEEK_OF_MONTH;
+
+ GregorianCalendar *calendar = new GregorianCalendar(Locale::getUS(), status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create calendar");
+ return;
+ }
+ calendar->set(1998, UCAL_MARCH, 1);
+ calendar->setMinimalDaysInFirstWeek(1);
+ logln(UnicodeString("Date: ") + calendar->getTime(status)); // 888817448000
+
+ int32_t firstInMonth = calendar->get(UCAL_DATE, status);
+ if(U_FAILURE(status))
+ errln("get(D_O_M) failed");
+
+ for(int32_t firstInWeek = UCAL_SUNDAY; firstInWeek <= UCAL_SATURDAY; firstInWeek++) {
+ calendar->setFirstDayOfWeek((UCalendarDaysOfWeek)firstInWeek);
+ int32_t returned = calendar->getActualMaximum(field, status);
+ int32_t expected = (31 + ((firstInMonth - firstInWeek + 7)% 7) + 6) / 7;
+
+ logln(UnicodeString("First day of week = ") + firstInWeek +
+ " getActualMaximum(WEEK_OF_MONTH, status) = " + returned +
+ " expected = " + expected +
+ ((returned == expected) ? " ok" : " FAIL"));
+
+ if (returned != expected) {
+ passed = FALSE;
+ }
+ }
+ if (!passed) {
+ errln("Test failed");
+ }
+
+ delete calendar;
+}
+
+/**
+ * @bug 4167060
+ * Calendar.getActualMaximum(YEAR) works wrong.
+ */
+void
+CalendarRegressionTest::Test4167060()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCalendarDateFields field = UCAL_YEAR;
+ DateFormat *format = new SimpleDateFormat(UnicodeString("EEE MMM dd HH:mm:ss zzz yyyy G"),
+ Locale::getUS(), status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat");
+ return;
+ }
+
+ GregorianCalendar *calendars [] = {
+ new GregorianCalendar(100, UCAL_NOVEMBER, 1, status),
+ new GregorianCalendar(-99 /*100BC*/, UCAL_JANUARY, 1, status),
+ new GregorianCalendar(1996, UCAL_FEBRUARY, 29, status),
+ };
+ if(U_FAILURE(status)) {
+ errln("Couldn't create GregorianCalendars");
+ return;
+ // could leak
+ }
+
+ UnicodeString id [] = { "Hybrid", "Gregorian", "Julian" };
+
+ for (int32_t k=0; k<3; ++k) {
+ logln("--- " + id[k] + " ---");
+
+ for (int32_t j=0; j < 3; ++j) {
+ GregorianCalendar *calendar = calendars[j];
+ if (k == 1) {
+ calendar->setGregorianChange(EARLIEST_SUPPORTED_MILLIS, status);
+ }
+ else if (k == 2) {
+ calendar->setGregorianChange(LATEST_SUPPORTED_MILLIS, status);
+ }
+
+ if(U_FAILURE(status))
+ errln("setGregorianChange() failed");
+ format->adoptCalendar((Calendar*)calendar->clone());
+
+ UDate dateBefore = calendar->getTime(status);
+ if(U_FAILURE(status))
+ errln("getTime() failed");
+
+ int32_t maxYear = calendar->getActualMaximum(field, status);
+ UnicodeString temp;
+ logln(UnicodeString("maxYear: ") + maxYear + " for " + format->format(calendar->getTime(status), temp));
+ temp.remove();
+ logln("date before: " + format->format(dateBefore, temp));
+
+ int32_t years[] = {2000, maxYear-1, maxYear, maxYear+1};
+
+ for (int32_t i = 0; i < 4; i++) {
+ UBool valid = years[i] <= maxYear;
+ calendar->set(field, years[i]);
+ UDate dateAfter = calendar->getTime(status);
+ if(U_FAILURE(status))
+ errln("getTime() failed");
+ int32_t newYear = calendar->get(field, status);
+ if(U_FAILURE(status))
+ errln(UnicodeString("get(") + (int32_t)field + ") failed");
+ calendar->setTime(dateBefore, status); // restore calendar for next use
+ if(U_FAILURE(status))
+ errln("setTime() failed");
+
+ temp.remove();
+ logln(UnicodeString(" Year ") + years[i] + (valid? " ok " : " bad") +
+ " => " + format->format(dateAfter, temp));
+ if (valid && newYear != years[i]) {
+ errln(UnicodeString(" FAIL: ") + newYear + " should be valid; date, month and time shouldn't change");
+ }
+ // {sfb} this next line is a hack, but it should work since if a
+ // double has an exponent, adding 1 should not yield the same double
+ else if (!valid && /*newYear == years[i]*/ dateAfter + 1.0 == dateAfter) {
+ errln(UnicodeString(" FAIL: ") + newYear + " should be invalid");
+ }
+ }
+ }
+ }
+
+ delete format;
+ delete calendars[0];
+ delete calendars[1];
+ delete calendars[2];
+}
+
+/**
+ * Week of year is wrong at the start and end of the year.
+ */
+void CalendarRegressionTest::Test4197699() {
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar cal(status);
+ cal.setFirstDayOfWeek(UCAL_MONDAY);
+ cal.setMinimalDaysInFirstWeek(4);
+ SimpleDateFormat fmt("E dd MMM yyyy 'DOY='D 'WOY='w",
+ Locale::getUS(), status);
+ fmt.setCalendar(cal);
+ if (U_FAILURE(status)) {
+ errln("Couldn't initialize test");
+ return;
+ }
+
+ int32_t DATA[] = {
+ 2000, UCAL_JANUARY, 1, 52,
+ 2001, UCAL_DECEMBER, 31, 1,
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ UnicodeString str;
+ DateFormat& dfmt = *(DateFormat*)&fmt;
+ for (int32_t i=0; i<DATA_length; ) {
+ cal.clear();
+ cal.set(DATA[i], DATA[i+1], DATA[i+2]);
+ i += 3;
+ int32_t expWOY = DATA[i++];
+ int32_t actWOY = cal.get(UCAL_WEEK_OF_YEAR, status);
+ if (expWOY == actWOY) {
+ logln(UnicodeString("Ok: ") + dfmt.format(cal.getTime(status), str.remove()));
+ } else {
+ errln(UnicodeString("FAIL: ") + dfmt.format(cal.getTime(status), str.remove())
+ + ", expected WOY=" + expWOY);
+ cal.add(UCAL_DATE, -8, status);
+ for (int j=0; j<14; ++j) {
+ cal.add(UCAL_DATE, 1, status);
+ logln(dfmt.format(cal.getTime(status), str.remove()));
+ }
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: Unexpected error from Calendar");
+ return;
+ }
+ }
+}
+
+ enum Action { ADD=1, ROLL=2 };
+ enum Sign { PLUS=1, MINUS=2 };
+
+#define ONE_HOUR (60*60*1000)
+#define ONE_DAY (24*ONE_HOUR)
+
+ typedef struct {
+ UCalendarDateFields field;
+ int8_t actionMask; // ADD or ROLL or both
+ int8_t signMask; // PLUS or MINUS or both
+ int32_t amount;
+ int32_t before; // ms before cutover
+ int32_t after; // ms after cutover
+ } J81_DATA;
+
+/**
+ * Rolling and adding across the Gregorian cutover should work as expected.
+ * Jitterbug 81.
+ */
+void CalendarRegressionTest::TestJ81() {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString temp, temp2, temp3;
+ int32_t i;
+ GregorianCalendar cal(TimeZone::createTimeZone("GMT"), Locale::getUS(), status);
+ SimpleDateFormat fmt("HH:mm 'w'w 'd'D E d MMM yyyy", Locale::getUS(), status);
+ if (U_FAILURE(status)) {
+ errln("Error: Cannot create calendar or format");
+ return;
+ }
+ fmt.setCalendar(cal);
+ // Get the Gregorian cutover
+ UDate cutover = cal.getGregorianChange();
+ UDate days = ONE_DAY;
+ days = cutover/days;
+ logln(UnicodeString("Cutover: {") +
+ fmt.format(cutover, temp) + "}(epoch days-" + (int)days + ", jd" + (2440588 + days) +")");
+
+ // Check woy and doy handling. Reference data:
+ /* w40 d274 Mon 1 Oct 1582
+ w40 d275 Tue 2 Oct 1582
+ w40 d276 Wed 3 Oct 1582
+ w40 d277 Thu 4 Oct 1582
+ w40 d278 Fri 15 Oct 1582
+ w40 d279 Sat 16 Oct 1582
+ w41 d280 Sun 17 Oct 1582
+ w41 d281 Mon 18 Oct 1582
+ w41 d282 Tue 19 Oct 1582
+ w41 d283 Wed 20 Oct 1582
+ w41 d284 Thu 21 Oct 1582
+ w41 d285 Fri 22 Oct 1582
+ w41 d286 Sat 23 Oct 1582
+ w42 d287 Sun 24 Oct 1582
+ w42 d288 Mon 25 Oct 1582
+ w42 d289 Tue 26 Oct 1582
+ w42 d290 Wed 27 Oct 1582
+ w42 d291 Thu 28 Oct 1582
+ w42 d292 Fri 29 Oct 1582
+ w42 d293 Sat 30 Oct 1582
+ w43 d294 Sun 31 Oct 1582
+ w43 d295 Mon 1 Nov 1582 */
+ int32_t DOY_DATA[] = {
+ // dom, woy, doy
+ 1, 40, 274, UCAL_MONDAY,
+ 4, 40, 277, UCAL_THURSDAY,
+ 15, 40, 278, UCAL_FRIDAY,
+ 17, 41, 280, UCAL_SUNDAY,
+ 24, 42, 287, UCAL_SUNDAY,
+ 25, 42, 288, UCAL_MONDAY,
+ 26, 42, 289, UCAL_TUESDAY,
+ 27, 42, 290, UCAL_WEDNESDAY,
+ 28, 42, 291, UCAL_THURSDAY,
+ 29, 42, 292, UCAL_FRIDAY,
+ 30, 42, 293, UCAL_SATURDAY,
+ 31, 43, 294, UCAL_SUNDAY
+ };
+ int32_t DOY_DATA_length = (int32_t)(sizeof(DOY_DATA) / sizeof(DOY_DATA[0]));
+
+ for (i=0; i<DOY_DATA_length; i+=4) {
+ // Test time->fields
+ cal.set(1582, UCAL_OCTOBER, DOY_DATA[i]);
+ int32_t woy = cal.get(UCAL_WEEK_OF_YEAR, status);
+ int32_t doy = cal.get(UCAL_DAY_OF_YEAR, status);
+ int32_t dow = cal.get(UCAL_DAY_OF_WEEK, status);
+ if (U_FAILURE(status)) {
+ errln("Error: get() failed");
+ break;
+ }
+ if (woy != DOY_DATA[i+1] || doy != DOY_DATA[i+2] || dow != DOY_DATA[i+3]) {
+ errln((UnicodeString)"Fail: expect woy=" + DOY_DATA[i+1] +
+ ", doy=" + DOY_DATA[i+2] + ", dow=" + DOY_DATA[i+3] + " on " +
+ fmt.format(cal.getTime(status), temp.remove()) +
+ " set(1582,OCTOBER, " + DOY_DATA[i] + ")");
+ logln(CalendarTest::calToStr(cal));
+ status = U_ZERO_ERROR;
+ } else {
+ logln((UnicodeString)"PASS: expect woy=" + DOY_DATA[i+1] +
+ ", doy=" + DOY_DATA[i+2] + ", dow=" + DOY_DATA[i+3] + " on " +
+ fmt.format(cal.getTime(status), temp.remove()));
+ logln(CalendarTest::calToStr(cal));
+ status = U_ZERO_ERROR;
+ }
+ // Test fields->time for WOY
+ cal.clear();
+ cal.set(UCAL_YEAR, 1582);
+ cal.set(UCAL_WEEK_OF_YEAR, DOY_DATA[i+1]);
+ cal.set(UCAL_DAY_OF_WEEK, DOY_DATA[i+3]);
+ int32_t dom = cal.get(UCAL_DATE, status);
+ if (U_FAILURE(status)) {
+ errln("Error: get() failed");
+ break;
+ }
+ if (dom != DOY_DATA[i]) {
+ errln((UnicodeString)"Fail: set woy=" + DOY_DATA[i+1] +
+ " dow=" + DOY_DATA[i+3] + " => " +
+ fmt.format(cal.getTime(status), temp.remove()) +
+ ", expected 1582 Oct " + DOY_DATA[i]);
+ logln(CalendarTest::calToStr(cal));
+ status = U_ZERO_ERROR;
+ }
+
+ // Test fields->time for DOY
+ cal.clear();
+ cal.set(UCAL_YEAR, 1582);
+ cal.set(UCAL_DAY_OF_YEAR, DOY_DATA[i+2]);
+ dom = cal.get(UCAL_DATE, status);
+ if (U_FAILURE(status)) {
+ errln("Error: get() failed");
+ break;
+ }
+ if (dom != DOY_DATA[i]) {
+ errln((UnicodeString)"Fail: set doy=" + DOY_DATA[i+2] +
+ " => " +
+ fmt.format(cal.getTime(status), temp.remove()) +
+ ", expected 1582 Oct " + DOY_DATA[i]);
+ status = U_ZERO_ERROR;
+ }
+ }
+ status = U_ZERO_ERROR;
+
+#define ADD_ROLL ADD|ROLL
+#define PLUS_MINUS PLUS|MINUS
+ // Test cases
+ J81_DATA DATA[] = {
+ { UCAL_WEEK_OF_YEAR, ADD_ROLL, PLUS_MINUS, 1, -ONE_DAY, +6*ONE_DAY },
+ { UCAL_WEEK_OF_YEAR, ADD_ROLL, PLUS_MINUS, 1, -ONE_DAY, +6*ONE_DAY },
+ { UCAL_WEEK_OF_MONTH, ADD|ROLL, PLUS|MINUS, 1, -ONE_DAY, +6*ONE_DAY },
+ { UCAL_DATE, ADD|ROLL, PLUS|MINUS, 2, -ONE_DAY, +1*ONE_DAY },
+ { UCAL_DATE, ROLL, PLUS, -6, -ONE_DAY, +14*ONE_DAY },
+ { UCAL_DATE, ROLL, PLUS, -7, 0, +14*ONE_DAY },
+ { UCAL_DATE, ROLL, PLUS, -7, +ONE_DAY, +15*ONE_DAY },
+ { UCAL_DATE, ROLL, PLUS, +18, -ONE_DAY, -4*ONE_DAY },
+ { UCAL_DAY_OF_YEAR, ADD|ROLL, PLUS|MINUS, 2, -ONE_DAY, +1*ONE_DAY },
+ { UCAL_DAY_OF_WEEK, ADD|ROLL, PLUS|MINUS, 2, -ONE_DAY, +1*ONE_DAY },
+ { UCAL_DAY_OF_WEEK_IN_MONTH, ADD|ROLL, PLUS|MINUS, 1, -ONE_DAY, +6*ONE_DAY },
+ { UCAL_AM_PM, ADD, PLUS|MINUS, 4, -12*ONE_HOUR, +36*ONE_HOUR },
+ { UCAL_HOUR, ADD, PLUS|MINUS, 48, -12*ONE_HOUR, +36*ONE_HOUR },
+ { UCAL_HOUR_OF_DAY, ADD, PLUS|MINUS, 48, -12*ONE_HOUR, +36*ONE_HOUR },
+ { UCAL_MINUTE, ADD, PLUS|MINUS, 48*60, -12*ONE_HOUR, +36*ONE_HOUR },
+ { UCAL_SECOND, ADD, PLUS|MINUS, 48*60*60, -12*ONE_HOUR, +36*ONE_HOUR },
+ { UCAL_MILLISECOND, ADD, PLUS|MINUS, 48*ONE_HOUR, -12*ONE_HOUR, +36*ONE_HOUR },
+ // NOTE: These are not supported yet. See jitterbug 180.
+ // Uncomment these lines when add/roll supported on these fields.
+ // { Calendar::YEAR_WOY, ADD|ROLL, 1, -ONE_DAY, +6*ONE_DAY },
+ // { Calendar::DOW_LOCAL, ADD|ROLL, 2, -ONE_DAY, +1*ONE_DAY }
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ // Now run the tests
+ for (i=0; i<DATA_length; ++i) {
+ for (Action action=ADD; action<=ROLL; action=(Action)(action+1)) {
+ if (!(DATA[i].actionMask & action)) {
+ continue;
+ }
+ for (Sign sign=PLUS; sign<=MINUS; sign=(Sign)(sign+1)) {
+ if (!(DATA[i].signMask & sign)) {
+ continue;
+ }
+ status = U_ZERO_ERROR;
+ int32_t amount = DATA[i].amount * (sign==MINUS?-1:1);
+ UDate date = cutover +
+ (sign==PLUS ? DATA[i].before : DATA[i].after);
+ UDate expected = cutover +
+ (sign==PLUS ? DATA[i].after : DATA[i].before);
+ cal.setTime(date, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: setTime returned error code " + u_errorName(status));
+ continue;
+ }
+ if (action == ADD) {
+ cal.add(DATA[i].field, amount, status);
+ } else {
+ cal.roll(DATA[i].field, amount, status);
+ }
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: " +
+ (action==ADD?"add ":"roll ") + FIELD_NAME[DATA[i].field] +
+ " returned error code " + u_errorName(status));
+ continue;
+ }
+ UDate result = cal.getTime(status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: getTime returned error code " + u_errorName(status));
+ continue;
+ }
+ if (result == expected) {
+ logln((UnicodeString)"Ok: {" +
+ fmt.format(date, temp.remove()) +
+ "}(" + date/ONE_DAY +
+ (action==ADD?") add ":") roll ") +
+ amount + " " + FIELD_NAME[DATA[i].field] + " -> {" +
+ fmt.format(result, temp2.remove()) +
+ "}(" + result/ONE_DAY + ")");
+ } else {
+ errln((UnicodeString)"FAIL: {" +
+ fmt.format(date, temp.remove()) +
+ "}(" + date/ONE_DAY +
+ (action==ADD?") add ":") roll ") +
+ amount + " " + FIELD_NAME[DATA[i].field] + " -> {" +
+ fmt.format(result, temp2.remove()) +
+ "}(" + result/ONE_DAY + "), expect {" +
+ fmt.format(expected, temp3.remove()) +
+ "}(" + expected/ONE_DAY + ")");
+ }
+ }
+ }
+ }
+}
+
+/**
+ * Test fieldDifference().
+ */
+void CalendarRegressionTest::TestJ438(void) {
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t DATA[] = {
+ 2000, UCAL_JANUARY, 20, 2010, UCAL_JUNE, 15,
+ 2010, UCAL_JUNE, 15, 2000, UCAL_JANUARY, 20,
+ 1964, UCAL_SEPTEMBER, 7, 1999, UCAL_JUNE, 4,
+ 1999, UCAL_JUNE, 4, 1964, UCAL_SEPTEMBER, 7,
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA)/sizeof(DATA[0]));
+ Calendar* pcal = Calendar::createInstance(Locale::getUS(), ec);
+ if(U_FAILURE(ec)) {
+ errln("Error creating calendar %s", u_errorName(ec));
+ delete pcal;
+ return;
+ }
+ Calendar& cal = *pcal;
+ int32_t i;
+ SimpleDateFormat fmt(UnicodeString("MMM dd yyyy",""), ec);
+ fmt.setCalendar(cal);
+ UnicodeString s, t, u;
+ if (!failure(ec, "setup")) {
+ for (i=0; i<DATA_length; i+=6) {
+ int32_t y1 = DATA[i];
+ int32_t m1 = DATA[i+1];
+ int32_t d1 = DATA[i+2];
+ int32_t y2 = DATA[i+3];
+ int32_t m2 = DATA[i+4];
+ int32_t d2 = DATA[i+5];
+
+ cal.clear();
+ cal.set(y1, m1, d1);
+ UDate date1 = cal.getTime(ec);
+ if (failure(ec, "getTime"))
+ break;
+ cal.set(y2, m2, d2);
+ UDate date2 = cal.getTime(ec);
+ if (failure(ec, "getTime"))
+ break;
+
+ cal.setTime(date1, ec);
+ if (failure(ec, "setTime"))
+ break;
+ int32_t dy = cal.fieldDifference(date2, UCAL_YEAR, ec);
+ int32_t dm = cal.fieldDifference(date2, UCAL_MONTH, ec);
+ int32_t dd = cal.fieldDifference(date2, UCAL_DATE, ec);
+ if (failure(ec, "fieldDifference"))
+ break;
+
+ {
+ Calendar *cal2 = cal.clone();
+ UErrorCode ec2 = U_ZERO_ERROR;
+
+ cal2->setTime(date1, ec2);
+
+ int32_t dy2 = cal2->fieldDifference(date2, Calendar::YEAR, ec2);
+ int32_t dm2 = cal2->fieldDifference(date2, Calendar::MONTH, ec2);
+ int32_t dd2 = cal2->fieldDifference(date2, Calendar::DATE, ec2);
+ if (failure(ec2, "fieldDifference(date, Calendar::DATE, ec)"))
+ break;
+ if( (dd2 != dd) ||
+ (dm2 != dm) ||
+ (dy2 != dy)){
+ errln("fieldDifference(UCAL_...) and fieldDifference(Calendar::...) give different results!\n");
+ }
+ delete cal2;
+ }
+
+
+ logln(UnicodeString("") +
+ fmt.format(date2, s.remove()) + " - " +
+ fmt.format(date1, t.remove()) + " = " +
+ dy + "y " + dm + "m " + dd + "d");
+
+ cal.setTime(date1, ec);
+ if (failure(ec, "setTime"))
+ break;
+ cal.add(UCAL_YEAR, dy, ec);
+ cal.add(UCAL_MONTH, dm, ec);
+ cal.add(UCAL_DATE, dd, ec);
+ if (failure(ec, "add"))
+ break;
+ UDate date22 = cal.getTime(ec);
+ if (failure(ec, "getTime"))
+ break;
+ if (date2 != date22) {
+ errln(UnicodeString("FAIL: ") +
+ fmt.format(date1, s.remove()) + " + " +
+ dy + "y " + dm + "m " + dd + "d = " +
+ fmt.format(date22, t.remove()) + ", exp " +
+ fmt.format(date2, u.remove()));
+ } else {
+ logln(UnicodeString("Ok: ") +
+ fmt.format(date1, s.remove()) + " + " +
+ dy + "y " + dm + "m " + dd + "d = " +
+ fmt.format(date22, t.remove()));
+ }
+ }
+ }
+ delete pcal;
+}
+
+void CalendarRegressionTest::TestT5555()
+{
+ UErrorCode ec = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(ec);
+
+ if (cal == NULL || U_FAILURE(ec)) {
+ errln("FAIL: Calendar::createInstance()");
+ delete cal;
+ return;
+ }
+
+ // Set to Wednesday, February 21, 2007
+ cal->set(2007, UCAL_FEBRUARY, 21);
+
+ // Advance three years
+ cal->add(UCAL_MONTH, 36, ec);
+
+ // Set to last Wednesday of the month
+ cal->set(UCAL_DAY_OF_WEEK_IN_MONTH, -1);
+
+ cal->getTime(ec);
+
+ int32_t yy, mm, dd, ee;
+
+ yy = cal->get(UCAL_YEAR, ec);
+ mm = cal->get(UCAL_MONTH, ec);
+ dd = cal->get(UCAL_DATE, ec);
+ ee = cal->get(UCAL_DAY_OF_WEEK, ec);
+
+ // Should be set to Wednesday, February 24, 2010
+ if (U_FAILURE(ec) || yy != 2010 || mm != UCAL_FEBRUARY || dd != 24 || ee != UCAL_WEDNESDAY) {
+ errln("FAIL: got date %4d/%02d/%02d, expected 210/02/24: ", yy, mm + 1, dd);
+ }
+ delete cal;
+}
+
+/**
+ * Test behavior of fieldDifference around leap years. Also test a large
+ * field difference to check binary search.
+ */
+void CalendarRegressionTest::TestLeapFieldDifference() {
+ UErrorCode ec = U_ZERO_ERROR;
+ Calendar* cal = Calendar::createInstance(ec);
+ if (cal == NULL || U_FAILURE(ec)) {
+ errln("FAIL: Calendar::createInstance()");
+ delete cal;
+ return;
+ }
+ cal->set(2004, UCAL_FEBRUARY, 29);
+ UDate date2004 = cal->getTime(ec);
+ cal->set(2000, UCAL_FEBRUARY, 29);
+ UDate date2000 = cal->getTime(ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: getTime()");
+ delete cal;
+ return;
+ }
+ int32_t y = cal->fieldDifference(date2004, UCAL_YEAR, ec);
+ int32_t d = cal->fieldDifference(date2004, UCAL_DAY_OF_YEAR, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: fieldDifference()");
+ delete cal;
+ return;
+ }
+ if (d == 0) {
+ logln((UnicodeString)"Ok: 2004/Feb/29 - 2000/Feb/29 = " + y + " years, " + d + " days");
+ } else {
+ errln((UnicodeString)"FAIL: 2004/Feb/29 - 2000/Feb/29 = " + y + " years, " + d + " days");
+ }
+ cal->setTime(date2004, ec);
+ y = cal->fieldDifference(date2000, UCAL_YEAR, ec);
+ d = cal->fieldDifference(date2000, UCAL_DAY_OF_YEAR, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: setTime() / fieldDifference()");
+ delete cal;
+ return;
+ }
+ if (d == 0) {
+ logln((UnicodeString)"Ok: 2000/Feb/29 - 2004/Feb/29 = " + y + " years, " + d + " days");
+ } else {
+ errln((UnicodeString)"FAIL: 2000/Feb/29 - 2004/Feb/29 = " + y + " years, " + d + " days");
+ }
+ // Test large difference
+ cal->set(2001, UCAL_APRIL, 5); // 2452005
+ UDate ayl = cal->getTime(ec);
+ cal->set(1964, UCAL_SEPTEMBER, 7); // 2438646
+ UDate asl = cal->getTime(ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: getTime()");
+ delete cal;
+ return;
+ }
+ d = cal->fieldDifference(ayl, UCAL_DATE, ec);
+ cal->setTime(ayl, ec);
+ int32_t d2 = cal->fieldDifference(asl, UCAL_DATE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: setTime() / fieldDifference()");
+ delete cal;
+ return;
+ }
+ if (d == -d2 && d == 13359) {
+ logln((UnicodeString)"Ok: large field difference symmetrical " + d);
+ } else {
+ logln((UnicodeString)"FAIL: large field difference incorrect " + d + ", " + d2 +
+ ", expect +/- 13359");
+ }
+ delete cal;
+}
+
+/**
+ * Test ms_MY "Malay (Malaysia)" locale. Bug 1543.
+ */
+void CalendarRegressionTest::TestMalaysianInstance() {
+ Locale loc("ms", "MY"); // Malay (Malaysia)
+ UErrorCode ec = U_ZERO_ERROR;
+ Calendar* cal = Calendar::createInstance(loc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Can't construct calendar for ms_MY");
+ }
+ delete cal;
+}
+
+/**
+ * setFirstDayOfWeek and setMinimalDaysInFirstWeek may change the
+ * field <=> time mapping, since they affect the interpretation of
+ * the WEEK_OF_MONTH or WEEK_OF_YEAR fields.
+ */
+void CalendarRegressionTest::TestWeekShift() {
+ UErrorCode ec = U_ZERO_ERROR;
+ GregorianCalendar cal(TimeZone::createTimeZone("America/Los_Angeles"),
+ Locale("en", "US"), ec);
+ cal.setTime(UDate(997257600000.0), ec); // Wed Aug 08 01:00:00 PDT 2001
+ // In pass one, change the first day of week so that the weeks
+ // shift in August 2001. In pass two, change the minimal days
+ // in the first week so that the weeks shift in August 2001.
+ // August 2001
+ // Su Mo Tu We Th Fr Sa
+ // 1 2 3 4
+ // 5 6 7 8 9 10 11
+ // 12 13 14 15 16 17 18
+ // 19 20 21 22 23 24 25
+ // 26 27 28 29 30 31
+ for (int32_t pass=0; pass<2; ++pass) {
+ if (pass==0) {
+ cal.setFirstDayOfWeek(UCAL_WEDNESDAY);
+ cal.setMinimalDaysInFirstWeek(4);
+ } else {
+ cal.setFirstDayOfWeek(UCAL_SUNDAY);
+ cal.setMinimalDaysInFirstWeek(4);
+ }
+ cal.add(UCAL_DATE, 1, ec); // Force recalc
+ cal.add(UCAL_DATE, -1, ec);
+
+ UDate time1 = cal.getTime(ec); // Get time -- should not change
+
+ // Now change a week parameter and then force a recalc.
+ // The bug is that the recalc should not be necessary --
+ // calendar should do so automatically.
+ if (pass==0) {
+ cal.setFirstDayOfWeek(UCAL_THURSDAY);
+ } else {
+ cal.setMinimalDaysInFirstWeek(5);
+ }
+
+ int32_t woy1 = cal.get(UCAL_WEEK_OF_YEAR, ec);
+ int32_t wom1 = cal.get(UCAL_WEEK_OF_MONTH, ec);
+
+ cal.add(UCAL_DATE, 1, ec); // Force recalc
+ cal.add(UCAL_DATE, -1, ec);
+
+ int32_t woy2 = cal.get(UCAL_WEEK_OF_YEAR, ec);
+ int32_t wom2 = cal.get(UCAL_WEEK_OF_MONTH, ec);
+
+ UDate time2 = cal.getTime(ec);
+
+ if (U_FAILURE(ec)) {
+ errln("FAIL: internal test error");
+ return;
+ }
+
+ if (time1 != time2) {
+ errln("FAIL: shifting week should not alter time");
+ } else {
+ // logln(time1);
+ }
+ if (woy1 == woy2 && wom1 == wom2) {
+ logln((UnicodeString)"Ok: WEEK_OF_YEAR: " + woy1 +
+ ", WEEK_OF_MONTH: " + wom1);
+ } else {
+ errln((UnicodeString)"FAIL: WEEK_OF_YEAR: " + woy1 + " => " + woy2 +
+ ", WEEK_OF_MONTH: " + wom1 + " => " + wom2 +
+ " after week shift");
+ }
+ }
+}
+
+/**
+ * Make sure that when adding a day, we actually wind up in a
+ * different day. The DST adjustments we use to keep the hour
+ * constant across DST changes can backfire and change the day.
+ */
+void CalendarRegressionTest::TestTimeZoneTransitionAdd() {
+ UErrorCode ec = U_ZERO_ERROR;
+ Locale locale(Locale::getUS()); // could also be CHINA
+ SimpleDateFormat dateFormat("MM/dd/yyyy HH:mm z", locale, ec);
+
+ StringEnumeration *tz = TimeZone::createEnumeration();
+ if (tz == NULL) {
+ errln("FAIL: TimeZone::createEnumeration");
+ return;
+ }
+
+ UnicodeString buf1, buf2;
+
+ const UChar* id;
+ while ((id = tz->unext(NULL, ec)) != NULL && U_SUCCESS(ec)) {
+ if (U_FAILURE(ec)) {
+ errln("FAIL: StringEnumeration::unext");
+ break;
+ }
+
+ TimeZone *t = TimeZone::createTimeZone(id);
+ if (t == NULL) {
+ errln("FAIL: TimeZone::createTimeZone");
+ break;
+ }
+ dateFormat.setTimeZone(*t);
+
+ Calendar *cal = Calendar::createInstance(t, locale, ec);
+ if (cal == NULL || U_FAILURE(ec)) {
+ errln("FAIL: Calendar::createTimeZone");
+ delete cal;
+ break;
+ }
+
+ cal->clear();
+ // Scan the year 2003, overlapping the edges of the year
+ cal->set(UCAL_YEAR, 2002);
+ cal->set(UCAL_MONTH, UCAL_DECEMBER);
+ cal->set(UCAL_DATE, 25);
+
+ for (int32_t i=0; i<365+10 && U_SUCCESS(ec); ++i) {
+ UDate yesterday = cal->getTime(ec);
+ int32_t yesterday_day = cal->get(UCAL_DATE, ec);
+ cal->add(UCAL_DATE, 1, ec);
+ if (yesterday_day == cal->get(UCAL_DATE, ec)) {
+ errln(UnicodeString(id) + " " +
+ dateFormat.format(yesterday, buf1) + " +1d= " +
+ dateFormat.format(cal->getTime(ec), buf2));
+ buf1.truncate(0);
+ buf2.truncate(0);
+ }
+ }
+ delete cal;
+ }
+
+ if (U_FAILURE(ec)) {
+ errln("FAIL: %s", u_errorName(ec));
+ }
+
+ delete tz;
+}
+
+UDate
+CalendarRegressionTest::makeDate(int32_t y, int32_t m, int32_t d,
+ int32_t hr, int32_t min, int32_t sec)
+{
+ UDate result;
+
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ cal->clear();
+
+ cal->set(UCAL_YEAR, y);
+
+ if(m != 0) cal->set(UCAL_MONTH, m);
+ if(d != 0) cal->set(UCAL_DATE, d);
+ if(hr != 0) cal->set(UCAL_HOUR, hr);
+ if(min != 0) cal->set(UCAL_MINUTE, min);
+ if(sec != 0) cal->set(UCAL_SECOND, sec);
+
+ result = cal->getTime(status);
+
+ delete cal;
+
+ return result;
+}
+
+void CalendarRegressionTest::TestDeprecates(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *c1 = Calendar::createInstance("ja_JP@calendar=japanese",status);
+ Calendar *c2 = Calendar::createInstance("ja_JP_TRADITIONAL",status);
+
+ if(!c1 || !c2 || U_FAILURE(status)) {
+ errln("Couldn't create calendars for roll of HOUR");
+ return;
+ }
+
+ c2->set(UCAL_HOUR,2);
+ c1->setTime(c2->getTime(status),status);
+ // *c1 = *c2;
+
+ c1->roll(Calendar::HOUR,(int32_t)3,status);
+ c2->roll(UCAL_HOUR,(int32_t)3,status);
+
+ if(U_FAILURE(status)) {
+ errln("Error code when trying to roll");
+ } else if(*c1 != *c2) {
+ errln("roll(EDateField, int32_t) had different effect than roll(UCalendarField, int32_t)");
+ }
+
+ c1->setTime(c2->getTime(status),status);
+ c1->roll(Calendar::HOUR,(UBool)FALSE,status);
+ c2->roll(UCAL_HOUR,(UBool)FALSE,status);
+
+ if(U_FAILURE(status)) {
+ errln("Error code when trying to roll(UBool)");
+ } else if(*c1 != *c2) {
+ errln("roll(EDateField, UBool) had different effect than roll(UCalendarField, UBool)");
+ }
+
+ delete c1;
+ delete c2;
+
+ status = U_ZERO_ERROR;
+
+ c1 = Calendar::createInstance("th_TH_TRADITIONAL",status);
+ c2 = Calendar::createInstance("th_TH@calendar=buddhist",status);
+
+ if(!c1 || !c2 || U_FAILURE(status)) {
+ errln("Couldn't create calendars for add of HOUR");
+ return;
+ }
+
+ c2->set(UCAL_HOUR,2);
+ c1->setTime(c2->getTime(status),status);
+ //*c1 = *c2;
+
+ c1->add(Calendar::HOUR,(int32_t)1,status);
+
+ if(U_FAILURE(status)) {
+ errln("Error code when trying to add Calendar::HOUR - %s", u_errorName(status));
+ }
+
+ c2->add(UCAL_HOUR,(int32_t)1,status);
+
+ if(U_FAILURE(status)) {
+ errln("Error code when trying to add - UCAL_HOUR %s", u_errorName(status));
+ } else if(*c1 != *c2) {
+ errln("add(EDateField) had different effect than add(UCalendarField)");
+ }
+
+ delete c1;
+ delete c2;
+
+ status = U_ZERO_ERROR;
+
+ c1 = Calendar::createInstance("es_ES",status);
+ c2 = Calendar::createInstance("es_ES",status);
+
+ if(!c1 || !c2 || U_FAILURE(status)) {
+ errln("Couldn't create calendars for add of YEAR");
+ return;
+ }
+
+ c2->set(UCAL_YEAR,1900);
+ c1->setTime(c2->getTime(status),status);
+ //*c1 = *c2;
+
+ c1->add(Calendar::YEAR,(int32_t)9,status);
+ c2->add(UCAL_YEAR,(int32_t)9,status);
+
+ if(U_FAILURE(status)) {
+ errln("Error code when trying to add YEARs");
+ } else if(*c1 != *c2) {
+ errln("add(EDateField YEAR) had different effect than add(UCalendarField YEAR)");
+ }
+
+ delete c1;
+ delete c2;
+}
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/calregts.h b/Build/source/libs/icu/icu-xetex/test/intltest/calregts.h
new file mode 100644
index 00000000000..7133ffa3b3a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/calregts.h
@@ -0,0 +1,92 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _CALENDARREGRESSIONTEST_
+#define _CALENDARREGRESSIONTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/calendar.h"
+#include "unicode/gregocal.h"
+#include "intltest.h"
+
+/**
+ * Performs regression test for Calendar
+ **/
+class CalendarRegressionTest: public IntlTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+ void test4100311(void);
+ void test4074758(void);
+ void test4028518(void);
+ void test4031502(void) ;
+ void test4035301(void) ;
+ void test4040996(void) ;
+ void test4051765(void) ;
+ void test4059654(void) ;
+ void test4061476(void) ;
+ void test4070502(void) ;
+ void test4071197(void) ;
+ void test4071385(void) ;
+ void test4073929(void) ;
+ void test4083167(void) ;
+ void test4086724(void) ;
+ void test4092362(void) ;
+ void test4095407(void) ;
+ void test4096231(void) ;
+ void test4096539(void) ;
+ void test41003112(void) ;
+ void test4103271(void) ;
+ void test4106136(void) ;
+ void test4108764(void) ;
+ void test4114578(void) ;
+ void test4118384(void) ;
+ void test4125881(void) ;
+ void test4125892(void) ;
+ void test4141665(void) ;
+ void test4142933(void) ;
+ void test4145158(void) ;
+ void test4145983(void) ;
+ void test4147269(void) ;
+
+ void Test4149677(void) ;
+ void Test4162587(void) ;
+ void Test4165343(void) ;
+ void Test4166109(void) ;
+ void Test4167060(void) ;
+ void Test4197699(void);
+ void TestJ81(void);
+ void TestJ438(void);
+ void TestT5555(void);
+ void TestLeapFieldDifference(void);
+ void TestMalaysianInstance(void);
+ void TestWeekShift(void);
+ void TestTimeZoneTransitionAdd(void);
+ void TestDeprecates(void);
+
+ void printdate(GregorianCalendar *cal, const char *string);
+ void dowTest(UBool lenient) ;
+
+
+ static UDate getAssociatedDate(UDate d, UErrorCode& status);
+ static UDate makeDate(int32_t y, int32_t m = 0, int32_t d = 0, int32_t hr = 0, int32_t min = 0, int32_t sec = 0);
+
+ static const UDate EARLIEST_SUPPORTED_MILLIS;
+ static const UDate LATEST_SUPPORTED_MILLIS;
+ static const char* FIELD_NAME[];
+
+protected:
+ UBool failure(UErrorCode status, const char* msg);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _CALENDARREGRESSIONTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/caltest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/caltest.cpp
new file mode 100644
index 00000000000..070564fcd37
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/caltest.cpp
@@ -0,0 +1,1994 @@
+/************************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ************************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "caltest.h"
+#include "unicode/dtfmtsym.h"
+#include "unicode/gregocal.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/simpletz.h"
+#include "unicode/dbgutil.h"
+
+// *****************************************************************************
+// class CalendarTest
+// *****************************************************************************
+
+UnicodeString CalendarTest::calToStr(const Calendar & cal)
+{
+ UnicodeString out;
+ UErrorCode status = U_ZERO_ERROR;
+ int i;
+ UDate d;
+ for(i = 0;i<UCAL_FIELD_COUNT;i++) {
+ out += (UnicodeString("") + fieldName((UCalendarDateFields)i) + "=" + cal.get((UCalendarDateFields)i, status) + UnicodeString(" "));
+ }
+ out += "[" + UnicodeString(cal.getType()) + "]";
+
+ if(cal.inDaylightTime(status)) {
+ out += UnicodeString(" (in DST), zone=");
+ }
+ else {
+ out += UnicodeString(", zone=");
+ }
+
+ UnicodeString str2;
+ out += cal.getTimeZone().getDisplayName(str2);
+ d = cal.getTime(status);
+ out += UnicodeString(" :","") + d;
+
+ return out;
+}
+
+void CalendarTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite TestCalendar");
+ switch (index) {
+ case 0:
+ name = "TestDOW943";
+ if (exec) {
+ logln("TestDOW943---"); logln("");
+ TestDOW943();
+ }
+ break;
+ case 1:
+ name = "TestClonesUnique908";
+ if (exec) {
+ logln("TestClonesUnique908---"); logln("");
+ TestClonesUnique908();
+ }
+ break;
+ case 2:
+ name = "TestGregorianChange768";
+ if (exec) {
+ logln("TestGregorianChange768---"); logln("");
+ TestGregorianChange768();
+ }
+ break;
+ case 3:
+ name = "TestDisambiguation765";
+ if (exec) {
+ logln("TestDisambiguation765---"); logln("");
+ TestDisambiguation765();
+ }
+ break;
+ case 4:
+ name = "TestGMTvsLocal4064654";
+ if (exec) {
+ logln("TestGMTvsLocal4064654---"); logln("");
+ TestGMTvsLocal4064654();
+ }
+ break;
+ case 5:
+ name = "TestAddSetOrder621";
+ if (exec) {
+ logln("TestAddSetOrder621---"); logln("");
+ TestAddSetOrder621();
+ }
+ break;
+ case 6:
+ name = "TestAdd520";
+ if (exec) {
+ logln("TestAdd520---"); logln("");
+ TestAdd520();
+ }
+ break;
+ case 7:
+ name = "TestFieldSet4781";
+ if (exec) {
+ logln("TestFieldSet4781---"); logln("");
+ TestFieldSet4781();
+ }
+ break;
+ case 8:
+ name = "TestSerialize337";
+ if (exec) {
+ logln("TestSerialize337---"); logln("");
+ // TestSerialize337();
+ }
+ break;
+ case 9:
+ name = "TestSecondsZero121";
+ if (exec) {
+ logln("TestSecondsZero121---"); logln("");
+ TestSecondsZero121();
+ }
+ break;
+ case 10:
+ name = "TestAddSetGet0610";
+ if (exec) {
+ logln("TestAddSetGet0610---"); logln("");
+ TestAddSetGet0610();
+ }
+ break;
+ case 11:
+ name = "TestFields060";
+ if (exec) {
+ logln("TestFields060---"); logln("");
+ TestFields060();
+ }
+ break;
+ case 12:
+ name = "TestEpochStartFields";
+ if (exec) {
+ logln("TestEpochStartFields---"); logln("");
+ TestEpochStartFields();
+ }
+ break;
+ case 13:
+ name = "TestDOWProgression";
+ if (exec) {
+ logln("TestDOWProgression---"); logln("");
+ TestDOWProgression();
+ }
+ break;
+ case 14:
+ name = "TestGenericAPI";
+ if (exec) {
+ logln("TestGenericAPI---"); logln("");
+ TestGenericAPI();
+ }
+ break;
+ case 15:
+ name = "TestAddRollExtensive";
+ if (exec) {
+ logln("TestAddRollExtensive---"); logln("");
+ TestAddRollExtensive();
+ }
+ break;
+ case 16:
+ name = "TestDOW_LOCALandYEAR_WOY";
+ if (exec) {
+ logln("TestDOW_LOCALandYEAR_WOY---"); logln("");
+ TestDOW_LOCALandYEAR_WOY();
+ }
+ break;
+ case 17:
+ name = "TestWOY";
+ if (exec) {
+ logln("TestWOY---"); logln("");
+ TestWOY();
+ }
+ break;
+ case 18:
+ name = "TestRog";
+ if (exec) {
+ logln("TestRog---"); logln("");
+ TestRog();
+ }
+ break;
+ case 19:
+ name = "TestYWOY";
+ if (exec) {
+ logln("TestYWOY---"); logln("");
+ TestYWOY();
+ }
+ break;
+ case 20:
+ name = "TestJD";
+ if(exec) {
+ logln("TestJD---"); logln("");
+ TestJD();
+ }
+ break;
+ case 21:
+ name = "TestDebug";
+ if(exec) {
+ logln("TestDebug---"); logln("");
+ TestDebug();
+ }
+ break;
+
+ default: name = ""; break;
+ }
+}
+
+// ---------------------------------------------------------------------------------
+
+UnicodeString CalendarTest::fieldName(UCalendarDateFields f) {
+ switch (f) {
+#define FIELD_NAME_STR(x) case x: return (#x+5)
+ FIELD_NAME_STR( UCAL_ERA );
+ FIELD_NAME_STR( UCAL_YEAR );
+ FIELD_NAME_STR( UCAL_MONTH );
+ FIELD_NAME_STR( UCAL_WEEK_OF_YEAR );
+ FIELD_NAME_STR( UCAL_WEEK_OF_MONTH );
+ FIELD_NAME_STR( UCAL_DATE );
+ FIELD_NAME_STR( UCAL_DAY_OF_YEAR );
+ FIELD_NAME_STR( UCAL_DAY_OF_WEEK );
+ FIELD_NAME_STR( UCAL_DAY_OF_WEEK_IN_MONTH );
+ FIELD_NAME_STR( UCAL_AM_PM );
+ FIELD_NAME_STR( UCAL_HOUR );
+ FIELD_NAME_STR( UCAL_HOUR_OF_DAY );
+ FIELD_NAME_STR( UCAL_MINUTE );
+ FIELD_NAME_STR( UCAL_SECOND );
+ FIELD_NAME_STR( UCAL_MILLISECOND );
+ FIELD_NAME_STR( UCAL_ZONE_OFFSET );
+ FIELD_NAME_STR( UCAL_DST_OFFSET );
+ FIELD_NAME_STR( UCAL_YEAR_WOY );
+ FIELD_NAME_STR( UCAL_DOW_LOCAL );
+ FIELD_NAME_STR( UCAL_EXTENDED_YEAR );
+ FIELD_NAME_STR( UCAL_JULIAN_DAY );
+ FIELD_NAME_STR( UCAL_MILLISECONDS_IN_DAY );
+#undef FIELD_NAME_STR
+ default:
+ return UnicodeString("") + ((int32_t)f);
+ }
+}
+
+/**
+ * Test various API methods for API completeness.
+ */
+void
+CalendarTest::TestGenericAPI()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UDate d;
+ UnicodeString str;
+ UBool eq = FALSE,b4 = FALSE,af = FALSE;
+
+ UDate when = date(90, UCAL_APRIL, 15);
+
+ UnicodeString tzid("TestZone");
+ int32_t tzoffset = 123400;
+
+ SimpleTimeZone *zone = new SimpleTimeZone(tzoffset, tzid);
+ Calendar *cal = Calendar::createInstance(zone->clone(), status);
+ if (failure(status, "Calendar::createInstance")) return;
+
+ if (*zone != cal->getTimeZone()) errln("FAIL: Calendar::getTimeZone failed");
+
+ Calendar *cal2 = Calendar::createInstance(cal->getTimeZone(), status);
+ if (failure(status, "Calendar::createInstance")) return;
+ cal->setTime(when, status);
+ cal2->setTime(when, status);
+ if (failure(status, "Calendar::setTime")) return;
+
+ if (!(*cal == *cal2)) errln("FAIL: Calendar::operator== failed");
+ if ((*cal != *cal2)) errln("FAIL: Calendar::operator!= failed");
+ if (!cal->equals(*cal2, status) ||
+ cal->before(*cal2, status) ||
+ cal->after(*cal2, status) ||
+ U_FAILURE(status)) errln("FAIL: equals/before/after failed");
+
+ logln(UnicodeString("cal=") +cal->getTime(status) + UnicodeString(calToStr(*cal)));
+ logln(UnicodeString("cal2=") +cal2->getTime(status) + UnicodeString(calToStr(*cal2)));
+ logln("cal2->setTime(when+1000)");
+ cal2->setTime(when + 1000, status);
+ logln(UnicodeString("cal2=") +cal2->getTime(status) + UnicodeString(calToStr(*cal2)));
+
+ if (failure(status, "Calendar::setTime")) return;
+ if (cal->equals(*cal2, status) ||
+ cal2->before(*cal, status) ||
+ cal->after(*cal2, status) ||
+ U_FAILURE(status)) errln("FAIL: equals/before/after failed after setTime(+1000)");
+
+ logln("cal1->roll(UCAL_SECOND)");
+ cal->roll(UCAL_SECOND, (UBool) TRUE, status);
+ logln(UnicodeString("cal=") +cal->getTime(status) + UnicodeString(calToStr(*cal)));
+
+ if (failure(status, "Calendar::roll")) return;
+ if (!(eq=cal->equals(*cal2, status)) ||
+ (b4=cal->before(*cal2, status)) ||
+ (af=cal->after(*cal2, status)) ||
+ U_FAILURE(status)) {
+ errln("FAIL: equals[%c]/before[%c]/after[%c] failed after roll 1 second [should be T/F/F]",
+ eq?'T':'F',
+ b4?'T':'F',
+ af?'T':'F');
+ logln(UnicodeString("cal=") +cal->getTime(status) + UnicodeString(calToStr(*cal)));
+ logln(UnicodeString("cal2=") +cal2->getTime(status) + UnicodeString(calToStr(*cal2)));
+ }
+
+ // Roll back to January
+ cal->roll(UCAL_MONTH, (int32_t)(1 + UCAL_DECEMBER - cal->get(UCAL_MONTH, status)), status);
+ if (failure(status, "Calendar::roll")) return;
+ if (cal->equals(*cal2, status) ||
+ cal2->before(*cal, status) ||
+ cal->after(*cal2, status) ||
+ U_FAILURE(status)) errln("FAIL: equals/before/after failed after rollback to January");
+
+ TimeZone *z = cal->orphanTimeZone();
+ if (z->getID(str) != tzid ||
+ z->getRawOffset() != tzoffset)
+ errln("FAIL: orphanTimeZone failed");
+
+ int32_t i;
+ for (i=0; i<2; ++i)
+ {
+ UBool lenient = ( i > 0 );
+ cal->setLenient(lenient);
+ if (lenient != cal->isLenient()) errln("FAIL: setLenient/isLenient failed");
+ // Later: Check for lenient behavior
+ }
+
+ for (i=UCAL_SUNDAY; i<=UCAL_SATURDAY; ++i)
+ {
+ cal->setFirstDayOfWeek((UCalendarDaysOfWeek)i);
+ if (cal->getFirstDayOfWeek() != i) errln("FAIL: set/getFirstDayOfWeek failed");
+ UErrorCode aStatus = U_ZERO_ERROR;
+ if (cal->getFirstDayOfWeek(aStatus) != i || U_FAILURE(aStatus)) errln("FAIL: getFirstDayOfWeek(status) failed");
+ }
+
+ for (i=1; i<=7; ++i)
+ {
+ cal->setMinimalDaysInFirstWeek((uint8_t)i);
+ if (cal->getMinimalDaysInFirstWeek() != i) errln("FAIL: set/getFirstDayOfWeek failed");
+ }
+
+ for (i=0; i<UCAL_FIELD_COUNT; ++i)
+ {
+ if (cal->getMinimum((UCalendarDateFields)i) != cal->getGreatestMinimum((UCalendarDateFields)i))
+ errln("FAIL: getMinimum doesn't match getGreatestMinimum for field " + i);
+ if (cal->getLeastMaximum((UCalendarDateFields)i) > cal->getMaximum((UCalendarDateFields)i))
+ errln("FAIL: getLeastMaximum larger than getMaximum for field " + i);
+ if (cal->getMinimum((UCalendarDateFields)i) >= cal->getMaximum((UCalendarDateFields)i))
+ errln("FAIL: getMinimum not less than getMaximum for field " + i);
+ }
+
+ cal->adoptTimeZone(TimeZone::createDefault());
+ cal->clear();
+ cal->set(1984, 5, 24);
+ if (cal->getTime(status) != date(84, 5, 24) || U_FAILURE(status))
+ errln("FAIL: Calendar::set(3 args) failed");
+
+ cal->clear();
+ cal->set(1985, 3, 2, 11, 49);
+ if (cal->getTime(status) != date(85, 3, 2, 11, 49) || U_FAILURE(status))
+ errln("FAIL: Calendar::set(5 args) failed");
+
+ cal->clear();
+ cal->set(1995, 9, 12, 1, 39, 55);
+ if (cal->getTime(status) != date(95, 9, 12, 1, 39, 55) || U_FAILURE(status))
+ errln("FAIL: Calendar::set(6 args) failed");
+
+ cal->getTime(status);
+ if (failure(status, "Calendar::getTime")) return;
+ for (i=0; i<UCAL_FIELD_COUNT; ++i)
+ {
+ switch(i) {
+ case UCAL_YEAR: case UCAL_MONTH: case UCAL_DATE:
+ case UCAL_HOUR_OF_DAY: case UCAL_MINUTE: case UCAL_SECOND:
+ case UCAL_EXTENDED_YEAR:
+ if (!cal->isSet((UCalendarDateFields)i)) errln("FAIL: Calendar::isSet F, should be T " + fieldName((UCalendarDateFields)i));
+ break;
+ default:
+ if (cal->isSet((UCalendarDateFields)i)) errln("FAIL: Calendar::isSet = T, should be F " + fieldName((UCalendarDateFields)i));
+ }
+ cal->clear((UCalendarDateFields)i);
+ if (cal->isSet((UCalendarDateFields)i)) errln("FAIL: Calendar::clear/isSet failed " + fieldName((UCalendarDateFields)i));
+ }
+
+ delete cal;
+ delete cal2;
+
+ int32_t count;
+ const Locale* loc = Calendar::getAvailableLocales(count);
+ if (count < 1 || loc == 0)
+ {
+ errln("FAIL: getAvailableLocales failed");
+ }
+ else
+ {
+ for (i=0; i<count; ++i)
+ {
+ cal = Calendar::createInstance(loc[i], status);
+ if (failure(status, "Calendar::createInstance")) return;
+ delete cal;
+ }
+ }
+
+ cal = Calendar::createInstance(TimeZone::createDefault(), Locale::getEnglish(), status);
+ if (failure(status, "Calendar::createInstance")) return;
+ delete cal;
+
+ cal = Calendar::createInstance(*zone, Locale::getEnglish(), status);
+ if (failure(status, "Calendar::createInstance")) return;
+ delete cal;
+
+ GregorianCalendar *gc = new GregorianCalendar(*zone, status);
+ if (failure(status, "new GregorianCalendar")) return;
+ delete gc;
+
+ gc = new GregorianCalendar(Locale::getEnglish(), status);
+ if (failure(status, "new GregorianCalendar")) return;
+ delete gc;
+
+ gc = new GregorianCalendar(Locale::getEnglish(), status);
+ delete gc;
+
+ gc = new GregorianCalendar(*zone, Locale::getEnglish(), status);
+ if (failure(status, "new GregorianCalendar")) return;
+ delete gc;
+
+ gc = new GregorianCalendar(zone, status);
+ if (failure(status, "new GregorianCalendar")) return;
+ delete gc;
+
+ gc = new GregorianCalendar(1998, 10, 14, 21, 43, status);
+ if (gc->getTime(status) != (d =date(98, 10, 14, 21, 43) )|| U_FAILURE(status))
+ errln("FAIL: new GregorianCalendar(ymdhm) failed with " + UnicodeString(u_errorName(status)) + ", cal=" + gc->getTime(status) + UnicodeString(calToStr(*gc)) + ", d=" + d);
+ else
+ logln(UnicodeString("GOOD: cal=") +gc->getTime(status) + UnicodeString(calToStr(*gc)) + ", d=" + d);
+ delete gc;
+
+ gc = new GregorianCalendar(1998, 10, 14, 21, 43, 55, status);
+ if (gc->getTime(status) != (d=date(98, 10, 14, 21, 43, 55)) || U_FAILURE(status))
+ errln("FAIL: new GregorianCalendar(ymdhms) failed with " + UnicodeString(u_errorName(status)));
+
+ GregorianCalendar gc2(Locale::getEnglish(), status);
+ if (failure(status, "new GregorianCalendar")) return;
+ gc2 = *gc;
+ if (gc2 != *gc || !(gc2 == *gc)) errln("FAIL: GregorianCalendar assignment/operator==/operator!= failed");
+ delete gc;
+ delete z;
+}
+
+// -------------------------------------
+
+/**
+ * This test confirms the correct behavior of add when incrementing
+ * through subsequent days.
+ */
+void
+CalendarTest::TestRog()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar* gc = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ int32_t year = 1997, month = UCAL_APRIL, date = 1;
+ gc->set(year, month, date);
+ gc->set(UCAL_HOUR_OF_DAY, 23);
+ gc->set(UCAL_MINUTE, 0);
+ gc->set(UCAL_SECOND, 0);
+ gc->set(UCAL_MILLISECOND, 0);
+ for (int32_t i = 0; i < 9; i++, gc->add(UCAL_DATE, 1, status)) {
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ if (gc->get(UCAL_YEAR, status) != year ||
+ gc->get(UCAL_MONTH, status) != month ||
+ gc->get(UCAL_DATE, status) != (date + i)) errln("FAIL: Date wrong");
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ }
+ delete gc;
+}
+
+// -------------------------------------
+
+/**
+ * Test the handling of the day of the week, checking for correctness and
+ * for correct minimum and maximum values.
+ */
+void
+CalendarTest::TestDOW943()
+{
+ dowTest(FALSE);
+ dowTest(TRUE);
+}
+
+void CalendarTest::dowTest(UBool lenient)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar* cal = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ logln("cal - Aug 12, 1997\n");
+ cal->set(1997, UCAL_AUGUST, 12);
+ cal->getTime(status);
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ logln((lenient?UnicodeString("LENIENT0: "):UnicodeString("nonlenient0: ")) + UnicodeString(calToStr(*cal)));
+ cal->setLenient(lenient);
+ logln("cal - Dec 1, 1996\n");
+ cal->set(1996, UCAL_DECEMBER, 1);
+ logln((lenient?UnicodeString("LENIENT: "):UnicodeString("nonlenient: ")) + UnicodeString(calToStr(*cal)));
+ int32_t dow = cal->get(UCAL_DAY_OF_WEEK, status);
+ if (U_FAILURE(status)) { errln("Calendar::get failed [%s]", u_errorName(status)); return; }
+ int32_t min = cal->getMinimum(UCAL_DAY_OF_WEEK);
+ int32_t max = cal->getMaximum(UCAL_DAY_OF_WEEK);
+ if (dow < min ||
+ dow > max) errln(UnicodeString("FAIL: Day of week ") + (int32_t)dow + " out of range");
+ if (dow != UCAL_SUNDAY) errln("FAIL: Day of week should be SUNDAY[%d] not %d", UCAL_SUNDAY, dow);
+ if (min != UCAL_SUNDAY ||
+ max != UCAL_SATURDAY) errln("FAIL: Min/max bad");
+ delete cal;
+}
+
+// -------------------------------------
+
+/**
+ * Confirm that cloned Calendar objects do not inadvertently share substructures.
+ */
+void
+CalendarTest::TestClonesUnique908()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *c = Calendar::createInstance(status);
+ if (U_FAILURE(status)) { errln("Calendar::createInstance failed"); return; }
+ Calendar *d = (Calendar*) c->clone();
+ c->set(UCAL_MILLISECOND, 123);
+ d->set(UCAL_MILLISECOND, 456);
+ if (c->get(UCAL_MILLISECOND, status) != 123 ||
+ d->get(UCAL_MILLISECOND, status) != 456) {
+ errln("FAIL: Clones share fields");
+ }
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ delete c;
+ delete d;
+}
+
+// -------------------------------------
+
+/**
+ * Confirm that the Gregorian cutoff value works as advertised.
+ */
+void
+CalendarTest::TestGregorianChange768()
+{
+ UBool b;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString str;
+ GregorianCalendar* c = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ logln(UnicodeString("With cutoff ") + dateToString(c->getGregorianChange(), str));
+ b = c->isLeapYear(1800);
+ logln(UnicodeString(" isLeapYear(1800) = ") + (b ? "true" : "false"));
+ logln(UnicodeString(" (should be FALSE)"));
+ if (b) errln("FAIL");
+ c->setGregorianChange(date(0, 0, 1), status);
+ if (U_FAILURE(status)) { errln("GregorianCalendar::setGregorianChange failed"); return; }
+ logln(UnicodeString("With cutoff ") + dateToString(c->getGregorianChange(), str));
+ b = c->isLeapYear(1800);
+ logln(UnicodeString(" isLeapYear(1800) = ") + (b ? "true" : "false"));
+ logln(UnicodeString(" (should be TRUE)"));
+ if (!b) errln("FAIL");
+ delete c;
+}
+
+// -------------------------------------
+
+/**
+ * Confirm the functioning of the field disambiguation algorithm.
+ */
+void
+CalendarTest::TestDisambiguation765()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *c = Calendar::createInstance("en_US", status);
+ if (U_FAILURE(status)) { errln("Calendar::createInstance failed"); return; }
+ c->setLenient(FALSE);
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_MONTH, UCAL_JUNE);
+ c->set(UCAL_DATE, 3);
+ verify765("1997 third day of June = ", c, 1997, UCAL_JUNE, 3);
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_MONTH, UCAL_JUNE);
+ c->set(UCAL_DAY_OF_WEEK_IN_MONTH, 1);
+ verify765("1997 first Tuesday in June = ", c, 1997, UCAL_JUNE, 3);
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_MONTH, UCAL_JUNE);
+ c->set(UCAL_DAY_OF_WEEK_IN_MONTH, - 1);
+ verify765("1997 last Tuesday in June = ", c, 1997, UCAL_JUNE, 24);
+ // IllegalArgumentException e = null;
+ status = U_ZERO_ERROR;
+ //try {
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_MONTH, UCAL_JUNE);
+ c->set(UCAL_DAY_OF_WEEK_IN_MONTH, 0);
+ c->getTime(status);
+ //}
+ //catch(IllegalArgumentException ex) {
+ // e = ex;
+ //}
+ verify765("1997 zero-th Tuesday in June = ", status);
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_MONTH, UCAL_JUNE);
+ c->set(UCAL_WEEK_OF_MONTH, 1);
+ verify765("1997 Tuesday in week 1 of June = ", c, 1997, UCAL_JUNE, 3);
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_MONTH, UCAL_JUNE);
+ c->set(UCAL_WEEK_OF_MONTH, 5);
+ verify765("1997 Tuesday in week 5 of June = ", c, 1997, UCAL_JULY, 1);
+ status = U_ZERO_ERROR;
+ //try {
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_MONTH, UCAL_JUNE);
+ c->set(UCAL_WEEK_OF_MONTH, 0);
+ verify765("1997 Tuesday in week 0 of June = ", c, 1997, UCAL_MAY, 27);
+ //}
+ //catch(IllegalArgumentException ex) {
+ // errln("FAIL: Exception seen:");
+ // ex.printStackTrace(log);
+ //}
+ /* Note: The following test used to expect YEAR 1997, WOY 1 to
+ * resolve to a date in Dec 1996; that is, to behave as if
+ * YEAR_WOY were 1997. With the addition of a new explicit
+ * YEAR_WOY field, YEAR_WOY must itself be set if that is what is
+ * desired. Using YEAR in combination with WOY is ambiguous, and
+ * results in the first WOY/DOW day of the year satisfying the
+ * given fields (there may be up to two such days). In this case,
+ * it propertly resolves to Tue Dec 30 1997, which has a WOY value
+ * of 1 (for YEAR_WOY 1998) and a DOW of Tuesday, and falls in the
+ * _calendar_ year 1997, as specified. - aliu */
+ c->clear();
+ c->set(UCAL_YEAR_WOY, 1997); // aliu
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_WEEK_OF_YEAR, 1);
+ verify765("1997 Tuesday in week 1 of yearWOY = ", c, 1996, UCAL_DECEMBER, 31);
+ c->clear(); // - add test for YEAR
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_WEEK_OF_YEAR, 1);
+ verify765("1997 Tuesday in week 1 of year = ", c, 1997, UCAL_DECEMBER, 30);
+ c->clear();
+ c->set(UCAL_YEAR, 1997);
+ c->set(UCAL_DAY_OF_WEEK, UCAL_TUESDAY);
+ c->set(UCAL_WEEK_OF_YEAR, 10);
+ verify765("1997 Tuesday in week 10 of year = ", c, 1997, UCAL_MARCH, 4);
+ //try {
+
+ // {sfb} week 0 is no longer a valid week of year
+ /*c->clear();
+ c->set(Calendar::YEAR, 1997);
+ c->set(Calendar::DAY_OF_WEEK, Calendar::TUESDAY);
+ //c->set(Calendar::WEEK_OF_YEAR, 0);
+ c->set(Calendar::WEEK_OF_YEAR, 1);
+ verify765("1997 Tuesday in week 0 of year = ", c, 1996, Calendar::DECEMBER, 24);*/
+
+ //}
+ //catch(IllegalArgumentException ex) {
+ // errln("FAIL: Exception seen:");
+ // ex.printStackTrace(log);
+ //}
+ delete c;
+}
+
+// -------------------------------------
+
+void
+CalendarTest::verify765(const UnicodeString& msg, Calendar* c, int32_t year, int32_t month, int32_t day)
+{
+ UnicodeString str;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t y = c->get(UCAL_YEAR, status);
+ int32_t m = c->get(UCAL_MONTH, status);
+ int32_t d = c->get(UCAL_DATE, status);
+ if ( y == year &&
+ m == month &&
+ d == day) {
+ if (U_FAILURE(status)) { errln("FAIL: Calendar::get failed"); return; }
+ logln("PASS: " + msg + dateToString(c->getTime(status), str));
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ }
+ else {
+ errln("FAIL: " + msg + dateToString(c->getTime(status), str) + "; expected " + (int32_t)year + "/" + (int32_t)(month + 1) + "/" + (int32_t)day +
+ "; got " + (int32_t)y + "/" + (int32_t)(m + 1) + "/" + (int32_t)d + " for Locale: " + c->getLocaleID(ULOC_ACTUAL_LOCALE,status));
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ }
+}
+
+// -------------------------------------
+
+void
+CalendarTest::verify765(const UnicodeString& msg/*, IllegalArgumentException e*/, UErrorCode status)
+{
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) errln("FAIL: No IllegalArgumentException for " + msg);
+ else logln("PASS: " + msg + "IllegalArgument as expected");
+}
+
+// -------------------------------------
+
+/**
+ * Confirm that the offset between local time and GMT behaves as expected.
+ */
+void
+CalendarTest::TestGMTvsLocal4064654()
+{
+ test4064654(1997, 1, 1, 12, 0, 0);
+ test4064654(1997, 4, 16, 18, 30, 0);
+}
+
+// -------------------------------------
+
+void
+CalendarTest::test4064654(int32_t yr, int32_t mo, int32_t dt, int32_t hr, int32_t mn, int32_t sc)
+{
+ UDate date;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString str;
+ Calendar *gmtcal = Calendar::createInstance(status);
+ if (U_FAILURE(status)) { errln("Calendar::createInstance failed"); return; }
+ gmtcal->adoptTimeZone(TimeZone::createTimeZone("Africa/Casablanca"));
+ gmtcal->set(yr, mo - 1, dt, hr, mn, sc);
+ gmtcal->set(UCAL_MILLISECOND, 0);
+ date = gmtcal->getTime(status);
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ logln("date = " + dateToString(date, str));
+ Calendar *cal = Calendar::createInstance(status);
+ if (U_FAILURE(status)) { errln("Calendar::createInstance failed"); return; }
+ cal->setTime(date, status);
+ if (U_FAILURE(status)) { errln("Calendar::setTime failed"); return; }
+ int32_t offset = cal->getTimeZone().getOffset((uint8_t)cal->get(UCAL_ERA, status),
+ cal->get(UCAL_YEAR, status),
+ cal->get(UCAL_MONTH, status),
+ cal->get(UCAL_DATE, status),
+ (uint8_t)cal->get(UCAL_DAY_OF_WEEK, status),
+ cal->get(UCAL_MILLISECOND, status), status);
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ logln("offset for " + dateToString(date, str) + "= " + (offset / 1000 / 60 / 60.0) + "hr");
+ int32_t utc = ((cal->get(UCAL_HOUR_OF_DAY, status) * 60 +
+ cal->get(UCAL_MINUTE, status)) * 60 +
+ cal->get(UCAL_SECOND, status)) * 1000 +
+ cal->get(UCAL_MILLISECOND, status) - offset;
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ int32_t expected = ((hr * 60 + mn) * 60 + sc) * 1000;
+ if (utc != expected) errln(UnicodeString("FAIL: Discrepancy of ") + (utc - expected) +
+ " millis = " + ((utc - expected) / 1000 / 60 / 60.0) + " hr");
+ delete gmtcal;
+ delete cal;
+}
+
+// -------------------------------------
+
+/**
+ * The operations of adding and setting should not exhibit pathological
+ * dependence on the order of operations. This test checks for this.
+ */
+void
+CalendarTest::TestAddSetOrder621()
+{
+ UDate d = date(97, 4, 14, 13, 23, 45);
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::createInstance failed");
+ delete cal;
+ return;
+ }
+ cal->setTime(d, status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::setTime failed");
+ delete cal;
+ return;
+ }
+ cal->add(UCAL_DATE, - 5, status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::add failed");
+ delete cal;
+ return;
+ }
+ cal->set(UCAL_HOUR_OF_DAY, 0);
+ cal->set(UCAL_MINUTE, 0);
+ cal->set(UCAL_SECOND, 0);
+ UnicodeString s;
+ dateToString(cal->getTime(status), s);
+ if (U_FAILURE(status)) {
+ errln("Calendar::getTime failed");
+ delete cal;
+ return;
+ }
+ delete cal;
+
+ cal = Calendar::createInstance(status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::createInstance failed");
+ delete cal;
+ return;
+ }
+ cal->setTime(d, status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::setTime failed");
+ delete cal;
+ return;
+ }
+ cal->set(UCAL_HOUR_OF_DAY, 0);
+ cal->set(UCAL_MINUTE, 0);
+ cal->set(UCAL_SECOND, 0);
+ cal->add(UCAL_DATE, - 5, status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::add failed");
+ delete cal;
+ return;
+ }
+ UnicodeString s2;
+ dateToString(cal->getTime(status), s2);
+ if (U_FAILURE(status)) {
+ errln("Calendar::getTime failed");
+ delete cal;
+ return;
+ }
+ if (s == s2)
+ logln("Pass: " + s + " == " + s2);
+ else
+ errln("FAIL: " + s + " != " + s2);
+ delete cal;
+}
+
+// -------------------------------------
+
+/**
+ * Confirm that adding to various fields works.
+ */
+void
+CalendarTest::TestAdd520()
+{
+ int32_t y = 1997, m = UCAL_FEBRUARY, d = 1;
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *temp = new GregorianCalendar(y, m, d, status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ check520(temp, y, m, d);
+ temp->add(UCAL_YEAR, 1, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ y++;
+ check520(temp, y, m, d);
+ temp->add(UCAL_MONTH, 1, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ m++;
+ check520(temp, y, m, d);
+ temp->add(UCAL_DATE, 1, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ d++;
+ check520(temp, y, m, d);
+ temp->add(UCAL_DATE, 2, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ d += 2;
+ check520(temp, y, m, d);
+ temp->add(UCAL_DATE, 28, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ d = 1;++m;
+ check520(temp, y, m, d);
+ delete temp;
+}
+
+// -------------------------------------
+
+/**
+ * Execute adding and rolling in GregorianCalendar extensively,
+ */
+void
+CalendarTest::TestAddRollExtensive()
+{
+ int32_t maxlimit = 40;
+ int32_t y = 1997, m = UCAL_FEBRUARY, d = 1, hr = 1, min = 1, sec = 0, ms = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *temp = new GregorianCalendar(y, m, d, status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+
+ temp->set(UCAL_HOUR, hr);
+ temp->set(UCAL_MINUTE, min);
+ temp->set(UCAL_SECOND, sec);
+ temp->set(UCAL_MILLISECOND, ms);
+
+ UCalendarDateFields e;
+
+ logln("Testing GregorianCalendar add...");
+ e = UCAL_YEAR;
+ while (e < UCAL_FIELD_COUNT) {
+ int32_t i;
+ int32_t limit = maxlimit;
+ status = U_ZERO_ERROR;
+ for (i = 0; i < limit; i++) {
+ temp->add(e, 1, status);
+ if (U_FAILURE(status)) { limit = i; status = U_ZERO_ERROR; }
+ }
+ for (i = 0; i < limit; i++) {
+ temp->add(e, -1, status);
+ if (U_FAILURE(status)) { errln("GregorianCalendar::add -1 failed"); return; }
+ }
+ check520(temp, y, m, d, hr, min, sec, ms, e);
+
+ e = (UCalendarDateFields) ((int32_t) e + 1);
+ }
+
+ logln("Testing GregorianCalendar roll...");
+ e = UCAL_YEAR;
+ while (e < UCAL_FIELD_COUNT) {
+ int32_t i;
+ int32_t limit = maxlimit;
+ status = U_ZERO_ERROR;
+ for (i = 0; i < limit; i++) {
+ logln(calToStr(*temp) + UnicodeString(" " ) + fieldName(e) + UnicodeString("++") );
+ temp->roll(e, 1, status);
+ if (U_FAILURE(status)) {
+ logln("caltest.cpp:%d e=%d, i=%d - roll(+) err %s\n", __LINE__, (int) e, (int) i, u_errorName(status));
+ logln(calToStr(*temp));
+ limit = i; status = U_ZERO_ERROR;
+ }
+ }
+ for (i = 0; i < limit; i++) {
+ logln("caltest.cpp:%d e=%d, i=%d\n", __LINE__, (int) e, (int) i);
+ logln(calToStr(*temp) + UnicodeString(" " ) + fieldName(e) + UnicodeString("--") );
+ temp->roll(e, -1, status);
+ if (U_FAILURE(status)) { errln(UnicodeString("GregorianCalendar::roll ") + CalendarTest::fieldName(e) + " count=" + UnicodeString('@'+i) + " by -1 failed with " + u_errorName(status) ); return; }
+ }
+ check520(temp, y, m, d, hr, min, sec, ms, e);
+
+ e = (UCalendarDateFields) ((int32_t) e + 1);
+ }
+
+ delete temp;
+}
+
+// -------------------------------------
+void
+CalendarTest::check520(Calendar* c,
+ int32_t y, int32_t m, int32_t d,
+ int32_t hr, int32_t min, int32_t sec,
+ int32_t ms, UCalendarDateFields field)
+
+{
+ UErrorCode status = U_ZERO_ERROR;
+ if (c->get(UCAL_YEAR, status) != y ||
+ c->get(UCAL_MONTH, status) != m ||
+ c->get(UCAL_DATE, status) != d ||
+ c->get(UCAL_HOUR, status) != hr ||
+ c->get(UCAL_MINUTE, status) != min ||
+ c->get(UCAL_SECOND, status) != sec ||
+ c->get(UCAL_MILLISECOND, status) != ms) {
+ errln(UnicodeString("U_FAILURE for field ") + (int32_t)field +
+ ": Expected y/m/d h:m:s:ms of " +
+ y + "/" + (m + 1) + "/" + d + " " +
+ hr + ":" + min + ":" + sec + ":" + ms +
+ "; got " + c->get(UCAL_YEAR, status) +
+ "/" + (c->get(UCAL_MONTH, status) + 1) +
+ "/" + c->get(UCAL_DATE, status) +
+ " " + c->get(UCAL_HOUR, status) + ":" +
+ c->get(UCAL_MINUTE, status) + ":" +
+ c->get(UCAL_SECOND, status) + ":" +
+ c->get(UCAL_MILLISECOND, status)
+ );
+
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ }
+ else
+ logln(UnicodeString("Confirmed: ") + y + "/" +
+ (m + 1) + "/" + d + " " +
+ hr + ":" + min + ":" + sec + ":" + ms);
+}
+
+// -------------------------------------
+void
+CalendarTest::check520(Calendar* c,
+ int32_t y, int32_t m, int32_t d)
+
+{
+ UErrorCode status = U_ZERO_ERROR;
+ if (c->get(UCAL_YEAR, status) != y ||
+ c->get(UCAL_MONTH, status) != m ||
+ c->get(UCAL_DATE, status) != d) {
+ errln(UnicodeString("FAILURE: Expected y/m/d of ") +
+ y + "/" + (m + 1) + "/" + d + " " +
+ "; got " + c->get(UCAL_YEAR, status) +
+ "/" + (c->get(UCAL_MONTH, status) + 1) +
+ "/" + c->get(UCAL_DATE, status)
+ );
+
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ }
+ else
+ logln(UnicodeString("Confirmed: ") + y + "/" +
+ (m + 1) + "/" + d);
+}
+
+// -------------------------------------
+
+/**
+ * Test that setting of fields works. In particular, make sure that all instances
+ * of GregorianCalendar don't share a static instance of the fields array.
+ */
+void
+CalendarTest::TestFieldSet4781()
+{
+ // try {
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *g = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ GregorianCalendar *g2 = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ g2->set(UCAL_HOUR, 12, status);
+ g2->set(UCAL_MINUTE, 0, status);
+ g2->set(UCAL_SECOND, 0, status);
+ if (U_FAILURE(status)) { errln("Calendar::set failed"); return; }
+ if (*g == *g2) logln("Same");
+ else logln("Different");
+ //}
+ //catch(IllegalArgumentException e) {
+ //errln("Unexpected exception seen: " + e);
+ //}
+ delete g;
+ delete g2;
+}
+
+// -------------------------------------
+
+/* We don't support serialization on C++
+void
+CalendarTest::TestSerialize337()
+{
+ Calendar cal = Calendar::getInstance();
+ UBool ok = FALSE;
+ try {
+ FileOutputStream f = new FileOutputStream(FILENAME);
+ ObjectOutput s = new ObjectOutputStream(f);
+ s.writeObject(PREFIX);
+ s.writeObject(cal);
+ s.writeObject(POSTFIX);
+ f.close();
+ FileInputStream in = new FileInputStream(FILENAME);
+ ObjectInputStream t = new ObjectInputStream(in);
+ UnicodeString& pre = (UnicodeString&) t.readObject();
+ Calendar c = (Calendar) t.readObject();
+ UnicodeString& post = (UnicodeString&) t.readObject();
+ in.close();
+ ok = pre.equals(PREFIX) &&
+ post.equals(POSTFIX) &&
+ cal->equals(c);
+ File fl = new File(FILENAME);
+ fl.delete();
+ }
+ catch(IOException e) {
+ errln("FAIL: Exception received:");
+ e.printStackTrace(log);
+ }
+ catch(ClassNotFoundException e) {
+ errln("FAIL: Exception received:");
+ e.printStackTrace(log);
+ }
+ if (!ok) errln("Serialization of Calendar object failed.");
+}
+
+UnicodeString& CalendarTest::PREFIX = "abc";
+
+UnicodeString& CalendarTest::POSTFIX = "def";
+
+UnicodeString& CalendarTest::FILENAME = "tmp337.bin";
+ */
+
+// -------------------------------------
+
+/**
+ * Verify that the seconds of a Calendar can be zeroed out through the
+ * expected sequence of operations.
+ */
+void
+CalendarTest::TestSecondsZero121()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ cal->setTime(Calendar::getNow(), status);
+ if (U_FAILURE(status)) { errln("Calendar::setTime failed"); return; }
+ cal->set(UCAL_SECOND, 0);
+ if (U_FAILURE(status)) { errln("Calendar::set failed"); return; }
+ UDate d = cal->getTime(status);
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ UnicodeString s;
+ dateToString(d, s);
+ if (s.indexOf(":00 ") < 0) errln("Expected to see :00 in " + s);
+ delete cal;
+}
+
+// -------------------------------------
+
+/**
+ * Verify that a specific sequence of adding and setting works as expected;
+ * it should not vary depending on when and whether the get method is
+ * called.
+ */
+void
+CalendarTest::TestAddSetGet0610()
+{
+ UnicodeString EXPECTED_0610("1993/0/5", "");
+ UErrorCode status = U_ZERO_ERROR;
+ {
+ Calendar *calendar = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ calendar->set(1993, UCAL_JANUARY, 4);
+ logln("1A) " + value(calendar));
+ calendar->add(UCAL_DATE, 1, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ UnicodeString v = value(calendar);
+ logln("1B) " + v);
+ logln("--) 1993/0/5");
+ if (!(v == EXPECTED_0610)) errln("Expected " + EXPECTED_0610 + "; saw " + v);
+ delete calendar;
+ }
+ {
+ Calendar *calendar = new GregorianCalendar(1993, UCAL_JANUARY, 4, status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ logln("2A) " + value(calendar));
+ calendar->add(UCAL_DATE, 1, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ UnicodeString v = value(calendar);
+ logln("2B) " + v);
+ logln("--) 1993/0/5");
+ if (!(v == EXPECTED_0610)) errln("Expected " + EXPECTED_0610 + "; saw " + v);
+ delete calendar;
+ }
+ {
+ Calendar *calendar = new GregorianCalendar(1993, UCAL_JANUARY, 4, status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ logln("3A) " + value(calendar));
+ calendar->getTime(status);
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ calendar->add(UCAL_DATE, 1, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ UnicodeString v = value(calendar);
+ logln("3B) " + v);
+ logln("--) 1993/0/5");
+ if (!(v == EXPECTED_0610)) errln("Expected " + EXPECTED_0610 + "; saw " + v);
+ delete calendar;
+ }
+}
+
+// -------------------------------------
+
+UnicodeString
+CalendarTest::value(Calendar* calendar)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ return UnicodeString("") + (int32_t)calendar->get(UCAL_YEAR, status) +
+ "/" + (int32_t)calendar->get(UCAL_MONTH, status) +
+ "/" + (int32_t)calendar->get(UCAL_DATE, status) +
+ (U_FAILURE(status) ? " FAIL: Calendar::get failed" : "");
+}
+
+
+// -------------------------------------
+
+/**
+ * Verify that various fields on a known date are set correctly.
+ */
+void
+CalendarTest::TestFields060()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t year = 1997;
+ int32_t month = UCAL_OCTOBER;
+ int32_t dDate = 22;
+ GregorianCalendar *calendar = 0;
+ calendar = new GregorianCalendar(year, month, dDate, status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ for (int32_t i = 0; i < EXPECTED_FIELDS_length;) {
+ UCalendarDateFields field = (UCalendarDateFields)EXPECTED_FIELDS[i++];
+ int32_t expected = EXPECTED_FIELDS[i++];
+ if (calendar->get(field, status) != expected) {
+ errln(UnicodeString("Expected field ") + (int32_t)field + " to have value " + (int32_t)expected +
+ "; received " + (int32_t)calendar->get(field, status) + " instead");
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ }
+ }
+ delete calendar;
+}
+
+int32_t CalendarTest::EXPECTED_FIELDS[] = {
+ UCAL_YEAR, 1997,
+ UCAL_MONTH, UCAL_OCTOBER,
+ UCAL_DATE, 22,
+ UCAL_DAY_OF_WEEK, UCAL_WEDNESDAY,
+ UCAL_DAY_OF_WEEK_IN_MONTH, 4,
+ UCAL_DAY_OF_YEAR, 295
+};
+
+const int32_t CalendarTest::EXPECTED_FIELDS_length = (int32_t)(sizeof(CalendarTest::EXPECTED_FIELDS) /
+ sizeof(CalendarTest::EXPECTED_FIELDS[0]));
+
+// -------------------------------------
+
+/**
+ * Verify that various fields on a known date are set correctly. In this
+ * case, the start of the epoch (January 1 1970).
+ */
+void
+CalendarTest::TestEpochStartFields()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone *z = TimeZone::createDefault();
+ Calendar *c = Calendar::createInstance(status);
+ if (U_FAILURE(status)) { errln("Calendar::createInstance failed"); return; }
+ UDate d = - z->getRawOffset();
+ GregorianCalendar *gc = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ gc->setTimeZone(*z);
+ gc->setTime(d, status);
+ if (U_FAILURE(status)) { errln("Calendar::setTime failed"); return; }
+ UBool idt = gc->inDaylightTime(status);
+ if (U_FAILURE(status)) { errln("GregorianCalendar::inDaylightTime failed"); return; }
+ if (idt) {
+ UnicodeString str;
+ logln("Warning: Skipping test because " + dateToString(d, str) + " is in DST.");
+ }
+ else {
+ c->setTime(d, status);
+ if (U_FAILURE(status)) { errln("Calendar::setTime failed"); return; }
+ for (int32_t i = 0; i < UCAL_ZONE_OFFSET;++i) {
+ if (c->get((UCalendarDateFields)i, status) != EPOCH_FIELDS[i])
+ errln(UnicodeString("Expected field ") + i + " to have value " + EPOCH_FIELDS[i] +
+ "; saw " + c->get((UCalendarDateFields)i, status) + " instead");
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ }
+ if (c->get(UCAL_ZONE_OFFSET, status) != z->getRawOffset())
+ {
+ errln(UnicodeString("Expected field ZONE_OFFSET to have value ") + z->getRawOffset() +
+ "; saw " + c->get(UCAL_ZONE_OFFSET, status) + " instead");
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ }
+ if (c->get(UCAL_DST_OFFSET, status) != 0)
+ {
+ errln(UnicodeString("Expected field DST_OFFSET to have value 0") +
+ "; saw " + c->get(UCAL_DST_OFFSET, status) + " instead");
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ }
+ }
+ delete c;
+ delete z;
+ delete gc;
+}
+
+int32_t CalendarTest::EPOCH_FIELDS[] = {
+ 1, 1970, 0, 1, 1, 1, 1, 5, 1, 0, 0, 0, 0, 0, 0, - 28800000, 0
+};
+
+// -------------------------------------
+
+/**
+ * Test that the days of the week progress properly when add is called repeatedly
+ * for increments of 24 days.
+ */
+void
+CalendarTest::TestDOWProgression()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = new GregorianCalendar(1972, UCAL_OCTOBER, 26, status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ marchByDelta(cal, 24);
+ delete cal;
+}
+
+// -------------------------------------
+
+void
+CalendarTest::TestDOW_LOCALandYEAR_WOY()
+{
+ /* Note: I've commented out the loop_addroll tests for YEAR and
+ * YEAR_WOY below because these two fields should NOT behave
+ * identically when adding. YEAR should keep the month/dom
+ * invariant. YEAR_WOY should keep the woy/dow invariant. I've
+ * added a new test that checks for this in place of the old call
+ * to loop_addroll. - aliu */
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t times = 20;
+ Calendar *cal=Calendar::createInstance(Locale::getGermany(), status);
+ if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
+ SimpleDateFormat *sdf=new SimpleDateFormat(UnicodeString("YYYY'-W'ww-ee"), Locale::getGermany(), status);
+ if (U_FAILURE(status)) { errln("Couldn't create SimpleDateFormat"); return; }
+
+ // ICU no longer use localized date-time pattern characters by default.
+ // So we set pattern chars using 'J' instead of 'Y'.
+ DateFormatSymbols *dfs = new DateFormatSymbols(Locale::getGermany(), status);
+ dfs->setLocalPatternChars(UnicodeString("GyMdkHmsSEDFwWahKzJeugAZvcLQq"));
+ sdf->adoptDateFormatSymbols(dfs);
+ sdf->applyLocalizedPattern(UnicodeString("JJJJ'-W'ww-ee"), status);
+ if (U_FAILURE(status)) { errln("Couldn't apply localized pattern"); return; }
+
+ cal->clear();
+ cal->set(1997, UCAL_DECEMBER, 25);
+ doYEAR_WOYLoop(cal, sdf, times, status);
+ //loop_addroll(cal, /*sdf,*/ times, UCAL_YEAR_WOY, UCAL_YEAR, status);
+ yearAddTest(*cal, status); // aliu
+ loop_addroll(cal, /*sdf,*/ times, UCAL_DOW_LOCAL, UCAL_DAY_OF_WEEK, status);
+ if (U_FAILURE(status)) { errln("Error in parse/calculate test for 1997"); return; }
+
+ cal->clear();
+ cal->set(1998, UCAL_DECEMBER, 25);
+ doYEAR_WOYLoop(cal, sdf, times, status);
+ //loop_addroll(cal, /*sdf,*/ times, UCAL_YEAR_WOY, UCAL_YEAR, status);
+ yearAddTest(*cal, status); // aliu
+ loop_addroll(cal, /*sdf,*/ times, UCAL_DOW_LOCAL, UCAL_DAY_OF_WEEK, status);
+ if (U_FAILURE(status)) { errln("Error in parse/calculate test for 1998"); return; }
+
+ cal->clear();
+ cal->set(1582, UCAL_OCTOBER, 1);
+ doYEAR_WOYLoop(cal, sdf, times, status);
+ //loop_addroll(cal, /*sdf,*/ times, Calendar::YEAR_WOY, Calendar::YEAR, status);
+ yearAddTest(*cal, status); // aliu
+ loop_addroll(cal, /*sdf,*/ times, UCAL_DOW_LOCAL, UCAL_DAY_OF_WEEK, status);
+ if (U_FAILURE(status)) { errln("Error in parse/calculate test for 1582"); return; }
+ delete sdf;
+ delete cal;
+
+ return;
+}
+
+/**
+ * Confirm that adding a YEAR and adding a YEAR_WOY work properly for
+ * the given Calendar at its current setting.
+ */
+void CalendarTest::yearAddTest(Calendar& cal, UErrorCode& status) {
+ /**
+ * When adding the YEAR, the month and day should remain constant.
+ * When adding the YEAR_WOY, the WOY and DOW should remain constant. - aliu
+ * Examples:
+ * Wed Jan 14 1998 / 1998-W03-03 Add(YEAR_WOY, 1) -> Wed Jan 20 1999 / 1999-W03-03
+ * Add(YEAR, 1) -> Thu Jan 14 1999 / 1999-W02-04
+ * Thu Jan 14 1999 / 1999-W02-04 Add(YEAR_WOY, 1) -> Thu Jan 13 2000 / 2000-W02-04
+ * Add(YEAR, 1) -> Fri Jan 14 2000 / 2000-W02-05
+ * Sun Oct 31 1582 / 1582-W42-07 Add(YEAR_WOY, 1) -> Sun Oct 23 1583 / 1583-W42-07
+ * Add(YEAR, 1) -> Mon Oct 31 1583 / 1583-W44-01
+ */
+ int32_t y = cal.get(UCAL_YEAR, status);
+ int32_t mon = cal.get(UCAL_MONTH, status);
+ int32_t day = cal.get(UCAL_DATE, status);
+ int32_t ywy = cal.get(UCAL_YEAR_WOY, status);
+ int32_t woy = cal.get(UCAL_WEEK_OF_YEAR, status);
+ int32_t dow = cal.get(UCAL_DOW_LOCAL, status);
+ UDate t = cal.getTime(status);
+
+ if(U_FAILURE(status)){
+ errln(UnicodeString("Failed to create Calendar for locale. Error: ") + UnicodeString(u_errorName(status)));
+ return;
+ }
+ UnicodeString str, str2;
+ SimpleDateFormat fmt(UnicodeString("EEE MMM dd yyyy / YYYY'-W'ww-ee"), status);
+ fmt.setCalendar(cal);
+
+ fmt.format(t, str.remove());
+ str += ".add(YEAR, 1) =>";
+ cal.add(UCAL_YEAR, 1, status);
+ int32_t y2 = cal.get(UCAL_YEAR, status);
+ int32_t mon2 = cal.get(UCAL_MONTH, status);
+ int32_t day2 = cal.get(UCAL_DATE, status);
+ fmt.format(cal.getTime(status), str);
+ if (y2 != (y+1) || mon2 != mon || day2 != day) {
+ str += (UnicodeString)", expected year " +
+ (y+1) + ", month " + (mon+1) + ", day " + day;
+ errln((UnicodeString)"FAIL: " + str);
+ logln( UnicodeString(" -> ") + CalendarTest::calToStr(cal) );
+ } else {
+ logln(str);
+ }
+
+ fmt.format(t, str.remove());
+ str += ".add(YEAR_WOY, 1)=>";
+ cal.setTime(t, status);
+ logln( UnicodeString(" <- ") + CalendarTest::calToStr(cal) );
+ cal.add(UCAL_YEAR_WOY, 1, status);
+ int32_t ywy2 = cal.get(UCAL_YEAR_WOY, status);
+ int32_t woy2 = cal.get(UCAL_WEEK_OF_YEAR, status);
+ int32_t dow2 = cal.get(UCAL_DOW_LOCAL, status);
+ fmt.format(cal.getTime(status), str);
+ if (ywy2 != (ywy+1) || woy2 != woy || dow2 != dow) {
+ str += (UnicodeString)", expected yearWOY " +
+ (ywy+1) + ", woy " + woy + ", dowLocal " + dow;
+ errln((UnicodeString)"FAIL: " + str);
+ logln( UnicodeString(" -> ") + CalendarTest::calToStr(cal) );
+ } else {
+ logln(str);
+ }
+}
+
+// -------------------------------------
+
+void CalendarTest::loop_addroll(Calendar *cal, /*SimpleDateFormat *sdf,*/ int times, UCalendarDateFields field, UCalendarDateFields field2, UErrorCode& errorCode) {
+ Calendar *calclone;
+ SimpleDateFormat fmt(UnicodeString("EEE MMM dd yyyy / YYYY'-W'ww-ee"), errorCode);
+ fmt.setCalendar(*cal);
+ int i;
+
+ for(i = 0; i<times; i++) {
+ calclone = cal->clone();
+ UDate start = cal->getTime(errorCode);
+ cal->add(field,1,errorCode);
+ if (U_FAILURE(errorCode)) { errln("Error in add"); delete calclone; return; }
+ calclone->add(field2,1,errorCode);
+ if (U_FAILURE(errorCode)) { errln("Error in add"); delete calclone; return; }
+ if(cal->getTime(errorCode) != calclone->getTime(errorCode)) {
+ UnicodeString str("FAIL: Results of add differ. "), str2;
+ str += fmt.format(start, str2) + " ";
+ str += UnicodeString("Add(") + fieldName(field) + ", 1) -> " +
+ fmt.format(cal->getTime(errorCode), str2.remove()) + "; ";
+ str += UnicodeString("Add(") + fieldName(field2) + ", 1) -> " +
+ fmt.format(calclone->getTime(errorCode), str2.remove());
+ errln(str);
+ delete calclone;
+ return;
+ }
+ delete calclone;
+ }
+
+ for(i = 0; i<times; i++) {
+ calclone = cal->clone();
+ cal->roll(field,(int32_t)1,errorCode);
+ if (U_FAILURE(errorCode)) { errln("Error in roll"); delete calclone; return; }
+ calclone->roll(field2,(int32_t)1,errorCode);
+ if (U_FAILURE(errorCode)) { errln("Error in roll"); delete calclone; return; }
+ if(cal->getTime(errorCode) != calclone->getTime(errorCode)) {
+ delete calclone;
+ errln("Results of roll differ!");
+ return;
+ }
+ delete calclone;
+ }
+}
+
+// -------------------------------------
+
+void
+CalendarTest::doYEAR_WOYLoop(Calendar *cal, SimpleDateFormat *sdf,
+ int32_t times, UErrorCode& errorCode) {
+
+ UnicodeString us;
+ UDate tst, original;
+ Calendar *tstres = new GregorianCalendar(Locale::getGermany(), errorCode);
+ for(int i=0; i<times; ++i) {
+ sdf->format(Formattable(cal->getTime(errorCode),Formattable::kIsDate), us, errorCode);
+ //logln("expected: "+us);
+ if (U_FAILURE(errorCode)) { errln("Format error"); return; }
+ tst=sdf->parse(us,errorCode);
+ if (U_FAILURE(errorCode)) { errln("Parse error"); return; }
+ tstres->clear();
+ tstres->setTime(tst, errorCode);
+ //logln((UnicodeString)"Parsed week of year is "+tstres->get(UCAL_WEEK_OF_YEAR, errorCode));
+ if (U_FAILURE(errorCode)) { errln("Set time error"); return; }
+ original = cal->getTime(errorCode);
+ us.remove();
+ sdf->format(Formattable(tst,Formattable::kIsDate), us, errorCode);
+ //logln("got: "+us);
+ if (U_FAILURE(errorCode)) { errln("Get time error"); return; }
+ if(original!=tst) {
+ us.remove();
+ sdf->format(Formattable(original, Formattable::kIsDate), us, errorCode);
+ errln("FAIL: Parsed time doesn't match with regular");
+ logln("expected "+us + " " + calToStr(*cal));
+ us.remove();
+ sdf->format(Formattable(tst, Formattable::kIsDate), us, errorCode);
+ logln("got "+us + " " + calToStr(*tstres));
+ }
+ tstres->clear();
+ tstres->set(UCAL_YEAR_WOY, cal->get(UCAL_YEAR_WOY, errorCode));
+ tstres->set(UCAL_WEEK_OF_YEAR, cal->get(UCAL_WEEK_OF_YEAR, errorCode));
+ tstres->set(UCAL_DOW_LOCAL, cal->get(UCAL_DOW_LOCAL, errorCode));
+ if(cal->get(UCAL_YEAR, errorCode) != tstres->get(UCAL_YEAR, errorCode)) {
+ errln("FAIL: Different Year!");
+ logln((UnicodeString)"Expected "+cal->get(UCAL_YEAR, errorCode));
+ logln((UnicodeString)"Got "+tstres->get(UCAL_YEAR, errorCode));
+ return;
+ }
+ if(cal->get(UCAL_DAY_OF_YEAR, errorCode) != tstres->get(UCAL_DAY_OF_YEAR, errorCode)) {
+ errln("FAIL: Different Day Of Year!");
+ logln((UnicodeString)"Expected "+cal->get(UCAL_DAY_OF_YEAR, errorCode));
+ logln((UnicodeString)"Got "+tstres->get(UCAL_DAY_OF_YEAR, errorCode));
+ return;
+ }
+ //logln(calToStr(*cal));
+ cal->add(UCAL_DATE, 1, errorCode);
+ if (U_FAILURE(errorCode)) { errln("Add error"); return; }
+ us.remove();
+ }
+ delete (tstres);
+}
+// -------------------------------------
+
+void
+CalendarTest::marchByDelta(Calendar* cal, int32_t delta)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cur = (Calendar*) cal->clone();
+ int32_t initialDOW = cur->get(UCAL_DAY_OF_WEEK, status);
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ int32_t DOW, newDOW = initialDOW;
+ do {
+ UnicodeString str;
+ DOW = newDOW;
+ logln(UnicodeString("DOW = ") + DOW + " " + dateToString(cur->getTime(status), str));
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ cur->add(UCAL_DAY_OF_WEEK, delta, status);
+ if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
+ newDOW = cur->get(UCAL_DAY_OF_WEEK, status);
+ if (U_FAILURE(status)) { errln("Calendar::get failed"); return; }
+ int32_t expectedDOW = 1 + (DOW + delta - 1) % 7;
+ if (newDOW != expectedDOW) {
+ errln(UnicodeString("Day of week should be ") + expectedDOW + " instead of " + newDOW +
+ " on " + dateToString(cur->getTime(status), str));
+ if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; }
+ return;
+ }
+ }
+ while (newDOW != initialDOW);
+ delete cur;
+}
+
+#define CHECK(status, msg) \
+ if (U_FAILURE(status)) { \
+ errln(msg); \
+ return; \
+ }
+
+void CalendarTest::TestWOY(void) {
+ /*
+ FDW = Mon, MDFW = 4:
+ Sun Dec 26 1999, WOY 51
+ Mon Dec 27 1999, WOY 52
+ Tue Dec 28 1999, WOY 52
+ Wed Dec 29 1999, WOY 52
+ Thu Dec 30 1999, WOY 52
+ Fri Dec 31 1999, WOY 52
+ Sat Jan 01 2000, WOY 52 ***
+ Sun Jan 02 2000, WOY 52 ***
+ Mon Jan 03 2000, WOY 1
+ Tue Jan 04 2000, WOY 1
+ Wed Jan 05 2000, WOY 1
+ Thu Jan 06 2000, WOY 1
+ Fri Jan 07 2000, WOY 1
+ Sat Jan 08 2000, WOY 1
+ Sun Jan 09 2000, WOY 1
+ Mon Jan 10 2000, WOY 2
+
+ FDW = Mon, MDFW = 2:
+ Sun Dec 26 1999, WOY 52
+ Mon Dec 27 1999, WOY 1 ***
+ Tue Dec 28 1999, WOY 1 ***
+ Wed Dec 29 1999, WOY 1 ***
+ Thu Dec 30 1999, WOY 1 ***
+ Fri Dec 31 1999, WOY 1 ***
+ Sat Jan 01 2000, WOY 1
+ Sun Jan 02 2000, WOY 1
+ Mon Jan 03 2000, WOY 2
+ Tue Jan 04 2000, WOY 2
+ Wed Jan 05 2000, WOY 2
+ Thu Jan 06 2000, WOY 2
+ Fri Jan 07 2000, WOY 2
+ Sat Jan 08 2000, WOY 2
+ Sun Jan 09 2000, WOY 2
+ Mon Jan 10 2000, WOY 3
+ */
+
+ UnicodeString str;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i;
+
+ GregorianCalendar cal(status);
+ SimpleDateFormat fmt(UnicodeString("EEE MMM dd yyyy', WOY' w"), status);
+ CHECK(status, "Fail: Cannot construct calendar/format");
+
+ UCalendarDaysOfWeek fdw = (UCalendarDaysOfWeek) 0;
+
+ //for (int8_t pass=2; pass<=2; ++pass) {
+ for (int8_t pass=1; pass<=2; ++pass) {
+ switch (pass) {
+ case 1:
+ fdw = UCAL_MONDAY;
+ cal.setFirstDayOfWeek(fdw);
+ cal.setMinimalDaysInFirstWeek(4);
+ fmt.adoptCalendar(cal.clone());
+ break;
+ case 2:
+ fdw = UCAL_MONDAY;
+ cal.setFirstDayOfWeek(fdw);
+ cal.setMinimalDaysInFirstWeek(2);
+ fmt.adoptCalendar(cal.clone());
+ break;
+ }
+
+ //for (i=2; i<=6; ++i) {
+ for (i=0; i<16; ++i) {
+ UDate t, t2;
+ int32_t t_y, t_woy, t_dow;
+ cal.clear();
+ cal.set(1999, UCAL_DECEMBER, 26 + i);
+ fmt.format(t = cal.getTime(status), str.remove());
+ CHECK(status, "Fail: getTime failed");
+ logln(UnicodeString("* ") + str);
+ int32_t dow = cal.get(UCAL_DAY_OF_WEEK, status);
+ int32_t woy = cal.get(UCAL_WEEK_OF_YEAR, status);
+ int32_t year = cal.get(UCAL_YEAR, status);
+ int32_t mon = cal.get(UCAL_MONTH, status);
+ logln(calToStr(cal));
+ CHECK(status, "Fail: get failed");
+ int32_t dowLocal = dow - fdw;
+ if (dowLocal < 0) dowLocal += 7;
+ dowLocal++;
+ int32_t yearWoy = year;
+ if (mon == UCAL_JANUARY) {
+ if (woy >= 52) --yearWoy;
+ } else {
+ if (woy == 1) ++yearWoy;
+ }
+
+ // Basic fields->time check y/woy/dow
+ // Since Y/WOY is ambiguous, we do a check of the fields,
+ // not of the specific time.
+ cal.clear();
+ cal.set(UCAL_YEAR, year);
+ cal.set(UCAL_WEEK_OF_YEAR, woy);
+ cal.set(UCAL_DAY_OF_WEEK, dow);
+ t_y = cal.get(UCAL_YEAR, status);
+ t_woy = cal.get(UCAL_WEEK_OF_YEAR, status);
+ t_dow = cal.get(UCAL_DAY_OF_WEEK, status);
+ CHECK(status, "Fail: get failed");
+ if (t_y != year || t_woy != woy || t_dow != dow) {
+ str = "Fail: y/woy/dow fields->time => ";
+ fmt.format(cal.getTime(status), str);
+ errln(str);
+ logln(calToStr(cal));
+ logln("[get!=set] Y%d!=%d || woy%d!=%d || dow%d!=%d\n",
+ t_y, year, t_woy, woy, t_dow, dow);
+ } else {
+ logln("y/woy/dow fields->time OK");
+ }
+
+ // Basic fields->time check y/woy/dow_local
+ // Since Y/WOY is ambiguous, we do a check of the fields,
+ // not of the specific time.
+ cal.clear();
+ cal.set(UCAL_YEAR, year);
+ cal.set(UCAL_WEEK_OF_YEAR, woy);
+ cal.set(UCAL_DOW_LOCAL, dowLocal);
+ t_y = cal.get(UCAL_YEAR, status);
+ t_woy = cal.get(UCAL_WEEK_OF_YEAR, status);
+ t_dow = cal.get(UCAL_DOW_LOCAL, status);
+ CHECK(status, "Fail: get failed");
+ if (t_y != year || t_woy != woy || t_dow != dowLocal) {
+ str = "Fail: y/woy/dow_local fields->time => ";
+ fmt.format(cal.getTime(status), str);
+ errln(str);
+ }
+
+ // Basic fields->time check y_woy/woy/dow
+ cal.clear();
+ cal.set(UCAL_YEAR_WOY, yearWoy);
+ cal.set(UCAL_WEEK_OF_YEAR, woy);
+ cal.set(UCAL_DAY_OF_WEEK, dow);
+ t2 = cal.getTime(status);
+ CHECK(status, "Fail: getTime failed");
+ if (t != t2) {
+ str = "Fail: y_woy/woy/dow fields->time => ";
+ fmt.format(t2, str);
+ errln(str);
+ logln(calToStr(cal));
+ logln("%.f != %.f\n", t, t2);
+ } else {
+ logln("y_woy/woy/dow OK");
+ }
+
+ // Basic fields->time check y_woy/woy/dow_local
+ cal.clear();
+ cal.set(UCAL_YEAR_WOY, yearWoy);
+ cal.set(UCAL_WEEK_OF_YEAR, woy);
+ cal.set(UCAL_DOW_LOCAL, dowLocal);
+ t2 = cal.getTime(status);
+ CHECK(status, "Fail: getTime failed");
+ if (t != t2) {
+ str = "Fail: y_woy/woy/dow_local fields->time => ";
+ fmt.format(t2, str);
+ errln(str);
+ }
+
+ logln("Testing DOW_LOCAL.. dow%d\n", dow);
+ // Make sure DOW_LOCAL disambiguates over DOW
+ int32_t wrongDow = dow - 3;
+ if (wrongDow < 1) wrongDow += 7;
+ cal.setTime(t, status);
+ cal.set(UCAL_DAY_OF_WEEK, wrongDow);
+ cal.set(UCAL_DOW_LOCAL, dowLocal);
+ t2 = cal.getTime(status);
+ CHECK(status, "Fail: set/getTime failed");
+ if (t != t2) {
+ str = "Fail: DOW_LOCAL fields->time => ";
+ fmt.format(t2, str);
+ errln(str);
+ logln(calToStr(cal));
+ logln("%.f : DOW%d, DOW_LOCAL%d -> %.f\n",
+ t, wrongDow, dowLocal, t2);
+ }
+
+ // Make sure DOW disambiguates over DOW_LOCAL
+ int32_t wrongDowLocal = dowLocal - 3;
+ if (wrongDowLocal < 1) wrongDowLocal += 7;
+ cal.setTime(t, status);
+ cal.set(UCAL_DOW_LOCAL, wrongDowLocal);
+ cal.set(UCAL_DAY_OF_WEEK, dow);
+ t2 = cal.getTime(status);
+ CHECK(status, "Fail: set/getTime failed");
+ if (t != t2) {
+ str = "Fail: DOW fields->time => ";
+ fmt.format(t2, str);
+ errln(str);
+ }
+
+ // Make sure YEAR_WOY disambiguates over YEAR
+ cal.setTime(t, status);
+ cal.set(UCAL_YEAR, year - 2);
+ cal.set(UCAL_YEAR_WOY, yearWoy);
+ t2 = cal.getTime(status);
+ CHECK(status, "Fail: set/getTime failed");
+ if (t != t2) {
+ str = "Fail: YEAR_WOY fields->time => ";
+ fmt.format(t2, str);
+ errln(str);
+ }
+
+ // Make sure YEAR disambiguates over YEAR_WOY
+ cal.setTime(t, status);
+ cal.set(UCAL_YEAR_WOY, yearWoy - 2);
+ cal.set(UCAL_YEAR, year);
+ t2 = cal.getTime(status);
+ CHECK(status, "Fail: set/getTime failed");
+ if (t != t2) {
+ str = "Fail: YEAR fields->time => ";
+ fmt.format(t2, str);
+ errln(str);
+ }
+ }
+ }
+
+ /*
+ FDW = Mon, MDFW = 4:
+ Sun Dec 26 1999, WOY 51
+ Mon Dec 27 1999, WOY 52
+ Tue Dec 28 1999, WOY 52
+ Wed Dec 29 1999, WOY 52
+ Thu Dec 30 1999, WOY 52
+ Fri Dec 31 1999, WOY 52
+ Sat Jan 01 2000, WOY 52
+ Sun Jan 02 2000, WOY 52
+ */
+
+ // Roll the DOW_LOCAL within week 52
+ for (i=27; i<=33; ++i) {
+ int32_t amount;
+ for (amount=-7; amount<=7; ++amount) {
+ str = "roll(";
+ cal.set(1999, UCAL_DECEMBER, i);
+ UDate t, t2;
+ fmt.format(cal.getTime(status), str);
+ CHECK(status, "Fail: getTime failed");
+ str += UnicodeString(", ") + amount + ") = ";
+
+ cal.roll(UCAL_DOW_LOCAL, amount, status);
+ CHECK(status, "Fail: roll failed");
+
+ t = cal.getTime(status);
+ int32_t newDom = i + amount;
+ while (newDom < 27) newDom += 7;
+ while (newDom > 33) newDom -= 7;
+ cal.set(1999, UCAL_DECEMBER, newDom);
+ t2 = cal.getTime(status);
+ CHECK(status, "Fail: getTime failed");
+ fmt.format(t, str);
+
+ if (t != t2) {
+ str.append(", exp ");
+ fmt.format(t2, str);
+ errln(str);
+ } else {
+ logln(str);
+ }
+ }
+ }
+}
+
+void CalendarTest::TestYWOY()
+{
+ UnicodeString str;
+ UErrorCode status = U_ZERO_ERROR;
+
+ GregorianCalendar cal(status);
+ CHECK(status, "Fail: Cannot construct calendar/format");
+
+ cal.setFirstDayOfWeek(UCAL_SUNDAY);
+ cal.setMinimalDaysInFirstWeek(1);
+
+ logln("Setting: ywoy=2004, woy=1, dow=MONDAY");
+ cal.clear();
+ cal.set(UCAL_YEAR_WOY,2004);
+ cal.set(UCAL_WEEK_OF_YEAR,1);
+ cal.set(UCAL_DAY_OF_WEEK, UCAL_MONDAY);
+
+ logln(calToStr(cal));
+ if(cal.get(UCAL_YEAR, status) != 2003) {
+ errln("year not 2003");
+ }
+
+ logln("+ setting DOW to THURSDAY");
+ cal.clear();
+ cal.set(UCAL_YEAR_WOY,2004);
+ cal.set(UCAL_WEEK_OF_YEAR,1);
+ cal.set(UCAL_DAY_OF_WEEK, UCAL_THURSDAY);
+
+ logln(calToStr(cal));
+ if(cal.get(UCAL_YEAR, status) != 2004) {
+ errln("year not 2004");
+ }
+
+ logln("+ setting DOW_LOCAL to 1");
+ cal.clear();
+ cal.set(UCAL_YEAR_WOY,2004);
+ cal.set(UCAL_WEEK_OF_YEAR,1);
+ cal.set(UCAL_DAY_OF_WEEK, UCAL_THURSDAY);
+ cal.set(UCAL_DOW_LOCAL, 1);
+
+ logln(calToStr(cal));
+ if(cal.get(UCAL_YEAR, status) != 2003) {
+ errln("year not 2003");
+ }
+
+ cal.setFirstDayOfWeek(UCAL_MONDAY);
+ cal.setMinimalDaysInFirstWeek(4);
+ UDate t = 946713600000.;
+ cal.setTime(t, status);
+ cal.set(UCAL_DAY_OF_WEEK, 4);
+ cal.set(UCAL_DOW_LOCAL, 6);
+ if(cal.getTime(status) != t) {
+ logln(calToStr(cal));
+ errln("FAIL: DOW_LOCAL did not take precedence");
+ }
+
+}
+
+void CalendarTest::TestJD()
+{
+ int32_t jd;
+ static const int32_t kEpochStartAsJulianDay = 2440588;
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar cal(status);
+ cal.setTimeZone(*TimeZone::getGMT());
+ cal.clear();
+ jd = cal.get(UCAL_JULIAN_DAY, status);
+ if(jd != kEpochStartAsJulianDay) {
+ errln("Wanted JD of %d at time=0, [epoch 1970] but got %d\n", kEpochStartAsJulianDay, jd);
+ } else {
+ logln("Wanted JD of %d at time=0, [epoch 1970], got %d\n", kEpochStartAsJulianDay, jd);
+ }
+
+ cal.setTime(Calendar::getNow(), status);
+ cal.clear();
+ cal.set(UCAL_JULIAN_DAY, kEpochStartAsJulianDay);
+ UDate epochTime = cal.getTime(status);
+ if(epochTime != 0) {
+ errln("Wanted time of 0 at jd=%d, got %.1lf\n", kEpochStartAsJulianDay, epochTime);
+ } else {
+ logln("Wanted time of 0 at jd=%d, got %.1lf\n", kEpochStartAsJulianDay, epochTime);
+ }
+
+}
+
+// make sure the ctestfw utilities are in sync with the Calendar
+void CalendarTest::TestDebug()
+{
+ for(int32_t t=0;t<=UDBG_ENUM_COUNT;t++) {
+ int32_t count = udbg_enumCount((UDebugEnumType)t);
+ if(count == -1) {
+ logln("enumCount(%d) returned -1", count);
+ continue;
+ }
+ for(int32_t i=0;i<=count;i++) {
+ if(i<count) {
+ if( i!=udbg_enumArrayValue((UDebugEnumType)t, i)) {
+ errln("FAIL: udbg_enumArrayValue(%d,%d) returned %d, expected %d", t, i, udbg_enumArrayValue((UDebugEnumType)t,i), i);
+ }
+ } else {
+ logln("Testing count+1:");
+ }
+ const char *name = udbg_enumName((UDebugEnumType)t,i);
+ if(name==NULL) {
+ if(i==count) {
+ logln(" null name - expected.\n");
+ } else {
+ errln("FAIL: udbg_enumName(%d,%d) returned NULL", t, i);
+ }
+ name = "(null)";
+ }
+ logln("udbg_enumArrayValue(%d,%d) = %s, returned %d", t, i,
+ name, udbg_enumArrayValue((UDebugEnumType)t,i));
+ logln("udbg_enumString = " + udbg_enumString((UDebugEnumType)t,i));
+ }
+ if(udbg_enumExpectedCount((UDebugEnumType)t) != count) {
+ errln("FAIL: udbg_enumExpectedCount(%d): %d, != UCAL_FIELD_COUNT=%d ", t, udbg_enumExpectedCount((UDebugEnumType)t), count);
+ } else {
+ logln("udbg_ucal_fieldCount: %d, UCAL_FIELD_COUNT=udbg_enumCount %d ", udbg_enumExpectedCount((UDebugEnumType)t), count);
+ }
+ }
+}
+
+
+#undef CHECK
+
+// List of interesting locales
+const char *CalendarTest::testLocaleID(int32_t i)
+{
+ switch(i) {
+ case 0: return "he_IL@calendar=hebrew";
+ case 1: return "en_US@calendar=hebrew";
+ case 2: return "fr_FR@calendar=hebrew";
+ case 3: return "fi_FI@calendar=hebrew";
+ case 4: return "nl_NL@calendar=hebrew";
+ case 5: return "hu_HU@calendar=hebrew";
+ case 6: return "nl_BE@currency=MTL;calendar=islamic";
+ case 7: return "th_TH_TRADITIONAL@calendar=gregorian";
+ case 8: return "ar_JO@calendar=islamic-civil";
+ case 9: return "fi_FI@calendar=islamic";
+ case 10: return "fr_CH@calendar=islamic-civil";
+ case 11: return "he_IL@calendar=islamic-civil";
+ case 12: return "hu_HU@calendar=buddhist";
+ case 13: return "hu_HU@calendar=islamic";
+ case 14: return "en_US@calendar=japanese";
+ default: return NULL;
+ }
+}
+
+int32_t CalendarTest::testLocaleCount()
+{
+ static int32_t gLocaleCount = -1;
+ if(gLocaleCount < 0) {
+ int32_t i;
+ for(i=0;testLocaleID(i) != NULL;i++) {
+ ;
+ }
+ gLocaleCount = i;
+ }
+ return gLocaleCount;
+}
+
+static UDate doMinDateOfCalendar(Calendar* adopt, UBool &isGregorian, UErrorCode& status) {
+ if(U_FAILURE(status)) return 0.0;
+
+ adopt->clear();
+ adopt->set(UCAL_EXTENDED_YEAR, adopt->getActualMinimum(UCAL_EXTENDED_YEAR, status));
+ UDate ret = adopt->getTime(status);
+ isGregorian = (adopt->getDynamicClassID() == GregorianCalendar::getStaticClassID());
+ delete adopt;
+ return ret;
+}
+
+UDate CalendarTest::minDateOfCalendar(const Locale& locale, UBool &isGregorian, UErrorCode& status) {
+ if(U_FAILURE(status)) return 0.0;
+ return doMinDateOfCalendar(Calendar::createInstance(locale, status), isGregorian, status);
+}
+
+UDate CalendarTest::minDateOfCalendar(const Calendar& cal, UBool &isGregorian, UErrorCode& status) {
+ if(U_FAILURE(status)) return 0.0;
+ return doMinDateOfCalendar(cal.clone(), isGregorian, status);
+}
+
+
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/caltest.h b/Build/source/libs/icu/icu-xetex/test/intltest/caltest.h
new file mode 100644
index 00000000000..94ec73185d4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/caltest.h
@@ -0,0 +1,224 @@
+/***********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#ifndef __CalendarTest__
+#define __CalendarTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/calendar.h"
+#include "unicode/smpdtfmt.h"
+#include "caltztst.h"
+
+class CalendarTest: public CalendarTimeZoneTest {
+public:
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+ /**
+ * This test confirms the correct behavior of add when incrementing
+ * through subsequent days.
+ */
+ virtual void TestRog(void);
+ /**
+ * Test the handling of the day of the week, checking for correctness and
+ * for correct minimum and maximum values.
+ */
+ virtual void TestDOW943(void);
+ /**
+ * test subroutine use by TestDOW943
+ */
+ void dowTest(UBool lenient);
+ /**
+ * Confirm that cloned Calendar objects do not inadvertently share substructures.
+ */
+ virtual void TestClonesUnique908(void);
+ /**
+ * Confirm that the Gregorian cutoff value works as advertised.
+ */
+ virtual void TestGregorianChange768(void);
+ /**
+ * Confirm the functioning of the field disambiguation algorithm.
+ */
+ virtual void TestDisambiguation765(void);
+ /**
+ * Test various API methods for API completeness.
+ */
+ virtual void TestGenericAPI(void); // New to C++ -- needs to be back ported to Java
+
+ virtual void TestWOY(void);
+
+ virtual void TestDebug(void);
+
+public: // package
+ /**
+ * test subroutine used by TestDisambiguation765
+ */
+ virtual void verify765(const UnicodeString& msg, Calendar* c, int32_t year, int32_t month, int32_t day);
+ /**
+ * test subroutine used by TestDisambiguation765
+ */
+ virtual void verify765(const UnicodeString& msg/*, IllegalArgumentException e*/, UErrorCode status);
+
+public:
+ /**
+ * Confirm that the offset between local time and GMT behaves as expected.
+ */
+ virtual void TestGMTvsLocal4064654(void);
+
+public: // package
+ /**
+ * test subroutine used by TestGMTvsLocal4064654
+ */
+ virtual void test4064654(int32_t yr, int32_t mo, int32_t dt, int32_t hr, int32_t mn, int32_t sc);
+
+public:
+ /**
+ * The operations of adding and setting should not exhibit pathological
+ * dependence on the order of operations. This test checks for this.
+ */
+ virtual void TestAddSetOrder621(void);
+ /**
+ * Confirm that adding to various fields works.
+ */
+ virtual void TestAdd520(void);
+ /**
+ * Execute and test adding and rolling in GregorianCalendar extensively.
+ */
+ virtual void TestAddRollExtensive(void);
+
+public: // package
+ // internal utility routine for checking date
+ virtual void check520(Calendar* c,
+ int32_t y, int32_t m, int32_t d,
+ int32_t hr, int32_t min, int32_t sec,
+ int32_t ms, UCalendarDateFields field);
+
+ virtual void check520(Calendar* c,
+ int32_t y, int32_t m, int32_t d);
+
+public:
+ /**
+ * Test that setting of fields works. In particular, make sure that all instances
+ * of GregorianCalendar don't share a static instance of the fields array.
+ */
+ virtual void TestFieldSet4781(void);
+/* virtual void TestSerialize337();
+
+public: // package
+ static UnicodeString& PREFIX;
+ static UnicodeString& POSTFIX;
+ static UnicodeString& FILENAME;
+*/
+public:
+ /**
+ * Verify that the seconds of a Calendar can be zeroed out through the
+ * expected sequence of operations.
+ */
+ virtual void TestSecondsZero121(void);
+ /**
+ * Verify that a specific sequence of adding and setting works as expected;
+ * it should not vary depending on when and whether the get method is
+ * called.
+ */
+ virtual void TestAddSetGet0610(void);
+
+public: // package
+ // internal routine for checking date
+ static UnicodeString value(Calendar* calendar);
+
+public:
+ /**
+ * Verify that various fields on a known date are set correctly.
+ */
+ virtual void TestFields060(void);
+
+public: // package
+ static int32_t EXPECTED_FIELDS[];
+ static const int32_t EXPECTED_FIELDS_length;
+
+public:
+ /**
+ * Verify that various fields on a known date are set correctly. In this
+ * case, the start of the epoch (January 1 1970).
+ */
+ virtual void TestEpochStartFields(void);
+
+public: // package
+ static int32_t EPOCH_FIELDS[];
+
+public:
+ /**
+ * Test that the days of the week progress properly when add is called repeatedly
+ * for increments of 24 days.
+ */
+ virtual void TestDOWProgression(void);
+ /**
+ * Test newly added fields - DOW_LOCAL and YEAR_WOY
+ */
+ virtual void TestDOW_LOCALandYEAR_WOY(void);
+ // test subroutine used by TestDOW_LOCALandYEAR_WOY
+ virtual void doYEAR_WOYLoop(Calendar *cal,
+ SimpleDateFormat *sdf, int32_t times, UErrorCode& status);
+ // test subroutine used by TestDOW_LOCALandYEAR_WOY
+ virtual void loop_addroll(Calendar *cal, /*SimpleDateFormat *sdf, */
+ int times, UCalendarDateFields field, UCalendarDateFields field2,
+ UErrorCode& errorCode);
+
+ void TestYWOY(void);
+ void TestJD(void);
+
+ void yearAddTest(Calendar& cal, UErrorCode& status);
+
+public: // package
+ // test subroutine use by TestDOWProgression
+ virtual void marchByDelta(Calendar* cal, int32_t delta);
+
+ public:
+ // for other tests' use
+ static UnicodeString fieldName(UCalendarDateFields f);
+ static UnicodeString calToStr(const Calendar & cal);
+
+ // List of non-installed locales with interesting calendars
+
+ /**
+ * @return the count of 'other' locales to test
+ */
+ static int32_t testLocaleCount();
+
+ /**
+ * @param i index of 'other' locale to return
+ * @return locale ID
+ */
+ static const char* testLocaleID(int32_t i);
+
+ /**
+ * Clone the specified calendar, and determine its earliest supported date
+ * by setting the extended year to the minimum value.
+ * @param cal Calendar (will be cloned)
+ * @param isGregorian output: returns 'TRUE' if the calendar's class is GregorianCalendar
+ * @param status error code
+ */
+ static UDate minDateOfCalendar(const Calendar& cal, UBool &isGregorian, UErrorCode& status);
+
+ /**
+ * Construct a calendar of the specified locale, and determine its earliest supported date
+ * by setting the extended year to the minimum value.
+ * @param locale locale of calendar to check
+ * @param isGregorian output: returns 'TRUE' if the calendar's class is GregorianCalendar
+ * @param status error code
+ */
+ static UDate minDateOfCalendar(const Locale& locale, UBool &isGregorian, UErrorCode& status);
+
+ // internal - for other test use
+ public:
+
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // __CalendarTest__
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/caltztst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/caltztst.cpp
new file mode 100644
index 00000000000..3d50ce954c2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/caltztst.cpp
@@ -0,0 +1,240 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/*
+* File CALTZTST.H
+*
+* Modification History:
+*
+* Date Name Description
+* 08/06/97 aliu Creation.
+********************************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "caltztst.h"
+#include "unicode/smpdtfmt.h"
+#include "mutex.h"
+
+DateFormat* CalendarTimeZoneTest::fgDateFormat = 0;
+Calendar* CalendarTimeZoneTest::fgCalendar = 0;
+
+UBool CalendarTimeZoneTest::failure(UErrorCode status, const char* msg)
+{
+ if (U_FAILURE(status))
+ {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+ return FALSE;
+}
+
+DateFormat* CalendarTimeZoneTest::getDateFormat()
+{
+ DateFormat *theFormat = 0;
+
+ if (fgDateFormat != 0) // if there's something in the cache
+ {
+ Mutex lock;
+
+ if (fgDateFormat != 0) // Someone might have grabbed it.
+ {
+ theFormat = fgDateFormat;
+ fgDateFormat = 0; // We have exclusive right to this formatter.
+ }
+ }
+
+ if(theFormat == 0) // If we weren't able to pull it out of the cache, then we have to create it.
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ theFormat = new SimpleDateFormat(UnicodeString("EEE MMM dd HH:mm:ss zzz yyyy"), status);
+ if (U_FAILURE(status))
+ {
+ delete theFormat;
+ theFormat = 0;
+ errln("FAIL: Could not create SimpleDateFormat");
+ }
+ }
+
+ return theFormat;
+}
+
+void CalendarTimeZoneTest::releaseDateFormat(DateFormat *adopt)
+{
+ if(fgDateFormat == 0) // If the cache is empty we must add it back.
+ {
+ Mutex lock;
+
+ if(fgDateFormat == 0)
+ {
+ fgDateFormat = adopt;
+ adopt = 0;
+ }
+ }
+ else {
+ delete adopt;
+ }
+}
+
+Calendar* CalendarTimeZoneTest::getCalendar()
+{
+ Calendar *theCalendar = 0;
+
+ if (fgCalendar != 0) // if there's something in the cache
+ {
+ Mutex lock;
+
+ if (fgCalendar != 0) // Someone might have grabbed it.
+ {
+ theCalendar = fgCalendar;
+ fgCalendar = 0; // We have exclusive right to this calendar.
+ }
+ }
+
+ if(theCalendar == 0) // If we weren't able to pull it out of the cache, then we have to create it.
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ theCalendar = Calendar::createInstance(status);
+ if (U_FAILURE(status))
+ {
+ delete theCalendar;
+ theCalendar = 0;
+ errln("FAIL: Calendar::createInstance failed");
+ }
+ }
+ return theCalendar;
+}
+
+void CalendarTimeZoneTest::releaseCalendar(Calendar* adopt)
+{
+ if(fgCalendar == 0) // If the cache is empty we must add it back.
+ {
+ Mutex lock;
+
+ if(fgCalendar == 0)
+ {
+ fgCalendar = adopt;
+ adopt = 0;
+ }
+ }
+ else
+ {
+ delete adopt;
+ }
+}
+
+// Utility method for formatting dates for printing; useful for Java->C++ conversion.
+// Tries to mimic the Java Date.toString() format.
+UnicodeString
+CalendarTimeZoneTest::dateToString(UDate d)
+{
+ UnicodeString str;
+ return dateToString(d, str);
+}
+
+UnicodeString&
+CalendarTimeZoneTest::dateToString(UDate d, UnicodeString& str)
+{
+ str.remove();
+ DateFormat* format = getDateFormat();
+ if (format == 0)
+ {
+ str += "DATE_FORMAT_FAILURE";
+ return str;
+ }
+ format->format(d, str);
+ releaseDateFormat(format);
+ return str;
+}
+
+UnicodeString&
+CalendarTimeZoneTest::dateToString(UDate d, UnicodeString& str,
+ const TimeZone& tz)
+{
+ str.remove();
+ DateFormat* format = getDateFormat();
+ if (format == 0)
+ {
+ str += "DATE_FORMAT_FAILURE";
+ return str;
+ }
+ TimeZone* save = format->getTimeZone().clone();
+ format->setTimeZone(tz);
+ format->format(d, str);
+ format->adoptTimeZone(save);
+ releaseDateFormat(format);
+ return str;
+}
+
+// Utility methods to create a date. This is useful for converting Java constructs
+// which create a Date object.
+UDate
+CalendarTimeZoneTest::date(int32_t y, int32_t m, int32_t d, int32_t hr, int32_t min, int32_t sec)
+{
+ Calendar* cal = getCalendar();
+ if (cal == 0) return 0.0;
+ cal->clear();
+ cal->set(1900 + y, m, d, hr, min, sec); // Add 1900 to follow java.util.Date protocol
+ UErrorCode status = U_ZERO_ERROR;
+ UDate dt = cal->getTime(status);
+ releaseCalendar(cal);
+ if (U_FAILURE(status))
+ {
+ errln("FAIL: Calendar::getTime failed");
+ return 0.0;
+ }
+ return dt;
+}
+
+// Utility methods to create a date. The returned Date is UTC rather than local.
+/*Date
+CalendarTimeZoneTest::utcDate(int32_t y, int32_t m, int32_t d, int32_t hr, int32_t min, int32_t sec)
+{
+ Calendar* cal = getCalendar();
+ if (cal == 0) return 0.0;
+ UErrorCode status = U_ZERO_ERROR;
+ Date dt = date(y, m, d, hr, min, sec) +
+ cal->get(Calendar::ZONE_OFFSET, status) -
+ cal->get(Calendar::DST_OFFSET, status);
+ releaseCalendar(cal);
+ if (U_FAILURE(status))
+ {
+ errln("FAIL: Calendar::get failed");
+ return 0.0;
+ }
+ return dt;
+}*/
+
+// Mimics Date.getYear() etc.
+void
+CalendarTimeZoneTest::dateToFields(UDate date, int32_t& y, int32_t& m, int32_t& d, int32_t& hr, int32_t& min, int32_t& sec)
+{
+ Calendar* cal = getCalendar();
+ if (cal == 0) return;
+ UErrorCode status = U_ZERO_ERROR;
+ cal->setTime(date, status);
+ y = cal->get(UCAL_YEAR, status) - 1900;
+ m = cal->get(UCAL_MONTH, status);
+ d = cal->get(UCAL_DATE, status);
+ hr = cal->get(UCAL_HOUR_OF_DAY, status);
+ min = cal->get(UCAL_MINUTE, status);
+ sec = cal->get(UCAL_SECOND, status);
+ releaseCalendar(cal);
+}
+
+void CalendarTimeZoneTest::cleanup()
+{
+ delete fgDateFormat;
+ fgDateFormat = 0;
+ delete fgCalendar;
+ fgCalendar = 0;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/caltztst.h b/Build/source/libs/icu/icu-xetex/test/intltest/caltztst.h
new file mode 100644
index 00000000000..60e8447d184
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/caltztst.h
@@ -0,0 +1,65 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef _CALTZTST
+#define _CALTZTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "unicode/calendar.h"
+#include "unicode/datefmt.h"
+#include "intltest.h"
+
+/**
+ * This class doesn't perform any tests, but provides utility methods to its subclasses.
+ **/
+class CalendarTimeZoneTest : public IntlTest
+{
+public:
+ static void cleanup();
+protected:
+ // Return true if the given status indicates failure. Also has the side effect
+ // of calling errln(). Msg should be of the form "Class::Method" in general.
+ UBool failure(UErrorCode status, const char* msg);
+
+ // Utility method for formatting dates for printing; useful for Java->C++ conversion.
+ // Tries to mimic the Java Date.toString() format.
+ UnicodeString dateToString(UDate d);
+ UnicodeString& dateToString(UDate d, UnicodeString& str);
+ UnicodeString& dateToString(UDate d, UnicodeString& str, const TimeZone& z);
+
+ // Utility methods to create a date. This is useful for converting Java constructs
+ // which create a Date object. Returns a Date in the current local time.
+ UDate date(int32_t y, int32_t m, int32_t d, int32_t hr=0, int32_t min=0, int32_t sec=0);
+
+ // Utility methods to create a date. Returns a Date in UTC. This will differ
+ // from local dates returned by date() by the current default zone offset.
+// Date utcDate(int y, int m, int d, int hr=0, int min=0, int sec=0);
+
+ // Utility method to get the fields of a date; similar to Date.getYear() etc.
+ void dateToFields(UDate date, int32_t& y, int32_t& m, int32_t& d, int32_t& hr, int32_t& min, int32_t& sec);
+
+protected:
+ static DateFormat* fgDateFormat;
+ static Calendar* fgCalendar;
+
+ // the 'get()' functions are not static because they can call errln().
+ // they are effectively static otherwise.
+ DateFormat* getDateFormat(void);
+ static void releaseDateFormat(DateFormat *f);
+
+ Calendar* getCalendar(void);
+ static void releaseCalendar(Calendar *c);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif //_CALTZTST
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/canittst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/canittst.cpp
new file mode 100644
index 00000000000..ed04269b6d6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/canittst.cpp
@@ -0,0 +1,330 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************
+ *
+ * @author Mark E. Davis
+ * @author Vladimir Weinstein
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#include "intltest.h"
+#include "cstring.h"
+#include "canittst.h"
+#include "unicode/caniter.h"
+#include "unicode/normlzr.h"
+#include "unicode/uchar.h"
+#include "hash.h"
+
+#define ARRAY_LENGTH(array) ((int32_t)(sizeof (array) / sizeof (*array)))
+
+#define CASE(id,test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ break
+
+void CanonicalIteratorTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ CASE(0, TestBasic);
+ CASE(1, TestExhaustive);
+ CASE(2, TestAPI);
+ default: name = ""; break;
+ }
+}
+
+/**
+ * Convert Java-style strings with \u Unicode escapes into UnicodeString objects
+static UnicodeString str(const char *input)
+{
+ UnicodeString str(input, ""); // Invariant conversion
+ return str.unescape();
+}
+ */
+
+
+CanonicalIteratorTest::CanonicalIteratorTest() :
+nameTrans(NULL), hexTrans(NULL)
+{
+}
+
+CanonicalIteratorTest::~CanonicalIteratorTest()
+{
+#if !UCONFIG_NO_TRANSLITERATION
+ if(nameTrans != NULL) {
+ delete(nameTrans);
+ }
+ if(hexTrans != NULL) {
+ delete(hexTrans);
+ }
+#endif
+}
+
+void CanonicalIteratorTest::TestExhaustive() {
+ UErrorCode status = U_ZERO_ERROR;
+ CanonicalIterator it("", status);
+ UChar32 i = 0;
+ UnicodeString s;
+ // Test static and dynamic class IDs
+ if(it.getDynamicClassID() != CanonicalIterator::getStaticClassID()){
+ errln("CanonicalIterator::getStaticClassId ! = CanonicalIterator.getDynamicClassID");
+ }
+ for (i = 0; i < 0x10FFFF; quick?i+=0x10:++i) {
+ //for (i = 0xae00; i < 0xaf00; ++i) {
+
+ if ((i % 0x100) == 0) {
+ logln("Testing U+%06X", i);
+ }
+
+ // skip characters we know don't have decomps
+ int8_t type = u_charType(i);
+ if (type == U_UNASSIGNED || type == U_PRIVATE_USE_CHAR
+ || type == U_SURROGATE) continue;
+
+ s = i;
+ characterTest(s, i, it);
+
+ s += (UChar32)0x0345; //"\\u0345";
+ characterTest(s, i, it);
+ }
+}
+
+void CanonicalIteratorTest::TestBasic() {
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ static const char * const testArray[][2] = {
+ {"\\u00C5d\\u0307\\u0327", "A\\u030Ad\\u0307\\u0327, A\\u030Ad\\u0327\\u0307, A\\u030A\\u1E0B\\u0327, "
+ "A\\u030A\\u1E11\\u0307, \\u00C5d\\u0307\\u0327, \\u00C5d\\u0327\\u0307, "
+ "\\u00C5\\u1E0B\\u0327, \\u00C5\\u1E11\\u0307, \\u212Bd\\u0307\\u0327, "
+ "\\u212Bd\\u0327\\u0307, \\u212B\\u1E0B\\u0327, \\u212B\\u1E11\\u0307"},
+ {"\\u010d\\u017E", "c\\u030Cz\\u030C, c\\u030C\\u017E, \\u010Dz\\u030C, \\u010D\\u017E"},
+ {"x\\u0307\\u0327", "x\\u0307\\u0327, x\\u0327\\u0307, \\u1E8B\\u0327"},
+ };
+
+#if 0
+ // This is not interesting for C/C++ as the data is already built beforehand
+ // check build
+ UnicodeSet ss = CanonicalIterator.getSafeStart();
+ logln("Safe Start: " + ss.toPattern(true));
+ ss = CanonicalIterator.getStarts('a');
+ expectEqual("Characters with 'a' at the start of their decomposition: ", "", CanonicalIterator.getStarts('a'),
+ new UnicodeSet("[\u00E0-\u00E5\u0101\u0103\u0105\u01CE\u01DF\u01E1\u01FB"
+ + "\u0201\u0203\u0227\u1E01\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7]")
+ );
+#endif
+
+ // check permute
+ // NOTE: we use a TreeSet below to sort the output, which is not guaranteed to be sorted!
+
+ Hashtable *permutations = new Hashtable(FALSE, status);
+ permutations->setValueDeleter(uhash_deleteUnicodeString);
+ UnicodeString toPermute("ABC");
+
+ CanonicalIterator::permute(toPermute, FALSE, permutations, status);
+
+ logln("testing permutation");
+
+ expectEqual("Simple permutation ", "", collectionToString(permutations), "ABC, ACB, BAC, BCA, CAB, CBA");
+
+ delete permutations;
+
+ // try samples
+ logln("testing samples");
+ Hashtable *set = new Hashtable(FALSE, status);
+ set->setValueDeleter(uhash_deleteUnicodeString);
+ int32_t i = 0;
+ CanonicalIterator it("", status);
+ if(U_SUCCESS(status)) {
+ for (i = 0; i < ARRAY_LENGTH(testArray); ++i) {
+ //logln("Results for: " + name.transliterate(testArray[i]));
+ UnicodeString testStr = CharsToUnicodeString(testArray[i][0]);
+ it.setSource(testStr, status);
+ set->removeAll();
+ for (;;) {
+ //UnicodeString *result = new UnicodeString(it.next());
+ UnicodeString result(it.next());
+ if (result.isBogus()) {
+ break;
+ }
+ set->put(result, new UnicodeString(result), status); // Add result to the table
+ //logln(++counter + ": " + hex.transliterate(result));
+ //logln(" = " + name.transliterate(result));
+ }
+ expectEqual(i + ": ", testStr, collectionToString(set), CharsToUnicodeString(testArray[i][1]));
+
+ }
+ } else {
+ errln("Couldn't instantiate canonical iterator. Error: %s", u_errorName(status));
+ }
+ delete set;
+}
+
+void CanonicalIteratorTest::characterTest(UnicodeString &s, UChar32 ch, CanonicalIterator &it)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString decomp, comp;
+ UBool gotDecomp = FALSE;
+ UBool gotComp = FALSE;
+ UBool gotSource = FALSE;
+
+ Normalizer::decompose(s, FALSE, 0, decomp, status);
+ Normalizer::compose(s, FALSE, 0, comp, status);
+
+ // skip characters that don't have either decomp.
+ // need quick test for this!
+ if (s == decomp && s == comp) {
+ return;
+ }
+
+ it.setSource(s, status);
+
+ for (;;) {
+ UnicodeString item = it.next();
+ if (item.isBogus()) break;
+ if (item == s) gotSource = TRUE;
+ if (item == decomp) gotDecomp = TRUE;
+ if (item == comp) gotComp = TRUE;
+ }
+
+ if (!gotSource || !gotDecomp || !gotComp) {
+ errln("FAIL CanonicalIterator: " + s + (int)ch);
+ }
+}
+
+void CanonicalIteratorTest::expectEqual(const UnicodeString &message, const UnicodeString &item, const UnicodeString &a, const UnicodeString &b) {
+ if (!(a==b)) {
+ errln("FAIL: " + message + getReadable(item));
+ errln("\t" + getReadable(a));
+ errln("\t" + getReadable(b));
+ } else {
+ logln("Checked: " + message + getReadable(item));
+ logln("\t" + getReadable(a));
+ logln("\t" + getReadable(b));
+ }
+}
+
+UnicodeString CanonicalIteratorTest::getReadable(const UnicodeString &s) {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString result = "[";
+ if (s.length() == 0) return "";
+ // set up for readable display
+#if !UCONFIG_NO_TRANSLITERATION
+ if(verbose) {
+ if (nameTrans == NULL)
+ nameTrans = Transliterator::createInstance("[^\\ -\\u007F] name", UTRANS_FORWARD, status);
+ UnicodeString sName = s;
+ nameTrans->transliterate(sName);
+ result += sName;
+ result += ";";
+ }
+ if (hexTrans == NULL)
+ hexTrans = Transliterator::createInstance("[^\\ -\\u007F] hex", UTRANS_FORWARD, status);
+#endif
+ UnicodeString sHex = s;
+#if !UCONFIG_NO_TRANSLITERATION
+ if(hexTrans) { // maybe there is no data and transliterator cannot be instantiated
+ hexTrans->transliterate(sHex);
+ }
+#endif
+ result += sHex;
+ result += "]";
+ return result;
+ //return "[" + (verbose ? name->transliterate(s) + "; " : "") + hex->transliterate(s) + "]";
+}
+
+U_CFUNC int U_CALLCONV
+compareUnicodeStrings(const void *s1, const void *s2) {
+ UnicodeString **st1 = (UnicodeString **)s1;
+ UnicodeString **st2 = (UnicodeString **)s2;
+
+ return (*st1)->compare(**st2);
+}
+
+
+UnicodeString CanonicalIteratorTest::collectionToString(Hashtable *col) {
+ UnicodeString result;
+
+ // Iterate over the Hashtable, then qsort.
+
+ UnicodeString **resArray = new UnicodeString*[col->count()];
+ int32_t i = 0;
+
+ const UHashElement *ne = NULL;
+ int32_t el = -1;
+ //Iterator it = basic.iterator();
+ ne = col->nextElement(el);
+ //while (it.hasNext())
+ while (ne != NULL) {
+ //String item = (String) it.next();
+ UnicodeString *item = (UnicodeString *)(ne->value.pointer);
+ resArray[i++] = item;
+ ne = col->nextElement(el);
+ }
+
+ for(i = 0; i<col->count(); ++i) {
+ logln(*resArray[i]);
+ }
+
+ qsort(resArray, col->count(), sizeof(UnicodeString *), compareUnicodeStrings);
+
+ result = *resArray[0];
+
+ for(i = 1; i<col->count(); ++i) {
+ result += ", ";
+ result += *resArray[i];
+ }
+
+/*
+ Iterator it = col.iterator();
+ while (it.hasNext()) {
+ if (result.length() != 0) result.append(", ");
+ result.append(it.next().toString());
+ }
+*/
+
+ delete [] resArray;
+
+ return result;
+}
+
+void CanonicalIteratorTest::TestAPI() {
+ UErrorCode status = U_ZERO_ERROR;
+ // Test reset and getSource
+ UnicodeString start("ljubav");
+ logln("Testing CanonicalIterator::getSource");
+ logln("Instantiating canonical iterator with string "+start);
+ CanonicalIterator can(start, status);
+ UnicodeString source = can.getSource();
+ logln("CanonicalIterator::getSource returned "+source);
+ if(start != source) {
+ errln("CanonicalIterator.getSource() didn't return the starting string. Expected "+start+", got "+source);
+ }
+ logln("Testing CanonicalIterator::reset");
+ UnicodeString next = can.next();
+ logln("CanonicalIterator::next returned "+next);
+
+ can.reset();
+
+ UnicodeString afterReset = can.next();
+ logln("After reset, CanonicalIterator::next returned "+afterReset);
+
+ if(next != afterReset) {
+ errln("Next after instantiation ("+next+") is different from next after reset ("+afterReset+").");
+ }
+
+ logln("Testing getStaticClassID and getDynamicClassID");
+ if(can.getDynamicClassID() != CanonicalIterator::getStaticClassID()){
+ errln("RTTI failed for CanonicalIterator getDynamicClassID != getStaticClassID");
+ }
+}
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/canittst.h b/Build/source/libs/icu/icu-xetex/test/intltest/canittst.h
new file mode 100644
index 00000000000..650cc089db0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/canittst.h
@@ -0,0 +1,59 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************
+ *
+ * @author Mark E. Davis
+ * @author Vladimir Weinstein
+ */
+
+/**
+ * Test Canonical Iterator
+ */
+
+#ifndef _CANITTST
+#define _CANITTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+
+U_NAMESPACE_BEGIN
+
+class Transliterator;
+
+U_NAMESPACE_END
+
+#include "unicode/translit.h"
+#include "unicode/caniter.h"
+#include "intltest.h"
+#include "hash.h"
+
+class CanonicalIteratorTest : public IntlTest {
+public:
+ CanonicalIteratorTest();
+ virtual ~CanonicalIteratorTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ void TestCanonicalIterator(void);
+ void TestExhaustive(void);
+ void TestBasic();
+ void TestAPI();
+ UnicodeString collectionToString(Hashtable *col);
+ //static UnicodeString collectionToString(Collection col);
+private:
+ void expectEqual(const UnicodeString &message, const UnicodeString &item, const UnicodeString &a, const UnicodeString &b);
+ void characterTest(UnicodeString &s, UChar32 ch, CanonicalIterator &it);
+
+ Transliterator *nameTrans;
+ Transliterator *hexTrans;
+
+ UnicodeString getReadable(const UnicodeString &obj);
+};
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
+#endif // _CANITTST
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/citrtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/citrtest.cpp
new file mode 100644
index 00000000000..75bd1e583f7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/citrtest.cpp
@@ -0,0 +1,1185 @@
+/****************************************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ * Modification History:
+ *
+ * Date Name Description
+ * 05/22/2000 Madhu Added tests for testing new API for utf16 support and more
+ ****************************************************************************************/
+
+#include <string.h>
+#include "unicode/chariter.h"
+#include "unicode/ustring.h"
+#include "unicode/unistr.h"
+#include "unicode/schriter.h"
+#include "unicode/uchriter.h"
+#include "unicode/uiter.h"
+#include "unicode/putil.h"
+#include "citrtest.h"
+
+
+class SCharacterIterator : public CharacterIterator {
+public:
+ SCharacterIterator(const UnicodeString& textStr){
+ text = textStr;
+ pos=0;
+ textLength = textStr.length();
+ begin = 0;
+ end=textLength;
+
+ }
+
+ virtual ~SCharacterIterator(){};
+
+
+ void setText(const UnicodeString& newText){
+ text = newText;
+ }
+
+ virtual void getText(UnicodeString& result) {
+ text.extract(0,text.length(),result);
+ }
+ static UClassID getStaticClassID(void){
+ return (UClassID)(&fgClassID);
+ }
+ virtual UClassID getDynamicClassID(void) const{
+ return getStaticClassID();
+ }
+
+ virtual UBool operator==(const ForwardCharacterIterator& /*that*/) const{
+ return TRUE;
+ }
+
+ virtual CharacterIterator* clone(void) const {
+ return NULL;
+ }
+ virtual int32_t hashCode(void) const{
+ return DONE;
+ }
+ virtual UChar nextPostInc(void){ return text.charAt(pos++);}
+ virtual UChar32 next32PostInc(void){return text.char32At(pos++);}
+ virtual UBool hasNext() { return TRUE;};
+ virtual UChar first(){return DONE;};
+ virtual UChar32 first32(){return DONE;};
+ virtual UChar last(){return DONE;};
+ virtual UChar32 last32(){return DONE;};
+ virtual UChar setIndex(int32_t /*pos*/){return DONE;};
+ virtual UChar32 setIndex32(int32_t /*pos*/){return DONE;};
+ virtual UChar current() const{return DONE;};
+ virtual UChar32 current32() const{return DONE;};
+ virtual UChar next(){return DONE;};
+ virtual UChar32 next32(){return DONE;};
+ virtual UChar previous(){return DONE;};
+ virtual UChar32 previous32(){return DONE;};
+ virtual int32_t move(int32_t delta,CharacterIterator::EOrigin origin){
+ switch(origin) {
+ case kStart:
+ pos = begin + delta;
+ break;
+ case kCurrent:
+ pos += delta;
+ break;
+ case kEnd:
+ pos = end + delta;
+ break;
+ default:
+ break;
+ }
+
+ if(pos < begin) {
+ pos = begin;
+ } else if(pos > end) {
+ pos = end;
+ }
+
+ return pos;
+ };
+ virtual int32_t move32(int32_t delta, CharacterIterator::EOrigin origin){
+ switch(origin) {
+ case kStart:
+ pos = begin;
+ if(delta > 0) {
+ UTF_FWD_N(text, pos, end, delta);
+ }
+ break;
+ case kCurrent:
+ if(delta > 0) {
+ UTF_FWD_N(text, pos, end, delta);
+ } else {
+ UTF_BACK_N(text, begin, pos, -delta);
+ }
+ break;
+ case kEnd:
+ pos = end;
+ if(delta < 0) {
+ UTF_BACK_N(text, begin, pos, -delta);
+ }
+ break;
+ default:
+ break;
+ }
+
+ return pos;
+ };
+ virtual UBool hasPrevious() {return TRUE;};
+
+ SCharacterIterator& operator=(const SCharacterIterator& that){
+ text = that.text;
+ return *this;
+ }
+
+
+private:
+ UnicodeString text;
+ static const char fgClassID;
+};
+const char SCharacterIterator::fgClassID=0;
+
+#define LENGTHOF(array) ((int32_t)(sizeof(array)/sizeof((array)[0])))
+
+CharIterTest::CharIterTest()
+{
+}
+void CharIterTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CharIterTest: ");
+ switch (index) {
+ case 0: name = "TestConstructionAndEquality"; if (exec) TestConstructionAndEquality(); break;
+ case 1: name = "TestConstructionAndEqualityUChariter"; if (exec) TestConstructionAndEqualityUChariter(); break;
+ case 2: name = "TestIteration"; if (exec) TestIteration(); break;
+ case 3: name = "TestIterationUChar32"; if (exec) TestIterationUChar32(); break;
+ case 4: name = "TestUCharIterator"; if (exec) TestUCharIterator(); break;
+ case 5: name = "TestCoverage"; if(exec) TestCoverage(); break;
+ case 6: name = "TestCharIteratorSubClasses"; if (exec) TestCharIteratorSubClasses(); break;
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+void CharIterTest::TestCoverage(){
+ UnicodeString testText("Now is the time for all good men to come to the aid of their country.");
+ UnicodeString testText2("\\ud800\\udc01deadbeef");
+ testText2 = testText2.unescape();
+ SCharacterIterator* test = new SCharacterIterator(testText);
+ if(test->firstPostInc()!= 0x004E){
+ errln("Failed: firstPostInc() failed");
+ }
+ if(test->getIndex()!=1){
+ errln("Failed: getIndex().");
+ }
+ if(test->getLength()!=testText.length()){
+ errln("Failed: getLength()");
+ }
+ test->setToStart();
+ if(test->getIndex()!=0){
+ errln("Failed: setToStart().");
+ }
+ test->setToEnd();
+ if(test->getIndex()!=testText.length()){
+ errln("Failed: setToEnd().");
+ }
+ if(test->startIndex() != 0){
+ errln("Failed: startIndex()");
+ }
+ test->setText(testText2);
+ if(test->first32PostInc()!= testText2.char32At(0)){
+ errln("Failed: first32PostInc() failed");
+ }
+
+ delete test;
+
+}
+void CharIterTest::TestConstructionAndEquality() {
+ UnicodeString testText("Now is the time for all good men to come to the aid of their country.");
+ UnicodeString testText2("Don't bother using this string.");
+ UnicodeString result1, result2, result3;
+
+ CharacterIterator* test1 = new StringCharacterIterator(testText);
+ CharacterIterator* test1b= new StringCharacterIterator(testText, -1);
+ CharacterIterator* test1c= new StringCharacterIterator(testText, 100);
+ CharacterIterator* test1d= new StringCharacterIterator(testText, -2, 100, 5);
+ CharacterIterator* test1e= new StringCharacterIterator(testText, 100, 20, 5);
+ CharacterIterator* test2 = new StringCharacterIterator(testText, 5);
+ CharacterIterator* test3 = new StringCharacterIterator(testText, 2, 20, 5);
+ CharacterIterator* test4 = new StringCharacterIterator(testText2);
+ CharacterIterator* test5 = test1->clone();
+
+ if (test1d->startIndex() < 0)
+ errln("Construction failed: startIndex is negative");
+ if (test1d->endIndex() > testText.length())
+ errln("Construction failed: endIndex is greater than the text length");
+ if (test1d->getIndex() < test1d->startIndex() || test1d->endIndex() < test1d->getIndex())
+ errln("Construction failed: index is invalid");
+
+ if (*test1 == *test2 || *test1 == *test3 || *test1 == *test4)
+ errln("Construction or operator== failed: Unequal objects compared equal");
+ if (*test1 != *test5)
+ errln("clone() or equals() failed: Two clones tested unequal");
+
+ if (test1->hashCode() == test2->hashCode() || test1->hashCode() == test3->hashCode()
+ || test1->hashCode() == test4->hashCode())
+ errln("hashCode() failed: different objects have same hash code");
+
+ if (test1->hashCode() != test5->hashCode())
+ errln("hashCode() failed: identical objects have different hash codes");
+
+ if(test1->getLength() != testText.length()){
+ errln("getLength of CharacterIterator failed");
+ }
+ test1->getText(result1);
+ test1b->getText(result2);
+ test1c->getText(result3);
+ if(result1 != result2 || result1 != result3)
+ errln("construction failed or getText() failed");
+
+
+ test1->setIndex(5);
+ if (*test1 != *test2 || *test1 == *test5)
+ errln("setIndex() failed");
+
+ *((StringCharacterIterator*)test1) = *((StringCharacterIterator*)test3);
+ if (*test1 != *test3 || *test1 == *test5)
+ errln("operator= failed");
+
+ delete test2;
+ delete test3;
+ delete test4;
+ delete test5;
+ delete test1b;
+ delete test1c;
+ delete test1d;
+ delete test1e;
+
+
+ StringCharacterIterator* testChar1=new StringCharacterIterator(testText);
+ StringCharacterIterator* testChar2=new StringCharacterIterator(testText2);
+ StringCharacterIterator* testChar3=(StringCharacterIterator*)test1->clone();
+
+ testChar1->getText(result1);
+ testChar2->getText(result2);
+ testChar3->getText(result3);
+ if(result1 != result3 || result1 == result2)
+ errln("getText() failed");
+ testChar3->setText(testText2);
+ testChar3->getText(result3);
+ if(result1 == result3 || result2 != result3)
+ errln("setText() or getText() failed");
+ testChar3->setText(testText);
+ testChar3->getText(result3);
+ if(result1 != result3 || result1 == result2)
+ errln("setText() or getText() round-trip failed");
+
+ delete testChar1;
+ delete testChar2;
+ delete testChar3;
+ delete test1;
+
+}
+void CharIterTest::TestConstructionAndEqualityUChariter() {
+ U_STRING_DECL(testText, "Now is the time for all good men to come to the aid of their country.", 69);
+ U_STRING_DECL(testText2, "Don't bother using this string.", 31);
+
+ U_STRING_INIT(testText, "Now is the time for all good men to come to the aid of their country.", 69);
+ U_STRING_INIT(testText2, "Don't bother using this string.", 31);
+
+ UnicodeString result, result4, result5;
+
+ UCharCharacterIterator* test1 = new UCharCharacterIterator(testText, u_strlen(testText));
+ UCharCharacterIterator* test2 = new UCharCharacterIterator(testText, u_strlen(testText), 5);
+ UCharCharacterIterator* test3 = new UCharCharacterIterator(testText, u_strlen(testText), 2, 20, 5);
+ UCharCharacterIterator* test4 = new UCharCharacterIterator(testText2, u_strlen(testText2));
+ UCharCharacterIterator* test5 = (UCharCharacterIterator*)test1->clone();
+ UCharCharacterIterator* test6 = new UCharCharacterIterator(*test1);
+
+ // j785: length=-1 will use u_strlen()
+ UCharCharacterIterator* test7a = new UCharCharacterIterator(testText, -1);
+ UCharCharacterIterator* test7b = new UCharCharacterIterator(testText, -1);
+ UCharCharacterIterator* test7c = new UCharCharacterIterator(testText, -1, 2, 20, 5);
+
+ // Bad parameters.
+ UCharCharacterIterator* test8a = new UCharCharacterIterator(testText, -1, -1, 20, 5);
+ UCharCharacterIterator* test8b = new UCharCharacterIterator(testText, -1, 2, 100, 5);
+ UCharCharacterIterator* test8c = new UCharCharacterIterator(testText, -1, 2, 20, 100);
+
+ if (test8a->startIndex() < 0)
+ errln("Construction failed: startIndex is negative");
+ if (test8b->endIndex() != u_strlen(testText))
+ errln("Construction failed: endIndex is different from the text length");
+ if (test8c->getIndex() < test8c->startIndex() || test8c->endIndex() < test8c->getIndex())
+ errln("Construction failed: index is invalid");
+
+ if (*test1 == *test2 || *test1 == *test3 || *test1 == *test4 )
+ errln("Construction or operator== failed: Unequal objects compared equal");
+ if (*test1 != *test5 )
+ errln("clone() or equals() failed: Two clones tested unequal");
+
+ if (*test6 != *test1 )
+ errln("copy construction or equals() failed: Two copies tested unequal");
+
+ if (test1->hashCode() == test2->hashCode() || test1->hashCode() == test3->hashCode()
+ || test1->hashCode() == test4->hashCode())
+ errln("hashCode() failed: different objects have same hash code");
+
+ if (test1->hashCode() != test5->hashCode())
+ errln("hashCode() failed: identical objects have different hash codes");
+
+ test7a->getText(result);
+ test7b->getText(result4);
+ test7c->getText(result5);
+
+ if(result != UnicodeString(testText) || result4 != result || result5 != result)
+ errln("error in construction");
+
+ test1->getText(result);
+ test4->getText(result4);
+ test5->getText(result5);
+ if(result != result5 || result == result4)
+ errln("getText() failed");
+ test5->setText(testText2, u_strlen(testText2));
+ test5->getText(result5);
+ if(result == result5 || result4 != result5)
+ errln("setText() or getText() failed");
+ test5->setText(testText, u_strlen(testText));
+ test5->getText(result5);
+ if(result != result5 || result == result4)
+ errln("setText() or getText() round-trip failed");
+
+
+ test1->setIndex(5);
+ if (*test1 != *test2 || *test1 == *test5)
+ errln("setIndex() failed");
+ test8b->setIndex32(5);
+ if (test8b->getIndex()!=5)
+ errln("setIndex32() failed");
+
+ *test1 = *test3;
+ if (*test1 != *test3 || *test1 == *test5)
+ errln("operator= failed");
+
+ delete test1;
+ delete test2;
+ delete test3;
+ delete test4;
+ delete test5;
+ delete test6;
+ delete test7a;
+ delete test7b;
+ delete test7c;
+ delete test8a;
+ delete test8b;
+ delete test8c;
+}
+
+
+void CharIterTest::TestIteration() {
+ UnicodeString text("Now is the time for all good men to come to the aid of their country.");
+
+ UChar c;
+ int32_t i;
+ {
+ StringCharacterIterator iter(text, 5);
+
+ UnicodeString iterText;
+ iter.getText(iterText);
+ if (iterText != text)
+ errln("iter.getText() failed");
+
+ if (iter.current() != text[(int32_t)5])
+ errln("Iterator didn't start out in the right place.");
+
+ c = iter.first();
+ i = 0;
+
+ if (iter.startIndex() != 0 || iter.endIndex() != text.length())
+ errln("startIndex() or endIndex() failed");
+
+ logln("Testing forward iteration...");
+ do {
+ if (c == CharacterIterator::DONE && i != text.length())
+ errln("Iterator reached end prematurely");
+ else if (c != text[i])
+ errln((UnicodeString)"Character mismatch at position " + i +
+ ", iterator has " + UCharToUnicodeString(c) +
+ ", string has " + UCharToUnicodeString(text[i]));
+
+ if (iter.current() != c)
+ errln("current() isn't working right");
+ if (iter.getIndex() != i)
+ errln("getIndex() isn't working right");
+
+ if (c != CharacterIterator::DONE) {
+ c = iter.next();
+ i++;
+ }
+ } while (c != CharacterIterator::DONE);
+ c=iter.next();
+ if(c!= CharacterIterator::DONE)
+ errln("next() didn't return DONE at the end");
+ c=iter.setIndex(text.length()+1);
+ if(c!= CharacterIterator::DONE)
+ errln("setIndex(len+1) didn't return DONE");
+
+ c = iter.last();
+ i = text.length() - 1;
+
+ logln("Testing backward iteration...");
+ do {
+ if (c == CharacterIterator::DONE && i >= 0)
+ errln("Iterator reached end prematurely");
+ else if (c != text[i])
+ errln((UnicodeString)"Character mismatch at position " + i +
+ ", iterator has " + UCharToUnicodeString(c) +
+ ", string has " + UCharToUnicodeString(text[i]));
+
+ if (iter.current() != c)
+ errln("current() isn't working right");
+ if (iter.getIndex() != i)
+ errln("getIndex() isn't working right");
+ if(iter.setIndex(i) != c)
+ errln("setIndex() isn't working right");
+
+ if (c != CharacterIterator::DONE) {
+ c = iter.previous();
+ i--;
+ }
+ } while (c != CharacterIterator::DONE);
+
+ c=iter.previous();
+ if(c!= CharacterIterator::DONE)
+ errln("previous didn't return DONE at the beginning");
+
+
+ //testing firstPostInc, nextPostInc, setTostart
+ i = 0;
+ c=iter.firstPostInc();
+ if(c != text[i])
+ errln((UnicodeString)"firstPostInc failed. Expected->" +
+ UCharToUnicodeString(text[i]) + " Got->" + UCharToUnicodeString(c));
+ if(iter.getIndex() != i+1)
+ errln((UnicodeString)"getIndex() after firstPostInc() failed");
+
+ iter.setToStart();
+ i=0;
+ if (iter.startIndex() != 0)
+ errln("setToStart failed");
+
+ logln("Testing forward iteration...");
+ do {
+ if (c != CharacterIterator::DONE)
+ c = iter.nextPostInc();
+
+ if(c != text[i])
+ errln((UnicodeString)"Character mismatch at position " + i +
+ (UnicodeString)", iterator has " + UCharToUnicodeString(c) +
+ (UnicodeString)", string has " + UCharToUnicodeString(text[i]));
+
+ i++;
+ if(iter.getIndex() != i)
+ errln("getIndex() aftr nextPostInc() isn't working right");
+ if(iter.current() != text[i])
+ errln("current() after nextPostInc() isn't working right");
+ } while (iter.hasNext());
+ c=iter.nextPostInc();
+ if(c!= CharacterIterator::DONE)
+ errln("nextPostInc() didn't return DONE at the beginning");
+ }
+
+ {
+ StringCharacterIterator iter(text, 5, 15, 10);
+ if (iter.startIndex() != 5 || iter.endIndex() != 15)
+ errln("creation of a restricted-range iterator failed");
+
+ if (iter.getIndex() != 10 || iter.current() != text[(int32_t)10])
+ errln("starting the iterator in the middle didn't work");
+
+ c = iter.first();
+ i = 5;
+
+ logln("Testing forward iteration over a range...");
+ do {
+ if (c == CharacterIterator::DONE && i != 15)
+ errln("Iterator reached end prematurely");
+ else if (c != text[i])
+ errln((UnicodeString)"Character mismatch at position " + i +
+ ", iterator has " + UCharToUnicodeString(c) +
+ ", string has " + UCharToUnicodeString(text[i]));
+
+ if (iter.current() != c)
+ errln("current() isn't working right");
+ if (iter.getIndex() != i)
+ errln("getIndex() isn't working right");
+ if(iter.setIndex(i) != c)
+ errln("setIndex() isn't working right");
+
+ if (c != CharacterIterator::DONE) {
+ c = iter.next();
+ i++;
+ }
+ } while (c != CharacterIterator::DONE);
+
+ c = iter.last();
+ i = 14;
+
+ logln("Testing backward iteration over a range...");
+ do {
+ if (c == CharacterIterator::DONE && i >= 5)
+ errln("Iterator reached end prematurely");
+ else if (c != text[i])
+ errln((UnicodeString)"Character mismatch at position " + i +
+ ", iterator has " + UCharToUnicodeString(c) +
+ ", string has " + UCharToUnicodeString(text[i]));
+
+ if (iter.current() != c)
+ errln("current() isn't working right");
+ if (iter.getIndex() != i)
+ errln("getIndex() isn't working right");
+
+ if (c != CharacterIterator::DONE) {
+ c = iter.previous();
+ i--;
+ }
+ } while (c != CharacterIterator::DONE);
+
+
+ }
+}
+
+//Tests for new API for utf-16 support
+void CharIterTest::TestIterationUChar32() {
+ UChar textChars[]={ 0x0061, 0x0062, 0xd841, 0xdc02, 0x20ac, 0xd7ff, 0xd842, 0xdc06, 0xd801, 0xdc00, 0x0061, 0x0000};
+ UnicodeString text(textChars);
+ UChar32 c;
+ int32_t i;
+ {
+ StringCharacterIterator iter(text, 1);
+
+ UnicodeString iterText;
+ iter.getText(iterText);
+ if (iterText != text)
+ errln("iter.getText() failed");
+
+ if (iter.current32() != text[(int32_t)1])
+ errln("Iterator didn't start out in the right place.");
+
+ c=iter.setToStart();
+ i=0;
+ i=iter.move32(1, CharacterIterator::kStart);
+ c=iter.current32();
+ if(c != text.char32At(1) || i!=1)
+ errln("move32(1, kStart) didn't work correctly expected %X got %X", c, text.char32At(1) );
+
+ i=iter.move32(2, CharacterIterator::kCurrent);
+ c=iter.current32();
+ if(c != text.char32At(4) || i!=4)
+ errln("move32(2, kCurrent) didn't work correctly expected %X got %X i=%ld", c, text.char32At(4), i);
+
+ i=iter.move32(-2, CharacterIterator::kCurrent);
+ c=iter.current32();
+ if(c != text.char32At(1) || i!=1)
+ errln("move32(-2, kCurrent) didn't work correctly expected %X got %X i=%d", c, text.char32At(1), i);
+
+
+ i=iter.move32(-2, CharacterIterator::kEnd);
+ c=iter.current32();
+ if(c != text.char32At((text.length()-3)) || i!=(text.length()-3))
+ errln("move32(-2, kEnd) didn't work correctly expected %X got %X i=%d", c, text.char32At((text.length()-3)), i);
+
+
+ c = iter.first32();
+ i = 0;
+
+ if (iter.startIndex() != 0 || iter.endIndex() != text.length())
+ errln("startIndex() or endIndex() failed");
+
+ logln("Testing forward iteration...");
+ do {
+ /* logln("c=%d i=%d char32At=%d", c, i, text.char32At(i)); */
+ if (c == CharacterIterator::DONE && i != text.length())
+ errln("Iterator reached end prematurely");
+ else if(iter.hasNext() == FALSE && i != text.length())
+ errln("Iterator reached end prematurely. Failed at hasNext");
+ else if (c != text.char32At(i))
+ errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
+
+ if (iter.current32() != c)
+ errln("current32() isn't working right");
+ if(iter.setIndex32(i) != c)
+ errln("setIndex32() isn't working right");
+ if (c != CharacterIterator::DONE) {
+ c = iter.next32();
+ i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1;
+ }
+ } while (c != CharacterIterator::DONE);
+ if(iter.hasNext() == TRUE)
+ errln("hasNext() returned true at the end of the string");
+
+
+
+ c=iter.setToEnd();
+ if(iter.getIndex() != text.length() || iter.hasNext() != FALSE)
+ errln("setToEnd failed");
+
+ c=iter.next32();
+ if(c!= CharacterIterator::DONE)
+ errln("next32 didn't return DONE at the end");
+ c=iter.setIndex32(text.length()+1);
+ if(c!= CharacterIterator::DONE)
+ errln("setIndex32(len+1) didn't return DONE");
+
+
+ c = iter.last32();
+ i = text.length()-1;
+ logln("Testing backward iteration...");
+ do {
+ if (c == CharacterIterator::DONE && i >= 0)
+ errln((UnicodeString)"Iterator reached start prematurely for i=" + i);
+ else if(iter.hasPrevious() == FALSE && i>0)
+ errln((UnicodeString)"Iterator reached start prematurely for i=" + i);
+ else if (c != text.char32At(i))
+ errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
+
+ if (iter.current32() != c)
+ errln("current32() isn't working right");
+ if(iter.setIndex32(i) != c)
+ errln("setIndex32() isn't working right");
+ if (iter.getIndex() != i)
+ errln("getIndex() isn't working right");
+ if (c != CharacterIterator::DONE) {
+ c = iter.previous32();
+ i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i-2 : i-1;
+ }
+ } while (c != CharacterIterator::DONE);
+ if(iter.hasPrevious() == TRUE)
+ errln("hasPrevious returned true after reaching the start");
+
+ c=iter.previous32();
+ if(c!= CharacterIterator::DONE)
+ errln("previous32 didn't return DONE at the beginning");
+
+
+
+
+ //testing first32PostInc, next32PostInc, setTostart
+ i = 0;
+ c=iter.first32PostInc();
+ if(c != text.char32At(i))
+ errln("first32PostInc failed. Expected->%X Got->%X", text.char32At(i), c);
+ if(iter.getIndex() != UTF16_CHAR_LENGTH(c) + i)
+ errln((UnicodeString)"getIndex() after first32PostInc() failed");
+
+ iter.setToStart();
+ i=0;
+ if (iter.startIndex() != 0)
+ errln("setToStart failed");
+
+ logln("Testing forward iteration...");
+ do {
+ if (c != CharacterIterator::DONE)
+ c = iter.next32PostInc();
+
+ if(c != text.char32At(i))
+ errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
+
+ i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1;
+ if(iter.getIndex() != i)
+ errln("getIndex() aftr next32PostInc() isn't working right");
+ if(iter.current32() != text.char32At(i))
+ errln("current() after next32PostInc() isn't working right");
+ } while (iter.hasNext());
+ c=iter.next32PostInc();
+ if(c!= CharacterIterator::DONE)
+ errln("next32PostInc() didn't return DONE at the beginning");
+
+
+ }
+
+ {
+ StringCharacterIterator iter(text, 1, 11, 10);
+ if (iter.startIndex() != 1 || iter.endIndex() != 11)
+ errln("creation of a restricted-range iterator failed");
+
+ if (iter.getIndex() != 10 || iter.current32() != text.char32At(10))
+ errln("starting the iterator in the middle didn't work");
+
+ c = iter.first32();
+
+ i = 1;
+
+ logln("Testing forward iteration over a range...");
+ do {
+ if (c == CharacterIterator::DONE && i != 11)
+ errln("Iterator reached end prematurely");
+ else if(iter.hasNext() == FALSE)
+ errln("Iterator reached end prematurely");
+ else if (c != text.char32At(i))
+ errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
+
+ if (iter.current32() != c)
+ errln("current32() isn't working right");
+ if(iter.setIndex32(i) != c)
+ errln("setIndex32() isn't working right");
+
+ if (c != CharacterIterator::DONE) {
+ c = iter.next32();
+ i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1;
+ }
+ } while (c != CharacterIterator::DONE);
+ c=iter.next32();
+ if(c != CharacterIterator::DONE)
+ errln("error in next32()");
+
+
+
+ c=iter.last32();
+ i = 10;
+ logln("Testing backward iteration over a range...");
+ do {
+ if (c == CharacterIterator::DONE && i >= 5)
+ errln("Iterator reached start prematurely");
+ else if(iter.hasPrevious() == FALSE && i > 5)
+ errln("Iterator reached start prematurely");
+ else if (c != text.char32At(i))
+ errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
+ if (iter.current32() != c)
+ errln("current32() isn't working right");
+ if (iter.getIndex() != i)
+ errln("getIndex() isn't working right");
+ if(iter.setIndex32(i) != c)
+ errln("setIndex32() isn't working right");
+
+ if (c != CharacterIterator::DONE) {
+ c = iter.previous32();
+ i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i-2 : i-1;
+ }
+
+ } while (c != CharacterIterator::DONE);
+ c=iter.previous32();
+ if(c!= CharacterIterator::DONE)
+ errln("error on previous32");
+
+
+ }
+}
+
+void CharIterTest::TestUCharIterator(UCharIterator *iter, CharacterIterator &ci,
+ const char *moves, const char *which) {
+ int32_t m;
+ UChar32 c, c2;
+ UBool h, h2;
+
+ for(m=0;; ++m) {
+ // move both iter and s[index]
+ switch(moves[m]) {
+ case '0':
+ h=iter->hasNext(iter);
+ h2=ci.hasNext();
+ c=iter->current(iter);
+ c2=ci.current();
+ break;
+ case '|':
+ h=iter->hasNext(iter);
+ h2=ci.hasNext();
+ c=uiter_current32(iter);
+ c2=ci.current32();
+ break;
+
+ case '+':
+ h=iter->hasNext(iter);
+ h2=ci.hasNext();
+ c=iter->next(iter);
+ c2=ci.nextPostInc();
+ break;
+ case '>':
+ h=iter->hasNext(iter);
+ h2=ci.hasNext();
+ c=uiter_next32(iter);
+ c2=ci.next32PostInc();
+ break;
+
+ case '-':
+ h=iter->hasPrevious(iter);
+ h2=ci.hasPrevious();
+ c=iter->previous(iter);
+ c2=ci.previous();
+ break;
+ case '<':
+ h=iter->hasPrevious(iter);
+ h2=ci.hasPrevious();
+ c=uiter_previous32(iter);
+ c2=ci.previous32();
+ break;
+
+ case '2':
+ h=h2=FALSE;
+ c=(UChar32)iter->move(iter, 2, UITER_CURRENT);
+ c2=(UChar32)ci.move(2, CharacterIterator::kCurrent);
+ break;
+
+ case '8':
+ h=h2=FALSE;
+ c=(UChar32)iter->move(iter, -2, UITER_CURRENT);
+ c2=(UChar32)ci.move(-2, CharacterIterator::kCurrent);
+ break;
+
+ case 0:
+ return;
+ default:
+ errln("error: unexpected move character '%c' in \"%s\"", moves[m], moves);
+ return;
+ }
+
+ // compare results
+ if(c2==0xffff) {
+ c2=(UChar32)-1;
+ }
+ if(c!=c2 || h!=h2 || ci.getIndex()!=iter->getIndex(iter, UITER_CURRENT)) {
+ errln("error: UCharIterator(%s) misbehaving at \"%s\"[%d]='%c'", which, moves, m, moves[m]);
+ }
+ }
+}
+
+void CharIterTest::TestUCharIterator() {
+ // test string of length 8
+ UnicodeString s=UnicodeString("a \\U00010001b\\U0010fffdz", "").unescape();
+ const char *const moves=
+ "0+++++++++" // 10 moves per line
+ "----0-----"
+ ">>|>>>>>>>"
+ "<<|<<<<<<<"
+ "22+>8>-8+2";
+
+ StringCharacterIterator sci(s), compareCI(s);
+
+ UCharIterator sIter, cIter, rIter;
+
+ uiter_setString(&sIter, s.getBuffer(), s.length());
+ uiter_setCharacterIterator(&cIter, &sci);
+ uiter_setReplaceable(&rIter, &s);
+
+ TestUCharIterator(&sIter, compareCI, moves, "uiter_setString");
+ compareCI.setIndex(0);
+ TestUCharIterator(&cIter, compareCI, moves, "uiter_setCharacterIterator");
+ compareCI.setIndex(0);
+ TestUCharIterator(&rIter, compareCI, moves, "uiter_setReplaceable");
+
+ // test move & getIndex some more
+ sIter.start=2;
+ sIter.index=3;
+ sIter.limit=5;
+ if( sIter.getIndex(&sIter, UITER_ZERO)!=0 ||
+ sIter.getIndex(&sIter, UITER_START)!=2 ||
+ sIter.getIndex(&sIter, UITER_CURRENT)!=3 ||
+ sIter.getIndex(&sIter, UITER_LIMIT)!=5 ||
+ sIter.getIndex(&sIter, UITER_LENGTH)!=s.length()
+ ) {
+ errln("error: UCharIterator(string).getIndex returns wrong index");
+ }
+
+ if( sIter.move(&sIter, 4, UITER_ZERO)!=4 ||
+ sIter.move(&sIter, 1, UITER_START)!=3 ||
+ sIter.move(&sIter, 3, UITER_CURRENT)!=5 ||
+ sIter.move(&sIter, -1, UITER_LIMIT)!=4 ||
+ sIter.move(&sIter, -5, UITER_LENGTH)!=3 ||
+ sIter.move(&sIter, 0, UITER_CURRENT)!=sIter.getIndex(&sIter, UITER_CURRENT) ||
+ sIter.getIndex(&sIter, UITER_CURRENT)!=3
+ ) {
+ errln("error: UCharIterator(string).move sets/returns wrong index");
+ }
+
+ sci=StringCharacterIterator(s, 2, 5, 3);
+ uiter_setCharacterIterator(&cIter, &sci);
+ if( cIter.getIndex(&cIter, UITER_ZERO)!=0 ||
+ cIter.getIndex(&cIter, UITER_START)!=2 ||
+ cIter.getIndex(&cIter, UITER_CURRENT)!=3 ||
+ cIter.getIndex(&cIter, UITER_LIMIT)!=5 ||
+ cIter.getIndex(&cIter, UITER_LENGTH)!=s.length()
+ ) {
+ errln("error: UCharIterator(character iterator).getIndex returns wrong index");
+ }
+
+ if( cIter.move(&cIter, 4, UITER_ZERO)!=4 ||
+ cIter.move(&cIter, 1, UITER_START)!=3 ||
+ cIter.move(&cIter, 3, UITER_CURRENT)!=5 ||
+ cIter.move(&cIter, -1, UITER_LIMIT)!=4 ||
+ cIter.move(&cIter, -5, UITER_LENGTH)!=3 ||
+ cIter.move(&cIter, 0, UITER_CURRENT)!=cIter.getIndex(&cIter, UITER_CURRENT) ||
+ cIter.getIndex(&cIter, UITER_CURRENT)!=3
+ ) {
+ errln("error: UCharIterator(character iterator).move sets/returns wrong index");
+ }
+
+
+ if(cIter.getIndex(&cIter, (enum UCharIteratorOrigin)-1) != -1)
+ {
+ errln("error: UCharIterator(char iter).getIndex did not return error value");
+ }
+
+ if(cIter.move(&cIter, 0, (enum UCharIteratorOrigin)-1) != -1)
+ {
+ errln("error: UCharIterator(char iter).move did not return error value");
+ }
+
+
+ if(rIter.getIndex(&rIter, (enum UCharIteratorOrigin)-1) != -1)
+ {
+ errln("error: UCharIterator(repl iter).getIndex did not return error value");
+ }
+
+ if(rIter.move(&rIter, 0, (enum UCharIteratorOrigin)-1) != -1)
+ {
+ errln("error: UCharIterator(repl iter).move did not return error value");
+ }
+
+
+ if(sIter.getIndex(&sIter, (enum UCharIteratorOrigin)-1) != -1)
+ {
+ errln("error: UCharIterator(string iter).getIndex did not return error value");
+ }
+
+ if(sIter.move(&sIter, 0, (enum UCharIteratorOrigin)-1) != -1)
+ {
+ errln("error: UCharIterator(string iter).move did not return error value");
+ }
+
+ /* Testing function coverage on bad input */
+ UErrorCode status = U_ZERO_ERROR;
+ uiter_setString(&sIter, NULL, 1);
+ uiter_setState(&sIter, 1, &status);
+ if (status != U_UNSUPPORTED_ERROR) {
+ errln("error: uiter_setState returned %s instead of U_UNSUPPORTED_ERROR", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ uiter_setState(NULL, 1, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ errln("error: uiter_setState returned %s instead of U_ILLEGAL_ARGUMENT_ERROR", u_errorName(status));
+ }
+ if (uiter_getState(&sIter) != UITER_NO_STATE) {
+ errln("error: uiter_getState did not return UITER_NO_STATE on bad input");
+ }
+}
+
+// subclass test, and completing API coverage -------------------------------
+
+class SubCharIter : public CharacterIterator {
+public:
+ // public default constructor, to get coverage of CharacterIterator()
+ SubCharIter() : CharacterIterator() {
+ textLength=end=LENGTHOF(s);
+ s[0]=0x61; // 'a'
+ s[1]=0xd900; // U+50400
+ s[2]=0xdd00;
+ s[3]=0x2029; // PS
+ }
+
+ // useful stuff, mostly dummy but testing coverage and subclassability
+ virtual UChar nextPostInc() {
+ if(pos<LENGTHOF(s)) {
+ return s[pos++];
+ } else {
+ return DONE;
+ }
+ }
+
+ virtual UChar32 next32PostInc() {
+ if(pos<LENGTHOF(s)) {
+ UChar32 c;
+ U16_NEXT(s, pos, LENGTHOF(s), c);
+ return c;
+ } else {
+ return DONE;
+ }
+ }
+
+ virtual UBool hasNext() {
+ return pos<LENGTHOF(s);
+ }
+
+ virtual UChar first() {
+ pos=0;
+ return s[0];
+ }
+
+ virtual UChar32 first32() {
+ UChar32 c;
+ pos=0;
+ U16_NEXT(s, pos, LENGTHOF(s), c);
+ pos=0;
+ return c;
+ }
+
+ virtual UChar setIndex(int32_t position) {
+ if(0<=position && position<=LENGTHOF(s)) {
+ pos=position;
+ if(pos<LENGTHOF(s)) {
+ return s[pos];
+ }
+ }
+ return DONE;
+ }
+
+ virtual UChar32 setIndex32(int32_t position) {
+ if(0<=position && position<=LENGTHOF(s)) {
+ pos=position;
+ if(pos<LENGTHOF(s)) {
+ UChar32 c;
+ U16_GET(s, 0, pos, LENGTHOF(s), c);
+ return c;
+ }
+ }
+ return DONE;
+ }
+
+ virtual UChar current() const {
+ if(pos<LENGTHOF(s)) {
+ return s[pos];
+ } else {
+ return DONE;
+ }
+ }
+
+ virtual UChar32 current32() const {
+ if(pos<LENGTHOF(s)) {
+ UChar32 c;
+ U16_GET(s, 0, pos, LENGTHOF(s), c);
+ return c;
+ } else {
+ return DONE;
+ }
+ }
+
+ virtual UChar next() {
+ if(pos<LENGTHOF(s) && ++pos<LENGTHOF(s)) {
+ return s[pos];
+ } else {
+ return DONE;
+ }
+ }
+
+ virtual UChar32 next32() {
+ if(pos<LENGTHOF(s)) {
+ U16_FWD_1(s, pos, LENGTHOF(s));
+ }
+ if(pos<LENGTHOF(s)) {
+ UChar32 c;
+ int32_t i=pos;
+ U16_NEXT(s, i, LENGTHOF(s), c);
+ return c;
+ } else {
+ return DONE;
+ }
+ }
+
+ virtual UBool hasPrevious() {
+ return pos>0;
+ }
+
+ virtual void getText(UnicodeString &result) {
+ result.setTo(s, LENGTHOF(s));
+ }
+
+ // dummy implementations of other pure virtual base class functions
+ virtual UBool operator==(const ForwardCharacterIterator &that) const {
+ return
+ this==&that ||
+ getDynamicClassID()==that.getDynamicClassID() && pos==((SubCharIter &)that).pos;
+ }
+
+ virtual int32_t hashCode() const {
+ return 2;
+ }
+
+ virtual CharacterIterator *clone() const {
+ return NULL;
+ }
+
+ virtual UChar last() {
+ return 0;
+ }
+
+ virtual UChar32 last32() {
+ return 0;
+ }
+
+ virtual UChar previous() {
+ return 0;
+ }
+
+ virtual UChar32 previous32() {
+ return 0;
+ }
+
+ virtual int32_t move(int32_t /*delta*/, EOrigin /*origin*/) {
+ return 0;
+ }
+
+ virtual int32_t move32(int32_t /*delta*/, EOrigin /*origin*/) {
+ return 0;
+ }
+
+ // RTTI
+ static UClassID getStaticClassID() {
+ return (UClassID)(&fgClassID);
+ }
+
+ virtual UClassID getDynamicClassID() const {
+ return getStaticClassID();
+ }
+
+private:
+ // dummy string data
+ UChar s[4];
+
+ static const char fgClassID;
+};
+
+const char SubCharIter::fgClassID = 0;
+
+class SubStringCharIter : public StringCharacterIterator {
+public:
+ SubStringCharIter() {
+ setText(UNICODE_STRING("abc", 3));
+ }
+};
+
+class SubUCharCharIter : public UCharCharacterIterator {
+public:
+ SubUCharCharIter() {
+ setText(u, 3);
+ }
+
+private:
+ static const UChar u[3];
+};
+
+const UChar SubUCharCharIter::u[3]={ 0x61, 0x62, 0x63 };
+
+void CharIterTest::TestCharIteratorSubClasses() {
+ SubCharIter *p;
+
+ // coverage - call functions that are not otherwise tested
+ // first[32]PostInc() are default implementations that are overridden
+ // in ICU's own CharacterIterator subclasses
+ p=new SubCharIter;
+ if(p->firstPostInc()!=0x61) {
+ errln("SubCharIter.firstPosInc() failed\n");
+ }
+ delete p;
+
+ p=new SubCharIter[2];
+ if(p[1].first32PostInc()!=0x61) {
+ errln("SubCharIter.first32PosInc() failed\n");
+ }
+ delete [] p;
+
+ // coverage: StringCharacterIterator default constructor
+ SubStringCharIter sci;
+ if(sci.firstPostInc()!=0x61) {
+ errln("SubStringCharIter.firstPostInc() failed\n");
+ }
+
+ // coverage: UCharCharacterIterator default constructor
+ SubUCharCharIter uci;
+ if(uci.firstPostInc()!=0x61) {
+ errln("SubUCharCharIter.firstPostInc() failed\n");
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/citrtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/citrtest.h
new file mode 100644
index 00000000000..09521c76605
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/citrtest.h
@@ -0,0 +1,46 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2002, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef CHARITERTEST_H
+#define CHARITERTEST_H
+
+#include "intltest.h"
+#include "unicode/uiter.h"
+
+/**
+ * Some tests for CharacterIterator and StringCharacterIterator
+ **/
+class CharIterTest: public IntlTest {
+public:
+ CharIterTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * Test Constructors and operators ==, != and a few other methods
+ **/
+ void TestConstructionAndEquality(void);
+ /**
+ * Test Constructors and operators ==, != and a few other methods for UChariter
+ **/
+ void TestConstructionAndEqualityUChariter(void);
+ /**
+ * test the iteration functionality in different ways
+ **/
+ void TestIteration(void);
+ /**
+ * test the iteration functionality in different ways with unicodestring of UChar32's
+ **/
+ void TestIterationUChar32(void);
+
+ void TestUCharIterator();
+ void TestUCharIterator(UCharIterator *iter, CharacterIterator &ci, const char *moves, const char *which);
+ void TestCoverage();
+ void TestCharIteratorSubClasses();
+};
+
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.cpp
new file mode 100644
index 00000000000..28f38cb6f79
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.cpp
@@ -0,0 +1,249 @@
+/********************************************************************
+* COPYRIGHT:
+* Copyright (c) 1997-2006, International Business Machines Corporation and
+* others. All Rights Reserved.
+********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "cntabcol.h"
+
+U_NAMESPACE_USE
+
+ContractionTableTest::ContractionTableTest() {
+ testMapping = utrie_open(NULL, NULL, 0, 0, 0, TRUE);
+}
+
+ContractionTableTest::~ContractionTableTest() {
+ utrie_close(testMapping);
+}
+
+void ContractionTableTest::TestGrowTable(/* char* par */) {
+ UErrorCode status = U_ZERO_ERROR;
+ uint32_t i = 0, res = 0;
+ testTable = uprv_cnttab_open(testMapping, &status);
+
+ // fill up one contraction so that it has to expand
+ for(i = 0; i<65536; i++) {
+ uprv_cnttab_addContraction(testTable, 0, (UChar)i, i, &status);
+ if(U_FAILURE(status)) {
+ errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status));
+ break;
+ }
+ }
+ // test whether the filled up contraction really contains the data we input
+ if(U_SUCCESS(status)) {
+ for(i = 0; i<65536; i++) {
+ res = uprv_cnttab_getCE(testTable, 0, i, &status);
+ if(U_FAILURE(status)) {
+ errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status));
+ break;
+ }
+ if(res != i) {
+ errln("Error: expected %i, got %i\n", i, res);
+ break;
+ }
+ }
+ }
+ uprv_cnttab_close(testTable);
+}
+
+void ContractionTableTest::TestSetContraction(){
+ UErrorCode status = U_ZERO_ERROR;
+ testTable = uprv_cnttab_open(testMapping, &status);
+ // This should make a new contraction
+ uprv_cnttab_setContraction(testTable, 1, 0, 0x41, 0x41, &status);
+ if(U_FAILURE(status)) {
+ errln("Error setting a non existing contraction error = %i (%s)\n", status, u_errorName(status));
+ }
+ // if we try to change the non existing offset, we should get an error
+ status = U_ZERO_ERROR;
+ // currently this tests whether there is enough space, maybe it should test whether the element is actually in
+ // range. Also, maybe a silent growing should take place....
+ uprv_cnttab_setContraction(testTable, 1, 0x401, 0x41, 0x41, &status);
+ if(status != U_INDEX_OUTOFBOUNDS_ERROR) {
+ errln("changing a non-existing offset should have resulted in an error\n");
+ }
+ status = U_ZERO_ERROR;
+ uprv_cnttab_close(testTable);
+}
+
+void ContractionTableTest::TestAddATableElement(){
+ UErrorCode status = U_ZERO_ERROR;
+ testTable = uprv_cnttab_open(testMapping, &status);
+ uint32_t i = 0, res = 0;
+
+ // fill up one contraction so that it has to expand
+ for(i = 0; i<0x1000; i++) {
+ uprv_cnttab_addContraction(testTable, i, (UChar)i, i, &status);
+ if(U_FAILURE(status)) {
+ errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status));
+ break;
+ }
+ }
+ // test whether the filled up contraction really contains the data we input
+ if(U_SUCCESS(status)) {
+ for(i = 0; i<0x1000; i++) {
+ res = uprv_cnttab_getCE(testTable, i, 0, &status);
+ if(U_FAILURE(status)) {
+ errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status));
+ break;
+ }
+ if(res != i) {
+ errln("Error: expected %i, got %i\n", i, res);
+ break;
+ }
+ }
+ }
+ uprv_cnttab_close(testTable);
+}
+
+void ContractionTableTest::TestClone(){
+ UErrorCode status = U_ZERO_ERROR;
+ testTable = uprv_cnttab_open(testMapping, &status);
+ int32_t i = 0, res = 0;
+ // we must construct table in order to copy codepoints and CEs
+ // fill up one contraction so that it has to expand
+ for(i = 0; i<0x500; i++) {
+ uprv_cnttab_addContraction(testTable, i, (UChar)i, i, &status);
+ if(U_FAILURE(status)) {
+ errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status));
+ break;
+ }
+ }
+ uprv_cnttab_constructTable(testTable, 0, &status);
+ if(U_FAILURE(status)) {
+ errln("Error constructing table error = %i (%s)\n", status, u_errorName(status));
+ } else {
+ testClone = uprv_cnttab_clone(testTable, &status);
+ if(U_SUCCESS(status)) {
+ for(i = 0; i<0x500; i++) {
+ res = uprv_cnttab_getCE(testTable, i, 0, &status);
+ if(U_FAILURE(status)) {
+ errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status));
+ break;
+ }
+ if(res != i) {
+ errln("Error: expected %i, got %i\n", i, res);
+ break;
+ }
+ }
+ }
+ uprv_cnttab_close(testClone);
+ }
+ uprv_cnttab_close(testTable);
+ testTable = uprv_cnttab_open(testMapping, &status);
+ if(U_FAILURE(status)) {
+ errln("Error opening table error = %i (%s)\n", status, u_errorName(status));
+ }
+ uprv_cnttab_close(testTable);
+}
+
+void ContractionTableTest::TestChangeContraction(){
+ UErrorCode status = U_ZERO_ERROR;
+ testTable = uprv_cnttab_open(testMapping, &status);
+ uint32_t i = 0, res = 0;
+ res = uprv_cnttab_changeContraction(testTable, 0, 0x41, 0xAB, &status);
+ if(res != 0) {
+ errln("found a non existing contraction!\n");
+ }
+
+ for(i = 0; i < 0x20; i+=2) {
+ uprv_cnttab_addContraction(testTable, 0, (UChar)i, i, &status);
+ }
+
+ res = uprv_cnttab_changeContraction(testTable, 0, 0x41, 0xAB, &status);
+ if(res != UCOL_NOT_FOUND) {
+ errln("managed to change a non existing contraction!\n");
+ }
+
+ for(i = 1; i < 0x20; i+=2) {
+ res = uprv_cnttab_changeContraction(testTable, 0, (UChar)i, 0xAB, &status);
+ if(res != UCOL_NOT_FOUND) {
+ errln("managed to change a non existing contraction!\n");
+ }
+ }
+ uprv_cnttab_close(testTable);
+}
+
+void ContractionTableTest::TestChangeLastCE(){
+ UErrorCode status = U_ZERO_ERROR;
+ testTable = uprv_cnttab_open(testMapping, &status);
+ uint32_t res = uprv_cnttab_changeLastCE(testTable, 1, 0xABCD, &status);
+ if(res!=0) {
+ errln("managed to change the last CE in an non-existing contraction!\n");
+ }
+ uprv_cnttab_close(testTable);
+}
+
+void ContractionTableTest::TestErrorCodeChecking(){
+ UErrorCode status = U_REGEX_SET_CONTAINS_STRING;
+
+ uprv_cnttab_open(NULL, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_clone(NULL, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_changeLastCE(NULL, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_insertContraction(NULL, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_addContraction(NULL, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_setContraction(NULL, 0, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_findCP(NULL, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ if (uprv_cnttab_getCE(NULL, 0, 0, &status) != UCOL_NOT_FOUND) {
+ errln("uprv_cnttab_getCE didn't return UCOL_NOT_FOUND\n");
+ }
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ if (uprv_cnttab_findCE(NULL, 0, 0, &status) != UCOL_NOT_FOUND) {
+ errln("uprv_cnttab_findCE didn't return UCOL_NOT_FOUND\n");
+ }
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_isTailored(NULL, 0, NULL, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_changeContraction(NULL, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+}
+
+void ContractionTableTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite ContractionTableTest: ");
+ switch (index) {
+ case 0: name = "TestGrowTable"; if (exec) TestGrowTable(/* par */); break;
+ case 1: name = "TestSetContraction"; if (exec) TestSetContraction(/* par */); break;
+ case 2: name = "TestAddATableElement"; if (exec) TestAddATableElement(/* par */); break;
+ case 3: name = "TestClone"; if (exec) TestClone(/* par */); break;
+ case 4: name = "TestChangeContraction"; if (exec) TestChangeContraction(/* par */); break;
+ case 5: name = "TestChangeLastCE"; if (exec) TestChangeLastCE(/* par */); break;
+ case 6: name = "TestErrorCodeChecking"; if (exec) TestErrorCodeChecking(/* par */); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.h b/Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.h
new file mode 100644
index 00000000000..0e35d7dec0c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/cntabcol.h
@@ -0,0 +1,41 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef CONTRACTIONTABLETEST_H
+#define CONTRACTIONTABLETEST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+#include "ucol_cnt.h"
+#include "utrie.h"
+
+class ContractionTableTest: public IntlTestCollator {
+public:
+ ContractionTableTest();
+ virtual ~ContractionTableTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // performs test with strength TERIARY
+ void TestGrowTable(/* char* par */);
+ void TestSetContraction();
+ void TestAddATableElement();
+ void TestClone();
+ void TestChangeContraction();
+ void TestChangeLastCE();
+ void TestErrorCodeChecking();
+private:
+ CntTable *testTable, *testClone;
+ /*CompactEIntArray *testMapping;*/
+ UNewTrie *testMapping;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/convtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/convtest.cpp
new file mode 100644
index 00000000000..909c951464f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/convtest.cpp
@@ -0,0 +1,1423 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 2003-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: convtest.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2003jul15
+* created by: Markus W. Scherer
+*
+* Test file for data-driven conversion tests.
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+/*
+ * Note: Turning off all of convtest.cpp if !UCONFIG_NO_LEGACY_CONVERSION
+ * is slightly unnecessary - it removes tests for Unicode charsets
+ * like UTF-8 that should work.
+ * However, there is no easy way for the test to detect whether a test case
+ * is for a Unicode charset, so it would be difficult to only exclude those.
+ * Also, regular testing of ICU is done with all modules on, therefore
+ * not testing conversion for a custom configuration like this should be ok.
+ */
+
+#include "unicode/ucnv.h"
+#include "unicode/unistr.h"
+#include "unicode/parsepos.h"
+#include "unicode/uniset.h"
+#include "unicode/ustring.h"
+#include "unicode/ures.h"
+#include "convtest.h"
+#include "unicode/tstdtmod.h"
+#include <string.h>
+#include <stdlib.h>
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+enum {
+ // characters used in test data for callbacks
+ SUB_CB='?',
+ SKIP_CB='0',
+ STOP_CB='.',
+ ESC_CB='&'
+};
+
+ConversionTest::ConversionTest() {
+ UErrorCode errorCode=U_ZERO_ERROR;
+ utf8Cnv=ucnv_open("UTF-8", &errorCode);
+ ucnv_setToUCallBack(utf8Cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("unable to open UTF-8 converter");
+ }
+}
+
+ConversionTest::~ConversionTest() {
+ ucnv_close(utf8Cnv);
+}
+
+void
+ConversionTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) {
+ if (exec) logln("TestSuite ConversionTest: ");
+ switch (index) {
+ case 0: name="TestToUnicode"; if (exec) TestToUnicode(); break;
+ case 1: name="TestFromUnicode"; if (exec) TestFromUnicode(); break;
+ case 2: name="TestGetUnicodeSet"; if (exec) TestGetUnicodeSet(); break;
+ default: name=""; break; //needed to end loop
+ }
+}
+
+// test data interface ----------------------------------------------------- ***
+
+void
+ConversionTest::TestToUnicode() {
+ ConversionCase cc;
+ char charset[100], cbopt[4];
+ const char *option;
+ UnicodeString s, unicode;
+ int32_t offsetsLength;
+ UConverterToUCallback callback;
+
+ TestDataModule *dataModule;
+ TestData *testData;
+ const DataMap *testCase;
+ UErrorCode errorCode;
+ int32_t i;
+
+ errorCode=U_ZERO_ERROR;
+ dataModule=TestDataModule::getTestDataModule("conversion", *this, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ testData=dataModule->createTestData("toUnicode", errorCode);
+ if(U_SUCCESS(errorCode)) {
+ for(i=0; testData->nextCase(testCase, errorCode); ++i) {
+ if(U_FAILURE(errorCode)) {
+ errln("error retrieving conversion/toUnicode test case %d - %s",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ cc.caseNr=i;
+
+ s=testCase->getString("charset", errorCode);
+ s.extract(0, 0x7fffffff, charset, sizeof(charset), "");
+ cc.charset=charset;
+
+ cc.bytes=testCase->getBinary(cc.bytesLength, "bytes", errorCode);
+ unicode=testCase->getString("unicode", errorCode);
+ cc.unicode=unicode.getBuffer();
+ cc.unicodeLength=unicode.length();
+
+ offsetsLength=0;
+ cc.offsets=testCase->getIntVector(offsetsLength, "offsets", errorCode);
+ if(offsetsLength==0) {
+ cc.offsets=NULL;
+ } else if(offsetsLength!=unicode.length()) {
+ errln("toUnicode[%d] unicode[%d] and offsets[%d] must have the same length",
+ i, unicode.length(), offsetsLength);
+ errorCode=U_ILLEGAL_ARGUMENT_ERROR;
+ }
+
+ cc.finalFlush= 0!=testCase->getInt28("flush", errorCode);
+ cc.fallbacks= 0!=testCase->getInt28("fallbacks", errorCode);
+
+ s=testCase->getString("errorCode", errorCode);
+ if(s==UNICODE_STRING("invalid", 7)) {
+ cc.outErrorCode=U_INVALID_CHAR_FOUND;
+ } else if(s==UNICODE_STRING("illegal", 7)) {
+ cc.outErrorCode=U_ILLEGAL_CHAR_FOUND;
+ } else if(s==UNICODE_STRING("truncated", 9)) {
+ cc.outErrorCode=U_TRUNCATED_CHAR_FOUND;
+ } else if(s==UNICODE_STRING("illesc", 6)) {
+ cc.outErrorCode=U_ILLEGAL_ESCAPE_SEQUENCE;
+ } else if(s==UNICODE_STRING("unsuppesc", 9)) {
+ cc.outErrorCode=U_UNSUPPORTED_ESCAPE_SEQUENCE;
+ } else {
+ cc.outErrorCode=U_ZERO_ERROR;
+ }
+
+ s=testCase->getString("callback", errorCode);
+ s.extract(0, 0x7fffffff, cbopt, sizeof(cbopt), "");
+ cc.cbopt=cbopt;
+ switch(cbopt[0]) {
+ case SUB_CB:
+ callback=UCNV_TO_U_CALLBACK_SUBSTITUTE;
+ break;
+ case SKIP_CB:
+ callback=UCNV_TO_U_CALLBACK_SKIP;
+ break;
+ case STOP_CB:
+ callback=UCNV_TO_U_CALLBACK_STOP;
+ break;
+ case ESC_CB:
+ callback=UCNV_TO_U_CALLBACK_ESCAPE;
+ break;
+ default:
+ callback=NULL;
+ break;
+ }
+ option=callback==NULL ? cbopt : cbopt+1;
+ if(*option==0) {
+ option=NULL;
+ }
+
+ cc.invalidChars=testCase->getBinary(cc.invalidLength, "invalidChars", errorCode);
+
+ if(U_FAILURE(errorCode)) {
+ errln("error parsing conversion/toUnicode test case %d - %s",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ } else {
+ logln("TestToUnicode[%d] %s", i, charset);
+ ToUnicodeCase(cc, callback, option);
+ }
+ }
+ delete testData;
+ }
+ delete dataModule;
+ }
+ else {
+ errln("Failed: could not load test conversion data");
+ }
+}
+
+void
+ConversionTest::TestFromUnicode() {
+ ConversionCase cc;
+ char charset[100], cbopt[4];
+ const char *option;
+ UnicodeString s, unicode, invalidUChars;
+ int32_t offsetsLength, index;
+ UConverterFromUCallback callback;
+
+ TestDataModule *dataModule;
+ TestData *testData;
+ const DataMap *testCase;
+ const UChar *p;
+ UErrorCode errorCode;
+ int32_t i, length;
+
+ errorCode=U_ZERO_ERROR;
+ dataModule=TestDataModule::getTestDataModule("conversion", *this, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ testData=dataModule->createTestData("fromUnicode", errorCode);
+ if(U_SUCCESS(errorCode)) {
+ for(i=0; testData->nextCase(testCase, errorCode); ++i) {
+ if(U_FAILURE(errorCode)) {
+ errln("error retrieving conversion/fromUnicode test case %d - %s",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ cc.caseNr=i;
+
+ s=testCase->getString("charset", errorCode);
+ s.extract(0, 0x7fffffff, charset, sizeof(charset), "");
+ cc.charset=charset;
+
+ unicode=testCase->getString("unicode", errorCode);
+ cc.unicode=unicode.getBuffer();
+ cc.unicodeLength=unicode.length();
+ cc.bytes=testCase->getBinary(cc.bytesLength, "bytes", errorCode);
+
+ offsetsLength=0;
+ cc.offsets=testCase->getIntVector(offsetsLength, "offsets", errorCode);
+ if(offsetsLength==0) {
+ cc.offsets=NULL;
+ } else if(offsetsLength!=cc.bytesLength) {
+ errln("fromUnicode[%d] bytes[%d] and offsets[%d] must have the same length",
+ i, cc.bytesLength, offsetsLength);
+ errorCode=U_ILLEGAL_ARGUMENT_ERROR;
+ }
+
+ cc.finalFlush= 0!=testCase->getInt28("flush", errorCode);
+ cc.fallbacks= 0!=testCase->getInt28("fallbacks", errorCode);
+
+ s=testCase->getString("errorCode", errorCode);
+ if(s==UNICODE_STRING("invalid", 7)) {
+ cc.outErrorCode=U_INVALID_CHAR_FOUND;
+ } else if(s==UNICODE_STRING("illegal", 7)) {
+ cc.outErrorCode=U_ILLEGAL_CHAR_FOUND;
+ } else if(s==UNICODE_STRING("truncated", 9)) {
+ cc.outErrorCode=U_TRUNCATED_CHAR_FOUND;
+ } else {
+ cc.outErrorCode=U_ZERO_ERROR;
+ }
+
+ s=testCase->getString("callback", errorCode);
+ cc.setSub=0; // default: no subchar
+
+ if((index=s.indexOf((UChar)0))>0) {
+ // read NUL-separated subchar first, if any
+ // copy the subchar from Latin-1 characters
+ // start after the NUL
+ p=s.getTerminatedBuffer();
+ length=index+1;
+ p+=length;
+ length=s.length()-length;
+ if(length<=0 || length>=(int32_t)sizeof(cc.subchar)) {
+ errorCode=U_ILLEGAL_ARGUMENT_ERROR;
+ } else {
+ int32_t j;
+
+ for(j=0; j<length; ++j) {
+ cc.subchar[j]=(char)p[j];
+ }
+ // NUL-terminate the subchar
+ cc.subchar[j]=0;
+ cc.setSub=1;
+ }
+
+ // remove the NUL and subchar from s
+ s.truncate(index);
+ } else if((index=s.indexOf((UChar)0x3d))>0) /* '=' */ {
+ // read a substitution string, separated by an equal sign
+ p=s.getBuffer()+index+1;
+ length=s.length()-(index+1);
+ if(length<0 || length>=LENGTHOF(cc.subString)) {
+ errorCode=U_ILLEGAL_ARGUMENT_ERROR;
+ } else {
+ u_memcpy(cc.subString, p, length);
+ // NUL-terminate the subString
+ cc.subString[length]=0;
+ cc.setSub=-1;
+ }
+
+ // remove the equal sign and subString from s
+ s.truncate(index);
+ }
+
+ s.extract(0, 0x7fffffff, cbopt, sizeof(cbopt), "");
+ cc.cbopt=cbopt;
+ switch(cbopt[0]) {
+ case SUB_CB:
+ callback=UCNV_FROM_U_CALLBACK_SUBSTITUTE;
+ break;
+ case SKIP_CB:
+ callback=UCNV_FROM_U_CALLBACK_SKIP;
+ break;
+ case STOP_CB:
+ callback=UCNV_FROM_U_CALLBACK_STOP;
+ break;
+ case ESC_CB:
+ callback=UCNV_FROM_U_CALLBACK_ESCAPE;
+ break;
+ default:
+ callback=NULL;
+ break;
+ }
+ option=callback==NULL ? cbopt : cbopt+1;
+ if(*option==0) {
+ option=NULL;
+ }
+
+ invalidUChars=testCase->getString("invalidUChars", errorCode);
+ cc.invalidUChars=invalidUChars.getBuffer();
+ cc.invalidLength=invalidUChars.length();
+
+ if(U_FAILURE(errorCode)) {
+ errln("error parsing conversion/fromUnicode test case %d - %s",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ } else {
+ logln("TestFromUnicode[%d] %s", i, charset);
+ FromUnicodeCase(cc, callback, option);
+ }
+ }
+ delete testData;
+ }
+ delete dataModule;
+ }
+ else {
+ errln("Failed: could not load test conversion data");
+ }
+}
+
+static const UChar ellipsis[]={ 0x2e, 0x2e, 0x2e };
+
+void
+ConversionTest::TestGetUnicodeSet() {
+ char charset[100];
+ UnicodeString s, map, mapnot;
+ int32_t which;
+
+ ParsePosition pos;
+ UnicodeSet cnvSet, mapSet, mapnotSet, diffSet;
+ UnicodeSet *cnvSetPtr = &cnvSet;
+ UConverter *cnv;
+
+ TestDataModule *dataModule;
+ TestData *testData;
+ const DataMap *testCase;
+ UErrorCode errorCode;
+ int32_t i;
+
+ errorCode=U_ZERO_ERROR;
+ dataModule=TestDataModule::getTestDataModule("conversion", *this, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ testData=dataModule->createTestData("getUnicodeSet", errorCode);
+ if(U_SUCCESS(errorCode)) {
+ for(i=0; testData->nextCase(testCase, errorCode); ++i) {
+ if(U_FAILURE(errorCode)) {
+ errln("error retrieving conversion/getUnicodeSet test case %d - %s",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ s=testCase->getString("charset", errorCode);
+ s.extract(0, 0x7fffffff, charset, sizeof(charset), "");
+
+ map=testCase->getString("map", errorCode);
+ mapnot=testCase->getString("mapnot", errorCode);
+
+ which=testCase->getInt28("which", errorCode);
+
+ if(U_FAILURE(errorCode)) {
+ errln("error parsing conversion/getUnicodeSet test case %d - %s",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ // test this test case
+ mapSet.clear();
+ mapnotSet.clear();
+
+ pos.setIndex(0);
+ mapSet.applyPattern(map, pos, 0, NULL, errorCode);
+ if(U_FAILURE(errorCode) || pos.getIndex()!=map.length()) {
+ errln("error creating the map set for conversion/getUnicodeSet test case %d - %s\n"
+ " error index %d index %d U+%04x",
+ i, u_errorName(errorCode), pos.getErrorIndex(), pos.getIndex(), map.char32At(pos.getIndex()));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ pos.setIndex(0);
+ mapnotSet.applyPattern(mapnot, pos, 0, NULL, errorCode);
+ if(U_FAILURE(errorCode) || pos.getIndex()!=mapnot.length()) {
+ errln("error creating the mapnot set for conversion/getUnicodeSet test case %d - %s\n"
+ " error index %d index %d U+%04x",
+ i, u_errorName(errorCode), pos.getErrorIndex(), pos.getIndex(), mapnot.char32At(pos.getIndex()));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ logln("TestGetUnicodeSet[%d] %s", i, charset);
+
+ cnv=cnv_open(charset, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("error opening \"%s\" for conversion/getUnicodeSet test case %d - %s",
+ charset, i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ ucnv_getUnicodeSet(cnv, (USet *)cnvSetPtr, (UConverterUnicodeSet)which, &errorCode);
+ ucnv_close(cnv);
+
+ if(U_FAILURE(errorCode)) {
+ errln("error in ucnv_getUnicodeSet(\"%s\") for conversion/getUnicodeSet test case %d - %s",
+ charset, i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+
+ // are there items that must be in cnvSet but are not?
+ (diffSet=mapSet).removeAll(cnvSet);
+ if(!diffSet.isEmpty()) {
+ diffSet.toPattern(s, TRUE);
+ if(s.length()>100) {
+ s.replace(100, 0x7fffffff, ellipsis, LENGTHOF(ellipsis));
+ }
+ errln("error: ucnv_getUnicodeSet(\"%s\") is missing items - conversion/getUnicodeSet test case %d",
+ charset, i);
+ errln(s);
+ }
+
+ // are there items that must not be in cnvSet but are?
+ (diffSet=mapnotSet).retainAll(cnvSet);
+ if(!diffSet.isEmpty()) {
+ diffSet.toPattern(s, TRUE);
+ if(s.length()>100) {
+ s.replace(100, 0x7fffffff, ellipsis, LENGTHOF(ellipsis));
+ }
+ errln("error: ucnv_getUnicodeSet(\"%s\") contains unexpected items - conversion/getUnicodeSet test case %d",
+ charset, i);
+ errln(s);
+ }
+ }
+ delete testData;
+ }
+ delete dataModule;
+ }
+ else {
+ errln("Failed: could not load test conversion data");
+ }
+}
+
+// open testdata or ICU data converter ------------------------------------- ***
+
+UConverter *
+ConversionTest::cnv_open(const char *name, UErrorCode &errorCode) {
+ if(name!=NULL && *name=='*') {
+ /* loadTestData(): set the data directory */
+ return ucnv_openPackage(loadTestData(errorCode), name+1, &errorCode);
+ } else {
+ return ucnv_open(name, &errorCode);
+ }
+}
+
+// output helpers ---------------------------------------------------------- ***
+
+static inline char
+hexDigit(uint8_t digit) {
+ return digit<=9 ? (char)('0'+digit) : (char)('a'-10+digit);
+}
+
+static char *
+printBytes(const uint8_t *bytes, int32_t length, char *out) {
+ uint8_t b;
+
+ if(length>0) {
+ b=*bytes++;
+ --length;
+ *out++=hexDigit((uint8_t)(b>>4));
+ *out++=hexDigit((uint8_t)(b&0xf));
+ }
+
+ while(length>0) {
+ b=*bytes++;
+ --length;
+ *out++=' ';
+ *out++=hexDigit((uint8_t)(b>>4));
+ *out++=hexDigit((uint8_t)(b&0xf));
+ }
+ *out++=0;
+ return out;
+}
+
+static char *
+printUnicode(const UChar *unicode, int32_t length, char *out) {
+ UChar32 c;
+ int32_t i;
+
+ for(i=0; i<length;) {
+ if(i>0) {
+ *out++=' ';
+ }
+ U16_NEXT(unicode, i, length, c);
+ // write 4..6 digits
+ if(c>=0x100000) {
+ *out++='1';
+ }
+ if(c>=0x10000) {
+ *out++=hexDigit((uint8_t)((c>>16)&0xf));
+ }
+ *out++=hexDigit((uint8_t)((c>>12)&0xf));
+ *out++=hexDigit((uint8_t)((c>>8)&0xf));
+ *out++=hexDigit((uint8_t)((c>>4)&0xf));
+ *out++=hexDigit((uint8_t)(c&0xf));
+ }
+ *out++=0;
+ return out;
+}
+
+static char *
+printOffsets(const int32_t *offsets, int32_t length, char *out) {
+ int32_t i, o, d;
+
+ if(offsets==NULL) {
+ length=0;
+ }
+
+ for(i=0; i<length; ++i) {
+ if(i>0) {
+ *out++=' ';
+ }
+ o=offsets[i];
+
+ // print all offsets with 2 characters each (-x, -9..99, xx)
+ if(o<-9) {
+ *out++='-';
+ *out++='x';
+ } else if(o<0) {
+ *out++='-';
+ *out++=(char)('0'-o);
+ } else if(o<=99) {
+ *out++=(d=o/10)==0 ? ' ' : (char)('0'+d);
+ *out++=(char)('0'+o%10);
+ } else /* o>99 */ {
+ *out++='x';
+ *out++='x';
+ }
+ }
+ *out++=0;
+ return out;
+}
+
+// toUnicode test worker functions ----------------------------------------- ***
+
+static int32_t
+stepToUnicode(ConversionCase &cc, UConverter *cnv,
+ UChar *result, int32_t resultCapacity,
+ int32_t *resultOffsets, /* also resultCapacity */
+ int32_t step,
+ UErrorCode *pErrorCode) {
+ const char *source, *sourceLimit, *bytesLimit;
+ UChar *target, *targetLimit, *resultLimit;
+ UBool flush;
+
+ source=(const char *)cc.bytes;
+ target=result;
+ bytesLimit=source+cc.bytesLength;
+ resultLimit=result+resultCapacity;
+
+ if(step>=0) {
+ // call ucnv_toUnicode() with in/out buffers no larger than (step) at a time
+ // move only one buffer (in vs. out) at a time to be extra mean
+ // step==0 performs bulk conversion and generates offsets
+
+ // initialize the partial limits for the loop
+ if(step==0) {
+ // use the entire buffers
+ sourceLimit=bytesLimit;
+ targetLimit=resultLimit;
+ flush=cc.finalFlush;
+ } else {
+ // start with empty partial buffers
+ sourceLimit=source;
+ targetLimit=target;
+ flush=FALSE;
+
+ // output offsets only for bulk conversion
+ resultOffsets=NULL;
+ }
+
+ for(;;) {
+ // resetting the opposite conversion direction must not affect this one
+ ucnv_resetFromUnicode(cnv);
+
+ // convert
+ ucnv_toUnicode(cnv,
+ &target, targetLimit,
+ &source, sourceLimit,
+ resultOffsets,
+ flush, pErrorCode);
+
+ // check pointers and errors
+ if(source>sourceLimit || target>targetLimit) {
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ } else if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) {
+ if(target!=targetLimit) {
+ // buffer overflow must only be set when the target is filled
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ } else if(targetLimit==resultLimit) {
+ // not just a partial overflow
+ break;
+ }
+
+ // the partial target is filled, set a new limit, reset the error and continue
+ targetLimit=(resultLimit-target)>=step ? target+step : resultLimit;
+ *pErrorCode=U_ZERO_ERROR;
+ } else if(U_FAILURE(*pErrorCode)) {
+ // some other error occurred, done
+ break;
+ } else {
+ if(source!=sourceLimit) {
+ // when no error occurs, then the input must be consumed
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ }
+
+ if(sourceLimit==bytesLimit) {
+ // we are done
+ break;
+ }
+
+ // the partial conversion succeeded, set a new limit and continue
+ sourceLimit=(bytesLimit-source)>=step ? source+step : bytesLimit;
+ flush=(UBool)(cc.finalFlush && sourceLimit==bytesLimit);
+ }
+ }
+ } else /* step<0 */ {
+ /*
+ * step==-1: call only ucnv_getNextUChar()
+ * otherwise alternate between ucnv_toUnicode() and ucnv_getNextUChar()
+ * if step==-2 or -3, then give ucnv_toUnicode() the whole remaining input,
+ * else give it at most (-step-2)/2 bytes
+ */
+ UChar32 c;
+
+ // end the loop by getting an index out of bounds error
+ for(;;) {
+ // resetting the opposite conversion direction must not affect this one
+ ucnv_resetFromUnicode(cnv);
+
+ // convert
+ if((step&1)!=0 /* odd: -1, -3, -5, ... */) {
+ sourceLimit=source; // use sourceLimit not as a real limit
+ // but to remember the pre-getNextUChar source pointer
+ c=ucnv_getNextUChar(cnv, &source, bytesLimit, pErrorCode);
+
+ // check pointers and errors
+ if(*pErrorCode==U_INDEX_OUTOFBOUNDS_ERROR) {
+ if(source!=bytesLimit) {
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ } else {
+ *pErrorCode=U_ZERO_ERROR;
+ }
+ break;
+ } else if(U_FAILURE(*pErrorCode)) {
+ break;
+ }
+ // source may not move if c is from previous overflow
+
+ if(target==resultLimit) {
+ *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
+ break;
+ }
+ if(c<=0xffff) {
+ *target++=(UChar)c;
+ } else {
+ *target++=U16_LEAD(c);
+ if(target==resultLimit) {
+ *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
+ break;
+ }
+ *target++=U16_TRAIL(c);
+ }
+
+ // alternate between -n-1 and -n but leave -1 alone
+ if(step<-1) {
+ ++step;
+ }
+ } else /* step is even */ {
+ // allow only one UChar output
+ targetLimit=target<resultLimit ? target+1 : resultLimit;
+
+ // as with ucnv_getNextUChar(), we always flush (if we go to bytesLimit)
+ // and never output offsets
+ if(step==-2) {
+ sourceLimit=bytesLimit;
+ } else {
+ sourceLimit=source+(-step-2)/2;
+ if(sourceLimit>bytesLimit) {
+ sourceLimit=bytesLimit;
+ }
+ }
+
+ ucnv_toUnicode(cnv,
+ &target, targetLimit,
+ &source, sourceLimit,
+ NULL, (UBool)(sourceLimit==bytesLimit), pErrorCode);
+
+ // check pointers and errors
+ if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) {
+ if(target!=targetLimit) {
+ // buffer overflow must only be set when the target is filled
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ } else if(targetLimit==resultLimit) {
+ // not just a partial overflow
+ break;
+ }
+
+ // the partial target is filled, set a new limit and continue
+ *pErrorCode=U_ZERO_ERROR;
+ } else if(U_FAILURE(*pErrorCode)) {
+ // some other error occurred, done
+ break;
+ } else {
+ if(source!=sourceLimit) {
+ // when no error occurs, then the input must be consumed
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ }
+
+ // we are done (flush==TRUE) but we continue, to get the index out of bounds error above
+ }
+
+ --step;
+ }
+ }
+ }
+
+ return (int32_t)(target-result);
+}
+
+UBool
+ConversionTest::ToUnicodeCase(ConversionCase &cc, UConverterToUCallback callback, const char *option) {
+ UConverter *cnv;
+ UErrorCode errorCode;
+
+ // open the converter
+ errorCode=U_ZERO_ERROR;
+ cnv=cnv_open(cc.charset, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("toUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_open() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
+ return FALSE;
+ }
+
+ // set the callback
+ if(callback!=NULL) {
+ ucnv_setToUCallBack(cnv, callback, option, NULL, NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("toUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setToUCallBack() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
+ ucnv_close(cnv);
+ return FALSE;
+ }
+ }
+
+ int32_t resultOffsets[256];
+ UChar result[256];
+ int32_t resultLength;
+ UBool ok;
+
+ static const struct {
+ int32_t step;
+ const char *name;
+ } steps[]={
+ { 0, "bulk" }, // must be first for offsets to be checked
+ { 1, "step=1" },
+ { 3, "step=3" },
+ { 7, "step=7" },
+ { -1, "getNext" },
+ { -2, "toU(bulk)+getNext" },
+ { -3, "getNext+toU(bulk)" },
+ { -4, "toU(1)+getNext" },
+ { -5, "getNext+toU(1)" },
+ { -12, "toU(5)+getNext" },
+ { -13, "getNext+toU(5)" },
+ };
+ int32_t i, step;
+
+ ok=TRUE;
+ for(i=0; i<LENGTHOF(steps) && ok; ++i) {
+ step=steps[i].step;
+ if(step<0 && !cc.finalFlush) {
+ // skip ucnv_getNextUChar() if !finalFlush because
+ // ucnv_getNextUChar() always implies flush
+ continue;
+ }
+ if(step!=0) {
+ // bulk test is first, then offsets are not checked any more
+ cc.offsets=NULL;
+ }
+ else {
+ memset(resultOffsets, -1, LENGTHOF(resultOffsets));
+ }
+ memset(result, -1, LENGTHOF(result));
+ errorCode=U_ZERO_ERROR;
+ resultLength=stepToUnicode(cc, cnv,
+ result, LENGTHOF(result),
+ step==0 ? resultOffsets : NULL,
+ step, &errorCode);
+ ok=checkToUnicode(
+ cc, cnv, steps[i].name,
+ result, resultLength,
+ cc.offsets!=NULL ? resultOffsets : NULL,
+ errorCode);
+ if(U_FAILURE(errorCode) || !cc.finalFlush) {
+ // reset if an error occurred or we did not flush
+ // otherwise do nothing to make sure that flushing resets
+ ucnv_resetToUnicode(cnv);
+ }
+ if (resultOffsets[resultLength] != -1) {
+ errln("toUnicode[%d](%s) Conversion wrote too much to offsets at index %d",
+ cc.caseNr, cc.charset, resultLength);
+ }
+ if (result[resultLength] != (UChar)-1) {
+ errln("toUnicode[%d](%s) Conversion wrote too much to result at index %d",
+ cc.caseNr, cc.charset, resultLength);
+ }
+ }
+
+ // not a real loop, just a convenience for breaking out of the block
+ while(ok && cc.finalFlush) {
+ // test ucnv_toUChars()
+ memset(result, 0, sizeof(result));
+
+ errorCode=U_ZERO_ERROR;
+ resultLength=ucnv_toUChars(cnv,
+ result, LENGTHOF(result),
+ (const char *)cc.bytes, cc.bytesLength,
+ &errorCode);
+ ok=checkToUnicode(
+ cc, cnv, "toUChars",
+ result, resultLength,
+ NULL,
+ errorCode);
+ if(!ok) {
+ break;
+ }
+
+ // test preflighting
+ // keep the correct result for simple checking
+ errorCode=U_ZERO_ERROR;
+ resultLength=ucnv_toUChars(cnv,
+ NULL, 0,
+ (const char *)cc.bytes, cc.bytesLength,
+ &errorCode);
+ if(errorCode==U_STRING_NOT_TERMINATED_WARNING || errorCode==U_BUFFER_OVERFLOW_ERROR) {
+ errorCode=U_ZERO_ERROR;
+ }
+ ok=checkToUnicode(
+ cc, cnv, "preflight toUChars",
+ result, resultLength,
+ NULL,
+ errorCode);
+ break;
+ }
+
+ ucnv_close(cnv);
+ return ok;
+}
+
+UBool
+ConversionTest::checkToUnicode(ConversionCase &cc, UConverter *cnv, const char *name,
+ const UChar *result, int32_t resultLength,
+ const int32_t *resultOffsets,
+ UErrorCode resultErrorCode) {
+ char resultInvalidChars[8];
+ int8_t resultInvalidLength;
+ UErrorCode errorCode;
+
+ const char *msg;
+
+ // reset the message; NULL will mean "ok"
+ msg=NULL;
+
+ errorCode=U_ZERO_ERROR;
+ resultInvalidLength=sizeof(resultInvalidChars);
+ ucnv_getInvalidChars(cnv, resultInvalidChars, &resultInvalidLength, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("toUnicode[%d](%s cb=\"%s\" fb=%d flush=%d %s) ucnv_getInvalidChars() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, u_errorName(errorCode));
+ return FALSE;
+ }
+
+ // check everything that might have gone wrong
+ if(cc.unicodeLength!=resultLength) {
+ msg="wrong result length";
+ } else if(0!=u_memcmp(cc.unicode, result, cc.unicodeLength)) {
+ msg="wrong result string";
+ } else if(cc.offsets!=NULL && 0!=memcmp(cc.offsets, resultOffsets, cc.unicodeLength*sizeof(*cc.offsets))) {
+ msg="wrong offsets";
+ } else if(cc.outErrorCode!=resultErrorCode) {
+ msg="wrong error code";
+ } else if(cc.invalidLength!=resultInvalidLength) {
+ msg="wrong length of last invalid input";
+ } else if(0!=memcmp(cc.invalidChars, resultInvalidChars, cc.invalidLength)) {
+ msg="wrong last invalid input";
+ }
+
+ if(msg==NULL) {
+ return TRUE;
+ } else {
+ char buffer[2000]; // one buffer for all strings
+ char *s, *bytesString, *unicodeString, *resultString,
+ *offsetsString, *resultOffsetsString,
+ *invalidCharsString, *resultInvalidCharsString;
+
+ bytesString=s=buffer;
+ s=printBytes(cc.bytes, cc.bytesLength, bytesString);
+ s=printUnicode(cc.unicode, cc.unicodeLength, unicodeString=s);
+ s=printUnicode(result, resultLength, resultString=s);
+ s=printOffsets(cc.offsets, cc.unicodeLength, offsetsString=s);
+ s=printOffsets(resultOffsets, resultLength, resultOffsetsString=s);
+ s=printBytes(cc.invalidChars, cc.invalidLength, invalidCharsString=s);
+ s=printBytes((uint8_t *)resultInvalidChars, resultInvalidLength, resultInvalidCharsString=s);
+
+ if((s-buffer)>(int32_t)sizeof(buffer)) {
+ errln("toUnicode[%d](%s cb=\"%s\" fb=%d flush=%d %s) fatal error: checkToUnicode() test output buffer overflow writing %d chars\n",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, (int)(s-buffer));
+ exit(1);
+ }
+
+ errln("toUnicode[%d](%s cb=\"%s\" fb=%d flush=%d %s) failed: %s\n"
+ " bytes <%s>[%d]\n"
+ " expected <%s>[%d]\n"
+ " result <%s>[%d]\n"
+ " offsets <%s>\n"
+ " result offsets <%s>\n"
+ " error code expected %s got %s\n"
+ " invalidChars expected <%s> got <%s>\n",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, msg,
+ bytesString, cc.bytesLength,
+ unicodeString, cc.unicodeLength,
+ resultString, resultLength,
+ offsetsString,
+ resultOffsetsString,
+ u_errorName(cc.outErrorCode), u_errorName(resultErrorCode),
+ invalidCharsString, resultInvalidCharsString);
+
+ return FALSE;
+ }
+}
+
+// fromUnicode test worker functions --------------------------------------- ***
+
+static int32_t
+stepFromUTF8(ConversionCase &cc,
+ UConverter *utf8Cnv, UConverter *cnv,
+ char *result, int32_t resultCapacity,
+ int32_t step,
+ UErrorCode *pErrorCode) {
+ const char *source, *sourceLimit, *utf8Limit;
+ UChar pivotBuffer[32];
+ UChar *pivotSource, *pivotTarget, *pivotLimit;
+ char *target, *targetLimit, *resultLimit;
+ UBool flush;
+
+ source=cc.utf8;
+ pivotSource=pivotTarget=pivotBuffer;
+ target=result;
+ utf8Limit=source+cc.utf8Length;
+ resultLimit=result+resultCapacity;
+
+ // call ucnv_convertEx() with in/out buffers no larger than (step) at a time
+ // move only one buffer (in vs. out) at a time to be extra mean
+ // step==0 performs bulk conversion
+
+ // initialize the partial limits for the loop
+ if(step==0) {
+ // use the entire buffers
+ sourceLimit=utf8Limit;
+ targetLimit=resultLimit;
+ flush=cc.finalFlush;
+
+ pivotLimit=pivotBuffer+LENGTHOF(pivotBuffer);
+ } else {
+ // start with empty partial buffers
+ sourceLimit=source;
+ targetLimit=target;
+ flush=FALSE;
+
+ // empty pivot is not allowed, make it of length step
+ pivotLimit=pivotBuffer+step;
+ }
+
+ for(;;) {
+ // resetting the opposite conversion direction must not affect this one
+ ucnv_resetFromUnicode(utf8Cnv);
+ ucnv_resetToUnicode(cnv);
+
+ // convert
+ ucnv_convertEx(cnv, utf8Cnv,
+ &target, targetLimit,
+ &source, sourceLimit,
+ pivotBuffer, &pivotSource, &pivotTarget, pivotLimit,
+ FALSE, flush, pErrorCode);
+
+ // check pointers and errors
+ if(source>sourceLimit || target>targetLimit) {
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ } else if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) {
+ if(target!=targetLimit) {
+ // buffer overflow must only be set when the target is filled
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ } else if(targetLimit==resultLimit) {
+ // not just a partial overflow
+ break;
+ }
+
+ // the partial target is filled, set a new limit, reset the error and continue
+ targetLimit=(resultLimit-target)>=step ? target+step : resultLimit;
+ *pErrorCode=U_ZERO_ERROR;
+ } else if(U_FAILURE(*pErrorCode)) {
+ if(pivotSource==pivotBuffer) {
+ // toUnicode error, should not occur
+ // toUnicode errors are tested in cintltst TestConvertExFromUTF8()
+ break;
+ } else {
+ // fromUnicode error
+ // some other error occurred, done
+ break;
+ }
+ } else {
+ if(source!=sourceLimit) {
+ // when no error occurs, then the input must be consumed
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ }
+
+ if(sourceLimit==utf8Limit) {
+ // we are done
+ if(*pErrorCode==U_STRING_NOT_TERMINATED_WARNING) {
+ // ucnv_convertEx() warns about not terminating the output
+ // but ucnv_fromUnicode() does not and so
+ // checkFromUnicode() does not expect it
+ *pErrorCode=U_ZERO_ERROR;
+ }
+ break;
+ }
+
+ // the partial conversion succeeded, set a new limit and continue
+ sourceLimit=(utf8Limit-source)>=step ? source+step : utf8Limit;
+ flush=(UBool)(cc.finalFlush && sourceLimit==utf8Limit);
+ }
+ }
+
+ return (int32_t)(target-result);
+}
+
+static int32_t
+stepFromUnicode(ConversionCase &cc, UConverter *cnv,
+ char *result, int32_t resultCapacity,
+ int32_t *resultOffsets, /* also resultCapacity */
+ int32_t step,
+ UErrorCode *pErrorCode) {
+ const UChar *source, *sourceLimit, *unicodeLimit;
+ char *target, *targetLimit, *resultLimit;
+ UBool flush;
+
+ source=cc.unicode;
+ target=result;
+ unicodeLimit=source+cc.unicodeLength;
+ resultLimit=result+resultCapacity;
+
+ // call ucnv_fromUnicode() with in/out buffers no larger than (step) at a time
+ // move only one buffer (in vs. out) at a time to be extra mean
+ // step==0 performs bulk conversion and generates offsets
+
+ // initialize the partial limits for the loop
+ if(step==0) {
+ // use the entire buffers
+ sourceLimit=unicodeLimit;
+ targetLimit=resultLimit;
+ flush=cc.finalFlush;
+ } else {
+ // start with empty partial buffers
+ sourceLimit=source;
+ targetLimit=target;
+ flush=FALSE;
+
+ // output offsets only for bulk conversion
+ resultOffsets=NULL;
+ }
+
+ for(;;) {
+ // resetting the opposite conversion direction must not affect this one
+ ucnv_resetToUnicode(cnv);
+
+ // convert
+ ucnv_fromUnicode(cnv,
+ &target, targetLimit,
+ &source, sourceLimit,
+ resultOffsets,
+ flush, pErrorCode);
+
+ // check pointers and errors
+ if(source>sourceLimit || target>targetLimit) {
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ } else if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) {
+ if(target!=targetLimit) {
+ // buffer overflow must only be set when the target is filled
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ } else if(targetLimit==resultLimit) {
+ // not just a partial overflow
+ break;
+ }
+
+ // the partial target is filled, set a new limit, reset the error and continue
+ targetLimit=(resultLimit-target)>=step ? target+step : resultLimit;
+ *pErrorCode=U_ZERO_ERROR;
+ } else if(U_FAILURE(*pErrorCode)) {
+ // some other error occurred, done
+ break;
+ } else {
+ if(source!=sourceLimit) {
+ // when no error occurs, then the input must be consumed
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ break;
+ }
+
+ if(sourceLimit==unicodeLimit) {
+ // we are done
+ break;
+ }
+
+ // the partial conversion succeeded, set a new limit and continue
+ sourceLimit=(unicodeLimit-source)>=step ? source+step : unicodeLimit;
+ flush=(UBool)(cc.finalFlush && sourceLimit==unicodeLimit);
+ }
+ }
+
+ return (int32_t)(target-result);
+}
+
+UBool
+ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback callback, const char *option) {
+ UConverter *cnv;
+ UErrorCode errorCode;
+
+ // open the converter
+ errorCode=U_ZERO_ERROR;
+ cnv=cnv_open(cc.charset, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_open() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
+ return FALSE;
+ }
+ ucnv_resetToUnicode(utf8Cnv);
+
+ // set the callback
+ if(callback!=NULL) {
+ ucnv_setFromUCallBack(cnv, callback, option, NULL, NULL, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setFromUCallBack() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
+ ucnv_close(cnv);
+ return FALSE;
+ }
+ }
+
+ // set the fallbacks flag
+ // TODO change with Jitterbug 2401, then add a similar call for toUnicode too
+ ucnv_setFallback(cnv, cc.fallbacks);
+
+ // set the subchar
+ int32_t length;
+
+ if(cc.setSub>0) {
+ length=(int32_t)strlen(cc.subchar);
+ ucnv_setSubstChars(cnv, cc.subchar, (int8_t)length, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setSubstChars() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
+ ucnv_close(cnv);
+ return FALSE;
+ }
+ } else if(cc.setSub<0) {
+ ucnv_setSubstString(cnv, cc.subString, -1, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setSubstString() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
+ ucnv_close(cnv);
+ return FALSE;
+ }
+ }
+
+ // convert unicode to utf8
+ char utf8[256];
+ cc.utf8=utf8;
+ u_strToUTF8(utf8, LENGTHOF(utf8), &cc.utf8Length,
+ cc.unicode, cc.unicodeLength,
+ &errorCode);
+ if(U_FAILURE(errorCode)) {
+ // skip UTF-8 testing of a string with an unpaired surrogate,
+ // or of one that's too long
+ // toUnicode errors are tested in cintltst TestConvertExFromUTF8()
+ cc.utf8Length=-1;
+ }
+
+ int32_t resultOffsets[256];
+ char result[256];
+ int32_t resultLength;
+ UBool ok;
+
+ static const struct {
+ int32_t step;
+ const char *name, *utf8Name;
+ } steps[]={
+ { 0, "bulk", "utf8" }, // must be first for offsets to be checked
+ { 1, "step=1", "utf8 step=1" },
+ { 3, "step=3", "utf8 step=3" },
+ { 7, "step=7", "utf8 step=7" }
+ };
+ int32_t i, step;
+
+ ok=TRUE;
+ for(i=0; i<LENGTHOF(steps) && ok; ++i) {
+ step=steps[i].step;
+ memset(resultOffsets, -1, LENGTHOF(resultOffsets));
+ memset(result, -1, LENGTHOF(result));
+ errorCode=U_ZERO_ERROR;
+ resultLength=stepFromUnicode(cc, cnv,
+ result, LENGTHOF(result),
+ step==0 ? resultOffsets : NULL,
+ step, &errorCode);
+ ok=checkFromUnicode(
+ cc, cnv, steps[i].name,
+ (uint8_t *)result, resultLength,
+ cc.offsets!=NULL ? resultOffsets : NULL,
+ errorCode);
+ if(U_FAILURE(errorCode) || !cc.finalFlush) {
+ // reset if an error occurred or we did not flush
+ // otherwise do nothing to make sure that flushing resets
+ ucnv_resetFromUnicode(cnv);
+ }
+ if (resultOffsets[resultLength] != -1) {
+ errln("fromUnicode[%d](%s) Conversion wrote too much to offsets at index %d",
+ cc.caseNr, cc.charset, resultLength);
+ }
+ if (result[resultLength] != (char)-1) {
+ errln("fromUnicode[%d](%s) Conversion wrote too much to result at index %d",
+ cc.caseNr, cc.charset, resultLength);
+ }
+
+ // bulk test is first, then offsets are not checked any more
+ cc.offsets=NULL;
+
+ // test direct conversion from UTF-8
+ if(cc.utf8Length>=0) {
+ errorCode=U_ZERO_ERROR;
+ resultLength=stepFromUTF8(cc, utf8Cnv, cnv,
+ result, LENGTHOF(result),
+ step, &errorCode);
+ ok=checkFromUnicode(
+ cc, cnv, steps[i].utf8Name,
+ (uint8_t *)result, resultLength,
+ NULL,
+ errorCode);
+ if(U_FAILURE(errorCode) || !cc.finalFlush) {
+ // reset if an error occurred or we did not flush
+ // otherwise do nothing to make sure that flushing resets
+ ucnv_resetToUnicode(utf8Cnv);
+ ucnv_resetFromUnicode(cnv);
+ }
+ }
+ }
+
+ // not a real loop, just a convenience for breaking out of the block
+ while(ok && cc.finalFlush) {
+ // test ucnv_fromUChars()
+ memset(result, 0, sizeof(result));
+
+ errorCode=U_ZERO_ERROR;
+ resultLength=ucnv_fromUChars(cnv,
+ result, LENGTHOF(result),
+ cc.unicode, cc.unicodeLength,
+ &errorCode);
+ ok=checkFromUnicode(
+ cc, cnv, "fromUChars",
+ (uint8_t *)result, resultLength,
+ NULL,
+ errorCode);
+ if(!ok) {
+ break;
+ }
+
+ // test preflighting
+ // keep the correct result for simple checking
+ errorCode=U_ZERO_ERROR;
+ resultLength=ucnv_fromUChars(cnv,
+ NULL, 0,
+ cc.unicode, cc.unicodeLength,
+ &errorCode);
+ if(errorCode==U_STRING_NOT_TERMINATED_WARNING || errorCode==U_BUFFER_OVERFLOW_ERROR) {
+ errorCode=U_ZERO_ERROR;
+ }
+ ok=checkFromUnicode(
+ cc, cnv, "preflight fromUChars",
+ (uint8_t *)result, resultLength,
+ NULL,
+ errorCode);
+ break;
+ }
+
+ ucnv_close(cnv);
+ return ok;
+}
+
+UBool
+ConversionTest::checkFromUnicode(ConversionCase &cc, UConverter *cnv, const char *name,
+ const uint8_t *result, int32_t resultLength,
+ const int32_t *resultOffsets,
+ UErrorCode resultErrorCode) {
+ UChar resultInvalidUChars[8];
+ int8_t resultInvalidLength;
+ UErrorCode errorCode;
+
+ const char *msg;
+
+ // reset the message; NULL will mean "ok"
+ msg=NULL;
+
+ errorCode=U_ZERO_ERROR;
+ resultInvalidLength=LENGTHOF(resultInvalidUChars);
+ ucnv_getInvalidUChars(cnv, resultInvalidUChars, &resultInvalidLength, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d %s) ucnv_getInvalidUChars() failed - %s",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, u_errorName(errorCode));
+ return FALSE;
+ }
+
+ // check everything that might have gone wrong
+ if(cc.bytesLength!=resultLength) {
+ msg="wrong result length";
+ } else if(0!=memcmp(cc.bytes, result, cc.bytesLength)) {
+ msg="wrong result string";
+ } else if(cc.offsets!=NULL && 0!=memcmp(cc.offsets, resultOffsets, cc.bytesLength*sizeof(*cc.offsets))) {
+ msg="wrong offsets";
+ } else if(cc.outErrorCode!=resultErrorCode) {
+ msg="wrong error code";
+ } else if(cc.invalidLength!=resultInvalidLength) {
+ msg="wrong length of last invalid input";
+ } else if(0!=u_memcmp(cc.invalidUChars, resultInvalidUChars, cc.invalidLength)) {
+ msg="wrong last invalid input";
+ }
+
+ if(msg==NULL) {
+ return TRUE;
+ } else {
+ char buffer[2000]; // one buffer for all strings
+ char *s, *unicodeString, *bytesString, *resultString,
+ *offsetsString, *resultOffsetsString,
+ *invalidCharsString, *resultInvalidUCharsString;
+
+ unicodeString=s=buffer;
+ s=printUnicode(cc.unicode, cc.unicodeLength, unicodeString);
+ s=printBytes(cc.bytes, cc.bytesLength, bytesString=s);
+ s=printBytes(result, resultLength, resultString=s);
+ s=printOffsets(cc.offsets, cc.bytesLength, offsetsString=s);
+ s=printOffsets(resultOffsets, resultLength, resultOffsetsString=s);
+ s=printUnicode(cc.invalidUChars, cc.invalidLength, invalidCharsString=s);
+ s=printUnicode(resultInvalidUChars, resultInvalidLength, resultInvalidUCharsString=s);
+
+ if((s-buffer)>(int32_t)sizeof(buffer)) {
+ errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d %s) fatal error: checkFromUnicode() test output buffer overflow writing %d chars\n",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, (int)(s-buffer));
+ exit(1);
+ }
+
+ errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d %s) failed: %s\n"
+ " unicode <%s>[%d]\n"
+ " expected <%s>[%d]\n"
+ " result <%s>[%d]\n"
+ " offsets <%s>\n"
+ " result offsets <%s>\n"
+ " error code expected %s got %s\n"
+ " invalidChars expected <%s> got <%s>\n",
+ cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, msg,
+ unicodeString, cc.unicodeLength,
+ bytesString, cc.bytesLength,
+ resultString, resultLength,
+ offsetsString,
+ resultOffsetsString,
+ u_errorName(cc.outErrorCode), u_errorName(resultErrorCode),
+ invalidCharsString, resultInvalidUCharsString);
+
+ return FALSE;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_LEGACY_CONVERSION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/convtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/convtest.h
new file mode 100644
index 00000000000..888bbc7038e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/convtest.h
@@ -0,0 +1,104 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: convtest.h
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003jul15
+ * created by: Markus W. Scherer
+ *
+ * Test file for data-driven conversion tests.
+ */
+
+#ifndef __CONVTEST_H__
+#define __CONVTEST_H__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_LEGACY_CONVERSION
+
+#include "unicode/ucnv.h"
+#include "intltest.h"
+
+struct ConversionCase {
+ /* setup */
+ int32_t caseNr;
+ const char *charset, *cbopt, *name;
+ UChar subString[16];
+ char subchar[8];
+ int8_t setSub;
+
+ /* input and expected output */
+ const uint8_t *bytes;
+ int32_t bytesLength;
+ const UChar *unicode;
+ int32_t unicodeLength;
+ const int32_t *offsets;
+
+ /* UTF-8 version of unicode[unicodeLength] */
+ const char *utf8;
+ int32_t utf8Length;
+
+ /* options */
+ UBool finalFlush;
+ UBool fallbacks;
+ UErrorCode outErrorCode;
+ const uint8_t *invalidChars;
+ const UChar *invalidUChars;
+ int32_t invalidLength;
+
+ /* actual output */
+ uint8_t resultBytes[200];
+ UChar resultUnicode[200];
+ int32_t resultOffsets[200];
+ int32_t resultLength;
+
+ UErrorCode resultErrorCode;
+};
+
+class ConversionTest : public IntlTest {
+public:
+ ConversionTest();
+ virtual ~ConversionTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+
+ void TestToUnicode();
+ void TestFromUnicode();
+ void TestGetUnicodeSet();
+
+private:
+ UBool
+ ToUnicodeCase(ConversionCase &cc, UConverterToUCallback callback, const char *option);
+
+ UBool
+ FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback callback, const char *option);
+
+ UBool
+ checkToUnicode(ConversionCase &cc, UConverter *cnv, const char *name,
+ const UChar *result, int32_t resultLength,
+ const int32_t *resultOffsets,
+ UErrorCode resultErrorCode);
+
+ UBool
+ checkFromUnicode(ConversionCase &cc, UConverter *cnv, const char *name,
+ const uint8_t *result, int32_t resultLength,
+ const int32_t *resultOffsets,
+ UErrorCode resultErrorCode);
+
+ UConverter *
+ cnv_open(const char *name, UErrorCode &errorCode);
+
+ /* for testing direct UTF-8 conversion */
+ UConverter *utf8Cnv;
+};
+
+#endif /* #if !UCONFIG_NO_LEGACY_CONVERSION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.cpp
new file mode 100644
index 00000000000..d02ceed97be
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.cpp
@@ -0,0 +1,442 @@
+/***************************************************************************
+*
+* Copyright (C) 2000-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+************************************************************************
+* Date Name Description
+* 03/09/2000 Madhu Creation.
+************************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "cpdtrtst.h"
+#include "unicode/utypes.h"
+#include "unicode/translit.h"
+#include "unicode/uniset.h"
+#include "cpdtrans.h"
+#include "cmemory.h"
+
+//---------------------------------------------
+// runIndexedTest
+//---------------------------------------------
+
+void
+CompoundTransliteratorTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,TestConstruction);
+ TESTCASE(1,TestCloneEqual);
+ TESTCASE(2,TestGetCount);
+ TESTCASE(3,TestGetSetAdoptTransliterator);
+ TESTCASE(4,TestTransliterate);
+ default: name = ""; break;
+ }
+}
+
+void CompoundTransliteratorTest::TestConstruction(){
+ logln("Testing the construction of the compound Transliterator");
+ UnicodeString names[]={"Greek-Latin", "Latin-Devanagari", "Devanagari-Latin", "Latin-Greek"};
+ UParseError parseError;
+ UErrorCode status=U_ZERO_ERROR;
+ Transliterator* t1=Transliterator::createInstance(names[0], UTRANS_FORWARD, parseError, status);
+ Transliterator* t2=Transliterator::createInstance(names[1], UTRANS_FORWARD, parseError, status);
+ Transliterator* t3=Transliterator::createInstance(names[2], UTRANS_FORWARD, parseError, status);
+ Transliterator* t4=Transliterator::createInstance(names[3], UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)){
+ errln("Transliterator construction failed");
+ return;
+ }
+
+
+ Transliterator* transarray1[]={t1};
+ Transliterator* transarray2[]={t1, t4};
+ Transliterator* transarray3[]={t4, t1, t2};
+ Transliterator* transarray4[]={t1, t2, t3, t4};
+
+ Transliterator** transarray[4];
+ transarray[0] = transarray1;
+ transarray[1] = transarray2;
+ transarray[2] = transarray3;
+ transarray[3] = transarray4;
+
+ const UnicodeString IDs[]={
+ names[0],
+ names[0]+";"+names[3],
+ names[3]+";"+names[1]+";"+names[2],
+ names[0]+";"+names[1]+";"+names[2]+";"+names[3]
+ };
+
+ uint16_t i=0;
+ for(i=0; i<4; i++){
+ status = U_ZERO_ERROR;
+ CompoundTransliterator *cpdtrans=new CompoundTransliterator(IDs[i],parseError, status);
+ if (U_FAILURE(status)) {
+ errln("Construction using CompoundTransliterator(UnicodeString&, Direction, UnicodeFilter*) failed");
+ }
+ delete cpdtrans;
+
+ CompoundTransliterator *cpdtrans2=new CompoundTransliterator(transarray[i], i+1);
+ if(cpdtrans2 == 0){
+ errln("Construction using CompoundTransliterator(Transliterator* const transliterators[], "
+ "int32_t count, UnicodeFilter* adoptedFilter = 0) failed");
+ continue;
+ }
+ CompoundTransliterator *copycpd=new CompoundTransliterator(*cpdtrans2);
+ if(copycpd->getCount() != cpdtrans2->getCount() || copycpd->getID() != cpdtrans2->getID()) {
+ errln("Copy construction failed");
+ continue;
+ }
+
+
+ delete copycpd;
+ delete cpdtrans2;
+
+ }
+ {
+ /*Test Jitterbug 914 */
+ UErrorCode err = U_ZERO_ERROR;
+ CompoundTransliterator cpdTrans(UnicodeString("Latin-Hangul"),UTRANS_REVERSE,NULL,parseError,err);
+ UnicodeString newID =cpdTrans.getID();
+ if(newID!=UnicodeString("Hangul-Latin")){
+ errln(UnicodeString("Test for Jitterbug 914 for cpdTrans(UnicodeString(\"Latin-Hangul\"),UTRANS_REVERSE,NULL,err) failed"));
+ }
+ }
+ delete t1;
+ delete t2;
+ delete t3;
+ delete t4;
+
+}
+
+void CompoundTransliteratorTest::TestCloneEqual(){
+ logln("Testing the clone() and equality operator functions of Compound Transliterator");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ CompoundTransliterator *ct1=new CompoundTransliterator("Greek-Latin;Latin-Devanagari",parseError,status);
+ if(U_FAILURE(status)){
+ errln("construction failed");
+ delete ct1;
+ return;
+ }
+ CompoundTransliterator *ct2=new CompoundTransliterator("Greek-Latin", parseError, status);
+ if(U_FAILURE(status)){
+ errln("construction failed");
+ delete ct1;
+ delete ct2;
+ return;
+ }
+ CompoundTransliterator *copyct1=new CompoundTransliterator(*ct1);
+ if(copyct1 == 0){
+ errln("copy construction failed");
+ return;
+ }
+ CompoundTransliterator *copyct2=new CompoundTransliterator(*ct2);
+ if(copyct2 == 0){
+ errln("copy construction failed");
+ return;
+ }
+ CompoundTransliterator equalct1=*copyct1;
+ CompoundTransliterator equalct2=*copyct2;
+
+ if(copyct1->getID() != ct1->getID() || copyct2->getID() != ct2->getID() ||
+ copyct1->getCount() != ct1->getCount() || copyct2->getCount() != ct2->getCount() ||
+ copyct2->getID() == ct1->getID() || copyct1->getID() == ct2->getID() ||
+ copyct2->getCount() == ct1->getCount() || copyct1->getCount() == ct2->getCount() ){
+ errln("Error: copy constructors failed");
+ }
+
+ if(equalct1.getID() != ct1->getID() || equalct2.getID() != ct2->getID() ||
+ equalct1.getID() != copyct1->getID() || equalct2.getID() != copyct2->getID() ||
+ equalct1.getCount() != ct1->getCount() || equalct2.getCount() != ct2->getCount() ||
+ copyct2->getID() == ct1->getID() || copyct1->getID() == ct2->getID() ||
+ equalct1.getCount() != copyct1->getCount() || equalct2.getCount() != copyct2->getCount() ||
+ equalct2.getCount() == ct1->getCount() || equalct1.getCount() == ct2->getCount() ) {
+ errln("Error: =operator or copy constructor failed");
+ }
+
+ CompoundTransliterator *clonect1a=(CompoundTransliterator*)ct1->clone();
+ CompoundTransliterator *clonect1b=(CompoundTransliterator*)equalct1.clone();
+ CompoundTransliterator *clonect2a=(CompoundTransliterator*)ct2->clone();
+ CompoundTransliterator *clonect2b=(CompoundTransliterator*)copyct2->clone();
+
+
+ if(clonect1a->getID() != ct1->getID() || clonect1a->getCount() != ct1->getCount() ||
+ clonect1a->getID() != clonect1b->getID() || clonect1a->getCount() != clonect1b->getCount() ||
+ clonect1a->getID() != equalct1.getID() || clonect1a->getCount() != equalct1.getCount() ||
+ clonect1a->getID() != copyct1->getID() || clonect1a->getCount() != copyct1->getCount() ||
+
+ clonect2b->getID() != ct2->getID() || clonect2a->getCount() != ct2->getCount() ||
+ clonect2a->getID() != clonect2b->getID() || clonect2a->getCount() != clonect2b->getCount() ||
+ clonect2a->getID() != equalct2.getID() || clonect2a->getCount() != equalct2.getCount() ||
+ clonect2b->getID() != copyct2->getID() || clonect2b->getCount() != copyct2->getCount() ) {
+ errln("Error: clone() failed");
+ }
+
+ delete ct1;
+ delete ct2;
+ delete copyct1;
+ delete copyct2;
+ delete clonect1a;
+ delete clonect1b;
+ delete clonect2a;
+ delete clonect2b;
+
+}
+
+void CompoundTransliteratorTest::TestGetCount(){
+ logln("Testing the getCount() API of CompoundTransliterator");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ CompoundTransliterator *ct1=new CompoundTransliterator("Halfwidth-Fullwidth;Fullwidth-Halfwidth", parseError, status);
+ CompoundTransliterator *ct2=new CompoundTransliterator("Any-Hex;Hex-Any;Cyrillic-Latin;Latin-Cyrillic", parseError, status);
+ CompoundTransliterator *ct3=(CompoundTransliterator*)ct1;
+ if (U_FAILURE(status)) {
+ errln("FAILED: CompoundTransliterator constructor failed");
+ return;
+ }
+ CompoundTransliterator *ct4=new CompoundTransliterator("Latin-Devanagari", parseError, status);
+ CompoundTransliterator *ct5=new CompoundTransliterator(*ct4);
+
+ if (U_FAILURE(status)) {
+ errln("FAILED: CompoundTransliterator constructor failed");
+ return;
+ }
+ if(ct1->getCount() == ct2->getCount() || ct1->getCount() != ct3->getCount() ||
+ ct2->getCount() == ct3->getCount() ||
+ ct4->getCount() != ct5->getCount() || ct4->getCount() == ct1->getCount() ||
+ ct4->getCount() == ct2->getCount() || ct4->getCount() == ct3->getCount() ||
+ ct5->getCount() == ct2->getCount() || ct5->getCount() == ct3->getCount() ) {
+ errln("Error: getCount() failed");
+ }
+
+ /* Quick test getTargetSet(), only test that it doesn't die. TODO: a better test. */
+ UnicodeSet ts;
+ UnicodeSet *retUS = NULL;
+ retUS = &ct1->getTargetSet(ts);
+ if (retUS != &ts || ts.size() == 0) {
+ errln("CompoundTransliterator::getTargetSet() failed.\n");
+ }
+
+ /* Quick test getSourceSet(), only test that it doesn't die. TODO: a better test. */
+ UnicodeSet ss;
+ retUS = NULL;
+ retUS = &ct1->getSourceSet(ss);
+ if (retUS != &ss || ss.size() == 0) {
+ errln("CompoundTransliterator::getSourceSet() failed.\n");
+ }
+
+ delete ct1;
+ delete ct2;
+ delete ct4;
+ delete ct5;
+}
+
+void CompoundTransliteratorTest::TestGetSetAdoptTransliterator(){
+ logln("Testing the getTransliterator() API of CompoundTransliterator");
+ UnicodeString ID("Latin-Greek;Greek-Latin;Latin-Devanagari;Devanagari-Latin;Latin-Cyrillic;Cyrillic-Latin;Any-Hex;Hex-Any");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ CompoundTransliterator *ct1=new CompoundTransliterator(ID, parseError, status);
+ if(U_FAILURE(status)){
+ errln("CompoundTransliterator construction failed");
+ return;
+ }
+ int32_t count=ct1->getCount();
+ UnicodeString *array=split(ID, 0x003b, count);
+ int i;
+ for(i=0; i < count; i++){
+ UnicodeString child= ct1->getTransliterator(i).getID();
+ if(child != *(array+i)){
+ errln("Error getTransliterator() failed: Expected->" + *(array+i) + " Got->" + child);
+ }else {
+ logln("OK: getTransliterator() passed: Expected->" + *(array+i) + " Got->" + child);
+ }
+ }
+ delete []array;
+
+ logln("Testing setTransliterator() API of CompoundTransliterator");
+ UnicodeString ID2("Hex-Any;Any-Hex;Latin-Cyrillic;Cyrillic-Latin;Halfwidth-Fullwidth;Fullwidth-Halfwidth");
+ array=split(ID2, 0x003b, count);
+ Transliterator** transarray=new Transliterator*[count];
+ for(i=0;i<count;i++){
+ transarray[i]=Transliterator::createInstance(*(array+i), UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)){
+ errln("Error could not create Transliterator with ID :"+*(array+i));
+ }else{
+ logln("The ID for the transltierator created is " + transarray[i]->getID());
+ }
+ status = U_ZERO_ERROR;
+ }
+
+ /*setTransliterator and adoptTransliterator */
+
+ ct1->setTransliterators(transarray, count);
+ if(ct1->getCount() != count || ct1->getID() != ID2){
+ errln((UnicodeString)"Error: setTransliterators() failed.\n\t Count:- expected->" + count + (UnicodeString)". got->" + ct1->getCount() +
+ (UnicodeString)"\n\tID :- expected->" + ID2 + (UnicodeString)". got->" + ct1->getID());
+ }
+ else{
+ logln("OK: setTransliterators() passed");
+ }
+ /*UnicodeString temp;
+ for(i=0;i<count-1;i++){
+ temp.append(ct1->getTransliterator(i).getID());
+ temp.append(";");
+ }
+ temp.append(ct1->getTransliterator(i).getID());
+ if(temp != ID2){
+ errln("Error: setTransliterator() failed. Expected->" + ID2 + "\nGot->" + temp);
+ }
+ else{
+ logln("OK: setTransliterator() passed");
+ }*/
+ logln("Testing adoptTransliterator() API of CompoundTransliterator");
+ UnicodeString ID3("Latin-Katakana");
+ Transliterator **transarray2=(Transliterator **)uprv_malloc(sizeof(Transliterator*)*1);
+ transarray2[0] = Transliterator::createInstance(ID3,UTRANS_FORWARD,parseError,status);
+ if (transarray2[0] != 0) {
+ ct1->adoptTransliterators(transarray2, 1);
+ }
+ if(ct1->getCount() != 1 || ct1->getID() != ID3){
+ errln((UnicodeString)"Error: adoptTransliterators() failed.\n\t Count:- expected->1" + (UnicodeString)". got->" + ct1->getCount() +
+ (UnicodeString)"\n\tID :- expected->" + ID3 + (UnicodeString)". got->" + ct1->getID());
+ }
+ else{
+ logln("OK: adoptTranslterator() passed");
+ }
+ delete ct1;
+ for(i=0;i<count;i++){
+ delete transarray[i];
+ }
+ delete []transarray;
+ delete []array;
+}
+
+/**
+ * Splits a UnicodeString
+ */
+UnicodeString* CompoundTransliteratorTest::split(const UnicodeString& str, UChar seperator, int32_t& count) {
+
+ //get the count
+ int32_t i;
+ count =1;
+ for(i=0; i<str.length(); i++){
+ if(str.charAt(i) == seperator)
+ count++;
+ }
+ // make an array
+ UnicodeString* result = new UnicodeString[count];
+ int32_t last = 0;
+ int32_t current = 0;
+ for (i = 0; i < str.length(); ++i) {
+ if (str.charAt(i) == seperator) {
+ str.extractBetween(last, i, result[current]);
+ last = i+1;
+ current++;
+ }
+ }
+ str.extractBetween(last, i, result[current]);
+ return result;
+}
+void CompoundTransliteratorTest::TestTransliterate(){
+ logln("Testing the handleTransliterate() API of CompoundTransliterator");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ CompoundTransliterator *ct1=new CompoundTransliterator("Any-Hex;Hex-Any",parseError, status);
+ if(U_FAILURE(status)){
+ errln("CompoundTransliterator construction failed");
+ }else {
+#if 0
+ // handleTransliterate is a protected method that was erroneously made
+ // public. It is not public API that needs to be tested.
+ UnicodeString s("abcabc");
+ expect(*ct1, s, s);
+ UTransPosition index = { 0, 0, 0, 0 };
+ UnicodeString rsource2(s);
+ UnicodeString expectedResult=s;
+ ct1->handleTransliterate(rsource2, index, FALSE);
+ expectAux(ct1->getID() + ":String, index(0,0,0), incremental=FALSE", rsource2 + "->" + rsource2, rsource2==expectedResult, expectedResult);
+ UTransPosition _index = {1,3,2,3};
+ uprv_memcpy(&index, &_index, sizeof(index));
+ UnicodeString rsource3(s);
+ ct1->handleTransliterate(rsource3, index, TRUE);
+ expectAux(ct1->getID() + ":String, index(1,2,3), incremental=TRUE", rsource3 + "->" + rsource3, rsource3==expectedResult, expectedResult);
+#endif
+ }
+ delete ct1;
+ UnicodeString Data[]={
+ //ID, input string, transliterated string
+ "Any-Hex;Hex-Any;Any-Hex", "hello", UnicodeString("\\u0068\\u0065\\u006C\\u006C\\u006F", ""),
+ "Any-Hex;Hex-Any", "hello! How are you?", "hello! How are you?",
+ //"Devanagari-Latin;Latin-Devanagari", CharsToUnicodeString("\\u092D\\u0948'\\u0930'\\u0935"), CharsToUnicodeString("\\u092D\\u0948\\u0930\\u0935"), // quotes lost
+ "Latin-Cyrillic;Cyrillic-Latin", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h", //"abkdefghijShchshchzhh",
+ "Latin-Greek;Greek-Latin", "ABGabgAKLMN", "ABGabgAKLMN",
+ //"Latin-Arabic;Arabic-Latin", "Ad'r'a'b'i'k'dh'dd'gh", "Adrabikdhddgh",
+ "Hiragana-Katakana", CharsToUnicodeString("\\u3041\\u308f\\u3099\\u306e\\u304b\\u3092\\u3099"),
+ CharsToUnicodeString("\\u30A1\\u30f7\\u30ce\\u30ab\\u30fa"),
+ "Hiragana-Katakana;Katakana-Hiragana", CharsToUnicodeString("\\u3041\\u308f\\u3099\\u306e\\u304b\\u3051"),
+ CharsToUnicodeString("\\u3041\\u308f\\u3099\\u306e\\u304b\\u3051"),
+ "Katakana-Hiragana;Hiragana-Katakana", CharsToUnicodeString("\\u30A1\\u30f7\\u30ce\\u30f5\\u30f6"),
+ CharsToUnicodeString("\\u30A1\\u30f7\\u30ce\\u30ab\\u30b1"),
+ "Latin-Katakana;Katakana-Latin", CharsToUnicodeString("vavivuvevohuzizuzonyinyunyasesuzezu"),
+ CharsToUnicodeString("vavivuvevohuzizuzonyinyunyasesuzezu"),
+ };
+ uint32_t i;
+ for(i=0; i<sizeof(Data)/sizeof(Data[0]); i=i+3){
+ UErrorCode status = U_ZERO_ERROR;
+
+ CompoundTransliterator *ct2=new CompoundTransliterator(Data[i+0], parseError, status);
+ if(U_FAILURE(status)){
+ errln("CompoundTransliterator construction failed for " + Data[i+0]);
+ } else {
+ expect(*ct2, Data[i+1], Data[i+2]);
+ }
+ delete ct2;
+ }
+
+}
+
+
+
+//======================================================================
+// Support methods
+//======================================================================
+void CompoundTransliteratorTest::expect(const CompoundTransliterator& t,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult) {
+
+ UnicodeString rsource(source);
+ t.transliterate(rsource);
+ expectAux(t.getID() + ":Replaceable", source + "->" + rsource, rsource==expectedResult, expectedResult);
+
+ // Test transliterate (incremental) transliteration --
+ rsource.remove();
+ rsource.append(source);
+ UTransPosition index;
+ index.contextStart =0;
+ index.contextLimit = source.length();
+ index.start = 0;
+ index.limit = source.length();
+ UErrorCode ec = U_ZERO_ERROR;
+ t.transliterate(rsource, index, ec);
+ t.finishTransliteration(rsource,index);
+ expectAux(t.getID() + ":handleTransliterate ", source + "->" + rsource, rsource==expectedResult, expectedResult);
+
+}
+
+void CompoundTransliteratorTest::expectAux(const UnicodeString& tag,
+ const UnicodeString& summary, UBool pass,
+ const UnicodeString& expectedResult) {
+ if (pass) {
+ logln(UnicodeString("(")+tag+") " + prettify(summary));
+ } else {
+ errln(UnicodeString("FAIL: (")+tag+") "
+ + prettify(summary)
+ + ", expected " + prettify(expectedResult));
+ }
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.h b/Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.h
new file mode 100644
index 00000000000..463a29ebe71
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/cpdtrtst.h
@@ -0,0 +1,64 @@
+
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/***********************************************************************
+************************************************************************
+* Date Name Description
+* 03/09/2000 Madhu Creation.
+************************************************************************/
+
+#ifndef CPDTRTST_H
+#define CPDTRTST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "intltest.h"
+
+/**
+ * @test
+ * @summary General test of Compound Transliterator
+ */
+class CompoundTransliteratorTest : public IntlTest {
+public:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+
+ /*Tests the constructors */
+ void TestConstruction(void);
+ /*Tests the function clone, and operator==()*/
+ void TestCloneEqual(void);
+ /*Tests the function getCount()*/
+ void TestGetCount(void);
+ /*Tests the function getTransliterator() and setTransliterators() and adoptTransliterators()*/
+ void TestGetSetAdoptTransliterator(void);
+ /*Tests the function handleTransliterate()*/
+ void TestTransliterate(void);
+
+ //======================================================================
+ // Support methods
+ //======================================================================
+
+ /**
+ * Splits a UnicodeString
+ */
+ UnicodeString* split(const UnicodeString& str, UChar seperator, int32_t& count);
+
+ void expect(const CompoundTransliterator& t,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult);
+
+ void expectAux(const UnicodeString& tag,
+ const UnicodeString& summary, UBool pass,
+ const UnicodeString& expectedResult);
+
+
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/csdetest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/csdetest.cpp
new file mode 100644
index 00000000000..1f5992f778f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/csdetest.cpp
@@ -0,0 +1,518 @@
+/*
+ **********************************************************************
+ * Copyright (C) 2005-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ */
+
+
+#include "unicode/utypes.h"
+#include "unicode/ucsdet.h"
+#include "unicode/ucnv.h"
+#include "unicode/unistr.h"
+#include "unicode/putil.h"
+
+#include "intltest.h"
+#include "csdetest.h"
+
+#include "xmlparser.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef DEBUG_DETECT
+#include <stdio.h>
+#endif
+
+#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+
+#define NEW_ARRAY(type,count) (type *) /*uprv_*/malloc((count) * sizeof(type))
+#define DELETE_ARRAY(array) /*uprv_*/free((void *) (array))
+
+#define CH_SPACE 0x0020
+#define CH_SLASH 0x002F
+
+//---------------------------------------------------------------------------
+//
+// Test class boilerplate
+//
+//---------------------------------------------------------------------------
+CharsetDetectionTest::CharsetDetectionTest()
+{
+}
+
+
+CharsetDetectionTest::~CharsetDetectionTest()
+{
+}
+
+
+
+void CharsetDetectionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CharsetDetectionTest: ");
+ switch (index) {
+ case 0: name = "ConstructionTest";
+ if (exec) ConstructionTest();
+ break;
+
+ case 1: name = "UTF8Test";
+ if (exec) UTF8Test();
+ break;
+
+ case 2: name = "UTF16Test";
+ if (exec) UTF16Test();
+ break;
+
+ case 3: name = "C1BytesTest";
+ if (exec) C1BytesTest();
+ break;
+
+ case 4: name = "InputFilterTest";
+ if (exec) InputFilterTest();
+ break;
+
+ case 5: name = "DetectionTest";
+ if (exec) DetectionTest();
+ break;
+
+ default: name = "";
+ break; //needed to end loop
+ }
+}
+
+static UnicodeString *split(const UnicodeString &src, UChar ch, int32_t &splits)
+{
+ int32_t offset = -1;
+
+ splits = 1;
+ while((offset = src.indexOf(ch, offset + 1)) >= 0) {
+ splits += 1;
+ }
+
+ UnicodeString *result = new UnicodeString[splits];
+
+ int32_t start = 0;
+ int32_t split = 0;
+ int32_t end;
+
+ while((end = src.indexOf(ch, start)) >= 0) {
+ src.extractBetween(start, end, result[split++]);
+ start = end + 1;
+ }
+
+ src.extractBetween(start, src.length(), result[split]);
+
+ return result;
+}
+
+static char *extractBytes(const UnicodeString &source, const char *codepage, int32_t &length)
+{
+ int32_t sLength = source.length();
+ char *bytes = NULL;
+
+ length = source.extract(0, sLength, NULL, codepage);
+
+ if (length > 0) {
+ bytes = NEW_ARRAY(char, length + 1);
+ source.extract(0, sLength, bytes, codepage);
+ }
+
+ return bytes;
+}
+
+static void freeBytes(char *bytes)
+{
+ DELETE_ARRAY(bytes);
+}
+
+void CharsetDetectionTest::checkEncoding(const UnicodeString &testString, const UnicodeString &encoding, const UnicodeString &id)
+{
+ int32_t splits = 0;
+ int32_t testLength = testString.length();
+ UnicodeString *eSplit = split(encoding, CH_SLASH, splits);
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t cpLength = eSplit[0].length();
+ char codepage[64];
+
+ u_UCharsToChars(eSplit[0].getBuffer(), codepage, cpLength);
+ codepage[cpLength] = '\0';
+
+ UCharsetDetector *csd = ucsdet_open(&status);
+
+ int32_t byteLength = 0;
+ char *bytes = extractBytes(testString, codepage, byteLength);
+
+ if (bytes == NULL) {
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ errln("Can't open a " + encoding + " converter for " + id);
+#endif
+ return;
+ }
+
+ ucsdet_setText(csd, bytes, byteLength, &status);
+
+ int32_t matchCount = 0;
+ const UCharsetMatch **matches = ucsdet_detectAll(csd, &matchCount, &status);
+
+
+ UnicodeString name(ucsdet_getName(matches[0], &status));
+ UnicodeString lang(ucsdet_getLanguage(matches[0], &status));
+ UChar *decoded = NULL;
+ int32_t dLength = 0;
+
+ if (matchCount == 0) {
+ errln("Encoding detection failure for " + id + ": expected " + eSplit[0] + ", got no matches");
+ goto bail;
+ }
+
+ if (name.compare(eSplit[0]) != 0) {
+ errln("Encoding detection failure for " + id + ": expected " + eSplit[0] + ", got " + name);
+
+#ifdef DEBUG_DETECT
+ for (int32_t m = 0; m < matchCount; m += 1) {
+ const char *name = ucsdet_getName(matches[m], &status);
+ const char *lang = ucsdet_getLanguage(matches[m], &status);
+ int32_t confidence = ucsdet_getConfidence(matches[m], &status);
+
+ printf("%s (%s) %d\n", name, lang, confidence);
+ }
+#endif
+ goto bail;
+ }
+
+ if (splits > 1 && lang.compare(eSplit[1]) != 0) {
+ errln("Language detection failure for " + id + ", " + eSplit[0] + ": expected " + eSplit[1] + ", got " + lang);
+ goto bail;
+ }
+
+ decoded = NEW_ARRAY(UChar, testLength);
+ dLength = ucsdet_getUChars(matches[0], decoded, testLength, &status);
+
+ if (testString.compare(decoded, dLength) != 0) {
+ errln("Round-trip error for " + id + ", " + eSplit[0] + ": getUChars() didn't yeild the original string.");
+
+#ifdef DEBUG_DETECT
+ for(int32_t i = 0; i < testLength; i += 1) {
+ if(testString[i] != decoded[i]) {
+ printf("Strings differ at byte %d\n", i);
+ break;
+ }
+ }
+#endif
+
+ }
+
+ DELETE_ARRAY(decoded);
+
+bail:
+ freeBytes(bytes);
+ ucsdet_close(csd);
+ delete[] eSplit;
+}
+
+const char *CharsetDetectionTest::getPath(char buffer[2048], const char *filename) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char *testDataDirectory = IntlTest::getSourceTestData(status);
+
+ if (U_FAILURE(status)) {
+ errln("ERROR: getPath() failed - %s", u_errorName(status));
+ return NULL;
+ }
+
+ strcpy(buffer, testDataDirectory);
+ strcat(buffer, filename);
+ return buffer;
+}
+
+void CharsetDetectionTest::ConstructionTest()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCharsetDetector *csd = ucsdet_open(&status);
+ UEnumeration *e = ucsdet_getAllDetectableCharsets(csd, &status);
+ int32_t count = uenum_count(e, &status);
+
+#ifdef DEBUG_DETECT
+ printf("There are %d recognizers.\n", count);
+#endif
+
+ for(int32_t i = 0; i < count; i += 1) {
+ int32_t length;
+ const char *name = uenum_next(e, &length, &status);
+
+ if(name == NULL || length <= 0) {
+ errln("ucsdet_getAllDetectableCharsets() returned a null or empty name!");
+ }
+
+#ifdef DEBUG_DETECT
+ printf("%s\n", name);
+#endif
+ }
+
+ uenum_close(e);
+ ucsdet_close(csd);
+}
+
+void CharsetDetectionTest::UTF8Test()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString ss = "This is a string with some non-ascii characters that will "
+ "be converted to UTF-8, then shoved through the detection process. "
+ "\\u0391\\u0392\\u0393\\u0394\\u0395"
+ "Sure would be nice if our source could contain Unicode directly!";
+ UnicodeString s = ss.unescape();
+ int32_t byteLength = 0, sLength = s.length();
+ char *bytes = extractBytes(s, "UTF-8", byteLength);
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ UChar *detected = NEW_ARRAY(UChar, sLength);
+
+ ucsdet_setText(csd, bytes, byteLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ errln("Detection failure for UTF-8: got no matches.");
+ goto bail;
+ }
+
+ ucsdet_getUChars(match, detected, sLength, &status);
+
+ if (s.compare(detected, sLength) != 0) {
+ errln("Round-trip test failed!");
+ }
+
+ ucsdet_setDeclaredEncoding(csd, "UTF-8", 5, &status); /* for coverage */
+
+bail:
+ DELETE_ARRAY(detected);
+ freeBytes(bytes);
+ ucsdet_close(csd);
+}
+
+void CharsetDetectionTest::UTF16Test()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ /* Notice the BOM on the start of this string */
+ UChar chars[] = {
+ 0xFEFF, 0x0623, 0x0648, 0x0631, 0x0648, 0x0628, 0x0627, 0x002C,
+ 0x0020, 0x0628, 0x0631, 0x0645, 0x062c, 0x064a, 0x0627, 0x062a,
+ 0x0020, 0x0627, 0x0644, 0x062d, 0x0627, 0x0633, 0x0648, 0x0628,
+ 0x0020, 0x002b, 0x0020, 0x0627, 0x0646, 0x062a, 0x0631, 0x0646,
+ 0x064a, 0x062a, 0x0000};
+ UnicodeString s(chars);
+ int32_t beLength = 0, leLength = 0;
+ char *beBytes = extractBytes(s, "UTF-16BE", beLength);
+ char *leBytes = extractBytes(s, "UTF-16LE", leLength);
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ const char *name;
+ int32_t conf;
+
+ ucsdet_setText(csd, beBytes, beLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ errln("Encoding detection failure for UTF-16BE: got no matches.");
+ goto try_le;
+ }
+
+ name = ucsdet_getName(match, &status);
+ conf = ucsdet_getConfidence(match, &status);
+
+ if (strcmp(name, "UTF-16BE") != 0) {
+ errln("Encoding detection failure for UTF-16BE: got %s", name);
+ goto try_le; // no point in looking at confidence if we got the wrong character set.
+ }
+
+ if (conf != 100) {
+ errln("Did not get 100%% confidence for UTF-16BE: got %d", conf);
+ }
+
+try_le:
+ ucsdet_setText(csd, leBytes, leLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ errln("Encoding detection failure for UTF-16LE: got no matches.");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+ conf = ucsdet_getConfidence(match, &status);
+
+
+ if (strcmp(name, "UTF-16LE") != 0) {
+ errln("Enconding detection failure for UTF-16LE: got %s", name);
+ goto bail; // no point in looking at confidence if we got the wrong character set.
+ }
+
+ if (conf != 100) {
+ errln("Did not get 100%% confidence for UTF-16LE: got %d", conf);
+ }
+
+bail:
+ freeBytes(leBytes);
+ freeBytes(beBytes);
+ ucsdet_close(csd);
+}
+
+void CharsetDetectionTest::InputFilterTest()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString ss = "<a> <lot> <of> <English> <inside> <the> <markup> Un tr\\u00E8s petit peu de Fran\\u00E7ais. <to> <confuse> <the> <detector>";
+ UnicodeString s = ss.unescape();
+ int32_t byteLength = 0;
+ char *bytes = extractBytes(s, "ISO-8859-1", byteLength);
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ const char *lang, *name;
+
+ ucsdet_enableInputFilter(csd, TRUE);
+
+ if (!ucsdet_isInputFilterEnabled(csd)) {
+ errln("ucsdet_enableInputFilter(csd, TRUE) did not enable input filter!");
+ }
+
+
+ ucsdet_setText(csd, bytes, byteLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ errln("Turning on the input filter resulted in no matches.");
+ goto turn_off;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (name == NULL || strcmp(name, "ISO-8859-1") != 0) {
+ errln("Turning on the input filter resulted in %s rather than ISO-8859-1.", name);
+ } else {
+ lang = ucsdet_getLanguage(match, &status);
+
+ if (lang == NULL || strcmp(lang, "fr") != 0) {
+ errln("Input filter did not strip markup!");
+ }
+ }
+
+turn_off:
+ ucsdet_enableInputFilter(csd, FALSE);
+ ucsdet_setText(csd, bytes, byteLength, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ errln("Turning off the input filter resulted in no matches.");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (name == NULL || strcmp(name, "ISO-8859-1") != 0) {
+ errln("Turning off the input filter resulted in %s rather than ISO-8859-1.", name);
+ } else {
+ lang = ucsdet_getLanguage(match, &status);
+
+ if (lang == NULL || strcmp(lang, "en") != 0) {
+ errln("Unfiltered input did not detect as English!");
+ }
+ }
+
+bail:
+ freeBytes(bytes);
+ ucsdet_close(csd);
+}
+
+void CharsetDetectionTest::C1BytesTest()
+{
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString sISO = "This is a small sample of some English text. Just enough to be sure that it detects correctly.";
+ UnicodeString ssWindows = "This is another small sample of some English text. Just enough to be sure that it detects correctly. It also includes some \\u201CC1\\u201D bytes.";
+ UnicodeString sWindows = ssWindows.unescape();
+ int32_t lISO = 0, lWindows = 0;
+ char *bISO = extractBytes(sISO, "ISO-8859-1", lISO);
+ char *bWindows = extractBytes(sWindows, "windows-1252", lWindows);
+ UCharsetDetector *csd = ucsdet_open(&status);
+ const UCharsetMatch *match;
+ const char *name;
+
+ ucsdet_setText(csd, bWindows, lWindows, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ errln("English test with C1 bytes got no matches.");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (strcmp(name, "windows-1252") != 0) {
+ errln("English text with C1 bytes does not detect as windows-1252, but as %s", name);
+ }
+
+ ucsdet_setText(csd, bISO, lISO, &status);
+ match = ucsdet_detect(csd, &status);
+
+ if (match == NULL) {
+ errln("English text without C1 bytes got no matches.");
+ goto bail;
+ }
+
+ name = ucsdet_getName(match, &status);
+
+ if (strcmp(name, "ISO-8859-1") != 0) {
+ errln("English text without C1 bytes does not detect as ISO-8859-1, but as %s", name);
+ }
+
+bail:
+ freeBytes(bWindows);
+ freeBytes(bISO);
+
+ ucsdet_close(csd);
+#endif
+}
+
+void CharsetDetectionTest::DetectionTest()
+{
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ UErrorCode status = U_ZERO_ERROR;
+ char path[2048];
+ const char *testFilePath = getPath(path, "csdetest.xml");
+
+ if (testFilePath == NULL) {
+ return; /* Couldn't get path: error message already output. */
+ }
+
+ UXMLParser *parser = UXMLParser::createParser(status);
+ if (!assertSuccess("UXMLParser::createParser",status)) return;
+ UXMLElement *root = parser->parseFile(testFilePath, status);
+ if (!assertSuccess( "parseFile",status)) return;
+
+ UnicodeString test_case = UNICODE_STRING_SIMPLE("test-case");
+ UnicodeString id_attr = UNICODE_STRING_SIMPLE("id");
+ UnicodeString enc_attr = UNICODE_STRING_SIMPLE("encodings");
+
+ const UXMLElement *testCase;
+ int32_t tc = 0;
+
+ while((testCase = root->nextChildElement(tc)) != NULL) {
+ if (testCase->getTagName().compare(test_case) == 0) {
+ const UnicodeString *id = testCase->getAttribute(id_attr);
+ const UnicodeString *encodings = testCase->getAttribute(enc_attr);
+ const UnicodeString text = testCase->getText(TRUE);
+ int32_t encodingCount;
+ UnicodeString *encodingList = split(*encodings, CH_SPACE, encodingCount);
+
+ for(int32_t e = 0; e < encodingCount; e += 1) {
+ checkEncoding(text, encodingList[e], *id);
+ }
+
+ delete[] encodingList;
+ }
+ }
+
+ delete root;
+ delete parser;
+#endif
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/csdetest.h b/Build/source/libs/icu/icu-xetex/test/intltest/csdetest.h
new file mode 100644
index 00000000000..223a640a57b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/csdetest.h
@@ -0,0 +1,39 @@
+/*
+ **********************************************************************
+ * Copyright (C) 2005-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ */
+
+#ifndef __CSDETEST_H
+#define __CSDETEST_H
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+
+#include "intltest.h"
+
+class CharsetDetectionTest: public IntlTest {
+public:
+
+ CharsetDetectionTest();
+ virtual ~CharsetDetectionTest();
+
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ virtual void ConstructionTest();
+ virtual void UTF8Test();
+ virtual void UTF16Test();
+ virtual void C1BytesTest();
+ virtual void InputFilterTest();
+ virtual void DetectionTest();
+
+private:
+ void checkEncoding(const UnicodeString &testString,
+ const UnicodeString &encoding, const UnicodeString &id);
+
+ virtual const char *getPath(char buffer[2048], const char *filename);
+
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/currcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/currcoll.cpp
new file mode 100644
index 00000000000..df5a15f8fda
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/currcoll.cpp
@@ -0,0 +1,158 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#ifndef _COLL
+#include "unicode/coll.h"
+#endif
+
+#ifndef _TBLCOLL
+#include "unicode/tblcoll.h"
+#endif
+
+#ifndef _UNISTR
+#include "unicode/unistr.h"
+#endif
+
+#ifndef _SORTKEY
+#include "unicode/sortkey.h"
+#endif
+
+#ifndef _CURRCOLL
+#include "currcoll.h"
+#endif
+
+#include "sfwdchit.h"
+
+#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0])
+
+CollationCurrencyTest::CollationCurrencyTest()
+{
+}
+
+CollationCurrencyTest::~CollationCurrencyTest()
+{
+}
+
+void CollationCurrencyTest::currencyTest(/*char *par*/)
+{
+ // All the currency symbols, in collation order
+ static const UChar currency[][2] =
+ {
+ { 0x00A4, 0x0000}, /*00A4; L; [14 36, 03, 03] # [082B.0020.0002] # CURRENCY SIGN*/
+ { 0x00A2, 0x0000}, /*00A2; L; [14 38, 03, 03] # [082C.0020.0002] # CENT SIGN*/
+ { 0xFFE0, 0x0000}, /*FFE0; L; [14 38, 03, 05] # [082C.0020.0003] # FULLWIDTH CENT SIGN*/
+ { 0x0024, 0x0000}, /*0024; L; [14 3A, 03, 03] # [082D.0020.0002] # DOLLAR SIGN*/
+ { 0xFF04, 0x0000}, /*FF04; L; [14 3A, 03, 05] # [082D.0020.0003] # FULLWIDTH DOLLAR SIGN*/
+ { 0xFE69, 0x0000}, /*FE69; L; [14 3A, 03, 1D] # [082D.0020.000F] # SMALL DOLLAR SIGN*/
+ { 0x00A3, 0x0000}, /*00A3; L; [14 3C, 03, 03] # [082E.0020.0002] # POUND SIGN*/
+ { 0xFFE1, 0x0000}, /*FFE1; L; [14 3C, 03, 05] # [082E.0020.0003] # FULLWIDTH POUND SIGN*/
+ { 0x00A5, 0x0000}, /*00A5; L; [14 3E, 03, 03] # [082F.0020.0002] # YEN SIGN*/
+ { 0xFFE5, 0x0000}, /*FFE5; L; [14 3E, 03, 05] # [082F.0020.0003] # FULLWIDTH YEN SIGN*/
+ { 0x09F2, 0x0000}, /*09F2; L; [14 40, 03, 03] # [0830.0020.0002] # BENGALI RUPEE MARK*/
+ { 0x09F3, 0x0000}, /*09F3; L; [14 42, 03, 03] # [0831.0020.0002] # BENGALI RUPEE SIGN*/
+ { 0x0E3F, 0x0000}, /*0E3F; L; [14 44, 03, 03] # [0832.0020.0002] # THAI CURRENCY SYMBOL BAHT*/
+ { 0x17DB, 0x0000}, /*17DB; L; [14 46, 03, 03] # [0833.0020.0002] # KHMER CURRENCY SYMBOL RIEL*/
+ { 0x20A0, 0x0000}, /*20A0; L; [14 48, 03, 03] # [0834.0020.0002] # EURO-CURRENCY SIGN*/
+ { 0x20A1, 0x0000}, /*20A1; L; [14 4A, 03, 03] # [0835.0020.0002] # COLON SIGN*/
+ { 0x20A2, 0x0000}, /*20A2; L; [14 4C, 03, 03] # [0836.0020.0002] # CRUZEIRO SIGN*/
+ { 0x20A3, 0x0000}, /*20A3; L; [14 4E, 03, 03] # [0837.0020.0002] # FRENCH FRANC SIGN*/
+ { 0x20A4, 0x0000}, /*20A4; L; [14 50, 03, 03] # [0838.0020.0002] # LIRA SIGN*/
+ { 0x20A5, 0x0000}, /*20A5; L; [14 52, 03, 03] # [0839.0020.0002] # MILL SIGN*/
+ { 0x20A6, 0x0000}, /*20A6; L; [14 54, 03, 03] # [083A.0020.0002] # NAIRA SIGN*/
+ { 0x20A7, 0x0000}, /*20A7; L; [14 56, 03, 03] # [083B.0020.0002] # PESETA SIGN*/
+ { 0x20A9, 0x0000}, /*20A9; L; [14 58, 03, 03] # [083C.0020.0002] # WON SIGN*/
+ { 0xFFE6, 0x0000}, /*FFE6; L; [14 58, 03, 05] # [083C.0020.0003] # FULLWIDTH WON SIGN*/
+ { 0x20AA, 0x0000}, /*20AA; L; [14 5A, 03, 03] # [083D.0020.0002] # NEW SHEQEL SIGN*/
+ { 0x20AB, 0x0000}, /*20AB; L; [14 5C, 03, 03] # [083E.0020.0002] # DONG SIGN*/
+ { 0x20AC, 0x0000}, /*20AC; L; [14 5E, 03, 03] # [083F.0020.0002] # EURO SIGN*/
+ { 0x20AD, 0x0000}, /*20AD; L; [14 60, 03, 03] # [0840.0020.0002] # KIP SIGN*/
+ { 0x20AE, 0x0000}, /*20AE; L; [14 62, 03, 03] # [0841.0020.0002] # TUGRIK SIGN*/
+ { 0x20AF, 0x0000}, /*20AF; L; [14 64, 03, 03] # [0842.0020.0002] # DRACHMA SIGN*/
+ };
+
+
+ uint32_t i, j;
+ UErrorCode status = U_ZERO_ERROR;
+ Collator::EComparisonResult expectedResult = Collator::EQUAL;
+ RuleBasedCollator *c = (RuleBasedCollator *)Collator::createInstance("en_US", status);
+
+ if (U_FAILURE(status))
+ {
+ errln ("Collator::createInstance() failed!");
+ return;
+ }
+
+ // Compare each currency symbol against all the
+ // currency symbols, including itself
+ for (i = 0; i < ARRAY_LENGTH(currency); i += 1)
+ {
+ for (j = 0; j < ARRAY_LENGTH(currency); j += 1)
+ {
+ UnicodeString source(currency[i], 1);
+ UnicodeString target(currency[j], 1);
+
+ if (i < j)
+ {
+ expectedResult = Collator::LESS;
+ }
+ else if ( i == j)
+ {
+ expectedResult = Collator::EQUAL;
+ }
+ else
+ {
+ expectedResult = Collator::GREATER;
+ }
+
+ Collator::EComparisonResult compareResult = c->compare(source, target);
+
+ CollationKey sourceKey, targetKey;
+ UErrorCode status = U_ZERO_ERROR;
+
+ c->getCollationKey(source, sourceKey, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Couldn't get collationKey for source");
+ continue;
+ }
+
+ c->getCollationKey(target, targetKey, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Couldn't get collationKey for target");
+ continue;
+ }
+
+ Collator::EComparisonResult keyResult = sourceKey.compareTo(targetKey);
+
+ reportCResult( source, target, sourceKey, targetKey, compareResult, keyResult, compareResult, expectedResult );
+
+ }
+ }
+ delete c;
+}
+
+void CollationCurrencyTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/)
+{
+ if (exec)
+ {
+ logln("Collation Currency Tests: ");
+ }
+
+ switch (index)
+ {
+ case 0: name = "currencyTest"; if (exec) currencyTest(/*par*/); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/currcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/currcoll.h
new file mode 100644
index 00000000000..85abec996ac
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/currcoll.h
@@ -0,0 +1,39 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * Collation currency tests.
+ * (It's important to stay current!)
+ */
+
+#ifndef _CURRCOLL
+#define _CURRCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coleitr.h"
+#include "tscoll.h"
+
+class CollationCurrencyTest: public IntlTestCollator
+{
+public:
+
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationCurrencyTest();
+ virtual ~CollationCurrencyTest();
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+
+ void currencyTest(/*char *par*/);
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.cpp
new file mode 100644
index 00000000000..da2e567abcf
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.cpp
@@ -0,0 +1,457 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/***********************************************************************
+ * Modification history
+ * Date Name Description
+ * 07/09/2007 srl Copied from dadrcoll.cpp
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/tstdtmod.h"
+#include "tsdate.h"
+#include "dadrcal.h"
+#include "unicode/calendar.h"
+#include "intltest.h"
+#include <string.h>
+#include "unicode/schriter.h"
+#include "unicode/regex.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/dbgutil.h"
+
+#include <stdio.h>
+
+DataDrivenCalendarTest::DataDrivenCalendarTest() {
+ UErrorCode status = U_ZERO_ERROR;
+ driver = TestDataModule::getTestDataModule("calendar", *this, status);
+}
+
+DataDrivenCalendarTest::~DataDrivenCalendarTest() {
+ delete driver;
+}
+
+void DataDrivenCalendarTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par */) {
+ if (driver != NULL) {
+ if (exec) {
+ // logln("Begin ");
+ }
+ const DataMap *info= NULL;
+ UErrorCode status= U_ZERO_ERROR;
+ TestData *testData = driver->createTestData(index, status);
+ if (U_SUCCESS(status)) {
+ name = testData->getName();
+ if (testData->getInfo(info, status)) {
+ log(info->getString("Description", status));
+ }
+ if (exec) {
+ log(name);
+ logln("---");
+ logln("");
+
+ processTest(testData);
+ }
+ delete testData;
+ } else {
+ name = "";
+ }
+ } else {
+ errln("format/DataDriven*Test data (calendar.res) not initialized!");
+ name = "";
+ }
+
+}
+
+void DataDrivenCalendarTest::testOps(TestData *testData,
+ const DataMap * /*settings*/) {
+ UErrorCode status = U_ZERO_ERROR;
+ const DataMap *currentCase= NULL;
+ char toCalLoc[256] = "";
+
+ // TODO: static strings?
+ const UnicodeString kADD("add", "");
+ const UnicodeString kROLL("roll", "");
+
+ // Get 'from' time
+ CalendarFieldsSet fromSet, toSet, paramsSet, diffSet;
+ SimpleDateFormat fmt(UnicodeString("EEE MMM dd yyyy / YYYY'-W'ww-ee"),
+ status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Couldn't create SimpleDateFormat: %s\n",
+ u_errorName(status));
+ return;
+ }
+ // Start the processing
+ int n = 0;
+ while (testData->nextCase(currentCase, status)) {
+ ++n;
+ Calendar *toCalendar= NULL;
+ Calendar *fromCalendar= NULL;
+
+ // load parameters
+ char theCase[200];
+ sprintf(theCase, "[case %d]", n);
+ UnicodeString caseString(theCase, "");
+ // build to calendar
+ // Headers { "locale","from","operation","params","to" }
+ // #1 locale
+ const char *param = "locale";
+ UnicodeString locale;
+ UnicodeString testSetting = currentCase->getString(param, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+": Unable to get param '"+param+"' "
+ + UnicodeString(" - "));
+ continue;
+ }
+ testSetting.extract(0, testSetting.length(), toCalLoc, (const char*)0);
+ fromCalendar = Calendar::createInstance(toCalLoc, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+": Unable to instantiate calendar for "
+ +testSetting);
+ continue;
+ }
+
+ fromSet.clear();
+ // #2 'from' info
+ param = "from";
+ UnicodeString from = testSetting=currentCase->getString(param, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+": Unable to get parameter '"+param+"' "
+ + UnicodeString(" - "));
+ continue;
+ }
+ fromSet.parseFrom(testSetting, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+": Failed to parse '"+param+"' parameter: "
+ +testSetting);
+ continue;
+ }
+
+ // #4 'operation' info
+ param = "operation";
+ UnicodeString operation = testSetting=currentCase->getString(param,
+ status);
+ if (U_FAILURE(status)) {
+ errln(caseString+": Unable to get parameter '"+param+"' "
+ + UnicodeString(" - "));
+ continue;
+ }
+ if (U_FAILURE(status)) {
+ errln(caseString+": Failed to parse '"+param+"' parameter: "
+ +testSetting);
+ continue;
+ }
+
+ paramsSet.clear();
+ // #3 'params' info
+ param = "params";
+ UnicodeString params = testSetting
+ =currentCase->getString(param, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+": Unable to get parameter '"+param+"' "
+ + UnicodeString(" - "));
+ continue;
+ }
+ paramsSet.parseFrom(testSetting, status); // parse with inheritance.
+ if (U_FAILURE(status)) {
+ errln(caseString+": Failed to parse '"+param+"' parameter: "
+ +testSetting);
+ continue;
+ }
+
+ toSet.clear();
+ // #4 'to' info
+ param = "to";
+ UnicodeString to = testSetting=currentCase->getString(param, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+": Unable to get parameter '"+param+"' "
+ + UnicodeString(" - "));
+ continue;
+ }
+ toSet.parseFrom(testSetting, &fromSet, status); // parse with inheritance.
+ if (U_FAILURE(status)) {
+ errln(caseString+": Failed to parse '"+param+"' parameter: "
+ +testSetting);
+ continue;
+ }
+
+ UnicodeString caseContentsString = locale+": from "+from+": "
+ +operation +" [[[ "+params+" ]]] >>> "+to;
+ logln(caseString+": "+caseContentsString);
+
+ // ------
+ // now, do it.
+
+ /// prepare calendar
+ fromSet.setOnCalendar(fromCalendar, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+" FAIL: Failed to set on Source calendar: "
+ + u_errorName(status));
+ return;
+ }
+
+
+ diffSet.clear();
+ // Is the calendar sane after being set?
+ if (!fromSet.matches(fromCalendar, diffSet, status)) {
+ UnicodeString diffs = diffSet.diffFrom(fromSet, status);
+ errln((UnicodeString)"FAIL: "+caseString
+ +", SET SOURCE calendar was not set: Differences: "+ diffs
+ +"', status: "+ u_errorName(status));
+ } else if (U_FAILURE(status)) {
+ errln("FAIL: "+caseString+" SET SOURCE calendar Failed to match: "
+ +u_errorName(status));
+ } else {
+ logln("PASS: "+caseString+" SET SOURCE calendar match.");
+ }
+
+ // to calendar - copy of from calendar
+ toCalendar = fromCalendar->clone();
+
+ /// perform op
+ for (int q=0; q<UCAL_FIELD_COUNT; q++) {
+ if (paramsSet.isSet((UCalendarDateFields)q)) {
+ if (operation == kROLL) {
+ toCalendar->roll((UCalendarDateFields)q,
+ paramsSet.get((UCalendarDateFields)q), status);
+ } else if (operation == kADD) {
+ toCalendar->add((UCalendarDateFields)q,
+ paramsSet.get((UCalendarDateFields)q), status);
+ } else {
+ errln(caseString+ " FAIL: unknown operation "+ operation);
+ }
+ logln(operation + " of "+ paramsSet.get((UCalendarDateFields)q)
+ +" -> "+u_errorName(status));
+ }
+ }
+ if (U_FAILURE(status)) {
+ errln(caseString+" FAIL: after "+operation+" of "+params+" -> "
+ +u_errorName(status));
+ continue;
+ }
+
+ // now - what's the result?
+ diffSet.clear();
+
+ if (!toSet.matches(toCalendar, diffSet, status)) {
+ UnicodeString diffs = diffSet.diffFrom(toSet, status);
+ errln((UnicodeString)"FAIL: "+caseString+" - , "+caseContentsString
+ +" Differences: "+ diffs +"', status: "
+ + u_errorName(status));
+ } else if (U_FAILURE(status)) {
+ errln("FAIL: "+caseString+" Match operation had an error: "
+ +u_errorName(status));
+ } else {
+ logln("PASS: "+caseString+" matched!");
+ }
+
+ delete fromCalendar;
+ delete toCalendar;
+ }
+}
+
+void DataDrivenCalendarTest::testConvert(int32_t n,
+ const CalendarFieldsSet &fromSet, Calendar *fromCalendar,
+ const CalendarFieldsSet &toSet, Calendar *toCalendar, UBool forward) {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString thisString = (UnicodeString)"#"+n+" "+(forward ? "forward"
+ : "reverse")+" "+fromCalendar->getType()+"->"+toCalendar->getType();
+
+ fromCalendar->clear();
+
+ fromSet.setOnCalendar(fromCalendar, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Failed to set on Source calendar: %s", u_errorName(status));
+ return;
+ }
+
+ CalendarFieldsSet diffSet;
+
+ diffSet.clear();
+ // Is the calendar sane at the first?
+ if (!fromSet.matches(fromCalendar, diffSet, status)) {
+ UnicodeString diffs = diffSet.diffFrom(fromSet, status);
+ errln((UnicodeString)"FAIL: "+thisString
+ +", SOURCE calendar was not set: Differences: "+ diffs
+ +"', status: "+ u_errorName(status));
+ } else if (U_FAILURE(status)) {
+ errln("FAIL: "+thisString+" SOURCE calendar Failed to match: "
+ +u_errorName(status));
+ } else {
+ logln("PASS: "+thisString+" SOURCE calendar match.");
+ }
+
+ //logln("Set Source calendar: " + from);
+
+ UDate fromTime = fromCalendar->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Failed to get Source time: %s", u_errorName(status));
+ return;
+ }
+
+ diffSet.clear();
+ // Is the calendar sane after being set?
+ if (!fromSet.matches(fromCalendar, diffSet, status)) {
+ UnicodeString diffs = diffSet.diffFrom(fromSet, status);
+ errln((UnicodeString)"FAIL: "+thisString
+ +", SET SOURCE calendar was not set: Differences: "+ diffs
+ +"', status: "+ u_errorName(status));
+ } else if (U_FAILURE(status)) {
+ errln("FAIL: "+thisString+" SET SOURCE calendar Failed to match: "
+ +u_errorName(status));
+ } else {
+ logln("PASS: "+thisString+" SET SOURCE calendar match.");
+ }
+
+ toCalendar->clear();
+ toCalendar->setTime(fromTime, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Failed to set Target time: %s", u_errorName(status));
+ return;
+ }
+
+ diffSet.clear();
+ if (!toSet.matches(toCalendar, diffSet, status)) {
+ UnicodeString diffs = diffSet.diffFrom(toSet, status);
+ errln((UnicodeString)"FAIL: "+thisString+", Differences: "+ diffs
+ +"', status: "+ u_errorName(status));
+ SimpleDateFormat fmt(UnicodeString("EEE MMM dd yyyy G"), status);
+ UnicodeString fromString;
+ fmt.format(fromTime, fromString);
+ logln("Source Time: "+fromString+", Source Calendar: "
+ +fromCalendar->getType());
+ } else if (U_FAILURE(status)) {
+ errln("FAIL: "+thisString+" Failed to match: "+u_errorName(status));
+ } else {
+ logln("PASS: "+thisString+" match.");
+ }
+}
+
+void DataDrivenCalendarTest::testConvert(TestData *testData,
+ const DataMap *settings, UBool forward) {
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *toCalendar= NULL;
+ const DataMap *currentCase= NULL;
+ char toCalLoc[256] = "";
+ char fromCalLoc[256] = "";
+ // build to calendar
+ UnicodeString testSetting = settings->getString("ToCalendar", status);
+ if (U_SUCCESS(status)) {
+ testSetting.extract(0, testSetting.length(), toCalLoc, (const char*)0);
+ toCalendar = Calendar::createInstance(toCalLoc, status);
+ if (U_FAILURE(status)) {
+ errln("Unable to instantiate ToCalendar for "+testSetting);
+ return;
+ }
+ }
+
+ CalendarFieldsSet fromSet, toSet, diffSet;
+ SimpleDateFormat fmt(UnicodeString("EEE MMM dd yyyy / YYYY'-W'ww-ee"),
+ status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Couldn't create SimpleDateFormat: %s\n",
+ u_errorName(status));
+ return;
+ }
+ // Start the processing
+ int n = 0;
+ while (testData->nextCase(currentCase, status)) {
+ ++n;
+ Calendar *fromCalendar= NULL;
+ UnicodeString locale = currentCase->getString("locale", status);
+ if (U_SUCCESS(status)) {
+ locale.extract(0, locale.length(), fromCalLoc, (const char*)0); // default codepage. Invariant codepage doesn't have '@'!
+ fromCalendar = Calendar::createInstance(fromCalLoc, status);
+ if (U_FAILURE(status)) {
+ errln("Unable to instantiate fromCalendar for "+locale);
+ return;
+ }
+ } else {
+ errln("No 'locale' line.");
+ continue;
+ }
+
+ fromSet.clear();
+ toSet.clear();
+
+ UnicodeString from = currentCase->getString("from", status);
+ if (U_FAILURE(status)) {
+ errln("No 'from' line.");
+ continue;
+ }
+ fromSet.parseFrom(from, status);
+ if (U_FAILURE(status)) {
+ errln("Failed to parse 'from' parameter: "+from);
+ continue;
+ }
+ UnicodeString to = currentCase->getString("to", status);
+ if (U_FAILURE(status)) {
+ errln("No 'to' line.");
+ continue;
+ }
+ toSet.parseFrom(to, &fromSet, status);
+ if (U_FAILURE(status)) {
+ errln("Failed to parse 'to' parameter: "+to);
+ continue;
+ }
+
+ // now, do it.
+ if (forward) {
+ logln((UnicodeString)"#"+n+" "+locale+"/"+from+" >>> "+toCalLoc+"/"
+ +to);
+ testConvert(n, fromSet, fromCalendar, toSet, toCalendar, forward);
+ } else {
+ logln((UnicodeString)"#"+n+" "+locale+"/"+from+" <<< "+toCalLoc+"/"
+ +to);
+ testConvert(n, toSet, toCalendar, fromSet, fromCalendar, forward);
+ }
+
+ delete fromCalendar;
+ }
+ delete toCalendar;
+}
+
+void DataDrivenCalendarTest::processTest(TestData *testData) {
+ //Calendar *cal= NULL;
+ //const UChar *arguments= NULL;
+ //int32_t argLen = 0;
+ char testType[256];
+ const DataMap *settings= NULL;
+ //const UChar *type= NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString testSetting;
+ int n = 0;
+ while (testData->nextSettings(settings, status)) {
+ status = U_ZERO_ERROR;
+ // try to get a locale
+ testSetting = settings->getString("Type", status);
+ if (U_SUCCESS(status)) {
+ if ((++n)>0) {
+ logln("---");
+ }
+ logln(testSetting + "---");
+ testSetting.extract(0, testSetting.length(), testType, "");
+ } else {
+ errln("Unable to extract 'Type'. Skipping..");
+ continue;
+ }
+
+ if (!strcmp(testType, "convert_fwd")) {
+ testConvert(testData, settings, true);
+ } else if (!strcmp(testType, "convert_rev")) {
+ testConvert(testData, settings, false);
+ } else if (!strcmp(testType, "ops")) {
+ testOps(testData, settings);
+ } else {
+ errln("Unknown type: %s", testType);
+ }
+ }
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.h b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.h
new file mode 100644
index 00000000000..3d59494ccc7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcal.h
@@ -0,0 +1,52 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * DataDrivenCalendarTest is a test class that uses data stored in resource
+ * bundles to perform testing. For more details on data structure, see
+ * source/test/testdata/calendar.txt
+ */
+
+#ifndef _INTLTESTDATADRIVENCALENDAR
+#define _INTLTESTDATADRIVENCALENDAR
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "tsdate.h"
+#include "uvector.h"
+#include "unicode/calendar.h"
+#include "fldset.h"
+
+class TestDataModule;
+class TestData;
+class DataMap;
+class CalendarFieldsSet;
+
+class DataDrivenCalendarTest : public IntlTest {
+ void runIndexedTest(int32_t index, UBool exec, const char* &name,
+ char* par = NULL);
+public:
+ DataDrivenCalendarTest();
+ virtual ~DataDrivenCalendarTest();
+protected:
+
+ void DataDrivenTest(char *par);
+ void processTest(TestData *testData);
+private:
+ void testConvert(TestData *testData, const DataMap *settings, UBool fwd);
+ void testOps(TestData *testData, const DataMap *settings);
+ void testConvert(int32_t n, const CalendarFieldsSet &fromSet,
+ Calendar *fromCal, const CalendarFieldsSet &toSet, Calendar *toCal,
+ UBool fwd);
+private:
+ TestDataModule *driver;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.cpp
new file mode 100644
index 00000000000..1b993840de0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.cpp
@@ -0,0 +1,290 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * IntlTestCollator is the medium level test class for everything in the directory "collate".
+ */
+
+/***********************************************************************
+* Modification history
+* Date Name Description
+* 02/14/2001 synwee Compare with cintltst and commented away tests
+* that are not run.
+***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/uchar.h"
+#include "unicode/tstdtmod.h"
+#include "cstring.h"
+#include "ucol_tok.h"
+#include "tscoll.h"
+#include "dadrcoll.h"
+
+U_CDECL_BEGIN
+static void U_CALLCONV deleteSeqElement(void *elem) {
+ delete((SeqElement *)elem);
+}
+U_CDECL_END
+
+DataDrivenCollatorTest::DataDrivenCollatorTest()
+: seq(StringCharacterIterator("")),
+status(U_ZERO_ERROR),
+sequences(status)
+{
+ driver = TestDataModule::getTestDataModule("DataDrivenCollationTest", *this, status);
+ sequences.setDeleter(deleteSeqElement);
+ UCA = (RuleBasedCollator*)Collator::createInstance("root", status);
+}
+
+DataDrivenCollatorTest::~DataDrivenCollatorTest()
+{
+ delete driver;
+ delete UCA;
+}
+
+void DataDrivenCollatorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par */)
+{
+ if(driver != NULL) {
+ if (exec)
+ {
+ logln("TestSuite Collator: ");
+ }
+ const DataMap *info = NULL;
+ TestData *testData = driver->createTestData(index, status);
+ if(U_SUCCESS(status)) {
+ name = testData->getName();
+ if(testData->getInfo(info, status)) {
+ log(info->getString("Description", status));
+ }
+ if(exec) {
+ log(name);
+ logln("---");
+ logln("");
+ processTest(testData);
+ }
+ delete testData;
+ } else {
+ name = "";
+ }
+ } else {
+ errln("collate/DataDrivenTest data not initialized!");
+ name = "";
+ }
+
+
+}
+
+UBool
+DataDrivenCollatorTest::setTestSequence(const UnicodeString &setSequence, SeqElement &el) {
+ seq.setText(setSequence);
+ return getNextInSequence(el);
+}
+
+// Parses the sequence to be tested
+UBool
+DataDrivenCollatorTest::getNextInSequence(SeqElement &el) {
+ el.source.truncate(0);
+ UBool quoted = FALSE;
+ UBool quotedsingle = FALSE;
+ UChar32 currChar = 0;
+
+ while(currChar != CharacterIterator::DONE) {
+ currChar= seq.next32PostInc();
+ if(!quoted) {
+ if(u_isWhitespace(currChar)) {
+ continue;
+ }
+ switch(currChar) {
+ case CharacterIterator::DONE:
+ break;
+ case 0x003C /* < */:
+ el.relation = Collator::LESS;
+ currChar = CharacterIterator::DONE;
+ break;
+ case 0x003D /* = */:
+ el.relation = Collator::EQUAL;
+ currChar = CharacterIterator::DONE;
+ break;
+ case 0x003E /* > */:
+ el.relation = Collator::GREATER;
+ currChar = CharacterIterator::DONE;
+ break;
+ case 0x0027 /* ' */: /* very basic quoting */
+ quoted = TRUE;
+ quotedsingle = FALSE;
+ break;
+ case 0x005c /* \ */: /* single quote */
+ quoted = TRUE;
+ quotedsingle = TRUE;
+ break;
+ default:
+ el.source.append(currChar);
+ }
+ } else {
+ if(currChar == CharacterIterator::DONE) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ errln("Quote in sequence not closed!");
+ return FALSE;
+ } else if(currChar == 0x0027) {
+ quoted = FALSE;
+ } else {
+ el.source.append(currChar);
+ }
+ if(quotedsingle) {
+ quoted = FALSE;
+ }
+ }
+ }
+ return seq.hasNext();
+}
+
+// Reads the options string and sets appropriate attributes in collator
+void
+DataDrivenCollatorTest::processArguments(Collator *col, const UChar *start, int32_t optLen) {
+ const UChar *end = start+optLen;
+ UColAttribute attrib;
+ UColAttributeValue value;
+
+ if(optLen == 0) {
+ return;
+ }
+
+ start = ucol_tok_getNextArgument(start, end, &attrib, &value, &status);
+ while(start != NULL) {
+ if(U_SUCCESS(status)) {
+ col->setAttribute(attrib, value, status);
+ }
+ start = ucol_tok_getNextArgument(start, end, &attrib, &value, &status);
+ }
+}
+
+void
+DataDrivenCollatorTest::processTest(TestData *testData) {
+ Collator *col = NULL;
+ const UChar *arguments = NULL;
+ int32_t argLen = 0;
+ const DataMap *settings = NULL;
+ const DataMap *currentCase = NULL;
+ UErrorCode intStatus = U_ZERO_ERROR;
+ UnicodeString testSetting;
+ while(testData->nextSettings(settings, status)) {
+ intStatus = U_ZERO_ERROR;
+ // try to get a locale
+ testSetting = settings->getString("TestLocale", intStatus);
+ if(U_SUCCESS(intStatus)) {
+ char localeName[256];
+ testSetting.extract(0, testSetting.length(), localeName, "");
+ col = Collator::createInstance(localeName, status);
+ if(U_SUCCESS(status)) {
+ logln("Testing collator for locale "+testSetting);
+ } else {
+ errln("Unable to instantiate collator for locale "+testSetting);
+ return;
+ }
+ } else {
+ // if no locale, try from rules
+ intStatus = U_ZERO_ERROR;
+ testSetting = settings->getString("Rules", intStatus);
+ if(U_SUCCESS(intStatus)) {
+ col = new RuleBasedCollator(testSetting, status);
+ if(U_SUCCESS(status)) {
+ logln("Testing collator for rules "+testSetting);
+ } else {
+ errln("Unable to instantiate collator for rules "+testSetting);
+ return;
+ }
+ } else {
+ errln("No collator definition!");
+ }
+ }
+
+ int32_t cloneSize = 0;
+ uint8_t* cloneBuf = NULL;
+ RuleBasedCollator* clone = NULL;
+ if(col != NULL){
+ RuleBasedCollator* rbc = (RuleBasedCollator*)col;
+ cloneSize = rbc->cloneBinary(NULL, 0, intStatus);
+ intStatus = U_ZERO_ERROR;
+ cloneBuf = (uint8_t*) malloc(cloneSize);
+ cloneSize = rbc->cloneBinary(cloneBuf, cloneSize, intStatus);
+ clone = new RuleBasedCollator(cloneBuf, cloneSize, UCA, intStatus);
+ if(U_FAILURE(intStatus)){
+ errln("Could not clone the RuleBasedCollator. Error: %s", u_errorName(intStatus));
+ intStatus= U_ZERO_ERROR;
+ }
+ // get attributes
+ testSetting = settings->getString("Arguments", intStatus);
+ if(U_SUCCESS(intStatus)) {
+ logln("Arguments: "+testSetting);
+ argLen = testSetting.length();
+ arguments = testSetting.getBuffer();
+ processArguments(col, arguments, argLen);
+ if(clone != NULL){
+ processArguments(clone, arguments, argLen);
+ }
+ if(U_FAILURE(status)) {
+ errln("Couldn't process arguments");
+ break;
+ }
+ } else {
+ intStatus = U_ZERO_ERROR;
+ }
+ // Start the processing
+ while(testData->nextCase(currentCase, status)) {
+ UnicodeString sequence = currentCase->getString("sequence", status);
+ if(U_SUCCESS(status)) {
+ processSequence(col, sequence);
+ if(clone != NULL){
+ processSequence(clone, sequence);
+ }
+ }
+ }
+ } else {
+ errln("Couldn't instantiate a collator!");
+ }
+ delete clone;
+ free(cloneBuf);
+ delete col;
+ col = NULL;
+ }
+}
+
+
+void
+DataDrivenCollatorTest::processSequence(Collator* col, const UnicodeString &sequence) {
+ Collator::EComparisonResult relation = Collator::EQUAL;
+ UBool hasNext;
+ SeqElement *source = NULL;
+ SeqElement *target = NULL;
+ int32_t j = 0;
+
+ sequences.removeAllElements();
+
+ target = new SeqElement();
+
+ setTestSequence(sequence, *target);
+ sequences.addElement(target, status);
+
+ do {
+ relation = Collator::EQUAL;
+ target = new SeqElement();
+ hasNext = getNextInSequence(*target);
+ for(j = sequences.size(); j > 0; j--) {
+ source = (SeqElement *)sequences.elementAt(j-1);
+ if(relation == Collator::EQUAL && source->relation != Collator::EQUAL) {
+ relation = source->relation;
+ }
+ doTest(col, source->source, target->source, relation);
+ }
+ sequences.addElement(target, status);
+ source = target;
+ } while(hasNext);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.h
new file mode 100644
index 00000000000..b76f40db8d1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dadrcoll.h
@@ -0,0 +1,59 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * DataDrivenCollatorTest is a test class that uses data stored in resource
+ * bundles to perform testing. For more details on data structure, see
+ * source/test/testdata/DataDrivenCollationTest.txt
+ */
+
+#ifndef _INTLTESTDATADRIVENCOLLATOR
+#define _INTLTESTDATADRIVENCOLLATOR
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+#include "uvector.h"
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/sortkey.h"
+#include "unicode/schriter.h"
+
+class TestDataModule;
+class TestData;
+
+class SeqElement {
+public:
+ UnicodeString source;
+ Collator::EComparisonResult relation;
+};
+
+class DataDrivenCollatorTest: public IntlTestCollator {
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+public:
+ DataDrivenCollatorTest();
+ virtual ~DataDrivenCollatorTest();
+protected:
+
+ void DataDrivenTest(char *par);
+ void processSequence(Collator* col, const UnicodeString &sequence);
+ void processTest(TestData *testData);
+ void processArguments(Collator *col, const UChar *start, int32_t optLen);
+ UBool setTestSequence(const UnicodeString &setSequence, SeqElement &el);
+ UBool getNextInSequence(SeqElement &el);
+private:
+ StringCharacterIterator seq;
+ TestDataModule *driver;
+ UErrorCode status;
+ UVector sequences;
+ RuleBasedCollator *UCA; // needed for opening collators from binary images
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.cpp
new file mode 100644
index 00000000000..94a12e21e15
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.cpp
@@ -0,0 +1,318 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/***********************************************************************
+ * Modification history
+ * Date Name Description
+ * 07/09/2007 srl Copied from dadrcoll.cpp
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/tstdtmod.h"
+#include "tsdate.h"
+#include "dadrfmt.h"
+#include "unicode/calendar.h"
+#include "intltest.h"
+#include <string.h>
+#include "unicode/schriter.h"
+#include "unicode/regex.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/dbgutil.h"
+#include "fldset.h"
+
+
+#include <stdio.h>
+
+DataDrivenFormatTest::DataDrivenFormatTest() {
+ UErrorCode status = U_ZERO_ERROR;
+ driver = TestDataModule::getTestDataModule("format", *this, status);
+}
+
+DataDrivenFormatTest::~DataDrivenFormatTest() {
+ delete driver;
+}
+
+void DataDrivenFormatTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par */) {
+ if (driver != NULL) {
+ if (exec) {
+ // logln("Begin ");
+ }
+ const DataMap *info= NULL;
+ UErrorCode status= U_ZERO_ERROR;
+ TestData *testData = driver->createTestData(index, status);
+ if (U_SUCCESS(status)) {
+ name = testData->getName();
+ if (testData->getInfo(info, status)) {
+ log(info->getString("Description", status));
+ }
+ if (exec) {
+ log(name);
+ logln("---");
+ logln("");
+
+ processTest(testData);
+ }
+ delete testData;
+ } else {
+ name = "";
+ }
+ } else {
+ errln("format/DataDriven*Test data (format.res) not initialized!");
+ name = "";
+ }
+
+}
+
+
+
+/*
+ * Headers { "locale","spec", "date", "str"}
+ // locale: locale including calendar type
+ // spec: either 'PATTERN=y mm h' etc, or 'DATE=SHORT,TIME=LONG'
+ // date: either an unsigned long (millis), or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the locale
+ // str: the expected unicode string
+ Cases {
+ {
+ "en_US@calendar=gregorian",
+ "DATE=SHORT,TIME=SHORT",
+ "ERA=1,YEAR=2007,MONTH=AUGUST,DATE=8,HOUR=18,MINUTE=54,SECOND=12",
+ "8/8/2007 6:54pm"
+ },
+ * */
+
+
+void DataDrivenFormatTest::testConvertDate(TestData *testData,
+ const DataMap * /* settings */, UBool fmt) {
+ UnicodeString kPATTERN("PATTERN="); // TODO: static
+ UnicodeString kMILLIS("MILLIS="); // TODO: static
+ UnicodeString kRELATIVE_MILLIS("RELATIVE_MILLIS="); // TODO: static
+
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat basicFmt(UnicodeString("EEE MMM dd yyyy / YYYY'-W'ww-ee"),
+ status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Couldn't create basic SimpleDateFormat: %s\n",
+ u_errorName(status));
+ return;
+ }
+
+ const DataMap *currentCase= NULL;
+ // Start the processing
+ int n = 0;
+ while (testData->nextCase(currentCase, status)) {
+ char calLoc[256] = "";
+ DateTimeStyleSet styleSet;
+ UnicodeString pattern;
+ UBool usePattern = FALSE;
+ CalendarFieldsSet fromSet;
+ UDate fromDate = 0;
+ UBool useDate = FALSE;
+
+ UDate now = Calendar::getNow();
+
+ ++n;
+
+ char theCase[200];
+ sprintf(theCase, "case %d:", n);
+ UnicodeString caseString(theCase, "");
+
+ // load params
+ UnicodeString locale = currentCase->getString("locale", status);
+ if (U_FAILURE(status)) {
+ errln("case %d: No 'locale' line.", n);
+ continue;
+ }
+ UnicodeString spec = currentCase->getString("spec", status);
+ if(U_FAILURE(status)) {
+ errln("case %d: No 'spec' line.", n);
+ continue;
+ }
+ UnicodeString date = currentCase->getString("date", status);
+ if(U_FAILURE(status)) {
+ errln("case %d: No 'date' line.", n);
+ continue;
+ }
+ UnicodeString expectStr= currentCase->getString("str", status);
+ if(U_FAILURE(status)) {
+ errln("case %d: No 'str' line.", n);
+ continue;
+ }
+
+ DateFormat *format = NULL;
+
+ // Process: 'locale'
+ locale.extract(0, locale.length(), calLoc, (const char*)0); // default codepage. Invariant codepage doesn't have '@'!
+ Locale loc(calLoc);
+ if(spec.startsWith(kPATTERN)) {
+ pattern = UnicodeString(spec,kPATTERN.length());
+ usePattern = TRUE;
+ format = new SimpleDateFormat(pattern, loc, status);
+ if(U_FAILURE(status)) {
+ errln("case %d: could not create SimpleDateFormat from pattern: %s", n, u_errorName(status));
+ continue;
+ }
+ } else {
+ if(styleSet.parseFrom(spec, status)<0 || U_FAILURE(status)) {
+ errln("case %d: could not parse spec as style fields: %s", n, u_errorName(status));
+ continue;
+ }
+ format = DateFormat::createDateTimeInstance((DateFormat::EStyle)styleSet.getDateStyle(), (DateFormat::EStyle)styleSet.getTimeStyle(), loc);
+ if(format == NULL ) {
+ errln("case %d: could not create SimpleDateFormat from styles.", n);
+ continue;
+ }
+ }
+
+ // parse 'date'
+ if(date.startsWith(kMILLIS)) {
+ UnicodeString millis = UnicodeString(date, kMILLIS.length());
+ useDate = TRUE;
+ fromDate = udbg_stoi(millis);
+ } else if(date.startsWith(kRELATIVE_MILLIS)) {
+ UnicodeString millis = UnicodeString(date, kRELATIVE_MILLIS.length());
+ useDate = TRUE;
+ fromDate = udbg_stoi(millis) + now;
+ } else if(fromSet.parseFrom(date, status)<0 || U_FAILURE(status)) {
+ errln("case %d: could not parse date as calendar fields: %s", n, u_errorName(status));
+ continue;
+ }
+
+ Calendar *cal = Calendar::createInstance(loc, status);
+ if(U_FAILURE(status)) {
+ errln("case %d: could not create calendar from %s", n, calLoc);
+ }
+ // now, do it.
+ if (fmt) {
+ FieldPosition pos;
+// logln((UnicodeString)"#"+n+" "+locale+"/"+from+" >>> "+toCalLoc+"/"
+// +to);
+ cal->clear();
+ UnicodeString output;
+ output.remove();
+
+ if(useDate) {
+// cal->setTime(fromDate, status);
+// if(U_FAILURE(status)) {
+// errln("case %d: could not set time on calendar: %s", n, u_errorName(status));
+// continue;
+// }
+ format->format(fromDate, output, pos, status);
+ } else {
+ fromSet.setOnCalendar(cal, status);
+ if(U_FAILURE(status)) {
+ errln("case %d: could not set fields on calendar: %s", n, u_errorName(status));
+ continue;
+ }
+ format->format(*cal, output, pos);
+ }
+
+ // check erro result from 'format'
+ if(U_FAILURE(status)) {
+ errln("case %d: could not format(): %s", n, u_errorName(status)); // TODO: use 'pos'
+ }
+// if(pos.getBeginIndex()==0 && pos.getEndIndex()==0) { // TODO: more precise error?
+// errln("WARNING: case %d: format's pos returned (0,0) - error ??", n);
+// }
+
+ if(output == expectStr) {
+ logln(caseString+": format: SUCCESS! "+UnicodeString("expect=output=")+output);
+ } else {
+ UnicodeString result;
+ UnicodeString result2;
+ errln(caseString+": format: output!=expectStr, got " + *udbg_escape(output, &result) + " expected " + *udbg_escape(expectStr, &result2));
+ }
+ } else {
+ cal->clear();
+ ParsePosition pos;
+ format->parse(expectStr,*cal,pos);
+ if(useDate) {
+ UDate gotDate = cal->getTime(status);
+ if(U_FAILURE(status)) {
+ errln(caseString+": parse: could not get time on calendar: "+UnicodeString(u_errorName(status)));
+ continue;
+ }
+ if(gotDate == fromDate) {
+ logln(caseString+": parse: SUCCESS! "+UnicodeString("gotDate=parseDate=")+expectStr);
+ } else {
+ UnicodeString expectDateStr, gotDateStr;
+ basicFmt.format(fromDate,expectDateStr);
+ basicFmt.format(gotDate,gotDateStr);
+ errln(caseString+": parse: FAIL. parsed '"+expectStr+"' and got "+gotDateStr+", expected " + expectDateStr);
+ }
+ } else {
+// Calendar *cal2 = cal->clone();
+// cal2->clear();
+// fromSet.setOnCalendar(cal2, status);
+ if(U_FAILURE(status)) {
+ errln("case %d: parse: could not set fields on calendar: %s", n, u_errorName(status));
+ continue;
+ }
+
+ CalendarFieldsSet diffSet;
+// diffSet.clear();
+ if (!fromSet.matches(cal, diffSet, status)) {
+ UnicodeString diffs = diffSet.diffFrom(fromSet, status);
+ errln((UnicodeString)"FAIL: "+caseString
+ +", Differences: '"+ diffs
+ +"', status: "+ u_errorName(status));
+ } else if (U_FAILURE(status)) {
+ errln("FAIL: "+caseString+" parse SET SOURCE calendar Failed to match: "
+ +u_errorName(status));
+ } else {
+ logln("PASS: "+caseString+" parse.");
+ }
+
+
+
+ }
+ }
+ delete cal;
+ delete format;
+
+ }
+// delete basicFmt;
+}
+
+void DataDrivenFormatTest::processTest(TestData *testData) {
+ //Format *cal= NULL;
+ //const UChar *arguments= NULL;
+ //int32_t argLen = 0;
+ char testType[256];
+ const DataMap *settings= NULL;
+ //const UChar *type= NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString testSetting;
+ int n = 0;
+ while (testData->nextSettings(settings, status)) {
+ status = U_ZERO_ERROR;
+ // try to get a locale
+ testSetting = settings->getString("Type", status);
+ if (U_SUCCESS(status)) {
+ if ((++n)>0) {
+ logln("---");
+ }
+ logln(testSetting + "---");
+ testSetting.extract(0, testSetting.length(), testType, "");
+ } else {
+ errln("Unable to extract 'Type'. Skipping..");
+ continue;
+ }
+
+ if (!strcmp(testType, "date_format")) {
+ testConvertDate(testData, settings, true);
+ } else if (!strcmp(testType, "date_parse")) {
+ testConvertDate(testData, settings, false);
+ } else {
+ errln("Unknown type: %s", testType);
+ }
+ }
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.h b/Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.h
new file mode 100644
index 00000000000..77f098bbe56
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dadrfmt.h
@@ -0,0 +1,52 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * DataDrivenFormatTest is a test class that uses data stored in resource
+ * bundles to perform testing. For more details on data structure, see
+ * source/test/testdata/calendar.txt
+ */
+
+#ifndef _INTLTESTDATADRIVENFORMAT
+#define _INTLTESTDATADRIVENFORMAT
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "tsdate.h"
+#include "uvector.h"
+#include "unicode/format.h"
+//#include "fldset.h"
+
+class TestDataModule;
+class TestData;
+class DataMap;
+//class DateTimeStyle;
+
+class DataDrivenFormatTest : public IntlTest {
+ void runIndexedTest(int32_t index, UBool exec, const char* &name,
+ char* par = NULL);
+public:
+ DataDrivenFormatTest();
+ virtual ~DataDrivenFormatTest();
+protected:
+
+ void DataDrivenTest(char *par);
+ void processTest(TestData *testData);
+private:
+ void testConvertDate(TestData *testData, const DataMap *settings, UBool fmt);
+// void testOps(TestData *testData, const DataMap *settings);
+// void testConvert(int32_t n, const FormatFieldsSet &fromSet,
+// Format *fromCal, const FormatFieldsSet &toSet, Format *toCal,
+// UBool fwd);
+private:
+ TestDataModule *driver;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.cpp
new file mode 100644
index 00000000000..792385da664
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.cpp
@@ -0,0 +1,419 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "dcfmapts.h"
+
+#include "unicode/decimfmt.h"
+#include "unicode/dcfmtsym.h"
+#include "unicode/parseerr.h"
+
+// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
+// try to test the full functionality. It just calls each function in the class and
+// verifies that it works on a basic level.
+
+void IntlTestDecimalFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln((UnicodeString)"TestSuite DecimalFormatAPI");
+ switch (index) {
+ case 0: name = "DecimalFormat API test";
+ if (exec) {
+ logln((UnicodeString)"DecimalFormat API test---"); logln((UnicodeString)"");
+ UErrorCode status = U_ZERO_ERROR;
+ Locale saveLocale;
+ Locale::setDefault(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Could not set default locale, test may not give correct results");
+ }
+ testAPI(/*par*/);
+ Locale::setDefault(saveLocale, status);
+ }
+ break;
+ case 1: name = "Rounding test";
+ if(exec) {
+ logln((UnicodeString)"DecimalFormat Rounding test---");
+ testRounding(/*par*/);
+ }
+ break;
+
+ default: name = ""; break;
+ }
+}
+
+/**
+ * This test checks various generic API methods in DecimalFormat to achieve 100%
+ * API coverage.
+ */
+void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+// ======= Test constructors
+
+ logln((UnicodeString)"Testing DecimalFormat constructors");
+
+ DecimalFormat def(status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Could not create DecimalFormat (default)");
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+ const UnicodeString pattern("#,##0.# FF");
+ DecimalFormat pat(pattern, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern)");
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+ DecimalFormatSymbols *symbols = new DecimalFormatSymbols(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Could not create DecimalFormatSymbols (French)");
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+ DecimalFormat cust1(pattern, symbols, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern, symbols*)");
+ }
+
+ status = U_ZERO_ERROR;
+ DecimalFormat cust2(pattern, *symbols, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern, symbols)");
+ }
+
+ DecimalFormat copy(pat);
+
+// ======= Test clone(), assignment, and equality
+
+ logln((UnicodeString)"Testing clone(), assignment and equality operators");
+
+ if( ! (copy == pat) || copy != pat) {
+ errln((UnicodeString)"ERROR: Copy constructor or == failed");
+ }
+
+ copy = cust1;
+ if(copy != cust1) {
+ errln((UnicodeString)"ERROR: Assignment (or !=) failed");
+ }
+
+ Format *clone = def.clone();
+ if( ! (*clone == def) ) {
+ errln((UnicodeString)"ERROR: Clone() failed");
+ }
+ delete clone;
+
+// ======= Test various format() methods
+
+ logln((UnicodeString)"Testing various format() methods");
+
+ double d = -10456.0037;
+ int32_t l = 100000000;
+ Formattable fD(d);
+ Formattable fL(l);
+
+ UnicodeString res1, res2, res3, res4;
+ FieldPosition pos1(0), pos2(0), pos3(0), pos4(0);
+
+ res1 = def.format(d, res1, pos1);
+ logln( (UnicodeString) "" + (int32_t) d + " formatted to " + res1);
+
+ res2 = pat.format(l, res2, pos2);
+ logln((UnicodeString) "" + (int32_t) l + " formatted to " + res2);
+
+ status = U_ZERO_ERROR;
+ res3 = cust1.format(fD, res3, pos3, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: format(Formattable [double]) failed");
+ }
+ logln((UnicodeString) "" + (int32_t) fD.getDouble() + " formatted to " + res3);
+
+ status = U_ZERO_ERROR;
+ res4 = cust2.format(fL, res4, pos4, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: format(Formattable [long]) failed");
+ }
+ logln((UnicodeString) "" + fL.getLong() + " formatted to " + res4);
+
+// ======= Test parse()
+
+ logln((UnicodeString)"Testing parse()");
+
+ UnicodeString text("-10,456.0037");
+ Formattable result1, result2;
+ ParsePosition pos(0);
+ UnicodeString patt("#,##0.#");
+ status = U_ZERO_ERROR;
+ pat.applyPattern(patt, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: applyPattern() failed");
+ }
+ pat.parse(text, result1, pos);
+ if(result1.getType() != Formattable::kDouble && result1.getDouble() != d) {
+ errln((UnicodeString)"ERROR: Roundtrip failed (via parse()) for " + text);
+ }
+ logln(text + " parsed into " + (int32_t) result1.getDouble());
+
+ status = U_ZERO_ERROR;
+ pat.parse(text, result2, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: parse() failed");
+ }
+ if(result2.getType() != Formattable::kDouble && result2.getDouble() != d) {
+ errln((UnicodeString)"ERROR: Roundtrip failed (via parse()) for " + text);
+ }
+ logln(text + " parsed into " + (int32_t) result2.getDouble());
+
+// ======= Test getters and setters
+
+ logln((UnicodeString)"Testing getters and setters");
+
+ const DecimalFormatSymbols *syms = pat.getDecimalFormatSymbols();
+ DecimalFormatSymbols *newSyms = new DecimalFormatSymbols(*syms);
+ def.setDecimalFormatSymbols(*newSyms);
+ def.adoptDecimalFormatSymbols(newSyms); // don't use newSyms after this
+ if( *(pat.getDecimalFormatSymbols()) != *(def.getDecimalFormatSymbols())) {
+ errln((UnicodeString)"ERROR: adopt or set DecimalFormatSymbols() failed");
+ }
+
+ UnicodeString posPrefix;
+ pat.setPositivePrefix("+");
+ posPrefix = pat.getPositivePrefix(posPrefix);
+ logln((UnicodeString)"Positive prefix (should be +): " + posPrefix);
+ if(posPrefix != "+") {
+ errln((UnicodeString)"ERROR: setPositivePrefix() failed");
+ }
+
+ UnicodeString negPrefix;
+ pat.setNegativePrefix("-");
+ negPrefix = pat.getNegativePrefix(negPrefix);
+ logln((UnicodeString)"Negative prefix (should be -): " + negPrefix);
+ if(negPrefix != "-") {
+ errln((UnicodeString)"ERROR: setNegativePrefix() failed");
+ }
+
+ UnicodeString posSuffix;
+ pat.setPositiveSuffix("_");
+ posSuffix = pat.getPositiveSuffix(posSuffix);
+ logln((UnicodeString)"Positive suffix (should be _): " + posSuffix);
+ if(posSuffix != "_") {
+ errln((UnicodeString)"ERROR: setPositiveSuffix() failed");
+ }
+
+ UnicodeString negSuffix;
+ pat.setNegativeSuffix("~");
+ negSuffix = pat.getNegativeSuffix(negSuffix);
+ logln((UnicodeString)"Negative suffix (should be ~): " + negSuffix);
+ if(negSuffix != "~") {
+ errln((UnicodeString)"ERROR: setNegativeSuffix() failed");
+ }
+
+ int32_t multiplier = 0;
+ pat.setMultiplier(8);
+ multiplier = pat.getMultiplier();
+ logln((UnicodeString)"Multiplier (should be 8): " + multiplier);
+ if(multiplier != 8) {
+ errln((UnicodeString)"ERROR: setMultiplier() failed");
+ }
+
+ int32_t groupingSize = 0;
+ pat.setGroupingSize(2);
+ groupingSize = pat.getGroupingSize();
+ logln((UnicodeString)"Grouping size (should be 2): " + (int32_t) groupingSize);
+ if(groupingSize != 2) {
+ errln((UnicodeString)"ERROR: setGroupingSize() failed");
+ }
+
+ pat.setDecimalSeparatorAlwaysShown(TRUE);
+ UBool tf = pat.isDecimalSeparatorAlwaysShown();
+ logln((UnicodeString)"DecimalSeparatorIsAlwaysShown (should be TRUE) is " + (UnicodeString) (tf ? "TRUE" : "FALSE"));
+ if(tf != TRUE) {
+ errln((UnicodeString)"ERROR: setDecimalSeparatorAlwaysShown() failed");
+ }
+ // Added by Ken Liu testing set/isExponentSignAlwaysShown
+ pat.setExponentSignAlwaysShown(TRUE);
+ UBool esas = pat.isExponentSignAlwaysShown();
+ logln((UnicodeString)"ExponentSignAlwaysShown (should be TRUE) is " + (UnicodeString) (esas ? "TRUE" : "FALSE"));
+ if(esas != TRUE) {
+ errln((UnicodeString)"ERROR: ExponentSignAlwaysShown() failed");
+ }
+
+ // Added by Ken Liu testing set/isScientificNotation
+ pat.setScientificNotation(TRUE);
+ UBool sn = pat.isScientificNotation();
+ logln((UnicodeString)"isScientificNotation (should be TRUE) is " + (UnicodeString) (sn ? "TRUE" : "FALSE"));
+ if(sn != TRUE) {
+ errln((UnicodeString)"ERROR: setScientificNotation() failed");
+ }
+
+ // Added by Ken Liu testing set/getMinimumExponentDigits
+ int8_t MinimumExponentDigits = 0;
+ pat.setMinimumExponentDigits(2);
+ MinimumExponentDigits = pat.getMinimumExponentDigits();
+ logln((UnicodeString)"MinimumExponentDigits (should be 2) is " + (int8_t) MinimumExponentDigits);
+ if(MinimumExponentDigits != 2) {
+ errln((UnicodeString)"ERROR: setMinimumExponentDigits() failed");
+ }
+
+ // Added by Ken Liu testing set/getRoundingIncrement
+ double RoundingIncrement = 0.0;
+ pat.setRoundingIncrement(2.0);
+ RoundingIncrement = pat.getRoundingIncrement();
+ logln((UnicodeString)"RoundingIncrement (should be 2.0) is " + (double) RoundingIncrement);
+ if(RoundingIncrement != 2.0) {
+ errln((UnicodeString)"ERROR: setRoundingIncrement() failed");
+ }
+ //end of Ken's Adding
+
+ UnicodeString funkyPat;
+ funkyPat = pat.toPattern(funkyPat);
+ logln((UnicodeString)"Pattern is " + funkyPat);
+
+ UnicodeString locPat;
+ locPat = pat.toLocalizedPattern(locPat);
+ logln((UnicodeString)"Localized pattern is " + locPat);
+
+// ======= Test applyPattern()
+
+ logln((UnicodeString)"Testing applyPattern()");
+
+ UnicodeString p1("#,##0.0#;(#,##0.0#)");
+ logln((UnicodeString)"Applying pattern " + p1);
+ status = U_ZERO_ERROR;
+ pat.applyPattern(p1, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: applyPattern() failed with " + (int32_t) status);
+ }
+ UnicodeString s2;
+ s2 = pat.toPattern(s2);
+ logln((UnicodeString)"Extracted pattern is " + s2);
+ if(s2 != p1) {
+ errln((UnicodeString)"ERROR: toPattern() result did not match pattern applied");
+ }
+
+ if(pat.getSecondaryGroupingSize() != 0) {
+ errln("FAIL: Secondary Grouping Size should be 0, not %d\n", pat.getSecondaryGroupingSize());
+ }
+
+ if(pat.getGroupingSize() != 3) {
+ errln("FAIL: Primary Grouping Size should be 3, not %d\n", pat.getGroupingSize());
+ }
+
+ UnicodeString p2("#,##,##0.0# FF;(#,##,##0.0# FF)");
+ logln((UnicodeString)"Applying pattern " + p2);
+ status = U_ZERO_ERROR;
+ pat.applyLocalizedPattern(p2, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: applyPattern() failed with " + (int32_t) status);
+ }
+ UnicodeString s3;
+ s3 = pat.toLocalizedPattern(s3);
+ logln((UnicodeString)"Extracted pattern is " + s3);
+ if(s3 != p2) {
+ errln((UnicodeString)"ERROR: toLocalizedPattern() result did not match pattern applied");
+ }
+
+ status = U_ZERO_ERROR;
+ UParseError pe;
+ pat.applyLocalizedPattern(p2, pe, status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: applyPattern((with ParseError)) failed with " + (int32_t) status);
+ }
+ UnicodeString s4;
+ s4 = pat.toLocalizedPattern(s3);
+ logln((UnicodeString)"Extracted pattern is " + s4);
+ if(s4 != p2) {
+ errln((UnicodeString)"ERROR: toLocalizedPattern(with ParseErr) result did not match pattern applied");
+ }
+
+ if(pat.getSecondaryGroupingSize() != 2) {
+ errln("FAIL: Secondary Grouping Size should be 2, not %d\n", pat.getSecondaryGroupingSize());
+ }
+
+ if(pat.getGroupingSize() != 3) {
+ errln("FAIL: Primary Grouping Size should be 3, not %d\n", pat.getGroupingSize());
+ }
+
+// ======= Test getStaticClassID()
+
+ logln((UnicodeString)"Testing getStaticClassID()");
+
+ status = U_ZERO_ERROR;
+ NumberFormat *test = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Couldn't create a DecimalFormat");
+ }
+
+ if(test->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln((UnicodeString)"ERROR: getDynamicClassID() didn't return the expected value");
+ }
+
+ delete test;
+}
+
+void IntlTestDecimalFormatAPI::testRounding(/*char *par*/)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ double Roundingnumber = 2.55;
+ double Roundingnumber1 = -2.55;
+ //+2.55 results -2.55 results
+ double result[]={ 3.0, -2.0, // kRoundCeiling 0,
+ 2.0, -3.0, // kRoundFloor 1,
+ 2.0, -2.0, // kRoundDown 2,
+ 3.0, -3.0, // kRoundUp 3,
+ 3.0, -3.0, // kRoundHalfEven 4,
+ 3.0, -3.0, // kRoundHalfDown 5,
+ 3.0, -3.0 // kRoundHalfUp 6
+ };
+ DecimalFormat pat(status);
+ if(U_FAILURE(status)) {
+ errln((UnicodeString)"ERROR: Could not create DecimalFormat (default)");
+ return;
+ }
+ uint16_t mode;
+ uint16_t i=0;
+ UnicodeString message;
+ UnicodeString resultStr;
+ for(mode=0;mode < 7;mode++){
+ pat.setRoundingMode((DecimalFormat::ERoundingMode)mode);
+ if(pat.getRoundingMode() != (DecimalFormat::ERoundingMode)mode){
+ errln((UnicodeString)"SetRoundingMode or GetRoundingMode failed for mode=" + mode);
+ }
+
+
+ //for +2.55 with RoundingIncrement=1.0
+ pat.setRoundingIncrement(1.0);
+ pat.format(Roundingnumber, resultStr);
+ message= (UnicodeString)"round(" + (double)Roundingnumber + UnicodeString(",") + mode + UnicodeString(",FALSE) with RoundingIncrement=1.0==>");
+ verify(message, resultStr, result[i++]);
+ message.remove();
+ resultStr.remove();
+
+ //for -2.55 with RoundingIncrement=1.0
+ pat.format(Roundingnumber1, resultStr);
+ message= (UnicodeString)"round(" + (double)Roundingnumber1 + UnicodeString(",") + mode + UnicodeString(",FALSE) with RoundingIncrement=1.0==>");
+ verify(message, resultStr, result[i++]);
+ message.remove();
+ resultStr.remove();
+ }
+
+}
+void IntlTestDecimalFormatAPI::verify(const UnicodeString& message, const UnicodeString& got, double expected){
+ logln((UnicodeString)message + got + (UnicodeString)" Expected : " + expected);
+ UnicodeString expectedStr("");
+ expectedStr=expectedStr + expected;
+ if(got != expectedStr ) {
+ errln((UnicodeString)"ERROR: Round() failed: " + message + got + (UnicodeString)" Expected : " + expectedStr);
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.h b/Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.h
new file mode 100644
index 00000000000..841b7942d98
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dcfmapts.h
@@ -0,0 +1,35 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef _INTLTESTDECIMALFORMATAPI
+#define _INTLTESTDECIMALFORMATAPI
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "intltest.h"
+
+
+class IntlTestDecimalFormatAPI: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+public:
+ /**
+ * Tests basic functionality of various API functions for DecimalFormat
+ **/
+ void testAPI(/*char *par*/);
+ void testRounding(/*char *par*/);
+private:
+ /*Helper functions */
+ void verify(const UnicodeString& message, const UnicodeString& got, double expected);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/decoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/decoll.cpp
new file mode 100644
index 00000000000..0b84d2576aa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/decoll.cpp
@@ -0,0 +1,146 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "decoll.h"
+
+#ifndef _COLL
+#include "unicode/coll.h"
+#endif
+
+#ifndef _TBLCOLL
+#include "unicode/tblcoll.h"
+#endif
+
+#ifndef _UNISTR
+#include "unicode/unistr.h"
+#endif
+
+#ifndef _SORTKEY
+#include "unicode/sortkey.h"
+#endif
+
+#ifndef _DECOLL
+#include "decoll.h"
+#endif
+
+#include "sfwdchit.h"
+
+CollationGermanTest::CollationGermanTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance(Locale::getGermany(), status);
+ if(!myCollation || U_FAILURE(status)) {
+ errln(__FILE__ "failed to create! err " + UnicodeString(u_errorName(status)));
+ /* if it wasn't already: */
+ delete myCollation;
+ myCollation = NULL;
+ }
+}
+
+CollationGermanTest::~CollationGermanTest()
+{
+ delete myCollation;
+}
+
+const UChar CollationGermanTest::testSourceCases[][CollationGermanTest::MAX_TOKEN_LEN] =
+{
+ {0x47, 0x72, 0x00F6, 0x00DF, 0x65, 0},
+ {0x61, 0x62, 0x63, 0},
+ {0x54, 0x00F6, 0x6e, 0x65, 0},
+ {0x54, 0x00F6, 0x6e, 0x65, 0},
+ {0x54, 0x00F6, 0x6e, 0x65, 0},
+ {0x61, 0x0308, 0x62, 0x63, 0},
+ {0x00E4, 0x62, 0x63, 0},
+ {0x00E4, 0x62, 0x63, 0},
+ {0x53, 0x74, 0x72, 0x61, 0x00DF, 0x65, 0},
+ {0x65, 0x66, 0x67, 0},
+ {0x00E4, 0x62, 0x63, 0},
+ {0x53, 0x74, 0x72, 0x61, 0x00DF, 0x65, 0}
+};
+
+const UChar CollationGermanTest::testTargetCases[][CollationGermanTest::MAX_TOKEN_LEN] =
+{
+ {0x47, 0x72, 0x6f, 0x73, 0x73, 0x69, 0x73, 0x74, 0},
+ {0x61, 0x0308, 0x62, 0x63, 0},
+ {0x54, 0x6f, 0x6e, 0},
+ {0x54, 0x6f, 0x64, 0},
+ {0x54, 0x6f, 0x66, 0x75, 0},
+ {0x41, 0x0308, 0x62, 0x63, 0},
+ {0x61, 0x0308, 0x62, 0x63, 0},
+ {0x61, 0x65, 0x62, 0x63, 0},
+ {0x53, 0x74, 0x72, 0x61, 0x73, 0x73, 0x65, 0},
+ {0x65, 0x66, 0x67, 0},
+ {0x61, 0x65, 0x62, 0x63, 0},
+ {0x53, 0x74, 0x72, 0x61, 0x73, 0x73, 0x65, 0}
+};
+
+const Collator::EComparisonResult CollationGermanTest::results[][2] =
+{
+ // Primary Tertiary
+ { Collator::LESS, Collator::LESS },
+ { Collator::EQUAL, Collator::LESS },
+ { Collator::GREATER, Collator::GREATER },
+ { Collator::GREATER, Collator::GREATER },
+ { Collator::GREATER, Collator::GREATER },
+ { Collator::EQUAL, Collator::LESS },
+ { Collator::EQUAL, Collator::EQUAL },
+ { Collator::LESS, Collator::LESS },
+ { Collator::EQUAL, Collator::GREATER },
+ { Collator::EQUAL, Collator::EQUAL },
+ { Collator::LESS, Collator::LESS },
+ { Collator::EQUAL, Collator::GREATER }
+};
+
+
+void CollationGermanTest::TestTertiary(/* char* par */)
+{
+ if(myCollation == NULL ) {
+ errln("decoll: cannot start test, collator is null\n");
+ return;
+ }
+
+ int32_t i = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation->setStrength(Collator::TERTIARY);
+ myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ for (i = 0; i < 12 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i][1]);
+ }
+}
+void CollationGermanTest::TestPrimary(/* char* par */)
+{
+ if(myCollation == NULL ) {
+ errln("decoll: cannot start test, collator is null\n");
+ return;
+ }
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation->setStrength(Collator::PRIMARY);
+ myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ for (i = 0; i < 12 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i][0]);
+ }
+}
+
+void CollationGermanTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationGermanTest: ");
+ switch (index)
+ {
+ case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break;
+ case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/decoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/decoll.h
new file mode 100644
index 00000000000..19513e1bf4f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/decoll.h
@@ -0,0 +1,50 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationGermanTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, o-umlaut
+ * is sorted with expanding char e.
+ */
+#ifndef _DECOLL
+#define _DECOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationGermanTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationGermanTest();
+ virtual ~CollationGermanTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // perform test with strength PRIMARY
+ void TestPrimary(/* char* par */);
+
+ // perform test with strength SECONDARY
+ void TestSecondary(/* char* par */);
+
+ // perform tests with strength TERTIARY
+ void TestTertiary(/* char* par */);
+
+private:
+ static const UChar testSourceCases[][MAX_TOKEN_LEN];
+ static const UChar testTargetCases[][MAX_TOKEN_LEN];
+ static const Collator::EComparisonResult results[][2];
+
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.cpp
new file mode 100644
index 00000000000..db443f1e446
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.cpp
@@ -0,0 +1,354 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "dtfmapts.h"
+
+#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/decimfmt.h"
+#include "unicode/choicfmt.h"
+#include "unicode/msgfmt.h"
+
+
+// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
+// try to test the full functionality. It just calls each function in the class and
+// verifies that it works on a basic level.
+
+void IntlTestDateFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite DateFormatAPI");
+ switch (index) {
+ case 0: name = "DateFormat API test";
+ if (exec) {
+ logln("DateFormat API test---"); logln("");
+ UErrorCode status = U_ZERO_ERROR;
+ Locale saveLocale;
+ Locale::setDefault(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not set default locale, test may not give correct results");
+ }
+ testAPI(/*par*/);
+ Locale::setDefault(saveLocale, status);
+ }
+ break;
+
+ case 1: name = "TestEquals";
+ if (exec) {
+ logln("TestEquals---"); logln("");
+ TestEquals();
+ }
+ break;
+
+ case 2: name = "TestNameHiding";
+ if (exec) {
+ logln("TestNameHiding---"); logln("");
+ TestNameHiding();
+ }
+ break;
+
+ default: name = ""; break;
+ }
+}
+
+/**
+ * Test that the equals method works correctly.
+ */
+void IntlTestDateFormatAPI::TestEquals(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ // Create two objects at different system times
+ DateFormat *a = DateFormat::createInstance();
+ UDate start = Calendar::getNow();
+ while (Calendar::getNow() == start) ; // Wait for time to change
+ DateFormat *b = DateFormat::createInstance();
+
+ if (a == NULL || b == NULL){
+ dataerrln("Error calling DateFormat::createInstance()");
+ delete a;
+ delete b;
+ return;
+ }
+
+ if (!(*a == *b))
+ errln("FAIL: DateFormat objects created at different times are unequal.");
+
+ if (b->getDynamicClassID() == SimpleDateFormat::getStaticClassID())
+ {
+ double ONE_YEAR = 365*24*60*60*1000.0;
+ ((SimpleDateFormat*)b)->set2DigitYearStart(start + 50*ONE_YEAR, status);
+ if (U_FAILURE(status))
+ errln("FAIL: setTwoDigitStartDate failed.");
+ else if (*a == *b)
+ errln("FAIL: DateFormat objects with different two digit start dates are equal.");
+ }
+ delete a;
+ delete b;
+}
+
+/**
+ * This test checks various generic API methods in DateFormat to achieve 100%
+ * API coverage.
+ */
+void IntlTestDateFormatAPI::testAPI(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+// ======= Test constructors
+
+ logln("Testing DateFormat constructors");
+
+ DateFormat *def = DateFormat::createInstance();
+ DateFormat *fr = DateFormat::createTimeInstance(DateFormat::FULL, Locale::getFrench());
+ DateFormat *it = DateFormat::createDateInstance(DateFormat::MEDIUM, Locale::getItalian());
+ DateFormat *de = DateFormat::createDateTimeInstance(DateFormat::LONG, DateFormat::LONG, Locale::getGerman());
+
+ if (def == NULL || fr == NULL || it == NULL || de == NULL){
+ dataerrln("Error creating instnaces.");
+ }
+
+// ======= Test equality
+if (fr != NULL && def != NULL)
+{
+ logln("Testing equality operator");
+
+ if( *fr == *it ) {
+ errln("ERROR: == failed");
+ }
+}
+
+// ======= Test various format() methods
+if (fr != NULL && it != NULL && de != NULL)
+{
+ logln("Testing various format() methods");
+
+ UDate d = 837039928046.0;
+ Formattable fD(d, Formattable::kIsDate);
+
+ UnicodeString res1, res2, res3;
+ FieldPosition pos1(0), pos2(0);
+
+ status = U_ZERO_ERROR;
+ res1 = fr->format(d, res1, pos1, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: format() failed (French)");
+ }
+ logln( (UnicodeString) "" + d + " formatted to " + res1);
+
+ res2 = it->format(d, res2, pos2);
+ logln( (UnicodeString) "" + d + " formatted to " + res2);
+
+ res3 = de->format(d, res3);
+ logln( (UnicodeString) "" + d + " formatted to " + res3);
+}
+
+// ======= Test parse()
+if (def != NULL)
+{
+ logln("Testing parse()");
+
+ UnicodeString text("02/03/76 2:50 AM, CST");
+ Formattable result1;
+ UDate result2, result3;
+ ParsePosition pos(0), pos01(0);
+ def->parseObject(text, result1, pos);
+ if(result1.getType() != Formattable::kDate) {
+ errln("ERROR: parseObject() failed for " + text);
+ }
+ logln(text + " parsed into " + result1.getDate());
+
+ status = U_ZERO_ERROR;
+ result2 = def->parse(text, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: parse() failed, stopping testing");
+ return;
+ }
+ logln(text + " parsed into " + result2);
+
+ result3 = def->parse(text, pos01);
+ logln(text + " parsed into " + result3);
+}
+
+// ======= Test getters and setters
+if (fr != NULL && it != NULL && de != NULL)
+{
+ logln("Testing getters and setters");
+
+ int32_t count = 0;
+ const Locale *locales = DateFormat::getAvailableLocales(count);
+ logln((UnicodeString) "Got " + count + " locales" );
+ for(int32_t i = 0; i < count; i++) {
+ UnicodeString name;
+ name = locales[i].getName();
+ logln(name);
+ }
+
+ fr->setLenient(it->isLenient());
+ if(fr->isLenient() != it->isLenient()) {
+ errln("ERROR: setLenient() failed");
+ }
+
+ const Calendar *cal = def->getCalendar();
+ Calendar *newCal = cal->clone();
+ de->adoptCalendar(newCal);
+ it->setCalendar(*newCal);
+ if( *(de->getCalendar()) != *(it->getCalendar())) {
+ errln("ERROR: adopt or set Calendar() failed");
+ }
+
+ const NumberFormat *nf = def->getNumberFormat();
+ NumberFormat *newNf = (NumberFormat*) nf->clone();
+ de->adoptNumberFormat(newNf);
+ it->setNumberFormat(*newNf);
+ if( *(de->getNumberFormat()) != *(it->getNumberFormat())) {
+ errln("ERROR: adopt or set NumberFormat() failed");
+ }
+
+ const TimeZone& tz = def->getTimeZone();
+ TimeZone *newTz = tz.clone();
+ de->adoptTimeZone(newTz);
+ it->setTimeZone(*newTz);
+ if( de->getTimeZone() != it->getTimeZone()) {
+ errln("ERROR: adopt or set TimeZone() failed");
+ }
+}
+// ======= Test getStaticClassID()
+
+ logln("Testing getStaticClassID()");
+
+ status = U_ZERO_ERROR;
+ DateFormat *test = new SimpleDateFormat(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create a DateFormat");
+ }
+
+ if(test->getDynamicClassID() != SimpleDateFormat::getStaticClassID()) {
+ errln("ERROR: getDynamicClassID() didn't return the expected value");
+ }
+
+ delete test;
+ delete def;
+ delete fr;
+ delete it;
+ delete de;
+}
+
+/**
+ * Test hiding of parse() and format() APIs in the Format hierarchy.
+ * We test the entire hierarchy, even though this test is located in
+ * the DateFormat API test.
+ */
+void
+IntlTestDateFormatAPI::TestNameHiding(void) {
+
+ // N.B.: This test passes if it COMPILES, since it's a test of
+ // compile-time name hiding.
+
+ UErrorCode status = U_ZERO_ERROR;
+ Formattable dateObj(0, Formattable::kIsDate);
+ Formattable numObj(3.1415926535897932384626433832795);
+ Formattable obj;
+ UnicodeString str;
+ FieldPosition fpos;
+ ParsePosition ppos;
+
+ // DateFormat calling Format API
+ {
+ logln("DateFormat");
+ DateFormat *dateFmt = DateFormat::createInstance();
+ if (dateFmt) {
+ dateFmt->format(dateObj, str, status);
+ dateFmt->format(dateObj, str, fpos, status);
+ delete dateFmt;
+ } else {
+ errln("FAIL: Can't create DateFormat");
+ }
+ }
+
+ // SimpleDateFormat calling Format & DateFormat API
+ {
+ logln("SimpleDateFormat");
+ status = U_ZERO_ERROR;
+ SimpleDateFormat sdf(status);
+ // Format API
+ sdf.format(dateObj, str, status);
+ sdf.format(dateObj, str, fpos, status);
+ // DateFormat API
+ sdf.format((UDate)0, str, fpos);
+ sdf.format((UDate)0, str);
+ sdf.parse(str, status);
+ sdf.parse(str, ppos);
+ }
+
+ // NumberFormat calling Format API
+ {
+ logln("NumberFormat");
+ status = U_ZERO_ERROR;
+ NumberFormat *fmt = NumberFormat::createInstance(status);
+ if (fmt) {
+ fmt->format(numObj, str, status);
+ fmt->format(numObj, str, fpos, status);
+ delete fmt;
+ } else {
+ errln("FAIL: Can't create NumberFormat()");
+ }
+ }
+
+ // DecimalFormat calling Format & NumberFormat API
+ {
+ logln("DecimalFormat");
+ status = U_ZERO_ERROR;
+ DecimalFormat fmt(status);
+ if(U_SUCCESS(status)) {
+ // Format API
+ fmt.format(numObj, str, status);
+ fmt.format(numObj, str, fpos, status);
+ // NumberFormat API
+ fmt.format(2.71828, str);
+ fmt.format((int32_t)1234567, str);
+ fmt.format(1.41421, str, fpos);
+ fmt.format((int32_t)9876543, str, fpos);
+ fmt.parse(str, obj, ppos);
+ fmt.parse(str, obj, status);
+ } else {
+ errln("FAIL: Couldn't instantiate DecimalFormat, error %s. Quitting test", u_errorName(status));
+ }
+ }
+
+ // ChoiceFormat calling Format & NumberFormat API
+ {
+ logln("ChoiceFormat");
+ status = U_ZERO_ERROR;
+ ChoiceFormat fmt("0#foo|1#foos|2#foos", status);
+ // Format API
+ fmt.format(numObj, str, status);
+ fmt.format(numObj, str, fpos, status);
+ // NumberFormat API
+ fmt.format(2.71828, str);
+ fmt.format((int32_t)1234567, str);
+ fmt.format(1.41421, str, fpos);
+ fmt.format((int32_t)9876543, str, fpos);
+ fmt.parse(str, obj, ppos);
+ fmt.parse(str, obj, status);
+ }
+
+ // MessageFormat calling Format API
+ {
+ logln("MessageFormat");
+ status = U_ZERO_ERROR;
+ MessageFormat fmt("", status);
+ // Format API
+ // We use dateObj, which MessageFormat should reject.
+ // We're testing name hiding, not the format method.
+ fmt.format(dateObj, str, status);
+ fmt.format(dateObj, str, fpos, status);
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.h b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.h
new file mode 100644
index 00000000000..e8a109a578b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmapts.h
@@ -0,0 +1,43 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTDATEFORMATAPI
+#define _INTLTESTDATEFORMATAPI
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+
+/*
+ * This is an API test, not a unit test. It doesn't test very many cases, and doesn't
+ * try to test the full functionality. It just calls each function in the class and
+ * verifies that it works on a basic level.
+ */
+class IntlTestDateFormatAPI: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+ /**
+ * Tests basic functionality of various generic API methods in DateFormat
+ */
+ void testAPI(/* char* par */);
+ /**
+ * Test that the equals method works correctly.
+ */
+ void TestEquals(void);
+
+ /**
+ * Test that no parse or format methods are hidden.
+ */
+ void TestNameHiding(void);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.cpp
new file mode 100644
index 00000000000..96385f40176
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.cpp
@@ -0,0 +1,1461 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "dtfmrgts.h"
+
+#include "unicode/timezone.h"
+#include "unicode/gregocal.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/datefmt.h"
+#include "unicode/simpletz.h"
+#include "unicode/resbund.h"
+
+// *****************************************************************************
+// class DateFormatRegressionTest
+// *****************************************************************************
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+void
+DateFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite DateFormatRegressionTest");
+ switch (index) {
+ CASE(0,Test4029195)
+ CASE(1,Test4052408)
+ CASE(2,Test4056591)
+ CASE(3,Test4059917)
+ CASE(4,Test4060212)
+ CASE(5,Test4061287)
+ CASE(6,Test4065240)
+ CASE(7,Test4071441)
+ CASE(8,Test4073003)
+ CASE(9,Test4089106)
+ CASE(10,Test4100302)
+ CASE(11,Test4101483)
+ CASE(12,Test4103340)
+ CASE(13,Test4103341)
+ CASE(14,Test4104136)
+ CASE(15,Test4104522)
+ CASE(16,Test4106807)
+ CASE(17,Test4108407)
+ CASE(18,Test4134203)
+ CASE(19,Test4151631)
+ CASE(20,Test4151706)
+ CASE(21,Test4162071)
+ CASE(22,Test4182066)
+ CASE(23,Test4210209)
+ CASE(24,Test714)
+ CASE(25,Test1684)
+ CASE(26,Test5554)
+ default: name = ""; break;
+ }
+}
+
+/**
+ * @bug 4029195
+ */
+void DateFormatRegressionTest::Test4029195(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ UDate today = Calendar::getNow();
+ logln((UnicodeString) "today: " + today);
+
+ SimpleDateFormat *sdf = (SimpleDateFormat*) DateFormat::createDateInstance();
+ if (failure(status, "SimpleDateFormat::createDateInstance")) {
+ return;
+ }
+ UnicodeString pat;
+ if(sdf == NULL){
+ dataerrln("Error calling DateFormat::createDateTimeInstance");
+ return;
+ }
+
+ pat = sdf->toPattern(pat);
+ logln("pattern: " + pat);
+ UnicodeString fmtd;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ fmtd = sdf->format(today, fmtd, pos);
+ logln("today: " + fmtd);
+
+ sdf->applyPattern("G yyyy DDD");
+ UnicodeString todayS;
+ todayS = sdf->format(today, todayS, pos);
+ logln("today: " + todayS);
+ //try {
+ today = sdf->parse(todayS, status);
+ failure(status, "sdf->parse");
+ logln((UnicodeString)"today date: " + today);
+ /*} catch(Exception e) {
+ logln("Error reparsing date: " + e.getMessage());
+ }*/
+
+ //try {
+ UnicodeString rt;
+ rt = sdf->format(sdf->parse(todayS, status), rt, pos);
+ failure(status, "sdf->parse");
+ logln("round trip: " + rt);
+ if(rt != todayS)
+ errln("Fail: Want " + todayS + " Got " + rt);
+ /*}
+ catch (ParseException e) {
+ errln("Fail: " + e);
+ e.printStackTrace();
+ }*/
+
+ delete sdf;
+}
+
+/**
+ * @bug 4052408
+ */
+void DateFormatRegressionTest::Test4052408(void)
+{
+
+ DateFormat *fmt = DateFormat::createDateTimeInstance(DateFormat::SHORT,
+ DateFormat::SHORT, Locale::getUS());
+ if (fmt == NULL) {
+ dataerrln("Error calling DateFormat::createDateTimeInstance");
+ return;
+ }
+
+ UDate dt = date(97, UCAL_MAY, 3, 8, 55);
+ UnicodeString str;
+ str = fmt->format(dt, str);
+ logln(str);
+
+ if(str != "5/3/97 8:55 AM")
+ errln("Fail: Test broken; Want 5/3/97 8:55 AM Got " + str);
+
+ UnicodeString expected[] = {
+ (UnicodeString) "", //"ERA_FIELD",
+ (UnicodeString) "97", //"YEAR_FIELD",
+ (UnicodeString) "5", //"MONTH_FIELD",
+ (UnicodeString) "3", //"DATE_FIELD",
+ (UnicodeString) "", //"HOUR_OF_DAY1_FIELD",
+ (UnicodeString) "", //"HOUR_OF_DAY0_FIELD",
+ (UnicodeString) "55", //"MINUTE_FIELD",
+ (UnicodeString) "", //"SECOND_FIELD",
+ (UnicodeString) "", //"MILLISECOND_FIELD",
+ (UnicodeString) "", //"DAY_OF_WEEK_FIELD",
+ (UnicodeString) "", //"DAY_OF_YEAR_FIELD",
+ (UnicodeString) "", //"DAY_OF_WEEK_IN_MONTH_FIELD",
+ (UnicodeString) "", //"WEEK_OF_YEAR_FIELD",
+ (UnicodeString) "", //"WEEK_OF_MONTH_FIELD",
+ (UnicodeString) "AM", //"AM_PM_FIELD",
+ (UnicodeString) "8", //"HOUR1_FIELD",
+ (UnicodeString) "", //"HOUR0_FIELD",
+ (UnicodeString) "" //"TIMEZONE_FIELD"
+ };
+
+ //Hashtable expected;// = new Hashtable();
+ //expected.put(new LongKey(DateFormat.MONTH_FIELD), "5");
+ //expected.put(new LongKey(DateFormat.DATE_FIELD), "3");
+ //expected.put(new LongKey(DateFormat.YEAR_FIELD), "97");
+ //expected.put(new LongKey(DateFormat.HOUR1_FIELD), "8");
+ //expected.put(new LongKey(DateFormat.MINUTE_FIELD), "55");
+ //expected.put(new LongKey(DateFormat.AM_PM_FIELD), "AM");
+
+ //StringBuffer buf = new StringBuffer();
+ UnicodeString fieldNames[] = {
+ (UnicodeString) "ERA_FIELD",
+ (UnicodeString) "YEAR_FIELD",
+ (UnicodeString) "MONTH_FIELD",
+ (UnicodeString) "DATE_FIELD",
+ (UnicodeString) "HOUR_OF_DAY1_FIELD",
+ (UnicodeString) "HOUR_OF_DAY0_FIELD",
+ (UnicodeString) "MINUTE_FIELD",
+ (UnicodeString) "SECOND_FIELD",
+ (UnicodeString) "MILLISECOND_FIELD",
+ (UnicodeString) "DAY_OF_WEEK_FIELD",
+ (UnicodeString) "DAY_OF_YEAR_FIELD",
+ (UnicodeString) "DAY_OF_WEEK_IN_MONTH_FIELD",
+ (UnicodeString) "WEEK_OF_YEAR_FIELD",
+ (UnicodeString) "WEEK_OF_MONTH_FIELD",
+ (UnicodeString) "AM_PM_FIELD",
+ (UnicodeString) "HOUR1_FIELD",
+ (UnicodeString) "HOUR0_FIELD",
+ (UnicodeString) "TIMEZONE_FIELD"
+ };
+
+ UBool pass = TRUE;
+ for(int i = 0; i <= 17; ++i) {
+ FieldPosition pos(i);
+ UnicodeString buf;
+ fmt->format(dt, buf, pos);
+ //char[] dst = new char[pos.getEndIndex() - pos.getBeginIndex()];
+ UnicodeString dst;
+ buf.extractBetween(pos.getBeginIndex(), pos.getEndIndex(), dst);
+ UnicodeString str(dst);
+ logln((UnicodeString)"" + i + (UnicodeString)": " + fieldNames[i] +
+ (UnicodeString)", \"" + str + (UnicodeString)"\", " +
+ pos.getBeginIndex() + (UnicodeString)", " +
+ pos.getEndIndex());
+ UnicodeString exp = expected[i];
+ if((exp.length() == 0 && str.length() == 0) || str == exp)
+ logln(" ok");
+ else {
+ errln(UnicodeString(" expected ") + exp);
+ pass = FALSE;
+ }
+
+ }
+ if( ! pass)
+ errln("Fail: FieldPosition not set right by DateFormat");
+
+ delete fmt;
+}
+
+/**
+ * @bug 4056591
+ * Verify the function of the [s|g]et2DigitYearStart() API.
+ */
+void DateFormatRegressionTest::Test4056591(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ //try {
+ SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("yyMMdd"), Locale::getUS(), status);
+ failure(status, "new SimpleDateFormat");
+ UDate start = date(1809-1900, UCAL_DECEMBER, 25);
+ fmt->set2DigitYearStart(start, status);
+ failure(status, "fmt->setTwoDigitStartDate");
+ if( (fmt->get2DigitYearStart(status) != start) || failure(status, "get2DigitStartDate"))
+ errln("get2DigitYearStart broken");
+ UDate dates [] = {
+ date(1809-1900, UCAL_DECEMBER, 25),
+ date(1909-1900, UCAL_DECEMBER, 24),
+ date(1809-1900, UCAL_DECEMBER, 26),
+ date(1861-1900, UCAL_DECEMBER, 25),
+ };
+
+ UnicodeString strings [] = {
+ (UnicodeString) "091225",
+ (UnicodeString) "091224",
+ (UnicodeString) "091226",
+ (UnicodeString) "611225"
+ };
+
+ /*Object[] DATA = {
+ "091225", new Date(1809-1900, Calendar.DECEMBER, 25),
+ "091224", new Date(1909-1900, Calendar.DECEMBER, 24),
+ "091226", new Date(1809-1900, Calendar.DECEMBER, 26),
+ "611225", new Date(1861-1900, Calendar.DECEMBER, 25),
+ };*/
+
+ for(int i = 0; i < 4; i++) {
+ UnicodeString s = strings[i];
+ UDate exp = dates[i];
+ UDate got = fmt->parse(s, status);
+ failure(status, "fmt->parse");
+ logln(s + " -> " + got + "; exp " + exp);
+ if(got != exp)
+ errln("set2DigitYearStart broken");
+ }
+ /*}
+ catch (ParseException e) {
+ errln("Fail: " + e);
+ e.printStackTrace();
+ }*/
+
+ delete fmt;
+}
+
+/**
+ * @bug 4059917
+ */
+void DateFormatRegressionTest::Test4059917(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ SimpleDateFormat *fmt;
+ UnicodeString myDate;
+
+ fmt = new SimpleDateFormat( UnicodeString("yyyy/MM/dd"), status );
+ if(failure(status, "new SimpleDateFormat")) return;
+ myDate = "1997/01/01";
+ aux917( fmt, myDate );
+
+ delete fmt;
+ fmt = NULL;
+
+ fmt = new SimpleDateFormat( UnicodeString("yyyyMMdd"), status );
+ if(failure(status, "new SimpleDateFormat")) return;
+ myDate = "19970101";
+ aux917( fmt, myDate );
+
+ delete fmt;
+}
+
+void DateFormatRegressionTest::aux917( SimpleDateFormat *fmt, UnicodeString& str ) {
+ //try {
+ UnicodeString pat;
+ pat = fmt->toPattern(pat);
+ logln( "==================" );
+ logln( "testIt: pattern=" + pat +
+ " string=" + str );
+
+
+ Formattable o;
+ //Object o;
+ ParsePosition pos(0);
+ fmt->parseObject( str, o, pos );
+ //logln( UnicodeString("Parsed object: ") + o );
+
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString formatted;
+ FieldPosition poss(FieldPosition::DONT_CARE);
+ formatted = fmt->format( o, formatted, poss, status );
+ failure(status, "fmt->format");
+ logln( "Formatted string: " + formatted );
+ if( formatted != str)
+ errln("Fail: Want " + str + " Got " + formatted);
+ /*}
+ catch (ParseException e) {
+ errln("Fail: " + e);
+ e.printStackTrace();
+ }*/
+}
+
+/**
+ * @bug 4060212
+ */
+void DateFormatRegressionTest::Test4060212(void)
+{
+ UnicodeString dateString = "1995-040.05:01:29";
+
+ logln( "dateString= " + dateString );
+ logln("Using yyyy-DDD.hh:mm:ss");
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *formatter = new SimpleDateFormat(UnicodeString("yyyy-DDD.hh:mm:ss"), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ ParsePosition pos(0);
+ UDate myDate = formatter->parse( dateString, pos );
+ UnicodeString myString;
+ DateFormat *fmt = DateFormat::createDateTimeInstance( DateFormat::FULL,
+ DateFormat::LONG);
+ if (fmt == NULL) {
+ dataerrln("Error calling DateFormat::createDateTimeInstance");
+ delete formatter;
+ return;
+ }
+
+ myString = fmt->format( myDate, myString);
+ logln( myString );
+
+ Calendar *cal = new GregorianCalendar(status);
+ failure(status, "new GregorianCalendar");
+ cal->setTime(myDate, status);
+ failure(status, "cal->setTime");
+ if ((cal->get(UCAL_DAY_OF_YEAR, status) != 40) || failure(status, "cal->get"))
+ errln((UnicodeString) "Fail: Got " + cal->get(UCAL_DAY_OF_YEAR, status) +
+ " Want 40");
+
+ logln("Using yyyy-ddd.hh:mm:ss");
+ delete formatter;
+ formatter = NULL;
+ formatter = new SimpleDateFormat(UnicodeString("yyyy-ddd.hh:mm:ss"), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ pos.setIndex(0);
+ myDate = formatter->parse( dateString, pos );
+ myString = fmt->format( myDate, myString );
+ logln( myString );
+ cal->setTime(myDate, status);
+ failure(status, "cal->setTime");
+ if ((cal->get(UCAL_DAY_OF_YEAR, status) != 40) || failure(status, "cal->get"))
+ errln((UnicodeString) "Fail: Got " + cal->get(UCAL_DAY_OF_YEAR, status) +
+ " Want 40");
+
+ delete formatter;
+ delete fmt;
+ delete cal;
+}
+
+/**
+ * @bug 4061287
+ */
+void DateFormatRegressionTest::Test4061287(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("dd/MM/yyyy"), status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat, error: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new SimpleDateFormat");
+ //try {
+ logln(UnicodeString("") + df->parse("35/01/1971", status));
+ failure(status, "df->parse");
+ //logln(df.parse("35/01/1971").toString());
+ //}
+ /*catch (ParseException e) {
+ errln("Fail: " + e);
+ e.printStackTrace();
+ }*/
+ df->setLenient(FALSE);
+ UBool ok = FALSE;
+ //try {
+ logln(UnicodeString("") + df->parse("35/01/1971", status));
+ if(U_FAILURE(status))
+ ok = TRUE;
+ //logln(df.parse("35/01/1971").toString());
+ //} catch (ParseException e) {ok=TRUE;}
+ if(!ok)
+ errln("Fail: Lenient not working");
+ delete df;
+}
+
+/**
+ * @bug 4065240
+ */
+void DateFormatRegressionTest::Test4065240(void)
+{
+ UDate curDate;
+ DateFormat *shortdate, *fulldate;
+ UnicodeString strShortDate, strFullDate;
+ Locale saveLocale = Locale::getDefault();
+ TimeZone *saveZone = TimeZone::createDefault();
+
+ UErrorCode status = U_ZERO_ERROR;
+ //try {
+ Locale *curLocale = new Locale("de","DE");
+ Locale::setDefault(*curLocale, status);
+ failure(status, "Locale::setDefault");
+ // {sfb} adoptDefault instead of setDefault
+ //TimeZone::setDefault(TimeZone::createTimeZone("EST"));
+ TimeZone::adoptDefault(TimeZone::createTimeZone("EST"));
+ curDate = date(98, 0, 1);
+ shortdate = DateFormat::createDateInstance(DateFormat::SHORT);
+ if (shortdate == NULL){
+ dataerrln("Error calling DateFormat::createDateInstance");
+ return;
+ }
+
+ fulldate = DateFormat::createDateTimeInstance(DateFormat::LONG, DateFormat::LONG);
+ if (fulldate == NULL){
+ dataerrln("Error calling DateFormat::createDateTimeInstance");
+ return;
+ }
+ strShortDate = "The current date (short form) is ";
+ UnicodeString temp;
+ temp = shortdate->format(curDate, temp);
+ strShortDate += temp;
+ strFullDate = "The current date (long form) is ";
+ UnicodeString temp2;
+ fulldate->format(curDate, temp2);
+ strFullDate += temp2;
+
+ logln(strShortDate);
+ logln(strFullDate);
+
+ // {sfb} What to do with resource bundle stuff?????
+
+ // Check to see if the resource is present; if not, we can't test
+ ResourceBundle *bundle = new ResourceBundle(
+ NULL, *curLocale, status);
+ failure(status, "new ResourceBundle");
+ //(UnicodeString) "java.text.resources.DateFormatZoneData", curLocale);
+
+ // {sfb} API change to ResourceBundle -- add getLocale()
+ /*if (bundle->getLocale().getLanguage(temp) == UnicodeString("de")) {
+ // UPDATE THIS AS ZONE NAME RESOURCE FOR <EST> in de_DE is updated
+ if (!strFullDate.endsWith(UnicodeString("GMT-05:00")))
+ errln("Fail: Want GMT-05:00");
+ }
+ else {
+ logln("*** TEST COULD NOT BE COMPLETED BECAUSE DateFormatZoneData ***");
+ logln("*** FOR LOCALE de OR de_DE IS MISSING ***");
+ }*/
+ //}
+ //finally {
+ Locale::setDefault(saveLocale, status);
+ failure(status, "Locale::setDefault");
+ TimeZone::setDefault(*saveZone);
+ //}
+ delete shortdate;
+ delete fulldate;
+ delete saveZone;
+ delete curLocale;
+ delete bundle;
+}
+
+/*
+ DateFormat.equals is too narrowly defined. As a result, MessageFormat
+ does not work correctly. DateFormat.equals needs to be written so
+ that the Calendar sub-object is not compared using Calendar.equals,
+ but rather compared for equivalency. This may necessitate adding a
+ (package private) method to Calendar to test for equivalency.
+
+ Currently this bug breaks MessageFormat.toPattern
+ */
+/**
+ * @bug 4071441
+ */
+void DateFormatRegressionTest::Test4071441(void)
+{
+ DateFormat *fmtA = DateFormat::createInstance();
+ DateFormat *fmtB = DateFormat::createInstance();
+
+ if (fmtA == NULL || fmtB == NULL){
+ dataerrln("Error calling DateFormat::createInstance");
+ delete fmtA;
+ delete fmtB;
+ return;
+ }
+
+ // {sfb} Is it OK to cast away const here?
+ Calendar *calA = (Calendar*) fmtA->getCalendar();
+ Calendar *calB = (Calendar*) fmtB->getCalendar();
+ if(!calA || !calB) {
+ errln("Couldn't get proper calendars, exiting");
+ delete fmtA;
+ delete fmtB;
+ return;
+ }
+ UDate epoch = date(0, 0, 0);
+ UDate xmas = date(61, UCAL_DECEMBER, 25);
+
+ UErrorCode status = U_ZERO_ERROR;
+ calA->setTime(epoch, status);
+ failure(status, "calA->setTime");
+ calB->setTime(epoch, status);
+ failure(status, "calB->setTime");
+ if (*calA != *calB)
+ errln("Fail: Can't complete test; Calendar instances unequal");
+ if (*fmtA != *fmtB)
+ errln("Fail: DateFormat unequal when Calendars equal");
+ calB->setTime(xmas, status);
+ failure(status, "calB->setTime");
+ if (*calA == *calB)
+ errln("Fail: Can't complete test; Calendar instances equal");
+ if (*fmtA != *fmtB)
+ errln("Fail: DateFormat unequal when Calendars equivalent");
+
+ logln("DateFormat.equals ok");
+
+ delete fmtA;
+ delete fmtB;
+}
+
+/* The java.text.DateFormat.parse(String) method expects for the
+ US locale a string formatted according to mm/dd/yy and parses it
+ correctly.
+
+ When given a string mm/dd/yyyy it only parses up to the first
+ two y's, typically resulting in a date in the year 1919.
+
+ Please extend the parsing method(s) to handle strings with
+ four-digit year values (probably also applicable to various
+ other locales. */
+/**
+ * @bug 4073003
+ */
+void DateFormatRegressionTest::Test4073003(void)
+{
+ //try {
+ UErrorCode ec = U_ZERO_ERROR;
+ SimpleDateFormat fmt("dd/MM/yy", Locale::getUK(), ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: SimpleDateFormat constructor");
+ return;
+ }
+ UnicodeString tests [] = {
+ (UnicodeString) "12/25/61",
+ (UnicodeString) "12/25/1961",
+ (UnicodeString) "4/3/2010",
+ (UnicodeString) "4/3/10"
+ };
+ UErrorCode status = U_ZERO_ERROR;
+ for(int i= 0; i < 4; i+=2) {
+ UDate d = fmt.parse(tests[i], status);
+ failure(status, "fmt.parse");
+ UDate dd = fmt.parse(tests[i+1], status);
+ failure(status, "fmt.parse");
+ UnicodeString s;
+ s = fmt.format(d, s);
+ UnicodeString ss;
+ ss = fmt.format(dd, ss);
+ if (d != dd)
+ errln((UnicodeString) "Fail: " + d + " != " + dd);
+ if (s != ss)
+ errln((UnicodeString)"Fail: " + s + " != " + ss);
+ logln("Ok: " + s + " " + d);
+ }
+}
+
+/**
+ * @bug 4089106
+ */
+void DateFormatRegressionTest::Test4089106(void)
+{
+ TimeZone *def = TimeZone::createDefault();
+ //try {
+ TimeZone *z = new SimpleTimeZone((int)(1.25 * 3600000), "FAKEZONE");
+ TimeZone::setDefault(*z);
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *f = new SimpleDateFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat, error %s", u_errorName(status));
+ delete f;
+ delete def;
+ delete z;
+ return;
+ }
+ failure(status, "new SimpleDateFormat");
+ if (f->getTimeZone()!= *z)
+ errln("Fail: SimpleTimeZone should use TimeZone.getDefault()");
+
+ //}
+ //finally {
+ TimeZone::setDefault(*def);
+ //}
+
+ delete z;
+ delete f;
+ delete def;
+}
+
+/**
+ * @bug 4100302
+ */
+
+// {sfb} not applicable in C++??
+
+void DateFormatRegressionTest::Test4100302(void)
+{
+/* Locale locales [] = {
+ Locale::CANADA,
+ Locale::CANADA_FRENCH,
+ Locale::CHINA,
+ Locale::CHINESE,
+ Locale::ENGLISH,
+ Locale::FRANCE,
+ Locale::FRENCH,
+ Locale::GERMAN,
+ Locale::GERMANY,
+ Locale::ITALIAN,
+ Locale::ITALY,
+ Locale::JAPAN,
+ Locale::JAPANESE,
+ Locale::KOREA,
+ Locale::KOREAN,
+ Locale::PRC,
+ Locale::SIMPLIFIED_CHINESE,
+ Locale::TAIWAN,
+ Locale::TRADITIONAL_CHINESE,
+ Locale::UK,
+ Locale::US
+ };
+ //try {
+ UBool pass = TRUE;
+ for(int i = 0; i < 21; i++) {
+
+ Format *format = DateFormat::createDateTimeInstance(DateFormat::FULL,
+ DateFormat::FULL, locales[i]);
+ byte[] bytes;
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+
+ oos.writeObject(format);
+ oos.flush();
+
+ baos.close();
+ bytes = baos.toByteArray();
+
+ ObjectInputStream ois =
+ new ObjectInputStream(new ByteArrayInputStream(bytes));
+
+ if (!format.equals(ois.readObject())) {
+ pass = FALSE;
+ logln("DateFormat instance for locale " +
+ locales[i] + " is incorrectly serialized/deserialized.");
+ } else {
+ logln("DateFormat instance for locale " +
+ locales[i] + " is OKAY.");
+ }
+ }
+ if (!pass) errln("Fail: DateFormat serialization/equality bug");
+ }
+ catch (IOException e) {
+ errln("Fail: " + e);
+ e.printStackTrace();
+ }
+ catch (ClassNotFoundException e) {
+ errln("Fail: " + e);
+ e.printStackTrace();
+ }
+*/}
+
+/**
+ * @bug 4101483
+ */
+void DateFormatRegressionTest::Test4101483(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *sdf = new SimpleDateFormat(UnicodeString("z"), Locale::getUS(), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ FieldPosition fp(UDAT_TIMEZONE_FIELD);
+ //Date d = date(9234567890L);
+ UDate d = 9234567890.0;
+ //StringBuffer buf = new StringBuffer("");
+ UnicodeString buf;
+ sdf->format(d, buf, fp);
+ //logln(sdf.format(d, buf, fp).toString());
+ logln(dateToString(d) + " => " + buf);
+ logln("beginIndex = " + fp.getBeginIndex());
+ logln("endIndex = " + fp.getEndIndex());
+ if (fp.getBeginIndex() == fp.getEndIndex())
+ errln("Fail: Empty field");
+
+ delete sdf;
+}
+
+/**
+ * @bug 4103340
+ * @bug 4138203
+ * This bug really only works in Locale.US, since that's what the locale
+ * used for Date.toString() is. Bug 4138203 reports that it fails on Korean
+ * NT; it would actually have failed on any non-US locale. Now it should
+ * work on all locales.
+ */
+void DateFormatRegressionTest::Test4103340(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ // choose a date that is the FIRST of some month
+ // and some arbitrary time
+ UDate d = date(97, 3, 1, 1, 1, 1);
+ SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("MMMM"), Locale::getUS(), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+
+ UnicodeString s;
+ s = dateToString(d, s);
+ UnicodeString s2;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ s2 = df->format(d, s2, pos);
+ logln("Date=" + s);
+ logln("DF=" + s2);
+ UnicodeString substr;
+ s2.extract(0,2, substr);
+ if (s.indexOf(substr) == -1)
+ errln("Months should match");
+
+ delete df;
+}
+
+/**
+ * @bug 4103341
+ */
+void DateFormatRegressionTest::Test4103341(void)
+{
+ TimeZone *saveZone =TimeZone::createDefault();
+ //try {
+
+ // {sfb} changed from setDefault to adoptDefault
+ TimeZone::adoptDefault(TimeZone::createTimeZone("CST"));
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *simple = new SimpleDateFormat(UnicodeString("MM/dd/yyyy HH:mm"), status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat, error %s", u_errorName(status));
+ delete simple;
+ return;
+ }
+ failure(status, "new SimpleDateFormat");
+ TimeZone *temp = TimeZone::createDefault();
+ if(simple->getTimeZone() != *temp)
+ errln("Fail: SimpleDateFormat not using default zone");
+ //}
+ //finally {
+ TimeZone::adoptDefault(saveZone);
+ //}
+
+ delete temp;
+ delete simple;
+}
+
+/**
+ * @bug 4104136
+ */
+void DateFormatRegressionTest::Test4104136(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *sdf = new SimpleDateFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat, error %s", u_errorName(status));
+ delete sdf;
+ return;
+ }
+ if(failure(status, "new SimpleDateFormat")) return;
+ UnicodeString pattern = "'time' hh:mm";
+ sdf->applyPattern(pattern);
+ logln("pattern: \"" + pattern + "\"");
+
+ UnicodeString strings [] = {
+ (UnicodeString)"time 10:30",
+ (UnicodeString) "time 10:x",
+ (UnicodeString) "time 10x"
+ };
+
+ ParsePosition ppos [] = {
+ ParsePosition(10),
+ ParsePosition(0),
+ ParsePosition(0)
+ };
+
+ UDate dates [] = {
+ date(70, UCAL_JANUARY, 1, 10, 30),
+ -1,
+ -1
+ };
+
+ /*Object[] DATA = {
+ "time 10:30", new ParsePosition(10), new Date(70, Calendar.JANUARY, 1, 10, 30),
+ "time 10:x", new ParsePosition(0), null,
+ "time 10x", new ParsePosition(0), null,
+ };*/
+
+ for(int i = 0; i < 3; i++) {
+ UnicodeString text = strings[i];
+ ParsePosition finish = ppos[i];
+ UDate exp = dates[i];
+
+ ParsePosition pos(0);
+ UDate d = sdf->parse(text, pos);
+ logln(" text: \"" + text + "\"");
+ logln(" index: %d", pos.getIndex());
+ logln((UnicodeString) " result: " + d);
+ if(pos.getIndex() != finish.getIndex())
+ errln("Fail: Expected pos " + finish.getIndex());
+ if (! ((d == 0 && exp == -1) || (d == exp)))
+ errln((UnicodeString) "Fail: Expected result " + exp);
+ }
+
+ delete sdf;
+}
+
+/**
+ * @bug 4104522
+ * CANNOT REPRODUCE
+ * According to the bug report, this test should throw a
+ * StringIndexOutOfBoundsException during the second parse. However,
+ * this is not seen.
+ */
+void DateFormatRegressionTest::Test4104522(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ SimpleDateFormat *sdf = new SimpleDateFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat, error %s", u_errorName(status));
+ delete sdf;
+ return;
+ }
+ failure(status, "new SimpleDateFormat");
+ UnicodeString pattern = "'time' hh:mm";
+ sdf->applyPattern(pattern);
+ logln("pattern: \"" + pattern + "\"");
+
+ // works correctly
+ ParsePosition pp(0);
+ UnicodeString text = "time ";
+ UDate dt = sdf->parse(text, pp);
+ logln(" text: \"" + text + "\"" +
+ " date: " + dt);
+
+ // works wrong
+ pp.setIndex(0);
+ text = "time";
+ dt = sdf->parse(text, pp);
+ logln(" text: \"" + text + "\"" +
+ " date: " + dt);
+
+ delete sdf;
+}
+
+/**
+ * @bug 4106807
+ */
+void DateFormatRegressionTest::Test4106807(void)
+{
+ UDate dt;
+ DateFormat *df = DateFormat::createDateTimeInstance();
+
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *sdfs [] = {
+ new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss"), status),
+ new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss'Z'"), status),
+ new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss''"), status),
+ new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss'a''a'"), status),
+ new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss %"), status)
+ };
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat, error %s", u_errorName(status));
+ delete sdfs[0];
+ delete sdfs[1];
+ delete sdfs[2];
+ delete sdfs[3];
+ delete sdfs[4];
+ return;
+ }
+
+ failure(status, "new SimpleDateFormat");
+
+ UnicodeString strings [] = {
+ (UnicodeString) "19980211140000",
+ (UnicodeString) "19980211140000",
+ (UnicodeString) "19980211140000",
+ (UnicodeString) "19980211140000a",
+ (UnicodeString) "19980211140000 "
+ };
+
+ /*Object[] data = {
+ new SimpleDateFormat("yyyyMMddHHmmss"), "19980211140000",
+ new SimpleDateFormat("yyyyMMddHHmmss'Z'"), "19980211140000",
+ new SimpleDateFormat("yyyyMMddHHmmss''"), "19980211140000",
+ new SimpleDateFormat("yyyyMMddHHmmss'a''a'"), "19980211140000a",
+ new SimpleDateFormat("yyyyMMddHHmmss %"), "19980211140000 ",
+ };*/
+ GregorianCalendar *gc = new GregorianCalendar(status);
+ failure(status, "new GregorianCalendar");
+ TimeZone *timeZone = TimeZone::createDefault();
+
+ TimeZone *gmt = timeZone->clone();
+
+ gmt->setRawOffset(0);
+
+ for(int32_t i = 0; i < 5; i++) {
+ SimpleDateFormat *format = sdfs[i];
+ UnicodeString dateString = strings[i];
+ //try {
+ format->setTimeZone(*gmt);
+ dt = format->parse(dateString, status);
+ // {sfb} some of these parses will fail purposely
+ if(U_FAILURE(status))
+ break;
+ status = U_ZERO_ERROR;
+ UnicodeString fmtd;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ fmtd = df->format(dt, fmtd, pos);
+ logln(fmtd);
+ //logln(df->format(dt));
+ gc->setTime(dt, status);
+ failure(status, "gc->getTime");
+ logln(UnicodeString("") + gc->get(UCAL_ZONE_OFFSET, status));
+ failure(status, "gc->get");
+ UnicodeString s;
+ s = format->format(dt, s, pos);
+ logln(s);
+ /*}
+ catch (ParseException e) {
+ logln("No way Jose");
+ }*/
+ }
+
+ delete timeZone;
+ delete df;
+ for(int32_t j = 0; j < 5; j++)
+ delete sdfs [j];
+ delete gc;
+ delete gmt;
+}
+
+/*
+ Synopsis: Chinese time zone CTT is not recogonized correctly.
+ Description: Platform Chinese Windows 95 - ** Time zone set to CST **
+ */
+/**
+ * @bug 4108407
+ */
+
+// {sfb} what to do with this one ??
+void DateFormatRegressionTest::Test4108407(void)
+{
+ /*long l = System.currentTimeMillis();
+ logln("user.timezone = " + System.getProperty("user.timezone", "?"));
+ logln("Time Zone :" +
+ DateFormat.getDateInstance().getTimeZone().getID());
+ logln("Default format :" +
+ DateFormat.getDateInstance().format(new Date(l)));
+ logln("Full format :" +
+ DateFormat.getDateInstance(DateFormat.FULL).format(new
+ Date(l)));
+ logln("*** Set host TZ to CST ***");
+ logln("*** THE RESULTS OF THIS TEST MUST BE VERIFIED MANUALLY ***");*/
+}
+
+/**
+ * @bug 4134203
+ * SimpleDateFormat won't parse "GMT"
+ */
+void DateFormatRegressionTest::Test4134203(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString dateFormat = "MM/dd/yy HH:mm:ss zzz";
+ SimpleDateFormat *fmt = new SimpleDateFormat(dateFormat, status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ ParsePosition p0(0);
+ UDate d = fmt->parse("01/22/92 04:52:00 GMT", p0);
+ logln(dateToString(d));
+ if(p0 == ParsePosition(0))
+ errln("Fail: failed to parse 'GMT'");
+ // In the failure case an exception is thrown by parse();
+ // if no exception is thrown, the test passes.
+
+ delete fmt;
+}
+
+/**
+ * @bug 4151631
+ * SimpleDateFormat incorrect handling of 2 single quotes in format()
+ */
+void DateFormatRegressionTest::Test4151631(void)
+{
+ UnicodeString pattern = "'TO_DATE('''dd'-'MM'-'yyyy HH:mm:ss''' , ''DD-MM-YYYY HH:MI:SS'')'";
+ logln("pattern=" + pattern);
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *format = new SimpleDateFormat(pattern, Locale::getUS(), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ UnicodeString result;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ result = format->format(date(1998-1900, UCAL_JUNE, 30, 13, 30, 0), result, pos);
+ if (result != "TO_DATE('30-06-1998 13:30:00' , 'DD-MM-YYYY HH:MI:SS')") {
+ errln("Fail: result=" + result);
+ }
+ else {
+ logln("Pass: result=" + result);
+ }
+
+ delete format;
+}
+
+/**
+ * @bug 4151706
+ * 'z' at end of date format throws index exception in SimpleDateFormat
+ * CANNOT REPRODUCE THIS BUG ON 1.2FCS
+ */
+void DateFormatRegressionTest::Test4151706(void)
+{
+ UnicodeString dateString("Thursday, 31-Dec-98 23:00:00 GMT");
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat fmt(UnicodeString("EEEE, dd-MMM-yy HH:mm:ss z"), Locale::getUS(), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ //try {
+ UDate d = fmt.parse(dateString, status);
+ failure(status, "fmt->parse");
+ // {sfb} what about next two lines?
+ //if (d.getTime() != Date.UTC(1998-1900, Calendar.DECEMBER, 31, 23, 0, 0))
+ // errln("Incorrect value: " + d);
+ /*} catch (Exception e) {
+ errln("Fail: " + e);
+ }*/
+ UnicodeString temp;
+ FieldPosition pos(0);
+ logln(dateString + " -> " + fmt.format(d, temp, pos));
+}
+
+/**
+ * @bug 4162071
+ * Cannot reproduce this bug under 1.2 FCS -- it may be a convoluted duplicate
+ * of some other bug that has been fixed.
+ */
+void
+DateFormatRegressionTest::Test4162071(void)
+{
+ UnicodeString dateString("Thu, 30-Jul-1999 11:51:14 GMT");
+ UnicodeString format("EEE', 'dd-MMM-yyyy HH:mm:ss z"); // RFC 822/1123
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat df(format, Locale::getUS(), status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat");
+ return;
+ }
+
+ //try {
+ UDate x = df.parse(dateString, status);
+ if(U_SUCCESS(status))
+ logln("Parse format \"" + format + "\" ok");
+ else
+ errln("Parse format \"" + format + "\" failed.");
+ UnicodeString temp;
+ FieldPosition pos(0);
+ logln(dateString + " -> " + df.format(x, temp, pos));
+ //} catch (Exception e) {
+ // errln("Parse format \"" + format + "\" failed.");
+ //}
+}
+
+/**
+ * DateFormat shouldn't parse year "-1" as a two-digit year (e.g., "-1" -> 1999).
+ */
+void DateFormatRegressionTest::Test4182066(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat fmt("MM/dd/yy", Locale::getUS(), status);
+ SimpleDateFormat dispFmt("MMM dd yyyy GG", Locale::getUS(), status);
+ if (U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat");
+ return;
+ }
+
+ /* We expect 2-digit year formats to put 2-digit years in the right
+ * window. Out of range years, that is, anything less than "00" or
+ * greater than "99", are treated as literal years. So "1/2/3456"
+ * becomes 3456 AD. Likewise, "1/2/-3" becomes -3 AD == 2 BC.
+ */
+ const char* STRINGS[] = {
+ "02/29/00",
+ "01/23/01",
+ "04/05/-1",
+ "01/23/-9",
+ "11/12/1314",
+ "10/31/1",
+ "09/12/+1",
+ "09/12/001",
+ };
+ int32_t STRINGS_COUNT = (int32_t)(sizeof(STRINGS) / sizeof(STRINGS[0]));
+ UDate FAIL_DATE = (UDate) 0;
+ UDate DATES[] = {
+ date(2000-1900, UCAL_FEBRUARY, 29),
+ date(2001-1900, UCAL_JANUARY, 23),
+ date( -1-1900, UCAL_APRIL, 5),
+ date( -9-1900, UCAL_JANUARY, 23),
+ date(1314-1900, UCAL_NOVEMBER, 12),
+ date( 1-1900, UCAL_OCTOBER, 31),
+ FAIL_DATE, // "+1" isn't recognized by US NumberFormat
+ date( 1-1900, UCAL_SEPTEMBER,12),
+ };
+
+ UnicodeString out;
+ UBool pass = TRUE;
+ for (int32_t i=0; i<STRINGS_COUNT; ++i) {
+ UnicodeString str(STRINGS[i]);
+ UDate expected = DATES[i];
+ status = U_ZERO_ERROR;
+ UDate actual = fmt.parse(str, status);
+ if (U_FAILURE(status)) {
+ actual = FAIL_DATE;
+ }
+ UnicodeString actStr;
+ if (actual == FAIL_DATE) {
+ actStr.append("null");
+ } else {
+ // Yuck: See j25
+ ((DateFormat*)&dispFmt)->format(actual, actStr);
+ }
+
+ if (expected == actual) {
+ out.append(str + " => " + actStr + "\n");
+ } else {
+ UnicodeString expStr;
+ if (expected == FAIL_DATE) {
+ expStr.append("null");
+ } else {
+ // Yuck: See j25
+ ((DateFormat*)&dispFmt)->format(expected, expStr);
+ }
+ out.append("FAIL: " + str + " => " + actStr
+ + ", expected " + expStr + "\n");
+ pass = FALSE;
+ }
+ }
+ if (pass) {
+ log(out);
+ } else {
+ err(out);
+ }
+}
+
+/**
+ * j32 {JDK Bug 4210209 4209272}
+ * DateFormat cannot parse Feb 29 2000 when setLenient(false)
+ */
+void
+DateFormatRegressionTest::Test4210209(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern("MMM d, yyyy");
+ SimpleDateFormat sfmt(pattern, Locale::getUS(), status);
+ SimpleDateFormat sdisp("MMM dd yyyy GG", Locale::getUS(), status);
+ DateFormat& fmt = *(DateFormat*)&sfmt; // Yuck: See j25
+ DateFormat& disp = *(DateFormat*)&sdisp; // Yuck: See j25
+ if (U_FAILURE(status)) {
+ errln("Couldn't create SimpleDateFormat");
+ return;
+ }
+ Calendar* calx = (Calendar*)fmt.getCalendar(); // cast away const!
+ calx->setLenient(FALSE);
+ UDate d = date(2000-1900, UCAL_FEBRUARY, 29);
+ UnicodeString s, ss;
+ fmt.format(d, s);
+ logln(disp.format(d, ss.remove()) + " f> " + pattern +
+ " => \"" + s + "\"");
+ ParsePosition pos(0);
+ d = fmt.parse(s, pos);
+ logln(UnicodeString("\"") + s + "\" p> " + pattern +
+ " => " + disp.format(d, ss.remove()));
+ logln(UnicodeString("Parse pos = ") + pos.getIndex() +
+ ", error pos = " + pos.getErrorIndex());
+ if (pos.getErrorIndex() != -1) {
+ errln(UnicodeString("FAIL: Error index should be -1"));
+ }
+
+ // The underlying bug is in GregorianCalendar. If the following lines
+ // succeed, the bug is fixed. If the bug isn't fixed, they will throw
+ // an exception.
+ GregorianCalendar cal(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Unable to create Calendar");
+ return;
+ }
+ cal.clear();
+ cal.setLenient(FALSE);
+ cal.set(2000, UCAL_FEBRUARY, 29); // This should work!
+ logln(UnicodeString("Attempt to set Calendar to Feb 29 2000: ") +
+ disp.format(cal.getTime(status), ss.remove()));
+ if (U_FAILURE(status)) {
+ errln("FAIL: Unable to set Calendar to Feb 29 2000");
+ }
+}
+
+void DateFormatRegressionTest::Test714(void)
+{
+ //try {
+ UDate d(978103543000.);
+ DateFormat *fmt = DateFormat::createDateTimeInstance(DateFormat::NONE,
+ DateFormat::MEDIUM,
+ Locale::getUS());
+ if (fmt == NULL) {
+ dataerrln("Error calling DateFormat::createDateTimeInstance");
+ return;
+ }
+
+ UnicodeString s;
+ UnicodeString tests =
+ (UnicodeString) "7:25:43 AM" ;
+ UErrorCode status = U_ZERO_ERROR;
+ fmt->format (d,s);
+ if(U_FAILURE(status))
+ {
+ errln((UnicodeString) "Fail, errmsg " + u_errorName(status));
+ return;
+ }
+
+ if(s != tests)
+ {
+ errln((UnicodeString) "Fail: " + s + " != " + tests);
+ }
+ else
+ {
+ logln("OK: " + s + " == " + tests);
+ }
+
+ delete fmt;
+}
+
+class Test1684Data {
+public:
+ int32_t year;
+ int32_t month;
+ int32_t date;
+ int32_t womyear;
+ int32_t wommon;
+ int32_t wom;
+ int32_t dow;
+ UnicodeString data;
+ UnicodeString normalized;
+
+ Test1684Data(int32_t xyear, int32_t xmonth, int32_t xdate,
+ int32_t xwomyear, int32_t xwommon, int32_t xwom, int32_t xdow,
+ const char *xdata, const char *xnormalized) :
+ year(xyear),
+ month(xmonth-1),
+ date(xdate),
+ womyear(xwomyear),
+ wommon(xwommon-1),
+ wom(xwom),
+ dow(xdow),
+ data(xdata,""),
+ normalized((xnormalized==NULL)?xdata:xnormalized,"")
+ { }
+};
+
+void DateFormatRegressionTest::Test1684(void)
+{
+ // July 2001 August 2001 January 2002
+ // Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ // 1 2 3 4 5 6 7 1 2 3 4 1 2 3 4 5
+ // 8 9 10 11 12 13 14 5 6 7 8 9 10 11 6 7 8 9 10 11 12
+ // 15 16 17 18 19 20 21 12 13 14 15 16 17 18 13 14 15 16 17 18 19
+ // 22 23 24 25 26 27 28 19 20 21 22 23 24 25 20 21 22 23 24 25 26
+ // 29 30 31 26 27 28 29 30 31 27 28 29 30 31
+ Test1684Data *tests[] = {
+ new Test1684Data(2001, 8, 6, 2001,8,2,UCAL_MONDAY, "2001 08 02 Mon", NULL),
+ new Test1684Data(2001, 8, 7, 2001,8,2,UCAL_TUESDAY, "2001 08 02 Tue", NULL),
+ new Test1684Data(2001, 8, 5,/*12,*/ 2001,8,2,UCAL_SUNDAY, "2001 08 02 Sun", NULL),
+ new Test1684Data(2001, 8,6, /*7, 30,*/ 2001,7,6,UCAL_MONDAY, "2001 07 06 Mon", "2001 08 02 Mon"),
+ new Test1684Data(2001, 8,7, /*7, 31,*/ 2001,7,6,UCAL_TUESDAY, "2001 07 06 Tue", "2001 08 02 Tue"),
+ new Test1684Data(2001, 8, 5, 2001,7,6,UCAL_SUNDAY, "2001 07 06 Sun", "2001 08 02 Sun"),
+ new Test1684Data(2001, 7, 30, 2001,8,1,UCAL_MONDAY, "2001 08 01 Mon", "2001 07 05 Mon"),
+ new Test1684Data(2001, 7, 31, 2001,8,1,UCAL_TUESDAY, "2001 08 01 Tue", "2001 07 05 Tue"),
+ new Test1684Data(2001, 7,29, /*8, 5,*/ 2001,8,1,UCAL_SUNDAY, "2001 08 01 Sun", "2001 07 05 Sun"),
+ new Test1684Data(2001, 12, 31, 2001,12,6,UCAL_MONDAY, "2001 12 06 Mon", NULL),
+ new Test1684Data(2002, 1, 1, 2002,1,1,UCAL_TUESDAY, "2002 01 01 Tue", NULL),
+ new Test1684Data(2002, 1, 2, 2002,1,1,UCAL_WEDNESDAY, "2002 01 01 Wed", NULL),
+ new Test1684Data(2002, 1, 3, 2002,1,1,UCAL_THURSDAY, "2002 01 01 Thu", NULL),
+ new Test1684Data(2002, 1, 4, 2002,1,1,UCAL_FRIDAY, "2002 01 01 Fri", NULL),
+ new Test1684Data(2002, 1, 5, 2002,1,1,UCAL_SATURDAY, "2002 01 01 Sat", NULL),
+ new Test1684Data(2001,12,30, /*2002, 1, 6,*/ 2002,1,1,UCAL_SUNDAY, "2002 01 01 Sun", "2001 12 06 Sun")
+ };
+
+#define kTest1684Count ((int32_t)(sizeof(tests)/sizeof(tests[0])))
+
+ int32_t pass = 0, error = 0, warning = 0;
+ int32_t i;
+
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern("yyyy MM WW EEE","");
+ Calendar *cal = new GregorianCalendar(status);
+ SimpleDateFormat *sdf = new SimpleDateFormat(pattern,status);
+ if (U_FAILURE(status)) {
+ dataerrln("Error constructing SimpleDateFormat");
+ for(i=0;i<kTest1684Count;i++) {
+ delete tests[i];
+ }
+ delete cal;
+ delete sdf;
+ return;
+ }
+ cal->setFirstDayOfWeek(UCAL_SUNDAY);
+ cal->setMinimalDaysInFirstWeek(1);
+
+ sdf->adoptCalendar(cal);
+
+ cal = sdf->getCalendar()->clone(); // sdf may have deleted calendar
+
+ if(!cal || !sdf || U_FAILURE(status)) {
+ errln(UnicodeString("Error setting up test: ") + u_errorName(status));
+ }
+
+ for (i = 0; i < kTest1684Count; ++i) {
+ Test1684Data &test = *(tests[i]);
+ logln(UnicodeString("#") + i + UnicodeString("\n-----\nTesting round trip of ") + test.year +
+ " " + (test.month + 1) +
+ " " + test.date +
+ " (written as) " + test.data);
+
+ cal->clear();
+ cal->set(test.year, test.month, test.date);
+ UDate ms = cal->getTime(status);
+
+ cal->clear();
+ cal->set(UCAL_YEAR, test.womyear);
+ cal->set(UCAL_MONTH, test.wommon);
+ cal->set(UCAL_WEEK_OF_MONTH, test.wom);
+ cal->set(UCAL_DAY_OF_WEEK, test.dow);
+ UDate ms2 = cal->getTime(status);
+
+ if (ms2 != ms) {
+ errln((UnicodeString)"\nError: GregorianUCAL_DOM gave " + ms +
+ "\n GregorianUCAL_WOM gave " + ms2);
+ error++;
+ } else {
+ pass++;
+ }
+
+ ms2 = sdf->parse(test.data, status);
+ if(U_FAILURE(status)) {
+ errln("parse exception: " + UnicodeString(u_errorName(status)));
+ }
+
+ if (ms2!=ms) {
+ errln((UnicodeString)"\nError: GregorianCalendar gave " + ms +
+ "\n SimpleDateFormat.parse gave " + ms2);
+ error++;
+ } else {
+ pass++;
+ }
+
+ UnicodeString result;
+ sdf->format(ms, result);
+ if (result != test.normalized) {
+ errln("\nWarning: format of '" + test.data + "' gave" +
+ "\n '" + result + "'" +
+ "\n expected '" + test.normalized + "'");
+ warning++;
+ } else {
+ pass++;
+ }
+
+ UDate ms3;
+ ms3 = sdf->parse(result, status);
+ if(U_FAILURE(status)) {
+ errln("parse exception 2: " + (UnicodeString)u_errorName(status));
+ }
+
+ if (ms3!=ms) {
+ error++;
+ errln((UnicodeString)"\nError: Re-parse of '" + result + "' gave time of " +
+ "\n " + ms3 +
+ "\n not " + ms);
+ } else {
+ pass++;
+ }
+ }
+
+ UnicodeString info
+ = UnicodeString("Passed: ") + pass + ", Warnings: " + warning + ", Errors: " + error;
+ if (error > 0) {
+ errln(info);
+ } else {
+ logln(info);
+ }
+
+ for(i=0;i<kTest1684Count;i++) {
+ delete tests[i];
+ }
+ delete cal;
+ delete sdf;
+}
+
+void DateFormatRegressionTest::Test5554(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern("Z","");
+ UnicodeString newfoundland("Canada/Newfoundland", "");
+ TimeZone *zone = TimeZone::createTimeZone(newfoundland);
+ Calendar *cal = new GregorianCalendar(zone, status);
+ SimpleDateFormat *sdf = new SimpleDateFormat(pattern,status);
+ if (U_FAILURE(status)) {
+ dataerrln("Error constructing SimpleDateFormat");
+ delete cal;
+ delete sdf;
+ return;
+ }
+ cal->set(2007, 1, 14);
+ UDate date = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("Error getting time to format");
+ return;
+ };
+ sdf->adoptCalendar(cal);
+ UnicodeString result;
+ UnicodeString correct("-0330", "");
+ sdf->format(date, result);
+ if (result != correct) {
+ errln("\nError: Newfoundland Z of Jan 14, 2007 gave '" + result + "', expected '" + correct + "'");
+ }
+ delete sdf;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.h b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.h
new file mode 100644
index 00000000000..1a9762c79b5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmrgts.h
@@ -0,0 +1,59 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _DATEFORMATREGRESSIONTEST_
+#define _DATEFORMATREGRESSIONTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "unicode/smpdtfmt.h"
+#include "caltztst.h"
+
+/**
+ * Performs regression test for DateFormat
+ **/
+class DateFormatRegressionTest: public CalendarTimeZoneTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+ void Test4029195(void);
+ void Test4052408(void);
+ void Test4056591(void);
+ void Test4059917(void);
+ void aux917( SimpleDateFormat *fmt, UnicodeString& str );
+ void Test4060212(void);
+ void Test4061287(void);
+ void Test4065240(void);
+ void Test4071441(void);
+ void Test4073003(void);
+ void Test4089106(void);
+ void Test4100302(void);
+ void Test4101483(void);
+ void Test4103340(void);
+ void Test4103341(void);
+ void Test4104136(void);
+ void Test4104522(void);
+ void Test4106807(void);
+ void Test4108407(void);
+ void Test4134203(void);
+ void Test4151631(void);
+ void Test4151706(void);
+ void Test4162071(void);
+ void Test4182066(void);
+ void Test4210209(void);
+ void Test714(void);
+ void Test1684(void);
+ void Test5554(void);
+ };
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _DATEFORMATREGRESSIONTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.cpp
new file mode 100644
index 00000000000..63f3479a6bb
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.cpp
@@ -0,0 +1,558 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/gregocal.h"
+#include "dtfmtrtts.h"
+#include "caltest.h"
+
+#include <stdio.h>
+#include <string.h>
+
+// *****************************************************************************
+// class DateFormatRoundTripTest
+// *****************************************************************************
+
+// Useful for turning up subtle bugs: Change the following to TRUE, recompile,
+// and run while at lunch.
+// Warning -- makes test run infinite loop!!!
+#ifndef INFINITE
+#define INFINITE 0
+#endif
+
+// Define this to test just a single locale
+//#define TEST_ONE_LOC "cs_CZ"
+
+// If SPARSENESS is > 0, we don't run each exhaustive possibility.
+// There are 24 total possible tests per each locale. A SPARSENESS
+// of 12 means we run half of them. A SPARSENESS of 23 means we run
+// 1 of them. SPARSENESS _must_ be in the range 0..23.
+int32_t DateFormatRoundTripTest::SPARSENESS = 0;
+int32_t DateFormatRoundTripTest::TRIALS = 4;
+int32_t DateFormatRoundTripTest::DEPTH = 5;
+
+DateFormatRoundTripTest::DateFormatRoundTripTest() : dateFormat(0) {
+}
+
+DateFormatRoundTripTest::~DateFormatRoundTripTest() {
+ delete dateFormat;
+}
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+void
+DateFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ optionv = (par && *par=='v');
+ switch (index) {
+ CASE(0,TestDateFormatRoundTrip)
+ CASE(1, TestCentury)
+ default: name = ""; break;
+ }
+}
+
+UBool
+DateFormatRoundTripTest::failure(UErrorCode status, const char* msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+UBool
+DateFormatRoundTripTest::failure(UErrorCode status, const char* msg, const UnicodeString& str)
+{
+ if(U_FAILURE(status)) {
+ UnicodeString escaped;
+ escape(str,escaped);
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status) + ", str=" + escaped);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void DateFormatRoundTripTest::TestCentury()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Locale locale("es_PA");
+ UnicodeString pattern = "MM/dd/yy hh:mm:ss a z";
+ SimpleDateFormat fmt(pattern, locale, status);
+ if(!assertSuccess("trying to construct", status))return;
+ UDate date[] = {-55018555891590.05, 0, 0};
+ UnicodeString result[2];
+
+ fmt.format(date[0], result[0]);
+ date[1] = fmt.parse(result[0], status);
+ fmt.format(date[1], result[1]);
+ date[2] = fmt.parse(result[1], status);
+
+ /* This test case worked OK by accident before. date[1] != date[0],
+ * because we use -80/+20 year window for 2-digit year parsing.
+ * (date[0] is in year 1926, date[1] is in year 2026.) result[1] set
+ * by the first format call returns "07/13/26 07:48:28 p.m. PST",
+ * which is correct, because DST was not used in year 1926 in zone
+ * America/Los_Angeles. When this is parsed, date[1] becomes a time
+ * in 2026, which is "07/13/26 08:48:28 p.m. PDT". There was a zone
+ * offset calculation bug that observed DST in 1926, which was resolved.
+ * Before the bug was resolved, result[0] == result[1] was true,
+ * but after the bug fix, the expected result is actually
+ * result[0] != result[1]. -Yoshito
+ */
+ /* TODO: We need to review this code and clarify what we really
+ * want to test here.
+ */
+ //if (date[1] != date[2] || result[0] != result[1]) {
+ if (date[1] != date[2]) {
+ errln("Round trip failure: \"%S\" (%f), \"%S\" (%f)", result[0].getBuffer(), date[1], result[1].getBuffer(), date[2]);
+ }
+}
+
+// ==
+
+void DateFormatRoundTripTest::TestDateFormatRoundTrip()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ getFieldCal = Calendar::createInstance(status);
+ failure(status, "Calendar::createInstance");
+ if(!assertSuccess("trying to construct", status))return;
+
+
+ int32_t locCount = 0;
+ const Locale *avail = DateFormat::getAvailableLocales(locCount);
+ logln("DateFormat available locales: %d", locCount);
+ if(quick) {
+ SPARSENESS = 18;
+ logln("Quick mode: only testing SPARSENESS = 18");
+ }
+ TimeZone *tz = TimeZone::createDefault();
+ UnicodeString temp;
+ logln("Default TimeZone: " + tz->getID(temp));
+ delete tz;
+
+#ifdef TEST_ONE_LOC // define this to just test ONE locale.
+ Locale loc(TEST_ONE_LOC);
+ test(loc);
+#if INFINITE
+ for(;;) {
+ test(loc);
+ }
+#endif
+
+#else
+# if INFINITE
+ // Special infinite loop test mode for finding hard to reproduce errors
+ Locale loc = Locale::getDefault();
+ logln("ENTERING INFINITE TEST LOOP FOR Locale: " + loc.getDisplayName(temp));
+ for(;;)
+ test(loc);
+# else
+ test(Locale::getDefault());
+
+#if 1
+ // installed locales
+ for (int i=0; i < locCount; ++i) {
+ test(avail[i]);
+ }
+#endif
+
+#if 1
+ // special locales
+ int32_t jCount = CalendarTest::testLocaleCount();
+ for (int32_t j=0; j < jCount; ++j) {
+ test(Locale(CalendarTest::testLocaleID(j)));
+ }
+#endif
+
+# endif
+#endif
+
+ delete getFieldCal;
+}
+
+static const char *styleName(DateFormat::EStyle s)
+{
+ switch(s)
+ {
+ case DateFormat::SHORT: return "SHORT";
+ case DateFormat::MEDIUM: return "MEDIUM";
+ case DateFormat::LONG: return "LONG";
+ case DateFormat::FULL: return "FULL";
+// case DateFormat::DEFAULT: return "DEFAULT";
+ case DateFormat::DATE_OFFSET: return "DATE_OFFSET";
+ case DateFormat::NONE: return "NONE";
+ case DateFormat::DATE_TIME: return "DATE_TIME";
+ default: return "Unknown";
+ }
+}
+
+void DateFormatRoundTripTest::test(const Locale& loc)
+{
+ UnicodeString temp;
+#if !INFINITE
+ logln("Locale: " + loc.getDisplayName(temp));
+#endif
+
+ // Total possibilities = 24
+ // 4 date
+ // 4 time
+ // 16 date-time
+ UBool TEST_TABLE [24];//= new boolean[24];
+ int32_t i = 0;
+ for(i = 0; i < 24; ++i)
+ TEST_TABLE[i] = TRUE;
+
+ // If we have some sparseness, implement it here. Sparseness decreases
+ // test time by eliminating some tests, up to 23.
+ for(i = 0; i < SPARSENESS; ) {
+ int random = (int)(randFraction() * 24);
+ if (random >= 0 && random < 24 && TEST_TABLE[i]) {
+ TEST_TABLE[i] = FALSE;
+ ++i;
+ }
+ }
+
+ int32_t itable = 0;
+ int32_t style = 0;
+ for(style = DateFormat::FULL; style <= DateFormat::SHORT; ++style) {
+ if(TEST_TABLE[itable++]) {
+ logln("Testing style " + UnicodeString(styleName((DateFormat::EStyle)style)));
+ DateFormat *df = DateFormat::createDateInstance((DateFormat::EStyle)style, loc);
+ if(df == NULL) {
+ errln(UnicodeString("Could not DF::createDateInstance ") + UnicodeString(styleName((DateFormat::EStyle)style)) + " Locale: " + loc.getDisplayName(temp));
+ } else {
+ test(df, loc);
+ delete df;
+ }
+ }
+ }
+
+ for(style = DateFormat::FULL; style <= DateFormat::SHORT; ++style) {
+ if (TEST_TABLE[itable++]) {
+ logln("Testing style " + UnicodeString(styleName((DateFormat::EStyle)style)));
+ DateFormat *df = DateFormat::createTimeInstance((DateFormat::EStyle)style, loc);
+ if(df == NULL) {
+ errln(UnicodeString("Could not DF::createTimeInstance ") + UnicodeString(styleName((DateFormat::EStyle)style)) + " Locale: " + loc.getDisplayName(temp));
+ } else {
+ test(df, loc, TRUE);
+ delete df;
+ }
+ }
+ }
+
+ for(int32_t dstyle = DateFormat::FULL; dstyle <= DateFormat::SHORT; ++dstyle) {
+ for(int32_t tstyle = DateFormat::FULL; tstyle <= DateFormat::SHORT; ++tstyle) {
+ if(TEST_TABLE[itable++]) {
+ logln("Testing dstyle" + UnicodeString(styleName((DateFormat::EStyle)dstyle)) + ", tstyle" + UnicodeString(styleName((DateFormat::EStyle)tstyle)) );
+ DateFormat *df = DateFormat::createDateTimeInstance((DateFormat::EStyle)dstyle, (DateFormat::EStyle)tstyle, loc);
+ if(df == NULL) {
+ errln(UnicodeString("Could not DF::createDateTimeInstance ") + UnicodeString(styleName((DateFormat::EStyle)dstyle)) + ", tstyle" + UnicodeString(styleName((DateFormat::EStyle)tstyle)) + "Locale: " + loc.getDisplayName(temp));
+ } else {
+ test(df, loc);
+ delete df;
+ }
+ }
+ }
+ }
+}
+
+void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UBool timeOnly)
+{
+ UnicodeString pat;
+ if(fmt->getDynamicClassID() != SimpleDateFormat::getStaticClassID()) {
+ errln("DateFormat wasn't a SimpleDateFormat");
+ return;
+ }
+
+ UBool isGregorian = FALSE;
+ UErrorCode minStatus = U_ZERO_ERROR;
+ UDate minDate = CalendarTest::minDateOfCalendar(*fmt->getCalendar(), isGregorian, minStatus);
+ if(U_FAILURE(minStatus)) {
+ errln((UnicodeString)"Failure getting min date for " + origLocale.getName());
+ return;
+ }
+ //logln(UnicodeString("Min date is ") + fullFormat(minDate) + " for " + origLocale.getName());
+
+ pat = ((SimpleDateFormat*)fmt)->toPattern(pat);
+
+ // NOTE TO MAINTAINER
+ // This indexOf check into the pattern needs to be refined to ignore
+ // quoted characters. Currently, this isn't a problem with the locale
+ // patterns we have, but it may be a problem later.
+
+ UBool hasEra = (pat.indexOf(UnicodeString("G")) != -1);
+ UBool hasZoneDisplayName = (pat.indexOf(UnicodeString("z")) != -1) || (pat.indexOf(UnicodeString("v")) != -1)
+ || (pat.indexOf(UnicodeString("V")) != -1);
+
+ // Because patterns contain incomplete data representing the Date,
+ // we must be careful of how we do the roundtrip. We start with
+ // a randomly generated Date because they're easier to generate.
+ // From this we get a string. The string is our real starting point,
+ // because this string should parse the same way all the time. Note
+ // that it will not necessarily parse back to the original date because
+ // of incompleteness in patterns. For example, a time-only pattern won't
+ // parse back to the same date.
+
+ //try {
+ for(int i = 0; i < TRIALS; ++i) {
+ UDate *d = new UDate [DEPTH];
+ UnicodeString *s = new UnicodeString[DEPTH];
+
+ if(isGregorian == TRUE) {
+ d[0] = generateDate();
+ } else {
+ d[0] = generateDate(minDate);
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ // We go through this loop until we achieve a match or until
+ // the maximum loop count is reached. We record the points at
+ // which the date and the string starts to match. Once matching
+ // starts, it should continue.
+ int loop;
+ int dmatch = 0; // d[dmatch].getTime() == d[dmatch-1].getTime()
+ int smatch = 0; // s[smatch].equals(s[smatch-1])
+ for(loop = 0; loop < DEPTH; ++loop) {
+ if (loop > 0) {
+ d[loop] = fmt->parse(s[loop-1], status);
+ failure(status, "fmt->parse", s[loop-1]+" in locale: " + origLocale.getName());
+ status = U_ZERO_ERROR; /* any error would have been reported */
+ }
+
+ s[loop] = fmt->format(d[loop], s[loop]);
+
+ // For displaying which date is being tested
+ //logln(s[loop] + " = " + fullFormat(d[loop]));
+
+ if(s[loop].length() == 0) {
+ errln("FAIL: fmt->format gave 0-length string in " + pat + " with number " + d[loop] + " in locale " + origLocale.getName());
+ }
+
+ if(loop > 0) {
+ if(smatch == 0) {
+ UBool match = s[loop] == s[loop-1];
+ if(smatch == 0) {
+ if(match)
+ smatch = loop;
+ }
+ else if( ! match)
+ errln("FAIL: String mismatch after match");
+ }
+
+ if(dmatch == 0) {
+ // {sfb} watch out here, this might not work
+ UBool match = d[loop]/*.getTime()*/ == d[loop-1]/*.getTime()*/;
+ if(dmatch == 0) {
+ if(match)
+ dmatch = loop;
+ }
+ else if( ! match)
+ errln("FAIL: Date mismatch after match");
+ }
+
+ if(smatch != 0 && dmatch != 0)
+ break;
+ }
+ }
+ // At this point loop == DEPTH if we've failed, otherwise loop is the
+ // max(smatch, dmatch), that is, the index at which we have string and
+ // date matching.
+
+ // Date usually matches in 2. Exceptions handled below.
+ int maxDmatch = 2;
+ int maxSmatch = 1;
+ if (dmatch > maxDmatch) {
+ // Time-only pattern with zone information and a starting date in PST.
+ if(timeOnly && hasZoneDisplayName
+ && fmt->getTimeZone().inDaylightTime(d[0], status) && ! failure(status, "TimeZone::inDST()")) {
+ maxDmatch = 3;
+ maxSmatch = 2;
+ }
+ }
+
+ // String usually matches in 1. Exceptions are checked for here.
+ if(smatch > maxSmatch) { // Don't compute unless necessary
+ UBool in0;
+ // Starts in BC, with no era in pattern
+ if( ! hasEra && getField(d[0], UCAL_ERA) == GregorianCalendar::BC)
+ maxSmatch = 2;
+ // Starts in DST, no year in pattern
+ else if((in0=fmt->getTimeZone().inDaylightTime(d[0], status)) && ! failure(status, "gettingDaylightTime") &&
+ pat.indexOf(UnicodeString("yyyy")) == -1)
+ maxSmatch = 2;
+ // If we start not in DST, but transition into DST
+ else if (!in0 &&
+ fmt->getTimeZone().inDaylightTime(d[1], status) && !failure(status, "gettingDaylightTime"))
+ maxSmatch = 2;
+ // Two digit year with no time zone change,
+ // unless timezone isn't used or we aren't close to the DST changover
+ else if (pat.indexOf(UnicodeString("y")) != -1
+ && pat.indexOf(UnicodeString("yyyy")) == -1
+ && getField(d[0], UCAL_YEAR)
+ != getField(d[dmatch], UCAL_YEAR)
+ && !failure(status, "error status [smatch>maxSmatch]")
+ && ((hasZoneDisplayName
+ && (fmt->getTimeZone().inDaylightTime(d[0], status)
+ == fmt->getTimeZone().inDaylightTime(d[dmatch], status)
+ || getField(d[0], UCAL_MONTH) == UCAL_APRIL
+ || getField(d[0], UCAL_MONTH) == UCAL_OCTOBER))
+ || !hasZoneDisplayName)
+ )
+ {
+ maxSmatch = 2;
+ }
+ // If zone display name is used, fallback format might be used before 1970
+ else if (hasZoneDisplayName && d[0] < 0) {
+ maxSmatch = 2;
+ }
+ }
+
+ if(dmatch > maxDmatch || smatch > maxSmatch) { // Special case for Japanese and Islamic (could have large negative years)
+ const char *type = fmt->getCalendar()->getType();
+ if(!strcmp(type,"japanese")) {
+ maxSmatch = 4;
+ maxDmatch = 4;
+ }
+ }
+
+ // Use @v to see verbose results on successful cases
+ UBool fail = (dmatch > maxDmatch || smatch > maxSmatch);
+ if (optionv || fail) {
+ if (fail) {
+ errln(UnicodeString("\nFAIL: Pattern: ") + pat +
+ " in Locale: " + origLocale.getName());
+ } else {
+ errln(UnicodeString("\nOk: Pattern: ") + pat +
+ " in Locale: " + origLocale.getName());
+ }
+
+ logln("Date iters until match=%d (max allowed=%d), string iters until match=%d (max allowed=%d)",
+ dmatch,maxDmatch, smatch, maxSmatch);
+
+ for(int j = 0; j <= loop && j < DEPTH; ++j) {
+ UnicodeString temp;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ errln((j>0?" P> ":" ") + fullFormat(d[j]) + " F> " +
+ escape(s[j], temp) + UnicodeString(" d=") + d[j] +
+ (j > 0 && d[j]/*.getTime()*/==d[j-1]/*.getTime()*/?" d==":"") +
+ (j > 0 && s[j] == s[j-1]?" s==":""));
+ }
+ }
+ delete[] d;
+ delete[] s;
+ }
+ /*}
+ catch (ParseException e) {
+ errln("Exception: " + e.getMessage());
+ logln(e.toString());
+ }*/
+}
+
+const UnicodeString& DateFormatRoundTripTest::fullFormat(UDate d) {
+ UErrorCode ec = U_ZERO_ERROR;
+ if (dateFormat == 0) {
+ dateFormat = new SimpleDateFormat((UnicodeString)"EEE MMM dd HH:mm:ss.SSS zzz yyyy G", ec);
+ if (U_FAILURE(ec) || dateFormat == 0) {
+ fgStr = "[FAIL: SimpleDateFormat constructor]";
+ delete dateFormat;
+ dateFormat = 0;
+ return fgStr;
+ }
+ }
+ fgStr.truncate(0);
+ dateFormat->format(d, fgStr);
+ return fgStr;
+}
+
+/**
+ * Return a field of the given date
+ */
+int32_t DateFormatRoundTripTest::getField(UDate d, int32_t f) {
+ // Should be synchronized, but we're single threaded so it's ok
+ UErrorCode status = U_ZERO_ERROR;
+ getFieldCal->setTime(d, status);
+ failure(status, "getfieldCal->setTime");
+ int32_t ret = getFieldCal->get((UCalendarDateFields)f, status);
+ failure(status, "getfieldCal->get");
+ return ret;
+}
+
+UnicodeString& DateFormatRoundTripTest::escape(const UnicodeString& src, UnicodeString& dst )
+{
+ dst.remove();
+ for (int32_t i = 0; i < src.length(); ++i) {
+ UChar c = src[i];
+ if(c < 0x0080)
+ dst += c;
+ else {
+ dst += UnicodeString("[");
+ char buf [8];
+ sprintf(buf, "%#x", c);
+ dst += UnicodeString(buf);
+ dst += UnicodeString("]");
+ }
+ }
+
+ return dst;
+}
+
+#define U_MILLIS_PER_YEAR (365.25 * 24 * 60 * 60 * 1000)
+
+UDate DateFormatRoundTripTest::generateDate(UDate minDate)
+{
+ // Bring range in conformance to generateDate() below.
+ if(minDate < (U_MILLIS_PER_YEAR * -(4000-1970))) {
+ minDate = (U_MILLIS_PER_YEAR * -(4000-1970));
+ }
+ for(int i=0;i<8;i++) {
+ double a = randFraction();
+
+ // Range from (min) to (8000-1970) AD
+ double dateRange = (0.0 - minDate) + (U_MILLIS_PER_YEAR + (8000-1970));
+
+ a *= dateRange;
+
+ // Now offset from minDate
+ a += minDate;
+
+ // Last sanity check
+ if(a>=minDate) {
+ return a;
+ }
+ }
+ return minDate;
+}
+
+UDate DateFormatRoundTripTest::generateDate()
+{
+ double a = randFraction();
+
+ // Now 'a' ranges from 0..1; scale it to range from 0 to 8000 years
+ a *= 8000;
+
+ // Range from (4000-1970) BC to (8000-1970) AD
+ a -= 4000;
+
+ // Now scale up to ms
+ a *= 365.25 * 24 * 60 * 60 * 1000;
+
+ //return new Date((long)a);
+ return a;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.h b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.h
new file mode 100644
index 00000000000..1749d0e6826
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmtrtts.h
@@ -0,0 +1,96 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _DATEFORMATROUNDTRIPTEST_
+#define _DATEFORMATROUNDTRIPTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/calendar.h"
+#include "intltest.h"
+
+/**
+ * Performs round-trip tests for DateFormat
+ **/
+class DateFormatRoundTripTest : public IntlTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+
+public:
+ DateFormatRoundTripTest();
+ virtual ~DateFormatRoundTripTest();
+
+ void TestDateFormatRoundTrip(void);
+ void TestCentury(void);
+ void test(const Locale& loc);
+ void test(DateFormat *fmt, const Locale &origLocale, UBool timeOnly = FALSE );
+ int32_t getField(UDate d, int32_t f);
+ UnicodeString& escape(const UnicodeString& src, UnicodeString& dst);
+ UDate generateDate(void);
+ UDate generateDate(UDate minDate);
+
+
+//============================================================
+// statics
+//============================================================
+
+/**
+ * Return a random uint32_t
+ **/
+static uint32_t randLong() {
+ // The portable IntlTest::random() function has sufficient
+ // resolution for a 16-bit value, but not for 32 bits.
+ return ((uint32_t) (IntlTest::random() * (1<<16))) |
+ (((uint32_t) (IntlTest::random() * (1<<16))) << 16);
+}
+
+/**
+ * Return a random double 0 <= x <= 1.0
+ **/
+static double randFraction()
+{
+ return (double)randLong() / (double)0xFFFFFFFF;
+}
+
+/**
+ * Return a random value from -range..+range (closed).
+ **/
+static double randDouble(double range)
+{
+ double a = randFraction();
+ //while(TPlatformUtilities::isInfinite(a) || TPlatformUtilities::isNaN(a))
+ // a = randFraction();
+ return (2.0 * range * a) - range;
+}
+
+protected:
+ UBool failure(UErrorCode status, const char* msg);
+ UBool failure(UErrorCode status, const char* msg, const UnicodeString& str);
+
+ const UnicodeString& fullFormat(UDate d);
+
+private:
+
+ static int32_t SPARSENESS;
+ static int32_t TRIALS;
+ static int32_t DEPTH;
+
+ UBool optionv; // TRUE if @v option is given on command line
+ SimpleDateFormat *dateFormat;
+ UnicodeString fgStr;
+ Calendar *getFieldCal;
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _DATEFORMATROUNDTRIPTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.cpp
new file mode 100644
index 00000000000..82e8018420c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.cpp
@@ -0,0 +1,2937 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "dtfmttst.h"
+#include "unicode/timezone.h"
+#include "unicode/gregocal.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/datefmt.h"
+#include "unicode/simpletz.h"
+#include "unicode/strenum.h"
+#include "unicode/dtfmtsym.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "caltest.h" // for fieldName
+#include <stdio.h> // for sprintf
+
+#ifdef U_WINDOWS
+#include "windttst.h"
+#endif
+
+#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+
+#define ASSERT_OK(status) if(U_FAILURE(status)) {errln(#status " = %s @ %s:%d", u_errorName(status), __FILE__, __LINE__); return; }
+
+//--------------------------------------------------------------------
+// Time bomb - allows temporary behavior that expires at a given
+// release
+//--------------------------------------------------------------------
+static const UVersionInfo ICU_39 = {3,9,0,0};
+
+// *****************************************************************************
+// class DateFormatTest
+// *****************************************************************************
+
+void DateFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite DateFormatTest");
+ switch (index) {
+ TESTCASE(0,TestEquals);
+ TESTCASE(1,TestTwoDigitYearDSTParse);
+ TESTCASE(2,TestFieldPosition);
+ TESTCASE(3,TestPartialParse994);
+ TESTCASE(4,TestRunTogetherPattern985);
+ TESTCASE(5,TestRunTogetherPattern917);
+ TESTCASE(6,TestCzechMonths459);
+ TESTCASE(7,TestLetterDPattern212);
+ TESTCASE(8,TestDayOfYearPattern195);
+ TESTCASE(9,TestQuotePattern161);
+ TESTCASE(10,TestBadInput135);
+ TESTCASE(11,TestBadInput135a);
+ TESTCASE(12,TestTwoDigitYear);
+ TESTCASE(13,TestDateFormatZone061);
+ TESTCASE(14,TestDateFormatZone146);
+ TESTCASE(15,TestLocaleDateFormat);
+ TESTCASE(16,TestWallyWedel);
+ TESTCASE(17,TestDateFormatCalendar);
+ TESTCASE(18,TestSpaceParsing);
+ TESTCASE(19,TestExactCountFormat);
+ TESTCASE(20,TestWhiteSpaceParsing);
+ TESTCASE(21,TestInvalidPattern);
+ TESTCASE(22,TestGeneral);
+ TESTCASE(23,TestGreekMay);
+ TESTCASE(24,TestGenericTime);
+ TESTCASE(25,TestGenericTimeZoneOrder);
+ TESTCASE(26,TestHost);
+ TESTCASE(27,TestEras);
+ TESTCASE(28,TestNarrowNames);
+ TESTCASE(29,TestStandAloneDays);
+ TESTCASE(30,TestStandAloneMonths);
+ TESTCASE(31,TestQuarters);
+ TESTCASE(32,TestZTimeZoneParsing);
+ TESTCASE(33,TestRelative);
+ TESTCASE(34,TestRelativeClone);
+ TESTCASE(35,TestHostClone);
+ TESTCASE(36,TestTimeZoneDisplayName);
+ /*
+ TESTCASE(37,TestRelativeError);
+ TESTCASE(38,TestRelativeOther);
+ */
+ default: name = ""; break;
+ }
+}
+
+// Test written by Wally Wedel and emailed to me.
+void DateFormatTest::TestWallyWedel()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ /*
+ * Instantiate a TimeZone so we can get the ids.
+ */
+ TimeZone *tz = new SimpleTimeZone(7,"");
+ /*
+ * Computational variables.
+ */
+ int32_t offset, hours, minutes, seconds;
+ /*
+ * Instantiate a SimpleDateFormat set up to produce a full time
+ zone name.
+ */
+ SimpleDateFormat *sdf = new SimpleDateFormat((UnicodeString)"zzzz", status);
+ /*
+ * A String array for the time zone ids.
+ */
+ int32_t ids_length;
+ StringEnumeration* ids = TimeZone::createEnumeration();
+ ids_length = ids->count(status);
+ /*
+ * How many ids do we have?
+ */
+ logln("Time Zone IDs size: %d", ids_length);
+ /*
+ * Column headings (sort of)
+ */
+ logln("Ordinal ID offset(h:m) name");
+ /*
+ * Loop through the tzs.
+ */
+ UDate today = Calendar::getNow();
+ Calendar *cal = Calendar::createInstance(status);
+ for (int32_t i = 0; i < ids_length; i++) {
+ // logln(i + " " + ids[i]);
+ const UnicodeString* id = ids->snext(status);
+ TimeZone *ttz = TimeZone::createTimeZone(*id);
+ // offset = ttz.getRawOffset();
+ cal->setTimeZone(*ttz);
+ cal->setTime(today, status);
+ offset = cal->get(UCAL_ZONE_OFFSET, status) + cal->get(UCAL_DST_OFFSET, status);
+ // logln(i + " " + ids[i] + " offset " + offset);
+ const char* sign = "+";
+ if (offset < 0) {
+ sign = "-";
+ offset = -offset;
+ }
+ hours = offset/3600000;
+ minutes = (offset%3600000)/60000;
+ seconds = (offset%60000)/1000;
+ UnicodeString dstOffset = (UnicodeString)"" + sign + (hours < 10 ? "0" : "") +
+ (int32_t)hours + ":" + (minutes < 10 ? "0" : "") + (int32_t)minutes;
+ if (seconds != 0) {
+ dstOffset = dstOffset + ":" + (seconds < 10 ? "0" : "") + seconds;
+ }
+ /*
+ * Instantiate a date so we can display the time zone name.
+ */
+ sdf->setTimeZone(*ttz);
+ /*
+ * Format the output.
+ */
+ UnicodeString fmtOffset;
+ FieldPosition pos(0);
+ sdf->format(today,fmtOffset, pos);
+ // UnicodeString fmtOffset = tzS.toString();
+ UnicodeString *fmtDstOffset = 0;
+ if (fmtOffset.startsWith("GMT"))
+ {
+ //fmtDstOffset = fmtOffset->substring(3);
+ fmtDstOffset = new UnicodeString();
+ fmtOffset.extract(3, fmtOffset.length(), *fmtDstOffset);
+ }
+ /*
+ * Show our result.
+ */
+ UBool ok = fmtDstOffset == 0 || *fmtDstOffset == dstOffset;
+ if (ok)
+ {
+ logln(UnicodeString() + i + " " + *id + " " + dstOffset +
+ " " + fmtOffset +
+ (fmtDstOffset != 0 ? " ok" : " ?"));
+ }
+ else
+ {
+ errln(UnicodeString() + i + " " + *id + " " + dstOffset +
+ " " + fmtOffset + " *** FAIL ***");
+ }
+ delete ttz;
+ delete fmtDstOffset;
+ }
+ delete cal;
+ // delete ids; // TODO: BAD API
+ delete ids;
+ delete sdf;
+ delete tz;
+}
+
+// -------------------------------------
+
+/**
+ * Test operator==
+ */
+void
+DateFormatTest::TestEquals()
+{
+ DateFormat* fmtA = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::FULL);
+ DateFormat* fmtB = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::FULL);
+ if ( fmtA == NULL || fmtB == NULL){
+ dataerrln("Error calling DateFormat::createDateTimeInstance");
+ delete fmtA;
+ delete fmtB;
+ return;
+ }
+
+ if (!(*fmtA == *fmtB)) errln((UnicodeString)"FAIL");
+ delete fmtA;
+ delete fmtB;
+
+ TimeZone* test = TimeZone::createTimeZone("PDT");
+ delete test;
+}
+
+// -------------------------------------
+
+/**
+ * Test the parsing of 2-digit years.
+ */
+void
+DateFormatTest::TestTwoDigitYearDSTParse(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat* fullFmt = new SimpleDateFormat((UnicodeString)"EEE MMM dd HH:mm:ss.SSS zzz yyyy G", status);
+ SimpleDateFormat *fmt = new SimpleDateFormat((UnicodeString)"dd-MMM-yy h:mm:ss 'o''clock' a z", Locale::getEnglish(), status);
+ //DateFormat* fmt = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::FULL, Locale::ENGLISH);
+ UnicodeString* s = new UnicodeString("03-Apr-04 2:20:47 o'clock AM PST", "");
+ TimeZone* defaultTZ = TimeZone::createDefault();
+ TimeZone* PST = TimeZone::createTimeZone("PST");
+ int32_t defaultOffset = defaultTZ->getRawOffset();
+ int32_t PSTOffset = PST->getRawOffset();
+ int32_t hour = 2 + (defaultOffset - PSTOffset) / (60*60*1000);
+ // hour is the expected hour of day, in units of seconds
+ hour = ((hour < 0) ? hour + 24 : hour) * 60*60;
+
+ UnicodeString str;
+
+ if(U_FAILURE(status)) {
+ errln("Could not set up test. exitting");
+ return;
+ }
+
+ UDate d = fmt->parse(*s, status);
+ logln(*s + " P> " + ((DateFormat*)fullFmt)->format(d, str));
+ int32_t y, m, day, hr, min, sec;
+ dateToFields(d, y, m, day, hr, min, sec);
+ hour += defaultTZ->inDaylightTime(d, status) ? 1 : 0;
+ hr = hr*60*60;
+ if (hr != hour)
+ errln((UnicodeString)"FAIL: Should parse to hour " + hour + " but got " + hr);
+
+ if (U_FAILURE(status))
+ errln((UnicodeString)"FAIL: " + (int32_t)status);
+
+ delete s;
+ delete fmt;
+ delete fullFmt;
+ delete PST;
+ delete defaultTZ;
+}
+
+// -------------------------------------
+
+UChar toHexString(int32_t i) { return (UChar)(i + (i < 10 ? 0x30 : (0x41 - 10))); }
+
+UnicodeString&
+DateFormatTest::escape(UnicodeString& s)
+{
+ UnicodeString buf;
+ for (int32_t i=0; i<s.length(); ++i)
+ {
+ UChar c = s[(int32_t)i];
+ if (c <= (UChar)0x7F) buf += c;
+ else {
+ buf += (UChar)0x5c; buf += (UChar)0x55;
+ buf += toHexString((c & 0xF000) >> 12);
+ buf += toHexString((c & 0x0F00) >> 8);
+ buf += toHexString((c & 0x00F0) >> 4);
+ buf += toHexString(c & 0x000F);
+ }
+ }
+ return (s = buf);
+}
+
+// -------------------------------------
+
+/**
+ * This MUST be kept in sync with DateFormatSymbols.gPatternChars.
+ */
+static const char* PATTERN_CHARS = "GyMdkHmsSEDFwWahKzYeugAZvcLQqV";
+
+/**
+ * A list of the names of all the fields in DateFormat.
+ * This MUST be kept in sync with DateFormat.
+ */
+static const char* DATEFORMAT_FIELD_NAMES[] = {
+ "ERA_FIELD",
+ "YEAR_FIELD",
+ "MONTH_FIELD",
+ "DATE_FIELD",
+ "HOUR_OF_DAY1_FIELD",
+ "HOUR_OF_DAY0_FIELD",
+ "MINUTE_FIELD",
+ "SECOND_FIELD",
+ "MILLISECOND_FIELD",
+ "DAY_OF_WEEK_FIELD",
+ "DAY_OF_YEAR_FIELD",
+ "DAY_OF_WEEK_IN_MONTH_FIELD",
+ "WEEK_OF_YEAR_FIELD",
+ "WEEK_OF_MONTH_FIELD",
+ "AM_PM_FIELD",
+ "HOUR1_FIELD",
+ "HOUR0_FIELD",
+ "TIMEZONE_FIELD",
+ "YEAR_WOY_FIELD",
+ "DOW_LOCAL_FIELD",
+ "EXTENDED_YEAR_FIELD",
+ "JULIAN_DAY_FIELD",
+ "MILLISECONDS_IN_DAY_FIELD",
+ "TIMEZONE_RFC_FIELD",
+ "GENERIC_TIMEZONE_FIELD",
+ "STAND_ALONE_DAY_FIELD",
+ "STAND_ALONE_MONTH_FIELD",
+ "QUARTER_FIELD",
+ "STAND_ALONE_QUARTER_FIELD",
+ "TIMEZONE_SPECIAL_FIELD"
+};
+
+static const int32_t DATEFORMAT_FIELD_NAMES_LENGTH =
+ sizeof(DATEFORMAT_FIELD_NAMES) / sizeof(DATEFORMAT_FIELD_NAMES[0]);
+
+/**
+ * Verify that returned field position indices are correct.
+ */
+void DateFormatTest::TestFieldPosition() {
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t i, j, exp;
+ UnicodeString buf;
+
+ // Verify data
+ DateFormatSymbols rootSyms(Locale(""), ec);
+ assertSuccess("DateFormatSymbols", ec);
+
+ // local pattern chars data is not longer loaded
+ // from icu locale bundle
+ assertEquals("patternChars", PATTERN_CHARS, rootSyms.getLocalPatternChars(buf));
+ assertEquals("patternChars", PATTERN_CHARS, DateFormatSymbols::getPatternUChars());
+ assertTrue("DATEFORMAT_FIELD_NAMES", DATEFORMAT_FIELD_NAMES_LENGTH == UDAT_FIELD_COUNT);
+ assertTrue("Data", UDAT_FIELD_COUNT == uprv_strlen(PATTERN_CHARS));
+
+ // Create test formatters
+ const int32_t COUNT = 4;
+ DateFormat* dateFormats[COUNT];
+ dateFormats[0] = DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull, Locale::getUS());
+ dateFormats[1] = DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull, Locale::getFrance());
+ // Make the pattern "G y M d..."
+ buf.remove().append(PATTERN_CHARS);
+ for (j=buf.length()-1; j>=0; --j) buf.insert(j, (UChar)32/*' '*/);
+ dateFormats[2] = new SimpleDateFormat(buf, Locale::getUS(), ec);
+ // Make the pattern "GGGG yyyy MMMM dddd..."
+ for (j=buf.length()-1; j>=0; j-=2) {
+ for (i=0; i<3; ++i) {
+ buf.insert(j, buf.charAt(j));
+ }
+ }
+ dateFormats[3] = new SimpleDateFormat(buf, Locale::getUS(), ec);
+ if(U_FAILURE(ec)){
+ errln(UnicodeString("Could not create SimpleDateFormat object for locale en_US. Error: " )+ UnicodeString(u_errorName(ec)));
+ return;
+ }
+ UDate aug13 = 871508052513.0;
+
+ // Expected output field values for above DateFormats on aug13
+ // Fields are given in order of DateFormat field number
+ const char* EXPECTED[] = {
+ "", "1997", "August", "13", "", "", "34", "12", "",
+ "Wednesday", "", "", "", "", "PM", "2", "", "", "", "", "", "", "", "", "PT", "", "", "", "","",
+
+ "", "1997", "ao\\u00FBt", "13", "", "14", "34", "12", "",
+ "mercredi", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\u00C9tats-Unis (Los Angeles)", "", "", "", "", "",
+
+ "AD", "1997", "8", "13", "14", "14", "34", "12", "5",
+ "Wed", "225", "2", "33", "3", "PM", "2", "2", "PDT", "1997", "4", "1997", "2450674", "52452513", "-0700", "PT", "4", "8", "3", "3","PDT",
+
+ "Anno Domini", "1997", "August", "0013", "0014", "0014", "0034", "0012", "5130",
+ "Wednesday", "0225", "0002", "0033", "0003", "PM", "0002", "0002", "Pacific Daylight Time", "1997", "0004", "1997", "2450674", "52452513", "GMT-07:00",
+ "Pacific Time", "Wednesday", "August", "3rd quarter", "3rd quarter", "United States (Los Angeles)"
+ };
+
+ const int32_t EXPECTED_LENGTH = sizeof(EXPECTED)/sizeof(EXPECTED[0]);
+
+ assertTrue("data size", EXPECTED_LENGTH == COUNT * UDAT_FIELD_COUNT);
+
+ TimeZone* PT = TimeZone::createTimeZone("America/Los_Angeles");
+ for (j = 0, exp = 0; j < COUNT; ++j) {
+ // String str;
+ DateFormat* df = dateFormats[j];
+ df->setTimeZone(*PT);
+ if (df->getDynamicClassID() == SimpleDateFormat::getStaticClassID()) {
+ logln(" Pattern = " + ((SimpleDateFormat*) df)->toPattern(buf.remove()));
+ } else {
+ logln(" Pattern = ? (not a SimpleDateFormat)");
+ }
+ logln((UnicodeString)" Result = " + df->format(aug13, buf.remove()));
+
+ for (i = 0; i < UDAT_FIELD_COUNT; ++i, ++exp) {
+ FieldPosition pos(i);
+ buf.remove();
+ df->format(aug13, buf, pos);
+ UnicodeString field;
+ buf.extractBetween(pos.getBeginIndex(), pos.getEndIndex(), field);
+ assertEquals((UnicodeString)"field #" + i + " " + DATEFORMAT_FIELD_NAMES[i],
+ ctou(EXPECTED[exp]), field);
+ }
+ }
+
+ for (i=0; i<COUNT; ++i) {
+ delete dateFormats[i];
+ }
+ delete PT;
+}
+
+// -------------------------------------
+
+/**
+ * General parse/format tests. Add test cases as needed.
+ */
+void DateFormatTest::TestGeneral() {
+ const char* DATA[] = {
+ "yyyy MM dd HH:mm:ss.SSS",
+
+ // Milliseconds are left-justified, since they format as fractions of a second
+ "y/M/d H:mm:ss.S", "fp", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.6", "2004 03 10 16:36:31.600",
+ "y/M/d H:mm:ss.SS", "fp", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.57", "2004 03 10 16:36:31.570",
+ "y/M/d H:mm:ss.SSS", "F", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.567",
+ "y/M/d H:mm:ss.SSSS", "pf", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.568", "2004/3/10 16:36:31.5680",
+ };
+ expect(DATA, ARRAY_SIZE(DATA), Locale("en", "", ""));
+}
+
+// -------------------------------------
+
+/**
+ * Verify that strings which contain incomplete specifications are parsed
+ * correctly. In some instances, this means not being parsed at all, and
+ * returning an appropriate error.
+ */
+void
+DateFormatTest::TestPartialParse994()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat* f = new SimpleDateFormat(status);
+ ASSERT_OK(status);
+ UDate null = 0;
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10:11:42", date(97, 1 - 1, 17, 10, 11, 42));
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10:", null);
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10", null);
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 ", null);
+ tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17", null);
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+ delete f;
+}
+
+// -------------------------------------
+
+void
+DateFormatTest::tryPat994(SimpleDateFormat* format, const char* pat, const char* str, UDate expected)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UDate null = 0;
+ logln(UnicodeString("Pattern \"") + pat + "\" String \"" + str + "\"");
+ //try {
+ format->applyPattern(pat);
+ UDate date = format->parse(str, status);
+ if (U_FAILURE(status) || date == null)
+ {
+ logln((UnicodeString)"ParseException: " + (int32_t)status);
+ if (expected != null) errln((UnicodeString)"FAIL: Expected " + dateToString(expected));
+ }
+ else
+ {
+ UnicodeString f;
+ ((DateFormat*)format)->format(date, f);
+ logln(UnicodeString(" parse(") + str + ") -> " + dateToString(date));
+ logln((UnicodeString)" format -> " + f);
+ if (expected == null ||
+ !(date == expected)) errln((UnicodeString)"FAIL: Expected null");//" + expected);
+ if (!(f == str)) errln(UnicodeString("FAIL: Expected ") + str);
+ }
+ //}
+ //catch(ParseException e) {
+ // logln((UnicodeString)"ParseException: " + e.getMessage());
+ // if (expected != null) errln((UnicodeString)"FAIL: Expected " + dateToString(expected));
+ //}
+ //catch(Exception e) {
+ // errln((UnicodeString)"*** Exception:");
+ // e.printStackTrace();
+ //}
+}
+
+// -------------------------------------
+
+/**
+ * Verify the behavior of patterns in which digits for different fields run together
+ * without intervening separators.
+ */
+void
+DateFormatTest::TestRunTogetherPattern985()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString format("yyyyMMddHHmmssSSS");
+ UnicodeString now, then;
+ //UBool flag;
+ SimpleDateFormat *formatter = new SimpleDateFormat(format, status);
+ ASSERT_OK(status);
+ UDate date1 = Calendar::getNow();
+ ((DateFormat*)formatter)->format(date1, now);
+ logln(now);
+ ParsePosition pos(0);
+ UDate date2 = formatter->parse(now, pos);
+ if (date2 == 0) then = "Parse stopped at " + pos.getIndex();
+ else ((DateFormat*)formatter)->format(date2, then);
+ logln(then);
+ if (!(date2 == date1)) errln((UnicodeString)"FAIL");
+ delete formatter;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+// -------------------------------------
+
+/**
+ * Verify the behavior of patterns in which digits for different fields run together
+ * without intervening separators.
+ */
+void
+DateFormatTest::TestRunTogetherPattern917()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat* fmt;
+ UnicodeString myDate;
+ fmt = new SimpleDateFormat((UnicodeString)"yyyy/MM/dd", status);
+ ASSERT_OK(status);
+ myDate = "1997/02/03";
+ testIt917(fmt, myDate, date(97, 2 - 1, 3));
+ delete fmt;
+ fmt = new SimpleDateFormat((UnicodeString)"yyyyMMdd", status);
+ myDate = "19970304";
+ testIt917(fmt, myDate, date(97, 3 - 1, 4));
+ delete fmt;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+// -------------------------------------
+
+void
+DateFormatTest::testIt917(SimpleDateFormat* fmt, UnicodeString& str, UDate expected)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern;
+ logln((UnicodeString)"pattern=" + fmt->toPattern(pattern) + " string=" + str);
+ Formattable o;
+ //try {
+ ((Format*)fmt)->parseObject(str, o, status);
+ //}
+ if (U_FAILURE(status)) return;
+ //catch(ParseException e) {
+ // e.printStackTrace();
+ // return;
+ //}
+ logln((UnicodeString)"Parsed object: " + dateToString(o.getDate()));
+ if (!(o.getDate() == expected)) errln((UnicodeString)"FAIL: Expected " + dateToString(expected));
+ UnicodeString formatted; ((Format*)fmt)->format(o, formatted, status);
+ logln((UnicodeString)"Formatted string: " + formatted);
+ if (!(formatted == str)) errln((UnicodeString)"FAIL: Expected " + str);
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+// -------------------------------------
+
+/**
+ * Verify the handling of Czech June and July, which have the unique attribute that
+ * one is a proper prefix substring of the other.
+ */
+void
+DateFormatTest::TestCzechMonths459()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormat* fmt = DateFormat::createDateInstance(DateFormat::FULL, Locale("cs", "", ""));
+ if (fmt == NULL){
+ dataerrln("Error calling DateFormat::createDateInstance()");
+ return;
+ }
+
+ UnicodeString pattern;
+ logln((UnicodeString)"Pattern " + ((SimpleDateFormat*) fmt)->toPattern(pattern));
+ UDate june = date(97, UCAL_JUNE, 15);
+ UDate july = date(97, UCAL_JULY, 15);
+ UnicodeString juneStr; fmt->format(june, juneStr);
+ UnicodeString julyStr; fmt->format(july, julyStr);
+ //try {
+ logln((UnicodeString)"format(June 15 1997) = " + juneStr);
+ UDate d = fmt->parse(juneStr, status);
+ UnicodeString s; fmt->format(d, s);
+ int32_t month,yr,day,hr,min,sec; dateToFields(d,yr,month,day,hr,min,sec);
+ logln((UnicodeString)" -> parse -> " + s + " (month = " + month + ")");
+ if (month != UCAL_JUNE) errln((UnicodeString)"FAIL: Month should be June");
+ logln((UnicodeString)"format(July 15 1997) = " + julyStr);
+ d = fmt->parse(julyStr, status);
+ fmt->format(d, s);
+ dateToFields(d,yr,month,day,hr,min,sec);
+ logln((UnicodeString)" -> parse -> " + s + " (month = " + month + ")");
+ if (month != UCAL_JULY) errln((UnicodeString)"FAIL: Month should be July");
+ //}
+ //catch(ParseException e) {
+ if (U_FAILURE(status))
+ errln((UnicodeString)"Exception: " + (int32_t)status);
+ //}
+ delete fmt;
+}
+
+// -------------------------------------
+
+/**
+ * Test the handling of 'D' in patterns.
+ */
+void
+DateFormatTest::TestLetterDPattern212()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString dateString("1995-040.05:01:29");
+ UnicodeString bigD("yyyy-DDD.hh:mm:ss");
+ UnicodeString littleD("yyyy-ddd.hh:mm:ss");
+ UDate expLittleD = date(95, 0, 1, 5, 1, 29);
+ UDate expBigD = expLittleD + 39 * 24 * 3600000.0;
+ expLittleD = expBigD; // Expect the same, with default lenient parsing
+ logln((UnicodeString)"dateString= " + dateString);
+ SimpleDateFormat *formatter = new SimpleDateFormat(bigD, status);
+ ASSERT_OK(status);
+ ParsePosition pos(0);
+ UDate myDate = formatter->parse(dateString, pos);
+ logln((UnicodeString)"Using " + bigD + " -> " + myDate);
+ if (myDate != expBigD) errln((UnicodeString)"FAIL: Expected " + dateToString(expBigD));
+ delete formatter;
+ formatter = new SimpleDateFormat(littleD, status);
+ ASSERT_OK(status);
+ pos = ParsePosition(0);
+ myDate = formatter->parse(dateString, pos);
+ logln((UnicodeString)"Using " + littleD + " -> " + dateToString(myDate));
+ if (myDate != expLittleD) errln((UnicodeString)"FAIL: Expected " + dateToString(expLittleD));
+ delete formatter;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+// -------------------------------------
+
+/**
+ * Test the day of year pattern.
+ */
+void
+DateFormatTest::TestDayOfYearPattern195()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UDate today = Calendar::getNow();
+ int32_t year,month,day,hour,min,sec; dateToFields(today,year,month,day,hour,min,sec);
+ UDate expected = date(year, month, day);
+ logln((UnicodeString)"Test Date: " + dateToString(today));
+ SimpleDateFormat* sdf = (SimpleDateFormat*)DateFormat::createDateInstance();
+ if (sdf == NULL){
+ dataerrln("Error calling DateFormat::createDateInstance()");
+ return;
+ }
+ tryPattern(*sdf, today, 0, expected);
+ tryPattern(*sdf, today, "G yyyy DDD", expected);
+ delete sdf;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+// -------------------------------------
+
+void
+DateFormatTest::tryPattern(SimpleDateFormat& sdf, UDate d, const char* pattern, UDate expected)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ if (pattern != 0) sdf.applyPattern(pattern);
+ UnicodeString thePat;
+ logln((UnicodeString)"pattern: " + sdf.toPattern(thePat));
+ UnicodeString formatResult; (*(DateFormat*)&sdf).format(d, formatResult);
+ logln((UnicodeString)" format -> " + formatResult);
+ // try {
+ UDate d2 = sdf.parse(formatResult, status);
+ logln((UnicodeString)" parse(" + formatResult + ") -> " + dateToString(d2));
+ if (d2 != expected) errln((UnicodeString)"FAIL: Expected " + dateToString(expected));
+ UnicodeString format2; (*(DateFormat*)&sdf).format(d2, format2);
+ logln((UnicodeString)" format -> " + format2);
+ if (!(formatResult == format2)) errln((UnicodeString)"FAIL: Round trip drift");
+ //}
+ //catch(Exception e) {
+ if (U_FAILURE(status))
+ errln((UnicodeString)"Error: " + (int32_t)status);
+ //}
+}
+
+// -------------------------------------
+
+/**
+ * Test the handling of single quotes in patterns.
+ */
+void
+DateFormatTest::TestQuotePattern161()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat* formatter = new SimpleDateFormat((UnicodeString)"MM/dd/yyyy 'at' hh:mm:ss a zzz", status);
+ ASSERT_OK(status);
+ UDate currentTime_1 = date(97, UCAL_AUGUST, 13, 10, 42, 28);
+ UnicodeString dateString; ((DateFormat*)formatter)->format(currentTime_1, dateString);
+ UnicodeString exp("08/13/1997 at 10:42:28 AM ");
+ logln((UnicodeString)"format(" + dateToString(currentTime_1) + ") = " + dateString);
+ if (0 != dateString.compareBetween(0, exp.length(), exp, 0, exp.length())) errln((UnicodeString)"FAIL: Expected " + exp);
+ delete formatter;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+// -------------------------------------
+
+/**
+ * Verify the correct behavior when handling invalid input strings.
+ */
+void
+DateFormatTest::TestBadInput135()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormat::EStyle looks[] = {
+ DateFormat::SHORT, DateFormat::MEDIUM, DateFormat::LONG, DateFormat::FULL
+ };
+ int32_t looks_length = (int32_t)(sizeof(looks) / sizeof(looks[0]));
+ const char* strings[] = {
+ "Mar 15", "Mar 15 1997", "asdf", "3/1/97 1:23:", "3/1/00 1:23:45 AM"
+ };
+ int32_t strings_length = (int32_t)(sizeof(strings) / sizeof(strings[0]));
+ DateFormat *full = DateFormat::createDateTimeInstance(DateFormat::LONG, DateFormat::LONG);
+ if(full==NULL) {
+ errln("could not create date time instance");
+ return;
+ }
+ UnicodeString expected("March 1, 2000 1:23:45 AM ");
+ for (int32_t i = 0; i < strings_length;++i) {
+ const char* text = strings[i];
+ for (int32_t j = 0; j < looks_length;++j) {
+ DateFormat::EStyle dateLook = looks[j];
+ for (int32_t k = 0; k < looks_length;++k) {
+ DateFormat::EStyle timeLook = looks[k];
+ DateFormat *df = DateFormat::createDateTimeInstance(dateLook, timeLook);
+ if (df == NULL){
+ dataerrln("Error calling DateFormat::createDateTimeInstance()");
+ continue;
+ }
+ UnicodeString prefix = UnicodeString(text) + ", " + dateLook + "/" + timeLook + ": ";
+ //try {
+ UDate when = df->parse(text, status);
+ if (when == 0 && U_SUCCESS(status)) {
+ errln(prefix + "SHOULD NOT HAPPEN: parse returned 0.");
+ continue;
+ }
+ if (U_SUCCESS(status))
+ {
+ UnicodeString format;
+ full->format(when, format);
+ logln(prefix + "OK: " + format);
+ if (0!=format.compareBetween(0, expected.length(), expected, 0, expected.length()))
+ errln((UnicodeString)"FAIL: Expected " + expected + " got " + format);
+ }
+ //}
+ //catch(ParseException e) {
+ else
+ status = U_ZERO_ERROR;
+ //}
+ //catch(StringIndexOutOfBoundsException e) {
+ // errln(prefix + "SHOULD NOT HAPPEN: " + (int)status);
+ //}
+ delete df;
+ }
+ }
+ }
+ delete full;
+ if (U_FAILURE(status))
+ errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+static const char* const parseFormats[] = {
+ "MMMM d, yyyy",
+ "MMMM d yyyy",
+ "M/d/yy",
+ "d MMMM, yyyy",
+ "d MMMM yyyy",
+ "d MMMM",
+ "MMMM d",
+ "yyyy",
+ "h:mm a MMMM d, yyyy"
+};
+
+static const char* const inputStrings[] = {
+ "bogus string", 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ "April 1, 1997", "April 1, 1997", 0, 0, 0, 0, 0, "April 1", 0, 0,
+ "Jan 1, 1970", "January 1, 1970", 0, 0, 0, 0, 0, "January 1", 0, 0,
+ "Jan 1 2037", 0, "January 1 2037", 0, 0, 0, 0, "January 1", 0, 0,
+ "1/1/70", 0, 0, "1/1/70", 0, 0, 0, 0, "0001", 0,
+ "5 May 1997", 0, 0, 0, 0, "5 May 1997", "5 May", 0, "0005", 0,
+ "16 May", 0, 0, 0, 0, 0, "16 May", 0, "0016", 0,
+ "April 30", 0, 0, 0, 0, 0, 0, "April 30", 0, 0,
+ "1998", 0, 0, 0, 0, 0, 0, 0, "1998", 0,
+ "1", 0, 0, 0, 0, 0, 0, 0, "0001", 0,
+ "3:00 pm Jan 1, 1997", 0, 0, 0, 0, 0, 0, 0, "0003", "3:00 PM January 1, 1997",
+};
+
+// -------------------------------------
+
+/**
+ * Verify the correct behavior when parsing an array of inputs against an
+ * array of patterns, with known results. The results are encoded after
+ * the input strings in each row.
+ */
+void
+DateFormatTest::TestBadInput135a()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat* dateParse = new SimpleDateFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Failed creating SimpleDateFormat with %s. Quitting test", u_errorName(status));
+ delete dateParse;
+ return;
+ }
+ const char* s;
+ UDate date;
+ const uint32_t PF_LENGTH = (int32_t)(sizeof(parseFormats)/sizeof(parseFormats[0]));
+ const uint32_t INPUT_LENGTH = (int32_t)(sizeof(inputStrings)/sizeof(inputStrings[0]));
+
+ dateParse->applyPattern("d MMMM, yyyy");
+ dateParse->adoptTimeZone(TimeZone::createDefault());
+ s = "not parseable";
+ UnicodeString thePat;
+ logln(UnicodeString("Trying to parse \"") + s + "\" with " + dateParse->toPattern(thePat));
+ //try {
+ date = dateParse->parse(s, status);
+ if (U_SUCCESS(status))
+ errln((UnicodeString)"FAIL: Expected exception during parse");
+ //}
+ //catch(Exception ex) {
+ else
+ logln((UnicodeString)"Exception during parse: " + (int32_t)status);
+ status = U_ZERO_ERROR;
+ //}
+ for (uint32_t i = 0; i < INPUT_LENGTH; i += (PF_LENGTH + 1)) {
+ ParsePosition parsePosition(0);
+ UnicodeString s( inputStrings[i]);
+ for (uint32_t index = 0; index < PF_LENGTH;++index) {
+ const char* expected = inputStrings[i + 1 + index];
+ dateParse->applyPattern(parseFormats[index]);
+ dateParse->adoptTimeZone(TimeZone::createDefault());
+ //try {
+ parsePosition.setIndex(0);
+ date = dateParse->parse(s, parsePosition);
+ if (parsePosition.getIndex() != 0) {
+ UnicodeString s1, s2;
+ s.extract(0, parsePosition.getIndex(), s1);
+ s.extract(parsePosition.getIndex(), s.length(), s2);
+ if (date == 0) {
+ errln((UnicodeString)"ERROR: null result fmt=\"" +
+ parseFormats[index] +
+ "\" pos=" + parsePosition.getIndex() + " " +
+ s1 + "|" + s2);
+ }
+ else {
+ UnicodeString result;
+ ((DateFormat*)dateParse)->format(date, result);
+ logln((UnicodeString)"Parsed \"" + s + "\" using \"" + dateParse->toPattern(thePat) + "\" to: " + result);
+ if (expected == 0)
+ errln((UnicodeString)"FAIL: Expected parse failure");
+ else if (!(result == expected))
+ errln(UnicodeString("FAIL: Expected ") + expected);
+ }
+ }
+ else if (expected != 0) {
+ errln(UnicodeString("FAIL: Expected ") + expected + " from \"" +
+ s + "\" with \"" + dateParse->toPattern(thePat) + "\"");
+ }
+ //}
+ //catch(Exception ex) {
+ if (U_FAILURE(status))
+ errln((UnicodeString)"An exception was thrown during parse: " + (int32_t)status);
+ //}
+ }
+ }
+ delete dateParse;
+ if (U_FAILURE(status))
+ errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status);
+}
+
+// -------------------------------------
+
+/**
+ * Test the parsing of two-digit years.
+ */
+void
+DateFormatTest::TestTwoDigitYear()
+{
+ UErrorCode ec = U_ZERO_ERROR;
+ SimpleDateFormat fmt("dd/MM/yy", Locale::getUK(), ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: SimpleDateFormat constructor");
+ return;
+ }
+ parse2DigitYear(fmt, "5/6/17", date(117, UCAL_JUNE, 5));
+ parse2DigitYear(fmt, "4/6/34", date(34, UCAL_JUNE, 4));
+}
+
+// -------------------------------------
+
+void
+DateFormatTest::parse2DigitYear(DateFormat& fmt, const char* str, UDate expected)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ //try {
+ UDate d = fmt.parse(str, status);
+ UnicodeString thePat;
+ logln(UnicodeString("Parsing \"") + str + "\" with " + ((SimpleDateFormat*)&fmt)->toPattern(thePat) +
+ " => " + dateToString(d));
+ if (d != expected) errln((UnicodeString)"FAIL: Expected " + expected);
+ //}
+ //catch(ParseException e) {
+ if (U_FAILURE(status))
+ errln((UnicodeString)"FAIL: Got exception");
+ //}
+}
+
+// -------------------------------------
+
+/**
+ * Test the formatting of time zones.
+ */
+void
+DateFormatTest::TestDateFormatZone061()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UDate date;
+ DateFormat *formatter;
+ date= 859248000000.0;
+ logln((UnicodeString)"Date 1997/3/25 00:00 GMT: " + date);
+ formatter = new SimpleDateFormat((UnicodeString)"dd-MMM-yyyyy HH:mm", Locale::getUK(), status);
+ if(U_FAILURE(status)) {
+ errln("Failed creating SimpleDateFormat with %s. Quitting test", u_errorName(status));
+ delete formatter;
+ return;
+ }
+ formatter->adoptTimeZone(TimeZone::createTimeZone("GMT"));
+ UnicodeString temp; formatter->format(date, temp);
+ logln((UnicodeString)"Formatted in GMT to: " + temp);
+ //try {
+ UDate tempDate = formatter->parse(temp, status);
+ logln((UnicodeString)"Parsed to: " + dateToString(tempDate));
+ if (tempDate != date) errln((UnicodeString)"FAIL: Expected " + dateToString(date));
+ //}
+ //catch(Throwable t) {
+ if (U_FAILURE(status))
+ errln((UnicodeString)"Date Formatter throws: " + (int32_t)status);
+ //}
+ delete formatter;
+}
+
+// -------------------------------------
+
+/**
+ * Test the formatting of time zones.
+ */
+void
+DateFormatTest::TestDateFormatZone146()
+{
+ TimeZone *saveDefault = TimeZone::createDefault();
+
+ //try {
+ TimeZone *thedefault = TimeZone::createTimeZone("GMT");
+ TimeZone::setDefault(*thedefault);
+ // java.util.Locale.setDefault(new java.util.Locale("ar", "", ""));
+
+ // check to be sure... its GMT all right
+ TimeZone *testdefault = TimeZone::createDefault();
+ UnicodeString testtimezone;
+ testdefault->getID(testtimezone);
+ if (testtimezone == "GMT")
+ logln("Test timezone = " + testtimezone);
+ else
+ errln("Test timezone should be GMT, not " + testtimezone);
+
+ UErrorCode status = U_ZERO_ERROR;
+ // now try to use the default GMT time zone
+ GregorianCalendar *greenwichcalendar =
+ new GregorianCalendar(1997, 3, 4, 23, 0, status);
+ failure(status, "new GregorianCalendar");
+ //*****************************greenwichcalendar.setTimeZone(TimeZone.getDefault());
+ //greenwichcalendar.set(1997, 3, 4, 23, 0);
+ // try anything to set hour to 23:00 !!!
+ greenwichcalendar->set(UCAL_HOUR_OF_DAY, 23);
+ // get time
+ UDate greenwichdate = greenwichcalendar->getTime(status);
+ // format every way
+ UnicodeString DATA [] = {
+ UnicodeString("simple format: "), UnicodeString("04/04/97 23:00 GMT+00:00"),
+ UnicodeString("MM/dd/yy HH:mm z"),
+ UnicodeString("full format: "), UnicodeString("Friday, April 4, 1997 11:00:00 o'clock PM GMT+00:00"),
+ UnicodeString("EEEE, MMMM d, yyyy h:mm:ss 'o''clock' a z"),
+ UnicodeString("long format: "), UnicodeString("April 4, 1997 11:00:00 PM GMT+00:00"),
+ UnicodeString("MMMM d, yyyy h:mm:ss a z"),
+ UnicodeString("default format: "), UnicodeString("04-Apr-97 11:00:00 PM"),
+ UnicodeString("dd-MMM-yy h:mm:ss a"),
+ UnicodeString("short format: "), UnicodeString("4/4/97 11:00 PM"),
+ UnicodeString("M/d/yy h:mm a")
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ DateFormat *fmt = new SimpleDateFormat(DATA[i+2], Locale::getEnglish(), status);
+ if(failure(status, "new SimpleDateFormat")) break;
+ fmt->setCalendar(*greenwichcalendar);
+ UnicodeString result;
+ result = fmt->format(greenwichdate, result);
+ logln(DATA[i] + result);
+ if (result != DATA[i+1])
+ errln("FAIL: Expected " + DATA[i+1] + ", got " + result);
+ delete fmt;
+ }
+ //}
+ //finally {
+ TimeZone::adoptDefault(saveDefault);
+ //}
+ delete testdefault;
+ delete greenwichcalendar;
+ delete thedefault;
+
+
+}
+
+// -------------------------------------
+
+/**
+ * Test the formatting of dates in different locales.
+ */
+void
+DateFormatTest::TestLocaleDateFormat() // Bug 495
+{
+ UDate testDate = date(97, UCAL_SEPTEMBER, 15);
+ DateFormat *dfFrench = DateFormat::createDateTimeInstance(DateFormat::FULL,
+ DateFormat::FULL, Locale::getFrench());
+ DateFormat *dfUS = DateFormat::createDateTimeInstance(DateFormat::FULL,
+ DateFormat::FULL, Locale::getUS());
+ UnicodeString expectedFRENCH ( "lundi 15 septembre 1997 00:00:00 \\u00C9tats-Unis (Los Angeles)" );
+ expectedFRENCH = expectedFRENCH.unescape();
+ //UnicodeString expectedUS ( "Monday, September 15, 1997 12:00:00 o'clock AM PDT" );
+ UnicodeString expectedUS ( "Monday, September 15, 1997 12:00:00 AM PT" );
+ logln((UnicodeString)"Date set to : " + dateToString(testDate));
+ UnicodeString out;
+ if (dfUS == NULL || dfFrench == NULL){
+ dataerrln("Error calling DateFormat::createDateTimeInstance)");
+ delete dfUS;
+ delete dfFrench;
+ return;
+ }
+
+ dfFrench->format(testDate, out);
+ logln((UnicodeString)"Date Formated with French Locale " + out);
+ if (!(out == expectedFRENCH))
+ errln((UnicodeString)"FAIL: Expected " + expectedFRENCH);
+ out.truncate(0);
+ dfUS->format(testDate, out);
+ logln((UnicodeString)"Date Formated with US Locale " + out);
+ if (!(out == expectedUS))
+ errln((UnicodeString)"FAIL: Expected " + expectedUS);
+ delete dfUS;
+ delete dfFrench;
+}
+
+/**
+ * Test DateFormat(Calendar) API
+ */
+void DateFormatTest::TestDateFormatCalendar() {
+ DateFormat *date=0, *time=0, *full=0;
+ Calendar *cal=0;
+ UnicodeString str;
+ ParsePosition pos;
+ UDate when;
+ UErrorCode ec = U_ZERO_ERROR;
+
+ /* Create a formatter for date fields. */
+ date = DateFormat::createDateInstance(DateFormat::kShort, Locale::getUS());
+ if (date == NULL) {
+ errln("FAIL: createDateInstance failed");
+ goto FAIL;
+ }
+
+ /* Create a formatter for time fields. */
+ time = DateFormat::createTimeInstance(DateFormat::kShort, Locale::getUS());
+ if (time == NULL) {
+ errln("FAIL: createTimeInstance failed");
+ goto FAIL;
+ }
+
+ /* Create a full format for output */
+ full = DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull,
+ Locale::getUS());
+ if (full == NULL) {
+ errln("FAIL: createInstance failed");
+ goto FAIL;
+ }
+
+ /* Create a calendar */
+ cal = Calendar::createInstance(Locale::getUS(), ec);
+ if (cal == NULL || U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: Calendar::createInstance failed with " +
+ u_errorName(ec));
+ goto FAIL;
+ }
+
+ /* Parse the date */
+ cal->clear();
+ str = UnicodeString("4/5/2001", "");
+ pos.setIndex(0);
+ date->parse(str, *cal, pos);
+ if (pos.getIndex() != str.length()) {
+ errln((UnicodeString)"FAIL: DateFormat::parse(4/5/2001) failed at " +
+ pos.getIndex());
+ goto FAIL;
+ }
+
+ /* Parse the time */
+ str = UnicodeString("5:45 PM", "");
+ pos.setIndex(0);
+ time->parse(str, *cal, pos);
+ if (pos.getIndex() != str.length()) {
+ errln((UnicodeString)"FAIL: DateFormat::parse(17:45) failed at " +
+ pos.getIndex());
+ goto FAIL;
+ }
+
+ /* Check result */
+ when = cal->getTime(ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: cal->getTime() failed with " + u_errorName(ec));
+ goto FAIL;
+ }
+ str.truncate(0);
+ full->format(when, str);
+ // Thursday, April 5, 2001 5:45:00 PM PDT 986517900000
+ if (when == 986517900000.0) {
+ logln("Ok: Parsed result: " + str);
+ } else {
+ errln("FAIL: Parsed result: " + str + ", exp 4/5/2001 5:45 PM");
+ }
+
+ FAIL:
+ delete date;
+ delete time;
+ delete full;
+ delete cal;
+}
+
+/**
+ * Test DateFormat's parsing of space characters. See jitterbug 1916.
+ */
+void DateFormatTest::TestSpaceParsing() {
+ const char* DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ // pattern, input, expected parse or NULL if expect parse failure
+ "MMMM d yy", " 04 05 06", NULL, // MMMM wants Apr/April
+ NULL, "04 05 06", NULL,
+ "MM d yy", " 04 05 06", "2006 04 05 00:00:00",
+ NULL, "04 05 06", "2006 04 05 00:00:00",
+ "MMMM d yy", " Apr 05 06", "2006 04 05 00:00:00",
+ NULL, "Apr 05 06", "2006 04 05 00:00:00",
+ };
+ const int32_t DATA_len = sizeof(DATA)/sizeof(DATA[0]);
+
+ expectParse(DATA, DATA_len, Locale("en"));
+}
+
+/**
+ * Test handling of "HHmmss" pattern.
+ */
+void DateFormatTest::TestExactCountFormat() {
+ const char* DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ // pattern, input, expected parse or NULL if expect parse failure
+ "HHmmss", "123456", "1970 01 01 12:34:56",
+ NULL, "12345", "1970 01 01 01:23:45",
+ NULL, "1234", NULL,
+ NULL, "00-05", NULL,
+ NULL, "12-34", NULL,
+ NULL, "00+05", NULL,
+ "ahhmm", "PM730", "1970 01 01 19:30:00",
+ };
+ const int32_t DATA_len = sizeof(DATA)/sizeof(DATA[0]);
+
+ expectParse(DATA, DATA_len, Locale("en"));
+}
+
+/**
+ * Test handling of white space.
+ */
+void DateFormatTest::TestWhiteSpaceParsing() {
+ const char* DATA[] = {
+ "yyyy MM dd",
+
+ // pattern, input, expected parse or null if expect parse failure
+
+ // Pattern space run should parse input text space run
+ "MM d yy", " 04 01 03", "2003 04 01",
+ NULL, " 04 01 03 ", "2003 04 01",
+ };
+ const int32_t DATA_len = sizeof(DATA)/sizeof(DATA[0]);
+
+ expectParse(DATA, DATA_len, Locale("en"));
+}
+
+
+void DateFormatTest::TestInvalidPattern() {
+ UErrorCode ec = U_ZERO_ERROR;
+ SimpleDateFormat f(UnicodeString("Yesterday"), ec);
+ ASSERT_OK(ec);
+ UnicodeString out;
+ FieldPosition pos;
+ f.format((UDate)0, out, pos);
+ logln(out);
+ // The bug is that the call to format() will crash. By not
+ // crashing, the test passes.
+}
+
+void DateFormatTest::TestGreekMay() {
+ UErrorCode ec = U_ZERO_ERROR;
+ UDate date = -9896080848000.0;
+ SimpleDateFormat fmt("EEEE, dd MMMM yyyy h:mm:ss a", Locale("el", "", ""), ec);
+ if (!assertSuccess("SimpleDateFormat::ct", ec)) return;
+ UnicodeString str;
+ fmt.format(date, str);
+ ParsePosition pos(0);
+ UDate d2 = fmt.parse(str, pos);
+ if (date != d2) {
+ errln("FAIL: unable to parse strings where case-folding changes length");
+ }
+}
+
+void DateFormatTest::TestStandAloneMonths()
+{
+ const char *EN_DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ "yyyy LLLL dd H:mm:ss", "fp", "2004 03 10 16:36:31", "2004 March 10 16:36:31", "2004 03 10 16:36:31",
+ "yyyy LLL dd H:mm:ss", "fp", "2004 03 10 16:36:31", "2004 Mar 10 16:36:31", "2004 03 10 16:36:31",
+ "yyyy LLLL dd H:mm:ss", "F", "2004 03 10 16:36:31", "2004 March 10 16:36:31",
+ "yyyy LLL dd H:mm:ss", "pf", "2004 Mar 10 16:36:31", "2004 03 10 16:36:31", "2004 Mar 10 16:36:31",
+
+ "LLLL", "fp", "1970 01 01 0:00:00", "January", "1970 01 01 0:00:00",
+ "LLLL", "fp", "1970 02 01 0:00:00", "February", "1970 02 01 0:00:00",
+ "LLLL", "fp", "1970 03 01 0:00:00", "March", "1970 03 01 0:00:00",
+ "LLLL", "fp", "1970 04 01 0:00:00", "April", "1970 04 01 0:00:00",
+ "LLLL", "fp", "1970 05 01 0:00:00", "May", "1970 05 01 0:00:00",
+ "LLLL", "fp", "1970 06 01 0:00:00", "June", "1970 06 01 0:00:00",
+ "LLLL", "fp", "1970 07 01 0:00:00", "July", "1970 07 01 0:00:00",
+ "LLLL", "fp", "1970 08 01 0:00:00", "August", "1970 08 01 0:00:00",
+ "LLLL", "fp", "1970 09 01 0:00:00", "September", "1970 09 01 0:00:00",
+ "LLLL", "fp", "1970 10 01 0:00:00", "October", "1970 10 01 0:00:00",
+ "LLLL", "fp", "1970 11 01 0:00:00", "November", "1970 11 01 0:00:00",
+ "LLLL", "fp", "1970 12 01 0:00:00", "December", "1970 12 01 0:00:00",
+
+ "LLL", "fp", "1970 01 01 0:00:00", "Jan", "1970 01 01 0:00:00",
+ "LLL", "fp", "1970 02 01 0:00:00", "Feb", "1970 02 01 0:00:00",
+ "LLL", "fp", "1970 03 01 0:00:00", "Mar", "1970 03 01 0:00:00",
+ "LLL", "fp", "1970 04 01 0:00:00", "Apr", "1970 04 01 0:00:00",
+ "LLL", "fp", "1970 05 01 0:00:00", "May", "1970 05 01 0:00:00",
+ "LLL", "fp", "1970 06 01 0:00:00", "Jun", "1970 06 01 0:00:00",
+ "LLL", "fp", "1970 07 01 0:00:00", "Jul", "1970 07 01 0:00:00",
+ "LLL", "fp", "1970 08 01 0:00:00", "Aug", "1970 08 01 0:00:00",
+ "LLL", "fp", "1970 09 01 0:00:00", "Sep", "1970 09 01 0:00:00",
+ "LLL", "fp", "1970 10 01 0:00:00", "Oct", "1970 10 01 0:00:00",
+ "LLL", "fp", "1970 11 01 0:00:00", "Nov", "1970 11 01 0:00:00",
+ "LLL", "fp", "1970 12 01 0:00:00", "Dec", "1970 12 01 0:00:00",
+ };
+
+ const char *CS_DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ "yyyy LLLL dd H:mm:ss", "fp", "2004 04 10 16:36:31", "2004 duben 10 16:36:31", "2004 04 10 16:36:31",
+ "yyyy MMMM dd H:mm:ss", "fp", "2004 04 10 16:36:31", "2004 dubna 10 16:36:31", "2004 04 10 16:36:31",
+ "yyyy LLL dd H:mm:ss", "fp", "2004 04 10 16:36:31", "2004 4. 10 16:36:31", "2004 04 10 16:36:31",
+ "yyyy LLLL dd H:mm:ss", "F", "2004 04 10 16:36:31", "2004 duben 10 16:36:31",
+ "yyyy MMMM dd H:mm:ss", "F", "2004 04 10 16:36:31", "2004 dubna 10 16:36:31",
+ "yyyy LLLL dd H:mm:ss", "pf", "2004 duben 10 16:36:31", "2004 04 10 16:36:31", "2004 duben 10 16:36:31",
+ "yyyy MMMM dd H:mm:ss", "pf", "2004 dubna 10 16:36:31", "2004 04 10 16:36:31", "2004 dubna 10 16:36:31",
+
+ "LLLL", "fp", "1970 01 01 0:00:00", "leden", "1970 01 01 0:00:00",
+ "LLLL", "fp", "1970 02 01 0:00:00", "\\u00FAnor", "1970 02 01 0:00:00",
+ "LLLL", "fp", "1970 03 01 0:00:00", "b\\u0159ezen", "1970 03 01 0:00:00",
+ "LLLL", "fp", "1970 04 01 0:00:00", "duben", "1970 04 01 0:00:00",
+ "LLLL", "fp", "1970 05 01 0:00:00", "kv\\u011Bten", "1970 05 01 0:00:00",
+ "LLLL", "fp", "1970 06 01 0:00:00", "\\u010Derven", "1970 06 01 0:00:00",
+ "LLLL", "fp", "1970 07 01 0:00:00", "\\u010Dervenec", "1970 07 01 0:00:00",
+ "LLLL", "fp", "1970 08 01 0:00:00", "srpen", "1970 08 01 0:00:00",
+ "LLLL", "fp", "1970 09 01 0:00:00", "z\\u00E1\\u0159\\u00ED", "1970 09 01 0:00:00",
+ "LLLL", "fp", "1970 10 01 0:00:00", "\\u0159\\u00EDjen", "1970 10 01 0:00:00",
+ "LLLL", "fp", "1970 11 01 0:00:00", "listopad", "1970 11 01 0:00:00",
+ "LLLL", "fp", "1970 12 01 0:00:00", "prosinec", "1970 12 01 0:00:00",
+
+ "LLL", "fp", "1970 01 01 0:00:00", "1.", "1970 01 01 0:00:00",
+ "LLL", "fp", "1970 02 01 0:00:00", "2.", "1970 02 01 0:00:00",
+ "LLL", "fp", "1970 03 01 0:00:00", "3.", "1970 03 01 0:00:00",
+ "LLL", "fp", "1970 04 01 0:00:00", "4.", "1970 04 01 0:00:00",
+ "LLL", "fp", "1970 05 01 0:00:00", "5.", "1970 05 01 0:00:00",
+ "LLL", "fp", "1970 06 01 0:00:00", "6.", "1970 06 01 0:00:00",
+ "LLL", "fp", "1970 07 01 0:00:00", "7.", "1970 07 01 0:00:00",
+ "LLL", "fp", "1970 08 01 0:00:00", "8.", "1970 08 01 0:00:00",
+ "LLL", "fp", "1970 09 01 0:00:00", "9.", "1970 09 01 0:00:00",
+ "LLL", "fp", "1970 10 01 0:00:00", "10.", "1970 10 01 0:00:00",
+ "LLL", "fp", "1970 11 01 0:00:00", "11.", "1970 11 01 0:00:00",
+ "LLL", "fp", "1970 12 01 0:00:00", "12.", "1970 12 01 0:00:00",
+ };
+
+ expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", ""));
+ expect(CS_DATA, ARRAY_SIZE(CS_DATA), Locale("cs", "", ""));
+}
+
+void DateFormatTest::TestStandAloneDays()
+{
+ const char *EN_DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ "cccc", "fp", "1970 01 04 0:00:00", "Sunday", "1970 01 04 0:00:00",
+ "cccc", "fp", "1970 01 05 0:00:00", "Monday", "1970 01 05 0:00:00",
+ "cccc", "fp", "1970 01 06 0:00:00", "Tuesday", "1970 01 06 0:00:00",
+ "cccc", "fp", "1970 01 07 0:00:00", "Wednesday", "1970 01 07 0:00:00",
+ "cccc", "fp", "1970 01 01 0:00:00", "Thursday", "1970 01 01 0:00:00",
+ "cccc", "fp", "1970 01 02 0:00:00", "Friday", "1970 01 02 0:00:00",
+ "cccc", "fp", "1970 01 03 0:00:00", "Saturday", "1970 01 03 0:00:00",
+
+ "ccc", "fp", "1970 01 04 0:00:00", "Sun", "1970 01 04 0:00:00",
+ "ccc", "fp", "1970 01 05 0:00:00", "Mon", "1970 01 05 0:00:00",
+ "ccc", "fp", "1970 01 06 0:00:00", "Tue", "1970 01 06 0:00:00",
+ "ccc", "fp", "1970 01 07 0:00:00", "Wed", "1970 01 07 0:00:00",
+ "ccc", "fp", "1970 01 01 0:00:00", "Thu", "1970 01 01 0:00:00",
+ "ccc", "fp", "1970 01 02 0:00:00", "Fri", "1970 01 02 0:00:00",
+ "ccc", "fp", "1970 01 03 0:00:00", "Sat", "1970 01 03 0:00:00",
+ };
+
+ const char *CS_DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ "cccc", "fp", "1970 01 04 0:00:00", "ned\\u011Ble", "1970 01 04 0:00:00",
+ "cccc", "fp", "1970 01 05 0:00:00", "pond\\u011Bl\\u00ED", "1970 01 05 0:00:00",
+ "cccc", "fp", "1970 01 06 0:00:00", "\\u00FAter\\u00FD", "1970 01 06 0:00:00",
+ "cccc", "fp", "1970 01 07 0:00:00", "st\\u0159eda", "1970 01 07 0:00:00",
+ "cccc", "fp", "1970 01 01 0:00:00", "\\u010Dtvrtek", "1970 01 01 0:00:00",
+ "cccc", "fp", "1970 01 02 0:00:00", "p\\u00E1tek", "1970 01 02 0:00:00",
+ "cccc", "fp", "1970 01 03 0:00:00", "sobota", "1970 01 03 0:00:00",
+
+ "ccc", "fp", "1970 01 04 0:00:00", "ne", "1970 01 04 0:00:00",
+ "ccc", "fp", "1970 01 05 0:00:00", "po", "1970 01 05 0:00:00",
+ "ccc", "fp", "1970 01 06 0:00:00", "\\u00FAt", "1970 01 06 0:00:00",
+ "ccc", "fp", "1970 01 07 0:00:00", "st", "1970 01 07 0:00:00",
+ "ccc", "fp", "1970 01 01 0:00:00", "\\u010Dt", "1970 01 01 0:00:00",
+ "ccc", "fp", "1970 01 02 0:00:00", "p\\u00E1", "1970 01 02 0:00:00",
+ "ccc", "fp", "1970 01 03 0:00:00", "so", "1970 01 03 0:00:00",
+ };
+
+ expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", ""));
+ expect(CS_DATA, ARRAY_SIZE(CS_DATA), Locale("cs", "", ""));
+}
+
+void DateFormatTest::TestNarrowNames()
+{
+ const char *EN_DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ "yyyy MMMMM dd H:mm:ss", "2004 03 10 16:36:31", "2004 M 10 16:36:31",
+ "yyyy LLLLL dd H:mm:ss", "2004 03 10 16:36:31", "2004 M 10 16:36:31",
+
+ "MMMMM", "1970 01 01 0:00:00", "J",
+ "MMMMM", "1970 02 01 0:00:00", "F",
+ "MMMMM", "1970 03 01 0:00:00", "M",
+ "MMMMM", "1970 04 01 0:00:00", "A",
+ "MMMMM", "1970 05 01 0:00:00", "M",
+ "MMMMM", "1970 06 01 0:00:00", "J",
+ "MMMMM", "1970 07 01 0:00:00", "J",
+ "MMMMM", "1970 08 01 0:00:00", "A",
+ "MMMMM", "1970 09 01 0:00:00", "S",
+ "MMMMM", "1970 10 01 0:00:00", "O",
+ "MMMMM", "1970 11 01 0:00:00", "N",
+ "MMMMM", "1970 12 01 0:00:00", "D",
+
+ "LLLLL", "1970 01 01 0:00:00", "J",
+ "LLLLL", "1970 02 01 0:00:00", "F",
+ "LLLLL", "1970 03 01 0:00:00", "M",
+ "LLLLL", "1970 04 01 0:00:00", "A",
+ "LLLLL", "1970 05 01 0:00:00", "M",
+ "LLLLL", "1970 06 01 0:00:00", "J",
+ "LLLLL", "1970 07 01 0:00:00", "J",
+ "LLLLL", "1970 08 01 0:00:00", "A",
+ "LLLLL", "1970 09 01 0:00:00", "S",
+ "LLLLL", "1970 10 01 0:00:00", "O",
+ "LLLLL", "1970 11 01 0:00:00", "N",
+ "LLLLL", "1970 12 01 0:00:00", "D",
+
+ "EEEEE", "1970 01 04 0:00:00", "S",
+ "EEEEE", "1970 01 05 0:00:00", "M",
+ "EEEEE", "1970 01 06 0:00:00", "T",
+ "EEEEE", "1970 01 07 0:00:00", "W",
+ "EEEEE", "1970 01 01 0:00:00", "T",
+ "EEEEE", "1970 01 02 0:00:00", "F",
+ "EEEEE", "1970 01 03 0:00:00", "S",
+
+ "ccccc", "1970 01 04 0:00:00", "S",
+ "ccccc", "1970 01 05 0:00:00", "M",
+ "ccccc", "1970 01 06 0:00:00", "T",
+ "ccccc", "1970 01 07 0:00:00", "W",
+ "ccccc", "1970 01 01 0:00:00", "T",
+ "ccccc", "1970 01 02 0:00:00", "F",
+ "ccccc", "1970 01 03 0:00:00", "S",
+ };
+
+ const char *CS_DATA[] = {
+ "yyyy MM dd HH:mm:ss",
+
+ "yyyy LLLLL dd H:mm:ss", "2004 04 10 16:36:31", "2004 d 10 16:36:31",
+ "yyyy MMMMM dd H:mm:ss", "2004 04 10 16:36:31", "2004 d 10 16:36:31",
+
+ "MMMMM", "1970 01 01 0:00:00", "l",
+ "MMMMM", "1970 02 01 0:00:00", "\\u00FA",
+ "MMMMM", "1970 03 01 0:00:00", "b",
+ "MMMMM", "1970 04 01 0:00:00", "d",
+ "MMMMM", "1970 05 01 0:00:00", "k",
+ "MMMMM", "1970 06 01 0:00:00", "\\u010D",
+ "MMMMM", "1970 07 01 0:00:00", "\\u010D",
+ "MMMMM", "1970 08 01 0:00:00", "s",
+ "MMMMM", "1970 09 01 0:00:00", "z",
+ "MMMMM", "1970 10 01 0:00:00", "\\u0159",
+ "MMMMM", "1970 11 01 0:00:00", "l",
+ "MMMMM", "1970 12 01 0:00:00", "p",
+
+ "LLLLL", "1970 01 01 0:00:00", "l",
+ "LLLLL", "1970 02 01 0:00:00", "\\u00FA",
+ "LLLLL", "1970 03 01 0:00:00", "b",
+ "LLLLL", "1970 04 01 0:00:00", "d",
+ "LLLLL", "1970 05 01 0:00:00", "k",
+ "LLLLL", "1970 06 01 0:00:00", "\\u010D",
+ "LLLLL", "1970 07 01 0:00:00", "\\u010D",
+ "LLLLL", "1970 08 01 0:00:00", "s",
+ "LLLLL", "1970 09 01 0:00:00", "z",
+ "LLLLL", "1970 10 01 0:00:00", "\\u0159",
+ "LLLLL", "1970 11 01 0:00:00", "l",
+ "LLLLL", "1970 12 01 0:00:00", "p",
+
+ "EEEEE", "1970 01 04 0:00:00", "N",
+ "EEEEE", "1970 01 05 0:00:00", "P",
+ "EEEEE", "1970 01 06 0:00:00", "\\u00DA",
+ "EEEEE", "1970 01 07 0:00:00", "S",
+ "EEEEE", "1970 01 01 0:00:00", "\\u010C",
+ "EEEEE", "1970 01 02 0:00:00", "P",
+ "EEEEE", "1970 01 03 0:00:00", "S",
+
+ "ccccc", "1970 01 04 0:00:00", "N",
+ "ccccc", "1970 01 05 0:00:00", "P",
+ "ccccc", "1970 01 06 0:00:00", "\\u00DA",
+ "ccccc", "1970 01 07 0:00:00", "S",
+ "ccccc", "1970 01 01 0:00:00", "\\u010C",
+ "ccccc", "1970 01 02 0:00:00", "P",
+ "ccccc", "1970 01 03 0:00:00", "S",
+ };
+
+ expectFormat(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", ""));
+ expectFormat(CS_DATA, ARRAY_SIZE(CS_DATA), Locale("cs", "", ""));
+}
+
+void DateFormatTest::TestEras()
+{
+ const char *EN_DATA[] = {
+ "yyyy MM dd",
+
+ "MMMM dd yyyy G", "fp", "1951 07 17", "July 17 1951 AD", "1951 07 17",
+ "MMMM dd yyyy GG", "fp", "1951 07 17", "July 17 1951 AD", "1951 07 17",
+ "MMMM dd yyyy GGG", "fp", "1951 07 17", "July 17 1951 AD", "1951 07 17",
+ "MMMM dd yyyy GGGG", "fp", "1951 07 17", "July 17 1951 Anno Domini", "1951 07 17",
+
+ "MMMM dd yyyy G", "fp", "-438 07 17", "July 17 0439 BC", "-438 07 17",
+ "MMMM dd yyyy GG", "fp", "-438 07 17", "July 17 0439 BC", "-438 07 17",
+ "MMMM dd yyyy GGG", "fp", "-438 07 17", "July 17 0439 BC", "-438 07 17",
+ "MMMM dd yyyy GGGG", "fp", "-438 07 17", "July 17 0439 Before Christ", "-438 07 17",
+ };
+
+ expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", ""));
+}
+
+void DateFormatTest::TestQuarters()
+{
+ const char *EN_DATA[] = {
+ "yyyy MM dd",
+
+ "Q", "fp", "1970 01 01", "1", "1970 01 01",
+ "QQ", "fp", "1970 04 01", "02", "1970 04 01",
+ "QQQ", "fp", "1970 07 01", "Q3", "1970 07 01",
+ "QQQQ", "fp", "1970 10 01", "4th quarter", "1970 10 01",
+
+ "q", "fp", "1970 01 01", "1", "1970 01 01",
+ "qq", "fp", "1970 04 01", "02", "1970 04 01",
+ "qqq", "fp", "1970 07 01", "Q3", "1970 07 01",
+ "qqqq", "fp", "1970 10 01", "4th quarter", "1970 10 01",
+ };
+
+ expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", ""));
+}
+
+/**
+ * Test parsing. Input is an array that starts with the following
+ * header:
+ *
+ * [0] = pattern string to parse [i+2] with
+ *
+ * followed by test cases, each of which is 3 array elements:
+ *
+ * [i] = pattern, or NULL to reuse prior pattern
+ * [i+1] = input string
+ * [i+2] = expected parse result (parsed with pattern [0])
+ *
+ * If expect parse failure, then [i+2] should be NULL.
+ */
+void DateFormatTest::expectParse(const char** data, int32_t data_length,
+ const Locale& loc) {
+ const UDate FAIL = (UDate) -1;
+ const UnicodeString FAIL_STR("parse failure");
+ int32_t i = 0;
+
+ UErrorCode ec = U_ZERO_ERROR;
+ SimpleDateFormat fmt("", loc, ec);
+ SimpleDateFormat ref(data[i++], loc, ec);
+ SimpleDateFormat gotfmt("G yyyy MM dd HH:mm:ss z", loc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: SimpleDateFormat constructor");
+ return;
+ }
+
+ const char* currentPat = NULL;
+ while (i<data_length) {
+ const char* pattern = data[i++];
+ const char* input = data[i++];
+ const char* expected = data[i++];
+
+ ec = U_ZERO_ERROR;
+ if (pattern != NULL) {
+ fmt.applyPattern(pattern);
+ currentPat = pattern;
+ }
+ UDate got = fmt.parse(input, ec);
+ UnicodeString gotstr(FAIL_STR);
+ if (U_FAILURE(ec)) {
+ got = FAIL;
+ } else {
+ gotstr.remove();
+ gotfmt.format(got, gotstr);
+ }
+
+ UErrorCode ec2 = U_ZERO_ERROR;
+ UDate exp = FAIL;
+ UnicodeString expstr(FAIL_STR);
+ if (expected != NULL) {
+ expstr = expected;
+ exp = ref.parse(expstr, ec2);
+ if (U_FAILURE(ec2)) {
+ // This only happens if expected is in wrong format --
+ // should never happen once test is debugged.
+ errln("FAIL: Internal test error");
+ return;
+ }
+ }
+
+ if (got == exp) {
+ logln((UnicodeString)"Ok: " + input + " x " +
+ currentPat + " => " + gotstr);
+ } else {
+ errln((UnicodeString)"FAIL: " + input + " x " +
+ currentPat + " => " + gotstr + ", expected " +
+ expstr);
+ }
+ }
+}
+
+/**
+ * Test formatting and parsing. Input is an array that starts
+ * with the following header:
+ *
+ * [0] = pattern string to parse [i+2] with
+ *
+ * followed by test cases, each of which is 3 array elements:
+ *
+ * [i] = pattern, or null to reuse prior pattern
+ * [i+1] = control string, either "fp", "pf", or "F".
+ * [i+2..] = data strings
+ *
+ * The number of data strings depends on the control string.
+ * Examples:
+ * 1. "y/M/d H:mm:ss.SS", "fp", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.56", "2004 03 10 16:36:31.560",
+ * 'f': Format date [i+2] (as parsed using pattern [0]) and expect string [i+3].
+ * 'p': Parse string [i+3] and expect date [i+4].
+ *
+ * 2. "y/M/d H:mm:ss.SSS", "F", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.567"
+ * 'F': Format date [i+2] and expect string [i+3],
+ * then parse string [i+3] and expect date [i+2].
+ *
+ * 3. "y/M/d H:mm:ss.SSSS", "pf", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.5670",
+ * 'p': Parse string [i+2] and expect date [i+3].
+ * 'f': Format date [i+3] and expect string [i+4].
+ */
+void DateFormatTest::expect(const char** data, int32_t data_length,
+ const Locale& loc) {
+ int32_t i = 0;
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeString str, str2;
+ SimpleDateFormat fmt("", loc, ec);
+ SimpleDateFormat ref(data[i++], loc, ec);
+ SimpleDateFormat univ("EE G yyyy MM dd HH:mm:ss.SSS z", loc, ec);
+ if (!assertSuccess("construct SimpleDateFormat", ec)) return;
+
+ UnicodeString currentPat;
+ while (i<data_length) {
+ const char* pattern = data[i++];
+ if (pattern != NULL) {
+ fmt.applyPattern(pattern);
+ currentPat = pattern;
+ }
+
+ const char* control = data[i++];
+
+ if (uprv_strcmp(control, "fp") == 0) {
+ // 'f'
+ const char* datestr = data[i++];
+ const char* string = data[i++];
+ UDate date = ref.parse(ctou(datestr), ec);
+ if (!assertSuccess("parse", ec)) return;
+ assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
+ ctou(string),
+ fmt.format(date, str.remove()));
+ // 'p'
+ datestr = data[i++];
+ date = ref.parse(ctou(datestr), ec);
+ if (!assertSuccess("parse", ec)) return;
+ UDate parsedate = fmt.parse(ctou(string), ec);
+ if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) {
+ assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")",
+ univ.format(date, str.remove()),
+ univ.format(parsedate, str2.remove()));
+ }
+ }
+
+ else if (uprv_strcmp(control, "pf") == 0) {
+ // 'p'
+ const char* string = data[i++];
+ const char* datestr = data[i++];
+ UDate date = ref.parse(ctou(datestr), ec);
+ if (!assertSuccess("parse", ec)) return;
+ UDate parsedate = fmt.parse(ctou(string), ec);
+ if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) {
+ assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")",
+ univ.format(date, str.remove()),
+ univ.format(parsedate, str2.remove()));
+ }
+ // 'f'
+ string = data[i++];
+ assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
+ ctou(string),
+ fmt.format(date, str.remove()));
+ }
+
+ else if (uprv_strcmp(control, "F") == 0) {
+ const char* datestr = data[i++];
+ const char* string = data[i++];
+ UDate date = ref.parse(ctou(datestr), ec);
+ if (!assertSuccess("parse", ec)) return;
+ assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
+ ctou(string),
+ fmt.format(date, str.remove()));
+
+ UDate parsedate = fmt.parse(string, ec);
+ if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) {
+ assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")",
+ univ.format(date, str.remove()),
+ univ.format(parsedate, str2.remove()));
+ }
+ }
+
+ else {
+ errln((UnicodeString)"FAIL: Invalid control string " + control);
+ return;
+ }
+ }
+}
+
+/**
+ * Test formatting. Input is an array that starts
+ * with the following header:
+ *
+ * [0] = pattern string to parse [i+2] with
+ *
+ * followed by test cases, each of which is 3 array elements:
+ *
+ * [i] = pattern, or null to reuse prior pattern
+ * [i+1] = data string a
+ * [i+2] = data string b
+ *
+ * Examples:
+ * Format date [i+1] and expect string [i+2].
+ *
+ * "y/M/d H:mm:ss.SSSS", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.567"
+ */
+void DateFormatTest::expectFormat(const char** data, int32_t data_length,
+ const Locale& loc) {
+ int32_t i = 0;
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeString str, str2;
+ SimpleDateFormat fmt("", loc, ec);
+ SimpleDateFormat ref(data[i++], loc, ec);
+ SimpleDateFormat univ("EE G yyyy MM dd HH:mm:ss.SSS z", loc, ec);
+ if (!assertSuccess("construct SimpleDateFormat", ec)) return;
+
+ UnicodeString currentPat;
+
+ while (i<data_length) {
+ const char* pattern = data[i++];
+ if (pattern != NULL) {
+ fmt.applyPattern(pattern);
+ currentPat = pattern;
+ }
+
+ const char* datestr = data[i++];
+ const char* string = data[i++];
+ UDate date = ref.parse(ctou(datestr), ec);
+ if (!assertSuccess("parse", ec)) return;
+ assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
+ ctou(string),
+ fmt.format(date, str.remove()));
+ }
+}
+
+void DateFormatTest::TestGenericTime() {
+ // any zone pattern should parse any zone
+ const Locale en("en");
+ const char* ZDATA[] = {
+ "yyyy MM dd HH:mm zzz",
+ // round trip
+ "y/M/d H:mm zzzz", "F", "2004 01 01 01:00 PST", "2004/1/1 1:00 Pacific Standard Time",
+ "y/M/d H:mm zzz", "F", "2004 01 01 01:00 PST", "2004/1/1 1:00 PST",
+ "y/M/d H:mm vvvv", "F", "2004 01 01 01:00 PST", "2004/1/1 1:00 Pacific Time",
+ "y/M/d H:mm v", "F", "2004 01 01 01:00 PST", "2004/1/1 1:00 PT",
+ // non-generic timezone string influences dst offset even if wrong for date/time
+ "y/M/d H:mm zzz", "pf", "2004/1/1 1:00 PDT", "2004 01 01 01:00 PDT", "2004/1/1 0:00 PST",
+ "y/M/d H:mm vvvv", "pf", "2004/1/1 1:00 PDT", "2004 01 01 01:00 PDT", "2004/1/1 0:00 Pacific Time",
+ "y/M/d H:mm zzz", "pf", "2004/7/1 1:00 PST", "2004 07 01 02:00 PDT", "2004/7/1 2:00 PDT",
+ "y/M/d H:mm vvvv", "pf", "2004/7/1 1:00 PST", "2004 07 01 02:00 PDT", "2004/7/1 2:00 Pacific Time",
+ // generic timezone generates dst offset appropriate for local time
+ "y/M/d H:mm zzz", "pf", "2004/1/1 1:00 PT", "2004 01 01 01:00 PST", "2004/1/1 1:00 PST",
+ "y/M/d H:mm vvvv", "pf", "2004/1/1 1:00 PT", "2004 01 01 01:00 PST", "2004/1/1 1:00 Pacific Time",
+ "y/M/d H:mm zzz", "pf", "2004/7/1 1:00 PT", "2004 07 01 01:00 PDT", "2004/7/1 1:00 PDT",
+ "y/M/d H:mm vvvv", "pf", "2004/7/1 1:00 PT", "2004 07 01 01:00 PDT", "2004/7/1 1:00 Pacific Time",
+ // daylight savings time transition edge cases.
+ // time to parse does not really exist, PT interpreted as earlier time
+ "y/M/d H:mm zzz", "pf", "2005/4/3 2:30 PT", "2005 04 03 03:30 PDT", "2005/4/3 3:30 PDT",
+ "y/M/d H:mm zzz", "pf", "2005/4/3 2:30 PST", "2005 04 03 03:30 PDT", "2005/4/3 3:30 PDT",
+ "y/M/d H:mm zzz", "pf", "2005/4/3 2:30 PDT", "2005 04 03 01:30 PST", "2005/4/3 1:30 PST",
+ "y/M/d H:mm v", "pf", "2005/4/3 2:30 PT", "2005 04 03 03:30 PDT", "2005/4/3 3:30 PT",
+ "y/M/d H:mm v", "pf", "2005/4/3 2:30 PST", "2005 04 03 03:30 PDT", "2005/4/3 3:30 PT",
+ "y/M/d H:mm v", "pf", "2005/4/3 2:30 PDT", "2005 04 03 01:30 PST", "2005/4/3 1:30 PT",
+ "y/M/d H:mm", "pf", "2005/4/3 2:30", "2005 04 03 03:30 PDT", "2005/4/3 3:30",
+ // time to parse is ambiguous, PT interpreted as later time
+ "y/M/d H:mm zzz", "pf", "2005/10/30 1:30 PT", "2005 10 30 01:30 PST", "2005/10/30 1:30 PST",
+ "y/M/d H:mm v", "pf", "2005/10/30 1:30 PT", "2005 10 30 01:30 PST", "2005/10/30 1:30 PT",
+ "y/M/d H:mm", "pf", "2005/10/30 1:30 PT", "2005 10 30 01:30 PST", "2005/10/30 1:30",
+
+ "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PST", "2004/10/31 1:30 PST",
+ "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PST",
+ "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PDT",
+ "y/M/d H:mm v", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PST", "2004/10/31 1:30 PT",
+ "y/M/d H:mm v", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PT",
+ "y/M/d H:mm v", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PT",
+ "y/M/d H:mm", "pf", "2004/10/31 1:30", "2004 10 31 01:30 PST", "2004/10/31 1:30",
+ };
+ const int32_t ZDATA_length = sizeof(ZDATA)/ sizeof(ZDATA[0]);
+ expect(ZDATA, ZDATA_length, en);
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ logln("cross format/parse tests");
+ UnicodeString basepat("yy/MM/dd H:mm ");
+ SimpleDateFormat formats[] = {
+ SimpleDateFormat(basepat + "vvv", en, status),
+ SimpleDateFormat(basepat + "vvvv", en, status),
+ SimpleDateFormat(basepat + "zzz", en, status),
+ SimpleDateFormat(basepat + "zzzz", en, status)
+ };
+ ASSERT_OK(status);
+ const int32_t formats_length = sizeof(formats)/sizeof(formats[0]);
+
+ UnicodeString test;
+ SimpleDateFormat univ("yyyy MM dd HH:mm zzz", en, status);
+ ASSERT_OK(status);
+ const UnicodeString times[] = {
+ "2004 01 02 03:04 PST",
+ "2004 07 08 09:10 PDT"
+ };
+ int32_t times_length = sizeof(times)/sizeof(times[0]);
+ for (int i = 0; i < times_length; ++i) {
+ UDate d = univ.parse(times[i], status);
+ logln(UnicodeString("\ntime: ") + d);
+ for (int j = 0; j < formats_length; ++j) {
+ test.remove();
+ formats[j].format(d, test);
+ logln("\ntest: '" + test + "'");
+ for (int k = 0; k < formats_length; ++k) {
+ UDate t = formats[k].parse(test, status);
+ if (U_SUCCESS(status)) {
+ if (d != t) {
+ errln((UnicodeString)"FAIL: format " + k +
+ " incorrectly parsed output of format " + j +
+ " (" + test + "), returned " +
+ dateToString(t) + " instead of " + dateToString(d));
+ } else {
+ logln((UnicodeString)"OK: format " + k + " parsed ok");
+ }
+ } else if (status == U_PARSE_ERROR) {
+ errln((UnicodeString)"FAIL: format " + k +
+ " could not parse output of format " + j +
+ " (" + test + ")");
+ }
+ }
+ }
+ }
+}
+
+void DateFormatTest::TestGenericTimeZoneOrder() {
+ // generic times should parse the same no matter what the placement of the time zone string
+ // should work for standard and daylight times
+
+ const char* XDATA[] = {
+ "yyyy MM dd HH:mm zzz",
+ // standard time, explicit daylight/standard
+ "y/M/d H:mm zzz", "pf", "2004/1/1 1:00 PT", "2004 01 01 01:00 PST", "2004/1/1 1:00 PST",
+ "y/M/d zzz H:mm", "pf", "2004/1/1 PT 1:00", "2004 01 01 01:00 PST", "2004/1/1 PST 1:00",
+ "zzz y/M/d H:mm", "pf", "PT 2004/1/1 1:00", "2004 01 01 01:00 PST", "PST 2004/1/1 1:00",
+
+ // standard time, generic
+ "y/M/d H:mm vvvv", "pf", "2004/1/1 1:00 PT", "2004 01 01 01:00 PST", "2004/1/1 1:00 Pacific Time",
+ "y/M/d vvvv H:mm", "pf", "2004/1/1 PT 1:00", "2004 01 01 01:00 PST", "2004/1/1 Pacific Time 1:00",
+ "vvvv y/M/d H:mm", "pf", "PT 2004/1/1 1:00", "2004 01 01 01:00 PST", "Pacific Time 2004/1/1 1:00",
+
+ // dahylight time, explicit daylight/standard
+ "y/M/d H:mm zzz", "pf", "2004/7/1 1:00 PT", "2004 07 01 01:00 PDT", "2004/7/1 1:00 PDT",
+ "y/M/d zzz H:mm", "pf", "2004/7/1 PT 1:00", "2004 07 01 01:00 PDT", "2004/7/1 PDT 1:00",
+ "zzz y/M/d H:mm", "pf", "PT 2004/7/1 1:00", "2004 07 01 01:00 PDT", "PDT 2004/7/1 1:00",
+
+ // daylight time, generic
+ "y/M/d H:mm vvvv", "pf", "2004/7/1 1:00 PT", "2004 07 01 01:00 PDT", "2004/7/1 1:00 Pacific Time",
+ "y/M/d vvvv H:mm", "pf", "2004/7/1 PT 1:00", "2004 07 01 01:00 PDT", "2004/7/1 Pacific Time 1:00",
+ "vvvv y/M/d H:mm", "pf", "PT 2004/7/1 1:00", "2004 07 01 01:00 PDT", "Pacific Time 2004/7/1 1:00",
+ };
+ const int32_t XDATA_length = sizeof(XDATA)/sizeof(XDATA[0]);
+ Locale en("en");
+ expect(XDATA, XDATA_length, en);
+}
+
+void DateFormatTest::TestZTimeZoneParsing(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ const Locale en("en");
+ UnicodeString test;
+ //SimpleDateFormat univ("yyyy-MM-dd'T'HH:mm Z", en, status);
+ SimpleDateFormat univ("HH:mm Z", en, status);
+ const TimeZone *t = TimeZone::getGMT();
+ univ.setTimeZone(*t);
+
+ univ.setLenient(false);
+ ParsePosition pp(0);
+ ASSERT_OK(status);
+ struct {
+ UnicodeString input;
+ UnicodeString expected_result;
+ } tests[] = {
+ { "11:00 -0200", "13:00 +0000" },
+ { "11:00 +0200", "09:00 +0000" },
+ { "11:00 +0400", "07:00 +0000" },
+ { "11:00 +0530", "05:30 +0000" }
+ };
+
+ UnicodeString result;
+ int32_t tests_length = sizeof(tests)/sizeof(tests[0]);
+ for (int i = 0; i < tests_length; ++i) {
+ pp.setIndex(0);
+ UDate d = univ.parse(tests[i].input, pp);
+ if(pp.getIndex() != tests[i].input.length()){
+ errln("setZoneString() did not succeed. Consumed: %i instead of %i",
+ pp.getIndex(), tests[i].input.length());
+ return;
+ }
+ result.remove();
+ univ.format(d, result);
+ if(result != tests[i].expected_result) {
+ errln("Expected " + tests[i].expected_result
+ + " got " + result);
+ return;
+ }
+ logln("SUCCESS: Parsed " + tests[i].input
+ + " got " + result
+ + " expected " + tests[i].expected_result);
+ }
+}
+
+void DateFormatTest::TestHost(void)
+{
+#ifdef U_WINDOWS
+ Win32DateTimeTest::testLocales(this);
+#endif
+}
+
+// Relative Date Tests
+
+void DateFormatTest::TestRelative(int daysdelta,
+ const Locale& loc,
+ const char *expectChars) {
+ char banner[25];
+ sprintf(banner, "%d", daysdelta);
+ UnicodeString bannerStr(banner, "");
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ FieldPosition pos(0);
+ UnicodeString test;
+ Locale en("en");
+ DateFormat *fullrelative = DateFormat::createDateInstance(DateFormat::kFullRelative, loc);
+
+ if (fullrelative == NULL) {
+ errln("DateFormat::createDateInstance(DateFormat::kFullRelative, %s) returned NULL", loc.getName());
+ return;
+ }
+
+ DateFormat *full = DateFormat::createDateInstance(DateFormat::kFull , loc);
+
+ if (full == NULL) {
+ errln("DateFormat::createDateInstance(DateFormat::kFull, %s) returned NULL", loc.getName());
+ return;
+ }
+
+ DateFormat *en_full = DateFormat::createDateInstance(DateFormat::kFull, en);
+
+ if (en_full == NULL) {
+ errln("DateFormat::createDateInstance(DateFormat::kFull, en) returned NULL");
+ return;
+ }
+
+ DateFormat *en_fulltime = DateFormat::createDateTimeInstance(DateFormat::kFull,DateFormat::kFull,en);
+
+ if (en_fulltime == NULL) {
+ errln("DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull, en) returned NULL");
+ return;
+ }
+
+ UnicodeString result;
+ UnicodeString normalResult;
+ UnicodeString expect;
+ UnicodeString parseResult;
+
+ Calendar *c = Calendar::createInstance(status);
+
+ // Today = Today
+ c->setTime(Calendar::getNow(), status);
+ if(daysdelta != 0) {
+ c->add(Calendar::DATE,daysdelta,status);
+ }
+ ASSERT_OK(status);
+
+ // calculate the expected string
+ if(expectChars != NULL) {
+ expect = expectChars;
+ } else {
+ full->format(*c, expect, pos); // expected = normal full
+ }
+
+ fullrelative ->format(*c, result, pos);
+ en_full ->format(*c, normalResult, pos);
+
+ if(result != expect) {
+ errln("FAIL: Relative Format ["+bannerStr+"] of "+normalResult+" failed, expected "+expect+" but got " + result);
+ } else {
+ logln("PASS: Relative Format ["+bannerStr+"] of "+normalResult+" got " + result);
+ }
+
+
+ //verify
+ UDate d = fullrelative->parse(result, status);
+ ASSERT_OK(status);
+
+ UnicodeString parseFormat; // parse rel->format full
+ en_full->format(d, parseFormat, status);
+
+ UnicodeString origFormat;
+ en_full->format(*c, origFormat, pos);
+
+ if(parseFormat!=origFormat) {
+ errln("FAIL: Relative Parse ["+bannerStr+"] of "+result+" failed, expected "+parseFormat+" but got "+origFormat);
+ } else {
+ logln("PASS: Relative Parse ["+bannerStr+"] of "+result+" passed, got "+parseFormat);
+ }
+
+ delete full;
+ delete fullrelative;
+ delete en_fulltime;
+ delete en_full;
+ delete c;
+}
+
+
+void DateFormatTest::TestRelative(void)
+{
+ Locale en("en");
+ TestRelative( 0, en, "Today");
+ TestRelative(-1, en, "Yesterday");
+ TestRelative( 1, en, "Tomorrow");
+ TestRelative( 2, en, NULL);
+ TestRelative( -2, en, NULL);
+ TestRelative( 3, en, NULL);
+ TestRelative( -3, en, NULL);
+ TestRelative( 300, en, NULL);
+ TestRelative( -300, en, NULL);
+}
+
+void DateFormatTest::TestRelativeClone(void)
+{
+ /*
+ Verify that a cloned formatter gives the same results
+ and is useable after the original has been deleted.
+ */
+ UErrorCode status = U_ZERO_ERROR;
+ Locale loc("en");
+ UDate now = Calendar::getNow();
+ DateFormat *full = DateFormat::createDateInstance(DateFormat::kFullRelative, loc);
+ if (full == NULL) {
+ errln("FAIL: Can't create Relative date instance");
+ return;
+ }
+ UnicodeString result1;
+ full->format(now, result1, status);
+ Format *fullClone = full->clone();
+ delete full;
+ full = NULL;
+
+ UnicodeString result2;
+ fullClone->format(now, result2, status);
+ ASSERT_OK(status);
+ if (result1 != result2) {
+ errln("FAIL: Clone returned different result from non-clone.");
+ }
+ delete fullClone;
+}
+
+void DateFormatTest::TestHostClone(void)
+{
+ /*
+ Verify that a cloned formatter gives the same results
+ and is useable after the original has been deleted.
+ */
+ // This is mainly important on Windows.
+ UErrorCode status = U_ZERO_ERROR;
+ Locale loc("en_US@compat=host");
+ UDate now = Calendar::getNow();
+ DateFormat *full = DateFormat::createDateInstance(DateFormat::kFull, loc);
+ if (full == NULL) {
+ errln("FAIL: Can't create Relative date instance");
+ return;
+ }
+ UnicodeString result1;
+ full->format(now, result1, status);
+ Format *fullClone = full->clone();
+ delete full;
+ full = NULL;
+
+ UnicodeString result2;
+ fullClone->format(now, result2, status);
+ ASSERT_OK(status);
+ if (result1 != result2) {
+ errln("FAIL: Clone returned different result from non-clone.");
+ }
+ delete fullClone;
+}
+
+void DateFormatTest::TestTimeZoneDisplayName()
+{
+ // This test data was ported from ICU4J. Don't know why the 6th column in there because it's not being
+ // used currently.
+ const char *fallbackTests[][6] = {
+ { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
+ { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-08:00", "-8:00" },
+ { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "PST", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z", "V", "PST", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "Pacific Standard Time", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "PDT", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "V", "PDT", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "Pacific Daylight Time", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "PT", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "Pacific Time", "America/Los_Angeles" },
+ { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "VVVV", "United States (Los Angeles)", "America/Los_Angeles" },
+ { "en_GB", "America/Los_Angeles", "2004-01-15T12:00:00Z", "z", "PST", "America/Los_Angeles" },
+ { "en", "America/Phoenix", "2004-01-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "en", "America/Phoenix", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
+ { "en", "America/Phoenix", "2004-01-15T00:00:00Z", "z", "MST", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-01-15T00:00:00Z", "V", "MST", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-01-15T00:00:00Z", "zzzz", "Mountain Standard Time", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "z", "MST", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "V", "MST", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "zzzz", "Mountain Standard Time", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "v", "MST", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "vvvv", "Mountain Standard Time", "America/Phoenix" },
+ { "en", "America/Phoenix", "2004-07-15T00:00:00Z", "VVVV", "United States (Phoenix)", "America/Phoenix" },
+
+ { "en", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "V", "ART", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "Argentina Time", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "V", "ART", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "Argentina Time", "-3:00" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "Argentina (Buenos Aires)", "America/Buenos_Aires" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "Argentina Time", "America/Buenos_Aires" },
+ { "en", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "VVVV", "Argentina (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "V", "ART", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "Argentina Time", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "V", "ART", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "Argentina Time", "-3:00" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "Argentina (Buenos Aires)", "America/Buenos_Aires" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "Argentina Time", "America/Buenos_Aires" },
+ { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "VVVV", "Argentina (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "en", "America/Havana", "2004-01-15T00:00:00Z", "Z", "-0500", "-5:00" },
+ { "en", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-05:00", "-5:00" },
+ { "en", "America/Havana", "2004-01-15T00:00:00Z", "z", "GMT-05:00", "-5:00" },
+ { "en", "America/Havana", "2004-01-15T00:00:00Z", "V", "CST (Cuba)", "-5:00" },
+ { "en", "America/Havana", "2004-01-15T00:00:00Z", "zzzz", "Cuba Standard Time", "-5:00" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "Z", "-0400", "-4:00" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-04:00", "-4:00" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "z", "GMT-04:00", "-4:00" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "V", "CDT (Cuba)", "-4:00" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "zzzz", "Cuba Daylight Time", "-4:00" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "v", "Cuba Time", "America/Havana" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "Cuba Time", "America/Havana" },
+ { "en", "America/Havana", "2004-07-15T00:00:00Z", "VVVV", "Cuba Time", "America/Havana" },
+
+ { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
+ { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
+ { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "V", "AEDT", "+11:00" },
+ { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "Australian Eastern Daylight Time", "+11:00" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "V", "AEST", "+10:00" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "Australian Eastern Standard Time", "+10:00" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "Australia (Sydney)", "Australia/Sydney" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "Eastern Australia Time", "Australia/Sydney" },
+ { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "VVVV", "Australia (Sydney)", "Australia/Sydney" },
+
+ { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
+ { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
+ { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "V", "AEDT", "+11:00" },
+ { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "Australian Eastern Daylight Time", "+11:00" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "V", "AEST", "+10:00" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "Australian Eastern Standard Time", "+10:00" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "Australia (Sydney)", "Australia/Sydney" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "Eastern Australia Time", "Australia/Sydney" },
+ { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "VVVV", "Australia (Sydney)", "Australia/Sydney" },
+
+ { "en", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
+ { "en", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+00:00", "+0:00" },
+ { "en", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT", "+0:00" },
+ { "en", "Europe/London", "2004-01-15T00:00:00Z", "V", "GMT", "+0:00" },
+ { "en", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "Greenwich Mean Time", "+0:00" },
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+01:00", "+1:00" },
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+01:00", "Europe/London" },
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "V", "BST", "Europe/London" },
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "British Summer Time", "Europe/London" },
+ // icu en.txt has exemplar city for this time zone
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "v", "United Kingdom Time", "Europe/London" },
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "vvvv", "United Kingdom Time", "Europe/London" },
+ { "en", "Europe/London", "2004-07-15T00:00:00Z", "VVVV", "United Kingdom Time", "Europe/London" },
+
+ { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v", "GMT-03:00", "-3:00" },
+ { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv", "GMT-03:00", "-3:00" },
+
+ // JB#5150
+ { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+05:30", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z", "GMT+05:30", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "V", "IST", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz", "India Standard Time", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+05:30", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z", "GMT+05:30", "+05:30" },
+ { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "V", "IST", "+05:30" },
+ { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz", "India Standard Time", "+5:30" },
+ { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "India Time", "Asia/Calcutta" },
+ { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "India Standard Time", "Asia/Calcutta" },
+
+ // ==========
+
+ { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
+ { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-08:00", "-8:00" },
+ { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-08:00", "-8:00" },
+ { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "GMT-08:00", "-8:00" },
+ { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
+ { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-07:00", "-7:00" },
+ { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "GMT-07:00", "-7:00" },
+ { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "Vereinigte Staaten (Los Angeles)", "America/Los_Angeles" },
+ { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "Vereinigte Staaten (Los Angeles)", "America/Los_Angeles" },
+
+ { "de", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "Argentinien (Buenos Aires)", "America/Buenos_Aires" },
+ { "de", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "Argentinien (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "Argentinien (Buenos Aires)", "America/Buenos_Aires" },
+ { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "Argentinien (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "de", "America/Havana", "2004-01-15T00:00:00Z", "Z", "-0500", "-5:00" },
+ { "de", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-05:00", "-5:00" },
+ { "de", "America/Havana", "2004-01-15T00:00:00Z", "z", "GMT-05:00", "-5:00" },
+ { "de", "America/Havana", "2004-01-15T00:00:00Z", "zzzz", "GMT-05:00", "-5:00" },
+ { "de", "America/Havana", "2004-07-15T00:00:00Z", "Z", "-0400", "-4:00" },
+ { "de", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-04:00", "-4:00" },
+ { "de", "America/Havana", "2004-07-15T00:00:00Z", "z", "GMT-04:00", "-4:00" },
+ { "de", "America/Havana", "2004-07-15T00:00:00Z", "zzzz", "GMT-04:00", "-4:00" },
+ { "de", "America/Havana", "2004-07-15T00:00:00Z", "v", "Kuba", "America/Havana" },
+ { "de", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "Kuba", "America/Havana" },
+ // added to test proper fallback of country name
+ { "de_CH", "America/Havana", "2004-07-15T00:00:00Z", "v", "Kuba", "America/Havana" },
+ { "de_CH", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "Kuba", "America/Havana" },
+
+ { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
+ { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
+ { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "GMT+11:00", "+11:00" },
+ { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
+ { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
+ { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "GMT+10:00", "+10:00" },
+ { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "Australien (Sydney)", "Australia/Sydney" },
+ { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "Australien (Sydney)", "Australia/Sydney" },
+
+ { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
+ { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
+ { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "GMT+11:00", "+11:00" },
+ { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
+ { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
+ { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "GMT+10:00", "+10:00" },
+ { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "Australien (Sydney)", "Australia/Sydney" },
+ { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "Australien (Sydney)", "Australia/Sydney" },
+
+ { "de", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
+ { "de", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+00:00", "+0:00" },
+ { "de", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT+00:00", "+0:00" },
+ { "de", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "GMT+00:00", "+0:00" },
+ { "de", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
+ { "de", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+01:00", "+1:00" },
+ { "de", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+01:00", "+1:00" },
+ { "de", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "GMT+01:00", "+1:00" },
+ { "de", "Europe/London", "2004-07-15T00:00:00Z", "v", "Vereinigtes K\\u00f6nigreich", "Europe/London" },
+ { "de", "Europe/London", "2004-07-15T00:00:00Z", "vvvv", "Vereinigtes K\\u00f6nigreich", "Europe/London" },
+
+ { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v", "GMT-03:00", "-3:00" },
+ { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv", "GMT-03:00", "-3:00" },
+
+ // JB#5150
+ { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+05:30", "+5:30" },
+ { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z", "GMT+05:30", "+5:30" },
+ { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz", "GMT+05:30", "+5:30" },
+ { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+05:30", "+5:30" },
+ { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z", "GMT+05:30", "+05:30" },
+ { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz", "GMT+05:30", "+5:30" },
+ { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "Indien", "Asia/Calcutta" },
+ { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "Indien", "Asia/Calcutta" },
+
+ // ==========
+
+ { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
+ { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0800", "-8:00" },
+ { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-0800", "America/Los_Angeles" },
+ { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u592a\\u5e73\\u6d0b\\u6807\\u51c6\\u65f6\\u95f4", "America/Los_Angeles" },
+ { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0700", "-7:00" },
+ { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-0700", "America/Los_Angeles" },
+ { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u592a\\u5e73\\u6d0b\\u590f\\u4ee4\\u65f6\\u95f4", "America/Los_Angeles" },
+ // icu zh.txt has exemplar city for this time zone
+ { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u7f8e\\u56fd (\\u6d1b\\u6749\\u77f6)", "America/Los_Angeles" },
+ { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u7f8e\\u56fd (\\u6d1b\\u6749\\u77f6)", "America/Los_Angeles" },
+
+ { "zh", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ // icu zh.txt does not have info for this time zone
+ { "zh", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u963f\\u6839\\u5ef7 (\\u5e03\\u5b9c\\u8bfa\\u65af\\u827e\\u5229\\u65af)", "America/Buenos_Aires" },
+ { "zh", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u963f\\u6839\\u5ef7 (\\u5e03\\u5b9c\\u8bfa\\u65af\\u827e\\u5229\\u65af)", "America/Buenos_Aires" },
+
+ { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u963f\\u6839\\u5ef7 (\\u5e03\\u5b9c\\u8bfa\\u65af\\u827e\\u5229\\u65af)", "America/Buenos_Aires" },
+ { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u963f\\u6839\\u5ef7 (\\u5e03\\u5b9c\\u8bfa\\u65af\\u827e\\u5229\\u65af)", "America/Buenos_Aires" },
+
+ { "zh", "America/Havana", "2004-01-15T00:00:00Z", "Z", "-0500", "-5:00" },
+ { "zh", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0500", "-5:00" },
+ { "zh", "America/Havana", "2004-01-15T00:00:00Z", "z", "GMT-0500", "-5:00" },
+ { "zh", "America/Havana", "2004-01-15T00:00:00Z", "zzzz", "GMT-0500", "-5:00" },
+ { "zh", "America/Havana", "2004-07-15T00:00:00Z", "Z", "-0400", "-4:00" },
+ { "zh", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0400", "-4:00" },
+ { "zh", "America/Havana", "2004-07-15T00:00:00Z", "z", "GMT-0400", "-4:00" },
+ { "zh", "America/Havana", "2004-07-15T00:00:00Z", "zzzz", "GMT-0400", "-4:00" },
+ { "zh", "America/Havana", "2004-07-15T00:00:00Z", "v", "\\u53e4\\u5df4", "America/Havana" },
+ { "zh", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "\\u53e4\\u5df4", "America/Havana" },
+
+ { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+1100", "+11:00" },
+ { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+1100", "+11:00" },
+ { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "\\u6fb3\\u5927\\u5229\\u4e9a\\u4e1c\\u90e8\\u590f\\u4ee4\\u65f6\\u95f4", "+11:00" },
+ { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+1000", "+10:00" },
+ { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+1000", "+10:00" },
+ { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "GMT+1000", "+10:00" },
+ // icu zh.txt does not have info for this time zone
+ { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "\\u6fb3\\u5927\\u5229\\u4e9a (\\u6089\\u5c3c)", "Australia/Sydney" },
+ { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "\\u6fb3\\u5927\\u5229\\u4e9a (\\u6089\\u5c3c)", "Australia/Sydney" },
+
+ { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+1100", "+11:00" },
+ { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+1100", "+11:00" },
+ { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "\\u6fb3\\u5927\\u5229\\u4e9a\\u4e1c\\u90e8\\u590f\\u4ee4\\u65f6\\u95f4", "+11:00" },
+ { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+1000", "+10:00" },
+ { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+1000", "+10:00" },
+ { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "GMT+1000", "+10:00" },
+ { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "\\u6fb3\\u5927\\u5229\\u4e9a (\\u6089\\u5c3c)", "Australia/Sydney" },
+ { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "\\u6fb3\\u5927\\u5229\\u4e9a (\\u6089\\u5c3c)", "Australia/Sydney" },
+
+ { "zh", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
+ { "zh", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+0000", "+0:00" },
+ { "zh", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT+0000", "+0:00" },
+ { "zh", "Europe/London", "2004-01-15T00:00:00Z", "V", "GMT", "+0:00" },
+ { "zh", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "\\u683C\\u6797\\u5C3C\\u6CBB\\u6807\\u51C6\\u65F6\\u95F4", "+0:00" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+0100", "+1:00" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+0100", "+1:00" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "V", "BST", "+1:00" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "GMT+0100", "+1:00" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "v", "\\u82f1\\u56fd", "Europe/London" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "vvvv", "\\u82f1\\u56fd", "Europe/London" },
+ { "zh", "Europe/London", "2004-07-15T00:00:00Z", "VVVV", "\\u82f1\\u56fd", "Europe/London" },
+
+ { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v", "GMT-0300", "-3:00" },
+ { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv", "GMT-0300", "-3:00" },
+
+ // JB#5150
+ { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+0530", "+5:30" },
+ { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z", "GMT+0530", "+5:30" },
+ { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz", "GMT+0530", "+5:30" },
+ { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+0530", "+5:30" },
+ { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z", "GMT+0530", "+05:30" },
+ { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz", "GMT+0530", "+5:30" },
+ { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "\\u5370\\u5ea6", "Asia/Calcutta" },
+ { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "\\u5370\\u5EA6", "Asia/Calcutta" },
+
+ // ==========
+
+ { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
+ { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u096e:\\u0966\\u0966", "-8:00" },
+ { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-\\u0966\\u096e:\\u0966\\u0966", "-8:00" },
+ { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u096e:\\u0966\\u0966", "-8:00" },
+ { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u096d:\\u0966\\u0966", "-7:00" },
+ { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-\\u0966\\u096d:\\u0966\\u0966", "-7:00" },
+ { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u096d:\\u0966\\u0966", "-7:00" },
+ { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u0938\\u0902\\u092f\\u0941\\u0915\\u094d\\u0924 \\u0930\\u093e\\u091c\\u094d\\u092f \\u0905\\u092e\\u0930\\u093f\\u0915\\u093e (Los Angeles)", "America/Los_Angeles" },
+ { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u0938\\u0902\\u092f\\u0941\\u0915\\u094d\\u0924 \\u0930\\u093e\\u091c\\u094d\\u092f \\u0905\\u092e\\u0930\\u093f\\u0915\\u093e (Los Angeles)", "America/Los_Angeles" },
+
+ { "hi", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u0905\\u0930\\u094d\\u091c\\u0947\\u0928\\u094d\\u091f\\u0940\\u0928\\u093e (Buenos Aires)", "America/Buenos_Aires" },
+ { "hi", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u0905\\u0930\\u094d\\u091c\\u0947\\u0928\\u094d\\u091f\\u0940\\u0928\\u093e (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u0905\\u0930\\u094d\\u091c\\u0947\\u0928\\u094d\\u091f\\u0940\\u0928\\u093e (Buenos Aires)", "America/Buenos_Aires" },
+ { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u0905\\u0930\\u094d\\u091c\\u0947\\u0928\\u094d\\u091f\\u0940\\u0928\\u093e (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "hi", "America/Havana", "2004-01-15T00:00:00Z", "Z", "-0500", "-5:00" },
+ { "hi", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u096b:\\u0966\\u0966", "-5:00" },
+ { "hi", "America/Havana", "2004-01-15T00:00:00Z", "z", "GMT-\\u0966\\u096b:\\u0966\\u0966", "-5:00" },
+ { "hi", "America/Havana", "2004-01-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u096b:\\u0966\\u0966", "-5:00" },
+ { "hi", "America/Havana", "2004-07-15T00:00:00Z", "Z", "-0400", "-4:00" },
+ { "hi", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u096a:\\u0966\\u0966", "-4:00" },
+ { "hi", "America/Havana", "2004-07-15T00:00:00Z", "z", "GMT-\\u0966\\u096a:\\u0966\\u0966", "-4:00" },
+ { "hi", "America/Havana", "2004-07-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u096a:\\u0966\\u0966", "-4:00" },
+ { "hi", "America/Havana", "2004-07-15T00:00:00Z", "v", "\\u0915\\u094d\\u092f\\u0942\\u092c\\u093e", "America/Havana" },
+ { "hi", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "\\u0915\\u094d\\u092f\\u0942\\u092c\\u093e", "America/Havana" },
+
+ { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+\\u0967\\u0967:\\u0966\\u0966", "+11:00" },
+ { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+\\u0967\\u0967:\\u0966\\u0966", "+11:00" },
+ { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "GMT+\\u0967\\u0967:\\u0966\\u0966", "+11:00" },
+ { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+\\u0967\\u0966:\\u0966\\u0966", "+10:00" },
+ { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+\\u0967\\u0966:\\u0966\\u0966", "+10:00" },
+ { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "GMT+\\u0967\\u0966:\\u0966\\u0966", "+10:00" },
+ { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "\\u0911\\u0938\\u094d\\u091f\\u094d\\u0930\\u0947\\u0932\\u093f\\u092f\\u093e (Sydney)", "Australia/Sydney" },
+ { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "\\u0911\\u0938\\u094d\\u091f\\u094d\\u0930\\u0947\\u0932\\u093f\\u092f\\u093e (Sydney)", "Australia/Sydney" },
+
+ { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+\\u0967\\u0967:\\u0966\\u0966", "+11:00" },
+ { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+\\u0967\\u0967:\\u0966\\u0966", "+11:00" },
+ { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "GMT+\\u0967\\u0967:\\u0966\\u0966", "+11:00" },
+ { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+\\u0967\\u0966:\\u0966\\u0966", "+10:00" },
+ { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+\\u0967\\u0966:\\u0966\\u0966", "+10:00" },
+ { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "GMT+\\u0967\\u0966:\\u0966\\u0966", "+10:00" },
+ { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "\\u0911\\u0938\\u094d\\u091f\\u094d\\u0930\\u0947\\u0932\\u093f\\u092f\\u093e (Sydney)", "Australia/Sydney" },
+ { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "\\u0911\\u0938\\u094d\\u091f\\u094d\\u0930\\u0947\\u0932\\u093f\\u092f\\u093e (Sydney)", "Australia/Sydney" },
+
+ { "hi", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
+ { "hi", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+\\u0966\\u0966:\\u0966\\u0966", "+0:00" },
+ { "hi", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT+\\u0966\\u0966:\\u0966\\u0966", "+0:00" },
+ { "hi", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "GMT+\\u0966\\u0966:\\u0966\\u0966", "+0:00" },
+ { "hi", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
+ { "hi", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+\\u0966\\u0967:\\u0966\\u0966", "+1:00" },
+ { "hi", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+\\u0966\\u0967:\\u0966\\u0966", "+1:00" },
+ { "hi", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "GMT+\\u0966\\u0967:\\u0966\\u0966", "+1:00" },
+ { "hi", "Europe/London", "2004-07-15T00:00:00Z", "v", "\\u092C\\u094D\\u0930\\u093F\\u0924\\u0928", "Europe/London" },
+ { "hi", "Europe/London", "2004-07-15T00:00:00Z", "vvvv", "\\u092C\\u094D\\u0930\\u093F\\u0924\\u0928", "Europe/London" },
+
+ { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+ { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv", "GMT-\\u0966\\u0969:\\u0966\\u0966", "-3:00" },
+
+ { "hi", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "hi", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+\\u0966\\u096B:\\u0969\\u0966", "+5:30" },
+ { "hi", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z", "IST", "+5:30" },
+ { "hi", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz", "\\u092D\\u093E\\u0930\\u0924\\u0940\\u092F \\u0938\\u092E\\u092F", "+5:30" },
+ { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+\\u0966\\u096B:\\u0969\\u0966", "+5:30" },
+ { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z", "IST", "+05:30" },
+ { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz", "\\u092D\\u093E\\u0930\\u0924\\u0940\\u092F \\u0938\\u092E\\u092F", "+5:30" },
+ { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "IST", "Asia/Calcutta" },
+ { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "\\u092D\\u093E\\u0930\\u0924\\u0940\\u092F \\u0938\\u092E\\u092F", "Asia/Calcutta" },
+
+ // ==========
+
+ { "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
+ { "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0800", "-8:00" },
+ { "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-0800", "America/Los_Angeles" },
+ { "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "V", "PST", "America/Los_Angeles" },
+ { "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u0422\\u0438\\u0445\\u043E\\u043E\\u043A\\u0435\\u0430\\u043D\\u0441\\u043A\\u0430 \\u0447\\u0430\\u0441\\u043E\\u0432\\u0430 \\u0437\\u043E\\u043D\\u0430", "America/Los_Angeles" },
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0700", "-7:00" },
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-0700", "America/Los_Angeles" },
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "V", "PDT", "America/Los_Angeles" },
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u0422\\u0438\\u0445\\u043E\\u043E\\u043A\\u0435\\u0430\\u043D\\u0441\\u043A\\u0430 \\u043B\\u044F\\u0442\\u043D\\u0430 \\u0447\\u0430\\u0441\\u043E\\u0432\\u0430 \\u0437\\u043E\\u043D\\u0430", "America/Los_Angeles" },
+ // icu bg.txt has exemplar city for this time zone
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u0421\\u0410\\u0429 (\\u041b\\u043e\\u0441 \\u0410\\u043d\\u0436\\u0435\\u043b\\u0438\\u0441)", "America/Los_Angeles" },
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u0421\\u0410\\u0429 (\\u041b\\u043e\\u0441 \\u0410\\u043d\\u0436\\u0435\\u043b\\u0438\\u0441)", "America/Los_Angeles" },
+ { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "VVVV", "\\u0421\\u0410\\u0429 (\\u041b\\u043e\\u0441 \\u0410\\u043d\\u0436\\u0435\\u043b\\u0438\\u0441)", "America/Los_Angeles" },
+
+ { "bg", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u0410\\u0440\\u0436\\u0435\\u043d\\u0442\\u0438\\u043d\\u0430 (\\u0411\\u0443\\u0435\\u043D\\u043E\\u0441 \\u0410\\u0439\\u0440\\u0435\\u0441)", "America/Buenos_Aires" },
+ { "bg", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u0410\\u0440\\u0436\\u0435\\u043d\\u0442\\u0438\\u043d\\u0430 (\\u0411\\u0443\\u0435\\u043D\\u043E\\u0441 \\u0410\\u0439\\u0440\\u0435\\u0441)", "America/Buenos_Aires" },
+
+ { "bg", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "bg", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "bg", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "bg", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "bg", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "bg", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "bg", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "bg", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ // icu bg.txt does not have info for this time zone
+ { "bg", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u0410\\u0440\\u0436\\u0435\\u043d\\u0442\\u0438\\u043d\\u0430 (\\u0411\\u0443\\u0435\\u043D\\u043E\\u0441 \\u0410\\u0439\\u0440\\u0435\\u0441)", "America/Buenos_Aires" },
+ { "bg", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u0410\\u0440\\u0436\\u0435\\u043d\\u0442\\u0438\\u043d\\u0430 (\\u0411\\u0443\\u0435\\u043D\\u043E\\u0441 \\u0410\\u0439\\u0440\\u0435\\u0441)", "America/Buenos_Aires" },
+
+ { "bg", "America/Havana", "2004-01-15T00:00:00Z", "Z", "-0500", "-5:00" },
+ { "bg", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0500", "-5:00" },
+ { "bg", "America/Havana", "2004-01-15T00:00:00Z", "z", "GMT-0500", "-5:00" },
+ { "bg", "America/Havana", "2004-01-15T00:00:00Z", "zzzz", "GMT-0500", "-5:00" },
+ { "bg", "America/Havana", "2004-07-15T00:00:00Z", "Z", "-0400", "-4:00" },
+ { "bg", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0400", "-4:00" },
+ { "bg", "America/Havana", "2004-07-15T00:00:00Z", "z", "GMT-0400", "-4:00" },
+ { "bg", "America/Havana", "2004-07-15T00:00:00Z", "zzzz", "GMT-0400", "-4:00" },
+ { "bg", "America/Havana", "2004-07-15T00:00:00Z", "v", "\\u041a\\u0443\\u0431\\u0430", "America/Havana" },
+ { "bg", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "\\u041a\\u0443\\u0431\\u0430", "America/Havana" },
+
+ { "bg", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "bg", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+1100", "+11:00" },
+ { "bg", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+1100", "+11:00" },
+ { "bg", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "GMT+1100", "+11:00" },
+ { "bg", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "bg", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+1000", "+10:00" },
+ { "bg", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+1000", "+10:00" },
+ { "bg", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "GMT+1000", "+10:00" },
+ { "bg", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "\\u0410\\u0432\\u0441\\u0442\\u0440\\u0430\\u043b\\u0438\\u044f (\\u0421\\u0438\\u0434\\u043D\\u0438)", "Australia/Sydney" },
+ { "bg", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "\\u0410\\u0432\\u0441\\u0442\\u0440\\u0430\\u043b\\u0438\\u044f (\\u0421\\u0438\\u0434\\u043D\\u0438)", "Australia/Sydney" },
+
+ { "bg", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "bg", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+1100", "+11:00" },
+ { "bg", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+1100", "+11:00" },
+ { "bg", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "GMT+1100", "+11:00" },
+ { "bg", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "bg", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+1000", "+10:00" },
+ { "bg", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+1000", "+10:00" },
+ { "bg", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "GMT+1000", "+10:00" },
+ { "bg", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "\\u0410\\u0432\\u0441\\u0442\\u0440\\u0430\\u043b\\u0438\\u044f (\\u0421\\u0438\\u0434\\u043D\\u0438)", "Australia/Sydney" },
+ { "bg", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "\\u0410\\u0432\\u0441\\u0442\\u0440\\u0430\\u043b\\u0438\\u044f (\\u0421\\u0438\\u0434\\u043D\\u0438)", "Australia/Sydney" },
+
+ { "bg", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
+ { "bg", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+0000", "+0:00" },
+ { "bg", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT+0000", "+0:00" },
+ { "bg", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "\\u0427\\u0430\\u0441\\u043E\\u0432\\u0430 \\u0437\\u043E\\u043D\\u0430 \\u0413\\u0440\\u0438\\u043D\\u0443\\u0438\\u0447", "+0:00" },
+ { "bg", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
+ { "bg", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+0100", "+1:00" },
+ { "bg", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+0100", "+1:00" },
+ { "bg", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "GMT+0100", "+1:00" },
+ { "bg", "Europe/London", "2004-07-15T00:00:00Z", "v", "\\u041e\\u0431\\u0435\\u0434\\u0438\\u043d\\u0435\\u043d\\u043e \\u043a\\u0440\\u0430\\u043b\\u0441\\u0442\\u0432\\u043e", "Europe/London" },
+ { "bg", "Europe/London", "2004-07-15T00:00:00Z", "vvvv", "\\u041e\\u0431\\u0435\\u0434\\u0438\\u043d\\u0435\\u043d\\u043e \\u043a\\u0440\\u0430\\u043b\\u0441\\u0442\\u0432\\u043e", "Europe/London" },
+
+ { "bg", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v", "GMT-0300", "-3:00" },
+ { "bg", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv", "GMT-0300", "-3:00" },
+
+ // JB#5150
+ { "bg", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "bg", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+0530", "+5:30" },
+ { "bg", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z", "GMT+0530", "+5:30" },
+ { "bg", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz", "GMT+0530", "+5:30" },
+ { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+0530", "+5:30" },
+ { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z", "GMT+0530", "+05:30" },
+ { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz", "GMT+0530", "+5:30" },
+ { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "\\u0418\\u043D\\u0434\\u0438\\u044F", "Asia/Calcutta" },
+ { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "\\u0418\\u043D\\u0434\\u0438\\u044F", "Asia/Calcutta" },
+
+ // ==========
+
+ { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
+ { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0800", "-8:00" },
+ { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-0800", "America/Los_Angeles" },
+ { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "V", "PST", "America/Los_Angeles" },
+ { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u592a\\u5e73\\u6d0b\\u6a19\\u6e96\\u6642", "America/Los_Angeles" },
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0700", "-7:00" },
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-0700", "America/Los_Angeles" },
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "V", "PDT", "America/Los_Angeles" },
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u592a\\u5e73\\u6d0b\\u590f\\u6642\\u9593", "America/Los_Angeles" },
+ // icu ja.txt has exemplar city for this time zone
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u30A2\\u30E1\\u30EA\\u30AB\\u5408\\u8846\\u56FD (\\u30ed\\u30b5\\u30f3\\u30bc\\u30eb\\u30b9)", "America/Los_Angeles" },
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u30A2\\u30E1\\u30EA\\u30AB\\u5408\\u8846\\u56FD (\\u30ed\\u30b5\\u30f3\\u30bc\\u30eb\\u30b9)", "America/Los_Angeles" },
+ { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "VVVV", "\\u30A2\\u30E1\\u30EA\\u30AB\\u5408\\u8846\\u56FD (\\u30ed\\u30b5\\u30f3\\u30bc\\u30eb\\u30b9)", "America/Los_Angeles" },
+
+ { "ja", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ // icu ja.txt does not have info for this time zone
+ { "ja", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u30a2\\u30eb\\u30bc\\u30f3\\u30c1\\u30f3 (\\u30A2\\u30E1\\u30EA\\u30AB/\\u30D6\\u30A8\\u30CE\\u30B9\\u30A2\\u30A4\\u30EC\\u30B9)", "America/Buenos_Aires" },
+ { "ja", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u30a2\\u30eb\\u30bc\\u30f3\\u30c1\\u30f3 (\\u30A2\\u30E1\\u30EA\\u30AB/\\u30D6\\u30A8\\u30CE\\u30B9\\u30A2\\u30A4\\u30EC\\u30B9)", "America/Buenos_Aires" },
+
+ { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ // icu ja.txt does not have info for this time zone
+ { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "\\u30a2\\u30eb\\u30bc\\u30f3\\u30c1\\u30f3 (\\u30A2\\u30E1\\u30EA\\u30AB/\\u30D6\\u30A8\\u30CE\\u30B9\\u30A2\\u30A4\\u30EC\\u30B9)", "America/Buenos_Aires" },
+ { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "\\u30a2\\u30eb\\u30bc\\u30f3\\u30c1\\u30f3 (\\u30A2\\u30E1\\u30EA\\u30AB/\\u30D6\\u30A8\\u30CE\\u30B9\\u30A2\\u30A4\\u30EC\\u30B9)", "America/Buenos_Aires" },
+
+ { "ja", "America/Havana", "2004-01-15T00:00:00Z", "Z", "-0500", "-5:00" },
+ { "ja", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0500", "-5:00" },
+ { "ja", "America/Havana", "2004-01-15T00:00:00Z", "z", "GMT-0500", "-5:00" },
+ { "ja", "America/Havana", "2004-01-15T00:00:00Z", "zzzz", "GMT-0500", "-5:00" },
+ { "ja", "America/Havana", "2004-07-15T00:00:00Z", "Z", "-0400", "-4:00" },
+ { "ja", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0400", "-4:00" },
+ { "ja", "America/Havana", "2004-07-15T00:00:00Z", "z", "GMT-0400", "-4:00" },
+ { "ja", "America/Havana", "2004-07-15T00:00:00Z", "zzzz", "GMT-0400", "-4:00" },
+ { "ja", "America/Havana", "2004-07-15T00:00:00Z", "v", "\\u30ad\\u30e5\\u30fc\\u30d0\\u6642\\u9593", "America/Havana" },
+ { "ja", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "\\u30ad\\u30e5\\u30fc\\u30d0\\u6642\\u9593", "America/Havana" },
+
+ { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+1100", "+11:00" },
+ { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+1100", "+11:00" },
+ { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "GMT+1100", "+11:00" },
+ { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+1000", "+10:00" },
+ { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+1000", "+10:00" },
+ { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "GMT+1000", "+10:00" },
+ // icu ja.txt does not have info for this time zone
+ { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "\\u30aa\\u30fc\\u30b9\\u30c8\\u30e9\\u30ea\\u30a2 (\\u30AA\\u30FC\\u30B9\\u30C8\\u30E9\\u30EA\\u30A2/\\u30B7\\u30C9\\u30CB\\u30FC)", "Australia/Sydney" },
+ { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "\\u30aa\\u30fc\\u30b9\\u30c8\\u30e9\\u30ea\\u30a2 (\\u30AA\\u30FC\\u30B9\\u30C8\\u30E9\\u30EA\\u30A2/\\u30B7\\u30C9\\u30CB\\u30FC)", "Australia/Sydney" },
+
+ { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+1100", "+11:00" },
+ { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+1100", "+11:00" },
+ { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "GMT+1100", "+11:00" },
+ { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+1000", "+10:00" },
+ { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+1000", "+10:00" },
+ { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "GMT+1000", "+10:00" },
+ { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "\\u30aa\\u30fc\\u30b9\\u30c8\\u30e9\\u30ea\\u30a2 (\\u30AA\\u30FC\\u30B9\\u30C8\\u30E9\\u30EA\\u30A2/\\u30B7\\u30C9\\u30CB\\u30FC)", "Australia/Sydney" },
+ { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "\\u30aa\\u30fc\\u30b9\\u30c8\\u30e9\\u30ea\\u30a2 (\\u30AA\\u30FC\\u30B9\\u30C8\\u30E9\\u30EA\\u30A2/\\u30B7\\u30C9\\u30CB\\u30FC)", "Australia/Sydney" },
+
+ { "ja", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
+ { "ja", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+0000", "+0:00" },
+ { "ja", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT+0000", "+0:00" },
+ { "ja", "Europe/London", "2004-01-15T00:00:00Z", "V", "GMT", "+0:00" },
+ { "ja", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "\\u30B0\\u30EA\\u30CB\\u30C3\\u30B8\\u6A19\\u6E96\\u6642", "+0:00" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+0100", "+1:00" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+0100", "+1:00" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "V", "GMT+0100", "+1:00" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "GMT+0100", "+1:00" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "v", "\\u30a4\\u30ae\\u30ea\\u30b9\\u6642\\u9593", "Europe/London" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "vvvv", "\\u30a4\\u30ae\\u30ea\\u30b9\\u6642\\u9593", "Europe/London" },
+ { "ja", "Europe/London", "2004-07-15T00:00:00Z", "VVVV", "\\u30a4\\u30ae\\u30ea\\u30b9\\u6642\\u9593", "Europe/London" },
+
+ { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v", "GMT-0300", "-3:00" },
+ { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv", "GMT-0300", "-3:00" },
+
+ // JB#5150
+ { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+0530", "+5:30" },
+ { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z", "GMT+0530", "+5:30" },
+ { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz", "GMT+0530", "+5:30" },
+ { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+0530", "+5:30" },
+ { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z", "GMT+0530", "+05:30" },
+ { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz", "GMT+0530", "+5:30" },
+ { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "\\u30A4\\u30F3\\u30C9\\u6642\\u9593", "Asia/Calcutta" },
+ { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "\\u30A4\\u30F3\\u30C9\\u6642\\u9593", "Asia/Calcutta" },
+
+ // ==========
+
+ { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
+ { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-08:00", "-8:00" },
+ { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-08:00", "-8:00" },
+ { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "GMT-08:00", "-8:00" },
+ { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
+ { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
+ { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-07:00", "-7:00" },
+ { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "GMT-07:00", "-7:00" },
+ { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "US (Los Angeles)", "America/Los_Angeles" },
+ { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "US (Los Angeles)", "America/Los_Angeles" },
+
+ { "as", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "AR (Buenos Aires)", "America/Buenos_Aires" },
+ { "as", "America/Argentina/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "AR (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "v", "AR (Buenos Aires)", "America/Buenos_Aires" },
+ { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z", "vvvv", "AR (Buenos Aires)", "America/Buenos_Aires" },
+
+ { "as", "America/Havana", "2004-01-15T00:00:00Z", "Z", "-0500", "-5:00" },
+ { "as", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-05:00", "-5:00" },
+ { "as", "America/Havana", "2004-01-15T00:00:00Z", "z", "GMT-05:00", "-5:00" },
+ { "as", "America/Havana", "2004-01-15T00:00:00Z", "zzzz", "GMT-05:00", "-5:00" },
+ { "as", "America/Havana", "2004-07-15T00:00:00Z", "Z", "-0400", "-4:00" },
+ { "as", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-04:00", "-4:00" },
+ { "as", "America/Havana", "2004-07-15T00:00:00Z", "z", "GMT-04:00", "-4:00" },
+ { "as", "America/Havana", "2004-07-15T00:00:00Z", "zzzz", "GMT-04:00", "-4:00" },
+ { "as", "America/Havana", "2004-07-15T00:00:00Z", "v", "CU", "America/Havana" },
+ { "as", "America/Havana", "2004-07-15T00:00:00Z", "vvvv", "CU", "America/Havana" },
+
+ { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
+ { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
+ { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "GMT+11:00", "+11:00" },
+ { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
+ { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
+ { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "GMT+10:00", "+10:00" },
+ { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "AU (Sydney)", "Australia/Sydney" },
+ { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "AU (Sydney)", "Australia/Sydney" },
+
+ { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
+ { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
+ { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
+ { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "GMT+11:00", "+11:00" },
+ { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
+ { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
+ { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
+ { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "GMT+10:00", "+10:00" },
+ { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "AU (Sydney)", "Australia/Sydney" },
+ { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "AU (Sydney)", "Australia/Sydney" },
+
+ { "as", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
+ { "as", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+00:00", "+0:00" },
+ { "as", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT+00:00", "+0:00" },
+ { "as", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "GMT+00:00", "+0:00" },
+ { "as", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
+ { "as", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+01:00", "+1:00" },
+ { "as", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+01:00", "+1:00" },
+ { "as", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "GMT+01:00", "+1:00" },
+ { "as", "Europe/London", "2004-07-15T00:00:00Z", "v", "GB", "Europe/London" },
+ { "as", "Europe/London", "2004-07-15T00:00:00Z", "vvvv", "GB", "Europe/London" },
+
+ { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v", "GMT-03:00", "-3:00" },
+ { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv", "GMT-03:00", "-3:00" },
+
+ // JB#5150
+ { "as", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "as", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+05:30", "+5:30" },
+ { "as", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z", "\\u09AD\\u09BE. \\u09B8.", "+5:30" },
+ { "as", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz", "\\u09AD\\u09BE\\u09F0\\u09A4\\u09C0\\u09AF\\u09BC \\u09B8\\u09AE\\u09AF\\u09BC", "+5:30" },
+ { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z", "+0530", "+5:30" },
+ { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+05:30", "+5:30" },
+ { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z", "\\u09AD\\u09BE. \\u09B8.", "+05:30" },
+ { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz", "\\u09AD\\u09BE\\u09F0\\u09A4\\u09C0\\u09AF\\u09BC \\u09B8\\u09AE\\u09AF\\u09BC", "+5:30" },
+ { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "\\u09AD\\u09BE. \\u09B8.", "Asia/Calcutta" },
+ { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "\\u09AD\\u09BE\\u09F0\\u09A4\\u09C0\\u09AF\\u09BC \\u09B8\\u09AE\\u09AF\\u09BC", "Asia/Calcutta" },
+ { "", "", "", "", "", "" },
+ };
+
+ if (isICUVersionAtLeast(ICU_39))
+ {
+ UErrorCode status;
+ Calendar *cal = GregorianCalendar::createInstance(status);
+ for (int i = 0; fallbackTests[i][0][0]; i++) {
+ UnicodeString info[5];
+ for ( int j = 0 ; j < 5 ; j++ ) {
+ UnicodeString value(fallbackTests[i][j],"");
+ value = value.unescape();
+ info[j].setTo(value);
+ }
+ logln(info[0] + ";" + info[1] + ";" + info[2] + ";" + info[3]);
+
+ TimeZone *tz = TimeZone::createTimeZone(info[1]);
+
+ if ( info[2] == UNICODE_STRING_SIMPLE("2004-07-15T00:00:00Z")) {
+ cal->set(2004,6,15,0,0,0);
+ } else {
+ cal->set(2004,0,15,0,0,0);
+ }
+
+ SimpleDateFormat *fmt = new SimpleDateFormat(info[3], Locale(fallbackTests[i][0]),status);
+ cal->setTimeZone(*tz);
+ UnicodeString result;
+ FieldPosition pos(0);
+ fmt->format(*cal,result,pos);
+ if (result != info[4]) {
+ errln(info[0] + ";" + info[1] + ";" + info[2] + ";" + info[3] + " expected: '" +
+ info[4] + "' but got: '" + result + "'");
+ }
+ }
+ } else {
+ logln("Warning: Skipping TestTimeZoneDisplayName. TODO: Fix in ICU 4.0");
+ }
+}
+
+/*
+void DateFormatTest::TestRelativeError(void)
+{
+ UErrorCode status;
+ Locale en("en");
+
+ DateFormat *en_reltime_reldate = DateFormat::createDateTimeInstance(DateFormat::kFullRelative,DateFormat::kFullRelative,en);
+ if(en_reltime_reldate == NULL) {
+ logln("PASS: rel date/rel time failed");
+ } else {
+ errln("FAIL: rel date/rel time created, should have failed.");
+ delete en_reltime_reldate;
+ }
+}
+
+void DateFormatTest::TestRelativeOther(void)
+{
+ logln("Nothing in this test. When we get more data from CLDR, put in some tests of -2, +2, etc. ");
+}
+*/
+
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.h b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.h
new file mode 100644
index 00000000000..091c459786e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtfmttst.h
@@ -0,0 +1,217 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _DATEFORMATTEST_
+#define _DATEFORMATTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
+#include "caltztst.h"
+
+/**
+ * Performs many different tests for DataeFormat and SimpleDateFormat
+ **/
+class DateFormatTest: public CalendarTimeZoneTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+ /**
+ * "Test written by Wally Wedel and emailed to me."
+ * Test handling of timezone offsets
+ **/
+ virtual void TestWallyWedel(void);
+ /**
+ * Test operator==
+ */
+ virtual void TestEquals(void);
+ /**
+ * Test the parsing of 2-digit years.
+ */
+ virtual void TestTwoDigitYearDSTParse(void);
+
+public: // package
+ // internal utility routine (genrates escape sequences for characters)
+ static UnicodeString& escape(UnicodeString& s);
+
+public:
+ /**
+ * Verify that returned field position indices are correct.
+ */
+ void TestFieldPosition(void);
+
+ void TestGeneral();
+
+public: // package
+ // internal utility function
+ static void getFieldText(DateFormat* df, int32_t field, UDate date, UnicodeString& str);
+
+public:
+ /**
+ * Verify that strings which contain incomplete specifications are parsed
+ * correctly. In some instances, this means not being parsed at all, and
+ * returning an appropriate error.
+ */
+ virtual void TestPartialParse994(void);
+
+public: // package
+ // internal test subroutine, used by TestPartialParse994
+ virtual void tryPat994(SimpleDateFormat* format, const char* pat, const char* str, UDate expected);
+
+public:
+ /**
+ * Verify the behavior of patterns in which digits for different fields run together
+ * without intervening separators.
+ */
+ virtual void TestRunTogetherPattern985(void);
+ /**
+ * Verify the behavior of patterns in which digits for different fields run together
+ * without intervening separators.
+ */
+ virtual void TestRunTogetherPattern917(void);
+
+public: // package
+ // internal test subroutine, used by TestRunTogetherPattern917
+ virtual void testIt917(SimpleDateFormat* fmt, UnicodeString& str, UDate expected);
+
+public:
+ /**
+ * Verify the handling of Czech June and July, which have the unique attribute that
+ * one is a proper prefix substring of the other.
+ */
+ virtual void TestCzechMonths459(void);
+ /**
+ * Test the handling of 'D' in patterns.
+ */
+ virtual void TestLetterDPattern212(void);
+ /**
+ * Test the day of year pattern.
+ */
+ virtual void TestDayOfYearPattern195(void);
+
+public: // package
+ // interl test subroutine, used by TestDayOfYearPattern195
+ virtual void tryPattern(SimpleDateFormat& sdf, UDate d, const char* pattern, UDate expected);
+
+public:
+ /**
+ * Test the handling of single quotes in patterns.
+ */
+ virtual void TestQuotePattern161(void);
+ /**
+ * Verify the correct behavior when handling invalid input strings.
+ */
+ virtual void TestBadInput135(void);
+
+public:
+ /**
+ * Verify the correct behavior when parsing an array of inputs against an
+ * array of patterns, with known results. The results are encoded after
+ * the input strings in each row.
+ */
+ virtual void TestBadInput135a(void);
+ /**
+ * Test the parsing of two-digit years.
+ */
+ virtual void TestTwoDigitYear(void);
+
+public: // package
+ // internal test subroutine, used by TestTwoDigitYear
+ virtual void parse2DigitYear(DateFormat& fmt, const char* str, UDate expected);
+
+public:
+ /**
+ * Test the formatting of time zones.
+ */
+ virtual void TestDateFormatZone061(void);
+ /**
+ * Further test the formatting of time zones.
+ */
+ virtual void TestDateFormatZone146(void);
+
+ void TestTimeZoneStringsAPI(void);
+
+public: // package
+ /**
+ * Test the formatting of dates in different locales.
+ */
+ virtual void TestLocaleDateFormat(void);
+
+ virtual void TestDateFormatCalendar(void);
+
+ virtual void TestSpaceParsing(void);
+
+ void TestExactCountFormat(void);
+
+ void TestWhiteSpaceParsing(void);
+
+ void TestInvalidPattern(void);
+
+ void TestGreekMay(void);
+
+ void TestGenericTime(void);
+
+ void TestGenericTimeZoneOrder(void);
+
+public:
+ /**
+ * Test host-specific formatting.
+ */
+ void TestHost(void);
+
+public:
+ /**
+ * Test patterns added in CLDR 1.4
+ */
+ void TestEras(void);
+
+ void TestNarrowNames(void);
+
+ void TestStandAloneDays(void);
+
+ void TestStandAloneMonths(void);
+
+ void TestQuarters(void);
+
+ void TestZTimeZoneParsing(void);
+
+ void TestRelativeClone(void);
+
+ void TestHostClone(void);
+
+public:
+ /***
+ * Test Relative Dates
+ */
+ void TestRelative(void);
+ void TestTimeZoneDisplayName(void);
+/* void TestRelativeError(void);
+ void TestRelativeOther(void);
+*/
+
+ private:
+ void TestRelative(int daysdelta,
+ const Locale& loc,
+ const char *expectChars);
+
+ private:
+ void expectParse(const char** data, int32_t data_length,
+ const Locale& locale);
+
+ void expect(const char** data, int32_t data_length,
+ const Locale& loc);
+
+ void expectFormat(const char **data, int32_t data_length,
+ const Locale &locale);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _DATEFORMATTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.cpp
new file mode 100644
index 00000000000..11dc9e601b7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.cpp
@@ -0,0 +1,442 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "dtptngts.h"
+
+#include "unicode/calendar.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/dtfmtsym.h"
+#include "unicode/dtptngen.h"
+#include "loctest.h"
+
+
+// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
+// try to test the full functionality. It just calls each function in the class and
+// verifies that it works on a basic level.
+
+void IntlTestDateTimePatternGeneratorAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite DateTimePatternGeneratorAPI");
+ switch (index) {
+ TESTCASE(0, testAPI);
+ default: name = ""; break;
+ }
+}
+
+#define MAX_LOCALE 4
+
+/**
+ * Test various generic API methods of DateTimePatternGenerator for API coverage.
+ */
+void IntlTestDateTimePatternGeneratorAPI::testAPI(/*char *par*/)
+{
+ UnicodeString patternData[] = {
+ UnicodeString("yM"),
+ UnicodeString("yMMM"),
+ UnicodeString("yMd"),
+ UnicodeString("yMMMd"),
+ UnicodeString("Md"),
+ UnicodeString("MMMd"),
+ UnicodeString("yQQQ"),
+ UnicodeString("hhmm"),
+ UnicodeString("HHmm"),
+ UnicodeString("mmss"),
+ UnicodeString(),
+ };
+
+ const char* testLocale[MAX_LOCALE][3] = {
+ {"en", "US", ""},
+ {"zh", "Hans", "CN"},
+ {"de", "DE", ""},
+ {"fi", "", ""},
+ };
+
+ UnicodeString patternResults[] = {
+ UnicodeString("1/1999"), // en_US
+ UnicodeString("Jan 1999"),
+ UnicodeString("1/13/1999"),
+ UnicodeString("Jan/13/1999"),
+ UnicodeString("1/13"),
+ UnicodeString("Jan 13"),
+ UnicodeString("Q1 1999"),
+ UnicodeString("11:58 PM"),
+ UnicodeString("23:58"),
+ UnicodeString("58:59"),
+ UnicodeString("1999-1"), // zh_Hans_CN
+ UnicodeString("1999 1"),
+ CharsToUnicodeString("1999\\u5E741\\u670813\\u65E5"),
+ CharsToUnicodeString("1999\\u5E741\\u670813\\u65E5"),
+ UnicodeString("1-13"),
+ UnicodeString("1 13"),
+ CharsToUnicodeString("1999 Q1"),
+ CharsToUnicodeString("\\u4E0B\\u534811:58"),
+ CharsToUnicodeString("23:58"),
+ UnicodeString("58:59"),
+ UnicodeString("1.1999"), // de_DE
+ UnicodeString("Jan 1999"),
+ UnicodeString("13.1.1999"),
+ UnicodeString("13. Jan 1999"),
+ UnicodeString("13.1."),
+ UnicodeString("13. Jan"),
+ UnicodeString("Q1 1999"),
+ UnicodeString("23:58"),
+ UnicodeString("23:58"),
+ UnicodeString("58:59"),
+ UnicodeString("1/1999"), // fi
+ UnicodeString("tammi 1999"),
+ UnicodeString("13.1.1999"),
+ UnicodeString("13. tammita 1999"),
+ UnicodeString("13.1."),
+ UnicodeString("13. tammita"),
+ UnicodeString("1. nelj./1999"),
+ UnicodeString("23.58"),
+ UnicodeString("23.58"),
+ UnicodeString("58.59"),
+ UnicodeString(),
+ };
+
+ // results for getSkeletons() and getPatternForSkeleton()
+ const UnicodeString testSkeletonsResults[] = {
+ UnicodeString("HH:mm"),
+ UnicodeString("MMMMd"),
+ UnicodeString("MMMMMd"),
+ };
+
+ const UnicodeString testBaseSkeletonsResults[] = {
+ UnicodeString("Hm"),
+ UnicodeString("MMMd"),
+ UnicodeString("MMMd"),
+ };
+
+ UnicodeString newDecimal(" "); // space
+ UnicodeString newAppendItemName("hrs.");
+ UnicodeString newAppendItemFormat("{1} {0}");
+ UnicodeString newDateTimeFormat("{1} {0}");
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString conflictingPattern;
+ UDateTimePatternConflict conflictingStatus;
+
+ // ======= Test CreateInstance with default locale
+ logln("Testing DateTimePatternGenerator createInstance from default locale");
+
+ DateTimePatternGenerator *instFromDefaultLocale=DateTimePatternGenerator::createInstance(status);
+ if (U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create DateTimePatternGenerator (default) - exitting");
+ return;
+ }
+ else {
+ delete instFromDefaultLocale;
+ }
+
+ // ======= Test CreateInstance with given locale
+ logln("Testing DateTimePatternGenerator createInstance from French locale");
+ status = U_ZERO_ERROR;
+ DateTimePatternGenerator *instFromLocale=DateTimePatternGenerator::createInstance(Locale::getFrench(), status);
+ if (U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create DateTimePatternGenerator (Locale::getFrench()) - exitting");
+ return;
+ }
+
+ // ======= Test clone DateTimePatternGenerator
+ logln("Testing DateTimePatternGenerator::clone()");
+ status = U_ZERO_ERROR;
+
+
+ UnicodeString decimalSymbol = instFromLocale->getDecimal();
+ UnicodeString newDecimalSymbol = UnicodeString("*");
+ decimalSymbol = instFromLocale->getDecimal();
+ instFromLocale->setDecimal(newDecimalSymbol);
+ DateTimePatternGenerator *cloneDTPatternGen=instFromLocale->clone();
+ decimalSymbol = cloneDTPatternGen->getDecimal();
+ if (decimalSymbol != newDecimalSymbol) {
+ errln("ERROR: inconsistency is found in cloned object.");
+ }
+ if ( !(*cloneDTPatternGen == *instFromLocale) ) {
+ errln("ERROR: inconsistency is found in cloned object.");
+ }
+
+ if ( *cloneDTPatternGen != *instFromLocale ) {
+ errln("ERROR: inconsistency is found in cloned object.");
+ }
+
+ delete instFromLocale;
+ delete cloneDTPatternGen;
+
+ // ======= Test simple use cases
+ logln("Testing simple use cases");
+ status = U_ZERO_ERROR;
+ Locale deLocale=Locale::getGermany();
+ UDate sampleDate=LocaleTest::date(99, 9, 13, 23, 58, 59);
+ DateTimePatternGenerator *gen = DateTimePatternGenerator::createInstance(deLocale, status);
+ if (U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create DateTimePatternGenerator (Locale::getGermany()) - exitting");
+ return;
+ }
+ UnicodeString findPattern = gen->getBestPattern(UnicodeString("MMMddHmm"), status);
+ SimpleDateFormat *format = new SimpleDateFormat(findPattern, deLocale, status);
+ if (U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create SimpleDateFormat (Locale::getGermany())");
+ delete gen;
+ return;
+ }
+ TimeZone *zone = TimeZone::createTimeZone(UnicodeString("ECT"));
+ if (zone==NULL) {
+ dataerrln("ERROR: Could not create TimeZone ECT");
+ delete gen;
+ delete format;
+ return;
+ }
+ format->setTimeZone(*zone);
+ UnicodeString dateReturned, expectedResult;
+ dateReturned.remove();
+ dateReturned = format->format(sampleDate, dateReturned, status);
+ expectedResult=UnicodeString("8:58 14. Okt");
+ if ( dateReturned != expectedResult ) {
+ errln("ERROR: Simple test in getBestPattern with Locale::getGermany()).");
+ }
+ // add new pattern
+ status = U_ZERO_ERROR;
+ conflictingStatus = gen->addPattern(UnicodeString("d'. von' MMMM"), true, conflictingPattern, status);
+ if (U_FAILURE(status)) {
+ errln("ERROR: Could not addPattern - d\'. von\' MMMM");
+ }
+ status = U_ZERO_ERROR;
+ UnicodeString testPattern=gen->getBestPattern(UnicodeString("MMMMdd"), status);
+ testPattern=gen->getBestPattern(UnicodeString("MMMddHmm"), status);
+ format->applyPattern(gen->getBestPattern(UnicodeString("MMMMddHmm"), status));
+ dateReturned.remove();
+ dateReturned = format->format(sampleDate, dateReturned, status);
+ expectedResult=UnicodeString("8:58 14. von Oktober");
+ if ( dateReturned != expectedResult ) {
+ errln("ERROR: Simple test addPattern failed!: d\'. von\' MMMM ");
+ }
+ delete format;
+
+ // get a pattern and modify it
+ format = (SimpleDateFormat *)DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull,
+ deLocale);
+ format->setTimeZone(*zone);
+ UnicodeString pattern;
+ pattern = format->toPattern(pattern);
+ dateReturned.remove();
+ dateReturned = format->format(sampleDate, dateReturned, status);
+ expectedResult=UnicodeString("Donnerstag, 14. Oktober 1999 08:58:59 Frankreich");
+ if ( dateReturned != expectedResult ) {
+ errln("ERROR: Simple test uses full date format.");
+ errln(UnicodeString(" Got: ") + dateReturned + UnicodeString(" Expected: ") + expectedResult);
+ }
+
+ // modify it to change the zone.
+ UnicodeString newPattern = gen->replaceFieldTypes(pattern, UnicodeString("vvvv"), status);
+ format->applyPattern(newPattern);
+ dateReturned.remove();
+ dateReturned = format->format(sampleDate, dateReturned, status);
+ expectedResult=UnicodeString("Donnerstag, 14. Oktober 1999 08:58:59 Frankreich");
+ if ( dateReturned != expectedResult ) {
+ errln("ERROR: Simple test modify the timezone!");
+ errln(UnicodeString(" Got: ")+ dateReturned + UnicodeString(" Expected: ") + expectedResult);
+ }
+
+ // setDeciaml(), getDeciaml()
+ gen->setDecimal(newDecimal);
+ if (newDecimal != gen->getDecimal()) {
+ errln("ERROR: unexpected result from setDecimal() and getDecimal()!.\n");
+ }
+
+ // setAppenItemName() , getAppendItemName()
+ gen->setAppendItemName(UDATPG_HOUR_FIELD, newAppendItemName);
+ if (newAppendItemName != gen->getAppendItemName(UDATPG_HOUR_FIELD)) {
+ errln("ERROR: unexpected result from setAppendItemName() and getAppendItemName()!.\n");
+ }
+
+ // setAppenItemFormat() , getAppendItemFormat()
+ gen->setAppendItemFormat(UDATPG_HOUR_FIELD, newAppendItemFormat);
+ if (newAppendItemFormat != gen->getAppendItemFormat(UDATPG_HOUR_FIELD)) {
+ errln("ERROR: unexpected result from setAppendItemFormat() and getAppendItemFormat()!.\n");
+ }
+
+ // setDateTimeFormat() , getDateTimeFormat()
+ gen->setDateTimeFormat(newDateTimeFormat);
+ if (newDateTimeFormat != gen->getDateTimeFormat()) {
+ errln("ERROR: unexpected result from setDateTimeFormat() and getDateTimeFormat()!.\n");
+ }
+
+ // ======== Test getSkeleton and getBaseSkeleton
+ status = U_ZERO_ERROR;
+ pattern = UnicodeString("dd-MMM");
+ UnicodeString expectedSkeleton = UnicodeString("MMMdd");
+ UnicodeString expectedBaseSkeleton = UnicodeString("MMMd");
+ UnicodeString retSkeleton = gen->getSkeleton(pattern, status);
+ if(U_FAILURE(status) || retSkeleton != expectedSkeleton ) {
+ errln("ERROR: Unexpected result from getSkeleton().\n");
+ errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected: ") + expectedSkeleton );
+ }
+ retSkeleton = gen->getBaseSkeleton(pattern, status);
+ if(U_FAILURE(status) || retSkeleton != expectedBaseSkeleton) {
+ errln("ERROR: Unexpected result from getBaseSkeleton().\n");
+ errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected:")+ expectedBaseSkeleton);
+ }
+
+ pattern = UnicodeString("dd/MMMM/yy");
+ expectedSkeleton = UnicodeString("yyMMMMdd");
+ expectedBaseSkeleton = UnicodeString("yMMMd");
+ retSkeleton = gen->getSkeleton(pattern, status);
+ if(U_FAILURE(status) || retSkeleton != expectedSkeleton ) {
+ errln("ERROR: Unexpected result from getSkeleton().\n");
+ errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected: ") + expectedSkeleton );
+ }
+ retSkeleton = gen->getBaseSkeleton(pattern, status);
+ if(U_FAILURE(status) || retSkeleton != expectedBaseSkeleton) {
+ errln("ERROR: Unexpected result from getBaseSkeleton().\n");
+ errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected:")+ expectedBaseSkeleton);
+ }
+ delete format;
+ delete zone;
+ delete gen;
+
+ // ======= Test various skeletons.
+ logln("Testing DateTimePatternGenerator with various skeleton");
+
+ status = U_ZERO_ERROR;
+ int32_t localeIndex=0;
+ int32_t resultIndex=0;
+ UnicodeString resultDate;
+ UDate testDate= LocaleTest::date(99, 0, 13, 23, 58, 59);
+ while (localeIndex < MAX_LOCALE )
+ {
+ int32_t dataIndex=0;
+ UnicodeString bestPattern;
+
+ Locale loc(testLocale[localeIndex][0], testLocale[localeIndex][1], testLocale[localeIndex][2], "");
+ logln("\n\n Locale: %s_%s_%s", testLocale[localeIndex][0], testLocale[localeIndex][1], testLocale[localeIndex][2]);
+ DateTimePatternGenerator *patGen=DateTimePatternGenerator::createInstance(loc, status);
+ if(U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create DateTimePatternGenerator with locale index:%d . - exitting\n", localeIndex);
+ return;
+ }
+ while (patternData[dataIndex].length() > 0) {
+ log(patternData[dataIndex]);
+ bestPattern = patGen->getBestPattern(patternData[dataIndex++], status);
+ logln(UnicodeString(" -> ") + bestPattern);
+
+ SimpleDateFormat sdf(bestPattern, loc, status);
+ resultDate.remove();
+ resultDate = sdf.format(testDate, resultDate);
+ if ( resultDate != patternResults[resultIndex] ) {
+ errln(UnicodeString("\nERROR: Test various skeletons[") + (dataIndex-1)
+ + UnicodeString("]. Got: ") + resultDate + UnicodeString(" Expected: ") + patternResults[resultIndex] );
+ }
+
+ resultIndex++;
+ }
+ delete patGen;
+ localeIndex++;
+ }
+
+
+
+ // ======= Test random skeleton
+ DateTimePatternGenerator *randDTGen= DateTimePatternGenerator::createInstance(status);
+ if (U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create DateTimePatternGenerator (Locale::getFrench()) - exitting");
+ return;
+ }
+ UChar newChar;
+ int32_t i;
+ for (i=0; i<10; ++i) {
+ UnicodeString randomSkeleton;
+ int32_t len = rand() % 20;
+ for (int32_t j=0; j<len; ++j ) {
+ while ((newChar = (UChar)(rand()%0x7f))>=(UChar)0x20) {
+ randomSkeleton += newChar;
+ }
+ }
+ UnicodeString bestPattern = randDTGen->getBestPattern(randomSkeleton, status);
+ }
+ delete randDTGen;
+
+ // UnicodeString randomString=Unicode
+ // ======= Test getStaticClassID()
+
+ logln("Testing getStaticClassID()");
+ status = U_ZERO_ERROR;
+ DateTimePatternGenerator *test= DateTimePatternGenerator::createInstance(status);
+
+ if(test->getDynamicClassID() != DateTimePatternGenerator::getStaticClassID()) {
+ errln("ERROR: getDynamicClassID() didn't return the expected value");
+ }
+ delete test;
+
+ // ====== Test createEmptyInstance()
+
+ logln("Testing createEmptyInstance()");
+ status = U_ZERO_ERROR;
+
+ test = DateTimePatternGenerator::createEmptyInstance(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Fail to create an empty instance ! - exitting.\n");
+ delete test;
+ return;
+ }
+
+ conflictingStatus = test->addPattern(UnicodeString("MMMMd"), true, conflictingPattern, status);
+ status = U_ZERO_ERROR;
+ testPattern=test->getBestPattern(UnicodeString("MMMMdd"), status);
+ conflictingStatus = test->addPattern(UnicodeString("HH:mm"), true, conflictingPattern, status);
+ conflictingStatus = test->addPattern(UnicodeString("MMMMMd"), true, conflictingPattern, status); //duplicate pattern
+ StringEnumeration *output=NULL;
+ output = test->getRedundants(status);
+ expectedResult=UnicodeString("MMMMd");
+ if (output != NULL) {
+ output->reset(status);
+ const UnicodeString *dupPattern=output->snext(status);
+ if ( (dupPattern==NULL) || (*dupPattern != expectedResult) ) {
+ errln("ERROR: Fail in getRedundants !\n");
+ }
+ }
+
+ // ======== Test getSkeletons and getBaseSkeletons
+ StringEnumeration* ptrSkeletonEnum = test->getSkeletons(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Fail to get skeletons !\n");
+ }
+ UnicodeString returnPattern, *ptrSkeleton;
+ ptrSkeletonEnum->reset(status);
+ int32_t count=ptrSkeletonEnum->count(status);
+ for (i=0; i<count; ++i) {
+ ptrSkeleton = (UnicodeString *)ptrSkeletonEnum->snext(status);
+ returnPattern = test->getPatternForSkeleton(*ptrSkeleton);
+ if ( returnPattern != testSkeletonsResults[i] ) {
+ errln(UnicodeString("ERROR: Unexpected result from getSkeletons and getPatternForSkeleton\nGot: ") + returnPattern
+ + UnicodeString("\nExpected: ") + testSkeletonsResults[i]
+ + UnicodeString("\n"));
+ }
+ }
+ StringEnumeration* ptrBaseSkeletonEnum = test->getBaseSkeletons(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Fail to get base skeletons !\n");
+ }
+ count=ptrBaseSkeletonEnum->count(status);
+ for (i=0; i<count; ++i) {
+ ptrSkeleton = (UnicodeString *)ptrBaseSkeletonEnum->snext(status);
+ if ( *ptrSkeleton != testBaseSkeletonsResults[i] ) {
+ errln("ERROR: Unexpected result from getBaseSkeletons() !\n");
+ }
+ }
+
+ delete output;
+ delete ptrSkeletonEnum;
+ delete ptrBaseSkeletonEnum;
+ delete test;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.h b/Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.h
new file mode 100644
index 00000000000..6834c7d5b4a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/dtptngts.h
@@ -0,0 +1,31 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTDATETIMEPATTERNGENERATORAPI
+#define _INTLTESTDATETIMEPATTERNGENERATORAPI
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+/**
+ * Test basic functionality of various API functions
+ **/
+class IntlTestDateTimePatternGeneratorAPI : public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+ /**
+ * Performs tests on many API functions, see detailed comments in source code
+ **/
+ void testAPI(/* char* par */);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/encoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/encoll.cpp
new file mode 100644
index 00000000000..abaeb561573
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/encoll.cpp
@@ -0,0 +1,334 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "encoll.h"
+
+CollationEnglishTest::CollationEnglishTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance(Locale::getEnglish(), status);
+}
+
+CollationEnglishTest::~CollationEnglishTest()
+{
+ delete myCollation;
+}
+
+static const UChar testSourceCases[][CollationEnglishTest::MAX_TOKEN_LEN] = {
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0020 /* ' ' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0048 /* 'H' */, (UChar)0x0065 /* 'e' */, (UChar)0x006C /* 'l' */, (UChar)0x006C /* 'l' */, (UChar)0x006F /* 'o' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00EA, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0},
+ {0x00C4, (UChar)0x0042 /* 'B' */, 0x0308, (UChar)0x0043 /* 'C' */, 0x0308, 0},
+ {(UChar)0x0061 /* 'a' */, 0x0308, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, 0},
+ {(UChar)0x0072 /* 'r' */, (UChar)0x006F /* 'o' */, (UChar)0x006C /* 'l' */, (UChar)0x0065 /* 'e' */, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0074 /* 't' */, (UChar)0x0063 /* 'c' */, (UChar)0x006F /* 'o' */, (UChar)0x006D /* 'm' */, (UChar)0x0070 /* 'p' */, (UChar)0x0061 /* 'a' */, (UChar)0x0072 /* 'r' */, (UChar)0x0065 /* 'e' */, (UChar)0x0070 /* 'p' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0069 /* 'i' */, (UChar)0x006E /* 'n' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00E6, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x0048 /* 'H' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x0308, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0074 /* 't' */, (UChar)0x0068 /* 'h' */, (UChar)0x0069 /* 'i' */, 0x0302, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00EA, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00E6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00E6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0} // 49
+};
+
+static const UChar testTargetCases[][CollationEnglishTest::MAX_TOKEN_LEN] = {
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x002D /* '-' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, 0},
+ {(UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, (UChar)0x006C /* 'l' */, (UChar)0x006C /* 'l' */, (UChar)0x006F /* 'o' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0041 /* 'A' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0062 /* 'b' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0062 /* 'b' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, 0},
+ {0x00C4, (UChar)0x0042 /* 'B' */, 0x0308, (UChar)0x0043 /* 'C' */, 0x0308, 0},
+ {(UChar)0x0041 /* 'A' */, 0x0308, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0072 /* 'r' */, (UChar)0x006F /* 'o' */, 0x0302, (UChar)0x006C /* 'l' */, (UChar)0x0065 /* 'e' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0x00E1, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0041 /* 'A' */, 0x00E1, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0054 /* 'T' */, (UChar)0x0043 /* 'C' */, (UChar)0x006F /* 'o' */, (UChar)0x006D /* 'm' */, (UChar)0x0070 /* 'p' */, (UChar)0x0061 /* 'a' */, (UChar)0x0072 /* 'r' */, (UChar)0x0065 /* 'e' */, (UChar)0x0050 /* 'P' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0069 /* 'i' */, (UChar)0x006E /* 'n' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0042 /* 'B' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0026 /* '&' */, (UChar)0x0062 /* 'b' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0023 /* '#' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00C4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00C4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {0x00C4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, (UChar)0x0064 /* 'd' */, (UChar)0x0061 /* 'a' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0023 /* '#' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x003D /* '=' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0043 /* 'C' */, (UChar)0x0048 /* 'H' */, (UChar)0x0063 /* 'c' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0074 /* 't' */, (UChar)0x0068 /* 'h' */, 0x00EE, (UChar)0x0073 /* 's' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00E9, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, 0x00E9, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0043 /* 'C' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00C6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, 0x00C6, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0042 /* 'B' */, (UChar)0x0064 /* 'd' */, 0},
+ {0x00E4, (UChar)0x0062 /* 'b' */, (UChar)0x0063 /* 'c' */, 0},
+ {(UChar)0x0070 /* 'p' */, 0x00EA, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, 0} // 49
+};
+
+static const Collator::EComparisonResult results[] = {
+ Collator::LESS,
+ Collator::LESS, /*Collator::GREATER,*/
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::GREATER,
+ Collator::EQUAL,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS, /*Collator::GREATER,*/ /* 10 */
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::EQUAL,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::GREATER,
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS, /* 20 */
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::GREATER,
+ Collator::GREATER,
+ /* Test Tertiary > 26 */
+ Collator::LESS,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::LESS, /* 30 */
+ Collator::GREATER,
+ Collator::EQUAL,
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ /* test identical > 36 */
+ Collator::EQUAL,
+ Collator::EQUAL,
+ /* test primary > 38 */
+ Collator::EQUAL,
+ Collator::EQUAL, /* 40 */
+ Collator::LESS,
+ Collator::EQUAL,
+ Collator::EQUAL,
+ /* test secondary > 43 */
+ Collator::LESS,
+ Collator::LESS,
+ Collator::EQUAL,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS // 49
+};
+
+static const UChar testBugs[][CollationEnglishTest::MAX_TOKEN_LEN] = {
+ {0x61, 0},
+ {0x41, 0},
+ {0x65, 0},
+ {0x45, 0},
+ {0x00e9, 0},
+ {0x00e8, 0},
+ {0x00ea, 0},
+ {0x00eb, 0},
+ {0x65, 0x61, 0},
+ {0x78, 0}
+};
+
+// 0x0300 is grave, 0x0301 is acute
+// the order of elements in this array must be different than the order in CollationFrenchTest
+static const UChar testAcute[][CollationEnglishTest::MAX_TOKEN_LEN] = {
+ {0x65, 0x65, 0},
+ {0x65, 0x65, 0x0301, 0},
+ {0x65, 0x65, 0x0301, 0x0300, 0},
+ {0x65, 0x65, 0x0300, 0},
+ {0x65, 0x65, 0x0300, 0x0301, 0},
+ {0x65, 0x0301, 0x65, 0},
+ {0x65, 0x0301, 0x65, 0x0301, 0},
+ {0x65, 0x0301, 0x65, 0x0301, 0x0300, 0},
+ {0x65, 0x0301, 0x65, 0x0300, 0},
+ {0x65, 0x0301, 0x65, 0x0300, 0x0301, 0},
+ {0x65, 0x0301, 0x0300, 0x65, 0},
+ {0x65, 0x0301, 0x0300, 0x65, 0x0301, 0},
+ {0x65, 0x0301, 0x0300, 0x65, 0x0301, 0x0300, 0},
+ {0x65, 0x0301, 0x0300, 0x65, 0x0300, 0},
+ {0x65, 0x0301, 0x0300, 0x65, 0x0300, 0x0301, 0},
+ {0x65, 0x0300, 0x65, 0},
+ {0x65, 0x0300, 0x65, 0x0301, 0},
+ {0x65, 0x0300, 0x65, 0x0301, 0x0300, 0},
+ {0x65, 0x0300, 0x65, 0x0300, 0},
+ {0x65, 0x0300, 0x65, 0x0300, 0x0301, 0},
+ {0x65, 0x0300, 0x0301, 0x65, 0},
+ {0x65, 0x0300, 0x0301, 0x65, 0x0301, 0},
+ {0x65, 0x0300, 0x0301, 0x65, 0x0301, 0x0300, 0},
+ {0x65, 0x0300, 0x0301, 0x65, 0x0300, 0},
+ {0x65, 0x0300, 0x0301, 0x65, 0x0300, 0x0301, 0}
+};
+
+static const UChar testMore[][CollationEnglishTest::MAX_TOKEN_LEN] = {
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0065 /* 'e' */, 0},
+ { 0x00E6, 0},
+ { 0x00C6, 0},
+ {(UChar)0x0061 /* 'a' */, (UChar)0x0066 /* 'f' */, 0},
+ {(UChar)0x006F /* 'o' */, (UChar)0x0065 /* 'e' */, 0},
+ { 0x0153, 0},
+ { 0x0152, 0},
+ {(UChar)0x006F /* 'o' */, (UChar)0x0066 /* 'f' */, 0},
+};
+
+void CollationEnglishTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ myCollation->setStrength(Collator::TERTIARY);
+ for (i = 0; i < 38 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+
+ int32_t j = 0;
+ for (i = 0; i < 10; i++)
+ {
+ for (j = i+1; j < 10; j++)
+ {
+ doTest(myCollation, testBugs[i], testBugs[j], Collator::LESS);
+ }
+ }
+
+ //test more interesting cases
+ Collator::EComparisonResult expected;
+ const int32_t testMoreSize = (int32_t)(sizeof(testMore) / sizeof(testMore[0]));
+ for (i = 0; i < testMoreSize; i++)
+ {
+ for (j = 0; j < testMoreSize; j++)
+ {
+ if (i < j)
+ expected = Collator::LESS;
+ else if (i == j)
+ expected = Collator::EQUAL;
+ else // (i > j)
+ expected = Collator::GREATER;
+ doTest(myCollation, testMore[i], testMore[j], expected );
+ }
+ }
+
+}
+
+void CollationEnglishTest::TestPrimary(/* char* par */)
+{
+ int32_t i;
+ myCollation->setStrength(Collator::PRIMARY);
+ for (i = 38; i < 43 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void CollationEnglishTest::TestSecondary(/* char* par */)
+{
+ int32_t i;
+ myCollation->setStrength(Collator::SECONDARY);
+ for (i = 43; i < 49 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+
+ //test acute and grave ordering (compare to french collation)
+ int32_t j;
+ Collator::EComparisonResult expected;
+ const int32_t testAcuteSize = (int32_t)(sizeof(testAcute) / sizeof(testAcute[0]));
+ for (i = 0; i < testAcuteSize; i++)
+ {
+ for (j = 0; j < testAcuteSize; j++)
+ {
+ if (i < j)
+ expected = Collator::LESS;
+ else if (i == j)
+ expected = Collator::EQUAL;
+ else // (i > j)
+ expected = Collator::GREATER;
+ doTest(myCollation, testAcute[i], testAcute[j], expected );
+ }
+ }
+}
+
+void CollationEnglishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationEnglishTest: ");
+ if(myCollation) {
+ switch (index) {
+ case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break;
+ case 1: name = "TestSecondary"; if (exec) TestSecondary(/* par */); break;
+ case 2: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ errln("Collator couldn't be instantiated!");
+ name = "";
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/encoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/encoll.h
new file mode 100644
index 00000000000..06beb89dd29
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/encoll.h
@@ -0,0 +1,48 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationEnglishTest is a third level test class. This tests the locale
+ * specific primary, secondary and tertiary rules. For example, the ignorable
+ * character '-' in string "black-bird". The en_US locale uses the default
+ * collation rules as its sorting sequence.
+ */
+
+#ifndef _ENCOLL
+#define _ENCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationEnglishTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationEnglishTest();
+ virtual ~CollationEnglishTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // performs test with strength PRIMARY
+ void TestPrimary(/* char* par */);
+
+ // perform test with strength SECONDARY
+ void TestSecondary(/* char* par */);
+
+ // perform test with strength TERTIARY
+ void TestTertiary(/* char* par */);
+
+private:
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/escoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/escoll.cpp
new file mode 100644
index 00000000000..152453bdaf0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/escoll.cpp
@@ -0,0 +1,116 @@
+
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#ifndef _COLL
+#include "unicode/coll.h"
+#endif
+
+#ifndef _TBLCOLL
+#include "unicode/tblcoll.h"
+#endif
+
+#ifndef _UNISTR
+#include "unicode/unistr.h"
+#endif
+
+#ifndef _SORTKEY
+#include "unicode/sortkey.h"
+#endif
+
+#ifndef _ESCOLL
+#include "escoll.h"
+#endif
+
+#include "sfwdchit.h"
+
+CollationSpanishTest::CollationSpanishTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance(Locale("es", "ES", ""),status);
+}
+
+CollationSpanishTest::~CollationSpanishTest()
+{
+ delete myCollation;
+}
+
+const UChar CollationSpanishTest::testSourceCases[][CollationSpanishTest::MAX_TOKEN_LEN] = {
+ {0x61, 0x6c, 0x69, 0x61, 0x73, 0},
+ {0x45, 0x6c, 0x6c, 0x69, 0x6f, 0x74, 0},
+ {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0},
+ {0x61, 0x63, 0x48, 0x63, 0},
+ {0x61, 0x63, 0x63, 0},
+ {0x61, 0x6c, 0x69, 0x61, 0x73, 0},
+ {0x61, 0x63, 0x48, 0x63, 0},
+ {0x61, 0x63, 0x63, 0},
+ {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0},
+};
+
+const UChar CollationSpanishTest::testTargetCases[][CollationSpanishTest::MAX_TOKEN_LEN] = {
+ {0x61, 0x6c, 0x6c, 0x69, 0x61, 0x73, 0},
+ {0x45, 0x6d, 0x69, 0x6f, 0x74, 0},
+ {0x68, 0x65, 0x6c, 0x6c, 0x4f, 0},
+ {0x61, 0x43, 0x48, 0x63, 0},
+ {0x61, 0x43, 0x48, 0x63, 0},
+ {0x61, 0x6c, 0x6c, 0x69, 0x61, 0x73, 0},
+ {0x61, 0x43, 0x48, 0x63, 0},
+ {0x61, 0x43, 0x48, 0x63, 0},
+ {0x68, 0x65, 0x6c, 0x6c, 0x4f, 0},
+};
+
+const Collator::EComparisonResult CollationSpanishTest::results[] = {
+ Collator::LESS,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::LESS,
+ // test primary > 5
+ Collator::LESS,
+ Collator::EQUAL,
+ Collator::LESS,
+ Collator::EQUAL
+};
+
+void CollationSpanishTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ myCollation->setStrength(Collator::TERTIARY);
+ for (i = 0; i < 5 ; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+void CollationSpanishTest::TestPrimary(/* char* par */)
+{
+ int32_t i;
+ myCollation->setStrength(Collator::PRIMARY);
+ for (i = 5; i < 9; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void CollationSpanishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par */)
+{
+ if (exec) logln("TestSuite CollationSpanishTest: ");
+
+ if((!myCollation) && exec) {
+ errln(__FILE__ " cannot test - failed to create collator.");
+ name = "some test";
+ return;
+ }
+ switch (index) {
+ case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break;
+ case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/escoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/escoll.h
new file mode 100644
index 00000000000..917e30af156
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/escoll.h
@@ -0,0 +1,49 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationSpanishTest is a third level test class. This tests the locale
+ * specific primary and tertiary rules. This Spanish sort uses the traditional
+ * sorting sequence. The Spanish modern sorting sequence does not sort
+ * ch and ll as unique characters.
+ */
+
+#ifndef _ESCOLL
+#define _ESCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationSpanishTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationSpanishTest();
+ virtual ~CollationSpanishTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // performs tests with strength PRIMARY
+ void TestPrimary(/* char* par */);
+
+ // prforms test with strength TERTIARY
+ void TestTertiary(/* char* par */);
+
+private:
+ static const UChar testSourceCases[][MAX_TOKEN_LEN];
+ static const UChar testTargetCases[][MAX_TOKEN_LEN];
+ static const Collator::EComparisonResult results[];
+
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ficoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/ficoll.cpp
new file mode 100644
index 00000000000..b67f6348e57
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ficoll.cpp
@@ -0,0 +1,102 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#ifndef _COLL
+#include "unicode/coll.h"
+#endif
+
+#ifndef _TBLCOLL
+#include "unicode/tblcoll.h"
+#endif
+
+#ifndef _UNISTR
+#include "unicode/unistr.h"
+#endif
+
+#ifndef _SORTKEY
+#include "unicode/sortkey.h"
+#endif
+
+#ifndef _FICOLL
+#include "ficoll.h"
+#endif
+
+#include "sfwdchit.h"
+
+CollationFinnishTest::CollationFinnishTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance(Locale("fi", "FI", "", "collation=standard"),status);
+}
+
+CollationFinnishTest::~CollationFinnishTest()
+{
+ delete myCollation;
+}
+
+const UChar CollationFinnishTest::testSourceCases[][CollationFinnishTest::MAX_TOKEN_LEN] = {
+ {0x77, 0x61, 0x74, 0},
+ {0x76, 0x61, 0x74, 0},
+ {0x61, 0x00FC, 0x62, 0x65, 0x63, 0x6b, 0},
+ {0x4c, 0x00E5, 0x76, 0x69, 0},
+ {0x77, 0x61, 0x74, 0}
+};
+
+const UChar CollationFinnishTest::testTargetCases[][CollationFinnishTest::MAX_TOKEN_LEN] = {
+ {0x76, 0x61, 0x74, 0},
+ {0x77, 0x61, 0x79, 0},
+ {0x61, 0x78, 0x62, 0x65, 0x63, 0x6b, 0},
+ {0x4c, 0x00E4, 0x77, 0x65, 0},
+ {0x76, 0x61, 0x74, 0}
+};
+
+const Collator::EComparisonResult CollationFinnishTest::results[] = {
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::LESS,
+ // test primary > 4
+ Collator::EQUAL,
+};
+
+void CollationFinnishTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ myCollation->setStrength(Collator::TERTIARY);
+ for (i = 0; i < 4 ; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+void CollationFinnishTest::TestPrimary(/* char* par */)
+{
+ int32_t i;
+ myCollation->setStrength(Collator::PRIMARY);
+ for (i = 4; i < 5; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void CollationFinnishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationFinnishTest: ");
+
+ if((!myCollation) && exec) {
+ errln(__FILE__ " cannot test - failed to create collator.");
+ name = "some test";
+ return;
+ }
+ switch (index) {
+ case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break;
+ case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ficoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/ficoll.h
new file mode 100644
index 00000000000..8c185f4eef7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ficoll.h
@@ -0,0 +1,48 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationFinnishTest is a third level test class. This tests the locale
+ * specific primary and tertiary rules. For example, a-ring sorts after z
+ * and w and v are equivalent.
+ */
+
+#ifndef _FICOLL
+#define _FICOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationFinnishTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationFinnishTest();
+ virtual ~CollationFinnishTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // perform tests with strength PRIMARY
+ void TestPrimary(/* char* par */);
+
+ // perform test with strength TERTIARY
+ void TestTertiary(/* char* par */);
+
+private:
+ static const UChar testSourceCases[][MAX_TOKEN_LEN];
+ static const UChar testTargetCases[][MAX_TOKEN_LEN];
+ static const Collator::EComparisonResult results[];
+
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/fldset.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/fldset.cpp
new file mode 100644
index 00000000000..aa3aa284796
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/fldset.cpp
@@ -0,0 +1,351 @@
+/*
+************************************************************************
+* Copyright (c) 2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+************************************************************************
+*/
+
+#include "fldset.h"
+#include "intltest.h"
+
+#if !UCONFIG_NO_FORMATTING
+#include "unicode/regex.h"
+
+
+FieldsSet::FieldsSet() {
+ // NOTREACHED
+}
+
+FieldsSet::FieldsSet(int32_t fieldCount) {
+ construct((UDebugEnumType)-1, fieldCount);
+}
+
+FieldsSet::FieldsSet(UDebugEnumType field) {
+ construct(field, udbg_enumCount(field));
+}
+
+FieldsSet::~FieldsSet() {
+
+}
+
+int32_t FieldsSet::fieldCount() const {
+ return fFieldCount;
+}
+
+void FieldsSet::construct(UDebugEnumType field, int32_t fieldCount) {
+ fEnum = field;
+ if(fieldCount > U_FIELDS_SET_MAX) {
+ fieldCount = U_FIELDS_SET_MAX;
+ }
+ fFieldCount = fieldCount;
+ clear();
+}
+
+UnicodeString FieldsSet::diffFrom(const FieldsSet& other, UErrorCode& status) const {
+ UnicodeString str;
+ if(!isSameType(other)) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return UnicodeString("U_ILLEGAL_ARGUMENT_ERROR: FieldsSet of a different type!");
+ }
+ for (int i=0; i<fieldCount(); i++) {
+ if (isSet((UCalendarDateFields)i)) {
+ int32_t myVal = get(i);
+ int32_t theirVal = other.get(i);
+
+ if(fEnum != -1) {
+ const UnicodeString& fieldName = udbg_enumString(
+ fEnum, i);
+
+ str = str + fieldName + UnicodeString("=")+myVal+UnicodeString(" not ")+theirVal+UnicodeString(", ");
+ } else {
+ str = str + UnicodeString("some field") + "=" + myVal+" not " + theirVal+", ";
+ }
+ }
+ }
+ return str;
+}
+
+static UnicodeString *split(const UnicodeString &src, UChar ch, int32_t &splits)
+{
+ int32_t offset = -1;
+
+ splits = 1;
+ while((offset = src.indexOf(ch, offset + 1)) >= 0) {
+ splits += 1;
+ }
+
+ UnicodeString *result = new UnicodeString[splits];
+
+ int32_t start = 0;
+ int32_t split = 0;
+ int32_t end;
+
+ while((end = src.indexOf(ch, start)) >= 0) {
+ src.extractBetween(start, end, result[split++]);
+ start = end + 1;
+ }
+
+ src.extractBetween(start, src.length(), result[split]);
+
+ return result;
+}
+
+int32_t FieldsSet::parseFrom(const UnicodeString& str, const
+ FieldsSet* inheritFrom, UErrorCode& status) {
+
+ int goodFields = 0;
+
+ if(U_FAILURE(status)) {
+ return -1;
+ }
+
+ int32_t destCount = 0;
+ UnicodeString *dest = split(str, 0x002C /* ',' */, destCount);
+
+ for(int i = 0; i < destCount; i += 1) {
+ int32_t dc = 0;
+ UnicodeString *kv = split(dest[i], 0x003D /* '=' */, dc);
+
+ if(dc != 2) {
+ it_errln(UnicodeString("dc == ") + dc + UnicodeString("?"));
+ }
+
+ int32_t field = handleParseName(inheritFrom, kv[0], kv[1], status);
+
+ if(U_FAILURE(status)) {
+ char ch[256];
+ const UChar *u = kv[0].getBuffer();
+ int32_t len = kv[0].length();
+ u_UCharsToChars(u, ch, len);
+ ch[len] = 0; /* include terminating \0 */
+ it_errln(UnicodeString("Parse Failed: Field ") + UnicodeString(ch) + UnicodeString(", err ") + UnicodeString(u_errorName(status)));
+ return -1;
+ }
+
+ if(field != -1) {
+ handleParseValue(inheritFrom, field, kv[1], status);
+
+ if(U_FAILURE(status)) {
+ char ch[256];
+ const UChar *u = kv[1].getBuffer();
+ int32_t len = kv[1].length();
+ u_UCharsToChars(u, ch, len);
+ ch[len] = 0; /* include terminating \0 */
+ it_errln(UnicodeString("Parse Failed: Value ") + UnicodeString(ch) + UnicodeString(", err ") + UnicodeString(u_errorName(status)));
+ return -1;
+ }
+
+ goodFields += 1;
+ }
+
+ delete[] kv;
+ }
+
+ delete[] dest;
+
+ return goodFields;
+}
+
+UBool FieldsSet::isSameType(const FieldsSet& other) const {
+ return((&other==this)||
+ ((other.fFieldCount==fFieldCount) && (other.fEnum==fEnum)));
+}
+
+void FieldsSet::clear() {
+ for (int i=0; i<fieldCount(); i++) {
+ fValue[i]=-1;
+ fIsSet[i]=FALSE;
+ }
+}
+
+void FieldsSet::clear(int32_t field) {
+ if (field<0|| field>=fieldCount()) {
+ return;
+ }
+ fValue[field] = -1;
+ fIsSet[field] = FALSE;
+}
+void FieldsSet::set(int32_t field, int32_t amount) {
+ if (field<0|| field>=fieldCount()) {
+ return;
+ }
+ fValue[field] = amount;
+ fIsSet[field] = TRUE;
+}
+
+UBool FieldsSet::isSet(int32_t field) const {
+ if (field<0|| field>=fieldCount()) {
+ return FALSE;
+ }
+ return fIsSet[field];
+}
+int32_t FieldsSet::get(int32_t field) const {
+ if (field<0|| field>=fieldCount()) {
+ return -1;
+ }
+ return fValue[field];
+}
+
+
+int32_t FieldsSet::handleParseName(const FieldsSet* /* inheritFrom */, const UnicodeString& name, const UnicodeString& /* substr*/ , UErrorCode& status) {
+ if(fEnum > -1) {
+ return udbg_enumByString(fEnum, name);
+ } else {
+ status = U_UNSUPPORTED_ERROR;
+ return -1;
+ }
+}
+
+void FieldsSet::parseValueDefault(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status) {
+ int32_t value = -1;
+ if(substr.length()==0) { // inherit requested
+ // inherit
+ if((inheritFrom == NULL) || !inheritFrom->isSet((UCalendarDateFields)field)) {
+ // couldn't inherit from field
+ it_errln(UnicodeString("Parse Failed: Couldn't inherit field ") + field + UnicodeString(" [") + UnicodeString(udbg_enumName(fEnum, field)) + UnicodeString("]"));
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ value = inheritFrom->get((UCalendarDateFields)field);
+ } else {
+ value = udbg_stoi(substr);
+ }
+ set(field, value);
+}
+
+void FieldsSet::parseValueEnum(UDebugEnumType type, const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status) {
+ int32_t value = udbg_enumByString(type, substr);
+ if(value>=0) {
+ set(field, value);
+ } else {
+ // fallback
+ parseValueDefault(inheritFrom,field,substr,status);
+ }
+}
+
+void FieldsSet::handleParseValue(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status) {
+ parseValueDefault(inheritFrom, field, substr, status);
+}
+
+/// CAL FIELDS
+
+
+CalendarFieldsSet::CalendarFieldsSet() :
+FieldsSet(UDBG_UCalendarDateFields) {
+ // base class will call clear.
+}
+
+CalendarFieldsSet::~CalendarFieldsSet() {
+}
+
+void CalendarFieldsSet::handleParseValue(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status) {
+ if(field==UCAL_MONTH) {
+ parseValueEnum(UDBG_UCalendarMonths, inheritFrom, field, substr, status);
+ // will fallback to default.
+ } else {
+ parseValueDefault(inheritFrom, field, substr, status);
+ }
+}
+
+/**
+ * set the specified fields on this calendar. Doesn't clear first. Returns any errors the caller
+ */
+void CalendarFieldsSet::setOnCalendar(Calendar *cal, UErrorCode& /*status*/) const {
+ for (int i=0; i<UDAT_FIELD_COUNT; i++) {
+ if (isSet((UCalendarDateFields)i)) {
+ int32_t value = get((UCalendarDateFields)i);
+ //fprintf(stderr, "Setting: %s#%d=%d\n",udbg_enumName(UDBG_UCalendarDateFields,i),i,value);
+ cal->set((UCalendarDateFields)i, value);
+ }
+ }
+}
+
+/**
+ * return true if the calendar matches in these fields
+ */
+UBool CalendarFieldsSet::matches(Calendar *cal, CalendarFieldsSet &diffSet,
+ UErrorCode& status) const {
+ UBool match = TRUE;
+ if (U_FAILURE(status))
+ return FALSE;
+ for (int i=0; i<UDAT_FIELD_COUNT; i++) {
+ if (isSet((UCalendarDateFields)i)) {
+ int32_t calVal = cal->get((UCalendarDateFields)i, status);
+ if (U_FAILURE(status))
+ return FALSE;
+ if (calVal != get((UCalendarDateFields)i)) {
+ match = FALSE;
+ diffSet.set((UCalendarDateFields)i, calVal);
+ //fprintf(stderr, "match failed: %s#%d=%d != %d\n",udbg_enumName(UDBG_UCalendarDateFields,i),i,cal->get((UCalendarDateFields)i,status), get((UCalendarDateFields)i));;
+ }
+ }
+ }
+ return match;
+}
+
+
+enum {
+ DTS_DATE = 0,
+ DTS_TIME,
+ DTS_COUNT
+};
+
+/**
+ * DateTimeSet
+ * */
+DateTimeStyleSet::DateTimeStyleSet() :
+ FieldsSet(DTS_COUNT) {
+
+}
+
+DateTimeStyleSet::~DateTimeStyleSet() {
+
+}
+
+UDateFormatStyle DateTimeStyleSet::getDateStyle() const {
+ if(!isSet(DTS_DATE)) {
+ return UDAT_NONE;
+ } else {
+ return (UDateFormatStyle)get(DTS_DATE);
+ }
+}
+
+
+UDateFormatStyle DateTimeStyleSet::getTimeStyle() const {
+ if(!isSet(DTS_TIME)) {
+ return UDAT_NONE;
+ } else {
+ return (UDateFormatStyle)get(DTS_TIME);
+ }
+}
+
+void DateTimeStyleSet::handleParseValue(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status) {
+// int32_t value = udbg_enumByString(UDBG_UDateFormatStyle, substr);
+// fprintf(stderr, " HPV: %d -> %d\n", field, value);
+ UnicodeString kRELATIVE_("RELATIVE_");
+ if(substr.startsWith(kRELATIVE_)) {
+ UnicodeString relativeas(substr,kRELATIVE_.length());
+ parseValueEnum(UDBG_UDateFormatStyle, inheritFrom, field, relativeas, status);
+ // fix relative value
+ if(isSet(field) && U_SUCCESS(status)) {
+ set(field, get(field) | UDAT_RELATIVE);
+ }
+ } else {
+ parseValueEnum(UDBG_UDateFormatStyle, inheritFrom, field, substr, status);
+ }
+}
+
+int32_t DateTimeStyleSet::handleParseName(const FieldsSet* /* inheritFrom */, const UnicodeString& name, const UnicodeString& /* substr */, UErrorCode& status) {
+ UnicodeString kDATE("DATE"); // TODO: static
+ UnicodeString kTIME("TIME"); // TODO: static
+ if(name == kDATE ) {
+ return DTS_DATE;
+ } else if(name == kTIME) {
+ return DTS_TIME;
+ } else {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return -1;
+ }
+}
+
+#endif /*!UCONFIG_NO_FORMAT*/
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/fldset.h b/Build/source/libs/icu/icu-xetex/test/intltest/fldset.h
new file mode 100644
index 00000000000..d471b026c19
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/fldset.h
@@ -0,0 +1,186 @@
+/*
+************************************************************************
+* Copyright (c) 2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+************************************************************************
+*/
+#ifndef FLDSET_H_
+#define FLDSET_H_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+#include "unicode/calendar.h"
+#include "unicode/ucal.h"
+#include "unicode/udat.h"
+#include "unicode/udbgutil.h"
+#include "unicode/dbgutil.h"
+#include "unicode/unistr.h"
+
+#define U_FIELDS_SET_MAX 64
+
+class FieldsSet {
+ protected:
+ /**
+ * subclass interface
+ * @param whichEnum which enumaration value goes with this set. Will be used to calculate str values and also enum size.
+ */
+ FieldsSet(UDebugEnumType whichEnum);
+
+ /**
+ * subclass interface - no enum tie-in
+ * @param fieldCount how many fields this can hold.
+ */
+ FieldsSet(int32_t fieldsCount);
+
+ public:
+ /**
+ * @param other "expected" set to match against
+ * @param status - will return invalid argument if sets are not the same size
+ * @return a formatted string listing which fields are set in
+ * this, with the comparison made agaainst those fields in other.
+ */
+ UnicodeString diffFrom(const FieldsSet& other, UErrorCode &status) const;
+
+ public:
+ /**
+ * @param str string to parse
+ * @param status formatted string for status
+ */
+ int32_t parseFrom(const UnicodeString& str, UErrorCode& status) { return parseFrom(str,NULL,status); }
+
+ public:
+ int32_t parseFrom(const UnicodeString& str, const FieldsSet& inheritFrom, UErrorCode& status) { return parseFrom(str, &inheritFrom, status); }
+
+ int32_t parseFrom(const UnicodeString& str, const
+ FieldsSet* inheritFrom, UErrorCode& status);
+
+ protected:
+ /**
+ * Callback interface for subclass.
+ * This function is called when parsing a field name, such as "MONTH" in "MONTH=4".
+ * Base implementation is to lookup the enum value using udbg_* utilities, or else as an integer if
+ * enum is not available.
+ *
+ * If there is a special directive, the implementer can catch it here and return -1 after special processing completes.
+ *
+ * @param inheritFrom the set inheriting from - may be null.
+ * @param name the field name (key side)
+ * @param substr the string in question (value side)
+ * @param status error status - set to error for failure.
+ * @return field number, or negative if field should be skipped.
+ */
+ virtual int32_t handleParseName(const FieldsSet* inheritFrom, const UnicodeString& name, const UnicodeString& substr, UErrorCode& status);
+
+ /**
+ * Callback interface for subclass.
+ * Base implementation is to call parseValueDefault(...)
+ * @param inheritFrom the set inheriting from - may be null.
+ * @param field which field is being parsed
+ * @param substr the string in question (value side)
+ * @param status error status - set to error for failure.
+ * @see parseValueDefault
+ */
+ virtual void handleParseValue(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status);
+
+ /**
+ * the default implementation for handleParseValue.
+ * Base implementation is to parse a decimal integer value, or inherit from inheritFrom if the string is 0-length.
+ * Implementations of this function should call set(field,...) on successful parse.
+ * @see handleParseValue
+ */
+ void parseValueDefault(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status);
+
+
+ /**
+ * convenience implementation for handleParseValue
+ * attempt to load a value from an enum value using udbg_enumByString()
+ * if fails, will call parseValueDefault()
+ * @see handleParseValue
+ */
+ void parseValueEnum(UDebugEnumType type, const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status);
+
+ private:
+ FieldsSet();
+
+ void construct(UDebugEnumType whichEnum, int32_t fieldCount);
+
+ public:
+ virtual ~FieldsSet();
+
+ void clear();
+ void clear(int32_t field);
+ void set(int32_t field, int32_t amount);
+ UBool isSet(int32_t field) const;
+ int32_t get(int32_t field) const;
+
+ UBool isSameType(const FieldsSet& other) const;
+ int32_t fieldCount() const;
+
+
+ protected:
+ int32_t fValue[U_FIELDS_SET_MAX];
+ UBool fIsSet[U_FIELDS_SET_MAX];
+ protected:
+ int32_t fFieldCount;
+ UDebugEnumType fEnum;
+};
+
+/** ------- Calendar Fields Set -------- **/
+class CalendarFieldsSet : public FieldsSet {
+ public:
+ CalendarFieldsSet();
+ virtual ~CalendarFieldsSet();
+
+// void clear(UCalendarDateFields field) { clear((int32_t)field); }
+// void set(UCalendarDateFields field, int32_t amount) { set ((int32_t)field, amount); }
+
+// UBool isSet(UCalendarDateFields field) const { return isSet((int32_t)field); }
+// int32_t get(UCalendarDateFields field) const { return get((int32_t)field); }
+
+ /**
+ * @param matches fillin to hold any fields different. Will have the calendar's value set on them.
+ * @return true if the calendar matches in these fields.
+ */
+ UBool matches(Calendar *cal, CalendarFieldsSet &diffSet,
+ UErrorCode& status) const;
+
+ /**
+ * set the specified fields on this calendar. Doesn't clear first. Returns any errors the cale
+ */
+ void setOnCalendar(Calendar *cal, UErrorCode& status) const;
+
+
+ protected:
+ void handleParseValue(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status);
+};
+
+/**
+ * This class simply implements a set of date and time styles
+ * such as DATE=SHORT or TIME=SHORT,DATE=LONG
+ */
+class DateTimeStyleSet : public FieldsSet {
+ public:
+ DateTimeStyleSet();
+ virtual ~DateTimeStyleSet();
+
+
+ /**
+ * @return the date style, or UDAT_NONE if not set
+ */
+ UDateFormatStyle getDateStyle() const;
+
+ /**
+ * @return the time style, or UDAT_NONE if not set
+ */
+ UDateFormatStyle getTimeStyle() const;
+
+
+ protected:
+ void handleParseValue(const FieldsSet* inheritFrom, int32_t field, const UnicodeString& substr, UErrorCode& status);
+ int32_t handleParseName(const FieldsSet* inheritFrom, const UnicodeString& name, const UnicodeString& substr, UErrorCode& status);
+};
+
+
+#endif /*!UCONFIG_NO_FORMAT*/
+#endif /*FLDSET_H_*/
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/frcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/frcoll.cpp
new file mode 100644
index 00000000000..fd8702c6112
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/frcoll.cpp
@@ -0,0 +1,217 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/***********************************************************************
+* Modification history
+* Date Name Description
+* 02/14/2001 synwee Added attributes in TestTertiary and
+* TestSecondary
+***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "frcoll.h"
+
+#include "sfwdchit.h"
+
+CollationFrenchTest::CollationFrenchTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance(Locale::getFrance(), status);
+ if(!myCollation || U_FAILURE(status)) {
+ errln(__FILE__ "failed to create! err " + UnicodeString(u_errorName(status)));
+ /* if it wasn't already: */
+ delete myCollation;
+ myCollation = NULL;
+ }
+}
+
+CollationFrenchTest::~CollationFrenchTest()
+{
+ delete myCollation;
+}
+
+const UChar CollationFrenchTest::testSourceCases[][CollationFrenchTest::MAX_TOKEN_LEN] =
+{
+ {0x0061/*'a'*/, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000},
+ {0x0043/*'C'*/, 0x004f/*'O'*/, 0x0054/*'T'*/, 0x0045/*'E'*/, 0x0000},
+ {0x0063/*'c'*/, 0x006f/*'o'*/, 0x002d/*'-'*/, 0x006f/*'o'*/, 0x0070/*'p'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0048/*'H'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x006f/*'o'*/, 0x0000},
+ {0x01f1, 0x0000},
+ {0xfb00, 0x0000},
+ {0x01fa, 0x0000},
+ {0x0101, 0x0000}
+};
+
+const UChar CollationFrenchTest::testTargetCases[][CollationFrenchTest::MAX_TOKEN_LEN] =
+{
+ {0x0041/*'A'*/, 0x0042/*'B'*/, 0x0043/*'C'*/, 0x0000},
+ {0x0063/*'c'*/, 0x00f4, 0x0074/*'t'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0043/*'C'*/, 0x004f/*'O'*/, 0x004f/*'O'*/, 0x0050/*'P'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x00E9, 0x0000},
+ {0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x00E9, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0000},
+ {0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
+ {0x0068/*'h'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x004f/*'O'*/, 0x0000},
+ {0x01ee, 0x0000},
+ {0x25ca, 0x0000},
+ {0x00e0, 0x0000},
+ {0x01df, 0x0000}
+};
+
+const Collator::EComparisonResult CollationFrenchTest::results[] =
+{
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS, /*Collator::GREATER,*/
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::LESS, /*Collator::GREATER,*/
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::LESS
+};
+
+// 0x0300 is grave, 0x0301 is acute
+// the order of elements in this array must be different than the order in CollationEnglishTest
+const UChar CollationFrenchTest::testAcute[][CollationFrenchTest::MAX_TOKEN_LEN] =
+{
+/*00*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0000},
+/*01*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0000},
+/*02*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0000},
+/*03*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0000},
+/*04*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0000},
+/*05*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*06*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*07*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*08*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*09*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
+/*0a*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0b*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0c*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0d*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0e*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
+/*0f*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*10*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*11*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*12*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*13*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
+/*14*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*15*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*16*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*17*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
+/*18*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000}
+};
+
+const UChar CollationFrenchTest::testBugs[][CollationFrenchTest::MAX_TOKEN_LEN] =
+{
+ {0x0061/*'a'*/, 0x000},
+ {0x0041/*'A'*/, 0x000},
+ {0x0065/*'e'*/, 0x000},
+ {0x0045/*'E'*/, 0x000},
+ {0x00e9, 0x000},
+ {0x00e8, 0x000},
+ {0x00ea, 0x000},
+ {0x00eb, 0x000},
+ {0x0065/*'e'*/, 0x0061/*'a'*/, 0x000},
+ {0x0078/*'x'*/, 0x000}
+};
+
+void CollationFrenchTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation->setStrength(Collator::TERTIARY);
+ myCollation->setAttribute(UCOL_FRENCH_COLLATION, UCOL_ON, status);
+ myCollation->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting attribute in French collator");
+ }
+ else
+ {
+ for (i = 0; i < 12 ; i++)
+ {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+ }
+}
+
+void CollationFrenchTest::TestSecondary(/* char* par */)
+{
+ //test acute and grave ordering
+ int32_t i = 0;
+ int32_t j;
+ Collator::EComparisonResult expected;
+ UErrorCode status = U_ZERO_ERROR;
+ //myCollation->setAttribute(UCOL_FRENCH_COLLATION, UCOL_ON, status);
+ myCollation->setStrength(Collator::SECONDARY);
+ if (U_FAILURE(status))
+ errln("Error setting attribute in French collator");
+ else
+ {
+ const int32_t testAcuteSize = (int32_t)(sizeof(testAcute) / sizeof(testAcute[0]));
+ for (i = 0; i < testAcuteSize; i++)
+ {
+ for (j = 0; j < testAcuteSize; j++)
+ {
+ if (i < j)
+ expected = Collator::LESS;
+ else if (i == j)
+ expected = Collator::EQUAL;
+ else // (i > j)
+ expected = Collator::GREATER;
+ doTest(myCollation, testAcute[i], testAcute[j], expected );
+ }
+ }
+ }
+}
+
+void CollationFrenchTest::TestExtra(/* char* par */)
+{
+ int32_t i, j;
+ myCollation->setStrength(Collator::TERTIARY);
+ for (i = 0; i < 9 ; i++)
+ {
+ for (j = i + 1; j < 10; j += 1)
+ {
+ doTest(myCollation, testBugs[i], testBugs[j], Collator::LESS);
+ }
+ }
+}
+
+void CollationFrenchTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationFrenchTest: ");
+
+ if((!myCollation) && exec) {
+ errln(__FILE__ " cannot test - failed to create collator.");
+ name = "some test";
+ return;
+ }
+
+ switch (index) {
+ case 0: name = "TestSecondary"; if (exec) TestSecondary(/* par */); break;
+ case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ case 2: name = "TestExtra"; if (exec) TestExtra(/* par */); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/frcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/frcoll.h
new file mode 100644
index 00000000000..a8dfea12c35
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/frcoll.h
@@ -0,0 +1,52 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationFrenchTest is a third level test class. This tests the locale
+ * specific tertiary rules. For example, the French secondary sorting on
+ * accented characters.
+ */
+#ifndef _FRCOLL
+#define _FRCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationFrenchTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationFrenchTest();
+ virtual ~CollationFrenchTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // perform tests with strength SECONDARY
+ void TestSecondary(/* char* par */);
+
+ // perform tests with strength TERTIARY
+ void TestTertiary(/* char* par */);
+
+ // perform extra tests
+ void TestExtra(/* char* par */);
+
+private:
+ static const UChar testSourceCases[][MAX_TOKEN_LEN];
+ static const UChar testTargetCases[][MAX_TOKEN_LEN];
+ static const UChar testBugs[][MAX_TOKEN_LEN];
+ static const Collator::EComparisonResult results[];
+ static const UChar testAcute[][MAX_TOKEN_LEN];
+
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/g7coll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/g7coll.cpp
new file mode 100644
index 00000000000..cb8f5f8563c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/g7coll.cpp
@@ -0,0 +1,302 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "g7coll.h"
+#include "sfwdchit.h"
+
+
+static const UChar testCases[][G7CollationTest::MAX_TOKEN_LEN] = {
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0073 /*'s'*/, 0x0000}, /* 9 */
+ { 0x0050 /*'P'*/, 0x0061 /*'a'*/, 0x0074/*'t'*/, 0x0000}, /* 1 */
+ { 0x0070 /*'p'*/, 0x00E9, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x00E9, 0x0000}, /* 2 */
+ { 0x0070 /*'p'*/, 0x00EA, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0065 /*'e'*/, 0x0000}, /* 3 */
+ { 0x0070 /*'p'*/, 0x00E9, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0065 /*'e'*/, 0x0072 /*'r'*/, 0x0000}, /* 4 */
+ { 0x0070 /*'p'*/, 0x00EA, 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0065 /*'e'*/, 0x0072 /*'r'*/, 0x0000}, /* 5 */
+ { 0x0054 /*'T'*/, 0x006f /*'o'*/, 0x0064 /*'d'*/, 0x0000}, /* 6 */
+ { 0x0054 /*'T'*/, 0x00F6, 0x006e /*'n'*/, 0x0065 /*'e'*/, 0x0000}, /* 7 */
+ { 0x0054 /*'T'*/, 0x006f /*'o'*/, 0x0066 /*'f'*/, 0x0075 /*'u'*/, 0x0000}, /* 8 */
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0000}, /* 12 */
+ { 0x0054 /*'T'*/, 0x006f /*'o'*/, 0x006e /*'n'*/, 0x0000}, /* 10 */
+ { 0x0050 /*'P'*/, 0x0041 /*'A'*/, 0x0054 /*'T'*/, 0x0000}, /* 11 */
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x002d /*'-'*/, 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0000}, /* 13 */
+ { 0x0062 /*'b'*/, 0x006c /*'l'*/, 0x0061 /*'a'*/, 0x0062 /*'c'*/, 0x006b /*'k'*/,
+ 0x002d /*'-'*/, 0x0062 /*'b'*/, 0x0069 /*'i'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0073/*'s'*/, 0x0000}, /* 0 */
+ {0x0070 /*'p'*/, 0x0061 /*'a'*/, 0x0074 /*'t'*/, 0x0000}, /* 14 */
+ /* Additional tests */
+ { 0x0063 /*'c'*/, 0x007a /*'z'*/, 0x0061 /*'a'*/, 0x0072 /*'r'*/, 0x0000 }, /* 15 */
+ { 0x0063 /*'c'*/, 0x0068 /*'h'*/, 0x0075 /*'u'*/, 0x0072 /*'r'*/, 0x006f /*'o'*/, 0x0000 }, /* 16 */
+ { 0x0063 /*'c'*/, 0x0061 /*'a'*/, 0x0074 /*'t'*/, 0x000 }, /* 17 */
+ { 0x0064 /*'d'*/, 0x0061 /*'a'*/, 0x0072 /*'r'*/, 0x006e /*'n'*/, 0x0000 }, /* 18 */
+ { 0x003f /*'?'*/, 0x0000 }, /* 19 */
+ { 0x0071 /*'q'*/, 0x0075 /*'u'*/, 0x0069 /*'i'*/, 0x0063 /*'c'*/, 0x006b /*'k'*/, 0x0000 }, /* 20 */
+ { 0x0023 /*'#'*/, 0x0000 }, /* 21 */
+ { 0x0026 /*'&'*/, 0x0000 }, /* 22 */
+ { 0x0061 /*'a'*/, 0x002d /*'-'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0076 /*'v'*/, 0x0061 /*'a'*/,
+ 0x0072/*'r'*/, 0x006b/*'k'*/, 0x0000}, /* 24 */
+ { 0x0061 /*'a'*/, 0x0061 /*'a'*/, 0x0072 /*'r'*/, 0x0064 /*'d'*/, 0x0076 /*'v'*/, 0x0061 /*'a'*/,
+ 0x0072/*'r'*/, 0x006b/*'k'*/, 0x0000}, /* 23 */
+ { 0x0061 /*'a'*/, 0x0062 /*'b'*/, 0x0062 /*'b'*/, 0x006f /*'o'*/, 0x0074 /*'t'*/, 0x0000}, /* 25 */
+ { 0x0063 /*'c'*/, 0x006f /*'o'*/, 0x002d /*'-'*/, 0x0070 /*'p'*/, 0x0000}, /* 27 */
+ { 0x0063 /*'c'*/, 0x006f /*'o'*/, 0x0070 /*'p'*/, 0x0000}, /* 28 */
+ { 0x0063 /*'c'*/, 0x006f /*'o'*/, 0x006f /*'o'*/, 0x0070 /*'p'*/, 0x0000}, /* 26 */
+ { 0x007a /*'z'*/, 0x0065 /*'e'*/, 0x0062 /*'b'*/, 0x0072 /*'r'*/, 0x0061 /*'a'*/, 0x0000} /* 29 */
+};
+
+static const int32_t results[G7CollationTest::TESTLOCALES][G7CollationTest::TOTALTESTSET] = {
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_US */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_GB */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_CA */
+ { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */
+ { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_CA */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* de_DE */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* it_IT */
+ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* ja_JP */
+ /* new table collation with rules "& Z < p, P" loop to FIXEDTESTSET */
+ { 12, 13, 9, 0, 6, 8, 10, 7, 14, 1, 11, 2, 3, 4, 5, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 },
+ /* new table collation with rules "& C < ch , cH, Ch, CH " loop to TOTALTESTSET */
+ { 19, 22, 21, 23, 24, 25, 12, 13, 9, 0, 17, 26, 28, 27, 15, 16, 18, 14, 1, 11, 2, 3, 4, 5, 20, 6, 8, 10, 7, 29 },
+ /* new table collation with rules "& Question-mark ; ? & Hash-mark ; # & Ampersand ; '&' " loop to TOTALTESTSET */
+ { 23, 24, 25, 22, 12, 13, 9, 0, 17, 16, 26, 28, 27, 15, 18, 21, 14, 1, 11, 2, 3, 4, 5, 19, 20, 6, 8, 10, 7, 29 },
+ /* analogous to Japanese rules " & aa ; a- & ee ; e- & ii ; i- & oo ; o- & uu ; u- " */ /* loop to TOTALTESTSET */
+ { 19, 22, 21, 24, 23, 25, 12, 13, 9, 0, 17, 16, 28, 26, 27, 15, 18, 14, 1, 11, 2, 3, 4, 5, 20, 6, 8, 10, 7, 29 }
+};
+
+G7CollationTest::~G7CollationTest() {}
+
+void G7CollationTest::TestG7Locales(/* char* par */)
+{
+ int32_t i;
+ const Locale locales[8] = {
+ Locale("en", "US", ""),
+ Locale("en", "GB", ""),
+ Locale("en", "CA", ""),
+ Locale("fr", "FR", ""),
+ Locale("fr", "CA", ""),
+ Locale("de", "DE", ""),
+ Locale("it", "IT", ""),
+ Locale("ja", "JP", "")
+ };
+
+
+ for (i = 0; i < 8; i++)
+ {
+ Collator *myCollation= 0;
+ UnicodeString dispName;
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator* tblColl1 = 0;
+
+ myCollation = Collator::createInstance(locales[i], status);
+ if(U_FAILURE(status)) {
+ delete myCollation;
+ errln("Couldn't instantiate collator. Error: %s", u_errorName(status));
+ return;
+ }
+ myCollation->setStrength(Collator::QUATERNARY);
+ myCollation->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status);
+ if (U_FAILURE(status))
+ {
+ UnicodeString msg;
+
+ msg += "Locale ";
+ msg += locales[i].getDisplayName(dispName);
+ msg += "creation failed.";
+
+ errln(msg);
+ continue;
+ }
+
+// const UnicodeString& defRules = ((RuleBasedCollator*)myCollation)->getRules();
+ status = U_ZERO_ERROR;
+ tblColl1 = new RuleBasedCollator(((RuleBasedCollator*)myCollation)->getRules(), status);
+ if (U_FAILURE(status))
+ {
+ UnicodeString msg, name;
+
+ msg += "Recreate ";
+ msg += locales[i].getDisplayName(name);
+ msg += "collation failed.";
+
+ errln(msg);
+ continue;
+ }
+
+ UnicodeString msg;
+
+ msg += "Locale ";
+ msg += locales[i].getDisplayName(dispName);
+ msg += "tests start :";
+ logln(msg);
+
+ int32_t j, n;
+ for (j = 0; j < FIXEDTESTSET; j++)
+ {
+ for (n = j+1; n < FIXEDTESTSET; n++)
+ {
+ doTest(tblColl1, testCases[results[i][j]], testCases[results[i][n]], Collator::LESS);
+ }
+ }
+
+ delete myCollation;
+ delete tblColl1;
+ }
+}
+
+void G7CollationTest::TestDemo1(/* char* par */)
+{
+ logln("Demo Test 1 : Create a new table collation with rules \"& Z < p, P\"");
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *col = Collator::createInstance("en_US", status);
+ if(U_FAILURE(status)) {
+ delete col;
+ errln("Couldn't instantiate collator. Error: %s", u_errorName(status));
+ return;
+ }
+ const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules();
+ UnicodeString newRules(" & Z < p, P");
+ newRules.insert(0, baseRules);
+ RuleBasedCollator *myCollation = new RuleBasedCollator(newRules, status);
+
+ if (U_FAILURE(status))
+ {
+ errln( "Demo Test 1 Table Collation object creation failed.");
+ return;
+ }
+
+ int32_t j, n;
+ for (j = 0; j < FIXEDTESTSET; j++)
+ {
+ for (n = j+1; n < FIXEDTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[8][j]], testCases[results[8][n]], Collator::LESS);
+ }
+ }
+
+ delete myCollation;
+ delete col;
+}
+
+void G7CollationTest::TestDemo2(/* char* par */)
+{
+ logln("Demo Test 2 : Create a new table collation with rules \"& C < ch , cH, Ch, CH\"");
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *col = Collator::createInstance("en_US", status);
+ if(U_FAILURE(status)) {
+ delete col;
+ errln("Couldn't instantiate collator. Error: %s", u_errorName(status));
+ return;
+ }
+ const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules();
+ UnicodeString newRules("& C < ch , cH, Ch, CH");
+ newRules.insert(0, baseRules);
+ RuleBasedCollator *myCollation = new RuleBasedCollator(newRules, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Demo Test 2 Table Collation object creation failed.");
+ return;
+ }
+
+ int32_t j, n;
+ for (j = 0; j < TOTALTESTSET; j++)
+ {
+ for (n = j+1; n < TOTALTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[9][j]], testCases[results[9][n]], Collator::LESS);
+ }
+ }
+
+ delete myCollation;
+ delete col;
+}
+
+void G7CollationTest::TestDemo3(/* char* par */)
+{
+ logln("Demo Test 3 : Create a new table collation with rules \"& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'\"");
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *col = Collator::createInstance("en_US", status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't instantiate collator. Error: %s", u_errorName(status));
+ delete col;
+ return;
+ }
+ const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules();
+ UnicodeString newRules = "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'";
+ newRules.insert(0, baseRules);
+ RuleBasedCollator *myCollation = new RuleBasedCollator(newRules, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Demo Test 3 Table Collation object creation failed.");
+ return;
+ }
+
+ int32_t j, n;
+ for (j = 0; j < TOTALTESTSET; j++)
+ {
+ for (n = j+1; n < TOTALTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[10][j]], testCases[results[10][n]], Collator::LESS);
+ }
+ }
+
+ delete myCollation;
+ delete col;
+}
+
+void G7CollationTest::TestDemo4(/* char* par */)
+{
+ logln("Demo Test 4 : Create a new table collation with rules \" & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' \"");
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *col = Collator::createInstance("en_US", status);
+ if(U_FAILURE(status)) {
+ delete col;
+ errln("Couldn't instantiate collator. Error: %s", u_errorName(status));
+ return;
+ }
+
+ const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules();
+ UnicodeString newRules = " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' ";
+ newRules.insert(0, baseRules);
+ RuleBasedCollator *myCollation = new RuleBasedCollator(newRules, status);
+
+ int32_t j, n;
+ for (j = 0; j < TOTALTESTSET; j++)
+ {
+ for (n = j+1; n < TOTALTESTSET; n++)
+ {
+ doTest(myCollation, testCases[results[11][j]], testCases[results[11][n]], Collator::LESS);
+ }
+ }
+
+ delete myCollation;
+ delete col;
+}
+
+void G7CollationTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite G7CollationTest: ");
+ switch (index) {
+ case 0: name = "TestG7Locales"; if (exec) TestG7Locales(/* par */); break;
+ case 1: name = "TestDemo1"; if (exec) TestDemo1(/* par */); break;
+ case 2: name = "TestDemo2"; if (exec) TestDemo2(/* par */); break;
+ case 3: name = "TestDemo3"; if (exec) TestDemo3(/* par */); break;
+ case 4: name = "TestDemo4"; if (exec) TestDemo4(/* par */); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/g7coll.h b/Build/source/libs/icu/icu-xetex/test/intltest/g7coll.h
new file mode 100644
index 00000000000..cd3d0a13c11
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/g7coll.h
@@ -0,0 +1,77 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * G7CollationTest is a third level test class. This test performs the examples
+ * mentioned on the IBM Java international demos web site.
+ * Sample Rules: & Z < p , P
+ * Effect : Making P sort after Z.
+ *
+ * Sample Rules: & c < ch , cH, Ch, CH
+ * Effect : As well as adding sequences of characters that act as a single character (this is
+ * known as contraction), you can also add characters that act like a sequence of
+ * characters (this is known as expansion).
+ *
+ * Sample Rules: & Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'
+ * Effect : Expansion and contraction can actually be combined.
+ *
+ * Sample Rules: & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-'
+ * Effect : sorted sequence as the following,
+ * aardvark
+ * a-rdvark
+ * abbot
+ * coop
+ * co-p
+ * cop
+ */
+
+#ifndef _G7COLL
+#define _G7COLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/tblcoll.h"
+#include "tscoll.h"
+
+class G7CollationTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ enum ETotal_Locales { TESTLOCALES = 12 };
+ enum ETotal_Fixed { FIXEDTESTSET = 15 };
+ enum ETotal_Test { TOTALTESTSET = 30 };
+
+ G7CollationTest() {}
+ virtual ~G7CollationTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+
+ // perform test for G7 locales
+ void TestG7Locales(/* char* par */);
+
+ // perform test with added rules " & Z < p, P"
+ void TestDemo1(/* char* par */);
+
+ // perorm test with added rules "& C < ch , cH, Ch, CH"
+ void TestDemo2(/* char* par */);
+
+ // perform test with added rules
+ // "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'"
+ void TestDemo3(/* char* par */);
+
+ // perform test with added rules
+ // " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' "
+ void TestDemo4(/* char* par */);
+
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.cpp
new file mode 100644
index 00000000000..b3aff063ae1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.cpp
@@ -0,0 +1,1511 @@
+/**
+ *******************************************************************************
+ * Copyright (C) 2001-2007, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_SERVICE
+
+#include "icusvtst.h"
+#include "servloc.h"
+#include <stdio.h>
+
+
+class MyListener : public EventListener {
+};
+
+class WrongListener : public EventListener {
+};
+
+class ICUNSubclass : public ICUNotifier {
+ public:
+ UBool acceptsListener(const EventListener& /*l*/) const {
+ return TRUE;
+ // return l instanceof MyListener;
+ }
+
+ virtual void notifyListener(EventListener& /*l*/) const {
+ }
+};
+
+// This factory does nothing
+class LKFSubclass0 : public LocaleKeyFactory {
+public:
+ LKFSubclass0()
+ : LocaleKeyFactory(VISIBLE, "LKFSubclass0")
+ {
+ }
+};
+
+class LKFSubclass : public LocaleKeyFactory {
+ Hashtable table;
+
+ public:
+ LKFSubclass(UBool visible)
+ : LocaleKeyFactory(visible ? VISIBLE : INVISIBLE, "LKFSubclass")
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ table.put("en_US", this, status);
+ }
+
+ protected:
+ virtual const Hashtable* getSupportedIDs(UErrorCode &/*status*/) const {
+ return &table;
+ }
+};
+
+class Integer : public UObject {
+ public:
+ const int32_t _val;
+
+ Integer(int32_t val) : _val(val) {
+ }
+
+ Integer(const Integer& rhs) : UObject(rhs), _val(rhs._val) {
+ }
+ virtual ~Integer() {
+ }
+
+ public:
+ /**
+ * UObject boilerplate.
+ */
+ static UClassID getStaticClassID() {
+ return (UClassID)&fgClassID;
+ }
+
+ virtual UClassID getDynamicClassID() const {
+ return getStaticClassID();
+ }
+
+ virtual UBool operator==(const UObject& other) const
+ {
+ return other.getDynamicClassID() == getStaticClassID() &&
+ _val == ((Integer&)other)._val;
+ }
+
+ public:
+ virtual UnicodeString& debug(UnicodeString& result) const {
+ debugClass(result);
+ result.append(" val: ");
+ result.append(_val);
+ return result;
+ }
+
+ virtual UnicodeString& debugClass(UnicodeString& result) const {
+ return result.append("Integer");
+ }
+
+ private:
+ static const char fgClassID;
+};
+
+const char Integer::fgClassID = '\0';
+
+// use locale keys
+class TestIntegerService : public ICUService {
+ public:
+ ICUServiceKey* createKey(const UnicodeString* id, UErrorCode& status) const {
+ return LocaleKey::createWithCanonicalFallback(id, NULL, status); // no fallback locale
+ }
+
+ virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& status)
+ {
+ if (U_SUCCESS(status) && obj && obj->getDynamicClassID() == Integer::getStaticClassID()) {
+ return new SimpleFactory((Integer*)obj, id, visible);
+ }
+ return NULL;
+ }
+
+ virtual UObject* cloneInstance(UObject* instance) const {
+ return instance ? new Integer(*(Integer*)instance) : NULL;
+ }
+};
+
+
+ICUServiceTest::ICUServiceTest() {
+}
+
+ICUServiceTest::~ICUServiceTest() {
+}
+
+void
+ICUServiceTest::runIndexedTest(int32_t index, UBool exec, const char* &name,
+char* /*par*/)
+{
+ switch (index) {
+ TESTCASE(0,testAPI_One);
+ TESTCASE(1,testAPI_Two);
+ TESTCASE(2,testRBF);
+ TESTCASE(3,testNotification);
+ TESTCASE(4,testLocale);
+ TESTCASE(5,testWrapFactory);
+ TESTCASE(6,testCoverage);
+ default: name = ""; break;
+ }
+}
+
+UnicodeString append(UnicodeString& result, const UObject* obj)
+{
+ char buffer[128];
+ if (obj == NULL) {
+ result.append("NULL");
+ } else {
+ UClassID id = obj->getDynamicClassID();
+ if (id == UnicodeString::getStaticClassID()) {
+ result.append(*(UnicodeString*)obj);
+ } else if (id == Locale::getStaticClassID()) {
+ result.append(((Locale*)obj)->getName());
+ } else if (id == Integer::getStaticClassID()) {
+ sprintf(buffer, "%d", (int)((Integer*)obj)->_val);
+ result.append(buffer);
+ } else {
+ sprintf(buffer, "%p", (const void*)obj);
+ result.append(buffer);
+ }
+ }
+ return result;
+}
+
+UnicodeString&
+ICUServiceTest::lrmsg(UnicodeString& result, const UnicodeString& message, const UObject* lhs, const UObject* rhs) const
+{
+ result.append(message);
+ result.append(" lhs: ");
+ append(result, lhs);
+ result.append(", rhs: ");
+ append(result, rhs);
+ return result;
+}
+
+void
+ICUServiceTest::confirmBoolean(const UnicodeString& message, UBool val)
+{
+ if (val) {
+ logln(message);
+ } else {
+ errln(message);
+ }
+}
+
+#if 0
+void
+ICUServiceTest::confirmEqual(const UnicodeString& message, const UObject* lhs, const UObject* rhs)
+{
+ UBool equ = (lhs == NULL)
+ ? (rhs == NULL)
+ : (rhs != NULL && lhs->operator==(*rhs));
+
+ UnicodeString temp;
+ lrmsg(temp, message, lhs, rhs);
+
+ if (equ) {
+ logln(temp);
+ } else {
+ errln(temp);
+ }
+}
+#else
+void
+ICUServiceTest::confirmEqual(const UnicodeString& message, const Integer* lhs, const Integer* rhs)
+{
+ UBool equ = (lhs == NULL)
+ ? (rhs == NULL)
+ : (rhs != NULL && lhs->operator==(*rhs));
+
+ UnicodeString temp;
+ lrmsg(temp, message, lhs, rhs);
+
+ if (equ) {
+ logln(temp);
+ } else {
+ errln(temp);
+ }
+}
+
+void
+ICUServiceTest::confirmEqual(const UnicodeString& message, const UnicodeString* lhs, const UnicodeString* rhs)
+{
+ UBool equ = (lhs == NULL)
+ ? (rhs == NULL)
+ : (rhs != NULL && lhs->operator==(*rhs));
+
+ UnicodeString temp;
+ lrmsg(temp, message, lhs, rhs);
+
+ if (equ) {
+ logln(temp);
+ } else {
+ errln(temp);
+ }
+}
+
+void
+ICUServiceTest::confirmEqual(const UnicodeString& message, const Locale* lhs, const Locale* rhs)
+{
+ UBool equ = (lhs == NULL)
+ ? (rhs == NULL)
+ : (rhs != NULL && lhs->operator==(*rhs));
+
+ UnicodeString temp;
+ lrmsg(temp, message, lhs, rhs);
+
+ if (equ) {
+ logln(temp);
+ } else {
+ errln(temp);
+ }
+}
+#endif
+
+// use these for now
+void
+ICUServiceTest::confirmStringsEqual(const UnicodeString& message, const UnicodeString& lhs, const UnicodeString& rhs)
+{
+ UBool equ = lhs == rhs;
+
+ UnicodeString temp = message;
+ temp.append(" lhs: ");
+ temp.append(lhs);
+ temp.append(" rhs: ");
+ temp.append(rhs);
+
+ if (equ) {
+ logln(temp);
+ } else {
+ errln(temp);
+ }
+}
+
+
+void
+ICUServiceTest::confirmIdentical(const UnicodeString& message, const UObject* lhs, const UObject *rhs)
+{
+ UnicodeString temp;
+ lrmsg(temp, message, lhs, rhs);
+ if (lhs == rhs) {
+ logln(temp);
+ } else {
+ errln(temp);
+ }
+}
+
+void
+ICUServiceTest::confirmIdentical(const UnicodeString& message, int32_t lhs, int32_t rhs)
+{
+ if (lhs == rhs) {
+ logln(message + " lhs: " + lhs + " rhs: " + rhs);
+ } else {
+ errln(message + " lhs: " + lhs + " rhs: " + rhs);
+ }
+}
+
+void
+ICUServiceTest::msgstr(const UnicodeString& message, UObject* obj, UBool err)
+{
+ if (obj) {
+ UnicodeString* str = (UnicodeString*)obj;
+ logln(message + *str);
+ delete str;
+ } else if (err) {
+ errln("Error " + message + "string is NULL");
+ }
+}
+
+void
+ICUServiceTest::testAPI_One()
+{
+ // create a service using locale keys,
+ TestIntegerService service;
+
+ // register an object with one locale,
+ // search for an object with a more specific locale
+ // should return the original object
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* singleton0 = new Integer(0);
+ service.registerInstance(singleton0, "en_US", status);
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("en_US_FOO", status);
+ confirmEqual("1) en_US_FOO -> en_US", result, singleton0);
+ delete result;
+ }
+
+ // register a new object with the more specific locale
+ // search for an object with that locale
+ // should return the new object
+ Integer* singleton1 = new Integer(1);
+ service.registerInstance(singleton1, "en_US_FOO", status);
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("en_US_FOO", status);
+ confirmEqual("2) en_US_FOO -> en_US_FOO", result, singleton1);
+ delete result;
+ }
+
+ // search for an object that falls back to the first registered locale
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("en_US_BAR", status);
+ confirmEqual("3) en_US_BAR -> en_US", result, singleton0);
+ delete result;
+ }
+
+ // get a list of the factories, should be two
+ {
+ confirmIdentical("4) factory size", service.countFactories(), 2);
+ }
+
+ // register a new object with yet another locale
+ Integer* singleton2 = new Integer(2);
+ service.registerInstance(singleton2, "en", status);
+ {
+ confirmIdentical("5) factory size", service.countFactories(), 3);
+ }
+
+ // search for an object with the new locale
+ // stack of factories is now en, en_US_FOO, en_US
+ // search for en_US should still find en_US object
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("en_US_BAR", status);
+ confirmEqual("6) en_US_BAR -> en_US", result, singleton0);
+ delete result;
+ }
+
+ // register a new object with an old id, should hide earlier factory using this id, but leave it there
+ Integer* singleton3 = new Integer(3);
+ URegistryKey s3key = service.registerInstance(singleton3, "en_US", status);
+ {
+ confirmIdentical("9) factory size", service.countFactories(), 4);
+ }
+
+ // should get data from that new factory
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("en_US_BAR", status);
+ confirmEqual("10) en_US_BAR -> (3)", result, singleton3);
+ delete result;
+ }
+
+ // remove new factory
+ // should have fewer factories again
+ // singleton3 dead!
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ service.unregister(s3key, status);
+ confirmIdentical("11) factory size", service.countFactories(), 3);
+ }
+
+ // should get original data again after remove factory
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("en_US_BAR", status);
+ confirmEqual("12) en_US_BAR -> (3)", result, singleton0);
+ delete result;
+ }
+
+ // shouldn't find unregistered ids
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("foo", status);
+ confirmIdentical("13) foo -> null", result, NULL);
+ delete result;
+ }
+
+ // should find non-canonical strings
+ {
+ UnicodeString resultID;
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("EN_us_fOo", &resultID, status);
+ confirmEqual("14a) find-non-canonical", result, singleton1);
+ confirmStringsEqual("14b) find non-canonical", resultID, "en_US_FOO");
+ delete result;
+ }
+
+ // should be able to register non-canonical strings and get them canonicalized
+ Integer* singleton4 = new Integer(4);
+ service.registerInstance(singleton4, "eN_ca_dUde", status);
+ {
+ UnicodeString resultID;
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("En_Ca_DuDe", &resultID, status);
+ confirmEqual("15a) find-non-canonical", result, singleton4);
+ confirmStringsEqual("15b) register non-canonical", resultID, "en_CA_DUDE");
+ delete result;
+ }
+
+ // should be able to register invisible factories, these will not
+ // be visible by default, but if you know the secret password you
+ // can still access these services...
+ Integer* singleton5 = new Integer(5);
+ service.registerInstance(singleton5, "en_US_BAR", FALSE, status);
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Integer* result = (Integer*)service.get("en_US_BAR", status);
+ confirmEqual("17) get invisible", result, singleton5);
+ delete result;
+ }
+
+ // should not be able to locate invisible services
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, status);
+ service.getVisibleIDs(ids, status);
+ UnicodeString target = "en_US_BAR";
+ confirmBoolean("18) find invisible", !ids.contains(&target));
+ }
+
+ // clear factory and caches
+ service.reset();
+ confirmBoolean("19) is default", service.isDefault());
+}
+
+/*
+ ******************************************************************
+ */
+class TestStringSimpleKeyService : public ICUService {
+public:
+
+ virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& status)
+ {
+ // We could put this type check into ICUService itself, but we'd still
+ // have to implement cloneInstance. Otherwise we could just tell the service
+ // what the object type is when we create it, and the default implementation
+ // could handle everything for us. Phooey.
+ if (obj && obj->getDynamicClassID() == UnicodeString::getStaticClassID()) {
+ return ICUService::createSimpleFactory(obj, id, visible, status);
+ }
+ return NULL;
+ }
+
+ virtual UObject* cloneInstance(UObject* instance) const {
+ return instance ? new UnicodeString(*(UnicodeString*)instance) : NULL;
+ }
+};
+
+class TestStringService : public ICUService {
+ public:
+ ICUServiceKey* createKey(const UnicodeString* id, UErrorCode& status) const {
+ return LocaleKey::createWithCanonicalFallback(id, NULL, status); // no fallback locale
+ }
+
+ virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& /* status */)
+ {
+ if (obj && obj->getDynamicClassID() == UnicodeString::getStaticClassID()) {
+ return new SimpleFactory((UnicodeString*)obj, id, visible);
+ }
+ return NULL;
+ }
+
+ virtual UObject* cloneInstance(UObject* instance) const {
+ return instance ? new UnicodeString(*(UnicodeString*)instance) : NULL;
+ }
+};
+
+// this creates a string for any id, but doesn't report anything
+class AnonymousStringFactory : public ICUServiceFactory
+{
+ public:
+ virtual UObject* create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& /* status */) const {
+ return new UnicodeString(key.getID());
+ }
+
+ virtual void updateVisibleIDs(Hashtable& /*result*/, UErrorCode& /*status*/) const {
+ // do nothing
+ }
+
+ virtual UnicodeString& getDisplayName(const UnicodeString& /*id*/, const Locale& /*locale*/, UnicodeString& result) const {
+ // do nothing
+ return result;
+ }
+
+ static UClassID getStaticClassID() {
+ return (UClassID)&fgClassID;
+ }
+
+ virtual UClassID getDynamicClassID() const {
+ return getStaticClassID();
+ }
+
+ private:
+ static const char fgClassID;
+};
+
+const char AnonymousStringFactory::fgClassID = '\0';
+
+class TestMultipleKeyStringFactory : public ICUServiceFactory {
+ UErrorCode _status;
+ UVector _ids;
+ UnicodeString _factoryID;
+
+ public:
+ TestMultipleKeyStringFactory(const UnicodeString ids[], int32_t count, const UnicodeString& factoryID)
+ : _status(U_ZERO_ERROR)
+ , _ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, count, _status)
+ , _factoryID(factoryID + ": ")
+ {
+ for (int i = 0; i < count; ++i) {
+ _ids.addElement(new UnicodeString(ids[i]), _status);
+ }
+ }
+
+ ~TestMultipleKeyStringFactory() {
+ }
+
+ UObject* create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& status) const {
+ if (U_FAILURE(status)) {
+ return NULL;
+ }
+ UnicodeString temp;
+ key.currentID(temp);
+ if (U_SUCCESS(_status)) {
+ if (_ids.contains(&temp)) {
+ return new UnicodeString(_factoryID + temp);
+ }
+ } else {
+ status = _status;
+ }
+ return NULL;
+ }
+
+ void updateVisibleIDs(Hashtable& result, UErrorCode& status) const {
+ if (U_SUCCESS(_status)) {
+ for (int32_t i = 0; i < _ids.size(); ++i) {
+ result.put(*(UnicodeString*)_ids[i], (void*)this, status);
+ }
+ }
+ }
+
+ UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const {
+ if (U_SUCCESS(_status) && _ids.contains((void*)&id)) {
+ char buffer[128];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = id.extract(buffer, sizeof(buffer), NULL, status);
+ if (U_SUCCESS(status)) {
+ if (len == sizeof(buffer)) {
+ --len;
+ }
+ buffer[len] = 0;
+ Locale loc = Locale::createFromName(buffer);
+ loc.getDisplayName(locale, result);
+ return result;
+ }
+ }
+ result.setToBogus(); // shouldn't happen
+ return result;
+ }
+
+ static UClassID getStaticClassID() {
+ return (UClassID)&fgClassID;
+ }
+
+ virtual UClassID getDynamicClassID() const {
+ return getStaticClassID();
+ }
+
+ private:
+ static const char fgClassID;
+};
+
+const char TestMultipleKeyStringFactory::fgClassID = '\0';
+
+void
+ICUServiceTest::testAPI_Two()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TestStringService service;
+ service.registerFactory(new AnonymousStringFactory(), status);
+
+ // anonymous factory will still handle the id
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ const UnicodeString en_US = "en_US";
+ UnicodeString* result = (UnicodeString*)service.get(en_US, status);
+ confirmEqual("21) locale", result, &en_US);
+ delete result;
+ }
+
+ // still normalizes id
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ const UnicodeString en_US_BAR = "en_US_BAR";
+ UnicodeString resultID;
+ UnicodeString* result = (UnicodeString*)service.get("EN_us_bar", &resultID, status);
+ confirmEqual("22) locale", &resultID, &en_US_BAR);
+ delete result;
+ }
+
+ // we can override for particular ids
+ UnicodeString* singleton0 = new UnicodeString("Zero");
+ service.registerInstance(singleton0, "en_US_BAR", status);
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* result = (UnicodeString*)service.get("en_US_BAR", status);
+ confirmEqual("23) override super", result, singleton0);
+ delete result;
+ }
+
+ // empty service should not recognize anything
+ service.reset();
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* result = (UnicodeString*)service.get("en_US", status);
+ confirmIdentical("24) empty", result, NULL);
+ }
+
+ // create a custom multiple key factory
+ {
+ UnicodeString xids[] = {
+ "en_US_VALLEY_GIRL",
+ "en_US_VALLEY_BOY",
+ "en_US_SURFER_GAL",
+ "en_US_SURFER_DUDE"
+ };
+ int32_t count = sizeof(xids)/sizeof(UnicodeString);
+
+ ICUServiceFactory* f = new TestMultipleKeyStringFactory(xids, count, "Later");
+ service.registerFactory(f, status);
+ }
+
+ // iterate over the visual ids returned by the multiple factory
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, 0, status);
+ service.getVisibleIDs(ids, status);
+ for (int i = 0; i < ids.size(); ++i) {
+ const UnicodeString* id = (const UnicodeString*)ids[i];
+ UnicodeString* result = (UnicodeString*)service.get(*id, status);
+ if (result) {
+ logln(" " + *id + " --> " + *result);
+ delete result;
+ } else {
+ errln("could not find " + *id);
+ }
+ }
+ // four visible ids
+ confirmIdentical("25) visible ids", ids.size(), 4);
+ }
+
+ // iterate over the display names
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector names(status);
+ service.getDisplayNames(names, status);
+ for (int i = 0; i < names.size(); ++i) {
+ const StringPair* pair = (const StringPair*)names[i];
+ logln(" " + pair->displayName + " --> " + pair->id);
+ }
+ confirmIdentical("26) display names", names.size(), 4);
+ }
+
+ // no valid display name
+ {
+ UnicodeString name;
+ service.getDisplayName("en_US_VALLEY_GEEK", name);
+ confirmBoolean("27) get display name", name.isBogus());
+ }
+
+ {
+ UnicodeString name;
+ service.getDisplayName("en_US_SURFER_DUDE", name, Locale::getEnglish());
+ confirmStringsEqual("28) get display name", name, "English (United States, SURFER_DUDE)");
+ }
+
+ // register another multiple factory
+ {
+ UnicodeString xids[] = {
+ "en_US_SURFER",
+ "en_US_SURFER_GAL",
+ "en_US_SILICON",
+ "en_US_SILICON_GEEK",
+ };
+ int32_t count = sizeof(xids)/sizeof(UnicodeString);
+
+ ICUServiceFactory* f = new TestMultipleKeyStringFactory(xids, count, "Rad dude");
+ service.registerFactory(f, status);
+ }
+
+ // this time, we have seven display names
+ // Rad dude's surfer gal 'replaces' Later's surfer gal
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector names(status);
+ service.getDisplayNames(names, Locale("es"), status);
+ for (int i = 0; i < names.size(); ++i) {
+ const StringPair* pair = (const StringPair*)names[i];
+ logln(" " + pair->displayName + " --> " + pair->id);
+ }
+ confirmIdentical("26) display names", names.size(), 7);
+ }
+
+ // we should get the display name corresponding to the actual id
+ // returned by the id we used.
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString actualID;
+ UnicodeString id = "en_us_surfer_gal";
+ UnicodeString* gal = (UnicodeString*)service.get(id, &actualID, status);
+ if (gal != NULL) {
+ UnicodeString displayName;
+ logln("actual id: " + actualID);
+ service.getDisplayName(actualID, displayName, Locale::getEnglish());
+ logln("found actual: " + *gal + " with display name: " + displayName);
+ confirmBoolean("30) found display name for actual", !displayName.isBogus());
+
+ service.getDisplayName(id, displayName, Locale::getEnglish());
+ logln("found actual: " + *gal + " with display name: " + displayName);
+ confirmBoolean("31) found display name for query", displayName.isBogus());
+
+ delete gal;
+ } else {
+ errln("30) service could not find entry for " + id);
+ }
+ }
+
+ // this should be handled by the 'dude' factory, since it overrides en_US_SURFER.
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString actualID;
+ UnicodeString id = "en_US_SURFER_BOZO";
+ UnicodeString* bozo = (UnicodeString*)service.get(id, &actualID, status);
+ if (bozo != NULL) {
+ UnicodeString displayName;
+ service.getDisplayName(actualID, displayName, Locale::getEnglish());
+ logln("found actual: " + *bozo + " with display name: " + displayName);
+ confirmBoolean("32) found display name for actual", !displayName.isBogus());
+
+ service.getDisplayName(id, displayName, Locale::getEnglish());
+ logln("found actual: " + *bozo + " with display name: " + displayName);
+ confirmBoolean("33) found display name for query", displayName.isBogus());
+
+ delete bozo;
+ } else {
+ errln("32) service could not find entry for " + id);
+ }
+ }
+
+ // certainly not default...
+ {
+ confirmBoolean("34) is default ", !service.isDefault());
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, 0, status);
+ service.getVisibleIDs(ids, status);
+ for (int i = 0; i < ids.size(); ++i) {
+ const UnicodeString* id = (const UnicodeString*)ids[i];
+ msgstr(*id + "? ", service.get(*id, status));
+ }
+
+ logstr("valleygirl? ", service.get("en_US_VALLEY_GIRL", status));
+ logstr("valleyboy? ", service.get("en_US_VALLEY_BOY", status));
+ logstr("valleydude? ", service.get("en_US_VALLEY_DUDE", status));
+ logstr("surfergirl? ", service.get("en_US_SURFER_GIRL", status));
+ }
+}
+
+
+class CalifornioLanguageFactory : public ICUResourceBundleFactory
+{
+ public:
+ static const char* californio; // = "en_US_CA";
+ static const char* valley; // = californio ## "_VALLEY";
+ static const char* surfer; // = californio ## "_SURFER";
+ static const char* geek; // = californio ## "_GEEK";
+ static Hashtable* supportedIDs; // = NULL;
+
+ static void cleanup(void) {
+ delete supportedIDs;
+ supportedIDs = NULL;
+ }
+
+ const Hashtable* getSupportedIDs(UErrorCode& status) const
+ {
+ if (supportedIDs == NULL) {
+ Hashtable* table = new Hashtable();
+ table->put(UnicodeString(californio), (void*)table, status);
+ table->put(UnicodeString(valley), (void*)table, status);
+ table->put(UnicodeString(surfer), (void*)table, status);
+ table->put(UnicodeString(geek), (void*)table, status);
+
+ // not necessarily atomic, but this is a test...
+ supportedIDs = table;
+ }
+ return supportedIDs;
+ }
+
+ UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const
+ {
+ UnicodeString prefix = "";
+ UnicodeString suffix = "";
+ UnicodeString ls = locale.getName();
+ if (LocaleUtility::isFallbackOf(californio, ls)) {
+ if (!ls.caseCompare(valley, 0)) {
+ prefix = "Like, you know, it's so totally ";
+ } else if (!ls.caseCompare(surfer, 0)) {
+ prefix = "Dude, it's ";
+ } else if (!ls.caseCompare(geek, 0)) {
+ prefix = "I'd estimate it is approximately ";
+ } else {
+ prefix = "Huh? Maybe ";
+ }
+ }
+ if (LocaleUtility::isFallbackOf(californio, id)) {
+ if (!id.caseCompare(valley, 0)) {
+ suffix = "like the Valley, you know? Let's go to the mall!";
+ } else if (!id.caseCompare(surfer, 0)) {
+ suffix = "time to hit those gnarly waves, Dude!!!";
+ } else if (!id.caseCompare(geek, 0)) {
+ suffix = "all systems go. T-Minus 9, 8, 7...";
+ } else {
+ suffix = "No Habla Englais";
+ }
+ } else {
+ suffix = ICUResourceBundleFactory::getDisplayName(id, locale, result);
+ }
+
+ result = prefix + suffix;
+ return result;
+ }
+};
+
+const char* CalifornioLanguageFactory::californio = "en_US_CA";
+const char* CalifornioLanguageFactory::valley = "en_US_CA_VALLEY";
+const char* CalifornioLanguageFactory::surfer = "en_US_CA_SURFER";
+const char* CalifornioLanguageFactory::geek = "en_US_CA_GEEK";
+Hashtable* CalifornioLanguageFactory::supportedIDs = NULL;
+
+void
+ICUServiceTest::testRBF()
+{
+ // resource bundle factory.
+ UErrorCode status = U_ZERO_ERROR;
+ TestStringService service;
+ service.registerFactory(new ICUResourceBundleFactory(), status);
+
+ // list all of the resources
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, 0, status);
+ service.getVisibleIDs(ids, status);
+ logln("all visible ids:");
+ for (int i = 0; i < ids.size(); ++i) {
+ const UnicodeString* id = (const UnicodeString*)ids[i];
+ logln(*id);
+ }
+ }
+
+ // get all the display names of these resources
+ // this should be fast since the display names were cached.
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector names(status);
+ service.getDisplayNames(names, Locale::getGermany(), status);
+ logln("service display names for de_DE");
+ for (int i = 0; i < names.size(); ++i) {
+ const StringPair* pair = (const StringPair*)names[i];
+ logln(" " + pair->displayName + " --> " + pair->id);
+ }
+ }
+
+ service.registerFactory(new CalifornioLanguageFactory(), status);
+
+ // get all the display names of these resources
+ {
+ logln("californio language factory:");
+ const char* idNames[] = {
+ CalifornioLanguageFactory::californio,
+ CalifornioLanguageFactory::valley,
+ CalifornioLanguageFactory::surfer,
+ CalifornioLanguageFactory::geek,
+ };
+ int32_t count = sizeof(idNames)/sizeof(idNames[0]);
+
+ for (int i = 0; i < count; ++i) {
+ logln(UnicodeString("\n --- ") + idNames[i] + " ---");
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector names(status);
+ service.getDisplayNames(names, idNames[i], status);
+ for (int i = 0; i < names.size(); ++i) {
+ const StringPair* pair = (const StringPair*)names[i];
+ logln(" " + pair->displayName + " --> " + pair->id);
+ }
+ }
+ }
+ }
+ CalifornioLanguageFactory::cleanup();
+}
+
+class SimpleListener : public ServiceListener {
+ ICUServiceTest* _test;
+ int32_t _n;
+ UnicodeString _name;
+
+ public:
+ SimpleListener(ICUServiceTest* test, const UnicodeString& name) : _test(test), _n(0), _name(name) {}
+
+ virtual void serviceChanged(const ICUService& service) const {
+ UnicodeString serviceName = "listener ";
+ serviceName.append(_name);
+ serviceName.append(" n++");
+ serviceName.append(" service changed: " );
+ service.getName(serviceName);
+ _test->logln(serviceName);
+ }
+};
+
+void
+ICUServiceTest::testNotification()
+{
+ SimpleListener one(this, "one");
+ SimpleListener two(this, "two");
+ {
+ UErrorCode status = U_ZERO_ERROR;
+
+ logln("simple registration notification");
+ TestStringService ls;
+ ls.addListener(&one, status);
+ ls.addListener(&two, status);
+
+ logln("registering foo... ");
+ ls.registerInstance(new UnicodeString("Foo"), "en_FOO", status);
+ logln("registering bar... ");
+ ls.registerInstance(new UnicodeString("Bar"), "en_BAR", status);
+ logln("getting foo...");
+ UnicodeString* result = (UnicodeString*)ls.get("en_FOO", status);
+ logln(*result);
+ delete result;
+
+ logln("removing listener 2...");
+ ls.removeListener(&two, status);
+ logln("registering baz...");
+ ls.registerInstance(new UnicodeString("Baz"), "en_BAZ", status);
+ logln("removing listener 1");
+ ls.removeListener(&one, status);
+ logln("registering burp...");
+ ls.registerInstance(new UnicodeString("Burp"), "en_BURP", status);
+
+ // should only get one notification even if register multiple times
+ logln("... trying multiple registration");
+ ls.addListener(&one, status);
+ ls.addListener(&one, status);
+ ls.addListener(&one, status);
+ ls.addListener(&two, status);
+ ls.registerInstance(new UnicodeString("Foo"), "en_FOO", status);
+ logln("... registered foo");
+ }
+#if 0
+ // same thread, so we can't callback within notification, unlike Java
+ ServiceListener l3 = new ServiceListener() {
+private int n;
+public void serviceChanged(ICUService s) {
+ logln("listener 3 report " + n++ + " service changed...");
+ if (s.get("en_BOINK") == null) { // don't recurse on ourselves!!!
+ logln("registering boink...");
+ s.registerInstance("boink", "en_BOINK");
+ }
+}
+ };
+ ls.addListener(l3);
+ logln("registering boo...");
+ ls.registerInstance("Boo", "en_BOO");
+#endif
+
+ logln("...done");
+}
+
+class TestStringLocaleService : public ICULocaleService {
+ public:
+ virtual UObject* cloneInstance(UObject* instance) const {
+ return instance ? new UnicodeString(*(UnicodeString*)instance) : NULL;
+ }
+};
+
+void ICUServiceTest::testLocale() {
+ UErrorCode status = U_ZERO_ERROR;
+ TestStringLocaleService service;
+
+ UnicodeString* root = new UnicodeString("root");
+ UnicodeString* german = new UnicodeString("german");
+ UnicodeString* germany = new UnicodeString("german_Germany");
+ UnicodeString* japanese = new UnicodeString("japanese");
+ UnicodeString* japan = new UnicodeString("japanese_Japan");
+
+ service.registerInstance(root, "", status);
+ service.registerInstance(german, "de", status);
+ service.registerInstance(germany, Locale::getGermany(), status);
+ service.registerInstance(japanese, (UnicodeString)"ja", TRUE, status);
+ service.registerInstance(japan, Locale::getJapan(), status);
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", status);
+ confirmEqual("test de_US", german, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", LocaleKey::KIND_ANY, status);
+ confirmEqual("test de_US 2", german, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", 1234, status);
+ confirmEqual("test de_US 3", german, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Locale actualReturn;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", &actualReturn, status);
+ confirmEqual("test de_US 5", german, target);
+ confirmEqual("test de_US 6", &actualReturn, &Locale::getGerman());
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Locale actualReturn;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", LocaleKey::KIND_ANY, &actualReturn, status);
+ confirmEqual("test de_US 7", &actualReturn, &Locale::getGerman());
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ Locale actualReturn;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", 1234, &actualReturn, status);
+ confirmEqual("test de_US 8", german, target);
+ confirmEqual("test de_US 9", &actualReturn, &Locale::getGerman());
+ delete target;
+ }
+
+ UnicodeString* one = new UnicodeString("one/de_US");
+ UnicodeString* two = new UnicodeString("two/de_US");
+
+ service.registerInstance(one, Locale("de_US"), 1, status);
+ service.registerInstance(two, Locale("de_US"), 2, status);
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", 1, status);
+ confirmEqual("test de_US kind 1", one, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", 2, status);
+ confirmEqual("test de_US kind 2", two, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("de_US", status);
+ confirmEqual("test de_US kind 3", german, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString english = "en";
+ Locale localeResult;
+ UnicodeString result;
+ LocaleKey* lkey = LocaleKey::createWithCanonicalFallback(&english, NULL, 1234, status);
+ logln("lkey prefix: " + lkey->prefix(result));
+ result.remove();
+ logln("lkey descriptor: " + lkey->currentDescriptor(result));
+ result.remove();
+ logln(UnicodeString("lkey current locale: ") + lkey->currentLocale(localeResult).getName());
+ result.remove();
+
+ lkey->fallback();
+ logln("lkey descriptor 2: " + lkey->currentDescriptor(result));
+ result.remove();
+
+ lkey->fallback();
+ logln("lkey descriptor 3: " + lkey->currentDescriptor(result));
+ result.remove();
+ delete lkey; // tentatively weiv
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("za_PPP", status);
+ confirmEqual("test zappp", root, target);
+ delete target;
+ }
+
+ Locale loc = Locale::getDefault();
+ Locale::setDefault(Locale::getJapanese(), status);
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("za_PPP", status);
+ confirmEqual("test with ja locale", japanese, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, 0, status);
+ service.getVisibleIDs(ids, status);
+ logln("all visible ids:");
+ for (int i = 0; i < ids.size(); ++i) {
+ const UnicodeString* id = (const UnicodeString*)ids[i];
+ logln(*id);
+ }
+ }
+
+ Locale::setDefault(loc, status);
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UVector ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, 0, status);
+ service.getVisibleIDs(ids, status);
+ logln("all visible ids:");
+ for (int i = 0; i < ids.size(); ++i) {
+ const UnicodeString* id = (const UnicodeString*)ids[i];
+ logln(*id);
+ }
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* target = (UnicodeString*)service.get("za_PPP", status);
+ confirmEqual("test with en locale", root, target);
+ delete target;
+ }
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ StringEnumeration* locales = service.getAvailableLocales();
+ if (locales) {
+ confirmIdentical("test available locales", locales->count(status), 6);
+ logln("locales: ");
+ {
+ const char* p;
+ while ((p = locales->next(NULL, status))) {
+ logln(p);
+ }
+ }
+ logln(" ");
+ delete locales;
+ } else {
+ errln("could not create available locales");
+ }
+ }
+}
+
+class WrapFactory : public ICUServiceFactory {
+ public:
+ static const UnicodeString& getGreetingID() {
+ if (greetingID == NULL) {
+ greetingID = new UnicodeString("greeting");
+ }
+ return *greetingID;
+ }
+
+ static void cleanup() {
+ delete greetingID;
+ greetingID = NULL;
+ }
+
+ UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const {
+ if (U_SUCCESS(status)) {
+ UnicodeString temp;
+ if (key.currentID(temp).compare(getGreetingID()) == 0) {
+ UnicodeString* previous = (UnicodeString*)service->getKey((ICUServiceKey&)key, NULL, this, status);
+ if (previous) {
+ previous->insert(0, "A different greeting: \"");
+ previous->append("\"");
+ return previous;
+ }
+ }
+ }
+ return NULL;
+ }
+
+ void updateVisibleIDs(Hashtable& result, UErrorCode& status) const {
+ if (U_SUCCESS(status)) {
+ result.put("greeting", (void*)this, status);
+ }
+ }
+
+ UnicodeString& getDisplayName(const UnicodeString& id, const Locale& /* locale */, UnicodeString& result) const {
+ result.append("wrap '");
+ result.append(id);
+ result.append("'");
+ return result;
+ }
+
+ /**
+ * UObject boilerplate.
+ */
+ static UClassID getStaticClassID() {
+ return (UClassID)&fgClassID;
+ }
+
+ virtual UClassID getDynamicClassID() const {
+ return getStaticClassID();
+ }
+
+ private:
+ static const char fgClassID;
+ static UnicodeString* greetingID;
+};
+
+UnicodeString* WrapFactory::greetingID = NULL;
+const char WrapFactory::fgClassID = '\0';
+
+void
+ICUServiceTest::testWrapFactory()
+{
+ UnicodeString* greeting = new UnicodeString("Hello There");
+ UnicodeString greetingID = "greeting";
+ UErrorCode status = U_ZERO_ERROR;
+ TestStringService service;
+ service.registerInstance(greeting, greetingID, status);
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* result = (UnicodeString*)service.get(greetingID, status);
+ if (result) {
+ logln("test one: " + *result);
+ delete result;
+ }
+ }
+
+ service.registerFactory(new WrapFactory(), status);
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* result = (UnicodeString*)service.get(greetingID, status);
+ UnicodeString target = "A different greeting: \"Hello There\"";
+ confirmEqual("wrap test: ", result, &target);
+ delete result;
+ }
+
+ WrapFactory::cleanup();
+}
+
+ // misc coverage tests
+void ICUServiceTest::testCoverage()
+{
+ // ICUServiceKey
+ {
+ UnicodeString temp;
+ ICUServiceKey key("foobar");
+ logln("ID: " + key.getID());
+ logln("canonicalID: " + key.canonicalID(temp));
+ logln("currentID: " + key.currentID(temp.remove()));
+ logln("has fallback: " + UnicodeString(key.fallback() ? "true" : "false"));
+
+ if (key.getDynamicClassID() != ICUServiceKey::getStaticClassID()) {
+ errln("service key rtt failed.");
+ }
+ }
+
+ // SimpleFactory
+ {
+ UErrorCode status = U_ZERO_ERROR;
+
+ UnicodeString* obj = new UnicodeString("An Object");
+ SimpleFactory* sf = new SimpleFactory(obj, "object");
+
+ UnicodeString temp;
+ logln(sf->getDisplayName("object", Locale::getDefault(), temp));
+
+ if (sf->getDynamicClassID() != SimpleFactory::getStaticClassID()) {
+ errln("simple factory rtti failed.");
+ }
+
+ // ICUService
+ {
+ TestStringService service;
+ service.registerFactory(sf, status);
+
+ {
+ UnicodeString* result = (UnicodeString*)service.get("object", status);
+ if (result) {
+ logln("object is: " + *result);
+ delete result;
+ } else {
+ errln("could not get object");
+ }
+ }
+ }
+ }
+
+ // ICUServiceKey
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString* howdy = new UnicodeString("Howdy");
+
+ TestStringSimpleKeyService service;
+ service.registerInstance(howdy, "Greetings", status);
+ {
+ UnicodeString* result = (UnicodeString*)service.get("Greetings", status);
+ if (result) {
+ logln("object is: " + *result);
+ delete result;
+ } else {
+ errln("could not get object");
+ }
+ }
+
+ UVector ids(uhash_deleteUnicodeString, uhash_compareUnicodeString, status);
+ // yuck, this is awkward to use. All because we pass null in an overload.
+ // TODO: change this.
+ UnicodeString str("Greet");
+ service.getVisibleIDs(ids, &str, status);
+ confirmIdentical("no fallback of greet", ids.size(), 0);
+ }
+
+ // ICULocaleService
+
+ // LocaleKey
+ {
+ UnicodeString primary("en_US");
+ UnicodeString fallback("ja_JP");
+ UErrorCode status = U_ZERO_ERROR;
+ LocaleKey* key = LocaleKey::createWithCanonicalFallback(&primary, &fallback, status);
+
+ if (key->getDynamicClassID() != LocaleKey::getStaticClassID()) {
+ errln("localekey rtti error");
+ }
+
+ if (!key->isFallbackOf("en_US_FOOBAR")) {
+ errln("localekey should be fallback for en_US_FOOBAR");
+ }
+ if (!key->isFallbackOf("en_US")) {
+ errln("localekey should be fallback for en_US");
+ }
+ if (key->isFallbackOf("en")) {
+ errln("localekey should not be fallback for en");
+ }
+
+ do {
+ Locale loc;
+ logln(UnicodeString("current locale: ") + key->currentLocale(loc).getName());
+ logln(UnicodeString("canonical locale: ") + key->canonicalLocale(loc).getName());
+ logln(UnicodeString("is fallback of en: ") + (key->isFallbackOf("en") ? "true" : " false"));
+ } while (key->fallback());
+ delete key;
+
+ // LocaleKeyFactory
+ key = LocaleKey::createWithCanonicalFallback(&primary, &fallback, status);
+
+ UnicodeString result;
+ LKFSubclass lkf(TRUE); // empty
+ Hashtable table;
+
+ UObject *obj = lkf.create(*key, NULL, status);
+ logln("obj: " + UnicodeString(obj ? "obj" : "null"));
+ logln(lkf.getDisplayName("en_US", Locale::getDefault(), result));
+ lkf.updateVisibleIDs(table, status);
+ delete obj;
+ if (table.count() != 1) {
+ errln("visible IDs does not contain en_US");
+ }
+
+ LKFSubclass invisibleLKF(FALSE);
+ obj = lkf.create(*key, NULL, status);
+ logln("obj: " + UnicodeString(obj ? "obj" : "null"));
+ logln(invisibleLKF.getDisplayName("en_US", Locale::getDefault(), result.remove()));
+ invisibleLKF.updateVisibleIDs(table, status);
+ if (table.count() != 0) {
+ errln("visible IDs contains en_US");
+ }
+ delete obj;
+ delete key;
+
+ key = LocaleKey::createWithCanonicalFallback(&primary, &fallback, 123, status);
+ if (U_SUCCESS(status)) {
+ UnicodeString str;
+ key->currentDescriptor(str);
+ key->parsePrefix(str);
+ if (str != "123") {
+ errln("did not get expected prefix");
+ }
+ delete key;
+ }
+
+ // coverage, getSupportedIDs is either overridden or the calling method is
+ LKFSubclass0 lkFactory;
+ Hashtable table0;
+ lkFactory.updateVisibleIDs(table0, status);
+ if (table0.count() != 0) {
+ errln("LKF returned non-empty hashtable");
+ }
+
+
+ // ResourceBundleFactory
+ key = LocaleKey::createWithCanonicalFallback(&primary, &fallback, status);
+ ICUResourceBundleFactory rbf;
+ UObject* icurb = rbf.create(*key, NULL, status);
+ if (icurb != NULL) {
+ logln("got resource bundle for key");
+ delete icurb;
+ }
+ delete key;
+ }
+
+ #if 0
+ // ICUNotifier
+ ICUNotifier nf = new ICUNSubclass();
+ try {
+ nf.addListener(null);
+ errln("added null listener");
+ }
+ catch (NullPointerException e) {
+ logln(e.getMessage());
+ }
+ catch (Exception e) {
+ errln("got wrong exception");
+ }
+
+ try {
+ nf.addListener(new WrongListener());
+ errln("added wrong listener");
+ }
+ catch (InternalError e) {
+ logln(e.getMessage());
+ }
+ catch (Exception e) {
+ errln("got wrong exception");
+ }
+
+ try {
+ nf.removeListener(null);
+ errln("removed null listener");
+ }
+ catch (NullPointerException e) {
+ logln(e.getMessage());
+ }
+ catch (Exception e) {
+ errln("got wrong exception");
+ }
+
+ nf.removeListener(new MyListener());
+ nf.notifyChanged();
+ nf.addListener(new MyListener());
+ nf.removeListener(new MyListener());
+#endif
+}
+
+
+/* !UCONFIG_NO_SERVICE */
+#endif
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.h b/Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.h
new file mode 100644
index 00000000000..21d1f6a4836
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/icusvtst.h
@@ -0,0 +1,62 @@
+/**
+ *******************************************************************************
+ * Copyright (C) 2001-2003, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ *
+ *******************************************************************************
+ */
+
+#ifndef ICUSVTST_H
+#define ICUSVTST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_SERVICE
+
+#include "intltest.h"
+
+class Integer;
+
+class ICUServiceTest : public IntlTest
+{
+ public:
+ ICUServiceTest();
+ virtual ~ICUServiceTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+
+ void testAPI_One(void);
+ void testAPI_Two(void);
+ void testRBF(void);
+ void testNotification(void);
+ void testLocale(void);
+ void testWrapFactory(void);
+ void testCoverage(void);
+
+ private:
+ UnicodeString& lrmsg(UnicodeString& result, const UnicodeString& message, const UObject* lhs, const UObject* rhs) const;
+ void confirmBoolean(const UnicodeString& message, UBool val);
+#if 0
+ void confirmEqual(const UnicodeString& message, const UObject* lhs, const UObject* rhs);
+#else
+ void confirmEqual(const UnicodeString& message, const Integer* lhs, const Integer* rhs);
+ void confirmEqual(const UnicodeString& message, const UnicodeString* lhs, const UnicodeString* rhs);
+ void confirmEqual(const UnicodeString& message, const Locale* lhs, const Locale* rhs);
+#endif
+ void confirmStringsEqual(const UnicodeString& message, const UnicodeString& lhs, const UnicodeString& rhs);
+ void confirmIdentical(const UnicodeString& message, const UObject* lhs, const UObject* rhs);
+ void confirmIdentical(const UnicodeString& message, int32_t lhs, int32_t rhs);
+
+ void msgstr(const UnicodeString& message, UObject* obj, UBool err = TRUE);
+ void logstr(const UnicodeString& message, UObject* obj) {
+ msgstr(message, obj, FALSE);
+ }
+};
+
+
+/* UCONFIG_NO_SERVICE */
+#endif
+
+/* ICUSVTST_H */
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.cpp
new file mode 100644
index 00000000000..cf199438467
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.cpp
@@ -0,0 +1,352 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2005-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ *
+ * created on: 2005jun15
+ * created by: Raymond Yang
+ */
+
+#if !UCONFIG_NO_IDNA
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/utypes.h"
+#include "unicode/ucnv.h"
+#include "unicode/ustring.h"
+#include "unicode/uidna.h"
+
+#include "idnaconf.h"
+
+static const UChar C_TAG[] = {0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0}; // =====
+static const UChar C_NAMEZONE[] = {0x6E, 0x61, 0x6D, 0x65, 0x7A, 0x6F, 0x6E, 0x65, 0}; // namezone
+static const UChar C_NAMEBASE[] = {0x6E, 0x61, 0x6D, 0x65, 0x62, 0x61, 0x73, 0x65, 0}; // namebase
+static const UChar C_NAMEUTF8[] = {0x6E, 0x61, 0x6D, 0x65, 0x75, 0x74, 0x66, 0x38, 0}; // nameutf8
+
+static const UChar C_TYPE[] = {0x74, 0x79, 0x70, 0x65, 0}; // type
+static const UChar C_TOASCII[] = {0x74, 0x6F, 0x61, 0x73, 0x63, 0x69, 0x69, 0}; // toascii
+static const UChar C_TOUNICODE[] = {0x74, 0x6F, 0x75, 0x6E, 0x69, 0x63, 0x6F, 0x64, 0x65, 0}; // tounicode
+
+static const UChar C_PASSFAIL[] = {0x70, 0x61, 0x73, 0x73, 0x66, 0x61, 0x69, 0x6C, 0}; // passfail
+static const UChar C_PASS[] = {0x70, 0x61, 0x73, 0x73, 0}; // pass
+static const UChar C_FAIL[] = {0x66, 0x61, 0x69, 0x6C, 0}; // fail
+
+static const UChar C_DESC[] = {0x64, 0x65, 0x73, 0x63, 0}; // desc
+static const UChar C_USESTD3ASCIIRULES[] = {0x55, 0x73, 0x65, 0x53, 0x54, 0x44,
+ 0x33, 0x41, 0x53, 0x43, 0x49, 0x49, 0x52, 0x75, 0x6C, 0x65, 0x73, 0}; // UseSTD3ASCIIRules
+
+IdnaConfTest::IdnaConfTest(){
+ base = NULL;
+ len = 0;
+ curOffset = 0;
+
+ type = option = passfail = -1;
+ namebase.setToBogus();
+ namezone.setToBogus();
+}
+IdnaConfTest::~IdnaConfTest(){
+ delete [] base;
+}
+
+#if !UCONFIG_NO_IDNA
+/* this function is modified from RBBITest::ReadAndConvertFile()
+ *
+ */
+UBool IdnaConfTest::ReadAndConvertFile(){
+
+ char * source = NULL;
+ size_t source_len;
+
+ // read the test data file to memory
+ FILE* f = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+
+ const char *path = IntlTest::getSourceTestData(status);
+ if (U_FAILURE(status)) {
+ errln("%s", u_errorName(status));
+ return FALSE;
+ }
+
+ const char* name = "idna_conf.txt"; // test data file
+ int t = strlen(path) + strlen(name) + 1;
+ char* absolute_name = new char[t];
+ strcpy(absolute_name, path);
+ strcat(absolute_name, name);
+ f = fopen(absolute_name, "rb");
+ delete [] absolute_name;
+
+ if (f == NULL){
+ errln("fopen error on %s", name);
+ return FALSE;
+ }
+
+ fseek( f, 0, SEEK_END);
+ if ((source_len = ftell(f)) <= 0){
+ errln("Error reading test data file.");
+ fclose(f);
+ return FALSE;
+ }
+
+ source = new char[source_len];
+ fseek(f, 0, SEEK_SET);
+ if (fread(source, 1, source_len, f) != source_len) {
+ errln("Error reading test data file.");
+ delete [] source;
+ fclose(f);
+ return FALSE;
+ }
+ fclose(f);
+
+ // convert the UTF-8 encoded stream to UTF-16 stream
+ UConverter* conv = ucnv_open("utf-8", &status);
+ int dest_len = ucnv_toUChars(conv,
+ NULL, // dest,
+ 0, // destCapacity,
+ source,
+ source_len,
+ &status);
+ if (status == U_BUFFER_OVERFLOW_ERROR) {
+ // Buffer Overflow is expected from the preflight operation.
+ status = U_ZERO_ERROR;
+ UChar * dest = NULL;
+ dest = new UChar[ dest_len + 1];
+ ucnv_toUChars(conv, dest, dest_len + 1, source, source_len, &status);
+ // Do not know the "if possible" behavior of ucnv_toUChars()
+ // Do it by ourself.
+ dest[dest_len] = 0;
+ len = dest_len;
+ base = dest;
+ delete [] source;
+ ucnv_close(conv);
+ return TRUE; // The buffer will owned by caller.
+ }
+ errln("UConverter error: %s", u_errorName(status));
+ delete [] source;
+ ucnv_close(conv);
+ return FALSE;
+}
+
+int IdnaConfTest::isNewlineMark(){
+ static const UChar LF = 0x0a;
+ static const UChar CR = 0x0d;
+ UChar c = base[curOffset];
+ // CR LF
+ if ( c == CR && curOffset + 1 < len && base[curOffset + 1] == LF){
+ return 2;
+ }
+
+ // CR or LF
+ if ( c == CR || c == LF) {
+ return 1;
+ }
+
+ return 0;
+}
+
+/* Read a logical line.
+ *
+ * All lines ending in a backslash (\) and immediately followed by a newline
+ * character are joined with the next line in the source file forming logical
+ * lines from the physical lines.
+ *
+ */
+UBool IdnaConfTest::ReadOneLine(UnicodeString& buf){
+ if ( !(curOffset < len) ) return FALSE; // stream end
+
+ static const UChar BACKSLASH = 0x5c;
+ buf.remove();
+ int t = 0;
+ while (curOffset < len){
+ if ((t = isNewlineMark())) { // end of line
+ curOffset += t;
+ break;
+ }
+ UChar c = base[curOffset];
+ if (c == BACKSLASH && curOffset < len -1){ // escaped new line mark
+ if ((t = isNewlineMark())){
+ curOffset += 1 + t; // BACKSLAH and NewlineMark
+ continue;
+ }
+ };
+ buf.append(c);
+ curOffset++;
+ }
+ return TRUE;
+}
+
+//
+//===============================================================
+//
+
+/* Explain <xxxxx> tag to a native value
+ *
+ * Since <xxxxx> is always larger than the native value,
+ * the operation will replace the tag directly in the buffer,
+ * and, of course, will shift tail elements.
+ */
+void IdnaConfTest::ExplainCodePointTag(UnicodeString& buf){
+ buf.append((UChar)0); // add a terminal NULL
+ UChar* bufBase = buf.getBuffer(buf.length());
+ UChar* p = bufBase;
+ while (*p != 0){
+ if ( *p != 0x3C){ // <
+ *bufBase++ = *p++;
+ } else {
+ p++; // skip <
+ UChar32 cp = 0;
+ for ( ;*p != 0x3E; p++){ // >
+ if (0x30 <= *p && *p <= 0x39){ // 0-9
+ cp = (cp * 16) + (*p - 0x30);
+ } else if (0x61 <= *p && *p <= 0x66){ // a-f
+ cp = (cp * 16) + (*p - 0x61) + 10;
+ } else if (0x41 <= *p && *p <= 0x46) {// A-F
+ cp = (cp * 16) + (*p - 0x41) + 10;
+ }
+ // no else. hope everything is good.
+ }
+ p++; // skip >
+ if (U_IS_BMP(cp)){
+ *bufBase++ = cp;
+ } else {
+ *bufBase++ = U16_LEAD(cp);
+ *bufBase++ = U16_TRAIL(cp);
+ }
+ }
+ }
+ *bufBase = 0; // close our buffer
+ buf.releaseBuffer();
+}
+
+void IdnaConfTest::Call(){
+ if (type == -1 || option == -1 || passfail == -1 || namebase.isBogus() || namezone.isBogus()){
+ errln("Incomplete record");
+ } else {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar result[200] = {0,}; // simple life
+ const UChar *p = namebase.getTerminatedBuffer();
+ const int p_len = namebase.length();
+
+ if (type == 0 && option == 0){
+ uidna_IDNToASCII(p, p_len, result, 200, UIDNA_USE_STD3_RULES, NULL, &status);
+ } else if (type == 0 && option == 1){
+ uidna_IDNToASCII(p, p_len, result, 200, UIDNA_ALLOW_UNASSIGNED, NULL, &status);
+ } else if (type == 1 && option == 0){
+ uidna_IDNToUnicode(p, p_len, result, 200, UIDNA_USE_STD3_RULES, NULL, &status);
+ } else if (type == 1 && option == 1){
+ uidna_IDNToUnicode(p, p_len, result, 200, UIDNA_ALLOW_UNASSIGNED, NULL, &status);
+ }
+ if (passfail == 0){
+ if (U_FAILURE(status)){
+ id.append(" should pass, but failed.");
+ errln(id);
+ } else{
+ if (namezone.compare(result, -1) == 0){
+ // expected
+ logln(UnicodeString("namebase: ") + prettify(namebase) + UnicodeString(" result: ") + prettify(result));
+ } else {
+ id.append(" no error, but result is not as expected.");
+ errln(id);
+ }
+ }
+ } else if (passfail == 1){
+ if (U_FAILURE(status)){
+ // expected
+ // TODO: Uncomment this when U_IDNA_ZERO_LENGTH_LABEL_ERROR is added to u_errorName
+ //logln("Got the expected error: " + UnicodeString(u_errorName(status)));
+ } else{
+ if (namebase.compare(result, -1) == 0){
+ // garbage in -> garbage out
+ logln(UnicodeString("ICU will not recognize malformed ACE-Prefixes or incorrect ACE-Prefixes. ") + UnicodeString("namebase: ") + prettify(namebase) + UnicodeString(" result: ") + prettify(result));
+ } else {
+ id.append(" should fail, but not failed. ");
+ id.append(u_errorName(status));
+ errln(id);
+ }
+ }
+ }
+ }
+ type = option = passfail = -1;
+ namebase.setToBogus();
+ namezone.setToBogus();
+ id.remove();
+ return;
+}
+
+void IdnaConfTest::Test(void){
+ if (!ReadAndConvertFile())return;
+
+ UnicodeString s;
+ UnicodeString key;
+ UnicodeString value;
+
+ // skip everything before the first "=====" and "=====" itself
+ do {
+ if (!ReadOneLine(s)) {
+ errln("End of file prematurely found");
+ break;
+ }
+ }
+ while (s.compare(C_TAG, -1) != 0); //"====="
+
+ while(ReadOneLine(s)){
+ s.trim();
+ key.remove();
+ value.remove();
+ if (s.compare(C_TAG, -1) == 0){ //"====="
+ Call();
+ } else {
+ // explain key:value
+ int p = s.indexOf((UChar)0x3A); // :
+ key.setTo(s,0,p).trim();
+ value.setTo(s,p+1).trim();
+ if (key.compare(C_TYPE, -1) == 0){
+ if (value.compare(C_TOASCII, -1) == 0) {
+ type = 0;
+ } else if (value.compare(C_TOUNICODE, -1) == 0){
+ type = 1;
+ }
+ } else if (key.compare(C_PASSFAIL, -1) == 0){
+ if (value.compare(C_PASS, -1) == 0){
+ passfail = 0;
+ } else if (value.compare(C_FAIL, -1) == 0){
+ passfail = 1;
+ }
+ } else if (key.compare(C_DESC, -1) == 0){
+ if (value.indexOf(C_USESTD3ASCIIRULES, u_strlen(C_USESTD3ASCIIRULES), 0) == -1){
+ option = 1; // not found
+ } else {
+ option = 0;
+ }
+ id.setTo(value, 0, value.indexOf((UChar)0x20)); // space
+ } else if (key.compare(C_NAMEZONE, -1) == 0){
+ ExplainCodePointTag(value);
+ namezone.setTo(value);
+ } else if (key.compare(C_NAMEBASE, -1) == 0){
+ ExplainCodePointTag(value);
+ namebase.setTo(value);
+ }
+ // just skip other lines
+ }
+ }
+
+ Call(); // for last record
+}
+#else
+void IdnaConfTest::Test(void)
+{
+ // test nothing...
+}
+#endif
+
+void IdnaConfTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/){
+ switch (index) {
+ TESTCASE(0,Test);
+ default: name = ""; break;
+ }
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.h b/Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.h
new file mode 100644
index 00000000000..35e9063ab87
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/idnaconf.h
@@ -0,0 +1,49 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2005, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ *
+ * created on: 2005jun15
+ * created by: Raymond Yang
+ */
+
+#ifndef IDNA_CONF_TEST_H
+#define IDNA_CONF_TEST_H
+
+#include "intltest.h"
+#include "unicode/ustring.h"
+
+
+class IdnaConfTest: public IntlTest {
+public:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ IdnaConfTest();
+ virtual ~IdnaConfTest();
+private:
+ void Test(void);
+
+ // for test file handling
+ UChar* base;
+ int len ;
+ int curOffset;
+
+ UBool ReadAndConvertFile();
+ int isNewlineMark();
+ UBool ReadOneLine(UnicodeString&);
+
+ // for parsing one test record
+ UnicodeString id; // for debug & error output
+ UnicodeString namebase;
+ UnicodeString namezone;
+ int type; // 0 toascii, 1 tounicode
+ int option; // 0 UseSTD3ASCIIRules, 1 ALLOW_UNASSIGNED
+ int passfail; // 0 pass, 1 fail
+
+ void ExplainCodePointTag(UnicodeString& buf);
+ void Call();
+};
+
+#endif /*IDNA_CONF_TEST_H*/
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/idnaref.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/idnaref.cpp
new file mode 100644
index 00000000000..eabe1f56d3a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/idnaref.cpp
@@ -0,0 +1,1048 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: idnaref.cpp
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003feb1
+ * created by: Ram Viswanadha
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION
+#include "idnaref.h"
+#include "punyref.h"
+#include "ustr_imp.h"
+#include "cmemory.h"
+#include "sprpimpl.h"
+#include "nptrans.h"
+#include "testidna.h"
+#include "punycode.h"
+#include "unicode/ustring.h"
+
+/* it is official IDNA ACE Prefix is "xn--" */
+static const UChar ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ;
+#define ACE_PREFIX_LENGTH 4
+
+#define MAX_LABEL_LENGTH 63
+#define HYPHEN 0x002D
+/* The Max length of the labels should not be more than 64 */
+#define MAX_LABEL_BUFFER_SIZE 100
+#define MAX_IDN_BUFFER_SIZE 300
+
+#define CAPITAL_A 0x0041
+#define CAPITAL_Z 0x005A
+#define LOWER_CASE_DELTA 0x0020
+#define FULL_STOP 0x002E
+
+
+inline static UBool
+startsWithPrefix(const UChar* src , int32_t srcLength){
+ UBool startsWithPrefix = TRUE;
+
+ if(srcLength < ACE_PREFIX_LENGTH){
+ return FALSE;
+ }
+
+ for(int8_t i=0; i< ACE_PREFIX_LENGTH; i++){
+ if(u_tolower(src[i]) != ACE_PREFIX[i]){
+ startsWithPrefix = FALSE;
+ }
+ }
+ return startsWithPrefix;
+}
+
+inline static UChar
+toASCIILower(UChar ch){
+ if(CAPITAL_A <= ch && ch <= CAPITAL_Z){
+ return ch + LOWER_CASE_DELTA;
+ }
+ return ch;
+}
+
+inline static int32_t
+compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len,
+ const UChar* s2, int32_t s2Len){
+ if(s1Len != s2Len){
+ return (s1Len > s2Len) ? s1Len : s2Len;
+ }
+ UChar c1,c2;
+ int32_t rc;
+
+ for(int32_t i =0;/* no condition */;i++) {
+ /* If we reach the ends of both strings then they match */
+ if(i == s1Len) {
+ return 0;
+ }
+
+ c1 = s1[i];
+ c2 = s2[i];
+
+ /* Case-insensitive comparison */
+ if(c1!=c2) {
+ rc=(int32_t)toASCIILower(c1)-(int32_t)toASCIILower(c2);
+ if(rc!=0) {
+ return rc;
+ }
+ }
+ }
+
+}
+
+static UErrorCode getError(enum punycode_status status){
+ switch(status){
+ case punycode_success:
+ return U_ZERO_ERROR;
+ case punycode_bad_input: /* Input is invalid. */
+ return U_INVALID_CHAR_FOUND;
+ case punycode_big_output: /* Output would exceed the space provided. */
+ return U_BUFFER_OVERFLOW_ERROR;
+ case punycode_overflow : /* Input requires wider integers to process. */
+ return U_INDEX_OUTOFBOUNDS_ERROR;
+ default:
+ return U_INTERNAL_PROGRAM_ERROR;
+ }
+}
+
+static inline int32_t convertASCIIToUChars(const char* src,UChar* dest, int32_t length){
+ int i;
+ for(i=0;i<length;i++){
+ dest[i] = src[i];
+ }
+ return i;
+}
+static inline int32_t convertUCharsToASCII(const UChar* src,char* dest, int32_t length){
+ int i;
+ for(i=0;i<length;i++){
+ dest[i] = (char)src[i];
+ }
+ return i;
+}
+// wrapper around the reference Punycode implementation
+static int32_t convertToPuny(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ UErrorCode& status){
+ uint32_t b1Stack[MAX_LABEL_BUFFER_SIZE];
+ int32_t b1Len = 0, b1Capacity = MAX_LABEL_BUFFER_SIZE;
+ uint32_t* b1 = b1Stack;
+ char b2Stack[MAX_LABEL_BUFFER_SIZE];
+ char* b2 = b2Stack;
+ int32_t b2Len =MAX_LABEL_BUFFER_SIZE ;
+ punycode_status error;
+ unsigned char* caseFlags = NULL;
+
+ u_strToUTF32((UChar32*)b1,b1Capacity,&b1Len,src,srcLength,&status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (uint32_t*) uprv_malloc(b1Len * sizeof(uint32_t));
+ if(b1==NULL){
+ status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ status = U_ZERO_ERROR; // reset error
+
+ u_strToUTF32((UChar32*)b1,b1Len,&b1Len,src,srcLength,&status);
+ }
+ if(U_FAILURE(status)){
+ goto CLEANUP;
+ }
+
+ //caseFlags = (unsigned char*) uprv_malloc(b1Len *sizeof(unsigned char));
+
+ error = punycode_encode(b1Len,b1,caseFlags, (uint32_t*)&b2Len, b2);
+ status = getError(error);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ /* we do not have enough room so grow the buffer*/
+ b2 = (char*) uprv_malloc( b2Len * sizeof(char));
+ if(b2==NULL){
+ status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ status = U_ZERO_ERROR; // reset error
+
+ punycode_status error = punycode_encode(b1Len,b1,caseFlags, (uint32_t*)&b2Len, b2);
+ status = getError(error);
+ }
+ if(U_FAILURE(status)){
+ goto CLEANUP;
+ }
+
+ if(b2Len < destCapacity){
+ convertASCIIToUChars(b2,dest,b2Len);
+ }else{
+ status =U_BUFFER_OVERFLOW_ERROR;
+ }
+
+CLEANUP:
+ if(b1Stack != b1){
+ uprv_free(b1);
+ }
+ if(b2Stack != b2){
+ uprv_free(b2);
+ }
+ uprv_free(caseFlags);
+
+ return b2Len;
+}
+
+static int32_t convertFromPuny( const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ UErrorCode& status){
+ char b1Stack[MAX_LABEL_BUFFER_SIZE];
+ char* b1 = b1Stack;
+ int32_t destLen =0;
+
+ convertUCharsToASCII(src, b1,srcLength);
+
+ uint32_t b2Stack[MAX_LABEL_BUFFER_SIZE];
+ uint32_t* b2 = b2Stack;
+ int32_t b2Len =MAX_LABEL_BUFFER_SIZE;
+ unsigned char* caseFlags = NULL; //(unsigned char*) uprv_malloc(srcLength * sizeof(unsigned char*));
+ punycode_status error = punycode_decode(srcLength,b1,(uint32_t*)&b2Len,b2,caseFlags);
+ status = getError(error);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ b2 = (uint32_t*) uprv_malloc(b2Len * sizeof(uint32_t));
+ if(b2 == NULL){
+ status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+ error = punycode_decode(srcLength,b1,(uint32_t*)&b2Len,b2,caseFlags);
+ status = getError(error);
+ }
+
+ if(U_FAILURE(status)){
+ goto CLEANUP;
+ }
+
+ u_strFromUTF32(dest,destCapacity,&destLen,(UChar32*)b2,b2Len,&status);
+
+CLEANUP:
+ if(b1Stack != b1){
+ uprv_free(b1);
+ }
+ if(b2Stack != b2){
+ uprv_free(b2);
+ }
+ uprv_free(caseFlags);
+
+ return destLen;
+}
+
+
+U_CFUNC int32_t U_EXPORT2
+idnaref_toASCII(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status){
+
+ if(status == NULL || U_FAILURE(*status)){
+ return 0;
+ }
+ if((src == NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+ UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE];
+ //initialize pointers to stack buffers
+ UChar *b1 = b1Stack, *b2 = b2Stack;
+ int32_t b1Len=0, b2Len=0,
+ b1Capacity = MAX_LABEL_BUFFER_SIZE,
+ b2Capacity = MAX_LABEL_BUFFER_SIZE ,
+ reqLength=0;
+
+ //get the options
+ UBool allowUnassigned = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0);
+ UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0);
+
+ UBool* caseFlags = NULL;
+
+ // assume the source contains all ascii codepoints
+ UBool srcIsASCII = TRUE;
+ // assume the source contains all LDH codepoints
+ UBool srcIsLDH = TRUE;
+ int32_t j=0;
+
+ if(srcLength == -1){
+ srcLength = u_strlen(src);
+ }
+
+ // step 1
+ for( j=0;j<srcLength;j++){
+ if(src[j] > 0x7F){
+ srcIsASCII = FALSE;
+ }
+ b1[b1Len++] = src[j];
+ }
+ // step 2
+ NamePrepTransform* prep = TestIDNA::getInstance(*status);
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+
+ b1Len = prep->process(src,srcLength,b1, b1Capacity,allowUnassigned,parseError,*status);
+
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b1Len = prep->process(src,srcLength,b1, b1Len,allowUnassigned, parseError, *status);
+ }
+ // error bail out
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+
+ if(b1Len == 0){
+ *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR;
+ goto CLEANUP;
+ }
+
+ srcIsASCII = TRUE;
+ // step 3 & 4
+ for( j=0;j<b1Len;j++){
+ if(b1[j] > 0x7F){// check if output of usprep_prepare is all ASCII
+ srcIsASCII = FALSE;
+ }else if(prep->isLDHChar(b1[j])==FALSE){ // if the char is in ASCII range verify that it is an LDH character{
+ srcIsLDH = FALSE;
+ }
+ }
+
+ if(useSTD3ASCIIRules == TRUE){
+ // verify 3a and 3b
+ if( srcIsLDH == FALSE /* source contains some non-LDH characters */
+ || b1[0] == HYPHEN || b1[b1Len-1] == HYPHEN){
+ *status = U_IDNA_STD3_ASCII_RULES_ERROR;
+ goto CLEANUP;
+ }
+ }
+ if(srcIsASCII){
+ if(b1Len <= destCapacity){
+ uprv_memmove(dest, b1, b1Len * U_SIZEOF_UCHAR);
+ reqLength = b1Len;
+ }else{
+ reqLength = b1Len;
+ goto CLEANUP;
+ }
+ }else{
+ // step 5 : verify the sequence does not begin with ACE prefix
+ if(!startsWithPrefix(b1,b1Len)){
+
+ //step 6: encode the sequence with punycode
+ //caseFlags = (UBool*) uprv_malloc(b1Len * sizeof(UBool));
+
+ b2Len = convertToPuny(b1,b1Len, b2,b2Capacity,*status);
+ //b2Len = u_strToPunycode(b2,b2Capacity,b1,b1Len, caseFlags, status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
+ if(b2 == NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b2Len = convertToPuny(b1, b1Len, b2, b2Len, *status);
+ //b2Len = u_strToPunycode(b2,b2Len,b1,b1Len, caseFlags, status);
+
+ }
+ //error bail out
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+ reqLength = b2Len+ACE_PREFIX_LENGTH;
+
+ if(reqLength > destCapacity){
+ *status = U_BUFFER_OVERFLOW_ERROR;
+ goto CLEANUP;
+ }
+ //Step 7: prepend the ACE prefix
+ uprv_memcpy(dest,ACE_PREFIX,ACE_PREFIX_LENGTH * U_SIZEOF_UCHAR);
+ //Step 6: copy the contents in b2 into dest
+ uprv_memcpy(dest+ACE_PREFIX_LENGTH, b2, b2Len * U_SIZEOF_UCHAR);
+
+ }else{
+ *status = U_IDNA_ACE_PREFIX_ERROR;
+ goto CLEANUP;
+ }
+ }
+
+ if(reqLength > MAX_LABEL_LENGTH){
+ *status = U_IDNA_LABEL_TOO_LONG_ERROR;
+ }
+
+CLEANUP:
+ if(b1 != b1Stack){
+ uprv_free(b1);
+ }
+ if(b2 != b2Stack){
+ uprv_free(b2);
+ }
+ uprv_free(caseFlags);
+
+// delete prep;
+
+ return u_terminateUChars(dest, destCapacity, reqLength, status);
+}
+
+
+U_CFUNC int32_t U_EXPORT2
+idnaref_toUnicode(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status){
+
+ if(status == NULL || U_FAILURE(*status)){
+ return 0;
+ }
+ if((src == NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+
+
+
+ UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE], b3Stack[MAX_LABEL_BUFFER_SIZE];
+
+ //initialize pointers to stack buffers
+ UChar *b1 = b1Stack, *b2 = b2Stack, *b1Prime=NULL, *b3=b3Stack;
+ int32_t b1Len, b2Len, b1PrimeLen, b3Len,
+ b1Capacity = MAX_LABEL_BUFFER_SIZE,
+ b2Capacity = MAX_LABEL_BUFFER_SIZE,
+ b3Capacity = MAX_LABEL_BUFFER_SIZE,
+ reqLength=0;
+// UParseError parseError;
+
+ NamePrepTransform* prep = TestIDNA::getInstance(*status);
+ b1Len = 0;
+ UBool* caseFlags = NULL;
+
+ //get the options
+ UBool allowUnassigned = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0);
+ UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0);
+
+ UBool srcIsASCII = TRUE;
+ UBool srcIsLDH = TRUE;
+ int32_t failPos =0;
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+ // step 1: find out if all the codepoints in src are ASCII
+ if(srcLength==-1){
+ srcLength = 0;
+ for(;src[srcLength]!=0;){
+ if(src[srcLength]> 0x7f){
+ srcIsASCII = FALSE;
+ }if(prep->isLDHChar(src[srcLength])==FALSE){
+ // here we do not assemble surrogates
+ // since we know that LDH code points
+ // are in the ASCII range only
+ srcIsLDH = FALSE;
+ failPos = srcLength;
+ }
+ srcLength++;
+ }
+ }else{
+ for(int32_t j=0; j<srcLength; j++){
+ if(src[j]> 0x7f){
+ srcIsASCII = FALSE;
+ }else if(prep->isLDHChar(src[j])==FALSE){
+ // here we do not assemble surrogates
+ // since we know that LDH code points
+ // are in the ASCII range only
+ srcIsLDH = FALSE;
+ failPos = j;
+ }
+ }
+ }
+
+ if(srcIsASCII == FALSE){
+ // step 2: process the string
+ b1Len = prep->process(src,srcLength,b1,b1Capacity,allowUnassigned, parseError, *status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b1Len = prep->process(src,srcLength,b1, b1Len,allowUnassigned, parseError, *status);
+ }
+ //bail out on error
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+ }else{
+
+ // copy everything to b1
+ if(srcLength < b1Capacity){
+ uprv_memmove(b1,src, srcLength * U_SIZEOF_UCHAR);
+ }else{
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(srcLength * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+ uprv_memmove(b1,src, srcLength * U_SIZEOF_UCHAR);
+ }
+ b1Len = srcLength;
+ }
+ //step 3: verify ACE Prefix
+ if(startsWithPrefix(src,srcLength)){
+
+ //step 4: Remove the ACE Prefix
+ b1Prime = b1 + ACE_PREFIX_LENGTH;
+ b1PrimeLen = b1Len - ACE_PREFIX_LENGTH;
+
+ //step 5: Decode using punycode
+ b2Len = convertFromPuny(b1Prime,b1PrimeLen, b2, b2Capacity, *status);
+ //b2Len = u_strFromPunycode(b2, b2Capacity,b1Prime,b1PrimeLen, caseFlags, status);
+
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
+ if(b2==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b2Len = convertFromPuny(b1Prime,b1PrimeLen, b2, b2Len, *status);
+ //b2Len = u_strFromPunycode(b2, b2Len,b1Prime,b1PrimeLen,caseFlags, status);
+ }
+
+
+ //step 6:Apply toASCII
+ b3Len = idnaref_toASCII(b2,b2Len,b3,b3Capacity,options,parseError, status);
+
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b3 = (UChar*) uprv_malloc(b3Len * U_SIZEOF_UCHAR);
+ if(b3==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b3Len = idnaref_toASCII(b2,b2Len,b3,b3Len, options, parseError, status);
+
+ }
+ //bail out on error
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+
+ //step 7: verify
+ if(compareCaseInsensitiveASCII(b1, b1Len, b3, b3Len) !=0){
+ *status = U_IDNA_VERIFICATION_ERROR;
+ goto CLEANUP;
+ }
+
+ //step 8: return output of step 5
+ reqLength = b2Len;
+ if(b2Len <= destCapacity) {
+ uprv_memmove(dest, b2, b2Len * U_SIZEOF_UCHAR);
+ }
+ }else{
+ // verify that STD3 ASCII rules are satisfied
+ if(useSTD3ASCIIRules == TRUE){
+ if( srcIsLDH == FALSE /* source contains some non-LDH characters */
+ || src[0] == HYPHEN || src[srcLength-1] == HYPHEN){
+ *status = U_IDNA_STD3_ASCII_RULES_ERROR;
+
+ /* populate the parseError struct */
+ if(srcIsLDH==FALSE){
+ // failPos is always set the index of failure
+ uprv_syntaxError(src,failPos, srcLength,parseError);
+ }else if(src[0] == HYPHEN){
+ // fail position is 0
+ uprv_syntaxError(src,0,srcLength,parseError);
+ }else{
+ // the last index in the source is always length-1
+ uprv_syntaxError(src, (srcLength>0) ? srcLength-1 : srcLength, srcLength,parseError);
+ }
+
+ goto CLEANUP;
+ }
+ }
+ //copy the source to destination
+ if(srcLength <= destCapacity){
+ uprv_memmove(dest,src,srcLength * U_SIZEOF_UCHAR);
+ }
+ reqLength = srcLength;
+ }
+
+CLEANUP:
+
+ if(b1 != b1Stack){
+ uprv_free(b1);
+ }
+ if(b2 != b2Stack){
+ uprv_free(b2);
+ }
+ uprv_free(caseFlags);
+
+ // The RFC states that
+ // <quote>
+ // ToUnicode never fails. If any step fails, then the original input
+ // is returned immediately in that step.
+ // </quote>
+ // So if any step fails lets copy source to destination
+ if(U_FAILURE(*status)){
+ //copy the source to destination
+ if(dest && srcLength <= destCapacity){
+ if(srcLength == -1) {
+ uprv_memmove(dest,src,u_strlen(src)* U_SIZEOF_UCHAR);
+ } else {
+ uprv_memmove(dest,src,srcLength * U_SIZEOF_UCHAR);
+ }
+ }
+ reqLength = srcLength;
+ *status = U_ZERO_ERROR;
+ }
+ return u_terminateUChars(dest, destCapacity, reqLength, status);
+}
+
+
+static int32_t
+getNextSeparator(UChar *src,int32_t srcLength,NamePrepTransform* prep,
+ UChar **limit,
+ UBool *done,
+ UErrorCode *status){
+ if(srcLength == -1){
+ int32_t i;
+ for(i=0 ; ;i++){
+ if(src[i] == 0){
+ *limit = src + i; // point to null
+ *done = TRUE;
+ return i;
+ }
+ if(prep->isLabelSeparator(src[i],*status)){
+ *limit = src + (i+1); // go past the delimiter
+ return i;
+
+ }
+ }
+ }else{
+ int32_t i;
+ for(i=0;i<srcLength;i++){
+ if(prep->isLabelSeparator(src[i],*status)){
+ *limit = src + (i+1); // go past the delimiter
+ return i;
+ }
+ }
+ // we have not found the delimiter
+ if(i==srcLength){
+ *limit = src+srcLength;
+ *done = TRUE;
+ }
+ return i;
+ }
+}
+
+U_CFUNC int32_t U_EXPORT2
+idnaref_IDNToASCII( const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status){
+
+ if(status == NULL || U_FAILURE(*status)){
+ return 0;
+ }
+ if((src == NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+
+ int32_t reqLength = 0;
+// UParseError parseError;
+
+ NamePrepTransform* prep = TestIDNA::getInstance(*status);
+
+ //initialize pointers to stack buffers
+ UChar b1Stack[MAX_LABEL_BUFFER_SIZE];
+ UChar *b1 = b1Stack;
+ int32_t b1Len, labelLen;
+ UChar* delimiter = (UChar*)src;
+ UChar* labelStart = (UChar*)src;
+ int32_t remainingLen = srcLength;
+ int32_t b1Capacity = MAX_LABEL_BUFFER_SIZE;
+
+ //get the options
+// UBool allowUnassigned = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0);
+// UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0);
+ UBool done = FALSE;
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+
+
+ if(srcLength == -1){
+ for(;;){
+
+ if(*delimiter == 0){
+ break;
+ }
+
+ labelLen = getNextSeparator(labelStart, -1, prep, &delimiter, &done, status);
+ b1Len = 0;
+ if(!(labelLen==0 && done)){// make sure this is not a root label separator.
+
+ b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Capacity,
+ options, parseError, status);
+
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Len,
+ options, parseError, status);
+
+ }
+ }
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+ int32_t tempLen = (reqLength + b1Len );
+ // copy to dest
+ if( tempLen< destCapacity){
+ uprv_memmove(dest+reqLength, b1, b1Len * U_SIZEOF_UCHAR);
+ }
+
+ reqLength = tempLen;
+
+ // add the label separator
+ if(done == FALSE){
+ if(reqLength < destCapacity){
+ dest[reqLength] = FULL_STOP;
+ }
+ reqLength++;
+ }
+
+ labelStart = delimiter;
+ }
+ }else{
+ for(;;){
+
+ if(delimiter == src+srcLength){
+ break;
+ }
+
+ labelLen = getNextSeparator(labelStart, remainingLen, prep, &delimiter, &done, status);
+
+ b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Capacity,
+ options,parseError, status);
+
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Len,
+ options, parseError, status);
+
+ }
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+ int32_t tempLen = (reqLength + b1Len );
+ // copy to dest
+ if( tempLen< destCapacity){
+ uprv_memmove(dest+reqLength, b1, b1Len * U_SIZEOF_UCHAR);
+ }
+
+ reqLength = tempLen;
+
+ // add the label separator
+ if(done == FALSE){
+ if(reqLength < destCapacity){
+ dest[reqLength] = FULL_STOP;
+ }
+ reqLength++;
+ }
+
+ labelStart = delimiter;
+ remainingLen = srcLength - (delimiter - src);
+ }
+ }
+
+
+CLEANUP:
+
+ if(b1 != b1Stack){
+ uprv_free(b1);
+ }
+
+// delete prep;
+
+ return u_terminateUChars(dest, destCapacity, reqLength, status);
+}
+
+U_CFUNC int32_t U_EXPORT2
+idnaref_IDNToUnicode( const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status){
+
+ if(status == NULL || U_FAILURE(*status)){
+ return 0;
+ }
+ if((src == NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+
+ int32_t reqLength = 0;
+
+ UBool done = FALSE;
+
+ NamePrepTransform* prep = TestIDNA::getInstance(*status);
+
+ //initialize pointers to stack buffers
+ UChar b1Stack[MAX_LABEL_BUFFER_SIZE];
+ UChar *b1 = b1Stack;
+ int32_t b1Len, labelLen;
+ UChar* delimiter = (UChar*)src;
+ UChar* labelStart = (UChar*)src;
+ int32_t remainingLen = srcLength;
+ int32_t b1Capacity = MAX_LABEL_BUFFER_SIZE;
+
+ //get the options
+// UBool allowUnassigned = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0);
+// UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0);
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+
+ if(srcLength == -1){
+ for(;;){
+
+ if(*delimiter == 0){
+ break;
+ }
+
+ labelLen = getNextSeparator(labelStart, -1, prep, &delimiter, &done, status);
+
+ if(labelLen==0 && done==FALSE){
+ *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR;
+ }
+ b1Len = idnaref_toUnicode(labelStart, labelLen, b1, b1Capacity,
+ options, parseError, status);
+
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b1Len = idnaref_toUnicode( labelStart, labelLen, b1, b1Len,
+ options, parseError, status);
+
+ }
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+ int32_t tempLen = (reqLength + b1Len );
+ // copy to dest
+ if( tempLen< destCapacity){
+ uprv_memmove(dest+reqLength, b1, b1Len * U_SIZEOF_UCHAR);
+ }
+
+ reqLength = tempLen;
+ // add the label separator
+ if(done == FALSE){
+ if(reqLength < destCapacity){
+ dest[reqLength] = FULL_STOP;
+ }
+ reqLength++;
+ }
+
+ labelStart = delimiter;
+ }
+ }else{
+ for(;;){
+
+ if(delimiter == src+srcLength){
+ break;
+ }
+
+ labelLen = getNextSeparator(labelStart, remainingLen, prep, &delimiter, &done, status);
+
+ if(labelLen==0 && done==FALSE){
+ *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR;
+ }
+
+ b1Len = idnaref_toUnicode( labelStart,labelLen, b1, b1Capacity,
+ options, parseError, status);
+
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b1Len = idnaref_toUnicode( labelStart, labelLen, b1, b1Len,
+ options, parseError, status);
+
+ }
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+ int32_t tempLen = (reqLength + b1Len );
+ // copy to dest
+ if( tempLen< destCapacity){
+ uprv_memmove(dest+reqLength, b1, b1Len * U_SIZEOF_UCHAR);
+ }
+
+ reqLength = tempLen;
+
+ // add the label separator
+ if(done == FALSE){
+ if(reqLength < destCapacity){
+ dest[reqLength] = FULL_STOP;
+ }
+ reqLength++;
+ }
+
+ labelStart = delimiter;
+ remainingLen = srcLength - (delimiter - src);
+ }
+ }
+
+CLEANUP:
+
+ if(b1 != b1Stack){
+ uprv_free(b1);
+ }
+
+// delete prep;
+
+ return u_terminateUChars(dest, destCapacity, reqLength, status);
+}
+
+U_CFUNC int32_t U_EXPORT2
+idnaref_compare( const UChar *s1, int32_t length1,
+ const UChar *s2, int32_t length2,
+ int32_t options,
+ UErrorCode* status){
+
+ if(status == NULL || U_FAILURE(*status)){
+ return -1;
+ }
+
+ UChar b1Stack[MAX_IDN_BUFFER_SIZE], b2Stack[MAX_IDN_BUFFER_SIZE];
+ UChar *b1 = b1Stack, *b2 = b2Stack;
+ int32_t b1Len, b2Len, b1Capacity = MAX_IDN_BUFFER_SIZE, b2Capacity = MAX_IDN_BUFFER_SIZE;
+ int32_t result = -1;
+
+ UParseError parseError;
+
+ b1Len = idnaref_IDNToASCII(s1, length1, b1, b1Capacity, options, &parseError, status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b1Len = idnaref_IDNToASCII(s1,length1,b1,b1Len, options, &parseError, status);
+
+ }
+
+ b2Len = idnaref_IDNToASCII(s2,length2,b2,b2Capacity,options, &parseError, status);
+ if(*status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
+ if(b2==NULL){
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ *status = U_ZERO_ERROR; // reset error
+
+ b2Len = idnaref_IDNToASCII(s2,length2,b2,b2Len,options, &parseError, status);
+
+ }
+ // when toASCII is applied all label separators are replaced with FULL_STOP
+ result = compareCaseInsensitiveASCII(b1,b1Len,b2,b2Len);
+
+CLEANUP:
+ if(b1 != b1Stack){
+ uprv_free(b1);
+ }
+
+ if(b2 != b2Stack){
+ uprv_free(b2);
+ }
+
+ return result;
+}
+#endif /* #if !UCONFIG_NO_IDNA */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/idnaref.h b/Build/source/libs/icu/icu-xetex/test/intltest/idnaref.h
new file mode 100644
index 00000000000..78af44b6fd3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/idnaref.h
@@ -0,0 +1,228 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2004, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: idnaref.h
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003feb1
+ * created by: Ram Viswanadha
+ */
+
+#ifndef __IDNAREF_H__
+#define __IDNAREF_H__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+#include "unicode/parseerr.h"
+
+#define IDNAREF_DEFAULT 0x0000
+#define IDNAREF_ALLOW_UNASSIGNED 0x0001
+#define IDNAREF_USE_STD3_RULES 0x0002
+
+/**
+ * This function implements the ToASCII operation as defined in the IDNA draft.
+ * This operation is done on <b>single labels</b> before sending it to something that expects
+ * ASCII names. A label is an individual part of a domain name. Labels are usually
+ * separated by dots; for e.g." "www.example.com" is composed of 3 labels
+ * "www","example", and "com".
+ *
+ *
+ * @param src Input Unicode label.
+ * @param srcLength Number of UChars in src, or -1 if NUL-terminated.
+ * @param dest Output Unicode array with ACE encoded ASCII label.
+ * @param destCapacity Size of dest.
+ * @param options A bit set of options:
+ *
+ * - idnaref_UNASSIGNED Unassigned values can be converted to ASCII for query operations
+ * If TRUE unassigned values are treated as normal Unicode code points.
+ * If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ * - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
+ * If TRUE and the input does not statisfy STD3 rules, the operation
+ * will fail with U_IDNA_STD3_ASCII_RULES_ERROR
+ *
+ * @param parseError Pointer to UParseError struct to recieve information on position
+ * of error if an error is encountered. Can be NULL.
+ * @param status ICU in/out error code parameter.
+ * U_INVALID_CHAR_FOUND if src contains
+ * unmatched single surrogates.
+ * U_INDEX_OUTOFBOUNDS_ERROR if src contains
+ * too many code points.
+ * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough
+ * @return Number of ASCII characters converted.
+ * @draft ICU 2.6
+ */
+U_CFUNC int32_t U_EXPORT2
+idnaref_toASCII(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status);
+
+
+/**
+ * This function implements the ToUnicode operation as defined in the IDNA draft.
+ * This operation is done on <b>single labels</b> before sending it to something that expects
+ * ASCII names. A label is an individual part of a domain name. Labels are usually
+ * separated by dots; for e.g." "www.example.com" is composed of 3 labels
+ * "www","example", and "com".
+ *
+ * @param src Input ASCII (ACE encoded) label.
+ * @param srcLength Number of UChars in src, or -1 if NUL-terminated.
+ * @param dest Output Converted Unicode array.
+ * @param destCapacity Size of dest.
+ * @param options A bit set of options:
+ *
+ * - idnaref_UNASSIGNED Unassigned values can be converted to ASCII for query operations
+ * If TRUE unassigned values are treated as normal Unicode code points.
+ * If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ * - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
+ * If TRUE and the input does not statisfy STD3 rules, the operation
+ * will fail with U_IDNA_STD3_ASCII_RULES_ERROR
+ *
+ * @param parseError Pointer to UParseError struct to recieve information on position
+ * of error if an error is encountered. Can be NULL.
+ * @param status ICU in/out error code parameter.
+ * U_INVALID_CHAR_FOUND if src contains
+ * unmatched single surrogates.
+ * U_INDEX_OUTOFBOUNDS_ERROR if src contains
+ * too many code points.
+ * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough
+ * @return Number of Unicode characters converted.
+ * @draft ICU 2.6
+ */
+U_CFUNC int32_t U_EXPORT2
+idnaref_toUnicode(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status);
+
+
+/**
+ * Convenience function that implements the IDNToASCII operation as defined in the IDNA draft.
+ * This operation is done on complete domain names, e.g: "www.example.com".
+ * It is important to note that this operation can fail. If it fails, then the input
+ * domain name cannot be used as an Internationalized Domain Name and the application
+ * should have methods defined to deal with the failure.
+ *
+ * <b>Note:</b> IDNA draft specifies that a conformant application should divide a domain name
+ * into separate labels, decide whether to apply allowUnassigned and useSTD3ASCIIRules on each,
+ * and then convert. This function does not offer that level of granularity. The options once
+ * set will apply to all labels in the domain name
+ *
+ * @param src Input ASCII IDN.
+ * @param srcLength Number of UChars in src, or -1 if NUL-terminated.
+ * @param dest Output Unicode array.
+ * @param destCapacity Size of dest.
+ * @param options A bit set of options:
+ *
+ * - idnaref_UNASSIGNED Unassigned values can be converted to ASCII for query operations
+ * If TRUE unassigned values are treated as normal Unicode code points.
+ * If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ * - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
+ * If TRUE and the input does not statisfy STD3 rules, the operation
+ * will fail with U_IDNA_STD3_ASCII_RULES_ERROR
+ *
+ * @param parseError Pointer to UParseError struct to recieve information on position
+ * of error if an error is encountered. Can be NULL.
+ * @param status ICU in/out error code parameter.
+ * U_INVALID_CHAR_FOUND if src contains
+ * unmatched single surrogates.
+ * U_INDEX_OUTOFBOUNDS_ERROR if src contains
+ * too many code points.
+ * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough
+ * @return Number of ASCII characters converted.
+ * @draft ICU 2.6
+ */
+U_CFUNC int32_t U_EXPORT2
+idnaref_IDNToASCII( const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status);
+
+/**
+ * Convenience function that implements the IDNToUnicode operation as defined in the IDNA draft.
+ * This operation is done on complete domain names, e.g: "www.example.com".
+ *
+ * <b>Note:</b> IDNA draft specifies that a conformant application should divide a domain name
+ * into separate labels, decide whether to apply allowUnassigned and useSTD3ASCIIRules on each,
+ * and then convert. This function does not offer that level of granularity. The options once
+ * set will apply to all labels in the domain name
+ *
+ * @param src Input Unicode IDN.
+ * @param srcLength Number of UChars in src, or -1 if NUL-terminated.
+ * @param dest Output ASCII array.
+ * @param destCapacity Size of dest.
+ * @param options A bit set of options:
+ *
+ * - idnaref_UNASSIGNED Unassigned values can be converted to ASCII for query operations
+ * If TRUE unassigned values are treated as normal Unicode code points.
+ * If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ * - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
+ * If TRUE and the input does not statisfy STD3 rules, the operation
+ * will fail with U_IDNA_STD3_ASCII_RULES_ERROR
+ *
+ * @param parseError Pointer to UParseError struct to recieve information on position
+ * of error if an error is encountered. Can be NULL.
+ * @param status ICU in/out error code parameter.
+ * U_INVALID_CHAR_FOUND if src contains
+ * unmatched single surrogates.
+ * U_INDEX_OUTOFBOUNDS_ERROR if src contains
+ * too many code points.
+ * U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough
+ * @return Number of ASCII characters converted.
+ * @draft ICU 2.6
+ */
+U_CFUNC int32_t U_EXPORT2
+idnaref_IDNToUnicode( const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ int32_t options,
+ UParseError* parseError,
+ UErrorCode* status);
+
+/**
+ * Compare two strings for IDNs for equivalence.
+ * This function splits the domain names into labels and compares them.
+ * According to IDN draft, whenever two labels are compared, they are
+ * considered equal if and only if their ASCII forms (obtained by
+ * applying toASCII) match using an case-insensitive ASCII comparison.
+ * Two domain names are considered a match if and only if all labels
+ * match regardless of whether label separators match.
+ *
+ * @param s1 First source string.
+ * @param length1 Length of first source string, or -1 if NUL-terminated.
+ *
+ * @param s2 Second source string.
+ * @param length2 Length of second source string, or -1 if NUL-terminated.
+ * @param options A bit set of options:
+ *
+ * - idnaref_UNASSIGNED Unassigned values can be converted to ASCII for query operations
+ * If TRUE unassigned values are treated as normal Unicode code points.
+ * If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ * - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
+ * If TRUE and the input does not statisfy STD3 rules, the operation
+ * will fail with U_IDNA_STD3_ASCII_RULES_ERROR
+ *
+ * @param status ICU error code in/out parameter.
+ * Must fulfill U_SUCCESS before the function call.
+ * @return <0 or 0 or >0 as usual for string comparisons
+ * @draft ICU 2.6
+ */
+U_CFUNC int32_t U_EXPORT2
+idnaref_compare( const UChar *s1, int32_t length1,
+ const UChar *s2, int32_t length2,
+ int32_t options,
+ UErrorCode* status);
+
+#endif /* #if !UCONFIG_NO_IDNA */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/incaltst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/incaltst.cpp
new file mode 100644
index 00000000000..ecc7377ba35
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/incaltst.cpp
@@ -0,0 +1,813 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+/* Test Internationalized Calendars for C++ */
+
+#include "unicode/utypes.h"
+#include "string.h"
+#include "unicode/locid.h"
+#include "japancal.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include <stdio.h>
+#include "caltest.h"
+
+#define CHECK(status, msg) \
+ if (U_FAILURE(status)) { \
+ errln((UnicodeString(u_errorName(status)) + UnicodeString(" : " ) )+ msg); \
+ return; \
+ }
+
+
+static UnicodeString escape( const UnicodeString&src)
+{
+ UnicodeString dst;
+ dst.remove();
+ for (int32_t i = 0; i < src.length(); ++i) {
+ UChar c = src[i];
+ if(c < 0x0080)
+ dst += c;
+ else {
+ dst += UnicodeString("[");
+ char buf [8];
+ sprintf(buf, "%#x", c);
+ dst += UnicodeString(buf);
+ dst += UnicodeString("]");
+ }
+ }
+
+ return dst;
+}
+
+
+#include "incaltst.h"
+#include "unicode/gregocal.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/simpletz.h"
+
+// *****************************************************************************
+// class IntlCalendarTest
+// *****************************************************************************
+//--- move to CalendarTest?
+
+static const double JULIAN_EPOCH = -210866760000000.;
+
+
+// Turn this on to dump the calendar fields
+#define U_DEBUG_DUMPCALS
+
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+
+
+void IntlCalendarTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite IntlCalendarTest");
+ switch (index) {
+ CASE(0,TestTypes);
+ CASE(1,TestGregorian);
+ CASE(2,TestBuddhist);
+ CASE(3,TestJapanese);
+ CASE(4,TestBuddhistFormat);
+ CASE(5,TestJapaneseFormat);
+ CASE(6,TestJapanese3860);
+ CASE(7,TestPersian);
+ CASE(8,TestPersianFormat);
+ CASE(9,TestTaiwan);
+ default: name = ""; break;
+ }
+}
+
+#undef CASE
+
+// ---------------------------------------------------------------------------------
+
+
+/**
+ * Test various API methods for API completeness.
+ */
+void
+IntlCalendarTest::TestTypes()
+{
+ Calendar *c = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ int j;
+ const char *locs [40] = { "en_US_VALLEYGIRL",
+ "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese",
+ "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian",
+ "ja_JP@calendar=japanese",
+ "th_TH@calendar=buddhist",
+ "ja_JP_TRADITIONAL",
+ "th_TH_TRADITIONAL",
+ "th_TH_TRADITIONAL@calendar=gregorian",
+ "en_US", NULL };
+ const char *types[40] = { "gregorian",
+ "japanese",
+ "gregorian",
+ "japanese",
+ "buddhist",
+ "japanese",
+ "buddhist",
+ "gregorian",
+ "gregorian", NULL };
+
+ for(j=0;locs[j];j++) {
+ logln(UnicodeString("Creating calendar of locale ") + locs[j]);
+ status = U_ZERO_ERROR;
+ c = Calendar::createInstance(locs[j], status);
+ CHECK(status, "creating '" + UnicodeString(locs[j]) + "' calendar");
+ if(U_SUCCESS(status)) {
+ logln(UnicodeString(" type is ") + c->getType());
+ if(strcmp(c->getType(), types[j])) {
+ errln(UnicodeString(locs[j]) + UnicodeString("Calendar type ") + c->getType() + " instead of " + types[j]);
+ }
+ }
+ delete c;
+ }
+}
+
+
+
+/**
+ * Run a test of a quasi-Gregorian calendar. This is a calendar
+ * that behaves like a Gregorian but has different year/era mappings.
+ * The int[] data array should have the format:
+ *
+ * { era, year, gregorianYear, month, dayOfMonth, ... ... , -1 }
+ */
+void IntlCalendarTest::quasiGregorianTest(Calendar& cal, const Locale& gcl, const int32_t *data) {
+ UErrorCode status = U_ZERO_ERROR;
+ // As of JDK 1.4.1_01, using the Sun JDK GregorianCalendar as
+ // a reference throws us off by one hour. This is most likely
+ // due to the JDK 1.4 incorporation of historical time zones.
+ //java.util.Calendar grego = java.util.Calendar.getInstance();
+ Calendar *grego = Calendar::createInstance(gcl, status);
+ if (U_FAILURE(status)) {
+ dataerrln("Error calling Calendar::createInstance");
+ return;
+ }
+
+ int32_t tz1 = cal.get(UCAL_ZONE_OFFSET,status);
+ int32_t tz2 = grego -> get (UCAL_ZONE_OFFSET, status);
+ if(tz1 != tz2) {
+ errln((UnicodeString)"cal's tz " + tz1 + " != grego's tz " + tz2);
+ }
+
+ for (int32_t i=0; data[i]!=-1; ) {
+ int32_t era = data[i++];
+ int32_t year = data[i++];
+ int32_t gregorianYear = data[i++];
+ int32_t month = data[i++];
+ int32_t dayOfMonth = data[i++];
+
+ grego->clear();
+ grego->set(gregorianYear, month, dayOfMonth);
+ UDate D = grego->getTime(status);
+
+ cal.clear();
+ cal.set(UCAL_ERA, era);
+ cal.set(year, month, dayOfMonth);
+ UDate d = cal.getTime(status);
+#ifdef U_DEBUG_DUMPCALS
+ logln((UnicodeString)"cal : " + CalendarTest::calToStr(cal));
+ logln((UnicodeString)"grego: " + CalendarTest::calToStr(*grego));
+#endif
+ if (d == D) {
+ logln(UnicodeString("OK: ") + era + ":" + year + "/" + (month+1) + "/" + dayOfMonth +
+ " => " + d + " (" + UnicodeString(cal.getType()) + ")");
+ } else {
+ errln(UnicodeString("Fail: (fields to millis)") + era + ":" + year + "/" + (month+1) + "/" + dayOfMonth +
+ " => " + d + ", expected " + D + " (" + UnicodeString(cal.getType()) + "Off by: " + (d-D));
+ }
+
+ // Now, set the gregorian millis on the other calendar
+ cal.clear();
+ cal.setTime(D, status);
+ int e = cal.get(UCAL_ERA, status);
+ int y = cal.get(UCAL_YEAR, status);
+#ifdef U_DEBUG_DUMPCALS
+ logln((UnicodeString)"cal : " + CalendarTest::calToStr(cal));
+ logln((UnicodeString)"grego: " + CalendarTest::calToStr(*grego));
+#endif
+ if (y == year && e == era) {
+ logln((UnicodeString)"OK: " + D + " => " + cal.get(UCAL_ERA, status) + ":" +
+ cal.get(UCAL_YEAR, status) + "/" +
+ (cal.get(UCAL_MONTH, status)+1) + "/" + cal.get(UCAL_DATE, status) + " (" + UnicodeString(cal.getType()) + ")");
+ } else {
+ errln((UnicodeString)"Fail: (millis to fields)" + D + " => " + cal.get(UCAL_ERA, status) + ":" +
+ cal.get(UCAL_YEAR, status) + "/" +
+ (cal.get(UCAL_MONTH, status)+1) + "/" + cal.get(UCAL_DATE, status) +
+ ", expected " + era + ":" + year + "/" + (month+1) + "/" +
+ dayOfMonth + " (" + UnicodeString(cal.getType()));
+ }
+ }
+ delete grego;
+ CHECK(status, "err during quasiGregorianTest()");
+}
+
+// Verify that Gregorian works like Gregorian
+void IntlCalendarTest::TestGregorian() {
+ UDate timeA = Calendar::getNow();
+ int32_t data[] = {
+ GregorianCalendar::AD, 1868, 1868, UCAL_SEPTEMBER, 8,
+ GregorianCalendar::AD, 1868, 1868, UCAL_SEPTEMBER, 9,
+ GregorianCalendar::AD, 1869, 1869, UCAL_JUNE, 4,
+ GregorianCalendar::AD, 1912, 1912, UCAL_JULY, 29,
+ GregorianCalendar::AD, 1912, 1912, UCAL_JULY, 30,
+ GregorianCalendar::AD, 1912, 1912, UCAL_AUGUST, 1,
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+ };
+
+ Calendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ cal = Calendar::createInstance(/*"de_DE", */ status);
+ CHECK(status, UnicodeString("Creating de_CH calendar"));
+ // Sanity check the calendar
+ UDate timeB = Calendar::getNow();
+ UDate timeCal = cal->getTime(status);
+
+ if(!(timeA <= timeCal) || !(timeCal <= timeB)) {
+ errln((UnicodeString)"Error: Calendar time " + timeCal +
+ " is not within sampled times [" + timeA + " to " + timeB + "]!");
+ }
+ // end sanity check
+
+ // Note, the following is a good way to test the sanity of the constructed calendars,
+ // using Collation as a delay-loop:
+ //
+ // $ intltest format/IntlCalendarTest collate/G7CollationTest format/IntlCalendarTest
+
+ quasiGregorianTest(*cal,Locale("fr_FR"),data);
+ delete cal;
+}
+
+/**
+ * Verify that BuddhistCalendar shifts years to Buddhist Era but otherwise
+ * behaves like GregorianCalendar.
+ */
+void IntlCalendarTest::TestBuddhist() {
+ // BE 2542 == 1999 CE
+ UDate timeA = Calendar::getNow();
+
+ int32_t data[] = {
+ 0, // B. era [928479600000]
+ 2542, // B. year
+ 1999, // G. year
+ UCAL_JUNE, // month
+ 4, // day
+
+ 0, // B. era [-79204842000000]
+ 3, // B. year
+ -540, // G. year
+ UCAL_FEBRUARY, // month
+ 12, // day
+
+ 0, // test month calculation: 4795 BE = 4252 AD is a leap year, but 4795 AD is not.
+ 4795, // BE [72018057600000]
+ 4252, // AD
+ UCAL_FEBRUARY,
+ 29,
+
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+ };
+ Calendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ cal = Calendar::createInstance("th_TH@calendar=buddhist", status);
+ CHECK(status, UnicodeString("Creating th_TH@calendar=buddhist calendar"));
+
+ // Sanity check the calendar
+ UDate timeB = Calendar::getNow();
+ UDate timeCal = cal->getTime(status);
+
+ if(!(timeA <= timeCal) || !(timeCal <= timeB)) {
+ errln((UnicodeString)"Error: Calendar time " + timeCal +
+ " is not within sampled times [" + timeA + " to " + timeB + "]!");
+ }
+ // end sanity check
+
+
+ quasiGregorianTest(*cal,Locale("th_TH@calendar=gregorian"),data);
+ delete cal;
+}
+
+
+/**
+ * Verify that TaiWanCalendar shifts years to Minguo Era but otherwise
+ * behaves like GregorianCalendar.
+ */
+void IntlCalendarTest::TestTaiwan() {
+ // MG 1 == 1912 AD
+ UDate timeA = Calendar::getNow();
+
+ // TODO port these to the data items
+ int32_t data[] = {
+ 1, // B. era [928479600000]
+ 1, // B. year
+ 1912, // G. year
+ UCAL_JUNE, // month
+ 4, // day
+
+ 1, // B. era [-79204842000000]
+ 3, // B. year
+ 1914, // G. year
+ UCAL_FEBRUARY, // month
+ 12, // day
+
+ 1, // B. era [-79204842000000]
+ 96, // B. year
+ 2007, // G. year
+ UCAL_FEBRUARY, // month
+ 12, // day
+
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+ };
+ Calendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ cal = Calendar::createInstance("en_US@calendar=taiwan", status);
+ CHECK(status, UnicodeString("Creating en_US@calendar=taiwan calendar"));
+
+ // Sanity check the calendar
+ UDate timeB = Calendar::getNow();
+ UDate timeCal = cal->getTime(status);
+
+ if(!(timeA <= timeCal) || !(timeCal <= timeB)) {
+ errln((UnicodeString)"Error: Calendar time " + timeCal +
+ " is not within sampled times [" + timeA + " to " + timeB + "]!");
+ }
+ // end sanity check
+
+
+ quasiGregorianTest(*cal,Locale("en_US"),data);
+ delete cal;
+}
+
+
+
+/**
+ * Verify that JapaneseCalendar shifts years to Japanese Eras but otherwise
+ * behaves like GregorianCalendar.
+ */
+void IntlCalendarTest::TestJapanese() {
+ UDate timeA = Calendar::getNow();
+
+ /* Sorry.. japancal.h is private! */
+#define JapaneseCalendar_MEIJI 232
+#define JapaneseCalendar_TAISHO 233
+#define JapaneseCalendar_SHOWA 234
+#define JapaneseCalendar_HEISEI 235
+
+ // BE 2542 == 1999 CE
+ int32_t data[] = {
+ // Jera Jyr Gyear m d
+ JapaneseCalendar_MEIJI, 1, 1868, UCAL_SEPTEMBER, 8,
+ JapaneseCalendar_MEIJI, 1, 1868, UCAL_SEPTEMBER, 9,
+ JapaneseCalendar_MEIJI, 2, 1869, UCAL_JUNE, 4,
+ JapaneseCalendar_MEIJI, 45, 1912, UCAL_JULY, 29,
+ JapaneseCalendar_TAISHO, 1, 1912, UCAL_JULY, 30,
+ JapaneseCalendar_TAISHO, 1, 1912, UCAL_AUGUST, 1,
+
+ // new tests (not in java)
+ JapaneseCalendar_SHOWA, 64, 1989, UCAL_JANUARY, 7, // Test current era transition (different code path than others)
+ JapaneseCalendar_HEISEI, 1, 1989, UCAL_JANUARY, 8,
+ JapaneseCalendar_HEISEI, 1, 1989, UCAL_JANUARY, 9,
+ JapaneseCalendar_HEISEI, 1, 1989, UCAL_DECEMBER, 20,
+ JapaneseCalendar_HEISEI, 15, 2003, UCAL_MAY, 22,
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+ };
+
+ Calendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ cal = Calendar::createInstance("ja_JP@calendar=japanese", status);
+ CHECK(status, UnicodeString("Creating ja_JP@calendar=japanese calendar"));
+ // Sanity check the calendar
+ UDate timeB = Calendar::getNow();
+ UDate timeCal = cal->getTime(status);
+
+ if(!(timeA <= timeCal) || !(timeCal <= timeB)) {
+ errln((UnicodeString)"Error: Calendar time " + timeCal +
+ " is not within sampled times [" + timeA + " to " + timeB + "]!");
+ }
+ // end sanity check
+ quasiGregorianTest(*cal,Locale("ja_JP"),data);
+ delete cal;
+}
+
+
+
+void IntlCalendarTest::TestBuddhistFormat() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ // Test simple parse/format with adopt
+
+ // First, a contrived english test..
+ UDate aDate = 999932400000.0;
+ SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=buddhist"), status);
+ CHECK(status, "creating date format instance");
+ SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
+ CHECK(status, "creating gregorian date format instance");
+ if(!fmt) {
+ errln("Coudln't create en_US instance");
+ } else {
+ UnicodeString str;
+ fmt2->format(aDate, str);
+ logln(UnicodeString() + "Test Date: " + str);
+ str.remove();
+ fmt->format(aDate, str);
+ logln(UnicodeString() + "as Buddhist Calendar: " + escape(str));
+ UnicodeString expected("September 8, 2544 BE");
+ if(str != expected) {
+ errln("Expected " + escape(expected) + " but got " + escape(str));
+ }
+ UDate otherDate = fmt->parse(expected, status);
+ if(otherDate != aDate) {
+ UnicodeString str3;
+ fmt->format(otherDate, str3);
+ errln("Parse incorrect of " + escape(expected) + " - wanted " + aDate + " but got " + otherDate + ", " + escape(str3));
+ } else {
+ logln("Parsed OK: " + expected);
+ }
+ delete fmt;
+ }
+ delete fmt2;
+
+ CHECK(status, "Error occured testing Buddhist Calendar in English ");
+
+ status = U_ZERO_ERROR;
+ // Now, try in Thai
+ {
+ UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
+ " 8 \\u0E01\\u0E31\\u0e19\\u0e22\\u0e32\\u0e22\\u0e19 \\u0e1e.\\u0e28. 2544");
+ UDate expectDate = 999932400000.0;
+ Locale loc("th_TH_TRADITIONAL"); // legacy
+
+ simpleTest(loc, expect, expectDate, status);
+ }
+ status = U_ZERO_ERROR;
+ {
+ UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
+ " 8 \\u0E01\\u0E31\\u0e19\\u0e22\\u0e32\\u0e22\\u0e19 \\u0e1e.\\u0e28. 2544");
+ UDate expectDate = 999932400000.0;
+ Locale loc("th_TH@calendar=buddhist");
+
+ simpleTest(loc, expect, expectDate, status);
+ }
+ status = U_ZERO_ERROR;
+ {
+ UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
+ " 8 \\u0E01\\u0E31\\u0e19\\u0e22\\u0e32\\u0e22\\u0e19 \\u0e04.\\u0e28. 2001");
+ UDate expectDate = 999932400000.0;
+ Locale loc("th_TH@calendar=gregorian");
+
+ simpleTest(loc, expect, expectDate, status);
+ }
+ status = U_ZERO_ERROR;
+ {
+ UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
+ " 8 \\u0E01\\u0E31\\u0e19\\u0e22\\u0e32\\u0e22\\u0e19 \\u0e04.\\u0e28. 2001");
+ UDate expectDate = 999932400000.0;
+ Locale loc("th_TH_TRADITIONAL@calendar=gregorian");
+
+ simpleTest(loc, expect, expectDate, status);
+ }
+}
+
+// TaiwanFormat has been moved to testdata/format.txt
+
+
+void IntlCalendarTest::TestJapaneseFormat() {
+ Calendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ cal = Calendar::createInstance("ja_JP_TRADITIONAL", status);
+ CHECK(status, UnicodeString("Creating ja_JP_TRADITIONAL calendar"));
+
+ Calendar *cal2 = cal->clone();
+ delete cal;
+ cal = NULL;
+
+ // Test simple parse/format with adopt
+
+ UDate aDate = 999932400000.0;
+ SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yy G"), Locale("en_US@calendar=japanese"), status);
+ SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
+ CHECK(status, "creating date format instance");
+ if(!fmt) {
+ errln("Coudln't create en_US instance");
+ } else {
+ UnicodeString str;
+ fmt2->format(aDate, str);
+ logln(UnicodeString() + "Test Date: " + str);
+ str.remove();
+ fmt->format(aDate, str);
+ logln(UnicodeString() + "as Japanese Calendar: " + str);
+ UnicodeString expected("September 8, 13 Heisei");
+ if(str != expected) {
+ errln("Expected " + expected + " but got " + str);
+ }
+ UDate otherDate = fmt->parse(expected, status);
+ if(otherDate != aDate) {
+ UnicodeString str3;
+ ParsePosition pp;
+ fmt->parse(expected, *cal2, pp);
+ fmt->format(otherDate, str3);
+ errln("Parse incorrect of " + expected + " - wanted " + aDate + " but got " + " = " + otherDate + ", " + str3 + " = " + CalendarTest::calToStr(*cal2) );
+
+ } else {
+ logln("Parsed OK: " + expected);
+ }
+ delete fmt;
+ }
+
+ // Test parse with incomplete information
+ fmt = new SimpleDateFormat(UnicodeString("G y"), Locale("en_US@calendar=japanese"), status);
+ /* The test data below should points to 1868-09-08T00:00:00 in America/Los_Angeles.
+ * The time calculated by original test code uses -7:00 UTC offset, because it assumes
+ * DST is observed (because of a timezone bug, DST is observed for early 20th century
+ * day to infinite past time). The bug was fixed and DST is no longer used for time before
+ * 1900 for any zones. However, ICU timezone transition data is represented by 32-bit integer
+ * (sec) and cannot represent transitions before 1901 defined in Olson tzdata. For example,
+ * based on Olson definition, offset -7:52:58 should be used for Nov 18, 1883 or older dates.
+ * If ICU properly capture entire Olson zone definition, the start time of "Meiji 1" is
+ * -3197117222000. -Yoshito
+ */
+ /* TODO: When ICU support the Olson LMT offset for America/Los_Angeles, we need to update
+ * the reference data.
+ */
+ //aDate = -3197120400000.;
+ aDate = -3197116800000.;
+ CHECK(status, "creating date format instance");
+ if(!fmt) {
+ errln("Coudln't create en_US instance");
+ } else {
+ UnicodeString str;
+ fmt2->format(aDate, str);
+ logln(UnicodeString() + "Test Date: " + str);
+ str.remove();
+ fmt->format(aDate, str);
+ logln(UnicodeString() + "as Japanese Calendar: " + str);
+ UnicodeString expected("Meiji 1");
+ if(str != expected) {
+ errln("Expected " + expected + " but got " + str);
+ }
+ UDate otherDate = fmt->parse(expected, status);
+ if(otherDate != aDate) {
+ UnicodeString str3;
+ ParsePosition pp;
+ fmt->parse(expected, *cal2, pp);
+ fmt->format(otherDate, str3);
+ errln("Parse incorrect of " + expected + " - wanted " + aDate + " but got " + " = " +
+ otherDate + ", " + str3 + " = " + CalendarTest::calToStr(*cal2) );
+ } else {
+ logln("Parsed OK: " + expected);
+ }
+ delete fmt;
+ }
+
+ delete cal2;
+ delete fmt2;
+ CHECK(status, "Error occured");
+
+ // Now, try in Japanese
+ {
+ UnicodeString expect = CharsToUnicodeString("\\u5e73\\u621013\\u5e749\\u67088\\u65e5\\u571f\\u66dc\\u65e5");
+ UDate expectDate = 999932400000.0; // Testing a recent date
+ Locale loc("ja_JP@calendar=japanese");
+
+ status = U_ZERO_ERROR;
+ simpleTest(loc, expect, expectDate, status);
+ }
+ {
+ UnicodeString expect = CharsToUnicodeString("\\u5e73\\u621013\\u5e749\\u67088\\u65e5\\u571f\\u66dc\\u65e5");
+ UDate expectDate = 999932400000.0; // Testing a recent date
+ Locale loc("ja_JP_TRADITIONAL"); // legacy
+
+ status = U_ZERO_ERROR;
+ simpleTest(loc, expect, expectDate, status);
+ }
+ {
+ UnicodeString expect = CharsToUnicodeString("\\u5b89\\u6c385\\u5e747\\u67084\\u65e5\\u6728\\u66dc\\u65e5");
+ //UDate expectDate = -6106035600000.0;
+ UDate expectDate = -6106032000000.0; // 1776-07-04T00:00:00Z-0800
+ Locale loc("ja_JP@calendar=japanese");
+
+ status = U_ZERO_ERROR;
+ simpleTest(loc, expect, expectDate, status);
+
+ }
+ { // Jitterbug 1869 - this is an ambiguous era. (Showa 64 = Jan 6 1989, but Showa could be 2 other eras) )
+ UnicodeString expect = CharsToUnicodeString("\\u662d\\u548c64\\u5e741\\u67086\\u65e5\\u91d1\\u66dc\\u65e5");
+ UDate expectDate = 600076800000.0;
+ Locale loc("ja_JP@calendar=japanese");
+
+ status = U_ZERO_ERROR;
+ simpleTest(loc, expect, expectDate, status);
+
+ }
+ { // This Feb 29th falls on a leap year by gregorian year, but not by Japanese year.
+ UnicodeString expect = CharsToUnicodeString("\\u5EB7\\u6B632\\u5e742\\u670829\\u65e5\\u65e5\\u66dc\\u65e5");
+ // Add -1:00 to the following for historical TZ - aliu
+ //UDate expectDate = -16214403600000.0; // courtesy of date format round trip test
+ UDate expectDate = -16214400000000.0; // 1456-03-09T00:00:00Z-0800
+ Locale loc("ja_JP@calendar=japanese");
+
+ status = U_ZERO_ERROR;
+ simpleTest(loc, expect, expectDate, status);
+
+ }
+}
+
+void IntlCalendarTest::TestJapanese3860()
+{
+ Calendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ cal = Calendar::createInstance("ja_JP@calendar=japanese", status);
+ CHECK(status, UnicodeString("Creating ja_JP@calendar=japanese calendar"));
+ Calendar *cal2 = cal->clone();
+ SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("HH:mm:ss.S MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
+ UnicodeString str;
+
+
+ {
+ // Test simple parse/format with adopt
+ UDate aDate = 0;
+
+ // Test parse with missing era (should default to current era, heisei)
+ // Test parse with incomplete information
+ logln("Testing parse w/ missing era...");
+ SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("y.M.d"), Locale("ja_JP@calendar=japanese"), status);
+ CHECK(status, "creating date format instance");
+ if(!fmt) {
+ errln("Coudln't create en_US instance");
+ } else {
+ UErrorCode s2 = U_ZERO_ERROR;
+ cal2->clear();
+ UnicodeString samplestr("1.1.9");
+ logln(UnicodeString() + "Test Year: " + samplestr);
+ aDate = fmt->parse(samplestr, s2);
+ ParsePosition pp=0;
+ fmt->parse(samplestr, *cal2, pp);
+ CHECK(s2, "parsing the 1.1.9 string");
+ logln("*cal2 after 119 parse:");
+ str.remove();
+ fmt2->format(aDate, str);
+ logln(UnicodeString() + "as Gregorian Calendar: " + str);
+
+ cal2->setTime(aDate, s2);
+ int32_t gotYear = cal2->get(UCAL_YEAR, s2);
+ int32_t gotEra = cal2->get(UCAL_ERA, s2);
+ int32_t expectYear = 1;
+ int32_t expectEra = JapaneseCalendar::getCurrentEra();
+ if((gotYear!=1) || (gotEra != expectEra)) {
+ errln(UnicodeString("parse "+samplestr+" of 'y.m.d' as Japanese Calendar, expected year ") + expectYear +
+ UnicodeString(" and era ") + expectEra +", but got year " + gotYear + " and era " + gotEra + " (Gregorian:" + str +")");
+ } else {
+ logln(UnicodeString() + " year: " + gotYear + ", era: " + gotEra);
+ }
+ delete fmt;
+ }
+ }
+
+#if 0
+ // this will NOT work - *all the time*. If it is the 1st of the month, for example it will get Jan 1 heisei 1 => jan 1 showa 64, wrong era.
+ {
+ // Test simple parse/format with adopt
+ UDate aDate = 0;
+
+ // Test parse with missing era (should default to current era, heisei)
+ // Test parse with incomplete information
+ logln("Testing parse w/ just year...");
+ SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("y"), Locale("ja_JP@calendar=japanese"), status);
+ CHECK(status, "creating date format instance");
+ if(!fmt) {
+ errln("Coudln't create en_US instance");
+ } else {
+ UErrorCode s2 = U_ZERO_ERROR;
+ cal2->clear();
+ UnicodeString samplestr("1");
+ logln(UnicodeString() + "Test Year: " + samplestr);
+ aDate = fmt->parse(samplestr, s2);
+ ParsePosition pp=0;
+ fmt->parse(samplestr, *cal2, pp);
+ CHECK(s2, "parsing the 1 string");
+ logln("*cal2 after 1 parse:");
+ str.remove();
+ fmt2->format(aDate, str);
+ logln(UnicodeString() + "as Gregorian Calendar: " + str);
+
+ cal2->setTime(aDate, s2);
+ int32_t gotYear = cal2->get(UCAL_YEAR, s2);
+ int32_t gotEra = cal2->get(UCAL_ERA, s2);
+ int32_t expectYear = 1;
+ int32_t expectEra = JapaneseCalendar::kCurrentEra;
+ if((gotYear!=1) || (gotEra != expectEra)) {
+ errln(UnicodeString("parse "+samplestr+" of 'y' as Japanese Calendar, expected year ") + expectYear +
+ UnicodeString(" and era ") + expectEra +", but got year " + gotYear + " and era " + gotEra + " (Gregorian:" + str +")");
+ } else {
+ logln(UnicodeString() + " year: " + gotYear + ", era: " + gotEra);
+ }
+ delete fmt;
+ }
+ }
+#endif
+ delete cal2;
+ delete cal;
+ delete fmt2;
+}
+
+
+
+
+/**
+ * Verify the Persian Calendar.
+ */
+void IntlCalendarTest::TestPersian() {
+ UDate timeA = Calendar::getNow();
+
+ Calendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ cal = Calendar::createInstance("fa_IR@calendar=persian", status);
+ CHECK(status, UnicodeString("Creating fa_IR@calendar=persian calendar"));
+ // Sanity check the calendar
+ UDate timeB = Calendar::getNow();
+ UDate timeCal = cal->getTime(status);
+
+ if(!(timeA <= timeCal) || !(timeCal <= timeB)) {
+ errln((UnicodeString)"Error: Calendar time " + timeCal +
+ " is not within sampled times [" + timeA + " to " + timeB + "]!");
+ }
+ // end sanity check
+// quasiGregorianTest(*cal,Locale("ja_JP"),data);
+ delete cal;
+}
+
+void IntlCalendarTest::TestPersianFormat() {
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale(" en_US@calendar=persian"), status);
+ CHECK(status, "creating date format instance");
+ SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
+ CHECK(status, "creating gregorian date format instance");
+ UnicodeString gregorianDate("January 18, 2007 AD");
+ UDate aDate = fmt2->parse(gregorianDate, status);
+ if(!fmt) {
+ errln("Coudln't create en_US instance");
+ } else {
+ UnicodeString str;
+ fmt->format(aDate, str);
+ logln(UnicodeString() + "as Persian Calendar: " + escape(str));
+ UnicodeString expected("Dey 28, 1385 AP");
+ if(str != expected) {
+ errln("Expected " + escape(expected) + " but got " + escape(str));
+ }
+ UDate otherDate = fmt->parse(expected, status);
+ if(otherDate != aDate) {
+ UnicodeString str3;
+ fmt->format(otherDate, str3);
+ errln("Parse incorrect of " + escape(expected) + " - wanted " + aDate + " but got " + otherDate + ", " + escape(str3));
+ } else {
+ logln("Parsed OK: " + expected);
+ }
+ delete fmt;
+ }
+ delete fmt2;
+
+ CHECK(status, "Error occured testing Persian Calendar in English ");
+}
+
+
+void IntlCalendarTest::simpleTest(const Locale& loc, const UnicodeString& expect, UDate expectDate, UErrorCode& status)
+{
+ UnicodeString tmp;
+ UDate d;
+ DateFormat *fmt0 = DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull);
+
+ logln("Try format/parse of " + (UnicodeString)loc.getName());
+ DateFormat *fmt2 = DateFormat::createDateInstance(DateFormat::kFull, loc);
+ if(fmt2) {
+ fmt2->format(expectDate, tmp);
+ logln(escape(tmp) + " ( in locale " + loc.getName() + ")");
+ if(tmp != expect) {
+ errln(UnicodeString("Failed to format " ) + loc.getName() + " expected " + escape(expect) + " got " + escape(tmp) );
+ }
+
+ d = fmt2->parse(expect,status);
+ CHECK(status, "Error occured parsing " + UnicodeString(loc.getName()));
+ if(d != expectDate) {
+ fmt2->format(d,tmp);
+ errln(UnicodeString("Failed to parse " ) + escape(expect) + ", " + loc.getName() + " expect " + (double)expectDate + " got " + (double)d + " " + escape(tmp));
+ logln( "wanted " + escape(fmt0->format(expectDate,tmp.remove())) + " but got " + escape(fmt0->format(d,tmp.remove())));
+ }
+ delete fmt2;
+ } else {
+ errln((UnicodeString)"Can't create " + loc.getName() + " date instance");
+ }
+ delete fmt0;
+}
+
+#undef CHECK
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/incaltst.h b/Build/source/libs/icu/icu-xetex/test/intltest/incaltst.h
new file mode 100644
index 00000000000..2c03ce32313
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/incaltst.h
@@ -0,0 +1,53 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef __IntlCalendarTest__
+#define __IntlCalendarTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/calendar.h"
+#include "unicode/smpdtfmt.h"
+#include "caltztst.h"
+
+class IntlCalendarTest: public CalendarTimeZoneTest {
+public:
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+ void TestTypes(void);
+
+ void TestGregorian(void);
+
+ void TestBuddhist(void);
+ void TestBuddhistFormat(void);
+
+ void TestTaiwan(void);
+
+ void TestJapanese(void);
+ void TestJapaneseFormat(void);
+ void TestJapanese3860(void);
+
+ void TestPersian(void);
+ void TestPersianFormat(void);
+
+ protected:
+ // Test a Gregorian-Like calendar
+ void quasiGregorianTest(Calendar& cal, const Locale& gregoLocale, const int32_t *data);
+ void simpleTest(const Locale& loc, const UnicodeString& expect, UDate expectDate, UErrorCode& status);
+
+public: // package
+ // internal routine for checking date
+ static UnicodeString value(Calendar* calendar);
+
+};
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // __IntlCalendarTest__
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/intltest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/intltest.cpp
new file mode 100644
index 00000000000..2a676bb0d41
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/intltest.cpp
@@ -0,0 +1,1590 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#include "unicode/utypes.h"
+
+/**
+ * IntlTest is a base class for tests.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include "unicode/unistr.h"
+#include "unicode/ures.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/ucnv.h"
+#include "unicode/uclean.h"
+#include "unicode/timezone.h"
+#include "unicode/curramt.h"
+#include "unicode/putil.h"
+
+#include "intltest.h"
+#include "caltztst.h"
+#include "itmajor.h"
+#include "cstring.h"
+#include "umutex.h"
+#include "uassert.h"
+#include "cmemory.h"
+#include "uoptions.h"
+
+#include "putilimp.h" // for uprv_getUTCtime()
+#include "unicode/locid.h"
+
+
+#ifdef XP_MAC_CONSOLE
+#include <console.h>
+#include "Files.h"
+#endif
+
+
+static char* _testDataPath=NULL;
+
+// Static list of errors found
+static UnicodeString errorList;
+
+//-----------------------------------------------------------------------------
+//convenience classes to ease porting code that uses the Java
+//string-concatenation operator (moved from findword test by rtg)
+
+// [LIU] Just to get things working
+UnicodeString
+UCharToUnicodeString(UChar c)
+{ return UnicodeString(c); }
+
+// [rtg] Just to get things working
+UnicodeString
+operator+(const UnicodeString& left,
+ long num)
+{
+ char buffer[64]; // nos changed from 10 to 64
+ char danger = 'p'; // guard against overrunning the buffer (rtg)
+
+ sprintf(buffer, "%ld", num);
+ assert(danger == 'p');
+
+ return left + buffer;
+}
+
+UnicodeString
+operator+(const UnicodeString& left,
+ unsigned long num)
+{
+ char buffer[64]; // nos changed from 10 to 64
+ char danger = 'p'; // guard against overrunning the buffer (rtg)
+
+ sprintf(buffer, "%lu", num);
+ assert(danger == 'p');
+
+ return left + buffer;
+}
+
+UnicodeString
+Int64ToUnicodeString(int64_t num)
+{
+ char buffer[64]; // nos changed from 10 to 64
+ char danger = 'p'; // guard against overrunning the buffer (rtg)
+
+#ifdef U_WINDOWS
+ sprintf(buffer, "%I64d", num);
+#else
+ sprintf(buffer, "%lld", (long long)num);
+#endif
+ assert(danger == 'p');
+
+ return buffer;
+}
+
+// [LIU] Just to get things working
+UnicodeString
+operator+(const UnicodeString& left,
+ double num)
+{
+ char buffer[64]; // was 32, made it arbitrarily bigger (rtg)
+ char danger = 'p'; // guard against overrunning the buffer (rtg)
+
+ // IEEE floating point has 52 bits of mantissa, plus one assumed bit
+ // 53*log(2)/log(10) = 15.95
+ // so there is no need to show more than 16 digits. [alan]
+
+ sprintf(buffer, "%.17g", num);
+ assert(danger == 'p');
+
+ return left + buffer;
+}
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * Return a string display for for this, without surrounding braces.
+ */
+UnicodeString _toString(const Formattable& f) {
+ UnicodeString s;
+ switch (f.getType()) {
+ case Formattable::kDate:
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat fmt(status);
+ if (U_SUCCESS(status)) {
+ FieldPosition pos;
+ fmt.format(f.getDate(), s, pos);
+ s.insert(0, "Date:");
+ } else {
+ s = UnicodeString("Error creating date format]");
+ }
+ }
+ break;
+ case Formattable::kDouble:
+ s = UnicodeString("double:") + f.getDouble();
+ break;
+ case Formattable::kLong:
+ s = UnicodeString("long:") + f.getLong();
+ break;
+
+ case Formattable::kInt64:
+ s = UnicodeString("int64:") + Int64ToUnicodeString(f.getInt64());
+ break;
+
+ case Formattable::kString:
+ f.getString(s);
+ s.insert(0, "String:");
+ break;
+ case Formattable::kArray:
+ {
+ int32_t i, n;
+ const Formattable* array = f.getArray(n);
+ s.insert(0, UnicodeString("Array:"));
+ UnicodeString delim(", ");
+ for (i=0; i<n; ++i) {
+ if (i > 0) {
+ s.append(delim);
+ }
+ s = s + _toString(array[i]);
+ }
+ }
+ break;
+ case Formattable::kObject:
+ if (f.getObject()->getDynamicClassID() ==
+ CurrencyAmount::getStaticClassID()) {
+ const CurrencyAmount& c = (const CurrencyAmount&) *f.getObject();
+ s = _toString(c.getNumber()) + " " + UnicodeString(c.getISOCurrency());
+ } else {
+ s = UnicodeString("Unknown UObject");
+ }
+ break;
+ default:
+ s = UnicodeString("Unknown Formattable type=") + (int32_t)f.getType();
+ break;
+ }
+ return s;
+}
+
+/**
+ * Originally coded this as operator+, but that makes the expression
+ * + char* ambiguous. - liu
+ */
+UnicodeString toString(const Formattable& f) {
+ UnicodeString s((UChar)91/*[*/);
+ s.append(_toString(f));
+ s.append((UChar)0x5d/*]*/);
+ return s;
+}
+
+#endif
+
+// useful when operator+ won't cooperate
+UnicodeString toString(int32_t n) {
+ return UnicodeString() + (long)n;
+}
+
+// stephen - cleaned up 05/05/99
+UnicodeString operator+(const UnicodeString& left, char num)
+{ return left + (long)num; }
+UnicodeString operator+(const UnicodeString& left, short num)
+{ return left + (long)num; }
+UnicodeString operator+(const UnicodeString& left, int num)
+{ return left + (long)num; }
+UnicodeString operator+(const UnicodeString& left, unsigned char num)
+{ return left + (unsigned long)num; }
+UnicodeString operator+(const UnicodeString& left, unsigned short num)
+{ return left + (unsigned long)num; }
+UnicodeString operator+(const UnicodeString& left, unsigned int num)
+{ return left + (unsigned long)num; }
+UnicodeString operator+(const UnicodeString& left, float num)
+{ return left + (double)num; }
+
+//------------------
+
+// Append a hex string to the target
+UnicodeString&
+IntlTest::appendHex(uint32_t number,
+ int32_t digits,
+ UnicodeString& target)
+{
+ static const UChar digitString[] = {
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+ 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0
+ }; /* "0123456789ABCDEF" */
+
+ switch (digits)
+ {
+ case 8:
+ target += digitString[(number >> 28) & 0xF];
+ case 7:
+ target += digitString[(number >> 24) & 0xF];
+ case 6:
+ target += digitString[(number >> 20) & 0xF];
+ case 5:
+ target += digitString[(number >> 16) & 0xF];
+ case 4:
+ target += digitString[(number >> 12) & 0xF];
+ case 3:
+ target += digitString[(number >> 8) & 0xF];
+ case 2:
+ target += digitString[(number >> 4) & 0xF];
+ case 1:
+ target += digitString[(number >> 0) & 0xF];
+ break;
+ default:
+ target += "**";
+ }
+ return target;
+}
+
+// Replace nonprintable characters with unicode escapes
+UnicodeString&
+IntlTest::prettify(const UnicodeString &source,
+ UnicodeString &target)
+{
+ int32_t i;
+
+ target.remove();
+ target += "\"";
+
+ for (i = 0; i < source.length(); )
+ {
+ UChar32 ch = source.char32At(i);
+ i += UTF_CHAR_LENGTH(ch);
+
+ if (ch < 0x09 || (ch > 0x0A && ch < 0x20)|| ch > 0x7E)
+ {
+ if (ch <= 0xFFFF) {
+ target += "\\u";
+ appendHex(ch, 4, target);
+ } else {
+ target += "\\U";
+ appendHex(ch, 8, target);
+ }
+ }
+ else
+ {
+ target += ch;
+ }
+ }
+
+ target += "\"";
+
+ return target;
+}
+
+// Replace nonprintable characters with unicode escapes
+UnicodeString
+IntlTest::prettify(const UnicodeString &source, UBool parseBackslash)
+{
+ int32_t i;
+ UnicodeString target;
+ target.remove();
+ target += "\"";
+
+ for (i = 0; i < source.length();)
+ {
+ UChar32 ch = source.char32At(i);
+ i += UTF_CHAR_LENGTH(ch);
+
+ if (ch < 0x09 || (ch > 0x0A && ch < 0x20)|| ch > 0x7E)
+ {
+ if (parseBackslash) {
+ // If we are preceded by an odd number of backslashes,
+ // then this character has already been backslash escaped.
+ // Delete a backslash.
+ int32_t backslashCount = 0;
+ for (int32_t j=target.length()-1; j>=0; --j) {
+ if (target.charAt(j) == (UChar)92) {
+ ++backslashCount;
+ } else {
+ break;
+ }
+ }
+ if ((backslashCount % 2) == 1) {
+ target.truncate(target.length() - 1);
+ }
+ }
+ if (ch <= 0xFFFF) {
+ target += "\\u";
+ appendHex(ch, 4, target);
+ } else {
+ target += "\\U";
+ appendHex(ch, 8, target);
+ }
+ }
+ else
+ {
+ target += ch;
+ }
+ }
+
+ target += "\"";
+
+ return target;
+}
+
+/* IntlTest::setICU_DATA - if the ICU_DATA environment variable is not already
+ * set, try to deduce the directory in which ICU was built,
+ * and set ICU_DATA to "icu/source/data" in that location.
+ * The intent is to allow the tests to have a good chance
+ * of running without requiring that the user manually set
+ * ICU_DATA. Common data isn't a problem, since it is
+ * picked up via a static (build time) reference, but the
+ * tests dynamically load some data.
+ */
+void IntlTest::setICU_DATA() {
+ const char *original_ICU_DATA = getenv("ICU_DATA");
+
+ if (original_ICU_DATA != NULL && *original_ICU_DATA != 0) {
+ /* If the user set ICU_DATA, don't second-guess the person. */
+ return;
+ }
+
+ // U_TOPBUILDDIR is set by the makefiles on UNIXes when building cintltst and intltst
+ // to point to the top of the build hierarchy, which may or
+ // may not be the same as the source directory, depending on
+ // the configure options used. At any rate,
+ // set the data path to the built data from this directory.
+ // The value is complete with quotes, so it can be used
+ // as-is as a string constant.
+
+#if defined (U_TOPBUILDDIR)
+ {
+ static char env_string[] = U_TOPBUILDDIR "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
+ u_setDataDirectory(env_string);
+ return;
+ }
+
+#else
+ // Use #else so we don't get compiler warnings due to the return above.
+
+ /* On Windows, the file name obtained from __FILE__ includes a full path.
+ * This file is "wherever\icu\source\test\cintltst\cintltst.c"
+ * Change to "wherever\icu\source\data"
+ */
+ {
+ char p[sizeof(__FILE__) + 10];
+ char *pBackSlash;
+ int i;
+
+ strcpy(p, __FILE__);
+ /* We want to back over three '\' chars. */
+ /* Only Windows should end up here, so looking for '\' is safe. */
+ for (i=1; i<=3; i++) {
+ pBackSlash = strrchr(p, U_FILE_SEP_CHAR);
+ if (pBackSlash != NULL) {
+ *pBackSlash = 0; /* Truncate the string at the '\' */
+ }
+ }
+
+ if (pBackSlash != NULL) {
+ /* We found and truncated three names from the path.
+ * Now append "source\data" and set the environment
+ */
+ strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING);
+ u_setDataDirectory(p); /* p is "ICU_DATA=wherever\icu\source\data" */
+ return;
+ }
+ else {
+ /* __FILE__ on MSVC7 does not contain the directory */
+ u_setDataDirectory(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING);
+ return;
+ }
+ }
+#endif
+
+ /* No location for the data dir was identifiable.
+ * Add other fallbacks for the test data location here if the need arises
+ */
+}
+
+
+//--------------------------------------------------------------------------------------
+
+static const int32_t indentLevel_offset = 3;
+static const char delim = '/';
+
+IntlTest* IntlTest::gTest = NULL;
+
+static int32_t execCount = 0;
+
+void it_log( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->log( message );
+}
+
+void it_logln( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->logln( message );
+}
+
+void it_logln( void )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->logln();
+}
+
+void it_info( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->info( message );
+}
+
+void it_infoln( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->infoln( message );
+}
+
+void it_infoln( void )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->infoln();
+}
+
+void it_err()
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->err();
+}
+
+void it_err( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->err( message );
+}
+
+void it_errln( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->errln( message );
+}
+
+void it_dataerr( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->dataerr( message );
+}
+
+void it_dataerrln( UnicodeString message )
+{
+ if (IntlTest::gTest)
+ IntlTest::gTest->dataerrln( message );
+}
+
+IntlTest::IntlTest()
+{
+ caller = NULL;
+ testPath = NULL;
+ LL_linestart = TRUE;
+ errorCount = 0;
+ dataErrorCount = 0;
+ verbose = FALSE;
+ no_err_msg = FALSE;
+ warn_on_missing_data = FALSE;
+ quick = FALSE;
+ leaks = FALSE;
+ testoutfp = stdout;
+ LL_indentlevel = indentLevel_offset;
+}
+
+void IntlTest::setCaller( IntlTest* callingTest )
+{
+ caller = callingTest;
+ if (caller) {
+ verbose = caller->verbose;
+ no_err_msg = caller->no_err_msg;
+ quick = caller->quick;
+ testoutfp = caller->testoutfp;
+ LL_indentlevel = caller->LL_indentlevel + indentLevel_offset;
+ }
+}
+
+UBool IntlTest::callTest( IntlTest& testToBeCalled, char* par )
+{
+ execCount--; // correct a previously assumed test-exec, as this only calls a subtest
+ testToBeCalled.setCaller( this );
+ return testToBeCalled.runTest( testPath, par );
+}
+
+void IntlTest::setPath( char* pathVal )
+{
+ this->testPath = pathVal;
+}
+
+UBool IntlTest::setVerbose( UBool verboseVal )
+{
+ UBool rval = this->verbose;
+ this->verbose = verboseVal;
+ return rval;
+}
+
+UBool IntlTest::setWarnOnMissingData( UBool warn_on_missing_dataVal )
+{
+ UBool rval = this->warn_on_missing_data;
+ this->warn_on_missing_data = warn_on_missing_dataVal;
+ return rval;
+}
+
+UBool IntlTest::setNoErrMsg( UBool no_err_msgVal )
+{
+ UBool rval = this->no_err_msg;
+ this->no_err_msg = no_err_msgVal;
+ return rval;
+}
+
+UBool IntlTest::setQuick( UBool quickVal )
+{
+ UBool rval = this->quick;
+ this->quick = quickVal;
+ return rval;
+}
+
+UBool IntlTest::setLeaks( UBool leaksVal )
+{
+ UBool rval = this->leaks;
+ this->leaks = leaksVal;
+ return rval;
+}
+
+int32_t IntlTest::getErrors( void )
+{
+ return errorCount;
+}
+
+int32_t IntlTest::getDataErrors( void )
+{
+ return dataErrorCount;
+}
+
+UBool IntlTest::runTest( char* name, char* par )
+{
+ UBool rval;
+ char* pos = NULL;
+
+ if (name)
+ pos = strchr( name, delim ); // check if name contains path (by looking for '/')
+ if (pos) {
+ testPath = pos+1; // store subpath for calling subtest
+ *pos = 0; // split into two strings
+ }else{
+ testPath = NULL;
+ }
+
+ if (!name || (name[0] == 0) || (strcmp(name, "*") == 0)) {
+ rval = runTestLoop( NULL, par );
+
+ }else if (strcmp( name, "LIST" ) == 0) {
+ this->usage();
+ rval = TRUE;
+
+ }else{
+ rval = runTestLoop( name, par );
+ }
+
+ if (pos)
+ *pos = delim; // restore original value at pos
+ return rval;
+}
+
+// call individual tests, to be overriden to call implementations
+void IntlTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ // to be overriden by a method like:
+ /*
+ switch (index) {
+ case 0: name = "First Test"; if (exec) FirstTest( par ); break;
+ case 1: name = "Second Test"; if (exec) SecondTest( par ); break;
+ default: name = ""; break;
+ }
+ */
+ this->errln("*** runIndexedTest needs to be overriden! ***");
+ name = ""; exec = exec; index = index; par = par;
+}
+
+
+UBool IntlTest::runTestLoop( char* testname, char* par )
+{
+ int32_t index = 0;
+ const char* name;
+ UBool run_this_test;
+ int32_t lastErrorCount;
+ UBool rval = FALSE;
+ UBool lastTestFailed;
+
+ IntlTest* saveTest = gTest;
+ gTest = this;
+ do {
+ this->runIndexedTest( index, FALSE, name, par );
+ if (!name || (name[0] == 0))
+ break;
+ if (!testname) {
+ run_this_test = TRUE;
+ }else{
+ run_this_test = (UBool) (strcmp( name, testname ) == 0);
+ }
+ if (run_this_test) {
+ lastErrorCount = errorCount;
+ execCount++;
+ this->runIndexedTest( index, TRUE, name, par );
+ rval = TRUE; // at least one test has been called
+ char msg[256];
+ if (lastErrorCount == errorCount) {
+ sprintf( msg, "---OK: %s", name );
+ lastTestFailed = FALSE;
+ }else{
+ sprintf(msg, "---ERRORS (%li) in %s", (long)(errorCount-lastErrorCount), name);
+
+ for(int i=0;i<LL_indentlevel;i++) {
+ errorList += " ";
+ }
+ errorList += name;
+ errorList += "\n";
+ lastTestFailed = TRUE;
+ }
+ LL_indentlevel -= 3;
+ if (lastTestFailed) {
+ LL_message( "", TRUE);
+ }
+ LL_message( msg, TRUE);
+ if (lastTestFailed) {
+ LL_message( "", TRUE);
+ }
+ LL_indentlevel += 3;
+ }
+ index++;
+ }while(name);
+
+ gTest = saveTest;
+ return rval;
+}
+
+
+/**
+* Adds given string to the log if we are in verbose mode.
+*/
+void IntlTest::log( const UnicodeString &message )
+{
+ if( verbose ) {
+ LL_message( message, FALSE );
+ }
+}
+
+/**
+* Adds given string to the log if we are in verbose mode. Adds a new line to
+* the given message.
+*/
+void IntlTest::logln( const UnicodeString &message )
+{
+ if( verbose ) {
+ LL_message( message, TRUE );
+ }
+}
+
+void IntlTest::logln( void )
+{
+ if( verbose ) {
+ LL_message( "", TRUE );
+ }
+}
+
+/**
+* Unconditionally adds given string to the log.
+*/
+void IntlTest::info( const UnicodeString &message )
+{
+ LL_message( message, FALSE );
+}
+
+/**
+* Unconditionally adds given string to the log. Adds a new line to
+* the given message.
+*/
+void IntlTest::infoln( const UnicodeString &message )
+{
+ LL_message( message, TRUE );
+}
+
+void IntlTest::infoln( void )
+{
+ LL_message( "", TRUE );
+}
+
+int32_t IntlTest::IncErrorCount( void )
+{
+ errorCount++;
+ if (caller) caller->IncErrorCount();
+ return errorCount;
+}
+
+int32_t IntlTest::IncDataErrorCount( void )
+{
+ dataErrorCount++;
+ if (caller) caller->IncDataErrorCount();
+ return dataErrorCount;
+}
+
+void IntlTest::err()
+{
+ IncErrorCount();
+}
+
+void IntlTest::err( const UnicodeString &message )
+{
+ IncErrorCount();
+ if (!no_err_msg) LL_message( message, FALSE );
+}
+
+void IntlTest::errln( const UnicodeString &message )
+{
+ IncErrorCount();
+ if (!no_err_msg) LL_message( message, TRUE );
+}
+
+void IntlTest::dataerr( const UnicodeString &message )
+{
+ IncDataErrorCount();
+
+ if (!warn_on_missing_data) {
+ IncErrorCount();
+ }
+
+ if (!no_err_msg) LL_message( message, FALSE );
+}
+
+void IntlTest::dataerrln( const UnicodeString &message )
+{
+ IncDataErrorCount();
+
+ if (!warn_on_missing_data) {
+ IncErrorCount();
+ }
+
+ if (!no_err_msg) LL_message( message, TRUE );
+}
+
+/* convenience functions that include sprintf formatting */
+void IntlTest::log(const char *fmt, ...)
+{
+ char buffer[4000];
+ va_list ap;
+
+ va_start(ap, fmt);
+ /* sprintf it just to make sure that the information is valid */
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+ if( verbose ) {
+ log(UnicodeString(buffer, ""));
+ }
+}
+
+void IntlTest::logln(const char *fmt, ...)
+{
+ char buffer[4000];
+ va_list ap;
+
+ va_start(ap, fmt);
+ /* sprintf it just to make sure that the information is valid */
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+ if( verbose ) {
+ logln(UnicodeString(buffer, ""));
+ }
+}
+
+/* convenience functions that include sprintf formatting */
+void IntlTest::info(const char *fmt, ...)
+{
+ char buffer[4000];
+ va_list ap;
+
+ va_start(ap, fmt);
+ /* sprintf it just to make sure that the information is valid */
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+ info(UnicodeString(buffer, ""));
+}
+
+void IntlTest::infoln(const char *fmt, ...)
+{
+ char buffer[4000];
+ va_list ap;
+
+ va_start(ap, fmt);
+ /* sprintf it just to make sure that the information is valid */
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+ infoln(UnicodeString(buffer, ""));
+}
+
+void IntlTest::err(const char *fmt, ...)
+{
+ char buffer[4000];
+ va_list ap;
+
+ va_start(ap, fmt);
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+ err(UnicodeString(buffer, ""));
+}
+
+void IntlTest::errln(const char *fmt, ...)
+{
+ char buffer[4000];
+ va_list ap;
+
+ va_start(ap, fmt);
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+ errln(UnicodeString(buffer, ""));
+}
+
+void IntlTest::dataerrln(const char *fmt, ...)
+{
+ char buffer[4000];
+ va_list ap;
+
+ va_start(ap, fmt);
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+ dataerrln(UnicodeString(buffer, ""));
+}
+
+void IntlTest::printErrors()
+{
+ IntlTest::LL_message(errorList, TRUE);
+}
+
+void IntlTest::LL_message( UnicodeString message, UBool newline )
+{
+ // string that starts with a LineFeed character and continues
+ // with spaces according to the current indentation
+ static const UChar indentUChars[] = {
+ '\n',
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
+ };
+ UnicodeString indent(FALSE, indentUChars, 1 + LL_indentlevel);
+
+ char buffer[10000];
+ int32_t length;
+
+ // stream out the indentation string first if necessary
+ length = indent.extract(1, indent.length(), buffer, sizeof(buffer));
+ if (length > 0) {
+ fwrite(buffer, sizeof(*buffer), length, (FILE *)testoutfp);
+ }
+
+ // replace each LineFeed by the indentation string
+ message.findAndReplace(UnicodeString((UChar)'\n'), indent);
+
+ // stream out the message
+ length = message.extract(0, message.length(), buffer, sizeof(buffer));
+ if (length > 0) {
+ length = length > 10000 ? 10000 : length;
+ fwrite(buffer, sizeof(*buffer), length, (FILE *)testoutfp);
+ }
+
+ if (newline) {
+ char newLine = '\n';
+ fwrite(&newLine, sizeof(newLine), 1, (FILE *)testoutfp);
+ }
+
+ // A newline usually flushes the buffer, but
+ // flush the message just in case of a core dump.
+ fflush((FILE *)testoutfp);
+}
+
+/**
+* Print a usage message for this test class.
+*/
+void IntlTest::usage( void )
+{
+ UBool save_verbose = setVerbose( TRUE );
+ logln("Test names:");
+ logln("-----------");
+
+ int32_t index = 0;
+ const char* name = NULL;
+ do{
+ this->runIndexedTest( index, FALSE, name );
+ if (!name) break;
+ logln(name);
+ index++;
+ }while (name && (name[0] != 0));
+ setVerbose( save_verbose );
+}
+
+
+// memory leak reporting software will be able to take advantage of the testsuite
+// being run a second time local to a specific method in order to report only actual leaks
+UBool
+IntlTest::run_phase2( char* name, char* par ) // supports reporting memory leaks
+{
+ UnicodeString* strLeak = new UnicodeString("forced leak"); // for verifying purify filter
+ strLeak->append(" for verifying purify filter");
+ return this->runTest( name, par );
+}
+
+
+#if UCONFIG_NO_LEGACY_CONVERSION
+# define TRY_CNV_1 "iso-8859-1"
+# define TRY_CNV_2 "ibm-1208"
+#else
+# define TRY_CNV_1 "iso-8859-7"
+# define TRY_CNV_2 "sjis"
+#endif
+
+int
+main(int argc, char* argv[])
+{
+ UBool syntax = FALSE;
+ UBool all = FALSE;
+ UBool verbose = FALSE;
+ UBool no_err_msg = FALSE;
+ UBool quick = TRUE;
+ UBool name = FALSE;
+ UBool leaks = FALSE;
+ UBool warnOnMissingData = FALSE;
+ UBool defaultDataFound = FALSE;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UConverter *cnv = NULL;
+ const char *warnOrErr = "Failure";
+ UDate startTime, endTime;
+ int32_t diffTime;
+
+ U_MAIN_INIT_ARGS(argc, argv);
+
+ startTime = uprv_getUTCtime();
+
+ for (int i = 1; i < argc; ++i) {
+ if (argv[i][0] == '-') {
+ const char* str = argv[i] + 1;
+ if (strcmp("verbose", str) == 0 ||
+ strcmp("v", str) == 0)
+ verbose = TRUE;
+ else if (strcmp("noerrormsg", str) == 0 ||
+ strcmp("n", str) == 0)
+ no_err_msg = TRUE;
+ else if (strcmp("exhaustive", str) == 0 ||
+ strcmp("e", str) == 0)
+ quick = FALSE;
+ else if (strcmp("all", str) == 0 ||
+ strcmp("a", str) == 0)
+ all = TRUE;
+ else if (strcmp("leaks", str) == 0 ||
+ strcmp("l", str) == 0)
+ leaks = TRUE;
+ else if (strcmp("w", str) == 0) {
+ warnOnMissingData = TRUE;
+ warnOrErr = "WARNING";
+ }
+ else {
+ syntax = TRUE;
+ }
+ }else{
+ name = TRUE;
+ }
+ }
+
+ if (!all && !name) {
+ all = TRUE;
+ } else if (all && name) {
+ syntax = TRUE;
+ }
+
+ if (syntax) {
+ fprintf(stdout,
+ "### Syntax:\n"
+ "### IntlTest [-option1 -option2 ...] [testname1 testname2 ...] \n"
+ "### where options are: verbose (v), all (a), noerrormsg (n), \n"
+ "### exhaustive (e), leaks (l)"
+ "### (Specify either -all (shortcut -a) or a test name). \n"
+ "### -all will run all of the tests.\n"
+ "### \n"
+ "### To get a list of the test names type: intltest LIST \n"
+ "### To run just the utility tests type: intltest utility \n"
+ "### \n"
+ "### Test names can be nested using slashes (\"testA/subtest1\") \n"
+ "### For example to list the utility tests type: intltest utility/LIST \n"
+ "### To run just the Locale test type: intltest utility/LocaleTest \n"
+ "### \n"
+ "### A parameter can be specified for a test by appending '@' and the value \n"
+ "### to the testname. \n\n");
+ return 1;
+ }
+
+ UBool all_tests_exist = TRUE;
+ MajorTestLevel major;
+ major.setVerbose( verbose );
+ major.setNoErrMsg( no_err_msg );
+ major.setQuick( quick );
+ major.setLeaks( leaks );
+ major.setWarnOnMissingData( warnOnMissingData );
+ fprintf(stdout, "-----------------------------------------------\n");
+ fprintf(stdout, " IntlTest (C++) Test Suite for \n");
+ fprintf(stdout, " International Components for Unicode %s\n", U_ICU_VERSION);
+ fprintf(stdout, "-----------------------------------------------\n");
+ fprintf(stdout, " Options: \n");
+ fprintf(stdout, " all (a) : %s\n", (all? "On" : "Off"));
+ fprintf(stdout, " Verbose (v) : %s\n", (verbose? "On" : "Off"));
+ fprintf(stdout, " No error messages (n) : %s\n", (no_err_msg? "On" : "Off"));
+ fprintf(stdout, " Exhaustive (e) : %s\n", (!quick? "On" : "Off"));
+ fprintf(stdout, " Leaks (l) : %s\n", (leaks? "On" : "Off"));
+ fprintf(stdout, " Warn on missing data (w) : %s\n", (warnOnMissingData? "On" : "Off"));
+ fprintf(stdout, "-----------------------------------------------\n");
+
+ /* Check whether ICU will initialize without forcing the build data directory into
+ * the ICU_DATA path. Success here means either the data dll contains data, or that
+ * this test program was run with ICU_DATA set externally. Failure of this check
+ * is normal when ICU data is not packaged into a shared library.
+ *
+ * Whether or not this test succeeds, we want to cleanup and reinitialize
+ * with a data path so that data loading from individual files can be tested.
+ */
+ u_init(&errorCode);
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### Note: ICU Init without build-specific setDataDirectory() failed.\n");
+ defaultDataFound = FALSE;
+ }
+ else {
+ defaultDataFound = TRUE;
+ }
+ u_cleanup();
+ errorCode = U_ZERO_ERROR;
+
+ /* Initialize ICU */
+ if (!defaultDataFound) {
+ IntlTest::setICU_DATA(); // Must set data directory before u_init() is called.
+ }
+ u_init(&errorCode);
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### ERROR! %s: u_init() failed with status = \"%s\".\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", argv[0], u_errorName(errorCode));
+ if(warnOnMissingData == 0) {
+ fprintf(stderr, "*** Exiting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
+ u_cleanup();
+ return 1;
+ }
+ }
+
+
+ // initial check for the default converter
+ errorCode = U_ZERO_ERROR;
+ cnv = ucnv_open(0, &errorCode);
+ if(cnv != 0) {
+ // ok
+ ucnv_close(cnv);
+ } else {
+ fprintf(stdout,
+ "*** %s! The default converter [%s] cannot be opened.\n"
+ "*** Check the ICU_DATA environment variable and\n"
+ "*** check that the data files are present.\n",
+ warnOrErr, ucnv_getDefaultName());
+ if(!warnOnMissingData) {
+ fprintf(stdout, "*** Exiting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
+ return 1;
+ }
+ }
+
+ // try more data
+ cnv = ucnv_open(TRY_CNV_2, &errorCode);
+ if(cnv != 0) {
+ // ok
+ ucnv_close(cnv);
+ } else {
+ fprintf(stdout,
+ "*** %s! The converter for " TRY_CNV_2 " cannot be opened.\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", warnOrErr);
+ if(!warnOnMissingData) {
+ fprintf(stdout, "*** Exiting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
+ return 1;
+ }
+ }
+
+ UResourceBundle *rb = ures_open(0, "en", &errorCode);
+ ures_close(rb);
+ if(U_FAILURE(errorCode)) {
+ fprintf(stdout,
+ "*** %s! The \"en\" locale resource bundle cannot be opened.\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", warnOrErr);
+ if(!warnOnMissingData) {
+ fprintf(stdout, "*** Exiting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
+ return 1;
+ }
+ }
+
+ Locale originalLocale; // Save the default locale for comparison later on.
+
+ /* TODO: Add option to call u_cleanup and rerun tests. */
+ if (all) {
+ major.runTest();
+ if (leaks) {
+ major.run_phase2( NULL, NULL );
+ }
+ }else{
+ for (int i = 1; i < argc; ++i) {
+ if (argv[i][0] != '-') {
+ char* name = argv[i];
+ fprintf(stdout, "\n=== Handling test: %s: ===\n", name);
+ char* parameter = strchr( name, '@' );
+ if (parameter) {
+ *parameter = 0;
+ parameter += 1;
+ }
+ execCount = 0;
+ UBool res = major.runTest( name, parameter );
+ if (leaks && res) {
+ major.run_phase2( name, parameter );
+ }
+ if (!res || (execCount <= 0)) {
+ fprintf(stdout, "\n---ERROR: Test doesn't exist: %s!\n", name);
+ all_tests_exist = FALSE;
+ }
+ }
+ }
+ }
+
+#if !UCONFIG_NO_FORMATTING
+ CalendarTimeZoneTest::cleanup();
+#endif
+
+ free(_testDataPath);
+ _testDataPath = 0;
+
+ Locale lastDefaultLocale;
+ if (originalLocale != lastDefaultLocale) {
+ major.errln("FAILURE: A test changed the default locale without resetting it.");
+ }
+
+ fprintf(stdout, "\n--------------------------------------\n");
+ if (major.getErrors() == 0) {
+ /* Call it twice to make sure that the defaults were reset. */
+ /* Call it before the OK message to verify proper cleanup. */
+ u_cleanup();
+ u_cleanup();
+
+ fprintf(stdout, "OK: All tests passed without error.\n");
+
+ if (major.getDataErrors() != 0) {
+ fprintf(stdout, "\t*WARNING* some data-loading errors were ignored by the -w option.\n");
+ }
+ }else{
+ fprintf(stdout, "Errors in total: %ld.\n", (long)major.getErrors());
+ major.printErrors();
+
+
+ if (major.getDataErrors() != 0) {
+ fprintf(stdout, "\t*Note* some errors are data-loading related. If the data used is not the \n"
+ "\tstock ICU data (i.e some have been added or removed), consider using\n"
+ "\tthe '-w' option to turn these errors into warnings.\n");
+ }
+
+ /* Call afterwards to display errors. */
+ u_cleanup();
+ }
+
+ fprintf(stdout, "--------------------------------------\n");
+
+ if (execCount <= 0) {
+ fprintf(stdout, "***** Not all called tests actually exist! *****\n");
+ }
+ endTime = uprv_getUTCtime();
+ diffTime = (int32_t)(endTime - startTime);
+ printf("Elapsed Time: %02d:%02d:%02d.%03d\n",
+ (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR),
+ (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE),
+ (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND),
+ (int)(diffTime%U_MILLIS_PER_SECOND));
+ return major.getErrors();
+}
+
+const char* IntlTest::loadTestData(UErrorCode& err){
+ if( _testDataPath == NULL){
+ const char* directory=NULL;
+ UResourceBundle* test =NULL;
+ char* tdpath=NULL;
+ const char* tdrelativepath;
+
+#if defined (U_TOPBUILDDIR)
+ tdrelativepath = "test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ directory = U_TOPBUILDDIR;
+#else
+ tdrelativepath = ".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ directory = pathToDataDirectory();
+#endif
+
+ tdpath = (char*) malloc(sizeof(char) *(( strlen(directory) * strlen(tdrelativepath)) + 100));
+
+
+ /* u_getDataDirectory shoul return \source\data ... set the
+ * directory to ..\source\data\..\test\testdata\out\testdata
+ */
+ strcpy(tdpath, directory);
+ strcat(tdpath, tdrelativepath);
+ strcat(tdpath,"testdata");
+
+ test=ures_open(tdpath, "testtypes", &err);
+
+ if(U_FAILURE(err)){
+ err = U_FILE_ACCESS_ERROR;
+ it_errln((UnicodeString)"Could not load testtypes.res in testdata bundle with path " + tdpath + (UnicodeString)" - " + u_errorName(err));
+ return "";
+ }
+ ures_close(test);
+ _testDataPath = tdpath;
+ return _testDataPath;
+ }
+ return _testDataPath;
+}
+
+const char* IntlTest::getTestDataPath(UErrorCode& err) {
+ return loadTestData(err);
+}
+
+/* Returns the path to icu/source/test/testdata/ */
+const char *IntlTest::getSourceTestData(UErrorCode& /*err*/) {
+ const char *srcDataDir = NULL;
+#ifdef U_TOPSRCDIR
+ srcDataDir = U_TOPSRCDIR U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+#else
+ srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+ FILE *f = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"rbbitst.txt", "r");
+ if (f) {
+ /* We're in icu/source/test/intltest/ */
+ fclose(f);
+ }
+ else {
+ /* We're in icu/source/test/intltest/(Debug|Release) */
+ srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+ }
+#endif
+ return srcDataDir;
+}
+
+const char* IntlTest::fgDataDir = NULL;
+
+/* returns the path to icu/source/data */
+const char * IntlTest::pathToDataDirectory()
+{
+
+ if(fgDataDir != NULL) {
+ return fgDataDir;
+ }
+
+ /* U_TOPSRCDIR is set by the makefiles on UNIXes when building cintltst and intltst
+ // to point to the top of the build hierarchy, which may or
+ // may not be the same as the source directory, depending on
+ // the configure options used. At any rate,
+ // set the data path to the built data from this directory.
+ // The value is complete with quotes, so it can be used
+ // as-is as a string constant.
+ */
+#if defined (U_TOPSRCDIR)
+ {
+ fgDataDir = U_TOPSRCDIR U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+#else
+
+ /* On Windows, the file name obtained from __FILE__ includes a full path.
+ * This file is "wherever\icu\source\test\cintltst\cintltst.c"
+ * Change to "wherever\icu\source\data"
+ */
+ {
+ static char p[sizeof(__FILE__) + 10];
+ char *pBackSlash;
+ int i;
+
+ strcpy(p, __FILE__);
+ /* We want to back over three '\' chars. */
+ /* Only Windows should end up here, so looking for '\' is safe. */
+ for (i=1; i<=3; i++) {
+ pBackSlash = strrchr(p, U_FILE_SEP_CHAR);
+ if (pBackSlash != NULL) {
+ *pBackSlash = 0; /* Truncate the string at the '\' */
+ }
+ }
+
+ if (pBackSlash != NULL) {
+ /* We found and truncated three names from the path.
+ * Now append "source\data" and set the environment
+ */
+ strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING );
+ fgDataDir = p;
+ }
+ else {
+ /* __FILE__ on MSVC7 does not contain the directory */
+ FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r");
+ if (file) {
+ fclose(file);
+ fgDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+ else {
+ fgDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+ }
+ }
+#endif
+
+ return fgDataDir;
+
+}
+
+/*
+ * This is a variant of cintltst/ccolltst.c:CharsToUChars().
+ * It converts a character string into a UnicodeString, with
+ * unescaping \u sequences.
+ */
+UnicodeString CharsToUnicodeString(const char* chars)
+{
+ UnicodeString str(chars, ""); // Invariant conversion
+ return str.unescape();
+}
+
+UnicodeString ctou(const char* chars) {
+ return CharsToUnicodeString(chars);
+}
+
+#define RAND_M (714025)
+#define RAND_IA (1366)
+#define RAND_IC (150889)
+
+static int32_t RAND_SEED;
+
+/**
+ * Returns a uniform random value x, with 0.0 <= x < 1.0. Use
+ * with care: Does not return all possible values; returns one of
+ * 714,025 values, uniformly spaced. However, the period is
+ * effectively infinite. See: Numerical Recipes, section 7.1.
+ *
+ * @param seedp pointer to seed. Set *seedp to any negative value
+ * to restart the sequence.
+ */
+float IntlTest::random(int32_t* seedp) {
+ static int32_t iy, ir[98];
+ static UBool first=TRUE;
+ int32_t j;
+ if (*seedp < 0 || first) {
+ first = FALSE;
+ if ((*seedp=(RAND_IC-(*seedp)) % RAND_M) < 0) *seedp = -(*seedp);
+ for (j=1;j<=97;++j) {
+ *seedp=(RAND_IA*(*seedp)+RAND_IC) % RAND_M;
+ ir[j]=(*seedp);
+ }
+ *seedp=(RAND_IA*(*seedp)+RAND_IC) % RAND_M;
+ iy=(*seedp);
+ }
+ j=(int32_t)(1 + 97.0*iy/RAND_M);
+ U_ASSERT(j>=1 && j<=97);
+ iy=ir[j];
+ *seedp=(RAND_IA*(*seedp)+RAND_IC) % RAND_M;
+ ir[j]=(*seedp);
+ return (float) iy/RAND_M;
+}
+
+/**
+ * Convenience method using a global seed.
+ */
+float IntlTest::random() {
+ return random(&RAND_SEED);
+}
+
+static inline UChar toHex(int32_t i) {
+ return (UChar)(i + (i < 10 ? 0x30 : (0x41 - 10)));
+}
+
+static UnicodeString& escape(const UnicodeString& s, UnicodeString& result) {
+ for (int32_t i=0; i<s.length(); ++i) {
+ UChar c = s[i];
+ if (c <= (UChar)0x7F) {
+ result += c;
+ } else {
+ result += (UChar)0x5c;
+ result += (UChar)0x75;
+ result += toHex((c >> 12) & 0xF);
+ result += toHex((c >> 8) & 0xF);
+ result += toHex((c >> 4) & 0xF);
+ result += toHex( c & 0xF);
+ }
+ }
+ return result;
+}
+
+#define VERBOSE_ASSERTIONS
+
+UBool IntlTest::assertTrue(const char* message, UBool condition, UBool quiet) {
+ if (!condition) {
+ errln("FAIL: assertTrue() failed: %s", message);
+ } else if (!quiet) {
+ logln("Ok: %s", message);
+ }
+ return condition;
+}
+
+UBool IntlTest::assertFalse(const char* message, UBool condition, UBool quiet) {
+ if (condition) {
+ errln("FAIL: assertFalse() failed: %s", message);
+ } else if (!quiet) {
+ logln("Ok: %s", message);
+ }
+ return !condition;
+}
+
+UBool IntlTest::assertSuccess(const char* message, UErrorCode ec) {
+ if (U_FAILURE(ec)) {
+ errln("FAIL: %s (%s)", message, u_errorName(ec));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+UBool IntlTest::assertEquals(const char* message,
+ const UnicodeString& expected,
+ const UnicodeString& actual) {
+ if (expected != actual) {
+ errln((UnicodeString)"FAIL: " + message + "; got " +
+ prettify(actual) +
+ "; expected " + prettify(expected));
+ return FALSE;
+ }
+#ifdef VERBOSE_ASSERTIONS
+ else {
+ logln((UnicodeString)"Ok: " + message + "; got " + prettify(actual));
+ }
+#endif
+ return TRUE;
+}
+
+UBool IntlTest::assertEquals(const char* message,
+ const char* expected,
+ const char* actual) {
+ if (uprv_strcmp(expected, actual) != 0) {
+ errln((UnicodeString)"FAIL: " + message + "; got \"" +
+ actual +
+ "\"; expected \"" + expected + "\"");
+ return FALSE;
+ }
+#ifdef VERBOSE_ASSERTIONS
+ else {
+ logln((UnicodeString)"Ok: " + message + "; got \"" + actual + "\"");
+ }
+#endif
+ return TRUE;
+}
+
+#if !UCONFIG_NO_FORMATTING
+UBool IntlTest::assertEquals(const char* message,
+ const Formattable& expected,
+ const Formattable& actual) {
+ if (expected != actual) {
+ errln((UnicodeString)"FAIL: " + message + "; got " +
+ toString(actual) +
+ "; expected " + toString(expected));
+ return FALSE;
+ }
+#ifdef VERBOSE_ASSERTIONS
+ else {
+ logln((UnicodeString)"Ok: " + message + "; got " + toString(actual));
+ }
+#endif
+ return TRUE;
+}
+#endif
+
+static char ASSERT_BUF[256];
+
+static const char* extractToAssertBuf(const UnicodeString& message) {
+ UnicodeString buf;
+ escape(message, buf);
+ buf.extract(0, 0x7FFFFFFF, ASSERT_BUF, sizeof(ASSERT_BUF)-1, 0);
+ ASSERT_BUF[sizeof(ASSERT_BUF)-1] = 0;
+ return ASSERT_BUF;
+}
+
+UBool IntlTest::assertTrue(const UnicodeString& message, UBool condition, UBool quiet) {
+ return assertTrue(extractToAssertBuf(message), condition, quiet);
+}
+
+UBool IntlTest::assertFalse(const UnicodeString& message, UBool condition, UBool quiet) {
+ return assertFalse(extractToAssertBuf(message), condition, quiet);
+}
+
+UBool IntlTest::assertSuccess(const UnicodeString& message, UErrorCode ec) {
+ return assertSuccess(extractToAssertBuf(message), ec);
+}
+
+UBool IntlTest::assertEquals(const UnicodeString& message,
+ const UnicodeString& expected,
+ const UnicodeString& actual) {
+ return assertEquals(extractToAssertBuf(message), expected, actual);
+}
+
+UBool IntlTest::assertEquals(const UnicodeString& message,
+ const char* expected,
+ const char* actual) {
+ return assertEquals(extractToAssertBuf(message), expected, actual);
+}
+//--------------------------------------------------------------------
+// Time bomb - allows temporary behavior that expires at a given
+// release
+//--------------------------------------------------------------------
+
+UBool IntlTest::isICUVersionAtLeast(const UVersionInfo x) {
+ UVersionInfo v;
+ u_getVersion(v);
+ return (uprv_memcmp(v, x, U_MAX_VERSION_LENGTH) >= 0);
+}
+
+#if !UCONFIG_NO_FORMATTING
+UBool IntlTest::assertEquals(const UnicodeString& message,
+ const Formattable& expected,
+ const Formattable& actual) {
+ return assertEquals(extractToAssertBuf(message), expected, actual);
+}
+#endif
+
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/intltest.h b/Build/source/libs/icu/icu-xetex/test/intltest/intltest.h
new file mode 100644
index 00000000000..975893ba93d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/intltest.h
@@ -0,0 +1,250 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+/**
+ * IntlTest is a base class for tests. */
+
+#ifndef _INTLTEST
+#define _INTLTEST
+
+// The following includes utypes.h, uobject.h and unistr.h
+#include "unicode/fmtable.h"
+#include "unicode/testlog.h"
+
+U_NAMESPACE_USE
+
+#ifdef OS390
+// avoid collision with math.h/log()
+// this must be after including utypes.h so that OS390 is actually defined
+#pragma map(IntlTest::log( const UnicodeString &message ),"logos390")
+#endif
+
+//-----------------------------------------------------------------------------
+//convenience classes to ease porting code that uses the Java
+//string-concatenation operator (moved from findword test by rtg)
+UnicodeString UCharToUnicodeString(UChar c);
+UnicodeString Int64ToUnicodeString(int64_t num);
+//UnicodeString operator+(const UnicodeString& left, int64_t num); // Some compilers don't allow this because of the long type.
+UnicodeString operator+(const UnicodeString& left, long num);
+UnicodeString operator+(const UnicodeString& left, unsigned long num);
+UnicodeString operator+(const UnicodeString& left, double num);
+UnicodeString operator+(const UnicodeString& left, char num);
+UnicodeString operator+(const UnicodeString& left, short num);
+UnicodeString operator+(const UnicodeString& left, int num);
+UnicodeString operator+(const UnicodeString& left, unsigned char num);
+UnicodeString operator+(const UnicodeString& left, unsigned short num);
+UnicodeString operator+(const UnicodeString& left, unsigned int num);
+UnicodeString operator+(const UnicodeString& left, float num);
+#if !UCONFIG_NO_FORMATTING
+UnicodeString toString(const Formattable& f); // liu
+UnicodeString toString(int32_t n);
+#endif
+//-----------------------------------------------------------------------------
+
+// Use the TESTCASE macro in subclasses of IntlTest. Define the
+// runIndexedTest method in this fashion:
+//
+//| void MyTest::runIndexedTest(int32_t index, UBool exec,
+//| const char* &name, char* /*par*/) {
+//| switch (index) {
+//| TESTCASE(0,TestSomething);
+//| TESTCASE(1,TestSomethingElse);
+//| TESTCASE(2,TestAnotherThing);
+//| default: name = ""; break;
+//| }
+//| }
+#define TESTCASE(id,test) \
+ case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ break
+
+class IntlTest : public TestLog {
+public:
+
+ IntlTest();
+
+ virtual UBool runTest( char* name = NULL, char* par = NULL ); // not to be overidden
+
+ virtual UBool setVerbose( UBool verbose = TRUE );
+ virtual UBool setNoErrMsg( UBool no_err_msg = TRUE );
+ virtual UBool setQuick( UBool quick = TRUE );
+ virtual UBool setLeaks( UBool leaks = TRUE );
+ virtual UBool setWarnOnMissingData( UBool warn_on_missing_data = TRUE );
+
+ virtual int32_t getErrors( void );
+ virtual int32_t getDataErrors (void );
+
+ virtual void setCaller( IntlTest* callingTest ); // for internal use only
+ virtual void setPath( char* path ); // for internal use only
+
+ virtual void log( const UnicodeString &message );
+
+ virtual void logln( const UnicodeString &message );
+
+ virtual void logln( void );
+
+ virtual void info( const UnicodeString &message );
+
+ virtual void infoln( const UnicodeString &message );
+
+ virtual void infoln( void );
+
+ virtual void err(void);
+
+ virtual void err( const UnicodeString &message );
+
+ virtual void errln( const UnicodeString &message );
+
+ virtual void dataerr( const UnicodeString &message );
+
+ virtual void dataerrln( const UnicodeString &message );
+
+ // convenience functions: sprintf() + errln() etc.
+ void log(const char *fmt, ...);
+ void logln(const char *fmt, ...);
+ void info(const char *fmt, ...);
+ void infoln(const char *fmt, ...);
+ void err(const char *fmt, ...);
+ void errln(const char *fmt, ...);
+ void dataerr(const char *fmt, ...);
+ void dataerrln(const char *fmt, ...);
+
+ // Print ALL named errors encountered so far
+ void printErrors();
+
+ virtual void usage( void ) ;
+
+ /**
+ * Returns a uniform random value x, with 0.0 <= x < 1.0. Use
+ * with care: Does not return all possible values; returns one of
+ * 714,025 values, uniformly spaced. However, the period is
+ * effectively infinite. See: Numerical Recipes, section 7.1.
+ *
+ * @param seedp pointer to seed. Set *seedp to any negative value
+ * to restart the sequence.
+ */
+ static float random(int32_t* seedp);
+
+ /**
+ * Convenience method using a global seed.
+ */
+ static float random();
+
+ /**
+ * Ascertain the version of ICU. Useful for
+ * time bomb testing
+ */
+ UBool isICUVersionAtLeast(const UVersionInfo x);
+
+protected:
+ /* JUnit-like assertions. Each returns TRUE if it succeeds. */
+ UBool assertTrue(const char* message, UBool condition, UBool quiet=FALSE);
+ UBool assertFalse(const char* message, UBool condition, UBool quiet=FALSE);
+ UBool assertSuccess(const char* message, UErrorCode ec);
+ UBool assertEquals(const char* message, const UnicodeString& expected,
+ const UnicodeString& actual);
+ UBool assertEquals(const char* message, const char* expected,
+ const char* actual);
+#if !UCONFIG_NO_FORMATTING
+ UBool assertEquals(const char* message, const Formattable& expected,
+ const Formattable& actual);
+ UBool assertEquals(const UnicodeString& message, const Formattable& expected,
+ const Formattable& actual);
+#endif
+ UBool assertTrue(const UnicodeString& message, UBool condition, UBool quiet=FALSE);
+ UBool assertFalse(const UnicodeString& message, UBool condition, UBool quiet=FALSE);
+ UBool assertSuccess(const UnicodeString& message, UErrorCode ec);
+ UBool assertEquals(const UnicodeString& message, const UnicodeString& expected,
+ const UnicodeString& actual);
+ UBool assertEquals(const UnicodeString& message, const char* expected,
+ const char* actual);
+
+ virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); // overide !
+
+ virtual UBool runTestLoop( char* testname, char* par );
+
+ virtual int32_t IncErrorCount( void );
+
+ virtual int32_t IncDataErrorCount( void );
+
+ virtual UBool callTest( IntlTest& testToBeCalled, char* par );
+
+
+ UBool verbose;
+ UBool no_err_msg;
+ UBool quick;
+ UBool leaks;
+ UBool warn_on_missing_data;
+
+private:
+ UBool LL_linestart;
+ int32_t LL_indentlevel;
+
+ int32_t errorCount;
+ int32_t dataErrorCount;
+ IntlTest* caller;
+ char* testPath; // specifies subtests
+
+ //FILE *testoutfp;
+ void *testoutfp;
+
+protected:
+
+ virtual void LL_message( UnicodeString message, UBool newline );
+
+ // used for collation result reporting, defined here for convenience
+
+ static UnicodeString &prettify(const UnicodeString &source, UnicodeString &target);
+ static UnicodeString prettify(const UnicodeString &source, UBool parseBackslash=FALSE);
+ static UnicodeString &appendHex(uint32_t number, int32_t digits, UnicodeString &target);
+
+public:
+ static void setICU_DATA(); // Set up ICU_DATA if necessary.
+
+ static const char* pathToDataDirectory();
+
+public:
+ UBool run_phase2( char* name, char* par ); // internally, supports reporting memory leaks
+ static const char* loadTestData(UErrorCode& err);
+ virtual const char* getTestDataPath(UErrorCode& err);
+ static const char* getSourceTestData(UErrorCode& err);
+
+// static members
+public:
+ static IntlTest* gTest;
+ static const char* fgDataDir;
+
+};
+
+void it_log( UnicodeString message );
+void it_logln( UnicodeString message );
+void it_logln( void );
+void it_info( UnicodeString message );
+void it_infoln( UnicodeString message );
+void it_infoln( void );
+void it_err(void);
+void it_err( UnicodeString message );
+void it_errln( UnicodeString message );
+void it_dataerr( UnicodeString message );
+void it_dataerrln( UnicodeString message );
+
+/**
+ * This is a variant of cintltst/ccolltst.c:CharsToUChars().
+ * It converts a character string into a UnicodeString, with
+ * unescaping \u sequences.
+ */
+extern UnicodeString CharsToUnicodeString(const char* chars);
+
+/* alias for CharsToUnicodeString */
+extern UnicodeString ctou(const char* chars);
+
+#endif // _INTLTEST
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/intltest.vcproj b/Build/source/libs/icu/icu-xetex/test/intltest/intltest.vcproj
new file mode 100644
index 00000000000..7284d2e15e1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/intltest.vcproj
@@ -0,0 +1,1269 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="intltest"
+ ProjectGUID="{73632960-B3A6-464D-83A3-4B43365F19B8}"
+ RootNamespace="intltest"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/intltest.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include;..\..\common;..\..\i18n;..\..\tools\toolutil;..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ DisableLanguageExtensions="true"
+ TreatWChar_tAsBuiltInType="true"
+ PrecompiledHeaderFile=".\Debug/intltest.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Debug/intltest.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/intltest.pdb"
+ SubSystem="1"
+ FixedBaseAddress="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseFAT32Workaround="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/intltest.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\include;..\..\common;..\..\i18n;..\..\tools\toolutil;..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ DisableLanguageExtensions="true"
+ TreatWChar_tAsBuiltInType="true"
+ PrecompiledHeaderFile=".\Release/intltest.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Release/intltest.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Release/intltest.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="break iteration"
+ >
+ <File
+ RelativePath=".\itrbbi.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itrbbi.h"
+ >
+ </File>
+ <File
+ RelativePath=".\rbbiapts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\rbbiapts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\rbbitst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\rbbitst.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="collation"
+ >
+ <File
+ RelativePath=".\allcoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\allcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\apicoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\apicoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cntabcol.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\cntabcol.h"
+ >
+ </File>
+ <File
+ RelativePath=".\currcoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\currcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dadrcoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dadrcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\decoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\decoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\encoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\encoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\escoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\escoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ficoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ficoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\frcoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\frcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\g7coll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\g7coll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\itercoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itercoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jacoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\jacoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\lcukocol.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\lcukocol.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mnkytst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mnkytst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\regcoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\regcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\srchtest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\srchtest.h"
+ >
+ </File>
+ <File
+ RelativePath="svccoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath="svccoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\thcoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\thcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\trcoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\trcoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tscoll.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tscoll.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ucaconf.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ucaconf.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="collections"
+ >
+ <File
+ RelativePath=".\uvectest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\uvectest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\v32test.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\v32test.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="configuration"
+ >
+ <File
+ RelativePath=".\strtest.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\strtest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tsmthred.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\tsmthred.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tsputil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tsputil.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="data &amp; memory"
+ >
+ <File
+ RelativePath=".\uobjtest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\uobjtest.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="formatting"
+ >
+ <File
+ RelativePath=".\astrotst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\astrotst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\calcasts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\calcasts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\callimts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\callimts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\calregts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\calregts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\caltest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\caltest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\caltztst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\caltztst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dadrcal.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dadrcal.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dadrfmt.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dadrfmt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dcfmapts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dcfmapts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmapts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmapts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmrgts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmrgts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmtrtts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmtrtts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmttst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dtfmttst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dtptngts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dtptngts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\fldset.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\fldset.h"
+ >
+ </File>
+ <File
+ RelativePath=".\incaltst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\incaltst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\itformat.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itformat.h"
+ >
+ </File>
+ <File
+ RelativePath=".\itrbnf.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itrbnf.h"
+ >
+ </File>
+ <File
+ RelativePath=".\itrbnfp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itrbnfp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\itrbnfrt.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itrbnfrt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\miscdtfm.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\miscdtfm.h"
+ >
+ </File>
+ <File
+ RelativePath=".\msfmrgts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\msfmrgts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\nmfmapts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\nmfmapts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\nmfmtrt.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\nmfmtrt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\numfmtst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\numfmtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\numrgts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\numrgts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\pptest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\pptest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sdtfmtts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\sdtfmtts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tchcfmt.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tchcfmt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tfsmalls.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tfsmalls.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tmsgfmt.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tmsgfmt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tsdate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tsdate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tsdcfmsy.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tsdcfmsy.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tsdtfmsy.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tsdtfmsy.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tsnmfmt.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tsnmfmt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tzbdtest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tzbdtest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tzfmttst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tzfmttst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tzoffloc.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tzoffloc.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tzregts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tzregts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tzrulets.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tzrulets.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tztest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tztest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\windttst.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\windttst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\winnmtst.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\winnmtst.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="idna"
+ Filter="*.c,*.h"
+ >
+ <File
+ RelativePath=".\idnaconf.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\idnaconf.h"
+ >
+ </File>
+ <File
+ RelativePath=".\idnaref.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\idnaref.h"
+ >
+ </File>
+ <File
+ RelativePath=".\nptrans.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\nptrans.h"
+ >
+ </File>
+ <File
+ RelativePath=".\punyref.c"
+ >
+ </File>
+ <File
+ RelativePath=".\punyref.h"
+ >
+ </File>
+ <File
+ RelativePath=".\testidn.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\testidna.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\testidna.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="locales &amp; resources"
+ >
+ <File
+ RelativePath=".\aliastst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\aliastst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\loctest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\loctest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\restest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\restest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\restsnew.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\restsnew.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="misc"
+ >
+ <File
+ RelativePath=".\intltest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\intltest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\itmajor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itmajor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\itutil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\itutil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\testutil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\testutil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\textfile.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\textfile.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tokiter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tokiter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\winutil.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\winutil.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="normalization"
+ >
+ <File
+ RelativePath=".\canittst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\canittst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\normconf.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\normconf.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tstnorm.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tstnorm.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tstnrapi.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="properties &amp; sets"
+ >
+ <File
+ RelativePath=".\ucdtest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ucdtest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\usettest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\usettest.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="regex"
+ >
+ <File
+ RelativePath=".\regextst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\regextst.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="registration"
+ >
+ <File
+ RelativePath=".\icusvtst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\icusvtst.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="strings"
+ >
+ <File
+ RelativePath=".\citrtest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\citrtest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\reptest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\reptest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sfwdchit.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\sfwdchit.h"
+ >
+ </File>
+ <File
+ RelativePath=".\strcase.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ustrtest.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\ustrtest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\utxttest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\utxttest.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="transforms"
+ >
+ <File
+ RelativePath=".\cpdtrtst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\cpdtrtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ittrans.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ittrans.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jamotest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\jamotest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\transapi.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\transapi.h"
+ >
+ </File>
+ <File
+ RelativePath=".\transrt.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\transrt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\transtst.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\transtst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\trnserr.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\trnserr.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="conversion"
+ >
+ <File
+ RelativePath=".\convtest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\convtest.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="charset detection"
+ >
+ <File
+ RelativePath=".\csdetest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\csdetest.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itercoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itercoll.cpp
new file mode 100644
index 00000000000..5a0078b1494
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itercoll.cpp
@@ -0,0 +1,647 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "itercoll.h"
+#include "unicode/schriter.h"
+#include "unicode/chariter.h"
+#include "unicode/uchar.h"
+#include "cmemory.h"
+
+#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0])
+
+static UErrorCode status = U_ZERO_ERROR;
+
+CollationIteratorTest::CollationIteratorTest()
+ : test1("What subset of all possible test cases?", ""),
+ test2("has the highest probability of detecting", "")
+{
+ en_us = (RuleBasedCollator *)Collator::createInstance(Locale::getUS(), status);
+ if(U_FAILURE(status)) {
+ delete en_us;
+ en_us = 0;
+ errln("Collator creation failed with %s", u_errorName(status));
+ return;
+ }
+
+}
+
+CollationIteratorTest::~CollationIteratorTest()
+{
+ delete en_us;
+}
+
+/**
+ * Test for CollationElementIterator previous and next for the whole set of
+ * unicode characters.
+ */
+void CollationIteratorTest::TestUnicodeChar()
+{
+ CollationElementIterator *iter;
+ UChar codepoint;
+ UnicodeString source;
+
+ for (codepoint = 1; codepoint < 0xFFFE;)
+ {
+ source.remove();
+
+ while (codepoint % 0xFF != 0)
+ {
+ if (u_isdefined(codepoint))
+ source += codepoint;
+ codepoint ++;
+ }
+
+ if (u_isdefined(codepoint))
+ source += codepoint;
+
+ if (codepoint != 0xFFFF)
+ codepoint ++;
+
+ iter = en_us->createCollationElementIterator(source);
+ /* A basic test to see if it's working at all */
+ backAndForth(*iter);
+ delete iter;
+ }
+}
+
+/**
+ * Test for CollationElementIterator.previous()
+ *
+ * @bug 4108758 - Make sure it works with contracting characters
+ *
+ */
+void CollationIteratorTest::TestPrevious(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ CollationElementIterator *iter = en_us->createCollationElementIterator(test1);
+
+ // A basic test to see if it's working at all
+ backAndForth(*iter);
+ delete iter;
+
+ // Test with a contracting character sequence
+ UnicodeString source;
+ RuleBasedCollator *c1 = NULL;
+ c1 = new RuleBasedCollator(
+ (UnicodeString)"&a,A < b,B < c,C, d,D < z,Z < ch,cH,Ch,CH", status);
+
+ if (c1 == NULL || U_FAILURE(status))
+ {
+ errln("Couldn't create a RuleBasedCollator with a contracting sequence.");
+ delete c1;
+ return;
+ }
+
+ source = "abchdcba";
+ iter = c1->createCollationElementIterator(source);
+ backAndForth(*iter);
+ delete iter;
+ delete c1;
+
+ // Test with an expanding character sequence
+ RuleBasedCollator *c2 = NULL;
+ c2 = new RuleBasedCollator((UnicodeString)"&a < b < c/abd < d", status);
+
+ if (c2 == NULL || U_FAILURE(status))
+ {
+ errln("Couldn't create a RuleBasedCollator with an expanding sequence.");
+ delete c2;
+ return;
+ }
+
+ source = "abcd";
+ iter = c2->createCollationElementIterator(source);
+ backAndForth(*iter);
+ delete iter;
+ delete c2;
+
+ // Now try both
+ RuleBasedCollator *c3 = NULL;
+ c3 = new RuleBasedCollator((UnicodeString)"&a < b < c/aba < d < z < ch", status);
+
+ if (c3 == NULL || U_FAILURE(status))
+ {
+ errln("Couldn't create a RuleBasedCollator with both an expanding and a contracting sequence.");
+ delete c3;
+ return;
+ }
+
+ source = "abcdbchdc";
+ iter = c3->createCollationElementIterator(source);
+ backAndForth(*iter);
+ delete iter;
+ delete c3;
+
+ status=U_ZERO_ERROR;
+ source= CharsToUnicodeString("\\u0e41\\u0e02\\u0e41\\u0e02\\u0e27abc");
+
+ Collator *c4 = Collator::createInstance(Locale("th", "TH", ""), status);
+ if(U_FAILURE(status)){
+ errln("Couldn't create a collator");
+ }
+ iter = ((RuleBasedCollator*)c4)->createCollationElementIterator(source);
+ backAndForth(*iter);
+ delete iter;
+ delete c4;
+
+ source= CharsToUnicodeString("\\u0061\\u30CF\\u3099\\u30FC");
+ Collator *c5 = Collator::createInstance(Locale("ja", "JP", ""), status);
+
+ iter = ((RuleBasedCollator*)c5)->createCollationElementIterator(source);
+ if(U_FAILURE(status)){
+ errln("Couldn't create Japanese collator\n");
+ }
+ backAndForth(*iter);
+ delete iter;
+ delete c5;
+}
+
+/**
+ * Test for getOffset() and setOffset()
+ */
+void CollationIteratorTest::TestOffset(/* char* par */)
+{
+ CollationElementIterator *iter = en_us->createCollationElementIterator(test1);
+ UErrorCode status = U_ZERO_ERROR;
+ // testing boundaries
+ iter->setOffset(0, status);
+ if (U_FAILURE(status) || iter->previous(status) != UCOL_NULLORDER) {
+ errln("Error: After setting offset to 0, we should be at the end "
+ "of the backwards iteration");
+ }
+ iter->setOffset(test1.length(), status);
+ if (U_FAILURE(status) || iter->next(status) != UCOL_NULLORDER) {
+ errln("Error: After setting offset to end of the string, we should "
+ "be at the end of the backwards iteration");
+ }
+
+ // Run all the way through the iterator, then get the offset
+ int32_t orderLength = 0;
+ int32_t *orders = getOrders(*iter, orderLength);
+
+ int32_t offset = iter->getOffset();
+
+ if (offset != test1.length())
+ {
+ UnicodeString msg1("offset at end != length: ");
+ UnicodeString msg2(" vs ");
+
+ errln(msg1 + offset + msg2 + test1.length());
+ }
+
+ // Now set the offset back to the beginning and see if it works
+ CollationElementIterator *pristine = en_us->createCollationElementIterator(test1);
+
+ iter->setOffset(0, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("setOffset failed.");
+ }
+ else
+ {
+ assertEqual(*iter, *pristine);
+ }
+
+ // TODO: try iterating halfway through a messy string.
+
+ delete pristine;
+ delete[] orders;
+ delete iter;
+}
+
+/**
+ * Test for setText()
+ */
+void CollationIteratorTest::TestSetText(/* char* par */)
+{
+ CollationElementIterator *iter1 = en_us->createCollationElementIterator(test1);
+ CollationElementIterator *iter2 = en_us->createCollationElementIterator(test2);
+ UErrorCode status = U_ZERO_ERROR;
+
+ // Run through the second iterator just to exercise it
+ int32_t c = iter2->next(status);
+ int32_t i = 0;
+
+ while ( ++i < 10 && c != CollationElementIterator::NULLORDER)
+ {
+ if (U_FAILURE(status))
+ {
+ errln("iter2->next() returned an error.");
+ delete iter2;
+ delete iter1;
+ }
+
+ c = iter2->next(status);
+ }
+
+ // Now set it to point to the same string as the first iterator
+ iter2->setText(test1, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("call to iter2->setText(test1) failed.");
+ }
+ else
+ {
+ assertEqual(*iter1, *iter2);
+ }
+ iter1->reset();
+ //now use the overloaded setText(ChracterIterator&, UErrorCode) function to set the text
+ CharacterIterator* chariter = new StringCharacterIterator(test1);
+ iter2->setText(*chariter, status);
+ if (U_FAILURE(status))
+ {
+ errln("call to iter2->setText(chariter(test1)) failed.");
+ }
+ else
+ {
+ assertEqual(*iter1, *iter2);
+ }
+
+ // test for an empty string
+ UnicodeString empty("");
+ iter1->setText(empty, status);
+ if (U_FAILURE(status)
+ || iter1->next(status) != (int32_t)UCOL_NULLORDER) {
+ errln("Empty string should have no CEs.");
+ }
+ ((StringCharacterIterator *)chariter)->setText(empty);
+ iter1->setText(*chariter, status);
+ if (U_FAILURE(status)
+ || iter1->next(status) != (int32_t)UCOL_NULLORDER) {
+ errln("Empty string should have no CEs.");
+ }
+ delete chariter;
+ delete iter2;
+ delete iter1;
+}
+
+/** @bug 4108762
+ * Test for getMaxExpansion()
+ */
+void CollationIteratorTest::TestMaxExpansion(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString rule("&a < ab < c/aba < d < z < ch");
+ RuleBasedCollator *coll = new RuleBasedCollator(rule, status);
+ UChar ch = 0;
+ UnicodeString str(ch);
+
+ CollationElementIterator *iter = coll->createCollationElementIterator(str);
+
+ while (ch < 0xFFFF && U_SUCCESS(status)) {
+ int count = 1;
+ uint32_t order;
+ ch ++;
+ UnicodeString str(ch);
+ iter->setText(str, status);
+ order = iter->previous(status);
+
+ /* thai management */
+ if (CollationElementIterator::isIgnorable(order))
+ order = iter->previous(status);
+
+ while (U_SUCCESS(status)
+ && iter->previous(status) != (int32_t)UCOL_NULLORDER)
+ {
+ count ++;
+ }
+
+ if (U_FAILURE(status) && iter->getMaxExpansion(order) < count) {
+ errln("Failure at codepoint %d, maximum expansion count < %d\n",
+ ch, count);
+ }
+ }
+
+ delete iter;
+ delete coll;
+}
+
+/*
+ * @bug 4157299
+ */
+void CollationIteratorTest::TestClearBuffers(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = new RuleBasedCollator((UnicodeString)"&a < b < c & ab = d", status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Couldn't create a RuleBasedCollator.");
+ delete c;
+ return;
+ }
+
+ UnicodeString source("abcd");
+ CollationElementIterator *i = c->createCollationElementIterator(source);
+ int32_t e0 = i->next(status); // save the first collation element
+
+ if (U_FAILURE(status))
+ {
+ errln("call to i->next() failed. err=%s", u_errorName(status));
+ }
+ else
+ {
+ i->setOffset(3, status); // go to the expanding character
+
+ if (U_FAILURE(status))
+ {
+ errln("call to i->setOffset(3) failed. err=%s", u_errorName(status));
+ }
+ else
+ {
+ i->next(status); // but only use up half of it
+
+ if (U_FAILURE(status))
+ {
+ errln("call to i->next() failed. err=%s", u_errorName(status));
+ }
+ else
+ {
+ i->setOffset(0, status); // go back to the beginning
+
+ if (U_FAILURE(status))
+ {
+ errln("call to i->setOffset(0) failed. err=%s", u_errorName(status));
+ }
+ else
+ {
+ int32_t e = i->next(status); // and get this one again
+
+ if (U_FAILURE(status))
+ {
+ errln("call to i->next() failed. err=%s", u_errorName(status));
+ }
+ else if (e != e0)
+ {
+ errln("got 0x%X, expected 0x%X", e, e0);
+ }
+ }
+ }
+ }
+ }
+
+ delete i;
+ delete c;
+}
+
+/**
+ * Testing the assignment operator
+ */
+void CollationIteratorTest::TestAssignment()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *coll =
+ (RuleBasedCollator *)Collator::createInstance(status);
+
+ if (coll == NULL || U_FAILURE(status))
+ {
+ errln("Couldn't create a default collator.");
+ return;
+ }
+
+ UnicodeString source("abcd");
+ CollationElementIterator *iter1 =
+ coll->createCollationElementIterator(source);
+
+ CollationElementIterator iter2 = *iter1;
+
+ if (*iter1 != iter2) {
+ errln("Fail collation iterator assignment does not produce the same elements");
+ }
+
+ CollationElementIterator iter3(*iter1);
+
+ if (*iter1 != iter3) {
+ errln("Fail collation iterator copy constructor does not produce the same elements");
+ }
+
+ source = CharsToUnicodeString("a\\u0300\\u0325");
+ coll->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ CollationElementIterator *iter4
+ = coll->createCollationElementIterator(source);
+ CollationElementIterator iter5(*iter4);
+ if (*iter4 != iter5) {
+ errln("collation iterator assignment does not produce the same elements");
+ }
+ iter4->next(status);
+ if (U_FAILURE(status) || *iter4 == iter5) {
+ errln("collation iterator not equal");
+ }
+ iter5.next(status);
+ if (U_FAILURE(status) || *iter4 != iter5) {
+ errln("collation iterator equal");
+ }
+ iter4->next(status);
+ if (U_FAILURE(status) || *iter4 == iter5) {
+ errln("collation iterator not equal");
+ }
+ iter5.next(status);
+ if (U_FAILURE(status) || *iter4 != iter5) {
+ errln("collation iterator equal");
+ }
+ CollationElementIterator iter6(*iter4);
+ if (*iter4 != iter6) {
+ errln("collation iterator equal");
+ }
+ iter4->next(status);
+ if (U_FAILURE(status) || *iter4 == iter5) {
+ errln("collation iterator not equal");
+ }
+ iter5.next(status);
+ if (U_FAILURE(status) || *iter4 != iter5) {
+ errln("collation iterator equal");
+ }
+ iter4->next(status);
+ if (U_FAILURE(status) || *iter4 == iter5) {
+ errln("collation iterator not equal");
+ }
+ iter5.next(status);
+ if (U_FAILURE(status) || *iter4 != iter5) {
+ errln("collation iterator equal");
+ }
+ delete iter1;
+ delete iter4;
+ delete coll;
+}
+
+/**
+ * Testing the constructors
+ */
+void CollationIteratorTest::TestConstructors()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *coll =
+ (RuleBasedCollator *)Collator::createInstance(status);
+ if (coll == NULL || U_FAILURE(status))
+ {
+ errln("Couldn't create a default collator.");
+ return;
+ }
+
+ // testing protected constructor with character iterator as argument
+ StringCharacterIterator chariter(test1);
+ CollationElementIterator *iter1 =
+ coll->createCollationElementIterator(chariter);
+ if (U_FAILURE(status)) {
+ errln("Couldn't create collation element iterator with character iterator.");
+ return;
+ }
+ CollationElementIterator *iter2 =
+ coll->createCollationElementIterator(test1);
+
+ // initially the 2 collation element iterators should be the same
+ if (*iter1 != *iter1 || *iter2 != *iter2 || *iter1 != *iter2
+ || *iter2 != *iter1) {
+ errln("CollationElementIterators constructed with the same string data should be the same at the start");
+ }
+ assertEqual(*iter1, *iter2);
+
+ delete iter1;
+ delete iter2;
+
+ // tests empty strings
+ UnicodeString empty("");
+ iter1 = coll->createCollationElementIterator(empty);
+ chariter.setText(empty);
+ iter2 = coll->createCollationElementIterator(chariter);
+ if (*iter1 != *iter1 || *iter2 != *iter2 || *iter1 != *iter2
+ || *iter2 != *iter1) {
+ errln("CollationElementIterators constructed with the same string data should be the same at the start");
+ }
+ if (iter1->next(status) != (int32_t)UCOL_NULLORDER) {
+ errln("Empty string should have no CEs.");
+ }
+ if (iter2->next(status) != (int32_t)UCOL_NULLORDER) {
+ errln("Empty string should have no CEs.");
+ }
+ delete iter1;
+ delete iter2;
+ delete coll;
+}
+
+/**
+ * Testing the strength order
+ */
+void CollationIteratorTest::TestStrengthOrder()
+{
+ int order = 0x0123ABCD;
+
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *coll =
+ (RuleBasedCollator *)Collator::createInstance(status);
+ if (coll == NULL || U_FAILURE(status))
+ {
+ errln("Couldn't create a default collator.");
+ return;
+ }
+
+ coll->setStrength(Collator::PRIMARY);
+ CollationElementIterator *iter =
+ coll->createCollationElementIterator(test1);
+
+ if (iter == NULL) {
+ errln("Couldn't create a collation element iterator from default collator");
+ return;
+ }
+
+ if (iter->strengthOrder(order) != 0x01230000) {
+ errln("Strength order for a primary strength collator should be the first 2 bytes");
+ return;
+ }
+
+ coll->setStrength(Collator::SECONDARY);
+ if (iter->strengthOrder(order) != 0x0123AB00) {
+ errln("Strength order for a secondary strength collator should be the third byte");
+ return;
+ }
+
+ coll->setStrength(Collator::TERTIARY);
+ if (iter->strengthOrder(order) != order) {
+ errln("Strength order for a tertiary strength collator should be the third byte");
+ return;
+ }
+ delete iter;
+ delete coll;
+}
+
+/**
+ * Return a string containing all of the collation orders
+ * returned by calls to next on the specified iterator
+ */
+UnicodeString &CollationIteratorTest::orderString(CollationElementIterator &iter, UnicodeString &target)
+{
+ int32_t order;
+ UErrorCode status = U_ZERO_ERROR;
+
+ while ((order = iter.next(status)) != CollationElementIterator::NULLORDER)
+ {
+ target += "0x";
+ appendHex(order, 8, target);
+ target += " ";
+ }
+
+ return target;
+}
+
+void CollationIteratorTest::assertEqual(CollationElementIterator &i1, CollationElementIterator &i2)
+{
+ int32_t c1, c2, count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ do
+ {
+ c1 = i1.next(status);
+ c2 = i2.next(status);
+
+ if (c1 != c2)
+ {
+ errln(" %d: strength(0x%X) != strength(0x%X)", count, c1, c2);
+ break;
+ }
+
+ count += 1;
+ }
+ while (c1 != CollationElementIterator::NULLORDER);
+}
+
+void CollationIteratorTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/)
+{
+ if (exec)
+ {
+ logln("Collation Iteration Tests: ");
+ }
+
+ if(en_us) {
+ switch (index)
+ {
+ case 0: name = "TestPrevious"; if (exec) TestPrevious(/* par */); break;
+ case 1: name = "TestOffset"; if (exec) TestOffset(/* par */); break;
+ case 2: name = "TestSetText"; if (exec) TestSetText(/* par */); break;
+ case 3: name = "TestMaxExpansion"; if (exec) TestMaxExpansion(/* par */); break;
+ case 4: name = "TestClearBuffers"; if (exec) TestClearBuffers(/* par */); break;
+ case 5: name = "TestUnicodeChar"; if (exec) TestUnicodeChar(/* par */); break;
+ case 6: name = "TestAssignment"; if (exec) TestAssignment(/* par */); break;
+ case 7: name = "TestConstructors"; if (exec) TestConstructors(/* par */); break;
+ case 8: name = "TestStrengthOrder"; if (exec) TestStrengthOrder(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ errln("Class iterator not instantiated");
+ name = "";
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itercoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/itercoll.h
new file mode 100644
index 00000000000..747f80f6689
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itercoll.h
@@ -0,0 +1,119 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * Collation Iterator tests.
+ * (Let me reiterate my position...)
+ */
+
+#ifndef _ITERCOLL
+#define _ITERCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/tblcoll.h"
+#include "unicode/coleitr.h"
+#include "tscoll.h"
+
+class CollationIteratorTest: public IntlTestCollator
+{
+public:
+
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationIteratorTest();
+ virtual ~CollationIteratorTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+
+ /**
+ * Test that results from CollationElementIterator.next is equivalent to
+ * the reversed results from CollationElementIterator.previous, for the set
+ * of BMP characters.
+ */
+ void TestUnicodeChar();
+
+ /**
+ * Test for CollationElementIterator.previous()
+ *
+ * @bug 4108758 - Make sure it works with contracting characters
+ *
+ */
+ void TestPrevious(/* char* par */);
+
+ /**
+ * Test for getOffset() and setOffset()
+ */
+ void TestOffset(/* char* par */);
+
+ /**
+ * Test for setText()
+ */
+ void TestSetText(/* char* par */);
+
+ /** @bug 4108762
+ * Test for getMaxExpansion()
+ */
+ void TestMaxExpansion(/* char* par */);
+
+ /*
+ * @bug 4157299
+ */
+ void TestClearBuffers(/* char* par */);
+
+ /**
+ * Testing the assignment operator
+ */
+ void TestAssignment();
+
+ /**
+ * Testing the constructors
+ */
+ void TestConstructors();
+
+ /**
+ * Testing the strength order functionality
+ */
+ void TestStrengthOrder();
+
+ //------------------------------------------------------------------------
+ // Internal utilities
+ //
+
+private:
+
+ struct ExpansionRecord
+ {
+ UChar character;
+ int32_t count;
+ };
+
+ /**
+ * Verify that getMaxExpansion works on a given set of collation rules
+ */
+ void verifyExpansion(UnicodeString rules, ExpansionRecord tests[], int32_t testCount);
+
+ /**
+ * Return a string containing all of the collation orders
+ * returned by calls to next on the specified iterator
+ */
+ UnicodeString &orderString(CollationElementIterator &iter, UnicodeString &target);
+
+ void assertEqual(CollationElementIterator &i1, CollationElementIterator &i2);
+
+ RuleBasedCollator *en_us;
+ const UnicodeString test1;
+ const UnicodeString test2;
+
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itformat.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itformat.cpp
new file mode 100644
index 00000000000..eb80bad7c14
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itformat.cpp
@@ -0,0 +1,132 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * IntlTestFormat is the medium level test class for everything in the directory "format".
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "itformat.h"
+#include "tsdate.h"
+#include "tsnmfmt.h"
+#include "caltest.h"
+#include "callimts.h"
+#include "tztest.h"
+#include "tzbdtest.h"
+#include "tsdcfmsy.h" // DecimalFormatSymbols
+#include "tchcfmt.h"
+#include "tsdtfmsy.h" // DateFormatSymbols
+#include "dcfmapts.h" // DecimalFormatAPI
+#include "tfsmalls.h" // Format Small Classes
+#include "nmfmapts.h" // NumberFormatAPI
+#include "numfmtst.h" // NumberFormatTest
+#include "sdtfmtts.h" // SimpleDateFormatAPI
+#include "dtfmapts.h" // DateFormatAPI
+#include "dtfmttst.h" // DateFormatTest
+#include "tmsgfmt.h" // TestMessageFormat
+#include "dtfmrgts.h" // DateFormatRegressionTest
+#include "msfmrgts.h" // MessageFormatRegressionTest
+#include "miscdtfm.h" // DateFormatMiscTests
+#include "nmfmtrt.h" // NumberFormatRoundTripTest
+#include "numrgts.h" // NumberFormatRegressionTest
+#include "dtfmtrtts.h" // DateFormatRoundTripTest
+#include "pptest.h" // ParsePositionTest
+#include "calregts.h" // CalendarRegressionTest
+#include "tzregts.h" // TimeZoneRegressionTest
+#include "astrotst.h" // AstroTest
+#include "incaltst.h" // IntlCalendarTest
+#include "calcasts.h" // CalendarCaseTest
+#include "tzrulets.h" // TimeZoneRuleTest
+#include "dadrcal.h" // DataDrivenCalendarTest
+#include "dadrfmt.h" // DataDrivenFormatTest
+#include "dtptngts.h" // IntlTestDateTimePatternGeneratorAPI
+#include "tzoffloc.h" // TimeZoneOffsetLocalTest
+#include "tzfmttst.h" // TimeZoneFormatTest
+
+
+#define TESTCLASS(id, TestClass) \
+ case id: \
+ name = #TestClass; \
+ if (exec) { \
+ logln(#TestClass " test---"); \
+ logln((UnicodeString)""); \
+ TestClass test; \
+ callTest(test, par); \
+ } \
+ break
+
+void IntlTestFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ // for all format tests, always set default Locale and TimeZone to ENGLISH and PST.
+ TimeZone* saveDefaultTimeZone = NULL;
+ Locale saveDefaultLocale = Locale::getDefault();
+ if (exec) {
+ saveDefaultTimeZone = TimeZone::createDefault();
+ TimeZone *tz = TimeZone::createTimeZone("PST");
+ TimeZone::setDefault(*tz);
+ delete tz;
+ UErrorCode status = U_ZERO_ERROR;
+ Locale::setDefault( Locale::getEnglish(), status );
+ if (U_FAILURE(status)) {
+ errln("itformat: couldn't set default Locale to ENGLISH!");
+ }
+ }
+ if (exec) logln("TestSuite Format: ");
+ switch (index) {
+ TESTCLASS(0,IntlTestDateFormat);
+ TESTCLASS(1,IntlTestNumberFormat);
+ TESTCLASS(2,CalendarTest);
+ TESTCLASS(3,CalendarLimitTest);
+ TESTCLASS(4,TimeZoneTest);
+ TESTCLASS(5,TimeZoneBoundaryTest);
+ TESTCLASS(6,TestChoiceFormat);
+ TESTCLASS(7,IntlTestDecimalFormatSymbols);
+ TESTCLASS(8,IntlTestDateFormatSymbols);
+ TESTCLASS(9,IntlTestDecimalFormatAPI);
+ TESTCLASS(10,TestFormatSmallClasses);
+ TESTCLASS(11,IntlTestNumberFormatAPI);
+ TESTCLASS(12,IntlTestSimpleDateFormatAPI);
+ TESTCLASS(13,IntlTestDateFormatAPI);
+ TESTCLASS(14,DateFormatTest);
+ TESTCLASS(15,TestMessageFormat);
+ TESTCLASS(16,NumberFormatTest);
+ TESTCLASS(17,DateFormatRegressionTest);
+ TESTCLASS(18,MessageFormatRegressionTest);
+ TESTCLASS(19,DateFormatMiscTests);
+ TESTCLASS(20,NumberFormatRoundTripTest);
+ TESTCLASS(21,NumberFormatRegressionTest);
+ TESTCLASS(22,DateFormatRoundTripTest);
+ TESTCLASS(23,ParsePositionTest);
+ TESTCLASS(24,CalendarRegressionTest);
+ TESTCLASS(25,TimeZoneRegressionTest);
+ TESTCLASS(26,IntlCalendarTest);
+ TESTCLASS(27,AstroTest);
+ TESTCLASS(28,CalendarCaseTest);
+ TESTCLASS(29,TimeZoneRuleTest);
+ TESTCLASS(30,DataDrivenCalendarTest);
+ TESTCLASS(31,DataDrivenFormatTest);
+ TESTCLASS(32,IntlTestDateTimePatternGeneratorAPI);
+ TESTCLASS(33,TimeZoneOffsetLocalTest);
+ TESTCLASS(34,TimeZoneFormatTest);
+
+
+ default: name = ""; break; //needed to end loop
+ }
+ if (exec) {
+ // restore saved Locale and TimeZone
+ TimeZone::adoptDefault(saveDefaultTimeZone);
+ UErrorCode status = U_ZERO_ERROR;
+ Locale::setDefault( saveDefaultLocale, status );
+ if (U_FAILURE(status)) {
+ errln("itformat: couldn't re-set default Locale!");
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itformat.h b/Build/source/libs/icu/icu-xetex/test/intltest/itformat.h
new file mode 100644
index 00000000000..1d5d92a57c9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itformat.h
@@ -0,0 +1,27 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * MajorTestLevel is the top level test class for everything in the directory "IntlWork".
+ */
+
+#ifndef _INTLTESTFORMAT
+#define _INTLTESTFORMAT
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+
+class IntlTestFormat: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itmajor.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itmajor.cpp
new file mode 100644
index 00000000000..97b89ea43cc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itmajor.cpp
@@ -0,0 +1,203 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1998-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * MajorTestLevel is the top level test class for everything in the directory "IntlWork".
+ */
+
+/***********************************************************************
+* Modification history
+* Date Name Description
+* 02/14/2001 synwee Release collation for testing.
+***********************************************************************/
+
+#include "unicode/utypes.h"
+#include "itmajor.h"
+
+#include "itutil.h"
+#include "tscoll.h"
+#include "itformat.h"
+#include "ittrans.h"
+#include "itrbbi.h"
+#include "itrbnf.h"
+#include "itrbnfp.h"
+#include "itrbnfrt.h"
+#include "normconf.h"
+#include "regextst.h"
+#include "tstnorm.h"
+#include "canittst.h"
+#include "icusvtst.h"
+#include "testidna.h"
+#include "convtest.h"
+#include "csdetest.h"
+
+#define CASE_SUITE(id, suite) case id: \
+ name = #suite; \
+ if(exec) { \
+ logln(#suite "---"); \
+ suite test; \
+ callTest(test, par); \
+ } \
+ break
+
+void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ switch (index) {
+ case 0: name = "utility";
+ if (exec) {
+ logln("TestSuite Utilities---"); logln();
+ IntlTestUtilities test;
+ callTest( test, par );
+ }
+ break;
+
+ case 1: name = "normalize";
+#if !UCONFIG_NO_NORMALIZATION
+ if (exec) {
+ logln("TestSuite Normalize---"); logln();
+ IntlTestNormalize test;
+ callTest( test, par );
+ }
+#endif
+ break;
+
+ case 2: name = "collate";
+#if !UCONFIG_NO_COLLATION
+ if (exec) {
+ logln("TestSuite Collator---"); logln();
+ IntlTestCollator test;
+ callTest( test, par );
+ }
+#endif
+ break;
+
+ case 3: name = "regex";
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ if (exec) {
+ logln("TestSuite Regex---"); logln();
+ RegexTest test;
+ callTest( test, par );
+ }
+#endif
+ break;
+
+ case 4: name = "format";
+#if !UCONFIG_NO_FORMATTING
+ if (exec) {
+ logln("TestSuite Format---"); logln();
+ IntlTestFormat test;
+ callTest( test, par );
+ }
+#endif
+ break;
+
+ case 5: name = "translit";
+#if !UCONFIG_NO_TRANSLITERATION
+ if (exec) {
+ logln("TestSuite Transliterator---"); logln();
+ IntlTestTransliterator test;
+ callTest( test, par );
+ }
+#endif
+ break;
+
+ case 6: name = "rbbi";
+#if !UCONFIG_NO_BREAK_ITERATION
+ if (exec) {
+ logln("TestSuite RuleBasedBreakIterator---"); logln();
+ IntlTestRBBI test;
+ callTest( test, par );
+ }
+#endif
+ break;
+ case 7: name = "rbnf";
+#if !UCONFIG_NO_FORMATTING
+ if (exec) {
+ logln("TestSuite RuleBasedNumberFormat----"); logln();
+ IntlTestRBNF test;
+ callTest(test, par);
+ }
+#endif
+ break;
+ case 8: name = "rbnfrt";
+#if !UCONFIG_NO_FORMATTING
+ if (exec) {
+ logln("TestSuite RuleBasedNumberFormat RT----"); logln();
+ RbnfRoundTripTest test;
+ callTest(test, par);
+ }
+#endif
+ break;
+
+ case 9: name = "icuserv";
+#if !UCONFIG_NO_SERVICE
+ if (exec) {
+ logln("TestSuite ICUService---"); logln();
+ ICUServiceTest test;
+ callTest(test, par);
+ }
+#endif
+ break;
+ case 10: name = "idna";
+#if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION
+ if(exec){
+ logln("TestSuite IDNA----"); logln();
+ TestIDNA test;
+ callTest(test,par);
+ }
+#endif
+ break;
+ case 11: name = "convert";
+#if !UCONFIG_NO_LEGACY_CONVERSION
+ if (exec) {
+ logln("TestSuite Conversion---"); logln();
+ ConversionTest test;
+ callTest( test, par );
+ }
+#endif
+ break;
+
+ case 12: name = "rbnfp";
+#if !UCONFIG_NO_FORMATTING
+ if (exec) {
+ logln("TestSuite RuleBasedNumberParse ----"); logln();
+ IntlTestRBNFParse test;
+ callTest(test, par);
+ }
+#endif
+ break;
+
+ case 13: name = "csdet";
+ if (exec) {
+ logln("TestSuite CharsetDetection---"); logln();
+ CharsetDetectionTest test;
+ callTest(test, par);
+ }
+
+ break;
+
+ default: name = ""; break;
+ }
+
+
+}
+
+void IntlTestNormalize::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ if(exec) logln("TestSuite Normalize:");
+#if UCONFIG_NO_NORMALIZATION
+ name="";
+#else
+ switch (index) {
+ CASE_SUITE(0, BasicNormalizerTest);
+ CASE_SUITE(1, NormalizerConformanceTest); // this takes a long time
+ CASE_SUITE(2, CanonicalIteratorTest);
+ default:
+ name="";
+ break;
+ }
+#endif
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itmajor.h b/Build/source/libs/icu/icu-xetex/test/intltest/itmajor.h
new file mode 100644
index 00000000000..0527e159172
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itmajor.h
@@ -0,0 +1,26 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * MajorTestLevel is the top level test class for everything in the directory "IntlWork".
+ */
+
+#ifndef _INTLTESTMAJOR
+#define _INTLTESTMAJOR
+
+
+#include "intltest.h"
+
+
+class MajorTestLevel: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+class IntlTestNormalize: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.cpp
new file mode 100644
index 00000000000..75f01cff0d5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.cpp
@@ -0,0 +1,48 @@
+/*
+**********************************************************************
+* Copyright (C) 1998-2001, International Business Machines Corporation
+* and others. All Rights Reserved.
+**********************************************************************
+*/
+/***********************************************************************
+* Date Name Description
+* 12/14/99 Madhu Creation.
+***********************************************************************/
+/**
+ * IntlTestRBBI is the medium level test class for RuleBasedBreakIterator
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "itrbbi.h"
+#include "rbbiapts.h"
+#include "rbbitst.h"
+
+void IntlTestRBBI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ if (exec) logln("TestSuite RuleBasedBreakIterator: ");
+ switch (index) {
+ case 0:
+ name = "RBBIAPITest";
+ if (exec) {
+ logln("RBBIAPITest--"); logln("");
+ RBBIAPITest test;
+ callTest( test, par );
+ }
+ break;
+
+ case 1:
+ name = "RBBITest";
+ if (exec) {
+ logln("RBBITest---"); logln("");
+ RBBITest test;
+ callTest( test, par );
+ }
+ break;
+ default: name=""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.h b/Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.h
new file mode 100644
index 00000000000..86a2ac4251c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbbi.h
@@ -0,0 +1,31 @@
+/*
+**********************************************************************
+* Copyright (C) 1998-2001, International Business Machines Corporation
+* and others. All Rights Reserved.
+**********************************************************************
+************************************************************************
+* Date Name Description
+* 12/14/99 Madhu Creation.
+************************************************************************/
+/**
+ * IntlTestRBBI is the top level test class for the RuleBasedBreakIterator tests
+ */
+
+#ifndef INTLTESTRBBI_H
+#define INTLTESTRBBI_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "intltest.h"
+
+
+class IntlTestRBBI: public IntlTest {
+public:
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.cpp
new file mode 100644
index 00000000000..58233a39255
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.cpp
@@ -0,0 +1,1938 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 1996-2007, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "itrbnf.h"
+
+#include "unicode/umachine.h"
+
+#include "unicode/tblcoll.h"
+#include "unicode/coleitr.h"
+#include "unicode/ures.h"
+#include "unicode/ustring.h"
+#include "unicode/decimfmt.h"
+#include "unicode/udata.h"
+#include "testutil.h"
+
+//#include "llong.h"
+
+#include <string.h>
+
+// import com.ibm.text.RuleBasedNumberFormat;
+// import com.ibm.test.TestFmwk;
+
+// import java.util.Locale;
+// import java.text.NumberFormat;
+
+// current macro not in icu1.8.1
+#define TESTCASE(id,test) \
+ case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ break
+
+void IntlTestRBNF::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/)
+{
+ if (exec) logln("TestSuite RuleBasedNumberFormat");
+ switch (index) {
+#if U_HAVE_RBNF
+ TESTCASE(0, TestEnglishSpellout);
+ TESTCASE(1, TestOrdinalAbbreviations);
+ TESTCASE(2, TestDurations);
+ TESTCASE(3, TestSpanishSpellout);
+ TESTCASE(4, TestFrenchSpellout);
+ TESTCASE(5, TestSwissFrenchSpellout);
+ TESTCASE(6, TestItalianSpellout);
+ TESTCASE(7, TestGermanSpellout);
+ TESTCASE(8, TestThaiSpellout);
+ TESTCASE(9, TestAPI);
+ TESTCASE(10, TestFractionalRuleSet);
+ TESTCASE(11, TestSwedishSpellout);
+ TESTCASE(12, TestBelgianFrenchSpellout);
+ TESTCASE(13, TestSmallValues);
+ TESTCASE(14, TestLocalizations);
+ TESTCASE(15, TestAllLocales);
+ TESTCASE(16, TestHebrewFraction);
+ TESTCASE(17, TestPortugueseSpellout);
+ TESTCASE(18, TestMultiplierSubstitution);
+#else
+ TESTCASE(0, TestRBNFDisabled);
+#endif
+ default:
+ name = "";
+ break;
+ }
+}
+
+#if U_HAVE_RBNF
+
+void IntlTestRBNF::TestHebrewFraction() {
+ // this is the expected output for 123.45, with no '<' in it.
+ UChar text1[] = {
+ 0x05de, 0x05d0, 0x05d4, 0x0020,
+ 0x05e2, 0x05e9, 0x05e8, 0x05d9, 0x05dd, 0x0020,
+ 0x05d5, 0x05e9, 0x05dc, 0x05d5, 0x05e9, 0x0020,
+ 0x05e0, 0x05e7, 0x05d5, 0x05d3, 0x05d4, 0x0020,
+ 0x05d0, 0x05e8, 0x05d1, 0x05e2, 0x05d9, 0x05dd, 0x0020,
+ 0x05d5, 0x05d7, 0x05de, 0x05e9, 0x0000,
+ };
+ UChar text2[] = {
+ 0x05DE, 0x05D0, 0x05D4, 0x0020,
+ 0x05E2, 0x05E9, 0x05E8, 0x05D9, 0x05DD, 0x0020,
+ 0x05D5, 0x05E9, 0x05DC, 0x05D5, 0x05E9, 0x0020,
+ 0x05E0, 0x05E7, 0x05D5, 0x05D3, 0x05D4, 0x0020,
+ 0x05D0, 0x05E4, 0x05E1, 0x0020,
+ 0x05D0, 0x05E4, 0x05E1, 0x0020,
+ 0x05D0, 0x05E8, 0x05D1, 0x05E2, 0x05D9, 0x05DD, 0x0020,
+ 0x05D5, 0x05D7, 0x05DE, 0x05E9, 0x0000,
+ };
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter = new RuleBasedNumberFormat(URBNF_SPELLOUT, "he_IL", status);
+ UnicodeString result;
+ Formattable parseResult;
+ ParsePosition pp(0);
+ {
+ UnicodeString expected(text1);
+ formatter->format(123.45, result);
+ if (result != expected) {
+ errln((UnicodeString)"expected '" + TestUtility::hex(expected) + "'\nbut got: '" + TestUtility::hex(result) + "'");
+ } else {
+ formatter->parse(result, parseResult, pp);
+ if (parseResult.getDouble() != 123.45) {
+ errln("expected 123.45 but got: %g", parseResult.getDouble());
+ }
+ }
+ }
+ {
+ UnicodeString expected(text2);
+ result.remove();
+ formatter->format(123.0045, result);
+ if (result != expected) {
+ errln((UnicodeString)"expected '" + TestUtility::hex(expected) + "'\nbut got: '" + TestUtility::hex(result) + "'");
+ } else {
+ pp.setIndex(0);
+ formatter->parse(result, parseResult, pp);
+ if (parseResult.getDouble() != 123.0045) {
+ errln("expected 123.0045 but got: %g", parseResult.getDouble());
+ }
+ }
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestAPI() {
+ // This test goes through the APIs that were not tested before.
+ // These tests are too small to have separate test classes/functions
+
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getUS(), status);
+
+ logln("RBNF API test starting");
+ // test clone
+ {
+ logln("Testing Clone");
+ RuleBasedNumberFormat* rbnfClone = (RuleBasedNumberFormat *)formatter->clone();
+ if(rbnfClone != NULL) {
+ if(!(*rbnfClone == *formatter)) {
+ errln("Clone should be semantically equivalent to the original!");
+ }
+ delete rbnfClone;
+ } else {
+ errln("Cloning failed!");
+ }
+ }
+
+ // test assignment
+ {
+ logln("Testing assignment operator");
+ RuleBasedNumberFormat assignResult(URBNF_SPELLOUT, Locale("es", "ES", ""), status);
+ assignResult = *formatter;
+ if(!(assignResult == *formatter)) {
+ errln("Assignment result should be semantically equivalent to the original!");
+ }
+ }
+
+ // test rule constructor
+ {
+ logln("Testing rule constructor");
+ UResourceBundle *en = ures_open(U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "rbnf", "en", &status);
+ if(U_FAILURE(status)) {
+ errln("Unable to access resource bundle with data!");
+ } else {
+ int32_t ruleLen = 0;
+ const UChar *spelloutRules = ures_getStringByKey(en, "SpelloutRules", &ruleLen, &status);
+ if(U_FAILURE(status) || ruleLen == 0 || spelloutRules == NULL) {
+ errln("Unable to access the rules string!");
+ } else {
+ UParseError perror;
+ RuleBasedNumberFormat ruleCtorResult(spelloutRules, Locale::getUS(), perror, status);
+ if(!(ruleCtorResult == *formatter)) {
+ errln("Formatter constructed from the original rules should be semantically equivalent to the original!");
+ }
+
+ // Jitterbug 4452, for coverage
+ RuleBasedNumberFormat nf(spelloutRules, (UnicodeString)"", Locale::getUS(), perror, status);
+ if(!(nf == *formatter)) {
+ errln("Formatter constructed from the original rules should be semantically equivalent to the original!");
+ }
+ }
+ ures_close(en);
+ }
+ }
+
+ // test getRules
+ {
+ logln("Testing getRules function");
+ UnicodeString rules = formatter->getRules();
+ UParseError perror;
+ RuleBasedNumberFormat fromRulesResult(rules, Locale::getUS(), perror, status);
+
+ if(!(fromRulesResult == *formatter)) {
+ errln("Formatter constructed from rules obtained by getRules should be semantically equivalent to the original!");
+ }
+ }
+
+
+ {
+ logln("Testing copy constructor");
+ RuleBasedNumberFormat copyCtorResult(*formatter);
+ if(!(copyCtorResult == *formatter)) {
+ errln("Copy constructor result result should be semantically equivalent to the original!");
+ }
+ }
+
+#if !UCONFIG_NO_COLLATION
+ // test ruleset names
+ {
+ logln("Testing getNumberOfRuleSetNames, getRuleSetName and format using rule set names");
+ int32_t noOfRuleSetNames = formatter->getNumberOfRuleSetNames();
+ if(noOfRuleSetNames == 0) {
+ errln("Number of rule set names should be more than zero");
+ }
+ UnicodeString ruleSetName;
+ int32_t i = 0;
+ int32_t intFormatNum = 34567;
+ double doubleFormatNum = 893411.234;
+ logln("number of rule set names is %i", noOfRuleSetNames);
+ for(i = 0; i < noOfRuleSetNames; i++) {
+ FieldPosition pos1, pos2;
+ UnicodeString intFormatResult, doubleFormatResult;
+ Formattable intParseResult, doubleParseResult;
+
+ ruleSetName = formatter->getRuleSetName(i);
+ log("Rule set name %i is ", i);
+ log(ruleSetName);
+ logln(". Format results are: ");
+ intFormatResult = formatter->format(intFormatNum, ruleSetName, intFormatResult, pos1, status);
+ doubleFormatResult = formatter->format(doubleFormatNum, ruleSetName, doubleFormatResult, pos2, status);
+ if(U_FAILURE(status)) {
+ errln("Format using a rule set failed");
+ break;
+ }
+ logln(intFormatResult);
+ logln(doubleFormatResult);
+ formatter->setLenient(TRUE);
+ formatter->parse(intFormatResult, intParseResult, status);
+ formatter->parse(doubleFormatResult, doubleParseResult, status);
+
+ logln("Parse results for lenient = TRUE, %i, %f", intParseResult.getLong(), doubleParseResult.getDouble());
+
+ formatter->setLenient(FALSE);
+ formatter->parse(intFormatResult, intParseResult, status);
+ formatter->parse(doubleFormatResult, doubleParseResult, status);
+
+ logln("Parse results for lenient = FALSE, %i, %f", intParseResult.getLong(), doubleParseResult.getDouble());
+
+ if(U_FAILURE(status)) {
+ errln("Error during parsing");
+ }
+
+ intFormatResult = formatter->format(intFormatNum, "BLABLA", intFormatResult, pos1, status);
+ if(U_SUCCESS(status)) {
+ errln("Using invalid rule set name should have failed");
+ break;
+ }
+ status = U_ZERO_ERROR;
+ doubleFormatResult = formatter->format(doubleFormatNum, "TRUC", doubleFormatResult, pos2, status);
+ if(U_SUCCESS(status)) {
+ errln("Using invalid rule set name should have failed");
+ break;
+ }
+ status = U_ZERO_ERROR;
+ }
+ status = U_ZERO_ERROR;
+ }
+#endif
+
+ // test API
+ UnicodeString expected("four point five","");
+ logln("Testing format(double)");
+ UnicodeString result;
+ formatter->format(4.5,result);
+ if(result != expected) {
+ errln("Formatted 4.5, expected " + expected + " got " + result);
+ } else {
+ logln("Formatted 4.5, expected " + expected + " got " + result);
+ }
+ result.remove();
+ expected = "four";
+ formatter->format((int32_t)4,result);
+ if(result != expected) {
+ errln("Formatted 4, expected " + expected + " got " + result);
+ } else {
+ logln("Formatted 4, expected " + expected + " got " + result);
+ }
+
+ result.remove();
+ FieldPosition pos;
+ formatter->format((int64_t)4, result, pos, status = U_ZERO_ERROR);
+ if(result != expected) {
+ errln("Formatted 4 int64_t, expected " + expected + " got " + result);
+ } else {
+ logln("Formatted 4 int64_t, expected " + expected + " got " + result);
+ }
+
+ //Jitterbug 4452, for coverage
+ result.remove();
+ FieldPosition pos2;
+ formatter->format((int64_t)4, formatter->getRuleSetName(0), result, pos2, status = U_ZERO_ERROR);
+ if(result != expected) {
+ errln("Formatted 4 int64_t, expected " + expected + " got " + result);
+ } else {
+ logln("Formatted 4 int64_t, expected " + expected + " got " + result);
+ }
+
+ // clean up
+ logln("Cleaning up");
+ delete formatter;
+}
+
+void IntlTestRBNF::TestFractionalRuleSet()
+{
+ UnicodeString fracRules(
+ "%main:\n"
+ // this rule formats the number if it's 1 or more. It formats
+ // the integral part using a DecimalFormat ("#,##0" puts
+ // thousands separators in the right places) and the fractional
+ // part using %%frac. If there is no fractional part, it
+ // just shows the integral part.
+ " x.0: <#,##0<[ >%%frac>];\n"
+ // this rule formats the number if it's between 0 and 1. It
+ // shows only the fractional part (0.5 shows up as "1/2," not
+ // "0 1/2")
+ " 0.x: >%%frac>;\n"
+ // the fraction rule set. This works the same way as the one in the
+ // preceding example: We multiply the fractional part of the number
+ // being formatted by each rule's base value and use the rule that
+ // produces the result closest to 0 (or the first rule that produces 0).
+ // Since we only provide rules for the numbers from 2 to 10, we know
+ // we'll get a fraction with a denominator between 2 and 10.
+ // "<0<" causes the numerator of the fraction to be formatted
+ // using numerals
+ "%%frac:\n"
+ " 2: 1/2;\n"
+ " 3: <0</3;\n"
+ " 4: <0</4;\n"
+ " 5: <0</5;\n"
+ " 6: <0</6;\n"
+ " 7: <0</7;\n"
+ " 8: <0</8;\n"
+ " 9: <0</9;\n"
+ " 10: <0</10;\n");
+
+ // mondo hack
+ int len = fracRules.length();
+ int change = 2;
+ for (int i = 0; i < len; ++i) {
+ UChar ch = fracRules.charAt(i);
+ if (ch == '\n') {
+ change = 2; // change ok
+ } else if (ch == ':') {
+ change = 1; // change, but once we hit a non-space char, don't change
+ } else if (ch == ' ') {
+ if (change != 0) {
+ fracRules.setCharAt(i, (UChar)0x200e);
+ }
+ } else {
+ if (change == 1) {
+ change = 0;
+ }
+ }
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError perror;
+ RuleBasedNumberFormat formatter(fracRules, Locale::getEnglish(), perror, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "0", "0" },
+ { ".1", "1/10" },
+ { ".11", "1/9" },
+ { ".125", "1/8" },
+ { ".1428", "1/7" },
+ { ".1667", "1/6" },
+ { ".2", "1/5" },
+ { ".25", "1/4" },
+ { ".333", "1/3" },
+ { ".5", "1/2" },
+ { "1.1", "1 1/10" },
+ { "2.11", "2 1/9" },
+ { "3.125", "3 1/8" },
+ { "4.1428", "4 1/7" },
+ { "5.1667", "5 1/6" },
+ { "6.2", "6 1/5" },
+ { "7.25", "7 1/4" },
+ { "8.333", "8 1/3" },
+ { "9.5", "9 1/2" },
+ { ".2222", "2/9" },
+ { ".4444", "4/9" },
+ { ".5555", "5/9" },
+ { "1.2856", "1 2/7" },
+ { NULL, NULL }
+ };
+ doTest(&formatter, testData, FALSE); // exact values aren't parsable from fractions
+ }
+}
+
+#if 0
+#define LLAssert(a) \
+ if (!(a)) errln("FAIL: " #a)
+
+void IntlTestRBNF::TestLLongConstructors()
+{
+ logln("Testing constructors");
+
+ // constant (shouldn't really be public)
+ LLAssert(llong(llong::kD32).asDouble() == llong::kD32);
+
+ // internal constructor (shouldn't really be public)
+ LLAssert(llong(0, 1).asDouble() == 1);
+ LLAssert(llong(1, 0).asDouble() == llong::kD32);
+ LLAssert(llong((uint32_t)-1, (uint32_t)-1).asDouble() == -1);
+
+ // public empty constructor
+ LLAssert(llong().asDouble() == 0);
+
+ // public int32_t constructor
+ LLAssert(llong((int32_t)0).asInt() == (int32_t)0);
+ LLAssert(llong((int32_t)1).asInt() == (int32_t)1);
+ LLAssert(llong((int32_t)-1).asInt() == (int32_t)-1);
+ LLAssert(llong((int32_t)0x7fffffff).asInt() == (int32_t)0x7fffffff);
+ LLAssert(llong((int32_t)0xffffffff).asInt() == (int32_t)-1);
+ LLAssert(llong((int32_t)0x80000000).asInt() == (int32_t)0x80000000);
+
+ // public int16_t constructor
+ LLAssert(llong((int16_t)0).asInt() == (int16_t)0);
+ LLAssert(llong((int16_t)1).asInt() == (int16_t)1);
+ LLAssert(llong((int16_t)-1).asInt() == (int16_t)-1);
+ LLAssert(llong((int16_t)0x7fff).asInt() == (int16_t)0x7fff);
+ LLAssert(llong((int16_t)0xffff).asInt() == (int16_t)0xffff);
+ LLAssert(llong((int16_t)0x8000).asInt() == (int16_t)0x8000);
+
+ // public int8_t constructor
+ LLAssert(llong((int8_t)0).asInt() == (int8_t)0);
+ LLAssert(llong((int8_t)1).asInt() == (int8_t)1);
+ LLAssert(llong((int8_t)-1).asInt() == (int8_t)-1);
+ LLAssert(llong((int8_t)0x7f).asInt() == (int8_t)0x7f);
+ LLAssert(llong((int8_t)0xff).asInt() == (int8_t)0xff);
+ LLAssert(llong((int8_t)0x80).asInt() == (int8_t)0x80);
+
+ // public uint16_t constructor
+ LLAssert(llong((uint16_t)0).asUInt() == (uint16_t)0);
+ LLAssert(llong((uint16_t)1).asUInt() == (uint16_t)1);
+ LLAssert(llong((uint16_t)-1).asUInt() == (uint16_t)-1);
+ LLAssert(llong((uint16_t)0x7fff).asUInt() == (uint16_t)0x7fff);
+ LLAssert(llong((uint16_t)0xffff).asUInt() == (uint16_t)0xffff);
+ LLAssert(llong((uint16_t)0x8000).asUInt() == (uint16_t)0x8000);
+
+ // public uint32_t constructor
+ LLAssert(llong((uint32_t)0).asUInt() == (uint32_t)0);
+ LLAssert(llong((uint32_t)1).asUInt() == (uint32_t)1);
+ LLAssert(llong((uint32_t)-1).asUInt() == (uint32_t)-1);
+ LLAssert(llong((uint32_t)0x7fffffff).asUInt() == (uint32_t)0x7fffffff);
+ LLAssert(llong((uint32_t)0xffffffff).asUInt() == (uint32_t)-1);
+ LLAssert(llong((uint32_t)0x80000000).asUInt() == (uint32_t)0x80000000);
+
+ // public double constructor
+ LLAssert(llong((double)0).asDouble() == (double)0);
+ LLAssert(llong((double)1).asDouble() == (double)1);
+ LLAssert(llong((double)0x7fffffff).asDouble() == (double)0x7fffffff);
+ LLAssert(llong((double)0x80000000).asDouble() == (double)0x80000000);
+ LLAssert(llong((double)0x80000001).asDouble() == (double)0x80000001);
+
+ // can't access uprv_maxmantissa, so fake it
+ double maxmantissa = (llong((int32_t)1) << 40).asDouble();
+ LLAssert(llong(maxmantissa).asDouble() == maxmantissa);
+ LLAssert(llong(-maxmantissa).asDouble() == -maxmantissa);
+
+ // copy constructor
+ LLAssert(llong(llong(0, 1)).asDouble() == 1);
+ LLAssert(llong(llong(1, 0)).asDouble() == llong::kD32);
+ LLAssert(llong(llong(-1, (uint32_t)-1)).asDouble() == -1);
+
+ // asInt - test unsigned to signed narrowing conversion
+ LLAssert(llong((uint32_t)-1).asInt() == (int32_t)0x7fffffff);
+ LLAssert(llong(-1, 0).asInt() == (int32_t)0x80000000);
+
+ // asUInt - test signed to unsigned narrowing conversion
+ LLAssert(llong((int32_t)-1).asUInt() == (uint32_t)-1);
+ LLAssert(llong((int32_t)0x80000000).asUInt() == (uint32_t)0x80000000);
+
+ // asDouble already tested
+
+}
+
+void IntlTestRBNF::TestLLongSimpleOperators()
+{
+ logln("Testing simple operators");
+
+ // operator==
+ LLAssert(llong() == llong(0, 0));
+ LLAssert(llong(1,0) == llong(1, 0));
+ LLAssert(llong(0,1) == llong(0, 1));
+
+ // operator!=
+ LLAssert(llong(1,0) != llong(1,1));
+ LLAssert(llong(0,1) != llong(1,1));
+ LLAssert(llong(0xffffffff,0xffffffff) != llong(0x7fffffff, 0xffffffff));
+
+ // unsigned >
+ LLAssert(llong((int32_t)-1).ugt(llong(0x7fffffff, 0xffffffff)));
+
+ // unsigned <
+ LLAssert(llong(0x7fffffff, 0xffffffff).ult(llong((int32_t)-1)));
+
+ // unsigned >=
+ LLAssert(llong((int32_t)-1).uge(llong(0x7fffffff, 0xffffffff)));
+ LLAssert(llong((int32_t)-1).uge(llong((int32_t)-1)));
+
+ // unsigned <=
+ LLAssert(llong(0x7fffffff, 0xffffffff).ule(llong((int32_t)-1)));
+ LLAssert(llong((int32_t)-1).ule(llong((int32_t)-1)));
+
+ // operator>
+ LLAssert(llong(1, 1) > llong(1, 0));
+ LLAssert(llong(0, 0x80000000) > llong(0, 0x7fffffff));
+ LLAssert(llong(0x80000000, 1) > llong(0x80000000, 0));
+ LLAssert(llong(1, 0) > llong(0, 0x7fffffff));
+ LLAssert(llong(1, 0) > llong(0, 0xffffffff));
+ LLAssert(llong(0, 0) > llong(0x80000000, 1));
+
+ // operator<
+ LLAssert(llong(1, 0) < llong(1, 1));
+ LLAssert(llong(0, 0x7fffffff) < llong(0, 0x80000000));
+ LLAssert(llong(0x80000000, 0) < llong(0x80000000, 1));
+ LLAssert(llong(0, 0x7fffffff) < llong(1, 0));
+ LLAssert(llong(0, 0xffffffff) < llong(1, 0));
+ LLAssert(llong(0x80000000, 1) < llong(0, 0));
+
+ // operator>=
+ LLAssert(llong(1, 1) >= llong(1, 0));
+ LLAssert(llong(0, 0x80000000) >= llong(0, 0x7fffffff));
+ LLAssert(llong(0x80000000, 1) >= llong(0x80000000, 0));
+ LLAssert(llong(1, 0) >= llong(0, 0x7fffffff));
+ LLAssert(llong(1, 0) >= llong(0, 0xffffffff));
+ LLAssert(llong(0, 0) >= llong(0x80000000, 1));
+ LLAssert(llong() >= llong(0, 0));
+ LLAssert(llong(1,0) >= llong(1, 0));
+ LLAssert(llong(0,1) >= llong(0, 1));
+
+ // operator<=
+ LLAssert(llong(1, 0) <= llong(1, 1));
+ LLAssert(llong(0, 0x7fffffff) <= llong(0, 0x80000000));
+ LLAssert(llong(0x80000000, 0) <= llong(0x80000000, 1));
+ LLAssert(llong(0, 0x7fffffff) <= llong(1, 0));
+ LLAssert(llong(0, 0xffffffff) <= llong(1, 0));
+ LLAssert(llong(0x80000000, 1) <= llong(0, 0));
+ LLAssert(llong() <= llong(0, 0));
+ LLAssert(llong(1,0) <= llong(1, 0));
+ LLAssert(llong(0,1) <= llong(0, 1));
+
+ // operator==(int32)
+ LLAssert(llong() == (int32_t)0);
+ LLAssert(llong(0,1) == (int32_t)1);
+
+ // operator!=(int32)
+ LLAssert(llong(1,0) != (int32_t)0);
+ LLAssert(llong(0,1) != (int32_t)2);
+ LLAssert(llong(0,0xffffffff) != (int32_t)-1);
+
+ llong negOne(0xffffffff, 0xffffffff);
+
+ // operator>(int32)
+ LLAssert(llong(0, 0x80000000) > (int32_t)0x7fffffff);
+ LLAssert(negOne > (int32_t)-2);
+ LLAssert(llong(1, 0) > (int32_t)0x7fffffff);
+ LLAssert(llong(0, 0) > (int32_t)-1);
+
+ // operator<(int32)
+ LLAssert(llong(0, 0x7ffffffe) < (int32_t)0x7fffffff);
+ LLAssert(llong(0xffffffff, 0xfffffffe) < (int32_t)-1);
+
+ // operator>=(int32)
+ LLAssert(llong(0, 0x80000000) >= (int32_t)0x7fffffff);
+ LLAssert(negOne >= (int32_t)-2);
+ LLAssert(llong(1, 0) >= (int32_t)0x7fffffff);
+ LLAssert(llong(0, 0) >= (int32_t)-1);
+ LLAssert(llong() >= (int32_t)0);
+ LLAssert(llong(0,1) >= (int32_t)1);
+
+ // operator<=(int32)
+ LLAssert(llong(0, 0x7ffffffe) <= (int32_t)0x7fffffff);
+ LLAssert(llong(0xffffffff, 0xfffffffe) <= (int32_t)-1);
+ LLAssert(llong() <= (int32_t)0);
+ LLAssert(llong(0,1) <= (int32_t)1);
+
+ // operator=
+ LLAssert((llong(2,3) = llong((uint32_t)-1)).asUInt() == (uint32_t)-1);
+
+ // operator <<=
+ LLAssert((llong(1, 1) <<= 0) == llong(1, 1));
+ LLAssert((llong(1, 1) <<= 31) == llong(0x80000000, 0x80000000));
+ LLAssert((llong(1, 1) <<= 32) == llong(1, 0));
+ LLAssert((llong(1, 1) <<= 63) == llong(0x80000000, 0));
+ LLAssert((llong(1, 1) <<= 64) == llong(1, 1)); // only lower 6 bits are used
+ LLAssert((llong(1, 1) <<= -1) == llong(0x80000000, 0)); // only lower 6 bits are used
+
+ // operator <<
+ LLAssert((llong((int32_t)1) << 5).asUInt() == 32);
+
+ // operator >>= (sign extended)
+ LLAssert((llong(0x7fffa0a0, 0xbcbcdfdf) >>= 16) == llong(0x7fff,0xa0a0bcbc));
+ LLAssert((llong(0x8000789a, 0xbcde0000) >>= 16) == llong(0xffff8000,0x789abcde));
+ LLAssert((llong(0x80000000, 0) >>= 63) == llong(0xffffffff, 0xffffffff));
+ LLAssert((llong(0x80000000, 0) >>= 47) == llong(0xffffffff, 0xffff0000));
+ LLAssert((llong(0x80000000, 0x80000000) >> 64) == llong(0x80000000, 0x80000000)); // only lower 6 bits are used
+ LLAssert((llong(0x80000000, 0) >>= -1) == llong(0xffffffff, 0xffffffff)); // only lower 6 bits are used
+
+ // operator >> sign extended)
+ LLAssert((llong(0x8000789a, 0xbcde0000) >> 16) == llong(0xffff8000,0x789abcde));
+
+ // ushr (right shift without sign extension)
+ LLAssert(llong(0x7fffa0a0, 0xbcbcdfdf).ushr(16) == llong(0x7fff,0xa0a0bcbc));
+ LLAssert(llong(0x8000789a, 0xbcde0000).ushr(16) == llong(0x00008000,0x789abcde));
+ LLAssert(llong(0x80000000, 0).ushr(63) == llong(0, 1));
+ LLAssert(llong(0x80000000, 0).ushr(47) == llong(0, 0x10000));
+ LLAssert(llong(0x80000000, 0x80000000).ushr(64) == llong(0x80000000, 0x80000000)); // only lower 6 bits are used
+ LLAssert(llong(0x80000000, 0).ushr(-1) == llong(0, 1)); // only lower 6 bits are used
+
+ // operator&(llong)
+ LLAssert((llong(0x55555555, 0x55555555) & llong(0xaaaaffff, 0xffffaaaa)) == llong(0x00005555, 0x55550000));
+
+ // operator|(llong)
+ LLAssert((llong(0x55555555, 0x55555555) | llong(0xaaaaffff, 0xffffaaaa)) == llong(0xffffffff, 0xffffffff));
+
+ // operator^(llong)
+ LLAssert((llong(0x55555555, 0x55555555) ^ llong(0xaaaaffff, 0xffffaaaa)) == llong(0xffffaaaa, 0xaaaaffff));
+
+ // operator&(uint32)
+ LLAssert((llong(0x55555555, 0x55555555) & (uint32_t)0xffffaaaa) == llong(0, 0x55550000));
+
+ // operator|(uint32)
+ LLAssert((llong(0x55555555, 0x55555555) | (uint32_t)0xffffaaaa) == llong(0x55555555, 0xffffffff));
+
+ // operator^(uint32)
+ LLAssert((llong(0x55555555, 0x55555555) ^ (uint32_t)0xffffaaaa) == llong(0x55555555, 0xaaaaffff));
+
+ // operator~
+ LLAssert(~llong(0x55555555, 0x55555555) == llong(0xaaaaaaaa, 0xaaaaaaaa));
+
+ // operator&=(llong)
+ LLAssert((llong(0x55555555, 0x55555555) &= llong(0xaaaaffff, 0xffffaaaa)) == llong(0x00005555, 0x55550000));
+
+ // operator|=(llong)
+ LLAssert((llong(0x55555555, 0x55555555) |= llong(0xaaaaffff, 0xffffaaaa)) == llong(0xffffffff, 0xffffffff));
+
+ // operator^=(llong)
+ LLAssert((llong(0x55555555, 0x55555555) ^= llong(0xaaaaffff, 0xffffaaaa)) == llong(0xffffaaaa, 0xaaaaffff));
+
+ // operator&=(uint32)
+ LLAssert((llong(0x55555555, 0x55555555) &= (uint32_t)0xffffaaaa) == llong(0, 0x55550000));
+
+ // operator|=(uint32)
+ LLAssert((llong(0x55555555, 0x55555555) |= (uint32_t)0xffffaaaa) == llong(0x55555555, 0xffffffff));
+
+ // operator^=(uint32)
+ LLAssert((llong(0x55555555, 0x55555555) ^= (uint32_t)0xffffaaaa) == llong(0x55555555, 0xaaaaffff));
+
+ // prefix inc
+ LLAssert(llong(1, 0) == ++llong(0,0xffffffff));
+
+ // prefix dec
+ LLAssert(llong(0,0xffffffff) == --llong(1, 0));
+
+ // postfix inc
+ {
+ llong n(0, 0xffffffff);
+ LLAssert(llong(0, 0xffffffff) == n++);
+ LLAssert(llong(1, 0) == n);
+ }
+
+ // postfix dec
+ {
+ llong n(1, 0);
+ LLAssert(llong(1, 0) == n--);
+ LLAssert(llong(0, 0xffffffff) == n);
+ }
+
+ // unary minus
+ LLAssert(llong(0, 0) == -llong(0, 0));
+ LLAssert(llong(0xffffffff, 0xffffffff) == -llong(0, 1));
+ LLAssert(llong(0, 1) == -llong(0xffffffff, 0xffffffff));
+ LLAssert(llong(0x7fffffff, 0xffffffff) == -llong(0x80000000, 1));
+ LLAssert(llong(0x80000000, 0) == -llong(0x80000000, 0)); // !!! we don't handle overflow
+
+ // operator-=
+ {
+ llong n;
+ LLAssert((n -= llong(0, 1)) == llong(0xffffffff, 0xffffffff));
+ LLAssert(n == llong(0xffffffff, 0xffffffff));
+
+ n = llong(1, 0);
+ LLAssert((n -= llong(0, 1)) == llong(0, 0xffffffff));
+ LLAssert(n == llong(0, 0xffffffff));
+ }
+
+ // operator-
+ {
+ llong n;
+ LLAssert((n - llong(0, 1)) == llong(0xffffffff, 0xffffffff));
+ LLAssert(n == llong(0, 0));
+
+ n = llong(1, 0);
+ LLAssert((n - llong(0, 1)) == llong(0, 0xffffffff));
+ LLAssert(n == llong(1, 0));
+ }
+
+ // operator+=
+ {
+ llong n(0xffffffff, 0xffffffff);
+ LLAssert((n += llong(0, 1)) == llong(0, 0));
+ LLAssert(n == llong(0, 0));
+
+ n = llong(0, 0xffffffff);
+ LLAssert((n += llong(0, 1)) == llong(1, 0));
+ LLAssert(n == llong(1, 0));
+ }
+
+ // operator+
+ {
+ llong n(0xffffffff, 0xffffffff);
+ LLAssert((n + llong(0, 1)) == llong(0, 0));
+ LLAssert(n == llong(0xffffffff, 0xffffffff));
+
+ n = llong(0, 0xffffffff);
+ LLAssert((n + llong(0, 1)) == llong(1, 0));
+ LLAssert(n == llong(0, 0xffffffff));
+ }
+
+}
+
+void IntlTestRBNF::TestLLong()
+{
+ logln("Starting TestLLong");
+
+ TestLLongConstructors();
+
+ TestLLongSimpleOperators();
+
+ logln("Testing operator*=, operator*");
+
+ // operator*=, operator*
+ // small and large values, positive, &NEGative, zero
+ // also test commutivity
+ {
+ const llong ZERO;
+ const llong ONE(0, 1);
+ const llong NEG_ONE((int32_t)-1);
+ const llong THREE(0, 3);
+ const llong NEG_THREE((int32_t)-3);
+ const llong TWO_TO_16(0, 0x10000);
+ const llong NEG_TWO_TO_16 = -TWO_TO_16;
+ const llong TWO_TO_32(1, 0);
+ const llong NEG_TWO_TO_32 = -TWO_TO_32;
+
+ const llong NINE(0, 9);
+ const llong NEG_NINE = -NINE;
+
+ const llong TWO_TO_16X3(0, 0x00030000);
+ const llong NEG_TWO_TO_16X3 = -TWO_TO_16X3;
+
+ const llong TWO_TO_32X3(3, 0);
+ const llong NEG_TWO_TO_32X3 = -TWO_TO_32X3;
+
+ const llong TWO_TO_48(0x10000, 0);
+ const llong NEG_TWO_TO_48 = -TWO_TO_48;
+
+ const int32_t VALUE_WIDTH = 9;
+ const llong* values[VALUE_WIDTH] = {
+ &ZERO, &ONE, &NEG_ONE, &THREE, &NEG_THREE, &TWO_TO_16, &NEG_TWO_TO_16, &TWO_TO_32, &NEG_TWO_TO_32
+ };
+
+ const llong* answers[VALUE_WIDTH*VALUE_WIDTH] = {
+ &ZERO, &ZERO, &ZERO, &ZERO, &ZERO, &ZERO, &ZERO, &ZERO, &ZERO,
+ &ZERO, &ONE, &NEG_ONE, &THREE, &NEG_THREE, &TWO_TO_16, &NEG_TWO_TO_16, &TWO_TO_32, &NEG_TWO_TO_32,
+ &ZERO, &NEG_ONE, &ONE, &NEG_THREE, &THREE, &NEG_TWO_TO_16, &TWO_TO_16, &NEG_TWO_TO_32, &TWO_TO_32,
+ &ZERO, &THREE, &NEG_THREE, &NINE, &NEG_NINE, &TWO_TO_16X3, &NEG_TWO_TO_16X3, &TWO_TO_32X3, &NEG_TWO_TO_32X3,
+ &ZERO, &NEG_THREE, &THREE, &NEG_NINE, &NINE, &NEG_TWO_TO_16X3, &TWO_TO_16X3, &NEG_TWO_TO_32X3, &TWO_TO_32X3,
+ &ZERO, &TWO_TO_16, &NEG_TWO_TO_16, &TWO_TO_16X3, &NEG_TWO_TO_16X3, &TWO_TO_32, &NEG_TWO_TO_32, &TWO_TO_48, &NEG_TWO_TO_48,
+ &ZERO, &NEG_TWO_TO_16, &TWO_TO_16, &NEG_TWO_TO_16X3, &TWO_TO_16X3, &NEG_TWO_TO_32, &TWO_TO_32, &NEG_TWO_TO_48, &TWO_TO_48,
+ &ZERO, &TWO_TO_32, &NEG_TWO_TO_32, &TWO_TO_32X3, &NEG_TWO_TO_32X3, &TWO_TO_48, &NEG_TWO_TO_48, &ZERO, &ZERO,
+ &ZERO, &NEG_TWO_TO_32, &TWO_TO_32, &NEG_TWO_TO_32X3, &TWO_TO_32X3, &NEG_TWO_TO_48, &TWO_TO_48, &ZERO, &ZERO
+ };
+
+ for (int i = 0; i < VALUE_WIDTH; ++i) {
+ for (int j = 0; j < VALUE_WIDTH; ++j) {
+ llong lhs = *values[i];
+ llong rhs = *values[j];
+ llong ans = *answers[i*VALUE_WIDTH + j];
+
+ llong n = lhs;
+
+ LLAssert((n *= rhs) == ans);
+ LLAssert(n == ans);
+
+ n = lhs;
+ LLAssert((n * rhs) == ans);
+ LLAssert(n == lhs);
+ }
+ }
+ }
+
+ logln("Testing operator/=, operator/");
+ // operator/=, operator/
+ // test num = 0, div = 0, pos/neg, > 2^32, div > num
+ {
+ const llong ZERO;
+ const llong ONE(0, 1);
+ const llong NEG_ONE = -ONE;
+ const llong MAX(0x7fffffff, 0xffffffff);
+ const llong MIN(0x80000000, 0);
+ const llong TWO(0, 2);
+ const llong NEG_TWO = -TWO;
+ const llong FIVE(0, 5);
+ const llong NEG_FIVE = -FIVE;
+ const llong TWO_TO_32(1, 0);
+ const llong NEG_TWO_TO_32 = -TWO_TO_32;
+ const llong TWO_TO_32d5 = llong(TWO_TO_32.asDouble()/5.0);
+ const llong NEG_TWO_TO_32d5 = -TWO_TO_32d5;
+ const llong TWO_TO_32X5 = TWO_TO_32 * FIVE;
+ const llong NEG_TWO_TO_32X5 = -TWO_TO_32X5;
+
+ const llong* tuples[] = { // lhs, rhs, ans
+ &ZERO, &ZERO, &ZERO,
+ &ONE, &ZERO,&MAX,
+ &NEG_ONE, &ZERO, &MIN,
+ &ONE, &ONE, &ONE,
+ &ONE, &NEG_ONE, &NEG_ONE,
+ &NEG_ONE, &ONE, &NEG_ONE,
+ &NEG_ONE, &NEG_ONE, &ONE,
+ &FIVE, &TWO, &TWO,
+ &FIVE, &NEG_TWO, &NEG_TWO,
+ &NEG_FIVE, &TWO, &NEG_TWO,
+ &NEG_FIVE, &NEG_TWO, &TWO,
+ &TWO, &FIVE, &ZERO,
+ &TWO, &NEG_FIVE, &ZERO,
+ &NEG_TWO, &FIVE, &ZERO,
+ &NEG_TWO, &NEG_FIVE, &ZERO,
+ &TWO_TO_32, &TWO_TO_32, &ONE,
+ &TWO_TO_32, &NEG_TWO_TO_32, &NEG_ONE,
+ &NEG_TWO_TO_32, &TWO_TO_32, &NEG_ONE,
+ &NEG_TWO_TO_32, &NEG_TWO_TO_32, &ONE,
+ &TWO_TO_32, &FIVE, &TWO_TO_32d5,
+ &TWO_TO_32, &NEG_FIVE, &NEG_TWO_TO_32d5,
+ &NEG_TWO_TO_32, &FIVE, &NEG_TWO_TO_32d5,
+ &NEG_TWO_TO_32, &NEG_FIVE, &TWO_TO_32d5,
+ &TWO_TO_32X5, &FIVE, &TWO_TO_32,
+ &TWO_TO_32X5, &NEG_FIVE, &NEG_TWO_TO_32,
+ &NEG_TWO_TO_32X5, &FIVE, &NEG_TWO_TO_32,
+ &NEG_TWO_TO_32X5, &NEG_FIVE, &TWO_TO_32,
+ &TWO_TO_32X5, &TWO_TO_32, &FIVE,
+ &TWO_TO_32X5, &NEG_TWO_TO_32, &NEG_FIVE,
+ &NEG_TWO_TO_32X5, &NEG_TWO_TO_32, &FIVE,
+ &NEG_TWO_TO_32X5, &TWO_TO_32, &NEG_FIVE
+ };
+ const int TUPLE_WIDTH = 3;
+ const int TUPLE_COUNT = (int)(sizeof(tuples)/sizeof(tuples[0]))/TUPLE_WIDTH;
+ for (int i = 0; i < TUPLE_COUNT; ++i) {
+ const llong lhs = *tuples[i*TUPLE_WIDTH+0];
+ const llong rhs = *tuples[i*TUPLE_WIDTH+1];
+ const llong ans = *tuples[i*TUPLE_WIDTH+2];
+
+ llong n = lhs;
+ if (!((n /= rhs) == ans)) {
+ errln("fail: (n /= rhs) == ans");
+ }
+ LLAssert(n == ans);
+
+ n = lhs;
+ LLAssert((n / rhs) == ans);
+ LLAssert(n == lhs);
+ }
+ }
+
+ logln("Testing operator%%=, operator%%");
+ //operator%=, operator%
+ {
+ const llong ZERO;
+ const llong ONE(0, 1);
+ const llong TWO(0, 2);
+ const llong THREE(0,3);
+ const llong FOUR(0, 4);
+ const llong FIVE(0, 5);
+ const llong SIX(0, 6);
+
+ const llong NEG_ONE = -ONE;
+ const llong NEG_TWO = -TWO;
+ const llong NEG_THREE = -THREE;
+ const llong NEG_FOUR = -FOUR;
+ const llong NEG_FIVE = -FIVE;
+ const llong NEG_SIX = -SIX;
+
+ const llong NINETY_NINE(0, 99);
+ const llong HUNDRED(0, 100);
+ const llong HUNDRED_ONE(0, 101);
+
+ const llong BIG(0x12345678, 0x9abcdef0);
+ const llong BIG_FIVE(BIG * FIVE);
+ const llong BIG_FIVEm1 = BIG_FIVE - ONE;
+ const llong BIG_FIVEp1 = BIG_FIVE + ONE;
+
+ const llong* tuples[] = {
+ &ZERO, &FIVE, &ZERO,
+ &ONE, &FIVE, &ONE,
+ &TWO, &FIVE, &TWO,
+ &THREE, &FIVE, &THREE,
+ &FOUR, &FIVE, &FOUR,
+ &FIVE, &FIVE, &ZERO,
+ &SIX, &FIVE, &ONE,
+ &ZERO, &NEG_FIVE, &ZERO,
+ &ONE, &NEG_FIVE, &ONE,
+ &TWO, &NEG_FIVE, &TWO,
+ &THREE, &NEG_FIVE, &THREE,
+ &FOUR, &NEG_FIVE, &FOUR,
+ &FIVE, &NEG_FIVE, &ZERO,
+ &SIX, &NEG_FIVE, &ONE,
+ &NEG_ONE, &FIVE, &NEG_ONE,
+ &NEG_TWO, &FIVE, &NEG_TWO,
+ &NEG_THREE, &FIVE, &NEG_THREE,
+ &NEG_FOUR, &FIVE, &NEG_FOUR,
+ &NEG_FIVE, &FIVE, &ZERO,
+ &NEG_SIX, &FIVE, &NEG_ONE,
+ &NEG_ONE, &NEG_FIVE, &NEG_ONE,
+ &NEG_TWO, &NEG_FIVE, &NEG_TWO,
+ &NEG_THREE, &NEG_FIVE, &NEG_THREE,
+ &NEG_FOUR, &NEG_FIVE, &NEG_FOUR,
+ &NEG_FIVE, &NEG_FIVE, &ZERO,
+ &NEG_SIX, &NEG_FIVE, &NEG_ONE,
+ &NINETY_NINE, &FIVE, &FOUR,
+ &HUNDRED, &FIVE, &ZERO,
+ &HUNDRED_ONE, &FIVE, &ONE,
+ &BIG_FIVEm1, &FIVE, &FOUR,
+ &BIG_FIVE, &FIVE, &ZERO,
+ &BIG_FIVEp1, &FIVE, &ONE
+ };
+ const int TUPLE_WIDTH = 3;
+ const int TUPLE_COUNT = (int)(sizeof(tuples)/sizeof(tuples[0]))/TUPLE_WIDTH;
+ for (int i = 0; i < TUPLE_COUNT; ++i) {
+ const llong lhs = *tuples[i*TUPLE_WIDTH+0];
+ const llong rhs = *tuples[i*TUPLE_WIDTH+1];
+ const llong ans = *tuples[i*TUPLE_WIDTH+2];
+
+ llong n = lhs;
+ if (!((n %= rhs) == ans)) {
+ errln("fail: (n %= rhs) == ans");
+ }
+ LLAssert(n == ans);
+
+ n = lhs;
+ LLAssert((n % rhs) == ans);
+ LLAssert(n == lhs);
+ }
+ }
+
+ logln("Testing pow");
+ // pow
+ LLAssert(llong(0, 0).pow(0) == llong(0, 0));
+ LLAssert(llong(0, 0).pow(2) == llong(0, 0));
+ LLAssert(llong(0, 2).pow(0) == llong(0, 1));
+ LLAssert(llong(0, 2).pow(2) == llong(0, 4));
+ LLAssert(llong(0, 2).pow(32) == llong(1, 0));
+ LLAssert(llong(0, 5).pow(10) == llong((double)5.0 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5));
+
+ // absolute value
+ {
+ const llong n(0xffffffff,0xffffffff);
+ LLAssert(n.abs() == llong(0, 1));
+ }
+
+#ifdef RBNF_DEBUG
+ logln("Testing atoll");
+ // atoll
+ const char empty[] = "";
+ const char zero[] = "0";
+ const char neg_one[] = "-1";
+ const char neg_12345[] = "-12345";
+ const char big1[] = "123456789abcdef0";
+ const char big2[] = "fFfFfFfFfFfFfFfF";
+ LLAssert(llong::atoll(empty) == llong(0, 0));
+ LLAssert(llong::atoll(zero) == llong(0, 0));
+ LLAssert(llong::atoll(neg_one) == llong(0xffffffff, 0xffffffff));
+ LLAssert(llong::atoll(neg_12345) == -llong(0, 12345));
+ LLAssert(llong::atoll(big1, 16) == llong(0x12345678, 0x9abcdef0));
+ LLAssert(llong::atoll(big2, 16) == llong(0xffffffff, 0xffffffff));
+#endif
+
+ // u_atoll
+ const UChar uempty[] = { 0 };
+ const UChar uzero[] = { 0x30, 0 };
+ const UChar uneg_one[] = { 0x2d, 0x31, 0 };
+ const UChar uneg_12345[] = { 0x2d, 0x31, 0x32, 0x33, 0x34, 0x35, 0 };
+ const UChar ubig1[] = { 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x30, 0 };
+ const UChar ubig2[] = { 0x66, 0x46, 0x66, 0x46, 0x66, 0x46, 0x66, 0x46, 0x66, 0x46, 0x66, 0x46, 0x66, 0x46, 0x66, 0x46, 0 };
+ LLAssert(llong::utoll(uempty) == llong(0, 0));
+ LLAssert(llong::utoll(uzero) == llong(0, 0));
+ LLAssert(llong::utoll(uneg_one) == llong(0xffffffff, 0xffffffff));
+ LLAssert(llong::utoll(uneg_12345) == -llong(0, 12345));
+ LLAssert(llong::utoll(ubig1, 16) == llong(0x12345678, 0x9abcdef0));
+ LLAssert(llong::utoll(ubig2, 16) == llong(0xffffffff, 0xffffffff));
+
+#ifdef RBNF_DEBUG
+ logln("Testing lltoa");
+ // lltoa
+ {
+ char buf[64]; // ascii
+ LLAssert((llong(0, 0).lltoa(buf, (uint32_t)sizeof(buf)) == 1) && (strcmp(buf, zero) == 0));
+ LLAssert((llong(0xffffffff, 0xffffffff).lltoa(buf, (uint32_t)sizeof(buf)) == 2) && (strcmp(buf, neg_one) == 0));
+ LLAssert(((-llong(0, 12345)).lltoa(buf, (uint32_t)sizeof(buf)) == 6) && (strcmp(buf, neg_12345) == 0));
+ LLAssert((llong(0x12345678, 0x9abcdef0).lltoa(buf, (uint32_t)sizeof(buf), 16) == 16) && (strcmp(buf, big1) == 0));
+ }
+#endif
+
+ logln("Testing u_lltoa");
+ // u_lltoa
+ {
+ UChar buf[64];
+ LLAssert((llong(0, 0).lltou(buf, (uint32_t)sizeof(buf)) == 1) && (u_strcmp(buf, uzero) == 0));
+ LLAssert((llong(0xffffffff, 0xffffffff).lltou(buf, (uint32_t)sizeof(buf)) == 2) && (u_strcmp(buf, uneg_one) == 0));
+ LLAssert(((-llong(0, 12345)).lltou(buf, (uint32_t)sizeof(buf)) == 6) && (u_strcmp(buf, uneg_12345) == 0));
+ LLAssert((llong(0x12345678, 0x9abcdef0).lltou(buf, (uint32_t)sizeof(buf), 16) == 16) && (u_strcmp(buf, ubig1) == 0));
+ }
+}
+
+/* if 0 */
+#endif
+
+void
+IntlTestRBNF::TestEnglishSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getUS(), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "1", "one" },
+ { "2", "two" },
+ { "15", "fifteen" },
+ { "20", "twenty" },
+ { "23", "twenty-three" },
+ { "73", "seventy-three" },
+ { "88", "eighty-eight" },
+ { "100", "one hundred" },
+ { "106", "one hundred and six" },
+ { "127", "one hundred and twenty-seven" },
+ { "200", "two hundred" },
+ { "579", "five hundred and seventy-nine" },
+ { "1,000", "one thousand" },
+ { "2,000", "two thousand" },
+ { "3,004", "three thousand and four" },
+ { "4,567", "four thousand five hundred and sixty-seven" },
+ { "15,943", "fifteen thousand nine hundred and forty-three" },
+ { "2,345,678", "two million, three hundred and forty-five thousand, six hundred and seventy-eight" },
+ { "-36", "minus thirty-six" },
+ { "234.567", "two hundred and thirty-four point five six seven" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+
+#if !UCONFIG_NO_COLLATION
+ formatter->setLenient(TRUE);
+ static const char* lpTestData[][2] = {
+ { "fifty-7", "57" },
+ { " fifty-7", "57" },
+ { " fifty-7", "57" },
+ { "2 thousand six HUNDRED fifty-7", "2,657" },
+ { "fifteen hundred and zero", "1,500" },
+ { "FOurhundred thiRTY six", "436" },
+ { NULL, NULL}
+ };
+ doLenientParseTest(formatter, lpTestData);
+#endif
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestOrdinalAbbreviations()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_ORDINAL, Locale::getUS(), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "1", "1st" },
+ { "2", "2nd" },
+ { "3", "3rd" },
+ { "4", "4th" },
+ { "7", "7th" },
+ { "10", "10th" },
+ { "11", "11th" },
+ { "13", "13th" },
+ { "20", "20th" },
+ { "21", "21st" },
+ { "22", "22nd" },
+ { "23", "23rd" },
+ { "24", "24th" },
+ { "33", "33rd" },
+ { "102", "102nd" },
+ { "312", "312th" },
+ { "12,345", "12,345th" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, FALSE);
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestDurations()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_DURATION, Locale::getUS(), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "3,600", "1:00:00" }, //move me and I fail
+ { "0", "0 sec." },
+ { "1", "1 sec." },
+ { "24", "24 sec." },
+ { "60", "1:00" },
+ { "73", "1:13" },
+ { "145", "2:25" },
+ { "666", "11:06" },
+ // { "3,600", "1:00:00" },
+ { "3,740", "1:02:20" },
+ { "10,293", "2:51:33" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+
+#if !UCONFIG_NO_COLLATION
+ formatter->setLenient(TRUE);
+ static const char* lpTestData[][2] = {
+ { "2-51-33", "10,293" },
+ { NULL, NULL}
+ };
+ doLenientParseTest(formatter, lpTestData);
+#endif
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestSpanishSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("es", "ES", ""), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "1", "uno" },
+ { "6", "seis" },
+ { "16", "diecis\\u00e9is" },
+ { "20", "veinte" },
+ { "24", "veinticuatro" },
+ { "26", "veintis\\u00e9is" },
+ { "73", "setenta y tres" },
+ { "88", "ochenta y ocho" },
+ { "100", "cien" },
+ { "106", "ciento seis" },
+ { "127", "ciento veintisiete" },
+ { "200", "doscientos" },
+ { "579", "quinientos setenta y nueve" },
+ { "1,000", "mil" },
+ { "2,000", "dos mil" },
+ { "3,004", "tres mil cuatro" },
+ { "4,567", "cuatro mil quinientos sesenta y siete" },
+ { "15,943", "quince mil novecientos cuarenta y tres" },
+ { "2,345,678", "dos mill\\u00f3n trescientos cuarenta y cinco mil seiscientos setenta y ocho"},
+ { "-36", "menos treinta y seis" },
+ { "234.567", "doscientos treinta y cuatro punto cinco seis siete" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestFrenchSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getFrance(), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "1", "un" },
+ { "15", "quinze" },
+ { "20", "vingt" },
+ { "21", "vingt-et-un" },
+ { "23", "vingt-trois" },
+ { "62", "soixante-deux" },
+ { "70", "soixante-dix" },
+ { "71", "soixante et onze" },
+ { "73", "soixante-treize" },
+ { "80", "quatre-vingts" },
+ { "88", "quatre-vingt-huit" },
+ { "100", "cent" },
+ { "106", "cent six" },
+ { "127", "cent vingt-sept" },
+ { "200", "deux cents" },
+ { "579", "cinq cents soixante-dix-neuf" },
+ { "1,000", "mille" },
+ { "1,123", "onze cents vingt-trois" },
+ { "1,594", "mille cinq cents quatre-vingt-quatorze" },
+ { "2,000", "deux mille" },
+ { "3,004", "trois mille quatre" },
+ { "4,567", "quatre mille cinq cents soixante-sept" },
+ { "15,943", "quinze mille neuf cents quarante-trois" },
+ { "2,345,678", "deux million trois cents quarante-cinq mille six cents soixante-dix-huit" },
+ { "-36", "moins trente-six" },
+ { "234.567", "deux cents trente-quatre virgule cinq six sept" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+
+#if !UCONFIG_NO_COLLATION
+ formatter->setLenient(TRUE);
+ static const char* lpTestData[][2] = {
+ { "trente-un", "31" },
+ { "un cents quatre vingt dix huit", "198" },
+ { NULL, NULL}
+ };
+ doLenientParseTest(formatter, lpTestData);
+#endif
+ }
+ delete formatter;
+}
+
+static const char* const swissFrenchTestData[][2] = {
+ { "1", "un" },
+ { "15", "quinze" },
+ { "20", "vingt" },
+ { "21", "vingt-et-un" },
+ { "23", "vingt-trois" },
+ { "62", "soixante-deux" },
+ { "70", "septante" },
+ { "71", "septante-et-un" },
+ { "73", "septante-trois" },
+ { "80", "huitante" },
+ { "88", "huitante-huit" },
+ { "100", "cent" },
+ { "106", "cent six" },
+ { "127", "cent vingt-sept" },
+ { "200", "deux cents" },
+ { "579", "cinq cents septante-neuf" },
+ { "1,000", "mille" },
+ { "1,123", "onze cents vingt-trois" },
+ { "1,594", "mille cinq cents nonante-quatre" },
+ { "2,000", "deux mille" },
+ { "3,004", "trois mille quatre" },
+ { "4,567", "quatre mille cinq cents soixante-sept" },
+ { "15,943", "quinze mille neuf cents quarante-trois" },
+ { "2,345,678", "deux million trois cents quarante-cinq mille six cents septante-huit" },
+ { "-36", "moins trente-six" },
+ { "234.567", "deux cents trente-quatre virgule cinq six sept" },
+ { NULL, NULL}
+};
+
+void
+IntlTestRBNF::TestSwissFrenchSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("fr", "CH", ""), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ doTest(formatter, swissFrenchTestData, TRUE);
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestBelgianFrenchSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("fr", "BE", ""), status);
+
+ if (U_FAILURE(status)) {
+ errln("rbnf status: 0x%x (%s)\n", status, u_errorName(status));
+ errln("FAIL: could not construct formatter");
+ } else {
+ // Belgian french should match Swiss french.
+ doTest(formatter, swissFrenchTestData, TRUE);
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestItalianSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getItalian(), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "1", "uno" },
+ { "15", "quindici" },
+ { "20", "venti" },
+ { "23", "ventitr\\u00E9" },
+ { "73", "settantatr\\u00E9" },
+ { "88", "ottantotto" },
+ { "100", "cento" },
+ { "106", "centosei" },
+ { "108", "centotto" },
+ { "127", "centoventisette" },
+ { "181", "centottantuno" },
+ { "200", "duecento" },
+ { "579", "cinquecentosettantanove" },
+ { "1,000", "mille" },
+ { "2,000", "duemila" },
+ { "3,004", "tremilaquattro" },
+ { "4,567", "quattromilacinquecentosessantasette" },
+ { "15,943", "quindicimilanovecentoquarantatr\\u00E9" },
+ { "-36", "meno trentasei" },
+ { "234.567", "duecentotrentaquattro virgola cinque sei sette" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestPortugueseSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("pt","BR",""), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "1", "um" },
+ { "15", "quinze" },
+ { "20", "vinte" },
+ { "23", "vinte e tr\\u00EAs" },
+ { "73", "setenta e tr\\u00EAs" },
+ { "88", "oitenta e oito" },
+ { "100", "cem" },
+ { "106", "cento e seis" },
+ { "108", "cento e oito" },
+ { "127", "cento e vinte e sete" },
+ { "181", "cento e oitenta e um" },
+ { "200", "duzcentos" },
+ { "579", "quinhentos e setenta e nove" },
+ { "1,000", "mil" },
+ { "2,000", "dois mil" },
+ { "3,004", "tr\\u00EAs mil e quatro" },
+ { "4,567", "quatro mil quinhentos e sessenta e sete" },
+ { "15,943", "quinze mil novecentos e quarenta e tr\\u00EAs" },
+ { "-36", "menos trinta e seis" },
+ { "234.567", "duzcentos e trinta e quatro ponto cinco seis sete" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+ }
+ delete formatter;
+}
+void
+IntlTestRBNF::TestGermanSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getGermany(), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "1", "eins" },
+ { "15", "f\\u00fcnfzehn" },
+ { "20", "zwanzig" },
+ { "23", "dreiundzwanzig" },
+ { "73", "dreiundsiebzig" },
+ { "88", "achtundachtzig" },
+ { "100", "hundert" },
+ { "106", "hundertsechs" },
+ { "127", "hundertsiebenundzwanzig" },
+ { "200", "zweihundert" },
+ { "579", "f\\u00fcnfhundertneunundsiebzig" },
+ { "1,000", "tausend" },
+ { "2,000", "zweitausend" },
+ { "3,004", "dreitausendvier" },
+ { "4,567", "viertausendf\\u00fcnfhundertsiebenundsechzig" },
+ { "15,943", "f\\u00fcnfzehntausendneunhundertdreiundvierzig" },
+ { "2,345,678", "zwei Millionen dreihundertf\\u00fcnfundvierzigtausendsechshundertachtundsiebzig" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+
+#if !UCONFIG_NO_COLLATION
+ formatter->setLenient(TRUE);
+ static const char* lpTestData[][2] = {
+ { "ein Tausend sechs Hundert fuenfunddreissig", "1,635" },
+ { NULL, NULL}
+ };
+ doLenientParseTest(formatter, lpTestData);
+#endif
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestThaiSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("th"), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testData[][2] = {
+ { "0", "\\u0e28\\u0e39\\u0e19\\u0e22\\u0e4c" },
+ { "1", "\\u0e2b\\u0e19\\u0e36\\u0e48\\u0e07" },
+ { "10", "\\u0e2a\\u0e34\\u0e1a" },
+ { "11", "\\u0e2a\\u0e34\\u0e1a\\u0e40\\u0e2d\\u0e47\\u0e14" },
+ { "21", "\\u0e22\\u0e35\\u0e48\\u0e2a\\u0e34\\u0e1a\\u0e40\\u0e2d\\u0e47\\u0e14" },
+ { "101", "\\u0e2b\\u0e19\\u0e36\\u0e48\\u0e07\\u0e23\\u0e49\\u0e2d\\u0e22\\u0e2b\\u0e19\\u0e36\\u0e48\\u0e07" },
+ { "1.234", "\\u0e2b\\u0e19\\u0e36\\u0e48\\u0e07\\u0e08\\u0e38\\u0e14\\u0e2a\\u0e2d\\u0e07\\u0e2a\\u0e32\\u0e21\\u0e2a\\u0e35\\u0e48" },
+ { NULL, NULL}
+ };
+
+ doTest(formatter, testData, TRUE);
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestSwedishSpellout()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("sv"), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* testDataDefault[][2] = {
+ { "101", "etthundra\\u00aden" },
+ { "123", "etthundra\\u00adtjugotre" },
+ { "1,001", "ettusen en" },
+ { "1,100", "ettusen etthundra" },
+ { "1,101", "ettusen etthundra\\u00aden" },
+ { "1,234", "ettusen tv\\u00e5hundra\\u00adtrettiofyra" },
+ { "10,001", "tio\\u00adtusen en" },
+ { "11,000", "elva\\u00adtusen" },
+ { "12,000", "tolv\\u00adtusen" },
+ { "20,000", "tjugo\\u00adtusen" },
+ { "21,000", "tjugoen\\u00adtusen" },
+ { "21,001", "tjugoen\\u00adtusen en" },
+ { "200,000", "tv\\u00e5hundra\\u00adtusen" },
+ { "201,000", "tv\\u00e5hundra\\u00aden\\u00adtusen" },
+ { "200,200", "tv\\u00e5hundra\\u00adtusen tv\\u00e5hundra" },
+ { "2,002,000", "tv\\u00e5 miljoner tv\\u00e5\\u00adtusen" },
+ { "12,345,678", "tolv miljoner trehundra\\u00adfyrtiofem\\u00adtusen sexhundra\\u00adsjuttio\\u00e5tta" },
+ { "123,456.789", "etthundra\\u00adtjugotre\\u00adtusen fyrahundra\\u00adfemtiosex komma sju \\u00e5tta nio" },
+ { "-12,345.678", "minus tolv\\u00adtusen trehundra\\u00adfyrtiofem komma sex sju \\u00e5tta" },
+ { NULL, NULL }
+ };
+ doTest(formatter, testDataDefault, TRUE);
+
+ static const char* testDataNeutrum[][2] = {
+ { "101", "etthundra\\u00adett" },
+ { "1,001", "ettusen ett" },
+ { "1,101", "ettusen etthundra\\u00adett" },
+ { "10,001", "tio\\u00adtusen ett" },
+ { "21,001", "tjugoen\\u00adtusen ett" },
+ { NULL, NULL }
+ };
+
+ formatter->setDefaultRuleSet("%neutrum", status);
+ if (U_SUCCESS(status)) {
+ logln("testing neutrum rules");
+ doTest(formatter, testDataNeutrum, TRUE);
+ }
+ else {
+ errln("Can't test neutrum rules");
+ }
+
+ static const char* testDataYear[][2] = {
+ { "101", "etthundra\\u00adett" },
+ { "900", "niohundra" },
+ { "1,001", "tiohundra\\u00adett" },
+ { "1,100", "elvahundra" },
+ { "1,101", "elvahundra\\u00adett" },
+ { "1,234", "tolvhundra\\u00adtrettiofyra" },
+ { "2,001", "tjugohundra\\u00adett" },
+ { "10,001", "tio\\u00adtusen ett" },
+ { NULL, NULL }
+ };
+
+ formatter->setDefaultRuleSet("%year", status);
+ if (U_SUCCESS(status)) {
+ logln("testing year rules");
+ doTest(formatter, testDataYear, TRUE);
+ }
+ else {
+ errln("Can't test year rules");
+ }
+
+ }
+ delete formatter;
+}
+
+void
+IntlTestRBNF::TestSmallValues()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("en_US"), status);
+
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ static const char* const testDataDefault[][2] = {
+ { "0.001", "zero point zero zero one" },
+ { "0.0001", "zero point zero zero zero one" },
+ { "0.00001", "zero point zero zero zero zero one" },
+ { "0.000001", "zero point zero zero zero zero zero one" },
+ { "0.0000001", "zero point zero zero zero zero zero zero one" },
+ { "0.00000001", "zero point zero zero zero zero zero zero zero one" },
+ { "0.000000001", "zero point zero zero zero zero zero zero zero zero one" },
+ { "0.0000000001", "zero point zero zero zero zero zero zero zero zero zero one" },
+ { "0.00000000001", "zero point zero zero zero zero zero zero zero zero zero zero one" },
+ { "0.000000000001", "zero point zero zero zero zero zero zero zero zero zero zero zero one" },
+ { "0.0000000000001", "zero point zero zero zero zero zero zero zero zero zero zero zero zero one" },
+ { "0.00000000000001", "zero point zero zero zero zero zero zero zero zero zero zero zero zero zero one" },
+ { "0.000000000000001", "zero point zero zero zero zero zero zero zero zero zero zero zero zero zero zero one" },
+ { "10,000,000.001", "ten million point zero zero one" },
+ { "10,000,000.0001", "ten million point zero zero zero one" },
+ { "10,000,000.00001", "ten million point zero zero zero zero one" },
+ { "10,000,000.000001", "ten million point zero zero zero zero zero one" },
+ { "10,000,000.0000001", "ten million point zero zero zero zero zero zero one" },
+// { "10,000,000.00000001", "ten million point zero zero zero zero zero zero zero one" },
+// { "10,000,000.000000002", "ten million point zero zero zero zero zero zero zero zero two" },
+ { "10,000,000", "ten million" },
+// { "1,234,567,890.0987654", "one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety point zero nine eight seven six five four" },
+// { "123,456,789.9876543", "one hundred and twenty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine point nine eight seven six five four three" },
+// { "12,345,678.87654321", "twelve million, three hundred and forty-five thousand, six hundred and seventy-eight point eight seven six five four three two one" },
+ { "1,234,567.7654321", "one million, two hundred and thirty-four thousand, five hundred and sixty-seven point seven six five four three two one" },
+ { "123,456.654321", "one hundred and twenty-three thousand, four hundred and fifty-six point six five four three two one" },
+ { "12,345.54321", "twelve thousand three hundred and forty-five point five four three two one" },
+ { "1,234.4321", "one thousand two hundred and thirty-four point four three two one" },
+ { "123.321", "one hundred and twenty-three point three two one" },
+ { "0.0000000011754944", "zero point zero zero zero zero zero zero zero zero one one seven five four nine four four" },
+ { "0.000001175494351", "zero point zero zero zero zero zero one one seven five four nine four three five one" },
+ { NULL, NULL }
+ };
+
+ doTest(formatter, testDataDefault, TRUE);
+
+ delete formatter;
+ }
+}
+
+void
+IntlTestRBNF::TestLocalizations(void)
+{
+ int i;
+ UnicodeString rules("%main:0:no;1:some;100:a lot;1000:tons;\n"
+ "%other:0:nada;1:yah, some;100:plenty;1000:more'n you'll ever need");
+
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError perror;
+ RuleBasedNumberFormat formatter(rules, perror, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not construct formatter");
+ } else {
+ {
+ static const char* const testData[][2] = {
+ { "0", "nada" },
+ { "5", "yah, some" },
+ { "423", "plenty" },
+ { "12345", "more'n you'll ever need" },
+ { NULL, NULL }
+ };
+ doTest(&formatter, testData, FALSE);
+ }
+
+ {
+ UnicodeString loc("<<%main, %other>,<en, Main, Other>,<fr, leMain, leOther>,<de, 'das Main', 'etwas anderes'>>");
+ static const char* const testData[][2] = {
+ { "0", "no" },
+ { "5", "some" },
+ { "423", "a lot" },
+ { "12345", "tons" },
+ { NULL, NULL }
+ };
+ RuleBasedNumberFormat formatter0(rules, loc, perror, status);
+ if (U_FAILURE(status)) {
+ errln("failed to build second formatter");
+ } else {
+ doTest(&formatter0, testData, FALSE);
+
+ {
+ // exercise localization info
+ Locale locale0("en__VALLEY@turkey=gobblegobble");
+ Locale locale1("de_DE_FOO");
+ Locale locale2("ja_JP");
+ UnicodeString name = formatter0.getRuleSetName(0);
+ if ( formatter0.getRuleSetDisplayName(0, locale0) == "Main"
+ && formatter0.getRuleSetDisplayName(0, locale1) == "das Main"
+ && formatter0.getRuleSetDisplayName(0, locale2) == "%main"
+ && formatter0.getRuleSetDisplayName(name, locale0) == "Main"
+ && formatter0.getRuleSetDisplayName(name, locale1) == "das Main"
+ && formatter0.getRuleSetDisplayName(name, locale2) == "%main"){
+ logln("getRuleSetDisplayName tested");
+ }else {
+ errln("failed to getRuleSetDisplayName");
+ }
+ }
+
+ for (i = 0; i < formatter0.getNumberOfRuleSetDisplayNameLocales(); ++i) {
+ Locale locale = formatter0.getRuleSetDisplayNameLocale(i, status);
+ if (U_SUCCESS(status)) {
+ for (int j = 0; j < formatter0.getNumberOfRuleSetNames(); ++j) {
+ UnicodeString name = formatter0.getRuleSetName(j);
+ UnicodeString lname = formatter0.getRuleSetDisplayName(j, locale);
+ UnicodeString msg = locale.getName();
+ msg.append(": ");
+ msg.append(name);
+ msg.append(" = ");
+ msg.append(lname);
+ logln(msg);
+ }
+ }
+ }
+ }
+ }
+
+ {
+ static const char* goodLocs[] = {
+ "", // zero-length ok, same as providing no localization data
+ "<<>>", // no public rule sets ok
+ "<<%main>>", // no localizations ok
+ "<<%main,>,<en, Main,>>", // comma before close angle ok
+ "<<%main>,<en, ',<>\" '>>", // quotes everything until next quote
+ "<<%main>,<'en', \"it's ok\">>", // double quotes work too
+ " \n <\n <\n %main\n >\n , \t <\t en\t , \tfoo \t\t > \n\n > \n ", // rule whitespace ok
+ };
+ int32_t goodLocsLen = sizeof(goodLocs)/sizeof(goodLocs[0]);
+
+ static const char* badLocs[] = {
+ " ", // non-zero length
+ "<>", // empty array
+ "<", // unclosed outer array
+ "<<", // unclosed inner array
+ "<<,>>", // unexpected comma
+ "<<''>>", // empty string
+ " x<<%main>>", // first non space char not open angle bracket
+ "<%main>", // missing inner array
+ "<<%main %other>>", // elements missing separating commma (spaces must be quoted)
+ "<<%main><en, Main>>", // arrays missing separating comma
+ "<<%main>,<en, main, foo>>", // too many elements in locale data
+ "<<%main>,<en>>", // too few elements in locale data
+ "<<<%main>>>", // unexpected open angle
+ "<<%main<>>>", // unexpected open angle
+ "<<%main, %other>,<en,,>>", // implicit empty strings
+ "<<%main>,<en,''>>", // empty string
+ "<<%main>, < en, '>>", // unterminated quote
+ "<<%main>, < en, \"<>>", // unterminated quote
+ "<<%main\">>", // quote in string
+ "<<%main'>>", // quote in string
+ "<<%main<>>", // open angle in string
+ "<<%main>> x", // extra non-space text at end
+
+ };
+ int32_t badLocsLen = sizeof(badLocs)/sizeof(badLocs[0]);
+
+ for (i = 0; i < goodLocsLen; ++i) {
+ logln("[%d] '%s'", i, goodLocs[i]);
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString loc(goodLocs[i]);
+ RuleBasedNumberFormat fmt(rules, loc, perror, status);
+ if (U_FAILURE(status)) {
+ errln("Failed parse of good localization string: '%s'", goodLocs[i]);
+ }
+ }
+
+ for (i = 0; i < badLocsLen; ++i) {
+ logln("[%d] '%s'", i, badLocs[i]);
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString loc(badLocs[i]);
+ RuleBasedNumberFormat fmt(rules, loc, perror, status);
+ if (U_SUCCESS(status)) {
+ errln("Successful parse of bad localization string: '%s'", badLocs[i]);
+ }
+ }
+ }
+ }
+}
+
+void
+IntlTestRBNF::TestAllLocales()
+{
+ const char* names[] = {
+ " (spellout) ",
+ " (ordinal) ",
+ " (duration) "
+ };
+ int32_t count = 0;
+ const Locale* locales = Locale::getAvailableLocales(count);
+ for (int i = 0; i < count; ++i) {
+ const Locale* loc = &locales[i];
+ for (int j = 0; j < 3; ++j) {
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* f = new RuleBasedNumberFormat((URBNFRuleSetTag)j, *loc, status);
+ if (U_SUCCESS(status)) {
+ double n = 45.678;
+ UnicodeString str;
+ f->format(n, str);
+ delete f;
+
+ logln(UnicodeString(loc->getName()) + UnicodeString(names[j])
+ + UnicodeString("success: 45.678 -> ") + str);
+ } else {
+ errln(UnicodeString(loc->getName()) + UnicodeString(names[j])
+ + UnicodeString("ERROR could not instantiate -> ") + UnicodeString(u_errorName(status)));
+ }
+ }
+ }
+}
+
+void
+IntlTestRBNF::TestMultiplierSubstitution(void) {
+ UnicodeString rules("=#,##0=;1,000,000: <##0.###< million;");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parse_error;
+ RuleBasedNumberFormat *rbnf =
+ new RuleBasedNumberFormat(rules, Locale::getUS(), parse_error, status);
+ if (U_SUCCESS(status)) {
+ UnicodeString res;
+ FieldPosition pos;
+ double n = 1234000.0;
+ rbnf->format(n, res, pos);
+ delete rbnf;
+
+ UnicodeString expected = UNICODE_STRING_SIMPLE("1.234 million");
+ if (expected != res) {
+ UnicodeString msg = "Expected: ";
+ msg.append(expected);
+ msg.append(" but got ");
+ msg.append(res);
+ errln(msg);
+ }
+ }
+}
+
+void
+IntlTestRBNF::doTest(RuleBasedNumberFormat* formatter, const char* const testData[][2], UBool testParsing)
+{
+ // man, error reporting would be easier with printf-style syntax for unicode string and formattable
+
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols dfs("en", status);
+ // NumberFormat* decFmt = NumberFormat::createInstance(Locale::getUS(), status);
+ DecimalFormat decFmt("#,###.################", dfs, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not create NumberFormat");
+ } else {
+ for (int i = 0; testData[i][0]; ++i) {
+ const char* numString = testData[i][0];
+ const char* expectedWords = testData[i][1];
+
+ log("[%i] %s = ", i, numString);
+ Formattable expectedNumber;
+ decFmt.parse(numString, expectedNumber, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: decFmt could not parse %s", numString);
+ break;
+ } else {
+ UnicodeString actualString;
+ FieldPosition pos;
+ formatter->format(expectedNumber, actualString/* , pos*/, status);
+ if (U_FAILURE(status)) {
+ UnicodeString msg = "Fail: formatter could not format ";
+ decFmt.format(expectedNumber, msg, status);
+ errln(msg);
+ break;
+ } else {
+ UnicodeString expectedString = UnicodeString(expectedWords).unescape();
+ if (actualString != expectedString) {
+ UnicodeString msg = "FAIL: check failed for ";
+ decFmt.format(expectedNumber, msg, status);
+ msg.append(", expected ");
+ msg.append(expectedString);
+ msg.append(" but got ");
+ msg.append(actualString);
+ errln(msg);
+ break;
+ } else {
+ logln(actualString);
+ if (testParsing) {
+ Formattable parsedNumber;
+ formatter->parse(actualString, parsedNumber, status);
+ if (U_FAILURE(status)) {
+ UnicodeString msg = "FAIL: formatter could not parse ";
+ msg.append(actualString);
+ msg.append(" status code: " );
+ msg.append(u_errorName(status));
+ errln(msg);
+ break;
+ } else {
+ if (parsedNumber != expectedNumber) {
+ UnicodeString msg = "FAIL: parse failed for ";
+ msg.append(actualString);
+ msg.append(", expected ");
+ decFmt.format(expectedNumber, msg, status);
+ msg.append(", but got ");
+ decFmt.format(parsedNumber, msg, status);
+ errln(msg);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void
+IntlTestRBNF::doLenientParseTest(RuleBasedNumberFormat* formatter, const char* testData[][2])
+{
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat* decFmt = NumberFormat::createInstance(Locale::getUS(), status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: could not create NumberFormat");
+ } else {
+ for (int i = 0; testData[i][0]; ++i) {
+ const char* spelledNumber = testData[i][0]; // spelled-out number
+ const char* asciiUSNumber = testData[i][1]; // number as ascii digits formatted for US locale
+
+ UnicodeString spelledNumberString = UnicodeString(spelledNumber).unescape();
+ Formattable actualNumber;
+ formatter->parse(spelledNumberString, actualNumber, status);
+ if (U_FAILURE(status)) {
+ UnicodeString msg = "FAIL: formatter could not parse ";
+ msg.append(spelledNumberString);
+ errln(msg);
+ break;
+ } else {
+ // I changed the logic of this test somewhat from Java-- instead of comparing the
+ // strings, I compare the Formattables. Hmmm, but the Formattables don't compare,
+ // so change it back.
+
+ UnicodeString asciiUSNumberString = asciiUSNumber;
+ Formattable expectedNumber;
+ decFmt->parse(asciiUSNumberString, expectedNumber, status);
+ if (U_FAILURE(status)) {
+ UnicodeString msg = "FAIL: decFmt could not parse ";
+ msg.append(asciiUSNumberString);
+ errln(msg);
+ break;
+ } else {
+ UnicodeString actualNumberString;
+ UnicodeString expectedNumberString;
+ decFmt->format(actualNumber, actualNumberString, status);
+ decFmt->format(expectedNumber, expectedNumberString, status);
+ if (actualNumberString != expectedNumberString) {
+ UnicodeString msg = "FAIL: parsing";
+ msg.append(asciiUSNumberString);
+ msg.append("\n");
+ msg.append(" lenient parse failed for ");
+ msg.append(spelledNumberString);
+ msg.append(", expected ");
+ msg.append(expectedNumberString);
+ msg.append(", but got ");
+ msg.append(actualNumberString);
+ errln(msg);
+ break;
+ }
+ }
+ }
+ }
+ delete decFmt;
+ }
+}
+
+/* U_HAVE_RBNF */
+#else
+
+void
+IntlTestRBNF::TestRBNFDisabled() {
+ errln("*** RBNF currently disabled on this platform ***\n");
+}
+
+/* U_HAVE_RBNF */
+#endif
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.h b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.h
new file mode 100644
index 00000000000..939077b4752
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnf.h
@@ -0,0 +1,147 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 1996-2007, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ */
+
+#ifndef ITRBNF_H
+#define ITRBNF_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+#include "unicode/rbnf.h"
+
+
+class IntlTestRBNF : public IntlTest {
+ public:
+
+ // IntlTest override
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);
+
+#if U_HAVE_RBNF
+ /**
+ * Perform an API test
+ */
+ virtual void TestAPI();
+
+ /**
+ * Perform a simple spot check on the FractionalRuleSet logic
+ */
+ virtual void TestFractionalRuleSet();
+
+#if 0
+ /**
+ * Perform API tests on llong
+ */
+ virtual void TestLLong();
+ virtual void TestLLongConstructors();
+ virtual void TestLLongSimpleOperators();
+#endif
+
+ /**
+ * Perform a simple spot check on the English spellout rules
+ */
+ virtual void TestEnglishSpellout();
+
+ /**
+ * Perform a simple spot check on the English ordinal-abbreviation rules
+ */
+ virtual void TestOrdinalAbbreviations();
+
+ /**
+ * Perform a simple spot check on the duration-formatting rules
+ */
+ virtual void TestDurations();
+
+ /**
+ * Perform a simple spot check on the Spanish spellout rules
+ */
+ virtual void TestSpanishSpellout();
+
+ /**
+ * Perform a simple spot check on the French spellout rules
+ */
+ virtual void TestFrenchSpellout();
+
+ /**
+ * Perform a simple spot check on the Swiss French spellout rules
+ */
+ virtual void TestSwissFrenchSpellout();
+
+ /**
+ * Check that Belgian French matches Swiss French spellout rules
+ */
+ virtual void TestBelgianFrenchSpellout();
+
+ /**
+ * Perform a simple spot check on the Italian spellout rules
+ */
+ virtual void TestItalianSpellout();
+
+ /**
+ * Perform a simple spot check on the Portuguese spellout rules
+ */
+ virtual void TestPortugueseSpellout();
+
+ /**
+ * Perform a simple spot check on the German spellout rules
+ */
+ virtual void TestGermanSpellout();
+
+ /**
+ * Perform a simple spot check on the Thai spellout rules
+ */
+ virtual void TestThaiSpellout();
+
+ /**
+ * Perform a simple spot check on the Swedish spellout rules
+ */
+ virtual void TestSwedishSpellout();
+
+ /**
+ * Perform a simple spot check on small values
+ */
+ virtual void TestSmallValues();
+
+ /**
+ * Test localizations using string data.
+ */
+ virtual void TestLocalizations();
+
+ /**
+ * Test that all locales construct ok.
+ */
+ virtual void TestAllLocales();
+
+ /**
+ * Test that hebrew fractions format without trailing '<'
+ */
+ virtual void TestHebrewFraction();
+
+ /**
+ * Regression test, don't truncate
+ * when doing multiplier substitution to a number format rule.
+ */
+ virtual void TestMultiplierSubstitution();
+
+ protected:
+ virtual void doTest(RuleBasedNumberFormat* formatter, const char* const testData[][2], UBool testParsing);
+ virtual void doLenientParseTest(RuleBasedNumberFormat* formatter, const char* testData[][2]);
+
+/* U_HAVE_RBNF */
+#else
+
+ virtual void TestRBNFDisabled();
+
+/* U_HAVE_RBNF */
+#endif
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+// endif ITRBNF_H
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.cpp
new file mode 100644
index 00000000000..907647875cd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.cpp
@@ -0,0 +1,183 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 2004, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "itrbnfp.h"
+
+#include "unicode/umachine.h"
+
+#include "unicode/tblcoll.h"
+#include "unicode/coleitr.h"
+#include "unicode/ures.h"
+#include "unicode/ustring.h"
+#include "unicode/decimfmt.h"
+
+#include <string.h>
+
+// current macro not in icu1.8.1
+#define TESTCASE(id,test) \
+ case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ break
+
+void IntlTestRBNFParse::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/)
+{
+ if (exec) logln("TestSuite RuleBasedNumberFormatParse");
+ switch (index) {
+#if U_HAVE_RBNF
+ TESTCASE(0, TestParse);
+#else
+ TESTCASE(0, TestRBNFParseDisabled);
+#endif
+ default:
+ name = "";
+ break;
+ }
+}
+
+#if U_HAVE_RBNF
+
+void
+IntlTestRBNFParse::TestParse() {
+ // Try various rule parsing errors. Shouldn't crash.
+
+ logln("RBNF Parse test starting");
+
+ // these rules make no sense but behave rationally
+ const char* okrules[] = {
+ "",
+ "random text",
+ "%foo:bar",
+ "%foo: bar",
+ "0:",
+ "0::",
+ ";",
+ ";;",
+ "%%foo:;",
+ ":",
+ "::",
+ ":1",
+ ":;",
+ ":;:;",
+ "-",
+ "-1",
+ "-:",
+ ".",
+ ".1",
+ "[",
+ "]",
+ "[]",
+ "[foo]",
+ "[[]",
+ "[]]",
+ "[[]]",
+ "[][]",
+ "<",
+ "<<",
+ "<<<",
+ "10:;9:;",
+ ">",
+ ">>",
+ ">>>",
+ "=",
+ "==",
+ "===",
+ "=foo=",
+
+ NULL,
+ };
+
+ // these rules would throw exceptions when formatting, if we could throw exceptions
+ const char* exceptrules[] = {
+ "10:", // formatting any value with a one's digit will fail
+ "11: << x", // formating a multiple of 10 causes rollback rule to fail
+ "%%foo: 0 foo; 10: =%%bar=; %%bar: 0: bar; 10: =%%foo=;",
+
+ NULL,
+ };
+
+ // none of these rules should crash the formatter
+ const char** allrules[] = {
+ okrules,
+ exceptrules,
+ NULL,
+ };
+
+ for (int j = 0; allrules[j]; ++j) {
+ const char** rules = allrules[j];
+ for (int i = 0; rules[i]; ++i) {
+ const char* rule = rules[i];
+ logln("rule[%d] \"%s\"", i, rule);
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError perr;
+ RuleBasedNumberFormat* formatter = new RuleBasedNumberFormat(rule, Locale::getUS(), perr, status);
+
+ if (U_SUCCESS(status)) {
+ // format some values
+
+ testfmt(formatter, 20, status);
+ testfmt(formatter, 1.23, status);
+ testfmt(formatter, -123, status);
+ testfmt(formatter, .123, status);
+ testfmt(formatter, 123, status);
+
+ } else if (status == U_PARSE_ERROR) {
+ logln("perror line: %x offset: %x context: %s|%s", perr.line, perr.offset, perr.preContext, perr.postContext);
+ }
+
+ delete formatter;
+ }
+ }
+}
+
+void
+IntlTestRBNFParse::testfmt(RuleBasedNumberFormat* formatter, double val, UErrorCode& status) {
+ UnicodeString us;
+ formatter->format((const Formattable)val, us, status);
+ if (U_SUCCESS(status)) {
+ us.insert(0, (UChar)'"');
+ us.append((UChar)'"');
+ logln(us);
+ } else {
+ logln("error: could not format %g, returned status: %d", val, status);
+ }
+}
+
+void
+IntlTestRBNFParse::testfmt(RuleBasedNumberFormat* formatter, int val, UErrorCode& status) {
+ UnicodeString us;
+ formatter->format((const Formattable)(int32_t)val, us, status);
+ if (U_SUCCESS(status)) {
+ us.insert(0, (UChar)'"');
+ us.append((UChar)'"');
+ logln(us);
+ } else {
+ logln("error: could not format %d, returned status: %d", val, status);
+ }
+}
+
+
+/* U_HAVE_RBNF */
+#else
+
+void
+IntlTestRBNF::TestRBNFParseDisabled() {
+ errln("*** RBNF currently disabled on this platform ***\n");
+}
+
+/* U_HAVE_RBNF */
+#endif
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.h b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.h
new file mode 100644
index 00000000000..c767ff195f8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfp.h
@@ -0,0 +1,48 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 2004, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ */
+
+#ifndef ITRBNFP_H
+#define ITRBNFP_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+#include "unicode/rbnf.h"
+
+
+class IntlTestRBNFParse : public IntlTest {
+ public:
+
+ // IntlTest override
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);
+
+#if U_HAVE_RBNF
+ /**
+ * Perform an API test
+ */
+ virtual void TestParse();
+
+ void testfmt(RuleBasedNumberFormat* formatter, double val, UErrorCode& status);
+ void testfmt(RuleBasedNumberFormat* formatter, int val, UErrorCode& status);
+
+ protected:
+
+/* U_HAVE_RBNF */
+#else
+
+ virtual void TestRBNFParseDisabled();
+
+/* U_HAVE_RBNF */
+#endif
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+// endif ITRBNFP_H
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.cpp
new file mode 100644
index 00000000000..515b351d945
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.cpp
@@ -0,0 +1,364 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 1996-2006, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "itrbnfrt.h"
+
+#include "unicode/fmtable.h"
+#include <math.h> // fabs
+#include <stdio.h>
+
+// current macro not in icu1.8.1
+#define TESTCASE(id,test) \
+ case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ break
+
+void RbnfRoundTripTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/)
+{
+ if (exec) logln("TestSuite RuleBasedNumberFormatRT");
+ switch (index) {
+#if U_HAVE_RBNF
+ TESTCASE(0, TestEnglishSpelloutRT);
+ TESTCASE(1, TestDurationsRT);
+ TESTCASE(2, TestSpanishSpelloutRT);
+ TESTCASE(3, TestFrenchSpelloutRT);
+ TESTCASE(4, TestSwissFrenchSpelloutRT);
+ TESTCASE(5, TestItalianSpelloutRT);
+ TESTCASE(6, TestGermanSpelloutRT);
+ TESTCASE(7, TestSwedishSpelloutRT);
+ TESTCASE(8, TestDutchSpelloutRT);
+ TESTCASE(9, TestJapaneseSpelloutRT);
+ TESTCASE(10, TestRussianSpelloutRT);
+ TESTCASE(11, TestPortugueseSpelloutRT);
+#else
+ TESTCASE(0, TestRBNFDisabled);
+#endif
+ default:
+ name = "";
+ break;
+ }
+}
+
+#if U_HAVE_RBNF
+
+/**
+ * Perform an exhaustive round-trip test on the English spellout rules
+ */
+void
+RbnfRoundTripTest::TestEnglishSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getUS(), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, -12345678, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the duration-formatting rules
+ */
+void
+RbnfRoundTripTest::TestDurationsRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_DURATION, Locale::getUS(), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, 0, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Spanish spellout rules
+ */
+void
+RbnfRoundTripTest::TestSpanishSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("es", "es"), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, -12345678, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the French spellout rules
+ */
+void
+RbnfRoundTripTest::TestFrenchSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getFrance(), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, -12345678, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Swiss French spellout rules
+ */
+void
+RbnfRoundTripTest::TestSwissFrenchSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("fr", "CH"), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, -12345678, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Italian spellout rules
+ */
+void
+RbnfRoundTripTest::TestItalianSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getItalian(), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, -999999, 999999);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the German spellout rules
+ */
+void
+RbnfRoundTripTest::TestGermanSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getGermany(), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, 0, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Swedish spellout rules
+ */
+void
+RbnfRoundTripTest::TestSwedishSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("sv", "SE"), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, 0, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Dutch spellout rules
+ */
+void
+RbnfRoundTripTest::TestDutchSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("nl", "NL"), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, -12345678, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Japanese spellout rules
+ */
+void
+RbnfRoundTripTest::TestJapaneseSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale::getJapan(), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, 0, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Russian spellout rules
+ */
+void
+RbnfRoundTripTest::TestRussianSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("ru", "RU"), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, 0, 12345678);
+ }
+ delete formatter;
+}
+
+/**
+ * Perform an exhaustive round-trip test on the Portuguese spellout rules
+ */
+void
+RbnfRoundTripTest::TestPortugueseSpelloutRT()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedNumberFormat* formatter
+ = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("pt", "BR"), status);
+
+ if (U_FAILURE(status)) {
+ errln("failed to construct formatter");
+ } else {
+ doTest(formatter, -12345678, 12345678);
+ }
+ delete formatter;
+}
+
+void
+RbnfRoundTripTest::doTest(const RuleBasedNumberFormat* formatter,
+ double lowLimit,
+ double highLimit)
+{
+ char buf[128];
+
+ uint32_t count = 0;
+ double increment = 1;
+ for (double i = lowLimit; i <= highLimit; i += increment) {
+ if (count % 1000 == 0) {
+ sprintf(buf, "%.12g", i);
+ logln(buf);
+ }
+
+ if (fabs(i) < 5000)
+ increment = 1;
+ else if (fabs(i) < 500000)
+ increment = 2737;
+ else
+ increment = 267437;
+
+ UnicodeString formatResult;
+ formatter->format(i, formatResult);
+ UErrorCode status = U_ZERO_ERROR;
+ Formattable parseResult;
+ formatter->parse(formatResult, parseResult, status);
+ if (U_FAILURE(status)) {
+ sprintf(buf, "Round-trip status failure: %.12g, status: %d", i, status);
+ errln(buf);
+ return;
+ } else {
+ double rt = (parseResult.getType() == Formattable::kDouble) ?
+ parseResult.getDouble() :
+ (double)parseResult.getLong();
+
+ if (rt != i) {
+ sprintf(buf, "Round-trip failed: %.12g -> %.12g", i, rt);
+ errln(buf);
+ return;
+ }
+ }
+
+ ++count;
+ }
+
+ if (lowLimit < 0) {
+ double d = 1.234;
+ while (d < 1000) {
+ UnicodeString formatResult;
+ formatter->format(d, formatResult);
+ UErrorCode status = U_ZERO_ERROR;
+ Formattable parseResult;
+ formatter->parse(formatResult, parseResult, status);
+ if (U_FAILURE(status)) {
+ sprintf(buf, "Round-trip status failure: %.12g, status: %d", d, status);
+ errln(buf);
+ return;
+ } else {
+ double rt = (parseResult.getType() == Formattable::kDouble) ?
+ parseResult.getDouble() :
+ (double)parseResult.getLong();
+
+ if (rt != d) {
+ UnicodeString msg;
+ sprintf(buf, "Round-trip failed: %.12g -> ", d);
+ msg.append(buf);
+ msg.append(formatResult);
+ sprintf(buf, " -> %.12g", rt);
+ msg.append(buf);
+ errln(msg);
+ return;
+ }
+ }
+
+ d *= 10;
+ }
+ }
+}
+
+/* U_HAVE_RBNF */
+#else
+
+void
+RbnfRoundTripTest::TestRBNFDisabled() {
+ errln("*** RBNF currently disabled on this platform ***\n");
+}
+
+/* U_HAVE_RBNF */
+#endif
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.h b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.h
new file mode 100644
index 00000000000..70bf23f6f5f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itrbnfrt.h
@@ -0,0 +1,99 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 1996-2006, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ */
+
+#ifndef ITRBNFRT_H
+#define ITRBNFRT_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+#include "unicode/rbnf.h"
+
+class RbnfRoundTripTest : public IntlTest {
+
+ // IntlTest override
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);
+
+#if U_HAVE_RBNF
+ /**
+ * Perform an exhaustive round-trip test on the English spellout rules
+ */
+ virtual void TestEnglishSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the duration-formatting rules
+ */
+ virtual void TestDurationsRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Spanish spellout rules
+ */
+ virtual void TestSpanishSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the French spellout rules
+ */
+ virtual void TestFrenchSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Swiss French spellout rules
+ */
+ virtual void TestSwissFrenchSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Italian spellout rules
+ */
+ virtual void TestItalianSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the German spellout rules
+ */
+ virtual void TestGermanSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Swedish spellout rules
+ */
+ virtual void TestSwedishSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Dutch spellout rules
+ */
+ virtual void TestDutchSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Japanese spellout rules
+ */
+ virtual void TestJapaneseSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Russian spellout rules
+ */
+ virtual void TestRussianSpelloutRT();
+
+ /**
+ * Perform an exhaustive round-trip test on the Portuguese spellout rules
+ */
+ virtual void TestPortugueseSpelloutRT();
+
+ protected:
+ void doTest(const RuleBasedNumberFormat* formatter, double lowLimit, double highLimit);
+
+ /* U_HAVE_RBNF */
+#else
+
+ void TestRBNFDisabled();
+
+ /* U_HAVE_RBNF */
+#endif
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+// endif ITRBNFRT_H
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ittrans.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/ittrans.cpp
new file mode 100644
index 00000000000..467ced423a1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ittrans.cpp
@@ -0,0 +1,56 @@
+/***************************************************************************
+*
+* Copyright (C) 2000-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+************************************************************************
+* Date Name Description
+* 01/03/2000 Madhu Creation.
+* 03/2000 Madhu Added additional tests
+***********************************************************************/
+/**
+ * IntlTestTransliterator is the medium level test class for Transliterator
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "ittrans.h"
+#include "transtst.h"
+#include "transapi.h"
+#include "cpdtrtst.h"
+#include "transrt.h"
+#include "jamotest.h"
+#include "trnserr.h"
+#include "reptest.h"
+
+#define CASE(id,test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); logln(); \
+ test t; \
+ callTest(t, par); \
+ } \
+ break
+
+void IntlTestTransliterator::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ if (exec) logln("TestSuite Transliterator");
+ switch (index) {
+ CASE(0, TransliteratorTest);
+ CASE(1, TransliteratorAPITest);
+ CASE(2, CompoundTransliteratorTest);
+ CASE(3, TransliteratorRoundTripTest);
+ CASE(4, JamoTest);
+ CASE(5, TransliteratorErrorTest);
+ CASE(6, ReplaceableTest);
+#if !UCONFIG_NO_TRANSLITERATION && defined(U_USE_UNICODE_FILTER_LOGIC_OBSOLETE_2_8)
+ CASE(7, UnicodeFilterLogicTest);
+#endif
+
+ default: name=""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ittrans.h b/Build/source/libs/icu/icu-xetex/test/intltest/ittrans.h
new file mode 100644
index 00000000000..4f4fb38dbb7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ittrans.h
@@ -0,0 +1,31 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* Date Name Description
+* 12/14/99 Madhu Creation.
+************************************************************************/
+/**
+ * IntlTestRBBI is the top level test class for the RuleBasedBreakIterator tests
+ */
+
+#ifndef INTLTRANSLIT_H
+#define INTLTRANSLIT_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "intltest.h"
+
+
+class IntlTestTransliterator: public IntlTest {
+public:
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itutil.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/itutil.cpp
new file mode 100644
index 00000000000..218c1c83049
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itutil.cpp
@@ -0,0 +1,66 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+/**
+ * IntlTestUtilities is the medium level test class for everything in the directory "utility".
+ */
+
+#include "unicode/utypes.h"
+#include "itutil.h"
+#include "strtest.h"
+#include "loctest.h"
+#include "citrtest.h"
+#include "ustrtest.h"
+#include "ucdtest.h"
+#include "restest.h"
+#include "restsnew.h"
+#include "tsmthred.h"
+#include "tsputil.h"
+#include "uobjtest.h"
+#include "utxttest.h"
+#include "v32test.h"
+#include "uvectest.h"
+#include "aliastst.h"
+#include "usettest.h"
+//#include "custrtest.h"
+//#include "ccitrtst.h"
+//#include "cloctest.h"
+//#include "ctres.h"
+//#include "ctucd.h"
+
+#define CASE(id, test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); logln(); \
+ test t; \
+ callTest(t, par); \
+ } \
+ break
+
+void IntlTestUtilities::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ if (exec) logln("TestSuite Utilities: ");
+ switch (index) {
+ CASE(0, MultithreadTest);
+ CASE(1, StringTest);
+ CASE(2, UnicodeStringTest);
+ CASE(3, LocaleTest);
+ CASE(4, CharIterTest);
+ CASE(5, UnicodeTest);
+ CASE(6, ResourceBundleTest);
+ CASE(7, NewResourceBundleTest);
+ CASE(8, PUtilTest);
+ CASE(9, UObjectTest);
+ CASE(10, UVector32Test);
+ CASE(11, UVectorTest);
+ CASE(12, UTextTest);
+ CASE(13, MultithreadTest);
+ CASE(14, UnicodeSetTest);
+ default: name = ""; break; //needed to end loop
+ }
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/itutil.h b/Build/source/libs/icu/icu-xetex/test/intltest/itutil.h
new file mode 100644
index 00000000000..e2dd8e10e3c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/itutil.h
@@ -0,0 +1,24 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * MajorTestLevel is the top level test class for everything in the directory "IntlWork".
+ */
+
+#ifndef _INTLTESTUTILITIES
+#define _INTLTESTUTILITIES
+
+
+#include "intltest.h"
+
+
+class IntlTestUtilities: public IntlTest {
+public:
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/jacoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/jacoll.cpp
new file mode 100644
index 00000000000..8c8c3d67d58
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/jacoll.cpp
@@ -0,0 +1,199 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "jacoll.h"
+
+#include "sfwdchit.h"
+
+CollationKanaTest::CollationKanaTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance(Locale::getJapan(), status);
+ if(!myCollation || U_FAILURE(status)) {
+ errln(__FILE__ "failed to create! err " + UnicodeString(u_errorName(status)));
+ /* if it wasn't already: */
+ delete myCollation;
+ myCollation = NULL;
+ return;
+ }
+}
+
+CollationKanaTest::~CollationKanaTest()
+{
+ delete myCollation;
+}
+
+const UChar CollationKanaTest::testSourceCases[][CollationKanaTest::MAX_TOKEN_LEN] = {
+ {0xff9E, 0x0000},
+ {0x3042, 0x0000},
+ {0x30A2, 0x0000},
+ {0x3042, 0x3042, 0x0000},
+ {0x30A2, 0x30FC, 0x0000},
+ {0x30A2, 0x30FC, 0x30C8, 0x0000} /* 6 */
+};
+
+const UChar CollationKanaTest::testTargetCases[][CollationKanaTest::MAX_TOKEN_LEN] = {
+ {0xFF9F, 0x0000},
+ {0x30A2, 0x0000},
+ {0x3042, 0x3042, 0x0000},
+ {0x30A2, 0x30FC, 0x0000},
+ {0x30A2, 0x30FC, 0x30C8, 0x0000},
+ {0x3042, 0x3042, 0x3068, 0x0000} /* 6 */
+};
+
+const Collator::EComparisonResult CollationKanaTest::results[] = {
+ Collator::LESS,
+ Collator::EQUAL, //Collator::LESS, /* Katakanas and Hiraganas are equal on tertiary level(ICU 2.0)*/
+ Collator::LESS,
+ Collator::GREATER, // Collator::LESS, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/
+ Collator::LESS,
+ Collator::LESS, //Collator::GREATER /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*//* 6 */
+};
+
+const UChar CollationKanaTest::testBaseCases[][CollationKanaTest::MAX_TOKEN_LEN] = {
+ {0x30AB, 0x0000},
+ {0x30AB, 0x30AD, 0x0000},
+ {0x30AD, 0x0000},
+ {0x30AD, 0x30AD, 0x0000}
+};
+
+const UChar CollationKanaTest::testPlainDakutenHandakutenCases[][CollationKanaTest::MAX_TOKEN_LEN] = {
+ {0x30CF, 0x30AB, 0x0000},
+ {0x30D0, 0x30AB, 0x0000},
+ {0x30CF, 0x30AD, 0x0000},
+ {0x30D0, 0x30AD, 0x0000}
+};
+
+const UChar CollationKanaTest::testSmallLargeCases[][CollationKanaTest::MAX_TOKEN_LEN] = {
+ {0x30C3, 0x30CF, 0x0000},
+ {0x30C4, 0x30CF, 0x0000},
+ {0x30C3, 0x30D0, 0x0000},
+ {0x30C4, 0x30D0, 0x0000}
+};
+
+const UChar CollationKanaTest::testKatakanaHiraganaCases[][CollationKanaTest::MAX_TOKEN_LEN] = {
+ {0x3042, 0x30C3, 0x0000},
+ {0x30A2, 0x30C3, 0x0000},
+ {0x3042, 0x30C4, 0x0000},
+ {0x30A2, 0x30C4, 0x0000}
+};
+
+const UChar CollationKanaTest::testChooonKigooCases[][CollationKanaTest::MAX_TOKEN_LEN] = {
+ /*0*/ {0x30AB, 0x30FC, 0x3042, 0x0000},
+ /*1*/ {0x30AB, 0x30FC, 0x30A2, 0x0000},
+ /*2*/ {0x30AB, 0x30A4, 0x3042, 0x0000},
+ /*3*/ {0x30AB, 0x30A4, 0x30A2, 0x0000},
+ /*6*/ {0x30AD, 0x30FC, 0x3042, 0x0000}, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/
+ /*7*/ {0x30AD, 0x30FC, 0x30A2, 0x0000}, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/
+ /*4*/ {0x30AD, 0x30A4, 0x3042, 0x0000},
+ /*5*/ {0x30AD, 0x30A4, 0x30A2, 0x0000},
+};
+
+void CollationKanaTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation->setStrength(Collator::TERTIARY);
+ /* for one case, strcollinc fails, since it doesn't have good handling of contractions*/
+ /* normalization is turned off to stop strcollinc from executing */
+ myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status);
+ for (i = 0; i < 6; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+/* Testing base letters */
+void CollationKanaTest::TestBase()
+{
+ int32_t i;
+ myCollation->setStrength(Collator::PRIMARY);
+ for (i = 0; i < 3 ; i++)
+ doTest(myCollation, testBaseCases[i], testBaseCases[i + 1], Collator::LESS);
+}
+
+/* Testing plain, Daku-ten, Handaku-ten letters */
+void CollationKanaTest::TestPlainDakutenHandakuten(void)
+{
+ int32_t i;
+ myCollation->setStrength(Collator::SECONDARY);
+ for (i = 0; i < 3 ; i++)
+ doTest(myCollation, testPlainDakutenHandakutenCases[i], testPlainDakutenHandakutenCases[i + 1],
+ Collator::LESS);
+}
+
+/*
+* Test Small, Large letters
+*/
+void CollationKanaTest::TestSmallLarge(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation->setStrength(Collator::TERTIARY);
+ myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status);
+ for (i = 0; i < 3 ; i++)
+ doTest(myCollation, testSmallLargeCases[i], testSmallLargeCases[i + 1], Collator::LESS);
+}
+
+/*
+* Test Katakana, Hiragana letters
+*/
+void CollationKanaTest::TestKatakanaHiragana(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation->setStrength(Collator::QUATERNARY);
+ myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status);
+ for (i = 0; i < 3 ; i++) {
+ doTest(myCollation, testKatakanaHiraganaCases[i], testKatakanaHiraganaCases[i + 1],
+ Collator::LESS);
+ }
+}
+
+/*
+* Test Choo-on kigoo
+*/
+void CollationKanaTest::TestChooonKigoo(void)
+{
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation->setStrength(Collator::QUATERNARY);
+ myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status);
+ for (i = 0; i < 7 ; i++) {
+ doTest(myCollation, testChooonKigooCases[i], testChooonKigooCases[i + 1], Collator::LESS);
+ }
+}
+
+
+void CollationKanaTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationKanaTest: ");
+ if(myCollation) {
+ switch (index) {
+ case 0: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ case 1: name = "TestBase"; if (exec) TestBase(/* par */); break;
+ case 2: name = "TestSmallLarge"; if (exec) TestSmallLarge(/* par */); break;
+ case 3: name = "TestTestPlainDakutenHandakuten"; if (exec) TestPlainDakutenHandakuten(/* par */); break;
+ case 4: name = "TestKatakanaHiragana"; if (exec) TestKatakanaHiragana(/* par */); break;
+ case 5: name = "TestChooonKigoo"; if (exec) TestChooonKigoo(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ errln("Collator couldn't be instantiated!");
+ name = "";
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/jacoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/jacoll.h
new file mode 100644
index 00000000000..96a6ae1fd7e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/jacoll.h
@@ -0,0 +1,65 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationKanaTest is a third level test class. This tests the locale
+ * specific tertiary rules. For example, the term 'A-' (/u3041/u30fc) is
+ * equivalent to 'AA' (/u3041/u3041).
+ */
+
+#ifndef _JACOLL
+#define _JACOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationKanaTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationKanaTest();
+ virtual ~CollationKanaTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // performs test with strength TERIARY
+ void TestTertiary(/* char* par */);
+
+ /* Testing base letters */
+ void TestBase();
+
+ /* Testing plain, Daku-ten, Handaku-ten letters */
+ void TestPlainDakutenHandakuten();
+
+ /* Test Small, Large letters */
+ void TestSmallLarge();
+
+ /* Test Katakana, Hiragana letters */
+ void TestKatakanaHiragana();
+
+ /* Test Choo-on kigoo */
+ void TestChooonKigoo();
+
+private:
+ static const UChar testSourceCases[][MAX_TOKEN_LEN];
+ static const UChar testTargetCases[][MAX_TOKEN_LEN];
+ static const Collator::EComparisonResult results[];
+ static const UChar testBaseCases[][MAX_TOKEN_LEN];
+ static const UChar testPlainDakutenHandakutenCases[][MAX_TOKEN_LEN];
+ static const UChar testSmallLargeCases[][MAX_TOKEN_LEN];
+ static const UChar testKatakanaHiraganaCases[][MAX_TOKEN_LEN];
+ static const UChar testChooonKigooCases[][MAX_TOKEN_LEN];
+
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/jamotest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/jamotest.cpp
new file mode 100644
index 00000000000..635794101d3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/jamotest.cpp
@@ -0,0 +1,553 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************
+************************************************************************
+* Date Name Description
+* 02/28/2001 aliu Creation
+* 03/01/2001 George port to HP/UX
+************************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "jamotest.h"
+#include "unicode/utypes.h"
+#include "unicode/translit.h"
+#include "cpdtrans.h"
+
+// SEP is the disambiguation separator used by Latin-Jamo and Jamo-Latin
+#define SEP "-"
+
+JamoTest::JamoTest()
+{
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ NAME_JAMO = Transliterator::createFromRules("Name-Jamo",
+ JAMO_NAMES_RULES,
+ UTRANS_FORWARD, parseError, status);
+
+ if (U_FAILURE(status)) {
+ delete NAME_JAMO;
+ NAME_JAMO = NULL;
+ }
+ status = U_ZERO_ERROR;
+ JAMO_NAME = Transliterator::createFromRules("Jamo-Name",
+ JAMO_NAMES_RULES,
+ UTRANS_REVERSE, parseError, status);
+ if (U_FAILURE(status)) {
+ delete JAMO_NAME;
+ JAMO_NAME = NULL;
+ }
+}
+
+JamoTest::~JamoTest()
+{
+ delete NAME_JAMO;
+ delete JAMO_NAME;
+}
+
+void
+JamoTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,TestJamo);
+ TESTCASE(1,TestRealText);
+ TESTCASE(2,TestPiecemeal);
+ default: name = ""; break;
+ }
+}
+
+void
+JamoTest::TestJamo() {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* latinJamo = Transliterator::createInstance("Latin-Jamo", UTRANS_FORWARD, parseError, status);
+
+ if (latinJamo == 0 || U_FAILURE(status)) {
+ errln("FAIL: createInstance() returned 0");
+ return;
+ }
+
+ Transliterator* jamoLatin = latinJamo->createInverse(status);
+
+ if (jamoLatin == 0) {
+ delete latinJamo;
+ errln("FAIL: createInverse() returned 0");
+ return;
+ }
+
+ static const char* CASE[] = {
+ // Column 1 is the latin text L1 to be fed to Latin-Jamo
+ // to yield output J.
+
+ // Column 2 is expected value of J. J is fed to
+ // Jamo-Latin to yield output L2.
+
+ // Column 3 is expected value of L2. If the expected
+ // value of L2 is L1, then L2 is NULL.
+
+ // add tests for the update to fix problems where it didn't follow the standard
+ // see also http://www.unicode.org/cldr/data/charts/transforms/Latin-Hangul.html
+ "gach", "(Gi)(A)(Cf)", NULL,
+ "geumhui", "(Gi)(EU)(Mf)(Hi)(YI)", NULL,
+ "choe", "(Ci)(OE)", NULL,
+ "wo", "(IEUNG)(WEO)", NULL,
+ "Wonpil", "(IEUNG)(WEO)(Nf)(Pi)(I)(L)", "wonpil",
+ "GIPPEUM", "(Gi)(I)(BB)(EU)(Mf)", "gippeum",
+ "EUTTEUM", "(IEUNG)(EU)(DD)(EU)(Mf)", "eutteum",
+ "KKOTNAE", "(GGi)(O)(Tf)(Ni)(AE)", "kkotnae",
+ "gaga", "(Gi)(A)(Gi)(A)", NULL,
+ "gag-a", "(Gi)(A)(Gf)(IEUNG)(A)", NULL,
+ "gak-ka", "(Gi)(A)(Kf)(Ki)(A)", NULL,
+ "gakka", "(Gi)(A)(GGi)(A)", NULL,
+ "gakk-a", "(Gi)(A)(GGf)(IEUNG)(A)", NULL,
+ "gakkka", "(Gi)(A)(GGf)(Ki)(A)", NULL,
+ "gak-kka", "(Gi)(A)(Kf)(GGi)(A)", NULL,
+
+ "bab", "(Bi)(A)(Bf)", NULL,
+ "babb", "(Bi)(A)(Bf)(Bi)(EU)", "babbeu",
+ "babbba", "(Bi)(A)(Bf)(Bi)(EU)(Bi)(A)", "babbeuba",
+ "bagg", "(Bi)(A)(Gf)(Gi)(EU)", "baggeu",
+ "baggga", "(Bi)(A)(Gf)(Gi)(EU)(Gi)(A)", "baggeuga",
+ //"bag" SEP "gga", "(Bi)(A)(Gf)" SEP "(Gi)(EU)(Gi)(A)", "bag" SEP "geuga",
+ "kabsa", "(Ki)(A)(Bf)(Si)(A)", NULL,
+ "kabska", "(Ki)(A)(BS)(Ki)(A)", NULL,
+ "gabsbka", "(Gi)(A)(BS)(Bi)(EU)(Ki)(A)", "gabsbeuka", // not (Kf)
+ "gga", "(Gi)(EU)(Gi)(A)", "geuga",
+ "bsa", "(Bi)(EU)(Si)(A)", "beusa",
+ "agg", "(IEUNG)(A)(Gf)(Gi)(EU)", "aggeu",
+ "agga", "(IEUNG)(A)(Gf)(Gi)(A)", NULL,
+ "la", "(R)(A)", NULL,
+ "bs", "(Bi)(EU)(Sf)", "beus",
+ "kalgga", "(Ki)(A)(L)(Gi)(EU)(Gi)(A)", "kalgeuga",
+
+ // 'r' in a final position is treated like 'l'
+ "karka", "(Ki)(A)(L)(Ki)(A)", "kalka",
+ };
+
+ enum { CASE_length = sizeof(CASE) / sizeof(CASE[0]) };
+
+ int32_t i;
+ for (i=0; i<CASE_length; i+=3) {
+ UnicodeString jamo = nameToJamo(CASE[i+1]);
+ if (CASE[i+2] == NULL) {
+ expect(*latinJamo, CASE[i], jamo, *jamoLatin);
+ } else {
+ // Handle case where round-trip is expected to fail
+ expect(*latinJamo, CASE[i], jamo);
+ expect(*jamoLatin, jamo, CASE[i+2]);
+ }
+ }
+
+ delete latinJamo;
+ delete jamoLatin;
+}
+
+/**
+ * Test various step-at-a-time transformation of hangul to jamo to
+ * latin and back.
+ */
+void JamoTest::TestPiecemeal(void) {
+ UnicodeString hangul; hangul.append((UChar)0xBC0F);
+ UnicodeString jamo = nameToJamo("(Mi)(I)(Cf)");
+ UnicodeString latin("mic");
+ UnicodeString latin2("mich");
+
+ Transliterator *t = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+
+ t = Transliterator::createInstance("NFD", UTRANS_FORWARD, status); // was Hangul-Jamo
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, hangul, jamo);
+ delete t;
+
+ t = Transliterator::createInstance("NFC", UTRANS_FORWARD, status); // was Jamo-Hangul
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, jamo, hangul);
+ delete t;
+
+ t = Transliterator::createInstance("Latin-Jamo", UTRANS_FORWARD, status);
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, latin, jamo);
+ delete t;
+
+ t = Transliterator::createInstance("Jamo-Latin", UTRANS_FORWARD, status);
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, jamo, latin2);
+ delete t;
+
+ t = Transliterator::createInstance("Hangul-Latin", UTRANS_FORWARD, status);
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, hangul, latin2);
+ delete t;
+
+ t = Transliterator::createInstance("Latin-Hangul", UTRANS_FORWARD, status);
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, latin, hangul);
+ delete t;
+
+ t = Transliterator::createInstance("Hangul-Latin; Latin-Jamo", UTRANS_FORWARD, status);
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, hangul, jamo);
+ delete t;
+
+ t = Transliterator::createInstance("Jamo-Latin; Latin-Hangul", UTRANS_FORWARD, status);
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, jamo, hangul);
+ delete t;
+
+ t = Transliterator::createInstance("Hangul-Latin; Latin-Hangul", UTRANS_FORWARD, status);
+ if (U_FAILURE(status) || t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ expect(*t, hangul, hangul);
+ delete t;
+}
+
+void
+JamoTest::TestRealText() {
+ // Test text taken from the Unicode web site
+ static const char* const WHAT_IS_UNICODE[] = {
+ "\\uc720\\ub2c8\\ucf54\\ub4dc\\uc5d0", "\\ub300\\ud574", "?",
+
+ "\\uc5b4\\ub5a4", "\\ud50c\\ub7ab\\ud3fc,", "\\uc5b4\\ub5a4",
+ "\\ud504\\ub85c\\uadf8\\ub7a8,", "\\uc5b4\\ub5a4", "\\uc5b8\\uc5b4\\uc5d0\\ub3c4",
+ "\\uc0c1\\uad00\\uc5c6\\uc774", "\\uc720\\ub2c8\\ucf54\\ub4dc\\ub294", "\\ubaa8\\ub4e0",
+ "\\ubb38\\uc790\\uc5d0", "\\ub300\\ud574", "\\uace0\\uc720", "\\ubc88\\ud638\\ub97c",
+ "\\uc81c\\uacf5\\ud569\\ub2c8\\ub2e4.",
+
+ "\\uae30\\ubcf8\\uc801\\uc73c\\ub85c", "\\ucef4\\ud4e8\\ud130\\ub294",
+ "\\uc22b\\uc790\\ub9cc", "\\ucc98\\ub9ac\\ud569\\ub2c8\\ub2e4.", "\\uae00\\uc790\\ub098",
+ "\\ub2e4\\ub978", "\\ubb38\\uc790\\uc5d0\\ub3c4", "\\uc22b\\uc790\\ub97c",
+ "\\uc9c0\\uc815\\ud558\\uc5ec",
+ "\\uc800\\uc7a5\\ud569\\ub2c8\\ub2e4.", "\\uc720\\ub2c8\\ucf54\\ub4dc\\uac00",
+ "\\uac1c\\ubc1c\\ub418\\uae30", "\\uc804\\uc5d0\\ub294", "\\uc774\\ub7ec\\ud55c",
+ "\\uc22b\\uc790\\ub97c", "\\uc9c0\\uc815\\ud558\\uae30", "\\uc704\\ud574", "\\uc218\\ubc31",
+ "\\uac00\\uc9c0\\uc758", "\\ub2e4\\ub978", "\\uae30\\ud638\\ud654",
+ "\\uc2dc\\uc2a4\\ud15c\\uc744",
+ "\\uc0ac\\uc6a9\\ud588\\uc2b5\\ub2c8\\ub2e4.", "\\ub2e8\\uc77c", "\\uae30\\ud638\\ud654",
+ "\\ubc29\\ubc95\\uc73c\\ub85c\\ub294", "\\ubaa8\\ub4e0", "\\ubb38\\uc790\\ub97c",
+ "\\ud3ec\\ud568\\ud560", "\\uc218", "\\uc5c6\\uc5c8\\uc2b5\\ub2c8\\ub2e4.", "\\uc608\\ub97c",
+ "\\ub4e4\\uc5b4", "\\uc720\\ub7fd", "\\uc5f0\\ud569\\uc5d0\\uc11c\\ub9cc",
+ "\\ubcf4\\ub354\\ub77c\\ub3c4", "\\ubaa8\\ub4e0", "\\uac01", "\\ub098\\ub77c\\ubcc4",
+ "\\uc5b8\\uc5b4\\ub97c", "\\ucc98\\ub9ac\\ud558\\ub824\\uba74", "\\uc5ec\\ub7ec",
+ "\\uac1c\\uc758", "\\ub2e4\\ub978", "\\uae30\\ud638\\ud654", "\\ubc29\\ubc95\\uc774",
+ "\\ud544\\uc694\\ud569\\ub2c8\\ub2e4.", "\\uc601\\uc5b4\\uc640", "\\uac19\\uc740",
+ "\\ub2e8\\uc77c", "\\uc5b8\\uc5b4\\uc758", "\\uacbd\\uc6b0\\ub3c4",
+ "\\uacf5\\ud1b5\\uc801\\uc73c\\ub85c", "\\uc0ac\\uc6a9\\ub418\\ub294", "\\ubaa8\\ub4e0",
+ "\\uae00\\uc790,", "\\ubb38\\uc7a5", "\\ubd80\\ud638", "\\ubc0f",
+ "\\ud14c\\ud06c\\ub2c8\\uceec", "\\uae30\\ud638\\uc5d0", "\\ub9de\\ub294", "\\ub2e8\\uc77c",
+ "\\uae30\\ud638\\ud654", "\\ubc29\\ubc95\\uc744", "\\uac16\\uace0", "\\uc788\\uc9c0",
+ "\\ubabb\\ud558\\uc600\\uc2b5\\ub2c8\\ub2e4.",
+
+ "\\uc774\\ub7ec\\ud55c", "\\uae30\\ud638\\ud654", "\\uc2dc\\uc2a4\\ud15c\\uc740",
+ "\\ub610\\ud55c", "\\ub2e4\\ub978", "\\uae30\\ud638\\ud654", "\\uc2dc\\uc2a4\\ud15c\\uacfc",
+ "\\ucda9\\ub3cc\\ud569\\ub2c8\\ub2e4.", "\\uc989", "\\ub450", "\\uac00\\uc9c0",
+ "\\uae30\\ud638\\ud654", "\\ubc29\\ubc95\\uc774", "\\ub450", "\\uac1c\\uc758", "\\ub2e4\\ub978",
+ "\\ubb38\\uc790\\uc5d0", "\\ub300\\ud574", "\\uac19\\uc740", "\\ubc88\\ud638\\ub97c",
+ "\\uc0ac\\uc6a9\\ud558\\uac70\\ub098", "\\uac19\\uc740", "\\ubb38\\uc790\\uc5d0",
+ "\\ub300\\ud574", "\\ub2e4\\ub978", "\\ubc88\\ud638\\ub97c", "\\uc0ac\\uc6a9\\ud560", "\\uc218",
+ "\\uc788\\uc2b5\\ub2c8\\ub2e4.", "\\uc8fc\\uc5b4\\uc9c4", "\\ubaa8\\ub4e0",
+ "\\ucef4\\ud4e8\\ud130(\\ud2b9\\ud788", "\\uc11c\\ubc84)\\ub294", "\\uc11c\\ub85c",
+ "\\ub2e4\\ub978", "\\uc5ec\\ub7ec", "\\uac00\\uc9c0", "\\uae30\\ud638\\ud654",
+ "\\ubc29\\ubc95\\uc744", "\\uc9c0\\uc6d0\\ud574\\uc57c",
+ "\\ud569\\ub2c8\\ub2e4.", "\\uadf8\\ub7ec\\ub098,", "\\ub370\\uc774\\ud130\\ub97c",
+ "\\uc11c\\ub85c", "\\ub2e4\\ub978", "\\uae30\\ud638\\ud654", "\\ubc29\\ubc95\\uc774\\ub098",
+ "\\ud50c\\ub7ab\\ud3fc", "\\uac04\\uc5d0", "\\uc804\\ub2ec\\ud560", "\\ub54c\\ub9c8\\ub2e4",
+ "\\uadf8", "\\ub370\\uc774\\ud130\\ub294", "\\ud56d\\uc0c1", "\\uc190\\uc0c1\\uc758",
+ "\\uc704\\ud5d8\\uc744", "\\uacaa\\uac8c", "\\ub429\\ub2c8\\ub2e4.",
+
+ "\\uc720\\ub2c8\\ucf54\\ub4dc\\ub85c", "\\ubaa8\\ub4e0", "\\uac83\\uc744",
+ "\\ud574\\uacb0\\ud560", "\\uc218", "\\uc788\\uc2b5\\ub2c8\\ub2e4!",
+ "\\uc720\\ub2c8\\ucf54\\ub4dc\\ub294", "\\uc0ac\\uc6a9", "\\uc911\\uc778",
+ "\\ud50c\\ub7ab\\ud3fc,", "\\ud504\\ub85c\\uadf8\\ub7a8,", "\\uc5b8\\uc5b4\\uc5d0",
+ "\\uad00\\uacc4\\uc5c6\\uc774", "\\ubb38\\uc790\\ub9c8\\ub2e4", "\\uace0\\uc720\\ud55c",
+ "\\uc22b\\uc790\\ub97c",
+ "\\uc81c\\uacf5\\ud569\\ub2c8\\ub2e4.", "\\uc720\\ub2c8\\ucf54\\ub4dc",
+ "\\ud45c\\uc900\\uc740", // "Apple, HP, IBM, JustSystem, Microsoft, Oracle, SAP, "
+ // "Sun, Sybase, Unisys "
+ "\\ubc0f", "\\uae30\\ud0c0", "\\uc5ec\\ub7ec",
+ "\\ud68c\\uc0ac\\uc640", "\\uac19\\uc740", "\\uc5c5\\uacc4",
+ "\\uc120\\ub450\\uc8fc\\uc790\\uc5d0", "\\uc758\\ud574",
+ "\\ucc44\\ud0dd\\ub418\\uc5c8\\uc2b5\\ub2c8\\ub2e4.", "\\uc720\\ub2c8\\ucf54\\ub4dc\\ub294",
+ // "XML, Java, ECMAScript(JavaScript), LDAP, CORBA 3.0, WML "
+ "\\ub4f1\\uacfc",
+ "\\uac19\\uc774", "\\ud604\\uc7ac", "\\ub110\\ub9ac", "\\uc0ac\\uc6a9\\ub418\\ub294",
+ "\\ud45c\\uc900\\uc5d0\\uc11c", "\\ud544\\uc694\\ud558\\uba70", "\\uc774\\ub294", // "ISO/IEC",
+ "10646\\uc744", "\\uad6c\\ud604\\ud558\\ub294", "\\uacf5\\uc2dd\\uc801\\uc778",
+ "\\ubc29\\ubc95\\uc785\\ub2c8\\ub2e4.", "\\uc774\\ub294", "\\ub9ce\\uc740", "\\uc6b4\\uc601",
+ "\\uccb4\\uc81c,", "\\uc694\\uc998", "\\uc0ac\\uc6a9\\ub418\\ub294", "\\ubaa8\\ub4e0",
+ "\\ube0c\\ub77c\\uc6b0\\uc800", "\\ubc0f", "\\uae30\\ud0c0", "\\ub9ce\\uc740",
+ "\\uc81c\\ud488\\uc5d0\\uc11c",
+ "\\uc9c0\\uc6d0\\ub429\\ub2c8\\ub2e4.", "\\uc720\\ub2c8\\ucf54\\ub4dc",
+ "\\ud45c\\uc900\\uc758", "\\ubd80\\uc0c1\\uacfc", "\\uc774\\ub97c",
+ "\\uc9c0\\uc6d0\\ud558\\ub294", "\\ub3c4\\uad6c\\uc758", "\\uac00\\uc6a9\\uc131\\uc740",
+ "\\ucd5c\\uadfc", "\\uc804", "\\uc138\\uacc4\\uc5d0", "\\ubd88\\uace0", "\\uc788\\ub294",
+ "\\uae30\\uc220", "\\uacbd\\ud5a5\\uc5d0\\uc11c", "\\uac00\\uc7a5", "\\uc911\\uc694\\ud55c",
+ "\\ubd80\\ubd84\\uc744", "\\ucc28\\uc9c0\\ud558\\uace0", "\\uc788\\uc2b5\\ub2c8\\ub2e4.",
+
+ "\\uc720\\ub2c8\\ucf54\\ub4dc\\ub97c",
+ // Replaced a hyphen with a space to make the test case work with CLDR1.5
+ //"\\ud074\\ub77c\\uc774\\uc5b8\\ud2b8-\\uc11c\\ubc84", "\\ub610\\ub294",
+ "\\ud074\\ub77c\\uc774\\uc5b8\\ud2b8 \\uc11c\\ubc84", "\\ub610\\ub294",
+ // Replaced a hyphen with a space.
+ //"\\ub2e4\\uc911-\\uc5f0\\uacb0", "\\uc751\\uc6a9", "\\ud504\\ub85c\\uadf8\\ub7a8\\uacfc",
+ "\\ub2e4\\uc911 \\uc5f0\\uacb0", "\\uc751\\uc6a9", "\\ud504\\ub85c\\uadf8\\ub7a8\\uacfc",
+ "\\uc6f9", "\\uc0ac\\uc774\\ud2b8\\uc5d0", "\\ud1b5\\ud569\\ud558\\uba74",
+ "\\ub808\\uac70\\uc2dc", "\\ubb38\\uc790", "\\uc138\\ud2b8", "\\uc0ac\\uc6a9\\uc5d0",
+ "\\uc788\\uc5b4\\uc11c", "\\uc0c1\\ub2f9\\ud55c", "\\ube44\\uc6a9", "\\uc808\\uac10",
+ "\\ud6a8\\uacfc\\uac00",
+ "\\ub098\\ud0c0\\ub0a9\\ub2c8\\ub2e4.", "\\uc720\\ub2c8\\ucf54\\ub4dc\\ub97c",
+ "\\ud1b5\\ud574", "\\ub9ac\\uc5d4\\uc9c0\\ub2c8\\uc5b4\\ub9c1", "\\uc5c6\\uc774",
+ "\\ub2e4\\uc911", "\\ud50c\\ub7ab\\ud3fc,", "\\uc5b8\\uc5b4", "\\ubc0f", "\\uad6d\\uac00",
+ "\\uac04\\uc5d0", "\\ub2e8\\uc77c", "\\uc18c\\ud504\\ud2b8\\uc6e8\\uc5b4",
+ "\\ud50c\\ub7ab\\ud3fc", "\\ub610\\ub294", "\\ub2e8\\uc77c", "\\uc6f9",
+ "\\uc0ac\\uc774\\ud2b8\\ub97c", "\\ubaa9\\ud45c\\ub85c", "\\uc0bc\\uc744", "\\uc218",
+ "\\uc788\\uc2b5\\ub2c8\\ub2e4.", "\\uc774\\ub97c", "\\uc0ac\\uc6a9\\ud558\\uba74",
+ "\\ub370\\uc774\\ud130\\ub97c", "\\uc190\\uc0c1", "\\uc5c6\\uc774", "\\uc5ec\\ub7ec",
+ "\\uc2dc\\uc2a4\\ud15c\\uc744", "\\ud1b5\\ud574", "\\uc804\\uc1a1\\ud560", "\\uc218",
+ "\\uc788\\uc2b5\\ub2c8\\ub2e4.",
+
+ "\\uc720\\ub2c8\\ucf54\\ub4dc", "\\ucf58\\uc18c\\uc2dc\\uc5c4\\uc5d0", "\\ub300\\ud574",
+ "\\uc720\\ub2c8\\ucf54\\ub4dc", "\\ucf58\\uc18c\\uc2dc\\uc5c4\\uc740",
+ "\\ube44\\uc601\\ub9ac", "\\uc870\\uc9c1\\uc73c\\ub85c\\uc11c", "\\ud604\\ub300",
+ "\\uc18c\\ud504\\ud2b8\\uc6e8\\uc5b4", "\\uc81c\\ud488\\uacfc",
+ "\\ud45c\\uc900\\uc5d0\\uc11c", "\\ud14d\\uc2a4\\ud2b8\\uc758", "\\ud45c\\ud604\\uc744",
+ "\\uc9c0\\uc815\\ud558\\ub294", "\\uc720\\ub2c8\\ucf54\\ub4dc", "\\ud45c\\uc900\\uc758",
+ "\\uc0ac\\uc6a9\\uc744", "\\uac1c\\ubc1c\\ud558\\uace0", "\\ud655\\uc7a5\\ud558\\uba70",
+ "\\uc7a5\\ub824\\ud558\\uae30", "\\uc704\\ud574",
+ "\\uc138\\uc6cc\\uc84c\\uc2b5\\ub2c8\\ub2e4.", "\\ucf58\\uc18c\\uc2dc\\uc5c4",
+ "\\uba64\\ubc84\\uc27d\\uc740", "\\ucef4\\ud4e8\\ud130\\uc640", "\\uc815\\ubcf4",
+ "\\ucc98\\ub9ac", "\\uc0b0\\uc5c5\\uc5d0", "\\uc885\\uc0ac\\ud558\\uace0", "\\uc788\\ub294",
+ "\\uad11\\ubc94\\uc704\\ud55c", "\\ud68c\\uc0ac", "\\ubc0f", "\\uc870\\uc9c1\\uc758",
+ "\\ubc94\\uc704\\ub97c",
+ "\\ub098\\ud0c0\\ub0c5\\ub2c8\\ub2e4.", "\\ucf58\\uc18c\\uc2dc\\uc5c4\\uc758",
+ "\\uc7ac\\uc815\\uc740", "\\uc804\\uc801\\uc73c\\ub85c", "\\ud68c\\ube44\\uc5d0",
+ "\\uc758\\ud574", "\\ucda9\\ub2f9\\ub429\\ub2c8\\ub2e4.", "\\uc720\\ub2c8\\ucf54\\ub4dc",
+ "\\ucee8\\uc18c\\uc2dc\\uc5c4\\uc5d0\\uc11c\\uc758", "\\uba64\\ubc84\\uc27d\\uc740",
+ "\\uc804", "\\uc138\\uacc4", "\\uc5b4\\ub290", "\\uacf3\\uc5d0\\uc11c\\ub098",
+ "\\uc720\\ub2c8\\ucf54\\ub4dc", "\\ud45c\\uc900\\uc744", "\\uc9c0\\uc6d0\\ud558\\uace0",
+ "\\uadf8", "\\ud655\\uc7a5\\uacfc", "\\uad6c\\ud604\\uc744",
+ "\\uc9c0\\uc6d0\\ud558\\uace0\\uc790\\ud558\\ub294", "\\uc870\\uc9c1\\uacfc",
+ "\\uac1c\\uc778\\uc5d0\\uac8c", "\\uac1c\\ubc29\\ub418\\uc5b4",
+ "\\uc788\\uc2b5\\ub2c8\\ub2e4.",
+
+ "\\ub354", "\\uc790\\uc138\\ud55c", "\\ub0b4\\uc6a9\\uc740", "\\uc6a9\\uc5b4\\uc9d1,",
+ "\\uc608\\uc81c", "\\uc720\\ub2c8\\ucf54\\ub4dc", "\\uc0ac\\uc6a9", "\\uac00\\ub2a5",
+ "\\uc81c\\ud488,", "\\uae30\\uc220", "\\uc815\\ubcf4", "\\ubc0f", "\\uae30\\ud0c0",
+ "\\uc720\\uc6a9\\ud55c", "\\uc815\\ubcf4\\ub97c",
+ "\\ucc38\\uc870\\ud558\\uc2ed\\uc2dc\\uc624."
+ };
+
+ enum { WHAT_IS_UNICODE_length = sizeof(WHAT_IS_UNICODE) / sizeof(WHAT_IS_UNICODE[0]) };
+
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* latinJamo = Transliterator::createInstance("Latin-Jamo", UTRANS_FORWARD, parseError, status);
+ Transliterator* jamoHangul = Transliterator::createInstance("NFC(NFD)", UTRANS_FORWARD, parseError, status);
+ if (latinJamo == 0 || jamoHangul == 0 || U_FAILURE(status)) {
+ delete latinJamo;
+ delete jamoHangul;
+ errln("FAIL: createInstance returned NULL");
+ return;
+ }
+ Transliterator* jamoLatin = latinJamo->createInverse(status);
+ Transliterator* hangulJamo = jamoHangul->createInverse(status);
+ if (jamoLatin == 0 || hangulJamo == 0) {
+ errln("FAIL: createInverse returned NULL");
+ delete latinJamo;
+ delete jamoLatin;
+ delete jamoHangul;
+ delete hangulJamo;
+ return;
+ }
+
+ Transliterator* tarray[4] =
+ { hangulJamo, jamoLatin, latinJamo, jamoHangul };
+ CompoundTransliterator rt(tarray, 4);
+
+ UnicodeString buf;
+ int32_t total = 0;
+ int32_t errors = 0;
+ int32_t i;
+ for (i=0; i < WHAT_IS_UNICODE_length; ++i) {
+ ++total;
+ UnicodeString hangul = WHAT_IS_UNICODE[i];
+ hangul = hangul.unescape(); // Parse backslash-u escapes
+ UnicodeString hangulX = hangul;
+ rt.transliterate(hangulX);
+ if (hangul != hangulX) {
+ ++errors;
+ UnicodeString jamo = hangul; hangulJamo->transliterate(jamo);
+ UnicodeString latin = jamo; jamoLatin->transliterate(latin);
+ UnicodeString jamo2 = latin; latinJamo->transliterate(jamo2);
+ UnicodeString hangul2 = jamo2; jamoHangul->transliterate(hangul2);
+
+ buf.remove(0);
+ buf.append("FAIL: ");
+ if (hangul2 != hangulX) {
+ buf.append((UnicodeString)"(Weird: " + hangulX + " != " + hangul2 + ")");
+ }
+ // The Hangul-Jamo conversion is not usually the
+ // bug here, so we hide it from display.
+ // Uncomment lines to see the Hangul.
+ buf.append(//hangul + " => " +
+ jamoToName(jamo) + " => " +
+ latin + " => " + jamoToName(jamo2)
+ //+ " => " + hangul2
+ );
+ errln(prettify(buf));
+ }
+ }
+ if (errors != 0) {
+ errln((UnicodeString)"Test word failures: " + errors + " out of " + total);
+ } else {
+ logln((UnicodeString)"All " + total + " test words passed");
+ }
+
+ delete latinJamo;
+ delete jamoLatin;
+ delete jamoHangul;
+ delete hangulJamo;
+}
+
+// Override TransliteratorTest
+void
+JamoTest::expectAux(const UnicodeString& tag,
+ const UnicodeString& summary, UBool pass,
+ const UnicodeString& expectedResult) {
+ UnicodeString jsum = jamoToName(summary);
+ UnicodeString jexp = jamoToName(expectedResult);
+ TransliteratorTest::expectAux(tag, jsum, pass, jexp);
+}
+
+const char* JamoTest::JAMO_NAMES_RULES =
+ "'(Gi)' <> \\u1100;"
+ "'(GGi)' <> \\u1101;"
+ "'(Ni)' <> \\u1102;"
+ "'(Di)' <> \\u1103;"
+ "'(DD)' <> \\u1104;"
+ "'(R)' <> \\u1105;"
+ "'(Mi)' <> \\u1106;"
+ "'(Bi)' <> \\u1107;"
+ "'(BB)' <> \\u1108;"
+ "'(Si)' <> \\u1109;"
+ "'(SSi)' <> \\u110A;"
+ "'(IEUNG)' <> \\u110B;"
+ "'(Ji)' <> \\u110C;"
+ "'(JJ)' <> \\u110D;"
+ "'(Ci)' <> \\u110E;"
+ "'(Ki)' <> \\u110F;"
+ "'(Ti)' <> \\u1110;"
+ "'(Pi)' <> \\u1111;"
+ "'(Hi)' <> \\u1112;"
+
+ "'(A)' <> \\u1161;"
+ "'(AE)' <> \\u1162;"
+ "'(YA)' <> \\u1163;"
+ "'(YAE)' <> \\u1164;"
+ "'(EO)' <> \\u1165;"
+ "'(E)' <> \\u1166;"
+ "'(YEO)' <> \\u1167;"
+ "'(YE)' <> \\u1168;"
+ "'(O)' <> \\u1169;"
+ "'(WA)' <> \\u116A;"
+ "'(WAE)' <> \\u116B;"
+ "'(OE)' <> \\u116C;"
+ "'(YO)' <> \\u116D;"
+ "'(U)' <> \\u116E;"
+ "'(WEO)' <> \\u116F;"
+ "'(WE)' <> \\u1170;"
+ "'(WI)' <> \\u1171;"
+ "'(YU)' <> \\u1172;"
+ "'(EU)' <> \\u1173;"
+ "'(YI)' <> \\u1174;"
+ "'(I)' <> \\u1175;"
+
+ "'(Gf)' <> \\u11A8;"
+ "'(GGf)' <> \\u11A9;"
+ "'(GS)' <> \\u11AA;"
+ "'(Nf)' <> \\u11AB;"
+ "'(NJ)' <> \\u11AC;"
+ "'(NH)' <> \\u11AD;"
+ "'(Df)' <> \\u11AE;"
+ "'(L)' <> \\u11AF;"
+ "'(LG)' <> \\u11B0;"
+ "'(LM)' <> \\u11B1;"
+ "'(LB)' <> \\u11B2;"
+ "'(LS)' <> \\u11B3;"
+ "'(LT)' <> \\u11B4;"
+ "'(LP)' <> \\u11B5;"
+ "'(LH)' <> \\u11B6;"
+ "'(Mf)' <> \\u11B7;"
+ "'(Bf)' <> \\u11B8;"
+ "'(BS)' <> \\u11B9;"
+ "'(Sf)' <> \\u11BA;"
+ "'(SSf)' <> \\u11BB;"
+ "'(NG)' <> \\u11BC;"
+ "'(Jf)' <> \\u11BD;"
+ "'(Cf)' <> \\u11BE;"
+ "'(Kf)' <> \\u11BF;"
+ "'(Tf)' <> \\u11C0;"
+ "'(Pf)' <> \\u11C1;"
+ "'(Hf)' <> \\u11C2;";
+
+/**
+ * Convert short names to actual jamo. E.g., "x(LG)y" returns
+ * "x\u11B0y". See JAMO_NAMES for table of names.
+ */
+UnicodeString
+JamoTest::nameToJamo(const UnicodeString& input) {
+ if (NAME_JAMO == 0) {
+ errln("Failed to create NAME_JAMO");
+ return input; /* failure! */
+ }
+ UnicodeString result(input);
+ NAME_JAMO->transliterate(result);
+ return result;
+}
+
+/**
+ * Convert jamo to short names. E.g., "x\u11B0y" returns
+ * "x(LG)y". See JAMO_NAMES for table of names.
+ */
+UnicodeString
+JamoTest::jamoToName(const UnicodeString& input) {
+ if (NAME_JAMO == 0) {
+ errln("Failed to create NAME_JAMO");
+ return input; /* failure! */
+ }
+ UnicodeString result(input);
+ JAMO_NAME->transliterate(result);
+ return result;
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/jamotest.h b/Build/source/libs/icu/icu-xetex/test/intltest/jamotest.h
new file mode 100644
index 00000000000..f6dbfd7c216
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/jamotest.h
@@ -0,0 +1,60 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************
+************************************************************************
+* Date Name Description
+* 02/28/2001 aliu Creation
+* 03/01/2001 George port to HP/UX
+************************************************************************/
+
+#ifndef JAMOTEST_H
+#define JAMOTEST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "transtst.h"
+
+/**
+ * @test
+ * @summary Test of Latin-Jamo and Jamo-Latin rules
+ */
+class JamoTest : public TransliteratorTest {
+public:
+ JamoTest();
+ virtual ~JamoTest();
+private:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name,
+ char* par=NULL);
+
+ void TestJamo(void);
+
+ void TestRealText(void);
+
+ void TestPiecemeal(void);
+
+ //======================================================================
+ // Support methods
+ //======================================================================
+
+ // Override TransliteratorTest
+ virtual void expectAux(const UnicodeString& tag,
+ const UnicodeString& summary, UBool pass,
+ const UnicodeString& expectedResult);
+
+ // Methods to convert Jamo to/from readable short names,
+ // e.g. (Gi) <> U+1100
+ static const char* JAMO_NAMES_RULES;
+ Transliterator *JAMO_NAME;
+ Transliterator *NAME_JAMO;
+ UnicodeString nameToJamo(const UnicodeString& input);
+ UnicodeString jamoToName(const UnicodeString& input);
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.cpp
new file mode 100644
index 00000000000..f48ebd957f6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.cpp
@@ -0,0 +1,88 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#ifndef _COLL
+#include "unicode/coll.h"
+#endif
+
+#ifndef _TBLCOLL
+#include "unicode/tblcoll.h"
+#endif
+
+#ifndef _UNISTR
+#include "unicode/unistr.h"
+#endif
+
+#ifndef _SORTKEY
+#include "unicode/sortkey.h"
+#endif
+
+#include "lcukocol.h"
+
+#include "sfwdchit.h"
+
+LotusCollationKoreanTest::LotusCollationKoreanTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance("ko_kr", status);
+ if(U_SUCCESS(status)) {
+ myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ } else {
+ errln("Couldn't instantiate the collator with %s", u_errorName(status));
+ delete myCollation;
+ myCollation = 0;
+ }
+
+}
+
+LotusCollationKoreanTest::~LotusCollationKoreanTest()
+{
+ delete myCollation;
+}
+
+const UChar LotusCollationKoreanTest::testSourceCases[][LotusCollationKoreanTest::MAX_TOKEN_LEN] = {
+ {0xac00, 0}
+
+};
+
+const UChar LotusCollationKoreanTest::testTargetCases[][LotusCollationKoreanTest::MAX_TOKEN_LEN] = {
+ {0xac01, 0}
+};
+
+const Collator::EComparisonResult LotusCollationKoreanTest::results[] = {
+ Collator::LESS
+};
+
+void LotusCollationKoreanTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ myCollation->setStrength(Collator::TERTIARY);
+
+ for (i = 0; i < 1; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void LotusCollationKoreanTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite LotusCollationKoreanTest: ");
+ if(myCollation) {
+ switch (index) {
+ case 0: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ errln("Class collator not instantiated");
+ name = "";
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.h b/Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.h
new file mode 100644
index 00000000000..c690c5b65e6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/lcukocol.h
@@ -0,0 +1,40 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef LOTUSCOLLATIONKOREANTEST_H
+#define LOTUSCOLLATIONKOREANTEST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class LotusCollationKoreanTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ LotusCollationKoreanTest();
+ virtual ~LotusCollationKoreanTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // performs test with strength TERIARY
+ void TestTertiary(/* char* par */);
+
+private:
+ static const UChar testSourceCases[][MAX_TOKEN_LEN];
+ static const UChar testTargetCases[][MAX_TOKEN_LEN];
+ static const Collator::EComparisonResult results[];
+
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/loctest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/loctest.cpp
new file mode 100644
index 00000000000..1ce08214ade
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/loctest.cpp
@@ -0,0 +1,2136 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "loctest.h"
+#include "unicode/decimfmt.h"
+#include "unicode/ucurr.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/dtfmtsym.h"
+#include "unicode/brkiter.h"
+#include "unicode/coll.h"
+#include "cstring.h"
+#include <stdio.h>
+
+static const char* const rawData[33][8] = {
+
+ // language code
+ { "en", "fr", "ca", "el", "no", "it", "xx", "zh" },
+ // script code
+ { "", "", "", "", "", "", "", "Hans" },
+ // country code
+ { "US", "FR", "ES", "GR", "NO", "", "YY", "CN" },
+ // variant code
+ { "", "", "", "", "NY", "", "", "" },
+ // full name
+ { "en_US", "fr_FR", "ca_ES", "el_GR", "no_NO_NY", "it", "xx_YY", "zh_Hans_CN" },
+ // ISO-3 language
+ { "eng", "fra", "cat", "ell", "nor", "ita", "", "zho" },
+ // ISO-3 country
+ { "USA", "FRA", "ESP", "GRC", "NOR", "", "", "CHN" },
+ // LCID
+ { "409", "40c", "403", "408", "814", "10", "0", "804" },
+
+ // display langage (English)
+ { "English", "French", "Catalan", "Greek", "Norwegian", "Italian", "xx", "Chinese" },
+ // display script (English)
+ { "", "", "", "", "", "", "", "Simplified Han" },
+ // display country (English)
+ { "United States", "France", "Spain", "Greece", "Norway", "", "YY", "China" },
+ // display variant (English)
+ { "", "", "", "", "NY", "", "", ""},
+ // display name (English)
+ // Updated no_NO_NY English display name for new pattern-based algorithm
+ // (part of Euro support).
+ { "English (United States)", "French (France)", "Catalan (Spain)", "Greek (Greece)", "Norwegian (Norway, NY)", "Italian", "xx (YY)", "Chinese (Simplified Han, China)" },
+
+ // display langage (French)
+ { "anglais", "fran\\u00E7ais", "catalan", "grec", "norv\\u00E9gien", "italien", "xx", "chinois" },
+ // display script (French)
+ { "", "", "", "", "", "", "", "id\\u00E9ogrammes han (variante simplifi\\u00E9e)" },
+ // display country (French)
+ { "\\u00C9tats-Unis", "France", "Espagne", "Gr\\u00E8ce", "Norv\\u00E8ge", "", "YY", "Chine" },
+ // display variant (French)
+ { "", "", "", "", "NY", "", "", "" },
+ // display name (French)
+ //{ "anglais (Etats-Unis)", "francais (France)", "catalan (Espagne)", "grec (Grece)", "norvegien (Norvege,Nynorsk)", "italien", "xx (YY)" },
+ { "anglais (\\u00C9tats-Unis)", "fran\\u00E7ais (France)", "catalan (Espagne)", "grec (Gr\\u00E8ce)", "norv\\u00E9gien (Norv\\u00E8ge, NY)", "italien", "xx (YY)", "chinois (id\\u00E9ogrammes han (variante simplifi\\u00E9e), Chine)" }, // STILL not right
+
+
+ /* display language (Catalan) */
+ { "angl\\u00E8s", "franc\\u00E8s", "catal\\u00E0", "grec", "noruec", "itali\\u00E0", "", "xin\\u00E9s" },
+ /* display script (Catalan) */
+ { "", "", "", "", "", "", "", "Hans" },
+ /* display country (Catalan) */
+ { "Estats Units", "Fran\\u00E7a", "Espanya", "Gr\\u00E8cia", "Noruega", "", "", "Xina" },
+ /* display variant (Catalan) */
+ { "", "", "", "", "NY", "", "" },
+ /* display name (Catalan) */
+ { "angl\\u00E8s (Estats Units)", "franc\\u00E8s (Fran\\u00E7a)", "catal\\u00E0 (Espanya)", "grec (Gr\\u00E8cia)", "noruec (Noruega, NY)", "itali\\u00E0", "", "xin\\u00E9s (Hans, Xina)" },
+
+ // display langage (Greek)[actual values listed below]
+ { "\\u0391\\u03b3\\u03b3\\u03bb\\u03b9\\u03ba\\u03ac",
+ "\\u0393\\u03b1\\u03bb\\u03bb\\u03b9\\u03ba\\u03ac",
+ "\\u039a\\u03b1\\u03c4\\u03b1\\u03bb\\u03b1\\u03bd\\u03b9\\u03ba\\u03ac",
+ "\\u0395\\u03bb\\u03bb\\u03b7\\u03bd\\u03b9\\u03ba\\u03ac",
+ "\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac",
+ "\\u0399\\u03c4\\u03b1\\u03bb\\u03b9\\u03ba\\u03ac",
+ "",
+ "\\u039A\\u03B9\\u03BD\\u03B5\\u03B6\\u03B9\\u03BA\\u03AC"
+ },
+ // display script (Greek)
+ { "", "", "", "", "", "", "", "\\u039a\\u03b9\\u03bd\\u03b5\\u03b6\\u03b9\\u03ba\\u03cc \\u0391\\u03c0\\u03bb\\u03bf\\u03c0\\u03bf\\u03b9\\u03b7\\u03bc\\u03ad\\u03bd\\u03bf" },
+ // display country (Greek)[actual values listed below]
+ { "\\u0397\\u03BD\\u03C9\\u03BC\\u03AD\\u03BD\\u03B5\\u03C2 \\u03A0\\u03BF\\u03BB\\u03B9\\u03C4\\u03B5\\u03AF\\u03B5\\u03C2",
+ "\\u0393\\u03b1\\u03bb\\u03bb\\u03af\\u03b1",
+ "\\u0399\\u03c3\\u03c0\\u03b1\\u03bd\\u03af\\u03b1",
+ "\\u0395\\u03bb\\u03bb\\u03ac\\u03b4\\u03b1",
+ "\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1",
+ "",
+ "",
+ "\\u039A\\u03AF\\u03BD\\u03B1"
+ },
+ // display variant (Greek)
+ { "", "", "", "", "NY", "", "" },
+ // display name (Greek)[actual values listed below]
+ { "\\u0391\\u03b3\\u03b3\\u03bb\\u03b9\\u03ba\\u03ac (\\u0397\\u03BD\\u03C9\\u03BC\\u03AD\\u03BD\\u03B5\\u03C2 \\u03A0\\u03BF\\u03BB\\u03B9\\u03C4\\u03B5\\u03AF\\u03B5\\u03C2)",
+ "\\u0393\\u03b1\\u03bb\\u03bb\\u03b9\\u03ba\\u03ac (\\u0393\\u03b1\\u03bb\\u03bb\\u03af\\u03b1)",
+ "\\u039a\\u03b1\\u03c4\\u03b1\\u03bb\\u03b1\\u03bd\\u03b9\\u03ba\\u03ac (\\u0399\\u03c3\\u03c0\\u03b1\\u03bd\\u03af\\u03b1)",
+ "\\u0395\\u03bb\\u03bb\\u03b7\\u03bd\\u03b9\\u03ba\\u03ac (\\u0395\\u03bb\\u03bb\\u03ac\\u03b4\\u03b1)",
+ "\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac (\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1, NY)",
+ "\\u0399\\u03c4\\u03b1\\u03bb\\u03b9\\u03ba\\u03ac",
+ "",
+ "\\u039A\\u03B9\\u03BD\\u03B5\\u03B6\\u03B9\\u03BA\\u03AC (\\u039a\\u03b9\\u03bd\\u03b5\\u03b6\\u03b9\\u03ba\\u03cc \\u0391\\u03c0\\u03bb\\u03bf\\u03c0\\u03bf\\u03b9\\u03b7\\u03bc\\u03ad\\u03bd\\u03bf, \\u039A\\u03AF\\u03BD\\u03B1)"
+ },
+
+ // display langage (<root>)
+ { "English", "French", "Catalan", "Greek", "Norwegian", "Italian", "xx", "" },
+ // display script (<root>)
+ { "", "", "", "", "", "", "", ""},
+ // display country (<root>)
+ { "United States", "France", "Spain", "Greece", "Norway", "", "YY", "" },
+ // display variant (<root>)
+ { "", "", "", "", "Nynorsk", "", "", ""},
+ // display name (<root>)
+ //{ "English (United States)", "French (France)", "Catalan (Spain)", "Greek (Greece)", "Norwegian (Norway,Nynorsk)", "Italian", "xx (YY)" },
+ { "English (United States)", "French (France)", "Catalan (Spain)", "Greek (Greece)", "Norwegian (Norway,NY)", "Italian", "xx (YY)", "" }
+};
+
+
+/*
+ Usage:
+ test_assert( Test (should be TRUE) )
+
+ Example:
+ test_assert(i==3);
+
+ the macro is ugly but makes the tests pretty.
+*/
+
+#define test_assert(test) \
+ { \
+ if(!(test)) \
+ errln("FAIL: " #test " was not true. In " __FILE__ " on line %d", __LINE__ ); \
+ else \
+ logln("PASS: asserted " #test); \
+ }
+
+/*
+ Usage:
+ test_assert_print( Test (should be TRUE), printable )
+
+ Example:
+ test_assert(i==3, toString(i));
+
+ the macro is ugly but makes the tests pretty.
+*/
+
+#define test_assert_print(test,print) \
+ { \
+ if(!(test)) \
+ errln("FAIL: " #test " was not true. " + UnicodeString(print) ); \
+ else \
+ logln("PASS: asserted " #test "-> " + UnicodeString(print)); \
+ }
+
+
+#define test_dumpLocale(l) { logln(#l " = " + UnicodeString(l.getName(), "")); }
+
+LocaleTest::LocaleTest()
+: dataTable(NULL)
+{
+ setUpDataTable();
+}
+
+LocaleTest::~LocaleTest()
+{
+ if (dataTable != 0) {
+ for (int32_t i = 0; i < 33; i++) {
+ delete []dataTable[i];
+ }
+ delete []dataTable;
+ dataTable = 0;
+ }
+}
+
+void LocaleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ switch (index) {
+ TESTCASE(0, TestBasicGetters);
+ TESTCASE(1, TestSimpleResourceInfo);
+ TESTCASE(2, TestDisplayNames);
+ TESTCASE(3, TestSimpleObjectStuff);
+ TESTCASE(4, TestPOSIXParsing);
+ TESTCASE(5, TestGetAvailableLocales);
+ TESTCASE(6, TestDataDirectory);
+ TESTCASE(7, TestISO3Fallback);
+ TESTCASE(8, TestGetLangsAndCountries);
+ TESTCASE(9, TestSimpleDisplayNames);
+ TESTCASE(10, TestUninstalledISO3Names);
+ TESTCASE(11, TestAtypicalLocales);
+#if !UCONFIG_NO_FORMATTING
+ TESTCASE(12, TestThaiCurrencyFormat);
+ TESTCASE(13, TestEuroSupport);
+#endif
+ TESTCASE(14, TestToString);
+#if !UCONFIG_NO_FORMATTING
+ TESTCASE(15, Test4139940);
+ TESTCASE(16, Test4143951);
+#endif
+ TESTCASE(17, Test4147315);
+ TESTCASE(18, Test4147317);
+ TESTCASE(19, Test4147552);
+ TESTCASE(20, TestVariantParsing);
+#if !UCONFIG_NO_FORMATTING
+ TESTCASE(21, Test4105828);
+#endif
+ TESTCASE(22, TestSetIsBogus);
+ TESTCASE(23, TestParallelAPIValues);
+ TESTCASE(24, TestKeywordVariants);
+ TESTCASE(25, TestKeywordVariantParsing);
+ TESTCASE(26, TestGetBaseName);
+ TESTCASE(27, TestGetLocale);
+ TESTCASE(28, TestVariantWithOutCountry);
+ TESTCASE(29, TestCanonicalization);
+
+ // keep the last index in sync with the condition in default:
+
+ default:
+ if (index <= 28) { // keep this in sync with the last index!
+ name = "(test omitted by !UCONFIG_NO_FORMATTING)";
+ } else {
+ name = "";
+ }
+ break; //needed to end loop
+ }
+}
+
+void LocaleTest::TestBasicGetters() {
+ UnicodeString temp;
+
+ int32_t i;
+ for (i = 0; i <= MAX_LOCALES; i++) {
+ Locale testLocale("");
+ if (rawData[SCRIPT][i] && rawData[SCRIPT][i][0] != 0) {
+ testLocale = Locale(rawData[LANG][i], rawData[SCRIPT][i], rawData[CTRY][i], rawData[VAR][i]);
+ }
+ else {
+ testLocale = Locale(rawData[LANG][i], rawData[CTRY][i], rawData[VAR][i]);
+ }
+ logln("Testing " + (UnicodeString)testLocale.getName() + "...");
+
+ if ( (temp=testLocale.getLanguage()) != (dataTable[LANG][i]))
+ errln(" Language code mismatch: " + temp + " versus "
+ + dataTable[LANG][i]);
+ if ( (temp=testLocale.getScript()) != (dataTable[SCRIPT][i]))
+ errln(" Script code mismatch: " + temp + " versus "
+ + dataTable[SCRIPT][i]);
+ if ( (temp=testLocale.getCountry()) != (dataTable[CTRY][i]))
+ errln(" Country code mismatch: " + temp + " versus "
+ + dataTable[CTRY][i]);
+ if ( (temp=testLocale.getVariant()) != (dataTable[VAR][i]))
+ errln(" Variant code mismatch: " + temp + " versus "
+ + dataTable[VAR][i]);
+ if ( (temp=testLocale.getName()) != (dataTable[NAME][i]))
+ errln(" Locale name mismatch: " + temp + " versus "
+ + dataTable[NAME][i]);
+ }
+
+ logln("Same thing without variant codes...");
+ for (i = 0; i <= MAX_LOCALES; i++) {
+ Locale testLocale("");
+ if (rawData[SCRIPT][i] && rawData[SCRIPT][i][0] != 0) {
+ testLocale = Locale(rawData[LANG][i], rawData[SCRIPT][i], rawData[CTRY][i]);
+ }
+ else {
+ testLocale = Locale(rawData[LANG][i], rawData[CTRY][i]);
+ }
+ logln("Testing " + (temp=testLocale.getName()) + "...");
+
+ if ( (temp=testLocale.getLanguage()) != (dataTable[LANG][i]))
+ errln("Language code mismatch: " + temp + " versus "
+ + dataTable[LANG][i]);
+ if ( (temp=testLocale.getScript()) != (dataTable[SCRIPT][i]))
+ errln("Script code mismatch: " + temp + " versus "
+ + dataTable[SCRIPT][i]);
+ if ( (temp=testLocale.getCountry()) != (dataTable[CTRY][i]))
+ errln("Country code mismatch: " + temp + " versus "
+ + dataTable[CTRY][i]);
+ if (testLocale.getVariant()[0] != 0)
+ errln("Variant code mismatch: something versus \"\"");
+ }
+
+ logln("Testing long language names and getters");
+ Locale test8 = Locale::createFromName("x-klingon-latn-zx.utf32be@special");
+
+ temp = test8.getLanguage();
+ if (temp != UnicodeString("x-klingon") )
+ errln("Language code mismatch: " + temp + " versus \"x-klingon\"");
+
+ temp = test8.getScript();
+ if (temp != UnicodeString("Latn") )
+ errln("Script code mismatch: " + temp + " versus \"Latn\"");
+
+ temp = test8.getCountry();
+ if (temp != UnicodeString("ZX") )
+ errln("Country code mismatch: " + temp + " versus \"ZX\"");
+
+ temp = test8.getVariant();
+ //if (temp != UnicodeString("SPECIAL") )
+ // errln("Variant code mismatch: " + temp + " versus \"SPECIAL\"");
+ // As of 3.0, the "@special" will *not* be parsed by uloc_getName()
+ if (temp != UnicodeString("") )
+ errln("Variant code mismatch: " + temp + " versus \"\"");
+
+ if (Locale::getDefault() != Locale::createFromName(NULL))
+ errln("Locale::getDefault() == Locale::createFromName(NULL)");
+
+ /*----------*/
+ // NOTE: There used to be a special test for locale names that had language or
+ // country codes that were longer than two letters. The new version of Locale
+ // doesn't support anything that isn't an officially recognized language or
+ // country code, so we no longer support this feature.
+
+ Locale bogusLang("THISISABOGUSLANGUAGE"); // Jitterbug 2864: language code too long
+ if(!bogusLang.isBogus()) {
+ errln("Locale(\"THISISABOGUSLANGUAGE\").isBogus()==FALSE");
+ }
+
+ bogusLang=Locale("eo");
+ if( bogusLang.isBogus() ||
+ strcmp(bogusLang.getLanguage(), "eo")!=0 ||
+ *bogusLang.getCountry()!=0 ||
+ *bogusLang.getVariant()!=0 ||
+ strcmp(bogusLang.getName(), "eo")!=0
+ ) {
+ errln("assignment to bogus Locale does not unbogus it or sets bad data");
+ }
+
+ Locale a("eo_DE@currency=DEM");
+ Locale *pb=a.clone();
+ if(pb==&a || *pb!=a) {
+ errln("Locale.clone() failed");
+ }
+ delete pb;
+}
+
+void LocaleTest::TestParallelAPIValues() {
+ logln("Test synchronization between C and C++ API");
+ if (strcmp(Locale::getChinese().getName(), ULOC_CHINESE) != 0) {
+ errln("Differences for ULOC_CHINESE Locale");
+ }
+ if (strcmp(Locale::getEnglish().getName(), ULOC_ENGLISH) != 0) {
+ errln("Differences for ULOC_ENGLISH Locale");
+ }
+ if (strcmp(Locale::getFrench().getName(), ULOC_FRENCH) != 0) {
+ errln("Differences for ULOC_FRENCH Locale");
+ }
+ if (strcmp(Locale::getGerman().getName(), ULOC_GERMAN) != 0) {
+ errln("Differences for ULOC_GERMAN Locale");
+ }
+ if (strcmp(Locale::getItalian().getName(), ULOC_ITALIAN) != 0) {
+ errln("Differences for ULOC_ITALIAN Locale");
+ }
+ if (strcmp(Locale::getJapanese().getName(), ULOC_JAPANESE) != 0) {
+ errln("Differences for ULOC_JAPANESE Locale");
+ }
+ if (strcmp(Locale::getKorean().getName(), ULOC_KOREAN) != 0) {
+ errln("Differences for ULOC_KOREAN Locale");
+ }
+ if (strcmp(Locale::getSimplifiedChinese().getName(), ULOC_SIMPLIFIED_CHINESE) != 0) {
+ errln("Differences for ULOC_SIMPLIFIED_CHINESE Locale");
+ }
+ if (strcmp(Locale::getTraditionalChinese().getName(), ULOC_TRADITIONAL_CHINESE) != 0) {
+ errln("Differences for ULOC_TRADITIONAL_CHINESE Locale");
+ }
+
+
+ if (strcmp(Locale::getCanada().getName(), ULOC_CANADA) != 0) {
+ errln("Differences for ULOC_CANADA Locale");
+ }
+ if (strcmp(Locale::getCanadaFrench().getName(), ULOC_CANADA_FRENCH) != 0) {
+ errln("Differences for ULOC_CANADA_FRENCH Locale");
+ }
+ if (strcmp(Locale::getChina().getName(), ULOC_CHINA) != 0) {
+ errln("Differences for ULOC_CHINA Locale");
+ }
+ if (strcmp(Locale::getPRC().getName(), ULOC_PRC) != 0) {
+ errln("Differences for ULOC_PRC Locale");
+ }
+ if (strcmp(Locale::getFrance().getName(), ULOC_FRANCE) != 0) {
+ errln("Differences for ULOC_FRANCE Locale");
+ }
+ if (strcmp(Locale::getGermany().getName(), ULOC_GERMANY) != 0) {
+ errln("Differences for ULOC_GERMANY Locale");
+ }
+ if (strcmp(Locale::getItaly().getName(), ULOC_ITALY) != 0) {
+ errln("Differences for ULOC_ITALY Locale");
+ }
+ if (strcmp(Locale::getJapan().getName(), ULOC_JAPAN) != 0) {
+ errln("Differences for ULOC_JAPAN Locale");
+ }
+ if (strcmp(Locale::getKorea().getName(), ULOC_KOREA) != 0) {
+ errln("Differences for ULOC_KOREA Locale");
+ }
+ if (strcmp(Locale::getTaiwan().getName(), ULOC_TAIWAN) != 0) {
+ errln("Differences for ULOC_TAIWAN Locale");
+ }
+ if (strcmp(Locale::getUK().getName(), ULOC_UK) != 0) {
+ errln("Differences for ULOC_UK Locale");
+ }
+ if (strcmp(Locale::getUS().getName(), ULOC_US) != 0) {
+ errln("Differences for ULOC_US Locale");
+ }
+}
+
+
+void LocaleTest::TestSimpleResourceInfo() {
+ UnicodeString temp;
+ char temp2[20];
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t i = 0;
+
+ for (i = 0; i <= MAX_LOCALES; i++) {
+ Locale testLocale(rawData[LANG][i], rawData[CTRY][i], rawData[VAR][i]);
+ logln("Testing " + (temp=testLocale.getName()) + "...");
+
+ if ( (temp=testLocale.getISO3Language()) != (dataTable[LANG3][i]))
+ errln(" ISO-3 language code mismatch: " + temp
+ + " versus " + dataTable[LANG3][i]);
+ if ( (temp=testLocale.getISO3Country()) != (dataTable[CTRY3][i]))
+ errln(" ISO-3 country code mismatch: " + temp
+ + " versus " + dataTable[CTRY3][i]);
+
+ sprintf(temp2, "%x", (int)testLocale.getLCID());
+ if (UnicodeString(temp2) != dataTable[LCID][i])
+ errln((UnicodeString)" LCID mismatch: " + temp2 + " versus "
+ + dataTable[LCID][i]);
+
+ if(U_FAILURE(err))
+ {
+ errln((UnicodeString)"Some error on number " + i + u_errorName(err));
+ }
+ err = U_ZERO_ERROR;
+ }
+
+ Locale locale("en");
+ if(strcmp(locale.getName(), "en") != 0||
+ strcmp(locale.getLanguage(), "en") != 0) {
+ errln("construction of Locale(en) failed\n");
+ }
+ /*-----*/
+
+}
+
+/*
+ * Jitterbug 2439 -- markus 20030425
+ *
+ * The lookup of display names must not fall back through the default
+ * locale because that yields useless results.
+ */
+void
+LocaleTest::TestDisplayNames()
+{
+ Locale english("en", "US");
+ Locale french("fr", "FR");
+ Locale croatian("ca", "ES");
+ Locale greek("el", "GR");
+
+ logln(" In locale = en_US...");
+ doTestDisplayNames(english, DLANG_EN);
+ logln(" In locale = fr_FR...");
+ doTestDisplayNames(french, DLANG_FR);
+ logln(" In locale = ca_ES...");
+ doTestDisplayNames(croatian, DLANG_CA);
+ logln(" In locale = el_GR...");
+ doTestDisplayNames(greek, DLANG_EL);
+
+ UnicodeString s;
+ UErrorCode status = U_ZERO_ERROR;
+
+#if !UCONFIG_NO_FORMATTING
+ DecimalFormatSymbols symb(status);
+ /* Check to see if ICU supports this locale */
+ if (symb.getLocale(ULOC_VALID_LOCALE, status) != Locale("root")) {
+ /* test that the default locale has a display name for its own language */
+ Locale().getDisplayLanguage(Locale(), s);
+ if(s.length()<=3 && s.charAt(0)<=0x7f) {
+ /* check <=3 to reject getting the language code as a display name */
+ errln("unable to get a display string for the language of the default locale\n");
+ }
+
+ /*
+ * API coverage improvements: call
+ * Locale::getDisplayLanguage(UnicodeString &) and
+ * Locale::getDisplayCountry(UnicodeString &)
+ */
+ s.remove();
+ Locale().getDisplayLanguage(s);
+ if(s.length()<=3 && s.charAt(0)<=0x7f) {
+ errln("unable to get a display string for the language of the default locale [2]\n");
+ }
+ }
+ else {
+ logln("Default locale %s is unsupported by ICU\n", Locale().getName());
+ }
+ s.remove();
+#endif
+
+ french.getDisplayCountry(s);
+ if(s.isEmpty()) {
+ errln("unable to get any default-locale display string for the country of fr_FR\n");
+ }
+ s.remove();
+ Locale("zh", "Hant").getDisplayScript(s);
+ if(s.isEmpty()) {
+ errln("unable to get any default-locale display string for the country of zh_Hant\n");
+ }
+}
+
+void LocaleTest::TestSimpleObjectStuff() {
+ Locale test1("aa", "AA");
+ Locale test2("aa", "AA");
+ Locale test3(test1);
+ Locale test4("zz", "ZZ");
+ Locale test5("aa", "AA", "");
+ Locale test6("aa", "AA", "ANTARES");
+ Locale test7("aa", "AA", "JUPITER");
+ Locale test8 = Locale::createFromName("aa-aa-jupiTER"); // was "aa-aa.utf8@jupiter" but in 3.0 getName won't normalize that
+
+ // now list them all for debugging usage.
+ test_dumpLocale(test1);
+ test_dumpLocale(test2);
+ test_dumpLocale(test3);
+ test_dumpLocale(test4);
+ test_dumpLocale(test5);
+ test_dumpLocale(test6);
+ test_dumpLocale(test7);
+ test_dumpLocale(test8);
+
+ // Make sure things compare to themselves!
+ test_assert(test1 == test1);
+ test_assert(test2 == test2);
+ test_assert(test3 == test3);
+ test_assert(test4 == test4);
+ test_assert(test5 == test5);
+ test_assert(test6 == test6);
+ test_assert(test7 == test7);
+ test_assert(test8 == test8);
+
+ // make sure things are not equal to themselves.
+ test_assert(!(test1 != test1));
+ test_assert(!(test2 != test2));
+ test_assert(!(test3 != test3));
+ test_assert(!(test4 != test4));
+ test_assert(!(test5 != test5));
+ test_assert(!(test6 != test6));
+ test_assert(!(test7 != test7));
+ test_assert(!(test8 != test8));
+
+ // make sure things that are equal to each other don't show up as unequal.
+ test_assert(!(test1 != test2));
+ test_assert(!(test2 != test1));
+ test_assert(!(test1 != test3));
+ test_assert(!(test2 != test3));
+ test_assert(test5 == test1);
+ test_assert(test6 != test2);
+ test_assert(test6 != test5);
+
+ test_assert(test6 != test7);
+
+ // test for things that shouldn't compare equal.
+ test_assert(!(test1 == test4));
+ test_assert(!(test2 == test4));
+ test_assert(!(test3 == test4));
+
+ test_assert(test7 == test8);
+
+ // test for hash codes to be the same.
+ int32_t hash1 = test1.hashCode();
+ int32_t hash2 = test2.hashCode();
+ int32_t hash3 = test3.hashCode();
+
+ test_assert(hash1 == hash2);
+ test_assert(hash1 == hash3);
+ test_assert(hash2 == hash3);
+
+ // test that the assignment operator works.
+ test4 = test1;
+ logln("test4=test1;");
+ test_dumpLocale(test4);
+ test_assert(test4 == test4);
+
+ test_assert(!(test1 != test4));
+ test_assert(!(test2 != test4));
+ test_assert(!(test3 != test4));
+ test_assert(test1 == test4);
+ test_assert(test4 == test1);
+
+ // test assignments with a variant
+ logln("test7 = test6");
+ test7 = test6;
+ test_dumpLocale(test7);
+ test_assert(test7 == test7);
+ test_assert(test7 == test6);
+ test_assert(test7 != test5);
+
+ logln("test6 = test1");
+ test6=test1;
+ test_dumpLocale(test6);
+ test_assert(test6 != test7);
+ test_assert(test6 == test1);
+ test_assert(test6 == test6);
+}
+
+// A class which exposes constructors that are implemented in terms of the POSIX parsing code.
+class POSIXLocale : public Locale
+{
+public:
+ POSIXLocale(const UnicodeString& l)
+ :Locale()
+ {
+ char *ch;
+ ch = new char[l.length() + 1];
+ ch[l.extract(0, 0x7fffffff, ch, "")] = 0;
+ setFromPOSIXID(ch);
+ delete [] ch;
+ }
+ POSIXLocale(const char *l)
+ :Locale()
+ {
+ setFromPOSIXID(l);
+ }
+};
+
+void LocaleTest::TestPOSIXParsing()
+{
+ POSIXLocale test1("ab_AB");
+ POSIXLocale test2(UnicodeString("ab_AB"));
+ Locale test3("ab","AB");
+
+ POSIXLocale test4("ab_AB_Antares");
+ POSIXLocale test5(UnicodeString("ab_AB_Antares"));
+ Locale test6("ab", "AB", "Antares");
+
+ test_dumpLocale(test1);
+ test_dumpLocale(test2);
+ test_dumpLocale(test3);
+ test_dumpLocale(test4);
+ test_dumpLocale(test5);
+ test_dumpLocale(test6);
+
+ test_assert(test1 == test1);
+
+ test_assert(test1 == test2);
+ test_assert(test2 == test3);
+ test_assert(test3 == test1);
+
+ test_assert(test4 == test5);
+ test_assert(test5 == test6);
+ test_assert(test6 == test4);
+
+ test_assert(test1 != test4);
+ test_assert(test5 != test3);
+ test_assert(test5 != test2);
+
+ int32_t hash1 = test1.hashCode();
+ int32_t hash2 = test2.hashCode();
+ int32_t hash3 = test3.hashCode();
+
+ test_assert(hash1 == hash2);
+ test_assert(hash2 == hash3);
+ test_assert(hash3 == hash1);
+}
+
+void LocaleTest::TestGetAvailableLocales()
+{
+ int32_t locCount = 0;
+ const Locale* locList = Locale::getAvailableLocales(locCount);
+
+ if (locCount == 0)
+ errln("getAvailableLocales() returned an empty list!");
+ else {
+ logln(UnicodeString("Number of locales returned = ") + locCount);
+ UnicodeString temp;
+ for(int32_t i = 0; i < locCount; ++i)
+ logln(locList[i].getName());
+ }
+ // I have no idea how to test this function...
+}
+
+// This test isn't applicable anymore - getISO3Language is
+// independent of the data directory
+void LocaleTest::TestDataDirectory()
+{
+/*
+ char oldDirectory[80];
+ const char* temp;
+ UErrorCode err = U_ZERO_ERROR;
+ UnicodeString testValue;
+
+ temp = Locale::getDataDirectory();
+ strcpy(oldDirectory, temp);
+ logln(UnicodeString("oldDirectory = ") + oldDirectory);
+
+ Locale test(Locale::US);
+ test.getISO3Language(testValue);
+ logln("first fetch of language retrieved " + testValue);
+ if (testValue != "eng")
+ errln("Initial check of ISO3 language failed: expected \"eng\", got \"" + testValue + "\"");
+
+ {
+ char *path;
+ path=IntlTest::getTestDirectory();
+ Locale::setDataDirectory( path );
+ }
+
+ test.getISO3Language(testValue);
+ logln("second fetch of language retrieved " + testValue);
+ if (testValue != "xxx")
+ errln("setDataDirectory() failed: expected \"xxx\", got \"" + testValue + "\"");
+
+ Locale::setDataDirectory(oldDirectory);
+ test.getISO3Language(testValue);
+ logln("third fetch of language retrieved " + testValue);
+ if (testValue != "eng")
+ errln("get/setDataDirectory() failed: expected \"eng\", got \"" + testValue + "\"");
+*/
+}
+
+//===========================================================
+
+void LocaleTest::doTestDisplayNames(Locale& displayLocale, int32_t compareIndex) {
+ UnicodeString temp;
+
+ for (int32_t i = 0; i <= MAX_LOCALES; i++) {
+ Locale testLocale("");
+ if (rawData[SCRIPT][i] && rawData[SCRIPT][i][0] != 0) {
+ testLocale = Locale(rawData[LANG][i], rawData[SCRIPT][i], rawData[CTRY][i], rawData[VAR][i]);
+ }
+ else {
+ testLocale = Locale(rawData[LANG][i], rawData[CTRY][i], rawData[VAR][i]);
+ }
+ logln(" Testing " + (temp=testLocale.getName()) + "...");
+
+ UnicodeString testLang;
+ UnicodeString testScript;
+ UnicodeString testCtry;
+ UnicodeString testVar;
+ UnicodeString testName;
+
+ testLocale.getDisplayLanguage(displayLocale, testLang);
+ testLocale.getDisplayScript(displayLocale, testScript);
+ testLocale.getDisplayCountry(displayLocale, testCtry);
+ testLocale.getDisplayVariant(displayLocale, testVar);
+ testLocale.getDisplayName(displayLocale, testName);
+
+ UnicodeString expectedLang;
+ UnicodeString expectedScript;
+ UnicodeString expectedCtry;
+ UnicodeString expectedVar;
+ UnicodeString expectedName;
+
+ expectedLang = dataTable[compareIndex][i];
+ if (expectedLang.length() == 0)
+ expectedLang = dataTable[DLANG_EN][i];
+
+ expectedScript = dataTable[compareIndex + 1][i];
+ if (expectedScript.length() == 0)
+ expectedScript = dataTable[DSCRIPT_EN][i];
+
+ expectedCtry = dataTable[compareIndex + 2][i];
+ if (expectedCtry.length() == 0)
+ expectedCtry = dataTable[DCTRY_EN][i];
+
+ expectedVar = dataTable[compareIndex + 3][i];
+ if (expectedVar.length() == 0)
+ expectedVar = dataTable[DVAR_EN][i];
+
+ expectedName = dataTable[compareIndex + 4][i];
+ if (expectedName.length() == 0)
+ expectedName = dataTable[DNAME_EN][i];
+
+ if (testLang != expectedLang)
+ errln("Display language (" + UnicodeString(displayLocale.getName()) + ") of (" + UnicodeString(testLocale.getName()) + ") got " + testLang + " expected " + expectedLang);
+ if (testScript != expectedScript)
+ errln("Display script (" + UnicodeString(displayLocale.getName()) + ") of (" + UnicodeString(testLocale.getName()) + ") got " + testScript + " expected " + expectedScript);
+ if (testCtry != expectedCtry)
+ errln("Display country (" + UnicodeString(displayLocale.getName()) + ") of (" + UnicodeString(testLocale.getName()) + ") got " + testCtry + " expected " + expectedCtry);
+ if (testVar != expectedVar)
+ errln("Display variant (" + UnicodeString(displayLocale.getName()) + ") of (" + UnicodeString(testLocale.getName()) + ") got " + testVar + " expected " + expectedVar);
+ if (testName != expectedName)
+ errln("Display name (" + UnicodeString(displayLocale.getName()) + ") of (" + UnicodeString(testLocale.getName()) + ") got " + testName + " expected " + expectedName);
+ }
+}
+
+//---------------------------------------------------
+// table of valid data
+//---------------------------------------------------
+
+
+
+void LocaleTest::setUpDataTable()
+{
+ if (dataTable == 0) {
+ dataTable = new UnicodeString*[33];
+
+ for (int32_t i = 0; i < 33; i++) {
+ dataTable[i] = new UnicodeString[8];
+ for (int32_t j = 0; j < 8; j++) {
+ dataTable[i][j] = CharsToUnicodeString(rawData[i][j]);
+ }
+ }
+ }
+}
+
+// ====================
+
+
+/**
+ * @bug 4011756 4011380
+ */
+void
+LocaleTest::TestISO3Fallback()
+{
+ Locale test("xx", "YY");
+
+ const char * result;
+
+ result = test.getISO3Language();
+
+ // Conform to C API usage
+
+ if (!result || (result[0] != 0))
+ errln("getISO3Language() on xx_YY returned " + UnicodeString(result) + " instead of \"\"");
+
+ result = test.getISO3Country();
+
+ if (!result || (result[0] != 0))
+ errln("getISO3Country() on xx_YY returned " + UnicodeString(result) + " instead of \"\"");
+}
+
+/**
+ * @bug 4106155 4118587
+ */
+void
+LocaleTest::TestGetLangsAndCountries()
+{
+ // It didn't seem right to just do an exhaustive test of everything here, so I check
+ // for the following things:
+ // 1) Does each list have the right total number of entries?
+ // 2) Does each list contain certain language and country codes we think are important
+ // (the G7 countries, plus a couple others)?
+ // 3) Does each list have every entry formatted correctly? (i.e., two characters,
+ // all lower case for the language codes, all upper case for the country codes)
+ // 4) Is each list in sorted order?
+ int32_t testCount = 0;
+ const char * const * test = Locale::getISOLanguages();
+ const char spotCheck1[ ][4] = { "en", "es", "fr", "de", "it",
+ "ja", "ko", "zh", "th", "he",
+ "id", "iu", "ug", "yi", "za" };
+
+ int32_t i;
+
+ for(testCount = 0;test[testCount];testCount++)
+ ;
+
+ /* TODO: Change this test to be more like the cloctst version? */
+ if (testCount != 489)
+ errln("Expected getISOLanguages() to return 489 languages; it returned %d", testCount);
+ else {
+ for (i = 0; i < 15; i++) {
+ int32_t j;
+ for (j = 0; j < testCount; j++)
+ if (uprv_strcmp(test[j],spotCheck1[i])== 0)
+ break;
+ if (j == testCount || (uprv_strcmp(test[j],spotCheck1[i])!=0))
+ errln("Couldn't find " + (UnicodeString)spotCheck1[i] + " in language list.");
+ }
+ }
+ for (i = 0; i < testCount; i++) {
+ UnicodeString testee(test[i],"");
+ UnicodeString lc(test[i],"");
+ if (testee != lc.toLower())
+ errln(lc + " is not all lower case.");
+ if ( (testee.length() != 2) && (testee.length() != 3))
+ errln(testee + " is not two or three characters long.");
+ if (i > 0 && testee.compare(test[i - 1]) <= 0)
+ errln(testee + " appears in an out-of-order position in the list.");
+ }
+
+ test = Locale::getISOCountries();
+ UnicodeString spotCheck2 [] = { "US", "CA", "GB", "FR", "DE",
+ "IT", "JP", "KR", "CN", "TW",
+ "TH" };
+ int32_t spot2Len = 11;
+ for(testCount=0;test[testCount];testCount++)
+ ;
+
+ if (testCount != 246){
+ errln("Expected getISOCountries to return 240 countries; it returned %d", testCount);
+ }else {
+ for (i = 0; i < spot2Len; i++) {
+ int32_t j;
+ for (j = 0; j < testCount; j++)
+ {
+ UnicodeString testee(test[j],"");
+
+ if (testee == spotCheck2[i])
+ break;
+ }
+ UnicodeString testee(test[j],"");
+ if (j == testCount || testee != spotCheck2[i])
+ errln("Couldn't find " + spotCheck2[i] + " in country list.");
+ }
+ }
+ for (i = 0; i < testCount; i++) {
+ UnicodeString testee(test[i],"");
+ UnicodeString uc(test[i],"");
+ if (testee != uc.toUpper())
+ errln(testee + " is not all upper case.");
+ if (testee.length() != 2)
+ errln(testee + " is not two characters long.");
+ if (i > 0 && testee.compare(test[i - 1]) <= 0)
+ errln(testee + " appears in an out-of-order position in the list.");
+ }
+}
+
+/**
+ * @bug 4118587
+ */
+void
+LocaleTest::TestSimpleDisplayNames()
+{
+ // This test is different from TestDisplayNames because TestDisplayNames checks
+ // fallback behavior, combination of language and country names to form locale
+ // names, and other stuff like that. This test just checks specific language
+ // and country codes to make sure we have the correct names for them.
+ char languageCodes[] [4] = { "he", "id", "iu", "ug", "yi", "za" };
+ UnicodeString languageNames [] = { "Hebrew", "Indonesian", "Inuktitut", "Uighur", "Yiddish",
+ "Zhuang" };
+
+ for (int32_t i = 0; i < 6; i++) {
+ UnicodeString test;
+ Locale l(languageCodes[i], "", "");
+ l.getDisplayLanguage(Locale::getUS(), test);
+ if (test != languageNames[i])
+ errln("Got wrong display name for " + UnicodeString(languageCodes[i]) + ": Expected \"" +
+ languageNames[i] + "\", got \"" + test + "\".");
+ }
+}
+
+/**
+ * @bug 4118595
+ */
+void
+LocaleTest::TestUninstalledISO3Names()
+{
+ // This test checks to make sure getISO3Language and getISO3Country work right
+ // even for locales that are not installed.
+ const char iso2Languages [][4] = { "am", "ba", "fy", "mr", "rn",
+ "ss", "tw", "zu" };
+ const char iso3Languages [][5] = { "amh", "bak", "fry", "mar", "run",
+ "ssw", "twi", "zul" };
+
+ int32_t i;
+
+ for (i = 0; i < 8; i++) {
+ UErrorCode err = U_ZERO_ERROR;
+
+ UnicodeString test;
+ Locale l(iso2Languages[i], "", "");
+ test = l.getISO3Language();
+ if((test != iso3Languages[i]) || U_FAILURE(err))
+ errln("Got wrong ISO3 code for " + UnicodeString(iso2Languages[i]) + ": Expected \"" +
+ iso3Languages[i] + "\", got \"" + test + "\"." + UnicodeString(u_errorName(err)));
+ }
+
+ char iso2Countries [][4] = { "AF", "BW", "KZ", "MO", "MN",
+ "SB", "TC", "ZW" };
+ char iso3Countries [][4] = { "AFG", "BWA", "KAZ", "MAC", "MNG",
+ "SLB", "TCA", "ZWE" };
+
+ for (i = 0; i < 8; i++) {
+ UErrorCode err = U_ZERO_ERROR;
+ Locale l("", iso2Countries[i], "");
+ UnicodeString test(l.getISO3Country(), "");
+ if (test != iso3Countries[i])
+ errln("Got wrong ISO3 code for " + UnicodeString(iso2Countries[i]) + ": Expected \"" +
+ UnicodeString(iso3Countries[i]) + "\", got \"" + test + "\"." + u_errorName(err));
+ }
+}
+
+/**
+ * @bug 4092475
+ * I could not reproduce this bug. I'm pretty convinced it was fixed with the
+ * big locale-data reorg of 10/28/97. The lookup logic for language and country
+ * display names was also changed at that time in that check-in. --rtg 3/20/98
+ */
+void
+LocaleTest::TestAtypicalLocales()
+{
+ Locale localesToTest [] = { Locale("de", "CA"),
+ Locale("ja", "ZA"),
+ Locale("ru", "MX"),
+ Locale("en", "FR"),
+ Locale("es", "DE"),
+ Locale("", "HR"),
+ Locale("", "SE"),
+ Locale("", "DO"),
+ Locale("", "BE") };
+
+ UnicodeString englishDisplayNames [] = { "German (Canada)",
+ "Japanese (South Africa)",
+ "Russian (Mexico)",
+ "English (France)",
+ "Spanish (Germany)",
+ "Croatia",
+ "Sweden",
+ "Dominican Republic",
+ "Belgium" };
+ UnicodeString frenchDisplayNames []= { "allemand (Canada)",
+ "japonais (Afrique du Sud)",
+ "russe (Mexique)",
+ "anglais (France)",
+ "espagnol (Allemagne)",
+ "Croatie",
+ CharsToUnicodeString("Su\\u00E8de"),
+ CharsToUnicodeString("R\\u00E9publique dominicaine"),
+ "Belgique" };
+ UnicodeString spanishDisplayNames [] = {
+ CharsToUnicodeString("alem\\u00E1n (Canad\\u00E1)"),
+ CharsToUnicodeString("japon\\u00E9s (Sud\\u00E1frica)"),
+ CharsToUnicodeString("ruso (M\\u00E9xico)"),
+ CharsToUnicodeString("ingl\\u00E9s (Francia)"),
+ CharsToUnicodeString("espa\\u00F1ol (Alemania)"),
+ "Croacia",
+ "Suecia",
+ CharsToUnicodeString("Rep\\u00FAblica Dominicana"),
+ CharsToUnicodeString("B\\u00E9lgica") };
+ // De-Anglicizing root required the change from
+ // English display names to ISO Codes - ram 2003/09/26
+ UnicodeString invDisplayNames [] = { "German (Canada)",
+ "Japanese (South Africa)",
+ "Russian (Mexico)",
+ "English (France)",
+ "Spanish (Germany)",
+ "Croatia",
+ "Sweden",
+ "Dominican Republic",
+ "Belgium" };
+
+ int32_t i;
+ UErrorCode status = U_ZERO_ERROR;
+ Locale saveLocale;
+ Locale::setDefault(Locale::getUS(), status);
+ for (i = 0; i < 9; ++i) {
+ UnicodeString name;
+ localesToTest[i].getDisplayName(Locale::getUS(), name);
+ logln(name);
+ if (name != englishDisplayNames[i])
+ {
+ errln("Lookup in English failed: expected \"" + englishDisplayNames[i]
+ + "\", got \"" + name + "\"");
+ logln("Locale name was-> " + (name=localesToTest[i].getName()));
+ }
+ }
+
+ for (i = 0; i < 9; i++) {
+ UnicodeString name;
+ localesToTest[i].getDisplayName(Locale("es", "ES"), name);
+ logln(name);
+ if (name != spanishDisplayNames[i])
+ errln("Lookup in Spanish failed: expected \"" + spanishDisplayNames[i]
+ + "\", got \"" + name + "\"");
+ }
+
+ for (i = 0; i < 9; i++) {
+ UnicodeString name;
+ localesToTest[i].getDisplayName(Locale::getFrance(), name);
+ logln(name);
+ if (name != frenchDisplayNames[i])
+ errln("Lookup in French failed: expected \"" + frenchDisplayNames[i]
+ + "\", got \"" + name + "\"");
+ }
+
+ for (i = 0; i < 9; i++) {
+ UnicodeString name;
+ localesToTest[i].getDisplayName(Locale("inv", "IN"), name);
+ logln(name + " Locale fallback to be, and data fallback to root");
+ if (name != invDisplayNames[i])
+ errln("Lookup in INV failed: expected \"" + prettify(invDisplayNames[i])
+ + "\", got \"" + prettify(name) + "\"");
+ localesToTest[i].getDisplayName(Locale("inv", "BD"), name);
+ logln(name + " Data fallback to root");
+ if (name != invDisplayNames[i])
+ errln("Lookup in INV failed: expected \"" + prettify(invDisplayNames[i])
+ + "\", got \"" + prettify(name )+ "\"");
+ }
+ Locale::setDefault(saveLocale, status);
+}
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * @bug 4135752
+ * This would be better tested by the LocaleDataTest. Will move it when I
+ * get the LocaleDataTest working again.
+ */
+void
+LocaleTest::TestThaiCurrencyFormat()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *thaiCurrency = (DecimalFormat*)NumberFormat::createCurrencyInstance(
+ Locale("th", "TH"), status);
+ UChar posPrefix = 0x0e3f;
+ UnicodeString temp;
+
+ if(U_FAILURE(status) || !thaiCurrency)
+ {
+ errln("Couldn't get th_TH currency -> " + UnicodeString(u_errorName(status)));
+ return;
+ }
+ if (thaiCurrency->getPositivePrefix(temp) != UnicodeString(&posPrefix, 1, 1))
+ errln("Thai currency prefix wrong: expected 0x0e3f, got \"" +
+ thaiCurrency->getPositivePrefix(temp) + "\"");
+ if (thaiCurrency->getPositiveSuffix(temp) != "")
+ errln("Thai currency suffix wrong: expected \"\", got \"" +
+ thaiCurrency->getPositiveSuffix(temp) + "\"");
+
+ delete thaiCurrency;
+}
+
+/**
+ * @bug 4122371
+ * Confirm that Euro support works. This test is pretty rudimentary; all it does
+ * is check that any locales with the EURO variant format a number using the
+ * Euro currency symbol.
+ *
+ * ASSUME: All locales encode the Euro character "\u20AC".
+ * If this is changed to use the single-character Euro symbol, this
+ * test must be updated.
+ *
+ */
+void
+LocaleTest::TestEuroSupport()
+{
+ UChar euro = 0x20ac;
+ const UnicodeString EURO_CURRENCY(&euro, 1, 1); // Look for this UnicodeString in formatted Euro currency
+ const char* localeArr[] = {
+ "ca_ES",
+ "de_AT",
+ "de_DE",
+ "de_LU",
+ "el_GR",
+ "en_BE",
+ "en_IE",
+ "en_GB_EURO",
+ "en_US_EURO",
+ "es_ES",
+ "eu_ES",
+ "fi_FI",
+ "fr_BE",
+ "fr_FR",
+ "fr_LU",
+ "ga_IE",
+ "gl_ES",
+ "it_IT",
+ "nl_BE",
+ "nl_NL",
+ "pt_PT",
+ NULL
+ };
+ const char** locales = localeArr;
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ UnicodeString temp;
+
+ for (;*locales!=NULL;locales++) {
+ Locale loc (*locales);
+ UnicodeString temp;
+ NumberFormat *nf = NumberFormat::createCurrencyInstance(loc, status);
+ UnicodeString pos;
+
+ if (U_FAILURE(status)) {
+ dataerrln("Error calling NumberFormat::createCurrencyInstance(%s)", *locales);
+ continue;
+ }
+
+ nf->format(271828.182845, pos);
+ UnicodeString neg;
+ nf->format(-271828.182845, neg);
+ if (pos.indexOf(EURO_CURRENCY) >= 0 &&
+ neg.indexOf(EURO_CURRENCY) >= 0) {
+ logln("Ok: " + (temp=loc.getName()) +
+ ": " + pos + " / " + neg);
+ }
+ else {
+ errln("Fail: " + (temp=loc.getName()) +
+ " formats without " + EURO_CURRENCY +
+ ": " + pos + " / " + neg +
+ "\n*** THIS FAILURE MAY ONLY MEAN THAT LOCALE DATA HAS CHANGED ***");
+ }
+
+ delete nf;
+ }
+
+ UnicodeString dollarStr("USD", ""), euroStr("EUR", ""), genericStr((UChar)0x00a4), resultStr;
+ UChar tmp[4];
+ status = U_ZERO_ERROR;
+
+ ucurr_forLocale("en_US", tmp, 4, &status);
+ resultStr.setTo(tmp);
+ if (dollarStr != resultStr) {
+ errln("Fail: en_US didn't return USD");
+ }
+ ucurr_forLocale("en_US_EURO", tmp, 4, &status);
+ resultStr.setTo(tmp);
+ if (euroStr != resultStr) {
+ errln("Fail: en_US_EURO didn't return EUR");
+ }
+ ucurr_forLocale("en_GB_EURO", tmp, 4, &status);
+ resultStr.setTo(tmp);
+ if (euroStr != resultStr) {
+ errln("Fail: en_GB_EURO didn't return EUR");
+ }
+ ucurr_forLocale("en_US_PREEURO", tmp, 4, &status);
+ resultStr.setTo(tmp);
+ if (dollarStr != resultStr) {
+ errln("Fail: en_US_PREEURO didn't fallback to en_US");
+ }
+ ucurr_forLocale("en_US_Q", tmp, 4, &status);
+ resultStr.setTo(tmp);
+ if (dollarStr != resultStr) {
+ errln("Fail: en_US_Q didn't fallback to en_US");
+ }
+ int32_t invalidLen = ucurr_forLocale("en_QQ", tmp, 4, &status);
+ if (invalidLen || U_SUCCESS(status)) {
+ errln("Fail: en_QQ didn't return NULL");
+ }
+}
+
+#endif
+
+/**
+ * @bug 4139504
+ * toString() doesn't work with language_VARIANT.
+ */
+void
+LocaleTest::TestToString() {
+ Locale DATA [] = {
+ Locale("xx", "", ""),
+ Locale("", "YY", ""),
+ Locale("", "", "ZZ"),
+ Locale("xx", "YY", ""),
+ Locale("xx", "", "ZZ"),
+ Locale("", "YY", "ZZ"),
+ Locale("xx", "YY", "ZZ"),
+ };
+
+ const char DATA_S [][20] = {
+ "xx",
+ "_YY",
+ "__ZZ",
+ "xx_YY",
+ "xx__ZZ",
+ "_YY_ZZ",
+ "xx_YY_ZZ",
+ };
+
+ for (int32_t i=0; i < 7; ++i) {
+ const char *name;
+ name = DATA[i].getName();
+
+ if (strcmp(name, DATA_S[i]) != 0)
+ {
+ errln("Fail: Locale.getName(), got:" + UnicodeString(name) + ", expected: " + DATA_S[i]);
+ }
+ else
+ logln("Pass: Locale.getName(), got:" + UnicodeString(name) );
+ }
+}
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * @bug 4139940
+ * Couldn't reproduce this bug -- probably was fixed earlier.
+ *
+ * ORIGINAL BUG REPORT:
+ * -- basically, hungarian for monday shouldn't have an \u00f4
+ * (o circumflex)in it instead it should be an o with 2 inclined
+ * (right) lines over it..
+ *
+ * You may wonder -- why do all this -- why not just add a line to
+ * LocaleData? Well, I could see by inspection that the locale file had the
+ * right character in it, so I wanted to check the rest of the pipeline -- a
+ * very remote possibility, but I wanted to be sure. The other possibility
+ * is that something is wrong with the font mapping subsystem, but we can't
+ * test that here.
+ */
+void
+LocaleTest::Test4139940()
+{
+ Locale mylocale("hu", "", "");
+ UDate mydate = date(98,3,13); // A Monday
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat df_full("EEEE", mylocale, status);
+ if(U_FAILURE(status)){
+ errln(UnicodeString("Could not create SimpleDateFormat object for locale hu. Error: " )+ UnicodeString(u_errorName(status)));
+ return;
+ }
+ UnicodeString str;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ df_full.format(mydate, str, pos);
+ // Make sure that o circumflex (\u00F4) is NOT there, and
+ // o double acute (\u0151) IS.
+ UChar ocf = 0x00f4;
+ UChar oda = 0x0151;
+ if (str.indexOf(oda) < 0 || str.indexOf(ocf) >= 0) {
+ errln("Fail: Monday in Hungarian is wrong - oda's index is %d and ocf's is %d",
+ str.indexOf(oda), str.indexOf(ocf));
+ logln(UnicodeString("String is: ") + str );
+ }
+}
+
+UDate
+LocaleTest::date(int32_t y, int32_t m, int32_t d, int32_t hr, int32_t min, int32_t sec)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if (cal == 0)
+ return 0.0;
+ cal->clear();
+ cal->set(1900 + y, m, d, hr, min, sec); // Add 1900 to follow java.util.Date protocol
+ UDate dt = cal->getTime(status);
+ if (U_FAILURE(status))
+ return 0.0;
+
+ delete cal;
+ return dt;
+}
+
+/**
+ * @bug 4143951
+ * Russian first day of week should be Monday. Confirmed.
+ */
+void
+LocaleTest::Test4143951()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(Locale("ru", "", ""), status);
+ if(U_SUCCESS(status)) {
+ if (cal->getFirstDayOfWeek(status) != UCAL_MONDAY) {
+ errln("Fail: First day of week in Russia should be Monday");
+ }
+ }
+ delete cal;
+}
+
+#endif
+
+/**
+ * @bug 4147315
+ * java.util.Locale.getISO3Country() works wrong for non ISO-3166 codes.
+ * Should throw an exception for unknown locales
+ */
+void
+LocaleTest::Test4147315()
+{
+ UnicodeString temp;
+ // Try with codes that are the wrong length but happen to match text
+ // at a valid offset in the mapping table
+ Locale locale("aaa", "CCC");
+
+ const char *result = locale.getISO3Country();
+
+ // Change to conform to C api usage
+ if((result==NULL)||(result[0] != 0))
+ errln("ERROR: getISO3Country() returns: " + UnicodeString(result,"") +
+ " for locale '" + (temp=locale.getName()) + "' rather than exception" );
+}
+
+/**
+ * @bug 4147317
+ * java.util.Locale.getISO3Language() works wrong for non ISO-3166 codes.
+ * Should throw an exception for unknown locales
+ */
+void
+LocaleTest::Test4147317()
+{
+ UnicodeString temp;
+ // Try with codes that are the wrong length but happen to match text
+ // at a valid offset in the mapping table
+ Locale locale("aaa", "CCC");
+
+ const char *result = locale.getISO3Language();
+
+ // Change to conform to C api usage
+ if((result==NULL)||(result[0] != 0))
+ errln("ERROR: getISO3Language() returns: " + UnicodeString(result,"") +
+ " for locale '" + (temp=locale.getName()) + "' rather than exception" );
+}
+
+/*
+ * @bug 4147552
+ */
+void
+LocaleTest::Test4147552()
+{
+ Locale locales [] = { Locale("no", "NO"),
+ Locale("no", "NO", "B"),
+ Locale("no", "NO", "NY")
+ };
+
+ UnicodeString edn("Norwegian (Norway, B)");
+ UnicodeString englishDisplayNames [] = {
+ "Norwegian (Norway)",
+ edn,
+ // "Norwegian (Norway,B)",
+ //"Norwegian (Norway,NY)"
+ "Norwegian (Norway, NY)"
+ };
+ UnicodeString ndn("norsk (Norge, B");
+ UnicodeString norwegianDisplayNames [] = {
+ "norsk (Norge)",
+ "norsk (Norge, B)",
+ //ndn,
+ "norsk (Noreg, NY)"
+ //"Norsk (Noreg, Nynorsk)"
+ };
+ UErrorCode status = U_ZERO_ERROR;
+
+ Locale saveLocale;
+ Locale::setDefault(Locale::getEnglish(), status);
+ for (int32_t i = 0; i < 3; ++i) {
+ Locale loc = locales[i];
+ UnicodeString temp;
+ if (loc.getDisplayName(temp) != englishDisplayNames[i])
+ errln("English display-name mismatch: expected " +
+ englishDisplayNames[i] + ", got " + loc.getDisplayName(temp));
+ if (loc.getDisplayName(loc, temp) != norwegianDisplayNames[i])
+ errln("Norwegian display-name mismatch: expected " +
+ norwegianDisplayNames[i] + ", got " +
+ loc.getDisplayName(loc, temp));
+ }
+ Locale::setDefault(saveLocale, status);
+}
+
+void
+LocaleTest::TestVariantParsing()
+{
+ Locale en_US_custom("en", "US", "De Anza_Cupertino_California_United States_Earth");
+
+ UnicodeString dispName("English (United States, DE ANZA_CUPERTINO_CALIFORNIA_UNITED STATES_EARTH)");
+ UnicodeString dispVar("DE ANZA_CUPERTINO_CALIFORNIA_UNITED STATES_EARTH");
+
+ UnicodeString got;
+
+ en_US_custom.getDisplayVariant(Locale::getUS(), got);
+ if(got != dispVar) {
+ errln("FAIL: getDisplayVariant()");
+ errln("Wanted: " + dispVar);
+ errln("Got : " + got);
+ }
+
+ en_US_custom.getDisplayName(Locale::getUS(), got);
+ if(got != dispName) {
+ errln("FAIL: getDisplayName()");
+ errln("Wanted: " + dispName);
+ errln("Got : " + got);
+ }
+
+ Locale shortVariant("fr", "FR", "foo");
+ shortVariant.getDisplayVariant(got);
+
+ if(got != "FOO") {
+ errln("FAIL: getDisplayVariant()");
+ errln("Wanted: foo");
+ errln("Got : " + got);
+ }
+
+ Locale bogusVariant("fr", "FR", "_foo");
+ bogusVariant.getDisplayVariant(got);
+
+ if(got != "FOO") {
+ errln("FAIL: getDisplayVariant()");
+ errln("Wanted: foo");
+ errln("Got : " + got);
+ }
+
+ Locale bogusVariant2("fr", "FR", "foo_");
+ bogusVariant2.getDisplayVariant(got);
+
+ if(got != "FOO") {
+ errln("FAIL: getDisplayVariant()");
+ errln("Wanted: foo");
+ errln("Got : " + got);
+ }
+
+ Locale bogusVariant3("fr", "FR", "_foo_");
+ bogusVariant3.getDisplayVariant(got);
+
+ if(got != "FOO") {
+ errln("FAIL: getDisplayVariant()");
+ errln("Wanted: foo");
+ errln("Got : " + got);
+ }
+}
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * @bug 4105828
+ * Currency symbol in zh is wrong. We will test this at the NumberFormat
+ * end to test the whole pipe.
+ */
+void
+LocaleTest::Test4105828()
+{
+ Locale LOC [] = { Locale::getChinese(), Locale("zh", "CN", ""),
+ Locale("zh", "TW", ""), Locale("zh", "HK", "") };
+ UErrorCode status = U_ZERO_ERROR;
+ for (int32_t i = 0; i < 4; ++i) {
+ NumberFormat *fmt = NumberFormat::createPercentInstance(LOC[i], status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create NumberFormat");
+ return;
+ }
+ UnicodeString result;
+ FieldPosition pos(0);
+ fmt->format((int32_t)1, result, pos);
+ UnicodeString temp;
+ if(result != "100%") {
+ errln(UnicodeString("Percent for ") + LOC[i].getDisplayName(temp) + " should be 100%, got " + result);
+ }
+ delete fmt;
+ }
+}
+
+#endif
+
+// Tests setBogus and isBogus APIs for Locale
+// Jitterbug 1735
+void
+LocaleTest::TestSetIsBogus() {
+ Locale l("en_US");
+ l.setToBogus();
+ if(l.isBogus() != TRUE) {
+ errln("After setting bogus, didn't return TRUE");
+ }
+ l = "en_US"; // This should reset bogus
+ if(l.isBogus() != FALSE) {
+ errln("After resetting bogus, didn't return FALSE");
+ }
+}
+
+
+void
+LocaleTest::TestKeywordVariants(void) {
+ static const struct {
+ const char *localeID;
+ const char *expectedLocaleID;
+ //const char *expectedLocaleIDNoKeywords;
+ //const char *expectedCanonicalID;
+ const char *expectedKeywords[10];
+ int32_t numKeywords;
+ UErrorCode expectedStatus;
+ } testCases[] = {
+ {
+ "de_DE@ currency = euro; C o ll A t i o n = Phonebook ; C alen dar = buddhist ",
+ "de_DE@calendar=buddhist;collation=Phonebook;currency=euro",
+ //"de_DE",
+ //"de_DE@calendar=buddhist;collation=Phonebook;currency=euro",
+ {"calendar", "collation", "currency"},
+ 3,
+ U_ZERO_ERROR
+ },
+ {
+ "de_DE@euro",
+ "de_DE@euro",
+ //"de_DE",
+ //"de_DE@currency=EUR",
+ {"","","","","","",""},
+ 0,
+ U_INVALID_FORMAT_ERROR /* must have '=' after '@' */
+ }
+ };
+ UErrorCode status = U_ZERO_ERROR;
+
+ int32_t i = 0, j = 0;
+ const char *result = NULL;
+ StringEnumeration *keywords;
+ int32_t keyCount = 0;
+ const char *keyword = NULL;
+ const UnicodeString *keywordString;
+ int32_t keywordLen = 0;
+
+ for(i = 0; i < (int32_t)(sizeof(testCases)/sizeof(testCases[0])); i++) {
+ status = U_ZERO_ERROR;
+ Locale l(testCases[i].localeID);
+ keywords = l.createKeywords(status);
+
+ if(status != testCases[i].expectedStatus) {
+ err("Expected to get status %s. Got %s instead\n",
+ u_errorName(testCases[i].expectedStatus), u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ if(keywords) {
+ if((keyCount = keywords->count(status)) != testCases[i].numKeywords) {
+ err("Expected to get %i keywords, got %i\n", testCases[i].numKeywords, keyCount);
+ }
+ if(keyCount) {
+ for(j = 0;;) {
+ if((j&1)==0) {
+ if((keyword = keywords->next(&keywordLen, status)) == NULL) {
+ break;
+ }
+ if(strcmp(keyword, testCases[i].expectedKeywords[j]) != 0) {
+ err("Expected to get keyword value %s, got %s\n", testCases[i].expectedKeywords[j], keyword);
+ }
+ } else {
+ if((keywordString = keywords->snext(status)) == NULL) {
+ break;
+ }
+ if(*keywordString != UnicodeString(testCases[i].expectedKeywords[j], "")) {
+ err("Expected to get keyword UnicodeString %s, got %s\n", testCases[i].expectedKeywords[j], keyword);
+ }
+ }
+ j++;
+
+ if(j == keyCount / 2) {
+ // replace keywords with a clone of itself
+ StringEnumeration *k2 = keywords->clone();
+ if(k2 == NULL || keyCount != k2->count(status)) {
+ errln("KeywordEnumeration.clone() failed");
+ } else {
+ delete keywords;
+ keywords = k2;
+ }
+ }
+ }
+ keywords->reset(status); // Make sure that reset works.
+ for(j = 0;;) {
+ if((keyword = keywords->next(&keywordLen, status)) == NULL) {
+ break;
+ }
+ if(strcmp(keyword, testCases[i].expectedKeywords[j]) != 0) {
+ err("Expected to get keyword value %s, got %s\n", testCases[i].expectedKeywords[j], keyword);
+ }
+ j++;
+ }
+ }
+ delete keywords;
+ }
+ result = l.getName();
+ if(uprv_strcmp(testCases[i].expectedLocaleID, result) != 0) {
+ err("Expected to get \"%s\" from \"%s\". Got \"%s\" instead\n",
+ testCases[i].expectedLocaleID, testCases[i].localeID, result);
+ }
+
+ }
+
+}
+
+void
+LocaleTest::TestKeywordVariantParsing(void) {
+ static const struct {
+ const char *localeID;
+ const char *keyword;
+ const char *expectedValue;
+ } testCases[] = {
+ { "de_DE@ C o ll A t i o n = Phonebook ", "collation", "Phonebook" },
+ { "de_DE", "collation", ""},
+ { "de_DE@collation= PHONEBOOK", "collation", "PHONEBOOK" },
+ { "de_DE@ currency = euro ; CoLLaTion = PHONEBOOk ", "collation", "PHONEBOOk" },
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ int32_t i = 0;
+ int32_t resultLen = 0;
+ char buffer[256];
+
+ for(i = 0; i < (int32_t)(sizeof(testCases)/sizeof(testCases[0])); i++) {
+ *buffer = 0;
+ Locale l(testCases[i].localeID);
+ resultLen = l.getKeywordValue(testCases[i].keyword, buffer, 256, status);
+ if(uprv_strcmp(testCases[i].expectedValue, buffer) != 0) {
+ err("Expected to extract \"%s\" from \"%s\" for keyword \"%s\". Got \"%s\" instead\n",
+ testCases[i].expectedValue, testCases[i].localeID, testCases[i].keyword, buffer);
+ }
+ }
+}
+
+void
+LocaleTest::TestGetBaseName(void) {
+ static const struct {
+ const char *localeID;
+ const char *baseName;
+ } testCases[] = {
+ { "de_DE@ C o ll A t i o n = Phonebook ", "de_DE" },
+ { "de@currency = euro; CoLLaTion = PHONEBOOk", "de" },
+ { "ja@calendar = buddhist", "ja" }
+ };
+
+ int32_t i = 0;
+
+ for(i = 0; i < (int32_t)(sizeof(testCases)/sizeof(testCases[0])); i++) {
+ Locale loc(testCases[i].localeID);
+ if(strcmp(testCases[i].baseName, loc.getBaseName())) {
+ errln("For locale \"%s\" expected baseName \"%s\", but got \"%s\"",
+ testCases[i].localeID, testCases[i].baseName, loc.getBaseName());
+ return;
+ }
+ }
+}
+
+/**
+ * Compare two locale IDs. If they are equal, return 0. If `string'
+ * starts with `prefix' plus an additional element, that is, string ==
+ * prefix + '_' + x, then return 1. Otherwise return a value < 0.
+ */
+static UBool _loccmp(const char* string, const char* prefix) {
+ int32_t slen = (int32_t)strlen(string),
+ plen = (int32_t)strlen(prefix);
+ int32_t c = uprv_strncmp(string, prefix, plen);
+ /* 'root' is "less than" everything */
+ if (uprv_strcmp(prefix, "root") == 0) {
+ return (uprv_strcmp(string, "root") == 0) ? 0 : 1;
+ }
+ if (c) return -1; /* mismatch */
+ if (slen == plen) return 0;
+ if (string[plen] == '_') return 1;
+ return -2; /* false match, e.g. "en_USX" cmp "en_US" */
+}
+
+/**
+ * Check the relationship between requested locales, and report problems.
+ * The caller specifies the expected relationships between requested
+ * and valid (expReqValid) and between valid and actual (expValidActual).
+ * Possible values are:
+ * "gt" strictly greater than, e.g., en_US > en
+ * "ge" greater or equal, e.g., en >= en
+ * "eq" equal, e.g., en == en
+ */
+void LocaleTest::_checklocs(const char* label,
+ const char* req,
+ const Locale& validLoc,
+ const Locale& actualLoc,
+ const char* expReqValid,
+ const char* expValidActual) {
+ const char* valid = validLoc.getName();
+ const char* actual = actualLoc.getName();
+ int32_t reqValid = _loccmp(req, valid);
+ int32_t validActual = _loccmp(valid, actual);
+ if (((0 == uprv_strcmp(expReqValid, "gt") && reqValid > 0) ||
+ (0 == uprv_strcmp(expReqValid, "ge") && reqValid >= 0) ||
+ (0 == uprv_strcmp(expReqValid, "eq") && reqValid == 0)) &&
+ ((0 == uprv_strcmp(expValidActual, "gt") && validActual > 0) ||
+ (0 == uprv_strcmp(expValidActual, "ge") && validActual >= 0) ||
+ (0 == uprv_strcmp(expValidActual, "eq") && validActual == 0))) {
+ logln("%s; req=%s, valid=%s, actual=%s",
+ label, req, valid, actual);
+ } else {
+ errln("FAIL: %s; req=%s, valid=%s, actual=%s. Require (R %s V) and (V %s A)",
+ label, req, valid, actual,
+ expReqValid, expValidActual);
+ }
+}
+
+void LocaleTest::TestGetLocale(void) {
+#if !UCONFIG_NO_SERVICE
+ UErrorCode ec = U_ZERO_ERROR;
+ const char *req;
+ Locale valid, actual, reqLoc;
+
+ // Calendar
+#if !UCONFIG_NO_FORMATTING
+ req = "en_US_BROOKLYN";
+ Calendar* cal = Calendar::createInstance(Locale::createFromName(req), ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Calendar::createInstance failed");
+ } else {
+ valid = cal->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = cal->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Calendar::getLocale() failed");
+ } else {
+ _checklocs("Calendar", req, valid, actual);
+ }
+ /* Make sure that it fails correctly */
+ ec = U_FILE_ACCESS_ERROR;
+ if (cal->getLocale(ULOC_VALID_LOCALE, ec).getName()[0] != 0) {
+ errln("FAIL: Calendar::getLocale() failed to fail correctly. It should have returned \"\"");
+ }
+ ec = U_ZERO_ERROR;
+ }
+ delete cal;
+#endif
+
+ // DecimalFormat, DecimalFormatSymbols
+#if !UCONFIG_NO_FORMATTING
+ req = "fr_FR_NICE";
+ DecimalFormat* dec = (DecimalFormat*)
+ NumberFormat::createInstance(Locale::createFromName(req), ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: NumberFormat::createInstance failed");
+ } else {
+ if (dec->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln("FAIL: NumberFormat::createInstance does not return a DecimalFormat");
+ return;
+ }
+ valid = dec->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = dec->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: DecimalFormat::getLocale() failed");
+ } else {
+ _checklocs("DecimalFormat", req, valid, actual);
+ }
+
+ const DecimalFormatSymbols* sym = dec->getDecimalFormatSymbols();
+ if (sym == NULL) {
+ errln("FAIL: getDecimalFormatSymbols returned NULL");
+ return;
+ }
+ valid = sym->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = sym->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: DecimalFormatSymbols::getLocale() failed");
+ } else {
+ _checklocs("DecimalFormatSymbols", req, valid, actual);
+ }
+ }
+ delete dec;
+#endif
+
+ // DateFormat, DateFormatSymbols
+#if !UCONFIG_NO_FORMATTING
+ req = "de_CH_LUCERNE";
+ SimpleDateFormat* dat = (SimpleDateFormat*)
+ DateFormat::createDateInstance(DateFormat::kDefault,
+ Locale::createFromName(req));
+ if (dat == 0){
+ dataerrln("Error calling DateFormat::createDateInstance()");
+ } else {
+ if (dat->getDynamicClassID() != SimpleDateFormat::getStaticClassID()) {
+ errln("FAIL: NumberFormat::createInstance does not return a DecimalFormat");
+ return;
+ }
+ valid = dat->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = dat->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: SimpleDateFormat::getLocale() failed");
+ } else {
+ _checklocs("SimpleDateFormat", req, valid, actual);
+ }
+
+ const DateFormatSymbols* sym = dat->getDateFormatSymbols();
+ if (sym == NULL) {
+ errln("FAIL: getDateFormatSymbols returned NULL");
+ return;
+ }
+ valid = sym->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = sym->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: DateFormatSymbols::getLocale() failed");
+ } else {
+ _checklocs("DateFormatSymbols", req, valid, actual);
+ }
+ }
+ delete dat;
+#endif
+
+ // BreakIterator
+#if !UCONFIG_NO_BREAK_ITERATION
+ req = "es_ES_BARCELONA";
+ reqLoc = Locale::createFromName(req);
+ BreakIterator* brk = BreakIterator::createWordInstance(reqLoc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::createWordInstance failed");
+ } else {
+ valid = brk->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = brk->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::getLocale() failed");
+ } else {
+ _checklocs("BreakIterator", req, valid, actual);
+ }
+
+ // After registering something, the behavior should be different
+ URegistryKey key = BreakIterator::registerInstance(brk, reqLoc, UBRK_WORD, ec);
+ brk = 0; // registerInstance adopts
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::registerInstance() failed");
+ } else {
+ brk = BreakIterator::createWordInstance(reqLoc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::createWordInstance failed");
+ } else {
+ valid = brk->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = brk->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::getLocale() failed");
+ } else {
+ // N.B.: now expect valid==actual==req
+ _checklocs("BreakIterator(registered)",
+ req, valid, actual, "eq", "eq");
+ }
+ }
+ // No matter what, unregister
+ BreakIterator::unregister(key, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::unregister() failed");
+ }
+ delete brk;
+ brk = 0;
+ }
+
+ // After unregistering, should behave normally again
+ brk = BreakIterator::createWordInstance(reqLoc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::createWordInstance failed");
+ } else {
+ valid = brk->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = brk->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: BreakIterator::getLocale() failed");
+ } else {
+ _checklocs("BreakIterator(unregistered)", req, valid, actual);
+ }
+ }
+ }
+ delete brk;
+#endif
+
+ // Collator
+#if !UCONFIG_NO_COLLATION
+ req = "hi_IN_BHOPAL";
+ reqLoc = Locale::createFromName(req);
+ Collator* coll = Collator::createInstance(reqLoc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::createInstance failed");
+ } else {
+ valid = coll->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = coll->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::getLocale() failed");
+ } else {
+ _checklocs("Collator", req, valid, actual);
+ }
+
+ // After registering something, the behavior should be different
+ URegistryKey key = Collator::registerInstance(coll, reqLoc, ec);
+ coll = 0; // registerInstance adopts
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::registerInstance() failed");
+ } else {
+ coll = Collator::createInstance(reqLoc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::createWordInstance failed");
+ } else {
+ valid = coll->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = coll->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::getLocale() failed");
+ } else {
+ // N.B.: now expect valid==actual==req
+ _checklocs("Collator(registered)",
+ req, valid, actual, "eq", "eq");
+ }
+ }
+ // No matter what, unregister
+ Collator::unregister(key, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::unregister() failed");
+ }
+ delete coll;
+ coll = 0;
+ }
+
+ // After unregistering, should behave normally again
+ coll = Collator::createInstance(reqLoc, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::createInstance failed");
+ } else {
+ valid = coll->getLocale(ULOC_VALID_LOCALE, ec);
+ actual = coll->getLocale(ULOC_ACTUAL_LOCALE, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Collator::getLocale() failed");
+ } else {
+ _checklocs("Collator(unregistered)", req, valid, actual);
+ }
+ }
+ }
+ delete coll;
+#endif
+#endif
+}
+
+void LocaleTest::TestVariantWithOutCountry(void) {
+ Locale loc("en","","POSIX");
+ if (0 != strcmp(loc.getVariant(), "POSIX")) {
+ errln("FAIL: en__POSIX didn't get parsed correctly");
+ }
+ Locale loc2("en","","FOUR");
+ if (0 != strcmp(loc2.getVariant(), "FOUR")) {
+ errln("FAIL: en__FOUR didn't get parsed correctly");
+ }
+ Locale loc3("en","Latn","","FOUR");
+ if (0 != strcmp(loc3.getVariant(), "FOUR")) {
+ errln("FAIL: en_Latn__FOUR didn't get parsed correctly");
+ }
+ Locale loc4("","Latn","","FOUR");
+ if (0 != strcmp(loc4.getVariant(), "FOUR")) {
+ errln("FAIL: _Latn__FOUR didn't get parsed correctly");
+ }
+ Locale loc5("","Latn","US","FOUR");
+ if (0 != strcmp(loc5.getVariant(), "FOUR")) {
+ errln("FAIL: _Latn_US_FOUR didn't get parsed correctly");
+ }
+}
+
+static Locale _canonicalize(int32_t selector, /* 0==createFromName, 1==createCanonical, 2==Locale ct */
+ const char* localeID) {
+ switch (selector) {
+ case 0:
+ return Locale::createFromName(localeID);
+ case 1:
+ return Locale::createCanonical(localeID);
+ case 2:
+ return Locale(localeID);
+ default:
+ return Locale("");
+ }
+}
+
+void LocaleTest::TestCanonicalization(void)
+{
+ static const struct {
+ const char *localeID; /* input */
+ const char *getNameID; /* expected getName() result */
+ const char *canonicalID; /* expected canonicalize() result */
+ } testCases[] = {
+ { "ca_ES_PREEURO-with-extra-stuff-that really doesn't make any sense-unless-you're trying to increase code coverage",
+ "ca_ES_PREEURO_WITH_EXTRA_STUFF_THAT REALLY DOESN'T MAKE ANY SENSE_UNLESS_YOU'RE TRYING TO INCREASE CODE COVERAGE",
+ "ca_ES_PREEURO_WITH_EXTRA_STUFF_THAT REALLY DOESN'T MAKE ANY SENSE_UNLESS_YOU'RE TRYING TO INCREASE CODE COVERAGE"},
+ { "ca_ES_PREEURO", "ca_ES_PREEURO", "ca_ES@currency=ESP" },
+ { "de_AT_PREEURO", "de_AT_PREEURO", "de_AT@currency=ATS" },
+ { "de_DE_PREEURO", "de_DE_PREEURO", "de_DE@currency=DEM" },
+ { "de_LU_PREEURO", "de_LU_PREEURO", "de_LU@currency=LUF" },
+ { "el_GR_PREEURO", "el_GR_PREEURO", "el_GR@currency=GRD" },
+ { "en_BE_PREEURO", "en_BE_PREEURO", "en_BE@currency=BEF" },
+ { "en_IE_PREEURO", "en_IE_PREEURO", "en_IE@currency=IEP" },
+ { "es_ES_PREEURO", "es_ES_PREEURO", "es_ES@currency=ESP" },
+ { "eu_ES_PREEURO", "eu_ES_PREEURO", "eu_ES@currency=ESP" },
+ { "fi_FI_PREEURO", "fi_FI_PREEURO", "fi_FI@currency=FIM" },
+ { "fr_BE_PREEURO", "fr_BE_PREEURO", "fr_BE@currency=BEF" },
+ { "fr_FR_PREEURO", "fr_FR_PREEURO", "fr_FR@currency=FRF" },
+ { "fr_LU_PREEURO", "fr_LU_PREEURO", "fr_LU@currency=LUF" },
+ { "ga_IE_PREEURO", "ga_IE_PREEURO", "ga_IE@currency=IEP" },
+ { "gl_ES_PREEURO", "gl_ES_PREEURO", "gl_ES@currency=ESP" },
+ { "it_IT_PREEURO", "it_IT_PREEURO", "it_IT@currency=ITL" },
+ { "nl_BE_PREEURO", "nl_BE_PREEURO", "nl_BE@currency=BEF" },
+ { "nl_NL_PREEURO", "nl_NL_PREEURO", "nl_NL@currency=NLG" },
+ { "pt_PT_PREEURO", "pt_PT_PREEURO", "pt_PT@currency=PTE" },
+ { "de__PHONEBOOK", "de__PHONEBOOK", "de@collation=phonebook" },
+ { "en_GB_EURO", "en_GB_EURO", "en_GB@currency=EUR" },
+ { "en_GB@EURO", "en_GB@EURO", "en_GB@currency=EUR" }, /* POSIX ID */
+ { "es__TRADITIONAL", "es__TRADITIONAL", "es@collation=traditional" },
+ { "hi__DIRECT", "hi__DIRECT", "hi@collation=direct" },
+ { "ja_JP_TRADITIONAL", "ja_JP_TRADITIONAL", "ja_JP@calendar=japanese" },
+ { "th_TH_TRADITIONAL", "th_TH_TRADITIONAL", "th_TH@calendar=buddhist" },
+ { "zh_TW_STROKE", "zh_TW_STROKE", "zh_Hant_TW@collation=stroke" },
+ { "zh__PINYIN", "zh__PINYIN", "zh@collation=pinyin" },
+ { "zh@collation=pinyin", "zh@collation=pinyin", "zh@collation=pinyin" },
+ { "zh_CN@collation=pinyin", "zh_CN@collation=pinyin", "zh_CN@collation=pinyin" },
+ { "zh_CN_CA@collation=pinyin", "zh_CN_CA@collation=pinyin", "zh_CN_CA@collation=pinyin" },
+ { "en_US_POSIX", "en_US_POSIX", "en_US_POSIX" },
+ { "hy_AM_REVISED", "hy_AM_REVISED", "hy_AM_REVISED" },
+ { "no_NO_NY", "no_NO_NY", "no_NO_NY" /* not: "nn_NO" [alan ICU3.0] */ },
+ { "no@ny", "no@ny", "no__NY" /* not: "nn" [alan ICU3.0] */ }, /* POSIX ID */
+ { "no-no.utf32@B", "no_NO.utf32@B", "no_NO_B" /* not: "nb_NO_B" [alan ICU3.0] */ }, /* POSIX ID */
+ { "qz-qz@Euro", "qz_QZ@Euro", "qz_QZ@currency=EUR" }, /* qz-qz uses private use iso codes */
+ // NOTE: uloc_getName() works on en-BOONT, but Locale() parser considers it BOGUS
+ // TODO: unify this behavior
+ { "en-BOONT", "BOGUS", "en__BOONT" }, /* registered name */
+ { "de-1901", "de_1901", "de__1901" }, /* registered name */
+ { "de-1906", "de_1906", "de__1906" }, /* registered name */
+ { "sr-SP-Cyrl", "sr_SP_CYRL", "sr_Cyrl_CS" }, /* .NET name */
+ { "sr-SP-Latn", "sr_SP_LATN", "sr_Latn_CS" }, /* .NET name */
+ { "sr_YU_CYRILLIC", "sr_YU_CYRILLIC", "sr_Cyrl_CS" }, /* Linux name */
+ { "uz-UZ-Cyrl", "uz_UZ_CYRL", "uz_Cyrl_UZ" }, /* .NET name */
+ { "uz-UZ-Latn", "uz_UZ_LATN", "uz_Latn_UZ" }, /* .NET name */
+ { "zh-CHS", "zh_CHS", "zh_Hans" }, /* .NET name */
+ { "zh-CHT", "zh_CHT", "zh_Hant" }, /* .NET name This may change back to zh_Hant */
+
+ /* posix behavior that used to be performed by getName */
+ { "mr.utf8", "mr.utf8", "mr" },
+ { "de-tv.koi8r", "de_TV.koi8r", "de_TV" },
+ { "x-piglatin_ML.MBE", "x-piglatin_ML.MBE", "x-piglatin_ML" },
+ { "i-cherokee_US.utf7", "i-cherokee_US.utf7", "i-cherokee_US" },
+ { "x-filfli_MT_FILFLA.gb-18030", "x-filfli_MT_FILFLA.gb-18030", "x-filfli_MT_FILFLA" },
+ { "no-no-ny.utf8@B", "no_NO_NY.utf8@B", "no_NO_NY_B" /* not: "nn_NO" [alan ICU3.0] */ }, /* @ ignored unless variant is empty */
+
+ /* fleshing out canonicalization */
+ /* trim space and sort keywords, ';' is separator so not present at end in canonical form */
+ { "en_Hant_IL_VALLEY_GIRL@ currency = EUR; calendar = Japanese ;", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR" },
+ /* already-canonical ids are not changed */
+ { "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR", "en_Hant_IL_VALLEY_GIRL@calendar=Japanese;currency=EUR" },
+ /* PRE_EURO and EURO conversions don't affect other keywords */
+ { "es_ES_PREEURO@CALendar=Japanese", "es_ES_PREEURO@calendar=Japanese", "es_ES@calendar=Japanese;currency=ESP" },
+ { "es_ES_EURO@SHOUT=zipeedeedoodah", "es_ES_EURO@shout=zipeedeedoodah", "es_ES@currency=EUR;shout=zipeedeedoodah" },
+ /* currency keyword overrides PRE_EURO and EURO currency */
+ { "es_ES_PREEURO@currency=EUR", "es_ES_PREEURO@currency=EUR", "es_ES@currency=EUR" },
+ { "es_ES_EURO@currency=ESP", "es_ES_EURO@currency=ESP", "es_ES@currency=ESP" },
+ /* norwegian is just too weird, if we handle things in their full generality */
+ { "no-Hant-GB_NY@currency=$$$", "no_Hant_GB_NY@currency=$$$", "no_Hant_GB_NY@currency=$$$" /* not: "nn_Hant_GB@currency=$$$" [alan ICU3.0] */ },
+
+ /* test cases reflecting internal resource bundle usage */
+ { "root@kw=foo", "root@kw=foo", "root@kw=foo" },
+ { "@calendar=gregorian", "@calendar=gregorian", "@calendar=gregorian" },
+ { "ja_JP@calendar=Japanese", "ja_JP@calendar=Japanese", "ja_JP@calendar=Japanese" }
+ };
+
+ static const char* label[] = { "createFromName", "createCanonical", "Locale" };
+
+ int32_t i, j;
+
+ for (i=0; i < (int)(sizeof(testCases)/sizeof(testCases[0])); i++) {
+ for (j=0; j<3; ++j) {
+ const char* expected = (j==1) ? testCases[i].canonicalID : testCases[i].getNameID;
+ Locale loc = _canonicalize(j, testCases[i].localeID);
+ const char* getName = loc.isBogus() ? "BOGUS" : loc.getName();
+ if(uprv_strcmp(expected, getName) != 0) {
+ errln("FAIL: %s(%s).getName() => \"%s\", expected \"%s\"",
+ label[j], testCases[i].localeID, getName, expected);
+ } else {
+ logln("Ok: %s(%s) => \"%s\"",
+ label[j], testCases[i].localeID, getName);
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/loctest.h b/Build/source/libs/icu/icu-xetex/test/intltest/loctest.h
new file mode 100644
index 00000000000..c01d15ecb25
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/loctest.h
@@ -0,0 +1,167 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "intltest.h"
+#include "unicode/locid.h"
+
+/**
+ * Tests for the Locale class
+ **/
+class LocaleTest: public IntlTest {
+public:
+ LocaleTest();
+ virtual ~LocaleTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * Test methods to set and get data fields
+ **/
+ void TestBasicGetters(void);
+ /**
+ * Test methods to set and get data fields
+ **/
+ void TestParallelAPIValues(void);
+ /**
+ * Use Locale to access Resource file data and compare against expected values
+ **/
+ void TestSimpleResourceInfo(void);
+ /**
+ * Use Locale to access Resource file display names and compare against expected values
+ **/
+ void TestDisplayNames(void);
+ /**
+ * Test methods for basic object behaviour
+ **/
+ void TestSimpleObjectStuff(void);
+ /**
+ * Test methods for POSIX parsing behavior
+ **/
+ void TestPOSIXParsing(void);
+ /**
+ * Test Locale::getAvailableLocales
+ **/
+ void TestGetAvailableLocales(void);
+ /**
+ * Test methods to set and access a custom data directory
+ **/
+ void TestDataDirectory(void);
+
+ void TestISO3Fallback(void);
+ void TestGetLangsAndCountries(void);
+ void TestSimpleDisplayNames(void);
+ void TestUninstalledISO3Names(void);
+ void TestAtypicalLocales(void);
+#if !UCONFIG_NO_FORMATTING
+ void TestThaiCurrencyFormat(void);
+ void TestEuroSupport(void);
+#endif
+ void TestToString(void);
+#if !UCONFIG_NO_FORMATTING
+ void Test4139940(void);
+ void Test4143951(void);
+#endif
+ void Test4147315(void);
+ void Test4147317(void);
+ void Test4147552(void);
+
+ void TestVariantParsing(void);
+
+ /* Test getting keyword enumeratin */
+ void TestKeywordVariants(void);
+
+ /* Test getting keyword values */
+ void TestKeywordVariantParsing(void);
+
+ /* Test getting the locale base name */
+ void TestGetBaseName(void);
+
+#if !UCONFIG_NO_FORMATTING
+ void Test4105828(void) ;
+#endif
+
+ void TestSetIsBogus(void);
+
+ void TestGetLocale(void);
+
+ void TestVariantWithOutCountry(void);
+
+ void TestCanonicalization(void);
+
+#if !UCONFIG_NO_FORMATTING
+ static UDate date(int32_t y, int32_t m, int32_t d, int32_t hr = 0, int32_t min = 0, int32_t sec = 0);
+#endif
+
+private:
+ void _checklocs(const char* label,
+ const char* req,
+ const Locale& validLoc,
+ const Locale& actualLoc,
+ const char* expReqValid="gt",
+ const char* expValidActual="ge");
+
+ /**
+ * routine to perform subtests, used by TestDisplayNames
+ **/
+ void doTestDisplayNames(Locale& inLocale, int32_t compareIndex);
+ /**
+ * additional intialization for datatables storing expected values
+ **/
+ void setUpDataTable(void);
+
+ UnicodeString** dataTable;
+
+ enum {
+ ENGLISH = 0,
+ FRENCH = 1,
+ CROATIAN = 2,
+ GREEK = 3,
+ NORWEGIAN = 4,
+ ITALIAN = 5,
+ XX = 6,
+ CHINESE = 7,
+ MAX_LOCALES = 7
+ };
+
+ enum {
+ LANG = 0,
+ SCRIPT,
+ CTRY,
+ VAR,
+ NAME,
+ LANG3,
+ CTRY3,
+ LCID,
+ DLANG_EN,
+ DSCRIPT_EN,
+ DCTRY_EN,
+ DVAR_EN,
+ DNAME_EN,
+ DLANG_FR,
+ DSCRIPT_FR,
+ DCTRY_FR,
+ DVAR_FR,
+ DNAME_FR,
+ DLANG_CA,
+ DSCRIPT_CA,
+ DCTRY_CA,
+ DVAR_CA,
+ DNAME_CA,
+ DLANG_EL,
+ DSCRIPT_EL,
+ DCTRY_EL,
+ DVAR_EL,
+ DNAME_EL,
+ DLANG_NO,
+ DSCRIPT_NO,
+ DCTRY_NO,
+ DVAR_NO,
+ DNAME_NO
+ };
+};
+
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.cpp
new file mode 100644
index 00000000000..36b9357a96b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.cpp
@@ -0,0 +1,378 @@
+/***********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "miscdtfm.h"
+
+#include "unicode/format.h"
+#include "unicode/decimfmt.h"
+#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/dtfmtsym.h"
+#include "unicode/locid.h"
+#include "unicode/msgfmt.h"
+#include "unicode/numfmt.h"
+#include "unicode/choicfmt.h"
+#include "unicode/gregocal.h"
+
+// *****************************************************************************
+// class DateFormatMiscTests
+// *****************************************************************************
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+void
+DateFormatMiscTests::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite DateFormatMiscTests");
+ switch (index) {
+ CASE(0, test4097450)
+ CASE(1, test4099975)
+ CASE(2, test4117335)
+
+ default: name = ""; break;
+ }
+}
+
+UBool
+DateFormatMiscTests::failure(UErrorCode status, const char* msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/*
+ * @bug 4097450
+ */
+void
+DateFormatMiscTests::test4097450()
+{
+ //
+ // Date parse requiring 4 digit year.
+ //
+ UnicodeString dstring [] = {
+ UnicodeString("97"),
+ UnicodeString("1997"),
+ UnicodeString("97"),
+ UnicodeString("1997"),
+ UnicodeString("01"),
+ UnicodeString("2001"),
+ UnicodeString("01"),
+ UnicodeString("2001"),
+ UnicodeString("1"),
+ UnicodeString("1"),
+ UnicodeString("11"),
+ UnicodeString("11"),
+ UnicodeString("111"),
+ UnicodeString("111")
+ };
+
+ UnicodeString dformat [] = {
+ UnicodeString("yy"),
+ UnicodeString("yy"),
+ UnicodeString("yyyy"),
+ UnicodeString("yyyy"),
+ UnicodeString("yy"),
+ UnicodeString("yy"),
+ UnicodeString("yyyy"),
+ UnicodeString("yyyy"),
+ UnicodeString("yy"),
+ UnicodeString("yyyy"),
+ UnicodeString("yy"),
+ UnicodeString("yyyy"),
+ UnicodeString("yy"),
+ UnicodeString("yyyy")
+ };
+
+/* UBool dresult [] = {
+ TRUE,
+ FALSE,
+ FALSE,
+ TRUE,
+ TRUE,
+ FALSE,
+ FALSE,
+ TRUE,
+ FALSE,
+ FALSE,
+ TRUE,
+ FALSE,
+ FALSE,
+ FALSE
+ };*/
+
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *formatter;
+ SimpleDateFormat *resultFormatter = new SimpleDateFormat((UnicodeString)"yyyy", status);
+ failure(status, "new SimpleDateFormat");
+
+ logln("Format\tSource\tResult");
+ logln("-------\t-------\t-------");
+ for (int i = 0; i < 14/*dstring.length*/; i++)
+ {
+ log(dformat[i] + "\t" + dstring[i] + "\t");
+ formatter = new SimpleDateFormat(dformat[i], status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ //try {
+ UnicodeString str;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ logln(resultFormatter->format(formatter->parse(dstring[i], status), str, pos));
+ failure(status, "resultFormatter->format");
+ //if ( !dresult[i] ) System.out.print(" <-- error!");
+ /*}
+ catch (ParseException exception) {
+ //if ( dresult[i] ) System.out.print(" <-- error!");
+ System.out.print("exception --> " + exception);
+ }*/
+ delete formatter;
+ logln();
+ }
+
+ delete resultFormatter;
+}
+
+/*
+ * @bug 4099975
+ */
+void
+DateFormatMiscTests::test4099975()
+{
+ /**
+ * Test Constructor SimpleDateFormat::SimpleDateFormat (const UnicodeString & pattern,
+ * const DateFormatSymbols & formatData, UErrorCode & status )
+ * The DateFormatSymbols object is NOT adopted; Modifying the original DateFormatSymbols
+ * should not change the SimpleDateFormat's behavior.
+ */
+ UDate d = Calendar::getNow();
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status);
+ if(failure(status, "new DateFormatSymbols")) return;
+ SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), *symbols, status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ UnicodeString format0;
+ format0 = df->format(d, format0);
+ UnicodeString localizedPattern0;
+ localizedPattern0 = df->toLocalizedPattern(localizedPattern0, status);
+ failure(status, "df->toLocalizedPattern");
+ symbols->setLocalPatternChars(UnicodeString("abcdefghijklmonpqr")); // change value of field
+ UnicodeString format1;
+ format1 = df->format(d, format1);
+ if (format0 != format1) {
+ errln(UnicodeString("Formats are different. format0: ") + format0
+ + UnicodeString("; format1: ") + format1);
+ }
+ UnicodeString localizedPattern1;
+ localizedPattern1 = df->toLocalizedPattern(localizedPattern1, status);
+ failure(status, "df->toLocalizedPattern");
+ if (localizedPattern0 != localizedPattern1) {
+ errln(UnicodeString("Pattern has been changed. localizedPattern0: ") + localizedPattern0
+ + UnicodeString("; localizedPattern1: ") + localizedPattern1);
+ }
+ delete symbols;
+ delete df;
+ }
+ /*
+ * Test void SimpleDateFormat::setDateFormatSymbols ( const DateFormatSymbols & newFormatSymbols )
+ * Modifying the original DateFormatSymbols should not change the SimpleDateFormat's behavior.
+ */
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status);
+ if(failure(status, "new DateFormatSymbols")) return;
+ SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ df->setDateFormatSymbols(*symbols);
+ UnicodeString format0;
+ format0 = df->format(d, format0);
+ UnicodeString localizedPattern0;
+ localizedPattern0 = df->toLocalizedPattern(localizedPattern0, status);
+ failure(status, "df->toLocalizedPattern");
+ symbols->setLocalPatternChars(UnicodeString("abcdefghijklmonpqr")); // change value of field
+ UnicodeString format1;
+ format1 = df->format(d, format1);
+ if (format0 != format1) {
+ errln(UnicodeString("Formats are different. format0: ") + format0
+ + UnicodeString("; format1: ") + format1);
+ }
+ UnicodeString localizedPattern1;
+ localizedPattern1 = df->toLocalizedPattern(localizedPattern1, status);
+ failure(status, "df->toLocalizedPattern");
+ if (localizedPattern0 != localizedPattern1) {
+ errln(UnicodeString("Pattern has been changed. localizedPattern0: ") + localizedPattern0
+ + UnicodeString("; localizedPattern1: ") + localizedPattern1);
+ }
+ delete symbols;
+ delete df;
+
+ }
+ //Test the pointer version of the constructor (and the adoptDateFormatSymbols method)
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status);
+ if(failure(status, "new DateFormatSymbols")) return;
+ SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), symbols, status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ UnicodeString format0;
+ format0 = df->format(d, format0);
+ UnicodeString localizedPattern0;
+ localizedPattern0 = df->toLocalizedPattern(localizedPattern0, status);
+ failure(status, "df->toLocalizedPattern");
+ symbols->setLocalPatternChars(UnicodeString("abcdefghijklmonpqr")); // change value of field
+ UnicodeString format1;
+ format1 = df->format(d, format1);
+ if (format0 != format1) {
+ errln(UnicodeString("Formats are different. format0: ") + format0
+ + UnicodeString("; format1: ") + format1);
+ }
+ UnicodeString localizedPattern1;
+ localizedPattern1 = df->toLocalizedPattern(localizedPattern1, status);
+ failure(status, "df->toLocalizedPattern");
+ if (localizedPattern0 == localizedPattern1) {
+ errln(UnicodeString("Pattern should have been changed. localizedPattern0: ") + localizedPattern0
+ + UnicodeString("; localizedPattern1: ") + localizedPattern1);
+ }
+ //delete symbols; the caller is no longer responsible for deleting the symbols
+ delete df;
+ }
+ //
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status);
+ failure(status, "new DateFormatSymbols");
+ SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), status);
+ if(failure(status, "new SimpleDateFormat")) return;
+ df-> adoptDateFormatSymbols(symbols);
+ UnicodeString format0;
+ format0 = df->format(d, format0);
+ UnicodeString localizedPattern0;
+ localizedPattern0 = df->toLocalizedPattern(localizedPattern0, status);
+ failure(status, "df->toLocalizedPattern");
+ symbols->setLocalPatternChars(UnicodeString("abcdefghijklmonpqr")); // change value of field
+ UnicodeString format1;
+ format1 = df->format(d, format1);
+ if (format0 != format1) {
+ errln(UnicodeString("Formats are different. format0: ") + format0
+ + UnicodeString("; format1: ") + format1);
+ }
+ UnicodeString localizedPattern1;
+ localizedPattern1 = df->toLocalizedPattern(localizedPattern1, status);
+ failure(status, "df->toLocalizedPattern");
+ if (localizedPattern0 == localizedPattern1) {
+ errln(UnicodeString("Pattern should have been changed. localizedPattern0: ") + localizedPattern0
+ + UnicodeString("; localizedPattern1: ") + localizedPattern1);
+ }
+ //delete symbols; the caller is no longer responsible for deleting the symbols
+ delete df;
+ }
+}
+
+/*
+ * @test @(#)bug4117335.java 1.1 3/5/98
+ *
+ * @bug 4117335
+ */
+void
+DateFormatMiscTests::test4117335()
+{
+ //UnicodeString bc = "\u7d00\u5143\u524d";
+ UChar bcC [] = {
+ 0x7D00,
+ 0x5143,
+ 0x524D
+ };
+ UnicodeString bc(bcC, 3, 3);
+
+ //UnicodeString ad = "\u897f\u66a6";
+ UChar adC [] = {
+ 0x897F,
+ 0x66A6
+ };
+ UnicodeString ad(adC, 2, 2);
+
+ //UnicodeString jstLong = "\u65e5\u672c\u6a19\u6e96\u6642";
+ UChar jstLongC [] = {
+ 0x65e5,
+ 0x672c,
+ 0x6a19,
+ 0x6e96,
+ 0x6642
+ };
+ UChar jdtLongC [] = {0x65E5, 0x672C, 0x590F, 0x6642, 0x9593};
+
+ UnicodeString jstLong(jstLongC, 5, 5);
+
+ UnicodeString jstShort = "JST";
+
+ UnicodeString tzID = "Asia/Tokyo";
+
+ UnicodeString jdtLong(jdtLongC, 5, 5);
+
+ UnicodeString jdtShort = "JDT";
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormatSymbols *symbols = new DateFormatSymbols(Locale::getJapan(), status);
+ if(U_FAILURE(status)) {
+ errln("Failure creating DateFormatSymbols, %s", u_errorName(status));
+ delete symbols;
+ return;
+ }
+ failure(status, "new DateFormatSymbols");
+ int32_t eraCount = 0;
+ const UnicodeString *eras = symbols->getEras(eraCount);
+
+ logln(UnicodeString("BC = ") + eras[0]);
+ if (eras[0] != bc) {
+ errln("*** Should have been " + bc);
+ //throw new Exception("Error in BC");
+ }
+
+ logln(UnicodeString("AD = ") + eras[1]);
+ if (eras[1] != ad) {
+ errln("*** Should have been " + ad);
+ //throw new Exception("Error in AD");
+ }
+
+ int32_t rowCount, colCount;
+ const UnicodeString **zones = symbols->getZoneStrings(rowCount, colCount);
+ //don't hard code the index .. compute it.
+ int32_t index = -1;
+ for (int32_t i = 0; i < rowCount; ++i) {
+ if (tzID == (zones[i][0])) {
+ index = i;
+ break;
+ }
+ }
+ logln(UnicodeString("Long zone name = ") + zones[index][1]);
+ if (zones[index][1] != jstLong) {
+ errln("*** Should have been " + prettify(jstLong)+ " but it is: " + prettify(zones[index][1]));
+ //throw new Exception("Error in long TZ name");
+ }
+ logln(UnicodeString("Short zone name = ") + zones[index][2]);
+ if (zones[index][2] != jstShort) {
+ errln("*** Should have been " + prettify(jstShort) + " but it is: " + prettify(zones[index][2]));
+ //throw new Exception("Error in short TZ name");
+ }
+ logln(UnicodeString("Long zone name = ") + zones[index][3]);
+ if (zones[index][3] != jdtLong) {
+ errln("*** Should have been " + prettify(jstLong) + " but it is: " + prettify(zones[index][3]));
+ //throw new Exception("Error in long TZ name");
+ }
+ logln(UnicodeString("SHORT zone name = ") + zones[index][4]);
+ if (zones[index][4] != jdtShort) {
+ errln("*** Should have been " + prettify(jstShort)+ " but it is: " + prettify(zones[index][4]));
+ //throw new Exception("Error in short TZ name");
+ }
+ delete symbols;
+
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.h b/Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.h
new file mode 100644
index 00000000000..992e89a71aa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/miscdtfm.h
@@ -0,0 +1,37 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _DATEFORMATMISCTEST_
+#define _DATEFORMATMISCTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+/**
+ * Performs miscellaneous tests for DateFormat, SimpleDateFormat, DateFormatSymbols
+ **/
+class DateFormatMiscTests : public IntlTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+ void test4097450(void);
+ void test4099975(void);
+ void test4117335(void);
+
+protected:
+ UBool failure(UErrorCode status, const char* msg);
+
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _DATEFORMATMISCTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.cpp
new file mode 100644
index 00000000000..ce26669a91a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.cpp
@@ -0,0 +1,269 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "mnkytst.h"
+#include "sfwdchit.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+#ifndef MIN
+#define MIN(x,y) ((x) < (y) ? (x) : (y))
+#endif
+
+#ifndef MAX
+#define MAX(x,y) ((x) > (y) ? (x) : (y))
+#endif
+
+CollationMonkeyTest::CollationMonkeyTest()
+: source("-abcdefghijklmnopqrstuvwxyz#&^$@", ""),
+ myCollator(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollator = Collator::createInstance("en_US", status);
+}
+
+CollationMonkeyTest::~CollationMonkeyTest()
+{
+ delete myCollator;
+}
+
+
+void
+CollationMonkeyTest::report(UnicodeString& s, UnicodeString& t, int32_t result, int32_t revResult)
+{
+ if (revResult != -result)
+ {
+ UnicodeString msg;
+
+ msg += s;
+ msg += " and ";
+ msg += t;
+ msg += " round trip comparison failed";
+ msg += (UnicodeString) " (result " + result + ", reverse Result " + revResult + ")";
+
+ errln(msg);
+ }
+}
+
+int32_t
+CollationMonkeyTest::checkValue(int32_t value)
+{
+ if (value < 0)
+ {
+ return -value;
+ }
+
+ return value;
+}
+
+void CollationMonkeyTest::TestCollationKey(/* char* par */)
+{
+ if(source.length() == 0) {
+ errln(UNICODE_STRING("CollationMonkeyTest::TestCollationKey(): source is empty - ICU_DATA not set or data missing?", 92));
+ return;
+ }
+
+ srand( (unsigned)time( NULL ) );
+ int32_t s = checkValue(rand() % source.length());
+ int32_t t = checkValue(rand() % source.length());
+ int32_t slen = checkValue((rand() - source.length()) % source.length());
+ int32_t tlen = checkValue((rand() - source.length()) % source.length());
+ UnicodeString subs, subt;
+
+ source.extract(MIN(s, slen), MAX(s, slen), subs);
+ source.extract(MIN(t, tlen), MAX(t, tlen), subt);
+
+ CollationKey collationKey1, collationKey2;
+ UErrorCode status1 = U_ZERO_ERROR, status2= U_ZERO_ERROR;
+
+ myCollator->setStrength(Collator::TERTIARY);
+ myCollator->getCollationKey(subs, collationKey1, status1);
+ myCollator->getCollationKey(subt, collationKey2, status2);
+ int32_t result = collationKey1.compareTo(collationKey2); // Tertiary
+ int32_t revResult = collationKey2.compareTo(collationKey1); // Tertiary
+ report( subs, subt, result, revResult);
+
+ myCollator->setStrength(Collator::SECONDARY);
+ myCollator->getCollationKey(subs, collationKey1, status1);
+ myCollator->getCollationKey(subt, collationKey2, status2);
+ result = collationKey1.compareTo(collationKey2); // Secondary
+ revResult = collationKey2.compareTo(collationKey1); // Secondary
+ report( subs, subt, result, revResult);
+
+ myCollator->setStrength(Collator::PRIMARY);
+ myCollator->getCollationKey(subs, collationKey1, status1);
+ myCollator->getCollationKey(subt, collationKey2, status2);
+ result = collationKey1.compareTo(collationKey2); // Primary
+ revResult = collationKey2.compareTo(collationKey1); // Primary
+ report(subs, subt, result, revResult);
+
+ UnicodeString msg;
+ UnicodeString addOne(subs);
+ addOne += (UChar32)0xE000;
+
+ myCollator->getCollationKey(subs, collationKey1, status1);
+ myCollator->getCollationKey(addOne, collationKey2, status2);
+ result = collationKey1.compareTo(collationKey2);
+ if (result != -1)
+ {
+ msg += "CollationKey(";
+ msg += subs;
+ msg += ") .LT. CollationKey(";
+ msg += addOne;
+ msg += ") Failed.";
+ errln(msg);
+ }
+
+ msg.remove();
+ result = collationKey2.compareTo(collationKey1);
+ if (result != 1)
+ {
+ msg += "CollationKey(";
+ msg += addOne;
+ msg += ") .GT. CollationKey(";
+ msg += subs;
+ msg += ") Failed.";
+ errln(msg);
+ }
+}
+
+void
+CollationMonkeyTest::TestCompare(/* char* par */)
+{
+ if(source.length() == 0) {
+ errln(UNICODE_STRING("CollationMonkeyTest::TestCompare(): source is empty - ICU_DATA not set or data missing?", 87));
+ return;
+ }
+
+ /* Seed the random-number generator with current time so that
+ * the numbers will be different every time we run.
+ */
+ srand( (unsigned)time( NULL ) );
+ int32_t s = checkValue(rand() % source.length());
+ int32_t t = checkValue(rand() % source.length());
+ int32_t slen = checkValue((rand() - source.length()) % source.length());
+ int32_t tlen = checkValue((rand() - source.length()) % source.length());
+ UnicodeString subs, subt;
+
+ source.extract(MIN(s, slen), MAX(s, slen), subs);
+ source.extract(MIN(t, tlen), MAX(t, tlen), subt);
+
+ myCollator->setStrength(Collator::TERTIARY);
+ int32_t result = myCollator->compare(subs, subt); // Tertiary
+ int32_t revResult = myCollator->compare(subt, subs); // Tertiary
+ report(subs, subt, result, revResult);
+
+ myCollator->setStrength(Collator::SECONDARY);
+ result = myCollator->compare(subs, subt); // Secondary
+ revResult = myCollator->compare(subt, subs); // Secondary
+ report(subs, subt, result, revResult);
+
+ myCollator->setStrength(Collator::PRIMARY);
+ result = myCollator->compare(subs, subt); // Primary
+ revResult = myCollator->compare(subt, subs); // Primary
+ report(subs, subt, result, revResult);
+
+ UnicodeString msg;
+ UnicodeString addOne(subs);
+ addOne += (UChar32)0xE000;
+
+ result = myCollator->compare(subs, addOne);
+ if (result != -1)
+ {
+ msg += "Test : ";
+ msg += subs;
+ msg += " .LT. ";
+ msg += addOne;
+ msg += " Failed.";
+ errln(msg);
+ }
+
+ msg.remove();
+ result = myCollator->compare(addOne, subs);
+ if (result != 1)
+ {
+ msg += "Test : ";
+ msg += addOne;
+ msg += " .GT. ";
+ msg += subs;
+ msg += " Failed.";
+ errln(msg);
+ }
+}
+void CollationMonkeyTest::TestRules(/* char* par */){
+ UChar testSourceCases[][10] = {
+ {0x0061, 0x0062, 0x007a, 0},
+ {0x0061, 0x0062, 0x007a, 0},
+ };
+
+ UChar testTargetCases[][10] = {
+ {0x0061, 0x0062, 0x00e4, 0},
+ {0x0061, 0x0062, 0x0061, 0x0308, 0},
+ };
+
+ int i=0;
+ logln("Demo Test 1 : Create a new table collation with rules \"& z < 0x00e4\"");
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *col = Collator::createInstance("en_US", status);
+ const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules();
+ UnicodeString newRules(" & z < ");
+ newRules.append((UChar)0x00e4);
+ newRules.insert(0, baseRules);
+ RuleBasedCollator *myCollation = new RuleBasedCollator(newRules, status);
+ if (U_FAILURE(status)) {
+ errln( "Demo Test 1 Table Collation object creation failed.");
+ return;
+ }
+ for(i=0; i<2; i++){
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], Collator::LESS);
+ }
+ delete myCollation;
+
+ logln("Demo Test 2 : Create a new table collation with rules \"& z < a 0x0308\"");
+ newRules.remove();
+ newRules.append(" & z < a");
+ newRules.append((UChar)0x0308);
+ newRules.insert(0, baseRules);
+ myCollation = new RuleBasedCollator(newRules, status);
+ if (U_FAILURE(status)) {
+ errln( "Demo Test 1 Table Collation object creation failed.");
+ return;
+ }
+ for(i=0; i<2; i++){
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], Collator::LESS);
+ }
+ delete myCollation;
+ delete col;
+
+}
+
+void CollationMonkeyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationMonkeyTest: ");
+ if(myCollator) {
+ switch (index) {
+ case 0: name = "TestCompare"; if (exec) TestCompare(/* par */); break;
+ case 1: name = "TestCollationKey"; if (exec) TestCollationKey(/* par */); break;
+ case 2: name = "TestRules"; if (exec) TestRules(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ errln("Class collator not instantiated");
+ name = "";
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.h b/Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.h
new file mode 100644
index 00000000000..e13c497cb20
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/mnkytst.h
@@ -0,0 +1,54 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationMonkeyTest is a third level test class. This tests the random
+ * substrings of the default test strings to verify if the compare and
+ * sort key algorithm works correctly. For example, any string is always
+ * less than the string itself appended with any character.
+ */
+
+#ifndef _MNKYTST
+#define _MNKYTST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationMonkeyTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationMonkeyTest();
+ virtual ~CollationMonkeyTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // utility function used in tests, returns absolute value
+ int32_t checkValue(int32_t value);
+
+ // perform monkey tests using Collator::compare
+ void TestCompare(/* char* par */);
+
+ // perform monkey tests using CollationKey::compareTo
+ void TestCollationKey(/* char* par */);
+
+ void TestRules(/* char* par */);
+
+private:
+ void report(UnicodeString& s, UnicodeString& t, int32_t result, int32_t revResult);
+
+ const UnicodeString source;
+
+ Collator *myCollator;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.cpp
new file mode 100644
index 00000000000..97465a09be7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.cpp
@@ -0,0 +1,966 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "msfmrgts.h"
+
+#include "unicode/format.h"
+#include "unicode/decimfmt.h"
+#include "unicode/locid.h"
+#include "unicode/msgfmt.h"
+#include "unicode/numfmt.h"
+#include "unicode/choicfmt.h"
+#include "unicode/gregocal.h"
+#include "putilimp.h"
+
+// *****************************************************************************
+// class MessageFormatRegressionTest
+// *****************************************************************************
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+void
+MessageFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite MessageFormatRegressionTest");
+ switch (index) {
+ CASE(0,Test4074764)
+ CASE(1,Test4058973)
+ CASE(2,Test4031438)
+ CASE(3,Test4052223)
+ CASE(4,Test4104976)
+ CASE(5,Test4106659)
+ CASE(6,Test4106660)
+ CASE(7,Test4111739)
+ CASE(8,Test4114743)
+ CASE(9,Test4116444)
+ CASE(10,Test4114739)
+ CASE(11,Test4113018)
+ CASE(12,Test4106661)
+ CASE(13,Test4094906)
+ CASE(14,Test4118592)
+ CASE(15,Test4118594)
+ CASE(16,Test4105380)
+ CASE(17,Test4120552)
+ CASE(18,Test4142938)
+ CASE(19,TestChoicePatternQuote)
+ CASE(20,Test4112104)
+
+ default: name = ""; break;
+ }
+}
+
+UBool
+MessageFormatRegressionTest::failure(UErrorCode status, const char* msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* @bug 4074764
+ * Null exception when formatting pattern with MessageFormat
+ * with no parameters.
+ */
+void MessageFormatRegressionTest::Test4074764() {
+ UnicodeString pattern [] = {
+ "Message without param",
+ "Message with param:{0}",
+ "Longer Message with param {0}"
+ };
+ //difference between the two param strings are that
+ //in the first one, the param position is within the
+ //length of the string without param while it is not so
+ //in the other case.
+
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *messageFormatter = new MessageFormat("", status);
+
+ failure(status, "couldn't create MessageFormat");
+
+ //try {
+ //Apply pattern with param and print the result
+ messageFormatter->applyPattern(pattern[1], status);
+ failure(status, "messageFormat->applyPattern");
+ //Object[] params = {new UnicodeString("BUG"), new Date()};
+ Formattable params [] = {
+ Formattable(UnicodeString("BUG")),
+ Formattable(0, Formattable::kIsDate)
+ };
+ UnicodeString tempBuffer;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ tempBuffer = messageFormatter->format(params, 2, tempBuffer, pos, status);
+ if( tempBuffer != "Message with param:BUG" || failure(status, "messageFormat->format"))
+ errln("MessageFormat with one param test failed.");
+ logln("Formatted with one extra param : " + tempBuffer);
+
+ //Apply pattern without param and print the result
+ messageFormatter->applyPattern(pattern[0], status);
+ failure(status, "messageFormatter->applyPattern");
+
+ // {sfb} how much does this apply in C++?
+ // do we want to verify that the Formattable* array is not NULL,
+ // or is that the user's responsibility?
+ // additionally, what should be the item count?
+ // for bug testing purposes, assume that something was set to
+ // NULL by mistake, and that the length should be non-zero
+
+ //tempBuffer = messageFormatter->format(NULL, 1, tempBuffer, FieldPosition(FieldPosition::DONT_CARE), status);
+ tempBuffer.remove();
+ tempBuffer = messageFormatter->format(NULL, 0, tempBuffer, pos, status);
+
+ if( tempBuffer != "Message without param" || failure(status, "messageFormat->format"))
+ errln("MessageFormat with no param test failed.");
+ logln("Formatted with no params : " + tempBuffer);
+
+ tempBuffer.remove();
+ tempBuffer = messageFormatter->format(params, 2, tempBuffer, pos, status);
+ if (tempBuffer != "Message without param" || failure(status, "messageFormat->format"))
+ errln("Formatted with arguments > subsitution failed. result = " + tempBuffer);
+ logln("Formatted with extra params : " + tempBuffer);
+ //This statement gives an exception while formatting...
+ //If we use pattern[1] for the message with param,
+ //we get an NullPointerException in MessageFormat.java(617)
+ //If we use pattern[2] for the message with param,
+ //we get an StringArrayIndexOutOfBoundsException in MessageFormat.java(614)
+ //Both are due to maxOffset not being reset to -1
+ //in applyPattern() when the pattern does not
+ //contain any param.
+ /*} catch (Exception foo) {
+ errln("Exception when formatting with no params.");
+ }*/
+
+ delete messageFormatter;
+}
+
+/* @bug 4058973
+ * MessageFormat.toPattern has weird rounding behavior.
+ */
+void MessageFormatRegressionTest::Test4058973()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *fmt = new MessageFormat("{0,choice,0#no files|1#one file|1< {0,number,integer} files}", status);
+ failure(status, "new MessageFormat");
+
+ UnicodeString pat;
+ pat = fmt->toPattern(pat);
+ UnicodeString exp("{0,choice,0.0#no files|1.0#one file|1.0< {0,number,integer} files}");
+ if (pat != exp) {
+ errln("MessageFormat.toPattern failed");
+ errln("Exp: " + exp);
+ errln("Got: " + pat);
+ }
+
+ delete fmt;
+}
+/* @bug 4031438
+ * More robust message formats.
+ */
+void MessageFormatRegressionTest::Test4031438()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ UnicodeString pattern1("Impossible {1} has occurred -- status code is {0} and message is {2}.");
+ UnicodeString pattern2("Double '' Quotes {0} test and quoted '{1}' test plus 'other {2} stuff'.");
+
+ MessageFormat *messageFormatter = new MessageFormat("", status);
+ failure(status, "new MessageFormat");
+
+ //try {
+ logln("Apply with pattern : " + pattern1);
+ messageFormatter->applyPattern(pattern1, status);
+ failure(status, "messageFormat->applyPattern");
+ //Object[] params = {new Integer(7)};
+ Formattable params []= {
+ Formattable((int32_t)7)
+ };
+ UnicodeString tempBuffer;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ tempBuffer = messageFormatter->format(params, 1, tempBuffer, pos, status);
+ if(tempBuffer != "Impossible {1} has occurred -- status code is 7 and message is {2}." || failure(status, "MessageFormat::format"))
+ errln("Tests arguments < substitution failed");
+ logln("Formatted with 7 : " + tempBuffer);
+ ParsePosition pp(0);
+ int32_t count = 0;
+ Formattable *objs = messageFormatter->parse(tempBuffer, pp, count);
+ //if(objs[7/*params.length*/] != NULL)
+ // errln("Parse failed with more than expected arguments");
+
+ NumberFormat *fmt = 0;
+ UnicodeString temp, temp1;
+
+ for (int i = 0; i < count; i++) {
+
+ // convert to string if not already
+ Formattable obj = objs[i];
+ temp.remove();
+ if(obj.getType() == Formattable::kString)
+ temp = obj.getString(temp);
+ else {
+ fmt = NumberFormat::createInstance(status);
+ switch (obj.getType()) {
+ case Formattable::kLong: fmt->format(obj.getLong(), temp); break;
+ case Formattable::kInt64: fmt->format(obj.getInt64(), temp); break;
+ case Formattable::kDouble: fmt->format(obj.getDouble(), temp); break;
+ default: break;
+ }
+ }
+
+ // convert to string if not already
+ Formattable obj1 = params[i];
+ temp1.remove();
+ if(obj1.getType() == Formattable::kString)
+ temp1 = obj1.getString(temp1);
+ else {
+ fmt = NumberFormat::createInstance(status);
+ switch (obj1.getType()) {
+ case Formattable::kLong: fmt->format(obj1.getLong(), temp1); break;
+ case Formattable::kInt64: fmt->format(obj1.getInt64(), temp1); break;
+ case Formattable::kDouble: fmt->format(obj1.getDouble(), temp1); break;
+ default: break;
+ }
+ }
+
+ //if (objs[i] != NULL && objs[i].getString(temp1) != params[i].getString(temp2)) {
+ if (temp != temp1) {
+ errln("Parse failed on object " + objs[i].getString(temp1) + " at index : " + i);
+ }
+ }
+
+ delete fmt;
+ delete [] objs;
+
+ // {sfb} does this apply? no way to really pass a null Formattable,
+ // only a null array
+
+ /*tempBuffer = messageFormatter->format(null, tempBuffer, FieldPosition(FieldPosition::DONT_CARE), status);
+ if (tempBuffer != "Impossible {1} has occurred -- status code is {0} and message is {2}." || failure(status, "messageFormat->format"))
+ errln("Tests with no arguments failed");
+ logln("Formatted with null : " + tempBuffer);*/
+ logln("Apply with pattern : " + pattern2);
+ messageFormatter->applyPattern(pattern2, status);
+ failure(status, "messageFormatter->applyPattern");
+ tempBuffer.remove();
+ tempBuffer = messageFormatter->format(params, 1, tempBuffer, pos, status);
+ if (tempBuffer != "Double ' Quotes 7 test and quoted {1} test plus other {2} stuff.")
+ errln("quote format test (w/ params) failed.");
+ logln("Formatted with params : " + tempBuffer);
+
+ /*tempBuffer = messageFormatter->format(null);
+ if (!tempBuffer.equals("Double ' Quotes {0} test and quoted {1} test plus other {2} stuff."))
+ errln("quote format test (w/ null) failed.");
+ logln("Formatted with null : " + tempBuffer);
+ logln("toPattern : " + messageFormatter.toPattern());*/
+ /*} catch (Exception foo) {
+ errln("Exception when formatting in bug 4031438. "+foo.getMessage());
+ }*/
+ delete messageFormatter;
+}
+
+void MessageFormatRegressionTest::Test4052223()
+{
+
+ ParsePosition pos(0);
+ if (pos.getErrorIndex() != -1) {
+ errln("ParsePosition.getErrorIndex initialization failed.");
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *fmt = new MessageFormat("There are {0} apples growing on the {1} tree.", status);
+ failure(status, "new MessageFormat");
+ UnicodeString str("There is one apple growing on the peach tree.");
+
+ int32_t count = 0;
+ fmt->parse(str, pos, count);
+
+ logln(UnicodeString("unparsable string , should fail at ") + pos.getErrorIndex());
+ if (pos.getErrorIndex() == -1)
+ errln("Bug 4052223 failed : parsing string " + str);
+ pos.setErrorIndex(4);
+ if (pos.getErrorIndex() != 4)
+ errln(UnicodeString("setErrorIndex failed, got ") + pos.getErrorIndex() + " instead of 4");
+
+ ChoiceFormat *f = new ChoiceFormat(
+ "-1#are negative|0#are no or fraction|1#is one|1.0<is 1+|2#are two|2<are more than 2.", status);
+ failure(status, "new ChoiceFormat");
+ pos.setIndex(0);
+ pos.setErrorIndex(-1);
+ Formattable obj;
+ f->parse("are negative", obj, pos);
+ if (pos.getErrorIndex() != -1 && obj.getDouble() == -1.0)
+ errln(UnicodeString("Parse with \"are negative\" failed, at ") + pos.getErrorIndex());
+ pos.setIndex(0);
+ pos.setErrorIndex(-1);
+ f->parse("are no or fraction ", obj, pos);
+ if (pos.getErrorIndex() != -1 && obj.getDouble() == 0.0)
+ errln(UnicodeString("Parse with \"are no or fraction\" failed, at ") + pos.getErrorIndex());
+ pos.setIndex(0);
+ pos.setErrorIndex(-1);
+ f->parse("go postal", obj, pos);
+ if (pos.getErrorIndex() == -1 && ! uprv_isNaN(obj.getDouble()))
+ errln(UnicodeString("Parse with \"go postal\" failed, at ") + pos.getErrorIndex());
+
+ delete fmt;
+ delete f;
+}
+/* @bug 4104976
+ * ChoiceFormat.equals(null) throws NullPointerException
+ */
+
+// {sfb} not really applicable in C++?? (kind of silly)
+
+void MessageFormatRegressionTest::Test4104976()
+{
+ double limits [] = {1, 20};
+ UnicodeString formats [] = {
+ UnicodeString("xyz"),
+ UnicodeString("abc")
+ };
+ int32_t formats_length = (int32_t)(sizeof(formats)/sizeof(formats[0]));
+ UErrorCode status = U_ZERO_ERROR;
+ ChoiceFormat *cf = new ChoiceFormat(limits, formats, formats_length);
+ failure(status, "new ChoiceFormat");
+ //try {
+ log("Compares to null is always false, returned : ");
+ logln(cf == NULL ? "TRUE" : "FALSE");
+ /*} catch (Exception foo) {
+ errln("ChoiceFormat.equals(null) throws exception.");
+ }*/
+
+ delete cf;
+}
+
+/* @bug 4106659
+ * ChoiceFormat.ctor(double[], String[]) doesn't check
+ * whether lengths of input arrays are equal.
+ */
+
+// {sfb} again, not really applicable in C++
+
+void MessageFormatRegressionTest::Test4106659()
+{
+ /*
+ double limits [] = {
+ 1, 2, 3
+ };
+ UnicodeString formats [] = {
+ "one", "two"
+ };
+ ChoiceFormat *cf = NULL;
+ //try {
+ // cf = new ChoiceFormat(limits, formats, 3);
+ //} catch (Exception foo) {
+ // logln("ChoiceFormat constructor should check for the array lengths");
+ // cf = null;
+ //}
+ //if (cf != null)
+ // errln(cf->format(5));
+ //
+ delete cf;
+ */
+}
+
+/* @bug 4106660
+ * ChoiceFormat.ctor(double[], String[]) allows unordered double array.
+ * This is not a bug, added javadoc to emphasize the use of limit
+ * array must be in ascending order.
+ */
+void MessageFormatRegressionTest::Test4106660()
+{
+ double limits [] = {3, 1, 2};
+ UnicodeString formats [] = {
+ UnicodeString("Three"),
+ UnicodeString("One"),
+ UnicodeString("Two")
+ };
+ ChoiceFormat *cf = new ChoiceFormat(limits, formats, 3);
+ double d = 5.0;
+ UnicodeString str;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ str = cf->format(d, str, pos);
+ if (str != "Two")
+ errln( (UnicodeString) "format(" + d + ") = " + str);
+
+ delete cf;
+}
+
+/* @bug 4111739
+ * MessageFormat is incorrectly serialized/deserialized.
+ */
+
+// {sfb} doesn't apply in C++
+
+void MessageFormatRegressionTest::Test4111739()
+{
+ /*MessageFormat format1 = null;
+ MessageFormat format2 = null;
+ ObjectOutputStream ostream = null;
+ ByteArrayOutputStream baos = null;
+ ObjectInputStream istream = null;
+
+ try {
+ baos = new ByteArrayOutputStream();
+ ostream = new ObjectOutputStream(baos);
+ } catch(IOException e) {
+ errln("Unexpected exception : " + e.getMessage());
+ return;
+ }
+
+ try {
+ format1 = new MessageFormat("pattern{0}");
+ ostream.writeObject(format1);
+ ostream.flush();
+
+ byte bytes[] = baos.toByteArray();
+
+ istream = new ObjectInputStream(new ByteArrayInputStream(bytes));
+ format2 = (MessageFormat)istream.readObject();
+ } catch(Exception e) {
+ errln("Unexpected exception : " + e.getMessage());
+ }
+
+ if (!format1.equals(format2)) {
+ errln("MessageFormats before and after serialization are not" +
+ " equal\nformat1 = " + format1 + "(" + format1.toPattern() + ")\nformat2 = " +
+ format2 + "(" + format2.toPattern() + ")");
+ } else {
+ logln("Serialization for MessageFormat is OK.");
+ }*/
+}
+/* @bug 4114743
+ * MessageFormat.applyPattern allows illegal patterns.
+ */
+void MessageFormatRegressionTest::Test4114743()
+{
+ UnicodeString originalPattern("initial pattern");
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat(originalPattern, status);
+ failure(status, "new MessageFormat");
+ //try {
+ UnicodeString illegalPattern("ab { '}' de");
+ mf->applyPattern(illegalPattern, status);
+ if( ! U_FAILURE(status))
+ errln("illegal pattern: \"" + illegalPattern + "\"");
+ /*} catch (IllegalArgumentException foo) {
+ if (!originalPattern.equals(mf.toPattern()))
+ errln("pattern after: \"" + mf.toPattern() + "\"");
+ }*/
+ delete mf;
+}
+
+/* @bug 4116444
+ * MessageFormat.parse has different behavior in case of null.
+ */
+void MessageFormatRegressionTest::Test4116444()
+{
+ UnicodeString patterns [] = {
+ (UnicodeString)"",
+ (UnicodeString)"one",
+ (UnicodeString) "{0,date,short}"
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat("", status);
+ failure(status, "new MessageFormat");
+
+ for (int i = 0; i < 3; i++) {
+ UnicodeString pattern = patterns[i];
+ mf->applyPattern(pattern, status);
+ failure(status, "mf->applyPattern");
+
+ //try {
+ int32_t count = 0;
+ ParsePosition pp(0);
+ Formattable *array = mf->parse(UnicodeString(""), pp, count);
+ logln("pattern: \"" + pattern + "\"");
+ log(" parsedObjects: ");
+ if (array != NULL) {
+ log("{");
+ for (int j = 0; j < count; j++) {
+ //if (array[j] != null)
+ UnicodeString dummy;
+ err("\"" + array[j].getString(dummy) + "\"");
+ //else
+ // log("null");
+ if (j < count- 1)
+ log(",");
+ }
+ log("}") ;
+ delete[] array;
+ } else {
+ log("null");
+ }
+ logln("");
+ /*} catch (Exception e) {
+ errln("pattern: \"" + pattern + "\"");
+ errln(" Exception: " + e.getMessage());
+ }*/
+ }
+
+ delete mf;
+}
+/* @bug 4114739 (FIX and add javadoc)
+ * MessageFormat.format has undocumented behavior about empty format objects.
+ */
+
+// {sfb} doesn't apply in C++?
+void MessageFormatRegressionTest::Test4114739()
+{
+
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat("<{0}>", status);
+ failure(status, "new MessageFormat");
+
+ Formattable *objs1 = NULL;
+ //Formattable objs2 [] = {};
+ //Formattable *objs3 [] = {NULL};
+ //try {
+ UnicodeString pat;
+ UnicodeString res;
+ logln("pattern: \"" + mf->toPattern(pat) + "\"");
+ log("format(null) : ");
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ logln("\"" + mf->format(objs1, 0, res, pos, status) + "\"");
+ failure(status, "mf->format");
+ /*log("format({}) : ");
+ logln("\"" + mf->format(objs2, 0, res, FieldPosition(FieldPosition::DONT_CARE), status) + "\"");
+ failure(status, "mf->format");
+ log("format({null}) :");
+ logln("\"" + mf->format(objs3, 0, res, FieldPosition(FieldPosition::DONT_CARE), status) + "\"");
+ failure(status, "mf->format");*/
+ /*} catch (Exception e) {
+ errln("Exception thrown for null argument tests.");
+ }*/
+
+ delete mf;
+}
+
+/* @bug 4113018
+ * MessageFormat.applyPattern works wrong with illegal patterns.
+ */
+void MessageFormatRegressionTest::Test4113018()
+{
+ UnicodeString originalPattern("initial pattern");
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat(originalPattern, status);
+ failure(status, "new messageFormat");
+ UnicodeString illegalPattern("format: {0, xxxYYY}");
+ UnicodeString pat;
+ logln("pattern before: \"" + mf->toPattern(pat) + "\"");
+ logln("illegal pattern: \"" + illegalPattern + "\"");
+ //try {
+ mf->applyPattern(illegalPattern, status);
+ if( ! U_FAILURE(status))
+ errln("Should have thrown IllegalArgumentException for pattern : " + illegalPattern);
+ /*} catch (IllegalArgumentException e) {
+ if (!originalPattern.equals(mf.toPattern()))
+ errln("pattern after: \"" + mf.toPattern() + "\"");
+ }*/
+ delete mf;
+}
+
+/* @bug 4106661
+ * ChoiceFormat is silent about the pattern usage in javadoc.
+ */
+void MessageFormatRegressionTest::Test4106661()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ ChoiceFormat *fmt = new ChoiceFormat(
+ "-1#are negative| 0#are no or fraction | 1#is one |1.0<is 1+ |2#are two |2<are more than 2.", status);
+ failure(status, "new ChoiceFormat");
+ UnicodeString pat;
+ logln("Formatter Pattern : " + fmt->toPattern(pat));
+
+ FieldPosition bogus(FieldPosition::DONT_CARE);
+ UnicodeString str;
+
+ // Will this work for -inf?
+ logln("Format with -INF : " + fmt->format(Formattable(-uprv_getInfinity()), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with -1.0 : " + fmt->format(Formattable(-1.0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with -1.0 : " + fmt->format(Formattable(-1.0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 0 : " + fmt->format(Formattable((int32_t)0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 0.9 : " + fmt->format(Formattable(0.9), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 1.0 : " + fmt->format(Formattable(1.0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 1.5 : " + fmt->format(Formattable(1.5), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 2 : " + fmt->format(Formattable((int32_t)2), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 2.1 : " + fmt->format(Formattable(2.1), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with NaN : " + fmt->format(Formattable(uprv_getNaN()), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with +INF : " + fmt->format(Formattable(uprv_getInfinity()), str, bogus, status));
+ failure(status, "fmt->format");
+
+ delete fmt;
+}
+
+/* @bug 4094906
+ * ChoiceFormat should accept \u221E as eq. to INF.
+ */
+void MessageFormatRegressionTest::Test4094906()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern("-");
+ pattern += (UChar) 0x221E;
+ pattern += "<are negative|0.0<are no or fraction|1.0#is one|1.0<is 1+|";
+ pattern += (UChar) 0x221E;
+ pattern += "<are many.";
+
+ ChoiceFormat *fmt = new ChoiceFormat(pattern, status);
+ failure(status, "new ChoiceFormat");
+ UnicodeString pat;
+ if (fmt->toPattern(pat) != pattern) {
+ errln( (UnicodeString) "Formatter Pattern : " + pat);
+ errln( (UnicodeString) "Expected Pattern : " + pattern);
+ }
+ FieldPosition bogus(FieldPosition::DONT_CARE);
+ UnicodeString str;
+
+ // Will this work for -inf?
+ logln("Format with -INF : " + fmt->format(Formattable(-uprv_getInfinity()), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with -1.0 : " + fmt->format(Formattable(-1.0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with -1.0 : " + fmt->format(Formattable(-1.0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 0 : " + fmt->format(Formattable((int32_t)0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 0.9 : " + fmt->format(Formattable(0.9), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 1.0 : " + fmt->format(Formattable(1.0), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 1.5 : " + fmt->format(Formattable(1.5), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 2 : " + fmt->format(Formattable((int32_t)2), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with 2.1 : " + fmt->format(Formattable(2.1), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with NaN : " + fmt->format(Formattable(uprv_getNaN()), str, bogus, status));
+ failure(status, "fmt->format");
+ str.remove();
+ logln("Format with +INF : " + fmt->format(Formattable(uprv_getInfinity()), str, bogus, status));
+ failure(status, "fmt->format");
+
+ delete fmt;
+}
+
+/* @bug 4118592
+ * MessageFormat.parse fails with ChoiceFormat.
+ */
+void MessageFormatRegressionTest::Test4118592()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat("", status);
+ failure(status, "new messageFormat");
+ UnicodeString pattern("{0,choice,1#YES|2#NO}");
+ UnicodeString prefix("");
+ Formattable *objs = 0;
+
+ for (int i = 0; i < 5; i++) {
+ UnicodeString formatted;
+ formatted = prefix + "YES";
+ mf->applyPattern(prefix + pattern, status);
+ failure(status, "mf->applyPattern");
+ prefix += "x";
+ //Object[] objs = mf.parse(formatted, new ParsePosition(0));
+ int32_t count = 0;
+ ParsePosition pp(0);
+ objs = mf->parse(formatted, pp, count);
+ UnicodeString pat;
+ logln(UnicodeString("") + i + ". pattern :\"" + mf->toPattern(pat) + "\"");
+ log(" \"" + formatted + "\" parsed as ");
+ if (objs == NULL)
+ logln(" null");
+ else {
+ UnicodeString temp;
+ if(objs[0].getType() == Formattable::kString)
+ logln((UnicodeString)" " + objs[0].getString(temp));
+ else
+ logln((UnicodeString)" " + (objs[0].getType() == Formattable::kLong ? objs[0].getLong() : objs[0].getDouble()));
+ delete[] objs;
+
+ }
+ }
+
+ delete mf;
+}
+/* @bug 4118594
+ * MessageFormat.parse fails for some patterns.
+ */
+void MessageFormatRegressionTest::Test4118594()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat("{0}, {0}, {0}", status);
+ failure(status, "new MessageFormat");
+ UnicodeString forParsing("x, y, z");
+ //Object[] objs = mf.parse(forParsing, new ParsePosition(0));
+ int32_t count = 0;
+ ParsePosition pp(0);
+ Formattable *objs = mf->parse(forParsing, pp, count);
+ UnicodeString pat;
+ logln("pattern: \"" + mf->toPattern(pat) + "\"");
+ logln("text for parsing: \"" + forParsing + "\"");
+ UnicodeString str;
+ if (objs[0].getString(str) != "z")
+ errln("argument0: \"" + objs[0].getString(str) + "\"");
+ mf->applyPattern("{0,number,#.##}, {0,number,#.#}", status);
+ failure(status, "mf->applyPattern");
+ //Object[] oldobjs = {new Double(3.1415)};
+ Formattable oldobjs [] = {Formattable(3.1415)};
+ UnicodeString result;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ result = mf->format( oldobjs, 1, result, pos, status );
+ failure(status, "mf->format");
+ pat.remove();
+ logln("pattern: \"" + mf->toPattern(pat) + "\"");
+ logln("text for parsing: \"" + result + "\"");
+ // result now equals "3.14, 3.1"
+ if (result != "3.14, 3.1")
+ errln("result = " + result);
+ //Object[] newobjs = mf.parse(result, new ParsePosition(0));
+ int32_t count1 = 0;
+ pp.setIndex(0);
+ Formattable *newobjs = mf->parse(result, pp, count1);
+ // newobjs now equals {new Double(3.1)}
+ if (newobjs == NULL) {
+ dataerrln("Error calling MessageFormat::parse");
+ } else {
+ if (newobjs[0].getDouble() != 3.1)
+ errln( UnicodeString("newobjs[0] = ") + newobjs[0].getDouble());
+ }
+
+ delete [] objs;
+ delete [] newobjs;
+ delete mf;
+}
+/* @bug 4105380
+ * When using ChoiceFormat, MessageFormat is not good for I18n.
+ */
+void MessageFormatRegressionTest::Test4105380()
+{
+ UnicodeString patternText1("The disk \"{1}\" contains {0}.");
+ UnicodeString patternText2("There are {0} on the disk \"{1}\"");
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *form1 = new MessageFormat(patternText1, status);
+ failure(status, "new MessageFormat");
+ MessageFormat *form2 = new MessageFormat(patternText2, status);
+ failure(status, "new MessageFormat");
+ double filelimits [] = {0,1,2};
+ UnicodeString filepart [] = {
+ (UnicodeString)"no files",
+ (UnicodeString)"one file",
+ (UnicodeString)"{0,number} files"
+ };
+ ChoiceFormat *fileform = new ChoiceFormat(filelimits, filepart, 3);
+ form1->setFormat(1, *fileform);
+ form2->setFormat(0, *fileform);
+ //Object[] testArgs = {new Long(12373), "MyDisk"};
+ Formattable testArgs [] = {
+ Formattable((int32_t)12373),
+ Formattable((UnicodeString)"MyDisk")
+ };
+
+ FieldPosition bogus(FieldPosition::DONT_CARE);
+
+ UnicodeString result;
+ logln(form1->format(testArgs, 2, result, bogus, status));
+ failure(status, "form1->format");
+ result.remove();
+ logln(form2->format(testArgs, 2, result, bogus, status));
+ failure(status, "form1->format");
+
+ delete form1;
+ delete form2;
+ delete fileform;
+}
+/* @bug 4120552
+ * MessageFormat.parse incorrectly sets errorIndex.
+ */
+void MessageFormatRegressionTest::Test4120552()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat("pattern", status);
+ failure(status, "new MessageFormat");
+ UnicodeString texts[] = {
+ (UnicodeString)"pattern",
+ (UnicodeString)"pat",
+ (UnicodeString)"1234"
+ };
+ UnicodeString pat;
+ logln("pattern: \"" + mf->toPattern(pat) + "\"");
+ for (int i = 0; i < 3; i++) {
+ ParsePosition pp(0);
+ //Object[] objs = mf.parse(texts[i], pp);
+ int32_t count = 0;
+ Formattable *objs = mf->parse(texts[i], pp, count);
+ log(" text for parsing: \"" + texts[i] + "\"");
+ if (objs == NULL) {
+ logln(" (incorrectly formatted string)");
+ if (pp.getErrorIndex() == -1)
+ errln(UnicodeString("Incorrect error index: ") + pp.getErrorIndex());
+ } else {
+ logln(" (correctly formatted string)");
+ delete[] objs;
+ }
+ }
+ delete mf;
+}
+
+/**
+ * @bug 4142938
+ * MessageFormat handles single quotes in pattern wrong.
+ * This is actually a problem in ChoiceFormat; it doesn't
+ * understand single quotes.
+ */
+void MessageFormatRegressionTest::Test4142938()
+{
+ UnicodeString pat = CharsToUnicodeString("''Vous'' {0,choice,0#n''|1#}avez s\\u00E9lectionn\\u00E9 "
+ "{0,choice,0#aucun|1#{0}} client{0,choice,0#s|1#|2#s} "
+ "personnel{0,choice,0#s|1#|2#s}.");
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *mf = new MessageFormat(pat, status);
+ failure(status, "new MessageFormat");
+
+ UnicodeString PREFIX [] = {
+ CharsToUnicodeString("'Vous' n'avez s\\u00E9lectionn\\u00E9 aucun clients personnels."),
+ CharsToUnicodeString("'Vous' avez s\\u00E9lectionn\\u00E9 "),
+ CharsToUnicodeString("'Vous' avez s\\u00E9lectionn\\u00E9 ")
+ };
+ UnicodeString SUFFIX [] = {
+ UnicodeString(),
+ UNICODE_STRING(" client personnel.", 18),
+ UNICODE_STRING(" clients personnels.", 20)
+ };
+
+ for (int i=0; i<3; i++) {
+ UnicodeString out;
+ //out = mf->format(new Object[]{new Integer(i)});
+ Formattable objs [] = {
+ Formattable((int32_t)i)
+ };
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ out = mf->format(objs, 1, out, pos, status);
+ failure(status, "mf->format");
+ if (SUFFIX[i] == "") {
+ if (out != PREFIX[i])
+ errln((UnicodeString)"" + i + ": Got \"" + out + "\"; Want \"" + PREFIX[i] + "\"");
+ }
+ else {
+ if (!out.startsWith(PREFIX[i]) ||
+ !out.endsWith(SUFFIX[i]))
+ errln((UnicodeString)"" + i + ": Got \"" + out + "\"; Want \"" + PREFIX[i] + "\"...\"" +
+ SUFFIX[i] + "\"");
+ }
+ }
+
+ delete mf;
+}
+
+/**
+ * @bug 4142938
+ * Test the applyPattern and toPattern handling of single quotes
+ * by ChoiceFormat. (This is in here because this was a bug reported
+ * against MessageFormat.) The single quote is used to quote the
+ * pattern characters '|', '#', '<', and '\u2264'. Two quotes in a row
+ * is a quote literal.
+ */
+void MessageFormatRegressionTest::TestChoicePatternQuote()
+{
+ UnicodeString DATA [] = {
+ // Pattern 0 value 1 value
+ // {sfb} hacked - changed \u2264 to = (copied from Character Map)
+ (UnicodeString)"0#can''t|1#can", (UnicodeString)"can't", (UnicodeString)"can",
+ (UnicodeString)"0#'pound(#)=''#'''|1#xyz", (UnicodeString)"pound(#)='#'", (UnicodeString)"xyz",
+ (UnicodeString)"0#'1<2 | 1=1'|1#''", (UnicodeString)"1<2 | 1=1", (UnicodeString)"'",
+ };
+ for (int i=0; i<9; i+=3) {
+ //try {
+ UErrorCode status = U_ZERO_ERROR;
+ ChoiceFormat *cf = new ChoiceFormat(DATA[i], status);
+ failure(status, "new ChoiceFormat");
+ for (int j=0; j<=1; ++j) {
+ UnicodeString out;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ out = cf->format((double)j, out, pos);
+ if (out != DATA[i+1+j])
+ errln("Fail: Pattern \"" + DATA[i] + "\" x "+j+" -> " +
+ out + "; want \"" + DATA[i+1+j] + '"');
+ }
+ UnicodeString pat;
+ pat = cf->toPattern(pat);
+ UnicodeString pat2;
+ ChoiceFormat *cf2 = new ChoiceFormat(pat, status);
+ pat2 = cf2->toPattern(pat2);
+ if (pat != pat2)
+ errln("Fail: Pattern \"" + DATA[i] + "\" x toPattern -> \"" + pat + '"');
+ else
+ logln("Ok: Pattern \"" + DATA[i] + "\" x toPattern -> \"" + pat + '"');
+ /*}
+ catch (IllegalArgumentException e) {
+ errln("Fail: Pattern \"" + DATA[i] + "\" -> " + e);
+ }*/
+
+ delete cf;
+ delete cf2;
+ }
+}
+
+/**
+ * @bug 4112104
+ * MessageFormat.equals(null) throws a NullPointerException. The JLS states
+ * that it should return false.
+ */
+void MessageFormatRegressionTest::Test4112104()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ MessageFormat *format = new MessageFormat("", status);
+ failure(status, "new MessageFormat");
+ //try {
+ // This should NOT throw an exception
+ if (format == NULL) {
+ // It also should return false
+ errln("MessageFormat.equals(null) returns false");
+ }
+ /*}
+ catch (NullPointerException e) {
+ errln("MessageFormat.equals(null) throws " + e);
+ }*/
+ delete format;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.h b/Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.h
new file mode 100644
index 00000000000..e9e45218a70
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/msfmrgts.h
@@ -0,0 +1,55 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _MESSAGEFORMATREGRESSIONTEST_
+#define _MESSAGEFORMATREGRESSIONTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+/**
+ * Performs regression test for MessageFormat
+ **/
+class MessageFormatRegressionTest: public IntlTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+ void Test4074764(void);
+ void Test4058973(void);
+ void Test4031438(void);
+ void Test4052223(void);
+ void Test4104976(void);
+ void Test4106659(void);
+ void Test4106660(void);
+ void Test4111739(void);
+ void Test4114743(void);
+ void Test4116444(void);
+ void Test4114739(void);
+ void Test4113018(void);
+ void Test4106661(void);
+ void Test4094906(void);
+ void Test4118592(void);
+ void Test4118594(void);
+ void Test4105380(void);
+ void Test4120552(void);
+ void Test4142938(void);
+ void TestChoicePatternQuote(void);
+ void Test4112104(void);
+
+protected:
+ UBool failure(UErrorCode status, const char* msg);
+
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _MESSAGEFORMATREGRESSIONTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.cpp
new file mode 100644
index 00000000000..117b2ed3159
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.cpp
@@ -0,0 +1,409 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "nmfmapts.h"
+
+#include "unicode/numfmt.h"
+#include "unicode/decimfmt.h"
+#include "unicode/locid.h"
+#include "unicode/unum.h"
+#include "unicode/strenum.h"
+
+// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
+// try to test the full functionality. It just calls each function in the class and
+// verifies that it works on a basic level.
+
+void IntlTestNumberFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite NumberFormatAPI");
+ switch (index) {
+ case 0: name = "NumberFormat API test";
+ if (exec) {
+ logln("NumberFormat API test---"); logln("");
+ UErrorCode status = U_ZERO_ERROR;
+ Locale saveLocale;
+ Locale::setDefault(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not set default locale, test may not give correct results");
+ }
+ testAPI(/* par */);
+ Locale::setDefault(saveLocale, status);
+ }
+ break;
+ case 1: name = "NumberFormatRegistration";
+ if (exec) {
+ logln("NumberFormat Registration test---"); logln("");
+ UErrorCode status = U_ZERO_ERROR;
+ Locale saveLocale;
+ Locale::setDefault(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not set default locale, test may not give correct results");
+ }
+ testRegistration();
+ Locale::setDefault(saveLocale, status);
+ }
+ break;
+ default: name = ""; break;
+ }
+}
+
+/**
+ * This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
+ * NumberFormat.
+ */
+void IntlTestNumberFormatAPI::testAPI(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+// ======= Test constructors
+
+ logln("Testing NumberFormat constructors");
+
+ NumberFormat *def = NumberFormat::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create NumberFormat (default)");
+ }
+
+ status = U_ZERO_ERROR;
+ NumberFormat *fr = NumberFormat::createInstance(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create NumberFormat (French)");
+ }
+
+ NumberFormat *cur = NumberFormat::createCurrencyInstance(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create NumberFormat (currency, default)");
+ }
+
+ status = U_ZERO_ERROR;
+ NumberFormat *cur_fr = NumberFormat::createCurrencyInstance(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create NumberFormat (currency, French)");
+ }
+
+ NumberFormat *per = NumberFormat::createPercentInstance(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create NumberFormat (percent, default)");
+ }
+
+ status = U_ZERO_ERROR;
+ NumberFormat *per_fr = NumberFormat::createPercentInstance(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create NumberFormat (percent, French)");
+ }
+
+// ======= Test equality
+if (per_fr != NULL && cur_fr != NULL)
+{
+ logln("Testing equality operator");
+
+ if( *per_fr == *cur_fr || ! ( *per_fr != *cur_fr) ) {
+ errln("ERROR: == failed");
+ }
+}
+
+// ======= Test various format() methods
+if (cur_fr != NULL)
+{
+ logln("Testing various format() methods");
+
+ double d = -10456.0037;
+ int32_t l = 100000000;
+ Formattable fD(d);
+ Formattable fL(l);
+
+ UnicodeString res1, res2, res3, res4, res5, res6;
+ FieldPosition pos1(0), pos2(0), pos3(0), pos4(0);
+
+ res1 = cur_fr->format(d, res1);
+ logln( (UnicodeString) "" + (int32_t) d + " formatted to " + res1);
+
+ res2 = cur_fr->format(l, res2);
+ logln((UnicodeString) "" + (int32_t) l + " formatted to " + res2);
+
+ res3 = cur_fr->format(d, res3, pos1);
+ logln( (UnicodeString) "" + (int32_t) d + " formatted to " + res3);
+
+ res4 = cur_fr->format(l, res4, pos2);
+ logln((UnicodeString) "" + (int32_t) l + " formatted to " + res4);
+
+ status = U_ZERO_ERROR;
+ res5 = cur_fr->format(fD, res5, pos3, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: format(Formattable [double]) failed");
+ }
+ logln((UnicodeString) "" + (int32_t) fD.getDouble() + " formatted to " + res5);
+
+ status = U_ZERO_ERROR;
+ res6 = cur_fr->format(fL, res6, pos4, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: format(Formattable [long]) failed");
+ }
+ logln((UnicodeString) "" + fL.getLong() + " formatted to " + res6);
+}
+
+// ======= Test parse()
+if (fr != NULL)
+{
+ logln("Testing parse()");
+
+ double d = -10456.0037;
+ UnicodeString text("-10,456.0037");
+ Formattable result1, result2, result3;
+ ParsePosition pos(0), pos01(0);
+ fr->parseObject(text, result1, pos);
+ if(result1.getType() != Formattable::kDouble && result1.getDouble() != d) {
+ errln("ERROR: Roundtrip failed (via parse()) for " + text);
+ }
+ logln(text + " parsed into " + (int32_t) result1.getDouble());
+
+ fr->parse(text, result2, pos01);
+ if(result2.getType() != Formattable::kDouble && result2.getDouble() != d) {
+ errln("ERROR: Roundtrip failed (via parse()) for " + text);
+ }
+ logln(text + " parsed into " + (int32_t) result2.getDouble());
+
+ status = U_ZERO_ERROR;
+ fr->parse(text, result3, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: parse() failed");
+ }
+ if(result3.getType() != Formattable::kDouble && result3.getDouble() != d) {
+ errln("ERROR: Roundtrip failed (via parse()) for " + text);
+ }
+ logln(text + " parsed into " + (int32_t) result3.getDouble());
+}
+
+// ======= Test getters and setters
+if (fr != NULL && def != NULL)
+{
+ logln("Testing getters and setters");
+
+ int32_t count = 0;
+ const Locale *locales = NumberFormat::getAvailableLocales(count);
+ logln((UnicodeString) "Got " + count + " locales" );
+ for(int32_t i = 0; i < count; i++) {
+ UnicodeString name(locales[i].getName(),"");
+ logln(name);
+ }
+
+ fr->setParseIntegerOnly( def->isParseIntegerOnly() );
+ if(fr->isParseIntegerOnly() != def->isParseIntegerOnly() ) {
+ errln("ERROR: setParseIntegerOnly() failed");
+ }
+
+ fr->setGroupingUsed( def->isGroupingUsed() );
+ if(fr->isGroupingUsed() != def->isGroupingUsed() ) {
+ errln("ERROR: setGroupingUsed() failed");
+ }
+
+ fr->setMaximumIntegerDigits( def->getMaximumIntegerDigits() );
+ if(fr->getMaximumIntegerDigits() != def->getMaximumIntegerDigits() ) {
+ errln("ERROR: setMaximumIntegerDigits() failed");
+ }
+
+ fr->setMinimumIntegerDigits( def->getMinimumIntegerDigits() );
+ if(fr->getMinimumIntegerDigits() != def->getMinimumIntegerDigits() ) {
+ errln("ERROR: setMinimumIntegerDigits() failed");
+ }
+
+ fr->setMaximumFractionDigits( def->getMaximumFractionDigits() );
+ if(fr->getMaximumFractionDigits() != def->getMaximumFractionDigits() ) {
+ errln("ERROR: setMaximumFractionDigits() failed");
+ }
+
+ fr->setMinimumFractionDigits( def->getMinimumFractionDigits() );
+ if(fr->getMinimumFractionDigits() != def->getMinimumFractionDigits() ) {
+ errln("ERROR: setMinimumFractionDigits() failed");
+ }
+}
+
+// ======= Test getStaticClassID()
+
+ logln("Testing getStaticClassID()");
+
+ status = U_ZERO_ERROR;
+ NumberFormat *test = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create a NumberFormat");
+ }
+
+ if(test->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln("ERROR: getDynamicClassID() didn't return the expected value");
+ }
+
+ delete test;
+ delete def;
+ delete fr;
+ delete cur;
+ delete cur_fr;
+ delete per;
+ delete per_fr;
+}
+
+#if !UCONFIG_NO_SERVICE
+
+#define SRC_LOC Locale::getFrance()
+#define SWAP_LOC Locale::getUS()
+
+class NFTestFactory : public SimpleNumberFormatFactory {
+ NumberFormat* currencyStyle;
+
+public:
+ NFTestFactory()
+ : SimpleNumberFormatFactory(SRC_LOC, TRUE)
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ currencyStyle = NumberFormat::createInstance(SWAP_LOC, status);
+ }
+
+ virtual ~NFTestFactory()
+ {
+ delete currencyStyle;
+ }
+
+ virtual NumberFormat* createFormat(const Locale& /* loc */, UNumberFormatStyle formatType)
+ {
+ if (formatType == UNUM_CURRENCY) {
+ return (NumberFormat*)currencyStyle->clone();
+ }
+ return NULL;
+ }
+
+ virtual inline UClassID getDynamicClassID() const
+ {
+ return (UClassID)&gID;
+ }
+
+ static inline UClassID getStaticClassID()
+ {
+ return (UClassID)&gID;
+ }
+
+private:
+ static char gID;
+};
+
+char NFTestFactory::gID = 0;
+#endif
+
+void
+IntlTestNumberFormatAPI::testRegistration()
+{
+#if !UCONFIG_NO_SERVICE
+ UErrorCode status = U_ZERO_ERROR;
+
+ NumberFormat* f0 = NumberFormat::createInstance(SWAP_LOC, status);
+ NumberFormat* f1 = NumberFormat::createInstance(SRC_LOC, status);
+ NumberFormat* f2 = NumberFormat::createCurrencyInstance(SRC_LOC, status);
+ URegistryKey key = NumberFormat::registerFactory(new NFTestFactory(), status);
+ NumberFormat* f3 = NumberFormat::createCurrencyInstance(SRC_LOC, status);
+ NumberFormat* f3a = NumberFormat::createCurrencyInstance(SRC_LOC, status);
+ NumberFormat* f4 = NumberFormat::createInstance(SRC_LOC, status);
+
+ StringEnumeration* locs = NumberFormat::getAvailableLocales();
+
+ UNumberFormat* uf3 = unum_open(UNUM_CURRENCY, NULL, 0, SRC_LOC.getName(),NULL, &status);
+ UNumberFormat* uf4 = unum_open(UNUM_DEFAULT, NULL, 0, SRC_LOC.getName(), NULL, &status);
+
+ const UnicodeString* res;
+ for (res = locs->snext(status); res; res = locs->snext(status)) {
+ logln(*res); // service is still in synch
+ }
+
+ NumberFormat::unregister(key, status); // restore for other tests
+ NumberFormat* f5 = NumberFormat::createCurrencyInstance(SRC_LOC, status);
+ UNumberFormat* uf5 = unum_open(UNUM_CURRENCY, NULL, 0, SRC_LOC.getName(),NULL, &status);
+
+ if (U_FAILURE(status)) {
+ dataerrln("Error creating instnaces.");
+ return;
+ } else {
+ float n = 1234.567f;
+ UnicodeString res0, res1, res2, res3, res4, res5;
+ UChar ures3[50];
+ UChar ures4[50];
+ UChar ures5[50];
+
+ f0->format(n, res0);
+ f1->format(n, res1);
+ f2->format(n, res2);
+ f3->format(n, res3);
+ f4->format(n, res4);
+ f5->format(n, res5);
+
+ unum_formatDouble(uf3, n, ures3, 50, NULL, &status);
+ unum_formatDouble(uf4, n, ures4, 50, NULL, &status);
+ unum_formatDouble(uf5, n, ures5, 50, NULL, &status);
+
+ logln((UnicodeString)"f0 swap int: " + res0);
+ logln((UnicodeString)"f1 src int: " + res1);
+ logln((UnicodeString)"f2 src cur: " + res2);
+ logln((UnicodeString)"f3 reg cur: " + res3);
+ logln((UnicodeString)"f4 reg int: " + res4);
+ logln((UnicodeString)"f5 unreg cur: " + res5);
+ log("uf3 reg cur: ");
+ logln(ures3);
+ log("uf4 reg int: ");
+ logln(ures4);
+ log("uf5 ureg cur: ");
+ logln(ures5);
+
+ if (f3 == f3a) {
+ errln("did not get new instance from service");
+ } else {
+ delete f3a;
+ }
+ if (res3 != res0) {
+ errln("registered service did not match");
+ }
+ if (res4 != res1) {
+ errln("registered service did not inherit");
+ }
+ if (res5 != res2) {
+ errln("unregistered service did not match original");
+ }
+
+ if (res0 != ures3) {
+ errln("registered service did not match / unum");
+ }
+ if (res1 != ures4) {
+ errln("registered service did not inherit / unum");
+ }
+ if (res2 != ures5) {
+ errln("unregistered service did not match original / unum");
+ }
+ }
+
+ unum_close(uf5);
+ delete f5;
+ unum_close(uf4);
+ unum_close(uf3);
+ delete f4;
+ delete f3;
+ delete f2;
+ delete f1;
+ delete f0;
+
+ for (res = locs->snext(status); res; res = locs->snext(status)) {
+ errln(*res); // service should be out of synch
+ }
+
+ locs->reset(status); // now in synch again, we hope
+ for (res = locs->snext(status); res; res = locs->snext(status)) {
+ logln(*res);
+ }
+
+ delete locs;
+#endif
+}
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.h b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.h
new file mode 100644
index 00000000000..a2bcae2381d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmapts.h
@@ -0,0 +1,33 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTNUMBERFORMATAPI
+#define _INTLTESTNUMBERFORMATAPI
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+
+/**
+ * This test executes basic functionality checks of various API functions
+ **/
+class IntlTestNumberFormatAPI: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+ /**
+ * executes tests of API functions, see detailed comments in source code
+ **/
+ void testAPI(/* char* par */);
+ void testRegistration();
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.cpp
new file mode 100644
index 00000000000..580918aec8e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.cpp
@@ -0,0 +1,351 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "nmfmtrt.h"
+
+#include "unicode/dcfmtsym.h"
+#include "unicode/decimfmt.h"
+#include "unicode/locid.h"
+#include "putilimp.h"
+
+#include <float.h>
+#include <stdio.h> // for sprintf
+#include <stdlib.h>
+
+// *****************************************************************************
+// class NumberFormatRoundTripTest
+// *****************************************************************************
+
+UBool NumberFormatRoundTripTest::verbose = FALSE;
+UBool NumberFormatRoundTripTest::STRING_COMPARE = TRUE;
+UBool NumberFormatRoundTripTest::EXACT_NUMERIC_COMPARE = FALSE;
+UBool NumberFormatRoundTripTest::DEBUG = FALSE;
+double NumberFormatRoundTripTest::MAX_ERROR = 1e-14;
+double NumberFormatRoundTripTest::max_numeric_error = 0.0;
+double NumberFormatRoundTripTest::min_numeric_error = 1.0;
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+void NumberFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite NumberFormatRoundTripTest");
+ switch (index) {
+ CASE(0, start)
+ default: name = ""; break;
+ }
+}
+
+UBool
+NumberFormatRoundTripTest::failure(UErrorCode status, const char* msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+uint32_t
+NumberFormatRoundTripTest::randLong()
+{
+ // Assume 8-bit (or larger) rand values. Also assume
+ // that the system rand() function is very poor, which it always is.
+ uint32_t d;
+ uint32_t i;
+ char* poke = (char*)&d;
+ for (i=0; i < sizeof(uint32_t); ++i)
+ {
+ poke[i] = (char)(rand() & 0xFF);
+ }
+ return d;
+}
+
+/**
+ * Return a random value from -range..+range.
+ */
+double
+NumberFormatRoundTripTest::randomDouble(double range)
+{
+ double a = randFraction();
+ return (2.0 * range * a) - range;
+}
+
+void
+NumberFormatRoundTripTest::start()
+{
+// test(NumberFormat.getInstance(new Locale("sr", "", "")));
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ NumberFormat *fmt = NULL;
+
+ logln("Default Locale");
+
+ fmt = NumberFormat::createInstance(status);
+ if (!failure(status, "NumberFormat::createInstance")){
+ test(fmt);
+ }
+ delete fmt;
+
+ fmt = NumberFormat::createCurrencyInstance(status);
+ if (!failure(status, "NumberFormat::createCurrencyInstance")){
+ test(fmt);
+ }
+ delete fmt;
+
+ fmt = NumberFormat::createPercentInstance(status);
+ if (!failure(status, "NumberFormat::createPercentInstance")){
+ test(fmt);
+ }
+ delete fmt;
+
+
+ int32_t locCount = 0;
+ const Locale *loc = NumberFormat::getAvailableLocales(locCount);
+ if(quick) {
+ if(locCount > 5)
+ locCount = 5;
+ logln("Quick mode: only testing first 5 Locales");
+ }
+ for(int i = 0; i < locCount; ++i) {
+ UnicodeString name;
+ logln(loc[i].getDisplayName(name));
+
+ fmt = NumberFormat::createInstance(loc[i], status);
+ failure(status, "NumberFormat::createInstance");
+ test(fmt);
+ delete fmt;
+
+ fmt = NumberFormat::createCurrencyInstance(loc[i], status);
+ failure(status, "NumberFormat::createCurrencyInstance");
+ test(fmt);
+ delete fmt;
+
+ fmt = NumberFormat::createPercentInstance(loc[i], status);
+ failure(status, "NumberFormat::createPercentInstance");
+ test(fmt);
+ delete fmt;
+ }
+
+ logln(UnicodeString("Numeric error ") + min_numeric_error + " to " + max_numeric_error);
+}
+
+
+void
+NumberFormatRoundTripTest::test(NumberFormat *fmt)
+{
+#if IEEE_754 && !defined(OS400)
+ test(fmt, uprv_getNaN());
+ test(fmt, uprv_getInfinity());
+ test(fmt, -uprv_getInfinity());
+#endif
+
+ test(fmt, (int32_t)500);
+ test(fmt, (int32_t)0);
+ test(fmt, (int32_t)-0);
+ test(fmt, 0.0);
+ double negZero = 0.0; negZero /= -1.0;
+ test(fmt, negZero);
+ test(fmt, 9223372036854775808.0);
+ test(fmt, -9223372036854775809.0);
+
+ for(int i = 0; i < 10; ++i) {
+ test(fmt, randomDouble(1));
+ test(fmt, randomDouble(10000));
+ test(fmt, uprv_floor((randomDouble(10000))));
+ test(fmt, randomDouble(1e50));
+ test(fmt, randomDouble(1e-50));
+#if !defined(OS390) && !defined(OS400)
+ test(fmt, randomDouble(1e100));
+#elif IEEE_754
+ test(fmt, randomDouble(1e75)); /*OS390 and OS400*/
+#endif /* OS390 and OS400 */
+ // {sfb} When formatting with a percent instance, numbers very close to
+ // DBL_MAX will fail the round trip. This is because:
+ // 1) Format the double into a string --> INF% (since 100 * double > DBL_MAX)
+ // 2) Parse the string into a double --> INF
+ // 3) Re-format the double --> INF%
+ // 4) The strings are equal, so that works.
+ // 5) Calculate the proportional error --> INF, so the test will fail
+ // I'll get around this by dividing by the multiplier to make sure
+ // the double will stay in range.
+ //if(fmt->getMultipler() == 1)
+ if(fmt->getDynamicClassID() == DecimalFormat::getStaticClassID())
+ {
+#if !defined(OS390) && !defined(OS400)
+ /* DBL_MAX/2 is here because randomDouble does a *2 in the math */
+ test(fmt, randomDouble(DBL_MAX/2.0) / ((DecimalFormat*)fmt)->getMultiplier());
+#elif IEEE_754
+ test(fmt, randomDouble(1e75) / ((DecimalFormat*)fmt)->getMultiplier());
+#else
+ test(fmt, randomDouble(1e65) / ((DecimalFormat*)fmt)->getMultiplier()); /*OS390*/
+#endif
+ }
+
+#if (defined(_MSC_VER) && _MSC_VER < 1400) || defined(__alpha__) || defined(U_OSF)
+ // These machines and compilers don't fully support denormalized doubles,
+ test(fmt, randomDouble(1e-292));
+ test(fmt, randomDouble(1e-100));
+#elif defined(OS390) || defined(OS400)
+ // i5/OS (OS400) throws exceptions on denormalized numbers
+# if IEEE_754
+ test(fmt, randomDouble(1e-78));
+ test(fmt, randomDouble(1e-78));
+ // #else we're using something like the old z/OS floating point.
+# endif
+#else
+ // This is a normal machine that can support IEEE754 denormalized doubles without throwing an error.
+ test(fmt, randomDouble(DBL_MIN)); /* Usually 2.2250738585072014e-308 */
+ test(fmt, randomDouble(1e-100));
+#endif
+ }
+}
+
+void
+NumberFormatRoundTripTest::test(NumberFormat *fmt, double value)
+{
+ test(fmt, Formattable(value));
+}
+
+void
+NumberFormatRoundTripTest::test(NumberFormat *fmt, int32_t value)
+{
+ test(fmt, Formattable(value));
+}
+
+void
+NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value)
+{
+ fmt->setMaximumFractionDigits(999);
+ if(fmt->getDynamicClassID() == DecimalFormat::getStaticClassID()) {
+ ((DecimalFormat *)fmt)->setRoundingIncrement(0.0);
+ }
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString s, s2, temp;
+ if(isDouble(value))
+ s = fmt->format(value.getDouble(), s);
+ else
+ s = fmt->format(value.getLong(), s);
+
+ Formattable n;
+ UBool show = verbose;
+ if(DEBUG)
+ logln(/*value.getString(temp) +*/ " F> " + escape(s));
+
+ fmt->parse(s, n, status);
+ failure(status, "fmt->parse");
+ if(DEBUG)
+ logln(escape(s) + " P> " /*+ n.getString(temp)*/);
+
+ if(isDouble(n))
+ s2 = fmt->format(n.getDouble(), s2);
+ else
+ s2 = fmt->format(n.getLong(), s2);
+
+ if(DEBUG)
+ logln(/*n.getString(temp) +*/ " F> " + escape(s2));
+
+ if(STRING_COMPARE) {
+ if (s != s2) {
+ errln("*** STRING ERROR \"" + escape(s) + "\" != \"" + escape(s2) + "\"");
+ show = TRUE;
+ }
+ }
+
+ if(EXACT_NUMERIC_COMPARE) {
+ if(value != n) {
+ errln("*** NUMERIC ERROR");
+ show = TRUE;
+ }
+ }
+ else {
+ // Compute proportional error
+ double error = proportionalError(value, n);
+
+ if(error > MAX_ERROR) {
+ errln(UnicodeString("*** NUMERIC ERROR ") + error);
+ show = TRUE;
+ }
+
+ if (error > max_numeric_error)
+ max_numeric_error = error;
+ if (error < min_numeric_error)
+ min_numeric_error = error;
+ }
+
+ if (show) {
+ errln(/*value.getString(temp) +*/ typeOf(value, temp) + " F> " +
+ escape(s) + " P> " + (n.getType() == Formattable::kDouble ? n.getDouble() : (double)n.getLong())
+ /*n.getString(temp) */ + typeOf(n, temp) + " F> " +
+ escape(s2));
+ }
+}
+
+double
+NumberFormatRoundTripTest::proportionalError(const Formattable& a, const Formattable& b)
+{
+ double aa,bb;
+
+ if(isDouble(a))
+ aa = a.getDouble();
+ else
+ aa = a.getLong();
+
+ if(isDouble(b))
+ bb = b.getDouble();
+ else
+ bb = b.getLong();
+
+ double error = aa - bb;
+ if(aa != 0 && bb != 0)
+ error /= aa;
+
+ return uprv_fabs(error);
+}
+
+UnicodeString&
+NumberFormatRoundTripTest::typeOf(const Formattable& n, UnicodeString& result)
+{
+ if(n.getType() == Formattable::kLong) {
+ result = UnicodeString(" Long");
+ }
+ else if(n.getType() == Formattable::kDouble) {
+ result = UnicodeString(" Double");
+ }
+ else if(n.getType() == Formattable::kString) {
+ result = UnicodeString(" UnicodeString");
+ UnicodeString temp;
+ }
+
+ return result;
+}
+
+
+UnicodeString&
+NumberFormatRoundTripTest::escape(UnicodeString& s)
+{
+ UnicodeString copy(s);
+ s.remove();
+ for(int i = 0; i < copy.length(); ++i) {
+ UChar c = copy[i];
+ if(c < 0x00FF)
+ s += c;
+ else {
+ s += "+U";
+ char temp[16];
+ sprintf(temp, "%4X", c); // might not work
+ s += temp;
+ }
+ }
+ return s;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.h b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.h
new file mode 100644
index 00000000000..12eff9a29d8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/nmfmtrt.h
@@ -0,0 +1,77 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _NUMBERFORMATROUNDTRIPTEST_
+#define _NUMBERFORMATROUNDTRIPTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/numfmt.h"
+#include "unicode/fmtable.h"
+#include "intltest.h"
+
+/**
+ * Performs round-trip tests for NumberFormat
+ **/
+class NumberFormatRoundTripTest : public IntlTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+ static UBool verbose;
+ static UBool STRING_COMPARE;
+ static UBool EXACT_NUMERIC_COMPARE;
+ static UBool DEBUG;
+ static double MAX_ERROR;
+ static double max_numeric_error;
+ static double min_numeric_error;
+
+
+ void start(void);
+
+ void test(NumberFormat *fmt);
+ void test(NumberFormat *fmt, double value);
+ void test(NumberFormat *fmt, int32_t value);
+ void test(NumberFormat *fmt, const Formattable& value);
+
+ static double randomDouble(double range);
+ static double proportionalError(const Formattable& a, const Formattable& b);
+ static UnicodeString& typeOf(const Formattable& n, UnicodeString& result);
+ static UnicodeString& escape(UnicodeString& s);
+
+ static inline UBool
+ isDouble(const Formattable& n)
+ { return (n.getType() == Formattable::kDouble); }
+
+ static inline UBool
+ isLong(const Formattable& n)
+ { return (n.getType() == Formattable::kLong); }
+
+ /*
+ * Return a random uint32_t
+ **/
+ static uint32_t randLong();
+
+ /**
+ * Return a random double 0 <= x < 1.0
+ **/
+ static double randFraction()
+ {
+ return (double)randLong() / (double)0xFFFFFFFF;
+ }
+
+protected:
+ UBool failure(UErrorCode status, const char* msg);
+
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _NUMBERFORMATROUNDTRIPTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/normconf.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/normconf.cpp
new file mode 100644
index 00000000000..c7a530dac9d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/normconf.cpp
@@ -0,0 +1,581 @@
+/*
+************************************************************************
+* Copyright (c) 1997-2004, International Business Machines
+* Corporation and others. All Rights Reserved.
+************************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#include "unicode/uchar.h"
+#include "unicode/normlzr.h"
+#include "unicode/uniset.h"
+#include "unicode/putil.h"
+#include "unormimp.h"
+#include "cstring.h"
+#include "filestrm.h"
+#include "normconf.h"
+#include <stdio.h>
+
+#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
+
+#define CASE(id,test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ break
+
+void NormalizerConformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/) {
+ switch (index) {
+ CASE(0, TestConformance);
+ CASE(1, TestConformance32);
+ // CASE(2, TestCase6);
+ default: name = ""; break;
+ }
+}
+
+#define FIELD_COUNT 5
+
+NormalizerConformanceTest::NormalizerConformanceTest() :
+ normalizer(UnicodeString(), UNORM_NFC) {}
+
+NormalizerConformanceTest::~NormalizerConformanceTest() {}
+
+// more interesting conformance test cases, not in the unicode.org NormalizationTest.txt
+static const char *moreCases[]={
+ // Markus 2001aug30
+ "0061 0332 0308;00E4 0332;0061 0332 0308;00E4 0332;0061 0332 0308; # Markus 0",
+
+ // Markus 2001oct26 - test edge case for iteration: U+0f73.cc==0 but decomposition.lead.cc==129
+ "0061 0301 0F73;00E1 0F71 0F72;0061 0F71 0F72 0301;00E1 0F71 0F72;0061 0F71 0F72 0301; # Markus 1"
+};
+
+void NormalizerConformanceTest::compare(const UnicodeString& s1, const UnicodeString& s2){
+ UErrorCode status=U_ZERO_ERROR;
+ // TODO: Re-enable this tests after UTC fixes UAX 21
+ if(s1.indexOf((UChar32)0x0345)>=0)return;
+ if(Normalizer::compare(s1,s2,U_FOLD_CASE_DEFAULT,status)!=0){
+ errln("Normalizer::compare() failed for s1: " + prettify(s1) + " s2: " +prettify(s2));
+ }
+}
+
+FileStream *
+NormalizerConformanceTest::openNormalizationTestFile(const char *filename) {
+ char unidataPath[2000];
+ const char *folder;
+ FileStream *input;
+ UErrorCode errorCode;
+
+ // look inside ICU_DATA first
+ folder=pathToDataDirectory();
+ if(folder!=NULL) {
+ strcpy(unidataPath, folder);
+ strcat(unidataPath, "unidata" U_FILE_SEP_STRING);
+ strcat(unidataPath, filename);
+ input=T_FileStream_open(unidataPath, "rb");
+ if(input!=NULL) {
+ return input;
+ }
+ }
+
+ // find icu/source/data/unidata relative to the test data
+ errorCode=U_ZERO_ERROR;
+ folder=loadTestData(errorCode);
+ if(U_SUCCESS(errorCode)) {
+ strcpy(unidataPath, folder);
+ strcat(unidataPath, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".."
+ U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".."
+ U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "unidata" U_FILE_SEP_STRING);
+ strcat(unidataPath, filename);
+ input=T_FileStream_open(unidataPath, "rb");
+ if(input!=NULL) {
+ return input;
+ }
+ }
+
+ // look in icu/source/test/testdata/out/build
+ errorCode=U_ZERO_ERROR;
+ folder=loadTestData(errorCode);
+ if(U_SUCCESS(errorCode)) {
+ strcpy(unidataPath, folder);
+ strcat(unidataPath, U_FILE_SEP_STRING);
+ strcat(unidataPath, filename);
+ input=T_FileStream_open(unidataPath, "rb");
+ if(input!=NULL) {
+ return input;
+ }
+ }
+
+ // look in icu/source/test/testdata
+ errorCode=U_ZERO_ERROR;
+ folder=loadTestData(errorCode);
+ if(U_SUCCESS(errorCode)) {
+ strcpy(unidataPath, folder);
+ strcat(unidataPath, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING);
+ strcat(unidataPath, filename);
+ input=T_FileStream_open(unidataPath, "rb");
+ if(input!=NULL) {
+ return input;
+ }
+ }
+
+ // find icu/source/data/unidata relative to U_TOPSRCDIR
+#if defined(U_TOPSRCDIR)
+ strcpy(unidataPath, U_TOPSRCDIR U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "unidata" U_FILE_SEP_STRING);
+ strcat(unidataPath, filename);
+ input=T_FileStream_open(unidataPath, "rb");
+ if(input!=NULL) {
+ return input;
+ }
+
+ strcpy(unidataPath, U_TOPSRCDIR U_FILE_SEP_STRING "test" U_FILE_SEP_STRING "testdata" U_FILE_SEP_STRING);
+ strcat(unidataPath, filename);
+ input=T_FileStream_open(unidataPath, "rb");
+ if(input!=NULL) {
+ return input;
+ }
+#endif
+
+ errln("Failed to open %s", filename);
+ return NULL;
+}
+
+/**
+ * Test the conformance of Normalizer to
+ * http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt
+ */
+void NormalizerConformanceTest::TestConformance() {
+ TestConformance(openNormalizationTestFile("NormalizationTest.txt"), 0);
+}
+
+void NormalizerConformanceTest::TestConformance32() {
+ TestConformance(openNormalizationTestFile("NormalizationTest-3.2.0.txt"), UNORM_UNICODE_3_2);
+}
+
+void NormalizerConformanceTest::TestConformance(FileStream *input, int32_t options) {
+ enum { BUF_SIZE = 1024 };
+ char lineBuf[BUF_SIZE];
+ UnicodeString fields[FIELD_COUNT];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t passCount = 0;
+ int32_t failCount = 0;
+ UChar32 c;
+
+ if(input==NULL) {
+ return;
+ }
+
+ // UnicodeSet for all code points that are not mentioned in NormalizationTest.txt
+ UnicodeSet other(0, 0x10ffff);
+
+ int32_t count, countMoreCases = sizeof(moreCases)/sizeof(moreCases[0]);
+ for (count = 1;;++count) {
+ if (!T_FileStream_eof(input)) {
+ T_FileStream_readLine(input, lineBuf, (int32_t)sizeof(lineBuf));
+ } else {
+ // once NormalizationTest.txt is finished, use moreCases[]
+ if(count > countMoreCases) {
+ count = 0;
+ } else if(count == countMoreCases) {
+ // all done
+ break;
+ }
+ uprv_strcpy(lineBuf, moreCases[count]);
+ }
+ if (lineBuf[0] == 0 || lineBuf[0] == '\n' || lineBuf[0] == '\r') continue;
+
+ // Expect 5 columns of this format:
+ // 1E0C;1E0C;0044 0323;1E0C;0044 0323; # <comments>
+
+ // Parse out the comment.
+ if (lineBuf[0] == '#') continue;
+
+ // Read separator lines starting with '@'
+ if (lineBuf[0] == '@') {
+ logln(lineBuf);
+ continue;
+ }
+
+ // Parse out the fields
+ if (!hexsplit(lineBuf, ';', fields, FIELD_COUNT)) {
+ errln((UnicodeString)"Unable to parse line " + count);
+ break; // Syntax error
+ }
+
+ // Remove a single code point from the "other" UnicodeSet
+ if(fields[0].length()==fields[0].moveIndex32(0, 1)) {
+ c=fields[0].char32At(0);
+ if(0xac20<=c && c<=0xd73f && quick) {
+ // not an exhaustive test run: skip most Hangul syllables
+ if(c==0xac20) {
+ other.remove(0xac20, 0xd73f);
+ }
+ continue;
+ }
+ other.remove(c);
+ }
+
+ if (checkConformance(fields, lineBuf, options, status)) {
+ ++passCount;
+ } else {
+ ++failCount;
+ if(status == U_FILE_ACCESS_ERROR) {
+ errln("Something is wrong with the normalizer, skipping the rest of the test.");
+ break;
+ }
+ }
+ if ((count % 1000) == 0) {
+ logln("Line %d", count);
+ }
+ }
+
+ T_FileStream_close(input);
+
+ /*
+ * Test that all characters that are not mentioned
+ * as single code points in column 1
+ * do not change under any normalization.
+ */
+
+ // remove U+ffff because that is the end-of-iteration sentinel value
+ other.remove(0xffff);
+
+ for(c=0; c<=0x10ffff; quick ? c+=113 : ++c) {
+ if(0x30000<=c && c<0xe0000) {
+ c=0xe0000;
+ }
+ if(!other.contains(c)) {
+ continue;
+ }
+
+ fields[0]=fields[1]=fields[2]=fields[3]=fields[4].setTo(c);
+ sprintf(lineBuf, "not mentioned code point U+%04lx", (long)c);
+
+ if (checkConformance(fields, lineBuf, options, status)) {
+ ++passCount;
+ } else {
+ ++failCount;
+ if(status == U_FILE_ACCESS_ERROR) {
+ errln("Something is wrong with the normalizer, skipping the rest of the test.");
+ break;
+ }
+ }
+ if ((c % 0x1000) == 0) {
+ logln("Code point U+%04lx", c);
+ }
+ }
+
+ if (failCount != 0) {
+ errln((UnicodeString)"Total: " + failCount + " lines/code points failed, " +
+ passCount + " lines/code points passed");
+ } else {
+ logln((UnicodeString)"Total: " + passCount + " lines/code points passed");
+ }
+}
+
+/**
+ * Verify the conformance of the given line of the Unicode
+ * normalization (UTR 15) test suite file. For each line,
+ * there are five columns, corresponding to field[0]..field[4].
+ *
+ * The following invariants must be true for all conformant implementations
+ * c2 == NFC(c1) == NFC(c2) == NFC(c3)
+ * c3 == NFD(c1) == NFD(c2) == NFD(c3)
+ * c4 == NFKC(c1) == NFKC(c2) == NFKC(c3) == NFKC(c4) == NFKC(c5)
+ * c5 == NFKD(c1) == NFKD(c2) == NFKD(c3) == NFKD(c4) == NFKD(c5)
+ *
+ * @param field the 5 columns
+ * @param line the source line from the test suite file
+ * @return true if the test passes
+ */
+UBool NormalizerConformanceTest::checkConformance(const UnicodeString* field,
+ const char *line,
+ int32_t options,
+ UErrorCode &status) {
+ UBool pass = TRUE, result;
+ //UErrorCode status = U_ZERO_ERROR;
+ UnicodeString out, fcd;
+ int32_t fieldNum;
+
+ for (int32_t i=0; i<FIELD_COUNT; ++i) {
+ fieldNum = i+1;
+ if (i<3) {
+ Normalizer::normalize(field[i], UNORM_NFC, options, out, status);
+ pass &= assertEqual("C", field[i], out, field[1], "c2!=C(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFC, options, out, +1);
+ pass &= assertEqual("C(+1)", field[i], out, field[1], "c2!=C(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFC, options, out, -1);
+ pass &= assertEqual("C(-1)", field[i], out, field[1], "c2!=C(c", fieldNum);
+
+ Normalizer::normalize(field[i], UNORM_NFD, options, out, status);
+ pass &= assertEqual("D", field[i], out, field[2], "c3!=D(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFD, options, out, +1);
+ pass &= assertEqual("D(+1)", field[i], out, field[2], "c3!=D(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFD, options, out, -1);
+ pass &= assertEqual("D(-1)", field[i], out, field[2], "c3!=D(c", fieldNum);
+ }
+ Normalizer::normalize(field[i], UNORM_NFKC, options, out, status);
+ pass &= assertEqual("KC", field[i], out, field[3], "c4!=KC(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFKC, options, out, +1);
+ pass &= assertEqual("KC(+1)", field[i], out, field[3], "c4!=KC(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFKC, options, out, -1);
+ pass &= assertEqual("KC(-1)", field[i], out, field[3], "c4!=KC(c", fieldNum);
+
+ Normalizer::normalize(field[i], UNORM_NFKD, options, out, status);
+ pass &= assertEqual("KD", field[i], out, field[4], "c5!=KD(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFKD, options, out, +1);
+ pass &= assertEqual("KD(+1)", field[i], out, field[4], "c5!=KD(c", fieldNum);
+ iterativeNorm(field[i], UNORM_NFKD, options, out, -1);
+ pass &= assertEqual("KD(-1)", field[i], out, field[4], "c5!=KD(c", fieldNum);
+ }
+ compare(field[1],field[2]);
+ compare(field[0],field[1]);
+ // test quick checks
+ if(UNORM_NO == Normalizer::quickCheck(field[1], UNORM_NFC, options, status)) {
+ errln("Normalizer error: quickCheck(NFC(s), UNORM_NFC) is UNORM_NO");
+ pass = FALSE;
+ }
+ if(UNORM_NO == Normalizer::quickCheck(field[2], UNORM_NFD, options, status)) {
+ errln("Normalizer error: quickCheck(NFD(s), UNORM_NFD) is UNORM_NO");
+ pass = FALSE;
+ }
+ if(UNORM_NO == Normalizer::quickCheck(field[3], UNORM_NFKC, options, status)) {
+ errln("Normalizer error: quickCheck(NFKC(s), UNORM_NFKC) is UNORM_NO");
+ pass = FALSE;
+ }
+ if(UNORM_NO == Normalizer::quickCheck(field[4], UNORM_NFKD, options, status)) {
+ errln("Normalizer error: quickCheck(NFKD(s), UNORM_NFKD) is UNORM_NO");
+ pass = FALSE;
+ }
+
+ // branch on options==0 for better code coverage
+ if(options==0) {
+ result = Normalizer::isNormalized(field[1], UNORM_NFC, status);
+ } else {
+ result = Normalizer::isNormalized(field[1], UNORM_NFC, options, status);
+ }
+ if(!result) {
+ errln("Normalizer error: isNormalized(NFC(s), UNORM_NFC) is FALSE");
+ pass = FALSE;
+ }
+ if(field[0]!=field[1] && Normalizer::isNormalized(field[0], UNORM_NFC, options, status)) {
+ errln("Normalizer error: isNormalized(s, UNORM_NFC) is TRUE");
+ pass = FALSE;
+ }
+ if(!Normalizer::isNormalized(field[3], UNORM_NFKC, options, status)) {
+ errln("Normalizer error: isNormalized(NFKC(s), UNORM_NFKC) is FALSE");
+ pass = FALSE;
+ }
+ if(field[0]!=field[3] && Normalizer::isNormalized(field[0], UNORM_NFKC, options, status)) {
+ errln("Normalizer error: isNormalized(s, UNORM_NFKC) is TRUE");
+ pass = FALSE;
+ }
+
+ // test FCD quick check and "makeFCD"
+ Normalizer::normalize(field[0], UNORM_FCD, options, fcd, status);
+ if(UNORM_NO == Normalizer::quickCheck(fcd, UNORM_FCD, options, status)) {
+ errln("Normalizer error: quickCheck(FCD(s), UNORM_FCD) is UNORM_NO");
+ pass = FALSE;
+ }
+ if(UNORM_NO == Normalizer::quickCheck(field[2], UNORM_FCD, options, status)) {
+ errln("Normalizer error: quickCheck(NFD(s), UNORM_FCD) is UNORM_NO");
+ pass = FALSE;
+ }
+ if(UNORM_NO == Normalizer::quickCheck(field[4], UNORM_FCD, options, status)) {
+ errln("Normalizer error: quickCheck(NFKD(s), UNORM_FCD) is UNORM_NO");
+ pass = FALSE;
+ }
+
+ Normalizer::normalize(fcd, UNORM_NFD, options, out, status);
+ if(out != field[2]) {
+ errln("Normalizer error: NFD(FCD(s))!=NFD(s)");
+ pass = FALSE;
+ }
+
+ if (U_FAILURE(status)) {
+ errln("Normalizer::normalize returned error status");
+ pass = FALSE;
+ }
+
+ if(field[0]!=field[2]) {
+ // two strings that are canonically equivalent must test
+ // equal under a canonical caseless match
+ // see UAX #21 Case Mappings and Jitterbug 2021 and
+ // Unicode Technical Committee meeting consensus 92-C31
+ int32_t rc;
+
+ status=U_ZERO_ERROR;
+ rc=Normalizer::compare(field[0], field[2], (options<<UNORM_COMPARE_NORM_OPTIONS_SHIFT)|U_COMPARE_IGNORE_CASE, status);
+ if(U_FAILURE(status)) {
+ errln("Normalizer::compare(case-insensitive) sets %s", u_errorName(status));
+ pass=FALSE;
+ } else if(rc!=0) {
+ errln("Normalizer::compare(original, NFD, case-insensitive) returned %d instead of 0 for equal", rc);
+ pass=FALSE;
+ }
+ }
+
+ if (!pass) {
+ errln("FAIL: %s", line);
+ }
+ return pass;
+}
+
+/**
+ * Do a normalization using the iterative API in the given direction.
+ * @param dir either +1 or -1
+ */
+void NormalizerConformanceTest::iterativeNorm(const UnicodeString& str,
+ UNormalizationMode mode, int32_t options,
+ UnicodeString& result,
+ int8_t dir) {
+ UErrorCode status = U_ZERO_ERROR;
+ normalizer.setText(str, status);
+ normalizer.setMode(mode);
+ normalizer.setOption(-1, 0); // reset all options
+ normalizer.setOption(options, 1); // set desired options
+ result.truncate(0);
+ if (U_FAILURE(status)) {
+ return;
+ }
+ UChar32 ch;
+ if (dir > 0) {
+ for (ch = normalizer.first(); ch != Normalizer::DONE;
+ ch = normalizer.next()) {
+ result.append(ch);
+ }
+ } else {
+ for (ch = normalizer.last(); ch != Normalizer::DONE;
+ ch = normalizer.previous()) {
+ result.insert(0, ch);
+ }
+ }
+}
+
+/**
+ * @param op name of normalization form, e.g., "KC"
+ * @param s string being normalized
+ * @param got value received
+ * @param exp expected value
+ * @param msg description of this test
+ * @param return true if got == exp
+ */
+UBool NormalizerConformanceTest::assertEqual(const char *op,
+ const UnicodeString& s,
+ const UnicodeString& got,
+ const UnicodeString& exp,
+ const char *msg,
+ int32_t field)
+{
+ if (exp == got)
+ return TRUE;
+
+ char *sChars, *gotChars, *expChars;
+ UnicodeString sPretty(prettify(s));
+ UnicodeString gotPretty(prettify(got));
+ UnicodeString expPretty(prettify(exp));
+
+ sChars = new char[sPretty.length() + 1];
+ gotChars = new char[gotPretty.length() + 1];
+ expChars = new char[expPretty.length() + 1];
+
+ sPretty.extract(0, sPretty.length(), sChars, sPretty.length() + 1);
+ sChars[sPretty.length()] = 0;
+ gotPretty.extract(0, gotPretty.length(), gotChars, gotPretty.length() + 1);
+ gotChars[gotPretty.length()] = 0;
+ expPretty.extract(0, expPretty.length(), expChars, expPretty.length() + 1);
+ expChars[expPretty.length()] = 0;
+
+ errln(" %s%d)%s(%s)=%s, exp. %s", msg, field, op, sChars, gotChars, expChars);
+
+ delete []sChars;
+ delete []gotChars;
+ delete []expChars;
+ return FALSE;
+}
+
+/**
+ * Split a string into pieces based on the given delimiter
+ * character. Then, parse the resultant fields from hex into
+ * characters. That is, "0040 0400;0C00;0899" -> new String[] {
+ * "\u0040\u0400", "\u0C00", "\u0899" }. The output is assumed to
+ * be of the proper length already, and exactly output.length
+ * fields are parsed. If there are too few an exception is
+ * thrown. If there are too many the extras are ignored.
+ *
+ * @return FALSE upon failure
+ */
+UBool NormalizerConformanceTest::hexsplit(const char *s, char delimiter,
+ UnicodeString output[], int32_t outputLength) {
+ const char *t = s;
+ char *end = NULL;
+ UChar32 c;
+ int32_t i;
+ for (i=0; i<outputLength; ++i) {
+ // skip whitespace
+ while(*t == ' ' || *t == '\t') {
+ ++t;
+ }
+
+ // read a sequence of code points
+ output[i].remove();
+ for(;;) {
+ c = (UChar32)uprv_strtoul(t, &end, 16);
+
+ if( (char *)t == end ||
+ (uint32_t)c > 0x10ffff ||
+ (*end != ' ' && *end != '\t' && *end != delimiter)
+ ) {
+ errln(UnicodeString("Bad field ", "") + (i + 1) + " in " + UnicodeString(s, ""));
+ return FALSE;
+ }
+
+ output[i].append(c);
+
+ t = (const char *)end;
+
+ // skip whitespace
+ while(*t == ' ' || *t == '\t') {
+ ++t;
+ }
+
+ if(*t == delimiter) {
+ ++t;
+ break;
+ }
+ if(*t == 0) {
+ if((i + 1) == outputLength) {
+ return TRUE;
+ } else {
+ errln(UnicodeString("Missing field(s) in ", "") + s + " only " + (i + 1) + " out of " + outputLength);
+ return FALSE;
+ }
+ }
+ }
+ }
+ return TRUE;
+}
+
+// Specific tests for debugging. These are generally failures taken from
+// the conformance file, but culled out to make debugging easier.
+
+void NormalizerConformanceTest::TestCase6(void) {
+ _testOneLine("0385;0385;00A8 0301;0020 0308 0301;0020 0308 0301;");
+}
+
+void NormalizerConformanceTest::_testOneLine(const char *line) {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString fields[FIELD_COUNT];
+ if (!hexsplit(line, ';', fields, FIELD_COUNT)) {
+ errln((UnicodeString)"Unable to parse line " + line);
+ } else {
+ checkConformance(fields, line, 0, status);
+ }
+}
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/normconf.h b/Build/source/libs/icu/icu-xetex/test/intltest/normconf.h
new file mode 100644
index 00000000000..472c2dfd61f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/normconf.h
@@ -0,0 +1,105 @@
+/*
+************************************************************************
+* Copyright (c) 1997-2003, International Business Machines
+* Corporation and others. All Rights Reserved.
+************************************************************************
+*/
+
+#ifndef _NORMCONF
+#define _NORMCONF
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#include "unicode/normlzr.h"
+#include "intltest.h"
+
+typedef struct _FileStream FileStream;
+
+class NormalizerConformanceTest : public IntlTest {
+ Normalizer normalizer;
+
+ public:
+ NormalizerConformanceTest();
+ virtual ~NormalizerConformanceTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+
+ /**
+ * Test the conformance of Normalizer to
+ * http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt
+ */
+ void TestConformance();
+ void TestConformance32();
+ void TestConformance(FileStream *input, int32_t options);
+
+ // Specific tests for debugging. These are generally failures taken from
+ // the conformance file, but culled out to make debugging easier.
+ void TestCase6(void);
+
+ private:
+ FileStream *openNormalizationTestFile(const char *filename);
+
+ /**
+ * Verify the conformance of the given line of the Unicode
+ * normalization (UTR 15) test suite file. For each line,
+ * there are five columns, corresponding to field[0]..field[4].
+ *
+ * The following invariants must be true for all conformant implementations
+ * c2 == NFC(c1) == NFC(c2) == NFC(c3)
+ * c3 == NFD(c1) == NFD(c2) == NFD(c3)
+ * c4 == NFKC(c1) == NFKC(c2) == NFKC(c3) == NFKC(c4) == NFKC(c5)
+ * c5 == NFKD(c1) == NFKD(c2) == NFKD(c3) == NFKD(c4) == NFKD(c5)
+ *
+ * @param field the 5 columns
+ * @param line the source line from the test suite file
+ * @return true if the test passes
+ */
+ UBool checkConformance(const UnicodeString* field,
+ const char *line,
+ int32_t options,
+ UErrorCode &status);
+
+ void iterativeNorm(const UnicodeString& str,
+ UNormalizationMode mode, int32_t options,
+ UnicodeString& result,
+ int8_t dir);
+
+ /**
+ * @param op name of normalization form, e.g., "KC"
+ * @param s string being normalized
+ * @param got value received
+ * @param exp expected value
+ * @param msg description of this test
+ * @param return true if got == exp
+ */
+ UBool assertEqual(const char *op,
+ const UnicodeString& s,
+ const UnicodeString& got,
+ const UnicodeString& exp,
+ const char *msg,
+ int32_t field);
+
+ /**
+ * Split a string into pieces based on the given delimiter
+ * character. Then, parse the resultant fields from hex into
+ * characters. That is, "0040 0400;0C00;0899" -> new String[] {
+ * "\u0040\u0400", "\u0C00", "\u0899" }. The output is assumed to
+ * be of the proper length already, and exactly output.length
+ * fields are parsed. If there are too few an exception is
+ * thrown. If there are too many the extras are ignored.
+ *
+ * @param buf scratch buffer
+ * @return FALSE upon failure
+ */
+ UBool hexsplit(const char *s, char delimiter,
+ UnicodeString output[], int32_t outputLength);
+
+ void _testOneLine(const char *line);
+ void compare(const UnicodeString& s1,const UnicodeString& s2);
+};
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/nptrans.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/nptrans.cpp
new file mode 100644
index 00000000000..eae8db5d59e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/nptrans.cpp
@@ -0,0 +1,289 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2005, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: nptrans.h
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003feb1
+ * created by: Ram Viswanadha
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+#if !UCONFIG_NO_IDNA
+
+#include "nptrans.h"
+#include "unicode/resbund.h"
+#include "unicode/uniset.h"
+#include "sprpimpl.h"
+#include "cmemory.h"
+#include "ustr_imp.h"
+#include "intltest.h"
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+const char NamePrepTransform::fgClassID=0;
+
+//Factory method
+NamePrepTransform* NamePrepTransform::createInstance(UParseError& parseError, UErrorCode& status){
+ NamePrepTransform* transform = new NamePrepTransform(parseError, status);
+ if(U_FAILURE(status)){
+ delete transform;
+ return NULL;
+ }
+ return transform;
+}
+
+//constructor
+NamePrepTransform::NamePrepTransform(UParseError& parseError, UErrorCode& status)
+: unassigned(), prohibited(), labelSeparatorSet(){
+
+ mapping = NULL;
+ bundle = NULL;
+
+
+ const char* testDataName = IntlTest::loadTestData(status);
+
+ if(U_FAILURE(status)){
+ return;
+ }
+
+ bundle = ures_openDirect(testDataName,"idna_rules",&status);
+
+ if(bundle != NULL && U_SUCCESS(status)){
+ // create the mapping transliterator
+ int32_t ruleLen = 0;
+ const UChar* ruleUChar = ures_getStringByKey(bundle, "MapNFKC",&ruleLen, &status);
+ int32_t mapRuleLen = 0;
+ const UChar *mapRuleUChar = ures_getStringByKey(bundle, "MapNoNormalization", &mapRuleLen, &status);
+ UnicodeString rule(mapRuleUChar, mapRuleLen);
+ rule.append(ruleUChar, ruleLen);
+
+ mapping = Transliterator::createFromRules(UnicodeString("NamePrepTransform", ""), rule,
+ UTRANS_FORWARD, parseError,status);
+ if(U_FAILURE(status)) {
+ return;
+ }
+
+ //create the unassigned set
+ int32_t patternLen =0;
+ const UChar* pattern = ures_getStringByKey(bundle,"UnassignedSet",&patternLen, &status);
+ unassigned.applyPattern(UnicodeString(pattern, patternLen), status);
+
+ //create prohibited set
+ patternLen=0;
+ pattern = ures_getStringByKey(bundle,"ProhibitedSet",&patternLen, &status);
+ UnicodeString test(pattern,patternLen);
+ prohibited.applyPattern(test,status);
+#ifdef DEBUG
+ if(U_FAILURE(status)){
+ printf("Construction of Unicode set failed\n");
+ }
+
+ if(U_SUCCESS(status)){
+ if(prohibited.contains((UChar) 0x644)){
+ printf("The string contains 0x644 ... damn !!\n");
+ }
+ UnicodeString temp;
+ prohibited.toPattern(temp,TRUE);
+
+ for(int32_t i=0;i<temp.length();i++){
+ printf("%c", (char)temp.charAt(i));
+ }
+ printf("\n");
+ }
+#endif
+
+ //create label separator set
+ patternLen=0;
+ pattern = ures_getStringByKey(bundle,"LabelSeparatorSet",&patternLen, &status);
+ labelSeparatorSet.applyPattern(UnicodeString(pattern,patternLen),status);
+ }
+
+ if(U_SUCCESS(status) &&
+ (mapping == NULL)
+ ){
+ status = U_MEMORY_ALLOCATION_ERROR;
+ delete mapping;
+ ures_close(bundle);
+ mapping = NULL;
+ bundle = NULL;
+ }
+
+}
+
+
+UBool NamePrepTransform::isProhibited(UChar32 ch){
+ return (UBool)(ch != ASCII_SPACE);
+}
+
+NamePrepTransform::~NamePrepTransform(){
+ delete mapping;
+ mapping = NULL;
+
+ //close the bundle
+ ures_close(bundle);
+ bundle = NULL;
+}
+
+
+int32_t NamePrepTransform::map(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ UBool allowUnassigned,
+ UParseError* /*parseError*/,
+ UErrorCode& status ){
+
+ if(U_FAILURE(status)){
+ return 0;
+ }
+ //check arguments
+ if(src==NULL || srcLength<-1 || (dest==NULL && destCapacity!=0)) {
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+
+ UnicodeString rsource(src,srcLength);
+ // map the code points
+ // transliteration also performs NFKC
+ mapping->transliterate(rsource);
+
+ const UChar* buffer = rsource.getBuffer();
+ int32_t bufLen = rsource.length();
+ // check if unassigned
+ if(allowUnassigned == FALSE){
+ int32_t bufIndex=0;
+ UChar32 ch =0 ;
+ for(;bufIndex<bufLen;){
+ U16_NEXT(buffer, bufIndex, bufLen, ch);
+ if(unassigned.contains(ch)){
+ status = U_IDNA_UNASSIGNED_ERROR;
+ return 0;
+ }
+ }
+ }
+ // check if there is enough room in the output
+ if(bufLen < destCapacity){
+ uprv_memcpy(dest,buffer,bufLen*U_SIZEOF_UCHAR);
+ }
+
+ return u_terminateUChars(dest, destCapacity, bufLen, &status);
+}
+
+
+#define MAX_BUFFER_SIZE 300
+
+int32_t NamePrepTransform::process( const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ UBool allowUnassigned,
+ UParseError* parseError,
+ UErrorCode& status ){
+ // check error status
+ if(U_FAILURE(status)){
+ return 0;
+ }
+
+ //check arguments
+ if(src==NULL || srcLength<-1 || (dest==NULL && destCapacity!=0)) {
+ status=U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+
+ UChar b1Stack[MAX_BUFFER_SIZE];
+ UChar *b1 = b1Stack;
+ int32_t b1Len,b1Capacity = MAX_BUFFER_SIZE;
+
+ int32_t b1Index = 0;
+ UCharDirection direction=U_CHAR_DIRECTION_COUNT, firstCharDir=U_CHAR_DIRECTION_COUNT;
+ UBool leftToRight=FALSE, rightToLeft=FALSE;
+
+ b1Len = map(src,srcLength, b1, b1Capacity,allowUnassigned,parseError, status);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ // redo processing of string
+ /* we do not have enough room so grow the buffer*/
+ if(!u_growBufferFromStatic(b1Stack,&b1,&b1Capacity,b1Len,0)){
+ status = U_MEMORY_ALLOCATION_ERROR;
+ goto CLEANUP;
+ }
+
+ status = U_ZERO_ERROR; // reset error
+
+ b1Len = map(src,srcLength, b1, b1Len,allowUnassigned, parseError, status);
+
+ }
+
+ if(U_FAILURE(status)){
+ goto CLEANUP;
+ }
+
+
+ for(; b1Index<b1Len; ){
+
+ UChar32 ch = 0;
+
+ U16_NEXT(b1, b1Index, b1Len, ch);
+
+ if(prohibited.contains(ch) && ch!=0x0020){
+ status = U_IDNA_PROHIBITED_ERROR;
+ goto CLEANUP;
+ }
+
+ direction = u_charDirection(ch);
+ if(firstCharDir==U_CHAR_DIRECTION_COUNT){
+ firstCharDir = direction;
+ }
+ if(direction == U_LEFT_TO_RIGHT){
+ leftToRight = TRUE;
+ }
+ if(direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC){
+ rightToLeft = TRUE;
+ }
+ }
+
+ // satisfy 2
+ if( leftToRight == TRUE && rightToLeft == TRUE){
+ status = U_IDNA_CHECK_BIDI_ERROR;
+ goto CLEANUP;
+ }
+
+ //satisfy 3
+ if( rightToLeft == TRUE &&
+ !((firstCharDir == U_RIGHT_TO_LEFT || firstCharDir == U_RIGHT_TO_LEFT_ARABIC) &&
+ (direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC))
+ ){
+ status = U_IDNA_CHECK_BIDI_ERROR;
+ return FALSE;
+ }
+
+ if(b1Len <= destCapacity){
+ uprv_memmove(dest,b1, b1Len*U_SIZEOF_UCHAR);
+ }
+
+CLEANUP:
+ if(b1!=b1Stack){
+ uprv_free(b1);
+ }
+
+ return u_terminateUChars(dest, destCapacity, b1Len, &status);
+}
+
+UBool NamePrepTransform::isLabelSeparator(UChar32 ch, UErrorCode& status){
+ // check error status
+ if(U_FAILURE(status)){
+ return FALSE;
+ }
+
+ return labelSeparatorSet.contains(ch);
+}
+
+#endif /* #if !UCONFIG_NO_IDNA */
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/nptrans.h b/Build/source/libs/icu/icu-xetex/test/intltest/nptrans.h
new file mode 100644
index 00000000000..ece53e3e8fd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/nptrans.h
@@ -0,0 +1,164 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: nptrans.h
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003feb1
+ * created by: Ram Viswanadha
+ */
+
+#ifndef NPTRANS_H
+#define NPTRANS_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/uniset.h"
+#include "unicode/ures.h"
+#include "unicode/translit.h"
+
+#include "intltest.h"
+
+
+#define ASCII_SPACE 0x0020
+
+class NamePrepTransform {
+
+private :
+ Transliterator *mapping;
+ UnicodeSet unassigned;
+ UnicodeSet prohibited;
+ UnicodeSet labelSeparatorSet;
+ UResourceBundle *bundle;
+ NamePrepTransform(UParseError& parseError, UErrorCode& status);
+
+
+public :
+
+ static NamePrepTransform* createInstance(UParseError& parseError, UErrorCode& status);
+
+ virtual ~NamePrepTransform();
+
+
+ inline UBool isProhibited(UChar32 ch);
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @draft ICU 2.6
+ */
+ inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @draft ICU 2.6
+ */
+ static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+
+ /**
+ * Map every character in input stream with mapping character
+ * in the mapping table and populate the output stream.
+ * For any individual character the mapping table may specify
+ * that that a character be mapped to nothing, mapped to one
+ * other character or to a string of other characters.
+ *
+ * @param src Pointer to UChar buffer containing a single label
+ * @param srcLength Number of characters in the source label
+ * @param dest Pointer to the destination buffer to receive the output
+ * @param destCapacity The capacity of destination array
+ * @param allowUnassigned Unassigned values can be converted to ASCII for query operations
+ * If TRUE unassigned values are treated as normal Unicode code point.
+ * If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ * @param status ICU error code in/out parameter.
+ * Must fulfill U_SUCCESS before the function call.
+ * @return The number of UChars in the destination buffer
+ *
+ */
+ int32_t map(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ UBool allowUnassigned,
+ UParseError* parseError,
+ UErrorCode& status );
+
+ /**
+ * Prepare the input stream with for use. This operation maps, normalizes(NFKC),
+ * checks for prohited and BiDi characters in the order defined by RFC 3454
+ *
+ * @param src Pointer to UChar buffer containing a single label
+ * @param srcLength Number of characters in the source label
+ * @param dest Pointer to the destination buffer to receive the output
+ * @param destCapacity The capacity of destination array
+ * @param allowUnassigned Unassigned values can be converted to ASCII for query operations
+ * If TRUE unassigned values are treated as normal Unicode code point.
+ * If FALSE the operation fails with U_UNASSIGNED_CODE_POINT error code.
+ * @param status ICU error code in/out parameter.
+ * Must fulfill U_SUCCESS before the function call.
+ * @return The number of UChars in the destination buffer
+ */
+ int32_t process(const UChar* src, int32_t srcLength,
+ UChar* dest, int32_t destCapacity,
+ UBool allowUnassigned,
+ UParseError* parseError,
+ UErrorCode& status );
+
+ /**
+ * Ascertain if the given code point is a label separator as specified by IDNA
+ *
+ * @return TRUE is the code point is a label separator
+ *
+ *
+ */
+ UBool isLabelSeparator(UChar32 ch, UErrorCode& status);
+
+
+ inline UBool isLDHChar(UChar32 ch);
+private:
+ /**
+ * The address of this static class variable serves as this class's ID
+ * for ICU "poor man's RTTI".
+ */
+ static const char fgClassID;
+};
+
+inline UBool NamePrepTransform::isLDHChar(UChar32 ch){
+ // high runner case
+ if(ch>0x007A){
+ return FALSE;
+ }
+ //[\\u002D \\u0030-\\u0039 \\u0041-\\u005A \\u0061-\\u007A]
+ if( (ch==0x002D) ||
+ (0x0030 <= ch && ch <= 0x0039) ||
+ (0x0041 <= ch && ch <= 0x005A) ||
+ (0x0061 <= ch && ch <= 0x007A)
+ ){
+ return TRUE;
+ }
+ return FALSE;
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+#else
+class NamePrepTransform {
+};
+#endif /* #if !UCONFIG_NO_IDNA */
+
+#endif
+
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.cpp
new file mode 100644
index 00000000000..14d8f113ce6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.cpp
@@ -0,0 +1,2412 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/* Modification History:
+* Date Name Description
+* 07/15/99 helena Ported to HPUX 10/11 CC.
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "numfmtst.h"
+#include "unicode/dcfmtsym.h"
+#include "unicode/decimfmt.h"
+#include "unicode/ucurr.h"
+#include "unicode/ustring.h"
+#include "unicode/measfmt.h"
+#include "unicode/curramt.h"
+#include "digitlst.h"
+#include "textfile.h"
+#include "tokiter.h"
+#include "charstr.h"
+#include "putilimp.h"
+#include "winnmtst.h"
+#include <float.h>
+#include <string.h>
+
+static const UChar EUR[] = {69,85,82,0}; // "EUR"
+
+// *****************************************************************************
+// class NumberFormatTest
+// *****************************************************************************
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+
+#define CHECK(status,str) if (U_FAILURE(status)) { errln(UnicodeString("FAIL: ") + str); return; }
+
+void NumberFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite DateFormatTest");
+ switch (index) {
+ CASE(0,TestCurrencySign);
+ CASE(1,TestCurrency);
+ CASE(2,TestParse);
+ CASE(3,TestRounding487);
+ CASE(4,TestQuotes);
+ CASE(5,TestExponential);
+ CASE(6,TestPatterns);
+
+ // Upgrade to alphaWorks - liu 5/99
+ CASE(7,TestExponent);
+ CASE(8,TestScientific);
+ CASE(9,TestPad);
+ CASE(10,TestPatterns2);
+ CASE(11,TestSecondaryGrouping);
+ CASE(12,TestSurrogateSupport);
+ CASE(13,TestAPI);
+
+ CASE(14,TestCurrencyObject);
+ CASE(15,TestCurrencyPatterns);
+ //CASE(16,TestDigitList);
+ CASE(16,TestWhiteSpaceParsing);
+ CASE(17,TestComplexCurrency);
+ CASE(18,TestRegCurrency);
+ CASE(19,TestSymbolsWithBadLocale);
+ CASE(20,TestAdoptDecimalFormatSymbols);
+
+ CASE(21,TestScientific2);
+ CASE(22,TestScientificGrouping);
+ CASE(23,TestInt64);
+
+ CASE(24,TestPerMill);
+ CASE(25,TestIllegalPatterns);
+ CASE(26,TestCases);
+
+ CASE(27,TestCurrencyNames);
+ CASE(28,TestCurrencyAmount);
+ CASE(29,TestCurrencyUnit);
+ CASE(30,TestCoverage);
+ CASE(31,TestJB3832);
+ CASE(32,TestHost);
+ CASE(33,TestHostClone);
+ CASE(34,TestCurrencyFormat);
+ CASE(35,TestRounding);
+ default: name = ""; break;
+ }
+}
+
+// -------------------------------------
+
+// Test API (increase code coverage)
+void
+NumberFormatTest::TestAPI(void)
+{
+ logln("Test API");
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *test = NumberFormat::createInstance("root", status);
+ if(U_FAILURE(status)) {
+ errln("unable to create format object");
+ }
+ if(test != NULL) {
+ test->setMinimumIntegerDigits(10);
+ test->setMaximumIntegerDigits(2);
+
+ test->setMinimumFractionDigits(10);
+ test->setMaximumFractionDigits(2);
+
+ UnicodeString result;
+ FieldPosition pos;
+ Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers
+ test->format(bla, result, pos, status);
+ if(U_SUCCESS(status)) {
+ errln("Yuck... Formatted a duck... As a number!");
+ } else {
+ status = U_ZERO_ERROR;
+ }
+
+ result.remove();
+ int64_t ll = 12;
+ test->format(ll, result);
+ if (result != "12.00"){
+ errln("format int64_t error");
+ }
+
+ delete test;
+ }
+}
+
+class StubNumberForamt :public NumberFormat{
+public:
+ StubNumberForamt(){};
+ virtual UnicodeString& format(double ,UnicodeString& appendTo,FieldPosition& ) const {
+ return appendTo;
+ }
+ virtual UnicodeString& format(int32_t ,UnicodeString& appendTo,FieldPosition& ) const {
+ return appendTo.append((UChar)0x0033);
+ }
+ virtual UnicodeString& format(int64_t number,UnicodeString& appendTo,FieldPosition& pos) const {
+ return NumberFormat::format(number, appendTo, pos);
+ }
+ virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErrorCode& ) const {
+ return appendTo;
+ }
+ virtual void parse(const UnicodeString& ,
+ Formattable& ,
+ ParsePosition& ) const {}
+ virtual void parse( const UnicodeString& ,
+ Formattable& ,
+ UErrorCode& ) const {}
+ virtual UClassID getDynamicClassID(void) const {
+ static char classID = 0;
+ return (UClassID)&classID;
+ }
+ virtual Format* clone() const {return NULL;}
+};
+
+void
+NumberFormatTest::TestCoverage(void){
+ StubNumberForamt stub;
+ UnicodeString agent("agent");
+ FieldPosition pos;
+ int64_t num = 4;
+ if (stub.format(num, agent, pos) != UnicodeString("agent3")){
+ errln("NumberFormat::format(int64, UnicodString&, FieldPosition&) should delegate to (int32, ,)");
+ };
+}
+
+// Test various patterns
+void
+NumberFormatTest::TestPatterns(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols sym(Locale::getUS(), status);
+ if (U_FAILURE(status)) { errln("FAIL: Could not construct DecimalFormatSymbols"); return; }
+
+ const char* pat[] = { "#.#", "#.", ".#", "#" };
+ int32_t pat_length = (int32_t)(sizeof(pat) / sizeof(pat[0]));
+ const char* newpat[] = { "#0.#", "#0.", "#.0", "#" };
+ const char* num[] = { "0", "0.", ".0", "0" };
+ for (int32_t i=0; i<pat_length; ++i)
+ {
+ status = U_ZERO_ERROR;
+ DecimalFormat fmt(pat[i], sym, status);
+ if (U_FAILURE(status)) { errln((UnicodeString)"FAIL: DecimalFormat constructor failed for " + pat[i]); continue; }
+ UnicodeString newp; fmt.toPattern(newp);
+ if (!(newp == newpat[i]))
+ errln((UnicodeString)"FAIL: Pattern " + pat[i] + " should transmute to " + newpat[i] +
+ "; " + newp + " seen instead");
+
+ UnicodeString s; (*(NumberFormat*)&fmt).format((int32_t)0, s);
+ if (!(s == num[i]))
+ {
+ errln((UnicodeString)"FAIL: Pattern " + pat[i] + " should format zero as " + num[i] +
+ "; " + s + " seen instead");
+ logln((UnicodeString)"Min integer digits = " + fmt.getMinimumIntegerDigits());
+ }
+ }
+}
+
+/*
+icu_2_4::DigitList::operator== 0 0 2 icuuc24d.dll digitlst.cpp Doug
+icu_2_4::DigitList::append 0 0 4 icuin24d.dll digitlst.h Doug
+icu_2_4::DigitList::operator!= 0 0 1 icuuc24d.dll digitlst.h Doug
+*/
+/*
+void
+NumberFormatTest::TestDigitList(void)
+{
+ // API coverage for DigitList
+ DigitList list1;
+ list1.append('1');
+ list1.fDecimalAt = 1;
+ DigitList list2;
+ list2.set((int32_t)1);
+ if (list1 != list2) {
+ errln("digitlist append, operator!= or set failed ");
+ }
+ if (!(list1 == list2)) {
+ errln("digitlist append, operator== or set failed ");
+ }
+}
+*/
+
+// -------------------------------------
+
+// Test exponential pattern
+void
+NumberFormatTest::TestExponential(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols sym(Locale::getUS(), status);
+ if (U_FAILURE(status)) { errln("FAIL: Bad status returned by DecimalFormatSymbols ct"); return; }
+ const char* pat[] = { "0.####E0", "00.000E00", "##0.######E000", "0.###E0;[0.###E0]" };
+ int32_t pat_length = (int32_t)(sizeof(pat) / sizeof(pat[0]));
+
+// The following #if statements allow this test to be built and run on
+// platforms that do not have standard IEEE numerics. For example,
+// S/390 doubles have an exponent range of -78 to +75. For the
+// following #if statements to work, float.h must define
+// DBL_MAX_10_EXP to be a compile-time constant.
+
+// This section may be expanded as needed.
+
+#if DBL_MAX_10_EXP > 300
+ double val[] = { 0.01234, 123456789, 1.23e300, -3.141592653e-271 };
+ int32_t val_length = (int32_t)(sizeof(val) / sizeof(val[0]));
+ const char* valFormat[] =
+ {
+ // 0.####E0
+ "1.234E-2", "1.2346E8", "1.23E300", "-3.1416E-271",
+ // 00.000E00
+ "12.340E-03", "12.346E07", "12.300E299", "-31.416E-272",
+ // ##0.######E000
+ "12.34E-003", "123.4568E006", "1.23E300", "-314.1593E-273",
+ // 0.###E0;[0.###E0]
+ "1.234E-2", "1.235E8", "1.23E300", "[3.142E-271]"
+ };
+ double valParse[] =
+ {
+ 0.01234, 123460000, 1.23E300, -3.1416E-271,
+ 0.01234, 123460000, 1.23E300, -3.1416E-271,
+ 0.01234, 123456800, 1.23E300, -3.141593E-271,
+ 0.01234, 123500000, 1.23E300, -3.142E-271,
+ };
+#elif DBL_MAX_10_EXP > 70
+ double val[] = { 0.01234, 123456789, 1.23e70, -3.141592653e-71 };
+ int32_t val_length = sizeof(val) / sizeof(val[0]);
+ char* valFormat[] =
+ {
+ // 0.####E0
+ "1.234E-2", "1.2346E8", "1.23E70", "-3.1416E-71",
+ // 00.000E00
+ "12.340E-03", "12.346E07", "12.300E69", "-31.416E-72",
+ // ##0.######E000
+ "12.34E-003", "123.4568E006", "12.3E069", "-31.41593E-072",
+ // 0.###E0;[0.###E0]
+ "1.234E-2", "1.235E8", "1.23E70", "[3.142E-71]"
+ };
+ double valParse[] =
+ {
+ 0.01234, 123460000, 1.23E70, -3.1416E-71,
+ 0.01234, 123460000, 1.23E70, -3.1416E-71,
+ 0.01234, 123456800, 1.23E70, -3.141593E-71,
+ 0.01234, 123500000, 1.23E70, -3.142E-71,
+ };
+#else
+ // Don't test double conversion
+ double* val = 0;
+ int32_t val_length = 0;
+ char** valFormat = 0;
+ double* valParse = 0;
+ logln("Warning: Skipping double conversion tests");
+#endif
+
+ int32_t lval[] = { 0, -1, 1, 123456789 };
+ int32_t lval_length = (int32_t)(sizeof(lval) / sizeof(lval[0]));
+ const char* lvalFormat[] =
+ {
+ // 0.####E0
+ "0E0", "-1E0", "1E0", "1.2346E8",
+ // 00.000E00
+ "00.000E00", "-10.000E-01", "10.000E-01", "12.346E07",
+ // ##0.######E000
+ "0E000", "-1E000", "1E000", "123.4568E006",
+ // 0.###E0;[0.###E0]
+ "0E0", "[1E0]", "1E0", "1.235E8"
+ };
+ int32_t lvalParse[] =
+ {
+ 0, -1, 1, 123460000,
+ 0, -1, 1, 123460000,
+ 0, -1, 1, 123456800,
+ 0, -1, 1, 123500000,
+ };
+ int32_t ival = 0, ilval = 0;
+ for (int32_t p=0; p<pat_length; ++p)
+ {
+ DecimalFormat fmt(pat[p], sym, status);
+ if (U_FAILURE(status)) { errln("FAIL: Bad status returned by DecimalFormat ct"); continue; }
+ UnicodeString pattern;
+ logln((UnicodeString)"Pattern \"" + pat[p] + "\" -toPattern-> \"" +
+ fmt.toPattern(pattern) + "\"");
+ int32_t v;
+ for (v=0; v<val_length; ++v)
+ {
+ UnicodeString s; (*(NumberFormat*)&fmt).format(val[v], s);
+ logln((UnicodeString)" " + val[v] + " -format-> " + s);
+ if (s != valFormat[v+ival])
+ errln((UnicodeString)"FAIL: Expected " + valFormat[v+ival]);
+
+ ParsePosition pos(0);
+ Formattable af;
+ fmt.parse(s, af, pos);
+ double a;
+ UBool useEpsilon = FALSE;
+ if (af.getType() == Formattable::kLong)
+ a = af.getLong();
+ else if (af.getType() == Formattable::kDouble) {
+ a = af.getDouble();
+#if defined(OS390) || defined(OS400)
+ // S/390 will show a failure like this:
+ //| -3.141592652999999e-271 -format-> -3.1416E-271
+ //| -parse-> -3.1416e-271
+ //| FAIL: Expected -3.141599999999999e-271
+ // To compensate, we use an epsilon-based equality
+ // test on S/390 only. We don't want to do this in
+ // general because it's less exacting.
+ useEpsilon = TRUE;
+#endif
+ }
+ else {
+ errln((UnicodeString)"FAIL: Non-numeric Formattable returned");
+ continue;
+ }
+ if (pos.getIndex() == s.length())
+ {
+ logln((UnicodeString)" -parse-> " + a);
+ // Use epsilon comparison as necessary
+ if ((useEpsilon &&
+ (uprv_fabs(a - valParse[v+ival]) / a > (2*DBL_EPSILON))) ||
+ (!useEpsilon && a != valParse[v+ival]))
+ {
+ errln((UnicodeString)"FAIL: Expected " + valParse[v+ival]);
+ }
+ }
+ else {
+ errln((UnicodeString)"FAIL: Partial parse (" + pos.getIndex() + " chars) -> " + a);
+ errln((UnicodeString)" should be (" + s.length() + " chars) -> " + valParse[v+ival]);
+ }
+ }
+ for (v=0; v<lval_length; ++v)
+ {
+ UnicodeString s;
+ (*(NumberFormat*)&fmt).format(lval[v], s);
+ logln((UnicodeString)" " + lval[v] + "L -format-> " + s);
+ if (s != lvalFormat[v+ilval])
+ errln((UnicodeString)"ERROR: Expected " + lvalFormat[v+ilval] + " Got: " + s);
+
+ ParsePosition pos(0);
+ Formattable af;
+ fmt.parse(s, af, pos);
+ if (af.getType() == Formattable::kLong ||
+ af.getType() == Formattable::kInt64) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t a = af.getLong(status);
+ if (pos.getIndex() == s.length())
+ {
+ logln((UnicodeString)" -parse-> " + a);
+ if (a != lvalParse[v+ilval])
+ errln((UnicodeString)"FAIL: Expected " + lvalParse[v+ilval]);
+ }
+ else
+ errln((UnicodeString)"FAIL: Partial parse (" + pos.getIndex() + " chars) -> " + a);
+ }
+ else
+ errln((UnicodeString)"FAIL: Non-long Formattable returned for " + s
+ + " Double: " + af.getDouble()
+ + ", Long: " + af.getLong());
+ }
+ ival += val_length;
+ ilval += lval_length;
+ }
+}
+
+void
+NumberFormatTest::TestScientific2() {
+ // jb 2552
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat* fmt = (DecimalFormat*)NumberFormat::createCurrencyInstance("en_US", status);
+ if (U_SUCCESS(status)) {
+ double num = 12.34;
+ expect(*fmt, num, "$12.34");
+ fmt->setScientificNotation(TRUE);
+ expect(*fmt, num, "$1.23E1");
+ fmt->setScientificNotation(FALSE);
+ expect(*fmt, num, "$12.34");
+ }
+ delete fmt;
+}
+
+void
+NumberFormatTest::TestScientificGrouping() {
+ // jb 2552
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat fmt("##0.00E0",status);
+ if (U_SUCCESS(status)) {
+ expect(fmt, .01234, "12.3E-3");
+ expect(fmt, .1234, "123E-3");
+ expect(fmt, 1.234, "1.23E0");
+ expect(fmt, 12.34, "12.3E0");
+ expect(fmt, 123.4, "123E0");
+ expect(fmt, 1234., "1.23E3");
+ }
+}
+
+/*static void setFromString(DigitList& dl, const char* str) {
+ char c;
+ UBool decimalSet = FALSE;
+ dl.clear();
+ while ((c = *str++)) {
+ if (c == '-') {
+ dl.fIsPositive = FALSE;
+ } else if (c == '+') {
+ dl.fIsPositive = TRUE;
+ } else if (c == '.') {
+ dl.fDecimalAt = dl.fCount;
+ decimalSet = TRUE;
+ } else {
+ dl.append(c);
+ }
+ }
+ if (!decimalSet) {
+ dl.fDecimalAt = dl.fCount;
+ }
+}*/
+
+void
+NumberFormatTest::TestInt64() {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat fmt("#.#E0",status);
+ fmt.setMaximumFractionDigits(20);
+ if (U_SUCCESS(status)) {
+ expect(fmt, (Formattable)(int64_t)0, "0E0");
+ expect(fmt, (Formattable)(int64_t)-1, "-1E0");
+ expect(fmt, (Formattable)(int64_t)1, "1E0");
+ expect(fmt, (Formattable)(int64_t)2147483647, "2.147483647E9");
+ expect(fmt, (Formattable)((int64_t)-2147483647-1), "-2.147483648E9");
+ expect(fmt, (Formattable)(int64_t)U_INT64_MAX, "9.223372036854775807E18");
+ expect(fmt, (Formattable)(int64_t)U_INT64_MIN, "-9.223372036854775808E18");
+ }
+
+ // also test digitlist
+/* int64_t int64max = U_INT64_MAX;
+ int64_t int64min = U_INT64_MIN;
+ const char* int64maxstr = "9223372036854775807";
+ const char* int64minstr = "-9223372036854775808";
+ UnicodeString fail("fail: ");
+
+ // test max int64 value
+ DigitList dl;
+ setFromString(dl, int64maxstr);
+ {
+ if (!dl.fitsIntoInt64(FALSE)) {
+ errln(fail + int64maxstr + " didn't fit");
+ }
+ int64_t int64Value = dl.getInt64();
+ if (int64Value != int64max) {
+ errln(fail + int64maxstr);
+ }
+ dl.set(int64Value);
+ int64Value = dl.getInt64();
+ if (int64Value != int64max) {
+ errln(fail + int64maxstr);
+ }
+ }
+ // test negative of max int64 value (1 shy of min int64 value)
+ dl.fIsPositive = FALSE;
+ {
+ if (!dl.fitsIntoInt64(FALSE)) {
+ errln(fail + "-" + int64maxstr + " didn't fit");
+ }
+ int64_t int64Value = dl.getInt64();
+ if (int64Value != -int64max) {
+ errln(fail + "-" + int64maxstr);
+ }
+ dl.set(int64Value);
+ int64Value = dl.getInt64();
+ if (int64Value != -int64max) {
+ errln(fail + "-" + int64maxstr);
+ }
+ }
+ // test min int64 value
+ setFromString(dl, int64minstr);
+ {
+ if (!dl.fitsIntoInt64(FALSE)) {
+ errln(fail + "-" + int64minstr + " didn't fit");
+ }
+ int64_t int64Value = dl.getInt64();
+ if (int64Value != int64min) {
+ errln(fail + int64minstr);
+ }
+ dl.set(int64Value);
+ int64Value = dl.getInt64();
+ if (int64Value != int64min) {
+ errln(fail + int64minstr);
+ }
+ }
+ // test negative of min int 64 value (1 more than max int64 value)
+ dl.fIsPositive = TRUE; // won't fit
+ {
+ if (dl.fitsIntoInt64(FALSE)) {
+ errln(fail + "-(" + int64minstr + ") didn't fit");
+ }
+ }*/
+}
+
+// -------------------------------------
+
+// Test the handling of quotes
+void
+NumberFormatTest::TestQuotes(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString *pat;
+ DecimalFormatSymbols *sym = new DecimalFormatSymbols(Locale::getUS(), status);
+ pat = new UnicodeString("a'fo''o'b#");
+ DecimalFormat *fmt = new DecimalFormat(*pat, *sym, status);
+ UnicodeString s;
+ ((NumberFormat*)fmt)->format((int32_t)123, s);
+ logln((UnicodeString)"Pattern \"" + *pat + "\"");
+ logln((UnicodeString)" Format 123 -> " + escape(s));
+ if (!(s=="afo'ob123"))
+ errln((UnicodeString)"FAIL: Expected afo'ob123");
+
+ s.truncate(0);
+ delete fmt;
+ delete pat;
+
+ pat = new UnicodeString("a''b#");
+ fmt = new DecimalFormat(*pat, *sym, status);
+ ((NumberFormat*)fmt)->format((int32_t)123, s);
+ logln((UnicodeString)"Pattern \"" + *pat + "\"");
+ logln((UnicodeString)" Format 123 -> " + escape(s));
+ if (!(s=="a'b123"))
+ errln((UnicodeString)"FAIL: Expected a'b123");
+ delete fmt;
+ delete pat;
+ delete sym;
+}
+
+/**
+ * Test the handling of the currency symbol in patterns.
+ */
+void
+NumberFormatTest::TestCurrencySign(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols* sym = new DecimalFormatSymbols(Locale::getUS(), status);
+ UnicodeString pat;
+ UChar currency = 0x00A4;
+ // "\xA4#,##0.00;-\xA4#,##0.00"
+ pat.append(currency).append("#,##0.00;-").
+ append(currency).append("#,##0.00");
+ DecimalFormat *fmt = new DecimalFormat(pat, *sym, status);
+ UnicodeString s; ((NumberFormat*)fmt)->format(1234.56, s);
+ pat.truncate(0);
+ logln((UnicodeString)"Pattern \"" + fmt->toPattern(pat) + "\"");
+ logln((UnicodeString)" Format " + 1234.56 + " -> " + escape(s));
+ if (s != "$1,234.56") errln((UnicodeString)"FAIL: Expected $1,234.56");
+ s.truncate(0);
+ ((NumberFormat*)fmt)->format(- 1234.56, s);
+ logln((UnicodeString)" Format " + (-1234.56) + " -> " + escape(s));
+ if (s != "-$1,234.56") errln((UnicodeString)"FAIL: Expected -$1,234.56");
+ delete fmt;
+ pat.truncate(0);
+ // "\xA4\xA4 #,##0.00;\xA4\xA4 -#,##0.00"
+ pat.append(currency).append(currency).
+ append(" #,##0.00;").
+ append(currency).append(currency).
+ append(" -#,##0.00");
+ fmt = new DecimalFormat(pat, *sym, status);
+ s.truncate(0);
+ ((NumberFormat*)fmt)->format(1234.56, s);
+ logln((UnicodeString)"Pattern \"" + fmt->toPattern(pat) + "\"");
+ logln((UnicodeString)" Format " + 1234.56 + " -> " + escape(s));
+ if (s != "USD 1,234.56") errln((UnicodeString)"FAIL: Expected USD 1,234.56");
+ s.truncate(0);
+ ((NumberFormat*)fmt)->format(-1234.56, s);
+ logln((UnicodeString)" Format " + (-1234.56) + " -> " + escape(s));
+ if (s != "USD -1,234.56") errln((UnicodeString)"FAIL: Expected USD -1,234.56");
+ delete fmt;
+ delete sym;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: Status " + (int32_t)status);
+}
+
+// -------------------------------------
+
+static UChar toHexString(int32_t i) { return (UChar)(i + (i < 10 ? 0x30 : (0x41 - 10))); }
+
+UnicodeString&
+NumberFormatTest::escape(UnicodeString& s)
+{
+ UnicodeString buf;
+ for (int32_t i=0; i<s.length(); ++i)
+ {
+ UChar c = s[(int32_t)i];
+ if (c <= (UChar)0x7F) buf += c;
+ else {
+ buf += (UChar)0x5c; buf += (UChar)0x55;
+ buf += toHexString((c & 0xF000) >> 12);
+ buf += toHexString((c & 0x0F00) >> 8);
+ buf += toHexString((c & 0x00F0) >> 4);
+ buf += toHexString(c & 0x000F);
+ }
+ }
+ return (s = buf);
+}
+
+
+// -------------------------------------
+static const char* testCases[][2]= {
+ /* locale ID */ /* expected */
+ {"ca_ES_PREEURO", "1.150 \\u20A7" },
+ {"de_LU_PREEURO", "1,150 F" },
+ {"el_GR_PREEURO", "1.150,50\\u0394\\u03C1\\u03C7" },
+ {"en_BE_PREEURO", "1.150,50 BF" },
+ {"es_ES_PREEURO", "1.150 \\u20A7" },
+ {"eu_ES_PREEURO", "1.150 \\u20A7" },
+ {"gl_ES_PREEURO", "1.150 \\u20A7" },
+ {"it_IT_PREEURO", "\\u20A4 1.150" },
+ {"pt_PT_PREEURO", "1,150$50 Esc."},
+ {"en_US@currency=JPY", "\\u00A51,150"}
+};
+/**
+ * Test localized currency patterns.
+ */
+void
+NumberFormatTest::TestCurrency(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat* currencyFmt = NumberFormat::createCurrencyInstance(Locale::getCanadaFrench(), status);
+ if (U_FAILURE(status)) {
+ dataerrln("Error calling NumberFormat::createCurrencyInstance()");
+ return;
+ }
+
+ UnicodeString s; currencyFmt->format(1.50, s);
+ logln((UnicodeString)"Un pauvre ici a..........." + s);
+ if (!(s=="1,50 $"))
+ errln((UnicodeString)"FAIL: Expected 1,50 $");
+ delete currencyFmt;
+ s.truncate(0);
+ char loc[256]={0};
+ int len = uloc_canonicalize("de_DE_PREEURO", loc, 256, &status);
+ currencyFmt = NumberFormat::createCurrencyInstance(Locale(loc),status);
+ currencyFmt->format(1.50, s);
+ logln((UnicodeString)"Un pauvre en Allemagne a.." + s);
+ if (!(s=="1,50 DM"))
+ errln((UnicodeString)"FAIL: Expected 1,50 DM");
+ delete currencyFmt;
+ s.truncate(0);
+ len = uloc_canonicalize("fr_FR_PREEURO", loc, 256, &status);
+ currencyFmt = NumberFormat::createCurrencyInstance(Locale(loc), status);
+ currencyFmt->format(1.50, s);
+ logln((UnicodeString)"Un pauvre en France a....." + s);
+ if (!(s=="1,50 F"))
+ errln((UnicodeString)"FAIL: Expected 1,50 F");
+ delete currencyFmt;
+ if (U_FAILURE(status))
+ errln((UnicodeString)"FAIL: Status " + (int32_t)status);
+
+ for(int i=0; i < (int)(sizeof(testCases)/sizeof(testCases[i])); i++){
+ status = U_ZERO_ERROR;
+ const char *localeID = testCases[i][0];
+ UnicodeString expected(testCases[i][1]);
+ expected = expected.unescape();
+ s.truncate(0);
+ char loc[256]={0};
+ uloc_canonicalize(localeID, loc, 256, &status);
+ currencyFmt = NumberFormat::createCurrencyInstance(Locale(loc), status);
+ if(U_FAILURE(status)){
+ errln("Could not create currency formatter for locale %s",localeID);
+ continue;
+ }
+ currencyFmt->format(1150.50, s);
+ if(s!=expected){
+ errln(UnicodeString("FAIL: Expected: ")+expected
+ + UnicodeString(" Got: ") + s
+ + UnicodeString( " for locale: ")+ UnicodeString(localeID) );
+ }
+ if (U_FAILURE(status)){
+ errln((UnicodeString)"FAIL: Status " + (int32_t)status);
+ }
+ delete currencyFmt;
+ }
+}
+
+// -------------------------------------
+
+/**
+ * Test the Currency object handling, new as of ICU 2.2.
+ */
+void NumberFormatTest::TestCurrencyObject() {
+ UErrorCode ec = U_ZERO_ERROR;
+ NumberFormat* fmt =
+ NumberFormat::createCurrencyInstance(Locale::getUS(), ec);
+
+ if (U_FAILURE(ec)) {
+ errln("FAIL: getCurrencyInstance(US)");
+ delete fmt;
+ return;
+ }
+
+ Locale null("", "", "");
+
+ expectCurrency(*fmt, null, 1234.56, "$1,234.56");
+
+ expectCurrency(*fmt, Locale::getFrance(),
+ 1234.56, CharsToUnicodeString("\\u20AC1,234.56")); // Euro
+
+ expectCurrency(*fmt, Locale::getJapan(),
+ 1234.56, CharsToUnicodeString("\\u00A51,235")); // Yen
+
+ expectCurrency(*fmt, Locale("fr", "CH", ""),
+ 1234.56, "SwF1,234.55"); // 0.05 rounding
+
+ expectCurrency(*fmt, Locale::getUS(),
+ 1234.56, "$1,234.56");
+
+ delete fmt;
+ fmt = NumberFormat::createCurrencyInstance(Locale::getFrance(), ec);
+
+ if (U_FAILURE(ec)) {
+ errln("FAIL: getCurrencyInstance(FRANCE)");
+ delete fmt;
+ return;
+ }
+
+ expectCurrency(*fmt, null, 1234.56, CharsToUnicodeString("1 234,56 \\u20AC"));
+
+ expectCurrency(*fmt, Locale::getJapan(),
+ 1234.56, CharsToUnicodeString("1 235 \\u00A5JP")); // Yen
+
+ expectCurrency(*fmt, Locale("fr", "CH", ""),
+ 1234.56, "1 234,55 sFr."); // 0.05 rounding
+
+ expectCurrency(*fmt, Locale::getUS(),
+ 1234.56, "1 234,56 $US");
+
+ expectCurrency(*fmt, Locale::getFrance(),
+ 1234.56, CharsToUnicodeString("1 234,56 \\u20AC")); // Euro
+
+ delete fmt;
+}
+
+// -------------------------------------
+
+/**
+ * Do rudimentary testing of parsing.
+ */
+void
+NumberFormatTest::TestParse(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString arg("0");
+ DecimalFormat* format = new DecimalFormat("00", status);
+ //try {
+ Formattable n; format->parse(arg, n, status);
+ logln((UnicodeString)"parse(" + arg + ") = " + n.getLong());
+ if (n.getType() != Formattable::kLong ||
+ n.getLong() != 0) errln((UnicodeString)"FAIL: Expected 0");
+ delete format;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: Status " + (int32_t)status);
+ //}
+ //catch(Exception e) {
+ // errln((UnicodeString)"Exception caught: " + e);
+ //}
+}
+
+// -------------------------------------
+
+/**
+ * Test proper rounding by the format method.
+ */
+void
+NumberFormatTest::TestRounding487(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nf = NumberFormat::createInstance(status);
+ if (U_FAILURE(status)) {
+ dataerrln("Error calling NumberFormat::createInstance()");
+ return;
+ }
+
+ roundingTest(*nf, 0.00159999, 4, "0.0016");
+ roundingTest(*nf, 0.00995, 4, "0.01");
+
+ roundingTest(*nf, 12.3995, 3, "12.4");
+
+ roundingTest(*nf, 12.4999, 0, "12");
+ roundingTest(*nf, - 19.5, 0, "-20");
+ delete nf;
+ if (U_FAILURE(status)) errln((UnicodeString)"FAIL: Status " + (int32_t)status);
+}
+
+/**
+ * Test the functioning of the secondary grouping value.
+ */
+void NumberFormatTest::TestSecondaryGrouping(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols US(Locale::getUS(), status);
+ CHECK(status, "DecimalFormatSymbols ct");
+
+ DecimalFormat f("#,##,###", US, status);
+ CHECK(status, "DecimalFormat ct");
+
+ expect2(f, (int32_t)123456789L, "12,34,56,789");
+ expectPat(f, "#,##,###");
+ f.applyPattern("#,###", status);
+ CHECK(status, "applyPattern");
+
+ f.setSecondaryGroupingSize(4);
+ expect2(f, (int32_t)123456789L, "12,3456,789");
+ expectPat(f, "#,####,###");
+ NumberFormat *g = NumberFormat::createInstance(Locale("hi", "IN"), status);
+ CHECK(status, "createInstance(hi_IN)");
+
+ UnicodeString out;
+ int32_t l = (int32_t)1876543210L;
+ g->format(l, out);
+ delete g;
+ // expect "1,87,65,43,210", but with Hindi digits
+ // 01234567890123
+ UBool ok = TRUE;
+ if (out.length() != 14) {
+ ok = FALSE;
+ } else {
+ for (int32_t i=0; i<out.length(); ++i) {
+ UBool expectGroup = FALSE;
+ switch (i) {
+ case 1:
+ case 4:
+ case 7:
+ case 10:
+ expectGroup = TRUE;
+ break;
+ }
+ // Later -- fix this to get the actual grouping
+ // character from the resource bundle.
+ UBool isGroup = (out.charAt(i) == 0x002C);
+ if (isGroup != expectGroup) {
+ ok = FALSE;
+ break;
+ }
+ }
+ }
+ if (!ok) {
+ errln((UnicodeString)"FAIL Expected " + l +
+ " x hi_IN -> \"1,87,65,43,210\" (with Hindi digits), got \"" +
+ escape(out) + "\"");
+ } else {
+ logln((UnicodeString)"Ok " + l +
+ " x hi_IN -> \"" +
+ escape(out) + "\"");
+ }
+}
+
+void NumberFormatTest::TestWhiteSpaceParsing(void) {
+ UErrorCode ec = U_ZERO_ERROR;
+ DecimalFormatSymbols US(Locale::getUS(), ec);
+ DecimalFormat fmt("a b#0c ", US, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Constructor");
+ return;
+ }
+ int32_t n = 1234;
+ expect(fmt, "a b1234c ", n);
+ expect(fmt, "a b1234c ", n);
+}
+
+/**
+ * Test currencies whose display name is a ChoiceFormat.
+ */
+void NumberFormatTest::TestComplexCurrency() {
+ UErrorCode ec = U_ZERO_ERROR;
+ Locale loc("en", "IN", "");
+ NumberFormat* fmt = NumberFormat::createCurrencyInstance(loc, ec);
+ if (U_SUCCESS(ec)) {
+ expect2(*fmt, 1.0, "Re. 1.00");
+ // Use .00392625 because that's 2^-8. Any value less than 0.005 is fine.
+ expect(*fmt, 1.00390625, "Re. 1.00"); // tricky
+ expect2(*fmt, 12345678.0, "Rs. 1,23,45,678.00");
+ expect2(*fmt, 0.5, "Rs. 0.50");
+ expect2(*fmt, -1.0, "-Re. 1.00");
+ expect2(*fmt, -10.0, "-Rs. 10.00");
+ } else {
+ errln("FAIL: getCurrencyInstance(en_IN)");
+ }
+ delete fmt;
+}
+
+// -------------------------------------
+
+void
+NumberFormatTest::roundingTest(NumberFormat& nf, double x, int32_t maxFractionDigits, const char* expected)
+{
+ nf.setMaximumFractionDigits(maxFractionDigits);
+ UnicodeString out; nf.format(x, out);
+ logln((UnicodeString)"" + x + " formats with " + maxFractionDigits + " fractional digits to " + out);
+ if (!(out==expected)) errln((UnicodeString)"FAIL: Expected " + expected);
+}
+
+/**
+ * Upgrade to alphaWorks
+ */
+void NumberFormatTest::TestExponent(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols US(Locale::getUS(), status);
+ CHECK(status, "DecimalFormatSymbols constructor");
+ DecimalFormat fmt1(UnicodeString("0.###E0"), US, status);
+ CHECK(status, "DecimalFormat(0.###E0)");
+ DecimalFormat fmt2(UnicodeString("0.###E+0"), US, status);
+ CHECK(status, "DecimalFormat(0.###E+0)");
+ int32_t n = 1234;
+ expect2(fmt1, n, "1.234E3");
+ expect2(fmt2, n, "1.234E+3");
+ expect(fmt1, "1.234E+3", n); // Either format should parse "E+3"
+}
+
+/**
+ * Upgrade to alphaWorks
+ */
+void NumberFormatTest::TestScientific(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols US(Locale::getUS(), status);
+ CHECK(status, "DecimalFormatSymbols constructor");
+
+ // Test pattern round-trip
+ const char* PAT[] = { "#E0", "0.####E0", "00.000E00", "##0.####E000",
+ "0.###E0;[0.###E0]" };
+ int32_t PAT_length = (int32_t)(sizeof(PAT) / sizeof(PAT[0]));
+ int32_t DIGITS[] = {
+ // min int, max int, min frac, max frac
+ 0, 1, 0, 0, // "#E0"
+ 1, 1, 0, 4, // "0.####E0"
+ 2, 2, 3, 3, // "00.000E00"
+ 1, 3, 0, 4, // "##0.####E000"
+ 1, 1, 0, 3, // "0.###E0;[0.###E0]"
+ };
+ for (int32_t i=0; i<PAT_length; ++i) {
+ UnicodeString pat(PAT[i]);
+ DecimalFormat df(pat, US, status);
+ CHECK(status, "DecimalFormat constructor");
+ UnicodeString pat2;
+ df.toPattern(pat2);
+ if (pat == pat2) {
+ logln(UnicodeString("Ok Pattern rt \"") +
+ pat + "\" -> \"" +
+ pat2 + "\"");
+ } else {
+ errln(UnicodeString("FAIL Pattern rt \"") +
+ pat + "\" -> \"" +
+ pat2 + "\"");
+ }
+ // Make sure digit counts match what we expect
+ if (df.getMinimumIntegerDigits() != DIGITS[4*i] ||
+ df.getMaximumIntegerDigits() != DIGITS[4*i+1] ||
+ df.getMinimumFractionDigits() != DIGITS[4*i+2] ||
+ df.getMaximumFractionDigits() != DIGITS[4*i+3]) {
+ errln(UnicodeString("FAIL \"" + pat +
+ "\" min/max int; min/max frac = ") +
+ df.getMinimumIntegerDigits() + "/" +
+ df.getMaximumIntegerDigits() + ";" +
+ df.getMinimumFractionDigits() + "/" +
+ df.getMaximumFractionDigits() + ", expect " +
+ DIGITS[4*i] + "/" +
+ DIGITS[4*i+1] + ";" +
+ DIGITS[4*i+2] + "/" +
+ DIGITS[4*i+3]);
+ }
+ }
+
+
+ // Test the constructor for default locale. We have to
+ // manually set the default locale, as there is no
+ // guarantee that the default locale has the same
+ // scientific format.
+ Locale def = Locale::getDefault();
+ Locale::setDefault(Locale::getUS(), status);
+ expect2(NumberFormat::createScientificInstance(status),
+ 12345.678901,
+ "1.2345678901E4", status);
+ Locale::setDefault(def, status);
+
+ expect2(new DecimalFormat("#E0", US, status),
+ 12345.0,
+ "1.2345E4", status);
+ expect(new DecimalFormat("0E0", US, status),
+ 12345.0,
+ "1E4", status);
+ expect2(NumberFormat::createScientificInstance(Locale::getUS(), status),
+ 12345.678901,
+ "1.2345678901E4", status);
+ expect(new DecimalFormat("##0.###E0", US, status),
+ 12345.0,
+ "12.34E3", status);
+ expect(new DecimalFormat("##0.###E0", US, status),
+ 12345.00001,
+ "12.35E3", status);
+ expect2(new DecimalFormat("##0.####E0", US, status),
+ (int32_t) 12345,
+ "12.345E3", status);
+ expect2(NumberFormat::createScientificInstance(Locale::getFrance(), status),
+ 12345.678901,
+ "1,2345678901E4", status);
+ expect(new DecimalFormat("##0.####E0", US, status),
+ 789.12345e-9,
+ "789.12E-9", status);
+ expect2(new DecimalFormat("##0.####E0", US, status),
+ 780.e-9,
+ "780E-9", status);
+ expect(new DecimalFormat(".###E0", US, status),
+ 45678.0,
+ ".457E5", status);
+ expect2(new DecimalFormat(".###E0", US, status),
+ (int32_t) 0,
+ ".0E0", status);
+ /*
+ expect(new DecimalFormat[] { new DecimalFormat("#E0", US),
+ new DecimalFormat("##E0", US),
+ new DecimalFormat("####E0", US),
+ new DecimalFormat("0E0", US),
+ new DecimalFormat("00E0", US),
+ new DecimalFormat("000E0", US),
+ },
+ new Long(45678000),
+ new String[] { "4.5678E7",
+ "45.678E6",
+ "4567.8E4",
+ "5E7",
+ "46E6",
+ "457E5",
+ }
+ );
+ !
+ ! Unroll this test into individual tests below...
+ !
+ */
+ expect2(new DecimalFormat("#E0", US, status),
+ (int32_t) 45678000, "4.5678E7", status);
+ expect2(new DecimalFormat("##E0", US, status),
+ (int32_t) 45678000, "45.678E6", status);
+ expect2(new DecimalFormat("####E0", US, status),
+ (int32_t) 45678000, "4567.8E4", status);
+ expect(new DecimalFormat("0E0", US, status),
+ (int32_t) 45678000, "5E7", status);
+ expect(new DecimalFormat("00E0", US, status),
+ (int32_t) 45678000, "46E6", status);
+ expect(new DecimalFormat("000E0", US, status),
+ (int32_t) 45678000, "457E5", status);
+ /*
+ expect(new DecimalFormat("###E0", US, status),
+ new Object[] { new Double(0.0000123), "12.3E-6",
+ new Double(0.000123), "123E-6",
+ new Double(0.00123), "1.23E-3",
+ new Double(0.0123), "12.3E-3",
+ new Double(0.123), "123E-3",
+ new Double(1.23), "1.23E0",
+ new Double(12.3), "12.3E0",
+ new Double(123), "123E0",
+ new Double(1230), "1.23E3",
+ });
+ !
+ ! Unroll this test into individual tests below...
+ !
+ */
+ expect2(new DecimalFormat("###E0", US, status),
+ 0.0000123, "12.3E-6", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 0.000123, "123E-6", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 0.00123, "1.23E-3", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 0.0123, "12.3E-3", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 0.123, "123E-3", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 1.23, "1.23E0", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 12.3, "12.3E0", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 123.0, "123E0", status);
+ expect2(new DecimalFormat("###E0", US, status),
+ 1230.0, "1.23E3", status);
+ /*
+ expect(new DecimalFormat("0.#E+00", US, status),
+ new Object[] { new Double(0.00012), "1.2E-04",
+ new Long(12000), "1.2E+04",
+ });
+ !
+ ! Unroll this test into individual tests below...
+ !
+ */
+ expect2(new DecimalFormat("0.#E+00", US, status),
+ 0.00012, "1.2E-04", status);
+ expect2(new DecimalFormat("0.#E+00", US, status),
+ (int32_t) 12000, "1.2E+04", status);
+}
+
+/**
+ * Upgrade to alphaWorks
+ */
+void NumberFormatTest::TestPad(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols US(Locale::getUS(), status);
+ CHECK(status, "DecimalFormatSymbols constructor");
+
+ expect2(new DecimalFormat("*^##.##", US, status),
+ int32_t(0), "^^^^0", status);
+ expect2(new DecimalFormat("*^##.##", US, status),
+ -1.3, "^-1.3", status);
+ expect2(new DecimalFormat("##0.0####E0*_ 'g-m/s^2'", US, status),
+ int32_t(0), "0.0E0______ g-m/s^2", status);
+ expect(new DecimalFormat("##0.0####E0*_ 'g-m/s^2'", US, status),
+ 1.0/3, "333.333E-3_ g-m/s^2", status);
+ expect2(new DecimalFormat("##0.0####*_ 'g-m/s^2'", US, status),
+ int32_t(0), "0.0______ g-m/s^2", status);
+ expect(new DecimalFormat("##0.0####*_ 'g-m/s^2'", US, status),
+ 1.0/3, "0.33333__ g-m/s^2", status);
+
+ // Test padding before a sign
+ const char *formatStr = "*x#,###,###,##0.0#;*x(###,###,##0.0#)";
+ expect2(new DecimalFormat(formatStr, US, status),
+ int32_t(-10), "xxxxxxxxxx(10.0)", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ int32_t(-1000),"xxxxxxx(1,000.0)", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ int32_t(-1000000),"xxx(1,000,000.0)", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ -100.37, "xxxxxxxx(100.37)", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ -10456.37, "xxxxx(10,456.37)", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ -1120456.37, "xx(1,120,456.37)", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ -112045600.37, "(112,045,600.37)", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ -1252045600.37,"(1,252,045,600.37)", status);
+
+ expect2(new DecimalFormat(formatStr, US, status),
+ int32_t(10), "xxxxxxxxxxxx10.0", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ int32_t(1000),"xxxxxxxxx1,000.0", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ int32_t(1000000),"xxxxx1,000,000.0", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ 100.37, "xxxxxxxxxx100.37", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ 10456.37, "xxxxxxx10,456.37", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ 1120456.37, "xxxx1,120,456.37", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ 112045600.37, "xx112,045,600.37", status);
+ expect2(new DecimalFormat(formatStr, US, status),
+ 10252045600.37,"10,252,045,600.37", status);
+
+
+ // Test padding between a sign and a number
+ const char *formatStr2 = "#,###,###,##0.0#*x;(###,###,##0.0#*x)";
+ expect2(new DecimalFormat(formatStr2, US, status),
+ int32_t(-10), "(10.0xxxxxxxxxx)", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ int32_t(-1000),"(1,000.0xxxxxxx)", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ int32_t(-1000000),"(1,000,000.0xxx)", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ -100.37, "(100.37xxxxxxxx)", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ -10456.37, "(10,456.37xxxxx)", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ -1120456.37, "(1,120,456.37xx)", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ -112045600.37, "(112,045,600.37)", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ -1252045600.37,"(1,252,045,600.37)", status);
+
+ expect2(new DecimalFormat(formatStr2, US, status),
+ int32_t(10), "10.0xxxxxxxxxxxx", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ int32_t(1000),"1,000.0xxxxxxxxx", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ int32_t(1000000),"1,000,000.0xxxxx", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ 100.37, "100.37xxxxxxxxxx", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ 10456.37, "10,456.37xxxxxxx", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ 1120456.37, "1,120,456.37xxxx", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ 112045600.37, "112,045,600.37xx", status);
+ expect2(new DecimalFormat(formatStr2, US, status),
+ 10252045600.37,"10,252,045,600.37", status);
+
+ //testing the setPadCharacter(UnicodeString) and getPadCharacterString()
+ DecimalFormat fmt("#", US, status);
+ CHECK(status, "DecimalFormat constructor");
+ UnicodeString padString("P");
+ fmt.setPadCharacter(padString);
+ expectPad(fmt, "*P##.##", DecimalFormat::kPadBeforePrefix, 5, padString);
+ fmt.setPadCharacter((UnicodeString)"^");
+ expectPad(fmt, "*^#", DecimalFormat::kPadBeforePrefix, 1, (UnicodeString)"^");
+ //commented untill implementation is complete
+ /* fmt.setPadCharacter((UnicodeString)"^^^");
+ expectPad(fmt, "*^^^#", DecimalFormat::kPadBeforePrefix, 3, (UnicodeString)"^^^");
+ padString.remove();
+ padString.append((UChar)0x0061);
+ padString.append((UChar)0x0302);
+ fmt.setPadCharacter(padString);
+ UChar patternChars[]={0x002a, 0x0061, 0x0302, 0x0061, 0x0302, 0x0023, 0x0000};
+ UnicodeString pattern(patternChars);
+ expectPad(fmt, pattern , DecimalFormat::kPadBeforePrefix, 4, padString);
+ */
+
+}
+
+/**
+ * Upgrade to alphaWorks
+ */
+void NumberFormatTest::TestPatterns2(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols US(Locale::getUS(), status);
+ CHECK(status, "DecimalFormatSymbols constructor");
+
+ DecimalFormat fmt("#", US, status);
+ CHECK(status, "DecimalFormat constructor");
+
+ UChar hat = 0x005E; /*^*/
+
+ expectPad(fmt, "*^#", DecimalFormat::kPadBeforePrefix, 1, hat);
+ expectPad(fmt, "$*^#", DecimalFormat::kPadAfterPrefix, 2, hat);
+ expectPad(fmt, "#*^", DecimalFormat::kPadBeforeSuffix, 1, hat);
+ expectPad(fmt, "#$*^", DecimalFormat::kPadAfterSuffix, 2, hat);
+ expectPad(fmt, "$*^$#", ILLEGAL);
+ expectPad(fmt, "#$*^$", ILLEGAL);
+ expectPad(fmt, "'pre'#,##0*x'post'", DecimalFormat::kPadBeforeSuffix,
+ 12, (UChar)0x0078 /*x*/);
+ expectPad(fmt, "''#0*x", DecimalFormat::kPadBeforeSuffix,
+ 3, (UChar)0x0078 /*x*/);
+ expectPad(fmt, "'I''ll'*a###.##", DecimalFormat::kPadAfterPrefix,
+ 10, (UChar)0x0061 /*a*/);
+
+ fmt.applyPattern("AA#,##0.00ZZ", status);
+ CHECK(status, "applyPattern");
+ fmt.setPadCharacter(hat);
+
+ fmt.setFormatWidth(10);
+
+ fmt.setPadPosition(DecimalFormat::kPadBeforePrefix);
+ expectPat(fmt, "*^AA#,##0.00ZZ");
+
+ fmt.setPadPosition(DecimalFormat::kPadBeforeSuffix);
+ expectPat(fmt, "AA#,##0.00*^ZZ");
+
+ fmt.setPadPosition(DecimalFormat::kPadAfterSuffix);
+ expectPat(fmt, "AA#,##0.00ZZ*^");
+
+ // 12 3456789012
+ UnicodeString exp("AA*^#,##0.00ZZ", "");
+ fmt.setFormatWidth(12);
+ fmt.setPadPosition(DecimalFormat::kPadAfterPrefix);
+ expectPat(fmt, exp);
+
+ fmt.setFormatWidth(13);
+ // 12 34567890123
+ expectPat(fmt, "AA*^##,##0.00ZZ");
+
+ fmt.setFormatWidth(14);
+ // 12 345678901234
+ expectPat(fmt, "AA*^###,##0.00ZZ");
+
+ fmt.setFormatWidth(15);
+ // 12 3456789012345
+ expectPat(fmt, "AA*^####,##0.00ZZ"); // This is the interesting case
+
+ fmt.setFormatWidth(16);
+ // 12 34567890123456
+ expectPat(fmt, "AA*^#,###,##0.00ZZ");
+}
+
+void NumberFormatTest::TestSurrogateSupport(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols custom(Locale::getUS(), status);
+ CHECK(status, "DecimalFormatSymbols constructor");
+
+ custom.setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol, "decimal");
+ custom.setSymbol(DecimalFormatSymbols::kPlusSignSymbol, "plus");
+ custom.setSymbol(DecimalFormatSymbols::kMinusSignSymbol, " minus ");
+ custom.setSymbol(DecimalFormatSymbols::kExponentialSymbol, "exponent");
+
+ UnicodeString patternStr("*\\U00010000##.##", "");
+ patternStr = patternStr.unescape();
+ UnicodeString expStr("\\U00010000\\U00010000\\U00010000\\U000100000", "");
+ expStr = expStr.unescape();
+ expect2(new DecimalFormat(patternStr, custom, status),
+ int32_t(0), expStr, status);
+
+ status = U_ZERO_ERROR;
+ expect2(new DecimalFormat("*^##.##", custom, status),
+ int32_t(0), "^^^^0", status);
+ status = U_ZERO_ERROR;
+ expect2(new DecimalFormat("##.##", custom, status),
+ -1.3, " minus 1decimal3", status);
+ status = U_ZERO_ERROR;
+ expect2(new DecimalFormat("##0.0####E0 'g-m/s^2'", custom, status),
+ int32_t(0), "0decimal0exponent0 g-m/s^2", status);
+ status = U_ZERO_ERROR;
+ expect(new DecimalFormat("##0.0####E0 'g-m/s^2'", custom, status),
+ 1.0/3, "333decimal333exponent minus 3 g-m/s^2", status);
+ status = U_ZERO_ERROR;
+ expect2(new DecimalFormat("##0.0#### 'g-m/s^2'", custom, status),
+ int32_t(0), "0decimal0 g-m/s^2", status);
+ status = U_ZERO_ERROR;
+ expect(new DecimalFormat("##0.0#### 'g-m/s^2'", custom, status),
+ 1.0/3, "0decimal33333 g-m/s^2", status);
+
+ UnicodeString zero((UChar32)0x10000);
+ custom.setSymbol(DecimalFormatSymbols::kZeroDigitSymbol, zero);
+ expStr = UnicodeString("\\U00010001decimal\\U00010002\\U00010005\\U00010000", "");
+ expStr = expStr.unescape();
+ status = U_ZERO_ERROR;
+ expect2(new DecimalFormat("##0.000", custom, status),
+ 1.25, expStr, status);
+
+ custom.setSymbol(DecimalFormatSymbols::kZeroDigitSymbol, (UChar)0x30);
+ custom.setSymbol(DecimalFormatSymbols::kCurrencySymbol, "units of money");
+ custom.setSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol, "money separator");
+ patternStr = "0.00 \\u00A4' in your bank account'";
+ patternStr = patternStr.unescape();
+ expStr = UnicodeString(" minus 20money separator00 units of money in your bank account", "");
+ status = U_ZERO_ERROR;
+ expect2(new DecimalFormat(patternStr, custom, status),
+ int32_t(-20), expStr, status);
+
+ custom.setSymbol(DecimalFormatSymbols::kPercentSymbol, "percent");
+ patternStr = "'You''ve lost ' -0.00 %' of your money today'";
+ patternStr = patternStr.unescape();
+ expStr = UnicodeString(" minus You've lost minus 2000decimal00 percent of your money today", "");
+ status = U_ZERO_ERROR;
+ expect2(new DecimalFormat(patternStr, custom, status),
+ int32_t(-20), expStr, status);
+}
+
+void NumberFormatTest::TestCurrencyPatterns(void) {
+ int32_t i, locCount;
+ const Locale* locs = NumberFormat::getAvailableLocales(locCount);
+ for (i=0; i<locCount; ++i) {
+ UErrorCode ec = U_ZERO_ERROR;
+ NumberFormat* nf = NumberFormat::createCurrencyInstance(locs[i], ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Can't create NumberFormat(%s) - %s", locs[i].getName(), u_errorName(ec));
+ } else {
+ // Make sure currency formats do not have a variable number
+ // of fraction digits
+ int32_t min = nf->getMinimumFractionDigits();
+ int32_t max = nf->getMaximumFractionDigits();
+ if (min != max) {
+ UnicodeString a, b;
+ nf->format(1.0, a);
+ nf->format(1.125, b);
+ errln((UnicodeString)"FAIL: " + locs[i].getName() +
+ " min fraction digits != max fraction digits; "
+ "x 1.0 => " + escape(a) +
+ "; x 1.125 => " + escape(b));
+ }
+
+ // Make sure EURO currency formats have exactly 2 fraction digits
+ if (nf->getDynamicClassID() == DecimalFormat::getStaticClassID()) {
+ DecimalFormat* df = (DecimalFormat*) nf;
+ if (u_strcmp(EUR, df->getCurrency()) == 0) {
+ if (min != 2 || max != 2) {
+ UnicodeString a;
+ nf->format(1.0, a);
+ errln((UnicodeString)"FAIL: " + locs[i].getName() +
+ " is a EURO format but it does not have 2 fraction digits; "
+ "x 1.0 => " +
+ escape(a));
+ }
+ }
+ }
+ }
+ delete nf;
+ }
+}
+
+void NumberFormatTest::TestRegCurrency(void) {
+#if !UCONFIG_NO_SERVICE
+ UErrorCode status = U_ZERO_ERROR;
+ UChar USD[4];
+ ucurr_forLocale("en_US", USD, 4, &status);
+ UChar YEN[4];
+ ucurr_forLocale("ja_JP", YEN, 4, &status);
+ UChar TMP[4];
+ static const UChar QQQ[] = {0x51, 0x51, 0x51, 0};
+ if(U_FAILURE(status)) {
+ errln("Unable to get currency for locale, error %s", u_errorName(status));
+ return;
+ }
+
+ UCurrRegistryKey enkey = ucurr_register(YEN, "en_US", &status);
+ UCurrRegistryKey enUSEUROkey = ucurr_register(QQQ, "en_US_EURO", &status);
+
+ ucurr_forLocale("en_US", TMP, 4, &status);
+ if (u_strcmp(YEN, TMP) != 0) {
+ errln("FAIL: didn't return YEN registered for en_US");
+ }
+
+ ucurr_forLocale("en_US_EURO", TMP, 4, &status);
+ if (u_strcmp(QQQ, TMP) != 0) {
+ errln("FAIL: didn't return QQQ for en_US_EURO");
+ }
+
+ int32_t fallbackLen = ucurr_forLocale("en_XX_BAR", TMP, 4, &status);
+ if (fallbackLen) {
+ errln("FAIL: tried to fallback en_XX_BAR");
+ }
+ status = U_ZERO_ERROR; // reset
+
+ if (!ucurr_unregister(enkey, &status)) {
+ errln("FAIL: couldn't unregister enkey");
+ }
+
+ ucurr_forLocale("en_US", TMP, 4, &status);
+ if (u_strcmp(USD, TMP) != 0) {
+ errln("FAIL: didn't return USD for en_US after unregister of en_US");
+ }
+ status = U_ZERO_ERROR; // reset
+
+ ucurr_forLocale("en_US_EURO", TMP, 4, &status);
+ if (u_strcmp(QQQ, TMP) != 0) {
+ errln("FAIL: didn't return QQQ for en_US_EURO after unregister of en_US");
+ }
+
+ ucurr_forLocale("en_US_BLAH", TMP, 4, &status);
+ if (u_strcmp(USD, TMP) != 0) {
+ errln("FAIL: could not find USD for en_US_BLAH after unregister of en");
+ }
+ status = U_ZERO_ERROR; // reset
+
+ if (!ucurr_unregister(enUSEUROkey, &status)) {
+ errln("FAIL: couldn't unregister enUSEUROkey");
+ }
+
+ ucurr_forLocale("en_US_EURO", TMP, 4, &status);
+ if (u_strcmp(EUR, TMP) != 0) {
+ errln("FAIL: didn't return EUR for en_US_EURO after unregister of en_US_EURO");
+ }
+ status = U_ZERO_ERROR; // reset
+#endif
+}
+
+void NumberFormatTest::TestCurrencyNames(void) {
+ // Do a basic check of getName()
+ // USD { "US$", "US Dollar" } // 04/04/1792-
+ UErrorCode ec = U_ZERO_ERROR;
+ static const UChar USD[] = {0x55, 0x53, 0x44, 0}; /*USD*/
+ static const UChar USX[] = {0x55, 0x53, 0x58, 0}; /*USX*/
+ static const UChar CAD[] = {0x43, 0x41, 0x44, 0}; /*CAD*/
+ static const UChar ITL[] = {0x49, 0x54, 0x4C, 0}; /*ITL*/
+ UBool isChoiceFormat;
+ int32_t len;
+ // Warning: HARD-CODED LOCALE DATA in this test. If it fails, CHECK
+ // THE LOCALE DATA before diving into the code.
+ assertEquals("USD.getName(SYMBOL_NAME)",
+ UnicodeString("$"),
+ UnicodeString(ucurr_getName(USD, "en",
+ UCURR_SYMBOL_NAME,
+ &isChoiceFormat, &len, &ec)));
+ assertEquals("USD.getName(LONG_NAME)",
+ UnicodeString("US Dollar"),
+ UnicodeString(ucurr_getName(USD, "en",
+ UCURR_LONG_NAME,
+ &isChoiceFormat, &len, &ec)));
+ assertEquals("CAD.getName(SYMBOL_NAME)",
+ UnicodeString("Can$"),
+ UnicodeString(ucurr_getName(CAD, "en",
+ UCURR_SYMBOL_NAME,
+ &isChoiceFormat, &len, &ec)));
+ assertEquals("CAD.getName(SYMBOL_NAME)",
+ UnicodeString("$"),
+ UnicodeString(ucurr_getName(CAD, "en_CA",
+ UCURR_SYMBOL_NAME,
+ &isChoiceFormat, &len, &ec)));
+ assertEquals("USD.getName(SYMBOL_NAME)",
+ UnicodeString("US$"),
+ UnicodeString(ucurr_getName(USD, "en_AU",
+ UCURR_SYMBOL_NAME,
+ &isChoiceFormat, &len, &ec)));
+ assertEquals("CAD.getName(SYMBOL_NAME)",
+ UnicodeString("Can$"),
+ UnicodeString(ucurr_getName(CAD, "en_AU",
+ UCURR_SYMBOL_NAME,
+ &isChoiceFormat, &len, &ec)));
+ assertEquals("USX.getName(LONG_NAME)",
+ UnicodeString("USX"),
+ UnicodeString(ucurr_getName(USX, "en_US",
+ UCURR_LONG_NAME,
+ &isChoiceFormat, &len, &ec)));
+ assertSuccess("ucurr_getName", ec);
+
+ ec = U_ZERO_ERROR;
+
+ // Test that a default or fallback warning is being returned. JB 4239.
+ ucurr_getName(CAD, "es_ES", UCURR_LONG_NAME, &isChoiceFormat,
+ &len, &ec);
+ assertTrue("ucurr_getName (fallback)",
+ U_USING_FALLBACK_WARNING == ec, TRUE);
+
+ ucurr_getName(CAD, "zh_TW", UCURR_LONG_NAME, &isChoiceFormat,
+ &len, &ec);
+ assertTrue("ucurr_getName (fallback)",
+ U_USING_FALLBACK_WARNING == ec, TRUE);
+
+ ucurr_getName(CAD, "en_US", UCURR_LONG_NAME, &isChoiceFormat,
+ &len, &ec);
+ assertTrue("ucurr_getName (default)",
+ U_USING_DEFAULT_WARNING == ec, TRUE);
+
+ ucurr_getName(CAD, "vi", UCURR_LONG_NAME, &isChoiceFormat,
+ &len, &ec);
+ assertTrue("ucurr_getName (default)",
+ U_USING_DEFAULT_WARNING == ec, TRUE);
+
+ // Test that a default warning is being returned when falling back to root. JB 4536.
+ ucurr_getName(ITL, "cy", UCURR_LONG_NAME, &isChoiceFormat,
+ &len, &ec);
+ assertTrue("ucurr_getName (default to root)",
+ U_USING_DEFAULT_WARNING == ec, TRUE);
+
+ // TODO add more tests later
+}
+
+void NumberFormatTest::TestCurrencyUnit(void){
+ UErrorCode ec = U_ZERO_ERROR;
+ static const UChar USD[] = {85, 83, 68, 0}; /*USD*/
+ CurrencyUnit cu(USD, ec);
+ assertSuccess("CurrencyUnit", ec);
+
+ const UChar * r = cu.getISOCurrency(); // who is the buffer owner ?
+ assertEquals("getISOCurrency()", USD, r);
+
+ CurrencyUnit cu2(cu);
+ if (!(cu2 == cu)){
+ errln("CurrencyUnit copy constructed object should be same");
+ }
+
+ CurrencyUnit * cu3 = (CurrencyUnit *)cu.clone();
+ if (!(*cu3 == cu)){
+ errln("CurrencyUnit cloned object should be same");
+ }
+ delete cu3;
+}
+
+void NumberFormatTest::TestCurrencyAmount(void){
+ UErrorCode ec = U_ZERO_ERROR;
+ static const UChar USD[] = {85, 83, 68, 0}; /*USD*/
+ CurrencyAmount ca(9, USD, ec);
+ assertSuccess("CurrencyAmount", ec);
+
+ CurrencyAmount ca2(ca);
+ if (!(ca2 == ca)){
+ errln("CurrencyAmount copy constructed object should be same");
+ }
+
+ ca2=ca;
+ if (!(ca2 == ca)){
+ errln("CurrencyAmount assigned object should be same");
+ }
+
+ CurrencyAmount *ca3 = (CurrencyAmount *)ca.clone();
+ if (!(*ca3 == ca)){
+ errln("CurrencyAmount cloned object should be same");
+ }
+ delete ca3;
+}
+
+void NumberFormatTest::TestSymbolsWithBadLocale(void) {
+ Locale locDefault;
+ Locale locBad("x-crazy_ZZ_MY_SPECIAL_ADMINISTRATION_REGION_NEEDS_A_SPECIAL_VARIANT_WITH_A_REALLY_REALLY_REALLY_REALLY_REALLY_REALLY_REALLY_LONG_NAME");
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString intlCurrencySymbol((UChar)0xa4);
+
+ intlCurrencySymbol.append((UChar)0xa4);
+
+ logln("Current locale is %s", Locale::getDefault().getName());
+ Locale::setDefault(locBad, status);
+ logln("Current locale is %s", Locale::getDefault().getName());
+ DecimalFormatSymbols mySymbols(status);
+ if (status != U_USING_FALLBACK_WARNING) {
+ errln("DecimalFormatSymbols should returned U_USING_FALLBACK_WARNING.");
+ }
+ if (strcmp(mySymbols.getLocale().getName(), locBad.getName()) != 0) {
+ errln("DecimalFormatSymbols does not have the right locale.");
+ }
+ int symbolEnum = (int)DecimalFormatSymbols::kDecimalSeparatorSymbol;
+ for (; symbolEnum < (int)DecimalFormatSymbols::kFormatSymbolCount; symbolEnum++) {
+ logln(UnicodeString("DecimalFormatSymbols[") + symbolEnum + UnicodeString("] = ")
+ + prettify(mySymbols.getSymbol((DecimalFormatSymbols::ENumberFormatSymbol)symbolEnum)));
+
+ if (mySymbols.getSymbol((DecimalFormatSymbols::ENumberFormatSymbol)symbolEnum).length() == 0
+ && symbolEnum != (int)DecimalFormatSymbols::kGroupingSeparatorSymbol
+ && symbolEnum != (int)DecimalFormatSymbols::kMonetaryGroupingSeparatorSymbol)
+ {
+ errln("DecimalFormatSymbols has an empty string at index %d.", symbolEnum);
+ }
+ }
+ status = U_ZERO_ERROR;
+ Locale::setDefault(locDefault, status);
+ logln("Current locale is %s", Locale::getDefault().getName());
+}
+
+/**
+ * Check that adoptDecimalFormatSymbols and setDecimalFormatSymbols
+ * behave the same, except for memory ownership semantics. (No
+ * version of this test on Java, since Java has only one method.)
+ */
+void NumberFormatTest::TestAdoptDecimalFormatSymbols(void) {
+ UErrorCode ec = U_ZERO_ERROR;
+ DecimalFormatSymbols *sym = new DecimalFormatSymbols(Locale::getUS(), ec);
+ if (U_FAILURE(ec)) {
+ errln("Fail: DecimalFormatSymbols constructor");
+ delete sym;
+ return;
+ }
+ UnicodeString pat(" #,##0.00");
+ pat.insert(0, (UChar)0x00A4);
+ DecimalFormat fmt(pat, sym, ec);
+ if (U_FAILURE(ec)) {
+ errln("Fail: DecimalFormat constructor");
+ return;
+ }
+
+ UnicodeString str;
+ fmt.format(2350.75, str);
+ if (str == "$ 2,350.75") {
+ logln(str);
+ } else {
+ errln("Fail: " + str + ", expected $ 2,350.75");
+ }
+
+ sym = new DecimalFormatSymbols(Locale::getUS(), ec);
+ if (U_FAILURE(ec)) {
+ errln("Fail: DecimalFormatSymbols constructor");
+ delete sym;
+ return;
+ }
+ sym->setSymbol(DecimalFormatSymbols::kCurrencySymbol, "Q");
+ fmt.adoptDecimalFormatSymbols(sym);
+
+ str.truncate(0);
+ fmt.format(2350.75, str);
+ if (str == "Q 2,350.75") {
+ logln(str);
+ } else {
+ errln("Fail: adoptDecimalFormatSymbols -> " + str + ", expected Q 2,350.75");
+ }
+
+ sym = new DecimalFormatSymbols(Locale::getUS(), ec);
+ if (U_FAILURE(ec)) {
+ errln("Fail: DecimalFormatSymbols constructor");
+ delete sym;
+ return;
+ }
+ DecimalFormat fmt2(pat, sym, ec);
+ if (U_FAILURE(ec)) {
+ errln("Fail: DecimalFormat constructor");
+ return;
+ }
+
+ DecimalFormatSymbols sym2(Locale::getUS(), ec);
+ if (U_FAILURE(ec)) {
+ errln("Fail: DecimalFormatSymbols constructor");
+ return;
+ }
+ sym2.setSymbol(DecimalFormatSymbols::kCurrencySymbol, "Q");
+ fmt2.setDecimalFormatSymbols(sym2);
+
+ str.truncate(0);
+ fmt2.format(2350.75, str);
+ if (str == "Q 2,350.75") {
+ logln(str);
+ } else {
+ errln("Fail: setDecimalFormatSymbols -> " + str + ", expected Q 2,350.75");
+ }
+}
+
+void NumberFormatTest::TestPerMill() {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeString str;
+ DecimalFormat fmt(ctou("###.###\\u2030"), ec);
+ if (!assertSuccess("DecimalFormat ct", ec)) return;
+ assertEquals("0.4857 x ###.###\\u2030",
+ ctou("485.7\\u2030"), fmt.format(0.4857, str));
+
+ DecimalFormatSymbols sym(Locale::getUS(), ec);
+ sym.setSymbol(DecimalFormatSymbols::kPerMillSymbol, ctou("m"));
+ DecimalFormat fmt2("", sym, ec);
+ fmt2.applyLocalizedPattern("###.###m", ec);
+ if (!assertSuccess("setup", ec)) return;
+ str.truncate(0);
+ assertEquals("0.4857 x ###.###m",
+ "485.7m", fmt2.format(0.4857, str));
+}
+
+/**
+ * Generic test for patterns that should be legal/illegal.
+ */
+void NumberFormatTest::TestIllegalPatterns() {
+ // Test cases:
+ // Prefix with "-:" for illegal patterns
+ // Prefix with "+:" for legal patterns
+ const char* DATA[] = {
+ // Unquoted special characters in the suffix are illegal
+ "-:000.000|###",
+ "+:000.000'|###'",
+ 0
+ };
+ for (int32_t i=0; DATA[i]; ++i) {
+ const char* pat=DATA[i];
+ UBool valid = (*pat) == '+';
+ pat += 2;
+ UErrorCode ec = U_ZERO_ERROR;
+ DecimalFormat fmt(pat, ec); // locale doesn't matter here
+ if (U_SUCCESS(ec) == valid) {
+ logln("Ok: pattern \"%s\": %s",
+ pat, u_errorName(ec));
+ } else {
+ errln("FAIL: pattern \"%s\" should have %s; got %s",
+ pat, (valid?"succeeded":"failed"),
+ u_errorName(ec));
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+
+static const char* KEYWORDS[] = {
+ /*0*/ "ref=", // <reference pattern to parse numbers>
+ /*1*/ "loc=", // <locale for formats>
+ /*2*/ "f:", // <pattern or '-'> <number> <exp. string>
+ /*3*/ "fp:", // <pattern or '-'> <number> <exp. string> <exp. number>
+ /*4*/ "rt:", // <pattern or '-'> <(exp.) number> <(exp.) string>
+ /*5*/ "p:", // <pattern or '-'> <string> <exp. number>
+ /*6*/ "perr:", // <pattern or '-'> <invalid string>
+ /*7*/ "pat:", // <pattern or '-'> <exp. toPattern or '-' or 'err'>
+ /*8*/ "fpc:", // <pattern or '-'> <curr.amt> <exp. string> <exp. curr.amt>
+ 0
+};
+
+/**
+ * Return an integer representing the next token from this
+ * iterator. The integer will be an index into the given list, or
+ * -1 if there are no more tokens, or -2 if the token is not on
+ * the list.
+ */
+static int32_t keywordIndex(const UnicodeString& tok) {
+ for (int32_t i=0; KEYWORDS[i]!=0; ++i) {
+ if (tok==KEYWORDS[i]) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+/**
+ * Parse a CurrencyAmount using the given NumberFormat, with
+ * the 'delim' character separating the number and the currency.
+ */
+static void parseCurrencyAmount(const UnicodeString& str,
+ const NumberFormat& fmt,
+ UChar delim,
+ Formattable& result,
+ UErrorCode& ec) {
+ UnicodeString num, cur;
+ int32_t i = str.indexOf(delim);
+ str.extractBetween(0, i, num);
+ str.extractBetween(i+1, INT32_MAX, cur);
+ Formattable n;
+ fmt.parse(num, n, ec);
+ result.adoptObject(new CurrencyAmount(n, cur.getTerminatedBuffer(), ec));
+}
+
+void NumberFormatTest::TestCases() {
+ UErrorCode ec = U_ZERO_ERROR;
+ TextFile reader("NumberFormatTestCases.txt", "UTF8", ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Couldn't open NumberFormatTestCases.txt");
+ return;
+ }
+ TokenIterator tokens(&reader);
+
+ Locale loc("en", "US", "");
+ DecimalFormat *ref = 0, *fmt = 0;
+ MeasureFormat *mfmt = 0;
+ UnicodeString pat, tok, mloc, str, out, where, currAmt;
+ Formattable n;
+
+ for (;;) {
+ ec = U_ZERO_ERROR;
+ if (!tokens.next(tok, ec)) {
+ break;
+ }
+ where = UnicodeString("(") + tokens.getLineNumber() + ") ";
+ int32_t cmd = keywordIndex(tok);
+ switch (cmd) {
+ case 0:
+ // ref= <reference pattern>
+ if (!tokens.next(tok, ec)) goto error;
+ delete ref;
+ ref = new DecimalFormat(tok,
+ new DecimalFormatSymbols(Locale::getUS(), ec), ec);
+ if (U_FAILURE(ec)) {
+ dataerrln("Error constructing DecimalFormat");
+ goto error;
+ }
+ break;
+ case 1:
+ // loc= <locale>
+ if (!tokens.next(tok, ec)) goto error;
+ loc = Locale::createFromName(CharString(tok));
+ break;
+ case 2: // f:
+ case 3: // fp:
+ case 4: // rt:
+ case 5: // p:
+ if (!tokens.next(tok, ec)) goto error;
+ if (tok != "-") {
+ pat = tok;
+ delete fmt;
+ fmt = new DecimalFormat(pat, new DecimalFormatSymbols(loc, ec), ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: " + where + "Pattern \"" + pat + "\": " + u_errorName(ec));
+ ec = U_ZERO_ERROR;
+ if (!tokens.next(tok, ec)) goto error;
+ if (!tokens.next(tok, ec)) goto error;
+ if (cmd == 3) {
+ if (!tokens.next(tok, ec)) goto error;
+ }
+ continue;
+ }
+ }
+ if (cmd == 2 || cmd == 3 || cmd == 4) {
+ // f: <pattern or '-'> <number> <exp. string>
+ // fp: <pattern or '-'> <number> <exp. string> <exp. number>
+ // rt: <pattern or '-'> <number> <string>
+ UnicodeString num;
+ if (!tokens.next(num, ec)) goto error;
+ if (!tokens.next(str, ec)) goto error;
+ ref->parse(num, n, ec);
+ assertSuccess("parse", ec);
+ assertEquals(where + "\"" + pat + "\".format(" + num + ")",
+ str, fmt->format(n, out.remove(), ec));
+ assertSuccess("format", ec);
+ if (cmd == 3) { // fp:
+ if (!tokens.next(num, ec)) goto error;
+ ref->parse(num, n, ec);
+ assertSuccess("parse", ec);
+ }
+ if (cmd != 2) { // != f:
+ Formattable m;
+ fmt->parse(str, m, ec);
+ assertSuccess("parse", ec);
+ assertEquals(where + "\"" + pat + "\".parse(\"" + str + "\")",
+ n, m);
+ }
+ }
+ // p: <pattern or '-'> <string to parse> <exp. number>
+ else {
+ UnicodeString expstr;
+ if (!tokens.next(str, ec)) goto error;
+ if (!tokens.next(expstr, ec)) goto error;
+ Formattable exp, n;
+ ref->parse(expstr, exp, ec);
+ assertSuccess("parse", ec);
+ fmt->parse(str, n, ec);
+ assertSuccess("parse", ec);
+ assertEquals(where + "\"" + pat + "\".parse(\"" + str + "\")",
+ exp, n);
+ }
+ break;
+ case 8: // fpc:
+ if (!tokens.next(tok, ec)) goto error;
+ if (tok != "-") {
+ mloc = tok;
+ delete mfmt;
+ mfmt = MeasureFormat::createCurrencyFormat(
+ Locale::createFromName(CharString(mloc)), ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: " + where + "Loc \"" + mloc + "\": " + u_errorName(ec));
+ ec = U_ZERO_ERROR;
+ if (!tokens.next(tok, ec)) goto error;
+ if (!tokens.next(tok, ec)) goto error;
+ if (!tokens.next(tok, ec)) goto error;
+ continue;
+ }
+ }
+ // fpc: <loc or '-'> <curr.amt> <exp. string> <exp. curr.amt>
+ if (!tokens.next(currAmt, ec)) goto error;
+ if (!tokens.next(str, ec)) goto error;
+ parseCurrencyAmount(currAmt, *ref, (UChar)0x2F/*'/'*/, n, ec);
+ if (assertSuccess("parseCurrencyAmount", ec)) {
+ assertEquals(where + "getCurrencyFormat(" + mloc + ").format(" + currAmt + ")",
+ str, mfmt->format(n, out.remove(), ec));
+ assertSuccess("format", ec);
+ }
+ if (!tokens.next(currAmt, ec)) goto error;
+ parseCurrencyAmount(currAmt, *ref, (UChar)0x2F/*'/'*/, n, ec);
+ if (assertSuccess("parseCurrencyAmount", ec)) {
+ Formattable m;
+ mfmt->parseObject(str, m, ec);
+ if (assertSuccess("parseCurrency", ec)) {
+ assertEquals(where + "getCurrencyFormat(" + mloc + ").parse(\"" + str + "\")",
+ n, m);
+ }
+ }
+ break;
+ case 6:
+ // perr: <pattern or '-'> <invalid string>
+ errln("FAIL: Under construction");
+ goto done;
+ case 7: {
+ // pat: <pattern> <exp. toPattern, or '-' or 'err'>
+ UnicodeString testpat;
+ UnicodeString exppat;
+ if (!tokens.next(testpat, ec)) goto error;
+ if (!tokens.next(exppat, ec)) goto error;
+ UBool err = exppat == "err";
+ UBool existingPat = FALSE;
+ if (testpat == "-") {
+ if (err) {
+ errln("FAIL: " + where + "Invalid command \"pat: - err\"");
+ continue;
+ }
+ existingPat = TRUE;
+ testpat = pat;
+ }
+ if (exppat == "-") exppat = testpat;
+ DecimalFormat* f = 0;
+ UErrorCode ec2 = U_ZERO_ERROR;
+ if (existingPat) {
+ f = fmt;
+ } else {
+ f = new DecimalFormat(testpat, ec2);
+ }
+ if (U_SUCCESS(ec2)) {
+ if (err) {
+ errln("FAIL: " + where + "Invalid pattern \"" + testpat +
+ "\" was accepted");
+ } else {
+ UnicodeString pat2;
+ assertEquals(where + "\"" + testpat + "\".toPattern()",
+ exppat, f->toPattern(pat2));
+ }
+ } else {
+ if (err) {
+ logln("Ok: " + where + "Invalid pattern \"" + testpat +
+ "\" failed: " + u_errorName(ec2));
+ } else {
+ errln("FAIL: " + where + "Valid pattern \"" + testpat +
+ "\" failed: " + u_errorName(ec2));
+ }
+ }
+ if (!existingPat) delete f;
+ } break;
+ case -1:
+ errln("FAIL: " + where + "Unknown command \"" + tok + "\"");
+ goto done;
+ }
+ }
+ goto done;
+
+ error:
+ if (U_SUCCESS(ec)) {
+ errln("FAIL: Unexpected EOF");
+ } else {
+ errln("FAIL: " + where + "Unexpected " + u_errorName(ec));
+ }
+
+ done:
+ delete mfmt;
+ delete fmt;
+ delete ref;
+}
+
+
+//----------------------------------------------------------------------
+// Support methods
+//----------------------------------------------------------------------
+
+UBool NumberFormatTest::equalValue(const Formattable& a, const Formattable& b) {
+ if (a.getType() == b.getType()) {
+ return a == b;
+ }
+
+ if (a.getType() == Formattable::kLong) {
+ if (b.getType() == Formattable::kInt64) {
+ return a.getLong() == b.getLong();
+ } else if (b.getType() == Formattable::kDouble) {
+ return (double) a.getLong() == b.getDouble(); // TODO check use of double instead of long
+ }
+ } else if (a.getType() == Formattable::kDouble) {
+ if (b.getType() == Formattable::kLong) {
+ return a.getDouble() == (double) b.getLong();
+ } else if (b.getType() == Formattable::kInt64) {
+ return a.getDouble() == (double)b.getInt64();
+ }
+ } else if (a.getType() == Formattable::kInt64) {
+ if (b.getType() == Formattable::kLong) {
+ return a.getInt64() == (int64_t)b.getLong();
+ } else if (b.getType() == Formattable::kDouble) {
+ return a.getInt64() == (int64_t)b.getDouble();
+ }
+ }
+ return FALSE;
+}
+
+void NumberFormatTest::expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) {
+ // Don't round-trip format test, since we explicitly do it
+ expect(fmt, n, str, FALSE);
+ expect(fmt, str, n);
+}
+
+void NumberFormatTest::expect2(NumberFormat* fmt, const Formattable& n,
+ const UnicodeString& exp,
+ UErrorCode status) {
+ if (U_FAILURE(status)) {
+ errln("FAIL: NumberFormat constructor");
+ } else {
+ expect2(*fmt, n, exp);
+ }
+ delete fmt;
+}
+
+void NumberFormatTest::expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n) {
+ UErrorCode status = U_ZERO_ERROR;
+ Formattable num;
+ fmt.parse(str, num, status);
+ if (U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: Parse failed for \"") + str + "\"");
+ return;
+ }
+ UnicodeString pat;
+ ((DecimalFormat*) &fmt)->toPattern(pat);
+ if (equalValue(num, n)) {
+ logln(UnicodeString("Ok \"") + str + "\" x " +
+ pat + " = " +
+ toString(num));
+ } else {
+ errln(UnicodeString("FAIL \"") + str + "\" x " +
+ pat + " = " +
+ toString(num) + ", expected " + toString(n));
+ }
+}
+
+void NumberFormatTest::expect(NumberFormat& fmt, const Formattable& n,
+ const UnicodeString& exp, UBool rt) {
+ UnicodeString saw;
+ FieldPosition pos;
+ UErrorCode status = U_ZERO_ERROR;
+ fmt.format(n, saw, pos, status);
+ CHECK(status, "NumberFormat::format");
+ UnicodeString pat;
+ ((DecimalFormat*) &fmt)->toPattern(pat);
+ if (saw == exp) {
+ logln(UnicodeString("Ok ") + toString(n) + " x " +
+ escape(pat) + " = \"" +
+ escape(saw) + "\"");
+ // We should be able to round-trip the formatted string =>
+ // number => string (but not the other way around: number
+ // => string => number2, might have number2 != number):
+ if (rt) {
+ Formattable n2;
+ fmt.parse(exp, n2, status);
+ if (U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: Parse failed for \"") + exp + "\"");
+ return;
+ }
+ UnicodeString saw2;
+ fmt.format(n2, saw2, pos, status);
+ CHECK(status, "NumberFormat::format");
+ if (saw2 != exp) {
+ errln((UnicodeString)"FAIL \"" + exp + "\" => " + toString(n2) +
+ " => \"" + saw2 + "\"");
+ }
+ }
+ } else {
+ errln(UnicodeString("FAIL ") + toString(n) + " x " +
+ escape(pat) + " = \"" +
+ escape(saw) + "\", expected \"" + exp + "\"");
+ }
+}
+
+void NumberFormatTest::expect(NumberFormat* fmt, const Formattable& n,
+ const UnicodeString& exp,
+ UErrorCode status) {
+ if (U_FAILURE(status)) {
+ errln("FAIL: NumberFormat constructor");
+ } else {
+ expect(*fmt, n, exp);
+ }
+ delete fmt;
+}
+
+void NumberFormatTest::expectCurrency(NumberFormat& nf, const Locale& locale,
+ double value, const UnicodeString& string) {
+ UErrorCode ec = U_ZERO_ERROR;
+ DecimalFormat& fmt = * (DecimalFormat*) &nf;
+ const UChar DEFAULT_CURR[] = {45/*-*/,0};
+ UChar curr[4];
+ u_strcpy(curr, DEFAULT_CURR);
+ if (*locale.getLanguage() != 0) {
+ ucurr_forLocale(locale.getName(), curr, 4, &ec);
+ assertSuccess("ucurr_forLocale", ec);
+ fmt.setCurrency(curr, ec);
+ assertSuccess("DecimalFormat::setCurrency", ec);
+ fmt.setCurrency(curr); //Deprecated variant, for coverage only
+ }
+ UnicodeString s;
+ fmt.format(value, s);
+ s.findAndReplace((UChar32)0x00A0, (UChar32)0x0020);
+
+ // Default display of the number yields "1234.5599999999999"
+ // instead of "1234.56". Use a formatter to fix this.
+ NumberFormat* f =
+ NumberFormat::createInstance(Locale::getUS(), ec);
+ UnicodeString v;
+ if (U_FAILURE(ec)) {
+ // Oops; bad formatter. Use default op+= display.
+ v = (UnicodeString)"" + value;
+ } else {
+ f->setMaximumFractionDigits(4);
+ f->setGroupingUsed(FALSE);
+ f->format(value, v);
+ }
+ delete f;
+
+ if (s == string) {
+ logln((UnicodeString)"Ok: " + v + " x " + curr + " => " + prettify(s));
+ } else {
+ errln((UnicodeString)"FAIL: " + v + " x " + curr + " => " + prettify(s) +
+ ", expected " + prettify(string));
+ }
+}
+
+void NumberFormatTest::expectPat(DecimalFormat& fmt, const UnicodeString& exp) {
+ UnicodeString pat;
+ fmt.toPattern(pat);
+ if (pat == exp) {
+ logln(UnicodeString("Ok \"") + pat + "\"");
+ } else {
+ errln(UnicodeString("FAIL \"") + pat + "\", expected \"" + exp + "\"");
+ }
+}
+
+void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
+ int32_t pos) {
+ expectPad(fmt, pat, pos, 0, (UnicodeString)"");
+}
+void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
+ int32_t pos, int32_t width, UChar pad) {
+ expectPad(fmt, pat, pos, width, UnicodeString(pad));
+}
+void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
+ int32_t pos, int32_t width, const UnicodeString& pad) {
+ int32_t apos = 0, awidth = 0;
+ UnicodeString apadStr;
+ UErrorCode status = U_ZERO_ERROR;
+ fmt.applyPattern(pat, status);
+ if (U_SUCCESS(status)) {
+ apos = fmt.getPadPosition();
+ awidth = fmt.getFormatWidth();
+ apadStr=fmt.getPadCharacterString();
+ } else {
+ apos = -1;
+ awidth = width;
+ apadStr = pad;
+ }
+ if (apos == pos && awidth == width && apadStr == pad) {
+ UnicodeString infoStr;
+ if (pos == ILLEGAL) {
+ infoStr = UnicodeString(" width=", "") + awidth + UnicodeString(" pad=", "") + apadStr;
+ }
+ logln(UnicodeString("Ok \"") + pat + "\" pos=" + apos + infoStr);
+ } else {
+ errln(UnicodeString("FAIL \"") + pat + "\" pos=" + apos +
+ " width=" + awidth + " pad=" + apadStr +
+ ", expected " + pos + " " + width + " " + pad);
+ }
+}
+void NumberFormatTest::TestJB3832(){
+ const char* localeID = "pt_PT@currency=PTE";
+ Locale loc(localeID);
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString expected("1,150$50 Esc.");
+ UnicodeString s;
+ NumberFormat* currencyFmt = NumberFormat::createCurrencyInstance(loc, status);
+ if(U_FAILURE(status)){
+ errln("Could not create currency formatter for locale %s", localeID);
+ return;
+ }
+ currencyFmt->format(1150.50, s);
+ if(s!=expected){
+ errln(UnicodeString("FAIL: Expected: ")+expected
+ + UnicodeString(" Got: ") + s
+ + UnicodeString( " for locale: ")+ UnicodeString(localeID) );
+ }
+ if (U_FAILURE(status)){
+ errln("FAIL: Status %s", u_errorName(status));
+ }
+ delete currencyFmt;
+}
+
+void NumberFormatTest::TestHost()
+{
+#ifdef U_WINDOWS
+ Win32NumberTest::testLocales(this);
+#endif
+}
+
+void NumberFormatTest::TestHostClone()
+{
+ /*
+ Verify that a cloned formatter gives the same results
+ and is useable after the original has been deleted.
+ */
+ // This is mainly important on Windows.
+ UErrorCode status = U_ZERO_ERROR;
+ Locale loc("en_US@compat=host");
+ UDate now = Calendar::getNow();
+ NumberFormat *full = NumberFormat::createInstance(loc, status);
+ if (full == NULL || U_FAILURE(status)) {
+ errln("FAIL: Can't create Relative date instance");
+ return;
+ }
+ UnicodeString result1;
+ full->format(now, result1, status);
+ Format *fullClone = full->clone();
+ delete full;
+ full = NULL;
+
+ UnicodeString result2;
+ fullClone->format(now, result2, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: format failure.");
+ }
+ if (result1 != result2) {
+ errln("FAIL: Clone returned different result from non-clone.");
+ }
+ delete fullClone;
+}
+
+void NumberFormatTest::TestCurrencyFormat()
+{
+ // This test is here to increase code coverage.
+ UErrorCode status = U_ZERO_ERROR;
+ MeasureFormat *cloneObj;
+ UnicodeString str;
+ Formattable toFormat, result;
+ static const UChar ISO_CODE[4] = {0x0047, 0x0042, 0x0050, 0};
+
+ Locale saveDefaultLocale = Locale::getDefault();
+ Locale::setDefault( Locale::getUK(), status );
+ if (U_FAILURE(status)) {
+ errln("couldn't set default Locale!");
+ return;
+ }
+
+ MeasureFormat *measureObj = MeasureFormat::createCurrencyFormat(status);
+ Locale::setDefault( saveDefaultLocale, status );
+ if (U_FAILURE(status)){
+ errln("FAIL: Status %s", u_errorName(status));
+ return;
+ }
+ cloneObj = (MeasureFormat *)measureObj->clone();
+ if (cloneObj == NULL) {
+ errln("Clone doesn't work");
+ return;
+ }
+ toFormat.adoptObject(new CurrencyAmount(1234.56, ISO_CODE, status));
+ measureObj->format(toFormat, str, status);
+ measureObj->parseObject(str, result, status);
+ if (U_FAILURE(status)){
+ errln("FAIL: Status %s", u_errorName(status));
+ }
+ if (result != toFormat) {
+ errln("measureObj does not round trip. Formatted string was \"" + str + "\" Got: " + toString(result) + " Expected: " + toString(toFormat));
+ }
+ status = U_ZERO_ERROR;
+ str.truncate(0);
+ cloneObj->format(toFormat, str, status);
+ cloneObj->parseObject(str, result, status);
+ if (U_FAILURE(status)){
+ errln("FAIL: Status %s", u_errorName(status));
+ }
+ if (result != toFormat) {
+ errln("Clone does not round trip. Formatted string was \"" + str + "\" Got: " + toString(result) + " Expected: " + toString(toFormat));
+ }
+ if (*measureObj != *cloneObj) {
+ errln("Cloned object is not equal to the original object");
+ }
+ delete measureObj;
+ delete cloneObj;
+
+ status = U_USELESS_COLLATOR_ERROR;
+ if (MeasureFormat::createCurrencyFormat(status) != NULL) {
+ errln("createCurrencyFormat should have returned NULL.");
+ }
+}
+
+/* Port of ICU4J rounding test. */
+void NumberFormatTest::TestRounding() {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = (DecimalFormat*)NumberFormat::createCurrencyInstance(Locale::getEnglish(), status);
+
+ if (U_FAILURE(status)) {
+ errln("Unable to create decimal formatter.");
+ return;
+ }
+
+ int roundingIncrements[]={1, 2, 5, 20, 50, 100};
+ int testValues[]={0, 300};
+
+ for (int j=0; j<2; j++) {
+ for (int mode=DecimalFormat::kRoundUp;mode<DecimalFormat::kRoundHalfEven;mode++) {
+ df->setRoundingMode((DecimalFormat::ERoundingMode)mode);
+ for (int increment=0; increment<6; increment++) {
+ double base=testValues[j];
+ double rInc=roundingIncrements[increment];
+ checkRounding(df, base, 20, rInc);
+ rInc=1.000000000/rInc;
+ checkRounding(df, base, 20, rInc);
+ }
+ }
+ }
+
+}
+
+void NumberFormatTest::checkRounding(DecimalFormat* df, double base, int iterations, double increment) {
+ df->setRoundingIncrement(increment);
+ double lastParsed=INT32_MIN; //Intger.MIN_VALUE
+ for (int i=-iterations; i<=iterations;i++) {
+ double iValue=base+(increment*(i*0.1));
+ double smallIncrement=0.00000001;
+ if (iValue!=0) {
+ smallIncrement*=iValue;
+ }
+ //we not only test the value, but some values in a small range around it
+ lastParsed=checkRound(df, iValue-smallIncrement, lastParsed);
+ lastParsed=checkRound(df, iValue, lastParsed);
+ lastParsed=checkRound(df, iValue+smallIncrement, lastParsed);
+ }
+}
+
+double NumberFormatTest::checkRound(DecimalFormat* df, double iValue, double lastParsed) {
+ UErrorCode status=U_ZERO_ERROR;
+ UnicodeString formattedDecimal;
+ double parsed;
+ Formattable result;
+ df->format(iValue, formattedDecimal, status);
+
+ if (U_FAILURE(status)) {
+ errln("Error formatting number.");
+ }
+
+ df->parse(formattedDecimal, result, status);
+
+ if (U_FAILURE(status)) {
+ errln("Error parsing number.");
+ }
+
+ parsed=result.getDouble();
+
+ if (lastParsed>parsed) {
+ errln("Rounding wrong direction! %d > %d", lastParsed, parsed);
+ }
+
+ return lastParsed;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.h b/Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.h
new file mode 100644
index 00000000000..80baa1456e3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/numfmtst.h
@@ -0,0 +1,219 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _NUMBERFORMATTEST_
+#define _NUMBERFORMATTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/numfmt.h"
+#include "unicode/decimfmt.h"
+#include "caltztst.h"
+
+/**
+ * Performs various in-depth test on NumberFormat
+ **/
+class NumberFormatTest: public CalendarTimeZoneTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ public:
+
+ /**
+ * Test APIs (to increase code coverage)
+ */
+ void TestAPI(void);
+
+ void TestCoverage(void);
+
+ /**
+ * Test the handling of quotes
+ **/
+ void TestQuotes(void);
+ /**
+ * Test patterns with exponential representation
+ **/
+ void TestExponential(void);
+ /**
+ * Test handling of patterns with currency symbols
+ **/
+ void TestCurrencySign(void);
+ /**
+ * Test different format patterns
+ **/
+ void TestPatterns(void);
+ /**
+ * API coverage for DigitList
+ **/
+ //void TestDigitList(void);
+
+ /**
+ * Test localized currency patterns.
+ */
+ void TestCurrency(void);
+
+ /**
+ * Test the Currency object handling, new as of ICU 2.2.
+ */
+ void TestCurrencyObject(void);
+
+ void TestCurrencyPatterns(void);
+
+ /**
+ * Do rudimentary testing of parsing.
+ */
+ void TestParse(void);
+ /**
+ * Test proper rounding by the format method.
+ */
+ void TestRounding487(void);
+
+ // New tests for alphaWorks upgrade
+ void TestExponent(void);
+
+ void TestScientific(void);
+
+ void TestScientific2(void);
+
+ void TestScientificGrouping(void);
+
+ void TestInt64(void);
+
+ void TestSurrogateSupport(void);
+
+ /**
+ * Test the functioning of the secondary grouping value.
+ */
+ void TestSecondaryGrouping(void);
+
+ void TestWhiteSpaceParsing(void);
+
+ void TestComplexCurrency(void);
+
+ void TestPad(void);
+ void TestPatterns2(void);
+
+ /**
+ * Test currency registration.
+ */
+ void TestRegCurrency(void);
+
+ void TestCurrencyNames(void);
+
+ void TestCurrencyAmount(void);
+
+ void TestCurrencyUnit(void);
+
+ void TestSymbolsWithBadLocale(void);
+
+ void TestAdoptDecimalFormatSymbols(void);
+
+ void TestPerMill(void);
+
+ void TestIllegalPatterns(void);
+
+ void TestCases(void);
+
+ void TestJB3832(void);
+
+ void TestHost(void);
+
+ void TestHostClone(void);
+
+ void TestCurrencyFormat(void);
+
+ /* Port of ICU4J rounding test. */
+ void TestRounding(void);
+ private:
+
+ static UBool equalValue(const Formattable& a, const Formattable& b);
+
+ void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
+
+ void expect2(NumberFormat& fmt, const Formattable& n, const char* str) {
+ expect2(fmt, n, UnicodeString(str, ""));
+ }
+
+ void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec);
+
+ void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) {
+ expect2(fmt, n, UnicodeString(str, ""), ec);
+ }
+
+ void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n);
+
+ void expect(NumberFormat& fmt, const char *str, const Formattable& n) {
+ expect(fmt, UnicodeString(str, ""), n);
+ }
+
+ void expect(NumberFormat& fmt, const Formattable& n,
+ const UnicodeString& exp, UBool rt=TRUE);
+
+ void expect(NumberFormat& fmt, const Formattable& n,
+ const char *exp, UBool rt=TRUE) {
+ expect(fmt, n, UnicodeString(exp, ""), rt);
+ }
+
+ void expect(NumberFormat* fmt, const Formattable& n,
+ const UnicodeString& exp, UErrorCode);
+
+ void expect(NumberFormat* fmt, const Formattable& n,
+ const char *exp, UErrorCode errorCode) {
+ expect(fmt, n, UnicodeString(exp, ""), errorCode);
+ }
+
+ void expectCurrency(NumberFormat& nf, const Locale& locale,
+ double value, const UnicodeString& string);
+
+ void expectPad(DecimalFormat& fmt, const UnicodeString& pat,
+ int32_t pos, int32_t width, UChar pad);
+
+ void expectPad(DecimalFormat& fmt, const char *pat,
+ int32_t pos, int32_t width, UChar pad) {
+ expectPad(fmt, UnicodeString(pat, ""), pos, width, pad);
+ }
+
+ void expectPad(DecimalFormat& fmt, const UnicodeString& pat,
+ int32_t pos, int32_t width, const UnicodeString& pad);
+
+ void expectPad(DecimalFormat& fmt, const char *pat,
+ int32_t pos, int32_t width, const UnicodeString& pad) {
+ expectPad(fmt, UnicodeString(pat, ""), pos, width, pad);
+ }
+
+ void expectPat(DecimalFormat& fmt, const UnicodeString& exp);
+
+ void expectPat(DecimalFormat& fmt, const char *exp) {
+ expectPat(fmt, UnicodeString(exp, ""));
+ }
+
+ void expectPad(DecimalFormat& fmt, const UnicodeString& pat,
+ int32_t pos);
+
+ void expectPad(DecimalFormat& fmt, const char *pat,
+ int32_t pos) {
+ expectPad(fmt, pat, pos, 0, (UChar)0);
+ }
+
+ // internal utility routine
+ static UnicodeString& escape(UnicodeString& s);
+
+ enum { ILLEGAL = -1 };
+
+ // internal subtest used by TestRounding487
+ void roundingTest(NumberFormat& nf, double x, int32_t maxFractionDigits, const char* expected);
+
+ // internal rounding checking for TestRounding
+ void checkRounding(DecimalFormat* df, double base, int iterations, double increment);
+
+ double checkRound(DecimalFormat* df, double iValue, double lastParsed);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _NUMBERFORMATTEST_
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/numrgts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/numrgts.cpp
new file mode 100644
index 00000000000..e93eb5ce1d6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/numrgts.cpp
@@ -0,0 +1,2647 @@
+/***********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "numrgts.h"
+
+#include <float.h> // DBL_MIN, DBL_MAX
+#include <stdio.h>
+
+#include "unicode/dcfmtsym.h"
+#include "unicode/decimfmt.h"
+#include "unicode/locid.h"
+#include "unicode/resbund.h"
+#include "unicode/calendar.h"
+#include "unicode/datefmt.h"
+#include "unicode/ucurr.h"
+#include "putilimp.h"
+
+class MyNumberFormatTest : public NumberFormat
+{
+public:
+
+ virtual UClassID getDynamicClassID(void) const;
+
+ virtual UnicodeString& format( double number,
+ UnicodeString& toAppendTo,
+ FieldPosition& pos,
+ UErrorCode& status) const
+ {
+ return NumberFormat::format(number, toAppendTo, pos, status);
+ }
+
+ /* Just keep this here to make some of the compilers happy */
+ virtual UnicodeString& format(const Formattable& obj,
+ UnicodeString& toAppendTo,
+ FieldPosition& pos,
+ UErrorCode& status) const
+ {
+ return NumberFormat::format(obj, toAppendTo, pos, status);
+ }
+
+ /* Just use one of the format functions */
+ virtual UnicodeString& format( double /* number */,
+ UnicodeString& toAppendTo,
+ FieldPosition& /* pos */) const
+ {
+ toAppendTo = "";
+ return toAppendTo;
+ }
+
+ /*
+ public Number parse(String text, ParsePosition parsePosition)
+ { return new Integer(0); }
+ */
+
+ /* Just use one of the parse functions */
+ virtual void parse( const UnicodeString& /* text */,
+ Formattable& result,
+ ParsePosition& /* parsePosition */) const
+ {
+ result.setLong((int32_t)0);
+ }
+
+ virtual void parse( const UnicodeString& text,
+ Formattable& result,
+ UErrorCode& status) const
+ {
+ NumberFormat::parse(text, result, status);
+ }
+ virtual Format* clone() const
+ { return NULL; }
+
+ virtual UnicodeString& format(int32_t,
+ UnicodeString& foo,
+ FieldPosition&) const
+ { return foo.remove(); }
+
+ virtual UnicodeString& format(int64_t,
+ UnicodeString& foo,
+ FieldPosition&) const
+ { return foo.remove(); }
+
+ virtual void applyPattern(const UnicodeString&, UParseError&, UErrorCode&){
+ }
+};
+
+int32_t gMyNumberFormatTestClassID;
+UClassID MyNumberFormatTest::getDynamicClassID() const
+{
+ return (UClassID)&gMyNumberFormatTestClassID;
+}
+
+
+// *****************************************************************************
+// class NumberFormatRegressionTest
+// *****************************************************************************
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+
+void
+NumberFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite NumberFormatRegressionTest");
+ switch (index) {
+ CASE(0,Test4075713);
+ CASE(1,Test4074620);
+ CASE(2,Test4088161);
+ CASE(3,Test4087245);
+ CASE(4,Test4087535);
+ CASE(5,Test4088503);
+ CASE(6,Test4066646);
+ CASE(7,Test4059870);
+ CASE(8,Test4083018);
+ CASE(9,Test4071492);
+ CASE(10,Test4086575);
+ CASE(11,Test4068693);
+ CASE(12,Test4069754);
+ CASE(13,Test4087251);
+ CASE(14,Test4090489);
+ CASE(15,Test4090504);
+ CASE(16,Test4095713);
+ CASE(17,Test4092561);
+ CASE(18,Test4092480);
+ CASE(19,Test4087244);
+ CASE(20,Test4070798);
+ CASE(21,Test4071005);
+ CASE(22,Test4071014);
+ CASE(23,Test4071859);
+ CASE(24,Test4093610);
+ CASE(25,Test4098741);
+ CASE(26,Test4074454);
+ CASE(27,Test4099404);
+ CASE(28,Test4101481);
+ CASE(29,Test4052223);
+ CASE(30,Test4061302);
+ CASE(31,Test4062486);
+ CASE(32,Test4108738);
+ CASE(33,Test4106658);
+ CASE(34,Test4106662);
+ CASE(35,Test4114639);
+ CASE(36,Test4106664);
+ CASE(37,Test4106667);
+ CASE(38,Test4110936);
+ CASE(39,Test4122840);
+ CASE(40,Test4125885);
+ CASE(41,Test4134034);
+ CASE(42,Test4134300);
+ CASE(43,Test4140009);
+ CASE(44,Test4141750);
+ CASE(45,Test4145457);
+ CASE(46,Test4147295);
+ CASE(47,Test4147706);
+ CASE(48,Test4162198);
+ CASE(49,Test4162852);
+ CASE(50,Test4167494);
+ CASE(51,Test4170798);
+ CASE(52,Test4176114);
+ CASE(53,Test4179818);
+ CASE(54,Test4212072);
+ CASE(55,Test4216742);
+ CASE(56,Test4217661);
+ CASE(57,Test4161100);
+ CASE(58,Test4243011);
+ CASE(59,Test4243108);
+ CASE(60,TestJ691);
+
+ default: name = ""; break;
+ }
+}
+
+UBool
+NumberFormatRegressionTest::failure(UErrorCode status, const UnicodeString& msg, const Locale& l)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ", "") + msg
+ + UnicodeString(" failed, error ", "") + UnicodeString(u_errorName(status), "") + UnicodeString(l.getName(),""));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+UBool
+NumberFormatRegressionTest::failure(UErrorCode status, const UnicodeString& msg, const char *l)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ", "") + msg
+ + UnicodeString(" failed, error ", "") + UnicodeString(u_errorName(status), "") + UnicodeString(l, ""));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+UBool
+NumberFormatRegressionTest::failure(UErrorCode status, const UnicodeString& msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ", "") + msg
+ + UnicodeString(" failed, error ", "") + UnicodeString(u_errorName(status), ""));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/**
+ * Convert Java-style strings with \u Unicode escapes into UnicodeString objects
+ */
+inline UnicodeString str(const char *input)
+{
+ return CharsToUnicodeString(input);
+}
+
+/* @bug 4075713
+ * NumberFormat.equals comparing with null should always return false.
+ */
+// {sfb} kind of silly in C++, just checking for new success
+void NumberFormatRegressionTest::Test4075713(void)
+{
+ //try {
+ MyNumberFormatTest *tmp = new MyNumberFormatTest();
+ if(tmp != NULL)
+ logln("NumberFormat.equals passed");
+ /*} catch (NullPointerException e) {
+ errln("(new MyNumberFormatTest()).equals(null) throws unexpected exception");
+ }*/
+
+ delete tmp;
+}
+
+/* @bug 4074620
+ * NumberFormat.equals comparing two obj equal even the setGroupingUsed
+ * flag is different.
+ */
+void NumberFormatRegressionTest::Test4074620(void)
+{
+
+ MyNumberFormatTest *nf1 = new MyNumberFormatTest();
+ MyNumberFormatTest *nf2 = new MyNumberFormatTest();
+
+ nf1->setGroupingUsed(FALSE);
+ nf2->setGroupingUsed(TRUE);
+
+ if(nf1 == nf2)
+ errln("Test for bug 4074620 failed");
+ else
+ logln("Test for bug 4074620 passed.");
+
+ delete nf1;
+ delete nf2;
+}
+
+
+/* @bug 4088161
+ * DecimalFormat.format() incorrectly uses maxFractionDigits setting.
+ */
+
+void NumberFormatRegressionTest::Test4088161 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ failure(status, "new DecimalFormat", "");
+ double d = 100;
+ df->setMinimumFractionDigits(0);
+ df->setMaximumFractionDigits(16);
+ UnicodeString sBuf1;
+ FieldPosition fp1(0);
+ logln(UnicodeString("d = ") + d);
+ logln("maxFractionDigits = " + df->getMaximumFractionDigits());
+
+ logln(" format(d) = '" + df->format(d, sBuf1, fp1) + "'");
+ df->setMaximumFractionDigits(17);
+ UnicodeString sBuf2;
+ FieldPosition fp2(0);
+ logln("maxFractionDigits = " + df->getMaximumFractionDigits());
+ sBuf2 = df->format(d, sBuf2, fp2);
+ if(sBuf2 != "100")
+ errln(" format(d) = '" + sBuf2 + "'");
+
+ delete df;
+}
+
+/* @bug 4087245
+ * DecimalFormatSymbols should be cloned in the ctor DecimalFormat.
+ * DecimalFormat(String, DecimalFormatSymbols).
+ */
+void NumberFormatRegressionTest::Test4087245 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols *symbols = new DecimalFormatSymbols(status);
+ failure(status, "new DecimalFormatSymbols", "");
+ // {sfb} One note about this test: if you pass in a pointer
+ // to the symbols, they are adopted and this test will fail,
+ // even though that is the correct behavior. To test the cloning
+ // of the symbols, it is necessary to pass in a reference to the symbols
+ DecimalFormat *df = new DecimalFormat("#,##0.0", *symbols, status);
+ failure(status, "new DecimalFormat with symbols", "");
+ int32_t n = 123;
+ UnicodeString buf1;
+ UnicodeString buf2;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ logln(UnicodeString("format(") + n + ") = " +
+ df->format(n, buf1, pos));
+ symbols->setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol, UnicodeString((UChar)0x70)); // change value of field
+ logln(UnicodeString("format(") + n + ") = " +
+ df->format(n, buf2, pos));
+ if(buf1 != buf2)
+ errln("Test for bug 4087245 failed");
+
+ delete df;
+ delete symbols;
+}
+
+/* @bug 4087535
+ * DecimalFormat.format() incorrectly formats 0.0
+ */
+void NumberFormatRegressionTest::Test4087535 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ failure(status, "new DecimalFormat", "");
+ df->setMinimumIntegerDigits(0);
+
+ double n = 0;
+ UnicodeString buffer;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ buffer = df->format(n, buffer, pos);
+ if (buffer.length() == 0)
+ errln(/*n + */": '" + buffer + "'");
+ n = 0.1;
+ buffer = df->format(n, buffer, pos);
+ if (buffer.length() == 0)
+ errln(/*n + */": '" + buffer + "'");
+
+ delete df;
+}
+
+/* @bug 4088503
+ * DecimalFormat.format fails when groupingSize is set to 0.
+ */
+// {sfb} how do I tell if this worked? --> FieldPosition doesn't change ??
+void NumberFormatRegressionTest::Test4088503 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ failure(status, "new DecimalFormat", "");
+ df->setGroupingSize(0);
+ UnicodeString sBuf;
+ FieldPosition fp(FieldPosition::DONT_CARE);
+ //try {
+ logln(df->format((int32_t)123, sBuf, fp));
+ //if(fp == FieldPosition(0))
+ // errln("Test for bug 4088503 failed.");
+ /*} catch (Exception foo) {
+ errln("Test for bug 4088503 failed.");
+ }*/
+ delete df;
+
+}
+/* @bug 4066646
+ * NumberFormat.getCurrencyInstance is wrong.
+ */
+void NumberFormatRegressionTest::Test4066646 (void)
+{
+ assignFloatValue(2.04f);
+ assignFloatValue(2.03f);
+ assignFloatValue(2.02f);
+ assignFloatValue(0.0f);
+}
+
+float
+NumberFormatRegressionTest::assignFloatValue(float returnfloat)
+{
+ logln(UnicodeString(" VALUE ") + returnfloat);
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nfcommon = NumberFormat::createCurrencyInstance(Locale::getUS(), status);
+ if (failure(status, "NumberFormat::createCurrencyInstance", Locale::getUS())){
+ delete nfcommon;
+ return returnfloat;
+ }
+ nfcommon->setGroupingUsed(FALSE);
+
+ UnicodeString stringValue;
+ stringValue = nfcommon->format(returnfloat, stringValue);
+ logln(" DISPLAYVALUE " + stringValue);
+ Formattable result;
+ nfcommon->parse(stringValue, result, status);
+ failure(status, "nfcommon->parse", Locale::getUS());
+ float floatResult = (float) (result.getType() == Formattable::kDouble
+ ? result.getDouble() : result.getLong());
+ if( uprv_fabs(floatResult - returnfloat) > 0.0001)
+ //String stringValue = nfcommon.format(returnfloat).substring(1);
+ //if (Float.valueOf(stringValue).floatValue() != returnfloat)
+ errln(UnicodeString("FAIL: expected ") + returnfloat + ", got " + floatResult + " (" + stringValue+")");
+
+ delete nfcommon;
+ return returnfloat;
+} // End Of assignFloatValue()
+
+/* @bug 4059870
+ * DecimalFormat throws exception when parsing "0"
+ */
+void NumberFormatRegressionTest::Test4059870(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *format = new DecimalFormat("00", status);
+ failure(status, "new Decimalformat", Locale::getUS());
+ //try {
+ Formattable result;
+ UnicodeString str;
+ format->parse(UnicodeString("0"), result, status);
+ failure(status, "format->parse", Locale::getUS());
+
+ /*}
+ catch (Exception e) {
+ errln("Test for bug 4059870 failed : " + e);
+ }*/
+
+ delete format;
+}
+/* @bug 4083018
+ * DecimalFormatSymbol.equals should always return false when
+ * comparing with null.
+ */
+// {sfb} this is silly in C++
+void NumberFormatRegressionTest::Test4083018 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols *dfs = new DecimalFormatSymbols(status);
+ failure(status, "new DecimalFormatSymbols", Locale::getUS());
+ //try {
+ if (dfs != NULL)
+ logln("Test Passed!");
+ else
+ errln("Test for bug 4083018 failed");
+ /*} catch (Exception foo) {
+ errln("Test for bug 4083018 failed => Message : " + foo.getMessage());
+ }*/
+
+ delete dfs;
+}
+
+/* @bug 4071492
+ * DecimalFormat does not round up correctly.
+ */
+void NumberFormatRegressionTest::Test4071492 (void)
+{
+ double x = 0.00159999;
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nf = NumberFormat::createInstance(status);
+ if (failure(status, "NumberFormat::createInstance", Locale::getUS())) {
+ delete nf;
+ return;
+ }
+ nf->setMaximumFractionDigits(4);
+ UnicodeString out;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ out = nf->format(x, out, pos);
+ logln("0.00159999 formats with 4 fractional digits to " + out);
+ UnicodeString expected("0.0016");
+ if (out != expected)
+ errln("FAIL: Expected " + expected);
+
+ delete nf;
+}
+
+/* @bug 4086575
+ * A space as a group separator for localized pattern causes
+ * wrong format. WorkAround : use non-breaking space.
+ */
+void NumberFormatRegressionTest::Test4086575(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nf1 = NumberFormat::createInstance(Locale::getFrance(), status);
+
+ // TODO: There is not a good way to find out that the creation of this number format has
+ // failed. Major rewiring of format construction proposed.
+ if(U_FAILURE(status)) {
+ errln("Something is wrong with French number format - it should not fallback. Exitting");
+ delete nf1;
+ return;
+ }
+ failure(status, "NumberFormat::createInstance", Locale::getFrance());
+
+ // C++ workaround to make sure cast works
+ // Wouldn't dynamic_cast<DecimalFormat*> be great?
+ if(nf1->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln("NumberFormat::createInstance returned incorrect type.");
+ return;
+ }
+
+ DecimalFormat *nf = (DecimalFormat*) nf1;
+ UnicodeString temp;
+ logln("nf toPattern1: " + nf->toPattern(temp));
+ logln("nf toLocPattern1: " + nf->toLocalizedPattern(temp));
+
+ // No group separator
+ logln("...applyLocalizedPattern ###,00;(###,00) ");
+ nf->applyLocalizedPattern(UnicodeString("###,00;(###,00)"), status);
+ failure(status, "nf->applyLocalizedPattern", Locale::getFrance());
+ logln("nf toPattern2: " + nf->toPattern(temp));
+ logln("nf toLocPattern2: " + nf->toLocalizedPattern(temp));
+
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ logln("nf: " + nf->format((int32_t)1234, temp, pos)); // 1234,00
+ logln("nf: " + nf->format((int32_t)-1234, temp, pos)); // (1234,00)
+
+ // Space as group separator
+
+ logln("...applyLocalizedPattern # ###,00;(# ###,00) ");
+ // nbsp = \u00a0
+ //nf->applyLocalizedPattern("#\u00a0###,00;(#\u00a0###,00)");
+ UChar patChars[] = {
+ 0x23, 0x00a0, 0x23, 0x23, 0x23, 0x2c, 0x30, 0x30, 0x3b,
+ 0x28, 0x23, 0x00a0, 0x23, 0x23, 0x23, 0x2c, 0x30, 0x30, 0x29
+ };
+ UnicodeString pat(patChars, 19, 19);
+ nf->applyLocalizedPattern(pat, status);
+ failure(status, "nf->applyLocalizedPattern", Locale::getFrance());
+ logln("nf toPattern2: " + nf->toPattern(temp));
+ logln("nf toLocPattern2: " + nf->toLocalizedPattern(temp));
+ UnicodeString buffer;
+ buffer = nf->format((int32_t)1234, buffer, pos);
+ //if (buffer != UnicodeString("1\u00a0234,00"))
+ UChar c[] = {
+ 0x31, 0x00a0, 0x32, 0x33, 0x34, 0x2c, 0x30, 0x30
+ };
+ UnicodeString cc(c, 8, 8);
+ if (buffer != cc)
+ errln("nf : " + buffer); // Expect 1 234,00
+
+ buffer.remove();
+ buffer = nf->format((int32_t)-1234, buffer, pos);
+ UChar c1[] = {
+ 0x28, 0x31, 0x00a0, 0x32, 0x33, 0x34, 0x2c, 0x30, 0x30, 0x29
+ };
+ UnicodeString cc1(c1, 10, 10);
+ if (buffer != cc1)
+ errln("nf : " + buffer); // Expect (1 234,00)
+
+ // Erroneously prints:
+ // 1234,00 ,
+ // (1234,00 ,)
+
+ delete nf1;
+}
+/* @bug 4068693
+ * DecimalFormat.parse returns wrong value
+ */
+// {sfb} slightly converted into a round-trip test, since in C++
+// there is no Double.toString()
+void NumberFormatRegressionTest::Test4068693(void)
+{
+ logln("----- Test Application -----");
+ ParsePosition pos(0);
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ Formattable d;
+ //Double d = (Double)df.parse("123.55456", pos=new ParsePosition(0));
+ df->parse(UnicodeString("123.55456"), d, pos);
+ //if (!d.toString().equals("123.55456")) {
+ UnicodeString dstr;
+ df->setMaximumFractionDigits(999);
+ df->setMaximumIntegerDigits(999);
+ FieldPosition fp(FieldPosition::DONT_CARE);
+ dstr = df->format(d.getDouble(), dstr, fp);
+ if (dstr != UnicodeString("123.55456")) {
+ errln(UnicodeString("Result -> ") + d.getDouble());
+ }
+
+ delete df;
+}
+
+/* @bug 4069754, 4067878
+ * null pointer thrown when accessing a deserialized DecimalFormat
+ * object.
+ */
+// {sfb} doesn't apply in C++
+void NumberFormatRegressionTest::Test4069754(void)
+{
+/* try {
+ myformat it = new myformat();
+ logln(it.Now());
+ FileOutputStream ostream = new FileOutputStream("t.tmp");
+ ObjectOutputStream p = new ObjectOutputStream(ostream);
+ p.writeObject(it);
+ ostream.close();
+ logln("Saved ok.");
+
+ FileInputStream istream = new FileInputStream("t.tmp");
+ ObjectInputStream p2 = new ObjectInputStream(istream);
+ myformat it2 = (myformat)p2.readObject();
+ logln(it2.Now());
+ istream.close();
+ logln("Loaded ok.");
+ } catch (Exception foo) {
+ errln("Test for bug 4069754 or 4057878 failed => Exception: " + foo.getMessage());
+ }
+*/}
+
+/* @bug 4087251
+ * DecimalFormat.applyPattern(String) allows illegal patterns
+ */
+void NumberFormatRegressionTest::Test4087251 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ //try {
+ df->applyPattern(UnicodeString("#.#.#"), status);
+ if( ! U_FAILURE(status))
+ errln("df->applyPattern with illegal pattern didn't fail");
+ UnicodeString temp;
+ logln("toPattern() returns \"" + df->toPattern(temp) + "\"");
+ //errln("applyPattern(\"#.#.#\") doesn't throw IllegalArgumentException");
+ /*} catch (IllegalArgumentException e) {
+ logln("Caught Illegal Argument Error !");
+ }*/
+ // Second test; added 5/11/98 when reported to fail on 1.2b3
+ //try {
+ df->applyPattern("#0.0#0#0", status);
+ if( ! U_FAILURE(status))
+ errln("df->applyPattern with illegal pattern didn't fail");
+ logln("toPattern() returns \"" + df->toPattern(temp) + "\"");
+ //errln("applyPattern(\"#0.0#0#0\") doesn't throw IllegalArgumentException");
+ /*} catch (IllegalArgumentException e) {
+ logln("Ok - IllegalArgumentException for #0.0#0#0");
+ }*/
+
+ delete df;
+}
+
+/* @bug 4090489
+ * DecimalFormat.format() loses precision
+ */
+void NumberFormatRegressionTest::Test4090489 (void)
+{
+// {sfb} sprintf doesn't correctly handle the double, so there is nothing
+// that NumberFormat can do. For some reason, it does not format the last 1.
+
+/* UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ failure(status, "new DecimalFormat");
+ df->setMinimumFractionDigits(10);
+ df->setMaximumFractionDigits(999);
+ df->setGroupingUsed(FALSE);
+ double d = 1.000000000000001E7;
+ //BigDecimal bd = new BigDecimal(d);
+ UnicodeString sb;
+ FieldPosition fp(0);
+ logln(UnicodeString("d = ") + d);
+ //logln("BigDecimal.toString(): " + bd.toString());
+ df->format(d, sb, fp);
+ if (sb != "10000000.0000000100") {
+ errln("DecimalFormat.format(): " + sb);
+ }
+*/
+}
+
+/* @bug 4090504
+ * DecimalFormat.format() loses precision
+ */
+void NumberFormatRegressionTest::Test4090504 (void)
+{
+ double d = 1;
+ logln(UnicodeString("d = ") + d);
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ UnicodeString sb;
+ FieldPosition fp(FieldPosition::DONT_CARE);
+ //try {
+ for (int i = 17; i <= 20; i++) {
+ df->setMaximumFractionDigits(i);
+ //sb = new StringBuffer("");
+ fp.setField(0);
+ logln(" getMaximumFractionDigits() = " + i);
+ logln(" formated: " + df->format(d, sb, fp));
+ }
+ /*} catch (Exception foo) {
+ errln("Bug 4090504 regression test failed. Message : " + foo.getMessage());
+ }*/
+
+ delete df;
+}
+/* @bug 4095713
+ * DecimalFormat.parse(String str, ParsePosition pp) loses precision
+ */
+void NumberFormatRegressionTest::Test4095713 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ UnicodeString str("0.1234");
+ double d1 = 0.1234;
+ //Double d1 = new Double(str);
+ //Double d2 = (Double) df.parse(str, new ParsePosition(0));
+ Formattable d2;
+ ParsePosition pp(0);
+ df->parse(str, d2, pp);
+ logln(UnicodeString("") + d1);
+ if (d2.getDouble() != d1)
+ errln(UnicodeString("Bug 4095713 test failed, new double value : ") + d2.getDouble());
+ delete df;
+}
+
+/* @bug 4092561
+ * DecimalFormat.parse() fails when multiplier is not set to 1
+ */
+// {sfb} not sure what to do with this one
+void NumberFormatRegressionTest::Test4092561 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+
+ // {sfb} going to cheat here and use sprintf ??
+
+ /*UnicodeString str = Long.toString(Long.MIN_VALUE);
+ logln("Long.MIN_VALUE : " + df.parse(str, new ParsePosition(0)).toString());
+ df.setMultiplier(100);
+ Number num = df.parse(str, new ParsePosition(0));
+ if (num.doubleValue() != -9.223372036854776E16)
+ errln("Bug 4092561 test failed when multiplier is set to not 1.");
+*/
+ delete df;
+}
+
+/* @bug 4092480
+ * DecimalFormat: Negative format ignored.
+ */
+void NumberFormatRegressionTest::Test4092480 (void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *dfFoo = new DecimalFormat(UnicodeString("000"), status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete dfFoo;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+
+ //try {
+ dfFoo->applyPattern("0000;-000", status);
+ failure(status, "dfFoo->applyPattern");
+ UnicodeString temp;
+ if (dfFoo->toPattern(temp) != UnicodeString("#0000"))
+ errln("dfFoo.toPattern : " + dfFoo->toPattern(temp));
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ logln(dfFoo->format((int32_t)42, temp, pos));
+ logln(dfFoo->format((int32_t)-42, temp, pos));
+ dfFoo->applyPattern("000;-000", status);
+ failure(status, "dfFoo->applyPattern");
+ if (dfFoo->toPattern(temp) != UnicodeString("#000"))
+ errln("dfFoo.toPattern : " + dfFoo->toPattern(temp));
+ logln(dfFoo->format((int32_t)42,temp, pos));
+ logln(dfFoo->format((int32_t)-42, temp, pos));
+
+ dfFoo->applyPattern("000;-0000", status);
+ failure(status, "dfFoo->applyPattern");
+ if (dfFoo->toPattern(temp) != UnicodeString("#000"))
+ errln("dfFoo.toPattern : " + dfFoo->toPattern(temp));
+ logln(dfFoo->format((int32_t)42, temp, pos));
+ logln(dfFoo->format((int32_t)-42, temp, pos));
+
+ dfFoo->applyPattern("0000;-000", status);
+ failure(status, "dfFoo->applyPattern");
+ if (dfFoo->toPattern(temp) != UnicodeString("#0000"))
+ errln("dfFoo.toPattern : " + dfFoo->toPattern(temp));
+ logln(dfFoo->format((int32_t)42, temp, pos));
+ logln(dfFoo->format((int32_t)-42, temp, pos));
+ /*} catch (Exception foo) {
+ errln("Message " + foo.getMessage());
+ }*/
+
+ delete dfFoo;
+}
+/* @bug 4087244
+ * NumberFormat.getCurrencyInstance() produces format that uses
+ * decimal separator instead of monetary decimal separator.
+ *
+ * Rewrote this test not to depend on the actual pattern. Pattern should
+ * never contain the monetary separator! Decimal separator in pattern is
+ * interpreted as monetary separator if currency symbol is seen!
+ */
+void NumberFormatRegressionTest::Test4087244 (void) {
+ UErrorCode status = U_ZERO_ERROR;
+ char loc[256] = {0};
+ uloc_canonicalize("pt_PT_PREEURO", loc, 256, &status);
+ Locale *de = new Locale(loc);
+ NumberFormat *nf = NumberFormat::createCurrencyInstance(*de, status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete nf;
+ return;
+ }
+ if (nf->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln("expected DecimalFormat!");
+ return;
+ }
+ DecimalFormat *df = (DecimalFormat*) nf;
+ const DecimalFormatSymbols *sym = df->getDecimalFormatSymbols();
+ UnicodeString decSep = sym->getSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol);
+ UnicodeString monSep = sym->getSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol);
+ if (decSep == monSep) {
+ errln("ERROR in test: want decimal sep != monetary sep");
+ return;
+ }
+ df->setMinimumIntegerDigits(1);
+ df->setMinimumFractionDigits(2);
+ UnicodeString str;
+ FieldPosition pos;
+ df->format(1.23, str, pos);
+ UnicodeString monStr("1x23");
+ monStr.replace((int32_t)1, 1, monSep);
+ UnicodeString decStr("1x23");
+ decStr.replace((int32_t)1, 1, decSep);
+ if (str.indexOf(monStr) >= 0 && str.indexOf(decStr) < 0) {
+ logln(UnicodeString("OK: 1.23 -> \"") + str + "\" contains \"" +
+ monStr + "\" and not \"" + decStr + '"');
+ } else {
+ errln(UnicodeString("FAIL: 1.23 -> \"") + str + "\", should contain \"" +
+ monStr +
+ "\" and not \"" + decStr + '"');
+ }
+ delete de;
+ delete nf;
+}
+/* @bug 4070798
+ * Number format data rounding errors for locale FR
+ */
+void NumberFormatRegressionTest::Test4070798 (void)
+{
+ NumberFormat *formatter;
+ UnicodeString tempString;
+
+ /* User error :
+ String expectedDefault = "-5\u00a0789,987";
+ String expectedCurrency = "5\u00a0789,98 F";
+ String expectedPercent = "-578\u00a0998%";
+ */
+ UChar chars1 [] = {
+ 0x2d, 0x35, 0x00a0, 0x37, 0x38, 0x39, 0x2c, 0x39, 0x38, 0x38
+ };
+ UChar chars2 [] = {
+ 0x35, 0x00a0, 0x37, 0x38, 0x39, 0x2c, 0x39, 0x39, 0x20, 0x46
+ };
+ UChar chars3 [] = {
+ 0x2d, 0x35, 0x37, 0x38, 0x00a0, 0x39, 0x39, 0x39, 0x00a0, 0x25
+ };
+ UnicodeString expectedDefault(chars1, 10, 10);
+ UnicodeString expectedCurrency(chars2, 10, 10);
+ UnicodeString expectedPercent(chars3, 10, 10);
+
+ UErrorCode status = U_ZERO_ERROR;
+ char loc[256]={0};
+ int len = uloc_canonicalize("fr_FR_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createInstance(Locale(loc), status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete formatter;
+ return;
+ }
+ failure(status, "NumberFormat::createNumberInstance", loc);
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedDefault) {
+ logln ("Bug 4070798 default test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedDefault +
+ " Received " + tempString );
+ }
+ delete formatter;
+ len = uloc_canonicalize("fr_FR_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createCurrencyInstance(loc, status);
+ failure(status, "NumberFormat::createCurrencyInstance", loc);
+ tempString.remove();
+ tempString = formatter->format( 5789.9876, tempString );
+
+ if (tempString == expectedCurrency) {
+ logln ("Bug 4070798 currency test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedCurrency +
+ " Received " + tempString );
+ }
+ delete formatter;
+
+ uloc_canonicalize("fr_FR_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createPercentInstance(Locale(loc), status);
+ failure(status, "NumberFormat::createPercentInstance", loc);
+ tempString.remove();
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedPercent) {
+ logln ("Bug 4070798 percentage test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedPercent +
+ " Received " + tempString );
+ }
+
+ delete formatter;
+}
+/* @bug 4071005
+ * Data rounding errors for French (Canada) locale
+ */
+void NumberFormatRegressionTest::Test4071005 (void)
+{
+ NumberFormat *formatter;
+ UnicodeString tempString;
+ /* User error :
+ String expectedDefault = "-5\u00a0789,987";
+ String expectedCurrency = "5\u00a0789,98 $";
+ String expectedPercent = "-578\u00a0998%";
+ */
+ UChar chars1 [] = {
+ 0x2d, 0x35, 0x00a0, 0x37, 0x38, 0x39, 0x2c, 0x39, 0x38, 0x38
+ };
+ UChar chars2 [] = {
+ 0x35, 0x00a0, 0x37, 0x38, 0x39, 0x2c, 0x39, 0x39, 0x20, 0x24
+ };
+ UChar chars3 [] = {
+ 0x2d, 0x35, 0x37, 0x38, 0x00a0, 0x39, 0x39, 0x39, 0x00a0, 0x25
+ };
+ UnicodeString expectedDefault(chars1, 10, 10);
+ UnicodeString expectedCurrency(chars2, 10, 10);
+ UnicodeString expectedPercent(chars3, 10, 10);
+
+ UErrorCode status = U_ZERO_ERROR;
+ formatter = NumberFormat::createInstance(Locale::getCanadaFrench(), status);
+ if (failure(status, "NumberFormat::createNumberInstance", Locale::getCanadaFrench())){
+ delete formatter;
+ return;
+ };
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedDefault) {
+ logln ("Bug 4071005 default test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedDefault +
+ " Received " + tempString );
+ }
+ delete formatter;
+
+ formatter = NumberFormat::createCurrencyInstance(Locale::getCanadaFrench(), status);
+ failure(status, "NumberFormat::createCurrencyInstance", Locale::getCanadaFrench());
+ tempString.remove();
+ tempString = formatter->format( 5789.9876, tempString );
+
+ if (tempString == expectedCurrency) {
+ logln ("Bug 4071005 currency test assed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedCurrency +
+ " Received " + tempString );
+ }
+ delete formatter;
+
+ formatter = NumberFormat::createPercentInstance(Locale::getCanadaFrench(), status);
+ failure(status, "NumberFormat::createPercentInstance", Locale::getCanadaFrench());
+ tempString.remove();
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedPercent) {
+ logln ("Bug 4071005 percentage test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedPercent +
+ " Received " + tempString );
+ }
+
+ delete formatter;
+}
+
+/* @bug 4071014
+ * Data rounding errors for German (Germany) locale
+ */
+void NumberFormatRegressionTest::Test4071014 (void)
+{
+ NumberFormat *formatter;
+ UnicodeString tempString;
+ /* user error :
+ String expectedDefault = "-5.789,987";
+ String expectedCurrency = "5.789,98 DM";
+ String expectedPercent = "-578.998%";
+ */
+ UnicodeString expectedDefault("-5.789,988");
+ UnicodeString expectedCurrency("5.789,99 DM");
+ UnicodeString expectedPercent("-578.999 %");
+
+ UErrorCode status = U_ZERO_ERROR;
+ char loc[256]={0};
+ uloc_canonicalize("de_DE_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createInstance(Locale(loc), status);
+ if (failure(status, "NumberFormat::createNumberInstance", loc)){
+ delete formatter;
+ return;
+ }
+ tempString.remove();
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedDefault) {
+ logln ("Bug 4071014 default test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedDefault +
+ " Received " + tempString );
+ }
+ delete formatter;
+ uloc_canonicalize("de_DE_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createCurrencyInstance(Locale(loc), status);
+ failure(status, "NumberFormat::createCurrencyInstance", loc);
+ tempString.remove();
+ tempString = formatter->format( 5789.9876, tempString );
+
+ if (tempString == expectedCurrency) {
+ logln ("Bug 4071014 currency test assed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedCurrency +
+ " Received " + tempString );
+ }
+ delete formatter;
+
+ formatter = NumberFormat::createPercentInstance(Locale::getGermany(), status);
+ failure(status, "NumberFormat::createPercentInstance", Locale::getGermany());
+ tempString.remove();
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedPercent) {
+ logln ("Bug 4071014 percentage test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedPercent +
+ " Received " + tempString );
+ }
+
+ delete formatter;
+}
+/* @bug 4071859
+ * Data rounding errors for Italian locale number formats
+ */
+void NumberFormatRegressionTest::Test4071859 (void)
+{
+ NumberFormat *formatter;
+ UnicodeString tempString;
+ /* user error :
+ String expectedDefault = "-5.789,987";
+ String expectedCurrency = "-L. 5.789,98";
+ String expectedPercent = "-578.998%";
+ */
+ UnicodeString expectedDefault("-5.789,988");
+ UnicodeString expectedCurrency("-\\u20A4 5.790");
+ UnicodeString expectedPercent("-578.999%");
+ expectedCurrency = expectedCurrency.unescape();
+
+ UErrorCode status = U_ZERO_ERROR;
+ char loc[256]={0};
+ uloc_canonicalize("it_IT_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createInstance(Locale(loc), status);
+ if (failure(status, "NumberFormat::createNumberInstance")){
+ delete formatter;
+ return;
+ };
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedDefault) {
+ logln ("Bug 4071859 default test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedDefault +
+ " Received " + tempString );
+ }
+ delete formatter;
+ uloc_canonicalize("it_IT_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createCurrencyInstance(Locale(loc), status);
+ failure(status, "NumberFormat::createCurrencyInstance");
+ tempString.remove();
+ tempString = formatter->format( -5789.9876, tempString );
+
+ if (tempString == expectedCurrency) {
+ logln ("Bug 4071859 currency test assed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedCurrency +
+ " Received " + tempString );
+ }
+ delete formatter;
+ uloc_canonicalize("it_IT_PREEURO", loc, 256, &status);
+ formatter = NumberFormat::createPercentInstance(Locale(loc), status);
+ failure(status, "NumberFormat::createPercentInstance");
+ tempString.remove();
+ tempString = formatter->format (-5789.9876, tempString);
+
+ if (tempString == expectedPercent) {
+ logln ("Bug 4071859 percentage test passed.");
+ } else {
+ errln(UnicodeString("Failed:") +
+ " Expected " + expectedPercent +
+ " Received " + tempString );
+ }
+
+ delete formatter;
+}
+/* @bug 4071859
+ * Test rounding for nearest even.
+ */
+void NumberFormatRegressionTest::Test4093610(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat("#0.#", status);
+ failure(status, "new DecimalFormat");
+ UnicodeString s("12.4");
+ roundingTest(df, 12.35, s);
+ roundingTest(df, 12.45, s);
+ s = "12.5";
+ roundingTest(df, 12.452,s);
+ s = "12.6";
+ roundingTest(df, 12.55, s);
+ roundingTest(df, 12.65, s);
+ s = "12.7";
+ roundingTest(df, 12.652,s);
+ s = "12.8";
+ roundingTest(df, 12.75, s);
+ roundingTest(df, 12.752,s);
+ roundingTest(df, 12.85, s);
+ s = "12.9";
+ roundingTest(df, 12.852,s);
+ s = "13";
+ roundingTest(df, 12.95, s);
+ roundingTest(df, 12.952,s);
+
+ delete df;
+}
+
+void NumberFormatRegressionTest::roundingTest(DecimalFormat *df, double x, UnicodeString& expected)
+{
+ UnicodeString out;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ out = df->format(x, out, pos);
+ logln(UnicodeString("") + x + " formats with 1 fractional digits to " + out);
+ if (out != expected)
+ errln("FAIL: Expected " + expected);
+}
+/* @bug 4098741
+ * Tests the setMaximumFractionDigits limit.
+ */
+void NumberFormatRegressionTest::Test4098741(void)
+{
+ //try {
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *fmt = NumberFormat::createPercentInstance(status);
+ if (U_FAILURE(status)) {
+ dataerrln("Error calling NumberFormat::createPercentInstance");
+ delete fmt;
+ return;
+ }
+
+ fmt->setMaximumFractionDigits(20);
+ UnicodeString temp;
+ logln(fmt->format(.001, temp));
+ /*} catch (Exception foo) {
+ errln("Bug 4098471 failed with exception thrown : " + foo.getMessage());
+ }*/
+ delete fmt;
+}
+/* @bug 4074454
+ * Tests illegal pattern exception.
+ * Fix comment : HShih A31 Part1 will not be fixed and javadoc needs to be updated.
+ * Part2 has been fixed.
+ */
+void NumberFormatRegressionTest::Test4074454(void)
+{
+ //try {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *fmt = new DecimalFormat("#,#00.00;-#.#", status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete fmt;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ logln("Inconsistent negative pattern is fine.");
+ DecimalFormat *newFmt = new DecimalFormat("#,#00.00 p''ieces;-#,#00.00 p''ieces", status);
+ failure(status, "new DecimalFormat");
+ UnicodeString tempString;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ tempString = newFmt->format(3456.78, tempString, pos);
+ if (tempString != UnicodeString("3,456.78 p'ieces"))
+ errln("Failed! 3456.78 p'ieces expected, but got : " + tempString);
+ /*} catch (Exception foo) {
+ errln("An exception was thrown for any inconsistent negative pattern.");
+ }*/
+
+ delete fmt;
+ delete newFmt;
+}
+/* @bug 4099404
+ * Tests all different comments.
+ * Response to some comments :
+ * [1] DecimalFormat.parse API documentation is more than just one line.
+ * This is not a reproducable doc error in 116 source code.
+ * [2] See updated javadoc.
+ * [3] Fixed.
+ * [4] NumberFormat.parse(String, ParsePosition) : If parsing fails,
+ * a null object will be returned. The unchanged parse position also
+ * reflects an error.
+ * NumberFormat.parse(String) : If parsing fails, an ParseException
+ * will be thrown.
+ * See updated javadoc for more details.
+ * [5] See updated javadoc.
+ * [6] See updated javadoc.
+ * [7] This is a correct behavior if the DateFormat object is linient.
+ * Otherwise, an IllegalArgumentException will be thrown when formatting
+ * "January 35". See GregorianCalendar class javadoc for more details.
+ */
+void NumberFormatRegressionTest::Test4099404(void)
+{
+ //try {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *fmt = new DecimalFormat(UnicodeString("000.0#0"), status);
+ if(! U_FAILURE(status))
+ errln(UnicodeString("Bug 4099404 failed applying illegal pattern \"000.0#0\""));
+ /*} catch (Exception foo) {
+ logln("Bug 4099404 pattern \"000.0#0\" passed");
+ }*/
+ delete fmt;
+ fmt = 0;
+ //try {
+ fmt = new DecimalFormat(UnicodeString("0#0.000"), status);
+ if( !U_FAILURE(status))
+ errln("Bug 4099404 failed applying illegal pattern \"0#0.000\"");
+ /*} catch (Exception foo) {
+ logln("Bug 4099404 pattern \"0#0.000\" passed");
+ }*/
+
+ delete fmt;
+}
+/* @bug 4101481
+ * DecimalFormat.applyPattern doesn't set minimum integer digits
+ */
+void NumberFormatRegressionTest::Test4101481(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *sdf = new DecimalFormat(UnicodeString("#,##0"), status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete sdf;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ if (sdf->getMinimumIntegerDigits() != 1)
+ errln("Minimum integer digits : " + sdf->getMinimumIntegerDigits());
+ delete sdf;
+}
+/* @bug 4052223 (API addition request A27)
+ * Tests ParsePosition.setErrorPosition() and ParsePosition.getErrorPosition().
+ */
+void NumberFormatRegressionTest::Test4052223(void)
+{
+ //try {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *fmt = new DecimalFormat(UnicodeString("#,#00.00"), status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete fmt;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ Formattable num;
+ fmt->parse(UnicodeString("abc3"), num, status);
+ if(! U_FAILURE(status))
+ errln(UnicodeString("Bug 4052223 failed : can't parse string \"a\". Got ") /*+ num*/);
+ /*} catch (ParseException foo) {
+ logln("Caught expected ParseException : " + foo.getMessage() + " at index : " + foo.getErrorOffset());
+ }*/
+ delete fmt;
+}
+/* @bug 4061302
+ * API tests for API addition request A9.
+ */
+void NumberFormatRegressionTest::Test4061302(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols *fmt = new DecimalFormatSymbols(status);
+ failure(status, "new DecimalFormatSymbols");
+ UnicodeString currency(fmt->getSymbol(DecimalFormatSymbols::kCurrencySymbol));
+ UnicodeString intlCurrency(fmt->getSymbol(DecimalFormatSymbols::kIntlCurrencySymbol));
+ UnicodeString monDecSeparator(fmt->getSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol));
+ if (currency == UnicodeString("") ||
+ intlCurrency == UnicodeString("") ||
+ monDecSeparator == UnicodeString(""))
+ {
+ errln("getCurrencySymbols failed, got empty string.");
+ }
+ UnicodeString monDecSeparatorStr;
+ monDecSeparatorStr.append(monDecSeparator);
+ logln((UnicodeString)"Before set ==> Currency : " + currency +(UnicodeString)" Intl Currency : " + intlCurrency + (UnicodeString)" Monetary Decimal Separator : " + monDecSeparatorStr);
+ fmt->setSymbol(DecimalFormatSymbols::kCurrencySymbol, UnicodeString("XYZ"));
+ fmt->setSymbol(DecimalFormatSymbols::kIntlCurrencySymbol, UnicodeString("ABC"));
+ fmt->setSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol, UnicodeString((UChar)0x002A/*'*'*/));
+ currency = fmt->getSymbol(DecimalFormatSymbols::kCurrencySymbol);
+ intlCurrency = fmt->getSymbol(DecimalFormatSymbols::kIntlCurrencySymbol);
+ monDecSeparator = fmt->getSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol);
+ if (currency != UnicodeString("XYZ") ||
+ intlCurrency != UnicodeString("ABC") ||
+ monDecSeparator != UnicodeString((UChar)0x002A/*'*'*/)) {
+ errln("setCurrencySymbols failed.");
+ }
+ monDecSeparatorStr.remove();
+ monDecSeparatorStr.append(monDecSeparator);
+ logln("After set ==> Currency : " + currency + " Intl Currency : " + intlCurrency + " Monetary Decimal Separator : " + monDecSeparatorStr);
+
+ delete fmt;
+}
+/* @bug 4062486
+ * API tests for API addition request A23. FieldPosition.getBeginIndex and
+ * FieldPosition.getEndIndex.
+ */
+void NumberFormatRegressionTest::Test4062486(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *fmt = new DecimalFormat(UnicodeString("#,##0.00"), status);
+ failure(status, "new DecimalFormat");
+ UnicodeString formatted;
+ FieldPosition field(0);
+ double num = 1234.5;
+ fmt->format(num, formatted, field);
+ if (field.getBeginIndex() != 0 && field.getEndIndex() != 5)
+ errln(UnicodeString("Format 1234.5 failed. Begin index: ") /*+ field.getBeginIndex() + " End index: " + field.getEndIndex()*/);
+ field.setBeginIndex(7);
+ field.setEndIndex(4);
+ if (field.getBeginIndex() != 7 && field.getEndIndex() != 4)
+ errln("Set begin/end field indexes failed. Begin index: " /*+ field.getBeginIndex() + " End index: " + field.getEndIndex()*/);
+
+ delete fmt;
+}
+
+/* @bug 4108738
+ * DecimalFormat.parse incorrectly works with a group separator.
+ */
+void NumberFormatRegressionTest::Test4108738(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols *syms = new DecimalFormatSymbols(Locale::getUS(), status);
+ failure(status, "new DecimalFormatSymbols");
+ DecimalFormat *df = new DecimalFormat("#,##0.###", syms, status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ UnicodeString text("1.222,111");
+ Formattable num;
+ ParsePosition pp(0);
+ df->parse(text, num, pp);
+
+ // {sfb} how to do this (again) ?
+ // shouldn't just be another round-trip test, should it?
+ UnicodeString temp;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ temp = df->format(num.getDouble(), temp, pos);
+ //if (!num.toString().equals("1.222"))
+ if (temp != UnicodeString("1.222"))
+ //errln("\"" + text + "\" is parsed as " + num);
+ errln("\"" + text + "\" is parsed as " + temp);
+ text = UnicodeString("1.222x111");
+ pp = ParsePosition(0);
+ df->parse(text, num, pp);
+ temp.remove();
+ temp = df->format(num.getDouble(), temp, pos);
+ //if (!num.toString().equals("1.222"))
+ if (temp != UnicodeString("1.222"))
+ errln("\"" + text + "\" is parsed as " + temp);
+
+ delete df;
+}
+
+/* @bug 4106658
+ * DecimalFormat.format() incorrectly formats negative doubles.
+ */
+void NumberFormatRegressionTest::Test4106658(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status); // Corrected; see 4147706
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ volatile double d1 = 0.0; // volatile to prevent code optimization
+ double d2 = -0.0001;
+ UnicodeString buffer;
+ UnicodeString temp;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+
+#if defined(U_HPUX)
+ d1 = 0.0 * -1.0; // old HPUX compiler ignores volatile keyword
+#else
+ d1 *= -1.0; // Some compilers have a problem with defining -0.0
+#endif
+ logln("pattern: \"" + df->toPattern(temp) + "\"");
+ df->format(d1, buffer, pos);
+ if (buffer != UnicodeString("-0")) // Corrected; see 4147706
+ errln(UnicodeString("") + d1 + " is formatted as " + buffer);
+ buffer.remove();
+ df->format(d2, buffer, pos);
+ if (buffer != UnicodeString("-0")) // Corrected; see 4147706
+ errln(UnicodeString("") + d2 + " is formatted as " + buffer);
+
+ delete df;
+}
+
+/* @bug 4106662
+ * DecimalFormat.parse returns 0 if string parameter is incorrect.
+ */
+void NumberFormatRegressionTest::Test4106662(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ UnicodeString text("x");
+ ParsePosition pos1(0), pos2(0);
+
+ UnicodeString temp;
+ logln("pattern: \"" + df->toPattern(temp) + "\"");
+ Formattable num;
+ df->parse(text, num, pos1);
+ if (pos1 == ParsePosition(0)/*num != null*/) {
+ errln(UnicodeString("Test Failed: \"") + text + "\" is parsed as " /*+ num*/);
+ }
+ delete df;
+ df = new DecimalFormat(UnicodeString("$###.00"), status);
+ failure(status, "new DecimalFormat");
+ df->parse(UnicodeString("$"), num, pos2);
+ if (pos2 == ParsePosition(0) /*num != null*/){
+ errln(UnicodeString("Test Failed: \"$\" is parsed as ") /*+ num*/);
+ }
+
+ delete df;
+}
+
+/* @bug 4114639 (duplicate of 4106662)
+ * NumberFormat.parse doesn't return null
+ */
+void NumberFormatRegressionTest::Test4114639(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *format = NumberFormat::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete format;
+ return;
+ }
+ failure(status, "NumberFormat::createInstance");
+ UnicodeString text("time 10:x");
+ ParsePosition pos(8);
+ Formattable result;
+ format->parse(text, result, pos);
+ if (/*result != null*/pos.getErrorIndex() != 8)
+ errln(UnicodeString("Should return null but got : ") /*+ result*/); // Should be null; it isn't
+
+ delete format;
+}
+
+/* @bug 4106664
+ * TODO: this test does not work because we need to use a 64 bit number and a
+ * a double only MAY only have 52 bits of precision.
+ * DecimalFormat.format(long n) fails if n * multiplier > MAX_LONG.
+ */
+void NumberFormatRegressionTest::Test4106664(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ // {sfb} long in java is 64 bits
+ /*long*/double n = 1234567890123456.0;
+ /*int*/int32_t m = 12345678;
+ // {sfb} will this work?
+ //BigInteger bigN = BigInteger.valueOf(n);
+ //bigN = bigN.multiply(BigInteger.valueOf(m));
+ double bigN = n * m;
+ df->setMultiplier(m);
+ df->setGroupingUsed(FALSE);
+ UnicodeString temp;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ logln("formated: " +
+ df->format(n, temp, pos));
+
+ char buf [128];
+ sprintf(buf, "%g", bigN);
+ //logln("expected: " + bigN.toString());
+ logln(UnicodeString("expected: ") + buf);
+
+ delete df;
+}
+/* @bug 4106667 (duplicate of 4106658)
+ * DecimalFormat.format incorrectly formats -0.0.
+ */
+void NumberFormatRegressionTest::Test4106667(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete df;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ UChar foo [] = { 0x002B };
+ UnicodeString bar(foo, 1, 1);
+ volatile double d = 0.0; // volatile to prevent code optimization
+ UnicodeString temp;
+ UnicodeString buffer;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+
+ logln("pattern: \"" + df->toPattern(temp) + "\"");
+#if defined(U_HPUX)
+ d = 0.0 * -1.0; // old HPUX compiler ignores volatile keyword
+#else
+ d *= -1.0; // Some compilers have a problem with defining -0.0
+#endif
+ df->setPositivePrefix(/*"+"*/bar);
+ df->format(d, buffer, pos);
+ if (buffer != UnicodeString("-0")) // Corrected; see 4147706
+ errln(/*d + */UnicodeString(" is formatted as ") + buffer);
+
+ delete df;
+}
+
+/* @bug 4110936
+ * DecimalFormat.setMaximumIntegerDigits() works incorrectly.
+ */
+#ifdef OS390
+# define MAX_INT_DIGITS 70
+#else
+# define MAX_INT_DIGITS 128
+#endif
+
+void NumberFormatRegressionTest::Test4110936(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nf = NumberFormat::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete nf;
+ return;
+ }
+ failure(status, "NumberFormat::createInstance");
+ nf->setMaximumIntegerDigits(MAX_INT_DIGITS);
+ logln("setMaximumIntegerDigits(MAX_INT_DIGITS)");
+ if (nf->getMaximumIntegerDigits() != MAX_INT_DIGITS)
+ errln("getMaximumIntegerDigits() returns " +
+ nf->getMaximumIntegerDigits());
+
+ delete nf;
+}
+
+/* @bug 4122840
+ * Locale data should use generic currency symbol
+ *
+ * 1) Make sure that all currency formats use the generic currency symbol.
+ * 2) Make sure we get the same results using the generic symbol or a
+ * hard-coded one.
+ */
+void NumberFormatRegressionTest::Test4122840(void)
+{
+ int32_t count = 0;
+ const Locale *locales = Locale::getAvailableLocales(count);
+
+ for (int i = 0; i < count; i++) {
+ UErrorCode status = U_ZERO_ERROR;
+ ResourceBundle *rb = new ResourceBundle(
+ NULL/*"java.text.resources.LocaleElements"*/,
+ locales[i], status);
+ failure(status, "new ResourceBundle");
+ ResourceBundle numPat = rb->get("NumberPatterns", status);
+ failure(status, "new ResourceBundle(NumberPatterns)");
+ //
+ // Get the currency pattern for this locale. We have to fish it
+ // out of the ResourceBundle directly, since DecimalFormat.toPattern
+ // will return the localized symbol, not \00a4
+ //
+ UnicodeString pattern = numPat.getStringEx(1, status);
+ failure(status, "rb->getStringArray");
+
+ UChar fo[] = { 0x00A4 };
+ UnicodeString foo(fo, 1, 1);
+
+ //if (pattern.indexOf("\u00A4") == -1 ) {
+ if (pattern.indexOf(foo) == -1 ) {
+ errln(UnicodeString("Currency format for ") + UnicodeString(locales[i].getName()) +
+ " does not contain generic currency symbol:" +
+ pattern );
+ }
+
+ // Create a DecimalFormat using the pattern we got and format a number
+ DecimalFormatSymbols *symbols = new DecimalFormatSymbols(locales[i], status);
+ failure(status, "new DecimalFormatSymbols");
+ DecimalFormat *fmt1 = new DecimalFormat(pattern, *symbols, status);
+ failure(status, "new DecimalFormat");
+
+ UnicodeString result1;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ result1 = fmt1->format(1.111, result1, pos);
+
+ //
+ // Now substitute in the locale's currency symbol and create another
+ // pattern. We have to skip locales where the currency symbol
+ // contains decimal separators, because that confuses things
+ //
+ UChar ba[] = { 0x002E/*'.'*/ };
+ UnicodeString bar(ba, 1, 1);
+
+ if (symbols->getSymbol(DecimalFormatSymbols::kCurrencySymbol).indexOf(bar) == -1) {
+ // {sfb} Also, switch the decimal separator to the monetary decimal
+ // separator to mimic the behavior of a currency format
+ symbols->setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol,
+ symbols->getSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol));
+
+ UnicodeString buf(pattern);
+ for (int j = 0; j < buf.length(); j++) {
+ if (buf[j] == 0x00a4 ) {
+ if(buf[j + 1] == 0x00a4) {
+ // {sfb} added to support double currency marker (intl currency sign)
+ buf.replace(j, /*j+*/2, symbols->getSymbol(DecimalFormatSymbols::kIntlCurrencySymbol));
+ j += symbols->getSymbol(DecimalFormatSymbols::kIntlCurrencySymbol).length();
+ }
+ else {
+ buf.replace(j, /*j+*/1, symbols->getSymbol(DecimalFormatSymbols::kCurrencySymbol));
+ j += symbols->getSymbol(DecimalFormatSymbols::kCurrencySymbol).length() - 1;
+ }
+ }
+ }
+
+ DecimalFormat *fmt2 = new DecimalFormat(buf, *symbols, status);
+ failure(status, "new DecimalFormat");
+
+ // Get the currency (if there is one) so we can set the rounding and fraction
+ const UChar *currency = fmt1->getCurrency();
+ if (*currency != 0) {
+ double rounding = ucurr_getRoundingIncrement(currency, &status);
+ int32_t frac = ucurr_getDefaultFractionDigits(currency, &status);
+ if (U_SUCCESS(status)) {
+ fmt2->setRoundingIncrement(rounding);
+ fmt2->setMinimumFractionDigits(frac);
+ fmt2->setMaximumFractionDigits(frac);
+ }
+ else {
+ failure(status, "Fetching currency rounding/fractions");
+ }
+ }
+
+ UnicodeString result2;
+ fmt2->format(1.111, result2, pos);
+
+ if (result1 != result2) {
+ errln("Results for " + (UnicodeString)(locales[i].getName()) + " differ: " +
+ result1 + " vs " + result2);
+ }
+
+ delete fmt2;
+ }
+
+ delete rb;
+ delete fmt1;
+ delete symbols;
+ }
+}
+
+/* @bug 4125885
+ * DecimalFormat.format() delivers wrong string.
+ */
+void NumberFormatRegressionTest::Test4125885(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ double rate = 12.34;
+ DecimalFormat *formatDec = new DecimalFormat ("000.00", status);
+ if(U_FAILURE(status)) {
+ errln("Error creating DecimalFormat: %s", u_errorName(status));
+ delete formatDec;
+ return;
+ }
+ failure(status, "new DecimalFormat");
+ UnicodeString temp;
+ logln("toPattern: " + formatDec->toPattern(temp));
+ UnicodeString rateString;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ rateString = formatDec->format(rate, rateString, pos);
+ if (rateString != UnicodeString("012.34"))
+ errln("result : " + rateString + " expected : 012.34");
+ rate = 0.1234;
+ delete formatDec;// = null;
+ formatDec = new DecimalFormat ("+000.00%;-000.00%", status);
+ failure(status, "new DecimalFormat");
+ logln("toPattern: " + formatDec->toPattern(temp));
+ rateString.remove();
+ rateString = formatDec->format(rate, rateString, pos);
+ if (rateString != UnicodeString("+012.34%"))
+ errln("result : " + rateString + " expected : +012.34%");
+
+ delete formatDec;
+}
+
+/**
+ * @bug 4134034
+ * DecimalFormat produces extra zeros when formatting numbers.
+ */
+void NumberFormatRegressionTest::Test4134034(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *nf = new DecimalFormat("##,###,###.00", status);
+ failure(status, "new DecimalFormat");
+
+ UnicodeString f;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ f = nf->format(9.02, f, pos);
+ if (f == UnicodeString("9.02"))
+ logln(f + " ok");
+ else
+ errln("9.02 -> " + f + "; want 9.02");
+
+ f.remove();
+ f = nf->format((int32_t)0, f, pos);
+ if (f == UnicodeString(".00"))
+ logln(f + " ok");
+ else
+ errln("0 -> " + f + "; want .00");
+
+ delete nf;
+}
+
+/**
+ * @bug 4134300
+ * CANNOT REPRODUCE - This bug could not be reproduced. It may be
+ * a duplicate of 4134034.
+ *
+ * JDK 1.1.6 Bug, did NOT occur in 1.1.5
+ * Possibly related to bug 4125885.
+ *
+ * This class demonstrates a regression in version 1.1.6
+ * of DecimalFormat class.
+ *
+ * 1.1.6 Results
+ * Value 1.2 Format #.00 Result '01.20' !!!wrong
+ * Value 1.2 Format 0.00 Result '001.20' !!!wrong
+ * Value 1.2 Format 00.00 Result '0001.20' !!!wrong
+ * Value 1.2 Format #0.0# Result '1.2'
+ * Value 1.2 Format #0.00 Result '001.20' !!!wrong
+ *
+ * 1.1.5 Results
+ * Value 1.2 Format #.00 Result '1.20'
+ * Value 1.2 Format 0.00 Result '1.20'
+ * Value 1.2 Format 00.00 Result '01.20'
+ * Value 1.2 Format #0.0# Result '1.2'
+ * Value 1.2 Format #0.00 Result '1.20'
+ */
+void NumberFormatRegressionTest::Test4134300(void) {
+ UnicodeString DATA [] = {
+ // Pattern Expected string
+ UnicodeString("#.00"), UnicodeString("1.20"),
+ UnicodeString("0.00"), UnicodeString("1.20"),
+ UnicodeString("00.00"), UnicodeString("01.20"),
+ UnicodeString("#0.0#"), UnicodeString("1.2"),
+ UnicodeString("#0.00"), UnicodeString("1.20")
+ };
+
+ for (int i=0; i< 10; i+=2) {
+ UnicodeString result;
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(DATA[i], status);
+ failure(status, "new DecimalFormat");
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ result = df->format(1.2, result, pos);
+ if (result != DATA[i+1]) {
+ errln("Fail: 1.2 x " + DATA[i] + " = " + result +
+ "; want " + DATA[i+1]);
+ }
+ else {
+ logln("Ok: 1.2 x " + DATA[i] + " = " + result);
+ }
+
+ delete df;
+ }
+}
+
+/**
+ * @bug 4140009
+ * Empty pattern produces double negative prefix.
+ */
+void NumberFormatRegressionTest::Test4140009(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols *syms = new DecimalFormatSymbols(Locale::getEnglish(), status);
+ failure(status, "new DecimalFormatSymbols");
+ DecimalFormat *f = new DecimalFormat(UnicodeString(""), syms, status);
+ failure(status, "new DecimalFormat");
+ UnicodeString s;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ s = f->format(123.456, s, pos);
+ if (s != UnicodeString("123.456"))
+ errln("Fail: Format empty pattern x 123.456 => " + s);
+ s.remove();
+ s = f->format(-123.456, s, pos);
+ if (s != UnicodeString("-123.456"))
+ errln("Fail: Format empty pattern x -123.456 => " + s);
+ delete f;
+}
+
+/**
+ * @bug 4141750
+ * BigDecimal numbers get their fractions truncated by NumberFormat.
+ */
+// {sfb} not pertinent in C++ ??
+void NumberFormatRegressionTest::Test4141750(void) {
+ /*try {
+ UnicodeString str("12345.67");
+ BigDecimal bd = new BigDecimal(str);
+ String sd = NumberFormat.getInstance(Locale.US).format(bd);
+ if (!sd.endsWith("67")) errln("Fail: " + str + " x format -> " + sd);
+ }
+ catch (Exception e) {
+ errln(e.toString());
+ e.printStackTrace();
+ }*/
+}
+
+/**
+ * @bug 4145457
+ * DecimalFormat toPattern() doesn't quote special characters or handle
+ * single quotes.
+ */
+void NumberFormatRegressionTest::Test4145457() {
+ //try {
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nff = NumberFormat::createInstance(status);
+ if (failure(status, "NumberFormat::createInstance")){
+ delete nff;
+ return;
+ };
+ if(nff->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln("DecimalFormat needed to continue");
+ return;
+ }
+
+ DecimalFormat *nf = (DecimalFormat*)nff;
+ DecimalFormatSymbols *sym = (DecimalFormatSymbols*) nf->getDecimalFormatSymbols();
+ sym->setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol, (UChar)/*'\''*/0x0027);
+ nf->setDecimalFormatSymbols(*sym);
+ double pi = 3.14159;
+
+ UnicodeString PATS [] = {
+ UnicodeString("#.00 'num''ber'"), UnicodeString("''#.00''")
+ };
+
+ for (int32_t i=0; i<2; ++i) {
+ nf->applyPattern(PATS[i], status);
+ failure(status, "nf->applyPattern");
+ UnicodeString out;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ out = nf->format(pi, out, pos);
+ UnicodeString pat;
+ pat = nf->toPattern(pat);
+ Formattable num;
+ ParsePosition pp(0);
+ nf->parse(out, num, pp);
+ double val = num.getDouble();
+
+ nf->applyPattern(pat, status);
+ failure(status, "nf->applyPattern");
+ UnicodeString out2;
+ out2 = nf->format(pi, out2, pos);
+ UnicodeString pat2;
+ pat2 = nf->toPattern(pat2);
+ nf->parse(out2, num, pp);
+ double val2 = num.getDouble();
+
+ if (pat != pat2)
+ errln("Fail with \"" + PATS[i] + "\": Patterns should concur, \"" +
+ pat + "\" vs. \"" + pat2 + "\"");
+ else
+ logln("Ok \"" + PATS[i] + "\" toPattern() -> \"" + pat + '"');
+
+ if (val == val2 && out == out2) {
+ logln(UnicodeString("Ok ") + pi + " x \"" + PATS[i] + "\" -> \"" +
+ out + "\" -> " + val + " -> \"" +
+ out2 + "\" -> " + val2);
+ }
+ else {
+ errln(UnicodeString("Fail ") + pi + " x \"" + PATS[i] + "\" -> \"" +
+ out + "\" -> " + val + " -> \"" +
+ out2 + "\" -> " + val2);
+ }
+ }
+ /*}
+ catch (ParseException e) {
+ errln("Fail: " + e);
+ e.printStackTrace();
+ }*/
+
+ delete nff;
+}
+
+/**
+ * @bug 4147295
+ * DecimalFormat.applyPattern() sets minimum integer digits incorrectly.
+ * CANNOT REPRODUCE
+ * This bug is a duplicate of 4139344, which is a duplicate of 4134300
+ */
+void NumberFormatRegressionTest::Test4147295(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *sdf = new DecimalFormat(status);
+ UnicodeString pattern("#,###");
+ logln("Applying pattern \"" + pattern + "\"");
+ sdf->applyPattern(pattern, status);
+ failure(status, "sdf->applyPattern");
+ int minIntDig = sdf->getMinimumIntegerDigits();
+ if (minIntDig != 0) {
+ errln("Test failed");
+ errln(" Minimum integer digits : " + minIntDig);
+ UnicodeString temp;
+ errln(" new pattern: " + sdf->toPattern(temp));
+ } else {
+ logln("Test passed");
+ logln(" Minimum integer digits : " + minIntDig);
+ }
+ delete sdf;
+}
+
+/**
+ * @bug 4147706
+ * DecimalFormat formats -0.0 as +0.0
+ * See also older related bug 4106658, 4106667
+ */
+void NumberFormatRegressionTest::Test4147706(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat("#,##0.0##", status);
+ failure(status, "new DecimalFormat");
+ DecimalFormatSymbols *syms = new DecimalFormatSymbols(Locale::getEnglish(), status);
+ failure(status, "new DecimalFormatSymbols");
+ UnicodeString f1;
+ UnicodeString f2, temp;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ volatile double d1 = 0.0; // volatile to prevent code optimization
+ double d2 = -0.0001;
+
+#if defined(U_HPUX)
+ d1 = 0.0 * -1.0; // old HPUX compiler ignores volatile keyword
+#else
+ d1 *= -1.0; // Some compilers have a problem with defining -0.0
+#endif
+ df->adoptDecimalFormatSymbols(syms);
+ f1 = df->format(d1, f1, pos);
+ f2 = df->format(d2, f2, pos);
+ if (f1 != UnicodeString("-0.0")) {
+ errln(UnicodeString("") + d1 + UnicodeString(" x \"") + df->toPattern(temp) + "\" is formatted as \"" + f1 + '"');
+ }
+ if (f2 != UnicodeString("-0.0")) {
+ errln(UnicodeString("") + d2 + UnicodeString(" x \"") + df->toPattern(temp) + "\" is formatted as \"" + f2 + '"');
+ }
+
+ delete df;
+}
+
+
+// Not applicable, since no serialization in C++
+/*class myformat implements Serializable
+{
+DateFormat _dateFormat = DateFormat.getDateInstance();
+
+public String Now()
+{
+ GregorianCalendar calendar = new GregorianCalendar();
+ Date t = calendar.getTime();
+ String nowStr = _dateFormat.format(t);
+ return nowStr;
+}
+}*/
+
+/**
+ * @bug 4162198
+ * NumberFormat cannot format Double.MAX_VALUE
+ */
+// TODO: make this test actually test something
+void
+NumberFormatRegressionTest::Test4162198(void)
+{
+ // for some reason, DBL_MAX will not round trip. (bug in sprintf/atof)
+ double dbl = INT32_MAX * 1000.0;
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *f = NumberFormat::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create number format");
+ return;
+ }
+ f->setMaximumFractionDigits(INT32_MAX);
+ f->setMaximumIntegerDigits(INT32_MAX);
+ UnicodeString s;
+ f->format(dbl,s);
+ logln(UnicodeString("The number ") + dbl + " formatted to " + s);
+ Formattable n;
+ //try {
+ f->parse(s, n, status);
+ if(U_FAILURE(status))
+ errln("Couldn't parse!");
+ //} catch (java.text.ParseException e) {
+ // errln("Caught a ParseException:");
+ // e.printStackTrace();
+ //}
+
+ //logln("The string " + s + " parsed as " + n);
+
+ // {dlf} The old code assumes n is a double, but it isn't any more...
+ // Formattable apparently does not and never did interconvert... too bad.
+ //if(n.getDouble() != dbl) {
+ // errln("Round trip failure");
+ //}
+ if (n.getInt64() != dbl) {
+ errln("Round trip failure");
+ }
+
+ delete f;
+}
+
+/**
+ * @bug 4162852
+ * NumberFormat does not parse negative zero.
+ */
+void
+NumberFormatRegressionTest::Test4162852(void)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ for(int32_t i=0; i < 2; ++i) {
+ NumberFormat *f = (i == 0) ? NumberFormat::createInstance(status)
+ : NumberFormat::createPercentInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't create number format");
+ return;
+ }
+ double d = 0.0;
+ d *= -1.0;
+ UnicodeString s;
+ f->format(d, s);
+ Formattable n;
+ f->parse(s, n, status);
+ if(U_FAILURE(status))
+ errln("Couldn't parse!");
+ double e = n.getDouble();
+ logln(UnicodeString("") +
+ d + " -> " +
+ '"' + s + '"' + " -> " + e);
+#if (defined(OS390) && !defined(IEEE_754)) || defined(OS400)
+ if (e != 0.0) {
+#else
+ if (e != 0.0 || 1.0/e > 0.0) {
+#endif
+ logln("Failed to parse negative zero");
+ }
+ delete f;
+ }
+}
+
+static double _u_abs(double a) { return a<0?-a:a; }
+
+/**
+ * May 17 1999 sync up - liu
+ * @bug 4167494
+ * NumberFormat truncates data
+ */
+void NumberFormatRegressionTest::Test4167494(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *fmt = NumberFormat::createInstance(Locale::getUS(), status);
+ if (failure(status, "NumberFormat::createInstance")){
+ delete fmt;
+ return;
+ };
+
+ double a = DBL_MAX * 0.99; // DBL_MAX itself overflows to +Inf
+ UnicodeString s;
+ fmt->format(a, s);
+ Formattable num;
+ fmt->parse(s, num, status);
+ failure(status, "Parse");
+ if (num.getType() == Formattable::kDouble &&
+ _u_abs(num.getDouble() - a) / a < 0.01) { // RT within 1%
+ logln(UnicodeString("") + a + " -> \"" + s + "\" -> " +
+ toString(num) + " ok");
+ } else {
+ errln(UnicodeString("") + a + " -> \"" + s + "\" -> " +
+ toString(num) + " FAIL");
+ }
+
+ // We don't test Double.MIN_VALUE because the locale data for the US
+ // currently doesn't specify enough digits to display Double.MIN_VALUE.
+ // This is correct for now; however, we leave this here as a reminder
+ // in case we want to address this later.
+
+ delete fmt;
+}
+
+/**
+ * May 17 1999 sync up - liu
+ * @bug 4170798
+ * DecimalFormat.parse() fails when ParseIntegerOnly set to true
+ */
+void NumberFormatRegressionTest::Test4170798(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nf = NumberFormat::createInstance(Locale::getUS(), status);
+ if (failure(status, "NumberFormat::createInstance")){
+ delete nf;
+ return;
+ };
+ if(nf->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln("DecimalFormat needed to continue");
+ return;
+ }
+ DecimalFormat *df = (DecimalFormat*) nf;
+ df->setParseIntegerOnly(TRUE);
+ Formattable n;
+ ParsePosition pos(0);
+ df->parse("-0.0", n, pos);
+ if (n.getType() != Formattable::kLong
+ || n.getLong() != 0) {
+ errln(UnicodeString("FAIL: parse(\"-0.0\") returns ") + toString(n));
+ }
+ delete nf;
+}
+
+/**
+ * May 17 1999 sync up - liu
+ * toPattern only puts the first grouping separator in.
+ */
+void NumberFormatRegressionTest::Test4176114(void) {
+ const char* DATA[] = {
+ "00", "#00",
+ "000", "#000", // No grouping
+ "#000", "#000", // No grouping
+ "#,##0", "#,##0",
+ "#,000", "#,000",
+ "0,000", "#0,000",
+ "00,000", "#00,000",
+ "000,000", "#,000,000",
+ "0,000,000,000,000.0000", "#0,000,000,000,000.0000", // Reported
+ };
+ int DATA_length = (int)(sizeof(DATA) / sizeof(DATA[0]));
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString s;
+ for (int i=0; i<DATA_length; i+=2) {
+ DecimalFormat df(DATA[i], status);
+ failure(status, "DecimalFormat constructor");
+ df.toPattern(s);
+ UnicodeString exp(DATA[i+1]);
+ if (s != exp) {
+ errln(UnicodeString("FAIL: ") + DATA[i] + " -> " +
+ s + ", want " + exp);
+ }
+ }
+}
+
+/**
+ * May 17 1999 sync up - liu
+ * @bug 4179818
+ * DecimalFormat is incorrectly rounding numbers like 1.2501 to 1.2
+ */
+void NumberFormatRegressionTest::Test4179818(void) {
+ const char* DATA[] = {
+ // Input Pattern Expected output
+ "1.2511", "#.#", "1.3",
+ "1.2501", "#.#", "1.3",
+ "0.9999", "#", "1",
+ };
+ int DATA_length = (int)(sizeof(DATA) / sizeof(DATA[0]));
+ double DOUBLE[] = {
+ 1.2511,
+ 1.2501,
+ 0.9999,
+ };
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols sym(Locale::getUS(), status);
+ failure(status, "Construct DecimalFormatSymbols");
+ DecimalFormat fmt("#", sym, status);
+ failure(status, "Construct DecimalFormat");
+ for (int i=0; i<DATA_length; i+=3) {
+ double in = DOUBLE[i/3];
+ UnicodeString pat(DATA[i+1]);
+ UnicodeString exp(DATA[i+2]);
+ fmt.applyPattern(pat, status);
+ failure(status, "applyPattern");
+ UnicodeString out;
+ FieldPosition pos;
+ fmt.format(in, out, pos);
+ if (out == exp) {
+ logln(UnicodeString("Ok: ") + in + " x " + pat + " = " + out);
+ } else {
+ errln(UnicodeString("FAIL: ") + in + " x " + pat + " = " + out +
+ ", expected " + exp);
+ }
+ }
+}
+
+/**
+ * May 17 1999 sync up - liu
+ * Some DecimalFormatSymbols changes are not picked up by DecimalFormat.
+ * This includes the minus sign, currency symbol, international currency
+ * symbol, percent, and permille. This is filed as bugs 4212072 and
+ * 4212073.
+ */
+void NumberFormatRegressionTest::Test4212072(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols sym(Locale::getUS(), status);
+
+ failure(status, "DecimalFormatSymbols ct", Locale::getUS());
+ DecimalFormat fmt(UnicodeString("#"), sym, status);
+ failure(status, "DecimalFormat ct", Locale::getUS());
+
+ UnicodeString s;
+ FieldPosition pos;
+
+ sym.setSymbol(DecimalFormatSymbols::kMinusSignSymbol, (UChar)0x5e);
+ fmt.setDecimalFormatSymbols(sym);
+ s.remove();
+ if (fmt.format((int32_t)-1, s, pos) != UNICODE_STRING("^1", 2)) {
+ errln(UnicodeString("FAIL: -1 x (minus=^) -> ") + s +
+ ", exp ^1");
+ }
+ s.remove();
+ if (fmt.getNegativePrefix(s) != UnicodeString((UChar)0x5e)) {
+ errln(UnicodeString("FAIL: (minus=^).getNegativePrefix -> ") +
+ s + ", exp ^");
+ }
+ sym.setSymbol(DecimalFormatSymbols::kMinusSignSymbol, (UChar)0x2d);
+
+ fmt.applyPattern(UnicodeString("#%"), status);
+ failure(status, "applyPattern percent");
+ sym.setSymbol(DecimalFormatSymbols::kPercentSymbol, (UChar)0x5e);
+ fmt.setDecimalFormatSymbols(sym);
+ s.remove();
+ if (fmt.format(0.25, s, pos) != UNICODE_STRING("25^", 3)) {
+ errln(UnicodeString("FAIL: 0.25 x (percent=^) -> ") + s +
+ ", exp 25^");
+ }
+ s.remove();
+ if (fmt.getPositiveSuffix(s) != UnicodeString((UChar)0x5e)) {
+ errln(UnicodeString("FAIL: (percent=^).getPositiveSuffix -> ") +
+ s + ", exp ^");
+ }
+ sym.setSymbol(DecimalFormatSymbols::kPercentSymbol, (UChar)0x25);
+
+ fmt.applyPattern(str("#\\u2030"), status);
+ failure(status, "applyPattern permill");
+ sym.setSymbol(DecimalFormatSymbols::kPerMillSymbol, (UChar)0x5e);
+ fmt.setDecimalFormatSymbols(sym);
+ s.remove();
+ if (fmt.format(0.25, s, pos) != UNICODE_STRING("250^", 4)) {
+ errln(UnicodeString("FAIL: 0.25 x (permill=^) -> ") + s +
+ ", exp 250^");
+ }
+ s.remove();
+ if (fmt.getPositiveSuffix(s) != UnicodeString((UChar)0x5e)) {
+ errln(UnicodeString("FAIL: (permill=^).getPositiveSuffix -> ") +
+ s + ", exp ^");
+ }
+ sym.setSymbol(DecimalFormatSymbols::kPerMillSymbol, (UChar)0x2030);
+
+ fmt.applyPattern(str("\\u00A4#.00"), status);
+ failure(status, "applyPattern currency");
+ sym.setSymbol(DecimalFormatSymbols::kCurrencySymbol, "usd");
+ fmt.setDecimalFormatSymbols(sym);
+ s.remove();
+ if (fmt.format(12.5, s, pos) != UnicodeString("usd12.50")) {
+ errln(UnicodeString("FAIL: 12.5 x (currency=usd) -> ") + s +
+ ", exp usd12.50");
+ }
+ s.remove();
+ if (fmt.getPositivePrefix(s) != UnicodeString("usd")) {
+ errln(UnicodeString("FAIL: (currency=usd).getPositivePrefix -> ") +
+ s + ", exp usd");
+ }
+ sym.setSymbol(DecimalFormatSymbols::kCurrencySymbol, "$");
+
+ fmt.applyPattern(str("\\u00A4\\u00A4#.00"), status);
+ failure(status, "applyPattern intl currency");
+ sym.setSymbol(DecimalFormatSymbols::kIntlCurrencySymbol, "DOL");
+ fmt.setDecimalFormatSymbols(sym);
+ s.remove();
+ if (fmt.format(12.5, s, pos) != UnicodeString("DOL12.50")) {
+ errln(UnicodeString("FAIL: 12.5 x (intlcurrency=DOL) -> ") + s +
+ ", exp DOL12.50");
+ }
+ s.remove();
+ if (fmt.getPositivePrefix(s) != UnicodeString("DOL")) {
+ errln(UnicodeString("FAIL: (intlcurrency=DOL).getPositivePrefix -> ") +
+ s + ", exp DOL");
+ }
+ sym.setSymbol(DecimalFormatSymbols::kIntlCurrencySymbol, "USD");
+
+ // Since the pattern logic has changed, make sure that patterns round
+ // trip properly. Test stream in/out integrity too.
+ int32_t n;
+ const Locale* avail = NumberFormat::getAvailableLocales(n);
+ static const char* type[] = {
+ "",
+ "$ ",
+ "% ",
+ };
+ for (int i=0; i<n; ++i) {
+ for (int j=0; j<3; ++j) {
+ status = U_ZERO_ERROR;
+ NumberFormat *nf;
+ switch (j) {
+ case 0:
+ nf = NumberFormat::createInstance(avail[i], status);
+ failure(status, "createInstance", avail[i]);
+ break;
+ case 1:
+ nf = NumberFormat::createCurrencyInstance(avail[i], status);
+ failure(status, "createCurrencyInstance", avail[i]);
+ break;
+ default:
+ nf = NumberFormat::createPercentInstance(avail[i], status);
+ failure(status, "createPercentInstance", avail[i]);
+ break;
+ }
+ if (U_FAILURE(status)) {
+ continue;
+ }
+ DecimalFormat *df = (DecimalFormat*) nf;
+
+ // Test toPattern/applyPattern round trip
+ UnicodeString pat;
+ df->toPattern(pat);
+ DecimalFormatSymbols symb(avail[i], status);
+ failure(status, "Construct DecimalFormatSymbols", avail[i]);
+ DecimalFormat f2(pat, symb, status);
+ if (failure(status,
+ UnicodeString("Construct DecimalFormat(") + pat + ")")) {
+ continue;
+ }
+ if (*df != f2) {
+ UnicodeString l, p;
+ errln(UnicodeString("FAIL: ") + type[j] + avail[i].getDisplayName(l) +
+ " -> \"" + pat +
+ "\" -> \"" + f2.toPattern(p) + "\"");
+ }
+
+ // Test toLocalizedPattern/applyLocalizedPattern round trip
+ df->toLocalizedPattern(pat);
+ f2.applyLocalizedPattern(pat, status);
+ failure(status,
+ UnicodeString("applyLocalizedPattern(") + pat + ")", avail[i]);
+ if (U_FAILURE(status)) {
+ continue;
+ }
+
+ // Make sure we set the currency attributes appropriately
+ if (j == 1) { // Currency format
+ f2.setCurrency(f2.getCurrency(), status);
+ }
+ failure(status,
+ UnicodeString("setCurrency() for (") + pat + ")", avail[i]);
+ if (U_FAILURE(status)) {
+ continue;
+ }
+
+ if (*df != f2) {
+ UnicodeString l, p;
+ errln(UnicodeString("FAIL: ") + type[j] + avail[i].getDisplayName(l) +
+ " -> localized \"" + pat +
+ "\" -> \"" + f2.toPattern(p) + "\"");
+ }
+
+ delete nf;
+
+ // Test writeObject/readObject round trip
+ // NOT ON ICU -- Java only
+ }
+ }
+}
+
+/**
+ * May 17 1999 sync up - liu
+ * DecimalFormat.parse() fails for mulipliers 2^n.
+ */
+void NumberFormatRegressionTest::Test4216742(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *fmt = (DecimalFormat*) NumberFormat::createInstance(Locale::getUS(), status);
+ if (failure(status, "createInstance", Locale::getUS())){
+ delete fmt;
+ return;
+ };
+ int32_t DATA[] = { INT32_MIN, INT32_MAX, -100000000, 100000000 };
+ int DATA_length = (int)(sizeof(DATA) / sizeof(DATA[0]));
+ for (int i=0; i<DATA_length; ++i) {
+ UnicodeString str((UnicodeString)"" + DATA[i]);
+ for (int m = 1; m <= 100; m++) {
+ fmt->setMultiplier(m);
+ Formattable num;
+ fmt->parse(str, num, status);
+ failure(status, "parse", Locale::getUS());
+ if (num.getType() != Formattable::kLong &&
+ num.getType() != Formattable::kDouble) {
+ errln(UnicodeString("FAIL: Wanted number, got ") +
+ toString(num));
+ } else {
+ double d = num.getType() == Formattable::kDouble ?
+ num.getDouble() : (double) num.getLong();
+ if (d > 0 != DATA[i] > 0) {
+ errln(UnicodeString("\"") + str + "\" parse(x " +
+ fmt->getMultiplier() +
+ ") => " + toString(num));
+ }
+ }
+ }
+ }
+ delete fmt;
+}
+
+/**
+ * May 17 1999 sync up - liu
+ * DecimalFormat formats 1.001 to "1.00" instead of "1" with 2 fraction
+ * digits.
+ */
+void NumberFormatRegressionTest::Test4217661(void) {
+ const double D[] = { 0.001, 1.001, 0.006, 1.006 };
+ const char* S[] = { "0", "1", "0.01", "1.01" };
+ int D_length = (int)(sizeof(D) / sizeof(D[0]));
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *fmt = NumberFormat::createInstance(Locale::getUS(), status);
+ if (failure(status, "createInstance", Locale::getUS())){
+ delete fmt;
+ return;
+ };
+ fmt->setMaximumFractionDigits(2);
+ for (int i=0; i<D_length; i++) {
+ UnicodeString s;
+ fmt->format(D[i], s);
+ if (s != UnicodeString(S[i])) {
+ errln(UnicodeString("FAIL: Got ") + s + ", exp " + S[i]);
+ }
+ }
+ delete fmt;
+}
+
+/**
+ * alphaWorks upgrade
+ */
+void NumberFormatRegressionTest::Test4161100(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nf = NumberFormat::createInstance(Locale::getUS(), status);
+ if (failure(status, "createInstance", Locale::getUS())){
+ delete nf;
+ return;
+ };
+ nf->setMinimumFractionDigits(1);
+ nf->setMaximumFractionDigits(1);
+ double a = -0.09;
+ UnicodeString s;
+ nf->format(a, s);
+ UnicodeString pat;
+ logln(UnicodeString() + a + " x " +
+ ((DecimalFormat*) nf)->toPattern(pat) + " = " + s);
+ if (s != UnicodeString("-0.1")) {
+ errln("FAIL");
+ }
+ delete nf;
+}
+
+/**
+ * June 16 1999 sync up - liu
+ * Formatting .5 rounds to "1" instead of "0". (Regression in 1.2.2 RC1)
+ */
+void NumberFormatRegressionTest::Test4243011(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols sym(Locale::getUS(), status);
+ failure(status, "DecimalFormatSymbols ct", Locale::getUS());
+ DecimalFormat fmt(UnicodeString("0."), sym, status);
+ failure(status, "DecimalFormat ct", Locale::getUS());
+
+ const double NUM[] = { -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5 };
+ const char* STR[] = { "-2.", "-2.", "-0.", "0.", "2.", "2.", "4.", "4." };
+ int32_t N = (int32_t)(sizeof(NUM) / sizeof(NUM[0]));
+
+ for (int32_t i=0; i<N; ++i) {
+ UnicodeString str;
+ UnicodeString exp(STR[i]);
+ FieldPosition pos;
+ fmt.format(NUM[i], str, pos);
+ if (str == exp) {
+ logln(UnicodeString("Ok ") + NUM[i] + " x 0. = " + str);
+ } else {
+ errln(UnicodeString("FAIL ") + NUM[i] + " x 0. = " + str +
+ ", want " + exp);
+ }
+ }
+}
+
+/**
+ * June 16 1999 sync up - liu
+ * format(0.0) gives "0.1" if preceded by parse("99.99").
+ * (Regression in 1.2.2 RC1)
+ */
+void NumberFormatRegressionTest::Test4243108(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormatSymbols sym(Locale::getUS(), status);
+ failure(status, "DecimalFormatSymbols ct", Locale::getUS());
+ DecimalFormat fmt(UnicodeString("#.#"), sym, status);
+ failure(status, "DecimalFormat ct", Locale::getUS());
+
+ UnicodeString str;
+ FieldPosition pos;
+
+ fmt.format(0.0, str, pos);
+ UnicodeString exp("0");
+ if (str == exp) {
+ logln(UnicodeString("Ok 0.0 x #.# = ") + str);
+ } else {
+ errln(UnicodeString("FAIL 0.0 x #.# = ") + str +
+ ", want " + exp);
+ }
+
+ str = "99.99";
+ Formattable val;
+ fmt.parse(str, val, status);
+ failure(status, "DecimalFormat.parse(99.99)", Locale::getUS());
+ if (val.getType() == Formattable::kDouble &&
+ val.getDouble() == 99.99) {
+ logln(UnicodeString("Ok 99.99 / #.# = ") + toString(val));
+ } else {
+ errln(UnicodeString("FAIL 99.99 / #.# = ") + toString(val) +
+ ", want " + 99.99);
+ }
+
+ str.remove();
+ fmt.format(0.0, str, pos);
+ if (str == exp) {
+ logln(UnicodeString("Ok 0.0 x #.# = ") + str);
+ } else {
+ errln(UnicodeString("FAIL 0.0 x #.# = ") + str +
+ ", want " + exp);
+ }
+}
+
+
+/**
+ * DateFormat should call setIntegerParseOnly(TRUE) on adopted
+ * NumberFormat objects.
+ */
+void NumberFormatRegressionTest::TestJ691(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ Locale loc("fr", "CH");
+
+ // set up the input date string & expected output
+ UnicodeString udt("11.10.2000", "");
+ UnicodeString exp("11.10.00", "");
+
+ // create a Calendar for this locale
+ Calendar *cal = Calendar::createInstance(loc, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Calendar::createInstance() returned " + (UnicodeString)u_errorName(status));
+ return;
+ }
+
+ // create a NumberFormat for this locale
+ NumberFormat *nf = NumberFormat::createInstance(loc, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: NumberFormat::createInstance() returned " + (UnicodeString)u_errorName(status));
+ return;
+ }
+
+ // *** Here's the key: We don't want to have to do THIS:
+ // nf->setParseIntegerOnly(TRUE);
+
+ // create the DateFormat
+ DateFormat *df = DateFormat::createDateInstance(DateFormat::kShort, loc);
+ if (U_FAILURE(status)) {
+ errln("FAIL: DateFormat::createInstance() returned " + (UnicodeString)u_errorName(status));
+ return;
+ }
+
+ df->adoptCalendar(cal);
+ df->adoptNumberFormat(nf);
+
+ // set parsing to lenient & parse
+ df->setLenient(TRUE);
+ UDate ulocdat = df->parse(udt, status);
+
+ // format back to a string
+ UnicodeString outString;
+ df->format(ulocdat, outString);
+
+ if (outString != exp) {
+ errln("FAIL: " + udt + " => " + outString);
+ }
+
+ delete df;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/numrgts.h b/Build/source/libs/icu/icu-xetex/test/intltest/numrgts.h
new file mode 100644
index 00000000000..e20141cd2a4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/numrgts.h
@@ -0,0 +1,103 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#ifndef _NUMBERFORMATREGRESSIONTEST_
+#define _NUMBERFORMATREGRESSIONTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "unicode/numfmt.h"
+#include "unicode/decimfmt.h"
+#include "intltest.h"
+
+/**
+ * Performs regression test for MessageFormat
+ **/
+class NumberFormatRegressionTest: public IntlTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+ void Test4075713(void);
+ void Test4074620(void) ;
+ void Test4088161 (void);
+ void Test4087245 (void);
+ void Test4087535 (void);
+ void Test4088503 (void);
+ void Test4066646 (void);
+ float assignFloatValue(float returnfloat);
+ void Test4059870(void);
+ void Test4083018 (void);
+ void Test4071492 (void);
+ void Test4086575(void);
+ void Test4068693(void);
+ void Test4069754(void);
+ void Test4087251 (void);
+ void Test4090489 (void);
+ void Test4090504 (void);
+ void Test4095713 (void);
+ void Test4092561 (void);
+ void Test4092480 (void);
+ void Test4087244 (void);
+ void Test4070798 (void);
+ void Test4071005 (void);
+ void Test4071014 (void);
+ void Test4071859 (void);
+ void Test4093610(void);
+ void roundingTest(DecimalFormat *df, double x, UnicodeString& expected);
+ void Test4098741(void);
+ void Test4074454(void);
+ void Test4099404(void);
+ void Test4101481(void);
+ void Test4052223(void);
+ void Test4061302(void);
+ void Test4062486(void);
+ void Test4108738(void);
+ void Test4106658(void);
+ void Test4106662(void);
+ void Test4114639(void);
+ void Test4106664(void);
+ void Test4106667(void);
+ void Test4110936(void);
+ void Test4122840(void);
+ void Test4125885(void);
+ void Test4134034(void);
+ void Test4134300(void);
+ void Test4140009(void);
+ void Test4141750(void);
+ void Test4145457(void);
+ void Test4147295(void);
+ void Test4147706(void);
+
+ void Test4162198(void);
+ void Test4162852(void);
+
+ void Test4167494(void);
+ void Test4170798(void);
+ void Test4176114(void);
+ void Test4179818(void);
+ void Test4212072(void);
+ void Test4216742(void);
+ void Test4217661(void);
+ void Test4161100(void);
+ void Test4243011(void);
+ void Test4243108(void);
+ void TestJ691(void);
+
+protected:
+ UBool failure(UErrorCode status, const UnicodeString& msg);
+ UBool failure(UErrorCode status, const UnicodeString& msg, const char *l);
+ UBool failure(UErrorCode status, const UnicodeString& msg, const Locale& l);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _NUMBERFORMATREGRESSIONTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/pptest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/pptest.cpp
new file mode 100644
index 00000000000..2159183b17a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/pptest.cpp
@@ -0,0 +1,227 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "pptest.h"
+
+#include "unicode/numfmt.h"
+#include "unicode/decimfmt.h"
+
+// *****************************************************************************
+// class ParsePositionTest
+// *****************************************************************************
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+void ParsePositionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite ParsePositionTest");
+ switch (index) {
+ CASE(0, TestParsePosition)
+ CASE(1, TestFieldPosition)
+ CASE(2, TestFieldPosition_example)
+ CASE(3, Test4109023)
+
+ default: name = ""; break;
+ }
+}
+
+UBool
+ParsePositionTest::failure(UErrorCode status, const char* msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void ParsePositionTest::TestParsePosition()
+{
+ ParsePosition pp1(0);
+ if (pp1.getIndex() == 0) {
+ logln("PP constructor() tested.");
+ }else{
+ errln("*** PP getIndex or constructor() result");
+ }
+
+ {
+ int to = 5;
+ ParsePosition pp2( to );
+ if (pp2.getIndex() == 5) {
+ logln("PP getIndex and constructor(int32_t) tested.");
+ }else{
+ errln("*** PP getIndex or constructor(int32_t) result");
+ }
+ pp2.setIndex( 3 );
+ if (pp2.getIndex() == 3) {
+ logln("PP setIndex tested.");
+ }else{
+ errln("*** PP getIndex or setIndex result");
+ }
+ }
+
+ ParsePosition pp2(3), pp3(5);
+ //pp2 = new ParsePosition( 3 );
+ //pp3 = new ParsePosition( 5 );
+ ParsePosition pp4(5);
+ if ( pp2 != pp3) {
+ logln("PP not equals tested.");
+ }else{
+ errln("*** PP not equals fails");
+ }
+ if (pp3 == pp4) {
+ logln("PP equals tested.");
+ }else{
+ errln(UnicodeString("*** PP equals fails (") + pp3.getIndex() + " != " + pp4.getIndex() + ")");
+ }
+
+ ParsePosition pp5;
+ pp5 = pp4;
+ if (pp4 == pp5) {
+ logln("PP operator= tested.");
+ }else{
+ errln("*** PP operator= operator== or operator != result");
+ }
+
+ ParsePosition *ppp = pp5.clone();
+ if(ppp == &pp5 || *ppp != pp5) {
+ errln("ParsePosition.clone() failed");
+ }
+ delete ppp;
+}
+
+void ParsePositionTest::TestFieldPosition()
+{
+ FieldPosition fp( 7 );
+
+ if (fp.getField() == 7) {
+ logln("FP constructor(int) and getField tested.");
+ }else{
+ errln("*** FP constructor(int) or getField");
+ }
+
+ FieldPosition fpc(fp);
+ if (fpc.getField() == 7) {
+ logln("FP Constructor(FP&) passed");
+ } else {
+ errln("*** FP Constructor(FP&)");
+ }
+
+ FieldPosition fph( 3 );
+ if ( fph.getField() != 3)
+ errln("*** FP getField or heap constr.");
+
+ UBool err1 = FALSE;
+ UBool err2 = FALSE;
+ UBool err3 = FALSE;
+// for (long i = -50; i < 50; i++ ) {
+// fp.setField( i+8 );
+// fp.setBeginIndex( i+6 );
+// fp.setEndIndex( i+7 );
+// if (fp.getField() != i+8) err1 = TRUE;
+// if (fp.getBeginIndex() != i+6) err2 = TRUE;
+// if (fp.getEndIndex() != i+7) err3 = TRUE;
+// }
+ if (!err1) {
+ logln("FP setField and getField tested.");
+ }else{
+ errln("*** FP setField or getField");
+ }
+ if (!err2) {
+ logln("FP setBeginIndex and getBeginIndex tested.");
+ }else{
+ errln("*** FP setBeginIndex or getBeginIndex");
+ }
+ if (!err3) {
+ logln("FP setEndIndex and getEndIndex tested.");
+ }else{
+ errln("*** FP setEndIndex or getEndIndex");
+ }
+
+ logln("");
+
+ FieldPosition *pfp = fp.clone();
+ if(pfp == &fp || *pfp != fp) {
+ errln("FieldPosition.clone() failed");
+ }
+ delete pfp;
+}
+
+void ParsePositionTest::TestFieldPosition_example()
+{
+ //***** no error detection yet !!!!!!!
+ //***** this test is for compiler checks and visual verification only.
+ double doubleNum[] = {
+ 123456789.0,
+ -12345678.9,
+ 1234567.89,
+ -123456.789,
+ 12345.6789,
+ -1234.56789,
+ 123.456789,
+ -12.3456789,
+ 1.23456789};
+ int dNumSize = 9;
+
+ UErrorCode status = U_ZERO_ERROR;
+ NumberFormat *nf = NumberFormat::createInstance(status);
+ if (failure(status, "NumberFormat::createInstance")){
+ delete nf;
+ return;
+ };
+
+ if(nf->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
+ errln("NumberFormat::createInstance returned unexpected class type");
+ return;
+ }
+ DecimalFormat *fmt = (DecimalFormat*) nf;
+ fmt->setDecimalSeparatorAlwaysShown(TRUE);
+
+ const int tempLen = 20;
+ UnicodeString temp;
+
+ for (int i=0; i < dNumSize; i++) {
+ temp.remove();
+ //temp = new StringBuffer(); // Get new buffer
+
+ FieldPosition pos(NumberFormat::INTEGER_FIELD);
+ UnicodeString buf;// = new StringBuffer();
+ //char fmtText[tempLen];
+ //ToCharString(fmt->format(doubleNum[i], buf, pos), fmtText);
+ UnicodeString res;
+ res = fmt->format(doubleNum[i], buf, pos);
+ int tempOffset = (tempLen <= (tempLen - pos.getEndIndex())) ?
+ tempLen : (tempLen - pos.getEndIndex());
+ for (int j=0; j<tempOffset; j++)
+ temp += UnicodeString("="/*'='*/); // initialize
+ logln("FP " + temp + res);
+ }
+
+ logln("");
+ delete nf;
+}
+
+/* @bug 4109023
+ * Need to override ParsePosition.equals and FieldPosition.equals.
+ */
+void ParsePositionTest::Test4109023()
+{
+ ParsePosition p(3);
+ ParsePosition p2(3);
+ if (p != p2)
+ errln("Error : ParsePosition.equals() failed");
+ FieldPosition fp(2);
+ FieldPosition fp2(2);
+ if (fp != fp2)
+ errln("Error : FieldPosition.equals() failed");
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/pptest.h b/Build/source/libs/icu/icu-xetex/test/intltest/pptest.h
new file mode 100644
index 00000000000..5bad9b1dc63
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/pptest.h
@@ -0,0 +1,37 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _PARSEPOSITIONIONTEST_
+#define _PARSEPOSITIONIONTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+
+/**
+ * Performs test for ParsePosition
+ **/
+class ParsePositionTest: public IntlTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+ void TestParsePosition(void);
+ void TestFieldPosition(void);
+ void TestFieldPosition_example(void);
+ void Test4109023(void);
+
+protected:
+ UBool failure(UErrorCode status, const char* msg);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _PARSEPOSITIONIONTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/punyref.c b/Build/source/libs/icu/icu-xetex/test/intltest/punyref.c
new file mode 100644
index 00000000000..c61a8b61371
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/punyref.c
@@ -0,0 +1,302 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2005, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: punyref.h
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003feb1
+ * created by: Ram Viswanadha
+ */
+
+/*
+Disclaimer and license
+
+ Regarding this entire document or any portion of it (including
+ the pseudocode and C code), the author makes no guarantees and
+ is not responsible for any damage resulting from its use. The
+ author grants irrevocable permission to anyone to use, modify,
+ and distribute it in any way that does not diminish the rights
+ of anyone else to use, modify, and distribute it, provided that
+ redistributed derivative works do not contain misleading author or
+ version information. Derivative works need not be licensed under
+ similar terms.
+
+punycode.c 0.4.0 (2001-Nov-17-Sat)
+http://www.cs.berkeley.edu/~amc/idn/
+Adam M. Costello
+http://www.nicemice.net/amc/
+*/
+
+/**********************************************************/
+/* Implementation (would normally go in its own .c file): */
+
+#include <string.h>
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+#include "punyref.h"
+
+/*** Bootstring parameters for Punycode ***/
+
+enum { base = 36, tmin = 1, tmax = 26, skew = 38, damp = 700,
+ initial_bias = 72, initial_n = 0x80, delimiter = 0x2D };
+
+/* basic(cp) tests whether cp is a basic code point: */
+#define basic(cp) ((punycode_uint)(cp) < 0x80)
+
+/* delim(cp) tests whether cp is a delimiter: */
+#define delim(cp) ((cp) == delimiter)
+
+U_CDECL_BEGIN
+/* decode_digit(cp) returns the numeric value of a basic code */
+/* point (for use in representing integers) in the range 0 to */
+/* base-1, or base if cp is does not represent a value. */
+
+static punycode_uint decode_digit(punycode_uint cp)
+{
+ return cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
+ cp - 97 < 26 ? cp - 97 : base;
+}
+
+/* encode_digit(d,flag) returns the basic code point whose value */
+/* (when used for representing integers) is d, which needs to be in */
+/* the range 0 to base-1. The lowercase form is used unless flag is */
+/* nonzero, in which case the uppercase form is used. The behavior */
+/* is undefined if flag is nonzero and digit d has no uppercase form. */
+
+static char encode_digit(punycode_uint d, int flag)
+{
+ return (char) d + 22 + 75 * (d < 26) - ((flag != 0) << 5);
+ /* 0..25 map to ASCII a..z or A..Z */
+ /* 26..35 map to ASCII 0..9 */
+}
+
+/* flagged(bcp) tests whether a basic code point is flagged */
+/* (uppercase). The behavior is undefined if bcp is not a */
+/* basic code point. */
+
+#define flagged(bcp) ((punycode_uint)(bcp) - 65 < 26)
+
+/* encode_basic(bcp,flag) forces a basic code point to lowercase */
+/* if flag is zero, uppercase if flag is nonzero, and returns */
+/* the resulting code point. The code point is unchanged if it */
+/* is caseless. The behavior is undefined if bcp is not a basic */
+/* code point. */
+
+static char encode_basic(punycode_uint bcp, int flag)
+{
+ bcp -= (bcp - 97 < 26) << 5;
+ return (char) bcp + ((!flag && (bcp - 65 < 26)) << 5);
+}
+
+/*** Platform-specific constants ***/
+
+/* maxint is the maximum value of a punycode_uint variable: */
+static const punycode_uint maxint = (punycode_uint) (-1);
+/* Because maxint is unsigned, -1 becomes the maximum value. */
+
+/*** Bias adaptation function ***/
+
+static punycode_uint adapt(
+ punycode_uint delta, punycode_uint numpoints, int firsttime )
+{
+ punycode_uint k;
+
+ delta = firsttime ? delta / damp : delta >> 1;
+ /* delta >> 1 is a faster way of doing delta / 2 */
+ delta += delta / numpoints;
+
+ for (k = 0; delta > ((base - tmin) * tmax) / 2; k += base) {
+ delta /= base - tmin;
+ }
+
+ return k + (base - tmin + 1) * delta / (delta + skew);
+}
+
+/*** Main encode function ***/
+
+enum punycode_status punycode_encode(
+ punycode_uint input_length,
+ const punycode_uint input[],
+ const unsigned char case_flags[],
+ punycode_uint *output_length,
+ char output[] )
+{
+ punycode_uint n, delta, h, b, out, max_out, bias, j, m, q, k, t;
+
+ /* Initialize the state: */
+
+ n = initial_n;
+ delta = out = 0;
+ max_out = *output_length;
+ bias = initial_bias;
+
+ /* Handle the basic code points: */
+
+ for (j = 0; j < input_length; ++j) {
+ if (basic(input[j])) {
+ if (max_out - out < 2) return punycode_big_output;
+ output[out++] = (char)
+ (case_flags ? encode_basic(input[j], case_flags[j]) : input[j]);
+ }
+ /* else if (input[j] < n) return punycode_bad_input; */
+ /* (not needed for Punycode with unsigned code points) */
+ }
+
+ h = b = out;
+
+ /* h is the number of code points that have been handled, b is the */
+ /* number of basic code points, and out is the number of characters */
+ /* that have been output. */
+
+ if (b > 0) output[out++] = delimiter;
+
+ /* Main encoding loop: */
+
+ while (h < input_length) {
+ /* All non-basic code points < n have been */
+ /* handled already. Find the next larger one: */
+
+ for (m = maxint, j = 0; j < input_length; ++j) {
+ /* if (basic(input[j])) continue; */
+ /* (not needed for Punycode) */
+ if (input[j] >= n && input[j] < m) m = input[j];
+ }
+
+ /* Increase delta enough to advance the decoder's */
+ /* <n,i> state to <m,0>, but guard against overflow: */
+
+ if (m - n > (maxint - delta) / (h + 1)) return punycode_overflow;
+ delta += (m - n) * (h + 1);
+ n = m;
+
+ for (j = 0; j < input_length; ++j) {
+ /* Punycode does not need to check whether input[j] is basic: */
+ if (input[j] < n /* || basic(input[j]) */ ) {
+ if (++delta == 0) return punycode_overflow;
+ }
+
+ if (input[j] == n) {
+ /* Represent delta as a generalized variable-length integer: */
+
+ for (q = delta, k = base; ; k += base) {
+ if (out >= max_out) return punycode_big_output;
+ t = k <= bias /* + tmin */ ? tmin : /* +tmin not needed */
+ k >= bias + tmax ? tmax : k - bias;
+ if (q < t) break;
+ output[out++] = encode_digit(t + (q - t) % (base - t), 0);
+ q = (q - t) / (base - t);
+ }
+
+ output[out++] = encode_digit(q, case_flags && case_flags[j]);
+ bias = adapt(delta, h + 1, h == b);
+ delta = 0;
+ ++h;
+ }
+ }
+
+ ++delta, ++n;
+ }
+
+ *output_length = out;
+ return punycode_success;
+}
+
+/*** Main decode function ***/
+
+enum punycode_status punycode_decode(
+ punycode_uint input_length,
+ const char input[],
+ punycode_uint *output_length,
+ punycode_uint output[],
+ unsigned char case_flags[] )
+{
+ punycode_uint n, out, i, max_out, bias,
+ b, j, in, oldi, w, k, digit, t;
+
+ /* Initialize the state: */
+
+ n = initial_n;
+ out = i = 0;
+ max_out = *output_length;
+ bias = initial_bias;
+
+ /* Handle the basic code points: Let b be the number of input code */
+ /* points before the last delimiter, or 0 if there is none, then */
+ /* copy the first b code points to the output. */
+
+ for (b = j = 0; j < input_length; ++j) if (delim(input[j])) b = j;
+ if (b > max_out) return punycode_big_output;
+
+ for (j = 0; j < b; ++j) {
+ if (case_flags) case_flags[out] = flagged(input[j]);
+ if (!basic(input[j])) return punycode_bad_input;
+ output[out++] = input[j];
+ }
+
+ /* Main decoding loop: Start just after the last delimiter if any */
+ /* basic code points were copied; start at the beginning otherwise. */
+
+ for (in = b > 0 ? b + 1 : 0; in < input_length; ++out) {
+
+ /* in is the index of the next character to be consumed, and */
+ /* out is the number of code points in the output array. */
+
+ /* Decode a generalized variable-length integer into delta, */
+ /* which gets added to i. The overflow checking is easier */
+ /* if we increase i as we go, then subtract off its starting */
+ /* value at the end to obtain delta. */
+
+ for (oldi = i, w = 1, k = base; ; k += base) {
+ if (in >= input_length) return punycode_bad_input;
+ digit = decode_digit(input[in++]);
+ if (digit >= base) return punycode_bad_input;
+ if (digit > (maxint - i) / w) return punycode_overflow;
+ i += digit * w;
+ t = k <= bias /* + tmin */ ? tmin : /* +tmin not needed */
+ k >= bias + tmax ? tmax : k - bias;
+ if (digit < t) break;
+ if (w > maxint / (base - t)) return punycode_overflow;
+ w *= (base - t);
+ }
+
+ bias = adapt(i - oldi, out + 1, oldi == 0);
+
+ /* i was supposed to wrap around from out+1 to 0, */
+ /* incrementing n each time, so we'll fix that now: */
+
+ if (i / (out + 1) > maxint - n) return punycode_overflow;
+ n += i / (out + 1);
+ i %= (out + 1);
+
+ /* Insert n at position i of the output: */
+
+ /* not needed for Punycode: */
+ /* if (decode_digit(n) <= base) return punycode_invalid_input; */
+ if (out >= max_out) return punycode_big_output;
+
+ if (case_flags) {
+ memmove(case_flags + i + 1, case_flags + i, out - i);
+ /* Case of last character determines uppercase flag: */
+ case_flags[i] = flagged(input[in - 1]);
+ }
+
+ memmove(output + i + 1, output + i, (out - i) * sizeof *output);
+ output[i++] = n;
+ }
+
+ *output_length = out;
+ return punycode_success;
+}
+
+U_CDECL_END
+
+#endif /* #if !UCONFIG_NO_IDNA */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/punyref.h b/Build/source/libs/icu/icu-xetex/test/intltest/punyref.h
new file mode 100644
index 00000000000..138446bcc06
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/punyref.h
@@ -0,0 +1,116 @@
+/*
+ ******************************************************************************
+ *
+ * Copyright (C) 2003, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ ******************************************************************************
+ */
+/*
+punycode.c from draft-ietf-idn-punycode-03
+http://www.nicemice.net/idn/
+Adam M. Costello
+http://www.nicemice.net/amc/
+
+This is ANSI C code (C89) implementing
+Punycode (draft-ietf-idn-punycode-03).
+
+Disclaimer and license
+
+ Regarding this entire document or any portion of it (including
+ the pseudocode and C code), the author makes no guarantees and
+ is not responsible for any damage resulting from its use. The
+ author grants irrevocable permission to anyone to use, modify,
+ and distribute it in any way that does not diminish the rights
+ of anyone else to use, modify, and distribute it, provided that
+ redistributed derivative works do not contain misleading author or
+ version information. Derivative works need not be licensed under
+ similar terms.
+
+*/
+#ifndef _PUNYREF_H
+#define _PUNYREF_H
+
+/************************************************************/
+/* Public interface (would normally go in its own .h file): */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA
+
+enum punycode_status {
+ punycode_success,
+ punycode_bad_input, /* Input is invalid. */
+ punycode_big_output, /* Output would exceed the space provided. */
+ punycode_overflow /* Input needs wider integers to process. */
+};
+
+
+typedef uint32_t punycode_uint;
+
+U_CDECL_BEGIN
+
+enum punycode_status punycode_encode(
+ punycode_uint input_length,
+ const punycode_uint input[],
+ const unsigned char case_flags[],
+ punycode_uint *output_length,
+ char output[] );
+
+ /* punycode_encode() converts Unicode to Punycode. The input */
+ /* is represented as an array of Unicode code points (not code */
+ /* units; surrogate pairs are not allowed), and the output */
+ /* will be represented as an array of ASCII code points. The */
+ /* output string is *not* null-terminated; it will contain */
+ /* zeros if and only if the input contains zeros. (Of course */
+ /* the caller can leave room for a terminator and add one if */
+ /* needed.) The input_length is the number of code points in */
+ /* the input. The output_length is an in/out argument: the */
+ /* caller passes in the maximum number of code points that it */
+ /* can receive, and on successful return it will contain the */
+ /* number of code points actually output. The case_flags array */
+ /* holds input_length boolean values, where nonzero suggests that */
+ /* the corresponding Unicode character be forced to uppercase */
+ /* after being decoded (if possible), and zero suggests that */
+ /* it be forced to lowercase (if possible). ASCII code points */
+ /* are encoded literally, except that ASCII letters are forced */
+ /* to uppercase or lowercase according to the corresponding */
+ /* uppercase flags. If case_flags is a null pointer then ASCII */
+ /* letters are left as they are, and other code points are */
+ /* treated as if their uppercase flags were zero. The return */
+ /* value can be any of the punycode_status values defined above */
+ /* except punycode_bad_input; if not punycode_success, then */
+ /* output_size and output might contain garbage. */
+
+enum punycode_status punycode_decode(
+ punycode_uint input_length,
+ const char input[],
+ punycode_uint *output_length,
+ punycode_uint output[],
+ unsigned char case_flags[] );
+
+ /* punycode_decode() converts Punycode to Unicode. The input is */
+ /* represented as an array of ASCII code points, and the output */
+ /* will be represented as an array of Unicode code points. The */
+ /* input_length is the number of code points in the input. The */
+ /* output_length is an in/out argument: the caller passes in */
+ /* the maximum number of code points that it can receive, and */
+ /* on successful return it will contain the actual number of */
+ /* code points output. The case_flags array needs room for at */
+ /* least output_length values, or it can be a null pointer if the */
+ /* case information is not needed. A nonzero flag suggests that */
+ /* the corresponding Unicode character be forced to uppercase */
+ /* by the caller (if possible), while zero suggests that it be */
+ /* forced to lowercase (if possible). ASCII code points are */
+ /* output already in the proper case, but their flags will be set */
+ /* appropriately so that applying the flags would be harmless. */
+ /* The return value can be any of the punycode_status values */
+ /* defined above; if not punycode_success, then output_length, */
+ /* output, and case_flags might contain garbage. On success, the */
+ /* decoder will never need to write an output_length greater than */
+ /* input_length, because of how the encoding is defined. */
+U_CDECL_END
+
+#endif /* #if !UCONFIG_NO_IDNA */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.cpp
new file mode 100644
index 00000000000..36305991862
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.cpp
@@ -0,0 +1,1118 @@
+/********************************************************************
+ * Copyright (c) 1999-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************
+ * Date Name Description
+ * 12/14/99 Madhu Creation.
+ * 01/12/2000 Madhu updated for changed API
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "unicode/uchar.h"
+#include "intltest.h"
+#include "unicode/rbbi.h"
+#include "unicode/schriter.h"
+#include "rbbiapts.h"
+#include "rbbidata.h"
+#include "cstring.h"
+#include "ubrkimpl.h"
+#include "unicode/ustring.h"
+#include "unicode/utext.h"
+
+/**
+ * API Test the RuleBasedBreakIterator class
+ */
+
+
+#define TEST_ASSERT_SUCCESS(status) {if (U_FAILURE(status)) {\
+errln("Failure at file %s, line %d, error = %s", __FILE__, __LINE__, u_errorName(status));}}
+
+#define TEST_ASSERT(expr) {if ((expr)==FALSE) { \
+errln("Test Failure at file %s, line %d", __FILE__, __LINE__);}}
+
+void RBBIAPITest::TestCloneEquals()
+{
+
+ UErrorCode status=U_ZERO_ERROR;
+ RuleBasedBreakIterator* bi1 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ RuleBasedBreakIterator* biequal = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ RuleBasedBreakIterator* bi3 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ RuleBasedBreakIterator* bi2 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createWordInstance(Locale::getDefault(), status);
+ if(U_FAILURE(status)){
+ errln((UnicodeString)"FAIL : in construction");
+ return;
+ }
+
+
+ UnicodeString testString="Testing word break iterators's clone() and equals()";
+ bi1->setText(testString);
+ bi2->setText(testString);
+ biequal->setText(testString);
+
+ bi3->setText("hello");
+
+ logln((UnicodeString)"Testing equals()");
+
+ logln((UnicodeString)"Testing == and !=");
+ UBool b = (*bi1 != *biequal);
+ b |= *bi1 == *bi2;
+ b |= *bi1 == *bi3;
+ if (b) {
+ errln((UnicodeString)"ERROR:1 RBBI's == and != operator failed.");
+ }
+
+ if(*bi2 == *biequal || *bi2 == *bi1 || *biequal == *bi3)
+ errln((UnicodeString)"ERROR:2 RBBI's == and != operator failed.");
+
+
+ // Quick test of RulesBasedBreakIterator assignment -
+ // Check that
+ // two different iterators are !=
+ // they are == after assignment
+ // source and dest iterator produce the same next() after assignment.
+ // deleting one doesn't disable the other.
+ logln("Testing assignment");
+ RuleBasedBreakIterator *bix = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale::getDefault(), status);
+ if(U_FAILURE(status)){
+ errln((UnicodeString)"FAIL : in construction");
+ return;
+ }
+
+ RuleBasedBreakIterator biDefault, biDefault2;
+ if(U_FAILURE(status)){
+ errln((UnicodeString)"FAIL : in construction of default iterator");
+ return;
+ }
+ if (biDefault == *bix) {
+ errln((UnicodeString)"ERROR: iterators should not compare ==");
+ return;
+ }
+ if (biDefault != biDefault2) {
+ errln((UnicodeString)"ERROR: iterators should compare ==");
+ return;
+ }
+
+
+ UnicodeString HelloString("Hello Kitty");
+ bix->setText(HelloString);
+ if (*bix == *bi2) {
+ errln(UnicodeString("ERROR: strings should not be equal before assignment."));
+ }
+ *bix = *bi2;
+ if (*bix != *bi2) {
+ errln(UnicodeString("ERROR: strings should be equal before assignment."));
+ }
+
+ int bixnext = bix->next();
+ int bi2next = bi2->next();
+ if (! (bixnext == bi2next && bixnext == 7)) {
+ errln(UnicodeString("ERROR: iterators behaved differently after assignment."));
+ }
+ delete bix;
+ if (bi2->next() != 8) {
+ errln(UnicodeString("ERROR: iterator.next() failed after deleting copy."));
+ }
+
+
+
+ logln((UnicodeString)"Testing clone()");
+ RuleBasedBreakIterator* bi1clone=(RuleBasedBreakIterator*)bi1->clone();
+ RuleBasedBreakIterator* bi2clone=(RuleBasedBreakIterator*)bi2->clone();
+
+ if(*bi1clone != *bi1 || *bi1clone != *biequal ||
+ *bi1clone == *bi3 || *bi1clone == *bi2)
+ errln((UnicodeString)"ERROR:1 RBBI's clone() method failed");
+
+ if(*bi2clone == *bi1 || *bi2clone == *biequal ||
+ *bi2clone == *bi3 || *bi2clone != *bi2)
+ errln((UnicodeString)"ERROR:2 RBBI's clone() method failed");
+
+ if(bi1->getText() != bi1clone->getText() ||
+ bi2clone->getText() != bi2->getText() ||
+ *bi2clone == *bi1clone )
+ errln((UnicodeString)"ERROR: RBBI's clone() method failed");
+
+ delete bi1clone;
+ delete bi2clone;
+ delete bi1;
+ delete bi3;
+ delete bi2;
+ delete biequal;
+}
+
+void RBBIAPITest::TestBoilerPlate()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIterator* a = BreakIterator::createWordInstance(Locale("hi"), status);
+ BreakIterator* b = BreakIterator::createWordInstance(Locale("hi_IN"),status);
+ if (U_FAILURE(status)) {
+ errln("Creation of break iterator failed %s", u_errorName(status));
+ return;
+ }
+ if(*a!=*b){
+ errln("Failed: boilerplate method operator!= does not return correct results");
+ }
+ BreakIterator* c = BreakIterator::createWordInstance(Locale("ja"),status);
+ if(a && c){
+ if(*c==*a){
+ errln("Failed: boilerplate method opertator== does not return correct results");
+ }
+ }else{
+ errln("creation of break iterator failed");
+ }
+ delete a;
+ delete b;
+ delete c;
+}
+
+void RBBIAPITest::TestgetRules()
+{
+ UErrorCode status=U_ZERO_ERROR;
+
+ RuleBasedBreakIterator* bi1=(RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ RuleBasedBreakIterator* bi2=(RuleBasedBreakIterator*)RuleBasedBreakIterator::createWordInstance(Locale::getDefault(), status);
+ if(U_FAILURE(status)){
+ errln((UnicodeString)"FAIL: in construction");
+ delete bi1;
+ delete bi2;
+ return;
+ }
+
+
+
+ logln((UnicodeString)"Testing toString()");
+
+ bi1->setText((UnicodeString)"Hello there");
+
+ RuleBasedBreakIterator* bi3 =(RuleBasedBreakIterator*)bi1->clone();
+
+ UnicodeString temp=bi1->getRules();
+ UnicodeString temp2=bi2->getRules();
+ UnicodeString temp3=bi3->getRules();
+ if( temp2.compare(temp3) ==0 || temp.compare(temp2) == 0 || temp.compare(temp3) != 0)
+ errln((UnicodeString)"ERROR: error in getRules() method");
+
+ delete bi1;
+ delete bi2;
+ delete bi3;
+}
+void RBBIAPITest::TestHashCode()
+{
+ UErrorCode status=U_ZERO_ERROR;
+ RuleBasedBreakIterator* bi1 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ RuleBasedBreakIterator* bi3 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ RuleBasedBreakIterator* bi2 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createWordInstance(Locale::getDefault(), status);
+ if(U_FAILURE(status)){
+ errln((UnicodeString)"FAIL : in construction");
+ delete bi1;
+ delete bi2;
+ delete bi3;
+ return;
+ }
+
+
+ logln((UnicodeString)"Testing hashCode()");
+
+ bi1->setText((UnicodeString)"Hash code");
+ bi2->setText((UnicodeString)"Hash code");
+ bi3->setText((UnicodeString)"Hash code");
+
+ RuleBasedBreakIterator* bi1clone= (RuleBasedBreakIterator*)bi1->clone();
+ RuleBasedBreakIterator* bi2clone= (RuleBasedBreakIterator*)bi2->clone();
+
+ if(bi1->hashCode() != bi1clone->hashCode() || bi1->hashCode() != bi3->hashCode() ||
+ bi1clone->hashCode() != bi3->hashCode() || bi2->hashCode() != bi2clone->hashCode())
+ errln((UnicodeString)"ERROR: identical objects have different hashcodes");
+
+ if(bi1->hashCode() == bi2->hashCode() || bi2->hashCode() == bi3->hashCode() ||
+ bi1clone->hashCode() == bi2clone->hashCode() || bi1clone->hashCode() == bi2->hashCode())
+ errln((UnicodeString)"ERROR: different objects have same hashcodes");
+
+ delete bi1clone;
+ delete bi2clone;
+ delete bi1;
+ delete bi2;
+ delete bi3;
+
+}
+void RBBIAPITest::TestGetSetAdoptText()
+{
+ logln((UnicodeString)"Testing getText setText ");
+ UErrorCode status=U_ZERO_ERROR;
+ UnicodeString str1="first string.";
+ UnicodeString str2="Second string.";
+ RuleBasedBreakIterator* charIter1 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ RuleBasedBreakIterator* wordIter1 = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createWordInstance(Locale::getDefault(), status);
+ if(U_FAILURE(status)){
+ errln((UnicodeString)"FAIL : in construction");
+ return;
+ }
+
+
+ CharacterIterator* text1= new StringCharacterIterator(str1);
+ CharacterIterator* text1Clone = text1->clone();
+ CharacterIterator* text2= new StringCharacterIterator(str2);
+ CharacterIterator* text3= new StringCharacterIterator(str2, 3, 10, 3); // "ond str"
+
+ wordIter1->setText(str1);
+ CharacterIterator *tci = &wordIter1->getText();
+ UnicodeString tstr;
+ tci->getText(tstr);
+ TEST_ASSERT(tstr == str1);
+ if(wordIter1->current() != 0)
+ errln((UnicodeString)"ERROR:1 setText did not set the iteration position to the beginning of the text, it is" + wordIter1->current() + (UnicodeString)"\n");
+
+ wordIter1->next(2);
+
+ wordIter1->setText(str2);
+ if(wordIter1->current() != 0)
+ errln((UnicodeString)"ERROR:2 setText did not reset the iteration position to the beginning of the text, it is" + wordIter1->current() + (UnicodeString)"\n");
+
+
+ charIter1->adoptText(text1Clone);
+ TEST_ASSERT(wordIter1->getText() != charIter1->getText());
+ tci = &wordIter1->getText();
+ tci->getText(tstr);
+ TEST_ASSERT(tstr == str2);
+ tci = &charIter1->getText();
+ tci->getText(tstr);
+ TEST_ASSERT(tstr == str1);
+
+
+ RuleBasedBreakIterator* rb=(RuleBasedBreakIterator*)wordIter1->clone();
+ rb->adoptText(text1);
+ if(rb->getText() != *text1)
+ errln((UnicodeString)"ERROR:1 error in adoptText ");
+ rb->adoptText(text2);
+ if(rb->getText() != *text2)
+ errln((UnicodeString)"ERROR:2 error in adoptText ");
+
+ // Adopt where iterator range is less than the entire orignal source string.
+ // (With the change of the break engine to working with UText internally,
+ // CharacterIterators starting at positions other than zero are not supported)
+ rb->adoptText(text3);
+ TEST_ASSERT(rb->preceding(2) == 0);
+ TEST_ASSERT(rb->following(11) == BreakIterator::DONE);
+ //if(rb->preceding(2) != 3) {
+ // errln((UnicodeString)"ERROR:3 error in adoptText ");
+ //}
+ //if(rb->following(11) != BreakIterator::DONE) {
+ // errln((UnicodeString)"ERROR:4 error in adoptText ");
+ //}
+
+ // UText API
+ //
+ // Quick test to see if UText is working at all.
+ //
+ const char *s1 = "\x68\x65\x6C\x6C\x6F\x20\x77\x6F\x72\x6C\x64"; /* "hello world" in UTF-8 */
+ const char *s2 = "\x73\x65\x65\x20\x79\x61"; /* "see ya" in UTF-8 */
+ // 012345678901
+
+ status = U_ZERO_ERROR;
+ UText *ut = utext_openUTF8(NULL, s1, -1, &status);
+ wordIter1->setText(ut, status);
+ TEST_ASSERT_SUCCESS(status);
+
+ int32_t pos;
+ pos = wordIter1->first();
+ TEST_ASSERT(pos==0);
+ pos = wordIter1->next();
+ TEST_ASSERT(pos==5);
+ pos = wordIter1->next();
+ TEST_ASSERT(pos==6);
+ pos = wordIter1->next();
+ TEST_ASSERT(pos==11);
+ pos = wordIter1->next();
+ TEST_ASSERT(pos==UBRK_DONE);
+
+ status = U_ZERO_ERROR;
+ UText *ut2 = utext_openUTF8(NULL, s2, -1, &status);
+ TEST_ASSERT_SUCCESS(status);
+ wordIter1->setText(ut2, status);
+ TEST_ASSERT_SUCCESS(status);
+
+ pos = wordIter1->first();
+ TEST_ASSERT(pos==0);
+ pos = wordIter1->next();
+ TEST_ASSERT(pos==3);
+ pos = wordIter1->next();
+ TEST_ASSERT(pos==4);
+
+ pos = wordIter1->last();
+ TEST_ASSERT(pos==6);
+ pos = wordIter1->previous();
+ TEST_ASSERT(pos==4);
+ pos = wordIter1->previous();
+ TEST_ASSERT(pos==3);
+ pos = wordIter1->previous();
+ TEST_ASSERT(pos==0);
+ pos = wordIter1->previous();
+ TEST_ASSERT(pos==UBRK_DONE);
+
+ status = U_ZERO_ERROR;
+ UnicodeString sEmpty;
+ UText *gut2 = utext_openUnicodeString(NULL, &sEmpty, &status);
+ wordIter1->getUText(gut2, status);
+ TEST_ASSERT_SUCCESS(status);
+ utext_close(gut2);
+
+ utext_close(ut);
+ utext_close(ut2);
+
+ delete wordIter1;
+ delete charIter1;
+ delete rb;
+
+ }
+
+
+void RBBIAPITest::TestIteration()
+{
+ // This test just verifies that the API is present.
+ // Testing for correct operation of the break rules happens elsewhere.
+
+ UErrorCode status=U_ZERO_ERROR;
+ RuleBasedBreakIterator* bi = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status) || bi == NULL) {
+ errln("Failure creating character break iterator. Status = %s", u_errorName(status));
+ }
+ delete bi;
+
+ status=U_ZERO_ERROR;
+ bi = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createWordInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status) || bi == NULL) {
+ errln("Failure creating Word break iterator. Status = %s", u_errorName(status));
+ }
+ delete bi;
+
+ status=U_ZERO_ERROR;
+ bi = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createLineInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status) || bi == NULL) {
+ errln("Failure creating Line break iterator. Status = %s", u_errorName(status));
+ }
+ delete bi;
+
+ status=U_ZERO_ERROR;
+ bi = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createSentenceInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status) || bi == NULL) {
+ errln("Failure creating Sentence break iterator. Status = %s", u_errorName(status));
+ }
+ delete bi;
+
+ status=U_ZERO_ERROR;
+ bi = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createTitleInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status) || bi == NULL) {
+ errln("Failure creating Title break iterator. Status = %s", u_errorName(status));
+ }
+ delete bi;
+
+ status=U_ZERO_ERROR;
+ bi = (RuleBasedBreakIterator*)RuleBasedBreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status) || bi == NULL) {
+ errln("Failure creating character break iterator. Status = %s", u_errorName(status));
+ return; // Skip the rest of these tests.
+ }
+
+
+ UnicodeString testString="0123456789";
+ bi->setText(testString);
+
+ int32_t i;
+ i = bi->first();
+ if (i != 0) {
+ errln("Incorrect value from bi->first(). Expected 0, got %d.", i);
+ }
+
+ i = bi->last();
+ if (i != 10) {
+ errln("Incorrect value from bi->last(). Expected 10, got %d", i);
+ }
+
+ //
+ // Previous
+ //
+ bi->last();
+ i = bi->previous();
+ if (i != 9) {
+ errln("Incorrect value from bi->last() at line %d. Expected 9, got %d", __LINE__, i);
+ }
+
+
+ bi->first();
+ i = bi->previous();
+ if (i != BreakIterator::DONE) {
+ errln("Incorrect value from bi->previous() at line %d. Expected DONE, got %d", __LINE__, i);
+ }
+
+ //
+ // next()
+ //
+ bi->first();
+ i = bi->next();
+ if (i != 1) {
+ errln("Incorrect value from bi->next() at line %d. Expected 1, got %d", __LINE__, i);
+ }
+
+ bi->last();
+ i = bi->next();
+ if (i != BreakIterator::DONE) {
+ errln("Incorrect value from bi->next() at line %d. Expected DONE, got %d", __LINE__, i);
+ }
+
+
+ //
+ // current()
+ //
+ bi->first();
+ i = bi->current();
+ if (i != 0) {
+ errln("Incorrect value from bi->previous() at line %d. Expected 0, got %d", __LINE__, i);
+ }
+
+ bi->next();
+ i = bi->current();
+ if (i != 1) {
+ errln("Incorrect value from bi->previous() at line %d. Expected 1, got %d", __LINE__, i);
+ }
+
+ bi->last();
+ bi->next();
+ i = bi->current();
+ if (i != 10) {
+ errln("Incorrect value from bi->previous() at line %d. Expected 10, got %d", __LINE__, i);
+ }
+
+ bi->first();
+ bi->previous();
+ i = bi->current();
+ if (i != 0) {
+ errln("Incorrect value from bi->previous() at line %d. Expected 0, got %d", __LINE__, i);
+ }
+
+
+ //
+ // Following()
+ //
+ i = bi->following(4);
+ if (i != 5) {
+ errln("Incorrect value from bi->following() at line %d. Expected 5, got %d", __LINE__, i);
+ }
+
+ i = bi->following(9);
+ if (i != 10) {
+ errln("Incorrect value from bi->following() at line %d. Expected 10, got %d", __LINE__, i);
+ }
+
+ i = bi->following(10);
+ if (i != BreakIterator::DONE) {
+ errln("Incorrect value from bi->following() at line %d. Expected DONE, got %d", __LINE__, i);
+ }
+
+
+ //
+ // Preceding
+ //
+ i = bi->preceding(4);
+ if (i != 3) {
+ errln("Incorrect value from bi->preceding() at line %d. Expected 3, got %d", __LINE__, i);
+ }
+
+ i = bi->preceding(10);
+ if (i != 9) {
+ errln("Incorrect value from bi->preceding() at line %d. Expected 9, got %d", __LINE__, i);
+ }
+
+ i = bi->preceding(1);
+ if (i != 0) {
+ errln("Incorrect value from bi->preceding() at line %d. Expected 0, got %d", __LINE__, i);
+ }
+
+ i = bi->preceding(0);
+ if (i != BreakIterator::DONE) {
+ errln("Incorrect value from bi->preceding() at line %d. Expected DONE, got %d", __LINE__, i);
+ }
+
+
+ //
+ // isBoundary()
+ //
+ bi->first();
+ if (bi->isBoundary(3) != TRUE) {
+ errln("Incorrect value from bi->isBoudary() at line %d. Expected TRUE, got FALSE", __LINE__, i);
+ }
+ i = bi->current();
+ if (i != 3) {
+ errln("Incorrect value from bi->current() at line %d. Expected 3, got %d", __LINE__, i);
+ }
+
+
+ if (bi->isBoundary(11) != FALSE) {
+ errln("Incorrect value from bi->isBoudary() at line %d. Expected FALSE, got TRUE", __LINE__, i);
+ }
+ i = bi->current();
+ if (i != 10) {
+ errln("Incorrect value from bi->current() at line %d. Expected 10, got %d", __LINE__, i);
+ }
+
+ //
+ // next(n)
+ //
+ bi->first();
+ i = bi->next(4);
+ if (i != 4) {
+ errln("Incorrect value from bi->next() at line %d. Expected 4, got %d", __LINE__, i);
+ }
+
+ i = bi->next(6);
+ if (i != 10) {
+ errln("Incorrect value from bi->next() at line %d. Expected 10, got %d", __LINE__, i);
+ }
+
+ bi->first();
+ i = bi->next(11);
+ if (i != BreakIterator::DONE) {
+ errln("Incorrect value from bi->next() at line %d. Expected BreakIterator::DONE, got %d", __LINE__, i);
+ }
+
+ delete bi;
+
+}
+
+
+
+
+
+
+void RBBIAPITest::TestBuilder() {
+ UnicodeString rulesString1 = "$Letters = [:L:];\n"
+ "$Numbers = [:N:];\n"
+ "$Letters+;\n"
+ "$Numbers+;\n"
+ "[^$Letters $Numbers];\n"
+ "!.*;\n";
+ UnicodeString testString1 = "abc123..abc";
+ // 01234567890
+ int32_t bounds1[] = {0, 3, 6, 7, 8, 11};
+ UErrorCode status=U_ZERO_ERROR;
+ UParseError parseError;
+
+ RuleBasedBreakIterator *bi = new RuleBasedBreakIterator(rulesString1, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("FAIL : in construction");
+ } else {
+ bi->setText(testString1);
+ doBoundaryTest(*bi, testString1, bounds1);
+ }
+ delete bi;
+}
+
+
+//
+// TestQuoteGrouping
+// Single quotes within rules imply a grouping, so that a modifier
+// following the quoted text (* or +) applies to all of the quoted chars.
+//
+void RBBIAPITest::TestQuoteGrouping() {
+ UnicodeString rulesString1 = "#Here comes the rule...\n"
+ "'$@!'*;\n" // (\$\@\!)*
+ ".;\n";
+
+ UnicodeString testString1 = "$@!$@!X$@!!X";
+ // 0123456789012
+ int32_t bounds1[] = {0, 6, 7, 10, 11, 12};
+ UErrorCode status=U_ZERO_ERROR;
+ UParseError parseError;
+
+ RuleBasedBreakIterator *bi = new RuleBasedBreakIterator(rulesString1, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("FAIL : in construction");
+ } else {
+ bi->setText(testString1);
+ doBoundaryTest(*bi, testString1, bounds1);
+ }
+ delete bi;
+}
+
+//
+// TestRuleStatus
+// Test word break rule status constants.
+//
+void RBBIAPITest::TestRuleStatus() {
+ UChar str[30];
+ u_unescape("plain word 123.45 \\u9160\\u9161 \\u30a1\\u30a2 \\u3041\\u3094",
+ // 012345678901234567 8 9 0 1 2 3 4 5 6
+ // Ideographic Katakana Hiragana
+ str, 30);
+ UnicodeString testString1(str);
+ int32_t bounds1[] = {0, 5, 6, 10, 11, 17, 18, 19, 20, 21, 23, 24, 25, 26};
+ int32_t tag_lo[] = {UBRK_WORD_NONE, UBRK_WORD_LETTER, UBRK_WORD_NONE, UBRK_WORD_LETTER,
+ UBRK_WORD_NONE, UBRK_WORD_NUMBER, UBRK_WORD_NONE,
+ UBRK_WORD_IDEO, UBRK_WORD_IDEO, UBRK_WORD_NONE,
+ UBRK_WORD_KANA, UBRK_WORD_NONE, UBRK_WORD_KANA, UBRK_WORD_KANA};
+
+ int32_t tag_hi[] = {UBRK_WORD_NONE_LIMIT, UBRK_WORD_LETTER_LIMIT, UBRK_WORD_NONE_LIMIT, UBRK_WORD_LETTER_LIMIT,
+ UBRK_WORD_NONE_LIMIT, UBRK_WORD_NUMBER_LIMIT, UBRK_WORD_NONE_LIMIT,
+ UBRK_WORD_IDEO_LIMIT, UBRK_WORD_IDEO_LIMIT, UBRK_WORD_NONE_LIMIT,
+ UBRK_WORD_KANA_LIMIT, UBRK_WORD_NONE_LIMIT, UBRK_WORD_KANA_LIMIT, UBRK_WORD_KANA_LIMIT};
+
+ UErrorCode status=U_ZERO_ERROR;
+
+ RuleBasedBreakIterator *bi = (RuleBasedBreakIterator *)BreakIterator::createWordInstance(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("FAIL : in construction");
+ } else {
+ bi->setText(testString1);
+ // First test that the breaks are in the right spots.
+ doBoundaryTest(*bi, testString1, bounds1);
+
+ // Then go back and check tag values
+ int32_t i = 0;
+ int32_t pos, tag;
+ for (pos = bi->first(); pos != BreakIterator::DONE; pos = bi->next(), i++) {
+ if (pos != bounds1[i]) {
+ errln("FAIL: unexpected word break at postion %d", pos);
+ break;
+ }
+ tag = bi->getRuleStatus();
+ if (tag < tag_lo[i] || tag >= tag_hi[i]) {
+ errln("FAIL: incorrect tag value %d at position %d", tag, pos);
+ break;
+ }
+
+ // Check that we get the same tag values from getRuleStatusVec()
+ int32_t vec[10];
+ int t = bi->getRuleStatusVec(vec, 10, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(t==1);
+ TEST_ASSERT(vec[0] == tag);
+ }
+ }
+ delete bi;
+
+ // Now test line break status. This test mostly is to confirm that the status constants
+ // are correctly declared in the header.
+ testString1 = "test line. \n";
+ // break type s s h
+
+ bi = (RuleBasedBreakIterator *)
+ BreakIterator::createLineInstance(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("failed to create word break iterator.");
+ } else {
+ int32_t i = 0;
+ int32_t pos, tag;
+ UBool success;
+
+ bi->setText(testString1);
+ pos = bi->current();
+ tag = bi->getRuleStatus();
+ for (i=0; i<3; i++) {
+ switch (i) {
+ case 0:
+ success = pos==0 && tag==UBRK_LINE_SOFT; break;
+ case 1:
+ success = pos==5 && tag==UBRK_LINE_SOFT; break;
+ case 2:
+ success = pos==12 && tag==UBRK_LINE_HARD; break;
+ default:
+ success = FALSE; break;
+ }
+ if (success == FALSE) {
+ errln("Fail: incorrect word break status or position. i=%d, pos=%d, tag=%d",
+ i, pos, tag);
+ break;
+ }
+ pos = bi->next();
+ tag = bi->getRuleStatus();
+ }
+ if (UBRK_LINE_SOFT >= UBRK_LINE_SOFT_LIMIT ||
+ UBRK_LINE_HARD >= UBRK_LINE_HARD_LIMIT ||
+ UBRK_LINE_HARD > UBRK_LINE_SOFT && UBRK_LINE_HARD < UBRK_LINE_SOFT_LIMIT ) {
+ errln("UBRK_LINE_* constants from header are inconsistent.");
+ }
+ }
+ delete bi;
+
+}
+
+
+//
+// TestRuleStatusVec
+// Test the vector form of break rule status.
+//
+void RBBIAPITest::TestRuleStatusVec() {
+ UnicodeString rulesString = "[A-N]{100}; \n"
+ "[a-w]{200}; \n"
+ "[\\p{L}]{300}; \n"
+ "[\\p{N}]{400}; \n"
+ "[0-5]{500}; \n"
+ "!.*;\n";
+ UnicodeString testString1 = "Aapz5?";
+ int32_t statusVals[10];
+ int32_t numStatuses;
+ int32_t pos;
+
+ UErrorCode status=U_ZERO_ERROR;
+ UParseError parseError;
+
+ RuleBasedBreakIterator *bi = new RuleBasedBreakIterator(rulesString, parseError, status);
+ TEST_ASSERT_SUCCESS(status);
+ if (U_SUCCESS(status)) {
+ bi->setText(testString1);
+
+ // A
+ pos = bi->next();
+ TEST_ASSERT(pos==1);
+ numStatuses = bi->getRuleStatusVec(statusVals, 10, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numStatuses == 2);
+ TEST_ASSERT(statusVals[0] == 100);
+ TEST_ASSERT(statusVals[1] == 300);
+
+ // a
+ pos = bi->next();
+ TEST_ASSERT(pos==2);
+ numStatuses = bi->getRuleStatusVec(statusVals, 10, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numStatuses == 2);
+ TEST_ASSERT(statusVals[0] == 200);
+ TEST_ASSERT(statusVals[1] == 300);
+
+ // p
+ pos = bi->next();
+ TEST_ASSERT(pos==3);
+ numStatuses = bi->getRuleStatusVec(statusVals, 10, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numStatuses == 2);
+ TEST_ASSERT(statusVals[0] == 200);
+ TEST_ASSERT(statusVals[1] == 300);
+
+ // z
+ pos = bi->next();
+ TEST_ASSERT(pos==4);
+ numStatuses = bi->getRuleStatusVec(statusVals, 10, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numStatuses == 1);
+ TEST_ASSERT(statusVals[0] == 300);
+
+ // 5
+ pos = bi->next();
+ TEST_ASSERT(pos==5);
+ numStatuses = bi->getRuleStatusVec(statusVals, 10, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numStatuses == 2);
+ TEST_ASSERT(statusVals[0] == 400);
+ TEST_ASSERT(statusVals[1] == 500);
+
+ // ?
+ pos = bi->next();
+ TEST_ASSERT(pos==6);
+ numStatuses = bi->getRuleStatusVec(statusVals, 10, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numStatuses == 1);
+ TEST_ASSERT(statusVals[0] == 0);
+
+ //
+ // Check buffer overflow error handling. Char == A
+ //
+ bi->first();
+ pos = bi->next();
+ TEST_ASSERT(pos==1);
+ memset(statusVals, -1, sizeof(statusVals));
+ numStatuses = bi->getRuleStatusVec(statusVals, 0, status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(numStatuses == 2);
+ TEST_ASSERT(statusVals[0] == -1);
+
+ status = U_ZERO_ERROR;
+ memset(statusVals, -1, sizeof(statusVals));
+ numStatuses = bi->getRuleStatusVec(statusVals, 1, status);
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ TEST_ASSERT(numStatuses == 2);
+ TEST_ASSERT(statusVals[0] == 100);
+ TEST_ASSERT(statusVals[1] == -1);
+
+ status = U_ZERO_ERROR;
+ memset(statusVals, -1, sizeof(statusVals));
+ numStatuses = bi->getRuleStatusVec(statusVals, 2, status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(numStatuses == 2);
+ TEST_ASSERT(statusVals[0] == 100);
+ TEST_ASSERT(statusVals[1] == 300);
+ TEST_ASSERT(statusVals[2] == -1);
+ }
+ delete bi;
+
+}
+
+//
+// Bug 2190 Regression test. Builder crash on rule consisting of only a
+// $variable reference
+void RBBIAPITest::TestBug2190() {
+ UnicodeString rulesString1 = "$aaa = abcd;\n"
+ "$bbb = $aaa;\n"
+ "$bbb;\n";
+ UnicodeString testString1 = "abcdabcd";
+ // 01234567890
+ int32_t bounds1[] = {0, 4, 8};
+ UErrorCode status=U_ZERO_ERROR;
+ UParseError parseError;
+
+ RuleBasedBreakIterator *bi = new RuleBasedBreakIterator(rulesString1, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("FAIL : in construction");
+ } else {
+ bi->setText(testString1);
+ doBoundaryTest(*bi, testString1, bounds1);
+ }
+ delete bi;
+}
+
+
+void RBBIAPITest::TestRegistration() {
+#if !UCONFIG_NO_SERVICE
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIterator* ja_word = BreakIterator::createWordInstance("ja_JP", status);
+
+ // ok to not delete these if we exit because of error?
+ BreakIterator* ja_char = BreakIterator::createCharacterInstance("ja_JP", status);
+ BreakIterator* root_word = BreakIterator::createWordInstance("", status);
+ BreakIterator* root_char = BreakIterator::createCharacterInstance("", status);
+
+ URegistryKey key = BreakIterator::registerInstance(ja_word, "xx", UBRK_WORD, status);
+ {
+ if (ja_word && *ja_word == *root_word) {
+ errln("japan not different from root");
+ }
+ }
+
+ {
+ BreakIterator* result = BreakIterator::createWordInstance("xx_XX", status);
+ UBool fail = TRUE;
+ if(result){
+ fail = *result != *ja_word;
+ }
+ delete result;
+ if (fail) {
+ errln("bad result for xx_XX/word");
+ }
+ }
+
+ {
+ BreakIterator* result = BreakIterator::createCharacterInstance("ja_JP", status);
+ UBool fail = TRUE;
+ if(result){
+ fail = *result != *ja_char;
+ }
+ delete result;
+ if (fail) {
+ errln("bad result for ja_JP/char");
+ }
+ }
+
+ {
+ BreakIterator* result = BreakIterator::createCharacterInstance("xx_XX", status);
+ UBool fail = TRUE;
+ if(result){
+ fail = *result != *root_char;
+ }
+ delete result;
+ if (fail) {
+ errln("bad result for xx_XX/char");
+ }
+ }
+
+ {
+ StringEnumeration* avail = BreakIterator::getAvailableLocales();
+ UBool found = FALSE;
+ const UnicodeString* p;
+ while ((p = avail->snext(status))) {
+ if (p->compare("xx") == 0) {
+ found = TRUE;
+ break;
+ }
+ }
+ delete avail;
+ if (!found) {
+ errln("did not find test locale");
+ }
+ }
+
+ {
+ UBool unreg = BreakIterator::unregister(key, status);
+ if (!unreg) {
+ errln("unable to unregister");
+ }
+ }
+
+ {
+ BreakIterator* result = BreakIterator::createWordInstance("en_US", status);
+ BreakIterator* root = BreakIterator::createWordInstance("", status);
+ UBool fail = TRUE;
+ if(root){
+ fail = *root != *result;
+ }
+ delete root;
+ delete result;
+ if (fail) {
+ errln("did not get root break");
+ }
+ }
+
+ {
+ StringEnumeration* avail = BreakIterator::getAvailableLocales();
+ UBool found = FALSE;
+ const UnicodeString* p;
+ while ((p = avail->snext(status))) {
+ if (p->compare("xx") == 0) {
+ found = TRUE;
+ break;
+ }
+ }
+ delete avail;
+ if (found) {
+ errln("found test locale");
+ }
+ }
+
+ {
+ int32_t count;
+ UBool foundLocale = FALSE;
+ const Locale *avail = BreakIterator::getAvailableLocales(count);
+ for (int i=0; i<count; i++) {
+ if (avail[i] == Locale::getEnglish()) {
+ foundLocale = TRUE;
+ break;
+ }
+ }
+ if (foundLocale == FALSE) {
+ errln("BreakIterator::getAvailableLocales(&count), failed to find EN.");
+ }
+ }
+
+
+ // ja_word was adopted by factory
+ delete ja_char;
+ delete root_word;
+ delete root_char;
+#endif
+}
+
+void RBBIAPITest::RoundtripRule(const char *dataFile) {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ parseError.line = 0;
+ parseError.offset = 0;
+ UDataMemory *data = udata_open(U_ICUDATA_BRKITR, "brk", dataFile, &status);
+ uint32_t length;
+ const UChar *builtSource;
+ const uint8_t *rbbiRules;
+ const uint8_t *builtRules;
+
+ if (U_FAILURE(status)) {
+ errln("Can't open \"%s\"", dataFile);
+ return;
+ }
+
+ builtRules = (const uint8_t *)udata_getMemory(data);
+ builtSource = (const UChar *)(builtRules + ((RBBIDataHeader*)builtRules)->fRuleSource);
+ RuleBasedBreakIterator *brkItr = new RuleBasedBreakIterator(builtSource, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("createRuleBasedBreakIterator: ICU Error \"%s\" at line %d, column %d\n",
+ u_errorName(status), parseError.line, parseError.offset);
+ return;
+ };
+ rbbiRules = brkItr->getBinaryRules(length);
+ logln("Comparing \"%s\" len=%d", dataFile, length);
+ if (memcmp(builtRules, rbbiRules, (int32_t)length) != 0) {
+ errln("Built rules and rebuilt rules are different %s", dataFile);
+ return;
+ }
+ delete brkItr;
+ udata_close(data);
+}
+
+void RBBIAPITest::TestRoundtripRules() {
+ RoundtripRule("word");
+ RoundtripRule("title");
+ RoundtripRule("sent");
+ RoundtripRule("line");
+ RoundtripRule("char");
+ if (!quick) {
+ RoundtripRule("word_ja");
+ RoundtripRule("word_POSIX");
+ }
+}
+
+//---------------------------------------------
+// runIndexedTest
+//---------------------------------------------
+
+void RBBIAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln((UnicodeString)"TestSuite RuleBasedBreakIterator API ");
+ switch (index) {
+ // case 0: name = "TestConstruction"; if (exec) TestConstruction(); break;
+ case 0: name = "TestCloneEquals"; if (exec) TestCloneEquals(); break;
+ case 1: name = "TestgetRules"; if (exec) TestgetRules(); break;
+ case 2: name = "TestHashCode"; if (exec) TestHashCode(); break;
+ case 3: name = "TestGetSetAdoptText"; if (exec) TestGetSetAdoptText(); break;
+ case 4: name = "TestIteration"; if (exec) TestIteration(); break;
+ case 5: name = "TestBuilder"; if (exec) TestBuilder(); break;
+ case 6: name = "TestQuoteGrouping"; if (exec) TestQuoteGrouping(); break;
+ case 7: name = "TestRuleStatus"; if (exec) TestRuleStatus(); break;
+ case 8: name = "TestRuleStatusVec"; if (exec) TestRuleStatusVec(); break;
+ case 9: name = "TestBug2190"; if (exec) TestBug2190(); break;
+ case 10: name = "TestRegistration"; if (exec) TestRegistration(); break;
+ case 11: name = "TestBoilerPlate"; if (exec) TestBoilerPlate(); break;
+ case 12: name = "TestRoundtripRules"; if (exec) TestRoundtripRules(); break;
+
+ default: name = ""; break; // needed to end loop
+ }
+}
+
+//---------------------------------------------
+//Internal subroutines
+//---------------------------------------------
+
+void RBBIAPITest::doBoundaryTest(RuleBasedBreakIterator& bi, UnicodeString& text, int32_t *boundaries){
+ logln((UnicodeString)"testIsBoundary():");
+ int32_t p = 0;
+ UBool isB;
+ for (int32_t i = 0; i < text.length(); i++) {
+ isB = bi.isBoundary(i);
+ logln((UnicodeString)"bi.isBoundary(" + i + ") -> " + isB);
+
+ if (i == boundaries[p]) {
+ if (!isB)
+ errln((UnicodeString)"Wrong result from isBoundary() for " + i + (UnicodeString)": expected true, got false");
+ p++;
+ }
+ else {
+ if (isB)
+ errln((UnicodeString)"Wrong result from isBoundary() for " + i + (UnicodeString)": expected false, got true");
+ }
+ }
+}
+void RBBIAPITest::doTest(UnicodeString& testString, int32_t start, int32_t gotoffset, int32_t expectedOffset, const char* expectedString){
+ UnicodeString selected;
+ UnicodeString expected=CharsToUnicodeString(expectedString);
+
+ if(gotoffset != expectedOffset)
+ errln((UnicodeString)"ERROR:****returned #" + gotoffset + (UnicodeString)" instead of #" + expectedOffset);
+ if(start <= gotoffset){
+ testString.extractBetween(start, gotoffset, selected);
+ }
+ else{
+ testString.extractBetween(gotoffset, start, selected);
+ }
+ if(selected.compare(expected) != 0)
+ errln(prettify((UnicodeString)"ERROR:****selected \"" + selected + "\" instead of \"" + expected + "\""));
+ else
+ logln(prettify("****selected \"" + selected + "\""));
+}
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.h b/Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.h
new file mode 100644
index 00000000000..ae759248cea
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/rbbiapts.h
@@ -0,0 +1,97 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1999-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* Date Name Description
+* 12/14/99 Madhu Creation.
+************************************************************************/
+
+
+
+#ifndef RBBIAPITEST_H
+#define RBBIAPITEST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "intltest.h"
+#include "unicode/rbbi.h"
+
+/**
+ * API Test the RuleBasedBreakIterator class
+ */
+class RBBIAPITest: public IntlTest {
+public:
+
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ /**
+ * Tests Constructor behaviour of RuleBasedBreakIterator
+ **/
+ // void TestConstruction(void);
+ /**
+ * Tests clone() and equals() methods of RuleBasedBreakIterator
+ **/
+ void TestCloneEquals();
+ /**
+ * Tests toString() method of RuleBasedBreakIterator
+ **/
+ void TestgetRules();
+ /**
+ * Tests the method hashCode() of RuleBasedBreakIterator
+ **/
+ void TestHashCode();
+ /**
+ * Tests the methods getText() and setText() of RuleBasedBreakIterator
+ **/
+ void TestGetSetAdoptText();
+ /**
+ * Testing the iteration methods of RuleBasedBreakIterator
+ **/
+ void TestIteration(void);
+
+
+ /**
+ * Tests creating RuleBasedBreakIterator from rules strings.
+ **/
+ void TestBuilder(void);
+
+ void TestRoundtripRules(void);
+
+ void RoundtripRule(const char *dataFile);
+
+ /**
+ * Tests grouping effect of 'single quotes' in rules.
+ **/
+ void TestQuoteGrouping();
+
+ /**
+ * Tests word break status returns.
+ */
+ void TestRuleStatus();
+ void TestRuleStatusVec();
+
+ void TestBug2190();
+
+ void TestBoilerPlate();
+
+ void TestRegistration();
+
+ /**
+ *Internal subroutines
+ **/
+ /* Internal subroutine used by TestIsBoundary() */
+ void doBoundaryTest(RuleBasedBreakIterator& bi, UnicodeString& text, int32_t *boundaries);
+
+ /*Internal subroutine used for comparision of expected and acquired results */
+ void doTest(UnicodeString& testString, int32_t start, int32_t gotoffset, int32_t expectedOffset, const char* expected);
+
+
+};
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.cpp
new file mode 100644
index 00000000000..4a2453f0b5a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.cpp
@@ -0,0 +1,4287 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1999-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* Date Name Description
+* 12/15/99 Madhu Creation.
+* 01/12/2000 Madhu Updated for changed API and added new tests
+************************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "unicode/utypes.h"
+#include "unicode/brkiter.h"
+#include "unicode/rbbi.h"
+#include "unicode/uchar.h"
+#include "unicode/utf16.h"
+#include "unicode/ucnv.h"
+#include "unicode/schriter.h"
+#include "unicode/uniset.h"
+#include "unicode/regex.h" // TODO: make conditional on regexp being built.
+#include "unicode/ustring.h"
+#include "unicode/utext.h"
+#include "intltest.h"
+#include "rbbitst.h"
+#include <string.h>
+#include "uvector.h"
+#include "uvectr32.h"
+#include "triedict.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define TEST_ASSERT(x) {if (!(x)) { \
+ errln("Failure in file %s, line %d", __FILE__, __LINE__);}}
+
+#define TEST_ASSERT_SUCCESS(errcode) {if (U_FAILURE(errcode)) { \
+ errln("Failure in file %s, line %d, status = \"%s\"", __FILE__, __LINE__, u_errorName(errcode));}}
+
+
+//---------------------------------------------
+// runIndexedTest
+//---------------------------------------------
+
+void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* params )
+{
+ if (exec) logln("TestSuite RuleBasedBreakIterator: ");
+
+ switch (index) {
+ case 0: name = "TestBug4153072";
+ if(exec) TestBug4153072(); break;
+ case 1: name = "TestJapaneseLineBreak";
+ if(exec) TestJapaneseLineBreak(); break;
+ case 2: name = "TestStatusReturn";
+ if(exec) TestStatusReturn(); break;
+ case 3: name = "TestUnicodeFiles";
+ if(exec) TestUnicodeFiles(); break;
+ case 4: name = "TestEmptyString";
+ if(exec) TestEmptyString(); break;
+
+ case 5: name = "TestGetAvailableLocales";
+ if(exec) TestGetAvailableLocales(); break;
+
+ case 6: name = "TestGetDisplayName";
+ if(exec) TestGetDisplayName(); break;
+
+ case 7: name = "TestEndBehaviour";
+ if(exec) TestEndBehaviour(); break;
+ case 8: name = "TestMixedThaiLineBreak";
+ if(exec) TestMixedThaiLineBreak(); break;
+ case 9: name = "TestThaiLineBreak";
+ if(exec) TestThaiLineBreak(); break;
+ case 10: name = "TestMaiyamok";
+ if(exec) TestMaiyamok(); break;
+ case 11: name = "TestWordBreaks";
+ if(exec) TestWordBreaks(); break;
+ case 12: name = "TestWordBoundary";
+ if(exec) TestWordBoundary(); break;
+ case 13: name = "TestLineBreaks";
+ if(exec) TestLineBreaks(); break;
+ case 14: name = "TestSentBreaks";
+ if(exec) TestSentBreaks(); break;
+ case 15: name = "TestExtended";
+ if(exec) TestExtended(); break;
+ case 16: name = "TestMonkey";
+ if(exec) {
+ #if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ TestMonkey(params);
+ #else
+ logln("skipping TestMonkey (UCONFIG_NO_REGULAR_EXPRESSIONS)");
+ #endif
+ }
+ break;
+ case 17: name = "TestBug3818";
+ if(exec) TestBug3818(); break;
+ case 18: name = "TestJapaneseWordBreak";
+ if(exec) TestJapaneseWordBreak(); break;
+ case 19: name = "TestDebug";
+ if(exec) TestDebug(); break;
+ case 20: name = "TestTrieDict";
+ if(exec) TestTrieDict(); break;
+ case 21: name = "TestBug5775";
+ if (exec) TestBug5775(); break;
+
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+
+//---------------------------------------------------------------------------
+//
+// class BITestData Holds a set of Break iterator test data and results
+// Includes
+// - the string data to be broken
+// - a vector of the expected break positions.
+// - a vector of source line numbers for the data,
+// (to help see where errors occured.)
+// - The expected break tag values.
+// - Vectors of actual break positions and tag values.
+// - Functions for comparing actual with expected and
+// reporting errors.
+//
+//----------------------------------------------------------------------------
+class BITestData {
+public:
+ UnicodeString fDataToBreak;
+ UVector fExpectedBreakPositions;
+ UVector fExpectedTags;
+ UVector fLineNum;
+ UVector fActualBreakPositions; // Test Results.
+ UVector fActualTags;
+
+ BITestData(UErrorCode &status);
+ void addDataChunk(const char *data, int32_t tag, int32_t lineNum, UErrorCode status);
+ void checkResults(const char *heading, RBBITest *test);
+ void err(const char *heading, RBBITest *test, int32_t expectedIdx, int32_t actualIdx);
+ void clearResults();
+};
+
+//
+// Constructor.
+//
+BITestData::BITestData(UErrorCode &status)
+: fExpectedBreakPositions(status), fExpectedTags(status), fLineNum(status), fActualBreakPositions(status),
+ fActualTags(status)
+{
+}
+
+//
+// addDataChunk. Add a section (non-breaking) piece if data to the test data.
+// The macro form collects the line number, which is helpful
+// when tracking down failures.
+//
+// A null data item is inserted at the start of each test's data
+// to put the starting zero into the data list. The position saved for
+// each non-null item is its ending position.
+//
+#define ADD_DATACHUNK(td, data, tag, status) td.addDataChunk(data, tag, __LINE__, status);
+void BITestData::addDataChunk(const char *data, int32_t tag, int32_t lineNum, UErrorCode status) {
+ if (U_FAILURE(status)) {return;}
+ if (data != NULL) {
+ fDataToBreak.append(CharsToUnicodeString(data));
+ }
+ fExpectedBreakPositions.addElement(fDataToBreak.length(), status);
+ fExpectedTags.addElement(tag, status);
+ fLineNum.addElement(lineNum, status);
+}
+
+
+//
+// checkResults. Compare the actual and expected break positions, report any differences.
+//
+void BITestData::checkResults(const char *heading, RBBITest *test) {
+ int32_t expectedIndex = 0;
+ int32_t actualIndex = 0;
+
+ for (;;) {
+ // If we've run through both the expected and actual results vectors, we're done.
+ // break out of the loop.
+ if (expectedIndex >= fExpectedBreakPositions.size() &&
+ actualIndex >= fActualBreakPositions.size()) {
+ break;
+ }
+
+
+ if (expectedIndex >= fExpectedBreakPositions.size()) {
+ err(heading, test, expectedIndex-1, actualIndex);
+ actualIndex++;
+ continue;
+ }
+
+ if (actualIndex >= fActualBreakPositions.size()) {
+ err(heading, test, expectedIndex, actualIndex-1);
+ expectedIndex++;
+ continue;
+ }
+
+ if (fActualBreakPositions.elementAti(actualIndex) != fExpectedBreakPositions.elementAti(expectedIndex)) {
+ err(heading, test, expectedIndex, actualIndex);
+ // Try to resync the positions of the indices, to avoid a rash of spurious erros.
+ if (fActualBreakPositions.elementAti(actualIndex) < fExpectedBreakPositions.elementAti(expectedIndex)) {
+ actualIndex++;
+ } else {
+ expectedIndex++;
+ }
+ continue;
+ }
+
+ if (fActualTags.elementAti(actualIndex) != fExpectedTags.elementAti(expectedIndex)) {
+ test->errln("%s, tag mismatch. Test Line = %d, expected tag=%d, got %d",
+ heading, fLineNum.elementAt(expectedIndex),
+ fExpectedTags.elementAti(expectedIndex), fActualTags.elementAti(actualIndex));
+ }
+
+ actualIndex++;
+ expectedIndex++;
+ }
+}
+
+//
+// err - An error was found. Report it, along with information about where the
+// incorrectly broken test data appeared in the source file.
+//
+void BITestData::err(const char *heading, RBBITest *test, int32_t expectedIdx, int32_t actualIdx)
+{
+ int32_t expected = fExpectedBreakPositions.elementAti(expectedIdx);
+ int32_t actual = fActualBreakPositions.elementAti(actualIdx);
+ int32_t o = 0;
+ int32_t line = fLineNum.elementAti(expectedIdx);
+ if (expectedIdx > 0) {
+ // The line numbers are off by one because a premature break occurs somewhere
+ // within the previous item, rather than at the start of the current (expected) item.
+ // We want to report the offset of the unexpected break from the start of
+ // this previous item.
+ o = actual - fExpectedBreakPositions.elementAti(expectedIdx-1);
+ }
+ if (actual < expected) {
+ test->errln("%s unexpected break at offset %d in test item from line %d", heading, o, line);
+ } else {
+ test->errln("%s Failed to find break at end of item from line %d", heading, line);
+ }
+}
+
+
+void BITestData::clearResults() {
+ fActualBreakPositions.removeAllElements();
+ fActualTags.removeAllElements();
+}
+
+
+//-----------------------------------------------------------------------------------
+//
+// Cannned Test Characters
+//
+//-----------------------------------------------------------------------------------
+
+static const UChar cannedTestArray[] = {
+ 0x0001, 0x0002, 0x0003, 0x0004, 0x0020, 0x0021, '\\', 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0028, 0x0029, 0x002b, 0x002d, 0x0030, 0x0031,
+ 0x0032, 0x0033, 0x0034, 0x003c, 0x003d, 0x003e, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x005b, 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x007b,
+ 0x007d, 0x007c, 0x002c, 0x00a0, 0x00a2,
+ 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00ab, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b2, 0x00b3,
+ 0x00b4, 0x00b9, 0x00bb, 0x00bc, 0x00bd, 0x02b0, 0x02b1, 0x02b2, 0x02b3, 0x02b4, 0x0300, 0x0301, 0x0302, 0x0303,
+ 0x0304, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x0903, 0x093e, 0x093f, 0x0940, 0x0949, 0x0f3a, 0x0f3b, 0x2000,
+ 0x2001, 0x2002, 0x200c, 0x200d, 0x200e, 0x200f, 0x2010, 0x2011, 0x2012, 0x2028, 0x2029, 0x202a, 0x203e, 0x203f,
+ 0x2040, 0x20dd, 0x20de, 0x20df, 0x20e0, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x0000
+};
+
+static UnicodeString* cannedTestChars = 0;
+
+#define halfNA "\\u0928\\u094d\\u200d"
+#define halfSA "\\u0938\\u094d\\u200d"
+#define halfCHA "\\u091a\\u094d\\u200d"
+#define halfKA "\\u0915\\u094d\\u200d"
+#define deadTA "\\u0924\\u094d"
+
+//--------------------------------------------------------------------------------------
+//
+// RBBITest constructor and destructor
+//
+//--------------------------------------------------------------------------------------
+
+RBBITest::RBBITest() {
+ UnicodeString temp(cannedTestArray);
+ cannedTestChars = new UnicodeString();
+ *cannedTestChars += (UChar)0x0000;
+ *cannedTestChars += temp;
+}
+
+
+RBBITest::~RBBITest() {
+ delete cannedTestChars;
+}
+
+
+static const int T_NUMBER = 100;
+static const int T_LETTER = 200;
+static const int T_H_OR_K = 300;
+static const int T_IDEO = 400;
+
+
+
+
+
+
+//--------------------------------------------------------------------
+//Testing the BreakIterator for devanagari script
+//--------------------------------------------------------------------
+
+#define deadRA "\\u0930\\u094d" /*deadform RA = devanagari RA + virama*/
+#define deadPHA "\\u092b\\u094d" /*deadform PHA = devanagari PHA + virama*/
+#define deadTTHA "\\u0920\\u094d"
+#define deadPA "\\u092a\\u094d"
+#define deadSA "\\u0938\\u094d"
+#define visarga "\\u0903" /*devanagari visarga looks like a english colon*/
+
+
+
+
+
+
+//-----------------------------------------------------------------------------------
+//
+// Test for status {tag} return value from break rules.
+// TODO: a more thorough test.
+//
+//-----------------------------------------------------------------------------------
+void RBBITest::TestStatusReturn() {
+ UnicodeString rulesString1 = "$Letters = [:L:];\n"
+ "$Numbers = [:N:];\n"
+ "$Letters+{1};\n"
+ "$Numbers+{2};\n"
+ "Help\\ {4}/me\\!;\n"
+ "[^$Letters $Numbers];\n"
+ "!.*;\n";
+ UnicodeString testString1 = "abc123..abc Help me Help me!";
+ // 01234567890123456789012345678
+ int32_t bounds1[] = {0, 3, 6, 7, 8, 11, 12, 16, 17, 19, 20, 25, 27, 28, -1};
+ int32_t brkStatus[] = {0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 4, 1, 0, -1};
+
+ UErrorCode status=U_ZERO_ERROR;
+ UParseError parseError;
+
+ RuleBasedBreakIterator *bi = new RuleBasedBreakIterator(rulesString1, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("FAIL : in construction");
+ } else {
+ int32_t pos;
+ int32_t i = 0;
+ bi->setText(testString1);
+ for (pos=bi->first(); pos!= BreakIterator::DONE; pos=bi->next()) {
+ if (pos != bounds1[i]) {
+ errln("FAIL: expected break at %d, got %d\n", bounds1[i], pos);
+ break;
+ }
+
+ int tag = bi->getRuleStatus();
+ if (tag != brkStatus[i]) {
+ errln("FAIL: break at %d, expected tag %d, got tag %d\n", pos, brkStatus[i], tag);
+ break;
+ }
+ i++;
+ }
+ }
+ delete bi;
+}
+
+
+static void printStringBreaks(UnicodeString ustr, int expected[],
+ int expectedcount)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ char name[100];
+ printf("code alpha extend alphanum type word sent line name\n");
+ int j;
+ for (j = 0; j < ustr.length(); j ++) {
+ if (expectedcount > 0) {
+ int k;
+ for (k = 0; k < expectedcount; k ++) {
+ if (j == expected[k]) {
+ printf("------------------------------------------------ %d\n",
+ j);
+ }
+ }
+ }
+ UChar32 c = ustr.char32At(j);
+ if (c > 0xffff) {
+ j ++;
+ }
+ u_charName(c, U_UNICODE_CHAR_NAME, name, 100, &status);
+ printf("%7x %5d %6d %8d %4s %4s %4s %4s %s\n", (int)c,
+ u_isUAlphabetic(c),
+ u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND),
+ u_isalnum(c),
+ u_getPropertyValueName(UCHAR_GENERAL_CATEGORY,
+ u_charType(c),
+ U_SHORT_PROPERTY_NAME),
+ u_getPropertyValueName(UCHAR_WORD_BREAK,
+ u_getIntPropertyValue(c,
+ UCHAR_WORD_BREAK),
+ U_SHORT_PROPERTY_NAME),
+ u_getPropertyValueName(UCHAR_SENTENCE_BREAK,
+ u_getIntPropertyValue(c,
+ UCHAR_SENTENCE_BREAK),
+ U_SHORT_PROPERTY_NAME),
+ u_getPropertyValueName(UCHAR_LINE_BREAK,
+ u_getIntPropertyValue(c,
+ UCHAR_LINE_BREAK),
+ U_SHORT_PROPERTY_NAME),
+ name);
+ }
+}
+
+void RBBITest::TestThaiLineBreak() {
+ UErrorCode status = U_ZERO_ERROR;
+ BITestData thaiLineSelection(status);
+
+ // \u0e2f-- the Thai paiyannoi character-- isn't a letter. It's a symbol that
+ // represents elided letters at the end of a long word. It should be bound to
+ // the end of the word and not treated as an independent punctuation mark.
+
+
+ ADD_DATACHUNK(thaiLineSelection, NULL, 0, status); // Break at start of data
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e2a\\u0e16\\u0e32\\u0e19\\u0e35\\u0e2f", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e08\\u0e30", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e30\\u0e14\\u0e21", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e08\\u0e49\\u0e32", 0, status);
+// ADD_DATACHUNK(thaiLineSelection, "\\u0e2b\\u0e19\\u0e49\\u0e32", 0, status);
+// ADD_DATACHUNK(thaiLineSelection, "\\u0e17\\u0e35\\u0e48", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e2b\\u0e19\\u0e49\\u0e32\\u0e17\\u0e35\\u0e48", 0, status);
+ // the commented-out lines (I think) are the preferred result; this line is what our current dictionary is giving us
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e2d\\u0e2d\\u0e01", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e21\\u0e32", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e23\\u0e48\\u0e07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e30\\u0e1a\\u0e32\\u0e22", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e2d\\u0e22\\u0e48\\u0e32\\u0e07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e15\\u0e47\\u0e21", 0, status);
+
+ // the one time where the paiyannoi occurs somewhere other than at the end
+ // of a word is in the Thai abbrevation for "etc.", which both begins and
+ // ends with a paiyannoi
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e2f\\u0e25\\u0e2f", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e17\\u0e35\\u0e48", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e19\\u0e31\\u0e49\\u0e19", 0, status);
+
+ RuleBasedBreakIterator* e = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(
+ Locale("th"), status);
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for Thai locale in TestThaiLineBreak.\n");
+ return;
+ }
+
+ generalIteratorTest(*e, thaiLineSelection);
+ delete e;
+}
+
+
+
+void RBBITest::TestMixedThaiLineBreak()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ BITestData thaiLineSelection(status);
+
+ ADD_DATACHUNK(thaiLineSelection, NULL, 0, status); // Break at start of data
+
+
+ // @suwit -- Test Arabic numerals, Thai numerals, Punctuation and English characters
+ // start
+
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E1B\\u0E35", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E1E\\u0E38\\u0E17\\u0E18\\u0E28\\u0E31\\u0E01\\u0E23\\u0E32\\u0E0A ", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "2545 ", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E40\\u0E1B\\u0E47\\u0E19", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E1B\\u0E35", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E09\\u0E25\\u0E2D\\u0E07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E04\\u0E23\\u0E1A", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E23\\u0E2D\\u0E1A ", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\"\\u0E52\\u0E52\\u0E50 ", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E1b\\u0E35\" ", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E02\\u0E2d\\u0E07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E01\\u0E23\\u0E38\\u0E07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E23\\u0E31\\u0E15\\u0E19\\u0E42\\u0E01\\u0E2A\\u0E34\\u0E19\\u0E17\\u0E23\\u0E4C ", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "(\\u0E01\\u0E23\\u0E38\\u0E07\\u0E40\\u0E17\\u0E1e\\u0E2F", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0E2B\\u0E23\\u0E37\\u0E2D ", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "Bangkok)", 0, status);
+
+ // @suwit - end of changes
+
+
+ RuleBasedBreakIterator* e = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale("th"), status);
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for Thai locale in TestMixedThaiLineBreak.\n");
+ return;
+ }
+
+
+ generalIteratorTest(*e, thaiLineSelection);
+ delete e;
+}
+
+
+void RBBITest::TestMaiyamok()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ BITestData thaiLineSelection(status);
+ ADD_DATACHUNK(thaiLineSelection, NULL, 0, status); // Break at start of data
+ // the Thai maiyamok character is a shorthand symbol that means "repeat the previous
+ // word". Instead of appearing as a word unto itself, however, it's kept together
+ // with the word before it
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e44\\u0e1b\\u0e46", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e21\\u0e32\\u0e46", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e30\\u0e2b\\u0e27\\u0e48\\u0e32\\u0e07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e01\\u0e23\\u0e38\\u0e07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e17\\u0e1e", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e41\\u0e25\\u0e30", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e03\\u0e35", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e22\\u0e07", 0, status);
+ ADD_DATACHUNK(thaiLineSelection, "\\u0e43\\u0e2b\\u0e21\\u0e48", 0, status);
+
+ RuleBasedBreakIterator* e = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(
+ Locale("th"), status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for Thai locale in TestMaiyamok.\n");
+ return;
+ }
+ generalIteratorTest(*e, thaiLineSelection);
+ delete e;
+}
+
+
+
+void RBBITest::TestBug3818() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ // Four Thai words...
+ static const UChar thaiWordData[] = { 0x0E43,0x0E2B,0x0E0D,0x0E48, 0x0E43,0x0E2B,0x0E0D,0x0E48,
+ 0x0E43,0x0E2B,0x0E0D,0x0E48, 0x0E43,0x0E2B,0x0E0D,0x0E48, 0 };
+ UnicodeString thaiStr(thaiWordData);
+
+ RuleBasedBreakIterator* bi =
+ (RuleBasedBreakIterator *)BreakIterator::createWordInstance(Locale("th"), status);
+ if (U_FAILURE(status) || bi == NULL) {
+ errln("Fail at file %s, line %d, status = %s", __FILE__, __LINE__, u_errorName(status));
+ return;
+ }
+ bi->setText(thaiStr);
+
+ int32_t startOfSecondWord = bi->following(1);
+ if (startOfSecondWord != 4) {
+ errln("Fail at file %s, line %d expected start of word at 4, got %d",
+ __FILE__, __LINE__, startOfSecondWord);
+ }
+ startOfSecondWord = bi->following(0);
+ if (startOfSecondWord != 4) {
+ errln("Fail at file %s, line %d expected start of word at 4, got %d",
+ __FILE__, __LINE__, startOfSecondWord);
+ }
+ delete bi;
+}
+
+
+void RBBITest::TestJapaneseWordBreak() {
+ UErrorCode status = U_ZERO_ERROR;
+ BITestData japaneseWordSelection(status);
+
+ ADD_DATACHUNK(japaneseWordSelection, NULL, 0, status); // Break at start of data
+ ADD_DATACHUNK(japaneseWordSelection, "\\u4ECA\\u65E5", 400, status); //2
+ ADD_DATACHUNK(japaneseWordSelection, "\\u306F\\u3044\\u3044", 300, status); //5
+ ADD_DATACHUNK(japaneseWordSelection, "\\u5929\\u6C17", 400, status); //7
+ ADD_DATACHUNK(japaneseWordSelection, "\\u3067\\u3059\\u306D", 300, status); //10
+ ADD_DATACHUNK(japaneseWordSelection, "\\u3002", 0, status); //11
+ ADD_DATACHUNK(japaneseWordSelection, "\\u000D\\u000A", 0, status); //12
+
+ RuleBasedBreakIterator* e = (RuleBasedBreakIterator *)BreakIterator::createWordInstance(
+ Locale("ja"), status);
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for Japanese locale in TestJapaneseWordBreak.\n");
+ return;
+ }
+
+ generalIteratorTest(*e, japaneseWordSelection);
+ delete e;
+}
+
+void RBBITest::TestTrieDict() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ //
+ // Open and read the test data file.
+ //
+ const char *testDataDirectory = IntlTest::getSourceTestData(status);
+ char testFileName[1000];
+ if (testDataDirectory == NULL || strlen(testDataDirectory) + strlen("riwords.txt") + 10 >= sizeof(testFileName)) {
+ errln("Can't open test data. Path too long.");
+ return;
+ }
+ strcpy(testFileName, testDataDirectory);
+ strcat(testFileName, "riwords.txt");
+
+ // Items needing deleting at the end
+ MutableTrieDictionary *mutableDict = NULL;
+ CompactTrieDictionary *compactDict = NULL;
+ UnicodeSet *breaks = NULL;
+ UChar *testFile = NULL;
+ StringEnumeration *enumer1 = NULL;
+ StringEnumeration *enumer2 = NULL;
+ MutableTrieDictionary *mutable2 = NULL;
+ StringEnumeration *cloneEnum = NULL;
+ CompactTrieDictionary *compact2 = NULL;
+
+
+ const UnicodeString *originalWord = NULL;
+ const UnicodeString *cloneWord = NULL;
+ UChar *current;
+ UChar *word;
+ UChar uc;
+ int32_t wordLen;
+ int32_t wordCount;
+ int32_t testCount;
+
+ int len;
+ testFile = ReadAndConvertFile(testFileName, len, NULL, status);
+ if (U_FAILURE(status)) {
+ goto cleanup; /* something went wrong, error already output */
+ }
+
+ mutableDict = new MutableTrieDictionary(0x0E1C, status);
+ if (U_FAILURE(status)) {
+ errln("Error creating MutableTrieDictionary: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ breaks = new UnicodeSet;
+ breaks->add(0x000A); // Line Feed
+ breaks->add(0x000D); // Carriage Return
+ breaks->add(0x2028); // Line Separator
+ breaks->add(0x2029); // Paragraph Separator
+
+ // Now add each non-comment line of the file as a word.
+ current = testFile;
+ word = current;
+ uc = *current++;
+ wordLen = 0;
+ wordCount = 0;
+
+ while (uc) {
+ if (uc == 0x0023) { // #comment line, skip
+ while (uc && !breaks->contains(uc)) {
+ uc = *current++;
+ }
+ }
+ else while (uc && !breaks->contains(uc)) {
+ ++wordLen;
+ uc = *current++;
+ }
+ if (wordLen > 0) {
+ mutableDict->addWord(word, wordLen, status);
+ if (U_FAILURE(status)) {
+ errln("Could not add word to mutable dictionary; status %s\n", u_errorName(status));
+ goto cleanup;
+ }
+ wordCount += 1;
+ }
+
+ // Find beginning of next line
+ while (uc && breaks->contains(uc)) {
+ uc = *current++;
+ }
+ word = current-1;
+ wordLen = 0;
+ }
+
+ if (wordCount < 50) {
+ errln("Word count (%d) unreasonably small\n", wordCount);
+ goto cleanup;
+ }
+
+ enumer1 = mutableDict->openWords(status);
+ if (U_FAILURE(status)) {
+ errln("Could not open mutable dictionary enumerator: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ testCount = 0;
+ if (wordCount != (testCount = enumer1->count(status))) {
+ errln("MutableTrieDictionary word count (%d) differs from file word count (%d), with status %s\n",
+ testCount, wordCount, u_errorName(status));
+ goto cleanup;
+ }
+
+ // Now compact it
+ compactDict = new CompactTrieDictionary(*mutableDict, status);
+ if (U_FAILURE(status)) {
+ errln("Failed to create CompactTrieDictionary: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ enumer2 = compactDict->openWords(status);
+ if (U_FAILURE(status)) {
+ errln("Could not open compact trie dictionary enumerator: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ if (wordCount != (testCount = enumer2->count(status))) {
+ errln("CompactTrieDictionary word count (%d) differs from file word count (%d), with status %s\n",
+ testCount, wordCount, u_errorName(status));
+ goto cleanup;
+ }
+
+ if (enumer1->getDynamicClassID() == enumer2->getDynamicClassID()) {
+ errln("CompactTrieEnumeration and MutableTrieEnumeration ClassIDs are the same");
+ }
+ delete enumer1;
+ enumer1 = NULL;
+ delete enumer2;
+ enumer2 = NULL;
+
+ // Now un-compact it
+ mutable2 = compactDict->cloneMutable(status);
+ if (U_FAILURE(status)) {
+ errln("Could not clone CompactTrieDictionary to MutableTrieDictionary: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ cloneEnum = mutable2->openWords(status);
+ if (U_FAILURE(status)) {
+ errln("Could not create cloned mutable enumerator: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ if (wordCount != (testCount = cloneEnum->count(status))) {
+ errln("Cloned MutableTrieDictionary word count (%d) differs from file word count (%d), with status %s\n",
+ testCount, wordCount, u_errorName(status));
+ goto cleanup;
+ }
+
+ // Compact original dictionary to clone. Note that we can only compare the same kind of
+ // dictionary as the order of the enumerators is not guaranteed to be the same between
+ // different kinds
+ enumer1 = mutableDict->openWords(status);
+ if (U_FAILURE(status)) {
+ errln("Could not re-open mutable dictionary enumerator: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ originalWord = enumer1->snext(status);
+ cloneWord = cloneEnum->snext(status);
+ while (U_SUCCESS(status) && originalWord != NULL && cloneWord != NULL) {
+ if (*originalWord != *cloneWord) {
+ errln("Original and cloned MutableTrieDictionary word mismatch\n");
+ goto cleanup;
+ }
+ originalWord = enumer1->snext(status);
+ cloneWord = cloneEnum->snext(status);
+ }
+
+ if (U_FAILURE(status)) {
+ errln("Enumeration failed: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ if (originalWord != cloneWord) {
+ errln("Original and cloned MutableTrieDictionary ended enumeration at different points\n");
+ goto cleanup;
+ }
+
+ // Test the data copying constructor for CompactTrieDict, and the data access APIs.
+ compact2 = new CompactTrieDictionary(compactDict->data(), status);
+ if (U_FAILURE(status)) {
+ errln("CompactTrieDictionary(const void *,...) failed\n");
+ goto cleanup;
+ }
+
+ if (compact2->dataSize() == 0) {
+ errln("CompactTrieDictionary->dataSize() == 0\n");
+ goto cleanup;
+ }
+
+ // Now count the words via the second dictionary
+ delete enumer1;
+ enumer1 = compact2->openWords(status);
+ if (U_FAILURE(status)) {
+ errln("Could not open compact trie dictionary 2 enumerator: %s\n", u_errorName(status));
+ goto cleanup;
+ }
+
+ if (wordCount != (testCount = enumer1->count(status))) {
+ errln("CompactTrieDictionary 2 word count (%d) differs from file word count (%d), with status %s\n",
+ testCount, wordCount, u_errorName(status));
+ goto cleanup;
+ }
+
+cleanup:
+ delete compactDict;
+ delete mutableDict;
+ delete breaks;
+ delete[] testFile;
+ delete enumer1;
+ delete mutable2;
+ delete cloneEnum;
+ delete compact2;
+}
+
+
+//----------------------------------------------------------------------------
+//
+// generalIteratorTest Given a break iterator and a set of test data,
+// Run the tests and report the results.
+//
+//----------------------------------------------------------------------------
+void RBBITest::generalIteratorTest(RuleBasedBreakIterator& bi, BITestData &td)
+{
+
+ bi.setText(td.fDataToBreak);
+
+ testFirstAndNext(bi, td);
+
+ testLastAndPrevious(bi, td);
+
+ testFollowing(bi, td);
+ testPreceding(bi, td);
+ testIsBoundary(bi, td);
+ doMultipleSelectionTest(bi, td);
+}
+
+
+//
+// testFirstAndNext. Run the iterator forwards in the obvious first(), next()
+// kind of loop.
+//
+void RBBITest::testFirstAndNext(RuleBasedBreakIterator& bi, BITestData &td)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t p;
+ int32_t lastP = -1;
+ int32_t tag;
+
+ logln("Test first and next");
+ bi.setText(td.fDataToBreak);
+ td.clearResults();
+
+ for (p=bi.first(); p!=RuleBasedBreakIterator::DONE; p=bi.next()) {
+ td.fActualBreakPositions.addElement(p, status); // Save result.
+ tag = bi.getRuleStatus();
+ td.fActualTags.addElement(tag, status);
+ if (p <= lastP) {
+ // If the iterator is not making forward progress, stop.
+ // No need to raise an error here, it'll be detected in the normal check of results.
+ break;
+ }
+ lastP = p;
+ }
+ td.checkResults("testFirstAndNext", this);
+}
+
+
+//
+// TestLastAndPrevious. Run the iterator backwards, starting with last().
+//
+void RBBITest::testLastAndPrevious(RuleBasedBreakIterator& bi, BITestData &td)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t p;
+ int32_t lastP = 0x7ffffffe;
+ int32_t tag;
+
+ logln("Test first and next");
+ bi.setText(td.fDataToBreak);
+ td.clearResults();
+
+ for (p=bi.last(); p!=RuleBasedBreakIterator::DONE; p=bi.previous()) {
+ // Save break position. Insert it at start of vector of results, shoving
+ // already-saved results further towards the end.
+ td.fActualBreakPositions.insertElementAt(p, 0, status);
+ // bi.previous(); // TODO: Why does this fix things up????
+ // bi.next();
+ tag = bi.getRuleStatus();
+ td.fActualTags.insertElementAt(tag, 0, status);
+ if (p >= lastP) {
+ // If the iterator is not making progress, stop.
+ // No need to raise an error here, it'll be detected in the normal check of results.
+ break;
+ }
+ lastP = p;
+ }
+ td.checkResults("testLastAndPrevious", this);
+}
+
+
+void RBBITest::testFollowing(RuleBasedBreakIterator& bi, BITestData &td)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t p;
+ int32_t tag;
+ int32_t lastP = -2; // A value that will never be returned as a break position.
+ // cannot be -1; that is returned for DONE.
+ int i;
+
+ logln("testFollowing():");
+ bi.setText(td.fDataToBreak);
+ td.clearResults();
+
+ // Save the starting point, since we won't get that out of following.
+ p = bi.first();
+ td.fActualBreakPositions.addElement(p, status); // Save result.
+ tag = bi.getRuleStatus();
+ td.fActualTags.addElement(tag, status);
+
+ for (i = 0; i <= td.fDataToBreak.length()+1; i++) {
+ p = bi.following(i);
+ if (p != lastP) {
+ if (p == RuleBasedBreakIterator::DONE) {
+ break;
+ }
+ // We've reached a new break position. Save it.
+ td.fActualBreakPositions.addElement(p, status); // Save result.
+ tag = bi.getRuleStatus();
+ td.fActualTags.addElement(tag, status);
+ lastP = p;
+ }
+ }
+ // The loop normally exits by means of the break in the middle.
+ // Make sure that the index was at the correct position for the break iterator to have
+ // returned DONE.
+ if (i != td.fDataToBreak.length()) {
+ errln("testFollowing(): iterator returned DONE prematurely.");
+ }
+
+ // Full check of all results.
+ td.checkResults("testFollowing", this);
+}
+
+
+
+void RBBITest::testPreceding(RuleBasedBreakIterator& bi, BITestData &td) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t p;
+ int32_t tag;
+ int32_t lastP = 0x7ffffffe;
+ int i;
+
+ logln("testPreceding():");
+ bi.setText(td.fDataToBreak);
+ td.clearResults();
+
+ p = bi.last();
+ td.fActualBreakPositions.addElement(p, status);
+ tag = bi.getRuleStatus();
+ td.fActualTags.addElement(tag, status);
+
+ for (i = td.fDataToBreak.length(); i>=-1; i--) {
+ p = bi.preceding(i);
+ if (p != lastP) {
+ if (p == RuleBasedBreakIterator::DONE) {
+ break;
+ }
+ // We've reached a new break position. Save it.
+ td.fActualBreakPositions.insertElementAt(p, 0, status);
+ lastP = p;
+ tag = bi.getRuleStatus();
+ td.fActualTags.insertElementAt(tag, 0, status);
+ }
+ }
+ // The loop normally exits by means of the break in the middle.
+ // Make sure that the index was at the correct position for the break iterator to have
+ // returned DONE.
+ if (i != 0) {
+ errln("testPreceding(): iterator returned DONE prematurely.");
+ }
+
+ // Full check of all results.
+ td.checkResults("testPreceding", this);
+}
+
+
+
+void RBBITest::testIsBoundary(RuleBasedBreakIterator& bi, BITestData &td) {
+ UErrorCode status = U_ZERO_ERROR;
+ int i;
+ int32_t tag;
+
+ logln("testIsBoundary():");
+ bi.setText(td.fDataToBreak);
+ td.clearResults();
+
+ for (i = 0; i <= td.fDataToBreak.length(); i++) {
+ if (bi.isBoundary(i)) {
+ td.fActualBreakPositions.addElement(i, status); // Save result.
+ tag = bi.getRuleStatus();
+ td.fActualTags.addElement(tag, status);
+ }
+ }
+ td.checkResults("testIsBoundary: ", this);
+}
+
+
+
+void RBBITest::doMultipleSelectionTest(RuleBasedBreakIterator& iterator, BITestData &td)
+{
+ iterator.setText(td.fDataToBreak);
+
+ RuleBasedBreakIterator* testIterator =(RuleBasedBreakIterator*)iterator.clone();
+ int32_t offset = iterator.first();
+ int32_t testOffset;
+ int32_t count = 0;
+
+ logln("doMultipleSelectionTest text of length: %d", td.fDataToBreak.length());
+
+ if (*testIterator != iterator)
+ errln("clone() or operator!= failed: two clones compared unequal");
+
+ do {
+ testOffset = testIterator->first();
+ testOffset = testIterator->next(count);
+ if (offset != testOffset)
+ errln(UnicodeString("next(n) and next() not returning consistent results: for step ") + count + ", next(n) returned " + testOffset + " and next() had " + offset);
+
+ if (offset != RuleBasedBreakIterator::DONE) {
+ count++;
+ offset = iterator.next();
+
+ if (offset != RuleBasedBreakIterator::DONE && *testIterator == iterator) {
+ errln("operator== failed: Two unequal iterators compared equal. count=%d offset=%d", count, offset);
+ if (count > 10000 || offset == -1) {
+ errln("operator== failed too many times. Stopping test.");
+ if (offset == -1) {
+ errln("Does (RuleBasedBreakIterator::DONE == -1)?");
+ }
+ return;
+ }
+ }
+ }
+ } while (offset != RuleBasedBreakIterator::DONE);
+
+ // now do it backwards...
+ offset = iterator.last();
+ count = 0;
+
+ do {
+ testOffset = testIterator->last();
+ testOffset = testIterator->next(count); // next() with a negative arg is same as previous
+ if (offset != testOffset)
+ errln(UnicodeString("next(n) and next() not returning consistent results: for step ") + count + ", next(n) returned " + testOffset + " and next() had " + offset);
+
+ if (offset != RuleBasedBreakIterator::DONE) {
+ count--;
+ offset = iterator.previous();
+ }
+ } while (offset != RuleBasedBreakIterator::DONE);
+
+ delete testIterator;
+}
+
+
+//---------------------------------------------
+//
+// other tests
+//
+//---------------------------------------------
+void RBBITest::TestEmptyString()
+{
+ UnicodeString text = "";
+ UErrorCode status = U_ZERO_ERROR;
+
+ BITestData x(status);
+ ADD_DATACHUNK(x, "", 0, status); // Break at start of data
+ RuleBasedBreakIterator* bi = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for default locale in TestEmptyString.\n");
+ return;
+ }
+ generalIteratorTest(*bi, x);
+ delete bi;
+}
+
+void RBBITest::TestGetAvailableLocales()
+{
+ int32_t locCount = 0;
+ const Locale* locList = BreakIterator::getAvailableLocales(locCount);
+
+ if (locCount == 0)
+ errln("getAvailableLocales() returned an empty list!");
+ // Just make sure that it's returning good memory.
+ int32_t i;
+ for (i = 0; i < locCount; ++i) {
+ logln(locList[i].getName());
+ }
+}
+
+//Testing the BreakIterator::getDisplayName() function
+void RBBITest::TestGetDisplayName()
+{
+ UnicodeString result;
+
+ BreakIterator::getDisplayName(Locale::getUS(), result);
+ if (Locale::getDefault() == Locale::getUS() && result != "English (United States)")
+ errln("BreakIterator::getDisplayName() failed: expected \"English (United States)\", got \""
+ + result);
+
+ BreakIterator::getDisplayName(Locale::getFrance(), Locale::getUS(), result);
+ if (result != "French (France)")
+ errln("BreakIterator::getDisplayName() failed: expected \"French (France)\", got \""
+ + result);
+}
+/**
+ * Test End Behaviour
+ * @bug 4068137
+ */
+void RBBITest::TestEndBehaviour()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString testString("boo.");
+ BreakIterator *wb = BreakIterator::createWordInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for default locale in TestEndBehaviour.\n");
+ return;
+ }
+ wb->setText(testString);
+
+ if (wb->first() != 0)
+ errln("Didn't get break at beginning of string.");
+ if (wb->next() != 3)
+ errln("Didn't get break before period in \"boo.\"");
+ if (wb->current() != 4 && wb->next() != 4)
+ errln("Didn't get break at end of string.");
+ delete wb;
+}
+/*
+ * @bug 4153072
+ */
+void RBBITest::TestBug4153072() {
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIterator *iter = BreakIterator::createWordInstance(Locale::getDefault(), status);
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for default locale in TestBug4153072\n");
+ return;
+ }
+ UnicodeString str("...Hello, World!...");
+ int32_t begin = 3;
+ int32_t end = str.length() - 3;
+ UBool onBoundary;
+
+ StringCharacterIterator* textIterator = new StringCharacterIterator(str, begin, end, begin);
+ iter->adoptText(textIterator);
+ int index;
+ // Note: with the switch to UText, there is no way to restrict the
+ // iteration range to begin at an index other than zero.
+ // String character iterators created with a non-zero bound are
+ // treated by RBBI as being empty.
+ for (index = -1; index < begin + 1; ++index) {
+ onBoundary = iter->isBoundary(index);
+ if (index == 0? !onBoundary : onBoundary) {
+ errln((UnicodeString)"Didn't handle isBoundary correctly with offset = " + index +
+ " and begin index = " + begin);
+ }
+ }
+ delete iter;
+}
+
+
+//
+// Test for problem reported by Ashok Matoria on 9 July 2007
+// One.<kSoftHyphen><kSpace>Two.
+//
+// Sentence break at start (0) and then on calling next() it breaks at
+// ‘T’ of “Twoâ€. Now, at this point if I do next() and
+// then previous(), it breaks at <kSOftHyphen> instead of ‘T’ of Two.
+//
+void RBBITest::TestBug5775() {
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIterator *bi = BreakIterator::createSentenceInstance(Locale::getEnglish(), status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(bi != NULL);
+
+ if (U_FAILURE(status) || bi == NULL) {
+ // TEST_ASSERT already printed error message.
+ return;
+ }
+
+ UnicodeString s("One.\\u00ad Two.");
+ // 01234 56789
+ s = s.unescape();
+ bi->setText(s);
+ int pos = bi->next();
+ TEST_ASSERT(pos == 6);
+ pos = bi->next();
+ TEST_ASSERT(pos == 10);
+ pos = bi->previous();
+ TEST_ASSERT(pos == 6);
+ delete bi;
+}
+
+
+
+/**
+ * Test Japanese Line Break
+ * @bug 4095322
+ */
+void RBBITest::TestJapaneseLineBreak()
+{
+#if 0
+ // Test needs updating some more... Dump it for now.
+
+
+ // Change for Unicode TR 14: Punctuation characters with categories Pi and Pf do not count
+ // as opening and closing punctuation for line breaking.
+ // Also, \u30fc and \u30fe are not counted as hyphens. Remove these chars
+ // from these tests. 6-13-2002
+ //
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString testString = CharsToUnicodeString("\\u4e00x\\u4e8c");
+ UnicodeString precedingChars = CharsToUnicodeString(
+ //"([{\\u00ab$\\u00a5\\u00a3\\u00a4\\u2018\\u201a\\u201c\\u201e\\u201b\\u201f");
+ "([{$\\u00a5\\u00a3\\u00a4\\u201a\\u201e");
+ UnicodeString followingChars = CharsToUnicodeString(
+ // ")]}\\u00bb!%,.\\u3001\\u3002\\u3063\\u3083\\u3085\\u3087\\u30c3\\u30e3\\u30e5\\u30e7\\u30fc"
+ ")]}!%,.\\u3001\\u3002\\u3063\\u3083\\u3085\\u3087\\u30c3\\u30e3\\u30e5\\u30e7"
+ // ":;\\u309b\\u309c\\u3005\\u309d\\u309e\\u30fd\\u30fe\\u2019\\u201d\\u00b0\\u2032\\u2033\\u2034"
+ ":;\\u309b\\u309c\\u3005\\u309d\\u309e\\u30fd\\u00b0\\u2032\\u2033\\u2034"
+ "\\u2030\\u2031\\u2103\\u2109\\u00a2\\u0300\\u0301\\u0302");
+ BreakIterator *iter = BreakIterator::createLineInstance(Locale::getJapan(), status);
+
+ int32_t i;
+ if (U_FAILURE(status))
+ {
+ errln("Failed to create the BreakIterator for Japanese locale in TestJapaneseLineBreak.\n");
+ return;
+ }
+
+ for (i = 0; i < precedingChars.length(); i++) {
+ testString.setCharAt(1, precedingChars[i]);
+ iter->setText(testString);
+ int32_t j = iter->first();
+ if (j != 0)
+ errln("ja line break failure: failed to start at 0");
+ j = iter->next();
+ if (j != 1)
+ errln("ja line break failure: failed to stop before '" + UCharToUnicodeString(precedingChars[i])
+ + "' (" + ((int)(precedingChars[i])) + ")");
+ j = iter->next();
+ if (j != 3)
+ errln("ja line break failure: failed to skip position after '" + UCharToUnicodeString(precedingChars[i])
+ + "' (" + ((int)(precedingChars[i])) + ")");
+ }
+
+ for (i = 0; i < followingChars.length(); i++) {
+ testString.setCharAt(1, followingChars[i]);
+ iter->setText(testString);
+ int j = iter->first();
+ if (j != 0)
+ errln("ja line break failure: failed to start at 0");
+ j = iter->next();
+ if (j != 2)
+ errln("ja line break failure: failed to skip position before '" + UCharToUnicodeString(followingChars[i])
+ + "' (" + ((int)(followingChars[i])) + ")");
+ j = iter->next();
+ if (j != 3)
+ errln("ja line break failure: failed to stop after '" + UCharToUnicodeString(followingChars[i])
+ + "' (" + ((int)(followingChars[i])) + ")");
+ }
+ delete iter;
+#endif
+}
+
+
+//------------------------------------------------------------------------------
+//
+// RBBITest::Extended Run RBBI Tests from an external test data file
+//
+//------------------------------------------------------------------------------
+
+struct TestParams {
+ BreakIterator *bi;
+ UnicodeString dataToBreak;
+ UVector32 *expectedBreaks;
+ UVector32 *srcLine;
+ UVector32 *srcCol;
+};
+
+void RBBITest::executeTest(TestParams *t) {
+ int32_t bp;
+ int32_t prevBP;
+ int32_t i;
+
+ if (t->bi == NULL) {
+ return;
+ }
+
+ t->bi->setText(t->dataToBreak);
+ //
+ // Run the iterator forward
+ //
+ prevBP = -1;
+ for (bp = t->bi->first(); bp != BreakIterator::DONE; bp = t->bi->next()) {
+ if (prevBP == bp) {
+ // Fail for lack of forward progress.
+ errln("Forward Iteration, no forward progress. Break Pos=%4d File line,col=%4d,%4d",
+ bp, t->srcLine->elementAti(bp), t->srcCol->elementAti(bp));
+ break;
+ }
+
+ // Check that there were we didn't miss an expected break between the last one
+ // and this one.
+ for (i=prevBP+1; i<bp; i++) {
+ if (t->expectedBreaks->elementAti(i) != 0) {
+ int expected[] = {0, i};
+ printStringBreaks(t->dataToBreak, expected, 2);
+ errln("Forward Iteration, break expected, but not found. Pos=%4d File line,col= %4d,%4d",
+ i, t->srcLine->elementAti(i), t->srcCol->elementAti(i));
+ }
+ }
+
+ // Check that the break we did find was expected
+ if (t->expectedBreaks->elementAti(bp) == 0) {
+ int expected[] = {0, bp};
+ printStringBreaks(t->dataToBreak, expected, 2);
+ errln("Forward Iteration, break found, but not expected. Pos=%4d File line,col= %4d,%4d",
+ bp, t->srcLine->elementAti(bp), t->srcCol->elementAti(bp));
+ } else {
+ // The break was expected.
+ // Check that the {nnn} tag value is correct.
+ int32_t expectedTagVal = t->expectedBreaks->elementAti(bp);
+ if (expectedTagVal == -1) {
+ expectedTagVal = 0;
+ }
+ int32_t line = t->srcLine->elementAti(bp);
+ int32_t rs = ((RuleBasedBreakIterator *)t->bi)->getRuleStatus();
+ if (rs != expectedTagVal) {
+ errln("Incorrect status for forward break. Pos=%4d File line,col= %4d,%4d.\n"
+ " Actual, Expected status = %4d, %4d",
+ bp, line, t->srcCol->elementAti(bp), rs, expectedTagVal);
+ }
+ }
+
+
+ prevBP = bp;
+ }
+
+ // Verify that there were no missed expected breaks after the last one found
+ for (i=prevBP+1; i<t->expectedBreaks->size(); i++) {
+ if (t->expectedBreaks->elementAti(i) != 0) {
+ errln("Forward Iteration, break expected, but not found. Pos=%4d File line,col= %4d,%4d",
+ i, t->srcLine->elementAti(i), t->srcCol->elementAti(i));
+ }
+ }
+
+ //
+ // Run the iterator backwards, verify that the same breaks are found.
+ //
+ prevBP = t->dataToBreak.length()+2; // start with a phony value for the last break pos seen.
+ for (bp = t->bi->last(); bp != BreakIterator::DONE; bp = t->bi->previous()) {
+ if (prevBP == bp) {
+ // Fail for lack of progress.
+ errln("Reverse Iteration, no progress. Break Pos=%4d File line,col=%4d,%4d",
+ bp, t->srcLine->elementAti(bp), t->srcCol->elementAti(bp));
+ break;
+ }
+
+ // Check that there were we didn't miss an expected break between the last one
+ // and this one. (UVector returns zeros for index out of bounds.)
+ for (i=prevBP-1; i>bp; i--) {
+ if (t->expectedBreaks->elementAti(i) != 0) {
+ errln("Reverse Itertion, break expected, but not found. Pos=%4d File line,col= %4d,%4d",
+ i, t->srcLine->elementAti(i), t->srcCol->elementAti(i));
+ }
+ }
+
+ // Check that the break we did find was expected
+ if (t->expectedBreaks->elementAti(bp) == 0) {
+ errln("Reverse Itertion, break found, but not expected. Pos=%4d File line,col= %4d,%4d",
+ bp, t->srcLine->elementAti(bp), t->srcCol->elementAti(bp));
+ } else {
+ // The break was expected.
+ // Check that the {nnn} tag value is correct.
+ int32_t expectedTagVal = t->expectedBreaks->elementAti(bp);
+ if (expectedTagVal == -1) {
+ expectedTagVal = 0;
+ }
+ int line = t->srcLine->elementAti(bp);
+ int32_t rs = ((RuleBasedBreakIterator *)t->bi)->getRuleStatus();
+ if (rs != expectedTagVal) {
+ errln("Incorrect status for reverse break. Pos=%4d File line,col= %4d,%4d.\n"
+ " Actual, Expected status = %4d, %4d",
+ bp, line, t->srcCol->elementAti(bp), rs, expectedTagVal);
+ }
+ }
+
+ prevBP = bp;
+ }
+
+ // Verify that there were no missed breaks prior to the last one found
+ for (i=prevBP-1; i>=0; i--) {
+ if (t->expectedBreaks->elementAti(i) != 0) {
+ errln("Forward Itertion, break expected, but not found. Pos=%4d File line,col= %4d,%4d",
+ i, t->srcLine->elementAti(i), t->srcCol->elementAti(i));
+ }
+ }
+}
+
+
+void RBBITest::TestExtended() {
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ UErrorCode status = U_ZERO_ERROR;
+ Locale locale("");
+
+ UnicodeString rules;
+ TestParams tp;
+ tp.bi = NULL;
+ tp.expectedBreaks = new UVector32(status);
+ tp.srcLine = new UVector32(status);
+ tp.srcCol = new UVector32(status);
+
+ RegexMatcher localeMatcher("<locale *([\\p{L}\\p{Nd}_]*) *>", 0, status);
+ TEST_ASSERT_SUCCESS(status);
+
+
+ //
+ // Open and read the test data file.
+ //
+ const char *testDataDirectory = IntlTest::getSourceTestData(status);
+ char testFileName[1000];
+ if (testDataDirectory == NULL || strlen(testDataDirectory) >= sizeof(testFileName)) {
+ errln("Can't open test data. Path too long.");
+ return;
+ }
+ strcpy(testFileName, testDataDirectory);
+ strcat(testFileName, "rbbitst.txt");
+
+ int len;
+ UChar *testFile = ReadAndConvertFile(testFileName, len, "UTF-8", status);
+ if (U_FAILURE(status)) {
+ return; /* something went wrong, error already output */
+ }
+
+
+
+
+ //
+ // Put the test data into a UnicodeString
+ //
+ UnicodeString testString(FALSE, testFile, len);
+
+ enum EParseState{
+ PARSE_COMMENT,
+ PARSE_TAG,
+ PARSE_DATA,
+ PARSE_NUM
+ }
+ parseState = PARSE_TAG;
+
+ EParseState savedState = PARSE_TAG;
+
+ static const UChar CH_LF = 0x0a;
+ static const UChar CH_CR = 0x0d;
+ static const UChar CH_HASH = 0x23;
+ /*static const UChar CH_PERIOD = 0x2e;*/
+ static const UChar CH_LT = 0x3c;
+ static const UChar CH_GT = 0x3e;
+ static const UChar CH_BACKSLASH = 0x5c;
+ static const UChar CH_BULLET = 0x2022;
+
+ int32_t lineNum = 1;
+ int32_t colStart = 0;
+ int32_t column = 0;
+ int32_t charIdx = 0;
+
+ int32_t tagValue = 0; // The numeric value of a <nnn> tag.
+
+ for (charIdx = 0; charIdx < len; ) {
+ status = U_ZERO_ERROR;
+ UChar c = testString.charAt(charIdx);
+ charIdx++;
+ if (c == CH_CR && charIdx<len && testString.charAt(charIdx) == CH_LF) {
+ // treat CRLF as a unit
+ c = CH_LF;
+ charIdx++;
+ }
+ if (c == CH_LF || c == CH_CR) {
+ lineNum++;
+ colStart = charIdx;
+ }
+ column = charIdx - colStart + 1;
+
+ switch (parseState) {
+ case PARSE_COMMENT:
+ if (c == 0x0a || c == 0x0d) {
+ parseState = savedState;
+ }
+ break;
+
+ case PARSE_TAG:
+ {
+ if (c == CH_HASH) {
+ parseState = PARSE_COMMENT;
+ savedState = PARSE_TAG;
+ break;
+ }
+ if (u_isUWhiteSpace(c)) {
+ break;
+ }
+ if (testString.compare(charIdx-1, 6, "<word>") == 0) {
+ delete tp.bi;
+ tp.bi = BreakIterator::createWordInstance(locale, status);
+ charIdx += 5;
+ break;
+ }
+ if (testString.compare(charIdx-1, 6, "<char>") == 0) {
+ delete tp.bi;
+ tp.bi = BreakIterator::createCharacterInstance(locale, status);
+ charIdx += 5;
+ break;
+ }
+ if (testString.compare(charIdx-1, 6, "<line>") == 0) {
+ delete tp.bi;
+ tp.bi = BreakIterator::createLineInstance(locale, status);
+ charIdx += 5;
+ break;
+ }
+ if (testString.compare(charIdx-1, 6, "<sent>") == 0) {
+ delete tp.bi;
+ tp.bi = NULL;
+ tp.bi = BreakIterator::createSentenceInstance(locale, status);
+ charIdx += 5;
+ break;
+ }
+ if (testString.compare(charIdx-1, 7, "<title>") == 0) {
+ delete tp.bi;
+ tp.bi = BreakIterator::createTitleInstance(locale, status);
+ charIdx += 6;
+ break;
+ }
+
+ // <locale loc_name>
+ localeMatcher.reset(testString);
+ if (localeMatcher.lookingAt(charIdx-1, status)) {
+ UnicodeString localeName = localeMatcher.group(1, status);
+ char localeName8[100];
+ localeName.extract(0, localeName.length(), localeName8, sizeof(localeName8), 0);
+ locale = Locale::createFromName(localeName8);
+ charIdx += localeMatcher.group(0, status).length();
+ TEST_ASSERT_SUCCESS(status);
+ break;
+ }
+ if (testString.compare(charIdx-1, 6, "<data>") == 0) {
+ parseState = PARSE_DATA;
+ charIdx += 5;
+ tp.dataToBreak = "";
+ tp.expectedBreaks->removeAllElements();
+ tp.srcCol ->removeAllElements();
+ tp.srcLine->removeAllElements();
+ break;
+ }
+
+ errln("line %d: Tag expected in test file.", lineNum);
+ parseState = PARSE_COMMENT;
+ savedState = PARSE_DATA;
+ goto end_test; // Stop the test.
+ }
+ break;
+
+ case PARSE_DATA:
+ if (c == CH_BULLET) {
+ int32_t breakIdx = tp.dataToBreak.length();
+ tp.expectedBreaks->setSize(breakIdx+1);
+ tp.expectedBreaks->setElementAt(-1, breakIdx);
+ tp.srcLine->setSize(breakIdx+1);
+ tp.srcLine->setElementAt(lineNum, breakIdx);
+ tp.srcCol ->setSize(breakIdx+1);
+ tp.srcCol ->setElementAt(column, breakIdx);
+ break;
+ }
+
+ if (testString.compare(charIdx-1, 7, "</data>") == 0) {
+ // Add final entry to mappings from break location to source file position.
+ // Need one extra because last break position returned is after the
+ // last char in the data, not at the last char.
+ tp.srcLine->addElement(lineNum, status);
+ tp.srcCol ->addElement(column, status);
+
+ parseState = PARSE_TAG;
+ charIdx += 6;
+
+ // RUN THE TEST!
+ executeTest(&tp);
+ break;
+ }
+
+ if (testString.compare(charIdx-1, 3, "\\N{") == 0) {
+ // Named character, e.g. \N{COMBINING GRAVE ACCENT}
+ // Get the code point from the name and insert it into the test data.
+ // (Damn, no API takes names in Unicode !!!
+ // we've got to take it back to char *)
+ int32_t nameEndIdx = testString.indexOf((UChar)0x7d/*'}'*/, charIdx);
+ int32_t nameLength = nameEndIdx - (charIdx+2);
+ char charNameBuf[200];
+ UChar32 theChar = -1;
+ if (nameEndIdx != -1) {
+ UErrorCode status = U_ZERO_ERROR;
+ testString.extract(charIdx+2, nameLength, charNameBuf, sizeof(charNameBuf));
+ charNameBuf[sizeof(charNameBuf)-1] = 0;
+ theChar = u_charFromName(U_UNICODE_CHAR_NAME, charNameBuf, &status);
+ if (U_FAILURE(status)) {
+ theChar = -1;
+ }
+ }
+ if (theChar == -1) {
+ errln("Error in named character in test file at line %d, col %d",
+ lineNum, column);
+ } else {
+ // Named code point was recognized. Insert it
+ // into the test data.
+ tp.dataToBreak.append(theChar);
+ while (tp.dataToBreak.length() > tp.srcLine->size()) {
+ tp.srcLine->addElement(lineNum, status);
+ tp.srcCol ->addElement(column, status);
+ }
+ }
+ if (nameEndIdx > charIdx) {
+ charIdx = nameEndIdx+1;
+
+ }
+ break;
+ }
+
+
+
+
+ if (testString.compare(charIdx-1, 2, "<>") == 0) {
+ charIdx++;
+ int32_t breakIdx = tp.dataToBreak.length();
+ tp.expectedBreaks->setSize(breakIdx+1);
+ tp.expectedBreaks->setElementAt(-1, breakIdx);
+ tp.srcLine->setSize(breakIdx+1);
+ tp.srcLine->setElementAt(lineNum, breakIdx);
+ tp.srcCol ->setSize(breakIdx+1);
+ tp.srcCol ->setElementAt(column, breakIdx);
+ break;
+ }
+
+ if (c == CH_LT) {
+ tagValue = 0;
+ parseState = PARSE_NUM;
+ break;
+ }
+
+ if (c == CH_HASH && column==3) { // TODO: why is column off so far?
+ parseState = PARSE_COMMENT;
+ savedState = PARSE_DATA;
+ break;
+ }
+
+ if (c == CH_BACKSLASH) {
+ // Check for \ at end of line, a line continuation.
+ // Advance over (discard) the newline
+ UChar32 cp = testString.char32At(charIdx);
+ if (cp == CH_CR && charIdx<len && testString.charAt(charIdx+1) == CH_LF) {
+ // We have a CR LF
+ // Need an extra increment of the input ptr to move over both of them
+ charIdx++;
+ }
+ if (cp == CH_LF || cp == CH_CR) {
+ lineNum++;
+ colStart = charIdx;
+ charIdx++;
+ break;
+ }
+
+ // Let unescape handle the back slash.
+ cp = testString.unescapeAt(charIdx);
+ if (cp != -1) {
+ // Escape sequence was recognized. Insert the char
+ // into the test data.
+ tp.dataToBreak.append(cp);
+ while (tp.dataToBreak.length() > tp.srcLine->size()) {
+ tp.srcLine->addElement(lineNum, status);
+ tp.srcCol ->addElement(column, status);
+ }
+ break;
+ }
+
+
+ // Not a recognized backslash escape sequence.
+ // Take the next char as a literal.
+ // TODO: Should this be an error?
+ c = testString.charAt(charIdx);
+ charIdx = testString.moveIndex32(charIdx, 1);
+ }
+
+ // Normal, non-escaped data char.
+ tp.dataToBreak.append(c);
+
+ // Save the mapping from offset in the data to line/column numbers in
+ // the original input file. Will be used for better error messages only.
+ // If there's an expected break before this char, the slot in the mapping
+ // vector will already be set for this char; don't overwrite it.
+ if (tp.dataToBreak.length() > tp.srcLine->size()) {
+ tp.srcLine->addElement(lineNum, status);
+ tp.srcCol ->addElement(column, status);
+ }
+ break;
+
+
+ case PARSE_NUM:
+ // We are parsing an expected numeric tag value, like <1234>,
+ // within a chunk of data.
+ if (u_isUWhiteSpace(c)) {
+ break;
+ }
+
+ if (c == CH_GT) {
+ // Finished the number. Add the info to the expected break data,
+ // and switch parse state back to doing plain data.
+ parseState = PARSE_DATA;
+ if (tagValue == 0) {
+ tagValue = -1;
+ }
+ int32_t breakIdx = tp.dataToBreak.length();
+ tp.expectedBreaks->setSize(breakIdx+1);
+ tp.expectedBreaks->setElementAt(tagValue, breakIdx);
+ tp.srcLine->setSize(breakIdx+1);
+ tp.srcLine->setElementAt(lineNum, breakIdx);
+ tp.srcCol ->setSize(breakIdx+1);
+ tp.srcCol ->setElementAt(column, breakIdx);
+ break;
+ }
+
+ if (u_isdigit(c)) {
+ tagValue = tagValue*10 + u_charDigitValue(c);
+ break;
+ }
+
+ errln("Syntax Error in test file at line %d, col %d",
+ lineNum, column);
+ parseState = PARSE_COMMENT;
+ goto end_test; // Stop the test
+ break;
+ }
+
+
+ if (U_FAILURE(status)) {
+ errln("ICU Error %s while parsing test file at line %d.",
+ u_errorName(status), lineNum);
+ status = U_ZERO_ERROR;
+ goto end_test; // Stop the test
+ }
+
+ }
+
+end_test:
+ delete tp.bi;
+ delete tp.expectedBreaks;
+ delete tp.srcLine;
+ delete tp.srcCol;
+ delete [] testFile;
+#endif
+}
+
+
+//-------------------------------------------------------------------------------
+//
+// ReadAndConvertFile Read a text data file, convert it to UChars, and
+// return the datain one big UChar * buffer, which the caller must delete.
+//
+// parameters:
+// fileName: the name of the file, with no directory part. The test data directory
+// is assumed.
+// ulen an out parameter, receives the actual length (in UChars) of the file data.
+// encoding The file encoding. If the file contains a BOM, that will override the encoding
+// specified here. The BOM, if it exists, will be stripped from the returned data.
+// Pass NULL for the system default encoding.
+// status
+// returns:
+// The file data, converted to UChar.
+// The caller must delete this when done with
+// delete [] theBuffer;
+//
+// TODO: This is a clone of RegexTest::ReadAndConvertFile.
+// Move this function to some common place.
+//
+//--------------------------------------------------------------------------------
+UChar *RBBITest::ReadAndConvertFile(const char *fileName, int &ulen, const char *encoding, UErrorCode &status) {
+ UChar *retPtr = NULL;
+ char *fileBuf = NULL;
+ UConverter* conv = NULL;
+ FILE *f = NULL;
+
+ ulen = 0;
+ if (U_FAILURE(status)) {
+ return retPtr;
+ }
+
+ //
+ // Open the file.
+ //
+ f = fopen(fileName, "rb");
+ if (f == 0) {
+ errln("Error opening test data file %s\n", fileName);
+ status = U_FILE_ACCESS_ERROR;
+ return NULL;
+ }
+ //
+ // Read it in
+ //
+ int fileSize;
+ int amt_read;
+
+ fseek( f, 0, SEEK_END);
+ fileSize = ftell(f);
+ fileBuf = new char[fileSize];
+ fseek(f, 0, SEEK_SET);
+ amt_read = fread(fileBuf, 1, fileSize, f);
+ if (amt_read != fileSize || fileSize <= 0) {
+ errln("Error reading test data file.");
+ goto cleanUpAndReturn;
+ }
+
+ //
+ // Look for a Unicode Signature (BOM) on the data just read
+ //
+ int32_t signatureLength;
+ const char * fileBufC;
+ const char* bomEncoding;
+
+ fileBufC = fileBuf;
+ bomEncoding = ucnv_detectUnicodeSignature(
+ fileBuf, fileSize, &signatureLength, &status);
+ if(bomEncoding!=NULL ){
+ fileBufC += signatureLength;
+ fileSize -= signatureLength;
+ encoding = bomEncoding;
+ }
+
+ //
+ // Open a converter to take the rule file to UTF-16
+ //
+ conv = ucnv_open(encoding, &status);
+ if (U_FAILURE(status)) {
+ goto cleanUpAndReturn;
+ }
+
+ //
+ // Convert the rules to UChar.
+ // Preflight first to determine required buffer size.
+ //
+ ulen = ucnv_toUChars(conv,
+ NULL, // dest,
+ 0, // destCapacity,
+ fileBufC,
+ fileSize,
+ &status);
+ if (status == U_BUFFER_OVERFLOW_ERROR) {
+ // Buffer Overflow is expected from the preflight operation.
+ status = U_ZERO_ERROR;
+
+ retPtr = new UChar[ulen+1];
+ ucnv_toUChars(conv,
+ retPtr, // dest,
+ ulen+1,
+ fileBufC,
+ fileSize,
+ &status);
+ }
+
+cleanUpAndReturn:
+ fclose(f);
+ delete []fileBuf;
+ ucnv_close(conv);
+ if (U_FAILURE(status)) {
+ errln("ucnv_toUChars: ICU Error \"%s\"\n", u_errorName(status));
+ delete retPtr;
+ retPtr = 0;
+ ulen = 0;
+ };
+ return retPtr;
+}
+
+
+
+//--------------------------------------------------------------------------------------------
+//
+// Run tests from each of the boundary test data files distributed by the Unicode Consortium
+//
+//-------------------------------------------------------------------------------------------
+void RBBITest::TestUnicodeFiles() {
+ RuleBasedBreakIterator *bi;
+ UErrorCode status = U_ZERO_ERROR;
+
+ bi = (RuleBasedBreakIterator *)BreakIterator::createCharacterInstance(Locale::getDefault(), status);
+ TEST_ASSERT_SUCCESS(status);
+ if (U_SUCCESS(status)) {
+ runUnicodeTestData("GraphemeBreakTest.txt", bi);
+ }
+ delete bi;
+
+ bi = (RuleBasedBreakIterator *)BreakIterator::createWordInstance(Locale::getDefault(), status);
+ TEST_ASSERT_SUCCESS(status);
+ if (U_SUCCESS(status)) {
+ runUnicodeTestData("WordBreakTest.txt", bi);
+ }
+ delete bi;
+
+ bi = (RuleBasedBreakIterator *)BreakIterator::createSentenceInstance(Locale::getDefault(), status);
+ TEST_ASSERT_SUCCESS(status);
+ if (U_SUCCESS(status)) {
+ runUnicodeTestData("SentenceBreakTest.txt", bi);
+ }
+ delete bi;
+
+ #if 0
+ bi = (RuleBasedBreakIterator *)BreakIterator::createCharInstance(Locale::getDefault(), status);
+ TEST_ASSERT_SUCCESS(status);
+ if (U_SUCCESS(status)) {
+ runUnicodeTestData("LBTest.txt", bi);
+ }
+ delete bi;
+ #endif
+
+}
+
+
+//--------------------------------------------------------------------------------------------
+//
+// Run tests from one of the boundary test data files distributed by the Unicode Consortium
+//
+//-------------------------------------------------------------------------------------------
+void RBBITest::runUnicodeTestData(const char *fileName, RuleBasedBreakIterator *bi) {
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ UErrorCode status = U_ZERO_ERROR;
+
+ //
+ // Open and read the test data file, put it into a UnicodeString.
+ //
+ const char *testDataDirectory = IntlTest::getSourceTestData(status);
+ char testFileName[1000];
+ if (testDataDirectory == NULL || strlen(testDataDirectory) >= sizeof(testFileName)) {
+ errln("Can't open test data. Path too long.");
+ return;
+ }
+ strcpy(testFileName, testDataDirectory);
+ strcat(testFileName, fileName);
+
+ int len;
+ UChar *testFile = ReadAndConvertFile(testFileName, len, "UTF-8", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(testFile != NULL);
+ if (U_FAILURE(status) || testFile == NULL) {
+ return; /* something went wrong, error already output */
+ }
+ UnicodeString testFileAsString(TRUE, testFile, len);
+
+ //
+ // Parse the test data file using a regular expression.
+ // Each kind of token is recognized in its own capture group; what type of item was scanned
+ // is identified by which group had a match.
+ //
+ // Caputure Group # 1 2 3 4 5
+ // Parses this item: divide x hex digits comment & nl unrecognized
+ //
+ UnicodeString tokenExpr = "(?ms)\\s*(?:(\\u00F7)|(\\u00D7)|([0-9a-fA-F]+)|(#.*?$.)|(.*?$.))";
+ RegexMatcher tokenMatcher(tokenExpr, testFileAsString, 0, status);
+ UnicodeString testString;
+ UVector32 breakPositions(status);
+ int lineNumber = 1;
+ int charIndex = 0;
+ TEST_ASSERT_SUCCESS(status);
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ //
+ // Scan through each test case, building up the string to be broken in testString,
+ // and the positions that should be boundaries in the breakPositions vector.
+ //
+ while (tokenMatcher.lookingAt(charIndex, status)) {
+ if (tokenMatcher.start(1, status) >= 0) {
+ // Scanned a divide sign, indicating a break position in the test data.
+ if (testString.length()>0) {
+ breakPositions.addElement(testString.length(), status);
+ }
+ }
+ else if (tokenMatcher.start(2, status) >= 0) {
+ // Scanned an 'x', meaning no break at this position in the test data
+ // Nothing to be done here.
+ }
+ else if (tokenMatcher.start(3, status) >= 0) {
+ // Scanned Hex digits. Convert them to binary, append to the character data string.
+ const UnicodeString &hexNumber = tokenMatcher.group(3, status);
+ int length = hexNumber.length();
+ if (length<=8) {
+ char buf[10];
+ hexNumber.extract (0, length, buf, sizeof(buf), US_INV);
+ UChar32 c = (UChar32)strtol(buf, NULL, 16);
+ if (c<=0x10ffff) {
+ testString.append(c);
+ } else {
+ errln("Error: Unicode Character value out of range. \'%s\', line %d.\n",
+ fileName, lineNumber);
+ }
+ } else {
+ errln("Syntax Error: Hex Unicode Character value must have no more than 8 digits at \'%s\', line %d.\n",
+ fileName, lineNumber);
+ }
+ }
+ else if (tokenMatcher.start(4, status) >= 0) {
+ // Scanned to end of a line, possibly skipping over a comment in the process.
+ // If the line from the file contained test data, run the test now.
+ //
+ if (testString.length() > 0) {
+ checkUnicodeTestCase(fileName, lineNumber, testString, &breakPositions, bi);
+ }
+
+ // Clear out this test case.
+ // The string and breakPositions vector will be refilled as the next
+ // test case is parsed.
+ testString.remove();
+ breakPositions.setSize(0);
+ lineNumber++;
+ } else {
+ // Scanner catchall. Something unrecognized appeared on the line.
+ char token[16];
+ UnicodeString uToken = tokenMatcher.group(0, status);
+ uToken.extract(0, uToken.length(), token, (uint32_t)sizeof(token));
+ token[sizeof(token)-1] = 0;
+ errln("Syntax error in test data file \'%s\', line %d. Scanning \"%s\"\n", fileName, lineNumber, token);
+
+ // Clean up, in preparation for continuing with the next line.
+ testString.remove();
+ breakPositions.setSize(0);
+ lineNumber++;
+ }
+ TEST_ASSERT_SUCCESS(status);
+ if (U_FAILURE(status)) {
+ break;
+ }
+ charIndex = tokenMatcher.end(status);
+ }
+
+ delete [] testFile;
+ #endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
+}
+
+//--------------------------------------------------------------------------------------------
+//
+// checkUnicodeTestCase() Run one test case from one of the Unicode Consortium
+// test data files. Do only a simple, forward-only check -
+// this test is mostly to check that ICU and the Unicode
+// data agree with each other.
+//
+//--------------------------------------------------------------------------------------------
+void RBBITest::checkUnicodeTestCase(const char *testFileName, int lineNumber,
+ const UnicodeString &testString, // Text data to be broken
+ UVector32 *breakPositions, // Positions where breaks should be found.
+ RuleBasedBreakIterator *bi) {
+ int32_t pos; // Break Position in the test string
+ int32_t expectedI = 0; // Index of expected break position in the vector of expected results.
+ int32_t expectedPos; // Expected break position (index into test string)
+
+ bi->setText(testString);
+ pos = bi->first();
+ pos = bi->next();
+
+ while (pos != BreakIterator::DONE) {
+ if (expectedI >= breakPositions->size()) {
+ errln("Test file \"%s\", line %d, unexpected break found at position %d",
+ testFileName, lineNumber, pos);
+ break;
+ }
+ expectedPos = breakPositions->elementAti(expectedI);
+ if (pos < expectedPos) {
+ errln("Test file \"%s\", line %d, unexpected break found at position %d",
+ testFileName, lineNumber, pos);
+ break;
+ }
+ if (pos > expectedPos) {
+ errln("Test file \"%s\", line %d, failed to find break at position %d",
+ testFileName, lineNumber, expectedPos);
+ break;
+ }
+ pos = bi->next();
+ expectedI++;
+ }
+
+ if (pos==BreakIterator::DONE && expectedI<breakPositions->size()) {
+ errln("Test file \"%s\", line %d, failed to find break at position %d",
+ testFileName, lineNumber, breakPositions->elementAti(expectedI));
+ }
+}
+
+
+
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+//---------------------------------------------------------------------------------------
+//
+// classs RBBIMonkeyKind
+//
+// Monkey Test for Break Iteration
+// Abstract interface class. Concrete derived classes independently
+// implement the break rules for different iterator types.
+//
+// The Monkey Test itself uses doesn't know which type of break iterator it is
+// testing, but works purely in terms of the interface defined here.
+//
+//---------------------------------------------------------------------------------------
+class RBBIMonkeyKind {
+public:
+ // Return a UVector of UnicodeSets, representing the character classes used
+ // for this type of iterator.
+ virtual UVector *charClasses() = 0;
+
+ // Set the test text on which subsequent calls to next() will operate
+ virtual void setText(const UnicodeString &s) = 0;
+
+ // Find the next break postion, starting from the prev break position, or from zero.
+ // Return -1 after reaching end of string.
+ virtual int32_t next(int32_t i) = 0;
+
+ virtual ~RBBIMonkeyKind();
+ UErrorCode deferredStatus;
+
+
+protected:
+ RBBIMonkeyKind();
+
+private:
+};
+
+RBBIMonkeyKind::RBBIMonkeyKind() {
+ deferredStatus = U_ZERO_ERROR;
+}
+
+RBBIMonkeyKind::~RBBIMonkeyKind() {
+}
+
+
+//----------------------------------------------------------------------------------------
+//
+// Random Numbers. Similar to standard lib rand() and srand()
+// Not using library to
+// 1. Get same results on all platforms.
+// 2. Get access to current seed, to more easily reproduce failures.
+//
+//---------------------------------------------------------------------------------------
+static uint32_t m_seed = 1;
+
+static uint32_t m_rand()
+{
+ m_seed = m_seed * 1103515245 + 12345;
+ return (uint32_t)(m_seed/65536) % 32768;
+}
+
+
+//------------------------------------------------------------------------------------------
+//
+// class RBBICharMonkey Character (Grapheme Cluster) specific implementation
+// of RBBIMonkeyKind.
+//
+//------------------------------------------------------------------------------------------
+class RBBICharMonkey: public RBBIMonkeyKind {
+public:
+ RBBICharMonkey();
+ virtual ~RBBICharMonkey();
+ virtual UVector *charClasses();
+ virtual void setText(const UnicodeString &s);
+ virtual int32_t next(int32_t i);
+private:
+ UVector *fSets;
+
+ UnicodeSet *fCRLFSet;
+ UnicodeSet *fControlSet;
+ UnicodeSet *fExtendSet;
+ UnicodeSet *fHangulSet;
+ UnicodeSet *fAnySet;
+
+ RegexMatcher *fMatcher;
+ const UnicodeString *fText;
+};
+
+
+RBBICharMonkey::RBBICharMonkey() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ fText = NULL;
+ fMatcher = new RegexMatcher("\\X", 0, status); // Pattern to match a grampheme cluster
+
+ fCRLFSet = new UnicodeSet("[\\r\\n]", status);
+ fControlSet = new UnicodeSet("[[\\p{Zl}\\p{Zp}\\p{Cc}\\p{Cf}]-[\\n]-[\\r]-\\p{Grapheme_Extend}]", status);
+ fExtendSet = new UnicodeSet("[\\p{Grapheme_Extend}]", status);
+ fHangulSet = new UnicodeSet(
+ "[\\p{Hangul_Syllable_Type=L}\\p{Hangul_Syllable_Type=L}\\p{Hangul_Syllable_Type=T}"
+ "\\p{Hangul_Syllable_Type=LV}\\p{Hangul_Syllable_Type=LVT}]", status);
+ fAnySet = new UnicodeSet("[\\u0000-\\U0010ffff]", status);
+
+ fSets = new UVector(status);
+ fSets->addElement(fCRLFSet, status);
+ fSets->addElement(fControlSet, status);
+ fSets->addElement(fExtendSet, status);
+ fSets->addElement(fHangulSet, status);
+ fSets->addElement(fAnySet, status);
+ if (U_FAILURE(status)) {
+ deferredStatus = status;
+ }
+}
+
+
+void RBBICharMonkey::setText(const UnicodeString &s) {
+ fText = &s;
+ fMatcher->reset(s);
+}
+
+
+int32_t RBBICharMonkey::next(int32_t i) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t retVal = -1;
+
+ if (fMatcher->find(i, status)) {
+ retVal = fMatcher->end(status);
+ }
+ if (U_FAILURE(status)){
+ retVal = -1;
+ }
+ return retVal;
+}
+
+
+UVector *RBBICharMonkey::charClasses() {
+ return fSets;
+}
+
+
+RBBICharMonkey::~RBBICharMonkey() {
+ delete fSets;
+ delete fCRLFSet;
+ delete fControlSet;
+ delete fExtendSet;
+ delete fHangulSet;
+ delete fAnySet;
+
+ delete fMatcher;
+}
+
+//------------------------------------------------------------------------------------------
+//
+// class RBBIWordMonkey Word Break specific implementation
+// of RBBIMonkeyKind.
+//
+//------------------------------------------------------------------------------------------
+class RBBIWordMonkey: public RBBIMonkeyKind {
+public:
+ RBBIWordMonkey();
+ virtual ~RBBIWordMonkey();
+ virtual UVector *charClasses();
+ virtual void setText(const UnicodeString &s);
+ virtual int32_t next(int32_t i);
+private:
+ UVector *fSets;
+
+ UnicodeSet *fKatakanaSet;
+ UnicodeSet *fALetterSet;
+ UnicodeSet *fMidLetterSet;
+ UnicodeSet *fMidNumSet;
+ UnicodeSet *fNumericSet;
+ UnicodeSet *fFormatSet;
+ UnicodeSet *fOtherSet;
+ UnicodeSet *fExtendSet;
+ UnicodeSet *fExtendNumLetSet;
+
+ RegexMatcher *fMatcher;
+
+ const UnicodeString *fText;
+};
+
+
+RBBIWordMonkey::RBBIWordMonkey()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+
+ fSets = new UVector(status);
+
+ fALetterSet = new UnicodeSet("[\\p{Word_Break = ALetter}"
+ "[\\p{Line_Break = Complex_Context}"
+ "-\\p{Grapheme_Cluster_Break = Extend}"
+ "-\\p{Grapheme_Cluster_Break = Control}]]", status);
+ //fALetterSet = new UnicodeSet("[\\p{Word_Break = ALetter}]", status);
+ fKatakanaSet = new UnicodeSet("[\\p{Word_Break = Katakana}-[\\uff9e\\uff9f]]", status);
+ fMidLetterSet = new UnicodeSet("[\\p{Word_Break = MidLetter}]", status);
+ fMidNumSet = new UnicodeSet("[\\p{Word_Break = MidNum}]", status);
+ fNumericSet = new UnicodeSet("[\\p{Word_Break = Numeric}]", status);
+ fFormatSet = new UnicodeSet("[\\p{Word_Break = Format}]", status);
+ fExtendNumLetSet = new UnicodeSet("[\\p{Word_Break = ExtendNumLet}]", status);
+ //fExtendSet = new UnicodeSet("[\\p{Word_Break = Extend}]", status);
+ fExtendSet = new UnicodeSet("[\\p{Grapheme_Cluster_Break = Extend}\\uff9e\\uff9f]", status);
+
+ fOtherSet = new UnicodeSet();
+ if(U_FAILURE(status)) {
+ deferredStatus = status;
+ return;
+ }
+
+ fOtherSet->complement();
+ fOtherSet->removeAll(*fKatakanaSet);
+ fOtherSet->removeAll(*fALetterSet);
+ fOtherSet->removeAll(*fMidLetterSet);
+ fOtherSet->removeAll(*fMidNumSet);
+ fOtherSet->removeAll(*fNumericSet);
+ fOtherSet->removeAll(*fExtendNumLetSet);
+ fOtherSet->removeAll(*fFormatSet);
+ fOtherSet->removeAll(*fExtendSet);
+
+ fSets->addElement(fALetterSet, status);
+ fSets->addElement(fKatakanaSet, status);
+ fSets->addElement(fMidLetterSet, status);
+ fSets->addElement(fMidNumSet, status);
+ fSets->addElement(fNumericSet, status);
+ fSets->addElement(fFormatSet, status);
+ fSets->addElement(fExtendSet, status);
+ fSets->addElement(fOtherSet, status);
+ fSets->addElement(fExtendNumLetSet, status);
+
+
+ if (U_FAILURE(status)) {
+ deferredStatus = status;
+ }
+}
+
+void RBBIWordMonkey::setText(const UnicodeString &s) {
+ fText = &s;
+}
+
+
+int32_t RBBIWordMonkey::next(int32_t prevPos) {
+ int p0, p1, p2, p3; // Indices of the significant code points around the
+ // break position being tested. The candidate break
+ // location is before p2.
+
+ int breakPos = -1;
+
+ UChar32 c0, c1, c2, c3; // The code points at p0, p1, p2 & p3.
+
+ // Prev break at end of string. return DONE.
+ if (prevPos >= fText->length()) {
+ return -1;
+ }
+ p0 = p1 = p2 = p3 = prevPos;
+ c3 = fText->char32At(prevPos);
+ c0 = c1 = c2 = 0;
+
+ // Loop runs once per "significant" character position in the input text.
+ for (;;) {
+ // Move all of the positions forward in the input string.
+ p0 = p1; c0 = c1;
+ p1 = p2; c1 = c2;
+ p2 = p3; c2 = c3;
+
+ // Advancd p3 by X(Extend | Format)* Rule 4
+ do {
+ p3 = fText->moveIndex32(p3, 1);
+ c3 = fText->char32At(p3);
+ }
+ while (fFormatSet->contains(c3) || fExtendSet->contains(c3));
+
+
+ if (p1 == p2) {
+ // Still warming up the loop. (won't work with zero length strings, but we don't care)
+ continue;
+ }
+ if (p2 == fText->length()) {
+ // Reached end of string. Always a break position.
+ break;
+ }
+
+ // Rule (3) CR x LF
+ // No Extend or Format characters may appear between the CR and LF,
+ // which requires the additional check for p2 immediately following p1.
+ //
+ if (c1==0x0D && c2==0x0A && p1==(p2-1)) {
+ continue;
+ }
+
+ // Rule (5). ALetter x ALetter
+ if (fALetterSet->contains(c1) &&
+ fALetterSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (6) ALetter x (MidLetter | MidNumLet) ALetter
+ //
+ // Also incorporates rule 7 by skipping pos ahead to position of the
+ // terminating ALetter.
+ if ( fALetterSet->contains(c1) &&
+ fMidLetterSet->contains(c2) &&
+ fALetterSet->contains(c3)) {
+ continue;
+ }
+
+
+ // Rule (7) ALetter (MidLetter | MidNumLet) x ALetter
+ if (fALetterSet->contains(c0) &&
+ (fMidLetterSet->contains(c1) ) &&
+ fALetterSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (8) Numeric x Numeric
+ if (fNumericSet->contains(c1) &&
+ fNumericSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (9) ALetter x Numeric
+ if (fALetterSet->contains(c1) &&
+ fNumericSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (10) Numeric x ALetter
+ if (fNumericSet->contains(c1) &&
+ fALetterSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (11) Numeric (MidNum | MidNumLet) x Numeric
+ if ( fNumericSet->contains(c0) &&
+ fMidNumSet->contains(c1) &&
+ fNumericSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (12) Numeric x (MidNum | MidNumLet) Numeric
+ if (fNumericSet->contains(c1) &&
+ fMidNumSet->contains(c2) &&
+ fNumericSet->contains(c3)) {
+ continue;
+ }
+
+ // Rule (13) Katakana x Katakana
+ if (fKatakanaSet->contains(c1) &&
+ fKatakanaSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule 13a
+ if ((fALetterSet->contains(c1) || fNumericSet->contains(c1) ||
+ fKatakanaSet->contains(c1) || fExtendNumLetSet->contains(c1)) &&
+ fExtendNumLetSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule 13b
+ if (fExtendNumLetSet->contains(c1) &&
+ (fALetterSet->contains(c2) || fNumericSet->contains(c2) ||
+ fKatakanaSet->contains(c2))) {
+ continue;
+ }
+
+ // Rule 14. Break found here.
+ break;
+ }
+
+ breakPos = p2;
+ return breakPos;
+}
+
+
+UVector *RBBIWordMonkey::charClasses() {
+ return fSets;
+}
+
+
+RBBIWordMonkey::~RBBIWordMonkey() {
+ delete fSets;
+ delete fKatakanaSet;
+ delete fALetterSet;
+ delete fMidLetterSet;
+ delete fMidNumSet;
+ delete fNumericSet;
+ delete fFormatSet;
+ delete fExtendSet;
+ delete fExtendNumLetSet;
+ delete fOtherSet;
+}
+
+
+
+
+//------------------------------------------------------------------------------------------
+//
+// class RBBISentMonkey Sentence Break specific implementation
+// of RBBIMonkeyKind.
+//
+//------------------------------------------------------------------------------------------
+class RBBISentMonkey: public RBBIMonkeyKind {
+public:
+ RBBISentMonkey();
+ virtual ~RBBISentMonkey();
+ virtual UVector *charClasses();
+ virtual void setText(const UnicodeString &s);
+ virtual int32_t next(int32_t i);
+private:
+ int moveBack(int posFrom);
+ int moveForward(int posFrom);
+ UChar32 cAt(int pos);
+
+ UVector *fSets;
+
+ UnicodeSet *fSepSet;
+ UnicodeSet *fFormatSet;
+ UnicodeSet *fSpSet;
+ UnicodeSet *fLowerSet;
+ UnicodeSet *fUpperSet;
+ UnicodeSet *fOLetterSet;
+ UnicodeSet *fNumericSet;
+ UnicodeSet *fATermSet;
+ UnicodeSet *fSTermSet;
+ UnicodeSet *fCloseSet;
+ UnicodeSet *fOtherSet;
+ UnicodeSet *fExtendSet;
+
+ const UnicodeString *fText;
+
+};
+
+RBBISentMonkey::RBBISentMonkey()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ fSets = new UVector(status);
+
+ fSepSet = new UnicodeSet("[\\p{Sentence_Break = Sep}]", status);
+ fFormatSet = new UnicodeSet("[\\p{Sentence_Break = Format}]", status);
+ fSpSet = new UnicodeSet("[\\p{Sentence_Break = Sp}]", status);
+ fLowerSet = new UnicodeSet("[\\p{Sentence_Break = Lower}]", status);
+ fUpperSet = new UnicodeSet("[\\p{Sentence_Break = Upper}]", status);
+ fOLetterSet = new UnicodeSet("[\\p{Sentence_Break = OLetter}-[\\uff9e\\uff9f]]", status);
+ fNumericSet = new UnicodeSet("[\\p{Sentence_Break = Numeric}]", status);
+ fATermSet = new UnicodeSet("[\\p{Sentence_Break = ATerm}]", status);
+ fSTermSet = new UnicodeSet("[\\p{Sentence_Break = STerm}]", status);
+ fCloseSet = new UnicodeSet("[\\p{Sentence_Break = Close}]", status);
+ fExtendSet = new UnicodeSet("[\\p{Grapheme_Extend}\\uff9e\\uff9f]", status);
+ fOtherSet = new UnicodeSet();
+
+ if(U_FAILURE(status)) {
+ deferredStatus = status;
+ return;
+ }
+
+ fOtherSet->complement();
+ fOtherSet->removeAll(*fSepSet);
+ fOtherSet->removeAll(*fFormatSet);
+ fOtherSet->removeAll(*fSpSet);
+ fOtherSet->removeAll(*fLowerSet);
+ fOtherSet->removeAll(*fUpperSet);
+ fOtherSet->removeAll(*fOLetterSet);
+ fOtherSet->removeAll(*fNumericSet);
+ fOtherSet->removeAll(*fATermSet);
+ fOtherSet->removeAll(*fSTermSet);
+ fOtherSet->removeAll(*fCloseSet);
+ fOtherSet->removeAll(*fExtendSet);
+
+ fSets->addElement(fSepSet, status);
+ fSets->addElement(fFormatSet, status);
+
+ fSets->addElement(fSpSet, status);
+ fSets->addElement(fLowerSet, status);
+ fSets->addElement(fUpperSet, status);
+ fSets->addElement(fOLetterSet, status);
+ fSets->addElement(fNumericSet, status);
+ fSets->addElement(fATermSet, status);
+ fSets->addElement(fSTermSet, status);
+ fSets->addElement(fCloseSet, status);
+ fSets->addElement(fOtherSet, status);
+ fSets->addElement(fExtendSet, status);
+
+ if (U_FAILURE(status)) {
+ deferredStatus = status;
+ }
+}
+
+
+
+void RBBISentMonkey::setText(const UnicodeString &s) {
+ fText = &s;
+}
+
+UVector *RBBISentMonkey::charClasses() {
+ return fSets;
+}
+
+
+// moveBack() Find the "significant" code point preceding the index i.
+// Skips over ($Extend | $Format)* .
+//
+int RBBISentMonkey::moveBack(int i) {
+ if (i <= 0) {
+ return -1;
+ }
+ UChar32 c;
+ int32_t j = i;
+ do {
+ j = fText->moveIndex32(j, -1);
+ c = fText->char32At(j);
+ }
+ while (j>0 &&(fFormatSet->contains(c) || fExtendSet->contains(c)));
+ return j;
+
+ }
+
+
+int RBBISentMonkey::moveForward(int i) {
+ if (i>=fText->length()) {
+ return fText->length();
+ }
+ UChar32 c;
+ int32_t j = i;
+ do {
+ j = fText->moveIndex32(j, 1);
+ c = cAt(j);
+ }
+ while (fFormatSet->contains(c) || fExtendSet->contains(c));
+ return j;
+}
+
+UChar32 RBBISentMonkey::cAt(int pos) {
+ if (pos<0 || pos>=fText->length()) {
+ return -1;
+ } else {
+ return fText->char32At(pos);
+ }
+}
+
+int32_t RBBISentMonkey::next(int32_t prevPos) {
+ int p0, p1, p2, p3; // Indices of the significant code points around the
+ // break position being tested. The candidate break
+ // location is before p2.
+
+ int breakPos = -1;
+
+ UChar32 c0, c1, c2, c3; // The code points at p0, p1, p2 & p3.
+ UChar32 c;
+
+ // Prev break at end of string. return DONE.
+ if (prevPos >= fText->length()) {
+ return -1;
+ }
+ p0 = p1 = p2 = p3 = prevPos;
+ c3 = fText->char32At(prevPos);
+ c0 = c1 = c2 = 0;
+
+ // Loop runs once per "significant" character position in the input text.
+ for (;;) {
+ // Move all of the positions forward in the input string.
+ p0 = p1; c0 = c1;
+ p1 = p2; c1 = c2;
+ p2 = p3; c2 = c3;
+
+ // Advancd p3 by X(Extend | Format)* Rule 4
+ p3 = moveForward(p3);
+ c3 = cAt(p3);
+
+ // Rule (3) CR x LF
+ if (c1==0x0d && c2==0x0a && p2==(p1+1)) {
+ continue;
+ }
+
+ // Rule (4). Sep <break>
+ if (fSepSet->contains(c1)) {
+ p2 = p1+1; // Separators don't combine with Extend or Format.
+ break;
+ }
+
+ if (p2 >= fText->length()) {
+ // Reached end of string. Always a break position.
+ break;
+ }
+
+ if (p2 == prevPos) {
+ // Still warming up the loop. (won't work with zero length strings, but we don't care)
+ continue;
+ }
+
+ // Rule (6). ATerm x Numeric
+ if (fATermSet->contains(c1) && fNumericSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (7). Upper ATerm x Uppper
+ if (fUpperSet->contains(c0) && fATermSet->contains(c1) && fUpperSet->contains(c2)) {
+ continue;
+ }
+
+ // Rule (8) ATerm Close* Sp* x (not (OLettter | Upper | Lower | Sep | STerm | ATerm))* Lower
+ // Note: STerm | ATerm are added to the negated part of the expression by a
+ // note to the Unicode 5.0 documents.
+ int p8 = p1;
+ while (fSpSet->contains(cAt(p8))) {
+ p8 = moveBack(p8);
+ }
+ while (fCloseSet->contains(cAt(p8))) {
+ p8 = moveBack(p8);
+ }
+ if (fATermSet->contains(cAt(p8))) {
+ p8=p2;
+ for (;;) {
+ c = cAt(p8);
+ if (c==-1 || fOLetterSet->contains(c) || fUpperSet->contains(c) ||
+ fLowerSet->contains(c) || fSepSet->contains(c) ||
+ fATermSet->contains(c) || fSTermSet->contains(c)) {
+ break;
+ }
+ p8 = moveForward(p8);
+ }
+ if (fLowerSet->contains(cAt(p8))) {
+ continue;
+ }
+ }
+
+ // Rule 8a (STerm | ATerm) Close* Sp* x (STerm | ATerm);
+ if (fSTermSet->contains(c2) || fATermSet->contains(c2)) {
+ p8 = p1;
+ while (fSpSet->contains(cAt(p8))) {
+ p8 = moveBack(p8);
+ }
+ while (fCloseSet->contains(cAt(p8))) {
+ p8 = moveBack(p8);
+ }
+ c = cAt(p8);
+ if (fSTermSet->contains(c) || fATermSet->contains(c)) {
+ continue;
+ }
+ }
+
+ // Rule (9) (STerm | ATerm) Close* x (Close | Sp | Sep)
+ int p9 = p1;
+ while (fCloseSet->contains(cAt(p9))) {
+ p9 = moveBack(p9);
+ }
+ c = cAt(p9);
+ if ((fSTermSet->contains(c) || fATermSet->contains(c))) {
+ if (fCloseSet->contains(c2) || fSpSet->contains(c2) || fSepSet->contains(c2)) {
+ continue;
+ }
+ }
+
+ // Rule (10) (Sterm | ATerm) Close* Sp* x (Sp | Sep)
+ int p10 = p1;
+ while (fSpSet->contains(cAt(p10))) {
+ p10 = moveBack(p10);
+ }
+ while (fCloseSet->contains(cAt(p10))) {
+ p10 = moveBack(p10);
+ }
+ if (fSTermSet->contains(cAt(p10)) || fATermSet->contains(cAt(p10))) {
+ if (fSpSet->contains(c2) || fSepSet->contains(c2)) {
+ continue;
+ }
+ }
+
+ // Rule (11) (STerm | ATerm) Close* Sp* <break>
+ int p11 = p1;
+ while (fSpSet->contains(cAt(p11))) {
+ p11 = moveBack(p11);
+ }
+ while (fCloseSet->contains(cAt(p11))) {
+ p11 = moveBack(p11);
+ }
+ if (fSTermSet->contains(cAt(p11)) || fATermSet->contains(cAt(p11))) {
+ break;
+ }
+
+ // Rule (12) Any x Any
+ continue;
+ }
+ breakPos = p2;
+ return breakPos;
+}
+
+RBBISentMonkey::~RBBISentMonkey() {
+ delete fSets;
+ delete fSepSet;
+ delete fFormatSet;
+ delete fSpSet;
+ delete fLowerSet;
+ delete fUpperSet;
+ delete fOLetterSet;
+ delete fNumericSet;
+ delete fATermSet;
+ delete fSTermSet;
+ delete fCloseSet;
+ delete fOtherSet;
+ delete fExtendSet;
+}
+
+
+
+//-------------------------------------------------------------------------------------------
+//
+// RBBILineMonkey
+//
+//-------------------------------------------------------------------------------------------
+
+class RBBILineMonkey: public RBBIMonkeyKind {
+public:
+ RBBILineMonkey();
+ virtual ~RBBILineMonkey();
+ virtual UVector *charClasses();
+ virtual void setText(const UnicodeString &s);
+ virtual int32_t next(int32_t i);
+ virtual void rule9Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos, UChar32 *nextChar);
+private:
+ UVector *fSets;
+
+ UnicodeSet *fBK;
+ UnicodeSet *fCR;
+ UnicodeSet *fLF;
+ UnicodeSet *fCM;
+ UnicodeSet *fNL;
+ UnicodeSet *fSG;
+ UnicodeSet *fWJ;
+ UnicodeSet *fZW;
+ UnicodeSet *fGL;
+ UnicodeSet *fCB;
+ UnicodeSet *fSP;
+ UnicodeSet *fB2;
+ UnicodeSet *fBA;
+ UnicodeSet *fBB;
+ UnicodeSet *fHY;
+ UnicodeSet *fH2;
+ UnicodeSet *fH3;
+ UnicodeSet *fCL;
+ UnicodeSet *fEX;
+ UnicodeSet *fIN;
+ UnicodeSet *fJL;
+ UnicodeSet *fJV;
+ UnicodeSet *fJT;
+ UnicodeSet *fNS;
+ UnicodeSet *fOP;
+ UnicodeSet *fQU;
+ UnicodeSet *fIS;
+ UnicodeSet *fNU;
+ UnicodeSet *fPO;
+ UnicodeSet *fPR;
+ UnicodeSet *fSY;
+ UnicodeSet *fAI;
+ UnicodeSet *fAL;
+ UnicodeSet *fID;
+ UnicodeSet *fSA;
+ UnicodeSet *fXX;
+
+ BreakIterator *fCharBI;
+
+ const UnicodeString *fText;
+ int32_t *fOrigPositions;
+
+ RegexMatcher *fNumberMatcher;
+ RegexMatcher *fLB11Matcher;
+};
+
+
+RBBILineMonkey::RBBILineMonkey()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ fSets = new UVector(status);
+
+ fBK = new UnicodeSet("[\\p{Line_Break=BK}]", status);
+ fCR = new UnicodeSet("[\\p{Line_break=CR}]", status);
+ fLF = new UnicodeSet("[\\p{Line_break=LF}]", status);
+ fCM = new UnicodeSet("[\\p{Line_break=CM}]", status);
+ fNL = new UnicodeSet("[\\p{Line_break=NL}]", status);
+ fWJ = new UnicodeSet("[\\p{Line_break=WJ}]", status);
+ fZW = new UnicodeSet("[\\p{Line_break=ZW}]", status);
+ fGL = new UnicodeSet("[\\p{Line_break=GL}]", status);
+ fCB = new UnicodeSet("[\\p{Line_break=CB}]", status);
+ fSP = new UnicodeSet("[\\p{Line_break=SP}]", status);
+ fB2 = new UnicodeSet("[\\p{Line_break=B2}]", status);
+ fBA = new UnicodeSet("[\\p{Line_break=BA}]", status);
+ fBB = new UnicodeSet("[\\p{Line_break=BB}]", status);
+ fHY = new UnicodeSet("[\\p{Line_break=HY}]", status);
+ fH2 = new UnicodeSet("[\\p{Line_break=H2}]", status);
+ fH3 = new UnicodeSet("[\\p{Line_break=H3}]", status);
+ fCL = new UnicodeSet("[\\p{Line_break=CL}]", status);
+ fEX = new UnicodeSet("[\\p{Line_break=EX}]", status);
+ fIN = new UnicodeSet("[\\p{Line_break=IN}]", status);
+ fJL = new UnicodeSet("[\\p{Line_break=JL}]", status);
+ fJV = new UnicodeSet("[\\p{Line_break=JV}]", status);
+ fJT = new UnicodeSet("[\\p{Line_break=JT}]", status);
+ fNS = new UnicodeSet("[\\p{Line_break=NS}]", status);
+ fOP = new UnicodeSet("[\\p{Line_break=OP}]", status);
+ fQU = new UnicodeSet("[\\p{Line_break=QU}]", status);
+ fIS = new UnicodeSet("[\\p{Line_break=IS}]", status);
+ fNU = new UnicodeSet("[\\p{Line_break=NU}]", status);
+ fPO = new UnicodeSet("[\\p{Line_break=PO}]", status);
+ fPR = new UnicodeSet("[\\p{Line_break=PR}]", status);
+ fSY = new UnicodeSet("[\\p{Line_break=SY}]", status);
+ fAI = new UnicodeSet("[\\p{Line_break=AI}]", status);
+ fAL = new UnicodeSet("[\\p{Line_break=AL}]", status);
+ fID = new UnicodeSet("[\\p{Line_break=ID}]", status);
+ fSA = new UnicodeSet("[\\p{Line_break=SA}]", status);
+ fSG = new UnicodeSet("[\\ud800-\\udfff]", status);
+ fXX = new UnicodeSet("[\\p{Line_break=XX}]", status);
+
+ if (U_FAILURE(status)) {
+ deferredStatus = status;
+ fCharBI = NULL;
+ fNumberMatcher = NULL;
+ return;
+ }
+
+ fAL->addAll(*fXX); // Default behavior for XX is identical to AL
+ fAL->addAll(*fAI); // Default behavior for AI is identical to AL
+ fAL->addAll(*fSA); // Default behavior for SA is XX, which defaults to AL
+ fAL->addAll(*fSG); // Default behavior for SG is identical to AL.
+
+ fSets->addElement(fBK, status);
+ fSets->addElement(fCR, status);
+ fSets->addElement(fLF, status);
+ fSets->addElement(fCM, status);
+ fSets->addElement(fNL, status);
+ fSets->addElement(fWJ, status);
+ fSets->addElement(fZW, status);
+ fSets->addElement(fGL, status);
+ fSets->addElement(fCB, status);
+ fSets->addElement(fSP, status);
+ fSets->addElement(fB2, status);
+ fSets->addElement(fBA, status);
+ fSets->addElement(fBB, status);
+ fSets->addElement(fHY, status);
+ fSets->addElement(fH2, status);
+ fSets->addElement(fH3, status);
+ fSets->addElement(fCL, status);
+ fSets->addElement(fEX, status);
+ fSets->addElement(fIN, status);
+ fSets->addElement(fJL, status);
+ fSets->addElement(fJT, status);
+ fSets->addElement(fJV, status);
+ fSets->addElement(fNS, status);
+ fSets->addElement(fOP, status);
+ fSets->addElement(fQU, status);
+ fSets->addElement(fIS, status);
+ fSets->addElement(fNU, status);
+ fSets->addElement(fPO, status);
+ fSets->addElement(fPR, status);
+ fSets->addElement(fSY, status);
+ fSets->addElement(fAI, status);
+ fSets->addElement(fAL, status);
+ fSets->addElement(fID, status);
+ fSets->addElement(fWJ, status);
+ fSets->addElement(fSA, status);
+ fSets->addElement(fSG, status);
+
+ fNumberMatcher = new RegexMatcher(
+ "((\\p{Line_Break=PR}|\\p{Line_Break=PO})\\p{Line_Break=CM}*)?"
+ "((\\p{Line_Break=OP}|\\p{Line_Break=HY})\\p{Line_Break=CM}*)?"
+ "\\p{Line_Break=NU}\\p{Line_Break=CM}*"
+ "((\\p{Line_Break=NU}|\\p{Line_Break=IS}|\\p{Line_Break=SY})\\p{Line_Break=CM}*)*"
+ "(\\p{Line_Break=CL}\\p{Line_Break=CM}*)?"
+ "((\\p{Line_Break=PR}|\\p{Line_Break=PO})\\p{Line_Break=CM}*)?",
+ 0, status);
+
+ fCharBI = BreakIterator::createCharacterInstance(Locale::getEnglish(), status);
+
+ if (U_FAILURE(status)) {
+ deferredStatus = status;
+ }
+}
+
+
+void RBBILineMonkey::setText(const UnicodeString &s) {
+ fText = &s;
+ fCharBI->setText(s);
+ fNumberMatcher->reset(s);
+}
+
+//
+// rule9Adjust
+// Line Break TR rules 9 and 10 implementation.
+// This deals with combining marks and other sequences that
+// that must be treated as if they were something other than what they actually are.
+//
+// This is factored out into a separate function because it must be applied twice for
+// each potential break, once to the chars before the position being checked, then
+// again to the text following the possible break.
+//
+void RBBILineMonkey::rule9Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos, UChar32 *nextChar) {
+ if (pos == -1) {
+ // Invalid initial position. Happens during the warmup iteration of the
+ // main loop in next().
+ return;
+ }
+
+ int32_t nPos = *nextPos;
+
+ // LB 9 Keep combining sequences together.
+ // advance over any CM class chars. Note that Line Break CM is different
+ // from the normal Grapheme Extend property.
+ if (!(fSP->contains(*posChar) || fBK->contains(*posChar) || *posChar==0x0d ||
+ *posChar==0x0a ||fNL->contains(*posChar) || fZW->contains(*posChar))) {
+ for (;;) {
+ *nextChar = fText->char32At(nPos);
+ if (!fCM->contains(*nextChar)) {
+ break;
+ }
+ nPos = fText->moveIndex32(nPos, 1);
+ }
+ }
+
+
+ // LB 9 Treat X CM* as if it were x.
+ // No explicit action required.
+
+ // LB 10 Treat any remaining combining mark as AL
+ if (fCM->contains(*posChar)) {
+ *posChar = 0x41; // thisChar = 'A';
+ }
+
+ // Push the updated nextPos and nextChar back to our caller.
+ // This only makes a difference if posChar got bigger by consuming a
+ // combining sequence.
+ *nextPos = nPos;
+ *nextChar = fText->char32At(nPos);
+}
+
+
+
+int32_t RBBILineMonkey::next(int32_t startPos) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t pos; // Index of the char following a potential break position
+ UChar32 thisChar; // Character at above position "pos"
+
+ int32_t prevPos; // Index of the char preceding a potential break position
+ UChar32 prevChar; // Character at above position. Note that prevChar
+ // and thisChar may not be adjacent because combining
+ // characters between them will be ignored.
+
+ int32_t nextPos; // Index of the next character following pos.
+ // Usually skips over combining marks.
+ int32_t nextCPPos; // Index of the code point following "pos."
+ // May point to a combining mark.
+ int32_t tPos; // temp value.
+ UChar32 c;
+
+ if (startPos >= fText->length()) {
+ return -1;
+ }
+
+
+ // Initial values for loop. Loop will run the first time without finding breaks,
+ // while the invalid values shift out and the "this" and
+ // "prev" positions are filled in with good values.
+ pos = prevPos = -1; // Invalid value, serves as flag for initial loop iteration.
+ thisChar = prevChar = 0;
+ nextPos = nextCPPos = startPos;
+
+
+ // Loop runs once per position in the test text, until a break position
+ // is found.
+ for (;;) {
+ prevPos = pos;
+ prevChar = thisChar;
+
+ pos = nextPos;
+ thisChar = fText->char32At(pos);
+
+ nextCPPos = fText->moveIndex32(pos, 1);
+ nextPos = nextCPPos;
+
+ // Rule LB2 - Break at end of text.
+ if (pos >= fText->length()) {
+ break;
+ }
+
+ // Rule LB 9 - adjust for combining sequences.
+ // We do this one out-of-order because the adjustment does not change anything
+ // that would match rules LB 3 - LB 6, but after the adjustment, LB 3-6 do need to
+ // be applied.
+ rule9Adjust(prevPos, &prevChar, &pos, &thisChar);
+ nextCPPos = nextPos = fText->moveIndex32(pos, 1);
+ c = fText->char32At(nextPos);
+ rule9Adjust(pos, &thisChar, &nextPos, &c);
+
+ // If the loop is still warming up - if we haven't shifted the initial
+ // -1 positions out of prevPos yet - loop back to advance the
+ // position in the input without any further looking for breaks.
+ if (prevPos == -1) {
+ continue;
+ }
+
+ // LB 4 Always break after hard line breaks,
+ if (fBK->contains(prevChar)) {
+ break;
+ }
+
+ // LB 5 Break after CR, LF, NL, but not inside CR LF
+ if (prevChar == 0x0d && thisChar == 0x0a) {
+ continue;
+ }
+ if (prevChar == 0x0d ||
+ prevChar == 0x0a ||
+ prevChar == 0x85) {
+ break;
+ }
+
+ // LB 6 Don't break before hard line breaks
+ if (thisChar == 0x0d || thisChar == 0x0a || thisChar == 0x85 ||
+ fBK->contains(thisChar)) {
+ continue;
+ }
+
+
+ // LB 7 Don't break before spaces or zero-width space.
+ if (fSP->contains(thisChar)) {
+ continue;
+ }
+
+ if (fZW->contains(thisChar)) {
+ continue;
+ }
+
+ // LB 8 Break after zero width space
+ if (fZW->contains(prevChar)) {
+ break;
+ }
+
+ // LB 9, 10 Already done, at top of loop.
+ //
+
+
+ // LB 11 Do not break before or after WORD JOINER and related characters.
+ // x WJ
+ // WJ x
+ //
+ if (fWJ->contains(thisChar) || fWJ->contains(prevChar)) {
+ continue;
+ }
+
+ // LB 12
+ // (!SP) x GL
+ // GL x
+ if ((!fSP->contains(prevChar)) && fGL->contains(thisChar) ||
+ fGL->contains(prevChar)) {
+ continue;
+ }
+
+
+
+ // LB 13 Don't break before closings.
+ // NU x CL and NU x IS are not matched here so that they will
+ // fall into LB 17 and the more general number regular expression.
+ //
+ if (!fNU->contains(prevChar) && fCL->contains(thisChar) ||
+ fEX->contains(thisChar) ||
+ !fNU->contains(prevChar) && fIS->contains(thisChar) ||
+ !fNU->contains(prevChar) && fSY->contains(thisChar)) {
+ continue;
+ }
+
+ // LB 14 Don't break after OP SP*
+ // Scan backwards, checking for this sequence.
+ // The OP char could include combining marks, so we actually check for
+ // OP CM* SP*
+ // Another Twist: The Rule 67 fixes may have changed a SP CM
+ // sequence into a ID char, so before scanning back through spaces,
+ // verify that prevChar is indeed a space. The prevChar variable
+ // may differ from fText[prevPos]
+ tPos = prevPos;
+ if (fSP->contains(prevChar)) {
+ while (tPos > 0 && fSP->contains(fText->char32At(tPos))) {
+ tPos=fText->moveIndex32(tPos, -1);
+ }
+ }
+ while (tPos > 0 && fCM->contains(fText->char32At(tPos))) {
+ tPos=fText->moveIndex32(tPos, -1);
+ }
+ if (fOP->contains(fText->char32At(tPos))) {
+ continue;
+ }
+
+
+ // LB 15 QU SP* x OP
+ if (fOP->contains(thisChar)) {
+ // Scan backwards from prevChar to see if it is preceded by QU CM* SP*
+ int tPos = prevPos;
+ while (tPos>0 && fSP->contains(fText->char32At(tPos))) {
+ tPos = fText->moveIndex32(tPos, -1);
+ }
+ while (tPos>0 && fCM->contains(fText->char32At(tPos))) {
+ tPos = fText->moveIndex32(tPos, -1);
+ }
+ if (fQU->contains(fText->char32At(tPos))) {
+ continue;
+ }
+ }
+
+
+
+ // LB 16 CL SP* x NS
+ // Scan backwards for SP* CM* CL
+ if (fNS->contains(thisChar)) {
+ int tPos = prevPos;
+ while (tPos>0 && fSP->contains(fText->char32At(tPos))) {
+ tPos = fText->moveIndex32(tPos, -1);
+ }
+ while (tPos>0 && fCM->contains(fText->char32At(tPos))) {
+ tPos = fText->moveIndex32(tPos, -1);
+ }
+ if (fCL->contains(fText->char32At(tPos))) {
+ continue;
+ }
+ }
+
+
+ // LB 17 B2 SP* x B2
+ if (fB2->contains(thisChar)) {
+ // Scan backwards, checking for the B2 CM* SP* sequence.
+ tPos = prevPos;
+ if (fSP->contains(prevChar)) {
+ while (tPos > 0 && fSP->contains(fText->char32At(tPos))) {
+ tPos=fText->moveIndex32(tPos, -1);
+ }
+ }
+ while (tPos > 0 && fCM->contains(fText->char32At(tPos))) {
+ tPos=fText->moveIndex32(tPos, -1);
+ }
+ if (fB2->contains(fText->char32At(tPos))) {
+ continue;
+ }
+ }
+
+
+ // LB 18 break after space
+ if (fSP->contains(prevChar)) {
+ break;
+ }
+
+ // LB 19
+ // x QU
+ // QU x
+ if (fQU->contains(thisChar) || fQU->contains(prevChar)) {
+ continue;
+ }
+
+ // LB 20 Break around a CB
+ if (fCB->contains(thisChar) || fCB->contains(prevChar)) {
+ break;
+ }
+
+ // LB 21
+ if (fBA->contains(thisChar) ||
+ fHY->contains(thisChar) ||
+ fNS->contains(thisChar) ||
+ fBB->contains(prevChar) ) {
+ continue;
+ }
+
+ // LB 22
+ if (fAL->contains(prevChar) && fIN->contains(thisChar) ||
+ fID->contains(prevChar) && fIN->contains(thisChar) ||
+ fIN->contains(prevChar) && fIN->contains(thisChar) ||
+ fNU->contains(prevChar) && fIN->contains(thisChar) ) {
+ continue;
+ }
+
+
+ // LB 23 ID x PO
+ // AL x NU
+ // NU x AL
+ if (fID->contains(prevChar) && fPO->contains(thisChar) ||
+ fAL->contains(prevChar) && fNU->contains(thisChar) ||
+ fNU->contains(prevChar) && fAL->contains(thisChar) ) {
+ continue;
+ }
+
+ // LB 24 Do not break between prefix and letters or ideographs.
+ // PR x ID
+ // PR x AL
+ // PO x AL
+ if (fPR->contains(prevChar) && fID->contains(thisChar) ||
+ fPR->contains(prevChar) && fAL->contains(thisChar) ||
+ fPO->contains(prevChar) && fAL->contains(thisChar) ) {
+ continue;
+ }
+
+
+
+ // LB 25 Numbers
+ if (fNumberMatcher->lookingAt(prevPos, status)) {
+ if (U_FAILURE(status)) {
+ break;
+ }
+ // Matched a number. But could have been just a single digit, which would
+ // not represent a "no break here" between prevChar and thisChar
+ int32_t numEndIdx = fNumberMatcher->end(status); // idx of first char following num
+ if (numEndIdx > pos) {
+ // Number match includes at least our two chars being checked
+ if (numEndIdx > nextPos) {
+ // Number match includes additional chars. Update pos and nextPos
+ // so that next loop iteration will continue at the end of the number,
+ // checking for breaks between last char in number & whatever follows.
+ pos = nextPos = numEndIdx;
+ do {
+ pos = fText->moveIndex32(pos, -1);
+ thisChar = fText->char32At(pos);
+ } while (fCM->contains(thisChar));
+ }
+ continue;
+ }
+ }
+
+
+ // LB 26 Do not break a Korean syllable.
+ if (fJL->contains(prevChar) && (fJL->contains(thisChar) ||
+ fJV->contains(thisChar) ||
+ fH2->contains(thisChar) ||
+ fH3->contains(thisChar))) {
+ continue;
+ }
+
+ if ((fJV->contains(prevChar) || fH2->contains(prevChar)) &&
+ (fJV->contains(thisChar) || fJT->contains(thisChar))) {
+ continue;
+ }
+
+ if ((fJT->contains(prevChar) || fH3->contains(prevChar)) &&
+ fJT->contains(thisChar)) {
+ continue;
+ }
+
+ // LB 27 Treat a Korean Syllable Block the same as ID.
+ if ((fJL->contains(prevChar) || fJV->contains(prevChar) ||
+ fJT->contains(prevChar) || fH2->contains(prevChar) || fH3->contains(prevChar)) &&
+ fIN->contains(thisChar)) {
+ continue;
+ }
+ if ((fJL->contains(prevChar) || fJV->contains(prevChar) ||
+ fJT->contains(prevChar) || fH2->contains(prevChar) || fH3->contains(prevChar)) &&
+ fPO->contains(thisChar)) {
+ continue;
+ }
+ if (fPR->contains(prevChar) && (fJL->contains(thisChar) || fJV->contains(thisChar) ||
+ fJT->contains(thisChar) || fH2->contains(thisChar) || fH3->contains(thisChar))) {
+ continue;
+ }
+
+
+
+ // LB 28 Do not break between alphabetics (“atâ€).
+ if (fAL->contains(prevChar) && fAL->contains(thisChar)) {
+ continue;
+ }
+
+ // LB 29 Do not break between numeric punctuation and alphabetics ("e.g.").
+ if (fIS->contains(prevChar) && fAL->contains(thisChar)) {
+ continue;
+ }
+
+ //LB 30 Do not break between letters, numbers or ordinary symbols and opening or closing punctuation
+ // (AL | NU) x OP
+ // CL x (AL | NU)
+ if ((fAL->contains(prevChar) || fNU->contains(prevChar)) &&
+ fOP->contains(thisChar)) {
+ continue;
+ }
+ if (fCL->contains(prevChar) &&
+ (fAL->contains(thisChar) || fNU->contains(thisChar))) {
+ continue;
+ }
+
+
+ // LB 31 Break everywhere else
+ break;
+
+ }
+
+ return pos;
+}
+
+
+UVector *RBBILineMonkey::charClasses() {
+ return fSets;
+}
+
+
+RBBILineMonkey::~RBBILineMonkey() {
+ delete fSets;
+
+ delete fBK;
+ delete fCR;
+ delete fLF;
+ delete fCM;
+ delete fNL;
+ delete fWJ;
+ delete fZW;
+ delete fGL;
+ delete fCB;
+ delete fSP;
+ delete fB2;
+ delete fBA;
+ delete fBB;
+ delete fHY;
+ delete fH2;
+ delete fH3;
+ delete fCL;
+ delete fEX;
+ delete fIN;
+ delete fJL;
+ delete fJV;
+ delete fJT;
+ delete fNS;
+ delete fOP;
+ delete fQU;
+ delete fIS;
+ delete fNU;
+ delete fPO;
+ delete fPR;
+ delete fSY;
+ delete fAI;
+ delete fAL;
+ delete fID;
+ delete fSA;
+ delete fSG;
+ delete fXX;
+
+ delete fCharBI;
+ delete fNumberMatcher;
+}
+
+
+//-------------------------------------------------------------------------------------------
+//
+// TestMonkey
+//
+// params
+// seed=nnnnn Random number starting seed.
+// Setting the seed allows errors to be reproduced.
+// loop=nnn Looping count. Controls running time.
+// -1: run forever.
+// 0 or greater: run length.
+//
+// type = char | word | line | sent | title
+//
+//-------------------------------------------------------------------------------------------
+
+static int32_t getIntParam(UnicodeString name, UnicodeString &params, int32_t defaultVal) {
+ int32_t val = defaultVal;
+ name.append(" *= *(-?\\d+)");
+ UErrorCode status = U_ZERO_ERROR;
+ RegexMatcher m(name, params, 0, status);
+ if (m.find()) {
+ // The param exists. Convert the string to an int.
+ char valString[100];
+ int32_t paramLength = m.end(1, status) - m.start(1, status);
+ if (paramLength >= (int32_t)(sizeof(valString)-1)) {
+ paramLength = (int32_t)(sizeof(valString)-2);
+ }
+ params.extract(m.start(1, status), paramLength, valString, sizeof(valString));
+ val = strtol(valString, NULL, 10);
+
+ // Delete this parameter from the params string.
+ m.reset();
+ params = m.replaceFirst("", status);
+ }
+ U_ASSERT(U_SUCCESS(status));
+ return val;
+}
+#endif
+
+static void testBreakBoundPreceding(RBBITest *test, UnicodeString ustr,
+ BreakIterator *bi,
+ int expected[],
+ int expectedcount)
+{
+ int count = 0;
+ int i = 0;
+ int forward[50];
+ bi->setText(ustr);
+ for (i = bi->first(); i != BreakIterator::DONE; i = bi->next()) {
+ forward[count] = i;
+ if (count < expectedcount && expected[count] != i) {
+ test->errln("break forward test failed: expected %d but got %d",
+ expected[count], i);
+ break;
+ }
+ count ++;
+ }
+ if (count != expectedcount) {
+ printStringBreaks(ustr, expected, expectedcount);
+ test->errln("break forward test failed: missed %d match",
+ expectedcount - count);
+ return;
+ }
+ // testing boundaries
+ for (i = 1; i < expectedcount; i ++) {
+ int j = expected[i - 1];
+ if (!bi->isBoundary(j)) {
+ printStringBreaks(ustr, expected, expectedcount);
+ test->errln("isBoundary() failed. Expected boundary at position %d", j);
+ return;
+ }
+ for (j = expected[i - 1] + 1; j < expected[i]; j ++) {
+ if (bi->isBoundary(j)) {
+ printStringBreaks(ustr, expected, expectedcount);
+ test->errln("isBoundary() failed. Not expecting boundary at position %d", j);
+ return;
+ }
+ }
+ }
+
+ for (i = bi->last(); i != BreakIterator::DONE; i = bi->previous()) {
+ count --;
+ if (forward[count] != i) {
+ test->errln("happy break test previous() failed: expected %d but got %d",
+ forward[count], i);
+ break;
+ }
+ }
+ if (count != 0) {
+ printStringBreaks(ustr, expected, expectedcount);
+ test->errln("break test previous() failed: missed a match");
+ return;
+ }
+
+ // testing preceding
+ for (i = 0; i < expectedcount - 1; i ++) {
+ // int j = expected[i] + 1;
+ int j = ustr.moveIndex32(expected[i], 1);
+ for (; j <= expected[i + 1]; j ++) {
+ if (bi->preceding(j) != expected[i]) {
+ printStringBreaks(ustr, expected, expectedcount);
+ test->errln("preceding(): Not expecting boundary at position %d", j);
+ return;
+ }
+ }
+ }
+}
+
+void RBBITest::TestWordBreaks(void)
+{
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+
+ // <data><>\u1d4a\u206e<?>\u0603\U0001d7ff<>\u2019<></data>
+ Locale locale("en");
+ UErrorCode status = U_ZERO_ERROR;
+ // BreakIterator *bi = BreakIterator::createCharacterInstance(locale, status);
+ BreakIterator *bi = BreakIterator::createWordInstance(locale, status);
+ UChar str[300];
+ static const char *strlist[] =
+ {
+ "\\U000e0032\\u0097\\u0f94\\uc2d8\\u05f4\\U000e0031\\u060d",
+ "\\U000e0037\\u4666\\u1202\\u003a\\U000e0031\\u064d\\u0bea\\u591c\\U000e0040\\u003b",
+ "\\u0589\\u3e99\\U0001d7f3\\U000e0074\\u1810\\u200e\\U000e004b\\u179c\\u0027\\U000e0061\\u003a",
+ "\\u398c\\U000104a5\\U0001d173\\u102d\\u002e\\uca3b\\u002e\\u002c\\u5622",
+ "\\u90ca\\u3588\\u009c\\u0953\\u194b",
+ "\\u200e\\U000e0072\\u0a4b\\U000e003f\\ufd2b\\u2027\\u002e\\u002e",
+ "\\u0602\\u2019\\ua191\\U000e0063\\u0a4c\\u003a\\ub4b5\\u003a\\u827f\\u002e",
+ "\\u7f1f\\uc634\\u65f8\\u0944\\u04f2\\uacdf\\u1f9c\\u05f4\\u002e",
+ "\\U000e0042\\u002e\\u0fb8\\u09ef\\u0ed1\\u2044",
+ "\\u003b\\u024a\\u102e\\U000e0071\\u0600",
+ "\\u2027\\U000e0067\\u0a47\\u00b7",
+ "\\u1fcd\\u002c\\u07aa\\u0027\\u11b0",
+ "\\u002c\\U000e003c\\U0001d7f4\\u003a\\u0c6f\\u0027",
+ "\\u0589\\U000e006e\\u0a42\\U000104a5",
+ "\\u4f66\\ub523\\u003a\\uacae\\U000e0047\\u003a",
+ "\\u003a\\u0f21\\u0668\\u0dab\\u003a\\u0655\\u00b7",
+ "\\u0027\\u11af\\U000e0057\\u0602",
+ "\\U0001d7f2\\U000e007\\u0004\\u0589",
+ "\\U000e0022\\u003a\\u10b3\\u003a\\ua21b\\u002e\\U000e0058\\u1732\\U000e002b",
+ "\\U0001d7f2\\U000e007d\\u0004\\u0589",
+ "\\u82ab\\u17e8\\u0736\\u2019\\U0001d64d",
+ "\\u0e01\\ub55c\\u0a68\\U000e0037\\u0cd6\\u002c\\ub959",
+ "\\U000e0065\\u302c\\uc986\\u09ee\\U000e0068",
+ "\\u0be8\\u002e\\u0c68\\u066e\\u136d\\ufc99\\u59e7",
+ "\\u0233\\U000e0020\\u0a69\\u0d6a",
+ "\\u206f\\u0741\\ub3ab\\u2019\\ubcac\\u2019",
+ "\\u58f4\\U000e0049\\u20e7\\u2027",
+ "\\ub315\\U0001d7e5\\U000e0073\\u0c47\\u06f2\\u0c6a\\u0037\\u10fe",
+ "\\ua183\\u102d\\u0bec\\u003a",
+ "\\u17e8\\u06e7\\u002e\\u096d\\u003b",
+ "\\u003a\\u0e57\\u0fad\\u002e",
+ "\\u002e\\U000e004c\\U0001d7ea\\u05bb\\ud0fd\\u02de",
+ "\\u32e6\\U0001d7f6\\u0fa1\\u206a\\U000e003c\\u0cec\\u003a",
+ "\\U000e005d\\u2044\\u0731\\u0650\\u0061",
+ "\\u003a\\u0664\\u00b7\\u1fba",
+ "\\u003b\\u0027\\u00b7\\u47a3",
+ "\\u2027\\U000e0067\\u0a42\\u00b7\\ubddf\\uc26c\\u003a\\u4186\\u041b",
+ "\\u0027\\u003a\\U0001d70f\\U0001d7df\\ubf4a\\U0001d7f5\\U0001d177\\u003a\\u0e51\\u1058\\U000e0058\\u00b7\\u0673",
+ "\\uc30d\\u002e\\U000e002c\\u0c48\\u003a\\ub5a1\\u0661\\u002c",
+ };
+ int loop;
+ if (U_FAILURE(status)) {
+ errln("Creation of break iterator failed %s", u_errorName(status));
+ return;
+ }
+ for (loop = 0; loop < (int)(sizeof(strlist) / sizeof(char *)); loop ++) {
+ // printf("looping %d\n", loop);
+ u_unescape(strlist[loop], str, 25);
+ UnicodeString ustr(str);
+ // RBBICharMonkey monkey;
+ RBBIWordMonkey monkey;
+
+ int expected[50];
+ int expectedcount = 0;
+
+ monkey.setText(ustr);
+ int i;
+ for (i = 0; i != BreakIterator::DONE; i = monkey.next(i)) {
+ expected[expectedcount ++] = i;
+ }
+
+ testBreakBoundPreceding(this, ustr, bi, expected, expectedcount);
+ }
+ delete bi;
+#endif
+}
+
+void RBBITest::TestWordBoundary(void)
+{
+ // <data><>\u1d4a\u206e<?>\u0603\U0001d7ff<>\u2019<></data>
+ Locale locale("en");
+ UErrorCode status = U_ZERO_ERROR;
+ // BreakIterator *bi = BreakIterator::createCharacterInstance(locale, status);
+ BreakIterator *bi = BreakIterator::createWordInstance(locale, status);
+ UChar str[50];
+ static const char *strlist[] =
+ {
+ "\\u200e\\U000e0072\\u0a4b\\U000e003f\\ufd2b\\u2027\\u002e\\u002e",
+ "\\U000e0042\\u002e\\u0fb8\\u09ef\\u0ed1\\u2044",
+ "\\u003b\\u024a\\u102e\\U000e0071\\u0600",
+ "\\u2027\\U000e0067\\u0a47\\u00b7",
+ "\\u1fcd\\u002c\\u07aa\\u0027\\u11b0",
+ "\\u002c\\U000e003c\\U0001d7f4\\u003a\\u0c6f\\u0027",
+ "\\u0589\\U000e006e\\u0a42\\U000104a5",
+ "\\u4f66\\ub523\\u003a\\uacae\\U000e0047\\u003a",
+ "\\u003a\\u0f21\\u0668\\u0dab\\u003a\\u0655\\u00b7",
+ "\\u0027\\u11af\\U000e0057\\u0602",
+ "\\U0001d7f2\\U000e007\\u0004\\u0589",
+ "\\U000e0022\\u003a\\u10b3\\u003a\\ua21b\\u002e\\U000e0058\\u1732\\U000e002b",
+ "\\U0001d7f2\\U000e007d\\u0004\\u0589",
+ "\\u82ab\\u17e8\\u0736\\u2019\\U0001d64d",
+ "\\u0e01\\ub55c\\u0a68\\U000e0037\\u0cd6\\u002c\\ub959",
+ "\\U000e0065\\u302c\\uc986\\u09ee\\U000e0068",
+ "\\u0be8\\u002e\\u0c68\\u066e\\u136d\\ufc99\\u59e7",
+ "\\u0233\\U000e0020\\u0a69\\u0d6a",
+ "\\u206f\\u0741\\ub3ab\\u2019\\ubcac\\u2019",
+ "\\u58f4\\U000e0049\\u20e7\\u2027",
+ "\\ub315\\U0001d7e5\\U000e0073\\u0c47\\u06f2\\u0c6a\\u0037\\u10fe",
+ "\\ua183\\u102d\\u0bec\\u003a",
+ "\\u17e8\\u06e7\\u002e\\u096d\\u003b",
+ "\\u003a\\u0e57\\u0fad\\u002e",
+ "\\u002e\\U000e004c\\U0001d7ea\\u05bb\\ud0fd\\u02de",
+ "\\u32e6\\U0001d7f6\\u0fa1\\u206a\\U000e003c\\u0cec\\u003a",
+ "\\ua2a5\\u0038\\u2044\\u002e\\u0c67\\U000e003c\\u05f4\\u2027\\u05f4\\u2019",
+ "\\u003a\\u0664\\u00b7\\u1fba",
+ "\\u003b\\u0027\\u00b7\\u47a3",
+ };
+ int loop;
+ if (U_FAILURE(status)) {
+ errln("Creation of break iterator failed %s", u_errorName(status));
+ return;
+ }
+ for (loop = 0; loop < (int)(sizeof(strlist) / sizeof(char *)); loop ++) {
+ // printf("looping %d\n", loop);
+ u_unescape(strlist[loop], str, 20);
+ UnicodeString ustr(str);
+ int forward[50];
+ int count = 0;
+
+ bi->setText(ustr);
+ int prev = 0;
+ int i;
+ for (i = bi->first(); i != BreakIterator::DONE; i = bi->next()) {
+ forward[count ++] = i;
+ if (i > prev) {
+ int j;
+ for (j = prev + 1; j < i; j ++) {
+ if (bi->isBoundary(j)) {
+ printStringBreaks(ustr, forward, count);
+ errln("happy boundary test failed: expected %d not a boundary",
+ j);
+ return;
+ }
+ }
+ }
+ if (!bi->isBoundary(i)) {
+ printStringBreaks(ustr, forward, count);
+ errln("happy boundary test failed: expected %d a boundary",
+ i);
+ return;
+ }
+ prev = i;
+ }
+ }
+ delete bi;
+}
+
+void RBBITest::TestLineBreaks(void)
+{
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ Locale locale("en");
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIterator *bi = BreakIterator::createLineInstance(locale, status);
+ const int32_t STRSIZE = 50;
+ UChar str[STRSIZE];
+ static const char *strlist[] =
+ {
+ "\\u300f\\ufdfc\\ub798\\u2011\\u2011\\u0020\\u0b43\\u002d\\ubeec\\ufffc",
+ "\\u24ba\\u2060\\u3405\\ub290\\u000d\\U000e0032\\ufe35\\u00a0\\u0361\\"
+ "U000112ed\\u0f0c\\u000a\\u308e\\ua875\\u0085\\u114d",
+ "\\ufffc\\u3063\\u2e08\\u30e3\\u000d\\u002d\\u0ed8\\u002f\\U00011a57\\"
+ "u2014\\U000e0105\\u118c\\u000a\\u07f8",
+ "\\u0668\\u192b\\u002f\\u2034\\ufe39\\u00b4\\u0cc8\\u2571\\u200b\\u003f",
+ "\\ufeff\\ufffc\\u3289\\u0085\\u2772\\u0020\\U000e010a\\u0020\\u2025\\u000a\\U000e0123",
+ "\\ufe3c\\u201c\\u000d\\u2025\\u2007\\u201c\\u002d\\u20a0\\u002d\\u30a7\\u17a4",
+ "\\u2772\\u0020\\U000e010a\\u0020\\u2025\\u000a\\U000e0123",
+ "\\u002d\\uff1b\\u02c8\\u2029\\ufeff\\u0f22\\u2044\\ufe09\\u003a\\u096d\\u2009\\u000a\\u06f7\\u02cc\\u1019\\u2060",
+ "\\u1781\\u0b68\\u0f0c\\u3010\\u0085\\U00011f7a\\u0020\\u0dd6\\u200b\\U000e007a\\u000a\\u2060\\u2026\\u002f\\u2026\\u24dc\\u101e\\u2014\\u2007\\u30a5",
+ "\\u2770\\u0020\\U000e010f\\u0020\\u2060\\u000a\\u02cc\\u0bcc\\u060d\\u30e7\\u0f3b\\u002f",
+ "\\ufeff\\u0028\\u003b\\U00012fec\\u2010\\u0020\\u0004\\u200b\\u0020\\u275c\\u002f\\u17b1",
+ "\\u20a9\\u2014\\u00a2\\u31f1\\u002f\\u0020\\u05b8\\u200b\\u0cc2\\u003b\\u060d\\u02c8\\ua4e8\\u002f\\u17d5",
+ "\\u002d\\u136f\\uff63\\u0084\\ua933\\u2028\\u002d\\u431b\\u200b\\u20b0",
+ "\\uade3\\u11d6\\u000a\\U0001107d\\u203a\\u201d\\ub070\\u000d\\u2024\\ufffc",
+ "\\uff5b\\u101c\\u1806\\u002f\\u2213\\uff5f",
+ "\\u2014\\u0a83\\ufdfc\\u003f\\u00a0\\u0020\\u000a\\u2991\\U0001d179\\u0020\\u201d\\U000125f6\\u0a67\\u20a7\\ufeff\\u043f",
+ "\\u169b\\U000e0130\\u002d\\u1041\\u0f3d\\u0abf\\u00b0\\u31fb\\u00a0\\u002d\\u02c8\\u003b",
+ "\\u2762\\u1680\\u002d\\u2028\\u0027\\u01dc\\ufe56\\u003a\\u000a\\uffe6\\u29fd\\u0020\\u30ee\\u007c\\U0001d178\\u0af1\\u0085",
+ "\\u3010\\u200b\\u2029\\ufeff\\ufe6a\\u275b\\U000e013b\\ufe37\\u24d4\\u002d\\u1806\\u256a\\u1806\\u247c\\u0085\\u17ac",
+ "\\u99ab\\u0027\\u003b\\u2026\\ueaf0\\u0020\\u0020\\u0313\\u0020\\u3099\\uff09\\u208e\\u2011\\u2007\\u2060\\u000a\\u0020\\u0020\\u300b\\u0bf9",
+ "\\u1806\\u060d\\u30f5\\u00b4\\u17e9\\u2544\\u2028\\u2024\\u2011\\u20a3\\u002d\\u09cc\\u1782\\u000d\\uff6f\\u0025",
+ "\\u002f\\uf22e\\u1944\\ufe3d\\u0020\\u206f\\u31b3\\u2014\\u002d\\u2025\\u0f0c\\u0085\\u2763",
+ "\\u002f\\u2563\\u202f\\u0085\\u17d5\\u200b\\u0020\\U000e0043\\u2014\\u058a\\u3d0a\\ufe57\\u2035\\u2028\\u2029",
+ "\\u20ae\\U0001d169\\u9293\\uff1f\\uff1f\\u0021\\u2012\\u2039\\u0085\\u02cc\\u00a2\\u0020\\U000e01ab\\u3085\\u0f3a\\u1806\\u0f0c\\u1945\\u000a\\U0001d7e7",
+ "\\uffe6\\u00a0\\u200b\\u0085\\u2116\\u255b\\U0001d7f7\\u178c\\ufffc",
+ "\\u02cc\\ufe6a\\u00a0\\u0021\\u002d\\u7490\\uec2e\\u200b\\u000a",
+ "\\uec2e\\u200b\\u000a\\u0020\\u2028\\u2014\\u8945",
+ "\\u7490\\uec2e\\u200b\\u000a\\u0020\\u2028\\u2014",
+ "\\u0020\\u2028\\u2014\\u8945\\u002c\\u005b",
+ "\\u000a\\ufe3c\\u201c\\u000d\\u2025\\u2007\\u201c\\u002d\\u20a0",
+ "\\u2473\\u0e9d\\u0020\\u0085\\u000a\\ufe3c\\u201c\\u000d\\u2025",
+ "\\U0001d16e\\ufffc\\u2025\\u0021\\u002d",
+ "\\ufffc\\u301b\\u0fa5\\U000e0103\\u2060\\u208e\\u17d5\\u034f\\u1009\\u003a\\u180e\\u2009\\u3111",
+ "\\u2014\\u0020\\u000a\\u17c5\\u24fc",
+ "\\ufffc\\u0020\\u2116\\uff6c\\u200b\\u0ac3\\U0001028f",
+ "\\uaeb0\\u0344\\u0085\\ufffc\\u073b\\u2010",
+ "\\ufeff\\u0589\\u0085\\u0eb8\\u30fd\\u002f\\u003a\\u2014\\ufe43",
+ "\\u09cc\\u256a\\u276d\\u002d\\u3085\\u000d\\u0e05\\u2028\\u0fbb",
+ "\\u2034\\u00bb\\u0ae6\\u300c\\u0020\\u31f8\\ufffc",
+ "\\u2116\\u0ed2\\uff64\\u02cd\\u2001\\u2060",
+ "\\u809d\\u2e02\\u0f0a\\uc48f\\u2540\\u000d\\u0cef\\u003a\\u0e4d"
+ "\\U000e0172\\U000e005c\\u17cf\\U00010ca6\\ufeff\\uf621\\u06f3\\uffe5"
+ "\\u0ea2\\ufeff\\udcea\\u3085\\ua874\\u000a\\u0020\\u000b\\u200b",
+ "\\ufe10\\u2060\\u1a5a\\u2060\\u17e4\\ufffc\\ubbe1\\ufe15\\u0020\\u00a0",
+ "\\u2060\\u2213\\u200b\\u2019\\uc2dc\\uff6a\\u1736\\u0085\\udb07",
+ };
+ int loop;
+ TEST_ASSERT_SUCCESS(status);
+ if (U_FAILURE(status)) {
+ return;
+ }
+ for (loop = 0; loop < (int)(sizeof(strlist) / sizeof(char *)); loop ++) {
+ // printf("looping %d\n", loop);
+ int32_t t = u_unescape(strlist[loop], str, STRSIZE);
+ if (t >= STRSIZE) {
+ TEST_ASSERT(FALSE);
+ continue;
+ }
+
+
+ UnicodeString ustr(str);
+ RBBILineMonkey monkey;
+ if (U_FAILURE(monkey.deferredStatus)) {
+ continue;
+ }
+
+ const int EXPECTEDSIZE = 50;
+ int expected[EXPECTEDSIZE];
+ int expectedcount = 0;
+
+ monkey.setText(ustr);
+ int i;
+ for (i = 0; i != BreakIterator::DONE; i = monkey.next(i)) {
+ if (expectedcount >= EXPECTEDSIZE) {
+ TEST_ASSERT(expectedcount < EXPECTEDSIZE);
+ return;
+ }
+ expected[expectedcount ++] = i;
+ }
+
+ testBreakBoundPreceding(this, ustr, bi, expected, expectedcount);
+ }
+ delete bi;
+#endif
+}
+
+void RBBITest::TestSentBreaks(void)
+{
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ Locale locale("en");
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status);
+ UChar str[200];
+ static const char *strlist[] =
+ {
+ "Now\ris\nthe\r\ntime\n\rfor\r\r",
+ "This\n",
+ "Hello! how are you? I'am fine. Thankyou. How are you doing? This\n costs $20,00,000.",
+ "\"Sentence ending with a quote.\" Bye.",
+ " (This is it). Testing the sentence iterator. \"This isn't it.\"",
+ "Hi! This is a simple sample sentence. (This is it.) This is a simple sample sentence. \"This isn't it.\"",
+ "Hi! This is a simple sample sentence. It does not have to make any sense as you can see. ",
+ "Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura. ",
+ "Che la dritta via aveo smarrita. He said, that I said, that you said!! ",
+ "Don't rock the boat.\\u2029Because I am the daddy, that is why. Not on my time (el timo.)!",
+ "\\U0001040a\\u203a\\u1217\\u2b23\\u000d\\uff3b\\u03dd\\uff57\\u0a69\\u104a\\ufe56\\ufe52"
+ "\\u3016\\U000e002f\\U000e0077\\u0662\\u1680\\u2984\\U000e006a\\u002e\\ua6ab\\u104a"
+ "\\u002e\\u019b\\u2005\\u002e\\u0477\\u0438\\u0085\\u0441\\u002e\\u5f61\\u202f"
+ "\\U0001019f\\uff08\\u27e8\\u055c\\u0352",
+ "\\u1f3e\\u004d\\u000a\\ua3e4\\U000e0023\\uff63\\u0c52\\u276d\\U0001d5de\\U0001d171"
+ "\\u0e38\\u17e5\\U00012fe6\\u0fa9\\u267f\\u1da3\\u0046\\u03ed\\udc72\\u0030"
+ "\\U0001d688\\u0b6d\\u0085\\u0c67\\u1f94\\u0c6c\\u9cb2\\u202a\\u180e\\u000b"
+ "\\u002e\\U000e005e\\u035b\\u061f\\u02c1\\U000e0025\\u0357\\u0969\\u202b"
+ "\\U000130c5\\u0486\\U000e0123\\u2019\\u01bc\\u2006\\u11ad\\u180e\\u2e05"
+ "\\u10b7\\u013e\\u000a\\u002e\\U00013ea4"
+ };
+ int loop;
+ if (U_FAILURE(status)) {
+ errln("Creation of break iterator failed %s", u_errorName(status));
+ return;
+ }
+ for (loop = 0; loop < (int)(sizeof(strlist) / sizeof(char *)); loop ++) {
+ u_unescape(strlist[loop], str, (int32_t)(sizeof(str) / sizeof(str[0])));
+ UnicodeString ustr(str);
+
+ RBBISentMonkey monkey;
+ if (U_FAILURE(monkey.deferredStatus)) {
+ continue;
+ }
+
+ const int EXPECTEDSIZE = 50;
+ int expected[EXPECTEDSIZE];
+ int expectedcount = 0;
+
+ monkey.setText(ustr);
+ int i;
+ for (i = 0; i != BreakIterator::DONE; i = monkey.next(i)) {
+ if (expectedcount >= EXPECTEDSIZE) {
+ TEST_ASSERT(expectedcount < EXPECTEDSIZE);
+ return;
+ }
+ expected[expectedcount ++] = i;
+ }
+
+ testBreakBoundPreceding(this, ustr, bi, expected, expectedcount);
+ }
+ delete bi;
+#endif
+}
+
+void RBBITest::TestMonkey(char *params) {
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t loopCount = 500;
+ int32_t seed = 1;
+ UnicodeString breakType = "all";
+ Locale locale("en");
+ UBool useUText = FALSE;
+
+ if (quick == FALSE) {
+ loopCount = 10000;
+ }
+
+ if (params) {
+ UnicodeString p(params);
+ loopCount = getIntParam("loop", p, loopCount);
+ seed = getIntParam("seed", p, seed);
+
+ RegexMatcher m(" *type *= *(char|word|line|sent|title) *", p, 0, status);
+ if (m.find()) {
+ breakType = m.group(1, status);
+ m.reset();
+ p = m.replaceFirst("", status);
+ }
+
+ RegexMatcher u(" *utext", p, 0, status);
+ if (u.find()) {
+ useUText = TRUE;
+ u.reset();
+ p = u.replaceFirst("", status);
+ }
+
+
+ // m.reset(p);
+ if (RegexMatcher("\\S", p, 0, status).find()) {
+ // Each option is stripped out of the option string as it is processed.
+ // All options have been checked. The option string should have been completely emptied..
+ char buf[100];
+ p.extract(buf, sizeof(buf), NULL, status);
+ buf[sizeof(buf)-1] = 0;
+ errln("Unrecognized or extra parameter: %s\n", buf);
+ return;
+ }
+
+ }
+
+ if (breakType == "char" || breakType == "all") {
+ RBBICharMonkey m;
+ BreakIterator *bi = BreakIterator::createCharacterInstance(locale, status);
+ if (U_SUCCESS(status)) {
+ RunMonkey(bi, m, "char", seed, loopCount, useUText);
+ if (breakType == "all" && useUText==FALSE) {
+ // Also run a quick test with UText when "all" is specified
+ RunMonkey(bi, m, "char", seed, loopCount, TRUE);
+ }
+ }
+ else {
+ errln("Creation of character break iterator failed %s", u_errorName(status));
+ }
+ delete bi;
+ }
+
+ if (breakType == "word" || breakType == "all") {
+ logln("Word Break Monkey Test");
+ RBBIWordMonkey m;
+ BreakIterator *bi = BreakIterator::createWordInstance(locale, status);
+ if (U_SUCCESS(status)) {
+ RunMonkey(bi, m, "word", seed, loopCount, useUText);
+ }
+ else {
+ errln("Creation of word break iterator failed %s", u_errorName(status));
+ }
+ delete bi;
+ }
+
+ if (breakType == "line" || breakType == "all") {
+ logln("Line Break Monkey Test");
+ RBBILineMonkey m;
+ BreakIterator *bi = BreakIterator::createLineInstance(locale, status);
+ if (loopCount >= 10) {
+ loopCount = loopCount / 5; // Line break runs slower than the others.
+ }
+ if (U_SUCCESS(status)) {
+ RunMonkey(bi, m, "line", seed, loopCount, useUText);
+ }
+ else {
+ errln("Creation of line break iterator failed %s", u_errorName(status));
+ }
+ delete bi;
+ }
+
+ if (breakType == "sent" || breakType == "all" ) {
+ logln("Sentence Break Monkey Test");
+ RBBISentMonkey m;
+ BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status);
+ if (loopCount >= 10) {
+ loopCount = loopCount / 10; // Sentence runs slower than the other break types
+ }
+ if (U_SUCCESS(status)) {
+ RunMonkey(bi, m, "sentence", seed, loopCount, useUText);
+ }
+ else {
+ errln("Creation of line break iterator failed %s", u_errorName(status));
+ }
+ delete bi;
+ }
+
+#endif
+}
+
+//
+// Run a RBBI monkey test. Common routine, for all break iterator types.
+// Parameters:
+// bi - the break iterator to use
+// mk - MonkeyKind, abstraction for obtaining expected results
+// name - Name of test (char, word, etc.) for use in error messages
+// seed - Seed for starting random number generator (parameter from user)
+// numIterations
+//
+void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name, uint32_t seed,
+ int32_t numIterations, UBool useUText) {
+
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+
+ const int32_t TESTSTRINGLEN = 500;
+ UnicodeString testText;
+ int32_t numCharClasses;
+ UVector *chClasses;
+ int expected[TESTSTRINGLEN*2 + 1];
+ int expectedCount = 0;
+ char expectedBreaks[TESTSTRINGLEN*2 + 1];
+ char forwardBreaks[TESTSTRINGLEN*2 + 1];
+ char reverseBreaks[TESTSTRINGLEN*2+1];
+ char isBoundaryBreaks[TESTSTRINGLEN*2+1];
+ char followingBreaks[TESTSTRINGLEN*2+1];
+ char precedingBreaks[TESTSTRINGLEN*2+1];
+ int i;
+ int loopCount = 0;
+
+ m_seed = seed;
+
+ numCharClasses = mk.charClasses()->size();
+ chClasses = mk.charClasses();
+
+ // Check for errors that occured during the construction of the MonkeyKind object.
+ // Can't report them where they occured because errln() is a method coming from intlTest,
+ // and is not visible outside of RBBITest :-(
+ if (U_FAILURE(mk.deferredStatus)) {
+ errln("status of \"%s\" in creation of RBBIMonkeyKind.", u_errorName(mk.deferredStatus));
+ return;
+ }
+
+ // Verify that the character classes all have at least one member.
+ for (i=0; i<numCharClasses; i++) {
+ UnicodeSet *s = (UnicodeSet *)chClasses->elementAt(i);
+ if (s == NULL || s->size() == 0) {
+ errln("Character Class #%d is null or of zero size.", i);
+ return;
+ }
+ }
+
+ while (loopCount < numIterations || numIterations == -1) {
+ if (numIterations == -1 && loopCount % 10 == 0) {
+ // If test is running in an infinite loop, display a periodic tic so
+ // we can tell that it is making progress.
+ fprintf(stderr, ".");
+ }
+ // Save current random number seed, so that we can recreate the random numbers
+ // for this loop iteration in event of an error.
+ seed = m_seed;
+
+ // Populate a test string with data.
+ testText.truncate(0);
+ for (i=0; i<TESTSTRINGLEN; i++) {
+ int32_t aClassNum = m_rand() % numCharClasses;
+ UnicodeSet *classSet = (UnicodeSet *)chClasses->elementAt(aClassNum);
+ int32_t charIdx = m_rand() % classSet->size();
+ UChar32 c = classSet->charAt(charIdx);
+ if (c < 0) { // TODO: deal with sets containing strings.
+ errln("c < 0");
+ break;
+ }
+ testText.append(c);
+ }
+
+ // Calculate the expected results for this test string.
+ mk.setText(testText);
+ memset(expectedBreaks, 0, sizeof(expectedBreaks));
+ expectedBreaks[0] = 1;
+ int32_t breakPos = 0;
+ expectedCount = 0;
+ for (;;) {
+ breakPos = mk.next(breakPos);
+ if (breakPos == -1) {
+ break;
+ }
+ if (breakPos > testText.length()) {
+ errln("breakPos > testText.length()");
+ }
+ expectedBreaks[breakPos] = 1;
+ U_ASSERT(expectedCount<testText.length());
+ expected[expectedCount ++] = breakPos;
+ }
+
+ // Find the break positions using forward iteration
+ memset(forwardBreaks, 0, sizeof(forwardBreaks));
+ if (useUText) {
+ UErrorCode status = U_ZERO_ERROR;
+ UText *testUText = utext_openReplaceable(NULL, &testText, &status);
+ // testUText = utext_openUnicodeString(testUText, &testText, &status);
+ bi->setText(testUText, status);
+ TEST_ASSERT_SUCCESS(status);
+ utext_close(testUText); // The break iterator does a shallow clone of the UText
+ // This UText can be closed immediately, so long as the
+ // testText string continues to exist.
+ } else {
+ bi->setText(testText);
+ }
+
+ for (i=bi->first(); i != BreakIterator::DONE; i=bi->next()) {
+ if (i < 0 || i > testText.length()) {
+ errln("%s break monkey test: Out of range value returned by breakIterator::next()", name);
+ break;
+ }
+ forwardBreaks[i] = 1;
+ }
+
+ // Find the break positions using reverse iteration
+ memset(reverseBreaks, 0, sizeof(reverseBreaks));
+ for (i=bi->last(); i != BreakIterator::DONE; i=bi->previous()) {
+ if (i < 0 || i > testText.length()) {
+ errln("%s break monkey test: Out of range value returned by breakIterator::next()", name);
+ break;
+ }
+ reverseBreaks[i] = 1;
+ }
+
+ // Find the break positions using isBoundary() tests.
+ memset(isBoundaryBreaks, 0, sizeof(isBoundaryBreaks));
+ U_ASSERT((int32_t)sizeof(isBoundaryBreaks) > testText.length());
+ for (i=0; i<=testText.length(); i++) {
+ isBoundaryBreaks[i] = bi->isBoundary(i);
+ }
+
+
+ // Find the break positions using the following() function.
+ // printf(".");
+ memset(followingBreaks, 0, sizeof(followingBreaks));
+ int32_t lastBreakPos = 0;
+ followingBreaks[0] = 1;
+ for (i=0; i<testText.length(); i++) {
+ breakPos = bi->following(i);
+ if (breakPos <= i ||
+ breakPos < lastBreakPos ||
+ breakPos > testText.length() ||
+ breakPos > lastBreakPos && lastBreakPos > i ) {
+ errln("%s break monkey test: "
+ "Out of range value returned by BreakIterator::following().\n"
+ "Random seed=%d index=%d; following returned %d; lastbreak=%d",
+ name, seed, i, breakPos, lastBreakPos);
+ break;
+ }
+ followingBreaks[breakPos] = 1;
+ lastBreakPos = breakPos;
+ }
+
+ // Find the break positions using the preceding() function.
+ memset(precedingBreaks, 0, sizeof(followingBreaks));
+ lastBreakPos = testText.length();
+ precedingBreaks[testText.length()] = 1;
+ for (i=testText.length(); i>0; i--) {
+ breakPos = bi->preceding(i);
+ if (breakPos >= i ||
+ breakPos > lastBreakPos ||
+ breakPos < 0 && testText.getChar32Start(i)>0 ||
+ breakPos < lastBreakPos && lastBreakPos < testText.getChar32Start(i) ) {
+ errln("%s break monkey test: "
+ "Out of range value returned by BreakIterator::preceding().\n"
+ "index=%d; prev returned %d; lastBreak=%d" ,
+ name, i, breakPos, lastBreakPos);
+ precedingBreaks[i] = 2; // Forces an error.
+ } else {
+ precedingBreaks[breakPos] = 1;
+ lastBreakPos = breakPos;
+ }
+ }
+
+ // Compare the expected and actual results.
+ for (i=0; i<=testText.length(); i++) {
+ const char *errorType = NULL;
+ if (forwardBreaks[i] != expectedBreaks[i]) {
+ errorType = "next()";
+ } else if (reverseBreaks[i] != forwardBreaks[i]) {
+ errorType = "previous()";
+ } else if (isBoundaryBreaks[i] != expectedBreaks[i]) {
+ errorType = "isBoundary()";
+ } else if (followingBreaks[i] != expectedBreaks[i]) {
+ errorType = "following()";
+ } else if (precedingBreaks[i] != expectedBreaks[i]) {
+ errorType = "preceding()";
+ }
+
+
+ if (errorType != NULL) {
+ // Format a range of the test text that includes the failure as
+ // a data item that can be included in the rbbi test data file.
+
+ // Start of the range is the last point where expected and actual results
+ // both agreed that there was a break position.
+ int startContext = i;
+ int32_t count = 0;
+ for (;;) {
+ if (startContext==0) { break; }
+ startContext --;
+ if (expectedBreaks[startContext] != 0) {
+ if (count == 2) break;
+ count ++;
+ }
+ }
+
+ // End of range is two expected breaks past the start position.
+ int endContext = i + 1;
+ int ci;
+ for (ci=0; ci<2; ci++) { // Number of items to include in error text.
+ for (;;) {
+ if (endContext >= testText.length()) {break;}
+ if (expectedBreaks[endContext-1] != 0) {
+ if (count == 0) break;
+ count --;
+ }
+ endContext ++;
+ }
+ }
+
+ // Format looks like "<data>\\\uabcd\uabcd\\\U0001abcd...</data>"
+ UnicodeString errorText = "<data>";
+ /***if (strcmp(errorType, "next()") == 0) {
+ startContext = 0;
+ endContext = testText.length();
+
+ printStringBreaks(testText, expected, expectedCount);
+ }***/
+
+ for (ci=startContext; ci<endContext;) {
+ UnicodeString hexChars("0123456789abcdef");
+ UChar32 c;
+ int bn;
+ c = testText.char32At(ci);
+ if (ci == i) {
+ // This is the location of the error.
+ errorText.append("<?>");
+ } else if (expectedBreaks[ci] != 0) {
+ // This a non-error expected break position.
+ errorText.append("\\");
+ }
+ if (c < 0x10000) {
+ errorText.append("\\u");
+ for (bn=12; bn>=0; bn-=4) {
+ errorText.append(hexChars.charAt((c>>bn)&0xf));
+ }
+ } else {
+ errorText.append("\\U");
+ for (bn=28; bn>=0; bn-=4) {
+ errorText.append(hexChars.charAt((c>>bn)&0xf));
+ }
+ }
+ ci = testText.moveIndex32(ci, 1);
+ }
+ errorText.append("\\");
+ errorText.append("</data>\n");
+
+ // Output the error
+ char charErrorTxt[500];
+ UErrorCode status = U_ZERO_ERROR;
+ errorText.extract(charErrorTxt, sizeof(charErrorTxt), NULL, status);
+ charErrorTxt[sizeof(charErrorTxt)-1] = 0;
+ errln("%s break monkey test error. %s. Operation = %s; Random seed = %d; buf Idx = %d\n%s",
+ name, (expectedBreaks[i]? "break expected but not found" : "break found but not expected"),
+ errorType, seed, i, charErrorTxt);
+ break;
+ }
+ }
+
+ loopCount++;
+ }
+#endif
+}
+
+//
+// TestDebug - A place-holder test for debugging purposes.
+// For putting in fragments of other tests that can be invoked
+// for tracing without a lot of unwanted extra stuff happening.
+//
+void RBBITest::TestDebug(void) {
+#if 0
+ UErrorCode status = U_ZERO_ERROR;
+ int pos = 0;
+ int ruleStatus = 0;
+
+ RuleBasedBreakIterator* bi =
+ // (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale::getDefault(), status);
+ // (RuleBasedBreakIterator *)BreakIterator::createWordInstance(Locale::Locale("th"), status);
+ (RuleBasedBreakIterator *)BreakIterator::createSentenceInstance(Locale::getDefault(), status);
+ UnicodeString s("\\u2008\\u002e\\udc6a\\u37cd\\u71d0\\u2048\\U000e006a\\u002e\\u0046\\ufd3f\\u000a\\u002e");
+ // UnicodeString s("Aaa. Bcd");
+ s = s.unescape();
+ bi->setText(s);
+ UBool r = bi->isBoundary(8);
+ printf("%s", r?"true":"false");
+ return;
+ pos = bi->last();
+ do {
+ // ruleStatus = bi->getRuleStatus();
+ printf("%d\t%d\n", pos, ruleStatus);
+ pos = bi->previous();
+ } while (pos != BreakIterator::DONE);
+#endif
+}
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.h b/Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.h
new file mode 100644
index 00000000000..d625c4a42be
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/rbbitst.h
@@ -0,0 +1,130 @@
+/*************************************************************************
+ * Copyright (c) 1999-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *************************************************************************
+ * Date Name Description
+ * 12/15/99 Madhu Creation.
+ * 01/12/2000 Madhu Updated for changed API and added new tests
+ ************************************************************************/
+
+
+#ifndef RBBITEST_H
+#define RBBITEST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "intltest.h"
+#include "unicode/brkiter.h"
+
+
+class Enumeration;
+class BITestData;
+struct TestParams;
+class RBBIMonkeyKind;
+
+U_NAMESPACE_BEGIN
+class UVector32;
+U_NAMESPACE_END
+
+/**
+ * Test the RuleBasedBreakIterator class giving different rules
+ */
+class RBBITest: public IntlTest {
+public:
+
+ RBBITest();
+ virtual ~RBBITest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * Tests rule status return values
+ **/
+ void TestStatusReturn();
+
+ void TestEmptyString();
+ void TestGetAvailableLocales();
+ void TestGetDisplayName();
+ void TestEndBehaviour();
+ void TestBug4153072();
+ void TestJapaneseLineBreak();
+ void TestThaiLineBreak();
+ void TestMixedThaiLineBreak();
+ void TestMaiyamok();
+ void TestMonkey(char *params);
+
+ void TestExtended();
+ UChar *ReadAndConvertFile(const char *fileName, int &ulen, const char *encoding, UErrorCode &status);
+ void executeTest(TestParams *);
+
+ void TestWordBreaks();
+ void TestWordBoundary();
+ void TestLineBreaks();
+ void TestSentBreaks();
+ void TestBug3818();
+ void TestJapaneseWordBreak();
+ void TestTrieDict();
+ void TestUnicodeFiles();
+ void TestBug5775();
+
+ void TestDebug();
+
+
+/***********************/
+private:
+ /**
+ * internal methods to prepare test data
+ **/
+
+ /**
+ * Perform tests of BreakIterator forward and backward functionality
+ * on different kinds of iterators (word, sentence, line and character).
+ * It tests the methods first(), next(), current(), preceding(), following()
+ * previous() and isBoundary().
+ * It makes use of internal functions to achieve this.
+ **/
+ void generalIteratorTest(RuleBasedBreakIterator& bi, BITestData &td);
+ /**
+ * Internal method to perform iteration and test the first() and next() functions
+ **/
+ void testFirstAndNext(RuleBasedBreakIterator& bi, BITestData &td);
+ /**
+ * Internal method to perform iteration and test the last() and previous() functions
+ **/
+ void testLastAndPrevious(RuleBasedBreakIterator& bi, BITestData &td);
+ /**
+ * Internal method to perform iteration and test the following() function
+ **/
+ void testFollowing(RuleBasedBreakIterator& bi, BITestData &td);
+ /**
+ * Internal method to perform iteration and test the preceding() function
+ **/
+ void testPreceding(RuleBasedBreakIterator& bi, BITestData &td);
+ /**
+ * Internal method to perform iteration and test the isBoundary() function
+ **/
+ void testIsBoundary(RuleBasedBreakIterator& bi, BITestData &td);
+ /**
+ * Internal method to perform tests of BreakIterator multiple selection functionality
+ * on different kinds of iterators (word, sentence, line and character)
+ **/
+ void doMultipleSelectionTest(RuleBasedBreakIterator& iterator, BITestData &td);
+
+ void RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name, uint32_t seed,
+ int32_t loopCount, UBool useUText);
+
+ // Run one of the Unicode Consortium boundary test data files.
+ void runUnicodeTestData(const char *fileName, RuleBasedBreakIterator *bi);
+
+ // Run a single test case from one of the Unicode Consortium test files.
+ void checkUnicodeTestCase(const char *testFileName, int lineNumber,
+ const UnicodeString &testString,
+ UVector32 *breakPositions,
+ RuleBasedBreakIterator *bi);
+};
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/regcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/regcoll.cpp
new file mode 100644
index 00000000000..074f678be24
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/regcoll.cpp
@@ -0,0 +1,1215 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/unistr.h"
+#include "unicode/sortkey.h"
+#include "regcoll.h"
+#include "sfwdchit.h"
+
+#define ARRAY_LENGTH(array) ((int32_t)(sizeof array / sizeof array[0]))
+
+CollationRegressionTest::CollationRegressionTest()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ en_us = (RuleBasedCollator *)Collator::createInstance(Locale::getUS(), status);
+ if(U_FAILURE(status)) {
+ delete en_us;
+ en_us = 0;
+ errln("Collator creation failed with %s", u_errorName(status));
+ return;
+ }
+}
+
+CollationRegressionTest::~CollationRegressionTest()
+{
+ delete en_us;
+}
+
+
+ // @bug 4048446
+//
+// CollationElementIterator.reset() doesn't work
+//
+void CollationRegressionTest::Test4048446(/* char* par */)
+{
+ const UnicodeString test1 = "XFILE What subset of all possible test cases has the highest probability of detecting the most errors?";
+ const UnicodeString test2 = "Xf_ile What subset of all possible test cases has the lowest probability of detecting the least errors?";
+ CollationElementIterator *i1 = en_us->createCollationElementIterator(test1);
+ CollationElementIterator *i2 = en_us->createCollationElementIterator(test1);
+ UErrorCode status = U_ZERO_ERROR;
+
+ if (i1 == NULL|| i2 == NULL)
+ {
+ errln("Could not create CollationElementIterator's");
+ delete i1;
+ delete i2;
+ return;
+ }
+
+ while (i1->next(status) != CollationElementIterator::NULLORDER)
+ {
+ if (U_FAILURE(status))
+ {
+ errln("error calling next()");
+
+ delete i1;
+ delete i2;
+ return;
+ }
+ }
+
+ i1->reset();
+
+ assertEqual(*i1, *i2);
+
+ delete i1;
+ delete i2;
+}
+
+// @bug 4051866
+//
+// Collator -> rules -> Collator round-trip broken for expanding characters
+//
+void CollationRegressionTest::Test4051866(/* char* par */)
+{
+/*
+ RuleBasedCollator c1 = new RuleBasedCollator("< o "
+ +"& oe ,o\u3080"
+ +"& oe ,\u1530 ,O"
+ +"& OE ,O\u3080"
+ +"& OE ,\u1520"
+ +"< p ,P");
+*/
+
+ UnicodeString rules;
+ UErrorCode status = U_ZERO_ERROR;
+
+ rules += "< o ";
+ rules += "& oe ,o";
+ rules += (UChar)0x3080;
+ rules += "& oe ,";
+ rules += (UChar)0x1530;
+ rules += " ,O";
+ rules += "& OE ,O";
+ rules += (UChar)0x3080;
+ rules += "& OE ,";
+ rules += (UChar)0x1520;
+ rules += "< p ,P";
+
+ // Build a collator containing expanding characters
+ RuleBasedCollator *c1 = new RuleBasedCollator(rules, status);
+
+ // Build another using the rules from the first
+ RuleBasedCollator *c2 = new RuleBasedCollator(c1->getRules(), status);
+
+ // Make sure they're the same
+ if (!(c1->getRules() == c2->getRules()))
+ {
+ errln("Rules are not equal");
+ }
+
+ delete c2;
+ delete c1;
+}
+
+// @bug 4053636
+//
+// Collator thinks "black-bird" == "black"
+//
+void CollationRegressionTest::Test4053636(/* char* par */)
+{
+ if (en_us->equals("black_bird", "black"))
+ {
+ errln("black-bird == black");
+ }
+}
+
+// @bug 4054238
+//
+// CollationElementIterator will not work correctly if the associated
+// Collator object's mode is changed
+//
+void CollationRegressionTest::Test4054238(/* char* par */)
+{
+ const UChar chars3[] = {0x61, 0x00FC, 0x62, 0x65, 0x63, 0x6b, 0x20, 0x47, 0x72, 0x00F6, 0x00DF, 0x65, 0x20, 0x4c, 0x00FC, 0x62, 0x63, 0x6b, 0};
+ const UnicodeString test3(chars3);
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+
+ // NOTE: The Java code uses en_us to create the CollationElementIterators
+ // but I'm pretty sure that's wrong, so I've changed this to use c.
+ UErrorCode status = U_ZERO_ERROR;
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ CollationElementIterator *i1 = c->createCollationElementIterator(test3);
+ delete i1;
+ delete c;
+}
+
+// @bug 4054734
+//
+// Collator::IDENTICAL documented but not implemented
+//
+void CollationRegressionTest::Test4054734(/* char* par */)
+{
+ /*
+ Here's the original Java:
+
+ String[] decomp = {
+ "\u0001", "<", "\u0002",
+ "\u0001", "=", "\u0001",
+ "A\u0001", ">", "~\u0002", // Ensure A and ~ are not compared bitwise
+ "\u00C0", "=", "A\u0300" // Decomp should make these equal
+ };
+
+ String[] nodecomp = {
+ "\u00C0", ">", "A\u0300" // A-grave vs. A combining-grave
+ };
+ */
+
+ static const UChar decomp[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x0001, 0}, {0x3c, 0}, {0x0002, 0},
+ {0x0001, 0}, {0x3d, 0}, {0x0001, 0},
+ {0x41, 0x0001, 0}, {0x3e, 0}, {0x7e, 0x0002, 0},
+ {0x00c0, 0}, {0x3d, 0}, {0x41, 0x0300, 0}
+ };
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+
+ c->setStrength(Collator::IDENTICAL);
+
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ compareArray(*c, decomp, ARRAY_LENGTH(decomp));
+
+ delete c;
+}
+
+// @bug 4054736
+//
+// Full Decomposition mode not implemented
+//
+void CollationRegressionTest::Test4054736(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+
+ c->setStrength(Collator::SECONDARY);
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0xFB4F, 0}, {0x3d, 0}, {0x05D0, 0x05DC} // Alef-Lamed vs. Alef, Lamed
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4058613
+//
+// Collator::createInstance() causes an ArrayIndexOutofBoundsException for Korean
+//
+void CollationRegressionTest::Test4058613(/* char* par */)
+{
+ // Creating a default collator doesn't work when Korean is the default
+ // locale
+
+ Locale oldDefault = Locale::getDefault();
+ UErrorCode status = U_ZERO_ERROR;
+
+ Locale::setDefault(Locale::getKorean(), status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Could not set default locale to Locale::KOREAN");
+ return;
+ }
+
+ Collator *c = NULL;
+
+ c = Collator::createInstance("en_US", status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Could not create a Korean collator");
+ Locale::setDefault(oldDefault, status);
+ delete c;
+ return;
+ }
+
+ // Since the fix to this bug was to turn off decomposition for Korean collators,
+ // ensure that's what we got
+ if (c->getAttribute(UCOL_NORMALIZATION_MODE, status) != UCOL_OFF)
+ {
+ errln("Decomposition is not set to NO_DECOMPOSITION for Korean collator");
+ }
+
+ delete c;
+
+ Locale::setDefault(oldDefault, status);
+}
+
+// @bug 4059820
+//
+// RuleBasedCollator.getRules does not return the exact pattern as input
+// for expanding character sequences
+//
+void CollationRegressionTest::Test4059820(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ RuleBasedCollator *c = NULL;
+ UnicodeString rules = "< a < b , c/a < d < z";
+
+ c = new RuleBasedCollator(rules, status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failure building a collator.");
+ delete c;
+ return;
+ }
+
+ if ( c->getRules().indexOf("c/a") == -1)
+ {
+ errln("returned rules do not contain 'c/a'");
+ }
+
+ delete c;
+}
+
+// @bug 4060154
+//
+// MergeCollation::fixEntry broken for "& H < \u0131, \u0130, i, I"
+//
+void CollationRegressionTest::Test4060154(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString rules;
+
+ rules += "< g, G < h, H < i, I < j, J";
+ rules += " & H < ";
+ rules += (UChar)0x0131;
+ rules += ", ";
+ rules += (UChar)0x0130;
+ rules += ", i, I";
+
+ RuleBasedCollator *c = NULL;
+
+ c = new RuleBasedCollator(rules, status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("failure building collator.");
+ delete c;
+ return;
+ }
+
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+
+ /*
+ String[] tertiary = {
+ "A", "<", "B",
+ "H", "<", "\u0131",
+ "H", "<", "I",
+ "\u0131", "<", "\u0130",
+ "\u0130", "<", "i",
+ "\u0130", ">", "H",
+ };
+*/
+
+ static const UChar tertiary[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x41, 0}, {0x3c, 0}, {0x42, 0},
+ {0x48, 0}, {0x3c, 0}, {0x0131, 0},
+ {0x48, 0}, {0x3c, 0}, {0x49, 0},
+ {0x0131, 0}, {0x3c, 0}, {0x0130, 0},
+ {0x0130, 0}, {0x3c, 0}, {0x69, 0},
+ {0x0130, 0}, {0x3e, 0}, {0x48, 0}
+ };
+
+ c->setStrength(Collator::TERTIARY);
+ compareArray(*c, tertiary, ARRAY_LENGTH(tertiary));
+
+ /*
+ String[] secondary = {
+ "H", "<", "I",
+ "\u0131", "=", "\u0130",
+ };
+*/
+ static const UChar secondary[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x48, 0}, {0x3c, 0}, {0x49, 0},
+ {0x0131, 0}, {0x3d, 0}, {0x0130, 0}
+ };
+
+ c->setStrength(Collator::PRIMARY);
+ compareArray(*c, secondary, ARRAY_LENGTH(secondary));
+
+ delete c;
+}
+
+// @bug 4062418
+//
+// Secondary/Tertiary comparison incorrect in French Secondary
+//
+void CollationRegressionTest::Test4062418(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ RuleBasedCollator *c = NULL;
+
+ c = (RuleBasedCollator *) Collator::createInstance(Locale::getFrance(), status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create collator for Locale::getFrance()");
+ delete c;
+ return;
+ }
+
+ c->setStrength(Collator::SECONDARY);
+
+/*
+ String[] tests = {
+ "p\u00eache", "<", "p\u00e9ch\u00e9", // Comparing accents from end, p\u00e9ch\u00e9 is greater
+ };
+*/
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x70, 0x00EA, 0x63, 0x68, 0x65, 0}, {0x3c, 0}, {0x70, 0x00E9, 0x63, 0x68, 0x00E9, 0}
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4065540
+//
+// Collator::compare() method broken if either string contains spaces
+//
+void CollationRegressionTest::Test4065540(/* char* par */)
+{
+ if (en_us->compare("abcd e", "abcd f") == 0)
+ {
+ errln("'abcd e' == 'abcd f'");
+ }
+}
+
+// @bug 4066189
+//
+// Unicode characters need to be recursively decomposed to get the
+// correct result. For example,
+// u1EB1 -> \u0103 + \u0300 -> a + \u0306 + \u0300.
+//
+void CollationRegressionTest::Test4066189(/* char* par */)
+{
+ static const UChar chars1[] = {0x1EB1, 0};
+ static const UChar chars2[] = {0x61, 0x0306, 0x0300, 0};
+ const UnicodeString test1(chars1);
+ const UnicodeString test2(chars2);
+ UErrorCode status = U_ZERO_ERROR;
+
+ // NOTE: The java code used en_us to create the
+ // CollationElementIterator's. I'm pretty sure that
+ // was wrong, so I've change the code to use c1 and c2
+ RuleBasedCollator *c1 = (RuleBasedCollator *) en_us->clone();
+ c1->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ CollationElementIterator *i1 = c1->createCollationElementIterator(test1);
+
+ RuleBasedCollator *c2 = (RuleBasedCollator *) en_us->clone();
+ c2->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
+ CollationElementIterator *i2 = c2->createCollationElementIterator(test2);
+
+ assertEqual(*i1, *i2);
+
+ delete i2;
+ delete c2;
+ delete i1;
+ delete c1;
+}
+
+// @bug 4066696
+//
+// French secondary collation checking at the end of compare iteration fails
+//
+void CollationRegressionTest::Test4066696(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = NULL;
+
+ c = (RuleBasedCollator *)Collator::createInstance(Locale::getFrance(), status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failure creating collator for Locale::getFrance()");
+ delete c;
+ return;
+ }
+
+ c->setStrength(Collator::SECONDARY);
+
+/*
+ String[] tests = {
+ "\u00e0", "<", "\u01fa", // a-grave < A-ring-acute
+ };
+
+ should be:
+
+ String[] tests = {
+ "\u00e0", ">", "\u01fa", // a-grave < A-ring-acute
+ };
+
+*/
+
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x00E0, 0}, {0x3e, 0}, {0x01FA, 0}
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4076676
+//
+// Bad canonicalization of same-class combining characters
+//
+void CollationRegressionTest::Test4076676(/* char* par */)
+{
+ // These combining characters are all in the same class, so they should not
+ // be reordered, and they should compare as unequal.
+ static const UChar s1[] = {0x41, 0x0301, 0x0302, 0x0300, 0};
+ static const UChar s2[] = {0x41, 0x0302, 0x0300, 0x0301, 0};
+
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+ c->setStrength(Collator::TERTIARY);
+
+ if (c->compare(s1,s2) == 0)
+ {
+ errln("Same-class combining chars were reordered");
+ }
+
+ delete c;
+}
+
+// @bug 4079231
+//
+// RuleBasedCollator::operator==(NULL) throws NullPointerException
+//
+void CollationRegressionTest::Test4079231(/* char* par */)
+{
+ // I don't think there's any way to write this test
+ // in C++. The following is equivalent to the Java,
+ // but doesn't compile 'cause NULL can't be converted
+ // to Collator&
+ //
+ // if (en_us->operator==(NULL))
+ // {
+ // errln("en_us->operator==(NULL) returned TRUE");
+ // }
+
+ /*
+ try {
+ if (en_us->equals(null)) {
+ errln("en_us->equals(null) returned true");
+ }
+ }
+ catch (Exception e) {
+ errln("en_us->equals(null) threw " + e.toString());
+ }
+*/
+}
+
+// @bug 4078588
+//
+// RuleBasedCollator breaks on "< a < bb" rule
+//
+void CollationRegressionTest::Test4078588(/* char *par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *rbc = new RuleBasedCollator((UnicodeString)"< a < bb", status);
+
+ if (rbc == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create RuleBasedCollator.");
+ delete rbc;
+ return;
+ }
+
+ Collator::EComparisonResult result = rbc->compare("a","bb");
+
+ if (result != Collator::LESS)
+ {
+ errln((UnicodeString)"Compare(a,bb) returned " + (int)result
+ + (UnicodeString)"; expected -1");
+ }
+
+ delete rbc;
+}
+
+// @bug 4081866
+//
+// Combining characters in different classes not reordered properly.
+//
+void CollationRegressionTest::Test4081866(/* char* par */)
+{
+ // These combining characters are all in different classes,
+ // so they should be reordered and the strings should compare as equal.
+ static const UChar s1[] = {0x41, 0x0300, 0x0316, 0x0327, 0x0315, 0};
+ static const UChar s2[] = {0x41, 0x0327, 0x0316, 0x0315, 0x0300, 0};
+
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+ c->setStrength(Collator::TERTIARY);
+
+ // Now that the default collators are set to NO_DECOMPOSITION
+ // (as a result of fixing bug 4114077), we must set it explicitly
+ // when we're testing reordering behavior. -- lwerner, 5/5/98
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+
+ if (c->compare(s1,s2) != 0)
+ {
+ errln("Combining chars were not reordered");
+ }
+
+ delete c;
+}
+
+// @bug 4087241
+//
+// string comparison errors in Scandinavian collators
+//
+void CollationRegressionTest::Test4087241(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Locale da_DK("da", "DK");
+ RuleBasedCollator *c = NULL;
+
+ c = (RuleBasedCollator *) Collator::createInstance(da_DK, status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create collator for da_DK locale");
+ delete c;
+ return;
+ }
+
+ c->setStrength(Collator::SECONDARY);
+
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x7a, 0}, {0x3c, 0}, {0x00E6, 0}, // z < ae
+ {0x61, 0x0308, 0}, {0x3c, 0}, {0x61, 0x030A, 0}, // a-unlaut < a-ring
+ {0x59, 0}, {0x3c, 0}, {0x75, 0x0308, 0}, // Y < u-umlaut
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4087243
+//
+// CollationKey takes ignorable strings into account when it shouldn't
+//
+void CollationRegressionTest::Test4087243(/* char* par */)
+{
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+ c->setStrength(Collator::TERTIARY);
+
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x31, 0x32, 0x33, 0}, {0x3d, 0}, {0x31, 0x32, 0x33, 0x0001, 0} // 1 2 3 = 1 2 3 ctrl-A
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4092260
+//
+// Mu/micro conflict
+// Micro symbol and greek lowercase letter Mu should sort identically
+//
+void CollationRegressionTest::Test4092260(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Locale el("el", "");
+ Collator *c = NULL;
+
+ c = Collator::createInstance(el, status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create collator for el locale.");
+ delete c;
+ return;
+ }
+
+ // These now have tertiary differences in UCA
+ c->setAttribute(UCOL_STRENGTH, UCOL_SECONDARY, status);
+
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x00B5, 0}, {0x3d, 0}, {0x03BC, 0}
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4095316
+//
+void CollationRegressionTest::Test4095316(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Locale el_GR("el", "GR");
+ Collator *c = Collator::createInstance(el_GR, status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create collator for el_GR locale");
+ delete c;
+ return;
+ }
+ // These now have tertiary differences in UCA
+ //c->setStrength(Collator::TERTIARY);
+ c->setAttribute(UCOL_STRENGTH, UCOL_SECONDARY, status);
+
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x03D4, 0}, {0x3d, 0}, {0x03AB, 0}
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4101940
+//
+void CollationRegressionTest::Test4101940(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = NULL;
+ UnicodeString rules = "< a < b";
+ UnicodeString nothing = "";
+
+ c = new RuleBasedCollator(rules, status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create RuleBasedCollator");
+ delete c;
+ return;
+ }
+
+ CollationElementIterator *i = c->createCollationElementIterator(nothing);
+ i->reset();
+
+ if (i->next(status) != CollationElementIterator::NULLORDER)
+ {
+ errln("next did not return NULLORDER");
+ }
+
+ delete i;
+ delete c;
+}
+
+// @bug 4103436
+//
+// Collator::compare not handling spaces properly
+//
+void CollationRegressionTest::Test4103436(/* char* par */)
+{
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+ c->setStrength(Collator::TERTIARY);
+
+ static const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x66, 0x69, 0x6c, 0x65, 0}, {0x3c, 0}, {0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0},
+ {0x66, 0x69, 0x6c, 0x65, 0}, {0x3c, 0}, {0x66, 0x69, 0x6c, 0x65, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0}
+ };
+
+ compareArray(*c, tests, ARRAY_LENGTH(tests));
+
+ delete c;
+}
+
+// @bug 4114076
+//
+// Collation not Unicode conformant with Hangul syllables
+//
+void CollationRegressionTest::Test4114076(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+ c->setStrength(Collator::TERTIARY);
+
+ //
+ // With Canonical decomposition, Hangul syllables should get decomposed
+ // into Jamo, but Jamo characters should not be decomposed into
+ // conjoining Jamo
+ //
+ static const UChar test1[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0xd4db, 0}, {0x3d, 0}, {0x1111, 0x1171, 0x11b6, 0}
+ };
+
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ compareArray(*c, test1, ARRAY_LENGTH(test1));
+
+ // From UTR #15:
+ // *In earlier versions of Unicode, jamo characters like ksf
+ // had compatibility mappings to kf + sf. These mappings were
+ // removed in Unicode 2.1.9 to ensure that Hangul syllables are maintained.)
+ // That is, the following test is obsolete as of 2.1.9
+
+//obsolete- // With Full decomposition, it should go all the way down to
+//obsolete- // conjoining Jamo characters.
+//obsolete- //
+//obsolete- static const UChar test2[][CollationRegressionTest::MAX_TOKEN_LEN] =
+//obsolete- {
+//obsolete- {0xd4db, 0}, {0x3d, 0}, {0x1111, 0x116e, 0x1175, 0x11af, 0x11c2, 0}
+//obsolete- };
+//obsolete-
+//obsolete- c->setDecomposition(Normalizer::DECOMP_COMPAT);
+//obsolete- compareArray(*c, test2, ARRAY_LENGTH(test2));
+
+ delete c;
+}
+
+
+// @bug 4124632
+//
+// Collator::getCollationKey was hanging on certain character sequences
+//
+void CollationRegressionTest::Test4124632(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *coll = NULL;
+
+ coll = Collator::createInstance(Locale::getJapan(), status);
+
+ if (coll == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create collator for Locale::JAPAN");
+ delete coll;
+ }
+
+ static const UChar test[] = {0x41, 0x0308, 0x62, 0x63, 0};
+ CollationKey key;
+
+ coll->getCollationKey(test, key, status);
+
+ if (key.isBogus() || U_FAILURE(status))
+ {
+ errln("CollationKey creation failed.");
+ }
+
+ delete coll;
+}
+
+// @bug 4132736
+//
+// sort order of french words with multiple accents has errors
+//
+void CollationRegressionTest::Test4132736(/* char* par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ Collator *c = NULL;
+
+ c = Collator::createInstance(Locale::getFrance(), status);
+ c->setStrength(Collator::TERTIARY);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create a collator for Locale::getFrance()");
+ delete c;
+ }
+
+ static const UChar test1[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x65, 0x0300, 0x65, 0x0301, 0}, {0x3c, 0}, {0x65, 0x0301, 0x65, 0x0300, 0},
+ {0x65, 0x0300, 0x0301, 0}, {0x3c, 0}, {0x65, 0x0301, 0x0300, 0}
+ };
+
+ compareArray(*c, test1, ARRAY_LENGTH(test1));
+
+ delete c;
+}
+
+// @bug 4133509
+//
+// The sorting using java.text.CollationKey is not in the exact order
+//
+void CollationRegressionTest::Test4133509(/* char* par */)
+{
+ static const UChar test1[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0}, {0x3c, 0}, {0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0},
+ {0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0}, {0x3c, 0}, {0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0},
+ {0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0}, {0x3c, 0}, {0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0}
+ };
+
+ compareArray(*en_us, test1, ARRAY_LENGTH(test1));
+}
+
+// @bug 4114077
+//
+// Collation with decomposition off doesn't work for Europe
+//
+void CollationRegressionTest::Test4114077(/* char* par */)
+{
+ // Ensure that we get the same results with decomposition off
+ // as we do with it on....
+
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone();
+ c->setStrength(Collator::TERTIARY);
+
+ static const UChar test1[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x00C0, 0}, {0x3d, 0}, {0x41, 0x0300, 0}, // Should be equivalent
+ {0x70, 0x00ea, 0x63, 0x68, 0x65, 0}, {0x3e, 0}, {0x70, 0x00e9, 0x63, 0x68, 0x00e9, 0},
+ {0x0204, 0}, {0x3d, 0}, {0x45, 0x030F, 0},
+ {0x01fa, 0}, {0x3d, 0}, {0x41, 0x030a, 0x0301, 0}, // a-ring-acute -> a-ring, acute
+ // -> a, ring, acute
+ {0x41, 0x0300, 0x0316, 0}, {0x3c, 0}, {0x41, 0x0316, 0x0300, 0} // No reordering --> unequal
+ };
+
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
+ compareArray(*c, test1, ARRAY_LENGTH(test1));
+
+ static const UChar test2[][CollationRegressionTest::MAX_TOKEN_LEN] =
+ {
+ {0x41, 0x0300, 0x0316, 0}, {0x3d, 0}, {0x41, 0x0316, 0x0300, 0} // Reordering --> equal
+ };
+
+ c->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ compareArray(*c, test2, ARRAY_LENGTH(test2));
+
+ delete c;
+}
+
+// @bug 4141640
+//
+// Support for Swedish gone in 1.1.6 (Can't create Swedish collator)
+//
+void CollationRegressionTest::Test4141640(/* char* par */)
+{
+ //
+ // Rather than just creating a Swedish collator, we might as well
+ // try to instantiate one for every locale available on the system
+ // in order to prevent this sort of bug from cropping up in the future
+ //
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i, localeCount;
+ const Locale *locales = Locale::getAvailableLocales(localeCount);
+
+ for (i = 0; i < localeCount; i += 1)
+ {
+ Collator *c = NULL;
+
+ status = U_ZERO_ERROR;
+ c = Collator::createInstance(locales[i], status);
+
+ if (c == NULL || U_FAILURE(status))
+ {
+ UnicodeString msg, localeName;
+
+ msg += "Could not create collator for locale ";
+ msg += locales[i].getName();
+
+ errln(msg);
+ }
+
+ delete c;
+ }
+}
+
+// @bug 4139572
+//
+// getCollationKey throws exception for spanish text
+// Cannot reproduce this bug on 1.2, however it DOES fail on 1.1.6
+//
+void CollationRegressionTest::Test4139572(/* char* par */)
+{
+ //
+ // Code pasted straight from the bug report
+ // (and then translated to C++ ;-)
+ //
+ // create spanish locale and collator
+ UErrorCode status = U_ZERO_ERROR;
+ Locale l("es", "es");
+ Collator *col = NULL;
+
+ col = Collator::createInstance(l, status);
+
+ if (col == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create a collator for es_es locale.");
+ delete col;
+ return;
+ }
+
+ CollationKey key;
+
+ // this spanish phrase kills it!
+ col->getCollationKey("Nombre De Objeto", key, status);
+
+ if (key.isBogus() || U_FAILURE(status))
+ {
+ errln("Error creating CollationKey for \"Nombre De Ojbeto\"");
+ }
+
+ delete col;
+}
+/* HSYS : RuleBasedCollator::compare() performance enhancements
+ compare() does not create CollationElementIterator() anymore.*/
+
+class My4146160Collator : public RuleBasedCollator
+{
+public:
+ My4146160Collator(RuleBasedCollator &rbc, UErrorCode &status);
+ ~My4146160Collator();
+
+ CollationElementIterator *createCollationElementIterator(const UnicodeString &text) const;
+
+ CollationElementIterator *createCollationElementIterator(const CharacterIterator &text) const;
+
+ static int32_t count;
+};
+
+int32_t My4146160Collator::count = 0;
+
+My4146160Collator::My4146160Collator(RuleBasedCollator &rbc, UErrorCode &status)
+ : RuleBasedCollator(rbc.getRules(), status)
+{
+}
+
+My4146160Collator::~My4146160Collator()
+{
+}
+
+CollationElementIterator *My4146160Collator::createCollationElementIterator(const UnicodeString &text) const
+{
+ count += 1;
+ return RuleBasedCollator::createCollationElementIterator(text);
+}
+
+CollationElementIterator *My4146160Collator::createCollationElementIterator(const CharacterIterator &text) const
+{
+ count += 1;
+ return RuleBasedCollator::createCollationElementIterator(text);
+}
+
+// @bug 4146160
+//
+// RuleBasedCollator doesn't use createCollationElementIterator internally
+//
+void CollationRegressionTest::Test4146160(/* char* par */)
+{
+#if 0
+ //
+ // Use a custom collator class whose createCollationElementIterator
+ // methods increment a count....
+ //
+ UErrorCode status = U_ZERO_ERROR;
+ CollationKey key;
+
+ My4146160Collator::count = 0;
+ My4146160Collator *mc = NULL;
+
+ mc = new My4146160Collator(*en_us, status);
+
+ if (mc == NULL || U_FAILURE(status))
+ {
+ errln("Failed to create a My4146160Collator.");
+ delete mc;
+ return;
+ }
+
+ mc->getCollationKey("1", key, status);
+
+ if (key.isBogus() || U_FAILURE(status))
+ {
+ errln("Failure to get a CollationKey from a My4146160Collator.");
+ delete mc;
+ return;
+ }
+
+ if (My4146160Collator::count < 1)
+ {
+ errln("My4146160Collator::createCollationElementIterator not called for getCollationKey");
+ }
+
+ My4146160Collator::count = 0;
+ mc->compare("1", "2");
+
+ if (My4146160Collator::count < 1)
+ {
+ errln("My4146160Collator::createtCollationElementIterator not called for compare");
+ }
+
+ delete mc;
+#endif
+}
+void CollationRegressionTest::compareArray(Collator &c,
+ const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN],
+ int32_t testCount)
+{
+ int32_t i;
+ Collator::EComparisonResult expectedResult = Collator::EQUAL;
+
+ for (i = 0; i < testCount; i += 3)
+ {
+ UnicodeString source(tests[i]);
+ UnicodeString comparison(tests[i + 1]);
+ UnicodeString target(tests[i + 2]);
+
+ if (comparison == "<")
+ {
+ expectedResult = Collator::LESS;
+ }
+ else if (comparison == ">")
+ {
+ expectedResult = Collator::GREATER;
+ }
+ else if (comparison == "=")
+ {
+ expectedResult = Collator::EQUAL;
+ }
+ else
+ {
+ UnicodeString bogus1("Bogus comparison string \"");
+ UnicodeString bogus2("\"");
+ errln(bogus1 + comparison + bogus2);
+ }
+
+ Collator::EComparisonResult compareResult = c.compare(source, target);
+
+ CollationKey sourceKey, targetKey;
+ UErrorCode status = U_ZERO_ERROR;
+
+ c.getCollationKey(source, sourceKey, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Couldn't get collationKey for source");
+ continue;
+ }
+
+ c.getCollationKey(target, targetKey, status);
+
+ if (U_FAILURE(status))
+ {
+ errln("Couldn't get collationKey for target");
+ continue;
+ }
+
+ Collator::EComparisonResult keyResult = sourceKey.compareTo(targetKey);
+
+ reportCResult( source, target, sourceKey, targetKey, compareResult, keyResult, compareResult, expectedResult );
+
+ }
+}
+
+void CollationRegressionTest::assertEqual(CollationElementIterator &i1, CollationElementIterator &i2)
+{
+ int32_t c1, c2, count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+
+ do
+ {
+ c1 = i1.next(status);
+ c2 = i2.next(status);
+
+ if (c1 != c2)
+ {
+ UnicodeString msg, msg1(" ");
+
+ msg += msg1 + count;
+ msg += ": strength(0x";
+ appendHex(c1, 8, msg);
+ msg += ") != strength(0x";
+ appendHex(c2, 8, msg);
+ msg += ")";
+
+ errln(msg);
+ break;
+ }
+
+ count += 1;
+ }
+ while (c1 != CollationElementIterator::NULLORDER);
+}
+
+void CollationRegressionTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /* par */)
+{
+ if (exec)
+ {
+ logln("Collation Regression Tests: ");
+ }
+
+ if(en_us) {
+ switch (index)
+ {
+ case 0: name = "Test4048446"; if (exec) Test4048446(/* par */); break;
+ case 1: name = "Test4051866"; if (exec) Test4051866(/* par */); break;
+ case 2: name = "Test4053636"; if (exec) Test4053636(/* par */); break;
+ case 3: name = "Test4054238"; if (exec) Test4054238(/* par */); break;
+ case 4: name = "Test4054734"; if (exec) Test4054734(/* par */); break;
+ case 5: name = "Test4054736"; if (exec) Test4054736(/* par */); break;
+ case 6: name = "Test4058613"; if (exec) Test4058613(/* par */); break;
+ case 7: name = "Test4059820"; if (exec) Test4059820(/* par */); break;
+ case 8: name = "Test4060154"; if (exec) Test4060154(/* par */); break;
+ case 9: name = "Test4062418"; if (exec) Test4062418(/* par */); break;
+ case 10: name = "Test4065540"; if (exec) Test4065540(/* par */); break;
+ case 11: name = "Test4066189"; if (exec) Test4066189(/* par */); break;
+ case 12: name = "Test4066696"; if (exec) Test4066696(/* par */); break;
+ case 13: name = "Test4076676"; if (exec) Test4076676(/* par */); break;
+ case 14: name = "Test4078588"; if (exec) Test4078588(/* par */); break;
+ case 15: name = "Test4079231"; if (exec) Test4079231(/* par */); break;
+ case 16: name = "Test4081866"; if (exec) Test4081866(/* par */); break;
+ case 17: name = "Test4087241"; if (exec) Test4087241(/* par */); break;
+ case 18: name = "Test4087243"; if (exec) Test4087243(/* par */); break;
+ case 19: name = "Test4092260"; if (exec) Test4092260(/* par */); break;
+ case 20: name = "Test4095316"; if (exec) Test4095316(/* par */); break;
+ case 21: name = "Test4101940"; if (exec) Test4101940(/* par */); break;
+ case 22: name = "Test4103436"; if (exec) Test4103436(/* par */); break;
+ case 23: name = "Test4114076"; if (exec) Test4114076(/* par */); break;
+ case 24: name = "Test4114077"; if (exec) Test4114077(/* par */); break;
+ case 25: name = "Test4124632"; if (exec) Test4124632(/* par */); break;
+ case 26: name = "Test4132736"; if (exec) Test4132736(/* par */); break;
+ case 27: name = "Test4133509"; if (exec) Test4133509(/* par */); break;
+ case 28: name = "Test4139572"; if (exec) Test4139572(/* par */); break;
+ case 29: name = "Test4141640"; if (exec) Test4141640(/* par */); break;
+ case 30: name = "Test4146160"; if (exec) Test4146160(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ errln("Class collator not instantiated");
+ name = "";
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/regcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/regcoll.h
new file mode 100644
index 00000000000..a9a90e22018
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/regcoll.h
@@ -0,0 +1,244 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * Collation regression tests.
+ * (So we'll have no regrets later)
+ */
+
+#ifndef _REGCOLL
+#define _REGCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/coleitr.h"
+#include "tscoll.h"
+
+class CollationRegressionTest: public IntlTestCollator
+{
+public:
+
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 32 };
+
+ CollationRegressionTest();
+ virtual ~CollationRegressionTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // @bug 4048446
+ //
+ // CollationElementIterator.reset() doesn't work
+ //
+ void Test4048446(/* char* par */);
+
+ // @bug 4051866
+ //
+ // Collator -> rules -> Collator round-trip broken for expanding characters
+ //
+ void Test4051866(/* char* par */);
+
+ // @bug 4053636
+ //
+ // Collator thinks "black-bird" == "black"
+ //
+ void Test4053636(/* char* par */);
+
+
+ // @bug 4054238
+ //
+ // CollationElementIterator will not work correctly if the associated
+ // Collator object's mode is changed
+ //
+ void Test4054238(/* char* par */);
+
+ // @bug 4054734
+ //
+ // Collator.IDENTICAL documented but not implemented
+ //
+ void Test4054734(/* char* par */);
+
+ // @bug 4054736
+ //
+ // Full Decomposition mode not implemented
+ //
+ void Test4054736(/* char* par */);
+
+ // @bug 4058613
+ //
+ // Collator.getInstance() causes an ArrayIndexOutofBoundsException for Korean
+ //
+ void Test4058613(/* char* par */);
+
+ // @bug 4059820
+ //
+ // RuleBasedCollator.getRules does not return the exact pattern as input
+ // for expanding character sequences
+ //
+ void Test4059820(/* char* par */);
+
+ // @bug 4060154
+ //
+ // MergeCollation::fixEntry broken for "& H < \u0131, \u0130, i, I"
+ //
+ void Test4060154(/* char* par */);
+
+ // @bug 4062418
+ //
+ // Secondary/Tertiary comparison incorrect in French Secondary
+ //
+ void Test4062418(/* char* par */);
+
+ // @bug 4065540
+ //
+ // Collator.compare() method broken if either string contains spaces
+ //
+ void Test4065540(/* char* par */);
+
+ // @bug 4066189
+ //
+ // Unicode characters need to be recursively decomposed to get the
+ // correct result. For example,
+ // u1EB1 -> \u0103 + \u0300 -> a + \u0306 + \u0300.
+ //
+ void Test4066189(/* char* par */);
+
+ // @bug 4066696
+ //
+ // French secondary collation checking at the end of compare iteration fails
+ //
+ void Test4066696(/* char* par */);
+
+
+ // @bug 4076676
+ //
+ // Bad canonicalization of same-class combining characters
+ //
+ void Test4076676(/* char* par */);
+
+
+ // @bug 4078588
+ //
+ // RuleBasedCollator breaks on "< a < bb" rule
+ //
+ void Test4078588(/* char* par */);
+
+ // @bug 4079231
+ //
+ // RuleBasedCollator.equals(null) throws NullPointerException
+ //
+ void Test4079231(/* char* par */);
+
+ // @bug 4081866
+ //
+ // Combining characters in different classes not reordered properly.
+ //
+ void Test4081866(/* char* par */);
+
+ // @bug 4087241
+ //
+ // string comparison errors in Scandinavian collators
+ //
+ void Test4087241(/* char* par */);
+
+ // @bug 4087243
+ //
+ // CollationKey takes ignorable strings into account when it shouldn't
+ //
+ void Test4087243(/* char* par */);
+
+ // @bug 4092260
+ //
+ // Mu/micro conflict
+ // Micro symbol and greek lowercase letter Mu should sort identically
+ //
+ void Test4092260(/* char* par */);
+
+ // @bug 4095316
+ //
+ void Test4095316(/* char* par */);
+
+ // @bug 4101940
+ //
+ void Test4101940(/* char* par */);
+
+ // @bug 4103436
+ //
+ // Collator.compare not handling spaces properly
+ //
+ void Test4103436(/* char* par */);
+
+ // @bug 4114076
+ //
+ // Collation not Unicode conformant with Hangul syllables
+ //
+ void Test4114076(/* char* par */);
+
+
+ // @bug 4114077
+ //
+ // Collation with decomposition off doesn't work for Europe
+ //
+ void Test4114077(/* char* par */);
+
+ // @bug 4124632
+ //
+ // Collator.getCollationKey was hanging on certain character sequences
+ //
+ void Test4124632(/* char* par */);
+
+ // @bug 4132736
+ //
+ // sort order of french words with multiple accents has errors
+ //
+ void Test4132736(/* char* par */);
+
+ // @bug 4133509
+ //
+ // The sorting using java.text.CollationKey is not in the exact order
+ //
+ void Test4133509(/* char* par */);
+
+ // @bug 4139572
+ //
+ // getCollationKey throws exception for spanish text
+ // Cannot reproduce this bug on 1.2, however it DOES fail on 1.1.6
+ //
+ void Test4139572(/* char* par */);
+
+ // @bug 4141640
+ //
+ // Support for Swedish gone in 1.1.6 (Can't create Swedish collator)
+ //
+ void Test4141640(/* char* par */);
+
+ // @bug 4146160
+ //
+ // RuleBasedCollator doesn't use getCollationElementIterator internally
+ //
+ void Test4146160(/* char* par */);
+
+private:
+ //------------------------------------------------------------------------
+ // Internal utilities
+ //
+ void compareArray(Collator &c,
+ const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN],
+ int32_t testCount);
+
+ void assertEqual(CollationElementIterator &i1, CollationElementIterator &i2);
+
+
+ RuleBasedCollator *en_us;
+
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/regextst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/regextst.cpp
new file mode 100644
index 00000000000..04b437a4a94
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/regextst.cpp
@@ -0,0 +1,2127 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+//
+// regextst.cpp
+//
+// ICU Regular Expressions test, part of intltest.
+//
+
+#include "intltest.h"
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+
+#include "unicode/regex.h"
+#include "unicode/uchar.h"
+#include "unicode/ucnv.h"
+#include "regextst.h"
+#include "uvector.h"
+#include "util.h"
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+
+//---------------------------------------------------------------------------
+//
+// Test class boilerplate
+//
+//---------------------------------------------------------------------------
+RegexTest::RegexTest()
+{
+}
+
+
+RegexTest::~RegexTest()
+{
+}
+
+
+
+void RegexTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite RegexTest: ");
+ switch (index) {
+
+ case 0: name = "Basic";
+ if (exec) Basic();
+ break;
+ case 1: name = "API_Match";
+ if (exec) API_Match();
+ break;
+ case 2: name = "API_Replace";
+ if (exec) API_Replace();
+ break;
+ case 3: name = "API_Pattern";
+ if (exec) API_Pattern();
+ break;
+ case 4: name = "Extended";
+ if (exec) Extended();
+ break;
+ case 5: name = "Errors";
+ if (exec) Errors();
+ break;
+ case 6: name = "PerlTests";
+ if (exec) PerlTests();
+ break;
+
+
+ default: name = "";
+ break; //needed to end loop
+ }
+}
+
+
+//---------------------------------------------------------------------------
+//
+// Error Checking / Reporting macros used in all of the tests.
+//
+//---------------------------------------------------------------------------
+#define REGEX_CHECK_STATUS {if (U_FAILURE(status)) {errln("RegexTest failure at line %d. status=%s\n", \
+__LINE__, u_errorName(status)); return;}}
+
+#define REGEX_ASSERT(expr) {if ((expr)==FALSE) {errln("RegexTest failure at line %d.\n", __LINE__);};}
+
+#define REGEX_ASSERT_FAIL(expr, errcode) {UErrorCode status=U_ZERO_ERROR; (expr);\
+if (status!=errcode) {errln("RegexTest failure at line %d. Expected status=%s, got %s\n", \
+ __LINE__, u_errorName(errcode), u_errorName(status));};}
+
+#define REGEX_CHECK_STATUS_L(line) {if (U_FAILURE(status)) {errln( \
+ "RegexTest failure at line %d, from %d. status=%d\n",__LINE__, (line), status); }}
+
+#define REGEX_ASSERT_L(expr, line) {if ((expr)==FALSE) { \
+ errln("RegexTest failure at line %d, from %d.", __LINE__, (line)); return;}}
+
+
+
+//---------------------------------------------------------------------------
+//
+// REGEX_TESTLM Macro + invocation function to simplify writing quick tests
+// for the LookingAt() and Match() functions.
+//
+// usage:
+// REGEX_TESTLM("pattern", "input text", lookingAt expected, matches expected);
+//
+// The expected results are UBool - TRUE or FALSE.
+// The input text is unescaped. The pattern is not.
+//
+//
+//---------------------------------------------------------------------------
+
+#define REGEX_TESTLM(pat, text, looking, match) doRegexLMTest(pat, text, looking, match, __LINE__);
+
+UBool RegexTest::doRegexLMTest(const char *pat, const char *text, UBool looking, UBool match, int32_t line) {
+ const UnicodeString pattern(pat);
+ const UnicodeString inputText(text);
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError pe;
+ RegexPattern *REPattern = NULL;
+ RegexMatcher *REMatcher = NULL;
+ UBool retVal = TRUE;
+
+ UnicodeString patString(pat);
+ REPattern = RegexPattern::compile(patString, 0, pe, status);
+ if (U_FAILURE(status)) {
+ errln("RegexTest failure in RegexPattern::compile() at line %d. Status = %s\n",
+ line, u_errorName(status));
+ return FALSE;
+ }
+ if (line==376) { RegexPatternDump(REPattern);}
+
+ UnicodeString inputString(inputText);
+ UnicodeString unEscapedInput = inputString.unescape();
+ REMatcher = REPattern->matcher(unEscapedInput, status);
+ if (U_FAILURE(status)) {
+ errln("RegexTest failure in REPattern::matcher() at line %d. Status = %s\n",
+ line, u_errorName(status));
+ return FALSE;
+ }
+
+ UBool actualmatch;
+ actualmatch = REMatcher->lookingAt(status);
+ if (U_FAILURE(status)) {
+ errln("RegexTest failure in lookingAt() at line %d. Status = %s\n",
+ line, u_errorName(status));
+ retVal = FALSE;
+ }
+ if (actualmatch != looking) {
+ errln("RegexTest: wrong return from lookingAt() at line %d.\n", line);
+ retVal = FALSE;
+ }
+
+ status = U_ZERO_ERROR;
+ actualmatch = REMatcher->matches(status);
+ if (U_FAILURE(status)) {
+ errln("RegexTest failure in matches() at line %d. Status = %s\n",
+ line, u_errorName(status));
+ retVal = FALSE;
+ }
+ if (actualmatch != match) {
+ errln("RegexTest: wrong return from matches() at line %d.\n", line);
+ retVal = FALSE;
+ }
+
+ if (retVal == FALSE) {
+ RegexPatternDump(REPattern);
+ }
+
+ delete REPattern;
+ delete REMatcher;
+ return retVal;
+}
+
+
+
+
+//---------------------------------------------------------------------------
+//
+// regex_find(pattern, inputString, lineNumber)
+//
+// function to simplify writing tests regex tests.
+//
+// The input text is unescaped. The pattern is not.
+// The input text is marked with the expected match positions
+// <0>text <1> more text </1> </0>
+// The <n> </n> tags are removed before trying the match.
+// The tags mark the start and end of the match and of any capture groups.
+//
+//
+//---------------------------------------------------------------------------
+
+
+// Set a value into a UVector at position specified by a decimal number in
+// a UnicodeString. This is a utility function needed by the actual test function,
+// which follows.
+static void set(UVector &vec, int32_t val, UnicodeString index) {
+ UErrorCode status=U_ZERO_ERROR;
+ int32_t idx = 0;
+ for (int32_t i=0; i<index.length(); i++) {
+ int32_t d=u_charDigitValue(index.charAt(i));
+ if (d<0) {return;}
+ idx = idx*10 + d;
+ }
+ while (vec.size()<idx+1) {vec.addElement(-1, status);}
+ vec.setElementAt(val, idx);
+}
+
+void RegexTest::regex_find(const UnicodeString &pattern,
+ const UnicodeString &flags,
+ const UnicodeString &inputString,
+ int32_t line) {
+ UnicodeString unEscapedInput;
+ UnicodeString deTaggedInput;
+
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError pe;
+ RegexPattern *parsePat = NULL;
+ RegexMatcher *parseMatcher = NULL;
+ RegexPattern *callerPattern = NULL;
+ RegexMatcher *matcher = NULL;
+ UVector groupStarts(status);
+ UVector groupEnds(status);
+ UBool isMatch = FALSE;
+ UBool failed = FALSE;
+ int32_t numFinds;
+ int32_t i;
+
+ //
+ // Compile the caller's pattern
+ //
+ uint32_t bflags = 0;
+ if (flags.indexOf((UChar)0x69) >= 0) { // 'i' flag
+ bflags |= UREGEX_CASE_INSENSITIVE;
+ }
+ if (flags.indexOf((UChar)0x78) >= 0) { // 'x' flag
+ bflags |= UREGEX_COMMENTS;
+ }
+ if (flags.indexOf((UChar)0x73) >= 0) { // 's' flag
+ bflags |= UREGEX_DOTALL;
+ }
+ if (flags.indexOf((UChar)0x6d) >= 0) { // 'm' flag
+ bflags |= UREGEX_MULTILINE;
+ }
+
+
+ callerPattern = RegexPattern::compile(pattern, bflags, pe, status);
+ if (status != U_ZERO_ERROR) {
+ #if UCONFIG_NO_BREAK_ITERATION==1
+ // 'v' test flag means that the test pattern should not compile if ICU was configured
+ // to not include break iteration. RBBI is needed for Unicode word boundaries.
+ if (flags.indexOf((UChar)0x76) >= 0 /*'v'*/ && status == U_UNSUPPORTED_ERROR) {
+ goto cleanupAndReturn;
+ }
+ #endif
+ errln("Line %d: error %s compiling pattern.", line, u_errorName(status));
+ goto cleanupAndReturn;
+ }
+
+ if (flags.indexOf((UChar)'d') >= 0) {
+ RegexPatternDump(callerPattern);
+ }
+
+ //
+ // Number of times find() should be called on the test string, default to 1
+ //
+ numFinds = 1;
+ for (i=2; i<=9; i++) {
+ if (flags.indexOf((UChar)(0x30 + i)) >= 0) { // digit flag
+ if (numFinds != 1) {
+ errln("Line %d: more than one digit flag. Scanning %d.", line, i);
+ goto cleanupAndReturn;
+ }
+ numFinds = i;
+ }
+ }
+
+ //
+ // Find the tags in the input data, remove them, and record the group boundary
+ // positions.
+ //
+ parsePat = RegexPattern::compile("<(/?)([0-9]+)>", 0, pe, status);
+ REGEX_CHECK_STATUS_L(line);
+
+ unEscapedInput = inputString.unescape();
+ parseMatcher = parsePat->matcher(unEscapedInput, status);
+ REGEX_CHECK_STATUS_L(line);
+ while(parseMatcher->find()) {
+ parseMatcher->appendReplacement(deTaggedInput, "", status);
+ REGEX_CHECK_STATUS;
+ UnicodeString groupNum = parseMatcher->group(2, status);
+ if (parseMatcher->group(1, status) == "/") {
+ // close tag
+ set(groupEnds, deTaggedInput.length(), groupNum);
+ } else {
+ set(groupStarts, deTaggedInput.length(), groupNum);
+ }
+ }
+ parseMatcher->appendTail(deTaggedInput);
+ REGEX_ASSERT_L(groupStarts.size() == groupEnds.size(), line);
+
+
+ //
+ // Do a find on the de-tagged input using the caller's pattern
+ //
+ matcher = callerPattern->matcher(deTaggedInput, status);
+ REGEX_CHECK_STATUS_L(line);
+ if (flags.indexOf((UChar)'t') >= 0) {
+ matcher->setTrace(TRUE);
+ }
+
+ for (i=0; i<numFinds; i++) {
+ isMatch = matcher->find();
+ }
+ matcher->setTrace(FALSE);
+
+ //
+ // Match up the groups from the find() with the groups from the tags
+ //
+
+ // number of tags should match number of groups from find operation.
+ // matcher->groupCount does not include group 0, the entire match, hence the +1.
+ // G option in test means that capture group data is not available in the
+ // expected results, so the check needs to be suppressed.
+ if (isMatch == FALSE && groupStarts.size() != 0) {
+ errln("Error at line %d: Match expected, but none found.\n", line);
+ failed = TRUE;
+ goto cleanupAndReturn;
+ }
+
+ if (flags.indexOf((UChar)0x47 /*G*/) >= 0) {
+ // Only check for match / no match. Don't check capture groups.
+ if (isMatch && groupStarts.size() == 0) {
+ errln("Error at line %d: No match expected, but one found.\n", line);
+ failed = TRUE;
+ }
+ goto cleanupAndReturn;
+ }
+
+ for (i=0; i<=matcher->groupCount(); i++) {
+ int32_t expectedStart = (i >= groupStarts.size()? -1 : groupStarts.elementAti(i));
+ if (matcher->start(i, status) != expectedStart) {
+ errln("Error at line %d: incorrect start position for group %d. Expected %d, got %d",
+ line, i, expectedStart, matcher->start(i, status));
+ failed = TRUE;
+ goto cleanupAndReturn; // Good chance of subsequent bogus errors. Stop now.
+ }
+ int32_t expectedEnd = (i >= groupEnds.size()? -1 : groupEnds.elementAti(i));
+ if (matcher->end(i, status) != expectedEnd) {
+ errln("Error at line %d: incorrect end position for group %d. Expected %d, got %d",
+ line, i, expectedEnd, matcher->end(i, status));
+ failed = TRUE;
+ // Error on end position; keep going; real error is probably yet to come as group
+ // end positions work from end of the input data towards the front.
+ }
+ }
+ if ( matcher->groupCount()+1 < groupStarts.size()) {
+ errln("Error at line %d: Expected %d capture groups, found %d.",
+ line, groupStarts.size()-1, matcher->groupCount());
+ failed = TRUE;
+ }
+
+cleanupAndReturn:
+ if (failed) {
+ errln((UnicodeString)"\""+pattern+(UnicodeString)"\" "
+ +flags+(UnicodeString)" \""+inputString+(UnicodeString)"\"");
+ // callerPattern->dump();
+ }
+ delete parseMatcher;
+ delete parsePat;
+ delete matcher;
+ delete callerPattern;
+}
+
+
+
+
+
+
+
+
+//---------------------------------------------------------------------------
+//
+// REGEX_ERR Macro + invocation function to simplify writing tests
+// regex tests for incorrect patterns
+//
+// usage:
+// REGEX_ERR("pattern", expected error line, column, expected status);
+//
+//---------------------------------------------------------------------------
+#define REGEX_ERR(pat, line, col, status) regex_err(pat, line, col, status, __LINE__);
+
+void RegexTest::regex_err(const char *pat, int32_t errLine, int32_t errCol,
+ UErrorCode expectedStatus, int32_t line) {
+ UnicodeString pattern(pat);
+
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError pe;
+ RegexPattern *callerPattern = NULL;
+
+ //
+ // Compile the caller's pattern
+ //
+ UnicodeString patString(pat);
+ callerPattern = RegexPattern::compile(patString, 0, pe, status);
+ if (status != expectedStatus) {
+ errln("Line %d: unexpected error %s compiling pattern.", line, u_errorName(status));
+ } else {
+ if (status != U_ZERO_ERROR) {
+ if (pe.line != errLine || pe.offset != errCol) {
+ errln("Line %d: incorrect line/offset from UParseError. Expected %d/%d; got %d/%d.\n",
+ line, errLine, errCol, pe.line, pe.offset);
+ }
+ }
+ }
+
+ delete callerPattern;
+}
+
+
+
+//---------------------------------------------------------------------------
+//
+// Basic Check for basic functionality of regex pattern matching.
+// Avoid the use of REGEX_FIND test macro, which has
+// substantial dependencies on basic Regex functionality.
+//
+//---------------------------------------------------------------------------
+void RegexTest::Basic() {
+
+
+//
+// Debug - slide failing test cases early
+//
+#if 0
+ {
+ // REGEX_TESTLM("a\N{LATIN SMALL LETTER B}c", "abc", FALSE, FALSE);
+ UParseError pe;
+ UErrorCode status = U_ZERO_ERROR;
+ RegexPattern::compile("^(?:a?b?)*$", 0, pe, status);
+ // REGEX_FIND("(?>(abc{2,4}?))(c*)", "<0>ab<1>cc</1><2>ccc</2></0>ddd");
+ // REGEX_FIND("(X([abc=X]+)+X)|(y[abc=]+)", "=XX====================");
+ }
+ exit(1);
+#endif
+
+
+ //
+ // Pattern with parentheses
+ //
+ REGEX_TESTLM("st(abc)ring", "stabcring thing", TRUE, FALSE);
+ REGEX_TESTLM("st(abc)ring", "stabcring", TRUE, TRUE);
+ REGEX_TESTLM("st(abc)ring", "stabcrung", FALSE, FALSE);
+
+ //
+ // Patterns with *
+ //
+ REGEX_TESTLM("st(abc)*ring", "string", TRUE, TRUE);
+ REGEX_TESTLM("st(abc)*ring", "stabcring", TRUE, TRUE);
+ REGEX_TESTLM("st(abc)*ring", "stabcabcring", TRUE, TRUE);
+ REGEX_TESTLM("st(abc)*ring", "stabcabcdring", FALSE, FALSE);
+ REGEX_TESTLM("st(abc)*ring", "stabcabcabcring etc.", TRUE, FALSE);
+
+ REGEX_TESTLM("a*", "", TRUE, TRUE);
+ REGEX_TESTLM("a*", "b", TRUE, FALSE);
+
+
+ //
+ // Patterns with "."
+ //
+ REGEX_TESTLM(".", "abc", TRUE, FALSE);
+ REGEX_TESTLM("...", "abc", TRUE, TRUE);
+ REGEX_TESTLM("....", "abc", FALSE, FALSE);
+ REGEX_TESTLM(".*", "abcxyz123", TRUE, TRUE);
+ REGEX_TESTLM("ab.*xyz", "abcdefghij", FALSE, FALSE);
+ REGEX_TESTLM("ab.*xyz", "abcdefg...wxyz", TRUE, TRUE);
+ REGEX_TESTLM("ab.*xyz", "abcde...wxyz...abc..xyz", TRUE, TRUE);
+ REGEX_TESTLM("ab.*xyz", "abcde...wxyz...abc..xyz...", TRUE, FALSE);
+
+ //
+ // Patterns with * applied to chars at end of literal string
+ //
+ REGEX_TESTLM("abc*", "ab", TRUE, TRUE);
+ REGEX_TESTLM("abc*", "abccccc", TRUE, TRUE);
+
+ //
+ // Supplemental chars match as single chars, not a pair of surrogates.
+ //
+ REGEX_TESTLM(".", "\\U00011000", TRUE, TRUE);
+ REGEX_TESTLM("...", "\\U00011000x\\U00012002", TRUE, TRUE);
+ REGEX_TESTLM("...", "\\U00011000x\\U00012002y", TRUE, FALSE);
+
+
+ //
+ // UnicodeSets in the pattern
+ //
+ REGEX_TESTLM("[1-6]", "1", TRUE, TRUE);
+ REGEX_TESTLM("[1-6]", "3", TRUE, TRUE);
+ REGEX_TESTLM("[1-6]", "7", FALSE, FALSE);
+ REGEX_TESTLM("a[1-6]", "a3", TRUE, TRUE);
+ REGEX_TESTLM("a[1-6]", "a3", TRUE, TRUE);
+ REGEX_TESTLM("a[1-6]b", "a3b", TRUE, TRUE);
+
+ REGEX_TESTLM("a[0-9]*b", "a123b", TRUE, TRUE);
+ REGEX_TESTLM("a[0-9]*b", "abc", TRUE, FALSE);
+ REGEX_TESTLM("[\\p{Nd}]*", "123456", TRUE, TRUE);
+ REGEX_TESTLM("[\\p{Nd}]*", "a123456", TRUE, FALSE); // note that * matches 0 occurences.
+ REGEX_TESTLM("[a][b][[:Zs:]]*", "ab ", TRUE, TRUE);
+
+ //
+ // OR operator in patterns
+ //
+ REGEX_TESTLM("(a|b)", "a", TRUE, TRUE);
+ REGEX_TESTLM("(a|b)", "b", TRUE, TRUE);
+ REGEX_TESTLM("(a|b)", "c", FALSE, FALSE);
+ REGEX_TESTLM("a|b", "b", TRUE, TRUE);
+
+ REGEX_TESTLM("(a|b|c)*", "aabcaaccbcabc", TRUE, TRUE);
+ REGEX_TESTLM("(a|b|c)*", "aabcaaccbcabdc", TRUE, FALSE);
+ REGEX_TESTLM("(a(b|c|d)(x|y|z)*|123)", "ac", TRUE, TRUE);
+ REGEX_TESTLM("(a(b|c|d)(x|y|z)*|123)", "123", TRUE, TRUE);
+ REGEX_TESTLM("(a|(1|2)*)(b|c|d)(x|y|z)*|123", "123", TRUE, TRUE);
+ REGEX_TESTLM("(a|(1|2)*)(b|c|d)(x|y|z)*|123", "222211111czzzzw", TRUE, FALSE);
+
+ //
+ // +
+ //
+ REGEX_TESTLM("ab+", "abbc", TRUE, FALSE);
+ REGEX_TESTLM("ab+c", "ac", FALSE, FALSE);
+ REGEX_TESTLM("b+", "", FALSE, FALSE);
+ REGEX_TESTLM("(abc|def)+", "defabc", TRUE, TRUE);
+ REGEX_TESTLM(".+y", "zippity dooy dah ", TRUE, FALSE);
+ REGEX_TESTLM(".+y", "zippity dooy", TRUE, TRUE);
+
+ //
+ // ?
+ //
+ REGEX_TESTLM("ab?", "ab", TRUE, TRUE);
+ REGEX_TESTLM("ab?", "a", TRUE, TRUE);
+ REGEX_TESTLM("ab?", "ac", TRUE, FALSE);
+ REGEX_TESTLM("ab?", "abb", TRUE, FALSE);
+ REGEX_TESTLM("a(b|c)?d", "abd", TRUE, TRUE);
+ REGEX_TESTLM("a(b|c)?d", "acd", TRUE, TRUE);
+ REGEX_TESTLM("a(b|c)?d", "ad", TRUE, TRUE);
+ REGEX_TESTLM("a(b|c)?d", "abcd", FALSE, FALSE);
+ REGEX_TESTLM("a(b|c)?d", "ab", FALSE, FALSE);
+
+ //
+ // Escape sequences that become single literal chars, handled internally
+ // by ICU's Unescape.
+ //
+
+ // REGEX_TESTLM("\101\142", "Ab", TRUE, TRUE); // Octal TODO: not implemented yet.
+ REGEX_TESTLM("\\a", "\\u0007", TRUE, TRUE); // BEL
+ REGEX_TESTLM("\\cL", "\\u000c", TRUE, TRUE); // Control-L
+ REGEX_TESTLM("\\e", "\\u001b", TRUE, TRUE); // Escape
+ REGEX_TESTLM("\\f", "\\u000c", TRUE, TRUE); // Form Feed
+ REGEX_TESTLM("\\n", "\\u000a", TRUE, TRUE); // new line
+ REGEX_TESTLM("\\r", "\\u000d", TRUE, TRUE); // CR
+ REGEX_TESTLM("\\t", "\\u0009", TRUE, TRUE); // Tab
+ REGEX_TESTLM("\\u1234", "\\u1234", TRUE, TRUE);
+ REGEX_TESTLM("\\U00001234", "\\u1234", TRUE, TRUE);
+
+ REGEX_TESTLM(".*\\Ax", "xyz", TRUE, FALSE); // \A matches only at the beginning of input
+ REGEX_TESTLM(".*\\Ax", " xyz", FALSE, FALSE); // \A matches only at the beginning of input
+
+ // Escape of special chars in patterns
+ REGEX_TESTLM("\\\\\\|\\(\\)\\[\\{\\~\\$\\*\\+\\?\\.", "\\\\|()[{~$*+?.", TRUE, TRUE);
+
+
+}
+
+
+//---------------------------------------------------------------------------
+//
+// API_Match Test that the API for class RegexMatcher
+// is present and nominally working, but excluding functions
+// implementing replace operations.
+//
+//---------------------------------------------------------------------------
+void RegexTest::API_Match() {
+ UParseError pe;
+ UErrorCode status=U_ZERO_ERROR;
+ int32_t flags = 0;
+
+ //
+ // Debug - slide failing test cases early
+ //
+#if 0
+ {
+ }
+ return;
+#endif
+
+ //
+ // Simple pattern compilation
+ //
+ {
+ UnicodeString re("abc");
+ RegexPattern *pat2;
+ pat2 = RegexPattern::compile(re, flags, pe, status);
+ REGEX_CHECK_STATUS;
+
+ UnicodeString inStr1 = "abcdef this is a test";
+ UnicodeString instr2 = "not abc";
+ UnicodeString empty = "";
+
+
+ //
+ // Matcher creation and reset.
+ //
+ RegexMatcher *m1 = pat2->matcher(inStr1, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+ REGEX_ASSERT(m1->input() == inStr1);
+ m1->reset(instr2);
+ REGEX_ASSERT(m1->lookingAt(status) == FALSE);
+ REGEX_ASSERT(m1->input() == instr2);
+ m1->reset(inStr1);
+ REGEX_ASSERT(m1->input() == inStr1);
+ REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+ m1->reset(empty);
+ REGEX_ASSERT(m1->lookingAt(status) == FALSE);
+ REGEX_ASSERT(m1->input() == empty);
+ REGEX_ASSERT(&m1->pattern() == pat2);
+
+ //
+ // reset(pos, status)
+ //
+ m1->reset(inStr1);
+ m1->reset(4, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(m1->input() == inStr1);
+ REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+
+ m1->reset(-1, status);
+ REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+ status = U_ZERO_ERROR;
+
+ m1->reset(0, status);
+ REGEX_CHECK_STATUS;
+ status = U_ZERO_ERROR;
+
+ int32_t len = m1->input().length();
+ m1->reset(len-1, status);
+ REGEX_CHECK_STATUS;
+ status = U_ZERO_ERROR;
+
+ m1->reset(len, status);
+ REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+ status = U_ZERO_ERROR;
+
+ //
+ // match(pos, status)
+ //
+ m1->reset(instr2);
+ REGEX_ASSERT(m1->matches(4, status) == TRUE);
+ m1->reset();
+ REGEX_ASSERT(m1->matches(3, status) == FALSE);
+ m1->reset();
+ REGEX_ASSERT(m1->matches(5, status) == FALSE);
+ REGEX_ASSERT(m1->matches(4, status) == TRUE);
+ REGEX_ASSERT(m1->matches(-1, status) == FALSE);
+ REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+
+ // Match() at end of string should fail, but should not
+ // be an error.
+ status = U_ZERO_ERROR;
+ len = m1->input().length();
+ REGEX_ASSERT(m1->matches(len, status) == FALSE);
+ REGEX_CHECK_STATUS;
+
+ // Match beyond end of string should fail with an error.
+ status = U_ZERO_ERROR;
+ REGEX_ASSERT(m1->matches(len+1, status) == FALSE);
+ REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+
+ // Successful match at end of string.
+ {
+ status = U_ZERO_ERROR;
+ RegexMatcher m("A?", 0, status); // will match zero length string.
+ REGEX_CHECK_STATUS;
+ m.reset(inStr1);
+ len = inStr1.length();
+ REGEX_ASSERT(m.matches(len, status) == TRUE);
+ REGEX_CHECK_STATUS;
+ m.reset(empty);
+ REGEX_ASSERT(m.matches(0, status) == TRUE);
+ REGEX_CHECK_STATUS;
+ }
+
+
+ //
+ // lookingAt(pos, status)
+ //
+ status = U_ZERO_ERROR;
+ m1->reset(instr2); // "not abc"
+ REGEX_ASSERT(m1->lookingAt(4, status) == TRUE);
+ REGEX_ASSERT(m1->lookingAt(5, status) == FALSE);
+ REGEX_ASSERT(m1->lookingAt(3, status) == FALSE);
+ REGEX_ASSERT(m1->lookingAt(4, status) == TRUE);
+ REGEX_ASSERT(m1->lookingAt(-1, status) == FALSE);
+ REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+ status = U_ZERO_ERROR;
+ len = m1->input().length();
+ REGEX_ASSERT(m1->lookingAt(len, status) == FALSE);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(m1->lookingAt(len+1, status) == FALSE);
+ REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+
+ delete m1;
+ delete pat2;
+ }
+
+
+ //
+ // Capture Group.
+ // RegexMatcher::start();
+ // RegexMatcher::end();
+ // RegexMatcher::groupCount();
+ //
+ {
+ int32_t flags=0;
+ UParseError pe;
+ UErrorCode status=U_ZERO_ERROR;
+
+ UnicodeString re("01(23(45)67)(.*)");
+ RegexPattern *pat = RegexPattern::compile(re, flags, pe, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString data = "0123456789";
+
+ RegexMatcher *matcher = pat->matcher(data, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(matcher->lookingAt(status) == TRUE);
+ static const int32_t matchStarts[] = {0, 2, 4, 8};
+ static const int32_t matchEnds[] = {10, 8, 6, 10};
+ int32_t i;
+ for (i=0; i<4; i++) {
+ int32_t actualStart = matcher->start(i, status);
+ REGEX_CHECK_STATUS;
+ if (actualStart != matchStarts[i]) {
+ errln("RegexTest failure at line %d, index %d. Expected %d, got %d\n",
+ __LINE__, i, matchStarts[i], actualStart);
+ }
+ int32_t actualEnd = matcher->end(i, status);
+ REGEX_CHECK_STATUS;
+ if (actualEnd != matchEnds[i]) {
+ errln("RegexTest failure at line %d index %d. Expected %d, got %d\n",
+ __LINE__, i, matchEnds[i], actualEnd);
+ }
+ }
+
+ REGEX_ASSERT(matcher->start(0, status) == matcher->start(status));
+ REGEX_ASSERT(matcher->end(0, status) == matcher->end(status));
+
+ REGEX_ASSERT_FAIL(matcher->start(-1, status), U_INDEX_OUTOFBOUNDS_ERROR);
+ REGEX_ASSERT_FAIL(matcher->start( 4, status), U_INDEX_OUTOFBOUNDS_ERROR);
+ matcher->reset();
+ REGEX_ASSERT_FAIL(matcher->start( 0, status), U_REGEX_INVALID_STATE);
+
+ matcher->lookingAt(status);
+ REGEX_ASSERT(matcher->group(status) == "0123456789");
+ REGEX_ASSERT(matcher->group(0, status) == "0123456789");
+ REGEX_ASSERT(matcher->group(1, status) == "234567" );
+ REGEX_ASSERT(matcher->group(2, status) == "45" );
+ REGEX_ASSERT(matcher->group(3, status) == "89" );
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT_FAIL(matcher->group(-1, status), U_INDEX_OUTOFBOUNDS_ERROR);
+ REGEX_ASSERT_FAIL(matcher->group( 4, status), U_INDEX_OUTOFBOUNDS_ERROR);
+ matcher->reset();
+ REGEX_ASSERT_FAIL(matcher->group( 0, status), U_REGEX_INVALID_STATE);
+
+ delete matcher;
+ delete pat;
+
+ }
+
+ //
+ // find
+ //
+ {
+ int32_t flags=0;
+ UParseError pe;
+ UErrorCode status=U_ZERO_ERROR;
+
+ UnicodeString re("abc");
+ RegexPattern *pat = RegexPattern::compile(re, flags, pe, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString data = ".abc..abc...abc..";
+ // 012345678901234567
+
+ RegexMatcher *matcher = pat->matcher(data, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(matcher->find());
+ REGEX_ASSERT(matcher->start(status) == 1);
+ REGEX_ASSERT(matcher->find());
+ REGEX_ASSERT(matcher->start(status) == 6);
+ REGEX_ASSERT(matcher->find());
+ REGEX_ASSERT(matcher->start(status) == 12);
+ REGEX_ASSERT(matcher->find() == FALSE);
+ REGEX_ASSERT(matcher->find() == FALSE);
+
+ matcher->reset();
+ REGEX_ASSERT(matcher->find());
+ REGEX_ASSERT(matcher->start(status) == 1);
+
+ REGEX_ASSERT(matcher->find(0, status));
+ REGEX_ASSERT(matcher->start(status) == 1);
+ REGEX_ASSERT(matcher->find(1, status));
+ REGEX_ASSERT(matcher->start(status) == 1);
+ REGEX_ASSERT(matcher->find(2, status));
+ REGEX_ASSERT(matcher->start(status) == 6);
+ REGEX_ASSERT(matcher->find(12, status));
+ REGEX_ASSERT(matcher->start(status) == 12);
+ REGEX_ASSERT(matcher->find(13, status) == FALSE);
+ REGEX_ASSERT(matcher->find(16, status) == FALSE);
+ REGEX_ASSERT(matcher->find(17, status) == FALSE);
+ REGEX_ASSERT_FAIL(matcher->start(status), U_REGEX_INVALID_STATE);
+
+ status = U_ZERO_ERROR;
+ REGEX_ASSERT_FAIL(matcher->find(-1, status), U_INDEX_OUTOFBOUNDS_ERROR);
+ status = U_ZERO_ERROR;
+ REGEX_ASSERT_FAIL(matcher->find(18, status), U_INDEX_OUTOFBOUNDS_ERROR);
+
+ REGEX_ASSERT(matcher->groupCount() == 0);
+
+ delete matcher;
+ delete pat;
+ }
+
+
+ //
+ // find, with \G in pattern (true if at the end of a previous match).
+ //
+ {
+ int32_t flags=0;
+ UParseError pe;
+ UErrorCode status=U_ZERO_ERROR;
+
+ UnicodeString re(".*?(?:(\\Gabc)|(abc))");
+ RegexPattern *pat = RegexPattern::compile(re, flags, pe, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString data = ".abcabc.abc..";
+ // 012345678901234567
+
+ RegexMatcher *matcher = pat->matcher(data, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(matcher->find());
+ REGEX_ASSERT(matcher->start(status) == 0);
+ REGEX_ASSERT(matcher->start(1, status) == -1);
+ REGEX_ASSERT(matcher->start(2, status) == 1);
+
+ REGEX_ASSERT(matcher->find());
+ REGEX_ASSERT(matcher->start(status) == 4);
+ REGEX_ASSERT(matcher->start(1, status) == 4);
+ REGEX_ASSERT(matcher->start(2, status) == -1);
+ REGEX_CHECK_STATUS;
+
+ delete matcher;
+ delete pat;
+ }
+
+ //
+ // find with zero length matches, match position should bump ahead
+ // to prevent loops.
+ //
+ {
+ int32_t i;
+ UErrorCode status=U_ZERO_ERROR;
+ RegexMatcher m("(?= ?)", 0, status); // This pattern will zero-length matches anywhere,
+ // using an always-true look-ahead.
+ REGEX_CHECK_STATUS;
+ UnicodeString s(" ");
+ m.reset(s);
+ for (i=0; ; i++) {
+ if (m.find() == FALSE) {
+ break;
+ }
+ REGEX_ASSERT(m.start(status) == i);
+ REGEX_ASSERT(m.end(status) == i);
+ }
+ REGEX_ASSERT(i==5);
+
+ // Check that the bump goes over surrogate pairs OK
+ s = "\\U00010001\\U00010002\\U00010003\\U00010004";
+ s = s.unescape();
+ m.reset(s);
+ for (i=0; ; i+=2) {
+ if (m.find() == FALSE) {
+ break;
+ }
+ REGEX_ASSERT(m.start(status) == i);
+ REGEX_ASSERT(m.end(status) == i);
+ }
+ REGEX_ASSERT(i==10);
+ }
+ {
+ // find() loop breaking test.
+ // with pattern of /.?/, should see a series of one char matches, then a single
+ // match of zero length at the end of the input string.
+ int32_t i;
+ UErrorCode status=U_ZERO_ERROR;
+ RegexMatcher m(".?", 0, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString s(" ");
+ m.reset(s);
+ for (i=0; ; i++) {
+ if (m.find() == FALSE) {
+ break;
+ }
+ REGEX_ASSERT(m.start(status) == i);
+ REGEX_ASSERT(m.end(status) == (i<4 ? i+1 : i));
+ }
+ REGEX_ASSERT(i==5);
+ }
+
+
+ //
+ // Matchers with no input string behave as if they had an empty input string.
+ //
+
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ RegexMatcher m(".?", 0, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(m.find());
+ REGEX_ASSERT(m.start(status) == 0);
+ REGEX_ASSERT(m.input() == "");
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ RegexPattern *p = RegexPattern::compile(".", 0, status);
+ RegexMatcher *m = p->matcher(status);
+ REGEX_CHECK_STATUS;
+
+ REGEX_ASSERT(m->find() == FALSE);
+ REGEX_ASSERT(m->input() == "");
+ delete m;
+ delete p;
+ }
+
+ //
+ // Compilation error on reset with UChar *
+ // These were a hazard that people were stumbling over with runtime errors.
+ // Changed them to compiler errors by adding private methods that more closely
+ // matched the incorrect use of the functions.
+ //
+#if 0
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar ucharString[20];
+ RegexMatcher m(".", 0, status);
+ m.reset(ucharString); // should not compile.
+
+ RegexPattern *p = RegexPattern::compile(".", 0, status);
+ RegexMatcher *m2 = p->matcher(ucharString, status); // should not compile.
+
+ RegexMatcher m3(".", ucharString, 0, status); // Should not compile
+ }
+#endif
+
+}
+
+
+
+
+
+
+//---------------------------------------------------------------------------
+//
+// API_Replace API test for class RegexMatcher, testing the
+// Replace family of functions.
+//
+//---------------------------------------------------------------------------
+void RegexTest::API_Replace() {
+ //
+ // Replace
+ //
+ int32_t flags=0;
+ UParseError pe;
+ UErrorCode status=U_ZERO_ERROR;
+
+ UnicodeString re("abc");
+ RegexPattern *pat = RegexPattern::compile(re, flags, pe, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString data = ".abc..abc...abc..";
+ // 012345678901234567
+ RegexMatcher *matcher = pat->matcher(data, status);
+
+ //
+ // Plain vanilla matches.
+ //
+ UnicodeString dest;
+ dest = matcher->replaceFirst("yz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == ".yz..abc...abc..");
+
+ dest = matcher->replaceAll("yz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == ".yz..yz...yz..");
+
+ //
+ // Plain vanilla non-matches.
+ //
+ UnicodeString d2 = ".abx..abx...abx..";
+ matcher->reset(d2);
+ dest = matcher->replaceFirst("yz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == ".abx..abx...abx..");
+
+ dest = matcher->replaceAll("yz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == ".abx..abx...abx..");
+
+ //
+ // Empty source string
+ //
+ UnicodeString d3 = "";
+ matcher->reset(d3);
+ dest = matcher->replaceFirst("yz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "");
+
+ dest = matcher->replaceAll("yz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "");
+
+ //
+ // Empty substitution string
+ //
+ matcher->reset(data); // ".abc..abc...abc.."
+ dest = matcher->replaceFirst("", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "...abc...abc..");
+
+ dest = matcher->replaceAll("", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "........");
+
+ //
+ // match whole string
+ //
+ UnicodeString d4 = "abc";
+ matcher->reset(d4);
+ dest = matcher->replaceFirst("xyz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "xyz");
+
+ dest = matcher->replaceAll("xyz", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "xyz");
+
+ //
+ // Capture Group, simple case
+ //
+ UnicodeString re2("a(..)");
+ RegexPattern *pat2 = RegexPattern::compile(re2, flags, pe, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString d5 = "abcdefg";
+ RegexMatcher *matcher2 = pat2->matcher(d5, status);
+ REGEX_CHECK_STATUS;
+ dest = matcher2->replaceFirst("$1$1", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "bcbcdefg");
+
+ dest = matcher2->replaceFirst("The value of \\$1 is $1.", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "The value of $1 is bc.defg");
+
+ dest = matcher2->replaceFirst("$ by itself, no group number $$$", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "$ by itself, no group number $$$defg");
+
+ UnicodeString replacement = "Supplemental Digit 1 $\\U0001D7CF.";
+ replacement = replacement.unescape();
+ dest = matcher2->replaceFirst(replacement, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(dest == "Supplemental Digit 1 bc.defg");
+
+ REGEX_ASSERT_FAIL(matcher2->replaceFirst("bad capture group number $5...",status), U_INDEX_OUTOFBOUNDS_ERROR);
+
+
+ //
+ // Replacement String with \u hex escapes
+ //
+ {
+ UnicodeString src = "abc 1 abc 2 abc 3";
+ UnicodeString substitute = "--\\u0043--";
+ matcher->reset(src);
+ UnicodeString result = matcher->replaceAll(substitute, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(result == "--C-- 1 --C-- 2 --C-- 3");
+ }
+ {
+ UnicodeString src = "abc !";
+ UnicodeString substitute = "--\\U00010000--";
+ matcher->reset(src);
+ UnicodeString result = matcher->replaceAll(substitute, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString expected = UnicodeString("--");
+ expected.append((UChar32)0x10000);
+ expected.append("-- !");
+ REGEX_ASSERT(result == expected);
+ }
+ // TODO: need more through testing of capture substitutions.
+
+ // Bug 4057
+ //
+ {
+ status = U_ZERO_ERROR;
+ UnicodeString s = "The matches start with ss and end with ee ss stuff ee fin";
+ RegexMatcher m("ss(.*?)ee", 0, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString result;
+
+ // Multiple finds do NOT bump up the previous appendReplacement postion.
+ m.reset(s);
+ m.find();
+ m.find();
+ m.appendReplacement(result, "ooh", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(result == "The matches start with ss and end with ee ooh");
+
+ // After a reset into the interior of a string, appendReplacemnt still starts at beginning.
+ status = U_ZERO_ERROR;
+ result.truncate(0);
+ m.reset(10, status);
+ m.find();
+ m.find();
+ m.appendReplacement(result, "ooh", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(result == "The matches start with ss and end with ee ooh");
+
+ // find() at interior of string, appendReplacemnt still starts at beginning.
+ status = U_ZERO_ERROR;
+ result.truncate(0);
+ m.reset();
+ m.find(10, status);
+ m.find();
+ m.appendReplacement(result, "ooh", status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(result == "The matches start with ss and end with ee ooh");
+
+ m.appendTail(result);
+ REGEX_ASSERT(result == "The matches start with ss and end with ee ooh fin");
+
+ }
+
+ delete matcher2;
+ delete pat2;
+ delete matcher;
+ delete pat;
+}
+
+
+//---------------------------------------------------------------------------
+//
+// API_Pattern Test that the API for class RegexPattern is
+// present and nominally working.
+//
+//---------------------------------------------------------------------------
+void RegexTest::API_Pattern() {
+ RegexPattern pata; // Test default constructor to not crash.
+ RegexPattern patb;
+
+ REGEX_ASSERT(pata == patb);
+ REGEX_ASSERT(pata == pata);
+
+ UnicodeString re1("abc[a-l][m-z]");
+ UnicodeString re2("def");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError pe;
+
+ RegexPattern *pat1 = RegexPattern::compile(re1, 0, pe, status);
+ RegexPattern *pat2 = RegexPattern::compile(re2, 0, pe, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(*pat1 == *pat1);
+ REGEX_ASSERT(*pat1 != pata);
+
+ // Assign
+ patb = *pat1;
+ REGEX_ASSERT(patb == *pat1);
+
+ // Copy Construct
+ RegexPattern patc(*pat1);
+ REGEX_ASSERT(patc == *pat1);
+ REGEX_ASSERT(patb == patc);
+ REGEX_ASSERT(pat1 != pat2);
+ patb = *pat2;
+ REGEX_ASSERT(patb != patc);
+ REGEX_ASSERT(patb == *pat2);
+
+ // Compile with no flags.
+ RegexPattern *pat1a = RegexPattern::compile(re1, pe, status);
+ REGEX_ASSERT(*pat1a == *pat1);
+
+ REGEX_ASSERT(pat1a->flags() == 0);
+
+ // Compile with different flags should be not equal
+ RegexPattern *pat1b = RegexPattern::compile(re1, UREGEX_CASE_INSENSITIVE, pe, status);
+ REGEX_CHECK_STATUS;
+
+ REGEX_ASSERT(*pat1b != *pat1a);
+ REGEX_ASSERT(pat1b->flags() == UREGEX_CASE_INSENSITIVE);
+ REGEX_ASSERT(pat1a->flags() == 0);
+ delete pat1b;
+
+ // clone
+ RegexPattern *pat1c = pat1->clone();
+ REGEX_ASSERT(*pat1c == *pat1);
+ REGEX_ASSERT(*pat1c != *pat2);
+
+ delete pat1c;
+ delete pat1a;
+ delete pat1;
+ delete pat2;
+
+
+ //
+ // Verify that a matcher created from a cloned pattern works.
+ // (Jitterbug 3423)
+ //
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ RegexPattern *pSource = RegexPattern::compile("\\p{L}+", 0, status);
+ RegexPattern *pClone = pSource->clone();
+ delete pSource;
+ RegexMatcher *mFromClone = pClone->matcher(status);
+ REGEX_CHECK_STATUS;
+ UnicodeString s = "Hello World";
+ mFromClone->reset(s);
+ REGEX_ASSERT(mFromClone->find() == TRUE);
+ REGEX_ASSERT(mFromClone->group(status) == "Hello");
+ REGEX_ASSERT(mFromClone->find() == TRUE);
+ REGEX_ASSERT(mFromClone->group(status) == "World");
+ REGEX_ASSERT(mFromClone->find() == FALSE);
+ delete mFromClone;
+ delete pClone;
+ }
+
+ //
+ // matches convenience API
+ //
+ REGEX_ASSERT(RegexPattern::matches(".*", "random input", pe, status) == TRUE);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(RegexPattern::matches("abc", "random input", pe, status) == FALSE);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(RegexPattern::matches(".*nput", "random input", pe, status) == TRUE);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(RegexPattern::matches("random input", "random input", pe, status) == TRUE);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(RegexPattern::matches(".*u", "random input", pe, status) == FALSE);
+ REGEX_CHECK_STATUS;
+ status = U_INDEX_OUTOFBOUNDS_ERROR;
+ REGEX_ASSERT(RegexPattern::matches("abc", "abc", pe, status) == FALSE);
+ REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+
+
+ //
+ // Split()
+ //
+ status = U_ZERO_ERROR;
+ pat1 = RegexPattern::compile(" +", pe, status);
+ REGEX_CHECK_STATUS;
+ UnicodeString fields[10];
+
+ int32_t n;
+ n = pat1->split("Now is the time", fields, 10, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==4);
+ REGEX_ASSERT(fields[0]=="Now");
+ REGEX_ASSERT(fields[1]=="is");
+ REGEX_ASSERT(fields[2]=="the");
+ REGEX_ASSERT(fields[3]=="time");
+ REGEX_ASSERT(fields[4]=="");
+
+ n = pat1->split("Now is the time", fields, 2, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==2);
+ REGEX_ASSERT(fields[0]=="Now");
+ REGEX_ASSERT(fields[1]=="is the time");
+ REGEX_ASSERT(fields[2]=="the"); // left over from previous test
+
+ fields[1] = "*";
+ status = U_ZERO_ERROR;
+ n = pat1->split("Now is the time", fields, 1, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==1);
+ REGEX_ASSERT(fields[0]=="Now is the time");
+ REGEX_ASSERT(fields[1]=="*");
+ status = U_ZERO_ERROR;
+
+ n = pat1->split(" Now is the time ", fields, 10, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==5);
+ REGEX_ASSERT(fields[0]=="");
+ REGEX_ASSERT(fields[1]=="Now");
+ REGEX_ASSERT(fields[2]=="is");
+ REGEX_ASSERT(fields[3]=="the");
+ REGEX_ASSERT(fields[4]=="time");
+ REGEX_ASSERT(fields[5]=="");
+
+ n = pat1->split(" ", fields, 10, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==1);
+ REGEX_ASSERT(fields[0]=="");
+
+ fields[0] = "foo";
+ n = pat1->split("", fields, 10, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==0);
+ REGEX_ASSERT(fields[0]=="foo");
+
+ delete pat1;
+
+ // split, with a pattern with (capture)
+ pat1 = RegexPattern::compile("<(\\w*)>", pe, status);
+ REGEX_CHECK_STATUS;
+
+ status = U_ZERO_ERROR;
+ n = pat1->split("<a>Now is <b>the time<c>", fields, 10, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==6);
+ REGEX_ASSERT(fields[0]=="");
+ REGEX_ASSERT(fields[1]=="a");
+ REGEX_ASSERT(fields[2]=="Now is ");
+ REGEX_ASSERT(fields[3]=="b");
+ REGEX_ASSERT(fields[4]=="the time");
+ REGEX_ASSERT(fields[5]=="c");
+ REGEX_ASSERT(fields[6]=="");
+ REGEX_ASSERT(status==U_ZERO_ERROR);
+
+ n = pat1->split(" <a>Now is <b>the time<c>", fields, 10, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==6);
+ REGEX_ASSERT(fields[0]==" ");
+ REGEX_ASSERT(fields[1]=="a");
+ REGEX_ASSERT(fields[2]=="Now is ");
+ REGEX_ASSERT(fields[3]=="b");
+ REGEX_ASSERT(fields[4]=="the time");
+ REGEX_ASSERT(fields[5]=="c");
+ REGEX_ASSERT(fields[6]=="");
+
+ status = U_ZERO_ERROR;
+ fields[6] = "foo";
+ n = pat1->split(" <a>Now is <b>the time<c>", fields, 6, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==6);
+ REGEX_ASSERT(fields[0]==" ");
+ REGEX_ASSERT(fields[1]=="a");
+ REGEX_ASSERT(fields[2]=="Now is ");
+ REGEX_ASSERT(fields[3]=="b");
+ REGEX_ASSERT(fields[4]=="the time");
+ REGEX_ASSERT(fields[5]=="c");
+ REGEX_ASSERT(fields[6]=="foo");
+
+ status = U_ZERO_ERROR;
+ fields[5] = "foo";
+ n = pat1->split(" <a>Now is <b>the time<c>", fields, 5, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==5);
+ REGEX_ASSERT(fields[0]==" ");
+ REGEX_ASSERT(fields[1]=="a");
+ REGEX_ASSERT(fields[2]=="Now is ");
+ REGEX_ASSERT(fields[3]=="b");
+ REGEX_ASSERT(fields[4]=="the time<c>");
+ REGEX_ASSERT(fields[5]=="foo");
+
+ status = U_ZERO_ERROR;
+ fields[5] = "foo";
+ n = pat1->split(" <a>Now is <b>the time", fields, 5, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==5);
+ REGEX_ASSERT(fields[0]==" ");
+ REGEX_ASSERT(fields[1]=="a");
+ REGEX_ASSERT(fields[2]=="Now is ");
+ REGEX_ASSERT(fields[3]=="b");
+ REGEX_ASSERT(fields[4]=="the time");
+ REGEX_ASSERT(fields[5]=="foo");
+
+ status = U_ZERO_ERROR;
+ n = pat1->split(" <a>Now is <b>the time<c>", fields, 4, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==4);
+ REGEX_ASSERT(fields[0]==" ");
+ REGEX_ASSERT(fields[1]=="a");
+ REGEX_ASSERT(fields[2]=="Now is ");
+ REGEX_ASSERT(fields[3]=="the time<c>");
+ status = U_ZERO_ERROR;
+ delete pat1;
+
+ pat1 = RegexPattern::compile("([-,])", pe, status);
+ REGEX_CHECK_STATUS;
+ n = pat1->split("1-10,20", fields, 10, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(n==5);
+ REGEX_ASSERT(fields[0]=="1");
+ REGEX_ASSERT(fields[1]=="-");
+ REGEX_ASSERT(fields[2]=="10");
+ REGEX_ASSERT(fields[3]==",");
+ REGEX_ASSERT(fields[4]=="20");
+ delete pat1;
+
+
+ //
+ // RegexPattern::pattern()
+ //
+ pat1 = new RegexPattern();
+ REGEX_ASSERT(pat1->pattern() == "");
+ delete pat1;
+
+ pat1 = RegexPattern::compile("(Hello, world)*", pe, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(pat1->pattern() == "(Hello, world)*");
+ delete pat1;
+
+
+ //
+ // classID functions
+ //
+ pat1 = RegexPattern::compile("(Hello, world)*", pe, status);
+ REGEX_CHECK_STATUS;
+ REGEX_ASSERT(pat1->getDynamicClassID() == RegexPattern::getStaticClassID());
+ REGEX_ASSERT(pat1->getDynamicClassID() != NULL);
+ UnicodeString Hello("Hello, world.");
+ RegexMatcher *m = pat1->matcher(Hello, status);
+ REGEX_ASSERT(pat1->getDynamicClassID() != m->getDynamicClassID());
+ REGEX_ASSERT(m->getDynamicClassID() == RegexMatcher::getStaticClassID());
+ REGEX_ASSERT(m->getDynamicClassID() != NULL);
+ delete m;
+ delete pat1;
+
+}
+
+//---------------------------------------------------------------------------
+//
+// Extended A more thorough check for features of regex patterns
+// The test cases are in a separate data file,
+// source/tests/testdata/regextst.txt
+// A description of the test data format is included in that file.
+//
+//---------------------------------------------------------------------------
+
+const char *
+RegexTest::getPath(char buffer[2048], const char *filename) {
+ UErrorCode status=U_ZERO_ERROR;
+ const char *testDataDirectory = IntlTest::getSourceTestData(status);
+ if (U_FAILURE(status)) {
+ errln("ERROR: loadTestData() failed - %s", u_errorName(status));
+ return NULL;
+ }
+
+ strcpy(buffer, testDataDirectory);
+ strcat(buffer, filename);
+ return buffer;
+}
+
+void RegexTest::Extended() {
+ char tdd[2048];
+ const char *srcPath;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t lineNum = 0;
+
+ //
+ // Open and read the test data file.
+ //
+ srcPath=getPath(tdd, "regextst.txt");
+ if(srcPath==NULL) {
+ return; /* something went wrong, error already output */
+ }
+
+ int32_t len;
+ UChar *testData = ReadAndConvertFile(srcPath, len, status);
+ if (U_FAILURE(status)) {
+ return; /* something went wrong, error already output */
+ }
+
+ //
+ // Put the test data into a UnicodeString
+ //
+ UnicodeString testString(FALSE, testData, len);
+
+ RegexMatcher quotedStuffMat("\\s*([\\'\\\"/])(.*?)\\1", 0, status);
+ RegexMatcher commentMat ("\\s*(#.*)?$", 0, status);
+ RegexMatcher flagsMat ("\\s*([ixsmdtGv2-9]*)([:letter:]*)", 0, status);
+
+ RegexMatcher lineMat("(.*?)\\r?\\n", testString, 0, status);
+ UnicodeString testPattern; // The pattern for test from the test file.
+ UnicodeString testFlags; // the flags for a test.
+ UnicodeString matchString; // The marked up string to be used as input
+
+ if (U_FAILURE(status)){
+ dataerrln("Construct RegexMatcher() error.");
+ delete [] testData;
+ return;
+ }
+
+ //
+ // Loop over the test data file, once per line.
+ //
+ while (lineMat.find()) {
+ lineNum++;
+ if (U_FAILURE(status)) {
+ errln("line %d: ICU Error \"%s\"", lineNum, u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ UnicodeString testLine = lineMat.group(1, status);
+ if (testLine.length() == 0) {
+ continue;
+ }
+
+ //
+ // Parse the test line. Skip blank and comment only lines.
+ // Separate out the three main fields - pattern, flags, target.
+ //
+
+ commentMat.reset(testLine);
+ if (commentMat.lookingAt(status)) {
+ // This line is a comment, or blank.
+ continue;
+ }
+
+ //
+ // Pull out the pattern field, remove it from the test file line.
+ //
+ quotedStuffMat.reset(testLine);
+ if (quotedStuffMat.lookingAt(status)) {
+ testPattern = quotedStuffMat.group(2, status);
+ testLine.remove(0, quotedStuffMat.end(0, status));
+ } else {
+ errln("Bad pattern (missing quotes?) at test file line %d", lineNum);
+ continue;
+ }
+
+
+ //
+ // Pull out the flags from the test file line.
+ //
+ flagsMat.reset(testLine);
+ flagsMat.lookingAt(status); // Will always match, possibly an empty string.
+ testFlags = flagsMat.group(1, status);
+ if (flagsMat.group(2, status).length() > 0) {
+ errln("Bad Match flag at line %d. Scanning %c\n",
+ lineNum, flagsMat.group(2, status).charAt(0));
+ continue;
+ }
+ testLine.remove(0, flagsMat.end(0, status));
+
+ //
+ // Pull out the match string, as a whole.
+ // We'll process the <tags> later.
+ //
+ quotedStuffMat.reset(testLine);
+ if (quotedStuffMat.lookingAt(status)) {
+ matchString = quotedStuffMat.group(2, status);
+ testLine.remove(0, quotedStuffMat.end(0, status));
+ } else {
+ errln("Bad match string at test file line %d", lineNum);
+ continue;
+ }
+
+ //
+ // The only thing left from the input line should be an optional trailing comment.
+ //
+ commentMat.reset(testLine);
+ if (commentMat.lookingAt(status) == FALSE) {
+ errln("Line %d: unexpected characters at end of test line.", lineNum);
+ continue;
+ }
+
+ //
+ // Run the test
+ //
+ regex_find(testPattern, testFlags, matchString, lineNum);
+ }
+
+ delete [] testData;
+
+}
+
+
+
+//---------------------------------------------------------------------------
+//
+// Errors Check for error handling in patterns.
+//
+//---------------------------------------------------------------------------
+void RegexTest::Errors() {
+ // \escape sequences that aren't implemented yet.
+ //REGEX_ERR("hex format \\x{abcd} not implemented", 1, 13, U_REGEX_UNIMPLEMENTED);
+
+ // Missing close parentheses
+ REGEX_ERR("Comment (?# with no close", 1, 25, U_REGEX_MISMATCHED_PAREN);
+ REGEX_ERR("Capturing Parenthesis(...", 1, 25, U_REGEX_MISMATCHED_PAREN);
+ REGEX_ERR("Grouping only parens (?: blah blah", 1, 34, U_REGEX_MISMATCHED_PAREN);
+
+ // Extra close paren
+ REGEX_ERR("Grouping only parens (?: blah)) blah", 1, 31, U_REGEX_MISMATCHED_PAREN);
+ REGEX_ERR(")))))))", 1, 1, U_REGEX_MISMATCHED_PAREN);
+ REGEX_ERR("(((((((", 1, 7, U_REGEX_MISMATCHED_PAREN);
+
+ // Look-ahead, Look-behind
+ // TODO: add tests for unbounded length look-behinds.
+ REGEX_ERR("abc(?<@xyz).*", 1, 7, U_REGEX_RULE_SYNTAX); // illegal construct
+
+ // Attempt to use non-default flags
+ {
+ UParseError pe;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t flags = UREGEX_CANON_EQ |
+ UREGEX_COMMENTS | UREGEX_DOTALL |
+ UREGEX_MULTILINE;
+ RegexPattern *pat1= RegexPattern::compile(".*", flags, pe, status);
+ REGEX_ASSERT(status == U_REGEX_UNIMPLEMENTED);
+ delete pat1;
+ }
+
+
+ // Quantifiers are allowed only after something that can be quantified.
+ REGEX_ERR("+", 1, 1, U_REGEX_RULE_SYNTAX);
+ REGEX_ERR("abc\ndef(*2)", 2, 5, U_REGEX_RULE_SYNTAX);
+ REGEX_ERR("abc**", 1, 5, U_REGEX_RULE_SYNTAX);
+
+ // Mal-formed {min,max} quantifiers
+ REGEX_ERR("abc{a,2}",1,5, U_REGEX_BAD_INTERVAL);
+ REGEX_ERR("abc{4,2}",1,8, U_REGEX_MAX_LT_MIN);
+ REGEX_ERR("abc{1,b}",1,7, U_REGEX_BAD_INTERVAL);
+ REGEX_ERR("abc{1,,2}",1,7, U_REGEX_BAD_INTERVAL);
+ REGEX_ERR("abc{1,2a}",1,8, U_REGEX_BAD_INTERVAL);
+ REGEX_ERR("abc{222222222222222222222}",1,14, U_REGEX_NUMBER_TOO_BIG);
+ REGEX_ERR("abc{5,50000000000}", 1, 17, U_REGEX_NUMBER_TOO_BIG); // Overflows int during scan
+ REGEX_ERR("abc{5,687865858}", 1, 16, U_REGEX_NUMBER_TOO_BIG); // Overflows regex binary format
+ REGEX_ERR("abc{687865858,687865859}", 1, 24, U_REGEX_NUMBER_TOO_BIG);
+
+
+ // UnicodeSet containing a string
+ REGEX_ERR("abc[{def}]xyz", 1, 10, U_REGEX_SET_CONTAINS_STRING);
+
+ // Ticket 5389
+ REGEX_ERR("*c", 1, 1, U_REGEX_RULE_SYNTAX);
+
+}
+
+
+//-------------------------------------------------------------------------------
+//
+// Read a text data file, convert it to UChars, and return the data
+// in one big UChar * buffer, which the caller must delete.
+//
+//--------------------------------------------------------------------------------
+UChar *RegexTest::ReadAndConvertFile(const char *fileName, int32_t &ulen, UErrorCode &status) {
+ UChar *retPtr = NULL;
+ char *fileBuf = NULL;
+ UConverter* conv = NULL;
+ FILE *f = NULL;
+
+ ulen = 0;
+ if (U_FAILURE(status)) {
+ return retPtr;
+ }
+
+ //
+ // Open the file.
+ //
+ f = fopen(fileName, "rb");
+ if (f == 0) {
+ errln("Error opening test data file %s\n", fileName);
+ status = U_FILE_ACCESS_ERROR;
+ return NULL;
+ }
+ //
+ // Read it in
+ //
+ int32_t fileSize;
+ int32_t amt_read;
+
+ fseek( f, 0, SEEK_END);
+ fileSize = ftell(f);
+ fileBuf = new char[fileSize];
+ fseek(f, 0, SEEK_SET);
+ amt_read = fread(fileBuf, 1, fileSize, f);
+ if (amt_read != fileSize || fileSize <= 0) {
+ errln("Error reading test data file.");
+ goto cleanUpAndReturn;
+ }
+
+ //
+ // Look for a Unicode Signature (BOM) on the data just read
+ //
+ int32_t signatureLength;
+ const char * fileBufC;
+ const char* encoding;
+
+ fileBufC = fileBuf;
+ encoding = ucnv_detectUnicodeSignature(
+ fileBuf, fileSize, &signatureLength, &status);
+ if(encoding!=NULL ){
+ fileBufC += signatureLength;
+ fileSize -= signatureLength;
+ }
+
+ //
+ // Open a converter to take the rule file to UTF-16
+ //
+ conv = ucnv_open(encoding, &status);
+ if (U_FAILURE(status)) {
+ goto cleanUpAndReturn;
+ }
+
+ //
+ // Convert the rules to UChar.
+ // Preflight first to determine required buffer size.
+ //
+ ulen = ucnv_toUChars(conv,
+ NULL, // dest,
+ 0, // destCapacity,
+ fileBufC,
+ fileSize,
+ &status);
+ if (status == U_BUFFER_OVERFLOW_ERROR) {
+ // Buffer Overflow is expected from the preflight operation.
+ status = U_ZERO_ERROR;
+
+ retPtr = new UChar[ulen+1];
+ ucnv_toUChars(conv,
+ retPtr, // dest,
+ ulen+1,
+ fileBufC,
+ fileSize,
+ &status);
+ }
+
+cleanUpAndReturn:
+ fclose(f);
+ delete[] fileBuf;
+ ucnv_close(conv);
+ if (U_FAILURE(status)) {
+ errln("ucnv_toUChars: ICU Error \"%s\"\n", u_errorName(status));
+ delete retPtr;
+ retPtr = 0;
+ ulen = 0;
+ };
+ return retPtr;
+}
+
+
+//-------------------------------------------------------------------------------
+//
+// PerlTests - Run Perl's regular expression tests
+// The input file for this test is re_tests, the standard regular
+// expression test data distributed with the Perl source code.
+//
+// Here is Perl's description of the test data file:
+//
+// # The tests are in a separate file 't/op/re_tests'.
+// # Each line in that file is a separate test.
+// # There are five columns, separated by tabs.
+// #
+// # Column 1 contains the pattern, optionally enclosed in C<''>.
+// # Modifiers can be put after the closing C<'>.
+// #
+// # Column 2 contains the string to be matched.
+// #
+// # Column 3 contains the expected result:
+// # y expect a match
+// # n expect no match
+// # c expect an error
+// # B test exposes a known bug in Perl, should be skipped
+// # b test exposes a known bug in Perl, should be skipped if noamp
+// #
+// # Columns 4 and 5 are used only if column 3 contains C<y> or C<c>.
+// #
+// # Column 4 contains a string, usually C<$&>.
+// #
+// # Column 5 contains the expected result of double-quote
+// # interpolating that string after the match, or start of error message.
+// #
+// # Column 6, if present, contains a reason why the test is skipped.
+// # This is printed with "skipped", for harness to pick up.
+// #
+// # \n in the tests are interpolated, as are variables of the form ${\w+}.
+// #
+// # If you want to add a regular expression test that can't be expressed
+// # in this format, don't add it here: put it in op/pat.t instead.
+//
+// For ICU, if field 3 contains an 'i', the test will be skipped.
+// The test exposes is some known incompatibility between ICU and Perl regexps.
+// (The i is in addition to whatever was there before.)
+//
+//-------------------------------------------------------------------------------
+void RegexTest::PerlTests() {
+ char tdd[2048];
+ const char *srcPath;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError pe;
+
+ //
+ // Open and read the test data file.
+ //
+ srcPath=getPath(tdd, "re_tests.txt");
+ if(srcPath==NULL) {
+ return; /* something went wrong, error already output */
+ }
+
+ int32_t len;
+ UChar *testData = ReadAndConvertFile(srcPath, len, status);
+ if (U_FAILURE(status)) {
+ return; /* something went wrong, error already output */
+ }
+
+ //
+ // Put the test data into a UnicodeString
+ //
+ UnicodeString testDataString(FALSE, testData, len);
+
+ //
+ // Regex to break the input file into lines, and strip the new lines.
+ // One line per match, capture group one is the desired data.
+ //
+ RegexPattern* linePat = RegexPattern::compile("(.+?)[\\r\\n]+", 0, pe, status);
+ if (U_FAILURE(status)) {
+ dataerrln("RegexPattern::compile() error");
+ return;
+ }
+ RegexMatcher* lineMat = linePat->matcher(testDataString, status);
+
+ //
+ // Regex to split a test file line into fields.
+ // There are six fields, separated by tabs.
+ //
+ RegexPattern* fieldPat = RegexPattern::compile("\\t", 0, pe, status);
+
+ //
+ // Regex to identify test patterns with flag settings, and to separate them.
+ // Test patterns with flags look like 'pattern'i
+ // Test patterns without flags are not quoted: pattern
+ // Coming out, capture group 2 is the pattern, capture group 3 is the flags.
+ //
+ RegexPattern *flagPat = RegexPattern::compile("('?)(.*)\\1(.*)", 0, pe, status);
+ RegexMatcher* flagMat = flagPat->matcher(status);
+
+ //
+ // The Perl tests reference several perl-isms, which are evaluated/substituted
+ // in the test data. Not being perl, this must be done explicitly. Here
+ // are string constants and REs for these constructs.
+ //
+ UnicodeString nulnulSrc("${nulnul}");
+ UnicodeString nulnul("\\u0000\\u0000");
+ nulnul = nulnul.unescape();
+
+ UnicodeString ffffSrc("${ffff}");
+ UnicodeString ffff("\\uffff");
+ ffff = ffff.unescape();
+
+ // regexp for $-[0], $+[2], etc.
+ RegexPattern *groupsPat = RegexPattern::compile("\\$([+\\-])\\[(\\d+)\\]", 0, pe, status);
+ RegexMatcher *groupsMat = groupsPat->matcher(status);
+
+ // regexp for $0, $1, $2, etc.
+ RegexPattern *cgPat = RegexPattern::compile("\\$(\\d+)", 0, pe, status);
+ RegexMatcher *cgMat = cgPat->matcher(status);
+
+
+ //
+ // Main Loop for the Perl Tests, runs once per line from the
+ // test data file.
+ //
+ int32_t lineNum = 0;
+ int32_t skippedUnimplementedCount = 0;
+ while (lineMat->find()) {
+ lineNum++;
+
+ //
+ // Get a line, break it into its fields, do the Perl
+ // variable substitutions.
+ //
+ UnicodeString line = lineMat->group(1, status);
+ UnicodeString fields[7];
+ fieldPat->split(line, fields, 7, status);
+
+ flagMat->reset(fields[0]);
+ flagMat->matches(status);
+ UnicodeString pattern = flagMat->group(2, status);
+ pattern.findAndReplace("${bang}", "!");
+ pattern.findAndReplace(nulnulSrc, "\\u0000\\u0000");
+ pattern.findAndReplace(ffffSrc, ffff);
+
+ //
+ // Identify patterns that include match flag settings,
+ // split off the flags, remove the extra quotes.
+ //
+ UnicodeString flagStr = flagMat->group(3, status);
+ if (U_FAILURE(status)) {
+ errln("ucnv_toUChars: ICU Error \"%s\"\n", u_errorName(status));
+ return;
+ }
+ int32_t flags = 0;
+ const UChar UChar_c = 0x63; // Char constants for the flag letters.
+ const UChar UChar_i = 0x69; // (Damn the lack of Unicode support in C)
+ const UChar UChar_m = 0x6d;
+ const UChar UChar_x = 0x78;
+ const UChar UChar_y = 0x79;
+ if (flagStr.indexOf(UChar_i) != -1) {
+ flags |= UREGEX_CASE_INSENSITIVE;
+ }
+ if (flagStr.indexOf(UChar_m) != -1) {
+ flags |= UREGEX_MULTILINE;
+ }
+ if (flagStr.indexOf(UChar_x) != -1) {
+ flags |= UREGEX_COMMENTS;
+ }
+
+ //
+ // Compile the test pattern.
+ //
+ status = U_ZERO_ERROR;
+ RegexPattern *testPat = RegexPattern::compile(pattern, flags, pe, status);
+ if (status == U_REGEX_UNIMPLEMENTED) {
+ //
+ // Test of a feature that is planned for ICU, but not yet implemented.
+ // skip the test.
+ skippedUnimplementedCount++;
+ delete testPat;
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ if (U_FAILURE(status)) {
+ // Some tests are supposed to generate errors.
+ // Only report an error for tests that are supposed to succeed.
+ if (fields[2].indexOf(UChar_c) == -1 && // Compilation is not supposed to fail AND
+ fields[2].indexOf(UChar_i) == -1) // it's not an accepted ICU incompatibility
+ {
+ errln("line %d: ICU Error \"%s\"\n", lineNum, u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ delete testPat;
+ continue;
+ }
+
+ if (fields[2].indexOf(UChar_i) >= 0) {
+ // ICU should skip this test.
+ delete testPat;
+ continue;
+ }
+
+ if (fields[2].indexOf(UChar_c) >= 0) {
+ // This pattern should have caused a compilation error, but didn't/
+ errln("line %d: Expected a pattern compile error, got success.", lineNum);
+ delete testPat;
+ continue;
+ }
+
+ //
+ // replace the Perl variables that appear in some of the
+ // match data strings.
+ //
+ UnicodeString matchString = fields[1];
+ matchString.findAndReplace(nulnulSrc, nulnul);
+ matchString.findAndReplace(ffffSrc, ffff);
+
+ // Replace any \n in the match string with an actual new-line char.
+ // Don't do full unescape, as this unescapes more than Perl does, which
+ // causes other spurious failures in the tests.
+ matchString.findAndReplace("\\n", "\n");
+
+
+
+ //
+ // Run the test, check for expected match/don't match result.
+ //
+ RegexMatcher *testMat = testPat->matcher(matchString, status);
+ UBool found = testMat->find();
+ UBool expected = FALSE;
+ if (fields[2].indexOf(UChar_y) >=0) {
+ expected = TRUE;
+ }
+ if (expected != found) {
+ errln("line %d: Expected %smatch, got %smatch",
+ lineNum, expected?"":"no ", found?"":"no " );
+ continue;
+ }
+
+ //
+ // Interpret the Perl expression from the fourth field of the data file,
+ // building up an ICU string from the results of the ICU match.
+ // The Perl expression will contain references to the results of
+ // a regex match, including the matched string, capture group strings,
+ // group starting and ending indicies, etc.
+ //
+ UnicodeString resultString;
+ UnicodeString perlExpr = fields[3];
+ groupsMat->reset(perlExpr);
+ cgMat->reset(perlExpr);
+
+ while (perlExpr.length() > 0) {
+ if (perlExpr.startsWith("$&")) {
+ resultString.append(testMat->group(status));
+ perlExpr.remove(0, 2);
+ }
+
+ else if (groupsMat->lookingAt(status)) {
+ // $-[0] $+[2] etc.
+ UnicodeString digitString = groupsMat->group(2, status);
+ int32_t t = 0;
+ int32_t groupNum = ICU_Utility::parseNumber(digitString, t, 10);
+ UnicodeString plusOrMinus = groupsMat->group(1, status);
+ int32_t matchPosition;
+ if (plusOrMinus.compare("+") == 0) {
+ matchPosition = testMat->end(groupNum, status);
+ } else {
+ matchPosition = testMat->start(groupNum, status);
+ }
+ if (matchPosition != -1) {
+ ICU_Utility::appendNumber(resultString, matchPosition);
+ }
+ perlExpr.remove(0, groupsMat->end(status));
+ }
+
+ else if (cgMat->lookingAt(status)) {
+ // $1, $2, $3, etc.
+ UnicodeString digitString = cgMat->group(1, status);
+ int32_t t = 0;
+ int32_t groupNum = ICU_Utility::parseNumber(digitString, t, 10);
+ if (U_SUCCESS(status)) {
+ resultString.append(testMat->group(groupNum, status));
+ status = U_ZERO_ERROR;
+ }
+ perlExpr.remove(0, cgMat->end(status));
+ }
+
+ else if (perlExpr.startsWith("@-")) {
+ int32_t i;
+ for (i=0; i<=testMat->groupCount(); i++) {
+ if (i>0) {
+ resultString.append(" ");
+ }
+ ICU_Utility::appendNumber(resultString, testMat->start(i, status));
+ }
+ perlExpr.remove(0, 2);
+ }
+
+ else if (perlExpr.startsWith("@+")) {
+ int32_t i;
+ for (i=0; i<=testMat->groupCount(); i++) {
+ if (i>0) {
+ resultString.append(" ");
+ }
+ ICU_Utility::appendNumber(resultString, testMat->end(i, status));
+ }
+ perlExpr.remove(0, 2);
+ }
+
+ else if (perlExpr.startsWith("\\")) { // \Escape. Take following char as a literal.
+ // or as an escaped sequence (e.g. \n)
+ if (perlExpr.length() > 1) {
+ perlExpr.remove(0, 1); // Remove the '\', but only if not last char.
+ }
+ UChar c = perlExpr.charAt(0);
+ switch (c) {
+ case 'n': c = '\n'; break;
+ // add any other escape sequences that show up in the test expected results.
+ }
+ resultString.append(c);
+ perlExpr.remove(0, 1);
+ }
+
+ else {
+ // Any characters from the perl expression that we don't explicitly
+ // recognize before here are assumed to be literals and copied
+ // as-is to the expected results.
+ resultString.append(perlExpr.charAt(0));
+ perlExpr.remove(0, 1);
+ }
+
+ if (U_FAILURE(status)) {
+ errln("Line %d: ICU Error \"%s\"", lineNum, u_errorName(status));
+ break;
+ }
+ }
+
+ //
+ // Expected Results Compare
+ //
+ UnicodeString expectedS(fields[4]);
+ expectedS.findAndReplace(nulnulSrc, nulnul);
+ expectedS.findAndReplace(ffffSrc, ffff);
+ expectedS.findAndReplace("\\n", "\n");
+
+
+ if (expectedS.compare(resultString) != 0) {
+ err("Line %d: Incorrect perl expression results.", lineNum);
+ errln((UnicodeString)"Expected \""+expectedS+(UnicodeString)"\"; got \""+resultString+(UnicodeString)"\"");
+ }
+
+ delete testMat;
+ delete testPat;
+ }
+
+ //
+ // All done. Clean up allocated stuff.
+ //
+ delete cgMat;
+ delete cgPat;
+
+ delete groupsMat;
+ delete groupsPat;
+
+ delete flagMat;
+ delete flagPat;
+
+ delete lineMat;
+ delete linePat;
+
+ delete fieldPat;
+ delete [] testData;
+
+
+ logln("%d tests skipped because of unimplemented regexp features.", skippedUnimplementedCount);
+
+}
+
+
+
+#endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/regextst.h b/Build/source/libs/icu/icu-xetex/test/intltest/regextst.h
new file mode 100644
index 00000000000..6636a622d48
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/regextst.h
@@ -0,0 +1,46 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef REGEXTST_H
+#define REGEXTST_H
+
+#include "unicode/utypes.h"
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+
+#include "intltest.h"
+
+
+class RegexTest: public IntlTest {
+public:
+
+ RegexTest();
+ virtual ~RegexTest();
+
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // The following are test functions that are visible from the intltest test framework.
+ virtual void API_Match();
+ virtual void API_Pattern();
+ virtual void API_Replace();
+ virtual void Basic();
+ virtual void Extended();
+ virtual void Errors();
+ virtual void PerlTests();
+
+ // The following functions are internal to the regexp tests.
+ virtual UBool doRegexLMTest(const char *pat, const char *text, UBool looking, UBool match, int32_t line);
+ virtual void regex_find(const UnicodeString &pat, const UnicodeString &flags,
+ const UnicodeString &input, int32_t line);
+ virtual void regex_err(const char *pat, int32_t errline, int32_t errcol,
+ UErrorCode expectedStatus, int32_t line);
+ virtual UChar *ReadAndConvertFile(const char *fileName, int32_t &len, UErrorCode &status);
+ virtual const char *getPath(char buffer[2048], const char *filename);
+
+};
+
+#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/reptest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/reptest.cpp
new file mode 100644
index 00000000000..d203fed5347
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/reptest.cpp
@@ -0,0 +1,322 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* This test program is intended for testing Replaceable class.
+*
+* Date Name Description
+* 11/28/2001 hshih Ported back from Java.
+*
+************************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "ittrans.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "unicode/rep.h"
+#include "reptest.h"
+
+//---------------------------------------------
+// runIndexedTest
+//---------------------------------------------
+
+ /**
+ * This is a test class that simulates styled text.
+ * It associates a style number (0..65535) with each character,
+ * and maintains that style in the normal fashion:
+ * When setting text from raw string or characters,<br>
+ * Set the styles to the style of the first character replaced.<br>
+ * If no characters are replaced, use the style of the previous character.<br>
+ * If at start, use the following character<br>
+ * Otherwise use NO_STYLE.
+ */
+class TestReplaceable : public Replaceable {
+ UnicodeString chars;
+ UnicodeString styles;
+
+ static const UChar NO_STYLE;
+
+ static const UChar NO_STYLE_MARK;
+
+ /**
+ * The address of this static class variable serves as this class's ID
+ * for ICU "poor man's RTTI".
+ */
+ static const char fgClassID;
+
+public:
+ TestReplaceable (const UnicodeString& text,
+ const UnicodeString& newStyles) {
+ chars = text;
+ UnicodeString s;
+ for (int i = 0; i < text.length(); ++i) {
+ if (i < newStyles.length()) {
+ s.append(newStyles.charAt(i));
+ } else {
+ if (text.charAt(i) == NO_STYLE_MARK) {
+ s.append(NO_STYLE);
+ } else {
+ s.append((UChar)(i + 0x0031));
+ }
+ }
+ }
+ this->styles = s;
+ }
+
+ virtual Replaceable *clone() const {
+ return new TestReplaceable(chars, styles);
+ }
+
+ ~TestReplaceable(void) {}
+
+ UnicodeString getStyles() {
+ return styles;
+ }
+
+ UnicodeString toString() {
+ UnicodeString s = chars;
+ s.append("{");
+ s.append(styles);
+ s.append("}");
+ return s;
+ }
+
+ void extractBetween(int32_t start, int32_t limit, UnicodeString& result) const {
+ chars.extractBetween(start, limit, result);
+ }
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @draft ICU 2.2
+ */
+ static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @draft ICU 2.2
+ */
+ virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+
+protected:
+ virtual int32_t getLength() const {
+ return chars.length();
+ }
+
+ virtual UChar getCharAt(int32_t offset) const{
+ return chars.charAt(offset);
+ }
+
+ virtual UChar32 getChar32At(int32_t offset) const{
+ return chars.char32At(offset);
+ }
+
+ void fixStyles(int32_t start, int32_t limit, int32_t newLen) {
+ UChar newStyle = NO_STYLE;
+ if (start != limit && styles.charAt(start) != NO_STYLE) {
+ newStyle = styles.charAt(start);
+ } else if (start > 0 && getCharAt(start-1) != NO_STYLE_MARK) {
+ newStyle = styles.charAt(start-1);
+ } else if (limit < styles.length()) {
+ newStyle = styles.charAt(limit);
+ }
+ // dumb implementation for now.
+ UnicodeString s;
+ for (int i = 0; i < newLen; ++i) {
+ // this doesn't really handle an embedded NO_STYLE_MARK
+ // in the middle of a long run of characters right -- but
+ // that case shouldn't happen anyway
+ if (getCharAt(start+i) == NO_STYLE_MARK) {
+ s.append(NO_STYLE);
+ } else {
+ s.append(newStyle);
+ }
+ }
+ styles.replaceBetween(start, limit, s);
+ }
+
+ virtual void handleReplaceBetween(int32_t start, int32_t limit, const UnicodeString& text) {
+ UnicodeString s;
+ this->extractBetween(start, limit, s);
+ if (s == text) return; // NO ACTION!
+ this->chars.replaceBetween(start, limit, text);
+ fixStyles(start, limit, text.length());
+ }
+
+
+ virtual void copy(int32_t start, int32_t limit, int32_t dest) {
+ chars.copy(start, limit, dest);
+ styles.copy(start, limit, dest);
+ }
+};
+
+const char TestReplaceable::fgClassID=0;
+
+const UChar TestReplaceable::NO_STYLE = 0x005F;
+
+const UChar TestReplaceable::NO_STYLE_MARK = 0xFFFF;
+
+void
+ReplaceableTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,TestReplaceableClass);
+ default: name = ""; break;
+ }
+}
+
+/*
+ * Dummy Replaceable implementation for better API/code coverage.
+ */
+class NoopReplaceable : public Replaceable {
+public:
+ virtual int32_t getLength() const {
+ return 0;
+ }
+
+ virtual UChar getCharAt(int32_t /*offset*/) const{
+ return 0xffff;
+ }
+
+ virtual UChar32 getChar32At(int32_t /*offset*/) const{
+ return 0xffff;
+ }
+
+ void extractBetween(int32_t /*start*/, int32_t /*limit*/, UnicodeString& result) const {
+ result.remove();
+ }
+
+ virtual void handleReplaceBetween(int32_t /*start*/, int32_t /*limit*/, const UnicodeString &/*text*/) {
+ /* do nothing */
+ }
+
+ virtual void copy(int32_t /*start*/, int32_t /*limit*/, int32_t /*dest*/) {
+ /* do nothing */
+ }
+
+ static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+
+private:
+ static const char fgClassID;
+};
+
+const char NoopReplaceable::fgClassID=0;
+
+void ReplaceableTest::TestReplaceableClass(void) {
+ UChar rawTestArray[][6] = {
+ {0x0041, 0x0042, 0x0043, 0x0044, 0x0000, 0x0000}, // ABCD
+ {0x0061, 0x0062, 0x0063, 0x0064, 0x00DF, 0x0000}, // abcd\u00DF
+ {0x0061, 0x0042, 0x0043, 0x0044, 0x0000, 0x0000}, // aBCD
+ {0x0041, 0x0300, 0x0045, 0x0300, 0x0000, 0x0000}, // A\u0300E\u0300
+ {0x00C0, 0x00C8, 0x0000, 0x0000, 0x0000, 0x0000}, // \u00C0\u00C8
+ {0x0077, 0x0078, 0x0079, 0x0000, 0x0000, 0x0000}, /* "wxy" */
+ {0x0077, 0x0078, 0x0079, 0x007A, 0x0000, 0x0000}, /* "wxyz" */
+ {0x0077, 0x0078, 0x0079, 0x007A, 0x0075, 0x0000}, /* "wxyzu" */
+ {0x0078, 0x0079, 0x007A, 0x0000, 0x0000, 0x0000}, /* "xyz" */
+ {0x0077, 0x0078, 0x0079, 0x0000, 0x0000, 0x0000}, /* "wxy" */
+ {0xFFFF, 0x0078, 0x0079, 0x0000, 0x0000, 0x0000}, /* "*xy" */
+ {0xFFFF, 0x0078, 0x0079, 0x0000, 0x0000, 0x0000}, /* "*xy" */
+ };
+ check("Lower", rawTestArray[0], "1234");
+ check("Upper", rawTestArray[1], "123455"); // must map 00DF to SS
+ check("Title", rawTestArray[2], "1234");
+ check("NFC", rawTestArray[3], "13");
+ check("NFD", rawTestArray[4], "1122");
+ check("*(x) > A $1 B", rawTestArray[5], "11223");
+ check("*(x)(y) > A $2 B $1 C $2 D", rawTestArray[6], "113322334");
+ check("*(x)(y)(z) > A $3 B $2 C $1 D", rawTestArray[7], "114433225");
+ // Disabled for 2.4. TODO Revisit in 2.6 or later.
+ //check("*x > a", rawTestArray[8], "223"); // expect "123"?
+ //check("*x > a", rawTestArray[9], "113"); // expect "123"?
+ //check("*x > a", rawTestArray[10], "_33"); // expect "_23"?
+ //check("*(x) > A $1 B", rawTestArray[11], "__223");
+
+ // improve API/code coverage
+ NoopReplaceable noop;
+ Replaceable *p;
+ if((p=noop.clone())!=NULL) {
+ errln("Replaceable::clone() does not return NULL");
+ delete p;
+ }
+
+ if(!noop.hasMetaData()) {
+ errln("Replaceable::hasMetaData() does not return TRUE");
+ }
+
+ // try to call the compiler-provided
+ // UMemory/UObject/Replaceable assignment operators
+ NoopReplaceable noop2;
+ noop2=noop;
+ if((p=noop2.clone())!=NULL) {
+ errln("noop2.Replaceable::clone() does not return NULL");
+ delete p;
+ }
+
+ // try to call the compiler-provided
+ // UMemory/UObject/Replaceable copy constructors
+ NoopReplaceable noop3(noop);
+ if((p=noop3.clone())!=NULL) {
+ errln("noop3.Replaceable::clone() does not return NULL");
+ delete p;
+ }
+}
+
+void ReplaceableTest::check(const UnicodeString& transliteratorName,
+ const UnicodeString& test,
+ const UnicodeString& shouldProduceStyles)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TestReplaceable *tr = new TestReplaceable(test, "");
+ UnicodeString expectedStyles = shouldProduceStyles;
+ UnicodeString original = tr->toString();
+
+ Transliterator* t;
+ if (transliteratorName.charAt(0) == 0x2A /*'*'*/) {
+ UnicodeString rules(transliteratorName);
+ rules.remove(0,1);
+ UParseError pe;
+ t = Transliterator::createFromRules("test", rules, UTRANS_FORWARD,
+ pe, status);
+
+ // test clone()
+ TestReplaceable *tr2 = (TestReplaceable *)tr->clone();
+ if(tr2 != NULL) {
+ delete tr;
+ tr = tr2;
+ }
+ } else {
+ t = Transliterator::createInstance(transliteratorName, UTRANS_FORWARD, status);
+ }
+ if (U_FAILURE(status)) {
+ log("FAIL: failed to create the ");
+ log(transliteratorName);
+ errln(" transliterator.");
+ delete tr;
+ return;
+ }
+ t->transliterate(*tr);
+ UnicodeString newStyles = tr->getStyles();
+ if (newStyles != expectedStyles) {
+ errln("FAIL Styles: " + transliteratorName + "{" + original + "} => "
+ + tr->toString() + "; should be {" + expectedStyles + "}!");
+ } else {
+ log("OK: ");
+ log(transliteratorName);
+ log("(");
+ log(original);
+ log(") => ");
+ logln(tr->toString());
+ }
+ delete tr;
+ delete t;
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/reptest.h b/Build/source/libs/icu/icu-xetex/test/intltest/reptest.h
new file mode 100644
index 00000000000..4ab39412c30
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/reptest.h
@@ -0,0 +1,43 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* This test program is intended for testing Replaceable class.
+*
+* Date Name Description
+* 11/28/2001 hshih Creation.
+*
+************************************************************************/
+
+
+#ifndef REPTEST_H
+#define REPTEST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "intltest.h"
+
+/**
+ * @test
+ * @summary Testing the Replaceable class
+ */
+class ReplaceableTest : public IntlTest {
+public:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+
+ /*Tests the Replaceable class according to the API documentation. */
+ void TestReplaceableClass(void);
+private:
+ void check( const UnicodeString& transliteratorName,
+ const UnicodeString& test,
+ const UnicodeString& shouldProduceStyles);
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/restest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/restest.cpp
new file mode 100644
index 00000000000..3250303c238
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/restest.cpp
@@ -0,0 +1,628 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#include "cstring.h"
+#include "unicode/unistr.h"
+#include "unicode/uniset.h"
+#include "unicode/resbund.h"
+#include "restest.h"
+
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <limits.h>
+
+//***************************************************************************************
+
+static const UChar kErrorUChars[] = { 0x45, 0x52, 0x52, 0x4f, 0x52, 0 };
+static const int32_t kErrorLength = 5;
+static const int32_t kERROR_COUNT = -1234567;
+
+//***************************************************************************************
+
+enum E_Where
+{
+ e_Root,
+ e_te,
+ e_te_IN,
+ e_Where_count
+};
+
+//***************************************************************************************
+
+#define CONFIRM_EQ(actual, expected, myAction) if ((expected)==(actual)) { record_pass(myAction); } else { record_fail(myAction + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of " + (expected) + "\n");}
+#define CONFIRM_GE(actual, expected, myAction) if ((actual)>=(expected)) { record_pass(myAction); } else { record_fail(myAction + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x >= " + (expected) + "\n");}
+#define CONFIRM_NE(actual, expected, myAction) if ((expected)!=(actual)) { record_pass(myAction); } else { record_fail(myAction + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x != " + (expected) + "\n");}
+
+#define CONFIRM_UErrorCode(actual, expected, myAction) if ((expected)==(actual)) { record_pass(myAction); } else { record_fail(myAction + (UnicodeString)" returned " + u_errorName(actual) + " instead of " + u_errorName(expected) + "\n"); }
+
+//***************************************************************************************
+
+/**
+ * Convert an integer, positive or negative, to a character string radix 10.
+ */
+char*
+itoa(int32_t i, char* buf)
+{
+ char* result = buf;
+
+ // Handle negative
+ if (i < 0)
+ {
+ *buf++ = '-';
+ i = -i;
+ }
+
+ // Output digits in reverse order
+ char* p = buf;
+ do
+ {
+ *p++ = (char)('0' + (i % 10));
+ i /= 10;
+ }
+ while (i);
+ *p-- = 0;
+
+ // Reverse the string
+ while (buf < p)
+ {
+ char c = *buf;
+ *buf++ = *p;
+ *p-- = c;
+ }
+
+ return result;
+}
+
+
+
+//***************************************************************************************
+
+// Array of our test objects
+
+static struct
+{
+ const char* name;
+ Locale *locale;
+ UErrorCode expected_constructor_status;
+ E_Where where;
+ UBool like[e_Where_count];
+ UBool inherits[e_Where_count];
+}
+param[] =
+{
+ // "te" means test
+ // "IN" means inherits
+ // "NE" or "ne" means "does not exist"
+
+ { "root", NULL, U_ZERO_ERROR, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } },
+ { "te", NULL, U_ZERO_ERROR, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN", NULL, U_ZERO_ERROR, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "te_NE", NULL, U_USING_FALLBACK_WARNING, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN_NE", NULL, U_USING_FALLBACK_WARNING, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "ne", NULL, U_USING_DEFAULT_WARNING, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } }
+};
+
+static const int32_t bundles_count = sizeof(param) / sizeof(param[0]);
+
+//***************************************************************************************
+
+/**
+ * Return a random unsigned long l where 0N <= l <= ULONG_MAX.
+ */
+
+uint32_t
+randul()
+{
+ static UBool initialized = FALSE;
+ if (!initialized)
+ {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+ // Assume rand has at least 12 bits of precision
+ uint32_t l = 0;
+ for (uint32_t i=0; i<sizeof(l); ++i)
+ ((char*)&l)[i] = (char)((rand() & 0x0FF0) >> 4);
+ return l;
+}
+
+/**
+ * Return a random double x where 0.0 <= x < 1.0.
+ */
+double
+randd()
+{
+ return (double)(randul() / ULONG_MAX);
+}
+
+/**
+ * Return a random integer i where 0 <= i < n.
+ */
+int32_t randi(int32_t n)
+{
+ return (int32_t)(randd() * n);
+}
+
+//***************************************************************************************
+
+/*
+ Don't use more than one of these at a time because of the Locale names
+*/
+ResourceBundleTest::ResourceBundleTest()
+: pass(0),
+ fail(0)
+{
+ if (param[5].locale == NULL) {
+ param[0].locale = new Locale("root");
+ param[1].locale = new Locale("te");
+ param[2].locale = new Locale("te", "IN");
+ param[3].locale = new Locale("te", "NE");
+ param[4].locale = new Locale("te", "IN", "NE");
+ param[5].locale = new Locale("ne");
+ }
+}
+
+ResourceBundleTest::~ResourceBundleTest()
+{
+ if (param[5].locale) {
+ int idx;
+ for (idx = 0; idx < (int)(sizeof(param)/sizeof(param[0])); idx++) {
+ delete param[idx].locale;
+ param[idx].locale = NULL;
+ }
+ }
+}
+
+void ResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite ResourceBundleTest: ");
+ switch (index) {
+ case 0: name = "TestResourceBundles"; if (exec) TestResourceBundles(); break;
+ case 1: name = "TestConstruction"; if (exec) TestConstruction(); break;
+ case 2: name = "TestExemplar"; if (exec) TestExemplar(); break;
+ case 3: name = "TestGetSize"; if (exec) TestGetSize(); break;
+ case 4: name = "TestGetLocaleByType"; if (exec) TestGetLocaleByType(); break;
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+//***************************************************************************************
+
+void
+ResourceBundleTest::TestResourceBundles()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ loadTestData(status);
+ if(U_FAILURE(status))
+ {
+ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(status)));
+ return;
+ }
+
+ /* Make sure that users using te_IN for the default locale don't get test failures. */
+ Locale originalDefault;
+ if (Locale::getDefault() == Locale("te_IN")) {
+ Locale::setDefault(Locale("en_US"), status);
+ }
+
+ testTag("only_in_Root", TRUE, FALSE, FALSE);
+ testTag("only_in_te", FALSE, TRUE, FALSE);
+ testTag("only_in_te_IN", FALSE, FALSE, TRUE);
+ testTag("in_Root_te", TRUE, TRUE, FALSE);
+ testTag("in_Root_te_te_IN", TRUE, TRUE, TRUE);
+ testTag("in_Root_te_IN", TRUE, FALSE, TRUE);
+ testTag("in_te_te_IN", FALSE, TRUE, TRUE);
+ testTag("nonexistent", FALSE, FALSE, FALSE);
+ logln("Passed: %d\nFailed: %d", pass, fail);
+
+ /* Restore the default locale for the other tests. */
+ Locale::setDefault(originalDefault, status);
+}
+
+void
+ResourceBundleTest::TestConstruction()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ Locale locale("te", "IN");
+
+ const char* testdatapath=loadTestData(err);
+ if(U_FAILURE(err))
+ {
+ errln("Could not load testdata.dat " + UnicodeString(testdatapath) + ", " + UnicodeString(u_errorName(err)));
+ return;
+ }
+
+ /* Make sure that users using te_IN for the default locale don't get test failures. */
+ Locale originalDefault;
+ if (Locale::getDefault() == Locale("te_IN")) {
+ Locale::setDefault(Locale("en_US"), err);
+ }
+
+ ResourceBundle test1((UnicodeString)testdatapath, err);
+ ResourceBundle test2(testdatapath, locale, err);
+ //ResourceBundle test1("c:\\icu\\icu\\source\\test\\testdata\\testdata", err);
+ //ResourceBundle test2("c:\\icu\\icu\\source\\test\\testdata\\testdata", locale, err);
+
+ UnicodeString result1(test1.getStringEx("string_in_Root_te_te_IN", err));
+ UnicodeString result2(test2.getStringEx("string_in_Root_te_te_IN", err));
+
+ if (U_FAILURE(err)) {
+ errln("Something threw an error in TestConstruction()");
+ return;
+ }
+
+ logln("for string_in_Root_te_te_IN, default.txt had " + result1);
+ logln("for string_in_Root_te_te_IN, te_IN.txt had " + result2);
+
+ if (result1 != "ROOT" || result2 != "TE_IN")
+ errln("Construction test failed; run verbose for more information");
+
+ const char* version1;
+ const char* version2;
+
+ version1 = test1.getVersionNumber();
+ version2 = test2.getVersionNumber();
+
+ char *versionID1 = new char[1+strlen(version1)]; // + 1 for zero byte
+ char *versionID2 = new char[1+ strlen(version2)]; // + 1 for zero byte
+
+ strcpy(versionID1, "44.0"); // hardcoded, please change if the default.txt file or ResourceBundle::kVersionSeparater is changed.
+
+ strcpy(versionID2, "55.0"); // hardcoded, please change if the te_IN.txt file or ResourceBundle::kVersionSeparater is changed.
+
+ logln(UnicodeString("getVersionNumber on default.txt returned ") + version1);
+ logln(UnicodeString("getVersionNumber on te_IN.txt returned ") + version2);
+
+ if (strcmp(version1, versionID1) != 0 || strcmp(version2, versionID2) != 0)
+ errln("getVersionNumber() failed");
+
+ delete[] versionID1;
+ delete[] versionID2;
+
+ /* Restore the default locale for the other tests. */
+ Locale::setDefault(originalDefault, err);
+}
+
+//***************************************************************************************
+
+UBool
+ResourceBundleTest::testTag(const char* frag,
+ UBool in_Root,
+ UBool in_te,
+ UBool in_te_IN)
+{
+ int32_t failOrig = fail;
+
+ // Make array from input params
+
+ UBool is_in[] = { in_Root, in_te, in_te_IN };
+
+ const char* NAME[] = { "ROOT", "TE", "TE_IN" };
+
+ // Now try to load the desired items
+
+ char tag[100];
+ UnicodeString action;
+
+ int32_t i,j,actual_bundle;
+// int32_t row,col;
+ int32_t index;
+ UErrorCode status = U_ZERO_ERROR;
+ const char* testdatapath;
+ testdatapath=loadTestData(status);
+ if(U_FAILURE(status))
+ {
+ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(status)));
+ return FALSE;
+ }
+
+ for (i=0; i<bundles_count; ++i)
+ {
+ action = "Constructor for ";
+ action += param[i].name;
+
+ status = U_ZERO_ERROR;
+ ResourceBundle theBundle( testdatapath, *param[i].locale, status);
+ //ResourceBundle theBundle( "c:\\icu\\icu\\source\\test\\testdata\\testdata", *param[i].locale, status);
+ CONFIRM_UErrorCode(status, param[i].expected_constructor_status, action);
+
+ if(i == 5)
+ actual_bundle = 0; /* ne -> default */
+ else if(i == 3)
+ actual_bundle = 1; /* te_NE -> te */
+ else if(i == 4)
+ actual_bundle = 2; /* te_IN_NE -> te_IN */
+ else
+ actual_bundle = i;
+
+
+ UErrorCode expected_resource_status = U_MISSING_RESOURCE_ERROR;
+ for (j=e_te_IN; j>=e_Root; --j)
+ {
+ if (is_in[j] && param[i].inherits[j])
+ {
+ if(j == actual_bundle) /* it's in the same bundle OR it's a nonexistent=default bundle (5) */
+ expected_resource_status = U_ZERO_ERROR;
+ else if(j == 0)
+ expected_resource_status = U_USING_DEFAULT_WARNING;
+ else
+ expected_resource_status = U_USING_FALLBACK_WARNING;
+
+ break;
+ }
+ }
+
+ UErrorCode expected_status;
+
+ UnicodeString base;
+ for (j=param[i].where; j>=0; --j)
+ {
+ if (is_in[j])
+ {
+ base = NAME[j];
+ break;
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // string
+
+ uprv_strcpy(tag, "string_");
+ uprv_strcat(tag, frag);
+
+ action = param[i].name;
+ action += ".getString(";
+ action += tag;
+ action += ")";
+
+
+ status = U_ZERO_ERROR;
+
+ UnicodeString string(theBundle.getStringEx(tag, status));
+
+ if(U_FAILURE(status)) {
+ string.setTo(TRUE, kErrorUChars, kErrorLength);
+ }
+
+ CONFIRM_UErrorCode(status, expected_resource_status, action);
+
+ UnicodeString expected_string(kErrorUChars);
+ if (U_SUCCESS(status)) {
+ expected_string = base;
+ }
+
+ CONFIRM_EQ(string, expected_string, action);
+
+ //--------------------------------------------------------------------------
+ // array
+
+ uprv_strcpy(tag, "array_");
+ uprv_strcat(tag, frag);
+
+ action = param[i].name;
+ action += ".get(";
+ action += tag;
+ action += ")";
+
+ status = U_ZERO_ERROR;
+ ResourceBundle arrayBundle(theBundle.get(tag, status));
+ CONFIRM_UErrorCode(status, expected_resource_status, action);
+ int32_t count = arrayBundle.getSize();
+
+ if (U_SUCCESS(status))
+ {
+ CONFIRM_GE(count, 1, action);
+
+ for (j=0; j < count; ++j)
+ {
+ char buf[32];
+ UnicodeString value(arrayBundle.getStringEx(j, status));
+ expected_string = base;
+ expected_string += itoa(j,buf);
+ CONFIRM_EQ(value, expected_string, action);
+ }
+
+ action = param[i].name;
+ action += ".getStringEx(";
+ action += tag;
+ action += ")";
+
+ for (j=0; j<100; ++j)
+ {
+ index = count ? (randi(count * 3) - count) : (randi(200) - 100);
+ status = U_ZERO_ERROR;
+ string = kErrorUChars;
+ UnicodeString t(arrayBundle.getStringEx(index, status));
+ expected_status = (index >= 0 && index < count) ? expected_resource_status : U_MISSING_RESOURCE_ERROR;
+ CONFIRM_UErrorCode(status, expected_status, action);
+
+ if (U_SUCCESS(status))
+ {
+ char buf[32];
+ expected_string = base;
+ expected_string += itoa(index,buf);
+ }
+ else
+ {
+ expected_string = kErrorUChars;
+ }
+ CONFIRM_EQ(string, expected_string, action);
+ }
+ }
+ else if (status != expected_resource_status)
+ {
+ record_fail("Error getting " + (UnicodeString)tag);
+ return (UBool)(failOrig != fail);
+ }
+
+ }
+
+ return (UBool)(failOrig != fail);
+}
+
+void
+ResourceBundleTest::record_pass(UnicodeString passMessage)
+{
+ logln(passMessage);
+ ++pass;
+}
+void
+ResourceBundleTest::record_fail(UnicodeString errMessage)
+{
+ err(errMessage);
+ ++fail;
+}
+
+void
+ResourceBundleTest::TestExemplar(){
+
+ int32_t locCount = uloc_countAvailable();
+ int32_t locIndex=0;
+ int num=0;
+ UErrorCode status = U_ZERO_ERROR;
+ for(;locIndex<locCount;locIndex++){
+ const char* locale = uloc_getAvailable(locIndex);
+ UResourceBundle *resb =ures_open(NULL,locale,&status);
+ if(U_SUCCESS(status) && status!=U_USING_FALLBACK_WARNING && status!=U_USING_DEFAULT_WARNING){
+ int32_t len=0;
+ const UChar* strSet = ures_getStringByKey(resb,"ExemplarCharacters",&len,&status);
+ UnicodeSet set(strSet,status);
+ if(U_FAILURE(status)){
+ errln("Could not construct UnicodeSet from pattern for ExemplarCharacters in locale : %s. Error: %s",locale,u_errorName(status));
+ status=U_ZERO_ERROR;
+ }
+ num++;
+ }
+ ures_close(resb);
+ }
+ logln("Number of installed locales with exemplar characters that could be tested: %d",num);
+
+}
+
+void
+ResourceBundleTest::TestGetSize(void)
+{
+ const struct {
+ const char* key;
+ int32_t size;
+ } test[] = {
+ { "zerotest", 1},
+ { "one", 1},
+ { "importtest", 1},
+ { "integerarray", 1},
+ { "emptyarray", 0},
+ { "emptytable", 0},
+ { "emptystring", 1}, /* empty string is still a string */
+ { "emptyint", 1},
+ { "emptybin", 1},
+ { "testinclude", 1},
+ { "collations", 1}, /* not 2 - there is hidden %%CollationBin */
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ const char* testdatapath = loadTestData(status);
+ int32_t i = 0, j = 0;
+ int32_t size = 0;
+
+ if(U_FAILURE(status))
+ {
+ err("Could not load testdata.dat %s\n", u_errorName(status));
+ return;
+ }
+
+ ResourceBundle rb(testdatapath, "testtypes", status);
+ if(U_FAILURE(status))
+ {
+ err("Could not testtypes resource bundle %s\n", u_errorName(status));
+ return;
+ }
+
+ for(i = 0; i < (int32_t)(sizeof(test)/sizeof(test[0])); i++) {
+ ResourceBundle res = rb.get(test[i].key, status);
+ if(U_FAILURE(status))
+ {
+ err("Couldn't find the key %s. Error: %s\n", u_errorName(status));
+ return;
+ }
+ size = res.getSize();
+ if(size != test[i].size) {
+ err("Expected size %i, got size %i for key %s\n", test[i].size, size, test[i].key);
+ for(j = 0; j < size; j++) {
+ ResourceBundle helper = res.get(j, status);
+ err("%s\n", helper.getKey());
+ }
+ }
+ }
+}
+
+void
+ResourceBundleTest::TestGetLocaleByType(void)
+{
+ const struct {
+ const char *requestedLocale;
+ const char *resourceKey;
+ const char *validLocale;
+ const char *actualLocale;
+ } test[] = {
+ { "te_IN_BLAH", "string_only_in_te_IN", "te_IN", "te_IN" },
+ { "te_IN_BLAH", "string_only_in_te", "te_IN", "te" },
+ { "te_IN_BLAH", "string_only_in_Root", "te_IN", "root" },
+ { "te_IN_BLAH_01234567890_01234567890_01234567890_01234567890_01234567890_01234567890", "array_2d_only_in_Root", "te_IN", "root" },
+ { "te_IN_BLAH@currency=euro", "array_2d_only_in_te_IN", "te_IN", "te_IN" },
+ { "te_IN_BLAH@calendar=thai;collation=phonebook", "array_2d_only_in_te", "te_IN", "te" }
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ const char* testdatapath = loadTestData(status);
+ int32_t i = 0;
+ Locale locale;
+
+ if(U_FAILURE(status))
+ {
+ err("Could not load testdata.dat %s\n", u_errorName(status));
+ return;
+ }
+
+ for(i = 0; i < (int32_t)(sizeof(test)/sizeof(test[0])); i++) {
+ ResourceBundle rb(testdatapath, test[i].requestedLocale, status);
+ if(U_FAILURE(status))
+ {
+ err("Could not open resource bundle %s (error %s)\n", test[i].requestedLocale, u_errorName(status));
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ ResourceBundle res = rb.get(test[i].resourceKey, status);
+ if(U_FAILURE(status))
+ {
+ err("Couldn't find the key %s. Error: %s\n", test[i].resourceKey, u_errorName(status));
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ locale = res.getLocale(ULOC_REQUESTED_LOCALE, status);
+ if(locale != Locale::getDefault()) {
+ err("Expected requested locale to be %s. Got %s\n", test[i].requestedLocale, locale.getName());
+ }
+ locale = res.getLocale(ULOC_VALID_LOCALE, status);
+ if(strcmp(locale.getName(), test[i].validLocale) != 0) {
+ err("Expected valid locale to be %s. Got %s\n", test[i].requestedLocale, locale.getName());
+ }
+ locale = res.getLocale(ULOC_ACTUAL_LOCALE, status);
+ if(strcmp(locale.getName(), test[i].actualLocale) != 0) {
+ err("Expected actual locale to be %s. Got %s\n", test[i].requestedLocale, locale.getName());
+ }
+ }
+}
+
+//eof
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/restest.h b/Build/source/libs/icu/icu-xetex/test/intltest/restest.h
new file mode 100644
index 00000000000..78ee08d9822
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/restest.h
@@ -0,0 +1,55 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef RESOURCEBUNDLETEST_H
+#define RESOURCEBUNDLETEST_H
+
+#include "intltest.h"
+
+/**
+ * Tests for class ResourceBundle
+ **/
+class ResourceBundleTest: public IntlTest {
+public:
+ ResourceBundleTest();
+ virtual ~ResourceBundleTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * Perform several extensive tests using the subtest routine testTag
+ **/
+ void TestResourceBundles(void);
+ /**
+ * Test construction of ResourceBundle accessing a custom test resource-file
+ **/
+ void TestConstruction(void);
+
+ void TestExemplar(void);
+
+ void TestGetSize(void);
+ void TestGetLocaleByType(void);
+
+private:
+ /**
+ * The assignment operator has no real implementation.
+ * It is provided to make the compiler happy. Do not call.
+ */
+ ResourceBundleTest& operator=(const ResourceBundleTest&) { return *this; }
+
+ /**
+ * extensive subtests called by TestResourceBundles
+ **/
+ UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN);
+
+ void record_pass(UnicodeString passMessage);
+ void record_fail(UnicodeString errMessage);
+
+ int32_t pass;
+ int32_t fail;
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/restsnew.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/restsnew.cpp
new file mode 100644
index 00000000000..3bb62459bef
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/restsnew.cpp
@@ -0,0 +1,1180 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#include "cstring.h"
+#include "unicode/unistr.h"
+#include "unicode/resbund.h"
+#include "restsnew.h"
+
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <limits.h>
+
+//***************************************************************************************
+
+static const UChar kErrorUChars[] = { 0x45, 0x52, 0x52, 0x4f, 0x52, 0 };
+static const int32_t kErrorLength = 5;
+static const int32_t kERROR_COUNT = -1234567;
+
+//***************************************************************************************
+
+enum E_Where
+{
+ e_Root,
+ e_te,
+ e_te_IN,
+ e_Where_count
+};
+
+//***************************************************************************************
+
+#define CONFIRM_EQ(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of " + (expected)); }
+#define CONFIRM_GE(actual,expected) if ((actual)>=(expected)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x >= " + (expected)); }
+#define CONFIRM_NE(actual,expected) if ((expected)!=(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x != " + (expected)); }
+
+#define CONFIRM_UErrorCode(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (UnicodeString)u_errorName(actual) + (UnicodeString)" instead of " + (UnicodeString)u_errorName(expected)); }
+
+//***************************************************************************************
+
+/**
+ * Convert an integer, positive or negative, to a character string radix 10.
+ */
+static char*
+itoa(int32_t i, char* buf)
+{
+ char* result = buf;
+
+ // Handle negative
+ if (i < 0)
+ {
+ *buf++ = '-';
+ i = -i;
+ }
+
+ // Output digits in reverse order
+ char* p = buf;
+ do
+ {
+ *p++ = (char)('0' + (i % 10));
+ i /= 10;
+ }
+ while (i);
+ *p-- = 0;
+
+ // Reverse the string
+ while (buf < p)
+ {
+ char c = *buf;
+ *buf++ = *p;
+ *p-- = c;
+ }
+
+ return result;
+}
+
+
+
+//***************************************************************************************
+
+// Array of our test objects
+
+static struct
+{
+ const char* name;
+ Locale *locale;
+ UErrorCode expected_constructor_status;
+ E_Where where;
+ UBool like[e_Where_count];
+ UBool inherits[e_Where_count];
+}
+param[] =
+{
+ // "te" means test
+ // "IN" means inherits
+ // "NE" or "ne" means "does not exist"
+
+ { "root", 0, U_ZERO_ERROR, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } },
+ { "te", 0, U_ZERO_ERROR, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN", 0, U_ZERO_ERROR, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "te_NE", 0, U_USING_FALLBACK_WARNING, e_te, { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
+ { "te_IN_NE", 0, U_USING_FALLBACK_WARNING, e_te_IN, { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
+ { "ne", 0, U_USING_DEFAULT_WARNING, e_Root, { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } }
+};
+
+static int32_t bundles_count = sizeof(param) / sizeof(param[0]);
+
+//***************************************************************************************
+
+/**
+ * Return a random unsigned long l where 0N <= l <= ULONG_MAX.
+ */
+
+static uint32_t
+randul()
+{
+ static UBool initialized = FALSE;
+ if (!initialized)
+ {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+ // Assume rand has at least 12 bits of precision
+ uint32_t l = 0;
+ for (uint32_t i=0; i<sizeof(l); ++i)
+ ((char*)&l)[i] = (char)((rand() & 0x0FF0) >> 4);
+ return l;
+}
+
+/**
+ * Return a random double x where 0.0 <= x < 1.0.
+ */
+static double
+randd()
+{
+ return (double)(randul() / ULONG_MAX);
+}
+
+/**
+ * Return a random integer i where 0 <= i < n.
+ */
+static int32_t randi(int32_t n)
+{
+ return (int32_t)(randd() * n);
+}
+
+//***************************************************************************************
+
+/*
+ Don't use more than one of these at a time because of the Locale names
+*/
+NewResourceBundleTest::NewResourceBundleTest()
+: pass(0),
+ fail(0)
+{
+ if (param[5].locale == NULL) {
+ param[0].locale = new Locale("root");
+ param[1].locale = new Locale("te");
+ param[2].locale = new Locale("te", "IN");
+ param[3].locale = new Locale("te", "NE");
+ param[4].locale = new Locale("te", "IN", "NE");
+ param[5].locale = new Locale("ne");
+ }
+}
+
+NewResourceBundleTest::~NewResourceBundleTest()
+{
+ if (param[5].locale) {
+ int idx;
+ for (idx = 0; idx < (int)(sizeof(param)/sizeof(param[0])); idx++) {
+ delete param[idx].locale;
+ param[idx].locale = NULL;
+ }
+ }
+}
+
+void NewResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite ResourceBundleTest: ");
+ switch (index) {
+ case 0: name = "TestResourceBundles"; if (exec) TestResourceBundles(); break;
+ case 1: name = "TestConstruction"; if (exec) TestConstruction(); break;
+ case 2: name = "TestIteration"; if (exec) TestIteration(); break;
+ case 3: name = "TestOtherAPI"; if(exec) TestOtherAPI(); break;
+ case 4: name = "TestNewTypes"; if(exec) TestNewTypes(); break;
+ case 5: name = "TestGetByFallback"; if(exec) TestGetByFallback(); break;
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+//***************************************************************************************
+
+void
+NewResourceBundleTest::TestResourceBundles()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ loadTestData(status);
+ if(U_FAILURE(status))
+ {
+ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(status)));
+ return;
+ }
+
+ /* Make sure that users using te_IN for the default locale don't get test failures. */
+ Locale originalDefault;
+ if (Locale::getDefault() == Locale("te_IN")) {
+ Locale::setDefault(Locale("en_US"), status);
+ }
+
+ testTag("only_in_Root", TRUE, FALSE, FALSE);
+ testTag("only_in_te", FALSE, TRUE, FALSE);
+ testTag("only_in_te_IN", FALSE, FALSE, TRUE);
+ testTag("in_Root_te", TRUE, TRUE, FALSE);
+ testTag("in_Root_te_te_IN", TRUE, TRUE, TRUE);
+ testTag("in_Root_te_IN", TRUE, FALSE, TRUE);
+ testTag("in_te_te_IN", FALSE, TRUE, TRUE);
+ testTag("nonexistent", FALSE, FALSE, FALSE);
+ logln("Passed: %d\nFailed: %d", pass, fail);
+
+ /* Restore the default locale for the other tests. */
+ Locale::setDefault(originalDefault, status);
+}
+
+void
+NewResourceBundleTest::TestConstruction()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ Locale locale("te", "IN");
+
+ const char* testdatapath;
+ testdatapath=loadTestData(err);
+ if(U_FAILURE(err))
+ {
+ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(err)));
+ return;
+ }
+
+ /* Make sure that users using te_IN for the default locale don't get test failures. */
+ Locale originalDefault;
+ if (Locale::getDefault() == Locale("te_IN")) {
+ Locale::setDefault(Locale("en_US"), err);
+ }
+
+ ResourceBundle test1((UnicodeString)testdatapath, err);
+ ResourceBundle test2(testdatapath, locale, err);
+
+ UnicodeString result1;
+ UnicodeString result2;
+
+ result1 = test1.getStringEx("string_in_Root_te_te_IN", err);
+ result2 = test2.getStringEx("string_in_Root_te_te_IN", err);
+ if (U_FAILURE(err)) {
+ errln("Something threw an error in TestConstruction()");
+ return;
+ }
+
+ logln("for string_in_Root_te_te_IN, root.txt had " + result1);
+ logln("for string_in_Root_te_te_IN, te_IN.txt had " + result2);
+
+ if (result1 != "ROOT" || result2 != "TE_IN") {
+ errln("Construction test failed; run verbose for more information");
+ }
+
+ const char* version1;
+ const char* version2;
+
+ version1 = test1.getVersionNumber();
+ version2 = test2.getVersionNumber();
+
+ char *versionID1 = new char[1 + strlen(U_ICU_VERSION) + strlen(version1)]; // + 1 for zero byte
+ char *versionID2 = new char[1 + strlen(U_ICU_VERSION) + strlen(version2)]; // + 1 for zero byte
+
+ strcpy(versionID1, "44.0"); // hardcoded, please change if the default.txt file or ResourceBundle::kVersionSeparater is changed.
+
+ strcpy(versionID2, "55.0"); // hardcoded, please change if the te_IN.txt file or ResourceBundle::kVersionSeparater is changed.
+
+ logln(UnicodeString("getVersionNumber on default.txt returned ") + version1 + UnicodeString(" Expect: " ) + versionID1);
+ logln(UnicodeString("getVersionNumber on te_IN.txt returned ") + version2 + UnicodeString(" Expect: " ) + versionID2);
+
+ if (strcmp(version1, versionID1) != 0) {
+ errln("getVersionNumber(version1) failed. %s != %s", version1, versionID1);
+ }
+ if (strcmp(version2, versionID2) != 0) {
+ errln("getVersionNumber(version2) failed. %s != %s", version2, versionID2);
+ }
+ delete[] versionID1;
+ delete[] versionID2;
+
+ /* Restore the default locale for the other tests. */
+ Locale::setDefault(originalDefault, err);
+}
+
+void
+NewResourceBundleTest::TestIteration()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ const char* testdatapath;
+ const char* data[]={
+ "string_in_Root_te_te_IN", "1",
+ "array_in_Root_te_te_IN", "5",
+ "array_2d_in_Root_te_te_IN", "4",
+ };
+
+ Locale *locale=new Locale("te_IN");
+
+ testdatapath=loadTestData(err);
+ if(U_FAILURE(err))
+ {
+ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(err)));
+ return;
+ }
+
+ ResourceBundle test1(testdatapath, *locale, err);
+ if(U_FAILURE(err)){
+ errln("Construction failed");
+ }
+ uint32_t i;
+ int32_t count, row=0, col=0;
+ char buf[5];
+ UnicodeString expected;
+ UnicodeString element("TE_IN");
+ UnicodeString action;
+
+
+ for(i=0; i<sizeof(data)/sizeof(data[0]); i=i+2){
+ action = "te_IN";
+ action +=".get(";
+ action += data[i];
+ action +=", err)";
+ err=U_ZERO_ERROR;
+ ResourceBundle bundle = test1.get(data[i], err);
+ if(!U_FAILURE(err)){
+ action = "te_IN";
+ action +=".getKey()";
+
+ CONFIRM_EQ((UnicodeString)bundle.getKey(), (UnicodeString)data[i]);
+
+ count=0;
+ row=0;
+ while(bundle.hasNext()){
+ action = data[i];
+ action +=".getNextString(err)";
+ row=count;
+ UnicodeString got=bundle.getNextString(err);
+ if(U_SUCCESS(err)){
+ expected=element;
+ if(bundle.getSize() > 1){
+ CONFIRM_EQ(bundle.getType(), URES_ARRAY);
+ expected+=itoa(row, buf);
+ ResourceBundle rowbundle=bundle.get(row, err);
+ if(!U_FAILURE(err) && rowbundle.getSize()>1){
+ col=0;
+ while(rowbundle.hasNext()){
+ expected=element;
+ got=rowbundle.getNextString(err);
+ if(!U_FAILURE(err)){
+ expected+=itoa(row, buf);
+ expected+=itoa(col, buf);
+ col++;
+ CONFIRM_EQ(got, expected);
+ }
+ }
+ CONFIRM_EQ(col, rowbundle.getSize());
+ }
+ }
+ else{
+ CONFIRM_EQ(bundle.getType(), (int32_t)URES_STRING);
+ }
+ }
+ CONFIRM_EQ(got, expected);
+ count++;
+ }
+ action = data[i];
+ action +=".getSize()";
+ CONFIRM_EQ(bundle.getSize(), count);
+ CONFIRM_EQ(count, atoi(data[i+1]));
+ //after reaching the end
+ err=U_ZERO_ERROR;
+ ResourceBundle errbundle=bundle.getNext(err);
+ action = "After reaching the end of the Iterator:- ";
+ action +=data[i];
+ action +=".getNext()";
+ CONFIRM_NE(err, (int32_t)U_ZERO_ERROR);
+ CONFIRM_EQ(u_errorName(err), u_errorName(U_INDEX_OUTOFBOUNDS_ERROR));
+ //reset the iterator
+ err = U_ZERO_ERROR;
+ bundle.resetIterator();
+ /* The following code is causing a crash
+ ****CRASH******
+ */
+
+ bundle.getNext(err);
+ if(U_FAILURE(err)){
+ errln("ERROR: getNext() throw an error");
+ }
+ }
+ }
+ delete locale;
+}
+
+// TODO: add operator== and != to ResourceBundle
+static UBool
+equalRB(ResourceBundle &a, ResourceBundle &b) {
+ UResType type;
+ UErrorCode status;
+
+ type=a.getType();
+ status=U_ZERO_ERROR;
+ return
+ type==b.getType() &&
+ a.getLocale()==b.getLocale() &&
+ 0==strcmp(a.getName(), b.getName()) &&
+ type==URES_STRING ?
+ a.getString(status)==b.getString(status) :
+ type==URES_INT ?
+ a.getInt(status)==b.getInt(status) :
+ TRUE;
+}
+
+void
+NewResourceBundleTest::TestOtherAPI(){
+ UErrorCode err = U_ZERO_ERROR;
+ const char* testdatapath=loadTestData(err);
+ UnicodeString tDataPathUS = UnicodeString(testdatapath, "");
+
+ if(U_FAILURE(err))
+ {
+ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(err)));
+ return;
+ }
+
+ /* Make sure that users using te_IN for the default locale don't get test failures. */
+ Locale originalDefault;
+ if (Locale::getDefault() == Locale("te_IN")) {
+ Locale::setDefault(Locale("en_US"), err);
+ }
+
+ Locale *locale=new Locale("te_IN");
+
+ ResourceBundle test0(tDataPathUS, *locale, err);
+ if(U_FAILURE(err)){
+ errln("Construction failed");
+ return;
+ }
+
+ ResourceBundle test1(testdatapath, *locale, err);
+ if(U_FAILURE(err)){
+ errln("Construction failed");
+ return;
+ }
+
+ logln("Testing getLocale()\n");
+ if(strcmp(test1.getLocale().getName(), locale->getName()) !=0 ){
+ errln("FAIL: ResourceBundle::getLocale() failed\n");
+ }
+
+ delete locale;
+
+ logln("Testing ResourceBundle(UErrorCode)\n");
+ ResourceBundle defaultresource(err);
+ ResourceBundle explicitdefaultresource(NULL, Locale::getDefault(), err);
+ if(U_FAILURE(err)){
+ errln("Construction of default resourcebundle failed");
+ return;
+ }
+ // You can't compare the default locale to the resolved locale in the
+ // resource bundle due to aliasing, keywords in the default locale
+ // or the chance that the machine running these tests is using a locale
+ // that isn't available in ICU.
+ if(strcmp(defaultresource.getLocale().getName(), explicitdefaultresource.getLocale().getName()) != 0){
+ errln("Construction of default resourcebundle didn't take the defaultlocale. Expected %s Got %s err=%s\n",
+ explicitdefaultresource.getLocale().getName(), defaultresource.getLocale().getName(), u_errorName(err));
+ }
+
+
+ ResourceBundle copyRes(defaultresource);
+ if(strcmp(copyRes.getName(), defaultresource.getName() ) !=0 ||
+ strcmp(test1.getName(), defaultresource.getName() ) ==0 ||
+ strcmp(copyRes.getLocale().getName(), defaultresource.getLocale().getName() ) !=0 ||
+ strcmp(test1.getLocale().getName(), defaultresource.getLocale().getName() ) ==0 )
+ {
+ errln("copy construction failed\n");
+ }
+
+ ResourceBundle defaultSub = defaultresource.get((int32_t)0, err);
+ ResourceBundle defSubCopy(defaultSub);
+ if(strcmp(defSubCopy.getName(), defaultSub.getName() ) !=0 ||
+ strcmp(defSubCopy.getLocale().getName(), defaultSub.getLocale().getName() ) !=0 ){
+ errln("copy construction for subresource failed\n");
+ }
+
+ ResourceBundle *p;
+
+ p = defaultresource.clone();
+ if(p == &defaultresource || !equalRB(*p, defaultresource)) {
+ errln("ResourceBundle.clone() failed");
+ }
+ delete p;
+
+ p = defaultSub.clone();
+ if(p == &defaultSub || !equalRB(*p, defaultSub)) {
+ errln("2nd ResourceBundle.clone() failed");
+ }
+ delete p;
+
+ UVersionInfo ver;
+ copyRes.getVersion(ver);
+
+ logln("Version returned: [%d.%d.%d.%d]\n", ver[0], ver[1], ver[2], ver[3]);
+
+ logln("Testing C like UnicodeString APIs\n");
+
+ UResourceBundle *testCAPI = NULL, *bundle = NULL, *rowbundle = NULL, *temp = NULL;
+ err = U_ZERO_ERROR;
+ const char* data[]={
+ "string_in_Root_te_te_IN", "1",
+ "array_in_Root_te_te_IN", "5",
+ "array_2d_in_Root_te_te_IN", "4",
+ };
+
+
+ testCAPI = ures_open(testdatapath, "te_IN", &err);
+
+ if(U_SUCCESS(err)) {
+ // Do the testing
+ // first iteration
+
+ uint32_t i;
+ int32_t count, row=0, col=0;
+ char buf[5];
+ UnicodeString expected;
+ UnicodeString element("TE_IN");
+ UnicodeString action;
+
+
+ for(i=0; i<sizeof(data)/sizeof(data[0]); i=i+2){
+ action = "te_IN";
+ action +=".get(";
+ action += data[i];
+ action +=", err)";
+ err=U_ZERO_ERROR;
+ bundle = ures_getByKey(testCAPI, data[i], bundle, &err);
+ if(!U_FAILURE(err)){
+ const char* key = NULL;
+ action = "te_IN";
+ action +=".getKey()";
+
+ CONFIRM_EQ((UnicodeString)ures_getKey(bundle), (UnicodeString)data[i]);
+
+ count=0;
+ row=0;
+ while(ures_hasNext(bundle)){
+ action = data[i];
+ action +=".getNextString(err)";
+ row=count;
+ UnicodeString got=ures_getNextUnicodeString(bundle, &key, &err);
+ if(U_SUCCESS(err)){
+ expected=element;
+ if(ures_getSize(bundle) > 1){
+ CONFIRM_EQ(ures_getType(bundle), URES_ARRAY);
+ expected+=itoa(row, buf);
+ rowbundle=ures_getByIndex(bundle, row, rowbundle, &err);
+ if(!U_FAILURE(err) && ures_getSize(rowbundle)>1){
+ col=0;
+ while(ures_hasNext(rowbundle)){
+ expected=element;
+ got=ures_getNextUnicodeString(rowbundle, &key, &err);
+ temp = ures_getByIndex(rowbundle, col, temp, &err);
+ UnicodeString bla = ures_getUnicodeString(temp, &err);
+ UnicodeString bla2 = ures_getUnicodeStringByIndex(rowbundle, col, &err);
+ if(!U_FAILURE(err)){
+ expected+=itoa(row, buf);
+ expected+=itoa(col, buf);
+ col++;
+ CONFIRM_EQ(got, expected);
+ CONFIRM_EQ(bla, expected);
+ CONFIRM_EQ(bla2, expected);
+ }
+ }
+ CONFIRM_EQ(col, ures_getSize(rowbundle));
+ }
+ }
+ else{
+ CONFIRM_EQ(ures_getType(bundle), (int32_t)URES_STRING);
+ }
+ }
+ CONFIRM_EQ(got, expected);
+ count++;
+ }
+ }
+ }
+ ures_close(temp);
+ ures_close(rowbundle);
+ ures_close(bundle);
+ ures_close(testCAPI);
+ } else {
+ errln("failed to open a resource bundle\n");
+ }
+
+ /* Restore the default locale for the other tests. */
+ Locale::setDefault(originalDefault, err);
+}
+
+
+
+
+//***************************************************************************************
+
+UBool
+NewResourceBundleTest::testTag(const char* frag,
+ UBool in_Root,
+ UBool in_te,
+ UBool in_te_IN)
+{
+ int32_t failOrig = fail;
+
+ // Make array from input params
+
+ UBool is_in[] = { in_Root, in_te, in_te_IN };
+
+ const char* NAME[] = { "ROOT", "TE", "TE_IN" };
+
+ // Now try to load the desired items
+
+ char tag[100];
+ UnicodeString action;
+
+ int32_t i,j,row,col, actual_bundle;
+ int32_t index;
+ const char* testdatapath;
+
+ UErrorCode status = U_ZERO_ERROR;
+ testdatapath=loadTestData(status);
+ if(U_FAILURE(status))
+ {
+ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(status)));
+ return FALSE;
+ }
+
+ for (i=0; i<bundles_count; ++i)
+ {
+ action = "Constructor for ";
+ action += param[i].name;
+
+ status = U_ZERO_ERROR;
+ ResourceBundle theBundle( testdatapath, *param[i].locale, status);
+ //ResourceBundle theBundle( "c:\\icu\\icu\\source\\test\\testdata\\testdata", *param[i].locale, status);
+ CONFIRM_UErrorCode(status,param[i].expected_constructor_status);
+
+ if(i == 5)
+ actual_bundle = 0; /* ne -> default */
+ else if(i == 3)
+ actual_bundle = 1; /* te_NE -> te */
+ else if(i == 4)
+ actual_bundle = 2; /* te_IN_NE -> te_IN */
+ else
+ actual_bundle = i;
+
+
+ UErrorCode expected_resource_status = U_MISSING_RESOURCE_ERROR;
+ for (j=e_te_IN; j>=e_Root; --j)
+ {
+ if (is_in[j] && param[i].inherits[j])
+ {
+ if(j == actual_bundle) /* it's in the same bundle OR it's a nonexistent=default bundle (5) */
+ expected_resource_status = U_ZERO_ERROR;
+ else if(j == 0)
+ expected_resource_status = U_USING_DEFAULT_WARNING;
+ else
+ expected_resource_status = U_USING_FALLBACK_WARNING;
+
+ break;
+ }
+ }
+
+ UErrorCode expected_status;
+
+ UnicodeString base;
+ for (j=param[i].where; j>=0; --j)
+ {
+ if (is_in[j])
+ {
+ base = NAME[j];
+ break;
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // string
+
+ uprv_strcpy(tag, "string_");
+ uprv_strcat(tag, frag);
+
+ action = param[i].name;
+ action += ".getStringEx(";
+ action += tag;
+ action += ")";
+
+
+ status = U_ZERO_ERROR;
+ UnicodeString string = theBundle.getStringEx(tag, status);
+ if(U_FAILURE(status)) {
+ string.setTo(TRUE, kErrorUChars, kErrorLength);
+ }
+
+ CONFIRM_UErrorCode(status, expected_resource_status);
+
+ UnicodeString expected_string(kErrorUChars);
+ if (U_SUCCESS(status)) {
+ expected_string = base;
+ }
+
+ CONFIRM_EQ(string, expected_string);
+
+ //--------------------------------------------------------------------------
+ // array ResourceBundle using the key
+
+ uprv_strcpy(tag, "array_");
+ uprv_strcat(tag, frag);
+
+ action = param[i].name;
+ action += ".get(";
+ action += tag;
+ action += ")";
+
+ int32_t count = kERROR_COUNT;
+ status = U_ZERO_ERROR;
+ ResourceBundle array = theBundle.get(tag, status);
+ CONFIRM_UErrorCode(status,expected_resource_status);
+
+
+ if (U_SUCCESS(status))
+ {
+ //confirm the resource type is an array
+ UResType bundleType=array.getType();
+ CONFIRM_EQ(bundleType, URES_ARRAY);
+
+ count=array.getSize();
+ CONFIRM_GE(count,1);
+
+ for (j=0; j<count; ++j)
+ {
+ char buf[32];
+ expected_string = base;
+ expected_string += itoa(j,buf);
+ CONFIRM_EQ(array.getNextString(status),expected_string);
+ }
+
+ }
+ else
+ {
+ CONFIRM_EQ(count,kERROR_COUNT);
+ // CONFIRM_EQ((int32_t)(unsigned long)array,(int32_t)0);
+ count = 0;
+ }
+
+ //--------------------------------------------------------------------------
+ // arrayItem ResourceBundle using the index
+
+
+ for (j=0; j<100; ++j)
+ {
+ index = count ? (randi(count * 3) - count) : (randi(200) - 100);
+ status = U_ZERO_ERROR;
+ string = kErrorUChars;
+ ResourceBundle array = theBundle.get(tag, status);
+ if(!U_FAILURE(status)){
+ UnicodeString t = array.getStringEx(index, status);
+ if(!U_FAILURE(status)) {
+ string=t;
+ }
+ }
+
+ expected_status = (index >= 0 && index < count) ? expected_resource_status : U_MISSING_RESOURCE_ERROR;
+ CONFIRM_UErrorCode(status,expected_status);
+
+ if (U_SUCCESS(status)){
+ char buf[32];
+ expected_string = base;
+ expected_string += itoa(index,buf);
+ } else {
+ expected_string = kErrorUChars;
+ }
+ CONFIRM_EQ(string,expected_string);
+
+ }
+
+ //--------------------------------------------------------------------------
+ // 2dArray
+
+ uprv_strcpy(tag, "array_2d_");
+ uprv_strcat(tag, frag);
+
+ action = param[i].name;
+ action += ".get(";
+ action += tag;
+ action += ")";
+
+
+ int32_t row_count = kERROR_COUNT, column_count = kERROR_COUNT;
+ status = U_ZERO_ERROR;
+ ResourceBundle array2d=theBundle.get(tag, status);
+
+ //const UnicodeString** array2d = theBundle.get2dArray(tag, row_count, column_count, status);
+ CONFIRM_UErrorCode(status,expected_resource_status);
+
+ if (U_SUCCESS(status))
+ {
+ //confirm the resource type is an 2darray
+ UResType bundleType=array2d.getType();
+ CONFIRM_EQ(bundleType, URES_ARRAY);
+
+ row_count=array2d.getSize();
+ CONFIRM_GE(row_count,1);
+
+ for(row=0; row<row_count; ++row){
+ ResourceBundle tablerow=array2d.get(row, status);
+ CONFIRM_UErrorCode(status, expected_resource_status);
+ if(U_SUCCESS(status)){
+ //confirm the resourcetype of each table row is an array
+ UResType rowType=tablerow.getType();
+ CONFIRM_EQ(rowType, URES_ARRAY);
+
+ column_count=tablerow.getSize();
+ CONFIRM_GE(column_count,1);
+
+ for (col=0; j<column_count; ++j) {
+ char buf[32];
+ expected_string = base;
+ expected_string += itoa(row,buf);
+ expected_string += itoa(col,buf);
+ CONFIRM_EQ(tablerow.getNextString(status),expected_string);
+ }
+ }
+ }
+ }else{
+ CONFIRM_EQ(row_count,kERROR_COUNT);
+ CONFIRM_EQ(column_count,kERROR_COUNT);
+ row_count=column_count=0;
+ }
+
+
+
+
+ //--------------------------------------------------------------------------
+ // 2dArrayItem
+ for (j=0; j<200; ++j)
+ {
+ row = row_count ? (randi(row_count * 3) - row_count) : (randi(200) - 100);
+ col = column_count ? (randi(column_count * 3) - column_count) : (randi(200) - 100);
+ status = U_ZERO_ERROR;
+ string = kErrorUChars;
+ ResourceBundle array2d=theBundle.get(tag, status);
+ if(U_SUCCESS(status)){
+ ResourceBundle tablerow=array2d.get(row, status);
+ if(U_SUCCESS(status)) {
+ UnicodeString t=tablerow.getStringEx(col, status);
+ if(U_SUCCESS(status)){
+ string=t;
+ }
+ }
+ }
+ expected_status = (row >= 0 && row < row_count && col >= 0 && col < column_count) ?
+ expected_resource_status: U_MISSING_RESOURCE_ERROR;
+ CONFIRM_UErrorCode(status,expected_status);
+
+ if (U_SUCCESS(status)){
+ char buf[32];
+ expected_string = base;
+ expected_string += itoa(row,buf);
+ expected_string += itoa(col,buf);
+ } else {
+ expected_string = kErrorUChars;
+ }
+ CONFIRM_EQ(string,expected_string);
+
+ }
+
+ //--------------------------------------------------------------------------
+ // taggedArray
+
+ uprv_strcpy(tag, "tagged_array_");
+ uprv_strcat(tag, frag);
+
+ action = param[i].name;
+ action += ".get(";
+ action += tag;
+ action += ")";
+
+ int32_t tag_count;
+ status = U_ZERO_ERROR;
+
+ ResourceBundle tags=theBundle.get(tag, status);
+ CONFIRM_UErrorCode(status, expected_resource_status);
+
+ if (U_SUCCESS(status)) {
+ UResType bundleType=tags.getType();
+ CONFIRM_EQ(bundleType, URES_TABLE);
+
+ tag_count=tags.getSize();
+ CONFIRM_GE((int32_t)tag_count, (int32_t)0);
+
+ for(index=0; index <tag_count; index++){
+ ResourceBundle tagelement=tags.get(index, status);
+ UnicodeString key=tagelement.getKey();
+ UnicodeString value=tagelement.getNextString(status);
+ logln("tag = " + key + ", value = " + value );
+ if(key.startsWith("tag") && value.startsWith(base)){
+ record_pass();
+ }else{
+ record_fail();
+ }
+
+ }
+
+ for(index=0; index <tag_count; index++){
+ ResourceBundle tagelement=tags.get(index, status);
+ const char *tkey=NULL;
+ UnicodeString value=tagelement.getNextString(&tkey, status);
+ UnicodeString key(tkey);
+ logln("tag = " + key + ", value = " + value );
+ if(value.startsWith(base)){
+ record_pass();
+ }else{
+ record_fail();
+ }
+ }
+
+ }else{
+ tag_count=0;
+ }
+
+
+
+
+ //--------------------------------------------------------------------------
+ // taggedArrayItem
+
+ action = param[i].name;
+ action += ".get(";
+ action += tag;
+ action += ")";
+
+ count = 0;
+ for (index=-20; index<20; ++index)
+ {
+ char buf[32];
+ status = U_ZERO_ERROR;
+ string = kErrorUChars;
+ char item_tag[8];
+ uprv_strcpy(item_tag, "tag");
+ uprv_strcat(item_tag, itoa(index,buf));
+ ResourceBundle tags=theBundle.get(tag, status);
+ if(U_SUCCESS(status)){
+ ResourceBundle tagelement=tags.get(item_tag, status);
+ if(!U_FAILURE(status)){
+ UResType elementType=tagelement.getType();
+ CONFIRM_EQ(elementType, (int32_t)URES_STRING);
+ const char* key=tagelement.getKey();
+ CONFIRM_EQ((UnicodeString)key, (UnicodeString)item_tag);
+ UnicodeString t=tagelement.getString(status);
+ if(!U_FAILURE(status)){
+ string=t;
+ }
+ }
+ if (index < 0) {
+ CONFIRM_UErrorCode(status,U_MISSING_RESOURCE_ERROR);
+ }
+ else{
+ if (status != U_MISSING_RESOURCE_ERROR) {
+ count++;
+ expected_string = base;
+ expected_string += buf;
+ CONFIRM_EQ(string,expected_string);
+ }
+ }
+ }
+
+ }
+ CONFIRM_EQ(count, tag_count);
+
+ }
+ return (UBool)(failOrig == fail);
+}
+
+void
+NewResourceBundleTest::record_pass()
+{
+ ++pass;
+}
+void
+NewResourceBundleTest::record_fail()
+{
+ err();
+ ++fail;
+}
+
+
+void
+NewResourceBundleTest::TestNewTypes() {
+ char action[256];
+ const char* testdatapath;
+ UErrorCode status = U_ZERO_ERROR;
+ uint8_t *binResult = NULL;
+ int32_t len = 0;
+ int32_t i = 0;
+ int32_t intResult = 0;
+ uint32_t uintResult = 0;
+ UChar expected[] = { 'a','b','c','\0','d','e','f' };
+ const char* expect ="tab:\t cr:\r ff:\f newline:\n backslash:\\\\ quote=\\\' doubleQuote=\\\" singlequoutes=''";
+ UChar uExpect[200];
+
+ testdatapath=loadTestData(status);
+
+ if(U_FAILURE(status))
+ {
+ logln("Could not load testdata.dat %s \n",u_errorName(status));
+ return;
+ }
+
+ ResourceBundle theBundle(testdatapath, "testtypes", status);
+ ResourceBundle bundle(testdatapath, Locale("te_IN"),status);
+
+ UnicodeString emptyStr = theBundle.getStringEx("emptystring", status);
+ if(!emptyStr.length()==0) {
+ logln("Empty string returned invalid value\n");
+ }
+
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+
+ /* This test reads the string "abc\u0000def" from the bundle */
+ /* if everything is working correctly, the size of this string */
+ /* should be 7. Everything else is a wrong answer, esp. 3 and 6*/
+
+ strcpy(action, "getting and testing of string with embeded zero");
+ ResourceBundle res = theBundle.get("zerotest", status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(res.getType(), URES_STRING);
+ UnicodeString zeroString=res.getString(status);
+ len = zeroString.length();
+ if(U_SUCCESS(status)){
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(len, 7);
+ CONFIRM_NE(len, 3);
+ }
+ for(i=0;i<len;i++){
+ if(zeroString[i]!= expected[i]){
+ logln("Output didnot match Expected: \\u%4X Got: \\u%4X", expected[i], zeroString[i]);
+ }
+ }
+
+ strcpy(action, "getting and testing of binary type");
+ res = theBundle.get("binarytest", status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(res.getType(), URES_BINARY);
+ binResult=(uint8_t*)res.getBinary(len, status);
+ if(U_SUCCESS(status)){
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(len, 15);
+ for(i = 0; i<15; i++) {
+ CONFIRM_EQ(binResult[i], i);
+ }
+ }
+
+ strcpy(action, "getting and testing of imported binary type");
+ res = theBundle.get("importtest",status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(res.getType(), URES_BINARY);
+ binResult=(uint8_t*)res.getBinary(len, status);
+ if(U_SUCCESS(status)){
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(len, 15);
+ for(i = 0; i<15; i++) {
+ CONFIRM_EQ(binResult[i], i);
+ }
+ }
+
+ strcpy(action, "getting and testing of integer types");
+ res = theBundle.get("one", status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(res.getType(), URES_INT);
+ intResult=res.getInt(status);
+ uintResult = res.getUInt(status);
+ if(U_SUCCESS(status)){
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(uintResult, (uint32_t)intResult);
+ CONFIRM_EQ(intResult, 1);
+ }
+
+ strcpy(action, "getting minusone");
+ res = theBundle.get((const char*)"minusone", status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(res.getType(), URES_INT);
+ intResult=res.getInt(status);
+ uintResult = res.getUInt(status);
+ if(U_SUCCESS(status)){
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(uintResult, 0x0FFFFFFF); /* a 28 bit integer */
+ CONFIRM_EQ(intResult, -1);
+ CONFIRM_NE(uintResult, (uint32_t)intResult);
+ }
+
+ strcpy(action, "getting plusone");
+ res = theBundle.get("plusone",status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(res.getType(), URES_INT);
+ intResult=res.getInt(status);
+ uintResult = res.getUInt(status);
+ if(U_SUCCESS(status)){
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(uintResult, (uint32_t)intResult);
+ CONFIRM_EQ(intResult, 1);
+ }
+
+ res = theBundle.get("onehundredtwentythree",status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(res.getType(), URES_INT);
+ intResult=res.getInt(status);
+ if(U_SUCCESS(status)){
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ CONFIRM_EQ(intResult, 123);
+ }
+
+ /* this tests if escapes are preserved or not */
+ {
+ UnicodeString str = theBundle.getStringEx("testescape",status);
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ if(U_SUCCESS(status)){
+ u_charsToUChars(expect,uExpect,(int32_t)uprv_strlen(expect)+1);
+ if(str.compare(uExpect)!=0){
+ errln("Did not get the expected string for testescape expected. Expected : "
+ +UnicodeString(uExpect )+ " Got: " + str);
+ }
+ }
+ }
+ /* test for jitterbug#1435 */
+ {
+ UnicodeString str = theBundle.getStringEx("test_underscores",status);
+ expect ="test message ....";
+ CONFIRM_UErrorCode(status, U_ZERO_ERROR);
+ u_charsToUChars(expect,uExpect,(int32_t)uprv_strlen(expect)+1);
+ if(str.compare(uExpect)!=0){
+ errln("Did not get the expected string for test_underscores.\n");
+ }
+ }
+
+
+}
+
+void
+NewResourceBundleTest::TestGetByFallback() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ ResourceBundle heRes(NULL, "he", status);
+
+ heRes.getWithFallback("calendar", status).getWithFallback("islamic-civil", status).getWithFallback("DateTime", status);
+ if(U_SUCCESS(status)) {
+ errln("he locale's Islamic-civil DateTime resource exists. How did it get here?\n");
+ }
+ status = U_ZERO_ERROR;
+
+ heRes.getWithFallback("calendar", status).getWithFallback("islamic-civil", status).getWithFallback("eras", status);
+ if(U_FAILURE(status)) {
+ errln("Didn't get Islamic Eras. I know they are there!\n");
+ }
+ status = U_ZERO_ERROR;
+
+ ResourceBundle rootRes(NULL, "root", status);
+ rootRes.getWithFallback("calendar", status).getWithFallback("islamic-civil", status).getWithFallback("DateTime", status);
+ if(U_SUCCESS(status)) {
+ errln("Root's Islamic-civil's DateTime resource exists. How did it get here?\n");
+ }
+ status = U_ZERO_ERROR;
+
+}
+//eof
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/restsnew.h b/Build/source/libs/icu/icu-xetex/test/intltest/restsnew.h
new file mode 100644
index 00000000000..efc850c7faf
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/restsnew.h
@@ -0,0 +1,59 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef NEW_RESOURCEBUNDLETEST_H
+#define NEW_RESOURCEBUNDLETEST_H
+
+#include "intltest.h"
+
+/**
+ * Tests for class ResourceBundle
+ **/
+class NewResourceBundleTest: public IntlTest {
+public:
+ NewResourceBundleTest();
+ virtual ~NewResourceBundleTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * Perform several extensive tests using the subtest routine testTag
+ **/
+ void TestResourceBundles(void);
+ /**
+ * Test construction of ResourceBundle accessing a custom test resource-file
+ **/
+ void TestConstruction(void);
+
+ void TestIteration(void);
+
+ void TestOtherAPI(void);
+
+ void TestNewTypes(void);
+
+ void TestGetByFallback(void);
+
+private:
+ /**
+ * The assignment operator has no real implementation.
+ * It is provided to make the compiler happy. Do not call.
+ */
+ NewResourceBundleTest& operator=(const NewResourceBundleTest&) { return *this; }
+
+ /**
+ * extensive subtests called by TestResourceBundles
+ **/
+ UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN);
+
+ void record_pass(void);
+ void record_fail(void);
+
+ int32_t pass;
+ int32_t fail;
+
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.cpp
new file mode 100644
index 00000000000..be15570c67b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.cpp
@@ -0,0 +1,176 @@
+/*
+ ******************************************************************************
+ * Copyright (C) 2005-2007, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ ******************************************************************************
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+#include "rndmcoll.h"
+#include "wbnf.h"
+
+
+#if !UCONFIG_NO_COLLATION
+
+//Raymond: Following comments are copied from Java implementation
+//
+// each rule can be:
+// "[" command "]"
+// "& [" position "]"
+// "&" before chars
+// relation "[variable top]"
+// relation (chars "|")? chars ("/" chars)?
+// plus, a reset must come before a relation
+
+
+static const char collationBNF[] =
+ "$s = ' '? 50%;"
+ "$crlf = '\r\n';"
+
+ "$alternateOptions = non'-'ignorable | shifted;"
+ "$onoff = on | off;"
+ "$caseFirstOptions = off | upper | lower;"
+ "$strengthOptions = '1' | '2' | '3' | '4' | 'I';"
+ "$commandList = '['"
+ " ( alternate ' ' $alternateOptions"
+ " | backwards' 2'"
+ " | normalization ' ' $onoff "
+ " | caseLevel ' ' $onoff "
+ " | hiraganaQ ' ' $onoff"
+ " | caseFirst ' ' $caseFirstOptions"
+ " | strength ' ' $strengthOptions"
+ " ) ']';"
+ "$command = $commandList $crlf;"
+
+ "$ignorableTypes = (tertiary | secondary | primary) ' ' ignorable;"
+ "$allTypes = variable | regular | implicit | trailing | $ignorableTypes;"
+ "$positionList = '[' (first | last) ' ' $allTypes ']';"
+
+ "$beforeList = '[before ' ('1' | '2' | '3') ']';"
+
+ "$relationList = ("
+ " '<'"
+ " | '<<'"
+ " | ';'"
+ " | '<<<'"
+ " | ','"
+ " | '='"
+ ");"
+ "$string = $chars{1,5}~@;"
+ "$chars = a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z| '<'| '&'| '['| ']';"
+ "$rel1 = '[variable top]' $s;"
+ "$p1 = ($string $s '|' $s)? 25%;"
+ "$p2 = ('/' $s $string $s)? 25%;"
+ "$rel2 = $p1 $string $s $p2;"
+ "$relation = $relationList $s ($rel1 | $rel2) $crlf;"
+
+ "$reset = '&' $s ($beforeList $s)? 10% ($positionList 1% | $string 10%) $crlf;"
+ "$mostRules = $command 1% | $reset 5% | $relation 25%;"
+ "$root = $command{0,5} $reset $mostRules{1,20};";
+
+
+void RandomCollatorTest::Test2(){
+ // See ticket 5747 about reenabling this test.
+ errln("TestWbnf is incorrectly implemented.\nThis test should be modeled to use the existing test frame work for naming tests.\n");
+ TestWbnf();
+}
+
+
+void RandomCollatorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* ){
+ if (exec) logln("TestSuite RandomCollatorTest: ");
+ switch (index) {
+ TESTCASE(0, Test);
+ TESTCASE(1, Test2);
+ default: name = ""; break;
+ }
+}
+
+/*
+class TestColltorCompare{
+public:
+ UBool operator()(Collator &coll, int count = 1000){
+ UnicodeString a(test_string.get_a_string());
+ UnicodeString b(test_string.get_a_string());
+ UnicodeString c(test_string.get_a_string());
+ do{
+ if (check_transitivity(coll, a, b, c)){
+ a = b;
+ b = c;
+ c = UnicodeString(test_string.get_a_string());
+ }
+ }while(count-- >= 0 );
+
+ return FALSE;
+ }
+ TestColltorCompare():test_string("$s = $c{1,8};", "$s", "$c", new Magic_SelectOneChar("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]&<")){
+ }
+private:
+ UBool check_transitivity(const Collator & coll, const UnicodeString &a, const UnicodeString &b, const UnicodeString &c){
+ int ab = coll.compare(a,b), ba = coll.compare(b,a);
+ int bc = coll.compare(b,c), cb = coll.compare(c,b);
+ int ca = coll.compare(c,a), ac = coll.compare(a,c);
+ // a
+ // / \
+ // b - c
+ //
+ if (//counter-clockwise, maximum
+ (ab >=0 && bc >=0 && ac <0)
+ ||(bc >=0 && ca >=0 && ba <0)
+ ||(ca >=0 && ab >=0 && cb <0)
+
+ //counter-clockwise, minimum
+ ||(ab <=0 && bc <=0 && ca >0)
+ ||(bc <=0 && ca <=0 && ba >0)
+ ||(ca <=0 && ab <=0 && cb >0)
+ ){
+ return FALSE;
+ }
+ return TRUE;
+ }
+
+ LanguageGenerator test_string;
+};*/
+
+void RandomCollatorTest::Test(){
+ // See ticket 5747 about reenabling this test.
+ errln("This test needs to be fixed.\n");
+
+ LanguageGenerator test_rule;
+ if (test_rule.parseBNF(collationBNF, "$root", TRUE) != LanguageGenerator::OK){
+ errln("The test code itself is wrong.");
+ return;
+ };
+
+ //TestColltorCompare coll_test;
+
+ static const int CONSTRUCT_RANDOM_COUNT = 1000;
+ int i;
+ for (i=0; i < CONSTRUCT_RANDOM_COUNT; i++){
+ const char * rule = test_rule.next();
+ logln("\n-----------------------------------%d\n",i);
+ logln(UnicodeString(rule, strlen(rule)));
+
+ UnicodeString newRule(rule); // potential bug
+ UErrorCode status = U_ZERO_ERROR;
+ logln( "===========================================\n");
+ fwrite(rule, strlen(rule),1,stdout);
+ logln("\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
+
+ Collator * c = new RuleBasedCollator(newRule,status);
+
+ if (U_FAILURE(status)) {
+ errln( "Could not create Collator for the %d(th) generated rule.\n"
+ "Error Name: %s\n"
+ "The rule is ",
+ i, u_errorName(status));
+ return;
+ }
+
+ delete c;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.h
new file mode 100644
index 00000000000..d216af3b1f7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/rndmcoll.h
@@ -0,0 +1,29 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2005-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * RandomCollatorTest is ported from RandomCollatorTest.java of ICU4J
+ */
+
+#ifndef _RANDCOLL
+#define _RANDCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class RandomCollatorTest: public IntlTestCollator {
+public:
+ virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void Test();
+ void Test2();
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif /* _RANDCOLL */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.cpp
new file mode 100644
index 00000000000..064acba30ab
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.cpp
@@ -0,0 +1,238 @@
+
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "sdtfmtts.h"
+
+#include "unicode/smpdtfmt.h"
+#include "unicode/dtfmtsym.h"
+
+// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
+// try to test the full functionality. It just calls each function in the class and
+// verifies that it works on a basic level.
+
+void IntlTestSimpleDateFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite SimpleDateFormatAPI");
+ switch (index) {
+ case 0: name = "SimpleDateFormat API test";
+ if (exec) {
+ logln("SimpleDateFormat API test---"); logln("");
+ UErrorCode status = U_ZERO_ERROR;
+ Locale saveLocale;
+ Locale::setDefault(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not set default locale, test may not give correct results");
+ }
+ testAPI(/*par*/);
+ Locale::setDefault(saveLocale, status);
+ }
+ break;
+
+ default: name = ""; break;
+ }
+}
+
+/**
+ * Test various generic API methods of SimpleDateFormat for API coverage.
+ */
+void IntlTestSimpleDateFormatAPI::testAPI(/*char *par*/)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+// ======= Test constructors
+
+ logln("Testing SimpleDateFormat constructors");
+
+ SimpleDateFormat def(status);
+ if(U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create SimpleDateFormat (default) - exitting");
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+ const UnicodeString pattern("yyyy.MM.dd G 'at' hh:mm:ss z");
+ SimpleDateFormat pat(pattern, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create SimpleDateFormat (pattern)");
+ }
+
+ status = U_ZERO_ERROR;
+ SimpleDateFormat pat_fr(pattern, Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create SimpleDateFormat (pattern French)");
+ }
+
+ status = U_ZERO_ERROR;
+ DateFormatSymbols *symbols = new DateFormatSymbols(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create DateFormatSymbols (French)");
+ }
+
+ status = U_ZERO_ERROR;
+ SimpleDateFormat cust1(pattern, symbols, status);
+ if(U_FAILURE(status)) {
+ dataerrln("ERROR: Could not create SimpleDateFormat (pattern, symbols*) - exitting");
+ return;
+ }
+
+ status = U_ZERO_ERROR;
+ SimpleDateFormat cust2(pattern, *symbols, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Could not create SimpleDateFormat (pattern, symbols)");
+ }
+
+ SimpleDateFormat copy(pat);
+
+// ======= Test clone(), assignment, and equality
+
+ logln("Testing clone(), assignment and equality operators");
+
+ if( ! (copy == pat) || copy != pat) {
+ errln("ERROR: Copy constructor (or ==) failed");
+ }
+
+ copy = cust1;
+ if(copy != cust1) {
+ errln("ERROR: Assignment (or !=) failed");
+ }
+
+ Format *clone = def.clone();
+ if( ! (*clone == def) ) {
+ errln("ERROR: Clone() (or ==) failed");
+ }
+ delete clone;
+
+// ======= Test various format() methods
+
+ logln("Testing various format() methods");
+
+ UDate d = 837039928046.0;
+ Formattable fD(d, Formattable::kIsDate);
+
+ UnicodeString res1, res2;
+ FieldPosition pos1(0), pos2(0);
+
+ res1 = def.format(d, res1, pos1);
+ logln( (UnicodeString) "" + d + " formatted to " + res1);
+
+ status = U_ZERO_ERROR;
+ res2 = cust1.format(fD, res2, pos2, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: format(Formattable [Date]) failed");
+ }
+ logln((UnicodeString) "" + fD.getDate() + " formatted to " + res2);
+
+// ======= Test parse()
+
+ logln("Testing parse()");
+
+ UnicodeString text("02/03/76 2:50 AM, CST");
+ UDate result1, result2;
+ ParsePosition pos(0);
+ result1 = def.parse(text, pos);
+ logln(text + " parsed into " + result1);
+
+ status = U_ZERO_ERROR;
+ result2 = def.parse(text, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: parse() failed");
+ }
+ logln(text + " parsed into " + result2);
+
+// ======= Test getters and setters
+
+ logln("Testing getters and setters");
+
+ const DateFormatSymbols *syms = pat.getDateFormatSymbols();
+ if(!syms) {
+ errln("Couldn't obtain DateFormatSymbols. Quitting test!");
+ return;
+ }
+ if(syms->getDynamicClassID() != DateFormatSymbols::getStaticClassID()) {
+ errln("ERROR: format->getDateFormatSymbols()->getDynamicClassID() != DateFormatSymbols::getStaticClassID()");
+ }
+ DateFormatSymbols *newSyms = new DateFormatSymbols(*syms);
+ def.adoptDateFormatSymbols(newSyms);
+ pat_fr.setDateFormatSymbols(*newSyms);
+ if( *(pat.getDateFormatSymbols()) != *(def.getDateFormatSymbols())) {
+ errln("ERROR: adopt or set DateFormatSymbols() failed");
+ }
+
+ status = U_ZERO_ERROR;
+ UDate startDate = pat.get2DigitYearStart(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: getTwoDigitStartDate() failed");
+ }
+
+ status = U_ZERO_ERROR;
+ pat_fr.set2DigitYearStart(startDate, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: setTwoDigitStartDate() failed");
+ }
+
+// ======= Test DateFormatSymbols constructor
+ newSyms =new DateFormatSymbols("gregorian", status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: new DateFormatSymbols() failed");
+ }
+ def.adoptDateFormatSymbols(newSyms);
+
+// ======= Test applyPattern()
+
+ logln("Testing applyPattern()");
+
+ UnicodeString p1("yyyy.MM.dd G 'at' hh:mm:ss z");
+ logln("Applying pattern " + p1);
+ status = U_ZERO_ERROR;
+ pat.applyPattern(p1);
+
+ UnicodeString s2;
+ s2 = pat.toPattern(s2);
+ logln("Extracted pattern is " + s2);
+ if(s2 != p1) {
+ errln("ERROR: toPattern() result did not match pattern applied");
+ }
+
+ logln("Applying pattern " + p1);
+ status = U_ZERO_ERROR;
+ pat.applyLocalizedPattern(p1, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: applyPattern() failed with " + (int32_t) status);
+ }
+ UnicodeString s3;
+ status = U_ZERO_ERROR;
+ s3 = pat.toLocalizedPattern(s3, status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: toLocalizedPattern() failed");
+ }
+ logln("Extracted pattern is " + s3);
+ if(s3 != p1) {
+ errln("ERROR: toLocalizedPattern() result did not match pattern applied");
+ }
+
+// ======= Test getStaticClassID()
+
+ logln("Testing getStaticClassID()");
+
+ status = U_ZERO_ERROR;
+ DateFormat *test = new SimpleDateFormat(status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create a SimpleDateFormat");
+ }
+
+ if(test->getDynamicClassID() != SimpleDateFormat::getStaticClassID()) {
+ errln("ERROR: getDynamicClassID() didn't return the expected value");
+ }
+
+ delete test;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.h b/Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.h
new file mode 100644
index 00000000000..c9ecd374857
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/sdtfmtts.h
@@ -0,0 +1,31 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTSIMPLEDATEFORMATAPI
+#define _INTLTESTSIMPLEDATEFORMATAPI
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+/**
+ * Test basic functionality of various API functions
+ **/
+class IntlTestSimpleDateFormatAPI : public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+ /**
+ * Performs tests on many API functions, see detailed comments in source code
+ **/
+ void testAPI(/* char* par */);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.cpp
new file mode 100644
index 00000000000..703a4858e60
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.cpp
@@ -0,0 +1,120 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/* file name: sfwdchit.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*/
+
+#include "sfwdchit.h"
+#include "unicode/ustring.h"
+#include "unicode/unistr.h"
+#include "uhash.h"
+#include "cmemory.h"
+
+// A hash code of kInvalidHashCode indicates that the has code needs
+// to be computed. A hash code of kEmptyHashCode is used for empty keys
+// and for any key whose computed hash code is kInvalidHashCode.
+const int32_t SimpleFwdCharIterator::kInvalidHashCode = 0;
+const int32_t SimpleFwdCharIterator::kEmptyHashCode = 1;
+
+#if 0 // not used
+SimpleFwdCharIterator::SimpleFwdCharIterator(const UnicodeString& s) {
+
+ fHashCode = kInvalidHashCode;
+ fLen = s.length();
+ fStart = new UChar[fLen];
+ if(fStart == NULL) {
+ fBogus = TRUE;
+ } else {
+ fEnd = fStart+fLen;
+ fCurrent = fStart;
+ fBogus = FALSE;
+ s.extract(0, fLen, fStart);
+ }
+
+}
+#endif
+
+SimpleFwdCharIterator::SimpleFwdCharIterator(UChar *s, int32_t len, UBool adopt) {
+
+ fHashCode = kInvalidHashCode;
+
+ fLen = len==-1 ? u_strlen(s) : len;
+
+ if(adopt == FALSE) {
+ fStart = new UChar[fLen];
+ if(fStart == NULL) {
+ fBogus = TRUE;
+ } else {
+ uprv_memcpy(fStart, s, fLen);
+ fEnd = fStart+fLen;
+ fCurrent = fStart;
+ fBogus = FALSE;
+ }
+ } else { // adopt = TRUE
+ fCurrent = fStart = s;
+ fEnd = fStart + fLen;
+ fBogus = FALSE;
+ }
+
+}
+
+SimpleFwdCharIterator::~SimpleFwdCharIterator() {
+ delete[] fStart;
+}
+
+#if 0 // not used
+UBool SimpleFwdCharIterator::operator==(const ForwardCharacterIterator& that) const {
+ if(this == &that) {
+ return TRUE;
+ }
+/*
+ if(that->fHashCode != kInvalidHashCode && this->fHashCode = that->fHashCode) {
+ return TRUE;
+ }
+
+ if(this->fStart == that->fStart) {
+ return TRUE;
+ }
+
+ if(this->fLen == that->fLen && uprv_memcmp(this->fStart, that->fStart, this->fLen) {
+ return TRUE;
+ }
+*/
+ return FALSE;
+}
+#endif
+
+int32_t SimpleFwdCharIterator::hashCode(void) const {
+ if (fHashCode == kInvalidHashCode)
+ {
+ UHashTok key;
+ key.pointer = fStart;
+ ((SimpleFwdCharIterator *)this)->fHashCode = uhash_hashUChars(key);
+ }
+ return fHashCode;
+}
+
+UClassID SimpleFwdCharIterator::getDynamicClassID(void) const {
+ return NULL;
+}
+
+UChar SimpleFwdCharIterator::nextPostInc(void) {
+ if(fCurrent == fEnd) {
+ return ForwardCharacterIterator::DONE;
+ } else {
+ return *(fCurrent)++;
+ }
+}
+
+UChar32 SimpleFwdCharIterator::next32PostInc(void) {
+ return ForwardCharacterIterator::DONE;
+}
+
+UBool SimpleFwdCharIterator::hasNext() {
+ return fCurrent < fEnd;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.h b/Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.h
new file mode 100644
index 00000000000..71fbd00ce26
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/sfwdchit.h
@@ -0,0 +1,77 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef SFDWCHIT_H
+#define SFDWCHIT_H
+
+#include "unicode/chariter.h"
+#include "intltest.h"
+
+class SimpleFwdCharIterator : public ForwardCharacterIterator {
+public:
+ // not used -- SimpleFwdCharIterator(const UnicodeString& s);
+ SimpleFwdCharIterator(UChar *s, int32_t len, UBool adopt = FALSE);
+
+ virtual ~SimpleFwdCharIterator();
+
+ /**
+ * Returns true when both iterators refer to the same
+ * character in the same character-storage object.
+ */
+ // not used -- virtual UBool operator==(const ForwardCharacterIterator& that) const;
+
+ /**
+ * Generates a hash code for this iterator.
+ */
+ virtual int32_t hashCode(void) const;
+
+ /**
+ * Returns a UClassID for this ForwardCharacterIterator ("poor man's
+ * RTTI").<P> Despite the fact that this function is public,
+ * DO NOT CONSIDER IT PART OF CHARACTERITERATOR'S API!
+ */
+ virtual UClassID getDynamicClassID(void) const;
+
+ /**
+ * Gets the current code unit for returning and advances to the next code unit
+ * in the iteration range
+ * (toward endIndex()). If there are
+ * no more code units to return, returns DONE.
+ */
+ virtual UChar nextPostInc(void);
+
+ /**
+ * Gets the current code point for returning and advances to the next code point
+ * in the iteration range
+ * (toward endIndex()). If there are
+ * no more code points to return, returns DONE.
+ */
+ virtual UChar32 next32PostInc(void);
+
+ /**
+ * Returns FALSE if there are no more code units or code points
+ * at or after the current position in the iteration range.
+ * This is used with nextPostInc() or next32PostInc() in forward
+ * iteration.
+ */
+ virtual UBool hasNext();
+
+protected:
+ SimpleFwdCharIterator() {}
+ SimpleFwdCharIterator(const SimpleFwdCharIterator &other)
+ : ForwardCharacterIterator(other) {}
+ SimpleFwdCharIterator &operator=(const SimpleFwdCharIterator&) { return *this; }
+private:
+ static const int32_t kInvalidHashCode;
+ static const int32_t kEmptyHashCode;
+
+ UChar *fStart, *fEnd, *fCurrent;
+ int32_t fLen;
+ UBool fBogus;
+ int32_t fHashCode;
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/srchtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/srchtest.cpp
new file mode 100644
index 00000000000..cde9da4bdd3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/srchtest.cpp
@@ -0,0 +1,2350 @@
+/*
+*****************************************************************************
+* Copyright (C) 2001-2006, International Business Machines orporation
+* and others. All Rights Reserved.
+****************************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "srchtest.h"
+#include "../cintltst/usrchdat.c"
+#include "unicode/stsearch.h"
+#include "unicode/ustring.h"
+#include "unicode/schriter.h"
+#include <string.h>
+#include <stdio.h>
+
+// private definitions -----------------------------------------------------
+
+#define CASE(id,test) \
+ case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ if(areBroken) { \
+ errln(__FILE__ " cannot test - failed to create collator."); \
+ } else { \
+ test(); \
+ } \
+ } \
+ break;
+
+// public contructors and destructors --------------------------------------
+
+StringSearchTest::StringSearchTest() :
+ m_en_wordbreaker_(NULL), m_en_characterbreaker_(NULL)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ m_en_us_ = (RuleBasedCollator *)Collator::createInstance("en_US", status);
+ m_fr_fr_ = (RuleBasedCollator *)Collator::createInstance("fr_FR", status);
+ m_de_ = (RuleBasedCollator *)Collator::createInstance("de_DE", status);
+ m_es_ = (RuleBasedCollator *)Collator::createInstance("es_ES", status);
+ if(U_FAILURE(status)) {
+ delete m_en_us_;
+ delete m_fr_fr_;
+ delete m_de_;
+ delete m_es_;
+ m_en_us_ = 0;
+ m_fr_fr_ = 0;
+ m_de_ = 0;
+ m_es_ = 0;
+ errln("Collator creation failed with %s", u_errorName(status));
+ return;
+ }
+
+
+ UnicodeString rules;
+ rules.setTo(((RuleBasedCollator *)m_de_)->getRules());
+ UChar extrarules[128];
+ u_unescape(EXTRACOLLATIONRULE, extrarules, 128);
+ rules.append(extrarules, u_strlen(extrarules));
+ delete m_de_;
+
+ m_de_ = new RuleBasedCollator(rules, status);
+
+ rules.setTo(((RuleBasedCollator *)m_es_)->getRules());
+ rules.append(extrarules, u_strlen(extrarules));
+
+ delete m_es_;
+
+ m_es_ = new RuleBasedCollator(rules, status);
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ m_en_wordbreaker_ = BreakIterator::createWordInstance(
+ Locale::getEnglish(), status);
+ m_en_characterbreaker_ = BreakIterator::createCharacterInstance(
+ Locale::getEnglish(), status);
+#endif
+}
+
+StringSearchTest::~StringSearchTest()
+{
+ delete m_en_us_;
+ delete m_fr_fr_;
+ delete m_de_;
+ delete m_es_;
+#if !UCONFIG_NO_BREAK_ITERATION
+ delete m_en_wordbreaker_;
+ delete m_en_characterbreaker_;
+#endif
+}
+
+// public methods ----------------------------------------------------------
+
+void StringSearchTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* )
+{
+ UBool areBroken = FALSE;
+ if (m_en_us_ == NULL && m_fr_fr_ == NULL && m_de_ == NULL &&
+ m_es_ == NULL && m_en_wordbreaker_ == NULL &&
+ m_en_characterbreaker_ == NULL && exec) {
+ areBroken = TRUE;
+ }
+
+ switch (index) {
+ CASE(0, TestOpenClose)
+ CASE(1, TestInitialization)
+ CASE(2, TestBasic)
+ CASE(3, TestNormExact)
+ CASE(4, TestStrength)
+#if UCONFIG_NO_BREAK_ITERATION
+ case 5:
+ name = "TestBreakIterator";
+ break;
+#else
+ CASE(5, TestBreakIterator)
+#endif
+ CASE(6, TestVariable)
+ CASE(7, TestOverlap)
+ CASE(8, TestCollator)
+ CASE(9, TestPattern)
+ CASE(10, TestText)
+ CASE(11, TestCompositeBoundaries)
+ CASE(12, TestGetSetOffset)
+ CASE(13, TestGetSetAttribute)
+ CASE(14, TestGetMatch)
+ CASE(15, TestSetMatch)
+ CASE(16, TestReset)
+ CASE(17, TestSupplementary)
+ CASE(18, TestContraction)
+ CASE(19, TestIgnorable)
+ CASE(20, TestCanonical)
+ CASE(21, TestNormCanonical)
+ CASE(22, TestStrengthCanonical)
+#if UCONFIG_NO_BREAK_ITERATION
+ case 23:
+ name = "TestBreakIteratorCanonical";
+ break;
+#else
+ CASE(23, TestBreakIteratorCanonical)
+#endif
+ CASE(24, TestVariableCanonical)
+ CASE(25, TestOverlapCanonical)
+ CASE(26, TestCollatorCanonical)
+ CASE(27, TestPatternCanonical)
+ CASE(28, TestTextCanonical)
+ CASE(29, TestCompositeBoundariesCanonical)
+ CASE(30, TestGetSetOffsetCanonical)
+ CASE(31, TestSupplementaryCanonical)
+ CASE(32, TestContractionCanonical)
+ CASE(33, TestUClassID)
+ CASE(34, TestSubclass)
+ CASE(35, TestCoverage)
+ CASE(36, TestDiactricMatch)
+ default: name = ""; break;
+ }
+}
+
+// private methods ------------------------------------------------------
+
+RuleBasedCollator * StringSearchTest::getCollator(const char *collator)
+{
+ if (collator == NULL) {
+ return m_en_us_;
+ }
+ if (strcmp(collator, "fr") == 0) {
+ return m_fr_fr_;
+ }
+ else if (strcmp(collator, "de") == 0) {
+ return m_de_;
+ }
+ else if (strcmp(collator, "es") == 0) {
+ return m_es_;
+ }
+ else {
+ return m_en_us_;
+ }
+}
+
+BreakIterator * StringSearchTest::getBreakIterator(const char *breaker)
+{
+#if UCONFIG_NO_BREAK_ITERATION
+ return NULL;
+#else
+ if (breaker == NULL) {
+ return NULL;
+ }
+ if (strcmp(breaker, "wordbreaker") == 0) {
+ return m_en_wordbreaker_;
+ }
+ else {
+ return m_en_characterbreaker_;
+ }
+#endif
+}
+
+char * StringSearchTest::toCharString(const UnicodeString &text)
+{
+ static char result[1024];
+ int index = 0;
+ int count = 0;
+ int length = text.length();
+
+ for (; count < length; count ++) {
+ UChar ch = text[count];
+ if (ch >= 0x20 && ch <= 0x7e) {
+ result[index ++] = (char)ch;
+ }
+ else {
+ sprintf(result+index, "\\u%04x", ch);
+ index += 6; /* \uxxxx */
+ }
+ }
+ result[index] = 0;
+
+ return result;
+}
+
+Collator::ECollationStrength StringSearchTest::getECollationStrength(
+ const UCollationStrength &strength) const
+{
+ switch (strength)
+ {
+ case UCOL_PRIMARY :
+ return Collator::PRIMARY;
+ case UCOL_SECONDARY :
+ return Collator::SECONDARY;
+ case UCOL_TERTIARY :
+ return Collator::TERTIARY;
+ default :
+ return Collator::IDENTICAL;
+ }
+}
+
+UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
+ const SearchData *search)
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t matchindex = search->offset[count];
+ UnicodeString matchtext;
+
+ if (strsrch->getMatchedStart() != USEARCH_DONE ||
+ strsrch->getMatchedLength() != 0) {
+ errln("Error with the initialization of match start and length");
+ }
+ // start of following matches
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ int32_t matchlength = search->size[count];
+ strsrch->next(status);
+ if (matchindex != strsrch->getMatchedStart() ||
+ matchlength != strsrch->getMatchedLength()) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error following match found at %d %d",
+ strsrch->getMatchedStart(), strsrch->getMatchedLength());
+ return FALSE;
+ }
+ count ++;
+
+ strsrch->getMatchedText(matchtext);
+
+ if (U_FAILURE(status) ||
+ strsrch->getText().compareBetween(matchindex,
+ matchindex + matchlength,
+ matchtext, 0,
+ matchtext.length())) {
+ errln("Error getting following matched text");
+ }
+
+ matchindex = search->offset[count];
+ }
+ strsrch->next(status);
+ if (strsrch->getMatchedStart() != USEARCH_DONE ||
+ strsrch->getMatchedLength() != 0) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error following match found at %d %d",
+ strsrch->getMatchedStart(), strsrch->getMatchedLength());
+ return FALSE;
+ }
+ // start of preceding matches
+ count = count == 0 ? 0 : count - 1;
+ matchindex = search->offset[count];
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ int32_t matchlength = search->size[count];
+ strsrch->previous(status);
+ if (matchindex != strsrch->getMatchedStart() ||
+ matchlength != strsrch->getMatchedLength()) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error following match found at %d %d",
+ strsrch->getMatchedStart(), strsrch->getMatchedLength());
+ return FALSE;
+ }
+
+ strsrch->getMatchedText(matchtext);
+
+ if (U_FAILURE(status) ||
+ strsrch->getText().compareBetween(matchindex,
+ matchindex + matchlength,
+ matchtext, 0,
+ matchtext.length())) {
+ errln("Error getting following matched text");
+ }
+
+ matchindex = count > 0 ? search->offset[count - 1] : -1;
+ count --;
+ }
+ strsrch->previous(status);
+ if (strsrch->getMatchedStart() != USEARCH_DONE ||
+ strsrch->getMatchedLength() != 0) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error following match found at %d %d",
+ strsrch->getMatchedStart(), strsrch->getMatchedLength());
+ return FALSE;
+ }
+ return TRUE;
+}
+
+UBool StringSearchTest::assertEqual(const SearchData *search)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ Collator *collator = getCollator(search->collator);
+ BreakIterator *breaker = getBreakIterator(search->breaker);
+ StringSearch *strsrch, *strsrch2;
+ UChar temp[128];
+
+#if UCONFIG_NO_BREAK_ITERATION
+ if(search->breaker) {
+ return TRUE; /* skip test */
+ }
+#endif
+ u_unescape(search->text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp);
+ u_unescape(search->pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp);
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ if (breaker != NULL) {
+ breaker->setText(text);
+ }
+#endif
+ collator->setStrength(getECollationStrength(search->strength));
+ strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator,
+ breaker, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ return FALSE;
+ }
+
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ return FALSE;
+ }
+
+
+ strsrch2 = strsrch->clone();
+ if( strsrch2 == strsrch || *strsrch2 != *strsrch ||
+ !assertEqualWithStringSearch(strsrch2, search)
+ ) {
+ errln("failure with StringSearch.clone()");
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ delete strsrch2;
+ return FALSE;
+ }
+ delete strsrch2;
+
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ return TRUE;
+}
+
+UBool StringSearchTest::assertCanonicalEqual(const SearchData *search)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *collator = getCollator(search->collator);
+ BreakIterator *breaker = getBreakIterator(search->breaker);
+ StringSearch *strsrch;
+ UChar temp[128];
+
+#if UCONFIG_NO_BREAK_ITERATION
+ if(search->breaker) {
+ return TRUE; /* skip test */
+ }
+#endif
+
+ u_unescape(search->text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp);
+ u_unescape(search->pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp);
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ if (breaker != NULL) {
+ breaker->setText(text);
+ }
+#endif
+ collator->setStrength(getECollationStrength(search->strength));
+ strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator,
+ breaker, status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ return FALSE;
+ }
+
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ return FALSE;
+ }
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ return TRUE;
+}
+
+UBool StringSearchTest::assertEqualWithAttribute(const SearchData *search,
+ USearchAttributeValue canonical,
+ USearchAttributeValue overlap)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Collator *collator = getCollator(search->collator);
+ BreakIterator *breaker = getBreakIterator(search->breaker);
+ StringSearch *strsrch;
+ UChar temp[128];
+
+
+#if UCONFIG_NO_BREAK_ITERATION
+ if(search->breaker) {
+ return TRUE; /* skip test */
+ }
+#endif
+
+ u_unescape(search->text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp);
+ u_unescape(search->pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp);
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ if (breaker != NULL) {
+ breaker->setText(text);
+ }
+#endif
+ collator->setStrength(getECollationStrength(search->strength));
+ strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator,
+ breaker, status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, canonical, status);
+ strsrch->setAttribute(USEARCH_OVERLAP, overlap, status);
+
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ return FALSE;
+ }
+
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ return FALSE;
+ }
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ return TRUE;
+}
+
+void StringSearchTest::TestOpenClose()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *result;
+ BreakIterator *breakiter = m_en_wordbreaker_;
+ UnicodeString pattern;
+ UnicodeString text;
+ UnicodeString temp("a");
+ StringCharacterIterator chariter(text);
+
+ /* testing null arguments */
+ result = new StringSearch(pattern, text, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: NULL arguments should produce an error");
+ }
+ delete result;
+
+ chariter.setText(text);
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, chariter, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: NULL arguments should produce an error");
+ }
+ delete result;
+
+ text.append(0, 0x1);
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, text, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: Empty pattern should produce an error");
+ }
+ delete result;
+
+ chariter.setText(text);
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, chariter, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: Empty pattern should produce an error");
+ }
+ delete result;
+
+ text.remove();
+ pattern.append(temp);
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, text, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: Empty text should produce an error");
+ }
+ delete result;
+
+ chariter.setText(text);
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, chariter, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: Empty text should produce an error");
+ }
+ delete result;
+
+ text.append(temp);
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, text, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: NULL arguments should produce an error");
+ }
+ delete result;
+
+ chariter.setText(text);
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, chariter, NULL, NULL, status);
+ if (U_SUCCESS(status)) {
+ errln("Error: NULL arguments should produce an error");
+ }
+ delete result;
+
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, text, m_en_us_, NULL, status);
+ if (U_FAILURE(status)) {
+ errln("Error: NULL break iterator is valid for opening search");
+ }
+ delete result;
+
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, chariter, m_en_us_, NULL, status);
+ if (U_FAILURE(status)) {
+ errln("Error: NULL break iterator is valid for opening search");
+ }
+ delete result;
+
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, text, Locale::getEnglish(), NULL, status);
+ if (U_FAILURE(status) || result == NULL) {
+ errln("Error: NULL break iterator is valid for opening search");
+ }
+ delete result;
+
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, chariter, Locale::getEnglish(), NULL, status);
+ if (U_FAILURE(status)) {
+ errln("Error: NULL break iterator is valid for opening search");
+ }
+ delete result;
+
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, text, m_en_us_, breakiter, status);
+ if (U_FAILURE(status)) {
+ errln("Error: Break iterator is valid for opening search");
+ }
+ delete result;
+
+ status = U_ZERO_ERROR;
+ result = new StringSearch(pattern, chariter, m_en_us_, NULL, status);
+ if (U_FAILURE(status)) {
+ errln("Error: Break iterator is valid for opening search");
+ }
+ delete result;
+}
+
+void StringSearchTest::TestInitialization()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern;
+ UnicodeString text;
+ UnicodeString temp("a");
+ StringSearch *result;
+ int count;
+
+ /* simple test on the pattern ce construction */
+ pattern.append(temp);
+ pattern.append(temp);
+ text.append(temp);
+ text.append(temp);
+ text.append(temp);
+ result = new StringSearch(pattern, text, m_en_us_, NULL, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening search %s", u_errorName(status));
+ }
+ StringSearch *copy = new StringSearch(*result);
+ if (*(copy->getCollator()) != *(result->getCollator()) ||
+ copy->getBreakIterator() != result->getBreakIterator() ||
+ copy->getMatchedLength() != result->getMatchedLength() ||
+ copy->getMatchedStart() != result->getMatchedStart() ||
+ copy->getOffset() != result->getOffset() ||
+ copy->getPattern() != result->getPattern() ||
+ copy->getText() != result->getText() ||
+ *(copy) != *(result))
+ {
+ errln("Error copying StringSearch");
+ }
+ delete copy;
+
+ copy = (StringSearch *)result->safeClone();
+ if (*(copy->getCollator()) != *(result->getCollator()) ||
+ copy->getBreakIterator() != result->getBreakIterator() ||
+ copy->getMatchedLength() != result->getMatchedLength() ||
+ copy->getMatchedStart() != result->getMatchedStart() ||
+ copy->getOffset() != result->getOffset() ||
+ copy->getPattern() != result->getPattern() ||
+ copy->getText() != result->getText() ||
+ *(copy) != *(result)) {
+ errln("Error copying StringSearch");
+ }
+ delete result;
+
+ /* testing if an extremely large pattern will fail the initialization */
+ for (count = 0; count < 512; count ++) {
+ pattern.append(temp);
+ }
+ result = new StringSearch(pattern, text, m_en_us_, NULL, status);
+ if (*result != *result) {
+ errln("Error: string search object expected to match itself");
+ }
+ if (*result == *copy) {
+ errln("Error: string search objects are not expected to match");
+ }
+ *copy = *result;
+ if (*(copy->getCollator()) != *(result->getCollator()) ||
+ copy->getBreakIterator() != result->getBreakIterator() ||
+ copy->getMatchedLength() != result->getMatchedLength() ||
+ copy->getMatchedStart() != result->getMatchedStart() ||
+ copy->getOffset() != result->getOffset() ||
+ copy->getPattern() != result->getPattern() ||
+ copy->getText() != result->getText() ||
+ *(copy) != *(result)) {
+ errln("Error copying StringSearch");
+ }
+ if (U_FAILURE(status)) {
+ errln("Error opening search %s", u_errorName(status));
+ }
+ delete result;
+ delete copy;
+}
+
+void StringSearchTest::TestBasic()
+{
+ int count = 0;
+ while (BASIC[count].text != NULL) {
+ //printf("count %d", count);
+ if (!assertEqual(&BASIC[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+void StringSearchTest::TestNormExact()
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting collation normalization %s",
+ u_errorName(status));
+ }
+ while (BASIC[count].text != NULL) {
+ if (!assertEqual(&BASIC[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ count = 0;
+ while (NORMEXACT[count].text != NULL) {
+ if (!assertEqual(&NORMEXACT[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
+ count = 0;
+ while (NONNORMEXACT[count].text != NULL) {
+ if (!assertEqual(&NONNORMEXACT[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+void StringSearchTest::TestStrength()
+{
+ int count = 0;
+ while (STRENGTH[count].text != NULL) {
+ if (!assertEqual(&STRENGTH[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+void StringSearchTest::TestBreakIterator()
+{
+ UChar temp[128];
+ u_unescape(BREAKITERATOREXACT[0].text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(BREAKITERATOREXACT[0].pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ }
+
+ strsrch->setBreakIterator(NULL, status);
+ if (U_FAILURE(status) || strsrch->getBreakIterator() != NULL) {
+ errln("Error usearch_getBreakIterator returned wrong object");
+ }
+
+ strsrch->setBreakIterator(m_en_characterbreaker_, status);
+ if (U_FAILURE(status) ||
+ strsrch->getBreakIterator() != m_en_characterbreaker_) {
+ errln("Error usearch_getBreakIterator returned wrong object");
+ }
+
+ strsrch->setBreakIterator(m_en_wordbreaker_, status);
+ if (U_FAILURE(status) ||
+ strsrch->getBreakIterator() != m_en_wordbreaker_) {
+ errln("Error usearch_getBreakIterator returned wrong object");
+ }
+
+ delete strsrch;
+
+ int count = 0;
+ while (count < 4) {
+ // special purposes for tests numbers 0-3
+ const SearchData *search = &(BREAKITERATOREXACT[count]);
+ RuleBasedCollator *collator = getCollator(search->collator);
+ BreakIterator *breaker = getBreakIterator(search->breaker);
+ StringSearch *strsrch;
+
+ u_unescape(search->text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search->pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ if (breaker != NULL) {
+ breaker->setText(text);
+ }
+ collator->setStrength(getECollationStrength(search->strength));
+
+ strsrch = new StringSearch(pattern, text, collator, breaker, status);
+ if (U_FAILURE(status) ||
+ strsrch->getBreakIterator() != breaker) {
+ errln("Error setting break iterator");
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ }
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ }
+ search = &(BREAKITERATOREXACT[count + 1]);
+ breaker = getBreakIterator(search->breaker);
+ if (breaker != NULL) {
+ breaker->setText(text);
+ }
+ strsrch->setBreakIterator(breaker, status);
+ if (U_FAILURE(status) ||
+ strsrch->getBreakIterator() != breaker) {
+ errln("Error setting break iterator");
+ delete strsrch;
+ }
+ strsrch->reset();
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ errln("Error at test number %d", count);
+ }
+ delete strsrch;
+ count += 2;
+ }
+ count = 0;
+ while (BREAKITERATOREXACT[count].text != NULL) {
+ if (!assertEqual(&BREAKITERATOREXACT[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+#endif
+
+void StringSearchTest::TestVariable()
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ m_en_us_->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting collation alternate attribute %s",
+ u_errorName(status));
+ }
+ while (VARIABLE[count].text != NULL) {
+ logln("variable %d", count);
+ if (!assertEqual(&VARIABLE[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ m_en_us_->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE,
+ status);
+}
+
+void StringSearchTest::TestOverlap()
+{
+ int count = 0;
+ while (OVERLAP[count].text != NULL) {
+ if (!assertEqualWithAttribute(&OVERLAP[count], USEARCH_OFF,
+ USEARCH_ON)) {
+ errln("Error at overlap test number %d", count);
+ }
+ count ++;
+ }
+ count = 0;
+ while (NONOVERLAP[count].text != NULL) {
+ if (!assertEqual(&NONOVERLAP[count])) {
+ errln("Error at non overlap test number %d", count);
+ }
+ count ++;
+ }
+
+ count = 0;
+ while (count < 1) {
+ const SearchData *search = &(OVERLAP[count]);
+ UChar temp[128];
+ u_unescape(search->text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search->pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ RuleBasedCollator *collator = getCollator(search->collator);
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text,
+ collator, NULL,
+ status);
+
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_ON) {
+ errln("Error setting overlap option");
+ }
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ delete strsrch;
+ return;
+ }
+
+ search = &(NONOVERLAP[count]);
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) {
+ errln("Error setting overlap option");
+ }
+ strsrch->reset();
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ delete strsrch;
+ errln("Error at test number %d", count);
+ }
+
+ count ++;
+ delete strsrch;
+ }
+}
+
+void StringSearchTest::TestCollator()
+{
+ // test collator that thinks "o" and "p" are the same thing
+ UChar temp[128];
+ u_unescape(COLLATOR[0].text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(COLLATOR[0].pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ delete strsrch;
+ return;
+ }
+ if (!assertEqualWithStringSearch(strsrch, &COLLATOR[0])) {
+ delete strsrch;
+ return;
+ }
+
+ u_unescape(TESTCOLLATORRULE, temp, 128);
+ UnicodeString rules;
+ rules.setTo(temp, u_strlen(temp));
+ RuleBasedCollator *tailored = new RuleBasedCollator(rules, status);
+ tailored->setStrength(getECollationStrength(COLLATOR[1].strength));
+
+ if (U_FAILURE(status)) {
+ errln("Error opening rule based collator %s", u_errorName(status));
+ delete strsrch;
+ if (tailored != NULL) {
+ delete tailored;
+ }
+ return;
+ }
+
+ strsrch->setCollator(tailored, status);
+ if (U_FAILURE(status) || (*strsrch->getCollator()) != (*tailored)) {
+ errln("Error setting rule based collator");
+ delete strsrch;
+ if (tailored != NULL) {
+ delete tailored;
+ }
+ }
+ strsrch->reset();
+ if (!assertEqualWithStringSearch(strsrch, &COLLATOR[1])) {
+ delete strsrch;
+ if (tailored != NULL) {
+ delete tailored;
+ }
+ return;
+ }
+
+ strsrch->setCollator(m_en_us_, status);
+ strsrch->reset();
+ if (U_FAILURE(status) || (*strsrch->getCollator()) != (*m_en_us_)) {
+ errln("Error setting rule based collator");
+ delete strsrch;
+ if (tailored != NULL) {
+ delete tailored;
+ }
+ }
+ if (!assertEqualWithStringSearch(strsrch, &COLLATOR[0])) {
+ errln("Error searching collator test");
+ }
+ delete strsrch;
+ if (tailored != NULL) {
+ delete tailored;
+ }
+}
+
+void StringSearchTest::TestPattern()
+{
+
+ UChar temp[512];
+ int templength;
+ u_unescape(PATTERN[0].text, temp, 512);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(PATTERN[0].pattern, temp, 512);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ m_en_us_->setStrength(getECollationStrength(PATTERN[0].strength));
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+ if (strsrch->getPattern() != pattern) {
+ errln("Error setting pattern");
+ }
+ if (!assertEqualWithStringSearch(strsrch, &PATTERN[0])) {
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+
+ u_unescape(PATTERN[1].pattern, temp, 512);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setPattern(pattern, status);
+ if (pattern != strsrch->getPattern()) {
+ errln("Error setting pattern");
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+ strsrch->reset();
+ if (U_FAILURE(status)) {
+ errln("Error setting pattern %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &PATTERN[1])) {
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+
+ u_unescape(PATTERN[0].pattern, temp, 512);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setPattern(pattern, status);
+ if (pattern != strsrch->getPattern()) {
+ errln("Error setting pattern");
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+ strsrch->reset();
+ if (U_FAILURE(status)) {
+ errln("Error setting pattern %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &PATTERN[0])) {
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+ /* enormous pattern size to see if this crashes */
+ for (templength = 0; templength != 512; templength ++) {
+ temp[templength] = 0x61;
+ }
+ temp[511] = 0;
+ pattern.setTo(temp, 511);
+ strsrch->setPattern(pattern, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting pattern with size 512, %s", u_errorName(status));
+ }
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+}
+
+void StringSearchTest::TestText()
+{
+ UChar temp[128];
+ u_unescape(TEXT[0].text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(TEXT[0].pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ return;
+ }
+ if (text != strsrch->getText()) {
+ errln("Error setting text");
+ }
+ if (!assertEqualWithStringSearch(strsrch, &TEXT[0])) {
+ delete strsrch;
+ return;
+ }
+
+ u_unescape(TEXT[1].text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ if (text != strsrch->getText()) {
+ errln("Error setting text");
+ delete strsrch;
+ return;
+ }
+ if (U_FAILURE(status)) {
+ errln("Error setting text %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &TEXT[1])) {
+ delete strsrch;
+ return;
+ }
+
+ u_unescape(TEXT[0].text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ StringCharacterIterator chariter(text);
+ strsrch->setText(chariter, status);
+ if (text != strsrch->getText()) {
+ errln("Error setting text");
+ delete strsrch;
+ return;
+ }
+ if (U_FAILURE(status)) {
+ errln("Error setting pattern %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &TEXT[0])) {
+ errln("Error searching within set text");
+ }
+ delete strsrch;
+}
+
+void StringSearchTest::TestCompositeBoundaries()
+{
+ int count = 0;
+ while (COMPOSITEBOUNDARIES[count].text != NULL) {
+ logln("composite %d", count);
+ if (!assertEqual(&COMPOSITEBOUNDARIES[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+void StringSearchTest::TestGetSetOffset()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern("1234567890123456");
+ UnicodeString text("12345678901234567890123456789012");
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_,
+ NULL, status);
+ /* testing out of bounds error */
+ strsrch->setOffset(-1, status);
+ if (U_SUCCESS(status)) {
+ errln("Error expecting set offset error");
+ }
+ strsrch->setOffset(128, status);
+ if (U_SUCCESS(status)) {
+ errln("Error expecting set offset error");
+ }
+ int index = 0;
+ while (BASIC[index].text != NULL) {
+ UErrorCode status = U_ZERO_ERROR;
+ SearchData search = BASIC[index ++];
+ UChar temp[128];
+
+ u_unescape(search.text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search.pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ strsrch->setPattern(pattern, status);
+ strsrch->getCollator()->setStrength(getECollationStrength(
+ search.strength));
+ strsrch->reset();
+
+ int count = 0;
+ int32_t matchindex = search.offset[count];
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ int32_t matchlength = search.size[count];
+ strsrch->next(status);
+ if (matchindex != strsrch->getMatchedStart() ||
+ matchlength != strsrch->getMatchedLength()) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error match found at %d %d",
+ strsrch->getMatchedStart(),
+ strsrch->getMatchedLength());
+ return;
+ }
+ matchindex = search.offset[count + 1] == -1 ? -1 :
+ search.offset[count + 2];
+ if (search.offset[count + 1] != -1) {
+ strsrch->setOffset(search.offset[count + 1] + 1, status);
+ if (strsrch->getOffset() != search.offset[count + 1] + 1) {
+ errln("Error setting offset\n");
+ return;
+ }
+ }
+
+ count += 2;
+ }
+ strsrch->next(status);
+ if (strsrch->getMatchedStart() != USEARCH_DONE) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error match found at %d %d",
+ strsrch->getMatchedStart(),
+ strsrch->getMatchedLength());
+ return;
+ }
+ }
+ strsrch->getCollator()->setStrength(getECollationStrength(
+ UCOL_TERTIARY));
+ delete strsrch;
+}
+
+void StringSearchTest::TestGetSetAttribute()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pattern("pattern");
+ UnicodeString text("text");
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening search %s", u_errorName(status));
+ return;
+ }
+
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_DEFAULT, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) {
+ errln("Error setting overlap to the default");
+ }
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_ON) {
+ errln("Error setting overlap true");
+ }
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) {
+ errln("Error setting overlap false");
+ }
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ATTRIBUTE_VALUE_COUNT,
+ status);
+ if (U_SUCCESS(status)) {
+ errln("Error setting overlap to illegal value");
+ }
+ status = U_ZERO_ERROR;
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_DEFAULT, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_OFF) {
+ errln("Error setting canonical match to the default");
+ }
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_ON) {
+ errln("Error setting canonical match true");
+ }
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_OFF, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_OFF) {
+ errln("Error setting canonical match false");
+ }
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH,
+ USEARCH_ATTRIBUTE_VALUE_COUNT, status);
+ if (U_SUCCESS(status)) {
+ errln("Error setting canonical match to illegal value");
+ }
+ status = U_ZERO_ERROR;
+ strsrch->setAttribute(USEARCH_ATTRIBUTE_COUNT, USEARCH_DEFAULT, status);
+ if (U_SUCCESS(status)) {
+ errln("Error setting illegal attribute success");
+ }
+
+ delete strsrch;
+}
+
+void StringSearchTest::TestGetMatch()
+{
+ UChar temp[128];
+ SearchData search = MATCH[0];
+ u_unescape(search.text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search.pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+
+ int count = 0;
+ int32_t matchindex = search.offset[count];
+ UnicodeString matchtext;
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ int32_t matchlength = search.size[count];
+ strsrch->next(status);
+ if (matchindex != strsrch->getMatchedStart() ||
+ matchlength != strsrch->getMatchedLength()) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error match found at %d %d", strsrch->getMatchedStart(),
+ strsrch->getMatchedLength());
+ return;
+ }
+ count ++;
+
+ status = U_ZERO_ERROR;
+ strsrch->getMatchedText(matchtext);
+ if (matchtext.length() != matchlength || U_FAILURE(status)){
+ errln("Error getting match text");
+ }
+ matchindex = search.offset[count];
+ }
+ status = U_ZERO_ERROR;
+ strsrch->next(status);
+ if (strsrch->getMatchedStart() != USEARCH_DONE ||
+ strsrch->getMatchedLength() != 0) {
+ errln("Error end of match not found");
+ }
+ status = U_ZERO_ERROR;
+ strsrch->getMatchedText(matchtext);
+ if (matchtext.length() != 0) {
+ errln("Error getting null matches");
+ }
+ delete strsrch;
+}
+
+void StringSearchTest::TestSetMatch()
+{
+ int count = 0;
+ while (MATCH[count].text != NULL) {
+ SearchData search = MATCH[count];
+ UChar temp[128];
+ UErrorCode status = U_ZERO_ERROR;
+ u_unescape(search.text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search.pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_,
+ NULL, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+
+ int size = 0;
+ while (search.offset[size] != -1) {
+ size ++;
+ }
+
+ if (strsrch->first(status) != search.offset[0] || U_FAILURE(status)) {
+ errln("Error getting first match");
+ }
+ if (strsrch->last(status) != search.offset[size -1] ||
+ U_FAILURE(status)) {
+ errln("Error getting last match");
+ }
+
+ int index = 0;
+ while (index < size) {
+ if (index + 2 < size) {
+ if (strsrch->following(search.offset[index + 2] - 1, status)
+ != search.offset[index + 2] || U_FAILURE(status)) {
+ errln("Error getting following match at index %d",
+ search.offset[index + 2] - 1);
+ }
+ }
+ if (index + 1 < size) {
+ if (strsrch->preceding(search.offset[index + 1] +
+ search.size[index + 1] + 1,
+ status) != search.offset[index + 1] ||
+ U_FAILURE(status)) {
+ errln("Error getting preceeding match at index %d",
+ search.offset[index + 1] + 1);
+ }
+ }
+ index += 2;
+ }
+ status = U_ZERO_ERROR;
+ if (strsrch->following(text.length(), status) != USEARCH_DONE) {
+ errln("Error expecting out of bounds match");
+ }
+ if (strsrch->preceding(0, status) != USEARCH_DONE) {
+ errln("Error expecting out of bounds match");
+ }
+ count ++;
+ delete strsrch;
+ }
+}
+
+void StringSearchTest::TestReset()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString text("fish fish");
+ UnicodeString pattern("s");
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+ return;
+ }
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ strsrch->setOffset(9, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting attributes and offsets");
+ }
+ else {
+ strsrch->reset();
+ if (strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF ||
+ strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_OFF ||
+ strsrch->getOffset() != 0 || strsrch->getMatchedLength() != 0 ||
+ strsrch->getMatchedStart() != USEARCH_DONE) {
+ errln("Error resetting string search");
+ }
+ strsrch->previous(status);
+ if (strsrch->getMatchedStart() != 7 ||
+ strsrch->getMatchedLength() != 1) {
+ errln("Error resetting string search\n");
+ }
+ }
+ delete strsrch;
+}
+
+void StringSearchTest::TestSupplementary()
+{
+ int count = 0;
+ while (SUPPLEMENTARY[count].text != NULL) {
+ if (!assertEqual(&SUPPLEMENTARY[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+void StringSearchTest::TestContraction()
+{
+ UChar temp[128];
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_unescape(CONTRACTIONRULE, temp, 128);
+ UnicodeString rules;
+ rules.setTo(temp, u_strlen(temp));
+ RuleBasedCollator *collator = new RuleBasedCollator(rules,
+ getECollationStrength(UCOL_TERTIARY), UCOL_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening collator %s", u_errorName(status));
+ }
+ UnicodeString text("text");
+ UnicodeString pattern("pattern");
+ StringSearch *strsrch = new StringSearch(pattern, text, collator, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ }
+
+ int count = 0;
+ while (CONTRACTION[count].text != NULL) {
+ u_unescape(CONTRACTION[count].text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(CONTRACTION[count].pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ strsrch->setPattern(pattern, status);
+ if (!assertEqualWithStringSearch(strsrch, &CONTRACTION[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ delete strsrch;
+ delete collator;
+}
+
+void StringSearchTest::TestIgnorable()
+{
+ UChar temp[128];
+ u_unescape(IGNORABLERULE, temp, 128);
+ UnicodeString rules;
+ rules.setTo(temp, u_strlen(temp));
+ UErrorCode status = U_ZERO_ERROR;
+ int count = 0;
+ RuleBasedCollator *collator = new RuleBasedCollator(rules,
+ getECollationStrength(IGNORABLE[count].strength),
+ UCOL_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening collator %s", u_errorName(status));
+ return;
+ }
+ UnicodeString pattern("pattern");
+ UnicodeString text("text");
+ StringSearch *strsrch = new StringSearch(pattern, text, collator, NULL,
+ status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ delete collator;
+ return;
+ }
+
+ while (IGNORABLE[count].text != NULL) {
+ u_unescape(IGNORABLE[count].text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(IGNORABLE[count].pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ strsrch->setPattern(pattern, status);
+ if (!assertEqualWithStringSearch(strsrch, &IGNORABLE[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ delete strsrch;
+ delete collator;
+}
+
+void StringSearchTest::TestDiactricMatch()
+{
+ UChar temp[128];
+ UErrorCode status = U_ZERO_ERROR;
+ int count = 0;
+ RuleBasedCollator* coll = NULL;
+ StringSearch *strsrch = NULL;
+
+ UnicodeString pattern("pattern");
+ UnicodeString text("text");
+
+ const SearchData *search;
+
+ search = &(DIACTRICMATCH[count]);
+ while (search->text != NULL) {
+ coll = getCollator(search->collator);
+ coll->setStrength(getECollationStrength(search->strength));
+ strsrch = new StringSearch(pattern, text, coll, getBreakIterator(search->breaker), status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ return;
+ }
+ u_unescape(search->text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search->pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ strsrch->setPattern(pattern, status);
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ errln("Error at test number %d", count);
+ }
+ search = &(DIACTRICMATCH[++count]);
+ delete strsrch;
+ }
+
+}
+
+void StringSearchTest::TestCanonical()
+{
+ int count = 0;
+ while (BASICCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(&BASICCANONICAL[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+void StringSearchTest::TestNormCanonical()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
+ int count = 0;
+ while (NORMCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(&NORMCANONICAL[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
+}
+
+void StringSearchTest::TestStrengthCanonical()
+{
+ int count = 0;
+ while (STRENGTHCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(&STRENGTHCANONICAL[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+void StringSearchTest::TestBreakIteratorCanonical()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int count = 0;
+
+ while (count < 4) {
+ // special purposes for tests numbers 0-3
+ UChar temp[128];
+ const SearchData *search = &(BREAKITERATORCANONICAL[count]);
+
+ u_unescape(search->text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search->pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+ RuleBasedCollator *collator = getCollator(search->collator);
+ collator->setStrength(getECollationStrength(search->strength));
+
+ BreakIterator *breaker = getBreakIterator(search->breaker);
+ StringSearch *strsrch = new StringSearch(pattern, text, collator,
+ breaker, status);
+ if (U_FAILURE(status)) {
+ errln("Error creating string search data");
+ return;
+ }
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status) ||
+ strsrch->getBreakIterator() != breaker) {
+ errln("Error setting break iterator");
+ delete strsrch;
+ return;
+ }
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ collator->setStrength(getECollationStrength(UCOL_TERTIARY));
+ delete strsrch;
+ return;
+ }
+ search = &(BREAKITERATOREXACT[count + 1]);
+ breaker = getBreakIterator(search->breaker);
+ if (breaker == NULL) {
+ errln("Error creating BreakIterator");
+ return;
+ }
+ breaker->setText(strsrch->getText());
+ strsrch->setBreakIterator(breaker, status);
+ if (U_FAILURE(status) || strsrch->getBreakIterator() != breaker) {
+ errln("Error setting break iterator");
+ delete strsrch;
+ return;
+ }
+ strsrch->reset();
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ errln("Error at test number %d", count);
+ return;
+ }
+ delete strsrch;
+ count += 2;
+ }
+ count = 0;
+ while (BREAKITERATORCANONICAL[count].text != NULL) {
+ if (!assertEqual(&BREAKITERATORCANONICAL[count])) {
+ errln("Error at test number %d", count);
+ return;
+ }
+ count ++;
+ }
+}
+
+#endif
+
+void StringSearchTest::TestVariableCanonical()
+{
+ int count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ m_en_us_->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting collation alternate attribute %s",
+ u_errorName(status));
+ }
+ while (VARIABLE[count].text != NULL) {
+ logln("variable %d", count);
+ if (!assertCanonicalEqual(&VARIABLE[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ m_en_us_->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE,
+ status);
+}
+
+void StringSearchTest::TestOverlapCanonical()
+{
+ int count = 0;
+ while (OVERLAPCANONICAL[count].text != NULL) {
+ if (!assertEqualWithAttribute(&OVERLAPCANONICAL[count], USEARCH_ON,
+ USEARCH_ON)) {
+ errln("Error at overlap test number %d", count);
+ }
+ count ++;
+ }
+ count = 0;
+ while (NONOVERLAP[count].text != NULL) {
+ if (!assertCanonicalEqual(&NONOVERLAPCANONICAL[count])) {
+ errln("Error at non overlap test number %d", count);
+ }
+ count ++;
+ }
+
+ count = 0;
+ while (count < 1) {
+ UChar temp[128];
+ const SearchData *search = &(OVERLAPCANONICAL[count]);
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_unescape(search->text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search->pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+ RuleBasedCollator *collator = getCollator(search->collator);
+ StringSearch *strsrch = new StringSearch(pattern, text, collator,
+ NULL, status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_ON) {
+ errln("Error setting overlap option");
+ }
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ delete strsrch;
+ return;
+ }
+ search = &(NONOVERLAPCANONICAL[count]);
+ strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status);
+ if (U_FAILURE(status) ||
+ strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) {
+ errln("Error setting overlap option");
+ }
+ strsrch->reset();
+ if (!assertEqualWithStringSearch(strsrch, search)) {
+ delete strsrch;
+ errln("Error at test number %d", count);
+ }
+
+ count ++;
+ delete strsrch;
+ }
+}
+
+void StringSearchTest::TestCollatorCanonical()
+{
+ /* test collator that thinks "o" and "p" are the same thing */
+ UChar temp[128];
+ u_unescape(COLLATORCANONICAL[0].text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(COLLATORCANONICAL[0].pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_,
+ NULL, status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &COLLATORCANONICAL[0])) {
+ delete strsrch;
+ return;
+ }
+
+ u_unescape(TESTCOLLATORRULE, temp, 128);
+ UnicodeString rules;
+ rules.setTo(temp, u_strlen(temp));
+ RuleBasedCollator *tailored = new RuleBasedCollator(rules,
+ getECollationStrength(COLLATORCANONICAL[1].strength),
+ UCOL_ON, status);
+
+ if (U_FAILURE(status)) {
+ errln("Error opening rule based collator %s", u_errorName(status));
+ }
+
+ strsrch->setCollator(tailored, status);
+ if (U_FAILURE(status) || *(strsrch->getCollator()) != *tailored) {
+ errln("Error setting rule based collator");
+ }
+ strsrch->reset();
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (!assertEqualWithStringSearch(strsrch, &COLLATORCANONICAL[1])) {
+ delete strsrch;
+ if (tailored != NULL) {
+ delete tailored;
+ }
+ }
+
+ strsrch->setCollator(m_en_us_, status);
+ strsrch->reset();
+ if (U_FAILURE(status) || *(strsrch->getCollator()) != *m_en_us_) {
+ errln("Error setting rule based collator");
+ }
+ if (!assertEqualWithStringSearch(strsrch, &COLLATORCANONICAL[0])) {
+ }
+ delete strsrch;
+ if (tailored != NULL) {
+ delete tailored;
+ }
+}
+
+void StringSearchTest::TestPatternCanonical()
+{
+
+ UChar temp[128];
+
+ u_unescape(PATTERNCANONICAL[0].text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(PATTERNCANONICAL[0].pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ m_en_us_->setStrength(
+ getECollationStrength(PATTERNCANONICAL[0].strength));
+
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ goto ENDTESTPATTERN;
+ }
+ if (pattern != strsrch->getPattern()) {
+ errln("Error setting pattern");
+ }
+ if (!assertEqualWithStringSearch(strsrch, &PATTERNCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(PATTERNCANONICAL[1].pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setPattern(pattern, status);
+ if (pattern != strsrch->getPattern()) {
+ errln("Error setting pattern");
+ goto ENDTESTPATTERN;
+ }
+ strsrch->reset();
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting pattern %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &PATTERNCANONICAL[1])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(PATTERNCANONICAL[0].pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setPattern(pattern, status);
+ if (pattern != strsrch->getPattern()) {
+ errln("Error setting pattern");
+ goto ENDTESTPATTERN;
+ }
+ strsrch->reset();
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error setting pattern %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &PATTERNCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+ENDTESTPATTERN:
+ m_en_us_->setStrength(getECollationStrength(UCOL_TERTIARY));
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+}
+
+void StringSearchTest::TestTextCanonical()
+{
+ UChar temp[128];
+ u_unescape(TEXTCANONICAL[0].text, temp, 128);
+ UnicodeString text;
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(TEXTCANONICAL[0].pattern, temp, 128);
+ UnicodeString pattern;
+ pattern.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ goto ENDTESTPATTERN;
+ }
+ if (text != strsrch->getText()) {
+ errln("Error setting text");
+ }
+ if (!assertEqualWithStringSearch(strsrch, &TEXTCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(TEXTCANONICAL[1].text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ if (text != strsrch->getText()) {
+ errln("Error setting text");
+ goto ENDTESTPATTERN;
+ }
+ if (U_FAILURE(status)) {
+ errln("Error setting text %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &TEXTCANONICAL[1])) {
+ goto ENDTESTPATTERN;
+ }
+
+ u_unescape(TEXTCANONICAL[0].text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ if (text != strsrch->getText()) {
+ errln("Error setting text");
+ goto ENDTESTPATTERN;
+ }
+ if (U_FAILURE(status)) {
+ errln("Error setting pattern %s", u_errorName(status));
+ }
+ if (!assertEqualWithStringSearch(strsrch, &TEXTCANONICAL[0])) {
+ goto ENDTESTPATTERN;
+ }
+ENDTESTPATTERN:
+ if (strsrch != NULL) {
+ delete strsrch;
+ }
+}
+
+void StringSearchTest::TestCompositeBoundariesCanonical()
+{
+ int count = 0;
+ while (COMPOSITEBOUNDARIESCANONICAL[count].text != NULL) {
+ logln("composite %d", count);
+ if (!assertCanonicalEqual(&COMPOSITEBOUNDARIESCANONICAL[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+void StringSearchTest::TestGetSetOffsetCanonical()
+{
+
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString text("text");
+ UnicodeString pattern("pattern");
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ /* testing out of bounds error */
+ strsrch->setOffset(-1, status);
+ if (U_SUCCESS(status)) {
+ errln("Error expecting set offset error");
+ }
+ strsrch->setOffset(128, status);
+ if (U_SUCCESS(status)) {
+ errln("Error expecting set offset error");
+ }
+ int index = 0;
+ UChar temp[128];
+ while (BASICCANONICAL[index].text != NULL) {
+ SearchData search = BASICCANONICAL[index ++];
+ if (BASICCANONICAL[index].text == NULL) {
+ /* skip the last one */
+ break;
+ }
+
+ u_unescape(search.text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(search.pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ strsrch->setText(text, status);
+
+ strsrch->setPattern(pattern, status);
+
+ int count = 0;
+ int32_t matchindex = search.offset[count];
+ while (U_SUCCESS(status) && matchindex >= 0) {
+ int32_t matchlength = search.size[count];
+ strsrch->next(status);
+ if (matchindex != strsrch->getMatchedStart() ||
+ matchlength != strsrch->getMatchedLength()) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error match found at %d %d",
+ strsrch->getMatchedStart(),
+ strsrch->getMatchedLength());
+ return;
+ }
+ matchindex = search.offset[count + 1] == -1 ? -1 :
+ search.offset[count + 2];
+ if (search.offset[count + 1] != -1) {
+ strsrch->setOffset(search.offset[count + 1] + 1, status);
+ if (strsrch->getOffset() != search.offset[count + 1] + 1) {
+ errln("Error setting offset");
+ return;
+ }
+ }
+
+ count += 2;
+ }
+ strsrch->next(status);
+ if (strsrch->getMatchedStart() != USEARCH_DONE) {
+ char *str = toCharString(strsrch->getText());
+ errln("Text: %s", str);
+ str = toCharString(strsrch->getPattern());
+ errln("Pattern: %s", str);
+ errln("Error match found at %d %d", strsrch->getMatchedStart(),
+ strsrch->getMatchedLength());
+ return;
+ }
+ }
+ delete strsrch;
+}
+
+void StringSearchTest::TestSupplementaryCanonical()
+{
+ int count = 0;
+ while (SUPPLEMENTARYCANONICAL[count].text != NULL) {
+ if (!assertCanonicalEqual(&SUPPLEMENTARYCANONICAL[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+}
+
+void StringSearchTest::TestContractionCanonical()
+{
+ UChar temp[128];
+
+ u_unescape(CONTRACTIONRULE, temp, 128);
+ UnicodeString rules;
+ rules.setTo(temp, u_strlen(temp));
+
+ UErrorCode status = U_ZERO_ERROR;
+ RuleBasedCollator *collator = new RuleBasedCollator(rules,
+ getECollationStrength(UCOL_TERTIARY), UCOL_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening collator %s", u_errorName(status));
+ }
+ UnicodeString text("text");
+ UnicodeString pattern("pattern");
+ StringSearch *strsrch = new StringSearch(pattern, text, collator, NULL,
+ status);
+ strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
+ if (U_FAILURE(status)) {
+ errln("Error opening string search %s", u_errorName(status));
+ }
+
+ int count = 0;
+ while (CONTRACTIONCANONICAL[count].text != NULL) {
+ u_unescape(CONTRACTIONCANONICAL[count].text, temp, 128);
+ text.setTo(temp, u_strlen(temp));
+ u_unescape(CONTRACTIONCANONICAL[count].pattern, temp, 128);
+ pattern.setTo(temp, u_strlen(temp));
+ strsrch->setText(text, status);
+ strsrch->setPattern(pattern, status);
+ if (!assertEqualWithStringSearch(strsrch,
+ &CONTRACTIONCANONICAL[count])) {
+ errln("Error at test number %d", count);
+ }
+ count ++;
+ }
+ delete strsrch;
+ delete collator;
+}
+
+void StringSearchTest::TestUClassID()
+{
+ char id = *((char *)StringSearch::getStaticClassID());
+ if (id != 0) {
+ errln("Static class id for StringSearch should be 0");
+ }
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString text("text");
+ UnicodeString pattern("pattern");
+ StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL,
+ status);
+ id = *((char *)strsrch->getDynamicClassID());
+ if (id != 0) {
+ errln("Dynamic class id for StringSearch should be 0");
+ }
+ delete strsrch;
+}
+
+class TestSearch : public SearchIterator
+{
+public:
+ TestSearch(const TestSearch &obj);
+ TestSearch(const UnicodeString &text,
+ BreakIterator *breakiter,
+ const UnicodeString &pattern);
+ ~TestSearch();
+
+ void setOffset(int32_t position, UErrorCode &status);
+ int32_t getOffset() const;
+ SearchIterator* safeClone() const;
+
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @draft ICU 2.2
+ */
+ virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @draft ICU 2.2
+ */
+ static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+
+ UBool operator!=(const TestSearch &that) const;
+
+ UnicodeString m_pattern_;
+
+protected:
+ int32_t handleNext(int32_t position, UErrorCode &status);
+ int32_t handlePrev(int32_t position, UErrorCode &status);
+ TestSearch & operator=(const TestSearch &that);
+
+private:
+
+ /**
+ * The address of this static class variable serves as this class's ID
+ * for ICU "poor man's RTTI".
+ */
+ static const char fgClassID;
+ uint32_t m_offset_;
+};
+
+const char TestSearch::fgClassID=0;
+
+TestSearch::TestSearch(const TestSearch &obj) : SearchIterator(obj)
+{
+ m_offset_ = obj.m_offset_;
+ m_pattern_ = obj.m_pattern_;
+}
+
+TestSearch::TestSearch(const UnicodeString &text,
+ BreakIterator *breakiter,
+ const UnicodeString &pattern) : SearchIterator()
+{
+ m_breakiterator_ = breakiter;
+ m_pattern_ = pattern;
+ m_text_ = text;
+ m_offset_ = 0;
+ m_pattern_ = pattern;
+}
+
+TestSearch::~TestSearch()
+{
+}
+
+
+void TestSearch::setOffset(int32_t position, UErrorCode &status)
+{
+ if (position >= 0 && position <= m_text_.length()) {
+ m_offset_ = position;
+ }
+ else {
+ status = U_INDEX_OUTOFBOUNDS_ERROR;
+ }
+}
+
+int32_t TestSearch::getOffset() const
+{
+ return m_offset_;
+}
+
+SearchIterator * TestSearch::safeClone() const
+{
+ return new TestSearch(m_text_, m_breakiterator_, m_pattern_);
+}
+
+UBool TestSearch::operator!=(const TestSearch &that) const
+{
+ if (SearchIterator::operator !=(that)) {
+ return FALSE;
+ }
+ return m_offset_ != that.m_offset_ || m_pattern_ != that.m_pattern_;
+}
+
+int32_t TestSearch::handleNext(int32_t start, UErrorCode &status)
+{
+ if(U_SUCCESS(status)) {
+ int match = m_text_.indexOf(m_pattern_, start);
+ if (match < 0) {
+ m_offset_ = m_text_.length();
+ setMatchStart(m_offset_);
+ setMatchLength(0);
+ return USEARCH_DONE;
+ }
+ setMatchStart(match);
+ m_offset_ = match;
+ setMatchLength(m_pattern_.length());
+ return match;
+ } else {
+ return USEARCH_DONE;
+ }
+}
+
+int32_t TestSearch::handlePrev(int32_t start, UErrorCode &status)
+{
+ if(U_SUCCESS(status)) {
+ int match = m_text_.lastIndexOf(m_pattern_, 0, start);
+ if (match < 0) {
+ m_offset_ = 0;
+ setMatchStart(m_offset_);
+ setMatchLength(0);
+ return USEARCH_DONE;
+ }
+ setMatchStart(match);
+ m_offset_ = match;
+ setMatchLength(m_pattern_.length());
+ return match;
+ } else {
+ return USEARCH_DONE;
+ }
+}
+
+TestSearch & TestSearch::operator=(const TestSearch &that)
+{
+ SearchIterator::operator=(that);
+ m_offset_ = that.m_offset_;
+ m_pattern_ = that.m_pattern_;
+ return *this;
+}
+
+void StringSearchTest::TestSubclass()
+{
+ UnicodeString text("abc abcd abc");
+ UnicodeString pattern("abc");
+ TestSearch search(text, NULL, pattern);
+ TestSearch search2(search);
+ int expected[] = {0, 4, 9};
+ UErrorCode status = U_ZERO_ERROR;
+ int i;
+ StringCharacterIterator chariter(text);
+
+ search.setText(text, status);
+ if (search.getText() != search2.getText()) {
+ errln("Error setting text");
+ }
+
+ search.setText(chariter, status);
+ if (search.getText() != search2.getText()) {
+ errln("Error setting text");
+ }
+
+ search.reset();
+ // comparing constructors
+
+ for (i = 0; i < (int)(sizeof(expected) / sizeof(expected[0])); i ++) {
+ if (search.next(status) != expected[i]) {
+ errln("Error getting next match");
+ }
+ if (search.getMatchedLength() != search.m_pattern_.length()) {
+ errln("Error getting next match length");
+ }
+ }
+ if (search.next(status) != USEARCH_DONE) {
+ errln("Error should have reached the end of the iteration");
+ }
+ for (i = sizeof(expected) / sizeof(expected[0]) - 1; i >= 0; i --) {
+ if (search.previous(status) != expected[i]) {
+ errln("Error getting previous match");
+ }
+ if (search.getMatchedLength() != search.m_pattern_.length()) {
+ errln("Error getting previous match length");
+ }
+ }
+ if (search.previous(status) != USEARCH_DONE) {
+ errln("Error should have reached the start of the iteration");
+ }
+}
+
+class StubSearchIterator:public SearchIterator{
+public:
+ StubSearchIterator(){}
+ virtual void setOffset(int32_t , UErrorCode &) {};
+ virtual int32_t getOffset(void) const {return 0;};
+ virtual SearchIterator* safeClone(void) const {return NULL;};
+ virtual int32_t handleNext(int32_t , UErrorCode &){return 0;};
+ virtual int32_t handlePrev(int32_t , UErrorCode &) {return 0;};
+ virtual UClassID getDynamicClassID() const {
+ static char classID = 0;
+ return (UClassID)&classID;
+ }
+};
+
+void StringSearchTest::TestCoverage(){
+ StubSearchIterator stub1, stub2;
+ UErrorCode status = U_ZERO_ERROR;
+
+ if (stub1 != stub2){
+ errln("new StubSearchIterator should be equal");
+ }
+
+ stub2.setText(UnicodeString("ABC"), status);
+ if (U_FAILURE(status)) {
+ errln("Error: SearchIterator::SetText");
+ }
+
+ stub1 = stub2;
+ if (stub1 != stub2){
+ errln("SearchIterator::operator = assigned object should be equal");
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/srchtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/srchtest.h
new file mode 100644
index 00000000000..e27ec620bb0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/srchtest.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001-2005, International Business Machines Corporation and others
+ * All Rights Reserved.
+ ***************************************************************************/
+
+#ifndef _STRSRCH_H
+#define _STRSRCH_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/tblcoll.h"
+#include "unicode/brkiter.h"
+#include "intltest.h"
+#include "unicode/usearch.h"
+
+struct SearchData;
+typedef struct SearchData SearchData;
+
+class StringSearchTest: public IntlTest
+{
+public:
+ StringSearchTest();
+ virtual ~StringSearchTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char* &name,
+ char* par = NULL);
+
+private:
+ RuleBasedCollator *m_en_us_;
+ RuleBasedCollator *m_fr_fr_;
+ RuleBasedCollator *m_de_;
+ RuleBasedCollator *m_es_;
+ BreakIterator *m_en_wordbreaker_;
+ BreakIterator *m_en_characterbreaker_;
+
+ RuleBasedCollator * getCollator(const char *collator);
+ BreakIterator * getBreakIterator(const char *breaker);
+ char * toCharString(const UnicodeString &text);
+ Collator::ECollationStrength getECollationStrength(
+ const UCollationStrength &strength) const;
+ UBool assertEqualWithStringSearch( StringSearch *strsrch,
+ const SearchData *search);
+ UBool assertEqual(const SearchData *search);
+ UBool assertCanonicalEqual(const SearchData *search);
+ UBool assertEqualWithAttribute(const SearchData *search,
+ USearchAttributeValue canonical,
+ USearchAttributeValue overlap);
+ void TestOpenClose();
+ void TestInitialization();
+ void TestBasic();
+ void TestNormExact();
+ void TestStrength();
+#if !UCONFIG_NO_BREAK_ITERATION
+ void TestBreakIterator();
+#endif
+ void TestVariable();
+ void TestOverlap();
+ void TestCollator();
+ void TestPattern();
+ void TestText();
+ void TestCompositeBoundaries();
+ void TestGetSetOffset();
+ void TestGetSetAttribute();
+ void TestGetMatch();
+ void TestSetMatch();
+ void TestReset();
+ void TestSupplementary();
+ void TestContraction();
+ void TestIgnorable();
+ void TestCanonical();
+ void TestNormCanonical();
+ void TestStrengthCanonical();
+#if !UCONFIG_NO_BREAK_ITERATION
+ void TestBreakIteratorCanonical();
+#endif
+ void TestVariableCanonical();
+ void TestOverlapCanonical();
+ void TestCollatorCanonical();
+ void TestPatternCanonical();
+ void TestTextCanonical();
+ void TestCompositeBoundariesCanonical();
+ void TestGetSetOffsetCanonical();
+ void TestSupplementaryCanonical();
+ void TestContractionCanonical();
+ void TestUClassID();
+ void TestSubclass();
+ void TestCoverage();
+ void TestDiactricMatch();
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/strcase.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/strcase.cpp
new file mode 100644
index 00000000000..0645f1269ce
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/strcase.cpp
@@ -0,0 +1,542 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 2002-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: strcase.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2002mar12
+* created by: Markus W. Scherer
+*
+* Test file for string casing C++ API functions.
+*/
+
+#include "unicode/uchar.h"
+#include "unicode/ures.h"
+#include "unicode/uloc.h"
+#include "unicode/locid.h"
+#include "unicode/ubrk.h"
+#include "unicode/unistr.h"
+#include "unicode/ucasemap.h"
+#include "ustrtest.h"
+#include "unicode/tstdtmod.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+StringCaseTest::~StringCaseTest() {}
+
+void
+StringCaseTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) {
+ if (exec) logln("TestSuite StringCaseTest: ");
+ switch (index) {
+ case 0: name = "TestCaseConversion"; if (exec) TestCaseConversion(); break;
+ case 1:
+ name = "TestCasing";
+#if !UCONFIG_NO_BREAK_ITERATION
+ if(exec) TestCasing();
+#endif
+ break;
+
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+void
+StringCaseTest::TestCaseConversion()
+{
+ static const UChar uppercaseGreek[] =
+ { 0x399, 0x395, 0x3a3, 0x3a5, 0x3a3, 0x20, 0x03a7, 0x3a1, 0x399, 0x3a3, 0x3a4,
+ 0x39f, 0x3a3, 0 };
+ // "IESUS CHRISTOS"
+
+ static const UChar lowercaseGreek[] =
+ { 0x3b9, 0x3b5, 0x3c3, 0x3c5, 0x3c2, 0x20, 0x03c7, 0x3c1, 0x3b9, 0x3c3, 0x3c4,
+ 0x3bf, 0x3c2, 0 };
+ // "iesus christos"
+
+ static const UChar lowercaseTurkish[] =
+ { 0x69, 0x73, 0x74, 0x61, 0x6e, 0x62, 0x75, 0x6c, 0x2c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x0131, 0x6e, 0x6f, 0x70, 0x6c, 0x65, 0x21, 0 };
+
+ static const UChar uppercaseTurkish[] =
+ { 0x54, 0x4f, 0x50, 0x4b, 0x41, 0x50, 0x49, 0x20, 0x50, 0x41, 0x4c, 0x41, 0x43, 0x45, 0x2c, 0x20,
+ 0x0130, 0x53, 0x54, 0x41, 0x4e, 0x42, 0x55, 0x4c, 0 };
+
+ UnicodeString expectedResult;
+ UnicodeString test3;
+
+ test3 += (UChar32)0x0130;
+ test3 += "STANBUL, NOT CONSTANTINOPLE!";
+
+ UnicodeString test4(test3);
+ test4.toLower(Locale(""));
+ expectedResult = UnicodeString("i\\u0307stanbul, not constantinople!", "").unescape();
+ if (test4 != expectedResult)
+ errln("1. toLower failed: expected \"" + expectedResult + "\", got \"" + test4 + "\".");
+
+ test4 = test3;
+ test4.toLower(Locale("tr", "TR"));
+ expectedResult = lowercaseTurkish;
+ if (test4 != expectedResult)
+ errln("2. toLower failed: expected \"" + expectedResult + "\", got \"" + test4 + "\".");
+
+ test3 = "topkap";
+ test3 += (UChar32)0x0131;
+ test3 += " palace, istanbul";
+ test4 = test3;
+
+ test4.toUpper(Locale(""));
+ expectedResult = "TOPKAPI PALACE, ISTANBUL";
+ if (test4 != expectedResult)
+ errln("toUpper failed: expected \"" + expectedResult + "\", got \"" + test4 + "\".");
+
+ test4 = test3;
+ test4.toUpper(Locale("tr", "TR"));
+ expectedResult = uppercaseTurkish;
+ if (test4 != expectedResult)
+ errln("toUpper failed: expected \"" + expectedResult + "\", got \"" + test4 + "\".");
+
+ test3 = CharsToUnicodeString("S\\u00FC\\u00DFmayrstra\\u00DFe");
+
+ test3.toUpper(Locale("de", "DE"));
+ expectedResult = CharsToUnicodeString("S\\u00DCSSMAYRSTRASSE");
+ if (test3 != expectedResult)
+ errln("toUpper failed: expected \"" + expectedResult + "\", got \"" + test3 + "\".");
+
+ test4.replace(0, test4.length(), uppercaseGreek);
+
+ test4.toLower(Locale("el", "GR"));
+ expectedResult = lowercaseGreek;
+ if (test4 != expectedResult)
+ errln("toLower failed: expected \"" + expectedResult + "\", got \"" + test4 + "\".");
+
+ test4.replace(0, test4.length(), lowercaseGreek);
+
+ test4.toUpper();
+ expectedResult = uppercaseGreek;
+ if (test4 != expectedResult)
+ errln("toUpper failed: expected \"" + expectedResult + "\", got \"" + test4 + "\".");
+
+ // more string case mapping tests with the new implementation
+ {
+ static const UChar
+
+ beforeLower[]= { 0x61, 0x42, 0x49, 0x3a3, 0xdf, 0x3a3, 0x2f, 0xd93f, 0xdfff },
+ lowerRoot[]= { 0x61, 0x62, 0x69, 0x3c3, 0xdf, 0x3c2, 0x2f, 0xd93f, 0xdfff },
+ lowerTurkish[]={ 0x61, 0x62, 0x131, 0x3c3, 0xdf, 0x3c2, 0x2f, 0xd93f, 0xdfff },
+
+ beforeUpper[]= { 0x61, 0x42, 0x69, 0x3c2, 0xdf, 0x3c3, 0x2f, 0xfb03, 0xfb03, 0xfb03, 0xd93f, 0xdfff },
+ upperRoot[]= { 0x41, 0x42, 0x49, 0x3a3, 0x53, 0x53, 0x3a3, 0x2f, 0x46, 0x46, 0x49, 0x46, 0x46, 0x49, 0x46, 0x46, 0x49, 0xd93f, 0xdfff },
+ upperTurkish[]={ 0x41, 0x42, 0x130, 0x3a3, 0x53, 0x53, 0x3a3, 0x2f, 0x46, 0x46, 0x49, 0x46, 0x46, 0x49, 0x46, 0x46, 0x49, 0xd93f, 0xdfff },
+
+ beforeMiniUpper[]= { 0xdf, 0x61 },
+ miniUpper[]= { 0x53, 0x53, 0x41 };
+
+ UnicodeString s;
+
+ /* lowercase with root locale */
+ s=UnicodeString(FALSE, beforeLower, (int32_t)(sizeof(beforeLower)/U_SIZEOF_UCHAR));
+ s.toLower("");
+ if( s.length()!=(sizeof(lowerRoot)/U_SIZEOF_UCHAR) ||
+ s!=UnicodeString(FALSE, lowerRoot, s.length())
+ ) {
+ errln("error in toLower(root locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, lowerRoot, (int32_t)(sizeof(lowerRoot)/U_SIZEOF_UCHAR)) + "\"");
+ }
+
+ /* lowercase with turkish locale */
+ s=UnicodeString(FALSE, beforeLower, (int32_t)(sizeof(beforeLower)/U_SIZEOF_UCHAR));
+ s.setCharAt(0, beforeLower[0]).toLower(Locale("tr"));
+ if( s.length()!=(sizeof(lowerTurkish)/U_SIZEOF_UCHAR) ||
+ s!=UnicodeString(FALSE, lowerTurkish, s.length())
+ ) {
+ errln("error in toLower(turkish locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, lowerTurkish, (int32_t)(sizeof(lowerTurkish)/U_SIZEOF_UCHAR)) + "\"");
+ }
+
+ /* uppercase with root locale */
+ s=UnicodeString(FALSE, beforeUpper, (int32_t)(sizeof(beforeUpper)/U_SIZEOF_UCHAR));
+ s.setCharAt(0, beforeUpper[0]).toUpper(Locale(""));
+ if( s.length()!=(sizeof(upperRoot)/U_SIZEOF_UCHAR) ||
+ s!=UnicodeString(FALSE, upperRoot, s.length())
+ ) {
+ errln("error in toUpper(root locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, upperRoot, (int32_t)(sizeof(upperRoot)/U_SIZEOF_UCHAR)) + "\"");
+ }
+
+ /* uppercase with turkish locale */
+ s=UnicodeString(FALSE, beforeUpper, (int32_t)(sizeof(beforeUpper)/U_SIZEOF_UCHAR));
+ s.toUpper(Locale("tr"));
+ if( s.length()!=(sizeof(upperTurkish)/U_SIZEOF_UCHAR) ||
+ s!=UnicodeString(FALSE, upperTurkish, s.length())
+ ) {
+ errln("error in toUpper(turkish locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, upperTurkish, (int32_t)(sizeof(upperTurkish)/U_SIZEOF_UCHAR)) + "\"");
+ }
+
+ /* uppercase a short string with root locale */
+ s=UnicodeString(FALSE, beforeMiniUpper, (int32_t)(sizeof(beforeMiniUpper)/U_SIZEOF_UCHAR));
+ s.setCharAt(0, beforeMiniUpper[0]).toUpper("");
+ if( s.length()!=(sizeof(miniUpper)/U_SIZEOF_UCHAR) ||
+ s!=UnicodeString(FALSE, miniUpper, s.length())
+ ) {
+ errln("error in toUpper(root locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, miniUpper, (int32_t)(sizeof(miniUpper)/U_SIZEOF_UCHAR)) + "\"");
+ }
+ }
+
+ // test some supplementary characters (>= Unicode 3.1)
+ {
+ UnicodeString t;
+
+ UnicodeString
+ deseretInput=UnicodeString("\\U0001043C\\U00010414", "").unescape(),
+ deseretLower=UnicodeString("\\U0001043C\\U0001043C", "").unescape(),
+ deseretUpper=UnicodeString("\\U00010414\\U00010414", "").unescape();
+ (t=deseretInput).toLower();
+ if(t!=deseretLower) {
+ errln("error lowercasing Deseret (plane 1) characters");
+ }
+ (t=deseretInput).toUpper();
+ if(t!=deseretUpper) {
+ errln("error uppercasing Deseret (plane 1) characters");
+ }
+ }
+
+ // test some more cases that looked like problems
+ {
+ UnicodeString t;
+
+ UnicodeString
+ ljInput=UnicodeString("ab'cD \\uFB00i\\u0131I\\u0130 \\u01C7\\u01C8\\u01C9 \\U0001043C\\U00010414", "").unescape(),
+ ljLower=UnicodeString("ab'cd \\uFB00i\\u0131ii\\u0307 \\u01C9\\u01C9\\u01C9 \\U0001043C\\U0001043C", "").unescape(),
+ ljUpper=UnicodeString("AB'CD FFIII\\u0130 \\u01C7\\u01C7\\u01C7 \\U00010414\\U00010414", "").unescape();
+ (t=ljInput).toLower("en");
+ if(t!=ljLower) {
+ errln("error lowercasing LJ characters");
+ }
+ (t=ljInput).toUpper("en");
+ if(t!=ljUpper) {
+ errln("error uppercasing LJ characters");
+ }
+ }
+
+#if !UCONFIG_NO_NORMALIZATION
+ // some context-sensitive casing depends on normalization data being present
+
+ // Unicode 3.1.1 SpecialCasing tests
+ {
+ UnicodeString t;
+
+ // sigmas preceded and/or followed by cased letters
+ UnicodeString
+ sigmas=UnicodeString("i\\u0307\\u03a3\\u0308j \\u0307\\u03a3\\u0308j i\\u00ad\\u03a3\\u0308 \\u0307\\u03a3\\u0308 ", "").unescape(),
+ sigmasLower=UnicodeString("i\\u0307\\u03c3\\u0308j \\u0307\\u03c3\\u0308j i\\u00ad\\u03c2\\u0308 \\u0307\\u03c3\\u0308 ", "").unescape(),
+ sigmasUpper=UnicodeString("I\\u0307\\u03a3\\u0308J \\u0307\\u03a3\\u0308J I\\u00ad\\u03a3\\u0308 \\u0307\\u03a3\\u0308 ", "").unescape();
+
+ (t=sigmas).toLower();
+ if(t!=sigmasLower) {
+ errln("error in sigmas.toLower()=\"" + t + "\" expected \"" + sigmasLower + "\"");
+ }
+
+ (t=sigmas).toUpper(Locale(""));
+ if(t!=sigmasUpper) {
+ errln("error in sigmas.toUpper()=\"" + t + "\" expected \"" + sigmasUpper + "\"");
+ }
+
+ // turkish & azerbaijani dotless i & dotted I
+ // remove dot above if there was a capital I before and there are no more accents above
+ UnicodeString
+ dots=UnicodeString("I \\u0130 I\\u0307 I\\u0327\\u0307 I\\u0301\\u0307 I\\u0327\\u0307\\u0301", "").unescape(),
+ dotsTurkish=UnicodeString("\\u0131 i i i\\u0327 \\u0131\\u0301\\u0307 i\\u0327\\u0301", "").unescape(),
+ dotsDefault=UnicodeString("i i\\u0307 i\\u0307 i\\u0327\\u0307 i\\u0301\\u0307 i\\u0327\\u0307\\u0301", "").unescape();
+
+ (t=dots).toLower("tr");
+ if(t!=dotsTurkish) {
+ errln("error in dots.toLower(tr)=\"" + t + "\" expected \"" + dotsTurkish + "\"");
+ }
+
+ (t=dots).toLower("de");
+ if(t!=dotsDefault) {
+ errln("error in dots.toLower(de)=\"" + t + "\" expected \"" + dotsDefault + "\"");
+ }
+ }
+
+ // more Unicode 3.1.1 tests
+ {
+ UnicodeString t;
+
+ // lithuanian dot above in uppercasing
+ UnicodeString
+ dots=UnicodeString("a\\u0307 \\u0307 i\\u0307 j\\u0327\\u0307 j\\u0301\\u0307", "").unescape(),
+ dotsLithuanian=UnicodeString("A\\u0307 \\u0307 I J\\u0327 J\\u0301\\u0307", "").unescape(),
+ dotsDefault=UnicodeString("A\\u0307 \\u0307 I\\u0307 J\\u0327\\u0307 J\\u0301\\u0307", "").unescape();
+
+ (t=dots).toUpper("lt");
+ if(t!=dotsLithuanian) {
+ errln("error in dots.toUpper(lt)=\"" + t + "\" expected \"" + dotsLithuanian + "\"");
+ }
+
+ (t=dots).toUpper("de");
+ if(t!=dotsDefault) {
+ errln("error in dots.toUpper(de)=\"" + t + "\" expected \"" + dotsDefault + "\"");
+ }
+
+ // lithuanian adds dot above to i in lowercasing if there are more above accents
+ UnicodeString
+ i=UnicodeString("I I\\u0301 J J\\u0301 \\u012e \\u012e\\u0301 \\u00cc\\u00cd\\u0128", "").unescape(),
+ iLithuanian=UnicodeString("i i\\u0307\\u0301 j j\\u0307\\u0301 \\u012f \\u012f\\u0307\\u0301 i\\u0307\\u0300i\\u0307\\u0301i\\u0307\\u0303", "").unescape(),
+ iDefault=UnicodeString("i i\\u0301 j j\\u0301 \\u012f \\u012f\\u0301 \\u00ec\\u00ed\\u0129", "").unescape();
+
+ (t=i).toLower("lt");
+ if(t!=iLithuanian) {
+ errln("error in i.toLower(lt)=\"" + t + "\" expected \"" + iLithuanian + "\"");
+ }
+
+ (t=i).toLower("de");
+ if(t!=iDefault) {
+ errln("error in i.toLower(de)=\"" + t + "\" expected \"" + iDefault + "\"");
+ }
+ }
+
+#endif
+
+ // test case folding
+ {
+ UnicodeString
+ s=UnicodeString("A\\u00df\\u00b5\\ufb03\\U0001040c\\u0130\\u0131", "").unescape(),
+ f=UnicodeString("ass\\u03bcffi\\U00010434i\\u0307\\u0131", "").unescape(),
+ g=UnicodeString("ass\\u03bcffi\\U00010434i\\u0131", "").unescape(),
+ t;
+
+ (t=s).foldCase();
+ if(f!=t) {
+ errln("error in foldCase(\"" + s + "\", default)=\"" + t + "\" but expected \"" + f + "\"");
+ }
+
+ // alternate handling for dotted I/dotless i (U+0130, U+0131)
+ (t=s).foldCase(U_FOLD_CASE_EXCLUDE_SPECIAL_I);
+ if(g!=t) {
+ errln("error in foldCase(\"" + s + "\", U_FOLD_CASE_EXCLUDE_SPECIAL_I)=\"" + t + "\" but expected \"" + g + "\"");
+ }
+ }
+}
+
+// data-driven case mapping tests ------------------------------------------ ***
+
+enum {
+ TEST_LOWER,
+ TEST_UPPER,
+ TEST_TITLE,
+ TEST_FOLD,
+ TEST_COUNT
+};
+
+// names of TestData children in casing.txt
+static const char *const dataNames[TEST_COUNT+1]={
+ "lowercasing",
+ "uppercasing",
+ "titlecasing",
+ "casefolding",
+ ""
+};
+
+void
+StringCaseTest::TestCasingImpl(const UnicodeString &input,
+ const UnicodeString &output,
+ int32_t whichCase,
+ void *iter, const char *localeID, uint32_t options) {
+ // UnicodeString
+ UnicodeString result;
+ const char *name;
+ Locale locale(localeID);
+
+ result=input;
+ switch(whichCase) {
+ case TEST_LOWER:
+ name="toLower";
+ result.toLower(locale);
+ break;
+ case TEST_UPPER:
+ name="toUpper";
+ result.toUpper(locale);
+ break;
+#if !UCONFIG_NO_BREAK_ITERATION
+ case TEST_TITLE:
+ name="toTitle";
+ result.toTitle((BreakIterator *)iter, locale, options);
+ break;
+#endif
+ case TEST_FOLD:
+ name="foldCase";
+ result.foldCase(options);
+ break;
+ default:
+ name="";
+ break; // won't happen
+ }
+ if(result!=output) {
+ errln("error: UnicodeString.%s() got a wrong result for a test case from casing.res", name);
+ }
+#if !UCONFIG_NO_BREAK_ITERATION
+ if(whichCase==TEST_TITLE && options==0) {
+ result=input;
+ result.toTitle((BreakIterator *)iter, locale);
+ if(result!=output) {
+ errln("error: UnicodeString.toTitle(options=0) got a wrong result for a test case from casing.res");
+ }
+ }
+#endif
+
+ // UTF-8
+ char utf8In[100], utf8Out[100];
+ int32_t utf8InLength, utf8OutLength, resultLength;
+ UChar *buffer;
+
+ UCaseMap *csm;
+ UErrorCode errorCode;
+
+ errorCode=U_ZERO_ERROR;
+ csm=ucasemap_open(localeID, options, &errorCode);
+#if !UCONFIG_NO_BREAK_ITERATION
+ if(iter!=NULL) {
+ // Clone the break iterator so that the UCaseMap can safely adopt it.
+ int32_t size=1; // Not 0 because that only gives preflighting.
+ UBreakIterator *clone=ubrk_safeClone((UBreakIterator *)iter, NULL, &size, &errorCode);
+ ucasemap_setBreakIterator(csm, clone, &errorCode);
+ }
+#endif
+
+ u_strToUTF8(utf8In, (int32_t)sizeof(utf8In), &utf8InLength, input.getBuffer(), input.length(), &errorCode);
+ switch(whichCase) {
+ case TEST_LOWER:
+ name="ucasemap_utf8ToLower";
+ utf8OutLength=ucasemap_utf8ToLower(csm,
+ utf8Out, (int32_t)sizeof(utf8Out),
+ utf8In, utf8InLength, &errorCode);
+ break;
+ case TEST_UPPER:
+ name="ucasemap_utf8ToUpper";
+ utf8OutLength=ucasemap_utf8ToUpper(csm,
+ utf8Out, (int32_t)sizeof(utf8Out),
+ utf8In, utf8InLength, &errorCode);
+ break;
+#if !UCONFIG_NO_BREAK_ITERATION
+ case TEST_TITLE:
+ name="ucasemap_utf8ToTitle";
+ utf8OutLength=ucasemap_utf8ToTitle(csm,
+ utf8Out, (int32_t)sizeof(utf8Out),
+ utf8In, utf8InLength, &errorCode);
+ break;
+#endif
+ case TEST_FOLD:
+ name="ucasemap_utf8FoldCase";
+ utf8OutLength=ucasemap_utf8FoldCase(csm,
+ utf8Out, (int32_t)sizeof(utf8Out),
+ utf8In, utf8InLength, &errorCode);
+ break;
+ default:
+ name="";
+ utf8OutLength=0;
+ break; // won't happen
+ }
+ buffer=result.getBuffer(utf8OutLength);
+ u_strFromUTF8(buffer, result.getCapacity(), &resultLength, utf8Out, utf8OutLength, &errorCode);
+ result.releaseBuffer(U_SUCCESS(errorCode) ? resultLength : 0);
+
+ if(U_FAILURE(errorCode)) {
+ errln("error: %s() got an error for a test case from casing.res - %s", name, u_errorName(errorCode));
+ } else if(result!=output) {
+ errln("error: %s() got a wrong result for a test case from casing.res", name);
+ }
+ ucasemap_close(csm);
+}
+
+void
+StringCaseTest::TestCasing() {
+ UErrorCode status = U_ZERO_ERROR;
+ void *iter;
+ char cLocaleID[100];
+ UnicodeString locale, input, output, optionsString, result;
+ uint32_t options;
+ int32_t whichCase, type;
+ TestDataModule *driver = TestDataModule::getTestDataModule("casing", *this, status);
+ if(U_SUCCESS(status)) {
+ for(whichCase=0; whichCase<TEST_COUNT; ++whichCase) {
+#if UCONFIG_NO_BREAK_ITERATION
+ if(whichCase==TEST_TITLE) {
+ continue;
+ }
+#endif
+ TestData *casingTest = driver->createTestData(dataNames[whichCase], status);
+ if(U_FAILURE(status)) {
+ errln("TestCasing failed to createTestData(%s) - %s", dataNames[whichCase], u_errorName(status));
+ break;
+ }
+ const DataMap *myCase = NULL;
+ while(casingTest->nextCase(myCase, status)) {
+ input = myCase->getString("Input", status);
+ output = myCase->getString("Output", status);
+
+ if(whichCase!=TEST_FOLD) {
+ locale = myCase->getString("Locale", status);
+ }
+ locale.extract(0, 0x7fffffff, cLocaleID, sizeof(cLocaleID), "");
+
+ iter=NULL;
+#if !UCONFIG_NO_BREAK_ITERATION
+ if(whichCase==TEST_TITLE) {
+ type = myCase->getInt("Type", status);
+ if(type>=0) {
+ iter=ubrk_open((UBreakIteratorType)type, cLocaleID, NULL, 0, &status);
+ } else if(type==-2) {
+ // Open a trivial break iterator that only delivers { 0, length }
+ // or even just { 0 } as boundaries.
+ static const UChar rules[] = { 0x2e, 0x2a, 0x3b }; // ".*;"
+ UParseError parseError;
+ iter=ubrk_openRules(rules, LENGTHOF(rules), NULL, 0, &parseError, &status);
+ }
+ }
+#endif
+ options = 0;
+ if(whichCase==TEST_TITLE || whichCase==TEST_FOLD) {
+ optionsString = myCase->getString("Options", status);
+ if(optionsString.indexOf((UChar)0x54)>=0) { // T
+ options|=U_FOLD_CASE_EXCLUDE_SPECIAL_I;
+ }
+ if(optionsString.indexOf((UChar)0x4c)>=0) { // L
+ options|=U_TITLECASE_NO_LOWERCASE;
+ }
+ if(optionsString.indexOf((UChar)0x41)>=0) { // A
+ options|=U_TITLECASE_NO_BREAK_ADJUSTMENT;
+ }
+ }
+
+ if(U_FAILURE(status)) {
+ errln("error: TestCasing() setup failed for %s test case from casing.res: %s", dataNames[whichCase], u_errorName(status));
+ status = U_ZERO_ERROR;
+ } else {
+ TestCasingImpl(input, output, whichCase, iter, cLocaleID, options);
+ }
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ if(iter!=NULL) {
+ ubrk_close(iter);
+ }
+#endif
+ }
+ delete casingTest;
+ }
+ }
+ delete driver;
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ // more tests for API coverage
+ status=U_ZERO_ERROR;
+ input=UNICODE_STRING_SIMPLE("sTrA\\u00dfE").unescape();
+ (result=input).toTitle(NULL);
+ if(result!=UNICODE_STRING_SIMPLE("Stra\\u00dfe").unescape()) {
+ errln("UnicodeString::toTitle(NULL) failed");
+ }
+#endif
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/strtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/strtest.cpp
new file mode 100644
index 00000000000..97620c921ff
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/strtest.cpp
@@ -0,0 +1,192 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/* file name: strtest.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 1999nov22
+* created by: Markus W. Scherer
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/putil.h"
+#include "intltest.h"
+#include "strtest.h"
+#include "unicode/ustring.h"
+
+#if defined(U_WINDOWS) && defined(_MSC_VER)
+#include <vector>
+using namespace std;
+#endif
+
+StringTest::~StringTest() {}
+
+void StringTest::TestEndian(void) {
+ union {
+ uint8_t byte;
+ uint16_t word;
+ } u;
+ u.word=0x0100;
+ if(U_IS_BIG_ENDIAN!=u.byte) {
+ errln("TestEndian: U_IS_BIG_ENDIAN needs to be fixed in platform.h");
+ }
+}
+
+void StringTest::TestSizeofTypes(void) {
+ if(U_SIZEOF_WCHAR_T!=sizeof(wchar_t)) {
+ errln("TestSizeofWCharT: U_SIZEOF_WCHAR_T!=sizeof(wchar_t) - U_SIZEOF_WCHAR_T needs to be fixed in platform.h");
+ }
+#ifdef U_INT64_T_UNAVAILABLE
+ errln("int64_t and uint64_t are undefined.");
+#else
+ if(8!=sizeof(int64_t)) {
+ errln("TestSizeofTypes: 8!=sizeof(int64_t) - int64_t needs to be fixed in platform.h");
+ }
+ if(8!=sizeof(uint64_t)) {
+ errln("TestSizeofTypes: 8!=sizeof(uint64_t) - uint64_t needs to be fixed in platform.h");
+ }
+#endif
+ if(8!=sizeof(double)) {
+ errln("8!=sizeof(double) - putil.c code may not work");
+ }
+ if(4!=sizeof(int32_t)) {
+ errln("4!=sizeof(int32_t)");
+ }
+ if(4!=sizeof(uint32_t)) {
+ errln("4!=sizeof(uint32_t)");
+ }
+ if(2!=sizeof(int16_t)) {
+ errln("2!=sizeof(int16_t)");
+ }
+ if(2!=sizeof(uint16_t)) {
+ errln("2!=sizeof(uint16_t)");
+ }
+ if(2!=sizeof(UChar)) {
+ errln("2!=sizeof(UChar)");
+ }
+ if(1!=sizeof(int8_t)) {
+ errln("1!=sizeof(int8_t)");
+ }
+ if(1!=sizeof(uint8_t)) {
+ errln("1!=sizeof(uint8_t)");
+ }
+ if(1!=sizeof(UBool)) {
+ errln("1!=sizeof(UBool)");
+ }
+}
+
+void StringTest::TestCharsetFamily(void) {
+ unsigned char c='A';
+ if( U_CHARSET_FAMILY==U_ASCII_FAMILY && c!=0x41 ||
+ U_CHARSET_FAMILY==U_EBCDIC_FAMILY && c!=0xc1
+ ) {
+ errln("TestCharsetFamily: U_CHARSET_FAMILY needs to be fixed in platform.h");
+ }
+}
+
+U_STRING_DECL(ustringVar, "aZ0 -", 5);
+
+void StringTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) {
+ if(exec) {
+ logln("TestSuite Character and String Test: ");
+ }
+ switch(index) {
+ case 0:
+ name="TestEndian";
+ if(exec) {
+ TestEndian();
+ }
+ break;
+ case 1:
+ name="TestSizeofTypes";
+ if(exec) {
+ TestSizeofTypes();
+ }
+ break;
+ case 2:
+ name="TestCharsetFamily";
+ if(exec) {
+ TestCharsetFamily();
+ }
+ break;
+ case 3:
+ name="Test_U_STRING";
+ if(exec) {
+ U_STRING_INIT(ustringVar, "aZ0 -", 5);
+ if( sizeof(ustringVar)/sizeof(*ustringVar)!=6 ||
+ ustringVar[0]!=0x61 ||
+ ustringVar[1]!=0x5a ||
+ ustringVar[2]!=0x30 ||
+ ustringVar[3]!=0x20 ||
+ ustringVar[4]!=0x2d ||
+ ustringVar[5]!=0
+ ) {
+ errln("Test_U_STRING: U_STRING_DECL with U_STRING_INIT does not work right! "
+ "See putil.h and utypes.h with platform.h.");
+ }
+ }
+ break;
+ case 4:
+ name="Test_UNICODE_STRING";
+ if(exec) {
+ UnicodeString ustringVar=UNICODE_STRING("aZ0 -", 5);
+ if( ustringVar.length()!=5 ||
+ ustringVar[0]!=0x61 ||
+ ustringVar[1]!=0x5a ||
+ ustringVar[2]!=0x30 ||
+ ustringVar[3]!=0x20 ||
+ ustringVar[4]!=0x2d
+ ) {
+ errln("Test_UNICODE_STRING: UNICODE_STRING does not work right! "
+ "See unistr.h and utypes.h with platform.h.");
+ }
+ }
+ break;
+ case 5:
+ name="Test_UNICODE_STRING_SIMPLE";
+ if(exec) {
+ UnicodeString ustringVar=UNICODE_STRING_SIMPLE("aZ0 -");
+ if( ustringVar.length()!=5 ||
+ ustringVar[0]!=0x61 ||
+ ustringVar[1]!=0x5a ||
+ ustringVar[2]!=0x30 ||
+ ustringVar[3]!=0x20 ||
+ ustringVar[4]!=0x2d
+ ) {
+ errln("Test_UNICODE_STRING_SIMPLE: UNICODE_STRING_SIMPLE does not work right! "
+ "See unistr.h and utypes.h with platform.h.");
+ }
+ }
+ break;
+ case 6:
+ name="Test_UTF8_COUNT_TRAIL_BYTES";
+ if(exec) {
+ if(UTF8_COUNT_TRAIL_BYTES(0x7F) != 0
+ || UTF8_COUNT_TRAIL_BYTES(0xC0) != 1
+ || UTF8_COUNT_TRAIL_BYTES(0xE0) != 2
+ || UTF8_COUNT_TRAIL_BYTES(0xF0) != 3)
+ {
+ errln("Test_UTF8_COUNT_TRAIL_BYTES: UTF8_COUNT_TRAIL_BYTES does not work right! "
+ "See utf8.h.");
+ }
+ }
+ break;
+ case 7:
+ name="TestSTLCompatibility";
+ if(exec) {
+#if defined(U_WINDOWS) && defined(_MSC_VER)
+ /* Just make sure that it compiles with STL's placement new usage. */
+ vector<UnicodeString> myvect;
+ myvect.push_back(UnicodeString("blah"));
+#endif
+ }
+ break;
+ default:
+ name="";
+ break;
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/strtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/strtest.h
new file mode 100644
index 00000000000..5f342e10980
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/strtest.h
@@ -0,0 +1,38 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/* file name: strtest.h
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 1999nov22
+* created by: Markus W. Scherer
+*/
+
+/*
+ * Test character- and string- related settings in utypes.h,
+ * macros in putil.h, and constructors in unistr.h .
+ */
+
+#ifndef __STRTEST_H__
+#define __STRTEST_H__
+
+#include "intltest.h"
+
+class StringTest : public IntlTest {
+public:
+ StringTest() {}
+ virtual ~StringTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+
+private:
+ void TestEndian(void);
+ void TestSizeofTypes(void);
+ void TestCharsetFamily(void);
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/svccoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/svccoll.cpp
new file mode 100644
index 00000000000..4c1db47406b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/svccoll.cpp
@@ -0,0 +1,586 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 2003-2006, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "svccoll.h"
+#include "unicode/coll.h"
+#include "unicode/strenum.h"
+#include "hash.h"
+#include "uassert.h"
+
+#include "ucol_imp.h" // internal api needed to test ucollator equality
+#include "cstring.h" // internal api used to compare locale strings
+
+void CollationServiceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par */)
+{
+ if (exec) logln("TestSuite CollationServiceTest: ");
+ switch (index) {
+ TESTCASE(0, TestRegister);
+ TESTCASE(1, TestRegisterFactory);
+ TESTCASE(2, TestSeparateTree);
+ default: name = ""; break;
+ }
+}
+
+void CollationServiceTest::TestRegister()
+{
+#if !UCONFIG_NO_SERVICE
+ // register a singleton
+ const Locale& FR = Locale::getFrance();
+ const Locale& US = Locale::getUS();
+ const Locale US_FOO("en", "US", "FOO");
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ Collator* frcol = Collator::createInstance(FR, status);
+ Collator* uscol = Collator::createInstance(US, status);
+ if(U_FAILURE(status)) {
+ errln("Failed to create collators with %s", u_errorName(status));
+ delete frcol;
+ delete uscol;
+ return;
+ }
+
+ { // try override en_US collator
+ URegistryKey key = Collator::registerInstance(frcol, US, status);
+
+ Collator* ncol = Collator::createInstance(US_FOO, status);
+ if (*frcol != *ncol) {
+ errln("register of french collator for en_US failed on request for en_US_FOO");
+ }
+ // ensure original collator's params not touched
+ Locale loc = frcol->getLocale(ULOC_REQUESTED_LOCALE, status);
+ if (loc != FR) {
+ errln(UnicodeString("fr collator's requested locale changed to ") + loc.getName());
+ }
+ loc = frcol->getLocale(ULOC_VALID_LOCALE, status);
+ if (loc != FR) {
+ errln(UnicodeString("fr collator's valid locale changed to ") + loc.getName());
+ }
+
+ loc = ncol->getLocale(ULOC_REQUESTED_LOCALE, status);
+ if (loc != US_FOO) {
+ errln(UnicodeString("requested locale for en_US_FOO is not en_US_FOO but ") + loc.getName());
+ }
+ loc = ncol->getLocale(ULOC_VALID_LOCALE, status);
+ if (loc != US) {
+ errln(UnicodeString("valid locale for en_US_FOO is not en_US but ") + loc.getName());
+ }
+ loc = ncol->getLocale(ULOC_ACTUAL_LOCALE, status);
+ if (loc != US) {
+ errln(UnicodeString("actual locale for en_US_FOO is not en_US but ") + loc.getName());
+ }
+ delete ncol; ncol = NULL;
+
+ if (!Collator::unregister(key, status)) {
+ errln("failed to unregister french collator");
+ }
+ // !!! frcol pointer is now invalid !!!
+
+ ncol = Collator::createInstance(US, status);
+ if (*uscol != *ncol) {
+ errln("collator after unregister does not match original");
+ }
+ delete ncol; ncol = NULL;
+ }
+
+ // recreate frcol
+ frcol = Collator::createInstance(FR, status);
+
+ UCollator* frFR = ucol_open("fr_FR", &status);
+
+ { // try create collator for new locale
+ Locale fu_FU_FOO("fu", "FU", "FOO");
+ Locale fu_FU("fu", "FU", "");
+
+ Collator* fucol = Collator::createInstance(fu_FU, status);
+ URegistryKey key = Collator::registerInstance(frcol, fu_FU, status);
+ Collator* ncol = Collator::createInstance(fu_FU_FOO, status);
+ if (*frcol != *ncol) {
+ errln("register of fr collator for fu_FU failed");
+ }
+
+ UnicodeString locName = fu_FU.getName();
+ StringEnumeration* localeEnum = Collator::getAvailableLocales();
+ UBool found = FALSE;
+ const UnicodeString* locStr, *ls2;
+ for (locStr = localeEnum->snext(status);
+ !found && locStr != NULL;
+ locStr = localeEnum->snext(status)) {
+ //
+ if (locName == *locStr) {
+ found = TRUE;
+ }
+ }
+
+ StringEnumeration *le2 = NULL;
+ localeEnum->reset(status);
+ int32_t i, count;
+ count = localeEnum->count(status);
+ for(i = 0; i < count; ++i) {
+ if(i == count / 2) {
+ le2 = localeEnum->clone();
+ if(le2 == NULL || count != le2->count(status)) {
+ errln("ServiceEnumeration.clone() failed");
+ break;
+ }
+ }
+ if(i >= count / 2) {
+ locStr = localeEnum->snext(status);
+ ls2 = le2->snext(status);
+ if(*locStr != *ls2) {
+ errln("ServiceEnumeration.clone() failed for item %d", i);
+ }
+ } else {
+ localeEnum->snext(status);
+ }
+ }
+
+ delete localeEnum;
+ delete le2;
+
+ if (!found) {
+ errln("new locale fu_FU not reported as supported locale");
+ }
+
+ UnicodeString displayName;
+ Collator::getDisplayName(fu_FU, displayName);
+ if (displayName != "fu (FU)") {
+ errln(UnicodeString("found ") + displayName + " for fu_FU");
+ }
+
+ Collator::getDisplayName(fu_FU, fu_FU, displayName);
+ if (displayName != "fu (FU)") {
+ errln(UnicodeString("found ") + displayName + " for fu_FU");
+ }
+
+ // test ucol_open
+ UCollator* fufu = ucol_open("fu_FU_FOO", &status);
+ if (!fufu) {
+ errln("could not open fu_FU_FOO with ucol_open");
+ } else {
+ if (!ucol_equals(fufu, frFR)) {
+ errln("collator fufu != collator frFR");
+ }
+ }
+
+ if (!Collator::unregister(key, status)) {
+ errln("failed to unregister french collator");
+ }
+ // !!! note frcoll invalid again, but we're no longer using it
+
+ // other collators should still work ok
+ Locale nloc = ncol->getLocale(ULOC_VALID_LOCALE, status);
+ if (nloc != fu_FU) {
+ errln(UnicodeString("asked for nloc valid locale after close and got") + nloc.getName());
+ }
+ delete ncol; ncol = NULL;
+
+ if (fufu) {
+ const char* nlocstr = ucol_getLocale(fufu, ULOC_VALID_LOCALE, &status);
+ if (uprv_strcmp(nlocstr, "fu_FU") != 0) {
+ errln(UnicodeString("asked for uloc valid locale after close and got ") + nlocstr);
+ }
+ ucol_close(fufu);
+ }
+ ucol_close(frFR);
+
+ ncol = Collator::createInstance(fu_FU, status);
+ if (*fucol != *ncol) {
+ errln("collator after unregister does not match original fu_FU");
+ }
+ delete uscol; uscol = NULL;
+ delete ncol; ncol = NULL;
+ delete fucol; fucol = NULL;
+ }
+#endif
+}
+
+// ------------------
+
+#if !UCONFIG_NO_SERVICE
+struct CollatorInfo {
+ Locale locale;
+ Collator* collator;
+ Hashtable* displayNames; // locale name -> string
+
+ CollatorInfo(const Locale& locale, Collator* collatorToAdopt, Hashtable* displayNamesToAdopt);
+ ~CollatorInfo();
+ UnicodeString& getDisplayName(const Locale& displayLocale, UnicodeString& name) const;
+};
+
+CollatorInfo::CollatorInfo(const Locale& _locale, Collator* _collator, Hashtable* _displayNames)
+ : locale(_locale)
+ , collator(_collator)
+ , displayNames(_displayNames)
+{
+}
+
+CollatorInfo::~CollatorInfo() {
+ delete collator;
+ delete displayNames;
+}
+
+UnicodeString&
+CollatorInfo::getDisplayName(const Locale& displayLocale, UnicodeString& name) const {
+ if (displayNames) {
+ UnicodeString* val = (UnicodeString*)displayNames->get(displayLocale.getName());
+ if (val) {
+ name = *val;
+ return name;
+ }
+ }
+
+ return locale.getDisplayName(displayLocale, name);
+}
+
+// ---------------
+
+class TestFactory : public CollatorFactory {
+ CollatorInfo** info;
+ int32_t count;
+ UnicodeString* ids;
+
+ const CollatorInfo* getInfo(const Locale& loc) const {
+ for (CollatorInfo** p = info; *p; ++p) {
+ if (loc == (**p).locale) {
+ return *p;
+ }
+ }
+ return NULL;
+ }
+
+public:
+ TestFactory(CollatorInfo** _info)
+ : info(_info)
+ , count(0)
+ , ids(NULL)
+ {
+ CollatorInfo** p;
+ for (p = info; *p; ++p) {}
+ count = (int32_t)(p - info);
+ }
+
+ ~TestFactory() {
+ for (CollatorInfo** p = info; *p; ++p) {
+ delete *p;
+ }
+ delete[] info;
+ delete[] ids;
+ }
+
+ virtual Collator* createCollator(const Locale& loc) {
+ const CollatorInfo* ci = getInfo(loc);
+ if (ci) {
+ return ci->collator->clone();
+ }
+ return NULL;
+ }
+
+ virtual UnicodeString& getDisplayName(const Locale& objectLocale,
+ const Locale& displayLocale,
+ UnicodeString& result)
+ {
+ const CollatorInfo* ci = getInfo(objectLocale);
+ if (ci) {
+ ci->getDisplayName(displayLocale, result);
+ } else {
+ result.setToBogus();
+ }
+ return result;
+ }
+
+ const UnicodeString* getSupportedIDs(int32_t& _count, UErrorCode& status) {
+ if (U_SUCCESS(status)) {
+ if (!ids) {
+ ids = new UnicodeString[count];
+ if (!ids) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ _count = 0;
+ return NULL;
+ }
+
+ for (int i = 0; i < count; ++i) {
+ ids[i] = info[i]->locale.getName();
+ }
+ }
+
+ _count = count;
+ return ids;
+ }
+ return NULL;
+ }
+
+ virtual inline UClassID getDynamicClassID() const {
+ return (UClassID)&gClassID;
+ }
+
+ static UClassID getStaticClassID() {
+ return (UClassID)&gClassID;
+ }
+
+private:
+ static char gClassID;
+};
+
+char TestFactory::gClassID = 0;
+#endif
+
+void CollationServiceTest::TestRegisterFactory(void)
+{
+#if !UCONFIG_NO_SERVICE
+ int32_t n1, n2, n3;
+ Locale fu_FU("fu", "FU", "");
+ Locale fu_FU_FOO("fu", "FU", "FOO");
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ Hashtable* fuFUNames = new Hashtable(FALSE, status);
+ if (!fuFUNames) {
+ errln("memory allocation error");
+ return;
+ }
+ fuFUNames->setValueDeleter(uhash_deleteUnicodeString);
+
+ fuFUNames->put(fu_FU.getName(), new UnicodeString("ze leetle bunny Fu-Fu"), status);
+ fuFUNames->put(fu_FU_FOO.getName(), new UnicodeString("zee leetel bunny Foo-Foo"), status);
+ fuFUNames->put(Locale::getDefault().getName(), new UnicodeString("little bunny Foo Foo"), status);
+
+ Collator* frcol = Collator::createInstance(Locale::getFrance(), status);
+ Collator* gecol = Collator::createInstance(Locale::getGermany(), status);
+ Collator* jpcol = Collator::createInstance(Locale::getJapan(), status);
+ if(U_FAILURE(status)) {
+ errln("Failed to create collators with %s", u_errorName(status));
+ delete frcol;
+ delete gecol;
+ delete jpcol;
+ delete fuFUNames;
+ return;
+ }
+
+ CollatorInfo** info = new CollatorInfo*[4];
+ if (!info) {
+ errln("memory allocation error");
+ return;
+ }
+
+ info[0] = new CollatorInfo(Locale::getUS(), frcol, NULL);
+ info[1] = new CollatorInfo(Locale::getFrance(), gecol, NULL);
+ info[2] = new CollatorInfo(fu_FU, jpcol, fuFUNames);
+ info[3] = NULL;
+
+ TestFactory* factory = new TestFactory(info);
+ if (!factory) {
+ errln("memory allocation error");
+ return;
+ }
+
+ Collator* uscol = Collator::createInstance(Locale::getUS(), status);
+ Collator* fucol = Collator::createInstance(fu_FU, status);
+
+ {
+ n1 = checkAvailable("before registerFactory");
+
+ URegistryKey key = Collator::registerFactory(factory, status);
+
+ n2 = checkAvailable("after registerFactory");
+ assertTrue("count after > count before", n2 > n1);
+
+ Collator* ncol = Collator::createInstance(Locale::getUS(), status);
+ if (*frcol != *ncol) {
+ errln("frcoll for en_US failed");
+ }
+ delete ncol; ncol = NULL;
+
+ ncol = Collator::createInstance(fu_FU_FOO, status);
+ if (*jpcol != *ncol) {
+ errln("jpcol for fu_FU_FOO failed");
+ }
+
+ Locale loc = ncol->getLocale(ULOC_REQUESTED_LOCALE, status);
+ if (loc != fu_FU_FOO) {
+ errln(UnicodeString("requested locale for fu_FU_FOO is not fu_FU_FOO but ") + loc.getName());
+ }
+ loc = ncol->getLocale(ULOC_VALID_LOCALE, status);
+ if (loc != fu_FU) {
+ errln(UnicodeString("valid locale for fu_FU_FOO is not fu_FU but ") + loc.getName());
+ }
+ delete ncol; ncol = NULL;
+
+ UnicodeString locName = fu_FU.getName();
+ StringEnumeration* localeEnum = Collator::getAvailableLocales();
+ UBool found = FALSE;
+ const UnicodeString* locStr;
+ for (locStr = localeEnum->snext(status);
+ !found && locStr != NULL;
+ locStr = localeEnum->snext(status))
+ {
+ if (locName == *locStr) {
+ found = TRUE;
+ }
+ }
+ delete localeEnum;
+
+ if (!found) {
+ errln("new locale fu_FU not reported as supported locale");
+ }
+
+ UnicodeString name;
+ Collator::getDisplayName(fu_FU, name);
+ if (name != "little bunny Foo Foo") {
+ errln(UnicodeString("found ") + name + " for fu_FU");
+ }
+
+ Collator::getDisplayName(fu_FU, fu_FU_FOO, name);
+ if (name != "zee leetel bunny Foo-Foo") {
+ errln(UnicodeString("found ") + name + " for fu_FU in fu_FU_FOO");
+ }
+
+ if (!Collator::unregister(key, status)) {
+ errln("failed to unregister factory");
+ }
+ // ja, fr, ge collators no longer valid
+
+ ncol = Collator::createInstance(fu_FU, status);
+ if (*fucol != *ncol) {
+ errln("collator after unregister does not match original fu_FU");
+ }
+ delete ncol;
+
+ n3 = checkAvailable("after unregister");
+ assertTrue("count after unregister == count before register", n3 == n1);
+ }
+
+ delete fucol;
+ delete uscol;
+#endif
+}
+
+/**
+ * Iterate through the given iterator, checking to see that all the strings
+ * in the expected array are present.
+ * @param expected array of strings we expect to see, or NULL
+ * @param expectedCount number of elements of expected, or 0
+ */
+int32_t CollationServiceTest::checkStringEnumeration(const char* msg,
+ StringEnumeration& iter,
+ const char** expected,
+ int32_t expectedCount) {
+ UErrorCode ec = U_ZERO_ERROR;
+ U_ASSERT(expectedCount >= 0 && expectedCount < 31); // [sic] 31 not 32
+ int32_t i = 0, idxAfterReset = 0, n = iter.count(ec);
+ assertSuccess("count", ec);
+ UnicodeString buf, buffAfterReset;
+ int32_t seenMask = 0;
+ for (;; ++i) {
+ const UnicodeString* s = iter.snext(ec);
+ if (!assertSuccess("snext", ec) || s == NULL)
+ break;
+ if (i != 0)
+ buf.append(UNICODE_STRING_SIMPLE(", "));
+ buf.append(*s);
+ // check expected list
+ for (int32_t j=0, bit=1; j<expectedCount; ++j, bit<<=1) {
+ if ((seenMask&bit)==0) {
+ UnicodeString exp(expected[j], (char*)NULL);
+ if (*s == exp) {
+ seenMask |= bit;
+ logln((UnicodeString)"Ok: \"" + exp + "\" seen");
+ }
+ }
+ }
+ }
+ // can't get pesky operator+(const US&, foo) to cooperate; use toString
+#if !UCONFIG_NO_FORMATTING
+ logln(UnicodeString() + msg + " = [" + buf + "] (" + toString(i) + ")");
+#else
+ logln(UnicodeString() + msg + " = [" + buf + "] (??? NO_FORMATTING)");
+#endif
+ assertTrue("count verified", i==n);
+ iter.reset(ec);
+ for (;; ++idxAfterReset) {
+ const UChar *s = iter.unext(NULL, ec);
+ if (!assertSuccess("unext", ec) || s == NULL)
+ break;
+ if (idxAfterReset != 0)
+ buffAfterReset.append(UNICODE_STRING_SIMPLE(", "));
+ buffAfterReset.append(s);
+ }
+ assertTrue("idxAfterReset verified", idxAfterReset==n);
+ assertTrue("buffAfterReset verified", buffAfterReset==buf);
+ // did we see all expected strings?
+ if (((1<<expectedCount)-1) != seenMask) {
+ for (int32_t j=0, bit=1; j<expectedCount; ++j, bit<<=1) {
+ if ((seenMask&bit)==0) {
+ errln((UnicodeString)"FAIL: \"" + expected[j] + "\" not seen");
+ }
+ }
+ }
+ return n;
+}
+
+/**
+ * Check the integrity of the results of Collator::getAvailableLocales().
+ * Return the number of items returned.
+ */
+#if !UCONFIG_NO_SERVICE
+int32_t CollationServiceTest::checkAvailable(const char* msg) {
+ StringEnumeration *iter = Collator::getAvailableLocales();
+ if (!assertTrue("getAvailableLocales != NULL", iter!=NULL)) return -1;
+ int32_t n = checkStringEnumeration(msg, *iter, NULL, 0);
+ delete iter;
+ return n;
+}
+#endif
+
+static const char* KW[] = {
+ "collation"
+};
+static const int32_t KW_COUNT = sizeof(KW)/sizeof(KW[0]);
+
+static const char* KWVAL[] = {
+ "phonebook",
+ "stroke"
+};
+static const int32_t KWVAL_COUNT = sizeof(KWVAL)/sizeof(KWVAL[0]);
+
+void CollationServiceTest::TestSeparateTree() {
+ UErrorCode ec = U_ZERO_ERROR;
+ StringEnumeration *iter = Collator::getKeywords(ec);
+ if (!assertTrue("getKeywords != NULL", iter!=NULL)) return;
+ if (!assertSuccess("getKeywords", ec)) return;
+ checkStringEnumeration("getKeywords", *iter, KW, KW_COUNT);
+ delete iter;
+
+ iter = Collator::getKeywordValues(KW[0], ec);
+ if (!assertTrue("getKeywordValues != NULL", iter!=NULL)) return;
+ if (!assertSuccess("getKeywordValues", ec)) return;
+ checkStringEnumeration("getKeywordValues", *iter, KWVAL, KWVAL_COUNT);
+ delete iter;
+
+ UBool isAvailable;
+ Locale equiv = Collator::getFunctionalEquivalent("collation",
+ Locale::createFromName("fr"),
+ isAvailable, ec);
+ assertSuccess("getFunctionalEquivalent", ec);
+ assertEquals("getFunctionalEquivalent(fr)", "fr", equiv.getName());
+ assertTrue("getFunctionalEquivalent(fr).isAvailable==TRUE",
+ isAvailable == TRUE);
+
+ equiv = Collator::getFunctionalEquivalent("collation",
+ Locale::createFromName("fr_FR"),
+ isAvailable, ec);
+ assertSuccess("getFunctionalEquivalent", ec);
+ assertEquals("getFunctionalEquivalent(fr_FR)", "fr", equiv.getName());
+ assertTrue("getFunctionalEquivalent(fr_FR).isAvailable==TRUE",
+ isAvailable == TRUE);
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/svccoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/svccoll.h
new file mode 100644
index 00000000000..3967f104ce8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/svccoll.h
@@ -0,0 +1,46 @@
+/********************************************************************
+ * Copyright (c) 2004, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationServiceTest tests registration of collators.
+ */
+
+#ifndef _SVCCOLL
+#define _SVCCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "intltest.h"
+
+U_NAMESPACE_BEGIN
+
+class StringEnumeration;
+
+class CollationServiceTest: public IntlTest {
+public:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+
+ void TestRegister(void);
+ void TestRegisterFactory(void);
+ void TestSeparateTree();
+
+ private:
+ int32_t checkStringEnumeration(const char* msg,
+ StringEnumeration& iter,
+ const char** expected,
+ int32_t expectedCount);
+
+ int32_t checkAvailable(const char* msg);
+};
+
+U_NAMESPACE_END
+
+/* #if !UCONFIG_NO_COLLATION */
+#endif
+
+/* #ifndef _SVCCOLL */
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.cpp
new file mode 100644
index 00000000000..82d237d5102
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.cpp
@@ -0,0 +1,652 @@
+
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+#include "tchcfmt.h"
+#include "cmemory.h"
+#include "unicode/msgfmt.h"
+#include "unicode/choicfmt.h"
+
+#include <float.h>
+
+// tests have obvious memory leaks!
+
+void TestChoiceFormat::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,TestSimpleExample);
+ TESTCASE(1,TestComplexExample);
+ TESTCASE(2,TestClosures);
+ TESTCASE(3,TestPatterns);
+ default: name = ""; break;
+ }
+}
+
+static UBool chkstatus( UErrorCode &status, const char* msg = NULL )
+{
+ UBool ok = U_SUCCESS(status);
+ if (!ok) it_errln( msg );
+ return ok;
+}
+
+void
+TestChoiceFormat::TestSimpleExample( void )
+{
+ double limits[] = {1,2,3,4,5,6,7};
+ UnicodeString monthNames[] = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"};
+ ChoiceFormat* form = new ChoiceFormat(limits, monthNames, 7);
+ ParsePosition parse_pos;
+ // TODO Fix this ParsePosition stuff...
+ UnicodeString str;
+ UnicodeString res1, res2;
+ UErrorCode status;
+ FieldPosition fpos(0);
+ Formattable f;
+ int32_t ix;
+ //for (double i = 0.0; i <= 8.0; ++i) {
+ for (ix = 0; ix <= 8; ++ix) {
+ double i = ix; //nos
+ status = U_ZERO_ERROR;
+ fpos = 0;
+ str = "";
+ res1 = form->format(i, str, fpos, status );
+ if (!chkstatus( status, "*** test_simple_example format" )) {
+ delete form;
+ return;
+ }
+ //form->parse(res1, f, parse_pos);
+ res2 = " ??? ";
+ it_logln(UnicodeString("") + ix + UnicodeString(" -> ") + res1 + UnicodeString(" -> ") + res2);
+ }
+ //Testing ==operator
+ const double filelimits[] = {0,1,2};
+ const UnicodeString filepart[] = {"are no files","is one file","are {2} files"};
+ ChoiceFormat* formnew=new ChoiceFormat(filelimits, filepart, 3);
+ ChoiceFormat* formequal=new ChoiceFormat(limits, monthNames, 7);
+ if(*formnew == *form){
+ errln("ERROR: ==operator failed\n");
+ }
+ if(!(*form == *formequal)){
+ errln("ERROR: ==operator failed\n");
+ }
+ delete formequal;
+
+#ifdef U_USE_CHOICE_FORMAT_DEPRECATES
+ //Testing adoptChoices()
+ double *limitsToAdopt = (double *)uprv_malloc(7 * sizeof(double));
+ UnicodeString *monthNamesToAdopt = new UnicodeString[7];
+
+ uprv_arrayCopy(monthNames, monthNamesToAdopt, 7);
+ uprv_memcpy(limitsToAdopt, limits, (size_t)(7 * sizeof(limits[0])));
+
+ formnew->adoptChoices(limitsToAdopt, monthNamesToAdopt, 7);
+ if(!(*formnew == *form)){
+ errln("ERROR: ==Operator or adoptChoices failed\n");
+ }
+#endif
+
+ delete formnew;
+
+ //Testing getLimits()
+ double *gotLimits=0;
+ int32_t count=0;
+ gotLimits=(double*)form->getLimits(count);
+ if(count != 7){
+ errln("getLimits didn't update the count correctly\n");
+ }
+ for(ix=0; ix<count; ix++){
+ if(gotLimits[ix] != limits[ix]){
+ errln((UnicodeString)"getLimits didn't get the limits correctly. Expected " + limits[ix] + " Got " + gotLimits[ix]);
+ }
+ }
+ //Testing getFormat()
+ count=0;
+ UnicodeString *gotFormats=0;
+ gotFormats=(UnicodeString*)form->getFormats(count);
+ if(count != 7){
+ errln("getFormats didn't update the count correctly\n");
+ }
+ for(ix=0; ix<count; ix++){
+ if(gotFormats[ix] != monthNames[ix]){
+ errln((UnicodeString)"getFormats didn't get the Formats correctly. Expected " + monthNames[ix] + " Got " + gotFormats[ix]);
+ }
+ }
+
+
+ delete form;
+
+}
+
+void
+TestChoiceFormat::TestComplexExample( void )
+{
+ UErrorCode status = U_ZERO_ERROR;
+ const double filelimits[] = {-1, 0,1,2};
+ const UnicodeString filepart[] = {"are corrupted files", "are no files","is one file","are {2} files"};
+
+ ChoiceFormat* fileform = new ChoiceFormat( filelimits, filepart, 4);
+
+ if (!fileform) {
+ it_errln("*** test_complex_example fileform");
+ return;
+ }
+
+ Format* filenumform = NumberFormat::createInstance( status );
+ if (!filenumform) {
+ it_errln("*** test_complex_example filenumform");
+ delete fileform;
+ return;
+ }
+ if (!chkstatus( status, "*** test_simple_example filenumform" )) {
+ delete fileform;
+ delete filenumform;
+ return;
+ }
+
+ //const Format* testFormats[] = { fileform, NULL, filenumform };
+ //pattform->setFormats( testFormats, 3 );
+
+ MessageFormat* pattform = new MessageFormat("There {0} on {1}", status );
+ if (!pattform) {
+ it_errln("*** test_complex_example pattform");
+ delete fileform;
+ delete filenumform;
+ return;
+ }
+ if (!chkstatus( status, "*** test_complex_example pattform" )) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+
+ pattform->setFormat( 0, *fileform );
+ pattform->setFormat( 2, *filenumform );
+
+
+ Formattable testArgs[] = {(int32_t)0, "Disk_A", (int32_t)0};
+ UnicodeString str;
+ UnicodeString res1, res2;
+ pattform->toPattern( res1 );
+ it_logln("MessageFormat toPattern: " + res1);
+ fileform->toPattern( res1 );
+ it_logln("ChoiceFormat toPattern: " + res1);
+ if (res1 == "-1.0#are corrupted files|0.0#are no files|1.0#is one file|2.0#are {2} files") {
+ it_logln("toPattern tested!");
+ }else{
+ it_errln("*** ChoiceFormat to Pattern result!");
+ }
+
+ FieldPosition fpos(0);
+
+ UnicodeString checkstr[] = {
+ "There are corrupted files on Disk_A",
+ "There are no files on Disk_A",
+ "There is one file on Disk_A",
+ "There are 2 files on Disk_A",
+ "There are 3 files on Disk_A"
+ };
+
+ // if (status != U_ZERO_ERROR) return; // TODO: analyze why we have such a bad bail out here!
+
+ if (U_FAILURE(status)) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+
+
+ int32_t i;
+ int32_t start = -1;
+ for (i = start; i < 4; ++i) {
+ str = "";
+ status = U_ZERO_ERROR;
+ testArgs[0] = Formattable((int32_t)i);
+ testArgs[2] = testArgs[0];
+ res2 = pattform->format(testArgs, 3, str, fpos, status );
+ if (!chkstatus( status, "*** test_complex_example format" )) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+ it_logln(i + UnicodeString(" -> ") + res2);
+ if (res2 != checkstr[i - start]) {
+ it_errln("*** test_complex_example res string");
+ it_errln(UnicodeString("*** ") + i + UnicodeString(" -> '") + res2 + UnicodeString("' unlike '") + checkstr[i] + UnicodeString("' ! "));
+ }
+ }
+ it_logln();
+
+ it_logln("------ additional testing in complex test ------");
+ it_logln();
+ //
+ int32_t retCount;
+ const double* retLimits = fileform->getLimits( retCount );
+ if ((retCount == 4) && (retLimits)
+ && (retLimits[0] == -1.0)
+ && (retLimits[1] == 0.0)
+ && (retLimits[2] == 1.0)
+ && (retLimits[3] == 2.0)) {
+ it_logln("getLimits tested!");
+ }else{
+ it_errln("*** getLimits unexpected result!");
+ }
+
+ const UnicodeString* retFormats = fileform->getFormats( retCount );
+ if ((retCount == 4) && (retFormats)
+ && (retFormats[0] == "are corrupted files")
+ && (retFormats[1] == "are no files")
+ && (retFormats[2] == "is one file")
+ && (retFormats[3] == "are {2} files")) {
+ it_logln("getFormats tested!");
+ }else{
+ it_errln("*** getFormats unexpected result!");
+ }
+
+ UnicodeString checkstr2[] = {
+ "There is no folder on Disk_A",
+ "There is one folder on Disk_A",
+ "There are many folders on Disk_A",
+ "There are many folders on Disk_A"
+ };
+
+ fileform->applyPattern("0#is no folder|1#is one folder|2#are many folders", status );
+ if (status == U_ZERO_ERROR)
+ it_logln("status applyPattern OK!");
+ if (!chkstatus( status, "*** test_complex_example pattform" )) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+ pattform->setFormat( 0, *fileform );
+ fpos = 0;
+ for (i = 0; i < 4; ++i) {
+ str = "";
+ status = U_ZERO_ERROR;
+ testArgs[0] = Formattable((int32_t)i);
+ testArgs[2] = testArgs[0];
+ res2 = pattform->format(testArgs, 3, str, fpos, status );
+ if (!chkstatus( status, "*** test_complex_example format 2" )) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+ it_logln(UnicodeString() + i + UnicodeString(" -> ") + res2);
+ if (res2 != checkstr2[i]) {
+ it_errln("*** test_complex_example res string");
+ it_errln(UnicodeString("*** ") + i + UnicodeString(" -> '") + res2 + UnicodeString("' unlike '") + checkstr2[i] + UnicodeString("' ! "));
+ }
+ }
+
+ const double limits_A[] = {1,2,3,4,5,6,7};
+ const UnicodeString monthNames_A[] = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"};
+ ChoiceFormat* form_A = new ChoiceFormat(limits_A, monthNames_A, 7);
+ ChoiceFormat* form_A2 = new ChoiceFormat(limits_A, monthNames_A, 7);
+ const double limits_B[] = {1,2,3,4,5,6,7};
+ const UnicodeString monthNames_B[] = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat_BBB"};
+ ChoiceFormat* form_B = new ChoiceFormat(limits_B, monthNames_B, 7);
+ if (!form_A || !form_B || !form_A2) {
+ it_errln("*** test-choiceFormat not allocatable!");
+ }else{
+ if (*form_A == *form_A2) {
+ it_logln("operator== tested.");
+ }else{
+ it_errln("*** operator==");
+ }
+
+ if (*form_A != *form_B) {
+ it_logln("operator!= tested.");
+ }else{
+ it_errln("*** operator!=");
+ }
+
+ ChoiceFormat* form_A3 = (ChoiceFormat*) form_A->clone();
+ if (!form_A3) {
+ it_errln("*** ChoiceFormat->clone is nil.");
+ }else{
+ if ((*form_A3 == *form_A) && (*form_A3 != *form_B)) {
+ it_logln("method clone tested.");
+ }else{
+ it_errln("*** ChoiceFormat clone or operator==, or operator!= .");
+ }
+ }
+
+ ChoiceFormat form_Assigned( *form_A );
+ UBool ok = (form_Assigned == *form_A) && (form_Assigned != *form_B);
+ form_Assigned = *form_B;
+ ok = ok && (form_Assigned != *form_A) && (form_Assigned == *form_B);
+ if (ok) {
+ it_logln("copy constructor and operator= tested.");
+ }else{
+ it_errln("*** copy constructor or operator= or operator == or operator != .");
+ }
+ delete form_A3;
+ }
+
+
+ delete form_A; delete form_A2; delete form_B;
+
+ const char* testPattern = "0#none|1#one|2#many";
+ ChoiceFormat form_pat( testPattern, status );
+ if (!chkstatus( status, "*** ChoiceFormat contructor( newPattern, status)" )) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+
+ form_pat.toPattern( res1 );
+ if (res1 == "0.0#none|1.0#one|2.0#many") {
+ it_logln("ChoiceFormat contructor( newPattern, status) tested");
+ }else{
+ it_errln("*** ChoiceFormat contructor( newPattern, status) or toPattern result!");
+ }
+
+#ifdef U_USE_CHOICE_FORMAT_DEPRECATES
+ double* d_a = (double *)uprv_malloc(2 * sizeof(double));
+ if (!d_a) { it_errln("*** allocation error."); return; }
+ d_a[0] = 1.0; d_a[1] = 2.0;
+
+ UnicodeString* s_a = new UnicodeString[2];
+ if (!s_a) { it_errln("*** allocation error."); return; }
+ s_a[0] = "first"; s_a[1] = "second";
+
+ form_pat.adoptChoices( d_a, s_a, 2 );
+ form_pat.toPattern( res1 );
+ it_out << "ChoiceFormat adoptChoices toPattern: " << res1 << endl;
+ if (res1 == "1.0#first|2.0#second") {
+ it_logln("ChoiceFormat adoptChoices tested");
+ }else{
+ it_errln("*** ChoiceFormat adoptChoices result!");
+ }
+#endif
+
+ double d_a2[] = { 3.0, 4.0 };
+ UnicodeString s_a2[] = { "third", "forth" };
+
+ form_pat.setChoices( d_a2, s_a2, 2 );
+ form_pat.toPattern( res1 );
+ it_logln(UnicodeString("ChoiceFormat adoptChoices toPattern: ") + res1);
+ if (res1 == "3.0#third|4.0#forth") {
+ it_logln("ChoiceFormat adoptChoices tested");
+ }else{
+ it_errln("*** ChoiceFormat adoptChoices result!");
+ }
+
+ str = "";
+ fpos = 0;
+ status = U_ZERO_ERROR;
+ double arg_double = 3.0;
+ res1 = form_pat.format( arg_double, str, fpos );
+ it_logln(UnicodeString("ChoiceFormat format:") + res1);
+ if (res1 != "third") it_errln("*** ChoiceFormat format (double, ...) result!");
+
+ str = "";
+ fpos = 0;
+ status = U_ZERO_ERROR;
+ int64_t arg_64 = 3;
+ res1 = form_pat.format( arg_64, str, fpos );
+ it_logln(UnicodeString("ChoiceFormat format:") + res1);
+ if (res1 != "third") it_errln("*** ChoiceFormat format (int64_t, ...) result!");
+
+ str = "";
+ fpos = 0;
+ status = U_ZERO_ERROR;
+ int32_t arg_long = 3;
+ res1 = form_pat.format( arg_long, str, fpos );
+ it_logln(UnicodeString("ChoiceFormat format:") + res1);
+ if (res1 != "third") it_errln("*** ChoiceFormat format (int32_t, ...) result!");
+
+ Formattable ft( (int32_t)3 );
+ str = "";
+ fpos = 0;
+ status = U_ZERO_ERROR;
+ res1 = form_pat.format( ft, str, fpos, status );
+ if (!chkstatus( status, "*** test_complex_example format (int32_t, ...)" )) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+ it_logln(UnicodeString("ChoiceFormat format:") + res1);
+ if (res1 != "third") it_errln("*** ChoiceFormat format (Formattable, ...) result!");
+
+ Formattable fta[] = { (int32_t)3 };
+ str = "";
+ fpos = 0;
+ status = U_ZERO_ERROR;
+ res1 = form_pat.format( fta, 1, str, fpos, status );
+ if (!chkstatus( status, "*** test_complex_example format (int32_t, ...)" )) {
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+ return;
+ }
+ it_logln(UnicodeString("ChoiceFormat format:") + res1);
+ if (res1 != "third") it_errln("*** ChoiceFormat format (Formattable[], cnt, ...) result!");
+
+ ParsePosition parse_pos = 0;
+ Formattable result;
+ UnicodeString parsetext("third");
+ form_pat.parse( parsetext, result, parse_pos );
+ double rd = (result.getType() == Formattable::kLong) ? result.getLong() : result.getDouble();
+ if (rd == 3.0) {
+ it_logln("parse( ..., ParsePos ) tested.");
+ }else{
+ it_errln("*** ChoiceFormat parse( ..., ParsePos )!");
+ }
+
+ form_pat.parse( parsetext, result, status );
+ rd = (result.getType() == Formattable::kLong) ? result.getLong() : result.getDouble();
+ if (rd == 3.0) {
+ it_logln("parse( ..., UErrorCode ) tested.");
+ }else{
+ it_errln("*** ChoiceFormat parse( ..., UErrorCode )!");
+ }
+
+ /*
+ UClassID classID = ChoiceFormat::getStaticClassID();
+ if (classID == form_pat.getDynamicClassID()) {
+ it_out << "getStaticClassID and getDynamicClassID tested." << endl;
+ }else{
+ it_errln("*** getStaticClassID and getDynamicClassID!");
+ }
+ */
+
+ it_logln();
+
+ delete fileform;
+ delete filenumform;
+ delete pattform;
+}
+
+
+/**
+ * Test new closure API
+ */
+void TestChoiceFormat::TestClosures(void) {
+ // Construct open, half-open, half-open (the other way), and closed
+ // intervals. Do this both using arrays and using a pattern.
+
+ // 'fmt1' is created using arrays
+ UBool T = TRUE, F = FALSE;
+ // 0: ,1)
+ // 1: [1,2]
+ // 2: (2,3]
+ // 3: (3,4)
+ // 4: [4,5)
+ // 5: [5,
+ double limits[] = { 0, 1, 2, 3, 4, 5 };
+ UBool closures[] = { F, F, T, T, F, F };
+ UnicodeString fmts[] = {
+ ",1)", "[1,2]", "(2,3]", "(3,4)", "[4,5)", "[5,"
+ };
+ ChoiceFormat fmt1(limits, closures, fmts, 6);
+
+ // 'fmt2' is created using a pattern; it should be equivalent
+ UErrorCode status = U_ZERO_ERROR;
+ const char* PAT = "0.0#,1)|1.0#[1,2]|2.0<(2,3]|3.0<(3,4)|4.0#[4,5)|5.0#[5,";
+ ChoiceFormat fmt2(PAT, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: ChoiceFormat constructor failed");
+ return;
+ }
+
+ // Check the patterns
+ UnicodeString str;
+ fmt1.toPattern(str);
+ if (str == PAT) {
+ logln("Ok: " + str);
+ } else {
+ errln("FAIL: " + str + ", expected " + PAT);
+ }
+ str.truncate(0);
+
+ // Check equality
+ if (fmt1 != fmt2) {
+ errln("FAIL: fmt1 != fmt2");
+ }
+
+ int32_t i;
+ int32_t count2 = 0;
+ const double *limits2 = fmt2.getLimits(count2);
+ const UBool *closures2 = fmt2.getClosures(count2);
+
+ if((count2 != 6) || !limits2 || !closures2) {
+ errln("FAIL: couldn't get limits or closures");
+ } else {
+ for(i=0;i<count2;i++) {
+ logln("#%d/%d: limit %g closed %s\n",
+ i, count2,
+ limits2[i],
+ closures2[i] ?"T":"F");
+ if(limits2[i] != limits[i]) {
+ errln("FAIL: limit #%d = %g, should be %g\n", i, limits2[i], limits[i]);
+ }
+ if((closures2[i]!=0) != (closures[i]!=0)) {
+ errln("FAIL: closure #%d = %s, should be %s\n", i, closures2[i]?"T":"F", closures[i]?"T":"F");
+ }
+ }
+ }
+
+ // Now test both format objects
+ UnicodeString exp[] = {
+ /*-0.5 => */ ",1)",
+ /* 0.0 => */ ",1)",
+ /* 0.5 => */ ",1)",
+ /* 1.0 => */ "[1,2]",
+ /* 1.5 => */ "[1,2]",
+ /* 2.0 => */ "[1,2]",
+ /* 2.5 => */ "(2,3]",
+ /* 3.0 => */ "(2,3]",
+ /* 3.5 => */ "(3,4)",
+ /* 4.0 => */ "[4,5)",
+ /* 4.5 => */ "[4,5)",
+ /* 5.0 => */ "[5,",
+ /* 5.5 => */ "[5,"
+ };
+
+ // Each format object should behave exactly the same
+ ChoiceFormat* FMT[] = { &fmt1, &fmt2 };
+ for (int32_t pass=0; pass<2; ++pass) {
+ int32_t j=0;
+ for (int32_t ix=-5; ix<=55; ix+=5) {
+ double x = ix / 10.0; // -0.5 to 5.5 step +0.5
+ FMT[pass]->format(x, str);
+ if (str == exp[j]) {
+ logln((UnicodeString)"Ok: " + x + " => " + str);
+ } else {
+ errln((UnicodeString)"FAIL: " + x + " => " + str +
+ ", expected " + exp[j]);
+ }
+ str.truncate(0);
+ ++j;
+ }
+ }
+}
+
+/**
+ * Helper for TestPatterns()
+ */
+void TestChoiceFormat::_testPattern(const char* pattern,
+ UBool isValid,
+ double v1, const char* str1,
+ double v2, const char* str2,
+ double v3, const char* str3) {
+ UErrorCode ec = U_ZERO_ERROR;
+ ChoiceFormat fmt(pattern, ec);
+ if (!isValid) {
+ if (U_FAILURE(ec)) {
+ logln((UnicodeString)"Ok: " + pattern + " failed");
+ } else {
+ logln((UnicodeString)"FAIL: " + pattern + " accepted");
+ }
+ return;
+ }
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: ChoiceFormat(" + pattern + ") failed");
+ return;
+ } else {
+ logln((UnicodeString)"Ok: Pattern: " + pattern);
+ }
+ UnicodeString out;
+ logln((UnicodeString)" toPattern: " + fmt.toPattern(out));
+
+ double v[] = {v1, v2, v3};
+ const char* str[] = {str1, str2, str3};
+ for (int32_t i=0; i<3; ++i) {
+ out.truncate(0);
+ fmt.format(v[i], out);
+ if (out == str[i]) {
+ logln((UnicodeString)"Ok: " + v[i] + " => " + out);
+ } else {
+ errln((UnicodeString)"FAIL: " + v[i] + " => " + out +
+ ", expected " + str[i]);
+ }
+ }
+}
+
+/**
+ * Test applyPattern
+ */
+void TestChoiceFormat::TestPatterns(void) {
+ // Try a pattern that isolates a single value. Create
+ // three ranges: [-Inf,1.0) [1.0,1.0] (1.0,+Inf]
+ _testPattern("0.0#a|1.0#b|1.0<c", TRUE,
+ 1.0 - 1e-9, "a",
+ 1.0, "b",
+ 1.0 + 1e-9, "c");
+
+ // Try an invalid pattern that isolates a single value.
+ // [-Inf,1.0) [1.0,1.0) [1.0,+Inf]
+ _testPattern("0.0#a|1.0#b|1.0#c", FALSE,
+ 0, 0, 0, 0, 0, 0);
+
+ // Another
+ // [-Inf,1.0] (1.0,1.0) [1.0,+Inf]
+ _testPattern("0.0#a|1.0<b|1.0#c", FALSE,
+ 0, 0, 0, 0, 0, 0);
+ // Another
+ // [-Inf,1.0] (1.0,1.0] (1.0,+Inf]
+ _testPattern("0.0#a|1.0<b|1.0<c", FALSE,
+ 0, 0, 0, 0, 0, 0);
+
+ // Try a grossly invalid pattern.
+ // [-Inf,2.0) [2.0,1.0) [1.0,+Inf]
+ _testPattern("0.0#a|2.0#b|1.0#c", FALSE,
+ 0, 0, 0, 0, 0, 0);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.h b/Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.h
new file mode 100644
index 00000000000..ade2027a52f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tchcfmt.h
@@ -0,0 +1,55 @@
+
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * TestChoiceFormat is a third level test class
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+
+/**
+ * tests Choice Format, functionality of examples, as well as API functionality
+ **/
+class TestChoiceFormat: public IntlTest {
+ /**
+ * tests basic functionality in a simple example
+ **/
+ void TestSimpleExample(void);
+ /**
+ * tests functionality in a more complex example,
+ * and extensive API functionality.
+ * See verbose message output statements for specifically tested API
+ **/
+ void TestComplexExample(void);
+
+ /**
+ * Test new closure API
+ */
+ void TestClosures(void);
+
+ /**
+ * Test applyPattern
+ */
+ void TestPatterns(void);
+
+ void _testPattern(const char* pattern,
+ UBool isValid,
+ double v1, const char* str1,
+ double v2, const char* str2,
+ double v3, const char* str3);
+ /**
+ * runs tests in local funtions:
+ **/
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/testidn.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/testidn.cpp
new file mode 100644
index 00000000000..e1f627735db
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/testidn.cpp
@@ -0,0 +1,450 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 2003-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: testidn.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2003-02-06
+* created by: Ram Viswanadha
+*
+* This program reads the rfc3454_*.txt files,
+* parses them, and extracts the data for Nameprep conformance.
+* It then preprocesses it and writes a binary file for efficient use
+* in various IDNA conversion processes.
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION
+
+#define USPREP_TYPE_NAMES_ARRAY
+
+#include "unicode/uchar.h"
+#include "unicode/putil.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "unicode/udata.h"
+#include "unewdata.h"
+#include "uoptions.h"
+#include "uparse.h"
+#include "utrie.h"
+#include "umutex.h"
+#include "sprpimpl.h"
+#include "testidna.h"
+#include "punyref.h"
+#include <stdlib.h>
+
+UBool beVerbose=FALSE, haveCopyright=TRUE;
+
+/* prototypes --------------------------------------------------------------- */
+
+
+static void
+parseMappings(const char *filename, UBool reportError,TestIDNA& test, UErrorCode *pErrorCode);
+
+static void
+compareMapping(uint32_t codepoint, uint32_t* mapping, int32_t mapLength,
+ UStringPrepType option);
+
+static void
+compareFlagsForRange(uint32_t start, uint32_t end,UStringPrepType option);
+
+static void
+testAllCodepoints(TestIDNA& test);
+
+static TestIDNA* pTestIDNA =NULL;
+
+static const char* fileNames[] = {
+ "NamePrepProfile.txt"
+ };
+static UStringPrepProfile *profile = NULL;
+static const UTrie *idnTrie = NULL;
+static const int32_t *indexes = NULL;
+static const uint16_t *mappingData = NULL;
+/* -------------------------------------------------------------------------- */
+
+/* file definitions */
+#define DATA_NAME "uidna"
+#define DATA_TYPE "icu"
+
+#define MISC_DIR "misc"
+
+extern int
+testData(TestIDNA& test) {
+ char *basename=NULL;
+ UErrorCode errorCode=U_ZERO_ERROR;
+ char *saveBasename =NULL;
+
+ profile = usprep_open(NULL, DATA_NAME, &errorCode);
+ if(U_FAILURE(errorCode)){
+ test.errln("Failed to load IDNA data file. " + UnicodeString(u_errorName(errorCode)));
+ return errorCode;
+ }
+
+ char* filename = (char*) malloc(strlen(IntlTest::pathToDataDirectory())*1024);
+ //TODO get the srcDir dynamically
+ const char *srcDir=IntlTest::pathToDataDirectory();
+
+ idnTrie = &profile->sprepTrie;
+ indexes = profile->indexes;
+ mappingData = profile->mappingData;
+
+ //initialize
+ pTestIDNA = &test;
+
+ /* prepare the filename beginning with the source dir */
+ if(uprv_strchr(srcDir,U_FILE_SEP_CHAR) == NULL){
+ filename[0] = 0x2E;
+ filename[1] = U_FILE_SEP_CHAR;
+ uprv_strcpy(filename+2,srcDir);
+ }else{
+ uprv_strcpy(filename, srcDir);
+ }
+ basename=filename+uprv_strlen(filename);
+ if(basename>filename && *(basename-1)!=U_FILE_SEP_CHAR) {
+ *basename++=U_FILE_SEP_CHAR;
+ }
+
+ /* process unassigned */
+ basename=filename+uprv_strlen(filename);
+ if(basename>filename && *(basename-1)!=U_FILE_SEP_CHAR) {
+ *basename++=U_FILE_SEP_CHAR;
+ }
+
+ /* first copy misc directory */
+ saveBasename = basename;
+ uprv_strcpy(basename,MISC_DIR);
+ basename = basename + uprv_strlen(MISC_DIR);
+ *basename++=U_FILE_SEP_CHAR;
+
+ /* process unassigned */
+ uprv_strcpy(basename,fileNames[0]);
+ parseMappings(filename,TRUE, test,&errorCode);
+ if(U_FAILURE(errorCode)) {
+ test.errln( "Could not open file %s for reading \n", filename);
+ return errorCode;
+ }
+
+ testAllCodepoints(test);
+
+ usprep_close(profile);
+ pTestIDNA = NULL;
+ free(filename);
+ return errorCode;
+}
+U_CDECL_BEGIN
+
+static void U_CALLCONV
+strprepProfileLineFn(void * /*context*/,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode) {
+ uint32_t mapping[40];
+ char *end, *map;
+ uint32_t code;
+ int32_t length;
+ /*UBool* mapWithNorm = (UBool*) context;*/
+ const char* typeName;
+ uint32_t rangeStart=0,rangeEnd =0;
+
+ if(fieldCount != 3){
+ *pErrorCode = U_INVALID_FORMAT_ERROR;
+ return;
+ }
+
+ typeName = fields[2][0];
+ map = fields[1][0];
+
+ if(uprv_strstr(typeName, usprepTypeNames[USPREP_UNASSIGNED])!=NULL){
+
+ u_parseCodePointRange(fields[0][0], &rangeStart,&rangeEnd, pErrorCode);
+
+ /* store the range */
+ compareFlagsForRange(rangeStart,rangeEnd,USPREP_UNASSIGNED);
+
+ }else if(uprv_strstr(typeName, usprepTypeNames[USPREP_PROHIBITED])!=NULL){
+
+ u_parseCodePointRange(fields[0][0], &rangeStart,&rangeEnd, pErrorCode);
+
+ /* store the range */
+ compareFlagsForRange(rangeStart,rangeEnd,USPREP_PROHIBITED);
+
+ }else if(uprv_strstr(typeName, usprepTypeNames[USPREP_MAP])!=NULL){
+ /* get the character code, field 0 */
+ code=(uint32_t)uprv_strtoul(fields[0][0], &end, 16);
+
+ /* parse the mapping string */
+ length=u_parseCodePoints(map, mapping, sizeof(mapping)/4, pErrorCode);
+
+ /* store the mapping */
+ compareMapping(code,mapping, length,USPREP_MAP);
+
+ }else{
+ *pErrorCode = U_INVALID_FORMAT_ERROR;
+ }
+
+}
+
+U_CDECL_END
+
+static void
+parseMappings(const char *filename,UBool reportError, TestIDNA& test, UErrorCode *pErrorCode) {
+ char *fields[3][2];
+
+ if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ return;
+ }
+
+ u_parseDelimitedFile(filename, ';', fields, 3, strprepProfileLineFn, (void*)filename, pErrorCode);
+
+ //fprintf(stdout,"Number of code points that have mappings with length >1 : %i\n",len);
+
+ if(U_FAILURE(*pErrorCode) && (reportError || *pErrorCode!=U_FILE_ACCESS_ERROR)) {
+ test.errln( "testidn error: u_parseDelimitedFile(\"%s\") failed - %s\n", filename, u_errorName(*pErrorCode));
+ }
+}
+
+
+static inline UStringPrepType
+getValues(uint32_t result, int32_t& value, UBool& isIndex){
+
+ UStringPrepType type;
+
+ if(result == 0){
+ /*
+ * Initial value stored in the mapping table
+ * just return USPREP_TYPE_LIMIT .. so that
+ * the source codepoint is copied to the destination
+ */
+ type = USPREP_TYPE_LIMIT;
+ isIndex =FALSE;
+ value = 0;
+ }else if(result >= _SPREP_TYPE_THRESHOLD){
+ type = (UStringPrepType) (result - _SPREP_TYPE_THRESHOLD);
+ isIndex =FALSE;
+ value = 0;
+ }else{
+ /* get the state */
+ type = USPREP_MAP;
+ /* ascertain if the value is index or delta */
+ if(result & 0x02){
+ isIndex = TRUE;
+ value = result >> 2; //mask off the lower 2 bits and shift
+
+ }else{
+ isIndex = FALSE;
+ value = (int16_t)result;
+ value = (value >> 2);
+
+ }
+ if((result>>2) == _SPREP_MAX_INDEX_VALUE){
+ type = USPREP_DELETE;
+ isIndex =FALSE;
+ value = 0;
+ }
+ }
+ return type;
+}
+
+
+
+static void
+testAllCodepoints(TestIDNA& test){
+ /*
+ {
+ UChar str[19] = {
+ 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0x070F,//prohibited
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74
+ };
+ uint32_t in[19] = {0};
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t inLength=0, outLength=100;
+ char output[100] = {0};
+ punycode_status error;
+ u_strToUTF32((UChar32*)in,19,&inLength,str,19,&status);
+
+ error= punycode_encode(inLength, in, NULL, (uint32_t*)&outLength, output);
+ printf(output);
+
+ }
+ */
+
+ uint32_t i = 0;
+ int32_t unassigned = 0;
+ int32_t prohibited = 0;
+ int32_t mappedWithNorm = 0;
+ int32_t mapped = 0;
+ int32_t noValueInTrie = 0;
+
+ UStringPrepType type;
+ int32_t value;
+ UBool isIndex = FALSE;
+
+ for(i=0;i<=0x10FFFF;i++){
+ uint32_t result = 0;
+ UTRIE_GET16(idnTrie,i, result);
+ type = getValues(result,value, isIndex);
+ if(type != USPREP_TYPE_LIMIT ){
+ if(type == USPREP_UNASSIGNED){
+ unassigned++;
+ }
+ if(type == USPREP_PROHIBITED){
+ prohibited++;
+ }
+ if(type == USPREP_MAP){
+ mapped++;
+ }
+ }else{
+ noValueInTrie++;
+ if(result > 0){
+ test.errln("The return value for 0x%06X is wrong. %i\n",i,result);
+ }
+ }
+ }
+
+ test.logln("Number of Unassinged code points : %i \n",unassigned);
+ test.logln("Number of Prohibited code points : %i \n",prohibited);
+ test.logln("Number of Mapped code points : %i \n",mapped);
+ test.logln("Number of Mapped with NFKC code points : %i \n",mappedWithNorm);
+ test.logln("Number of code points that have no value in Trie: %i \n",noValueInTrie);
+
+
+}
+
+static void
+compareMapping(uint32_t codepoint, uint32_t* mapping,int32_t mapLength,
+ UStringPrepType type){
+ uint32_t result = 0;
+ UTRIE_GET16(idnTrie,codepoint, result);
+
+ int32_t length=0;
+ UBool isIndex;
+ UStringPrepType retType;
+ int32_t value, index=0, delta=0;
+
+ retType = getValues(result,value,isIndex);
+
+
+ if(type != retType && retType != USPREP_DELETE){
+
+ pTestIDNA->errln( "Did not get the assigned type for codepoint 0x%08X. Expected: %i Got: %i\n",codepoint, USPREP_MAP, type);
+
+ }
+
+ if(isIndex){
+ index = value;
+ if(index >= indexes[_SPREP_ONE_UCHAR_MAPPING_INDEX_START] &&
+ index < indexes[_SPREP_TWO_UCHARS_MAPPING_INDEX_START]){
+ length = 1;
+ }else if(index >= indexes[_SPREP_TWO_UCHARS_MAPPING_INDEX_START] &&
+ index < indexes[_SPREP_THREE_UCHARS_MAPPING_INDEX_START]){
+ length = 2;
+ }else if(index >= indexes[_SPREP_THREE_UCHARS_MAPPING_INDEX_START] &&
+ index < indexes[_SPREP_FOUR_UCHARS_MAPPING_INDEX_START]){
+ length = 3;
+ }else{
+ length = mappingData[index++];
+ }
+ }else{
+ delta = value;
+ length = (retType == USPREP_DELETE)? 0 : 1;
+ }
+
+ int32_t realLength =0;
+ /* figure out the real length */
+ for(int32_t j=0; j<mapLength; j++){
+ if(mapping[j] > 0xFFFF){
+ realLength +=2;
+ }else{
+ realLength++;
+ }
+ }
+
+ if(realLength != length){
+ pTestIDNA->errln( "Did not get the expected length. Expected: %i Got: %i\n", mapLength, length);
+ }
+
+ if(isIndex){
+ for(int8_t i =0; i< mapLength; i++){
+ if(mapping[i] <= 0xFFFF){
+ if(mappingData[index+i] != (uint16_t)mapping[i]){
+ pTestIDNA->errln("Did not get the expected result. Expected: 0x%04X Got: 0x%04X \n", mapping[i], mappingData[index+i]);
+ }
+ }else{
+ UChar lead = UTF16_LEAD(mapping[i]);
+ UChar trail = UTF16_TRAIL(mapping[i]);
+ if(mappingData[index+i] != lead ||
+ mappingData[index+i+1] != trail){
+ pTestIDNA->errln( "Did not get the expected result. Expected: 0x%04X 0x%04X Got: 0x%04X 0x%04X", lead, trail, mappingData[index+i], mappingData[index+i+1]);
+ }
+ }
+ }
+ }else{
+ if(retType!=USPREP_DELETE && (codepoint-delta) != (uint16_t)mapping[0]){
+ pTestIDNA->errln("Did not get the expected result. Expected: 0x%04X Got: 0x%04X \n", mapping[0],(codepoint-delta));
+ }
+ }
+
+}
+
+static void
+compareFlagsForRange(uint32_t start, uint32_t end,
+ UStringPrepType type){
+
+ uint32_t result =0 ;
+ UStringPrepType retType;
+ UBool isIndex=FALSE;
+ int32_t value=0;
+/*
+ // supplementary code point
+ UChar __lead16=UTF16_LEAD(0x2323E);
+ int32_t __offset;
+
+ // get data for lead surrogate
+ (result)=_UTRIE_GET_RAW((&idnTrie), index, 0, (__lead16));
+ __offset=(&idnTrie)->getFoldingOffset(result);
+
+ // get the real data from the folded lead/trail units
+ if(__offset>0) {
+ (result)=_UTRIE_GET_RAW((&idnTrie), index, __offset, (0x2323E)&0x3ff);
+ } else {
+ (result)=(uint32_t)((&idnTrie)->initialValue);
+ }
+
+ UTRIE_GET16(&idnTrie,0x2323E, result);
+*/
+ while(start < end+1){
+ UTRIE_GET16(idnTrie,start, result);
+ retType = getValues(result,value,isIndex);
+ if(result > _SPREP_TYPE_THRESHOLD){
+ if(retType != type){
+ pTestIDNA->errln( "FAIL: Did not get the expected type for 0x%06X. Expected: %s Got: %s\n",start,usprepTypeNames[type], usprepTypeNames[retType]);
+ }
+ }else{
+ if(type == USPREP_PROHIBITED && ((result & 0x01) != 0x01)){
+ pTestIDNA->errln( "FAIL: Did not get the expected type for 0x%06X. Expected: %s Got: %s\n",start,usprepTypeNames[type], usprepTypeNames[retType]);
+ }
+ }
+
+ start++;
+ }
+
+}
+
+
+#endif /* #if !UCONFIG_NO_IDNA */
+
+/*
+ * Hey, Emacs, please set the following:
+ *
+ * Local Variables:
+ * indent-tabs-mode: nil
+ * End:
+ *
+ */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/testidna.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/testidna.cpp
new file mode 100644
index 00000000000..d4d7a8d2a24
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/testidna.cpp
@@ -0,0 +1,1583 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: testidna.cpp
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003feb1
+ * created by: Ram Viswanadha
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION
+
+#include <time.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/ustring.h"
+#include "unicode/usprep.h"
+#include "unicode/uniset.h"
+#include "testidna.h"
+#include "idnaref.h"
+#include "nptrans.h"
+#include "unicode/putil.h"
+#include "idnaconf.h"
+
+static const UChar unicodeIn[][41] ={
+ {
+ 0x0644, 0x064A, 0x0647, 0x0645, 0x0627, 0x0628, 0x062A, 0x0643, 0x0644,
+ 0x0645, 0x0648, 0x0634, 0x0639, 0x0631, 0x0628, 0x064A, 0x061F, 0x0000
+ },
+ {
+ 0x4ED6, 0x4EEC, 0x4E3A, 0x4EC0, 0x4E48, 0x4E0D, 0x8BF4, 0x4E2D, 0x6587,
+ 0x0000
+ },
+ {
+ 0x0050, 0x0072, 0x006F, 0x010D, 0x0070, 0x0072, 0x006F, 0x0073, 0x0074,
+ 0x011B, 0x006E, 0x0065, 0x006D, 0x006C, 0x0075, 0x0076, 0x00ED, 0x010D,
+ 0x0065, 0x0073, 0x006B, 0x0079, 0x0000
+ },
+ {
+ 0x05DC, 0x05DE, 0x05D4, 0x05D4, 0x05DD, 0x05E4, 0x05E9, 0x05D5, 0x05D8,
+ 0x05DC, 0x05D0, 0x05DE, 0x05D3, 0x05D1, 0x05E8, 0x05D9, 0x05DD, 0x05E2,
+ 0x05D1, 0x05E8, 0x05D9, 0x05EA, 0x0000
+ },
+ {
+ 0x092F, 0x0939, 0x0932, 0x094B, 0x0917, 0x0939, 0x093F, 0x0928, 0x094D,
+ 0x0926, 0x0940, 0x0915, 0x094D, 0x092F, 0x094B, 0x0902, 0x0928, 0x0939,
+ 0x0940, 0x0902, 0x092C, 0x094B, 0x0932, 0x0938, 0x0915, 0x0924, 0x0947,
+ 0x0939, 0x0948, 0x0902, 0x0000
+ },
+ {
+ 0x306A, 0x305C, 0x307F, 0x3093, 0x306A, 0x65E5, 0x672C, 0x8A9E, 0x3092,
+ 0x8A71, 0x3057, 0x3066, 0x304F, 0x308C, 0x306A, 0x3044, 0x306E, 0x304B,
+ 0x0000
+ },
+/*
+ {
+ 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0xC5BC, 0xB9C8, 0xB098, 0xC88B, 0xC744, 0xAE4C, 0x0000
+ },
+*/
+ {
+ 0x043F, 0x043E, 0x0447, 0x0435, 0x043C, 0x0443, 0x0436, 0x0435, 0x043E,
+ 0x043D, 0x0438, 0x043D, 0x0435, 0x0433, 0x043E, 0x0432, 0x043E, 0x0440,
+ 0x044F, 0x0442, 0x043F, 0x043E, 0x0440, 0x0443, 0x0441, 0x0441, 0x043A,
+ 0x0438, 0x0000
+ },
+ {
+ 0x0050, 0x006F, 0x0072, 0x0071, 0x0075, 0x00E9, 0x006E, 0x006F, 0x0070,
+ 0x0075, 0x0065, 0x0064, 0x0065, 0x006E, 0x0073, 0x0069, 0x006D, 0x0070,
+ 0x006C, 0x0065, 0x006D, 0x0065, 0x006E, 0x0074, 0x0065, 0x0068, 0x0061,
+ 0x0062, 0x006C, 0x0061, 0x0072, 0x0065, 0x006E, 0x0045, 0x0073, 0x0070,
+ 0x0061, 0x00F1, 0x006F, 0x006C, 0x0000
+ },
+ {
+ 0x4ED6, 0x5011, 0x7232, 0x4EC0, 0x9EBD, 0x4E0D, 0x8AAA, 0x4E2D, 0x6587,
+ 0x0000
+ },
+ {
+ 0x0054, 0x1EA1, 0x0069, 0x0073, 0x0061, 0x006F, 0x0068, 0x1ECD, 0x006B,
+ 0x0068, 0x00F4, 0x006E, 0x0067, 0x0074, 0x0068, 0x1EC3, 0x0063, 0x0068,
+ 0x1EC9, 0x006E, 0x00F3, 0x0069, 0x0074, 0x0069, 0x1EBF, 0x006E, 0x0067,
+ 0x0056, 0x0069, 0x1EC7, 0x0074, 0x0000
+ },
+ {
+ 0x0033, 0x5E74, 0x0042, 0x7D44, 0x91D1, 0x516B, 0x5148, 0x751F, 0x0000
+ },
+ {
+ 0x5B89, 0x5BA4, 0x5948, 0x7F8E, 0x6075, 0x002D, 0x0077, 0x0069, 0x0074,
+ 0x0068, 0x002D, 0x0053, 0x0055, 0x0050, 0x0045, 0x0052, 0x002D, 0x004D,
+ 0x004F, 0x004E, 0x004B, 0x0045, 0x0059, 0x0053, 0x0000
+ },
+ {
+ 0x0048, 0x0065, 0x006C, 0x006C, 0x006F, 0x002D, 0x0041, 0x006E, 0x006F,
+ 0x0074, 0x0068, 0x0065, 0x0072, 0x002D, 0x0057, 0x0061, 0x0079, 0x002D,
+ 0x305D, 0x308C, 0x305E, 0x308C, 0x306E, 0x5834, 0x6240, 0x0000
+ },
+ {
+ 0x3072, 0x3068, 0x3064, 0x5C4B, 0x6839, 0x306E, 0x4E0B, 0x0032, 0x0000
+ },
+ {
+ 0x004D, 0x0061, 0x006A, 0x0069, 0x3067, 0x004B, 0x006F, 0x0069, 0x3059,
+ 0x308B, 0x0035, 0x79D2, 0x524D, 0x0000
+ },
+ {
+ 0x30D1, 0x30D5, 0x30A3, 0x30FC, 0x0064, 0x0065, 0x30EB, 0x30F3, 0x30D0,
+ 0x0000
+ },
+ {
+ 0x305D, 0x306E, 0x30B9, 0x30D4, 0x30FC, 0x30C9, 0x3067, 0x0000
+ },
+ // test non-BMP code points
+ {
+ 0xD800, 0xDF00, 0xD800, 0xDF01, 0xD800, 0xDF02, 0xD800, 0xDF03, 0xD800, 0xDF05,
+ 0xD800, 0xDF06, 0xD800, 0xDF07, 0xD800, 0xDF09, 0xD800, 0xDF0A, 0xD800, 0xDF0B,
+ 0x0000
+ },
+ {
+ 0xD800, 0xDF0D, 0xD800, 0xDF0C, 0xD800, 0xDF1E, 0xD800, 0xDF0F, 0xD800, 0xDF16,
+ 0xD800, 0xDF15, 0xD800, 0xDF14, 0xD800, 0xDF12, 0xD800, 0xDF10, 0xD800, 0xDF20,
+ 0xD800, 0xDF21,
+ 0x0000
+ },
+ // Greek
+ {
+ 0x03b5, 0x03bb, 0x03bb, 0x03b7, 0x03bd, 0x03b9, 0x03ba, 0x03ac
+ },
+ // Maltese
+ {
+ 0x0062, 0x006f, 0x006e, 0x0121, 0x0075, 0x0073, 0x0061, 0x0127,
+ 0x0127, 0x0061
+ },
+ // Russian
+ {
+ 0x043f, 0x043e, 0x0447, 0x0435, 0x043c, 0x0443, 0x0436, 0x0435,
+ 0x043e, 0x043d, 0x0438, 0x043d, 0x0435, 0x0433, 0x043e, 0x0432,
+ 0x043e, 0x0440, 0x044f, 0x0442, 0x043f, 0x043e, 0x0440, 0x0443,
+ 0x0441, 0x0441, 0x043a, 0x0438
+ },
+ {
+ 0xFB00, 0xFB01
+ }
+
+};
+
+static const char *asciiIn[] = {
+ "xn--egbpdaj6bu4bxfgehfvwxn",
+ "xn--ihqwcrb4cv8a8dqg056pqjye",
+ "xn--Proprostnemluvesky-uyb24dma41a",
+ "xn--4dbcagdahymbxekheh6e0a7fei0b",
+ "xn--i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd",
+ "xn--n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa",
+/* "xn--989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c",*/
+ "xn--b1abfaaepdrnnbgefbaDotcwatmq2g4l",
+ "xn--PorqunopuedensimplementehablarenEspaol-fmd56a",
+ "xn--ihqwctvzc91f659drss3x8bo0yb",
+ "xn--TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g",
+ "xn--3B-ww4c5e180e575a65lsy2b",
+ "xn---with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n",
+ "xn--Hello-Another-Way--fc4qua05auwb3674vfr0b",
+ "xn--2-u9tlzr9756bt3uc0v",
+ "xn--MajiKoi5-783gue6qz075azm5e",
+ "xn--de-jg4avhby1noc0d",
+ "xn--d9juau41awczczp",
+ "XN--097CCDEKGHQJK",
+ "XN--db8CBHEJLGH4E0AL",
+ "xn--hxargifdar", // Greek
+ "xn--bonusaa-5bb1da", // Maltese
+ "xn--b1abfaaepdrnnbgefbadotcwatmq2g4l", // Russian (Cyrillic)
+ "fffi"
+};
+
+static const char *domainNames[] = {
+ "slip129-37-118-146.nc.us.ibm.net",
+ "saratoga.pe.utexas.edu",
+ "dial-120-45.ots.utexas.edu",
+ "woo-085.dorms.waller.net",
+ "hd30-049.hil.compuserve.com",
+ "pem203-31.pe.ttu.edu",
+ "56K-227.MaxTNT3.pdq.net",
+ "dial-36-2.ots.utexas.edu",
+ "slip129-37-23-152.ga.us.ibm.net",
+ "ts45ip119.cadvision.com",
+ "sdn-ts-004txaustP05.dialsprint.net",
+ "bar-tnt1s66.erols.com",
+ "101.st-louis-15.mo.dial-access.att.net",
+ "h92-245.Arco.COM",
+ "dial-13-2.ots.utexas.edu",
+ "net-redynet29.datamarkets.com.ar",
+ "ccs-shiva28.reacciun.net.ve",
+ "7.houston-11.tx.dial-access.att.net",
+ "ingw129-37-120-26.mo.us.ibm.net",
+ "dialup6.austintx.com",
+ "dns2.tpao.gov.tr",
+ "slip129-37-119-194.nc.us.ibm.net",
+ "cs7.dillons.co.uk.203.119.193.in-addr.arpa",
+ "swprd1.innovplace.saskatoon.sk.ca",
+ "bikini.bologna.maraut.it",
+ "node91.subnet159-198-79.baxter.com",
+ "cust19.max5.new-york.ny.ms.uu.net",
+ "balexander.slip.andrew.cmu.edu",
+ "pool029.max2.denver.co.dynip.alter.net",
+ "cust49.max9.new-york.ny.ms.uu.net",
+ "s61.abq-dialin2.hollyberry.com",
+ "\\u0917\\u0928\\u0947\\u0936.sanjose.ibm.com", //':'(0x003a) produces U_IDNA_STD3_ASCII_RULES_ERROR
+ "www.xn--vea.com",
+ // "www.\\u00E0\\u00B3\\u00AF.com",//' ' (0x0020) produces U_IDNA_STD3_ASCII_RULES_ERROR
+ "www.\\u00C2\\u00A4.com",
+ "www.\\u00C2\\u00A3.com",
+ // "\\u0025", //'%' (0x0025) produces U_IDNA_STD3_ASCII_RULES_ERROR
+ // "\\u005C\\u005C", //'\' (0x005C) produces U_IDNA_STD3_ASCII_RULES_ERROR
+ //"@",
+ //"\\u002F",
+ //"www.\\u0021.com",
+ //"www.\\u0024.com",
+ //"\\u003f",
+ // These yeild U_IDNA_PROHIBITED_ERROR
+ //"\\u00CF\\u0082.com",
+ //"\\u00CE\\u00B2\\u00C3\\u009Fss.com",
+ //"\\u00E2\\u0098\\u00BA.com",
+ "\\u00C3\\u00BC.com",
+
+};
+
+typedef struct ErrorCases ErrorCases;
+
+static const struct ErrorCases{
+
+ UChar unicode[100];
+ const char *ascii;
+ UErrorCode expected;
+ UBool useSTD3ASCIIRules;
+ UBool testToUnicode;
+ UBool testLabel;
+} errorCases[] = {
+ {
+
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, /* www. */
+ 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0x070F,/*prohibited*/
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0x002e, 0x0063, 0x006f, 0x006d, /* com. */
+ 0x0000
+ },
+ "www.XN--8mb5595fsoa28orucya378bqre2tcwop06c5qbw82a1rffmae0361dea96b.com",
+ U_IDNA_PROHIBITED_ERROR,
+ FALSE, FALSE, TRUE
+ },
+
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, /* www. */
+ 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0x0221, 0x0234/*Unassigned code points*/,
+ 0x002e, 0x0063, 0x006f, 0x006d, /* com. */
+ 0x0000
+ },
+ "www.XN--6lA2Bz548Fj1GuA391Bf1Gb1N59Ab29A7iA.com",
+
+ U_IDNA_UNASSIGNED_ERROR,
+ FALSE, FALSE, TRUE
+ },
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, /* www. */
+ 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0x0644, 0x064A, 0x0647,/*Arabic code points. Cannot mix RTL with LTR*/
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0x002e, 0x0063, 0x006f, 0x006d, /* com. */
+ 0x0000
+ },
+ "www.xn--ghBGI4851OiyA33VqrD6Az86C4qF83CtRv93D5xBk15AzfG0nAgA0578DeA71C.com",
+ U_IDNA_CHECK_BIDI_ERROR,
+ FALSE, FALSE, TRUE
+ },
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, /* www. */
+ /* labels cannot begin with an HYPHEN */
+ 0x002D, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0x002E,
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0x002e, 0x0063, 0x006f, 0x006d, /* com. */
+ 0x0000
+
+ },
+ "www.xn----b95Ew8SqA315Ao5FbuMlnNmhA.com",
+ U_IDNA_STD3_ASCII_RULES_ERROR,
+ TRUE, FALSE, FALSE
+ },
+ {
+ {
+ /* correct ACE-prefix followed by unicode */
+ 0x0077, 0x0077, 0x0077, 0x002e, /* www. */
+ 0x0078, 0x006e, 0x002d,0x002d, /* ACE Prefix */
+ 0x002D, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0x002D,
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0x002e, 0x0063, 0x006f, 0x006d, /* com. */
+ 0x0000
+
+ },
+ /* wrong ACE-prefix followed by valid ACE-encoded ASCII */
+ "www.XY-----b91I0V65S96C2A355Cw1E5yCeQr19CsnP1mFfmAE0361DeA96B.com",
+ U_IDNA_ACE_PREFIX_ERROR,
+ FALSE, FALSE, FALSE
+ },
+ /* cannot verify U_IDNA_VERIFICATION_ERROR */
+
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, /* www. */
+ 0xC138, 0xACC4, 0xC758, 0xBAA8, 0xB4E0, 0xC0AC, 0xB78C, 0xB4E4, 0xC774,
+ 0xD55C, 0xAD6D, 0xC5B4, 0xB97C, 0xC774, 0xD574, 0xD55C, 0xB2E4, 0xBA74,
+ 0xC5BC, 0xB9C8, 0xB098, 0xC88B, 0xC744, 0xAE4C,
+ 0x002e, 0x0063, 0x006f, 0x006d, /* com. */
+ 0x0000
+ },
+ "www.xn--989AoMsVi5E83Db1D2A355Cv1E0vAk1DwRv93D5xBh15A0Dt30A5JpSD879Ccm6FeA98C.com",
+ U_IDNA_LABEL_TOO_LONG_ERROR,
+ FALSE, FALSE, TRUE
+ },
+
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, /* www. */
+ 0x0030, 0x0644, 0x064A, 0x0647, 0x0031, /* Arabic code points squashed between EN codepoints */
+ 0x002e, 0x0063, 0x006f, 0x006d, /* com. */
+ 0x0000
+ },
+ "www.xn--01-tvdmo.com",
+ U_IDNA_CHECK_BIDI_ERROR,
+ FALSE, FALSE, TRUE
+ },
+
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, // www.
+ 0x206C, 0x0644, 0x064A, 0x0647, 0x206D, // Arabic code points squashed between BN codepoints
+ 0x002e, 0x0063, 0x006f, 0x006d, // com.
+ 0x0000
+ },
+ "www.XN--ghbgi278xia.com",
+ U_IDNA_PROHIBITED_ERROR,
+ FALSE, FALSE, TRUE
+ },
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, // www.
+ 0x002D, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, // HYPHEN at the start of label
+ 0x002e, 0x0063, 0x006f, 0x006d, // com.
+ 0x0000
+ },
+ "www.-abcde.com",
+ U_IDNA_STD3_ASCII_RULES_ERROR,
+ TRUE, FALSE, FALSE
+ },
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, // www.
+ 0x0041, 0x0042, 0x0043, 0x0044, 0x0045,0x002D, // HYPHEN at the end of the label
+ 0x002e, 0x0063, 0x006f, 0x006d, // com.
+ 0x0000
+ },
+ "www.abcde-.com",
+ U_IDNA_STD3_ASCII_RULES_ERROR,
+ TRUE, FALSE, FALSE
+ },
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, // www.
+ 0x0041, 0x0042, 0x0043, 0x0044, 0x0045,0x0040, // Containing non LDH code point
+ 0x002e, 0x0063, 0x006f, 0x006d, // com.
+ 0x0000
+ },
+ "www.abcde@.com",
+ U_IDNA_STD3_ASCII_RULES_ERROR,
+ TRUE, FALSE, FALSE
+ },
+ {
+ {
+ 0x0077, 0x0077, 0x0077, 0x002e, // www.
+ // zero length label
+ 0x002e, 0x0063, 0x006f, 0x006d, // com.
+ 0x0000
+ },
+ "www..com",
+ U_IDNA_ZERO_LENGTH_LABEL_ERROR,
+ TRUE, FALSE, FALSE
+ },
+ {
+ {0},
+ NULL,
+ U_ILLEGAL_ARGUMENT_ERROR,
+ TRUE, TRUE, FALSE
+ }
+};
+
+
+
+
+#define MAX_DEST_SIZE 300
+
+void TestIDNA::debug(const UChar* src, int32_t srcLength, int32_t options){
+ UParseError parseError;
+ UErrorCode transStatus = U_ZERO_ERROR;
+ UErrorCode prepStatus = U_ZERO_ERROR;
+ NamePrepTransform* trans = NamePrepTransform::createInstance(parseError,transStatus);
+ int32_t prepOptions = (((options & UIDNA_ALLOW_UNASSIGNED) != 0) ? USPREP_ALLOW_UNASSIGNED: 0);
+ UStringPrepProfile* prep = usprep_open(NULL,"uidna",&prepStatus);
+ UChar *transOut=NULL, *prepOut=NULL;
+ int32_t transOutLength=0, prepOutLength=0;
+
+
+ transOutLength = trans->process(src,srcLength,transOut, 0, prepOptions>0, &parseError, transStatus);
+ if( transStatus == U_BUFFER_OVERFLOW_ERROR){
+ transStatus = U_ZERO_ERROR;
+ transOut = (UChar*) malloc(U_SIZEOF_UCHAR * transOutLength);
+ transOutLength = trans->process(src,srcLength,transOut, transOutLength, prepOptions>0, &parseError, transStatus);
+ }
+
+ prepOutLength = usprep_prepare(prep, src, srcLength, prepOut, 0, prepOptions, &parseError, &prepStatus);
+
+ if( prepStatus == U_BUFFER_OVERFLOW_ERROR){
+ prepStatus = U_ZERO_ERROR;
+ prepOut = (UChar*) malloc(U_SIZEOF_UCHAR * prepOutLength);
+ prepOutLength = usprep_prepare(prep, src, srcLength, prepOut, prepOutLength, prepOptions, &parseError, &prepStatus);
+ }
+
+ if(UnicodeString(transOut,transOutLength)!= UnicodeString(prepOut, prepOutLength)){
+ errln("Failed. Expected: " + prettify(UnicodeString(transOut, transOutLength))
+ + " Got: " + prettify(UnicodeString(prepOut,prepOutLength)));
+ }
+ free(transOut);
+ free(prepOut);
+ delete trans;
+
+}
+
+void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* testName,
+ UBool useSTD3ASCIIRules,UErrorCode expectedStatus,
+ UBool doCompare, UBool testUnassigned, TestFunc func, UBool testSTD3ASCIIRules){
+
+ UErrorCode status = U_ZERO_ERROR;
+ UChar destStack[MAX_DEST_SIZE];
+ int32_t destLen = 0;
+ UChar* dest = NULL;
+ int32_t expectedLen = (expected != NULL) ? u_strlen(expected) : 0;
+ int32_t options = (useSTD3ASCIIRules == TRUE) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
+ UParseError parseError;
+ int32_t tSrcLen = 0;
+ UChar* tSrc = NULL;
+
+ if(src != NULL){
+ tSrcLen = u_strlen(src);
+ tSrc =(UChar*) malloc( U_SIZEOF_UCHAR * tSrcLen );
+ memcpy(tSrc,src,tSrcLen * U_SIZEOF_UCHAR);
+ }
+
+ // test null-terminated source and return value of number of UChars required
+ destLen = func(src,-1,NULL,0,options, &parseError , &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; // reset error code
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,-1,dest,destLen+1,options, &parseError, &status);
+ // TODO : compare output with expected
+ if(U_SUCCESS(status) && expectedStatus != U_IDNA_STD3_ASCII_RULES_ERROR&& (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ errln("Did not get the expected result for "+UnicodeString(testName) +" null terminated source. Expected : "
+ + prettify(UnicodeString(expected,expectedLen))
+ + " Got: " + prettify(UnicodeString(dest,destLen))
+ );
+ }
+ }else{
+ errln( "%s null terminated source failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+
+ if(status != expectedStatus){
+ errln( "Did not get the expected error for "+
+ UnicodeString(testName)+
+ " null terminated source. Expected: " +UnicodeString(u_errorName(expectedStatus))
+ + " Got: "+ UnicodeString(u_errorName(status))
+ + " Source: " + prettify(UnicodeString(src))
+ );
+ free(tSrc);
+ return;
+ }
+ if(testUnassigned ){
+ status = U_ZERO_ERROR;
+ destLen = func(src,-1,NULL,0,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; // reset error code
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,-1,dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ // TODO : compare output with expected
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ //errln("Did not get the expected result for %s null terminated source with both options set.\n",testName);
+ errln("Did not get the expected result for "+UnicodeString(testName) +
+ " null terminated source "+ prettify(src) +
+ " with both options set. Expected: "+ prettify(UnicodeString(expected,expectedLen))+
+ "Got: " + prettify(UnicodeString(dest,destLen)));
+
+ debug(src,-1,options | UIDNA_ALLOW_UNASSIGNED);
+
+ }
+ }else{
+ errln( "%s null terminated source failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ //testing query string
+ if(status != expectedStatus && expectedStatus != U_IDNA_UNASSIGNED_ERROR){
+ errln( "Did not get the expected error for "+
+ UnicodeString(testName)+
+ " null terminated source with options set. Expected: " +UnicodeString(u_errorName(expectedStatus))
+ + " Got: "+ UnicodeString(u_errorName(status))
+ + " Source: " + prettify(UnicodeString(src))
+ );
+ }
+ }
+
+ status = U_ZERO_ERROR;
+
+ // test source with lengthand return value of number of UChars required
+ destLen = func(tSrc, tSrcLen, NULL,0,options, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; // reset error code
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,u_strlen(src),dest,destLen+1,options, &parseError, &status);
+ // TODO : compare output with expected
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ errln("Did not get the expected result for %s with source length.\n",testName);
+ }
+ }else{
+ errln( "%s with source length failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+
+ if(status != expectedStatus){
+ errln( "Did not get the expected error for "+
+ UnicodeString(testName)+
+ " with source length. Expected: " +UnicodeString(u_errorName(expectedStatus))
+ + " Got: "+ UnicodeString(u_errorName(status))
+ + " Source: " + prettify(UnicodeString(src))
+ );
+ }
+ if(testUnassigned){
+ status = U_ZERO_ERROR;
+
+ destLen = func(tSrc,tSrcLen,NULL,0,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; // reset error code
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ // TODO : compare output with expected
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ errln("Did not get the expected result for %s with source length and both options set.\n",testName);
+ }
+ }else{
+ errln( "%s with source length failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ //testing query string
+ if(status != expectedStatus && expectedStatus != U_IDNA_UNASSIGNED_ERROR){
+ errln( "Did not get the expected error for "+
+ UnicodeString(testName)+
+ " with source length and options set. Expected: " +UnicodeString(u_errorName(expectedStatus))
+ + " Got: "+ UnicodeString(u_errorName(status))
+ + " Source: " + prettify(UnicodeString(src))
+ );
+ }
+ }
+
+ status = U_ZERO_ERROR;
+ if(testSTD3ASCIIRules==TRUE){
+ destLen = func(src,-1,NULL,0,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; // reset error code
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,-1,dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+ // TODO : compare output with expected
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ //errln("Did not get the expected result for %s null terminated source with both options set.\n",testName);
+ errln("Did not get the expected result for "+UnicodeString(testName) +" null terminated source with both options set. Expected: "+ prettify(UnicodeString(expected,expectedLen)));
+
+ }
+ }else{
+ errln( "%s null terminated source failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ //testing query string
+ if(status != expectedStatus){
+ errln( "Did not get the expected error for "+
+ UnicodeString(testName)+
+ " null terminated source with options set. Expected: " +UnicodeString(u_errorName(expectedStatus))
+ + " Got: "+ UnicodeString(u_errorName(status))
+ + " Source: " + prettify(UnicodeString(src))
+ );
+ }
+
+ status = U_ZERO_ERROR;
+
+ destLen = func(tSrc,tSrcLen,NULL,0,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+
+ if(status == U_BUFFER_OVERFLOW_ERROR){
+ status = U_ZERO_ERROR; // reset error code
+ if(destLen+1 < MAX_DEST_SIZE){
+ dest = destStack;
+ destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
+ // TODO : compare output with expected
+ if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+ errln("Did not get the expected result for %s with source length and both options set.\n",testName);
+ }
+ }else{
+ errln( "%s with source length failed. Requires destCapacity > 300\n",testName);
+ }
+ }
+ //testing query string
+ if(status != expectedStatus && expectedStatus != U_IDNA_UNASSIGNED_ERROR){
+ errln( "Did not get the expected error for "+
+ UnicodeString(testName)+
+ " with source length and options set. Expected: " +UnicodeString(u_errorName(expectedStatus))
+ + " Got: "+ UnicodeString(u_errorName(status))
+ + " Source: " + prettify(UnicodeString(src))
+ );
+ }
+ }
+ free(tSrc);
+}
+
+void TestIDNA::testCompare(const UChar* s1, int32_t s1Len,
+ const UChar* s2, int32_t s2Len,
+ const char* testName, CompareFunc func,
+ UBool isEqual){
+
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t retVal = func(s1,-1,s2,-1,UIDNA_DEFAULT,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ errln("Did not get the expected result for %s with null termniated strings.\n",testName);
+ }
+ if(U_FAILURE(status)){
+ errln( "%s null terminated source failed. Error: %s\n", testName,u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ retVal = func(s1,-1,s2,-1,UIDNA_ALLOW_UNASSIGNED,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ errln("Did not get the expected result for %s with null termniated strings with options set.\n", testName);
+ }
+ if(U_FAILURE(status)){
+ errln( "%s null terminated source and options set failed. Error: %s\n",testName, u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ retVal = func(s1,s1Len,s2,s2Len,UIDNA_DEFAULT,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ errln("Did not get the expected result for %s with string length.\n",testName);
+ }
+ if(U_FAILURE(status)){
+ errln( "%s with string length. Error: %s\n",testName, u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ retVal = func(s1,s1Len,s2,s2Len,UIDNA_ALLOW_UNASSIGNED,&status);
+
+ if(isEqual==TRUE && retVal !=0){
+ errln("Did not get the expected result for %s with string length and options set.\n",testName);
+ }
+ if(U_FAILURE(status)){
+ errln( "%s with string length and options set. Error: %s\n", u_errorName(status), testName);
+ }
+}
+
+void TestIDNA::testToASCII(const char* testName, TestFunc func){
+
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+
+ for(i=0;i< (int32_t)(sizeof(unicodeIn)/sizeof(unicodeIn[0])); i++){
+ u_charsToUChars(asciiIn[i],buf, (int32_t)(strlen(asciiIn[i])+1));
+ testAPI(unicodeIn[i], buf,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+
+ }
+}
+
+void TestIDNA::testToUnicode(const char* testName, TestFunc func){
+
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+
+ for(i=0;i< (int32_t)(sizeof(asciiIn)/sizeof(asciiIn[0])); i++){
+ u_charsToUChars(asciiIn[i],buf, (int32_t)(strlen(asciiIn[i])+1));
+ testAPI(buf,unicodeIn[i],testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ }
+}
+
+
+void TestIDNA::testIDNToUnicode(const char* testName, TestFunc func){
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+ UChar expected[MAX_DEST_SIZE];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t bufLen = 0;
+ UParseError parseError;
+ for(i=0;i< (int32_t)(sizeof(domainNames)/sizeof(domainNames[0])); i++){
+ bufLen = (int32_t)strlen(domainNames[i]);
+ bufLen = u_unescape(domainNames[i],buf, bufLen+1);
+ func(buf,bufLen,expected,MAX_DEST_SIZE, UIDNA_ALLOW_UNASSIGNED, &parseError,&status);
+ if(U_FAILURE(status)){
+ errln( "%s failed to convert domainNames[%i].Error: %s \n",testName, i, u_errorName(status));
+ break;
+ }
+ testAPI(buf,expected,testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ //test toUnicode with all labels in the string
+ testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ if(U_FAILURE(status)){
+ errln( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
+ break;
+ }
+ }
+
+}
+
+void TestIDNA::testIDNToASCII(const char* testName, TestFunc func){
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+ UChar expected[MAX_DEST_SIZE];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t bufLen = 0;
+ UParseError parseError;
+ for(i=0;i< (int32_t)(sizeof(domainNames)/sizeof(domainNames[0])); i++){
+ bufLen = (int32_t)strlen(domainNames[i]);
+ bufLen = u_unescape(domainNames[i],buf, bufLen+1);
+ func(buf,bufLen,expected,MAX_DEST_SIZE, UIDNA_ALLOW_UNASSIGNED, &parseError,&status);
+ if(U_FAILURE(status)){
+ errln( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
+ break;
+ }
+ testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+ //test toASCII with all labels in the string
+ testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, FALSE, TRUE, func);
+ if(U_FAILURE(status)){
+ errln( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
+ break;
+ }
+ }
+
+}
+
+void TestIDNA::testCompare(const char* testName, CompareFunc func){
+ int32_t i;
+
+
+ UChar www[] = {0x0057, 0x0057, 0x0057, 0x002E, 0x0000};
+ UChar com[] = {0x002E, 0x0043, 0x004F, 0x004D, 0x0000};
+ UChar buf[MAX_DEST_SIZE]={0x0057, 0x0057, 0x0057, 0x002E, 0x0000};
+
+ UnicodeString source(www), uni0(www),uni1(www), ascii0(www), ascii1(www);
+
+ uni0.append(unicodeIn[0]);
+ uni0.append(com);
+ uni0.append((UChar)0x0000);
+
+ uni1.append(unicodeIn[1]);
+ uni1.append(com);
+ uni1.append((UChar)0x0000);
+
+ ascii0.append(asciiIn[0]);
+ ascii0.append(com);
+ ascii0.append((UChar)0x0000);
+
+ ascii1.append(asciiIn[1]);
+ ascii1.append(com);
+ ascii1.append((UChar)0x0000);
+
+ for(i=0;i< (int32_t)(sizeof(unicodeIn)/sizeof(unicodeIn[0])); i++){
+
+ u_charsToUChars(asciiIn[i],buf+4, (int32_t)(strlen(asciiIn[i])+1));
+ u_strcat(buf,com);
+
+ // for every entry in unicodeIn array
+ // prepend www. and append .com
+ source.truncate(4);
+ source.append(unicodeIn[i]);
+ source.append(com);
+ source.append((UChar)0x0000);
+ // a) compare it with itself
+ const UChar* src = source.getBuffer();
+ int32_t srcLen = u_strlen(src); //subtract null
+
+ testCompare(src,srcLen,src,srcLen,testName, func, TRUE);
+
+ // b) compare it with asciiIn equivalent
+ testCompare(src,srcLen,buf,u_strlen(buf),testName, func,TRUE);
+
+ // c) compare it with unicodeIn not equivalent
+ if(i==0){
+ testCompare(src,srcLen,uni1.getBuffer(),uni1.length()-1,testName, func,FALSE);
+ }else{
+ testCompare(src,srcLen,uni0.getBuffer(),uni0.length()-1,testName, func,FALSE);
+ }
+ // d) compare it with asciiIn not equivalent
+ if(i==0){
+ testCompare(src,srcLen,ascii1.getBuffer(),ascii1.length()-1,testName, func,FALSE);
+ }else{
+ testCompare(src,srcLen,ascii0.getBuffer(),ascii0.length()-1,testName, func,FALSE);
+ }
+
+ }
+}
+
+#if 0
+
+static int32_t
+getNextSeperator(UChar *src,int32_t srcLength,
+ UChar **limit){
+ if(srcLength == -1){
+ int32_t i;
+ for(i=0 ; ;i++){
+ if(src[i] == 0){
+ *limit = src + i; // point to null
+ return i;
+ }
+ if(src[i]==0x002e){
+ *limit = src + (i+1); // go past the delimiter
+ return i;
+ }
+ }
+ // we have not found the delimiter
+ if(i==srcLength){
+ *limit = src+srcLength;
+ }
+ return i;
+ }else{
+ int32_t i;
+ for(i=0;i<srcLength;i++){
+ if(src[i]==0x002e){
+ *limit = src + (i+1); // go past the delimiter
+ return i;
+ }
+ }
+ // we have not found the delimiter
+ if(i==srcLength){
+ *limit = src+srcLength;
+ }
+ return i;
+ }
+}
+
+void printPunycodeOutput(){
+
+ UChar dest[MAX_DEST_SIZE];
+ int32_t destCapacity=MAX_DEST_SIZE;
+ UChar* start;
+ UChar* limit;
+ int32_t labelLen=0;
+ UBool caseFlags[MAX_DEST_SIZE];
+
+ for(int32_t i=0;i< sizeof(errorCases)/sizeof(errorCases[0]);i++){
+ ErrorCases errorCase = errorCases[i];
+ UErrorCode status = U_ZERO_ERROR;
+ start = errorCase.unicode;
+ int32_t srcLen = u_strlen(start);
+ labelLen = getNextSeperator(start,srcLen,&limit);
+ start = limit;
+ labelLen=getNextSeperator(start,srcLen-labelLen,&limit);
+ int32_t destLen = u_strToPunycode(dest,destCapacity,start,labelLen,caseFlags, &status);
+ if(U_FAILURE(status)){
+ printf("u_strToPunycode failed for index %i\n",i);
+ continue;
+ }
+ for(int32_t j=0; j<destLen; j++){
+ printf("%c",(char)dest[j]);
+ }
+ printf("\n");
+ }
+}
+#endif
+
+void TestIDNA::testErrorCases(const char* IDNToASCIIName, TestFunc IDNToASCII,
+ const char* IDNToUnicodeName, TestFunc IDNToUnicode){
+ UChar buf[MAX_DEST_SIZE];
+ int32_t bufLen=0;
+
+ for(int32_t i=0;i< (int32_t)(sizeof(errorCases)/sizeof(errorCases[0]));i++){
+ ErrorCases errorCase = errorCases[i];
+ UChar* src =NULL;
+ if(errorCase.ascii != NULL){
+ bufLen = (int32_t)strlen(errorCase.ascii);
+ u_charsToUChars(errorCase.ascii,buf, bufLen+1);
+ }else{
+ bufLen = 1 ;
+ memset(buf,0,U_SIZEOF_UCHAR*MAX_DEST_SIZE);
+ }
+
+ if(errorCase.unicode[0]!=0){
+ src = errorCase.unicode;
+ }
+ // test toASCII
+ testAPI(src,buf,
+ IDNToASCIIName, errorCase.useSTD3ASCIIRules,
+ errorCase.expected, TRUE, TRUE, IDNToASCII);
+ if(errorCase.testLabel ==TRUE){
+ testAPI(src,buf,
+ IDNToASCIIName, errorCase.useSTD3ASCIIRules,
+ errorCase.expected, FALSE,TRUE, IDNToASCII);
+ }
+ if(errorCase.testToUnicode ==TRUE){
+ testAPI((src==NULL)? NULL : buf,src,
+ IDNToUnicodeName, errorCase.useSTD3ASCIIRules,
+ errorCase.expected, TRUE, TRUE, IDNToUnicode);
+ }
+
+ }
+
+}
+/*
+void TestIDNA::testConformance(const char* toASCIIName, TestFunc toASCII,
+ const char* IDNToASCIIName, TestFunc IDNToASCII,
+ const char* IDNToUnicodeName, TestFunc IDNToUnicode,
+ const char* toUnicodeName, TestFunc toUnicode){
+ UChar src[MAX_DEST_SIZE];
+ int32_t srcLen=0;
+ UChar expected[MAX_DEST_SIZE];
+ int32_t expectedLen = 0;
+ for(int32_t i=0;i< (int32_t)(sizeof(conformanceTestCases)/sizeof(conformanceTestCases[0]));i++){
+ const char* utf8Chars1 = conformanceTestCases[i].in;
+ int32_t utf8Chars1Len = (int32_t)strlen(utf8Chars1);
+ const char* utf8Chars2 = conformanceTestCases[i].out;
+ int32_t utf8Chars2Len = (utf8Chars2 == NULL) ? 0 : (int32_t)strlen(utf8Chars2);
+
+ UErrorCode status = U_ZERO_ERROR;
+ u_strFromUTF8(src,MAX_DEST_SIZE,&srcLen,utf8Chars1,utf8Chars1Len,&status);
+ if(U_FAILURE(status)){
+ errln(UnicodeString("Conversion of UTF8 source in conformanceTestCases[") + i +UnicodeString( "].in ( ")+prettify(utf8Chars1) +UnicodeString(" ) failed. Error: ")+ UnicodeString(u_errorName(status)));
+ continue;
+ }
+ if(utf8Chars2 != NULL){
+ u_strFromUTF8(expected,MAX_DEST_SIZE,&expectedLen,utf8Chars2,utf8Chars2Len, &status);
+ if(U_FAILURE(status)){
+ errln(UnicodeString("Conversion of UTF8 source in conformanceTestCases[") + i +UnicodeString( "].in ( ")+prettify(utf8Chars1) +UnicodeString(" ) failed. Error: ")+ UnicodeString(u_errorName(status)));
+ continue;
+ }
+ }
+
+ if(conformanceTestCases[i].expectedStatus != U_ZERO_ERROR){
+ // test toASCII
+ testAPI(src,expected,
+ IDNToASCIIName, FALSE,
+ conformanceTestCases[i].expectedStatus,
+ TRUE,
+ (conformanceTestCases[i].expectedStatus != U_IDNA_UNASSIGNED_ERROR),
+ IDNToASCII);
+
+ testAPI(src,expected,
+ toASCIIName, FALSE,
+ conformanceTestCases[i].expectedStatus, TRUE,
+ (conformanceTestCases[i].expectedStatus != U_IDNA_UNASSIGNED_ERROR),
+ toASCII);
+ }
+
+ testAPI(src,src,
+ IDNToUnicodeName, FALSE,
+ conformanceTestCases[i].expectedStatus, TRUE, TRUE, IDNToUnicode);
+ testAPI(src,src,
+ toUnicodeName, FALSE,
+ conformanceTestCases[i].expectedStatus, TRUE, TRUE, toUnicode);
+
+ }
+
+}
+*/
+// test and ascertain
+// func(func(func(src))) == func(src)
+void TestIDNA::testChaining(const UChar* src,int32_t numIterations,const char* testName,
+ UBool useSTD3ASCIIRules, UBool caseInsensitive, TestFunc func){
+ UChar even[MAX_DEST_SIZE];
+ UChar odd[MAX_DEST_SIZE];
+ UChar expected[MAX_DEST_SIZE];
+ int32_t i=0,evenLen=0,oddLen=0,expectedLen=0;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t srcLen = u_strlen(src);
+ int32_t options = (useSTD3ASCIIRules == TRUE) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
+ UParseError parseError;
+
+ // test null-terminated source
+ expectedLen = func(src,-1,expected,MAX_DEST_SIZE, options, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source failed. Error: %s\n",testName, u_errorName(status));
+ }
+ memcpy(odd,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ memcpy(even,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ for(;i<=numIterations; i++){
+ if((i%2) ==0){
+ evenLen = func(odd,-1,even,MAX_DEST_SIZE,options, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source failed\n",testName);
+ break;
+ }
+ }else{
+ oddLen = func(even,-1,odd,MAX_DEST_SIZE,options, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source failed\n",testName);
+ break;
+ }
+ }
+ }
+ if(caseInsensitive ==TRUE){
+ if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
+ u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
+
+ errln("Chaining for %s null terminated source failed\n",testName);
+ }
+ }else{
+ if( u_strncmp(even,expected,expectedLen) != 0 ||
+ u_strncmp(odd,expected,expectedLen) !=0 ){
+
+ errln("Chaining for %s null terminated source failed\n",testName);
+ }
+ }
+
+ // test null-terminated source
+ status = U_ZERO_ERROR;
+ expectedLen = func(src,-1,expected,MAX_DEST_SIZE,options|UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source with options set failed. Error: %s\n",testName, u_errorName(status));
+ }
+ memcpy(odd,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ memcpy(even,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ for(;i<=numIterations; i++){
+ if((i%2) ==0){
+ evenLen = func(odd,-1,even,MAX_DEST_SIZE,options|UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source with options set failed\n",testName);
+ break;
+ }
+ }else{
+ oddLen = func(even,-1,odd,MAX_DEST_SIZE,options|UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source with options set failed\n",testName);
+ break;
+ }
+ }
+ }
+ if(caseInsensitive ==TRUE){
+ if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
+ u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
+
+ errln("Chaining for %s null terminated source with options set failed\n",testName);
+ }
+ }else{
+ if( u_strncmp(even,expected,expectedLen) != 0 ||
+ u_strncmp(odd,expected,expectedLen) !=0 ){
+
+ errln("Chaining for %s null terminated source with options set failed\n",testName);
+ }
+ }
+
+
+ // test source with length
+ status = U_ZERO_ERROR;
+ expectedLen = func(src,srcLen,expected,MAX_DEST_SIZE,options, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source failed. Error: %s\n",testName, u_errorName(status));
+ }
+ memcpy(odd,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ memcpy(even,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ for(;i<=numIterations; i++){
+ if((i%2) ==0){
+ evenLen = func(odd,oddLen,even,MAX_DEST_SIZE,options, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s source with source length failed\n",testName);
+ break;
+ }
+ }else{
+ oddLen = func(even,evenLen,odd,MAX_DEST_SIZE,options, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s source with source length failed\n",testName);
+ break;
+ }
+ }
+ }
+ if(caseInsensitive ==TRUE){
+ if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
+ u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
+
+ errln("Chaining for %s source with source length failed\n",testName);
+ }
+ }else{
+ if( u_strncmp(even,expected,expectedLen) != 0 ||
+ u_strncmp(odd,expected,expectedLen) !=0 ){
+
+ errln("Chaining for %s source with source length failed\n",testName);
+ }
+ }
+ status = U_ZERO_ERROR;
+ expectedLen = func(src,srcLen,expected,MAX_DEST_SIZE,options|UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s null terminated source with options set failed. Error: %s\n",testName, u_errorName(status));
+ }
+ memcpy(odd,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ memcpy(even,expected,(expectedLen+1) * U_SIZEOF_UCHAR);
+ for(;i<=numIterations; i++){
+ if((i%2) ==0){
+ evenLen = func(odd,oddLen,even,MAX_DEST_SIZE,options|UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s source with source length and options set failed\n",testName);
+ break;
+ }
+ }else{
+ oddLen = func(even,evenLen,odd,MAX_DEST_SIZE,options|UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
+ if(U_FAILURE(status)){
+ errln("%s source with source length and options set failed\n",testName);
+ break;
+ }
+ }
+ }
+ if(caseInsensitive ==TRUE){
+ if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
+ u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
+
+ errln("Chaining for %s source with source length and options set failed\n",testName);
+ }
+ }else{
+ if( u_strncmp(even,expected,expectedLen) != 0 ||
+ u_strncmp(odd,expected,expectedLen) !=0 ){
+
+ errln("Chaining for %s source with source length and options set failed\n",testName);
+ }
+ }
+}
+void TestIDNA::testChaining(const char* toASCIIName, TestFunc toASCII,
+ const char* toUnicodeName, TestFunc toUnicode){
+ int32_t i;
+ UChar buf[MAX_DEST_SIZE];
+
+ for(i=0;i< (int32_t)(sizeof(asciiIn)/sizeof(asciiIn[0])); i++){
+ u_charsToUChars(asciiIn[i],buf, (int32_t)(strlen(asciiIn[i])+1));
+ testChaining(buf,5,toUnicodeName, FALSE, FALSE, toUnicode);
+ }
+ for(i=0;i< (int32_t)(sizeof(unicodeIn)/sizeof(unicodeIn[0])); i++){
+ testChaining(unicodeIn[i], 5,toASCIIName, FALSE, TRUE, toASCII);
+ }
+}
+
+
+void TestIDNA::testRootLabelSeparator(const char* testName, CompareFunc func,
+ const char* IDNToASCIIName, TestFunc IDNToASCII,
+ const char* IDNToUnicodeName, TestFunc IDNToUnicode){
+ int32_t i;
+
+
+ UChar www[] = {0x0057, 0x0057, 0x0057, 0x002E, 0x0000};
+ UChar com[] = {0x002E, 0x0043, 0x004F, 0x004D, 0x002E, /* root label separator */0x0000};
+ UChar buf[MAX_DEST_SIZE]={0x0057, 0x0057, 0x0057, 0x002E, 0x0000};
+
+ UnicodeString source(www), uni0(www),uni1(www), ascii0(www), ascii1(www);
+
+ uni0.append(unicodeIn[0]);
+ uni0.append(com);
+ uni0.append((UChar)0x0000);
+
+ uni1.append(unicodeIn[1]);
+ uni1.append(com);
+ uni1.append((UChar)0x0000);
+
+ ascii0.append(asciiIn[0]);
+ ascii0.append(com);
+ ascii0.append((UChar)0x0000);
+
+ ascii1.append(asciiIn[1]);
+ ascii1.append(com);
+ ascii1.append((UChar)0x0000);
+
+ for(i=0;i< (int32_t)(sizeof(unicodeIn)/sizeof(unicodeIn[0])); i++){
+
+ u_charsToUChars(asciiIn[i],buf+4, (int32_t)(strlen(asciiIn[i])+1));
+ u_strcat(buf,com);
+
+ // for every entry in unicodeIn array
+ // prepend www. and append .com
+ source.truncate(4);
+ source.append(unicodeIn[i]);
+ source.append(com);
+ source.append((UChar)0x0000);
+
+ const UChar* src = source.getBuffer();
+ int32_t srcLen = u_strlen(src); //subtract null
+
+ // b) compare it with asciiIn equivalent
+ testCompare(src,srcLen,buf,u_strlen(buf),testName, func,TRUE);
+
+ // a) compare it with itself
+ testCompare(src,srcLen,src,srcLen,testName, func,TRUE);
+
+
+ // IDNToASCII comparison
+ testAPI(src,buf,IDNToASCIIName,FALSE,U_ZERO_ERROR,TRUE, TRUE, IDNToASCII);
+ // IDNToUnicode comparison
+ testAPI(buf,src,IDNToUnicodeName, FALSE,U_ZERO_ERROR, TRUE, TRUE, IDNToUnicode);
+
+ // c) compare it with unicodeIn not equivalent
+ if(i==0){
+ testCompare(src,srcLen,uni1.getBuffer(),uni1.length()-1,testName, func,FALSE);
+ }else{
+ testCompare(src,srcLen,uni0.getBuffer(),uni0.length()-1,testName, func,FALSE);
+ }
+ // d) compare it with asciiIn not equivalent
+ if(i==0){
+ testCompare(src,srcLen,ascii1.getBuffer(),ascii1.length()-1,testName, func,FALSE);
+ }else{
+ testCompare(src,srcLen,ascii0.getBuffer(),ascii0.length()-1,testName, func,FALSE);
+ }
+ }
+}
+
+//---------------------------------------------
+// runIndexedTest
+//---------------------------------------------
+
+void TestIDNA::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par)
+{
+ if (exec) logln((UnicodeString)"TestSuite IDNA API ");
+ switch (index) {
+
+ case 0: name = "TestToASCII"; if (exec) TestToASCII(); break;
+ case 1: name = "TestToUnicode"; if (exec) TestToUnicode(); break;
+ case 2: name = "TestIDNToASCII"; if (exec) TestIDNToASCII(); break;
+ case 3: name = "TestIDNToUnicode"; if (exec) TestIDNToUnicode(); break;
+ case 4: name = "TestCompare"; if (exec) TestCompare(); break;
+ case 5: name = "TestErrorCases"; if (exec) TestErrorCases(); break;
+ case 6: name = "TestChaining"; if (exec) TestChaining(); break;
+ case 7: name = "TestRootLabelSeparator"; if(exec) TestRootLabelSeparator(); break;
+ case 8: name = "TestCompareReferenceImpl"; if(exec) TestCompareReferenceImpl(); break;
+ case 9: name = "TestDataFile"; if(exec) TestDataFile(); break;
+ case 10: name = "TestRefIDNA"; if(exec) TestRefIDNA(); break;
+ case 11: name = "TestIDNAMonkeyTest"; if(exec) TestIDNAMonkeyTest(); break;
+ case 12:
+ {
+ name = "TestConformanceTestVectors";
+ if(exec){
+ logln("TestSuite IDNA conf----"); logln();
+ IdnaConfTest test;
+ callTest(test, par);
+ }
+ break;
+ }
+ default: name = ""; break; /*needed to end loop*/
+ }
+}
+void TestIDNA::TestToASCII(){
+ testToASCII("uidna_toASCII", uidna_toASCII);
+}
+void TestIDNA::TestToUnicode(){
+ testToUnicode("uidna_toUnicode", uidna_toUnicode);
+}
+void TestIDNA::TestIDNToASCII(){
+ testIDNToASCII("uidna_IDNToASCII", uidna_IDNToASCII);
+}
+void TestIDNA::TestIDNToUnicode(){
+ testIDNToUnicode("uidna_IDNToUnicode", uidna_IDNToUnicode);
+}
+void TestIDNA::TestCompare(){
+ testCompare("uidna_compare",uidna_compare);
+}
+void TestIDNA::TestErrorCases(){
+ testErrorCases( "uidna_IDNToASCII",uidna_IDNToASCII,
+ "uidna_IDNToUnicode",uidna_IDNToUnicode);
+}
+void TestIDNA::TestRootLabelSeparator(){
+ testRootLabelSeparator( "uidna_compare",uidna_compare,
+ "uidna_IDNToASCII", uidna_IDNToASCII,
+ "uidna_IDNToUnicode",uidna_IDNToUnicode
+ );
+}
+void TestIDNA::TestChaining(){
+ testChaining("uidna_toASCII",uidna_toASCII, "uidna_toUnicode", uidna_toUnicode);
+}
+
+
+static const int loopCount = 100;
+static const int maxCharCount = 20;
+static const int maxCodePoint = 0x10ffff;
+static uint32_t
+randul()
+{
+ static UBool initialized = FALSE;
+ if (!initialized)
+ {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+ // Assume rand has at least 12 bits of precision
+ uint32_t l = 0;
+ for (uint32_t i=0; i<sizeof(l); ++i)
+ ((char*)&l)[i] = (char)((rand() & 0x0FF0) >> 4);
+ return l;
+}
+
+/**
+ * Return a random integer i where 0 <= i < n.
+ * A special function that gets random codepoints from planes 0,1,2 and 14
+ */
+static int32_t rand_uni()
+{
+ int32_t retVal = (int32_t)(randul()& 0x3FFFF);
+ if(retVal >= 0x30000){
+ retVal+=0xB0000;
+ }
+ return retVal;
+}
+
+static int32_t randi(int32_t n){
+ return (int32_t) (randul() % (n+1));
+}
+
+void getTestSource(UnicodeString& fillIn) {
+ int32_t i = 0;
+ int32_t charCount = (randi(maxCharCount) + 1);
+ while (i <charCount ) {
+ int32_t codepoint = rand_uni();
+ if(codepoint == 0x0000){
+ continue;
+ }
+ fillIn.append((UChar32)codepoint);
+ i++;
+ }
+
+}
+
+UnicodeString TestIDNA::testCompareReferenceImpl(UnicodeString& src,
+ TestFunc refIDNA, const char* refIDNAName,
+ TestFunc uIDNA, const char* uIDNAName,
+ int32_t options){
+
+ const UChar* srcUChars = src.getBuffer();
+ UChar exp[MAX_DEST_SIZE]={0};
+ int32_t expCap = MAX_DEST_SIZE, expLen=0;
+ UErrorCode expStatus = U_ZERO_ERROR;
+ UParseError parseError;
+
+ logln("Comparing "+ UnicodeString(refIDNAName)
+ + " with "+ UnicodeString(uIDNAName)
+ +" for input: " + prettify(srcUChars));
+
+ expLen = refIDNA(srcUChars, src.length()-1, exp, expCap,
+ options, &parseError, &expStatus);
+
+ UChar got[MAX_DEST_SIZE]={0};
+ int32_t gotCap = MAX_DEST_SIZE, gotLen=0;
+ UErrorCode gotStatus = U_ZERO_ERROR;
+
+ gotLen = uIDNA(srcUChars, src.length()-1, got, gotCap,
+ options, &parseError, &gotStatus);
+
+ if(expStatus != gotStatus){
+ errln("Did not get the expected status while comparing " + UnicodeString(refIDNAName)
+ + " with " + UnicodeString(uIDNAName)
+ + " Expected: " + UnicodeString(u_errorName(expStatus))
+ + " Got: " + UnicodeString(u_errorName(gotStatus))
+ + " for Source: "+ prettify(srcUChars)
+ + " Options: " + options);
+ return UnicodeString("");
+ }
+
+ // now we know that both implementations yielded same error
+ if(U_SUCCESS(expStatus)){
+ // compare the outputs if status == U_ZERO_ERROR
+ if(u_strCompare(exp, expLen, got, gotLen, TRUE) != 0){
+ errln("Did not get the expected output while comparing " + UnicodeString(refIDNAName)
+ + " with " + UnicodeString(uIDNAName)
+ + " Expected: " + prettify(UnicodeString(exp, expLen))
+ + " Got: " + prettify(UnicodeString(got, gotLen))
+ + " for Source: "+ prettify(srcUChars)
+ + " Options: " + options);
+ }
+ return UnicodeString(exp, expLen);
+
+ }else{
+ logln("Got the same error while comparing "
+ + UnicodeString(refIDNAName)
+ + " with "+ UnicodeString(uIDNAName)
+ +" for input: " + prettify(srcUChars));
+ }
+ return UnicodeString("");
+}
+
+void TestIDNA::testCompareReferenceImpl(const UChar* src, int32_t srcLen){
+ UnicodeString label(src,srcLen);
+ label.append((UChar)0x0000);
+
+ //test idnaref_toASCII and idnare
+ UnicodeString asciiLabel = testCompareReferenceImpl(label,
+ idnaref_toASCII, "idnaref_toASCII",
+ uidna_toASCII, "uidna_toASCII",
+ UIDNA_ALLOW_UNASSIGNED);
+ testCompareReferenceImpl(label,
+ idnaref_toASCII, "idnaref_toASCII",
+ uidna_toASCII, "uidna_toASCII",
+ UIDNA_DEFAULT);
+ testCompareReferenceImpl(label,
+ idnaref_toASCII, "idnaref_toASCII",
+ uidna_toASCII, "uidna_toASCII",
+ UIDNA_USE_STD3_RULES);
+ testCompareReferenceImpl(label,
+ idnaref_toASCII, "idnaref_toASCII",
+ uidna_toASCII, "uidna_toASCII",
+ UIDNA_USE_STD3_RULES | UIDNA_ALLOW_UNASSIGNED);
+
+ if(asciiLabel.length()!=0){
+ asciiLabel.append((UChar)0x0000);
+
+ // test toUnciode
+ testCompareReferenceImpl(asciiLabel,
+ idnaref_toUnicode, "idnaref_toUnicode",
+ uidna_toUnicode, "uidna_toUnicode",
+ UIDNA_ALLOW_UNASSIGNED);
+ testCompareReferenceImpl(asciiLabel,
+ idnaref_toUnicode, "idnaref_toUnicode",
+ uidna_toUnicode, "uidna_toUnicode",
+ UIDNA_DEFAULT);
+ testCompareReferenceImpl(asciiLabel,
+ idnaref_toUnicode, "idnaref_toUnicode",
+ uidna_toUnicode, "uidna_toUnicode",
+ UIDNA_USE_STD3_RULES);
+ testCompareReferenceImpl(asciiLabel,
+ idnaref_toUnicode, "idnaref_toUnicode",
+ uidna_toUnicode, "uidna_toUnicode",
+ UIDNA_USE_STD3_RULES | UIDNA_ALLOW_UNASSIGNED);
+ }
+
+}
+const char* failures[] ={
+ "\\uAA42\\U0001F8DD\\U00019D01\\U000149A3\\uD385\\U000EE0F5\\U00018B92\\U000179D1\\U00018624\\U0002227F\\U000E83C0\\U000E8DCD\\u5460\\U00017F34\\U0001570B\\u43D1\\U0002C9C9\\U000281EC\\u2105\\U000180AE\\uC5D4",
+ "\\U0002F5A6\\uD638\\u0D0A\\u9E9C\\uFE5B\\U0001FCCB\\u66C4",
+};
+
+void TestIDNA::TestIDNAMonkeyTest(){
+ UnicodeString source;
+ UErrorCode status = U_ZERO_ERROR;
+ int i;
+
+ getInstance(status); // Init prep
+ if (U_FAILURE(status)) {
+ errln("Test could not initialize. Got %s", u_errorName(status));
+ return;
+ }
+
+ for(i=0; i<loopCount; i++){
+ source.truncate(0);
+ getTestSource(source);
+ source.append((UChar)0x0000);
+ const UChar* src = source.getBuffer();
+ testCompareReferenceImpl(src,source.length()-1);
+ testCompareReferenceImpl(src,source.length()-1);
+ }
+
+ /* for debugging */
+ for (i=0; i<(int)(sizeof(failures)/sizeof(failures[0])); i++){
+ source.truncate(0);
+ source.append( failures[i] );
+ source = source.unescape();
+ source.append((UChar)0x0000);
+ const UChar *src = source.getBuffer();
+ testCompareReferenceImpl(src,source.length()-1);
+ //debug(source.getBuffer(),source.length(),UIDNA_ALLOW_UNASSIGNED);
+ }
+
+
+ source.truncate(0);
+ source.append("\\uCF18\\U00021161\\U000EEF11\\U0002BB82\\U0001D63C");
+ debug(source.getBuffer(),source.length(),UIDNA_ALLOW_UNASSIGNED);
+
+ { // test deletion of code points
+ UnicodeString source("\\u043f\\u00AD\\u034f\\u043e\\u0447\\u0435\\u043c\\u0443\\u0436\\u0435\\u043e\\u043d\\u0438\\u043d\\u0435\\u0433\\u043e\\u0432\\u043e\\u0440\\u044f\\u0442\\u043f\\u043e\\u0440\\u0443\\u0441\\u0441\\u043a\\u0438\\u0000");
+ source = source.unescape();
+ UnicodeString expected("\\u043f\\u043e\\u0447\\u0435\\u043c\\u0443\\u0436\\u0435\\u043e\\u043d\\u0438\\u043d\\u0435\\u0433\\u043e\\u0432\\u043e\\u0440\\u044f\\u0442\\u043f\\u043e\\u0440\\u0443\\u0441\\u0441\\u043a\\u0438\\u0000");
+ expected = expected.unescape();
+ UnicodeString ascii("xn--b1abfaaepdrnnbgefbadotcwatmq2g4l");
+ ascii.append((UChar)0x0000);
+ testAPI(source.getBuffer(),ascii.getBuffer(), "uidna_toASCII", FALSE, U_ZERO_ERROR, TRUE, TRUE, uidna_toASCII);
+
+ testAPI(source.getBuffer(),ascii.getBuffer(), "idnaref_toASCII", FALSE, U_ZERO_ERROR, TRUE, TRUE, idnaref_toASCII);
+
+ testCompareReferenceImpl(source.getBuffer(), source.length()-1);
+ }
+
+}
+
+void TestIDNA::TestCompareReferenceImpl(){
+
+ UChar src [2] = {0,0};
+ int32_t srcLen = 0;
+
+
+ for(int32_t i = 0x40000 ; i< 0x10ffff; i++){
+ if(quick==TRUE && i> 0x1FFFF){
+ return;
+ }
+ if(i >= 0x30000 && i <= 0xF0000){
+ i+=0xB0000;
+ }
+ if(i>0xFFFF){
+ src[0] = U16_LEAD(i);
+ src[1] = U16_TRAIL(i);
+ srcLen =2;
+ }else{
+ src[0] = (UChar)i;
+ src[1] = 0;
+ srcLen = 1;
+ }
+ testCompareReferenceImpl(src, srcLen);
+ }
+}
+
+void TestIDNA::TestRefIDNA(){
+ UErrorCode status = U_ZERO_ERROR;
+ getInstance(status); // Init prep
+ if (U_FAILURE(status)) {
+ errln("Test could not initialize. Got %s", u_errorName(status));
+ return;
+ }
+
+ testToASCII("idnaref_toASCII", idnaref_toASCII);
+ testToUnicode("idnaref_toUnicode", idnaref_toUnicode);
+ testIDNToASCII("idnaref_IDNToASCII", idnaref_IDNToASCII);
+ testIDNToUnicode("idnaref_IDNToUnicode", idnaref_IDNToUnicode);
+ testCompare("idnaref_compare",idnaref_compare);
+ testErrorCases( "idnaref_IDNToASCII",idnaref_IDNToASCII,
+ "idnaref_IDNToUnicode",idnaref_IDNToUnicode);
+ testChaining("idnaref_toASCII",idnaref_toASCII, "idnaref_toUnicode", idnaref_toUnicode);
+
+ testRootLabelSeparator( "idnaref_compare",idnaref_compare,
+ "idnaref_IDNToASCII", idnaref_IDNToASCII,
+ "idnaref_IDNToUnicode",idnaref_IDNToUnicode
+ );
+ testChaining("idnaref_toASCII",idnaref_toASCII, "idnaref_toUnicode", idnaref_toUnicode);
+}
+
+
+void TestIDNA::TestDataFile(){
+ testData(*this);
+}
+TestIDNA::~TestIDNA(){
+ if(gPrep!=NULL){
+ delete gPrep;
+ gPrep = NULL;
+ }
+}
+
+NamePrepTransform* TestIDNA::gPrep = NULL;
+
+NamePrepTransform* TestIDNA::getInstance(UErrorCode& status){
+ if(TestIDNA::gPrep == NULL){
+ UParseError parseError;
+ TestIDNA::gPrep = NamePrepTransform::createInstance(parseError, status);
+ if(TestIDNA::gPrep ==NULL){
+ //status = U_MEMORY_ALLOCATION_ERROR;
+ return NULL;
+ }
+ }
+ return TestIDNA::gPrep;
+
+}
+#endif /* #if !UCONFIG_NO_IDNA */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/testidna.h b/Build/source/libs/icu/icu-xetex/test/intltest/testidna.h
new file mode 100644
index 00000000000..58567df59fd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/testidna.h
@@ -0,0 +1,120 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 2003-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: testidna.h
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2003feb1
+ * created by: Ram Viswanadha
+ */
+
+#ifndef TESTIDNA_H
+#define TESTIDNA_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION
+
+#include "intltest.h"
+#include "unicode/parseerr.h"
+#include "unicode/uidna.h"
+
+U_CDECL_BEGIN
+typedef int32_t
+(U_EXPORT2 *TestFunc) ( const UChar *src, int32_t srcLength,
+ UChar *dest, int32_t destCapacity,
+ int32_t options, UParseError *parseError,
+ UErrorCode *status);
+typedef int32_t
+(U_EXPORT2 *CompareFunc) (const UChar *s1, int32_t s1Len,
+ const UChar *s2, int32_t s2Len,
+ int32_t options,
+ UErrorCode *status);
+
+
+U_CDECL_END
+
+// test the API
+
+class NamePrepTransform;
+
+/**
+ * @test
+ * @summary General test of HexadecimalToUnicodeTransliterator
+ */
+class TestIDNA : public IntlTest {
+public:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void TestDataFile();
+ void TestToASCII();
+ void TestToUnicode();
+ void TestIDNToUnicode();
+ void TestIDNToASCII();
+ void TestCompare();
+ void TestErrorCases();
+ void TestChaining();
+ void TestRootLabelSeparator();
+ void TestCompareReferenceImpl();
+ void TestRefIDNA();
+ void TestIDNAMonkeyTest();
+ void TestConformance();
+ static NamePrepTransform* getInstance(UErrorCode& status);
+ static NamePrepTransform* gPrep;
+ virtual ~TestIDNA();
+
+private:
+ void testToASCII(const char* testName, TestFunc func);
+ void testToUnicode(const char* testName, TestFunc func);
+ void testIDNToUnicode(const char* testName, TestFunc func);
+ void testIDNToASCII(const char* testName, TestFunc func);
+ void testCompare(const char* testName, CompareFunc func);
+ void testChaining(const char* toASCIIName, TestFunc toASCII,
+ const char* toUnicodeName, TestFunc toUnicode);
+ void debug(const UChar* src, int32_t srcLength, int32_t options);
+ // main testing functions
+ void testAPI(const UChar *src, const UChar *expected, const char *testName,
+ UBool useSTD3ASCIIRules, UErrorCode expectedStatus,
+ UBool doCompare, UBool testUnassigned, TestFunc func, UBool testSTD3ASCIIRules=TRUE);
+
+ void testCompare(const UChar* s1, int32_t s1Len,
+ const UChar* s2, int32_t s2Len,
+ const char* testName, CompareFunc func,
+ UBool isEqual);
+
+ void testErrorCases(const char* IDNToASCIIName, TestFunc IDNToASCII,
+ const char* IDNToUnicodeName, TestFunc IDNToUnicode);
+
+ void testChaining(const UChar* src,int32_t numIterations,const char* testName,
+ UBool useSTD3ASCIIRules, UBool caseInsensitive, TestFunc func);
+
+ void testRootLabelSeparator(const char* testName, CompareFunc func,
+ const char* IDNToASCIIName, TestFunc IDNToASCII,
+ const char* IDNToUnicodeName, TestFunc IDNToUnicode);
+
+ void testCompareReferenceImpl(const UChar* src, int32_t srcLen);
+
+ UnicodeString testCompareReferenceImpl(UnicodeString& src,
+ TestFunc refIDNA, const char* refIDNAName,
+ TestFunc uIDNA, const char* uIDNAName,
+ int32_t options);
+
+ void testConformance(const char* toASCIIName, TestFunc toASCII,
+ const char* IDNToASCIIName, TestFunc IDNToASCII,
+ const char* IDNToUnicodeName, TestFunc IDNToUnicode,
+ const char* toUnicodeName, TestFunc toUnicode
+ );
+
+};
+
+// test the TRIE data structure
+int testData(TestIDNA& test);
+
+#endif /* #if !UCONFIG_NO_IDNA */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/testutil.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/testutil.cpp
new file mode 100644
index 00000000000..56ec038ab4a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/testutil.cpp
@@ -0,0 +1,37 @@
+/*
+**********************************************************************
+* Copyright (C) 2001, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 05/23/00 aliu Creation.
+**********************************************************************
+*/
+
+#include "unicode/unistr.h"
+#include "testutil.h"
+
+static const UChar HEX[16]={48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70};
+
+UnicodeString TestUtility::hex(UChar ch) {
+ UnicodeString buf;
+ buf.append(HEX[0xF&(ch>>12)]);
+ buf.append(HEX[0xF&(ch>>8)]);
+ buf.append(HEX[0xF&(ch>>4)]);
+ buf.append(HEX[0xF&ch]);
+ return buf;
+}
+
+UnicodeString TestUtility::hex(const UnicodeString& s) {
+ return hex(s, 44 /*,*/);
+}
+
+UnicodeString TestUtility::hex(const UnicodeString& s, UChar sep) {
+ if (s.length() == 0) return "";
+ UnicodeString result = hex(s.charAt(0));
+ for (int32_t i = 1; i < s.length(); ++i) {
+ result.append(sep);
+ result.append(hex(s.charAt(i)));
+ }
+ return result;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/testutil.h b/Build/source/libs/icu/icu-xetex/test/intltest/testutil.h
new file mode 100644
index 00000000000..9c14a2860b9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/testutil.h
@@ -0,0 +1,34 @@
+/*
+**********************************************************************
+* Copyright (C) 2001-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 05/23/00 aliu Creation.
+**********************************************************************
+*/
+#ifndef TESTUTIL_H
+#define TESTUTIL_H
+
+#include "intltest.h"
+
+/**
+ * Utility methods. Everything in this class is static -- do not
+ * attempt to instantiate.
+ */
+class TestUtility {
+
+public:
+
+ static UnicodeString hex(UChar ch);
+
+ static UnicodeString hex(const UnicodeString& s);
+
+ static UnicodeString hex(const UnicodeString& s, UChar sep);
+
+private:
+
+ TestUtility() {} // Prevent instantiation
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/textfile.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/textfile.cpp
new file mode 100644
index 00000000000..fe193b0fcbd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/textfile.cpp
@@ -0,0 +1,179 @@
+/*
+**********************************************************************
+* Copyright (c) 2004, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Author: Alan Liu
+* Created: March 19 2004
+* Since: ICU 3.0
+**********************************************************************
+*/
+#include "textfile.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "intltest.h"
+#include "util.h"
+
+// If the symbol CCP is defined, then the 'name' and 'encoding'
+// constructor parameters are copied. Otherwise they are aliased.
+// #define CCP
+
+TextFile::TextFile(const char* _name, const char* _encoding, UErrorCode& ec) :
+ file(0),
+ name(0), encoding(0),
+ buffer(0),
+ capacity(0),
+ lineNo(0)
+{
+ if (U_FAILURE(ec) || _name == 0 || _encoding == 0) {
+ if (U_SUCCESS(ec)) {
+ ec = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+ return;
+ }
+
+#ifdef CCP
+ name = uprv_malloc(uprv_strlen(_name) + 1);
+ encoding = uprv_malloc(uprv_strlen(_encoding) + 1);
+ if (name == 0 || encoding == 0) {
+ ec = U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+ uprv_strcpy(name, _name);
+ uprv_strcpy(encoding, _encoding);
+#else
+ name = (char*) _name;
+ encoding = (char*) _encoding;
+#endif
+
+ const char* testDir = IntlTest::getSourceTestData(ec);
+ if (U_FAILURE(ec)) {
+ return;
+ }
+ if (!ensureCapacity((int32_t)(uprv_strlen(testDir) + uprv_strlen(name) + 1))) {
+ ec = U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+ uprv_strcpy(buffer, testDir);
+ uprv_strcat(buffer, name);
+
+ file = T_FileStream_open(buffer, "rb");
+ if (file == 0) {
+ ec = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+}
+
+TextFile::~TextFile() {
+ if (file != 0) T_FileStream_close(file);
+ if (buffer != 0) uprv_free(buffer);
+#ifdef CCP
+ uprv_free(name);
+ uprv_free(encoding);
+#endif
+}
+
+UBool TextFile::readLine(UnicodeString& line, UErrorCode& ec) {
+ if (T_FileStream_eof(file)) {
+ return FALSE;
+ }
+ // Note: 'buffer' may change after ensureCapacity() is called,
+ // so don't use
+ // p=buffer; *p++=c;
+ // but rather
+ // i=; buffer[i++]=c;
+ int32_t n = 0;
+ for (;;) {
+ int c = T_FileStream_getc(file); // sic: int, not int32_t
+ if (c < 0 || c == 0xD || c == 0xA) {
+ // consume 0xA following 0xD
+ if (c == 0xD) {
+ c = T_FileStream_getc(file);
+ if (c != 0xA && c >= 0) {
+ T_FileStream_ungetc(c, file);
+ }
+ }
+ break;
+ }
+ if (!setBuffer(n++, c, ec)) return FALSE;
+ }
+ if (!setBuffer(n++, 0, ec)) return FALSE;
+ UnicodeString str(buffer, encoding);
+ // Remove BOM in first line, if present
+ if (lineNo == 0 && str[0] == 0xFEFF) {
+ str.remove(0, 1);
+ }
+ ++lineNo;
+ line = str.unescape();
+ return TRUE;
+}
+
+UBool TextFile::readLineSkippingComments(UnicodeString& line, UErrorCode& ec,
+ UBool trim) {
+ for (;;) {
+ if (!readLine(line, ec)) return FALSE;
+ // Skip over white space
+ int32_t pos = 0;
+ ICU_Utility::skipWhitespace(line, pos, TRUE);
+ // Ignore blank lines and comment lines
+ if (pos == line.length() || line.charAt(pos) == 0x23/*'#'*/) {
+ continue;
+ }
+ // Process line
+ if (trim) line.remove(0, pos);
+ return TRUE;
+ }
+}
+
+/**
+ * Set buffer[index] to c, growing buffer if necessary. Return TRUE if
+ * successful.
+ */
+UBool TextFile::setBuffer(int32_t index, char c, UErrorCode& ec) {
+ if (capacity <= index) {
+ if (!ensureCapacity(index+1)) {
+ ec = U_MEMORY_ALLOCATION_ERROR;
+ return FALSE;
+ }
+ }
+ buffer[index] = c;
+ return TRUE;
+}
+
+/**
+ * Make sure that 'buffer' has at least 'mincapacity' bytes.
+ * Return TRUE upon success. Upon return, 'buffer' may change
+ * value. In any case, previous contents are preserved.
+ */
+UBool TextFile::ensureCapacity(int32_t mincapacity) {
+ if (capacity >= mincapacity) {
+ return TRUE;
+ }
+
+ // Grow by factor of 2 to prevent frequent allocation
+ // Note: 'capacity' may be 0
+ int32_t i;
+ for (i = capacity || 1024; i < mincapacity; ) {
+ i <<= 1;
+ if (i < 0) {
+ i = 0x7FFFFFFF;
+ break;
+ }
+ }
+ mincapacity = i;
+
+ // Simple realloc() no good; contents not preserved
+ // Note: 'buffer' may be 0
+ char* newbuffer = (char*) uprv_malloc(mincapacity);
+ if (newbuffer == 0) {
+ return FALSE;
+ }
+ if (buffer != 0) {
+ uprv_strncpy(newbuffer, buffer, capacity);
+ uprv_free(buffer);
+ }
+ buffer = newbuffer;
+ capacity = mincapacity;
+ return TRUE;
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/textfile.h b/Build/source/libs/icu/icu-xetex/test/intltest/textfile.h
new file mode 100644
index 00000000000..3fcea074abc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/textfile.h
@@ -0,0 +1,72 @@
+/*
+**********************************************************************
+* Copyright (c) 2004-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Author: Alan Liu
+* Created: March 19 2004
+* Since: ICU 3.0
+**********************************************************************
+*/
+#ifndef __ICU_INTLTEST_TEXTFILE__
+#define __ICU_INTLTEST_TEXTFILE__
+
+#include "intltest.h"
+#include "filestrm.h"
+
+/**
+ * This class implements access to a text data file located in the
+ * icu/source/test/testdata/ directory.
+ */
+class TextFile {
+ public:
+ /**
+ * Open a file with the given name, in the given encoding, in the
+ * ICU testdata directory. See textfile.cpp to determine if the
+ * 'name' and 'encoding' parameters are aliased or copied.
+ */
+ TextFile(const char* name, const char* encoding, UErrorCode& ec);
+
+ virtual ~TextFile();
+
+ /**
+ * Read a line terminated by ^J or ^M or ^M^J, and convert it from
+ * this file's encoding to Unicode. The EOL character(s) are not
+ * included in 'line'.
+ * @return TRUE if a line was read, or FALSE if the EOF
+ * was reached or an error occurred
+ */
+ UBool readLine(UnicodeString& line, UErrorCode& ec);
+
+ /**
+ * Read a line, ignoring blank lines and lines that start with
+ * '#'. Trim leading white space.
+ * @param trim if TRUE then remove leading rule white space
+ * @return TRUE if a line was read, or FALSE if the EOF
+ * was reached or an error occurred
+ */
+ UBool readLineSkippingComments(UnicodeString& line, UErrorCode& ec,
+ UBool trim = FALSE);
+
+ /**
+ * Return the line number of the last line returned by readLine().
+ */
+ inline int32_t getLineNumber() const;
+
+ private:
+ UBool ensureCapacity(int32_t capacity);
+ UBool setBuffer(int32_t index, char c, UErrorCode& ec);
+
+ FileStream* file;
+ char* name;
+ char* encoding;
+ char* buffer;
+ int32_t capacity;
+ int32_t lineNo;
+};
+
+inline int32_t TextFile::getLineNumber() const {
+ return lineNo;
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.cpp
new file mode 100644
index 00000000000..6cc69a01210
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.cpp
@@ -0,0 +1,387 @@
+
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+#include "tfsmalls.h"
+
+#include "unicode/msgfmt.h"
+#include "unicode/choicfmt.h"
+
+#include "unicode/parsepos.h"
+#include "unicode/fieldpos.h"
+#include "unicode/fmtable.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+/*static UBool chkstatus( UErrorCode &status, char* msg = NULL )
+{
+ UBool ok = (status == U_ZERO_ERROR);
+ if (!ok) it_errln( msg );
+ return ok;
+}*/
+
+void test_ParsePosition( void )
+{
+ ParsePosition* pp1 = new ParsePosition();
+ if (pp1 && (pp1->getIndex() == 0)) {
+ it_logln("PP constructor() tested.");
+ }else{
+ it_errln("*** PP getIndex or constructor() result");
+ }
+ delete pp1;
+
+
+ {
+ int32_t to = 5;
+ ParsePosition pp2( to );
+ if (pp2.getIndex() == 5) {
+ it_logln("PP getIndex and constructor(int32_t) tested.");
+ }else{
+ it_errln("*** PP getIndex or constructor(int32_t) result");
+ }
+ pp2.setIndex( 3 );
+ if (pp2.getIndex() == 3) {
+ it_logln("PP setIndex tested.");
+ }else{
+ it_errln("*** PP getIndex or setIndex result");
+ }
+ }
+
+ ParsePosition pp2, pp3;
+ pp2 = 3;
+ pp3 = 5;
+ ParsePosition pp4( pp3 );
+ if ((pp2 != pp3) && (pp3 == pp4)) {
+ it_logln("PP copy contructor, operator== and operator != tested.");
+ }else{
+ it_errln("*** PP operator== or operator != result");
+ }
+
+ ParsePosition pp5;
+ pp5 = pp4;
+ if ((pp4 == pp5) && (!(pp4 != pp5))) {
+ it_logln("PP operator= tested.");
+ }else{
+ it_errln("*** PP operator= operator== or operator != result");
+ }
+
+
+}
+
+#include "unicode/decimfmt.h"
+
+void test_FieldPosition_example( void )
+{
+ //***** no error detection yet !!!!!!!
+ //***** this test is for compiler checks and visual verification only.
+ double doubleNum[] = { 123456789.0, -12345678.9, 1234567.89, -123456.789,
+ 12345.6789, -1234.56789, 123.456789, -12.3456789, 1.23456789};
+ int32_t dNumSize = (int32_t)(sizeof(doubleNum)/sizeof(double));
+
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat* fmt = (DecimalFormat*) NumberFormat::createInstance(status);
+ if (U_FAILURE(status)) {
+ it_dataerrln("NumberFormat::createInstance() error");
+ return;
+ }
+ fmt->setDecimalSeparatorAlwaysShown(TRUE);
+
+ const int32_t tempLen = 20;
+ char temp[tempLen];
+
+ for (int32_t i=0; i<dNumSize; i++) {
+ FieldPosition pos(NumberFormat::INTEGER_FIELD);
+ UnicodeString buf;
+ //char fmtText[tempLen];
+ //ToCharString(fmt->format(doubleNum[i], buf, pos), fmtText);
+ UnicodeString res = fmt->format(doubleNum[i], buf, pos);
+ for (int32_t j=0; j<tempLen; j++) temp[j] = '='; // clear with spaces
+ int32_t tempOffset = (tempLen <= (tempLen - pos.getEndIndex())) ?
+ tempLen : (tempLen - pos.getEndIndex());
+ temp[tempOffset] = '\0';
+ it_logln(UnicodeString("FP ") + UnicodeString(temp) + res);
+ }
+ delete fmt;
+
+ it_logln("");
+
+}
+
+void test_FieldPosition( void )
+{
+
+ FieldPosition fp( 7 );
+
+ if (fp.getField() == 7) {
+ it_logln("FP constructor(int32_t) and getField tested.");
+ }else{
+ it_errln("*** FP constructor(int32_t) or getField");
+ }
+
+ FieldPosition* fph = new FieldPosition( 3 );
+ if ( fph->getField() != 3) it_errln("*** FP getField or heap constr.");
+ delete fph;
+
+ UBool err1 = FALSE;
+ UBool err2 = FALSE;
+ UBool err3 = FALSE;
+ for (int32_t i = -50; i < 50; i++ ) {
+ fp.setField( i+8 );
+ fp.setBeginIndex( i+6 );
+ fp.setEndIndex( i+7 );
+ if (fp.getField() != i+8) err1 = TRUE;
+ if (fp.getBeginIndex() != i+6) err2 = TRUE;
+ if (fp.getEndIndex() != i+7) err3 = TRUE;
+ }
+ if (!err1) {
+ it_logln("FP setField and getField tested.");
+ }else{
+ it_errln("*** FP setField or getField");
+ }
+ if (!err2) {
+ it_logln("FP setBeginIndex and getBeginIndex tested.");
+ }else{
+ it_errln("*** FP setBeginIndex or getBeginIndex");
+ }
+ if (!err3) {
+ it_logln("FP setEndIndex and getEndIndex tested.");
+ }else{
+ it_errln("*** FP setEndIndex or getEndIndex");
+ }
+
+ it_logln("");
+
+}
+
+void test_Formattable( void )
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Formattable* ftp = new Formattable();
+ if (!ftp || !(ftp->getType() == Formattable::kLong) || !(ftp->getLong() == 0)) {
+ it_errln("*** Formattable constructor or getType or getLong");
+ }
+ delete ftp;
+
+ Formattable fta, ftb;
+ fta.setLong(1); ftb.setLong(2);
+ if ((fta != ftb) || !(fta == ftb)) {
+ it_logln("FT setLong, operator== and operator!= tested.");
+ status = U_ZERO_ERROR;
+ fta.getLong(&status);
+ if ( status == U_INVALID_FORMAT_ERROR){
+ it_errln("*** FT getLong(UErrorCode* status) failed on real Long");
+ } else {
+ it_logln("FT getLong(UErrorCode* status) tested.");
+ }
+ }else{
+ it_errln("*** Formattable setLong or operator== or !=");
+ }
+ fta = ftb;
+ if ((fta == ftb) || !(fta != ftb)) {
+ it_logln("FT operator= tested.");
+ }else{
+ it_errln("*** FT operator= or operator== or operator!=");
+ }
+
+ fta.setDouble( 3.0 );
+ if ((fta.getType() == Formattable::kDouble) && (fta.getDouble() == 3.0)) {
+ it_logln("FT set- and getDouble tested.");
+ }else{
+ it_errln("*** FT set- or getDouble");
+ }
+
+ fta.getDate(status = U_ZERO_ERROR);
+ if (status != U_INVALID_FORMAT_ERROR){
+ it_errln("*** FT getDate with status should fail on non-Date");
+ }
+ fta.setDate( 4.0 );
+ if ((fta.getType() == Formattable::kDate) && (fta.getDate() == 4.0)) {
+ it_logln("FT set- and getDate tested.");
+ status = U_ZERO_ERROR;
+ fta.getDate(status);
+ if ( status == U_INVALID_FORMAT_ERROR){
+ it_errln("*** FT getDate with status failed on real Date");
+ } else {
+ it_logln("FT getDate with status tested.");
+ }
+ }else{
+ it_errln("*** FT set- or getDate");
+ }
+
+ status = U_ZERO_ERROR;
+ fta.getLong(&status);
+ if (status != U_INVALID_FORMAT_ERROR){
+ it_errln("*** FT getLong(UErrorCode* status) should fail on non-Long");
+ }
+
+ fta.setString("abc");
+ const Formattable ftc(fta);
+ UnicodeString res;
+
+ {
+ UBool t;
+ t = (fta.getType() == Formattable::kString)
+ && (fta.getString(res) == "abc")
+ && (fta.getString() == "abc");
+ res = fta.getString(status = U_ZERO_ERROR);
+ t = t && (status != U_INVALID_FORMAT_ERROR && res == "abc");
+ res = ftc.getString(status = U_ZERO_ERROR);
+ t = t && (status != U_INVALID_FORMAT_ERROR && res == "abc");
+ ftc.getString(res,status = U_ZERO_ERROR);
+ t = t && (status != U_INVALID_FORMAT_ERROR && res == "abc");
+ if (t) {
+ it_logln("FT set- and getString tested.");
+ }else{
+ it_errln("*** FT set- or getString");
+ }
+ }
+
+ UnicodeString ucs = "unicode-string";
+ UnicodeString* ucs_ptr = new UnicodeString("pointed-to-unicode-string");
+
+ const Formattable ftarray[] =
+ {
+ Formattable( 1.0, Formattable::kIsDate ),
+ 2.0,
+ (int32_t)3,
+ ucs,
+ ucs_ptr
+ };
+ const int32_t ft_cnt = LENGTHOF(ftarray);
+ Formattable ft_arr( ftarray, ft_cnt );
+ UnicodeString temp;
+ if ((ft_arr[0].getType() == Formattable::kDate) && (ft_arr[0].getDate() == 1.0)
+ && (ft_arr[1].getType() == Formattable::kDouble) && (ft_arr[1].getDouble() == 2.0)
+ && (ft_arr[2].getType() == Formattable::kLong) && (ft_arr[2].getLong() == (int32_t)3)
+ && (ft_arr[3].getType() == Formattable::kString) && (ft_arr[3].getString(temp) == ucs)
+ && (ft_arr[4].getType() == Formattable::kString) && (ft_arr[4].getString(temp) == *ucs_ptr) ) {
+ it_logln("FT constr. for date, double, long, ustring, ustring* and array tested");
+ }else{
+ it_errln("*** FT constr. for date, double, long, ustring, ustring* or array");
+ }
+
+ int32_t i, res_cnt;
+ const Formattable* res_array = ft_arr.getArray( res_cnt );
+ if (res_cnt == ft_cnt) {
+ UBool same = TRUE;
+ for (i = 0; i < res_cnt; i++ ) {
+ if (res_array[i] != ftarray[i]) {
+ same = FALSE;
+ }
+ }
+ if (same) {
+ it_logln("FT getArray tested");
+ res_array = ft_arr.getArray( res_cnt, status = U_ZERO_ERROR);
+ if (status == U_INVALID_FORMAT_ERROR){
+ it_errln("*** FT getArray with status failed on real array");
+ } else {
+ it_logln("FT getArray with status tested on real array");
+ }
+ }else{
+ it_errln("*** FT getArray comparison");
+ }
+ }else{
+ it_errln(UnicodeString("*** FT getArray count res_cnt=") + res_cnt + UnicodeString("ft_cnt=") + ft_cnt);
+ }
+
+ res_array = fta.getArray(res_cnt, status = U_ZERO_ERROR);
+ if (status == U_INVALID_FORMAT_ERROR){
+ if (res_cnt == 0 && res_array == NULL){
+ it_logln("FT getArray with status tested on non array");
+ } else {
+ it_errln("*** FT getArray with status return values are not consistent");
+ }
+ } else {
+ it_errln("*** FT getArray with status should fail on non-array");
+ }
+
+
+ Formattable *pf;
+ for(i = 0; i < ft_cnt; ++i) {
+ pf = ftarray[i].clone();
+ if(pf == (ftarray + i) || *pf != ftarray[i]) {
+ it_errln("Formattable.clone() failed for item %d" + i);
+ }
+ delete pf;
+ }
+
+ const Formattable ftarr1[] = { Formattable( (int32_t)1 ), Formattable( (int32_t)2 ) };
+ const Formattable ftarr2[] = { Formattable( (int32_t)3 ), Formattable( (int32_t)4 ) };
+
+ const int32_t ftarr1_cnt = (int32_t)(sizeof(ftarr1) / sizeof(Formattable));
+ const int32_t ftarr2_cnt = (int32_t)(sizeof(ftarr2) / sizeof(Formattable));
+
+ ft_arr.setArray( ftarr1, ftarr1_cnt );
+ if ((ft_arr[0].getType() == Formattable::kLong) && (ft_arr[0].getLong() == (int32_t)1)) {
+ it_logln("FT setArray tested");
+ }else{
+ it_errln("*** FT setArray");
+ }
+
+ Formattable* ft_dynarr = new Formattable[ftarr2_cnt];
+ for (i = 0; i < ftarr2_cnt; i++ ) {
+ ft_dynarr[i] = ftarr2[i];
+ }
+ if ((ft_dynarr[0].getType() == Formattable::kLong) && (ft_dynarr[0].getLong() == (int32_t)3)
+ && (ft_dynarr[1].getType() == Formattable::kLong) && (ft_dynarr[1].getLong() == (int32_t)4)) {
+ it_logln("FT operator= and array operations tested");
+ }else{
+ it_errln("*** FT operator= or array operations");
+ }
+
+ ft_arr.adoptArray( ft_dynarr, ftarr2_cnt );
+ if ((ft_arr[0].getType() == Formattable::kLong) && (ft_arr[0].getLong() == (int32_t)3)
+ && (ft_arr[1].getType() == Formattable::kLong) && (ft_arr[1].getLong() == (int32_t)4)) {
+ it_logln("FT adoptArray tested");
+ }else{
+ it_errln("*** FT adoptArray or operator[]");
+ }
+
+ ft_arr.setLong(0); // calls 'dispose' and deletes adopted array !
+
+ UnicodeString* ucs_dyn = new UnicodeString("ttt");
+ UnicodeString tmp2;
+
+ fta.adoptString( ucs_dyn );
+ if ((fta.getType() == Formattable::kString) && (fta.getString(tmp2) == "ttt")) {
+ it_logln("FT adoptString tested");
+ }else{
+ it_errln("*** FT adoptString or getString");
+ }
+ fta.setLong(0); // calls 'dispose' and deletes adopted string !
+
+ it_logln();
+}
+
+void TestFormatSmallClasses::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ switch (index) {
+ case 0: name = "pp";
+ if (exec) logln("TestSuite Format/SmallClasses/ParsePosition (f/chc/sma/pp): ");
+ if (exec) test_ParsePosition();
+ break;
+ case 1: name = "fp";
+ if (exec) logln("TestSuite Format/SmallClasses/FieldPosition (f/chc/sma/fp): ");
+ if (exec) test_FieldPosition();
+ break;
+ case 2: name = "fpe";
+ if (exec) logln("TestSuite Format/SmallClasses/FieldPositionExample (f/chc/sma/fpe): ");
+ if (exec) test_FieldPosition_example();
+ break;
+ case 3: name = "ft";
+ if (exec) logln("TestSuite Format/SmallClasses/Formattable (f/chc/sma/ft): ");
+ if (exec) test_Formattable();
+ break;
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.h b/Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.h
new file mode 100644
index 00000000000..26f13279bb3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tfsmalls.h
@@ -0,0 +1,27 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef TESTFORMATSMALLCLASSES_H
+#define TESTFORMATSMALLCLASSES_H
+
+#include "intltest.h"
+
+/**
+ * tests 3 smaller classes in the format library
+ **/
+class TestFormatSmallClasses: public IntlTest {
+ /**
+ * runs tests in 4 local routines,
+ * performs test for API and funtionalty of 3 smaller format classes:
+ * ParsePosition in test_ParsePosition(),
+ * FieldPosition in test_FieldPosition(),
+ * Formattable in test_Formattable().
+ **/
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/thcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/thcoll.cpp
new file mode 100644
index 00000000000..1fd99e7fb24
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/thcoll.cpp
@@ -0,0 +1,459 @@
+/*
+**********************************************************************
+* Copyright (C) 1999-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 12/09/99 aliu Ported from Java.
+**********************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "thcoll.h"
+#include "unicode/utypes.h"
+#include "unicode/coll.h"
+#include "unicode/sortkey.h"
+#include "unicode/ustring.h"
+#include "cstring.h"
+#include "filestrm.h"
+#include "textfile.h"
+
+/**
+ * The TestDictionary test expects a file of this name, with this
+ * encoding, to be present in the directory $ICU/source/test/testdata.
+ */
+//#define TEST_FILE "th18057.txt"
+
+/**
+ * This is the most failures we show in TestDictionary. If this number
+ * is < 0, we show all failures.
+ */
+#define MAX_FAILURES_TO_SHOW -1
+
+CollationThaiTest::CollationThaiTest() {
+ UErrorCode status = U_ZERO_ERROR;
+ coll = Collator::createInstance(Locale("th", "TH", ""), status);
+ if (coll && U_SUCCESS(status)) {
+ //coll->setStrength(Collator::TERTIARY);
+ } else {
+ delete coll;
+ coll = 0;
+ }
+}
+
+CollationThaiTest::~CollationThaiTest() {
+ delete coll;
+}
+
+void CollationThaiTest::runIndexedTest(int32_t index, UBool exec, const char* &name,
+ char* /*par*/) {
+
+ if((!coll) && exec) {
+ errln(__FILE__ " cannot test - failed to create collator.");
+ name = "some test";
+ return;
+ }
+
+ switch (index) {
+ TESTCASE(0,TestDictionary);
+ TESTCASE(1,TestCornerCases);
+ TESTCASE(2,TestNamesList);
+ TESTCASE(3,TestInvalidThai);
+ TESTCASE(4,TestReordering);
+ default: name = ""; break;
+ }
+}
+
+/**
+ * Read the external names list, and confirms that the collator
+ * gets the same results when comparing lines one to another
+ * using regular and iterative comparison.
+ */
+void CollationThaiTest::TestNamesList(void) {
+ if (coll == 0) {
+ errln("Error: could not construct Thai collator");
+ return;
+ }
+
+ UErrorCode ec = U_ZERO_ERROR;
+ TextFile names("TestNames_Thai.txt", "UTF16LE", ec);
+ if (U_FAILURE(ec)) {
+ logln("Can't open TestNames_Thai.txt: %s; skipping test",
+ u_errorName(ec));
+ return;
+ }
+
+ //
+ // Loop through each word in the dictionary and compare it to the previous
+ // word. They should be in sorted order.
+ //
+ UnicodeString lastWord, word;
+ //int32_t failed = 0;
+ int32_t wordCount = 0;
+ while (names.readLineSkippingComments(word, ec, FALSE) && U_SUCCESS(ec)) {
+
+ // Show the first 8 words being compared, so we can see what's happening
+ ++wordCount;
+ if (wordCount <= 8) {
+ UnicodeString str;
+ logln((UnicodeString)"Word " + wordCount + ": " + IntlTest::prettify(word, str));
+ }
+
+ if (lastWord.length() > 0) {
+ Collator::EComparisonResult result = coll->compare(lastWord, word);
+ doTest(coll, lastWord, word, result);
+ }
+ lastWord = word;
+ }
+
+ assertSuccess("readLine", ec);
+
+ logln((UnicodeString)"Words checked: " + wordCount);
+}
+
+/**
+ * Read the external dictionary file, which is already in proper
+ * sorted order, and confirm that the collator compares each line as
+ * preceding the following line.
+ */
+void CollationThaiTest::TestDictionary(void) {
+ if (coll == 0) {
+ errln("Error: could not construct Thai collator");
+ return;
+ }
+
+ UErrorCode ec = U_ZERO_ERROR;
+ TextFile riwords("riwords.txt", "UTF8", ec);
+ if (U_FAILURE(ec)) {
+ logln("Can't open riwords.txt: %s; skipping test",
+ u_errorName(ec));
+ return;
+ }
+
+ //
+ // Loop through each word in the dictionary and compare it to the previous
+ // word. They should be in sorted order.
+ //
+ UnicodeString lastWord, word;
+ int32_t failed = 0;
+ int32_t wordCount = 0;
+ while (riwords.readLineSkippingComments(word, ec, FALSE) && U_SUCCESS(ec)) {
+
+ // Show the first 8 words being compared, so we can see what's happening
+ ++wordCount;
+ if (wordCount <= 8) {
+ UnicodeString str;
+ logln((UnicodeString)"Word " + wordCount + ": " + IntlTest::prettify(word, str));
+ }
+
+ if (lastWord.length() > 0) {
+ // line enabled for j2720
+ doTest(coll, lastWord, word, Collator::LESS);
+ int32_t result = coll->compare(lastWord, word);
+
+ if (result >= 0) {
+ failed++;
+ if (MAX_FAILURES_TO_SHOW < 0 || failed <= MAX_FAILURES_TO_SHOW) {
+ UnicodeString str;
+ UnicodeString msg =
+ UnicodeString("--------------------------------------------\n")
+ + riwords.getLineNumber()
+ + " compare(" + IntlTest::prettify(lastWord, str);
+ msg += UnicodeString(", ")
+ + IntlTest::prettify(word, str) + ") returned " + result
+ + ", expected -1\n";
+ UErrorCode status = U_ZERO_ERROR;
+ CollationKey k1, k2;
+ coll->getCollationKey(lastWord, k1, status);
+ coll->getCollationKey(word, k2, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"Fail: getCollationKey returned " + u_errorName(status));
+ return;
+ }
+ msg.append("key1: ").append(prettify(k1, str)).append("\n");
+ msg.append("key2: ").append(prettify(k2, str));
+ errln(msg);
+ }
+ }
+ }
+ lastWord = word;
+ }
+
+ assertSuccess("readLine", ec);
+
+ if (failed != 0) {
+ if (failed > MAX_FAILURES_TO_SHOW) {
+ errln((UnicodeString)"Too many failures; only the first " +
+ MAX_FAILURES_TO_SHOW + " failures were shown");
+ }
+ errln((UnicodeString)"Summary: " + failed + " of " + (riwords.getLineNumber() - 1) +
+ " comparisons failed");
+ }
+
+ logln((UnicodeString)"Words checked: " + wordCount);
+}
+
+/**
+ * Odd corner conditions taken from "How to Sort Thai Without Rewriting Sort",
+ * by Doug Cooper, http://seasrc.th.net/paper/thaisort.zip
+ */
+void CollationThaiTest::TestCornerCases(void) {
+ const char* TESTS[] = {
+ // Shorter words precede longer
+ "\\u0e01", "<", "\\u0e01\\u0e01",
+
+ // Tone marks are considered after letters (i.e. are primary ignorable)
+ "\\u0e01\\u0e32", "<", "\\u0e01\\u0e49\\u0e32",
+
+ // ditto for other over-marks
+ "\\u0e01\\u0e32", "<", "\\u0e01\\u0e32\\u0e4c",
+
+ // commonly used mark-in-context order.
+ // In effect, marks are sorted after each syllable.
+ "\\u0e01\\u0e32\\u0e01\\u0e49\\u0e32", "<", "\\u0e01\\u0e48\\u0e32\\u0e01\\u0e49\\u0e32",
+
+ // Hyphens and other punctuation follow whitespace but come before letters
+ "\\u0e01\\u0e32", "<", "\\u0e01\\u0e32-",
+ "\\u0e01\\u0e32-", "<", "\\u0e01\\u0e32\\u0e01\\u0e32",
+
+ // Doubler follows an indentical word without the doubler
+ "\\u0e01\\u0e32", "<", "\\u0e01\\u0e32\\u0e46",
+ "\\u0e01\\u0e32\\u0e46", "<", "\\u0e01\\u0e32\\u0e01\\u0e32",
+
+
+ // \\u0e45 after either \\u0e24 or \\u0e26 is treated as a single
+ // combining character, similar to "c < ch" in traditional spanish.
+ // TODO: beef up this case
+ "\\u0e24\\u0e29\\u0e35", "<", "\\u0e24\\u0e45\\u0e29\\u0e35",
+ "\\u0e26\\u0e29\\u0e35", "<", "\\u0e26\\u0e45\\u0e29\\u0e35",
+
+ // Vowels reorder, should compare \\u0e2d and \\u0e34
+ "\\u0e40\\u0e01\\u0e2d", "<", "\\u0e40\\u0e01\\u0e34",
+
+ // Tones are compared after the rest of the word (e.g. primary ignorable)
+ "\\u0e01\\u0e32\\u0e01\\u0e48\\u0e32", "<", "\\u0e01\\u0e49\\u0e32\\u0e01\\u0e32",
+
+ // Periods are ignored entirely
+ "\\u0e01.\\u0e01.", "<", "\\u0e01\\u0e32",
+ };
+ const int32_t TESTS_length = (int32_t)(sizeof(TESTS)/sizeof(TESTS[0]));
+
+ if (coll == 0) {
+ errln("Error: could not construct Thai collator");
+ return;
+ }
+ compareArray(*coll, TESTS, TESTS_length);
+}
+
+//------------------------------------------------------------------------
+// Internal utilities
+//------------------------------------------------------------------------
+
+void CollationThaiTest::compareArray(Collator& c, const char* tests[],
+ int32_t testsLength) {
+ for (int32_t i = 0; i < testsLength; i += 3) {
+
+ Collator::EComparisonResult expect;
+ if (tests[i+1][0] == '<') {
+ expect = Collator::LESS;
+ } else if (tests[i+1][0] == '>') {
+ expect = Collator::GREATER;
+ } else if (tests[i+1][0] == '=') {
+ expect = Collator::EQUAL;
+ } else {
+ // expect = Integer.decode(tests[i+1]).intValue();
+ errln((UnicodeString)"Error: unknown operator " + tests[i+1]);
+ return;
+ }
+
+ UnicodeString s1, s2;
+ parseChars(s1, tests[i]);
+ parseChars(s2, tests[i+2]);
+
+ doTest(&c, s1, s2, expect);
+#if 0
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t result = c.compare(s1, s2);
+ if (sign(result) != sign(expect))
+ {
+ UnicodeString t1, t2;
+ errln(UnicodeString("") +
+ i/3 + ": compare(" + IntlTest::prettify(s1, t1)
+ + " , " + IntlTest::prettify(s2, t2)
+ + ") got " + result + "; expected " + expect);
+
+ CollationKey k1, k2;
+ c.getCollationKey(s1, k1, status);
+ c.getCollationKey(s2, k2, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"Fail: getCollationKey returned " + u_errorName(status));
+ return;
+ }
+ errln((UnicodeString)" key1: " + prettify(k1, t1) );
+ errln((UnicodeString)" key2: " + prettify(k2, t2) );
+ }
+ else
+ {
+ // Collator.compare worked OK; now try the collation keys
+ CollationKey k1, k2;
+ c.getCollationKey(s1, k1, status);
+ c.getCollationKey(s2, k2, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"Fail: getCollationKey returned " + u_errorName(status));
+ return;
+ }
+
+ result = k1.compareTo(k2);
+ if (sign(result) != sign(expect)) {
+ UnicodeString t1, t2;
+ errln(UnicodeString("") +
+ i/3 + ": key(" + IntlTest::prettify(s1, t1)
+ + ").compareTo(key(" + IntlTest::prettify(s2, t2)
+ + ")) got " + result + "; expected " + expect);
+
+ errln((UnicodeString)" " + prettify(k1, t1) + " vs. " + prettify(k2, t2));
+ }
+ }
+#endif
+ }
+}
+
+int8_t CollationThaiTest::sign(int32_t i) {
+ if (i < 0) return -1;
+ if (i > 0) return 1;
+ return 0;
+}
+
+/**
+ * Set a UnicodeString corresponding to the given string. Use
+ * UnicodeString and the default converter, unless we see the sequence
+ * "\\u", in which case we interpret the subsequent escape.
+ */
+UnicodeString& CollationThaiTest::parseChars(UnicodeString& result,
+ const char* chars) {
+ return result = CharsToUnicodeString(chars);
+}
+
+UCollator *thaiColl = NULL;
+
+U_CDECL_BEGIN
+static int U_CALLCONV
+StrCmp(const void *p1, const void *p2) {
+ return ucol_strcoll(thaiColl, *(UChar **) p1, -1, *(UChar **)p2, -1);
+}
+U_CDECL_END
+
+
+#define LINES 6
+
+void CollationThaiTest::TestInvalidThai(void) {
+ const char *tests[LINES] = {
+ "\\u0E44\\u0E01\\u0E44\\u0E01",
+ "\\u0E44\\u0E01\\u0E01\\u0E44",
+ "\\u0E01\\u0E44\\u0E01\\u0E44",
+ "\\u0E01\\u0E01\\u0E44\\u0E44",
+ "\\u0E44\\u0E44\\u0E01\\u0E01",
+ "\\u0E01\\u0E44\\u0E44\\u0E01",
+ };
+
+ UChar strings[LINES][20];
+
+ UChar *toSort[LINES];
+
+ int32_t i = 0, j = 0, len = 0;
+
+ UErrorCode coll_status = U_ZERO_ERROR;
+ UnicodeString iteratorText;
+
+ thaiColl = ucol_open ("th_TH", &coll_status);
+ if (U_FAILURE(coll_status)) {
+ errln("Error opening Thai collator: %s", u_errorName(coll_status));
+ return;
+ }
+
+ CollationElementIterator* c = ((RuleBasedCollator *)coll)->createCollationElementIterator( iteratorText );
+
+ for(i = 0; i < (int32_t)(sizeof(tests)/sizeof(tests[0])); i++) {
+ len = u_unescape(tests[i], strings[i], 20);
+ strings[i][len] = 0;
+ toSort[i] = strings[i];
+ }
+
+ qsort (toSort, LINES, sizeof (UChar *), StrCmp);
+
+ for (i=0; i < LINES; i++)
+ {
+ logln("%i", i);
+ for (j=i+1; j < LINES; j++) {
+ if (ucol_strcoll (thaiColl, toSort[i], -1, toSort[j], -1) == UCOL_GREATER)
+ {
+ // inconsistency ordering found!
+ errln("Inconsistent ordering between strings %i and %i", i, j);
+ }
+ }
+ iteratorText.setTo(toSort[i]);
+ c->setText(iteratorText, coll_status);
+ backAndForth(*c);
+ }
+
+
+ ucol_close(thaiColl);
+ delete c;
+}
+
+void CollationThaiTest::TestReordering(void) {
+ const char *tests[] = {
+ "\\u0E41c\\u0301", "=", "\\u0E41\\u0107", // composition
+ "\\u0E41\\uD835\\uDFCE", "<", "\\u0E41\\uD835\\uDFCF", // supplementaries
+ "\\u0E41\\uD834\\uDD5F", "=", "\\u0E41\\uD834\\uDD58\\uD834\\uDD65", // supplementary composition decomps to supplementary
+ "\\u0E41\\uD87E\\uDC02", "=", "\\u0E41\\u4E41", // supplementary composition decomps to BMP
+ "\\u0E41\\u0301", "=", "\\u0E41\\u0301", // unsafe (just checking backwards iteration)
+ "\\u0E41\\u0301\\u0316", "=", "\\u0E41\\u0316\\u0301",
+ // after UCA 4.1, the two lines below are not equal anymore do not have equal sign
+ "\\u0e24\\u0e41", "<", "\\u0e41\\u0e24", // exiting contraction bug
+ "\\u0e3f\\u0e3f\\u0e24\\u0e41", "<", "\\u0e3f\\u0e3f\\u0e41\\u0e24",
+
+ "abc\\u0E41c\\u0301", "=", "abc\\u0E41\\u0107", // composition
+ "abc\\u0E41\\uD834\\uDC00", "<", "abc\\u0E41\\uD834\\uDC01", // supplementaries
+ "abc\\u0E41\\uD834\\uDD5F", "=", "abc\\u0E41\\uD834\\uDD58\\uD834\\uDD65", // supplementary composition decomps to supplementary
+ "abc\\u0E41\\uD87E\\uDC02", "=", "abc\\u0E41\\u4E41", // supplementary composition decomps to BMP
+ "abc\\u0E41\\u0301", "=", "abc\\u0E41\\u0301", // unsafe (just checking backwards iteration)
+ "abc\\u0E41\\u0301\\u0316", "=", "abc\\u0E41\\u0316\\u0301",
+
+ "\\u0E41c\\u0301abc", "=", "\\u0E41\\u0107abc", // composition
+ "\\u0E41\\uD834\\uDC00abc", "<", "\\u0E41\\uD834\\uDC01abc", // supplementaries
+ "\\u0E41\\uD834\\uDD5Fabc", "=", "\\u0E41\\uD834\\uDD58\\uD834\\uDD65abc", // supplementary composition decomps to supplementary
+ "\\u0E41\\uD87E\\uDC02abc", "=", "\\u0E41\\u4E41abc", // supplementary composition decomps to BMP
+ "\\u0E41\\u0301abc", "=", "\\u0E41\\u0301abc", // unsafe (just checking backwards iteration)
+ "\\u0E41\\u0301\\u0316abc", "=", "\\u0E41\\u0316\\u0301abc",
+
+ "abc\\u0E41c\\u0301abc", "=", "abc\\u0E41\\u0107abc", // composition
+ "abc\\u0E41\\uD834\\uDC00abc", "<", "abc\\u0E41\\uD834\\uDC01abc", // supplementaries
+ "abc\\u0E41\\uD834\\uDD5Fabc", "=", "abc\\u0E41\\uD834\\uDD58\\uD834\\uDD65abc", // supplementary composition decomps to supplementary
+ "abc\\u0E41\\uD87E\\uDC02abc", "=", "abc\\u0E41\\u4E41abc", // supplementary composition decomps to BMP
+ "abc\\u0E41\\u0301abc", "=", "abc\\u0E41\\u0301abc", // unsafe (just checking backwards iteration)
+ "abc\\u0E41\\u0301\\u0316abc", "=", "abc\\u0E41\\u0316\\u0301abc",
+ };
+
+ compareArray(*coll, tests, sizeof(tests)/sizeof(tests[0]));
+
+ const char *rule = "& c < ab";
+ const char *testcontraction[] = { "\\u0E41ab", ">", "\\u0E41c"}; // After UCA 4.1 Thai are normal so won't break a contraction
+ UnicodeString rules;
+ UErrorCode status = U_ZERO_ERROR;
+ parseChars(rules, rule);
+ RuleBasedCollator *rcoll = new RuleBasedCollator(rules, status);
+ if(U_SUCCESS(status)) {
+ compareArray(*rcoll, testcontraction, 3);
+ delete rcoll;
+ } else {
+ errln("Couldn't instantiate collator from rules");
+ }
+
+}
+
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/thcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/thcoll.h
new file mode 100644
index 00000000000..2b10c201118
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/thcoll.h
@@ -0,0 +1,80 @@
+/*
+**********************************************************************
+* Copyright (C) 1999-2003, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 12/09/99 aliu Ported from Java.
+**********************************************************************
+*/
+
+#ifndef COLLATIONTHAITEST_H
+#define COLLATIONTHAITEST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationThaiTest : public IntlTestCollator {
+ Collator* coll; // Thai collator
+
+public:
+
+ CollationThaiTest();
+ virtual ~CollationThaiTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+
+ /**
+ * Read the external dictionary file, which is already in proper
+ * sorted order, and confirm that the collator compares each line as
+ * preceding the following line.
+ */
+ void TestDictionary(void);
+
+ /**
+ * Odd corner conditions taken from "How to Sort Thai Without Rewriting Sort",
+ * by Doug Cooper, http://seasrc.th.net/paper/thaisort.zip
+ */
+ void TestCornerCases(void);
+
+ /**
+ * Read the external names list, and confirms that the collator
+ * gets the same results when comparing lines one to another
+ * using regular and iterative comparison.
+ */
+ void TestNamesList(void);
+
+ /**
+ * test that invalid Thai sorts properly
+ */
+ void TestInvalidThai(void);
+
+ /**
+ * test that reording is done properly
+ */
+ void TestReordering(void);
+
+private:
+
+ void compareArray(Collator& c, const char* tests[],
+ int32_t testsLength);
+
+ int8_t sign(int32_t i);
+
+ /**
+ * Set a UnicodeString corresponding to the given string. Use
+ * UnicodeString and the default converter, unless we see the sequence
+ * "\\u", in which case we interpret the subsequent escape.
+ */
+ UnicodeString& parseChars(UnicodeString& result,
+ const char* chars);
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.cpp
new file mode 100644
index 00000000000..aef0179f167
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.cpp
@@ -0,0 +1,1256 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************
+ * File TMSGFMT.CPP
+ *
+ * Modification History:
+ *
+ * Date Name Description
+ * 03/24/97 helena Converted from Java.
+ * 07/11/97 helena Updated to work on AIX.
+ * 08/04/97 jfitz Updated to intltest
+ *******************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "tmsgfmt.h"
+
+#include "unicode/format.h"
+#include "unicode/decimfmt.h"
+#include "unicode/locid.h"
+#include "unicode/msgfmt.h"
+#include "unicode/numfmt.h"
+#include "unicode/choicfmt.h"
+#include "unicode/gregocal.h"
+#include <stdio.h>
+
+void
+TestMessageFormat::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,testBug1);
+ TESTCASE(1,testBug2);
+ TESTCASE(2,sample);
+ TESTCASE(3,PatternTest);
+ TESTCASE(4,testStaticFormat);
+ TESTCASE(5,testSimpleFormat);
+ TESTCASE(6,testMsgFormatChoice);
+ TESTCASE(7,testCopyConstructor);
+ TESTCASE(8,testAssignment);
+ TESTCASE(9,testClone);
+ TESTCASE(10,testEquals);
+ TESTCASE(11,testNotEquals);
+ TESTCASE(12,testSetLocale);
+ TESTCASE(13,testFormat);
+ TESTCASE(14,testParse);
+ TESTCASE(15,testAdopt);
+ TESTCASE(16,testCopyConstructor2);
+ TESTCASE(17,TestUnlimitedArgsAndSubformats);
+ TESTCASE(18,TestRBNF);
+ TESTCASE(19,TestTurkishCasing);
+ TESTCASE(20,testAutoQuoteApostrophe);
+ default: name = ""; break;
+ }
+}
+
+void TestMessageFormat::testBug3()
+{
+ double myNumber = -123456;
+ DecimalFormat *form = 0;
+ Locale locale[] = {
+ Locale("ar", "", ""),
+ Locale("be", "", ""),
+ Locale("bg", "", ""),
+ Locale("ca", "", ""),
+ Locale("cs", "", ""),
+ Locale("da", "", ""),
+ Locale("de", "", ""),
+ Locale("de", "AT", ""),
+ Locale("de", "CH", ""),
+ Locale("el", "", ""), // 10
+ Locale("en", "CA", ""),
+ Locale("en", "GB", ""),
+ Locale("en", "IE", ""),
+ Locale("en", "US", ""),
+ Locale("es", "", ""),
+ Locale("et", "", ""),
+ Locale("fi", "", ""),
+ Locale("fr", "", ""),
+ Locale("fr", "BE", ""),
+ Locale("fr", "CA", ""), // 20
+ Locale("fr", "CH", ""),
+ Locale("he", "", ""),
+ Locale("hr", "", ""),
+ Locale("hu", "", ""),
+ Locale("is", "", ""),
+ Locale("it", "", ""),
+ Locale("it", "CH", ""),
+ Locale("ja", "", ""),
+ Locale("ko", "", ""),
+ Locale("lt", "", ""), // 30
+ Locale("lv", "", ""),
+ Locale("mk", "", ""),
+ Locale("nl", "", ""),
+ Locale("nl", "BE", ""),
+ Locale("no", "", ""),
+ Locale("pl", "", ""),
+ Locale("pt", "", ""),
+ Locale("ro", "", ""),
+ Locale("ru", "", ""),
+ Locale("sh", "", ""), // 40
+ Locale("sk", "", ""),
+ Locale("sl", "", ""),
+ Locale("sq", "", ""),
+ Locale("sr", "", ""),
+ Locale("sv", "", ""),
+ Locale("tr", "", ""),
+ Locale("uk", "", ""),
+ Locale("zh", "", ""),
+ Locale("zh", "TW", "") // 49
+ };
+ int32_t i;
+ for (i= 0; i < 49; i++) {
+ UnicodeString buffer;
+ logln(locale[i].getDisplayName(buffer));
+ UErrorCode success = U_ZERO_ERROR;
+// form = (DecimalFormat*)NumberFormat::createCurrencyInstance(locale[i], success);
+ form = (DecimalFormat*)NumberFormat::createInstance(locale[i], success);
+ if (U_FAILURE(success)) {
+ errln("Err: Number Format ");
+ logln("Number format creation failed.");
+ continue;
+ }
+ Formattable result;
+ FieldPosition pos(0);
+ buffer.remove();
+ form->format(myNumber, buffer, pos);
+ success = U_ZERO_ERROR;
+ ParsePosition parsePos;
+ form->parse(buffer, result, parsePos);
+ logln(UnicodeString(" -> ") /* + << dec*/ + toString(result) + UnicodeString("[supposed output for result]"));
+ if (U_FAILURE(success)) {
+ errln("Err: Number Format parse");
+ logln("Number format parse failed.");
+ }
+ delete form;
+ }
+}
+
+void TestMessageFormat::testBug1()
+{
+ const double limit[] = {0.0, 1.0, 2.0};
+ const UnicodeString formats[] = {"0.0<=Arg<1.0",
+ "1.0<=Arg<2.0",
+ "2.0<-Arg"};
+ ChoiceFormat *cf = new ChoiceFormat(limit, formats, 3);
+ FieldPosition status(0);
+ UnicodeString toAppendTo;
+ cf->format((int32_t)1, toAppendTo, status);
+ if (toAppendTo != "1.0<=Arg<2.0") {
+ errln("ChoiceFormat cmp in testBug1");
+ }
+ logln(toAppendTo);
+ delete cf;
+}
+
+void TestMessageFormat::testBug2()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString result;
+ // {sfb} use double format in pattern, so result will match (not strictly necessary)
+ const UnicodeString pattern = "There {0,choice,0.0#are no files|1.0#is one file|1.0<are {0, number} files} on disk {1}. ";
+ logln("The input pattern : " + pattern);
+ MessageFormat *fmt = new MessageFormat(pattern, status);
+ if (U_FAILURE(status)) {
+ errln("MessageFormat pattern creation failed.");
+ return;
+ }
+ logln("The output pattern is : " + fmt->toPattern(result));
+ if (pattern != result) {
+ errln("MessageFormat::toPattern() failed.");
+ }
+ delete fmt;
+}
+
+#if 0
+#if defined(_DEBUG) && U_IOSTREAM_SOURCE!=0
+//----------------------------------------------------
+// console I/O
+//----------------------------------------------------
+
+#if U_IOSTREAM_SOURCE >= 199711
+# include <iostream>
+ std::ostream& operator<<(std::ostream& stream, const Formattable& obj);
+#elif U_IOSTREAM_SOURCE >= 198506
+# include <iostream.h>
+ ostream& operator<<(ostream& stream, const Formattable& obj);
+#endif
+
+#include "unicode/datefmt.h"
+#include <stdlib.h>
+#include <string.h>
+
+IntlTest&
+operator<<( IntlTest& stream,
+ const Formattable& obj)
+{
+ static DateFormat *defDateFormat = 0;
+
+ UnicodeString buffer;
+ switch(obj.getType()) {
+ case Formattable::kDate :
+ if (defDateFormat == 0) {
+ defDateFormat = DateFormat::createInstance();
+ }
+ defDateFormat->format(obj.getDate(), buffer);
+ stream << buffer;
+ break;
+ case Formattable::kDouble :
+ char convert[20];
+ sprintf( convert, "%lf", obj.getDouble() );
+ stream << convert << "D";
+ break;
+ case Formattable::kLong :
+ stream << obj.getLong() << "L";
+ break;
+ case Formattable::kString:
+ stream << "\"" << obj.getString(buffer) << "\"";
+ break;
+ case Formattable::kArray:
+ int32_t i, count;
+ const Formattable* array;
+ array = obj.getArray(count);
+ stream << "[";
+ for (i=0; i<count; ++i) stream << array[i] << ( (i==(count-1)) ? "" : ", " );
+ stream << "]";
+ break;
+ default:
+ stream << "INVALID_Formattable";
+ }
+ return stream;
+}
+#endif /* defined(_DEBUG) && U_IOSTREAM_SOURCE!=0 */
+#endif
+
+void TestMessageFormat::PatternTest()
+{
+ Formattable testArgs[] = {
+ Formattable(double(1)), Formattable(double(3456)),
+ Formattable("Disk"), Formattable(UDate((int32_t)1000000000L), Formattable::kIsDate)
+ };
+ UnicodeString testCases[] = {
+ "Quotes '', '{', 'a' {0} '{0}'",
+ "Quotes '', '{', 'a' {0,number} '{0}'",
+ "'{'1,number,'#',##} {1,number,'#',##}",
+ "There are {1} files on {2} at {3}.",
+ "On {2}, there are {1} files, with {0,number,currency}.",
+ "'{1,number,percent}', {1,number,percent},",
+ "'{1,date,full}', {1,date,full},",
+ "'{3,date,full}', {3,date,full},",
+ "'{1,number,#,##}' {1,number,#,##}",
+ };
+
+ UnicodeString testResultPatterns[] = {
+ "Quotes '', '{', a {0} '{'0}",
+ "Quotes '', '{', a {0,number} '{'0}",
+ "'{'1,number,#,##} {1,number,'#'#,##}",
+ "There are {1} files on {2} at {3}.",
+ "On {2}, there are {1} files, with {0,number,currency}.",
+ "'{'1,number,percent}, {1,number,percent},",
+ "'{'1,date,full}, {1,date,full},",
+ "'{'3,date,full}, {3,date,full},",
+ "'{'1,number,#,##} {1,number,#,##}"
+ };
+
+ UnicodeString testResultStrings[] = {
+ "Quotes ', {, a 1 {0}",
+ "Quotes ', {, a 1 {0}",
+ "{1,number,#,##} #34,56",
+ "There are 3,456 files on Disk at 1/12/70 5:46 AM.",
+ "On Disk, there are 3,456 files, with $1.00.",
+ "{1,number,percent}, 345,600%,",
+ "{1,date,full}, Wednesday, December 31, 1969,",
+ "{3,date,full}, Monday, January 12, 1970,",
+ "{1,number,#,##} 34,56"
+ };
+
+
+ for (int32_t i = 0; i < 9; ++i) {
+ //it_out << "\nPat in: " << testCases[i]);
+
+ MessageFormat *form = 0;
+ UErrorCode success = U_ZERO_ERROR;
+ UnicodeString buffer;
+ form = new MessageFormat(testCases[i], Locale::getUS(), success);
+ if (U_FAILURE(success)) {
+ errln("MessageFormat creation failed.#1");
+ logln(((UnicodeString)"MessageFormat for ") + testCases[i] + " creation failed.\n");
+ continue;
+ }
+ if (form->toPattern(buffer) != testResultPatterns[i]) {
+ errln(UnicodeString("TestMessageFormat::PatternTest failed test #2, i = ") + i);
+ //form->toPattern(buffer);
+ errln(((UnicodeString)" Orig: ") + testCases[i]);
+ errln(((UnicodeString)" Exp: ") + testResultPatterns[i]);
+ errln(((UnicodeString)" Got: ") + buffer);
+ }
+
+ //it_out << "Pat out: " << form->toPattern(buffer));
+ UnicodeString result;
+ int32_t count = 4;
+ FieldPosition fieldpos(0);
+ form->format(testArgs, count, result, fieldpos, success);
+ if (U_FAILURE(success)) {
+ errln("MessageFormat failed test #3");
+ logln("TestMessageFormat::PatternTest failed test #3");
+ continue;
+ }
+ if (result != testResultStrings[i]) {
+ errln("TestMessageFormat::PatternTest failed test #4");
+ logln("TestMessageFormat::PatternTest failed #4.");
+ logln(UnicodeString(" Result: ") + result );
+ logln(UnicodeString(" Expected: ") + testResultStrings[i] );
+ }
+
+
+ //it_out << "Result: " << result);
+#if 0
+ /* TODO: Look at this test and see if this is still a valid test */
+ logln("---------------- test parse ----------------");
+
+ form->toPattern(buffer);
+ logln("MSG pattern for parse: " + buffer);
+
+ int32_t parseCount = 0;
+ Formattable* values = form->parse(result, parseCount, success);
+ if (U_FAILURE(success)) {
+ errln("MessageFormat failed test #5");
+ logln(UnicodeString("MessageFormat failed test #5 with error code ")+(int32_t)success);
+ } else if (parseCount != count) {
+ errln("MSG count not %d as expected. Got %d", count, parseCount);
+ }
+ UBool failed = FALSE;
+ for (int32_t j = 0; j < parseCount; ++j) {
+ if (values == 0 || testArgs[j] != values[j]) {
+ errln(((UnicodeString)"MSG testargs[") + j + "]: " + toString(testArgs[j]));
+ errln(((UnicodeString)"MSG values[") + j + "] : " + toString(values[j]));
+ failed = TRUE;
+ }
+ }
+ if (failed)
+ errln("MessageFormat failed test #6");
+#endif
+ delete form;
+ }
+}
+
+void TestMessageFormat::sample()
+{
+ MessageFormat *form = 0;
+ UnicodeString buffer1, buffer2;
+ UErrorCode success = U_ZERO_ERROR;
+ form = new MessageFormat("There are {0} files on {1}", success);
+ if (U_FAILURE(success)) {
+ errln("Err: Message format creation failed");
+ logln("Sample message format creation failed.");
+ return;
+ }
+ UnicodeString abc("abc");
+ UnicodeString def("def");
+ Formattable testArgs1[] = { abc, def };
+ FieldPosition fieldpos(0);
+ assertEquals("format",
+ "There are abc files on def",
+ form->format(testArgs1, 2, buffer2, fieldpos, success));
+ assertSuccess("format", success);
+ delete form;
+}
+
+void TestMessageFormat::testStaticFormat()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ Formattable arguments[] = {
+ (int32_t)7,
+ Formattable(UDate(8.71068e+011), Formattable::kIsDate),
+ "a disturbance in the Force"
+ };
+
+ UnicodeString result;
+ result = MessageFormat::format(
+ "At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
+ arguments,
+ 3,
+ result,
+ err);
+
+ if (U_FAILURE(err)) {
+ errln("TestMessageFormat::testStaticFormat #1");
+ logln(UnicodeString("TestMessageFormat::testStaticFormat failed test #1 with error code ")+(int32_t)err);
+ return;
+ }
+
+ const UnicodeString expected(
+ "At 12:20:00 PM on Aug 8, 1997, there was a disturbance in the Force on planet 7.", "");
+ if (result != expected) {
+ errln("TestMessageFormat::testStaticFormat failed on test");
+ logln( UnicodeString(" Result: ") + result );
+ logln( UnicodeString(" Expected: ") + expected );
+ }
+}
+
+/* When the default locale is tr, make sure that the pattern can still be parsed. */
+void TestMessageFormat::TestTurkishCasing()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ Locale saveDefaultLocale;
+ Locale::setDefault( Locale("tr"), err );
+
+ Formattable arguments[] = {
+ (int32_t)7,
+ Formattable(UDate(8.71068e+011), Formattable::kIsDate),
+ "a disturbance in the Force"
+ };
+
+ UnicodeString result;
+ result = MessageFormat::format(
+ "At {1,TIME} on {1,DATE,SHORT}, there was {2} on planet {0,NUMBER,INTEGER}.",
+ arguments,
+ 3,
+ result,
+ err);
+
+ if (U_FAILURE(err)) {
+ errln("TestTurkishCasing #1 with error code %s", u_errorName(err));
+ return;
+ }
+
+ const UnicodeString expected(
+ "At 12:20:00 on 08.08.1997, there was a disturbance in the Force on planet 7.", "");
+ if (result != expected) {
+ errln("TestTurkishCasing failed on test");
+ errln( UnicodeString(" Result: ") + result );
+ errln( UnicodeString(" Expected: ") + expected );
+ }
+ Locale::setDefault( saveDefaultLocale, err );
+}
+
+void TestMessageFormat::testSimpleFormat(/* char* par */)
+{
+ logln("running TestMessageFormat::testSimpleFormat");
+
+ UErrorCode err = U_ZERO_ERROR;
+
+ Formattable testArgs1[] = {(int32_t)0, "MyDisk"};
+ Formattable testArgs2[] = {(int32_t)1, "MyDisk"};
+ Formattable testArgs3[] = {(int32_t)12, "MyDisk"};
+
+ MessageFormat* form = new MessageFormat(
+ "The disk \"{1}\" contains {0} file(s).", err);
+
+ UnicodeString string;
+ FieldPosition ignore(FieldPosition::DONT_CARE);
+ form->format(testArgs1, 2, string, ignore, err);
+ if (U_FAILURE(err) || string != "The disk \"MyDisk\" contains 0 file(s).") {
+ errln(UnicodeString("TestMessageFormat::testSimpleFormat failed on test #1"));
+ }
+
+ ignore.setField(FieldPosition::DONT_CARE);
+ string.remove();
+ form->format(testArgs2, 2, string, ignore, err);
+ if (U_FAILURE(err) || string != "The disk \"MyDisk\" contains 1 file(s).") {
+ logln(string);
+ errln(UnicodeString("TestMessageFormat::testSimpleFormat failed on test #2")+string);
+ }
+
+ ignore.setField(FieldPosition::DONT_CARE);
+ string.remove();
+ form->format(testArgs3, 2, string, ignore, err);
+ if (U_FAILURE(err) || string != "The disk \"MyDisk\" contains 12 file(s).") {
+ errln(UnicodeString("TestMessageFormat::testSimpleFormat failed on test #3")+string);
+ }
+
+ delete form;
+ }
+
+void TestMessageFormat::testMsgFormatChoice(/* char* par */)
+{
+ logln("running TestMessageFormat::testMsgFormatChoice");
+
+ UErrorCode err = U_ZERO_ERROR;
+
+ MessageFormat* form = new MessageFormat("The disk \"{1}\" contains {0}.", err);
+ double filelimits[] = {0,1,2};
+ UnicodeString filepart[] = {"no files","one file","{0,number} files"};
+ ChoiceFormat* fileform = new ChoiceFormat(filelimits, filepart, 3);
+ form->setFormat(1,*fileform); // NOT zero, see below
+ //is the format adopted?
+
+ FieldPosition ignore(FieldPosition::DONT_CARE);
+ UnicodeString string;
+ Formattable testArgs1[] = {(int32_t)0, "MyDisk"};
+ form->format(testArgs1, 2, string, ignore, err);
+ if (string != "The disk \"MyDisk\" contains no files.") {
+ errln("TestMessageFormat::testMsgFormatChoice failed on test #1");
+ }
+
+ ignore.setField(FieldPosition::DONT_CARE);
+ string.remove();
+ Formattable testArgs2[] = {(int32_t)1, "MyDisk"};
+ form->format(testArgs2, 2, string, ignore, err);
+ if (string != "The disk \"MyDisk\" contains one file.") {
+ errln("TestMessageFormat::testMsgFormatChoice failed on test #2");
+ }
+
+ ignore.setField(FieldPosition::DONT_CARE);
+ string.remove();
+ Formattable testArgs3[] = {(int32_t)1273, "MyDisk"};
+ form->format(testArgs3, 2, string, ignore, err);
+ if (string != "The disk \"MyDisk\" contains 1,273 files.") {
+ errln("TestMessageFormat::testMsgFormatChoice failed on test #3");
+ }
+
+ delete form;
+ delete fileform;
+}
+
+
+//---------------------------------
+// API Tests
+//---------------------------------
+
+void TestMessageFormat::testCopyConstructor()
+{
+ UErrorCode success = U_ZERO_ERROR;
+ MessageFormat *x = new MessageFormat("There are {0} files on {1}", success);
+ MessageFormat *z = new MessageFormat("There are {0} files on {1} created", success);
+ MessageFormat *y = 0;
+ y = new MessageFormat(*x);
+ if ( (*x == *y) &&
+ (*x != *z) &&
+ (*y != *z) )
+ logln("First test (operator ==): Passed!");
+ else {
+ errln("TestMessageFormat::testCopyConstructor failed #1");
+ logln("First test (operator ==): Failed!");
+ }
+ if ( ((*x == *y) && (*y == *x)) &&
+ ((*x != *z) && (*z != *x)) &&
+ ((*y != *z) && (*z != *y)) )
+ logln("Second test (equals): Passed!");
+ else {
+ errln("TestMessageFormat::testCopyConstructor failed #2");
+ logln("Second test (equals): Failed!");
+ }
+
+ delete x;
+ delete y;
+ delete z;
+}
+
+
+void TestMessageFormat::testAssignment()
+{
+ UErrorCode success = U_ZERO_ERROR;
+ MessageFormat *x = new MessageFormat("There are {0} files on {1}", success);
+ MessageFormat *z = new MessageFormat("There are {0} files on {1} created", success);
+ MessageFormat *y = new MessageFormat("There are {0} files on {1} created", success);
+ *y = *x;
+ if ( (*x == *y) &&
+ (*x != *z) &&
+ (*y != *z) )
+ logln("First test (operator ==): Passed!");
+ else {
+ errln( "TestMessageFormat::testAssignment failed #1");
+ logln("First test (operator ==): Failed!");
+ }
+ if ( ((*x == *y) && (*y == *x)) &&
+ ((*x != *z) && (*z != *x)) &&
+ ((*y != *z) && (*z != *y)) )
+ logln("Second test (equals): Passed!");
+ else {
+ errln("TestMessageFormat::testAssignment failed #2");
+ logln("Second test (equals): Failed!");
+ }
+
+ delete x;
+ delete y;
+ delete z;
+}
+
+void TestMessageFormat::testClone()
+{
+ UErrorCode success = U_ZERO_ERROR;
+ MessageFormat *x = new MessageFormat("There are {0} files on {1}", success);
+ MessageFormat *z = new MessageFormat("There are {0} files on {1} created", success);
+ MessageFormat *y = 0;
+ y = (MessageFormat*)x->clone();
+ if ( (*x == *y) &&
+ (*x != *z) &&
+ (*y != *z) )
+ logln("First test (operator ==): Passed!");
+ else {
+ errln("TestMessageFormat::testClone failed #1");
+ logln("First test (operator ==): Failed!");
+ }
+ if ( ((*x == *y) && (*y == *x)) &&
+ ((*x != *z) && (*z != *x)) &&
+ ((*y != *z) && (*z != *y)) )
+ logln("Second test (equals): Passed!");
+ else {
+ errln("TestMessageFormat::testClone failed #2");
+ logln("Second test (equals): Failed!");
+ }
+
+ delete x;
+ delete y;
+ delete z;
+}
+
+void TestMessageFormat::testEquals()
+{
+ UErrorCode success = U_ZERO_ERROR;
+ MessageFormat x("There are {0} files on {1}", success);
+ MessageFormat y("There are {0} files on {1}", success);
+ if (!(x == y)) {
+ errln( "TestMessageFormat::testEquals failed #1");
+ logln("First test (operator ==): Failed!");
+ }
+
+}
+
+void TestMessageFormat::testNotEquals()
+{
+ UErrorCode success = U_ZERO_ERROR;
+ MessageFormat x("There are {0} files on {1}", success);
+ MessageFormat y(x);
+ y.setLocale(Locale("fr"));
+ if (!(x != y)) {
+ errln( "TestMessageFormat::testEquals failed #1");
+ logln("First test (operator !=): Failed!");
+ }
+ y = x;
+ y.applyPattern("There are {0} files on {1} the disk", success);
+ if (!(x != y)) {
+ errln( "TestMessageFormat::testEquals failed #1");
+ logln("Second test (operator !=): Failed!");
+ }
+}
+
+
+void TestMessageFormat::testSetLocale()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ GregorianCalendar cal(err);
+ Formattable arguments[] = {
+ 456.83,
+ Formattable(UDate(8.71068e+011), Formattable::kIsDate),
+ "deposit"
+ };
+
+ UnicodeString result;
+
+ //UnicodeString formatStr = "At {1,time} on {1,date}, you made a {2} of {0,number,currency}.";
+ UnicodeString formatStr = "At <time> on {1,date}, you made a {2} of {0,number,currency}.";
+ // {sfb} to get $, would need Locale::US, not Locale::ENGLISH
+ // Just use unlocalized currency symbol.
+ //UnicodeString compareStrEng = "At <time> on Aug 8, 1997, you made a deposit of $456.83.";
+ UnicodeString compareStrEng = "At <time> on Aug 8, 1997, you made a deposit of ";
+ compareStrEng += (UChar) 0x00a4;
+ compareStrEng += "456.83.";
+ // {sfb} to get DM, would need Locale::GERMANY, not Locale::GERMAN
+ // Just use unlocalized currency symbol.
+ //UnicodeString compareStrGer = "At <time> on 08.08.1997, you made a deposit of 456,83 DM.";
+ UnicodeString compareStrGer = "At <time> on 08.08.1997, you made a deposit of ";
+ compareStrGer += "456,83 ";
+ compareStrGer += (UChar) 0x00a4;
+ compareStrGer += ".";
+
+ MessageFormat msg( formatStr, err);
+ result = "";
+ FieldPosition pos(0);
+ result = msg.format(
+ arguments,
+ 3,
+ result,
+ pos,
+ err);
+
+ logln(result);
+ if (result != compareStrEng) {
+ errln("*** MSG format err.");
+ }
+
+ msg.setLocale(Locale::getEnglish());
+ UBool getLocale_ok = TRUE;
+ if (msg.getLocale() != Locale::getEnglish()) {
+ errln("*** MSG getLocal err.");
+ getLocale_ok = FALSE;
+ }
+
+ msg.setLocale(Locale::getGerman());
+
+ if (msg.getLocale() != Locale::getGerman()) {
+ errln("*** MSG getLocal err.");
+ getLocale_ok = FALSE;
+ }
+
+ msg.applyPattern( formatStr, err);
+
+ pos.setField(0);
+ result = "";
+ result = msg.format(
+ arguments,
+ 3,
+ result,
+ pos,
+ err);
+
+ logln(result);
+ if (result == compareStrGer) {
+ logln("MSG setLocale tested.");
+ }else{
+ errln( "*** MSG setLocale err.");
+ }
+
+ if (getLocale_ok) {
+ logln("MSG getLocale tested.");
+ }
+}
+
+void TestMessageFormat::testFormat()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ GregorianCalendar cal(err);
+
+ const Formattable ftarray[] =
+ {
+ Formattable( UDate(8.71068e+011), Formattable::kIsDate )
+ };
+ const int32_t ft_cnt = sizeof(ftarray) / sizeof(Formattable);
+ Formattable ft_arr( ftarray, ft_cnt );
+
+ Formattable* fmt = new Formattable(UDate(8.71068e+011), Formattable::kIsDate);
+
+ UnicodeString result;
+
+ //UnicodeString formatStr = "At {1,time} on {1,date}, you made a {2} of {0,number,currency}.";
+ UnicodeString formatStr = "On {0,date}, it began.";
+ UnicodeString compareStr = "On Aug 8, 1997, it began.";
+
+ err = U_ZERO_ERROR;
+ MessageFormat msg( formatStr, err);
+ FieldPosition fp(0);
+
+ result = "";
+ fp = 0;
+ result = msg.format(
+ *fmt,
+ result,
+ //FieldPosition(0),
+ fp,
+ err);
+
+ if (err != U_ILLEGAL_ARGUMENT_ERROR) {
+ errln("*** MSG format without expected error code.");
+ }
+ err = U_ZERO_ERROR;
+
+ result = "";
+ fp = 0;
+ result = msg.format(
+ ft_arr,
+ result,
+ //FieldPosition(0),
+ fp,
+ err);
+
+ logln("MSG format( Formattable&, ... ) expected:" + compareStr);
+ logln("MSG format( Formattable&, ... ) result:" + result);
+ if (result != compareStr) {
+ errln("*** MSG format( Formattable&, .... ) err.");
+ }else{
+ logln("MSG format( Formattable&, ... ) tested.");
+ }
+
+ delete fmt;
+
+}
+
+void TestMessageFormat::testParse()
+{
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t count;
+ UnicodeString msgFormatString = "{0} =sep= {1}";
+ MessageFormat msg( msgFormatString, err);
+ UnicodeString source = "abc =sep= def";
+ UnicodeString tmp1, tmp2;
+
+ Formattable* fmt_arr = msg.parse( source, count, err );
+ if (U_FAILURE(err) || (!fmt_arr)) {
+ errln("*** MSG parse (ustring, count, err) error.");
+ }else{
+ logln("MSG parse -- count: %d", count);
+ if (count != 2) {
+ errln("*** MSG parse (ustring, count, err) count err.");
+ }else{
+ if ((fmt_arr[0].getType() == Formattable::kString)
+ && (fmt_arr[1].getType() == Formattable::kString)
+ && (fmt_arr[0].getString(tmp1) == "abc")
+ && (fmt_arr[1].getString(tmp2) == "def")) {
+ logln("MSG parse (ustring, count, err) tested.");
+ }else{
+ errln("*** MSG parse (ustring, count, err) result err.");
+ }
+ }
+ }
+ delete[] fmt_arr;
+
+ ParsePosition pp(0);
+
+ fmt_arr = msg.parse( source, pp, count );
+ if ((pp == 0) || (!fmt_arr)) {
+ errln("*** MSG parse (ustring, parsepos., count) error.");
+ }else{
+ logln("MSG parse -- count: %d", count);
+ if (count != 2) {
+ errln("*** MSG parse (ustring, parsepos., count) count err.");
+ }else{
+ if ((fmt_arr[0].getType() == Formattable::kString)
+ && (fmt_arr[1].getType() == Formattable::kString)
+ && (fmt_arr[0].getString(tmp1) == "abc")
+ && (fmt_arr[1].getString(tmp2) == "def")) {
+ logln("MSG parse (ustring, parsepos., count) tested.");
+ }else{
+ errln("*** MSG parse (ustring, parsepos., count) result err.");
+ }
+ }
+ }
+ delete[] fmt_arr;
+
+ pp = 0;
+ Formattable fmta;
+
+ msg.parseObject( source, fmta, pp );
+ if (pp == 0) {
+ errln("*** MSG parse (ustring, Formattable, parsepos ) error.");
+ }else{
+ logln("MSG parse -- count: %d", count);
+ fmta.getArray(count);
+ if (count != 2) {
+ errln("*** MSG parse (ustring, Formattable, parsepos ) count err.");
+ }else{
+ if ((fmta[0].getType() == Formattable::kString)
+ && (fmta[1].getType() == Formattable::kString)
+ && (fmta[0].getString(tmp1) == "abc")
+ && (fmta[1].getString(tmp2) == "def")) {
+ logln("MSG parse (ustring, Formattable, parsepos ) tested.");
+ }else{
+ errln("*** MSG parse (ustring, Formattable, parsepos ) result err.");
+ }
+ }
+ }
+}
+
+
+void TestMessageFormat::testAdopt()
+{
+ UErrorCode err = U_ZERO_ERROR;
+
+ UnicodeString formatStr("{0,date},{1},{2,number}", "");
+ UnicodeString formatStrChange("{0,number},{1,number},{2,date}", "");
+ err = U_ZERO_ERROR;
+ MessageFormat msg( formatStr, err);
+ MessageFormat msgCmp( formatStr, err);
+ int32_t count, countCmp;
+ const Format** formats = msg.getFormats(count);
+ const Format** formatsCmp = msgCmp.getFormats(countCmp);
+ const Format** formatsChg = 0;
+ const Format** formatsAct = 0;
+ int32_t countAct;
+ const Format* a;
+ const Format* b;
+ UnicodeString patCmp;
+ UnicodeString patAct;
+ Format** formatsToAdopt;
+
+ if (!formats || !formatsCmp || (count <= 0) || (count != countCmp)) {
+ errln("Error getting Formats");
+ return;
+ }
+
+ int32_t i;
+
+ for (i = 0; i < count; i++) {
+ a = formats[i];
+ b = formatsCmp[i];
+ if ((a != NULL) && (b != NULL)) {
+ if (*a != *b) {
+ errln("a != b");
+ return;
+ }
+ }else if ((a != NULL) || (b != NULL)) {
+ errln("(a != NULL) || (b != NULL)");
+ return;
+ }
+ }
+
+ msg.applyPattern( formatStrChange, err ); //set msg formats to something different
+ int32_t countChg;
+ formatsChg = msg.getFormats(countChg); // tested function
+ if (!formatsChg || (countChg != count)) {
+ errln("Error getting Formats");
+ return;
+ }
+
+ UBool diff;
+ diff = TRUE;
+ for (i = 0; i < count; i++) {
+ a = formatsChg[i];
+ b = formatsCmp[i];
+ if ((a != NULL) && (b != NULL)) {
+ if (*a == *b) {
+ logln("formatsChg == formatsCmp at index %d", i);
+ diff = FALSE;
+ }
+ }
+ }
+ if (!diff) {
+ errln("*** MSG getFormats diff err.");
+ return;
+ }
+
+ logln("MSG getFormats tested.");
+
+ msg.setFormats( formatsCmp, countCmp ); //tested function
+
+ formatsAct = msg.getFormats(countAct);
+ if (!formatsAct || (countAct <=0) || (countAct != countCmp)) {
+ errln("Error getting Formats");
+ return;
+ }
+
+ assertEquals("msgCmp.toPattern()", formatStr, msgCmp.toPattern(patCmp.remove()));
+ assertEquals("msg.toPattern()", formatStr, msg.toPattern(patAct.remove()));
+
+ for (i = 0; i < countAct; i++) {
+ a = formatsAct[i];
+ b = formatsCmp[i];
+ if ((a != NULL) && (b != NULL)) {
+ if (*a != *b) {
+ logln("formatsAct != formatsCmp at index %d", i);
+ errln("a != b");
+ return;
+ }
+ }else if ((a != NULL) || (b != NULL)) {
+ errln("(a != NULL) || (b != NULL)");
+ return;
+ }
+ }
+ logln("MSG setFormats tested.");
+
+ //----
+
+ msg.applyPattern( formatStrChange, err ); //set msg formats to something different
+
+ formatsToAdopt = new Format* [countCmp];
+ if (!formatsToAdopt) {
+ errln("memory allocation error");
+ return;
+ }
+
+ for (i = 0; i < countCmp; i++) {
+ if (formatsCmp[i] == NULL) {
+ formatsToAdopt[i] = NULL;
+ }else{
+ formatsToAdopt[i] = formatsCmp[i]->clone();
+ if (!formatsToAdopt[i]) {
+ errln("Can't clone format at index %d", i);
+ return;
+ }
+ }
+ }
+ msg.adoptFormats( formatsToAdopt, countCmp ); // function to test
+ delete[] formatsToAdopt;
+
+ assertEquals("msgCmp.toPattern()", formatStr, msgCmp.toPattern(patCmp.remove()));
+ assertEquals("msg.toPattern()", formatStr, msg.toPattern(patAct.remove()));
+
+ formatsAct = msg.getFormats(countAct);
+ if (!formatsAct || (countAct <=0) || (countAct != countCmp)) {
+ errln("Error getting Formats");
+ return;
+ }
+
+ for (i = 0; i < countAct; i++) {
+ a = formatsAct[i];
+ b = formatsCmp[i];
+ if ((a != NULL) && (b != NULL)) {
+ if (*a != *b) {
+ errln("a != b");
+ return;
+ }
+ }else if ((a != NULL) || (b != NULL)) {
+ errln("(a != NULL) || (b != NULL)");
+ return;
+ }
+ }
+ logln("MSG adoptFormats tested.");
+
+ //---- adoptFormat
+
+ msg.applyPattern( formatStrChange, err ); //set msg formats to something different
+
+ formatsToAdopt = new Format* [countCmp];
+ if (!formatsToAdopt) {
+ errln("memory allocation error");
+ return;
+ }
+
+ for (i = 0; i < countCmp; i++) {
+ if (formatsCmp[i] == NULL) {
+ formatsToAdopt[i] = NULL;
+ }else{
+ formatsToAdopt[i] = formatsCmp[i]->clone();
+ if (!formatsToAdopt[i]) {
+ errln("Can't clone format at index %d", i);
+ return;
+ }
+ }
+ }
+
+ for ( i = 0; i < countCmp; i++ ) {
+ msg.adoptFormat( i, formatsToAdopt[i] ); // function to test
+ }
+ delete[] formatsToAdopt; // array itself not needed in this case;
+
+ assertEquals("msgCmp.toPattern()", formatStr, msgCmp.toPattern(patCmp.remove()));
+ assertEquals("msg.toPattern()", formatStr, msg.toPattern(patAct.remove()));
+
+ formatsAct = msg.getFormats(countAct);
+ if (!formatsAct || (countAct <=0) || (countAct != countCmp)) {
+ errln("Error getting Formats");
+ return;
+ }
+
+ for (i = 0; i < countAct; i++) {
+ a = formatsAct[i];
+ b = formatsCmp[i];
+ if ((a != NULL) && (b != NULL)) {
+ if (*a != *b) {
+ errln("a != b");
+ return;
+ }
+ }else if ((a != NULL) || (b != NULL)) {
+ errln("(a != NULL) || (b != NULL)");
+ return;
+ }
+ }
+ logln("MSG adoptFormat tested.");
+}
+
+// This test is a regression test for a fixed bug in the copy constructor.
+// It is kept as a global function rather than as a method since the test depends on memory values.
+// (At least before the bug was fixed, whether it showed up or not depended on memory contents,
+// which is probably why it didn't show up in the regular test for the copy constructor.)
+// For this reason, the test isn't changed even though it contains function calls whose results are
+// not tested and had no problems. Actually, the test failed by *crashing*.
+static void _testCopyConstructor2()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString formatStr("Hello World on {0,date,full}", "");
+ UnicodeString resultStr(" ", "");
+ UnicodeString result;
+ FieldPosition fp(0);
+ UDate d = Calendar::getNow();
+ const Formattable fargs( d, Formattable::kIsDate );
+
+ MessageFormat* fmt1 = new MessageFormat( formatStr, status );
+ MessageFormat* fmt2 = new MessageFormat( *fmt1 );
+ MessageFormat* fmt3;
+ MessageFormat* fmt4;
+
+ if (fmt1 == NULL) it_err("testCopyConstructor2: (fmt1 != NULL)");
+
+ result = fmt1->format( &fargs, 1, resultStr, fp, status );
+
+ if (fmt2 == NULL) it_err("testCopyConstructor2: (fmt2 != NULL)");
+
+ fmt3 = (MessageFormat*) fmt1->clone();
+ fmt4 = (MessageFormat*) fmt2->clone();
+
+ if (fmt3 == NULL) it_err("testCopyConstructor2: (fmt3 != NULL)");
+ if (fmt4 == NULL) it_err("testCopyConstructor2: (fmt4 != NULL)");
+
+ result = fmt1->format( &fargs, 1, resultStr, fp, status );
+ result = fmt2->format( &fargs, 1, resultStr, fp, status );
+ result = fmt3->format( &fargs, 1, resultStr, fp, status );
+ result = fmt4->format( &fargs, 1, resultStr, fp, status );
+ delete fmt1;
+ delete fmt2;
+ delete fmt3;
+ delete fmt4;
+}
+
+void TestMessageFormat::testCopyConstructor2() {
+ _testCopyConstructor2();
+}
+
+/**
+ * Verify that MessageFormat accomodates more than 10 arguments and
+ * more than 10 subformats.
+ */
+void TestMessageFormat::TestUnlimitedArgsAndSubformats() {
+ UErrorCode ec = U_ZERO_ERROR;
+ const UnicodeString pattern =
+ "On {0,date} (aka {0,date,short}, aka {0,date,long}) "
+ "at {0,time} (aka {0,time,short}, aka {0,time,long}) "
+ "there were {1,number} werjes "
+ "(a {3,number,percent} increase over {2,number}) "
+ "despite the {4}''s efforts "
+ "and to delight of {5}, {6}, {7}, {8}, {9}, and {10} {11}.";
+ MessageFormat msg(pattern, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: constructor failed");
+ return;
+ }
+
+ const Formattable ARGS[] = {
+ Formattable(UDate(1e13), Formattable::kIsDate),
+ Formattable((int32_t)1303),
+ Formattable((int32_t)1202),
+ Formattable(1303.0/1202 - 1),
+ Formattable("Glimmung"),
+ Formattable("the printers"),
+ Formattable("Nick"),
+ Formattable("his father"),
+ Formattable("his mother"),
+ Formattable("the spiddles"),
+ Formattable("of course"),
+ Formattable("Horace"),
+ };
+ const int32_t ARGS_LENGTH = sizeof(ARGS) / sizeof(ARGS[0]);
+ Formattable ARGS_OBJ(ARGS, ARGS_LENGTH);
+
+ UnicodeString expected =
+ "On Nov 20, 2286 (aka 11/20/86, aka November 20, 2286) "
+ "at 9:46:40 AM (aka 9:46 AM, aka 9:46:40 AM PST) "
+ "there were 1,303 werjes "
+ "(a 8% increase over 1,202) "
+ "despite the Glimmung's efforts "
+ "and to delight of the printers, Nick, his father, "
+ "his mother, the spiddles, and of course Horace.";
+ UnicodeString result;
+ msg.format(ARGS_OBJ, result, ec);
+ if (result == expected) {
+ logln(result);
+ } else {
+ errln((UnicodeString)"FAIL: Got " + result +
+ ", expected " + expected);
+ }
+}
+
+// test RBNF extensions to message format
+void TestMessageFormat::TestRBNF(void) {
+ // WARNING: this depends on the RBNF formats for en_US
+ Locale locale("en", "US", "");
+
+ UErrorCode ec = U_ZERO_ERROR;
+
+ UnicodeString values[] = {
+ // decimal values do not format completely for ordinal or duration, and
+ // do not always parse, so do not include them
+ "0", "1", "12", "100", "123", "1001", "123,456", "-17",
+ };
+ int32_t values_count = sizeof(values)/sizeof(values[0]);
+
+ UnicodeString formats[] = {
+ "There are {0,spellout} files to search.",
+ "There are {0,spellout,%simplified} files to search.",
+ "The bogus spellout {0,spellout,%BOGUS} files behaves like the default.",
+ "This is the {0,ordinal} file to search.", // TODO fix bug, ordinal does not parse
+ "Searching this file will take {0,duration} to complete.",
+ "Searching this file will take {0,duration,%with-words} to complete.",
+ };
+ int32_t formats_count = sizeof(formats)/sizeof(formats[0]);
+
+ Formattable args[1];
+
+ NumberFormat* numFmt = NumberFormat::createInstance(locale, ec);
+ if (U_FAILURE(ec)) {
+ dataerrln("Error calling NumberFormat::createInstance()");
+ return;
+ }
+
+ for (int i = 0; i < formats_count; ++i) {
+ MessageFormat* fmt = new MessageFormat(formats[i], locale, ec);
+ logln((UnicodeString)"Testing format pattern: '" + formats[i] + "'");
+
+ for (int j = 0; j < values_count; ++j) {
+ ec = U_ZERO_ERROR;
+ numFmt->parse(values[j], args[0], ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"Failed to parse test argument " + values[j]);
+ } else {
+ FieldPosition fp(0);
+ UnicodeString result;
+ fmt->format(args, 1, result, fp, ec);
+ logln((UnicodeString)"value: " + toString(args[0]) + " --> " + result + UnicodeString(" ec: ") + u_errorName(ec));
+
+ if (i != 3) { // TODO: fix this, for now skip ordinal parsing (format string at index 3)
+ int32_t count = 0;
+ Formattable* parseResult = fmt->parse(result, count, ec);
+ if (count != 1) {
+ errln((UnicodeString)"parse returned " + count + " args");
+ } else if (parseResult[0] != args[0]) {
+ errln((UnicodeString)"parsed argument " + toString(parseResult[0]) + " != " + toString(args[0]));
+ }
+ delete []parseResult;
+ }
+ }
+ }
+ delete fmt;
+ }
+ delete numFmt;
+}
+
+void TestMessageFormat::testAutoQuoteApostrophe(void) {
+ const char* patterns[] = { // pattern, expected pattern
+ "'", "''",
+ "''", "''",
+ "'{", "'{'",
+ "' {", "'' {",
+ "'a", "''a",
+ "'{'a", "'{'a",
+ "'{a'", "'{a'",
+ "'{}", "'{}'",
+ "{'", "{'",
+ "{'a", "{'a",
+ "{'a{}'a}'a", "{'a{}'a}''a",
+ "'}'", "'}'",
+ "'} '{'}'", "'} '{'}''",
+ "'} {{{''", "'} {{{'''",
+ };
+ int32_t pattern_count = sizeof(patterns)/sizeof(patterns[0]);
+
+ for (int i = 0; i < pattern_count; i += 2) {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString result = MessageFormat::autoQuoteApostrophe(patterns[i], status);
+ UnicodeString target(patterns[i+1]);
+ if (target != result) {
+ const int BUF2_LEN = 64;
+ char buf[256];
+ char buf2[BUF2_LEN];
+ int32_t len = result.extract(0, result.length(), buf2, BUF2_LEN);
+ if (len >= BUF2_LEN) {
+ buf2[BUF2_LEN-1] = 0;
+ }
+ sprintf(buf, "[%2d] test \"%s\": target (\"%s\") != result (\"%s\")\n", i/2, patterns[i], patterns[i+1], buf2);
+ errln(buf);
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.h b/Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.h
new file mode 100644
index 00000000000..5534dadfe14
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tmsgfmt.h
@@ -0,0 +1,96 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+
+#ifndef _TESTMESSAGEFORMAT
+#define _TESTMESSAGEFORMAT
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "unicode/fmtable.h"
+#include "intltest.h"
+
+/**
+ * TestMessageFormat tests MessageFormat, and also a few unctions in ChoiceFormat
+ */
+class TestMessageFormat: public IntlTest {
+public:
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * regression test for a specific bug regarding ChoiceFormat boundaries
+ **/
+ void testBug1(void);
+ /**
+ * regression test for a specific bug regarding MessageFormat using ChoiceFormat
+ **/
+ void testBug2(void);
+ /**
+ * regression test for a specific bug involving NumberFormat and Locales
+ **/
+ void testBug3(void);
+ /**
+ * test MessageFormat with various given patterns
+ **/
+ void PatternTest(void);
+ /**
+ * test MesageFormat formatting functionality in a simple example
+ **/
+ void sample(void);
+
+ /**
+ * tests the static MessageFormat::format method
+ **/
+ void testStaticFormat(/* char* par */);
+ /**
+ * tests MesageFormat functionality with a simple format
+ **/
+ void testSimpleFormat(/* char* par */);
+ /**
+ * tests MesageFormat functionality with a format including a ChoiceFormat
+ **/
+ void testMsgFormatChoice(/* char* par */);
+
+ /**
+ * Verify that MessageFormat accomodates more than 10 arguments
+ * and more than 10 subformats.
+ */
+ void TestUnlimitedArgsAndSubformats();
+
+ /**
+ * Test RBNF extensions to MessageFormat.
+ */
+ void TestRBNF();
+
+ //
+ /**
+ * ------------ API tests ----------
+ * These routines test various API functionality.
+ * In addition to the methods their name suggests,
+ * they often test other methods as well.
+ **/
+ void testCopyConstructor(void);
+ void testCopyConstructor2(void);
+ void testAssignment(void);
+ void testClone(void);
+ void testEquals(void);
+ void testNotEquals(void);
+ void testSetLocale(void);
+ void testFormat(void);
+ void testParse(void);
+ void testAdopt(void);
+ void TestTurkishCasing(void);
+ void testAutoQuoteApostrophe(void);
+
+private:
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tokiter.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tokiter.cpp
new file mode 100644
index 00000000000..202cbd93e3d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tokiter.cpp
@@ -0,0 +1,107 @@
+/*
+**********************************************************************
+* Copyright (c) 2004, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Author: Alan Liu
+* Created: March 22 2004
+* Since: ICU 3.0
+**********************************************************************
+*/
+#include "tokiter.h"
+#include "textfile.h"
+#include "util.h"
+#include "uprops.h"
+
+TokenIterator::TokenIterator(TextFile* r) {
+ reader = r;
+ done = haveLine = FALSE;
+ pos = lastpos = -1;
+}
+
+TokenIterator::~TokenIterator() {
+}
+
+UBool TokenIterator::next(UnicodeString& token, UErrorCode& ec) {
+ if (done || U_FAILURE(ec)) {
+ return FALSE;
+ }
+ token.truncate(0);
+ for (;;) {
+ if (!haveLine) {
+ if (!reader->readLineSkippingComments(line, ec)) {
+ done = TRUE;
+ return FALSE;
+ }
+ haveLine = TRUE;
+ pos = 0;
+ }
+ lastpos = pos;
+ if (!nextToken(token, ec)) {
+ haveLine = FALSE;
+ if (U_FAILURE(ec)) return FALSE;
+ continue;
+ }
+ return TRUE;
+ }
+}
+
+int32_t TokenIterator::getLineNumber() const {
+ return reader->getLineNumber();
+}
+
+/**
+ * Read the next token from 'this->line' and append it to 'token'.
+ * Tokens are separated by rule white space. Tokens may also be
+ * delimited by double or single quotes. The closing quote must match
+ * the opening quote. If a '#' is encountered, the rest of the line
+ * is ignored, unless it is backslash-escaped or within quotes.
+ * @param token the token is appended to this StringBuffer
+ * @param ec input-output error code
+ * @return TRUE if a valid token is found, or FALSE if the end
+ * of the line is reached or an error occurs
+ */
+UBool TokenIterator::nextToken(UnicodeString& token, UErrorCode& ec) {
+ ICU_Utility::skipWhitespace(line, pos, TRUE);
+ if (pos == line.length()) {
+ return FALSE;
+ }
+ UChar c = line.charAt(pos++);
+ UChar quote = 0;
+ switch (c) {
+ case 34/*'"'*/:
+ case 39/*'\\'*/:
+ quote = c;
+ break;
+ case 35/*'#'*/:
+ return FALSE;
+ default:
+ token.append(c);
+ break;
+ }
+ while (pos < line.length()) {
+ c = line.charAt(pos); // 16-bit ok
+ if (c == 92/*'\\'*/) {
+ UChar32 c32 = line.unescapeAt(pos);
+ if (c32 < 0) {
+ ec = U_MALFORMED_UNICODE_ESCAPE;
+ return FALSE;
+ }
+ token.append(c32);
+ } else if ((quote != 0 && c == quote) ||
+ (quote == 0 && uprv_isRuleWhiteSpace(c))) {
+ ++pos;
+ return TRUE;
+ } else if (quote == 0 && c == '#') {
+ return TRUE; // do NOT increment
+ } else {
+ token.append(c);
+ ++pos;
+ }
+ }
+ if (quote != 0) {
+ ec = U_UNTERMINATED_QUOTE;
+ return FALSE;
+ }
+ return TRUE;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tokiter.h b/Build/source/libs/icu/icu-xetex/test/intltest/tokiter.h
new file mode 100644
index 00000000000..5db5753ae4d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tokiter.h
@@ -0,0 +1,71 @@
+/*
+**********************************************************************
+* Copyright (c) 2004-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Author: Alan Liu
+* Created: March 22 2004
+* Since: ICU 3.0
+**********************************************************************
+*/
+#ifndef __ICU_INTLTEST_TOKITER__
+#define __ICU_INTLTEST_TOKITER__
+
+#include "intltest.h"
+
+class TextFile;
+
+/**
+ * An iterator class that returns successive string tokens from some
+ * source. String tokens are, in general, separated by rule white
+ * space in the source test. Furthermore, they may be delimited by
+ * either single or double quotes (opening and closing quotes must
+ * match). Escapes are processed using standard ICU unescaping.
+ */
+class TokenIterator {
+ public:
+
+ /**
+ * Construct an iterator over the tokens returned by the given
+ * TextFile, ignoring blank lines and comment lines (first
+ * non-blank character is '#'). Note that trailing comments on a
+ * line, beginning with the first unquoted '#', are recognized.
+ */
+ TokenIterator(TextFile* r);
+
+ virtual ~TokenIterator();
+
+ /**
+ * Return the next token from this iterator.
+ * @return TRUE if a token was read, or FALSE if no more tokens
+ * are available or an error occurred.
+ */
+ UBool next(UnicodeString& token, UErrorCode& ec);
+
+ /**
+ * Return the one-based line number of the line of the last token
+ * returned by next(). Should only be called after a call to
+ * next(); otherwise the return value is undefined.
+ */
+ int32_t getLineNumber() const;
+
+ /**
+ * Return a string description of the position of the last line
+ * returned by readLine() or readLineSkippingComments().
+ */
+ //public String describePosition() {
+ // return reader.describePosition() + ':' + (lastpos+1);
+ //}
+
+ private:
+ UBool nextToken(UnicodeString& token, UErrorCode& ec);
+
+ TextFile* reader; // alias
+ UnicodeString line;
+ UBool done;
+ UBool haveLine;
+ int32_t pos;
+ int32_t lastpos;
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/transapi.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/transapi.cpp
new file mode 100644
index 00000000000..faf995c16fc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/transapi.cpp
@@ -0,0 +1,984 @@
+/************************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2000-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ************************************************************************/
+/************************************************************************
+* Date Name Description
+* 1/03/2000 Madhu Creation.
+************************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "ittrans.h"
+#include "transapi.h"
+#include "unicode/utypes.h"
+#include "unicode/translit.h"
+#include "unicode/unifilt.h"
+#include "cpdtrans.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "unicode/rep.h"
+#include "unicode/locid.h"
+#include "unicode/uniset.h"
+
+int32_t getInt(UnicodeString str)
+{
+ char buffer[20];
+ int len=str.length();
+ if(len>=20) {
+ len=19;
+ }
+ str.extract(0, len, buffer, "");
+ buffer[len]=0;
+ return atoi(buffer);
+}
+
+//---------------------------------------------
+// runIndexedTest
+//---------------------------------------------
+
+void
+TransliteratorAPITest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,TestgetInverse);
+ TESTCASE(1,TestgetID);
+ TESTCASE(2,TestGetDisplayName);
+ TESTCASE(3,TestTransliterate1);
+ TESTCASE(4,TestTransliterate2);
+ TESTCASE(5,TestTransliterate3);
+ TESTCASE(6,TestSimpleKeyboardTransliterator);
+ TESTCASE(7,TestKeyboardTransliterator1);
+ TESTCASE(8,TestKeyboardTransliterator2);
+ TESTCASE(9,TestKeyboardTransliterator3);
+ TESTCASE(10,TestGetAdoptFilter);
+ TESTCASE(11,TestClone);
+ TESTCASE(12,TestNullTransliterator);
+ TESTCASE(13,TestRegisterUnregister);
+ TESTCASE(14,TestUnicodeFunctor);
+ default: name = ""; break;
+ }
+}
+
+
+void TransliteratorAPITest::TestgetID() {
+ UnicodeString trans="Latin-Greek";
+ UnicodeString ID;
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* t= Transliterator::createInstance(trans, UTRANS_FORWARD, parseError, status);
+ if(t==0 || U_FAILURE(status)){
+ errln("FAIL: construction of Latin-Greek");
+ return;
+ }else{
+ ID= t->getID();
+ if(ID != trans)
+ errln("FAIL: getID returned " + ID + " instead of Latin-Greek");
+ delete t;
+ }
+ int i;
+ for (i=0; i<Transliterator::countAvailableIDs(); i++){
+ status = U_ZERO_ERROR;
+ ID = (UnicodeString) Transliterator::getAvailableID(i);
+ if(ID.indexOf("Thai")>-1){
+ continue;
+ }
+ t = Transliterator::createInstance(ID, UTRANS_FORWARD, parseError, status);
+ if(t == 0){
+ errln("FAIL: " + ID);
+ continue;
+ }
+ if(ID != t->getID())
+ errln("FAIL: getID() returned " + t->getID() + " instead of " + ID);
+ delete t;
+ }
+ ID=(UnicodeString)Transliterator::getAvailableID(i);
+ if(ID != (UnicodeString)Transliterator::getAvailableID(0)){
+ errln("FAIL: calling getAvailableID(index > coundAvailableIDs) should make index=0\n");
+ }
+
+ Transliterator* t1=Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ Transliterator* t2=Transliterator::createInstance("Latin-Greek", UTRANS_FORWARD, parseError, status);
+ if(t1 ==0 || t2 == 0){
+ errln("FAIL: construction");
+ return;
+ }
+ Transliterator* t3=t1->clone();
+ Transliterator* t4=t2->clone();
+
+ if(t1->getID() != t3->getID() || t2->getID() != t4->getID() ||
+ t1->getID() == t4->getID() || t2->getID() == t3->getID() ||
+ t1->getID()== t4->getID() )
+ errln("FAIL: getID or clone failed");
+
+
+ Transliterator* t5=Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ if(t5 == 0)
+ errln("FAIL: construction");
+ else if(t1->getID() != t5->getID() || t5->getID() != t3->getID() || t1->getID() != t3->getID())
+ errln("FAIL: getID or clone failed");
+
+
+ delete t1;
+ delete t2;
+ delete t3;
+ delete t4;
+ delete t5;
+}
+
+void TransliteratorAPITest::TestgetInverse() {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator* t1 = Transliterator::createInstance("Katakana-Latin", UTRANS_FORWARD, parseError, status);
+ Transliterator* invt1 = Transliterator::createInstance("Latin-Katakana", UTRANS_FORWARD, parseError, status);
+ Transliterator* t2 = Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ Transliterator* invt2 = Transliterator::createInstance("Devanagari-Latin", UTRANS_FORWARD, parseError, status);
+ if(t1 == 0 || invt1 == 0 || t2 == 0 || invt2 == 0) {
+ errln("FAIL: in instantiation");
+ return;
+ }
+
+ Transliterator* inverse1=t1->createInverse(status);
+ Transliterator* inverse2=t2->createInverse(status);
+ if(inverse1->getID() != invt1->getID() || inverse2->getID() != invt2->getID()
+ || inverse1->getID() == invt2->getID() || inverse2->getID() == invt1->getID() )
+ errln("FAIL: getInverse() ");
+
+ UnicodeString TransID[]={
+ "Halfwidth-Fullwidth",
+ "Fullwidth-Halfwidth",
+ "Greek-Latin" ,
+ "Latin-Greek",
+ //"Arabic-Latin", // removed in 2.0
+ //"Latin-Arabic",
+ "Katakana-Latin",
+ "Latin-Katakana",
+ //"Hebrew-Latin", // removed in 2.0
+ //"Latin-Hebrew",
+ "Cyrillic-Latin",
+ "Latin-Cyrillic",
+ "Devanagari-Latin",
+ "Latin-Devanagari",
+ "Any-Hex",
+ "Hex-Any"
+ };
+ for(uint32_t i=0; i<sizeof(TransID)/sizeof(TransID[0]); i=i+2){
+ Transliterator *trans1=Transliterator::createInstance(TransID[i], UTRANS_FORWARD, parseError, status);
+ if(t1 == 0){
+ errln("FAIL: in instantiation for" + TransID[i]);
+ continue;
+ }
+ Transliterator *inver1=trans1->createInverse(status);
+ if(inver1->getID() != TransID[i+1] )
+ errln("FAIL :getInverse() for " + TransID[i] + " returned " + inver1->getID() + " instead of " + TransID[i+1]);
+ delete inver1;
+ delete trans1;
+ }
+ delete t1;
+ delete t2;
+ delete invt1;
+ delete invt2;
+ delete inverse1;
+ delete inverse2;
+
+}
+
+void TransliteratorAPITest::TestClone(){
+ Transliterator *t1, *t2, *t3, *t4;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ t1=Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ t2=Transliterator::createInstance("Latin-Greek", UTRANS_FORWARD, parseError, status);
+ if(t1 == 0 || t2 == 0){
+ errln("FAIL: construction");
+ return;
+ }
+ t3=t1->clone();
+ t4=t2->clone();
+
+ if(t1->getID() != t3->getID() || t2->getID() != t4->getID() )
+ errln("FAIL: clone or getID failed");
+ if(t1->getID()==t4->getID() || t2->getID()==t3->getID() || t1->getID()==t4->getID())
+ errln("FAIL: clone or getID failed");
+
+ delete t1;
+ delete t2;
+ delete t3;
+ delete t4;
+
+}
+
+void TransliteratorAPITest::TestGetDisplayName() {
+ UnicodeString dispNames[]= {
+ //ID, displayName
+ //"CurlyQuotes-StraightQuotes" ,"CurlyQuotes to StraightQuotes",
+ "Any-Hex" ,"Any to Hex Escape",
+ "Halfwidth-Fullwidth" ,"Halfwidth to Fullwidth" ,
+ //"Latin-Arabic" ,"Latin to Arabic" ,
+ "Latin-Devanagari" ,"Latin to Devanagari" ,
+ "Greek-Latin" ,"Greek to Latin" ,
+ //"Arabic-Latin" ,"Arabic to Latin" ,
+ "Hex-Any" ,"Hex Escape to Any",
+ "Cyrillic-Latin" ,"Cyrillic to Latin" ,
+ "Latin-Greek" ,"Latin to Greek" ,
+ "Latin-Katakana" ,"Latin to Katakana" ,
+ //"Latin-Hebrew" ,"Latin to Hebrew" ,
+ "Katakana-Latin" ,"Katakana to Latin"
+ };
+ UnicodeString name="";
+ Transliterator* t;
+ UnicodeString message;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+
+#if UCONFIG_NO_FORMATTING
+ logln("Skipping, UCONFIG_NO_FORMATTING is set\n");
+ return;
+#else
+
+ for (uint32_t i=0; i<sizeof(dispNames)/sizeof(dispNames[0]); i=i+2 ) {
+ t = Transliterator::createInstance(dispNames[i+0], UTRANS_FORWARD, parseError, status);
+ if(t==0){
+ errln("FAIL: construction: " + dispNames[i+0]);
+ status = U_ZERO_ERROR;
+ continue;
+ }
+ t->getDisplayName(t->getID(), name);
+ message="Display name for ID:" + t->getID();
+ // doTest(message, name, dispNames[i+1]); //!!! This will obviously fail for any locale other than english and its children!!!
+ name="";
+ t->getDisplayName(t->getID(), Locale::getUS(), name);
+ message.remove();
+ message.append("Display name for on english locale ID:");
+ message.append(t->getID());
+ // message="Display name for on english locale ID:" + t->getID();
+ doTest(message, name, dispNames[i+1]);
+ name="";
+
+ delete t;
+ }
+#endif
+
+}
+
+void TransliteratorAPITest::TestTransliterate1(){
+
+ UnicodeString Data[]={
+ //ID, input string, transliterated string
+ "Any-Hex", "hello", UnicodeString("\\u0068\\u0065\\u006C\\u006C\\u006F", "") ,
+ "Hex-Any", UnicodeString("\\u0068\\u0065\\u006C\\u006C\\u006F", ""), "hello" ,
+ "Latin-Devanagari",CharsToUnicodeString("bha\\u0304rata"), CharsToUnicodeString("\\u092D\\u093E\\u0930\\u0924") ,
+ "Latin-Devanagari",UnicodeString("kra ksha khra gra cra dya dhya",""), CharsToUnicodeString("\\u0915\\u094D\\u0930 \\u0915\\u094D\\u0936 \\u0916\\u094D\\u0930 \\u0917\\u094D\\u0930 \\u091a\\u094D\\u0930 \\u0926\\u094D\\u092F \\u0927\\u094D\\u092F") ,
+
+ "Devanagari-Latin", CharsToUnicodeString("\\u092D\\u093E\\u0930\\u0924"), UnicodeString("bh\\u0101rata"),
+ // "Contracted-Expanded", CharsToUnicodeString("\\u00C0\\u00C1\\u0042"), CharsToUnicodeString("\\u0041\\u0300\\u0041\\u0301\\u0042") ,
+ // "Expanded-Contracted", CharsToUnicodeString("\\u0041\\u0300\\u0041\\u0301\\u0042"), CharsToUnicodeString("\\u00C0\\u00C1\\u0042") ,
+ //"Latin-Arabic", "aap", CharsToUnicodeString("\\u0627\\u06A4") ,
+ //"Arabic-Latin", CharsToUnicodeString("\\u0627\\u06A4"), "aap"
+ };
+
+ UnicodeString gotResult;
+ UnicodeString temp;
+ UnicodeString message;
+ Transliterator* t;
+ logln("Testing transliterate");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+
+ for(uint32_t i=0;i<sizeof(Data)/sizeof(Data[0]); i=i+3){
+ t=Transliterator::createInstance(Data[i+0], UTRANS_FORWARD, parseError, status);
+ if(t==0){
+ errln("FAIL: construction: " + Data[i+0] + " Error: " + u_errorName(status));
+ errln("PreContext: " + prettify(parseError.preContext) + " PostContext: " + prettify( parseError.postContext) );
+ status = U_ZERO_ERROR;
+ continue;
+ }
+ gotResult = Data[i+1];
+ t->transliterate(gotResult);
+ message=t->getID() + "->transliterate(UnicodeString, UnicodeString) for\n\t Source:" + prettify(Data[i+1]);
+ doTest(message, gotResult, Data[i+2]);
+
+ //doubt here
+ temp=Data[i+1];
+ t->transliterate(temp);
+ message.remove();
+ message.append(t->getID());
+ message.append("->transliterate(Replaceable) for \n\tSource:");
+ message.append(Data[i][1]);
+ doTest(message, temp, Data[i+2]);
+
+ callEverything(t, __LINE__);
+ delete t;
+ }
+}
+
+void TransliteratorAPITest::TestTransliterate2(){
+ //testing tranliterate(String text, int start, int limit, StringBuffer result)
+ UnicodeString Data2[]={
+ //ID, input string, start, limit, transliterated string
+ "Any-Hex", "hello! How are you?", "0", "5", UnicodeString("\\u0068\\u0065\\u006C\\u006C\\u006F", ""), UnicodeString("\\u0068\\u0065\\u006C\\u006C\\u006F! How are you?", "") ,
+ "Any-Hex", "hello! How are you?", "7", "12", UnicodeString("\\u0048\\u006F\\u0077\\u0020\\u0061", ""), UnicodeString("hello! \\u0048\\u006F\\u0077\\u0020\\u0061re you?", ""),
+ "Hex-Any", CharsToUnicodeString("\\u0068\\u0065\\u006C\\u006C\\u006F\\u0021\\u0020"), "0", "5", "hello", "hello! " ,
+ // "Contracted-Expanded", CharsToUnicodeString("\\u00C0\\u00C1\\u0042"), "1", "2", CharsToUnicodeString("\\u0041\\u0301"), CharsToUnicodeString("\\u00C0\\u0041\\u0301\\u0042") ,
+ "Devanagari-Latin", CharsToUnicodeString("\\u092D\\u093E\\u0930\\u0924"), "0", "1", "bha", CharsToUnicodeString("bha\\u093E\\u0930\\u0924") ,
+ "Devanagari-Latin", CharsToUnicodeString("\\u092D\\u093E\\u0930\\u0924"), "1", "2", "\\u0314\\u0101", CharsToUnicodeString("\\u092D\\u0314\\u0101\\u0930\\u0924")
+
+ };
+ logln("\n Testing transliterate(String, int, int, StringBuffer)");
+ Transliterator* t;
+ UnicodeString gotResBuf;
+ UnicodeString temp;
+ int32_t start, limit;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+
+ for(uint32_t i=0; i<sizeof(Data2)/sizeof(Data2[0]); i=i+6){
+ t=Transliterator::createInstance(Data2[i+0], UTRANS_FORWARD, parseError, status);
+ if(t==0){
+ errln("FAIL: construction: " + prettify(Data2[i+0]));
+ continue;
+ }
+ start=getInt(Data2[i+2]);
+ limit=getInt(Data2[i+3]);
+ Data2[i+1].extractBetween(start, limit, gotResBuf);
+ t->transliterate(gotResBuf);
+ // errln("FAIL: calling transliterate on " + t->getID());
+ doTest(t->getID() + ".transliterate(UnicodeString, int32_t, int32_t, UnicodeString):(" + start + "," + limit + ") for \n\t source: " + prettify(Data2[i+1]), gotResBuf, Data2[i+4]);
+
+ temp=Data2[i+1];
+ t->transliterate(temp, start, limit);
+ doTest(t->getID() + ".transliterate(Replaceable, int32_t, int32_t, ):(" + start + "," + limit + ") for \n\t source: " + prettify(Data2[i+1]), temp, Data2[i+5]);
+ status = U_ZERO_ERROR;
+ callEverything(t, __LINE__);
+ delete t;
+ t = NULL;
+ }
+
+ status = U_ZERO_ERROR;
+ logln("\n Try calling transliterate with illegal start and limit values");
+ t=Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("Error creating transliterator %s", u_errorName(status));
+ delete t;
+ return;
+ }
+ gotResBuf = temp = "try start greater than limit";
+ t->transliterate(gotResBuf, 10, 5);
+ if(gotResBuf == temp) {
+ logln("OK: start greater than limit value handled correctly");
+ } else {
+ errln("FAIL: start greater than limit value returned" + gotResBuf);
+ }
+
+ callEverything(t, __LINE__);
+ delete t;
+
+}
+void TransliteratorAPITest::TestTransliterate3(){
+ UnicodeString rs="This is the replaceable String";
+ UnicodeString Data[] = {
+ "0", "0", "This is the replaceable String",
+ "2", "3", UnicodeString("Th\\u0069s is the replaceable String", ""),
+ "21", "23", UnicodeString("Th\\u0069s is the repl\\u0061\\u0063eable String", ""),
+ "14", "17", UnicodeString("Th\\u0069s is t\\u0068\\u0065\\u0020repl\\u0061\\u0063eable String", ""),
+ };
+ int start, limit;
+ UnicodeString message;
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t=Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("Error creating transliterator %s", u_errorName(status));
+ delete t;
+ return;
+ }
+
+ if(t == 0)
+ errln("FAIL : construction");
+ for(uint32_t i=0; i<sizeof(Data)/sizeof(Data[0]); i=i+3){
+ start=getInt(Data[i+0]);
+ limit=getInt(Data[i+1]);
+ t->transliterate(rs, start, limit);
+ message=t->getID() + ".transliterate(ReplaceableString, start, limit):("+start+","+limit+"):";
+ doTest(message, rs, Data[i+2]);
+ }
+ delete t;
+}
+
+void TransliteratorAPITest::TestSimpleKeyboardTransliterator(){
+ logln("simple call to transliterate");
+ UErrorCode status=U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator* t=Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if(t == 0) {
+ UnicodeString context;
+
+ if (parseError.preContext[0]) {
+ context += (UnicodeString)" at " + parseError.preContext;
+ }
+ if (parseError.postContext[0]) {
+ context += (UnicodeString)" | " + parseError.postContext;
+ }
+ errln((UnicodeString)"FAIL: can't create Any-Hex, " +
+ (UnicodeString)u_errorName(status) + context);
+ return;
+ }
+ UTransPosition index={19,20,20,20};
+ UnicodeString rs= "Transliterate this-''";
+ UnicodeString insertion="abc";
+ UnicodeString expected=UnicodeString("Transliterate this-'\\u0061\\u0062\\u0063'", "");
+ t->transliterate(rs, index, insertion, status);
+ if(U_FAILURE(status))
+ errln("FAIL: " + t->getID()+ ".translitere(Replaceable, int[], UnicodeString, UErrorCode)-->" + (UnicodeString)u_errorName(status));
+ t->finishTransliteration(rs, index);
+ UnicodeString message="transliterate";
+ doTest(message, rs, expected);
+
+ logln("try calling transliterate with invalid index values");
+ UTransPosition index1[]={
+ //START, LIMIT, CURSOR
+ {10, 10, 12, 10}, //invalid since CURSOR>LIMIT valid:-START <= CURSOR <= LIMIT
+ {17, 16, 17, 17}, //invalid since START>LIMIT valid:-0<=START<=LIMIT
+ {-1, 16, 14, 16}, //invalid since START<0
+ {3, 50, 2, 50} //invalid since LIMIT>text.length()
+ };
+ for(uint32_t i=0; i<sizeof(index1)/sizeof(index1[0]); i++){
+ status=U_ZERO_ERROR;
+ t->transliterate(rs, index1[i], insertion, status);
+ if(status == U_ILLEGAL_ARGUMENT_ERROR)
+ logln("OK: invalid index values handled correctly");
+ else
+ errln("FAIL: invalid index values didn't throw U_ILLEGAL_ARGUMENT_ERROR throw" + (UnicodeString)u_errorName(status));
+ }
+
+ delete t;
+}
+void TransliteratorAPITest::TestKeyboardTransliterator1(){
+ UnicodeString Data[]={
+ //insertion, buffer
+ "a", UnicodeString("\\u0061", "") ,
+ "bbb", UnicodeString("\\u0061\\u0062\\u0062\\u0062", "") ,
+ "ca", UnicodeString("\\u0061\\u0062\\u0062\\u0062\\u0063\\u0061", "") ,
+ " ", UnicodeString("\\u0061\\u0062\\u0062\\u0062\\u0063\\u0061\\u0020", "") ,
+ "", UnicodeString("\\u0061\\u0062\\u0062\\u0062\\u0063\\u0061\\u0020", "") ,
+
+ "a", UnicodeString("\\u0061", "") ,
+ "b", UnicodeString("\\u0061\\u0062", "") ,
+ "z", UnicodeString("\\u0061\\u0062\\u007A", "") ,
+ "", UnicodeString("\\u0061\\u0062\\u007A", "")
+
+ };
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* t=Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("Error creating transliterator %s", u_errorName(status));
+ delete t;
+ return;
+ }
+ //keyboardAux(t, Data);
+ UTransPosition index={0, 0, 0, 0};
+ UnicodeString s;
+ uint32_t i;
+ logln("Testing transliterate(Replaceable, int32_t, UnicodeString, UErrorCode)");
+ for (i=0; i<10; i=i+2) {
+ UnicodeString log;
+ if (Data[i+0] != "") {
+ log = s + " + " + Data[i+0] + " -> ";
+ t->transliterate(s, index, Data[i+0], status);
+ if(U_FAILURE(status)){
+ errln("FAIL: " + t->getID()+ ".transliterate(Replaceable, int32_t[], UnicodeString, UErrorCode)-->" + (UnicodeString)u_errorName(status));
+ continue;
+ }
+ }else {
+ log = s + " => ";
+ t->finishTransliteration(s, index);
+ }
+ // Show the start index '{' and the cursor '|'
+ displayOutput(s, Data[i+1], log, index);
+
+ }
+
+ s="";
+ status=U_ZERO_ERROR;
+ index.contextStart = index.contextLimit = index.start = index.limit = 0;
+ logln("Testing transliterate(Replaceable, int32_t, UChar, UErrorCode)");
+ for(i=10; i<sizeof(Data)/sizeof(Data[0]); i=i+2){
+ UnicodeString log;
+ if (Data[i+0] != "") {
+ log = s + " + " + Data[i+0] + " -> ";
+ UChar c=Data[i+0].charAt(0);
+ t->transliterate(s, index, c, status);
+ if(U_FAILURE(status))
+ errln("FAIL: " + t->getID()+ ".transliterate(Replaceable, int32_t[], UChar, UErrorCode)-->" + (UnicodeString)u_errorName(status));
+ continue;
+ }else {
+ log = s + " => ";
+ t->finishTransliteration(s, index);
+ }
+ // Show the start index '{' and the cursor '|'
+ displayOutput(s, Data[i+1], log, index);
+ }
+
+ delete t;
+}
+
+void TransliteratorAPITest::TestKeyboardTransliterator2(){
+ UnicodeString Data[]={
+ //insertion, buffer, index[START], index[LIMIT], index[CURSOR]
+ //data for Any-Hex
+ "abc", UnicodeString("Initial String: add-\\u0061\\u0062\\u0063-", ""), "19", "20", "20",
+ "a", UnicodeString("In\\u0069\\u0061tial String: add-\\u0061\\u0062\\u0063-", ""), "2", "3", "2" ,
+ "b", UnicodeString("\\u0062In\\u0069\\u0061tial String: add-\\u0061\\u0062\\u0063-", ""), "0", "0", "0" ,
+ "", UnicodeString("\\u0062In\\u0069\\u0061tial String: add-\\u0061\\u0062\\u0063-", ""), "0", "0", "0" ,
+ //data for Latin-Devanagiri
+ CharsToUnicodeString("a\\u0304"), CharsToUnicodeString("Hindi -\\u0906-"), "6", "7", "6",
+ CharsToUnicodeString("ma\\u0304"), CharsToUnicodeString("Hindi -\\u0906\\u092E\\u093E-"), "7", "8", "7",
+ CharsToUnicodeString("ra\\u0304"), CharsToUnicodeString("Hi\\u0930\\u093Endi -\\u0906\\u092E\\u093E-"),"1", "2", "2",
+ CharsToUnicodeString(""), CharsToUnicodeString("Hi\\u0930\\u093Endi -\\u0906\\u092E\\u093E-"),"1", "2", "2"
+ //data for contracted-Expanded
+ // CharsToUnicodeString("\\u00C1"), CharsToUnicodeString("Ad\\u0041\\u0301d here:"), "1", "2", "1" ,
+ // CharsToUnicodeString("\\u00C0"), CharsToUnicodeString("Ad\\u0041\\u0301d here:\\u0041\\u0300"), "11", "11", "11",
+ // "", CharsToUnicodeString("Ad\\u0041\\u0301d here:\\u0041\\u0300"), "11", "11", "11",
+ };
+ Transliterator *t;
+ UnicodeString rs;
+ UnicodeString dataStr;
+ logln("Testing transliterate(Replaceable, int32_t, UnicodeString, UErrorCode)");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ rs="Initial String: add--";
+ t=Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if(t == 0)
+ errln("FAIL : construction");
+ else {
+ keyboardAux(t, Data, rs, 0, 20);
+ delete t;
+ }
+
+ rs="Hindi --";
+ t=Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ if(t == 0)
+ errln("FAIL : construction");
+ else
+ keyboardAux(t, Data, rs, 20, 40);
+
+
+ // rs="Add here:";
+ // t=Transliterator::createInstance("Contracted-Expanded");
+ // keyboardAux(t, Data, rs, 35, 55);
+
+
+ delete t;
+}
+
+void TransliteratorAPITest::TestKeyboardTransliterator3(){
+ UnicodeString s="This is the main string";
+ UnicodeString Data[] = {
+ "0", "0", "0", "This is the main string",
+ "1", "3", "2", UnicodeString("Th\\u0069s is the main string", ""),
+ "20", "21", "20", UnicodeString("Th\\u0069s is the mai\\u006E string", "")
+ };
+
+ UErrorCode status=U_ZERO_ERROR;
+ UParseError parseError;
+ UTransPosition index={0, 0, 0, 0};
+ logln("Testing transliterate(Replaceable, int32_t, UErrorCode)");
+ Transliterator *t=Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if(t == 0 || U_FAILURE(status)) {
+ errln("Error creating transliterator %s", u_errorName(status));
+ delete t;
+ return;
+ }
+ for(uint32_t i=0; i<sizeof(Data)/sizeof(Data[0]); i=i+4){
+ UnicodeString log;
+ index.contextStart=getInt(Data[i+0]);
+ index.contextLimit=index.limit=getInt(Data[i+1]);
+ index.start=getInt(Data[i+2]);
+ t->transliterate(s, index, status);
+ if(U_FAILURE(status)){
+ errln("FAIL: " + t->getID()+ ".transliterate(Replaceable, int32_t[], UErrorCode)-->" + (UnicodeString)u_errorName(status));
+ continue;
+ }
+ t->finishTransliteration(s, index);
+ log = s + " => ";
+ // Show the start index '{' and the cursor '|'
+ displayOutput(s, Data[i+3], log, index);
+ }
+
+ delete t;
+}
+void TransliteratorAPITest::TestNullTransliterator(){
+ UErrorCode status=U_ZERO_ERROR;
+ UnicodeString s("Transliterate using null transliterator");
+ Transliterator *nullTrans=Transliterator::createInstance("Any-Null", UTRANS_FORWARD, status);
+ int32_t transLimit;
+ int32_t start=0;
+ int32_t limit=s.length();
+ UnicodeString replaceable=s;
+ transLimit=nullTrans->transliterate(replaceable, start, limit);
+ if(transLimit != limit){
+ errln("ERROR: NullTransliterator->transliterate() failed");
+ }
+ doTest((UnicodeString)"nulTrans->transliterate", replaceable, s);
+ replaceable.remove();
+ replaceable.append(s);
+ UTransPosition index;
+ index.contextStart =start;
+ index.contextLimit = limit;
+ index.start = 0;
+ index.limit = limit;
+ nullTrans->finishTransliteration(replaceable, index);
+ if(index.start != limit){
+ errln("ERROR: NullTransliterator->handleTransliterate() failed");
+ }
+ doTest((UnicodeString)"NullTransliterator->handleTransliterate", replaceable, s);
+ callEverything(nullTrans, __LINE__);
+ delete nullTrans;
+
+
+}
+void TransliteratorAPITest::TestRegisterUnregister(){
+
+ UErrorCode status=U_ZERO_ERROR;
+ /* Make sure it doesn't exist */
+ if (Transliterator::createInstance("TestA-TestB", UTRANS_FORWARD, status) != NULL) {
+ errln("FAIL: TestA-TestB already registered\n");
+ return;
+ }
+ /* Check inverse too
+ if (Transliterator::createInstance("TestA-TestB",
+ (UTransDirection)UTRANS_REVERSE) != NULL) {
+ errln("FAIL: TestA-TestB inverse already registered\n");
+ return;
+ }
+ */
+ status =U_ZERO_ERROR;
+
+ /* Create it */
+ UParseError parseError;
+ Transliterator *t = Transliterator::createFromRules("TestA-TestB",
+ "a<>b",
+ UTRANS_FORWARD, parseError,
+ status);
+ /* Register it */
+ Transliterator::registerInstance(t);
+
+ /* Now check again -- should exist now*/
+ Transliterator *s = Transliterator::createInstance("TestA-TestB", UTRANS_FORWARD, status);
+ if (s == NULL) {
+ errln("FAIL: TestA-TestB not registered\n");
+ return;
+ }
+ callEverything(s, __LINE__);
+ callEverything(t, __LINE__);
+ delete s;
+
+ /* Check inverse too
+ s = Transliterator::createInstance("TestA-TestB",
+ (UTransDirection)UTRANS_REVERSE);
+ if (s == NULL) {
+ errln("FAIL: TestA-TestB inverse not registered\n");
+ return;
+ }
+ delete s;
+ */
+
+ /*unregister the instance*/
+ Transliterator::unregister("TestA-TestB");
+ /* now Make sure it doesn't exist */
+ if (Transliterator::createInstance("TestA-TestB", UTRANS_FORWARD, status) != NULL) {
+ errln("FAIL: TestA-TestB isn't unregistered\n");
+ return;
+ }
+
+}
+
+
+int gTestFilter1ClassID = 0;
+int gTestFilter2ClassID = 0;
+int gTestFilter3ClassID = 0;
+
+/**
+ * Used by TestFiltering().
+ */
+class TestFilter1 : public UnicodeFilter {
+ UClassID getDynamicClassID()const { return &gTestFilter1ClassID; }
+ virtual UnicodeFunctor* clone() const {
+ return new TestFilter1(*this);
+ }
+ virtual UBool contains(UChar32 c) const {
+ if(c==0x63 || c==0x61 || c==0x43 || c==0x41)
+ return FALSE;
+ else
+ return TRUE;
+ }
+ // Stubs
+ virtual UnicodeString& toPattern(UnicodeString& result,
+ UBool /*escapeUnprintable*/) const {
+ return result;
+ }
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ return FALSE;
+ }
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+};
+class TestFilter2 : public UnicodeFilter {
+ UClassID getDynamicClassID()const { return &gTestFilter2ClassID; }
+ virtual UnicodeFunctor* clone() const {
+ return new TestFilter2(*this);
+ }
+ virtual UBool contains(UChar32 c) const {
+ if(c==0x65 || c==0x6c)
+ return FALSE;
+ else
+ return TRUE;
+ }
+ // Stubs
+ virtual UnicodeString& toPattern(UnicodeString& result,
+ UBool /*escapeUnprintable*/) const {
+ return result;
+ }
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ return FALSE;
+ }
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+};
+class TestFilter3 : public UnicodeFilter {
+ UClassID getDynamicClassID()const { return &gTestFilter3ClassID; }
+ virtual UnicodeFunctor* clone() const {
+ return new TestFilter3(*this);
+ }
+ virtual UBool contains(UChar32 c) const {
+ if(c==0x6f || c==0x77)
+ return FALSE;
+ else
+ return TRUE;
+ }
+ // Stubs
+ virtual UnicodeString& toPattern(UnicodeString& result,
+ UBool /*escapeUnprintable*/) const {
+ return result;
+ }
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ return FALSE;
+ }
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+};
+
+
+void TransliteratorAPITest::TestGetAdoptFilter(){
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator *t=Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if(t == 0 || U_FAILURE(status)) {
+ errln("Error creating transliterator %s", u_errorName(status));
+ delete t;
+ return;
+ }
+ const UnicodeFilter *u=t->getFilter();
+ if(u != NULL){
+ errln("FAIL: getFilter failed. Didn't return null when the transliterator used no filtering");
+ delete t;
+ return;
+ }
+
+ UnicodeString got, temp, message;
+ UnicodeString data="ABCabcbbCBa";
+ temp = data;
+ t->transliterate(temp);
+ t->adoptFilter(new TestFilter1);
+
+ got = data;
+ t->transliterate(got);
+ UnicodeString exp=UnicodeString("A\\u0042Ca\\u0062c\\u0062\\u0062C\\u0042a", "");
+ message="transliteration after adoptFilter(a,A,c,C) ";
+ doTest(message, got, exp);
+
+ logln("Testing round trip");
+ t->adoptFilter((UnicodeFilter*)u);
+ if(t->getFilter() == NULL)
+ logln("OK: adoptFilter and getFilter round trip worked");
+ else
+ errln("FAIL: adoptFilter or getFilter round trip failed");
+
+ got = data;
+ t->transliterate(got);
+ exp=UnicodeString("\\u0041\\u0042\\u0043\\u0061\\u0062\\u0063\\u0062\\u0062\\u0043\\u0042\\u0061", "");
+ message="transliteration after adopting null filter";
+ doTest(message, got, exp);
+ message="adoptFilter round trip";
+ doTest("adoptFilter round trip", got, temp);
+
+ t->adoptFilter(new TestFilter2);
+ callEverything(t, __LINE__);
+ data="heelloe";
+ exp=UnicodeString("\\u0068eell\\u006Fe", "");
+ got = data;
+ t->transliterate(got);
+ message="transliteration using (e,l) filter";
+ doTest("transliteration using (e,l) filter", got, exp);
+
+ data="are well";
+ exp=UnicodeString("\\u0061\\u0072e\\u0020\\u0077ell", "");
+ got = data;
+ t->transliterate(got);
+ doTest(message, got, exp);
+
+ t->adoptFilter(new TestFilter3);
+ data="ho, wow!";
+ exp=UnicodeString("\\u0068o\\u002C\\u0020wow\\u0021", "");
+ got = data;
+ t->transliterate(got);
+ message="transliteration using (o,w) filter";
+ doTest("transliteration using (o,w) filter", got, exp);
+
+ data="owl";
+ exp=UnicodeString("ow\\u006C", "");
+ got = data;
+ t->transliterate(got);
+ doTest("transliteration using (o,w) filter", got, exp);
+
+ delete t;
+
+}
+
+
+
+void TransliteratorAPITest::keyboardAux(Transliterator *t, UnicodeString DATA[], UnicodeString& s, int32_t begin, int32_t end) {
+ UTransPosition index={0, 0, 0, 0};
+ UErrorCode status=U_ZERO_ERROR;
+ for (int32_t i=begin; i<end; i=i+5) {
+ UnicodeString log;
+ if (DATA[i+0] != "") {
+ log = s + " + " + DATA[i] + " -> ";
+ index.contextStart=getInt(DATA[i+2]);
+ index.contextLimit=index.limit=getInt(DATA[i+3]);
+ index.start=getInt(DATA[i+4]);
+ t->transliterate(s, index, DATA[i+0], status);
+ if(U_FAILURE(status)){
+ errln("FAIL: " + t->getID()+ ".transliterate(Replaceable, int32_t[], UnicodeString, UErrorCode)-->" + (UnicodeString)u_errorName(status));
+ continue;
+ }
+ log = s + " => ";
+ t->finishTransliteration(s, index);
+ }
+ // Show the start index '{' and the cursor '|'
+ displayOutput(s, DATA[i+1], log, index);
+
+ }
+}
+
+void TransliteratorAPITest::displayOutput(const UnicodeString& got, const UnicodeString& expected, UnicodeString& log, UTransPosition& index){
+ // Show the start index '{' and the cursor '|'
+ UnicodeString a, b, c, d, e;
+ got.extractBetween(0, index.contextStart, a);
+ got.extractBetween(index.contextStart, index.start, b);
+ got.extractBetween(index.start, index.limit, c);
+ got.extractBetween(index.limit, index.contextLimit, d);
+ got.extractBetween(index.contextLimit, got.length(), e);
+ log.append(a).
+ append((UChar)0x7b/*{*/).
+ append(b).
+ append((UChar)0x7c/*|*/).
+ append(c).
+ append((UChar)0x7c).
+ append(d).
+ append((UChar)0x7d/*}*/).
+ append(e);
+ if (got == expected)
+ logln("OK:" + prettify(log));
+ else
+ errln("FAIL: " + prettify(log) + ", expected " + prettify(expected));
+}
+
+
+/*Internal Functions used*/
+void TransliteratorAPITest::doTest(const UnicodeString& message, const UnicodeString& result, const UnicodeString& expected){
+ if (prettify(result) == prettify(expected))
+ logln((UnicodeString)"Ok: " + prettify(message) + " passed \"" + prettify(expected) + "\"");
+ else
+ errln((UnicodeString)"FAIL:" + message + " failed Got-->" + prettify(result)+ ", Expected--> " + prettify(expected) );
+}
+
+
+//
+// callEverything call all of the const (non-destructive) methods on a
+// transliterator, just to verify that they don't fail in some
+// destructive way.
+//
+#define CEASSERT(a) {if (!(a)) { \
+errln("FAIL at line %d from line %d: %s", __LINE__, line, #a); return; }}
+
+void TransliteratorAPITest::callEverything(const Transliterator *tr, int line) {
+ Transliterator *clonedTR = tr->clone();
+ CEASSERT(clonedTR != NULL);
+
+ int32_t maxcl = tr->getMaximumContextLength();
+ CEASSERT(clonedTR->getMaximumContextLength() == maxcl);
+
+ UnicodeString id;
+ UnicodeString clonedId;
+ id = tr->getID();
+ clonedId = clonedTR->getID();
+ CEASSERT(id == clonedId);
+
+ const UnicodeFilter *filter = tr->getFilter();
+ const UnicodeFilter *clonedFilter = clonedTR->getFilter();
+ if (filter == NULL || clonedFilter == NULL) {
+ // If one filter is NULL they better both be NULL.
+ CEASSERT(filter == clonedFilter);
+ } else {
+ CEASSERT(filter != clonedFilter);
+ }
+
+ UnicodeString rules;
+ UnicodeString clonedRules;
+ rules = tr->toRules(rules, FALSE);
+ clonedRules = clonedTR->toRules(clonedRules, FALSE);
+ CEASSERT(rules == clonedRules);
+
+ UnicodeSet sourceSet;
+ UnicodeSet clonedSourceSet;
+ tr->getSourceSet(sourceSet);
+ clonedTR->getSourceSet(clonedSourceSet);
+ CEASSERT(clonedSourceSet == sourceSet);
+
+ UnicodeSet targetSet;
+ UnicodeSet clonedTargetSet;
+ tr->getTargetSet(targetSet);
+ clonedTR->getTargetSet(clonedTargetSet);
+ CEASSERT(targetSet == clonedTargetSet);
+
+ UClassID classID = tr->getDynamicClassID();
+ CEASSERT(classID == clonedTR->getDynamicClassID());
+ CEASSERT(classID != 0);
+
+ delete clonedTR;
+}
+
+static const int MyUnicodeFunctorTestClassID = 0;
+class MyUnicodeFunctorTestClass : public UnicodeFunctor {
+public:
+ virtual UnicodeFunctor* clone() const {return NULL;}
+ static UClassID getStaticClassID(void) {return (UClassID)&MyUnicodeFunctorTestClassID;}
+ virtual UClassID getDynamicClassID(void) const {return getStaticClassID();};
+ virtual void setData(const TransliterationRuleData*) {}
+};
+
+void TransliteratorAPITest::TestUnicodeFunctor() {
+ MyUnicodeFunctorTestClass myClass;
+ if (myClass.toMatcher() != NULL) {
+ errln("FAIL: UnicodeFunctor::toMatcher did not return NULL");
+ }
+ if (myClass.toReplacer() != NULL) {
+ errln("FAIL: UnicodeFunctor::toReplacer did not return NULL");
+ }
+}
+
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/transapi.h b/Build/source/libs/icu/icu-xetex/test/intltest/transapi.h
new file mode 100644
index 00000000000..5dca65efc80
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/transapi.h
@@ -0,0 +1,78 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* Date Name Description
+* 1/03/2000 Madhu Creation.
+************************************************************************/
+
+#ifndef TRANSAPI_H
+#define TRANSAPI_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "intltest.h"
+
+/**
+ * @test
+ * @summary General test of Transliterator
+ */
+class TransliteratorAPITest : public IntlTest {
+public:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+
+ /*Tests the function getDisplayName() */
+ void TestGetDisplayName(void);
+
+ void TestgetID(void);
+
+ void TestgetInverse(void);
+
+ void TestClone(void);
+
+ void TestTransliterate1(void);
+
+ void TestTransliterate2(void);
+
+ void TestTransliterate3(void);
+
+ void TestSimpleKeyboardTransliterator(void);
+
+ void TestKeyboardTransliterator1(void);
+
+ void TestKeyboardTransliterator2(void);
+
+ void TestKeyboardTransliterator3(void);
+
+ void TestGetAdoptFilter(void);
+
+ void TestNullTransliterator(void);
+
+ void TestRegisterUnregister(void);
+
+ void TestLatinDevanagari(void);
+
+ void TestDevanagariLatinRT(void);
+
+ void TestUnicodeFunctor(void);
+
+ /*Internal functions used*/
+ void doTest(const UnicodeString& , const UnicodeString& , const UnicodeString& );
+
+ void keyboardAux(Transliterator*, UnicodeString[] , UnicodeString&, int32_t, int32_t);
+
+ void displayOutput(const UnicodeString&, const UnicodeString&, UnicodeString&,
+ UTransPosition&);
+
+ void callEverything(const Transliterator *t, int line);
+
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/transrt.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/transrt.cpp
new file mode 100644
index 00000000000..66afa048c90
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/transrt.cpp
@@ -0,0 +1,1708 @@
+/*
+**********************************************************************
+* Copyright (C) 2000-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 05/23/00 aliu Creation.
+**********************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "rbt.h"
+#include "unicode/calendar.h"
+#include "unicode/uniset.h"
+#include "unicode/uchar.h"
+#include "unicode/normlzr.h"
+#include "unicode/uchar.h"
+#include "unicode/parseerr.h"
+#include "unicode/usetiter.h"
+#include "unicode/putil.h"
+#include "unicode/uversion.h"
+#include "unicode/locid.h"
+#include "unicode/ulocdata.h"
+#include "unicode/utf8.h"
+#include "putilimp.h"
+#include "cmemory.h"
+#include "transrt.h"
+#include "testutil.h"
+#include <string.h>
+#include <stdio.h>
+
+#define CASE(id,test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ UDate t = uprv_getUTCtime(); \
+ test(); \
+ t = uprv_getUTCtime() - t; \
+ logln((UnicodeString)#test " took " + t/U_MILLIS_PER_DAY + " seconds"); \
+ } \
+ break
+
+#define EXHAUSTIVE(id,test) case id: \
+ if(quick==FALSE){ \
+ name = #test; \
+ if (exec){ \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ }else{ \
+ name=""; \
+ } \
+ break
+void
+TransliteratorRoundTripTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ CASE(0, TestCyrillic);
+ // CASE(0,TestKana);
+ CASE(1,TestHiragana);
+ CASE(2,TestKatakana);
+ CASE(3,TestJamo);
+ CASE(4,TestHangul);
+ CASE(5,TestGreek);
+ CASE(6,TestGreekUNGEGN);
+ CASE(7,Testel);
+ CASE(8,TestDevanagariLatin);
+ CASE(9,TestInterIndic);
+ CASE(10, TestHebrew);
+ CASE(11, TestArabic);
+ CASE(12, TestHan);
+ default: name = ""; break;
+ }
+}
+
+//--------------------------------------------------------------------
+// Time bomb - allows temporary behavior that expires at a given
+// release
+//--------------------------------------------------------------------
+static const UVersionInfo ICU_39 = {3,9,0,0};
+
+
+//--------------------------------------------------------------------
+// TransliteratorPointer
+//--------------------------------------------------------------------
+
+/**
+ * A transliterator pointer wrapper that deletes the contained
+ * pointer automatically when the wrapper goes out of scope.
+ * Sometimes called a "janitor" or "smart pointer".
+ */
+class TransliteratorPointer {
+ Transliterator* t;
+ // disallowed:
+ TransliteratorPointer(const TransliteratorPointer& rhs);
+ TransliteratorPointer& operator=(const TransliteratorPointer& rhs);
+public:
+ TransliteratorPointer(Transliterator* adopted) {
+ t = adopted;
+ }
+ ~TransliteratorPointer() {
+ delete t;
+ }
+ inline Transliterator* operator->() { return t; }
+ inline operator const Transliterator*() const { return t; }
+ inline operator Transliterator*() { return t; }
+};
+
+//--------------------------------------------------------------------
+// Legal
+//--------------------------------------------------------------------
+
+class Legal {
+public:
+ Legal() {}
+ virtual ~Legal() {}
+ virtual UBool is(const UnicodeString& /*sourceString*/) const {return TRUE;}
+};
+
+class LegalJamo : public Legal {
+ // any initial must be followed by a medial (or initial)
+ // any medial must follow an initial (or medial)
+ // any final must follow a medial (or final)
+public:
+ LegalJamo() {}
+ virtual ~LegalJamo() {}
+ virtual UBool is(const UnicodeString& sourceString) const;
+ int getType(UChar c) const;
+};
+
+UBool LegalJamo::is(const UnicodeString& sourceString) const {
+ int t;
+ UnicodeString decomp;
+ UErrorCode ec = U_ZERO_ERROR;
+ Normalizer::decompose(sourceString, FALSE, 0, decomp, ec);
+ if (U_FAILURE(ec)) {
+ return FALSE;
+ }
+ for (int i = 0; i < decomp.length(); ++i) { // don't worry about surrogates
+ switch (getType(decomp.charAt(i))) {
+ case 0: t = getType(decomp.charAt(i+1));
+ if (t != 0 && t != 1) { return FALSE; }
+ break;
+ case 1: t = getType(decomp.charAt(i-1));
+ if (t != 0 && t != 1) { return FALSE; }
+ break;
+ case 2: t = getType(decomp.charAt(i-1));
+ if (t != 1 && t != 2) { return FALSE; }
+ break;
+ }
+ }
+ return TRUE;
+}
+
+int LegalJamo::getType(UChar c) const {
+ if (0x1100 <= c && c <= 0x1112)
+ return 0;
+ else if (0x1161 <= c && c <= 0x1175)
+ return 1;
+ else if (0x11A8 <= c && c <= 0x11C2)
+ return 2;
+ return -1; // other
+}
+
+class LegalGreek : public Legal {
+ UBool full;
+public:
+ LegalGreek(UBool _full) { full = _full; }
+ virtual ~LegalGreek() {}
+
+ virtual UBool is(const UnicodeString& sourceString) const;
+
+ static UBool isVowel(UChar c);
+
+ static UBool isRho(UChar c);
+};
+
+UBool LegalGreek::is(const UnicodeString& sourceString) const {
+ UnicodeString decomp;
+ UErrorCode ec = U_ZERO_ERROR;
+ Normalizer::decompose(sourceString, FALSE, 0, decomp, ec);
+
+ // modern is simpler: don't care about anything but a grave
+ if (full == FALSE) {
+ // A special case which is legal but should be
+ // excluded from round trip
+ // if (sourceString == UnicodeString("\\u039C\\u03C0", "")) {
+ // return FALSE;
+ // }
+ for (int32_t i = 0; i < decomp.length(); ++i) {
+ UChar c = decomp.charAt(i);
+ // exclude all the accents
+ if (c == 0x0313 || c == 0x0314 || c == 0x0300 || c == 0x0302
+ || c == 0x0342 || c == 0x0345
+ ) return FALSE;
+ }
+ return TRUE;
+ }
+
+ // Legal greek has breathing marks IFF there is a vowel or RHO at the start
+ // IF it has them, it has exactly one.
+ // IF it starts with a RHO, then the breathing mark must come before the second letter.
+ // Since there are no surrogates in greek, don't worry about them
+ UBool firstIsVowel = FALSE;
+ UBool firstIsRho = FALSE;
+ UBool noLetterYet = TRUE;
+ int32_t breathingCount = 0;
+ int32_t letterCount = 0;
+ for (int32_t i = 0; i < decomp.length(); ++i) {
+ UChar c = decomp.charAt(i);
+ if (u_isalpha(c)) {
+ ++letterCount;
+ if (noLetterYet) {
+ noLetterYet = FALSE;
+ firstIsVowel = isVowel(c);
+ firstIsRho = isRho(c);
+ }
+ if (firstIsRho && letterCount == 2 && breathingCount == 0) {
+ return FALSE;
+ }
+ }
+ if (c == 0x0313 || c == 0x0314) {
+ ++breathingCount;
+ }
+ }
+
+ if (firstIsVowel || firstIsRho) return breathingCount == 1;
+ return breathingCount == 0;
+}
+
+UBool LegalGreek::isVowel(UChar c) {
+ switch (c) {
+ case 0x03B1:
+ case 0x03B5:
+ case 0x03B7:
+ case 0x03B9:
+ case 0x03BF:
+ case 0x03C5:
+ case 0x03C9:
+ case 0x0391:
+ case 0x0395:
+ case 0x0397:
+ case 0x0399:
+ case 0x039F:
+ case 0x03A5:
+ case 0x03A9:
+ return TRUE;
+ }
+ return FALSE;
+}
+
+UBool LegalGreek::isRho(UChar c) {
+ switch (c) {
+ case 0x03C1:
+ case 0x03A1:
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// AbbreviatedUnicodeSetIterator Interface ---------------------------------------------
+//
+// Iterate over a UnicodeSet, only returning a sampling of the contained code points.
+// density is the approximate total number of code points to returned for the entire set.
+//
+
+class AbbreviatedUnicodeSetIterator : public UnicodeSetIterator {
+public :
+
+ AbbreviatedUnicodeSetIterator();
+ virtual ~AbbreviatedUnicodeSetIterator();
+ void reset(UnicodeSet& set, UBool abb = FALSE, int32_t density = 100);
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ */
+ static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ */
+ virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+
+private :
+ UBool abbreviated;
+ int32_t perRange; // The maximum number of code points to be returned from each range
+ virtual void loadRange(int32_t range);
+
+ /**
+ * The address of this static class variable serves as this class's ID
+ * for ICU "poor man's RTTI".
+ */
+ static const char fgClassID;
+};
+
+// AbbreviatedUnicodeSetIterator Implementation ---------------------------------------
+
+const char AbbreviatedUnicodeSetIterator::fgClassID=0;
+
+AbbreviatedUnicodeSetIterator::AbbreviatedUnicodeSetIterator() :
+ UnicodeSetIterator(), abbreviated(FALSE) {
+}
+
+AbbreviatedUnicodeSetIterator::~AbbreviatedUnicodeSetIterator() {
+}
+
+void AbbreviatedUnicodeSetIterator::reset(UnicodeSet& newSet, UBool abb, int32_t density) {
+ UnicodeSetIterator::reset(newSet);
+ abbreviated = abb;
+ perRange = newSet.getRangeCount();
+ if (perRange != 0) {
+ perRange = density / perRange;
+ }
+}
+
+void AbbreviatedUnicodeSetIterator::loadRange(int32_t myRange) {
+ UnicodeSetIterator::loadRange(myRange);
+ if (abbreviated && (endElement > nextElement + perRange)) {
+ endElement = nextElement + perRange;
+ }
+}
+
+//--------------------------------------------------------------------
+// RTTest Interface
+//--------------------------------------------------------------------
+
+class RTTest : public IntlTest {
+
+ // PrintWriter out;
+
+ UnicodeString transliteratorID;
+ int32_t errorLimit;
+ int32_t errorCount;
+ int32_t pairLimit;
+ UnicodeSet sourceRange;
+ UnicodeSet targetRange;
+ UnicodeSet toSource;
+ UnicodeSet toTarget;
+ UnicodeSet roundtripExclusionsSet;
+ IntlTest* parent;
+ Legal* legalSource; // NOT owned
+ UnicodeSet badCharacters;
+
+public:
+
+ /*
+ * create a test for the given script transliterator.
+ */
+ RTTest(const UnicodeString& transliteratorIDStr);
+
+ virtual ~RTTest();
+
+ void setErrorLimit(int32_t limit);
+
+ void setPairLimit(int32_t limit);
+
+ void test(const UnicodeString& sourceRange,
+ const UnicodeString& targetRange,
+ const char* roundtripExclusions,
+ IntlTest* parent,
+ UBool quick,
+ Legal* adoptedLegal,
+ int32_t density = 100);
+
+private:
+
+ // Added to do better equality check.
+
+ static UBool isSame(const UnicodeString& a, const UnicodeString& b);
+
+ static UBool isCamel(const UnicodeString& a);
+
+ UBool checkIrrelevants(Transliterator *t, const UnicodeString& irrelevants);
+
+ void test2(UBool quick, int32_t density);
+
+ void logWrongScript(const UnicodeString& label,
+ const UnicodeString& from,
+ const UnicodeString& to);
+
+ void logNotCanonical(const UnicodeString& label,
+ const UnicodeString& from,
+ const UnicodeString& to,
+ const UnicodeString& fromCan,
+ const UnicodeString& toCan);
+
+ void logFails(const UnicodeString& label);
+
+ void logToRulesFails(const UnicodeString& label,
+ const UnicodeString& from,
+ const UnicodeString& to,
+ const UnicodeString& toCan);
+
+ void logRoundTripFailure(const UnicodeString& from,
+ const UnicodeString& toID,
+ const UnicodeString& to,
+ const UnicodeString& backID,
+ const UnicodeString& back);
+};
+
+//--------------------------------------------------------------------
+// RTTest Implementation
+//--------------------------------------------------------------------
+
+/*
+ * create a test for the given script transliterator.
+ */
+RTTest::RTTest(const UnicodeString& transliteratorIDStr) {
+ transliteratorID = transliteratorIDStr;
+ errorLimit = 500;
+ errorCount = 0;
+ pairLimit = 0x10000;
+}
+
+RTTest::~RTTest() {
+}
+
+void RTTest::setErrorLimit(int32_t limit) {
+ errorLimit = limit;
+}
+
+void RTTest::setPairLimit(int32_t limit) {
+ pairLimit = limit;
+}
+
+UBool RTTest::isSame(const UnicodeString& a, const UnicodeString& b) {
+ if (a == b) return TRUE;
+ if (a.caseCompare(b, U_FOLD_CASE_DEFAULT)==0 && isCamel(a)) return TRUE;
+ UnicodeString aa, bb;
+ UErrorCode ec = U_ZERO_ERROR;
+ Normalizer::decompose(a, FALSE, 0, aa, ec);
+ Normalizer::decompose(b, FALSE, 0, bb, ec);
+ if (aa == bb) return TRUE;
+ if (aa.caseCompare(bb, U_FOLD_CASE_DEFAULT)==0 && isCamel(aa)) return TRUE;
+ return FALSE;
+}
+
+UBool RTTest::isCamel(const UnicodeString& a) {
+ // see if string is of the form aB; e.g. lower, then upper or title
+ UChar32 cp;
+ UBool haveLower = FALSE;
+ for (int32_t i = 0; i < a.length(); i += UTF_CHAR_LENGTH(cp)) {
+ cp = a.char32At(i);
+ int8_t t = u_charType(cp);
+ switch (t) {
+ case U_UPPERCASE_LETTER:
+ if (haveLower) return TRUE;
+ break;
+ case U_TITLECASE_LETTER:
+ if (haveLower) return TRUE;
+ // drop through, since second letter is lower.
+ case U_LOWERCASE_LETTER:
+ haveLower = TRUE;
+ break;
+ }
+ }
+ return FALSE;
+}
+
+void RTTest::test(const UnicodeString& sourceRangeVal,
+ const UnicodeString& targetRangeVal,
+ const char* roundtripExclusions,
+ IntlTest* logVal, UBool quickRt,
+ Legal* adoptedLegal,
+ int32_t density)
+{
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ this->parent = logVal;
+ this->legalSource = adoptedLegal;
+
+ UnicodeSet neverOk("[:Other:]", status);
+ UnicodeSet okAnyway("[^[:Letter:]]", status);
+
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Initializing UnicodeSet with [:Other:] or [^[:Letter:]]");
+ return;
+ }
+
+ this->sourceRange.clear();
+ this->sourceRange.applyPattern(sourceRangeVal, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: UnicodeSet::applyPattern(" +
+ sourceRangeVal + ")");
+ return;
+ }
+ this->sourceRange.removeAll(neverOk);
+
+ this->targetRange.clear();
+ this->targetRange.applyPattern(targetRangeVal, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: UnicodeSet::applyPattern(" +
+ targetRangeVal + ")");
+ return;
+ }
+ this->targetRange.removeAll(neverOk);
+
+ this->toSource.clear();
+ this->toSource.applyPattern(sourceRangeVal, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: UnicodeSet::applyPattern(" +
+ sourceRangeVal + ")");
+ return;
+ }
+ this->toSource.addAll(okAnyway);
+
+ this->toTarget.clear();
+ this->toTarget.applyPattern(targetRangeVal, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: UnicodeSet::applyPattern(" +
+ targetRangeVal + ")");
+ return;
+ }
+ this->toTarget.addAll(okAnyway);
+
+ this->roundtripExclusionsSet.clear();
+ if (roundtripExclusions != NULL && strlen(roundtripExclusions) > 0) {
+ this->roundtripExclusionsSet.applyPattern(roundtripExclusions, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: UnicodeSet::applyPattern(%s)", roundtripExclusions);
+ return;
+ }
+ }
+
+ badCharacters.clear();
+ badCharacters.applyPattern("[:Other:]", status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: UnicodeSet::applyPattern([:Other:])");
+ return;
+ }
+
+ test2(quickRt, density);
+
+ if (errorCount > 0) {
+ char str[100];
+ int32_t length = transliteratorID.extract(str, 100, NULL, status);
+ str[length] = 0;
+ parent->errln("FAIL: %s errors: %d %s", str, errorCount, (errorCount > errorLimit ? " (at least!)" : " ")); // + ", see " + logFileName);
+ } else {
+ char str[100];
+ int32_t length = transliteratorID.extract(str, 100, NULL, status);
+ str[length] = 0;
+ parent->logln("%s ok", str);
+ }
+}
+
+UBool RTTest::checkIrrelevants(Transliterator *t,
+ const UnicodeString& irrelevants) {
+ for (int i = 0; i < irrelevants.length(); ++i) {
+ UChar c = irrelevants.charAt(i);
+ UnicodeString srcStr(c);
+ UnicodeString targ = srcStr;
+ t->transliterate(targ);
+ if (srcStr == targ) return TRUE;
+ }
+ return FALSE;
+}
+
+void RTTest::test2(UBool quickRt, int32_t density) {
+
+ UnicodeString srcStr, targ, reverse;
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError ;
+ TransliteratorPointer sourceToTarget(
+ Transliterator::createInstance(transliteratorID, UTRANS_FORWARD, parseError,
+ status));
+ if ((Transliterator *)sourceToTarget == NULL) {
+ parent->errln("FAIL: createInstance(" + transliteratorID +
+ ") returned NULL. Error: " + u_errorName(status)
+ + "\n\tpreContext : " + prettify(parseError.preContext)
+ + "\n\tpostContext : " + prettify(parseError.postContext));
+
+ return;
+ }
+ TransliteratorPointer targetToSource(sourceToTarget->createInverse(status));
+ if ((Transliterator *)targetToSource == NULL) {
+ parent->errln("FAIL: " + transliteratorID +
+ ".createInverse() returned NULL. Error:" + u_errorName(status)
+ + "\n\tpreContext : " + prettify(parseError.preContext)
+ + "\n\tpostContext : " + prettify(parseError.postContext));
+ return;
+ }
+
+ AbbreviatedUnicodeSetIterator usi;
+ AbbreviatedUnicodeSetIterator usi2;
+
+ parent->logln("Checking that at least one irrelevant character is not NFC'ed");
+ // string is from NFC_NO in the UCD
+ UnicodeString irrelevants = CharsToUnicodeString("\\u2000\\u2001\\u2126\\u212A\\u212B\\u2329");
+
+ if (checkIrrelevants(sourceToTarget, irrelevants) == FALSE) {
+ logFails("Source-Target, irrelevants");
+ }
+ if (checkIrrelevants(targetToSource, irrelevants) == FALSE) {
+ logFails("Target-Source, irrelevants");
+ }
+
+ if (!quickRt){
+ parent->logln("Checking that toRules works");
+ UnicodeString rules = "";
+
+ UParseError parseError;
+ rules = sourceToTarget->toRules(rules, TRUE);
+ // parent->logln((UnicodeString)"toRules => " + rules);
+ TransliteratorPointer sourceToTarget2(Transliterator::createFromRules(
+ "s2t2", rules,
+ UTRANS_FORWARD,
+ parseError, status));
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: createFromRules %s\n", u_errorName(status));
+ return;
+ }
+
+ rules = targetToSource->toRules(rules, FALSE);
+ TransliteratorPointer targetToSource2(Transliterator::createFromRules(
+ "t2s2", rules,
+ UTRANS_FORWARD,
+ parseError, status));
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: createFromRules %s\n", u_errorName(status));
+ return;
+ }
+
+ usi.reset(sourceRange);
+ for (;;) {
+ if (!usi.next() || usi.isString()) break;
+ UChar32 c = usi.getCodepoint();
+
+ UnicodeString srcStr((UChar32)c);
+ UnicodeString targ = srcStr;
+ sourceToTarget->transliterate(targ);
+ UnicodeString targ2 = srcStr;
+ sourceToTarget2->transliterate(targ2);
+ if (targ != targ2) {
+ logToRulesFails("Source-Target, toRules", srcStr, targ, targ2);
+ }
+ }
+
+ usi.reset(targetRange);
+ for (;;) {
+ if (!usi.next() || usi.isString()) break;
+ UChar32 c = usi.getCodepoint();
+
+ UnicodeString srcStr((UChar32)c);
+ UnicodeString targ = srcStr;
+ targetToSource->transliterate(targ);
+ UnicodeString targ2 = srcStr;
+ targetToSource2->transliterate(targ2);
+ if (targ != targ2) {
+ logToRulesFails("Target-Source, toRules", srcStr, targ, targ2);
+ }
+ }
+ }
+
+ parent->logln("Checking that all source characters convert to target - Singles");
+
+ UnicodeSet failSourceTarg;
+ usi.reset(sourceRange);
+ for (;;) {
+ if (!usi.next() || usi.isString()) break;
+ UChar32 c = usi.getCodepoint();
+
+ UnicodeString srcStr((UChar32)c);
+ UnicodeString targ = srcStr;
+ sourceToTarget->transliterate(targ);
+ if (toTarget.containsAll(targ) == FALSE
+ || badCharacters.containsSome(targ) == TRUE) {
+ UnicodeString targD;
+ Normalizer::decompose(targ, FALSE, 0, targD, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
+ return;
+ }
+ if (toTarget.containsAll(targD) == FALSE ||
+ badCharacters.containsSome(targD) == TRUE) {
+ logWrongScript("Source-Target", srcStr, targ);
+ failSourceTarg.add(c);
+ continue;
+ }
+ }
+
+ UnicodeString cs2;
+ Normalizer::decompose(srcStr, FALSE, 0, cs2, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
+ return;
+ }
+ UnicodeString targ2 = cs2;
+ sourceToTarget->transliterate(targ2);
+ if (targ != targ2) {
+ logNotCanonical("Source-Target", srcStr, targ,cs2, targ2);
+ }
+ }
+
+ parent->logln("Checking that all source characters convert to target - Doubles");
+
+ UnicodeSet sourceRangeMinusFailures(sourceRange);
+ sourceRangeMinusFailures.removeAll(failSourceTarg);
+
+ usi.reset(sourceRangeMinusFailures, quickRt, density);
+ for (;;) {
+ if (!usi.next() || usi.isString()) break;
+ UChar32 c = usi.getCodepoint();
+
+ usi2.reset(sourceRangeMinusFailures, quickRt, density);
+ for (;;) {
+ if (!usi2.next() || usi2.isString()) break;
+ UChar32 d = usi2.getCodepoint();
+
+ UnicodeString srcStr;
+ srcStr += (UChar32)c;
+ srcStr += (UChar32)d;
+ UnicodeString targ = srcStr;
+ sourceToTarget->transliterate(targ);
+ if (toTarget.containsAll(targ) == FALSE ||
+ badCharacters.containsSome(targ) == TRUE)
+ {
+ UnicodeString targD;
+ Normalizer::decompose(targ, FALSE, 0, targD, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
+ return;
+ }
+ if (toTarget.containsAll(targD) == FALSE ||
+ badCharacters.containsSome(targD) == TRUE) {
+ logWrongScript("Source-Target", srcStr, targ);
+ continue;
+ }
+ }
+ UnicodeString cs2;
+ Normalizer::decompose(srcStr, FALSE, 0, cs2, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
+ return;
+ }
+ UnicodeString targ2 = cs2;
+ sourceToTarget->transliterate(targ2);
+ if (targ != targ2) {
+ logNotCanonical("Source-Target", srcStr, targ, cs2,targ2);
+ }
+ }
+ }
+
+ parent->logln("Checking that target characters convert to source and back - Singles");
+
+ UnicodeSet failTargSource;
+ UnicodeSet failRound;
+
+ usi.reset(targetRange);
+ for (;;) {
+ if (!usi.next()) break;
+
+ if(usi.isString()){
+ srcStr = usi.getString();
+ }else{
+ srcStr = (UnicodeString)usi.getCodepoint();
+ }
+
+ UChar32 c = srcStr.char32At(0);
+
+ targ = srcStr;
+ targetToSource->transliterate(targ);
+ reverse = targ;
+ sourceToTarget->transliterate(reverse);
+
+ if (toSource.containsAll(targ) == FALSE ||
+ badCharacters.containsSome(targ) == TRUE) {
+ UnicodeString targD;
+ Normalizer::decompose(targ, FALSE, 0, targD, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition%s\n", u_errorName(status));
+ return;
+ }
+ if (toSource.containsAll(targD) == FALSE) {
+ logWrongScript("Target-Source", srcStr, targ);
+ failTargSource.add(c);
+ continue;
+ }
+ if (badCharacters.containsSome(targD) == TRUE) {
+ logWrongScript("Target-Source*", srcStr, targ);
+ failTargSource.add(c);
+ continue;
+ }
+ }
+ if (isSame(srcStr, reverse) == FALSE &&
+ roundtripExclusionsSet.contains(c) == FALSE
+ && roundtripExclusionsSet.contains(srcStr)==FALSE) {
+ logRoundTripFailure(srcStr,targetToSource->getID(), targ,sourceToTarget->getID(), reverse);
+ failRound.add(c);
+ continue;
+ }
+
+ UnicodeString targ2;
+ Normalizer::decompose(targ, FALSE, 0, targ2, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition%s\n", u_errorName(status));
+ return;
+ }
+ UnicodeString reverse2 = targ2;
+ sourceToTarget->transliterate(reverse2);
+ if (reverse != reverse2) {
+ logNotCanonical("Target-Source", targ, reverse, targ2, reverse2);
+ }
+ }
+
+ parent->logln("Checking that target characters convert to source and back - Doubles");
+ int32_t count = 0;
+
+ UnicodeSet targetRangeMinusFailures(targetRange);
+ targetRangeMinusFailures.removeAll(failTargSource);
+ targetRangeMinusFailures.removeAll(failRound);
+
+ usi.reset(targetRangeMinusFailures, quickRt, density);
+ UnicodeString targ2;
+ UnicodeString reverse2;
+ UnicodeString targD;
+ for (;;) {
+ if (!usi.next() || usi.isString()) break;
+ UChar32 c = usi.getCodepoint();
+ if (++count > pairLimit) {
+ //throw new TestTruncated("Test truncated at " + pairLimit + " x 64k pairs");
+ parent->logln("");
+ parent->logln((UnicodeString)"Test truncated at " + pairLimit + " x 64k pairs");
+ return;
+ }
+
+ usi2.reset(targetRangeMinusFailures, quickRt, density);
+ for (;;) {
+ if (!usi2.next() || usi2.isString())
+ break;
+ UChar32 d = usi2.getCodepoint();
+ srcStr.truncate(0); // empty the variable without construction/destruction
+ srcStr += c;
+ srcStr += d;
+
+ targ = srcStr;
+ targetToSource->transliterate(targ);
+ reverse = targ;
+ sourceToTarget->transliterate(reverse);
+
+ if (toSource.containsAll(targ) == FALSE ||
+ badCharacters.containsSome(targ) == TRUE)
+ {
+ targD.truncate(0); // empty the variable without construction/destruction
+ Normalizer::decompose(targ, FALSE, 0, targD, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition%s\n",
+ u_errorName(status));
+ return;
+ }
+ if (toSource.containsAll(targD) == FALSE
+ || badCharacters.containsSome(targD) == TRUE)
+ {
+ logWrongScript("Target-Source", srcStr, targ);
+ continue;
+ }
+ }
+ if (isSame(srcStr, reverse) == FALSE &&
+ roundtripExclusionsSet.contains(c) == FALSE&&
+ roundtripExclusionsSet.contains(d) == FALSE &&
+ roundtripExclusionsSet.contains(srcStr)== FALSE)
+ {
+ logRoundTripFailure(srcStr,targetToSource->getID(), targ, sourceToTarget->getID(),reverse);
+ continue;
+ }
+
+ targ2.truncate(0); // empty the variable without construction/destruction
+ Normalizer::decompose(targ, FALSE, 0, targ2, status);
+ if (U_FAILURE(status)) {
+ parent->errln("FAIL: Internal error during decomposition%s\n", u_errorName(status));
+ return;
+ }
+ reverse2 = targ2;
+ sourceToTarget->transliterate(reverse2);
+ if (reverse != reverse2) {
+ logNotCanonical("Target-Source", targ,reverse, targ2, reverse2);
+ }
+ }
+ }
+ parent->logln("");
+}
+
+void RTTest::logWrongScript(const UnicodeString& label,
+ const UnicodeString& from,
+ const UnicodeString& to) {
+ parent->errln((UnicodeString)"FAIL " +
+ label + ": " +
+ from + "(" + TestUtility::hex(from) + ") => " +
+ to + "(" + TestUtility::hex(to) + ")");
+ ++errorCount;
+}
+
+void RTTest::logNotCanonical(const UnicodeString& label,
+ const UnicodeString& from,
+ const UnicodeString& to,
+ const UnicodeString& fromCan,
+ const UnicodeString& toCan) {
+ parent->errln((UnicodeString)"FAIL (can.equiv)" +
+ label + ": " +
+ from + "(" + TestUtility::hex(from) + ") => " +
+ to + "(" + TestUtility::hex(to) + ")" +
+ fromCan + "(" + TestUtility::hex(fromCan) + ") => " +
+ toCan + " (" +
+ TestUtility::hex(toCan) + ")"
+ );
+ ++errorCount;
+}
+
+void RTTest::logFails(const UnicodeString& label) {
+ parent->errln((UnicodeString)"<br>FAIL " + label);
+ ++errorCount;
+}
+
+void RTTest::logToRulesFails(const UnicodeString& label,
+ const UnicodeString& from,
+ const UnicodeString& to,
+ const UnicodeString& otherTo)
+{
+ parent->errln((UnicodeString)"FAIL: " +
+ label + ": " +
+ from + "(" + TestUtility::hex(from) + ") => " +
+ to + "(" + TestUtility::hex(to) + ")" +
+ "!=" +
+ otherTo + " (" +
+ TestUtility::hex(otherTo) + ")"
+ );
+ ++errorCount;
+}
+
+
+void RTTest::logRoundTripFailure(const UnicodeString& from,
+ const UnicodeString& toID,
+ const UnicodeString& to,
+ const UnicodeString& backID,
+ const UnicodeString& back) {
+ if (legalSource->is(from) == FALSE) return; // skip illegals
+
+ parent->errln((UnicodeString)"FAIL Roundtrip: " +
+ from + "(" + TestUtility::hex(from) + ") => " +
+ to + "(" + TestUtility::hex(to) + ") "+toID+" => " +
+ back + "(" + TestUtility::hex(back) + ") "+backID+" => ");
+ ++errorCount;
+}
+
+//--------------------------------------------------------------------
+// Specific Tests
+//--------------------------------------------------------------------
+
+ /*
+ Note: Unicode 3.2 added new Hiragana/Katakana characters:
+
+3095..3096 ; 3.2 # [2] HIRAGANA LETTER SMALL KA..HIRAGANA LETTER SMALL KE
+309F..30A0 ; 3.2 # [2] HIRAGANA DIGRAPH YORI..KATAKANA-HIRAGANA DOUBLE HYPHEN
+30FF ; 3.2 # KATAKANA DIGRAPH KOTO
+31F0..31FF ; 3.2 # [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO
+
+ We will not add them to the rules until they are more supported (e.g. in fonts on Windows)
+ A bug has been filed to remind us to do this: #1979.
+ */
+
+static const char KATAKANA[] = "[[[:katakana:][\\u30A1-\\u30FA\\u30FC]]-[\\u30FF\\u31F0-\\u31FF]]";
+static const char HIRAGANA[] = "[[[:hiragana:][\\u3040-\\u3094]]-[\\u3095-\\u3096\\u309F-\\u30A0]]";
+static const char LENGTH[] = "[\\u30FC]";
+static const char HALFWIDTH_KATAKANA[] = "[\\uFF65-\\uFF9D]";
+static const char KATAKANA_ITERATION[] = "[\\u30FD\\u30FE]";
+static const char HIRAGANA_ITERATION[] = "[\\u309D\\u309E]";
+static const int32_t TEMP_MAX=256;
+
+void TransliteratorRoundTripTest::TestKana() {
+ RTTest test("Katakana-Hiragana");
+ Legal *legal = new Legal();
+ char temp[TEMP_MAX];
+ strcpy(temp, "[");
+ strcat(temp, HALFWIDTH_KATAKANA);
+ strcat(temp, LENGTH);
+ strcat(temp, "]");
+ test.test(KATAKANA, UnicodeString("[") + HIRAGANA + LENGTH + UnicodeString("]"),
+ temp,
+ this, quick, legal);
+ delete legal;
+}
+
+void TransliteratorRoundTripTest::TestHiragana() {
+ RTTest test("Latin-Hiragana");
+ Legal *legal = new Legal();
+ test.test(UnicodeString("[a-zA-Z]", ""),
+ HIRAGANA,
+ HIRAGANA_ITERATION, this, quick, legal);
+ delete legal;
+}
+
+void TransliteratorRoundTripTest::TestKatakana() {
+ RTTest test("Latin-Katakana");
+ Legal *legal = new Legal();
+ char temp[TEMP_MAX];
+ strcpy(temp, "[");
+ strcat(temp, KATAKANA_ITERATION);
+ strcat(temp, HALFWIDTH_KATAKANA);
+ strcat(temp, "]");
+ test.test(UnicodeString("[a-zA-Z]", ""),
+ KATAKANA,
+ temp,
+ this, quick, legal);
+ delete legal;
+}
+
+void TransliteratorRoundTripTest::TestJamo() {
+ RTTest t("Latin-Jamo");
+ Legal *legal = new LegalJamo();
+ t.test(UnicodeString("[a-zA-Z]", ""),
+ UnicodeString("[\\u1100-\\u1112 \\u1161-\\u1175 \\u11A8-\\u11C2]",
+ ""),
+ NULL, this, quick, legal);
+ delete legal;
+}
+
+void TransliteratorRoundTripTest::TestHangul() {
+ RTTest t("Latin-Hangul");
+ Legal *legal = new Legal();
+ if (quick) t.setPairLimit(1000);
+ t.test(UnicodeString("[a-zA-Z]", ""),
+ UnicodeString("[\\uAC00-\\uD7A4]", ""),
+ NULL, this, quick, legal, 1);
+ delete legal;
+}
+
+
+#define ASSERT_SUCCESS(status) {if (U_FAILURE(status)) { \
+ errln("error at file %s, line %d, status = %s", __FILE__, __LINE__, \
+ u_errorName(status)); \
+ return;}}
+
+
+static void writeStringInU8(FILE *out, const UnicodeString &s) {
+ int i;
+ for (i=0; i<s.length(); i=s.moveIndex32(i, 1)) {
+ UChar32 c = s.char32At(i);
+ uint8_t bufForOneChar[10];
+ UBool isError = FALSE;
+ int32_t destIdx = 0;
+ U8_APPEND(bufForOneChar, destIdx, (int32_t)sizeof(bufForOneChar), c, isError);
+ fwrite(bufForOneChar, 1, destIdx, out);
+ }
+}
+
+
+
+
+void TransliteratorRoundTripTest::TestHan() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ // TODO: getExemplars() exists only as a C API, taking a USet.
+ // The set API we need to use exists only on UnicodeSet, not on USet.
+ // Do a hacky cast, knowing that a USet is really a UnicodeSet in
+ // the implementation. Once USet gets the missing API, switch back
+ // to using that.
+ USet *USetExemplars = NULL;
+ ULocaleData *uld = ulocdata_open("zh",&status);
+ USetExemplars = uset_open(0, 0);
+ USetExemplars = ulocdata_getExemplarSet(uld, USetExemplars, 0, ULOCDATA_ES_STANDARD, &status);
+ ASSERT_SUCCESS(status);
+ ulocdata_close(uld);
+
+ UnicodeString source;
+ UChar32 c;
+ int i;
+ for (i=0; ;i++) {
+ // Add all of the Chinese exemplar chars to the string "source".
+ c = uset_charAt(USetExemplars, i);
+ if (c == (UChar32)-1) {
+ break;
+ }
+ source.append(c);
+ }
+
+ // transform with Han translit
+ Transliterator *hanTL = Transliterator::createInstance("Han-Latin", UTRANS_FORWARD, status);
+ ASSERT_SUCCESS(status);
+ UnicodeString target=source;
+ hanTL->transliterate(target);
+ // now verify that there are no Han characters left
+ UnicodeSet allHan("[:han:]", status);
+ ASSERT_SUCCESS(status);
+ if (allHan.containsSome(target)) {
+ errln("file %s, line %d, No Han must be left after Han-Latin transliteration",
+ __FILE__, __LINE__);
+ }
+
+ // check the pinyin translit
+ Transliterator *pn = Transliterator::createInstance("Latin-NumericPinyin", UTRANS_FORWARD, status);
+ ASSERT_SUCCESS(status);
+ UnicodeString target2 = target;
+ pn->transliterate(target2);
+
+ // verify that there are no marks
+ Transliterator *nfd = Transliterator::createInstance("nfd", UTRANS_FORWARD, status);
+ ASSERT_SUCCESS(status);
+
+ UnicodeString nfded = target2;
+ nfd->transliterate(nfded);
+ UnicodeSet allMarks("[\\u0304\\u0301\\u030C\\u0300\\u0306]", status); // look only for Pinyin tone marks, not all marks (there are some others in there)
+ ASSERT_SUCCESS(status);
+ assertFalse("NumericPinyin must contain no marks", allMarks.containsSome(nfded));
+
+ // verify roundtrip
+ Transliterator *np = pn->createInverse(status);
+ ASSERT_SUCCESS(status);
+ UnicodeString target3 = target2;
+ np->transliterate(target3);
+ UBool roundtripOK = (target3.compare(target) == 0);
+ assertTrue("NumericPinyin must roundtrip", roundtripOK);
+ if (!roundtripOK) {
+ const char *filename = "numeric-pinyin.log.txt";
+ FILE *out = fopen(filename, "w");
+ errln("Creating log file %s\n", filename);
+ fprintf(out, "Pinyin: ");
+ writeStringInU8(out, target);
+ fprintf(out, "\nPinyin-Numeric-Pinyin: ");
+ writeStringInU8(out, target2);
+ fprintf(out, "\nNumeric-Pinyin-Pinyin: ");
+ writeStringInU8(out, target3);
+ fprintf(out, "\n");
+ fclose(out);
+ }
+
+ delete hanTL;
+ delete pn;
+ delete nfd;
+ delete np;
+ uset_close(USetExemplars);
+}
+
+
+void TransliteratorRoundTripTest::TestGreek() {
+
+ if (isICUVersionAtLeast(ICU_39)) {
+ // We temporarily filter against Unicode 4.1, but we only do this
+ // before version 3.4.
+ errln("FAIL: TestGreek needs to be updated to remove delete the [:Age=4.0:] filter ");
+ return;
+ } else {
+ logln("Warning: TestGreek needs to be updated to remove delete the section marked [:Age=4.0:] filter");
+ }
+
+ RTTest test("Latin-Greek");
+ LegalGreek *legal = new LegalGreek(TRUE);
+
+ test.test(UnicodeString("[a-zA-Z]", ""),
+ UnicodeString("[\\u003B\\u00B7[[:Greek:]&[:Letter:]]-["
+ "\\u1D26-\\u1D2A" // L& [5] GREEK LETTER SMALL CAPITAL GAMMA..GREEK LETTER SMALL CAPITAL PSI
+ "\\u1D5D-\\u1D61" // Lm [5] MODIFIER LETTER SMALL BETA..MODIFIER LETTER SMALL CHI
+ "\\u1D66-\\u1D6A" // L& [5] GREEK SUBSCRIPT SMALL LETTER BETA..GREEK SUBSCRIPT SMALL LETTER CHI
+ "\\u03D7-\\u03EF" // \N{GREEK KAI SYMBOL}..\N{COPTIC SMALL LETTER DEI}
+ "] & [:Age=4.0:]]",
+
+ //UnicodeString("[[\\u003B\\u00B7[:Greek:]-[\\u0374\\u0385\\u1fcd\\u1fce\\u1fdd\\u1fde\\u1fed-\\u1fef\\u1ffd\\u03D7-\\u03EF]]&[:Age=3.2:]]",
+ ""),
+ "[\\u00B5\\u037A\\u03D0-\\u03F5\\u03f9]", /* exclusions */
+ this, quick, legal, 50);
+
+
+ delete legal;
+}
+
+
+void TransliteratorRoundTripTest::TestGreekUNGEGN() {
+
+ if (isICUVersionAtLeast(ICU_39)) {
+ // We temporarily filter against Unicode 4.1, but we only do this
+ // before version 3.4.
+ errln("FAIL: TestGreek needs to be updated to remove delete the [:Age=4.0:] filter ");
+ return;
+ } else {
+ logln("Warning: TestGreek needs to be updated to remove delete the section marked [:Age=4.0:] filter");
+ }
+
+ RTTest test("Latin-Greek/UNGEGN");
+ LegalGreek *legal = new LegalGreek(FALSE);
+
+ test.test(UnicodeString("[a-zA-Z]", ""),
+ UnicodeString("[\\u003B\\u00B7[[:Greek:]&[:Letter:]]-["
+ "\\u1D26-\\u1D2A" // L& [5] GREEK LETTER SMALL CAPITAL GAMMA..GREEK LETTER SMALL CAPITAL PSI
+ "\\u1D5D-\\u1D61" // Lm [5] MODIFIER LETTER SMALL BETA..MODIFIER LETTER SMALL CHI
+ "\\u1D66-\\u1D6A" // L& [5] GREEK SUBSCRIPT SMALL LETTER BETA..GREEK SUBSCRIPT SMALL LETTER CHI
+ "\\u03D7-\\u03EF" // \N{GREEK KAI SYMBOL}..\N{COPTIC SMALL LETTER DEI}
+ "] & [:Age=4.0:]]",
+ //UnicodeString("[[\\u003B\\u00B7[:Greek:]-[\\u0374\\u0385\\u1fce\\u1fde\\u03D7-\\u03EF]]&[:Age=3.2:]]",
+ ""),
+ "[\\u0385\\u00B5\\u037A\\u03D0-\\uFFFF {\\u039C\\u03C0}]", /* roundtrip exclusions */
+ this, quick, legal);
+
+ delete legal;
+}
+
+void TransliteratorRoundTripTest::Testel() {
+
+ if (isICUVersionAtLeast(ICU_39)) {
+ // We temporarily filter against Unicode 4.1, but we only do this
+ // before version 3.4.
+ errln("FAIL: TestGreek needs to be updated to remove delete the [:Age=4.0:] filter ");
+ return;
+ } else {
+ logln("Warning: TestGreek needs to be updated to remove delete the section marked [:Age=4.0:] filter");
+ }
+
+ RTTest test("Latin-el");
+ LegalGreek *legal = new LegalGreek(FALSE);
+
+ test.test(UnicodeString("[a-zA-Z]", ""),
+ UnicodeString("[\\u003B\\u00B7[[:Greek:]&[:Letter:]]-["
+ "\\u1D26-\\u1D2A" // L& [5] GREEK LETTER SMALL CAPITAL GAMMA..GREEK LETTER SMALL CAPITAL PSI
+ "\\u1D5D-\\u1D61" // Lm [5] MODIFIER LETTER SMALL BETA..MODIFIER LETTER SMALL CHI
+ "\\u1D66-\\u1D6A" // L& [5] GREEK SUBSCRIPT SMALL LETTER BETA..GREEK SUBSCRIPT SMALL LETTER CHI
+ "\\u03D7-\\u03EF" // \N{GREEK KAI SYMBOL}..\N{COPTIC SMALL LETTER DEI}
+ "] & [:Age=4.0:]]",
+ //UnicodeString("[[\\u003B\\u00B7[:Greek:]-[\\u0374\\u0385\\u1fce\\u1fde\\u03D7-\\u03EF]]&[:Age=3.2:]]",
+ ""),
+ "[\\u00B5\\u037A\\u03D0-\\uFFFF {\\u039C\\u03C0}]", /* exclusions */
+ this, quick, legal);
+
+
+ delete legal;
+}
+
+
+void TransliteratorRoundTripTest::TestArabic() {
+ UnicodeString ARABIC("[\\u060C\\u061B\\u061F\\u0621\\u0627-\\u063A\\u0641-\\u0655\\u0660-\\u066C\\u067E\\u0686\\u0698\\u06A4\\u06AD\\u06AF\\u06CB-\\u06CC\\u06F0-\\u06F9]");
+ Legal *legal = new Legal();
+ RTTest test("Latin-Arabic");
+ test.test("[a-zA-Z\\u02BE\\u02BF\\u207F]", ARABIC, "[a-zA-Z\\u02BE\\u02BF\\u207F]",this, quick, legal); //
+ delete legal;
+}
+class LegalHebrew : public Legal {
+private:
+ UnicodeSet FINAL;
+ UnicodeSet NON_FINAL;
+ UnicodeSet LETTER;
+public:
+ LegalHebrew(UErrorCode& error);
+ virtual ~LegalHebrew() {}
+ virtual UBool is(const UnicodeString& sourceString) const;
+};
+
+LegalHebrew::LegalHebrew(UErrorCode& error){
+ FINAL.applyPattern("[\\u05DA\\u05DD\\u05DF\\u05E3\\u05E5]", error);
+ NON_FINAL.applyPattern("[\\u05DB\\u05DE\\u05E0\\u05E4\\u05E6]", error);
+ LETTER.applyPattern("[:letter:]", error);
+}
+UBool LegalHebrew::is(const UnicodeString& sourceString)const{
+
+ if (sourceString.length() == 0) return TRUE;
+ // don't worry about surrogates.
+ for (int i = 0; i < sourceString.length(); ++i) {
+ UChar ch = sourceString.charAt(i);
+ UChar next = i+1 == sourceString.length() ? 0x0000 : sourceString.charAt(i);
+ if (FINAL.contains(ch)) {
+ if (LETTER.contains(next)) return FALSE;
+ } else if (NON_FINAL.contains(ch)) {
+ if (!LETTER.contains(next)) return FALSE;
+ }
+ }
+ return TRUE;
+}
+void TransliteratorRoundTripTest::TestHebrew() {
+ if (isICUVersionAtLeast(ICU_39)) {
+ // We temporarily filter against Unicode 4.1, but we only do this
+ // before version 3.4.
+ errln("FAIL: TestHebrew needs to be updated to remove delete the [:Age=4.0:] filter ");
+ return;
+ } else {
+ logln("Warning: TestHebrew needs to be updated to remove delete the section marked [:Age=4.0:] filter");
+ }
+ //long start = System.currentTimeMillis();
+ UErrorCode error = U_ZERO_ERROR;
+ LegalHebrew* legal = new LegalHebrew(error);
+ if(U_FAILURE(error)){
+ errln("Could not construct LegalHebrew object. Error: %s", u_errorName(error));
+ return;
+ }
+ RTTest test("Latin-Hebrew");
+ test.test("[a-zA-Z\\u02BC\\u02BB]", "[[[:hebrew:]-[\\u05BD\\uFB00-\\uFBFF]]&[:Age=4.0:]]", "[\\u05F0\\u05F1\\u05F2]", this, quick, legal);
+
+ //showElapsed(start, "TestHebrew");
+ delete legal;
+}
+void TransliteratorRoundTripTest::TestCyrillic() {
+ RTTest test("Latin-Cyrillic");
+ Legal *legal = new Legal();
+
+ test.test(UnicodeString("[a-zA-Z\\u0110\\u0111\\u02BA\\u02B9]", ""),
+ UnicodeString("[[\\u0400-\\u045F] & [:Age=3.2:]]", ""), NULL, this, quick,
+ legal);
+
+ delete legal;
+}
+
+
+// Inter-Indic Tests ----------------------------------
+class LegalIndic :public Legal{
+ UnicodeSet vowelSignSet;
+ UnicodeSet avagraha;
+ UnicodeSet nukta;
+ UnicodeSet virama;
+ UnicodeSet sanskritStressSigns;
+ UnicodeSet chandrabindu;
+
+public:
+ LegalIndic();
+ virtual UBool is(const UnicodeString& sourceString) const;
+ virtual ~LegalIndic() {};
+};
+UBool LegalIndic::is(const UnicodeString& sourceString) const{
+ int cp=sourceString.charAt(0);
+
+ // A vowel sign cannot be the first char
+ if(vowelSignSet.contains(cp)){
+ return FALSE;
+ }else if(avagraha.contains(cp)){
+ return FALSE;
+ }else if(virama.contains(cp)){
+ return FALSE;
+ }else if(nukta.contains(cp)){
+ return FALSE;
+ }else if(sanskritStressSigns.contains(cp)){
+ return FALSE;
+ }else if(chandrabindu.contains(cp) &&
+ ((sourceString.length()>1) &&
+ vowelSignSet.contains(sourceString.charAt(1)))){
+ return FALSE;
+ }
+ return TRUE;
+}
+LegalIndic::LegalIndic(){
+ UErrorCode status = U_ZERO_ERROR;
+ vowelSignSet.addAll( UnicodeSet("[\\u0902\\u0903\\u0904\\u093e-\\u094c\\u0962\\u0963]",status));/* Devanagari */
+ vowelSignSet.addAll( UnicodeSet("[\\u0982\\u0983\\u09be-\\u09cc\\u09e2\\u09e3\\u09D7]",status));/* Bengali */
+ vowelSignSet.addAll( UnicodeSet("[\\u0a02\\u0a03\\u0a3e-\\u0a4c\\u0a62\\u0a63\\u0a70\\u0a71]",status));/* Gurmukhi */
+ vowelSignSet.addAll( UnicodeSet("[\\u0a82\\u0a83\\u0abe-\\u0acc\\u0ae2\\u0ae3]",status));/* Gujarati */
+ vowelSignSet.addAll( UnicodeSet("[\\u0b02\\u0b03\\u0b3e-\\u0b4c\\u0b62\\u0b63\\u0b56\\u0b57]",status));/* Oriya */
+ vowelSignSet.addAll( UnicodeSet("[\\u0b82\\u0b83\\u0bbe-\\u0bcc\\u0be2\\u0be3\\u0bd7]",status));/* Tamil */
+ vowelSignSet.addAll( UnicodeSet("[\\u0c02\\u0c03\\u0c3e-\\u0c4c\\u0c62\\u0c63\\u0c55\\u0c56]",status));/* Telugu */
+ vowelSignSet.addAll( UnicodeSet("[\\u0c82\\u0c83\\u0cbe-\\u0ccc\\u0ce2\\u0ce3\\u0cd5\\u0cd6]",status));/* Kannada */
+ vowelSignSet.addAll( UnicodeSet("[\\u0d02\\u0d03\\u0d3e-\\u0d4c\\u0d62\\u0d63\\u0d57]",status));/* Malayalam */
+
+ avagraha.addAll(UnicodeSet("[\\u093d\\u09bd\\u0abd\\u0b3d\\u0cbd]",status));
+ nukta.addAll(UnicodeSet("[\\u093c\\u09bc\\u0a3c\\u0abc\\u0b3c\\u0cbc]",status));
+ virama.addAll(UnicodeSet("[\\u094d\\u09cd\\u0a4d\\u0acd\\u0b4d\\u0bcd\\u0c4d\\u0ccd\\u0d4d]",status));
+ sanskritStressSigns.addAll(UnicodeSet("[\\u0951\\u0952\\u0953\\u0954\\u097d]",status));
+ chandrabindu.addAll(UnicodeSet("[\\u0901\\u0981\\u0A81\\u0b01\\u0c01]",status));
+
+ }
+
+static const char latinForIndic[] = "[['.0-9A-Za-z~\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD"
+ "\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F"
+ "\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148"
+ "\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0"
+ "\\u01CD-\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u01FB"
+ "\\u0200-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u0294\\u0303-\\u0304\\u0306\\u0314-\\u0315"
+ "\\u0325\\u040E\\u0419\\u0439\\u045E\\u04C1-\\u04C2\\u04D0-\\u04D1\\u04D6-\\u04D7"
+ "\\u04E2-\\u04E3\\u04EE-\\u04EF\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u1F01\\u1F03\\u1F05"
+ "\\u1F07\\u1F09\\u1F0B\\u1F0D\\u1F0F\\u1F11\\u1F13\\u1F15\\u1F19\\u1F1B\\u1F1D\\u1F21"
+ "\\u1F23\\u1F25\\u1F27\\u1F29\\u1F2B\\u1F2D\\u1F2F\\u1F31\\u1F33\\u1F35\\u1F37\\u1F39"
+ "\\u1F3B\\u1F3D\\u1F3F\\u1F41\\u1F43\\u1F45\\u1F49\\u1F4B\\u1F4D\\u1F51\\u1F53\\u1F55"
+ "\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F61\\u1F63\\u1F65\\u1F67\\u1F69\\u1F6B\\u1F6D"
+ "\\u1F6F\\u1F81\\u1F83\\u1F85\\u1F87\\u1F89\\u1F8B\\u1F8D\\u1F8F\\u1F91\\u1F93\\u1F95"
+ "\\u1F97\\u1F99\\u1F9B\\u1F9D\\u1F9F\\u1FA1\\u1FA3\\u1FA5\\u1FA7\\u1FA9\\u1FAB\\u1FAD"
+ "\\u1FAF-\\u1FB1\\u1FB8-\\u1FB9\\u1FD0-\\u1FD1\\u1FD8-\\u1FD9\\u1FE0-\\u1FE1\\u1FE5"
+ "\\u1FE8-\\u1FE9\\u1FEC\\u212A-\\u212B\\uE04D\\uE064]"
+ "-[\\uE000-\\uE080 \\u01E2\\u01E3]& [[:latin:][:mark:]]]";
+
+void TransliteratorRoundTripTest::TestDevanagariLatin() {
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ TransliteratorPointer t1(Transliterator::createInstance("[\\u0964-\\u0965\\u0981-\\u0983\\u0985-\\u098C\\u098F-\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC\\u09BE-\\u09C4\\u09C7-\\u09C8\\u09CB-\\u09CD\\u09D7\\u09DC-\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09FA];NFD;Bengali-InterIndic;InterIndic-Gujarati;NFC;",UTRANS_FORWARD, parseError, status));
+ if((Transliterator *)t1 != NULL){
+ TransliteratorPointer t2(t1->createInverse(status));
+ if(U_FAILURE(status)){
+ errln("FAIL: could not create the Inverse:-( \n");
+ }
+ }else {
+ errln("FAIL: could not create the transliterator. Error: %s\n", u_errorName(status));
+ }
+
+ }
+ RTTest test("Latin-Devanagari");
+ Legal *legal = new LegalIndic();
+ if (isICUVersionAtLeast(ICU_39)) {
+ // We temporarily filter against Unicode 4.1, but we only do this
+ // before version 3.4.
+ errln("FAIL: TestDevanagariLatin needs to be updated to remove delete the [:Age=4.1:] filter ");
+ return;
+ } else {
+ logln("Warning: TestDevanagariLatin needs to be updated to remove delete the section marked [:Age=4.1:] filter");
+ }
+ test.test(UnicodeString(latinForIndic, ""),
+ UnicodeString("[[[:Devanagari:][\\u094d][\\u0964\\u0965]]&[:Age=4.1:]]", ""), "[\\u0965\\u0904]", this, quick,
+ legal, 50);
+
+ delete legal;
+}
+
+/* Defined this way for HP/UX11CC :-( */
+static const int32_t INTER_INDIC_ARRAY_WIDTH = 4;
+static const char * const interIndicArray[] = {
+
+ "BENGALI-DEVANAGARI", "[:BENGALI:]", "[:Devanagari:]",
+ "[\\u0904\\u0951-\\u0954\\u0943-\\u0949\\u094a\\u0962\\u0963\\u090D\\u090e\\u0911\\u0912\\u0929\\u0933\\u0934\\u0935\\u093d\\u0950\\u0958\\u0959\\u095a\\u095b\\u095e\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-BENGALI", "[:Devanagari:]", "[:BENGALI:]",
+ "[\\u0951-\\u0954\\u0951-\\u0954\\u09D7\\u090D\\u090e\\u0911\\u0912\\u0929\\u0933\\u0934\\u0935\\u093d\\u0950\\u0958\\u0959\\u095a\\u095b\\u095e\\u09f0\\u09f1\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "GURMUKHI-DEVANAGARI", "[:GURMUKHI:]", "[:Devanagari:]",
+ "[\\u0904\\u0901\\u0902\\u0936\\u0933\\u0951-\\u0954\\u0902\\u0903\\u0943-\\u0949\\u094a\\u0962\\u0963\\u090B\\u090C\\u090D\\u090e\\u0911\\u0912\\u0934\\u0937\\u093D\\u0950\\u0960\\u0961\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-GURMUKHI", "[:Devanagari:]", "[:GURMUKHI:]",
+ "[\\u0904\\u0A02\\u0946\\u0A5C\\u0951-\\u0954\\u0A70\\u0A71\\u090B\\u090C\\u090D\\u090e\\u0911\\u0912\\u0934\\u0937\\u093D\\u0950\\u0960\\u0961\\u0a72\\u0a73\\u0a74]", /*roundtrip exclusions*/
+
+ "GUJARATI-DEVANAGARI", "[:GUJARATI:]", "[:Devanagari:]",
+ "[\\u0946\\u094A\\u0962\\u0963\\u0951-\\u0954\\u0961\\u090c\\u090e\\u0912\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-GUJARATI", "[:Devanagari:]", "[:GUJARATI:]",
+ "[\\u0951-\\u0954\\u0961\\u090c\\u090e\\u0912]", /*roundtrip exclusions*/
+
+ "ORIYA-DEVANAGARI", "[:ORIYA:]", "[:Devanagari:]",
+ "[\\u0904\\u0943-\\u094a\\u0962\\u0963\\u0951-\\u0954\\u0950\\u090D\\u090e\\u0912\\u0911\\u0931\\u0935\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-ORIYA", "[:Devanagari:]", "[:ORIYA:]",
+ "[\\u0b5f\\u0b56\\u0b57\\u0b70\\u0b71\\u0950\\u090D\\u090e\\u0912\\u0911\\u0931]", /*roundtrip exclusions*/
+
+ "Tamil-DEVANAGARI", "[:tamil:]", "[:Devanagari:]",
+ "[\\u0901\\u0904\\u093c\\u0943-\\u094a\\u0951-\\u0954\\u0962\\u0963\\u090B\\u090C\\u090D\\u0911\\u0916\\u0917\\u0918\\u091B\\u091D\\u0920\\u0921\\u0922\\u0925\\u0926\\u0927\\u092B\\u092C\\u092D\\u0936\\u093d\\u0950[\\u0958-\\u0961]\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-Tamil", "[:Devanagari:]", "[:tamil:]",
+ "[\\u0bd7\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "Telugu-DEVANAGARI", "[:telugu:]", "[:Devanagari:]",
+ "[\\u0904\\u093c\\u0950\\u0945\\u0949\\u0951-\\u0954\\u0962\\u0963\\u090D\\u0911\\u093d\\u0929\\u0934[\\u0958-\\u095f]\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-TELUGU", "[:Devanagari:]", "[:TELUGU:]",
+ "[\\u0c55\\u0c56\\u0950\\u090D\\u0911\\u093d\\u0929\\u0934[\\u0958-\\u095f]]", /*roundtrip exclusions*/
+
+ "KANNADA-DEVANAGARI", "[:KANNADA:]", "[:Devanagari:]",
+ "[\\u0901\\u0904\\u0946\\u093c\\u0950\\u0945\\u0949\\u0951-\\u0954\\u0962\\u0963\\u0950\\u090D\\u0911\\u093d\\u0929\\u0934[\\u0958-\\u095f]\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-KANNADA", "[:Devanagari:]", "[:KANNADA:]",
+ "[{\\u0cb0\\u0cbc}{\\u0cb3\\u0cbc}\\u0cde\\u0cd5\\u0cd6\\u0950\\u090D\\u0911\\u093d\\u0929\\u0934[\\u0958-\\u095f]]", /*roundtrip exclusions*/
+
+ "MALAYALAM-DEVANAGARI", "[:MALAYALAM:]", "[:Devanagari:]",
+ "[\\u0901\\u0904\\u094a\\u094b\\u094c\\u093c\\u0950\\u0944\\u0945\\u0949\\u0951-\\u0954\\u0962\\u0963\\u090D\\u0911\\u093d\\u0929\\u0934[\\u0958-\\u095f]\\u097d]", /*roundtrip exclusions*/
+
+ "DEVANAGARI-MALAYALAM", "[:Devanagari:]", "[:MALAYALAM:]",
+ "[\\u0d4c\\u0d57\\u0950\\u090D\\u0911\\u093d\\u0929\\u0934[\\u0958-\\u095f]]", /*roundtrip exclusions*/
+
+ "GURMUKHI-BENGALI", "[:GURMUKHI:]", "[:BENGALI:]",
+ "[\\u0981\\u0982\\u09b6\\u09e2\\u09e3\\u09c3\\u09c4\\u09d7\\u098B\\u098C\\u09B7\\u09E0\\u09E1\\u09F0\\u09F1\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "BENGALI-GURMUKHI", "[:BENGALI:]", "[:GURMUKHI:]",
+ "[\\u0A02\\u0a5c\\u0a47\\u0a70\\u0a71\\u0A33\\u0A35\\u0A59\\u0A5A\\u0A5B\\u0A5E\\u0A72\\u0A73\\u0A74]", /*roundtrip exclusions*/
+
+ "GUJARATI-BENGALI", "[:GUJARATI:]", "[:BENGALI:]",
+ "[\\u09d7\\u09e2\\u09e3\\u098c\\u09e1\\u09f0\\u09f1\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "BENGALI-GUJARATI", "[:BENGALI:]", "[:GUJARATI:]",
+ "[\\u0A82\\u0a83\\u0Ac9\\u0Ac5\\u0ac7\\u0A8D\\u0A91\\u0AB3\\u0AB5\\u0ABD\\u0AD0]", /*roundtrip exclusions*/
+
+ "ORIYA-BENGALI", "[:ORIYA:]", "[:BENGALI:]",
+ "[\\u09c4\\u09e2\\u09e3\\u09f0\\u09f1\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "BENGALI-ORIYA", "[:BENGALI:]", "[:ORIYA:]",
+ "[\\u0b35\\u0b71\\u0b5f\\u0b56\\u0b33\\u0b3d]", /*roundtrip exclusions*/
+
+ "Tamil-BENGALI", "[:tamil:]", "[:BENGALI:]",
+ "[\\u0981\\u09bc\\u09c3\\u09c4\\u09e2\\u09e3\\u09f0\\u09f1\\u098B\\u098C\\u0996\\u0997\\u0998\\u099B\\u099D\\u09A0\\u09A1\\u09A2\\u09A5\\u09A6\\u09A7\\u09AB\\u09AC\\u09AD\\u09B6\\u09DC\\u09DD\\u09DF\\u09E0\\u09E1\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "BENGALI-Tamil", "[:BENGALI:]", "[:tamil:]",
+ "[\\u0bc6\\u0bc7\\u0bca\\u0B8E\\u0B92\\u0BA9\\u0BB1\\u0BB3\\u0BB4\\u0BB5\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "Telugu-BENGALI", "[:telugu:]", "[:BENGALI:]",
+ "[\\u09e2\\u09e3\\u09bc\\u09d7\\u09f0\\u09f1\\u09dc\\u09dd\\u09df\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "BENGALI-TELUGU", "[:BENGALI:]", "[:TELUGU:]",
+ "[\\u0c55\\u0c56\\u0c47\\u0c46\\u0c4a\\u0C0E\\u0C12\\u0C31\\u0C33\\u0C35]", /*roundtrip exclusions*/
+
+ "KANNADA-BENGALI", "[:KANNADA:]", "[:BENGALI:]",
+ "[\\u0981\\u09e2\\u09e3\\u09bc\\u09d7\\u09dc\\u09dd\\u09df\\u09f0\\u09f1\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "BENGALI-KANNADA", "[:BENGALI:]", "[:KANNADA:]",
+ "[{\\u0cb0\\u0cbc}{\\u0cb3\\u0cbc}\\u0cc6\\u0cca\\u0cd5\\u0cd6\\u0cc7\\u0C8E\\u0C92\\u0CB1\\u0cb3\\u0cb5\\u0cde]", /*roundtrip exclusions*/
+
+ "MALAYALAM-BENGALI", "[:MALAYALAM:]", "[:BENGALI:]",
+ "[\\u0981\\u09e2\\u09e3\\u09bc\\u09c4\\u09f0\\u09f1\\u09dc\\u09dd\\u09df\\u09dc\\u09dd\\u09df\\u09f2-\\u09fa\\u09ce]", /*roundtrip exclusions*/
+
+ "BENGALI-MALAYALAM", "[:BENGALI:]", "[:MALAYALAM:]",
+ "[\\u0d46\\u0d4a\\u0d47\\u0d31-\\u0d35\\u0d0e\\u0d12]", /*roundtrip exclusions*/
+
+ "GUJARATI-GURMUKHI", "[:GUJARATI:]", "[:GURMUKHI:]",
+ "[\\u0A02\\u0ab3\\u0ab6\\u0A70\\u0a71\\u0a82\\u0a83\\u0ac3\\u0ac4\\u0ac5\\u0ac9\\u0a5c\\u0a72\\u0a73\\u0a74\\u0a8b\\u0a8d\\u0a91\\u0abd]", /*roundtrip exclusions*/
+
+ "GURMUKHI-GUJARATI", "[:GURMUKHI:]", "[:GUJARATI:]",
+ "[\\u0a5c\\u0A70\\u0a71\\u0a72\\u0a73\\u0a74\\u0a82\\u0a83\\u0a8b\\u0a8c\\u0a8d\\u0a91\\u0ab3\\u0ab6\\u0ab7\\u0abd\\u0ac3\\u0ac4\\u0ac5\\u0ac9\\u0ad0\\u0ae0\\u0ae1]", /*roundtrip exclusions*/
+
+ "ORIYA-GURMUKHI", "[:ORIYA:]", "[:GURMUKHI:]",
+ "[\\u0A01\\u0A02\\u0a5c\\u0a21\\u0a47\\u0a71\\u0b02\\u0b03\\u0b33\\u0b36\\u0b43\\u0b56\\u0b57\\u0B0B\\u0B0C\\u0B37\\u0B3D\\u0B5F\\u0B60\\u0B61\\u0a35\\u0a72\\u0a73\\u0a74]", /*roundtrip exclusions*/
+
+ "GURMUKHI-ORIYA", "[:GURMUKHI:]", "[:ORIYA:]",
+ "[\\u0b01\\u0b02\\u0b03\\u0b33\\u0b36\\u0b43\\u0b56\\u0b57\\u0B0B\\u0B0C\\u0B37\\u0B3D\\u0B5F\\u0B60\\u0B61\\u0b70\\u0b71]", /*roundtrip exclusions*/
+
+ "TAMIL-GURMUKHI", "[:TAMIL:]", "[:GURMUKHI:]",
+ "[\\u0A01\\u0A02\\u0a33\\u0a36\\u0a3c\\u0a70\\u0a71\\u0a47\\u0A16\\u0A17\\u0A18\\u0A1B\\u0A1D\\u0A20\\u0A21\\u0A22\\u0A25\\u0A26\\u0A27\\u0A2B\\u0A2C\\u0A2D\\u0A59\\u0A5A\\u0A5B\\u0A5C\\u0A5E\\u0A72\\u0A73\\u0A74]", /*roundtrip exclusions*/
+
+ "GURMUKHI-TAMIL", "[:GURMUKHI:]", "[:TAMIL:]",
+ "[\\u0b82\\u0bc6\\u0bca\\u0bd7\\u0bb7\\u0bb3\\u0b83\\u0B8E\\u0B92\\u0BA9\\u0BB1\\u0BB4\\u0bb6\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "TELUGU-GURMUKHI", "[:TELUGU:]", "[:GURMUKHI:]",
+ "[\\u0A02\\u0a33\\u0a36\\u0a3c\\u0a70\\u0a71\\u0A59\\u0A5A\\u0A5B\\u0A5C\\u0A5E\\u0A72\\u0A73\\u0A74]", /*roundtrip exclusions*/
+
+ "GURMUKHI-TELUGU", "[:GURMUKHI:]", "[:TELUGU:]",
+ "[\\u0c01\\u0c02\\u0c03\\u0c33\\u0c36\\u0c44\\u0c43\\u0c46\\u0c4a\\u0c56\\u0c55\\u0C0B\\u0C0C\\u0C0E\\u0C12\\u0C31\\u0C37\\u0C60\\u0C61]", /*roundtrip exclusions*/
+
+ "KANNADA-GURMUKHI", "[:KANNADA:]", "[:GURMUKHI:]",
+ "[\\u0A01\\u0A02\\u0a33\\u0a36\\u0a3c\\u0a70\\u0a71\\u0A59\\u0A5A\\u0A5B\\u0A5C\\u0A5E\\u0A72\\u0A73\\u0A74]", /*roundtrip exclusions*/
+
+ "GURMUKHI-KANNADA", "[:GURMUKHI:]", "[:KANNADA:]",
+ "[{\\u0cb0\\u0cbc}{\\u0cb3\\u0cbc}\\u0c82\\u0c83\\u0cb3\\u0cb6\\u0cc4\\u0cc3\\u0cc6\\u0cca\\u0cd5\\u0cd6\\u0C8B\\u0C8C\\u0C8E\\u0C92\\u0CB1\\u0CB7\\u0cbd\\u0CE0\\u0CE1\\u0cde]", /*roundtrip exclusions*/
+
+ "MALAYALAM-GURMUKHI", "[:MALAYALAM:]", "[:GURMUKHI:]",
+ "[\\u0A01\\u0A02\\u0a4b\\u0a4c\\u0a33\\u0a36\\u0a3c\\u0a70\\u0a71\\u0A59\\u0A5A\\u0A5B\\u0A5C\\u0A5E\\u0A72\\u0A73\\u0A74]", /*roundtrip exclusions*/
+
+ "GURMUKHI-MALAYALAM", "[:GURMUKHI:]", "[:MALAYALAM:]",
+ "[\\u0d02\\u0d03\\u0d33\\u0d36\\u0d43\\u0d46\\u0d4a\\u0d4c\\u0d57\\u0D0B\\u0D0C\\u0D0E\\u0D12\\u0D31\\u0D34\\u0D37\\u0D60\\u0D61]", /*roundtrip exclusions*/
+
+ "GUJARATI-ORIYA", "[:GUJARATI:]", "[:ORIYA:]",
+ "[\\u0b56\\u0b57\\u0B0C\\u0B5F\\u0B61\\u0b70\\u0b71]", /*roundtrip exclusions*/
+
+ "ORIYA-GUJARATI", "[:ORIYA:]", "[:GUJARATI:]",
+ "[\\u0Ac4\\u0Ac5\\u0Ac9\\u0Ac7\\u0A8D\\u0A91\\u0AB5\\u0Ad0]", /*roundtrip exclusions*/
+
+ "TAMIL-GUJARATI", "[:TAMIL:]", "[:GUJARATI:]",
+ "[\\u0A81\\u0a8c\\u0abc\\u0ac3\\u0Ac4\\u0Ac5\\u0Ac9\\u0Ac7\\u0A8B\\u0A8D\\u0A91\\u0A96\\u0A97\\u0A98\\u0A9B\\u0A9D\\u0AA0\\u0AA1\\u0AA2\\u0AA5\\u0AA6\\u0AA7\\u0AAB\\u0AAC\\u0AAD\\u0AB6\\u0ABD\\u0AD0\\u0AE0\\u0AE1]", /*roundtrip exclusions*/
+
+ "GUJARATI-TAMIL", "[:GUJARATI:]", "[:TAMIL:]",
+ "[\\u0Bc6\\u0Bca\\u0Bd7\\u0B8E\\u0B92\\u0BA9\\u0BB1\\u0BB4\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "TELUGU-GUJARATI", "[:TELUGU:]", "[:GUJARATI:]",
+ "[\\u0abc\\u0Ac5\\u0Ac9\\u0A8D\\u0A91\\u0ABD\\u0Ad0]", /*roundtrip exclusions*/
+
+ "GUJARATI-TELUGU", "[:GUJARATI:]", "[:TELUGU:]",
+ "[\\u0c46\\u0c4a\\u0c55\\u0c56\\u0C0C\\u0C0E\\u0C12\\u0C31\\u0C61]", /*roundtrip exclusions*/
+
+ "KANNADA-GUJARATI", "[:KANNADA:]", "[:GUJARATI:]",
+ "[\\u0A81\\u0abc\\u0Ac5\\u0Ac9\\u0A8D\\u0A91\\u0ABD\\u0Ad0]", /*roundtrip exclusions*/
+
+ "GUJARATI-KANNADA", "[:GUJARATI:]", "[:KANNADA:]",
+ "[{\\u0cb0\\u0cbc}{\\u0cb3\\u0cbc}\\u0cc6\\u0cca\\u0cd5\\u0cd6\\u0C8C\\u0C8E\\u0C92\\u0CB1\\u0CDE\\u0CE1]", /*roundtrip exclusions*/
+
+ "MALAYALAM-GUJARATI", "[:MALAYALAM:]", "[:GUJARATI:]",
+ "[\\u0A81\\u0ac4\\u0acb\\u0acc\\u0abc\\u0Ac5\\u0Ac9\\u0A8D\\u0A91\\u0ABD\\u0Ad0]", /*roundtrip exclusions*/
+
+ "GUJARATI-MALAYALAM", "[:GUJARATI:]", "[:MALAYALAM:]",
+ "[\\u0d46\\u0d4a\\u0d4c\\u0d55\\u0d57\\u0D0C\\u0D0E\\u0D12\\u0D31\\u0D34\\u0D61]", /*roundtrip exclusions*/
+
+ "TAMIL-ORIYA", "[:TAMIL:]", "[:ORIYA:]",
+ "[\\u0B01\\u0b3c\\u0b43\\u0b56\\u0B0B\\u0B0C\\u0B16\\u0B17\\u0B18\\u0B1B\\u0B1D\\u0B20\\u0B21\\u0B22\\u0B25\\u0B26\\u0B27\\u0B2B\\u0B2C\\u0B2D\\u0B36\\u0B3D\\u0B5C\\u0B5D\\u0B5F\\u0B60\\u0B61\\u0b70\\u0b71]", /*roundtrip exclusions*/
+
+ "ORIYA-TAMIL", "[:ORIYA:]", "[:TAMIL:]",
+ "[\\u0bc6\\u0bca\\u0bc7\\u0B8E\\u0B92\\u0BA9\\u0BB1\\u0BB4\\u0BB5\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "TELUGU-ORIYA", "[:TELUGU:]", "[:ORIYA:]",
+ "[\\u0b3c\\u0b57\\u0b56\\u0B3D\\u0B5C\\u0B5D\\u0B5F\\u0b70\\u0b71]", /*roundtrip exclusions*/
+
+ "ORIYA-TELUGU", "[:ORIYA:]", "[:TELUGU:]",
+ "[\\u0c44\\u0c46\\u0c4a\\u0c55\\u0c47\\u0C0E\\u0C12\\u0C31\\u0C35]", /*roundtrip exclusions*/
+
+ "KANNADA-ORIYA", "[:KANNADA:]", "[:ORIYA:]",
+ "[\\u0B01\\u0b3c\\u0b57\\u0B3D\\u0B5C\\u0B5D\\u0B5F\\u0b70\\u0b71]", /*roundtrip exclusions*/
+
+ "ORIYA-KANNADA", "[:ORIYA:]", "[:KANNADA:]",
+ "[{\\u0cb0\\u0cbc}{\\u0cb3\\u0cbc}\\u0cc4\\u0cc6\\u0cca\\u0cd5\\u0cc7\\u0C8E\\u0C92\\u0CB1\\u0CB5\\u0CDE]", /*roundtrip exclusions*/
+
+ "MALAYALAM-ORIYA", "[:MALAYALAM:]", "[:ORIYA:]",
+ "[\\u0B01\\u0b3c\\u0b56\\u0B3D\\u0B5C\\u0B5D\\u0B5F\\u0b70\\u0b71]", /*roundtrip exclusions*/
+
+ "ORIYA-MALAYALAM", "[:ORIYA:]", "[:MALAYALAM:]",
+ "[\\u0D47\\u0D46\\u0D4a\\u0D0E\\u0D12\\u0D31\\u0D34\\u0D35]", /*roundtrip exclusions*/
+
+ "TELUGU-TAMIL", "[:TELUGU:]", "[:TAMIL:]",
+ "[\\u0bd7\\u0ba9\\u0bb4\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "TAMIL-TELUGU", "[:TAMIL:]", "[:TELUGU:]",
+ "[\\u0C01\\u0c43\\u0c44\\u0c46\\u0c47\\u0c55\\u0c56\\u0c66\\u0C0B\\u0C0C\\u0C16\\u0C17\\u0C18\\u0C1B\\u0C1D\\u0C20\\u0C21\\u0C22\\u0C25\\u0C26\\u0C27\\u0C2B\\u0C2C\\u0C2D\\u0C36\\u0C60\\u0C61]", /*roundtrip exclusions*/
+
+ "KANNADA-TAMIL", "[:KANNADA:]", "[:TAMIL:]",
+ "[\\u0bd7\\u0bc6\\u0ba9\\u0bb4\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "TAMIL-KANNADA", "[:TAMIL:]", "[:KANNADA:]",
+ "[\\u0cc3\\u0cc4\\u0cc6\\u0cc7\\u0cd5\\u0cd6\\u0C8B\\u0C8C\\u0C96\\u0C97\\u0C98\\u0C9B\\u0C9D\\u0CA0\\u0CA1\\u0CA2\\u0CA5\\u0CA6\\u0CA7\\u0CAB\\u0CAC\\u0CAD\\u0CB6\\u0cbc\\u0cbd\\u0CDE\\u0CE0\\u0CE1]", /*roundtrip exclusions*/
+
+ "MALAYALAM-TAMIL", "[:MALAYALAM:]", "[:TAMIL:]",
+ "[\\u0ba9\\u0BF0\\u0BF1\\u0BF2]", /*roundtrip exclusions*/
+
+ "TAMIL-MALAYALAM", "[:TAMIL:]", "[:MALAYALAM:]",
+ "[\\u0d43\\u0d12\\u0D0B\\u0D0C\\u0D16\\u0D17\\u0D18\\u0D1B\\u0D1D\\u0D20\\u0D21\\u0D22\\u0D25\\u0D26\\u0D27\\u0D2B\\u0D2C\\u0D2D\\u0D36\\u0D60\\u0D61]", /*roundtrip exclusions*/
+
+ "KANNADA-TELUGU", "[:KANNADA:]", "[:TELUGU:]",
+ "[\\u0C01\\u0c3f\\u0c46\\u0c48\\u0c4a]", /*roundtrip exclusions*/
+
+ "TELUGU-KANNADA", "[:TELUGU:]", "[:KANNADA:]",
+ "[\\u0cc8\\u0cd5\\u0cd6\\u0cbc\\u0cbd\\u0CDE]", /*roundtrip exclusions*/
+
+ "MALAYALAM-TELUGU", "[:MALAYALAM:]", "[:TELUGU:]",
+ "[\\u0C01\\u0c44\\u0c4a\\u0c4c\\u0c4b\\u0c55\\u0c56]", /*roundtrip exclusions*/
+
+ "TELUGU-MALAYALAM", "[:TELUGU:]", "[:MALAYALAM:]",
+ "[\\u0d4c\\u0d57\\u0D34]", /*roundtrip exclusions*/
+
+ "MALAYALAM-KANNADA", "[:MALAYALAM:]", "[:KANNADA:]",
+ "[\\u0cbc\\u0cbd\\u0cc4\\u0cc6\\u0cca\\u0ccc\\u0ccb\\u0cd5\\u0cd6\\u0cDe]", /*roundtrip exclusions*/
+
+ "KANNADA-MALAYALAM", "[:KANNADA:]", "[:MALAYALAM:]",
+ "[\\u0d4c\\u0d57\\u0d46\\u0D34]", /*roundtrip exclusions*/
+
+ "Latin-Bengali",latinForIndic, "[[:Bengali:][\\u0964\\u0965]]",
+ "[\\u0965\\u09f0-\\u09fa\\u09ce]" /*roundtrip exclusions*/ ,
+
+ "Latin-Gurmukhi", latinForIndic, "[[:Gurmukhi:][\\u0964\\u0965]]",
+ "[\\u0a01\\u0965\\u0a02\\u0a72\\u0a73\\u0a74]" /*roundtrip exclusions*/,
+
+ "Latin-Gujarati",latinForIndic, "[[:Gujarati:][\\u0964\\u0965]]",
+ "[\\u0965]" /*roundtrip exclusions*/,
+
+ "Latin-Oriya",latinForIndic, "[[:Oriya:][\\u0964\\u0965]]",
+ "[\\u0965\\u0b70]" /*roundtrip exclusions*/,
+
+ "Latin-Tamil",latinForIndic, "[:Tamil:]",
+ "[\\u0BF0\\u0BF1\\u0BF2]" /*roundtrip exclusions*/,
+
+ "Latin-Telugu",latinForIndic, "[:Telugu:]",
+ NULL /*roundtrip exclusions*/,
+
+ "Latin-Kannada",latinForIndic, "[:Kannada:]",
+ NULL /*roundtrip exclusions*/,
+
+ "Latin-Malayalam",latinForIndic, "[:Malayalam:]",
+ NULL /*roundtrip exclusions*/
+};
+
+void TransliteratorRoundTripTest::TestDebug(const char* name,const char fromSet[],
+ const char* toSet,const char* exclusions){
+
+ RTTest test(name);
+ Legal *legal = new LegalIndic();
+ test.test(UnicodeString(fromSet,""),UnicodeString(toSet,""),exclusions,this,quick,legal);
+}
+
+void TransliteratorRoundTripTest::TestInterIndic() {
+ //TestDebug("Latin-Gurmukhi", latinForIndic, "[:Gurmukhi:]","[\\u0965\\u0a02\\u0a72\\u0a73\\u0a74]",TRUE);
+ int32_t num = (int32_t)(sizeof(interIndicArray)/(INTER_INDIC_ARRAY_WIDTH*sizeof(char*)));
+ if(quick){
+ logln("Testing only 5 of %i. Skipping rest (use -e for exhaustive)",num);
+ num = 5;
+ }
+ if (isICUVersionAtLeast(ICU_39)) {
+ // We temporarily filter against Unicode 4.1, but we only do this
+ // before version 3.4.
+ errln("FAIL: TestInterIndic needs to be updated to remove delete the [:Age=4.1:] filter ");
+ return;
+ } else {
+ logln("Warning: TestInterIndic needs to be updated to remove delete the section marked [:Age=4.1:] filter");
+ }
+ for(int i = 0; i < num;i++){
+ RTTest test(interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 0]);
+ Legal *legal = new LegalIndic();
+ logln(UnicodeString("Stress testing ") + interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 0]);
+ /* Uncomment lines below when transliterator is fixed */
+ /*
+ test.test( interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 1],
+ interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 2],
+ interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 3], // roundtrip exclusions
+ this, quick, legal, 50);
+ */
+ /* comment lines below when transliterator is fixed */
+ // start
+ UnicodeString source("[");
+ source.append(interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 1]);
+ source.append(" & [:Age=4.1:]]");
+ UnicodeString target("[");
+ target.append(interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 2]);
+ target.append(" & [:Age=4.1:]]");
+ test.test( source,
+ target,
+ interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 3], // roundtrip exclusions
+ this, quick, legal, 50);
+ // end
+ delete legal;
+ }
+}
+
+// end indic tests ----------------------------------------------------------
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/transrt.h b/Build/source/libs/icu/icu-xetex/test/intltest/transrt.h
new file mode 100644
index 00000000000..196ad7d97b1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/transrt.h
@@ -0,0 +1,49 @@
+/*
+**********************************************************************
+* Copyright (C) 2001-2004, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 05/23/00 aliu Creation.
+**********************************************************************
+*/
+#ifndef TRANSRT_H
+#define TRANSRT_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "intltest.h"
+
+/**
+ * @test
+ * @summary Round trip test of Transliterator
+ */
+class TransliteratorRoundTripTest : public IntlTest {
+
+ void runIndexedTest(int32_t index, UBool exec, const char* &name,
+ char* par=NULL);
+
+ void TestKana(void);
+ void TestHiragana(void);
+ void TestKatakana(void);
+ void TestJamo(void);
+ void TestHangul(void);
+ void TestHan(void);
+ void TestGreek(void);
+ void TestGreekUNGEGN(void);
+ void Testel(void);
+ void TestCyrillic(void);
+ void TestDevanagariLatin(void);
+ void TestInterIndic(void);
+ void TestHebrew(void);
+ void TestArabic(void);
+ void TestDebug(const char* name,const char fromSet[],
+ const char* toSet,const char* exclusions);
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/transtst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/transtst.cpp
new file mode 100644
index 00000000000..9b9ef81a6b0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/transtst.cpp
@@ -0,0 +1,4652 @@
+/*
+**********************************************************************
+* Copyright (C) 1999-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 11/10/99 aliu Creation.
+**********************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "transtst.h"
+#include "unicode/locid.h"
+#include "unicode/dtfmtsym.h"
+#include "unicode/normlzr.h"
+#include "unicode/translit.h"
+#include "unicode/uchar.h"
+#include "unicode/unifilt.h"
+#include "unicode/uniset.h"
+#include "unicode/ustring.h"
+#include "unicode/usetiter.h"
+#include "unicode/uscript.h"
+#include "cpdtrans.h"
+#include "nultrans.h"
+#include "rbt.h"
+#include "rbt_pars.h"
+#include "anytrans.h"
+#include "esctrn.h"
+#include "name2uni.h"
+#include "nortrans.h"
+#include "remtrans.h"
+#include "titletrn.h"
+#include "tolowtrn.h"
+#include "toupptrn.h"
+#include "unesctrn.h"
+#include "uni2name.h"
+#include "cstring.h"
+#include "cmemory.h"
+#include <stdio.h>
+
+/***********************************************************************
+
+ HOW TO USE THIS TEST FILE
+ -or-
+ How I developed on two platforms
+ without losing (too much of) my mind
+
+
+1. Add new tests by copying/pasting/changing existing tests. On Java,
+ any public void method named Test...() taking no parameters becomes
+ a test. On C++, you need to modify the header and add a line to
+ the runIndexedTest() dispatch method.
+
+2. Make liberal use of the expect() method; it is your friend.
+
+3. The tests in this file exactly match those in a sister file on the
+ other side. The two files are:
+
+ icu4j: src/com/ibm/test/translit/TransliteratorTest.java
+ icu4c: source/test/intltest/transtst.cpp
+
+ ==> THIS IS THE IMPORTANT PART <==
+
+ When you add a test in this file, add it in TransliteratorTest.java
+ too. Give it the same name and put it in the same relative place.
+ This makes maintenance a lot simpler for any poor soul who ends up
+ trying to synchronize the tests between icu4j and icu4c.
+
+4. If you MUST enter a test that is NOT paralleled in the sister file,
+ then add it in the special non-mirrored section. These are
+ labeled
+
+ "icu4j ONLY"
+
+ or
+
+ "icu4c ONLY"
+
+ Make sure you document the reason the test is here and not there.
+
+
+Thank you.
+The Management
+***********************************************************************/
+
+// Define character constants thusly to be EBCDIC-friendly
+enum {
+ LEFT_BRACE=((UChar)0x007B), /*{*/
+ PIPE =((UChar)0x007C), /*|*/
+ ZERO =((UChar)0x0030), /*0*/
+ UPPER_A =((UChar)0x0041) /*A*/
+};
+
+TransliteratorTest::TransliteratorTest()
+: DESERET_DEE((UChar32)0x10414),
+ DESERET_dee((UChar32)0x1043C)
+{
+}
+
+TransliteratorTest::~TransliteratorTest() {}
+
+void
+TransliteratorTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,TestInstantiation);
+ TESTCASE(1,TestSimpleRules);
+ TESTCASE(2,TestRuleBasedInverse);
+ TESTCASE(3,TestKeyboard);
+ TESTCASE(4,TestKeyboard2);
+ TESTCASE(5,TestKeyboard3);
+ TESTCASE(6,TestArabic);
+ TESTCASE(7,TestCompoundKana);
+ TESTCASE(8,TestCompoundHex);
+ TESTCASE(9,TestFiltering);
+ TESTCASE(10,TestInlineSet);
+ TESTCASE(11,TestPatternQuoting);
+ TESTCASE(12,TestJ277);
+ TESTCASE(13,TestJ243);
+ TESTCASE(14,TestJ329);
+ TESTCASE(15,TestSegments);
+ TESTCASE(16,TestCursorOffset);
+ TESTCASE(17,TestArbitraryVariableValues);
+ TESTCASE(18,TestPositionHandling);
+ TESTCASE(19,TestHiraganaKatakana);
+ TESTCASE(20,TestCopyJ476);
+ TESTCASE(21,TestAnchors);
+ TESTCASE(22,TestInterIndic);
+ TESTCASE(23,TestFilterIDs);
+ TESTCASE(24,TestCaseMap);
+ TESTCASE(25,TestNameMap);
+ TESTCASE(26,TestLiberalizedID);
+ TESTCASE(27,TestCreateInstance);
+ TESTCASE(28,TestNormalizationTransliterator);
+ TESTCASE(29,TestCompoundRBT);
+ TESTCASE(30,TestCompoundFilter);
+ TESTCASE(31,TestRemove);
+ TESTCASE(32,TestToRules);
+ TESTCASE(33,TestContext);
+ TESTCASE(34,TestSupplemental);
+ TESTCASE(35,TestQuantifier);
+ TESTCASE(36,TestSTV);
+ TESTCASE(37,TestCompoundInverse);
+ TESTCASE(38,TestNFDChainRBT);
+ TESTCASE(39,TestNullInverse);
+ TESTCASE(40,TestAliasInverseID);
+ TESTCASE(41,TestCompoundInverseID);
+ TESTCASE(42,TestUndefinedVariable);
+ TESTCASE(43,TestEmptyContext);
+ TESTCASE(44,TestCompoundFilterID);
+ TESTCASE(45,TestPropertySet);
+ TESTCASE(46,TestNewEngine);
+ TESTCASE(47,TestQuantifiedSegment);
+ TESTCASE(48,TestDevanagariLatinRT);
+ TESTCASE(49,TestTeluguLatinRT);
+ TESTCASE(50,TestCompoundLatinRT);
+ TESTCASE(51,TestSanskritLatinRT);
+ TESTCASE(52,TestLocaleInstantiation);
+ TESTCASE(53,TestTitleAccents);
+ TESTCASE(54,TestLocaleResource);
+ TESTCASE(55,TestParseError);
+ TESTCASE(56,TestOutputSet);
+ TESTCASE(57,TestVariableRange);
+ TESTCASE(58,TestInvalidPostContext);
+ TESTCASE(59,TestIDForms);
+ TESTCASE(60,TestToRulesMark);
+ TESTCASE(61,TestEscape);
+ TESTCASE(62,TestAnchorMasking);
+ TESTCASE(63,TestDisplayName);
+ TESTCASE(64,TestSpecialCases);
+ TESTCASE(65,TestIncrementalProgress);
+ TESTCASE(66,TestSurrogateCasing);
+ TESTCASE(67,TestFunction);
+ TESTCASE(68,TestInvalidBackRef);
+ TESTCASE(69,TestMulticharStringSet);
+ TESTCASE(70,TestUserFunction);
+ TESTCASE(71,TestAnyX);
+ TESTCASE(72,TestSourceTargetSet);
+ TESTCASE(73,TestGurmukhiDevanagari);
+ TESTCASE(74,TestRuleWhitespace);
+ TESTCASE(75,TestAllCodepoints);
+ TESTCASE(76,TestBoilerplate);
+ TESTCASE(77,TestAlternateSyntax);
+ TESTCASE(78,TestBeginEnd);
+ TESTCASE(79,TestBeginEndToRules);
+ TESTCASE(80,TestRegisterAlias);
+ TESTCASE(81,TestRuleStripping);
+ default: name = ""; break;
+ }
+}
+
+static const UVersionInfo ICU_39 = {3,9,0,0};
+/**
+ * Make sure every system transliterator can be instantiated.
+ *
+ * ALSO test that the result of toRules() for each rule is a valid
+ * rule. Do this here so we don't have to have another test that
+ * instantiates everything as well.
+ */
+void TransliteratorTest::TestInstantiation() {
+ UErrorCode ec = U_ZERO_ERROR;
+ StringEnumeration* avail = Transliterator::getAvailableIDs(ec);
+ assertSuccess("getAvailableIDs()", ec);
+ assertTrue("getAvailableIDs()!=NULL", avail!=NULL);
+ int32_t n = Transliterator::countAvailableIDs();
+ assertTrue("getAvailableIDs().count()==countAvailableIDs()",
+ avail->count(ec) == n);
+ assertSuccess("count()", ec);
+ UnicodeString name;
+ for (int32_t i=0; i<n; ++i) {
+ const UnicodeString& id = *avail->snext(ec);
+ if (!assertSuccess("snext()", ec) ||
+ !assertTrue("snext()!=NULL", (&id)!=NULL, TRUE)) {
+ break;
+ }
+ UnicodeString id2 = Transliterator::getAvailableID(i);
+ if (id.length() < 1) {
+ errln(UnicodeString("FAIL: getAvailableID(") +
+ i + ") returned empty string");
+ continue;
+ }
+ if (id != id2) {
+ errln(UnicodeString("FAIL: getAvailableID(") +
+ i + ") != getAvailableIDs().snext()");
+ continue;
+ }
+ if(id2.indexOf("Thai")>-1 && !isICUVersionAtLeast(ICU_39)){
+ /* The Thai-Latin transliterator doesn't exist in ICU4C yet */
+ continue;
+ }
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* t = Transliterator::createInstance(id,
+ UTRANS_FORWARD, parseError,status);
+ name.truncate(0);
+ Transliterator::getDisplayName(id, name);
+ if (t == 0) {
+ errln(UnicodeString("FAIL: Couldn't create ") + id +
+ /*", parse error " + parseError.code +*/
+ ", line " + parseError.line +
+ ", offset " + parseError.offset +
+ ", pre-context " + prettify(parseError.preContext, TRUE) +
+ ", post-context " +prettify(parseError.postContext,TRUE) +
+ ", Error: " + u_errorName(status));
+ // When createInstance fails, it deletes the failing
+ // entry from the available ID list. We detect this
+ // here by looking for a change in countAvailableIDs.
+ int32_t nn = Transliterator::countAvailableIDs();
+ if (nn == (n - 1)) {
+ n = nn;
+ --i; // Compensate for deleted entry
+ }
+ } else {
+ logln(UnicodeString("OK: ") + name + " (" + id + ")");
+
+ // Now test toRules
+ UnicodeString rules;
+ t->toRules(rules, TRUE);
+ Transliterator *u = Transliterator::createFromRules("x",
+ rules, UTRANS_FORWARD, parseError,status);
+ if (u == 0) {
+ errln(UnicodeString("FAIL: ") + id +
+ ".createFromRules() => bad rules" +
+ /*", parse error " + parseError.code +*/
+ ", line " + parseError.line +
+ ", offset " + parseError.offset +
+ ", context " + prettify(parseError.preContext, TRUE) +
+ ", rules: " + prettify(rules, TRUE));
+ } else {
+ delete u;
+ }
+ delete t;
+ }
+ }
+ assertTrue("snext()==NULL", avail->snext(ec)==NULL);
+ assertSuccess("snext()", ec);
+ delete avail;
+
+ // Now test the failure path
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString id("<Not a valid Transliterator ID>");
+ Transliterator* t = Transliterator::createInstance(id, UTRANS_FORWARD, parseError, status);
+ if (t != 0) {
+ errln("FAIL: " + id + " returned a transliterator");
+ delete t;
+ } else {
+ logln("OK: Bogus ID handled properly");
+ }
+}
+
+void TransliteratorTest::TestSimpleRules(void) {
+ /* Example: rules 1. ab>x|y
+ * 2. yc>z
+ *
+ * []|eabcd start - no match, copy e to tranlated buffer
+ * [e]|abcd match rule 1 - copy output & adjust cursor
+ * [ex|y]cd match rule 2 - copy output & adjust cursor
+ * [exz]|d no match, copy d to transliterated buffer
+ * [exzd]| done
+ */
+ expect(UnicodeString("ab>x|y;", "") +
+ "yc>z",
+ "eabcd", "exzd");
+
+ /* Another set of rules:
+ * 1. ab>x|yzacw
+ * 2. za>q
+ * 3. qc>r
+ * 4. cw>n
+ *
+ * []|ab Rule 1
+ * [x|yzacw] No match
+ * [xy|zacw] Rule 2
+ * [xyq|cw] Rule 4
+ * [xyqn]| Done
+ */
+ expect(UnicodeString("ab>x|yzacw;") +
+ "za>q;" +
+ "qc>r;" +
+ "cw>n",
+ "ab", "xyqn");
+
+ /* Test categories
+ */
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator *t = Transliterator::createFromRules(
+ "<ID>",
+ UnicodeString("$dummy=").append((UChar)0xE100) +
+ UnicodeString(";"
+ "$vowel=[aeiouAEIOU];"
+ "$lu=[:Lu:];"
+ "$vowel } $lu > '!';"
+ "$vowel > '&';"
+ "'!' { $lu > '^';"
+ "$lu > '*';"
+ "a > ERROR", ""),
+ UTRANS_FORWARD, parseError,
+ status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor failed");
+ return;
+ }
+ expect(*t, "abcdefgABCDEFGU", "&bcd&fg!^**!^*&");
+ delete t;
+}
+
+/**
+ * Test inline set syntax and set variable syntax.
+ */
+void TransliteratorTest::TestInlineSet(void) {
+ expect("{ [:Ll:] } x > y; [:Ll:] > z;", "aAbxq", "zAyzz");
+ expect("a[0-9]b > qrs", "1a7b9", "1qrs9");
+
+ expect(UnicodeString(
+ "$digit = [0-9];"
+ "$alpha = [a-zA-Z];"
+ "$alphanumeric = [$digit $alpha];" // ***
+ "$special = [^$alphanumeric];" // ***
+ "$alphanumeric > '-';"
+ "$special > '*';", ""),
+
+ "thx-1138", "---*----");
+}
+
+/**
+ * Create some inverses and confirm that they work. We have to be
+ * careful how we do this, since the inverses will not be true
+ * inverses -- we can't throw any random string at the composition
+ * of the transliterators and expect the identity function. F x
+ * F' != I. However, if we are careful about the input, we will
+ * get the expected results.
+ */
+void TransliteratorTest::TestRuleBasedInverse(void) {
+ UnicodeString RULES =
+ UnicodeString("abc>zyx;") +
+ "ab>yz;" +
+ "bc>zx;" +
+ "ca>xy;" +
+ "a>x;" +
+ "b>y;" +
+ "c>z;" +
+
+ "abc<zyx;" +
+ "ab<yz;" +
+ "bc<zx;" +
+ "ca<xy;" +
+ "a<x;" +
+ "b<y;" +
+ "c<z;" +
+
+ "";
+
+ const char* DATA[] = {
+ // Careful here -- random strings will not work. If we keep
+ // the left side to the domain and the right side to the range
+ // we will be okay though (left, abc; right xyz).
+ "a", "x",
+ "abcacab", "zyxxxyy",
+ "caccb", "xyzzy",
+ };
+
+ int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator *fwd = Transliterator::createFromRules("<ID>", RULES,
+ UTRANS_FORWARD, parseError, status);
+ Transliterator *rev = Transliterator::createFromRules("<ID>", RULES,
+ UTRANS_REVERSE, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor failed");
+ return;
+ }
+ for (int32_t i=0; i<DATA_length; i+=2) {
+ expect(*fwd, DATA[i], DATA[i+1]);
+ expect(*rev, DATA[i+1], DATA[i]);
+ }
+ delete fwd;
+ delete rev;
+}
+
+/**
+ * Basic test of keyboard.
+ */
+void TransliteratorTest::TestKeyboard(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("<ID>",
+ UnicodeString("psch>Y;")
+ +"ps>y;"
+ +"ch>x;"
+ +"a>A;",
+ UTRANS_FORWARD, parseError,
+ status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor failed");
+ return;
+ }
+ const char* DATA[] = {
+ // insertion, buffer
+ "a", "A",
+ "p", "Ap",
+ "s", "Aps",
+ "c", "Apsc",
+ "a", "AycA",
+ "psch", "AycAY",
+ 0, "AycAY", // null means finishKeyboardTransliteration
+ };
+
+ keyboardAux(*t, DATA, (int32_t)(sizeof(DATA)/sizeof(DATA[0])));
+ delete t;
+}
+
+/**
+ * Basic test of keyboard with cursor.
+ */
+void TransliteratorTest::TestKeyboard2(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("<ID>",
+ UnicodeString("ych>Y;")
+ +"ps>|y;"
+ +"ch>x;"
+ +"a>A;",
+ UTRANS_FORWARD, parseError,
+ status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor failed");
+ return;
+ }
+ const char* DATA[] = {
+ // insertion, buffer
+ "a", "A",
+ "p", "Ap",
+ "s", "Aps", // modified for rollback - "Ay",
+ "c", "Apsc", // modified for rollback - "Ayc",
+ "a", "AycA",
+ "p", "AycAp",
+ "s", "AycAps", // modified for rollback - "AycAy",
+ "c", "AycApsc", // modified for rollback - "AycAyc",
+ "h", "AycAY",
+ 0, "AycAY", // null means finishKeyboardTransliteration
+ };
+
+ keyboardAux(*t, DATA, (int32_t)(sizeof(DATA)/sizeof(DATA[0])));
+ delete t;
+}
+
+/**
+ * Test keyboard transliteration with back-replacement.
+ */
+void TransliteratorTest::TestKeyboard3(void) {
+ // We want th>z but t>y. Furthermore, during keyboard
+ // transliteration we want t>y then yh>z if t, then h are
+ // typed.
+ UnicodeString RULES("t>|y;"
+ "yh>z;");
+
+ const char* DATA[] = {
+ // Column 1: characters to add to buffer (as if typed)
+ // Column 2: expected appearance of buffer after
+ // keyboard xliteration.
+ "a", "a",
+ "b", "ab",
+ "t", "abt", // modified for rollback - "aby",
+ "c", "abyc",
+ "t", "abyct", // modified for rollback - "abycy",
+ "h", "abycz",
+ 0, "abycz", // null means finishKeyboardTransliteration
+ };
+
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("<ID>", RULES, UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor failed");
+ return;
+ }
+ keyboardAux(*t, DATA, (int32_t)(sizeof(DATA)/sizeof(DATA[0])));
+ delete t;
+}
+
+void TransliteratorTest::keyboardAux(const Transliterator& t,
+ const char* DATA[], int32_t DATA_length) {
+ UErrorCode status = U_ZERO_ERROR;
+ UTransPosition index={0, 0, 0, 0};
+ UnicodeString s;
+ for (int32_t i=0; i<DATA_length; i+=2) {
+ UnicodeString log;
+ if (DATA[i] != 0) {
+ log = s + " + "
+ + DATA[i]
+ + " -> ";
+ t.transliterate(s, index, DATA[i], status);
+ } else {
+ log = s + " => ";
+ t.finishTransliteration(s, index);
+ }
+ // Show the start index '{' and the cursor '|'
+ UnicodeString a, b, c;
+ s.extractBetween(0, index.contextStart, a);
+ s.extractBetween(index.contextStart, index.start, b);
+ s.extractBetween(index.start, s.length(), c);
+ log.append(a).
+ append((UChar)LEFT_BRACE).
+ append(b).
+ append((UChar)PIPE).
+ append(c);
+ if (s == DATA[i+1] && U_SUCCESS(status)) {
+ logln(log);
+ } else {
+ errln(UnicodeString("FAIL: ") + log + ", expected " + DATA[i+1]);
+ }
+ }
+}
+
+void TransliteratorTest::TestArabic(void) {
+// Test disabled for 2.0 until new Arabic transliterator can be written.
+// /*
+// const char* DATA[] = {
+// "Arabic", "\u062a\u062a\u0645\u062a\u0639\u0020"+
+// "\u0627\u0644\u0644\u063a\u0629\u0020"+
+// "\u0627\u0644\u0639\u0631\u0628\u0628\u064a\u0629\u0020"+
+// "\u0628\u0628\u0646\u0638\u0645\u0020"+
+// "\u0643\u062a\u0627\u0628\u0628\u064a\u0629\u0020"+
+// "\u062c\u0645\u064a\u0644\u0629",
+// };
+// */
+//
+// UChar ar_raw[] = {
+// 0x062a, 0x062a, 0x0645, 0x062a, 0x0639, 0x0020, 0x0627,
+// 0x0644, 0x0644, 0x063a, 0x0629, 0x0020, 0x0627, 0x0644,
+// 0x0639, 0x0631, 0x0628, 0x0628, 0x064a, 0x0629, 0x0020,
+// 0x0628, 0x0628, 0x0646, 0x0638, 0x0645, 0x0020, 0x0643,
+// 0x062a, 0x0627, 0x0628, 0x0628, 0x064a, 0x0629, 0x0020,
+// 0x062c, 0x0645, 0x064a, 0x0644, 0x0629, 0
+// };
+// UnicodeString ar(ar_raw);
+// UErrorCode status=U_ZERO_ERROR;
+// UParseError parseError;
+// Transliterator *t = Transliterator::createInstance("Latin-Arabic", UTRANS_FORWARD, parseError, status);
+// if (t == 0) {
+// errln("FAIL: createInstance failed");
+// return;
+// }
+// expect(*t, "Arabic", ar);
+// delete t;
+}
+
+/**
+ * Compose the Kana transliterator forward and reverse and try
+ * some strings that should come out unchanged.
+ */
+void TransliteratorTest::TestCompoundKana(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* t = Transliterator::createInstance("Latin-Hiragana;Hiragana-Latin", UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: construction of Latin-Hiragana;Hiragana-Latin failed");
+ } else {
+ expect(*t, "aaaaa", "aaaaa");
+ delete t;
+ }
+}
+
+/**
+ * Compose the hex transliterators forward and reverse.
+ */
+void TransliteratorTest::TestCompoundHex(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* a = Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ Transliterator* b = Transliterator::createInstance("Hex-Any", UTRANS_FORWARD, parseError, status);
+ Transliterator* transab[] = { a, b };
+ Transliterator* transba[] = { b, a };
+ if (a == 0 || b == 0) {
+ errln("FAIL: construction failed");
+ delete a;
+ delete b;
+ return;
+ }
+ // Do some basic tests of a
+ expect(*a, "01", UnicodeString("\\u0030\\u0031", ""));
+ // Do some basic tests of b
+ expect(*b, UnicodeString("\\u0030\\u0031", ""), "01");
+
+ Transliterator* ab = new CompoundTransliterator(transab, 2);
+ UnicodeString s("abcde", "");
+ expect(*ab, s, s);
+
+ UnicodeString str(s);
+ a->transliterate(str);
+ Transliterator* ba = new CompoundTransliterator(transba, 2);
+ expect(*ba, str, str);
+
+ delete ab;
+ delete ba;
+ delete a;
+ delete b;
+}
+
+int gTestFilterClassID = 0;
+/**
+ * Used by TestFiltering().
+ */
+class TestFilter : public UnicodeFilter {
+ virtual UnicodeFunctor* clone() const {
+ return new TestFilter(*this);
+ }
+ virtual UBool contains(UChar32 c) const {
+ return c != (UChar)0x0063 /*c*/;
+ }
+ // Stubs
+ virtual UnicodeString& toPattern(UnicodeString& result,
+ UBool /*escapeUnprintable*/) const {
+ return result;
+ }
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ return FALSE;
+ }
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+public:
+ UClassID getDynamicClassID() const { return (UClassID)&gTestFilterClassID; }
+};
+
+/**
+ * Do some basic tests of filtering.
+ */
+void TransliteratorTest::TestFiltering(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* hex = Transliterator::createInstance("Any-Hex", UTRANS_FORWARD, parseError, status);
+ if (hex == 0) {
+ errln("FAIL: createInstance(Any-Hex) failed");
+ return;
+ }
+ hex->adoptFilter(new TestFilter());
+ UnicodeString s("abcde");
+ hex->transliterate(s);
+ UnicodeString exp("\\u0061\\u0062c\\u0064\\u0065", "");
+ if (s == exp) {
+ logln(UnicodeString("Ok: \"") + exp + "\"");
+ } else {
+ logln(UnicodeString("FAIL: \"") + s + "\", wanted \"" + exp + "\"");
+ }
+
+ // ICU4C ONLY. Do not find Transliterator.orphanFilter() in ICU4J.
+ UnicodeFilter *f = hex->orphanFilter();
+ if (f == NULL){
+ errln("FAIL: orphanFilter() should get a UnicodeFilter");
+ } else {
+ delete f;
+ }
+ delete hex;
+}
+
+/**
+ * Test anchors
+ */
+void TransliteratorTest::TestAnchors(void) {
+ expect(UnicodeString("^a > 0; a$ > 2 ; a > 1;", ""),
+ "aaa",
+ "012");
+ expect(UnicodeString("$s=[z$]; $s{a>0; a}$s>2; a>1;", ""),
+ "aaa",
+ "012");
+ expect(UnicodeString("^ab > 01 ;"
+ " ab > |8 ;"
+ " b > k ;"
+ " 8x$ > 45 ;"
+ " 8x > 77 ;", ""),
+
+ "ababbabxabx",
+ "018k7745");
+ expect(UnicodeString("$s = [z$] ;"
+ "$s{ab > 01 ;"
+ " ab > |8 ;"
+ " b > k ;"
+ " 8x}$s > 45 ;"
+ " 8x > 77 ;", ""),
+
+ "abzababbabxzabxabx",
+ "01z018k45z01x45");
+}
+
+/**
+ * Test pattern quoting and escape mechanisms.
+ */
+void TransliteratorTest::TestPatternQuoting(void) {
+ // Array of 3n items
+ // Each item is <rules>, <input>, <expected output>
+ const UnicodeString DATA[] = {
+ UnicodeString(UChar(0x4E01)) + ">'[male adult]'",
+ UnicodeString(UChar(0x4E01)),
+ "[male adult]"
+ };
+
+ for (int32_t i=0; i<3; i+=3) {
+ logln(UnicodeString("Pattern: ") + prettify(DATA[i]));
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("<ID>", DATA[i], UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("RBT constructor failed");
+ } else {
+ expect(*t, DATA[i+1], DATA[i+2]);
+ }
+ delete t;
+ }
+}
+
+/**
+ * Regression test for bugs found in Greek transliteration.
+ */
+void TransliteratorTest::TestJ277(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator *gl = Transliterator::createInstance("Greek-Latin; NFD; [:M:]Remove; NFC", UTRANS_FORWARD, parseError, status);
+ if (gl == NULL) {
+ errln("FAIL: createInstance(Greek-Latin) returned NULL");
+ return;
+ }
+
+ UChar sigma = 0x3C3;
+ UChar upsilon = 0x3C5;
+ UChar nu = 0x3BD;
+// UChar PHI = 0x3A6;
+ UChar alpha = 0x3B1;
+// UChar omega = 0x3C9;
+// UChar omicron = 0x3BF;
+// UChar epsilon = 0x3B5;
+
+ // sigma upsilon nu -> syn
+ UnicodeString syn;
+ syn.append(sigma).append(upsilon).append(nu);
+ expect(*gl, syn, "syn");
+
+ // sigma alpha upsilon nu -> saun
+ UnicodeString sayn;
+ sayn.append(sigma).append(alpha).append(upsilon).append(nu);
+ expect(*gl, sayn, "saun");
+
+ // Again, using a smaller rule set
+ UnicodeString rules(
+ "$alpha = \\u03B1;"
+ "$nu = \\u03BD;"
+ "$sigma = \\u03C3;"
+ "$ypsilon = \\u03C5;"
+ "$vowel = [aeiouAEIOU$alpha$ypsilon];"
+ "s <> $sigma;"
+ "a <> $alpha;"
+ "u <> $vowel { $ypsilon;"
+ "y <> $ypsilon;"
+ "n <> $nu;",
+ "");
+ Transliterator *mini = Transliterator::createFromRules("mini", rules, UTRANS_REVERSE, parseError, status);
+ if (U_FAILURE(status)) { errln("FAIL: Transliterator constructor failed"); return; }
+ expect(*mini, syn, "syn");
+ expect(*mini, sayn, "saun");
+ delete mini;
+ mini = NULL;
+
+#if !UCONFIG_NO_FORMATTING
+ // Transliterate the Greek locale data
+ Locale el("el");
+ DateFormatSymbols syms(el, status);
+ if (U_FAILURE(status)) { errln("FAIL: Transliterator constructor failed"); return; }
+ int32_t i, count;
+ const UnicodeString* data = syms.getMonths(count);
+ for (i=0; i<count; ++i) {
+ if (data[i].length() == 0) {
+ continue;
+ }
+ UnicodeString out(data[i]);
+ gl->transliterate(out);
+ UBool ok = TRUE;
+ if (data[i].length() >= 2 && out.length() >= 2 &&
+ u_isupper(data[i].charAt(0)) && u_islower(data[i].charAt(1))) {
+ if (!(u_isupper(out.charAt(0)) && u_islower(out.charAt(1)))) {
+ ok = FALSE;
+ }
+ }
+ if (ok) {
+ logln(prettify(data[i] + " -> " + out));
+ } else {
+ errln(UnicodeString("FAIL: ") + prettify(data[i] + " -> " + out));
+ }
+ }
+#endif
+
+ delete gl;
+}
+
+/**
+ * Prefix, suffix support in hex transliterators
+ */
+void TransliteratorTest::TestJ243(void) {
+ UErrorCode ec = U_ZERO_ERROR;
+
+ // Test default Hex-Any, which should handle
+ // \u, \U, u+, and U+
+ Transliterator *hex =
+ Transliterator::createInstance("Hex-Any", UTRANS_FORWARD, ec);
+ if (assertSuccess("getInstance", ec)) {
+ expect(*hex, UnicodeString("\\u0041+\\U00000042,U+0043uU+0044z", ""), "A+B,CuDz");
+ }
+ delete hex;
+
+// // Try a custom Hex-Unicode
+// // \uXXXX and &#xXXXX;
+// ec = U_ZERO_ERROR;
+// HexToUnicodeTransliterator hex2(UnicodeString("\\\\u###0;&\\#x###0\\;", ""), ec);
+// expect(hex2, UnicodeString("\\u61\\u062\\u0063\\u00645\\u66x&#x30;&#x031;&#x0032;&#x00033;", ""),
+// "abcd5fx012&#x00033;");
+// // Try custom Any-Hex (default is tested elsewhere)
+// ec = U_ZERO_ERROR;
+// UnicodeToHexTransliterator hex3(UnicodeString("&\\#x###0;", ""), ec);
+// expect(hex3, "012", "&#x30;&#x31;&#x32;");
+}
+
+/**
+ * Parsers need better syntax error messages.
+ */
+void TransliteratorTest::TestJ329(void) {
+
+ struct { UBool containsErrors; const char* rule; } DATA[] = {
+ { FALSE, "a > b; c > d" },
+ { TRUE, "a > b; no operator; c > d" },
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ for (int32_t i=0; i<DATA_length; ++i) {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator *rbt = Transliterator::createFromRules("<ID>",
+ DATA[i].rule,
+ UTRANS_FORWARD,
+ parseError,
+ status);
+ UBool gotError = U_FAILURE(status);
+ UnicodeString desc(DATA[i].rule);
+ desc.append(gotError ? " -> error" : " -> no error");
+ if (gotError) {
+ desc = desc + ", ParseError code=" + u_errorName(status) +
+ " line=" + parseError.line +
+ " offset=" + parseError.offset +
+ " context=" + parseError.preContext;
+ }
+ if (gotError == DATA[i].containsErrors) {
+ logln(UnicodeString("Ok: ") + desc);
+ } else {
+ errln(UnicodeString("FAIL: ") + desc);
+ }
+ delete rbt;
+ }
+}
+
+/**
+ * Test segments and segment references.
+ */
+void TransliteratorTest::TestSegments(void) {
+ // Array of 3n items
+ // Each item is <rules>, <input>, <expected output>
+ UnicodeString DATA[] = {
+ "([a-z]) '.' ([0-9]) > $2 '-' $1",
+ "abc.123.xyz.456",
+ "ab1-c23.xy4-z56",
+
+ // nested
+ "(([a-z])([0-9])) > $1 '.' $2 '.' $3;",
+ "a1 b2",
+ "a1.a.1 b2.b.2",
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA)/sizeof(*DATA));
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ logln("Pattern: " + prettify(DATA[i]));
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("ID", DATA[i], UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor");
+ } else {
+ expect(*t, DATA[i+1], DATA[i+2]);
+ }
+ delete t;
+ }
+}
+
+/**
+ * Test cursor positioning outside of the key
+ */
+void TransliteratorTest::TestCursorOffset(void) {
+ // Array of 3n items
+ // Each item is <rules>, <input>, <expected output>
+ UnicodeString DATA[] = {
+ "pre {alpha} post > | @ ALPHA ;"
+ "eALPHA > beta ;"
+ "pre {beta} post > BETA @@ | ;"
+ "post > xyz",
+
+ "prealphapost prebetapost",
+
+ "prbetaxyz preBETApost",
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA)/sizeof(*DATA));
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ logln("Pattern: " + prettify(DATA[i]));
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("<ID>", DATA[i], UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor");
+ } else {
+ expect(*t, DATA[i+1], DATA[i+2]);
+ }
+ delete t;
+ }
+}
+
+/**
+ * Test zero length and > 1 char length variable values. Test
+ * use of variable refs in UnicodeSets.
+ */
+void TransliteratorTest::TestArbitraryVariableValues(void) {
+ // Array of 3n items
+ // Each item is <rules>, <input>, <expected output>
+ UnicodeString DATA[] = {
+ "$abe = ab;"
+ "$pat = x[yY]z;"
+ "$ll = 'a-z';"
+ "$llZ = [$ll];"
+ "$llY = [$ll$pat];"
+ "$emp = ;"
+
+ "$abe > ABE;"
+ "$pat > END;"
+ "$llZ > 1;"
+ "$llY > 2;"
+ "7$emp 8 > 9;"
+ "",
+
+ "ab xYzxyz stY78",
+ "ABE ENDEND 1129",
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA)/sizeof(*DATA));
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ logln("Pattern: " + prettify(DATA[i]));
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("<ID>", DATA[i], UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor");
+ } else {
+ expect(*t, DATA[i+1], DATA[i+2]);
+ }
+ delete t;
+ }
+}
+
+/**
+ * Confirm that the contextStart, contextLimit, start, and limit
+ * behave correctly. J474.
+ */
+void TransliteratorTest::TestPositionHandling(void) {
+ // Array of 3n items
+ // Each item is <rules>, <input>, <expected output>
+ const char* DATA[] = {
+ "a{t} > SS ; {t}b > UU ; {t} > TT ;",
+ "xtat txtb", // pos 0,9,0,9
+ "xTTaSS TTxUUb",
+
+ "a{t} > SS ; {t}b > UU ; {t} > TT ; a > A ; b > B ;",
+ "xtat txtb", // pos 2,9,3,8
+ "xtaSS TTxUUb",
+
+ "a{t} > SS ; {t}b > UU ; {t} > TT ; a > A ; b > B ;",
+ "xtat txtb", // pos 3,8,3,8
+ "xtaTT TTxTTb",
+ };
+
+ // Array of 4n positions -- these go with the DATA array
+ // They are: contextStart, contextLimit, start, limit
+ int32_t POS[] = {
+ 0, 9, 0, 9,
+ 2, 9, 3, 8,
+ 3, 8, 3, 8,
+ };
+
+ int32_t n = (int32_t)(sizeof(DATA) / sizeof(DATA[0])) / 3;
+ for (int32_t i=0; i<n; i++) {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator *t = Transliterator::createFromRules("<ID>",
+ DATA[3*i], UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ delete t;
+ errln("FAIL: RBT constructor");
+ return;
+ }
+ UTransPosition pos;
+ pos.contextStart= POS[4*i];
+ pos.contextLimit = POS[4*i+1];
+ pos.start = POS[4*i+2];
+ pos.limit = POS[4*i+3];
+ UnicodeString rsource(DATA[3*i+1]);
+ t->transliterate(rsource, pos, status);
+ if (U_FAILURE(status)) {
+ delete t;
+ errln("FAIL: transliterate");
+ return;
+ }
+ t->finishTransliteration(rsource, pos);
+ expectAux(DATA[3*i],
+ DATA[3*i+1],
+ rsource,
+ DATA[3*i+2]);
+ delete t;
+ }
+}
+
+/**
+ * Test the Hiragana-Katakana transliterator.
+ */
+void TransliteratorTest::TestHiraganaKatakana(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* hk = Transliterator::createInstance("Hiragana-Katakana", UTRANS_FORWARD, parseError, status);
+ Transliterator* kh = Transliterator::createInstance("Katakana-Hiragana", UTRANS_FORWARD, parseError, status);
+ if (hk == 0 || kh == 0) {
+ errln("FAIL: createInstance failed");
+ delete hk;
+ delete kh;
+ return;
+ }
+
+ // Array of 3n items
+ // Each item is "hk"|"kh"|"both", <Hiragana>, <Katakana>
+ const char* DATA[] = {
+ "both",
+ "\\u3042\\u3090\\u3099\\u3092\\u3050",
+ "\\u30A2\\u30F8\\u30F2\\u30B0",
+
+ "kh",
+ "\\u307C\\u3051\\u3060\\u3042\\u3093\\u30FC",
+ "\\u30DC\\u30F6\\u30C0\\u30FC\\u30F3\\u30FC",
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ UnicodeString h = CharsToUnicodeString(DATA[i+1]);
+ UnicodeString k = CharsToUnicodeString(DATA[i+2]);
+ switch (*DATA[i]) {
+ case 0x68: //'h': // Hiragana-Katakana
+ expect(*hk, h, k);
+ break;
+ case 0x6B: //'k': // Katakana-Hiragana
+ expect(*kh, k, h);
+ break;
+ case 0x62: //'b': // both
+ expect(*hk, h, k);
+ expect(*kh, k, h);
+ break;
+ }
+ }
+ delete hk;
+ delete kh;
+}
+
+/**
+ * Test cloning / copy constructor of RBT.
+ */
+void TransliteratorTest::TestCopyJ476(void) {
+ // The real test here is what happens when the destructors are
+ // called. So we let one object get destructed, and check to
+ // see that its copy still works.
+ Transliterator *t2 = 0;
+ {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t1 = Transliterator::createFromRules("t1",
+ "a>A;b>B;'foo'+>'bar'", UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: RBT constructor");
+ return;
+ }
+ t2 = t1->clone(); // Call copy constructor under the covers.
+ expect(*t1, "abcfoofoo", "ABcbar");
+ delete t1;
+ }
+ expect(*t2, "abcfoofoo", "ABcbar");
+ delete t2;
+}
+
+/**
+ * Test inter-Indic transliterators. These are composed.
+ * ICU4C Jitterbug 483.
+ */
+void TransliteratorTest::TestInterIndic(void) {
+ UnicodeString ID("Devanagari-Gujarati", "");
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator* dg = Transliterator::createInstance(ID, UTRANS_FORWARD, parseError, status);
+ if (dg == 0) {
+ errln("FAIL: createInstance(" + ID + ") returned NULL");
+ return;
+ }
+ UnicodeString id = dg->getID();
+ if (id != ID) {
+ errln("FAIL: createInstance(" + ID + ")->getID() => " + id);
+ }
+ UnicodeString dev = CharsToUnicodeString("\\u0901\\u090B\\u0925");
+ UnicodeString guj = CharsToUnicodeString("\\u0A81\\u0A8B\\u0AA5");
+ expect(*dg, dev, guj);
+ delete dg;
+}
+
+/**
+ * Test filter syntax in IDs. (J918)
+ */
+void TransliteratorTest::TestFilterIDs(void) {
+ // Array of 3n strings:
+ // <id>, <inverse id>, <input>, <expected output>
+ const char* DATA[] = {
+ "[aeiou]Any-Hex", // ID
+ "[aeiou]Hex-Any", // expected inverse ID
+ "quizzical", // src
+ "q\\u0075\\u0069zz\\u0069c\\u0061l", // expected ID.translit(src)
+
+ "[aeiou]Any-Hex;[^5]Hex-Any",
+ "[^5]Any-Hex;[aeiou]Hex-Any",
+ "quizzical",
+ "q\\u0075izzical",
+
+ "[abc]Null",
+ "[abc]Null",
+ "xyz",
+ "xyz",
+ };
+ enum { DATA_length = sizeof(DATA) / sizeof(DATA[0]) };
+
+ for (int i=0; i<DATA_length; i+=4) {
+ UnicodeString ID(DATA[i], "");
+ UnicodeString uID(DATA[i+1], "");
+ UnicodeString data2(DATA[i+2], "");
+ UnicodeString data3(DATA[i+3], "");
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance(ID, UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createInstance(" + ID + ") returned NULL");
+ return;
+ }
+ expect(*t, data2, data3);
+
+ // Check the ID
+ if (ID != t->getID()) {
+ errln("FAIL: createInstance(" + ID + ").getID() => " +
+ t->getID());
+ }
+
+ // Check the inverse
+ Transliterator *u = t->createInverse(status);
+ if (u == 0) {
+ errln("FAIL: " + ID + ".createInverse() returned NULL");
+ } else if (u->getID() != uID) {
+ errln("FAIL: " + ID + ".createInverse().getID() => " +
+ u->getID() + ", expected " + uID);
+ }
+
+ delete t;
+ delete u;
+ }
+}
+
+/**
+ * Test the case mapping transliterators.
+ */
+void TransliteratorTest::TestCaseMap(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* toUpper =
+ Transliterator::createInstance("Any-Upper[^xyzXYZ]", UTRANS_FORWARD, parseError, status);
+ Transliterator* toLower =
+ Transliterator::createInstance("Any-Lower[^xyzXYZ]", UTRANS_FORWARD, parseError, status);
+ Transliterator* toTitle =
+ Transliterator::createInstance("Any-Title[^xyzXYZ]", UTRANS_FORWARD, parseError, status);
+ if (toUpper==0 || toLower==0 || toTitle==0) {
+ errln("FAIL: createInstance returned NULL");
+ delete toUpper;
+ delete toLower;
+ delete toTitle;
+ return;
+ }
+
+ expect(*toUpper, "The quick brown fox jumped over the lazy dogs.",
+ "THE QUICK BROWN FOx JUMPED OVER THE LAzy DOGS.");
+ expect(*toLower, "The quIck brown fOX jUMPED OVER THE LAzY dogs.",
+ "the quick brown foX jumped over the lazY dogs.");
+ expect(*toTitle, "the quick brown foX can't jump over the laZy dogs.",
+ "The Quick Brown FoX Can't Jump Over The LaZy Dogs.");
+
+ delete toUpper;
+ delete toLower;
+ delete toTitle;
+}
+
+/**
+ * Test the name mapping transliterators.
+ */
+void TransliteratorTest::TestNameMap(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* uni2name =
+ Transliterator::createInstance("Any-Name[^abc]", UTRANS_FORWARD, parseError, status);
+ Transliterator* name2uni =
+ Transliterator::createInstance("Name-Any", UTRANS_FORWARD, parseError, status);
+ if (uni2name==0 || name2uni==0) {
+ errln("FAIL: createInstance returned NULL");
+ delete uni2name;
+ delete name2uni;
+ return;
+ }
+
+ // Careful: CharsToUS will convert "\\N" => "N"; use "\\\\N" for \N
+ expect(*uni2name, CharsToUnicodeString("\\u00A0abc\\u4E01\\u00B5\\u0A81\\uFFFD\\u0004\\u0009\\u0081\\uFFFF"),
+ CharsToUnicodeString("\\\\N{NO-BREAK SPACE}abc\\\\N{CJK UNIFIED IDEOGRAPH-4E01}\\\\N{MICRO SIGN}\\\\N{GUJARATI SIGN CANDRABINDU}\\\\N{REPLACEMENT CHARACTER}\\\\N{END OF TRANSMISSION}\\\\N{CHARACTER TABULATION}\\\\N{<control-0081>}\\\\N{<noncharacter-FFFF>}"));
+ expect(*name2uni, "{\\N { NO-BREAK SPACE}abc\\N{ CJK UNIFIED IDEOGRAPH-4E01 }\\N{x\\N{MICRO SIGN}\\N{GUJARATI SIGN CANDRABINDU}\\N{REPLACEMENT CHARACTER}\\N{END OF TRANSMISSION}\\N{CHARACTER TABULATION}\\N{<control-0081>}\\N{<noncharacter-FFFF>}\\N{<control-0004>}\\N{",
+ CharsToUnicodeString("{\\u00A0abc\\u4E01\\\\N{x\\u00B5\\u0A81\\uFFFD\\u0004\\u0009\\u0081\\uFFFF\\u0004\\\\N{"));
+
+ delete uni2name;
+ delete name2uni;
+
+ // round trip
+ Transliterator* t =
+ Transliterator::createInstance("Any-Name;Name-Any", UTRANS_FORWARD, parseError, status);
+ if (t==0) {
+ errln("FAIL: createInstance returned NULL");
+ delete t;
+ return;
+ }
+
+ // Careful: CharsToUS will convert "\\N" => "N"; use "\\\\N" for \N
+ UnicodeString s = CharsToUnicodeString("{\\u00A0abc\\u4E01\\\\N{x\\u00B5\\u0A81\\uFFFD\\u0004\\u0009\\u0081\\uFFFF\\u0004\\\\N{");
+ expect(*t, s, s);
+ delete t;
+}
+
+/**
+ * Test liberalized ID syntax. 1006c
+ */
+void TransliteratorTest::TestLiberalizedID(void) {
+ // Some test cases have an expected getID() value of NULL. This
+ // means I have disabled the test case for now. This stuff is
+ // still under development, and I haven't decided whether to make
+ // getID() return canonical case yet. It will all get rewritten
+ // with the move to Source-Target/Variant IDs anyway. [aliu]
+ const char* DATA[] = {
+ "latin-greek", NULL /*"Latin-Greek"*/, "case insensitivity",
+ " Null ", "Null", "whitespace",
+ " Latin[a-z]-Greek ", "[a-z]Latin-Greek", "inline filter",
+ " null ; latin-greek ", NULL /*"Null;Latin-Greek"*/, "compound whitespace",
+ };
+ const int32_t DATA_length = sizeof(DATA)/sizeof(DATA[0]);
+ UParseError parseError;
+ UErrorCode status= U_ZERO_ERROR;
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ Transliterator *t = Transliterator::createInstance(DATA[i], UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln(UnicodeString("FAIL: ") + DATA[i+2] +
+ " cannot create ID \"" + DATA[i] + "\"");
+ } else {
+ UnicodeString exp;
+ if (DATA[i+1]) {
+ exp = UnicodeString(DATA[i+1], "");
+ }
+ // Don't worry about getID() if the expected char*
+ // is NULL -- see above.
+ if (exp.length() == 0 || exp == t->getID()) {
+ logln(UnicodeString("Ok: ") + DATA[i+2] +
+ " create ID \"" + DATA[i] + "\" => \"" +
+ exp + "\"");
+ } else {
+ errln(UnicodeString("FAIL: ") + DATA[i+2] +
+ " create ID \"" + DATA[i] + "\" => \"" +
+ t->getID() + "\", exp \"" + exp + "\"");
+ }
+ delete t;
+ }
+ }
+}
+
+/* test for Jitterbug 912 */
+void TransliteratorTest::TestCreateInstance(){
+ const char* FORWARD = "F";
+ const char* REVERSE = "R";
+ const char* DATA[] = {
+ // Column 1: id
+ // Column 2: direction
+ // Column 3: expected ID, or "" if expect failure
+ "Latin-Hangul", REVERSE, "Hangul-Latin", // JB#912
+
+ // JB#2689: bad compound causes crash
+ "InvalidSource-InvalidTarget", FORWARD, "",
+ "InvalidSource-InvalidTarget", REVERSE, "",
+ "Hex-Any;InvalidSource-InvalidTarget", FORWARD, "",
+ "Hex-Any;InvalidSource-InvalidTarget", REVERSE, "",
+ "InvalidSource-InvalidTarget;Hex-Any", FORWARD, "",
+ "InvalidSource-InvalidTarget;Hex-Any", REVERSE, "",
+
+ NULL
+ };
+
+ for (int32_t i=0; DATA[i]; i+=3) {
+ UParseError err;
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeString id(DATA[i]);
+ UTransDirection dir = (DATA[i+1]==FORWARD)?
+ UTRANS_FORWARD:UTRANS_REVERSE;
+ UnicodeString expID(DATA[i+2]);
+ Transliterator* t =
+ Transliterator::createInstance(id,dir,err,ec);
+ UnicodeString newID;
+ if (t) {
+ newID = t->getID();
+ }
+ UBool ok = (newID == expID);
+ if (!t) {
+ newID = u_errorName(ec);
+ }
+ if (ok) {
+ logln((UnicodeString)"Ok: createInstance(" +
+ id + "," + DATA[i+1] + ") => " + newID);
+ } else {
+ errln((UnicodeString)"FAIL: createInstance(" +
+ id + "," + DATA[i+1] + ") => " + newID +
+ ", expected " + expID);
+ }
+ delete t;
+ }
+}
+
+/**
+ * Test the normalization transliterator.
+ */
+void TransliteratorTest::TestNormalizationTransliterator() {
+ // THE FOLLOWING TWO TABLES ARE COPIED FROM com.ibm.test.normalizer.BasicTest
+ // PLEASE KEEP THEM IN SYNC WITH BasicTest.
+ const char* CANON[] = {
+ // Input Decomposed Composed
+ "cat", "cat", "cat" ,
+ "\\u00e0ardvark", "a\\u0300ardvark", "\\u00e0ardvark" ,
+
+ "\\u1e0a", "D\\u0307", "\\u1e0a" , // D-dot_above
+ "D\\u0307", "D\\u0307", "\\u1e0a" , // D dot_above
+
+ "\\u1e0c\\u0307", "D\\u0323\\u0307", "\\u1e0c\\u0307" , // D-dot_below dot_above
+ "\\u1e0a\\u0323", "D\\u0323\\u0307", "\\u1e0c\\u0307" , // D-dot_above dot_below
+ "D\\u0307\\u0323", "D\\u0323\\u0307", "\\u1e0c\\u0307" , // D dot_below dot_above
+
+ "\\u1e10\\u0307\\u0323", "D\\u0327\\u0323\\u0307","\\u1e10\\u0323\\u0307", // D dot_below cedilla dot_above
+ "D\\u0307\\u0328\\u0323","D\\u0328\\u0323\\u0307","\\u1e0c\\u0328\\u0307", // D dot_above ogonek dot_below
+
+ "\\u1E14", "E\\u0304\\u0300", "\\u1E14" , // E-macron-grave
+ "\\u0112\\u0300", "E\\u0304\\u0300", "\\u1E14" , // E-macron + grave
+ "\\u00c8\\u0304", "E\\u0300\\u0304", "\\u00c8\\u0304" , // E-grave + macron
+
+ "\\u212b", "A\\u030a", "\\u00c5" , // angstrom_sign
+ "\\u00c5", "A\\u030a", "\\u00c5" , // A-ring
+
+ "\\u00fdffin", "y\\u0301ffin", "\\u00fdffin" , //updated with 3.0
+ "\\u00fd\\uFB03n", "y\\u0301\\uFB03n", "\\u00fd\\uFB03n" , //updated with 3.0
+
+ "Henry IV", "Henry IV", "Henry IV" ,
+ "Henry \\u2163", "Henry \\u2163", "Henry \\u2163" ,
+
+ "\\u30AC", "\\u30AB\\u3099", "\\u30AC" , // ga (Katakana)
+ "\\u30AB\\u3099", "\\u30AB\\u3099", "\\u30AC" , // ka + ten
+ "\\uFF76\\uFF9E", "\\uFF76\\uFF9E", "\\uFF76\\uFF9E" , // hw_ka + hw_ten
+ "\\u30AB\\uFF9E", "\\u30AB\\uFF9E", "\\u30AB\\uFF9E" , // ka + hw_ten
+ "\\uFF76\\u3099", "\\uFF76\\u3099", "\\uFF76\\u3099" , // hw_ka + ten
+
+ "A\\u0300\\u0316", "A\\u0316\\u0300", "\\u00C0\\u0316" ,
+ 0 // end
+ };
+
+ const char* COMPAT[] = {
+ // Input Decomposed Composed
+ "\\uFB4f", "\\u05D0\\u05DC", "\\u05D0\\u05DC" , // Alef-Lamed vs. Alef, Lamed
+
+ "\\u00fdffin", "y\\u0301ffin", "\\u00fdffin" , //updated for 3.0
+ "\\u00fd\\uFB03n", "y\\u0301ffin", "\\u00fdffin" , // ffi ligature -> f + f + i
+
+ "Henry IV", "Henry IV", "Henry IV" ,
+ "Henry \\u2163", "Henry IV", "Henry IV" ,
+
+ "\\u30AC", "\\u30AB\\u3099", "\\u30AC" , // ga (Katakana)
+ "\\u30AB\\u3099", "\\u30AB\\u3099", "\\u30AC" , // ka + ten
+
+ "\\uFF76\\u3099", "\\u30AB\\u3099", "\\u30AC" , // hw_ka + ten
+ 0 // end
+ };
+
+ int32_t i;
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* NFD = Transliterator::createInstance("NFD", UTRANS_FORWARD, parseError, status);
+ Transliterator* NFC = Transliterator::createInstance("NFC", UTRANS_FORWARD, parseError, status);
+ if (!NFD || !NFC) {
+ errln("FAIL: createInstance failed");
+ delete NFD;
+ delete NFC;
+ return;
+ }
+ for (i=0; CANON[i]; i+=3) {
+ UnicodeString in = CharsToUnicodeString(CANON[i]);
+ UnicodeString expd = CharsToUnicodeString(CANON[i+1]);
+ UnicodeString expc = CharsToUnicodeString(CANON[i+2]);
+ expect(*NFD, in, expd);
+ expect(*NFC, in, expc);
+ }
+ delete NFD;
+ delete NFC;
+
+ Transliterator* NFKD = Transliterator::createInstance("NFKD", UTRANS_FORWARD, parseError, status);
+ Transliterator* NFKC = Transliterator::createInstance("NFKC", UTRANS_FORWARD, parseError, status);
+ if (!NFKD || !NFKC) {
+ errln("FAIL: createInstance failed");
+ delete NFKD;
+ delete NFKC;
+ return;
+ }
+ for (i=0; COMPAT[i]; i+=3) {
+ UnicodeString in = CharsToUnicodeString(COMPAT[i]);
+ UnicodeString expkd = CharsToUnicodeString(COMPAT[i+1]);
+ UnicodeString expkc = CharsToUnicodeString(COMPAT[i+2]);
+ expect(*NFKD, in, expkd);
+ expect(*NFKC, in, expkc);
+ }
+ delete NFKD;
+ delete NFKC;
+
+ UParseError pe;
+ status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance("NFD; [x]Remove",
+ UTRANS_FORWARD,
+ pe, status);
+ if (t == 0) {
+ errln("FAIL: createInstance failed");
+ }
+ expect(*t, CharsToUnicodeString("\\u010dx"),
+ CharsToUnicodeString("c\\u030C"));
+ delete t;
+}
+
+/**
+ * Test compound RBT rules.
+ */
+void TransliteratorTest::TestCompoundRBT(void) {
+ // Careful with spacing and ';' here: Phrase this exactly
+ // as toRules() is going to return it. If toRules() changes
+ // with regard to spacing or ';', then adjust this string.
+ UnicodeString rule("::Hex-Any;\n"
+ "::Any-Lower;\n"
+ "a > '.A.';\n"
+ "b > '.B.';\n"
+ "::[^t]Any-Upper;", "");
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("Test", rule, UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createFromRules failed");
+ return;
+ }
+ expect(*t, "\\u0043at in the hat, bat on the mat",
+ "C.A.t IN tHE H.A.t, .B..A.t ON tHE M.A.t");
+ UnicodeString r;
+ t->toRules(r, TRUE);
+ if (r == rule) {
+ logln((UnicodeString)"OK: toRules() => " + r);
+ } else {
+ errln((UnicodeString)"FAIL: toRules() => " + r +
+ ", expected " + rule);
+ }
+ delete t;
+
+ // Now test toRules
+ t = Transliterator::createInstance("Greek-Latin; Latin-Cyrillic", UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ UnicodeString exp("::Greek-Latin;\n::Latin-Cyrillic;");
+ t->toRules(r, TRUE);
+ if (r != exp) {
+ errln((UnicodeString)"FAIL: toRules() => " + r +
+ ", expected " + exp);
+ } else {
+ logln((UnicodeString)"OK: toRules() => " + r);
+ }
+ delete t;
+
+ // Round trip the result of toRules
+ t = Transliterator::createFromRules("Test", r, UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createFromRules #2 failed");
+ return;
+ } else {
+ logln((UnicodeString)"OK: createFromRules(" + r + ") succeeded");
+ }
+
+ // Test toRules again
+ t->toRules(r, TRUE);
+ if (r != exp) {
+ errln((UnicodeString)"FAIL: toRules() => " + r +
+ ", expected " + exp);
+ } else {
+ logln((UnicodeString)"OK: toRules() => " + r);
+ }
+
+ delete t;
+
+ // Test Foo(Bar) IDs. Careful with spacing in id; make it conform
+ // to what the regenerated ID will look like.
+ UnicodeString id("Upper(Lower);(NFKC)", "");
+ t = Transliterator::createInstance(id, UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createInstance #2 failed");
+ return;
+ }
+ if (t->getID() == id) {
+ logln((UnicodeString)"OK: created " + id);
+ } else {
+ errln((UnicodeString)"FAIL: createInstance(" + id +
+ ").getID() => " + t->getID());
+ }
+
+ Transliterator *u = t->createInverse(status);
+ if (u == 0) {
+ errln("FAIL: createInverse failed");
+ delete t;
+ return;
+ }
+ exp = "NFKC();Lower(Upper)";
+ if (u->getID() == exp) {
+ logln((UnicodeString)"OK: createInverse(" + id + ") => " +
+ u->getID());
+ } else {
+ errln((UnicodeString)"FAIL: createInverse(" + id + ") => " +
+ u->getID());
+ }
+ delete t;
+ delete u;
+}
+
+/**
+ * Compound filter semantics were orginially not implemented
+ * correctly. Originally, each component filter f(i) is replaced by
+ * f'(i) = f(i) && g, where g is the filter for the compound
+ * transliterator.
+ *
+ * From Mark:
+ *
+ * Suppose and I have a transliterator X. Internally X is
+ * "Greek-Latin; Latin-Cyrillic; Any-Lower". I use a filter [^A].
+ *
+ * The compound should convert all greek characters (through latin) to
+ * cyrillic, then lowercase the result. The filter should say "don't
+ * touch 'A' in the original". But because an intermediate result
+ * happens to go through "A", the Greek Alpha gets hung up.
+ */
+void TransliteratorTest::TestCompoundFilter(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance
+ ("Greek-Latin; Latin-Greek; Lower", UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+ t->adoptFilter(new UnicodeSet("[^A]", status));
+ if (U_FAILURE(status)) {
+ errln("FAIL: UnicodeSet ct failed");
+ delete t;
+ return;
+ }
+
+ // Only the 'A' at index 1 should remain unchanged
+ expect(*t,
+ CharsToUnicodeString("BA\\u039A\\u0391"),
+ CharsToUnicodeString("\\u03b2A\\u03ba\\u03b1"));
+ delete t;
+}
+
+void TransliteratorTest::TestRemove(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance("Remove[abc]", UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createInstance failed");
+ return;
+ }
+
+ expect(*t, "Able bodied baker's cats", "Ale odied ker's ts");
+
+ // extra test for RemoveTransliterator::clone(), which at one point wasn't
+ // duplicating the filter
+ Transliterator* t2 = t->clone();
+ expect(*t2, "Able bodied baker's cats", "Ale odied ker's ts");
+
+ delete t;
+ delete t2;
+}
+
+void TransliteratorTest::TestToRules(void) {
+ const char* RBT = "rbt";
+ const char* SET = "set";
+ static const char* DATA[] = {
+ RBT,
+ "$a=\\u4E61; [$a] > A;",
+ "[\\u4E61] > A;",
+
+ RBT,
+ "$white=[[:Zs:][:Zl:]]; $white{a} > A;",
+ "[[:Zs:][:Zl:]]{a} > A;",
+
+ SET,
+ "[[:Zs:][:Zl:]]",
+ "[[:Zs:][:Zl:]]",
+
+ SET,
+ "[:Ps:]",
+ "[:Ps:]",
+
+ SET,
+ "[:L:]",
+ "[:L:]",
+
+ SET,
+ "[[:L:]-[A]]",
+ "[[:L:]-[A]]",
+
+ SET,
+ "[~[:Lu:][:Ll:]]",
+ "[~[:Lu:][:Ll:]]",
+
+ SET,
+ "[~[a-z]]",
+ "[~[a-z]]",
+
+ RBT,
+ "$white=[:Zs:]; $black=[^$white]; $black{a} > A;",
+ "[^[:Zs:]]{a} > A;",
+
+ RBT,
+ "$a=[:Zs:]; $b=[[a-z]-$a]; $b{a} > A;",
+ "[[a-z]-[:Zs:]]{a} > A;",
+
+ RBT,
+ "$a=[:Zs:]; $b=[$a&[a-z]]; $b{a} > A;",
+ "[[:Zs:]&[a-z]]{a} > A;",
+
+ RBT,
+ "$a=[:Zs:]; $b=[x$a]; $b{a} > A;",
+ "[x[:Zs:]]{a} > A;",
+
+ RBT,
+ "$accentMinus = [ [\\u0300-\\u0345] & [:M:] - [\\u0338]] ;"
+ "$macron = \\u0304 ;"
+ "$evowel = [aeiouyAEIOUY] ;"
+ "$iotasub = \\u0345 ;"
+ "($evowel $macron $accentMinus *) i > | $1 $iotasub ;",
+ "([AEIOUYaeiouy]\\u0304[[\\u0300-\\u0345]&[:M:]-[\\u0338]]*)i > | $1 \\u0345;",
+
+ RBT,
+ "([AEIOUYaeiouy]\\u0304[[:M:]-[\\u0304\\u0345]]*)i > | $1 \\u0345;",
+ "([AEIOUYaeiouy]\\u0304[[:M:]-[\\u0304\\u0345]]*)i > | $1 \\u0345;",
+ };
+ static const int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ for (int32_t d=0; d < DATA_length; d+=3) {
+ if (DATA[d] == RBT) {
+ // Transliterator test
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("ID",
+ DATA[d+1], UTRANS_FORWARD, parseError, status);
+ if (t == 0) {
+ errln("FAIL: createFromRules failed");
+ return;
+ }
+ UnicodeString rules, escapedRules;
+ t->toRules(rules, FALSE);
+ t->toRules(escapedRules, TRUE);
+ UnicodeString expRules = CharsToUnicodeString(DATA[d+2]);
+ UnicodeString expEscapedRules(DATA[d+2]);
+ if (rules == expRules) {
+ logln((UnicodeString)"Ok: " + DATA[d+1] +
+ " => " + rules);
+ } else {
+ errln((UnicodeString)"FAIL: " + DATA[d+1] +
+ " => " + rules + ", exp " + expRules);
+ }
+ if (escapedRules == expEscapedRules) {
+ logln((UnicodeString)"Ok: " + DATA[d+1] +
+ " => " + escapedRules);
+ } else {
+ errln((UnicodeString)"FAIL: " + DATA[d+1] +
+ " => " + escapedRules + ", exp " + expEscapedRules);
+ }
+ delete t;
+
+ } else {
+ // UnicodeSet test
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString pat(DATA[d+1]);
+ UnicodeString expToPat(DATA[d+2]);
+ UnicodeSet set(pat, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: UnicodeSet ct failed");
+ return;
+ }
+ // Adjust spacing etc. as necessary.
+ UnicodeString toPat;
+ set.toPattern(toPat);
+ if (expToPat == toPat) {
+ logln((UnicodeString)"Ok: " + pat +
+ " => " + toPat);
+ } else {
+ errln((UnicodeString)"FAIL: " + pat +
+ " => " + prettify(toPat, TRUE) +
+ ", exp " + prettify(pat, TRUE));
+ }
+ }
+ }
+}
+
+void TransliteratorTest::TestContext() {
+ UTransPosition pos = {0, 2, 0, 1}; // cs cl s l
+ expect("de > x; {d}e > y;",
+ "de",
+ "ye",
+ &pos);
+
+ expect("ab{c} > z;",
+ "xadabdabcy",
+ "xadabdabzy");
+}
+
+void TransliteratorTest::TestSupplemental() {
+
+ expect(CharsToUnicodeString("$a=\\U00010300; $s=[\\U00010300-\\U00010323];"
+ "a > $a; $s > i;"),
+ CharsToUnicodeString("ab\\U0001030Fx"),
+ CharsToUnicodeString("\\U00010300bix"));
+
+ expect(CharsToUnicodeString("$a=[a-z\\U00010300-\\U00010323];"
+ "$b=[A-Z\\U00010400-\\U0001044D];"
+ "($a)($b) > $2 $1;"),
+ CharsToUnicodeString("aB\\U00010300\\U00010400c\\U00010401\\U00010301D"),
+ CharsToUnicodeString("Ba\\U00010400\\U00010300\\U00010401cD\\U00010301"));
+
+ // k|ax\\U00010300xm
+
+ // k|a\\U00010400\\U00010300xm
+ // ky|\\U00010400\\U00010300xm
+ // ky\\U00010400|\\U00010300xm
+
+ // ky\\U00010400|\\U00010300\\U00010400m
+ // ky\\U00010400y|\\U00010400m
+ expect(CharsToUnicodeString("$a=[a\\U00010300-\\U00010323];"
+ "$a {x} > | @ \\U00010400;"
+ "{$a} [^\\u0000-\\uFFFF] > y;"),
+ CharsToUnicodeString("kax\\U00010300xm"),
+ CharsToUnicodeString("ky\\U00010400y\\U00010400m"));
+
+ expectT("Any-Name",
+ CharsToUnicodeString("\\U00010330\\U000E0061\\u00A0"),
+ "\\N{GOTHIC LETTER AHSA}\\N{TAG LATIN SMALL LETTER A}\\N{NO-BREAK SPACE}");
+
+ expectT("Any-Hex/Unicode",
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\U000E0061\\u00A0"),
+ "U+10330U+10FF00U+E0061U+00A0");
+
+ expectT("Any-Hex/C",
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\U000E0061\\u00A0"),
+ "\\U00010330\\U0010FF00\\U000E0061\\u00A0");
+
+ expectT("Any-Hex/Perl",
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\U000E0061\\u00A0"),
+ "\\x{10330}\\x{10FF00}\\x{E0061}\\x{A0}");
+
+ expectT("Any-Hex/Java",
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\U000E0061\\u00A0"),
+ "\\uD800\\uDF30\\uDBFF\\uDF00\\uDB40\\uDC61\\u00A0");
+
+ expectT("Any-Hex/XML",
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\U000E0061\\u00A0"),
+ "&#x10330;&#x10FF00;&#xE0061;&#xA0;");
+
+ expectT("Any-Hex/XML10",
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\U000E0061\\u00A0"),
+ "&#66352;&#1113856;&#917601;&#160;");
+
+ expectT("[\\U000E0000-\\U000E0FFF] Remove",
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\U000E0061\\u00A0"),
+ CharsToUnicodeString("\\U00010330\\U0010FF00\\u00A0"));
+}
+
+void TransliteratorTest::TestQuantifier() {
+
+ // Make sure @ in a quantified anteContext works
+ expect("a+ {b} > | @@ c; A > a; (a+ c) > '(' $1 ')';",
+ "AAAAAb",
+ "aaa(aac)");
+
+ // Make sure @ in a quantified postContext works
+ expect("{b} a+ > c @@ |; (a+) > '(' $1 ')';",
+ "baaaaa",
+ "caa(aaa)");
+
+ // Make sure @ in a quantified postContext with seg ref works
+ expect("{(b)} a+ > $1 @@ |; (a+) > '(' $1 ')';",
+ "baaaaa",
+ "baa(aaa)");
+
+ // Make sure @ past ante context doesn't enter ante context
+ UTransPosition pos = {0, 5, 3, 5};
+ expect("a+ {b} > | @@ c; x > y; (a+ c) > '(' $1 ')';",
+ "xxxab",
+ "xxx(ac)",
+ &pos);
+
+ // Make sure @ past post context doesn't pass limit
+ UTransPosition pos2 = {0, 4, 0, 2};
+ expect("{b} a+ > c @@ |; x > y; a > A;",
+ "baxx",
+ "caxx",
+ &pos2);
+
+ // Make sure @ past post context doesn't enter post context
+ expect("{b} a+ > c @@ |; x > y; a > A;",
+ "baxx",
+ "cayy");
+
+ expect("(ab)? c > d;",
+ "c abc ababc",
+ "d d abd");
+
+ // NOTE: The (ab)+ when referenced just yields a single "ab",
+ // not the full sequence of them. This accords with perl behavior.
+ expect("(ab)+ {x} > '(' $1 ')';",
+ "x abx ababxy",
+ "x ab(ab) abab(ab)y");
+
+ expect("b+ > x;",
+ "ac abc abbc abbbc",
+ "ac axc axc axc");
+
+ expect("[abc]+ > x;",
+ "qac abrc abbcs abtbbc",
+ "qx xrx xs xtx");
+
+ expect("q{(ab)+} > x;",
+ "qa qab qaba qababc qaba",
+ "qa qx qxa qxc qxa");
+
+ expect("q(ab)* > x;",
+ "qa qab qaba qababc",
+ "xa x xa xc");
+
+ // NOTE: The (ab)+ when referenced just yields a single "ab",
+ // not the full sequence of them. This accords with perl behavior.
+ expect("q(ab)* > '(' $1 ')';",
+ "qa qab qaba qababc",
+ "()a (ab) (ab)a (ab)c");
+
+ // 'foo'+ and 'foo'* -- the quantifier should apply to the entire
+ // quoted string
+ expect("'ab'+ > x;",
+ "bb ab ababb",
+ "bb x xb");
+
+ // $foo+ and $foo* -- the quantifier should apply to the entire
+ // variable reference
+ expect("$var = ab; $var+ > x;",
+ "bb ab ababb",
+ "bb x xb");
+}
+
+class TestTrans : public Transliterator {
+public:
+ TestTrans(const UnicodeString& id) : Transliterator(id, 0) {
+ }
+ virtual Transliterator* clone(void) const {
+ return new TestTrans(getID());
+ }
+ virtual void handleTransliterate(Replaceable& /*text*/, UTransPosition& offsets,
+ UBool /*isIncremental*/) const
+ {
+ offsets.start = offsets.limit;
+ }
+ virtual UClassID getDynamicClassID() const;
+ static UClassID U_EXPORT2 getStaticClassID();
+};
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TestTrans)
+
+/**
+ * Test Source-Target/Variant.
+ */
+void TransliteratorTest::TestSTV(void) {
+ int32_t ns = Transliterator::countAvailableSources();
+ if (ns < 0 || ns > 255) {
+ errln((UnicodeString)"FAIL: Bad source count: " + ns);
+ return;
+ }
+ int32_t i, j;
+ for (i=0; i<ns; ++i) {
+ UnicodeString source;
+ Transliterator::getAvailableSource(i, source);
+ logln((UnicodeString)"" + i + ": " + source);
+ if (source.length() == 0) {
+ errln("FAIL: empty source");
+ continue;
+ }
+ int32_t nt = Transliterator::countAvailableTargets(source);
+ if (nt < 0 || nt > 255) {
+ errln((UnicodeString)"FAIL: Bad target count: " + nt);
+ continue;
+ }
+ for (int32_t j=0; j<nt; ++j) {
+ UnicodeString target;
+ Transliterator::getAvailableTarget(j, source, target);
+ logln((UnicodeString)" " + j + ": " + target);
+ if (target.length() == 0) {
+ errln("FAIL: empty target");
+ continue;
+ }
+ int32_t nv = Transliterator::countAvailableVariants(source, target);
+ if (nv < 0 || nv > 255) {
+ errln((UnicodeString)"FAIL: Bad variant count: " + nv);
+ continue;
+ }
+ for (int32_t k=0; k<nv; ++k) {
+ UnicodeString variant;
+ Transliterator::getAvailableVariant(k, source, target, variant);
+ if (variant.length() == 0) {
+ logln((UnicodeString)" " + k + ": <empty>");
+ } else {
+ logln((UnicodeString)" " + k + ": " + variant);
+ }
+ }
+ }
+ }
+
+ // Test registration
+ const char* IDS[] = { "Fieruwer", "Seoridf-Sweorie", "Oewoir-Oweri/Vsie" };
+ const char* FULL_IDS[] = { "Any-Fieruwer", "Seoridf-Sweorie", "Oewoir-Oweri/Vsie" };
+ const char* SOURCES[] = { NULL, "Seoridf", "Oewoir" };
+ for (i=0; i<3; ++i) {
+ Transliterator *t = new TestTrans(IDS[i]);
+ if (t == 0) {
+ errln("FAIL: out of memory");
+ return;
+ }
+ if (t->getID() != IDS[i]) {
+ errln((UnicodeString)"FAIL: ID mismatch for " + IDS[i]);
+ delete t;
+ return;
+ }
+ Transliterator::registerInstance(t);
+ UErrorCode status = U_ZERO_ERROR;
+ t = Transliterator::createInstance(IDS[i], UTRANS_FORWARD, status);
+ if (t == NULL) {
+ errln((UnicodeString)"FAIL: Registration/creation failed for ID " +
+ IDS[i]);
+ } else {
+ logln((UnicodeString)"Ok: Registration/creation succeeded for ID " +
+ IDS[i]);
+ delete t;
+ }
+ Transliterator::unregister(IDS[i]);
+ t = Transliterator::createInstance(IDS[i], UTRANS_FORWARD, status);
+ if (t != NULL) {
+ errln((UnicodeString)"FAIL: Unregistration failed for ID " +
+ IDS[i]);
+ delete t;
+ }
+ }
+
+ // Make sure getAvailable API reflects removal
+ int32_t n = Transliterator::countAvailableIDs();
+ for (i=0; i<n; ++i) {
+ UnicodeString id = Transliterator::getAvailableID(i);
+ for (j=0; j<3; ++j) {
+ if (id.caseCompare(FULL_IDS[j],0)==0) {
+ errln((UnicodeString)"FAIL: unregister(" + id + ") failed");
+ }
+ }
+ }
+ n = Transliterator::countAvailableTargets("Any");
+ for (i=0; i<n; ++i) {
+ UnicodeString t;
+ Transliterator::getAvailableTarget(i, "Any", t);
+ if (t.caseCompare(IDS[0],0)==0) {
+ errln((UnicodeString)"FAIL: unregister(Any-" + t + ") failed");
+ }
+ }
+ n = Transliterator::countAvailableSources();
+ for (i=0; i<n; ++i) {
+ UnicodeString s;
+ Transliterator::getAvailableSource(i, s);
+ for (j=0; j<3; ++j) {
+ if (SOURCES[j] == NULL) continue;
+ if (s.caseCompare(SOURCES[j],0)==0) {
+ errln((UnicodeString)"FAIL: unregister(" + s + "-*) failed");
+ }
+ }
+ }
+}
+
+/**
+ * Test inverse of Greek-Latin; Title()
+ */
+void TransliteratorTest::TestCompoundInverse(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance
+ ("Greek-Latin; Title()", UTRANS_REVERSE,parseError, status);
+ if (t == 0) {
+ errln("FAIL: createInstance");
+ return;
+ }
+ UnicodeString exp("(Title);Latin-Greek");
+ if (t->getID() == exp) {
+ logln("Ok: inverse of \"Greek-Latin; Title()\" is \"" +
+ t->getID());
+ } else {
+ errln("FAIL: inverse of \"Greek-Latin; Title()\" is \"" +
+ t->getID() + "\", expected \"" + exp + "\"");
+ }
+ delete t;
+}
+
+/**
+ * Test NFD chaining with RBT
+ */
+void TransliteratorTest::TestNFDChainRBT() {
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator* t = Transliterator::createFromRules(
+ "TEST", "::NFD; aa > Q; a > q;",
+ UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln("FAIL: Transliterator::createFromRules failed with %s", u_errorName(ec));
+ return;
+ }
+ expect(*t, "aa", "Q");
+ delete t;
+
+ // TEMPORARY TESTS -- BEING DEBUGGED
+//=- UnicodeString s, s2;
+//=- t = Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, pe, ec);
+//=- s = CharsToUnicodeString("rmk\\u1E63\\u0113t");
+//=- s2 = CharsToUnicodeString("\\u0930\\u094D\\u092E\\u094D\\u0915\\u094D\\u0937\\u0947\\u0924\\u094D");
+//=- expect(*t, s, s2);
+//=- delete t;
+//=-
+//=- t = Transliterator::createInstance("Devanagari-Latin", UTRANS_FORWARD, pe, ec);
+//=- expect(*t, s2, s);
+//=- delete t;
+//=-
+//=- t = Transliterator::createInstance("Latin-Devanagari;Devanagari-Latin", UTRANS_FORWARD, pe, ec);
+//=- s = CharsToUnicodeString("rmk\\u1E63\\u0113t");
+//=- expect(*t, s, s);
+//=- delete t;
+
+// const char* source[] = {
+// /*
+// "\\u015Br\\u012Bmad",
+// "bhagavadg\\u012Bt\\u0101",
+// "adhy\\u0101ya",
+// "arjuna",
+// "vi\\u1E63\\u0101da",
+// "y\\u014Dga",
+// "dhr\\u0325tar\\u0101\\u1E63\\u1E6Dra",
+// "uv\\u0101cr\\u0325",
+// */
+// "rmk\\u1E63\\u0113t",
+// //"dharmak\\u1E63\\u0113tr\\u0113",
+// /*
+// "kuruk\\u1E63\\u0113tr\\u0113",
+// "samav\\u0113t\\u0101",
+// "yuyutsava-\\u1E25",
+// "m\\u0101mak\\u0101-\\u1E25",
+// // "p\\u0101\\u1E47\\u1E0Dav\\u0101\\u015Bcaiva",
+// "kimakurvata",
+// "san\\u0304java",
+// */
+//
+// 0
+// };
+// const char* expected[] = {
+// /*
+// "\\u0936\\u094d\\u0930\\u0940\\u092e\\u0926\\u094d",
+// "\\u092d\\u0917\\u0935\\u0926\\u094d\\u0917\\u0940\\u0924\\u093e",
+// "\\u0905\\u0927\\u094d\\u092f\\u093e\\u092f",
+// "\\u0905\\u0930\\u094d\\u091c\\u0941\\u0928",
+// "\\u0935\\u093f\\u0937\\u093e\\u0926",
+// "\\u092f\\u094b\\u0917",
+// "\\u0927\\u0943\\u0924\\u0930\\u093e\\u0937\\u094d\\u091f\\u094d\\u0930",
+// "\\u0909\\u0935\\u093E\\u091A\\u0943",
+// */
+// "\\u0927",
+// //"\\u0927\\u0930\\u094d\\u092e\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947",
+// /*
+// "\\u0915\\u0941\\u0930\\u0941\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947",
+// "\\u0938\\u092e\\u0935\\u0947\\u0924\\u093e",
+// "\\u092f\\u0941\\u092f\\u0941\\u0924\\u094d\\u0938\\u0935\\u0903",
+// "\\u092e\\u093e\\u092e\\u0915\\u093e\\u0903",
+// // "\\u092a\\u093e\\u0923\\u094d\\u0921\\u0935\\u093e\\u0936\\u094d\\u091a\\u0948\\u0935",
+// "\\u0915\\u093f\\u092e\\u0915\\u0941\\u0930\\u094d\\u0935\\u0924",
+// "\\u0938\\u0902\\u091c\\u0935",
+// */
+// 0
+// };
+// UErrorCode status = U_ZERO_ERROR;
+// UParseError parseError;
+// UnicodeString message;
+// Transliterator* latinToDevToLatin=Transliterator::createInstance("Latin-Devanagari;Devanagari-Latin", UTRANS_FORWARD, parseError, status);
+// Transliterator* devToLatinToDev=Transliterator::createInstance("Devanagari-Latin;Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+// if(U_FAILURE(status)){
+// errln("FAIL: construction " + UnicodeString(" Error: ") + u_errorName(status));
+// errln("PreContext: " + prettify(parseError.preContext) + "PostContext: " + prettify( parseError.postContext) );
+// delete latinToDevToLatin;
+// delete devToLatinToDev;
+// return;
+// }
+// UnicodeString gotResult;
+// for(int i= 0; source[i] != 0; i++){
+// gotResult = source[i];
+// expect(*latinToDevToLatin,CharsToUnicodeString(source[i]),CharsToUnicodeString(source[i]));
+// expect(*devToLatinToDev,CharsToUnicodeString(expected[i]),CharsToUnicodeString(expected[i]));
+// }
+// delete latinToDevToLatin;
+// delete devToLatinToDev;
+}
+
+/**
+ * Inverse of "Null" should be "Null". (J21)
+ */
+void TransliteratorTest::TestNullInverse() {
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance("Null", UTRANS_FORWARD, pe, ec);
+ if (t == 0 || U_FAILURE(ec)) {
+ errln("FAIL: createInstance");
+ return;
+ }
+ Transliterator *u = t->createInverse(ec);
+ if (u == 0 || U_FAILURE(ec)) {
+ errln("FAIL: createInverse");
+ delete t;
+ return;
+ }
+ if (u->getID() != "Null") {
+ errln("FAIL: Inverse of Null should be Null");
+ }
+ delete t;
+ delete u;
+}
+
+/**
+ * Check ID of inverse of alias. (J22)
+ */
+void TransliteratorTest::TestAliasInverseID() {
+ UnicodeString ID("Latin-Hangul", ""); // This should be any alias ID with an inverse
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance(ID, UTRANS_FORWARD, pe, ec);
+ if (t == 0 || U_FAILURE(ec)) {
+ errln("FAIL: createInstance");
+ return;
+ }
+ Transliterator *u = t->createInverse(ec);
+ if (u == 0 || U_FAILURE(ec)) {
+ errln("FAIL: createInverse");
+ delete t;
+ return;
+ }
+ UnicodeString exp = "Hangul-Latin";
+ UnicodeString got = u->getID();
+ if (got != exp) {
+ errln((UnicodeString)"FAIL: Inverse of " + ID + " is " + got +
+ ", expected " + exp);
+ }
+ delete t;
+ delete u;
+}
+
+/**
+ * Test IDs of inverses of compound transliterators. (J20)
+ */
+void TransliteratorTest::TestCompoundInverseID() {
+ UnicodeString ID = "Latin-Jamo;NFC(NFD)";
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance(ID, UTRANS_FORWARD, pe, ec);
+ if (t == 0 || U_FAILURE(ec)) {
+ errln("FAIL: createInstance");
+ return;
+ }
+ Transliterator *u = t->createInverse(ec);
+ if (u == 0 || U_FAILURE(ec)) {
+ errln("FAIL: createInverse");
+ delete t;
+ return;
+ }
+ UnicodeString exp = "NFD(NFC);Jamo-Latin";
+ UnicodeString got = u->getID();
+ if (got != exp) {
+ errln((UnicodeString)"FAIL: Inverse of " + ID + " is " + got +
+ ", expected " + exp);
+ }
+ delete t;
+ delete u;
+}
+
+/**
+ * Test undefined variable.
+
+ */
+void TransliteratorTest::TestUndefinedVariable() {
+ UnicodeString rule = "$initial } a <> \\u1161;";
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("<ID>", rule, UTRANS_FORWARD, pe, ec);
+ delete t;
+ if (U_FAILURE(ec)) {
+ logln((UnicodeString)"OK: Got exception for " + rule + ", as expected: " +
+ u_errorName(ec));
+ return;
+ }
+ errln((UnicodeString)"Fail: bogus rule " + rule + " compiled with error " +
+ u_errorName(ec));
+}
+
+/**
+ * Test empty context.
+ */
+void TransliteratorTest::TestEmptyContext() {
+ expect(" { a } > b;", "xay a ", "xby b ");
+}
+
+/**
+* Test compound filter ID syntax
+*/
+void TransliteratorTest::TestCompoundFilterID(void) {
+ static const char* DATA[] = {
+ // Col. 1 = ID or rule set (latter must start with #)
+
+ // = columns > 1 are null if expect col. 1 to be illegal =
+
+ // Col. 2 = direction, "F..." or "R..."
+ // Col. 3 = source string
+ // Col. 4 = exp result
+
+ "[abc]; [abc]", NULL, NULL, NULL, // multiple filters
+ "Latin-Greek; [abc];", NULL, NULL, NULL, // misplaced filter
+ "[b]; Latin-Greek; Upper; ([xyz])", "F", "abc", "a\\u0392c",
+ "[b]; (Lower); Latin-Greek; Upper(); ([\\u0392])", "R", "\\u0391\\u0392\\u0393", "\\u0391b\\u0393",
+ "#\n::[b]; ::Latin-Greek; ::Upper; ::([xyz]);", "F", "abc", "a\\u0392c",
+ "#\n::[b]; ::(Lower); ::Latin-Greek; ::Upper(); ::([\\u0392]);", "R", "\\u0391\\u0392\\u0393", "\\u0391b\\u0393",
+ NULL,
+ };
+
+ for (int32_t i=0; DATA[i]; i+=4) {
+ UnicodeString id = CharsToUnicodeString(DATA[i]);
+ UTransDirection direction = (DATA[i+1] != NULL && DATA[i+1][0] == 'R') ?
+ UTRANS_REVERSE : UTRANS_FORWARD;
+ UnicodeString source;
+ UnicodeString exp;
+ if (DATA[i+2] != NULL) {
+ source = CharsToUnicodeString(DATA[i+2]);
+ exp = CharsToUnicodeString(DATA[i+3]);
+ }
+ UBool expOk = (DATA[i+1] != NULL);
+ Transliterator* t = NULL;
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ if (id.charAt(0) == 0x23/*#*/) {
+ t = Transliterator::createFromRules("ID", id, direction, pe, ec);
+ } else {
+ t = Transliterator::createInstance(id, direction, pe, ec);
+ }
+ UBool ok = (t != NULL && U_SUCCESS(ec));
+ UnicodeString transID;
+ if (t!=0) {
+ transID = t->getID();
+ }
+ else {
+ transID = UnicodeString("NULL", "");
+ }
+ if (ok == expOk) {
+ logln((UnicodeString)"Ok: " + id + " => " + transID + ", " +
+ u_errorName(ec));
+ if (source.length() != 0) {
+ expect(*t, source, exp);
+ }
+ delete t;
+ } else {
+ errln((UnicodeString)"FAIL: " + id + " => " + transID + ", " +
+ u_errorName(ec));
+ }
+ }
+}
+
+/**
+ * Test new property set syntax
+ */
+void TransliteratorTest::TestPropertySet() {
+ expect("a>A; \\p{Lu}>x; \\p{ANY}>y;", "abcDEF", "Ayyxxx");
+ expect("(.+)>'[' $1 ']';", " a stitch \n in time \r saves 9",
+ "[ a stitch ]\n[ in time ]\r[ saves 9]");
+}
+
+/**
+ * Test various failure points of the new 2.0 engine.
+ */
+void TransliteratorTest::TestNewEngine() {
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance("Latin-Hiragana", UTRANS_FORWARD, pe, ec);
+ if (t == 0 || U_FAILURE(ec)) {
+ errln("FAIL: createInstance Latin-Hiragana");
+ return;
+ }
+ // Katakana should be untouched
+ expect(*t, CharsToUnicodeString("a\\u3042\\u30A2"),
+ CharsToUnicodeString("\\u3042\\u3042\\u30A2"));
+
+ delete t;
+
+#if 1
+ // This test will only work if Transliterator.ROLLBACK is
+ // true. Otherwise, this test will fail, revealing a
+ // limitation of global filters in incremental mode.
+ Transliterator *a =
+ Transliterator::createFromRules("a_to_A", "a > A;", UTRANS_FORWARD, pe, ec);
+ Transliterator *A =
+ Transliterator::createFromRules("A_to_b", "A > b;", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ delete a;
+ delete A;
+ return;
+ }
+
+ Transliterator* array[3];
+ array[0] = a;
+ array[1] = Transliterator::createInstance("NFD", UTRANS_FORWARD, pe, ec);
+ array[2] = A;
+ if (U_FAILURE(ec)) {
+ errln("FAIL: createInstance NFD");
+ delete a;
+ delete A;
+ delete array[1];
+ return;
+ }
+
+ t = new CompoundTransliterator(array, 3, new UnicodeSet("[:Ll:]", ec));
+ if (U_FAILURE(ec)) {
+ errln("FAIL: UnicodeSet constructor");
+ delete a;
+ delete A;
+ delete array[1];
+ delete t;
+ return;
+ }
+
+ expect(*t, "aAaA", "bAbA");
+
+ assertTrue("countElements", t->countElements() == 3);
+ assertEquals("getElement(0)", t->getElement(0, ec).getID(), "a_to_A");
+ assertEquals("getElement(1)", t->getElement(1, ec).getID(), "NFD");
+ assertEquals("getElement(2)", t->getElement(2, ec).getID(), "A_to_b");
+ assertSuccess("getElement", ec);
+
+ delete a;
+ delete A;
+ delete array[1];
+ delete t;
+#endif
+
+ expect("$smooth = x; $macron = q; [:^L:] { ([aeiouyAEIOUY] $macron?) } [^aeiouyAEIOUY$smooth$macron] > | $1 $smooth ;",
+ "a",
+ "ax");
+
+ UnicodeString gr = CharsToUnicodeString(
+ "$ddot = \\u0308 ;"
+ "$lcgvowel = [\\u03b1\\u03b5\\u03b7\\u03b9\\u03bf\\u03c5\\u03c9] ;"
+ "$rough = \\u0314 ;"
+ "($lcgvowel+ $ddot?) $rough > h | $1 ;"
+ "\\u03b1 <> a ;"
+ "$rough <> h ;");
+
+ expect(gr, CharsToUnicodeString("\\u03B1\\u0314"), "ha");
+}
+
+/**
+ * Test quantified segment behavior. We want:
+ * ([abc])+ > x $1 x; applied to "cba" produces "xax"
+ */
+void TransliteratorTest::TestQuantifiedSegment(void) {
+ // The normal case
+ expect("([abc]+) > x $1 x;", "cba", "xcbax");
+
+ // The tricky case; the quantifier is around the segment
+ expect("([abc])+ > x $1 x;", "cba", "xax");
+
+ // Tricky case in reverse direction
+ expect("([abc])+ { q > x $1 x;", "cbaq", "cbaxax");
+
+ // Check post-context segment
+ expect("{q} ([a-d])+ > '(' $1 ')';", "ddqcba", "dd(a)cba");
+
+ // Test toRule/toPattern for non-quantified segment.
+ // Careful with spacing here.
+ UnicodeString r("([a-c]){q} > x $1 x;");
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator* t = Transliterator::createFromRules("ID", r, UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: createFromRules");
+ delete t;
+ return;
+ }
+ UnicodeString rr;
+ t->toRules(rr, TRUE);
+ if (r != rr) {
+ errln((UnicodeString)"FAIL: \"" + r + "\" x toRules() => \"" + rr + "\"");
+ } else {
+ logln((UnicodeString)"Ok: \"" + r + "\" x toRules() => \"" + rr + "\"");
+ }
+ delete t;
+
+ // Test toRule/toPattern for quantified segment.
+ // Careful with spacing here.
+ r = "([a-c])+{q} > x $1 x;";
+ t = Transliterator::createFromRules("ID", r, UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: createFromRules");
+ delete t;
+ return;
+ }
+ t->toRules(rr, TRUE);
+ if (r != rr) {
+ errln((UnicodeString)"FAIL: \"" + r + "\" x toRules() => \"" + rr + "\"");
+ } else {
+ logln((UnicodeString)"Ok: \"" + r + "\" x toRules() => \"" + rr + "\"");
+ }
+ delete t;
+}
+
+//======================================================================
+// Ram's tests
+//======================================================================
+void TransliteratorTest::TestDevanagariLatinRT(){
+ const int MAX_LEN= 52;
+ const char* const source[MAX_LEN] = {
+ "bh\\u0101rata",
+ "kra",
+ "k\\u1E63a",
+ "khra",
+ "gra",
+ "\\u1E45ra",
+ "cra",
+ "chra",
+ "j\\u00F1a",
+ "jhra",
+ "\\u00F1ra",
+ "\\u1E6Dya",
+ "\\u1E6Dhra",
+ "\\u1E0Dya",
+ //"r\\u0323ya", // \u095c is not valid in Devanagari
+ "\\u1E0Dhya",
+ "\\u1E5Bhra",
+ "\\u1E47ra",
+ "tta",
+ "thra",
+ "dda",
+ "dhra",
+ "nna",
+ "pra",
+ "phra",
+ "bra",
+ "bhra",
+ "mra",
+ "\\u1E49ra",
+ //"l\\u0331ra",
+ "yra",
+ "\\u1E8Fra",
+ //"l-",
+ "vra",
+ "\\u015Bra",
+ "\\u1E63ra",
+ "sra",
+ "hma",
+ "\\u1E6D\\u1E6Da",
+ "\\u1E6D\\u1E6Dha",
+ "\\u1E6Dh\\u1E6Dha",
+ "\\u1E0D\\u1E0Da",
+ "\\u1E0D\\u1E0Dha",
+ "\\u1E6Dya",
+ "\\u1E6Dhya",
+ "\\u1E0Dya",
+ "\\u1E0Dhya",
+ // Not roundtrippable --
+ // \\u0939\\u094d\\u094d\\u092E - hma
+ // \\u0939\\u094d\\u092E - hma
+ // CharsToUnicodeString("hma"),
+ "hya",
+ "\\u015Br\\u0325",
+ "\\u015Bca",
+ "\\u0115",
+ "san\\u0304j\\u012Bb s\\u0113nagupta",
+ "\\u0101nand vaddir\\u0101ju",
+ "\\u0101",
+ "a"
+ };
+ const char* const expected[MAX_LEN] = {
+ "\\u092D\\u093E\\u0930\\u0924", /* bha\\u0304rata */
+ "\\u0915\\u094D\\u0930", /* kra */
+ "\\u0915\\u094D\\u0937", /* ks\\u0323a */
+ "\\u0916\\u094D\\u0930", /* khra */
+ "\\u0917\\u094D\\u0930", /* gra */
+ "\\u0919\\u094D\\u0930", /* n\\u0307ra */
+ "\\u091A\\u094D\\u0930", /* cra */
+ "\\u091B\\u094D\\u0930", /* chra */
+ "\\u091C\\u094D\\u091E", /* jn\\u0303a */
+ "\\u091D\\u094D\\u0930", /* jhra */
+ "\\u091E\\u094D\\u0930", /* n\\u0303ra */
+ "\\u091F\\u094D\\u092F", /* t\\u0323ya */
+ "\\u0920\\u094D\\u0930", /* t\\u0323hra */
+ "\\u0921\\u094D\\u092F", /* d\\u0323ya */
+ //"\\u095C\\u094D\\u092F", /* r\\u0323ya */ // \u095c is not valid in Devanagari
+ "\\u0922\\u094D\\u092F", /* d\\u0323hya */
+ "\\u0922\\u093C\\u094D\\u0930", /* r\\u0323hra */
+ "\\u0923\\u094D\\u0930", /* n\\u0323ra */
+ "\\u0924\\u094D\\u0924", /* tta */
+ "\\u0925\\u094D\\u0930", /* thra */
+ "\\u0926\\u094D\\u0926", /* dda */
+ "\\u0927\\u094D\\u0930", /* dhra */
+ "\\u0928\\u094D\\u0928", /* nna */
+ "\\u092A\\u094D\\u0930", /* pra */
+ "\\u092B\\u094D\\u0930", /* phra */
+ "\\u092C\\u094D\\u0930", /* bra */
+ "\\u092D\\u094D\\u0930", /* bhra */
+ "\\u092E\\u094D\\u0930", /* mra */
+ "\\u0929\\u094D\\u0930", /* n\\u0331ra */
+ //"\\u0934\\u094D\\u0930", /* l\\u0331ra */
+ "\\u092F\\u094D\\u0930", /* yra */
+ "\\u092F\\u093C\\u094D\\u0930", /* y\\u0307ra */
+ //"l-",
+ "\\u0935\\u094D\\u0930", /* vra */
+ "\\u0936\\u094D\\u0930", /* s\\u0301ra */
+ "\\u0937\\u094D\\u0930", /* s\\u0323ra */
+ "\\u0938\\u094D\\u0930", /* sra */
+ "\\u0939\\u094d\\u092E", /* hma */
+ "\\u091F\\u094D\\u091F", /* t\\u0323t\\u0323a */
+ "\\u091F\\u094D\\u0920", /* t\\u0323t\\u0323ha */
+ "\\u0920\\u094D\\u0920", /* t\\u0323ht\\u0323ha*/
+ "\\u0921\\u094D\\u0921", /* d\\u0323d\\u0323a */
+ "\\u0921\\u094D\\u0922", /* d\\u0323d\\u0323ha */
+ "\\u091F\\u094D\\u092F", /* t\\u0323ya */
+ "\\u0920\\u094D\\u092F", /* t\\u0323hya */
+ "\\u0921\\u094D\\u092F", /* d\\u0323ya */
+ "\\u0922\\u094D\\u092F", /* d\\u0323hya */
+ // "hma", /* hma */
+ "\\u0939\\u094D\\u092F", /* hya */
+ "\\u0936\\u0943", /* s\\u0301r\\u0325a */
+ "\\u0936\\u094D\\u091A", /* s\\u0301ca */
+ "\\u090d", /* e\\u0306 */
+ "\\u0938\\u0902\\u091C\\u0940\\u092C\\u094D \\u0938\\u0947\\u0928\\u0917\\u0941\\u092A\\u094D\\u0924",
+ "\\u0906\\u0928\\u0902\\u0926\\u094D \\u0935\\u0926\\u094D\\u0926\\u093F\\u0930\\u093E\\u091C\\u0941",
+ "\\u0906",
+ "\\u0905",
+ };
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ UnicodeString message;
+ Transliterator* latinToDev=Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ Transliterator* devToLatin=Transliterator::createInstance("Devanagari-Latin", UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)){
+ errln("FAIL: construction " + UnicodeString(" Error: ") + u_errorName(status));
+ errln("PreContext: " + prettify(parseError.preContext) + " PostContext: " + prettify( parseError.postContext) );
+ return;
+ }
+ UnicodeString gotResult;
+ for(int i= 0; i<MAX_LEN; i++){
+ gotResult = source[i];
+ expect(*latinToDev,CharsToUnicodeString(source[i]),CharsToUnicodeString(expected[i]));
+ expect(*devToLatin,CharsToUnicodeString(expected[i]),CharsToUnicodeString(source[i]));
+ }
+ delete latinToDev;
+ delete devToLatin;
+}
+
+void TransliteratorTest::TestTeluguLatinRT(){
+ const int MAX_LEN=10;
+ const char* const source[MAX_LEN] = {
+ "raghur\\u0101m vi\\u015Bvan\\u0101dha", /* Raghuram Viswanadha */
+ "\\u0101nand vaddir\\u0101ju", /* Anand Vaddiraju */
+ "r\\u0101j\\u012Bv ka\\u015Barab\\u0101da", /* Rajeev Kasarabada */
+ "san\\u0304j\\u012Bv ka\\u015Barab\\u0101da", /* sanjeev kasarabada */
+ "san\\u0304j\\u012Bb sen'gupta", /* sanjib sengupata */
+ "amar\\u0113ndra hanum\\u0101nula", /* Amarendra hanumanula */
+ "ravi kum\\u0101r vi\\u015Bvan\\u0101dha", /* Ravi Kumar Viswanadha */
+ "\\u0101ditya kandr\\u0113gula", /* Aditya Kandregula */
+ "\\u015Br\\u012Bdhar ka\\u1E47\\u1E6Dama\\u015Be\\u1E6D\\u1E6Di",/* Shridhar Kantamsetty */
+ "m\\u0101dhav de\\u015Be\\u1E6D\\u1E6Di" /* Madhav Desetty */
+ };
+
+ const char* const expected[MAX_LEN] = {
+ "\\u0c30\\u0c18\\u0c41\\u0c30\\u0c3e\\u0c2e\\u0c4d \\u0c35\\u0c3f\\u0c36\\u0c4d\\u0c35\\u0c28\\u0c3e\\u0c27",
+ "\\u0c06\\u0c28\\u0c02\\u0c26\\u0c4d \\u0C35\\u0C26\\u0C4D\\u0C26\\u0C3F\\u0C30\\u0C3E\\u0C1C\\u0C41",
+ "\\u0c30\\u0c3e\\u0c1c\\u0c40\\u0c35\\u0c4d \\u0c15\\u0c36\\u0c30\\u0c2c\\u0c3e\\u0c26",
+ "\\u0c38\\u0c02\\u0c1c\\u0c40\\u0c35\\u0c4d \\u0c15\\u0c36\\u0c30\\u0c2c\\u0c3e\\u0c26",
+ "\\u0c38\\u0c02\\u0c1c\\u0c40\\u0c2c\\u0c4d \\u0c38\\u0c46\\u0c28\\u0c4d\\u0c17\\u0c41\\u0c2a\\u0c4d\\u0c24",
+ "\\u0c05\\u0c2e\\u0c30\\u0c47\\u0c02\\u0c26\\u0c4d\\u0c30 \\u0c39\\u0c28\\u0c41\\u0c2e\\u0c3e\\u0c28\\u0c41\\u0c32",
+ "\\u0c30\\u0c35\\u0c3f \\u0c15\\u0c41\\u0c2e\\u0c3e\\u0c30\\u0c4d \\u0c35\\u0c3f\\u0c36\\u0c4d\\u0c35\\u0c28\\u0c3e\\u0c27",
+ "\\u0c06\\u0c26\\u0c3f\\u0c24\\u0c4d\\u0c2f \\u0C15\\u0C02\\u0C26\\u0C4D\\u0C30\\u0C47\\u0C17\\u0C41\\u0c32",
+ "\\u0c36\\u0c4d\\u0c30\\u0c40\\u0C27\\u0C30\\u0C4D \\u0c15\\u0c02\\u0c1f\\u0c2e\\u0c36\\u0c46\\u0c1f\\u0c4d\\u0c1f\\u0c3f",
+ "\\u0c2e\\u0c3e\\u0c27\\u0c35\\u0c4d \\u0c26\\u0c46\\u0c36\\u0c46\\u0c1f\\u0c4d\\u0c1f\\u0c3f",
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ UnicodeString message;
+ Transliterator* latinToDev=Transliterator::createInstance("Latin-Telugu", UTRANS_FORWARD, parseError, status);
+ Transliterator* devToLatin=Transliterator::createInstance("Telugu-Latin", UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)){
+ errln("FAIL: construction " + UnicodeString(" Error: ") + u_errorName(status));
+ errln("PreContext: " + prettify(parseError.preContext) + " PostContext: " + prettify( parseError.postContext) );
+ return;
+ }
+ UnicodeString gotResult;
+ for(int i= 0; i<MAX_LEN; i++){
+ gotResult = source[i];
+ expect(*latinToDev,CharsToUnicodeString(source[i]),CharsToUnicodeString(expected[i]));
+ expect(*devToLatin,CharsToUnicodeString(expected[i]),CharsToUnicodeString(source[i]));
+ }
+ delete latinToDev;
+ delete devToLatin;
+}
+
+void TransliteratorTest::TestSanskritLatinRT(){
+ const int MAX_LEN =16;
+ const char* const source[MAX_LEN] = {
+ "rmk\\u1E63\\u0113t",
+ "\\u015Br\\u012Bmad",
+ "bhagavadg\\u012Bt\\u0101",
+ "adhy\\u0101ya",
+ "arjuna",
+ "vi\\u1E63\\u0101da",
+ "y\\u014Dga",
+ "dhr\\u0325tar\\u0101\\u1E63\\u1E6Dra",
+ "uv\\u0101cr\\u0325",
+ "dharmak\\u1E63\\u0113tr\\u0113",
+ "kuruk\\u1E63\\u0113tr\\u0113",
+ "samav\\u0113t\\u0101",
+ "yuyutsava\\u1E25",
+ "m\\u0101mak\\u0101\\u1E25",
+ // "p\\u0101\\u1E47\\u1E0Dav\\u0101\\u015Bcaiva",
+ "kimakurvata",
+ "san\\u0304java",
+ };
+ const char* const expected[MAX_LEN] = {
+ "\\u0930\\u094D\\u092E\\u094D\\u0915\\u094D\\u0937\\u0947\\u0924\\u094D",
+ "\\u0936\\u094d\\u0930\\u0940\\u092e\\u0926\\u094d",
+ "\\u092d\\u0917\\u0935\\u0926\\u094d\\u0917\\u0940\\u0924\\u093e",
+ "\\u0905\\u0927\\u094d\\u092f\\u093e\\u092f",
+ "\\u0905\\u0930\\u094d\\u091c\\u0941\\u0928",
+ "\\u0935\\u093f\\u0937\\u093e\\u0926",
+ "\\u092f\\u094b\\u0917",
+ "\\u0927\\u0943\\u0924\\u0930\\u093e\\u0937\\u094d\\u091f\\u094d\\u0930",
+ "\\u0909\\u0935\\u093E\\u091A\\u0943",
+ "\\u0927\\u0930\\u094d\\u092e\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947",
+ "\\u0915\\u0941\\u0930\\u0941\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947",
+ "\\u0938\\u092e\\u0935\\u0947\\u0924\\u093e",
+ "\\u092f\\u0941\\u092f\\u0941\\u0924\\u094d\\u0938\\u0935\\u0903",
+ "\\u092e\\u093e\\u092e\\u0915\\u093e\\u0903",
+ //"\\u092a\\u093e\\u0923\\u094d\\u0921\\u0935\\u093e\\u0936\\u094d\\u091a\\u0948\\u0935",
+ "\\u0915\\u093f\\u092e\\u0915\\u0941\\u0930\\u094d\\u0935\\u0924",
+ "\\u0938\\u0902\\u091c\\u0935",
+ };
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ UnicodeString message;
+ Transliterator* latinToDev=Transliterator::createInstance("Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ Transliterator* devToLatin=Transliterator::createInstance("Devanagari-Latin", UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)){
+ errln("FAIL: construction " + UnicodeString(" Error: ") + u_errorName(status));
+ errln("PreContext: " + prettify(parseError.preContext) + " PostContext: " + prettify( parseError.postContext) );
+ return;
+ }
+ UnicodeString gotResult;
+ for(int i= 0; i<MAX_LEN; i++){
+ gotResult = source[i];
+ expect(*latinToDev,CharsToUnicodeString(source[i]),CharsToUnicodeString(expected[i]));
+ expect(*devToLatin,CharsToUnicodeString(expected[i]),CharsToUnicodeString(source[i]));
+ }
+ delete latinToDev;
+ delete devToLatin;
+}
+
+
+void TransliteratorTest::TestCompoundLatinRT(){
+ const char* const source[] = {
+ "rmk\\u1E63\\u0113t",
+ "\\u015Br\\u012Bmad",
+ "bhagavadg\\u012Bt\\u0101",
+ "adhy\\u0101ya",
+ "arjuna",
+ "vi\\u1E63\\u0101da",
+ "y\\u014Dga",
+ "dhr\\u0325tar\\u0101\\u1E63\\u1E6Dra",
+ "uv\\u0101cr\\u0325",
+ "dharmak\\u1E63\\u0113tr\\u0113",
+ "kuruk\\u1E63\\u0113tr\\u0113",
+ "samav\\u0113t\\u0101",
+ "yuyutsava\\u1E25",
+ "m\\u0101mak\\u0101\\u1E25",
+ // "p\\u0101\\u1E47\\u1E0Dav\\u0101\\u015Bcaiva",
+ "kimakurvata",
+ "san\\u0304java"
+ };
+ const int MAX_LEN = sizeof(source)/sizeof(source[0]);
+ const char* const expected[MAX_LEN] = {
+ "\\u0930\\u094D\\u092E\\u094D\\u0915\\u094D\\u0937\\u0947\\u0924\\u094D",
+ "\\u0936\\u094d\\u0930\\u0940\\u092e\\u0926\\u094d",
+ "\\u092d\\u0917\\u0935\\u0926\\u094d\\u0917\\u0940\\u0924\\u093e",
+ "\\u0905\\u0927\\u094d\\u092f\\u093e\\u092f",
+ "\\u0905\\u0930\\u094d\\u091c\\u0941\\u0928",
+ "\\u0935\\u093f\\u0937\\u093e\\u0926",
+ "\\u092f\\u094b\\u0917",
+ "\\u0927\\u0943\\u0924\\u0930\\u093e\\u0937\\u094d\\u091f\\u094d\\u0930",
+ "\\u0909\\u0935\\u093E\\u091A\\u0943",
+ "\\u0927\\u0930\\u094d\\u092e\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947",
+ "\\u0915\\u0941\\u0930\\u0941\\u0915\\u094d\\u0937\\u0947\\u0924\\u094d\\u0930\\u0947",
+ "\\u0938\\u092e\\u0935\\u0947\\u0924\\u093e",
+ "\\u092f\\u0941\\u092f\\u0941\\u0924\\u094d\\u0938\\u0935\\u0903",
+ "\\u092e\\u093e\\u092e\\u0915\\u093e\\u0903",
+ // "\\u092a\\u093e\\u0923\\u094d\\u0921\\u0935\\u093e\\u0936\\u094d\\u091a\\u0948\\u0935",
+ "\\u0915\\u093f\\u092e\\u0915\\u0941\\u0930\\u094d\\u0935\\u0924",
+ "\\u0938\\u0902\\u091c\\u0935"
+ };
+ if(MAX_LEN != sizeof(expected)/sizeof(expected[0])) {
+ errln("error in TestCompoundLatinRT: source[] and expected[] have different lengths!");
+ return;
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ UnicodeString message;
+ Transliterator* devToLatinToDev =Transliterator::createInstance("Devanagari-Latin;Latin-Devanagari", UTRANS_FORWARD, parseError, status);
+ Transliterator* latinToDevToLatin=Transliterator::createInstance("Latin-Devanagari;Devanagari-Latin", UTRANS_FORWARD, parseError, status);
+ Transliterator* devToTelToDev =Transliterator::createInstance("Devanagari-Telugu;Telugu-Devanagari", UTRANS_FORWARD, parseError, status);
+ Transliterator* latinToTelToLatin=Transliterator::createInstance("Latin-Telugu;Telugu-Latin", UTRANS_FORWARD, parseError, status);
+
+ if(U_FAILURE(status)){
+ errln("FAIL: construction " + UnicodeString(" Error: ") + u_errorName(status));
+ errln("PreContext: " + prettify(parseError.preContext) + " PostContext: " + prettify( parseError.postContext) );
+ return;
+ }
+ UnicodeString gotResult;
+ for(int i= 0; i<MAX_LEN; i++){
+ gotResult = source[i];
+ expect(*devToLatinToDev,CharsToUnicodeString(expected[i]),CharsToUnicodeString(expected[i]));
+ expect(*latinToDevToLatin,CharsToUnicodeString(source[i]),CharsToUnicodeString(source[i]));
+ expect(*latinToTelToLatin,CharsToUnicodeString(source[i]),CharsToUnicodeString(source[i]));
+
+ }
+ delete(latinToDevToLatin);
+ delete(devToLatinToDev);
+ delete(devToTelToDev);
+ delete(latinToTelToLatin);
+}
+
+/**
+ * Test Gurmukhi-Devanagari Tippi and Bindi
+ */
+void TransliteratorTest::TestGurmukhiDevanagari(){
+ // the rule says:
+ // (\u0902) (when preceded by vowel) ---> (\u0A02)
+ // (\u0902) (when preceded by consonant) ---> (\u0A70)
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet vowel(UnicodeString("[\\u0905-\\u090A \\u090F\\u0910\\u0913\\u0914 \\u093e-\\u0942\\u0947\\u0948\\u094B\\u094C\\u094D]").unescape(), status);
+ UnicodeSet non_vowel(UnicodeString("[\\u0915-\\u0928\\u092A-\\u0930]").unescape(), status);
+ UParseError parseError;
+
+ UnicodeSetIterator vIter(vowel);
+ UnicodeSetIterator nvIter(non_vowel);
+ Transliterator* trans = Transliterator::createInstance("Devanagari-Gurmukhi",UTRANS_FORWARD, parseError, status);
+ if(U_FAILURE(status)) {
+ errln("Error creating transliterator %s", u_errorName(status));
+ delete trans;
+ return;
+ }
+ UnicodeString src (" \\u0902");
+ UnicodeString expected(" \\u0A02");
+ src = src.unescape();
+ expected= expected.unescape();
+
+ while(vIter.next()){
+ src.setCharAt(0,(UChar) vIter.getCodepoint());
+ expected.setCharAt(0,(UChar) (vIter.getCodepoint()+0x0100));
+ expect(*trans,src,expected);
+ }
+
+ expected.setCharAt(1,0x0A70);
+ while(nvIter.next()){
+ //src.setCharAt(0,(char) nvIter.codepoint);
+ src.setCharAt(0,(UChar)nvIter.getCodepoint());
+ expected.setCharAt(0,(UChar) (nvIter.getCodepoint()+0x0100));
+ expect(*trans,src,expected);
+ }
+ delete trans;
+}
+/**
+ * Test instantiation from a locale.
+ */
+void TransliteratorTest::TestLocaleInstantiation(void) {
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance("ru_RU-Latin", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: createInstance(ru_RU-Latin)");
+ delete t;
+ return;
+ }
+ expect(*t, CharsToUnicodeString("\\u0430"), "a");
+ delete t;
+
+ t = Transliterator::createInstance("en-el", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: createInstance(en-el)");
+ delete t;
+ return;
+ }
+ expect(*t, "a", CharsToUnicodeString("\\u03B1"));
+ delete t;
+}
+
+/**
+ * Test title case handling of accent (should ignore accents)
+ */
+void TransliteratorTest::TestTitleAccents(void) {
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance("Title", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: createInstance(Title)");
+ delete t;
+ return;
+ }
+ expect(*t, CharsToUnicodeString("a\\u0300b can't abe"), CharsToUnicodeString("A\\u0300b Can't Abe"));
+ delete t;
+}
+
+/**
+ * Basic test of a locale resource based rule.
+ */
+void TransliteratorTest::TestLocaleResource() {
+ const char* DATA[] = {
+ // id from to
+ //"Latin-Greek/UNGEGN", "b", "\\u03bc\\u03c0",
+ "Latin-el", "b", "\\u03bc\\u03c0",
+ "Latin-Greek", "b", "\\u03B2",
+ "Greek-Latin/UNGEGN", "\\u03B2", "v",
+ "el-Latin", "\\u03B2", "v",
+ "Greek-Latin", "\\u03B2", "b",
+ };
+ const int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]);
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createInstance(DATA[i], UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createInstance(" + DATA[i] + ")");
+ delete t;
+ continue;
+ }
+ expect(*t, CharsToUnicodeString(DATA[i+1]),
+ CharsToUnicodeString(DATA[i+2]));
+ delete t;
+ }
+}
+
+/**
+ * Make sure parse errors reference the right line.
+ */
+void TransliteratorTest::TestParseError() {
+ static const char* rule =
+ "a > b;\n"
+ "# more stuff\n"
+ "d << b;";
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ Transliterator *t = Transliterator::createFromRules("ID", rule, UTRANS_FORWARD, pe, ec);
+ delete t;
+ if (U_FAILURE(ec)) {
+ UnicodeString err(pe.preContext);
+ err.append((UChar)124/*|*/).append(pe.postContext);
+ if (err.indexOf("d << b") >= 0) {
+ logln("Ok: " + err);
+ } else {
+ errln("FAIL: " + err);
+ }
+ }
+ else {
+ errln("FAIL: no syntax error");
+ }
+ static const char* maskingRule =
+ "a>x;\n"
+ "# more stuff\n"
+ "ab>y;";
+ ec = U_ZERO_ERROR;
+ delete Transliterator::createFromRules("ID", maskingRule, UTRANS_FORWARD, pe, ec);
+ if (ec != U_RULE_MASK_ERROR) {
+ errln("FAIL: returned %s instead of U_RULE_MASK_ERROR", u_errorName(ec));
+ }
+ else if (UnicodeString("a > x;") != UnicodeString(pe.preContext)) {
+ errln("FAIL: did not get expected precontext");
+ }
+ else if (UnicodeString("ab > y;") != UnicodeString(pe.postContext)) {
+ errln("FAIL: did not get expected postcontext");
+ }
+}
+
+/**
+ * Make sure sets on output are disallowed.
+ */
+void TransliteratorTest::TestOutputSet() {
+ UnicodeString rule = "$set = [a-cm-n]; b > $set;";
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ Transliterator *t = Transliterator::createFromRules("ID", rule, UTRANS_FORWARD, pe, ec);
+ delete t;
+ if (U_FAILURE(ec)) {
+ UnicodeString err(pe.preContext);
+ err.append((UChar)124/*|*/).append(pe.postContext);
+ logln("Ok: " + err);
+ return;
+ }
+ errln("FAIL: No syntax error");
+}
+
+/**
+ * Test the use variable range pragma, making sure that use of
+ * variable range characters is detected and flagged as an error.
+ */
+void TransliteratorTest::TestVariableRange() {
+ UnicodeString rule = "use variable range 0x70 0x72; a > A; b > B; q > Q;";
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ Transliterator *t = Transliterator::createFromRules("ID", rule, UTRANS_FORWARD, pe, ec);
+ delete t;
+ if (U_FAILURE(ec)) {
+ UnicodeString err(pe.preContext);
+ err.append((UChar)124/*|*/).append(pe.postContext);
+ logln("Ok: " + err);
+ return;
+ }
+ errln("FAIL: No syntax error");
+}
+
+/**
+ * Test invalid post context error handling
+ */
+void TransliteratorTest::TestInvalidPostContext() {
+ UnicodeString rule = "a}b{c>d;";
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ Transliterator *t = Transliterator::createFromRules("ID", rule, UTRANS_FORWARD, pe, ec);
+ delete t;
+ if (U_FAILURE(ec)) {
+ UnicodeString err(pe.preContext);
+ err.append((UChar)124/*|*/).append(pe.postContext);
+ if (err.indexOf("a}b{c") >= 0) {
+ logln("Ok: " + err);
+ } else {
+ errln("FAIL: " + err);
+ }
+ return;
+ }
+ errln("FAIL: No syntax error");
+}
+
+/**
+ * Test ID form variants
+ */
+void TransliteratorTest::TestIDForms() {
+ const char* DATA[] = {
+ "NFC", NULL, "NFD",
+ "nfd", NULL, "NFC", // make sure case is ignored
+ "Any-NFKD", NULL, "Any-NFKC",
+ "Null", NULL, "Null",
+ "-nfkc", "nfkc", "NFKD",
+ "-nfkc/", "nfkc", "NFKD",
+ "Latin-Greek/UNGEGN", NULL, "Greek-Latin/UNGEGN",
+ "Greek/UNGEGN-Latin", "Greek-Latin/UNGEGN", "Latin-Greek/UNGEGN",
+ "Bengali-Devanagari/", "Bengali-Devanagari", "Devanagari-Bengali",
+ "Source-", NULL, NULL,
+ "Source/Variant-", NULL, NULL,
+ "Source-/Variant", NULL, NULL,
+ "/Variant", NULL, NULL,
+ "/Variant-", NULL, NULL,
+ "-/Variant", NULL, NULL,
+ "-/", NULL, NULL,
+ "-", NULL, NULL,
+ "/", NULL, NULL,
+ };
+ const int32_t DATA_length = sizeof(DATA)/sizeof(DATA[0]);
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ const char* ID = DATA[i];
+ const char* expID = DATA[i+1];
+ const char* expInvID = DATA[i+2];
+ UBool expValid = (expInvID != NULL);
+ if (expID == NULL) {
+ expID = ID;
+ }
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t =
+ Transliterator::createInstance(ID, UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ if (!expValid) {
+ logln((UnicodeString)"Ok: getInstance(" + ID +") => " + u_errorName(ec));
+ } else {
+ errln((UnicodeString)"FAIL: Couldn't create " + ID);
+ }
+ delete t;
+ continue;
+ }
+ Transliterator *u = t->createInverse(ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: Couldn't create inverse of " + ID);
+ delete t;
+ delete u;
+ continue;
+ }
+ if (t->getID() == expID &&
+ u->getID() == expInvID) {
+ logln((UnicodeString)"Ok: " + ID + ".getInverse() => " + expInvID);
+ } else {
+ errln((UnicodeString)"FAIL: getInstance(" + ID + ") => " +
+ t->getID() + " x getInverse() => " + u->getID() +
+ ", expected " + expInvID);
+ }
+ delete t;
+ delete u;
+ }
+}
+
+static const UChar SPACE[] = {32,0};
+static const UChar NEWLINE[] = {10,0};
+static const UChar RETURN[] = {13,0};
+static const UChar EMPTY[] = {0};
+
+void TransliteratorTest::checkRules(const UnicodeString& label, Transliterator& t2,
+ const UnicodeString& testRulesForward) {
+ UnicodeString rules2; t2.toRules(rules2, TRUE);
+ //rules2 = TestUtility.replaceAll(rules2, new UnicodeSet("[' '\n\r]"), "");
+ rules2.findAndReplace(SPACE, EMPTY);
+ rules2.findAndReplace(NEWLINE, EMPTY);
+ rules2.findAndReplace(RETURN, EMPTY);
+
+ UnicodeString testRules(testRulesForward); testRules.findAndReplace(SPACE, EMPTY);
+
+ if (rules2 != testRules) {
+ errln(label);
+ logln((UnicodeString)"GENERATED RULES: " + rules2);
+ logln((UnicodeString)"SHOULD BE: " + testRulesForward);
+ }
+}
+
+/**
+ * Mark's toRules test.
+ */
+void TransliteratorTest::TestToRulesMark() {
+ const char* testRules =
+ "::[[:Latin:][:Mark:]];"
+ "::NFKD (NFC);"
+ "::Lower (Lower);"
+ "a <> \\u03B1;" // alpha
+ "::NFKC (NFD);"
+ "::Upper (Lower);"
+ "::Lower ();"
+ "::([[:Greek:][:Mark:]]);"
+ ;
+ const char* testRulesForward =
+ "::[[:Latin:][:Mark:]];"
+ "::NFKD(NFC);"
+ "::Lower(Lower);"
+ "a > \\u03B1;"
+ "::NFKC(NFD);"
+ "::Upper (Lower);"
+ "::Lower ();"
+ ;
+ const char* testRulesBackward =
+ "::[[:Greek:][:Mark:]];"
+ "::Lower (Upper);"
+ "::NFD(NFKC);"
+ "\\u03B1 > a;"
+ "::Lower(Lower);"
+ "::NFC(NFKD);"
+ ;
+ UnicodeString source = CharsToUnicodeString("\\u00E1"); // a-acute
+ UnicodeString target = CharsToUnicodeString("\\u03AC"); // alpha-acute
+
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t2 = Transliterator::createFromRules("source-target", testRules, UTRANS_FORWARD, pe, ec);
+ Transliterator *t3 = Transliterator::createFromRules("target-source", testRules, UTRANS_REVERSE, pe, ec);
+
+ if (U_FAILURE(ec)) {
+ delete t2;
+ delete t3;
+ errln((UnicodeString)"FAIL: createFromRules => " + u_errorName(ec));
+ return;
+ }
+
+ expect(*t2, source, target);
+ expect(*t3, target, source);
+
+ checkRules("Failed toRules FORWARD", *t2, testRulesForward);
+ checkRules("Failed toRules BACKWARD", *t3, testRulesBackward);
+
+ delete t2;
+ delete t3;
+}
+
+/**
+ * Test Escape and Unescape transliterators.
+ */
+void TransliteratorTest::TestEscape() {
+ UParseError pe;
+ UErrorCode ec;
+ Transliterator *t;
+
+ ec = U_ZERO_ERROR;
+ t = Transliterator::createInstance("Hex-Any", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createInstance");
+ } else {
+ expect(*t,
+ "\\x{40}\\U00000031&#x32;&#81;",
+ "@12Q");
+ }
+ delete t;
+
+ ec = U_ZERO_ERROR;
+ t = Transliterator::createInstance("Any-Hex/C", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createInstance");
+ } else {
+ expect(*t,
+ CharsToUnicodeString("A\\U0010BEEF\\uFEED"),
+ "\\u0041\\U0010BEEF\\uFEED");
+ }
+ delete t;
+
+ ec = U_ZERO_ERROR;
+ t = Transliterator::createInstance("Any-Hex/Java", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createInstance");
+ } else {
+ expect(*t,
+ CharsToUnicodeString("A\\U0010BEEF\\uFEED"),
+ "\\u0041\\uDBEF\\uDEEF\\uFEED");
+ }
+ delete t;
+
+ ec = U_ZERO_ERROR;
+ t = Transliterator::createInstance("Any-Hex/Perl", UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createInstance");
+ } else {
+ expect(*t,
+ CharsToUnicodeString("A\\U0010BEEF\\uFEED"),
+ "\\x{41}\\x{10BEEF}\\x{FEED}");
+ }
+ delete t;
+}
+
+
+void TransliteratorTest::TestAnchorMasking(){
+ UnicodeString rule ("^a > Q; a > q;");
+ UErrorCode status= U_ZERO_ERROR;
+ UParseError parseError;
+
+ Transliterator* t = Transliterator::createFromRules("ID", rule, UTRANS_FORWARD,parseError,status);
+ if(U_FAILURE(status)){
+ errln(UnicodeString("FAIL: ") + "ID" +
+ ".createFromRules() => bad rules" +
+ /*", parse error " + parseError.code +*/
+ ", line " + parseError.line +
+ ", offset " + parseError.offset +
+ ", context " + prettify(parseError.preContext, TRUE) +
+ ", rules: " + prettify(rule, TRUE));
+ }
+ delete t;
+}
+
+/**
+ * Make sure display names of variants look reasonable.
+ */
+void TransliteratorTest::TestDisplayName() {
+#if UCONFIG_NO_FORMATTING
+ logln("Skipping, UCONFIG_NO_FORMATTING is set\n");
+ return;
+#else
+ static const char* DATA[] = {
+ // ID, forward name, reverse name
+ // Update the text as necessary -- the important thing is
+ // not the text itself, but how various cases are handled.
+
+ // Basic test
+ "Any-Hex", "Any to Hex Escape", "Hex Escape to Any",
+
+ // Variants
+ "Any-Hex/Perl", "Any to Hex Escape/Perl", "Hex Escape to Any/Perl",
+
+ // Target-only IDs
+ "NFC", "Any to NFC", "Any to NFD",
+ };
+
+ int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]);
+
+ Locale US("en", "US");
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ UnicodeString name;
+ Transliterator::getDisplayName(DATA[i], US, name);
+ if (name != DATA[i+1]) {
+ errln((UnicodeString)"FAIL: " + DATA[i] + ".getDisplayName() => " +
+ name + ", expected " + DATA[i+1]);
+ } else {
+ logln((UnicodeString)"Ok: " + DATA[i] + ".getDisplayName() => " + name);
+ }
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ Transliterator *t = Transliterator::createInstance(DATA[i], UTRANS_REVERSE, pe, ec);
+ if (U_FAILURE(ec)) {
+ delete t;
+ errln("FAIL: createInstance failed");
+ continue;
+ }
+ name = Transliterator::getDisplayName(t->getID(), US, name);
+ if (name != DATA[i+2]) {
+ errln((UnicodeString)"FAIL: " + t->getID() + ".getDisplayName() => " +
+ name + ", expected " + DATA[i+2]);
+ } else {
+ logln((UnicodeString)"Ok: " + t->getID() + ".getDisplayName() => " + name);
+ }
+ delete t;
+ }
+#endif
+}
+
+void TransliteratorTest::TestSpecialCases(void) {
+ const UnicodeString registerRules[] = {
+ "Any-Dev1", "x > X; y > Y;",
+ "Any-Dev2", "XY > Z",
+ "Greek-Latin/FAKE",
+ CharsToUnicodeString
+ ("[^[:L:][:M:]] { \\u03bc\\u03c0 > b ; \\u03bc\\u03c0 } [^[:L:][:M:]] > b ; [^[:L:][:M:]] { [\\u039c\\u03bc][\\u03a0\\u03c0] > B ; [\\u039c\\u03bc][\\u03a0\\u03c0] } [^[:L:][:M:]] > B ;"),
+ "" // END MARKER
+ };
+
+ const UnicodeString testCases[] = {
+ // NORMALIZATION
+ // should add more test cases
+ "NFD" , CharsToUnicodeString("a\\u0300 \\u00E0 \\u1100\\u1161 \\uFF76\\uFF9E\\u03D3"), "",
+ "NFC" , CharsToUnicodeString("a\\u0300 \\u00E0 \\u1100\\u1161 \\uFF76\\uFF9E\\u03D3"), "",
+ "NFKD", CharsToUnicodeString("a\\u0300 \\u00E0 \\u1100\\u1161 \\uFF76\\uFF9E\\u03D3"), "",
+ "NFKC", CharsToUnicodeString("a\\u0300 \\u00E0 \\u1100\\u1161 \\uFF76\\uFF9E\\u03D3"), "",
+
+ // mp -> b BUG
+ "Greek-Latin/UNGEGN", CharsToUnicodeString("(\\u03BC\\u03C0)"), "(b)",
+ "Greek-Latin/FAKE", CharsToUnicodeString("(\\u03BC\\u03C0)"), "(b)",
+
+ // check for devanagari bug
+ "nfd;Dev1;Dev2;nfc", "xy", "Z",
+
+ // ff, i, dotless-i, I, dotted-I, LJLjlj deseret deeDEE
+ "Title", CharsToUnicodeString("ab'cD ffi\\u0131I\\u0130 \\u01C7\\u01C8\\u01C9 ") + DESERET_dee + DESERET_DEE,
+ CharsToUnicodeString("Ab'cd Ffi\\u0131ii\\u0307 \\u01C8\\u01C9\\u01C9 ") + DESERET_DEE + DESERET_dee,
+
+ //TODO: enable this test once Titlecase works right
+ /*
+ "Title", CharsToUnicodeString("\\uFB00i\\u0131I\\u0130 \\u01C7\\u01C8\\u01C9 ") + DESERET_dee + DESERET_DEE,
+ CharsToUnicodeString("Ffi\\u0131ii \\u01C8\\u01C9\\u01C9 ") + DESERET_DEE + DESERET_dee,
+ */
+ "Upper", CharsToUnicodeString("ab'cD \\uFB00i\\u0131I\\u0130 \\u01C7\\u01C8\\u01C9 ") + DESERET_dee + DESERET_DEE,
+ CharsToUnicodeString("AB'CD FFIII\\u0130 \\u01C7\\u01C7\\u01C7 ") + DESERET_DEE + DESERET_DEE,
+ "Lower", CharsToUnicodeString("ab'cD \\uFB00i\\u0131I\\u0130 \\u01C7\\u01C8\\u01C9 ") + DESERET_dee + DESERET_DEE,
+ CharsToUnicodeString("ab'cd \\uFB00i\\u0131ii\\u0307 \\u01C9\\u01C9\\u01C9 ") + DESERET_dee + DESERET_dee,
+
+ "Upper", CharsToUnicodeString("ab'cD \\uFB00i\\u0131I\\u0130 \\u01C7\\u01C8\\u01C9 ") + DESERET_dee + DESERET_DEE, "",
+ "Lower", CharsToUnicodeString("ab'cD \\uFB00i\\u0131I\\u0130 \\u01C7\\u01C8\\u01C9 ") + DESERET_dee + DESERET_DEE, "",
+
+ // FORMS OF S
+ "Greek-Latin/UNGEGN", CharsToUnicodeString("\\u03C3 \\u03C3\\u03C2 \\u03C2\\u03C3"),
+ CharsToUnicodeString("s ss s\\u0331s\\u0331") ,
+ "Latin-Greek/UNGEGN", CharsToUnicodeString("s ss s\\u0331s\\u0331"),
+ CharsToUnicodeString("\\u03C3 \\u03C3\\u03C2 \\u03C2\\u03C3") ,
+ "Greek-Latin", CharsToUnicodeString("\\u03C3 \\u03C3\\u03C2 \\u03C2\\u03C3"),
+ CharsToUnicodeString("s ss s\\u0331s\\u0331") ,
+ "Latin-Greek", CharsToUnicodeString("s ss s\\u0331s\\u0331"),
+ CharsToUnicodeString("\\u03C3 \\u03C3\\u03C2 \\u03C2\\u03C3"),
+ // Tatiana bug
+ // Upper: TAT\\u02B9\\u00C2NA
+ // Lower: tat\\u02B9\\u00E2na
+ // Title: Tat\\u02B9\\u00E2na
+ "Upper", CharsToUnicodeString("tat\\u02B9\\u00E2na"),
+ CharsToUnicodeString("TAT\\u02B9\\u00C2NA"),
+ "Lower", CharsToUnicodeString("TAT\\u02B9\\u00C2NA"),
+ CharsToUnicodeString("tat\\u02B9\\u00E2na"),
+ "Title", CharsToUnicodeString("tat\\u02B9\\u00E2na"),
+ CharsToUnicodeString("Tat\\u02B9\\u00E2na"),
+
+ "" // END MARKER
+ };
+
+ UParseError pos;
+ int32_t i;
+ for (i = 0; registerRules[i].length()!=0; i+=2) {
+ UErrorCode status = U_ZERO_ERROR;
+
+ Transliterator *t = Transliterator::createFromRules(registerRules[0+i],
+ registerRules[i+1], UTRANS_FORWARD, pos, status);
+ if (U_FAILURE(status)) {
+ errln("Fails: Unable to create the transliterator from rules.");
+ } else {
+ Transliterator::registerInstance(t);
+ }
+ }
+ for (i = 0; testCases[i].length()!=0; i+=3) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ const UnicodeString& name = testCases[i];
+ Transliterator *t = Transliterator::createInstance(name, UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: Couldn't create " + name);
+ delete t;
+ continue;
+ }
+ const UnicodeString& id = t->getID();
+ const UnicodeString& source = testCases[i+1];
+ UnicodeString target;
+
+ // Automatic generation of targets, to make it simpler to add test cases (and more fail-safe)
+
+ if (testCases[i+2].length() > 0) {
+ target = testCases[i+2];
+ } else if (0==id.caseCompare("NFD", U_FOLD_CASE_DEFAULT)) {
+ Normalizer::normalize(source, UNORM_NFD, 0, target, ec);
+ } else if (0==id.caseCompare("NFC", U_FOLD_CASE_DEFAULT)) {
+ Normalizer::normalize(source, UNORM_NFC, 0, target, ec);
+ } else if (0==id.caseCompare("NFKD", U_FOLD_CASE_DEFAULT)) {
+ Normalizer::normalize(source, UNORM_NFKD, 0, target, ec);
+ } else if (0==id.caseCompare("NFKC", U_FOLD_CASE_DEFAULT)) {
+ Normalizer::normalize(source, UNORM_NFKC, 0, target, ec);
+ } else if (0==id.caseCompare("Lower", U_FOLD_CASE_DEFAULT)) {
+ target = source;
+ target.toLower(Locale::getUS());
+ } else if (0==id.caseCompare("Upper", U_FOLD_CASE_DEFAULT)) {
+ target = source;
+ target.toUpper(Locale::getUS());
+ }
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: Internal error normalizing " + source);
+ continue;
+ }
+
+ expect(*t, source, target);
+ delete t;
+ }
+ for (i = 0; registerRules[i].length()!=0; i+=2) {
+ Transliterator::unregister(registerRules[i]);
+ }
+}
+
+char* Char32ToEscapedChars(UChar32 ch, char* buffer) {
+ if (ch <= 0xFFFF) {
+ sprintf(buffer, "\\u%04x", (int)ch);
+ } else {
+ sprintf(buffer, "\\U%08x", (int)ch);
+ }
+ return buffer;
+}
+
+void TransliteratorTest::TestSurrogateCasing (void) {
+ // check that casing handles surrogates
+ // titlecase is currently defective
+ char buffer[20];
+ UChar buffer2[20];
+ UChar32 dee;
+ UTF_GET_CHAR(DESERET_dee,0, 0, DESERET_dee.length(), dee);
+ UnicodeString DEE(u_totitle(dee));
+ if (DEE != DESERET_DEE) {
+ err("Fails titlecase of surrogates");
+ err(Char32ToEscapedChars(dee, buffer));
+ err(", ");
+ errln(Char32ToEscapedChars(DEE.char32At(0), buffer));
+ }
+
+ UnicodeString deeDEETest=DESERET_dee + DESERET_DEE;
+ UnicodeString deedeeTest = DESERET_dee + DESERET_dee;
+ UnicodeString DEEDEETest = DESERET_DEE + DESERET_DEE;
+ UErrorCode status= U_ZERO_ERROR;
+
+ u_strToUpper(buffer2, 20, deeDEETest.getBuffer(), deeDEETest.length(), NULL, &status);
+ if (U_FAILURE(status) || (UnicodeString(buffer2)!= DEEDEETest)) {
+ errln("Fails: Can't uppercase surrogates.");
+ }
+
+ status= U_ZERO_ERROR;
+ u_strToLower(buffer2, 20, deeDEETest.getBuffer(), deeDEETest.length(), NULL, &status);
+ if (U_FAILURE(status) || (UnicodeString(buffer2)!= deedeeTest)) {
+ errln("Fails: Can't lowercase surrogates.");
+ }
+}
+
+static void _trans(Transliterator& t, const UnicodeString& src,
+ UnicodeString& result) {
+ result = src;
+ t.transliterate(result);
+}
+
+static void _trans(const UnicodeString& id, const UnicodeString& src,
+ UnicodeString& result, UErrorCode ec) {
+ UParseError pe;
+ Transliterator *t = Transliterator::createInstance(id, UTRANS_FORWARD, pe, ec);
+ if (U_SUCCESS(ec)) {
+ _trans(*t, src, result);
+ }
+ delete t;
+}
+
+static UnicodeString _findMatch(const UnicodeString& source,
+ const UnicodeString* pairs) {
+ UnicodeString empty;
+ for (int32_t i=0; pairs[i].length() > 0; i+=2) {
+ if (0==source.caseCompare(pairs[i], U_FOLD_CASE_DEFAULT)) {
+ return pairs[i+1];
+ }
+ }
+ return empty;
+}
+
+// Check to see that incremental gets at least part way through a reasonable string.
+
+void TransliteratorTest::TestIncrementalProgress(void) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeString latinTest = "The Quick Brown Fox.";
+ UnicodeString devaTest;
+ _trans("Latin-Devanagari", latinTest, devaTest, ec);
+ UnicodeString kataTest;
+ _trans("Latin-Katakana", latinTest, kataTest, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Internal error");
+ return;
+ }
+ const UnicodeString tests[] = {
+ "Any", latinTest,
+ "Latin", latinTest,
+ "Halfwidth", latinTest,
+ "Devanagari", devaTest,
+ "Katakana", kataTest,
+ "" // END MARKER
+ };
+
+ UnicodeString test("The Quick Brown Fox Jumped Over The Lazy Dog.");
+ int32_t i = 0, j=0, k=0;
+ int32_t sources = Transliterator::countAvailableSources();
+ for (i = 0; i < sources; i++) {
+ UnicodeString source;
+ Transliterator::getAvailableSource(i, source);
+ UnicodeString test = _findMatch(source, tests);
+ if (test.length() == 0) {
+ logln((UnicodeString)"Skipping " + source + "-X");
+ continue;
+ }
+ int32_t targets = Transliterator::countAvailableTargets(source);
+ for (j = 0; j < targets; j++) {
+ UnicodeString target;
+ Transliterator::getAvailableTarget(j, source, target);
+ int32_t variants = Transliterator::countAvailableVariants(source, target);
+ for (k =0; k< variants; k++) {
+ UnicodeString variant;
+ UParseError err;
+ UErrorCode status = U_ZERO_ERROR;
+
+ Transliterator::getAvailableVariant(k, source, target, variant);
+ UnicodeString id = source + "-" + target + "/" + variant;
+
+ if(id.indexOf("Thai")>-1 && !isICUVersionAtLeast(ICU_39)){
+ /* The Thai-Latin transliterator doesn't exist in ICU4C yet */
+ continue;
+ }
+ Transliterator *t = Transliterator::createInstance(id, UTRANS_FORWARD, err, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: Could not create " + id);
+ delete t;
+ continue;
+ }
+ status = U_ZERO_ERROR;
+ CheckIncrementalAux(t, test);
+
+ UnicodeString rev;
+ _trans(*t, test, rev);
+ Transliterator *inv = t->createInverse(status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: Could not create inverse of " + id);
+ delete t;
+ delete inv;
+ continue;
+ }
+ CheckIncrementalAux(inv, rev);
+ delete t;
+ delete inv;
+ }
+ }
+ }
+}
+
+void TransliteratorTest::CheckIncrementalAux(const Transliterator* t,
+ const UnicodeString& input) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UTransPosition pos;
+ UnicodeString test = input;
+
+ pos.contextStart = 0;
+ pos.contextLimit = input.length();
+ pos.start = 0;
+ pos.limit = input.length();
+
+ t->transliterate(test, pos, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: transliterate() error " + u_errorName(ec));
+ return;
+ }
+ UBool gotError = FALSE;
+
+ // we have a few special cases. Any-Remove (pos.start = 0, but also = limit) and U+XXXXX?X?
+
+ if (pos.start == 0 && pos.limit != 0 && t->getID() != "Hex-Any/Unicode") {
+ errln((UnicodeString)"No Progress, " +
+ t->getID() + ": " + formatInput(test, input, pos));
+ gotError = TRUE;
+ } else {
+ logln((UnicodeString)"PASS Progress, " +
+ t->getID() + ": " + formatInput(test, input, pos));
+ }
+ t->finishTransliteration(test, pos);
+ if (pos.start != pos.limit) {
+ errln((UnicodeString)"Incomplete, " +
+ t->getID() + ": " + formatInput(test, input, pos));
+ gotError = TRUE;
+ }
+}
+
+void TransliteratorTest::TestFunction() {
+ // Careful with spacing and ';' here: Phrase this exactly
+ // as toRules() is going to return it. If toRules() changes
+ // with regard to spacing or ';', then adjust this string.
+ UnicodeString rule =
+ "([:Lu:]) > $1 '(' &Lower( $1 ) '=' &Hex( &Any-Lower( $1 ) ) ')';";
+
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("Test", rule, UTRANS_FORWARD, pe, ec);
+ if (t == NULL) {
+ errln("FAIL: createFromRules failed");
+ return;
+ }
+
+ UnicodeString r;
+ t->toRules(r, TRUE);
+ if (r == rule) {
+ logln((UnicodeString)"OK: toRules() => " + r);
+ } else {
+ errln((UnicodeString)"FAIL: toRules() => " + r +
+ ", expected " + rule);
+ }
+
+ expect(*t, "The Quick Brown Fox",
+ "T(t=\\u0074)he Q(q=\\u0071)uick B(b=\\u0062)rown F(f=\\u0066)ox");
+
+ delete t;
+}
+
+void TransliteratorTest::TestInvalidBackRef(void) {
+ UnicodeString rule = ". > $1;";
+ UnicodeString rule2 =CharsToUnicodeString("(.) <> &hex/unicode($1) &name($1); . > $1; [{}] >\\u0020;");
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator *t = Transliterator::createFromRules("Test", rule, UTRANS_FORWARD, pe, ec);
+ Transliterator *t2 = Transliterator::createFromRules("Test2", rule2, UTRANS_FORWARD, pe, ec);
+
+ if (t != NULL) {
+ errln("FAIL: createFromRules should have returned NULL");
+ delete t;
+ }
+
+ if (t2 != NULL) {
+ errln("FAIL: createFromRules should have returned NULL");
+ delete t2;
+ }
+
+ if (U_SUCCESS(ec)) {
+ errln("FAIL: Ok: . > $1; => no error");
+ } else {
+ logln((UnicodeString)"Ok: . > $1; => " + u_errorName(ec));
+ }
+}
+
+void TransliteratorTest::TestMulticharStringSet() {
+ // Basic testing
+ const char* rule =
+ " [{aa}] > x;"
+ " a > y;"
+ " [b{bc}] > z;"
+ "[{gd}] { e > q;"
+ " e } [{fg}] > r;" ;
+
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+ Transliterator* t = Transliterator::createFromRules("Test", rule, UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ delete t;
+ errln("FAIL: createFromRules failed");
+ return;
+ }
+
+ expect(*t, "a aa ab bc d gd de gde gdefg ddefg",
+ "y x yz z d gd de gdq gdqfg ddrfg");
+ delete t;
+
+ // Overlapped string test. Make sure that when multiple
+ // strings can match that the longest one is matched.
+ rule =
+ " [a {ab} {abc}] > x;"
+ " b > y;"
+ " c > z;"
+ " q [t {st} {rst}] { e > p;" ;
+
+ t = Transliterator::createFromRules("Test", rule, UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ delete t;
+ errln("FAIL: createFromRules failed");
+ return;
+ }
+
+ expect(*t, "a ab abc qte qste qrste",
+ "x x x qtp qstp qrstp");
+ delete t;
+}
+
+// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+// BEGIN TestUserFunction support factory
+
+Transliterator* _TUFF[4];
+UnicodeString* _TUFID[4];
+
+static Transliterator* U_EXPORT2 _TUFFactory(const UnicodeString& /*ID*/,
+ Transliterator::Token context) {
+ return _TUFF[context.integer]->clone();
+}
+
+static void _TUFReg(const UnicodeString& ID, Transliterator* t, int32_t n) {
+ _TUFF[n] = t;
+ _TUFID[n] = new UnicodeString(ID);
+ Transliterator::registerFactory(ID, _TUFFactory, Transliterator::integerToken(n));
+}
+
+static void _TUFUnreg(int32_t n) {
+ if (_TUFF[n] != NULL) {
+ Transliterator::unregister(*_TUFID[n]);
+ delete _TUFF[n];
+ delete _TUFID[n];
+ }
+}
+
+// END TestUserFunction support factory
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+/**
+ * Test that user-registered transliterators can be used under function
+ * syntax.
+ */
+void TransliteratorTest::TestUserFunction() {
+
+ Transliterator* t;
+ UParseError pe;
+ UErrorCode ec = U_ZERO_ERROR;
+
+ // Setup our factory
+ int32_t i;
+ for (i=0; i<4; ++i) {
+ _TUFF[i] = NULL;
+ }
+
+ // There's no need to register inverses if we don't use them
+ t = Transliterator::createFromRules("gif",
+ "'\\'u(..)(..) > '<img src=\"http://www.unicode.org/gifs/24/' $1 '/U' $1$2 '.gif\">';",
+ UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createFromRules gif " + u_errorName(ec));
+ return;
+ }
+ _TUFReg("Any-gif", t, 0);
+
+ t = Transliterator::createFromRules("RemoveCurly",
+ "[\\{\\}] > ; '\\N' > ;",
+ UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createFromRules RemoveCurly " + u_errorName(ec));
+ goto FAIL;
+ }
+ expect(*t, "\\N{name}", "name");
+ _TUFReg("Any-RemoveCurly", t, 1);
+
+ logln("Trying &hex");
+ t = Transliterator::createFromRules("hex2",
+ "(.) > &hex($1);",
+ UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln("FAIL: createFromRules");
+ goto FAIL;
+ }
+ logln("Registering");
+ _TUFReg("Any-hex2", t, 2);
+ t = Transliterator::createInstance("Any-hex2", UTRANS_FORWARD, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createInstance Any-hex2 " + u_errorName(ec));
+ goto FAIL;
+ }
+ expect(*t, "abc", "\\u0061\\u0062\\u0063");
+ delete t;
+
+ logln("Trying &gif");
+ t = Transliterator::createFromRules("gif2",
+ "(.) > &Gif(&Hex2($1));",
+ UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createFromRules gif2 " + u_errorName(ec));
+ goto FAIL;
+ }
+ logln("Registering");
+ _TUFReg("Any-gif2", t, 3);
+ t = Transliterator::createInstance("Any-gif2", UTRANS_FORWARD, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createInstance Any-gif2 " + u_errorName(ec));
+ goto FAIL;
+ }
+ expect(*t, "ab", "<img src=\"http://www.unicode.org/gifs/24/00/U0061.gif\">"
+ "<img src=\"http://www.unicode.org/gifs/24/00/U0062.gif\">");
+ delete t;
+
+ // Test that filters are allowed after &
+ t = Transliterator::createFromRules("test",
+ "(.) > &Hex($1) ' ' &RemoveCurly(&Name($1)) ' ';",
+ UTRANS_FORWARD, pe, ec);
+ if (t == NULL || U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: createFromRules test " + u_errorName(ec));
+ goto FAIL;
+ }
+ expect(*t, "abc",
+ "\\u0061 LATIN SMALL LETTER A \\u0062 LATIN SMALL LETTER B \\u0063 LATIN SMALL LETTER C ");
+ delete t;
+
+ FAIL:
+ for (i=0; i<4; ++i) {
+ _TUFUnreg(i);
+ }
+}
+
+/**
+ * Test the Any-X transliterators.
+ */
+void TransliteratorTest::TestAnyX(void) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* anyLatin =
+ Transliterator::createInstance("Any-Latin", UTRANS_FORWARD, parseError, status);
+ if (anyLatin==0) {
+ errln("FAIL: createInstance returned NULL");
+ delete anyLatin;
+ return;
+ }
+
+ expect(*anyLatin,
+ CharsToUnicodeString("greek:\\u03B1\\u03B2\\u03BA\\u0391\\u0392\\u039A hiragana:\\u3042\\u3076\\u304F cyrillic:\\u0430\\u0431\\u0446"),
+ CharsToUnicodeString("greek:abkABK hiragana:abuku cyrillic:abc"));
+
+ delete anyLatin;
+}
+
+/**
+ * Test the source and target set API. These are only implemented
+ * for RBT and CompoundTransliterator at this time.
+ */
+void TransliteratorTest::TestSourceTargetSet() {
+ UErrorCode ec = U_ZERO_ERROR;
+
+ // Rules
+ const char* r =
+ "a > b; "
+ "r [x{lu}] > q;";
+
+ // Expected source
+ UnicodeSet expSrc("[arx{lu}]", ec);
+
+ // Expected target
+ UnicodeSet expTrg("[bq]", ec);
+
+ UParseError pe;
+ Transliterator* t = Transliterator::createFromRules("test", r, UTRANS_FORWARD, pe, ec);
+
+ if (U_FAILURE(ec)) {
+ delete t;
+ errln("FAIL: Couldn't set up test");
+ return;
+ }
+
+ UnicodeSet src; t->getSourceSet(src);
+ UnicodeSet trg; t->getTargetSet(trg);
+
+ if (src == expSrc && trg == expTrg) {
+ UnicodeString a, b;
+ logln((UnicodeString)"Ok: " +
+ r + " => source = " + src.toPattern(a, TRUE) +
+ ", target = " + trg.toPattern(b, TRUE));
+ } else {
+ UnicodeString a, b, c, d;
+ errln((UnicodeString)"FAIL: " +
+ r + " => source = " + src.toPattern(a, TRUE) +
+ ", expected " + expSrc.toPattern(b, TRUE) +
+ "; target = " + trg.toPattern(c, TRUE) +
+ ", expected " + expTrg.toPattern(d, TRUE));
+ }
+
+ delete t;
+}
+
+/**
+ * Test handling of rule whitespace, for both RBT and UnicodeSet.
+ */
+void TransliteratorTest::TestRuleWhitespace() {
+ // Rules
+ const char* r = "a > \\u200E b;";
+
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ Transliterator* t = Transliterator::createFromRules("test", CharsToUnicodeString(r), UTRANS_FORWARD, pe, ec);
+
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Couldn't set up test");
+ } else {
+ expect(*t, "a", "b");
+ }
+ delete t;
+
+ // UnicodeSet
+ ec = U_ZERO_ERROR;
+ UnicodeSet set(CharsToUnicodeString("[a \\u200E]"), ec);
+
+ if (U_FAILURE(ec)) {
+ errln("FAIL: Couldn't set up test");
+ } else {
+ if (set.contains(0x200E)) {
+ errln("FAIL: U+200E not being ignored by UnicodeSet");
+ }
+ }
+}
+//======================================================================
+// this method is in TestUScript.java
+//======================================================================
+void TransliteratorTest::TestAllCodepoints(){
+ UScriptCode code= USCRIPT_INVALID_CODE;
+ char id[256]={'\0'};
+ char abbr[256]={'\0'};
+ char newId[256]={'\0'};
+ char newAbbrId[256]={'\0'};
+ char oldId[256]={'\0'};
+ char oldAbbrId[256]={'\0'};
+
+ UErrorCode status =U_ZERO_ERROR;
+ UParseError pe;
+
+ for(uint32_t i = 0; i<=0x10ffff; i++){
+ code = uscript_getScript(i,&status);
+ if(code == USCRIPT_INVALID_CODE){
+ errln("uscript_getScript for codepoint \\U%08X failed.\n", i);
+ }
+ const char* myId = uscript_getName(code);
+ if(!myId) {
+ errln("Valid script code returned NULL name. Check your data!");
+ return;
+ }
+ uprv_strcpy(id,myId);
+ uprv_strcpy(abbr,uscript_getShortName(code));
+
+ uprv_strcpy(newId,"[:");
+ uprv_strcat(newId,id);
+ uprv_strcat(newId,":];NFD");
+
+ uprv_strcpy(newAbbrId,"[:");
+ uprv_strcat(newAbbrId,abbr);
+ uprv_strcat(newAbbrId,":];NFD");
+
+ if(uprv_strcmp(newId,oldId)!=0){
+ Transliterator* t = Transliterator::createInstance(newId,UTRANS_FORWARD,pe,status);
+ if(t==NULL || U_FAILURE(status)){
+ errln((UnicodeString)"FAIL: Could not create " + id);
+ }
+ delete t;
+ }
+ if(uprv_strcmp(newAbbrId,oldAbbrId)!=0){
+ Transliterator* t = Transliterator::createInstance(newAbbrId,UTRANS_FORWARD,pe,status);
+ if(t==NULL || U_FAILURE(status)){
+ errln((UnicodeString)"FAIL: Could not create " + id);
+ }
+ delete t;
+ }
+ uprv_strcpy(oldId,newId);
+ uprv_strcpy(oldAbbrId, newAbbrId);
+
+ }
+
+}
+
+#define TEST_TRANSLIT_ID(id, cls) { \
+ UErrorCode ec = U_ZERO_ERROR; \
+ Transliterator* t = Transliterator::createInstance(id, UTRANS_FORWARD, ec); \
+ if (U_FAILURE(ec)) { \
+ errln("FAIL: Couldn't create " id); \
+ } else { \
+ if (t->getDynamicClassID() != cls::getStaticClassID()) { \
+ errln("FAIL: " #cls " dynamic and static class ID mismatch"); \
+ } \
+ /* *t = *t; */ /*can't do this: coverage test for assignment op*/ \
+ } \
+ delete t; \
+}
+
+#define TEST_TRANSLIT_RULE(rule, cls) { \
+ UErrorCode ec = U_ZERO_ERROR; \
+ UParseError pe; \
+ Transliterator* t = Transliterator::createFromRules("_", rule, UTRANS_FORWARD, pe, ec); \
+ if (U_FAILURE(ec)) { \
+ errln("FAIL: Couldn't create " rule); \
+ } else { \
+ if (t->getDynamicClassID() != cls ::getStaticClassID()) { \
+ errln("FAIL: " #cls " dynamic and static class ID mismatch"); \
+ } \
+ /* *t = *t; */ /*can't do this: coverage test for assignment op*/ \
+ } \
+ delete t; \
+}
+
+void TransliteratorTest::TestBoilerplate() {
+ TEST_TRANSLIT_ID("Any-Latin", AnyTransliterator);
+ TEST_TRANSLIT_ID("Any-Hex", EscapeTransliterator);
+ TEST_TRANSLIT_ID("Hex-Any", UnescapeTransliterator);
+ TEST_TRANSLIT_ID("Lower", LowercaseTransliterator);
+ TEST_TRANSLIT_ID("Upper", UppercaseTransliterator);
+ TEST_TRANSLIT_ID("Title", TitlecaseTransliterator);
+ TEST_TRANSLIT_ID("Null", NullTransliterator);
+ TEST_TRANSLIT_ID("Remove", RemoveTransliterator);
+ TEST_TRANSLIT_ID("Any-Name", UnicodeNameTransliterator);
+ TEST_TRANSLIT_ID("Name-Any", NameUnicodeTransliterator);
+ TEST_TRANSLIT_ID("NFD", NormalizationTransliterator);
+ TEST_TRANSLIT_ID("Latin-Greek", CompoundTransliterator);
+ TEST_TRANSLIT_RULE("a>b;", RuleBasedTransliterator);
+}
+
+void TransliteratorTest::TestAlternateSyntax() {
+ // U+2206 == &
+ // U+2190 == <
+ // U+2192 == >
+ // U+2194 == <>
+ expect(CharsToUnicodeString("a \\u2192 x; b \\u2190 y; c \\u2194 z"),
+ "abc",
+ "xbz");
+ expect(CharsToUnicodeString("([:^ASCII:]) \\u2192 \\u2206Name($1);"),
+ CharsToUnicodeString("<=\\u2190; >=\\u2192; <>=\\u2194; &=\\u2206"),
+ "<=\\N{LEFTWARDS ARROW}; >=\\N{RIGHTWARDS ARROW}; <>=\\N{LEFT RIGHT ARROW}; &=\\N{INCREMENT}");
+}
+
+static const char* BEGIN_END_RULES[] = {
+ // [0]
+ "abc > xy;"
+ "aba > z;",
+
+ // [1]
+/*
+ "::BEGIN;"
+ "abc > xy;"
+ "::END;"
+ "::BEGIN;"
+ "aba > z;"
+ "::END;",
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [2]
+/*
+ "abc > xy;"
+ "::BEGIN;"
+ "aba > z;"
+ "::END;",
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [3]
+/*
+ "::BEGIN;"
+ "abc > xy;"
+ "::END;"
+ "aba > z;",
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [4]
+ "abc > xy;"
+ "::Null;"
+ "aba > z;",
+
+ // [5]
+ "::Upper;"
+ "ABC > xy;"
+ "AB > x;"
+ "C > z;"
+ "::Upper;"
+ "XYZ > p;"
+ "XY > q;"
+ "Z > r;"
+ "::Upper;",
+
+ // [6]
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';",
+
+ // [7]
+ "::Null;"
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';",
+
+ // [8]
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';"
+ "::Null;",
+
+ // [9]
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "::Null;"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';",
+
+ // [10]
+/*
+ "::BEGIN;"
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "::END;"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';",
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [11]
+/*
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "::BEGIN;"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';"
+ "::END;",
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [12]
+/*
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "$ab = [ab];"
+ "::BEGIN;"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';"
+ "::END;"
+ "::BEGIN;"
+ "$ab { ' ' } $ab > '-';"
+ "c { ' ' > ;"
+ "::END;"
+ "::BEGIN;"
+ "'a-a' > a\\%|a;"
+ "::END;",
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [13]
+ "$ws = [[:Separator:][\\u0009-\\u000C]$];"
+ "$delim = [\\-$ws];"
+ "$ab = [ab];"
+ "::Null;"
+ "$ws $delim* > ' ';"
+ "'-' $delim* > '-';"
+ "::Null;"
+ "$ab { ' ' } $ab > '-';"
+ "c { ' ' > ;"
+ "::Null;"
+ "'a-a' > a\\%|a;",
+
+ // [14]
+/*
+ "::[abc];"
+ "::BEGIN;"
+ "abc > xy;"
+ "::END;"
+ "::BEGIN;"
+ "aba > yz;"
+ "::END;"
+ "::Upper;",
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [15]
+ "::[abc];"
+ "abc > xy;"
+ "::Null;"
+ "aba > yz;"
+ "::Upper;",
+
+ // [16]
+/*
+ "::[abc];"
+ "::BEGIN;"
+ "abc <> xy;"
+ "::END;"
+ "::BEGIN;"
+ "aba <> yz;"
+ "::END;"
+ "::Upper(Lower);"
+ "::([XYZ]);"
+*/
+ "", // test case commented out below, this is here to keep from messing up the indexes
+
+ // [17]
+ "::[abc];"
+ "abc <> xy;"
+ "::Null;"
+ "aba <> yz;"
+ "::Upper(Lower);"
+ "::([XYZ]);"
+};
+static const int32_t BEGIN_END_RULES_length = (int32_t)(sizeof(BEGIN_END_RULES) / sizeof(BEGIN_END_RULES[0]));
+
+/*
+(This entire test is commented out below and will need some heavy revision when we re-add
+the ::BEGIN/::END stuff)
+static const char* BOGUS_BEGIN_END_RULES[] = {
+ // [7]
+ "::BEGIN;"
+ "abc > xy;"
+ "::BEGIN;"
+ "aba > z;"
+ "::END;"
+ "::END;",
+
+ // [8]
+ "abc > xy;"
+ " aba > z;"
+ "::END;",
+
+ // [9]
+ "::BEGIN;"
+ "::Upper;"
+ "::END;"
+};
+static const int32_t BOGUS_BEGIN_END_RULES_length = (int32_t)(sizeof(BOGUS_BEGIN_END_RULES) / sizeof(BOGUS_BEGIN_END_RULES[0]));
+*/
+
+static const char* BEGIN_END_TEST_CASES[] = {
+ // rules input expected output
+ BEGIN_END_RULES[0], "abc ababc aba", "xy zbc z",
+// BEGIN_END_RULES[1], "abc ababc aba", "xy abxy z",
+// BEGIN_END_RULES[2], "abc ababc aba", "xy abxy z",
+// BEGIN_END_RULES[3], "abc ababc aba", "xy abxy z",
+ BEGIN_END_RULES[4], "abc ababc aba", "xy abxy z",
+ BEGIN_END_RULES[5], "abccabaacababcbc", "PXAARXQBR",
+
+ BEGIN_END_RULES[6], "e e - e---e- e", "e e e-e-e",
+ BEGIN_END_RULES[7], "e e - e---e- e", "e e e-e-e",
+ BEGIN_END_RULES[8], "e e - e---e- e", "e e e-e-e",
+ BEGIN_END_RULES[9], "e e - e---e- e", "e e e-e-e",
+// BEGIN_END_RULES[10], "e e - e---e- e", "e e e-e-e",
+// BEGIN_END_RULES[11], "e e - e---e- e", "e e e-e-e",
+// BEGIN_END_RULES[12], "e e - e---e- e", "e e e-e-e",
+// BEGIN_END_RULES[12], "a a a a", "a%a%a%a",
+// BEGIN_END_RULES[12], "a a-b c b a", "a%a-b cb-a",
+ BEGIN_END_RULES[13], "e e - e---e- e", "e e e-e-e",
+ BEGIN_END_RULES[13], "a a a a", "a%a%a%a",
+ BEGIN_END_RULES[13], "a a-b c b a", "a%a-b cb-a",
+
+// BEGIN_END_RULES[14], "abc xy ababc xyz aba", "XY xy ABXY xyz YZ",
+ BEGIN_END_RULES[15], "abc xy ababc xyz aba", "XY xy ABXY xyz YZ",
+// BEGIN_END_RULES[16], "abc xy ababc xyz aba", "XY xy ABXY xyz YZ",
+ BEGIN_END_RULES[17], "abc xy ababc xyz aba", "XY xy ABXY xyz YZ"
+};
+static const int32_t BEGIN_END_TEST_CASES_length = (int32_t)(sizeof(BEGIN_END_TEST_CASES) / sizeof(BEGIN_END_TEST_CASES[0]));
+
+void TransliteratorTest::TestBeginEnd() {
+ // run through the list of test cases above
+ int32_t i = 0;
+ for (i = 0; i < BEGIN_END_TEST_CASES_length; i += 3) {
+ expect((UnicodeString)"Test case #" + (i / 3),
+ UnicodeString(BEGIN_END_TEST_CASES[i]),
+ UnicodeString(BEGIN_END_TEST_CASES[i + 1]),
+ UnicodeString(BEGIN_END_TEST_CASES[i + 2]));
+ }
+
+ // instantiate the one reversible rule set in the reverse direction and make sure it does the right thing
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* reversed = Transliterator::createFromRules("Reversed", UnicodeString(BEGIN_END_RULES[17]),
+ UTRANS_REVERSE, parseError, status);
+ if (reversed == 0 || U_FAILURE(status)) {
+ reportParseError(UnicodeString("FAIL: Couldn't create reversed transliterator"), parseError, status);
+ } else {
+ expect(*reversed, UnicodeString("xy XY XYZ yz YZ"), UnicodeString("xy abc xaba yz aba"));
+ }
+ delete reversed;
+
+ // finally, run through the list of syntactically-ill-formed rule sets above and make sure
+ // that all of them cause errors
+/*
+(commented out until we have the real ::BEGIN/::END stuff in place
+ for (i = 0; i < BOGUS_BEGIN_END_RULES_length; i++) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* t = Transliterator::createFromRules("foo", UnicodeString(BOGUS_BEGIN_END_RULES[i]),
+ UTRANS_FORWARD, parseError, status);
+ if (!U_FAILURE(status)) {
+ delete t;
+ errln((UnicodeString)"Should have gotten syntax error from " + BOGUS_BEGIN_END_RULES[i]);
+ }
+ }
+*/
+}
+
+void TransliteratorTest::TestBeginEndToRules() {
+ // run through the same list of test cases we used above, but this time, instead of just
+ // instantiating a Transliterator from the rules and running the test against it, we instantiate
+ // a Transliterator from the rules, do toRules() on it, instantiate a Transliterator from
+ // the resulting set of rules, and make sure that the generated rule set is semantically equivalent
+ // to (i.e., does the same thing as) the original rule set
+ for (int32_t i = 0; i < BEGIN_END_TEST_CASES_length; i += 3) {
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* t = Transliterator::createFromRules("--", UnicodeString(BEGIN_END_TEST_CASES[i]),
+ UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ reportParseError(UnicodeString("FAIL: Couldn't create transliterator"), parseError, status);
+ } else {
+ UnicodeString rules;
+ t->toRules(rules, TRUE);
+ Transliterator* t2 = Transliterator::createFromRules((UnicodeString)"Test case #" + (i / 3), rules,
+ UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ reportParseError(UnicodeString("FAIL: Couldn't create transliterator from generated rules"),
+ parseError, status);
+ delete t;
+ } else {
+ expect(*t2,
+ UnicodeString(BEGIN_END_TEST_CASES[i + 1]),
+ UnicodeString(BEGIN_END_TEST_CASES[i + 2]));
+ delete t;
+ delete t2;
+ }
+ }
+ }
+
+ // do the same thing for the reversible test case
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ Transliterator* reversed = Transliterator::createFromRules("Reversed", UnicodeString(BEGIN_END_RULES[17]),
+ UTRANS_REVERSE, parseError, status);
+ if (U_FAILURE(status)) {
+ reportParseError(UnicodeString("FAIL: Couldn't create reversed transliterator"), parseError, status);
+ } else {
+ UnicodeString rules;
+ reversed->toRules(rules, FALSE);
+ Transliterator* reversed2 = Transliterator::createFromRules("Reversed", rules, UTRANS_FORWARD,
+ parseError, status);
+ if (U_FAILURE(status)) {
+ reportParseError(UnicodeString("FAIL: Couldn't create reversed transliterator from generated rules"),
+ parseError, status);
+ delete reversed;
+ } else {
+ expect(*reversed2,
+ UnicodeString("xy XY XYZ yz YZ"),
+ UnicodeString("xy abc xaba yz aba"));
+ delete reversed;
+ delete reversed2;
+ }
+ }
+}
+
+void TransliteratorTest::TestRegisterAlias() {
+ UnicodeString longID("Lower;[aeiou]Upper");
+ UnicodeString shortID("Any-CapVowels");
+ UnicodeString reallyShortID("CapVowels");
+
+ Transliterator::registerAlias(shortID, longID);
+
+ UErrorCode err = U_ZERO_ERROR;
+ Transliterator* t1 = Transliterator::createInstance(longID, UTRANS_FORWARD, err);
+ if (U_FAILURE(err)) {
+ errln("Failed to instantiate transliterator with long ID");
+ Transliterator::unregister(shortID);
+ return;
+ }
+ Transliterator* t2 = Transliterator::createInstance(reallyShortID, UTRANS_FORWARD, err);
+ if (U_FAILURE(err)) {
+ errln("Failed to instantiate transliterator with short ID");
+ delete t1;
+ Transliterator::unregister(shortID);
+ return;
+ }
+
+ if (t1->getID() != longID)
+ errln("Transliterator instantiated with long ID doesn't have long ID");
+ if (t2->getID() != reallyShortID)
+ errln("Transliterator instantiated with short ID doesn't have short ID");
+
+ UnicodeString rules1;
+ UnicodeString rules2;
+
+ t1->toRules(rules1, TRUE);
+ t2->toRules(rules2, TRUE);
+ if (rules1 != rules2)
+ errln("Alias transliterators aren't the same");
+
+ delete t1;
+ delete t2;
+ Transliterator::unregister(shortID);
+
+ t1 = Transliterator::createInstance(shortID, UTRANS_FORWARD, err);
+ if (U_SUCCESS(err)) {
+ errln("Instantiation with short ID succeeded after short ID was unregistered");
+ delete t1;
+ }
+
+ // try the same thing again, but this time with something other than
+ // an instance of CompoundTransliterator
+ UnicodeString realID("Latin-Greek");
+ UnicodeString fakeID("Latin-dlgkjdflkjdl");
+ Transliterator::registerAlias(fakeID, realID);
+
+ err = U_ZERO_ERROR;
+ t1 = Transliterator::createInstance(realID, UTRANS_FORWARD, err);
+ if (U_FAILURE(err)) {
+ errln("Failed to instantiate transliterator with real ID");
+ Transliterator::unregister(realID);
+ return;
+ }
+ t2 = Transliterator::createInstance(fakeID, UTRANS_FORWARD, err);
+ if (U_FAILURE(err)) {
+ errln("Failed to instantiate transliterator with fake ID");
+ delete t1;
+ Transliterator::unregister(realID);
+ return;
+ }
+
+ t1->toRules(rules1, TRUE);
+ t2->toRules(rules2, TRUE);
+ if (rules1 != rules2)
+ errln("Alias transliterators aren't the same");
+
+ delete t1;
+ delete t2;
+ Transliterator::unregister(fakeID);
+}
+
+void TransliteratorTest::TestRuleStripping() {
+ /*
+#
+\uE001>\u0C01; # SIGN
+ */
+ static const UChar rule[] = {
+ 0x0023,0x0020,0x000D,0x000A,
+ 0xE001,0x003E,0x0C01,0x003B,0x0020,0x0023,0x0020,0x0053,0x0049,0x0047,0x004E,0
+ };
+ static const UChar expectedRule[] = {
+ 0xE001,0x003E,0x0C01,0x003B,0
+ };
+ UChar result[sizeof(rule)/sizeof(rule[0])];
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t len = utrans_stripRules(rule, (int32_t)(sizeof(rule)/sizeof(rule[0])), result, &status);
+ if (len != u_strlen(expectedRule)) {
+ errln("utrans_stripRules return len = %d", len);
+ }
+ if (u_strncmp(expectedRule, result, len) != 0) {
+ errln("utrans_stripRules did not return expected string");
+ }
+}
+
+//======================================================================
+// Support methods
+//======================================================================
+void TransliteratorTest::expectT(const UnicodeString& id,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UParseError pe;
+ Transliterator *t = Transliterator::createInstance(id, UTRANS_FORWARD, pe, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: Could not create " + id);
+ delete t;
+ return;
+ }
+ expect(*t, source, expectedResult);
+ delete t;
+}
+
+void TransliteratorTest::reportParseError(const UnicodeString& message,
+ const UParseError& parseError,
+ const UErrorCode& status) {
+ errln(message +
+ /*", parse error " + parseError.code +*/
+ ", line " + parseError.line +
+ ", offset " + parseError.offset +
+ ", pre-context " + prettify(parseError.preContext, TRUE) +
+ ", post-context " + prettify(parseError.postContext,TRUE) +
+ ", Error: " + u_errorName(status));
+}
+
+void TransliteratorTest::expect(const UnicodeString& rules,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ UTransPosition *pos) {
+ expect("<ID>", rules, source, expectedResult, pos);
+}
+
+void TransliteratorTest::expect(const UnicodeString& id,
+ const UnicodeString& rules,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ UTransPosition *pos) {
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseError;
+ Transliterator* t = Transliterator::createFromRules(id, rules, UTRANS_FORWARD, parseError, status);
+ if (U_FAILURE(status)) {
+ reportParseError(UnicodeString("Couldn't create transliterator from ") + rules, parseError, status);
+ } else {
+ expect(*t, source, expectedResult, pos);
+ }
+ delete t;
+}
+
+void TransliteratorTest::expect(const Transliterator& t,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ const Transliterator& reverseTransliterator) {
+ expect(t, source, expectedResult);
+ expect(reverseTransliterator, expectedResult, source);
+}
+
+void TransliteratorTest::expect(const Transliterator& t,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ UTransPosition *pos) {
+ if (pos == 0) {
+ UnicodeString result(source);
+ t.transliterate(result);
+ expectAux(t.getID() + ":String", source, result, expectedResult);
+ }
+ UTransPosition index={0, 0, 0, 0};
+ if (pos != 0) {
+ index = *pos;
+ }
+
+ UnicodeString rsource(source);
+ if (pos == 0) {
+ t.transliterate(rsource);
+ } else {
+ // Do it all at once -- below we do it incrementally
+ t.finishTransliteration(rsource, *pos);
+ }
+ expectAux(t.getID() + ":Replaceable", source, rsource, expectedResult);
+
+ // Test keyboard (incremental) transliteration -- this result
+ // must be the same after we finalize (see below).
+ UnicodeString log;
+ rsource.remove();
+ if (pos != 0) {
+ rsource = source;
+ formatInput(log, rsource, index);
+ log.append(" -> ");
+ UErrorCode status = U_ZERO_ERROR;
+ t.transliterate(rsource, index, status);
+ formatInput(log, rsource, index);
+ } else {
+ for (int32_t i=0; i<source.length(); ++i) {
+ if (i != 0) {
+ log.append(" + ");
+ }
+ log.append(source.charAt(i)).append(" -> ");
+ UErrorCode status = U_ZERO_ERROR;
+ t.transliterate(rsource, index, source.charAt(i), status);
+ formatInput(log, rsource, index);
+ }
+ }
+
+ // As a final step in keyboard transliteration, we must call
+ // transliterate to finish off any pending partial matches that
+ // were waiting for more input.
+ t.finishTransliteration(rsource, index);
+ log.append(" => ").append(rsource);
+
+ expectAux(t.getID() + ":Keyboard", log,
+ rsource == expectedResult,
+ expectedResult);
+}
+
+
+/**
+ * @param appendTo result is appended to this param.
+ * @param input the string being transliterated
+ * @param pos the index struct
+ */
+UnicodeString& TransliteratorTest::formatInput(UnicodeString &appendTo,
+ const UnicodeString& input,
+ const UTransPosition& pos) {
+ // Output a string of the form aaa{bbb|ccc|ddd}eee, where
+ // the {} indicate the context start and limit, and the ||
+ // indicate the start and limit.
+ if (0 <= pos.contextStart &&
+ pos.contextStart <= pos.start &&
+ pos.start <= pos.limit &&
+ pos.limit <= pos.contextLimit &&
+ pos.contextLimit <= input.length()) {
+
+ UnicodeString a, b, c, d, e;
+ input.extractBetween(0, pos.contextStart, a);
+ input.extractBetween(pos.contextStart, pos.start, b);
+ input.extractBetween(pos.start, pos.limit, c);
+ input.extractBetween(pos.limit, pos.contextLimit, d);
+ input.extractBetween(pos.contextLimit, input.length(), e);
+ appendTo.append(a).append((UChar)123/*{*/).append(b).
+ append((UChar)PIPE).append(c).append((UChar)PIPE).append(d).
+ append((UChar)125/*}*/).append(e);
+ } else {
+ appendTo.append((UnicodeString)"INVALID UTransPosition {cs=" +
+ pos.contextStart + ", s=" + pos.start + ", l=" +
+ pos.limit + ", cl=" + pos.contextLimit + "} on " +
+ input);
+ }
+ return appendTo;
+}
+
+void TransliteratorTest::expectAux(const UnicodeString& tag,
+ const UnicodeString& source,
+ const UnicodeString& result,
+ const UnicodeString& expectedResult) {
+ expectAux(tag, source + " -> " + result,
+ result == expectedResult,
+ expectedResult);
+}
+
+void TransliteratorTest::expectAux(const UnicodeString& tag,
+ const UnicodeString& summary, UBool pass,
+ const UnicodeString& expectedResult) {
+ if (pass) {
+ logln(UnicodeString("(")+tag+") " + prettify(summary));
+ } else {
+ errln(UnicodeString("FAIL: (")+tag+") "
+ + prettify(summary)
+ + ", expected " + prettify(expectedResult));
+ }
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/transtst.h b/Build/source/libs/icu/icu-xetex/test/intltest/transtst.h
new file mode 100644
index 00000000000..0a6eef78c40
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/transtst.h
@@ -0,0 +1,421 @@
+/*
+**********************************************************************
+* Copyright (C) 1999-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* Date Name Description
+* 11/10/99 aliu Creation.
+**********************************************************************
+*/
+#ifndef TRANSTST_H
+#define TRANSTST_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "intltest.h"
+
+/**
+ * @test
+ * @summary General test of Transliterator
+ */
+class TransliteratorTest : public IntlTest {
+
+public:
+ TransliteratorTest();
+ virtual ~TransliteratorTest();
+
+private:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name,
+ char* par=NULL);
+
+ void TestInstantiation(void);
+
+ void TestSimpleRules(void);
+
+ void TestInlineSet(void);
+
+ void TestAnchors(void);
+
+ void TestPatternQuoting(void);
+
+ /**
+ * Create some inverses and confirm that they work. We have to be
+ * careful how we do this, since the inverses will not be true
+ * inverses -- we can't throw any random string at the composition
+ * of the transliterators and expect the identity function. F x
+ * F' != I. However, if we are careful about the input, we will
+ * get the expected results.
+ */
+ void TestRuleBasedInverse(void);
+
+ /**
+ * Basic test of keyboard.
+ */
+ void TestKeyboard(void);
+
+ /**
+ * Basic test of keyboard with cursor.
+ */
+ void TestKeyboard2(void);
+
+ /**
+ * Test keyboard transliteration with back-replacement.
+ */
+ void TestKeyboard3(void);
+
+ void keyboardAux(const Transliterator& t,
+ const char* DATA[], int32_t DATA_length);
+
+ void TestArabic(void);
+
+ /**
+ * Compose the Kana transliterator forward and reverse and try
+ * some strings that should come out unchanged.
+ */
+ void TestCompoundKana(void);
+
+ /**
+ * Compose the hex transliterators forward and reverse.
+ */
+ void TestCompoundHex(void);
+
+ /**
+ * Do some basic tests of filtering.
+ */
+ void TestFiltering(void);
+
+ /**
+ * Regression test for bugs found in Greek transliteration.
+ */
+ void TestJ277(void);
+
+ /**
+ * Prefix, suffix support in hex transliterators.
+ */
+ void TestJ243(void);
+
+ /**
+ * Parsers need better syntax error messages.
+ */
+ void TestJ329(void);
+
+ /**
+ * Test segments and segment references.
+ */
+ void TestSegments(void);
+
+ /**
+ * Test cursor positioning outside of the key
+ */
+ void TestCursorOffset(void);
+
+ /**
+ * Test zero length and > 1 char length variable values. Test
+ * use of variable refs in UnicodeSets.
+ */
+ void TestArbitraryVariableValues(void);
+
+ /**
+ * Confirm that the contextStart, contextLimit, start, and limit
+ * behave correctly. J474.
+ */
+ void TestPositionHandling(void);
+
+ /**
+ * Test the Hiragana-Katakana transliterator.
+ */
+ void TestHiraganaKatakana(void);
+
+ /**
+ * Test cloning / copy constructor of RBT.
+ */
+ void TestCopyJ476(void);
+
+ /**
+ * Test inter-Indic transliterators. These are composed.
+ * ICU4C Jitterbug 483.
+ */
+ void TestInterIndic(void);
+
+ /**
+ * Test filter syntax in IDs. (J918)
+ */
+ void TestFilterIDs(void);
+
+ /**
+ * Test the case mapping transliterators.
+ */
+ void TestCaseMap(void);
+
+ /**
+ * Test the name mapping transliterators.
+ */
+ void TestNameMap(void);
+
+ /**
+ * Test liberalized ID syntax. 1006c
+ */
+ void TestLiberalizedID(void);
+ /**
+ * Test Jitterbug 912
+ */
+ void TestCreateInstance(void);
+
+ void TestNormalizationTransliterator(void);
+
+ void TestCompoundRBT(void);
+
+ void TestCompoundFilter(void);
+
+ void TestRemove(void);
+
+ void TestToRules(void);
+
+ void TestContext(void);
+
+ void TestSupplemental(void);
+
+ void TestQuantifier(void);
+
+ /**
+ * Test Source-Target/Variant.
+ */
+ void TestSTV(void);
+
+ void TestCompoundInverse(void);
+
+ void TestNFDChainRBT(void);
+
+ /**
+ * Inverse of "Null" should be "Null". (J21)
+ */
+ void TestNullInverse(void);
+
+ /**
+ * Check ID of inverse of alias. (J22)
+ */
+ void TestAliasInverseID(void);
+
+ /**
+ * Test IDs of inverses of compound transliterators. (J20)
+ */
+ void TestCompoundInverseID(void);
+
+ /**
+ * Test undefined variable.
+ */
+ void TestUndefinedVariable(void);
+
+ /**
+ * Test empty context.
+ */
+ void TestEmptyContext(void);
+
+ /**
+ * Test compound filter ID syntax
+ */
+ void TestCompoundFilterID(void);
+
+ /**
+ * Test new property set syntax
+ */
+ void TestPropertySet(void);
+
+ /**
+ * Test various failure points of the new 2.0 engine.
+ */
+ void TestNewEngine(void);
+
+ /**
+ * Test quantified segment behavior. We want:
+ * ([abc])+ > x $1 x; applied to "cba" produces "xax"
+ */
+ void TestQuantifiedSegment(void);
+
+ /* Devanagari-Latin rules Test */
+ void TestDevanagariLatinRT(void);
+
+ /* Telugu-Latin rules Test */
+ void TestTeluguLatinRT(void);
+
+ /* Gujarati-Latin rules Test */
+ void TestGujaratiLatinRT(void);
+
+ /* Sanskrit-Latin rules Test */
+ void TestSanskritLatinRT(void);
+
+ /* Test Compound Indic-Latin transliterators*/
+ void TestCompoundLatinRT(void);
+
+ /* Test bindi and tippi for Gurmukhi */
+ void TestGurmukhiDevanagari(void);
+ /**
+ * Test instantiation from a locale.
+ */
+ void TestLocaleInstantiation(void);
+
+ /**
+ * Test title case handling of accent (should ignore accents)
+ */
+ void TestTitleAccents(void);
+
+ /**
+ * Basic test of a locale resource based rule.
+ */
+ void TestLocaleResource(void);
+
+ /**
+ * Make sure parse errors reference the right line.
+ */
+ void TestParseError(void);
+
+ /**
+ * Make sure sets on output are disallowed.
+ */
+ void TestOutputSet(void);
+
+ /**
+ * Test the use variable range pragma, making sure that use of
+ * variable range characters is detected and flagged as an error.
+ */
+ void TestVariableRange(void);
+
+ /**
+ * Test invalid post context error handling
+ */
+ void TestInvalidPostContext(void);
+
+ /**
+ * Test ID form variants
+ */
+ void TestIDForms(void);
+
+ /**
+ * Mark's toRules test.
+ */
+ void TestToRulesMark(void);
+
+ /**
+ * Test Escape and Unescape transliterators.
+ */
+ void TestEscape(void);
+
+ void TestAnchorMasking(void);
+
+ /**
+ * Make sure display names of variants look reasonable.
+ */
+ void TestDisplayName(void);
+
+ /**
+ * Check to see if case mapping works correctly.
+ */
+ void TestSpecialCases(void);
+ /**
+ * Check to see that incremental gets at least part way through a reasonable string.
+ */
+ void TestIncrementalProgress(void);
+
+ /**
+ * Check that casing handles surrogates.
+ */
+ void TestSurrogateCasing (void);
+
+ void TestFunction(void);
+
+ void TestInvalidBackRef(void);
+
+ void TestMulticharStringSet(void);
+
+ void TestUserFunction(void);
+
+ void TestAnyX(void);
+
+ void TestSourceTargetSet(void);
+
+ void TestRuleWhitespace(void);
+
+ void TestAllCodepoints(void);
+
+ void TestBoilerplate(void);
+
+ void TestAlternateSyntax(void);
+
+ void TestRuleStripping(void);
+
+ /**
+ * Tests the multiple-pass syntax
+ */
+ void TestBeginEnd(void);
+
+ /**
+ * Tests that toRules() works right with the multiple-pass syntax
+ */
+ void TestBeginEndToRules(void);
+
+ /**
+ * Tests the registerAlias() function
+ */
+ void TestRegisterAlias(void);
+
+ //======================================================================
+ // Support methods
+ //======================================================================
+ protected:
+ void expectT(const UnicodeString& id,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult);
+
+ void expect(const UnicodeString& rules,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ UTransPosition *pos=0);
+
+ void expect(const UnicodeString& id,
+ const UnicodeString& rules,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ UTransPosition *pos=0);
+
+ void expect(const Transliterator& t,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ const Transliterator& reverseTransliterator);
+
+ void expect(const Transliterator& t,
+ const UnicodeString& source,
+ const UnicodeString& expectedResult,
+ UTransPosition *pos=0);
+
+ void expectAux(const UnicodeString& tag,
+ const UnicodeString& source,
+ const UnicodeString& result,
+ const UnicodeString& expectedResult);
+
+ virtual void expectAux(const UnicodeString& tag,
+ const UnicodeString& summary, UBool pass,
+ const UnicodeString& expectedResult);
+
+ static UnicodeString& formatInput(UnicodeString &appendTo,
+ const UnicodeString& input,
+ const UTransPosition& pos);
+
+ void checkRules(const UnicodeString& label, Transliterator& t2,
+ const UnicodeString& testRulesForward);
+ void CheckIncrementalAux(const Transliterator* t,
+ const UnicodeString& input);
+
+ void reportParseError(const UnicodeString& message, const UParseError& parseError, const UErrorCode& status);
+
+
+ const UnicodeString DESERET_DEE;
+ const UnicodeString DESERET_dee;
+
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/trcoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/trcoll.cpp
new file mode 100644
index 00000000000..7da003a8ca3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/trcoll.cpp
@@ -0,0 +1,106 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/unistr.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/tstdtmod.h"
+#include "unicode/coll.h"
+#include "unicode/tblcoll.h"
+#include "unicode/sortkey.h"
+#include "trcoll.h"
+#include "sfwdchit.h"
+
+CollationTurkishTest::CollationTurkishTest()
+: myCollation(0)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ myCollation = Collator::createInstance(Locale("tr", "", ""),status);
+}
+
+CollationTurkishTest::~CollationTurkishTest()
+{
+ delete myCollation;
+}
+
+const UChar CollationTurkishTest::testSourceCases[][CollationTurkishTest::MAX_TOKEN_LEN] = {
+ {0x73, 0x0327, 0},
+ {0x76, 0x00E4, 0x74, 0},
+ {0x6f, 0x6c, 0x64, 0},
+ {0x00FC, 0x6f, 0x69, 0x64, 0},
+ {0x68, 0x011E, 0x61, 0x6c, 0x74, 0},
+ {0x73, 0x74, 0x72, 0x65, 0x73, 0x015E, 0},
+ {0x76, 0x6f, 0x0131, 0x64, 0},
+ {0x69, 0x64, 0x65, 0x61, 0},
+ {0x00FC, 0x6f, 0x69, 0x64, 0},
+ {0x76, 0x6f, 0x0131, 0x64, 0},
+ {0x69, 0x64, 0x65, 0x61, 0}
+};
+
+const UChar CollationTurkishTest::testTargetCases[][CollationTurkishTest::MAX_TOKEN_LEN] = {
+ {0x75, 0x0308, 0},
+ {0x76, 0x62, 0x74, 0},
+ {0x00D6, 0x61, 0x79, 0},
+ {0x76, 0x6f, 0x69, 0x64, 0},
+ {0x68, 0x61, 0x6c, 0x74, 0},
+ {0x015E, 0x74, 0x72, 0x65, 0x015E, 0x73, 0},
+ {0x76, 0x6f, 0x69, 0x64, 0},
+ {0x49, 0x64, 0x65, 0x61, 0},
+ {0x76, 0x6f, 0x69, 0x64, 0},
+ {0x76, 0x6f, 0x69, 0x64, 0},
+ {0x49, 0x64, 0x65, 0x61, 0}
+};
+
+const Collator::EComparisonResult CollationTurkishTest::results[] = {
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::GREATER,
+ Collator::LESS,
+ Collator::LESS,
+ Collator::GREATER,
+ // test priamry > 8
+ Collator::LESS,
+ Collator::LESS,
+ Collator::GREATER
+};
+
+void CollationTurkishTest::TestTertiary(/* char* par */)
+{
+ int32_t i = 0;
+ myCollation->setStrength(Collator::TERTIARY);
+ for (i = 0; i < 8 ; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+void CollationTurkishTest::TestPrimary(/* char* par */)
+{
+ int32_t i;
+ myCollation->setStrength(Collator::PRIMARY);
+ for (i = 8; i < 11; i++) {
+ doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
+ }
+}
+
+void CollationTurkishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite CollationTurkishTest: ");
+
+ if((!myCollation) && exec) {
+ errln(__FILE__ " cannot test - failed to create collator.");
+ name = "some test";
+ return;
+ }
+ switch (index) {
+ case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break;
+ case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
+ default: name = ""; break;
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/trcoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/trcoll.h
new file mode 100644
index 00000000000..4ab553e2621
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/trcoll.h
@@ -0,0 +1,49 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * CollationTurkishTest is a third level test class. This tests the locale
+ * specific primary and tertiary rules. For example, the dotless-i and dotted-I
+ * sorts between h and j.
+ */
+
+#ifndef _TRCOLL
+#define _TRCOLL
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "tscoll.h"
+
+class CollationTurkishTest: public IntlTestCollator {
+public:
+ // If this is too small for the test data, just increase it.
+ // Just don't make it too large, otherwise the executable will get too big
+ enum EToken_Len { MAX_TOKEN_LEN = 16 };
+
+ CollationTurkishTest();
+ virtual ~CollationTurkishTest();
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // perform tests for turkish locale with strength PRIMARY
+ void TestPrimary(/* char* par */);
+
+ // perform tests for turkish locale with strength TERTIARY
+ void TestTertiary(/* char* par */);
+
+private:
+ // static constants
+ static const UChar testSourceCases[][MAX_TOKEN_LEN];
+ static const UChar testTargetCases[][MAX_TOKEN_LEN];
+ static const Collator::EComparisonResult results[];
+
+ Collator *myCollation;
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/trnserr.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/trnserr.cpp
new file mode 100644
index 00000000000..40f41850f07
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/trnserr.cpp
@@ -0,0 +1,283 @@
+/********************************************************************
+ * Copyright (c) 2001-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *********************************************************************
+ * This test program is intended for testing error conditions of the
+ * transliterator APIs to make sure the exceptions are raised where
+ * necessary.
+ *
+ * Date Name Description
+ * 11/14/2001 hshih Creation.
+ *
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "ittrans.h"
+#include "trnserr.h"
+#include "unicode/utypes.h"
+#include "unicode/translit.h"
+#include "unicode/uniset.h"
+#include "unicode/unifilt.h"
+#include "cpdtrans.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "unicode/rep.h"
+#include "unicode/locid.h"
+
+//---------------------------------------------
+// runIndexedTest
+//---------------------------------------------
+
+void
+TransliteratorErrorTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ TESTCASE(0,TestTransliteratorErrors);
+ TESTCASE(1, TestUnicodeSetErrors);
+ TESTCASE(2, TestRBTErrors);
+ TESTCASE(3, TestCoverage);
+ //TESTCASE(3, TestUniToHexErrors);
+ //TESTCASE(4, TestHexToUniErrors);
+ // TODO: Add a subclass to test clone().
+ default: name = ""; break;
+ }
+}
+
+
+void TransliteratorErrorTest::TestTransliteratorErrors() {
+ UnicodeString trans="Latin-Greek";
+ UnicodeString bogusID="LATINGREEK-GREEKLATIN";
+ UnicodeString newID="Bogus-Latin";
+ UnicodeString newIDRules="zzz > Z; f <> ph";
+ UnicodeString bogusRules="a } [b-g m-p ";
+ UParseError parseError;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString testString="A quick fox jumped over the lazy dog.";
+ UnicodeString insertString="cats and dogs";
+ int32_t stoppedAt = 0, len;
+ UTransPosition pos;
+
+ Transliterator* t= Transliterator::createInstance(trans, UTRANS_FORWARD, parseError, status);
+ if(t==0 || U_FAILURE(status)){
+ errln("FAIL: construction of Latin-Greek");
+ return;
+ }
+ pos.contextLimit = 0;
+ pos.contextStart = 0;
+ pos.limit = 0;
+ pos.start = 0;
+ len = testString.length();
+ stoppedAt = t->transliterate(testString, 0, 100);
+ if (stoppedAt != -1) {
+ errln("FAIL: Out of bounds check failed (1).");
+ } else if (testString.length() != len) {
+ testString="A quick fox jumped over the lazy dog.";
+ errln("FAIL: Transliterate fails and the target string was modified.");
+ }
+ stoppedAt = t->transliterate(testString, 100, testString.length()-1);
+ if (stoppedAt != -1)
+ errln("FAIL: Out of bounds check failed (2).");
+ else if (testString.length() != len) {
+ testString="A quick fox jumped over the lazy dog.";
+ errln("FAIL: Transliterate fails and the target string was modified.");
+ }
+ pos.start = 100;
+ pos.limit = testString.length();
+ t->transliterate(testString, pos, status);
+ if (U_SUCCESS(status)) {
+ errln("FAIL: Start offset is out of bounds, error not reported.\n");
+ }
+ status = U_ZERO_ERROR;
+ pos.limit = 100;
+ pos.start = 0;
+ t->transliterate(testString, pos, status);
+ if (U_SUCCESS(status)) {
+ errln("FAIL: Limit offset is out of bounds, error not reported.\n");
+ }
+ status = U_ZERO_ERROR;
+ len = pos.contextLimit = testString.length();
+ pos.contextStart = 0;
+ pos.limit = len - 1;
+ pos.start = 5;
+ t->transliterate(testString, pos, insertString, status);
+ if (len == pos.limit) {
+ errln("FAIL: Test insertion with string: the transliteration position limit didn't change as expected.");
+ if (U_SUCCESS(status)) {
+ errln("FAIL: Error code wasn't set either.");
+ }
+ }
+ status = U_ZERO_ERROR;
+ pos.contextStart = 0;
+ pos.contextLimit = testString.length();
+ pos.limit = testString.length() -1;
+ pos.start = 5;
+ t->transliterate(testString, pos, (UChar32)0x0061, status);
+ if (len == pos.limit) {
+ errln("FAIL: Test insertion with character: the transliteration position limit didn't change as expected.");
+ if (U_SUCCESS(status)) {
+ errln("FAIL: Error code wasn't set either.");
+ }
+ }
+ status = U_ZERO_ERROR;
+ len = pos.limit = testString.length();
+ pos.contextStart = 0;
+ pos.contextLimit = testString.length() - 1;
+ pos.start = 5;
+ t->transliterate(testString, pos, insertString, status);
+ if (U_SUCCESS(status)) {
+ errln("FAIL: Out of bounds check failed (3).");
+ if (testString.length() != len)
+ errln("FAIL: The input string was modified though the offsets were out of bounds.");
+ }
+ Transliterator* t1= Transliterator::createInstance(bogusID, UTRANS_FORWARD, parseError, status);
+ if(t1!=0 || U_SUCCESS(status)){
+ delete t1;
+ errln("FAIL: construction of bogus ID \"LATINGREEK-GREEKLATIN\"");
+ }
+ status = U_ZERO_ERROR;
+ Transliterator* t2 = Transliterator::createFromRules(newID, newIDRules, UTRANS_FORWARD, parseError, status);
+ if (U_SUCCESS(status)) {
+ Transliterator* t3 = t2->createInverse(status);
+ if (U_SUCCESS(status)) {
+ delete t3;
+ errln("FAIL: The newID transliterator was not registered so createInverse should fail.");
+ } else {
+ delete t3;
+ }
+ }
+ status = U_ZERO_ERROR;
+ Transliterator* t4 = Transliterator::createFromRules(newID, bogusRules, UTRANS_FORWARD, parseError, status);
+ if (t4 != NULL || U_SUCCESS(status)) {
+ errln("FAIL: The rules is malformed but error was not reported.");
+ if (parseError.offset != -1) {
+ errln("FAIL: The parse error offset isn't set correctly when fails.");
+ } else if (parseError.postContext[0] == 0 || parseError.preContext[0] == 0) {
+ errln("FAIL: The parse error pre/post context isn't reset properly.");
+ }
+ delete t4;
+ }
+ delete t;
+ delete t2;
+}
+
+void TransliteratorErrorTest::TestUnicodeSetErrors() {
+ UnicodeString badPattern="[[:L:]-[0x0300-0x0400]";
+ UnicodeSet set;
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString result;
+
+ if (!set.isEmpty()) {
+ errln("FAIL: The default ctor of UnicodeSet created a non-empty object.");
+ }
+ set.applyPattern(badPattern, status);
+ if (U_SUCCESS(status)) {
+ errln("FAIL: Applied a bad pattern to the UnicodeSet object okay.");
+ }
+ status = U_ZERO_ERROR;
+ UnicodeSet *set1 = new UnicodeSet(badPattern, status);
+ if (U_SUCCESS(status)) {
+ errln("FAIL: Created a UnicodeSet based on bad patterns.");
+ }
+ delete set1;
+}
+
+//void TransliteratorErrorTest::TestUniToHexErrors() {
+// UErrorCode status = U_ZERO_ERROR;
+// Transliterator *t = new UnicodeToHexTransliterator("", TRUE, NULL, status);
+// if (U_SUCCESS(status)) {
+// errln("FAIL: Created a UnicodeToHexTransliterator with an empty pattern.");
+// }
+// delete t;
+//
+// status = U_ZERO_ERROR;
+// t = new UnicodeToHexTransliterator("\\x", TRUE, NULL, status);
+// if (U_SUCCESS(status)) {
+// errln("FAIL: Created a UnicodeToHexTransliterator with a bad pattern.");
+// }
+// delete t;
+//
+// status = U_ZERO_ERROR;
+// t = new UnicodeToHexTransliterator();
+// ((UnicodeToHexTransliterator*)t)->applyPattern("\\x", status);
+// if (U_SUCCESS(status)) {
+// errln("FAIL: UnicodeToHexTransliterator::applyPattern succeeded with a bad pattern.");
+// }
+// delete t;
+//}
+
+void TransliteratorErrorTest::TestRBTErrors() {
+
+ UnicodeString rules="ab>y";
+ UnicodeString id="MyRandom-YReverse";
+ //UnicodeString goodPattern="[[:L:]&[\\u0000-\\uFFFF]]"; /* all BMP letters */
+ UErrorCode status = U_ZERO_ERROR;
+ UParseError parseErr;
+ /*UnicodeSet *set = new UnicodeSet(goodPattern, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Was not able to create a good UnicodeSet based on valid patterns.");
+ return;
+ }*/
+ Transliterator *t = Transliterator::createFromRules(id, rules, UTRANS_REVERSE, parseErr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Was not able to create a good RBT to test registration.");
+ //delete set;
+ return;
+ }
+ Transliterator::registerInstance(t);
+ Transliterator::unregister(id);
+ status = U_ZERO_ERROR;
+ Transliterator* t1= Transliterator::createInstance(id, UTRANS_REVERSE, parseErr, status);
+ if(U_SUCCESS(status)){
+ delete t1;
+ errln("FAIL: construction of unregistered ID failed.");
+ }
+}
+
+//void TransliteratorErrorTest::TestHexToUniErrors() {
+// UErrorCode status = U_ZERO_ERROR;
+// Transliterator *t = new HexToUnicodeTransliterator("", NULL, status);
+// if (U_FAILURE(status)) {
+// errln("FAIL: Could not create a HexToUnicodeTransliterator with an empty pattern.");
+// }
+// delete t;
+// status = U_ZERO_ERROR;
+// t = new HexToUnicodeTransliterator("\\x", NULL, status);
+// if (U_SUCCESS(status)) {
+// errln("FAIL: Created a HexToUnicodeTransliterator with a bad pattern.");
+// }
+// delete t;
+// status = U_ZERO_ERROR;
+// t = new HexToUnicodeTransliterator();
+// ((HexToUnicodeTransliterator*)t)->applyPattern("\\x", status);
+// if (U_SUCCESS(status)) {
+// errln("FAIL: HexToUnicodeTransliterator::applyPattern succeeded with a bad pattern.");
+// }
+// delete t;
+//}
+
+class StubTransliterator: public Transliterator{
+public:
+ StubTransliterator(): Transliterator(UNICODE_STRING_SIMPLE("Any-Null"), 0) {}
+ virtual void handleTransliterate(Replaceable& ,UTransPosition& offsets,UBool) const {
+ offsets.start = offsets.limit;
+ }
+
+ virtual UClassID getDynamicClassID() const{
+ static char classID = 0;
+ return (UClassID)&classID;
+ }
+};
+
+void TransliteratorErrorTest::TestCoverage() {
+ StubTransliterator stub;
+
+ if (stub.clone() != NULL){
+ errln("FAIL: default Transliterator::clone() should return NULL");
+ }
+}
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/trnserr.h b/Build/source/libs/icu/icu-xetex/test/intltest/trnserr.h
new file mode 100644
index 00000000000..35b4c5a4bd6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/trnserr.h
@@ -0,0 +1,54 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2001-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* This test program is intended for testing error conditions of the
+* transliterator APIs to make sure the exceptions are raised where
+* necessary.
+*
+* Date Name Description
+* 11/14/2001 hshih Creation.
+*
+************************************************************************/
+
+
+#ifndef TRNSERR_H
+#define TRNSERR_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/translit.h"
+#include "intltest.h"
+
+/**
+ * @test
+ * @summary Error condition tests of Transliterator
+ */
+class TransliteratorErrorTest : public IntlTest {
+public:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+
+ /*Tests the returned error codes on all the APIs according to the API documentation. */
+ void TestTransliteratorErrors(void);
+
+ void TestUnicodeSetErrors(void);
+
+ //void TestUniToHexErrors(void);
+
+ void TestRBTErrors(void);
+
+ //void TestHexToUniErrors(void);
+
+ // JitterBug 4452, for coverage. The reason to put this method here is
+ // this class is comparable smaller than other Transliterator*Test classes
+ void TestCoverage(void);
+
+};
+
+#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tscoll.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tscoll.cpp
new file mode 100644
index 00000000000..4c65e670ae3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tscoll.cpp
@@ -0,0 +1,513 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * IntlTestCollator is the medium level test class for everything in the directory "collate".
+ */
+
+/***********************************************************************
+* Modification history
+* Date Name Description
+* 02/14/2001 synwee Compare with cintltst and commented away tests
+* that are not run.
+***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/uchar.h"
+#include "unicode/ustring.h"
+
+#include "dadrcoll.h"
+
+#include "encoll.h"
+#include "frcoll.h"
+#include "decoll.h"
+#include "escoll.h"
+#include "ficoll.h"
+#include "jacoll.h"
+#include "trcoll.h"
+#include "allcoll.h"
+#include "g7coll.h"
+#include "mnkytst.h"
+#include "apicoll.h"
+#include "regcoll.h"
+#include "currcoll.h"
+#include "itercoll.h"
+#include "tstnorm.h"
+#include "normconf.h"
+#include "thcoll.h"
+#include "srchtest.h"
+#include "cntabcol.h"
+#include "lcukocol.h"
+#include "ucaconf.h"
+#include "svccoll.h"
+#include "cmemory.h"
+//#include "rndmcoll.h"
+
+#define TESTCLASS(n,classname) \
+ case n: \
+ name = #classname; \
+ if (exec) { \
+ logln(#classname "---"); \
+ logln(""); \
+ classname t; \
+ callTest(t, par); \
+ } \
+ break
+
+void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+{
+ if (exec) {
+ logln("TestSuite Collator: ");
+ }
+
+ switch (index) {
+ TESTCLASS(0, CollationEnglishTest);
+ TESTCLASS(1, CollationFrenchTest);
+ TESTCLASS(2, CollationGermanTest);
+ TESTCLASS(3, CollationSpanishTest);
+ TESTCLASS(4, CollationKanaTest);
+ TESTCLASS(5, CollationTurkishTest);
+ TESTCLASS(6, CollationDummyTest);
+ TESTCLASS(7, G7CollationTest);
+ TESTCLASS(8, CollationMonkeyTest);
+ TESTCLASS(9, CollationAPITest);
+ TESTCLASS(10, CollationRegressionTest);
+ TESTCLASS(11, CollationCurrencyTest);
+ TESTCLASS(12, CollationIteratorTest);
+ TESTCLASS(13, CollationThaiTest);
+ TESTCLASS(14, LotusCollationKoreanTest);
+ TESTCLASS(15, StringSearchTest);
+ TESTCLASS(16, ContractionTableTest);
+ TESTCLASS(17, DataDrivenCollatorTest);
+ TESTCLASS(18, UCAConformanceTest);
+ TESTCLASS(19, CollationServiceTest);
+ TESTCLASS(20, CollationFinnishTest); // removed by weiv - we have changed Finnish collation
+ //TESTCLASS(21, RandomCollatorTest); // See ticket 5747 about reenabling this test.
+
+ default: name = ""; break;
+ }
+}
+
+UCollationResult
+IntlTestCollator::compareUsingPartials(UCollator *coll, const UChar source[], int32_t sLen, const UChar target[], int32_t tLen, int32_t pieceSize, UErrorCode &status) {
+ int32_t partialSKResult = 0;
+ uint8_t sBuf[512], tBuf[512];
+ UCharIterator sIter, tIter;
+ uint32_t sState[2], tState[2];
+ int32_t sSize = pieceSize, tSize = pieceSize;
+ int32_t i = 0;
+ status = U_ZERO_ERROR;
+ sState[0] = 0; sState[1] = 0;
+ tState[0] = 0; tState[1] = 0;
+ while(sSize == pieceSize && tSize == pieceSize && partialSKResult == 0) {
+ uiter_setString(&sIter, source, sLen);
+ uiter_setString(&tIter, target, tLen);
+ sSize = ucol_nextSortKeyPart(coll, &sIter, sState, sBuf, pieceSize, &status);
+ tSize = ucol_nextSortKeyPart(coll, &tIter, tState, tBuf, pieceSize, &status);
+
+ if(sState[0] != 0 || tState[0] != 0) {
+ log("State != 0 : %08X %08X\n", sState[0], tState[0]);
+ }
+ log("%i ", i++);
+
+ partialSKResult = memcmp(sBuf, tBuf, pieceSize);
+ }
+
+ if(partialSKResult < 0) {
+ return UCOL_LESS;
+ } else if(partialSKResult > 0) {
+ return UCOL_GREATER;
+ } else {
+ return UCOL_EQUAL;
+ }
+}
+
+void
+IntlTestCollator::doTestVariant(Collator* col, const UnicodeString &source, const UnicodeString &target, Collator::EComparisonResult result)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ UCollator *myCollation = (UCollator *)((RuleBasedCollator *)col)->getUCollator();
+
+ Collator::EComparisonResult compareResult = col->compare(source, target);
+
+ CollationKey srckey, tgtkey;
+ col->getCollationKey(source, srckey, status);
+ col->getCollationKey(target, tgtkey, status);
+ if (U_FAILURE(status)){
+ errln("Creation of collation keys failed\n");
+ }
+ Collator::EComparisonResult keyResult = srckey.compareTo(tgtkey);
+
+ reportCResult(source, target, srckey, tgtkey, compareResult, keyResult, result, result);
+
+ UColAttributeValue norm = ucol_getAttribute(myCollation, UCOL_NORMALIZATION_MODE, &status);
+
+ int32_t sLen = source.length(), tLen = target.length();
+ const UChar* src = source.getBuffer();
+ const UChar* trg = target.getBuffer();
+ UCollationResult compareResultIter = (UCollationResult)result;
+
+ {
+ UCharIterator sIter, tIter;
+ uiter_setString(&sIter, src, sLen);
+ uiter_setString(&tIter, trg, tLen);
+ compareResultIter = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
+ if(compareResultIter != (UCollationResult)result) {
+ errln("Different result for iterative comparison "+source+" "+target);
+ }
+ }
+ /* convert the strings to UTF-8 and do try comparing with char iterator */
+ if(!quick) { /*!QUICK*/
+ char utf8Source[256], utf8Target[256];
+ int32_t utf8SourceLen = 0, utf8TargetLen = 0;
+ u_strToUTF8(utf8Source, 256, &utf8SourceLen, src, sLen, &status);
+ if(U_FAILURE(status)) { /* probably buffer is not big enough */
+ log("Src UTF-8 buffer too small! Will not compare!\n");
+ } else {
+ u_strToUTF8(utf8Target, 256, &utf8TargetLen, trg, tLen, &status);
+ if(U_SUCCESS(status)) { /* probably buffer is not big enough */
+ UCollationResult compareResultUTF8 = (UCollationResult)result, compareResultUTF8Norm = (UCollationResult)result;
+ UCharIterator sIter, tIter;
+ /*log_verbose("Strings converted to UTF-8:%s, %s\n", aescstrdup(source,-1), aescstrdup(target,-1));*/
+ uiter_setUTF8(&sIter, utf8Source, utf8SourceLen);
+ uiter_setUTF8(&tIter, utf8Target, utf8TargetLen);
+ /*uiter_setString(&sIter, source, sLen);
+ uiter_setString(&tIter, target, tLen);*/
+ compareResultUTF8 = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ sIter.move(&sIter, 0, UITER_START);
+ tIter.move(&tIter, 0, UITER_START);
+ compareResultUTF8Norm = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, norm, &status);
+ if(compareResultUTF8 != compareResultIter) {
+ errln("different results in iterative comparison for UTF-16 and UTF-8 encoded strings. "+source+", "+target);
+ }
+ if(compareResultUTF8 != compareResultUTF8Norm) {
+ errln("different results in iterative when normalization is turned on with UTF-8 strings. "+source+", "+target);
+ }
+ } else {
+ log("Target UTF-8 buffer too small! Did not compare!\n");
+ }
+ if(U_FAILURE(status)) {
+ log("UTF-8 strcoll failed! Ignoring result\n");
+ }
+ }
+ }
+
+ /* testing the partial sortkeys */
+ { /*!QUICK*/
+ int32_t partialSizes[] = { 3, 1, 2, 4, 8, 20, 80 }; /* just size 3 in the quick mode */
+ int32_t partialSizesSize = 1;
+ if(!quick) {
+ partialSizesSize = 7;
+ }
+ int32_t i = 0;
+ log("partial sortkey test piecesize=");
+ for(i = 0; i < partialSizesSize; i++) {
+ UCollationResult partialSKResult = (UCollationResult)result, partialNormalizedSKResult = (UCollationResult)result;
+ log("%i ", partialSizes[i]);
+
+ partialSKResult = compareUsingPartials(myCollation, src, sLen, trg, tLen, partialSizes[i], status);
+ if(partialSKResult != (UCollationResult)result) {
+ errln("Partial sortkey comparison returned wrong result: "+source+", "+target+" (size "+partialSizes[i]+")");
+ }
+
+ if(norm != UCOL_ON && !quick) {
+ log("N ");
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ partialNormalizedSKResult = compareUsingPartials(myCollation, src, sLen, trg, tLen, partialSizes[i], status);
+ ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, norm, &status);
+ if(partialSKResult != partialNormalizedSKResult) {
+ errln("Partial sortkey comparison gets different result when normalization is on: "+source+", "+target+" (size "+partialSizes[i]+")");
+ }
+ }
+ }
+ log("\n");
+ }
+/*
+ if (compareResult != result) {
+ errln("String comparison failed in variant test\n");
+ }
+ if (keyResult != result) {
+ errln("Collation key comparison failed in variant test\n");
+ }
+*/
+}
+
+void
+IntlTestCollator::doTest(Collator* col, const UChar *source, const UChar *target, Collator::EComparisonResult result) {
+ doTest(col, UnicodeString(source), UnicodeString(target), result);
+}
+
+void
+IntlTestCollator::doTest(Collator* col, const UnicodeString &source, const UnicodeString &target, Collator::EComparisonResult result)
+{
+ if(col) {
+ doTestVariant(col, source, target, result);
+ if(result == Collator::LESS) {
+ doTestVariant(col, target, source, Collator::GREATER);
+ } else if (result == Collator::GREATER) {
+ doTestVariant(col, target, source, Collator::LESS);
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+ CollationElementIterator* c = ((RuleBasedCollator *)col)->createCollationElementIterator( source );
+ logln("Testing iterating source: "+source);
+ backAndForth(*c);
+ c->setText(target, status);
+ logln("Testing iterating target: "+target);
+ backAndForth(*c);
+ delete c;
+ }
+}
+
+
+// used for collation result reporting, defined here for convenience
+// (maybe moved later)
+void
+IntlTestCollator::reportCResult( const UnicodeString &source, const UnicodeString &target,
+ CollationKey &sourceKey, CollationKey &targetKey,
+ Collator::EComparisonResult compareResult,
+ Collator::EComparisonResult keyResult,
+ Collator::EComparisonResult incResult,
+ Collator::EComparisonResult expectedResult )
+{
+ if (expectedResult < -1 || expectedResult > 1)
+ {
+ errln("***** invalid call to reportCResult ****");
+ return;
+ }
+
+ UBool ok1 = (compareResult == expectedResult);
+ UBool ok2 = (keyResult == expectedResult);
+ UBool ok3 = (incResult == expectedResult);
+
+
+ if (ok1 && ok2 && ok3 && !verbose) {
+ // Keep non-verbose, passing tests fast
+ return;
+ } else {
+ UnicodeString msg1(ok1 ? "Ok: compare(" : "FAIL: compare(");
+ UnicodeString msg2(", "), msg3(") returned "), msg4("; expected ");
+ UnicodeString prettySource, prettyTarget, sExpect, sResult;
+
+ IntlTest::prettify(source, prettySource);
+ IntlTest::prettify(target, prettyTarget);
+ appendCompareResult(compareResult, sResult);
+ appendCompareResult(expectedResult, sExpect);
+
+ if (ok1) {
+ logln(msg1 + prettySource + msg2 + prettyTarget + msg3 + sResult);
+ } else {
+ errln(msg1 + prettySource + msg2 + prettyTarget + msg3 + sResult + msg4 + sExpect);
+ }
+
+ msg1 = UnicodeString(ok2 ? "Ok: key(" : "FAIL: key(");
+ msg2 = ").compareTo(key(";
+ msg3 = ")) returned ";
+
+ appendCompareResult(keyResult, sResult);
+
+ if (ok2) {
+ logln(msg1 + prettySource + msg2 + prettyTarget + msg3 + sResult);
+ } else {
+ errln(msg1 + prettySource + msg2 + prettyTarget + msg3 + sResult + msg4 + sExpect);
+
+ msg1 = " ";
+ msg2 = " vs. ";
+
+ prettify(sourceKey, prettySource);
+ prettify(targetKey, prettyTarget);
+
+ errln(msg1 + prettySource + msg2 + prettyTarget);
+ }
+ msg1 = UnicodeString (ok3 ? "Ok: incCompare(" : "FAIL: incCompare(");
+ msg2 = ", ";
+ msg3 = ") returned ";
+
+ appendCompareResult(incResult, sResult);
+
+ if (ok3) {
+ logln(msg1 + prettySource + msg2 + prettyTarget + msg3 + sResult);
+ } else {
+ errln(msg1 + prettySource + msg2 + prettyTarget + msg3 + sResult + msg4 + sExpect);
+ }
+ }
+}
+
+UnicodeString&
+IntlTestCollator::appendCompareResult(Collator::EComparisonResult result,
+ UnicodeString& target)
+{
+ if (result == Collator::LESS)
+ {
+ target += "LESS";
+ }
+ else if (result == Collator::EQUAL)
+ {
+ target += "EQUAL";
+ }
+ else if (result == Collator::GREATER)
+ {
+ target += "GREATER";
+ }
+ else
+ {
+ UnicodeString huh = "?";
+
+ target += (huh + (int32_t)result);
+ }
+
+ return target;
+}
+
+// Produce a printable representation of a CollationKey
+UnicodeString &IntlTestCollator::prettify(const CollationKey &source, UnicodeString &target)
+{
+ int32_t i, byteCount;
+ const uint8_t *bytes = source.getByteArray(byteCount);
+
+ target.remove();
+ target += "[";
+
+ for (i = 0; i < byteCount; i += 1)
+ {
+ appendHex(bytes[i], 2, target);
+ target += " ";
+ }
+
+ target += "]";
+
+ return target;
+}
+
+void IntlTestCollator::backAndForth(CollationElementIterator &iter)
+{
+ // Run through the iterator forwards and stick it into an array
+ int32_t orderLength = 0;
+ int32_t *orders = getOrders(iter, orderLength);
+ UErrorCode status = U_ZERO_ERROR;
+
+ // Now go through it backwards and make sure we get the same values
+ int32_t index = orderLength;
+ int32_t o;
+
+ // reset the iterator
+ iter.reset();
+
+ while ((o = iter.previous(status)) != CollationElementIterator::NULLORDER)
+ {
+ if (index == 0) {
+ if(o == 0) {
+ continue;
+ } else { // this is an error, orders exhausted but there are non-ignorable CEs from
+ // going backwards
+ errln("Backward iteration returned a non ignorable after orders are exhausted");
+ break;
+ }
+ }
+ if (o != orders[--index])
+ {
+ if (o == 0)
+ index ++;
+ else
+ {
+ while (index > 0 && orders[--index] == 0)
+ {
+ }
+ if (o != orders[index])
+ {
+ errln("Mismatch at index %d: 0x%X vs 0x%X", index,
+ orders[index], o);
+ break;
+ }
+ }
+ }
+ }
+
+ while (index != 0 && orders[index - 1] == 0)
+ {
+ index --;
+ }
+
+ if (index != 0)
+ {
+ UnicodeString msg("Didn't get back to beginning - index is ");
+ errln(msg + index);
+
+ iter.reset();
+ err("next: ");
+ while ((o = iter.next(status)) != CollationElementIterator::NULLORDER)
+ {
+ UnicodeString hexString("0x");
+
+ appendHex(o, 8, hexString);
+ hexString += " ";
+ err(hexString);
+ }
+ errln("");
+
+ err("prev: ");
+ while ((o = iter.previous(status)) != CollationElementIterator::NULLORDER)
+ {
+ UnicodeString hexString("0x");
+
+ appendHex(o, 8, hexString);
+ hexString += " ";
+ err(hexString);
+ }
+ errln("");
+ }
+
+ delete[] orders;
+}
+
+
+/**
+ * Return an integer array containing all of the collation orders
+ * returned by calls to next on the specified iterator
+ */
+int32_t *IntlTestCollator::getOrders(CollationElementIterator &iter, int32_t &orderLength)
+{
+ int32_t maxSize = 100;
+ int32_t size = 0;
+ int32_t *orders = new int32_t[maxSize];
+ UErrorCode status = U_ZERO_ERROR;
+
+ int32_t order;
+ while ((order = iter.next(status)) != CollationElementIterator::NULLORDER)
+ {
+ if (size == maxSize)
+ {
+ maxSize *= 2;
+ int32_t *temp = new int32_t[maxSize];
+
+ uprv_memcpy(temp, orders, size * sizeof(int32_t));
+ delete[] orders;
+ orders = temp;
+ }
+
+ orders[size++] = order;
+ }
+
+ if (maxSize > size)
+ {
+ int32_t *temp = new int32_t[size];
+
+ uprv_memcpy(temp, orders, size * sizeof(int32_t));
+ delete[] orders;
+ orders = temp;
+ }
+
+ orderLength = size;
+ return orders;
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tscoll.h b/Build/source/libs/icu/icu-xetex/test/intltest/tscoll.h
new file mode 100644
index 00000000000..b3de70f3628
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tscoll.h
@@ -0,0 +1,52 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * MajorTestLevel is the top level test class for everything in the directory "IntlWork".
+ */
+
+#ifndef _INTLTESTCOLLATOR
+#define _INTLTESTCOLLATOR
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "intltest.h"
+#include "unicode/coll.h"
+#include "unicode/coleitr.h"
+
+
+class IntlTestCollator: public IntlTest {
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+protected:
+ // These two should probably go down in IntlTest
+ void doTest(Collator* col, const UChar *source, const UChar *target, Collator::EComparisonResult result);
+
+ void doTest(Collator* col, const UnicodeString &source, const UnicodeString &target, Collator::EComparisonResult result);
+ void doTestVariant(Collator* col, const UnicodeString &source, const UnicodeString &target, Collator::EComparisonResult result);
+ virtual void reportCResult( const UnicodeString &source, const UnicodeString &target,
+ CollationKey &sourceKey, CollationKey &targetKey,
+ Collator::EComparisonResult compareResult,
+ Collator::EComparisonResult keyResult,
+ Collator::EComparisonResult incResult,
+ Collator::EComparisonResult expectedResult );
+
+ static UnicodeString &prettify(const CollationKey &source, UnicodeString &target);
+ static UnicodeString &appendCompareResult(Collator::EComparisonResult result, UnicodeString &target);
+ void backAndForth(CollationElementIterator &iter);
+ /**
+ * Return an integer array containing all of the collation orders
+ * returned by calls to next on the specified iterator
+ */
+ int32_t *getOrders(CollationElementIterator &iter, int32_t &orderLength);
+ UCollationResult compareUsingPartials(UCollator *coll, const UChar source[], int32_t sLen, const UChar target[], int32_t tLen, int32_t pieceSize, UErrorCode &status);
+
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsdate.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tsdate.cpp
new file mode 100644
index 00000000000..00f740ec0a1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsdate.cpp
@@ -0,0 +1,288 @@
+/***********************************************************************
+ * Copyright (c) 1997-2006, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
+#include "tsdate.h"
+#include "putilimp.h"
+
+#include <float.h>
+#include <stdlib.h>
+#include <math.h>
+
+const double IntlTestDateFormat::ONEYEAR = 365.25 * ONEDAY; // Approximate
+
+IntlTestDateFormat::~IntlTestDateFormat() {}
+
+/**
+ * This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
+ * DateFormat.
+ */
+// par is ignored throughout this file
+void IntlTestDateFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite DateFormat");
+ switch (index) {
+ case 0: name = "GenericTest";
+ if (exec) {
+ logln(name);
+ fFormat = DateFormat::createInstance();
+ fTestName = "createInstance";
+ fLimit = 3;
+ testFormat(/* par */);
+ }
+ break;
+ case 1: name = "DefaultLocale";
+ if (exec) {
+ logln(name);
+ testLocale(/*par, */Locale::getDefault(), "Default Locale");
+ }
+ break;
+
+ case 2: name = "TestAvailableLocales";
+ if (exec) {
+ logln(name);
+ testAvailableLocales(/* par */);
+ }
+ break;
+
+ case 3: name = "MonsterTest";
+ if (exec) {
+ logln(name);
+ monsterTest(/*par*/);
+ }
+ break;
+
+ default: name = ""; break;
+ }
+}
+
+void
+IntlTestDateFormat::testLocale(/*char* par, */const Locale& locale, const UnicodeString& localeName)
+{
+ DateFormat::EStyle timeStyle, dateStyle;
+
+ // For patterns including only time information and a timezone, it may take
+ // up to three iterations, since the timezone may shift as the year number
+ // is determined. For other patterns, 2 iterations should suffice.
+ fLimit = 3;
+
+ for(timeStyle = (DateFormat::EStyle)0;
+ timeStyle < (DateFormat::EStyle)4;
+ timeStyle = (DateFormat::EStyle) (timeStyle+1))
+ {
+ fTestName = (UnicodeString) "Time test " + (int32_t) timeStyle + " (" + localeName + ")";
+ fFormat = DateFormat::createTimeInstance(timeStyle, locale);
+ testFormat(/* par */);
+ }
+
+ fLimit = 2;
+
+ for(dateStyle = (DateFormat::EStyle)0;
+ dateStyle < (DateFormat::EStyle)4;
+ dateStyle = (DateFormat::EStyle) (dateStyle+1))
+ {
+ fTestName = (UnicodeString) "Date test " + (int32_t) dateStyle + " (" + localeName + ")";
+ fFormat = DateFormat::createDateInstance(dateStyle, locale);
+ testFormat(/* par */);
+ }
+
+ for(dateStyle = (DateFormat::EStyle)0;
+ dateStyle < (DateFormat::EStyle)4;
+ dateStyle = (DateFormat::EStyle) (dateStyle+1))
+ {
+ for(timeStyle = (DateFormat::EStyle)0;
+ timeStyle < (DateFormat::EStyle)4;
+ timeStyle = (DateFormat::EStyle) (timeStyle+1))
+ {
+ fTestName = (UnicodeString) "DateTime test " + (int32_t) dateStyle + "/" + (int32_t) timeStyle + " (" + localeName + ")";
+ fFormat = DateFormat::createDateTimeInstance(dateStyle, timeStyle, locale);
+ testFormat(/* par */);
+ }
+ }
+}
+
+void IntlTestDateFormat::testFormat(/* char* par */)
+{
+ if (fFormat == 0)
+ {
+ errln("FAIL: DateFormat creation failed");
+ return;
+ }
+
+ describeTest();
+
+ UDate now = Calendar::getNow();
+ tryDate(0);
+ tryDate(1278161801778.0);
+ tryDate(5264498352317.0); // Sunday, October 28, 2136 8:39:12 AM PST
+ tryDate(9516987689250.0); // In the year 2271
+ tryDate(now);
+ // Shift 6 months into the future, AT THE SAME TIME OF DAY.
+ // This will test the DST handling.
+ tryDate(now + 6.0*30*ONEDAY);
+
+ UDate limit = now * 10; // Arbitrary limit
+ for (int32_t i=0; i<3; ++i)
+ tryDate(uprv_floor(randDouble() * limit));
+
+ delete fFormat;
+}
+
+void
+IntlTestDateFormat::describeTest()
+{
+ // Assume it's a SimpleDateFormat and get some info
+ SimpleDateFormat *s = (SimpleDateFormat*)fFormat;
+ UnicodeString str;
+ logln(fTestName + " Pattern " + s->toPattern(str));
+}
+
+void IntlTestDateFormat::tryDate(UDate theDate)
+{
+ const int32_t DEPTH = 10;
+ UDate date[DEPTH];
+ UnicodeString string[DEPTH];
+
+ int32_t dateMatch = 0;
+ int32_t stringMatch = 0;
+ UBool dump = FALSE;
+#if defined (U_CAL_DEBUG)
+ dump = TRUE;
+#endif
+ int32_t i;
+
+ date[0] = theDate;
+ fFormat->format(theDate, string[0]);
+
+ for (i=1; i<DEPTH; ++i)
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ date[i] = fFormat->parse(string[i-1], status);
+ if (U_FAILURE(status))
+ {
+ describeTest();
+ errln("**** FAIL: Parse of " + prettify(string[i-1], FALSE) + " failed.");
+ dump = TRUE;
+ break;
+ }
+ fFormat->format(date[i], string[i]);
+ if (dateMatch == 0 && date[i] == date[i-1])
+ dateMatch = i;
+ else if (dateMatch > 0 && date[i] != date[i-1])
+ {
+ describeTest();
+ errln("**** FAIL: Date mismatch after match for " + string[i]);
+ dump = TRUE;
+ break;
+ }
+ if (stringMatch == 0 && string[i] == string[i-1])
+ stringMatch = i;
+ else if (stringMatch > 0 && string[i] != string[i-1])
+ {
+ describeTest();
+ errln("**** FAIL: String mismatch after match for " + string[i]);
+ dump = TRUE;
+ break;
+ }
+ if (dateMatch > 0 && stringMatch > 0)
+ break;
+ }
+ if (i == DEPTH)
+ --i;
+
+ if (stringMatch > fLimit || dateMatch > fLimit)
+ {
+ describeTest();
+ errln((UnicodeString)"**** FAIL: No string and/or date match within " + fLimit
+ + " iterations for the Date " + string[0] + "\t(" + theDate + ").");
+ dump = TRUE;
+ }
+
+ if (dump)
+ {
+ for (int32_t k=0; k<=i; ++k)
+ {
+ logln((UnicodeString)"" + k + ": " + date[k] + " F> " +
+ string[k] + " P> ");
+ }
+ }
+}
+
+// Return a random double from 0.01 to 1, inclusive
+double IntlTestDateFormat::randDouble()
+{
+ // Assume 8-bit (or larger) rand values. Also assume
+ // that the system rand() function is very poor, which it always is.
+ double d=0.0;
+ uint32_t i;
+ char* poke = (char*)&d;
+ do {
+ do {
+ for (i=0; i < sizeof(double); ++i)
+ {
+ poke[i] = (char)(rand() & 0xFF);
+ }
+ } while (uprv_isNaN(d) || uprv_isInfinite(d));
+
+ if (d < 0.0)
+ d = -d;
+ if (d > 0.0)
+ {
+ double e = uprv_floor(log10(d));
+ if (e < -2.0)
+ d *= uprv_pow10((int32_t)(-e-2));
+ else if (e > -1.0)
+ d /= uprv_pow10((int32_t)(e+1));
+ }
+ // While this is not a real normalized number make another one.
+ } while (uprv_isNaN(d) || uprv_isInfinite(d)
+ || !((-DBL_MAX < d && d < DBL_MAX) || (d < -DBL_MIN && DBL_MIN < d)));
+ return d;
+}
+
+void IntlTestDateFormat::testAvailableLocales(/* char* par */)
+{
+ int32_t count = 0;
+ const Locale* locales = DateFormat::getAvailableLocales(count);
+ logln((UnicodeString)"" + count + " available locales");
+ if (locales && count)
+ {
+ UnicodeString name;
+ UnicodeString all;
+ for (int32_t i=0; i<count; ++i)
+ {
+ if (i!=0) all += ", ";
+ all += locales[i].getName();
+ }
+ logln(all);
+ }
+ else errln((UnicodeString)"**** FAIL: Zero available locales or null array pointer");
+}
+
+void IntlTestDateFormat::monsterTest(/*char *par*/)
+{
+ int32_t count;
+ const Locale* locales = DateFormat::getAvailableLocales(count);
+ if (locales && count)
+ {
+ if (quick && count > 3) {
+ logln("quick test: testing just 3 locales!");
+ count = 3;
+ }
+ for (int32_t i=0; i<count; ++i)
+ {
+ UnicodeString name = UnicodeString(locales[i].getName(), "");
+ logln((UnicodeString)"Testing " + name + "...");
+ testLocale(/*par, */locales[i], name);
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsdate.h b/Build/source/libs/icu/icu-xetex/test/intltest/tsdate.h
new file mode 100644
index 00000000000..2707bacde24
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsdate.h
@@ -0,0 +1,82 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTDATEFORMAT
+#define _INTLTESTDATEFORMAT
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "unicode/datefmt.h"
+#include "intltest.h"
+
+/**
+ * Performs some tests in many variations on DateFormat
+ **/
+class IntlTestDateFormat: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+
+ /**
+ * test DateFormat::getAvailableLocales
+ **/
+ void testAvailableLocales(/* char* par */);
+ /**
+ * call testLocale for all locales
+ **/
+ void monsterTest(/* char *par */);
+
+ /**
+ * call tryDate with variations, called by testLocale
+ **/
+ void testFormat(/* char* par */);
+ /**
+ * perform tests using date and fFormat, called in many variations
+ **/
+ void tryDate(UDate date);
+ /**
+ * call testFormat for different DateFormat::EStyle's, etc
+ **/
+ void testLocale(/*char *par, */const Locale&, const UnicodeString&);
+ /**
+ * return a random number
+ **/
+ double randDouble(void);
+ /**
+ * generate description for verbose test output
+ **/
+ void describeTest(void);
+
+ DateFormat *fFormat;
+ UnicodeString fTestName;
+ int32_t fLimit; // How many iterations it should take to reach convergence
+
+ enum
+ {
+ // Values in milliseconds (== Date)
+ ONESECOND = 1000,
+ ONEMINUTE = 60 * ONESECOND,
+ ONEHOUR = 60 * ONEMINUTE,
+ ONEDAY = 24 * ONEHOUR
+ };
+ static const double ONEYEAR;
+ enum EMode
+ {
+ GENERIC,
+ TIME,
+ DATE,
+ DATE_TIME
+ };
+public:
+ virtual ~IntlTestDateFormat();
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.cpp
new file mode 100644
index 00000000000..e243eec1a1f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.cpp
@@ -0,0 +1,185 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/dcfmtsym.h"
+#include "unicode/decimfmt.h"
+#include "unicode/unum.h"
+#include "tsdcfmsy.h"
+
+void IntlTestDecimalFormatSymbols::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite DecimalFormatSymbols");
+ switch (index) {
+ case 0: name = "DecimalFormatSymbols test";
+ if (exec) {
+ logln("DecimalFormatSymbols test---"); logln("");
+ testSymbols(/*par*/);
+ }
+ break;
+
+ default: name = ""; break;
+ }
+}
+
+/**
+ * Test the API of DecimalFormatSymbols; primarily a simple get/set set.
+ */
+void IntlTestDecimalFormatSymbols::testSymbols(/* char *par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ DecimalFormatSymbols fr(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create French DecimalFormatSymbols");
+ }
+
+ status = U_ZERO_ERROR;
+ DecimalFormatSymbols en(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create English DecimalFormatSymbols");
+ }
+
+ if(en == fr || ! (en != fr) ) {
+ errln("ERROR: English DecimalFormatSymbols equal to French");
+ }
+
+ // just do some VERY basic tests to make sure that get/set work
+
+ UnicodeString zero = en.getSymbol(DecimalFormatSymbols::kZeroDigitSymbol);
+ fr.setSymbol(DecimalFormatSymbols::kZeroDigitSymbol, zero);
+ if(fr.getSymbol(DecimalFormatSymbols::kZeroDigitSymbol) != en.getSymbol(DecimalFormatSymbols::kZeroDigitSymbol)) {
+ errln("ERROR: get/set ZeroDigit failed");
+ }
+
+ UnicodeString group = en.getSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol);
+ fr.setSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol, group);
+ if(fr.getSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol) != en.getSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol)) {
+ errln("ERROR: get/set GroupingSeparator failed");
+ }
+
+ UnicodeString decimal = en.getSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol);
+ fr.setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol, decimal);
+ if(fr.getSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol) != en.getSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol)) {
+ errln("ERROR: get/set DecimalSeparator failed");
+ }
+
+ UnicodeString perMill = en.getSymbol(DecimalFormatSymbols::kPerMillSymbol);
+ fr.setSymbol(DecimalFormatSymbols::kPerMillSymbol, perMill);
+ if(fr.getSymbol(DecimalFormatSymbols::kPerMillSymbol) != en.getSymbol(DecimalFormatSymbols::kPerMillSymbol)) {
+ errln("ERROR: get/set PerMill failed");
+ }
+
+ UnicodeString percent = en.getSymbol(DecimalFormatSymbols::kPercentSymbol);
+ fr.setSymbol(DecimalFormatSymbols::kPercentSymbol, percent);
+ if(fr.getSymbol(DecimalFormatSymbols::kPercentSymbol) != en.getSymbol(DecimalFormatSymbols::kPercentSymbol)) {
+ errln("ERROR: get/set Percent failed");
+ }
+
+ UnicodeString digit(en.getSymbol(DecimalFormatSymbols::kDigitSymbol));
+ fr.setSymbol(DecimalFormatSymbols::kDigitSymbol, digit);
+ if(fr.getSymbol(DecimalFormatSymbols::kDigitSymbol) != en.getSymbol(DecimalFormatSymbols::kDigitSymbol)) {
+ errln("ERROR: get/set Percent failed");
+ }
+
+ UnicodeString patternSeparator = en.getSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol);
+ fr.setSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol, patternSeparator);
+ if(fr.getSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol) != en.getSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol)) {
+ errln("ERROR: get/set PatternSeparator failed");
+ }
+
+ UnicodeString infinity(en.getSymbol(DecimalFormatSymbols::kInfinitySymbol));
+ fr.setSymbol(DecimalFormatSymbols::kInfinitySymbol, infinity);
+ UnicodeString infinity2(fr.getSymbol(DecimalFormatSymbols::kInfinitySymbol));
+ if(infinity != infinity2) {
+ errln("ERROR: get/set Infinity failed");
+ }
+
+ UnicodeString nan(en.getSymbol(DecimalFormatSymbols::kNaNSymbol));
+ fr.setSymbol(DecimalFormatSymbols::kNaNSymbol, nan);
+ UnicodeString nan2(fr.getSymbol(DecimalFormatSymbols::kNaNSymbol));
+ if(nan != nan2) {
+ errln("ERROR: get/set NaN failed");
+ }
+
+ UnicodeString minusSign = en.getSymbol(DecimalFormatSymbols::kMinusSignSymbol);
+ fr.setSymbol(DecimalFormatSymbols::kMinusSignSymbol, minusSign);
+ if(fr.getSymbol(DecimalFormatSymbols::kMinusSignSymbol) != en.getSymbol(DecimalFormatSymbols::kMinusSignSymbol)) {
+ errln("ERROR: get/set MinusSign failed");
+ }
+
+ UnicodeString exponential(en.getSymbol(DecimalFormatSymbols::kExponentialSymbol));
+ fr.setSymbol(DecimalFormatSymbols::kExponentialSymbol, exponential);
+ if(fr.getSymbol(DecimalFormatSymbols::kExponentialSymbol) != en.getSymbol(DecimalFormatSymbols::kExponentialSymbol)) {
+ errln("ERROR: get/set Exponential failed");
+ }
+
+ status = U_ZERO_ERROR;
+ DecimalFormatSymbols foo(status);
+
+ DecimalFormatSymbols bar(foo);
+
+ en = fr;
+
+ if(en != fr || foo != bar) {
+ errln("ERROR: Copy Constructor or Assignment failed");
+ }
+
+ // test get/setSymbol()
+ if((int) UNUM_FORMAT_SYMBOL_COUNT != (int) DecimalFormatSymbols::kFormatSymbolCount) {
+ errln("unum.h and decimfmt.h have inconsistent numbers of format symbols!");
+ return;
+ }
+
+ int i;
+ for(i = 0; i < (int)DecimalFormatSymbols::kFormatSymbolCount; ++i) {
+ foo.setSymbol((DecimalFormatSymbols::ENumberFormatSymbol)i, UnicodeString((UChar32)(0x10330 + i)));
+ }
+ for(i = 0; i < (int)DecimalFormatSymbols::kFormatSymbolCount; ++i) {
+ if(foo.getSymbol((DecimalFormatSymbols::ENumberFormatSymbol)i) != UnicodeString((UChar32)(0x10330 + i))) {
+ errln("get/setSymbol did not roundtrip, got " +
+ foo.getSymbol((DecimalFormatSymbols::ENumberFormatSymbol)i) +
+ ", expected " +
+ UnicodeString((UChar32)(0x10330 + i)));
+ }
+ }
+
+
+ DecimalFormatSymbols sym(Locale::getUS(), status);
+
+ UnicodeString customDecSeperator("S");
+ Verify(34.5, (UnicodeString)"00.00", sym, (UnicodeString)"34.50");
+ sym.setSymbol((DecimalFormatSymbols::ENumberFormatSymbol)0, customDecSeperator);
+ Verify(34.5, (UnicodeString)"00.00", sym, (UnicodeString)"34S50");
+ sym.setSymbol((DecimalFormatSymbols::ENumberFormatSymbol)3, (UnicodeString)"P");
+ Verify(34.5, (UnicodeString)"00 %", sym, (UnicodeString)"3450 P");
+ sym.setSymbol((DecimalFormatSymbols::ENumberFormatSymbol)8, (UnicodeString)"D");
+ Verify(34.5, CharsToUnicodeString("\\u00a4##.##"), sym, (UnicodeString)"D34.5");
+ sym.setSymbol((DecimalFormatSymbols::ENumberFormatSymbol)1, (UnicodeString)"|");
+ Verify(3456.5, (UnicodeString)"0,000.##", sym, (UnicodeString)"3|456S5");
+
+}
+
+void IntlTestDecimalFormatSymbols::Verify(double value, const UnicodeString& pattern, DecimalFormatSymbols sym, const UnicodeString& expected){
+ UErrorCode status = U_ZERO_ERROR;
+ DecimalFormat *df = new DecimalFormat(pattern, sym, status);
+ if(U_FAILURE(status)){
+ errln("ERROR: construction of decimal format failed");
+ }
+ UnicodeString buffer;
+ FieldPosition pos(FieldPosition::DONT_CARE);
+ buffer = df->format(value, buffer, pos);
+ if(buffer != expected){
+ errln((UnicodeString)"ERROR: format failed after setSymbols()\n Expected " +
+ expected + ", Got " + buffer);
+ }
+ delete df;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.h b/Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.h
new file mode 100644
index 00000000000..828d0f434ad
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsdcfmsy.h
@@ -0,0 +1,35 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2001, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTDECIMALFORMATSYMBOLS
+#define _INTLTESTDECIMALFORMATSYMBOLS
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/unistr.h"
+#include "unicode/dcfmtsym.h"
+#include "intltest.h"
+/**
+ * Tests for DecimalFormatSymbols
+ **/
+class IntlTestDecimalFormatSymbols: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+ /**
+ * Test the API of DecimalFormatSymbols; primarily a simple get/set set.
+ */
+ void testSymbols(/*char *par*/);
+
+ /** helper functions**/
+ void Verify(double value, const UnicodeString& pattern, DecimalFormatSymbols sym, const UnicodeString& expected);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.cpp
new file mode 100644
index 00000000000..3aae499398e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.cpp
@@ -0,0 +1,347 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "tsdtfmsy.h"
+
+#include "unicode/dtfmtsym.h"
+
+
+//--------------------------------------------------------------------
+// Time bomb - allows temporary behavior that expires at a given
+// release
+//--------------------------------------------------------------------
+
+void IntlTestDateFormatSymbols::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite DateFormatSymbols");
+ switch (index) {
+ TESTCASE(0,TestSymbols);
+ TESTCASE(1,TestGetMonths);
+ TESTCASE(2,TestGetMonths2);
+ TESTCASE(3,TestGetWeekdays2);
+ TESTCASE(4,TestGetEraNames);
+ default: name = ""; break;
+ }
+}
+
+/**
+ * Test getMonths.
+ */
+void IntlTestDateFormatSymbols::TestGetMonths()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t cnt;
+ const UnicodeString* month;
+ DateFormatSymbols *symbol;
+
+ symbol=new DateFormatSymbols(Locale::getDefault(), status);
+
+ month=symbol->getMonths(cnt);
+
+ logln((UnicodeString)"size = " + cnt);
+
+ for (int32_t i=0; i<cnt; ++i)
+ {
+ logln(month[i]);
+ }
+
+ delete symbol;
+}
+
+void IntlTestDateFormatSymbols::TestGetMonths2()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormatSymbols *symbol;
+
+ symbol=new DateFormatSymbols(Locale::getDefault(), status);
+
+ DateFormatSymbols::DtContextType context[] = {DateFormatSymbols::STANDALONE, DateFormatSymbols::FORMAT};
+ DateFormatSymbols::DtWidthType width[] = {DateFormatSymbols::WIDE, DateFormatSymbols::ABBREVIATED, DateFormatSymbols::NARROW};
+
+ for (int32_t i = 0; i < 2; i++) {
+ for (int32_t j = 0; j < 3; j++) {
+ int32_t cnt;
+ const UnicodeString * month = symbol->getMonths(cnt,context[i],width[j]);
+
+ logln((UnicodeString)"size = " + cnt);
+
+ for (int32_t k = 0; k < cnt; k++) {
+ logln(month[k]);
+ }
+ }
+ }
+ delete symbol;
+}
+
+void IntlTestDateFormatSymbols::TestGetWeekdays2()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormatSymbols *symbol;
+
+ symbol=new DateFormatSymbols(Locale::getDefault(), status);
+
+ DateFormatSymbols::DtContextType context[] = {DateFormatSymbols::STANDALONE, DateFormatSymbols::FORMAT};
+ DateFormatSymbols::DtWidthType width[] = {DateFormatSymbols::WIDE, DateFormatSymbols::ABBREVIATED, DateFormatSymbols::NARROW};
+
+ for (int32_t i = 0; i < 2; i++) {
+ for (int32_t j = 0; j < 3; j++) {
+ int32_t cnt;
+ const UnicodeString * wd = symbol->getWeekdays(cnt,context[i],width[j]);
+
+ logln((UnicodeString)"size = " + cnt);
+
+ for (int32_t k = 0; k < cnt; k++) {
+ logln(wd[k]);
+ }
+ }
+ }
+ delete symbol;
+}
+
+
+void IntlTestDateFormatSymbols::TestGetEraNames()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t cnt;
+ const UnicodeString* name;
+ DateFormatSymbols *symbol;
+
+ symbol=new DateFormatSymbols(Locale::getDefault(), status);
+
+ name=symbol->getEraNames(cnt);
+
+ logln((UnicodeString)"size = " + cnt);
+
+ for (int32_t i=0; i<cnt; ++i)
+ {
+ logln(name[i]);
+ }
+
+ delete symbol;
+}
+
+/**
+ * Test the API of DateFormatSymbols; primarily a simple get/set set.
+ */
+void IntlTestDateFormatSymbols::TestSymbols(/* char *par */)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ DateFormatSymbols fr(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create French DateFormatSymbols " + (UnicodeString)u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ DateFormatSymbols fr2(Locale::getFrench(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create French DateFormatSymbols " + (UnicodeString)u_errorName(status));
+ }
+
+ status = U_ZERO_ERROR;
+ DateFormatSymbols en(Locale::getEnglish(), status);
+ if(U_FAILURE(status)) {
+ errln("ERROR: Couldn't create English DateFormatSymbols " + (UnicodeString)u_errorName(status));
+ }
+
+ if(en == fr || ! (en != fr) ) {
+ errln("ERROR: English DateFormatSymbols equal to French");
+ }
+
+ // just do some VERY basic tests to make sure that get/set work
+
+ int32_t count = 0;
+ const UnicodeString *eras = en.getEras(count);
+ if(count == 0) {
+ errln("ERROR: 0 english eras.. exitting..\n");
+ return;
+ }
+
+ fr.setEras(eras, count);
+ if( *en.getEras(count) != *fr.getEras(count)) {
+ errln("ERROR: setEras() failed");
+ }
+
+ const UnicodeString *months = en.getMonths(count);
+ fr.setMonths(months, count);
+ if( *en.getMonths(count) != *fr.getMonths(count)) {
+ errln("ERROR: setMonths() failed");
+ }
+
+ const UnicodeString *shortMonths = en.getShortMonths(count);
+ fr.setShortMonths(shortMonths, count);
+ if( *en.getShortMonths(count) != *fr.getShortMonths(count)) {
+ errln("ERROR: setShortMonths() failed");
+ }
+
+ const UnicodeString *wideMonths = en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE);
+ fr2.setMonths(wideMonths, count, DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE);
+ if( *en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE) !=
+ *fr2.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE )) {
+ errln("ERROR: setMonths(FORMAT,WIDE) failed");
+ }
+
+ const UnicodeString *abbrMonths = en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED);
+ fr2.setMonths(abbrMonths, count, DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED);
+ if( *en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED) !=
+ *fr2.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED )) {
+ errln("ERROR: setMonths(FORMAT,ABBREVIATED) failed");
+ }
+
+ const UnicodeString *narrowMonths = en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW);
+ fr.setMonths(narrowMonths, count, DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW);
+ if( *en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW) !=
+ *fr.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW )) {
+ errln("ERROR: setMonths(FORMAT,NARROW) failed");
+ }
+
+ const UnicodeString *standaloneWideMonths = en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE);
+ fr.setMonths(standaloneWideMonths, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE);
+ if( *en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE) !=
+ *fr.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE )) {
+ errln("ERROR: setMonths(STANDALONE,WIDE) failed");
+ }
+
+ const UnicodeString *standaloneShortMonths = en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED);
+ fr.setMonths(standaloneShortMonths, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED);
+ if( *en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED) !=
+ *fr.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED )) {
+ errln("ERROR: setMonths(STANDALONE,ABBREVIATED) failed");
+ }
+
+ const UnicodeString *standaloneNarrowMonths = en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW);
+ fr.setMonths(standaloneNarrowMonths, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW);
+ if( *en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW) !=
+ *fr.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW )) {
+ errln("ERROR: setMonths(STANDALONE,NARROW) failed");
+ }
+
+ const UnicodeString *weekdays = en.getWeekdays(count);
+ fr.setWeekdays(weekdays, count);
+ if( *en.getWeekdays(count) != *fr.getWeekdays(count)) {
+ errln("ERROR: setWeekdays() failed");
+ }
+
+ const UnicodeString *shortWeekdays = en.getShortWeekdays(count);
+ fr.setShortWeekdays(shortWeekdays, count);
+ if( *en.getShortWeekdays(count) != *fr.getShortWeekdays(count)) {
+ errln("ERROR: setShortWeekdays() failed");
+ }
+
+ const UnicodeString *wideWeekdays = en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE);
+ fr2.setWeekdays(wideWeekdays, count, DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE);
+ if( *en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE) !=
+ *fr2.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE )) {
+ errln("ERROR: setWeekdays(FORMAT,WIDE) failed");
+ }
+
+ const UnicodeString *abbrWeekdays = en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED);
+ fr2.setWeekdays(abbrWeekdays, count, DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED);
+ if( *en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED) !=
+ *fr2.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED )) {
+ errln("ERROR: setWeekdays(FORMAT,ABBREVIATED) failed");
+ }
+
+ const UnicodeString *narrowWeekdays = en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW);
+ fr.setWeekdays(narrowWeekdays, count, DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW);
+ if( *en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW) !=
+ *fr.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW )) {
+ errln("ERROR: setWeekdays(FORMAT,NARROW) failed");
+ }
+
+ const UnicodeString *standaloneWideWeekdays = en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE);
+ fr.setWeekdays(standaloneWideWeekdays, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE);
+ if( *en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE) !=
+ *fr.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE )) {
+ errln("ERROR: setWeekdays(STANDALONE,WIDE) failed");
+ }
+
+ const UnicodeString *standaloneShortWeekdays = en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED);
+ fr.setWeekdays(standaloneShortWeekdays, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED);
+ if( *en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED) !=
+ *fr.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED )) {
+ errln("ERROR: setWeekdays(STANDALONE,ABBREVIATED) failed");
+ }
+
+ const UnicodeString *standaloneNarrowWeekdays = en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW);
+ fr.setWeekdays(standaloneNarrowWeekdays, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW);
+ if( *en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW) !=
+ *fr.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW )) {
+ errln("ERROR: setWeekdays(STANDALONE,NARROW) failed");
+ }
+
+ const UnicodeString *wideQuarters = en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE);
+ fr2.setQuarters(wideQuarters, count, DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE);
+ if( *en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE) !=
+ *fr2.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE )) {
+ errln("ERROR: setQuarters(FORMAT, WIDE) failed");
+ }
+
+ const UnicodeString *abbrQuarters = en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::ABBREVIATED);
+ fr2.setQuarters(abbrQuarters, count, DateFormatSymbols::FORMAT, DateFormatSymbols::ABBREVIATED);
+ if( *en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::ABBREVIATED) !=
+ *fr2.getQuarters(count,DateFormatSymbols::FORMAT ,DateFormatSymbols::ABBREVIATED )) {
+ errln("ERROR: setQuarters(FORMAT, ABBREVIATED) failed");
+ }
+
+ const UnicodeString *standaloneWideQuarters = en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE);
+ fr.setQuarters(standaloneWideQuarters, count, DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE);
+ if( *en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE) !=
+ *fr.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE )) {
+ errln("ERROR: setQuarters(STANDALONE, WIDE) failed");
+ }
+
+ const UnicodeString *standaloneShortQuarters = en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED);
+ fr.setQuarters(standaloneShortQuarters, count, DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED);
+ if( *en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED) !=
+ *fr.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED )) {
+ errln("ERROR: setQuarters(STANDALONE, ABBREVIATED) failed");
+ }
+
+ const UnicodeString *ampms = en.getAmPmStrings(count);
+ fr.setAmPmStrings(ampms, count);
+ if( *en.getAmPmStrings(count) != *fr.getAmPmStrings(count)) {
+ errln("ERROR: setAmPmStrings() failed");
+ }
+
+ int32_t rowCount = 0, columnCount = 0;
+ const UnicodeString **strings = en.getZoneStrings(rowCount, columnCount);
+ fr.setZoneStrings(strings, rowCount, columnCount);
+ const UnicodeString **strings1 = fr.getZoneStrings(rowCount, columnCount);
+ for(int32_t i = 0; i < rowCount; i++) {
+ for(int32_t j = 0; j < columnCount; j++) {
+ if( strings[i][j] != strings1[i][j] ) {
+ errln("ERROR: setZoneStrings() failed");
+ }
+ }
+ }
+
+ UnicodeString localPattern, pat1, pat2;
+ localPattern = en.getLocalPatternChars(localPattern);
+ fr.setLocalPatternChars(localPattern);
+ if( en.getLocalPatternChars(pat1) != fr.getLocalPatternChars(pat2)) {
+ errln("ERROR: setLocalPatternChars() failed");
+ }
+
+
+ status = U_ZERO_ERROR;
+ DateFormatSymbols foo(status);
+ DateFormatSymbols bar(foo);
+
+ en = fr;
+
+ if(en != fr) {
+ errln("ERROR: Assignment operator failed");
+ }
+ if(foo != bar) {
+ errln("ERROR: Copy Constructor failed");
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.h b/Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.h
new file mode 100644
index 00000000000..d289ba4f751
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsdtfmsy.h
@@ -0,0 +1,39 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTDATEFORMATSYMBOLS
+#define _INTLTESTDATEFORMATSYMBOLS
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+/**
+ * Tests for DateFormatSymbols
+ **/
+class IntlTestDateFormatSymbols: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+ /**
+ * Test the API of DateFormatSymbols; primarily a simple get/set set.
+ */
+ void TestSymbols(/* char *par */);
+ /**
+ * Test getMonths.
+ */
+ void TestGetMonths(void);
+ void TestGetMonths2(void);
+
+ void TestGetWeekdays2(void);
+ void TestGetEraNames(void);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.cpp
new file mode 100644
index 00000000000..3dd8e3da980
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.cpp
@@ -0,0 +1,1585 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1999-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#if defined(hpux)
+# ifndef _INCLUDE_POSIX_SOURCE
+# define _INCLUDE_POSIX_SOURCE
+# endif
+#endif
+
+/* Needed by z/OS to get usleep */
+#if !defined(_XOPEN_SOURCE_EXTENDED)
+#define _XOPEN_SOURCE_EXTENDED 1
+#endif
+
+#include "unicode/utypes.h"
+#include "unicode/ustring.h"
+#include "umutex.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "uparse.h"
+#include "unicode/resbund.h"
+#include "unicode/udata.h"
+#include "unicode/uloc.h"
+#include "unicode/locid.h"
+#include "putilimp.h"
+#if !defined(U_WINDOWS) && !defined(XP_MAC) && !defined(U_RHAPSODY)
+#define POSIX 1
+#endif
+
+#if defined(POSIX) || defined(U_SOLARIS) || defined(U_AIX) || defined(U_HPUX)
+
+#define HAVE_IMP
+
+#if (ICU_USE_THREADS == 1)
+#include <pthread.h>
+#endif
+
+#if defined(__hpux) && defined(HPUX_CMA)
+# if defined(read) // read being defined as cma_read causes trouble with iostream::read
+# undef read
+# endif
+#endif
+
+/* Define __EXTENSIONS__ for Solaris and old friends in strict mode. */
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__
+#endif
+
+#include <signal.h>
+
+/* Define _XPG4_2 for Solaris and friends. */
+#ifndef _XPG4_2
+#define _XPG4_2
+#endif
+
+/* Define __USE_XOPEN_EXTENDED for Linux and glibc. */
+#ifndef __USE_XOPEN_EXTENDED
+#define __USE_XOPEN_EXTENDED
+#endif
+
+/* Define _INCLUDE_XOPEN_SOURCE_EXTENDED for HP/UX (11?). */
+#ifndef _INCLUDE_XOPEN_SOURCE_EXTENDED
+#define _INCLUDE_XOPEN_SOURCE_EXTENDED
+#endif
+
+#include <unistd.h>
+
+#endif
+/* HPUX */
+#ifdef sleep
+#undef sleep
+#endif
+
+
+
+#include "tsmthred.h"
+
+#define TSMTHREAD_FAIL(msg) errln("%s at file %s, line %d", msg, __FILE__, __LINE__)
+#define TSMTHREAD_ASSERT(expr) {if (!(expr)) {TSMTHREAD_FAIL("Fail");}}
+
+MultithreadTest::MultithreadTest()
+{
+}
+
+MultithreadTest::~MultithreadTest()
+{
+}
+
+
+
+#if (ICU_USE_THREADS==0)
+void MultithreadTest::runIndexedTest( int32_t index, UBool exec,
+ const char* &name, char* /*par*/ ) {
+ if (exec) logln("TestSuite MultithreadTest: ");
+
+ if(index == 0)
+ name = "NO_THREADED_TESTS";
+ else
+ name = "";
+
+ if(exec) { logln("MultithreadTest - test DISABLED. ICU_USE_THREADS set to 0, check your configuration if this is a problem..");
+ }
+}
+#else
+
+
+
+// Note: A LOT OF THE FUNCTIONS IN THIS FILE SHOULD LIVE ELSEWHERE!!!!!
+// Note: A LOT OF THE FUNCTIONS IN THIS FILE SHOULD LIVE ELSEWHERE!!!!!
+// -srl
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h> // tolower, toupper
+
+#include "unicode/putil.h"
+
+/* for mthreadtest*/
+#include "unicode/numfmt.h"
+#include "unicode/choicfmt.h"
+#include "unicode/msgfmt.h"
+#include "unicode/locid.h"
+#include "unicode/ucol.h"
+#include "unicode/calendar.h"
+#include "ucaconf.h"
+
+//-----------------------------------------------------------------------------------
+//
+// class SimpleThread Of course we need a thread class first..
+// This wrapper has a ported implementation.
+//
+//-----------------------------------------------------------------------------------
+class SimpleThread
+{
+public:
+ SimpleThread();
+ virtual ~SimpleThread();
+ int32_t start(void); // start the thread
+ UBool isRunning(); // return true if a started thread has exited.
+
+ virtual void run(void) = 0; // Override this to provide the code to run
+ // in the thread.
+ void *fImplementation;
+
+public:
+ static void sleep(int32_t millis); // probably shouldn't go here but oh well.
+ static void errorFunc(); // Empty function, provides a single convenient place
+ // to break on errors.
+};
+
+void SimpleThread::errorFunc() {
+ // *(char *)0 = 3; // Force entry into a debugger via a crash;
+}
+
+
+
+
+#ifdef U_WINDOWS
+#define HAVE_IMP
+
+# define VC_EXTRALEAN
+# define WIN32_LEAN_AND_MEAN
+# define NOUSER
+# define NOSERVICE
+# define NOIME
+# define NOMCX
+#include <windows.h>
+#include <process.h>
+
+
+
+//-----------------------------------------------------------------------------------
+//
+// class SimpleThread Windows Implementation
+//
+//-----------------------------------------------------------------------------------
+struct Win32ThreadImplementation
+{
+ HANDLE fHandle;
+ unsigned int fThreadID;
+};
+
+
+extern "C" unsigned int __stdcall SimpleThreadProc(void *arg)
+{
+ ((SimpleThread*)arg)->run();
+ return 0;
+}
+
+SimpleThread::SimpleThread()
+:fImplementation(0)
+{
+ Win32ThreadImplementation *imp = new Win32ThreadImplementation;
+ imp->fHandle = 0;
+ fImplementation = imp;
+}
+
+SimpleThread::~SimpleThread()
+{
+ // Destructor. Because we start the thread running with _beginthreadex(),
+ // we own the Windows HANDLE for the thread and must
+ // close it here.
+ Win32ThreadImplementation *imp = (Win32ThreadImplementation*)fImplementation;
+ if (imp != 0) {
+ if (imp->fHandle != 0) {
+ CloseHandle(imp->fHandle);
+ imp->fHandle = 0;
+ }
+ }
+ delete (Win32ThreadImplementation*)fImplementation;
+}
+
+int32_t SimpleThread::start()
+{
+ Win32ThreadImplementation *imp = (Win32ThreadImplementation*)fImplementation;
+ if(imp->fHandle != NULL) {
+ // The thread appears to have already been started.
+ // This is probably an error on the part of our caller.
+ return -1;
+ }
+
+ imp->fHandle = (HANDLE) _beginthreadex(
+ NULL, // Security
+ 0x20000, // Stack Size
+ SimpleThreadProc, // Function to Run
+ (void *)this, // Arg List
+ 0, // initflag. Start running, not suspended
+ &imp->fThreadID // thraddr
+ );
+
+ if (imp->fHandle == 0) {
+ // An error occured
+ int err = errno;
+ if (err == 0) {
+ err = -1;
+ }
+ return err;
+ }
+ return 0;
+}
+
+
+UBool SimpleThread::isRunning() {
+ //
+ // Test whether the thread associated with the SimpleThread object is
+ // still actually running.
+ //
+ // NOTE: on Win64 on Itanium processors, a crashes
+ // occur if the main thread of a process exits concurrently with some
+ // other thread(s) exiting. To avoid the possibility, we wait until the
+ // OS indicates that all threads have terminated, rather than waiting
+ // only until the end of the user's Run function has been reached.
+ //
+ // I don't know whether the crashes represent a Windows bug, or whether
+ // main() programs are supposed to have to wait for their threads.
+ //
+ Win32ThreadImplementation *imp = (Win32ThreadImplementation*)fImplementation;
+
+ bool success;
+ DWORD threadExitCode;
+
+ if (imp->fHandle == 0) {
+ // No handle, thread must not be running.
+ return FALSE;
+ }
+ success = GetExitCodeThread(imp->fHandle, &threadExitCode) != 0;
+ if (! success) {
+ // Can't get status, thread must not be running.
+ return FALSE;
+ }
+ return (threadExitCode == STILL_ACTIVE);
+}
+
+
+void SimpleThread::sleep(int32_t millis)
+{
+ ::Sleep(millis);
+}
+
+//-----------------------------------------------------------------------------------
+//
+// class SimpleThread NULL Implementation
+//
+//-----------------------------------------------------------------------------------
+#elif defined XP_MAC
+
+// since the Mac has no preemptive threading (at least on MacOS 8), only
+// cooperative threading, threads are a no-op. We have no yield() calls
+// anywhere in the ICU, so we are guaranteed to be thread-safe.
+
+#define HAVE_IMP
+
+SimpleThread::SimpleThread()
+{}
+
+SimpleThread::~SimpleThread()
+{}
+
+int32_t
+SimpleThread::start()
+{ return 0; }
+
+void
+SimpleThread::run()
+{}
+
+void
+SimpleThread::sleep(int32_t millis)
+{}
+
+UBool
+SimpleThread::isRunning() {
+ return FALSE;
+}
+
+#endif
+
+
+//-----------------------------------------------------------------------------------
+//
+// class SimpleThread POSIX implementation
+//
+// A note on the POSIX vs the Windows implementations of this class..
+// On Windows, the main thread must verify that other threads have finished
+// before exiting, or crashes occasionally occur. (Seen on Itanium Win64 only)
+// The function SimpleThread::isRunning() is used for this purpose.
+//
+// On POSIX, there is NO reliable non-blocking mechanism to determine
+// whether a thread has exited. pthread_kill(thread, 0) almost works,
+// but the system can recycle thread ids immediately, so seeing that a
+// thread exists with this call could mean that the original thread has
+// finished and a new one started with the same ID. Useless.
+//
+// So we need to do the check with user code, by setting a flag just before
+// the thread function returns. A technique that is guaranteed to fail
+// on Windows, because it indicates that the thread is done before all
+// system level cleanup has happened.
+//
+//-----------------------------------------------------------------------------------
+#if defined(POSIX)||defined(U_SOLARIS)||defined(U_AIX)||defined(U_HPUX)
+#define HAVE_IMP
+
+struct PosixThreadImplementation
+{
+ pthread_t fThread;
+ UBool fRunning;
+ UBool fRan; /* True if the thread was successfully started */
+};
+
+extern "C" void* SimpleThreadProc(void *arg)
+{
+ // This is the code that is run in the new separate thread.
+ SimpleThread *This = (SimpleThread *)arg;
+ This->run(); // Run the user code.
+
+ // The user function has returned. Set the flag indicating that this thread
+ // is done. Need a mutex for memory barrier purposes only, so that other thread
+ // will reliably see that the flag has changed.
+ PosixThreadImplementation *imp = (PosixThreadImplementation*)This->fImplementation;
+ umtx_lock(NULL);
+ imp->fRunning = FALSE;
+ umtx_unlock(NULL);
+ return 0;
+}
+
+SimpleThread::SimpleThread()
+{
+ PosixThreadImplementation *imp = new PosixThreadImplementation;
+ imp->fRunning = FALSE;
+ imp->fRan = FALSE;
+ fImplementation = imp;
+}
+
+SimpleThread::~SimpleThread()
+{
+ PosixThreadImplementation *imp = (PosixThreadImplementation*)fImplementation;
+ if (imp->fRan) {
+ pthread_join(imp->fThread, NULL);
+ }
+ delete imp;
+ fImplementation = (void *)0xdeadbeef;
+}
+
+int32_t SimpleThread::start()
+{
+ int32_t rc;
+ static pthread_attr_t attr;
+ static UBool attrIsInitialized = FALSE;
+
+ PosixThreadImplementation *imp = (PosixThreadImplementation*)fImplementation;
+ imp->fRunning = TRUE;
+ imp->fRan = TRUE;
+
+#ifdef HPUX_CMA
+ if (attrIsInitialized == FALSE) {
+ rc = pthread_attr_create(&attr);
+ attrIsInitialized = TRUE;
+ }
+ rc = pthread_create(&(imp->fThread),attr,&SimpleThreadProc,(void*)this);
+#else
+ if (attrIsInitialized == FALSE) {
+ rc = pthread_attr_init(&attr);
+#if defined(OS390)
+ {
+ int detachstate = 0; /* jdc30: detach state of zero causes
+ threads created with this attr to be in
+ an undetached state. An undetached
+ thread will keep its resources after
+ termination. */
+ pthread_attr_setdetachstate(&attr, &detachstate);
+ }
+#else
+ // pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#endif
+ attrIsInitialized = TRUE;
+ }
+ rc = pthread_create(&(imp->fThread),&attr,&SimpleThreadProc,(void*)this);
+#endif
+
+ if (rc != 0) {
+ // some kind of error occured, the thread did not start.
+ imp->fRan = FALSE;
+ imp->fRunning = FALSE;
+ }
+
+ return rc;
+}
+
+
+UBool
+SimpleThread::isRunning() {
+ // Note: Mutex functions are used here not for synchronization,
+ // but to force memory barriors to exist, to ensure that one thread
+ // can see changes made by another when running on processors
+ // with memory models having weak coherency.
+ PosixThreadImplementation *imp = (PosixThreadImplementation*)fImplementation;
+ umtx_lock(NULL);
+ UBool retVal = imp->fRunning;
+ umtx_unlock(NULL);
+ return retVal;
+}
+
+
+void SimpleThread::sleep(int32_t millis)
+{
+#ifdef U_SOLARIS
+ sigignore(SIGALRM);
+#endif
+
+#ifdef HPUX_CMA
+ cma_sleep(millis/100);
+#elif defined(U_HPUX) || defined(OS390)
+ millis *= 1000;
+ while(millis >= 1000000) {
+ usleep(999999);
+ millis -= 1000000;
+ }
+ if(millis > 0) {
+ usleep(millis);
+ }
+#else
+ usleep(millis * 1000);
+#endif
+}
+
+#endif
+// end POSIX
+
+
+#ifndef HAVE_IMP
+#error No implementation for threads! Cannot test.
+0 = 216; //die
+#endif
+
+
+// *************** end fluff ******************
+
+/* now begins the real test. */
+void MultithreadTest::runIndexedTest( int32_t index, UBool exec,
+ const char* &name, char* /*par*/ ) {
+ if (exec)
+ logln("TestSuite MultithreadTest: ");
+ switch (index) {
+ case 0:
+ name = "TestThreads";
+ if (exec)
+ TestThreads();
+ break;
+
+ case 1:
+ name = "TestMutex";
+ if (exec)
+ TestMutex();
+ break;
+
+ case 2:
+ name = "TestThreadedIntl";
+#if !UCONFIG_NO_FORMATTING
+ if (exec) {
+ TestThreadedIntl();
+ }
+#endif
+ break;
+
+ case 3:
+ name = "TestCollators";
+#if !UCONFIG_NO_COLLATION
+ if (exec) {
+ TestCollators();
+ }
+#endif /* #if !UCONFIG_NO_COLLATION */
+ break;
+
+ case 4:
+ name = "TestString";
+ if (exec) {
+ TestString();
+ }
+ break;
+
+ default:
+ name = "";
+ break; //needed to end loop
+ }
+}
+
+
+//-----------------------------------------------------------------------------------
+//
+// TestThreads -- see if threads really work at all.
+//
+// Set up N threads pointing at N chars. When they are started, they will
+// each sleep 1 second and then set their chars. At the end we make sure they
+// are all set.
+//
+//-----------------------------------------------------------------------------------
+#define THREADTEST_NRTHREADS 8
+
+class TestThreadsThread : public SimpleThread
+{
+public:
+ TestThreadsThread(char* whatToChange) { fWhatToChange = whatToChange; }
+ virtual void run() { SimpleThread::sleep(1000);
+ Mutex m;
+ *fWhatToChange = '*';
+ }
+private:
+ char *fWhatToChange;
+};
+
+void MultithreadTest::TestThreads()
+{
+ char threadTestChars[THREADTEST_NRTHREADS + 1];
+ SimpleThread *threads[THREADTEST_NRTHREADS];
+ int32_t numThreadsStarted = 0;
+
+ int32_t i;
+ for(i=0;i<THREADTEST_NRTHREADS;i++)
+ {
+ threadTestChars[i] = ' ';
+ threads[i] = new TestThreadsThread(&threadTestChars[i]);
+ }
+ threadTestChars[THREADTEST_NRTHREADS] = '\0';
+
+ logln("->" + UnicodeString(threadTestChars) + "<- Firing off threads.. ");
+ for(i=0;i<THREADTEST_NRTHREADS;i++)
+ {
+ if (threads[i]->start() != 0) {
+ errln("Error starting thread %d", i);
+ }
+ else {
+ numThreadsStarted++;
+ }
+ SimpleThread::sleep(100);
+ logln(" Subthread started.");
+ }
+
+ logln("Waiting for threads to be set..");
+ if (numThreadsStarted == 0) {
+ errln("No threads could be started for testing!");
+ return;
+ }
+
+ int32_t patience = 40; // seconds to wait
+
+ while(patience--)
+ {
+ int32_t count = 0;
+ umtx_lock(NULL);
+ for(i=0;i<THREADTEST_NRTHREADS;i++)
+ {
+ if(threadTestChars[i] == '*')
+ {
+ count++;
+ }
+ }
+ umtx_unlock(NULL);
+
+ if(count == THREADTEST_NRTHREADS)
+ {
+ logln("->" + UnicodeString(threadTestChars) + "<- Got all threads! cya");
+ for(i=0;i<THREADTEST_NRTHREADS;i++)
+ {
+ delete threads[i];
+ }
+ return;
+ }
+
+ logln("->" + UnicodeString(threadTestChars) + "<- Waiting..");
+ SimpleThread::sleep(500);
+ }
+
+ errln("->" + UnicodeString(threadTestChars) + "<- PATIENCE EXCEEDED!! Still missing some.");
+ for(i=0;i<THREADTEST_NRTHREADS;i++)
+ {
+ delete threads[i];
+ }
+}
+
+
+//-----------------------------------------------------------------------
+//
+// TestMutex - a simple (non-stress) test to verify that ICU mutexes
+// are actually mutexing. Does not test the use of
+// mutexes within ICU services, but rather that the
+// platform's mutex support is at least superficially there.
+//
+//----------------------------------------------------------------------
+static UMTX gTestMutexA = NULL;
+static UMTX gTestMutexB = NULL;
+
+static int gThreadsStarted = 0;
+static int gThreadsInMiddle = 0;
+static int gThreadsDone = 0;
+
+static const int TESTMUTEX_THREAD_COUNT = 4;
+
+static int safeIncr(int &var, int amt) {
+ // Thread safe (using global mutex) increment of a variable.
+ // Return the updated value.
+ // Can also be used as a safe load of a variable by incrementing it by 0.
+ Mutex m;
+ var += amt;
+ return var;
+}
+
+class TestMutexThread : public SimpleThread
+{
+public:
+ virtual void run()
+ {
+ // This is the code that each of the spawned threads runs.
+ // All of the spawned threads bunch up together at each of the two mutexes
+ // because the main holds the mutexes until they do.
+ //
+ safeIncr(gThreadsStarted, 1);
+ umtx_lock(&gTestMutexA);
+ umtx_unlock(&gTestMutexA);
+ safeIncr(gThreadsInMiddle, 1);
+ umtx_lock(&gTestMutexB);
+ umtx_unlock(&gTestMutexB);
+ safeIncr(gThreadsDone, 1);
+ }
+};
+
+void MultithreadTest::TestMutex()
+{
+ // Start up the test threads. They should all pile up waiting on
+ // gTestMutexA, which we (the main thread) hold until the test threads
+ // all get there.
+ gThreadsStarted = 0;
+ gThreadsInMiddle = 0;
+ gThreadsDone = 0;
+ umtx_lock(&gTestMutexA);
+ TestMutexThread *threads[TESTMUTEX_THREAD_COUNT];
+ int i;
+ int32_t numThreadsStarted = 0;
+ for (i=0; i<TESTMUTEX_THREAD_COUNT; i++) {
+ threads[i] = new TestMutexThread;
+ if (threads[i]->start() != 0) {
+ errln("Error starting thread %d", i);
+ }
+ else {
+ numThreadsStarted++;
+ }
+ }
+ if (numThreadsStarted == 0) {
+ errln("No threads could be started for testing!");
+ return;
+ }
+
+ int patience = 0;
+ while (safeIncr(gThreadsStarted, 0) != TESTMUTEX_THREAD_COUNT) {
+ if (patience++ > 24) {
+ TSMTHREAD_FAIL("Patience Exceeded");
+ return;
+ }
+ SimpleThread::sleep(500);
+ }
+ // None of the test threads should have advanced past the first mutex.
+ TSMTHREAD_ASSERT(gThreadsInMiddle==0);
+ TSMTHREAD_ASSERT(gThreadsDone==0);
+
+ // All of the test threads have made it to the first mutex.
+ // We (the main thread) now let them advance to the second mutex,
+ // where they should all pile up again.
+ umtx_lock(&gTestMutexB);
+ umtx_unlock(&gTestMutexA);
+
+ patience = 0;
+ while (safeIncr(gThreadsInMiddle, 0) != TESTMUTEX_THREAD_COUNT) {
+ if (patience++ > 24) {
+ TSMTHREAD_FAIL("Patience Exceeded");
+ return;
+ }
+ SimpleThread::sleep(500);
+ }
+ TSMTHREAD_ASSERT(gThreadsDone==0);
+
+ // All test threads made it to the second mutex.
+ // Now let them proceed from there. They will all terminate.
+ umtx_unlock(&gTestMutexB);
+ patience = 0;
+ while (safeIncr(gThreadsDone, 0) != TESTMUTEX_THREAD_COUNT) {
+ if (patience++ > 24) {
+ TSMTHREAD_FAIL("Patience Exceeded");
+ return;
+ }
+ SimpleThread::sleep(500);
+ }
+
+ // All threads made it by both mutexes.
+ // Destroy the test mutexes.
+ umtx_destroy(&gTestMutexA);
+ umtx_destroy(&gTestMutexB);
+ gTestMutexA=NULL;
+ gTestMutexB=NULL;
+
+ for (i=0; i<TESTMUTEX_THREAD_COUNT; i++) {
+ delete threads[i];
+ }
+
+}
+
+
+//-------------------------------------------------------------------------------------------
+//
+// class ThreadWithStatus - a thread that we can check the status and error condition of
+//
+//-------------------------------------------------------------------------------------------
+class ThreadWithStatus : public SimpleThread
+{
+public:
+ UBool getError() { return (fErrors > 0); }
+ UBool getError(UnicodeString& fillinError) { fillinError = fErrorString; return (fErrors > 0); }
+ virtual ~ThreadWithStatus(){}
+protected:
+ ThreadWithStatus() : fErrors(0) {}
+ void error(const UnicodeString &error) {
+ fErrors++; fErrorString = error;
+ SimpleThread::errorFunc();
+ }
+ void error() { error("An error occured."); }
+private:
+ int32_t fErrors;
+ UnicodeString fErrorString;
+};
+
+
+
+//-------------------------------------------------------------------------------------------
+//
+// TestMultithreadedIntl. Test ICU Formatting n a multi-threaded environment
+//
+//-------------------------------------------------------------------------------------------
+
+
+// * Show exactly where the string's differences lie.
+UnicodeString showDifference(const UnicodeString& expected, const UnicodeString& result)
+{
+ UnicodeString res;
+ res = expected + "<Expected\n";
+ if(expected.length() != result.length())
+ res += " [ Different lengths ] \n";
+ else
+ {
+ for(int32_t i=0;i<expected.length();i++)
+ {
+ if(expected[i] == result[i])
+ {
+ res += " ";
+ }
+ else
+ {
+ res += "|";
+ }
+ }
+ res += "<Differences";
+ res += "\n";
+ }
+ res += result + "<Result\n";
+
+ return res;
+}
+
+
+
+
+//-------------------------------------------------------------------------------------------
+//
+// FormatThreadTest - a thread that tests performing a number of numberformats.
+//
+//-------------------------------------------------------------------------------------------
+
+const int kFormatThreadIterations = 20; // # of iterations per thread
+const int kFormatThreadThreads = 10; // # of threads to spawn
+const int kFormatThreadPatience = 60; // time in seconds to wait for all threads
+
+#if !UCONFIG_NO_FORMATTING
+
+
+
+struct FormatThreadTestData
+{
+ double number;
+ UnicodeString string;
+ FormatThreadTestData(double a, const UnicodeString& b) : number(a),string(b) {}
+} ;
+
+
+// "Someone from {2} is receiving a #{0} error - {1}. Their telephone call is costing {3 number,currency}."
+
+void formatErrorMessage(UErrorCode &realStatus, const UnicodeString& pattern, const Locale& theLocale,
+ UErrorCode inStatus0, /* statusString 1 */ const Locale &inCountry2, double currency3, // these numbers are the message arguments.
+ UnicodeString &result)
+{
+ if(U_FAILURE(realStatus))
+ return; // you messed up
+
+ UnicodeString errString1(u_errorName(inStatus0));
+
+ UnicodeString countryName2;
+ inCountry2.getDisplayCountry(theLocale,countryName2);
+
+ Formattable myArgs[] = {
+ Formattable((int32_t)inStatus0), // inStatus0 {0}
+ Formattable(errString1), // statusString1 {1}
+ Formattable(countryName2), // inCountry2 {2}
+ Formattable(currency3)// currency3 {3,number,currency}
+ };
+
+ MessageFormat *fmt = new MessageFormat("MessageFormat's API is broken!!!!!!!!!!!",realStatus);
+ fmt->setLocale(theLocale);
+ fmt->applyPattern(pattern, realStatus);
+
+ if (U_FAILURE(realStatus)) {
+ delete fmt;
+ return;
+ }
+
+ FieldPosition ignore = 0;
+ fmt->format(myArgs,4,result,ignore,realStatus);
+
+ delete fmt;
+}
+
+
+UBool U_CALLCONV isAcceptable(void *, const char *, const char *, const UDataInfo *) {
+ return TRUE;
+}
+
+//static UMTX debugMutex = NULL;
+//static UMTX gDebugMutex;
+
+
+class FormatThreadTest : public ThreadWithStatus
+{
+public:
+ int fNum;
+ int fTraceInfo;
+
+ FormatThreadTest() // constructor is NOT multithread safe.
+ : ThreadWithStatus(),
+ fNum(0),
+ fTraceInfo(0),
+ fOffset(0)
+ // the locale to use
+ {
+ static int32_t fgOffset = 0;
+ fgOffset += 3;
+ fOffset = fgOffset;
+ }
+
+
+ virtual void run()
+ {
+ fTraceInfo = 1;
+ NumberFormat *formatter = NULL;
+ NumberFormat *percentFormatter = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+
+#if 0
+ // debugging code,
+ for (int i=0; i<4000; i++) {
+ status = U_ZERO_ERROR;
+ UDataMemory *data1 = udata_openChoice(0, "res", "en_US", isAcceptable, 0, &status);
+ UDataMemory *data2 = udata_openChoice(0, "res", "fr", isAcceptable, 0, &status);
+ udata_close(data1);
+ udata_close(data2);
+ if (U_FAILURE(status)) {
+ error("udata_openChoice failed.\n");
+ break;
+ }
+ }
+ return;
+#endif
+
+#if 0
+ // debugging code,
+ int m;
+ for (m=0; m<4000; m++) {
+ status = U_ZERO_ERROR;
+ UResourceBundle *res = NULL;
+ const char *localeName = NULL;
+
+ Locale loc = Locale::getEnglish();
+
+ localeName = loc.getName();
+ // localeName = "en";
+
+ // ResourceBundle bund = ResourceBundle(0, loc, status);
+ //umtx_lock(&gDebugMutex);
+ res = ures_open(NULL, localeName, &status);
+ //umtx_unlock(&gDebugMutex);
+
+ //umtx_lock(&gDebugMutex);
+ ures_close(res);
+ //umtx_unlock(&gDebugMutex);
+
+ if (U_FAILURE(status)) {
+ error("Resource bundle construction failed.\n");
+ break;
+ }
+ }
+ return;
+#endif
+
+ // Keep this data here to avoid static initialization.
+ FormatThreadTestData kNumberFormatTestData[] =
+ {
+ FormatThreadTestData((double)5.0, UnicodeString("5", "")),
+ FormatThreadTestData( 6.0, UnicodeString("6", "")),
+ FormatThreadTestData( 20.0, UnicodeString("20", "")),
+ FormatThreadTestData( 8.0, UnicodeString("8", "")),
+ FormatThreadTestData( 8.3, UnicodeString("8.3", "")),
+ FormatThreadTestData( 12345, UnicodeString("12,345", "")),
+ FormatThreadTestData( 81890.23, UnicodeString("81,890.23", "")),
+ };
+ int32_t kNumberFormatTestDataLength = (int32_t)(sizeof(kNumberFormatTestData) /
+ sizeof(kNumberFormatTestData[0]));
+
+ // Keep this data here to avoid static initialization.
+ FormatThreadTestData kPercentFormatTestData[] =
+ {
+ FormatThreadTestData((double)5.0, CharsToUnicodeString("500\\u00a0%")),
+ FormatThreadTestData( 1.0, CharsToUnicodeString("100\\u00a0%")),
+ FormatThreadTestData( 0.26, CharsToUnicodeString("26\\u00a0%")),
+ FormatThreadTestData(
+ 16384.99, CharsToUnicodeString("1\\u00a0638\\u00a0499\\u00a0%")), // U+00a0 = NBSP
+ FormatThreadTestData(
+ 81890.23, CharsToUnicodeString("8\\u00a0189\\u00a0023\\u00a0%")),
+ };
+ int32_t kPercentFormatTestDataLength =
+ (int32_t)(sizeof(kPercentFormatTestData) / sizeof(kPercentFormatTestData[0]));
+ int32_t iteration;
+
+ status = U_ZERO_ERROR;
+ formatter = NumberFormat::createInstance(Locale::getEnglish(),status);
+ if(U_FAILURE(status)) {
+ error("Error on NumberFormat::createInstance()");
+ goto cleanupAndReturn;
+ }
+
+ percentFormatter = NumberFormat::createPercentInstance(Locale::getFrench(),status);
+ if(U_FAILURE(status)) {
+ error("Error on NumberFormat::createPercentInstance()");
+ goto cleanupAndReturn;
+ }
+
+ for(iteration = 0;!getError() && iteration<kFormatThreadIterations;iteration++)
+ {
+
+ int32_t whichLine = (iteration + fOffset)%kNumberFormatTestDataLength;
+
+ UnicodeString output;
+
+ formatter->format(kNumberFormatTestData[whichLine].number, output);
+
+ if(0 != output.compare(kNumberFormatTestData[whichLine].string)) {
+ error("format().. expected " + kNumberFormatTestData[whichLine].string
+ + " got " + output);
+ goto cleanupAndReturn;
+ }
+
+ // Now check percent.
+ output.remove();
+ whichLine = (iteration + fOffset)%kPercentFormatTestDataLength;
+
+ percentFormatter->format(kPercentFormatTestData[whichLine].number, output);
+ if(0 != output.compare(kPercentFormatTestData[whichLine].string))
+ {
+ error("percent format().. \n" +
+ showDifference(kPercentFormatTestData[whichLine].string,output));
+ goto cleanupAndReturn;
+ }
+
+ // Test message error
+ const int kNumberOfMessageTests = 3;
+ UErrorCode statusToCheck;
+ UnicodeString patternToCheck;
+ Locale messageLocale;
+ Locale countryToCheck;
+ double currencyToCheck;
+
+ UnicodeString expected;
+
+ // load the cases.
+ switch((iteration+fOffset) % kNumberOfMessageTests)
+ {
+ default:
+ case 0:
+ statusToCheck= U_FILE_ACCESS_ERROR;
+ patternToCheck= "0:Someone from {2} is receiving a #{0}"
+ " error - {1}. Their telephone call is costing "
+ "{3,number,currency}."; // number,currency
+ messageLocale= Locale("en","US");
+ countryToCheck= Locale("","HR");
+ currencyToCheck= 8192.77;
+ expected= "0:Someone from Croatia is receiving a #4 error - "
+ "U_FILE_ACCESS_ERROR. Their telephone call is costing $8,192.77.";
+ break;
+ case 1:
+ statusToCheck= U_INDEX_OUTOFBOUNDS_ERROR;
+ patternToCheck= "1:A customer in {2} is receiving a #{0} error - {1}. Their telephone call is costing {3,number,currency}."; // number,currency
+ messageLocale= Locale("de","DE@currency=DEM");
+ countryToCheck= Locale("","BF");
+ currencyToCheck= 2.32;
+ expected= "1:A customer in Burkina Faso is receiving a #8 error - U_INDEX_OUTOFBOUNDS_ERROR. Their telephone call is costing 2,32 DM.";
+ break;
+ case 2:
+ statusToCheck= U_MEMORY_ALLOCATION_ERROR;
+ patternToCheck= "2:user in {2} is receiving a #{0} error - {1}. "
+ "They insist they just spent {3,number,currency} "
+ "on memory."; // number,currency
+ messageLocale= Locale("de","AT@currency=ATS"); // Austrian German
+ countryToCheck= Locale("","US"); // hmm
+ currencyToCheck= 40193.12;
+ expected= CharsToUnicodeString(
+ "2:user in Vereinigte Staaten is receiving a #7 error"
+ " - U_MEMORY_ALLOCATION_ERROR. They insist they just spent"
+ " \\u00f6S 40.193,12 on memory.");
+ break;
+ }
+
+ UnicodeString result;
+ UErrorCode status = U_ZERO_ERROR;
+ formatErrorMessage(status,patternToCheck,messageLocale,statusToCheck,
+ countryToCheck,currencyToCheck,result);
+ if(U_FAILURE(status))
+ {
+ UnicodeString tmp(u_errorName(status));
+ error("Failure on message format, pattern=" + patternToCheck +
+ ", error = " + tmp);
+ goto cleanupAndReturn;
+ }
+
+ if(result != expected)
+ {
+ error("PatternFormat: \n" + showDifference(expected,result));
+ goto cleanupAndReturn;
+ }
+ } /* end of for loop */
+
+cleanupAndReturn:
+ delete formatter;
+ delete percentFormatter;
+
+ // while (fNum == 4) {SimpleThread::sleep(10000);} // Force a failure by preventing thread from finishing
+ fTraceInfo = 2;
+ }
+
+private:
+ int32_t fOffset; // where we are testing from.
+};
+
+// ** The actual test function.
+
+void MultithreadTest::TestThreadedIntl()
+{
+ int i;
+ UnicodeString theErr;
+ UBool haveDisplayedInfo[kFormatThreadThreads];
+ static const int32_t PATIENCE_SECONDS = 45;
+
+ //
+ // Create and start the test threads
+ //
+ logln("Spawning: %d threads * %d iterations each.",
+ kFormatThreadThreads, kFormatThreadIterations);
+ FormatThreadTest *tests = new FormatThreadTest[kFormatThreadThreads];
+ for(int32_t j = 0; j < kFormatThreadThreads; j++) {
+ tests[j].fNum = j;
+ int32_t threadStatus = tests[j].start();
+ if (threadStatus != 0) {
+ errln("System Error %d starting thread number %d.", threadStatus, j);
+ SimpleThread::errorFunc();
+ goto cleanupAndReturn;
+ }
+ haveDisplayedInfo[j] = FALSE;
+ }
+
+
+ // Spin, waiting for the test threads to finish.
+ UBool stillRunning;
+ UDate startTime, endTime;
+ startTime = Calendar::getNow();
+ do {
+ /* Spin until the test threads complete. */
+ stillRunning = FALSE;
+ endTime = Calendar::getNow();
+ if (((int32_t)(endTime - startTime)/U_MILLIS_PER_SECOND) > PATIENCE_SECONDS) {
+ errln("Patience exceeded. Test is taking too long.");
+ return;
+ }
+ /*
+ The following sleep must be here because the *BSD operating systems
+ have a brain dead thread scheduler. They starve the child threads from
+ CPU time.
+ */
+ SimpleThread::sleep(1); // yield
+ for(i=0;i<kFormatThreadThreads;i++) {
+ if (tests[i].isRunning()) {
+ stillRunning = TRUE;
+ } else if (haveDisplayedInfo[i] == FALSE) {
+ logln("Thread # %d is complete..", i);
+ if(tests[i].getError(theErr)) {
+ errln(UnicodeString("#") + i + ": " + theErr);
+ SimpleThread::errorFunc();
+ }
+ haveDisplayedInfo[i] = TRUE;
+ }
+ }
+ } while (stillRunning);
+
+ //
+ // All threads have finished.
+ //
+cleanupAndReturn:
+ delete [] tests;
+}
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+
+
+
+
+//-------------------------------------------------------------------------------------------
+//
+// Collation threading test
+//
+//-------------------------------------------------------------------------------------------
+#if !UCONFIG_NO_COLLATION
+
+#define kCollatorThreadThreads 10 // # of threads to spawn
+#define kCollatorThreadPatience kCollatorThreadThreads*30
+
+struct Line {
+ UChar buff[25];
+ int32_t buflen;
+} ;
+
+class CollatorThreadTest : public ThreadWithStatus
+{
+private:
+ const UCollator *coll;
+ const Line *lines;
+ int32_t noLines;
+public:
+ CollatorThreadTest() : ThreadWithStatus(),
+ coll(NULL),
+ lines(NULL),
+ noLines(0)
+ {
+ };
+ void setCollator(UCollator *c, Line *l, int32_t nl)
+ {
+ coll = c;
+ lines = l;
+ noLines = nl;
+ }
+ virtual void run() {
+ //sleep(10000);
+ int32_t line = 0;
+
+ uint8_t sk1[1024], sk2[1024];
+ uint8_t *oldSk = NULL, *newSk = sk1;
+ int32_t resLen = 0, oldLen = 0;
+ int32_t i = 0;
+
+ for(i = 0; i < noLines; i++) {
+ resLen = ucol_getSortKey(coll, lines[i].buff, lines[i].buflen, newSk, 1024);
+
+ int32_t res = 0, cmpres = 0, cmpres2 = 0;
+
+ if(oldSk != NULL) {
+ res = strcmp((char *)oldSk, (char *)newSk);
+ cmpres = ucol_strcoll(coll, lines[i-1].buff, lines[i-1].buflen, lines[i].buff, lines[i].buflen);
+ cmpres2 = ucol_strcoll(coll, lines[i].buff, lines[i].buflen, lines[i-1].buff, lines[i-1].buflen);
+ //cmpres = res;
+ //cmpres2 = -cmpres;
+
+ if(cmpres != -cmpres2) {
+ error("Compare result not symmetrical on line "+ line);
+ break;
+ }
+
+ if(((res&0x80000000) != (cmpres&0x80000000)) || (res == 0 && cmpres != 0) || (res != 0 && cmpres == 0)) {
+ error(UnicodeString("Difference between ucol_strcoll and sortkey compare on line ")+ UnicodeString(line));
+ break;
+ }
+
+ if(res > 0) {
+ error(UnicodeString("Line %i is not greater or equal than previous line ")+ UnicodeString(i));
+ break;
+ } else if(res == 0) { /* equal */
+ res = u_strcmpCodePointOrder(lines[i-1].buff, lines[i].buff);
+ if (res == 0) {
+ error(UnicodeString("Probable error in test file on line %i (comparing identical strings)")+ UnicodeString(i));
+ break;
+ } else if (res > 0) {
+ error(UnicodeString("Sortkeys are identical, but code point comapare gives >0 on line ")+ UnicodeString(i));
+ break;
+ }
+ }
+ }
+
+ oldSk = newSk;
+ oldLen = resLen;
+
+ newSk = (newSk == sk1)?sk2:sk1;
+ }
+ }
+
+};
+
+void MultithreadTest::TestCollators()
+{
+
+ UErrorCode status = U_ZERO_ERROR;
+ FILE *testFile = NULL;
+ char testDataPath[1024];
+ strcpy(testDataPath, IntlTest::getSourceTestData(status));
+ if (U_FAILURE(status)) {
+ errln("ERROR: could not open test data %s", u_errorName(status));
+ return;
+ }
+ strcat(testDataPath, "CollationTest_");
+
+ const char* type = "NON_IGNORABLE";
+
+ const char *ext = ".txt";
+ if(testFile) {
+ fclose(testFile);
+ }
+ char buffer[1024];
+ strcpy(buffer, testDataPath);
+ strcat(buffer, type);
+ size_t bufLen = strlen(buffer);
+
+ // we try to open 3 files:
+ // path/CollationTest_type.txt
+ // path/CollationTest_type_SHORT.txt
+ // path/CollationTest_type_STUB.txt
+ // we are going to test with the first one that we manage to open.
+
+ strcpy(buffer+bufLen, ext);
+
+ testFile = fopen(buffer, "rb");
+
+ if(testFile == 0) {
+ strcpy(buffer+bufLen, "_SHORT");
+ strcat(buffer, ext);
+ testFile = fopen(buffer, "rb");
+
+ if(testFile == 0) {
+ strcpy(buffer+bufLen, "_STUB");
+ strcat(buffer, ext);
+ testFile = fopen(buffer, "rb");
+
+ if (testFile == 0) {
+ *(buffer+bufLen) = 0;
+ errln("ERROR: could not open any of the conformance test files, tried opening base %s", buffer);
+ return;
+ } else {
+ infoln(
+ "INFO: Working with the stub file.\n"
+ "If you need the full conformance test, please\n"
+ "download the appropriate data files from:\n"
+ "http://source.icu-project.org/repos/icu/tools/trunk/unicodetools/com/ibm/text/data/");
+ }
+ }
+ }
+
+ Line *lines = new Line[200000];
+ memset(lines, 0, sizeof(Line)*200000);
+ int32_t lineNum = 0;
+
+ UChar bufferU[1024];
+ int32_t buflen = 0;
+ uint32_t first = 0;
+ uint32_t offset = 0;
+
+ while (fgets(buffer, 1024, testFile) != NULL) {
+ offset = 0;
+ if(*buffer == 0 || strlen(buffer) < 3 || buffer[0] == '#') {
+ continue;
+ }
+ offset = u_parseString(buffer, bufferU, 1024, &first, &status);
+ buflen = offset;
+ bufferU[offset++] = 0;
+ lines[lineNum].buflen = buflen;
+ //lines[lineNum].buff = new UChar[buflen+1];
+ u_memcpy(lines[lineNum].buff, bufferU, buflen);
+ lineNum++;
+ }
+ fclose(testFile);
+ if(U_FAILURE(status)) {
+ errln("Couldn't read the test file!");
+ return;
+ }
+
+ UCollator *coll = ucol_open("root", &status);
+ if(U_FAILURE(status)) {
+ errln("Couldn't open UCA collator");
+ return;
+ }
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_OFF, &status);
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_OFF, &status);
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &status);
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status);
+
+ int32_t noSpawned = 0;
+ int32_t spawnResult = 0;
+ CollatorThreadTest *tests;
+ tests = new CollatorThreadTest[kCollatorThreadThreads];
+
+ logln(UnicodeString("Spawning: ") + kCollatorThreadThreads + " threads * " + kFormatThreadIterations + " iterations each.");
+ int32_t j = 0;
+ for(j = 0; j < kCollatorThreadThreads; j++) {
+ //logln("Setting collator %i", j);
+ tests[j].setCollator(coll, lines, lineNum);
+ }
+ for(j = 0; j < kCollatorThreadThreads; j++) {
+ log("%i ", j);
+ spawnResult = tests[j].start();
+ if(spawnResult != 0) {
+ infoln("THREAD INFO: Couldn't spawn more than %i threads", noSpawned);
+ break;
+ }
+ noSpawned++;
+ }
+ logln("Spawned all");
+ if (noSpawned == 0) {
+ errln("No threads could be spawned.");
+ return;
+ }
+
+ for(int32_t patience = kCollatorThreadPatience;patience > 0; patience --)
+ {
+ logln("Waiting...");
+
+ int32_t i;
+ int32_t terrs = 0;
+ int32_t completed =0;
+
+ for(i=0;i<kCollatorThreadThreads;i++)
+ {
+ if (tests[i].isRunning() == FALSE)
+ {
+ completed++;
+
+ //logln(UnicodeString("Test #") + i + " is complete.. ");
+
+ UnicodeString theErr;
+ if(tests[i].getError(theErr))
+ {
+ terrs++;
+ errln(UnicodeString("#") + i + ": " + theErr);
+ }
+ // print out the error, too, if any.
+ }
+ }
+ logln("Completed %i tests", completed);
+
+ if(completed == noSpawned)
+ {
+ logln("Done! All %i tests are finished", noSpawned);
+
+ if(terrs)
+ {
+ errln("There were errors.");
+ SimpleThread::errorFunc();
+ }
+ ucol_close(coll);
+ delete[] tests;
+ //for(i = 0; i < lineNum; i++) {
+ //delete[] lines[i].buff;
+ //}
+ delete[] lines;
+
+ return;
+ }
+
+ SimpleThread::sleep(900);
+ }
+ errln("patience exceeded. ");
+ SimpleThread::errorFunc();
+ ucol_close(coll);
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+
+
+
+//-------------------------------------------------------------------------------------------
+//
+// StringThreadTest2
+//
+//-------------------------------------------------------------------------------------------
+
+const int kStringThreadIterations = 2500;// # of iterations per thread
+const int kStringThreadThreads = 10; // # of threads to spawn
+const int kStringThreadPatience = 120; // time in seconds to wait for all threads
+
+
+class StringThreadTest2 : public ThreadWithStatus
+{
+public:
+ int fNum;
+ int fTraceInfo;
+ const UnicodeString *fSharedString;
+
+ StringThreadTest2(const UnicodeString *sharedString, int num) // constructor is NOT multithread safe.
+ : ThreadWithStatus(),
+ fNum(num),
+ fTraceInfo(0),
+ fSharedString(sharedString)
+ {
+ };
+
+
+ virtual void run()
+ {
+ fTraceInfo = 1;
+ int loopCount = 0;
+
+ for (loopCount = 0; loopCount < kStringThreadIterations; loopCount++) {
+ if (*fSharedString != "This is the original test string.") {
+ error("Original string is corrupt.");
+ break;
+ }
+ UnicodeString s1 = *fSharedString;
+ s1 += "cat this";
+ UnicodeString s2(s1);
+ UnicodeString s3 = *fSharedString;
+ s2 = s3;
+ s3.truncate(12);
+ s2.truncate(0);
+ }
+
+ // while (fNum == 4) {SimpleThread::sleep(10000);} // Force a failure by preventing thread from finishing
+ fTraceInfo = 2;
+ }
+
+};
+
+// ** The actual test function.
+
+void MultithreadTest::TestString()
+{
+ int patience;
+ int terrs = 0;
+ int j;
+
+ UnicodeString *testString = new UnicodeString("This is the original test string.");
+
+ StringThreadTest2 *tests[kStringThreadThreads];
+ for(j = 0; j < kStringThreadThreads; j++) {
+ tests[j] = new StringThreadTest2(testString, j);
+ }
+
+ logln(UnicodeString("Spawning: ") + kStringThreadThreads + " threads * " + kStringThreadIterations + " iterations each.");
+ for(j = 0; j < kStringThreadThreads; j++) {
+ int32_t threadStatus = tests[j]->start();
+ if (threadStatus != 0) {
+ errln("System Error %d starting thread number %d.", threadStatus, j);
+ SimpleThread::errorFunc();
+ goto cleanupAndReturn;
+ }
+ }
+
+ for(patience = kStringThreadPatience;patience > 0; patience --)
+ {
+ logln("Waiting...");
+
+ int32_t i;
+ terrs = 0;
+ int32_t completed =0;
+
+ for(i=0;i<kStringThreadThreads;i++) {
+ if (tests[i]->isRunning() == FALSE)
+ {
+ completed++;
+
+ logln(UnicodeString("Test #") + i + " is complete.. ");
+
+ UnicodeString theErr;
+ if(tests[i]->getError(theErr))
+ {
+ terrs++;
+ errln(UnicodeString("#") + i + ": " + theErr);
+ }
+ // print out the error, too, if any.
+ }
+ }
+
+ if(completed == kStringThreadThreads)
+ {
+ logln("Done!");
+ if(terrs) {
+ errln("There were errors.");
+ }
+ break;
+ }
+
+ SimpleThread::sleep(900);
+ }
+
+ if (patience <= 0) {
+ errln("patience exceeded. ");
+ // while (TRUE) {SimpleThread::sleep(10000);} // TODO: for debugging. Sleep forever on failure.
+ terrs++;
+ }
+
+ if (terrs > 0) {
+ SimpleThread::errorFunc();
+ }
+
+cleanupAndReturn:
+ if (terrs == 0) {
+ /*
+ Don't clean up if there are errors. This prevents crashes if the
+ threads are still running and using this data. This will only happen
+ if there is an error with the test, ICU, or the machine is too slow.
+ It's better to leak than crash.
+ */
+ for(j = 0; j < kStringThreadThreads; j++) {
+ delete tests[j];
+ }
+ delete testString;
+ }
+}
+
+
+
+
+
+#endif // ICU_USE_THREADS
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.h b/Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.h
new file mode 100644
index 00000000000..f2f990608f9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsmthred.h
@@ -0,0 +1,46 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef MULTITHREADTEST_H
+#define MULTITHREADTEST_H
+
+#include "intltest.h"
+#include "mutex.h"
+
+
+
+/**
+ * Tests actual threading
+ **/
+class MultithreadTest : public IntlTest
+{
+public:
+ MultithreadTest();
+ virtual ~MultithreadTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * test that threads even work
+ **/
+ void TestThreads(void);
+ /**
+ * test that mutexes work
+ **/
+ void TestMutex(void);
+#if !UCONFIG_NO_FORMATTING
+ /**
+ * test that intl functions work in a multithreaded context
+ **/
+ void TestThreadedIntl(void);
+#endif
+ void TestCollators(void);
+ void TestString();
+};
+
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.cpp
new file mode 100644
index 00000000000..57d49ecce4c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.cpp
@@ -0,0 +1,441 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/decimfmt.h"
+#include "tsnmfmt.h"
+#include "putilimp.h"
+#include <float.h>
+#include <stdlib.h>
+
+IntlTestNumberFormat::~IntlTestNumberFormat() {}
+
+static const char * formattableTypeName(Formattable::Type t)
+{
+ switch(t) {
+ case Formattable::kDate: return "kDate";
+ case Formattable::kDouble: return "kDouble";
+ case Formattable::kLong: return "kLong";
+ case Formattable::kString: return "kString";
+ case Formattable::kArray: return "kArray";
+ case Formattable::kInt64: return "kInt64";
+ default: return "??unknown??";
+ }
+}
+
+/**
+ * This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
+ * NumberFormat.
+ */
+void IntlTestNumberFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+
+ if (exec) logln((UnicodeString)"TestSuite NumberFormat");
+ switch (index) {
+ case 0: name = "createInstance";
+ if (exec)
+ {
+ logln(name);
+ fStatus = U_ZERO_ERROR;
+ fFormat = NumberFormat::createInstance(fStatus);
+ testFormat(/*par*/);
+ }
+ break;
+
+ case 1: name = "DefaultLocale";
+ if (exec) testLocale(/*par, */Locale::getDefault(), name);
+ break;
+
+ case 2: name = "testAvailableLocales";
+ if (exec) {
+ logln(name);
+ testAvailableLocales(/*par*/);
+ }
+ break;
+
+ case 3: name = "monsterTest";
+ if (exec) {
+ logln(name);
+ monsterTest(/*par*/);
+ }
+ break;
+
+ default: name = ""; break;
+ }
+}
+
+void
+IntlTestNumberFormat::testLocale(/* char* par, */const Locale& locale, const UnicodeString& localeName)
+{
+ const char* name;
+
+ fLocale = locale;
+ name = "Number test";
+ logln((UnicodeString)name + " (" + localeName + ")");
+ fStatus = U_ZERO_ERROR;
+ fFormat = NumberFormat::createInstance(locale, fStatus);
+ testFormat(/* par */);
+
+ name = "Currency test";
+ logln((UnicodeString)name + " (" + localeName + ")");
+ fStatus = U_ZERO_ERROR;
+ fFormat = NumberFormat::createCurrencyInstance(locale, fStatus);
+ testFormat(/* par */);
+
+ name = "Percent test";
+ logln((UnicodeString)name + " (" + localeName + ")");
+ fStatus = U_ZERO_ERROR;
+ fFormat = NumberFormat::createPercentInstance(locale, fStatus);
+ testFormat(/* par */);
+}
+
+double IntlTestNumberFormat::randDouble()
+{
+ // Assume 8-bit (or larger) rand values. Also assume
+ // that the system rand() function is very poor, which it always is.
+ // Call srand(currentTime) in intltest to make it truly random.
+ double d;
+ uint32_t i;
+ char* poke = (char*)&d;
+ do {
+ for (i=0; i < sizeof(double); ++i)
+ {
+ poke[i] = (char)(rand() & 0xFF);
+ }
+ } while (uprv_isNaN(d) || uprv_isInfinite(d)
+ || !((-DBL_MAX < d && d < DBL_MAX) || (d < -DBL_MIN && DBL_MIN < d)));
+
+ return d;
+}
+
+/*
+ * Return a random uint32_t
+ **/
+uint32_t IntlTestNumberFormat::randLong()
+{
+ // Assume 8-bit (or larger) rand values. Also assume
+ // that the system rand() function is very poor, which it always is.
+ // Call srand(currentTime) in intltest to make it truly random.
+ uint32_t d;
+ uint32_t i;
+ char* poke = (char*)&d;
+ for (i=0; i < sizeof(uint32_t); ++i)
+ {
+ poke[i] = (char)(rand() & 0xFF);
+ }
+ return d;
+}
+
+
+/* Make sure that we don't get something too large and multiply into infinity.
+ @param smallerThanMax the requested maximum value smaller than DBL_MAX */
+double IntlTestNumberFormat::getSafeDouble(double smallerThanMax) {
+ double it;
+ double high = (DBL_MAX/smallerThanMax)/10.0;
+ double low = -high;
+ do {
+ it = randDouble();
+ } while (low > it || it > high);
+ return it;
+}
+
+void
+IntlTestNumberFormat::testFormat(/* char* par */)
+{
+ if (U_FAILURE(fStatus))
+ {
+ errln((UnicodeString)"**** FAIL: createXxxInstance failed.");
+ if (fFormat != 0)
+ errln("**** FAIL: Non-null format returned by createXxxInstance upon failure.");
+ delete fFormat;
+ fFormat = 0;
+ return;
+ }
+
+ if (fFormat == 0)
+ {
+ errln((UnicodeString)"**** FAIL: Null format returned by createXxxInstance.");
+ return;
+ }
+
+ UnicodeString str;
+
+ // Assume it's a DecimalFormat and get some info
+ DecimalFormat *s = (DecimalFormat*)fFormat;
+ logln((UnicodeString)" Pattern " + s->toPattern(str));
+
+#if defined(OS390) || defined(OS400)
+ tryIt(-2.02147304840132e-68);
+ tryIt(3.88057859588817e-68); // Test rounding when only some digits are shown because exponent is close to -maxfrac
+ tryIt(-2.64651110485945e+65); // Overflows to +INF when shown as a percent
+ tryIt(9.29526819488338e+64); // Ok -- used to fail?
+#else
+ tryIt(-2.02147304840132e-100);
+ tryIt(3.88057859588817e-096); // Test rounding when only some digits are shown because exponent is close to -maxfrac
+ tryIt(-2.64651110485945e+306); // Overflows to +INF when shown as a percent
+ tryIt(9.29526819488338e+250); // Ok -- used to fail?
+#endif
+
+ // These PASS now, with the sprintf/atof based format-parse.
+
+ // These fail due to round-off
+ // The least significant digit drops by one during each format-parse cycle.
+ // Both numbers DON'T have a round-off problem when multiplied by 100! (shown as %)
+#ifdef OS390
+ tryIt(-9.18228054496402e+64);
+ tryIt(-9.69413034454191e+64);
+#else
+ tryIt(-9.18228054496402e+255);
+ tryIt(-9.69413034454191e+273);
+#endif
+
+#ifndef OS390
+ tryIt(1.234e-200);
+ tryIt(-2.3e-168);
+
+ tryIt(uprv_getNaN());
+ tryIt(uprv_getInfinity());
+ tryIt(-uprv_getInfinity());
+#endif
+
+ tryIt((int32_t)251887531);
+ tryIt(5e-20 / 9);
+ tryIt(5e20 / 9);
+ tryIt(1.234e-50);
+ tryIt(9.99999999999996);
+ tryIt(9.999999999999996);
+
+ tryIt((int32_t)INT32_MIN);
+ tryIt((int32_t)INT32_MAX);
+ tryIt((double)INT32_MIN);
+ tryIt((double)INT32_MAX);
+ tryIt((double)INT32_MIN - 1.0);
+ tryIt((double)INT32_MAX + 1.0);
+
+ tryIt(5.0 / 9.0 * 1e-20);
+ tryIt(4.0 / 9.0 * 1e-20);
+ tryIt(5.0 / 9.0 * 1e+20);
+ tryIt(4.0 / 9.0 * 1e+20);
+
+ tryIt(2147483647.);
+ tryIt((int32_t)0);
+ tryIt(0.0);
+ tryIt((int32_t)1);
+ tryIt((int32_t)10);
+ tryIt((int32_t)100);
+ tryIt((int32_t)-1);
+ tryIt((int32_t)-10);
+ tryIt((int32_t)-100);
+ tryIt((int32_t)-1913860352);
+
+ for (int32_t z=0; z<10; ++z)
+ {
+ double d = randFraction() * 2e10 - 1e10;
+ tryIt(d);
+ }
+
+ double it = getSafeDouble(100000.0);
+
+ tryIt(0.0);
+ tryIt(it);
+ tryIt((int32_t)0);
+ tryIt(uprv_floor(it));
+ tryIt((int32_t)randLong());
+
+ // try again
+ it = getSafeDouble(100.0);
+ tryIt(it);
+ tryIt(uprv_floor(it));
+ tryIt((int32_t)randLong());
+
+ // try again with very large numbers
+ it = getSafeDouble(100000000000.0);
+ tryIt(it);
+
+ // try again with very large numbers
+ // and without going outside of the int32_t range
+ it = randFraction() * INT32_MAX;
+ tryIt(it);
+ tryIt((int32_t)uprv_floor(it));
+
+ delete fFormat;
+}
+
+void
+IntlTestNumberFormat::tryIt(double aNumber)
+{
+ const int32_t DEPTH = 10;
+ Formattable number[DEPTH];
+ UnicodeString string[DEPTH];
+
+ int32_t numberMatch = 0;
+ int32_t stringMatch = 0;
+ UnicodeString errMsg;
+ int32_t i;
+ for (i=0; i<DEPTH; ++i)
+ {
+ errMsg.truncate(0); // if non-empty, we failed this iteration
+ UErrorCode status = U_ZERO_ERROR;
+ string[i] = "(n/a)"; // "format was never done" value
+ if (i == 0) {
+ number[i].setDouble(aNumber);
+ } else {
+ fFormat->parse(string[i-1], number[i], status);
+ if (U_FAILURE(status)) {
+ number[i].setDouble(1234.5); // "parse failed" value
+ errMsg = "**** FAIL: Parse of " + prettify(string[i-1]) + " failed.";
+ --i; // don't show empty last line: "1234.5 F> (n/a) P>"
+ break;
+ }
+ }
+ // Convert from long to double
+ if (number[i].getType() == Formattable::kLong)
+ number[i].setDouble(number[i].getLong());
+ else if (number[i].getType() == Formattable::kInt64)
+ number[i].setDouble((double)number[i].getInt64());
+ else if (number[i].getType() != Formattable::kDouble)
+ {
+ errMsg = ("**** FAIL: Parse of " + prettify(string[i-1])
+ + " returned non-numeric Formattable, type " + UnicodeString(formattableTypeName(number[i].getType()))
+ + ", Locale=" + UnicodeString(fLocale.getName())
+ + ", longValue=" + number[i].getLong());
+ break;
+ }
+ string[i].truncate(0);
+ fFormat->format(number[i].getDouble(), string[i]);
+ if (i > 0)
+ {
+ if (numberMatch == 0 && number[i] == number[i-1])
+ numberMatch = i;
+ else if (numberMatch > 0 && number[i] != number[i-1])
+ {
+ errMsg = ("**** FAIL: Numeric mismatch after match.");
+ break;
+ }
+ if (stringMatch == 0 && string[i] == string[i-1])
+ stringMatch = i;
+ else if (stringMatch > 0 && string[i] != string[i-1])
+ {
+ errMsg = ("**** FAIL: String mismatch after match.");
+ break;
+ }
+ }
+ if (numberMatch > 0 && stringMatch > 0)
+ break;
+ }
+ if (i == DEPTH)
+ --i;
+
+ if (stringMatch > 2 || numberMatch > 2)
+ {
+ errMsg = ("**** FAIL: No string and/or number match within 2 iterations.");
+ }
+
+ if (errMsg.length() != 0)
+ {
+ for (int32_t k=0; k<=i; ++k)
+ {
+ logln((UnicodeString)"" + k + ": " + number[k].getDouble() + " F> " +
+ prettify(string[k]) + " P> ");
+ }
+ errln(errMsg);
+ }
+}
+
+void
+IntlTestNumberFormat::tryIt(int32_t aNumber)
+{
+ Formattable number(aNumber);
+ UnicodeString stringNum;
+ UErrorCode status = U_ZERO_ERROR;
+
+ fFormat->format(number, stringNum, status);
+ if (U_FAILURE(status))
+ {
+ errln("**** FAIL: Formatting " + aNumber);
+ return;
+ }
+ fFormat->parse(stringNum, number, status);
+ if (U_FAILURE(status))
+ {
+ errln("**** FAIL: Parse of " + prettify(stringNum) + " failed.");
+ return;
+ }
+ if (number.getType() != Formattable::kLong)
+ {
+ errln("**** FAIL: Parse of " + prettify(stringNum)
+ + " returned non-long Formattable, type " + UnicodeString(formattableTypeName(number.getType()))
+ + ", Locale=" + UnicodeString(fLocale.getName())
+ + ", doubleValue=" + number.getDouble()
+ + ", longValue=" + number.getLong()
+ + ", origValue=" + aNumber
+ );
+ }
+ if (number.getLong() != aNumber) {
+ errln("**** FAIL: Parse of " + prettify(stringNum) + " failed. Got:" + number.getLong()
+ + " Expected:" + aNumber);
+ }
+}
+
+void IntlTestNumberFormat::testAvailableLocales(/* char* par */)
+{
+ int32_t count = 0;
+ const Locale* locales = NumberFormat::getAvailableLocales(count);
+ logln((UnicodeString)"" + count + " available locales");
+ if (locales && count)
+ {
+ UnicodeString name;
+ UnicodeString all;
+ for (int32_t i=0; i<count; ++i)
+ {
+ if (i!=0)
+ all += ", ";
+ all += locales[i].getName();
+ }
+ logln(all);
+ }
+ else
+ errln((UnicodeString)"**** FAIL: Zero available locales or null array pointer");
+}
+
+void IntlTestNumberFormat::monsterTest(/* char* par */)
+{
+ const char *SEP = "============================================================\n";
+ int32_t count;
+ const Locale* allLocales = NumberFormat::getAvailableLocales(count);
+ Locale* locales = (Locale*)allLocales;
+ Locale quickLocales[6];
+ if (allLocales && count)
+ {
+ if (quick && count > 6) {
+ logln("quick test: testing just 6 locales!");
+ count = 6;
+ locales = quickLocales;
+ locales[0] = allLocales[0];
+ locales[1] = allLocales[1];
+ locales[2] = allLocales[2];
+ // In a quick test, make sure we test locales that use
+ // currency prefix, currency suffix, and choice currency
+ // logic. Otherwise bugs in these areas can slip through.
+ locales[3] = Locale("ar", "AE", "");
+ locales[4] = Locale("cs", "CZ", "");
+ locales[5] = Locale("en", "IN", "");
+ }
+ for (int32_t i=0; i<count; ++i)
+ {
+ UnicodeString name(locales[i].getName(), "");
+ logln(SEP);
+ testLocale(/* par, */locales[i], name);
+ }
+ }
+
+ logln(SEP);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.h b/Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.h
new file mode 100644
index 00000000000..076a464467d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsnmfmt.h
@@ -0,0 +1,89 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _INTLTESTNUMBERFORMAT
+#define _INTLTESTNUMBERFORMAT
+
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/numfmt.h"
+#include "unicode/locid.h"
+#include "intltest.h"
+
+
+/**
+ * This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
+ * NumberFormat.
+ */
+class IntlTestNumberFormat: public IntlTest {
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+private:
+
+ /**
+ * call tryIt with many variations, called by testLocale
+ **/
+ void testFormat(/* char* par */);
+ /**
+ * perform tests using aNumber and fFormat, called in many variations
+ **/
+ void tryIt(double aNumber);
+ /**
+ * perform tests using aNumber and fFormat, called in many variations
+ **/
+ void tryIt(int32_t aNumber);
+ /**
+ * test NumberFormat::getAvailableLocales
+ **/
+ void testAvailableLocales(/* char* par */);
+ /**
+ * call testLocale for all locales
+ **/
+ void monsterTest(/* char *par */);
+ /**
+ * call testFormat for currency, percent and plain number instances
+ **/
+ void testLocale(/* char *par, */const Locale& locale, const UnicodeString& localeName);
+
+ NumberFormat* fFormat;
+ UErrorCode fStatus;
+ Locale fLocale;
+
+public:
+
+ virtual ~IntlTestNumberFormat();
+
+ /*
+ * Return a random double that isn't too large.
+ */
+ static double getSafeDouble(double smallerThanMax);
+
+ /*
+ * Return a random double
+ **/
+ static double randDouble();
+
+ /*
+ * Return a random uint32_t
+ **/
+ static uint32_t randLong();
+
+ /**
+ * Return a random double 0 <= x < 1.0
+ **/
+ static double randFraction()
+ {
+ return (double)randLong() / (double)0xFFFFFFFF;
+ }
+
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsputil.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tsputil.cpp
new file mode 100644
index 00000000000..1f4b66ee218
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsputil.cpp
@@ -0,0 +1,565 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "tsputil.h"
+
+#include <float.h> // DBL_MAX, DBL_MIN
+#include "putilimp.h"
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+void
+PUtilTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ //if (exec) logln("TestSuite PUtilTest: ");
+ switch (index) {
+ CASE(0, testMaxMin)
+ CASE(1, testNaN)
+ CASE(2, testPositiveInfinity)
+ CASE(3, testNegativeInfinity)
+ CASE(4, testZero)
+ CASE(5, testU_INLINE)
+// CASE(, testIEEEremainder)
+
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+#if 0
+void
+PUtilTest::testIEEEremainder()
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double pzero = 0.0;
+ double nzero = 0.0;
+
+ nzero *= -1;
+
+ // simple remainder checks
+ remainderTest(7.0, 2.5, -0.5);
+ remainderTest(7.0, -2.5, -0.5);
+#ifndef OS390
+ // ### TODO:
+ // The following tests fails on S/390 with IEEE support in release builds;
+ // debug builds work.
+ // The functioning of ChoiceFormat is not affected by this bug.
+ remainderTest(-7.0, 2.5, 0.5);
+ remainderTest(-7.0, -2.5, 0.5);
+#endif
+ remainderTest(5.0, 3.0, -1.0);
+
+ // this should work
+ //remainderTest(43.7, 2.5, 1.25);
+
+ /*
+
+ // infinity and real
+ remainderTest(pinf, 1.0, 1.25);
+ remainderTest(1.0, pinf, 1.0);
+ remainderTest(ninf, 1.0, 1.25);
+ remainderTest(1.0, ninf, 1.0);
+
+ // test infinity and nan
+ remainderTest(ninf, pinf, 1.25);
+ remainderTest(ninf, nan, 1.25);
+ remainderTest(pinf, nan, 1.25);
+
+ // test infinity and zero
+ remainderTest(pinf, pzero, 1.25);
+ remainderTest(pinf, nzero, 1.25);
+ remainderTest(ninf, pzero, 1.25);
+ remainderTest(ninf, nzero, 1.25);
+*/
+}
+
+void
+PUtilTest::remainderTest(double x, double y, double exp)
+{
+ double result = uprv_IEEEremainder(x,y);
+
+ if( uprv_isNaN(result) &&
+ ! ( uprv_isNaN(x) || uprv_isNaN(y))) {
+ errln(UnicodeString("FAIL: got NaN as result without NaN as argument"));
+ errln(UnicodeString(" IEEEremainder(") + x + ", " + y + ") is " + result + ", expected " + exp);
+ }
+ else if(result != exp)
+ errln(UnicodeString("FAIL: IEEEremainder(") + x + ", " + y + ") is " + result + ", expected " + exp);
+ else
+ logln(UnicodeString("OK: IEEEremainder(") + x + ", " + y + ") is " + result);
+
+}
+#endif
+
+void
+PUtilTest::testMaxMin()
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double pzero = 0.0;
+ double nzero = 0.0;
+
+ nzero *= -1;
+
+ // +Inf with -Inf
+ maxMinTest(pinf, ninf, pinf, TRUE);
+ maxMinTest(pinf, ninf, ninf, FALSE);
+
+ // +Inf with +0 and -0
+ maxMinTest(pinf, pzero, pinf, TRUE);
+ maxMinTest(pinf, pzero, pzero, FALSE);
+ maxMinTest(pinf, nzero, pinf, TRUE);
+ maxMinTest(pinf, nzero, nzero, FALSE);
+
+ // -Inf with +0 and -0
+ maxMinTest(ninf, pzero, pzero, TRUE);
+ maxMinTest(ninf, pzero, ninf, FALSE);
+ maxMinTest(ninf, nzero, nzero, TRUE);
+ maxMinTest(ninf, nzero, ninf, FALSE);
+
+ // NaN with +Inf and -Inf
+ maxMinTest(pinf, nan, nan, TRUE);
+ maxMinTest(pinf, nan, nan, FALSE);
+ maxMinTest(ninf, nan, nan, TRUE);
+ maxMinTest(ninf, nan, nan, FALSE);
+
+ // NaN with NaN
+ maxMinTest(nan, nan, nan, TRUE);
+ maxMinTest(nan, nan, nan, FALSE);
+
+ // NaN with +0 and -0
+ maxMinTest(nan, pzero, nan, TRUE);
+ maxMinTest(nan, pzero, nan, FALSE);
+ maxMinTest(nan, nzero, nan, TRUE);
+ maxMinTest(nan, nzero, nan, FALSE);
+
+ // +Inf with DBL_MAX and DBL_MIN
+ maxMinTest(pinf, DBL_MAX, pinf, TRUE);
+ maxMinTest(pinf, -DBL_MAX, pinf, TRUE);
+ maxMinTest(pinf, DBL_MIN, pinf, TRUE);
+ maxMinTest(pinf, -DBL_MIN, pinf, TRUE);
+ maxMinTest(pinf, DBL_MIN, DBL_MIN, FALSE);
+ maxMinTest(pinf, -DBL_MIN, -DBL_MIN, FALSE);
+ maxMinTest(pinf, DBL_MAX, DBL_MAX, FALSE);
+ maxMinTest(pinf, -DBL_MAX, -DBL_MAX, FALSE);
+
+ // -Inf with DBL_MAX and DBL_MIN
+ maxMinTest(ninf, DBL_MAX, DBL_MAX, TRUE);
+ maxMinTest(ninf, -DBL_MAX, -DBL_MAX, TRUE);
+ maxMinTest(ninf, DBL_MIN, DBL_MIN, TRUE);
+ maxMinTest(ninf, -DBL_MIN, -DBL_MIN, TRUE);
+ maxMinTest(ninf, DBL_MIN, ninf, FALSE);
+ maxMinTest(ninf, -DBL_MIN, ninf, FALSE);
+ maxMinTest(ninf, DBL_MAX, ninf, FALSE);
+ maxMinTest(ninf, -DBL_MAX, ninf, FALSE);
+
+ // +0 with DBL_MAX and DBL_MIN
+ maxMinTest(pzero, DBL_MAX, DBL_MAX, TRUE);
+ maxMinTest(pzero, -DBL_MAX, pzero, TRUE);
+ maxMinTest(pzero, DBL_MIN, DBL_MIN, TRUE);
+ maxMinTest(pzero, -DBL_MIN, pzero, TRUE);
+ maxMinTest(pzero, DBL_MIN, pzero, FALSE);
+ maxMinTest(pzero, -DBL_MIN, -DBL_MIN, FALSE);
+ maxMinTest(pzero, DBL_MAX, pzero, FALSE);
+ maxMinTest(pzero, -DBL_MAX, -DBL_MAX, FALSE);
+
+ // -0 with DBL_MAX and DBL_MIN
+ maxMinTest(nzero, DBL_MAX, DBL_MAX, TRUE);
+ maxMinTest(nzero, -DBL_MAX, nzero, TRUE);
+ maxMinTest(nzero, DBL_MIN, DBL_MIN, TRUE);
+ maxMinTest(nzero, -DBL_MIN, nzero, TRUE);
+ maxMinTest(nzero, DBL_MIN, nzero, FALSE);
+ maxMinTest(nzero, -DBL_MIN, -DBL_MIN, FALSE);
+ maxMinTest(nzero, DBL_MAX, nzero, FALSE);
+ maxMinTest(nzero, -DBL_MAX, -DBL_MAX, FALSE);
+}
+
+void
+PUtilTest::maxMinTest(double a, double b, double exp, UBool max)
+{
+ double result = 0.0;
+
+ if(max)
+ result = uprv_fmax(a, b);
+ else
+ result = uprv_fmin(a, b);
+
+ UBool nanResultOK = (uprv_isNaN(a) || uprv_isNaN(b));
+
+ if(uprv_isNaN(result) && ! nanResultOK) {
+ errln(UnicodeString("FAIL: got NaN as result without NaN as argument"));
+ if(max)
+ errln(UnicodeString(" max(") + a + ", " + b + ") is " + result + ", expected " + exp);
+ else
+ errln(UnicodeString(" min(") + a + ", " + b + ") is " + result + ", expected " + exp);
+ }
+ else if(result != exp && ! (uprv_isNaN(result) || uprv_isNaN(exp)))
+ if(max)
+ errln(UnicodeString("FAIL: max(") + a + ", " + b + ") is " + result + ", expected " + exp);
+ else
+ errln(UnicodeString("FAIL: min(") + a + ", " + b + ") is " + result + ", expected " + exp);
+ else {
+ if (verbose) {
+ if(max)
+ logln(UnicodeString("OK: max(") + a + ", " + b + ") is " + result);
+ else
+ logln(UnicodeString("OK: min(") + a + ", " + b + ") is " + result);
+ }
+ }
+}
+//==============================
+
+// NaN is weird- comparisons with NaN _always_ return false, with the
+// exception of !=, which _always_ returns true
+void
+PUtilTest::testNaN(void)
+{
+ logln("NaN tests may show that the expected NaN!=NaN etc. is not true on some");
+ logln("platforms; however, ICU does not rely on them because it defines");
+ logln("and uses uprv_isNaN(). Therefore, most failing NaN tests only report warnings.");
+
+ PUtilTest::testIsNaN();
+ PUtilTest::NaNGT();
+ PUtilTest::NaNLT();
+ PUtilTest::NaNGTE();
+ PUtilTest::NaNLTE();
+ PUtilTest::NaNE();
+ PUtilTest::NaNNE();
+
+ logln("End of NaN tests.");
+}
+
+//==============================
+
+void
+PUtilTest::testPositiveInfinity(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double ten = 10.0;
+
+ if(uprv_isInfinite(pinf) != TRUE) {
+ errln("FAIL: isInfinite(+Infinity) returned FALSE, should be TRUE.");
+ }
+
+ if(uprv_isPositiveInfinity(pinf) != TRUE) {
+ errln("FAIL: isPositiveInfinity(+Infinity) returned FALSE, should be TRUE.");
+ }
+
+ if(uprv_isNegativeInfinity(pinf) != FALSE) {
+ errln("FAIL: isNegativeInfinity(+Infinity) returned TRUE, should be FALSE.");
+ }
+
+ if(pinf > DBL_MAX != TRUE) {
+ errln("FAIL: +Infinity > DBL_MAX returned FALSE, should be TRUE.");
+ }
+
+ if(pinf > DBL_MIN != TRUE) {
+ errln("FAIL: +Infinity > DBL_MIN returned FALSE, should be TRUE.");
+ }
+
+ if(pinf > ninf != TRUE) {
+ errln("FAIL: +Infinity > -Infinity returned FALSE, should be TRUE.");
+ }
+
+ if(pinf > ten != TRUE) {
+ errln("FAIL: +Infinity > 10.0 returned FALSE, should be TRUE.");
+ }
+}
+
+//==============================
+
+void
+PUtilTest::testNegativeInfinity(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double ten = 10.0;
+
+ if(uprv_isInfinite(ninf) != TRUE) {
+ errln("FAIL: isInfinite(-Infinity) returned FALSE, should be TRUE.");
+ }
+
+ if(uprv_isNegativeInfinity(ninf) != TRUE) {
+ errln("FAIL: isNegativeInfinity(-Infinity) returned FALSE, should be TRUE.");
+ }
+
+ if(uprv_isPositiveInfinity(ninf) != FALSE) {
+ errln("FAIL: isPositiveInfinity(-Infinity) returned TRUE, should be FALSE.");
+ }
+
+ if(ninf < DBL_MAX != TRUE) {
+ errln("FAIL: -Infinity < DBL_MAX returned FALSE, should be TRUE.");
+ }
+
+ if(ninf < DBL_MIN != TRUE) {
+ errln("FAIL: -Infinity < DBL_MIN returned FALSE, should be TRUE.");
+ }
+
+ if(ninf < pinf != TRUE) {
+ errln("FAIL: -Infinity < +Infinity returned FALSE, should be TRUE.");
+ }
+
+ if(ninf < ten != TRUE) {
+ errln("FAIL: -Infinity < 10.0 returned FALSE, should be TRUE.");
+ }
+}
+
+//==============================
+
+// notes about zero:
+// -0.0 == 0.0 == TRUE
+// -0.0 < 0.0 == FALSE
+// generating -0.0 must be done at runtime. compiler apparently ignores sign?
+void
+PUtilTest::testZero(void)
+{
+ // volatile is used to fake out the compiler optimizer. We really want to divide by 0.
+ volatile double pzero = 0.0;
+ volatile double nzero = 0.0;
+
+ nzero *= -1;
+
+ if(pzero == nzero != TRUE) {
+ errln("FAIL: 0.0 == -0.0 returned FALSE, should be TRUE.");
+ }
+
+ if(pzero > nzero != FALSE) {
+ errln("FAIL: 0.0 > -0.0 returned TRUE, should be FALSE.");
+ }
+
+ if(pzero >= nzero != TRUE) {
+ errln("FAIL: 0.0 >= -0.0 returned FALSE, should be TRUE.");
+ }
+
+ if(pzero < nzero != FALSE) {
+ errln("FAIL: 0.0 < -0.0 returned TRUE, should be FALSE.");
+ }
+
+ if(pzero <= nzero != TRUE) {
+ errln("FAIL: 0.0 <= -0.0 returned FALSE, should be TRUE.");
+ }
+#ifndef OS400 /* OS/400 will generate divide by zero exception MCH1214 */
+ if(uprv_isInfinite(1/pzero) != TRUE) {
+ errln("FAIL: isInfinite(1/0.0) returned FALSE, should be TRUE.");
+ }
+
+ if(uprv_isInfinite(1/nzero) != TRUE) {
+ errln("FAIL: isInfinite(1/-0.0) returned FALSE, should be TRUE.");
+ }
+
+ if(uprv_isPositiveInfinity(1/pzero) != TRUE) {
+ errln("FAIL: isPositiveInfinity(1/0.0) returned FALSE, should be TRUE.");
+ }
+
+ if(uprv_isNegativeInfinity(1/nzero) != TRUE) {
+ errln("FAIL: isNegativeInfinity(1/-0.0) returned FALSE, should be TRUE.");
+ }
+#endif
+}
+
+//==============================
+
+void
+PUtilTest::testIsNaN(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double ten = 10.0;
+
+ if(uprv_isNaN(nan) == FALSE) {
+ errln("FAIL: isNaN() returned FALSE for NaN.");
+ }
+
+ if(uprv_isNaN(pinf) == TRUE) {
+ errln("FAIL: isNaN() returned TRUE for +Infinity.");
+ }
+
+ if(uprv_isNaN(ninf) == TRUE) {
+ errln("FAIL: isNaN() returned TRUE for -Infinity.");
+ }
+
+ if(uprv_isNaN(ten) == TRUE) {
+ errln("FAIL: isNaN() returned TRUE for 10.0.");
+ }
+}
+
+//==============================
+
+void
+PUtilTest::NaNGT(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double ten = 10.0;
+
+ if(nan > nan != FALSE) {
+ logln("WARNING: NaN > NaN returned TRUE, should be FALSE");
+ }
+
+ if(nan > pinf != FALSE) {
+ logln("WARNING: NaN > +Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan > ninf != FALSE) {
+ logln("WARNING: NaN > -Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan > ten != FALSE) {
+ logln("WARNING: NaN > 10.0 returned TRUE, should be FALSE");
+ }
+}
+
+//==============================
+
+void
+PUtilTest::NaNLT(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double ten = 10.0;
+
+ if(nan < nan != FALSE) {
+ logln("WARNING: NaN < NaN returned TRUE, should be FALSE");
+ }
+
+ if(nan < pinf != FALSE) {
+ logln("WARNING: NaN < +Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan < ninf != FALSE) {
+ logln("WARNING: NaN < -Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan < ten != FALSE) {
+ logln("WARNING: NaN < 10.0 returned TRUE, should be FALSE");
+ }
+}
+
+//==============================
+
+void
+PUtilTest::NaNGTE(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double ten = 10.0;
+
+ if(nan >= nan != FALSE) {
+ logln("WARNING: NaN >= NaN returned TRUE, should be FALSE");
+ }
+
+ if(nan >= pinf != FALSE) {
+ logln("WARNING: NaN >= +Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan >= ninf != FALSE) {
+ logln("WARNING: NaN >= -Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan >= ten != FALSE) {
+ logln("WARNING: NaN >= 10.0 returned TRUE, should be FALSE");
+ }
+}
+
+//==============================
+
+void
+PUtilTest::NaNLTE(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double ten = 10.0;
+
+ if(nan <= nan != FALSE) {
+ logln("WARNING: NaN <= NaN returned TRUE, should be FALSE");
+ }
+
+ if(nan <= pinf != FALSE) {
+ logln("WARNING: NaN <= +Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan <= ninf != FALSE) {
+ logln("WARNING: NaN <= -Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan <= ten != FALSE) {
+ logln("WARNING: NaN <= 10.0 returned TRUE, should be FALSE");
+ }
+}
+
+//==============================
+
+void
+PUtilTest::NaNE(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double ten = 10.0;
+
+ if(nan == nan != FALSE) {
+ logln("WARNING: NaN == NaN returned TRUE, should be FALSE");
+ }
+
+ if(nan == pinf != FALSE) {
+ logln("WARNING: NaN == +Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan == ninf != FALSE) {
+ logln("WARNING: NaN == -Infinity returned TRUE, should be FALSE");
+ }
+
+ if(nan == ten != FALSE) {
+ logln("WARNING: NaN == 10.0 returned TRUE, should be FALSE");
+ }
+}
+
+//==============================
+
+void
+PUtilTest::NaNNE(void)
+{
+ double pinf = uprv_getInfinity();
+ double ninf = -uprv_getInfinity();
+ double nan = uprv_getNaN();
+ double ten = 10.0;
+
+ if(nan != nan != TRUE) {
+ logln("WARNING: NaN != NaN returned FALSE, should be TRUE");
+ }
+
+ if(nan != pinf != TRUE) {
+ logln("WARNING: NaN != +Infinity returned FALSE, should be TRUE");
+ }
+
+ if(nan != ninf != TRUE) {
+ logln("WARNING: NaN != -Infinity returned FALSE, should be TRUE");
+ }
+
+ if(nan != ten != TRUE) {
+ logln("WARNING: NaN != 10.0 returned FALSE, should be TRUE");
+ }
+}
+
+U_INLINE int32_t inlineTriple(int32_t x) {
+ return 3*x;
+}
+
+// "code" coverage test for Jitterbug 4515 RFE: in C++, use U_INLINE=inline
+void
+PUtilTest::testU_INLINE() {
+ if(inlineTriple(2)!=6 || inlineTriple(-55)!=-165) {
+ errln("inlineTriple() failed");
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tsputil.h b/Build/source/libs/icu/icu-xetex/test/intltest/tsputil.h
new file mode 100644
index 00000000000..77cd52b2b31
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tsputil.h
@@ -0,0 +1,47 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef _PUTILTEST_
+#define _PUTILTEST_
+
+#include "intltest.h"
+
+/**
+ * Test putil.h
+ **/
+class PUtilTest : public IntlTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+// void testIEEEremainder(void);
+ void testMaxMin(void);
+
+private:
+// void remainderTest(double x, double y, double exp);
+ void maxMinTest(double a, double b, double exp, UBool max);
+
+ // the actual tests; methods return the number of errors
+ void testNaN(void);
+ void testPositiveInfinity(void);
+ void testNegativeInfinity(void);
+ void testZero(void);
+ void testU_INLINE();
+
+ // subtests of testNaN
+ void testIsNaN(void);
+ void NaNGT(void);
+ void NaNLT(void);
+ void NaNGTE(void);
+ void NaNLTE(void);
+ void NaNE(void);
+ void NaNNE(void);
+
+};
+
+#endif
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.cpp
new file mode 100644
index 00000000000..cadc0252232
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.cpp
@@ -0,0 +1,1798 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#include "unicode/uchar.h"
+#include "unicode/normlzr.h"
+#include "unicode/uniset.h"
+#include "unicode/usetiter.h"
+#include "unicode/schriter.h"
+#include "cstring.h"
+#include "unormimp.h"
+#include "tstnorm.h"
+
+#define LENGTHOF(array) ((int32_t)(sizeof(array)/sizeof((array)[0])))
+#define ARRAY_LENGTH(array) LENGTHOF(array)
+
+#define CASE(id,test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln((UnicodeString)""); \
+ test(); \
+ } \
+ break
+
+static UErrorCode status = U_ZERO_ERROR;
+
+void BasicNormalizerTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ CASE(0,TestDecomp);
+ CASE(1,TestCompatDecomp);
+ CASE(2,TestCanonCompose);
+ CASE(3,TestCompatCompose);
+ CASE(4,TestPrevious);
+ CASE(5,TestHangulDecomp);
+ CASE(6,TestHangulCompose);
+ CASE(7,TestTibetan);
+ CASE(8,TestCompositionExclusion);
+ CASE(9,TestZeroIndex);
+ CASE(10,TestVerisign);
+ CASE(11,TestPreviousNext);
+ CASE(12,TestNormalizerAPI);
+ CASE(13,TestConcatenate);
+ CASE(14,FindFoldFCDExceptions);
+ CASE(15,TestCompare);
+ CASE(16,TestSkippable);
+ default: name = ""; break;
+ }
+}
+
+/**
+ * Convert Java-style strings with \u Unicode escapes into UnicodeString objects
+ */
+static UnicodeString str(const char *input)
+{
+ UnicodeString str(input, ""); // Invariant conversion
+ return str.unescape();
+}
+
+
+BasicNormalizerTest::BasicNormalizerTest()
+{
+ // canonTest
+ // Input Decomposed Composed
+
+ canonTests[0][0] = str("cat"); canonTests[0][1] = str("cat"); canonTests[0][2] = str("cat");
+
+ canonTests[1][0] = str("\\u00e0ardvark"); canonTests[1][1] = str("a\\u0300ardvark"); canonTests[1][2] = str("\\u00e0ardvark");
+
+ canonTests[2][0] = str("\\u1e0a"); canonTests[2][1] = str("D\\u0307"); canonTests[2][2] = str("\\u1e0a"); // D-dot_above
+
+ canonTests[3][0] = str("D\\u0307"); canonTests[3][1] = str("D\\u0307"); canonTests[3][2] = str("\\u1e0a"); // D dot_above
+
+ canonTests[4][0] = str("\\u1e0c\\u0307"); canonTests[4][1] = str("D\\u0323\\u0307"); canonTests[4][2] = str("\\u1e0c\\u0307"); // D-dot_below dot_above
+
+ canonTests[5][0] = str("\\u1e0a\\u0323"); canonTests[5][1] = str("D\\u0323\\u0307"); canonTests[5][2] = str("\\u1e0c\\u0307"); // D-dot_above dot_below
+
+ canonTests[6][0] = str("D\\u0307\\u0323"); canonTests[6][1] = str("D\\u0323\\u0307"); canonTests[6][2] = str("\\u1e0c\\u0307"); // D dot_below dot_above
+
+ canonTests[7][0] = str("\\u1e10\\u0307\\u0323"); canonTests[7][1] = str("D\\u0327\\u0323\\u0307"); canonTests[7][2] = str("\\u1e10\\u0323\\u0307"); // D dot_below cedilla dot_above
+
+ canonTests[8][0] = str("D\\u0307\\u0328\\u0323"); canonTests[8][1] = str("D\\u0328\\u0323\\u0307"); canonTests[8][2] = str("\\u1e0c\\u0328\\u0307"); // D dot_above ogonek dot_below
+
+ canonTests[9][0] = str("\\u1E14"); canonTests[9][1] = str("E\\u0304\\u0300"); canonTests[9][2] = str("\\u1E14"); // E-macron-grave
+
+ canonTests[10][0] = str("\\u0112\\u0300"); canonTests[10][1] = str("E\\u0304\\u0300"); canonTests[10][2] = str("\\u1E14"); // E-macron + grave
+
+ canonTests[11][0] = str("\\u00c8\\u0304"); canonTests[11][1] = str("E\\u0300\\u0304"); canonTests[11][2] = str("\\u00c8\\u0304"); // E-grave + macron
+
+ canonTests[12][0] = str("\\u212b"); canonTests[12][1] = str("A\\u030a"); canonTests[12][2] = str("\\u00c5"); // angstrom_sign
+
+ canonTests[13][0] = str("\\u00c5"); canonTests[13][1] = str("A\\u030a"); canonTests[13][2] = str("\\u00c5"); // A-ring
+
+ canonTests[14][0] = str("\\u00C4ffin"); canonTests[14][1] = str("A\\u0308ffin"); canonTests[14][2] = str("\\u00C4ffin");
+
+ canonTests[15][0] = str("\\u00C4\\uFB03n"); canonTests[15][1] = str("A\\u0308\\uFB03n"); canonTests[15][2] = str("\\u00C4\\uFB03n");
+
+ canonTests[16][0] = str("Henry IV"); canonTests[16][1] = str("Henry IV"); canonTests[16][2] = str("Henry IV");
+
+ canonTests[17][0] = str("Henry \\u2163"); canonTests[17][1] = str("Henry \\u2163"); canonTests[17][2] = str("Henry \\u2163");
+
+ canonTests[18][0] = str("\\u30AC"); canonTests[18][1] = str("\\u30AB\\u3099"); canonTests[18][2] = str("\\u30AC"); // ga (Katakana)
+
+ canonTests[19][0] = str("\\u30AB\\u3099"); canonTests[19][1] = str("\\u30AB\\u3099"); canonTests[19][2] = str("\\u30AC"); // ka + ten
+
+ canonTests[20][0] = str("\\uFF76\\uFF9E"); canonTests[20][1] = str("\\uFF76\\uFF9E"); canonTests[20][2] = str("\\uFF76\\uFF9E"); // hw_ka + hw_ten
+
+ canonTests[21][0] = str("\\u30AB\\uFF9E"); canonTests[21][1] = str("\\u30AB\\uFF9E"); canonTests[21][2] = str("\\u30AB\\uFF9E"); // ka + hw_ten
+
+ canonTests[22][0] = str("\\uFF76\\u3099"); canonTests[22][1] = str("\\uFF76\\u3099"); canonTests[22][2] = str("\\uFF76\\u3099"); // hw_ka + ten
+
+ canonTests[23][0] = str("A\\u0300\\u0316"); canonTests[23][1] = str("A\\u0316\\u0300"); canonTests[23][2] = str("\\u00C0\\u0316");
+
+ /* compatTest */
+ // Input Decomposed Composed
+ compatTests[0][0] = str("cat"); compatTests[0][1] = str("cat"); compatTests[0][2] = str("cat") ;
+
+ compatTests[1][0] = str("\\uFB4f"); compatTests[1][1] = str("\\u05D0\\u05DC"); compatTests[1][2] = str("\\u05D0\\u05DC"); // Alef-Lamed vs. Alef, Lamed
+
+ compatTests[2][0] = str("\\u00C4ffin"); compatTests[2][1] = str("A\\u0308ffin"); compatTests[2][2] = str("\\u00C4ffin") ;
+
+ compatTests[3][0] = str("\\u00C4\\uFB03n"); compatTests[3][1] = str("A\\u0308ffin"); compatTests[3][2] = str("\\u00C4ffin") ; // ffi ligature -> f + f + i
+
+ compatTests[4][0] = str("Henry IV"); compatTests[4][1] = str("Henry IV"); compatTests[4][2] = str("Henry IV") ;
+
+ compatTests[5][0] = str("Henry \\u2163"); compatTests[5][1] = str("Henry IV"); compatTests[5][2] = str("Henry IV") ;
+
+ compatTests[6][0] = str("\\u30AC"); compatTests[6][1] = str("\\u30AB\\u3099"); compatTests[6][2] = str("\\u30AC") ; // ga (Katakana)
+
+ compatTests[7][0] = str("\\u30AB\\u3099"); compatTests[7][1] = str("\\u30AB\\u3099"); compatTests[7][2] = str("\\u30AC") ; // ka + ten
+
+ compatTests[8][0] = str("\\uFF76\\u3099"); compatTests[8][1] = str("\\u30AB\\u3099"); compatTests[8][2] = str("\\u30AC") ; // hw_ka + ten
+
+ /* These two are broken in Unicode 2.1.2 but fixed in 2.1.5 and later */
+ compatTests[9][0] = str("\\uFF76\\uFF9E"); compatTests[9][1] = str("\\u30AB\\u3099"); compatTests[9][2] = str("\\u30AC") ; // hw_ka + hw_ten
+
+ compatTests[10][0] = str("\\u30AB\\uFF9E"); compatTests[10][1] = str("\\u30AB\\u3099"); compatTests[10][2] = str("\\u30AC") ; // ka + hw_ten
+
+ /* Hangul Canonical */
+ // Input Decomposed Composed
+ hangulCanon[0][0] = str("\\ud4db"); hangulCanon[0][1] = str("\\u1111\\u1171\\u11b6"); hangulCanon[0][2] = str("\\ud4db") ;
+
+ hangulCanon[1][0] = str("\\u1111\\u1171\\u11b6"), hangulCanon[1][1] = str("\\u1111\\u1171\\u11b6"), hangulCanon[1][2] = str("\\ud4db");
+}
+
+BasicNormalizerTest::~BasicNormalizerTest()
+{
+}
+
+void BasicNormalizerTest::TestPrevious()
+{
+ Normalizer* norm = new Normalizer("", UNORM_NFD);
+
+ logln("testing decomp...");
+ uint32_t i;
+ for (i = 0; i < ARRAY_LENGTH(canonTests); i++) {
+ backAndForth(norm, canonTests[i][0]);
+ }
+
+ logln("testing compose...");
+ norm->setMode(UNORM_NFC);
+ for (i = 0; i < ARRAY_LENGTH(canonTests); i++) {
+ backAndForth(norm, canonTests[i][0]);
+ }
+
+ delete norm;
+}
+
+void BasicNormalizerTest::TestDecomp()
+{
+ Normalizer* norm = new Normalizer("", UNORM_NFD);
+ iterateTest(norm, canonTests, ARRAY_LENGTH(canonTests), 1);
+ staticTest(UNORM_NFD, 0, canonTests, ARRAY_LENGTH(canonTests), 1);
+ delete norm;
+}
+
+void BasicNormalizerTest::TestCompatDecomp()
+{
+ Normalizer* norm = new Normalizer("", UNORM_NFKD);
+ iterateTest(norm, compatTests, ARRAY_LENGTH(compatTests), 1);
+
+ staticTest(UNORM_NFKD, 0,
+ compatTests, ARRAY_LENGTH(compatTests), 1);
+ delete norm;
+}
+
+void BasicNormalizerTest::TestCanonCompose()
+{
+ Normalizer* norm = new Normalizer("", UNORM_NFC);
+ iterateTest(norm, canonTests, ARRAY_LENGTH(canonTests), 2);
+
+ staticTest(UNORM_NFC, 0, canonTests,
+ ARRAY_LENGTH(canonTests), 2);
+ delete norm;
+}
+
+void BasicNormalizerTest::TestCompatCompose()
+{
+ Normalizer* norm = new Normalizer("", UNORM_NFKC);
+ iterateTest(norm, compatTests, ARRAY_LENGTH(compatTests), 2);
+
+ staticTest(UNORM_NFKC, 0,
+ compatTests, ARRAY_LENGTH(compatTests), 2);
+ delete norm;
+}
+
+
+//-------------------------------------------------------------------------------
+
+void BasicNormalizerTest::TestHangulCompose()
+{
+ // Make sure that the static composition methods work
+ logln("Canonical composition...");
+ staticTest(UNORM_NFC, 0, hangulCanon, ARRAY_LENGTH(hangulCanon), 2);
+ logln("Compatibility composition...");
+
+ // Now try iterative composition....
+ logln("Static composition...");
+ Normalizer* norm = new Normalizer("", UNORM_NFC);
+ iterateTest(norm, hangulCanon, ARRAY_LENGTH(hangulCanon), 2);
+ norm->setMode(UNORM_NFKC);
+
+ // And finally, make sure you can do it in reverse too
+ logln("Reverse iteration...");
+ norm->setMode(UNORM_NFC);
+ for (uint32_t i = 0; i < ARRAY_LENGTH(hangulCanon); i++) {
+ backAndForth(norm, hangulCanon[i][0]);
+ }
+ delete norm;
+}
+
+void BasicNormalizerTest::TestHangulDecomp()
+{
+ // Make sure that the static decomposition methods work
+ logln("Canonical decomposition...");
+ staticTest(UNORM_NFD, 0, hangulCanon, ARRAY_LENGTH(hangulCanon), 1);
+ logln("Compatibility decomposition...");
+
+ // Now the iterative decomposition methods...
+ logln("Iterative decomposition...");
+ Normalizer* norm = new Normalizer("", UNORM_NFD);
+ iterateTest(norm, hangulCanon, ARRAY_LENGTH(hangulCanon), 1);
+ norm->setMode(UNORM_NFKD);
+
+ // And finally, make sure you can do it in reverse too
+ logln("Reverse iteration...");
+ norm->setMode(UNORM_NFD);
+ for (uint32_t i = 0; i < ARRAY_LENGTH(hangulCanon); i++) {
+ backAndForth(norm, hangulCanon[i][0]);
+ }
+ delete norm;
+}
+
+/**
+ * The Tibetan vowel sign AA, 0f71, was messed up prior to Unicode version 2.1.9.
+ */
+void BasicNormalizerTest::TestTibetan(void) {
+ UnicodeString decomp[1][3];
+ decomp[0][0] = str("\\u0f77");
+ decomp[0][1] = str("\\u0f77");
+ decomp[0][2] = str("\\u0fb2\\u0f71\\u0f80");
+
+ UnicodeString compose[1][3];
+ compose[0][0] = str("\\u0fb2\\u0f71\\u0f80");
+ compose[0][1] = str("\\u0fb2\\u0f71\\u0f80");
+ compose[0][2] = str("\\u0fb2\\u0f71\\u0f80");
+
+ staticTest(UNORM_NFD, 0, decomp, ARRAY_LENGTH(decomp), 1);
+ staticTest(UNORM_NFKD, 0, decomp, ARRAY_LENGTH(decomp), 2);
+ staticTest(UNORM_NFC, 0, compose, ARRAY_LENGTH(compose), 1);
+ staticTest(UNORM_NFKC, 0, compose, ARRAY_LENGTH(compose), 2);
+}
+
+/**
+ * Make sure characters in the CompositionExclusion.txt list do not get
+ * composed to.
+ */
+void BasicNormalizerTest::TestCompositionExclusion(void) {
+ // This list is generated from CompositionExclusion.txt.
+ // Update whenever the normalizer tables are updated. Note
+ // that we test all characters listed, even those that can be
+ // derived from the Unicode DB and are therefore commented
+ // out.
+ // ### TODO read composition exclusion from source/data/unidata file
+ // and test against that
+ UnicodeString EXCLUDED = str(
+ "\\u0340\\u0341\\u0343\\u0344\\u0374\\u037E\\u0387\\u0958"
+ "\\u0959\\u095A\\u095B\\u095C\\u095D\\u095E\\u095F\\u09DC"
+ "\\u09DD\\u09DF\\u0A33\\u0A36\\u0A59\\u0A5A\\u0A5B\\u0A5E"
+ "\\u0B5C\\u0B5D\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69"
+ "\\u0F73\\u0F75\\u0F76\\u0F78\\u0F81\\u0F93\\u0F9D\\u0FA2"
+ "\\u0FA7\\u0FAC\\u0FB9\\u1F71\\u1F73\\u1F75\\u1F77\\u1F79"
+ "\\u1F7B\\u1F7D\\u1FBB\\u1FBE\\u1FC9\\u1FCB\\u1FD3\\u1FDB"
+ "\\u1FE3\\u1FEB\\u1FEE\\u1FEF\\u1FF9\\u1FFB\\u1FFD\\u2000"
+ "\\u2001\\u2126\\u212A\\u212B\\u2329\\u232A\\uF900\\uFA10"
+ "\\uFA12\\uFA15\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A\\uFB1F"
+ "\\uFB2A\\uFB2B\\uFB2C\\uFB2D\\uFB2E\\uFB2F\\uFB30\\uFB31"
+ "\\uFB32\\uFB33\\uFB34\\uFB35\\uFB36\\uFB38\\uFB39\\uFB3A"
+ "\\uFB3B\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46"
+ "\\uFB47\\uFB48\\uFB49\\uFB4A\\uFB4B\\uFB4C\\uFB4D\\uFB4E"
+ );
+ for (int32_t i=0; i<EXCLUDED.length(); ++i) {
+ UnicodeString a(EXCLUDED.charAt(i));
+ UnicodeString b;
+ UnicodeString c;
+ Normalizer::normalize(a, UNORM_NFKD, 0, b, status);
+ Normalizer::normalize(b, UNORM_NFC, 0, c, status);
+ if (c == a) {
+ errln("FAIL: " + hex(a) + " x DECOMP_COMPAT => " +
+ hex(b) + " x COMPOSE => " +
+ hex(c));
+ } else if (verbose) {
+ logln("Ok: " + hex(a) + " x DECOMP_COMPAT => " +
+ hex(b) + " x COMPOSE => " +
+ hex(c));
+ }
+ }
+}
+
+/**
+ * Test for a problem that showed up just before ICU 1.6 release
+ * having to do with combining characters with an index of zero.
+ * Such characters do not participate in any canonical
+ * decompositions. However, having an index of zero means that
+ * they all share one typeMask[] entry, that is, they all have to
+ * map to the same canonical class, which is not the case, in
+ * reality.
+ */
+void BasicNormalizerTest::TestZeroIndex(void) {
+ const char* DATA[] = {
+ // Expect col1 x COMPOSE_COMPAT => col2
+ // Expect col2 x DECOMP => col3
+ "A\\u0316\\u0300", "\\u00C0\\u0316", "A\\u0316\\u0300",
+ "A\\u0300\\u0316", "\\u00C0\\u0316", "A\\u0316\\u0300",
+ "A\\u0327\\u0300", "\\u00C0\\u0327", "A\\u0327\\u0300",
+ "c\\u0321\\u0327", "c\\u0321\\u0327", "c\\u0321\\u0327",
+ "c\\u0327\\u0321", "\\u00E7\\u0321", "c\\u0327\\u0321",
+ };
+ int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ for (int32_t i=0; i<DATA_length; i+=3) {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString a(DATA[i], "");
+ a = a.unescape();
+ UnicodeString b;
+ Normalizer::normalize(a, UNORM_NFKC, 0, b, status);
+ UnicodeString exp(DATA[i+1], "");
+ exp = exp.unescape();
+ if (b == exp) {
+ logln((UnicodeString)"Ok: " + hex(a) + " x COMPOSE_COMPAT => " + hex(b));
+ } else {
+ errln((UnicodeString)"FAIL: " + hex(a) + " x COMPOSE_COMPAT => " + hex(b) +
+ ", expect " + hex(exp));
+ }
+ Normalizer::normalize(b, UNORM_NFD, 0, a, status);
+ exp = UnicodeString(DATA[i+2], "").unescape();
+ if (a == exp) {
+ logln((UnicodeString)"Ok: " + hex(b) + " x DECOMP => " + hex(a));
+ } else {
+ errln((UnicodeString)"FAIL: " + hex(b) + " x DECOMP => " + hex(a) +
+ ", expect " + hex(exp));
+ }
+ }
+}
+
+/**
+ * Run a few specific cases that are failing for Verisign.
+ */
+void BasicNormalizerTest::TestVerisign(void) {
+ /*
+ > Their input:
+ > 05B8 05B9 05B1 0591 05C3 05B0 05AC 059F
+ > Their output (supposedly from ICU):
+ > 05B8 05B1 05B9 0591 05C3 05B0 05AC 059F
+ > My output from charlint:
+ > 05B1 05B8 05B9 0591 05C3 05B0 05AC 059F
+
+ 05B8 05B9 05B1 0591 05C3 05B0 05AC 059F => 05B1 05B8 05B9 0591 05C3 05B0
+ 05AC 059F
+
+ U+05B8 18 E HEBREW POINT QAMATS
+ U+05B9 19 F HEBREW POINT HOLAM
+ U+05B1 11 HEBREW POINT HATAF SEGOL
+ U+0591 220 HEBREW ACCENT ETNAHTA
+ U+05C3 0 HEBREW PUNCTUATION SOF PASUQ
+ U+05B0 10 HEBREW POINT SHEVA
+ U+05AC 230 HEBREW ACCENT ILUY
+ U+059F 230 HEBREW ACCENT QARNEY PARA
+
+ U+05B1 11 HEBREW POINT HATAF SEGOL
+ U+05B8 18 HEBREW POINT QAMATS
+ U+05B9 19 HEBREW POINT HOLAM
+ U+0591 220 HEBREW ACCENT ETNAHTA
+ U+05C3 0 HEBREW PUNCTUATION SOF PASUQ
+ U+05B0 10 HEBREW POINT SHEVA
+ U+05AC 230 HEBREW ACCENT ILUY
+ U+059F 230 HEBREW ACCENT QARNEY PARA
+
+ Wrong result:
+ U+05B8 18 HEBREW POINT QAMATS
+ U+05B1 11 HEBREW POINT HATAF SEGOL
+ U+05B9 19 HEBREW POINT HOLAM
+ U+0591 220 HEBREW ACCENT ETNAHTA
+ U+05C3 0 HEBREW PUNCTUATION SOF PASUQ
+ U+05B0 10 HEBREW POINT SHEVA
+ U+05AC 230 HEBREW ACCENT ILUY
+ U+059F 230 HEBREW ACCENT QARNEY PARA
+
+
+ > Their input:
+ >0592 05B7 05BC 05A5 05B0 05C0 05C4 05AD
+ >Their output (supposedly from ICU):
+ >0592 05B0 05B7 05BC 05A5 05C0 05AD 05C4
+ >My output from charlint:
+ >05B0 05B7 05BC 05A5 0592 05C0 05AD 05C4
+
+ 0592 05B7 05BC 05A5 05B0 05C0 05C4 05AD => 05B0 05B7 05BC 05A5 0592 05C0
+ 05AD 05C4
+
+ U+0592 230 HEBREW ACCENT SEGOL
+ U+05B7 17 HEBREW POINT PATAH
+ U+05BC 21 HEBREW POINT DAGESH OR MAPIQ
+ U+05A5 220 HEBREW ACCENT MERKHA
+ U+05B0 10 HEBREW POINT SHEVA
+ U+05C0 0 HEBREW PUNCTUATION PASEQ
+ U+05C4 230 HEBREW MARK UPPER DOT
+ U+05AD 222 HEBREW ACCENT DEHI
+
+ U+05B0 10 HEBREW POINT SHEVA
+ U+05B7 17 HEBREW POINT PATAH
+ U+05BC 21 HEBREW POINT DAGESH OR MAPIQ
+ U+05A5 220 HEBREW ACCENT MERKHA
+ U+0592 230 HEBREW ACCENT SEGOL
+ U+05C0 0 HEBREW PUNCTUATION PASEQ
+ U+05AD 222 HEBREW ACCENT DEHI
+ U+05C4 230 HEBREW MARK UPPER DOT
+
+ Wrong result:
+ U+0592 230 HEBREW ACCENT SEGOL
+ U+05B0 10 HEBREW POINT SHEVA
+ U+05B7 17 HEBREW POINT PATAH
+ U+05BC 21 HEBREW POINT DAGESH OR MAPIQ
+ U+05A5 220 HEBREW ACCENT MERKHA
+ U+05C0 0 HEBREW PUNCTUATION PASEQ
+ U+05AD 222 HEBREW ACCENT DEHI
+ U+05C4 230 HEBREW MARK UPPER DOT
+ */
+ UnicodeString data[2][3];
+ data[0][0] = str("\\u05B8\\u05B9\\u05B1\\u0591\\u05C3\\u05B0\\u05AC\\u059F");
+ data[0][1] = str("\\u05B1\\u05B8\\u05B9\\u0591\\u05C3\\u05B0\\u05AC\\u059F");
+ data[0][2] = str("");
+ data[1][0] = str("\\u0592\\u05B7\\u05BC\\u05A5\\u05B0\\u05C0\\u05C4\\u05AD");
+ data[1][1] = str("\\u05B0\\u05B7\\u05BC\\u05A5\\u0592\\u05C0\\u05AD\\u05C4");
+ data[1][2] = str("");
+
+ staticTest(UNORM_NFD, 0, data, ARRAY_LENGTH(data), 1);
+ staticTest(UNORM_NFC, 0, data, ARRAY_LENGTH(data), 1);
+}
+
+//------------------------------------------------------------------------
+// Internal utilities
+//
+
+UnicodeString BasicNormalizerTest::hex(UChar ch) {
+ UnicodeString result;
+ return appendHex(ch, 4, result);
+}
+
+UnicodeString BasicNormalizerTest::hex(const UnicodeString& s) {
+ UnicodeString result;
+ for (int i = 0; i < s.length(); ++i) {
+ if (i != 0) result += (UChar)0x2c/*,*/;
+ appendHex(s[i], 4, result);
+ }
+ return result;
+}
+
+
+inline static void insert(UnicodeString& dest, int pos, UChar32 ch)
+{
+ dest.replace(pos, 0, ch);
+}
+
+void BasicNormalizerTest::backAndForth(Normalizer* iter, const UnicodeString& input)
+{
+ UChar32 ch;
+ iter->setText(input, status);
+
+ // Run through the iterator forwards and stick it into a StringBuffer
+ UnicodeString forward;
+ for (ch = iter->first(); ch != iter->DONE; ch = iter->next()) {
+ forward += ch;
+ }
+
+ // Now do it backwards
+ UnicodeString reverse;
+ for (ch = iter->last(); ch != iter->DONE; ch = iter->previous()) {
+ insert(reverse, 0, ch);
+ }
+
+ if (forward != reverse) {
+ errln("Forward/reverse mismatch for input " + hex(input)
+ + ", forward: " + hex(forward) + ", backward: " + hex(reverse));
+ }
+}
+
+void BasicNormalizerTest::staticTest(UNormalizationMode mode, int options,
+ UnicodeString tests[][3], int length,
+ int outCol)
+{
+ for (int i = 0; i < length; i++)
+ {
+ UnicodeString& input = tests[i][0];
+ UnicodeString& expect = tests[i][outCol];
+
+ logln("Normalizing '" + input + "' (" + hex(input) + ")" );
+
+ UnicodeString output;
+ Normalizer::normalize(input, mode, options, output, status);
+
+ if (output != expect) {
+ errln(UnicodeString("ERROR: case ") + i + " normalized " + hex(input) + "\n"
+ + " expected " + hex(expect) + "\n"
+ + " static got " + hex(output) );
+ }
+ }
+}
+
+void BasicNormalizerTest::iterateTest(Normalizer* iter,
+ UnicodeString tests[][3], int length,
+ int outCol)
+{
+ for (int i = 0; i < length; i++)
+ {
+ UnicodeString& input = tests[i][0];
+ UnicodeString& expect = tests[i][outCol];
+
+ logln("Normalizing '" + input + "' (" + hex(input) + ")" );
+
+ iter->setText(input, status);
+ assertEqual(input, expect, iter, UnicodeString("ERROR: case ") + i + " ");
+ }
+}
+
+void BasicNormalizerTest::assertEqual(const UnicodeString& input,
+ const UnicodeString& expected,
+ Normalizer* iter,
+ const UnicodeString& errPrefix)
+{
+ UnicodeString result;
+
+ for (UChar32 ch = iter->first(); ch != iter->DONE; ch = iter->next()) {
+ result += ch;
+ }
+ if (result != expected) {
+ errln(errPrefix + "normalized " + hex(input) + "\n"
+ + " expected " + hex(expected) + "\n"
+ + " iterate got " + hex(result) );
+ }
+}
+
+// helper class for TestPreviousNext()
+// simple UTF-32 character iterator
+class UChar32Iterator {
+public:
+ UChar32Iterator(const UChar32 *text, int32_t len, int32_t index) :
+ s(text), length(len), i(index) {}
+
+ UChar32 current() {
+ if(i<length) {
+ return s[i];
+ } else {
+ return 0xffff;
+ }
+ }
+
+ UChar32 next() {
+ if(i<length) {
+ return s[i++];
+ } else {
+ return 0xffff;
+ }
+ }
+
+ UChar32 previous() {
+ if(i>0) {
+ return s[--i];
+ } else {
+ return 0xffff;
+ }
+ }
+
+ int32_t getIndex() {
+ return i;
+ }
+private:
+ const UChar32 *s;
+ int32_t length, i;
+};
+
+void
+BasicNormalizerTest::TestPreviousNext(const UChar *src, int32_t srcLength,
+ const UChar32 *expect, int32_t expectLength,
+ const int32_t *expectIndex, // its length=expectLength+1
+ int32_t srcMiddle, int32_t expectMiddle,
+ const char *moves,
+ UNormalizationMode mode,
+ const char *name) {
+ // iterators
+ Normalizer iter(src, srcLength, mode);
+
+ // test getStaticClassID and getDynamicClassID
+ if(iter.getDynamicClassID() != Normalizer::getStaticClassID()) {
+ errln("getStaticClassID != getDynamicClassID for Normalizer.");
+ }
+
+ UChar32Iterator iter32(expect, expectLength, expectMiddle);
+
+ UChar32 c1, c2;
+ char m;
+
+ // initially set the indexes into the middle of the strings
+ iter.setIndexOnly(srcMiddle);
+
+ // move around and compare the iteration code points with
+ // the expected ones
+ const char *move=moves;
+ while((m=*move++)!=0) {
+ if(m=='-') {
+ c1=iter.previous();
+ c2=iter32.previous();
+ } else if(m=='0') {
+ c1=iter.current();
+ c2=iter32.current();
+ } else /* m=='+' */ {
+ c1=iter.next();
+ c2=iter32.next();
+ }
+
+ // compare results
+ if(c1!=c2) {
+ // copy the moves until the current (m) move, and terminate
+ char history[64];
+ uprv_strcpy(history, moves);
+ history[move-moves]=0;
+ errln("error: mismatch in Normalizer iteration (%s) at %s: "
+ "got c1=U+%04lx != expected c2=U+%04lx\n",
+ name, history, c1, c2);
+ break;
+ }
+
+ // compare indexes
+ if(iter.getIndex()!=expectIndex[iter32.getIndex()]) {
+ // copy the moves until the current (m) move, and terminate
+ char history[64];
+ uprv_strcpy(history, moves);
+ history[move-moves]=0;
+ errln("error: index mismatch in Normalizer iteration (%s) at %s: "
+ "Normalizer index %ld expected %ld\n",
+ name, history, iter.getIndex(), expectIndex[iter32.getIndex()]);
+ break;
+ }
+ }
+}
+
+void
+BasicNormalizerTest::TestPreviousNext() {
+ // src and expect strings
+ static const UChar src[]={
+ UTF16_LEAD(0x2f999), UTF16_TRAIL(0x2f999),
+ UTF16_LEAD(0x1d15f), UTF16_TRAIL(0x1d15f),
+ 0xc4,
+ 0x1ed0
+ };
+ static const UChar32 expect[]={
+ 0x831d,
+ 0x1d158, 0x1d165,
+ 0x41, 0x308,
+ 0x4f, 0x302, 0x301
+ };
+
+ // expected src indexes corresponding to expect indexes
+ static const int32_t expectIndex[]={
+ 0,
+ 2, 2,
+ 4, 4,
+ 5, 5, 5,
+ 6 // behind last character
+ };
+
+ // src and expect strings for regression test for j2911
+ static const UChar src_j2911[]={
+ UTF16_LEAD(0x2f999), UTF16_TRAIL(0x2f999),
+ 0xdd00, 0xd900, // unpaired surrogates - regression test for j2911
+ 0xc4,
+ 0x4f, 0x302, 0x301
+ };
+ static const UChar32 expect_j2911[]={
+ 0x831d,
+ 0xdd00, 0xd900, // unpaired surrogates - regression test for j2911
+ 0xc4,
+ 0x1ed0
+ };
+
+ // expected src indexes corresponding to expect indexes
+ static const int32_t expectIndex_j2911[]={
+ 0,
+ 2, 3,
+ 4,
+ 5,
+ 8 // behind last character
+ };
+
+ // initial indexes into the src and expect strings
+ // for both sets of test data
+ enum {
+ SRC_MIDDLE=4,
+ EXPECT_MIDDLE=3,
+ SRC_MIDDLE_2=2,
+ EXPECT_MIDDLE_2=1
+ };
+
+ // movement vector
+ // - for previous(), 0 for current(), + for next()
+ // for both sets of test data
+ static const char *const moves="0+0+0--0-0-+++0--+++++++0--------";
+
+ TestPreviousNext(src, LENGTHOF(src),
+ expect, LENGTHOF(expect),
+ expectIndex,
+ SRC_MIDDLE, EXPECT_MIDDLE,
+ moves, UNORM_NFD, "basic");
+
+ TestPreviousNext(src_j2911, LENGTHOF(src_j2911),
+ expect_j2911, LENGTHOF(expect_j2911),
+ expectIndex_j2911,
+ SRC_MIDDLE, EXPECT_MIDDLE,
+ moves, UNORM_NFKC, "j2911");
+
+ // try again from different "middle" indexes
+ TestPreviousNext(src, LENGTHOF(src),
+ expect, LENGTHOF(expect),
+ expectIndex,
+ SRC_MIDDLE_2, EXPECT_MIDDLE_2,
+ moves, UNORM_NFD, "basic_2");
+
+ TestPreviousNext(src_j2911, LENGTHOF(src_j2911),
+ expect_j2911, LENGTHOF(expect_j2911),
+ expectIndex_j2911,
+ SRC_MIDDLE_2, EXPECT_MIDDLE_2,
+ moves, UNORM_NFKC, "j2911_2");
+}
+
+void BasicNormalizerTest::TestConcatenate() {
+ static const char *const
+ cases[][4]={
+ /* mode, left, right, result */
+ {
+ "C",
+ "re",
+ "\\u0301sum\\u00e9",
+ "r\\u00e9sum\\u00e9"
+ },
+ {
+ "C",
+ "a\\u1100",
+ "\\u1161bcdefghijk",
+ "a\\uac00bcdefghijk"
+ },
+ /* ### TODO: add more interesting cases */
+ {
+ "D",
+ "\\u0340\\u0341\\u0343\\u0344\\u0374\\u037E\\u0387\\u0958"
+ "\\u0959\\u095A\\u095B\\u095C\\u095D\\u095E\\u095F\\u09DC"
+ "\\u09DD\\u09DF\\u0A33\\u0A36\\u0A59\\u0A5A\\u0A5B\\u0A5E"
+ "\\u0B5C\\u0B5D\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69"
+ "\\u0F73\\u0F75\\u0F76\\u0F78\\u0F81\\u0F93\\u0F9D\\u0FA2"
+ "\\u0FA7\\u0FAC\\u0FB9\\u1F71\\u1F73\\u1F75\\u1F77\\u1F79"
+ "\\u1F7B\\u1F7D\\u1FBB\\u1FBE\\u1FC9\\u1FCB\\u1FD3\\u1FDB",
+
+ "\\u1FE3\\u1FEB\\u1FEE\\u1FEF\\u1FF9\\u1FFB\\u1FFD\\u2000"
+ "\\u2001\\u2126\\u212A\\u212B\\u2329\\u232A\\uF900\\uFA10"
+ "\\uFA12\\uFA15\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A\\uFB1F"
+ "\\uFB2A\\uFB2B\\uFB2C\\uFB2D\\uFB2E\\uFB2F\\uFB30\\uFB31"
+ "\\uFB32\\uFB33\\uFB34\\uFB35\\uFB36\\uFB38\\uFB39\\uFB3A"
+ "\\uFB3B\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46"
+ "\\uFB47\\uFB48\\uFB49\\uFB4A\\uFB4B\\uFB4C\\uFB4D\\uFB4E",
+
+ "\\u0340\\u0341\\u0343\\u0344\\u0374\\u037E\\u0387\\u0958"
+ "\\u0959\\u095A\\u095B\\u095C\\u095D\\u095E\\u095F\\u09DC"
+ "\\u09DD\\u09DF\\u0A33\\u0A36\\u0A59\\u0A5A\\u0A5B\\u0A5E"
+ "\\u0B5C\\u0B5D\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69"
+ "\\u0F73\\u0F75\\u0F76\\u0F78\\u0F81\\u0F93\\u0F9D\\u0FA2"
+ "\\u0FA7\\u0FAC\\u0FB9\\u1F71\\u1F73\\u1F75\\u1F77\\u1F79"
+ "\\u1F7B\\u1F7D\\u1FBB\\u1FBE\\u1FC9\\u1FCB\\u1FD3\\u0399"
+ "\\u0301\\u03C5\\u0308\\u0301\\u1FEB\\u1FEE\\u1FEF\\u1FF9"
+ "\\u1FFB\\u1FFD\\u2000\\u2001\\u2126\\u212A\\u212B\\u2329"
+ "\\u232A\\uF900\\uFA10\\uFA12\\uFA15\\uFA20\\uFA22\\uFA25"
+ "\\uFA26\\uFA2A\\uFB1F\\uFB2A\\uFB2B\\uFB2C\\uFB2D\\uFB2E"
+ "\\uFB2F\\uFB30\\uFB31\\uFB32\\uFB33\\uFB34\\uFB35\\uFB36"
+ "\\uFB38\\uFB39\\uFB3A\\uFB3B\\uFB3C\\uFB3E\\uFB40\\uFB41"
+ "\\uFB43\\uFB44\\uFB46\\uFB47\\uFB48\\uFB49\\uFB4A\\uFB4B"
+ "\\uFB4C\\uFB4D\\uFB4E"
+ }
+ };
+
+ UnicodeString left, right, expect, result, r;
+ UErrorCode errorCode;
+ UNormalizationMode mode;
+ int32_t i;
+
+ /* test concatenation */
+ for(i=0; i<(int32_t)(sizeof(cases)/sizeof(cases[0])); ++i) {
+ switch(*cases[i][0]) {
+ case 'C': mode=UNORM_NFC; break;
+ case 'D': mode=UNORM_NFD; break;
+ case 'c': mode=UNORM_NFKC; break;
+ case 'd': mode=UNORM_NFKD; break;
+ default: mode=UNORM_NONE; break;
+ }
+
+ left=UnicodeString(cases[i][1], "").unescape();
+ right=UnicodeString(cases[i][2], "").unescape();
+ expect=UnicodeString(cases[i][3], "").unescape();
+
+ //result=r=UnicodeString();
+ errorCode=U_ZERO_ERROR;
+
+ r=Normalizer::concatenate(left, right, result, mode, 0, errorCode);
+ if(U_FAILURE(errorCode) || /*result!=r ||*/ result!=expect) {
+ errln("error in Normalizer::concatenate(), cases[] fails with "+
+ UnicodeString(u_errorName(errorCode))+", result==expect: expected: "+
+ hex(expect)+" =========> got: " + hex(result));
+ }
+ }
+
+ /* test error cases */
+
+ /* left.getBuffer()==result.getBuffer() */
+ result=r=expect=UnicodeString("zz", "");
+ errorCode=U_UNEXPECTED_TOKEN;
+ r=Normalizer::concatenate(left, right, result, mode, 0, errorCode);
+ if(errorCode!=U_UNEXPECTED_TOKEN || result!=r || !result.isBogus()) {
+ errln("error in Normalizer::concatenate(), violates UErrorCode protocol");
+ }
+
+ left.setToBogus();
+ errorCode=U_ZERO_ERROR;
+ r=Normalizer::concatenate(left, right, result, mode, 0, errorCode);
+ if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || result!=r || !result.isBogus()) {
+ errln("error in Normalizer::concatenate(), does not detect left.isBogus()");
+ }
+}
+
+// reference implementation of Normalizer::compare
+static int32_t
+ref_norm_compare(const UnicodeString &s1, const UnicodeString &s2, uint32_t options, UErrorCode &errorCode) {
+ UnicodeString r1, r2, t1, t2;
+ int32_t normOptions=(int32_t)(options>>UNORM_COMPARE_NORM_OPTIONS_SHIFT);
+
+ if(options&U_COMPARE_IGNORE_CASE) {
+ Normalizer::decompose(s1, FALSE, normOptions, r1, errorCode);
+ Normalizer::decompose(s2, FALSE, normOptions, r2, errorCode);
+
+ r1.foldCase(options);
+ r2.foldCase(options);
+ } else {
+ r1=s1;
+ r2=s2;
+ }
+
+ Normalizer::decompose(r1, FALSE, normOptions, t1, errorCode);
+ Normalizer::decompose(r2, FALSE, normOptions, t2, errorCode);
+
+ if(options&U_COMPARE_CODE_POINT_ORDER) {
+ return t1.compareCodePointOrder(t2);
+ } else {
+ return t1.compare(t2);
+ }
+}
+
+// test wrapper for Normalizer::compare, sets UNORM_INPUT_IS_FCD appropriately
+static int32_t
+_norm_compare(const UnicodeString &s1, const UnicodeString &s2, uint32_t options, UErrorCode &errorCode) {
+ int32_t normOptions=(int32_t)(options>>UNORM_COMPARE_NORM_OPTIONS_SHIFT);
+
+ if( UNORM_YES==Normalizer::quickCheck(s1, UNORM_FCD, normOptions, errorCode) &&
+ UNORM_YES==Normalizer::quickCheck(s2, UNORM_FCD, normOptions, errorCode)) {
+ options|=UNORM_INPUT_IS_FCD;
+ }
+
+ return Normalizer::compare(s1, s2, options, errorCode);
+}
+
+// reference implementation of UnicodeString::caseCompare
+static int32_t
+ref_case_compare(const UnicodeString &s1, const UnicodeString &s2, uint32_t options) {
+ UnicodeString t1, t2;
+
+ t1=s1;
+ t2=s2;
+
+ t1.foldCase(options);
+ t2.foldCase(options);
+
+ if(options&U_COMPARE_CODE_POINT_ORDER) {
+ return t1.compareCodePointOrder(t2);
+ } else {
+ return t1.compare(t2);
+ }
+}
+
+// reduce an integer to -1/0/1
+static inline int32_t
+_sign(int32_t value) {
+ if(value==0) {
+ return 0;
+ } else {
+ return (value>>31)|1;
+ }
+}
+
+static const char *
+_signString(int32_t value) {
+ if(value<0) {
+ return "<0";
+ } else if(value==0) {
+ return "=0";
+ } else /* value>0 */ {
+ return ">0";
+ }
+}
+
+void
+BasicNormalizerTest::TestCompare() {
+ // test Normalizer::compare and unorm_compare (thinly wrapped by the former)
+ // by comparing it with its semantic equivalent
+ // since we trust the pieces, this is sufficient
+
+ // test each string with itself and each other
+ // each time with all options
+ static const char *const
+ strings[]={
+ // some cases from NormalizationTest.txt
+ // 0..3
+ "D\\u031B\\u0307\\u0323",
+ "\\u1E0C\\u031B\\u0307",
+ "D\\u031B\\u0323\\u0307",
+ "d\\u031B\\u0323\\u0307",
+
+ // 4..6
+ "\\u00E4",
+ "a\\u0308",
+ "A\\u0308",
+
+ // Angstrom sign = A ring
+ // 7..10
+ "\\u212B",
+ "\\u00C5",
+ "A\\u030A",
+ "a\\u030A",
+
+ // 11.14
+ "a\\u059A\\u0316\\u302A\\u032Fb",
+ "a\\u302A\\u0316\\u032F\\u059Ab",
+ "a\\u302A\\u0316\\u032F\\u059Ab",
+ "A\\u059A\\u0316\\u302A\\u032Fb",
+
+ // from ICU case folding tests
+ // 15..20
+ "A\\u00df\\u00b5\\ufb03\\U0001040c\\u0131",
+ "ass\\u03bcffi\\U00010434i",
+ "\\u0061\\u0042\\u0131\\u03a3\\u00df\\ufb03\\ud93f\\udfff",
+ "\\u0041\\u0062\\u0069\\u03c3\\u0073\\u0053\\u0046\\u0066\\u0049\\ud93f\\udfff",
+ "\\u0041\\u0062\\u0131\\u03c3\\u0053\\u0073\\u0066\\u0046\\u0069\\ud93f\\udfff",
+ "\\u0041\\u0062\\u0069\\u03c3\\u0073\\u0053\\u0046\\u0066\\u0049\\ud93f\\udffd",
+
+ // U+d800 U+10001 see implementation comment in unorm_cmpEquivFold
+ // vs. U+10000 at bottom - code point order
+ // 21..22
+ "\\ud800\\ud800\\udc01",
+ "\\ud800\\udc00",
+
+ // other code point order tests from ustrtest.cpp
+ // 23..31
+ "\\u20ac\\ud801",
+ "\\u20ac\\ud800\\udc00",
+ "\\ud800",
+ "\\ud800\\uff61",
+ "\\udfff",
+ "\\uff61\\udfff",
+ "\\uff61\\ud800\\udc02",
+ "\\ud800\\udc02",
+ "\\ud84d\\udc56",
+
+ // long strings, see cnormtst.c/TestNormCoverage()
+ // equivalent if case-insensitive
+ // 32..33
+ "\\uAD8B\\uAD8B\\uAD8B\\uAD8B"
+ "\\U0001d15e\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d15e\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d15e\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "aaaaaaaaaaaaaaaaaazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
+ "ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
+ "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
+ "\\uAD8B\\uAD8B\\uAD8B\\uAD8B"
+ "d\\u031B\\u0307\\u0323",
+
+ "\\u1100\\u116f\\u11aa\\uAD8B\\uAD8B\\u1100\\u116f\\u11aa"
+ "\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d15e\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "\\U0001d15e\\U0001d157\\U0001d165\\U0001d15e\\U0001d15e\\U0001d15e\\U0001d15e"
+ "aaaaaaaaaaAAAAAAAAZZZZZZZZZZZZZZZZzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
+ "ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
+ "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
+ "\\u1100\\u116f\\u11aa\\uAD8B\\uAD8B\\u1100\\u116f\\u11aa"
+ "\\u1E0C\\u031B\\u0307",
+
+ // some strings that may make a difference whether the compare function
+ // case-folds or decomposes first
+ // 34..41
+ "\\u0360\\u0345\\u0334",
+ "\\u0360\\u03b9\\u0334",
+
+ "\\u0360\\u1f80\\u0334",
+ "\\u0360\\u03b1\\u0313\\u03b9\\u0334",
+
+ "\\u0360\\u1ffc\\u0334",
+ "\\u0360\\u03c9\\u03b9\\u0334",
+
+ "a\\u0360\\u0345\\u0360\\u0345b",
+ "a\\u0345\\u0360\\u0345\\u0360b",
+
+ // interesting cases for canonical caseless match with turkic i handling
+ // 42..43
+ "\\u00cc",
+ "\\u0069\\u0300",
+
+ // strings with post-Unicode 3.2 normalization or normalization corrections
+ // 44..45
+ "\\u00e4\\u193b\\U0002f868",
+ "\\u0061\\u193b\\u0308\\u36fc",
+
+ // empty string
+ // 46
+ ""
+ };
+
+ UnicodeString s[100]; // at least as many items as in strings[] !
+
+ // all combinations of options
+ // UNORM_INPUT_IS_FCD is set automatically if both input strings fulfill FCD conditions
+ // set UNORM_UNICODE_3_2 in one additional combination
+ static const struct {
+ uint32_t options;
+ const char *name;
+ } opt[]={
+ { 0, "default" },
+ { U_COMPARE_CODE_POINT_ORDER, "c.p. order" },
+ { U_COMPARE_IGNORE_CASE, "ignore case" },
+ { U_COMPARE_CODE_POINT_ORDER|U_COMPARE_IGNORE_CASE, "c.p. order & ignore case" },
+ { U_COMPARE_IGNORE_CASE|U_FOLD_CASE_EXCLUDE_SPECIAL_I, "ignore case & special i" },
+ { U_COMPARE_CODE_POINT_ORDER|U_COMPARE_IGNORE_CASE|U_FOLD_CASE_EXCLUDE_SPECIAL_I, "c.p. order & ignore case & special i" },
+ { UNORM_UNICODE_3_2<<UNORM_COMPARE_NORM_OPTIONS_SHIFT, "Unicode 3.2" }
+ };
+
+ int32_t i, j, k, count=LENGTHOF(strings);
+ int32_t result, refResult;
+
+ UErrorCode errorCode;
+
+ // create the UnicodeStrings
+ for(i=0; i<count; ++i) {
+ s[i]=UnicodeString(strings[i], "").unescape();
+ }
+
+ // test them each with each other
+ for(i=0; i<count; ++i) {
+ for(j=i; j<count; ++j) {
+ for(k=0; k<LENGTHOF(opt); ++k) {
+ // test Normalizer::compare
+ errorCode=U_ZERO_ERROR;
+ result=_norm_compare(s[i], s[j], opt[k].options, errorCode);
+ refResult=ref_norm_compare(s[i], s[j], opt[k].options, errorCode);
+ if(_sign(result)!=_sign(refResult)) {
+ errln("Normalizer::compare(%d, %d, %s)%s should be %s %s",
+ i, j, opt[k].name, _signString(result), _signString(refResult),
+ U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
+ }
+
+ // test UnicodeString::caseCompare - same internal implementation function
+ if(opt[k].options&U_COMPARE_IGNORE_CASE) {
+ errorCode=U_ZERO_ERROR;
+ result=s[i].caseCompare(s[j], opt[k].options);
+ refResult=ref_case_compare(s[i], s[j], opt[k].options);
+ if(_sign(result)!=_sign(refResult)) {
+ errln("UniStr::caseCompare(%d, %d, %s)%s should be %s %s",
+ i, j, opt[k].name, _signString(result), _signString(refResult),
+ U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
+ }
+ }
+ }
+ }
+ }
+
+ // test cases with i and I to make sure Turkic works
+ static const UChar iI[]={ 0x49, 0x69, 0x130, 0x131 };
+ USerializedSet sset;
+ UnicodeSet set;
+
+ UnicodeString s1, s2;
+ UChar32 start, end;
+
+ // collect all sets into one for contiguous output
+ for(i=0; i<LENGTHOF(iI); ++i) {
+ if(unorm_getCanonStartSet(iI[i], &sset)) {
+ count=uset_getSerializedRangeCount(&sset);
+ for(j=0; j<count; ++j) {
+ uset_getSerializedRange(&sset, j, &start, &end);
+ set.add(start, end);
+ }
+ }
+ }
+
+ // test all of these precomposed characters
+ UnicodeSetIterator it(set);
+ while(it.nextRange() && !it.isString()) {
+ start=it.getCodepoint();
+ end=it.getCodepointEnd();
+ while(start<=end) {
+ s1.setTo(start);
+ errorCode=U_ZERO_ERROR;
+ Normalizer::decompose(s1, FALSE, 0, s2, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("Normalizer::decompose(U+%04x) failed: %s", start, u_errorName(errorCode));
+ return;
+ }
+
+ for(k=0; k<LENGTHOF(opt); ++k) {
+ // test Normalizer::compare
+ errorCode=U_ZERO_ERROR;
+ result=_norm_compare(s1, s2, opt[k].options, errorCode);
+ refResult=ref_norm_compare(s1, s2, opt[k].options, errorCode);
+ if(_sign(result)!=_sign(refResult)) {
+ errln("Normalizer::compare(U+%04x with its NFD, %s)%s should be %s %s",
+ start, opt[k].name, _signString(result), _signString(refResult),
+ U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
+ }
+
+ // test UnicodeString::caseCompare - same internal implementation function
+ if(opt[k].options&U_COMPARE_IGNORE_CASE) {
+ errorCode=U_ZERO_ERROR;
+ result=s1.caseCompare(s2, opt[k].options);
+ refResult=ref_case_compare(s1, s2, opt[k].options);
+ if(_sign(result)!=_sign(refResult)) {
+ errln("UniStr::caseCompare(U+%04x with its NFD, %s)%s should be %s %s",
+ start, opt[k].name, _signString(result), _signString(refResult),
+ U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
+ }
+ }
+ }
+
+ ++start;
+ }
+ }
+}
+
+// verify that case-folding does not un-FCD strings
+int32_t
+BasicNormalizerTest::countFoldFCDExceptions(uint32_t foldingOptions) {
+ UnicodeString s, fold, d;
+ UChar32 c;
+ int32_t count;
+ uint8_t cc, trailCC, foldCC, foldTrailCC;
+ UNormalizationCheckResult qcResult;
+ int8_t category;
+ UBool isNFD;
+ UErrorCode errorCode;
+
+ logln("Test if case folding may un-FCD a string (folding options %04lx)", foldingOptions);
+
+ count=0;
+ for(c=0; c<=0x10ffff; ++c) {
+ errorCode = U_ZERO_ERROR;
+ category=u_charType(c);
+ if(category==U_UNASSIGNED) {
+ continue; // skip unassigned code points
+ }
+ if(c==0xac00) {
+ c=0xd7a3; // skip Hangul - no case folding there
+ continue;
+ }
+ // skip Han blocks - no case folding there either
+ if(c==0x3400) {
+ c=0x4db5;
+ continue;
+ }
+ if(c==0x4e00) {
+ c=0x9fa5;
+ continue;
+ }
+ if(c==0x20000) {
+ c=0x2a6d6;
+ continue;
+ }
+
+ s.setTo(c);
+
+ // get leading and trailing cc for c
+ Normalizer::decompose(s, FALSE, 0, d, errorCode);
+ isNFD= s==d;
+ cc=u_getCombiningClass(d.char32At(0));
+ trailCC=u_getCombiningClass(d.char32At(d.length()-1));
+
+ // get leading and trailing cc for the case-folding of c
+ s.foldCase(foldingOptions);
+ Normalizer::decompose(s, FALSE, 0, d, errorCode);
+ foldCC=u_getCombiningClass(d.char32At(0));
+ foldTrailCC=u_getCombiningClass(d.char32At(d.length()-1));
+
+ qcResult=Normalizer::quickCheck(s, UNORM_FCD, errorCode);
+
+ if (U_FAILURE(errorCode)) {
+ ++count;
+ errln("U+%04lx: Failed with error %s", u_errorName(errorCode));
+ }
+
+ // bad:
+ // - character maps to empty string: adjacent characters may then need reordering
+ // - folding has different leading/trailing cc's, and they don't become just 0
+ // - folding itself is not FCD
+ if( qcResult!=UNORM_YES ||
+ s.isEmpty() ||
+ (cc!=foldCC && foldCC!=0) || (trailCC!=foldTrailCC && foldTrailCC!=0)
+ ) {
+ ++count;
+ errln("U+%04lx: case-folding may un-FCD a string (folding options %04lx)", c, foldingOptions);
+ errln(" cc %02x trailCC %02x foldCC(U+%04lx) %02x foldTrailCC(U+%04lx) %02x quickCheck(folded)=%d", cc, trailCC, d.char32At(0), foldCC, d.char32At(d.length()-1), foldTrailCC, qcResult);
+ continue;
+ }
+
+ // also bad:
+ // if a code point is in NFD but its case folding is not, then
+ // unorm_compare will also fail
+ if(isNFD && UNORM_YES!=Normalizer::quickCheck(s, UNORM_NFD, errorCode)) {
+ ++count;
+ errln("U+%04lx: case-folding un-NFDs this character (folding options %04lx)", c, foldingOptions);
+ }
+ }
+
+ logln("There are %ld code points for which case-folding may un-FCD a string (folding options %04lx)", count, foldingOptions);
+ return count;
+}
+
+void
+BasicNormalizerTest::FindFoldFCDExceptions() {
+ int32_t count;
+
+ count=countFoldFCDExceptions(0);
+ count+=countFoldFCDExceptions(U_FOLD_CASE_EXCLUDE_SPECIAL_I);
+ if(count>0) {
+ /*
+ * If case-folding un-FCDs any strings, then unorm_compare() must be
+ * re-implemented.
+ * It currently assumes that one can check for FCD then case-fold
+ * and then still have FCD strings for raw decomposition without reordering.
+ */
+ errln("error: There are %ld code points for which case-folding may un-FCD a string for all folding options.\n"
+ "See comment in BasicNormalizerTest::FindFoldFCDExceptions()!", count);
+ }
+}
+
+/*
+ * Hardcoded "NF* Skippable" sets, generated from
+ * Mark Davis' com.ibm.text.UCD.NFSkippable (see ICU4J CVS, module unicodetools).
+ * Run com.ibm.text.UCD.Main with the option NFSkippable.
+ *
+ * Must be updated for each Unicode version.
+ */
+static void
+initExpectedSkippables(UnicodeSet skipSets[UNORM_MODE_COUNT]) {
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ skipSets[UNORM_NFD].applyPattern(UnicodeString(
+ "[^\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD"
+ "\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD"
+ "\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137"
+ "\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165"
+ "\\u0168-\\u017E\\u01A0\\u01A1\\u01AF\\u01B0\\u01CD-\\u01DC"
+ "\\u01DE-\\u01E3\\u01E6-\\u01F0\\u01F4\\u01F5\\u01F8-\\u021B"
+ "\\u021E\\u021F\\u0226-\\u0233\\u0300-\\u034E\\u0350-\\u036F"
+ "\\u0374\\u037E\\u0385-\\u038A\\u038C\\u038E-\\u0390\\u03AA-"
+ "\\u03B0\\u03CA-\\u03CE\\u03D3\\u03D4\\u0400\\u0401\\u0403\\u0407"
+ "\\u040C-\\u040E\\u0419\\u0439\\u0450\\u0451\\u0453\\u0457\\u045C"
+ "-\\u045E\\u0476\\u0477\\u0483-\\u0486\\u04C1\\u04C2\\u04D0-"
+ "\\u04D3\\u04D6\\u04D7\\u04DA-\\u04DF\\u04E2-\\u04E7\\u04EA-"
+ "\\u04F5\\u04F8\\u04F9\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4"
+ "\\u05C5\\u05C7\\u0610-\\u0615\\u0622-\\u0626\\u064B-\\u065E"
+ "\\u0670\\u06C0\\u06C2\\u06D3\\u06D6-\\u06DC\\u06DF-\\u06E4"
+ "\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07EB-"
+ "\\u07F3\\u0929\\u0931\\u0934\\u093C\\u094D\\u0951-\\u0954\\u0958"
+ "-\\u095F\\u09BC\\u09CB-\\u09CD\\u09DC\\u09DD\\u09DF\\u0A33"
+ "\\u0A36\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C"
+ "\\u0B48\\u0B4B-\\u0B4D\\u0B5C\\u0B5D\\u0B94\\u0BCA-\\u0BCD"
+ "\\u0C48\\u0C4D\\u0C55\\u0C56\\u0CBC\\u0CC0\\u0CC7\\u0CC8\\u0CCA"
+ "\\u0CCB\\u0CCD\\u0D4A-\\u0D4D\\u0DCA\\u0DDA\\u0DDC-\\u0DDE"
+ "\\u0E38-\\u0E3A\\u0E48-\\u0E4B\\u0EB8\\u0EB9\\u0EC8-\\u0ECB"
+ "\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D\\u0F52\\u0F57"
+ "\\u0F5C\\u0F69\\u0F71-\\u0F76\\u0F78\\u0F7A-\\u0F7D\\u0F80-"
+ "\\u0F84\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9"
+ "\\u0FC6\\u1026\\u1037\\u1039\\u135F\\u1714\\u1734\\u17D2\\u17DD"
+ "\\u18A9\\u1939-\\u193B\\u1A17\\u1A18\\u1B06\\u1B08\\u1B0A\\u1B0C"
+ "\\u1B0E\\u1B12\\u1B34\\u1B3B\\u1B3D\\u1B40\\u1B41\\u1B43\\u1B44"
+ "\\u1B6B-\\u1B73\\u1DC0-\\u1DCA\\u1DFE-\\u1E99\\u1E9B\\u1EA0-"
+ "\\u1EF9\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-"
+ "\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D"
+ "\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC1-\\u1FC4\\u1FC6-"
+ "\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-"
+ "\\u1FFD\\u2000\\u2001\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EF"
+ "\\u2126\\u212A\\u212B\\u219A\\u219B\\u21AE\\u21CD-\\u21CF\\u2204"
+ "\\u2209\\u220C\\u2224\\u2226\\u2241\\u2244\\u2247\\u2249\\u2260"
+ "\\u2262\\u226D-\\u2271\\u2274\\u2275\\u2278\\u2279\\u2280\\u2281"
+ "\\u2284\\u2285\\u2288\\u2289\\u22AC-\\u22AF\\u22E0-\\u22E3"
+ "\\u22EA-\\u22ED\\u2329\\u232A\\u2ADC\\u302A-\\u302F\\u304C"
+ "\\u304E\\u3050\\u3052\\u3054\\u3056\\u3058\\u305A\\u305C\\u305E"
+ "\\u3060\\u3062\\u3065\\u3067\\u3069\\u3070\\u3071\\u3073\\u3074"
+ "\\u3076\\u3077\\u3079\\u307A\\u307C\\u307D\\u3094\\u3099\\u309A"
+ "\\u309E\\u30AC\\u30AE\\u30B0\\u30B2\\u30B4\\u30B6\\u30B8\\u30BA"
+ "\\u30BC\\u30BE\\u30C0\\u30C2\\u30C5\\u30C7\\u30C9\\u30D0\\u30D1"
+ "\\u30D3\\u30D4\\u30D6\\u30D7\\u30D9\\u30DA\\u30DC\\u30DD\\u30F4"
+ "\\u30F7-\\u30FA\\u30FE\\uA806\\uAC00-\\uD7A3\\uF900-\\uFA0D"
+ "\\uFA10\\uFA12\\uFA15-\\uFA1E\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A"
+ "-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB1D-\\uFB1F\\uFB2A-"
+ "\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46"
+ "-\\uFB4E\\uFE20-\\uFE23\\U00010A0D\\U00010A0F\\U00010A38-\\U0001"
+ "0A3A\\U00010A3F\\U0001D15E-\\U0001D169\\U0001D16D-\\U0001D172"
+ "\\U0001D17B-\\U0001D182\\U0001D185-\\U0001D18B\\U0001D1AA-"
+ "\\U0001D1AD\\U0001D1BB-\\U0001D1C0\\U0001D242-\\U0001D244\\U0002"
+ "F800-\\U0002FA1D]"
+ , ""), errorCode);
+
+ skipSets[UNORM_NFC].applyPattern(UnicodeString(
+ "[^<->A-PR-Za-pr-z\\u00A8\\u00C0-\\u00CF\\u00D1-\\u00D6\\u00D8-"
+ "\\u00DD\\u00E0-\\u00EF\\u00F1-\\u00F6\\u00F8-\\u00FD\\u00FF-"
+ "\\u0103\\u0106-\\u010F\\u0112-\\u0117\\u011A-\\u0121\\u0124"
+ "\\u0125\\u0128-\\u012D\\u0130\\u0139\\u013A\\u013D\\u013E\\u0143"
+ "\\u0144\\u0147\\u0148\\u014C-\\u0151\\u0154\\u0155\\u0158-"
+ "\\u015D\\u0160\\u0161\\u0164\\u0165\\u0168-\\u0171\\u0174-"
+ "\\u017F\\u01A0\\u01A1\\u01AF\\u01B0\\u01B7\\u01CD-\\u01DC\\u01DE"
+ "-\\u01E1\\u01E6-\\u01EB\\u01F4\\u01F5\\u01F8-\\u01FB\\u0200-"
+ "\\u021B\\u021E\\u021F\\u0226-\\u0233\\u0292\\u0300-\\u034E"
+ "\\u0350-\\u036F\\u0374\\u037E\\u0387\\u0391\\u0395\\u0397\\u0399"
+ "\\u039F\\u03A1\\u03A5\\u03A9\\u03AC\\u03AE\\u03B1\\u03B5\\u03B7"
+ "\\u03B9\\u03BF\\u03C1\\u03C5\\u03C9-\\u03CB\\u03CE\\u03D2\\u0406"
+ "\\u0410\\u0413\\u0415-\\u0418\\u041A\\u041E\\u0423\\u0427\\u042B"
+ "\\u042D\\u0430\\u0433\\u0435-\\u0438\\u043A\\u043E\\u0443\\u0447"
+ "\\u044B\\u044D\\u0456\\u0474\\u0475\\u0483-\\u0486\\u04D8\\u04D9"
+ "\\u04E8\\u04E9\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5"
+ "\\u05C7\\u0610-\\u0615\\u0622\\u0623\\u0627\\u0648\\u064A-"
+ "\\u065E\\u0670\\u06C1\\u06D2\\u06D5-\\u06DC\\u06DF-\\u06E4"
+ "\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07EB-"
+ "\\u07F3\\u0928\\u0930\\u0933\\u093C\\u094D\\u0951-\\u0954\\u0958"
+ "-\\u095F\\u09BC\\u09BE\\u09C7\\u09CD\\u09D7\\u09DC\\u09DD\\u09DF"
+ "\\u0A33\\u0A36\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD"
+ "\\u0B3C\\u0B3E\\u0B47\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B92"
+ "\\u0BBE\\u0BC6\\u0BC7\\u0BCD\\u0BD7\\u0C46\\u0C4D\\u0C55\\u0C56"
+ "\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCA\\u0CCD\\u0CD5\\u0CD6\\u0D3E"
+ "\\u0D46\\u0D47\\u0D4D\\u0D57\\u0DCA\\u0DCF\\u0DD9\\u0DDC\\u0DDF"
+ "\\u0E38-\\u0E3A\\u0E48-\\u0E4B\\u0EB8\\u0EB9\\u0EC8-\\u0ECB"
+ "\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D\\u0F52\\u0F57"
+ "\\u0F5C\\u0F69\\u0F71-\\u0F76\\u0F78\\u0F7A-\\u0F7D\\u0F80-"
+ "\\u0F84\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9"
+ "\\u0FC6\\u1025\\u102E\\u1037\\u1039\\u1100-\\u1112\\u1161-"
+ "\\u1175\\u11A8-\\u11C2\\u135F\\u1714\\u1734\\u17D2\\u17DD\\u18A9"
+ "\\u1939-\\u193B\\u1A17\\u1A18\\u1B05\\u1B07\\u1B09\\u1B0B\\u1B0D"
+ "\\u1B11\\u1B34\\u1B35\\u1B3A\\u1B3C\\u1B3E\\u1B3F\\u1B42\\u1B44"
+ "\\u1B6B-\\u1B73\\u1DC0-\\u1DCA\\u1DFE-\\u1E03\\u1E0A-\\u1E0F"
+ "\\u1E12-\\u1E1B\\u1E20-\\u1E27\\u1E2A-\\u1E41\\u1E44-\\u1E53"
+ "\\u1E58-\\u1E7D\\u1E80-\\u1E87\\u1E8E-\\u1E91\\u1E96-\\u1E99"
+ "\\u1EA0-\\u1EF3\\u1EF6-\\u1EF9\\u1F00-\\u1F11\\u1F18\\u1F19"
+ "\\u1F20-\\u1F31\\u1F38\\u1F39\\u1F40\\u1F41\\u1F48\\u1F49\\u1F50"
+ "\\u1F51\\u1F59\\u1F60-\\u1F71\\u1F73-\\u1F75\\u1F77\\u1F79"
+ "\\u1F7B-\\u1F7D\\u1F80\\u1F81\\u1F88\\u1F89\\u1F90\\u1F91\\u1F98"
+ "\\u1F99\\u1FA0\\u1FA1\\u1FA8\\u1FA9\\u1FB3\\u1FB6\\u1FBB\\u1FBC"
+ "\\u1FBE\\u1FBF\\u1FC3\\u1FC6\\u1FC9\\u1FCB\\u1FCC\\u1FD3\\u1FDB"
+ "\\u1FE3\\u1FEB\\u1FEE\\u1FEF\\u1FF3\\u1FF6\\u1FF9\\u1FFB-\\u1FFE"
+ "\\u2000\\u2001\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EF\\u2126"
+ "\\u212A\\u212B\\u2190\\u2192\\u2194\\u21D0\\u21D2\\u21D4\\u2203"
+ "\\u2208\\u220B\\u2223\\u2225\\u223C\\u2243\\u2245\\u2248\\u224D"
+ "\\u2261\\u2264\\u2265\\u2272\\u2273\\u2276\\u2277\\u227A-\\u227D"
+ "\\u2282\\u2283\\u2286\\u2287\\u2291\\u2292\\u22A2\\u22A8\\u22A9"
+ "\\u22AB\\u22B2-\\u22B5\\u2329\\u232A\\u2ADC\\u302A-\\u302F"
+ "\\u3046\\u304B\\u304D\\u304F\\u3051\\u3053\\u3055\\u3057\\u3059"
+ "\\u305B\\u305D\\u305F\\u3061\\u3064\\u3066\\u3068\\u306F\\u3072"
+ "\\u3075\\u3078\\u307B\\u3099\\u309A\\u309D\\u30A6\\u30AB\\u30AD"
+ "\\u30AF\\u30B1\\u30B3\\u30B5\\u30B7\\u30B9\\u30BB\\u30BD\\u30BF"
+ "\\u30C1\\u30C4\\u30C6\\u30C8\\u30CF\\u30D2\\u30D5\\u30D8\\u30DB"
+ "\\u30EF-\\u30F2\\u30FD\\uA806\\uAC00\\uAC1C\\uAC38\\uAC54\\uAC70"
+ "\\uAC8C\\uACA8\\uACC4\\uACE0\\uACFC\\uAD18\\uAD34\\uAD50\\uAD6C"
+ "\\uAD88\\uADA4\\uADC0\\uADDC\\uADF8\\uAE14\\uAE30\\uAE4C\\uAE68"
+ "\\uAE84\\uAEA0\\uAEBC\\uAED8\\uAEF4\\uAF10\\uAF2C\\uAF48\\uAF64"
+ "\\uAF80\\uAF9C\\uAFB8\\uAFD4\\uAFF0\\uB00C\\uB028\\uB044\\uB060"
+ "\\uB07C\\uB098\\uB0B4\\uB0D0\\uB0EC\\uB108\\uB124\\uB140\\uB15C"
+ "\\uB178\\uB194\\uB1B0\\uB1CC\\uB1E8\\uB204\\uB220\\uB23C\\uB258"
+ "\\uB274\\uB290\\uB2AC\\uB2C8\\uB2E4\\uB300\\uB31C\\uB338\\uB354"
+ "\\uB370\\uB38C\\uB3A8\\uB3C4\\uB3E0\\uB3FC\\uB418\\uB434\\uB450"
+ "\\uB46C\\uB488\\uB4A4\\uB4C0\\uB4DC\\uB4F8\\uB514\\uB530\\uB54C"
+ "\\uB568\\uB584\\uB5A0\\uB5BC\\uB5D8\\uB5F4\\uB610\\uB62C\\uB648"
+ "\\uB664\\uB680\\uB69C\\uB6B8\\uB6D4\\uB6F0\\uB70C\\uB728\\uB744"
+ "\\uB760\\uB77C\\uB798\\uB7B4\\uB7D0\\uB7EC\\uB808\\uB824\\uB840"
+ "\\uB85C\\uB878\\uB894\\uB8B0\\uB8CC\\uB8E8\\uB904\\uB920\\uB93C"
+ "\\uB958\\uB974\\uB990\\uB9AC\\uB9C8\\uB9E4\\uBA00\\uBA1C\\uBA38"
+ "\\uBA54\\uBA70\\uBA8C\\uBAA8\\uBAC4\\uBAE0\\uBAFC\\uBB18\\uBB34"
+ "\\uBB50\\uBB6C\\uBB88\\uBBA4\\uBBC0\\uBBDC\\uBBF8\\uBC14\\uBC30"
+ "\\uBC4C\\uBC68\\uBC84\\uBCA0\\uBCBC\\uBCD8\\uBCF4\\uBD10\\uBD2C"
+ "\\uBD48\\uBD64\\uBD80\\uBD9C\\uBDB8\\uBDD4\\uBDF0\\uBE0C\\uBE28"
+ "\\uBE44\\uBE60\\uBE7C\\uBE98\\uBEB4\\uBED0\\uBEEC\\uBF08\\uBF24"
+ "\\uBF40\\uBF5C\\uBF78\\uBF94\\uBFB0\\uBFCC\\uBFE8\\uC004\\uC020"
+ "\\uC03C\\uC058\\uC074\\uC090\\uC0AC\\uC0C8\\uC0E4\\uC100\\uC11C"
+ "\\uC138\\uC154\\uC170\\uC18C\\uC1A8\\uC1C4\\uC1E0\\uC1FC\\uC218"
+ "\\uC234\\uC250\\uC26C\\uC288\\uC2A4\\uC2C0\\uC2DC\\uC2F8\\uC314"
+ "\\uC330\\uC34C\\uC368\\uC384\\uC3A0\\uC3BC\\uC3D8\\uC3F4\\uC410"
+ "\\uC42C\\uC448\\uC464\\uC480\\uC49C\\uC4B8\\uC4D4\\uC4F0\\uC50C"
+ "\\uC528\\uC544\\uC560\\uC57C\\uC598\\uC5B4\\uC5D0\\uC5EC\\uC608"
+ "\\uC624\\uC640\\uC65C\\uC678\\uC694\\uC6B0\\uC6CC\\uC6E8\\uC704"
+ "\\uC720\\uC73C\\uC758\\uC774\\uC790\\uC7AC\\uC7C8\\uC7E4\\uC800"
+ "\\uC81C\\uC838\\uC854\\uC870\\uC88C\\uC8A8\\uC8C4\\uC8E0\\uC8FC"
+ "\\uC918\\uC934\\uC950\\uC96C\\uC988\\uC9A4\\uC9C0\\uC9DC\\uC9F8"
+ "\\uCA14\\uCA30\\uCA4C\\uCA68\\uCA84\\uCAA0\\uCABC\\uCAD8\\uCAF4"
+ "\\uCB10\\uCB2C\\uCB48\\uCB64\\uCB80\\uCB9C\\uCBB8\\uCBD4\\uCBF0"
+ "\\uCC0C\\uCC28\\uCC44\\uCC60\\uCC7C\\uCC98\\uCCB4\\uCCD0\\uCCEC"
+ "\\uCD08\\uCD24\\uCD40\\uCD5C\\uCD78\\uCD94\\uCDB0\\uCDCC\\uCDE8"
+ "\\uCE04\\uCE20\\uCE3C\\uCE58\\uCE74\\uCE90\\uCEAC\\uCEC8\\uCEE4"
+ "\\uCF00\\uCF1C\\uCF38\\uCF54\\uCF70\\uCF8C\\uCFA8\\uCFC4\\uCFE0"
+ "\\uCFFC\\uD018\\uD034\\uD050\\uD06C\\uD088\\uD0A4\\uD0C0\\uD0DC"
+ "\\uD0F8\\uD114\\uD130\\uD14C\\uD168\\uD184\\uD1A0\\uD1BC\\uD1D8"
+ "\\uD1F4\\uD210\\uD22C\\uD248\\uD264\\uD280\\uD29C\\uD2B8\\uD2D4"
+ "\\uD2F0\\uD30C\\uD328\\uD344\\uD360\\uD37C\\uD398\\uD3B4\\uD3D0"
+ "\\uD3EC\\uD408\\uD424\\uD440\\uD45C\\uD478\\uD494\\uD4B0\\uD4CC"
+ "\\uD4E8\\uD504\\uD520\\uD53C\\uD558\\uD574\\uD590\\uD5AC\\uD5C8"
+ "\\uD5E4\\uD600\\uD61C\\uD638\\uD654\\uD670\\uD68C\\uD6A8\\uD6C4"
+ "\\uD6E0\\uD6FC\\uD718\\uD734\\uD750\\uD76C\\uD788\\uF900-\\uFA0D"
+ "\\uFA10\\uFA12\\uFA15-\\uFA1E\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A"
+ "-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB1D-\\uFB1F\\uFB2A-"
+ "\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46"
+ "-\\uFB4E\\uFE20-\\uFE23\\U00010A0D\\U00010A0F\\U00010A38-\\U0001"
+ "0A3A\\U00010A3F\\U0001D15E-\\U0001D169\\U0001D16D-\\U0001D172"
+ "\\U0001D17B-\\U0001D182\\U0001D185-\\U0001D18B\\U0001D1AA-"
+ "\\U0001D1AD\\U0001D1BB-\\U0001D1C0\\U0001D242-\\U0001D244\\U0002"
+ "F800-\\U0002FA1D]"
+ , ""), errorCode);
+
+ skipSets[UNORM_NFKD].applyPattern(UnicodeString(
+ "[^\\u00A0\\u00A8\\u00AA\\u00AF\\u00B2-\\u00B5\\u00B8-\\u00BA"
+ "\\u00BC-\\u00BE\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6"
+ "\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6"
+ "\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130"
+ "\\u0132-\\u0137\\u0139-\\u0140\\u0143-\\u0149\\u014C-\\u0151"
+ "\\u0154-\\u0165\\u0168-\\u017F\\u01A0\\u01A1\\u01AF\\u01B0"
+ "\\u01C4-\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01F5\\u01F8-\\u021B"
+ "\\u021E\\u021F\\u0226-\\u0233\\u02B0-\\u02B8\\u02D8-\\u02DD"
+ "\\u02E0-\\u02E4\\u0300-\\u034E\\u0350-\\u036F\\u0374\\u037A"
+ "\\u037E\\u0384-\\u038A\\u038C\\u038E-\\u0390\\u03AA-\\u03B0"
+ "\\u03CA-\\u03CE\\u03D0-\\u03D6\\u03F0-\\u03F2\\u03F4\\u03F5"
+ "\\u03F9\\u0400\\u0401\\u0403\\u0407\\u040C-\\u040E\\u0419\\u0439"
+ "\\u0450\\u0451\\u0453\\u0457\\u045C-\\u045E\\u0476\\u0477\\u0483"
+ "-\\u0486\\u04C1\\u04C2\\u04D0-\\u04D3\\u04D6\\u04D7\\u04DA-"
+ "\\u04DF\\u04E2-\\u04E7\\u04EA-\\u04F5\\u04F8\\u04F9\\u0587"
+ "\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610"
+ "-\\u0615\\u0622-\\u0626\\u064B-\\u065E\\u0670\\u0675-\\u0678"
+ "\\u06C0\\u06C2\\u06D3\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7"
+ "\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07EB-\\u07F3"
+ "\\u0929\\u0931\\u0934\\u093C\\u094D\\u0951-\\u0954\\u0958-"
+ "\\u095F\\u09BC\\u09CB-\\u09CD\\u09DC\\u09DD\\u09DF\\u0A33\\u0A36"
+ "\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C\\u0B48"
+ "\\u0B4B-\\u0B4D\\u0B5C\\u0B5D\\u0B94\\u0BCA-\\u0BCD\\u0C48"
+ "\\u0C4D\\u0C55\\u0C56\\u0CBC\\u0CC0\\u0CC7\\u0CC8\\u0CCA\\u0CCB"
+ "\\u0CCD\\u0D4A-\\u0D4D\\u0DCA\\u0DDA\\u0DDC-\\u0DDE\\u0E33"
+ "\\u0E38-\\u0E3A\\u0E48-\\u0E4B\\u0EB3\\u0EB8\\u0EB9\\u0EC8-"
+ "\\u0ECB\\u0EDC\\u0EDD\\u0F0C\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39"
+ "\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69\\u0F71-\\u0F7D\\u0F80"
+ "-\\u0F84\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9"
+ "\\u0FC6\\u1026\\u1037\\u1039\\u10FC\\u135F\\u1714\\u1734\\u17D2"
+ "\\u17DD\\u18A9\\u1939-\\u193B\\u1A17\\u1A18\\u1B06\\u1B08\\u1B0A"
+ "\\u1B0C\\u1B0E\\u1B12\\u1B34\\u1B3B\\u1B3D\\u1B40\\u1B41\\u1B43"
+ "\\u1B44\\u1B6B-\\u1B73\\u1D2C-\\u1D2E\\u1D30-\\u1D3A\\u1D3C-"
+ "\\u1D4D\\u1D4F-\\u1D6A\\u1D78\\u1D9B-\\u1DCA\\u1DFE-\\u1E9B"
+ "\\u1EA0-\\u1EF9\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45"
+ "\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-"
+ "\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-"
+ "\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u2000-"
+ "\\u200A\\u2011\\u2017\\u2024-\\u2026\\u202F\\u2033\\u2034\\u2036"
+ "\\u2037\\u203C\\u203E\\u2047-\\u2049\\u2057\\u205F\\u2070\\u2071"
+ "\\u2074-\\u208E\\u2090-\\u2094\\u20A8\\u20D0-\\u20DC\\u20E1"
+ "\\u20E5-\\u20EF\\u2100-\\u2103\\u2105-\\u2107\\u2109-\\u2113"
+ "\\u2115\\u2116\\u2119-\\u211D\\u2120-\\u2122\\u2124\\u2126"
+ "\\u2128\\u212A-\\u212D\\u212F-\\u2131\\u2133-\\u2139\\u213B-"
+ "\\u2140\\u2145-\\u2149\\u2153-\\u217F\\u219A\\u219B\\u21AE"
+ "\\u21CD-\\u21CF\\u2204\\u2209\\u220C\\u2224\\u2226\\u222C\\u222D"
+ "\\u222F\\u2230\\u2241\\u2244\\u2247\\u2249\\u2260\\u2262\\u226D-"
+ "\\u2271\\u2274\\u2275\\u2278\\u2279\\u2280\\u2281\\u2284\\u2285"
+ "\\u2288\\u2289\\u22AC-\\u22AF\\u22E0-\\u22E3\\u22EA-\\u22ED"
+ "\\u2329\\u232A\\u2460-\\u24EA\\u2A0C\\u2A74-\\u2A76\\u2ADC"
+ "\\u2D6F\\u2E9F\\u2EF3\\u2F00-\\u2FD5\\u3000\\u302A-\\u302F"
+ "\\u3036\\u3038-\\u303A\\u304C\\u304E\\u3050\\u3052\\u3054\\u3056"
+ "\\u3058\\u305A\\u305C\\u305E\\u3060\\u3062\\u3065\\u3067\\u3069"
+ "\\u3070\\u3071\\u3073\\u3074\\u3076\\u3077\\u3079\\u307A\\u307C"
+ "\\u307D\\u3094\\u3099-\\u309C\\u309E\\u309F\\u30AC\\u30AE\\u30B0"
+ "\\u30B2\\u30B4\\u30B6\\u30B8\\u30BA\\u30BC\\u30BE\\u30C0\\u30C2"
+ "\\u30C5\\u30C7\\u30C9\\u30D0\\u30D1\\u30D3\\u30D4\\u30D6\\u30D7"
+ "\\u30D9\\u30DA\\u30DC\\u30DD\\u30F4\\u30F7-\\u30FA\\u30FE\\u30FF"
+ "\\u3131-\\u318E\\u3192-\\u319F\\u3200-\\u321E\\u3220-\\u3243"
+ "\\u3250-\\u327E\\u3280-\\u32FE\\u3300-\\u33FF\\uA806\\uAC00-"
+ "\\uD7A3\\uF900-\\uFA0D\\uFA10\\uFA12\\uFA15-\\uFA1E\\uFA20"
+ "\\uFA22\\uFA25\\uFA26\\uFA2A-\\uFA2D\\uFA30-\\uFA6A\\uFA70-"
+ "\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB36\\uFB38-"
+ "\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3"
+ "-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE10-"
+ "\\uFE19\\uFE20-\\uFE23\\uFE30-\\uFE44\\uFE47-\\uFE52\\uFE54-"
+ "\\uFE66\\uFE68-\\uFE6B\\uFE70-\\uFE72\\uFE74\\uFE76-\\uFEFC"
+ "\\uFF01-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7"
+ "\\uFFDA-\\uFFDC\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\U00010A0D\\U00010"
+ "A0F\\U00010A38-\\U00010A3A\\U00010A3F\\U0001D15E-\\U0001D169"
+ "\\U0001D16D-\\U0001D172\\U0001D17B-\\U0001D182\\U0001D185-"
+ "\\U0001D18B\\U0001D1AA-\\U0001D1AD\\U0001D1BB-\\U0001D1C0\\U0001"
+ "D242-\\U0001D244\\U0001D400-\\U0001D454\\U0001D456-\\U0001D49C"
+ "\\U0001D49E\\U0001D49F\\U0001D4A2\\U0001D4A5\\U0001D4A6\\U0001D4"
+ "A9-\\U0001D4AC\\U0001D4AE-\\U0001D4B9\\U0001D4BB\\U0001D4BD-"
+ "\\U0001D4C3\\U0001D4C5-\\U0001D505\\U0001D507-\\U0001D50A\\U0001"
+ "D50D-\\U0001D514\\U0001D516-\\U0001D51C\\U0001D51E-\\U0001D539"
+ "\\U0001D53B-\\U0001D53E\\U0001D540-\\U0001D544\\U0001D546\\U0001"
+ "D54A-\\U0001D550\\U0001D552-\\U0001D6A5\\U0001D6A8-\\U0001D7CB"
+ "\\U0001D7CE-\\U0001D7FF\\U0002F800-\\U0002FA1D]"
+ , ""), errorCode);
+
+ skipSets[UNORM_NFKC].applyPattern(UnicodeString(
+ "[^<->A-PR-Za-pr-z\\u00A0\\u00A8\\u00AA\\u00AF\\u00B2-\\u00B5"
+ "\\u00B8-\\u00BA\\u00BC-\\u00BE\\u00C0-\\u00CF\\u00D1-\\u00D6"
+ "\\u00D8-\\u00DD\\u00E0-\\u00EF\\u00F1-\\u00F6\\u00F8-\\u00FD"
+ "\\u00FF-\\u0103\\u0106-\\u010F\\u0112-\\u0117\\u011A-\\u0121"
+ "\\u0124\\u0125\\u0128-\\u012D\\u0130\\u0132\\u0133\\u0139\\u013A"
+ "\\u013D-\\u0140\\u0143\\u0144\\u0147-\\u0149\\u014C-\\u0151"
+ "\\u0154\\u0155\\u0158-\\u015D\\u0160\\u0161\\u0164\\u0165\\u0168"
+ "-\\u0171\\u0174-\\u017F\\u01A0\\u01A1\\u01AF\\u01B0\\u01B7"
+ "\\u01C4-\\u01DC\\u01DE-\\u01E1\\u01E6-\\u01EB\\u01F1-\\u01F5"
+ "\\u01F8-\\u01FB\\u0200-\\u021B\\u021E\\u021F\\u0226-\\u0233"
+ "\\u0292\\u02B0-\\u02B8\\u02D8-\\u02DD\\u02E0-\\u02E4\\u0300-"
+ "\\u034E\\u0350-\\u036F\\u0374\\u037A\\u037E\\u0384\\u0385\\u0387"
+ "\\u0391\\u0395\\u0397\\u0399\\u039F\\u03A1\\u03A5\\u03A9\\u03AC"
+ "\\u03AE\\u03B1\\u03B5\\u03B7\\u03B9\\u03BF\\u03C1\\u03C5\\u03C9-"
+ "\\u03CB\\u03CE\\u03D0-\\u03D6\\u03F0-\\u03F2\\u03F4\\u03F5"
+ "\\u03F9\\u0406\\u0410\\u0413\\u0415-\\u0418\\u041A\\u041E\\u0423"
+ "\\u0427\\u042B\\u042D\\u0430\\u0433\\u0435-\\u0438\\u043A\\u043E"
+ "\\u0443\\u0447\\u044B\\u044D\\u0456\\u0474\\u0475\\u0483-\\u0486"
+ "\\u04D8\\u04D9\\u04E8\\u04E9\\u0587\\u0591-\\u05BD\\u05BF\\u05C1"
+ "\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u0615\\u0622\\u0623\\u0627"
+ "\\u0648\\u064A-\\u065E\\u0670\\u0675-\\u0678\\u06C1\\u06D2"
+ "\\u06D5-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED"
+ "\\u0711\\u0730-\\u074A\\u07EB-\\u07F3\\u0928\\u0930\\u0933"
+ "\\u093C\\u094D\\u0951-\\u0954\\u0958-\\u095F\\u09BC\\u09BE"
+ "\\u09C7\\u09CD\\u09D7\\u09DC\\u09DD\\u09DF\\u0A33\\u0A36\\u0A3C"
+ "\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C\\u0B3E\\u0B47"
+ "\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B92\\u0BBE\\u0BC6\\u0BC7"
+ "\\u0BCD\\u0BD7\\u0C46\\u0C4D\\u0C55\\u0C56\\u0CBC\\u0CBF\\u0CC2"
+ "\\u0CC6\\u0CCA\\u0CCD\\u0CD5\\u0CD6\\u0D3E\\u0D46\\u0D47\\u0D4D"
+ "\\u0D57\\u0DCA\\u0DCF\\u0DD9\\u0DDC\\u0DDF\\u0E33\\u0E38-\\u0E3A"
+ "\\u0E48-\\u0E4B\\u0EB3\\u0EB8\\u0EB9\\u0EC8-\\u0ECB\\u0EDC"
+ "\\u0EDD\\u0F0C\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D"
+ "\\u0F52\\u0F57\\u0F5C\\u0F69\\u0F71-\\u0F7D\\u0F80-\\u0F84"
+ "\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9\\u0FC6"
+ "\\u1025\\u102E\\u1037\\u1039\\u10FC\\u1100-\\u1112\\u1161-"
+ "\\u1175\\u11A8-\\u11C2\\u135F\\u1714\\u1734\\u17D2\\u17DD\\u18A9"
+ "\\u1939-\\u193B\\u1A17\\u1A18\\u1B05\\u1B07\\u1B09\\u1B0B\\u1B0D"
+ "\\u1B11\\u1B34\\u1B35\\u1B3A\\u1B3C\\u1B3E\\u1B3F\\u1B42\\u1B44"
+ "\\u1B6B-\\u1B73\\u1D2C-\\u1D2E\\u1D30-\\u1D3A\\u1D3C-\\u1D4D"
+ "\\u1D4F-\\u1D6A\\u1D78\\u1D9B-\\u1DCA\\u1DFE-\\u1E03\\u1E0A-"
+ "\\u1E0F\\u1E12-\\u1E1B\\u1E20-\\u1E27\\u1E2A-\\u1E41\\u1E44-"
+ "\\u1E53\\u1E58-\\u1E7D\\u1E80-\\u1E87\\u1E8E-\\u1E91\\u1E96-"
+ "\\u1E9B\\u1EA0-\\u1EF3\\u1EF6-\\u1EF9\\u1F00-\\u1F11\\u1F18"
+ "\\u1F19\\u1F20-\\u1F31\\u1F38\\u1F39\\u1F40\\u1F41\\u1F48\\u1F49"
+ "\\u1F50\\u1F51\\u1F59\\u1F60-\\u1F71\\u1F73-\\u1F75\\u1F77"
+ "\\u1F79\\u1F7B-\\u1F7D\\u1F80\\u1F81\\u1F88\\u1F89\\u1F90\\u1F91"
+ "\\u1F98\\u1F99\\u1FA0\\u1FA1\\u1FA8\\u1FA9\\u1FB3\\u1FB6\\u1FBB-"
+ "\\u1FC1\\u1FC3\\u1FC6\\u1FC9\\u1FCB-\\u1FCF\\u1FD3\\u1FDB\\u1FDD"
+ "-\\u1FDF\\u1FE3\\u1FEB\\u1FED-\\u1FEF\\u1FF3\\u1FF6\\u1FF9"
+ "\\u1FFB-\\u1FFE\\u2000-\\u200A\\u2011\\u2017\\u2024-\\u2026"
+ "\\u202F\\u2033\\u2034\\u2036\\u2037\\u203C\\u203E\\u2047-\\u2049"
+ "\\u2057\\u205F\\u2070\\u2071\\u2074-\\u208E\\u2090-\\u2094"
+ "\\u20A8\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EF\\u2100-\\u2103"
+ "\\u2105-\\u2107\\u2109-\\u2113\\u2115\\u2116\\u2119-\\u211D"
+ "\\u2120-\\u2122\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-"
+ "\\u2131\\u2133-\\u2139\\u213B-\\u2140\\u2145-\\u2149\\u2153-"
+ "\\u217F\\u2190\\u2192\\u2194\\u21D0\\u21D2\\u21D4\\u2203\\u2208"
+ "\\u220B\\u2223\\u2225\\u222C\\u222D\\u222F\\u2230\\u223C\\u2243"
+ "\\u2245\\u2248\\u224D\\u2261\\u2264\\u2265\\u2272\\u2273\\u2276"
+ "\\u2277\\u227A-\\u227D\\u2282\\u2283\\u2286\\u2287\\u2291\\u2292"
+ "\\u22A2\\u22A8\\u22A9\\u22AB\\u22B2-\\u22B5\\u2329\\u232A\\u2460"
+ "-\\u24EA\\u2A0C\\u2A74-\\u2A76\\u2ADC\\u2D6F\\u2E9F\\u2EF3"
+ "\\u2F00-\\u2FD5\\u3000\\u302A-\\u302F\\u3036\\u3038-\\u303A"
+ "\\u3046\\u304B\\u304D\\u304F\\u3051\\u3053\\u3055\\u3057\\u3059"
+ "\\u305B\\u305D\\u305F\\u3061\\u3064\\u3066\\u3068\\u306F\\u3072"
+ "\\u3075\\u3078\\u307B\\u3099-\\u309D\\u309F\\u30A6\\u30AB\\u30AD"
+ "\\u30AF\\u30B1\\u30B3\\u30B5\\u30B7\\u30B9\\u30BB\\u30BD\\u30BF"
+ "\\u30C1\\u30C4\\u30C6\\u30C8\\u30CF\\u30D2\\u30D5\\u30D8\\u30DB"
+ "\\u30EF-\\u30F2\\u30FD\\u30FF\\u3131-\\u318E\\u3192-\\u319F"
+ "\\u3200-\\u321E\\u3220-\\u3243\\u3250-\\u327E\\u3280-\\u32FE"
+ "\\u3300-\\u33FF\\uA806\\uAC00\\uAC1C\\uAC38\\uAC54\\uAC70\\uAC8C"
+ "\\uACA8\\uACC4\\uACE0\\uACFC\\uAD18\\uAD34\\uAD50\\uAD6C\\uAD88"
+ "\\uADA4\\uADC0\\uADDC\\uADF8\\uAE14\\uAE30\\uAE4C\\uAE68\\uAE84"
+ "\\uAEA0\\uAEBC\\uAED8\\uAEF4\\uAF10\\uAF2C\\uAF48\\uAF64\\uAF80"
+ "\\uAF9C\\uAFB8\\uAFD4\\uAFF0\\uB00C\\uB028\\uB044\\uB060\\uB07C"
+ "\\uB098\\uB0B4\\uB0D0\\uB0EC\\uB108\\uB124\\uB140\\uB15C\\uB178"
+ "\\uB194\\uB1B0\\uB1CC\\uB1E8\\uB204\\uB220\\uB23C\\uB258\\uB274"
+ "\\uB290\\uB2AC\\uB2C8\\uB2E4\\uB300\\uB31C\\uB338\\uB354\\uB370"
+ "\\uB38C\\uB3A8\\uB3C4\\uB3E0\\uB3FC\\uB418\\uB434\\uB450\\uB46C"
+ "\\uB488\\uB4A4\\uB4C0\\uB4DC\\uB4F8\\uB514\\uB530\\uB54C\\uB568"
+ "\\uB584\\uB5A0\\uB5BC\\uB5D8\\uB5F4\\uB610\\uB62C\\uB648\\uB664"
+ "\\uB680\\uB69C\\uB6B8\\uB6D4\\uB6F0\\uB70C\\uB728\\uB744\\uB760"
+ "\\uB77C\\uB798\\uB7B4\\uB7D0\\uB7EC\\uB808\\uB824\\uB840\\uB85C"
+ "\\uB878\\uB894\\uB8B0\\uB8CC\\uB8E8\\uB904\\uB920\\uB93C\\uB958"
+ "\\uB974\\uB990\\uB9AC\\uB9C8\\uB9E4\\uBA00\\uBA1C\\uBA38\\uBA54"
+ "\\uBA70\\uBA8C\\uBAA8\\uBAC4\\uBAE0\\uBAFC\\uBB18\\uBB34\\uBB50"
+ "\\uBB6C\\uBB88\\uBBA4\\uBBC0\\uBBDC\\uBBF8\\uBC14\\uBC30\\uBC4C"
+ "\\uBC68\\uBC84\\uBCA0\\uBCBC\\uBCD8\\uBCF4\\uBD10\\uBD2C\\uBD48"
+ "\\uBD64\\uBD80\\uBD9C\\uBDB8\\uBDD4\\uBDF0\\uBE0C\\uBE28\\uBE44"
+ "\\uBE60\\uBE7C\\uBE98\\uBEB4\\uBED0\\uBEEC\\uBF08\\uBF24\\uBF40"
+ "\\uBF5C\\uBF78\\uBF94\\uBFB0\\uBFCC\\uBFE8\\uC004\\uC020\\uC03C"
+ "\\uC058\\uC074\\uC090\\uC0AC\\uC0C8\\uC0E4\\uC100\\uC11C\\uC138"
+ "\\uC154\\uC170\\uC18C\\uC1A8\\uC1C4\\uC1E0\\uC1FC\\uC218\\uC234"
+ "\\uC250\\uC26C\\uC288\\uC2A4\\uC2C0\\uC2DC\\uC2F8\\uC314\\uC330"
+ "\\uC34C\\uC368\\uC384\\uC3A0\\uC3BC\\uC3D8\\uC3F4\\uC410\\uC42C"
+ "\\uC448\\uC464\\uC480\\uC49C\\uC4B8\\uC4D4\\uC4F0\\uC50C\\uC528"
+ "\\uC544\\uC560\\uC57C\\uC598\\uC5B4\\uC5D0\\uC5EC\\uC608\\uC624"
+ "\\uC640\\uC65C\\uC678\\uC694\\uC6B0\\uC6CC\\uC6E8\\uC704\\uC720"
+ "\\uC73C\\uC758\\uC774\\uC790\\uC7AC\\uC7C8\\uC7E4\\uC800\\uC81C"
+ "\\uC838\\uC854\\uC870\\uC88C\\uC8A8\\uC8C4\\uC8E0\\uC8FC\\uC918"
+ "\\uC934\\uC950\\uC96C\\uC988\\uC9A4\\uC9C0\\uC9DC\\uC9F8\\uCA14"
+ "\\uCA30\\uCA4C\\uCA68\\uCA84\\uCAA0\\uCABC\\uCAD8\\uCAF4\\uCB10"
+ "\\uCB2C\\uCB48\\uCB64\\uCB80\\uCB9C\\uCBB8\\uCBD4\\uCBF0\\uCC0C"
+ "\\uCC28\\uCC44\\uCC60\\uCC7C\\uCC98\\uCCB4\\uCCD0\\uCCEC\\uCD08"
+ "\\uCD24\\uCD40\\uCD5C\\uCD78\\uCD94\\uCDB0\\uCDCC\\uCDE8\\uCE04"
+ "\\uCE20\\uCE3C\\uCE58\\uCE74\\uCE90\\uCEAC\\uCEC8\\uCEE4\\uCF00"
+ "\\uCF1C\\uCF38\\uCF54\\uCF70\\uCF8C\\uCFA8\\uCFC4\\uCFE0\\uCFFC"
+ "\\uD018\\uD034\\uD050\\uD06C\\uD088\\uD0A4\\uD0C0\\uD0DC\\uD0F8"
+ "\\uD114\\uD130\\uD14C\\uD168\\uD184\\uD1A0\\uD1BC\\uD1D8\\uD1F4"
+ "\\uD210\\uD22C\\uD248\\uD264\\uD280\\uD29C\\uD2B8\\uD2D4\\uD2F0"
+ "\\uD30C\\uD328\\uD344\\uD360\\uD37C\\uD398\\uD3B4\\uD3D0\\uD3EC"
+ "\\uD408\\uD424\\uD440\\uD45C\\uD478\\uD494\\uD4B0\\uD4CC\\uD4E8"
+ "\\uD504\\uD520\\uD53C\\uD558\\uD574\\uD590\\uD5AC\\uD5C8\\uD5E4"
+ "\\uD600\\uD61C\\uD638\\uD654\\uD670\\uD68C\\uD6A8\\uD6C4\\uD6E0"
+ "\\uD6FC\\uD718\\uD734\\uD750\\uD76C\\uD788\\uF900-\\uFA0D\\uFA10"
+ "\\uFA12\\uFA15-\\uFA1E\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A-"
+ "\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-"
+ "\\uFB17\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41"
+ "\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F"
+ "\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE10-\\uFE19\\uFE20-\\uFE23"
+ "\\uFE30-\\uFE44\\uFE47-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B"
+ "\\uFE70-\\uFE72\\uFE74\\uFE76-\\uFEFC\\uFF01-\\uFFBE\\uFFC2-"
+ "\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\uFFE0-"
+ "\\uFFE6\\uFFE8-\\uFFEE\\U00010A0D\\U00010A0F\\U00010A38-\\U00010"
+ "A3A\\U00010A3F\\U0001D15E-\\U0001D169\\U0001D16D-\\U0001D172"
+ "\\U0001D17B-\\U0001D182\\U0001D185-\\U0001D18B\\U0001D1AA-"
+ "\\U0001D1AD\\U0001D1BB-\\U0001D1C0\\U0001D242-\\U0001D244\\U0001"
+ "D400-\\U0001D454\\U0001D456-\\U0001D49C\\U0001D49E\\U0001D49F"
+ "\\U0001D4A2\\U0001D4A5\\U0001D4A6\\U0001D4A9-\\U0001D4AC\\U0001D"
+ "4AE-\\U0001D4B9\\U0001D4BB\\U0001D4BD-\\U0001D4C3\\U0001D4C5-"
+ "\\U0001D505\\U0001D507-\\U0001D50A\\U0001D50D-\\U0001D514\\U0001"
+ "D516-\\U0001D51C\\U0001D51E-\\U0001D539\\U0001D53B-\\U0001D53E"
+ "\\U0001D540-\\U0001D544\\U0001D546\\U0001D54A-\\U0001D550\\U0001"
+ "D552-\\U0001D6A5\\U0001D6A8-\\U0001D7CB\\U0001D7CE-\\U0001D7FF"
+ "\\U0002F800-\\U0002FA1D]"
+ , ""), errorCode);
+}
+
+U_CDECL_BEGIN
+
+// USetAdder implementation
+// Does not use uset.h to reduce code dependencies
+static void U_CALLCONV
+_set_add(USet *set, UChar32 c) {
+ uset_add(set, c);
+}
+
+static void U_CALLCONV
+_set_addRange(USet *set, UChar32 start, UChar32 end) {
+ uset_addRange(set, start, end);
+}
+
+static void U_CALLCONV
+_set_addString(USet *set, const UChar *str, int32_t length) {
+ uset_addString(set, str, length);
+}
+
+U_CDECL_END
+
+void
+BasicNormalizerTest::TestSkippable() {
+ UnicodeSet starts, diff, skipSets[UNORM_MODE_COUNT], expectSets[UNORM_MODE_COUNT];
+ UnicodeSet *startsPtr = &starts;
+ UnicodeString s, pattern;
+ UChar32 start, limit, rangeStart, rangeEnd;
+ int32_t i, range, count;
+
+ UErrorCode status;
+
+ /* build NF*Skippable sets from runtime data */
+ status=U_ZERO_ERROR;
+ USetAdder sa = {
+ (USet *)startsPtr,
+ _set_add,
+ _set_addRange,
+ _set_addString,
+ NULL // don't need remove()
+ };
+ unorm_addPropertyStarts(&sa, &status);
+ if(U_FAILURE(status)) {
+ errln("unable to load normalization data for unorm_addPropertyStarts(() - %s\n", u_errorName(status));
+ return;
+ }
+ count=starts.getRangeCount();
+
+ start=limit=0;
+ rangeStart=rangeEnd=0;
+ range=0;
+ for(;;) {
+ if(start<limit) {
+ /* get properties for start and apply them to [start..limit[ */
+ if(unorm_isNFSkippable(start, UNORM_NFD)) {
+ skipSets[UNORM_NFD].add(start, limit-1);
+ }
+ if(unorm_isNFSkippable(start, UNORM_NFKD)) {
+ skipSets[UNORM_NFKD].add(start, limit-1);
+ }
+ if(unorm_isNFSkippable(start, UNORM_NFC)) {
+ skipSets[UNORM_NFC].add(start, limit-1);
+ }
+ if(unorm_isNFSkippable(start, UNORM_NFKC)) {
+ skipSets[UNORM_NFKC].add(start, limit-1);
+ }
+ }
+
+ /* go to next range of same properties */
+ start=limit;
+ if(++limit>rangeEnd) {
+ if(range<count) {
+ limit=rangeStart=starts.getRangeStart(range);
+ rangeEnd=starts.getRangeEnd(range);
+ ++range;
+ } else if(range==count) {
+ /* additional range to complete the Unicode code space */
+ limit=rangeStart=rangeEnd=0x110000;
+ ++range;
+ } else {
+ break;
+ }
+ }
+ }
+
+ /* get expected sets from hardcoded patterns */
+ initExpectedSkippables(expectSets);
+
+ for(i=UNORM_NONE; i<UNORM_MODE_COUNT; ++i) {
+ if(skipSets[i]!=expectSets[i]) {
+ errln("error: TestSkippable skipSets[%d]!=expectedSets[%d]\n"
+ "may need to update hardcoded UnicodeSet patterns in\n"
+ "tstnorm.cpp/initExpectedSkippables(),\n"
+ "see ICU4J - unicodetools.com.ibm.text.UCD.NFSkippable\n",
+ i, i);
+
+ s=UNICODE_STRING_SIMPLE("skip-expect=");
+ (diff=skipSets[i]).removeAll(expectSets[i]).toPattern(pattern, TRUE);
+ s.append(pattern);
+
+ pattern.remove();
+ s.append(UNICODE_STRING_SIMPLE("\n\nexpect-skip="));
+ (diff=expectSets[i]).removeAll(skipSets[i]).toPattern(pattern, TRUE);
+ s.append(pattern);
+ s.append(UNICODE_STRING_SIMPLE("\n\n"));
+
+ errln(s);
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.h b/Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.h
new file mode 100644
index 00000000000..b77efd6bf2a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tstnorm.h
@@ -0,0 +1,84 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * Normalizer basic tests
+ */
+
+#ifndef _TSTNORM
+#define _TSTNORM
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#include "unicode/normlzr.h"
+#include "intltest.h"
+
+class BasicNormalizerTest : public IntlTest {
+public:
+ BasicNormalizerTest();
+ virtual ~BasicNormalizerTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ void TestHangulCompose(void);
+ void TestHangulDecomp(void);
+ void TestPrevious(void);
+ void TestDecomp(void);
+ void TestCompatDecomp(void);
+ void TestCanonCompose(void);
+ void TestCompatCompose(void);
+ void TestTibetan(void);
+ void TestCompositionExclusion(void);
+ void TestZeroIndex(void);
+ void TestVerisign(void);
+ void TestPreviousNext(void);
+ void TestNormalizerAPI(void);
+ void TestConcatenate(void);
+ void TestCompare(void);
+ void FindFoldFCDExceptions();
+ void TestSkippable();
+
+private:
+ UnicodeString canonTests[24][3];
+ UnicodeString compatTests[11][3];
+ UnicodeString hangulCanon[2][3];
+
+ void
+ TestPreviousNext(const UChar *src, int32_t srcLength,
+ const UChar32 *expext, int32_t expectLength,
+ const int32_t *expectIndex, // its length=expectLength+1
+ int32_t srcMiddle, int32_t expectMiddle,
+ const char *moves,
+ UNormalizationMode mode,
+ const char *name);
+
+ int32_t countFoldFCDExceptions(uint32_t foldingOptions);
+
+ //------------------------------------------------------------------------
+ // Internal utilities
+ //
+ void backAndForth(Normalizer* iter, const UnicodeString& input);
+
+ void staticTest(UNormalizationMode mode, int options,
+ UnicodeString tests[][3], int length, int outCol);
+
+ void iterateTest(Normalizer* iter, UnicodeString tests[][3], int length, int outCol);
+
+ void assertEqual(const UnicodeString& input,
+ const UnicodeString& expected,
+ Normalizer* result,
+ const UnicodeString& errPrefix);
+
+ static UnicodeString hex(UChar ch);
+ static UnicodeString hex(const UnicodeString& str);
+
+};
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
+#endif // _TSTNORM
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tstnrapi.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tstnrapi.cpp
new file mode 100644
index 00000000000..6499fefe2d0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tstnrapi.cpp
@@ -0,0 +1,187 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/normlzr.h"
+#include "unicode/uniset.h"
+#include "unicode/usetiter.h"
+#include "unicode/schriter.h"
+#include "unormimp.h"
+#include "tstnorm.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+static UErrorCode status = U_ZERO_ERROR;
+
+// test APIs that are not otherwise used - improve test coverage
+void
+BasicNormalizerTest::TestNormalizerAPI() {
+ // instantiate a Normalizer from a CharacterIterator
+ UnicodeString s=UnicodeString("a\\u0308\\uac00\\U0002f800", "").unescape();
+ s.append(s); // make s a bit longer and more interesting
+ StringCharacterIterator iter(s);
+ Normalizer norm(iter, UNORM_NFC);
+ if(norm.next()!=0xe4) {
+ errln("error in Normalizer(CharacterIterator).next()");
+ }
+
+ // test copy constructor
+ Normalizer copy(norm);
+ if(copy.next()!=0xac00) {
+ errln("error in Normalizer(Normalizer(CharacterIterator)).next()");
+ }
+
+ // test clone(), ==, and hashCode()
+ Normalizer *clone=copy.clone();
+ if(*clone!=copy) {
+ errln("error in Normalizer(Normalizer(CharacterIterator)).clone()!=copy");
+ }
+ // clone must have the same hashCode()
+ if(clone->hashCode()!=copy.hashCode()) {
+ errln("error in Normalizer(Normalizer(CharacterIterator)).clone()->hashCode()!=copy.hashCode()");
+ }
+ if(clone->next()!=0x4e3d) {
+ errln("error in Normalizer(Normalizer(CharacterIterator)).clone()->next()");
+ }
+ // position changed, must change hashCode()
+ if(clone->hashCode()==copy.hashCode()) {
+ errln("error in Normalizer(Normalizer(CharacterIterator)).clone()->next().hashCode()==copy.hashCode()");
+ }
+ delete clone;
+ clone=0;
+
+ // test compose() and decompose()
+ UnicodeString tel, nfkc, nfkd;
+ tel=UnicodeString(1, (UChar32)0x2121, 10);
+ tel.insert(1, (UChar)0x301);
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ Normalizer::compose(tel, TRUE, 0, nfkc, errorCode);
+ Normalizer::decompose(tel, TRUE, 0, nfkd, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("error in Normalizer::(de)compose(): %s", u_errorName(errorCode));
+ } else if(
+ nfkc!=UnicodeString("TE\\u0139TELTELTELTELTELTELTELTELTEL", "").unescape() ||
+ nfkd!=UnicodeString("TEL\\u0301TELTELTELTELTELTELTELTELTEL", "").unescape()
+ ) {
+ errln("error in Normalizer::(de)compose(): wrong result(s)");
+ }
+
+ // test setIndex()
+ norm.setIndexOnly(3);
+ if(norm.current()!=0x4e3d) {
+ errln("error in Normalizer(CharacterIterator).setIndex(3)");
+ }
+
+ // test setText(CharacterIterator) and getText()
+ UnicodeString out, out2;
+ errorCode=U_ZERO_ERROR;
+ copy.setText(iter, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("error Normalizer::setText() failed: %s", u_errorName(errorCode));
+ } else {
+ copy.getText(out);
+ iter.getText(out2);
+ if( out!=out2 ||
+ copy.startIndex()!=iter.startIndex() ||
+ copy.endIndex()!=iter.endIndex()
+ ) {
+ errln("error in Normalizer::setText() or Normalizer::getText()");
+ }
+ }
+
+ // test setText(UChar *), getUMode() and setMode()
+ errorCode=U_ZERO_ERROR;
+ copy.setText(s.getBuffer()+1, s.length()-1, errorCode);
+ copy.setMode(UNORM_NFD);
+ if(copy.getUMode()!=UNORM_NFD) {
+ errln("error in Normalizer::setMode() or Normalizer::getUMode()");
+ }
+ if(copy.next()!=0x308 || copy.next()!=0x1100) {
+ errln("error in Normalizer::setText(UChar *) or Normalizer::setMode()");
+ }
+
+ // test setText(UChar *, length=-1)
+ errorCode=U_ZERO_ERROR;
+
+ // NUL-terminate s
+ s.append((UChar)0); // append NUL
+ s.truncate(s.length()-1); // undo length change
+
+ copy.setText(s.getBuffer()+1, -1, errorCode);
+ if(copy.endIndex()!=s.length()-1) {
+ errln("error in Normalizer::setText(UChar *, -1)");
+ }
+
+ // test setOption() and getOption()
+ copy.setOption(0xaa0000, TRUE);
+ copy.setOption(0x20000, FALSE);
+ if(!copy.getOption(0x880000) || copy.getOption(0x20000)) {
+ errln("error in Normalizer::setOption() or Normalizer::getOption()");
+ }
+
+ // test last()/previous() with an internal buffer overflow
+ errorCode=U_ZERO_ERROR;
+ copy.setText(UnicodeString(1000, (UChar32)0x308, 1000), errorCode);
+ if(copy.last()!=0x308) {
+ errln("error in Normalizer(1000*U+0308).last()");
+ }
+
+ // test UNORM_NONE
+ norm.setMode(UNORM_NONE);
+ if(norm.first()!=0x61 || norm.next()!=0x308 || norm.last()!=0x2f800) {
+ errln("error in Normalizer(UNORM_NONE).first()/next()/last()");
+ }
+ Normalizer::normalize(s, UNORM_NONE, 0, out, status);
+ if(out!=s) {
+ errln("error in Normalizer::normalize(UNORM_NONE)");
+ }
+
+ // test that the same string can be used as source and destination
+ s.setTo((UChar)0xe4);
+ Normalizer::normalize(s, UNORM_NFD, 0, s, status);
+ if(s.charAt(1)!=0x308) {
+ errln("error in Normalizer::normalize(UNORM_NFD, self)");
+ }
+ Normalizer::normalize(s, UNORM_NFC, 0, s, status);
+ if(s.charAt(0)!=0xe4) {
+ errln("error in Normalizer::normalize(UNORM_NFC, self)");
+ }
+ Normalizer::decompose(s, FALSE, 0, s, status);
+ if(s.charAt(1)!=0x308) {
+ errln("error in Normalizer::decompose(self)");
+ }
+ Normalizer::compose(s, FALSE, 0, s, status);
+ if(s.charAt(0)!=0xe4) {
+ errln("error in Normalizer::compose(self)");
+ }
+ Normalizer::concatenate(s, s, s, UNORM_NFC, 0, status);
+ if(s.charAt(1)!=0xe4) {
+ errln("error in Normalizer::decompose(self)");
+ }
+
+ // test internal normalization exclusion options
+ // s contains a compatibility CJK character and a Hangul syllable
+ s=UnicodeString("a\\uFACE\\uD7A3b", -1, US_INV).unescape();
+ status=U_ZERO_ERROR;
+ Normalizer::decompose(s, FALSE, UNORM_NX_HANGUL, out, status);
+ if(U_FAILURE(status) || out!=UNICODE_STRING_SIMPLE("a\\u9F9C\\uD7A3b").unescape()) {
+ errln("Normalizer::decompose(UNORM_NX_HANGUL) failed - %s", u_errorName(status));
+ }
+ status=U_ZERO_ERROR;
+ Normalizer::decompose(s, FALSE, UNORM_NX_CJK_COMPAT, out, status);
+ if(U_FAILURE(status) || out!=UNICODE_STRING_SIMPLE("a\\uFACE\\u1112\\u1175\\u11c2b").unescape()) {
+ errln("Normalizer::decompose(UNORM_NX_CJK_COMPAT) failed - %s", u_errorName(status));
+ }
+ status=U_ZERO_ERROR;
+ Normalizer::decompose(s, FALSE, UNORM_NX_CJK_COMPAT|UNORM_NX_HANGUL, out, status);
+ if(U_FAILURE(status) || out!=UNICODE_STRING_SIMPLE("a\\uFACE\\uD7A3b").unescape()) {
+ errln("Normalizer::decompose(UNORM_NX_CJK_COMPAT|UNORM_NX_HANGUL) failed - %s", u_errorName(status));
+ }
+}
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.cpp
new file mode 100644
index 00000000000..88e0fab9c7c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.cpp
@@ -0,0 +1,513 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "tzbdtest.h"
+#include "unicode/timezone.h"
+#include "unicode/simpletz.h"
+#include "unicode/gregocal.h"
+#include "putilimp.h"
+
+void TimeZoneBoundaryTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite TestTimeZoneBoundary");
+ switch (index) {
+ case 0:
+ name = "TestBoundaries";
+ if (exec) {
+ logln("TestBoundaries---"); logln("");
+ TestBoundaries();
+ }
+ break;
+ case 1:
+ name = "TestNewRules";
+ if (exec) {
+ logln("TestNewRules---"); logln("");
+ TestNewRules();
+ }
+ break;
+ case 2:
+ name = "TestStepwise";
+ if (exec) {
+ logln("TestStepwise---"); logln("");
+ TestStepwise();
+ }
+ break;
+ default: name = ""; break;
+ }
+}
+
+// *****************************************************************************
+// class TimeZoneBoundaryTest
+// *****************************************************************************
+
+TimeZoneBoundaryTest::TimeZoneBoundaryTest()
+:
+ONE_SECOND(1000),
+ONE_MINUTE(60 * ONE_SECOND),
+ONE_HOUR(60 * ONE_MINUTE),
+ONE_DAY(24 * ONE_HOUR),
+ONE_YEAR(uprv_floor(365.25 * ONE_DAY)),
+SIX_MONTHS(ONE_YEAR / 2)
+{
+}
+
+const int32_t TimeZoneBoundaryTest::MONTH_LENGTH[] = {
+ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+};
+
+const UDate TimeZoneBoundaryTest::PST_1997_BEG = 860320800000.0;
+
+const UDate TimeZoneBoundaryTest::PST_1997_END = 877856400000.0;
+
+const UDate TimeZoneBoundaryTest::INTERVAL = 10;
+
+// -------------------------------------
+
+void
+TimeZoneBoundaryTest::findDaylightBoundaryUsingDate(UDate d, const char* startMode, UDate expectedBoundary)
+{
+ UnicodeString str;
+ if (dateToString(d, str).indexOf(startMode) == - 1) {
+ logln(UnicodeString("Error: ") + startMode + " not present in " + str);
+ }
+ UDate min = d;
+ UDate max = min + SIX_MONTHS;
+ while ((max - min) > INTERVAL) {
+ UDate mid = (min + max) / 2;
+ UnicodeString* s = &dateToString(mid, str);
+ if (s->indexOf(startMode) != - 1) {
+ min = mid;
+ }
+ else {
+ max = mid;
+ }
+ }
+ logln("Date Before: " + showDate(min));
+ logln("Date After: " + showDate(max));
+ UDate mindelta = expectedBoundary - min;
+ UDate maxdelta = max - expectedBoundary;
+ if (mindelta >= 0 &&
+ mindelta <= INTERVAL &&
+ maxdelta >= 0 &&
+ maxdelta <= INTERVAL) logln(UnicodeString("PASS: Expected boundary at ") + expectedBoundary);
+ else errln(UnicodeString("FAIL: Expected boundary at ") + expectedBoundary);
+}
+
+// -------------------------------------
+
+void
+TimeZoneBoundaryTest::findDaylightBoundaryUsingTimeZone(UDate d, UBool startsInDST, UDate expectedBoundary)
+{
+ TimeZone *zone = TimeZone::createDefault();
+ findDaylightBoundaryUsingTimeZone(d, startsInDST, expectedBoundary, zone);
+ delete zone;
+}
+
+// -------------------------------------
+
+void
+TimeZoneBoundaryTest::findDaylightBoundaryUsingTimeZone(UDate d, UBool startsInDST, UDate expectedBoundary, TimeZone* tz)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString str;
+ UDate min = d;
+ UDate max = min + SIX_MONTHS;
+ if (tz->inDaylightTime(d, status) != startsInDST) {
+ errln("FAIL: " + tz->getID(str) + " inDaylightTime(" + dateToString(d) + ") != " + (startsInDST ? "true" : "false"));
+ startsInDST = !startsInDST;
+ }
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ if (tz->inDaylightTime(max, status) == startsInDST) {
+ errln("FAIL: " + tz->getID(str) + " inDaylightTime(" + dateToString(max) + ") != " + (startsInDST ? "false" : "true"));
+ return;
+ }
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ while ((max - min) > INTERVAL) {
+ UDate mid = (min + max) / 2;
+ UBool isIn = tz->inDaylightTime(mid, status);
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ if (isIn == startsInDST) {
+ min = mid;
+ }
+ else {
+ max = mid;
+ }
+ }
+ logln(tz->getID(str) + " Before: " + showDate(min));
+ logln(tz->getID(str) + " After: " + showDate(max));
+ UDate mindelta = expectedBoundary - min;
+ UDate maxdelta = max - expectedBoundary;
+ if (mindelta >= 0 &&
+ mindelta <= INTERVAL &&
+ maxdelta >= 0 &&
+ maxdelta <= INTERVAL) logln(UnicodeString("PASS: Expected boundary at ") + expectedBoundary);
+ else errln(UnicodeString("FAIL: Expected boundary at ") + expectedBoundary);
+}
+
+// -------------------------------------
+/*
+UnicodeString*
+TimeZoneBoundaryTest::showDate(int32_t l)
+{
+ return showDate(new Date(l));
+}
+*/
+// -------------------------------------
+
+UnicodeString
+TimeZoneBoundaryTest::showDate(UDate d)
+{
+ int32_t y, m, day, h, min, sec;
+ dateToFields(d, y, m, day, h, min, sec);
+ return UnicodeString("") + y + "/" + showNN(m + 1) + "/" +
+ showNN(day) + " " + showNN(h) + ":" + showNN(min) +
+ " \"" + dateToString(d) + "\" = " + uprv_floor(d+0.5);
+}
+
+// -------------------------------------
+
+UnicodeString
+TimeZoneBoundaryTest::showNN(int32_t n)
+{
+ UnicodeString nStr;
+ if (n < 10) {
+ nStr += UnicodeString("0", "");
+ }
+ return nStr + n;
+}
+
+// -------------------------------------
+
+void
+TimeZoneBoundaryTest::verifyDST(UDate d, TimeZone* time_zone, UBool expUseDaylightTime, UBool expInDaylightTime, UDate expZoneOffset, UDate expDSTOffset)
+{
+ UnicodeString str;
+ UErrorCode status = U_ZERO_ERROR;
+ logln("-- Verifying time " + dateToString(d) + " in zone " + time_zone->getID(str));
+ if (time_zone->inDaylightTime(d, status) == expInDaylightTime)
+ logln(UnicodeString("PASS: inDaylightTime = ") + (time_zone->inDaylightTime(d, status)?"true":"false"));
+ else
+ errln(UnicodeString("FAIL: inDaylightTime = ") + (time_zone->inDaylightTime(d, status)?"true":"false"));
+ if (failure(status, "TimeZone::inDaylightTime"))
+ return;
+ if (time_zone->useDaylightTime() == expUseDaylightTime)
+ logln(UnicodeString("PASS: useDaylightTime = ") + (time_zone->useDaylightTime()?"true":"false"));
+ else
+ errln(UnicodeString("FAIL: useDaylightTime = ") + (time_zone->useDaylightTime()?"true":"false"));
+ if (time_zone->getRawOffset() == expZoneOffset)
+ logln(UnicodeString("PASS: getRawOffset() = ") + (expZoneOffset / ONE_HOUR));
+ else
+ errln(UnicodeString("FAIL: getRawOffset() = ") + (time_zone->getRawOffset() / ONE_HOUR) + "; expected " + (expZoneOffset / ONE_HOUR));
+
+ GregorianCalendar *gc = new GregorianCalendar(time_zone->clone(), status);
+ gc->setTime(d, status);
+ if (failure(status, "GregorianCalendar::setTime")) return;
+ int32_t offset = time_zone->getOffset((uint8_t)gc->get(UCAL_ERA, status),
+ gc->get(UCAL_YEAR, status), gc->get(UCAL_MONTH, status),
+ gc->get(UCAL_DATE, status), (uint8_t)gc->get(UCAL_DAY_OF_WEEK, status),
+ ((gc->get(UCAL_HOUR_OF_DAY, status) * 60 + gc->get(UCAL_MINUTE, status)) * 60 + gc->get(UCAL_SECOND, status)) * 1000 + gc->get(UCAL_MILLISECOND, status),
+ status);
+ if (failure(status, "GregorianCalendar::get")) return;
+ if (offset == expDSTOffset) logln(UnicodeString("PASS: getOffset() = ") + (offset / ONE_HOUR));
+ else errln(UnicodeString("FAIL: getOffset() = ") + (offset / ONE_HOUR) + "; expected " + (expDSTOffset / ONE_HOUR));
+ delete gc;
+}
+
+// -------------------------------------
+/**
+ * Check that the given year/month/dom/hour maps to and from the
+ * given epochHours. This verifies the functioning of the
+ * calendar and time zone in conjunction with one another,
+ * including the calendar time->fields and fields->time and
+ * the time zone getOffset method.
+ *
+ * @param epochHours hours after Jan 1 1970 0:00 GMT.
+ */
+void TimeZoneBoundaryTest::verifyMapping(Calendar& cal, int year, int month, int dom, int hour,
+ double epochHours) {
+ double H = 3600000.0;
+ UErrorCode status = U_ZERO_ERROR;
+ cal.clear();
+ cal.set(year, month, dom, hour, 0, 0);
+ UDate e = cal.getTime(status)/ H;
+ UDate ed = (epochHours * H);
+ if (e == epochHours) {
+ logln(UnicodeString("Ok: ") + year + "/" + (month+1) + "/" + dom + " " + hour + ":00 => " +
+ e + " (" + ed + ")");
+ } else {
+ errln(UnicodeString("FAIL: ") + year + "/" + (month+1) + "/" + dom + " " + hour + ":00 => " +
+ e + " (" + (e * H) + ")" +
+ ", expected " + epochHours + " (" + ed + ")");
+ }
+ cal.setTime(ed, status);
+ if (cal.get(UCAL_YEAR, status) == year &&
+ cal.get(UCAL_MONTH, status) == month &&
+ cal.get(UCAL_DATE, status) == dom &&
+ cal.get(UCAL_MILLISECONDS_IN_DAY, status) == hour * 3600000) {
+ logln(UnicodeString("Ok: ") + epochHours + " (" + ed + ") => " +
+ cal.get(UCAL_YEAR, status) + "/" +
+ (cal.get(UCAL_MONTH, status)+1) + "/" +
+ cal.get(UCAL_DATE, status) + " " +
+ cal.get(UCAL_MILLISECOND, status)/H);
+ } else {
+ errln(UnicodeString("FAIL: ") + epochHours + " (" + ed + ") => " +
+ cal.get(UCAL_YEAR, status) + "/" +
+ (cal.get(UCAL_MONTH, status)+1) + "/" +
+ cal.get(UCAL_DATE, status) + " " +
+ cal.get(UCAL_MILLISECOND, status)/H +
+ ", expected " + year + "/" + (month+1) + "/" + dom +
+ " " + hour);
+ }
+}
+
+/**
+ * Test the behavior of SimpleTimeZone at the transition into and out of DST.
+ * Use a binary search to find boundaries.
+ */
+void
+TimeZoneBoundaryTest::TestBoundaries()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone* pst = TimeZone::createTimeZone("PST");
+ Calendar* tempcal = Calendar::createInstance(pst, status);
+ if(U_SUCCESS(status)){
+ verifyMapping(*tempcal, 1997, Calendar::APRIL, 3, 0, 238904.0);
+ verifyMapping(*tempcal, 1997, Calendar::APRIL, 4, 0, 238928.0);
+ verifyMapping(*tempcal, 1997, Calendar::APRIL, 5, 0, 238952.0);
+ verifyMapping(*tempcal, 1997, Calendar::APRIL, 5, 23, 238975.0);
+ verifyMapping(*tempcal, 1997, Calendar::APRIL, 6, 0, 238976.0);
+ verifyMapping(*tempcal, 1997, Calendar::APRIL, 6, 1, 238977.0);
+ verifyMapping(*tempcal, 1997, Calendar::APRIL, 6, 3, 238978.0);
+ }else{
+ errln("Could not create calendar. Error: %s", u_errorName(status));
+ }
+ TimeZone* utc = TimeZone::createTimeZone("UTC");
+ Calendar* utccal = Calendar::createInstance(utc, status);
+ if(U_SUCCESS(status)){
+ verifyMapping(*utccal, 1997, Calendar::APRIL, 6, 0, 238968.0);
+ }else{
+ errln("Could not create calendar. Error: %s", u_errorName(status));
+ }
+ TimeZone* save = TimeZone::createDefault();
+ TimeZone::setDefault(*pst);
+
+ // DST changeover for PST is 4/6/1997 at 2 hours past midnight
+ // at 238978.0 epoch hours.
+ tempcal->clear();
+ tempcal->set(1997, Calendar::APRIL, 6);
+ UDate d = tempcal->getTime(status);
+
+ // i is minutes past midnight standard time
+ for (int i=-120; i<=180; i+=60)
+ {
+ UBool inDST = (i >= 120);
+ tempcal->setTime(d + i*60*1000, status);
+ verifyDST(tempcal->getTime(status),pst, TRUE, inDST, -8*ONE_HOUR,inDST ? -7*ONE_HOUR : -8*ONE_HOUR);
+ }
+ TimeZone::setDefault(*save);
+ delete save;
+ delete utccal;
+ delete tempcal;
+
+#if 1
+ {
+ logln("--- Test a ---");
+ UDate d = date(97, UCAL_APRIL, 6);
+ TimeZone *z = TimeZone::createTimeZone("PST");
+ for (int32_t i = 60; i <= 180; i += 15) {
+ UBool inDST = (i >= 120);
+ UDate e = d + i * 60 * 1000;
+ verifyDST(e, z, TRUE, inDST, - 8 * ONE_HOUR, inDST ? - 7 * ONE_HOUR: - 8 * ONE_HOUR);
+ }
+ delete z;
+ }
+#endif
+#if 1
+ {
+ logln("--- Test b ---");
+ TimeZone *tz;
+ TimeZone::setDefault(*(tz = TimeZone::createTimeZone("PST")));
+ delete tz;
+ logln("========================================");
+ findDaylightBoundaryUsingDate(date(97, 0, 1), "PST", PST_1997_BEG);
+ logln("========================================");
+ findDaylightBoundaryUsingDate(date(97, 6, 1), "PDT", PST_1997_END);
+ }
+#endif
+#if 1
+ {
+ logln("--- Test c ---");
+ logln("========================================");
+ TimeZone* z = TimeZone::createTimeZone("Australia/Adelaide");
+ findDaylightBoundaryUsingTimeZone(date(97, 0, 1), TRUE, 859653000000.0, z);
+ logln("========================================");
+ findDaylightBoundaryUsingTimeZone(date(97, 6, 1), FALSE, 877797000000.0, z);
+ delete z;
+ }
+#endif
+#if 1
+ {
+ logln("--- Test d ---");
+ logln("========================================");
+ findDaylightBoundaryUsingTimeZone(date(97, 0, 1), FALSE, PST_1997_BEG);
+ logln("========================================");
+ findDaylightBoundaryUsingTimeZone(date(97, 6, 1), TRUE, PST_1997_END);
+ }
+#endif
+#if 0
+ {
+ logln("--- Test e ---");
+ TimeZone *z = TimeZone::createDefault();
+ logln(UnicodeString("") + z->getOffset(1, 97, 3, 4, 6, 0) + " " + date(97, 3, 4));
+ logln(UnicodeString("") + z->getOffset(1, 97, 3, 5, 7, 0) + " " + date(97, 3, 5));
+ logln(UnicodeString("") + z->getOffset(1, 97, 3, 6, 1, 0) + " " + date(97, 3, 6));
+ logln(UnicodeString("") + z->getOffset(1, 97, 3, 7, 2, 0) + " " + date(97, 3, 7));
+ delete z;
+ }
+#endif
+}
+
+// -------------------------------------
+
+void
+TimeZoneBoundaryTest::testUsingBinarySearch(SimpleTimeZone* tz, UDate d, UDate expectedBoundary)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UDate min = d;
+ UDate max = min + SIX_MONTHS;
+ UBool startsInDST = tz->inDaylightTime(d, status);
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return;
+ if (tz->inDaylightTime(max, status) == startsInDST) {
+ errln("Error: inDaylightTime(" + dateToString(max) + ") != " + ((!startsInDST)?"true":"false"));
+ }
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return;
+ while ((max - min) > INTERVAL) {
+ UDate mid = (min + max) / 2;
+ if (tz->inDaylightTime(mid, status) == startsInDST) {
+ min = mid;
+ }
+ else {
+ max = mid;
+ }
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return;
+ }
+ logln("Binary Search Before: " + showDate(min));
+ logln("Binary Search After: " + showDate(max));
+ UDate mindelta = expectedBoundary - min;
+ UDate maxdelta = max - expectedBoundary;
+ if (mindelta >= 0 &&
+ mindelta <= INTERVAL &&
+ maxdelta >= 0 &&
+ maxdelta <= INTERVAL) logln(UnicodeString("PASS: Expected boundary at ") + expectedBoundary);
+ else errln(UnicodeString("FAIL: Expected boundary at ") + expectedBoundary);
+}
+
+// -------------------------------------
+
+/**
+ * Test the handling of the "new" rules; that is, rules other than nth Day of week.
+ */
+void
+TimeZoneBoundaryTest::TestNewRules()
+{
+#if 1
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleTimeZone *tz;
+ logln("-----------------------------------------------------------------");
+ logln("Aug 2ndTues .. Mar 15");
+ tz = new SimpleTimeZone(- 8 * (int32_t)ONE_HOUR, "Test_1", UCAL_AUGUST, 2, UCAL_TUESDAY, 2 * (int32_t)ONE_HOUR, UCAL_MARCH, 15, 0, 2 * (int32_t)ONE_HOUR, status);
+ logln("========================================");
+ testUsingBinarySearch(tz, date(97, 0, 1), 858416400000.0);
+ logln("========================================");
+ testUsingBinarySearch(tz, date(97, 6, 1), 871380000000.0);
+ delete tz;
+ logln("-----------------------------------------------------------------");
+ logln("Apr Wed>=14 .. Sep Sun<=20");
+ tz = new SimpleTimeZone(- 8 * (int32_t)ONE_HOUR, "Test_2", UCAL_APRIL, 14, - UCAL_WEDNESDAY, 2 *(int32_t)ONE_HOUR, UCAL_SEPTEMBER, - 20, - UCAL_SUNDAY, 2 * (int32_t)ONE_HOUR, status);
+ logln("========================================");
+ testUsingBinarySearch(tz, date(97, 0, 1), 861184800000.0);
+ logln("========================================");
+ testUsingBinarySearch(tz, date(97, 6, 1), 874227600000.0);
+ delete tz;
+ }
+#endif
+}
+
+// -------------------------------------
+
+void
+TimeZoneBoundaryTest::findBoundariesStepwise(int32_t year, UDate interval, TimeZone* z, int32_t expectedChanges)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString str;
+ UDate d = date(year - 1900, UCAL_JANUARY, 1);
+ UDate time = d;
+ UDate limit = time + ONE_YEAR + ONE_DAY;
+ UBool lastState = z->inDaylightTime(d, status);
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ int32_t changes = 0;
+ logln(UnicodeString("-- Zone ") + z->getID(str) + " starts in " + year + " with DST = " + (lastState?"true":"false"));
+ logln(UnicodeString("useDaylightTime = ") + (z->useDaylightTime()?"true":"false"));
+ while (time < limit) {
+ d = time;
+ UBool state = z->inDaylightTime(d, status);
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ if (state != lastState) {
+ logln(UnicodeString(state ? "Entry ": "Exit ") + "at " + d);
+ lastState = state;++changes;
+ }
+ time += interval;
+ }
+ if (changes == 0) {
+ if (!lastState &&
+ !z->useDaylightTime()) logln("No DST");
+ else errln("FAIL: DST all year, or no DST with true useDaylightTime");
+ }
+ else if (changes != 2) {
+ errln(UnicodeString("FAIL: ") + changes + " changes seen; should see 0 or 2");
+ }
+ else if (!z->useDaylightTime()) {
+ errln("FAIL: useDaylightTime false but 2 changes seen");
+ }
+ if (changes != expectedChanges) {
+ errln(UnicodeString("FAIL: ") + changes + " changes seen; expected " + expectedChanges);
+ }
+}
+
+// -------------------------------------
+
+/**
+ * This test is problematic. It makes assumptions about the behavior
+ * of specific zones. Since ICU's zone table is based on the Olson
+ * zones (the UNIX zones), and those change from time to time, this
+ * test can fail after a zone table update. If that happens, the
+ * selected zones need to be updated to have the behavior
+ * expected. That is, they should have DST, not have DST, and have DST
+ * -- other than that this test isn't picky. 12/3/99 aliu
+ *
+ * Test the behavior of SimpleTimeZone at the transition into and out of DST.
+ * Use a stepwise march to find boundaries.
+ */
+void
+TimeZoneBoundaryTest::TestStepwise()
+{
+ TimeZone *zone = TimeZone::createTimeZone("America/New_York");
+ findBoundariesStepwise(1997, ONE_DAY, zone, 2);
+ delete zone;
+ zone = TimeZone::createTimeZone("UTC"); // updated 12/3/99 aliu
+ findBoundariesStepwise(1997, ONE_DAY, zone, 0);
+ delete zone;
+ zone = TimeZone::createTimeZone("Australia/Adelaide");
+ findBoundariesStepwise(1997, ONE_DAY, zone, 2);
+ delete zone;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.h
new file mode 100644
index 00000000000..ecc867c9faf
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzbdtest.h
@@ -0,0 +1,99 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef __TimeZoneBoundaryTest__
+#define __TimeZoneBoundaryTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/timezone.h"
+#include "unicode/simpletz.h"
+#include "caltztst.h"
+
+/**
+ * A test which discovers the boundaries of DST programmatically and verifies
+ * that they are correct.
+ */
+class TimeZoneBoundaryTest: public CalendarTimeZoneTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public: // package
+
+ TimeZoneBoundaryTest();
+
+ /**
+ * Date.toString().substring() Boundary Test
+ * Look for a DST changeover to occur within 6 months of the given Date.
+ * The initial Date.toString() should yield a string containing the
+ * startMode as a SUBSTRING. The boundary will be tested to be
+ * at the expectedBoundary value.
+ */
+
+ /**
+ * internal routines used by major test routines to perform subtests
+ **/
+ virtual void findDaylightBoundaryUsingDate(UDate d, const char* startMode, UDate expectedBoundary);
+ virtual void findDaylightBoundaryUsingTimeZone(UDate d, UBool startsInDST, UDate expectedBoundary);
+ virtual void findDaylightBoundaryUsingTimeZone(UDate d, UBool startsInDST, UDate expectedBoundary, TimeZone* tz);
+
+private:
+ //static UnicodeString* showDate(long l);
+ UnicodeString showDate(UDate d);
+ static UnicodeString showNN(int32_t n);
+
+public: // package
+ /**
+ * Given a date, a TimeZone, and expected values for inDaylightTime,
+ * useDaylightTime, zone and DST offset, verify that this is the case.
+ */
+ virtual void verifyDST(UDate d, TimeZone* time_zone, UBool expUseDaylightTime, UBool expInDaylightTime, UDate expZoneOffset, UDate expDSTOffset);
+
+ /**
+ * Test the behavior of SimpleTimeZone at the transition into and out of DST.
+ * Use a binary search to find boundaries.
+ */
+ virtual void TestBoundaries(void);
+
+ /**
+ * internal subroutine used by TestNewRules
+ **/
+ virtual void testUsingBinarySearch(SimpleTimeZone* tz, UDate d, UDate expectedBoundary);
+
+ /**
+ * Test the handling of the "new" rules; that is, rules other than nth Day of week.
+ */
+ virtual void TestNewRules(void);
+
+ /**
+ * Find boundaries by stepping.
+ */
+ virtual void findBoundariesStepwise(int32_t year, UDate interval, TimeZone* z, int32_t expectedChanges);
+
+ /**
+ * Test the behavior of SimpleTimeZone at the transition into and out of DST.
+ * Use a stepwise march to find boundaries.
+ */
+ virtual void TestStepwise(void);
+ void verifyMapping(Calendar& cal, int year, int month, int dom, int hour,
+ double epochHours) ;
+private:
+ const UDate ONE_SECOND;
+ const UDate ONE_MINUTE;
+ const UDate ONE_HOUR;
+ const UDate ONE_DAY;
+ const UDate ONE_YEAR;
+ const UDate SIX_MONTHS;
+ static const int32_t MONTH_LENGTH[];
+ static const UDate PST_1997_BEG;
+ static const UDate PST_1997_END;
+ static const UDate INTERVAL;
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // __TimeZoneBoundaryTest__
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.cpp
new file mode 100644
index 00000000000..6be576f82ba
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.cpp
@@ -0,0 +1,458 @@
+/*
+*******************************************************************************
+* Copyright (C) 2007, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+*******************************************************************************
+*/
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "tzfmttst.h"
+
+#include "unicode/timezone.h"
+#include "unicode/simpletz.h"
+#include "unicode/calendar.h"
+#include "unicode/strenum.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/uchar.h"
+#include "unicode/basictz.h"
+#include "cstring.h"
+#include "zonemeta.h"
+
+#define DEBUG_ALL 0
+
+static const char* PATTERNS[] = {"z", "zzzz", "Z", "ZZZZ", "v", "vvvv", "V", "VVVV"};
+static const int NUM_PATTERNS = sizeof(PATTERNS)/sizeof(const char*);
+
+void
+TimeZoneFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) {
+ logln("TestSuite TimeZoneFormatTest");
+ }
+ switch (index) {
+ TESTCASE(0, TestTimeZoneRoundTrip);
+ TESTCASE(1, TestTimeRoundTrip);
+ default: name = ""; break;
+ }
+}
+
+void
+TimeZoneFormatTest::TestTimeZoneRoundTrip(void) {
+ UErrorCode status = U_ZERO_ERROR;
+
+ SimpleTimeZone unknownZone(-31415, (UnicodeString)"Etc/Unknown");
+ int32_t badDstOffset = -1234;
+ int32_t badZoneOffset = -2345;
+
+ int32_t testDateData[][3] = {
+ {2007, 1, 15},
+ {2007, 6, 15},
+ {1990, 1, 15},
+ {1990, 6, 15},
+ {1960, 1, 15},
+ {1960, 6, 15},
+ };
+
+ Calendar *cal = Calendar::createInstance(TimeZone::createTimeZone((UnicodeString)"UTC"), status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::createInstance failed");
+ return;
+ }
+
+ // Set up rule equivalency test range
+ UDate low, high;
+ cal->set(1900, UCAL_JANUARY, 1);
+ low = cal->getTime(status);
+ cal->set(2040, UCAL_JANUARY, 1);
+ high = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("getTime failed");
+ return;
+ }
+
+ // Set up test dates
+ UDate DATES[(sizeof(testDateData)/sizeof(int32_t))/3];
+ const int32_t nDates = (sizeof(testDateData)/sizeof(int32_t))/3;
+ cal->clear();
+ for (int32_t i = 0; i < nDates; i++) {
+ cal->set(testDateData[i][0], testDateData[i][1], testDateData[i][2]);
+ DATES[i] = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("getTime failed");
+ return;
+ }
+ }
+
+ // Set up test locales
+ const Locale locales1[] = {
+ Locale("en_US")
+ };
+ const Locale locales2[] = {
+ Locale("en_US"),
+ Locale("en"),
+ Locale("en_CA"),
+ Locale("fr"),
+ Locale("zh_Hant")
+ };
+
+ const Locale *LOCALES;
+ int32_t nLocales;
+ if (DEBUG_ALL) {
+ LOCALES = Locale::getAvailableLocales(nLocales);
+ } else if (quick) {
+ LOCALES = locales1;
+ nLocales = sizeof(locales1)/sizeof(Locale);
+ } else {
+ LOCALES = locales2;
+ nLocales = sizeof(locales2)/sizeof(Locale);
+ }
+
+ StringEnumeration *tzids = TimeZone::createEnumeration();
+ if (U_FAILURE(status)) {
+ errln("tzids->count failed");
+ return;
+ }
+
+ int32_t inRaw, inDst;
+ int32_t outRaw, outDst;
+
+ // Run the roundtrip test
+ for (int32_t locidx = 0; locidx < nLocales; locidx++) {
+ for (int32_t patidx = 0; patidx < NUM_PATTERNS; patidx++) {
+
+ //DEBUG static const char* PATTERNS[] = {"z", "zzzz", "Z", "ZZZZ", "v", "vvvv", "V", "VVVV"};
+ //if (patidx != 1) continue;
+
+ SimpleDateFormat *sdf = new SimpleDateFormat((UnicodeString)PATTERNS[patidx], LOCALES[locidx], status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"new SimpleDateFormat failed for pattern " +
+ PATTERNS[patidx] + " for locale " + LOCALES[locidx].getName());
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ tzids->reset(status);
+ const UnicodeString *tzid;
+ while ((tzid = tzids->snext(status))) {
+ TimeZone *tz = TimeZone::createTimeZone(*tzid);
+
+ for (int32_t datidx = 0; datidx < nDates; datidx++) {
+ UnicodeString tzstr;
+ FieldPosition fpos(0);
+ // Format
+ sdf->setTimeZone(*tz);
+ sdf->format(DATES[datidx], tzstr, fpos);
+
+ // Before parse, set unknown zone to SimpleDateFormat instance
+ // just for making sure that it does not depends on the time zone
+ // originally set.
+ sdf->setTimeZone(unknownZone);
+
+ // Parse
+ ParsePosition pos(0);
+ Calendar *outcal = Calendar::createInstance(unknownZone, status);
+ if (U_FAILURE(status)) {
+ errln("Failed to create an instance of calendar for receiving parse result.");
+ status = U_ZERO_ERROR;
+ continue;
+ }
+ outcal->set(UCAL_DST_OFFSET, badDstOffset);
+ outcal->set(UCAL_ZONE_OFFSET, badZoneOffset);
+
+ sdf->parse(tzstr, *outcal, pos);
+
+ // Check the result
+ const TimeZone &outtz = outcal->getTimeZone();
+ UnicodeString outtzid;
+ outtz.getID(outtzid);
+
+ tz->getOffset(DATES[datidx], false, inRaw, inDst, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"Failed to get offsets from time zone" + *tzid);
+ status = U_ZERO_ERROR;
+ }
+ outtz.getOffset(DATES[datidx], false, outRaw, outDst, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"Failed to get offsets from time zone" + outtzid);
+ status = U_ZERO_ERROR;
+ }
+
+ // Check if localized GMT format or RFC format is used.
+ int32_t numDigits = 0;
+ for (int n = 0; n < tzstr.length(); n++) {
+ if (u_isdigit(tzstr.charAt(n))) {
+ numDigits++;
+ }
+ }
+ if (numDigits >= 4) {
+ // Localized GMT or RFC: total offset (raw + dst) must be preserved.
+ int32_t inOffset = inRaw + inDst;
+ int32_t outOffset = outRaw + outDst;
+ if (inOffset != outOffset) {
+ errln((UnicodeString)"Offset round trip failed; tz=" + *tzid
+ + ", locale=" + LOCALES[locidx].getName() + ", pattern=" + PATTERNS[patidx]
+ + ", time=" + DATES[datidx] + ", str=" + tzstr
+ + ", inOffset=" + inOffset + ", outOffset=" + outOffset);
+ }
+ } else if (uprv_strcmp(PATTERNS[patidx], "z") == 0 || uprv_strcmp(PATTERNS[patidx], "zzzz") == 0
+ || uprv_strcmp(PATTERNS[patidx], "v") == 0 || uprv_strcmp(PATTERNS[patidx], "vvvv") == 0
+ || uprv_strcmp(PATTERNS[patidx], "V") == 0) {
+ // Specific or generic: raw offset must be preserved.
+ if (inRaw != outRaw) {
+ errln((UnicodeString)"Raw offset round trip failed; tz=" + *tzid
+ + ", locale=" + LOCALES[locidx].getName() + ", pattern=" + PATTERNS[patidx]
+ + ", time=" + DATES[datidx] + ", str=" + tzstr
+ + ", inRawOffset=" + inRaw + ", outRawOffset=" + outRaw);
+ }
+ } else { // "VVVV"
+ // Location: time zone rule must be preserved.
+ UnicodeString canonical;
+ ZoneMeta::getCanonicalID(*tzid, canonical);
+ if (outtzid != canonical) {
+ // Canonical ID did not match - check the rules
+ if (!((BasicTimeZone*)&outtz)->hasEquivalentTransitions((BasicTimeZone&)*tz, low, high, TRUE, status)) {
+ errln("Canonical round trip failed; tz=" + *tzid
+ + ", locale=" + LOCALES[locidx].getName() + ", pattern=" + PATTERNS[patidx]
+ + ", time=" + DATES[datidx] + ", str=" + tzstr
+ + ", outtz=" + outtzid);
+ }
+ if (U_FAILURE(status)) {
+ errln("hasEquivalentTransitions failed");
+ status = U_ZERO_ERROR;
+ }
+ }
+ }
+ delete outcal;
+ }
+ delete tz;
+ }
+ delete sdf;
+ }
+ }
+ delete cal;
+ delete tzids;
+}
+
+void
+TimeZoneFormatTest::TestTimeRoundTrip(void) {
+ UErrorCode status = U_ZERO_ERROR;
+
+ Calendar *cal = Calendar::createInstance(TimeZone::createTimeZone((UnicodeString)"UTC"), status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::createInstance failed");
+ return;
+ }
+
+ UDate START_TIME, END_TIME;
+
+ if (DEBUG_ALL) {
+ cal->set(1900, UCAL_JANUARY, 1);
+ } else {
+ cal->set(1965, UCAL_JANUARY, 1);
+ }
+ START_TIME = cal->getTime(status);
+
+ cal->set(2015, UCAL_JANUARY, 1);
+ END_TIME = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("getTime failed");
+ return;
+ }
+
+ // Whether each pattern is ambiguous at DST->STD local time overlap
+ UBool AMBIGUOUS_DST_DECESSION[] = {FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE};
+ // Whether each pattern is ambiguous at STD->STD/DST->DST local time overlap
+ UBool AMBIGUOUS_NEGATIVE_SHIFT[] = {TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE};
+
+ UnicodeString BASEPATTERN("yyyy-MM-dd'T'HH:mm:ss.SSS");
+
+ // timer for performance analysis
+ UDate timer;
+ UDate times[NUM_PATTERNS];
+ for (int32_t i = 0; i < NUM_PATTERNS; i++) {
+ times[i] = 0;
+ }
+
+ UBool REALLY_VERBOSE = FALSE;
+
+ // Set up test locales
+ const Locale locales1[] = {
+ Locale("en_US")
+ };
+ const Locale locales2[] = {
+ Locale("en_US"),
+ Locale("en"),
+ Locale("de_DE"),
+ Locale("es_ES"),
+ Locale("fr_FR"),
+ Locale("it_IT"),
+ Locale("ja_JP"),
+ Locale("ko_KR"),
+ Locale("pt_BR"),
+ Locale("zh_Hans_CN"),
+ Locale("zh_Hant_TW")
+ };
+
+ const Locale *LOCALES;
+ int32_t nLocales;
+ if (DEBUG_ALL) {
+ LOCALES = Locale::getAvailableLocales(nLocales);
+ } else if (quick) {
+ LOCALES = locales1;
+ nLocales = sizeof(locales1)/sizeof(Locale);
+ } else {
+ LOCALES = locales2;
+ nLocales = sizeof(locales2)/sizeof(Locale);
+ }
+
+ StringEnumeration *tzids = TimeZone::createEnumeration();
+ if (U_FAILURE(status)) {
+ errln("tzids->count failed");
+ return;
+ }
+
+ int32_t testCounts = 0;
+ UDate testTimes[4];
+ UBool expectedRoundTrip[4];
+ int32_t testLen = 0;
+
+ for (int32_t locidx = 0; locidx < nLocales; locidx++) {
+ logln((UnicodeString)"Locale: " + LOCALES[locidx].getName());
+
+ for (int32_t patidx = 0; patidx < NUM_PATTERNS; patidx++) {
+ logln((UnicodeString)" pattern: " + PATTERNS[patidx]);
+
+ //DEBUG static const char* PATTERNS[] = {"z", "zzzz", "Z", "ZZZZ", "v", "vvvv", "V", "VVVV"};
+ //if (patidx != 1) continue;
+
+ UnicodeString pattern(BASEPATTERN);
+ pattern.append(" ").append(PATTERNS[patidx]);
+
+ SimpleDateFormat *sdf = new SimpleDateFormat(pattern, LOCALES[locidx], status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"new SimpleDateFormat failed for pattern " +
+ pattern + " for locale " + LOCALES[locidx].getName());
+ status = U_ZERO_ERROR;
+ continue;
+ }
+
+ tzids->reset(status);
+ const UnicodeString *tzid;
+
+ timer = Calendar::getNow();
+
+ while ((tzid = tzids->snext(status))) {
+ UnicodeString canonical;
+ ZoneMeta::getCanonicalID(*tzid, canonical);
+ if (*tzid != canonical) {
+ // Skip aliases
+ continue;
+ }
+ BasicTimeZone *tz = (BasicTimeZone*)TimeZone::createTimeZone(*tzid);
+ sdf->setTimeZone(*tz);
+
+ UDate t = START_TIME;
+ TimeZoneTransition tzt;
+ UBool tztAvail = FALSE;
+ UBool middle = TRUE;
+
+ while (t < END_TIME) {
+ if (!tztAvail) {
+ testTimes[0] = t;
+ expectedRoundTrip[0] = TRUE;
+ testLen = 1;
+ } else {
+ int32_t fromOffset = tzt.getFrom()->getRawOffset() + tzt.getFrom()->getDSTSavings();
+ int32_t toOffset = tzt.getTo()->getRawOffset() + tzt.getTo()->getDSTSavings();
+ int32_t delta = toOffset - fromOffset;
+ if (delta < 0) {
+ UBool isDstDecession = tzt.getFrom()->getDSTSavings() > 0 && tzt.getTo()->getDSTSavings() == 0;
+ testTimes[0] = t + delta - 1;
+ expectedRoundTrip[0] = TRUE;
+ testTimes[1] = t + delta;
+ expectedRoundTrip[1] = isDstDecession ?
+ !AMBIGUOUS_DST_DECESSION[patidx] : !AMBIGUOUS_NEGATIVE_SHIFT[patidx];
+ testTimes[2] = t - 1;
+ expectedRoundTrip[2] = isDstDecession ?
+ !AMBIGUOUS_DST_DECESSION[patidx] : !AMBIGUOUS_NEGATIVE_SHIFT[patidx];
+ testTimes[3] = t;
+ expectedRoundTrip[3] = TRUE;
+ testLen = 4;
+ } else {
+ testTimes[0] = t - 1;
+ expectedRoundTrip[0] = TRUE;
+ testTimes[1] = t;
+ expectedRoundTrip[1] = TRUE;
+ testLen = 2;
+ }
+ }
+ for (int32_t testidx = 0; testidx < testLen; testidx++) {
+ if (quick) {
+ // reduce regular test time
+ if (!expectedRoundTrip[testidx]) {
+ continue;
+ }
+ }
+ testCounts++;
+
+ UnicodeString text;
+ FieldPosition fpos(0);
+ sdf->format(testTimes[testidx], text, fpos);
+
+ UDate parsedDate = sdf->parse(text, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"Failed to parse " + text);
+ status = U_ZERO_ERROR;
+ continue;
+ }
+ if (parsedDate != testTimes[testidx]) {
+ UnicodeString msg = (UnicodeString)"Time round trip failed for "
+ + "tzid=" + *tzid
+ + ", locale=" + LOCALES[locidx].getName()
+ + ", pattern=" + PATTERNS[patidx]
+ + ", text=" + text
+ + ", time=" + testTimes[testidx]
+ + ", restime=" + parsedDate
+ + ", diff=" + (parsedDate - testTimes[testidx]);
+ if (expectedRoundTrip[testidx]) {
+ errln((UnicodeString)"FAIL: " + msg);
+ } else if (REALLY_VERBOSE) {
+ logln(msg);
+ }
+ }
+ }
+ tztAvail = tz->getNextTransition(t, FALSE, tzt);
+ if (!tztAvail) {
+ break;
+ }
+ if (middle) {
+ // Test the date in the middle of two transitions.
+ t += (int64_t)((tzt.getTime() - t)/2);
+ middle = FALSE;
+ tztAvail = FALSE;
+ } else {
+ t = tzt.getTime();
+ }
+ }
+ delete tz;
+ }
+ times[patidx] += (Calendar::getNow() - timer);
+ delete sdf;
+ }
+ }
+ UDate total = 0;
+ logln("### Elapsed time by patterns ###");
+ for (int32_t i = 0; i < NUM_PATTERNS; i++) {
+ logln(UnicodeString("") + times[i] + "ms (" + PATTERNS[i] + ")");
+ total += times[i];
+ }
+ logln((UnicodeString)"Total: " + total + "ms");
+ logln((UnicodeString)"Iteration: " + testCounts);
+
+ delete cal;
+ delete tzids;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.h b/Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.h
new file mode 100644
index 00000000000..22583309bd5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzfmttst.h
@@ -0,0 +1,27 @@
+/*
+*******************************************************************************
+* Copyright (C) 2007, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+*******************************************************************************
+*/
+
+#ifndef _TIMEZONEFORMATTEST_
+#define _TIMEZONEFORMATTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+class TimeZoneFormatTest : public IntlTest {
+ // IntlTest override
+ void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par);
+
+ void TestTimeZoneRoundTrip(void);
+ void TestTimeRoundTrip(void);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _TIMEZONEFORMATTEST_
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.cpp
new file mode 100644
index 00000000000..1c4c5848347
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.cpp
@@ -0,0 +1,329 @@
+/*
+*******************************************************************************
+* Copyright (C) 2007, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+*******************************************************************************
+*/
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "tzoffloc.h"
+
+#include "unicode/ucal.h"
+#include "unicode/timezone.h"
+#include "unicode/calendar.h"
+#include "unicode/dtrule.h"
+#include "unicode/tzrule.h"
+#include "unicode/rbtz.h"
+#include "unicode/simpletz.h"
+#include "unicode/tzrule.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/gregocal.h"
+
+void
+TimeZoneOffsetLocalTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) {
+ logln("TestSuite TimeZoneOffsetLocalTest");
+ }
+ switch (index) {
+ TESTCASE(0, TestGetOffsetAroundTransition);
+ default: name = ""; break;
+ }
+}
+
+/*
+ * Testing getOffset APIs around rule transition by local standard/wall time.
+ */
+void
+TimeZoneOffsetLocalTest::TestGetOffsetAroundTransition() {
+ const int32_t NUM_DATES = 10;
+ const int32_t NUM_TIMEZONES = 3;
+
+ const int32_t HOUR = 60*60*1000;
+ const int32_t MINUTE = 60*1000;
+
+ const int32_t DATES[NUM_DATES][6] = {
+ {2006, UCAL_APRIL, 2, 1, 30, 1*HOUR+30*MINUTE},
+ {2006, UCAL_APRIL, 2, 2, 00, 2*HOUR},
+ {2006, UCAL_APRIL, 2, 2, 30, 2*HOUR+30*MINUTE},
+ {2006, UCAL_APRIL, 2, 3, 00, 3*HOUR},
+ {2006, UCAL_APRIL, 2, 3, 30, 3*HOUR+30*MINUTE},
+ {2006, UCAL_OCTOBER, 29, 0, 30, 0*HOUR+30*MINUTE},
+ {2006, UCAL_OCTOBER, 29, 1, 00, 1*HOUR},
+ {2006, UCAL_OCTOBER, 29, 1, 30, 1*HOUR+30*MINUTE},
+ {2006, UCAL_OCTOBER, 29, 2, 00, 2*HOUR},
+ {2006, UCAL_OCTOBER, 29, 2, 30, 2*HOUR+30*MINUTE},
+ };
+
+ // Expected offsets by int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
+ // uint8_t dayOfWeek, int32_t millis, UErrorCode& status)
+ const int32_t OFFSETS1[NUM_DATES] = {
+ // April 2, 2006
+ -8*HOUR,
+ -7*HOUR,
+ -7*HOUR,
+ -7*HOUR,
+ -7*HOUR,
+
+ // October 29, 2006
+ -7*HOUR,
+ -8*HOUR,
+ -8*HOUR,
+ -8*HOUR,
+ -8*HOUR,
+ };
+
+ // Expected offsets by void getOffset(UDate date, UBool local, int32_t& rawOffset,
+ // int32_t& dstOffset, UErrorCode& ec) with local=TRUE
+ // or void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
+ // int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) with
+ // nonExistingTimeOpt=kStandard/duplicatedTimeOpt=kStandard
+ const int32_t OFFSETS2[NUM_DATES][2] = {
+ // April 2, 2006
+ {-8*HOUR, 0},
+ {-8*HOUR, 0},
+ {-8*HOUR, 0},
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 1*HOUR},
+
+ // Oct 29, 2006
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 0},
+ {-8*HOUR, 0},
+ {-8*HOUR, 0},
+ {-8*HOUR, 0},
+ };
+
+ // Expected offsets by void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt,
+ // int32_t duplicatedTimeOpt, int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) with
+ // nonExistingTimeOpt=kDaylight/duplicatedTimeOpt=kDaylight
+ const int32_t OFFSETS3[][2] = {
+ // April 2, 2006
+ {-8*HOUR, 0},
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 1*HOUR},
+
+ // October 29, 2006
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 1*HOUR},
+ {-8*HOUR, 0},
+ {-8*HOUR, 0},
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ int32_t rawOffset, dstOffset;
+ TimeZone* utc = TimeZone::createTimeZone("UTC");
+ Calendar* cal = Calendar::createInstance(*utc, status);
+ if (U_FAILURE(status)) {
+ errln("Calendar::createInstance failed");
+ return;
+ }
+ cal->clear();
+
+ // Set up TimeZone objects - OlsonTimeZone, SimpleTimeZone and RuleBasedTimeZone
+ BasicTimeZone *TESTZONES[NUM_TIMEZONES];
+
+ TESTZONES[0] = (BasicTimeZone*)TimeZone::createTimeZone("America/Los_Angeles");
+ TESTZONES[1] = new SimpleTimeZone(-8*HOUR, "Simple Pacific Time",
+ UCAL_APRIL, 1, UCAL_SUNDAY, 2*HOUR,
+ UCAL_OCTOBER, -1, UCAL_SUNDAY, 2*HOUR, status);
+ if (U_FAILURE(status)) {
+ errln("SimpleTimeZone constructor failed");
+ return;
+ }
+
+ InitialTimeZoneRule *ir = new InitialTimeZoneRule(
+ "Pacific Standard Time", // Initial time Name
+ -8*HOUR, // Raw offset
+ 0*HOUR); // DST saving amount
+
+ RuleBasedTimeZone *rbPT = new RuleBasedTimeZone("Rule based Pacific Time", ir);
+
+ DateTimeRule *dtr;
+ AnnualTimeZoneRule *atzr;
+ const int32_t STARTYEAR = 2000;
+
+ dtr = new DateTimeRule(UCAL_APRIL, 1, UCAL_SUNDAY,
+ 2*HOUR, DateTimeRule::WALL_TIME); // 1st Sunday in April, at 2AM wall time
+ atzr = new AnnualTimeZoneRule("Pacific Daylight Time",
+ -8*HOUR /* rawOffset */, 1*HOUR /* dstSavings */, dtr,
+ STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbPT->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("Could not add DST start rule to the RuleBasedTimeZone rbPT");
+ return;
+ }
+
+ dtr = new DateTimeRule(UCAL_OCTOBER, -1, UCAL_SUNDAY,
+ 2*HOUR, DateTimeRule::WALL_TIME); // last Sunday in October, at 2AM wall time
+ atzr = new AnnualTimeZoneRule("Pacific Standard Time",
+ -8*HOUR /* rawOffset */, 0 /* dstSavings */, dtr,
+ STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbPT->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("Could not add STD start rule to the RuleBasedTimeZone rbPT");
+ return;
+ }
+
+ rbPT->complete(status);
+ if (U_FAILURE(status)) {
+ errln("complete() failed for RuleBasedTimeZone rbPT");
+ return;
+ }
+
+ TESTZONES[2] = rbPT;
+
+ // Calculate millis
+ UDate MILLIS[NUM_DATES];
+ for (int32_t i = 0; i < NUM_DATES; i++) {
+ cal->clear();
+ cal->set(DATES[i][0], DATES[i][1], DATES[i][2], DATES[i][3], DATES[i][4]);
+ MILLIS[i] = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("cal->getTime failed");
+ return;
+ }
+ }
+
+ SimpleDateFormat df(UnicodeString("yyyy-MM-dd HH:mm:ss"), status);
+ if (U_FAILURE(status)) {
+ errln("Failed to initialize a SimpleDateFormat");
+ }
+ df.setTimeZone(*utc);
+ UnicodeString dateStr;
+
+ // Test getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
+ // uint8_t dayOfWeek, int32_t millis, UErrorCode& status)
+ for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
+ for (int32_t d = 0; d < NUM_DATES; d++) {
+ status = U_ZERO_ERROR;
+ int32_t offset = TESTZONES[i]->getOffset(GregorianCalendar::AD, DATES[d][0], DATES[d][1], DATES[d][2],
+ UCAL_SUNDAY, DATES[d][5], status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"getOffset(era,year,month,day,dayOfWeek,millis,status) failed for TESTZONES[" + i + "]");
+ } else if (offset != OFFSETS1[d]) {
+ dateStr.remove();
+ df.format(MILLIS[d], dateStr);
+ errln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
+ + dateStr + "(standard) - Got: " + offset + " Expected: " + OFFSETS1[d]);
+ }
+ }
+ }
+
+ // Test getOffset(UDate date, UBool local, int32_t& rawOffset,
+ // int32_t& dstOffset, UErrorCode& ec) with local = TRUE
+ for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
+ for (int32_t m = 0; m < NUM_DATES; m++) {
+ status = U_ZERO_ERROR;
+ TESTZONES[i]->getOffset(MILLIS[m], TRUE, rawOffset, dstOffset, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"getOffset(date,local,rawOfset,dstOffset,ec) failed for TESTZONES[" + i + "]");
+ } else if (rawOffset != OFFSETS2[m][0] || dstOffset != OFFSETS2[m][1]) {
+ dateStr.remove();
+ df.format(MILLIS[m], dateStr);
+ errln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
+ + dateStr + "(wall) - Got: "
+ + rawOffset + "/" + dstOffset
+ + " Expected: " + OFFSETS2[m][0] + "/" + OFFSETS2[m][1]);
+ }
+ }
+ }
+
+ // Test getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
+ // int32_t& rawOffset, int32_t& dstOffset, UErroCode& status)
+ // with nonExistingTimeOpt=kStandard/duplicatedTimeOpt=kStandard
+ for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
+ for (int m = 0; m < NUM_DATES; m++) {
+ status = U_ZERO_ERROR;
+ TESTZONES[i]->getOffsetFromLocal(MILLIS[m], BasicTimeZone::kStandard, BasicTimeZone::kStandard,
+ rawOffset, dstOffset, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"getOffsetFromLocal with kStandard/kStandard failed for TESTZONES[" + i + "]");
+ } else if (rawOffset != OFFSETS2[m][0] || dstOffset != OFFSETS2[m][1]) {
+ dateStr.remove();
+ df.format(MILLIS[m], dateStr);
+ errln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
+ + dateStr + "(wall/kStandard/kStandard) - Got: "
+ + rawOffset + "/" + dstOffset
+ + " Expected: " + OFFSETS2[m][0] + "/" + OFFSETS2[m][1]);
+ }
+ }
+ }
+
+ // Test getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
+ // int32_t& rawOffset, int32_t& dstOffset, UErroCode& status)
+ // with nonExistingTimeOpt=kDaylight/duplicatedTimeOpt=kDaylight
+ for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
+ for (int m = 0; m < NUM_DATES; m++) {
+ status = U_ZERO_ERROR;
+ TESTZONES[i]->getOffsetFromLocal(MILLIS[m], BasicTimeZone::kDaylight, BasicTimeZone::kDaylight,
+ rawOffset, dstOffset, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"getOffsetFromLocal with kDaylight/kDaylight failed for TESTZONES[" + i + "]");
+ } else if (rawOffset != OFFSETS3[m][0] || dstOffset != OFFSETS3[m][1]) {
+ dateStr.remove();
+ df.format(MILLIS[m], dateStr);
+ errln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
+ + dateStr + "(wall/kDaylight/kDaylight) - Got: "
+ + rawOffset + "/" + dstOffset
+ + " Expected: " + OFFSETS3[m][0] + "/" + OFFSETS3[m][1]);
+ }
+ }
+ }
+
+ // Test getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
+ // int32_t& rawOffset, int32_t& dstOffset, UErroCode& status)
+ // with nonExistingTimeOpt=kFormer/duplicatedTimeOpt=kLatter
+ for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
+ for (int m = 0; m < NUM_DATES; m++) {
+ status = U_ZERO_ERROR;
+ TESTZONES[i]->getOffsetFromLocal(MILLIS[m], BasicTimeZone::kFormer, BasicTimeZone::kLatter,
+ rawOffset, dstOffset, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"getOffsetFromLocal with kFormer/kLatter failed for TESTZONES[" + i + "]");
+ } else if (rawOffset != OFFSETS2[m][0] || dstOffset != OFFSETS2[m][1]) {
+ dateStr.remove();
+ df.format(MILLIS[m], dateStr);
+ errln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
+ + dateStr + "(wall/kFormer/kLatter) - Got: "
+ + rawOffset + "/" + dstOffset
+ + " Expected: " + OFFSETS2[m][0] + "/" + OFFSETS2[m][1]);
+ }
+ }
+ }
+
+ // Test getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
+ // int32_t& rawOffset, int32_t& dstOffset, UErroCode& status)
+ // with nonExistingTimeOpt=kLatter/duplicatedTimeOpt=kFormer
+ for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
+ for (int m = 0; m < NUM_DATES; m++) {
+ status = U_ZERO_ERROR;
+ TESTZONES[i]->getOffsetFromLocal(MILLIS[m], BasicTimeZone::kLatter, BasicTimeZone::kFormer,
+ rawOffset, dstOffset, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"getOffsetFromLocal with kLatter/kFormer failed for TESTZONES[" + i + "]");
+ } else if (rawOffset != OFFSETS3[m][0] || dstOffset != OFFSETS3[m][1]) {
+ dateStr.remove();
+ df.format(MILLIS[m], dateStr);
+ errln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
+ + dateStr + "(wall/kLatter/kFormer) - Got: "
+ + rawOffset + "/" + dstOffset
+ + " Expected: " + OFFSETS3[m][0] + "/" + OFFSETS3[m][1]);
+ }
+ }
+ }
+
+ for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
+ delete TESTZONES[i];
+ }
+ delete utc;
+ delete cal;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.h b/Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.h
new file mode 100644
index 00000000000..7d8fa235c66
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzoffloc.h
@@ -0,0 +1,26 @@
+/*
+*******************************************************************************
+* Copyright (C) 2007, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+*******************************************************************************
+*/
+
+#ifndef _TIMEZONEOFFSETLOCALTEST_
+#define _TIMEZONEOFFSETLOCALTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "intltest.h"
+
+class TimeZoneOffsetLocalTest : public IntlTest {
+ // IntlTest override
+ void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par);
+
+ void TestGetOffsetAroundTransition(void);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _TIMEZONEOFFSETLOCALTEST_
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzregts.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tzregts.cpp
new file mode 100644
index 00000000000..b549b83c16a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzregts.cpp
@@ -0,0 +1,1219 @@
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/simpletz.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/strenum.h"
+#include "tzregts.h"
+#include "calregts.h"
+#include "cmemory.h"
+
+// *****************************************************************************
+// class TimeZoneRegressionTest
+// *****************************************************************************
+/* length of an array */
+#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+
+void
+TimeZoneRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ // if (exec) logln((UnicodeString)"TestSuite NumberFormatRegressionTest");
+ switch (index) {
+
+ CASE(0, Test4052967);
+ CASE(1, Test4073209);
+ CASE(2, Test4073215);
+ CASE(3, Test4084933);
+ CASE(4, Test4096952);
+ CASE(5, Test4109314);
+ CASE(6, Test4126678);
+ CASE(7, Test4151406);
+ CASE(8, Test4151429);
+ CASE(9, Test4154537);
+ CASE(10, Test4154542);
+ CASE(11, Test4154650);
+ CASE(12, Test4154525);
+ CASE(13, Test4162593);
+ CASE(14, TestJ186);
+ CASE(15, TestJ449);
+ CASE(16, TestJDK12API);
+ CASE(17, Test4176686);
+ CASE(18, Test4184229);
+ default: name = ""; break;
+ }
+}
+
+UBool
+TimeZoneRegressionTest::failure(UErrorCode status, const char* msg)
+{
+ if(U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/**
+ * @bug 4052967
+ */
+void TimeZoneRegressionTest:: Test4052967() {
+ // {sfb} not applicable in C++ ?
+ /*logln("*** CHECK TIMEZONE AGAINST HOST OS SETTING ***");
+ logln("user.timezone:" + System.getProperty("user.timezone", "<not set>"));
+ logln(new Date().toString());
+ logln("*** THE RESULTS OF THIS TEST MUST BE VERIFIED MANUALLY ***");*/
+}
+
+/**
+ * @bug 4073209
+ */
+void TimeZoneRegressionTest:: Test4073209() {
+ TimeZone *z1 = TimeZone::createTimeZone("PST");
+ TimeZone *z2 = TimeZone::createTimeZone("PST");
+ if (z1 == z2)
+ errln("Fail: TimeZone should return clones");
+ delete z1;
+ delete z2;
+}
+
+UDate TimeZoneRegressionTest::findTransitionBinary(const SimpleTimeZone& tz, UDate min, UDate max) {
+ UErrorCode status = U_ZERO_ERROR;
+ UBool startsInDST = tz.inDaylightTime(min, status);
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return 0;
+ if (tz.inDaylightTime(max, status) == startsInDST) {
+ logln((UnicodeString)"Error: inDaylightTime() != " + ((!startsInDST)?"TRUE":"FALSE"));
+ return 0;
+ }
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return 0;
+ while ((max - min) > 100) { // Min accuracy in ms
+ UDate mid = (min + max) / 2;
+ if (tz.inDaylightTime(mid, status) == startsInDST) {
+ min = mid;
+ } else {
+ max = mid;
+ }
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return 0;
+ }
+ return (min + max) / 2;
+}
+
+UDate TimeZoneRegressionTest::findTransitionStepwise(const SimpleTimeZone& tz, UDate min, UDate max) {
+ UErrorCode status = U_ZERO_ERROR;
+ UBool startsInDST = tz.inDaylightTime(min, status);
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return 0;
+ while (min < max) {
+ if (tz.inDaylightTime(min, status) != startsInDST) {
+ return min;
+ }
+ if (failure(status, "SimpleTimeZone::inDaylightTime")) return 0;
+ min += (UDate)24*60*60*1000; // one day
+ }
+ return 0;
+}
+
+/**
+ * @bug 4073215
+ */
+// {sfb} will this work using a Calendar?
+void TimeZoneRegressionTest:: Test4073215()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString str, str2;
+ SimpleTimeZone *z = new SimpleTimeZone(0, "GMT");
+ if (z->useDaylightTime())
+ errln("Fail: Fix test to start with non-DST zone");
+ z->setStartRule(UCAL_FEBRUARY, 1, UCAL_SUNDAY, 0, status);
+ failure(status, "z->setStartRule()");
+ z->setEndRule(UCAL_MARCH, -1, UCAL_SUNDAY, 0, status);
+ failure(status, "z->setStartRule()");
+ if (!z->useDaylightTime())
+ errln("Fail: DST not active");
+
+ GregorianCalendar cal(1997, UCAL_JANUARY, 31, status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ return;
+ }
+ failure(status, "new GregorianCalendar");
+ cal.adoptTimeZone(z);
+
+ SimpleDateFormat sdf((UnicodeString)"E d MMM yyyy G HH:mm", status);
+ if(U_FAILURE(status)) {
+ errln("Error creating date format %s", u_errorName(status));
+ return;
+ }
+ sdf.setCalendar(cal);
+ failure(status, "new SimpleDateFormat");
+
+ UDate jan31, mar1, mar31;
+
+ UBool indt = z->inDaylightTime(jan31=cal.getTime(status), status);
+ failure(status, "inDaylightTime or getTime call on Jan 31");
+ if (indt) {
+ errln("Fail: Jan 31 inDaylightTime=TRUE, exp FALSE");
+ }
+ cal.set(1997, UCAL_MARCH, 1);
+ indt = z->inDaylightTime(mar1=cal.getTime(status), status);
+ failure(status, "inDaylightTime or getTime call on Mar 1");
+ if (!indt) {
+ UnicodeString str;
+ sdf.format(cal.getTime(status), str);
+ failure(status, "getTime");
+ errln((UnicodeString)"Fail: " + str + " inDaylightTime=FALSE, exp TRUE");
+ }
+ cal.set(1997, UCAL_MARCH, 31);
+ indt = z->inDaylightTime(mar31=cal.getTime(status), status);
+ failure(status, "inDaylightTime or getTime call on Mar 31");
+ if (indt) {
+ errln("Fail: Mar 31 inDaylightTime=TRUE, exp FALSE");
+ }
+
+ /*
+ cal.set(1997, Calendar::DECEMBER, 31);
+ UDate dec31 = cal.getTime(status);
+ failure(status, "getTime");
+ UDate trans = findTransitionStepwise(*z, jan31, dec31);
+ logln((UnicodeString)"Stepwise from " +
+ sdf.format(jan31, str.remove()) + "; transition at " +
+ (trans?sdf.format(trans, str2.remove()):(UnicodeString)"NONE"));
+ trans = findTransitionStepwise(*z, mar1, dec31);
+ logln((UnicodeString)"Stepwise from " +
+ sdf.format(mar1, str.remove()) + "; transition at " +
+ (trans?sdf.format(trans, str2.remove()):(UnicodeString)"NONE"));
+ trans = findTransitionStepwise(*z, mar31, dec31);
+ logln((UnicodeString)"Stepwise from " +
+ sdf.format(mar31, str.remove()) + "; transition at " +
+ (trans?sdf.format(trans, str2.remove()):(UnicodeString)"NONE"));
+ */
+}
+
+/**
+ * @bug 4084933
+ * The expected behavior of TimeZone around the boundaries is:
+ * (Assume transition time of 2:00 AM)
+ * day of onset 1:59 AM STD = display name 1:59 AM ST
+ * 2:00 AM STD = display name 3:00 AM DT
+ * day of end 0:59 AM STD = display name 1:59 AM DT
+ * 1:00 AM STD = display name 1:00 AM ST
+ */
+void TimeZoneRegressionTest:: Test4084933() {
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone *tz = TimeZone::createTimeZone("PST");
+
+ int32_t offset1 = tz->getOffset(1,
+ 1997, UCAL_OCTOBER, 26, UCAL_SUNDAY, (2*60*60*1000), status);
+ int32_t offset2 = tz->getOffset(1,
+ 1997, UCAL_OCTOBER, 26, UCAL_SUNDAY, (2*60*60*1000)-1, status);
+
+ int32_t offset3 = tz->getOffset(1,
+ 1997, UCAL_OCTOBER, 26, UCAL_SUNDAY, (1*60*60*1000), status);
+ int32_t offset4 = tz->getOffset(1,
+ 1997, UCAL_OCTOBER, 26, UCAL_SUNDAY, (1*60*60*1000)-1, status);
+
+ /*
+ * The following was added just for consistency. It shows that going *to* Daylight
+ * Savings Time (PDT) does work at 2am.
+ */
+ int32_t offset5 = tz->getOffset(1,
+ 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (2*60*60*1000), status);
+ int32_t offset6 = tz->getOffset(1,
+ 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (2*60*60*1000)-1, status);
+ int32_t offset5a = tz->getOffset(1,
+ 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (3*60*60*1000), status);
+ int32_t offset6a = tz->getOffset(1,
+ 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (3*60*60*1000)-1, status);
+ int32_t offset7 = tz->getOffset(1,
+ 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (1*60*60*1000), status);
+ int32_t offset8 = tz->getOffset(1,
+ 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (1*60*60*1000)-1, status);
+ int32_t SToffset = (int32_t)(-8 * 60*60*1000L);
+ int32_t DToffset = (int32_t)(-7 * 60*60*1000L);
+
+#define ERR_IF_FAIL(x) if(x) { errln("FAIL: TimeZone misbehaving - %s", #x); }
+
+ ERR_IF_FAIL(U_FAILURE(status))
+ ERR_IF_FAIL(offset1 != SToffset)
+ ERR_IF_FAIL(offset2 != SToffset)
+ ERR_IF_FAIL(offset3 != SToffset)
+ ERR_IF_FAIL(offset4 != DToffset)
+ ERR_IF_FAIL(offset5 != DToffset)
+ ERR_IF_FAIL(offset6 != SToffset)
+ ERR_IF_FAIL(offset5a != DToffset)
+ ERR_IF_FAIL(offset6a != DToffset)
+ ERR_IF_FAIL(offset7 != SToffset)
+ ERR_IF_FAIL(offset8 != SToffset)
+
+#undef ERR_IF_FAIL
+
+ delete tz;
+}
+
+/**
+ * @bug 4096952
+ */
+void TimeZoneRegressionTest:: Test4096952() {
+ // {sfb} serialization not applicable
+/*
+ UnicodeString ZONES [] = { UnicodeString("GMT"), UnicodeString("MET"), UnicodeString("IST") };
+ UBool pass = TRUE;
+ //try {
+ for (int32_t i=0; i < ZONES.length; ++i) {
+ TimeZone *zone = TimeZone::createTimeZone(ZONES[i]);
+ UnicodeString id;
+ if (zone->getID(id) != ZONES[i])
+ errln("Fail: Test broken; zones not instantiating");
+
+ ByteArrayOutputStream baos;
+ ObjectOutputStream ostream =
+ new ObjectOutputStream(baos = new
+ ByteArrayOutputStream());
+ ostream.writeObject(zone);
+ ostream.close();
+ baos.close();
+ ObjectInputStream istream =
+ new ObjectInputStream(new
+ ByteArrayInputStream(baos.toByteArray()));
+ TimeZone frankenZone = (TimeZone) istream.readObject();
+ //logln("Zone: " + zone);
+ //logln("FrankenZone: " + frankenZone);
+ if (!zone.equals(frankenZone)) {
+ logln("TimeZone " + zone.getID() +
+ " not equal to serialized/deserialized one");
+ pass = false;
+ }
+ }
+ if (!pass) errln("Fail: TimeZone serialization/equality bug");
+ }
+ catch (IOException e) {
+ errln("Fail: " + e);
+ e.print32_tStackTrace();
+ }
+ catch (ClassNotFoundException e) {
+ errln("Fail: " + e);
+ e.print32_tStackTrace();
+ }
+*/
+}
+
+/**
+ * @bug 4109314
+ */
+void TimeZoneRegressionTest:: Test4109314() {
+ UErrorCode status = U_ZERO_ERROR;
+ GregorianCalendar *testCal = (GregorianCalendar*)Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete testCal;
+ return;
+ }
+ failure(status, "Calendar::createInstance");
+ TimeZone *PST = TimeZone::createTimeZone("PST");
+ /*Object[] testData = {
+ PST, new Date(98,Calendar.APRIL,4,22,0), new Date(98, Calendar.APRIL, 5,6,0),
+ PST, new Date(98,Calendar.OCTOBER,24,22,0), new Date(98,Calendar.OCTOBER,25,6,0),
+ };*/
+ UDate testData [] = {
+ CalendarRegressionTest::makeDate(98,UCAL_APRIL,4,22,0),
+ CalendarRegressionTest::makeDate(98, UCAL_APRIL,5,6,0),
+ CalendarRegressionTest::makeDate(98,UCAL_OCTOBER,24,22,0),
+ CalendarRegressionTest::makeDate(98,UCAL_OCTOBER,25,6,0)
+ };
+ UBool pass = TRUE;
+ for (int32_t i = 0; i < 4; i+=2) {
+ //testCal->setTimeZone((TimeZone) testData[i]);
+ testCal->setTimeZone(*PST);
+ UDate t = testData[i];
+ UDate end = testData[i+1];
+ while(testCal->getTime(status) < end) {
+ testCal->setTime(t, status);
+ if ( ! checkCalendar314(testCal, PST))
+ pass = FALSE;
+ t += 60*60*1000.0;
+ }
+ }
+ if ( ! pass)
+ errln("Fail: TZ API inconsistent");
+
+ delete testCal;
+ delete PST;
+}
+
+UBool
+TimeZoneRegressionTest::checkCalendar314(GregorianCalendar *testCal, TimeZone *testTZ)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ // GregorianCalendar testCal = (GregorianCalendar)aCal.clone();
+
+ int32_t tzOffset, tzRawOffset;
+ float tzOffsetFloat,tzRawOffsetFloat;
+ // Here is where the user made an error. They were passing in the value of
+ // the MILLSECOND field; you need to pass in the millis in the day in STANDARD
+ // time.
+ UDate millis = testCal->get(UCAL_MILLISECOND, status) +
+ 1000.0 * (testCal->get(UCAL_SECOND, status) +
+ 60.0 * (testCal->get(UCAL_MINUTE, status) +
+ 60.0 * (testCal->get(UCAL_HOUR_OF_DAY, status)))) -
+ testCal->get(UCAL_DST_OFFSET, status);
+
+ /* Fix up millis to be in range. ASSUME THAT WE ARE NOT AT THE
+ * BEGINNING OR END OF A MONTH. We must add this code because
+ * getOffset() has been changed to be more strict about the parameters
+ * it receives -- it turns out that this test was passing in illegal
+ * values. */
+ int32_t date = testCal->get(UCAL_DATE, status);
+ int32_t dow = testCal->get(UCAL_DAY_OF_WEEK, status);
+ while(millis < 0) {
+ millis += U_MILLIS_PER_DAY;
+ --date;
+ dow = UCAL_SUNDAY + ((dow - UCAL_SUNDAY + 6) % 7);
+ }
+ while (millis >= U_MILLIS_PER_DAY) {
+ millis -= U_MILLIS_PER_DAY;
+ ++date;
+ dow = UCAL_SUNDAY + ((dow - UCAL_SUNDAY + 1) % 7);
+ }
+
+ tzOffset = testTZ->getOffset((uint8_t)testCal->get(UCAL_ERA, status),
+ testCal->get(UCAL_YEAR, status),
+ testCal->get(UCAL_MONTH, status),
+ date,
+ (uint8_t)dow,
+ (int32_t)millis,
+ status);
+ tzRawOffset = testTZ->getRawOffset();
+ tzOffsetFloat = (float)tzOffset/(float)3600000;
+ tzRawOffsetFloat = (float)tzRawOffset/(float)3600000;
+
+ UDate testDate = testCal->getTime(status);
+
+ UBool inDaylightTime = testTZ->inDaylightTime(testDate, status);
+ SimpleDateFormat *sdf = new SimpleDateFormat((UnicodeString)"MM/dd/yyyy HH:mm", status);
+ sdf->setCalendar(*testCal);
+ UnicodeString inDaylightTimeString;
+
+ UBool passed;
+
+ if(inDaylightTime)
+ {
+ inDaylightTimeString = " DST ";
+ passed = (tzOffset == (tzRawOffset + 3600000));
+ }
+ else
+ {
+ inDaylightTimeString = " ";
+ passed = (tzOffset == tzRawOffset);
+ }
+
+ UnicodeString output;
+ FieldPosition pos(0);
+ output = testTZ->getID(output) + " " + sdf->format(testDate, output, pos) +
+ " Offset(" + tzOffsetFloat + ")" +
+ " RawOffset(" + tzRawOffsetFloat + ")" +
+ " " + millis/(float)3600000 + " " +
+ inDaylightTimeString;
+
+ if (passed)
+ output += " ";
+ else
+ output += "ERROR";
+
+ if (passed)
+ logln(output);
+ else
+ errln(output);
+
+ delete sdf;
+ return passed;
+}
+
+/**
+ * @bug 4126678
+ * CANNOT REPRODUDE
+ *
+ * Yet another _alleged_ bug in TimeZone::getOffset(), a method that never
+ * should have been made public. It's simply too hard to use correctly.
+ *
+ * The original test code failed to do the following:
+ * (1) Call Calendar::setTime() before getting the fields!
+ * (2) Use the right millis (as usual) for getOffset(); they were passing
+ * in the MILLIS field, instead of the STANDARD MILLIS IN DAY.
+ * When you fix these two problems, the test passes, as expected.
+ */
+void TimeZoneRegressionTest:: Test4126678()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal = Calendar::createInstance(status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete cal;
+ return;
+ }
+ failure(status, "Calendar::createInstance");
+ TimeZone *tz = TimeZone::createTimeZone("PST");
+ cal->adoptTimeZone(tz);
+
+ cal->set(1998 - 1900, UCAL_APRIL, 5, 10, 0);
+ //Date dt = new Date(1998-1900, Calendar::APRIL, 5, 10, 0);
+
+ if (! tz->useDaylightTime() || U_FAILURE(status))
+ errln("We're not in Daylight Savings Time and we should be.\n");
+
+ //cal.setTime(dt);
+ int32_t era = cal->get(UCAL_ERA, status);
+ int32_t year = cal->get(UCAL_YEAR, status);
+ int32_t month = cal->get(UCAL_MONTH, status);
+ int32_t day = cal->get(UCAL_DATE, status);
+ int32_t dayOfWeek = cal->get(UCAL_DAY_OF_WEEK, status);
+ int32_t millis = cal->get(UCAL_MILLISECOND, status) +
+ (cal->get(UCAL_SECOND, status) +
+ (cal->get(UCAL_MINUTE, status) +
+ (cal->get(UCAL_HOUR, status) * 60) * 60) * 1000) -
+ cal->get(UCAL_DST_OFFSET, status);
+
+ failure(status, "cal->get");
+ int32_t offset = tz->getOffset((uint8_t)era, year, month, day, (uint8_t)dayOfWeek, millis, status);
+ int32_t raw_offset = tz->getRawOffset();
+ /* Because of better historical timezone support based on Olson data,
+ * DST is not observed in year 98. Thus, the expected result is changed.
+ * As of Mar 2007, ICU timezone transition data is represented by 32-bit.
+ * When we support 64-bit Olson transition data, the actual offset in
+ * AD 98 for America/Los_Angeles will be changed again (-7:52:58). Until
+ * then, expected result is offset == raw_offset. -Yoshito
+ */
+ /*
+ if (offset == raw_offset)
+ errln("Offsets should not match when in DST");
+ */
+ /* TODO: When ICU support the Olson LMT offset for America/Los_Angeles, we need to update
+ * the reference data.
+ */
+ if (offset != raw_offset)
+ errln("Offsets should match");
+
+ delete cal;
+}
+
+/**
+ * @bug 4151406
+ * TimeZone::getAvailableIDs(int32_t) throws exception for certain values,
+ * due to a faulty constant in TimeZone::java.
+ */
+void TimeZoneRegressionTest:: Test4151406() {
+ int32_t max = 0;
+ for (int32_t h=-28; h<=30; ++h) {
+ // h is in half-hours from GMT; rawoffset is in millis
+ int32_t rawoffset = h * 1800000;
+ int32_t hh = (h<0) ? -h : h;
+ UnicodeString hname = UnicodeString((h<0) ? "GMT-" : "GMT+") +
+ ((hh/2 < 10) ? "0" : "") +
+ (hh/2) + ':' +
+ ((hh%2==0) ? "00" : "30");
+ //try {
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t count;
+ StringEnumeration* ids = TimeZone::createEnumeration(rawoffset);
+ count = ids->count(ec);
+ if (count> max)
+ max = count;
+ if (count > 0) {
+ logln(hname + ' ' + (UnicodeString)count + (UnicodeString)" e.g. " + *ids->snext(ec));
+ } else {
+ logln(hname + ' ' + count);
+ }
+ // weiv 11/27/2002: why uprv_free? This should be a delete
+ delete ids;
+ //delete [] ids;
+ //uprv_free(ids);
+ /*} catch (Exception e) {
+ errln(hname + ' ' + "Fail: " + e);
+ }*/
+ }
+ logln("Maximum zones per offset = %d", max);
+}
+
+/**
+ * @bug 4151429
+ */
+void TimeZoneRegressionTest:: Test4151429() {
+ // {sfb} silly test in C++, since we are using an enum and not an int
+ //try {
+ /*TimeZone *tz = TimeZone::createTimeZone("GMT");
+ UnicodeString name;
+ tz->getDisplayName(TRUE, TimeZone::LONG,
+ Locale.getDefault(), name);
+ errln("IllegalArgumentException not thrown by TimeZone::getDisplayName()");*/
+ //} catch(IllegalArgumentException e) {}
+}
+
+/**
+ * @bug 4154537
+ * SimpleTimeZone::hasSameRules() doesn't work for zones with no DST
+ * and different DST parameters.
+ */
+void TimeZoneRegressionTest:: Test4154537() {
+ UErrorCode status = U_ZERO_ERROR;
+ // tz1 and tz2 have no DST and different rule parameters
+ SimpleTimeZone *tz1 = new SimpleTimeZone(0, "1", 0, 0, 0, 0, 2, 0, 0, 0, status);
+ SimpleTimeZone *tz2 = new SimpleTimeZone(0, "2", 1, 0, 0, 0, 3, 0, 0, 0, status);
+ // tza and tzA have the same rule params
+ SimpleTimeZone *tza = new SimpleTimeZone(0, "a", 0, 1, 0, 0, 3, 2, 0, 0, status);
+ SimpleTimeZone *tzA = new SimpleTimeZone(0, "A", 0, 1, 0, 0, 3, 2, 0, 0, status);
+ // tzb differs from tza
+ SimpleTimeZone *tzb = new SimpleTimeZone(0, "b", 0, 1, 0, 0, 3, 1, 0, 0, status);
+
+ if(U_FAILURE(status))
+ errln("Couldn't create TimeZones");
+
+ if (tz1->useDaylightTime() || tz2->useDaylightTime() ||
+ !tza->useDaylightTime() || !tzA->useDaylightTime() ||
+ !tzb->useDaylightTime()) {
+ errln("Test is broken -- rewrite it");
+ }
+ if (!tza->hasSameRules(*tzA) || tza->hasSameRules(*tzb)) {
+ errln("Fail: hasSameRules() broken for zones with rules");
+ }
+ if (!tz1->hasSameRules(*tz2)) {
+ errln("Fail: hasSameRules() returns false for zones without rules");
+ //errln("zone 1 = " + tz1);
+ //errln("zone 2 = " + tz2);
+ }
+
+ delete tz1;
+ delete tz2;
+ delete tza;
+ delete tzA;
+ delete tzb;
+}
+
+/**
+ * @bug 4154542
+ * SimpleTimeZOne constructors, setStartRule(), and setEndRule() don't
+ * check for out-of-range arguments.
+ */
+void TimeZoneRegressionTest:: Test4154542()
+{
+ const int32_t GOOD = 1;
+ const int32_t BAD = 0;
+
+ const int32_t GOOD_MONTH = UCAL_JANUARY;
+ const int32_t GOOD_DAY = 1;
+ const int32_t GOOD_DAY_OF_WEEK = UCAL_SUNDAY;
+ const int32_t GOOD_TIME = 0;
+
+ int32_t DATA [] = {
+ GOOD, INT32_MIN, 0, INT32_MAX, INT32_MIN,
+ GOOD, UCAL_JANUARY, -5, UCAL_SUNDAY, 0,
+ GOOD, UCAL_DECEMBER, 5, UCAL_SATURDAY, 24*60*60*1000,
+ BAD, UCAL_DECEMBER, 5, UCAL_SATURDAY, 24*60*60*1000+1,
+ BAD, UCAL_DECEMBER, 5, UCAL_SATURDAY, -1,
+ BAD, UCAL_JANUARY, -6, UCAL_SUNDAY, 0,
+ BAD, UCAL_DECEMBER, 6, UCAL_SATURDAY, 24*60*60*1000,
+ GOOD, UCAL_DECEMBER, 1, 0, 0,
+ GOOD, UCAL_DECEMBER, 31, 0, 0,
+ BAD, UCAL_APRIL, 31, 0, 0,
+ BAD, UCAL_DECEMBER, 32, 0, 0,
+ BAD, UCAL_JANUARY-1, 1, UCAL_SUNDAY, 0,
+ BAD, UCAL_DECEMBER+1, 1, UCAL_SUNDAY, 0,
+ GOOD, UCAL_DECEMBER, 31, -UCAL_SUNDAY, 0,
+ GOOD, UCAL_DECEMBER, 31, -UCAL_SATURDAY, 0,
+ BAD, UCAL_DECEMBER, 32, -UCAL_SATURDAY, 0,
+ BAD, UCAL_DECEMBER, -32, -UCAL_SATURDAY, 0,
+ BAD, UCAL_DECEMBER, 31, -UCAL_SATURDAY-1, 0,
+ };
+ SimpleTimeZone *zone = new SimpleTimeZone(0, "Z");
+ for (int32_t i=0; i < 18*5; i+=5) {
+ UBool shouldBeGood = (DATA[i] == GOOD);
+ int32_t month = DATA[i+1];
+ int32_t day = DATA[i+2];
+ int32_t dayOfWeek = DATA[i+3];
+ int32_t time = DATA[i+4];
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ //Exception ex = null;
+ //try {
+ zone->setStartRule(month, day, dayOfWeek, time, status);
+ //} catch (IllegalArgumentException e) {
+ // ex = e;
+ //}
+ if (U_SUCCESS(status) != shouldBeGood) {
+ errln(UnicodeString("setStartRule(month=") + month + ", day=" + day +
+ ", dayOfWeek=" + dayOfWeek + ", time=" + time +
+ (shouldBeGood ? (") should work")
+ : ") should fail but doesn't"));
+ }
+
+ //ex = null;
+ //try {
+ status = U_ZERO_ERROR;
+ zone->setEndRule(month, day, dayOfWeek, time, status);
+ //} catch (IllegalArgumentException e) {
+ // ex = e;
+ //}
+ if (U_SUCCESS(status) != shouldBeGood) {
+ errln(UnicodeString("setEndRule(month=") + month + ", day=" + day +
+ ", dayOfWeek=" + dayOfWeek + ", time=" + time +
+ (shouldBeGood ? (") should work")
+ : ") should fail but doesn't"));
+ }
+
+ //ex = null;
+ //try {
+ // {sfb} need to look into ctor problems! (UErrorCode vs. dst signature confusion)
+ status = U_ZERO_ERROR;
+ SimpleTimeZone *temp = new SimpleTimeZone(0, "Z",
+ (int8_t)month, (int8_t)day, (int8_t)dayOfWeek, time,
+ (int8_t)GOOD_MONTH, (int8_t)GOOD_DAY, (int8_t)GOOD_DAY_OF_WEEK,
+ GOOD_TIME,status);
+ //} catch (IllegalArgumentException e) {
+ // ex = e;
+ //}
+ if (U_SUCCESS(status) != shouldBeGood) {
+ errln(UnicodeString("SimpleTimeZone(month=") + month + ", day=" + day +
+ ", dayOfWeek=" + dayOfWeek + ", time=" + time +
+ (shouldBeGood ? (", <end>) should work")// + ex)
+ : ", <end>) should fail but doesn't"));
+ }
+
+ delete temp;
+ //ex = null;
+ //try {
+ status = U_ZERO_ERROR;
+ temp = new SimpleTimeZone(0, "Z",
+ (int8_t)GOOD_MONTH, (int8_t)GOOD_DAY, (int8_t)GOOD_DAY_OF_WEEK,
+ GOOD_TIME,
+ (int8_t)month, (int8_t)day, (int8_t)dayOfWeek, time,status);
+ //} catch (IllegalArgumentException e) {
+ // ex = e;
+ //}
+ if (U_SUCCESS(status) != shouldBeGood) {
+ errln(UnicodeString("SimpleTimeZone(<start>, month=") + month + ", day=" + day +
+ ", dayOfWeek=" + dayOfWeek + ", time=" + time +
+ (shouldBeGood ? (") should work")// + ex)
+ : ") should fail but doesn't"));
+ }
+ delete temp;
+ }
+ delete zone;
+}
+
+
+/**
+ * @bug 4154525
+ * SimpleTimeZone accepts illegal DST savings values. These values
+ * must be non-zero. There is no upper limit at this time.
+ */
+void
+TimeZoneRegressionTest::Test4154525()
+{
+ const int32_t GOOD = 1, BAD = 0;
+
+ int32_t DATA [] = {
+ 1, GOOD,
+ 0, BAD,
+ -1, BAD,
+ 60*60*1000, GOOD,
+ INT32_MIN, BAD,
+ // Integer.MAX_VALUE, ?, // no upper limit on DST savings at this time
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ for(int32_t i = 0; i < 10; i+=2) {
+ int32_t savings = DATA[i];
+ UBool valid = DATA[i+1] == GOOD;
+ UnicodeString method;
+ for(int32_t j=0; j < 2; ++j) {
+ SimpleTimeZone *z=NULL;
+ switch (j) {
+ case 0:
+ method = "constructor";
+ z = new SimpleTimeZone(0, "id",
+ UCAL_JANUARY, 1, 0, 0,
+ UCAL_MARCH, 1, 0, 0,
+ savings, status); // <- what we're interested in
+ break;
+ case 1:
+ method = "setDSTSavings()";
+ z = new SimpleTimeZone(0, "GMT");
+ z->setDSTSavings(savings, status);
+ break;
+ }
+
+ if(U_FAILURE(status)) {
+ if(valid) {
+ errln(UnicodeString("Fail: DST savings of ") + savings + " to " + method + " gave " + u_errorName(status));
+ }
+ else {
+ logln(UnicodeString("Pass: DST savings of ") + savings + " to " + method + " gave " + u_errorName(status));
+ }
+ }
+ else {
+ if(valid) {
+ logln(UnicodeString("Pass: DST savings of ") + savings + " accepted by " + method);
+ }
+ else {
+ errln(UnicodeString("Fail: DST savings of ") + savings + " accepted by " + method);
+ }
+ }
+ status = U_ZERO_ERROR;
+ delete z;
+ }
+ }
+}
+
+/**
+ * @bug 4154650
+ * SimpleTimeZone.getOffset accepts illegal arguments.
+ */
+void
+TimeZoneRegressionTest::Test4154650()
+{
+ const int32_t GOOD = 1, BAD = 0;
+ const int32_t GOOD_ERA = GregorianCalendar::AD, GOOD_YEAR = 1998, GOOD_MONTH = UCAL_AUGUST;
+ const int32_t GOOD_DAY = 2, GOOD_DOW = UCAL_SUNDAY, GOOD_TIME = 16*3600000;
+
+ int32_t DATA []= {
+ GOOD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+
+ GOOD, GregorianCalendar::BC, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+ GOOD, GregorianCalendar::AD, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+ BAD, GregorianCalendar::BC-1, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+ BAD, GregorianCalendar::AD+1, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+
+ GOOD, GOOD_ERA, GOOD_YEAR, UCAL_JANUARY, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+ GOOD, GOOD_ERA, GOOD_YEAR, UCAL_DECEMBER, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+ BAD, GOOD_ERA, GOOD_YEAR, UCAL_JANUARY-1, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+ BAD, GOOD_ERA, GOOD_YEAR, UCAL_DECEMBER+1, GOOD_DAY, GOOD_DOW, GOOD_TIME,
+
+ GOOD, GOOD_ERA, GOOD_YEAR, UCAL_JANUARY, 1, GOOD_DOW, GOOD_TIME,
+ GOOD, GOOD_ERA, GOOD_YEAR, UCAL_JANUARY, 31, GOOD_DOW, GOOD_TIME,
+ BAD, GOOD_ERA, GOOD_YEAR, UCAL_JANUARY, 0, GOOD_DOW, GOOD_TIME,
+ BAD, GOOD_ERA, GOOD_YEAR, UCAL_JANUARY, 32, GOOD_DOW, GOOD_TIME,
+
+ GOOD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, UCAL_SUNDAY, GOOD_TIME,
+ GOOD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, UCAL_SATURDAY, GOOD_TIME,
+ BAD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, UCAL_SUNDAY-1, GOOD_TIME,
+ BAD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, UCAL_SATURDAY+1, GOOD_TIME,
+
+ GOOD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, 0,
+ GOOD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, 24*3600000-1,
+ BAD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, -1,
+ BAD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, 24*3600000,
+ };
+
+ int32_t dataLen = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
+
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone *tz = TimeZone::createDefault();
+ for(int32_t i = 0; i < dataLen; i += 7) {
+ UBool good = DATA[i] == GOOD;
+ //IllegalArgumentException e = null;
+ //try {
+ /*int32_t offset = */
+ tz->getOffset((uint8_t)DATA[i+1], DATA[i+2], DATA[i+3],
+ DATA[i+4], (uint8_t)DATA[i+5], DATA[i+6], status);
+ //} catch (IllegalArgumentException ex) {
+ // e = ex;
+ //}
+ if(good != U_SUCCESS(status)) {
+ UnicodeString errMsg;
+ if (good) {
+ errMsg = (UnicodeString(") threw ") + u_errorName(status));
+ }
+ else {
+ errMsg = UnicodeString(") accepts invalid args", "");
+ }
+ errln(UnicodeString("Fail: getOffset(") +
+ DATA[i+1] + ", " + DATA[i+2] + ", " + DATA[i+3] + ", " +
+ DATA[i+4] + ", " + DATA[i+5] + ", " + DATA[i+6] +
+ errMsg);
+ }
+ status = U_ZERO_ERROR; // reset
+ }
+ delete tz;
+}
+
+/**
+ * @bug 4162593
+ * TimeZone broken at midnight. The TimeZone code fails to handle
+ * transitions at midnight correctly.
+ */
+void
+TimeZoneRegressionTest::Test4162593()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleDateFormat *fmt = new SimpleDateFormat("z", Locale::getUS(), status);
+ if(U_FAILURE(status)) {
+ errln("Error creating calendar %s", u_errorName(status));
+ delete fmt;
+ return;
+ }
+ const int32_t ONE_HOUR = 60*60*1000;
+
+ SimpleTimeZone *asuncion = new SimpleTimeZone(-4*ONE_HOUR, "America/Asuncion" /*PY%sT*/,
+ UCAL_OCTOBER, 1, 0 /*DOM*/, 0*ONE_HOUR,
+ UCAL_MARCH, 1, 0 /*DOM*/, 0*ONE_HOUR, 1*ONE_HOUR, status);
+
+ /* Zone
+ * Starting time
+ * Transition expected between start+1H and start+2H
+ */
+ TimeZone *DATA_TZ [] = {
+ 0, 0, 0 };
+
+ int32_t DATA_INT [] [5] = {
+ // These years must be AFTER the Gregorian cutover
+ {1998, UCAL_SEPTEMBER, 30, 22, 0},
+ {2000, UCAL_FEBRUARY, 28, 22, 0},
+ {2000, UCAL_FEBRUARY, 29, 22, 0},
+ };
+
+ UBool DATA_BOOL [] = {
+ TRUE,
+ FALSE,
+ TRUE,
+ };
+
+ UnicodeString zone [4];// = new String[4];
+ DATA_TZ[0] =
+ new SimpleTimeZone(2*ONE_HOUR, "Asia/Damascus" /*EE%sT*/,
+ UCAL_APRIL, 1, 0 /*DOM*/, 0*ONE_HOUR,
+ UCAL_OCTOBER, 1, 0 /*DOM*/, 0*ONE_HOUR, 1*ONE_HOUR, status);
+ DATA_TZ[1] = asuncion; DATA_TZ[2] = asuncion;
+
+ for(int32_t j = 0; j < 3; j++) {
+ TimeZone *tz = (TimeZone*)DATA_TZ[j];
+ TimeZone::setDefault(*tz);
+ fmt->setTimeZone(*tz);
+
+ // Must construct the Date object AFTER setting the default zone
+ int32_t *p = (int32_t*)DATA_INT[j];
+ UDate d = CalendarRegressionTest::makeDate(p[0], p[1], p[2], p[3], p[4]);
+ UBool transitionExpected = DATA_BOOL[j];
+
+ UnicodeString temp;
+ logln(tz->getID(temp) + ":");
+ for (int32_t i = 0; i < 4; ++i) {
+ FieldPosition pos(0);
+ zone[i].remove();
+ zone[i] = fmt->format(d+ i*ONE_HOUR, zone[i], pos);
+ logln(UnicodeString("") + i + ": " + d + " / " + zone[i]);
+ //d += (double) ONE_HOUR;
+ }
+ if(zone[0] == zone[1] &&
+ (zone[1] == zone[2]) != transitionExpected &&
+ zone[2] == zone[3]) {
+ logln(UnicodeString("Ok: transition ") + transitionExpected);
+ }
+ else {
+ errln("Fail: boundary transition incorrect");
+ }
+ }
+ delete fmt;
+ delete asuncion;
+ delete DATA_TZ[0];
+}
+
+ /**
+ * getDisplayName doesn't work with unusual savings/offsets.
+ */
+void TimeZoneRegressionTest::Test4176686() {
+ // Construct a zone that does not observe DST but
+ // that does have a DST savings (which should be ignored).
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t offset = 90 * 60000; // 1:30
+ SimpleTimeZone* z1 = new SimpleTimeZone(offset, "_std_zone_");
+ z1->setDSTSavings(45 * 60000, status); // 0:45
+
+ // Construct a zone that observes DST for the first 6 months.
+ SimpleTimeZone* z2 = new SimpleTimeZone(offset, "_dst_zone_");
+ z2->setDSTSavings(45 * 60000, status); // 0:45
+ z2->setStartRule(UCAL_JANUARY, 1, 0, status);
+ z2->setEndRule(UCAL_JULY, 1, 0, status);
+
+ // Also check DateFormat
+ DateFormat* fmt1 = new SimpleDateFormat(UnicodeString("z"), status);
+ if(!assertSuccess("trying to construct", status))return;
+ fmt1->setTimeZone(*z1); // Format uses standard zone
+ DateFormat* fmt2 = new SimpleDateFormat(UnicodeString("z"), status);
+ if(!assertSuccess("trying to construct", status))return;
+ fmt2->setTimeZone(*z2); // Format uses DST zone
+ Calendar* tempcal = Calendar::createInstance(status);
+ tempcal->clear();
+ tempcal->set(1970, UCAL_FEBRUARY, 1);
+ UDate dst = tempcal->getTime(status); // Time in DST
+ tempcal->set(1970, UCAL_AUGUST, 1);
+ UDate std = tempcal->getTime(status); // Time in standard
+
+ // Description, Result, Expected Result
+ UnicodeString a,b,c,d,e,f,g,h,i,j,k,l;
+ UnicodeString DATA[] = {
+ "z1->getDisplayName(false, SHORT)/std zone",
+ z1->getDisplayName(FALSE, TimeZone::SHORT, a), "GMT+01:30",
+ "z1->getDisplayName(false, LONG)/std zone",
+ z1->getDisplayName(FALSE, TimeZone::LONG, b), "GMT+01:30",
+ "z1->getDisplayName(true, SHORT)/std zone",
+ z1->getDisplayName(TRUE, TimeZone::SHORT, c), "GMT+01:30",
+ "z1->getDisplayName(true, LONG)/std zone",
+ z1->getDisplayName(TRUE, TimeZone::LONG, d ), "GMT+01:30",
+ "z2->getDisplayName(false, SHORT)/dst zone",
+ z2->getDisplayName(FALSE, TimeZone::SHORT, e), "GMT+01:30",
+ "z2->getDisplayName(false, LONG)/dst zone",
+ z2->getDisplayName(FALSE, TimeZone::LONG, f ), "GMT+01:30",
+ "z2->getDisplayName(true, SHORT)/dst zone",
+ z2->getDisplayName(TRUE, TimeZone::SHORT, g), "GMT+02:15",
+ "z2->getDisplayName(true, LONG)/dst zone",
+ z2->getDisplayName(TRUE, TimeZone::LONG, h ), "GMT+02:15",
+ "DateFormat.format(std)/std zone", fmt1->format(std, i), "GMT+01:30",
+ "DateFormat.format(dst)/std zone", fmt1->format(dst, j), "GMT+01:30",
+ "DateFormat.format(std)/dst zone", fmt2->format(std, k), "GMT+01:30",
+ "DateFormat.format(dst)/dst zone", fmt2->format(dst, l), "GMT+02:15",
+ };
+
+ for (int32_t idx=0; idx<(int32_t)ARRAY_LENGTH(DATA); idx+=3) {
+ if (DATA[idx+1]!=(DATA[idx+2])) {
+ errln("FAIL: " + DATA[idx] + " -> " + DATA[idx+1] + ", exp " + DATA[idx+2]);
+ }
+ }
+ delete z1;
+ delete z2;
+ delete fmt1;
+ delete fmt2;
+ delete tempcal;
+}
+
+/**
+ * Make sure setStartRule and setEndRule set the DST savings to nonzero
+ * if it was zero.
+ */
+void TimeZoneRegressionTest::TestJ186() {
+ UErrorCode status = U_ZERO_ERROR;
+ // NOTE: Setting the DST savings to zero is illegal, so we
+ // are limited in the testing we can do here. This is why
+ // lines marked //~ are commented out.
+ SimpleTimeZone z(0, "ID");
+ //~z.setDSTSavings(0, status); // Must do this!
+ z.setStartRule(UCAL_FEBRUARY, 1, UCAL_SUNDAY, 0, status);
+ failure(status, "setStartRule()");
+ if (z.useDaylightTime()) {
+ errln("Fail: useDaylightTime true with start rule only");
+ }
+ //~if (z.getDSTSavings() != 0) {
+ //~ errln("Fail: dst savings != 0 with start rule only");
+ //~}
+ z.setEndRule(UCAL_MARCH, -1, UCAL_SUNDAY, 0, status);
+ failure(status, "setStartRule()");
+ if (!z.useDaylightTime()) {
+ errln("Fail: useDaylightTime false with rules set");
+ }
+ if (z.getDSTSavings() == 0) {
+ errln("Fail: dst savings == 0 with rules set");
+ }
+}
+
+/**
+ * Test to see if DateFormat understands zone equivalency groups. It
+ * might seem that this should be a DateFormat test, but it's really a
+ * TimeZone test -- the changes to DateFormat are minor.
+ *
+ * We use two known, stable zones that shouldn't change much over time
+ * -- America/Vancouver and America/Los_Angeles. However, they MAY
+ * change at some point -- if that happens, replace them with any two
+ * zones in an equivalency group where one zone has localized name
+ * data, and the other doesn't, in some locale.
+ */
+void TimeZoneRegressionTest::TestJ449() {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString str;
+
+ // Modify the following three as necessary. The two IDs must
+ // specify two zones in the same equivalency group. One must have
+ // locale data in 'loc'; the other must not.
+ const char* idWithLocaleData = "America/Los_Angeles";
+ const char* idWithoutLocaleData = "US/Pacific";
+ const Locale loc("en", "", "");
+
+ TimeZone *zoneWith = TimeZone::createTimeZone(idWithLocaleData);
+ TimeZone *zoneWithout = TimeZone::createTimeZone(idWithoutLocaleData);
+ // Make sure we got valid zones
+ if (zoneWith->getID(str) != UnicodeString(idWithLocaleData) ||
+ zoneWithout->getID(str) != UnicodeString(idWithoutLocaleData)) {
+ errln(UnicodeString("Fail: Unable to create zones - wanted ") + idWithLocaleData + ", got " + zoneWith->getID(str) + ", and wanted " + idWithoutLocaleData + " but got " + zoneWithout->getID(str));
+ } else {
+ GregorianCalendar calWith(*zoneWith, status);
+ GregorianCalendar calWithout(*zoneWithout, status);
+ SimpleDateFormat fmt("MMM d yyyy hh:mm a zzz", loc, status);
+ if (U_FAILURE(status)) {
+ errln("Fail: Unable to create GregorianCalendar/SimpleDateFormat");
+ } else {
+ UDate date = 0;
+ UnicodeString strWith, strWithout;
+ fmt.setCalendar(calWith);
+ fmt.format(date, strWith);
+ fmt.setCalendar(calWithout);
+ fmt.format(date, strWithout);
+ if (strWith == strWithout) {
+ logln((UnicodeString)"Ok: " + idWithLocaleData + " -> " +
+ strWith + "; " + idWithoutLocaleData + " -> " +
+ strWithout);
+ } else {
+ errln((UnicodeString)"FAIL: " + idWithLocaleData + " -> " +
+ strWith + "; " + idWithoutLocaleData + " -> " +
+ strWithout);
+ }
+ }
+ }
+
+ delete zoneWith;
+ delete zoneWithout;
+}
+
+// test new API for JDK 1.2 8/31 putback
+void
+TimeZoneRegressionTest::TestJDK12API()
+{
+ // TimeZone *pst = TimeZone::createTimeZone("PST");
+ // TimeZone *cst1 = TimeZone::createTimeZone("CST");
+ UErrorCode ec = U_ZERO_ERROR;
+ //d,-28800,3,1,-1,120,w,9,-1,1,120,w,60
+ TimeZone *pst = new SimpleTimeZone(-28800*U_MILLIS_PER_SECOND,
+ "PST",
+ 3,1,-1,120*U_MILLIS_PER_MINUTE,
+ SimpleTimeZone::WALL_TIME,
+ 9,-1,1,120*U_MILLIS_PER_MINUTE,
+ SimpleTimeZone::WALL_TIME,
+ 60*U_MILLIS_PER_MINUTE,ec);
+ //d,-21600,3,1,-1,120,w,9,-1,1,120,w,60
+ TimeZone *cst1 = new SimpleTimeZone(-21600*U_MILLIS_PER_SECOND,
+ "CST",
+ 3,1,-1,120*U_MILLIS_PER_MINUTE,
+ SimpleTimeZone::WALL_TIME,
+ 9,-1,1,120*U_MILLIS_PER_MINUTE,
+ SimpleTimeZone::WALL_TIME,
+ 60*U_MILLIS_PER_MINUTE,ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: SimpleTimeZone constructor");
+ return;
+ }
+
+ SimpleTimeZone *cst = 0;
+
+ if(cst1->getDynamicClassID() == SimpleTimeZone::getStaticClassID())
+ cst = (SimpleTimeZone*) cst1;
+
+ if(pst->hasSameRules(*cst)) {
+ errln("FAILURE: PST and CST have same rules");
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t offset1 = pst->getOffset(1,
+ 1997, UCAL_OCTOBER, 26, UCAL_SUNDAY, (2*60*60*1000), status);
+ failure(status, "getOffset() failed");
+
+
+ int32_t offset2 = cst->getOffset(1,
+ 1997, UCAL_OCTOBER, 26, UCAL_SUNDAY, (2*60*60*1000), 31, status);
+ failure(status, "getOffset() failed");
+
+ if(offset1 == offset2)
+ errln("FAILURE: Sunday Oct. 26 1997 2:00 has same offset for PST and CST");
+
+ // verify error checking
+ pst->getOffset(1,
+ 1997, UCAL_FIELD_COUNT+1, 26, UCAL_SUNDAY, (2*60*60*1000), status);
+ if(U_SUCCESS(status))
+ errln("FAILURE: getOffset() succeeded with -1 for month");
+
+ status = U_ZERO_ERROR;
+ cst->setDSTSavings(60*60*1000, status);
+ failure(status, "setDSTSavings() failed");
+
+ int32_t savings = cst->getDSTSavings();
+ if(savings != 60*60*1000) {
+ errln("setDSTSavings() failed");
+ }
+
+ delete pst;
+ delete cst;
+}
+/**
+ * SimpleTimeZone allows invalid DOM values.
+ */
+void TimeZoneRegressionTest::Test4184229() {
+ SimpleTimeZone* zone = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ zone = new SimpleTimeZone(0, "A", 0, -1, 0, 0, 0, 0, 0, 0, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 startDay");
+ }else{
+ logln("(a) " + UnicodeString( u_errorName(status)));
+ }
+ status = U_ZERO_ERROR;
+ delete zone;
+
+ zone = new SimpleTimeZone(0, "A", 0, 0, 0, 0, 0, -1, 0, 0, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 endDay");
+ }else{
+ logln("(b) " + UnicodeString(u_errorName(status)));
+ }
+ status = U_ZERO_ERROR;
+ delete zone;
+
+ zone = new SimpleTimeZone(0, "A", 0, -1, 0, 0, 0, 0, 0, 1000, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 startDay+savings");
+ }else{
+ logln("(c) " + UnicodeString(u_errorName(status)));
+ }
+ status = U_ZERO_ERROR;
+ delete zone;
+ zone = new SimpleTimeZone(0, "A", 0, 0, 0, 0, 0, -1, 0, 0, 1000, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 endDay+ savings");
+ }else{
+ logln("(d) " + UnicodeString(u_errorName(status)));
+ }
+ status = U_ZERO_ERROR;
+ delete zone;
+ // Make a valid constructor call for subsequent tests.
+ zone = new SimpleTimeZone(0, "A", 0, 1, 0, 0, 0, 1, 0, 0, status);
+
+ zone->setStartRule(0, -1, 0, 0, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 setStartRule +savings");
+ } else{
+ logln("(e) " + UnicodeString(u_errorName(status)));
+ }
+ zone->setStartRule(0, -1, 0, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 setStartRule");
+ } else{
+ logln("(f) " + UnicodeString(u_errorName(status)));
+ }
+
+ zone->setEndRule(0, -1, 0, 0, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 setEndRule+savings");
+ } else{
+ logln("(g) " + UnicodeString(u_errorName(status)));
+ }
+
+ zone->setEndRule(0, -1, 0, status);
+ if(U_SUCCESS(status)){
+ errln("Failed. No exception has been thrown for DOM -1 setEndRule");
+ } else{
+ logln("(h) " + UnicodeString(u_errorName(status)));
+ }
+ delete zone;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzregts.h b/Build/source/libs/icu/icu-xetex/test/intltest/tzregts.h
new file mode 100644
index 00000000000..6b5500c953e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzregts.h
@@ -0,0 +1,61 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1998-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef _TIMEZONEREGRESSIONTEST_
+#define _TIMEZONEREGRESSIONTEST_
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/timezone.h"
+#include "unicode/gregocal.h"
+#include "unicode/simpletz.h"
+#include "intltest.h"
+
+
+
+/**
+ * Performs regression test for Calendar
+ **/
+class TimeZoneRegressionTest: public IntlTest {
+
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public:
+
+ void Test4052967(void);
+ void Test4073209(void);
+ void Test4073215(void);
+ void Test4084933(void);
+ void Test4096952(void);
+ void Test4109314(void);
+ void Test4126678(void);
+ void Test4151406(void);
+ void Test4151429(void);
+ void Test4154537(void);
+ void Test4154542(void);
+ void Test4154650(void);
+ void Test4154525(void);
+ void Test4162593(void);
+ void Test4176686(void);
+ void TestJ186(void);
+ void TestJ449(void);
+ void TestJDK12API(void);
+ void Test4184229(void);
+ UBool checkCalendar314(GregorianCalendar *testCal, TimeZone *testTZ);
+
+
+protected:
+ UDate findTransitionBinary(const SimpleTimeZone& tz, UDate min, UDate max);
+ UDate findTransitionStepwise(const SimpleTimeZone& tz, UDate min, UDate max);
+ UBool failure(UErrorCode status, const char* msg);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _CALENDARREGRESSIONTEST_
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.cpp
new file mode 100644
index 00000000000..702b502ea2c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.cpp
@@ -0,0 +1,2087 @@
+/*
+*******************************************************************************
+* Copyright (C) 2007, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+*******************************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/dtrule.h"
+#include "unicode/tzrule.h"
+#include "unicode/rbtz.h"
+#include "unicode/simpletz.h"
+#include "unicode/tzrule.h"
+#include "unicode/calendar.h"
+#include "unicode/gregocal.h"
+#include "unicode/ucal.h"
+#include "unicode/unistr.h"
+#include "unicode/tztrans.h"
+#include "unicode/vtzone.h"
+#include "tzrulets.h"
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
+#define HOUR (60*60*1000)
+
+static const char *const TESTZIDS[] = {
+ "AGT",
+ "America/New_York",
+ "America/Los_Angeles",
+ "America/Indiana/Indianapolis",
+ "America/Havana",
+ "Europe/Lisbon",
+ "Europe/Paris",
+ "Asia/Tokyo",
+ "Asia/Sakhalin",
+ "Africa/Cairo",
+ "Africa/Windhoek",
+ "Australia/Sydney",
+ "Etc/GMT+8"
+};
+
+class TestZIDEnumeration : public StringEnumeration {
+public:
+ TestZIDEnumeration(UBool all = FALSE);
+ ~TestZIDEnumeration();
+
+ virtual int32_t count(UErrorCode& /*status*/) const {
+ return len;
+ }
+ virtual const UnicodeString *snext(UErrorCode& status);
+ virtual void reset(UErrorCode& status);
+ static inline UClassID getStaticClassID() {
+ return (UClassID)&fgClassID;
+ }
+ virtual UClassID getDynamicClassID() const {
+ return getStaticClassID();
+ }
+private:
+ static const char fgClassID;
+ int32_t idx;
+ int32_t len;
+ StringEnumeration *tzenum;
+};
+
+const char TestZIDEnumeration::fgClassID = 0;
+
+TestZIDEnumeration::TestZIDEnumeration(UBool all)
+: idx(0) {
+ UErrorCode status = U_ZERO_ERROR;
+ if (all) {
+ tzenum = TimeZone::createEnumeration();
+ len = tzenum->count(status);
+ } else {
+ tzenum = NULL;
+ len = (int32_t)sizeof(TESTZIDS)/sizeof(TESTZIDS[0]);
+ }
+}
+
+TestZIDEnumeration::~TestZIDEnumeration() {
+ if (tzenum != NULL) {
+ delete tzenum;
+ }
+}
+
+const UnicodeString*
+TestZIDEnumeration::snext(UErrorCode& status) {
+ if (tzenum != NULL) {
+ return tzenum->snext(status);
+ } else if (U_SUCCESS(status) && idx < len) {
+ unistr = UnicodeString(TESTZIDS[idx++], "");
+ return &unistr;
+ }
+ return NULL;
+}
+
+void
+TestZIDEnumeration::reset(UErrorCode& status) {
+ if (tzenum != NULL) {
+ tzenum->reset(status);
+ } else {
+ idx = 0;
+ }
+}
+
+
+void TimeZoneRuleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) {
+ logln("TestSuite TestTimeZoneRule");
+ }
+ switch (index) {
+ CASE(0, TestSimpleRuleBasedTimeZone);
+ CASE(1, TestHistoricalRuleBasedTimeZone);
+ CASE(2, TestOlsonTransition);
+ CASE(3, TestRBTZTransition);
+ CASE(4, TestHasEquivalentTransitions);
+ CASE(5, TestVTimeZoneRoundTrip);
+ CASE(6, TestVTimeZoneRoundTripPartial);
+ CASE(7, TestVTimeZoneSimpleWrite);
+ CASE(8, TestVTimeZoneHeaderProps);
+ CASE(9, TestGetSimpleRules);
+ CASE(10, TestTimeZoneRuleCoverage);
+ CASE(11, TestSimpleTimeZoneCoverage);
+ CASE(12, TestVTimeZoneCoverage);
+ CASE(13, TestVTimeZoneParse);
+ default: name = ""; break;
+ }
+}
+
+/*
+ * Compare SimpleTimeZone with equivalent RBTZ
+ */
+void
+TimeZoneRuleTest::TestSimpleRuleBasedTimeZone(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ SimpleTimeZone stz(-1*HOUR, "TestSTZ",
+ UCAL_SEPTEMBER, -30, -UCAL_SATURDAY, 1*HOUR, SimpleTimeZone::WALL_TIME,
+ UCAL_FEBRUARY, 2, UCAL_SUNDAY, 1*HOUR, SimpleTimeZone::WALL_TIME,
+ 1*HOUR, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Couldn't create SimpleTimezone.");
+ }
+
+ DateTimeRule *dtr;
+ AnnualTimeZoneRule *atzr;
+ int32_t STARTYEAR = 2000;
+
+ InitialTimeZoneRule *ir = new InitialTimeZoneRule(
+ "RBTZ_Initial", // Initial time Name
+ -1*HOUR, // Raw offset
+ 1*HOUR); // DST saving amount
+
+ // Original rules
+ RuleBasedTimeZone *rbtz1 = new RuleBasedTimeZone("RBTZ1", ir->clone());
+ dtr = new DateTimeRule(UCAL_SEPTEMBER, 30, UCAL_SATURDAY, FALSE,
+ 1*HOUR, DateTimeRule::WALL_TIME); // SUN<=30 in September, at 1AM wall time
+ atzr = new AnnualTimeZoneRule("RBTZ_DST1",
+ -1*HOUR /*rawOffset*/, 1*HOUR /*dstSavings*/, dtr,
+ STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz1->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 1-1.");
+ }
+ dtr = new DateTimeRule(UCAL_FEBRUARY, 2, UCAL_SUNDAY,
+ 1*HOUR, DateTimeRule::WALL_TIME); // 2nd Sunday in February, at 1AM wall time
+ atzr = new AnnualTimeZoneRule("RBTZ_STD1",
+ -1*HOUR /*rawOffset*/, 0 /*dstSavings*/, dtr,
+ STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz1->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 1-2.");
+ }
+ rbtz1->complete(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't complete RBTZ 1.");
+ }
+
+ // Equivalent, but different date rule type
+ RuleBasedTimeZone *rbtz2 = new RuleBasedTimeZone("RBTZ2", ir->clone());
+ dtr = new DateTimeRule(UCAL_SEPTEMBER, -1, UCAL_SATURDAY,
+ 1*HOUR, DateTimeRule::WALL_TIME); // Last Sunday in September at 1AM wall time
+ atzr = new AnnualTimeZoneRule("RBTZ_DST2", -1*HOUR, 1*HOUR, dtr, STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz2->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 2-1.");
+ }
+ dtr = new DateTimeRule(UCAL_FEBRUARY, 8, UCAL_SUNDAY, true,
+ 1*HOUR, DateTimeRule::WALL_TIME); // SUN>=8 in February, at 1AM wall time
+ atzr = new AnnualTimeZoneRule("RBTZ_STD2", -1*HOUR, 0, dtr, STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz2->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 2-2.");
+ }
+ rbtz2->complete(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't complete RBTZ 2");
+ }
+
+ // Equivalent, but different time rule type
+ RuleBasedTimeZone *rbtz3 = new RuleBasedTimeZone("RBTZ3", ir->clone());
+ dtr = new DateTimeRule(UCAL_SEPTEMBER, 30, UCAL_SATURDAY, false,
+ 2*HOUR, DateTimeRule::UTC_TIME);
+ atzr = new AnnualTimeZoneRule("RBTZ_DST3", -1*HOUR, 1*HOUR, dtr, STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz3->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 3-1.");
+ }
+ dtr = new DateTimeRule(UCAL_FEBRUARY, 2, UCAL_SUNDAY,
+ 0*HOUR, DateTimeRule::STANDARD_TIME);
+ atzr = new AnnualTimeZoneRule("RBTZ_STD3", -1*HOUR, 0, dtr, STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz3->addTransitionRule(atzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 3-2.");
+ }
+ rbtz3->complete(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't complete RBTZ 3");
+ }
+
+ // Check equivalency for 10 years
+ UDate start = getUTCMillis(STARTYEAR, UCAL_JANUARY, 1);
+ UDate until = getUTCMillis(STARTYEAR + 10, UCAL_JANUARY, 1);
+
+ if (!(stz.hasEquivalentTransitions(*rbtz1, start, until, TRUE, status))) {
+ errln("FAIL: rbtz1 must be equivalent to the SimpleTimeZone in the time range.");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions");
+ }
+ if (!(stz.hasEquivalentTransitions(*rbtz2, start, until, TRUE, status))) {
+ errln("FAIL: rbtz2 must be equivalent to the SimpleTimeZone in the time range.");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions");
+ }
+ if (!(stz.hasEquivalentTransitions(*rbtz3, start, until, TRUE, status))) {
+ errln("FAIL: rbtz3 must be equivalent to the SimpleTimeZone in the time range.");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions");
+ }
+
+ // hasSameRules
+ if (rbtz1->hasSameRules(*rbtz2)) {
+ errln("FAIL: rbtz1 and rbtz2 have different rules, but returned true.");
+ }
+ if (rbtz1->hasSameRules(*rbtz3)) {
+ errln("FAIL: rbtz1 and rbtz3 have different rules, but returned true.");
+ }
+ RuleBasedTimeZone *rbtz1c = (RuleBasedTimeZone*)rbtz1->clone();
+ if (!rbtz1->hasSameRules(*rbtz1c)) {
+ errln("FAIL: Cloned RuleBasedTimeZone must have the same rules with the original.");
+ }
+
+ // getOffset
+ int32_t era, year, month, dayOfMonth, dayOfWeek, millisInDay;
+ UDate time;
+ int32_t offset, dstSavings;
+ UBool dst;
+
+ GregorianCalendar *cal = new GregorianCalendar(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Could not create a Gregorian calendar instance.");
+ }
+ cal->setTimeZone(*rbtz1);
+ cal->clear();
+
+ // Jan 1, 1000 BC
+ cal->set(UCAL_ERA, GregorianCalendar::BC);
+ cal->set(1000, UCAL_JANUARY, 1);
+
+ era = cal->get(UCAL_ERA, status);
+ year = cal->get(UCAL_YEAR, status);
+ month = cal->get(UCAL_MONTH, status);
+ dayOfMonth = cal->get(UCAL_DAY_OF_MONTH, status);
+ dayOfWeek = cal->get(UCAL_DAY_OF_WEEK, status);
+ millisInDay = cal->get(UCAL_MILLISECONDS_IN_DAY, status);
+ time = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Could not get calendar field values.");
+ }
+ offset = rbtz1->getOffset(era, year, month, dayOfMonth, dayOfWeek, millisInDay, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(7 args) failed.");
+ }
+ if (offset != 0) {
+ errln(UnicodeString("FAIL: Invalid time zone offset: ") + offset + " /expected: 0");
+ }
+ dst = rbtz1->inDaylightTime(time, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: inDaylightTime failed.");
+ }
+ if (!dst) {
+ errln("FAIL: Invalid daylight saving time");
+ }
+ rbtz1->getOffset(time, TRUE, offset, dstSavings, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(5 args) failed.");
+ }
+ if (offset != -3600000) {
+ errln(UnicodeString("FAIL: Invalid time zone raw offset: ") + offset + " /expected: -3600000");
+ }
+ if (dstSavings != 3600000) {
+ errln(UnicodeString("FAIL: Invalid DST amount: ") + dstSavings + " /expected: 3600000");
+ }
+
+ // July 1, 2000, AD
+ cal->set(UCAL_ERA, GregorianCalendar::AD);
+ cal->set(2000, UCAL_JULY, 1);
+
+ era = cal->get(UCAL_ERA, status);
+ year = cal->get(UCAL_YEAR, status);
+ month = cal->get(UCAL_MONTH, status);
+ dayOfMonth = cal->get(UCAL_DAY_OF_MONTH, status);
+ dayOfWeek = cal->get(UCAL_DAY_OF_WEEK, status);
+ millisInDay = cal->get(UCAL_MILLISECONDS_IN_DAY, status);
+ time = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Could not get calendar field values.");
+ }
+ offset = rbtz1->getOffset(era, year, month, dayOfMonth, dayOfWeek, millisInDay, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(7 args) failed.");
+ }
+ if (offset != -3600000) {
+ errln((UnicodeString)"FAIL: Invalid time zone offset: " + offset + " /expected: -3600000");
+ }
+ dst = rbtz1->inDaylightTime(time, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: inDaylightTime failed.");
+ }
+ if (dst) {
+ errln("FAIL: Invalid daylight saving time");
+ }
+ rbtz1->getOffset(time, TRUE, offset, dstSavings, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(5 args) failed.");
+ }
+ if (offset != -3600000) {
+ errln((UnicodeString)"FAIL: Invalid time zone raw offset: " + offset + " /expected: -3600000");
+ }
+ if (dstSavings != 0) {
+ errln((UnicodeString)"FAIL: Invalid DST amount: " + dstSavings + " /expected: 0");
+ }
+
+ // getRawOffset
+ offset = rbtz1->getRawOffset();
+ if (offset != -1*HOUR) {
+ errln((UnicodeString)"FAIL: Invalid time zone raw offset returned by getRawOffset: "
+ + offset + " /expected: -3600000");
+ }
+
+ // operator=/==/!=
+ RuleBasedTimeZone rbtz0("RBTZ1", ir->clone());
+ if (rbtz0 == *rbtz1 || !(rbtz0 != *rbtz1)) {
+ errln("FAIL: RuleBasedTimeZone rbtz0 is not equal to rbtz1, but got wrong result");
+ }
+ rbtz0 = *rbtz1;
+ if (rbtz0 != *rbtz1 || !(rbtz0 == *rbtz1)) {
+ errln("FAIL: RuleBasedTimeZone rbtz0 is equal to rbtz1, but got wrong result");
+ }
+
+ // setRawOffset
+ const int32_t RAW = -10*HOUR;
+ rbtz0.setRawOffset(RAW);
+ if (rbtz0.getRawOffset() != RAW) {
+ logln("setRawOffset is implemented in RuleBasedTimeZone");
+ }
+
+ // useDaylightTime
+ if (!rbtz1->useDaylightTime()) {
+ errln("FAIL: useDaylightTime returned FALSE");
+ }
+
+ // Try to add 3rd final rule
+ dtr = new DateTimeRule(UCAL_OCTOBER, 15, 1*HOUR, DateTimeRule::WALL_TIME);
+ atzr = new AnnualTimeZoneRule("3RD_ATZ", -1*HOUR, 2*HOUR, dtr, STARTYEAR, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz1->addTransitionRule(atzr, status);
+ if (U_SUCCESS(status)) {
+ errln("FAIL: 3rd final rule must be rejected");
+ } else {
+ delete atzr;
+ }
+
+ // Try to add an initial rule
+ InitialTimeZoneRule *ir1 = new InitialTimeZoneRule("Test Initial", 2*HOUR, 0);
+ rbtz1->addTransitionRule(ir1, status);
+ if (U_SUCCESS(status)) {
+ errln("FAIL: InitialTimeZoneRule must be rejected");
+ } else {
+ delete ir1;
+ }
+
+ delete ir;
+ delete rbtz1;
+ delete rbtz2;
+ delete rbtz3;
+ delete rbtz1c;
+ delete cal;
+}
+
+/*
+ * Test equivalency between OlsonTimeZone and custom RBTZ representing the
+ * equivalent rules in a certain time range
+ */
+void
+TimeZoneRuleTest::TestHistoricalRuleBasedTimeZone(void) {
+ UErrorCode status = U_ZERO_ERROR;
+
+ // Compare to America/New_York with equivalent RBTZ
+ BasicTimeZone *ny = (BasicTimeZone*)TimeZone::createTimeZone("America/New_York");
+
+ //RBTZ
+ InitialTimeZoneRule *ir = new InitialTimeZoneRule("EST", -5*HOUR, 0);
+ RuleBasedTimeZone *rbtz = new RuleBasedTimeZone("EST5EDT", ir);
+
+ DateTimeRule *dtr;
+ AnnualTimeZoneRule *tzr;
+
+ // Standard time
+ dtr = new DateTimeRule(UCAL_OCTOBER, -1, UCAL_SUNDAY,
+ 2*HOUR, DateTimeRule::WALL_TIME); // Last Sunday in October, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EST", -5*HOUR /*rawOffset*/, 0 /*dstSavings*/, dtr, 1967, 2006);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 1.");
+ }
+
+ dtr = new DateTimeRule(UCAL_NOVEMBER, 1, UCAL_SUNDAY,
+ true, 2*HOUR, DateTimeRule::WALL_TIME); // SUN>=1 in November, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EST", -5*HOUR, 0, dtr, 2007, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 2.");
+ }
+
+ // Daylight saving time
+ dtr = new DateTimeRule(UCAL_APRIL, -1, UCAL_SUNDAY,
+ 2*HOUR, DateTimeRule::WALL_TIME); // Last Sunday in April, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR, dtr, 1967, 1973);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 3.");
+ }
+
+ dtr = new DateTimeRule(UCAL_JANUARY, 6,
+ 2*HOUR, DateTimeRule::WALL_TIME); // January 6, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR, dtr, 1974, 1974);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 4.");
+ }
+
+ dtr = new DateTimeRule(UCAL_FEBRUARY, 23,
+ 2*HOUR, DateTimeRule::WALL_TIME); // February 23, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR, dtr, 1975, 1975);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 5.");
+ }
+
+ dtr = new DateTimeRule(UCAL_APRIL, -1, UCAL_SUNDAY,
+ 2*HOUR, DateTimeRule::WALL_TIME); // Last Sunday in April, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR, dtr, 1976, 1986);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 6.");
+ }
+
+ dtr = new DateTimeRule(UCAL_APRIL, 1, UCAL_SUNDAY,
+ true, 2*HOUR, DateTimeRule::WALL_TIME); // SUN>=1 in April, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR, dtr, 1987, 2006);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 7.");
+ }
+
+ dtr = new DateTimeRule(UCAL_MARCH, 8, UCAL_SUNDAY,
+ true, 2*HOUR, DateTimeRule::WALL_TIME); // SUN>=8 in March, at 2AM wall time
+ tzr = new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR, dtr, 2007, AnnualTimeZoneRule::MAX_YEAR);
+ rbtz->addTransitionRule(tzr, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add AnnualTimeZoneRule 7.");
+ }
+
+ rbtz->complete(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't complete RBTZ.");
+ }
+
+ // hasEquivalentTransitions
+ UDate jan1_1950 = getUTCMillis(1950, UCAL_JANUARY, 1);
+ UDate jan1_1967 = getUTCMillis(1971, UCAL_JANUARY, 1);
+ UDate jan1_2010 = getUTCMillis(2010, UCAL_JANUARY, 1);
+
+ if (!ny->hasEquivalentTransitions(*rbtz, jan1_1967, jan1_2010, TRUE, status)) {
+ errln("FAIL: The RBTZ must be equivalent to America/New_York between 1967 and 2010");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions for ny/rbtz 1967-2010");
+ }
+ if (ny->hasEquivalentTransitions(*rbtz, jan1_1950, jan1_2010, TRUE, status)) {
+ errln("FAIL: The RBTZ must not be equivalent to America/New_York between 1950 and 2010");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions for ny/rbtz 1950-2010");
+ }
+
+ // Same with above, but calling RBTZ#hasEquivalentTransitions against OlsonTimeZone
+ if (!rbtz->hasEquivalentTransitions(*ny, jan1_1967, jan1_2010, TRUE, status)) {
+ errln("FAIL: The RBTZ must be equivalent to America/New_York between 1967 and 2010");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions for rbtz/ny 1967-2010");
+ }
+ if (rbtz->hasEquivalentTransitions(*ny, jan1_1950, jan1_2010, TRUE, status)) {
+ errln("FAIL: The RBTZ must not be equivalent to America/New_York between 1950 and 2010");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions for rbtz/ny 1950-2010");
+ }
+
+ // TimeZone APIs
+ if (ny->hasSameRules(*rbtz) || rbtz->hasSameRules(*ny)) {
+ errln("FAIL: hasSameRules must return false");
+ }
+ RuleBasedTimeZone *rbtzc = (RuleBasedTimeZone*)rbtz->clone();
+ if (!rbtz->hasSameRules(*rbtzc) || !rbtz->hasEquivalentTransitions(*rbtzc, jan1_1950, jan1_2010, TRUE, status)) {
+ errln("FAIL: hasSameRules/hasEquivalentTransitions must return true for cloned RBTZs");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned from hasEquivalentTransitions for rbtz/rbtzc 1950-2010");
+ }
+
+ UDate times[] = {
+ getUTCMillis(2006, UCAL_MARCH, 15),
+ getUTCMillis(2006, UCAL_NOVEMBER, 1),
+ getUTCMillis(2007, UCAL_MARCH, 15),
+ getUTCMillis(2007, UCAL_NOVEMBER, 1),
+ getUTCMillis(2008, UCAL_MARCH, 15),
+ getUTCMillis(2008, UCAL_NOVEMBER, 1),
+ 0
+ };
+ int32_t offset1, dst1;
+ int32_t offset2, dst2;
+
+ for (int i = 0; times[i] != 0; i++) {
+ // Check getOffset - must return the same results for these time data
+ rbtz->getOffset(times[i], FALSE, offset1, dst1, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: rbtz->getOffset failed");
+ }
+ ny->getOffset(times[i], FALSE, offset2, dst2, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: ny->getOffset failed");
+ }
+ if (offset1 != offset2 || dst1 != dst2) {
+ errln("FAIL: Incompatible time zone offset/dstSavings for ny and rbtz");
+ }
+
+ // Check inDaylightTime
+ if (rbtz->inDaylightTime(times[i], status) != ny->inDaylightTime(times[i], status)) {
+ errln("FAIL: Incompatible daylight saving time for ny and rbtz");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: inDaylightTime failed");
+ }
+ }
+
+ delete ny;
+ delete rbtz;
+ delete rbtzc;
+}
+
+/*
+ * Check if transitions returned by getNextTransition/getPreviousTransition
+ * are actual time transitions.
+ */
+void
+TimeZoneRuleTest::TestOlsonTransition(void) {
+
+ const int32_t TESTYEARS[][2] = {
+ {1895, 1905}, // including int32 minimum second
+ {1965, 1975}, // including the epoch
+ {1995, 2015}, // practical year range
+ {0,0}
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ TestZIDEnumeration tzenum(!quick);
+ while (TRUE) {
+ const UnicodeString *tzid = tzenum.snext(status);
+ if (tzid == NULL) {
+ break;
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while enumerating timezone IDs.");
+ break;
+ }
+ BasicTimeZone *tz = (BasicTimeZone*)TimeZone::createTimeZone(*tzid);
+ for (int32_t i = 0; TESTYEARS[i][0] != 0 || TESTYEARS[i][1] != 0; i++) {
+ UDate lo = getUTCMillis(TESTYEARS[i][0], UCAL_JANUARY, 1);
+ UDate hi = getUTCMillis(TESTYEARS[i][1], UCAL_JANUARY, 1);
+ verifyTransitions(*tz, lo, hi);
+ }
+ delete tz;
+ }
+}
+
+/*
+ * Check if an OlsonTimeZone and its equivalent RBTZ have the exact same
+ * transitions.
+ */
+void
+TimeZoneRuleTest::TestRBTZTransition(void) {
+ const int32_t STARTYEARS[] = {
+ 1900,
+ 1960,
+ 1990,
+ 2010,
+ 0
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ TestZIDEnumeration tzenum(!quick);
+ while (TRUE) {
+ const UnicodeString *tzid = tzenum.snext(status);
+ if (tzid == NULL) {
+ break;
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while enumerating timezone IDs.");
+ break;
+ }
+ BasicTimeZone *tz = (BasicTimeZone*)TimeZone::createTimeZone(*tzid);
+ int32_t ruleCount = tz->countTransitionRules(status);
+
+ const InitialTimeZoneRule *initial;
+ const TimeZoneRule **trsrules = new const TimeZoneRule*[ruleCount];
+ tz->getTimeZoneRules(initial, trsrules, ruleCount, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: failed to get the TimeZoneRules from time zone " + *tzid);
+ }
+ RuleBasedTimeZone *rbtz = new RuleBasedTimeZone(*tzid, initial->clone());
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: failed to get the transition rule count from time zone " + *tzid);
+ }
+ for (int32_t i = 0; i < ruleCount; i++) {
+ rbtz->addTransitionRule(trsrules[i]->clone(), status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: failed to add a transition rule at index " + i + " to the RBTZ for " + *tzid);
+ }
+ }
+ rbtz->complete(status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: complete() failed for the RBTZ for " + *tzid);
+ }
+
+ for (int32_t idx = 0; STARTYEARS[idx] != 0; idx++) {
+ UDate start = getUTCMillis(STARTYEARS[idx], UCAL_JANUARY, 1);
+ UDate until = getUTCMillis(STARTYEARS[idx] + 20, UCAL_JANUARY, 1);
+ // Compare the original OlsonTimeZone with the RBTZ starting the startTime for 20 years
+
+ // Ascending
+ compareTransitionsAscending(*tz, *rbtz, start, until, FALSE);
+ // Ascending/inclusive
+ compareTransitionsAscending(*tz, *rbtz, start + 1, until, TRUE);
+ // Descending
+ compareTransitionsDescending(*tz, *rbtz, start, until, FALSE);
+ // Descending/inclusive
+ compareTransitionsDescending(*tz, *rbtz, start + 1, until, TRUE);
+ }
+ delete [] trsrules;
+ delete rbtz;
+ delete tz;
+ }
+}
+
+void
+TimeZoneRuleTest::TestHasEquivalentTransitions(void) {
+ // America/New_York and America/Indiana/Indianapolis are equivalent
+ // since 2006
+ UErrorCode status = U_ZERO_ERROR;
+ BasicTimeZone *newyork = (BasicTimeZone*)TimeZone::createTimeZone("America/New_York");
+ BasicTimeZone *indianapolis = (BasicTimeZone*)TimeZone::createTimeZone("America/Indiana/Indianapolis");
+ BasicTimeZone *gmt_5 = (BasicTimeZone*)TimeZone::createTimeZone("Etc/GMT+5");
+
+ UDate jan1_1971 = getUTCMillis(1971, UCAL_JANUARY, 1);
+ UDate jan1_2005 = getUTCMillis(2005, UCAL_JANUARY, 1);
+ UDate jan1_2006 = getUTCMillis(2006, UCAL_JANUARY, 1);
+ UDate jan1_2007 = getUTCMillis(2007, UCAL_JANUARY, 1);
+ UDate jan1_2011 = getUTCMillis(2010, UCAL_JANUARY, 1);
+
+ if (newyork->hasEquivalentTransitions(*indianapolis, jan1_2005, jan1_2011, TRUE, status)) {
+ errln("FAIL: New_York is not equivalent to Indianapolis between 2005 and 2010");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition");
+ }
+ if (!newyork->hasEquivalentTransitions(*indianapolis, jan1_2006, jan1_2011, TRUE, status)) {
+ errln("FAIL: New_York is equivalent to Indianapolis between 2006 and 2010");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition");
+ }
+
+ if (!indianapolis->hasEquivalentTransitions(*gmt_5, jan1_1971, jan1_2006, TRUE, status)) {
+ errln("FAIL: Indianapolis is equivalent to GMT+5 between 1971 and 2005");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition");
+ }
+ if (indianapolis->hasEquivalentTransitions(*gmt_5, jan1_1971, jan1_2007, TRUE, status)) {
+ errln("FAIL: Indianapolis is not equivalent to GMT+5 between 1971 and 2006");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition");
+ }
+
+ // Cloned TimeZone
+ BasicTimeZone *newyork2 = (BasicTimeZone*)newyork->clone();
+ if (!newyork->hasEquivalentTransitions(*newyork2, jan1_1971, jan1_2011, FALSE, status)) {
+ errln("FAIL: Cloned TimeZone must have the same transitions");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition for newyork/newyork2");
+ }
+ if (!newyork->hasEquivalentTransitions(*newyork2, jan1_1971, jan1_2011, TRUE, status)) {
+ errln("FAIL: Cloned TimeZone must have the same transitions");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition for newyork/newyork2");
+ }
+
+ // America/New_York and America/Los_Angeles has same DST start rules, but
+ // raw offsets are different
+ BasicTimeZone *losangeles = (BasicTimeZone*)TimeZone::createTimeZone("America/Los_Angeles");
+ if (newyork->hasEquivalentTransitions(*losangeles, jan1_2006, jan1_2011, TRUE, status)) {
+ errln("FAIL: New_York is not equivalent to Los Angeles, but returned true");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition for newyork/losangeles");
+ }
+
+ delete newyork;
+ delete newyork2;
+ delete indianapolis;
+ delete gmt_5;
+ delete losangeles;
+}
+
+/*
+ * Write out time zone rules of OlsonTimeZone into VTIMEZONE format, create a new
+ * VTimeZone from the VTIMEZONE data, then compare transitions
+ */
+void
+TimeZoneRuleTest::TestVTimeZoneRoundTrip(void) {
+ UDate startTime = getUTCMillis(1850, UCAL_JANUARY, 1);
+ UDate endTime = getUTCMillis(2050, UCAL_JANUARY, 1);
+
+ UErrorCode status = U_ZERO_ERROR;
+ TestZIDEnumeration tzenum(!quick);
+ while (TRUE) {
+ const UnicodeString *tzid = tzenum.snext(status);
+ if (tzid == NULL) {
+ break;
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while enumerating timezone IDs.");
+ break;
+ }
+ BasicTimeZone *tz = (BasicTimeZone*)TimeZone::createTimeZone(*tzid);
+ VTimeZone *vtz_org = VTimeZone::createVTimeZoneByID(*tzid);
+ vtz_org->setTZURL("http://source.icu-project.org/timezone");
+ vtz_org->setLastModified(Calendar::getNow());
+ VTimeZone *vtz_new = NULL;
+ UnicodeString vtzdata;
+ // Write out VTIMEZONE data
+ vtz_org->write(vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: error returned while writing time zone rules for " +
+ *tzid + " into VTIMEZONE format.");
+ } else {
+ // Read VTIMEZONE data
+ vtz_new = VTimeZone::createVTimeZone(vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: error returned while reading VTIMEZONE data for " + *tzid);
+ } else {
+ // Write out VTIMEZONE one more time
+ UnicodeString vtzdata1;
+ vtz_new->write(vtzdata1, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: error returned while writing time zone rules for " +
+ *tzid + "(vtz_new) into VTIMEZONE format.");
+ } else {
+ // Make sure VTIMEZONE data is exactly same with the first one
+ if (vtzdata != vtzdata1) {
+ errln((UnicodeString)"FAIL: different VTIMEZONE data after round trip for " + *tzid);
+ }
+ }
+ // Check equivalency after the first transition.
+ // The DST information before the first transition might be lost
+ // because there is no good way to represent the initial time with
+ // VTIMEZONE.
+ int32_t raw1, raw2, dst1, dst2;
+ tz->getOffset(startTime, FALSE, raw1, dst1, status);
+ vtz_new->getOffset(startTime, FALSE, raw2, dst2, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from getOffset");
+ } else {
+ if (raw1 + dst1 != raw2 + dst2) {
+ errln("FAIL: VTimeZone for " + *tzid +
+ " is not equivalent to its OlsonTimeZone corresponding at "
+ + dateToString(startTime));
+ }
+ TimeZoneTransition trans;
+ UBool avail = tz->getNextTransition(startTime, FALSE, trans);
+ if (avail) {
+ if (!vtz_new->hasEquivalentTransitions(*tz, trans.getTime(),
+ endTime, TRUE, status)) {
+ errln("FAIL: VTimeZone for " + *tzid +
+ " is not equivalent to its OlsonTimeZone corresponding.");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition");
+ }
+ }
+ }
+ }
+ if (vtz_new != NULL) {
+ delete vtz_new;
+ vtz_new = NULL;
+ }
+ }
+ delete tz;
+ delete vtz_org;
+ }
+}
+
+/*
+ * Write out time zone rules of OlsonTimeZone after a cutover date into VTIMEZONE format,
+ * create a new VTimeZone from the VTIMEZONE data, then compare transitions
+ */
+void
+TimeZoneRuleTest::TestVTimeZoneRoundTripPartial(void) {
+ const int32_t STARTYEARS[] = {
+ 1900,
+ 1950,
+ 2020,
+ 0
+ };
+ UDate endTime = getUTCMillis(2050, UCAL_JANUARY, 1);
+
+ UErrorCode status = U_ZERO_ERROR;
+ TestZIDEnumeration tzenum(!quick);
+ while (TRUE) {
+ const UnicodeString *tzid = tzenum.snext(status);
+ if (tzid == NULL) {
+ break;
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while enumerating timezone IDs.");
+ break;
+ }
+ BasicTimeZone *tz = (BasicTimeZone*)TimeZone::createTimeZone(*tzid);
+ VTimeZone *vtz_org = VTimeZone::createVTimeZoneByID(*tzid);
+ VTimeZone *vtz_new = NULL;
+ UnicodeString vtzdata;
+
+ for (int32_t i = 0; STARTYEARS[i] != 0; i++) {
+ // Write out VTIMEZONE
+ UDate startTime = getUTCMillis(STARTYEARS[i], UCAL_JANUARY, 1);
+ vtz_org->write(startTime, vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: error returned while writing time zone rules for " +
+ *tzid + " into VTIMEZONE format since " + dateToString(startTime));
+ } else {
+ // Read VTIMEZONE data
+ vtz_new = VTimeZone::createVTimeZone(vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: error returned while reading VTIMEZONE data for " + *tzid
+ + " since " + dateToString(startTime));
+ } else {
+ // Check equivalency after the first transition.
+ // The DST information before the first transition might be lost
+ // because there is no good way to represent the initial time with
+ // VTIMEZONE.
+ int32_t raw1, raw2, dst1, dst2;
+ tz->getOffset(startTime, FALSE, raw1, dst1, status);
+ vtz_new->getOffset(startTime, FALSE, raw2, dst2, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from getOffset");
+ } else {
+ if (raw1 + dst1 != raw2 + dst2) {
+ errln("FAIL: VTimeZone for " + *tzid +
+ " is not equivalent to its OlsonTimeZone corresponding at "
+ + dateToString(startTime));
+ }
+ TimeZoneTransition trans;
+ UBool avail = tz->getNextTransition(startTime, FALSE, trans);
+ if (avail) {
+ if (!vtz_new->hasEquivalentTransitions(*tz, trans.getTime(),
+ endTime, TRUE, status)) {
+ errln("FAIL: VTimeZone for " + *tzid +
+ " is not equivalent to its OlsonTimeZone corresponding.");
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error status is returned from hasEquivalentTransition");
+ }
+ }
+ }
+ }
+ }
+ if (vtz_new != NULL) {
+ delete vtz_new;
+ vtz_new = NULL;
+ }
+ }
+ delete tz;
+ delete vtz_org;
+ }
+}
+
+/*
+ * Write out simple time zone rules from an OlsonTimeZone at various time into VTIMEZONE
+ * format and create a new VTimeZone from the VTIMEZONE data, then make sure the raw offset
+ * and DST savings are same in these two time zones.
+ */
+void
+TimeZoneRuleTest::TestVTimeZoneSimpleWrite(void) {
+ const int32_t TESTDATES[][3] = {
+ {2006, UCAL_JANUARY, 1},
+ {2006, UCAL_MARCH, 15},
+ {2006, UCAL_MARCH, 31},
+ {2006, UCAL_OCTOBER, 25},
+ {2006, UCAL_NOVEMBER, 1},
+ {2006, UCAL_NOVEMBER, 5},
+ {2007, UCAL_JANUARY, 1},
+ {0, 0, 0}
+ };
+
+ UErrorCode status = U_ZERO_ERROR;
+ TestZIDEnumeration tzenum(!quick);
+ while (TRUE) {
+ const UnicodeString *tzid = tzenum.snext(status);
+ if (tzid == NULL) {
+ break;
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while enumerating timezone IDs.");
+ break;
+ }
+ VTimeZone *vtz_org = VTimeZone::createVTimeZoneByID(*tzid);
+ VTimeZone *vtz_new = NULL;
+ UnicodeString vtzdata;
+
+ for (int32_t i = 0; TESTDATES[i][0] != 0; i++) {
+ // Write out VTIMEZONE
+ UDate time = getUTCMillis(TESTDATES[i][0], TESTDATES[i][1], TESTDATES[i][2]);
+ vtz_org->writeSimple(time, vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: error returned while writing simple time zone rules for " +
+ *tzid + " into VTIMEZONE format at " + dateToString(time));
+ } else {
+ // Read VTIMEZONE data
+ vtz_new = VTimeZone::createVTimeZone(vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"FAIL: error returned while reading simple VTIMEZONE data for " + *tzid
+ + " at " + dateToString(time));
+ } else {
+ // Check equivalency
+ int32_t raw0, dst0;
+ int32_t raw1, dst1;
+ vtz_org->getOffset(time, FALSE, raw0, dst0, status);
+ vtz_new->getOffset(time, FALSE, raw1, dst1, status);
+ if (U_SUCCESS(status)) {
+ if (raw0 != raw1 || dst0 != dst1) {
+ errln("FAIL: VTimeZone writeSimple for " + *tzid + " at "
+ + dateToString(time) + " failed to the round trip.");
+ }
+ } else {
+ errln("FAIL: getOffset returns error status");
+ }
+ }
+ }
+ if (vtz_new != NULL) {
+ delete vtz_new;
+ vtz_new = NULL;
+ }
+ }
+ delete vtz_org;
+ }
+}
+
+/*
+ * Write out time zone rules of OlsonTimeZone into VTIMEZONE format with RFC2445 header TZURL and
+ * LAST-MODIFIED, create a new VTimeZone from the VTIMEZONE data to see if the headers are preserved.
+ */
+void
+TimeZoneRuleTest::TestVTimeZoneHeaderProps(void) {
+ const UnicodeString TESTURL1("http://source.icu-project.org");
+ const UnicodeString TESTURL2("http://www.ibm.com");
+
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString tzurl;
+ UDate lmod;
+ UDate lastmod = getUTCMillis(2007, UCAL_JUNE, 1);
+ VTimeZone *vtz = VTimeZone::createVTimeZoneByID("America/Chicago");
+ vtz->setTZURL(TESTURL1);
+ vtz->setLastModified(lastmod);
+
+ // Roundtrip conversion
+ UnicodeString vtzdata;
+ vtz->write(vtzdata, status);
+ VTimeZone *newvtz1 = NULL;
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while writing VTIMEZONE data 1");
+ return;
+ }
+ // Create a new one
+ newvtz1 = VTimeZone::createVTimeZone(vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while loading VTIMEZONE data 1");
+ } else {
+ // Check if TZURL and LAST-MODIFIED properties are preserved
+ newvtz1->getTZURL(tzurl);
+ if (tzurl != TESTURL1) {
+ errln("FAIL: TZURL 1 was not preserved");
+ }
+ vtz->getLastModified(lmod);
+ if (lastmod != lmod) {
+ errln("FAIL: LAST-MODIFIED was not preserved");
+ }
+ }
+
+ if (U_SUCCESS(status)) {
+ // Set different tzurl
+ newvtz1->setTZURL(TESTURL2);
+
+ // Second roundtrip, with a cutover
+ newvtz1->write(vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while writing VTIMEZONE data 2");
+ } else {
+ VTimeZone *newvtz2 = VTimeZone::createVTimeZone(vtzdata, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while loading VTIMEZONE data 2");
+ } else {
+ // Check if TZURL and LAST-MODIFIED properties are preserved
+ newvtz2->getTZURL(tzurl);
+ if (tzurl != TESTURL2) {
+ errln("FAIL: TZURL was not preserved in the second roundtrip");
+ }
+ vtz->getLastModified(lmod);
+ if (lastmod != lmod) {
+ errln("FAIL: LAST-MODIFIED was not preserved in the second roundtrip");
+ }
+ }
+ delete newvtz2;
+ }
+ }
+ delete newvtz1;
+ delete vtz;
+}
+
+/*
+ * Extract simple rules from an OlsonTimeZone and make sure the rule format matches
+ * the expected format.
+ */
+void
+TimeZoneRuleTest::TestGetSimpleRules(void) {
+ UDate testTimes[] = {
+ getUTCMillis(1970, UCAL_JANUARY, 1),
+ getUTCMillis(2000, UCAL_MARCH, 31),
+ getUTCMillis(2005, UCAL_JULY, 1),
+ getUTCMillis(2010, UCAL_NOVEMBER, 1),
+ };
+ int32_t numTimes = sizeof(testTimes)/sizeof(UDate);
+ UErrorCode status = U_ZERO_ERROR;
+ TestZIDEnumeration tzenum(!quick);
+ InitialTimeZoneRule *initial;
+ AnnualTimeZoneRule *std, *dst;
+ for (int32_t i = 0; i < numTimes ; i++) {
+ while (TRUE) {
+ const UnicodeString *tzid = tzenum.snext(status);
+ if (tzid == NULL) {
+ break;
+ }
+ if (U_FAILURE(status)) {
+ errln("FAIL: error returned while enumerating timezone IDs.");
+ break;
+ }
+ BasicTimeZone *tz = (BasicTimeZone*)TimeZone::createTimeZone(*tzid);
+ initial = NULL;
+ std = dst = NULL;
+ tz->getSimpleRulesNear(testTimes[i], initial, std, dst, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getSimpleRules failed.");
+ break;
+ }
+ if (initial == NULL) {
+ errln("FAIL: initial rule must not be NULL");
+ break;
+ } else if (!(std == NULL && dst == NULL || std != NULL && dst != NULL)) {
+ errln("FAIL: invalid std/dst pair.");
+ break;
+ }
+ if (std != NULL) {
+ const DateTimeRule *dtr = std->getRule();
+ if (dtr->getDateRuleType() != DateTimeRule::DOW) {
+ errln("FAIL: simple std rull must use DateTimeRule::DOW as date rule.");
+ break;
+ }
+ if (dtr->getTimeRuleType() != DateTimeRule::WALL_TIME) {
+ errln("FAIL: simple std rull must use DateTimeRule::WALL_TIME as time rule.");
+ break;
+ }
+ dtr = dst->getRule();
+ if (dtr->getDateRuleType() != DateTimeRule::DOW) {
+ errln("FAIL: simple dst rull must use DateTimeRule::DOW as date rule.");
+ break;
+ }
+ if (dtr->getTimeRuleType() != DateTimeRule::WALL_TIME) {
+ errln("FAIL: simple dst rull must use DateTimeRule::WALL_TIME as time rule.");
+ break;
+ }
+ }
+ // Create an RBTZ from the rules and compare the offsets at the date
+ RuleBasedTimeZone *rbtz = new RuleBasedTimeZone(*tzid, initial);
+ if (std != NULL) {
+ rbtz->addTransitionRule(std, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add std rule.");
+ }
+ rbtz->addTransitionRule(dst, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't add dst rule.");
+ }
+ }
+ rbtz->complete(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't complete rbtz for " + *tzid);
+ }
+
+ int32_t raw0, dst0, raw1, dst1;
+ tz->getOffset(testTimes[i], FALSE, raw0, dst0, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't get offsets from tz for " + *tzid);
+ }
+ rbtz->getOffset(testTimes[i], FALSE, raw1, dst1, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: couldn't get offsets from rbtz for " + *tzid);
+ }
+ if (raw0 != raw1 || dst0 != dst1) {
+ errln("FAIL: rbtz created by simple rule does not match the original tz for tzid " + *tzid);
+ }
+ delete rbtz;
+ delete tz;
+ }
+ }
+}
+
+/*
+ * API coverage tests for TimeZoneRule
+ */
+void
+TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
+ UDate time1 = getUTCMillis(2005, UCAL_JULY, 4);
+ UDate time2 = getUTCMillis(2015, UCAL_JULY, 4);
+ UDate time3 = getUTCMillis(1950, UCAL_JULY, 4);
+
+ DateTimeRule *dtr1 = new DateTimeRule(UCAL_FEBRUARY, 29, UCAL_SUNDAY, FALSE,
+ 3*HOUR, DateTimeRule::WALL_TIME); // Last Sunday on or before Feb 29, at 3 AM, wall time
+ DateTimeRule *dtr2 = new DateTimeRule(UCAL_MARCH, 11, 2*HOUR,
+ DateTimeRule::STANDARD_TIME); // Mar 11, at 2 AM, standard time
+ DateTimeRule *dtr3 = new DateTimeRule(UCAL_OCTOBER, -1, UCAL_SATURDAY,
+ 6*HOUR, DateTimeRule::UTC_TIME); //Last Saturday in Oct, at 6 AM, UTC
+ DateTimeRule *dtr4 = new DateTimeRule(UCAL_MARCH, 8, UCAL_SUNDAY, TRUE,
+ 2*HOUR, DateTimeRule::WALL_TIME); // First Sunday on or after Mar 8, at 2 AM, wall time
+
+ AnnualTimeZoneRule *a1 = new AnnualTimeZoneRule("a1", -3*HOUR, 1*HOUR, *dtr1,
+ 2000, AnnualTimeZoneRule::MAX_YEAR);
+ AnnualTimeZoneRule *a2 = new AnnualTimeZoneRule("a2", -3*HOUR, 1*HOUR, *dtr1,
+ 2000, AnnualTimeZoneRule::MAX_YEAR);
+ AnnualTimeZoneRule *a3 = new AnnualTimeZoneRule("a3", -3*HOUR, 1*HOUR, *dtr1,
+ 2000, 2010);
+
+ InitialTimeZoneRule *i1 = new InitialTimeZoneRule("i1", -3*HOUR, 0);
+ InitialTimeZoneRule *i2 = new InitialTimeZoneRule("i2", -3*HOUR, 0);
+ InitialTimeZoneRule *i3 = new InitialTimeZoneRule("i3", -3*HOUR, 1*HOUR);
+
+ UDate trtimes1[] = {0.0};
+ UDate trtimes2[] = {0.0, 10000000.0};
+
+ TimeArrayTimeZoneRule *t1 = new TimeArrayTimeZoneRule("t1", -3*HOUR, 0, trtimes1, 1, DateTimeRule::UTC_TIME);
+ TimeArrayTimeZoneRule *t2 = new TimeArrayTimeZoneRule("t2", -3*HOUR, 0, trtimes1, 1, DateTimeRule::UTC_TIME);
+ TimeArrayTimeZoneRule *t3 = new TimeArrayTimeZoneRule("t3", -3*HOUR, 0, trtimes2, 2, DateTimeRule::UTC_TIME);
+ TimeArrayTimeZoneRule *t4 = new TimeArrayTimeZoneRule("t4", -3*HOUR, 0, trtimes1, 1, DateTimeRule::STANDARD_TIME);
+ TimeArrayTimeZoneRule *t5 = new TimeArrayTimeZoneRule("t5", -4*HOUR, 1*HOUR, trtimes1, 1, DateTimeRule::WALL_TIME);
+
+ // DateTimeRule::operator=/clone
+ DateTimeRule dtr0(UCAL_MAY, 31, 2*HOUR, DateTimeRule::WALL_TIME);
+ if (dtr0 == *dtr1 || !(dtr0 != *dtr1)) {
+ errln("FAIL: DateTimeRule dtr0 is not equal to dtr1, but got wrong result");
+ }
+ dtr0 = *dtr1;
+ if (dtr0 != *dtr1 || !(dtr0 == *dtr1)) {
+ errln("FAIL: DateTimeRule dtr0 is equal to dtr1, but got wrong result");
+ }
+ DateTimeRule *dtr0c = dtr0.clone();
+ if (*dtr0c != *dtr1 || !(*dtr0c == *dtr1)) {
+ errln("FAIL: DateTimeRule dtr0c is equal to dtr1, but got wrong result");
+ }
+ delete dtr0c;
+
+ // AnnualTimeZonerule::operator=/clone
+ AnnualTimeZoneRule a0("a0", 5*HOUR, 1*HOUR, *dtr1, 1990, AnnualTimeZoneRule::MAX_YEAR);
+ if (a0 == *a1 || !(a0 != *a1)) {
+ errln("FAIL: AnnualTimeZoneRule a0 is not equal to a1, but got wrong result");
+ }
+ a0 = *a1;
+ if (a0 != *a1 || !(a0 == *a1)) {
+ errln("FAIL: AnnualTimeZoneRule a0 is equal to a1, but got wrong result");
+ }
+ AnnualTimeZoneRule *a0c = a0.clone();
+ if (*a0c != *a1 || !(*a0c == *a1)) {
+ errln("FAIL: AnnualTimeZoneRule a0c is equal to a1, but got wrong result");
+ }
+ delete a0c;
+
+ // AnnualTimeZoneRule::getRule
+ if (*(a1->getRule()) != *(a2->getRule())) {
+ errln("FAIL: The same DateTimeRule must be returned from AnnualTimeZoneRule a1 and a2");
+ }
+
+ // AnnualTimeZoneRule::getStartYear
+ int32_t startYear = a1->getStartYear();
+ if (startYear != 2000) {
+ errln((UnicodeString)"FAIL: The start year of AnnualTimeZoneRule a1 must be 2000 - returned: " + startYear);
+ }
+
+ // AnnualTimeZoneRule::getEndYear
+ int32_t endYear = a1->getEndYear();
+ if (endYear != AnnualTimeZoneRule::MAX_YEAR) {
+ errln((UnicodeString)"FAIL: The start year of AnnualTimeZoneRule a1 must be MAX_YEAR - returned: " + endYear);
+ }
+ endYear = a3->getEndYear();
+ if (endYear != 2010) {
+ errln((UnicodeString)"FAIL: The start year of AnnualTimeZoneRule a3 must be 2010 - returned: " + endYear);
+ }
+
+ // AnnualTimeZone::getStartInYear
+ UBool b1, b2;
+ UDate d1, d2;
+ b1 = a1->getStartInYear(2005, -3*HOUR, 0, d1);
+ b2 = a3->getStartInYear(2005, -3*HOUR, 0, d2);
+ if (!b1 || !b2 || d1 != d2) {
+ errln("FAIL: AnnualTimeZoneRule::getStartInYear did not work as expected");
+ }
+ b2 = a3->getStartInYear(2015, -3*HOUR, 0, d2);
+ if (b2) {
+ errln("FAIL: AnnualTimeZoneRule::getStartInYear returned TRUE for 2015 which is out of rule range");
+ }
+
+ // AnnualTimeZone::getFirstStart
+ b1 = a1->getFirstStart(-3*HOUR, 0, d1);
+ b2 = a1->getFirstStart(-4*HOUR, 1*HOUR, d2);
+ if (!b1 || !b2 || d1 != d2) {
+ errln("FAIL: The same start time should be returned by getFirstStart");
+ }
+
+ // AnnualTimeZone::getFinalStart
+ b1 = a1->getFinalStart(-3*HOUR, 0, d1);
+ if (b1) {
+ errln("FAIL: getFinalStart returned TRUE for a1");
+ }
+ b1 = a1->getStartInYear(2010, -3*HOUR, 0, d1);
+ b2 = a3->getFinalStart(-3*HOUR, 0, d2);
+ if (!b1 || !b2 || d1 != d2) {
+ errln("FAIL: Bad date is returned by getFinalStart");
+ }
+
+ // AnnualTimeZone::getNextStart / getPreviousStart
+ b1 = a1->getNextStart(time1, -3*HOUR, 0, FALSE, d1);
+ if (!b1) {
+ errln("FAIL: getNextStart returned FALSE for ai");
+ } else {
+ b2 = a1->getPreviousStart(d1, -3*HOUR, 0, TRUE, d2);
+ if (!b2 || d1 != d2) {
+ errln("FAIL: Bad Date is returned by getPreviousStart");
+ }
+ }
+ b1 = a3->getNextStart(time2, -3*HOUR, 0, FALSE, d1);
+ if (b1) {
+ errln("FAIL: getNextStart must return FALSE when no start time is available after the base time");
+ }
+ b1 = a3->getFinalStart(-3*HOUR, 0, d1);
+ b2 = a3->getPreviousStart(time2, -3*HOUR, 0, FALSE, d2);
+ if (!b1 || !b2 || d1 != d2) {
+ errln("FAIL: getPreviousStart does not match with getFinalStart after the end year");
+ }
+
+ // AnnualTimeZone::isEquavalentTo
+ if (!a1->isEquivalentTo(*a2)) {
+ errln("FAIL: AnnualTimeZoneRule a1 is equivalent to a2, but returned FALSE");
+ }
+ if (a1->isEquivalentTo(*a3)) {
+ errln("FAIL: AnnualTimeZoneRule a1 is not equivalent to a3, but returned TRUE");
+ }
+ if (!a1->isEquivalentTo(*a1)) {
+ errln("FAIL: AnnualTimeZoneRule a1 is equivalent to itself, but returned FALSE");
+ }
+ if (a1->isEquivalentTo(*t1)) {
+ errln("FAIL: AnnualTimeZoneRule is not equivalent to TimeArrayTimeZoneRule, but returned TRUE");
+ }
+
+ // InitialTimezoneRule::operator=/clone
+ InitialTimeZoneRule i0("i0", 10*HOUR, 0);
+ if (i0 == *i1 || !(i0 != *i1)) {
+ errln("FAIL: InitialTimeZoneRule i0 is not equal to i1, but got wrong result");
+ }
+ i0 = *i1;
+ if (i0 != *i1 || !(i0 == *i1)) {
+ errln("FAIL: InitialTimeZoneRule i0 is equal to i1, but got wrong result");
+ }
+ InitialTimeZoneRule *i0c = i0.clone();
+ if (*i0c != *i1 || !(*i0c == *i1)) {
+ errln("FAIL: InitialTimeZoneRule i0c is equal to i1, but got wrong result");
+ }
+ delete i0c;
+
+ // InitialTimeZoneRule::isEquivalentRule
+ if (!i1->isEquivalentTo(*i2)) {
+ errln("FAIL: InitialTimeZoneRule i1 is equivalent to i2, but returned FALSE");
+ }
+ if (i1->isEquivalentTo(*i3)) {
+ errln("FAIL: InitialTimeZoneRule i1 is not equivalent to i3, but returned TRUE");
+ }
+ if (i1->isEquivalentTo(*a1)) {
+ errln("FAIL: An InitialTimeZoneRule is not equivalent to an AnnualTimeZoneRule, but returned TRUE");
+ }
+
+ // InitialTimeZoneRule::getFirstStart/getFinalStart/getNextStart/getPreviousStart
+ b1 = i1->getFirstStart(0, 0, d1);
+ if (b1) {
+ errln("FAIL: InitialTimeZone::getFirstStart returned TRUE");
+ }
+ b1 = i1->getFinalStart(0, 0, d1);
+ if (b1) {
+ errln("FAIL: InitialTimeZone::getFinalStart returned TRUE");
+ }
+ b1 = i1->getNextStart(time1, 0, 0, FALSE, d1);
+ if (b1) {
+ errln("FAIL: InitialTimeZone::getNextStart returned TRUE");
+ }
+ b1 = i1->getPreviousStart(time1, 0, 0, FALSE, d1);
+ if (b1) {
+ errln("FAIL: InitialTimeZone::getPreviousStart returned TRUE");
+ }
+
+ // TimeArrayTimeZoneRule::operator=/clone
+ TimeArrayTimeZoneRule t0("t0", 4*HOUR, 0, trtimes1, 1, DateTimeRule::UTC_TIME);
+ if (t0 == *t1 || !(t0 != *t1)) {
+ errln("FAIL: TimeArrayTimeZoneRule t0 is not equal to t1, but got wrong result");
+ }
+ t0 = *t1;
+ if (t0 != *t1 || !(t0 == *t1)) {
+ errln("FAIL: TimeArrayTimeZoneRule t0 is equal to t1, but got wrong result");
+ }
+ TimeArrayTimeZoneRule *t0c = t0.clone();
+ if (*t0c != *t1 || !(*t0c == *t1)) {
+ errln("FAIL: TimeArrayTimeZoneRule t0c is equal to t1, but got wrong result");
+ }
+ delete t0c;
+
+ // TimeArrayTimeZoneRule::countStartTimes
+ if (t1->countStartTimes() != 1) {
+ errln("FAIL: Bad start time count is returned by TimeArrayTimeZoneRule::countStartTimes");
+ }
+
+ // TimeArrayTimeZoneRule::getStartTimeAt
+ b1 = t1->getStartTimeAt(-1, d1);
+ if (b1) {
+ errln("FAIL: TimeArrayTimeZoneRule::getStartTimeAt returned TRUE for index -1");
+ }
+ b1 = t1->getStartTimeAt(0, d1);
+ if (!b1 || d1 != trtimes1[0]) {
+ errln("FAIL: TimeArrayTimeZoneRule::getStartTimeAt returned incorrect result for index 0");
+ }
+ b1 = t1->getStartTimeAt(1, d1);
+ if (b1) {
+ errln("FAIL: TimeArrayTimeZoneRule::getStartTimeAt returned TRUE for index 1");
+ }
+
+ // TimeArrayTimeZoneRule::getTimeType
+ if (t1->getTimeType() != DateTimeRule::UTC_TIME) {
+ errln("FAIL: TimeArrayTimeZoneRule t1 uses UTC_TIME, but different type is returned");
+ }
+ if (t4->getTimeType() != DateTimeRule::STANDARD_TIME) {
+ errln("FAIL: TimeArrayTimeZoneRule t4 uses STANDARD_TIME, but different type is returned");
+ }
+ if (t5->getTimeType() != DateTimeRule::WALL_TIME) {
+ errln("FAIL: TimeArrayTimeZoneRule t5 uses WALL_TIME, but different type is returned");
+ }
+
+ // TimeArrayTimeZoneRule::getFirstStart/getFinalStart
+ b1 = t1->getFirstStart(0, 0, d1);
+ if (!b1 || d1 != trtimes1[0]) {
+ errln("FAIL: Bad first start time returned from TimeArrayTimeZoneRule t1");
+ }
+ b1 = t1->getFinalStart(0, 0, d1);
+ if (!b1 || d1 != trtimes1[0]) {
+ errln("FAIL: Bad final start time returned from TimeArrayTimeZoneRule t1");
+ }
+ b1 = t4->getFirstStart(-4*HOUR, 1*HOUR, d1);
+ if (!b1 || d1 != (trtimes1[0] + 4*HOUR)) {
+ errln("FAIL: Bad first start time returned from TimeArrayTimeZoneRule t4");
+ }
+ b1 = t5->getFirstStart(-4*HOUR, 1*HOUR, d1);
+ if (!b1 || d1 != (trtimes1[0] + 3*HOUR)) {
+ errln("FAIL: Bad first start time returned from TimeArrayTimeZoneRule t5");
+ }
+
+ // TimeArrayTimeZoneRule::getNextStart/getPreviousStart
+ b1 = t3->getNextStart(time1, -3*HOUR, 1*HOUR, FALSE, d1);
+ if (b1) {
+ errln("FAIL: getNextStart returned TRUE after the final transition for t3");
+ }
+ b1 = t3->getPreviousStart(time1, -3*HOUR, 1*HOUR, FALSE, d1);
+ if (!b1 || d1 != trtimes2[1]) {
+ errln("FAIL: Bad start time returned by getPreviousStart for t3");
+ } else {
+ b2 = t3->getPreviousStart(d1, -3*HOUR, 1*HOUR, FALSE, d2);
+ if (!b2 || d2 != trtimes2[0]) {
+ errln("FAIL: Bad start time returned by getPreviousStart for t3");
+ }
+ }
+ b1 = t3->getPreviousStart(time3, -3*HOUR, 1*HOUR, FALSE, d1); //time3 - year 1950, no result expected
+ if (b1) {
+ errln("FAIL: getPreviousStart returned TRUE before the first transition for t3");
+ }
+
+ // TimeArrayTimeZoneRule::isEquivalentTo
+ if (!t1->isEquivalentTo(*t2)) {
+ errln("FAIL: TimeArrayTimeZoneRule t1 is equivalent to t2, but returned FALSE");
+ }
+ if (t1->isEquivalentTo(*t3)) {
+ errln("FAIL: TimeArrayTimeZoneRule t1 is not equivalent to t3, but returned TRUE");
+ }
+ if (t1->isEquivalentTo(*t4)) {
+ errln("FAIL: TimeArrayTimeZoneRule t1 is not equivalent to t4, but returned TRUE");
+ }
+ if (t1->isEquivalentTo(*a1)) {
+ errln("FAIL: TimeArrayTimeZoneRule is not equivalent to AnnualTimeZoneRule, but returned TRUE");
+ }
+
+ delete dtr1;
+ delete dtr2;
+ delete dtr3;
+ delete dtr4;
+ delete a1;
+ delete a2;
+ delete a3;
+ delete i1;
+ delete i2;
+ delete i3;
+ delete t1;
+ delete t2;
+ delete t3;
+ delete t4;
+ delete t5;
+}
+
+/*
+ * API coverage test for BasicTimeZone APIs in SimpleTimeZone
+ */
+void
+TimeZoneRuleTest::TestSimpleTimeZoneCoverage(void) {
+ UDate time1 = getUTCMillis(1990, UCAL_JUNE, 1);
+ UDate time2 = getUTCMillis(2000, UCAL_JUNE, 1);
+
+ TimeZoneTransition tzt1, tzt2;
+ UBool avail1, avail2;
+ UErrorCode status = U_ZERO_ERROR;
+ const TimeZoneRule *trrules[2];
+ const InitialTimeZoneRule *ir = NULL;
+ int32_t numTzRules;
+
+ // BasicTimeZone API implementation in SimpleTimeZone
+ SimpleTimeZone *stz1 = new SimpleTimeZone(-5*HOUR, "GMT-5");
+
+ avail1 = stz1->getNextTransition(time1, FALSE, tzt1);
+ if (avail1) {
+ errln("FAIL: No transition must be returned by getNextTranstion for SimpleTimeZone with no DST rule");
+ }
+ avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
+ if (avail1) {
+ errln("FAIL: No transition must be returned by getPreviousTransition for SimpleTimeZone with no DST rule");
+ }
+
+ numTzRules = stz1->countTransitionRules(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: countTransitionRules failed");
+ }
+ if (numTzRules != 0) {
+ errln((UnicodeString)"FAIL: countTransitionRules returned " + numTzRules);
+ }
+ numTzRules = 2;
+ stz1->getTimeZoneRules(ir, trrules, numTzRules, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getTimeZoneRules failed");
+ }
+ if (numTzRules != 0) {
+ errln("FAIL: Incorrect transition rule count");
+ }
+ if (ir == NULL || ir->getRawOffset() != stz1->getRawOffset()) {
+ errln("FAIL: Bad initial time zone rule");
+ }
+
+ // Set DST rule
+ stz1->setStartRule(UCAL_MARCH, 11, 2*HOUR, status); // March 11
+ stz1->setEndRule(UCAL_NOVEMBER, 1, UCAL_SUNDAY, 2*HOUR, status); // First Sunday in November
+ if (U_FAILURE(status)) {
+ errln("FAIL: Failed to set DST rules in a SimpleTimeZone");
+ }
+
+ avail1 = stz1->getNextTransition(time1, FALSE, tzt1);
+ if (!avail1) {
+ errln("FAIL: Non-null transition must be returned by getNextTranstion for SimpleTimeZone with a DST rule");
+ }
+ avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
+ if (!avail1) {
+ errln("FAIL: Non-null transition must be returned by getPreviousTransition for SimpleTimeZone with a DST rule");
+ }
+
+ numTzRules = stz1->countTransitionRules(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: countTransitionRules failed");
+ }
+ if (numTzRules != 2) {
+ errln((UnicodeString)"FAIL: countTransitionRules returned " + numTzRules);
+ }
+
+ numTzRules = 2;
+ trrules[0] = NULL;
+ trrules[1] = NULL;
+ stz1->getTimeZoneRules(ir, trrules, numTzRules, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getTimeZoneRules failed");
+ }
+ if (numTzRules != 2) {
+ errln("FAIL: Incorrect transition rule count");
+ }
+ if (ir == NULL || ir->getRawOffset() != stz1->getRawOffset()) {
+ errln("FAIL: Bad initial time zone rule");
+ }
+ if (trrules[0] == NULL || trrules[0]->getRawOffset() != stz1->getRawOffset()) {
+ errln("FAIL: Bad transition rule 0");
+ }
+ if (trrules[1] == NULL || trrules[1]->getRawOffset() != stz1->getRawOffset()) {
+ errln("FAIL: Bad transition rule 1");
+ }
+
+ // Set DST start year
+ stz1->setStartYear(2007);
+ avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
+ if (avail1) {
+ errln("FAIL: No transition must be returned before 1990");
+ }
+ avail1 = stz1->getNextTransition(time1, FALSE, tzt1); // transition after 1990-06-01
+ avail2 = stz1->getNextTransition(time2, FALSE, tzt2); // transition after 2000-06-01
+ if (!avail1 || !avail2 || tzt1 != tzt2) {
+ errln("FAIL: Bad transition returned by SimpleTimeZone::getNextTransition");
+ }
+ delete stz1;
+}
+
+/*
+ * API coverage test for VTimeZone
+ */
+void
+TimeZoneRuleTest::TestVTimeZoneCoverage(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString TZID("Europe/Moscow");
+
+ BasicTimeZone *otz = (BasicTimeZone*)TimeZone::createTimeZone(TZID);
+ VTimeZone *vtz = VTimeZone::createVTimeZoneByID(TZID);
+
+ // getOffset(era, year, month, day, dayOfWeek, milliseconds, ec)
+ int32_t offset1 = otz->getOffset(GregorianCalendar::AD, 2007, UCAL_JULY, 1, UCAL_SUNDAY, 0, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(7 args) failed for otz");
+ }
+ int32_t offset2 = vtz->getOffset(GregorianCalendar::AD, 2007, UCAL_JULY, 1, UCAL_SUNDAY, 0, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(7 args) failed for vtz");
+ }
+ if (offset1 != offset2) {
+ errln("FAIL: getOffset(7 args) returned different results in VTimeZone and OlsonTimeZone");
+ }
+
+ // getOffset(era, year, month, day, dayOfWeek, milliseconds, monthLength, ec)
+ offset1 = otz->getOffset(GregorianCalendar::AD, 2007, UCAL_JULY, 1, UCAL_SUNDAY, 0, 31, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(8 args) failed for otz");
+ }
+ offset2 = vtz->getOffset(GregorianCalendar::AD, 2007, UCAL_JULY, 1, UCAL_SUNDAY, 0, 31, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(8 args) failed for vtz");
+ }
+ if (offset1 != offset2) {
+ errln("FAIL: getOffset(8 args) returned different results in VTimeZone and OlsonTimeZone");
+ }
+
+
+ // getOffset(date, local, rawOffset, dstOffset, ec)
+ UDate t = Calendar::getNow();
+ int32_t rawOffset1, dstSavings1;
+ int32_t rawOffset2, dstSavings2;
+
+ otz->getOffset(t, FALSE, rawOffset1, dstSavings1, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(5 args) failed for otz");
+ }
+ vtz->getOffset(t, FALSE, rawOffset2, dstSavings2, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset(5 args) failed for vtz");
+ }
+ if (rawOffset1 != rawOffset2 || dstSavings1 != dstSavings2) {
+ errln("FAIL: getOffset(long,boolean,int[]) returned different results in VTimeZone and OlsonTimeZone");
+ }
+
+ // getRawOffset
+ if (otz->getRawOffset() != vtz->getRawOffset()) {
+ errln("FAIL: getRawOffset returned different results in VTimeZone and OlsonTimeZone");
+ }
+
+ // inDaylightTime
+ UBool inDst1, inDst2;
+ inDst1 = otz->inDaylightTime(t, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: inDaylightTime failed for otz");
+ }
+ inDst2 = vtz->inDaylightTime(t, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: inDaylightTime failed for vtz");
+ }
+ if (inDst1 != inDst2) {
+ errln("FAIL: inDaylightTime returned different results in VTimeZone and OlsonTimeZone");
+ }
+
+ // useDaylightTime
+ if (otz->useDaylightTime() != vtz->useDaylightTime()) {
+ errln("FAIL: useDaylightTime returned different results in VTimeZone and OlsonTimeZone");
+ }
+
+ // setRawOffset
+ const int32_t RAW = -10*HOUR;
+ VTimeZone *tmpvtz = (VTimeZone*)vtz->clone();
+ tmpvtz->setRawOffset(RAW);
+ if (tmpvtz->getRawOffset() != RAW) {
+ logln("setRawOffset is implemented in VTimeZone");
+ }
+
+ // hasSameRules
+ UBool bSame = otz->hasSameRules(*vtz);
+ logln((UnicodeString)"OlsonTimeZone::hasSameRules(VTimeZone) should return FALSE always for now - actual: " + bSame);
+
+ // getTZURL/setTZURL
+ UnicodeString TZURL("http://icu-project.org/timezone");
+ UnicodeString url;
+ if (vtz->getTZURL(url)) {
+ errln("FAIL: getTZURL returned TRUE");
+ }
+ vtz->setTZURL(TZURL);
+ if (!vtz->getTZURL(url) || url != TZURL) {
+ errln("FAIL: URL returned by getTZURL does not match the one set by setTZURL");
+ }
+
+ // getLastModified/setLastModified
+ UDate lastmod;
+ if (vtz->getLastModified(lastmod)) {
+ errln("FAIL: getLastModified returned TRUE");
+ }
+ vtz->setLastModified(t);
+ if (!vtz->getLastModified(lastmod) || lastmod != t) {
+ errln("FAIL: Date returned by getLastModified does not match the one set by setLastModified");
+ }
+
+ // getNextTransition/getPreviousTransition
+ UDate base = getUTCMillis(2007, UCAL_JULY, 1);
+ TimeZoneTransition tzt1, tzt2;
+ UBool btr1 = otz->getNextTransition(base, TRUE, tzt1);
+ UBool btr2 = vtz->getNextTransition(base, TRUE, tzt2);
+ if (!btr1 || !btr2 || tzt1 != tzt2) {
+ errln("FAIL: getNextTransition returned different results in VTimeZone and OlsonTimeZone");
+ }
+ btr1 = otz->getPreviousTransition(base, FALSE, tzt1);
+ btr2 = vtz->getPreviousTransition(base, FALSE, tzt2);
+ if (!btr1 || !btr2 || tzt1 != tzt2) {
+ errln("FAIL: getPreviousTransition returned different results in VTimeZone and OlsonTimeZone");
+ }
+
+ // TimeZoneTransition constructor/clone
+ TimeZoneTransition *tzt1c = tzt1.clone();
+ if (*tzt1c != tzt1 || !(*tzt1c == tzt1)) {
+ errln("FAIL: TimeZoneTransition tzt1c is equal to tzt1, but got wrong result");
+ }
+ delete tzt1c;
+ TimeZoneTransition tzt3(tzt1);
+ if (tzt3 != tzt1 || !(tzt3 == tzt1)) {
+ errln("FAIL: TimeZoneTransition tzt3 is equal to tzt1, but got wrong result");
+ }
+
+ // hasEquivalentTransitions
+ UDate time1 = getUTCMillis(1950, UCAL_JANUARY, 1);
+ UDate time2 = getUTCMillis(2020, UCAL_JANUARY, 1);
+ UBool equiv = vtz->hasEquivalentTransitions(*otz, time1, time2, FALSE, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: hasEquivalentTransitions failed for vtz/otz");
+ }
+ if (!equiv) {
+ errln("FAIL: hasEquivalentTransitons returned false for the same time zone");
+ }
+
+ // operator=/operator==/operator!=
+ VTimeZone *vtz1 = VTimeZone::createVTimeZoneByID("America/Los_Angeles");
+ if (*vtz1 == *vtz || !(*vtz1 != *vtz)) {
+ errln("FAIL: VTimeZone vtz1 is not equal to vtz, but got wrong result");
+ }
+ *vtz1 = *vtz;
+ if (*vtz1 != *vtz || !(*vtz1 == *vtz)) {
+ errln("FAIL: VTimeZone vtz1 is equal to vtz, but got wrong result");
+ }
+
+ delete otz;
+ delete vtz;
+ delete tmpvtz;
+ delete vtz1;
+}
+
+
+void
+TimeZoneRuleTest::TestVTimeZoneParse(void) {
+ UErrorCode status = U_ZERO_ERROR;
+
+ // Trying to create VTimeZone from empty data
+ UnicodeString emptyData;
+ VTimeZone *empty = VTimeZone::createVTimeZone(emptyData, status);
+ if (U_SUCCESS(status) || empty != NULL) {
+ delete empty;
+ errln("FAIL: Non-null VTimeZone is returned for empty VTIMEZONE data");
+ }
+ status = U_ZERO_ERROR;
+
+ // Create VTimeZone for Asia/Tokyo
+ UnicodeString asiaTokyoID("Asia/Tokyo");
+ static const UChar asiaTokyo[] = {
+ /* "BEGIN:VTIMEZONE\x0D\x0A" */
+ 0x42,0x45,0x47,0x49,0x4E,0x3A,0x56,0x54,0x49,0x4D,0x45,0x5A,0x4F,0x4E,0x45,0x0D,0x0A,
+ /* "TZID:Asia\x0D\x0A" */
+ 0x54,0x5A,0x49,0x44,0x3A,0x41,0x73,0x69,0x61,0x0D,0x0A,
+ /* "\x09/Tokyo\x0D\x0A" */
+ 0x09,0x2F,0x54,0x6F,0x6B,0x79,0x6F,0x0D,0x0A,
+ /* "BEGIN:STANDARD\x0D\x0A" */
+ 0x42,0x45,0x47,0x49,0x4E,0x3A,0x53,0x54,0x41,0x4E,0x44,0x41,0x52,0x44,0x0D,0x0A,
+ /* "TZOFFSETFROM:+0900\x0D\x0A" */
+ 0x54,0x5A,0x4F,0x46,0x46,0x53,0x45,0x54,0x46,0x52,0x4F,0x4D,0x3A,0x2B,0x30,0x39,0x30,0x30,0x0D,0x0A,
+ /* "TZOFFSETTO:+0900\x0D\x0A" */
+ 0x54,0x5A,0x4F,0x46,0x46,0x53,0x45,0x54,0x54,0x4F,0x3A,0x2B,0x30,0x39,0x30,0x30,0x0D,0x0A,
+ /* "TZNAME:JST\x0D\x0A" */
+ 0x54,0x5A,0x4E,0x41,0x4D,0x45,0x3A,0x4A,0x53,0x54,0x0D,0x0A,
+ /* "DTSTART:19700101\x0D\x0A" */
+ 0x44,0x54,0x53,0x54,0x41,0x52,0x54,0x3A,0x31,0x39,0x37,0x30,0x30,0x31,0x30,0x31,0x0D,0x0A,
+ /* " T000000\x0D\x0A" */
+ 0x20,0x54,0x30,0x30,0x30,0x30,0x30,0x30,0x0D,0x0A,
+ /* "END:STANDARD\x0D\x0A" */
+ 0x45,0x4E,0x44,0x3A,0x53,0x54,0x41,0x4E,0x44,0x41,0x52,0x44,0x0D,0x0A,
+ /* "END:VTIMEZONE" */
+ 0x45,0x4E,0x44,0x3A,0x56,0x54,0x49,0x4D,0x45,0x5A,0x4F,0x4E,0x45,
+ 0
+ };
+ VTimeZone *tokyo = VTimeZone::createVTimeZone(asiaTokyo, status);
+ if (U_FAILURE(status) || tokyo == NULL) {
+ errln("FAIL: Failed to create a VTimeZone tokyo");
+ } else {
+ // Check ID
+ UnicodeString tzid;
+ tokyo->getID(tzid);
+ if (tzid != asiaTokyoID) {
+ errln((UnicodeString)"FAIL: Invalid TZID: " + tzid);
+ }
+ // Make sure offsets are correct
+ int32_t rawOffset, dstSavings;
+ tokyo->getOffset(Calendar::getNow(), FALSE, rawOffset, dstSavings, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getOffset failed for tokyo");
+ }
+ if (rawOffset != 9*HOUR || dstSavings != 0) {
+ errln("FAIL: Bad offsets returned by a VTimeZone created for Tokyo");
+ }
+ }
+ delete tokyo;
+
+ // Create VTimeZone from VTIMEZONE data
+ static const UChar fooData[] = {
+ /* "BEGIN:VCALENDAR\x0D\x0A" */
+ 0x42,0x45,0x47,0x49,0x4E,0x3A,0x56,0x43,0x41,0x4C,0x45,0x4E,0x44,0x41,0x52,0x0D,0x0A,
+ /* "BEGIN:VTIMEZONE\x0D\x0A" */
+ 0x42,0x45,0x47,0x49,0x4E,0x3A,0x56,0x54,0x49,0x4D,0x45,0x5A,0x4F,0x4E,0x45,0x0D,0x0A,
+ /* "TZID:FOO\x0D\x0A" */
+ 0x54,0x5A,0x49,0x44,0x3A,0x46,0x4F,0x4F,0x0D,0x0A,
+ /* "BEGIN:STANDARD\x0D\x0A" */
+ 0x42,0x45,0x47,0x49,0x4E,0x3A,0x53,0x54,0x41,0x4E,0x44,0x41,0x52,0x44,0x0D,0x0A,
+ /* "TZOFFSETFROM:-0700\x0D\x0A" */
+ 0x54,0x5A,0x4F,0x46,0x46,0x53,0x45,0x54,0x46,0x52,0x4F,0x4D,0x3A,0x2D,0x30,0x37,0x30,0x30,0x0D,0x0A,
+ /* "TZOFFSETTO:-0800\x0D\x0A" */
+ 0x54,0x5A,0x4F,0x46,0x46,0x53,0x45,0x54,0x54,0x4F,0x3A,0x2D,0x30,0x38,0x30,0x30,0x0D,0x0A,
+ /* "TZNAME:FST\x0D\x0A" */
+ 0x54,0x5A,0x4E,0x41,0x4D,0x45,0x3A,0x46,0x53,0x54,0x0D,0x0A,
+ /* "DTSTART:20071010T010000\x0D\x0A" */
+ 0x44,0x54,0x53,0x54,0x41,0x52,0x54,0x3A,0x32,0x30,0x30,0x37,0x31,0x30,0x31,0x30,0x54,0x30,0x31,0x30,0x30,0x30,0x30,0x0D,0x0A,
+ /* "RRULE:FREQ=YEARLY;BYDAY=WE;BYMONTHDAY=10,11,12,13,14,15,16;BYMONTH=10\x0D\x0A" */
+ 0x52,0x52,0x55,0x4C,0x45,0x3A,0x46,0x52,0x45,0x51,0x3D,0x59,0x45,0x41,0x52,0x4C,0x59,0x3B,0x42,0x59,0x44,0x41,0x59,0x3D,0x57,0x45,0x3B,0x42,0x59,0x4D,0x4F,0x4E,0x54,0x48,0x44,0x41,0x59,0x3D,0x31,0x30,0x2C,0x31,0x31,0x2C,0x31,0x32,0x2C,0x31,0x33,0x2C,0x31,0x34,0x2C,0x31,0x35,0x2C,0x31,0x36,0x3B,0x42,0x59,0x4D,0x4F,0x4E,0x54,0x48,0x3D,0x31,0x30,0x0D,0x0A,
+ /* "END:STANDARD\x0D\x0A" */
+ 0x45,0x4E,0x44,0x3A,0x53,0x54,0x41,0x4E,0x44,0x41,0x52,0x44,0x0D,0x0A,
+ /* "BEGIN:DAYLIGHT\x0D\x0A" */
+ 0x42,0x45,0x47,0x49,0x4E,0x3A,0x44,0x41,0x59,0x4C,0x49,0x47,0x48,0x54,0x0D,0x0A,
+ /* "TZOFFSETFROM:-0800\x0D\x0A" */
+ 0x54,0x5A,0x4F,0x46,0x46,0x53,0x45,0x54,0x46,0x52,0x4F,0x4D,0x3A,0x2D,0x30,0x38,0x30,0x30,0x0D,0x0A,
+ /* "TZOFFSETTO:-0700\x0D\x0A" */
+ 0x54,0x5A,0x4F,0x46,0x46,0x53,0x45,0x54,0x54,0x4F,0x3A,0x2D,0x30,0x37,0x30,0x30,0x0D,0x0A,
+ /* "TZNAME:FDT\x0D\x0A" */
+ 0x54,0x5A,0x4E,0x41,0x4D,0x45,0x3A,0x46,0x44,0x54,0x0D,0x0A,
+ /* "DTSTART:20070415T010000\x0D\x0A" */
+ 0x44,0x54,0x53,0x54,0x41,0x52,0x54,0x3A,0x32,0x30,0x30,0x37,0x30,0x34,0x31,0x35,0x54,0x30,0x31,0x30,0x30,0x30,0x30,0x0D,0x0A,
+ /* "RRULE:FREQ=YEARLY;BYMONTHDAY=15;BYMONTH=4\x0D\x0A" */
+ 0x52,0x52,0x55,0x4C,0x45,0x3A,0x46,0x52,0x45,0x51,0x3D,0x59,0x45,0x41,0x52,0x4C,0x59,0x3B,0x42,0x59,0x4D,0x4F,0x4E,0x54,0x48,0x44,0x41,0x59,0x3D,0x31,0x35,0x3B,0x42,0x59,0x4D,0x4F,0x4E,0x54,0x48,0x3D,0x34,0x0D,0x0A,
+ /* "END:DAYLIGHT\x0D\x0A" */
+ 0x45,0x4E,0x44,0x3A,0x44,0x41,0x59,0x4C,0x49,0x47,0x48,0x54,0x0D,0x0A,
+ /* "END:VTIMEZONE\x0D\x0A" */
+ 0x45,0x4E,0x44,0x3A,0x56,0x54,0x49,0x4D,0x45,0x5A,0x4F,0x4E,0x45,0x0D,0x0A,
+ /* "END:VCALENDAR" */
+ 0x45,0x4E,0x44,0x3A,0x56,0x43,0x41,0x4C,0x45,0x4E,0x44,0x41,0x52,
+ 0
+ };
+
+ VTimeZone *foo = VTimeZone::createVTimeZone(fooData, status);
+ if (U_FAILURE(status) || foo == NULL) {
+ errln("FAIL: Failed to create a VTimeZone foo");
+ } else {
+ // Write VTIMEZONE data
+ UnicodeString fooData2;
+ foo->write(getUTCMillis(2005, UCAL_JANUARY, 1), fooData2, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Failed to write VTIMEZONE data for foo");
+ }
+ logln(fooData2);
+ }
+ delete foo;
+}
+
+//----------- private test helpers -------------------------------------------------
+
+UDate
+TimeZoneRuleTest::getUTCMillis(int32_t y, int32_t m, int32_t d,
+ int32_t hr, int32_t min, int32_t sec, int32_t msec) {
+ UErrorCode status = U_ZERO_ERROR;
+ const TimeZone *tz = TimeZone::getGMT();
+ Calendar *cal = Calendar::createInstance(*tz, status);
+ if (U_FAILURE(status)) {
+ delete cal;
+ errln("FAIL: Calendar::createInstance failed");
+ return 0.0;
+ }
+ cal->set(y, m, d, hr, min, sec);
+ cal->set(UCAL_MILLISECOND, msec);
+ UDate utc = cal->getTime(status);
+ if (U_FAILURE(status)) {
+ delete cal;
+ errln("FAIL: Calendar::getTime failed");
+ return 0.0;
+ }
+ delete cal;
+ return utc;
+}
+
+/*
+ * Check if a time shift really happens on each transition returned by getNextTransition or
+ * getPreviousTransition in the specified time range
+ */
+void
+TimeZoneRuleTest::verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end) {
+ UErrorCode status = U_ZERO_ERROR;
+ UDate time;
+ int32_t raw, dst, raw0, dst0;
+ TimeZoneTransition tzt, tzt0;
+ UBool avail;
+ UBool first = TRUE;
+ UnicodeString tzid;
+
+ // Ascending
+ time = start;
+ while (TRUE) {
+ avail = icutz.getNextTransition(time, FALSE, tzt);
+ if (!avail) {
+ break;
+ }
+ time = tzt.getTime();
+ if (time >= end) {
+ break;
+ }
+ icutz.getOffset(time, FALSE, raw, dst, status);
+ icutz.getOffset(time - 1, FALSE, raw0, dst0, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Error in getOffset");
+ break;
+ }
+
+ if (raw == raw0 && dst == dst0) {
+ errln((UnicodeString)"FAIL: False transition returned by getNextTransition for "
+ + icutz.getID(tzid) + " at " + dateToString(time));
+ }
+ if (!first &&
+ (tzt0.getTo()->getRawOffset() != tzt.getFrom()->getRawOffset()
+ || tzt0.getTo()->getDSTSavings() != tzt.getFrom()->getDSTSavings())) {
+ errln((UnicodeString)"FAIL: TO rule of the previous transition does not match FROM rule of this transtion at "
+ + dateToString(time) + " for " + icutz.getID(tzid));
+ }
+ tzt0 = tzt;
+ first = FALSE;
+ }
+
+ // Descending
+ first = TRUE;
+ time = end;
+ while(true) {
+ avail = icutz.getPreviousTransition(time, FALSE, tzt);
+ if (!avail) {
+ break;
+ }
+ time = tzt.getTime();
+ if (time <= start) {
+ break;
+ }
+ icutz.getOffset(time, FALSE, raw, dst, status);
+ icutz.getOffset(time - 1, FALSE, raw0, dst0, status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: Error in getOffset");
+ break;
+ }
+
+ if (raw == raw0 && dst == dst0) {
+ errln((UnicodeString)"FAIL: False transition returned by getPreviousTransition for "
+ + icutz.getID(tzid) + " at " + dateToString(time));
+ }
+
+ if (!first &&
+ (tzt0.getFrom()->getRawOffset() != tzt.getTo()->getRawOffset()
+ || tzt0.getFrom()->getDSTSavings() != tzt.getTo()->getDSTSavings())) {
+ errln((UnicodeString)"FAIL: TO rule of the next transition does not match FROM rule in this transtion at "
+ + dateToString(time) + " for " + icutz.getID(tzid));
+ }
+ tzt0 = tzt;
+ first = FALSE;
+ }
+}
+
+/*
+ * Compare all time transitions in 2 time zones in the specified time range in ascending order
+ */
+void
+TimeZoneRuleTest::compareTransitionsAscending(BasicTimeZone& z1, BasicTimeZone& z2,
+ UDate start, UDate end, UBool inclusive) {
+ UnicodeString zid1, zid2;
+ TimeZoneTransition tzt1, tzt2;
+ UBool avail1, avail2;
+ UBool inRange1, inRange2;
+
+ z1.getID(zid1);
+ z2.getID(zid2);
+
+ UDate time = start;
+ while (TRUE) {
+ avail1 = z1.getNextTransition(time, inclusive, tzt1);
+ avail2 = z2.getNextTransition(time, inclusive, tzt2);
+
+ inRange1 = inRange2 = FALSE;
+ if (avail1) {
+ if (tzt1.getTime() < end || (inclusive && tzt1.getTime() == end)) {
+ inRange1 = TRUE;
+ }
+ }
+ if (avail2) {
+ if (tzt2.getTime() < end || (inclusive && tzt2.getTime() == end)) {
+ inRange2 = TRUE;
+ }
+ }
+ if (!inRange1 && !inRange2) {
+ // No more transition in the range
+ break;
+ }
+ if (!inRange1) {
+ errln((UnicodeString)"FAIL: " + zid1 + " does not have any transitions after "
+ + dateToString(time) + " before " + dateToString(end));
+ break;
+ }
+ if (!inRange2) {
+ errln((UnicodeString)"FAIL: " + zid2 + " does not have any transitions after "
+ + dateToString(time) + " before " + dateToString(end));
+ break;
+ }
+ if (tzt1.getTime() != tzt2.getTime()) {
+ errln((UnicodeString)"FAIL: First transition after " + dateToString(time) + " "
+ + zid1 + "[" + dateToString(tzt1.getTime()) + "] "
+ + zid2 + "[" + dateToString(tzt2.getTime()) + "]");
+ break;
+ }
+ time = tzt1.getTime();
+ if (inclusive) {
+ time += 1;
+ }
+ }
+}
+
+/*
+ * Compare all time transitions in 2 time zones in the specified time range in descending order
+ */
+void
+TimeZoneRuleTest::compareTransitionsDescending(BasicTimeZone& z1, BasicTimeZone& z2,
+ UDate start, UDate end, UBool inclusive) {
+ UnicodeString zid1, zid2;
+ TimeZoneTransition tzt1, tzt2;
+ UBool avail1, avail2;
+ UBool inRange1, inRange2;
+
+ z1.getID(zid1);
+ z2.getID(zid2);
+
+ UDate time = end;
+ while (TRUE) {
+ avail1 = z1.getPreviousTransition(time, inclusive, tzt1);
+ avail2 = z2.getPreviousTransition(time, inclusive, tzt2);
+
+ inRange1 = inRange2 = FALSE;
+ if (avail1) {
+ if (tzt1.getTime() > start || (inclusive && tzt1.getTime() == start)) {
+ inRange1 = TRUE;
+ }
+ }
+ if (avail2) {
+ if (tzt2.getTime() > start || (inclusive && tzt2.getTime() == start)) {
+ inRange2 = TRUE;
+ }
+ }
+ if (!inRange1 && !inRange2) {
+ // No more transition in the range
+ break;
+ }
+ if (!inRange1) {
+ errln((UnicodeString)"FAIL: " + zid1 + " does not have any transitions before "
+ + dateToString(time) + " after " + dateToString(start));
+ break;
+ }
+ if (!inRange2) {
+ errln((UnicodeString)"FAIL: " + zid2 + " does not have any transitions before "
+ + dateToString(time) + " after " + dateToString(start));
+ break;
+ }
+ if (tzt1.getTime() != tzt2.getTime()) {
+ errln((UnicodeString)"FAIL: Last transition before " + dateToString(time) + " "
+ + zid1 + "[" + dateToString(tzt1.getTime()) + "] "
+ + zid2 + "[" + dateToString(tzt2.getTime()) + "]");
+ break;
+ }
+ time = tzt1.getTime();
+ if (inclusive) {
+ time -= 1;
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.h b/Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.h
new file mode 100644
index 00000000000..643d2719d83
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tzrulets.h
@@ -0,0 +1,50 @@
+/*
+*******************************************************************************
+* Copyright (C) 2007, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+*******************************************************************************
+*/
+
+#ifndef _TIMEZONERULETEST_
+#define _TIMEZONERULETEST_
+
+#include "unicode/utypes.h"
+#include "caltztst.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * Tests for TimeZoneRule, RuleBasedTimeZone and VTimeZone
+ */
+class TimeZoneRuleTest : public CalendarTimeZoneTest {
+ // IntlTest override
+ void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par);
+public:
+ void TestSimpleRuleBasedTimeZone(void);
+ void TestHistoricalRuleBasedTimeZone(void);
+ void TestOlsonTransition(void);
+ void TestRBTZTransition(void);
+ void TestHasEquivalentTransitions(void);
+ void TestVTimeZoneRoundTrip(void);
+ void TestVTimeZoneRoundTripPartial(void);
+ void TestVTimeZoneSimpleWrite(void);
+ void TestVTimeZoneHeaderProps(void);
+ void TestGetSimpleRules(void);
+ void TestTimeZoneRuleCoverage(void);
+ void TestSimpleTimeZoneCoverage(void);
+ void TestVTimeZoneCoverage(void);
+ void TestVTimeZoneParse(void);
+
+private:
+ void verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end);
+ void compareTransitionsAscending(BasicTimeZone& z1, BasicTimeZone& z2,
+ UDate start, UDate end, UBool inclusive);
+ void compareTransitionsDescending(BasicTimeZone& z1, BasicTimeZone& z2,
+ UDate start, UDate end, UBool inclusive);
+ UDate getUTCMillis(int32_t year, int32_t month, int32_t dom,
+ int32_t hour=0, int32_t min=0, int32_t sec=0, int32_t msec=0);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // _TIMEZONERULETEST_
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tztest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/tztest.cpp
new file mode 100644
index 00000000000..0c5b07ccd21
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tztest.cpp
@@ -0,0 +1,1664 @@
+/***********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/timezone.h"
+#include "unicode/simpletz.h"
+#include "unicode/calendar.h"
+#include "unicode/gregocal.h"
+#include "unicode/resbund.h"
+#include "unicode/strenum.h"
+#include "tztest.h"
+#include "cmemory.h"
+#include "putilimp.h"
+#include "cstring.h"
+#include "olsontz.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+#define CASE(id,test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); logln(""); \
+ test(); \
+ } \
+ break
+
+// *****************************************************************************
+// class TimeZoneTest
+// *****************************************************************************
+
+void TimeZoneTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite TestTimeZone");
+ switch (index) {
+ CASE(0, TestPRTOffset);
+ CASE(1, TestVariousAPI518);
+ CASE(2, TestGetAvailableIDs913);
+ CASE(3, TestGenericAPI);
+ CASE(4, TestRuleAPI);
+ CASE(5, TestShortZoneIDs);
+ CASE(6, TestCustomParse);
+ CASE(7, TestDisplayName);
+ CASE(8, TestDSTSavings);
+ CASE(9, TestAlternateRules);
+ CASE(10,TestCountries);
+ CASE(11,TestHistorical);
+ CASE(12,TestEquivalentIDs);
+ CASE(13, TestAliasedNames);
+ CASE(14, TestFractionalDST);
+ CASE(15, TestFebruary);
+ default: name = ""; break;
+ }
+}
+
+const int32_t TimeZoneTest::millisPerHour = 3600000;
+
+// ---------------------------------------------------------------------------------
+
+/**
+ * Generic API testing for API coverage.
+ */
+void
+TimeZoneTest::TestGenericAPI()
+{
+ UnicodeString id("NewGMT");
+ int32_t offset = 12345;
+
+ SimpleTimeZone *zone = new SimpleTimeZone(offset, id);
+ if (zone->useDaylightTime()) errln("FAIL: useDaylightTime should return FALSE");
+
+ TimeZone* zoneclone = zone->clone();
+ if (!(*zoneclone == *zone)) errln("FAIL: clone or operator== failed");
+ zoneclone->setID("abc");
+ if (!(*zoneclone != *zone)) errln("FAIL: clone or operator!= failed");
+ delete zoneclone;
+
+ zoneclone = zone->clone();
+ if (!(*zoneclone == *zone)) errln("FAIL: clone or operator== failed");
+ zoneclone->setRawOffset(45678);
+ if (!(*zoneclone != *zone)) errln("FAIL: clone or operator!= failed");
+
+ SimpleTimeZone copy(*zone);
+ if (!(copy == *zone)) errln("FAIL: copy constructor or operator== failed");
+ copy = *(SimpleTimeZone*)zoneclone;
+ if (!(copy == *zoneclone)) errln("FAIL: assignment operator or operator== failed");
+
+ TimeZone* saveDefault = TimeZone::createDefault();
+ logln((UnicodeString)"TimeZone::createDefault() => " + saveDefault->getID(id));
+ TimeZone* pstZone = TimeZone::createTimeZone("America/Los_Angeles");
+
+ logln("call uprv_timezone() which uses the host");
+ logln("to get the difference in seconds between coordinated universal");
+ logln("time and local time. E.g., -28,800 for PST (GMT-8hrs)");
+
+ int32_t tzoffset = uprv_timezone();
+ logln(UnicodeString("Value returned from uprv_timezone = ") + tzoffset);
+ // Invert sign because UNIX semantics are backwards
+ if (tzoffset < 0)
+ tzoffset = -tzoffset;
+ if ((*saveDefault == *pstZone) && (tzoffset != 28800)) {
+ errln("FAIL: t_timezone may be incorrect. It is not 28800");
+ }
+
+ if ((tzoffset % 900) != 0) {
+ errln("FAIL: t_timezone may be incorrect. It is not a multiple of 15min. It is %d", tzoffset);
+ }
+
+ TimeZone::adoptDefault(zone);
+ TimeZone* defaultzone = TimeZone::createDefault();
+ if (defaultzone == zone ||
+ !(*defaultzone == *zone))
+ errln("FAIL: createDefault failed");
+ TimeZone::adoptDefault(saveDefault);
+ delete defaultzone;
+ delete zoneclone;
+ delete pstZone;
+
+ UErrorCode status = U_ZERO_ERROR;
+ const char* tzver = TimeZone::getTZDataVersion(status);
+ if (U_FAILURE(status)) {
+ errln("FAIL: getTZDataVersion failed");
+ } else if (uprv_strlen(tzver) != 5 /* 4 digits + 1 letter */) {
+ errln((UnicodeString)"FAIL: getTZDataVersion returned " + tzver);
+ } else {
+ logln((UnicodeString)"tzdata version: " + tzver);
+ }
+}
+
+// ---------------------------------------------------------------------------------
+
+/**
+ * Test the setStartRule/setEndRule API calls.
+ */
+void
+TimeZoneTest::TestRuleAPI()
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ UDate offset = 60*60*1000*1.75; // Pick a weird offset
+ SimpleTimeZone *zone = new SimpleTimeZone((int32_t)offset, "TestZone");
+ if (zone->useDaylightTime()) errln("FAIL: useDaylightTime should return FALSE");
+
+ // Establish our expected transition times. Do this with a non-DST
+ // calendar with the (above) declared local offset.
+ GregorianCalendar *gc = new GregorianCalendar(*zone, status);
+ if (failure(status, "new GregorianCalendar")) return;
+ gc->clear();
+ gc->set(1990, UCAL_MARCH, 1);
+ UDate marchOneStd = gc->getTime(status); // Local Std time midnight
+ gc->clear();
+ gc->set(1990, UCAL_JULY, 1);
+ UDate julyOneStd = gc->getTime(status); // Local Std time midnight
+ if (failure(status, "GregorianCalendar::getTime")) return;
+
+ // Starting and ending hours, WALL TIME
+ int32_t startHour = (int32_t)(2.25 * 3600000);
+ int32_t endHour = (int32_t)(3.5 * 3600000);
+
+ zone->setStartRule(UCAL_MARCH, 1, 0, startHour, status);
+ zone->setEndRule (UCAL_JULY, 1, 0, endHour, status);
+
+ delete gc;
+ gc = new GregorianCalendar(*zone, status);
+ if (failure(status, "new GregorianCalendar")) return;
+
+ UDate marchOne = marchOneStd + startHour;
+ UDate julyOne = julyOneStd + endHour - 3600000; // Adjust from wall to Std time
+
+ UDate expMarchOne = 636251400000.0;
+ if (marchOne != expMarchOne)
+ {
+ errln((UnicodeString)"FAIL: Expected start computed as " + marchOne +
+ " = " + dateToString(marchOne));
+ logln((UnicodeString)" Should be " + expMarchOne +
+ " = " + dateToString(expMarchOne));
+ }
+
+ UDate expJulyOne = 646793100000.0;
+ if (julyOne != expJulyOne)
+ {
+ errln((UnicodeString)"FAIL: Expected start computed as " + julyOne +
+ " = " + dateToString(julyOne));
+ logln((UnicodeString)" Should be " + expJulyOne +
+ " = " + dateToString(expJulyOne));
+ }
+
+ testUsingBinarySearch(*zone, date(90, UCAL_JANUARY, 1), date(90, UCAL_JUNE, 15), marchOne);
+ testUsingBinarySearch(*zone, date(90, UCAL_JUNE, 1), date(90, UCAL_DECEMBER, 31), julyOne);
+
+ if (zone->inDaylightTime(marchOne - 1000, status) ||
+ !zone->inDaylightTime(marchOne, status))
+ errln("FAIL: Start rule broken");
+ if (!zone->inDaylightTime(julyOne - 1000, status) ||
+ zone->inDaylightTime(julyOne, status))
+ errln("FAIL: End rule broken");
+
+ zone->setStartYear(1991);
+ if (zone->inDaylightTime(marchOne, status) ||
+ zone->inDaylightTime(julyOne - 1000, status))
+ errln("FAIL: Start year broken");
+
+ failure(status, "TestRuleAPI");
+ delete gc;
+ delete zone;
+}
+
+void
+TimeZoneTest::findTransition(const TimeZone& tz,
+ UDate min, UDate max) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeString id,s;
+ UBool startsInDST = tz.inDaylightTime(min, ec);
+ if (failure(ec, "TimeZone::inDaylightTime")) return;
+ if (tz.inDaylightTime(max, ec) == startsInDST) {
+ logln("Error: " + tz.getID(id) + ".inDaylightTime(" + dateToString(min) + ") = " + (startsInDST?"TRUE":"FALSE") +
+ ", inDaylightTime(" + dateToString(max) + ") = " + (startsInDST?"TRUE":"FALSE"));
+ return;
+ }
+ if (failure(ec, "TimeZone::inDaylightTime")) return;
+ while ((max - min) > INTERVAL) {
+ UDate mid = (min + max) / 2;
+ if (tz.inDaylightTime(mid, ec) == startsInDST) {
+ min = mid;
+ } else {
+ max = mid;
+ }
+ if (failure(ec, "TimeZone::inDaylightTime")) return;
+ }
+ min = 1000.0 * uprv_floor(min/1000.0);
+ max = 1000.0 * uprv_floor(max/1000.0);
+ logln(tz.getID(id) + " Before: " + min/1000 + " = " +
+ dateToString(min,s,tz));
+ logln(tz.getID(id) + " After: " + max/1000 + " = " +
+ dateToString(max,s,tz));
+}
+
+void
+TimeZoneTest::testUsingBinarySearch(const TimeZone& tz,
+ UDate min, UDate max,
+ UDate expectedBoundary)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UBool startsInDST = tz.inDaylightTime(min, status);
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ if (tz.inDaylightTime(max, status) == startsInDST) {
+ logln("Error: inDaylightTime(" + dateToString(max) + ") != " + ((!startsInDST)?"TRUE":"FALSE"));
+ return;
+ }
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ while ((max - min) > INTERVAL) {
+ UDate mid = (min + max) / 2;
+ if (tz.inDaylightTime(mid, status) == startsInDST) {
+ min = mid;
+ } else {
+ max = mid;
+ }
+ if (failure(status, "TimeZone::inDaylightTime")) return;
+ }
+ logln(UnicodeString("Binary Search Before: ") + uprv_floor(0.5 + min) + " = " + dateToString(min));
+ logln(UnicodeString("Binary Search After: ") + uprv_floor(0.5 + max) + " = " + dateToString(max));
+ UDate mindelta = expectedBoundary - min;
+ UDate maxdelta = max - expectedBoundary;
+ if (mindelta >= 0 &&
+ mindelta <= INTERVAL &&
+ maxdelta >= 0 &&
+ maxdelta <= INTERVAL)
+ logln(UnicodeString("PASS: Expected bdry: ") + expectedBoundary + " = " + dateToString(expectedBoundary));
+ else
+ errln(UnicodeString("FAIL: Expected bdry: ") + expectedBoundary + " = " + dateToString(expectedBoundary));
+}
+
+const UDate TimeZoneTest::INTERVAL = 100;
+
+// ---------------------------------------------------------------------------------
+
+// -------------------------------------
+
+/**
+ * Test the offset of the PRT timezone.
+ */
+void
+TimeZoneTest::TestPRTOffset()
+{
+ TimeZone* tz = TimeZone::createTimeZone("PRT");
+ if (tz == 0) {
+ errln("FAIL: TimeZone(PRT) is null");
+ }
+ else {
+ int32_t expectedHour = -4;
+ double expectedOffset = (((double)expectedHour) * millisPerHour);
+ double foundOffset = tz->getRawOffset();
+ int32_t foundHour = (int32_t)foundOffset / millisPerHour;
+ if (expectedOffset != foundOffset) {
+ errln("FAIL: Offset for PRT should be %d, found %d", expectedHour, foundHour);
+ } else {
+ logln("PASS: Offset for PRT should be %d, found %d", expectedHour, foundHour);
+ }
+ }
+ delete tz;
+}
+
+// -------------------------------------
+
+/**
+ * Regress a specific bug with a sequence of API calls.
+ */
+void
+TimeZoneTest::TestVariousAPI518()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ TimeZone* time_zone = TimeZone::createTimeZone("PST");
+ UDate d = date(97, UCAL_APRIL, 30);
+ UnicodeString str;
+ logln("The timezone is " + time_zone->getID(str));
+ if (!time_zone->inDaylightTime(d, status)) errln("FAIL: inDaylightTime returned FALSE");
+ if (U_FAILURE(status)) { errln("FAIL: TimeZone::inDaylightTime failed"); return; }
+ if (!time_zone->useDaylightTime()) errln("FAIL: useDaylightTime returned FALSE");
+ if (time_zone->getRawOffset() != - 8 * millisPerHour) errln("FAIL: getRawOffset returned wrong value");
+ GregorianCalendar *gc = new GregorianCalendar(status);
+ if (U_FAILURE(status)) { errln("FAIL: Couldn't create GregorianCalendar"); return; }
+ gc->setTime(d, status);
+ if (U_FAILURE(status)) { errln("FAIL: GregorianCalendar::setTime failed"); return; }
+ if (time_zone->getOffset(gc->AD, gc->get(UCAL_YEAR, status), gc->get(UCAL_MONTH, status),
+ gc->get(UCAL_DATE, status), (uint8_t)gc->get(UCAL_DAY_OF_WEEK, status), 0, status) != - 7 * millisPerHour)
+ errln("FAIL: getOffset returned wrong value");
+ if (U_FAILURE(status)) { errln("FAIL: GregorianCalendar::set failed"); return; }
+ delete gc;
+ delete time_zone;
+}
+
+// -------------------------------------
+
+/**
+ * Test the call which retrieves the available IDs.
+ */
+void
+TimeZoneTest::TestGetAvailableIDs913()
+{
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t i;
+
+#ifdef U_USE_TIMEZONE_OBSOLETE_2_8
+ // Test legacy API -- remove these tests when the corresponding API goes away (duh)
+ int32_t numIDs = -1;
+ const UnicodeString** ids = TimeZone::createAvailableIDs(numIDs);
+ if (ids == 0 || numIDs < 1) {
+ errln("FAIL: createAvailableIDs()");
+ } else {
+ UnicodeString buf("TimeZone::createAvailableIDs() = { ");
+ for(i=0; i<numIDs; ++i) {
+ if (i) buf.append(", ");
+ buf.append(*ids[i]);
+ }
+ buf.append(" } ");
+ logln(buf + numIDs);
+ // we own the array; the caller owns the contained strings (yuck)
+ uprv_free(ids);
+ }
+
+ numIDs = -1;
+ ids = TimeZone::createAvailableIDs(-8*U_MILLIS_PER_HOUR, numIDs);
+ if (ids == 0 || numIDs < 1) {
+ errln("FAIL: createAvailableIDs(-8:00)");
+ } else {
+ UnicodeString buf("TimeZone::createAvailableIDs(-8:00) = { ");
+ for(i=0; i<numIDs; ++i) {
+ if (i) buf.append(", ");
+ buf.append(*ids[i]);
+ }
+ buf.append(" } ");
+ logln(buf + numIDs);
+ // we own the array; the caller owns the contained strings (yuck)
+ uprv_free(ids);
+ }
+ numIDs = -1;
+ ids = TimeZone::createAvailableIDs("US", numIDs);
+ if (ids == 0 || numIDs < 1) {
+ errln("FAIL: createAvailableIDs(US) ids=%d, numIDs=%d", ids, numIDs);
+ } else {
+ UnicodeString buf("TimeZone::createAvailableIDs(US) = { ");
+ for(i=0; i<numIDs; ++i) {
+ if (i) buf.append(", ");
+ buf.append(*ids[i]);
+ }
+ buf.append(" } ");
+ logln(buf + numIDs);
+ // we own the array; the caller owns the contained strings (yuck)
+ uprv_free(ids);
+ }
+#endif
+
+ UnicodeString str;
+ UnicodeString *buf = new UnicodeString("TimeZone::createEnumeration() = { ");
+ int32_t s_length;
+ StringEnumeration* s = TimeZone::createEnumeration();
+ s_length = s->count(ec);
+ for (i = 0; i < s_length;++i) {
+ if (i > 0) *buf += ", ";
+ if ((i & 1) == 0) {
+ *buf += *s->snext(ec);
+ } else {
+ *buf += UnicodeString(s->next(NULL, ec), "");
+ }
+
+ if((i % 5) == 4) {
+ // replace s with a clone of itself
+ StringEnumeration *s2 = s->clone();
+ if(s2 == NULL || s_length != s2->count(ec)) {
+ errln("TimezoneEnumeration.clone() failed");
+ } else {
+ delete s;
+ s = s2;
+ }
+ }
+ }
+ *buf += " };";
+ logln(*buf);
+
+ /* Confirm that the following zones can be retrieved: The first
+ * zone, the last zone, and one in-between. This tests the binary
+ * search through the system zone data.
+ */
+ s->reset(ec);
+ int32_t middle = s_length/2;
+ for (i=0; i<s_length; ++i) {
+ const UnicodeString* id = s->snext(ec);
+ if (i==0 || i==middle || i==(s_length-1)) {
+ TimeZone *z = TimeZone::createTimeZone(*id);
+ if (z == 0) {
+ errln(UnicodeString("FAIL: createTimeZone(") +
+ *id + ") -> 0");
+ } else if (z->getID(str) != *id) {
+ errln(UnicodeString("FAIL: createTimeZone(") +
+ *id + ") -> zone " + str);
+ } else {
+ logln(UnicodeString("OK: createTimeZone(") +
+ *id + ") succeeded");
+ }
+ delete z;
+ }
+ }
+ delete s;
+
+ buf->truncate(0);
+ *buf += "TimeZone::createEnumeration(GMT+01:00) = { ";
+
+ s = TimeZone::createEnumeration(1 * U_MILLIS_PER_HOUR);
+ s_length = s->count(ec);
+ for (i = 0; i < s_length;++i) {
+ if (i > 0) *buf += ", ";
+ *buf += *s->snext(ec);
+ }
+ delete s;
+ *buf += " };";
+ logln(*buf);
+
+
+ buf->truncate(0);
+ *buf += "TimeZone::createEnumeration(US) = { ";
+
+ s = TimeZone::createEnumeration("US");
+ s_length = s->count(ec);
+ for (i = 0; i < s_length;++i) {
+ if (i > 0) *buf += ", ";
+ *buf += *s->snext(ec);
+ }
+ *buf += " };";
+ logln(*buf);
+
+ TimeZone *tz = TimeZone::createTimeZone("PST");
+ if (tz != 0) logln("getTimeZone(PST) = " + tz->getID(str));
+ else errln("FAIL: getTimeZone(PST) = null");
+ delete tz;
+ tz = TimeZone::createTimeZone("America/Los_Angeles");
+ if (tz != 0) logln("getTimeZone(America/Los_Angeles) = " + tz->getID(str));
+ else errln("FAIL: getTimeZone(PST) = null");
+ delete tz;
+
+ // @bug 4096694
+ tz = TimeZone::createTimeZone("NON_EXISTENT");
+ UnicodeString temp;
+ if (tz == 0)
+ errln("FAIL: getTimeZone(NON_EXISTENT) = null");
+ else if (tz->getID(temp) != "GMT")
+ errln("FAIL: getTimeZone(NON_EXISTENT) = " + temp);
+ delete tz;
+
+ delete buf;
+ delete s;
+}
+
+
+/**
+ * NOTE: As of ICU 2.8, this test confirms that the "tz.alias"
+ * file, used to build ICU alias zones, is working. It also
+ * looks at some genuine Olson compatibility IDs. [aliu]
+ *
+ * This test is problematic. It should really just confirm that
+ * the list of compatibility zone IDs exist and are somewhat
+ * meaningful (that is, they aren't all aliases of GMT). It goes a
+ * bit further -- it hard-codes expectations about zone behavior,
+ * when in fact zones are redefined quite frequently. ICU's build
+ * process means that it is easy to update ICU to contain the
+ * latest Olson zone data, but if a zone tested here changes, then
+ * this test will fail. I have updated the test for 1999j data,
+ * but further updates will probably be required. Note that some
+ * of the concerts listed below no longer apply -- in particular,
+ * we do NOT overwrite real UNIX zones with 3-letter IDs. There
+ * are two points of overlap as of 1999j: MET and EET. These are
+ * both real UNIX zones, so we just use the official
+ * definition. This test has been updated to reflect this.
+ * 12/3/99 aliu
+ *
+ * Added tests for additional zones and aliases from the icuzones file.
+ * Markus Scherer 2006-nov-06
+ *
+ * [srl - from java - 7/5/1998]
+ * @bug 4130885
+ * Certain short zone IDs, used since 1.1.x, are incorrect.
+ *
+ * The worst of these is:
+ *
+ * "CAT" (Central African Time) should be GMT+2:00, but instead returns a
+ * zone at GMT-1:00. The zone at GMT-1:00 should be called EGT, CVT, EGST,
+ * or AZOST, depending on which zone is meant, but in no case is it CAT.
+ *
+ * Other wrong zone IDs:
+ *
+ * ECT (European Central Time) GMT+1:00: ECT is Ecuador Time,
+ * GMT-5:00. European Central time is abbreviated CEST.
+ *
+ * SST (Solomon Island Time) GMT+11:00. SST is actually Samoa Standard Time,
+ * GMT-11:00. Solomon Island time is SBT.
+ *
+ * NST (New Zealand Time) GMT+12:00. NST is the abbreviation for
+ * Newfoundland Standard Time, GMT-3:30. New Zealanders use NZST.
+ *
+ * AST (Alaska Standard Time) GMT-9:00. [This has already been noted in
+ * another bug.] It should be "AKST". AST is Atlantic Standard Time,
+ * GMT-4:00.
+ *
+ * PNT (Phoenix Time) GMT-7:00. PNT usually means Pitcairn Time,
+ * GMT-8:30. There is no standard abbreviation for Phoenix time, as distinct
+ * from MST with daylight savings.
+ *
+ * In addition to these problems, a number of zones are FAKE. That is, they
+ * don't match what people use in the real world.
+ *
+ * FAKE zones:
+ *
+ * EET (should be EEST)
+ * ART (should be EEST)
+ * MET (should be IRST)
+ * NET (should be AMST)
+ * PLT (should be PKT)
+ * BST (should be BDT)
+ * VST (should be ICT)
+ * CTT (should be CST) +
+ * ACT (should be CST) +
+ * AET (should be EST) +
+ * MIT (should be WST) +
+ * IET (should be EST) +
+ * PRT (should be AST) +
+ * CNT (should be NST)
+ * AGT (should be ARST)
+ * BET (should be EST) +
+ *
+ * + A zone with the correct name already exists and means something
+ * else. E.g., EST usually indicates the US Eastern zone, so it cannot be
+ * used for Brazil (BET).
+ */
+void TimeZoneTest::TestShortZoneIDs()
+{
+ int32_t i;
+ // Create a small struct to hold the array
+ struct
+ {
+ const char *id;
+ int32_t offset;
+ UBool daylight;
+ }
+ kReferenceList [] =
+ {
+ {"MIT", -660, FALSE},
+ {"HST", -600, FALSE},
+ {"AST", -540, TRUE},
+ {"PST", -480, TRUE},
+ {"PNT", -420, FALSE},
+ {"MST", -420, FALSE}, // updated Aug 2003 aliu
+ {"CST", -360, TRUE},
+ {"IET", -300, TRUE}, // updated Jan 2006 srl
+ {"EST", -300, FALSE}, // updated Aug 2003 aliu
+ {"PRT", -240, FALSE},
+ {"CNT", -210, TRUE},
+ {"AGT", -180, FALSE}, // updated 26 Sep 2000 aliu
+ {"BET", -180, TRUE},
+ // "CAT", -60, FALSE, // Wrong:
+ // As of bug 4130885, fix CAT (Central Africa)
+ {"CAT", 120, FALSE}, // Africa/Harare
+ {"GMT", 0, FALSE},
+ {"UTC", 0, FALSE}, // ** srl: seems broken in C++
+ {"ECT", 60, TRUE},
+ {"ART", 120, TRUE},
+ {"EET", 120, TRUE},
+ {"EAT", 180, FALSE},
+ {"MET", 60, TRUE}, // updated 12/3/99 aliu
+ {"NET", 240, TRUE}, // updated 12/3/99 aliu
+ {"PLT", 300, FALSE}, // updated Aug 2003 aliu
+ {"IST", 330, FALSE},
+ {"BST", 360, FALSE},
+ {"VST", 420, FALSE},
+ {"CTT", 480, FALSE}, // updated Aug 2003 aliu
+ {"JST", 540, FALSE},
+ {"ACT", 570, FALSE}, // updated Aug 2003 aliu
+ {"AET", 600, TRUE},
+ {"SST", 660, FALSE},
+ // "NST", 720, FALSE,
+ // As of bug 4130885, fix NST (New Zealand)
+ {"NST", 720, TRUE}, // Pacific/Auckland
+
+ // From icuzones:
+ {"Etc/Unknown", 0, FALSE},
+
+ {"SystemV/AST4ADT", -240, TRUE},
+ {"SystemV/EST5EDT", -300, TRUE},
+ {"SystemV/CST6CDT", -360, TRUE},
+ {"SystemV/MST7MDT", -420, TRUE},
+ {"SystemV/PST8PDT", -480, TRUE},
+ {"SystemV/YST9YDT", -540, TRUE},
+ {"SystemV/AST4", -240, FALSE},
+ {"SystemV/EST5", -300, FALSE},
+ {"SystemV/CST6", -360, FALSE},
+ {"SystemV/MST7", -420, FALSE},
+ {"SystemV/PST8", -480, FALSE},
+ {"SystemV/YST9", -540, FALSE},
+ {"SystemV/HST10", -600, FALSE},
+
+ {"",0,FALSE}
+ };
+
+
+ for(i=0;kReferenceList[i].id[0];i++) {
+ UnicodeString itsID(kReferenceList[i].id);
+ UBool ok = TRUE;
+ // Check existence.
+ TimeZone *tz = TimeZone::createTimeZone(itsID);
+ if (!tz || (kReferenceList[i].offset != 0 && *tz == *TimeZone::getGMT())) {
+ errln("FAIL: Time Zone " + itsID + " does not exist!");
+ continue;
+ }
+
+ // Check daylight usage.
+ UBool usesDaylight = tz->useDaylightTime();
+ if (usesDaylight != kReferenceList[i].daylight) {
+ errln("FAIL: Time Zone " + itsID + " use daylight is " +
+ (usesDaylight?"TRUE":"FALSE") +
+ " but it should be " +
+ ((kReferenceList[i].daylight)?"TRUE":"FALSE"));
+ ok = FALSE;
+ }
+
+ // Check offset
+ int32_t offsetInMinutes = tz->getRawOffset()/60000;
+ if (offsetInMinutes != kReferenceList[i].offset) {
+ errln("FAIL: Time Zone " + itsID + " raw offset is " +
+ offsetInMinutes +
+ " but it should be " + kReferenceList[i].offset);
+ ok = FALSE;
+ }
+
+ if (ok) {
+ logln("OK: " + itsID +
+ " useDaylightTime() & getRawOffset() as expected");
+ }
+ delete tz;
+ }
+
+
+ // OK now test compat
+ logln("Testing for compatibility zones");
+
+ const char* compatibilityMap[] = {
+ // This list is copied from tz.alias. If tz.alias
+ // changes, this list must be updated. Current as of Mar 2007
+ "ACT", "Australia/Darwin",
+ "AET", "Australia/Sydney",
+ "AGT", "America/Buenos_Aires",
+ "ART", "Africa/Cairo",
+ "AST", "America/Anchorage",
+ "BET", "America/Sao_Paulo",
+ "BST", "Asia/Dhaka", // # spelling changed in 2000h; was Asia/Dacca
+ "CAT", "Africa/Harare",
+ "CNT", "America/St_Johns",
+ "CST", "America/Chicago",
+ "CTT", "Asia/Shanghai",
+ "EAT", "Africa/Addis_Ababa",
+ "ECT", "Europe/Paris",
+ // EET Europe/Istanbul # EET is a standard UNIX zone
+ // "EST", "America/New_York", # Defined as -05:00
+ // "HST", "Pacific/Honolulu", # Defined as -10:00
+ "IET", "America/Indianapolis",
+ "IST", "Asia/Calcutta",
+ "JST", "Asia/Tokyo",
+ // MET Asia/Tehran # MET is a standard UNIX zone
+ "MIT", "Pacific/Apia",
+ // "MST", "America/Denver", # Defined as -07:00
+ "NET", "Asia/Yerevan",
+ "NST", "Pacific/Auckland",
+ "PLT", "Asia/Karachi",
+ "PNT", "America/Phoenix",
+ "PRT", "America/Puerto_Rico",
+ "PST", "America/Los_Angeles",
+ "SST", "Pacific/Guadalcanal",
+ "UTC", "Etc/GMT",
+ "VST", "Asia/Saigon",
+ "","",""
+ };
+
+ for (i=0;*compatibilityMap[i];i+=2) {
+ UnicodeString itsID;
+
+ const char *zone1 = compatibilityMap[i];
+ const char *zone2 = compatibilityMap[i+1];
+
+ TimeZone *tz1 = TimeZone::createTimeZone(zone1);
+ TimeZone *tz2 = TimeZone::createTimeZone(zone2);
+
+ if (!tz1) {
+ errln(UnicodeString("FAIL: Could not find short ID zone ") + zone1);
+ }
+ if (!tz2) {
+ errln(UnicodeString("FAIL: Could not find long ID zone ") + zone2);
+ }
+
+ if (tz1 && tz2) {
+ // make NAME same so comparison will only look at the rest
+ tz2->setID(tz1->getID(itsID));
+
+ if (*tz1 != *tz2) {
+ errln("FAIL: " + UnicodeString(zone1) +
+ " != " + UnicodeString(zone2));
+ } else {
+ logln("OK: " + UnicodeString(zone1) +
+ " == " + UnicodeString(zone2));
+ }
+ }
+
+ delete tz1;
+ delete tz2;
+ }
+}
+
+
+/**
+ * Utility function for TestCustomParse
+ */
+UnicodeString& TimeZoneTest::formatOffset(int32_t offset, UnicodeString &rv) {
+ rv.remove();
+ UChar sign = 0x002B;
+ if (offset < 0) {
+ sign = 0x002D;
+ offset = -offset;
+ }
+
+ int32_t s = offset % 60;
+ offset /= 60;
+ int32_t m = offset % 60;
+ int32_t h = offset / 60;
+
+ rv += (UChar)(sign);
+ if (h >= 10) {
+ rv += (UChar)(0x0030 + (h/10));
+ } else {
+ rv += (UChar)0x0030;
+ }
+ rv += (UChar)(0x0030 + (h%10));
+
+ rv += (UChar)0x003A; /* ':' */
+ if (m >= 10) {
+ rv += (UChar)(0x0030 + (m/10));
+ } else {
+ rv += (UChar)0x0030;
+ }
+ rv += (UChar)(0x0030 + (m%10));
+
+ if (s) {
+ rv += (UChar)0x003A; /* ':' */
+ if (s >= 10) {
+ rv += (UChar)(0x0030 + (s/10));
+ } else {
+ rv += (UChar)0x0030;
+ }
+ rv += (UChar)(0x0030 + (s%10));
+ }
+ return rv;
+}
+
+/**
+ * Utility function for TestCustomParse, generating time zone ID
+ * string for the give offset.
+ */
+UnicodeString& TimeZoneTest::formatTZID(int32_t offset, UnicodeString &rv) {
+ rv.remove();
+ UChar sign = 0x002B;
+ if (offset < 0) {
+ sign = 0x002D;
+ offset = -offset;
+ }
+
+ int32_t s = offset % 60;
+ offset /= 60;
+ int32_t m = offset % 60;
+ int32_t h = offset / 60;
+
+ rv += "GMT";
+ rv += (UChar)(sign);
+ if (h >= 10) {
+ rv += (UChar)(0x0030 + (h/10));
+ } else {
+ rv += (UChar)0x0030;
+ }
+ rv += (UChar)(0x0030 + (h%10));
+
+ if (m >= 10) {
+ rv += (UChar)(0x0030 + (m/10));
+ } else {
+ rv += (UChar)0x0030;
+ }
+ rv += (UChar)(0x0030 + (m%10));
+
+ if (s) {
+ if (s >= 10) {
+ rv += (UChar)(0x0030 + (s/10));
+ } else {
+ rv += (UChar)0x0030;
+ }
+ rv += (UChar)(0x0030 + (s%10));
+ }
+ return rv;
+}
+
+/**
+ * As part of the VM fix (see CCC approved RFE 4028006, bug
+ * 4044013), TimeZone.getTimeZone() has been modified to recognize
+ * generic IDs of the form GMT[+-]hh:mm, GMT[+-]hhmm, and
+ * GMT[+-]hh. Test this behavior here.
+ *
+ * @bug 4044013
+ */
+void TimeZoneTest::TestCustomParse()
+{
+ int32_t i;
+ const int32_t kUnparseable = 604800; // the number of seconds in a week. More than any offset should be.
+
+ struct
+ {
+ const char *customId;
+ int32_t expectedOffset;
+ }
+ kData[] =
+ {
+ // ID Expected offset in seconds
+ {"GMT", kUnparseable}, //Isn't custom. [returns normal GMT]
+ {"GMT-YOUR.AD.HERE", kUnparseable},
+ {"GMT0", kUnparseable},
+ {"GMT+0", (0)},
+ {"GMT+1", (1*60*60)},
+ {"GMT-0030", (-30*60)},
+ {"GMT+15:99", kUnparseable},
+ {"GMT+", kUnparseable},
+ {"GMT-", kUnparseable},
+ {"GMT+0:", kUnparseable},
+ {"GMT-:", kUnparseable},
+ {"GMT-YOUR.AD.HERE", kUnparseable},
+ {"GMT+0010", (10*60)}, // Interpret this as 00:10
+ {"GMT-10", (-10*60*60)},
+ {"GMT+30", kUnparseable},
+ {"GMT-3:30", (-(3*60+30)*60)},
+ {"GMT-230", (-(2*60+30)*60)},
+ {"GMT+05:13:05", ((5*60+13)*60+5)},
+ {"GMT-71023", (-((7*60+10)*60+23))},
+ {"GMT+01:23:45:67", kUnparseable},
+ {"GMT+01:234", kUnparseable},
+ {"GMT-2:31:123", kUnparseable},
+ {"GMT+3:75", kUnparseable},
+ {"GMT-01010101", kUnparseable},
+ {0, 0}
+ };
+
+ for (i=0; kData[i].customId != 0; i++) {
+ UnicodeString id(kData[i].customId);
+ int32_t exp = kData[i].expectedOffset;
+ TimeZone *zone = TimeZone::createTimeZone(id);
+ UnicodeString itsID, temp;
+
+ if (zone->getDynamicClassID() == OlsonTimeZone::getStaticClassID()) {
+ logln(id + " -> Olson time zone");
+ } else {
+ zone->getID(itsID);
+ int32_t ioffset = zone->getRawOffset()/1000;
+ UnicodeString offset, expectedID;
+ formatOffset(ioffset, offset);
+ formatTZID(ioffset, expectedID);
+ logln(id + " -> " + itsID + " " + offset);
+ if (exp == kUnparseable && itsID != "GMT") {
+ errln("Expected parse failure for " + id +
+ ", got offset of " + offset +
+ ", id " + itsID);
+ }
+ // JDK 1.3 creates custom zones with the ID "Custom"
+ // JDK 1.4 creates custom zones with IDs of the form "GMT+02:00"
+ // ICU creates custom zones with IDs of the form "GMT+0200"
+ else if (exp != kUnparseable && (ioffset != exp || itsID != expectedID)) {
+ errln("Expected offset of " + formatOffset(exp, temp) +
+ ", id " + expectedID +
+ ", for " + id +
+ ", got offset of " + offset +
+ ", id " + itsID);
+ }
+ }
+ delete zone;
+ }
+}
+
+void
+TimeZoneTest::TestAliasedNames()
+{
+ struct {
+ const char *from;
+ const char *to;
+ } kData[] = {
+ /* Generated by org.unicode.cldr.tool.CountItems */
+
+ /* zoneID, canonical zoneID */
+ {"Africa/Timbuktu", "Africa/Bamako"},
+ {"America/Argentina/Buenos_Aires", "America/Buenos_Aires"},
+ {"America/Argentina/Catamarca", "America/Catamarca"},
+ {"America/Argentina/ComodRivadavia", "America/Catamarca"},
+ {"America/Argentina/Cordoba", "America/Cordoba"},
+ {"America/Argentina/Jujuy", "America/Jujuy"},
+ {"America/Argentina/Mendoza", "America/Mendoza"},
+ {"America/Atka", "America/Adak"},
+ {"America/Ensenada", "America/Tijuana"},
+ {"America/Fort_Wayne", "America/Indiana/Indianapolis"},
+ {"America/Indianapolis", "America/Indiana/Indianapolis"},
+ {"America/Knox_IN", "America/Indiana/Knox"},
+ {"America/Louisville", "America/Kentucky/Louisville"},
+ {"America/Porto_Acre", "America/Rio_Branco"},
+ {"America/Rosario", "America/Cordoba"},
+ {"America/Virgin", "America/St_Thomas"},
+ {"Asia/Ashkhabad", "Asia/Ashgabat"},
+ {"Asia/Chungking", "Asia/Chongqing"},
+ {"Asia/Dacca", "Asia/Dhaka"},
+ {"Asia/Istanbul", "Europe/Istanbul"},
+ {"Asia/Macao", "Asia/Macau"},
+ {"Asia/Tel_Aviv", "Asia/Jerusalem"},
+ {"Asia/Thimbu", "Asia/Thimphu"},
+ {"Asia/Ujung_Pandang", "Asia/Makassar"},
+ {"Asia/Ulan_Bator", "Asia/Ulaanbaatar"},
+ {"Australia/ACT", "Australia/Sydney"},
+ {"Australia/Canberra", "Australia/Sydney"},
+ {"Australia/LHI", "Australia/Lord_Howe"},
+ {"Australia/NSW", "Australia/Sydney"},
+ {"Australia/North", "Australia/Darwin"},
+ {"Australia/Queensland", "Australia/Brisbane"},
+ {"Australia/South", "Australia/Adelaide"},
+ {"Australia/Tasmania", "Australia/Hobart"},
+ {"Australia/Victoria", "Australia/Melbourne"},
+ {"Australia/West", "Australia/Perth"},
+ {"Australia/Yancowinna", "Australia/Broken_Hill"},
+ {"Brazil/Acre", "America/Rio_Branco"},
+ {"Brazil/DeNoronha", "America/Noronha"},
+ {"Brazil/East", "America/Sao_Paulo"},
+ {"Brazil/West", "America/Manaus"},
+ {"Canada/Atlantic", "America/Halifax"},
+ {"Canada/Central", "America/Winnipeg"},
+ {"Canada/East-Saskatchewan", "America/Regina"},
+ {"Canada/Eastern", "America/Toronto"},
+ {"Canada/Mountain", "America/Edmonton"},
+ {"Canada/Newfoundland", "America/St_Johns"},
+ {"Canada/Pacific", "America/Vancouver"},
+ {"Canada/Saskatchewan", "America/Regina"},
+ {"Canada/Yukon", "America/Whitehorse"},
+ {"Chile/Continental", "America/Santiago"},
+ {"Chile/EasterIsland", "Pacific/Easter"},
+ {"Cuba", "America/Havana"},
+ {"Egypt", "Africa/Cairo"},
+ {"Eire", "Europe/Dublin"},
+ {"Etc/GMT+0", "Etc/GMT"},
+ {"Etc/GMT-0", "Etc/GMT"},
+ {"Etc/GMT0", "Etc/GMT"},
+ {"Etc/Greenwich", "Etc/GMT"},
+ {"Etc/UCT", "Etc/GMT"},
+ {"Etc/UTC", "Etc/GMT"},
+ {"Etc/Universal", "Etc/GMT"},
+ {"Etc/Zulu", "Etc/GMT"},
+ {"Europe/Belfast", "Europe/London"},
+ {"Europe/Nicosia", "Asia/Nicosia"},
+ {"Europe/Tiraspol", "Europe/Chisinau"},
+ {"GB", "Europe/London"},
+ {"GB-Eire", "Europe/London"},
+ {"GMT", "Etc/GMT"},
+ {"GMT+0", "Etc/GMT"},
+ {"GMT-0", "Etc/GMT"},
+ {"GMT0", "Etc/GMT"},
+ {"Greenwich", "Etc/GMT"},
+ {"Hongkong", "Asia/Hong_Kong"},
+ {"Iceland", "Atlantic/Reykjavik"},
+ {"Iran", "Asia/Tehran"},
+ {"Israel", "Asia/Jerusalem"},
+ {"Jamaica", "America/Jamaica"},
+ {"Japan", "Asia/Tokyo"},
+ {"Kwajalein", "Pacific/Kwajalein"},
+ {"Libya", "Africa/Tripoli"},
+ {"Mexico/BajaNorte", "America/Tijuana"},
+ {"Mexico/BajaSur", "America/Mazatlan"},
+ {"Mexico/General", "America/Mexico_City"},
+ {"NZ", "Pacific/Auckland"},
+ {"NZ-CHAT", "Pacific/Chatham"},
+ {"Navajo", "America/Shiprock"},
+ {"PRC", "Asia/Shanghai"},
+ {"Pacific/Samoa", "Pacific/Pago_Pago"},
+ {"Pacific/Yap", "Pacific/Truk"},
+ {"Poland", "Europe/Warsaw"},
+ {"Portugal", "Europe/Lisbon"},
+ {"ROC", "Asia/Taipei"},
+ {"ROK", "Asia/Seoul"},
+ {"Singapore", "Asia/Singapore"},
+ {"Turkey", "Europe/Istanbul"},
+ {"UCT", "Etc/GMT"},
+ {"US/Alaska", "America/Anchorage"},
+ {"US/Aleutian", "America/Adak"},
+ {"US/Arizona", "America/Phoenix"},
+ {"US/Central", "America/Chicago"},
+ {"US/East-Indiana", "America/Indiana/Indianapolis"},
+ {"US/Eastern", "America/New_York"},
+ {"US/Hawaii", "Pacific/Honolulu"},
+ {"US/Indiana-Starke", "America/Indiana/Knox"},
+ {"US/Michigan", "America/Detroit"},
+ {"US/Mountain", "America/Denver"},
+ {"US/Pacific", "America/Los_Angeles"},
+ {"US/Pacific-New", "America/Los_Angeles"},
+ {"US/Samoa", "Pacific/Pago_Pago"},
+ {"UTC", "Etc/GMT"},
+ {"Universal", "Etc/GMT"},
+ {"W-SU", "Europe/Moscow"},
+ {"Zulu", "Etc/GMT"},
+ /* Total: 113 */
+
+ };
+
+ TimeZone::EDisplayType styles[] = { TimeZone::SHORT, TimeZone::LONG };
+ UBool useDst[] = { FALSE, TRUE };
+ int32_t noLoc = uloc_countAvailable();
+
+ int32_t i, j, k, loc;
+ UnicodeString fromName, toName;
+ TimeZone *from = NULL, *to = NULL;
+ for(i = 0; i < (int32_t)(sizeof(kData)/sizeof(kData[0])); i++) {
+ from = TimeZone::createTimeZone(kData[i].from);
+ to = TimeZone::createTimeZone(kData[i].to);
+ if(!from->hasSameRules(*to)) {
+ errln("different at %i\n", i);
+ }
+ if(!quick) {
+ for(loc = 0; loc < noLoc; loc++) {
+ const char* locale = uloc_getAvailable(loc);
+ for(j = 0; j < (int32_t)(sizeof(styles)/sizeof(styles[0])); j++) {
+ for(k = 0; k < (int32_t)(sizeof(useDst)/sizeof(useDst[0])); k++) {
+ fromName.remove();
+ toName.remove();
+ from->getDisplayName(useDst[k], styles[j],locale, fromName);
+ to->getDisplayName(useDst[k], styles[j], locale, toName);
+ if(fromName.compare(toName) != 0) {
+ errln("Fail: Expected "+toName+" but got " + prettify(fromName)
+ + " for locale: " + locale + " index: "+ loc
+ + " to id "+ kData[i].to
+ + " from id " + kData[i].from);
+ }
+ }
+ }
+ }
+ } else {
+ fromName.remove();
+ toName.remove();
+ from->getDisplayName(fromName);
+ to->getDisplayName(toName);
+ if(fromName.compare(toName) != 0) {
+ errln("Fail: Expected "+toName+" but got " + fromName);
+ }
+ }
+ delete from;
+ delete to;
+ }
+}
+
+/**
+ * Test the basic functionality of the getDisplayName() API.
+ *
+ * @bug 4112869
+ * @bug 4028006
+ *
+ * See also API change request A41.
+ *
+ * 4/21/98 - make smarter, so the test works if the ext resources
+ * are present or not.
+ */
+void
+TimeZoneTest::TestDisplayName()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t i;
+ TimeZone *zone = TimeZone::createTimeZone("PST");
+ UnicodeString name;
+ zone->getDisplayName(Locale::getEnglish(), name);
+ logln("PST->" + name);
+ if (name.compare("Pacific Standard Time") != 0)
+ errln("Fail: Expected \"Pacific Standard Time\" but got " + name);
+
+ //*****************************************************************
+ // THE FOLLOWING LINES MUST BE UPDATED IF THE LOCALE DATA CHANGES
+ // THE FOLLOWING LINES MUST BE UPDATED IF THE LOCALE DATA CHANGES
+ // THE FOLLOWING LINES MUST BE UPDATED IF THE LOCALE DATA CHANGES
+ //*****************************************************************
+ struct
+ {
+ UBool useDst;
+ TimeZone::EDisplayType style;
+ const char *expect;
+ } kData[] = {
+ {FALSE, TimeZone::SHORT, "PST"},
+ {TRUE, TimeZone::SHORT, "PDT"},
+ {FALSE, TimeZone::LONG, "Pacific Standard Time"},
+ {TRUE, TimeZone::LONG, "Pacific Daylight Time"},
+
+ {FALSE, TimeZone::LONG, ""}
+ };
+
+ for (i=0; kData[i].expect[0] != '\0'; i++)
+ {
+ name.remove();
+ name = zone->getDisplayName(kData[i].useDst,
+ kData[i].style,
+ Locale::getEnglish(), name);
+ if (name.compare(kData[i].expect) != 0)
+ errln("Fail: Expected " + UnicodeString(kData[i].expect) + "; got " + name);
+ logln("PST [with options]->" + name);
+ }
+ for (i=0; kData[i].expect[0] != '\0'; i++)
+ {
+ name.remove();
+ name = zone->getDisplayName(kData[i].useDst,
+ kData[i].style, name);
+ if (name.compare(kData[i].expect) != 0)
+ errln("Fail: Expected " + UnicodeString(kData[i].expect) + "; got " + name);
+ logln("PST [with options]->" + name);
+ }
+
+
+ // Make sure that we don't display the DST name by constructing a fake
+ // PST zone that has DST all year long.
+ SimpleTimeZone *zone2 = new SimpleTimeZone(0, "PST");
+
+ zone2->setStartRule(UCAL_JANUARY, 1, 0, 0, status);
+ zone2->setEndRule(UCAL_DECEMBER, 31, 0, 0, status);
+
+ UnicodeString inDaylight;
+ if (zone2->inDaylightTime(UDate(0), status)) {
+ inDaylight = UnicodeString("TRUE");
+ } else {
+ inDaylight = UnicodeString("FALSE");
+ }
+ logln(UnicodeString("Modified PST inDaylightTime->") + inDaylight );
+ if(U_FAILURE(status))
+ {
+ errln("Some sort of error..." + UnicodeString(u_errorName(status))); // REVISIT
+ }
+ name.remove();
+ name = zone2->getDisplayName(Locale::getEnglish(),name);
+ logln("Modified PST->" + name);
+ if (name.compare("Pacific Standard Time") != 0)
+ errln("Fail: Expected \"Pacific Standard Time\"");
+
+ // Make sure we get the default display format for Locales
+ // with no display name data.
+ Locale mt_MT("mt_MT");
+ name.remove();
+ name = zone->getDisplayName(mt_MT,name);
+ //*****************************************************************
+ // THE FOLLOWING LINE MUST BE UPDATED IF THE LOCALE DATA CHANGES
+ // THE FOLLOWING LINE MUST BE UPDATED IF THE LOCALE DATA CHANGES
+ // THE FOLLOWING LINE MUST BE UPDATED IF THE LOCALE DATA CHANGES
+ //*****************************************************************
+ logln("PST(mt_MT)->" + name);
+
+ // *** REVISIT SRL how in the world do I check this? looks java specific.
+ // Now be smart -- check to see if zh resource is even present.
+ // If not, we expect the en fallback behavior.
+ ResourceBundle enRB(NULL,
+ Locale::getEnglish(), status);
+ if(U_FAILURE(status))
+ errln("Couldn't get ResourceBundle for en");
+
+ ResourceBundle mtRB(NULL,
+ mt_MT, status);
+ //if(U_FAILURE(status))
+ // errln("Couldn't get ResourceBundle for mt_MT");
+
+ UBool noZH = U_FAILURE(status);
+
+ if (noZH) {
+ logln("Warning: Not testing the mt_MT behavior because resource is absent");
+ if (name != "Pacific Standard Time")
+ errln("Fail: Expected Pacific Standard Time");
+ }
+
+
+ if (name.compare("GMT-08:00") &&
+ name.compare("GMT-8:00") &&
+ name.compare("GMT-0800") &&
+ name.compare("GMT-800")) {
+ errln(UnicodeString("Fail: Expected GMT-08:00 or something similar for PST in mt_MT but got ") + name );
+ errln("************************************************************");
+ errln("THE ABOVE FAILURE MAY JUST MEAN THE LOCALE DATA HAS CHANGED");
+ errln("************************************************************");
+ }
+
+ // Now try a non-existent zone
+ delete zone2;
+ zone2 = new SimpleTimeZone(90*60*1000, "xyzzy");
+ name.remove();
+ name = zone2->getDisplayName(Locale::getEnglish(),name);
+ logln("GMT+90min->" + name);
+ if (name.compare("GMT+01:30") &&
+ name.compare("GMT+1:30") &&
+ name.compare("GMT+0130") &&
+ name.compare("GMT+130"))
+ errln("Fail: Expected GMT+01:30 or something similar");
+ name.truncate(0);
+ zone2->getDisplayName(name);
+ logln("GMT+90min->" + name);
+ if (name.compare("GMT+01:30") &&
+ name.compare("GMT+1:30") &&
+ name.compare("GMT+0130") &&
+ name.compare("GMT+130"))
+ errln("Fail: Expected GMT+01:30 or something similar");
+ // clean up
+ delete zone;
+ delete zone2;
+}
+
+/**
+ * @bug 4107276
+ */
+void
+TimeZoneTest::TestDSTSavings()
+{
+ UErrorCode status = U_ZERO_ERROR;
+ // It might be better to find a way to integrate this test into the main TimeZone
+ // tests above, but I don't have time to figure out how to do this (or if it's
+ // even really a good idea). Let's consider that a future. --rtg 1/27/98
+ SimpleTimeZone *tz = new SimpleTimeZone(-5 * U_MILLIS_PER_HOUR, "dstSavingsTest",
+ UCAL_MARCH, 1, 0, 0, UCAL_SEPTEMBER, 1, 0, 0,
+ (int32_t)(0.5 * U_MILLIS_PER_HOUR), status);
+ if(U_FAILURE(status))
+ errln("couldn't create TimeZone");
+
+ if (tz->getRawOffset() != -5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("Got back a raw offset of ") + (tz->getRawOffset() / U_MILLIS_PER_HOUR) +
+ " hours instead of -5 hours.");
+ if (!tz->useDaylightTime())
+ errln("Test time zone should use DST but claims it doesn't.");
+ if (tz->getDSTSavings() != 0.5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("Set DST offset to 0.5 hour, but got back ") + (tz->getDSTSavings() /
+ U_MILLIS_PER_HOUR) + " hours instead.");
+
+ int32_t offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JANUARY, 1,
+ UCAL_THURSDAY, 10 * U_MILLIS_PER_HOUR,status);
+ if (offset != -5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10 AM, 1/1/98 should have been -5 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JUNE, 1, UCAL_MONDAY,
+ 10 * U_MILLIS_PER_HOUR,status);
+ if (offset != -4.5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10 AM, 6/1/98 should have been -4.5 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ tz->setDSTSavings(U_MILLIS_PER_HOUR, status);
+ offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JANUARY, 1,
+ UCAL_THURSDAY, 10 * U_MILLIS_PER_HOUR,status);
+ if (offset != -5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10 AM, 1/1/98 should have been -5 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JUNE, 1, UCAL_MONDAY,
+ 10 * U_MILLIS_PER_HOUR,status);
+ if (offset != -4 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10 AM, 6/1/98 (with a 1-hour DST offset) should have been -4 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ delete tz;
+}
+
+/**
+ * @bug 4107570
+ */
+void
+TimeZoneTest::TestAlternateRules()
+{
+ // Like TestDSTSavings, this test should probably be integrated somehow with the main
+ // test at the top of this class, but I didn't have time to figure out how to do that.
+ // --rtg 1/28/98
+
+ SimpleTimeZone tz(-5 * U_MILLIS_PER_HOUR, "alternateRuleTest");
+
+ // test the day-of-month API
+ UErrorCode status = U_ZERO_ERROR;
+ tz.setStartRule(UCAL_MARCH, 10, 12 * U_MILLIS_PER_HOUR, status);
+ if(U_FAILURE(status))
+ errln("tz.setStartRule failed");
+ tz.setEndRule(UCAL_OCTOBER, 20, 12 * U_MILLIS_PER_HOUR, status);
+ if(U_FAILURE(status))
+ errln("tz.setStartRule failed");
+
+ int32_t offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 5,
+ UCAL_THURSDAY, 10 * U_MILLIS_PER_HOUR,status);
+ if (offset != -5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 3/5/98 should have been -5 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 15,
+ UCAL_SUNDAY, 10 * millisPerHour,status);
+ if (offset != -4 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 3/15/98 should have been -4 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 15,
+ UCAL_THURSDAY, 10 * millisPerHour,status);
+ if (offset != -4 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 10/15/98 should have been -4 hours, but we got ") + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 25,
+ UCAL_SUNDAY, 10 * millisPerHour,status);
+ if (offset != -5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 10/25/98 should have been -5 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ // test the day-of-week-after-day-in-month API
+ tz.setStartRule(UCAL_MARCH, 10, UCAL_FRIDAY, 12 * millisPerHour, TRUE, status);
+ if(U_FAILURE(status))
+ errln("tz.setStartRule failed");
+ tz.setEndRule(UCAL_OCTOBER, 20, UCAL_FRIDAY, 12 * millisPerHour, FALSE, status);
+ if(U_FAILURE(status))
+ errln("tz.setStartRule failed");
+
+ offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 11,
+ UCAL_WEDNESDAY, 10 * millisPerHour,status);
+ if (offset != -5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 3/11/98 should have been -5 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 14,
+ UCAL_SATURDAY, 10 * millisPerHour,status);
+ if (offset != -4 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 3/14/98 should have been -4 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 15,
+ UCAL_THURSDAY, 10 * millisPerHour,status);
+ if (offset != -4 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 10/15/98 should have been -4 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+
+ offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 17,
+ UCAL_SATURDAY, 10 * millisPerHour,status);
+ if (offset != -5 * U_MILLIS_PER_HOUR)
+ errln(UnicodeString("The offset for 10AM, 10/17/98 should have been -5 hours, but we got ")
+ + (offset / U_MILLIS_PER_HOUR) + " hours.");
+}
+
+void TimeZoneTest::TestFractionalDST() {
+ const char* tzName = "Australia/Lord_Howe"; // 30 min offset
+ TimeZone* tz_icu = TimeZone::createTimeZone(tzName);
+ int dst_icu = tz_icu->getDSTSavings();
+ UnicodeString id;
+ int32_t expected = 1800000;
+ if (expected != dst_icu) {
+ errln(UnicodeString("java reports dst savings of ") + expected +
+ " but icu reports " + dst_icu +
+ " for tz " + tz_icu->getID(id));
+ } else {
+ logln(UnicodeString("both java and icu report dst savings of ") + expected + " for tz " + tz_icu->getID(id));
+ }
+ delete tz_icu;
+}
+
+/**
+ * Test country code support. Jitterbug 776.
+ */
+void TimeZoneTest::TestCountries() {
+ // Make sure America/Los_Angeles is in the "US" group, and
+ // Asia/Tokyo isn't. Vice versa for the "JP" group.
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t n;
+ StringEnumeration* s = TimeZone::createEnumeration("US");
+ n = s->count(ec);
+ UBool la = FALSE, tokyo = FALSE;
+ UnicodeString laZone("America/Los_Angeles", "");
+ UnicodeString tokyoZone("Asia/Tokyo", "");
+ int32_t i;
+
+ if (s == NULL || n <= 0) {
+ errln("FAIL: TimeZone::createEnumeration() returned nothing");
+ return;
+ }
+ for (i=0; i<n; ++i) {
+ const UnicodeString* id = s->snext(ec);
+ if (*id == (laZone)) {
+ la = TRUE;
+ }
+ if (*id == (tokyoZone)) {
+ tokyo = TRUE;
+ }
+ }
+ if (!la || tokyo) {
+ errln("FAIL: " + laZone + " in US = " + la);
+ errln("FAIL: " + tokyoZone + " in US = " + tokyo);
+ }
+ delete s;
+
+ s = TimeZone::createEnumeration("JP");
+ n = s->count(ec);
+ la = FALSE; tokyo = FALSE;
+
+ for (i=0; i<n; ++i) {
+ const UnicodeString* id = s->snext(ec);
+ if (*id == (laZone)) {
+ la = TRUE;
+ }
+ if (*id == (tokyoZone)) {
+ tokyo = TRUE;
+ }
+ }
+ if (la || !tokyo) {
+ errln("FAIL: " + laZone + " in JP = " + la);
+ errln("FAIL: " + tokyoZone + " in JP = " + tokyo);
+ }
+ StringEnumeration* s1 = TimeZone::createEnumeration("US");
+ StringEnumeration* s2 = TimeZone::createEnumeration("US");
+ for(i=0;i<n;++i){
+ const UnicodeString* id1 = s1->snext(ec);
+ if(id1==NULL || U_FAILURE(ec)){
+ errln("Failed to fetch next from TimeZone enumeration. Length returned : %i Current Index: %i", n,i);
+ }
+ TimeZone* tz1 = TimeZone::createTimeZone(*id1);
+ for(int j=0; j<n;++j){
+ const UnicodeString* id2 = s2->snext(ec);
+ if(id2==NULL || U_FAILURE(ec)){
+ errln("Failed to fetch next from TimeZone enumeration. Length returned : %i Current Index: %i", n,i);
+ }
+ TimeZone* tz2 = TimeZone::createTimeZone(*id2);
+ if(tz1->hasSameRules(*tz2)){
+ logln("ID1 : " + *id1+" == ID2 : " +*id2);
+ }
+ delete tz2;
+ }
+ delete tz1;
+ }
+ delete s1;
+ delete s2;
+ delete s;
+}
+
+void TimeZoneTest::TestHistorical() {
+ const int32_t H = U_MILLIS_PER_HOUR;
+ struct {
+ const char* id;
+ int32_t time; // epoch seconds
+ int32_t offset; // total offset (millis)
+ } DATA[] = {
+ // Add transition points (before/after) as desired to test historical
+ // behavior.
+ {"America/Los_Angeles", 638963999, -8*H}, // Sun Apr 01 01:59:59 GMT-08:00 1990
+ {"America/Los_Angeles", 638964000, -7*H}, // Sun Apr 01 03:00:00 GMT-07:00 1990
+ {"America/Los_Angeles", 657104399, -7*H}, // Sun Oct 28 01:59:59 GMT-07:00 1990
+ {"America/Los_Angeles", 657104400, -8*H}, // Sun Oct 28 01:00:00 GMT-08:00 1990
+ {"America/Goose_Bay", -116445601, -4*H}, // Sun Apr 24 01:59:59 GMT-04:00 1966
+ {"America/Goose_Bay", -116445600, -3*H}, // Sun Apr 24 03:00:00 GMT-03:00 1966
+ {"America/Goose_Bay", -100119601, -3*H}, // Sun Oct 30 01:59:59 GMT-03:00 1966
+ {"America/Goose_Bay", -100119600, -4*H}, // Sun Oct 30 01:00:00 GMT-04:00 1966
+ {"America/Goose_Bay", -84391201, -4*H}, // Sun Apr 30 01:59:59 GMT-04:00 1967
+ {"America/Goose_Bay", -84391200, -3*H}, // Sun Apr 30 03:00:00 GMT-03:00 1967
+ {"America/Goose_Bay", -68670001, -3*H}, // Sun Oct 29 01:59:59 GMT-03:00 1967
+ {"America/Goose_Bay", -68670000, -4*H}, // Sun Oct 29 01:00:00 GMT-04:00 1967
+ {0, 0, 0}
+ };
+
+ for (int32_t i=0; DATA[i].id!=0; ++i) {
+ const char* id = DATA[i].id;
+ TimeZone *tz = TimeZone::createTimeZone(id);
+ UnicodeString s;
+ if (tz == 0) {
+ errln("FAIL: Cannot create %s", id);
+ } else if (tz->getID(s) != UnicodeString(id)) {
+ errln((UnicodeString)"FAIL: createTimeZone(" + id + ") => " + s);
+ } else {
+ UErrorCode ec = U_ZERO_ERROR;
+ int32_t raw, dst;
+ UDate when = (double) DATA[i].time * U_MILLIS_PER_SECOND;
+ tz->getOffset(when, FALSE, raw, dst, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: getOffset");
+ } else if ((raw+dst) != DATA[i].offset) {
+ errln((UnicodeString)"FAIL: " + DATA[i].id + ".getOffset(" +
+ //when + " = " +
+ dateToString(when) + ") => " +
+ raw + ", " + dst);
+ } else {
+ logln((UnicodeString)"Ok: " + DATA[i].id + ".getOffset(" +
+ //when + " = " +
+ dateToString(when) + ") => " +
+ raw + ", " + dst);
+ }
+ }
+ delete tz;
+ }
+}
+
+void TimeZoneTest::TestEquivalentIDs() {
+ int32_t n = TimeZone::countEquivalentIDs("PST");
+ if (n < 2) {
+ errln((UnicodeString)"FAIL: countEquivalentIDs(PST) = " + n);
+ } else {
+ UBool sawLA = FALSE;
+ for (int32_t i=0; i<n; ++i) {
+ UnicodeString id = TimeZone::getEquivalentID("PST", i);
+ logln((UnicodeString)"" + i + " : " + id);
+ if (id == UnicodeString("America/Los_Angeles")) {
+ sawLA = TRUE;
+ }
+ }
+ if (!sawLA) {
+ errln("FAIL: America/Los_Angeles should be in the list");
+ }
+ }
+}
+
+// Test that a transition at the end of February is handled correctly.
+void TimeZoneTest::TestFebruary() {
+ UErrorCode status = U_ZERO_ERROR;
+
+ // Time zone with daylight savings time from the first Sunday in November
+ // to the last Sunday in February.
+ // Similar to the new rule for Brazil (Sao Paulo) in tzdata2006n.
+ //
+ // Note: In tzdata2007h, the rule had changed, so no actual zones uses
+ // lastSun in Feb anymore.
+ SimpleTimeZone tz1(-3 * U_MILLIS_PER_HOUR, // raw offset: 3h before (west of) GMT
+ UNICODE_STRING("nov-feb", 7),
+ UCAL_NOVEMBER, 1, UCAL_SUNDAY, // start: November, first, Sunday
+ 0, // midnight wall time
+ UCAL_FEBRUARY, -1, UCAL_SUNDAY, // end: February, last, Sunday
+ 0, // midnight wall time
+ status);
+ if (U_FAILURE(status)) {
+ errln("Unable to create the SimpleTimeZone(nov-feb): %s", u_errorName(status));
+ return;
+ }
+
+ // Now hardcode the same rules as for Brazil in tzdata 2006n, so that
+ // we cover the intended code even when in the future zoneinfo hardcodes
+ // these transition dates.
+ SimpleTimeZone tz2(-3 * U_MILLIS_PER_HOUR, // raw offset: 3h before (west of) GMT
+ UNICODE_STRING("nov-feb2", 8),
+ UCAL_NOVEMBER, 1, -UCAL_SUNDAY, // start: November, 1 or after, Sunday
+ 0, // midnight wall time
+ UCAL_FEBRUARY, -29, -UCAL_SUNDAY,// end: February, 29 or before, Sunday
+ 0, // midnight wall time
+ status);
+ if (U_FAILURE(status)) {
+ errln("Unable to create the SimpleTimeZone(nov-feb2): %s", u_errorName(status));
+ return;
+ }
+
+ // Gregorian calendar with the UTC time zone for getting sample test date/times.
+ GregorianCalendar gc(*TimeZone::getGMT(), status);
+ if (U_FAILURE(status)) {
+ errln("Unable to create the UTC calendar: %s", u_errorName(status));
+ return;
+ }
+
+ struct {
+ // UTC time.
+ int32_t year, month, day, hour, minute, second;
+ // Expected time zone offset in hours after GMT (negative=before GMT).
+ int32_t offsetHours;
+ } data[] = {
+ { 2006, UCAL_NOVEMBER, 5, 02, 59, 59, -3 },
+ { 2006, UCAL_NOVEMBER, 5, 03, 00, 00, -2 },
+ { 2007, UCAL_FEBRUARY, 25, 01, 59, 59, -2 },
+ { 2007, UCAL_FEBRUARY, 25, 02, 00, 00, -3 },
+
+ { 2007, UCAL_NOVEMBER, 4, 02, 59, 59, -3 },
+ { 2007, UCAL_NOVEMBER, 4, 03, 00, 00, -2 },
+ { 2008, UCAL_FEBRUARY, 24, 01, 59, 59, -2 },
+ { 2008, UCAL_FEBRUARY, 24, 02, 00, 00, -3 },
+
+ { 2008, UCAL_NOVEMBER, 2, 02, 59, 59, -3 },
+ { 2008, UCAL_NOVEMBER, 2, 03, 00, 00, -2 },
+ { 2009, UCAL_FEBRUARY, 22, 01, 59, 59, -2 },
+ { 2009, UCAL_FEBRUARY, 22, 02, 00, 00, -3 },
+
+ { 2009, UCAL_NOVEMBER, 1, 02, 59, 59, -3 },
+ { 2009, UCAL_NOVEMBER, 1, 03, 00, 00, -2 },
+ { 2010, UCAL_FEBRUARY, 28, 01, 59, 59, -2 },
+ { 2010, UCAL_FEBRUARY, 28, 02, 00, 00, -3 }
+ };
+
+ TimeZone *timezones[] = { &tz1, &tz2 };
+
+ TimeZone *tz;
+ UDate dt;
+ int32_t t, i, raw, dst;
+ for (t = 0; t < LENGTHOF(timezones); ++t) {
+ tz = timezones[t];
+ for (i = 0; i < LENGTHOF(data); ++i) {
+ gc.set(data[i].year, data[i].month, data[i].day,
+ data[i].hour, data[i].minute, data[i].second);
+ dt = gc.getTime(status);
+ if (U_FAILURE(status)) {
+ errln("test case %d.%d: bad date/time %04d-%02d-%02d %02d:%02d:%02d",
+ t, i,
+ data[i].year, data[i].month + 1, data[i].day,
+ data[i].hour, data[i].minute, data[i].second);
+ status = U_ZERO_ERROR;
+ continue;
+ }
+ tz->getOffset(dt, FALSE, raw, dst, status);
+ if (U_FAILURE(status)) {
+ errln("test case %d.%d: tz.getOffset(%04d-%02d-%02d %02d:%02d:%02d) fails: %s",
+ t, i,
+ data[i].year, data[i].month + 1, data[i].day,
+ data[i].hour, data[i].minute, data[i].second,
+ u_errorName(status));
+ status = U_ZERO_ERROR;
+ } else if ((raw + dst) != data[i].offsetHours * U_MILLIS_PER_HOUR) {
+ errln("test case %d.%d: tz.getOffset(%04d-%02d-%02d %02d:%02d:%02d) returns %d+%d != %d",
+ t, i,
+ data[i].year, data[i].month + 1, data[i].day,
+ data[i].hour, data[i].minute, data[i].second,
+ raw, dst, data[i].offsetHours * U_MILLIS_PER_HOUR);
+ }
+ }
+ }
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/tztest.h b/Build/source/libs/icu/icu-xetex/test/intltest/tztest.h
new file mode 100644
index 00000000000..931509c199e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/tztest.h
@@ -0,0 +1,101 @@
+
+/********************************************************************
+ * Copyright (c) 1997-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef __TimeZoneTest__
+#define __TimeZoneTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/simpletz.h"
+#include "caltztst.h"
+
+/**
+ * Various tests for TimeZone
+ **/
+class TimeZoneTest: public CalendarTimeZoneTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+public: // package
+ static const int32_t millisPerHour;
+
+public:
+ /**
+ * Test the offset of the PRT timezone.
+ */
+ virtual void TestPRTOffset(void);
+ /**
+ * Regress a specific bug with a sequence of API calls.
+ */
+ virtual void TestVariousAPI518(void);
+ /**
+ * Test the call which retrieves the available IDs.
+ */
+ virtual void TestGetAvailableIDs913(void);
+
+ /**
+ * Generic API testing for API coverage.
+ */
+ virtual void TestGenericAPI(void);
+ /**
+ * Test the setStartRule/setEndRule API calls.
+ */
+ virtual void TestRuleAPI(void);
+
+ void findTransition(const TimeZone& tz,
+ UDate min, UDate max);
+
+ /**
+ * subtest used by TestRuleAPI
+ **/
+ void testUsingBinarySearch(const TimeZone& tz,
+ UDate min, UDate max,
+ UDate expectedBoundary);
+
+
+ /**
+ * Test short zone IDs for compliance
+ */
+ virtual void TestShortZoneIDs(void);
+
+
+ /**
+ * Test parsing custom zones
+ */
+ virtual void TestCustomParse(void);
+
+ /**
+ * Test new getDisplayName() API
+ */
+ virtual void TestDisplayName(void);
+
+ void TestDSTSavings(void);
+ void TestAlternateRules(void);
+
+ void TestCountries(void);
+
+ void TestHistorical(void);
+
+ void TestEquivalentIDs(void);
+
+ void TestAliasedNames(void);
+
+ void TestFractionalDST(void);
+
+ void TestFebruary(void);
+
+ static const UDate INTERVAL;
+
+private:
+ // internal functions
+ static UnicodeString& formatOffset(int32_t offset, UnicodeString& rv);
+ static UnicodeString& formatTZID(int32_t offset, UnicodeString& rv);
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // __TimeZoneTest__
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.cpp
new file mode 100644
index 00000000000..ccd308a5712
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.cpp
@@ -0,0 +1,265 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * UCAConformanceTest performs conformance tests defined in the data
+ * files. ICU ships with stub data files, as the whole test are too
+ * long. To do the whole test, download the test files.
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "ucaconf.h"
+#include "unicode/ustring.h"
+#include "cstring.h"
+#include "uparse.h"
+
+UCAConformanceTest::UCAConformanceTest() :
+rbUCA(NULL),
+testFile(NULL),
+status(U_ZERO_ERROR)
+{
+ UCA = ucol_open("root", &status);
+ if(U_FAILURE(status)) {
+ errln("ERROR - UCAConformanceTest: Unable to open UCA collator!");
+ }
+
+ const char *srcDir = IntlTest::getSourceTestData(status);
+ if (U_FAILURE(status)) {
+ errln("ERROR: could not open test data %s", u_errorName(status));
+ return;
+ }
+ uprv_strcpy(testDataPath, srcDir);
+ uprv_strcat(testDataPath, "CollationTest_");
+}
+
+UCAConformanceTest::~UCAConformanceTest()
+{
+ ucol_close(UCA);
+ if(rbUCA) {
+ ucol_close(rbUCA);
+ }
+ if(testFile) {
+ fclose(testFile);
+ }
+}
+
+void UCAConformanceTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par */)
+{
+ if (exec) logln("TestSuite UCAConformanceTest: ");
+ if(U_SUCCESS(status)) {
+ switch (index) {
+ case 0: name = "TestTableNonIgnorable"; if (exec) TestTableNonIgnorable(/* par */); break;
+ case 1: name = "TestTableShifted"; if (exec) TestTableShifted(/* par */); break;
+ case 2: name = "TestRulesNonIgnorable"; if (exec) TestRulesNonIgnorable(/* par */); break;
+ case 3: name = "TestRulesShifted"; if (exec) TestRulesShifted(/* par */); break;
+ default: name = ""; break;
+ }
+ } else {
+ name = "";
+ }
+}
+
+void UCAConformanceTest::initRbUCA()
+{
+ if(!rbUCA) {
+ UParseError parseError;
+ UChar *ucarules;
+ // preflight rules
+ int32_t size = ucol_getRulesEx(UCA, UCOL_FULL_RULES, NULL, 0);
+ ucarules = (UChar *)malloc(size * sizeof(UChar));
+
+ size = ucol_getRulesEx(UCA, UCOL_FULL_RULES, ucarules, size);
+ rbUCA = ucol_openRules(ucarules, size, UCOL_DEFAULT, UCOL_TERTIARY,
+ &parseError, &status);
+ free(ucarules);
+ if (U_FAILURE(status)) {
+ errln("Failure creating UCA rule-based collator: %s", u_errorName(status));
+ return;
+ }
+ }
+}
+
+void UCAConformanceTest::setCollNonIgnorable(UCollator *coll)
+{
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_OFF, &status);
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_OFF, &status);
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &status);
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status);
+}
+
+void UCAConformanceTest::setCollShifted(UCollator *coll)
+{
+ ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_OFF, &status);
+ ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_OFF, &status);
+ ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
+ ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+}
+
+void UCAConformanceTest::openTestFile(const char *type)
+{
+ const char *ext = ".txt";
+ if(testFile) {
+ fclose(testFile);
+ }
+ char buffer[1024];
+ uprv_strcpy(buffer, testDataPath);
+ uprv_strcat(buffer, type);
+ int32_t bufLen = (int32_t)uprv_strlen(buffer);
+
+ // we try to open 3 files:
+ // path/CollationTest_type.txt
+ // path/CollationTest_type_SHORT.txt
+ // path/CollationTest_type_STUB.txt
+ // we are going to test with the first one that we manage to open.
+
+ uprv_strcpy(buffer+bufLen, ext);
+
+ testFile = fopen(buffer, "rb");
+
+ if(testFile == 0) {
+ uprv_strcpy(buffer+bufLen, "_SHORT");
+ uprv_strcat(buffer, ext);
+ testFile = fopen(buffer, "rb");
+
+ if(testFile == 0) {
+ uprv_strcpy(buffer+bufLen, "_STUB");
+ uprv_strcat(buffer, ext);
+ testFile = fopen(buffer, "rb");
+
+ if (testFile == 0) {
+ *(buffer+bufLen) = 0;
+ errln("ERROR: could not open any of the conformance test files, tried opening base %s\n", buffer);
+ return;
+ } else {
+ infoln(
+ "INFO: Working with the stub file.\n"
+ "If you need the full conformance test, please\n"
+ "download the appropriate data files from:\n"
+ "http://source.icu-project.org/repos/icu/tools/trunk/unicodetools/com/ibm/text/data/");
+ }
+ }
+ }
+}
+
+void UCAConformanceTest::testConformance(UCollator *coll)
+{
+ if(testFile == 0) {
+ return;
+ }
+
+ int32_t line = 0;
+
+ UChar b1[1024], b2[1024];
+ char lineB[1024];
+ UChar *buffer = b1, *oldB = NULL;
+ uint8_t sk1[1024], sk2[1024];
+ uint8_t *oldSk = NULL, *newSk = sk1;
+ int32_t resLen = 0, oldLen = 0;
+ int32_t buflen = 0, oldBlen = 0;
+ uint32_t first = 0;
+ uint32_t offset = 0;
+ UnicodeString oldS, newS;
+
+
+ while (fgets(lineB, 1024, testFile) != NULL) {
+ offset = 0;
+
+ line++;
+ if(*lineB == 0 || strlen(lineB) < 3 || lineB[0] == '#') {
+ continue;
+ }
+ offset = u_parseString(lineB, buffer, 1024, &first, &status);
+ buflen = offset;
+ buffer[offset++] = 0;
+
+ resLen = ucol_getSortKey(coll, buffer, buflen, newSk, 1024);
+
+ int32_t res = 0, cmpres = 0, cmpres2 = 0;
+
+ if(oldSk != NULL) {
+ res = strcmp((char *)oldSk, (char *)newSk);
+ cmpres = ucol_strcoll(coll, oldB, oldBlen, buffer, buflen);
+ cmpres2 = ucol_strcoll(coll, buffer, buflen, oldB, oldBlen);
+
+ if(cmpres != -cmpres2) {
+ errln("Compare result not symmetrical on line %i", line);
+ }
+
+ if(((res&0x80000000) != (cmpres&0x80000000)) || (res == 0 && cmpres != 0) || (res != 0 && cmpres == 0)) {
+ errln("Difference between ucol_strcoll and sortkey compare on line %i", line);
+ logln("Data line %s", lineB);
+ }
+
+ if(res > 0) {
+ errln("Line %i is not greater or equal than previous line", line);
+ logln("Data line %s", lineB);
+ prettify(CollationKey(oldSk, oldLen), oldS);
+ prettify(CollationKey(newSk, resLen), newS);
+ logln("Keys: "+oldS+" and "+newS);
+ } else if(res == 0) { /* equal */
+ res = u_strcmpCodePointOrder(oldB, buffer);
+ if (res == 0) {
+ errln("Probable error in test file on line %i (comparing identical strings)", line);
+ logln("Data line %s", lineB);
+ } else if (res > 0) {
+ errln("Sortkeys are identical, but code point comapare gives >0 on line %i", line);
+ logln("Data line %s", lineB);
+ }
+ }
+ }
+
+ oldSk = newSk;
+ oldLen = resLen;
+
+ newSk = (newSk == sk1)?sk2:sk1;
+ oldB = buffer;
+ oldBlen = buflen;
+ buffer = (buffer == b1)?b2:b1;
+ }
+}
+
+void UCAConformanceTest::TestTableNonIgnorable(/* par */) {
+ setCollNonIgnorable(UCA);
+ openTestFile("NON_IGNORABLE");
+ testConformance(UCA);
+}
+
+void UCAConformanceTest::TestTableShifted(/* par */) {
+ setCollShifted(UCA);
+ openTestFile("SHIFTED");
+ testConformance(UCA);
+}
+
+void UCAConformanceTest::TestRulesNonIgnorable(/* par */) {
+ initRbUCA();
+
+ if(U_SUCCESS(status)) {
+ setCollNonIgnorable(rbUCA);
+ openTestFile("NON_IGNORABLE");
+ testConformance(rbUCA);
+ }
+}
+
+void UCAConformanceTest::TestRulesShifted(/* par */) {
+ logln("This test is currently disabled, as it is impossible to "
+ "wholly represent fractional UCA using tailoring rules.");
+ return;
+
+ initRbUCA();
+
+ if(U_SUCCESS(status)) {
+ setCollShifted(rbUCA);
+ openTestFile("SHIFTED");
+ testConformance(rbUCA);
+ }
+}
+
+#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.h b/Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.h
new file mode 100644
index 00000000000..7e3368cb6c6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ucaconf.h
@@ -0,0 +1,52 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/**
+ * UCAConformanceTest performs conformance tests defined in the data
+ * files. ICU ships with stub data files, as the whole test are too
+ * long. To do the whole test, download the test files.
+ */
+
+#ifndef _UCACONF_TST
+#define _UCACONF_TST
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_COLLATION
+
+#include "unicode/tblcoll.h"
+#include "tscoll.h"
+
+#include <stdio.h>
+
+class UCAConformanceTest: public IntlTestCollator {
+public:
+ UCAConformanceTest();
+ virtual ~UCAConformanceTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+
+ void TestTableNonIgnorable(/* par */);
+ void TestTableShifted(/* par */);
+ void TestRulesNonIgnorable(/* par */);
+ void TestRulesShifted(/* par */);
+private:
+ void initRbUCA();
+ void setCollNonIgnorable(UCollator *coll);
+ void setCollShifted(UCollator *coll);
+ void testConformance(UCollator *coll);
+ void openTestFile(const char *type);
+
+ UCollator *UCA;
+ UCollator *rbUCA;
+ FILE *testFile;
+ UErrorCode status;
+ char testDataPath[1024];
+};
+
+#endif /* #if !UCONFIG_NO_COLLATION */
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.cpp
new file mode 100644
index 00000000000..e7195c25292
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.cpp
@@ -0,0 +1,217 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/ustring.h"
+#include "unicode/uchar.h"
+#include "unicode/uniset.h"
+#include "unicode/putil.h"
+#include "cstring.h"
+#include "uparse.h"
+#include "ucdtest.h"
+
+#define LENGTHOF(array) (sizeof(array)/sizeof(array[0]))
+
+UnicodeTest::UnicodeTest()
+{
+}
+
+UnicodeTest::~UnicodeTest()
+{
+}
+
+void UnicodeTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite UnicodeTest: ");
+ switch (index) {
+ case 0: name = "TestAdditionalProperties"; if(exec) TestAdditionalProperties(); break;
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+//====================================================
+// private data used by the tests
+//====================================================
+
+// test DerivedCoreProperties.txt -------------------------------------------
+
+// copied from genprops.c
+static int32_t
+getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s) {
+ const char *t, *z;
+ int32_t i, j;
+
+ s=u_skipWhitespace(s);
+ for(i=0; i<countTokens; ++i) {
+ t=tokens[i];
+ if(t!=NULL) {
+ for(j=0;; ++j) {
+ if(t[j]!=0) {
+ if(s[j]!=t[j]) {
+ break;
+ }
+ } else {
+ z=u_skipWhitespace(s+j);
+ if(*z==';' || *z==0) {
+ return i;
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ }
+ return -1;
+}
+
+static const char *const
+derivedCorePropsNames[]={
+ "Math",
+ "Alphabetic",
+ "Lowercase",
+ "Uppercase",
+ "ID_Start",
+ "ID_Continue",
+ "XID_Start",
+ "XID_Continue",
+ "Default_Ignorable_Code_Point",
+ "Grapheme_Extend",
+ "Grapheme_Link", /* Unicode 5 moves this property here from PropList.txt */
+ "Grapheme_Base"
+};
+
+static const UProperty
+derivedCorePropsIndex[]={
+ UCHAR_MATH,
+ UCHAR_ALPHABETIC,
+ UCHAR_LOWERCASE,
+ UCHAR_UPPERCASE,
+ UCHAR_ID_START,
+ UCHAR_ID_CONTINUE,
+ UCHAR_XID_START,
+ UCHAR_XID_CONTINUE,
+ UCHAR_DEFAULT_IGNORABLE_CODE_POINT,
+ UCHAR_GRAPHEME_EXTEND,
+ UCHAR_GRAPHEME_LINK,
+ UCHAR_GRAPHEME_BASE
+};
+
+U_CFUNC void U_CALLCONV
+derivedCorePropsLineFn(void *context,
+ char *fields[][2], int32_t /* fieldCount */,
+ UErrorCode *pErrorCode)
+{
+ UnicodeTest *me=(UnicodeTest *)context;
+ uint32_t start, end;
+ int32_t i;
+
+ u_parseCodePointRange(fields[0][0], &start, &end, pErrorCode);
+ if(U_FAILURE(*pErrorCode)) {
+ me->errln("UnicodeTest: syntax error in DerivedCoreProperties.txt field 0 at %s\n", fields[0][0]);
+ return;
+ }
+
+ /* parse derived binary property name, ignore unknown names */
+ i=getTokenIndex(derivedCorePropsNames, LENGTHOF(derivedCorePropsNames), fields[1][0]);
+ if(i<0) {
+ me->errln("UnicodeTest warning: unknown property name '%s' in \n", fields[1][0]);
+ return;
+ }
+
+ me->derivedCoreProps[i].add(start, end);
+}
+
+void UnicodeTest::TestAdditionalProperties() {
+ // test DerivedCoreProperties.txt
+ if(LENGTHOF(derivedCoreProps)<LENGTHOF(derivedCorePropsNames)) {
+ errln("error: UnicodeTest::derivedCoreProps[] too short, need at least %d UnicodeSets\n",
+ LENGTHOF(derivedCorePropsNames));
+ return;
+ }
+ if(LENGTHOF(derivedCorePropsIndex)!=LENGTHOF(derivedCorePropsNames)) {
+ errln("error in ucdtest.cpp: LENGTHOF(derivedCorePropsIndex)!=LENGTHOF(derivedCorePropsNames)\n");
+ return;
+ }
+
+ char newPath[256];
+ char backupPath[256];
+ char *fields[2][2];
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ /* Look inside ICU_DATA first */
+ strcpy(newPath, pathToDataDirectory());
+ strcat(newPath, "unidata" U_FILE_SEP_STRING "DerivedCoreProperties.txt");
+
+ // As a fallback, try to guess where the source data was located
+ // at the time ICU was built, and look there.
+# ifdef U_TOPSRCDIR
+ strcpy(backupPath, U_TOPSRCDIR U_FILE_SEP_STRING "data");
+# else
+ strcpy(backupPath, loadTestData(errorCode));
+ strcat(backupPath, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING "data");
+# endif
+ strcat(backupPath, U_FILE_SEP_STRING);
+ strcat(backupPath, "unidata" U_FILE_SEP_STRING "DerivedCoreProperties.txt");
+
+ u_parseDelimitedFile(newPath, ';', fields, 2, derivedCorePropsLineFn, this, &errorCode);
+
+ if(errorCode==U_FILE_ACCESS_ERROR) {
+ errorCode=U_ZERO_ERROR;
+ u_parseDelimitedFile(backupPath, ';', fields, 2, derivedCorePropsLineFn, this, &errorCode);
+ }
+ if(U_FAILURE(errorCode)) {
+ errln("error parsing DerivedCoreProperties.txt: %s\n", u_errorName(errorCode));
+ return;
+ }
+
+ // now we have all derived core properties in the UnicodeSets
+ // run them all through the API
+ int32_t rangeCount, range;
+ uint32_t i;
+ UChar32 start, end;
+ int32_t noErrors = 0;
+
+ // test all TRUE properties
+ for(i=0; i<LENGTHOF(derivedCorePropsNames); ++i) {
+ rangeCount=derivedCoreProps[i].getRangeCount();
+ for(range=0; range<rangeCount; ++range) {
+ start=derivedCoreProps[i].getRangeStart(range);
+ end=derivedCoreProps[i].getRangeEnd(range);
+ for(; start<=end; ++start) {
+ if(!u_hasBinaryProperty(start, derivedCorePropsIndex[i])) {
+ errln("UnicodeTest error: u_hasBinaryProperty(U+%04lx, %s)==FALSE is wrong\n", start, derivedCorePropsNames[i]);
+ if(noErrors++ > 100) {
+ errln("Too many errors, moving to the next test");
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ noErrors = 0;
+ // invert all properties
+ for(i=0; i<LENGTHOF(derivedCorePropsNames); ++i) {
+ derivedCoreProps[i].complement();
+ }
+
+ // test all FALSE properties
+ for(i=0; i<LENGTHOF(derivedCorePropsNames); ++i) {
+ rangeCount=derivedCoreProps[i].getRangeCount();
+ for(range=0; range<rangeCount; ++range) {
+ start=derivedCoreProps[i].getRangeStart(range);
+ end=derivedCoreProps[i].getRangeEnd(range);
+ for(; start<=end; ++start) {
+ if(u_hasBinaryProperty(start, derivedCorePropsIndex[i])) {
+ errln("UnicodeTest error: u_hasBinaryProperty(U+%04lx, %s)==TRUE is wrong\n", start, derivedCorePropsNames[i]);
+ if(noErrors++ > 100) {
+ errln("Too many errors, moving to the next test");
+ break;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.h
new file mode 100644
index 00000000000..6695a878755
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ucdtest.h
@@ -0,0 +1,45 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "unicode/uniset.h"
+#include "intltest.h"
+
+/** Helper function for TestUnicodeData */
+U_CFUNC void U_CALLCONV unicodeDataLineFn(void *context,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode);
+
+U_CFUNC void U_CALLCONV
+derivedCorePropsLineFn(void *context,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode);
+
+/**
+ * Test API and functionality of class Unicode
+ **/
+class UnicodeTest: public IntlTest {
+public:
+ UnicodeTest();
+ virtual ~UnicodeTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ void TestAdditionalProperties();
+
+private:
+
+ friend void U_CALLCONV unicodeDataLineFn(void *context,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode);
+
+ friend void U_CALLCONV
+ derivedCorePropsLineFn(void *context,
+ char *fields[][2], int32_t fieldCount,
+ UErrorCode *pErrorCode);
+
+ UnicodeSet derivedCoreProps[30];
+};
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.cpp
new file mode 100644
index 00000000000..4d4b0f8a978
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.cpp
@@ -0,0 +1,466 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "uobjtest.h"
+#include "cmemory.h" // UAlignedMemory
+#include <string.h>
+#include <stdio.h>
+
+/**
+ *
+ * Test for UObject, currently only the classID.
+ *
+ * Usage
+ * TESTCLASSID_ABSTRACT(Bar)
+ * -- Bar is expected to be abstract. Only the static ID will be tested.
+ *
+ * TESTCLASSID_DEFAULT(Foo)
+ * -- Foo will be default-constructed.
+ *
+ * TESTCLASSID_CTOR(Foo, (1, 2, 3, status))
+ * -- Second argument is (parenthesized) constructor argument.
+ * Will be called as: new Foo ( 1, 2, 3, status) [status is tested]
+ *
+ * TESTCLASSID_FACTORY(Foo, fooCreateFunction(status) )
+ * -- call fooCreateFunction. 'status' will be tested & reset
+ *
+ * TESTCLASSID_FACTORY_HIDDEN(class, factory)
+ * -- call factory. Class is not available from a header.
+ * 'status' will be tested & reset. This only tests uniqueness.
+ */
+
+
+#define TESTCLASSID_FACTORY(c, f) { delete testClass(f, #c, #f, c ::getStaticClassID()); if(U_FAILURE(status)) { errln(UnicodeString(#c " - " #f " - got err status ") + UnicodeString(u_errorName(status))); status = U_ZERO_ERROR; } }
+#define TESTCLASSID_TRANSLIT(c, t) { delete testClass(Transliterator::createInstance(UnicodeString(t), UTRANS_FORWARD,parseError,status), #c, "Transliterator: " #t, c ::getStaticClassID()); if(U_FAILURE(status)) { errln(UnicodeString(#c " - Transliterator: " #t " - got err status ") + UnicodeString(u_errorName(status))); status = U_ZERO_ERROR; } }
+#define TESTCLASSID_CTOR(c, x) { delete testClass(new c x, #c, "new " #c #x, c ::getStaticClassID()); if(U_FAILURE(status)) { errln(UnicodeString(#c " - new " #x " - got err status ") + UnicodeString(u_errorName(status))); status = U_ZERO_ERROR; } }
+#define TESTCLASSID_DEFAULT(c) delete testClass(new c, #c, "new " #c , c::getStaticClassID())
+#define TESTCLASSID_ABSTRACT(c) testClass(NULL, #c, NULL, c::getStaticClassID())
+#define TESTCLASSID_FACTORY_HIDDEN(c, f) {UObject *objVar = f; delete testClass(objVar, #c, #f, objVar->getDynamicClassID()); if(U_FAILURE(status)) { errln(UnicodeString(#c " - " #f " - got err status ") + UnicodeString(u_errorName(status))); status = U_ZERO_ERROR; } }
+
+#define MAX_CLASS_ID 200
+
+static UClassID ids[MAX_CLASS_ID];
+static const char *ids_factory[MAX_CLASS_ID];
+static const char *ids_class[MAX_CLASS_ID];
+static uint32_t ids_count = 0;
+
+UObject *UObjectTest::testClass(UObject *obj,
+ const char *className, const char *factory,
+ UClassID staticID)
+{
+ uint32_t i;
+ UnicodeString what = UnicodeString(className) + " * x= " + UnicodeString(factory?factory:" ABSTRACT ") + "; ";
+ UClassID dynamicID = NULL;
+
+ if(ids_count >= MAX_CLASS_ID) {
+ char count[100];
+ sprintf(count, " (currently %d) ", MAX_CLASS_ID);
+ errln("FAIL: Fatal: Ran out of IDs! Increase MAX_CLASS_ID." + UnicodeString(count) + what);
+ return obj;
+ }
+
+ if(obj) {
+ dynamicID = obj->getDynamicClassID();
+ }
+
+ {
+ char tmp[500];
+ sprintf(tmp, " [static=%p, dynamic=%p] ", staticID, dynamicID);
+ logln(what + tmp);
+ }
+
+ if(staticID == NULL) {
+ errln("FAIL: staticID == NULL!" + what);
+ }
+
+ if(factory != NULL) { /* NULL factory means: abstract */
+ if(!obj) {
+ errln( "FAIL: ==NULL!" + what);
+ return obj;
+ }
+
+ if(dynamicID == NULL) {
+ errln("FAIL: dynamicID == NULL!" + what);
+ }
+
+ if(dynamicID != staticID) {
+ errln("FAIL: dynamicID != staticID!" + what );
+ }
+ }
+
+ // Bail out if static ID is null. Error message was already printed.
+ if(staticID == NULL) {
+ return obj;
+ }
+
+ for(i=0;i<ids_count;i++) {
+ if(staticID == ids[i]) {
+ if(!strcmp(ids_class[i], className)) {
+ logln("OK: ID found is the same as " + UnicodeString(ids_class[i]) + UnicodeString(" *y= ") + ids_factory[i] + what);
+ return obj;
+ } else {
+ errln("FAIL: ID is the same as " + UnicodeString(ids_class[i]) + UnicodeString(" *y= ") + ids_factory[i] + what);
+ return obj;
+ }
+ }
+ }
+
+ ids[ids_count] = staticID;
+ ids_factory[ids_count] = factory;
+ ids_class[ids_count] = className;
+ ids_count++;
+
+ return obj;
+}
+
+
+// begin actual #includes for things to be tested
+//
+// The following script will generate the #includes needed here:
+//
+// find common i18n -name '*.h' -print | xargs fgrep ClassID | cut -d: -f1 | cut -d\/ -f2- | sort | uniq | sed -e 's%.*%#include "&"%'
+
+
+#include "unicode/utypes.h"
+
+// Internal Things (woo)
+#include "cpdtrans.h"
+#include "rbt.h"
+#include "rbt_data.h"
+#include "nultrans.h"
+#include "anytrans.h"
+#include "digitlst.h"
+#include "esctrn.h"
+#include "funcrepl.h"
+#include "servnotf.h"
+#include "serv.h"
+#include "servloc.h"
+#include "name2uni.h"
+#include "nfsubs.h"
+#include "nortrans.h"
+#include "quant.h"
+#include "remtrans.h"
+#include "strmatch.h"
+#include "strrepl.h"
+#include "titletrn.h"
+#include "tolowtrn.h"
+#include "toupptrn.h"
+#include "unesctrn.h"
+#include "uni2name.h"
+#include "uvector.h"
+#include "uvectr32.h"
+#include "currfmt.h"
+#include "buddhcal.h"
+#include "islamcal.h"
+#include "japancal.h"
+#include "hebrwcal.h"
+#include "persncal.h"
+#include "windtfmt.h"
+#include "winnmfmt.h"
+#include "ustrenum.h"
+#include "olsontz.h"
+#include "reldtfmt.h"
+
+// External Things
+#include "unicode/brkiter.h"
+#include "unicode/calendar.h"
+#include "unicode/caniter.h"
+#include "unicode/chariter.h"
+#include "unicode/choicfmt.h"
+#include "unicode/coleitr.h"
+#include "unicode/coll.h"
+#include "unicode/curramt.h"
+#include "unicode/datefmt.h"
+#include "unicode/dcfmtsym.h"
+#include "unicode/decimfmt.h"
+#include "unicode/dtfmtsym.h"
+#include "unicode/fieldpos.h"
+#include "unicode/fmtable.h"
+#include "unicode/format.h"
+#include "unicode/gregocal.h"
+#include "unicode/locid.h"
+#include "unicode/msgfmt.h"
+#include "unicode/normlzr.h"
+#include "unicode/numfmt.h"
+#include "unicode/parsepos.h"
+#include "unicode/rbbi.h"
+#include "unicode/rbnf.h"
+#include "unicode/regex.h"
+#include "unicode/resbund.h"
+#include "unicode/schriter.h"
+#include "unicode/simpletz.h"
+#include "unicode/smpdtfmt.h"
+#include "unicode/sortkey.h"
+#include "unicode/stsearch.h"
+#include "unicode/tblcoll.h"
+#include "unicode/timezone.h"
+#include "unicode/translit.h"
+#include "unicode/uchriter.h"
+#include "unicode/unifilt.h"
+#include "unicode/unifunct.h"
+#include "unicode/uniset.h"
+#include "unicode/unistr.h"
+#include "unicode/uobject.h"
+#include "unicode/usetiter.h"
+//#include "unicode/bidi.h"
+//#include "unicode/convert.h"
+
+// END includes =============================================================
+
+#define UOBJTEST_TEST_INTERNALS 0 /* do NOT test Internal things - their functions aren't exported on Win32 */
+
+#if !UCONFIG_NO_SERVICE
+/* The whole purpose of this class is to expose the constructor, and gain access to the superclasses RTTI. */
+class TestLocaleKeyFactory : public LocaleKeyFactory {
+public:
+ TestLocaleKeyFactory(int32_t coverage) : LocaleKeyFactory(coverage) {}
+};
+#endif
+
+void UObjectTest::testIDs()
+{
+ ids_count = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ static const UChar SMALL_STR[] = {0x51, 0x51, 0x51, 0}; // "QQQ"
+
+#if !UCONFIG_NO_TRANSLITERATION || !UCONFIG_NO_FORMATTING
+ UParseError parseError;
+#endif
+
+
+#if !UCONFIG_NO_NORMALIZATION
+ TESTCLASSID_FACTORY(CanonicalIterator, new CanonicalIterator(UnicodeString("abc"), status));
+#endif
+ //TESTCLASSID_DEFAULT(CollationElementIterator);
+#if !UCONFIG_NO_COLLATION
+ TESTCLASSID_DEFAULT(CollationKey);
+ TESTCLASSID_FACTORY(UStringEnumeration, Collator::getKeywords(status));
+ //TESTCLASSID_FACTORY_HIDDEN(CollationLocaleListEnumeration, Collator::getAvailableLocales());
+#endif
+ //TESTCLASSID_FACTORY(CompoundTransliterator, Transliterator::createInstance(UnicodeString("Any-Jex;Hangul-Jamo"), UTRANS_FORWARD, parseError, status));
+
+#if !UCONFIG_NO_FORMATTING
+ /* TESTCLASSID_FACTORY(NFSubstitution, NFSubstitution::makeSubstitution(8, */
+ /* TESTCLASSID_DEFAULT(DigitList); UMemory but not UObject*/
+ TESTCLASSID_ABSTRACT(NumberFormat);
+ TESTCLASSID_CTOR(RuleBasedNumberFormat, (UnicodeString("%default: -x: minus >>;"), parseError, status));
+ TESTCLASSID_CTOR(ChoiceFormat, (UNICODE_STRING_SIMPLE("0#are no files|1#is one file|1<are many files"), status));
+ TESTCLASSID_CTOR(MessageFormat, (UnicodeString(), status));
+ TESTCLASSID_CTOR(DateFormatSymbols, (status));
+ TESTCLASSID_FACTORY(RelativeDateFormat, DateFormat::createDateInstance(DateFormat::kFullRelative, Locale::getUS()));
+ TESTCLASSID_CTOR(DecimalFormatSymbols, (status));
+ TESTCLASSID_DEFAULT(FieldPosition);
+ TESTCLASSID_DEFAULT(Formattable);
+ TESTCLASSID_CTOR(CurrencyAmount, (1.0, SMALL_STR, status));
+ TESTCLASSID_CTOR(CurrencyUnit, (SMALL_STR, status));
+ TESTCLASSID_CTOR(CurrencyFormat, (Locale::getUS(), status));
+ TESTCLASSID_FACTORY(GregorianCalendar, Calendar::createInstance(Locale("@calendar=gregorian"), status));
+ TESTCLASSID_FACTORY(BuddhistCalendar, Calendar::createInstance(Locale("@calendar=buddhist"), status));
+ TESTCLASSID_FACTORY(IslamicCalendar, Calendar::createInstance(Locale("@calendar=islamic"), status));
+ TESTCLASSID_FACTORY(JapaneseCalendar, Calendar::createInstance(Locale("@calendar=japanese"), status));
+ TESTCLASSID_FACTORY(HebrewCalendar, Calendar::createInstance(Locale("@calendar=hebrew"), status));
+ TESTCLASSID_FACTORY(PersianCalendar, Calendar::createInstance(Locale("@calendar=persian"), status));
+#ifdef U_WINDOWS
+ TESTCLASSID_FACTORY(Win32DateFormat, DateFormat::createDateInstance(DateFormat::kFull, Locale("@compat=host")));
+ TESTCLASSID_FACTORY(Win32NumberFormat, NumberFormat::createInstance(Locale("@compat=host"), status));
+#endif
+#endif
+
+#if !UCONFIG_NO_BREAK_ITERATION
+ /* TESTCLASSID_ABSTRACT(BreakIterator); No staticID! */
+ TESTCLASSID_FACTORY(RuleBasedBreakIterator, BreakIterator::createLineInstance("mt",status));
+ //TESTCLASSID_FACTORY(DictionaryBasedBreakIterator, BreakIterator::createLineInstance("th",status));
+
+#if !UCONFIG_NO_SERVICE
+ TESTCLASSID_FACTORY_HIDDEN(ICULocaleService, BreakIterator::getAvailableLocales());
+#endif
+#endif
+
+ //TESTCLASSID_DEFAULT(GregorianCalendar);
+
+#if !UCONFIG_NO_TRANSLITERATION
+ TESTCLASSID_TRANSLIT(AnyTransliterator, "Any-Latin");
+ TESTCLASSID_TRANSLIT(CompoundTransliterator, "Latin-Greek");
+ TESTCLASSID_TRANSLIT(EscapeTransliterator, "Any-Hex");
+ TESTCLASSID_TRANSLIT(LowercaseTransliterator, "Lower");
+ TESTCLASSID_TRANSLIT(NameUnicodeTransliterator, "Name-Any");
+ TESTCLASSID_TRANSLIT(NormalizationTransliterator, "NFD");
+ TESTCLASSID_TRANSLIT(NullTransliterator, "Null");
+ TESTCLASSID_TRANSLIT(RemoveTransliterator, "Remove");
+ TESTCLASSID_FACTORY(RuleBasedTransliterator, Transliterator::createFromRules(UnicodeString("abcd"),UnicodeString("a>b;"),UTRANS_FORWARD,parseError,status));
+ TESTCLASSID_TRANSLIT(TitlecaseTransliterator, "Title");
+ TESTCLASSID_TRANSLIT(UnescapeTransliterator, "Hex-Any");
+ TESTCLASSID_TRANSLIT(UnicodeNameTransliterator, "Any-Name");
+ TESTCLASSID_TRANSLIT(UppercaseTransliterator, "Upper");
+ TESTCLASSID_CTOR(CaseMapTransliterator, (UnicodeString(), NULL));
+ TESTCLASSID_ABSTRACT(Transliterator);
+ TESTCLASSID_FACTORY_HIDDEN(TransliteratorRegistry::Enumeration, Transliterator::getAvailableIDs(status));
+
+#if UOBJTEST_TEST_INTERNALS
+ TESTCLASSID_CTOR(Quantifier, (NULL, 0, 0));
+ TESTCLASSID_CTOR(FunctionReplacer, (NULL,NULL));
+ TESTCLASSID_CTOR(StringMatcher, (UnicodeString("x"), 0,0,0,TransliterationRuleData(status)));
+ TESTCLASSID_CTOR(StringReplacer,(UnicodeString(),new TransliterationRuleData(status)));
+#endif
+#endif
+
+ TESTCLASSID_FACTORY(Locale, new Locale("123"));
+ TESTCLASSID_FACTORY_HIDDEN(KeywordEnumeration, Locale("@a=b").createKeywords(status));
+
+ //TESTCLASSID_DEFAULT(Normalizer);
+
+ //TESTCLASSID_DEFAULT(NumeratorSubstitution);
+
+#if !UCONFIG_NO_TRANSLITERATION
+ TESTCLASSID_DEFAULT(ParsePosition);
+#endif
+
+
+// NO_REG_EX
+ //TESTCLASSID_DEFAULT(RegexCompile);
+ //TESTCLASSID_DEFAULT(RegexMatcher);
+ //TESTCLASSID_DEFAULT(RegexPattern);
+
+ //TESTCLASSID_DEFAULT(ReplaceableGlue);
+ TESTCLASSID_FACTORY(ResourceBundle, new ResourceBundle(UnicodeString(), status) );
+ //TESTCLASSID_DEFAULT(RuleBasedTransliterator);
+
+ //TESTCLASSID_DEFAULT(SimpleFwdCharIterator);
+ //TESTCLASSID_DEFAULT(StringReplacer);
+ //TESTCLASSID_DEFAULT(StringSearch);
+
+ //TESTCLASSID_DEFAULT(TestMultipleKeyStringFactory);
+ //TESTCLASSID_DEFAULT(TestReplaceable);
+
+#if !UCONFIG_NO_FORMATTING
+ TESTCLASSID_ABSTRACT(TimeZone);
+ TESTCLASSID_FACTORY(OlsonTimeZone, TimeZone::createTimeZone(UnicodeString("America/Los_Angeles")));
+ TESTCLASSID_FACTORY_HIDDEN(KeywordEnumeration, TimeZone::createEnumeration());
+#endif
+
+ TESTCLASSID_DEFAULT(UnicodeString);
+ TESTCLASSID_CTOR(UnicodeSet, (0, 1));
+ TESTCLASSID_ABSTRACT(UnicodeFilter);
+ TESTCLASSID_ABSTRACT(UnicodeFunctor);
+ TESTCLASSID_CTOR(UnicodeSetIterator,(UnicodeSet(0,1)));
+ TESTCLASSID_CTOR(UStack, (status));
+ TESTCLASSID_CTOR(UVector, (status));
+ TESTCLASSID_CTOR(UVector32, (status));
+
+#if !UCONFIG_NO_SERVICE
+ TESTCLASSID_CTOR(SimpleFactory, (NULL, UnicodeString("foo")));
+ TESTCLASSID_DEFAULT(EventListener);
+ TESTCLASSID_DEFAULT(ICUResourceBundleFactory);
+ //TESTCLASSID_DEFAULT(Key); // does not exist?
+ UnicodeString baz("baz");
+ UnicodeString bat("bat");
+ TESTCLASSID_FACTORY(LocaleKey, LocaleKey::createWithCanonicalFallback(&baz, &bat, LocaleKey::KIND_ANY, status));
+ TESTCLASSID_CTOR(SimpleLocaleKeyFactory, (NULL, UnicodeString("bar"), 8, 12) );
+ TESTCLASSID_CTOR(TestLocaleKeyFactory, (42)); // Test replacement for LocaleKeyFactory
+//#if UOBJTEST_TEST_INTERNALS
+// TESTCLASSID_CTOR(LocaleKeyFactory, (42));
+//#endif
+#endif
+
+#if UOBJTEST_DUMP_IDS
+ int i;
+ for(i=0;i<ids_count;i++) {
+ char junk[800];
+ sprintf(junk, " %4d:\t%p\t%s\t%s\n",
+ i, ids[i], ids_class[i], ids_factory[i]);
+ logln(UnicodeString(junk));
+ }
+#endif
+}
+
+void UObjectTest::testUMemory() {
+ // additional tests for code coverage
+#if U_OVERRIDE_CXX_ALLOCATION && U_HAVE_PLACEMENT_NEW
+ UAlignedMemory stackMemory[sizeof(UnicodeString)/sizeof(UAlignedMemory)+1];
+ UnicodeString *p;
+ enum { len=20 };
+
+ p=new(stackMemory) UnicodeString(len, (UChar32)0x20ac, len);
+ if((void *)p!=(void *)stackMemory) {
+ errln("placement new did not place the object at the expected address");
+ }
+ if(p->length()!=len || p->charAt(0)!=0x20ac || p->charAt(len-1)!=0x20ac) {
+ errln("constructor used with placement new did not work right");
+ }
+
+ /*
+ * It is not possible to simply say
+ * delete(p, stackMemory);
+ * which results in a call to the normal, non-placement delete operator.
+ *
+ * Via a search on google.com for "c++ placement delete" I found
+ * http://cpptips.hyperformix.com/cpptips/placement_del3
+ * which says:
+ *
+ * TITLE: using placement delete
+ *
+ * (Newsgroups: comp.std.c++, 27 Aug 97)
+ *
+ * ISJ: isj@image.dk
+ *
+ * > I do not completely understand how placement works on operator delete.
+ * > ...
+ * There is no delete-expression which will invoke a placement
+ * form of operator delete. You can still call the function
+ * explicitly. Example:
+ * ...
+ * // destroy object and delete space manually
+ * p->~T();
+ * operator delete(p, 12);
+ *
+ * ... so that's what I am doing here.
+ * markus 20031216
+ */
+ // destroy object and delete space manually
+ p->~UnicodeString();
+ UnicodeString::operator delete(p, stackMemory);
+
+ // Jitterbug 4452, for coverage
+ UnicodeString *pa = new UnicodeString[2];
+ if ( !pa[0].isEmpty() || !pa[1].isEmpty()){
+ errln("constructor used with array new did not work right");
+ }
+ delete [] pa;
+#endif
+
+ // try to call the compiler-generated UMemory::operator=(class UMemory const &)
+ UMemory m, n;
+ m=n;
+}
+
+void UObjectTest::TestMFCCompatibility() {
+#if U_HAVE_DEBUG_LOCATION_NEW
+ /* Make sure that it compiles with MFC's debuggable new usage. */
+ UnicodeString *str = new(__FILE__, __LINE__) UnicodeString();
+ str->append((UChar)0x0040); // Is it usable?
+ if(str->charAt(0) != 0x0040) {
+ errln("debug new doesn't work.");
+ }
+ UnicodeString::operator delete(str, __FILE__, __LINE__);
+#endif
+}
+
+/* --------------- */
+
+#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
+
+
+void UObjectTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /* par */ )
+{
+ switch (index) {
+
+ CASE(0, testIDs);
+ CASE(1, testUMemory);
+ CASE(2, TestMFCCompatibility);
+
+ default: name = ""; break; //needed to end loop
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.h
new file mode 100644
index 00000000000..6c4dd48e6de
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/uobjtest.h
@@ -0,0 +1,42 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+
+#ifndef _UOBJECTTEST_
+#define _UOBJECTTEST_
+
+#include "intltest.h"
+
+/**
+ * Test uobjtest.h
+ **/
+class UObjectTest : public IntlTest {
+ // IntlTest override
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+private:
+ // tests
+ void testIDs();
+ void testUMemory();
+ void TestMFCCompatibility();
+
+ //helper
+
+ /**
+ * @param obj The UObject to be tested
+ * @param className The name of the class being tested
+ * @param factory String version of obj, for exanple "new UFoo(1,3,4)". NULL if object is abstract.
+ * @param staticID The result of class :: getStaticClassID
+ * @return Returns obj, suitable for deletion
+ */
+ UObject *testClass(UObject *obj,
+ const char *className, const char *factory,
+ UClassID staticID);
+
+
+};
+
+#endif
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/usettest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/usettest.cpp
new file mode 100644
index 00000000000..bcdd5ad3112
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/usettest.cpp
@@ -0,0 +1,3773 @@
+/*
+********************************************************************************
+* Copyright (C) 1999-2007 International Business Machines Corporation and
+* others. All Rights Reserved.
+********************************************************************************
+* Date Name Description
+* 10/20/99 alan Creation.
+* 03/22/2000 Madhu Added additional tests
+********************************************************************************
+*/
+
+#include <stdio.h>
+
+#include <string.h>
+#include "unicode/utypes.h"
+#include "usettest.h"
+#include "unicode/ucnv.h"
+#include "unicode/uniset.h"
+#include "unicode/uchar.h"
+#include "unicode/usetiter.h"
+#include "unicode/ustring.h"
+#include "unicode/parsepos.h"
+#include "unicode/symtable.h"
+#include "unicode/uversion.h"
+#include "hash.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+#define TEST_ASSERT_SUCCESS(status) {if (U_FAILURE(status)) { \
+ errln("fail in file \"%s\", line %d: \"%s\"", __FILE__, __LINE__, \
+ u_errorName(status));}}
+
+#define TEST_ASSERT(expr) {if (!(expr)) { \
+ errln("fail in file \"%s\", line %d", __FILE__, __LINE__); }}
+
+UnicodeString operator+(const UnicodeString& left, const UnicodeSet& set) {
+ UnicodeString pat;
+ set.toPattern(pat);
+ return left + UnicodeSetTest::escape(pat);
+}
+
+#define CASE(id,test) case id: \
+ name = #test; \
+ if (exec) { \
+ logln(#test "---"); \
+ logln(); \
+ test(); \
+ } \
+ break
+
+UnicodeSetTest::UnicodeSetTest() : utf8Cnv(NULL) {
+}
+
+UConverter *UnicodeSetTest::openUTF8Converter() {
+ if(utf8Cnv==NULL) {
+ UErrorCode errorCode=U_ZERO_ERROR;
+ utf8Cnv=ucnv_open("UTF-8", &errorCode);
+ }
+ return utf8Cnv;
+}
+
+UnicodeSetTest::~UnicodeSetTest() {
+ ucnv_close(utf8Cnv);
+}
+
+void
+UnicodeSetTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ // if (exec) logln((UnicodeString)"TestSuite UnicodeSetTest");
+ switch (index) {
+ CASE(0,TestPatterns);
+ CASE(1,TestAddRemove);
+ CASE(2,TestCategories);
+ CASE(3,TestCloneEqualHash);
+ CASE(4,TestMinimalRep);
+ CASE(5,TestAPI);
+ CASE(6,TestScriptSet);
+ CASE(7,TestPropertySet);
+ CASE(8,TestClone);
+ CASE(9,TestExhaustive);
+ CASE(10,TestToPattern);
+ CASE(11,TestIndexOf);
+ CASE(12,TestStrings);
+ CASE(13,Testj2268);
+ CASE(14,TestCloseOver);
+ CASE(15,TestEscapePattern);
+ CASE(16,TestInvalidCodePoint);
+ CASE(17,TestSymbolTable);
+ CASE(18,TestSurrogate);
+ CASE(19,TestPosixClasses);
+ CASE(20,TestIteration);
+ CASE(21,TestFreezable);
+ CASE(22,TestSpan);
+ CASE(23,TestStringSpan);
+ default: name = ""; break;
+ }
+}
+
+static const char NOT[] = "%%%%";
+
+/**
+ * UVector was improperly copying contents
+ * This code will crash this is still true
+ */
+void UnicodeSetTest::Testj2268() {
+ UnicodeSet t;
+ t.add(UnicodeString("abc"));
+ UnicodeSet test(t);
+ UnicodeString ustrPat;
+ test.toPattern(ustrPat, TRUE);
+}
+
+/**
+ * Test toPattern().
+ */
+void UnicodeSetTest::TestToPattern() {
+ UErrorCode ec = U_ZERO_ERROR;
+
+ // Test that toPattern() round trips with syntax characters and
+ // whitespace.
+ {
+ static const char* OTHER_TOPATTERN_TESTS[] = {
+ "[[:latin:]&[:greek:]]",
+ "[[:latin:]-[:greek:]]",
+ "[:nonspacing mark:]",
+ NULL
+ };
+
+ for (int32_t j=0; OTHER_TOPATTERN_TESTS[j]!=NULL; ++j) {
+ ec = U_ZERO_ERROR;
+ UnicodeSet s(OTHER_TOPATTERN_TESTS[j], ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: bad pattern " + OTHER_TOPATTERN_TESTS[j]);
+ continue;
+ }
+ checkPat(OTHER_TOPATTERN_TESTS[j], s);
+ }
+
+ for (UChar32 i = 0; i <= 0x10FFFF; ++i) {
+ if ((i <= 0xFF && !u_isalpha(i)) || u_isspace(i)) {
+
+ // check various combinations to make sure they all work.
+ if (i != 0 && !toPatternAux(i, i)){
+ continue;
+ }
+ if (!toPatternAux(0, i)){
+ continue;
+ }
+ if (!toPatternAux(i, 0xFFFF)){
+ continue;
+ }
+ }
+ }
+ }
+
+ // Test pattern behavior of multicharacter strings.
+ {
+ ec = U_ZERO_ERROR;
+ UnicodeSet* s = new UnicodeSet("[a-z {aa} {ab}]", ec);
+
+ // This loop isn't a loop. It's here to make the compiler happy.
+ // If you're curious, try removing it and changing the 'break'
+ // statements (except for the last) to goto's.
+ for (;;) {
+ if (U_FAILURE(ec)) break;
+ const char* exp1[] = {"aa", "ab", NOT, "ac", NULL};
+ expectToPattern(*s, "[a-z{aa}{ab}]", exp1);
+
+ s->add("ac");
+ const char* exp2[] = {"aa", "ab", "ac", NOT, "xy", NULL};
+ expectToPattern(*s, "[a-z{aa}{ab}{ac}]", exp2);
+
+ s->applyPattern("[a-z {\\{l} {r\\}}]", ec);
+ if (U_FAILURE(ec)) break;
+ const char* exp3[] = {"{l", "r}", NOT, "xy", NULL};
+ expectToPattern(*s, "[a-z{r\\}}{\\{l}]", exp3);
+
+ s->add("[]");
+ const char* exp4[] = {"{l", "r}", "[]", NOT, "xy", NULL};
+ expectToPattern(*s, "[a-z{\\[\\]}{r\\}}{\\{l}]", exp4);
+
+ s->applyPattern("[a-z {\\u4E01\\u4E02}{\\n\\r}]", ec);
+ if (U_FAILURE(ec)) break;
+ const char* exp5[] = {"\\u4E01\\u4E02", "\n\r", NULL};
+ expectToPattern(*s, "[a-z{\\u000A\\u000D}{\\u4E01\\u4E02}]", exp5);
+
+ // j2189
+ s->clear();
+ s->add(UnicodeString("abc", ""));
+ s->add(UnicodeString("abc", ""));
+ const char* exp6[] = {"abc", NOT, "ab", NULL};
+ expectToPattern(*s, "[{abc}]", exp6);
+
+ break;
+ }
+
+ if (U_FAILURE(ec)) errln("FAIL: pattern parse error");
+ delete s;
+ }
+
+ // JB#3400: For 2 character ranges prefer [ab] to [a-b]
+ UnicodeSet s;
+ s.add((UChar)97, (UChar)98); // 'a', 'b'
+ expectToPattern(s, "[ab]", NULL);
+}
+
+UBool UnicodeSetTest::toPatternAux(UChar32 start, UChar32 end) {
+
+ // use Integer.toString because Utility.hex doesn't handle ints
+ UnicodeString pat = "";
+ // TODO do these in hex
+ //String source = "0x" + Integer.toString(start,16).toUpperCase();
+ //if (start != end) source += "..0x" + Integer.toString(end,16).toUpperCase();
+ UnicodeString source;
+ source = source + (uint32_t)start;
+ if (start != end)
+ source = source + ".." + (uint32_t)end;
+ UnicodeSet testSet;
+ testSet.add(start, end);
+ return checkPat(source, testSet);
+}
+
+UBool UnicodeSetTest::checkPat(const UnicodeString& source,
+ const UnicodeSet& testSet) {
+ // What we want to make sure of is that a pattern generated
+ // by toPattern(), with or without escaped unprintables, can
+ // be passed back into the UnicodeSet constructor.
+ UnicodeString pat0;
+
+ testSet.toPattern(pat0, TRUE);
+
+ if (!checkPat(source + " (escaped)", testSet, pat0)) return FALSE;
+
+ //String pat1 = unescapeLeniently(pat0);
+ //if (!checkPat(source + " (in code)", testSet, pat1)) return false;
+
+ UnicodeString pat2;
+ testSet.toPattern(pat2, FALSE);
+ if (!checkPat(source, testSet, pat2)) return FALSE;
+
+ //String pat3 = unescapeLeniently(pat2);
+ // if (!checkPat(source + " (in code)", testSet, pat3)) return false;
+
+ //logln(source + " => " + pat0 + ", " + pat1 + ", " + pat2 + ", " + pat3);
+ logln((UnicodeString)source + " => " + pat0 + ", " + pat2);
+ return TRUE;
+}
+
+UBool UnicodeSetTest::checkPat(const UnicodeString& source,
+ const UnicodeSet& testSet,
+ const UnicodeString& pat) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeSet testSet2(pat, ec);
+ if (testSet2 != testSet) {
+ errln((UnicodeString)"Fail toPattern: " + source + " => " + pat);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+void
+UnicodeSetTest::TestPatterns(void) {
+ UnicodeSet set;
+ expectPattern(set, UnicodeString("[[a-m]&[d-z]&[k-y]]", ""), "km");
+ expectPattern(set, UnicodeString("[[a-z]-[m-y]-[d-r]]", ""), "aczz");
+ expectPattern(set, UnicodeString("[a\\-z]", ""), "--aazz");
+ expectPattern(set, UnicodeString("[-az]", ""), "--aazz");
+ expectPattern(set, UnicodeString("[az-]", ""), "--aazz");
+ expectPattern(set, UnicodeString("[[[a-z]-[aeiou]i]]", ""), "bdfnptvz");
+
+ // Throw in a test of complement
+ set.complement();
+ UnicodeString exp;
+ exp.append((UChar)0x0000).append("aeeoouu").append((UChar)(0x007a+1)).append((UChar)0xFFFF);
+ expectPairs(set, exp);
+}
+
+void
+UnicodeSetTest::TestCategories(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ const char* pat = " [:Lu:] "; // Whitespace ok outside [:..:]
+ UnicodeSet set(pat, status);
+ if (U_FAILURE(status)) {
+ errln((UnicodeString)"Fail: Can't construct set with " + pat);
+ } else {
+ expectContainment(set, pat, "ABC", "abc");
+ }
+
+ UChar32 i;
+ int32_t failures = 0;
+ // Make sure generation of L doesn't pollute cached Lu set
+ // First generate L, then Lu
+ set.applyPattern("[:L:]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ for (i=0; i<0x200; ++i) {
+ UBool l = u_isalpha((UChar)i);
+ if (l != set.contains(i)) {
+ errln((UnicodeString)"FAIL: L contains " + (unsigned short)i + " = " +
+ set.contains(i));
+ if (++failures == 10) break;
+ }
+ }
+
+ set.applyPattern("[:Lu:]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ for (i=0; i<0x200; ++i) {
+ UBool lu = (u_charType((UChar)i) == U_UPPERCASE_LETTER);
+ if (lu != set.contains(i)) {
+ errln((UnicodeString)"FAIL: Lu contains " + (unsigned short)i + " = " +
+ set.contains(i));
+ if (++failures == 20) break;
+ }
+ }
+}
+void
+UnicodeSetTest::TestCloneEqualHash(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ // set1 and set2 used to be built with the obsolete constructor taking
+ // UCharCategory values; replaced with pattern constructors
+ // markus 20030502
+ UnicodeSet *set1=new UnicodeSet("\\p{Lowercase Letter}", status); // :Ll: Letter, lowercase
+ UnicodeSet *set1a=new UnicodeSet("[:Ll:]", status); // Letter, lowercase
+ if (U_FAILURE(status)){
+ errln((UnicodeString)"FAIL: Can't construst set with category->Ll");
+ return;
+ }
+ UnicodeSet *set2=new UnicodeSet("\\p{Decimal Number}", status); //Number, Decimal digit
+ UnicodeSet *set2a=new UnicodeSet("[:Nd:]", status); //Number, Decimal digit
+ if (U_FAILURE(status)){
+ errln((UnicodeString)"FAIL: Can't construct set with category->Nd");
+ return;
+ }
+
+ if (*set1 != *set1a) {
+ errln("FAIL: category constructor for Ll broken");
+ }
+ if (*set2 != *set2a) {
+ errln("FAIL: category constructor for Nd broken");
+ }
+ delete set1a;
+ delete set2a;
+
+ logln("Testing copy construction");
+ UnicodeSet *set1copy=new UnicodeSet(*set1);
+ if(*set1 != *set1copy || *set1 == *set2 ||
+ getPairs(*set1) != getPairs(*set1copy) ||
+ set1->hashCode() != set1copy->hashCode()){
+ errln("FAIL : Error in copy construction");
+ return;
+ }
+
+ logln("Testing =operator");
+ UnicodeSet set1equal=*set1;
+ UnicodeSet set2equal=*set2;
+ if(set1equal != *set1 || set1equal != *set1copy || set2equal != *set2 ||
+ set2equal == *set1 || set2equal == *set1copy || set2equal == set1equal){
+ errln("FAIL: Error in =operator");
+ }
+
+ logln("Testing clone()");
+ UnicodeSet *set1clone=(UnicodeSet*)set1->clone();
+ UnicodeSet *set2clone=(UnicodeSet*)set2->clone();
+ if(*set1clone != *set1 || *set1clone != *set1copy || *set1clone != set1equal ||
+ *set2clone != *set2 || *set2clone == *set1copy || *set2clone != set2equal ||
+ *set2clone == *set1 || *set2clone == set1equal || *set2clone == *set1clone){
+ errln("FAIL: Error in clone");
+ }
+
+ logln("Testing hashcode");
+ if(set1->hashCode() != set1equal.hashCode() || set1->hashCode() != set1clone->hashCode() ||
+ set2->hashCode() != set2equal.hashCode() || set2->hashCode() != set2clone->hashCode() ||
+ set1copy->hashCode() != set1equal.hashCode() || set1copy->hashCode() != set1clone->hashCode() ||
+ set1->hashCode() == set2->hashCode() || set1copy->hashCode() == set2->hashCode() ||
+ set2->hashCode() == set1clone->hashCode() || set2->hashCode() == set1equal.hashCode() ){
+ errln("FAIL: Error in hashCode()");
+ }
+
+ delete set1;
+ delete set1copy;
+ delete set2;
+ delete set1clone;
+ delete set2clone;
+
+
+}
+void
+UnicodeSetTest::TestAddRemove(void) {
+ UnicodeSet set; // Construct empty set
+ doAssert(set.isEmpty() == TRUE, "set should be empty");
+ doAssert(set.size() == 0, "size should be 0");
+ set.complement();
+ doAssert(set.size() == 0x110000, "size should be 0x110000");
+ set.clear();
+ set.add(0x0061, 0x007a);
+ expectPairs(set, "az");
+ doAssert(set.isEmpty() == FALSE, "set should not be empty");
+ doAssert(set.size() != 0, "size should not be equal to 0");
+ doAssert(set.size() == 26, "size should be equal to 26");
+ set.remove(0x006d, 0x0070);
+ expectPairs(set, "alqz");
+ doAssert(set.size() == 22, "size should be equal to 22");
+ set.remove(0x0065, 0x0067);
+ expectPairs(set, "adhlqz");
+ doAssert(set.size() == 19, "size should be equal to 19");
+ set.remove(0x0064, 0x0069);
+ expectPairs(set, "acjlqz");
+ doAssert(set.size() == 16, "size should be equal to 16");
+ set.remove(0x0063, 0x0072);
+ expectPairs(set, "absz");
+ doAssert(set.size() == 10, "size should be equal to 10");
+ set.add(0x0066, 0x0071);
+ expectPairs(set, "abfqsz");
+ doAssert(set.size() == 22, "size should be equal to 22");
+ set.remove(0x0061, 0x0067);
+ expectPairs(set, "hqsz");
+ set.remove(0x0061, 0x007a);
+ expectPairs(set, "");
+ doAssert(set.isEmpty() == TRUE, "set should be empty");
+ doAssert(set.size() == 0, "size should be 0");
+ set.add(0x0061);
+ doAssert(set.isEmpty() == FALSE, "set should not be empty");
+ doAssert(set.size() == 1, "size should not be equal to 1");
+ set.add(0x0062);
+ set.add(0x0063);
+ expectPairs(set, "ac");
+ doAssert(set.size() == 3, "size should not be equal to 3");
+ set.add(0x0070);
+ set.add(0x0071);
+ expectPairs(set, "acpq");
+ doAssert(set.size() == 5, "size should not be equal to 5");
+ set.clear();
+ expectPairs(set, "");
+ doAssert(set.isEmpty() == TRUE, "set should be empty");
+ doAssert(set.size() == 0, "size should be 0");
+
+ // Try removing an entire set from another set
+ expectPattern(set, "[c-x]", "cx");
+ UnicodeSet set2;
+ expectPattern(set2, "[f-ky-za-bc[vw]]", "acfkvwyz");
+ set.removeAll(set2);
+ expectPairs(set, "deluxx");
+
+ // Try adding an entire set to another set
+ expectPattern(set, "[jackiemclean]", "aacceein");
+ expectPattern(set2, "[hitoshinamekatajamesanderson]", "aadehkmort");
+ set.addAll(set2);
+ expectPairs(set, "aacehort");
+ doAssert(set.containsAll(set2) == TRUE, "set should contain all the elements in set2");
+
+ // Try retaining an set of elements contained in another set (intersection)
+ UnicodeSet set3;
+ expectPattern(set3, "[a-c]", "ac");
+ doAssert(set.containsAll(set3) == FALSE, "set doesn't contain all the elements in set3");
+ set3.remove(0x0062);
+ expectPairs(set3, "aacc");
+ doAssert(set.containsAll(set3) == TRUE, "set should contain all the elements in set3");
+ set.retainAll(set3);
+ expectPairs(set, "aacc");
+ doAssert(set.size() == set3.size(), "set.size() should be set3.size()");
+ doAssert(set.containsAll(set3) == TRUE, "set should contain all the elements in set3");
+ set.clear();
+ doAssert(set.size() != set3.size(), "set.size() != set3.size()");
+
+ // Test commutativity
+ expectPattern(set, "[hitoshinamekatajamesanderson]", "aadehkmort");
+ expectPattern(set2, "[jackiemclean]", "aacceein");
+ set.addAll(set2);
+ expectPairs(set, "aacehort");
+ doAssert(set.containsAll(set2) == TRUE, "set should contain all the elements in set2");
+
+
+
+
+}
+
+/**
+ * Make sure minimal representation is maintained.
+ */
+void UnicodeSetTest::TestMinimalRep() {
+ UErrorCode status = U_ZERO_ERROR;
+ // This is pretty thoroughly tested by checkCanonicalRep()
+ // run against the exhaustive operation results. Use the code
+ // here for debugging specific spot problems.
+
+ // 1 overlap against 2
+ UnicodeSet set("[h-km-q]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ UnicodeSet set2("[i-o]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ set.addAll(set2);
+ expectPairs(set, "hq");
+ // right
+ set.applyPattern("[a-m]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ set2.applyPattern("[e-o]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ set.addAll(set2);
+ expectPairs(set, "ao");
+ // left
+ set.applyPattern("[e-o]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ set2.applyPattern("[a-m]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ set.addAll(set2);
+ expectPairs(set, "ao");
+ // 1 overlap against 3
+ set.applyPattern("[a-eg-mo-w]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ set2.applyPattern("[d-q]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ set.addAll(set2);
+ expectPairs(set, "aw");
+}
+
+void UnicodeSetTest::TestAPI() {
+ UErrorCode status = U_ZERO_ERROR;
+ // default ct
+ UnicodeSet set;
+ if (!set.isEmpty() || set.getRangeCount() != 0) {
+ errln((UnicodeString)"FAIL, set should be empty but isn't: " +
+ set);
+ }
+
+ // clear(), isEmpty()
+ set.add(0x0061);
+ if (set.isEmpty()) {
+ errln((UnicodeString)"FAIL, set shouldn't be empty but is: " +
+ set);
+ }
+ set.clear();
+ if (!set.isEmpty()) {
+ errln((UnicodeString)"FAIL, set should be empty but isn't: " +
+ set);
+ }
+
+ // size()
+ set.clear();
+ if (set.size() != 0) {
+ errln((UnicodeString)"FAIL, size should be 0, but is " + set.size() +
+ ": " + set);
+ }
+ set.add(0x0061);
+ if (set.size() != 1) {
+ errln((UnicodeString)"FAIL, size should be 1, but is " + set.size() +
+ ": " + set);
+ }
+ set.add(0x0031, 0x0039);
+ if (set.size() != 10) {
+ errln((UnicodeString)"FAIL, size should be 10, but is " + set.size() +
+ ": " + set);
+ }
+
+ // contains(first, last)
+ set.clear();
+ set.applyPattern("[A-Y 1-8 b-d l-y]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ for (int32_t i = 0; i<set.getRangeCount(); ++i) {
+ UChar32 a = set.getRangeStart(i);
+ UChar32 b = set.getRangeEnd(i);
+ if (!set.contains(a, b)) {
+ errln((UnicodeString)"FAIL, should contain " + (unsigned short)a + '-' + (unsigned short)b +
+ " but doesn't: " + set);
+ }
+ if (set.contains((UChar32)(a-1), b)) {
+ errln((UnicodeString)"FAIL, shouldn't contain " +
+ (unsigned short)(a-1) + '-' + (unsigned short)b +
+ " but does: " + set);
+ }
+ if (set.contains(a, (UChar32)(b+1))) {
+ errln((UnicodeString)"FAIL, shouldn't contain " +
+ (unsigned short)a + '-' + (unsigned short)(b+1) +
+ " but does: " + set);
+ }
+ }
+
+ // Ported InversionList test.
+ UnicodeSet a((UChar32)3,(UChar32)10);
+ UnicodeSet b((UChar32)7,(UChar32)15);
+ UnicodeSet c;
+
+ logln((UnicodeString)"a [3-10]: " + a);
+ logln((UnicodeString)"b [7-15]: " + b);
+ c = a;
+ c.addAll(b);
+ UnicodeSet exp((UChar32)3,(UChar32)15);
+ if (c == exp) {
+ logln((UnicodeString)"c.set(a).add(b): " + c);
+ } else {
+ errln((UnicodeString)"FAIL: c.set(a).add(b) = " + c + ", expect " + exp);
+ }
+ c.complement();
+ exp.set((UChar32)0, (UChar32)2);
+ exp.add((UChar32)16, UnicodeSet::MAX_VALUE);
+ if (c == exp) {
+ logln((UnicodeString)"c.complement(): " + c);
+ } else {
+ errln((UnicodeString)"FAIL: c.complement() = " + c + ", expect " + exp);
+ }
+ c.complement();
+ exp.set((UChar32)3, (UChar32)15);
+ if (c == exp) {
+ logln((UnicodeString)"c.complement(): " + c);
+ } else {
+ errln((UnicodeString)"FAIL: c.complement() = " + c + ", expect " + exp);
+ }
+ c = a;
+ c.complementAll(b);
+ exp.set((UChar32)3,(UChar32)6);
+ exp.add((UChar32)11,(UChar32) 15);
+ if (c == exp) {
+ logln((UnicodeString)"c.set(a).exclusiveOr(b): " + c);
+ } else {
+ errln((UnicodeString)"FAIL: c.set(a).exclusiveOr(b) = " + c + ", expect " + exp);
+ }
+
+ exp = c;
+ bitsToSet(setToBits(c), c);
+ if (c == exp) {
+ logln((UnicodeString)"bitsToSet(setToBits(c)): " + c);
+ } else {
+ errln((UnicodeString)"FAIL: bitsToSet(setToBits(c)) = " + c + ", expect " + exp);
+ }
+
+ // Additional tests for coverage JB#2118
+ //UnicodeSet::complement(class UnicodeString const &)
+ //UnicodeSet::complementAll(class UnicodeString const &)
+ //UnicodeSet::containsNone(class UnicodeSet const &)
+ //UnicodeSet::containsNone(long,long)
+ //UnicodeSet::containsSome(class UnicodeSet const &)
+ //UnicodeSet::containsSome(long,long)
+ //UnicodeSet::removeAll(class UnicodeString const &)
+ //UnicodeSet::retain(long)
+ //UnicodeSet::retainAll(class UnicodeString const &)
+ //UnicodeSet::serialize(unsigned short *,long,enum UErrorCode &)
+ //UnicodeSetIterator::getString(void)
+ set.clear();
+ set.complement("ab");
+ exp.applyPattern("[{ab}]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ if (set != exp) { errln("FAIL: complement(\"ab\")"); return; }
+
+ UnicodeSetIterator iset(set);
+ if (!iset.next() || !iset.isString()) {
+ errln("FAIL: UnicodeSetIterator::next/isString");
+ } else if (iset.getString() != "ab") {
+ errln("FAIL: UnicodeSetIterator::getString");
+ }
+
+ set.add((UChar32)0x61, (UChar32)0x7A);
+ set.complementAll("alan");
+ exp.applyPattern("[{ab}b-kmo-z]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ if (set != exp) { errln("FAIL: complementAll(\"alan\")"); return; }
+
+ exp.applyPattern("[a-z]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ if (set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); }
+ if (!set.containsSome(exp)) { errln("FAIL: containsSome(UnicodeSet)"); }
+ exp.applyPattern("[aln]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ if (!set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); }
+ if (set.containsSome(exp)) { errln("FAIL: containsSome(UnicodeSet)"); }
+
+ if (set.containsNone((UChar32)0x61, (UChar32)0x7A)) {
+ errln("FAIL: containsNone(UChar32, UChar32)");
+ }
+ if (!set.containsSome((UChar32)0x61, (UChar32)0x7A)) {
+ errln("FAIL: containsSome(UChar32, UChar32)");
+ }
+ if (!set.containsNone((UChar32)0x41, (UChar32)0x5A)) {
+ errln("FAIL: containsNone(UChar32, UChar32)");
+ }
+ if (set.containsSome((UChar32)0x41, (UChar32)0x5A)) {
+ errln("FAIL: containsSome(UChar32, UChar32)");
+ }
+
+ set.removeAll("liu");
+ exp.applyPattern("[{ab}b-hj-kmo-tv-z]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ if (set != exp) { errln("FAIL: removeAll(\"liu\")"); return; }
+
+ set.retainAll("star");
+ exp.applyPattern("[rst]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ if (set != exp) { errln("FAIL: retainAll(\"star\")"); return; }
+
+ set.retain((UChar32)0x73);
+ exp.applyPattern("[s]", status);
+ if (U_FAILURE(status)) { errln("FAIL"); return; }
+ if (set != exp) { errln("FAIL: retain('s')"); return; }
+
+ uint16_t buf[32];
+ int32_t slen = set.serialize(buf, sizeof(buf)/sizeof(buf[0]), status);
+ if (U_FAILURE(status)) { errln("FAIL: serialize"); return; }
+ if (slen != 3 || buf[0] != 2 || buf[1] != 0x73 || buf[2] != 0x74) {
+ errln("FAIL: serialize");
+ return;
+ }
+}
+
+void UnicodeSetTest::TestIteration() {
+ UErrorCode ec = U_ZERO_ERROR;
+ int i = 0;
+ int outerLoop;
+
+ // 6 code points, 3 ranges, 2 strings, 8 total elements
+ // Iteration will access them in sorted order - a, b, c, y, z, U0001abcd, "str1", "str2"
+ UnicodeSet set("[zabyc\\U0001abcd{str1}{str2}]", ec);
+ TEST_ASSERT_SUCCESS(ec);
+ UnicodeSetIterator it(set);
+
+ for (outerLoop=0; outerLoop<3; outerLoop++) {
+ // Run the test multiple times, to check that iterator.reset() is working.
+ for (i=0; i<10; i++) {
+ UBool nextv = it.next();
+ UBool isString = it.isString();
+ int32_t codePoint = it.getCodepoint();
+ //int32_t codePointEnd = it.getCodepointEnd();
+ UnicodeString s = it.getString();
+ switch (i) {
+ case 0:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == FALSE);
+ TEST_ASSERT(codePoint==0x61);
+ TEST_ASSERT(s == "a");
+ break;
+ case 1:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == FALSE);
+ TEST_ASSERT(codePoint==0x62);
+ TEST_ASSERT(s == "b");
+ break;
+ case 2:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == FALSE);
+ TEST_ASSERT(codePoint==0x63);
+ TEST_ASSERT(s == "c");
+ break;
+ case 3:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == FALSE);
+ TEST_ASSERT(codePoint==0x79);
+ TEST_ASSERT(s == "y");
+ break;
+ case 4:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == FALSE);
+ TEST_ASSERT(codePoint==0x7a);
+ TEST_ASSERT(s == "z");
+ break;
+ case 5:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == FALSE);
+ TEST_ASSERT(codePoint==0x1abcd);
+ TEST_ASSERT(s == UnicodeString((UChar32)0x1abcd));
+ break;
+ case 6:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == TRUE);
+ TEST_ASSERT(s == "str1");
+ break;
+ case 7:
+ TEST_ASSERT(nextv == TRUE);
+ TEST_ASSERT(isString == TRUE);
+ TEST_ASSERT(s == "str2");
+ break;
+ case 8:
+ TEST_ASSERT(nextv == FALSE);
+ break;
+ case 9:
+ TEST_ASSERT(nextv == FALSE);
+ break;
+ }
+ }
+ it.reset(); // prepare to run the iteration again.
+ }
+}
+
+
+
+
+void UnicodeSetTest::TestStrings() {
+ UErrorCode ec = U_ZERO_ERROR;
+
+ UnicodeSet* testList[] = {
+ UnicodeSet::createFromAll("abc"),
+ new UnicodeSet("[a-c]", ec),
+
+ &(UnicodeSet::createFrom("ch")->add('a','z').add("ll")),
+ new UnicodeSet("[{ll}{ch}a-z]", ec),
+
+ UnicodeSet::createFrom("ab}c"),
+ new UnicodeSet("[{ab\\}c}]", ec),
+
+ &((new UnicodeSet('a','z'))->add('A', 'Z').retain('M','m').complement('X')),
+ new UnicodeSet("[[a-zA-Z]&[M-m]-[X]]", ec),
+
+ NULL
+ };
+
+ if (U_FAILURE(ec)) {
+ errln("FAIL: couldn't construct test sets");
+ }
+
+ for (int32_t i = 0; testList[i] != NULL; i+=2) {
+ if (U_SUCCESS(ec)) {
+ UnicodeString pat0, pat1;
+ testList[i]->toPattern(pat0, TRUE);
+ testList[i+1]->toPattern(pat1, TRUE);
+ if (*testList[i] == *testList[i+1]) {
+ logln((UnicodeString)"Ok: " + pat0 + " == " + pat1);
+ } else {
+ logln((UnicodeString)"FAIL: " + pat0 + " != " + pat1);
+ }
+ }
+ delete testList[i];
+ delete testList[i+1];
+ }
+}
+
+/**
+ * Test the [:Latin:] syntax.
+ */
+void UnicodeSetTest::TestScriptSet() {
+ expectContainment("[:Latin:]", "aA", CharsToUnicodeString("\\u0391\\u03B1"));
+
+ expectContainment("[:Greek:]", CharsToUnicodeString("\\u0391\\u03B1"), "aA");
+
+ /* Jitterbug 1423 */
+ expectContainment("[[:Common:][:Inherited:]]", CharsToUnicodeString("\\U00003099\\U0001D169\\u0000"), "aA");
+
+}
+
+/**
+ * Test the [:Latin:] syntax.
+ */
+void UnicodeSetTest::TestPropertySet() {
+ static const char* const DATA[] = {
+ // Pattern, Chars IN, Chars NOT in
+
+ "[:Latin:]",
+ "aA",
+ "\\u0391\\u03B1",
+
+ "[\\p{Greek}]",
+ "\\u0391\\u03B1",
+ "aA",
+
+ "\\P{ GENERAL Category = upper case letter }",
+ "abc",
+ "ABC",
+
+ // Combining class: @since ICU 2.2
+ // Check both symbolic and numeric
+ "\\p{ccc=Nukta}",
+ "\\u0ABC",
+ "abc",
+
+ "\\p{Canonical Combining Class = 11}",
+ "\\u05B1",
+ "\\u05B2",
+
+ "[:c c c = iota subscript :]",
+ "\\u0345",
+ "xyz",
+
+ // Bidi class: @since ICU 2.2
+ "\\p{bidiclass=lefttoright}",
+ "abc",
+ "\\u0671\\u0672",
+
+ // Binary properties: @since ICU 2.2
+ "\\p{ideographic}",
+ "\\u4E0A",
+ "x",
+
+ "[:math=false:]",
+ "q)*(",
+ // weiv: )(and * were removed from math in Unicode 4.0.1
+ //"(*+)",
+ "+<>^",
+
+ // JB#1767 \N{}, \p{ASCII}
+ "[:Ascii:]",
+ "abc\\u0000\\u007F",
+ "\\u0080\\u4E00",
+
+ "[\\N{ latin small letter a }[:name= latin small letter z:]]",
+ "az",
+ "qrs",
+
+ // JB#2015
+ "[:any:]",
+ "a\\U0010FFFF",
+ "",
+
+ "[:nv=0.5:]",
+ "\\u00BD\\u0F2A",
+ "\\u00BC",
+
+ // JB#2653: Age
+ "[:Age=1.1:]",
+ "\\u03D6", // 1.1
+ "\\u03D8\\u03D9", // 3.2
+
+ "[:Age=3.1:]",
+ "\\u1800\\u3400\\U0002f800",
+ "\\u0220\\u034f\\u30ff\\u33ff\\ufe73\\U00010000\\U00050000",
+
+ // JB#2350: Case_Sensitive
+ "[:Case Sensitive:]",
+ "A\\u1FFC\\U00010410",
+ ";\\u00B4\\U00010500",
+
+ // JB#2832: C99-compatibility props
+ "[:blank:]",
+ " \\u0009",
+ "1-9A-Z",
+
+ "[:graph:]",
+ "19AZ",
+ " \\u0003\\u0007\\u0009\\u000A\\u000D",
+
+ "[:punct:]",
+ "!@#%&*()[]{}-_\\/;:,.?'\"",
+ "09azAZ",
+
+ "[:xdigit:]",
+ "09afAF",
+ "gG!",
+
+ // Regex compatibility test
+ "[-b]", // leading '-' is literal
+ "-b",
+ "ac",
+
+ "[^-b]", // leading '-' is literal
+ "ac",
+ "-b",
+
+ "[b-]", // trailing '-' is literal
+ "-b",
+ "ac",
+
+ "[^b-]", // trailing '-' is literal
+ "ac",
+ "-b",
+
+ "[a-b-]", // trailing '-' is literal
+ "ab-",
+ "c=",
+
+ "[[a-q]&[p-z]-]", // trailing '-' is literal
+ "pq-",
+ "or=",
+
+ "[\\s|\\)|:|$|\\>]", // from regex tests
+ "s|):$>",
+ "abc",
+
+ "[\\uDC00cd]", // JB#2906: isolated trail at start
+ "cd\\uDC00",
+ "ab\\uD800\\U00010000",
+
+ "[ab\\uD800]", // JB#2906: isolated trail at start
+ "ab\\uD800",
+ "cd\\uDC00\\U00010000",
+
+ "[ab\\uD800cd]", // JB#2906: isolated lead in middle
+ "abcd\\uD800",
+ "ef\\uDC00\\U00010000",
+
+ "[ab\\uDC00cd]", // JB#2906: isolated trail in middle
+ "abcd\\uDC00",
+ "ef\\uD800\\U00010000",
+
+ "[:^lccc=0:]", // Lead canonical class
+ "\\u0300\\u0301",
+ "abcd\\u00c0\\u00c5",
+
+ "[:^tccc=0:]", // Trail canonical class
+ "\\u0300\\u0301\\u00c0\\u00c5",
+ "abcd",
+
+ "[[:^lccc=0:][:^tccc=0:]]", // Lead and trail canonical class
+ "\\u0300\\u0301\\u00c0\\u00c5",
+ "abcd",
+
+ "[[:^lccc=0:]-[:^tccc=0:]]", // Stuff that starts with an accent but ends with a base (none right now)
+ "",
+ "abcd\\u0300\\u0301\\u00c0\\u00c5",
+
+ "[[:ccc=0:]-[:lccc=0:]-[:tccc=0:]]", // Weirdos. Complete canonical class is zero, but both lead and trail are not
+ "\\u0F73\\u0F75\\u0F81",
+ "abcd\\u0300\\u0301\\u00c0\\u00c5",
+
+ "[:Assigned:]",
+ "A\\uE000\\uF8FF\\uFDC7\\U00010000\\U0010FFFD",
+ "\\u0888\\uFDD3\\uFFFE\\U00050005"
+ };
+
+ static const int32_t DATA_LEN = sizeof(DATA)/sizeof(DATA[0]);
+
+ for (int32_t i=0; i<DATA_LEN; i+=3) {
+ expectContainment(DATA[i], CharsToUnicodeString(DATA[i+1]),
+ CharsToUnicodeString(DATA[i+2]));
+ }
+}
+
+/**
+ * Test that Posix style character classes [:digit:], etc.
+ * have the Unicode definitions from TR 18.
+ */
+void UnicodeSetTest::TestPosixClasses() {
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:alpha:]", status);
+ UnicodeSet s2("\\p{Alphabetic}", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:lower:]", status);
+ UnicodeSet s2("\\p{lowercase}", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:upper:]", status);
+ UnicodeSet s2("\\p{Uppercase}", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:punct:]", status);
+ UnicodeSet s2("\\p{gc=Punctuation}", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:digit:]", status);
+ UnicodeSet s2("\\p{gc=DecimalNumber}", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:xdigit:]", status);
+ UnicodeSet s2("[\\p{DecimalNumber}\\p{HexDigit}]", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:alnum:]", status);
+ UnicodeSet s2("[\\p{Alphabetic}\\p{DecimalNumber}]", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:space:]", status);
+ UnicodeSet s2("\\p{Whitespace}", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:blank:]", status);
+ TEST_ASSERT_SUCCESS(status);
+ UnicodeSet s2("[\\p{Whitespace}-[\\u000a\\u000B\\u000c\\u000d\\u0085\\p{LineSeparator}\\p{ParagraphSeparator}]]",
+ status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:cntrl:]", status);
+ TEST_ASSERT_SUCCESS(status);
+ UnicodeSet s2("\\p{Control}", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:graph:]", status);
+ TEST_ASSERT_SUCCESS(status);
+ UnicodeSet s2("[^\\p{Whitespace}\\p{Control}\\p{Surrogate}\\p{Unassigned}]", status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSet s1("[:print:]", status);
+ TEST_ASSERT_SUCCESS(status);
+ UnicodeSet s2("[[:graph:][:blank:]-[\\p{Control}]]" ,status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT(s1==s2);
+ }
+}
+/**
+ * Test cloning of UnicodeSet. For C++, we test the copy constructor.
+ */
+void UnicodeSetTest::TestClone() {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeSet s("[abcxyz]", ec);
+ UnicodeSet t(s);
+ expectContainment(t, "abc", "def");
+}
+
+/**
+ * Test the indexOf() and charAt() methods.
+ */
+void UnicodeSetTest::TestIndexOf() {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeSet set("[a-cx-y3578]", ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: UnicodeSet constructor");
+ return;
+ }
+ for (int32_t i=0; i<set.size(); ++i) {
+ UChar32 c = set.charAt(i);
+ if (set.indexOf(c) != i) {
+ errln("FAIL: charAt(%d) = %X => indexOf() => %d",
+ i, c, set.indexOf(c));
+ }
+ }
+ UChar32 c = set.charAt(set.size());
+ if (c != -1) {
+ errln("FAIL: charAt(<out of range>) = %X", c);
+ }
+ int32_t j = set.indexOf((UChar32)0x71/*'q'*/);
+ if (j != -1) {
+ errln((UnicodeString)"FAIL: indexOf('q') = " + j);
+ }
+}
+
+/**
+ * Test closure API.
+ */
+void UnicodeSetTest::TestCloseOver() {
+ UErrorCode ec = U_ZERO_ERROR;
+
+ char CASE[] = {(char)USET_CASE_INSENSITIVE};
+ char CASE_MAPPINGS[] = {(char)USET_ADD_CASE_MAPPINGS};
+ const char* DATA[] = {
+ // selector, input, output
+ CASE,
+ "[aq\\u00DF{Bc}{bC}{Fi}]",
+ "[aAqQ\\u00DF\\uFB01{ss}{bc}{fi}]",
+
+ CASE,
+ "[\\u01F1]", // 'DZ'
+ "[\\u01F1\\u01F2\\u01F3]",
+
+ CASE,
+ "[\\u1FB4]",
+ "[\\u1FB4{\\u03AC\\u03B9}]",
+
+ CASE,
+ "[{F\\uFB01}]",
+ "[\\uFB03{ffi}]",
+
+ CASE, // make sure binary search finds limits
+ "[a\\uFF3A]",
+ "[aA\\uFF3A\\uFF5A]",
+
+ CASE,
+ "[a-z]","[A-Za-z\\u017F\\u212A]",
+ CASE,
+ "[abc]","[A-Ca-c]",
+ CASE,
+ "[ABC]","[A-Ca-c]",
+
+ CASE, "[i]", "[iI]",
+
+ CASE, "[\\u0130]", "[\\u0130{i\\u0307}]", // dotted I
+ CASE, "[{i\\u0307}]", "[\\u0130{i\\u0307}]", // i with dot
+
+ CASE, "[\\u0131]", "[\\u0131]", // dotless i
+
+ CASE, "[\\u0390]", "[\\u0390\\u1FD3{\\u03B9\\u0308\\u0301}]",
+
+ CASE, "[\\u03c2]", "[\\u03a3\\u03c2\\u03c3]", // sigmas
+
+ CASE, "[\\u03f2]", "[\\u03f2\\u03f9]", // lunate sigmas
+
+ CASE, "[\\u03f7]", "[\\u03f7\\u03f8]",
+
+ CASE, "[\\u1fe3]", "[\\u03b0\\u1fe3{\\u03c5\\u0308\\u0301}]",
+
+ CASE, "[\\ufb05]", "[\\ufb05\\ufb06{st}]",
+ CASE, "[{st}]", "[\\ufb05\\ufb06{st}]",
+
+ CASE, "[\\U0001044F]", "[\\U00010427\\U0001044F]",
+
+ CASE, "[{a\\u02BE}]", "[\\u1E9A{a\\u02BE}]", // first in sorted table
+
+ CASE, "[{\\u1f7c\\u03b9}]", "[\\u1ff2{\\u1f7c\\u03b9}]", // last in sorted table
+
+ CASE_MAPPINGS,
+ "[aq\\u00DF{Bc}{bC}{Fi}]",
+ "[aAqQ\\u00DF{ss}{Ss}{SS}{Bc}{BC}{bC}{bc}{FI}{Fi}{fi}]",
+
+ CASE_MAPPINGS,
+ "[\\u01F1]", // 'DZ'
+ "[\\u01F1\\u01F2\\u01F3]",
+
+ CASE_MAPPINGS,
+ "[a-z]",
+ "[A-Za-z]",
+
+ NULL
+ };
+
+ UnicodeSet s;
+ UnicodeSet t;
+ UnicodeString buf;
+ for (int32_t i=0; DATA[i]!=NULL; i+=3) {
+ int32_t selector = DATA[i][0];
+ UnicodeString pat(DATA[i+1]);
+ UnicodeString exp(DATA[i+2]);
+ s.applyPattern(pat, ec);
+ s.closeOver(selector);
+ t.applyPattern(exp, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: applyPattern failed");
+ continue;
+ }
+ if (s == t) {
+ logln((UnicodeString)"Ok: " + pat + ".closeOver(" + selector + ") => " + exp);
+ } else {
+ errln((UnicodeString)"FAIL: " + pat + ".closeOver(" + selector + ") => " +
+ s.toPattern(buf, TRUE) + ", expected " + exp);
+ }
+ }
+
+#if 0
+ /*
+ * Unused test code.
+ * This was used to compare the old implementation (using USET_CASE)
+ * with the new one (using 0x100 temporarily)
+ * while transitioning from hardcoded case closure tables in uniset.cpp
+ * (moved to uniset_props.cpp) to building the data by gencase into ucase.icu.
+ * and using ucase.c functions for closure.
+ * See Jitterbug 3432 RFE: Move uniset.cpp data to a data file
+ *
+ * Note: The old and new implementation never fully matched because
+ * the old implementation turned out to not map U+0130 and U+0131 correctly
+ * (dotted I and dotless i) and because the old implementation's data tables
+ * were outdated compared to Unicode 4.0.1 at the time of the change to the
+ * new implementation. (So sigmas and some other characters were not handled
+ * according to the newer Unicode version.)
+ */
+ UnicodeSet sens("[:case_sensitive:]", ec), sens2, s2;
+ UnicodeSetIterator si(sens);
+ UnicodeString str, buf2;
+ const UnicodeString *pStr;
+ UChar32 c;
+ while(si.next()) {
+ if(!si.isString()) {
+ c=si.getCodepoint();
+ s.clear();
+ s.add(c);
+
+ str.setTo(c);
+ str.foldCase();
+ sens2.add(str);
+
+ t=s;
+ s.closeOver(USET_CASE);
+ t.closeOver(0x100);
+ if(s!=t) {
+ errln("FAIL: closeOver(U+%04x) differs: ", c);
+ errln((UnicodeString)"old "+s.toPattern(buf, TRUE)+" new: "+t.toPattern(buf2, TRUE));
+ }
+ }
+ }
+ // remove all code points
+ // should contain all full case folding mapping strings
+ sens2.remove(0, 0x10ffff);
+ si.reset(sens2);
+ while(si.next()) {
+ if(si.isString()) {
+ pStr=&si.getString();
+ s.clear();
+ s.add(*pStr);
+ t=s2=s;
+ s.closeOver(USET_CASE);
+ t.closeOver(0x100);
+ if(s!=t) {
+ errln((UnicodeString)"FAIL: closeOver("+s2.toPattern(buf, TRUE)+") differs: ");
+ errln((UnicodeString)"old "+s.toPattern(buf, TRUE)+" new: "+t.toPattern(buf2, TRUE));
+ }
+ }
+ }
+#endif
+
+ // Test the pattern API
+ s.applyPattern("[abc]", USET_CASE_INSENSITIVE, NULL, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: applyPattern failed");
+ } else {
+ expectContainment(s, "abcABC", "defDEF");
+ }
+ UnicodeSet v("[^abc]", USET_CASE_INSENSITIVE, NULL, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: constructor failed");
+ } else {
+ expectContainment(v, "defDEF", "abcABC");
+ }
+ UnicodeSet cm("[abck]", USET_ADD_CASE_MAPPINGS, NULL, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: construct w/case mappings failed");
+ } else {
+ expectContainment(cm, "abckABCK", CharsToUnicodeString("defDEF\\u212A"));
+ }
+}
+
+void UnicodeSetTest::TestEscapePattern() {
+ const char pattern[] =
+ "[\\uFEFF \\u200A-\\u200E \\U0001D173-\\U0001D17A \\U000F0000-\\U000FFFFD ]";
+ const char exp[] =
+ "[\\u200A-\\u200E\\uFEFF\\U0001D173-\\U0001D17A\\U000F0000-\\U000FFFFD]";
+ // We test this with two passes; in the second pass we
+ // pre-unescape the pattern. Since U+200E is rule whitespace,
+ // this fails -- which is what we expect.
+ for (int32_t pass=1; pass<=2; ++pass) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeString pat(pattern);
+ if (pass==2) {
+ pat = pat.unescape();
+ }
+ // Pattern is only good for pass 1
+ UBool isPatternValid = (pass==1);
+
+ UnicodeSet set(pat, ec);
+ if (U_SUCCESS(ec) != isPatternValid){
+ errln((UnicodeString)"FAIL: applyPattern(" +
+ escape(pat) + ") => " +
+ u_errorName(ec));
+ continue;
+ }
+ if (U_FAILURE(ec)) {
+ continue;
+ }
+ if (set.contains((UChar)0x0644)){
+ errln((UnicodeString)"FAIL: " + escape(pat) + " contains(U+0664)");
+ }
+
+ UnicodeString newpat;
+ set.toPattern(newpat, TRUE);
+ if (newpat == exp) {
+ logln(escape(pat) + " => " + newpat);
+ } else {
+ errln((UnicodeString)"FAIL: " + escape(pat) + " => " + newpat);
+ }
+
+ for (int32_t i=0; i<set.getRangeCount(); ++i) {
+ UnicodeString str("Range ");
+ str.append((UChar)(0x30 + i))
+ .append(": ")
+ .append((UChar32)set.getRangeStart(i))
+ .append(" - ")
+ .append((UChar32)set.getRangeEnd(i));
+ str = str + " (" + set.getRangeStart(i) + " - " +
+ set.getRangeEnd(i) + ")";
+ if (set.getRangeStart(i) < 0) {
+ errln((UnicodeString)"FAIL: " + escape(str));
+ } else {
+ logln(escape(str));
+ }
+ }
+ }
+}
+
+void UnicodeSetTest::expectRange(const UnicodeString& label,
+ const UnicodeSet& set,
+ UChar32 start, UChar32 end) {
+ UnicodeSet exp(start, end);
+ UnicodeString pat;
+ if (set == exp) {
+ logln(label + " => " + set.toPattern(pat, TRUE));
+ } else {
+ UnicodeString xpat;
+ errln((UnicodeString)"FAIL: " + label + " => " +
+ set.toPattern(pat, TRUE) +
+ ", expected " + exp.toPattern(xpat, TRUE));
+ }
+}
+
+void UnicodeSetTest::TestInvalidCodePoint() {
+
+ const UChar32 DATA[] = {
+ // Test range Expected range
+ 0, 0x10FFFF, 0, 0x10FFFF,
+ (UChar32)-1, 8, 0, 8,
+ 8, 0x110000, 8, 0x10FFFF
+ };
+ const int32_t DATA_LENGTH = sizeof(DATA)/sizeof(DATA[0]);
+
+ UnicodeString pat;
+ int32_t i;
+
+ for (i=0; i<DATA_LENGTH; i+=4) {
+ UChar32 start = DATA[i];
+ UChar32 end = DATA[i+1];
+ UChar32 xstart = DATA[i+2];
+ UChar32 xend = DATA[i+3];
+
+ // Try various API using the test code points
+
+ UnicodeSet set(start, end);
+ expectRange((UnicodeString)"ct(" + start + "," + end + ")",
+ set, xstart, xend);
+
+ set.clear();
+ set.set(start, end);
+ expectRange((UnicodeString)"set(" + start + "," + end + ")",
+ set, xstart, xend);
+
+ UBool b = set.contains(start);
+ b = set.contains(start, end);
+ b = set.containsNone(start, end);
+ b = set.containsSome(start, end);
+
+ /*int32_t index = set.indexOf(start);*/
+
+ set.clear();
+ set.add(start);
+ set.add(start, end);
+ expectRange((UnicodeString)"add(" + start + "," + end + ")",
+ set, xstart, xend);
+
+ set.set(0, 0x10FFFF);
+ set.retain(start, end);
+ expectRange((UnicodeString)"retain(" + start + "," + end + ")",
+ set, xstart, xend);
+ set.retain(start);
+
+ set.set(0, 0x10FFFF);
+ set.remove(start);
+ set.remove(start, end);
+ set.complement();
+ expectRange((UnicodeString)"!remove(" + start + "," + end + ")",
+ set, xstart, xend);
+
+ set.set(0, 0x10FFFF);
+ set.complement(start, end);
+ set.complement();
+ expectRange((UnicodeString)"!complement(" + start + "," + end + ")",
+ set, xstart, xend);
+ set.complement(start);
+ }
+
+ const UChar32 DATA2[] = {
+ 0,
+ 0x10FFFF,
+ (UChar32)-1,
+ 0x110000
+ };
+ const int32_t DATA2_LENGTH = sizeof(DATA2)/sizeof(DATA2[0]);
+
+ for (i=0; i<DATA2_LENGTH; ++i) {
+ UChar32 c = DATA2[i], end = 0x10FFFF;
+ UBool valid = (c >= 0 && c <= 0x10FFFF);
+
+ UnicodeSet set(0, 0x10FFFF);
+
+ // For single-codepoint contains, invalid codepoints are NOT contained
+ UBool b = set.contains(c);
+ if (b == valid) {
+ logln((UnicodeString)"[\\u0000-\\U0010FFFF].contains(" + c +
+ ") = " + b);
+ } else {
+ errln((UnicodeString)"FAIL: [\\u0000-\\U0010FFFF].contains(" + c +
+ ") = " + b);
+ }
+
+ // For codepoint range contains, containsNone, and containsSome,
+ // invalid or empty (start > end) ranges have UNDEFINED behavior.
+ b = set.contains(c, end);
+ logln((UnicodeString)"* [\\u0000-\\U0010FFFF].contains(" + c +
+ "," + end + ") = " + b);
+
+ b = set.containsNone(c, end);
+ logln((UnicodeString)"* [\\u0000-\\U0010FFFF].containsNone(" + c +
+ "," + end + ") = " + b);
+
+ b = set.containsSome(c, end);
+ logln((UnicodeString)"* [\\u0000-\\U0010FFFF].containsSome(" + c +
+ "," + end + ") = " + b);
+
+ int32_t index = set.indexOf(c);
+ if ((index >= 0) == valid) {
+ logln((UnicodeString)"[\\u0000-\\U0010FFFF].indexOf(" + c +
+ ") = " + index);
+ } else {
+ errln((UnicodeString)"FAIL: [\\u0000-\\U0010FFFF].indexOf(" + c +
+ ") = " + index);
+ }
+ }
+}
+
+// Used by TestSymbolTable
+class TokenSymbolTable : public SymbolTable {
+public:
+ Hashtable contents;
+
+ TokenSymbolTable(UErrorCode& ec) : contents(FALSE, ec) {
+ contents.setValueDeleter(uhash_deleteUnicodeString);
+ }
+
+ ~TokenSymbolTable() {}
+
+ /**
+ * (Non-SymbolTable API) Add the given variable and value to
+ * the table. Variable should NOT contain leading '$'.
+ */
+ void add(const UnicodeString& var, const UnicodeString& value,
+ UErrorCode& ec) {
+ if (U_SUCCESS(ec)) {
+ contents.put(var, new UnicodeString(value), ec);
+ }
+ }
+
+ /**
+ * SymbolTable API
+ */
+ virtual const UnicodeString* lookup(const UnicodeString& s) const {
+ return (const UnicodeString*) contents.get(s);
+ }
+
+ /**
+ * SymbolTable API
+ */
+ virtual const UnicodeFunctor* lookupMatcher(UChar32 /*ch*/) const {
+ return NULL;
+ }
+
+ /**
+ * SymbolTable API
+ */
+ virtual UnicodeString parseReference(const UnicodeString& text,
+ ParsePosition& pos, int32_t limit) const {
+ int32_t start = pos.getIndex();
+ int32_t i = start;
+ UnicodeString result;
+ while (i < limit) {
+ UChar c = text.charAt(i);
+ if ((i==start && !u_isIDStart(c)) || !u_isIDPart(c)) {
+ break;
+ }
+ ++i;
+ }
+ if (i == start) { // No valid name chars
+ return result; // Indicate failure with empty string
+ }
+ pos.setIndex(i);
+ text.extractBetween(start, i, result);
+ return result;
+ }
+};
+
+void UnicodeSetTest::TestSymbolTable() {
+ // Multiple test cases can be set up here. Each test case
+ // is terminated by null:
+ // var, value, var, value,..., input pat., exp. output pat., null
+ const char* DATA[] = {
+ "us", "a-z", "[0-1$us]", "[0-1a-z]", NULL,
+ "us", "[a-z]", "[0-1$us]", "[0-1[a-z]]", NULL,
+ "us", "\\[a\\-z\\]", "[0-1$us]", "[-01\\[\\]az]", NULL,
+ NULL
+ };
+
+ for (int32_t i=0; DATA[i]!=NULL; ++i) {
+ UErrorCode ec = U_ZERO_ERROR;
+ TokenSymbolTable sym(ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: couldn't construct TokenSymbolTable");
+ continue;
+ }
+
+ // Set up variables
+ while (DATA[i+2] != NULL) {
+ sym.add(DATA[i], DATA[i+1], ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: couldn't add to TokenSymbolTable");
+ continue;
+ }
+ i += 2;
+ }
+
+ // Input pattern and expected output pattern
+ UnicodeString inpat = DATA[i], exppat = DATA[i+1];
+ i += 2;
+
+ ParsePosition pos(0);
+ UnicodeSet us(inpat, pos, USET_IGNORE_SPACE, &sym, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: couldn't construct UnicodeSet");
+ continue;
+ }
+
+ // results
+ if (pos.getIndex() != inpat.length()) {
+ errln((UnicodeString)"Failed to read to end of string \""
+ + inpat + "\": read to "
+ + pos.getIndex() + ", length is "
+ + inpat.length());
+ }
+
+ UnicodeSet us2(exppat, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: couldn't construct expected UnicodeSet");
+ continue;
+ }
+
+ UnicodeString a, b;
+ if (us != us2) {
+ errln((UnicodeString)"Failed, got " + us.toPattern(a, TRUE) +
+ ", expected " + us2.toPattern(b, TRUE));
+ } else {
+ logln((UnicodeString)"Ok, got " + us.toPattern(a, TRUE));
+ }
+ }
+}
+
+void UnicodeSetTest::TestSurrogate() {
+ const char* DATA[] = {
+ // These should all behave identically
+ "[abc\\uD800\\uDC00]",
+ // "[abc\uD800\uDC00]", // Can't do this on C -- only Java
+ "[abc\\U00010000]",
+ 0
+ };
+ for (int i=0; DATA[i] != 0; ++i) {
+ UErrorCode ec = U_ZERO_ERROR;
+ logln((UnicodeString)"Test pattern " + i + " :" + DATA[i]);
+ UnicodeSet set(DATA[i], ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: UnicodeSet constructor");
+ continue;
+ }
+ expectContainment(set,
+ CharsToUnicodeString("abc\\U00010000"),
+ CharsToUnicodeString("\\uD800;\\uDC00")); // split apart surrogate-pair
+ if (set.size() != 4) {
+ errln((UnicodeString)"FAIL: " + DATA[i] + ".size() == " +
+ set.size() + ", expected 4");
+ }
+ }
+}
+
+void UnicodeSetTest::TestExhaustive() {
+ // exhaustive tests. Simulate UnicodeSets with integers.
+ // That gives us very solid tests (except for large memory tests).
+
+ int32_t limit = 128;
+
+ UnicodeSet x, y, z, aa;
+
+ for (int32_t i = 0; i < limit; ++i) {
+ bitsToSet(i, x);
+ logln((UnicodeString)"Testing " + i + ", " + x);
+ _testComplement(i, x, y);
+
+ // AS LONG AS WE ARE HERE, check roundtrip
+ checkRoundTrip(bitsToSet(i, aa));
+
+ for (int32_t j = 0; j < limit; ++j) {
+ _testAdd(i,j, x,y,z);
+ _testXor(i,j, x,y,z);
+ _testRetain(i,j, x,y,z);
+ _testRemove(i,j, x,y,z);
+ }
+ }
+}
+
+void UnicodeSetTest::_testComplement(int32_t a, UnicodeSet& x, UnicodeSet& z) {
+ bitsToSet(a, x);
+ z = x;
+ z.complement();
+ int32_t c = setToBits(z);
+ if (c != (~a)) {
+ errln((UnicodeString)"FAILED: add: ~" + x + " != " + z);
+ errln((UnicodeString)"FAILED: add: ~" + a + " != " + c);
+ }
+ checkCanonicalRep(z, (UnicodeString)"complement " + a);
+}
+
+void UnicodeSetTest::_testAdd(int32_t a, int32_t b, UnicodeSet& x, UnicodeSet& y, UnicodeSet& z) {
+ bitsToSet(a, x);
+ bitsToSet(b, y);
+ z = x;
+ z.addAll(y);
+ int32_t c = setToBits(z);
+ if (c != (a | b)) {
+ errln((UnicodeString)"FAILED: add: " + x + " | " + y + " != " + z);
+ errln((UnicodeString)"FAILED: add: " + a + " | " + b + " != " + c);
+ }
+ checkCanonicalRep(z, (UnicodeString)"add " + a + "," + b);
+}
+
+void UnicodeSetTest::_testRetain(int32_t a, int32_t b, UnicodeSet& x, UnicodeSet& y, UnicodeSet& z) {
+ bitsToSet(a, x);
+ bitsToSet(b, y);
+ z = x;
+ z.retainAll(y);
+ int32_t c = setToBits(z);
+ if (c != (a & b)) {
+ errln((UnicodeString)"FAILED: retain: " + x + " & " + y + " != " + z);
+ errln((UnicodeString)"FAILED: retain: " + a + " & " + b + " != " + c);
+ }
+ checkCanonicalRep(z, (UnicodeString)"retain " + a + "," + b);
+}
+
+void UnicodeSetTest::_testRemove(int32_t a, int32_t b, UnicodeSet& x, UnicodeSet& y, UnicodeSet& z) {
+ bitsToSet(a, x);
+ bitsToSet(b, y);
+ z = x;
+ z.removeAll(y);
+ int32_t c = setToBits(z);
+ if (c != (a &~ b)) {
+ errln((UnicodeString)"FAILED: remove: " + x + " &~ " + y + " != " + z);
+ errln((UnicodeString)"FAILED: remove: " + a + " &~ " + b + " != " + c);
+ }
+ checkCanonicalRep(z, (UnicodeString)"remove " + a + "," + b);
+}
+
+void UnicodeSetTest::_testXor(int32_t a, int32_t b, UnicodeSet& x, UnicodeSet& y, UnicodeSet& z) {
+ bitsToSet(a, x);
+ bitsToSet(b, y);
+ z = x;
+ z.complementAll(y);
+ int32_t c = setToBits(z);
+ if (c != (a ^ b)) {
+ errln((UnicodeString)"FAILED: complement: " + x + " ^ " + y + " != " + z);
+ errln((UnicodeString)"FAILED: complement: " + a + " ^ " + b + " != " + c);
+ }
+ checkCanonicalRep(z, (UnicodeString)"complement " + a + "," + b);
+}
+
+/**
+ * Check that ranges are monotonically increasing and non-
+ * overlapping.
+ */
+void UnicodeSetTest::checkCanonicalRep(const UnicodeSet& set, const UnicodeString& msg) {
+ int32_t n = set.getRangeCount();
+ if (n < 0) {
+ errln((UnicodeString)"FAIL result of " + msg +
+ ": range count should be >= 0 but is " +
+ n /*+ " for " + set.toPattern())*/);
+ return;
+ }
+ UChar32 last = 0;
+ for (int32_t i=0; i<n; ++i) {
+ UChar32 start = set.getRangeStart(i);
+ UChar32 end = set.getRangeEnd(i);
+ if (start > end) {
+ errln((UnicodeString)"FAIL result of " + msg +
+ ": range " + (i+1) +
+ " start > end: " + (int)start + ", " + (int)end +
+ " for " + set);
+ }
+ if (i > 0 && start <= last) {
+ errln((UnicodeString)"FAIL result of " + msg +
+ ": range " + (i+1) +
+ " overlaps previous range: " + (int)start + ", " + (int)end +
+ " for " + set);
+ }
+ last = end;
+ }
+}
+
+/**
+ * Convert a bitmask to a UnicodeSet.
+ */
+UnicodeSet& UnicodeSetTest::bitsToSet(int32_t a, UnicodeSet& result) {
+ result.clear();
+ for (UChar32 i = 0; i < 32; ++i) {
+ if ((a & (1<<i)) != 0) {
+ result.add(i);
+ }
+ }
+ return result;
+}
+
+/**
+ * Convert a UnicodeSet to a bitmask. Only the characters
+ * U+0000 to U+0020 are represented in the bitmask.
+ */
+int32_t UnicodeSetTest::setToBits(const UnicodeSet& x) {
+ int32_t result = 0;
+ for (int32_t i = 0; i < 32; ++i) {
+ if (x.contains((UChar32)i)) {
+ result |= (1<<i);
+ }
+ }
+ return result;
+}
+
+/**
+ * Return the representation of an inversion list based UnicodeSet
+ * as a pairs list. Ranges are listed in ascending Unicode order.
+ * For example, the set [a-zA-M3] is represented as "33AMaz".
+ */
+UnicodeString UnicodeSetTest::getPairs(const UnicodeSet& set) {
+ UnicodeString pairs;
+ for (int32_t i=0; i<set.getRangeCount(); ++i) {
+ UChar32 start = set.getRangeStart(i);
+ UChar32 end = set.getRangeEnd(i);
+ if (end > 0xFFFF) {
+ end = 0xFFFF;
+ i = set.getRangeCount(); // Should be unnecessary
+ }
+ pairs.append((UChar)start).append((UChar)end);
+ }
+ return pairs;
+}
+
+/**
+ * Basic consistency check for a few items.
+ * That the iterator works, and that we can create a pattern and
+ * get the same thing back
+ */
+void UnicodeSetTest::checkRoundTrip(const UnicodeSet& s) {
+ UErrorCode ec = U_ZERO_ERROR;
+
+ UnicodeSet t(s);
+ checkEqual(s, t, "copy ct");
+
+ t = s;
+ checkEqual(s, t, "operator=");
+
+ copyWithIterator(t, s, FALSE);
+ checkEqual(s, t, "iterator roundtrip");
+
+ copyWithIterator(t, s, TRUE); // try range
+ checkEqual(s, t, "iterator roundtrip");
+
+ UnicodeString pat; s.toPattern(pat, FALSE);
+ t.applyPattern(pat, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: applyPattern");
+ return;
+ } else {
+ checkEqual(s, t, "toPattern(false)");
+ }
+
+ s.toPattern(pat, TRUE);
+ t.applyPattern(pat, ec);
+ if (U_FAILURE(ec)) {
+ errln("FAIL: applyPattern");
+ return;
+ } else {
+ checkEqual(s, t, "toPattern(true)");
+ }
+}
+
+void UnicodeSetTest::copyWithIterator(UnicodeSet& t, const UnicodeSet& s, UBool withRange) {
+ t.clear();
+ UnicodeSetIterator it(s);
+ if (withRange) {
+ while (it.nextRange()) {
+ if (it.isString()) {
+ t.add(it.getString());
+ } else {
+ t.add(it.getCodepoint(), it.getCodepointEnd());
+ }
+ }
+ } else {
+ while (it.next()) {
+ if (it.isString()) {
+ t.add(it.getString());
+ } else {
+ t.add(it.getCodepoint());
+ }
+ }
+ }
+}
+
+UBool UnicodeSetTest::checkEqual(const UnicodeSet& s, const UnicodeSet& t, const char* message) {
+ UnicodeString source; s.toPattern(source, TRUE);
+ UnicodeString result; t.toPattern(result, TRUE);
+ if (s != t) {
+ errln((UnicodeString)"FAIL: " + message
+ + "; source = " + source
+ + "; result = " + result
+ );
+ return FALSE;
+ } else {
+ logln((UnicodeString)"Ok: " + message
+ + "; source = " + source
+ + "; result = " + result
+ );
+ }
+ return TRUE;
+}
+
+void
+UnicodeSetTest::expectContainment(const UnicodeString& pat,
+ const UnicodeString& charsIn,
+ const UnicodeString& charsOut) {
+ UErrorCode ec = U_ZERO_ERROR;
+ UnicodeSet set(pat, ec);
+ if (U_FAILURE(ec)) {
+ errln((UnicodeString)"FAIL: pattern \"" +
+ pat + "\" => " + u_errorName(ec));
+ return;
+ }
+ expectContainment(set, pat, charsIn, charsOut);
+}
+
+void
+UnicodeSetTest::expectContainment(const UnicodeSet& set,
+ const UnicodeString& charsIn,
+ const UnicodeString& charsOut) {
+ UnicodeString pat;
+ set.toPattern(pat);
+ expectContainment(set, pat, charsIn, charsOut);
+}
+
+void
+UnicodeSetTest::expectContainment(const UnicodeSet& set,
+ const UnicodeString& setName,
+ const UnicodeString& charsIn,
+ const UnicodeString& charsOut) {
+ UnicodeString bad;
+ UChar32 c;
+ int32_t i;
+
+ for (i=0; i<charsIn.length(); i+=U16_LENGTH(c)) {
+ c = charsIn.char32At(i);
+ if (!set.contains(c)) {
+ bad.append(c);
+ }
+ }
+ if (bad.length() > 0) {
+ errln((UnicodeString)"Fail: set " + setName + " does not contain " + prettify(bad) +
+ ", expected containment of " + prettify(charsIn));
+ } else {
+ logln((UnicodeString)"Ok: set " + setName + " contains " + prettify(charsIn));
+ }
+
+ bad.truncate(0);
+ for (i=0; i<charsOut.length(); i+=U16_LENGTH(c)) {
+ c = charsOut.char32At(i);
+ if (set.contains(c)) {
+ bad.append(c);
+ }
+ }
+ if (bad.length() > 0) {
+ errln((UnicodeString)"Fail: set " + setName + " contains " + prettify(bad) +
+ ", expected non-containment of " + prettify(charsOut));
+ } else {
+ logln((UnicodeString)"Ok: set " + setName + " does not contain " + prettify(charsOut));
+ }
+}
+
+void
+UnicodeSetTest::expectPattern(UnicodeSet& set,
+ const UnicodeString& pattern,
+ const UnicodeString& expectedPairs){
+ UErrorCode status = U_ZERO_ERROR;
+ set.applyPattern(pattern, status);
+ if (U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: applyPattern(\"") + pattern +
+ "\") failed");
+ return;
+ } else {
+ if (getPairs(set) != expectedPairs ) {
+ errln(UnicodeString("FAIL: applyPattern(\"") + pattern +
+ "\") => pairs \"" +
+ escape(getPairs(set)) + "\", expected \"" +
+ escape(expectedPairs) + "\"");
+ } else {
+ logln(UnicodeString("Ok: applyPattern(\"") + pattern +
+ "\") => pairs \"" +
+ escape(getPairs(set)) + "\"");
+ }
+ }
+ // the result of calling set.toPattern(), which is the string representation of
+ // this set(set), is passed to a UnicodeSet constructor, and tested that it
+ // will produce another set that is equal to this one.
+ UnicodeString temppattern;
+ set.toPattern(temppattern);
+ UnicodeSet *tempset=new UnicodeSet(temppattern, status);
+ if (U_FAILURE(status)) {
+ errln(UnicodeString("FAIL: applyPattern(\""+ pattern + "\").toPattern() => " + temppattern + " => invalid pattern"));
+ return;
+ }
+ if(*tempset != set || getPairs(*tempset) != getPairs(set)){
+ errln(UnicodeString("FAIL: applyPattern(\""+ pattern + "\").toPattern() => " + temppattern + " => pairs \""+ escape(getPairs(*tempset)) + "\", expected pairs \"" +
+ escape(getPairs(set)) + "\""));
+ } else{
+ logln(UnicodeString("Ok: applyPattern(\""+ pattern + "\").toPattern() => " + temppattern + " => pairs \"" + escape(getPairs(*tempset)) + "\""));
+ }
+
+ delete tempset;
+
+}
+
+void
+UnicodeSetTest::expectPairs(const UnicodeSet& set, const UnicodeString& expectedPairs) {
+ if (getPairs(set) != expectedPairs) {
+ errln(UnicodeString("FAIL: Expected pair list \"") +
+ escape(expectedPairs) + "\", got \"" +
+ escape(getPairs(set)) + "\"");
+ }
+}
+
+void UnicodeSetTest::expectToPattern(const UnicodeSet& set,
+ const UnicodeString& expPat,
+ const char** expStrings) {
+ UnicodeString pat;
+ set.toPattern(pat, TRUE);
+ if (pat == expPat) {
+ logln((UnicodeString)"Ok: toPattern() => \"" + pat + "\"");
+ } else {
+ errln((UnicodeString)"FAIL: toPattern() => \"" + pat + "\", expected \"" + expPat + "\"");
+ return;
+ }
+ if (expStrings == NULL) {
+ return;
+ }
+ UBool in = TRUE;
+ for (int32_t i=0; expStrings[i] != NULL; ++i) {
+ if (expStrings[i] == NOT) { // sic; pointer comparison
+ in = FALSE;
+ continue;
+ }
+ UnicodeString s = CharsToUnicodeString(expStrings[i]);
+ UBool contained = set.contains(s);
+ if (contained == in) {
+ logln((UnicodeString)"Ok: " + expPat +
+ (contained ? " contains {" : " does not contain {") +
+ escape(expStrings[i]) + "}");
+ } else {
+ errln((UnicodeString)"FAIL: " + expPat +
+ (contained ? " contains {" : " does not contain {") +
+ escape(expStrings[i]) + "}");
+ }
+ }
+}
+
+static UChar toHexString(int32_t i) { return (UChar)(i + (i < 10 ? 0x30 : (0x41 - 10))); }
+
+void
+UnicodeSetTest::doAssert(UBool condition, const char *message)
+{
+ if (!condition) {
+ errln(UnicodeString("ERROR : ") + message);
+ }
+}
+
+UnicodeString
+UnicodeSetTest::escape(const UnicodeString& s) {
+ UnicodeString buf;
+ for (int32_t i=0; i<s.length(); )
+ {
+ UChar32 c = s.char32At(i);
+ if (0x0020 <= c && c <= 0x007F) {
+ buf += c;
+ } else {
+ if (c <= 0xFFFF) {
+ buf += (UChar)0x5c; buf += (UChar)0x75;
+ } else {
+ buf += (UChar)0x5c; buf += (UChar)0x55;
+ buf += toHexString((c & 0xF0000000) >> 28);
+ buf += toHexString((c & 0x0F000000) >> 24);
+ buf += toHexString((c & 0x00F00000) >> 20);
+ buf += toHexString((c & 0x000F0000) >> 16);
+ }
+ buf += toHexString((c & 0xF000) >> 12);
+ buf += toHexString((c & 0x0F00) >> 8);
+ buf += toHexString((c & 0x00F0) >> 4);
+ buf += toHexString(c & 0x000F);
+ }
+ i += U16_LENGTH(c);
+ }
+ return buf;
+}
+
+void UnicodeSetTest::TestFreezable() {
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UnicodeString idPattern=UNICODE_STRING("[:ID_Continue:]", 15);
+ UnicodeSet idSet(idPattern, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("FAIL: unable to create UnicodeSet([:ID_Continue:]) - %s", u_errorName(errorCode));
+ return;
+ }
+
+ UnicodeString wsPattern=UNICODE_STRING("[:White_Space:]", 15);
+ UnicodeSet wsSet(wsPattern, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("FAIL: unable to create UnicodeSet([:White_Space:]) - %s", u_errorName(errorCode));
+ return;
+ }
+
+ idSet.add(idPattern);
+ UnicodeSet frozen(idSet);
+ frozen.freeze();
+
+ if(idSet.isFrozen() || !frozen.isFrozen()) {
+ errln("FAIL: isFrozen() is wrong");
+ }
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: a copy-constructed frozen set differs from its original");
+ }
+
+ frozen=wsSet;
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: a frozen set was modified by operator=");
+ }
+
+ UnicodeSet frozen2(frozen);
+ if(frozen2!=frozen || frozen2!=idSet) {
+ errln("FAIL: a copied frozen set differs from its frozen original");
+ }
+ if(!frozen2.isFrozen()) {
+ errln("FAIL: copy-constructing a frozen set results in a thawed one");
+ }
+ UnicodeSet frozen3(5, 55); // Set to some values to really test assignment below, not copy construction.
+ if(frozen3.contains(0, 4) || !frozen3.contains(5, 55) || frozen3.contains(56, 0x10ffff)) {
+ errln("FAIL: UnicodeSet(5, 55) failed");
+ }
+ frozen3=frozen;
+ if(!frozen3.isFrozen()) {
+ errln("FAIL: copying a frozen set results in a thawed one");
+ }
+
+ UnicodeSet *cloned=(UnicodeSet *)frozen.clone();
+ if(!cloned->isFrozen() || *cloned!=frozen || cloned->containsSome(0xd802, 0xd805)) {
+ errln("FAIL: clone() failed");
+ }
+ cloned->add(0xd802, 0xd805);
+ if(cloned->containsSome(0xd802, 0xd805)) {
+ errln("FAIL: unable to modify clone");
+ }
+ delete cloned;
+
+ UnicodeSet *thawed=(UnicodeSet *)frozen.cloneAsThawed();
+ if(thawed->isFrozen() || *thawed!=frozen || thawed->containsSome(0xd802, 0xd805)) {
+ errln("FAIL: cloneAsThawed() failed");
+ }
+ thawed->add(0xd802, 0xd805);
+ if(!thawed->contains(0xd802, 0xd805)) {
+ errln("FAIL: unable to modify thawed clone");
+ }
+ delete thawed;
+
+ frozen.set(5, 55);
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::set() modified a frozen set");
+ }
+
+ frozen.clear();
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::clear() modified a frozen set");
+ }
+
+ frozen.closeOver(USET_CASE_INSENSITIVE);
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::closeOver() modified a frozen set");
+ }
+
+ frozen.compact();
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::compact() modified a frozen set");
+ }
+
+ ParsePosition pos;
+ frozen.
+ applyPattern(wsPattern, errorCode).
+ applyPattern(wsPattern, USET_IGNORE_SPACE, NULL, errorCode).
+ applyPattern(wsPattern, pos, USET_IGNORE_SPACE, NULL, errorCode).
+ applyIntPropertyValue(UCHAR_CANONICAL_COMBINING_CLASS, 230, errorCode).
+ applyPropertyAlias(UNICODE_STRING_SIMPLE("Assigned"), UnicodeString(), errorCode);
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::applyXYZ() modified a frozen set");
+ }
+
+ frozen.
+ add(0xd800).
+ add(0xd802, 0xd805).
+ add(wsPattern).
+ addAll(idPattern).
+ addAll(wsSet);
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::addXYZ() modified a frozen set");
+ }
+
+ frozen.
+ retain(0x62).
+ retain(0x64, 0x69).
+ retainAll(wsPattern).
+ retainAll(wsSet);
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::retainXYZ() modified a frozen set");
+ }
+
+ frozen.
+ remove(0x62).
+ remove(0x64, 0x69).
+ remove(idPattern).
+ removeAll(idPattern).
+ removeAll(idSet);
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::removeXYZ() modified a frozen set");
+ }
+
+ frozen.
+ complement().
+ complement(0x62).
+ complement(0x64, 0x69).
+ complement(idPattern).
+ complementAll(idPattern).
+ complementAll(idSet);
+ if(frozen!=idSet || !(frozen==idSet)) {
+ errln("FAIL: UnicodeSet::complementXYZ() modified a frozen set");
+ }
+}
+
+// Test span() etc. -------------------------------------------------------- ***
+
+// Append the UTF-8 version of the string to t and return the appended UTF-8 length.
+static int32_t
+appendUTF8(const UChar *s, int32_t length, char *t, int32_t capacity) {
+ UErrorCode errorCode=U_ZERO_ERROR;
+ int32_t length8=0;
+ u_strToUTF8(t, capacity, &length8, s, length, &errorCode);
+ if(U_SUCCESS(errorCode)) {
+ return length8;
+ } else {
+ // The string contains an unpaired surrogate.
+ // Ignore this string.
+ return 0;
+ }
+}
+
+class UnicodeSetWithStringsIterator;
+
+// Make the strings in a UnicodeSet easily accessible.
+class UnicodeSetWithStrings {
+public:
+ UnicodeSetWithStrings(const UnicodeSet &normalSet) :
+ set(normalSet), stringsLength(0), hasSurrogates(FALSE) {
+ int32_t size=set.size();
+ if(size>0 && set.charAt(size-1)<0) {
+ // If a set's last element is not a code point, then it must contain strings.
+ // Iterate over the set, skip all code point ranges, and cache the strings.
+ // Convert them to UTF-8 for spanUTF8().
+ UnicodeSetIterator iter(set);
+ const UnicodeString *s;
+ char *s8=utf8;
+ int32_t length8, utf8Count=0;
+ while(iter.nextRange() && stringsLength<LENGTHOF(strings)) {
+ if(iter.isString()) {
+ // Store the pointer to the set's string element
+ // which we happen to know is a stable pointer.
+ strings[stringsLength]=s=&iter.getString();
+ utf8Count+=
+ utf8Lengths[stringsLength]=length8=
+ appendUTF8(s->getBuffer(), s->length(),
+ s8, (int32_t)(sizeof(utf8)-utf8Count));
+ if(length8==0) {
+ hasSurrogates=TRUE; // Contains unpaired surrogates.
+ }
+ s8+=length8;
+ ++stringsLength;
+ }
+ }
+ }
+ }
+
+ const UnicodeSet &getSet() const {
+ return set;
+ }
+
+ UBool hasStrings() const {
+ return (UBool)(stringsLength>0);
+ }
+
+ UBool hasStringsWithSurrogates() const {
+ return hasSurrogates;
+ }
+
+private:
+ friend class UnicodeSetWithStringsIterator;
+
+ const UnicodeSet &set;
+
+ const UnicodeString *strings[20];
+ int32_t stringsLength;
+ UBool hasSurrogates;
+
+ char utf8[1024];
+ int32_t utf8Lengths[20];
+
+ int32_t nextStringIndex;
+ int32_t nextUTF8Start;
+};
+
+class UnicodeSetWithStringsIterator {
+public:
+ UnicodeSetWithStringsIterator(const UnicodeSetWithStrings &set) :
+ fSet(set), nextStringIndex(0), nextUTF8Start(0) {
+ }
+
+ void reset() {
+ nextStringIndex=nextUTF8Start=0;
+ }
+
+ const UnicodeString *nextString() {
+ if(nextStringIndex<fSet.stringsLength) {
+ return fSet.strings[nextStringIndex++];
+ } else {
+ return NULL;
+ }
+ }
+
+ // Do not mix with calls to nextString().
+ const char *nextUTF8(int32_t &length) {
+ if(nextStringIndex<fSet.stringsLength) {
+ const char *s8=fSet.utf8+nextUTF8Start;
+ nextUTF8Start+=length=fSet.utf8Lengths[nextStringIndex++];
+ return s8;
+ } else {
+ length=0;
+ return NULL;
+ }
+ }
+
+private:
+ const UnicodeSetWithStrings &fSet;
+ int32_t nextStringIndex;
+ int32_t nextUTF8Start;
+};
+
+// Compare 16-bit Unicode strings (which may be malformed UTF-16)
+// at code point boundaries.
+// That is, each edge of a match must not be in the middle of a surrogate pair.
+static inline UBool
+matches16CPB(const UChar *s, int32_t start, int32_t limit, const UnicodeString &t) {
+ s+=start;
+ limit-=start;
+ int32_t length=t.length();
+ return 0==t.compare(s, length) &&
+ !(0<start && U16_IS_LEAD(s[-1]) && U16_IS_TRAIL(s[0])) &&
+ !(length<limit && U16_IS_LEAD(s[length-1]) && U16_IS_TRAIL(s[length]));
+}
+
+// Implement span() with contains() for comparison.
+static int32_t containsSpanUTF16(const UnicodeSetWithStrings &set, const UChar *s, int32_t length,
+ USetSpanCondition spanCondition) {
+ const UnicodeSet &realSet(set.getSet());
+ if(!set.hasStrings()) {
+ if(spanCondition!=USET_SPAN_NOT_CONTAINED) {
+ spanCondition=USET_SPAN_CONTAINED; // Pin to 0/1 values.
+ }
+
+ UChar32 c;
+ int32_t start=0, prev;
+ while((prev=start)<length) {
+ U16_NEXT(s, start, length, c);
+ if(realSet.contains(c)!=spanCondition) {
+ break;
+ }
+ }
+ return prev;
+ } else if(spanCondition==USET_SPAN_NOT_CONTAINED) {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t start, next;
+ for(start=next=0; start<length;) {
+ U16_NEXT(s, next, length, c);
+ if(realSet.contains(c)) {
+ break;
+ }
+ const UnicodeString *str;
+ iter.reset();
+ while((str=iter.nextString())!=NULL) {
+ if(str->length()<=(length-start) && matches16CPB(s, start, length, *str)) {
+ // spanNeedsStrings=TRUE;
+ return start;
+ }
+ }
+ start=next;
+ }
+ return start;
+ } else /* USET_SPAN_CONTAINED or USET_SPAN_SIMPLE */ {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t start, next, maxSpanLimit=0;
+ for(start=next=0; start<length;) {
+ U16_NEXT(s, next, length, c);
+ if(!realSet.contains(c)) {
+ next=start; // Do not span this single, not-contained code point.
+ }
+ const UnicodeString *str;
+ iter.reset();
+ while((str=iter.nextString())!=NULL) {
+ if(str->length()<=(length-start) && matches16CPB(s, start, length, *str)) {
+ // spanNeedsStrings=TRUE;
+ int32_t matchLimit=start+str->length();
+ if(matchLimit==length) {
+ return length;
+ }
+ if(spanCondition==USET_SPAN_CONTAINED) {
+ // Iterate for the shortest match at each position.
+ // Recurse for each but the shortest match.
+ if(next==start) {
+ next=matchLimit; // First match from start.
+ } else {
+ if(matchLimit<next) {
+ // Remember shortest match from start for iteration.
+ int32_t temp=next;
+ next=matchLimit;
+ matchLimit=temp;
+ }
+ // Recurse for non-shortest match from start.
+ int32_t spanLength=containsSpanUTF16(set, s+matchLimit, length-matchLimit,
+ USET_SPAN_CONTAINED);
+ if((matchLimit+spanLength)>maxSpanLimit) {
+ maxSpanLimit=matchLimit+spanLength;
+ if(maxSpanLimit==length) {
+ return length;
+ }
+ }
+ }
+ } else /* spanCondition==USET_SPAN_SIMPLE */ {
+ if(matchLimit>next) {
+ // Remember longest match from start.
+ next=matchLimit;
+ }
+ }
+ }
+ }
+ if(next==start) {
+ break; // No match from start.
+ }
+ start=next;
+ }
+ if(start>maxSpanLimit) {
+ return start;
+ } else {
+ return maxSpanLimit;
+ }
+ }
+}
+
+static int32_t containsSpanBackUTF16(const UnicodeSetWithStrings &set, const UChar *s, int32_t length,
+ USetSpanCondition spanCondition) {
+ if(length==0) {
+ return 0;
+ }
+ const UnicodeSet &realSet(set.getSet());
+ if(!set.hasStrings()) {
+ if(spanCondition!=USET_SPAN_NOT_CONTAINED) {
+ spanCondition=USET_SPAN_CONTAINED; // Pin to 0/1 values.
+ }
+
+ UChar32 c;
+ int32_t prev=length;
+ do {
+ U16_PREV(s, 0, length, c);
+ if(realSet.contains(c)!=spanCondition) {
+ break;
+ }
+ } while((prev=length)>0);
+ return prev;
+ } else if(spanCondition==USET_SPAN_NOT_CONTAINED) {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t prev=length, length0=length;
+ do {
+ U16_PREV(s, 0, length, c);
+ if(realSet.contains(c)) {
+ break;
+ }
+ const UnicodeString *str;
+ iter.reset();
+ while((str=iter.nextString())!=NULL) {
+ if(str->length()<=prev && matches16CPB(s, prev-str->length(), length0, *str)) {
+ // spanNeedsStrings=TRUE;
+ return prev;
+ }
+ }
+ } while((prev=length)>0);
+ return prev;
+ } else /* USET_SPAN_CONTAINED or USET_SPAN_SIMPLE */ {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t prev=length, minSpanStart=length, length0=length;
+ do {
+ U16_PREV(s, 0, length, c);
+ if(!realSet.contains(c)) {
+ length=prev; // Do not span this single, not-contained code point.
+ }
+ const UnicodeString *str;
+ iter.reset();
+ while((str=iter.nextString())!=NULL) {
+ if(str->length()<=prev && matches16CPB(s, prev-str->length(), length0, *str)) {
+ // spanNeedsStrings=TRUE;
+ int32_t matchStart=prev-str->length();
+ if(matchStart==0) {
+ return 0;
+ }
+ if(spanCondition==USET_SPAN_CONTAINED) {
+ // Iterate for the shortest match at each position.
+ // Recurse for each but the shortest match.
+ if(length==prev) {
+ length=matchStart; // First match from prev.
+ } else {
+ if(matchStart>length) {
+ // Remember shortest match from prev for iteration.
+ int32_t temp=length;
+ length=matchStart;
+ matchStart=temp;
+ }
+ // Recurse for non-shortest match from prev.
+ int32_t spanStart=containsSpanBackUTF16(set, s, matchStart,
+ USET_SPAN_CONTAINED);
+ if(spanStart<minSpanStart) {
+ minSpanStart=spanStart;
+ if(minSpanStart==0) {
+ return 0;
+ }
+ }
+ }
+ } else /* spanCondition==USET_SPAN_SIMPLE */ {
+ if(matchStart<length) {
+ // Remember longest match from prev.
+ length=matchStart;
+ }
+ }
+ }
+ }
+ if(length==prev) {
+ break; // No match from prev.
+ }
+ } while((prev=length)>0);
+ if(prev<minSpanStart) {
+ return prev;
+ } else {
+ return minSpanStart;
+ }
+ }
+}
+
+static int32_t containsSpanUTF8(const UnicodeSetWithStrings &set, const char *s, int32_t length,
+ USetSpanCondition spanCondition) {
+ const UnicodeSet &realSet(set.getSet());
+ if(!set.hasStrings()) {
+ if(spanCondition!=USET_SPAN_NOT_CONTAINED) {
+ spanCondition=USET_SPAN_CONTAINED; // Pin to 0/1 values.
+ }
+
+ UChar32 c;
+ int32_t start=0, prev;
+ while((prev=start)<length) {
+ U8_NEXT(s, start, length, c);
+ if(c<0) {
+ c=0xfffd;
+ }
+ if(realSet.contains(c)!=spanCondition) {
+ break;
+ }
+ }
+ return prev;
+ } else if(spanCondition==USET_SPAN_NOT_CONTAINED) {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t start, next;
+ for(start=next=0; start<length;) {
+ U8_NEXT(s, next, length, c);
+ if(c<0) {
+ c=0xfffd;
+ }
+ if(realSet.contains(c)) {
+ break;
+ }
+ const char *s8;
+ int32_t length8;
+ iter.reset();
+ while((s8=iter.nextUTF8(length8))!=NULL) {
+ if(length8!=0 && length8<=(length-start) && 0==memcmp(s+start, s8, length8)) {
+ // spanNeedsStrings=TRUE;
+ return start;
+ }
+ }
+ start=next;
+ }
+ return start;
+ } else /* USET_SPAN_CONTAINED or USET_SPAN_SIMPLE */ {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t start, next, maxSpanLimit=0;
+ for(start=next=0; start<length;) {
+ U8_NEXT(s, next, length, c);
+ if(c<0) {
+ c=0xfffd;
+ }
+ if(!realSet.contains(c)) {
+ next=start; // Do not span this single, not-contained code point.
+ }
+ const char *s8;
+ int32_t length8;
+ iter.reset();
+ while((s8=iter.nextUTF8(length8))!=NULL) {
+ if(length8!=0 && length8<=(length-start) && 0==memcmp(s+start, s8, length8)) {
+ // spanNeedsStrings=TRUE;
+ int32_t matchLimit=start+length8;
+ if(matchLimit==length) {
+ return length;
+ }
+ if(spanCondition==USET_SPAN_CONTAINED) {
+ // Iterate for the shortest match at each position.
+ // Recurse for each but the shortest match.
+ if(next==start) {
+ next=matchLimit; // First match from start.
+ } else {
+ if(matchLimit<next) {
+ // Remember shortest match from start for iteration.
+ int32_t temp=next;
+ next=matchLimit;
+ matchLimit=temp;
+ }
+ // Recurse for non-shortest match from start.
+ int32_t spanLength=containsSpanUTF8(set, s+matchLimit, length-matchLimit,
+ USET_SPAN_CONTAINED);
+ if((matchLimit+spanLength)>maxSpanLimit) {
+ maxSpanLimit=matchLimit+spanLength;
+ if(maxSpanLimit==length) {
+ return length;
+ }
+ }
+ }
+ } else /* spanCondition==USET_SPAN_SIMPLE */ {
+ if(matchLimit>next) {
+ // Remember longest match from start.
+ next=matchLimit;
+ }
+ }
+ }
+ }
+ if(next==start) {
+ break; // No match from start.
+ }
+ start=next;
+ }
+ if(start>maxSpanLimit) {
+ return start;
+ } else {
+ return maxSpanLimit;
+ }
+ }
+}
+
+static int32_t containsSpanBackUTF8(const UnicodeSetWithStrings &set, const char *s, int32_t length,
+ USetSpanCondition spanCondition) {
+ if(length==0) {
+ return 0;
+ }
+ const UnicodeSet &realSet(set.getSet());
+ if(!set.hasStrings()) {
+ if(spanCondition!=USET_SPAN_NOT_CONTAINED) {
+ spanCondition=USET_SPAN_CONTAINED; // Pin to 0/1 values.
+ }
+
+ UChar32 c;
+ int32_t prev=length;
+ do {
+ U8_PREV(s, 0, length, c);
+ if(c<0) {
+ c=0xfffd;
+ }
+ if(realSet.contains(c)!=spanCondition) {
+ break;
+ }
+ } while((prev=length)>0);
+ return prev;
+ } else if(spanCondition==USET_SPAN_NOT_CONTAINED) {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t prev=length;
+ do {
+ U8_PREV(s, 0, length, c);
+ if(c<0) {
+ c=0xfffd;
+ }
+ if(realSet.contains(c)) {
+ break;
+ }
+ const char *s8;
+ int32_t length8;
+ iter.reset();
+ while((s8=iter.nextUTF8(length8))!=NULL) {
+ if(length8!=0 && length8<=prev && 0==memcmp(s+prev-length8, s8, length8)) {
+ // spanNeedsStrings=TRUE;
+ return prev;
+ }
+ }
+ } while((prev=length)>0);
+ return prev;
+ } else /* USET_SPAN_CONTAINED or USET_SPAN_SIMPLE */ {
+ UnicodeSetWithStringsIterator iter(set);
+ UChar32 c;
+ int32_t prev=length, minSpanStart=length;
+ do {
+ U8_PREV(s, 0, length, c);
+ if(c<0) {
+ c=0xfffd;
+ }
+ if(!realSet.contains(c)) {
+ length=prev; // Do not span this single, not-contained code point.
+ }
+ const char *s8;
+ int32_t length8;
+ iter.reset();
+ while((s8=iter.nextUTF8(length8))!=NULL) {
+ if(length8!=0 && length8<=prev && 0==memcmp(s+prev-length8, s8, length8)) {
+ // spanNeedsStrings=TRUE;
+ int32_t matchStart=prev-length8;
+ if(matchStart==0) {
+ return 0;
+ }
+ if(spanCondition==USET_SPAN_CONTAINED) {
+ // Iterate for the shortest match at each position.
+ // Recurse for each but the shortest match.
+ if(length==prev) {
+ length=matchStart; // First match from prev.
+ } else {
+ if(matchStart>length) {
+ // Remember shortest match from prev for iteration.
+ int32_t temp=length;
+ length=matchStart;
+ matchStart=temp;
+ }
+ // Recurse for non-shortest match from prev.
+ int32_t spanStart=containsSpanBackUTF8(set, s, matchStart,
+ USET_SPAN_CONTAINED);
+ if(spanStart<minSpanStart) {
+ minSpanStart=spanStart;
+ if(minSpanStart==0) {
+ return 0;
+ }
+ }
+ }
+ } else /* spanCondition==USET_SPAN_SIMPLE */ {
+ if(matchStart<length) {
+ // Remember longest match from prev.
+ length=matchStart;
+ }
+ }
+ }
+ }
+ if(length==prev) {
+ break; // No match from prev.
+ }
+ } while((prev=length)>0);
+ if(prev<minSpanStart) {
+ return prev;
+ } else {
+ return minSpanStart;
+ }
+ }
+}
+
+// spans to be performed and compared
+enum {
+ SPAN_UTF16 =1,
+ SPAN_UTF8 =2,
+ SPAN_UTFS =3,
+
+ SPAN_SET =4,
+ SPAN_COMPLEMENT =8,
+ SPAN_POLARITY =0xc,
+
+ SPAN_FWD =0x10,
+ SPAN_BACK =0x20,
+ SPAN_DIRS =0x30,
+
+ SPAN_CONTAINED =0x100,
+ SPAN_SIMPLE =0x200,
+ SPAN_CONDITION =0x300,
+
+ SPAN_ALL =0x33f
+};
+
+static inline USetSpanCondition invertSpanCondition(USetSpanCondition spanCondition, USetSpanCondition contained) {
+ return spanCondition == USET_SPAN_NOT_CONTAINED ? contained : USET_SPAN_NOT_CONTAINED;
+}
+
+static inline int32_t slen(const void *s, UBool isUTF16) {
+ return isUTF16 ? u_strlen((const UChar *)s) : strlen((const char *)s);
+}
+
+/*
+ * Count spans on a string with the method according to type and set the span limits.
+ * The set may be the complement of the original.
+ * When using spanBack() and comparing with span(), use a span condition for the first spanBack()
+ * according to the expected number of spans.
+ * Sets typeName to an empty string if there is no such type.
+ * Returns -1 if the span option is filtered out.
+ */
+static int32_t getSpans(const UnicodeSetWithStrings &set, UBool isComplement,
+ const void *s, int32_t length, UBool isUTF16,
+ uint32_t whichSpans,
+ int type, const char *&typeName,
+ int32_t limits[], int32_t limitsCapacity,
+ int32_t expectCount) {
+ const UnicodeSet &realSet(set.getSet());
+ int32_t start, count;
+ USetSpanCondition spanCondition, firstSpanCondition, contained;
+ UBool isForward;
+
+ if(type<0 || 7<type) {
+ typeName="";
+ return 0;
+ }
+
+ static const char *const typeNames16[]={
+ "contains", "contains(LM)",
+ "span", "span(LM)",
+ "containsBack", "containsBack(LM)",
+ "spanBack", "spanBack(LM)"
+ };
+
+ static const char *const typeNames8[]={
+ "containsUTF8", "containsUTF8(LM)",
+ "spanUTF8", "spanUTF8(LM)",
+ "containsBackUTF8", "containsBackUTF8(LM)", // not implemented
+ "spanBackUTF8", "spanBackUTF8(LM)"
+ };
+
+ typeName= isUTF16 ? typeNames16[type] : typeNames8[type];
+
+ // filter span options
+ if(type<=3) {
+ // span forward
+ if((whichSpans&SPAN_FWD)==0) {
+ return -1;
+ }
+ isForward=TRUE;
+ } else {
+ // span backward
+ if((whichSpans&SPAN_BACK)==0) {
+ return -1;
+ }
+ isForward=FALSE;
+ }
+ if((type&1)==0) {
+ // use USET_SPAN_CONTAINED
+ if((whichSpans&SPAN_CONTAINED)==0) {
+ return -1;
+ }
+ contained=USET_SPAN_CONTAINED;
+ } else {
+ // use USET_SPAN_SIMPLE
+ if((whichSpans&SPAN_SIMPLE)==0) {
+ return -1;
+ }
+ contained=USET_SPAN_SIMPLE;
+ }
+
+ // Default first span condition for going forward with an uncomplemented set.
+ spanCondition=USET_SPAN_NOT_CONTAINED;
+ if(isComplement) {
+ spanCondition=invertSpanCondition(spanCondition, contained);
+ }
+
+ // First span condition for span(), used to terminate the spanBack() iteration.
+ firstSpanCondition=spanCondition;
+
+ // spanBack(): Its initial span condition is span()'s last span condition,
+ // which is the opposite of span()'s first span condition
+ // if we expect an even number of spans.
+ // (The loop inverts spanCondition (expectCount-1) times
+ // before the expectCount'th span() call.)
+ // If we do not compare forward and backward directions, then we do not have an
+ // expectCount and just start with firstSpanCondition.
+ if(!isForward && (whichSpans&SPAN_FWD)!=0 && (expectCount&1)==0) {
+ spanCondition=invertSpanCondition(spanCondition, contained);
+ }
+
+ count=0;
+ switch(type) {
+ case 0:
+ case 1:
+ start=0;
+ if(length<0) {
+ length=slen(s, isUTF16);
+ }
+ for(;;) {
+ start+= isUTF16 ? containsSpanUTF16(set, (const UChar *)s+start, length-start, spanCondition) :
+ containsSpanUTF8(set, (const char *)s+start, length-start, spanCondition);
+ if(count<limitsCapacity) {
+ limits[count]=start;
+ }
+ ++count;
+ if(start>=length) {
+ break;
+ }
+ spanCondition=invertSpanCondition(spanCondition, contained);
+ }
+ break;
+ case 2:
+ case 3:
+ start=0;
+ for(;;) {
+ start+= isUTF16 ? realSet.span((const UChar *)s+start, length>=0 ? length-start : length, spanCondition) :
+ realSet.spanUTF8((const char *)s+start, length>=0 ? length-start : length, spanCondition);
+ if(count<limitsCapacity) {
+ limits[count]=start;
+ }
+ ++count;
+ if(length>=0 ? start>=length :
+ isUTF16 ? ((const UChar *)s)[start]==0 :
+ ((const char *)s)[start]==0
+ ) {
+ break;
+ }
+ spanCondition=invertSpanCondition(spanCondition, contained);
+ }
+ break;
+ case 4:
+ case 5:
+ if(length<0) {
+ length=slen(s, isUTF16);
+ }
+ for(;;) {
+ ++count;
+ if(count<=limitsCapacity) {
+ limits[limitsCapacity-count]=length;
+ }
+ length= isUTF16 ? containsSpanBackUTF16(set, (const UChar *)s, length, spanCondition) :
+ containsSpanBackUTF8(set, (const char *)s, length, spanCondition);
+ if(length==0 && spanCondition==firstSpanCondition) {
+ break;
+ }
+ spanCondition=invertSpanCondition(spanCondition, contained);
+ }
+ if(count<limitsCapacity) {
+ memmove(limits, limits+(limitsCapacity-count), count*4);
+ }
+ break;
+ case 6:
+ case 7:
+ for(;;) {
+ ++count;
+ if(count<=limitsCapacity) {
+ limits[limitsCapacity-count]= length >=0 ? length : slen(s, isUTF16);
+ }
+ // Note: Length<0 is tested only for the first spanBack().
+ // If we wanted to keep length<0 for all spanBack()s, we would have to
+ // temporarily modify the string by placing a NUL where the previous spanBack() stopped.
+ length= isUTF16 ? realSet.spanBack((const UChar *)s, length, spanCondition) :
+ realSet.spanBackUTF8((const char *)s, length, spanCondition);
+ if(length==0 && spanCondition==firstSpanCondition) {
+ break;
+ }
+ spanCondition=invertSpanCondition(spanCondition, contained);
+ }
+ if(count<limitsCapacity) {
+ memmove(limits, limits+(limitsCapacity-count), count*4);
+ }
+ break;
+ default:
+ typeName="";
+ return -1;
+ }
+
+ return count;
+}
+
+// sets to be tested; odd index=isComplement
+enum {
+ SLOW,
+ SLOW_NOT,
+ FAST,
+ FAST_NOT,
+ SET_COUNT
+};
+
+static const char *const setNames[SET_COUNT]={
+ "slow",
+ "slow.not",
+ "fast",
+ "fast.not"
+};
+
+/*
+ * Verify that we get the same results whether we look at text with contains(),
+ * span() or spanBack(), using unfrozen or frozen versions of the set,
+ * and using the set or its complement (switching the spanConditions accordingly).
+ * The latter verifies that
+ * set.span(spanCondition) == set.complement().span(!spanCondition).
+ *
+ * The expectLimits[] are either provided by the caller (with expectCount>=0)
+ * or returned to the caller (with an input expectCount<0).
+ */
+void UnicodeSetTest::testSpan(const UnicodeSetWithStrings *sets[4],
+ const void *s, int32_t length, UBool isUTF16,
+ uint32_t whichSpans,
+ int32_t expectLimits[], int32_t &expectCount,
+ const char *testName, int32_t index) {
+ int32_t limits[500];
+ int32_t limitsCount;
+ int i, j;
+
+ const char *typeName;
+ int type;
+
+ for(i=0; i<SET_COUNT; ++i) {
+ if((i&1)==0) {
+ // Even-numbered sets are original, uncomplemented sets.
+ if((whichSpans&SPAN_SET)==0) {
+ continue;
+ }
+ } else {
+ // Odd-numbered sets are complemented.
+ if((whichSpans&SPAN_COMPLEMENT)==0) {
+ continue;
+ }
+ }
+ for(type=0;; ++type) {
+ limitsCount=getSpans(*sets[i], (UBool)(i&1),
+ s, length, isUTF16,
+ whichSpans,
+ type, typeName,
+ limits, LENGTHOF(limits), expectCount);
+ if(typeName[0]==0) {
+ break; // All types tried.
+ }
+ if(limitsCount<0) {
+ continue; // Span option filtered out.
+ }
+ if(expectCount<0) {
+ expectCount=limitsCount;
+ if(limitsCount>LENGTHOF(limits)) {
+ errln("FAIL: %s[0x%lx].%s.%s span count=%ld > %ld capacity - too many spans",
+ testName, (long)index, setNames[i], typeName, (long)limitsCount, (long)LENGTHOF(limits));
+ return;
+ }
+ memcpy(expectLimits, limits, limitsCount*4);
+ } else if(limitsCount!=expectCount) {
+ errln("FAIL: %s[0x%lx].%s.%s span count=%ld != %ld",
+ testName, (long)index, setNames[i], typeName, (long)limitsCount, (long)expectCount);
+ } else {
+ for(j=0; j<limitsCount; ++j) {
+ if(limits[j]!=expectLimits[j]) {
+ errln("FAIL: %s[0x%lx].%s.%s span count=%ld limits[%d]=%ld != %ld",
+ testName, (long)index, setNames[i], typeName, (long)limitsCount,
+ j, (long)limits[j], (long)expectLimits[j]);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compare span() with containsAll()/containsNone(),
+ // but only if we have expectLimits[] from the uncomplemented set.
+ if(isUTF16 && (whichSpans&SPAN_SET)!=0) {
+ const UChar *s16=(const UChar *)s;
+ UnicodeString string;
+ int32_t prev=0, limit, length;
+ for(i=0; i<expectCount; ++i) {
+ limit=expectLimits[i];
+ length=limit-prev;
+ if(length>0) {
+ string.setTo(FALSE, s16+prev, length); // read-only alias
+ if(i&1) {
+ if(!sets[SLOW]->getSet().containsAll(string)) {
+ errln("FAIL: %s[0x%lx].%s.containsAll(%ld..%ld)==FALSE contradicts span()",
+ testName, (long)index, setNames[SLOW], (long)prev, (long)limit);
+ return;
+ }
+ if(!sets[FAST]->getSet().containsAll(string)) {
+ errln("FAIL: %s[0x%lx].%s.containsAll(%ld..%ld)==FALSE contradicts span()",
+ testName, (long)index, setNames[FAST], (long)prev, (long)limit);
+ return;
+ }
+ } else {
+ if(!sets[SLOW]->getSet().containsNone(string)) {
+ errln("FAIL: %s[0x%lx].%s.containsNone(%ld..%ld)==FALSE contradicts span()",
+ testName, (long)index, setNames[SLOW], (long)prev, (long)limit);
+ return;
+ }
+ if(!sets[FAST]->getSet().containsNone(string)) {
+ errln("FAIL: %s[0x%lx].%s.containsNone(%ld..%ld)==FALSE contradicts span()",
+ testName, (long)index, setNames[FAST], (long)prev, (long)limit);
+ return;
+ }
+ }
+ }
+ prev=limit;
+ }
+ }
+}
+
+// Specifically test either UTF-16 or UTF-8.
+void UnicodeSetTest::testSpan(const UnicodeSetWithStrings *sets[4],
+ const void *s, int32_t length, UBool isUTF16,
+ uint32_t whichSpans,
+ const char *testName, int32_t index) {
+ int32_t expectLimits[500];
+ int32_t expectCount=-1;
+ testSpan(sets, s, length, isUTF16, whichSpans, expectLimits, expectCount, testName, index);
+}
+
+UBool stringContainsUnpairedSurrogate(const UChar *s, int32_t length) {
+ UChar c, c2;
+
+ if(length>=0) {
+ while(length>0) {
+ c=*s++;
+ --length;
+ if(0xd800<=c && c<0xe000) {
+ if(c>=0xdc00 || length==0 || !U16_IS_TRAIL(c2=*s++)) {
+ return TRUE;
+ }
+ --length;
+ }
+ }
+ } else {
+ while((c=*s++)!=0) {
+ if(0xd800<=c && c<0xe000) {
+ if(c>=0xdc00 || !U16_IS_TRAIL(c2=*s++)) {
+ return TRUE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+// Test both UTF-16 and UTF-8 versions of span() etc. on the same sets and text,
+// unless either UTF is turned off in whichSpans.
+// Testing UTF-16 and UTF-8 together requires that surrogate code points
+// have the same contains(c) value as U+FFFD.
+void UnicodeSetTest::testSpanBothUTFs(const UnicodeSetWithStrings *sets[4],
+ const UChar *s16, int32_t length16,
+ uint32_t whichSpans,
+ const char *testName, int32_t index) {
+ int32_t expectLimits[500];
+ int32_t expectCount;
+
+ expectCount=-1; // Get expectLimits[] from testSpan().
+
+ if((whichSpans&SPAN_UTF16)!=0) {
+ testSpan(sets, s16, length16, TRUE, whichSpans, expectLimits, expectCount, testName, index);
+ }
+ if((whichSpans&SPAN_UTF8)==0) {
+ return;
+ }
+
+ // Convert s16[] and expectLimits[] to UTF-8.
+ uint8_t s8[3000];
+ int32_t offsets[3000];
+
+ const UChar *s16Limit=s16+length16;
+ char *t=(char *)s8;
+ char *tLimit=t+sizeof(s8);
+ int32_t *o=offsets;
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ // Convert with substitution: Turn unpaired surrogates into U+FFFD.
+ ucnv_fromUnicode(openUTF8Converter(), &t, tLimit, &s16, s16Limit, o, TRUE, &errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("FAIL: %s[0x%lx] ucnv_fromUnicode(to UTF-8) fails with %s",
+ testName, (long)index, u_errorName(errorCode));
+ ucnv_resetFromUnicode(utf8Cnv);
+ return;
+ }
+ int32_t length8=(int32_t)(t-(char *)s8);
+
+ // Convert expectLimits[].
+ int32_t i, j, expect;
+ for(i=j=0; i<expectCount; ++i) {
+ expect=expectLimits[i];
+ if(expect==length16) {
+ expectLimits[i]=length8;
+ } else {
+ while(offsets[j]<expect) {
+ ++j;
+ }
+ expectLimits[i]=j;
+ }
+ }
+
+ testSpan(sets, s8, length8, FALSE, whichSpans, expectLimits, expectCount, testName, index);
+}
+
+static UChar32 nextCodePoint(UChar32 c) {
+ // Skip some large and boring ranges.
+ switch(c) {
+ case 0x3441:
+ return 0x4d7f;
+ case 0x5100:
+ return 0x9f00;
+ case 0xb040:
+ return 0xd780;
+ case 0xe041:
+ return 0xf8fe;
+ case 0x10100:
+ return 0x20000;
+ case 0x20041:
+ return 0xe0000;
+ case 0xe0101:
+ return 0x10fffd;
+ default:
+ return c+1;
+ }
+}
+
+// Verify that all implementations represent the same set.
+void UnicodeSetTest::testSpanContents(const UnicodeSetWithStrings *sets[4], uint32_t whichSpans, const char *testName) {
+ // contains(U+FFFD) is inconsistent with contains(some surrogates),
+ // or the set contains strings with unpaired surrogates which don't translate to valid UTF-8:
+ // Skip the UTF-8 part of the test - if the string contains surrogates -
+ // because it is likely to produce a different result.
+ UBool inconsistentSurrogates=
+ (!(sets[0]->getSet().contains(0xfffd) ?
+ sets[0]->getSet().contains(0xd800, 0xdfff) :
+ sets[0]->getSet().containsNone(0xd800, 0xdfff)) ||
+ sets[0]->hasStringsWithSurrogates());
+
+ UChar s[1000];
+ int32_t length=0;
+ uint32_t localWhichSpans;
+
+ UChar32 c, first;
+ for(first=c=0;; c=nextCodePoint(c)) {
+ if(c>0x10ffff || length>(LENGTHOF(s)-U16_MAX_LENGTH)) {
+ localWhichSpans=whichSpans;
+ if(stringContainsUnpairedSurrogate(s, length) && inconsistentSurrogates) {
+ localWhichSpans&=~SPAN_UTF8;
+ }
+ testSpanBothUTFs(sets, s, length, localWhichSpans, testName, first);
+ if(c>0x10ffff) {
+ break;
+ }
+ length=0;
+ first=c;
+ }
+ U16_APPEND_UNSAFE(s, length, c);
+ }
+}
+
+// Test with a particular, interesting string.
+// Specify length and try NUL-termination.
+void UnicodeSetTest::testSpanUTF16String(const UnicodeSetWithStrings *sets[4], uint32_t whichSpans, const char *testName) {
+ static const UChar s[]={
+ 0x61, 0x62, 0x20, // Latin, space
+ 0x3b1, 0x3b2, 0x3b3, // Greek
+ 0xd900, // lead surrogate
+ 0x3000, 0x30ab, 0x30ad, // wide space, Katakana
+ 0xdc05, // trail surrogate
+ 0xa0, 0xac00, 0xd7a3, // nbsp, Hangul
+ 0xd900, 0xdc05, // unassigned supplementary
+ 0xd840, 0xdfff, 0xd860, 0xdffe, // Han supplementary
+ 0xd7a4, 0xdc05, 0xd900, 0x2028, // unassigned, surrogates in wrong order, LS
+ 0 // NUL
+ };
+
+ if((whichSpans&SPAN_UTF16)==0) {
+ return;
+ }
+ testSpan(sets, s, -1, TRUE, (whichSpans&~SPAN_UTF8), testName, 0);
+ testSpan(sets, s, LENGTHOF(s)-1, TRUE, (whichSpans&~SPAN_UTF8), testName, 1);
+}
+
+void UnicodeSetTest::testSpanUTF8String(const UnicodeSetWithStrings *sets[4], uint32_t whichSpans, const char *testName) {
+ static const char s[]={
+ "abc" // Latin
+
+ /* trail byte in lead position */
+ "\x80"
+
+ " " // space
+
+ /* truncated multi-byte sequences */
+ "\xd0"
+ "\xe0"
+ "\xe1"
+ "\xed"
+ "\xee"
+ "\xf0"
+ "\xf1"
+ "\xf4"
+ "\xf8"
+ "\xfc"
+
+ "\xCE\xB1\xCE\xB2\xCE\xB3" // Greek
+
+ /* trail byte in lead position */
+ "\x80"
+
+ "\xe0\x80"
+ "\xe0\xa0"
+ "\xe1\x80"
+ "\xed\x80"
+ "\xed\xa0"
+ "\xee\x80"
+ "\xf0\x80"
+ "\xf0\x90"
+ "\xf1\x80"
+ "\xf4\x80"
+ "\xf4\x90"
+ "\xf8\x80"
+ "\xfc\x80"
+
+ "\xE3\x80\x80\xE3\x82\xAB\xE3\x82\xAD" // wide space, Katakana
+
+ /* trail byte in lead position */
+ "\x80"
+
+ "\xf0\x80\x80"
+ "\xf0\x90\x80"
+ "\xf1\x80\x80"
+ "\xf4\x80\x80"
+ "\xf4\x90\x80"
+ "\xf8\x80\x80"
+ "\xfc\x80\x80"
+
+ "\xC2\xA0\xEA\xB0\x80\xED\x9E\xA3" // nbsp, Hangul
+
+ /* trail byte in lead position */
+ "\x80"
+
+ "\xf8\x80\x80\x80"
+ "\xfc\x80\x80\x80"
+
+ "\xF1\x90\x80\x85" // unassigned supplementary
+
+ /* trail byte in lead position */
+ "\x80"
+
+ "\xfc\x80\x80\x80\x80"
+
+ "\xF0\xA0\x8F\xBF\xF0\xA8\x8F\xBE" // Han supplementary
+
+ /* trail byte in lead position */
+ "\x80"
+
+ /* complete sequences but non-shortest forms or out of range etc. */
+ "\xc0\x80"
+ "\xe0\x80\x80"
+ "\xed\xa0\x80"
+ "\xf0\x80\x80\x80"
+ "\xf4\x90\x80\x80"
+ "\xf8\x80\x80\x80\x80"
+ "\xfc\x80\x80\x80\x80\x80"
+ "\xfe"
+ "\xff"
+
+ /* trail byte in lead position */
+ "\x80"
+
+ "\xED\x9E\xA4\xE2\x80\xA8" // unassigned, LS, NUL-terminated
+ };
+
+ if((whichSpans&SPAN_UTF8)==0) {
+ return;
+ }
+ testSpan(sets, s, -1, FALSE, (whichSpans&~SPAN_UTF16), testName, 0);
+ testSpan(sets, s, LENGTHOF(s)-1, FALSE, (whichSpans&~SPAN_UTF16), testName, 1);
+}
+
+// Take a set of span options and multiply them so that
+// each portion only has one of the options a, b and c.
+// If b==0, then the set of options is just modified with mask and a.
+// If b!=0 and c==0, then the set of options is just modified with mask, a and b.
+static int32_t
+addAlternative(uint32_t whichSpans[], int32_t whichSpansCount,
+ uint32_t mask, uint32_t a, uint32_t b, uint32_t c) {
+ uint32_t s;
+ int32_t i;
+
+ for(i=0; i<whichSpansCount; ++i) {
+ s=whichSpans[i]&mask;
+ whichSpans[i]=s|a;
+ if(b!=0) {
+ whichSpans[whichSpansCount+i]=s|b;
+ if(c!=0) {
+ whichSpans[2*whichSpansCount+i]=s|c;
+ }
+ }
+ }
+ return b==0 ? whichSpansCount : c==0 ? 2*whichSpansCount : 3*whichSpansCount;
+}
+
+#define _63_a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+#define _64_a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+#define _63_b "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
+#define _64_b "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
+
+void UnicodeSetTest::TestSpan() {
+ // "[...]" is a UnicodeSet pattern.
+ // "*" performs tests on all Unicode code points and on a selection of
+ // malformed UTF-8/16 strings.
+ // "-options" limits the scope of testing for the current set.
+ // By default, the test verifies that equivalent boundaries are found
+ // for UTF-16 and UTF-8, going forward and backward,
+ // alternating USET_SPAN_NOT_CONTAINED with
+ // either USET_SPAN_CONTAINED or USET_SPAN_SIMPLE.
+ // Single-character options:
+ // 8 -- UTF-16 and UTF-8 boundaries may differ.
+ // Cause: contains(U+FFFD) is inconsistent with contains(some surrogates),
+ // or the set contains strings with unpaired surrogates
+ // which do not translate to valid UTF-8.
+ // c -- set.span() and set.complement().span() boundaries may differ.
+ // Cause: Set strings are not complemented.
+ // b -- span() and spanBack() boundaries may differ.
+ // Cause: Strings in the set overlap, and spanBack(USET_SPAN_CONTAINED)
+ // and spanBack(USET_SPAN_SIMPLE) are defined to
+ // match with non-overlapping substrings.
+ // For example, with a set containing "ab" and "ba",
+ // span() of "aba" yields boundaries { 0, 2, 3 }
+ // because the initial "ab" matches from 0 to 2,
+ // while spanBack() yields boundaries { 0, 1, 3 }
+ // because the final "ba" matches from 1 to 3.
+ // l -- USET_SPAN_CONTAINED and USET_SPAN_SIMPLE boundaries may differ.
+ // Cause: Strings in the set overlap, and a longer match may
+ // require a sequence including non-longest substrings.
+ // For example, with a set containing "ab", "abc" and "cd",
+ // span(contained) of "abcd" spans the entire string
+ // but span(longest match) only spans the first 3 characters.
+ // Each "-options" first resets all options and then applies the specified options.
+ // A "-" without options resets the options.
+ // The options are also reset for each new set.
+ // Other strings will be spanned.
+ static const char *const testdata[]={
+ "[:ID_Continue:]",
+ "*",
+ "[:White_Space:]",
+ "*",
+ "[]",
+ "*",
+ "[\\u0000-\\U0010FFFF]",
+ "*",
+ "[\\u0000\\u0080\\u0800\\U00010000]",
+ "*",
+ "[\\u007F\\u07FF\\uFFFF\\U0010FFFF]",
+ "*",
+ "[[[:ID_Continue:]-[\\u30ab\\u30ad]]{\\u3000\\u30ab}{\\u3000\\u30ab\\u30ad}]",
+ "-c",
+ "*",
+ "[[[:ID_Continue:]-[\\u30ab\\u30ad]]{\\u30ab\\u30ad}{\\u3000\\u30ab\\u30ad}]",
+ "-c",
+ "*",
+
+ // Overlapping strings cause overlapping attempts to match.
+ "[x{xy}{xya}{axy}{ax}]",
+ "-cl",
+
+ // More repetitions of "xya" would take too long with the recursive
+ // reference implementation.
+ // containsAll()=FALSE
+ // test_string 0x14
+ "xx"
+ "xyaxyaxyaxya" // set.complement().span(longest match) will stop here.
+ "xx" // set.complement().span(contained) will stop between the two 'x'es.
+ "xyaxyaxyaxya"
+ "xx"
+ "xyaxyaxyaxya" // span() ends here.
+ "aaa",
+
+ // containsAll()=TRUE
+ // test_string 0x15
+ "xx"
+ "xyaxyaxyaxya"
+ "xx"
+ "xyaxyaxyaxya"
+ "xx"
+ "xyaxyaxyaxy",
+
+ "-bc",
+ // test_string 0x17
+ "byayaxya", // span() -> { 4, 7, 8 } spanBack() -> { 5, 8 }
+ "-c",
+ "byayaxy", // span() -> { 4, 7 } complement.span() -> { 7 }
+ "byayax", // span() -> { 4, 6 } complement.span() -> { 6 }
+ "-",
+ "byaya", // span() -> { 5 }
+ "byay", // span() -> { 4 }
+ "bya", // span() -> { 3 }
+
+ // span(longest match) will not span the whole string.
+ "[a{ab}{bc}]",
+ "-cl",
+ // test_string 0x21
+ "abc",
+
+ "[a{ab}{abc}{cd}]",
+ "-cl",
+ "acdabcdabccd",
+
+ // spanBack(longest match) will not span the whole string.
+ "[c{ab}{bc}]",
+ "-cl",
+ "abc",
+
+ "[d{cd}{bcd}{ab}]",
+ "-cl",
+ "abbcdabcdabd",
+
+ // Test with non-ASCII set strings - test proper handling of surrogate pairs
+ // and UTF-8 trail bytes.
+ // Copies of above test sets and strings, but transliterated to have
+ // different code points with similar trail units.
+ // Previous: a b c d
+ // Unicode: 042B 30AB 200AB 204AB
+ // UTF-16: 042B 30AB D840 DCAB D841 DCAB
+ // UTF-8: D0 AB E3 82 AB F0 A0 82 AB F0 A0 92 AB
+ "[\\u042B{\\u042B\\u30AB}{\\u042B\\u30AB\\U000200AB}{\\U000200AB\\U000204AB}]",
+ "-cl",
+ "\\u042B\\U000200AB\\U000204AB\\u042B\\u30AB\\U000200AB\\U000204AB\\u042B\\u30AB\\U000200AB\\U000200AB\\U000204AB",
+
+ "[\\U000204AB{\\U000200AB\\U000204AB}{\\u30AB\\U000200AB\\U000204AB}{\\u042B\\u30AB}]",
+ "-cl",
+ "\\u042B\\u30AB\\u30AB\\U000200AB\\U000204AB\\u042B\\u30AB\\U000200AB\\U000204AB\\u042B\\u30AB\\U000204AB",
+
+ // Stress bookkeeping and recursion.
+ // The following strings are barely doable with the recursive
+ // reference implementation.
+ // The not-contained character at the end prevents an early exit from the span().
+ "[b{bb}]",
+ "-c",
+ // test_string 0x33
+ "bbbbbbbbbbbbbbbbbbbbbbbb-",
+ // On complement sets, span() and spanBack() get different results
+ // because b is not in the complement set and there is an odd number of b's
+ // in the test string.
+ "-bc",
+ "bbbbbbbbbbbbbbbbbbbbbbbbb-",
+
+ // Test with set strings with an initial or final code point span
+ // longer than 254.
+ "[a{" _64_a _64_a _64_a _64_a "b}"
+ "{a" _64_b _64_b _64_b _64_b "}]",
+ "-c",
+ _64_a _64_a _64_a _63_a "b",
+ _64_a _64_a _64_a _64_a "b",
+ _64_a _64_a _64_a _64_a "aaaabbbb",
+ "a" _64_b _64_b _64_b _63_b,
+ "a" _64_b _64_b _64_b _64_b,
+ "aaaabbbb" _64_b _64_b _64_b _64_b,
+
+ // Test with strings containing unpaired surrogates.
+ // They are not representable in UTF-8, and a leading trail surrogate
+ // and a trailing lead surrogate must not match in the middle of a proper surrogate pair.
+ // U+20001 == \\uD840\\uDC01
+ // U+20400 == \\uD841\\uDC00
+ "[a\\U00020001\\U00020400{ab}{b\\uD840}{\\uDC00a}]",
+ "-8cl",
+ "aaab\\U00020001ba\\U00020400aba\\uD840ab\\uD840\\U00020000b\\U00020000a\\U00020000\\uDC00a\\uDC00babbb"
+ };
+ uint32_t whichSpans[96]={ SPAN_ALL };
+ int32_t whichSpansCount=1;
+
+ UnicodeSet *sets[SET_COUNT]={ NULL };
+ const UnicodeSetWithStrings *sets_with_str[SET_COUNT]={ NULL };
+
+ char testName[1024];
+ char *testNameLimit=testName;
+
+ int32_t i, j;
+ for(i=0; i<LENGTHOF(testdata); ++i) {
+ const char *s=testdata[i];
+ if(s[0]=='[') {
+ // Create new test sets from this pattern.
+ for(j=0; j<SET_COUNT; ++j) {
+ delete sets_with_str[j];
+ delete sets[j];
+ }
+ UErrorCode errorCode=U_ZERO_ERROR;
+ sets[SLOW]=new UnicodeSet(UnicodeString(s, -1, US_INV).unescape(), errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("FAIL: Unable to create UnicodeSet(%s) - %s", s, u_errorName(errorCode));
+ break;
+ }
+ sets[SLOW_NOT]=new UnicodeSet(*sets[SLOW]);
+ sets[SLOW_NOT]->complement();
+ // Intermediate set: Test cloning of a frozen set.
+ UnicodeSet *fast=new UnicodeSet(*sets[SLOW]);
+ fast->freeze();
+ sets[FAST]=(UnicodeSet *)fast->clone();
+ delete fast;
+ UnicodeSet *fastNot=new UnicodeSet(*sets[SLOW_NOT]);
+ fastNot->freeze();
+ sets[FAST_NOT]=(UnicodeSet *)fastNot->clone();
+ delete fastNot;
+
+ for(j=0; j<SET_COUNT; ++j) {
+ sets_with_str[j]=new UnicodeSetWithStrings(*sets[j]);
+ }
+
+ strcpy(testName, s);
+ testNameLimit=strchr(testName, 0);
+ *testNameLimit++=':';
+ *testNameLimit=0;
+
+ whichSpans[0]=SPAN_ALL;
+ whichSpansCount=1;
+ } else if(s[0]=='-') {
+ whichSpans[0]=SPAN_ALL;
+ whichSpansCount=1;
+
+ while(*++s!=0) {
+ switch(*s) {
+ case 'c':
+ whichSpansCount=addAlternative(whichSpans, whichSpansCount,
+ ~SPAN_POLARITY,
+ SPAN_SET,
+ SPAN_COMPLEMENT,
+ 0);
+ break;
+ case 'b':
+ whichSpansCount=addAlternative(whichSpans, whichSpansCount,
+ ~SPAN_DIRS,
+ SPAN_FWD,
+ SPAN_BACK,
+ 0);
+ break;
+ case 'l':
+ // test USET_SPAN_CONTAINED FWD & BACK, and separately
+ // USET_SPAN_SIMPLE only FWD, and separately
+ // USET_SPAN_SIMPLE only BACK
+ whichSpansCount=addAlternative(whichSpans, whichSpansCount,
+ ~(SPAN_DIRS|SPAN_CONDITION),
+ SPAN_DIRS|SPAN_CONTAINED,
+ SPAN_FWD|SPAN_SIMPLE,
+ SPAN_BACK|SPAN_SIMPLE);
+ break;
+ case '8':
+ whichSpansCount=addAlternative(whichSpans, whichSpansCount,
+ ~SPAN_UTFS,
+ SPAN_UTF16,
+ SPAN_UTF8,
+ 0);
+ break;
+ default:
+ errln("FAIL: unrecognized span set option in \"%s\"", testdata[i]);
+ break;
+ }
+ }
+ } else if(0==strcmp(s, "*")) {
+ strcpy(testNameLimit, "bad_string");
+ for(j=0; j<whichSpansCount; ++j) {
+ if(whichSpansCount>1) {
+ sprintf(testNameLimit+10 /* strlen("bad_string") */,
+ "%%0x%3x",
+ whichSpans[j]);
+ }
+ testSpanUTF16String(sets_with_str, whichSpans[j], testName);
+ testSpanUTF8String(sets_with_str, whichSpans[j], testName);
+ }
+
+ strcpy(testNameLimit, "contents");
+ for(j=0; j<whichSpansCount; ++j) {
+ if(whichSpansCount>1) {
+ sprintf(testNameLimit+8 /* strlen("contents") */,
+ "%%0x%3x",
+ whichSpans[j]);
+ }
+ testSpanContents(sets_with_str, whichSpans[j], testName);
+ }
+ } else {
+ UnicodeString string=UnicodeString(s, -1, US_INV).unescape();
+ strcpy(testNameLimit, "test_string");
+ for(j=0; j<whichSpansCount; ++j) {
+ if(whichSpansCount>1) {
+ sprintf(testNameLimit+11 /* strlen("test_string") */,
+ "%%0x%3x",
+ whichSpans[j]);
+ }
+ testSpanBothUTFs(sets_with_str, string.getBuffer(), string.length(), whichSpans[j], testName, i);
+ }
+ }
+ }
+ for(j=0; j<SET_COUNT; ++j) {
+ delete sets_with_str[j];
+ delete sets[j];
+ }
+}
+
+// Test select patterns and strings, and test USET_SPAN_SIMPLE.
+void UnicodeSetTest::TestStringSpan() {
+ static const char *pattern="[x{xy}{xya}{axy}{ax}]";
+ static const char *const string=
+ "xx"
+ "xyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxya"
+ "xx"
+ "xyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxya"
+ "xx"
+ "xyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxyaxy"
+ "aaaa";
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UnicodeString pattern16=UnicodeString(pattern, -1, US_INV);
+ UnicodeSet set(pattern16, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("FAIL: Unable to create UnicodeSet(%s) - %s", pattern, u_errorName(errorCode));
+ return;
+ }
+
+ UnicodeString string16=UnicodeString(string, -1, US_INV).unescape();
+
+ if(set.containsAll(string16)) {
+ errln("FAIL: UnicodeSet(%s).containsAll(%s) should be FALSE", pattern, string);
+ }
+
+ // Remove trailing "aaaa".
+ string16.truncate(string16.length()-4);
+ if(!set.containsAll(string16)) {
+ errln("FAIL: UnicodeSet(%s).containsAll(%s[:-4]) should be TRUE", pattern, string);
+ }
+
+ string16=UNICODE_STRING_SIMPLE("byayaxya");
+ const UChar *s16=string16.getBuffer();
+ int32_t length16=string16.length();
+ if( set.span(s16, 8, USET_SPAN_NOT_CONTAINED)!=4 ||
+ set.span(s16, 7, USET_SPAN_NOT_CONTAINED)!=4 ||
+ set.span(s16, 6, USET_SPAN_NOT_CONTAINED)!=4 ||
+ set.span(s16, 5, USET_SPAN_NOT_CONTAINED)!=5 ||
+ set.span(s16, 4, USET_SPAN_NOT_CONTAINED)!=4 ||
+ set.span(s16, 3, USET_SPAN_NOT_CONTAINED)!=3
+ ) {
+ errln("FAIL: UnicodeSet(%s).span(while not) returns the wrong value", pattern);
+ }
+
+ pattern="[a{ab}{abc}{cd}]";
+ pattern16=UnicodeString(pattern, -1, US_INV);
+ set.applyPattern(pattern16, errorCode);
+ if(U_FAILURE(errorCode)) {
+ errln("FAIL: Unable to create UnicodeSet(%s) - %s", pattern, u_errorName(errorCode));
+ return;
+ }
+ string16=UNICODE_STRING_SIMPLE("acdabcdabccd");
+ s16=string16.getBuffer();
+ length16=string16.length();
+ if( set.span(s16, 12, USET_SPAN_CONTAINED)!=12 ||
+ set.span(s16, 12, USET_SPAN_SIMPLE)!=6 ||
+ set.span(s16+7, 5, USET_SPAN_SIMPLE)!=5
+ ) {
+ errln("FAIL: UnicodeSet(%s).span(while longest match) returns the wrong value", pattern);
+ }
+
+ pattern="[d{cd}{bcd}{ab}]";
+ pattern16=UnicodeString(pattern, -1, US_INV);
+ set.applyPattern(pattern16, errorCode).freeze();
+ if(U_FAILURE(errorCode)) {
+ errln("FAIL: Unable to create UnicodeSet(%s) - %s", pattern, u_errorName(errorCode));
+ return;
+ }
+ string16=UNICODE_STRING_SIMPLE("abbcdabcdabd");
+ s16=string16.getBuffer();
+ length16=string16.length();
+ if( set.spanBack(s16, 12, USET_SPAN_CONTAINED)!=0 ||
+ set.spanBack(s16, 12, USET_SPAN_SIMPLE)!=6 ||
+ set.spanBack(s16, 5, USET_SPAN_SIMPLE)!=0
+ ) {
+ errln("FAIL: UnicodeSet(%s).spanBack(while longest match) returns the wrong value", pattern);
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/usettest.h b/Build/source/libs/icu/icu-xetex/test/intltest/usettest.h
new file mode 100644
index 00000000000..94083406764
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/usettest.h
@@ -0,0 +1,190 @@
+
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************
+**********************************************************************
+* Date Name Description
+* 10/20/99 alan Creation.
+* 03/22/2000 Madhu Added additional tests
+**********************************************************************
+*/
+
+#ifndef _TESTUNISET
+#define _TESTUNISET
+
+#include "unicode/unistr.h"
+#include "unicode/uniset.h"
+#include "unicode/ucnv_err.h"
+#include "intltest.h"
+
+class UnicodeSetWithStrings;
+
+/**
+ * UnicodeSet test
+ */
+class UnicodeSetTest: public IntlTest {
+public:
+ UnicodeSetTest();
+ ~UnicodeSetTest();
+
+private:
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+
+ void Testj2268();
+
+ /**
+ * Test that toPattern() round trips with syntax characters and
+ * whitespace.
+ */
+ void TestToPattern();
+
+ void TestPatterns(void);
+ void TestCategories(void);
+ void TestAddRemove(void);
+ void TestCloneEqualHash(void);
+
+ /**
+ * Make sure minimal representation is maintained.
+ */
+ void TestMinimalRep(void);
+
+ void TestAPI(void);
+
+ void TestIteration(void);
+
+ void TestStrings(void);
+
+ void TestScriptSet(void);
+
+ /**
+ * Test the [:Latin:] syntax.
+ */
+ void TestPropertySet(void);
+
+ void TestClone(void);
+
+ void TestIndexOf(void);
+
+ void TestExhaustive(void);
+
+ void TestCloseOver(void);
+
+ void TestEscapePattern(void);
+
+ void TestInvalidCodePoint(void);
+
+ void TestSymbolTable(void);
+
+ void TestSurrogate();
+
+ void TestPosixClasses();
+
+ void TestFreezable();
+
+ void TestSpan();
+
+ void TestStringSpan();
+
+private:
+
+ UBool toPatternAux(UChar32 start, UChar32 end);
+
+ UBool checkPat(const UnicodeString& source,
+ const UnicodeSet& testSet);
+
+ UBool checkPat(const UnicodeString& source, const UnicodeSet& testSet, const UnicodeString& pat);
+
+ void _testComplement(int32_t a, UnicodeSet&, UnicodeSet&);
+
+ void _testAdd(int32_t a, int32_t b, UnicodeSet&, UnicodeSet&, UnicodeSet&);
+
+ void _testRetain(int32_t a, int32_t b, UnicodeSet&, UnicodeSet&, UnicodeSet&);
+
+ void _testRemove(int32_t a, int32_t b, UnicodeSet&, UnicodeSet&, UnicodeSet&);
+
+ void _testXor(int32_t a, int32_t b, UnicodeSet&, UnicodeSet&, UnicodeSet&);
+
+ /**
+ * Check that ranges are monotonically increasing and non-
+ * overlapping.
+ */
+ void checkCanonicalRep(const UnicodeSet& set, const UnicodeString& msg);
+
+ /**
+ * Convert a bitmask to a UnicodeSet.
+ */
+ static UnicodeSet& bitsToSet(int32_t a, UnicodeSet&);
+
+ /**
+ * Convert a UnicodeSet to a bitmask. Only the characters
+ * U+0000 to U+0020 are represented in the bitmask.
+ */
+ static int32_t setToBits(const UnicodeSet& x);
+
+ /**
+ * Return the representation of an inversion list based UnicodeSet
+ * as a pairs list. Ranges are listed in ascending Unicode order.
+ * For example, the set [a-zA-M3] is represented as "33AMaz".
+ */
+ static UnicodeString getPairs(const UnicodeSet& set);
+
+ /**
+ * Basic consistency check for a few items.
+ * That the iterator works, and that we can create a pattern and
+ * get the same thing back
+ */
+ void checkRoundTrip(const UnicodeSet& s);
+
+ void copyWithIterator(UnicodeSet& t, const UnicodeSet& s, UBool withRange);
+
+ UBool checkEqual(const UnicodeSet& s, const UnicodeSet& t, const char* message);
+
+ void expectContainment(const UnicodeString& pat,
+ const UnicodeString& charsIn,
+ const UnicodeString& charsOut);
+ void expectContainment(const UnicodeSet& set,
+ const UnicodeString& charsIn,
+ const UnicodeString& charsOut);
+ void expectContainment(const UnicodeSet& set,
+ const UnicodeString& setName,
+ const UnicodeString& charsIn,
+ const UnicodeString& charsOut);
+ void expectPattern(UnicodeSet& set,
+ const UnicodeString& pattern,
+ const UnicodeString& expectedPairs);
+ void expectPairs(const UnicodeSet& set,
+ const UnicodeString& expectedPairs);
+ void expectToPattern(const UnicodeSet& set,
+ const UnicodeString& expPat,
+ const char** expStrings);
+ void expectRange(const UnicodeString& label,
+ const UnicodeSet& set,
+ UChar32 start, UChar32 end);
+ void doAssert(UBool, const char*);
+
+ void testSpan(const UnicodeSetWithStrings *sets[4], const void *s, int32_t length, UBool isUTF16,
+ uint32_t whichSpans,
+ int32_t expectLimits[], int32_t &expectCount,
+ const char *testName, int32_t index);
+ void testSpan(const UnicodeSetWithStrings *sets[4], const void *s, int32_t length, UBool isUTF16,
+ uint32_t whichSpans,
+ const char *testName, int32_t index);
+ void testSpanBothUTFs(const UnicodeSetWithStrings *sets[4],
+ const UChar *s16, int32_t length16,
+ uint32_t whichSpans,
+ const char *testName, int32_t index);
+ void testSpanContents(const UnicodeSetWithStrings *sets[4], uint32_t whichSpans, const char *testName);
+ void testSpanUTF16String(const UnicodeSetWithStrings *sets[4], uint32_t whichSpans, const char *testName);
+ void testSpanUTF8String(const UnicodeSetWithStrings *sets[4], uint32_t whichSpans, const char *testName);
+
+ UConverter *openUTF8Converter();
+
+ UConverter *utf8Cnv;
+
+public:
+ static UnicodeString escape(const UnicodeString& s);
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.cpp
new file mode 100644
index 00000000000..5b50fbaf48e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.cpp
@@ -0,0 +1,1703 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#include "ustrtest.h"
+#include "unicode/unistr.h"
+#include "unicode/uchar.h"
+#include "unicode/ustring.h"
+#include "unicode/locid.h"
+#include "unicode/ucnv.h"
+#include "cmemory.h"
+#include "charstr.h"
+
+#if 0
+#include "unicode/ustream.h"
+
+#if U_IOSTREAM_SOURCE >= 199711
+#include <iostream>
+using namespace std;
+#elif U_IOSTREAM_SOURCE >= 198506
+#include <iostream.h>
+#endif
+
+#endif
+
+#define LENGTHOF(array) (int32_t)((sizeof(array)/sizeof((array)[0])))
+
+UnicodeStringTest::~UnicodeStringTest() {}
+
+void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char *par)
+{
+ if (exec) logln("TestSuite UnicodeStringTest: ");
+ switch (index) {
+ case 0:
+ name = "StringCaseTest";
+ if (exec) {
+ logln("StringCaseTest---"); logln("");
+ StringCaseTest test;
+ callTest(test, par);
+ }
+ break;
+ case 1: name = "TestBasicManipulation"; if (exec) TestBasicManipulation(); break;
+ case 2: name = "TestCompare"; if (exec) TestCompare(); break;
+ case 3: name = "TestExtract"; if (exec) TestExtract(); break;
+ case 4: name = "TestRemoveReplace"; if (exec) TestRemoveReplace(); break;
+ case 5: name = "TestSearching"; if (exec) TestSearching(); break;
+ case 6: name = "TestSpacePadding"; if (exec) TestSpacePadding(); break;
+ case 7: name = "TestPrefixAndSuffix"; if (exec) TestPrefixAndSuffix(); break;
+ case 8: name = "TestFindAndReplace"; if (exec) TestFindAndReplace(); break;
+ case 9: name = "TestBogus"; if (exec) TestBogus(); break;
+ case 10: name = "TestReverse"; if (exec) TestReverse(); break;
+ case 11: name = "TestMiscellaneous"; if (exec) TestMiscellaneous(); break;
+ case 12: name = "TestStackAllocation"; if (exec) TestStackAllocation(); break;
+ case 13: name = "TestUnescape"; if (exec) TestUnescape(); break;
+ case 14: name = "TestCountChar32"; if (exec) TestCountChar32(); break;
+ case 15: name = "TestStringEnumeration"; if (exec) TestStringEnumeration(); break;
+ case 16: name = "TestCharString"; if (exec) TestCharString(); break;
+ case 17: name = "TestNameSpace"; if (exec) TestNameSpace(); break;
+
+ default: name = ""; break; //needed to end loop
+ }
+}
+
+void
+UnicodeStringTest::TestBasicManipulation()
+{
+ UnicodeString test1("Now is the time for all men to come swiftly to the aid of the party.\n");
+ UnicodeString expectedValue;
+ UnicodeString *c;
+
+ c=(UnicodeString *)test1.clone();
+ test1.insert(24, "good ");
+ expectedValue = "Now is the time for all good men to come swiftly to the aid of the party.\n";
+ if (test1 != expectedValue)
+ errln("insert() failed: expected \"" + expectedValue + "\"\n,got \"" + test1 + "\"");
+
+ c->insert(24, "good ");
+ if(*c != expectedValue) {
+ errln("clone()->insert() failed: expected \"" + expectedValue + "\"\n,got \"" + *c + "\"");
+ }
+ delete c;
+
+ test1.remove(41, 8);
+ expectedValue = "Now is the time for all good men to come to the aid of the party.\n";
+ if (test1 != expectedValue)
+ errln("remove() failed: expected \"" + expectedValue + "\"\n,got \"" + test1 + "\"");
+
+ test1.replace(58, 6, "ir country");
+ expectedValue = "Now is the time for all good men to come to the aid of their country.\n";
+ if (test1 != expectedValue)
+ errln("replace() failed: expected \"" + expectedValue + "\"\n,got \"" + test1 + "\"");
+
+ UChar temp[80];
+ test1.extract(0, 15, temp);
+
+ UnicodeString test2(temp, 15);
+
+ expectedValue = "Now is the time";
+ if (test2 != expectedValue)
+ errln("extract() failed: expected \"" + expectedValue + "\"\n,got \"" + test2 + "\"");
+
+ test2 += " for me to go!\n";
+ expectedValue = "Now is the time for me to go!\n";
+ if (test2 != expectedValue)
+ errln("operator+=() failed: expected \"" + expectedValue + "\"\n,got \"" + test2 + "\"");
+
+ if (test1.length() != 70)
+ errln("length() failed: expected 70, got " + test1.length());
+ if (test2.length() != 30)
+ errln("length() failed: expected 30, got " + test2.length());
+
+ UnicodeString test3;
+ test3.append((UChar32)0x20402);
+ if(test3 != CharsToUnicodeString("\\uD841\\uDC02")){
+ errln((UnicodeString)"append failed for UChar32, expected \"\\\\ud841\\\\udc02\", got " + prettify(test3));
+ }
+ if(test3.length() != 2){
+ errln("append or length failed for UChar32, expected 2, got " + test3.length());
+ }
+ test3.append((UChar32)0x0074);
+ if(test3 != CharsToUnicodeString("\\uD841\\uDC02t")){
+ errln((UnicodeString)"append failed for UChar32, expected \"\\\\uD841\\\\uDC02t\", got " + prettify(test3));
+ }
+ if(test3.length() != 3){
+ errln((UnicodeString)"append or length failed for UChar32, expected 2, got " + test3.length());
+ }
+
+ // test some UChar32 overloads
+ if( test3.setTo((UChar32)0x10330).length() != 2 ||
+ test3.insert(0, (UChar32)0x20100).length() != 4 ||
+ test3.replace(2, 2, (UChar32)0xe0061).length() != 4 ||
+ (test3 = (UChar32)0x14001).length() != 2
+ ) {
+ errln((UnicodeString)"simple UChar32 overloads for replace, insert, setTo or = failed");
+ }
+
+ {
+ // test moveIndex32()
+ UnicodeString s=UNICODE_STRING("\\U0002f999\\U0001d15f\\u00c4\\u1ed0", 32).unescape();
+
+ if(
+ s.moveIndex32(2, -1)!=0 ||
+ s.moveIndex32(2, 1)!=4 ||
+ s.moveIndex32(2, 2)!=5 ||
+ s.moveIndex32(5, -2)!=2 ||
+ s.moveIndex32(0, -1)!=0 ||
+ s.moveIndex32(6, 1)!=6
+ ) {
+ errln("UnicodeString::moveIndex32() failed");
+ }
+
+ if(s.getChar32Start(1)!=0 || s.getChar32Start(2)!=2) {
+ errln("UnicodeString::getChar32Start() failed");
+ }
+
+ if(s.getChar32Limit(1)!=2 || s.getChar32Limit(2)!=2) {
+ errln("UnicodeString::getChar32Limit() failed");
+ }
+ }
+
+ {
+ // test new 2.2 constructors and setTo function that parallel Java's substring function.
+ UnicodeString src("Hello folks how are you?");
+ UnicodeString target1("how are you?");
+ if (target1 != UnicodeString(src, 12)) {
+ errln("UnicodeString(const UnicodeString&, int32_t) failed");
+ }
+ UnicodeString target2("folks");
+ if (target2 != UnicodeString(src, 6, 5)) {
+ errln("UnicodeString(const UnicodeString&, int32_t, int32_t) failed");
+ }
+ if (target1 != target2.setTo(src, 12)) {
+ errln("UnicodeString::setTo(const UnicodeString&, int32_t) failed");
+ }
+ }
+
+ {
+ // op+ is new in ICU 2.8
+ UnicodeString s=UnicodeString("abc", "")+UnicodeString("def", "")+UnicodeString("ghi", "");
+ if(s!=UnicodeString("abcdefghi", "")) {
+ errln("operator+(UniStr, UniStr) failed");
+ }
+ }
+
+ {
+ // tests for Jitterbug 2360
+ // verify that APIs with source pointer + length accept length == -1
+ // mostly test only where modified, only few functions did not already do this
+ if(UnicodeString("abc", -1, "")!=UnicodeString("abc", "")) {
+ errln("UnicodeString(codepageData, dataLength, codepage) does not work with dataLength==-1");
+ }
+
+ UChar buffer[10]={ 0x61, 0x62, 0x20ac, 0xd900, 0xdc05, 0, 0x62, 0xffff, 0xdbff, 0xdfff };
+ UnicodeString s, t(buffer, -1, LENGTHOF(buffer));
+
+ if(s.setTo(buffer, -1, LENGTHOF(buffer)).length()!=u_strlen(buffer)) {
+ errln("UnicodeString.setTo(buffer, length, capacity) does not work with length==-1");
+ }
+ if(t.length()!=u_strlen(buffer)) {
+ errln("UnicodeString(buffer, length, capacity) does not work with length==-1");
+ }
+
+ if(0!=s.caseCompare(buffer, -1, U_FOLD_CASE_DEFAULT)) {
+ errln("UnicodeString.caseCompare(const UChar *, length, options) does not work with length==-1");
+ }
+ if(0!=s.caseCompare(0, s.length(), buffer, U_FOLD_CASE_DEFAULT)) {
+ errln("UnicodeString.caseCompare(start, _length, const UChar *, options) does not work");
+ }
+
+ buffer[u_strlen(buffer)]=0xe4;
+ UnicodeString u(buffer, -1, LENGTHOF(buffer));
+ if(s.setTo(buffer, -1, LENGTHOF(buffer)).length()!=LENGTHOF(buffer)) {
+ errln("UnicodeString.setTo(buffer without NUL, length, capacity) does not work with length==-1");
+ }
+ if(u.length()!=LENGTHOF(buffer)) {
+ errln("UnicodeString(buffer without NUL, length, capacity) does not work with length==-1");
+ }
+
+ static const char cs[]={ 0x61, (char)0xe4, (char)0x85, 0 };
+ UConverter *cnv;
+ UErrorCode errorCode=U_ZERO_ERROR;
+
+ cnv=ucnv_open("ISO-8859-1", &errorCode);
+ UnicodeString v(cs, -1, cnv, errorCode);
+ ucnv_close(cnv);
+ if(v!=UnicodeString("a\\xe4\\x85").unescape()) {
+ errln("UnicodeString(const char *, length, cnv, errorCode) does not work with length==-1");
+ }
+ }
+}
+
+void
+UnicodeStringTest::TestCompare()
+{
+ UnicodeString test1("this is a test");
+ UnicodeString test2("this is a test");
+ UnicodeString test3("this is a test of the emergency broadcast system");
+ UnicodeString test4("never say, \"this is a test\"!!");
+
+ UnicodeString test5((UChar)0x5000);
+ UnicodeString test6((UChar)0x5100);
+
+ UChar uniChars[] = { 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73,
+ 0x20, 0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0 };
+ char chars[] = "this is a test";
+
+ // test operator== and operator!=
+ if (test1 != test2 || test1 == test3 || test1 == test4)
+ errln("operator== or operator!= failed");
+
+ // test operator> and operator<
+ if (test1 > test2 || test1 < test2 || !(test1 < test3) || !(test1 > test4) ||
+ !(test5 < test6)
+ ) {
+ errln("operator> or operator< failed");
+ }
+
+ // test operator>= and operator<=
+ if (!(test1 >= test2) || !(test1 <= test2) || !(test1 <= test3) || !(test1 >= test4))
+ errln("operator>= or operator<= failed");
+
+ // test compare(UnicodeString)
+ if (test1.compare(test2) != 0 || test1.compare(test3) >= 0 || test1.compare(test4) <= 0)
+ errln("compare(UnicodeString) failed");
+
+ //test compare(offset, length, UnicodeString)
+ if(test1.compare(0, 14, test2) != 0 ||
+ test3.compare(0, 14, test2) != 0 ||
+ test4.compare(12, 14, test2) != 0 ||
+ test3.compare(0, 18, test1) <=0 )
+ errln("compare(offset, length, UnicodeString) failes");
+
+ // test compare(UChar*)
+ if (test2.compare(uniChars) != 0 || test3.compare(uniChars) <= 0 || test4.compare(uniChars) >= 0)
+ errln("compare(UChar*) failed");
+
+ // test compare(char*)
+ if (test2.compare(chars) != 0 || test3.compare(chars) <= 0 || test4.compare(chars) >= 0)
+ errln("compare(char*) failed");
+
+ // test compare(UChar*, length)
+ if (test1.compare(uniChars, 4) <= 0 || test1.compare(uniChars, 4) <= 0)
+ errln("compare(UChar*, length) failed");
+
+ // test compare(thisOffset, thisLength, that, thatOffset, thatLength)
+ if (test1.compare(0, 14, test2, 0, 14) != 0
+ || test1.compare(0, 14, test3, 0, 14) != 0
+ || test1.compare(0, 14, test4, 12, 14) != 0)
+ errln("1. compare(thisOffset, thisLength, that, thatOffset, thatLength) failed");
+
+ if (test1.compare(10, 4, test2, 0, 4) >= 0
+ || test1.compare(10, 4, test3, 22, 9) <= 0
+ || test1.compare(10, 4, test4, 22, 4) != 0)
+ errln("2. compare(thisOffset, thisLength, that, thatOffset, thatLength) failed");
+
+ // test compareBetween
+ if (test1.compareBetween(0, 14, test2, 0, 14) != 0 || test1.compareBetween(0, 14, test3, 0, 14) != 0
+ || test1.compareBetween(0, 14, test4, 12, 26) != 0)
+ errln("compareBetween failed");
+
+ if (test1.compareBetween(10, 14, test2, 0, 4) >= 0 || test1.compareBetween(10, 14, test3, 22, 31) <= 0
+ || test1.compareBetween(10, 14, test4, 22, 26) != 0)
+ errln("compareBetween failed");
+
+ // test compare() etc. with strings that share a buffer but are not equal
+ test2=test1; // share the buffer, length() too large for the stackBuffer
+ test2.truncate(1); // change only the length, not the buffer
+ if( test1==test2 || test1<=test2 ||
+ test1.compare(test2)<=0 ||
+ test1.compareCodePointOrder(test2)<=0 ||
+ test1.compareCodePointOrder(0, INT32_MAX, test2)<=0 ||
+ test1.compareCodePointOrder(0, INT32_MAX, test2, 0, INT32_MAX)<=0 ||
+ test1.compareCodePointOrderBetween(0, INT32_MAX, test2, 0, INT32_MAX)<=0 ||
+ test1.caseCompare(test2, U_FOLD_CASE_DEFAULT)<=0
+ ) {
+ errln("UnicodeStrings that share a buffer but have different lengths compare as equal");
+ }
+
+ /* test compareCodePointOrder() */
+ {
+ /* these strings are in ascending order */
+ static const UChar strings[][4]={
+ { 0x61, 0 }, /* U+0061 */
+ { 0x20ac, 0xd801, 0 }, /* U+20ac U+d801 */
+ { 0x20ac, 0xd800, 0xdc00, 0 }, /* U+20ac U+10000 */
+ { 0xd800, 0 }, /* U+d800 */
+ { 0xd800, 0xff61, 0 }, /* U+d800 U+ff61 */
+ { 0xdfff, 0 }, /* U+dfff */
+ { 0xff61, 0xdfff, 0 }, /* U+ff61 U+dfff */
+ { 0xff61, 0xd800, 0xdc02, 0 }, /* U+ff61 U+10002 */
+ { 0xd800, 0xdc02, 0 }, /* U+10002 */
+ { 0xd84d, 0xdc56, 0 } /* U+23456 */
+ };
+ UnicodeString u[20]; // must be at least as long as strings[]
+ int32_t i;
+
+ for(i=0; i<(int32_t)(sizeof(strings)/sizeof(strings[0])); ++i) {
+ u[i]=UnicodeString(TRUE, strings[i], -1);
+ }
+
+ for(i=0; i<(int32_t)(sizeof(strings)/sizeof(strings[0])-1); ++i) {
+ if(u[i].compareCodePointOrder(u[i+1])>=0 || u[i].compareCodePointOrder(0, INT32_MAX, u[i+1].getBuffer())>=0) {
+ errln("error: UnicodeString::compareCodePointOrder() fails for string %d and the following one\n", i);
+ }
+ }
+ }
+
+ /* test caseCompare() */
+ {
+ static const UChar
+ _mixed[]= { 0x61, 0x42, 0x131, 0x3a3, 0xdf, 0x130, 0x49, 0xfb03, 0xd93f, 0xdfff, 0 },
+ _otherDefault[]= { 0x41, 0x62, 0x131, 0x3c3, 0x73, 0x53, 0x69, 0x307, 0x69, 0x46, 0x66, 0x49, 0xd93f, 0xdfff, 0 },
+ _otherExcludeSpecialI[]={ 0x41, 0x62, 0x131, 0x3c3, 0x53, 0x73, 0x69, 0x131, 0x66, 0x46, 0x69, 0xd93f, 0xdfff, 0 },
+ _different[]= { 0x41, 0x62, 0x131, 0x3c3, 0x73, 0x53, 0x130, 0x49, 0x46, 0x66, 0x49, 0xd93f, 0xdffd, 0 };
+
+ UnicodeString
+ mixed(TRUE, _mixed, -1),
+ otherDefault(TRUE, _otherDefault, -1),
+ otherExcludeSpecialI(TRUE, _otherExcludeSpecialI, -1),
+ different(TRUE, _different, -1);
+
+ int8_t result;
+
+ /* test caseCompare() */
+ result=mixed.caseCompare(otherDefault, U_FOLD_CASE_DEFAULT);
+ if(result!=0 || 0!=mixed.caseCompareBetween(0, INT32_MAX, otherDefault, 0, INT32_MAX, U_FOLD_CASE_DEFAULT)) {
+ errln("error: mixed.caseCompare(other, default)=%ld instead of 0\n", result);
+ }
+ result=mixed.caseCompare(otherExcludeSpecialI, U_FOLD_CASE_EXCLUDE_SPECIAL_I);
+ if(result!=0) {
+ errln("error: mixed.caseCompare(otherExcludeSpecialI, U_FOLD_CASE_EXCLUDE_SPECIAL_I)=%ld instead of 0\n", result);
+ }
+ result=mixed.caseCompare(otherDefault, U_FOLD_CASE_EXCLUDE_SPECIAL_I);
+ if(result==0 || 0==mixed.caseCompareBetween(0, INT32_MAX, otherDefault, 0, INT32_MAX, U_FOLD_CASE_EXCLUDE_SPECIAL_I)) {
+ errln("error: mixed.caseCompare(other, U_FOLD_CASE_EXCLUDE_SPECIAL_I)=0 instead of !=0\n");
+ }
+
+ /* test caseCompare() */
+ result=mixed.caseCompare(different, U_FOLD_CASE_DEFAULT);
+ if(result<=0) {
+ errln("error: mixed.caseCompare(different, default)=%ld instead of positive\n", result);
+ }
+
+ /* test caseCompare() - include the folded sharp s (U+00df) with different lengths */
+ result=mixed.caseCompare(1, 4, different, 1, 5, U_FOLD_CASE_DEFAULT);
+ if(result!=0 || 0!=mixed.caseCompareBetween(1, 5, different, 1, 6, U_FOLD_CASE_DEFAULT)) {
+ errln("error: mixed.caseCompare(mixed, 1, 4, different, 1, 5, default)=%ld instead of 0\n", result);
+ }
+
+ /* test caseCompare() - stop in the middle of the sharp s (U+00df) */
+ result=mixed.caseCompare(1, 4, different, 1, 4, U_FOLD_CASE_DEFAULT);
+ if(result<=0) {
+ errln("error: mixed.caseCompare(1, 4, different, 1, 4, default)=%ld instead of positive\n", result);
+ }
+ }
+
+ // test that srcLength=-1 is handled in functions that
+ // take input const UChar */int32_t srcLength (j785)
+ {
+ static const UChar u[]={ 0x61, 0x308, 0x62, 0 };
+ UnicodeString s=UNICODE_STRING("a\\u0308b", 8).unescape();
+
+ if(s.compare(u, -1)!=0 || s.compare(0, 999, u, 0, -1)!=0) {
+ errln("error UnicodeString::compare(..., const UChar *, srcLength=-1) does not work");
+ }
+
+ if(s.compareCodePointOrder(u, -1)!=0 || s.compareCodePointOrder(0, 999, u, 0, -1)!=0) {
+ errln("error UnicodeString::compareCodePointOrder(..., const UChar *, srcLength=-1, ...) does not work");
+ }
+
+ if(s.caseCompare(u, -1, U_FOLD_CASE_DEFAULT)!=0 || s.caseCompare(0, 999, u, 0, -1, U_FOLD_CASE_DEFAULT)!=0) {
+ errln("error UnicodeString::caseCompare(..., const UChar *, srcLength=-1, ...) does not work");
+ }
+
+ if(s.indexOf(u, 1, -1, 0, 999)!=1 || s.indexOf(u+1, -1, 0, 999)!=1 || s.indexOf(u+1, -1, 0)!=1) {
+ errln("error UnicodeString::indexOf(const UChar *, srcLength=-1, ...) does not work");
+ }
+
+ if(s.lastIndexOf(u, 1, -1, 0, 999)!=1 || s.lastIndexOf(u+1, -1, 0, 999)!=1 || s.lastIndexOf(u+1, -1, 0)!=1) {
+ errln("error UnicodeString::lastIndexOf(const UChar *, srcLength=-1, ...) does not work");
+ }
+
+ UnicodeString s2, s3;
+ s2.replace(0, 0, u+1, -1);
+ s3.replace(0, 0, u, 1, -1);
+ if(s.compare(1, 999, s2)!=0 || s2!=s3) {
+ errln("error UnicodeString::replace(..., const UChar *, srcLength=-1, ...) does not work");
+ }
+ }
+}
+
+void
+UnicodeStringTest::TestExtract()
+{
+ UnicodeString test1("Now is the time for all good men to come to the aid of their country.", "");
+ UnicodeString test2;
+ UChar test3[13] = {1, 2, 3, 4, 5, 6, 7, 8, 8, 10, 11, 12, 13};
+ char test4[13] = {1, 2, 3, 4, 5, 6, 7, 8, 8, 10, 11, 12, 13};
+ UnicodeString test5;
+ char test6[13] = {1, 2, 3, 4, 5, 6, 7, 8, 8, 10, 11, 12, 13};
+
+ test1.extract(11, 12, test2);
+ test1.extract(11, 12, test3);
+ if (test1.extract(11, 12, test4) != 12 || test4[12] != 0) {
+ errln("UnicodeString.extract(char *) failed to return the correct size of destination buffer.");
+ }
+
+ // test proper pinning in extractBetween()
+ test1.extractBetween(-3, 7, test5);
+ if(test5!=UNICODE_STRING("Now is ", 7)) {
+ errln("UnicodeString.extractBetween(-3, 7) did not pin properly.");
+ }
+
+ test1.extractBetween(11, 23, test5);
+ if (test1.extract(60, 71, test6) != 9) {
+ errln("UnicodeString.extract() failed to return the correct size of destination buffer for end of buffer.");
+ }
+ if (test1.extract(11, 12, test6) != 12) {
+ errln("UnicodeString.extract() failed to return the correct size of destination buffer.");
+ }
+
+ // convert test4 back to Unicode for comparison
+ UnicodeString test4b(test4, 12);
+
+ if (test1.extract(11, 12, (char *)NULL) != 12) {
+ errln("UnicodeString.extract(NULL) failed to return the correct size of destination buffer.");
+ }
+ if (test1.extract(11, -1, test6) != 0) {
+ errln("UnicodeString.extract(-1) failed to stop reading the string.");
+ }
+
+ for (int32_t i = 0; i < 12; i++) {
+ if (test1.charAt((int32_t)(11 + i)) != test2.charAt(i)) {
+ errln(UnicodeString("extracting into a UnicodeString failed at position ") + i);
+ break;
+ }
+ if (test1.charAt((int32_t)(11 + i)) != test3[i]) {
+ errln(UnicodeString("extracting into an array of UChar failed at position ") + i);
+ break;
+ }
+ if (((char)test1.charAt((int32_t)(11 + i))) != test4b.charAt(i)) {
+ errln(UnicodeString("extracting into an array of char failed at position ") + i);
+ break;
+ }
+ if (test1.charAt((int32_t)(11 + i)) != test5.charAt(i)) {
+ errln(UnicodeString("extracting with extractBetween failed at position ") + i);
+ break;
+ }
+ }
+
+ // test preflighting and overflows with invariant conversion
+ if (test1.extract(0, 10, (char *)NULL, "") != 10) {
+ errln("UnicodeString.extract(0, 10, (char *)NULL, \"\") != 10");
+ }
+
+ test4[2] = (char)0xff;
+ if (test1.extract(0, 10, test4, 2, "") != 10) {
+ errln("UnicodeString.extract(0, 10, test4, 2, \"\") != 10");
+ }
+ if (test4[2] != (char)0xff) {
+ errln("UnicodeString.extract(0, 10, test4, 2, \"\") overwrote test4[2]");
+ }
+
+ {
+ // test new, NUL-terminating extract() function
+ UnicodeString s("terminate", "");
+ UChar dest[20]={
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5
+ };
+ UErrorCode errorCode;
+ int32_t length;
+
+ errorCode=U_ZERO_ERROR;
+ length=s.extract((UChar *)NULL, 0, errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=s.length()) {
+ errln("UnicodeString.extract(NULL, 0)==%d (%s) expected %d (U_BUFFER_OVERFLOW_ERROR)", length, s.length(), u_errorName(errorCode));
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=s.extract(dest, s.length()-1, errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=s.length()) {
+ errln("UnicodeString.extract(dest too short)==%d (%s) expected %d (U_BUFFER_OVERFLOW_ERROR)",
+ length, u_errorName(errorCode), s.length());
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=s.extract(dest, s.length(), errorCode);
+ if(errorCode!=U_STRING_NOT_TERMINATED_WARNING || length!=s.length()) {
+ errln("UnicodeString.extract(dest just right without NUL)==%d (%s) expected %d (U_STRING_NOT_TERMINATED_WARNING)",
+ length, u_errorName(errorCode), s.length());
+ }
+ if(dest[length-1]!=s[length-1] || dest[length]!=0xa5) {
+ errln("UnicodeString.extract(dest just right without NUL) did not extract the string correctly");
+ }
+
+ errorCode=U_ZERO_ERROR;
+ length=s.extract(dest, s.length()+1, errorCode);
+ if(errorCode!=U_ZERO_ERROR || length!=s.length()) {
+ errln("UnicodeString.extract(dest large enough)==%d (%s) expected %d (U_ZERO_ERROR)",
+ length, u_errorName(errorCode), s.length());
+ }
+ if(dest[length-1]!=s[length-1] || dest[length]!=0 || dest[length+1]!=0xa5) {
+ errln("UnicodeString.extract(dest large enough) did not extract the string correctly");
+ }
+ }
+
+ {
+ // test new UConverter extract() and constructor
+ UnicodeString s=UNICODE_STRING("\\U0002f999\\U0001d15f\\u00c4\\u1ed0", 32).unescape();
+ char buffer[32];
+ static const char expect[]={
+ (char)0xf0, (char)0xaf, (char)0xa6, (char)0x99,
+ (char)0xf0, (char)0x9d, (char)0x85, (char)0x9f,
+ (char)0xc3, (char)0x84,
+ (char)0xe1, (char)0xbb, (char)0x90
+ };
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UConverter *cnv=ucnv_open("UTF-8", &errorCode);
+ int32_t length;
+
+ if(U_SUCCESS(errorCode)) {
+ // test preflighting
+ if( (length=s.extract(NULL, 0, cnv, errorCode))!=13 ||
+ errorCode!=U_BUFFER_OVERFLOW_ERROR
+ ) {
+ errln("UnicodeString::extract(NULL, UConverter) preflighting failed (length=%ld, %s)",
+ length, u_errorName(errorCode));
+ }
+ errorCode=U_ZERO_ERROR;
+ if( (length=s.extract(buffer, 2, cnv, errorCode))!=13 ||
+ errorCode!=U_BUFFER_OVERFLOW_ERROR
+ ) {
+ errln("UnicodeString::extract(too small, UConverter) preflighting failed (length=%ld, %s)",
+ length, u_errorName(errorCode));
+ }
+
+ // try error cases
+ errorCode=U_ZERO_ERROR;
+ if( s.extract(NULL, 2, cnv, errorCode)==13 || U_SUCCESS(errorCode)) {
+ errln("UnicodeString::extract(UConverter) succeeded with an illegal destination");
+ }
+ errorCode=U_ILLEGAL_ARGUMENT_ERROR;
+ if( s.extract(NULL, 0, cnv, errorCode)==13 || U_SUCCESS(errorCode)) {
+ errln("UnicodeString::extract(UConverter) succeeded with a previous error code");
+ }
+ errorCode=U_ZERO_ERROR;
+
+ // extract for real
+ if( (length=s.extract(buffer, sizeof(buffer), cnv, errorCode))!=13 ||
+ uprv_memcmp(buffer, expect, 13)!=0 ||
+ buffer[13]!=0 ||
+ U_FAILURE(errorCode)
+ ) {
+ errln("UnicodeString::extract(UConverter) conversion failed (length=%ld, %s)",
+ length, u_errorName(errorCode));
+ }
+ // Test again with just the converter name.
+ if( (length=s.extract(0, s.length(), buffer, sizeof(buffer), "UTF-8"))!=13 ||
+ uprv_memcmp(buffer, expect, 13)!=0 ||
+ buffer[13]!=0 ||
+ U_FAILURE(errorCode)
+ ) {
+ errln("UnicodeString::extract(\"UTF-8\") conversion failed (length=%ld, %s)",
+ length, u_errorName(errorCode));
+ }
+
+ // try the constructor
+ UnicodeString t(expect, sizeof(expect), cnv, errorCode);
+ if(U_FAILURE(errorCode) || s!=t) {
+ errln("UnicodeString(UConverter) conversion failed (%s)",
+ u_errorName(errorCode));
+ }
+
+ ucnv_close(cnv);
+ }
+ }
+}
+
+void
+UnicodeStringTest::TestRemoveReplace()
+{
+ UnicodeString test1("The rain in Spain stays mainly on the plain");
+ UnicodeString test2("eat SPAMburgers!");
+ UChar test3[] = { 0x53, 0x50, 0x41, 0x4d, 0x4d, 0 };
+ char test4[] = "SPAM";
+ UnicodeString& test5 = test1;
+
+ test1.replace(4, 4, test2, 4, 4);
+ test1.replace(12, 5, test3, 4);
+ test3[4] = 0;
+ test1.replace(17, 4, test3);
+ test1.replace(23, 4, test4);
+ test1.replaceBetween(37, 42, test2, 4, 8);
+
+ if (test1 != "The SPAM in SPAM SPAMs SPAMly on the SPAM")
+ errln("One of the replace methods failed:\n"
+ " expected \"The SPAM in SPAM SPAMs SPAMly on the SPAM\",\n"
+ " got \"" + test1 + "\"");
+
+ test1.remove(21, 1);
+ test1.removeBetween(26, 28);
+
+ if (test1 != "The SPAM in SPAM SPAM SPAM on the SPAM")
+ errln("One of the remove methods failed:\n"
+ " expected \"The SPAM in SPAM SPAM SPAM on the SPAM\",\n"
+ " got \"" + test1 + "\"");
+
+ for (int32_t i = 0; i < test1.length(); i++) {
+ if (test5[i] != 0x53 && test5[i] != 0x50 && test5[i] != 0x41 && test5[i] != 0x4d && test5[i] != 0x20) {
+ test1.setCharAt(i, 0x78);
+ }
+ }
+
+ if (test1 != "xxx SPAM xx SPAM SPAM SPAM xx xxx SPAM")
+ errln("One of the remove methods failed:\n"
+ " expected \"xxx SPAM xx SPAM SPAM SPAM xx xxx SPAM\",\n"
+ " got \"" + test1 + "\"");
+
+ test1.remove();
+ if (test1.length() != 0)
+ errln("Remove() failed: expected empty string, got \"" + test1 + "\"");
+}
+
+void
+UnicodeStringTest::TestSearching()
+{
+ UnicodeString test1("test test ttest tetest testesteststt");
+ UnicodeString test2("test");
+ UChar testChar = 0x74;
+
+ UChar32 testChar32 = 0x20402;
+ UChar testData[]={
+ // 0 1 2 3 4 5 6 7
+ 0xd841, 0xdc02, 0x0071, 0xdc02, 0xd841, 0x0071, 0xd841, 0xdc02,
+
+ // 8 9 10 11 12 13 14 15
+ 0x0071, 0x0072, 0xd841, 0xdc02, 0x0071, 0xd841, 0xdc02, 0x0071,
+
+ // 16 17 18 19
+ 0xdc02, 0xd841, 0x0073, 0x0000
+ };
+ UnicodeString test3(testData);
+ UnicodeString test4(testChar32);
+
+ uint16_t occurrences = 0;
+ int32_t startPos = 0;
+ for ( ;
+ startPos != -1 && startPos < test1.length();
+ (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
+ ;
+ if (occurrences != 6)
+ errln("indexOf failed: expected to find 6 occurrences, found " + occurrences);
+
+ for ( occurrences = 0, startPos = 10;
+ startPos != -1 && startPos < test1.length();
+ (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
+ ;
+ if (occurrences != 4)
+ errln("indexOf with starting offset failed: expected to find 4 occurrences, found " + occurrences);
+
+ int32_t endPos = 28;
+ for ( occurrences = 0, startPos = 5;
+ startPos != -1 && startPos < test1.length();
+ (startPos = test1.indexOf(test2, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
+ ;
+ if (occurrences != 4)
+ errln("indexOf with starting and ending offsets failed: expected to find 4 occurrences, found " + occurrences);
+
+ //using UChar32 string
+ for ( startPos=0, occurrences=0;
+ startPos != -1 && startPos < test3.length();
+ (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
+ ;
+ if (occurrences != 4)
+ errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
+
+ for ( startPos=10, occurrences=0;
+ startPos != -1 && startPos < test3.length();
+ (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
+ ;
+ if (occurrences != 2)
+ errln("indexOf failed: expected to find 2 occurrences, found " + occurrences);
+ //---
+
+ for ( occurrences = 0, startPos = 0;
+ startPos != -1 && startPos < test1.length();
+ (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
+ ;
+ if (occurrences != 16)
+ errln("indexOf with character failed: expected to find 16 occurrences, found " + occurrences);
+
+ for ( occurrences = 0, startPos = 10;
+ startPos != -1 && startPos < test1.length();
+ (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
+ ;
+ if (occurrences != 12)
+ errln("indexOf with character & start offset failed: expected to find 12 occurrences, found " + occurrences);
+
+ for ( occurrences = 0, startPos = 5, endPos = 28;
+ startPos != -1 && startPos < test1.length();
+ (startPos = test1.indexOf(testChar, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
+ ;
+ if (occurrences != 10)
+ errln("indexOf with character & start & end offsets failed: expected to find 10 occurrences, found " + occurrences);
+
+ //testing for UChar32
+ UnicodeString subString;
+ for( occurrences =0, startPos=0; startPos < test3.length(); startPos +=1){
+ subString.append(test3, startPos, test3.length());
+ if(subString.indexOf(testChar32) != -1 ){
+ ++occurrences;
+ }
+ subString.remove();
+ }
+ if (occurrences != 14)
+ errln((UnicodeString)"indexOf failed: expected to find 14 occurrences, found " + occurrences);
+
+ for ( occurrences = 0, startPos = 0;
+ startPos != -1 && startPos < test3.length();
+ (startPos = test3.indexOf(testChar32, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
+ ;
+ if (occurrences != 4)
+ errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
+
+ endPos=test3.length();
+ for ( occurrences = 0, startPos = 5;
+ startPos != -1 && startPos < test3.length();
+ (startPos = test3.indexOf(testChar32, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
+ ;
+ if (occurrences != 3)
+ errln((UnicodeString)"indexOf with character & start & end offsets failed: expected to find 2 occurrences, found " + occurrences);
+ //---
+
+ if(test1.lastIndexOf(test2)!=29) {
+ errln("test1.lastIndexOf(test2)!=29");
+ }
+
+ if(test1.lastIndexOf(test2, 15)!=29 || test1.lastIndexOf(test2, 29)!=29 || test1.lastIndexOf(test2, 30)!=-1) {
+ errln("test1.lastIndexOf(test2, start) failed");
+ }
+
+ for ( occurrences = 0, startPos = 32;
+ startPos != -1;
+ (startPos = test1.lastIndexOf(test2, 5, startPos - 5)) != -1 ? ++occurrences : 0)
+ ;
+ if (occurrences != 4)
+ errln("lastIndexOf with starting and ending offsets failed: expected to find 4 occurrences, found " + occurrences);
+
+ for ( occurrences = 0, startPos = 32;
+ startPos != -1;
+ (startPos = test1.lastIndexOf(testChar, 5, startPos - 5)) != -1 ? ++occurrences : 0)
+ ;
+ if (occurrences != 11)
+ errln("lastIndexOf with character & start & end offsets failed: expected to find 11 occurrences, found " + occurrences);
+
+ //testing UChar32
+ startPos=test3.length();
+ for ( occurrences = 0;
+ startPos != -1;
+ (startPos = test3.lastIndexOf(testChar32, 5, startPos - 5)) != -1 ? ++occurrences : 0)
+ ;
+ if (occurrences != 3)
+ errln((UnicodeString)"lastIndexOf with character & start & end offsets failed: expected to find 3 occurrences, found " + occurrences);
+
+
+ for ( occurrences = 0, endPos = test3.length(); endPos > 0; endPos -= 1){
+ subString.remove();
+ subString.append(test3, 0, endPos);
+ if(subString.lastIndexOf(testChar32) != -1 ){
+ ++occurrences;
+ }
+ }
+ if (occurrences != 18)
+ errln((UnicodeString)"indexOf failed: expected to find 18 occurrences, found " + occurrences);
+ //---
+
+ // test that indexOf(UChar32) and lastIndexOf(UChar32)
+ // do not find surrogate code points when they are part of matched pairs
+ // (= part of supplementary code points)
+ // Jitterbug 1542
+ if(test3.indexOf((UChar32)0xd841) != 4 || test3.indexOf((UChar32)0xdc02) != 3) {
+ errln("error: UnicodeString::indexOf(UChar32 surrogate) finds a partial supplementary code point");
+ }
+ if( UnicodeString(test3, 0, 17).lastIndexOf((UChar)0xd841, 0) != 4 ||
+ UnicodeString(test3, 0, 17).lastIndexOf((UChar32)0xd841, 2) != 4 ||
+ test3.lastIndexOf((UChar32)0xd841, 0, 17) != 4 || test3.lastIndexOf((UChar32)0xdc02, 0, 17) != 16
+ ) {
+ errln("error: UnicodeString::lastIndexOf(UChar32 surrogate) finds a partial supplementary code point");
+ }
+}
+
+void
+UnicodeStringTest::TestSpacePadding()
+{
+ UnicodeString test1("hello");
+ UnicodeString test2(" there");
+ UnicodeString test3("Hi! How ya doin'? Beautiful day, isn't it?");
+ UnicodeString test4;
+ UBool returnVal;
+ UnicodeString expectedValue;
+
+ returnVal = test1.padLeading(15);
+ expectedValue = " hello";
+ if (returnVal == FALSE || test1 != expectedValue)
+ errln("padLeading() failed: expected \"" + expectedValue + "\", got \"" + test1 + "\".");
+
+ returnVal = test2.padTrailing(15);
+ expectedValue = " there ";
+ if (returnVal == FALSE || test2 != expectedValue)
+ errln("padTrailing() failed: expected \"" + expectedValue + "\", got \"" + test2 + "\".");
+
+ expectedValue = test3;
+ returnVal = test3.padTrailing(15);
+ if (returnVal == TRUE || test3 != expectedValue)
+ errln("padTrailing() failed: expected \"" + expectedValue + "\", got \"" + test3 + "\".");
+
+ expectedValue = "hello";
+ test4.setTo(test1).trim();
+
+ if (test4 != expectedValue || test1 == expectedValue || test4 != expectedValue)
+ errln("trim(UnicodeString&) failed");
+
+ test1.trim();
+ if (test1 != expectedValue)
+ errln("trim() failed: expected \"" + expectedValue + "\", got \"" + test1 + "\".");
+
+ test2.trim();
+ expectedValue = "there";
+ if (test2 != expectedValue)
+ errln("trim() failed: expected \"" + expectedValue + "\", got \"" + test2 + "\".");
+
+ test3.trim();
+ expectedValue = "Hi! How ya doin'? Beautiful day, isn't it?";
+ if (test3 != expectedValue)
+ errln("trim() failed: expected \"" + expectedValue + "\", got \"" + test3 + "\".");
+
+ returnVal = test1.truncate(15);
+ expectedValue = "hello";
+ if (returnVal == TRUE || test1 != expectedValue)
+ errln("truncate() failed: expected \"" + expectedValue + "\", got \"" + test1 + "\".");
+
+ returnVal = test2.truncate(15);
+ expectedValue = "there";
+ if (returnVal == TRUE || test2 != expectedValue)
+ errln("truncate() failed: expected \"" + expectedValue + "\", got \"" + test2 + "\".");
+
+ returnVal = test3.truncate(15);
+ expectedValue = "Hi! How ya doi";
+ if (returnVal == FALSE || test3 != expectedValue)
+ errln("truncate() failed: expected \"" + expectedValue + "\", got \"" + test3 + "\".");
+}
+
+void
+UnicodeStringTest::TestPrefixAndSuffix()
+{
+ UnicodeString test1("Now is the time for all good men to come to the aid of their country.");
+ UnicodeString test2("Now");
+ UnicodeString test3("country.");
+ UnicodeString test4("count");
+
+ if (!test1.startsWith(test2) || !test1.startsWith(test2, 0, test2.length())) {
+ errln("startsWith() failed: \"" + test2 + "\" should be a prefix of \"" + test1 + "\".");
+ }
+
+ if (test1.startsWith(test3) ||
+ test1.startsWith(test3.getBuffer(), test3.length()) ||
+ test1.startsWith(test3.getTerminatedBuffer(), 0, -1)
+ ) {
+ errln("startsWith() failed: \"" + test3 + "\" shouldn't be a prefix of \"" + test1 + "\".");
+ }
+
+ if (test1.endsWith(test2)) {
+ errln("endsWith() failed: \"" + test2 + "\" shouldn't be a suffix of \"" + test1 + "\".");
+ }
+
+ if (!test1.endsWith(test3)) {
+ errln("endsWith(test3) failed: \"" + test3 + "\" should be a suffix of \"" + test1 + "\".");
+ }
+ if (!test1.endsWith(test3, 0, INT32_MAX)) {
+ errln("endsWith(test3, 0, INT32_MAX) failed: \"" + test3 + "\" should be a suffix of \"" + test1 + "\".");
+ }
+
+ if(!test1.endsWith(test3.getBuffer(), test3.length())) {
+ errln("endsWith(test3.getBuffer(), test3.length()) failed: \"" + test3 + "\" should be a suffix of \"" + test1 + "\".");
+ }
+ if(!test1.endsWith(test3.getTerminatedBuffer(), 0, -1)) {
+ errln("endsWith(test3.getTerminatedBuffer(), 0, -1) failed: \"" + test3 + "\" should be a suffix of \"" + test1 + "\".");
+ }
+
+ if (!test3.startsWith(test4)) {
+ errln("endsWith(test4) failed: \"" + test4 + "\" should be a prefix of \"" + test3 + "\".");
+ }
+
+ if (test4.startsWith(test3)) {
+ errln("startsWith(test3) failed: \"" + test3 + "\" shouldn't be a prefix of \"" + test4 + "\".");
+ }
+}
+
+void
+UnicodeStringTest::TestFindAndReplace()
+{
+ UnicodeString test1("One potato, two potato, three potato, four\n");
+ UnicodeString test2("potato");
+ UnicodeString test3("MISSISSIPPI");
+
+ UnicodeString expectedValue;
+
+ test1.findAndReplace(test2, test3);
+ expectedValue = "One MISSISSIPPI, two MISSISSIPPI, three MISSISSIPPI, four\n";
+ if (test1 != expectedValue)
+ errln("findAndReplace failed: expected \"" + expectedValue + "\", got \"" + test1 + "\".");
+ test1.findAndReplace(2, 32, test3, test2);
+ expectedValue = "One potato, two potato, three MISSISSIPPI, four\n";
+ if (test1 != expectedValue)
+ errln("findAndReplace failed: expected \"" + expectedValue + "\", got \"" + test1 + "\".");
+}
+
+void
+UnicodeStringTest::TestReverse()
+{
+ UnicodeString test("backwards words say to used I");
+
+ test.reverse();
+ test.reverse(2, 4);
+ test.reverse(7, 2);
+ test.reverse(10, 3);
+ test.reverse(14, 5);
+ test.reverse(20, 9);
+
+ if (test != "I used to say words backwards")
+ errln("reverse() failed: Expected \"I used to say words backwards\",\n got \""
+ + test + "\"");
+
+ test=UNICODE_STRING("\\U0002f999\\U0001d15f\\u00c4\\u1ed0", 32).unescape();
+ test.reverse();
+ if(test.char32At(0)!=0x1ed0 || test.char32At(1)!=0xc4 || test.char32At(2)!=0x1d15f || test.char32At(4)!=0x2f999) {
+ errln("reverse() failed with supplementary characters");
+ }
+}
+
+void
+UnicodeStringTest::TestMiscellaneous()
+{
+ UnicodeString test1("This is a test");
+ UnicodeString test2("This is a test");
+ UnicodeString test3("Me too!");
+
+ // test getBuffer(minCapacity) and releaseBuffer()
+ test1=UnicodeString(); // make sure that it starts with its stackBuffer
+ UChar *p=test1.getBuffer(20);
+ if(test1.getCapacity()<20) {
+ errln("UnicodeString::getBuffer(20).getCapacity()<20");
+ }
+
+ test1.append((UChar)7); // must not be able to modify the string here
+ test1.setCharAt(3, 7);
+ test1.reverse();
+ if( test1.length()!=0 ||
+ test1.charAt(0)!=0xffff || test1.charAt(3)!=0xffff ||
+ test1.getBuffer(10)!=0 || test1.getBuffer()!=0
+ ) {
+ errln("UnicodeString::getBuffer(minCapacity) allows read or write access to the UnicodeString");
+ }
+
+ p[0]=1;
+ p[1]=2;
+ p[2]=3;
+ test1.releaseBuffer(3);
+ test1.append((UChar)4);
+
+ if(test1.length()!=4 || test1.charAt(0)!=1 || test1.charAt(1)!=2 || test1.charAt(2)!=3 || test1.charAt(3)!=4) {
+ errln("UnicodeString::releaseBuffer(newLength) does not properly reallow access to the UnicodeString");
+ }
+
+ // test releaseBuffer() without getBuffer(minCapacity) - must not have any effect
+ test1.releaseBuffer(1);
+ if(test1.length()!=4 || test1.charAt(0)!=1 || test1.charAt(1)!=2 || test1.charAt(2)!=3 || test1.charAt(3)!=4) {
+ errln("UnicodeString::releaseBuffer(newLength) without getBuffer(minCapacity) changed the UnicodeString");
+ }
+
+ // test getBuffer(const)
+ const UChar *q=test1.getBuffer(), *r=test1.getBuffer();
+ if( test1.length()!=4 ||
+ q[0]!=1 || q[1]!=2 || q[2]!=3 || q[3]!=4 ||
+ r[0]!=1 || r[1]!=2 || r[2]!=3 || r[3]!=4
+ ) {
+ errln("UnicodeString::getBuffer(const) does not return a usable buffer pointer");
+ }
+
+ // test releaseBuffer() with a NUL-terminated buffer
+ test1.getBuffer(20)[2]=0;
+ test1.releaseBuffer(); // implicit -1
+ if(test1.length()!=2 || test1.charAt(0)!=1 || test1.charAt(1) !=2) {
+ errln("UnicodeString::releaseBuffer(-1) does not properly set the length of the UnicodeString");
+ }
+
+ // test releaseBuffer() with a non-NUL-terminated buffer
+ p=test1.getBuffer(256);
+ for(int32_t i=0; i<test1.getCapacity(); ++i) {
+ p[i]=(UChar)1; // fill the buffer with all non-NUL code units
+ }
+ test1.releaseBuffer(); // implicit -1
+ if(test1.length()!=test1.getCapacity() || test1.charAt(1)!=1 || test1.charAt(100)!=1 || test1.charAt(test1.getCapacity()-1)!=1) {
+ errln("UnicodeString::releaseBuffer(-1 but no NUL) does not properly set the length of the UnicodeString");
+ }
+
+ // test getTerminatedBuffer()
+ test1=UnicodeString("This is another test.", "");
+ test2=UnicodeString("This is another test.", "");
+ q=test1.getTerminatedBuffer();
+ if(q[test1.length()]!=0 || test1!=test2 || test2.compare(q, -1)!=0) {
+ errln("getTerminatedBuffer()[length]!=0");
+ }
+
+ const UChar u[]={ 5, 6, 7, 8, 0 };
+ test1.setTo(FALSE, u, 3);
+ q=test1.getTerminatedBuffer();
+ if(q==u || q[0]!=5 || q[1]!=6 || q[2]!=7 || q[3]!=0) {
+ errln("UnicodeString(u[3]).getTerminatedBuffer() returns a bad buffer");
+ }
+
+ test1.setTo(TRUE, u, -1);
+ q=test1.getTerminatedBuffer();
+ if(q!=u || test1.length()!=4 || q[3]!=8 || q[4]!=0) {
+ errln("UnicodeString(u[-1]).getTerminatedBuffer() returns a bad buffer");
+ }
+
+ test1=UNICODE_STRING("la", 2);
+ test1.append(UNICODE_STRING(" lila", 5).getTerminatedBuffer(), 0, -1);
+ if(test1!=UNICODE_STRING("la lila", 7)) {
+ errln("UnicodeString::append(const UChar *, start, length) failed");
+ }
+
+ test1.insert(3, UNICODE_STRING("dudum ", 6), 0, INT32_MAX);
+ if(test1!=UNICODE_STRING("la dudum lila", 13)) {
+ errln("UnicodeString::insert(start, const UniStr &, start, length) failed");
+ }
+
+ static const UChar ucs[]={ 0x68, 0x6d, 0x20, 0 };
+ test1.insert(9, ucs, -1);
+ if(test1!=UNICODE_STRING("la dudum hm lila", 16)) {
+ errln("UnicodeString::insert(start, const UChar *, length) failed");
+ }
+
+ test1.replace(9, 2, (UChar)0x2b);
+ if(test1!=UNICODE_STRING("la dudum + lila", 15)) {
+ errln("UnicodeString::replace(start, length, UChar) failed");
+ }
+
+ if(test1.hasMetaData() || UnicodeString().hasMetaData()) {
+ errln("UnicodeString::hasMetaData() returns TRUE");
+ }
+}
+
+void
+UnicodeStringTest::TestStackAllocation()
+{
+ UChar testString[] ={
+ 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x63, 0x72, 0x61, 0x7a, 0x79, 0x20, 0x74, 0x65, 0x73, 0x74, 0x2e, 0 };
+ UChar guardWord = 0x4DED;
+ UnicodeString* test = 0;
+
+ test = new UnicodeString(testString);
+ if (*test != "This is a crazy test.")
+ errln("Test string failed to initialize properly.");
+ if (guardWord != 0x04DED)
+ errln("Test string initialization overwrote guard word!");
+
+ test->insert(8, "only ");
+ test->remove(15, 6);
+ if (*test != "This is only a test.")
+ errln("Manipulation of test string failed to work right.");
+ if (guardWord != 0x4DED)
+ errln("Manipulation of test string overwrote guard word!");
+
+ // we have to deinitialize and release the backing store by calling the destructor
+ // explicitly, since we can't overload operator delete
+ delete test;
+
+ UChar workingBuffer[] = {
+ 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20,
+ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x65, 0x6e, 0x20, 0x74, 0x6f, 0x20,
+ 0x63, 0x6f, 0x6d, 0x65, 0xffff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ UChar guardWord2 = 0x4DED;
+
+ test = new UnicodeString(workingBuffer, 35, 100);
+ if (*test != "Now is the time for all men to come")
+ errln("Stack-allocated backing store failed to initialize correctly.");
+ if (guardWord2 != 0x4DED)
+ errln("Stack-allocated backing store overwrote guard word!");
+
+ test->insert(24, "good ");
+ if (*test != "Now is the time for all good men to come")
+ errln("insert() on stack-allocated UnicodeString didn't work right");
+ if (guardWord2 != 0x4DED)
+ errln("insert() on stack-allocated UnicodeString overwrote guard word!");
+
+ if (workingBuffer[24] != 0x67)
+ errln("insert() on stack-allocated UnicodeString didn't affect backing store");
+
+ *test += " to the aid of their country.";
+ if (*test != "Now is the time for all good men to come to the aid of their country.")
+ errln("Stack-allocated UnicodeString overflow didn't work");
+ if (guardWord2 != 0x4DED)
+ errln("Stack-allocated UnicodeString overflow overwrote guard word!");
+
+ *test = "ha!";
+ if (*test != "ha!")
+ errln("Assignment to stack-allocated UnicodeString didn't work");
+ if (workingBuffer[0] != 0x4e)
+ errln("Change to UnicodeString after overflow are still affecting original buffer");
+ if (guardWord2 != 0x4DED)
+ errln("Change to UnicodeString after overflow overwrote guard word!");
+
+ // test read-only aliasing with setTo()
+ workingBuffer[0] = 0x20ac;
+ workingBuffer[1] = 0x125;
+ workingBuffer[2] = 0;
+ test->setTo(TRUE, workingBuffer, 2);
+ if(test->length() != 2 || test->charAt(0) != 0x20ac || test->charAt(1) != 0x125) {
+ errln("UnicodeString.setTo(readonly alias) does not alias correctly");
+ }
+
+ UnicodeString *c=(UnicodeString *)test->clone();
+
+ workingBuffer[1] = 0x109;
+ if(test->charAt(1) != 0x109) {
+ errln("UnicodeString.setTo(readonly alias) made a copy: did not see change in buffer");
+ }
+
+ if(c->length() != 2 || c->charAt(1) != 0x125) {
+ errln("clone(alias) did not copy the buffer");
+ }
+ delete c;
+
+ test->setTo(TRUE, workingBuffer, -1);
+ if(test->length() != 2 || test->charAt(0) != 0x20ac || test->charAt(1) != 0x109) {
+ errln("UnicodeString.setTo(readonly alias, length -1) does not alias correctly");
+ }
+
+ test->setTo(FALSE, workingBuffer, -1);
+ if(!test->isBogus()) {
+ errln("UnicodeString.setTo(unterminated readonly alias, length -1) does not result in isBogus()");
+ }
+
+ delete test;
+
+ test=new UnicodeString();
+ UChar buffer[]={0x0061, 0x0062, 0x20ac, 0x0043, 0x0042, 0x0000};
+ test->setTo(buffer, 4, 10);
+ if(test->length() !=4 || test->charAt(0) != 0x0061 || test->charAt(1) != 0x0062 ||
+ test->charAt(2) != 0x20ac || test->charAt(3) != 0x0043){
+ errln((UnicodeString)"UnicodeString.setTo(UChar*, length, capacity) does not work correctly\n" + prettify(*test));
+ }
+ delete test;
+
+
+ // test the UChar32 constructor
+ UnicodeString c32Test((UChar32)0x10ff2a);
+ if( c32Test.length() != UTF_CHAR_LENGTH(0x10ff2a) ||
+ c32Test.char32At(c32Test.length() - 1) != 0x10ff2a
+ ) {
+ errln("The UnicodeString(UChar32) constructor does not work with a 0x10ff2a filler");
+ }
+
+ // test the (new) capacity constructor
+ UnicodeString capTest(5, (UChar32)0x2a, 5);
+ if( capTest.length() != 5 * UTF_CHAR_LENGTH(0x2a) ||
+ capTest.char32At(0) != 0x2a ||
+ capTest.char32At(4) != 0x2a
+ ) {
+ errln("The UnicodeString capacity constructor does not work with an ASCII filler");
+ }
+
+ capTest = UnicodeString(5, (UChar32)0x10ff2a, 5);
+ if( capTest.length() != 5 * UTF_CHAR_LENGTH(0x10ff2a) ||
+ capTest.char32At(0) != 0x10ff2a ||
+ capTest.char32At(4) != 0x10ff2a
+ ) {
+ errln("The UnicodeString capacity constructor does not work with a 0x10ff2a filler");
+ }
+
+ capTest = UnicodeString(5, (UChar32)0, 0);
+ if(capTest.length() != 0) {
+ errln("The UnicodeString capacity constructor does not work with a 0x10ff2a filler");
+ }
+}
+
+/**
+ * Test the unescape() function.
+ */
+void UnicodeStringTest::TestUnescape(void) {
+ UnicodeString IN("abc\\u4567 \\n\\r \\U00101234xyz\\x1\\x{5289}\\x1b");
+ UnicodeString OUT("abc");
+ OUT.append((UChar)0x4567);
+ OUT.append(" ");
+ OUT.append((UChar)0xA);
+ OUT.append((UChar)0xD);
+ OUT.append(" ");
+ OUT.append((UChar32)0x00101234);
+ OUT.append("xyz");
+ OUT.append((UChar32)1).append((UChar32)0x5289).append((UChar)0x1b);
+ UnicodeString result = IN.unescape();
+ if (result != OUT) {
+ errln("FAIL: " + prettify(IN) + ".unescape() -> " +
+ prettify(result) + ", expected " +
+ prettify(OUT));
+ }
+
+ // test that an empty string is returned in case of an error
+ if (!UNICODE_STRING("wrong \\u sequence", 17).unescape().isEmpty()) {
+ errln("FAIL: unescaping of a string with an illegal escape sequence did not return an empty string");
+ }
+}
+
+/* test code point counting functions --------------------------------------- */
+
+/* reference implementation of UnicodeString::hasMoreChar32Than() */
+static int32_t
+_refUnicodeStringHasMoreChar32Than(const UnicodeString &s, int32_t start, int32_t length, int32_t number) {
+ int32_t count=s.countChar32(start, length);
+ return count>number;
+}
+
+/* compare the real function against the reference */
+void
+UnicodeStringTest::_testUnicodeStringHasMoreChar32Than(const UnicodeString &s, int32_t start, int32_t length, int32_t number) {
+ if(s.hasMoreChar32Than(start, length, number)!=_refUnicodeStringHasMoreChar32Than(s, start, length, number)) {
+ errln("hasMoreChar32Than(%d, %d, %d)=%hd is wrong\n",
+ start, length, number, s.hasMoreChar32Than(start, length, number));
+ }
+}
+
+void
+UnicodeStringTest::TestCountChar32(void) {
+ {
+ UnicodeString s=UNICODE_STRING("\\U0002f999\\U0001d15f\\u00c4\\u1ed0", 32).unescape();
+
+ // test countChar32()
+ // note that this also calls and tests u_countChar32(length>=0)
+ if(
+ s.countChar32()!=4 ||
+ s.countChar32(1)!=4 ||
+ s.countChar32(2)!=3 ||
+ s.countChar32(2, 3)!=2 ||
+ s.countChar32(2, 0)!=0
+ ) {
+ errln("UnicodeString::countChar32() failed");
+ }
+
+ // NUL-terminate the string buffer and test u_countChar32(length=-1)
+ const UChar *buffer=s.getTerminatedBuffer();
+ if(
+ u_countChar32(buffer, -1)!=4 ||
+ u_countChar32(buffer+1, -1)!=4 ||
+ u_countChar32(buffer+2, -1)!=3 ||
+ u_countChar32(buffer+3, -1)!=3 ||
+ u_countChar32(buffer+4, -1)!=2 ||
+ u_countChar32(buffer+5, -1)!=1 ||
+ u_countChar32(buffer+6, -1)!=0
+ ) {
+ errln("u_countChar32(length=-1) failed");
+ }
+
+ // test u_countChar32() with bad input
+ if(u_countChar32(NULL, 5)!=0 || u_countChar32(buffer, -2)!=0) {
+ errln("u_countChar32(bad input) failed (returned non-zero counts)");
+ }
+ }
+
+ /* test data and variables for hasMoreChar32Than() */
+ static const UChar str[]={
+ 0x61, 0x62, 0xd800, 0xdc00,
+ 0xd801, 0xdc01, 0x63, 0xd802,
+ 0x64, 0xdc03, 0x65, 0x66,
+ 0xd804, 0xdc04, 0xd805, 0xdc05,
+ 0x67
+ };
+ UnicodeString string(str, LENGTHOF(str));
+ int32_t start, length, number;
+
+ /* test hasMoreChar32Than() */
+ for(length=string.length(); length>=0; --length) {
+ for(start=0; start<=length; ++start) {
+ for(number=-1; number<=((length-start)+2); ++number) {
+ _testUnicodeStringHasMoreChar32Than(string, start, length-start, number);
+ }
+ }
+ }
+
+ /* test hasMoreChar32Than() with pinning */
+ for(start=-1; start<=string.length()+1; ++start) {
+ for(number=-1; number<=((string.length()-start)+2); ++number) {
+ _testUnicodeStringHasMoreChar32Than(string, start, 0x7fffffff, number);
+ }
+ }
+
+ /* test hasMoreChar32Than() with a bogus string */
+ string.setToBogus();
+ for(length=-1; length<=1; ++length) {
+ for(start=-1; start<=length; ++start) {
+ for(number=-1; number<=((length-start)+2); ++number) {
+ _testUnicodeStringHasMoreChar32Than(string, start, length-start, number);
+ }
+ }
+ }
+}
+
+void
+UnicodeStringTest::TestBogus() {
+ UnicodeString test1("This is a test");
+ UnicodeString test2("This is a test");
+ UnicodeString test3("Me too!");
+
+ // test isBogus() and setToBogus()
+ if (test1.isBogus() || test2.isBogus() || test3.isBogus()) {
+ errln("A string returned TRUE for isBogus()!");
+ }
+
+ // NULL pointers are treated like empty strings
+ // use other illegal arguments to make a bogus string
+ test3.setTo(FALSE, test1.getBuffer(), -2);
+ if(!test3.isBogus()) {
+ errln("A bogus string returned FALSE for isBogus()!");
+ }
+ if (test1.hashCode() != test2.hashCode() || test1.hashCode() == test3.hashCode()) {
+ errln("hashCode() failed");
+ }
+ if(test3.getBuffer()!=0 || test3.getBuffer(20)!=0 || test3.getTerminatedBuffer()!=0) {
+ errln("bogus.getBuffer()!=0");
+ }
+ if (test1.indexOf(test3) != -1) {
+ errln("bogus.indexOf() != -1");
+ }
+ if (test1.lastIndexOf(test3) != -1) {
+ errln("bogus.lastIndexOf() != -1");
+ }
+ if (test1.caseCompare(test3, U_FOLD_CASE_DEFAULT) != 1 || test3.caseCompare(test1, U_FOLD_CASE_DEFAULT) != -1) {
+ errln("caseCompare() doesn't work with bogus strings");
+ }
+ if (test1.compareCodePointOrder(test3) != 1 || test3.compareCodePointOrder(test1) != -1) {
+ errln("compareCodePointOrder() doesn't work with bogus strings");
+ }
+
+ // verify that non-assignment modifications fail and do not revive a bogus string
+ test3.setToBogus();
+ test3.append((UChar)0x61);
+ if(!test3.isBogus() || test3.getBuffer()!=0) {
+ errln("bogus.append('a') worked but must not");
+ }
+
+ test3.setToBogus();
+ test3.findAndReplace(UnicodeString((UChar)0x61), test2);
+ if(!test3.isBogus() || test3.getBuffer()!=0) {
+ errln("bogus.findAndReplace() worked but must not");
+ }
+
+ test3.setToBogus();
+ test3.trim();
+ if(!test3.isBogus() || test3.getBuffer()!=0) {
+ errln("bogus.trim() revived bogus but must not");
+ }
+
+ test3.setToBogus();
+ test3.remove(1);
+ if(!test3.isBogus() || test3.getBuffer()!=0) {
+ errln("bogus.remove(1) revived bogus but must not");
+ }
+
+ test3.setToBogus();
+ if(!test3.setCharAt(0, 0x62).isBogus() || !test3.isEmpty()) {
+ errln("bogus.setCharAt(0, 'b') worked but must not");
+ }
+
+ test3.setToBogus();
+ if(test3.truncate(1) || !test3.isBogus() || !test3.isEmpty()) {
+ errln("bogus.truncate(1) revived bogus but must not");
+ }
+
+ // verify that assignments revive a bogus string
+ test3.setToBogus();
+ if(!test3.isBogus() || (test3=test1).isBogus() || test3!=test1) {
+ errln("bogus.operator=() failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.fastCopyFrom(test1).isBogus() || test3!=test1) {
+ errln("bogus.fastCopyFrom() failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo(test1).isBogus() || test3!=test1) {
+ errln("bogus.setTo(UniStr) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo(test1, 0).isBogus() || test3!=test1) {
+ errln("bogus.setTo(UniStr, 0) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo(test1, 0, 0x7fffffff).isBogus() || test3!=test1) {
+ errln("bogus.setTo(UniStr, 0, len) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo(test1.getBuffer(), test1.length()).isBogus() || test3!=test1) {
+ errln("bogus.setTo(const UChar *, len) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo((UChar)0x2028).isBogus() || test3!=UnicodeString((UChar)0x2028)) {
+ errln("bogus.setTo(UChar) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo((UChar32)0x1d157).isBogus() || test3!=UnicodeString((UChar32)0x1d157)) {
+ errln("bogus.setTo(UChar32) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo(FALSE, test1.getBuffer(), test1.length()).isBogus() || test3!=test1) {
+ errln("bogus.setTo(readonly alias) failed");
+ }
+
+ // writable alias to another string's buffer: very bad idea, just convenient for this test
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo((UChar *)test1.getBuffer(), test1.length(), test1.getCapacity()).isBogus() || test3!=test1) {
+ errln("bogus.setTo(writable alias) failed");
+ }
+
+ // verify simple, documented ways to turn a bogus string into an empty one
+ test3.setToBogus();
+ if(!test3.isBogus() || (test3=UnicodeString()).isBogus() || !test3.isEmpty()) {
+ errln("bogus.operator=(UnicodeString()) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo(UnicodeString()).isBogus() || !test3.isEmpty()) {
+ errln("bogus.setTo(UnicodeString()) failed");
+ }
+
+ test3.setToBogus();
+ if(test3.remove().isBogus() || test3.getBuffer()==0 || !test3.isEmpty()) {
+ errln("bogus.remove() failed");
+ }
+
+ test3.setToBogus();
+ if(test3.remove(0, INT32_MAX).isBogus() || test3.getBuffer()==0 || !test3.isEmpty()) {
+ errln("bogus.remove(0, INT32_MAX) failed");
+ }
+
+ test3.setToBogus();
+ if(test3.truncate(0) || test3.isBogus() || !test3.isEmpty()) {
+ errln("bogus.truncate(0) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo((UChar32)-1).isBogus() || !test3.isEmpty()) {
+ errln("bogus.setTo((UChar32)-1) failed");
+ }
+
+ static const UChar nul=0;
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.setTo(&nul, 0).isBogus() || !test3.isEmpty()) {
+ errln("bogus.setTo(&nul, 0) failed");
+ }
+
+ test3.setToBogus();
+ if(!test3.isBogus() || test3.getBuffer()!=0) {
+ errln("setToBogus() failed to make a string bogus");
+ }
+
+ test3.setToBogus();
+ if(test1.isBogus() || !(test1=test3).isBogus()) {
+ errln("normal=bogus failed to make the left string bogus");
+ }
+
+ // test that NULL primitive input string values are treated like
+ // empty strings, not errors (bogus)
+ test2.setTo((UChar32)0x10005);
+ if(test2.insert(1, NULL, 1).length()!=2) {
+ errln("UniStr.insert(...NULL...) should not modify the string but does");
+ }
+
+ UErrorCode errorCode=U_ZERO_ERROR;
+ UnicodeString
+ test4((const UChar *)NULL),
+ test5(TRUE, (const UChar *)NULL, 1),
+ test6((UChar *)NULL, 5, 5),
+ test7((const char *)NULL, 3, NULL, errorCode);
+ if(test4.isBogus() || test5.isBogus() || test6.isBogus() || test7.isBogus()) {
+ errln("a constructor set to bogus for a NULL input string, should be empty");
+ }
+
+ test4.setTo(NULL, 3);
+ test5.setTo(TRUE, (const UChar *)NULL, 1);
+ test6.setTo((UChar *)NULL, 5, 5);
+ if(test4.isBogus() || test5.isBogus() || test6.isBogus()) {
+ errln("a setTo() set to bogus for a NULL input string, should be empty");
+ }
+
+ // test that bogus==bogus<any
+ if(test1!=test3 || test1.compare(test3)!=0) {
+ errln("bogus==bogus failed");
+ }
+
+ test2.remove();
+ if(test1>=test2 || !(test2>test1) || test1.compare(test2)>=0 || !(test2.compare(test1)>0)) {
+ errln("bogus<empty failed");
+ }
+}
+
+// StringEnumeration ------------------------------------------------------- ***
+// most of StringEnumeration is tested elsewhere
+// this test improves code coverage
+
+static const char *const
+testEnumStrings[]={
+ "a",
+ "b",
+ "c",
+ "this is a long string which helps us test some buffer limits",
+ "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
+};
+
+class TestEnumeration : public StringEnumeration {
+public:
+ TestEnumeration() : i(0) {}
+
+ virtual int32_t count(UErrorCode& /*status*/) const {
+ return LENGTHOF(testEnumStrings);
+ }
+
+ virtual const UnicodeString *snext(UErrorCode &status) {
+ if(U_SUCCESS(status) && i<LENGTHOF(testEnumStrings)) {
+ unistr=UnicodeString(testEnumStrings[i++], "");
+ return &unistr;
+ }
+
+ return NULL;
+ }
+
+ virtual void reset(UErrorCode& /*status*/) {
+ i=0;
+ }
+
+ static inline UClassID getStaticClassID() {
+ return (UClassID)&fgClassID;
+ }
+ virtual UClassID getDynamicClassID() const {
+ return getStaticClassID();
+ }
+
+private:
+ static const char fgClassID;
+
+ int32_t i, length;
+};
+
+const char TestEnumeration::fgClassID=0;
+
+void
+UnicodeStringTest::TestStringEnumeration() {
+ UnicodeString s;
+ TestEnumeration ten;
+ int32_t i, length;
+ UErrorCode status;
+
+ const UChar *pu;
+ const char *pc;
+
+ // test the next() default implementation and ensureCharsCapacity()
+ for(i=0; i<LENGTHOF(testEnumStrings); ++i) {
+ status=U_ZERO_ERROR;
+ pc=ten.next(&length, status);
+ s=UnicodeString(testEnumStrings[i], "");
+ if(U_FAILURE(status) || pc==NULL || length!=s.length() || UnicodeString(pc, length, "")!=s) {
+ errln("StringEnumeration.next(%d) failed", i);
+ }
+ }
+ status=U_ZERO_ERROR;
+ if(ten.next(&length, status)!=NULL) {
+ errln("StringEnumeration.next(done)!=NULL");
+ }
+
+ // test the unext() default implementation
+ ten.reset(status);
+ for(i=0; i<LENGTHOF(testEnumStrings); ++i) {
+ status=U_ZERO_ERROR;
+ pu=ten.unext(&length, status);
+ s=UnicodeString(testEnumStrings[i], "");
+ if(U_FAILURE(status) || pu==NULL || length!=s.length() || UnicodeString(TRUE, pu, length)!=s) {
+ errln("StringEnumeration.unext(%d) failed", i);
+ }
+ }
+ status=U_ZERO_ERROR;
+ if(ten.unext(&length, status)!=NULL) {
+ errln("StringEnumeration.unext(done)!=NULL");
+ }
+
+ // test that the default clone() implementation works, and returns NULL
+ if(ten.clone()!=NULL) {
+ errln("StringEnumeration.clone()!=NULL");
+ }
+}
+
+void
+UnicodeStringTest::TestCharString() {
+ static const char originalCStr[] =
+ "This is a large string that is meant to over flow the internal buffer of CharString. At the time of writing this test, the internal buffer is 128 bytes.";
+ CharString chStr(originalCStr);
+ if (strcmp(originalCStr, chStr) != 0) {
+ errln("CharString doesn't work with large strings.");
+ }
+}
+
+/*
+ * Namespace test, to make sure that macros like UNICODE_STRING include the
+ * namespace qualifier.
+ *
+ * Define a (bogus) UnicodeString class in another namespace and check for ambiguity.
+ */
+#if U_HAVE_NAMESPACE
+namespace bogus {
+ class UnicodeString {
+ public:
+ enum EInvariant { kInvariant };
+ UnicodeString() : i(1) {}
+ UnicodeString(UBool /*isTerminated*/, const UChar * /*text*/, int32_t textLength) : i(textLength) {}
+ UnicodeString(const char * /*src*/, int32_t length, enum EInvariant /*inv*/
+) : i(length) {}
+ private:
+ int32_t i;
+ };
+}
+#endif
+
+void
+UnicodeStringTest::TestNameSpace() {
+#if U_HAVE_NAMESPACE
+ // Provoke name collision unless the UnicodeString macros properly
+ // qualify the icu::UnicodeString class.
+ using namespace bogus;
+
+ // Use all UnicodeString macros from unistr.h.
+ icu::UnicodeString s1=icu::UnicodeString("abc", 3, US_INV);
+ icu::UnicodeString s2=UNICODE_STRING("def", 3);
+ icu::UnicodeString s3=UNICODE_STRING_SIMPLE("ghi");
+
+ // Make sure the compiler does not optimize away instantiation of s1, s2, s3.
+ icu::UnicodeString s4=s1+s2+s3;
+ if(s4.length()!=9) {
+ errln("Something wrong with UnicodeString::operator+().");
+ }
+#endif
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.h b/Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.h
new file mode 100644
index 00000000000..697db602786
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/ustrtest.h
@@ -0,0 +1,96 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 1997-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+#ifndef UNICODESTRINGTEST_H
+#define UNICODESTRINGTEST_H
+
+#include "unicode/unistr.h"
+#include "intltest.h"
+
+/**
+ * Perform API and functionality tests for class UnicodeString
+ **/
+class UnicodeStringTest: public IntlTest {
+public:
+ UnicodeStringTest() {}
+ virtual ~UnicodeStringTest();
+
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ /**
+ * Test some basic methods (insert, remove, replace, ...)
+ **/
+ void TestBasicManipulation(void);
+ /**
+ * Test the methods for comparison
+ **/
+ void TestCompare(void);
+ /**
+ * Test the methods for extracting
+ **/
+ void TestExtract(void);
+ /**
+ * More extensively test methods for removing and replacing
+ **/
+ void TestRemoveReplace(void);
+ /**
+ * Test language specific case conversions
+ **/
+ void TestSearching(void);
+ /**
+ * Test methods for padding, trimmimg and truncating
+ **/
+ void TestSpacePadding(void);
+ /**
+ * Test methods startsWith and endsWith
+ **/
+ void TestPrefixAndSuffix(void);
+ /**
+ * Test method findAndReplace
+ **/
+ void TestFindAndReplace(void);
+ /**
+ * Test method reverse
+ **/
+ void TestReverse(void);
+ /**
+ * Test a few miscellaneous methods (isBogus, hashCode,...)
+ **/
+ void TestMiscellaneous(void);
+ /**
+ * Test the functionality of allocating UnicodeStrings on the stack
+ **/
+ void TestStackAllocation(void);
+ /**
+ * Test the unescape() function.
+ */
+ void TestUnescape(void);
+
+ void _testUnicodeStringHasMoreChar32Than(const UnicodeString &s, int32_t start, int32_t length, int32_t number);
+ void TestCountChar32(void);
+ void TestBogus();
+ void TestStringEnumeration();
+ void TestCharString(void);
+ void TestNameSpace(void);
+};
+
+class StringCaseTest: public IntlTest {
+public:
+ StringCaseTest() {}
+ virtual ~StringCaseTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+
+ void TestCaseConversion();
+
+ void TestCasingImpl(const UnicodeString &input,
+ const UnicodeString &output,
+ int32_t whichCase,
+ void *iter, const char *localeID, uint32_t options);
+ void TestCasing();
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/utxttest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/utxttest.cpp
new file mode 100644
index 00000000000..d6264d9e6be
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/utxttest.cpp
@@ -0,0 +1,1400 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2005-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* Tests for the UText and UTextIterator text abstraction classses
+*
+************************************************************************/
+
+#include "unicode/utypes.h"
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unicode/utext.h>
+#include <unicode/utf8.h>
+#include <unicode/ustring.h>
+#include <unicode/uchriter.h>
+#include "utxttest.h"
+
+static UBool gFailed = FALSE;
+static int gTestNum = 0;
+
+// Forward decl
+UText *openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status);
+
+#define TEST_ASSERT(x) \
+{ if ((x)==FALSE) {errln("Test #%d failure in file %s at line %d\n", gTestNum, __FILE__, __LINE__);\
+ gFailed = TRUE;\
+ }}
+
+
+#define TEST_SUCCESS(status) \
+{ if (U_FAILURE(status)) {errln("Test #%d failure in file %s at line %d. Error = \"%s\"\n", \
+ gTestNum, __FILE__, __LINE__, u_errorName(status)); \
+ gFailed = TRUE;\
+ }}
+
+UTextTest::UTextTest() {
+}
+
+UTextTest::~UTextTest() {
+}
+
+
+void
+UTextTest::runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* /*par*/) {
+ switch (index) {
+ case 0: name = "TextTest";
+ if (exec) TextTest(); break;
+ case 1: name = "ErrorTest";
+ if (exec) ErrorTest(); break;
+ case 2: name = "FreezeTest";
+ if (exec) FreezeTest(); break;
+ case 3: name = "Ticket5560";
+ if (exec) Ticket5560(); break;
+ default: name = ""; break;
+ }
+}
+
+//
+// Quick and dirty random number generator.
+// (don't use library so that results are portable.
+static uint32_t m_seed = 1;
+static uint32_t m_rand()
+{
+ m_seed = m_seed * 1103515245 + 12345;
+ return (uint32_t)(m_seed/65536) % 32768;
+}
+
+
+//
+// TextTest()
+//
+// Top Level function for UText testing.
+// Specifies the strings to be tested, with the acutal testing itself
+// being carried out in another function, TestString().
+//
+void UTextTest::TextTest() {
+ int32_t i, j;
+
+ TestString("abcd\\U00010001xyz");
+ TestString("");
+
+ // Supplementary chars at start or end
+ TestString("\\U00010001");
+ TestString("abc\\U00010001");
+ TestString("\\U00010001abc");
+
+ // Test simple strings of lengths 1 to 60, looking for glitches at buffer boundaries
+ UnicodeString s;
+ for (i=1; i<60; i++) {
+ s.truncate(0);
+ for (j=0; j<i; j++) {
+ if (j+0x30 == 0x5c) {
+ // backslash. Needs to be escaped
+ s.append((UChar)0x5c);
+ }
+ s.append(UChar(j+0x30));
+ }
+ TestString(s);
+ }
+
+ // Test strings with odd-aligned supplementary chars,
+ // looking for glitches at buffer boundaries
+ for (i=1; i<60; i++) {
+ s.truncate(0);
+ s.append((UChar)0x41);
+ for (j=0; j<i; j++) {
+ s.append(UChar32(j+0x11000));
+ }
+ TestString(s);
+ }
+
+ // String of chars of randomly varying size in utf-8 representation.
+ // Exercise the mapping, and the varying sized buffer.
+ //
+ s.truncate(0);
+ UChar32 c1 = 0;
+ UChar32 c2 = 0x100;
+ UChar32 c3 = 0xa000;
+ UChar32 c4 = 0x11000;
+ for (i=0; i<1000; i++) {
+ int len8 = m_rand()%4 + 1;
+ switch (len8) {
+ case 1:
+ c1 = (c1+1)%0x80;
+ // don't put 0 into string (0 terminated strings for some tests)
+ // don't put '\', will cause unescape() to fail.
+ if (c1==0x5c || c1==0) {
+ c1++;
+ }
+ s.append(c1);
+ break;
+ case 2:
+ s.append(c2++);
+ break;
+ case 3:
+ s.append(c3++);
+ break;
+ case 4:
+ s.append(c4++);
+ break;
+ }
+ }
+ TestString(s);
+}
+
+
+//
+// TestString() Run a suite of UText tests on a string.
+// The test string is unescaped before use.
+//
+void UTextTest::TestString(const UnicodeString &s) {
+ int32_t i;
+ int32_t j;
+ UChar32 c;
+ int32_t cpCount = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UText *ut = NULL;
+ int32_t saLen;
+
+ UnicodeString sa = s.unescape();
+ saLen = sa.length();
+
+ //
+ // Build up a mapping between code points and UTF-16 code unit indexes.
+ //
+ m *cpMap = new m[sa.length() + 1];
+ j = 0;
+ for (i=0; i<sa.length(); i=sa.moveIndex32(i, 1)) {
+ c = sa.char32At(i);
+ cpMap[j].nativeIdx = i;
+ cpMap[j].cp = c;
+ j++;
+ cpCount++;
+ }
+ cpMap[j].nativeIdx = i; // position following the last char in utf-16 string.
+
+
+ // UChar * test, null terminated
+ status = U_ZERO_ERROR;
+ UChar *buf = new UChar[saLen+1];
+ sa.extract(buf, saLen+1, status);
+ TEST_SUCCESS(status);
+ ut = utext_openUChars(NULL, buf, -1, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, cpMap);
+ utext_close(ut);
+ delete [] buf;
+
+ // UChar * test, with length
+ status = U_ZERO_ERROR;
+ buf = new UChar[saLen+1];
+ sa.extract(buf, saLen+1, status);
+ TEST_SUCCESS(status);
+ ut = utext_openUChars(NULL, buf, saLen, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, cpMap);
+ utext_close(ut);
+ delete [] buf;
+
+
+ // UnicodeString test
+ status = U_ZERO_ERROR;
+ ut = utext_openUnicodeString(NULL, &sa, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, cpMap);
+ TestCMR(sa, ut, cpCount, cpMap, cpMap);
+ utext_close(ut);
+
+
+ // Const UnicodeString test
+ status = U_ZERO_ERROR;
+ ut = utext_openConstUnicodeString(NULL, &sa, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, cpMap);
+ utext_close(ut);
+
+
+ // Replaceable test. (UnicodeString inherits Replaceable)
+ status = U_ZERO_ERROR;
+ ut = utext_openReplaceable(NULL, &sa, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, cpMap);
+ TestCMR(sa, ut, cpCount, cpMap, cpMap);
+ utext_close(ut);
+
+ // Character Iterator Tests
+ status = U_ZERO_ERROR;
+ const UChar *cbuf = sa.getBuffer();
+ CharacterIterator *ci = new UCharCharacterIterator(cbuf, saLen, status);
+ TEST_SUCCESS(status);
+ ut = utext_openCharacterIterator(NULL, ci, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, cpMap);
+ utext_close(ut);
+ delete ci;
+
+
+ // Fragmented UnicodeString (Chunk size of one)
+ //
+ status = U_ZERO_ERROR;
+ ut = openFragmentedUnicodeString(NULL, &sa, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, cpMap);
+ utext_close(ut);
+
+ //
+ // UTF-8 test
+ //
+
+ // Convert the test string from UnicodeString to (char *) in utf-8 format
+ int32_t u8Len = sa.extract(0, sa.length(), NULL, 0, "utf-8");
+ char *u8String = new char[u8Len + 1];
+ sa.extract(0, sa.length(), u8String, u8Len+1, "utf-8");
+
+ // Build up the map of code point indices in the utf-8 string
+ m * u8Map = new m[sa.length() + 1];
+ i = 0; // native utf-8 index
+ for (j=0; j<cpCount ; j++) { // code point number
+ u8Map[j].nativeIdx = i;
+ U8_NEXT(u8String, i, u8Len, c)
+ u8Map[j].cp = c;
+ }
+ u8Map[cpCount].nativeIdx = u8Len; // position following the last char in utf-8 string.
+
+ // Do the test itself
+ status = U_ZERO_ERROR;
+ ut = utext_openUTF8(NULL, u8String, -1, &status);
+ TEST_SUCCESS(status);
+ TestAccess(sa, ut, cpCount, u8Map);
+ utext_close(ut);
+
+
+
+ delete []cpMap;
+ delete []u8Map;
+ delete []u8String;
+}
+
+// TestCMR test Copy, Move and Replace operations.
+// us UnicodeString containing the test text.
+// ut UText containing the same test text.
+// cpCount number of code points in the test text.
+// nativeMap Mapping from code points to native indexes for the UText.
+// u16Map Mapping from code points to UTF-16 indexes, for use with the UnicodeString.
+//
+// This function runs a whole series of opertions on each incoming UText.
+// The UText is deep-cloned prior to each operation, so that the original UText remains unchanged.
+//
+void UTextTest::TestCMR(const UnicodeString &us, UText *ut, int cpCount, m *nativeMap, m *u16Map) {
+ TEST_ASSERT(utext_isWritable(ut) == TRUE);
+
+ int srcLengthType; // Loop variables for selecting the postion and length
+ int srcPosType; // of the block to operate on within the source text.
+ int destPosType;
+
+ int srcIndex = 0; // Code Point indexes of the block to operate on for
+ int srcLength = 0; // a specific test.
+
+ int destIndex = 0; // Code point index of the destination for a copy/move test.
+
+ int32_t nativeStart = 0; // Native unit indexes for a test.
+ int32_t nativeLimit = 0;
+ int32_t nativeDest = 0;
+
+ int32_t u16Start = 0; // UTF-16 indexes for a test.
+ int32_t u16Limit = 0; // used when performing the same operation in a Unicode String
+ int32_t u16Dest = 0;
+
+ // Iterate over a whole series of source index, length and a target indexes.
+ // This is done with code point indexes; these will be later translated to native
+ // indexes using the cpMap.
+ for (srcLengthType=1; srcLengthType<=3; srcLengthType++) {
+ switch (srcLengthType) {
+ case 1: srcLength = 1; break;
+ case 2: srcLength = 5; break;
+ case 3: srcLength = cpCount / 3;
+ }
+ for (srcPosType=1; srcPosType<=5; srcPosType++) {
+ switch (srcPosType) {
+ case 1: srcIndex = 0; break;
+ case 2: srcIndex = 1; break;
+ case 3: srcIndex = cpCount - srcLength; break;
+ case 4: srcIndex = cpCount - srcLength - 1; break;
+ case 5: srcIndex = cpCount / 2; break;
+ }
+ if (srcIndex < 0 || srcIndex + srcLength > cpCount) {
+ // filter out bogus test cases -
+ // those with a source range that falls of an edge of the string.
+ continue;
+ }
+
+ //
+ // Copy and move tests.
+ // iterate over a variety of destination positions.
+ //
+ for (destPosType=1; destPosType<=4; destPosType++) {
+ switch (destPosType) {
+ case 1: destIndex = 0; break;
+ case 2: destIndex = 1; break;
+ case 3: destIndex = srcIndex - 1; break;
+ case 4: destIndex = srcIndex + srcLength + 1; break;
+ case 5: destIndex = cpCount-1; break;
+ case 6: destIndex = cpCount; break;
+ }
+ if (destIndex<0 || destIndex>cpCount) {
+ // filter out bogus test cases.
+ continue;
+ }
+
+ nativeStart = nativeMap[srcIndex].nativeIdx;
+ nativeLimit = nativeMap[srcIndex+srcLength].nativeIdx;
+ nativeDest = nativeMap[destIndex].nativeIdx;
+
+ u16Start = u16Map[srcIndex].nativeIdx;
+ u16Limit = u16Map[srcIndex+srcLength].nativeIdx;
+ u16Dest = u16Map[destIndex].nativeIdx;
+
+ gFailed = FALSE;
+ TestCopyMove(us, ut, FALSE,
+ nativeStart, nativeLimit, nativeDest,
+ u16Start, u16Limit, u16Dest);
+
+ TestCopyMove(us, ut, TRUE,
+ nativeStart, nativeLimit, nativeDest,
+ u16Start, u16Limit, u16Dest);
+
+ if (gFailed) {
+ return;
+ }
+ }
+
+ //
+ // Replace tests.
+ //
+ UnicodeString fullRepString("This is an arbitrary string that will be used as replacement text");
+ for (int32_t replStrLen=0; replStrLen<20; replStrLen++) {
+ UnicodeString repStr(fullRepString, 0, replStrLen);
+ TestReplace(us, ut,
+ nativeStart, nativeLimit,
+ u16Start, u16Limit,
+ repStr);
+ if (gFailed) {
+ return;
+ }
+ }
+
+ }
+ }
+
+}
+
+//
+// TestCopyMove run a single test case for utext_copy.
+// Test cases are created in TestCMR and dispatched here for execution.
+//
+void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move,
+ int32_t nativeStart, int32_t nativeLimit, int32_t nativeDest,
+ int32_t u16Start, int32_t u16Limit, int32_t u16Dest)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UText *targetUT = NULL;
+ gTestNum++;
+ gFailed = FALSE;
+
+ //
+ // clone the UText. The test will be run in the cloned copy
+ // so that we don't alter the original.
+ //
+ targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status);
+ TEST_SUCCESS(status);
+ UnicodeString targetUS(us); // And copy the reference string.
+
+ // do the test operation first in the reference
+ targetUS.copy(u16Start, u16Limit, u16Dest);
+ if (move) {
+ // delete out the source range.
+ if (u16Limit < u16Dest) {
+ targetUS.removeBetween(u16Start, u16Limit);
+ } else {
+ int32_t amtCopied = u16Limit - u16Start;
+ targetUS.removeBetween(u16Start+amtCopied, u16Limit+amtCopied);
+ }
+ }
+
+ // Do the same operation in the UText under test
+ utext_copy(targetUT, nativeStart, nativeLimit, nativeDest, move, &status);
+ if (nativeDest > nativeStart && nativeDest < nativeLimit) {
+ TEST_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
+ } else {
+ TEST_SUCCESS(status);
+
+ // Compare the results of the two parallel tests
+ int32_t usi = 0; // UnicodeString postion, utf-16 index.
+ int64_t uti = 0; // UText position, native index.
+ int32_t cpi; // char32 position (code point index)
+ UChar32 usc; // code point from Unicode String
+ UChar32 utc; // code point from UText
+ utext_setNativeIndex(targetUT, 0);
+ for (cpi=0; ; cpi++) {
+ usc = targetUS.char32At(usi);
+ utc = utext_next32(targetUT);
+ if (utc < 0) {
+ break;
+ }
+ TEST_ASSERT(uti == usi);
+ TEST_ASSERT(utc == usc);
+ usi = targetUS.moveIndex32(usi, 1);
+ uti = utext_getNativeIndex(targetUT);
+ if (gFailed) {
+ goto cleanupAndReturn;
+ }
+ }
+ int64_t expectedNativeLength = utext_nativeLength(ut);
+ if (move == FALSE) {
+ expectedNativeLength += nativeLimit - nativeStart;
+ }
+ uti = utext_getNativeIndex(targetUT);
+ TEST_ASSERT(uti == expectedNativeLength);
+ }
+
+cleanupAndReturn:
+ utext_close(targetUT);
+}
+
+
+//
+// TestReplace Test a single Replace operation.
+//
+void UTextTest::TestReplace(
+ const UnicodeString &us, // reference UnicodeString in which to do the replace
+ UText *ut, // UnicodeText object under test.
+ int32_t nativeStart, // Range to be replaced, in UText native units.
+ int32_t nativeLimit,
+ int32_t u16Start, // Range to be replaced, in UTF-16 units
+ int32_t u16Limit, // for use in the reference UnicodeString.
+ const UnicodeString &repStr) // The replacement string
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UText *targetUT = NULL;
+ gTestNum++;
+ gFailed = FALSE;
+
+ //
+ // clone the target UText. The test will be run in the cloned copy
+ // so that we don't alter the original.
+ //
+ targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status);
+ TEST_SUCCESS(status);
+ UnicodeString targetUS(us); // And copy the reference string.
+
+ //
+ // Do the replace operation in the Unicode String, to
+ // produce a reference result.
+ //
+ targetUS.replace(u16Start, u16Limit-u16Start, repStr);
+
+ //
+ // Do the replace on the UText under test
+ //
+ const UChar *rs = repStr.getBuffer();
+ int32_t rsLen = repStr.length();
+ int32_t actualDelta = utext_replace(targetUT, nativeStart, nativeLimit, rs, rsLen, &status);
+ int32_t expectedDelta = repStr.length() - (nativeLimit - nativeStart);
+ TEST_ASSERT(actualDelta == expectedDelta);
+
+ //
+ // Compare the results
+ //
+ int32_t usi = 0; // UnicodeString postion, utf-16 index.
+ int64_t uti = 0; // UText position, native index.
+ int32_t cpi; // char32 position (code point index)
+ UChar32 usc; // code point from Unicode String
+ UChar32 utc; // code point from UText
+ int64_t expectedNativeLength = 0;
+ utext_setNativeIndex(targetUT, 0);
+ for (cpi=0; ; cpi++) {
+ usc = targetUS.char32At(usi);
+ utc = utext_next32(targetUT);
+ if (utc < 0) {
+ break;
+ }
+ TEST_ASSERT(uti == usi);
+ TEST_ASSERT(utc == usc);
+ usi = targetUS.moveIndex32(usi, 1);
+ uti = utext_getNativeIndex(targetUT);
+ if (gFailed) {
+ goto cleanupAndReturn;
+ }
+ }
+ expectedNativeLength = utext_nativeLength(ut) + expectedDelta;
+ uti = utext_getNativeIndex(targetUT);
+ TEST_ASSERT(uti == expectedNativeLength);
+
+cleanupAndReturn:
+ utext_close(targetUT);
+}
+
+//
+// TestAccess Test the read only access functions on a UText, including cloning.
+// The text is accessed in a variety of ways, and compared with
+// the reference UnicodeString.
+//
+void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *cpMap) {
+ // Run the standard tests on the caller-supplied UText.
+ TestAccessNoClone(us, ut, cpCount, cpMap);
+
+ // Re-run tests on a shallow clone.
+ utext_setNativeIndex(ut, 0);
+ UErrorCode status = U_ZERO_ERROR;
+ UText *shallowClone = utext_clone(NULL, ut, FALSE /*deep*/, FALSE /*readOnly*/, &status);
+ TEST_SUCCESS(status);
+ TestAccessNoClone(us, shallowClone, cpCount, cpMap);
+
+ //
+ // Rerun again on a deep clone.
+ // Note that text providers are not required to provide deep cloning,
+ // so unsupported errors are ignored.
+ //
+ status = U_ZERO_ERROR;
+ utext_setNativeIndex(shallowClone, 0);
+ UText *deepClone = utext_clone(NULL, shallowClone, TRUE, FALSE, &status);
+ utext_close(shallowClone);
+ if (status != U_UNSUPPORTED_ERROR) {
+ TEST_SUCCESS(status);
+ TestAccessNoClone(us, deepClone, cpCount, cpMap);
+ }
+ utext_close(deepClone);
+}
+
+
+//
+// TestAccessNoClone() Test the read only access functions on a UText.
+// The text is accessed in a variety of ways, and compared with
+// the reference UnicodeString.
+//
+void UTextTest::TestAccessNoClone(const UnicodeString &us, UText *ut, int cpCount, m *cpMap) {
+ UErrorCode status = U_ZERO_ERROR;
+ gTestNum++;
+
+ //
+ // Check the length from the UText
+ //
+ int64_t expectedLen = cpMap[cpCount].nativeIdx;
+ int64_t utlen = utext_nativeLength(ut);
+ TEST_ASSERT(expectedLen == utlen);
+
+ //
+ // Iterate forwards, verify that we get the correct code points
+ // at the correct native offsets.
+ //
+ int i = 0;
+ int64_t index;
+ int64_t expectedIndex = 0;
+ int64_t foundIndex = 0;
+ UChar32 expectedC;
+ UChar32 foundC;
+ int64_t len;
+
+ for (i=0; i<cpCount; i++) {
+ expectedIndex = cpMap[i].nativeIdx;
+ foundIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(expectedIndex == foundIndex);
+ expectedC = cpMap[i].cp;
+ foundC = utext_next32(ut);
+ TEST_ASSERT(expectedC == foundC);
+ foundIndex = utext_getPreviousNativeIndex(ut);
+ TEST_ASSERT(expectedIndex == foundIndex);
+ if (gFailed) {
+ return;
+ }
+ }
+ foundC = utext_next32(ut);
+ TEST_ASSERT(foundC == U_SENTINEL);
+
+ // Repeat above, using macros
+ utext_setNativeIndex(ut, 0);
+ for (i=0; i<cpCount; i++) {
+ expectedIndex = cpMap[i].nativeIdx;
+ foundIndex = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(expectedIndex == foundIndex);
+ expectedC = cpMap[i].cp;
+ foundC = UTEXT_NEXT32(ut);
+ TEST_ASSERT(expectedC == foundC);
+ if (gFailed) {
+ return;
+ }
+ }
+ foundC = UTEXT_NEXT32(ut);
+ TEST_ASSERT(foundC == U_SENTINEL);
+
+ //
+ // Forward iteration (above) should have left index at the
+ // end of the input, which should == length().
+ //
+ len = utext_nativeLength(ut);
+ foundIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(len == foundIndex);
+
+ //
+ // Iterate backwards over entire test string
+ //
+ len = utext_getNativeIndex(ut);
+ utext_setNativeIndex(ut, len);
+ for (i=cpCount-1; i>=0; i--) {
+ expectedC = cpMap[i].cp;
+ expectedIndex = cpMap[i].nativeIdx;
+ int64_t prevIndex = utext_getPreviousNativeIndex(ut);
+ foundC = utext_previous32(ut);
+ foundIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(expectedIndex == foundIndex);
+ TEST_ASSERT(expectedC == foundC);
+ TEST_ASSERT(prevIndex == foundIndex);
+ if (gFailed) {
+ return;
+ }
+ }
+
+ //
+ // Backwards iteration, above, should have left our iterator
+ // position at zero, and continued backwards iterationshould fail.
+ //
+ foundIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(foundIndex == 0);
+ foundIndex = utext_getPreviousNativeIndex(ut);
+ TEST_ASSERT(foundIndex == 0);
+
+
+ foundC = utext_previous32(ut);
+ TEST_ASSERT(foundC == U_SENTINEL);
+ foundIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(foundIndex == 0);
+ foundIndex = utext_getPreviousNativeIndex(ut);
+ TEST_ASSERT(foundIndex == 0);
+
+
+ // And again, with the macros
+ utext_setNativeIndex(ut, len);
+ for (i=cpCount-1; i>=0; i--) {
+ expectedC = cpMap[i].cp;
+ expectedIndex = cpMap[i].nativeIdx;
+ foundC = UTEXT_PREVIOUS32(ut);
+ foundIndex = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(expectedIndex == foundIndex);
+ TEST_ASSERT(expectedC == foundC);
+ if (gFailed) {
+ return;
+ }
+ }
+
+ //
+ // Backwards iteration, above, should have left our iterator
+ // position at zero, and continued backwards iterationshould fail.
+ //
+ foundIndex = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(foundIndex == 0);
+
+ foundC = UTEXT_PREVIOUS32(ut);
+ TEST_ASSERT(foundC == U_SENTINEL);
+ foundIndex = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(foundIndex == 0);
+ if (gFailed) {
+ return;
+ }
+
+ //
+ // next32From(), prevous32From(), Iterate in a somewhat random order.
+ //
+ int cpIndex = 0;
+ for (i=0; i<cpCount; i++) {
+ cpIndex = (cpIndex + 9973) % cpCount;
+ index = cpMap[cpIndex].nativeIdx;
+ expectedC = cpMap[cpIndex].cp;
+ foundC = utext_next32From(ut, index);
+ TEST_ASSERT(expectedC == foundC);
+ if (gFailed) {
+ return;
+ }
+ }
+
+ cpIndex = 0;
+ for (i=0; i<cpCount; i++) {
+ cpIndex = (cpIndex + 9973) % cpCount;
+ index = cpMap[cpIndex+1].nativeIdx;
+ expectedC = cpMap[cpIndex].cp;
+ foundC = utext_previous32From(ut, index);
+ TEST_ASSERT(expectedC == foundC);
+ if (gFailed) {
+ return;
+ }
+ }
+
+
+ //
+ // moveIndex(int32_t delta);
+ //
+
+ // Walk through frontwards, incrementing by one
+ utext_setNativeIndex(ut, 0);
+ for (i=1; i<=cpCount; i++) {
+ utext_moveIndex32(ut, 1);
+ index = utext_getNativeIndex(ut);
+ expectedIndex = cpMap[i].nativeIdx;
+ TEST_ASSERT(expectedIndex == index);
+ index = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(expectedIndex == index);
+ }
+
+ // Walk through frontwards, incrementing by two
+ utext_setNativeIndex(ut, 0);
+ for (i=2; i<cpCount; i+=2) {
+ utext_moveIndex32(ut, 2);
+ index = utext_getNativeIndex(ut);
+ expectedIndex = cpMap[i].nativeIdx;
+ TEST_ASSERT(expectedIndex == index);
+ index = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(expectedIndex == index);
+ }
+
+ // walk through the string backwards, decrementing by one.
+ i = cpMap[cpCount].nativeIdx;
+ utext_setNativeIndex(ut, i);
+ for (i=cpCount; i>=0; i--) {
+ expectedIndex = cpMap[i].nativeIdx;
+ index = utext_getNativeIndex(ut);
+ TEST_ASSERT(expectedIndex == index);
+ index = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(expectedIndex == index);
+ utext_moveIndex32(ut, -1);
+ }
+
+
+ // walk through backwards, decrementing by three
+ i = cpMap[cpCount].nativeIdx;
+ utext_setNativeIndex(ut, i);
+ for (i=cpCount; i>=0; i-=3) {
+ expectedIndex = cpMap[i].nativeIdx;
+ index = utext_getNativeIndex(ut);
+ TEST_ASSERT(expectedIndex == index);
+ index = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(expectedIndex == index);
+ utext_moveIndex32(ut, -3);
+ }
+
+
+ //
+ // Extract
+ //
+ int bufSize = us.length() + 10;
+ UChar *buf = new UChar[bufSize];
+ status = U_ZERO_ERROR;
+ expectedLen = us.length();
+ len = utext_extract(ut, 0, utlen, buf, bufSize, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(len == expectedLen);
+ int compareResult = us.compare(buf, -1);
+ TEST_ASSERT(compareResult == 0);
+
+ status = U_ZERO_ERROR;
+ len = utext_extract(ut, 0, utlen, NULL, 0, &status);
+ if (utlen == 0) {
+ TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ } else {
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ }
+ TEST_ASSERT(len == expectedLen);
+
+ status = U_ZERO_ERROR;
+ u_memset(buf, 0x5555, bufSize);
+ len = utext_extract(ut, 0, utlen, buf, 1, &status);
+ if (us.length() == 0) {
+ TEST_SUCCESS(status);
+ TEST_ASSERT(buf[0] == 0);
+ } else {
+ // Buf len == 1, extracting a single 16 bit value.
+ // If the data char is supplementary, it doesn't matter whether the buffer remains unchanged,
+ // or whether the lead surrogate of the pair is extracted.
+ // It's a buffer overflow error in either case.
+ TEST_ASSERT(buf[0] == us.charAt(0) ||
+ buf[0] == 0x5555 && U_IS_SUPPLEMENTARY(us.char32At(0)));
+ TEST_ASSERT(buf[1] == 0x5555);
+ if (us.length() == 1) {
+ TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ } else {
+ TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
+ }
+ }
+
+ delete []buf;
+}
+
+
+
+//
+// ErrorTest() Check various error and edge cases.
+//
+void UTextTest::ErrorTest()
+{
+ // Close of an unitialized UText. Shouldn't blow up.
+ {
+ UText ut;
+ memset(&ut, 0, sizeof(UText));
+ utext_close(&ut);
+ utext_close(NULL);
+ }
+
+ // Double-close of a UText. Shouldn't blow up. UText should still be usable.
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UText ut = UTEXT_INITIALIZER;
+ UnicodeString s("Hello, World");
+ UText *ut2 = utext_openUnicodeString(&ut, &s, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(ut2 == &ut);
+
+ UText *ut3 = utext_close(&ut);
+ TEST_ASSERT(ut3 == &ut);
+
+ UText *ut4 = utext_close(&ut);
+ TEST_ASSERT(ut4 == &ut);
+
+ utext_openUnicodeString(&ut, &s, &status);
+ TEST_SUCCESS(status);
+ utext_close(&ut);
+ }
+
+ // Re-use of a UText, chaining through each of the types of UText
+ // (If it doesn't blow up, and doesn't leak, it's probably working fine)
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UText ut = UTEXT_INITIALIZER;
+ UText *utp;
+ UnicodeString s1("Hello, World");
+ UChar s2[] = {(UChar)0x41, (UChar)0x42, (UChar)0};
+ const char *s3 = "\x66\x67\x68";
+
+ utp = utext_openUnicodeString(&ut, &s1, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(utp == &ut);
+
+ utp = utext_openConstUnicodeString(&ut, &s1, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(utp == &ut);
+
+ utp = utext_openUTF8(&ut, s3, -1, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(utp == &ut);
+
+ utp = utext_openUChars(&ut, s2, -1, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(utp == &ut);
+
+ utp = utext_close(&ut);
+ TEST_ASSERT(utp == &ut);
+
+ utp = utext_openUnicodeString(&ut, &s1, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(utp == &ut);
+ }
+
+ //
+ // UTF-8 with malformed sequences.
+ // These should come through as the Unicode replacement char, \ufffd
+ //
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UText *ut = NULL;
+ const char *badUTF8 = "\x41\x81\x42\xf0\x81\x81\x43";
+ UChar32 c;
+
+ ut = utext_openUTF8(NULL, badUTF8, -1, &status);
+ TEST_SUCCESS(status);
+ c = utext_char32At(ut, 1);
+ TEST_ASSERT(c == 0xfffd);
+ c = utext_char32At(ut, 3);
+ TEST_ASSERT(c == 0xfffd);
+ c = utext_char32At(ut, 5);
+ TEST_ASSERT(c == 0xfffd);
+ c = utext_char32At(ut, 6);
+ TEST_ASSERT(c == 0x43);
+
+ UChar buf[10];
+ int n = utext_extract(ut, 0, 9, buf, 10, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(n==5);
+ TEST_ASSERT(buf[1] == 0xfffd);
+ TEST_ASSERT(buf[3] == 0xfffd);
+ TEST_ASSERT(buf[2] == 0x42);
+ utext_close(ut);
+ }
+
+
+ //
+ // isLengthExpensive - does it make the exptected transitions after
+ // getting the length of a nul terminated string?
+ //
+ {
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeString sa("Hello, this is a string");
+ UBool isExpensive;
+
+ UChar sb[100];
+ memset(sb, 0x20, sizeof(sb));
+ sb[99] = 0;
+
+ UText *uta = utext_openUnicodeString(NULL, &sa, &status);
+ TEST_SUCCESS(status);
+ isExpensive = utext_isLengthExpensive(uta);
+ TEST_ASSERT(isExpensive == FALSE);
+ utext_close(uta);
+
+ UText *utb = utext_openUChars(NULL, sb, -1, &status);
+ TEST_SUCCESS(status);
+ isExpensive = utext_isLengthExpensive(utb);
+ TEST_ASSERT(isExpensive == TRUE);
+ int64_t len = utext_nativeLength(utb);
+ TEST_ASSERT(len == 99);
+ isExpensive = utext_isLengthExpensive(utb);
+ TEST_ASSERT(isExpensive == FALSE);
+ utext_close(utb);
+ }
+
+ //
+ // Index to positions not on code point boundaries.
+ //
+ {
+ const char *u8str = "\xc8\x81\xe1\x82\x83\xf1\x84\x85\x86";
+ int32_t startMap[] = { 0, 0, 2, 2, 2, 5, 5, 5, 5, 9, 9};
+ int32_t nextMap[] = { 2, 2, 5, 5, 5, 9, 9, 9, 9, 9, 9};
+ int32_t prevMap[] = { 0, 0, 0, 0, 0, 2, 2, 2, 2, 5, 5};
+ UChar32 c32Map[] = {0x201, 0x201, 0x1083, 0x1083, 0x1083, 0x044146, 0x044146, 0x044146, 0x044146, -1, -1};
+ UChar32 pr32Map[] = { -1, -1, 0x201, 0x201, 0x201, 0x1083, 0x1083, 0x1083, 0x1083, 0x044146, 0x044146};
+
+ // extractLen is the size, in UChars, of what will be extracted between index and index+1.
+ // is zero when both index positions lie within the same code point.
+ int32_t exLen[] = { 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0};
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ UText *ut = utext_openUTF8(NULL, u8str, -1, &status);
+ TEST_SUCCESS(status);
+
+ // Check setIndex
+ int32_t i;
+ int32_t startMapLimit = sizeof(startMap) / sizeof(int32_t);
+ for (i=0; i<startMapLimit; i++) {
+ utext_setNativeIndex(ut, i);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == startMap[i]);
+ cpIndex = UTEXT_GETNATIVEINDEX(ut);
+ TEST_ASSERT(cpIndex == startMap[i]);
+ }
+
+ // Check char32At
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_char32At(ut, i);
+ TEST_ASSERT(c32 == c32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == startMap[i]);
+ }
+
+ // Check utext_next32From
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_next32From(ut, i);
+ TEST_ASSERT(c32 == c32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == nextMap[i]);
+ }
+
+ // check utext_previous32From
+ for (i=0; i<startMapLimit; i++) {
+ gTestNum++;
+ UChar32 c32 = utext_previous32From(ut, i);
+ TEST_ASSERT(c32 == pr32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == prevMap[i]);
+ }
+
+ // check Extract
+ // Extract from i to i+1, which may be zero or one code points,
+ // depending on whether the indices straddle a cp boundary.
+ for (i=0; i<startMapLimit; i++) {
+ UChar buf[3];
+ status = U_ZERO_ERROR;
+ int32_t extractedLen = utext_extract(ut, i, i+1, buf, 3, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(extractedLen == exLen[i]);
+ if (extractedLen > 0) {
+ UChar32 c32;
+ /* extractedLen-extractedLen == 0 is used to get around a compiler warning. */
+ U16_GET(buf, 0, extractedLen-extractedLen, extractedLen, c32);
+ TEST_ASSERT(c32 == c32Map[i]);
+ }
+ }
+
+ utext_close(ut);
+ }
+
+
+ { // Similar test, with utf16 instead of utf8
+ // TODO: merge the common parts of these tests.
+
+ UnicodeString u16str("\\u1000\\U00011000\\u2000\\U00022000");
+ int32_t startMap[] ={ 0, 1, 1, 3, 4, 4, 6, 6};
+ int32_t nextMap[] = { 1, 3, 3, 4, 6, 6, 6, 6};
+ int32_t prevMap[] = { 0, 0, 0, 1, 3, 3, 4, 4};
+ UChar32 c32Map[] = {0x1000, 0x11000, 0x11000, 0x2000, 0x22000, 0x22000, -1, -1};
+ UChar32 pr32Map[] = { -1, 0x1000, 0x1000, 0x11000, 0x2000, 0x2000, 0x22000, 0x22000};
+ int32_t exLen[] = { 1, 0, 2, 1, 0, 2, 0, 0,};
+
+ u16str = u16str.unescape();
+ UErrorCode status = U_ZERO_ERROR;
+ UText *ut = utext_openUnicodeString(NULL, &u16str, &status);
+ TEST_SUCCESS(status);
+
+ int32_t startMapLimit = sizeof(startMap) / sizeof(int32_t);
+ int i;
+ for (i=0; i<startMapLimit; i++) {
+ utext_setNativeIndex(ut, i);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == startMap[i]);
+ }
+
+ // Check char32At
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_char32At(ut, i);
+ TEST_ASSERT(c32 == c32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == startMap[i]);
+ }
+
+ // Check utext_next32From
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_next32From(ut, i);
+ TEST_ASSERT(c32 == c32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == nextMap[i]);
+ }
+
+ // check utext_previous32From
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_previous32From(ut, i);
+ TEST_ASSERT(c32 == pr32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == prevMap[i]);
+ }
+
+ // check Extract
+ // Extract from i to i+1, which may be zero or one code points,
+ // depending on whether the indices straddle a cp boundary.
+ for (i=0; i<startMapLimit; i++) {
+ UChar buf[3];
+ status = U_ZERO_ERROR;
+ int32_t extractedLen = utext_extract(ut, i, i+1, buf, 3, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(extractedLen == exLen[i]);
+ if (extractedLen > 0) {
+ UChar32 c32;
+ /* extractedLen-extractedLen == 0 is used to get around a compiler warning. */
+ U16_GET(buf, 0, extractedLen-extractedLen, extractedLen, c32);
+ TEST_ASSERT(c32 == c32Map[i]);
+ }
+ }
+
+ utext_close(ut);
+ }
+
+ { // Similar test, with UText over Replaceable
+ // TODO: merge the common parts of these tests.
+
+ UnicodeString u16str("\\u1000\\U00011000\\u2000\\U00022000");
+ int32_t startMap[] ={ 0, 1, 1, 3, 4, 4, 6, 6};
+ int32_t nextMap[] = { 1, 3, 3, 4, 6, 6, 6, 6};
+ int32_t prevMap[] = { 0, 0, 0, 1, 3, 3, 4, 4};
+ UChar32 c32Map[] = {0x1000, 0x11000, 0x11000, 0x2000, 0x22000, 0x22000, -1, -1};
+ UChar32 pr32Map[] = { -1, 0x1000, 0x1000, 0x11000, 0x2000, 0x2000, 0x22000, 0x22000};
+ int32_t exLen[] = { 1, 0, 2, 1, 0, 2, 0, 0,};
+
+ u16str = u16str.unescape();
+ UErrorCode status = U_ZERO_ERROR;
+ UText *ut = utext_openReplaceable(NULL, &u16str, &status);
+ TEST_SUCCESS(status);
+
+ int32_t startMapLimit = sizeof(startMap) / sizeof(int32_t);
+ int i;
+ for (i=0; i<startMapLimit; i++) {
+ utext_setNativeIndex(ut, i);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == startMap[i]);
+ }
+
+ // Check char32At
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_char32At(ut, i);
+ TEST_ASSERT(c32 == c32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == startMap[i]);
+ }
+
+ // Check utext_next32From
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_next32From(ut, i);
+ TEST_ASSERT(c32 == c32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == nextMap[i]);
+ }
+
+ // check utext_previous32From
+ for (i=0; i<startMapLimit; i++) {
+ UChar32 c32 = utext_previous32From(ut, i);
+ TEST_ASSERT(c32 == pr32Map[i]);
+ int64_t cpIndex = utext_getNativeIndex(ut);
+ TEST_ASSERT(cpIndex == prevMap[i]);
+ }
+
+ // check Extract
+ // Extract from i to i+1, which may be zero or one code points,
+ // depending on whether the indices straddle a cp boundary.
+ for (i=0; i<startMapLimit; i++) {
+ UChar buf[3];
+ status = U_ZERO_ERROR;
+ int32_t extractedLen = utext_extract(ut, i, i+1, buf, 3, &status);
+ TEST_SUCCESS(status);
+ TEST_ASSERT(extractedLen == exLen[i]);
+ if (extractedLen > 0) {
+ UChar32 c32;
+ /* extractedLen-extractedLen == 0 is used to get around a compiler warning. */
+ U16_GET(buf, 0, extractedLen-extractedLen, extractedLen, c32);
+ TEST_ASSERT(c32 == c32Map[i]);
+ }
+ }
+
+ utext_close(ut);
+ }
+}
+
+
+void UTextTest::FreezeTest() {
+ // Check isWritable() and freeze() behavior.
+ //
+
+ UnicodeString ustr("Hello, World.");
+ const char u8str[] = {char(0x31), (char)0x32, (char)0x33, 0};
+ const UChar u16str[] = {(UChar)0x31, (UChar)0x32, (UChar)0x44, 0};
+
+ UErrorCode status = U_ZERO_ERROR;
+ UText *ut = NULL;
+ UText *ut2 = NULL;
+
+ ut = utext_openUTF8(ut, u8str, -1, &status);
+ TEST_SUCCESS(status);
+ UBool writable = utext_isWritable(ut);
+ TEST_ASSERT(writable == FALSE);
+ utext_copy(ut, 1, 2, 0, TRUE, &status);
+ TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
+
+ status = U_ZERO_ERROR;
+ ut = utext_openUChars(ut, u16str, -1, &status);
+ TEST_SUCCESS(status);
+ writable = utext_isWritable(ut);
+ TEST_ASSERT(writable == FALSE);
+ utext_copy(ut, 1, 2, 0, TRUE, &status);
+ TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
+
+ status = U_ZERO_ERROR;
+ ut = utext_openUnicodeString(ut, &ustr, &status);
+ TEST_SUCCESS(status);
+ writable = utext_isWritable(ut);
+ TEST_ASSERT(writable == TRUE);
+ utext_freeze(ut);
+ writable = utext_isWritable(ut);
+ TEST_ASSERT(writable == FALSE);
+ utext_copy(ut, 1, 2, 0, TRUE, &status);
+ TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
+
+ status = U_ZERO_ERROR;
+ ut = utext_openUnicodeString(ut, &ustr, &status);
+ TEST_SUCCESS(status);
+ ut2 = utext_clone(ut2, ut, FALSE, FALSE, &status); // clone with readonly = false
+ TEST_SUCCESS(status);
+ writable = utext_isWritable(ut2);
+ TEST_ASSERT(writable == TRUE);
+ ut2 = utext_clone(ut2, ut, FALSE, TRUE, &status); // clone with readonly = true
+ TEST_SUCCESS(status);
+ writable = utext_isWritable(ut2);
+ TEST_ASSERT(writable == FALSE);
+ utext_copy(ut2, 1, 2, 0, TRUE, &status);
+ TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
+
+ status = U_ZERO_ERROR;
+ ut = utext_openConstUnicodeString(ut, (const UnicodeString *)&ustr, &status);
+ TEST_SUCCESS(status);
+ writable = utext_isWritable(ut);
+ TEST_ASSERT(writable == FALSE);
+ utext_copy(ut, 1, 2, 0, TRUE, &status);
+ TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
+
+ // Deep Clone of a frozen UText should re-enable writing in the copy.
+ status = U_ZERO_ERROR;
+ ut = utext_openUnicodeString(ut, &ustr, &status);
+ TEST_SUCCESS(status);
+ utext_freeze(ut);
+ ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status); // deep clone
+ TEST_SUCCESS(status);
+ writable = utext_isWritable(ut2);
+ TEST_ASSERT(writable == TRUE);
+
+
+ // Deep clone of a frozen UText, where the base type is intrinsically non-writable,
+ // should NOT enable writing in the copy.
+ status = U_ZERO_ERROR;
+ ut = utext_openUChars(ut, u16str, -1, &status);
+ TEST_SUCCESS(status);
+ utext_freeze(ut);
+ ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status); // deep clone
+ TEST_SUCCESS(status);
+ writable = utext_isWritable(ut2);
+ TEST_ASSERT(writable == FALSE);
+
+ // cleanup
+ utext_close(ut);
+ utext_close(ut2);
+}
+
+
+//
+// Fragmented UText
+// A UText type that works with a chunk size of 1.
+// Intended to test for edge cases.
+// Input comes from a UnicodeString.
+//
+// ut.b the character. Put into both halves.
+//
+
+U_CDECL_BEGIN
+static UBool U_CALLCONV
+fragTextAccess(UText *ut, int64_t index, UBool forward) {
+ const UnicodeString *us = (const UnicodeString *)ut->context;
+ UChar c;
+ int32_t length = us->length();
+ if (forward && index>=0 && index<length) {
+ c = us->charAt((int32_t)index);
+ ut->b = c | c<<16;
+ ut->chunkOffset = 0;
+ ut->chunkLength = 1;
+ ut->chunkNativeStart = index;
+ ut->chunkNativeLimit = index+1;
+ return true;
+ }
+ if (!forward && index>0 && index <=length) {
+ c = us->charAt((int32_t)index-1);
+ ut->b = c | c<<16;
+ ut->chunkOffset = 1;
+ ut->chunkLength = 1;
+ ut->chunkNativeStart = index-1;
+ ut->chunkNativeLimit = index;
+ return true;
+ }
+ ut->b = 0;
+ ut->chunkOffset = 0;
+ ut->chunkLength = 0;
+ if (index <= 0) {
+ ut->chunkNativeStart = 0;
+ ut->chunkNativeLimit = 0;
+ } else {
+ ut->chunkNativeStart = length;
+ ut->chunkNativeLimit = length;
+ }
+ return false;
+}
+
+// Function table to be used with this fragmented text provider.
+// Initialized in the open function.
+static UTextFuncs fragmentFuncs;
+
+// Clone function for fragmented text provider.
+// Didn't really want to provide this, but it's easier to provide it than to keep it
+// out of the tests.
+//
+UText *
+cloneFragmentedUnicodeString(UText *dest, const UText *src, UBool deep, UErrorCode *status) {
+ if (U_FAILURE(*status)) {
+ return NULL;
+ }
+ if (deep) {
+ *status = U_UNSUPPORTED_ERROR;
+ return NULL;
+ }
+ dest = utext_openUnicodeString(dest, (UnicodeString *)src->context, status);
+ utext_setNativeIndex(dest, utext_getNativeIndex(src));
+ return dest;
+}
+
+U_CDECL_END
+
+// Open function for the fragmented text provider.
+UText *
+openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status) {
+ ut = utext_openUnicodeString(ut, s, status);
+ if (U_FAILURE(*status)) {
+ return ut;
+ }
+
+ // Copy of the function table from the stock UnicodeString UText,
+ // and replace the entry for the access function.
+ memcpy(&fragmentFuncs, ut->pFuncs, sizeof(fragmentFuncs));
+ fragmentFuncs.access = fragTextAccess;
+ fragmentFuncs.clone = cloneFragmentedUnicodeString;
+ ut->pFuncs = &fragmentFuncs;
+
+ ut->chunkContents = (UChar *)&ut->b;
+ ut->pFuncs->access(ut, 0, TRUE);
+ return ut;
+}
+
+// Regression test for Ticket 5560
+// Clone fails to update chunkContentPointer in the cloned copy.
+// This is only an issue for UText types that work in a local buffer,
+// (UTF-8 wrapper, for example)
+//
+// The test:
+// 1. Create an inital UText
+// 2. Deep clone it. Contents should match original.
+// 3. Reset original to something different.
+// 4. Check that clone contents did not change.
+//
+void UTextTest::Ticket5560() {
+ /* The following two strings are in UTF-8 even on EBCDIC platforms. */
+ static const char s1[] = {0x41,0x42,0x43,0x44,0x45,0x46,0}; /* "ABCDEF" */
+ static const char s2[] = {0x31,0x32,0x33,0x34,0x35,0x36,0}; /* "123456" */
+ UErrorCode status = U_ZERO_ERROR;
+
+ UText ut1 = UTEXT_INITIALIZER;
+ UText ut2 = UTEXT_INITIALIZER;
+
+ utext_openUTF8(&ut1, s1, -1, &status);
+ UChar c = utext_next32(&ut1);
+ TEST_ASSERT(c == 0x41); // c == 'A'
+
+ utext_clone(&ut2, &ut1, TRUE, FALSE, &status);
+ TEST_SUCCESS(status);
+ c = utext_next32(&ut2);
+ TEST_ASSERT(c == 0x42); // c == 'B'
+ c = utext_next32(&ut1);
+ TEST_ASSERT(c == 0x42); // c == 'B'
+
+ utext_openUTF8(&ut1, s2, -1, &status);
+ c = utext_next32(&ut1);
+ TEST_ASSERT(c == 0x31); // c == '1'
+ c = utext_next32(&ut2);
+ TEST_ASSERT(c == 0x43); // c == 'C'
+
+ utext_close(&ut1);
+ utext_close(&ut2);
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/utxttest.h b/Build/source/libs/icu/icu-xetex/test/intltest/utxttest.h
new file mode 100644
index 00000000000..ca1e2f605eb
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/utxttest.h
@@ -0,0 +1,61 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2005-2007, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+/************************************************************************
+* Tests for the UText and UTextIterator text abstraction classses
+*
+************************************************************************/
+
+
+#ifndef UTXTTEST_H
+#define UTXTTEST_H
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+#include "unicode/utext.h"
+
+#include "intltest.h"
+
+/**
+ * @test
+ * @summary Testing the Replaceable class
+ */
+class UTextTest : public IntlTest {
+public:
+ UTextTest();
+ virtual ~UTextTest();
+
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void TextTest();
+ void ErrorTest();
+ void FreezeTest();
+ void Ticket5560();
+
+private:
+ struct m { // Map between native indices & code points.
+ int nativeIdx;
+ UChar32 cp;
+ };
+
+ void TestString(const UnicodeString &s);
+ void TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *cpMap);
+ void TestAccessNoClone(const UnicodeString &us, UText *ut, int cpCount, m *cpMap);
+ void TestCMR (const UnicodeString &us, UText *ut, int cpCount, m *nativeMap, m *utf16Map);
+ void TestCopyMove(const UnicodeString &us, UText *ut, UBool move,
+ int32_t nativeStart, int32_t nativeLimit, int32_t nativeDest,
+ int32_t u16Start, int32_t u16Limit, int32_t u16Dest);
+ void TestReplace(const UnicodeString &us, // reference UnicodeString in which to do the replace
+ UText *ut, // UnicodeText object under test.
+ int32_t nativeStart, // Range to be replaced, in UText native units.
+ int32_t nativeLimit,
+ int32_t u16Start, // Range to be replaced, in UTF-16 units
+ int32_t u16Limit, // for use in the reference UnicodeString.
+ const UnicodeString &repStr); // The replacement string
+
+
+};
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/uvectest.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/uvectest.cpp
new file mode 100644
index 00000000000..434876f90f2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/uvectest.cpp
@@ -0,0 +1,200 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2004-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+// Test parts of UVector and UStack
+
+#include "intltest.h"
+
+#include "uvectest.h"
+#include "uvector.h"
+#include "hash.h"
+
+#include "cstring.h"
+
+//---------------------------------------------------------------------------
+//
+// Test class boilerplate
+//
+//---------------------------------------------------------------------------
+UVectorTest::UVectorTest()
+{
+}
+
+
+UVectorTest::~UVectorTest()
+{
+}
+
+
+
+void UVectorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite UVectorTest: ");
+ switch (index) {
+
+ case 0: name = "UVector_API";
+ if (exec) UVector_API();
+ break;
+ case 1: name = "UStack_API";
+ if (exec) UStack_API();
+ break;
+ case 2: name = "Hashtable_API";
+ if (exec) Hashtable_API();
+ break;
+ default: name = "";
+ break; //needed to end loop
+ }
+}
+
+
+//---------------------------------------------------------------------------
+//
+// Error Checking / Reporting macros used in all of the tests.
+//
+//---------------------------------------------------------------------------
+#define TEST_CHECK_STATUS(status) \
+ if (U_FAILURE(status)) {\
+ errln("UVectorTest failure at line %d. status=%s\n", __LINE__, u_errorName(status));\
+ return;\
+ }
+
+#define TEST_ASSERT(expr) \
+ if ((expr)==FALSE) {\
+ errln("UVectorTest failure at line %d.\n", __LINE__);\
+ }
+
+static int8_t
+UVectorTest_compareInt32(UHashTok key1, UHashTok key2) {
+ if (key1.integer > key2.integer) {
+ return 1;
+ }
+ else if (key1.integer < key2.integer) {
+ return -1;
+ }
+ return 0;
+}
+
+U_CDECL_BEGIN
+static int8_t U_CALLCONV
+UVectorTest_compareCstrings(const UHashTok key1, const UHashTok key2) {
+ return !strcmp((const char *)key1.pointer, (const char *)key2.pointer);
+}
+U_CDECL_END
+
+//---------------------------------------------------------------------------
+//
+// UVector_API Check for basic functionality of UVector.
+//
+//---------------------------------------------------------------------------
+void UVectorTest::UVector_API() {
+
+ UErrorCode status = U_ZERO_ERROR;
+ UVector *a;
+
+ a = new UVector(status);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ status = U_ZERO_ERROR;
+ a = new UVector(2000, status);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ status = U_ZERO_ERROR;
+ a = new UVector(status);
+ a->sortedInsert((int32_t)10, UVectorTest_compareInt32, status);
+ a->sortedInsert((int32_t)20, UVectorTest_compareInt32, status);
+ a->sortedInsert((int32_t)30, UVectorTest_compareInt32, status);
+ a->sortedInsert((int32_t)15, UVectorTest_compareInt32, status);
+ TEST_CHECK_STATUS(status);
+ TEST_ASSERT(a->elementAti(0) == 10);
+ TEST_ASSERT(a->elementAti(1) == 15);
+ TEST_ASSERT(a->elementAti(2) == 20);
+ TEST_ASSERT(a->elementAti(3) == 30);
+ TEST_ASSERT(a->indexOf((int32_t)3) == -1);
+ TEST_ASSERT(a->indexOf((int32_t)15) == 1);
+ TEST_ASSERT(a->indexOf((int32_t)15, 2) == -1);
+ TEST_ASSERT(a->contains((int32_t)15));
+ TEST_ASSERT(!a->contains((int32_t)5));
+ delete a;
+}
+
+void UVectorTest::UStack_API() {
+ UErrorCode status = U_ZERO_ERROR;
+ UStack *a;
+
+ a = new UStack(status);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ status = U_ZERO_ERROR;
+ a = new UStack(2000, status);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ status = U_ZERO_ERROR;
+ a = new UStack(NULL, NULL, 2000, status);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ status = U_ZERO_ERROR;
+ a = new UStack(NULL, UVectorTest_compareCstrings, status);
+ TEST_ASSERT(a->empty());
+ a->push((void*)"abc", status);
+ TEST_ASSERT(!a->empty());
+ a->push((void*)"bcde", status);
+ a->push((void*)"cde", status);
+ TEST_CHECK_STATUS(status);
+ TEST_ASSERT(strcmp("cde", (const char *)a->peek()) == 0);
+ TEST_ASSERT(a->search((void*)"cde") == 1);
+ TEST_ASSERT(a->search((void*)"bcde") == 2);
+ TEST_ASSERT(a->search((void*)"abc") == 3);
+ TEST_ASSERT(strcmp("abc", (const char *)a->firstElement()) == 0);
+ TEST_ASSERT(strcmp("cde", (const char *)a->lastElement()) == 0);
+ TEST_ASSERT(strcmp("cde", (const char *)a->pop()) == 0);
+ TEST_ASSERT(strcmp("bcde", (const char *)a->pop()) == 0);
+ TEST_ASSERT(strcmp("abc", (const char *)a->pop()) == 0);
+ delete a;
+}
+
+U_CDECL_BEGIN
+static UBool U_CALLCONV neverTRUE(const UHashTok /*key1*/, const UHashTok /*key2*/) {
+ return FALSE;
+}
+
+U_CDECL_END
+
+void UVectorTest::Hashtable_API() {
+ UErrorCode status = U_ZERO_ERROR;
+ Hashtable *a = new Hashtable(status);
+ TEST_ASSERT((a->puti("a", 1, status) == 0));
+ TEST_ASSERT((a->find("a") != NULL));
+ TEST_ASSERT((a->find("b") == NULL));
+ TEST_ASSERT((a->puti("b", 2, status) == 0));
+ TEST_ASSERT((a->find("b") != NULL));
+ TEST_ASSERT((a->removei("a") == 1));
+ TEST_ASSERT((a->find("a") == NULL));
+
+ /* verify that setValueCompartor works */
+ Hashtable b(status);
+ TEST_ASSERT((!a->equals(b)));
+ TEST_ASSERT((b.puti("b", 2, status) == 0));
+ TEST_ASSERT((!a->equals(b))); // Without a value comparator, this will be FALSE by default.
+ b.setValueCompartor(uhash_compareLong);
+ TEST_ASSERT((!a->equals(b)));
+ a->setValueCompartor(uhash_compareLong);
+ TEST_ASSERT((a->equals(b)));
+ TEST_ASSERT((a->equals(*a))); // This better be reflexive.
+
+ /* verify that setKeyCompartor works */
+ TEST_ASSERT((a->puti("a", 1, status) == 0));
+ TEST_ASSERT((a->find("a") != NULL));
+ a->setKeyCompartor(neverTRUE);
+ TEST_ASSERT((a->find("a") == NULL));
+
+ delete a;
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/uvectest.h b/Build/source/libs/icu/icu-xetex/test/intltest/uvectest.h
new file mode 100644
index 00000000000..84a3e24fdb6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/uvectest.h
@@ -0,0 +1,34 @@
+/*
+******************************************************************************
+* Copyright (C) 2004, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+******************************************************************************
+*/
+
+// file: uvectest.h
+
+
+#ifndef UVECTEST_H
+#define UVECTEST_H
+
+#include "unicode/utypes.h"
+
+#include "intltest.h"
+
+
+class UVectorTest: public IntlTest {
+public:
+
+ UVectorTest();
+ virtual ~UVectorTest();
+
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // The following are test functions that are visible from the intltest test framework.
+ void UVector_API();
+ void UStack_API();
+ void Hashtable_API();
+
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/v32test.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/v32test.cpp
new file mode 100644
index 00000000000..c668a38ce64
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/v32test.cpp
@@ -0,0 +1,495 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2002-2003, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+//
+// regextst.cpp
+//
+// ICU Regular Expressions test, part of intltest.
+//
+
+#include "intltest.h"
+
+#include "v32test.h"
+#include "uvectr32.h"
+#include "uvector.h"
+#include "util.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+
+//---------------------------------------------------------------------------
+//
+// Test class boilerplate
+//
+//---------------------------------------------------------------------------
+UVector32Test::UVector32Test()
+{
+}
+
+
+UVector32Test::~UVector32Test()
+{
+}
+
+
+
+void UVector32Test::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
+{
+ if (exec) logln("TestSuite UVector32Test: ");
+ switch (index) {
+
+ case 0: name = "UVector32_API";
+ if (exec) UVector32_API();
+ break;
+ default: name = "";
+ break; //needed to end loop
+ }
+}
+
+
+//---------------------------------------------------------------------------
+//
+// Error Checking / Reporting macros used in all of the tests.
+//
+//---------------------------------------------------------------------------
+#define TEST_CHECK_STATUS(status) \
+ if (U_FAILURE(status)) {\
+ errln("UVector32Test failure at line %d. status=%s\n", __LINE__, u_errorName(status));\
+ return;\
+ }
+
+#define TEST_ASSERT(expr) \
+ if ((expr)==FALSE) {\
+ errln("RegexTest failure at line %d.\n", __LINE__);\
+ }
+
+//---------------------------------------------------------------------------
+//
+// UVector32_API Check for basic functionality of UVector32.
+//
+//---------------------------------------------------------------------------
+void UVector32Test::UVector32_API() {
+
+ UErrorCode status = U_ZERO_ERROR;
+ UVector32 *a;
+ UVector32 *b;
+
+ a = new UVector32(status);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ status = U_ZERO_ERROR;
+ a = new UVector32(2000, status);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ //
+ // assign()
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ b = new UVector32(status);
+ b->assign(*a, status);
+ TEST_ASSERT(b->size() == 3);
+ TEST_ASSERT(b->elementAti(1) == 20);
+ TEST_CHECK_STATUS(status);
+ delete a;
+ delete b;
+
+ //
+ // operator == and != and equals()
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ b = new UVector32(status);
+ TEST_ASSERT(*b != *a);
+ TEST_ASSERT(!(*b == *a));
+ TEST_ASSERT(!b->equals(*a));
+ b->assign(*a, status);
+ TEST_ASSERT(*b == *a);
+ TEST_ASSERT(!(*b != *a));
+ TEST_ASSERT(b->equals(*a));
+ b->addElement(666, status);
+ TEST_ASSERT(*b != *a);
+ TEST_ASSERT(!(*b == *a));
+ TEST_ASSERT(!b->equals(*a));
+ TEST_CHECK_STATUS(status);
+ delete b;
+ delete a;
+
+ //
+ // addElement(). Covered by above tests.
+ //
+
+ //
+ // setElementAt()
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ a->setElementAt(666, 1);
+ TEST_ASSERT(a->elementAti(0) == 10);
+ TEST_ASSERT(a->elementAti(1) == 666);
+ TEST_ASSERT(a->size() == 3);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ //
+ // insertElementAt()
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ a->insertElementAt(666, 1, status);
+ TEST_ASSERT(a->elementAti(0) == 10);
+ TEST_ASSERT(a->elementAti(1) == 666);
+ TEST_ASSERT(a->elementAti(2) == 20);
+ TEST_ASSERT(a->elementAti(3) == 30);
+ TEST_ASSERT(a->size() == 4);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ //
+ // elementAti() covered by above tests
+ //
+
+ //
+ // lastElementi
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ TEST_ASSERT(a->lastElementi() == 30);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // indexOf
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ TEST_ASSERT(a->indexOf(30, 0) == 2);
+ TEST_ASSERT(a->indexOf(40, 0) == -1);
+ TEST_ASSERT(a->indexOf(10, 0) == 0);
+ TEST_ASSERT(a->indexOf(10, 1) == -1);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // contains
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ TEST_ASSERT(a->contains(10) == TRUE);
+ TEST_ASSERT(a->contains(11) == FALSE);
+ TEST_ASSERT(a->contains(20) == TRUE);
+ TEST_ASSERT(a->contains(-10) == FALSE);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // containsAll
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ b = new UVector32(status);
+ TEST_ASSERT(a->containsAll(*b) == TRUE);
+ b->addElement(2, status);
+ TEST_ASSERT(a->containsAll(*b) == FALSE);
+ b->setElementAt(10, 0);
+ TEST_ASSERT(a->containsAll(*b) == TRUE);
+ TEST_ASSERT(b->containsAll(*a) == FALSE);
+ b->addElement(30, status);
+ b->addElement(20, status);
+ TEST_ASSERT(a->containsAll(*b) == TRUE);
+ TEST_ASSERT(b->containsAll(*a) == TRUE);
+ b->addElement(2, status);
+ TEST_ASSERT(a->containsAll(*b) == FALSE);
+ TEST_ASSERT(b->containsAll(*a) == TRUE);
+ TEST_CHECK_STATUS(status);
+ delete a;
+ delete b;
+
+ //
+ // removeAll
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ b = new UVector32(status);
+ a->removeAll(*b);
+ TEST_ASSERT(a->size() == 3);
+ b->addElement(20, status);
+ a->removeAll(*b);
+ TEST_ASSERT(a->size() == 2);
+ TEST_ASSERT(a->contains(10)==TRUE);
+ TEST_ASSERT(a->contains(30)==TRUE);
+ b->addElement(10, status);
+ a->removeAll(*b);
+ TEST_ASSERT(a->size() == 1);
+ TEST_ASSERT(a->contains(30) == TRUE);
+ TEST_CHECK_STATUS(status);
+ delete a;
+ delete b;
+
+ //
+ // retainAll
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ b = new UVector32(status);
+ b->addElement(10, status);
+ b->addElement(20, status);
+ b->addElement(30, status);
+ b->addElement(15, status);
+ a->retainAll(*b);
+ TEST_ASSERT(a->size() == 3);
+ b->removeElementAt(1);
+ a->retainAll(*b);
+ TEST_ASSERT(a->contains(20) == FALSE);
+ TEST_ASSERT(a->size() == 2);
+ b->removeAllElements();
+ TEST_ASSERT(b->size() == 0);
+ a->retainAll(*b);
+ TEST_ASSERT(a->size() == 0);
+ TEST_CHECK_STATUS(status);
+ delete a;
+ delete b;
+
+ //
+ // removeElementAt Tested above.
+ //
+
+ //
+ // removeAllElments Tested above
+ //
+
+ //
+ // size() tested above
+ //
+
+ //
+ // isEmpty
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ TEST_ASSERT(a->isEmpty() == TRUE);
+ a->addElement(10, status);
+ TEST_ASSERT(a->isEmpty() == FALSE);
+ a->addElement(20, status);
+ a->removeElementAt(0);
+ TEST_ASSERT(a->isEmpty() == FALSE);
+ a->removeElementAt(0);
+ TEST_ASSERT(a->isEmpty() == TRUE);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // ensureCapacity, expandCapacity
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ TEST_ASSERT(a->isEmpty() == TRUE);
+ a->addElement(10, status);
+ TEST_ASSERT(a->ensureCapacity(5000, status)== TRUE);
+ TEST_ASSERT(a->expandCapacity(20000, status) == TRUE);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ //
+ // setSize
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ a->setSize(100);
+ TEST_ASSERT(a->size() == 100);
+ TEST_ASSERT(a->elementAti(0) == 10);
+ TEST_ASSERT(a->elementAti(1) == 20);
+ TEST_ASSERT(a->elementAti(2) == 30);
+ TEST_ASSERT(a->elementAti(3) == 0);
+ a->setElementAt(666, 99);
+ a->setElementAt(777, 100);
+ TEST_ASSERT(a->elementAti(99) == 666);
+ TEST_ASSERT(a->elementAti(100) == 0);
+ a->setSize(2);
+ TEST_ASSERT(a->elementAti(1) == 20);
+ TEST_ASSERT(a->elementAti(2) == 0);
+ TEST_ASSERT(a->size() == 2);
+ a->setSize(0);
+ TEST_ASSERT(a->empty() == TRUE);
+ TEST_ASSERT(a->size() == 0);
+
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ //
+ // containsNone
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ b = new UVector32(status);
+ TEST_ASSERT(a->containsNone(*b) == TRUE);
+ b->addElement(5, status);
+ TEST_ASSERT(a->containsNone(*b) == TRUE);
+ b->addElement(30, status);
+ TEST_ASSERT(a->containsNone(*b) == FALSE);
+
+ TEST_CHECK_STATUS(status);
+ delete a;
+ delete b;
+
+ //
+ // sortedInsert
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->sortedInsert(30, status);
+ a->sortedInsert(20, status);
+ a->sortedInsert(10, status);
+ TEST_ASSERT(a->elementAti(0) == 10);
+ TEST_ASSERT(a->elementAti(1) == 20);
+ TEST_ASSERT(a->elementAti(2) == 30);
+
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ //
+ // getBuffer
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ int32_t *buf = a->getBuffer();
+ TEST_ASSERT(buf[0] == 10);
+ TEST_ASSERT(buf[1] == 20);
+ a->setSize(20000);
+ int32_t *resizedBuf;
+ resizedBuf = a->getBuffer();
+ TEST_ASSERT(buf != resizedBuf);
+ TEST_ASSERT(resizedBuf[0] == 10);
+ TEST_ASSERT(resizedBuf[1] == 20);
+
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // empty
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ TEST_ASSERT(a->empty() == TRUE);
+ a->addElement(10, status);
+ TEST_ASSERT(a->empty() == FALSE);
+ a->addElement(20, status);
+ a->removeElementAt(0);
+ TEST_ASSERT(a->empty() == FALSE);
+ a->removeElementAt(0);
+ TEST_ASSERT(a->empty() == TRUE);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // peeki
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ TEST_ASSERT(a->peeki() == 10);
+ a->addElement(20, status);
+ TEST_ASSERT(a->peeki() == 20);
+ a->addElement(30, status);
+ TEST_ASSERT(a->peeki() == 30);
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // popi
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->addElement(10, status);
+ a->addElement(20, status);
+ a->addElement(30, status);
+ TEST_ASSERT(a->popi() == 30);
+ TEST_ASSERT(a->popi() == 20);
+ TEST_ASSERT(a->popi() == 10);
+ TEST_ASSERT(a->popi() == 0);
+ TEST_ASSERT(a->isEmpty());
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+ //
+ // push
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ TEST_ASSERT(a->push(10, status) == 10);
+ TEST_ASSERT(a->push(20, status) == 20);
+ TEST_ASSERT(a->push(30, status) == 30);
+ TEST_ASSERT(a->size() == 3);
+ TEST_ASSERT(a->popi() == 30);
+ TEST_ASSERT(a->popi() == 20);
+ TEST_ASSERT(a->popi() == 10);
+ TEST_ASSERT(a->isEmpty());
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+
+ //
+ // reserveBlock
+ //
+ status = U_ZERO_ERROR;
+ a = new UVector32(status);
+ a->ensureCapacity(1000, status);
+
+ // TODO:
+
+ TEST_CHECK_STATUS(status);
+ delete a;
+
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/v32test.h b/Build/source/libs/icu/icu-xetex/test/intltest/v32test.h
new file mode 100644
index 00000000000..f364aeb1bcd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/v32test.h
@@ -0,0 +1,32 @@
+/*
+******************************************************************************
+* Copyright (C) 2003, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+******************************************************************************
+*/
+
+// file: v32test.h
+
+
+#ifndef V32TEST_H
+#define V32TEST_H
+
+#include "unicode/utypes.h"
+
+#include "intltest.h"
+
+
+class UVector32Test: public IntlTest {
+public:
+
+ UVector32Test();
+ virtual ~UVector32Test();
+
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+
+ // The following are test functions that are visible from the intltest test framework.
+ virtual void UVector32_API();
+
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/wbnf.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/wbnf.cpp
new file mode 100644
index 00000000000..7d08de7081b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/wbnf.cpp
@@ -0,0 +1,1771 @@
+/*
+ ******************************************************************************
+ * Copyright (C) 2005-2007, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ ******************************************************************************
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include "wbnf.h"
+
+// Most of this code is meant to test the test code. It's a self test.
+// Normally this isn't run.
+#define TEST_WBNF_TEST 0
+
+///////////////////////////////////////////////////////////
+//
+// Constants and the most basic helper classes
+//
+
+static const char DIGIT_CHAR[] = "0123456789";
+static const char WHITE_SPACE[] = {'\t', ' ', '\r', '\n', 0};
+static const char ALPHABET[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+static const char SPECIAL[] = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
+
+static inline UBool isInList(const char c /*in*/, const char list[] /*in*/){
+ const char * p = list;
+ for (;*p != 0 && *p != c; p++);
+ return *p?TRUE:FALSE;
+}
+static inline UBool isDigit(char c) {return isInList(c, DIGIT_CHAR);}
+static inline UBool isWhiteSpace(char c) {return isInList(c, WHITE_SPACE);}
+static inline UBool isAlphabet(char c) {return isInList(c, ALPHABET);}
+static inline UBool isSpecialAsciiChar(char c) {return isInList(c,SPECIAL);}
+
+
+
+///////////////////////////////////////////////////////////
+//
+// Helper classes
+//
+
+class Buffer_byte{
+// Utility class, can be treated as an auto expanded array. no boundary check.
+
+ typedef char byte;
+ byte * start;
+ byte * current;
+ int buffer_size; // size unit is byte
+public:
+ inline int content_size(){return current - start;} // size unit is byte
+
+private:
+ inline void expand(int add_size = 100){ // size unit is byte
+ int new_size = buffer_size + add_size;
+
+ int cs_snap = content_size();
+ start = (byte *) realloc(start, new_size); // may change the value of start
+ current = start + cs_snap;
+
+ memset(current, 0, add_size);
+ buffer_size = new_size;
+ }
+
+ inline void expand_to(int size){
+ int r = size - buffer_size;
+ if (r > 0) {
+ expand(r); // simply expand, no block alignment
+ }
+ }
+ Buffer_byte(const Buffer_byte &);
+ Buffer_byte & operator = (const Buffer_byte &);
+public:
+ Buffer_byte():start(NULL),current(start),buffer_size(0){
+ expand();
+ }
+ ~Buffer_byte(){
+ free(start);
+ }
+
+ inline void reset(){
+ start != NULL ? memset(start, 0, buffer_size) : 0;
+ current = start;
+ }
+
+ // Using memory copy method to append a C array to buffer,
+ inline void append(const void * c, int size){ // size unit is byte
+ expand_to(content_size() + size) ;
+ memcpy(current, c, size);
+ current = current + size;
+ }
+
+ byte * buffer(){
+ return start;
+ }
+};
+
+/*
+ The class(es) try to work as bulid-in array, so it overloads these two operators
+ operator type *();
+ type & operator[];
+ The first is used to auto type convert, the latter is used to select member.
+
+ A small trick is the class does not overload the address-of operator. This
+ behavior is different from bulid-in array, but it give us the opportunity
+ to get the address of the class itself.
+*/
+//template<typename type>
+// class BUFFER{
+// typedef BUFFER name;
+#define BUFFER(type, name)\
+ class name {\
+ private:\
+ Buffer_byte buf;\
+ public:\
+ name & reset() {buf.reset(); return *this;}\
+ name & append(type c) {buf.append(&c, sizeof(type)); return *this;}\
+ name & append_array(const type * p, int size) {buf.append(p, sizeof(type)*size); return *this;}\
+ type & operator [] (int i) { return ((type *) buf.buffer())[i];}\
+ operator type *(){return (type *) buf.buffer();} \
+ int content_size(){return buf.content_size() / sizeof(type);}\
+ }
+
+
+class Pick{
+/* The Pick is the basic language generator element*/
+public:
+ // generate a string accroding the syntax
+ // Return a null-terminated c-string. The buffer is owned by callee.
+ virtual const char* next() = 0;
+ virtual ~Pick(){};
+};
+
+//typedef BUFFER<char> Buffer_char;
+//typedef BUFFER<int> Buffer_int;
+//typedef BUFFER<Pick *> Buffer_pPick;
+BUFFER(char, Buffer_char);
+BUFFER(int, Buffer_int);
+BUFFER(Pick *, Buffer_pPick);
+
+class SymbolTable{
+/* Helper class.
+* It's a mapping table between 'variable name' and its 'active Pick object'
+*/
+private:
+ Buffer_char name_buffer; // var names storage space
+
+ Buffer_int names; // points to name (offset in name_buffer)
+ Buffer_pPick refs; // points to Pick
+
+ int get_index(const char *const var_name){
+ int len = names.content_size();
+ for (int i=0; i< len; i++){
+ if (strcmp(var_name, name_buffer + names[i]) == 0){
+ return i;
+ }
+ }
+ return -1;
+ }
+
+public:
+ enum RESULT {EMPTY, NO_VAR, NO_REF, HAS_REF};
+
+ RESULT find(const char *const var_name /*[in] c-string*/, Pick * * ref = NULL /*[out] Pick* */){
+ if (!var_name) return EMPTY; // NULL name
+
+ int i = get_index(var_name);
+ if (i == -1){
+ return NO_VAR; // new name
+ }
+ if (!refs[i]){ // exist name, no ref
+ return NO_REF;
+ } else {
+ if (ref) {
+ *ref = refs[i];
+ }
+ return HAS_REF; // exist name, has ref
+ }
+ }
+
+ void put(const char *const var_name, Pick *const var_ref = NULL){
+ int i = get_index(var_name);
+ switch(find(var_name)){
+ case EMPTY: // NULL name
+ break;
+ case NO_VAR: // new name
+ int offset;
+ offset = name_buffer.content_size();
+ name_buffer.append_array(var_name, strlen(var_name) + 1);
+ names.append(offset);
+ refs.append(var_ref);
+ break;
+ case NO_REF: // exist name, no ref
+ refs[i] = var_ref; // link definition with variable
+ break;
+ case HAS_REF: // exist name, has ref
+ if (var_ref){
+ refs[i] = var_ref;
+ }
+ break;
+ default:
+ ; // ASSERT(FALSE);
+ }
+ return;
+ }
+
+ UBool is_complete(){
+ int n = names.content_size();
+ for (int i=0; i<n; ++i){
+ if (refs[i] == NULL){
+ return FALSE;
+ }
+ }
+ return TRUE;
+ }
+
+ void reset(){
+ names.reset();
+ name_buffer.reset();
+
+ // release memory here
+ int s = refs.content_size();
+ for (int i=0; i < s; i++){
+ delete refs[i]; // TOFIX: point alias/recursion problem
+ }
+ refs.reset();
+ }
+
+ ~SymbolTable(){
+ reset();
+ }
+};
+
+
+/*
+// Document of class Escaper
+//
+// ATTENTION:
+// From http://icu-project.org/userguide/Collate_Customization.html.
+// We get the precedence of escape/quote operations
+//
+// (highest) 1. backslash \
+// 2. two single quotes ''
+// 3. quoting ' '
+//
+// ICU Collation should accept following as the same string.
+//
+// 1) 'ab'c _
+// 2) a\bc \
+// 3) a'b'\c |- They are equal.
+// 4) abc _/
+//
+// From "two single quotes", we have following deductions
+// D1. empty quoting is illgal. (obviously)
+// D2. no contact operation between two quotings
+// '.''.' is not .. it is .'.
+// D3. "two single quotes" cannot contact two quoting simultaneously
+// '..''''.' is not ..'. it is ..''.
+// NOTICE:
+// "two single quotes" can contact before one quoting
+// '''.' is '.
+// "two single quotes" can literally contact after one quoting
+// But, from syntax, it's one quoting including a "two single quotes"
+// '.''' is .'
+// D4. "two single quotes" cannot solely be included in quoting
+// '''' is not ' it is ''
+// NOTICE: These are legal
+// '.''.' is .'.
+// '.''' is .'
+//
+// dicision
+// /\
+// /__\
+// output buffer input buffer
+//
+// To make our dicision (within an atom operation) without caring input and output buffer,
+// following calling pattern (within an atom operation) shall be avoided
+//
+// P1 open_quoting() then close_quoting() (direct violation) D1
+// P2 close_quoting() then open_quoting() (direct violation) D2
+// P3 empty open_quoting() (indirect violation) D1, D4
+// P4 empty close_quoting() (indirect violation) D2, D3
+// P5 open_quoting() then two single quotes (indirect violation) D4
+// P6 close_quoting() then two single quotes (indirect violation) D3
+//
+// two single quotes escaping will not open_ or close_ quoting()
+// The choice will not lose some quoing forms.
+//
+// For open_quoting(),
+// we may get this form quoting ''' P5
+// It may raise a bug ''''x
+// If we expect
+// '''.' let the next char open the quoting
+// '.''.' the quoting is already opened by preceding char
+//
+// For close_quoting()
+// we will get this form quoting '.''' P6
+// It may raise a bug '.''''.'
+// If we expect
+// '.'''\. let the next char close the quoting
+// '.''''.' the expectation is wrong! using '.'\''.' instead
+//
+// It's a hard work to re-adjust generation opportunity for various escaping form.
+// We just simply ignore it.
+*/
+class Escaper{
+public:
+ enum CHOICE {YES, NO, RAND};
+ enum ESCAPE_FORM {BSLASH_ONLY, QUOTE_ONLY, QUOTE_AND_BSLAH, RAND_ESC};
+private:
+ class Bool{ // A wrapper class for CHOICE, to auto adapter UBool class
+ private:
+ const CHOICE tag;
+ public:
+ Bool(CHOICE flag=RAND):tag(flag){}
+ operator UBool() { // conversion operator
+ return tag == RAND ? rand()%2 : tag == YES;
+ //if (tag == RAND){
+ // return rand()%2 == 1;
+ //} else {
+ // return tag == YES ? TRUE : FALSE;
+ //}
+ }
+ };
+public:
+ Escaper(CHOICE escapeLiteral = RAND,
+ CHOICE twoQuotesEscape = RAND,
+ ESCAPE_FORM escapeForm = RAND_ESC):
+ escape_form(escapeForm),
+ escape_literal(escapeLiteral),
+ two_quotes_escape(twoQuotesEscape),
+ is_quoting(FALSE){}
+private:
+ Buffer_char str;
+ ESCAPE_FORM escape_form;
+ Bool escape_literal;
+ Bool two_quotes_escape;
+ UBool quote_escape;
+ UBool bslash_escape;
+ UBool is_quoting;
+
+ void set_options(){
+ ESCAPE_FORM t = escape_form == RAND_ESC ? (ESCAPE_FORM) (rand()%3) : escape_form;
+ switch (t){
+ case BSLASH_ONLY :
+ bslash_escape = TRUE; quote_escape = FALSE; break;
+ case QUOTE_ONLY:
+ bslash_escape = FALSE;quote_escape = TRUE; break;
+ case QUOTE_AND_BSLAH:
+ bslash_escape = TRUE; quote_escape = TRUE; break;
+ default:
+ ;// error
+ }
+ }
+
+ void reset(){
+ str.reset();
+ is_quoting = FALSE;
+ }
+
+ inline void open_quoting(){
+ if(is_quoting){
+ // do nothing
+ } else {
+ str.append('\'');
+ is_quoting = TRUE;
+ }
+ }
+ inline void close_quoting(){
+ if(is_quoting){
+ str.append('\'');
+ is_quoting = FALSE;
+ } else {
+ // do nothing
+ }
+ }
+
+ // str [in] null-terminated c-string
+ void append(const char * strToAppend){
+ for(;*strToAppend != 0; strToAppend++){
+ append(*strToAppend);
+ }
+ }
+
+ inline void append(const char c){
+ set_options();
+
+ if (c == '\\'){
+ quote_escape ? open_quoting() : close_quoting();
+ //bslash_escape always true here
+ str.append('\\');
+ str.append('\\');
+ } else if (c == '\''){
+ if (two_quotes_escape){ // quoted using two single quotes
+ // See documents in anonymous.design
+ str.append('\'');
+ str.append('\'');
+ } else{
+ quote_escape ? open_quoting() : close_quoting();
+ //bslash_escape always true here
+ str.append('\\');
+ str.append('\'');
+ }
+ } else if (isSpecialAsciiChar(c) || isWhiteSpace(c)){
+ quote_escape ? open_quoting() : close_quoting();
+ if (bslash_escape) str.append('\\');
+ str.append(c);
+ } else { //if (isAlphabet(c) || isDigit(c) || TRUE){ // treat others as literal
+ if (escape_literal){
+ quote_escape ? open_quoting() : close_quoting();
+ if (bslash_escape) str.append('\\');
+ str.append(c);
+ } else {
+ close_quoting();
+ str.append(c);
+ }
+ }
+ }
+
+public:
+ // Return a null-terminate c-string. The buffer is owned by callee.
+ char * operator()(const char * literal /*c-string*/){
+ str.reset();
+ for(;*literal != 0; literal++){
+ append(*literal);
+ }
+ close_quoting(); // P4 exception, to close whole quoting
+ return str;
+ }
+};
+
+class WeightedRand{
+// Return a random number in [0, size)
+// Every number has different chance (aka weight) to be selected.
+private:
+ Buffer_int weights;
+ double total;
+ WeightedRand(const WeightedRand &);
+ WeightedRand & operator = (const WeightedRand &);
+public:
+ WeightedRand(Buffer_int * weight_list = NULL, int size = 0){
+ if ( weight_list == NULL){
+ for (int i=0; i<size; ++i) weights.append(DEFAULT_WEIGHT);
+ } else {
+ int s = weight_list->content_size();
+ if (s < size){
+ weights.append_array( (*weight_list),s);
+ for (int i=s; i<size; ++i) weights.append(DEFAULT_WEIGHT);
+ } else { // s >= size
+ weights.append_array( (*weight_list),size);
+ }
+ }
+ total = 0;
+ int c = weights.content_size();
+ for (int i=0; i<c; ++i){
+ total += weights[i];
+ }
+ }
+
+ void append(int weight){
+ weights.append(weight);
+ total += weight;
+ }
+
+ // Give a random number with the consideration of weight.
+ // Every random number is associated with a weight.
+ // It identifies the chance to be selected,
+ // larger weight has more chance to be selected.
+ //
+ //
+ // ______________________ every slot has equal chance
+ //
+ // [____][_][___][______] each item has different slots, hence different chance
+ //
+ //
+ // The algorithms to generate the number is illustrated by preceding figure.
+ // First, a slot is selected by rand(). Then we translate the slot to corresponding item.
+ //
+ int next(){
+ // get a random in [0,1]
+ double reference_mark = (double)rand() / (double)RAND_MAX;
+
+ // get the slot's index, 0 <= mark <= total;
+ double mark = total * reference_mark;
+
+ // translate the slot to corresponding item
+ int i=0;
+ for (;;){
+ mark -= weights[i]; // 0 <= mark <= total
+ if (mark <= 0)
+ break;
+ i++;
+ }
+ return i;
+ }
+};
+
+///////////////////////////////////////////////////////////
+//
+// The parser result nodes
+//
+
+class Literal : public Pick {
+public:
+ virtual const char* next(){
+ return str;
+ }
+ Literal(const char * s /*c-string*/){
+ str.append_array(s, strlen(s) + 1);
+ }
+private:
+ Buffer_char str; //null-terminated c-string
+};
+
+class Variable : public Pick {
+public:
+ Variable(SymbolTable * symbols, const char * varName, Pick * varRef = NULL){
+ this->var_name.append_array(varName, strlen(varName) + 1);
+ if ((symbol_table = symbols)){
+ symbol_table->put(varName, varRef);
+ }
+ }
+
+ operator const char *(){
+ return var_name;
+ }
+
+ virtual const char* next(){
+ if (symbol_table){
+ Pick * var_ref = NULL;
+ symbol_table->find(var_name, &var_ref);
+ if (var_ref) {
+ return var_ref->next();
+ }
+ }
+ return ""; // dumb string
+ }
+private:
+ Buffer_char var_name;
+ SymbolTable * symbol_table;
+};
+
+class Quote : public Pick{
+public:
+ Quote(Pick & base):item(base),e(Escaper::NO, Escaper::NO, Escaper::BSLASH_ONLY){
+ }
+ virtual const char* next(){
+ return e(item.next());
+ }
+private:
+ Pick & item;
+ Buffer_char str;
+ Escaper e;
+};
+
+
+class Morph : public Pick{
+/*
+The difference between morph and an arbitrary random string is that
+a morph changes slowly. When we build collation rules, for example,
+it is a much better test if the strings we use are all in the same
+'neighborhood'; they share many common characters.
+*/
+public:
+ Morph(Pick & base):item(base){}
+
+ virtual const char* next(){
+ current.reset();
+ const char * s = item.next();
+ current.append_array(s, strlen(s) + 1);
+ if (last.content_size() == 0) {
+ str.reset();
+ last.reset();
+ str.append_array(current, current.content_size());
+ last.append_array(current, current.content_size());
+ } else {
+ morph();
+ }
+ return str;
+ }
+private:
+ Pick & item;
+ Buffer_char str;
+ Buffer_char last;
+ Buffer_char current;
+
+ char * p_last;
+ char * p_curr;
+
+ void copy_curr(){
+ if (*p_curr) {
+ str.append(*p_curr);
+ p_curr++;
+ }
+ }
+
+ void copy_last(){
+ if (*p_last) {
+ str.append(*p_last);
+ p_last++;
+ }
+ }
+
+ // copy 0, 1, or 2 character(s) to str
+ void copy(){
+ static WeightedRand wr(& Buffer_int().append(DEFAULT_WEIGHT * 10), 5);
+
+ switch (wr.next()){
+ case 0: // copy last -- has 10 times chance than others
+ copy_last();
+ break;
+ case 1: // copy both
+ copy_curr();
+ copy_last();
+ break;
+ case 2: // copy both
+ copy_last();
+ copy_curr();
+ break;
+ case 3:
+ copy_curr();
+ break;
+ case 4: // copy nothing
+ break;
+ default:
+ // ASSERT(FALSE);
+ ;
+ }
+ }
+
+ void morph(void){
+ int min = strlen(last);
+ int max = strlen(current);
+ if (min > max){
+ int temp = min;
+ min = max;
+ max = temp;
+ }
+
+ int len = min + rand()%(max - min + 1); // min + [0, diff]
+ p_curr = current;
+ p_last = last;
+ str.reset();
+
+ for (; str.content_size()<len && *p_curr && *p_last;){
+ copy(); // copy 0, 1, or 2 character(s) to str
+ }
+
+ if (str.content_size() == len) {
+ str.append(0);
+ final();
+ return;
+ }
+
+ if (str.content_size() > len) { // if the last copy copied two characters
+ str[len]=0;
+ final();
+ return;
+ }
+
+ // str.content_size() < len
+ if (*p_last) {
+ for (; str.content_size() < len; copy_last());
+ } else if (*p_curr){
+ for (; str.content_size() < len; copy_curr());
+ }
+
+ int last_len = last.content_size();
+ for (;str.content_size() < len;){
+ str.append(last[rand()%last_len]);
+ }
+ str.append(0);
+ final();
+ }
+
+ void final(){
+ last.reset();
+ last.append_array(current, current.content_size());
+ }
+};
+
+class Sequence : public Pick {
+public:
+ virtual const char* next(){
+ str.reset();
+ int s = items.content_size();
+ for(int i=0; i < s; i++){
+ const char * t = items[i]->next();
+ str.append_array(t, strlen(t));
+ }
+ str.append(0); // terminal null
+ return str;
+ }
+
+ void append (Pick * node){
+ items.append(node);
+ }
+
+ virtual ~Sequence(){
+ int s = items.content_size();
+ for(int i=0; i < s; i++){
+ //How can assure the item is got from heap?
+ //Let's assume it.
+ delete items[i]; // TOFIX: point alias/recursion problem
+ items[i] = NULL;
+ }
+ }
+private:
+ Buffer_pPick items;
+ Buffer_char str; //null-terminated c-string
+};
+
+class Repeat : public Pick {
+private:
+ Pick * item;
+ Buffer_char str;
+ WeightedRand wr;
+ int min;
+ int max;
+ int select_a_count(){
+ return min + wr.next();
+ }
+public:
+ virtual const char* next(){
+ str.reset();
+ int c = select_a_count();
+ for(int i=0; i< c; i++){
+ const char * t = item->next();
+ str.append_array(t, strlen(t));
+ }
+ str.append(0);
+ return str;
+ }
+
+ Repeat(Pick * base, int minCount =0, int maxCount = 1, Buffer_int * weights = NULL):
+ wr(weights, maxCount-minCount +1) {
+ this->item = base;
+ this->min = minCount;
+ this->max = maxCount;
+ }
+ virtual ~Repeat(){
+ delete item; // TOFIX: point alias/recursion problem
+ item = NULL;
+ }
+};
+
+
+class Alternation : public Pick {
+public:
+ virtual const char* next(){
+ str.reset();
+ int i = wr.next();
+ const char * t = items[i]->next();
+ str.append_array(t, strlen(t) + 1);
+ return str;
+ }
+ virtual ~Alternation(){
+ int s = items.content_size();
+ for(int i=0; i < s; i++){
+ delete items[i]; // TOFIX: point alias/recursion problem
+ items[i] = NULL;
+ }
+ }
+
+ Alternation & append (Pick * node, int weight = DEFAULT_WEIGHT){
+ items.append(node);
+ wr.append(weight);
+ return *this;
+ }
+private:
+ Buffer_pPick items;
+ Buffer_char str; // null-terminated c-string
+ WeightedRand wr;
+};
+
+///////////////////////////////////////////////////////////
+//
+// The parser
+//
+
+enum TokenType {STRING, VAR, NUMBER, STREAM_END, ERROR, QUESTION, STAR, PLUS, LBRACE, RBRACE, LPAR, RPAR, SEMI, EQ, COMMA, BAR, AT, WAVE, PERCENT};
+
+class Scanner{
+friend int DumpScanner(Scanner & s, UBool dumb);
+private:
+ const char * source;
+ const char * working;
+ const char * history; // for debug
+ enum StateType {START, IN_NUM, IN_VAR_FIRST, IN_VAR, IN_QUOTE, IN_QUOTE_BSLASH, IN_BSLASH, IN_STRING, DONE};
+ StateType state;
+ void terminated(TokenType t){
+ working--; // return the peeked character
+ tokenType = t;
+ token.append(0); // close buffer
+ state = DONE;
+ }
+public:
+ // the buffer of "source" is owned by caller
+ Scanner(const char *src/*[in] c-string*/ = NULL):source(src){
+ working = src;
+ history = working;
+ state = DONE;
+ tokenType = ERROR;
+ }
+
+ //void setSource(const char *const src /*[in] c-string*/){
+ // *(&const_cast<const char *>(source)) = src;
+ //}
+
+ Buffer_char token;
+ TokenType tokenType;
+
+ TokenType getNextToken(){
+ token.reset();
+ state = START;
+ history = working; // for debug
+ while (state != DONE){
+ char c = *working++;
+ if (c == 0 && state != START){//avoid buffer overflow. for IN_QUOE, IN_ESCAPE
+ terminated(ERROR);
+ break; // while
+ }
+ switch(state){
+ case START:
+ tokenType = ERROR;
+ switch(c){
+ case '?' : tokenType = QUESTION; break;
+ case '*' : tokenType = STAR; break;
+ case '+' : tokenType = PLUS; break;
+ case '{' : tokenType = LBRACE; break;
+ case '}' : tokenType = RBRACE; break;
+ case '(' : tokenType = LPAR; break;
+ case ')' : tokenType = RPAR; break;
+ case ';' : tokenType = SEMI; break;
+ case '=' : tokenType = EQ; break;
+ case ',' : tokenType = COMMA; break;
+ case '|' : tokenType = BAR; break;
+ case '@' : tokenType = AT; break;
+ case '~' : tokenType = WAVE; break;
+ case '%' : tokenType = PERCENT; break;
+ case 0 : tokenType = STREAM_END; working-- /*avoid buffer overflow*/; break;
+ }
+ if (tokenType != ERROR){
+ token.append(c);
+ token.append(0);
+ state = DONE;
+ break; // START
+ }
+ switch(c){
+ case '$' : state = IN_VAR_FIRST; token.append(c); break;
+ case '\'' : state = IN_QUOTE; break;
+ case '\\' : state = IN_BSLASH; break;
+ default:
+ if (isWhiteSpace(c)){ // state = START; //do nothing
+ } else if (isDigit(c)){ state = IN_NUM; token.append(c);
+ } else if (isAlphabet(c)){ state = IN_STRING; token.append(c);
+ } else {terminated(ERROR);}
+ }
+ break;//START
+ case IN_NUM:
+ if (isDigit(c)){
+ token.append(c);
+ } else {
+ terminated(NUMBER);
+ }
+ break;//IN_NUM
+ case IN_VAR_FIRST:
+ if (isAlphabet(c)){
+ token.append(c);
+ state = IN_VAR;
+ } else {
+ terminated(ERROR);
+ }
+ break; // IN_VAR_FISRT
+ case IN_VAR:
+ if (isAlphabet(c) || isDigit(c)){
+ token.append(c);
+ } else {
+ terminated(VAR);
+ }
+ break;//IN_VAR
+ case IN_STRING:
+ // About the scanner's behavior for STRING, AT, and ESCAPE:
+ // All of them can be contacted with each other.
+ // This means the scanner will eat up as much as possible strings
+ // (STRING, AT, and ESCAPE) at one time, with no regard of their
+ // combining sequence.
+ //
+ if (c == '\''){
+ state = IN_QUOTE; // the first time we see single quote
+ } else if (c =='\\'){ // back slash character
+ state = IN_BSLASH;
+ } else if (isAlphabet(c) || isDigit(c)){
+ token.append(c);
+ } else{
+ terminated(STRING);
+ }
+ break;//IN_STRING
+ case IN_QUOTE:
+ if (c == '\''){ // the second time we see single quote
+ state = IN_STRING; // see document in IN_STRING
+ } else if ( c== '\\') { // backslah escape in quote
+ state = IN_QUOTE_BSLASH;
+ } else {
+ token.append(c); // eat up everything, includes back slash
+ }
+ break;//IN_QUOTE
+ case IN_QUOTE_BSLASH:
+ case IN_BSLASH:
+ switch (c){
+ case 'n' : token.append('\n'); break;
+ case 'r' : token.append('\r'); break;
+ case 't' : token.append('\t'); break;
+ case '\'' : token.append('\''); break;
+ case '\\' : token.append('\\'); break;
+ default: token.append(c); // unknown escaping, treat it as literal
+ }
+ if (state == IN_BSLASH){
+ state = IN_STRING; // see document in IN_STRING
+ } else { // state == IN_QUOTE_BSLASH
+ state = IN_QUOTE;
+ }
+ break;//IN_BSLASH
+ case DONE: /* should never happen */
+ default:
+ working--;
+ tokenType = ERROR;
+ state = DONE;
+ break;
+ }//switch(state)
+ }//while (state != DONE)
+
+ return tokenType;
+ }
+};//class Scanner
+
+class Parser{
+friend UBool TestParser();
+friend class TestParserT;
+friend class LanguageGenerator_impl;
+private:
+ Scanner s;
+ TokenType & token;
+ int min_max; // for the evil infinite
+
+ UBool match(TokenType expected){
+ if (token == expected) {
+ token = s.getNextToken();
+ return TRUE;
+ } else {
+ //s.dumpCurrentPoint();
+ return FALSE;
+ }
+ }
+
+ UBool weight(int & value){
+ if (token == NUMBER){
+ int temp = atoi(s.token);
+ match(NUMBER);
+ if (match(PERCENT)){
+ value = temp;
+ return TRUE;
+ }
+ }
+ return FALSE;
+ }
+
+ UBool repeat (Pick* &node /*in,out*/){
+ if (node == NULL) return FALSE;
+
+ int count = -2;
+ int min = -2;
+ int max = -2;
+ UBool question = FALSE;
+ switch (token){
+ case QUESTION:
+ match(QUESTION);
+ min = 0;
+ max = 1;
+ count = 2;
+ question = TRUE;
+ break;
+ case STAR:
+ match(STAR);
+ min = 0;
+ max = -1;
+ count = -1;
+ break;
+ case PLUS:
+ match(PLUS);
+ min = 1;
+ max = -1;
+ count = -1;
+ break;
+ case LBRACE:
+ match(LBRACE);
+ if (token != NUMBER){
+ return FALSE;
+ }else {
+ min = atoi(s.token);
+ match(NUMBER);
+ if (token == RBRACE){
+ match(RBRACE);
+ max = min;
+ count = 1;
+ } else if (token == COMMA) {
+ match(COMMA);
+ if (token == RBRACE){
+ match(RBRACE);
+ max = -1;
+ count = -1;
+ } else if (token == NUMBER) {
+ max = atoi(s.token);
+ match(NUMBER);
+ count = max - min + 1;
+ if (!match(RBRACE)) {
+ return FALSE;
+ }
+ } else {
+ return FALSE;
+ }
+ } else {
+ return FALSE;
+ }
+ }
+ break;
+ default:
+ return FALSE;
+ }
+
+ if (count == -2 || min == -2 || max == -2){
+ //ASSERT(FALSE);
+ return FALSE;
+ }
+
+ // eat up following weights
+ Buffer_int weights;
+ int w;
+ while (weight(w)){
+ weights.append(w);
+ }
+
+ // for the evil infinite
+ min_max = min_max > min ? min_max : min;
+ min_max = min_max > max ? min_max : max;
+ if (min_max > PSEUDO_INFINIT){
+ return FALSE; // PSEUDO_INFINIT is less than the real maximum
+ }
+ if (max == -1){ // the evil infinite
+ max = PSEUDO_INFINIT;
+ }
+ // for the strange question mark
+ if (question && weights.content_size() > 0){
+ Buffer_int w2;
+ w2.append(DEFAULT_WEIGHT - weights[0]).append(weights[0]);
+ node = new Repeat(node,min,max,&w2);
+ return TRUE;
+ }
+ node = new Repeat(node,min,max,&weights);
+ return TRUE;
+ }
+
+ UBool core(Pick* &node /*out*/){
+ if (node != NULL) return FALSE; //assert node == NULL
+
+ switch(token){
+ case LPAR:
+ match(LPAR);
+ if(defination(node) && match(RPAR)){
+ return TRUE;
+ }
+ return FALSE;
+ case VAR:
+ node = new Variable(&symbols, s.token);
+ match(VAR);
+ return TRUE;
+ case STRING:
+ node = new Literal(s.token);
+ match(STRING);
+ return TRUE;
+ default:
+ return FALSE;
+ }
+ }
+ UBool modified(Pick* &node /*out*/){
+ if (node != NULL) return FALSE; //assert node == NULL
+
+ if (!core(node)) {
+ return FALSE;
+ }
+
+ for (;;){
+ switch(token){
+ case WAVE:
+ match(WAVE);
+ node = new Morph(*node);
+ break;
+ case AT:
+ match(AT);
+ node = new Quote(*node);
+ break;
+ case QUESTION:
+ case STAR:
+ case PLUS:
+ case LBRACE:
+ if (!repeat(node)) return FALSE;
+ break;
+ case SEMI: // rule definiation closed
+ case RPAR: // within parenthesis (core closed)
+ case BAR: // in alternation
+ case NUMBER: // in alternation, with weight
+ case LPAR: // in sequence
+ case VAR: // in sequence
+ case STRING: // in sequence
+ return TRUE;
+ default:
+ return FALSE;
+ }
+ }
+ }
+
+
+ UBool sequence_list(Pick* &node /*in,out*/){
+ if (node == NULL) return FALSE; // assert node != NULL
+
+ Sequence* seq = new Sequence();
+ Pick * n = node;
+
+ while (token == VAR || token == STRING || token == LPAR){
+ seq->append(n);
+ n = NULL;
+ if (modified(n)){
+ // go on
+ } else {
+ goto FAIL;
+ }
+ }
+
+ if (token == SEMI || token == RPAR || token == BAR){
+ seq->append(n);
+ node = seq;
+ return TRUE;
+ }
+FAIL:
+ delete seq;
+ return FALSE;
+
+ }
+
+ UBool sequence(Pick* &node /*out*/){
+ if (node != NULL) return FALSE; //assert node == NULL
+
+ if (!modified(node)) {
+ return FALSE;
+ }
+
+ if (token == VAR || token == STRING || token == LPAR){
+ return sequence_list(node);
+ } else {
+ return TRUE; // just a modified
+ }
+ }
+
+ UBool alternation_list(Pick* &node /*in,out*/){
+ if (node == NULL) return FALSE; // assert node != NULL
+
+ Alternation * alt = new Alternation();
+ Pick * n = node;
+ int w = DEFAULT_WEIGHT;
+
+ while (token == NUMBER || token == BAR){
+ if(token == NUMBER) {
+ if (weight(w)){
+ if (token == BAR){
+ // the middle item, go on
+ } else {
+ // the last item or encounter error
+ break; //while
+ }
+ } else {
+ goto FAIL;
+ }
+ } // else token == BAR
+ match(BAR);
+ alt->append(n,w);
+
+ n = NULL;
+ w = DEFAULT_WEIGHT;
+ if (sequence(n)){
+ // go on
+ } else {
+ goto FAIL;
+ }
+ }
+
+ if (token == SEMI || token == RPAR) {
+ alt->append(n,w);
+ node = alt;
+ return TRUE;
+ }
+FAIL:
+ delete alt;
+ return FALSE;
+ }
+
+ UBool alternation(Pick* &node /*out*/){
+ if (node != NULL) return FALSE; //assert node == NULL
+
+ // 'sequence' has higher precedence than 'alternation'
+ if (!sequence(node)){
+ return FALSE;
+ }
+
+ if (token == BAR || token == NUMBER){ // find a real alternation1, create it.
+ return alternation_list(node);
+ } else {
+ return TRUE; // just a sequence_old
+ }
+ }
+
+
+ UBool defination(Pick* &node /*out*/){
+ if (node != NULL) return FALSE; //assert node == NULL
+ return alternation(node);
+ }
+
+ UBool rule(){
+ if (token == VAR){
+ Buffer_char name;
+ name.append_array(s.token, strlen(s.token) + 1);
+ match(VAR);
+
+ if (match(EQ)){
+ Pick * t = NULL;
+ if(defination(t)){
+ symbols.put(name, t);
+ return match(SEMI);
+ }
+ }
+ }
+ return FALSE;
+ }
+public:
+ UBool rules(){
+ symbols.reset();
+ token = s.getNextToken();
+ while (rule()){
+ }
+ if (token == STREAM_END){
+ return TRUE;
+ } else {
+ //s.dumpCurrentPoint();
+ return FALSE;
+ }
+ }
+
+public:
+ SymbolTable symbols;
+
+ Parser(const char *const source):s(source), token(s.tokenType){
+ min_max = -2;
+ }
+ UBool parse(){
+ return rules();
+ }
+
+}; // class Parser
+
+
+///////////////////////////////////////////////////////////
+//
+//
+//
+
+int DumpScanner(Scanner & s, UBool dump = TRUE){
+ int len = strlen(s.source);
+ int error_start_offset = s.history - s.source;
+ if (dump){
+ printf("\n=================== DumpScanner ================\n");
+ fwrite(s.source, len, 1, stdout);
+ printf("\n-----parsed-------------------------------------\n");
+ fwrite(s.source, s.history - s.source, 1, stdout);
+ printf("\n-----current------------------------------------\n");
+ fwrite(s.history, s.working - s.history, 1, stdout);
+ printf("\n-----unparsed-----------------------------------\n");
+ fwrite(s.working, (s.source + len - s.working), 1, stdout);
+ printf("\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
+ }
+ return error_start_offset;
+}
+
+class LanguageGenerator_impl{
+public:
+ LanguageGenerator_impl(const char *const bnf_definition, const char *const top_node)
+ :par(bnf_definition), top_node_name(top_node){
+ srand((unsigned)time( NULL ));
+ }
+
+ LanguageGenerator::PARSE_RESULT parseBNF(UBool debug = TRUE){
+ if (par.parse()){
+ if (par.symbols.find(top_node_name, &top_node_ref) == SymbolTable::HAS_REF) {
+ if (par.symbols.is_complete()) {
+ return LanguageGenerator::OK;
+ } else {
+ if (debug) printf("The bnf definition is incomplete.\n");
+ return LanguageGenerator::INCOMPLETE;
+ }
+ } else {
+ if (debug) printf("No top node is found.\n");
+ return LanguageGenerator::NO_TOP_NODE;
+ }
+ } else {
+ if(debug) {
+ printf("The bnf definition is wrong\n");
+ DumpScanner(par.s, TRUE);
+ }
+ return LanguageGenerator::BNF_DEF_WRONG;
+ }
+ }
+ const char * next(){
+ return top_node_ref->next();
+ }
+
+private:
+ Parser par;
+ const char *const top_node_name;
+ Pick * top_node_ref;
+};
+
+LanguageGenerator::LanguageGenerator():lang_gen(NULL){
+}
+
+LanguageGenerator::~LanguageGenerator(){
+ delete lang_gen;
+}
+
+LanguageGenerator::PARSE_RESULT LanguageGenerator::parseBNF(const char *const bnf_definition /*in*/, const char *const top_node/*in*/, UBool debug){
+ if (lang_gen){
+ delete lang_gen;
+ }
+ lang_gen = new LanguageGenerator_impl(bnf_definition, top_node);
+ PARSE_RESULT r = lang_gen->parseBNF(debug);
+ if (r != OK){
+ delete lang_gen;
+ lang_gen = NULL;
+ return r;
+ } else {
+ return r;
+ }
+}
+const char *LanguageGenerator::next(){ // Return a null-terminated c-string. The buffer is owned by callee.
+ if (lang_gen){
+ return lang_gen->next();
+ }else {
+ return "";
+ }
+}
+
+///////////////////////////////////////////////////////////
+//
+// The test code for WBNF
+//
+
+#define CALL(fun) \
+ if (fun()){ \
+ printf("Pass: " #fun "\n");\
+ } else { \
+ printf("FAILED: !!! " #fun " !!!\n"); \
+ }
+
+#define DUMP_R(fun, var, times) \
+ {printf("\n========= " #fun " =============\n"); \
+ for (int i=0; i<times; i++) { \
+ const char * t = var.next();\
+ fwrite(t,strlen(t),1,stdout); \
+ printf("\n"); \
+ } \
+ printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");}
+
+
+
+#if TEST_WBNF_TEST
+static UBool TestQuote(){
+ const char *const str = "This ' A !,z| qq [] .new\tline";
+ //const char *const str_r = "This \\' A '!,'z'|' qq '[]' '.'new\tline";
+ ////
+ //// :( we must quote our string to following C syntax
+ //// cannot type the literal here, it makes our code rather human unreadable
+ //// very very unconformable!
+ ////
+ ///*
+ //*/
+
+ //const char *const s1 = "ab'c";
+ //const char (* s1_r1) [] = { "ab''c", // ab''c
+ // "ab\\'c", // ab\'c
+ // };//
+ ///*
+ // . '.' \.
+ // .. \.\. '.'\. '.'\. '..' // '.''.' wrong
+ //*/
+
+ //const char *const s2 = "a..'.b"; // a..'.b
+ //const char (*s2_r) [] = { "a'..''.'b" // a'..''.'b
+ // ,"a'..\\'.'b" // a'..\'.'b
+ // ,"a'..'\\''.'b" // a'..'\''.'b
+ // };//
+
+ //const char *const s3 = "a..\\.b"; // a..\.b
+ //const char (*s3_r) [] = { "a'..\\\\.'b" // a'..\\.'b
+ // ,"a'..'\\\\'.'b" // a'..'\\'.'b
+ // };//
+
+ // // no catact operation, no choice, must be compact
+
+ srand((unsigned)time( NULL ));
+
+ //Escaper l(Escaper::NO, Escaper::NO, Escaper::RAND_ESC);
+ Pick *p = new Literal(str);
+ Quote q(*p);
+
+ DUMP_R(TestQuote, (*p), 1);
+ DUMP_R(TestQuote, q, 20);
+ return FALSE;
+}
+static UBool TestLiteral(){
+ const char * s = "test string99.";
+ Literal n(s);
+ const char * r = n.next();
+ return strcmp(s,r) == 0;
+}
+
+static UBool TestSequence(){
+ Sequence seq;
+ seq.append(new Literal("abc "));
+ seq.append(new Literal(", s"));
+
+ return strcmp(seq.next(), "abc , s") == 0;
+}
+static UBool TestAlternation(){
+ srand((unsigned)time( NULL ));
+ Alternation alt;
+ alt.append(new Literal("aaa_10%"),10);
+ alt.append(new Literal("bbb_0%"),0);
+ alt.append(new Literal("ccc_10%"),10);
+ alt.append(new Literal("ddddddd_50%"),50);
+
+ DUMP_R(TestAlternation, alt, 50);
+
+ return FALSE;
+}
+
+static UBool TestBuffer(){
+ Buffer_int t;
+ t.append(1).append(0).append(5);
+ int s = t.content_size();
+ for (int i=0; i<s; ++i){
+ printf("%d\n", t[i]);
+ }
+ return FALSE;
+}
+
+static UBool TestWeightedRand(){
+ srand((unsigned)time( NULL ));
+ Buffer_int t;
+ t.append(1).append(0).append(5);
+ WeightedRand wr(&Buffer_int().append(10).append(0).append(50),4);
+// WeightedRand wr(&t,3);
+ for (int i=0; i< 50; ++i){
+ printf("%d\n", wr.next());
+ }
+ return FALSE;
+}
+
+static UBool TestRepeat(){
+ srand((unsigned)time( NULL ));
+ Repeat rep(new Literal("aaa1-5 "), 1, 5);
+ DUMP_R(TestRepeat, rep, 50);
+
+ Repeat r2(new Literal("b{1,3}1%0%5% "), 1, 3, &Buffer_int().append(1).append(0).append(5));
+ DUMP_R(TestRepeat, r2, 50);
+
+ Repeat r3(new Literal("aaa5-5 "), 5, 5);
+ DUMP_R(TestRepeat, r3, 50);
+
+ return FALSE;
+}
+
+static UBool TestVariable(){
+ SymbolTable tab;
+ Pick * value = new Literal("string1");
+ Variable var1(&tab, "x", value);
+
+ Variable var2(&tab, "y");
+// tab.put(var2, value); // TOFIX: point alias/recursion problem
+ Pick * value2 = new Literal("string2");
+ tab.put(var2, value2);
+
+ Pick * value3 = new Literal("string3");
+ Variable var3(&tab, "z");
+ tab.put("z", value3);
+
+ UBool pass;
+ pass = strcmp(var1.next(), value->next()) == 0;
+ pass = pass && strcmp(var2.next(), value2->next()) == 0;
+ pass = pass && strcmp(var3.next(), value3->next()) == 0;
+ return pass;
+}
+
+static UBool TestSymbolTable(){
+ Literal * n1 = new Literal("string1");
+ Literal * n2 = new Literal("string2");
+ SymbolTable t;
+ t.put("abc", n1);
+ t.put("$aaa", n2);
+// t.put("alias", n1); // TOFIX: point alias/recursion problem
+ t.put("bbb");
+
+ UBool pass;
+ pass = t.find(NULL) == SymbolTable::EMPTY;
+ pass = pass && t.find("ccc") == SymbolTable::NO_VAR;
+ pass = pass && t.find("bbb") == SymbolTable::NO_REF;
+ pass = pass && t.find("abc") == SymbolTable::HAS_REF;
+ pass = pass && t.find("$aaa") == SymbolTable::HAS_REF;
+
+ t.reset();
+ pass = pass && t.find("abc") == SymbolTable::NO_VAR;
+ return pass;
+}
+
+
+static UBool TestScanner(void){
+ //const char str1[] = "$root = $command{0,5} $reset $mostRules{1,20};";
+ //const char str1_r[][20] = {"$root", "=", "$command", "{", "0", ",", "5", "}",
+ // "$reset", "$mostRules", "{", "1", ",", "20", "}", ";"};
+
+ const char str2[] = "$p2 =(\\\\ $s $string $s)? 25%;";
+ const char str2_r[][20] = {"$p2", "=", "(", "\\", "$s", "$string", "$s", ")", "?", "25", "%", ";"};
+
+ const char *str = str2;
+ const char (*str_r)[20] = str2_r;
+ int tokenNum = sizeof(str2_r)/sizeof(char[20]);
+
+ Scanner t(str);
+ UBool pass = TRUE;
+ t.getNextToken();
+ int i = 0;
+ while (pass){
+ if (t.tokenType == STREAM_END){
+ pass = pass? i == tokenNum : FALSE;
+ break;//while
+ } else if (t.tokenType == ERROR){
+ pass = FALSE;
+ break;//while
+ } else {
+ pass = strcmp( &(t.token[0]), str_r[i++]) == 0;
+ t.getNextToken();
+ }
+ }
+
+ //const char ts[] = "$commandList = '['"
+ //" ( alternate ' ' $alternateOptions"
+ //" | backwards ' 2'"
+ //" | normalization ' ' $onoff "
+ //" | caseLevel ' ' $onoff "
+ //" | hiraganaQ ' ' $onoff"
+ //" | caseFirst ' ' $caseFirstOptions"
+ //" | strength ' ' $strengthOptions"
+ //" ) ']';" ;
+
+ //Scanner t2(ts);
+ //pass = TRUE;
+ //do {
+ // t2.getNextToken();
+ // if (t2.tokenType == ERROR){
+ // DumpScanner(t2);
+ // return FALSE;
+ // }
+ //}while (t.tokenType != STREAM_END);
+
+ return pass;
+}
+
+class TestParserT {
+public:
+UBool operator () (const char *const str, const int exp_error_offset = -1, const UBool dump = TRUE){
+ Parser par(str);
+ if (par.rules()){
+ if ( exp_error_offset == -1){
+ return TRUE;
+ }else {
+ DumpScanner(par.s,dump);
+ return FALSE;
+ }
+ }else {
+ return DumpScanner(par.s, dump) == exp_error_offset;
+ }
+}
+};
+
+UBool TestParser(){
+ TestParserT test;
+
+ UBool pass = TRUE;
+ pass = pass && test ("$s = ' ' ? 50%;");
+ pass = pass && test("$x = ($var {1,2}) 3%;"); // legal
+ pass = pass && test("$x = $var {1,2} 3% | b 4%;"); // legal
+ pass = pass && test("$x = $var {1,2} 3%;"); // legal
+ pass = pass && test("$m = $c ? 2% 4% | $r 5% | $n 25%;"); // legal
+ pass = pass && test("$a = b ? 2% | c 5%;"); // legal
+ pass = pass && test("$x = A B 5% C 10% | D;", 8, FALSE); // illegal 5%
+ pass = pass && test("$x = aa 45% | bb 5% cc;", 19, FALSE);// illegal cc
+ pass = pass && test("$x = (b 5%) (c 6%);"); // legal
+ pass = pass && test("$x = (b 5%) c 6%;", 13, FALSE); // illegal 6%
+ pass = pass && test("$x = b 5% (c 6%);", 9, FALSE); // illegal (c 6%)
+ pass = pass && test("$x = b 5% c 6%;", 9, FALSE); // illegal c 6%
+ pass = pass && test("$x = b 5%;"); // legal
+ pass = pass && test("$x = aa 45% | bb 5% cc;", 19, FALSE);// illegal cc
+ pass = pass && test("$x = a | b | c 4% | d 5%;"); // legal
+ pass = pass && test("$s = ' ' ? 50% abc;"); // legal
+ pass = pass && test("$s = a | c d | e f;"); // legal
+ pass = pass && test( "$z = q 0% | p 1% | r 100%;"); // legal How to check parsed tree??
+
+ pass = pass && test("$s = ' ' ? 50%;");
+ pass = pass && test("$relationList = '<' | '<<' | ';' | '<<<' | ',' | '=';");
+ pass = pass && test("$p1 = ($string $s '|' $s)? 25%;");
+ pass = pass && test("$p2 = (\\\\ $s $string $s)? 25%;");
+ pass = pass && test("$rel2 = $p1 $string $s $p2;");
+ pass = pass && test("$relation = $relationList $s ($rel1 | $rel2) $crlf;");
+ pass = pass && test("$command = $commandList $crlf;");
+ pass = pass && test("$reset = '&' $s ($beforeList $s)? 10% ($positionList 100% | $string 10%) $crlf;");
+ pass = pass && test("$mostRules = $command 1% | $reset 5% | $relation 25%;");
+ pass = pass && test("$root = $command{0,5} $reset $mostRules{1,20};");
+
+ const char collationBNF[] =
+ "$s = ' '? 50%;"
+ "$crlf = '\r\n';"
+
+ "$alternateOptions = non'-'ignorable | shifted;"
+ "$onoff = on | off;"
+ "$caseFirstOptions = off | upper | lower;"
+ "$strengthOptions = '1' | '2' | '3' | '4' | 'I';"
+ "$commandList = '['"
+ " ( alternate ' ' $alternateOptions"
+ " | backwards ' 2'"
+ " | normalization ' ' $onoff "
+ " | caseLevel ' ' $onoff "
+ " | hiraganaQ ' ' $onoff"
+ " | caseFirst ' ' $caseFirstOptions"
+ " | strength ' ' $strengthOptions"
+ " ) ']';"
+ "$command = $commandList $crlf;"
+
+ "$ignorableTypes = (tertiary | secondary | primary) ' ' ignorable;"
+ "$allTypes = variable | regular | implicit | trailing | $ignorableTypes;"
+ "$positionList = '[' (first | last) ' ' $allTypes ']';"
+
+ "$beforeList = '[before ' ('1' | '2' | '3') ']';"
+
+ "$relationList = ("
+ " '<'"
+ " | '<<'"
+ " | ';'"
+ " | '<<<'"
+ " | ','"
+ " | '='"
+ ");"
+ "$string = $magic;"
+ "$rel1 = '[variable top]' $s;"
+ "$p1 = ($string $s '|' $s)? 25%;"
+ "$p2 = (\\\\ $s $string $s)? 25%;"
+ "$rel2 = $p1 $string $s $p2;"
+ "$relation = $relationList $s ($rel1 | $rel2) $crlf;"
+
+ "$reset = '&' $s ($beforeList $s)? 10% ($positionList 1% | $string 10%) $crlf;"
+ "$mostRules = $command 1% | $reset 5% | $relation 25%;"
+ "$root = $command{0,5} $reset $mostRules{1,20};"
+ ;
+
+ pass = pass && test(collationBNF);
+
+
+ return pass;
+}
+
+static UBool TestMorph(){
+ srand((unsigned)time( NULL ));
+
+ Alternation * alt = new Alternation();
+
+ (*alt)
+ .append(new Literal("a")).append(new Literal("b")).append(new Literal("c"))
+ .append(new Literal("d")).append(new Literal("e")).append(new Literal("f"))
+ .append(new Literal("g")).append(new Literal("h")).append(new Literal("i"))
+ .append(new Literal("j")).append(new Literal("k")).append(new Literal("l"))
+ .append(new Literal("m")).append(new Literal("n")).append(new Literal("o"))
+ ;
+
+ Repeat * rep = new Repeat( alt ,5,5 );
+ Morph m( *rep);
+
+// DUMP_R(TestMorph,(*rep),20);
+ DUMP_R(TestMorph,m,100);
+
+ return FALSE;
+}
+
+#endif
+
+static UBool TestLanguageGenerator(){
+ //LanguageGenerator g;
+ //const char *const s = "$s = p 0% | q 1%;";
+ //g.parseBNF(s, "$s");
+ UBool pass;
+ //= strcmp("q", g.next()) == 0;
+
+ const char *const def =
+ //"$a = $b;"
+ //"$b = $c;"
+ //"$c = $t;"
+ //"$t = abc $z{1,2};"
+ //"$k = a | b | c | d | e | f | g ;"
+ //"$z = q 0% | p 1% | r 1%;"
+ "$x = a ? 0%;"
+ ; // end of string
+// const char * s = "abczz";
+//
+//
+ LanguageGenerator g;
+ pass = g.parseBNF(def, "$x",TRUE);
+//// LanguageGenerator g(collationBNF, "$root", "$magic", new MagicNode());
+//
+ if (pass != LanguageGenerator::OK) return FALSE;
+
+ DUMP_R(TestLanguageGenerator, g, 20);
+ return pass;
+
+ ////UBool pass = strcmp(s,r) == 0;
+
+ //if (pass){
+ // printf("TestRandomLanguageGenerator passed.\n");
+ //} else {
+ // printf("TestRandomLanguageGenerator FAILED!!!\n");
+ //}
+ //return pass;
+}
+
+void TestWbnf(void){
+ srand((unsigned)time( NULL ));
+
+ //CALL(TestLiteral);
+ //CALL(TestSequence);
+ //CALL(TestSymbolTable);
+ //CALL(TestVariable);
+
+ //TestRepeat();
+ //TestAlternation();
+ //TestMorph();
+
+ //TestQuote();
+ //TestBuffer();
+ //TestWeightedRand();
+
+ //CALL(TestScanner);
+ //CALL(TestParser);
+ CALL(TestLanguageGenerator);
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/wbnf.h b/Build/source/libs/icu/icu-xetex/test/intltest/wbnf.h
new file mode 100644
index 00000000000..7b76f8f2daa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/wbnf.h
@@ -0,0 +1,157 @@
+/*
+ ******************************************************************************
+ * Copyright (C) 2005, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ ******************************************************************************
+ */
+/*
+ WBNF, Weighted BNF, is an extend BNF. The most difference between WBNF
+ and standard BNF is the WBNF accepts weight for its alternation items.
+ The weight specifies the opportunity it will be selected.
+
+ The purpose of WBNF is to help generate a random string from a given grammar
+ which can be described with standard BNF. The introduction of 'weight'
+ is to guide the generator to give the specific parts different chances to be
+ generated.
+
+ Usually, the user gives LanguageGenerator the grammar description in WBNF,
+ then LanguageGenerator will generate a random string on every next() call.
+ The return code of parseBNF() can help user to determine the error,
+ either in the grammar description or in the WBNF parser itself.
+
+
+ The grammar of WBNF itself can be described in standard BNF,
+
+ escaping = _single character with a leading back slash, either inside or outside quoting_
+ quoting = _quoted with a pair of single quotation marks_
+ string = string alphabet | string digit | string quoting | string escaping |
+ alphabet | quoting | escaping
+ alphabet =
+ digit =
+ integer = integer digit | digit
+ weight = integer %
+ weight-list = weight-list weight | weight
+ var = var alphabet | var digit | $ alphabet
+
+ var-defs = var-defs var-def | var-def
+ var-def = var '=' definition;
+
+ alternation = alternation '|' alt-item | alt-item
+ alt-item = sequence | sequence weight
+
+ sequence = sequence modified | modified
+
+ modified = core | morph | quote | repeat
+ morph = modified ~
+ quote = modified @
+ repeat = modified quantifier | modified quantifier weight-list
+ quantifier = ? | * | + | { integer , integer} | {integer, } | {integer}
+
+ core = var | string | '(' definition ')'
+
+ definition = core | modified | sequence | alternation
+ definition = alternation
+
+ Remarks:
+ o Following characters are literals in preceding definition
+ but are syntax symbols in WBNF
+
+ % $ ~ @ ? * + { } ,
+
+ o Following character are syntax symbols in preceding definition
+ (sapce) contact operation, or separators to increase readability
+ = definition
+ | selection operation
+ ( ) precedence select
+ ' ' override special-character to plain character
+
+ o the definition of 'escaping' and 'quoting' are preceding definition text
+ o infinite is actually a predefine value PSEUDO_INFINIT defined in this file
+ o if weight is not presented in "alt-item' and 'repeat',
+ a default weight DEFAULT_WEIGHT defined in this file is used
+
+ o * == {0, }
+ + == {1, }
+ ? == {0, 1}
+
+ o the weight-list for repeat assigns the weights for repeat itmes one by one
+
+ demo{1,3} 30% 40% 100% == (demo)30% | (demodemo)40% | (demodemodemo)100%
+
+ To find more explain of the weight-list, please see the LIMITATION of the grammar
+
+ o but the weight-list for question mark has different meaning
+
+ demo ? 30% != demo{0,1} 30% 100%
+ demo ? 30% == demo{0,1} 70% 30%
+
+ the 70% is calculated from (DEFAULT_WEIGHT - weight)
+
+
+ Known LIMITATION of the grammar
+ For 'repeat', the parser will eat up as much as possible weights at one time,
+ discard superfluous weights if it is too much,
+ fill insufficient weights with default weight if it is too less.
+ This behavior means following definitions are equal
+
+ demo{1,3} 30% 40% 100%
+ demo{1,3} 30% 40% 100% 50%
+ demo{1,3} 30% 40%
+
+ This behavior will cause a little confusion when defining an alternation
+
+ demo{1,3} 30% 40% 100% 50% | show 20%
+
+ is interpreted as
+
+ (demo{1,3} 30% 40% 100%) 100% | show 20%
+
+ not
+
+ (demo{1,3} 30% 40% 100%) 50% | show 20%
+
+ to get an expected definition, please use parentheses.
+
+ Known LIMITATION of current implement
+ Due to the well known point alias problem, current Parser will be effectively
+ crashed if the definition looks like
+
+ $a = demo;
+ $b = $a;
+ $c = $a;
+ or
+ $a = demo;
+ $b = $a $a;
+ or
+ $a = demo;
+ $b = $b $a;
+
+ The crash will occur at delete operation in destructor or other memory release code.
+ Several plans are on hard to fix the problem. Use a smart point with reference count,
+ or use a central memory management solution. But now, it works well with collation
+ monkey test, which is the only user for WBNF.
+*/
+
+#ifndef _WBNF
+#define _WBNF
+
+#include "unicode/utypes.h"
+
+const int DEFAULT_WEIGHT = 100;
+const int PSEUDO_INFINIT = 200;
+
+class LanguageGenerator_impl;
+
+class LanguageGenerator{
+ LanguageGenerator_impl * lang_gen;
+public:
+ enum PARSE_RESULT {OK, BNF_DEF_WRONG, INCOMPLETE, NO_TOP_NODE};
+ LanguageGenerator();
+ ~LanguageGenerator();
+ PARSE_RESULT parseBNF(const char *const bnf_definition /*in*/, const char *const top_node/*in*/, UBool debug=FALSE);
+ const char *next(); /* Return a null-terminated c-string. The buffer is owned by callee. */
+};
+
+void TestWbnf(void);
+
+#endif /* _WBNF */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/windttst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/windttst.cpp
new file mode 100644
index 00000000000..3869f34acfc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/windttst.cpp
@@ -0,0 +1,197 @@
+/*
+********************************************************************************
+* Copyright (C) 2005-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+********************************************************************************
+*
+* File WINDTTST.CPP
+*
+********************************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#ifdef U_WINDOWS
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/format.h"
+#include "unicode/numfmt.h"
+#include "unicode/locid.h"
+#include "unicode/ustring.h"
+#include "unicode/testlog.h"
+#include "unicode/utmscale.h"
+
+#include "windtfmt.h"
+#include "winutil.h"
+#include "windttst.h"
+
+#include "cmemory.h"
+#include "cstring.h"
+#include "locmap.h"
+#include "wintz.h"
+
+# define WIN32_LEAN_AND_MEAN
+# define VC_EXTRALEAN
+# define NOUSER
+# define NOSERVICE
+# define NOIME
+# define NOMCX
+# include <windows.h>
+
+#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+
+static const char *getCalendarType(int32_t type)
+{
+ switch (type)
+ {
+ case 1:
+ case 2:
+ return "@calendar=gregorian";
+
+ case 3:
+ return "@calendar=japanese";
+
+ case 6:
+ return "@calendar=islamic";
+
+ case 7:
+ return "@calendar=buddhist";
+
+ case 8:
+ return "@calendar=hebrew";
+
+ default:
+ return "";
+ }
+}
+
+void Win32DateTimeTest::testLocales(TestLog *log)
+{
+ SYSTEMTIME winNow;
+ UDate icuNow = 0;
+ SYSTEMTIME st;
+ FILETIME ft;
+ UnicodeString zoneID;
+ const TimeZone *tz = TimeZone::createDefault();
+ TIME_ZONE_INFORMATION tzi;
+
+ uprv_memset(&tzi, 0, sizeof(tzi));
+ tz->getID(zoneID);
+ if (! uprv_getWindowsTimeZoneInfo(&tzi, zoneID.getBuffer(), zoneID.length())) {
+ UBool found = FALSE;
+ int32_t ec = TimeZone::countEquivalentIDs(zoneID);
+
+ for (int z = 0; z < ec; z += 1) {
+ UnicodeString equiv = TimeZone::getEquivalentID(zoneID, z);
+
+ if (found = uprv_getWindowsTimeZoneInfo(&tzi, equiv.getBuffer(), equiv.length())) {
+ break;
+ }
+ }
+
+ if (! found) {
+ GetTimeZoneInformation(&tzi);
+ }
+ }
+
+ GetSystemTime(&st);
+ SystemTimeToFileTime(&st, &ft);
+ SystemTimeToTzSpecificLocalTime(&tzi, &st, &winNow);
+
+ int64_t wftNow = ((int64_t) ft.dwHighDateTime << 32) + ft.dwLowDateTime;
+ UErrorCode status = U_ZERO_ERROR;
+
+ int64_t udtsNow = utmscale_fromInt64(wftNow, UDTS_WINDOWS_FILE_TIME, &status);
+
+ icuNow = (UDate) utmscale_toInt64(udtsNow, UDTS_ICU4C_TIME, &status);
+
+ int32_t lcidCount = 0;
+ Win32Utilities::LCIDRecord *lcidRecords = Win32Utilities::getLocales(lcidCount);
+
+ for(int i = 0; i < lcidCount; i += 1) {
+ UErrorCode status = U_ZERO_ERROR;
+ WCHAR longDateFormat[81], longTimeFormat[81], wdBuffer[256], wtBuffer[256];
+ int32_t calType = 0;
+
+ // NULL localeID means ICU didn't recognize this locale
+ if (lcidRecords[i].localeID == NULL) {
+ continue;
+ }
+
+ GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_SLONGDATE, longDateFormat, 81);
+ GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_STIMEFORMAT, longTimeFormat, 81);
+ GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_RETURN_NUMBER|LOCALE_ICALENDARTYPE, (LPWSTR) calType, sizeof(int32_t));
+
+ char localeID[64];
+
+ uprv_strcpy(localeID, lcidRecords[i].localeID);
+ uprv_strcat(localeID, getCalendarType(calType));
+
+ UnicodeString ubBuffer, udBuffer, utBuffer;
+ Locale ulocale(localeID);
+ int32_t wdLength, wtLength;
+
+ wdLength = GetDateFormatW(lcidRecords[i].lcid, DATE_LONGDATE, &winNow, NULL, wdBuffer, ARRAY_SIZE(wdBuffer));
+ wtLength = GetTimeFormatW(lcidRecords[i].lcid, 0, &winNow, NULL, wtBuffer, ARRAY_SIZE(wtBuffer));
+
+ if (uprv_strchr(localeID, '@') > 0) {
+ uprv_strcat(localeID, ";");
+ } else {
+ uprv_strcat(localeID, "@");
+ }
+
+ uprv_strcat(localeID, "compat=host");
+
+ Locale wlocale(localeID);
+ DateFormat *wbf = DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull, wlocale);
+ DateFormat *wdf = DateFormat::createDateInstance(DateFormat::kFull, wlocale);
+ DateFormat *wtf = DateFormat::createTimeInstance(DateFormat::kFull, wlocale);
+
+ wbf->format(icuNow, ubBuffer);
+ wdf->format(icuNow, udBuffer);
+ wtf->format(icuNow, utBuffer);
+
+ if (ubBuffer.indexOf(wdBuffer, wdLength - 1, 0) < 0) {
+ UnicodeString baseName(wlocale.getBaseName());
+ UnicodeString expected(wdBuffer);
+
+ log->errln("DateTime format error for locale " + baseName + ": expected date \"" + expected +
+ "\" got \"" + ubBuffer + "\"");
+ }
+
+ if (ubBuffer.indexOf(wtBuffer, wtLength - 1, 0) < 0) {
+ UnicodeString baseName(wlocale.getBaseName());
+ UnicodeString expected(wtBuffer);
+
+ log->errln("DateTime format error for locale " + baseName + ": expected time \"" + expected +
+ "\" got \"" + ubBuffer + "\"");
+ }
+
+ if (udBuffer.compare(wdBuffer) != 0) {
+ UnicodeString baseName(wlocale.getBaseName());
+ UnicodeString expected(wdBuffer);
+
+ log->errln("Date format error for locale " + baseName + ": expected \"" + expected +
+ "\" got \"" + udBuffer + "\"");
+ }
+
+ if (utBuffer.compare(wtBuffer) != 0) {
+ UnicodeString baseName(wlocale.getBaseName());
+ UnicodeString expected(wtBuffer);
+
+ log->errln("Time format error for locale " + baseName + ": expected \"" + expected +
+ "\" got \"" + utBuffer + "\"");
+ }
+ delete wbf;
+ delete wdf;
+ delete wtf;
+ }
+
+ Win32Utilities::freeLocales(lcidRecords);
+ delete tz;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* #ifdef U_WINDOWS */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/windttst.h b/Build/source/libs/icu/icu-xetex/test/intltest/windttst.h
new file mode 100644
index 00000000000..b9b3e637488
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/windttst.h
@@ -0,0 +1,41 @@
+/*
+********************************************************************************
+* Copyright (C) 2005-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+********************************************************************************
+*
+* File WINDTTST.H
+*
+********************************************************************************
+*/
+
+#ifndef __WINDTTST
+#define __WINDTTST
+
+#include "unicode/utypes.h"
+
+#ifdef U_WINDOWS
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * \file
+ * \brief C++ API: Format dates using Windows API.
+ */
+
+class TestLog;
+
+class Win32DateTimeTest
+{
+public:
+ static void testLocales(TestLog *log);
+
+private:
+ Win32DateTimeTest();
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // #ifdef U_WINDOWS
+
+#endif // __WINDTTST
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.cpp
new file mode 100644
index 00000000000..dfbf200bff0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.cpp
@@ -0,0 +1,323 @@
+/*
+********************************************************************************
+* Copyright (C) 2005-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+********************************************************************************
+*
+* File WINNMTST.CPP
+*
+********************************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#ifdef U_WINDOWS
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/format.h"
+#include "unicode/numfmt.h"
+#include "unicode/locid.h"
+#include "unicode/ustring.h"
+#include "unicode/testlog.h"
+#include "unicode/utmscale.h"
+
+#include "winnmfmt.h"
+#include "winutil.h"
+#include "winnmtst.h"
+
+#include "cmemory.h"
+#include "cstring.h"
+#include "locmap.h"
+#include "wintz.h"
+#include "uassert.h"
+
+# define WIN32_LEAN_AND_MEAN
+# define VC_EXTRALEAN
+# define NOUSER
+# define NOSERVICE
+# define NOIME
+# define NOMCX
+# include <windows.h>
+# include <stdio.h>
+# include <time.h>
+# include <float.h>
+# include <locale.h>
+
+#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+#define NEW_ARRAY(type,count) (type *) uprv_malloc((count) * sizeof(type))
+#define DELETE_ARRAY(array) uprv_free((void *) (array))
+
+#define STACK_BUFFER_SIZE 32
+
+#define LOOP_COUNT 1000
+
+static UBool initialized = FALSE;
+
+/**
+ * Return a random int64_t where U_INT64_MIN <= ran <= U_INT64_MAX.
+ */
+static uint64_t randomInt64(void)
+{
+ int64_t ran = 0;
+ int32_t i;
+
+ if (!initialized) {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+
+ /* Assume rand has at least 12 bits of precision */
+ for (i = 0; i < sizeof(ran); i += 1) {
+ ((char*)&ran)[i] = (char)((rand() & 0x0FF0) >> 4);
+ }
+
+ return ran;
+}
+
+/**
+ * Return a random double where U_DOUBLE_MIN <= ran <= U_DOUBLE_MAX.
+ */
+static double randomDouble(void)
+{
+ double ran = 0;
+
+ if (!initialized) {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+#if 0
+ int32_t i;
+ do {
+ /* Assume rand has at least 12 bits of precision */
+ for (i = 0; i < sizeof(ran); i += 1) {
+ ((char*)&ran)[i] = (char)((rand() & 0x0FF0) >> 4);
+ }
+ } while (_isnan(ran));
+#else
+ int64_t numerator = randomInt64();
+ int64_t denomenator;
+ do {
+ denomenator = randomInt64();
+ }
+ while (denomenator == 0);
+
+ ran = (double)numerator / (double)denomenator;
+#endif
+
+ return ran;
+}
+
+/**
+ * Return a random int32_t where U_INT32_MIN <= ran <= U_INT32_MAX.
+ */
+static uint32_t randomInt32(void)
+{
+ int32_t ran = 0;
+ int32_t i;
+
+ if (!initialized) {
+ srand((unsigned)time(NULL));
+ initialized = TRUE;
+ }
+
+ /* Assume rand has at least 12 bits of precision */
+ for (i = 0; i < sizeof(ran); i += 1) {
+ ((char*)&ran)[i] = (char)((rand() & 0x0FF0) >> 4);
+ }
+
+ return ran;
+}
+
+static UnicodeString &getWindowsFormat(int32_t lcid, UBool currency, UnicodeString &appendTo, const wchar_t *fmt, ...)
+{
+ wchar_t nStackBuffer[STACK_BUFFER_SIZE];
+ wchar_t *nBuffer = nStackBuffer;
+ va_list args;
+ int result;
+
+ nBuffer[0] = 0x0000;
+
+ /* Due to the arguments causing a result to be <= 23 characters (+2 for NULL and minus),
+ we don't need to reallocate the buffer. */
+ va_start(args, fmt);
+ result = _vsnwprintf(nBuffer, STACK_BUFFER_SIZE, fmt, args);
+ va_end(args);
+
+ /* Just to make sure of the above statement, we add this assert */
+ U_ASSERT(result >=0);
+ // The following code is not used because _vscwprintf isn't available on MinGW at the moment.
+ /*if (result < 0) {
+ int newLength;
+
+ va_start(args, fmt);
+ newLength = _vscwprintf(fmt, args);
+ va_end(args);
+
+ nBuffer = NEW_ARRAY(UChar, newLength + 1);
+
+ va_start(args, fmt);
+ result = _vsnwprintf(nBuffer, newLength + 1, fmt, args);
+ va_end(args);
+ }*/
+
+
+ // vswprintf is sensitive to the locale set by setlocale. For some locales
+ // it doesn't use "." as the decimal separator, which is what GetNumberFormatW
+ // and GetCurrencyFormatW both expect to see.
+ //
+ // To fix this, we scan over the string and replace the first non-digits, except
+ // for a leading "-", with a "."
+ //
+ // Note: (nBuffer[0] == L'-') will evaluate to 1 if there is a leading '-' in the
+ // number, and 0 otherwise.
+ for (wchar_t *p = &nBuffer[nBuffer[0] == L'-']; *p != L'\0'; p += 1) {
+ if (*p < L'0' || *p > L'9') {
+ *p = L'.';
+ break;
+ }
+ }
+
+ wchar_t stackBuffer[STACK_BUFFER_SIZE];
+ wchar_t *buffer = stackBuffer;
+
+ buffer[0] = 0x0000;
+
+ if (currency) {
+ result = GetCurrencyFormatW(lcid, 0, nBuffer, NULL, buffer, STACK_BUFFER_SIZE);
+
+ if (result == 0) {
+ DWORD lastError = GetLastError();
+
+ if (lastError == ERROR_INSUFFICIENT_BUFFER) {
+ int newLength = GetCurrencyFormatW(lcid, 0, nBuffer, NULL, NULL, 0);
+
+ buffer = NEW_ARRAY(UChar, newLength);
+ buffer[0] = 0x0000;
+ GetCurrencyFormatW(lcid, 0, nBuffer, NULL, buffer, newLength);
+ }
+ }
+ } else {
+ result = GetNumberFormatW(lcid, 0, nBuffer, NULL, buffer, STACK_BUFFER_SIZE);
+
+ if (result == 0) {
+ DWORD lastError = GetLastError();
+
+ if (lastError == ERROR_INSUFFICIENT_BUFFER) {
+ int newLength = GetNumberFormatW(lcid, 0, nBuffer, NULL, NULL, 0);
+
+ buffer = NEW_ARRAY(UChar, newLength);
+ buffer[0] = 0x0000;
+ GetNumberFormatW(lcid, 0, nBuffer, NULL, buffer, newLength);
+ }
+ }
+ }
+
+ appendTo.append(buffer, (int32_t) wcslen(buffer));
+
+ if (buffer != stackBuffer) {
+ DELETE_ARRAY(buffer);
+ }
+
+ /*if (nBuffer != nStackBuffer) {
+ DELETE_ARRAY(nBuffer);
+ }*/
+
+ return appendTo;
+}
+
+static void testLocale(const char *localeID, int32_t lcid, NumberFormat *wnf, UBool currency, TestLog *log)
+{
+ for (int n = 0; n < LOOP_COUNT; n += 1) {
+ UnicodeString u3Buffer, u6Buffer, udBuffer;
+ UnicodeString w3Buffer, w6Buffer, wdBuffer;
+ double d = randomDouble();
+ int32_t i32 = randomInt32();
+ int64_t i64 = randomInt64();
+
+ getWindowsFormat(lcid, currency, wdBuffer, L"%.16f", d);
+
+ getWindowsFormat(lcid, currency, w3Buffer, L"%I32d", i32);
+
+ getWindowsFormat(lcid, currency, w6Buffer, L"%I64d", i64);
+
+ wnf->format(d, udBuffer);
+ if (udBuffer.compare(wdBuffer) != 0) {
+ UnicodeString locale(localeID);
+
+ log->errln("Double format error for locale " + locale +
+ ": got " + udBuffer + " expected " + wdBuffer);
+ }
+
+ wnf->format(i32, u3Buffer);
+ if (u3Buffer.compare(w3Buffer) != 0) {
+ UnicodeString locale(localeID);
+
+ log->errln("int32_t format error for locale " + locale +
+ ": got " + u3Buffer + " expected " + w3Buffer);
+ }
+
+ wnf->format(i64, u6Buffer);
+ if (u6Buffer.compare(w6Buffer) != 0) {
+ UnicodeString locale(localeID);
+
+ log->errln("int64_t format error for locale " + locale +
+ ": got " + u6Buffer + " expected " + w6Buffer);
+ }
+ }
+}
+
+void Win32NumberTest::testLocales(TestLog *log)
+{
+ int32_t lcidCount = 0;
+ Win32Utilities::LCIDRecord *lcidRecords = Win32Utilities::getLocales(lcidCount);
+
+ for(int i = 0; i < lcidCount; i += 1) {
+ UErrorCode status = U_ZERO_ERROR;
+ char localeID[128];
+
+ // NULL localeID means ICU didn't recognize the lcid
+ if (lcidRecords[i].localeID == NULL) {
+ continue;
+ }
+
+ strcpy(localeID, lcidRecords[i].localeID);
+
+ if (strchr(localeID, '@') > 0) {
+ strcat(localeID, ";");
+ } else {
+ strcat(localeID, "@");
+ }
+
+ strcat(localeID, "compat=host");
+
+ Locale ulocale(localeID);
+ NumberFormat *wnf = NumberFormat::createInstance(ulocale, status);
+ NumberFormat *wcf = NumberFormat::createCurrencyInstance(ulocale, status);
+
+ testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, FALSE, log);
+ testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, TRUE, log);
+
+#if 0
+ char *old_locale = strdup(setlocale(LC_ALL, NULL));
+
+ setlocale(LC_ALL, "German");
+
+ testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, FALSE, log);
+ testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, TRUE, log);
+
+ setlocale(LC_ALL, old_locale);
+
+ free(old_locale);
+#endif
+
+ delete wcf;
+ delete wnf;
+ }
+
+ Win32Utilities::freeLocales(lcidRecords);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* #ifdef U_WINDOWS */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.h b/Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.h
new file mode 100644
index 00000000000..411969ad9ef
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/winnmtst.h
@@ -0,0 +1,41 @@
+/*
+********************************************************************************
+* Copyright (C) 2005-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+********************************************************************************
+*
+* File WINNMTST.H
+*
+********************************************************************************
+*/
+
+#ifndef __WINNMTST
+#define __WINNMTST
+
+#include "unicode/utypes.h"
+
+#ifdef U_WINDOWS
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * \file
+ * \brief C++ API: Format dates using Windows API.
+ */
+
+class TestLog;
+
+class Win32NumberTest
+{
+public:
+ static void testLocales(TestLog *log);
+
+private:
+ Win32NumberTest();
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // #ifdef U_WINDOWS
+
+#endif // __WINNMTST
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/winutil.cpp b/Build/source/libs/icu/icu-xetex/test/intltest/winutil.cpp
new file mode 100644
index 00000000000..1963221ea4e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/winutil.cpp
@@ -0,0 +1,81 @@
+/*
+********************************************************************************
+* Copyright (C) 2005-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+********************************************************************************
+*
+* File WINUTIL.CPP
+*
+********************************************************************************
+*/
+
+#include "unicode/utypes.h"
+
+#ifdef U_WINDOWS
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "winutil.h"
+#include "locmap.h"
+
+# define WIN32_LEAN_AND_MEAN
+# define VC_EXTRALEAN
+# define NOUSER
+# define NOSERVICE
+# define NOIME
+# define NOMCX
+# include <windows.h>
+# include <stdio.h>
+
+static Win32Utilities::LCIDRecord *lcidRecords = NULL;
+static int32_t lcidCount = 0;
+static int32_t lcidMax = 0;
+
+BOOL CALLBACK EnumLocalesProc(LPSTR lpLocaleString)
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ if (lcidCount >= lcidMax) {
+ Win32Utilities::LCIDRecord *newRecords = new Win32Utilities::LCIDRecord[lcidMax + 32];
+
+ for (int i = 0; i < lcidMax; i += 1) {
+ newRecords[i] = lcidRecords[i];
+ }
+
+ delete[] lcidRecords;
+ lcidRecords = newRecords;
+ lcidMax += 32;
+ }
+
+ sscanf(lpLocaleString, "%8x", &lcidRecords[lcidCount].lcid);
+
+ lcidRecords[lcidCount].localeID = uprv_convertToPosix(lcidRecords[lcidCount].lcid, &status);
+
+ lcidCount += 1;
+
+ return TRUE;
+}
+
+Win32Utilities::LCIDRecord *Win32Utilities::getLocales(int32_t &localeCount)
+{
+ LCIDRecord *result;
+
+ EnumSystemLocalesA(EnumLocalesProc, LCID_INSTALLED);
+
+ localeCount = lcidCount;
+ result = lcidRecords;
+
+ lcidCount = lcidMax = 0;
+ lcidRecords = NULL;
+
+ return result;
+}
+
+void Win32Utilities::freeLocales(LCIDRecord *records)
+{
+ delete[] records;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* #ifdef U_WINDOWS */
diff --git a/Build/source/libs/icu/icu-xetex/test/intltest/winutil.h b/Build/source/libs/icu/icu-xetex/test/intltest/winutil.h
new file mode 100644
index 00000000000..03a0044ac6e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/intltest/winutil.h
@@ -0,0 +1,46 @@
+/*
+********************************************************************************
+* Copyright (C) 2005-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+********************************************************************************
+*
+* File WINUTIL.H
+*
+********************************************************************************
+*/
+
+#ifndef __WINUTIL
+#define __WINUTIL
+
+#include "unicode/utypes.h"
+
+#ifdef U_WINDOWS
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * \file
+ * \brief C++ API: Format dates using Windows API.
+ */
+
+class Win32Utilities
+{
+public:
+ struct LCIDRecord
+ {
+ int32_t lcid;
+ const char *localeID;
+ };
+
+ static LCIDRecord *getLocales(int32_t &localeCount);
+ static void freeLocales(LCIDRecord *records);
+
+private:
+ Win32Utilities();
+};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif // #ifdef U_WINDOWS
+
+#endif // __WINUTIL
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/Makefile.in b/Build/source/libs/icu/icu-xetex/test/iotest/Makefile.in
new file mode 100644
index 00000000000..22b70057e70
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/Makefile.in
@@ -0,0 +1,96 @@
+#******************************************************************************
+#
+# Copyright (C) 1999-2005, International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+#******************************************************************************
+## Makefile.in for ICU - test/iotest
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+## All the flags and other definitions are included here.
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/iotest
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = iotest$(EXEEXT)
+
+BUILDDIR := $(CURR_SRCCODE_FULL_DIR)/../../
+# Simplify the path for Unix
+BUILDDIR := $(BUILDDIR:test/iotest/../../=)
+# Simplify the path for Windows
+BUILDDIR := $(BUILDDIR:test\\iotest/../../=)
+# Simplify the path for Windows 98
+BUILDDIR := $(BUILDDIR:TEST\\IOTEST/../../=)
+
+ifneq ($(top_builddir),$(top_srcdir))
+CPPFLAGS += -I$(top_builddir)/common
+endif
+CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/io
+DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
+LIBS = $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(LIBICUIO) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = iotest.o stream.o strtst.o filetst.o trnstst.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+-include Makefile.local
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+ $(INVOKE) ./$(TARGET) $(IOTEST_OPTS) || true
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/filetst.c b/Build/source/libs/icu/icu-xetex/test/iotest/filetst.c
new file mode 100644
index 00000000000..567a63c14a4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/filetst.c
@@ -0,0 +1,1454 @@
+/*
+**********************************************************************
+* Copyright (C) 2004-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: filetst.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2004apr06
+* created by: George Rhoten
+*/
+
+#include "iotest.h"
+#include "unicode/ustdio.h"
+#include "unicode/ustring.h"
+#include "unicode/uloc.h"
+
+#include <string.h>
+
+const char STANDARD_TEST_FILE[] = "iotest-c.txt";
+
+
+#if !UCONFIG_NO_FORMATTING
+static void TestFileFromICU(UFILE *myFile) {
+ int32_t n[1];
+ float myFloat = -1234.0;
+ int32_t newValuePtr[1];
+ double newDoubleValuePtr[1];
+ UChar myUString[256];
+ UChar uStringBuf[256];
+ char myString[256] = "";
+ char testBuf[256] = "";
+ void *origPtr, *ptr;
+ U_STRING_DECL(myStringOrig, "My-String", 9);
+
+ U_STRING_INIT(myStringOrig, "My-String", 9);
+ u_memset(myUString, 0x2a, sizeof(myUString)/sizeof(*myUString));
+ u_memset(uStringBuf, 0x2a, sizeof(uStringBuf)/sizeof(*uStringBuf));
+ memset(myString, '*', sizeof(myString)/sizeof(*myString));
+ memset(testBuf, '*', sizeof(testBuf)/sizeof(*testBuf));
+
+ if (myFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+
+ *n = -1234;
+ if (sizeof(void *) == 4) {
+ origPtr = (void *)0xdeadbeef;
+ } else if (sizeof(void *) == 8) {
+ origPtr = (void *) INT64_C(0x1000200030004000);
+ } else if (sizeof(void *) == 16) {
+ /* iSeries */
+ union {
+ int32_t arr[4];
+ void *ptr;
+ } massiveBigEndianPtr = {{ 0x10002000, 0x30004000, 0x50006000, 0x70008000 }};
+ origPtr = massiveBigEndianPtr.ptr;
+ } else {
+ log_err("sizeof(void*)=%d hasn't been tested before", (int)sizeof(void*));
+ }
+
+ /* Test fprintf */
+ u_fprintf(myFile, "Signed decimal integer %%d: %d\n", *n);
+ u_fprintf(myFile, "Signed decimal integer %%i: %i\n", *n);
+ u_fprintf(myFile, "Unsigned octal integer %%o: %o\n", *n);
+ u_fprintf(myFile, "Unsigned decimal integer %%u: %u\n", *n);
+ u_fprintf(myFile, "Lowercase unsigned hexadecimal integer %%x: %x\n", *n);
+ u_fprintf(myFile, "Uppercase unsigned hexadecimal integer %%X: %X\n", *n);
+ u_fprintf(myFile, "Float %%f: %f\n", myFloat);
+ u_fprintf(myFile, "Lowercase float %%e: %e\n", myFloat);
+ u_fprintf(myFile, "Uppercase float %%E: %E\n", myFloat);
+ u_fprintf(myFile, "Lowercase float %%g: %g\n", myFloat);
+ u_fprintf(myFile, "Uppercase float %%G: %G\n", myFloat);
+ u_fprintf(myFile, "Pointer %%p: %p\n", origPtr);
+ u_fprintf(myFile, "Char %%c: %c\n", 'A');
+ u_fprintf(myFile, "UChar %%C: %C\n", (UChar)0x0041); /*'A'*/
+ u_fprintf(myFile, "String %%s: %s\n", "My-String");
+ u_fprintf(myFile, "NULL String %%s: %s\n", NULL);
+ u_fprintf(myFile, "Unicode String %%S: %S\n", myStringOrig);
+ u_fprintf(myFile, "NULL Unicode String %%S: %S\n", NULL);
+ u_fprintf(myFile, "Percent %%P (non-ANSI): %P\n", myFloat);
+ u_fprintf(myFile, "Spell Out %%V (non-ANSI): %V\n", myFloat);
+
+ if (u_feof(myFile)) {
+ log_err("Got feof while writing the file.\n");
+ }
+
+ *n = 1;
+ u_fprintf(myFile, "\t\nPointer to integer (Count) %%n: n=%d %n n=%d\n", *n, n, *n);
+ u_fprintf(myFile, "Pointer to integer Value: %d\n", *n);
+ u_fprintf(myFile, "This is a long test123456789012345678901234567890123456789012345678901234567890\n");
+ *n = 1;
+ u_fprintf(myFile, "\tNormal fprintf count: n=%d %n n=%d\n", (int)*n, (int*)n, (int)*n);
+ fprintf(u_fgetfile(myFile), "\tNormal fprintf count value: n=%d\n", (int)*n); /* Should be 27 as stated later on. */
+
+ u_fclose(myFile);
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", "en_US_POSIX", NULL);
+
+ if (myFile == NULL) {
+ log_err("Can't read test file.");
+ return;
+ }
+
+ if (u_feof(myFile)) {
+ log_err("Got feof while reading the file and not at the end of the file.\n");
+ }
+
+ myUString[0] = u_fgetc(myFile);
+ if (myUString[0] != 0x53 /* S */) {
+ log_err("u_fgetc 1 returned %X. Expected 'S'.", myString[0]);
+ }
+ u_fungetc(myUString[0], myFile);
+ myUString[0] = u_fgetc(myFile);
+ if (myUString[0] != 0x53 /* S */) {
+ log_err("u_fgetc 2 returned %X. Expected 'S'.", myString[0]);
+ }
+ u_fungetc(myUString[0], myFile);
+ myUString[0] = u_fgetc(myFile);
+ if (myUString[0] != 0x53 /* S */) {
+ log_err("u_fgetc 3 returned %X. Expected 'S'.", myString[0]);
+ }
+ u_fungetc(myUString[0], myFile);
+ myUString[0] = u_fgetc(myFile);
+ myUString[1] = (UChar)u_fgetcx(myFile); /* Mix getc and getcx and see what happens. */
+ myUString[2] = u_fgetc(myFile);
+ if (myUString[0] != 0x53 /* S */ && myUString[1] != 0x69 /* i */ && myUString[2] != 0x6E /* n */) {
+ log_err("u_fgetcx returned \\u%04X\\u%04X\\u%04X. Expected 'Sin'.", myString[0], myString[1], myString[2]);
+ }
+ u_fungetc(myUString[2], myFile);
+ u_fungetc(myUString[1], myFile);
+ u_fungetc(myUString[0], myFile);
+
+ *n = -1234;
+
+ *newValuePtr = 1;
+ u_fscanf(myFile, "Signed decimal integer %%d: %d\n", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%d Got: %d, Expected: %d\n", *newValuePtr, *n);
+ }
+ *newValuePtr = 1;
+ u_fscanf(myFile, "Signed decimal integer %%i: %i\n", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%i Got: %i, Expected: %i\n", *newValuePtr, *n);
+ }
+ *newValuePtr = 1;
+ u_fscanf(myFile, "Unsigned octal integer %%o: %o\n", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%o Got: %o, Expected: %o\n", *newValuePtr, *n);
+ }
+ *newValuePtr = 1;
+ u_fscanf(myFile, "Unsigned decimal integer %%u: %u\n", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%u Got: %u, Expected: %u\n", *newValuePtr, *n);
+ }
+ *newValuePtr = 1;
+ u_fscanf(myFile, "Lowercase unsigned hexadecimal integer %%x: %x\n", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%x Got: %x, Expected: %x\n", *newValuePtr, *n);
+ }
+ *newValuePtr = 1;
+ u_fscanf(myFile, "Uppercase unsigned hexadecimal integer %%X: %X\n", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%X Got: %X, Expected: %X\n", *newValuePtr, *n);
+ }
+ *newDoubleValuePtr = -1.0;
+ u_fscanf(myFile, "Float %%f: %lf\n", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%f Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat);
+ }
+ *newDoubleValuePtr = -1.0;
+ u_fscanf(myFile, "Lowercase float %%e: %le\n", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%e Got: %e, Expected: %e\n", *newDoubleValuePtr, myFloat);
+ }
+ *newDoubleValuePtr = -1.0;
+ u_fscanf(myFile, "Uppercase float %%E: %lE\n", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%E Got: %E, Expected: %E\n", *newDoubleValuePtr, myFloat);
+ }
+ *newDoubleValuePtr = -1.0;
+ u_fscanf(myFile, "Lowercase float %%g: %lg\n", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%g Got: %g, Expected: %g\n", *newDoubleValuePtr, myFloat);
+ }
+ *newDoubleValuePtr = -1.0;
+ u_fscanf(myFile, "Uppercase float %%G: %lG\n", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%G Got: %G, Expected: %G\n", *newDoubleValuePtr, myFloat);
+ }
+ ptr = NULL;
+ u_fscanf(myFile, "Pointer %%p: %p\n", &ptr);
+ if (ptr != origPtr) {
+ log_err("%%p Got: %p, Expected: %p\n", ptr, origPtr);
+ }
+ u_fscanf(myFile, "Char %%c: %c\n", myString);
+ if (*myString != 'A') {
+ log_err("%%c Got: %c, Expected: A\n", *myString);
+ }
+ u_fscanf(myFile, "UChar %%C: %C\n", myUString);
+ if (*myUString != (UChar)0x0041) { /*'A'*/
+ log_err("%%C Got: %C, Expected: A\n", *myUString);
+ }
+ u_fscanf(myFile, "String %%s: %s\n", myString);
+ if (strcmp(myString, "My-String")) {
+ log_err("%%s Got: %s, Expected: My String\n", myString);
+ }
+ u_fscanf(myFile, "NULL String %%s: %s\n", myString);
+ if (strcmp(myString, "(null)")) {
+ log_err("%%s Got: %s, Expected: My String\n", myString);
+ }
+ u_fscanf(myFile, "Unicode String %%S: %S\n", myUString);
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (strcmp(myString, "My-String")) {
+ log_err("%%S Got: %S, Expected: My String\n", myUString);
+ }
+ u_fscanf(myFile, "NULL Unicode String %%S: %S\n", myUString);
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (strcmp(myString, "(null)")) {
+ log_err("%%S Got: %S, Expected: My String\n", myUString);
+ }
+ *newDoubleValuePtr = -1.0;
+ u_fscanf(myFile, "Percent %%P (non-ANSI): %P\n", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%P Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat);
+ }
+ *newDoubleValuePtr = -1.0;
+ u_fscanf(myFile, "Spell Out %%V (non-ANSI): %V\n", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%V Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat);
+ }
+
+ u_fgets(myUString, 4, myFile);
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (myString == NULL || strcmp(myString, "\t\n") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+
+ if (u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile) != myUString) {
+ log_err("u_fgets did not return myUString\n");
+ }
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (myString == NULL || strcmp(myString, "Pointer to integer (Count) %n: n=1 n=1\n") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+
+ if (u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile) != myUString) {
+ log_err("u_fgets did not return myUString\n");
+ }
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (myString == NULL || strcmp(myString, "Pointer to integer Value: 37\n") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+
+ if (u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile) != myUString) {
+ log_err("u_fgets did not return myUString\n");
+ }
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (myString == NULL || strcmp(myString, "This is a long test123456789012345678901234567890123456789012345678901234567890\n") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+
+ if (u_fgets(myUString, 0, myFile) != NULL) {
+ log_err("u_fgets got \"%s\" and it should have returned NULL\n", myString);
+ }
+
+ if (u_fgets(myUString, 1, myFile) != myUString) {
+ log_err("u_fgets did not return myUString\n");
+ }
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (myString == NULL || strcmp(myString, "") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+
+ if (u_fgets(myUString, 2, myFile) != myUString) {
+ log_err("u_fgets did not return myUString\n");
+ }
+ u_austrncpy(myString, myUString, sizeof(myUString)/sizeof(*myUString));
+ if (myString == NULL || strcmp(myString, "\t") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+
+ u_austrncpy(myString, u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile),
+ sizeof(myUString)/sizeof(*myUString));
+ if (strcmp(myString, "Normal fprintf count: n=1 n=1\n") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+
+ if (u_feof(myFile)) {
+ log_err("Got feof while reading the file and not at the end of the file.\n");
+ }
+ u_austrncpy(myString, u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile),
+ sizeof(myUString)/sizeof(*myUString));
+ if (strcmp(myString, "\tNormal fprintf count value: n=27\n") != 0) {
+ log_err("u_fgets got \"%s\"\n", myString);
+ }
+ if (!u_feof(myFile)) {
+ log_err("Did not get feof while reading the end of the file.\n");
+ }
+ if (u_fscanf(myFile, "%S\n", myUString) != 0) {
+ log_err("u_fscanf read data while reading the end of the file.\n");
+ }
+
+ u_fclose(myFile);
+}
+
+static void TestFile(void) {
+/* FILE *standardFile;*/
+
+ log_verbose("Testing u_fopen\n");
+ TestFileFromICU(u_fopen(STANDARD_TEST_FILE, "w", "en_US_POSIX", NULL));
+
+/* Don't know how to make this work without stdout or stderr */
+/*
+ log_verbose("Testing u_finit\n");
+ standardFile = fopen(STANDARD_TEST_FILE, "wb");
+ TestFileFromICU(u_finit(standardFile, NULL, NULL));
+ fclose(standardFile);
+*/
+}
+#endif
+
+static void StdinBuffering(void) {
+#if 0
+ UChar buff[255];
+ int32_t num = 0;
+ UFILE *uStdIn = NULL;
+ UFILE *uStdOut = NULL;
+ uStdIn = u_finit(stdin, NULL, NULL);
+ uStdOut = u_finit(stdout, NULL, NULL);
+ if (uStdIn == NULL)
+ return;
+
+ buff[0] = 0x40;
+ buff[1] = 0;
+ u_fgets(buff, sizeof(buff)/sizeof(buff[0]), uStdIn);
+ u_fprintf(uStdOut, "%S\n", buff);
+ u_fscanf(uStdIn, "%d", &num);
+ u_fprintf(uStdOut, "%d\n", num);
+ u_fscanf(uStdIn, "%d", &num);
+ u_fprintf(uStdOut, "%d\n", num);
+#else
+ log_verbose("Test disabled because it requires user interaction");
+#endif
+}
+
+static void TestCodepageAndLocale(void) {
+ UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, NULL);
+ if (myFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+ if (u_fgetcodepage(myFile) == NULL
+ || strcmp(u_fgetcodepage(myFile), ucnv_getDefaultName()) != 0)
+ {
+ log_err("Didn't get the proper default codepage. Got %s expected: %s\n",
+ u_fgetcodepage(myFile), ucnv_getDefaultName());
+ }
+#if !UCONFIG_NO_FORMATTING
+ if (u_fgetlocale(myFile) == NULL
+ || strcmp(u_fgetlocale(myFile), uloc_getDefault()) != 0)
+ {
+ log_err("Didn't get the proper default locale. Got %s expected: %s\n",
+ u_fgetlocale(myFile), uloc_getDefault());
+ }
+#endif
+ u_fclose(myFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", "es", NULL);
+ if (u_fgetcodepage(myFile) == NULL
+ || strcmp(u_fgetcodepage(myFile), ucnv_getDefaultName()) != 0)
+ {
+ log_err("Didn't get the proper default codepage for \"es\". Got %s expected: iso-8859-1\n",
+ u_fgetcodepage(myFile));
+ }
+#if !UCONFIG_NO_FORMATTING
+ if (u_fgetlocale(myFile) == NULL
+ || strcmp(u_fgetlocale(myFile), "es") != 0)
+ {
+ log_err("Didn't get the proper default locale. Got %s expected: %s\n",
+ u_fgetlocale(myFile), "es");
+ }
+#endif
+ u_fclose(myFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-16");
+ if (u_fgetcodepage(myFile) == NULL
+ || strcmp(u_fgetcodepage(myFile), "UTF-16") != 0)
+ {
+ log_err("Didn't get the proper default codepage for \"en\". Got %s expected: iso-8859-1\n",
+ u_fgetcodepage(myFile));
+ }
+#if !UCONFIG_NO_FORMATTING
+ if (u_fgetlocale(myFile) == NULL
+ || strcmp(u_fgetlocale(myFile), uloc_getDefault()) != 0)
+ {
+ log_err("Didn't get the proper default locale. Got %s expected: %s\n",
+ u_fgetlocale(myFile), uloc_getDefault());
+ }
+#endif
+ u_fclose(myFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", "zh", "UTF-16");
+ if (u_fgetcodepage(myFile) == NULL
+ || strcmp(u_fgetcodepage(myFile), "UTF-16") != 0)
+ {
+ log_err("Didn't get the proper default codepage for \"en\". Got %s expected: iso-8859-1\n",
+ u_fgetcodepage(myFile));
+ }
+#if !UCONFIG_NO_FORMATTING
+ if (u_fgetlocale(myFile) == NULL
+ || strcmp(u_fgetlocale(myFile), "zh") != 0)
+ {
+ log_err("Didn't get the proper default locale. Got %s expected: %s\n",
+ u_fgetlocale(myFile), "zh");
+ }
+#endif
+ u_fclose(myFile);
+}
+
+
+static void TestfgetsBuffers(void) {
+ UChar buffer[2048];
+ UChar expectedBuffer[2048];
+ static const char testStr[] = "This is a test string that tests u_fgets. It makes sure that we don't try to read too much!";
+ UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-16");
+ int32_t expectedSize = (int32_t)strlen(testStr);
+ int32_t readSize;
+ int32_t repetitions;
+
+ if (myFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+
+ u_fputc(0x3BC, myFile);
+ if (u_fputc(0x110000, myFile) != U_EOF) {
+ log_err("u_fputc should return U_EOF for 0x110000.\n");
+ }
+ if (u_fputc((UChar32)0xFFFFFFFFu, myFile) != U_EOF) {
+ log_err("u_fputc should return U_EOF for 0xFFFFFFFF.\n");
+ }
+ u_fputc(0xFF41, myFile);
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ u_memset(expectedBuffer, 0, sizeof(expectedBuffer)/sizeof(expectedBuffer[0]));
+ u_uastrncpy(buffer, testStr, expectedSize+1);
+ for (repetitions = 0; repetitions < 16; repetitions++) {
+ u_file_write(buffer, expectedSize, myFile);
+ u_strcat(expectedBuffer, buffer);
+ }
+ u_fclose(myFile);
+
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-16");
+ if (u_fgetc(myFile) != 0x3BC) {
+ log_err("The first character is wrong\n");
+ }
+ if (u_fgetc(myFile) != 0xFF41) {
+ log_err("The second character is wrong\n");
+ }
+ if (u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile) != buffer) {
+ log_err("Didn't get the buffer back\n");
+ return;
+ }
+ readSize = u_strlen(buffer);
+ if (readSize != expectedSize*repetitions) {
+ log_err("Buffer is the wrong size. Got %d Expected %d\n", u_strlen(buffer), expectedSize*repetitions);
+ }
+ if (buffer[(expectedSize*repetitions) + 1] != 0xBEEF) {
+ log_err("u_fgets wrote too much data\n");
+ }
+ if (u_strcmp(buffer, expectedBuffer) != 0) {
+ log_err("Did get expected string back\n");
+ }
+ if (strcmp(u_fgetcodepage(myFile), "UTF-16") != 0) {
+ log_err("Got %s instead of UTF-16\n", u_fgetcodepage(myFile));
+ }
+ u_fclose(myFile);
+
+ log_verbose("Now trying a multi-byte encoding (UTF-8).\n");
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-8");
+
+ u_fputc(0x3BC, myFile);
+ u_fputc(0xFF41, myFile);
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ u_memset(expectedBuffer, 0, sizeof(expectedBuffer)/sizeof(expectedBuffer[0]));
+ u_uastrncpy(buffer, testStr, expectedSize+1);
+ for (repetitions = 0; repetitions < 16; repetitions++) {
+ u_file_write(buffer, expectedSize, myFile);
+ u_strcat(expectedBuffer, buffer);
+ }
+ u_fclose(myFile);
+
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-8");
+ if (strcmp(u_fgetcodepage(myFile), "UTF-8") != 0) {
+ log_err("Got %s instead of UTF-8\n", u_fgetcodepage(myFile));
+ }
+ if (u_fgetc(myFile) != 0x3BC) {
+ log_err("The first character is wrong\n");
+ }
+ if (u_fgetc(myFile) != 0xFF41) {
+ log_err("The second character is wrong\n");
+ }
+ if (u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile) != buffer) {
+ log_err("Didn't get the buffer back\n");
+ return;
+ }
+ readSize = u_strlen(buffer);
+ if (readSize != expectedSize*repetitions) {
+ log_err("Buffer is the wrong size. Got %d Expected %d\n", u_strlen(buffer), expectedSize*repetitions);
+ }
+ if (buffer[(expectedSize*repetitions) + 1] != 0xBEEF) {
+ log_err("u_fgets wrote too much data\n");
+ }
+ if (u_strcmp(buffer, expectedBuffer) != 0) {
+ log_err("Did get expected string back\n");
+ }
+ u_fclose(myFile);
+
+
+ log_verbose("Now trying a multi-byte encoding (UTF-8) with a really small buffer.\n");
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-8");
+
+ u_fputc(0xFF41, myFile);
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ u_memset(expectedBuffer, 0, sizeof(expectedBuffer)/sizeof(expectedBuffer[0]));
+ u_uastrncpy(buffer, testStr, expectedSize+1);
+ for (repetitions = 0; repetitions < 1; repetitions++) {
+ u_file_write(buffer, expectedSize, myFile);
+ u_strcat(expectedBuffer, buffer);
+ }
+ u_fclose(myFile);
+
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-8");
+ if (u_fgets(buffer, 2, myFile) != buffer) {
+ log_err("Didn't get the buffer back\n");
+ return;
+ }
+ readSize = u_strlen(buffer);
+ if (readSize != 1) {
+ log_err("Buffer is the wrong size. Got %d Expected %d\n", u_strlen(buffer), 1);
+ }
+ if (buffer[0] != 0xFF41 || buffer[1] != 0) {
+ log_err("Did get expected string back\n");
+ }
+ if (buffer[2] != 0xBEEF) {
+ log_err("u_fgets wrote too much data\n");
+ }
+ u_fclose(myFile);
+
+}
+
+static void TestFileReadBuffering(void) {
+ UChar buffer[1024];
+ UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-16");
+ int32_t how_many;
+ int32_t repetitions;
+
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ for (repetitions = 0; repetitions < 2; repetitions++) {
+ u_file_write(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile);
+ }
+
+ u_fclose(myFile);
+ u_memset(buffer, 0xDEAD, sizeof(buffer)/sizeof(buffer[0]));
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-16");
+ how_many = u_file_read(buffer, 1024, myFile);
+ if (how_many != 1024 || buffer[1023] != 0xBEEF) {
+ log_err("u_file_read read too much or not enough data\n");
+ }
+ u_fclose(myFile);
+}
+
+static void TestfgetsLineCount(void) {
+ UChar buffer[2048];
+ UChar expectedBuffer[2048];
+ char charBuffer[2048];
+ static const char testStr[] = "This is a test string that tests u_fgets. It makes sure that we don't try to read too much!";
+ UFILE *myFile = NULL;
+ FILE *stdFile = fopen(STANDARD_TEST_FILE, "w");
+ int32_t expectedSize = (int32_t)strlen(testStr);
+ int32_t repetitions;
+ int32_t nlRepetitions;
+
+ if (stdFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+ u_memset(expectedBuffer, 0, sizeof(expectedBuffer)/sizeof(expectedBuffer[0]));
+
+ for (repetitions = 0; repetitions < 16; repetitions++) {
+ fwrite(testStr, sizeof(testStr[0]), expectedSize, stdFile);
+ for (nlRepetitions = 0; nlRepetitions < repetitions; nlRepetitions++) {
+ fwrite("\n", sizeof(testStr[0]), 1, stdFile);
+ }
+ }
+ fclose(stdFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, NULL);
+ stdFile = fopen(STANDARD_TEST_FILE, "r");
+
+ for (;;) {
+ char *returnedCharBuffer;
+ UChar *returnedUCharBuffer;
+
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ returnedCharBuffer = fgets(charBuffer, sizeof(charBuffer)/sizeof(charBuffer[0]), stdFile);
+ returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile);
+
+ if (!returnedCharBuffer && !returnedUCharBuffer) {
+ /* Both returned NULL. stop. */
+ break;
+ }
+ if (returnedCharBuffer != charBuffer) {
+ log_err("Didn't get the charBuffer back\n");
+ continue;
+ }
+ u_uastrncpy(expectedBuffer, charBuffer, (int32_t)strlen(charBuffer)+1);
+ if (returnedUCharBuffer != buffer) {
+ log_err("Didn't get the buffer back\n");
+ continue;
+ }
+ if (u_strcmp(buffer, expectedBuffer) != 0) {
+ log_err("buffers are different\n");
+ }
+ if (buffer[u_strlen(buffer)+1] != 0xBEEF) {
+ log_err("u_fgets wrote too much\n");
+ }
+ }
+ fclose(stdFile);
+ u_fclose(myFile);
+}
+
+static void TestfgetsNewLineHandling(void) {
+ UChar buffer[256];
+ static const UChar testUStr[][16] = {
+ {0x000D, 0},
+ {0x000D, 0x000A, 0},
+ {0x000D, 0},
+ {0x000D, 0},
+ {0x0085, 0},
+ {0x000A, 0},
+ {0x000D, 0},
+ {0x000B, 0},
+ {0x000C, 0},
+ {0x000C, 0},
+ {0x2028, 0},
+ {0x0085, 0},
+ {0x2029, 0},
+ {0x0085, 0},
+
+ {0x008B, 0x000D, 0},
+ {0x00A0, 0x000D, 0x000A, 0},
+ {0x3000, 0x000D, 0},
+ {0xd800, 0xdfff, 0x000D, 0},
+ {0x00AB, 0x0085, 0},
+ {0x00AC, 0x000A, 0},
+ {0x00AD, 0x000D, 0},
+ {0x00BA, 0x000B, 0},
+ {0x00AB, 0x000C, 0},
+ {0x00B1, 0x000C, 0},
+ {0x30BB, 0x2028, 0},
+ {0x00A5, 0x0085, 0},
+ {0x0080, 0x2029, 0},
+ {0x00AF, 0x0085, 0}
+
+ };
+ UFILE *myFile = NULL;
+ int32_t lineIdx;
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "wb", NULL, "UTF-8");
+ if (myFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+ for (lineIdx = 0; lineIdx < (int32_t)(sizeof(testUStr)/sizeof(testUStr[0])); lineIdx++) {
+ u_file_write(testUStr[lineIdx], u_strlen(testUStr[lineIdx]), myFile);
+ }
+ u_fclose(myFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "rb", NULL, "UTF-8");
+
+ for (lineIdx = 0; lineIdx < (int32_t)(sizeof(testUStr)/sizeof(testUStr[0])); lineIdx++) {
+ UChar *returnedUCharBuffer;
+
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile);
+
+ if (!returnedUCharBuffer) {
+ /* Returned NULL. stop. */
+ break;
+ }
+ if (u_strcmp(buffer, testUStr[lineIdx]) != 0) {
+ log_err("buffers are different at index = %d\n", lineIdx);
+ }
+ if (buffer[u_strlen(buffer)+1] != 0xBEEF) {
+ log_err("u_fgets wrote too much\n");
+ }
+ }
+ if (lineIdx != (int32_t)(sizeof(testUStr)/sizeof(testUStr[0]))) {
+ log_err("u_fgets read too much\n");
+ }
+ if (u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile) != NULL) {
+ log_err("u_file_write wrote too much\n");
+ }
+ u_fclose(myFile);
+}
+
+static void TestLineCount(const char *prefixLine, const char *line, int32_t numRepititions) {
+ UChar buffer[64];
+ UChar expectedBuffer[64];
+ int32_t lineLen = strlen(line);
+ UChar *returnedUCharBuffer;
+ int32_t repetitions;
+ UFILE *myFile = NULL;
+ FILE *stdFile = fopen(STANDARD_TEST_FILE, "wb");
+
+ if (stdFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+ /* Write a prefix line and then write a bunch of lines */
+ fwrite(prefixLine, strlen(prefixLine), 1, stdFile);
+ for (repetitions = 0; repetitions < numRepititions; repetitions++) {
+ fwrite(line, lineLen, 1, stdFile);
+ }
+ fclose(stdFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "rb", NULL, NULL);
+ if (myFile == NULL) {
+ log_err("Can't read test file.\n");
+ return;
+ }
+
+ /* Read the prefix line. This can make sure that a Windows newline is either on a boundary or before it. */
+ u_uastrncpy(expectedBuffer, prefixLine, (int32_t)strlen(prefixLine)+1);
+ returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile);
+ if (u_strcmp(returnedUCharBuffer, expectedBuffer) != 0) {
+ log_err("prefix buffer is different. prefix=\"%s\"\n", prefixLine);
+ return;
+ }
+
+ u_uastrncpy(expectedBuffer, line, (int32_t)strlen(line)+1);
+ for (repetitions = 0; ; repetitions++) {
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+ returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile);
+
+ if (!returnedUCharBuffer) {
+ /* returned NULL. stop. */
+ break;
+ }
+ if (u_strcmp(buffer, expectedBuffer) != 0) {
+ log_err("buffers are different at count %d\n", repetitions);
+ }
+ if (buffer[u_strlen(buffer)+1] != 0xBEEF) {
+ log_err("u_fgets wrote too much\n");
+ }
+ }
+ if (repetitions != numRepititions) {
+ log_err("got wrong number of lines. got=%d expected=%d\n", repetitions, numRepititions);
+ }
+ u_fclose(myFile);
+}
+
+static void TestfgetsNewLineCount(void) {
+ /* This makes sure that lines are correctly handled between buffer boundaries. */
+ TestLineCount("\n", "\n", 1024); /* Unix newlines */
+ TestLineCount("\r\n", "\r\n", 1024);/* Windows newlines */
+ TestLineCount("a\r\n", "\r\n", 1024);/* Windows newlines offset by 1 byte */
+ TestLineCount("\r\n", "a\r\n", 1024);/* Windows newlines offset with data */
+ TestLineCount("\n", "a\n", 1024); /* Unix newlines offset with data */
+ TestLineCount("\n", "\r\n", 1024); /* a mixed number of lines. */
+}
+
+static void TestFgetsLineBuffering(void) {
+ UChar buffer[2003]; /* Use a non-power of 2 or 10 */
+ UChar *returnedUCharBuffer;
+ int32_t repetitions;
+ UFILE *myFile = NULL;
+ FILE *stdFile = fopen(STANDARD_TEST_FILE, "wb");
+
+ if (stdFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+ u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0]));
+
+ /* Write one very long line */
+ for (repetitions = 0; repetitions < ((sizeof(buffer)/sizeof(buffer[0]))*2); repetitions++) {
+ fwrite(repetitions ? "1" : "2", 1, 1, stdFile);
+ }
+ fclose(stdFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "rb", NULL, NULL);
+ if (myFile == NULL) {
+ log_err("Can't read test file.\n");
+ return;
+ }
+
+ /* Read part of one very long line */
+ returnedUCharBuffer = u_fgets(buffer, (sizeof(buffer)/sizeof(buffer[0]))-1, myFile);
+ if (u_strlen(returnedUCharBuffer) != ((sizeof(buffer)/sizeof(buffer[0]))-2)) {
+ log_err("Line is wrong length. Got %d. Expected %d.\n",
+ u_strlen(returnedUCharBuffer), ((sizeof(buffer)/sizeof(buffer[0]))-2));
+ }
+ /* We better not read too much */
+ if (buffer[(sizeof(buffer)/sizeof(buffer[0]))-1] != 0xBEEF) {
+ log_err("Too much data was written\n");
+ }
+
+ u_fclose(myFile);
+}
+
+
+static void TestCodepage(void) {
+ UFILE *myFile = NULL;
+ static const UChar strABAccentA[] = { 0x0041, 0x0042, 0x00C1, 0x0043, 0};
+ static const UChar strBadConversion[] = { 0x0041, 0x0042, 0xfffd, 0x0043, 0};
+ UChar testBuf[sizeof(strABAccentA)/sizeof(strABAccentA[0])*2]; /* *2 to see if too much was */
+ char convName[UCNV_MAX_CONVERTER_NAME_LENGTH];
+ int32_t retVal;
+ UErrorCode status = U_ZERO_ERROR;
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "absurd converter that can't be opened");
+
+ if (myFile) {
+ log_err("Recieved a UFILE * with an invalid codepage parameter\n");
+ u_fclose(myFile);
+ }
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "ISO-8859-1");
+ if (myFile == NULL) {
+ log_err("Can't write test file for iso-8859-1.\n");
+ return;
+ }
+ if (strcmp("ISO-8859-1", u_fgetcodepage(myFile)) != 0) {
+ log_err("Couldn't get ISO-8859-1 back as opened codepage\n");
+ }
+ u_file_write(strABAccentA, u_strlen(strABAccentA), myFile);
+ u_fclose(myFile);
+
+ /* Now see what we got wrote */
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, NULL);
+ if (u_fsetcodepage("ISO-8859-1", myFile) != 0) {
+ log_err("u_fsetcodepage didn't set the codepage\n");
+ }
+ retVal = u_file_read(testBuf, u_strlen(strABAccentA), myFile);
+ if (u_strncmp(strABAccentA, testBuf, u_strlen(strABAccentA)) != 0) {
+ log_err("The test data was read and written differently!\n");
+ }
+ if (retVal != u_strlen(strABAccentA)) {
+ log_err("The test data returned different lengths. Got: %d, Expected %d\n", retVal, u_strlen(strABAccentA));
+ }
+ u_fclose(myFile);
+
+ /* What happens on invalid input? */
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "ISO-8859-1");
+ if (strcmp(ucnv_getName(u_fgetConverter(myFile), &status), "ISO-8859-1") != 0) {
+ log_err("u_fgetConverter returned %s\n", ucnv_getName(u_fgetConverter(myFile), &status));
+ }
+ if (u_fsetcodepage("UTF-8", myFile) != 0) {
+ log_err("u_fsetcodepage didn't set the codepage to UTF-8\n");
+ }
+ if (strcmp(ucnv_getName(u_fgetConverter(myFile), &status), "UTF-8") != 0) {
+ log_err("u_fgetConverter returned %s\n", ucnv_getName(u_fgetConverter(myFile), &status));
+ }
+ retVal = u_file_read(testBuf, u_strlen(strBadConversion), myFile);
+ if (u_strncmp(strBadConversion, testBuf, u_strlen(strBadConversion)) != 0) {
+ log_err("The test data wasn't subsituted as expected\n");
+ }
+ u_fclose(myFile);
+
+ /* Can't currently swap codepages midstream */
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "ISO-8859-1");
+ strcpy(convName, u_fgetcodepage(myFile));
+ u_file_read(testBuf, 1, myFile);
+ if (u_fsetcodepage("UTF-8", myFile) == 0) {
+ log_err("u_fsetcodepage set the codepage after reading a byte\n");
+ }
+ retVal = u_file_read(testBuf + 1, u_strlen(strABAccentA) - 1, myFile);
+ if (u_strncmp(strABAccentA, testBuf, u_strlen(strABAccentA)) != 0) {
+ log_err("u_fsetcodepage changed the codepages after writing data\n");
+ }
+ if ((retVal + 1) != u_strlen(strABAccentA)) {
+ log_err("The test data returned different lengths. Got: %d, Expected %d\n", retVal, u_strlen(strABAccentA));
+ }
+ u_frewind(myFile);
+ retVal = u_file_read(testBuf, u_strlen(strABAccentA), myFile);
+ if (u_strncmp(strABAccentA, testBuf, u_strlen(strABAccentA)) != 0) {
+ log_err("The test data was read and written differently!\n");
+ }
+ if (retVal != u_strlen(strABAccentA)) {
+ log_err("The test data returned different lengths. Got: %d, Expected %d\n", retVal, u_strlen(strABAccentA));
+ }
+ u_fclose(myFile);
+
+}
+
+#if !UCONFIG_NO_FORMATTING
+static void TestFilePrintCompatibility(void) {
+ UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "wb", "en_US_POSIX", NULL);
+ FILE *myCFile;
+ int32_t num;
+ char cVal;
+ static const UChar emptyStr[] = {0};
+ char readBuf[512] = "";
+ char testBuf[512] = "";
+
+ if (myFile == NULL) {
+ log_err("Can't write test file.\n");
+ return;
+ }
+#if !UCONFIG_NO_FORMATTING
+ if (strcmp(u_fgetlocale(myFile), "en_US_POSIX") != 0) {
+ log_err("Got %s instead of en_US_POSIX for locale\n", u_fgetlocale(myFile));
+ }
+#endif
+
+ /* Compare against C API compatibility */
+ for (num = -STANDARD_TEST_NUM_RANGE; num < STANDARD_TEST_NUM_RANGE; num++) {
+ u_fprintf(myFile, "%x ", num);
+ u_fprintf(myFile, "%X ", num);
+ u_fprintf(myFile, "%o ", num);
+ u_fprintf(myFile, "%d ", num);
+ u_fprintf(myFile, "%i ", num);
+ u_fprintf(myFile, "%f ", (double)num);
+/* u_fprintf(myFile, "%e ", (double)num);
+ u_fprintf(myFile, "%E ", (double)num);*/
+ u_fprintf(myFile, "%g ", (double)num);
+ u_fprintf(myFile, "%G", (double)num);
+ u_fputs(emptyStr, myFile);
+ }
+
+ u_fprintf_u(myFile, NEW_LINE);
+
+ for (num = 0; num < 0x80; num++) {
+ u_fprintf(myFile, "%c", num);
+ }
+
+ u_fclose(myFile);
+ myCFile = fopen(STANDARD_TEST_FILE, "rb");
+ if (myCFile == NULL) {
+ log_err("Can't read test file.");
+ return;
+ }
+
+ for (num = -STANDARD_TEST_NUM_RANGE; num < STANDARD_TEST_NUM_RANGE; num++) {
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%x", (int)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%x Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%X", (int)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%X Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%o", (int)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%o Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+ /* fprintf is not compatible on all platforms e.g. the iSeries */
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%d", (int)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%d Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%i", (int)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%i Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%f", (double)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%f Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+/* fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%e", (double)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%e Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%E", (double)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%E Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }*/
+
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%g", (double)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%g Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+
+ fscanf(myCFile, "%s", readBuf);
+ sprintf(testBuf, "%G", (double)num);
+ if (strcmp(readBuf, testBuf) != 0) {
+ log_err("%%G Got: \"%s\", Expected: \"%s\"\n", readBuf, testBuf);
+ }
+ }
+
+ /* Properly eat the newlines */
+ for (num = 0; num < (int32_t)strlen(C_NEW_LINE); num++) {
+ fscanf(myCFile, "%c", &cVal);
+ if (cVal != C_NEW_LINE[num]) {
+ log_err("OS newline error\n");
+ }
+ }
+ for (num = 0; num < (int32_t)strlen(C_NEW_LINE); num++) {
+ fscanf(myCFile, "%c", &cVal);
+ if (cVal != C_NEW_LINE[num]) {
+ log_err("ustdio newline error\n");
+ }
+ }
+
+ for (num = 0; num < 0x80; num++) {
+ cVal = -1;
+ fscanf(myCFile, "%c", &cVal);
+ if (num != cVal) {
+ log_err("%%c Got: 0x%x, Expected: 0x%x\n", cVal, num);
+ }
+ }
+ fclose(myCFile);
+}
+#endif
+
+#define TestFPrintFormat(uFormat, uValue, cFormat, cValue) \
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", "en_US_POSIX", NULL);\
+ if (myFile == NULL) {\
+ log_err("Can't write test file for %s.\n", uFormat);\
+ return;\
+ }\
+ /* Reinitialize the buffer to verify null termination works. */\
+ u_memset(uBuffer, 0x2a, sizeof(uBuffer)/sizeof(*uBuffer));\
+ memset(buffer, '*', sizeof(buffer)/sizeof(*buffer));\
+ \
+ uNumPrinted = u_fprintf(myFile, uFormat, uValue);\
+ u_fclose(myFile);\
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", "en_US_POSIX", NULL);\
+ u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile);\
+ u_fclose(myFile);\
+ u_austrncpy(compBuffer, uBuffer, sizeof(uBuffer)/sizeof(*uBuffer));\
+ cNumPrinted = sprintf(buffer, cFormat, cValue);\
+ if (strcmp(buffer, compBuffer) != 0) {\
+ log_err("%" uFormat " Got: \"%s\", Expected: \"%s\"\n", compBuffer, buffer);\
+ }\
+ if (cNumPrinted != uNumPrinted) {\
+ log_err("%" uFormat " number printed Got: %d, Expected: %d\n", uNumPrinted, cNumPrinted);\
+ }\
+ if (buffer[uNumPrinted+1] != '*') {\
+ log_err("%" uFormat " too much stored\n");\
+ }\
+
+#if !UCONFIG_NO_FORMATTING
+static void TestFprintfFormat(void) {
+ static const UChar abcUChars[] = {0x61,0x62,0x63,0};
+ static const char abcChars[] = "abc";
+ UChar uBuffer[256];
+ char buffer[256];
+ char compBuffer[256];
+ int32_t uNumPrinted;
+ int32_t cNumPrinted;
+ UFILE *myFile;
+
+ TestFPrintFormat("%8S", abcUChars, "%8s", abcChars);
+ TestFPrintFormat("%-8S", abcUChars, "%-8s", abcChars);
+ TestFPrintFormat("%.2S", abcUChars, "%.2s", abcChars); /* strlen is 3 */
+
+ TestFPrintFormat("%8s", abcChars, "%8s", abcChars);
+ TestFPrintFormat("%-8s", abcChars, "%-8s", abcChars);
+ TestFPrintFormat("%.2s", abcChars, "%.2s", abcChars); /* strlen is 3 */
+
+ TestFPrintFormat("%8c", (char)'e', "%8c", (char)'e');
+ TestFPrintFormat("%-8c", (char)'e', "%-8c", (char)'e');
+
+ TestFPrintFormat("%8C", (UChar)0x65, "%8c", (char)'e');
+ TestFPrintFormat("%-8C", (UChar)0x65, "%-8c", (char)'e');
+
+ TestFPrintFormat("%f", 1.23456789, "%f", 1.23456789);
+ TestFPrintFormat("%f", 12345.6789, "%f", 12345.6789);
+ TestFPrintFormat("%f", 123456.789, "%f", 123456.789);
+ TestFPrintFormat("%f", 1234567.89, "%f", 1234567.89);
+ TestFPrintFormat("%10f", 1.23456789, "%10f", 1.23456789);
+ TestFPrintFormat("%-10f", 1.23456789, "%-10f", 1.23456789);
+ TestFPrintFormat("%10f", 123.456789, "%10f", 123.456789);
+ TestFPrintFormat("%10.4f", 123.456789, "%10.4f", 123.456789);
+ TestFPrintFormat("%-10f", 123.456789, "%-10f", 123.456789);
+
+/* TestFPrintFormat("%g", 12345.6789, "%g", 12345.6789);
+ TestFPrintFormat("%g", 123456.789, "%g", 123456.789);
+ TestFPrintFormat("%g", 1234567.89, "%g", 1234567.89);
+ TestFPrintFormat("%G", 123456.789, "%G", 123456.789);
+ TestFPrintFormat("%G", 1234567.89, "%G", 1234567.89);*/
+ TestFPrintFormat("%10g", 1.23456789, "%10g", 1.23456789);
+ TestFPrintFormat("%10.4g", 1.23456789, "%10.4g", 1.23456789);
+ TestFPrintFormat("%-10g", 1.23456789, "%-10g", 1.23456789);
+ TestFPrintFormat("%10g", 123.456789, "%10g", 123.456789);
+ TestFPrintFormat("%-10g", 123.456789, "%-10g", 123.456789);
+
+ TestFPrintFormat("%8x", 123456, "%8x", 123456);
+ TestFPrintFormat("%-8x", 123456, "%-8x", 123456);
+ TestFPrintFormat("%08x", 123456, "%08x", 123456);
+
+ TestFPrintFormat("%8X", 123456, "%8X", 123456);
+ TestFPrintFormat("%-8X", 123456, "%-8X", 123456);
+ TestFPrintFormat("%08X", 123456, "%08X", 123456);
+ TestFPrintFormat("%#x", 123456, "%#x", 123456);
+ TestFPrintFormat("%#x", -123456, "%#x", -123456);
+
+ TestFPrintFormat("%8o", 123456, "%8o", 123456);
+ TestFPrintFormat("%-8o", 123456, "%-8o", 123456);
+ TestFPrintFormat("%08o", 123456, "%08o", 123456);
+ TestFPrintFormat("%#o", 123, "%#o", 123);
+ TestFPrintFormat("%#o", -123, "%#o", -123);
+
+ TestFPrintFormat("%8u", 123456, "%8u", 123456);
+ TestFPrintFormat("%-8u", 123456, "%-8u", 123456);
+ TestFPrintFormat("%08u", 123456, "%08u", 123456);
+ TestFPrintFormat("%8u", -123456, "%8u", -123456);
+ TestFPrintFormat("%-8u", -123456, "%-8u", -123456);
+ TestFPrintFormat("%.5u", 123456, "%.5u", 123456);
+ TestFPrintFormat("%.6u", 123456, "%.6u", 123456);
+ TestFPrintFormat("%.7u", 123456, "%.7u", 123456);
+
+ TestFPrintFormat("%8d", 123456, "%8d", 123456);
+ TestFPrintFormat("%-8d", 123456, "%-8d", 123456);
+ TestFPrintFormat("%08d", 123456, "%08d", 123456);
+ TestFPrintFormat("% d", 123456, "% d", 123456);
+ TestFPrintFormat("% d", -123456, "% d", -123456);
+
+ TestFPrintFormat("%8i", 123456, "%8i", 123456);
+ TestFPrintFormat("%-8i", 123456, "%-8i", 123456);
+ TestFPrintFormat("%08i", 123456, "%08i", 123456);
+
+ log_verbose("Get really crazy with the formatting.\n");
+
+ TestFPrintFormat("%-#12x", 123, "%-#12x", 123);
+ TestFPrintFormat("%-#12x", -123, "%-#12x", -123);
+ TestFPrintFormat("%#12x", 123, "%#12x", 123);
+ TestFPrintFormat("%#12x", -123, "%#12x", -123);
+
+ TestFPrintFormat("%-+12d", 123, "%-+12d", 123);
+ TestFPrintFormat("%-+12d", -123, "%-+12d", -123);
+ TestFPrintFormat("%- 12d", 123, "%- 12d", 123);
+ TestFPrintFormat("%- 12d", -123, "%- 12d", -123);
+ TestFPrintFormat("%+12d", 123, "%+12d", 123);
+ TestFPrintFormat("%+12d", -123, "%+12d", -123);
+ TestFPrintFormat("% 12d", 123, "% 12d", 123);
+ TestFPrintFormat("% 12d", -123, "% 12d", -123);
+ TestFPrintFormat("%12d", 123, "%12d", 123);
+ TestFPrintFormat("%12d", -123, "%12d", -123);
+ TestFPrintFormat("%.12d", 123, "%.12d", 123);
+ TestFPrintFormat("%.12d", -123, "%.12d", -123);
+
+ TestFPrintFormat("%-+12.1f", 1.234, "%-+12.1f", 1.234);
+ TestFPrintFormat("%-+12.1f", -1.234, "%-+12.1f", -1.234);
+ TestFPrintFormat("%- 12.10f", 1.234, "%- 12.10f", 1.234);
+ TestFPrintFormat("%- 12.1f", -1.234, "%- 12.1f", -1.234);
+ TestFPrintFormat("%+12.1f", 1.234, "%+12.1f", 1.234);
+ TestFPrintFormat("%+12.1f", -1.234, "%+12.1f", -1.234);
+ TestFPrintFormat("% 12.1f", 1.234, "% 12.1f", 1.234);
+ TestFPrintFormat("% 12.1f", -1.234, "% 12.1f", -1.234);
+ TestFPrintFormat("%12.1f", 1.234, "%12.1f", 1.234);
+ TestFPrintFormat("%12.1f", -1.234, "%12.1f", -1.234);
+ TestFPrintFormat("%.2f", 1.234, "%.2f", 1.234);
+ TestFPrintFormat("%.2f", -1.234, "%.2f", -1.234);
+ TestFPrintFormat("%3f", 1.234, "%3f", 1.234);
+ TestFPrintFormat("%3f", -1.234, "%3f", -1.234);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", "en_US_POSIX", NULL);
+ /* Reinitialize the buffer to verify null termination works. */
+ u_memset(uBuffer, 0x2a, sizeof(uBuffer)/sizeof(*uBuffer));
+ memset(buffer, '*', sizeof(buffer)/sizeof(*buffer));
+
+ uNumPrinted = u_fprintf(myFile, "%d % d %d", -1234, 1234, 1234);
+ u_fclose(myFile);
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", "en_US_POSIX", NULL);
+ u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile);
+ u_fclose(myFile);
+ u_austrncpy(compBuffer, uBuffer, sizeof(uBuffer)/sizeof(*uBuffer));
+ cNumPrinted = sprintf(buffer, "%d % d %d", -1234, 1234, 1234);
+ if (strcmp(buffer, compBuffer) != 0) {
+ log_err("%%d %% d %%d Got: \"%s\", Expected: \"%s\"\n", compBuffer, buffer);
+ }
+ if (cNumPrinted != uNumPrinted) {
+ log_err("%%d %% d %%d number printed Got: %d, Expected: %d\n", uNumPrinted, cNumPrinted);
+ }
+ if (buffer[uNumPrinted+1] != '*') {
+ log_err("%%d %% d %%d too much stored\n");
+ }
+}
+#endif
+
+#undef TestFPrintFormat
+
+#if !UCONFIG_NO_FORMATTING
+static void TestFScanSetFormat(const char *format, const UChar *uValue, const char *cValue, UBool expectedToPass) {
+ UFILE *myFile;
+ UChar uBuffer[256];
+ char buffer[256];
+ char compBuffer[256];
+ int32_t uNumScanned;
+ int32_t cNumScanned;
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, NULL);
+ if (myFile == NULL) {
+ log_err("Can't write test file for %s.\n", format);
+ return;
+ }
+ /* Reinitialize the buffer to verify null termination works. */
+ u_memset(uBuffer, 0x2a, sizeof(uBuffer)/sizeof(*uBuffer));
+ uBuffer[sizeof(uBuffer)/sizeof(*uBuffer)-1] = 0;
+ memset(buffer, '*', sizeof(buffer)/sizeof(*buffer));
+ buffer[sizeof(buffer)/sizeof(*buffer)-1] = 0;
+
+ u_fprintf(myFile, "%S", uValue);
+ u_fclose(myFile);
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", "en_US_POSIX", NULL);
+ uNumScanned = u_fscanf(myFile, format, uBuffer);
+ u_fclose(myFile);
+ if (expectedToPass) {
+ u_austrncpy(compBuffer, uBuffer, sizeof(uBuffer)/sizeof(*uBuffer));
+ cNumScanned = sscanf(cValue, format, buffer);
+ if (strncmp(buffer, compBuffer, sizeof(buffer)/sizeof(*buffer)) != 0) {
+ log_err("%s Got: \"%s\", Expected: \"%s\"\n", format, compBuffer, buffer);
+ }
+ if (cNumScanned != uNumScanned) {
+ log_err("%s number printed Got: %d, Expected: %d\n", format, uNumScanned, cNumScanned);
+ }
+ if (uNumScanned > 0 && uBuffer[u_strlen(uBuffer)+1] != 0x2a) {
+ log_err("%s too much stored\n", format);
+ }
+ }
+ else {
+ if (uNumScanned != 0 || uBuffer[0] != 0x2a || uBuffer[1] != 0x2a) {
+ log_err("%s too much stored on a failure\n", format);
+ }
+ }
+}
+#endif
+
+#if !UCONFIG_NO_FORMATTING
+static void TestFScanset(void) {
+ static const UChar abcUChars[] = {0x61,0x62,0x63,0x63,0x64,0x65,0x66,0x67,0};
+ static const char abcChars[] = "abccdefg";
+
+ TestFScanSetFormat("%[bc]S", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[cb]S", abcUChars, abcChars, TRUE);
+
+ TestFScanSetFormat("%[ab]S", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[ba]S", abcUChars, abcChars, TRUE);
+
+ TestFScanSetFormat("%[ab]", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[ba]", abcUChars, abcChars, TRUE);
+
+ TestFScanSetFormat("%[abcdefgh]", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[;hgfedcba]", abcUChars, abcChars, TRUE);
+
+ TestFScanSetFormat("%[^a]", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[^e]", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[^ed]", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[^dc]", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%[^e] ", abcUChars, abcChars, TRUE);
+
+ TestFScanSetFormat("%1[ab] ", abcUChars, abcChars, TRUE);
+ TestFScanSetFormat("%2[^f]", abcUChars, abcChars, TRUE);
+
+ TestFScanSetFormat("%[qrst]", abcUChars, abcChars, TRUE);
+
+ /* Extra long string for testing */
+ TestFScanSetFormat(" %[qrst]",
+ abcUChars, abcChars, TRUE);
+
+ TestFScanSetFormat("%[a-]", abcUChars, abcChars, TRUE);
+
+ /* Bad format */
+ TestFScanSetFormat("%[f-a]", abcUChars, abcChars, FALSE);
+ TestFScanSetFormat("%[c-a]", abcUChars, abcChars, FALSE);
+ TestFScanSetFormat("%[a", abcUChars, abcChars, FALSE);
+ /* The following is not deterministic on Windows */
+/* TestFScanSetFormat("%[a-", abcUChars, abcChars);*/
+
+ /* TODO: Need to specify precision with a "*" */
+}
+#endif
+#if !UCONFIG_NO_FORMATTING
+static void TestBadFScanfFormat(const char *format, const UChar *uValue, const char *cValue) {
+ UFILE *myFile;
+ UChar uBuffer[256];
+ int32_t uNumScanned;
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, NULL);
+ if (myFile == NULL) {
+ log_err("Can't write test file for %s.\n", format);
+ return;
+ }
+ /* Reinitialize the buffer to verify null termination works. */
+ u_memset(uBuffer, 0x2a, sizeof(uBuffer)/sizeof(*uBuffer));
+ uBuffer[sizeof(uBuffer)/sizeof(*uBuffer)-1] = 0;
+
+ u_fprintf(myFile, "%S", uValue);
+ u_fclose(myFile);
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", "en_US_POSIX", NULL);
+ uNumScanned = u_fscanf(myFile, format, uBuffer);
+ u_fclose(myFile);
+ if (uNumScanned != 0 || uBuffer[0] != 0x2a || uBuffer[1] != 0x2a) {
+ log_err("%s too much stored on a failure\n", format);
+ }
+}
+#endif
+#if !UCONFIG_NO_FORMATTING
+static void TestBadScanfFormat(void) {
+ static const UChar abcUChars[] = {0x61,0x62,0x63,0x63,0x64,0x65,0x66,0x67,0};
+ static const char abcChars[] = "abccdefg";
+
+ TestBadFScanfFormat("%[] ", abcUChars, abcChars);
+}
+#endif
+#if !UCONFIG_NO_FORMATTING
+static void Test_u_vfprintf(const char *expectedResult, const char *format, ...) {
+ UChar uBuffer[256];
+ UChar uBuffer2[256];
+ va_list ap;
+ int32_t count;
+ UFILE *myFile;
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", "en_US_POSIX", "UTF-8");
+ if (!myFile) {
+ log_err("Test file can't be opened\n");
+ return;
+ }
+
+ va_start(ap, format);
+ count = u_vfprintf(myFile, format, ap);
+ va_end(ap);
+
+ u_fclose(myFile);
+
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", "en_US_POSIX", "UTF-8");
+ if (!myFile) {
+ log_err("Test file can't be opened\n");
+ return;
+ }
+ u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile);
+ u_uastrcpy(uBuffer2, expectedResult);
+ if (u_strcmp(uBuffer, uBuffer2) != 0) {
+ log_err("Got two different results for \"%s\" expected \"%s\"\n", format, expectedResult);
+ }
+ u_fclose(myFile);
+
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", "en_US_POSIX", NULL);
+ if (!myFile) {
+ log_err("Test file can't be opened\n");
+ return;
+ }
+ u_uastrcpy(uBuffer, format);
+
+ va_start(ap, format);
+ count = u_vfprintf_u(myFile, uBuffer, ap);
+ va_end(ap);
+
+ u_fclose(myFile);
+
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", "en_US_POSIX", NULL);
+ if (!myFile) {
+ log_err("Test file can't be opened\n");
+ return;
+ }
+ u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile);
+ u_uastrcpy(uBuffer2, expectedResult);
+ if (u_strcmp(uBuffer, uBuffer2) != 0) {
+ log_err("Got two different results for \"%s\" expected \"%s\"\n", format, expectedResult);
+ }
+ u_fclose(myFile);
+}
+
+static void TestVargs(void) {
+ Test_u_vfprintf("8 9 a B 8.9", "%d %u %x %X %.1f", 8, 9, 10, 11, 8.9);
+}
+#endif
+
+static void TestUnicodeFormat(void)
+{
+#if !UCONFIG_NO_FORMATTING
+ /* Make sure that invariant conversion doesn't happen on the _u formats. */
+ UChar myUString[256];
+ UFILE *myFile;
+ static const UChar TEST_STR[] = { 0x03BC, 0x0025, 0x0024, 0};
+ static const UChar PERCENT_S[] = { 0x03BC, 0x0025, 0x0053, 0};
+
+ u_memset(myUString, 0x2a, sizeof(myUString)/sizeof(*myUString));
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-8");
+ if (!myFile) {
+ log_err("Test file can't be opened\n");
+ return;
+ }
+ u_fprintf_u(myFile, PERCENT_S, TEST_STR);
+ u_fclose(myFile);
+
+ myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-8");
+ if (!myFile) {
+ log_err("Test file can't be opened\n");
+ return;
+ }
+ u_fscanf_u(myFile, PERCENT_S, myUString);
+ u_fclose(myFile);
+ if (u_strcmp(TEST_STR, myUString) != 0) {
+ log_err("u_fscanf_u doesn't work.\n");
+ }
+#endif
+}
+
+
+U_CFUNC void
+addFileTest(TestNode** root) {
+#if !UCONFIG_NO_FORMATTING
+ addTest(root, &TestFile, "file/TestFile");
+#endif
+ addTest(root, &StdinBuffering, "file/StdinBuffering");
+ addTest(root, &TestfgetsBuffers, "file/TestfgetsBuffers");
+ addTest(root, &TestFileReadBuffering, "file/TestFileReadBuffering");
+ addTest(root, &TestfgetsLineCount, "file/TestfgetsLineCount");
+ addTest(root, &TestfgetsNewLineHandling, "file/TestfgetsNewLineHandling");
+ addTest(root, &TestfgetsNewLineCount, "file/TestfgetsNewLineCount");
+ addTest(root, &TestFgetsLineBuffering, "file/TestFgetsLineBuffering");
+ addTest(root, &TestCodepage, "file/TestCodepage");
+#if !UCONFIG_NO_FORMATTING
+ addTest(root, &TestCodepageAndLocale, "file/TestCodepageAndLocale");
+ addTest(root, &TestFprintfFormat, "file/TestFprintfFormat");
+ addTest(root, &TestFScanset, "file/TestFScanset");
+ addTest(root, &TestFilePrintCompatibility, "file/TestFilePrintCompatibility");
+ addTest(root, &TestBadScanfFormat, "file/TestBadScanfFormat");
+ addTest(root, &TestVargs, "file/TestVargs");
+ addTest(root, &TestUnicodeFormat, "file/TestUnicodeFormat");
+#endif
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/iotest.cpp b/Build/source/libs/icu/icu-xetex/test/iotest/iotest.cpp
new file mode 100644
index 00000000000..a035b2ad218
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/iotest.cpp
@@ -0,0 +1,844 @@
+/*
+**********************************************************************
+* Copyright (C) 2002-2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: iotest.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2002feb21
+* created by: George Rhoten
+*/
+
+
+#include "unicode/ustdio.h"
+#include "unicode/uclean.h"
+
+#include "unicode/ucnv.h"
+#include "unicode/uchar.h"
+#include "unicode/unistr.h"
+#include "unicode/ustring.h"
+#include "ustr_cnv.h"
+#include "iotest.h"
+#include "unicode/tstdtmod.h"
+#include "putilimp.h"
+
+#include <string.h>
+#include <stdlib.h>
+
+class DataDrivenLogger : public TestLog {
+ static const char* fgDataDir;
+ static char *fgTestDataPath;
+
+public:
+ static void cleanUp() {
+ if (fgTestDataPath) {
+ free(fgTestDataPath);
+ fgTestDataPath = NULL;
+ }
+ }
+ virtual void errln( const UnicodeString &message ) {
+ char buffer[4000];
+ message.extract(0, message.length(), buffer, sizeof(buffer));
+ buffer[3999] = 0; /* NULL terminate */
+ log_err(buffer);
+ }
+
+ static const char * pathToDataDirectory(void)
+ {
+
+ if(fgDataDir != NULL) {
+ return fgDataDir;
+ }
+
+ /* U_TOPSRCDIR is set by the makefiles on UNIXes when building cintltst and intltst
+ // to point to the top of the build hierarchy, which may or
+ // may not be the same as the source directory, depending on
+ // the configure options used. At any rate,
+ // set the data path to the built data from this directory.
+ // The value is complete with quotes, so it can be used
+ // as-is as a string constant.
+ */
+ #if defined (U_TOPSRCDIR)
+ {
+ fgDataDir = U_TOPSRCDIR U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+ #else
+
+ /* On Windows, the file name obtained from __FILE__ includes a full path.
+ * This file is "wherever\icu\source\test\cintltst\cintltst.c"
+ * Change to "wherever\icu\source\data"
+ */
+ {
+ static char p[sizeof(__FILE__) + 10];
+ char *pBackSlash;
+ int i;
+
+ strcpy(p, __FILE__);
+ /* We want to back over three '\' chars. */
+ /* Only Windows should end up here, so looking for '\' is safe. */
+ for (i=1; i<=3; i++) {
+ pBackSlash = strrchr(p, U_FILE_SEP_CHAR);
+ if (pBackSlash != NULL) {
+ *pBackSlash = 0; /* Truncate the string at the '\' */
+ }
+ }
+
+ if (pBackSlash != NULL) {
+ /* We found and truncated three names from the path.
+ * Now append "source\data" and set the environment
+ */
+ strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING );
+ fgDataDir = p;
+ }
+ else {
+ /* __FILE__ on MSVC7 does not contain the directory */
+ FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r");
+ if (file) {
+ fclose(file);
+ fgDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+ else {
+ fgDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING;
+ }
+ }
+ }
+ #endif
+
+ return fgDataDir;
+
+ }
+
+ static const char* loadTestData(UErrorCode& err){
+ if( fgTestDataPath == NULL){
+ const char* directory=NULL;
+ UResourceBundle* test =NULL;
+ char* tdpath=NULL;
+ const char* tdrelativepath;
+
+#if defined (U_TOPBUILDDIR)
+ tdrelativepath = "test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ directory = U_TOPBUILDDIR;
+#else
+ tdrelativepath = ".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ directory = pathToDataDirectory();
+#endif
+
+ tdpath = (char*) malloc(sizeof(char) *(( strlen(directory) * strlen(tdrelativepath)) + 100));
+
+
+ /* u_getDataDirectory shoul return \source\data ... set the
+ * directory to ..\source\data\..\test\testdata\out\testdata
+ */
+ strcpy(tdpath, directory);
+ strcat(tdpath, tdrelativepath);
+ strcat(tdpath,"testdata");
+
+ test=ures_open(tdpath, "testtypes", &err);
+
+ if(U_FAILURE(err)){
+ err = U_FILE_ACCESS_ERROR;
+ log_err("Could not load testtypes.res in testdata bundle with path %s - %s\n", tdpath, u_errorName(err));
+ return "";
+ }
+ ures_close(test);
+ fgTestDataPath = tdpath;
+ }
+ return fgTestDataPath;
+ }
+
+ virtual const char* getTestDataPath(UErrorCode& err) {
+ return loadTestData(err);
+ }
+};
+
+const char* DataDrivenLogger::fgDataDir = NULL;
+char* DataDrivenLogger::fgTestDataPath = NULL;
+
+static int64_t
+uto64(const UChar *buffer)
+{
+ int64_t result = 0;
+ /* iterate through buffer */
+ while(*buffer) {
+ /* read the next digit */
+ result *= 16;
+ if (!u_isxdigit(*buffer)) {
+ log_err("\\u%04X is not a valid hex digit for this test\n", (UChar)*buffer);
+ }
+ result += *buffer - 0x0030 - (*buffer >= 0x0041 ? (*buffer >= 0x0061 ? 39 : 7) : 0);
+ buffer++;
+ }
+ return result;
+}
+
+
+U_CDECL_BEGIN
+static void U_CALLCONV DataDrivenPrintf(void)
+{
+#if !UCONFIG_NO_FORMATTING
+ UErrorCode errorCode;
+ TestDataModule *dataModule;
+ TestData *testData;
+ const DataMap *testCase;
+ DataDrivenLogger logger;
+ UChar uBuffer[512];
+ char cBuffer[512];
+ char cFormat[sizeof(cBuffer)];
+ char cExpected[sizeof(cBuffer)];
+ UnicodeString tempStr;
+ UChar format[512];
+ UChar expectedResult[512];
+ UChar argument[512];
+ int32_t i;
+ int8_t i8;
+ int16_t i16;
+ int32_t i32;
+ int64_t i64;
+ double dbl;
+ int32_t uBufferLenReturned;
+
+ const char *fileLocale = "en_US_POSIX";
+ int32_t uFileBufferLenReturned;
+ UFILE *testFile;
+
+ errorCode=U_ZERO_ERROR;
+ dataModule=TestDataModule::getTestDataModule("icuio", logger, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ testData=dataModule->createTestData("printf", errorCode);
+ if(U_SUCCESS(errorCode)) {
+ for(i=0; testData->nextCase(testCase, errorCode); ++i) {
+ if(U_FAILURE(errorCode)) {
+ log_err("error retrieving icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ testFile = u_fopen(STANDARD_TEST_FILE, "w", fileLocale, "UTF-8");
+ if (!testFile) {
+ log_err("Can't open test file - %s\n",
+ STANDARD_TEST_FILE);
+ continue;
+ }
+ u_memset(uBuffer, 0x2A, sizeof(uBuffer)/sizeof(uBuffer[0]));
+ uBuffer[sizeof(uBuffer)/sizeof(uBuffer[0])-1] = 0;
+ tempStr=testCase->getString("format", errorCode);
+ tempStr.extract(format, sizeof(format)/sizeof(format[0]), errorCode);
+ tempStr=testCase->getString("result", errorCode);
+ tempStr.extract(expectedResult, sizeof(expectedResult)/sizeof(expectedResult[0]), errorCode);
+ tempStr=testCase->getString("argument", errorCode);
+ tempStr.extract(argument, sizeof(argument)/sizeof(argument[0]), errorCode);
+ u_austrncpy(cBuffer, format, sizeof(cBuffer));
+ if(U_FAILURE(errorCode)) {
+ log_err("error retrieving icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ log_verbose("Test %d: format=\"%s\"\n", i, cBuffer);
+ switch (testCase->getString("argumentType", errorCode)[0]) {
+ case 0x64: // 'd' double
+ dbl = atof(u_austrcpy(cBuffer, argument));
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, dbl);
+ uFileBufferLenReturned = u_fprintf_u(testFile, format, dbl);
+ break;
+ case 0x31: // '1' int8_t
+ i8 = (int8_t)uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, i8);
+ uFileBufferLenReturned = u_fprintf_u(testFile, format, i8);
+ break;
+ case 0x32: // '2' int16_t
+ i16 = (int16_t)uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, i16);
+ uFileBufferLenReturned = u_fprintf_u(testFile, format, i16);
+ break;
+ case 0x34: // '4' int32_t
+ i32 = (int32_t)uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, i32);
+ uFileBufferLenReturned = u_fprintf_u(testFile, format, i32);
+ break;
+ case 0x38: // '8' int64_t
+ i64 = uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, i64);
+ uFileBufferLenReturned = u_fprintf_u(testFile, format, i64);
+ break;
+ case 0x73: // 's' char *
+ u_austrncpy(cBuffer, argument, sizeof(cBuffer));
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, cBuffer);
+ uFileBufferLenReturned = u_fprintf_u(testFile, format, cBuffer);
+ break;
+ case 0x53: // 'S' UChar *
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, argument);
+ uFileBufferLenReturned = u_fprintf_u(testFile, format, argument);
+ break;
+ default:
+ uBufferLenReturned = 0;
+ uFileBufferLenReturned = 0;
+ log_err("Unknown type %c for test %d\n", testCase->getString("argumentType", errorCode)[0], i);
+ }
+ if (u_strcmp(uBuffer, expectedResult) != 0) {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ u_austrncpy(cFormat, format, sizeof(cFormat));
+ u_austrncpy(cExpected, expectedResult, sizeof(cExpected));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE string test case %d \"%s\" - Got: \"%s\" Expected: \"%s\"\n",
+ i, cFormat, cBuffer, cExpected);
+ }
+ if (uBufferLenReturned <= 0) {
+ log_err("FAILURE test case %d - \"%s\" is an empty string.\n",
+ i, cBuffer);
+ }
+ else if (uBuffer[uBufferLenReturned-1] == 0
+ || uBuffer[uBufferLenReturned] != 0
+ || uBuffer[uBufferLenReturned+1] != 0x2A
+ || uBuffer[uBufferLenReturned+2] != 0x2A)
+ {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE test case %d - \"%s\" wrong amount of characters was written. Got %d.\n",
+ i, cBuffer, uBufferLenReturned);
+ }
+ u_fclose(testFile);
+ testFile = u_fopen(STANDARD_TEST_FILE, "r", fileLocale, "UTF-8");
+ if (!testFile) {
+ log_err("Can't open test file - %s\n",
+ STANDARD_TEST_FILE);
+ }
+ uBuffer[0]=0;
+ u_fgets(uBuffer, sizeof(uBuffer)/sizeof(uBuffer[0]), testFile);
+ if (u_strcmp(uBuffer, expectedResult) != 0) {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ u_austrncpy(cFormat, format, sizeof(cFormat));
+ u_austrncpy(cExpected, expectedResult, sizeof(cExpected));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE file test case %d \"%s\" - Got: \"%s\" Expected: \"%s\"\n",
+ i, cFormat, cBuffer, cExpected);
+ }
+ if (uFileBufferLenReturned != uBufferLenReturned)
+ {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE uFileBufferLenReturned(%d) != uBufferLenReturned(%d)\n",
+ uFileBufferLenReturned, uBufferLenReturned);
+ }
+
+ if(U_FAILURE(errorCode)) {
+ log_err("error running icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ u_fclose(testFile);
+ }
+ delete testData;
+ }
+ delete dataModule;
+ }
+ else {
+ log_err("Failed: could not load test icuio data\n");
+ }
+#endif
+}
+U_CDECL_END
+
+U_CDECL_BEGIN
+static void U_CALLCONV DataDrivenScanf(void)
+{
+#if !UCONFIG_NO_FORMATTING
+ UErrorCode errorCode;
+ TestDataModule *dataModule;
+ TestData *testData;
+ const DataMap *testCase;
+ DataDrivenLogger logger;
+ UChar uBuffer[512];
+ char cBuffer[512];
+ char cExpected[sizeof(cBuffer)];
+ UnicodeString tempStr;
+ UChar format[512];
+ UChar expectedResult[512];
+ UChar argument[512];
+ int32_t i;
+ int8_t i8, expected8;
+ int16_t i16, expected16;
+ int32_t i32, expected32;
+ int64_t i64, expected64;
+ double dbl, expectedDbl;
+ volatile float flt, expectedFlt; // Use volatile in order to get around an Intel compiler issue.
+ int32_t uBufferLenReturned;
+
+ //const char *fileLocale = "en_US_POSIX";
+ //int32_t uFileBufferLenReturned;
+ //UFILE *testFile;
+
+ errorCode=U_ZERO_ERROR;
+ dataModule=TestDataModule::getTestDataModule("icuio", logger, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ testData=dataModule->createTestData("scanf", errorCode);
+ if(U_SUCCESS(errorCode)) {
+ for(i=0; testData->nextCase(testCase, errorCode); ++i) {
+ if(U_FAILURE(errorCode)) {
+ log_err("error retrieving icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+/* testFile = u_fopen(STANDARD_TEST_FILE, "w", fileLocale, "UTF-8");
+ if (!testFile) {
+ log_err("Can't open test file - %s\n",
+ STANDARD_TEST_FILE);
+ }*/
+ u_memset(uBuffer, 0x2A, sizeof(uBuffer)/sizeof(uBuffer[0]));
+ uBuffer[sizeof(uBuffer)/sizeof(uBuffer[0])-1] = 0;
+ tempStr=testCase->getString("format", errorCode);
+ tempStr.extract(format, sizeof(format)/sizeof(format[0]), errorCode);
+ tempStr=testCase->getString("result", errorCode);
+ tempStr.extract(expectedResult, sizeof(expectedResult)/sizeof(expectedResult[0]), errorCode);
+ tempStr=testCase->getString("argument", errorCode);
+ tempStr.extract(argument, sizeof(argument)/sizeof(argument[0]), errorCode);
+ u_austrncpy(cBuffer, format, sizeof(cBuffer));
+ if(U_FAILURE(errorCode)) {
+ log_err("error retrieving icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ log_verbose("Test %d: format=\"%s\"\n", i, cBuffer);
+ switch (testCase->getString("argumentType", errorCode)[0]) {
+ case 0x64: // 'd' double
+ expectedDbl = atof(u_austrcpy(cBuffer, expectedResult));
+ uBufferLenReturned = u_sscanf_u(argument, format, &dbl);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, dbl);
+ if (dbl != expectedDbl) {
+ log_err("error in scanf test case[%d] Got: %f Exp: %f\n",
+ i, dbl, expectedDbl);
+ }
+ break;
+ case 0x66: // 'f' float
+ expectedFlt = (float)atof(u_austrcpy(cBuffer, expectedResult));
+ uBufferLenReturned = u_sscanf_u(argument, format, &flt);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, flt);
+ if (flt != expectedFlt) {
+ log_err("error in scanf test case[%d] Got: %f Exp: %f\n",
+ i, flt, expectedFlt);
+ }
+ break;
+ case 0x31: // '1' int8_t
+ expected8 = (int8_t)uto64(expectedResult);
+ uBufferLenReturned = u_sscanf_u(argument, format, &i8);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, i8);
+ if (i8 != expected8) {
+ log_err("error in scanf test case[%d] Got: %02X Exp: %02X\n",
+ i, i8, expected8);
+ }
+ break;
+ case 0x32: // '2' int16_t
+ expected16 = (int16_t)uto64(expectedResult);
+ uBufferLenReturned = u_sscanf_u(argument, format, &i16);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, i16);
+ if (i16 != expected16) {
+ log_err("error in scanf test case[%d] Got: %04X Exp: %04X\n",
+ i, i16, expected16);
+ }
+ break;
+ case 0x34: // '4' int32_t
+ expected32 = (int32_t)uto64(expectedResult);
+ uBufferLenReturned = u_sscanf_u(argument, format, &i32);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, i32);
+ if (i32 != expected32) {
+ log_err("error in scanf test case[%d] Got: %08X Exp: %08X\n",
+ i, i32, expected32);
+ }
+ break;
+ case 0x38: // '8' int64_t
+ expected64 = uto64(expectedResult);
+ uBufferLenReturned = u_sscanf_u(argument, format, &i64);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, i64);
+ if (i64 != expected64) {
+ log_err("error in scanf 64-bit. Test case = %d\n", i);
+ }
+ break;
+ case 0x73: // 's' char *
+ u_austrcpy(cExpected, expectedResult);
+ uBufferLenReturned = u_sscanf_u(argument, format, cBuffer);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, cBuffer);
+ if (strcmp(cBuffer, cExpected) != 0) {
+ log_err("error in scanf char * string. Got \"%s\" Expected \"%s\". Test case = %d\n", cBuffer, cExpected, i);
+ }
+ break;
+ case 0x53: // 'S' UChar *
+ uBufferLenReturned = u_sscanf_u(argument, format, uBuffer);
+ //uFileBufferLenReturned = u_fscanf_u(testFile, format, argument);
+ if (u_strcmp(uBuffer, expectedResult) != 0) {
+ u_austrcpy(cExpected, format);
+ u_austrcpy(cBuffer, uBuffer);
+ log_err("error in scanf UChar * string %s Got: \"%s\". Test case = %d\n", cExpected, cBuffer, i);
+ }
+ break;
+ default:
+ uBufferLenReturned = 0;
+ //uFileBufferLenReturned = 0;
+ log_err("Unknown type %c for test %d\n", testCase->getString("argumentType", errorCode)[0], i);
+ }
+ if (uBufferLenReturned != 1) {
+ log_err("error scanf converted %d arguments. Test case = %d\n", uBufferLenReturned, i);
+ }
+/* if (u_strcmp(uBuffer, expectedResult) != 0) {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ u_austrncpy(cFormat, format, sizeof(cFormat));
+ u_austrncpy(cExpected, expectedResult, sizeof(cExpected));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE string test case %d \"%s\" - Got: \"%s\" Expected: \"%s\"\n",
+ i, cFormat, cBuffer, cExpected);
+ }
+ if (uBuffer[uBufferLenReturned-1] == 0
+ || uBuffer[uBufferLenReturned] != 0
+ || uBuffer[uBufferLenReturned+1] != 0x2A
+ || uBuffer[uBufferLenReturned+2] != 0x2A)
+ {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE test case %d - \"%s\" wrong amount of characters was written. Got %d.\n",
+ i, cBuffer, uBufferLenReturned);
+ }*/
+/* u_fclose(testFile);
+ testFile = u_fopen(STANDARD_TEST_FILE, "r", fileLocale, "UTF-8");
+ if (!testFile) {
+ log_err("Can't open test file - %s\n",
+ STANDARD_TEST_FILE);
+ }
+ uBuffer[0];
+ u_fgets(uBuffer, sizeof(uBuffer)/sizeof(uBuffer[0]), testFile);
+ if (u_strcmp(uBuffer, expectedResult) != 0) {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ u_austrncpy(cFormat, format, sizeof(cFormat));
+ u_austrncpy(cExpected, expectedResult, sizeof(cExpected));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE file test case %d \"%s\" - Got: \"%s\" Expected: \"%s\"\n",
+ i, cFormat, cBuffer, cExpected);
+ }
+ if (uFileBufferLenReturned != uBufferLenReturned)
+ {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE uFileBufferLenReturned(%d) != uBufferLenReturned(%d)\n",
+ uFileBufferLenReturned, uBufferLenReturned);
+ }
+*/
+ if(U_FAILURE(errorCode)) {
+ log_err("error running icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+// u_fclose(testFile);
+ }
+ delete testData;
+ }
+ delete dataModule;
+ }
+ else {
+ log_err("Failed: could not load test icuio data\n");
+ }
+#endif
+}
+U_CDECL_END
+
+U_CDECL_BEGIN
+static void U_CALLCONV DataDrivenPrintfPrecision(void)
+{
+#if !UCONFIG_NO_FORMATTING
+ UErrorCode errorCode;
+ TestDataModule *dataModule;
+ TestData *testData;
+ const DataMap *testCase;
+ DataDrivenLogger logger;
+ UChar uBuffer[512];
+ char cBuffer[512];
+ char cFormat[sizeof(cBuffer)];
+ char cExpected[sizeof(cBuffer)];
+ UnicodeString tempStr;
+ UChar format[512];
+ UChar expectedResult[512];
+ UChar argument[512];
+ int32_t precision;
+ int32_t i;
+ int8_t i8;
+ int16_t i16;
+ int32_t i32;
+ int64_t i64;
+ double dbl;
+ int32_t uBufferLenReturned;
+
+ errorCode=U_ZERO_ERROR;
+ dataModule=TestDataModule::getTestDataModule("icuio", logger, errorCode);
+ if(U_SUCCESS(errorCode)) {
+ testData=dataModule->createTestData("printfPrecision", errorCode);
+ if(U_SUCCESS(errorCode)) {
+ for(i=0; testData->nextCase(testCase, errorCode); ++i) {
+ if(U_FAILURE(errorCode)) {
+ log_err("error retrieving icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ u_memset(uBuffer, 0x2A, sizeof(uBuffer)/sizeof(uBuffer[0]));
+ uBuffer[sizeof(uBuffer)/sizeof(uBuffer[0])-1] = 0;
+ tempStr=testCase->getString("format", errorCode);
+ tempStr.extract(format, sizeof(format)/sizeof(format[0]), errorCode);
+ tempStr=testCase->getString("result", errorCode);
+ tempStr.extract(expectedResult, sizeof(expectedResult)/sizeof(expectedResult[0]), errorCode);
+ tempStr=testCase->getString("argument", errorCode);
+ tempStr.extract(argument, sizeof(argument)/sizeof(argument[0]), errorCode);
+ precision=testCase->getInt28("precision", errorCode);
+ u_austrncpy(cBuffer, format, sizeof(cBuffer));
+ if(U_FAILURE(errorCode)) {
+ log_err("error retrieving icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ log_verbose("Test %d: format=\"%s\"\n", i, cBuffer);
+ switch (testCase->getString("argumentType", errorCode)[0]) {
+ case 0x64: // 'd' double
+ dbl = atof(u_austrcpy(cBuffer, argument));
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, precision, dbl);
+ break;
+ case 0x31: // '1' int8_t
+ i8 = (int8_t)uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, precision, i8);
+ break;
+ case 0x32: // '2' int16_t
+ i16 = (int16_t)uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, precision, i16);
+ break;
+ case 0x34: // '4' int32_t
+ i32 = (int32_t)uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, precision, i32);
+ break;
+ case 0x38: // '8' int64_t
+ i64 = uto64(argument);
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, precision, i64);
+ break;
+ case 0x73: // 's' char *
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, precision, cBuffer);
+ break;
+ case 0x53: // 'S' UChar *
+ uBufferLenReturned = u_sprintf_u(uBuffer, format, precision, argument);
+ break;
+ default:
+ uBufferLenReturned = 0;
+ log_err("Unknown type %c for test %d\n", testCase->getString("argumentType", errorCode)[0], i);
+ }
+ if (u_strcmp(uBuffer, expectedResult) != 0) {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ u_austrncpy(cFormat, format, sizeof(cFormat));
+ u_austrncpy(cExpected, expectedResult, sizeof(cExpected));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE test case %d \"%s\" - Got: \"%s\" Expected: \"%s\"\n",
+ i, cFormat, cBuffer, cExpected);
+ }
+ if (uBufferLenReturned <= 0) {
+ log_err("FAILURE test case %d - \"%s\" is an empty string.\n",
+ i, cBuffer);
+ }
+ else if (uBuffer[uBufferLenReturned-1] == 0
+ || uBuffer[uBufferLenReturned] != 0
+ || uBuffer[uBufferLenReturned+1] != 0x2A
+ || uBuffer[uBufferLenReturned+2] != 0x2A)
+ {
+ u_austrncpy(cBuffer, uBuffer, sizeof(cBuffer));
+ cBuffer[sizeof(cBuffer)-1] = 0;
+ log_err("FAILURE test case %d - \"%s\" wrong amount of characters was written. Got %d.\n",
+ i, cBuffer, uBufferLenReturned);
+ }
+ if(U_FAILURE(errorCode)) {
+ log_err("error running icuio/printf test case %d - %s\n",
+ i, u_errorName(errorCode));
+ errorCode=U_ZERO_ERROR;
+ continue;
+ }
+ }
+ delete testData;
+ }
+ delete dataModule;
+ }
+ else {
+ log_err("Failed: could not load test icuio data\n");
+ }
+#endif
+}
+U_CDECL_END
+
+static void addAllTests(TestNode** root) {
+ addFileTest(root);
+ addStringTest(root);
+ addTranslitTest(root);
+
+#if !UCONFIG_NO_FORMATTING
+ addTest(root, &DataDrivenPrintf, "datadriv/DataDrivenPrintf");
+ addTest(root, &DataDrivenPrintfPrecision, "datadriv/DataDrivenPrintfPrecision");
+ addTest(root, &DataDrivenScanf, "datadriv/DataDrivenScanf");
+#endif
+ addStreamTests(root);
+}
+
+/* returns the path to icu/source/data/out */
+static const char *ctest_dataOutDir()
+{
+ static const char *dataOutDir = NULL;
+
+ if(dataOutDir) {
+ return dataOutDir;
+ }
+
+ /* U_TOPBUILDDIR is set by the makefiles on UNIXes when building cintltst and intltst
+ // to point to the top of the build hierarchy, which may or
+ // may not be the same as the source directory, depending on
+ // the configure options used. At any rate,
+ // set the data path to the built data from this directory.
+ // The value is complete with quotes, so it can be used
+ // as-is as a string constant.
+ */
+#if defined (U_TOPBUILDDIR)
+ {
+ dataOutDir = U_TOPBUILDDIR "data"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ }
+#else
+
+ /* On Windows, the file name obtained from __FILE__ includes a full path.
+ * This file is "wherever\icu\source\test\cintltst\cintltst.c"
+ * Change to "wherever\icu\source\data"
+ */
+ {
+ static char p[sizeof(__FILE__) + 20];
+ char *pBackSlash;
+ int i;
+
+ strcpy(p, __FILE__);
+ /* We want to back over three '\' chars. */
+ /* Only Windows should end up here, so looking for '\' is safe. */
+ for (i=1; i<=3; i++) {
+ pBackSlash = strrchr(p, U_FILE_SEP_CHAR);
+ if (pBackSlash != NULL) {
+ *pBackSlash = 0; /* Truncate the string at the '\' */
+ }
+ }
+
+ if (pBackSlash != NULL) {
+ /* We found and truncated three names from the path.
+ * Now append "source\data" and set the environment
+ */
+ strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING);
+ dataOutDir = p;
+ }
+ else {
+ /* __FILE__ on MSVC7 does not contain the directory */
+ FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r");
+ if (file) {
+ fclose(file);
+ dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
+ }
+ else {
+ dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
+ }
+ }
+ }
+#endif
+
+ return dataOutDir;
+}
+
+/* ctest_setICU_DATA - if the ICU_DATA environment variable is not already
+ * set, try to deduce the directory in which ICU was built,
+ * and set ICU_DATA to "icu/source/data" in that location.
+ * The intent is to allow the tests to have a good chance
+ * of running without requiring that the user manually set
+ * ICU_DATA. Common data isn't a problem, since it is
+ * picked up via a static (build time) reference, but the
+ * tests dynamically load some data.
+ */
+static void ctest_setICU_DATA() {
+
+ /* No location for the data dir was identifiable.
+ * Add other fallbacks for the test data location here if the need arises
+ */
+ if (getenv("ICU_DATA") == NULL) {
+ /* If ICU_DATA isn't set, set it to the usual location */
+ u_setDataDirectory(ctest_dataOutDir());
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ int32_t nerrors = 0;
+ TestNode *root = NULL;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UDate startTime, endTime;
+ int32_t diffTime;
+
+ startTime = uprv_getUTCtime();
+
+ /* Check whether ICU will initialize without forcing the build data directory into
+ * the ICU_DATA path. Success here means either the data dll contains data, or that
+ * this test program was run with ICU_DATA set externally. Failure of this check
+ * is normal when ICU data is not packaged into a shared library.
+ *
+ * Whether or not this test succeeds, we want to cleanup and reinitialize
+ * with a data path so that data loading from individual files can be tested.
+ */
+ u_init(&errorCode);
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### Note: ICU Init without build-specific setDataDirectory() failed.\n");
+ }
+ u_cleanup();
+ errorCode = U_ZERO_ERROR;
+
+ /* Initialize ICU */
+ ctest_setICU_DATA(); /* u_setDataDirectory() must happen Before u_init() */
+ u_init(&errorCode);
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### ERROR! %s: u_init() failed with status = \"%s\".\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", argv[0], u_errorName(errorCode));
+ return 1;
+ }
+
+ fprintf(stdout, "Default charset for this run is %s\n", ucnv_getDefaultName());
+
+ addAllTests(&root);
+ nerrors = processArgs(root, argc, argv);
+
+#if 1
+ {
+ FILE* fileToRemove = fopen(STANDARD_TEST_FILE, "r");
+ /* This should delete any temporary files. */
+ if (fileToRemove) {
+ fclose(fileToRemove);
+ if (remove(STANDARD_TEST_FILE) != 0) {
+ /* Maybe someone didn't close the file correctly. */
+ fprintf(stderr, "FAIL: Could not delete %s\n", STANDARD_TEST_FILE);
+ nerrors += 1;
+ }
+ }
+ }
+#endif
+
+ cleanUpTestTree(root);
+ DataDrivenLogger::cleanUp();
+ u_cleanup();
+
+ endTime = uprv_getUTCtime();
+ diffTime = (int32_t)(endTime - startTime);
+ printf("Elapsed Time: %02d:%02d:%02d.%03d\n",
+ (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR),
+ (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE),
+ (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND),
+ (int)(diffTime%U_MILLIS_PER_SECOND));
+
+ return nerrors;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/iotest.h b/Build/source/libs/icu/icu-xetex/test/iotest/iotest.h
new file mode 100644
index 00000000000..6d522dc435d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/iotest.h
@@ -0,0 +1,42 @@
+/*
+**********************************************************************
+* Copyright (C) 2004-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: iotest.h
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2004apr06
+* created by: George Rhoten
+*/
+
+#ifndef IOTEST_H
+#define IOTEST_H 1
+
+#include "unicode/utypes.h"
+#include "unicode/ctest.h"
+
+U_CFUNC void
+addStringTest(TestNode** root);
+
+U_CFUNC void
+addFileTest(TestNode** root);
+
+U_CFUNC void
+addTranslitTest(TestNode** root);
+
+U_CFUNC void
+addStreamTests(TestNode** root);
+
+U_CDECL_BEGIN
+extern const UChar NEW_LINE[];
+extern const char C_NEW_LINE[];
+extern const char STANDARD_TEST_FILE[];
+U_CDECL_END
+
+#define STANDARD_TEST_NUM_RANGE 1000
+
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/iotest.vcproj b/Build/source/libs/icu/icu-xetex/test/iotest/iotest.vcproj
new file mode 100644
index 00000000000..71ecefa6252
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/iotest.vcproj
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="iotest"
+ ProjectGUID="{E4993E82-D68A-46CA-BAE0-9D35E172E46F}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/iotest.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include;..\..\tools\ctestfw;..\..\common"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ DisableLanguageExtensions="true"
+ TreatWChar_tAsBuiltInType="true"
+ PrecompiledHeaderFile=".\Debug/iotest.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Debug/iotest.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/iotest.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseFAT32Workaround="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/iotest.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\include;..\..\tools\ctestfw;..\..\common"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ DisableLanguageExtensions="true"
+ TreatWChar_tAsBuiltInType="true"
+ PrecompiledHeaderFile=".\Release/iotest.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Release/iotest.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\Release/iotest.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx"
+ >
+ <File
+ RelativePath=".\filetst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\iotest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\stream.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableLanguageExtensions="false"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\strtst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\trnstst.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx"
+ >
+ <File
+ RelativePath=".\iotest.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/stream.cpp b/Build/source/libs/icu/icu-xetex/test/iotest/stream.cpp
new file mode 100644
index 00000000000..c700437aae1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/stream.cpp
@@ -0,0 +1,247 @@
+/*
+**********************************************************************
+* Copyright (C) 2002-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: iotest.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2002feb21
+* created by: George Rhoten
+*/
+
+
+#include "unicode/ustream.h"
+
+#include "unicode/ucnv.h"
+#include "unicode/ustring.h"
+#include "ustr_cnv.h"
+#include "iotest.h"
+
+#if U_IOSTREAM_SOURCE >= 199711
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define USE_SSTREAM 1
+#include <sstream>
+#else
+// <strstream> is deprecated on some platforms, and the compiler complains very loudly if you use it.
+#include <strstream>
+#endif
+#include <fstream>
+using namespace std;
+#elif U_IOSTREAM_SOURCE >= 198506
+#include <strstream.h>
+#include <fstream.h>
+#endif
+
+#include <string.h>
+
+U_CDECL_BEGIN
+#ifdef U_WINDOWS
+const UChar NEW_LINE[] = {0x0d,0x0a,0};
+const char C_NEW_LINE[] = {0x0d,0x0a,0};
+#define UTF8_NEW_LINE "\x0d\x0a"
+#else
+const UChar NEW_LINE[] = {0x0a,0};
+const char C_NEW_LINE[] = {'\n',0};
+#define UTF8_NEW_LINE "\x0a"
+#endif
+U_CDECL_END
+
+U_CDECL_BEGIN
+static void U_CALLCONV TestStream(void)
+{
+#if U_IOSTREAM_SOURCE >= 198506
+ const UChar thisMu[] = { 0x74, 0x48, 0x69, 0x73, 0x3BC, 0};
+ const UChar mu[] = { 0x6D, 0x75, 0};
+ UnicodeString str1 = UNICODE_STRING_SIMPLE("str1");
+ UnicodeString str2 = UNICODE_STRING_SIMPLE(" <<");
+ UnicodeString str3 = UNICODE_STRING_SIMPLE("2");
+ UnicodeString str4 = UNICODE_STRING_SIMPLE(" UTF-8 ");
+ UnicodeString inStr = UNICODE_STRING_SIMPLE(" UTF-8 ");
+ UnicodeString inStr2;
+ char defConvName[UCNV_MAX_CONVERTER_NAME_LENGTH*2];
+ char inStrC[128];
+ UErrorCode status = U_ZERO_ERROR;
+ UConverter *defConv;
+ static const char testStr[] = "\x42\x65\x67\x69\x6E\x6E\x69\x6E\x67\x20\x6F\x66\x20\x74\x65\x73\x74\x20\x73\x74\x72\x31\x20\x20\x20\x3C\x3C\x32\x31\x20" UTF8_NEW_LINE "\x20\x55\x54\x46\x2D\x38\x20\xCE\xBC\xF0\x90\x80\x81\xF0\x90\x80\x82";
+
+ str4.append((UChar32)0x03BC); /* mu */
+ str4.append((UChar32)0x10001);
+ str4.append((UChar32)0x10002);
+
+ /* release the default converter and use utf-8 for a bit */
+ defConv = u_getDefaultConverter(&status);
+ if (U_FAILURE(status)) {
+ log_err("Can't get default converter\n");
+ return;
+ }
+ ucnv_close(defConv);
+ strncpy(defConvName, ucnv_getDefaultName(), sizeof(defConvName)/sizeof(defConvName[0]));
+ ucnv_setDefaultName("UTF-8");
+
+ static const char * const TESTSTRING = "\x20\x74\x48\x69\x73\xCE\xBC\xE2\x80\x82\x20\x6D\x75\x20\x77\x6F\x72\x6C\x64";
+#ifdef USE_SSTREAM
+ ostringstream outTestStream;
+ istringstream inTestStream(TESTSTRING);
+#else
+ char testStreamBuf[512];
+ ostrstream outTestStream(testStreamBuf, sizeof(testStreamBuf));
+ istrstream inTestStream(TESTSTRING, 0);
+
+ /* initialize testStreamBuf */
+ memset(testStreamBuf, '*', sizeof(testStreamBuf));
+ testStreamBuf[sizeof(testStreamBuf)-1] = 0;
+#endif
+
+ outTestStream << "\x42\x65\x67\x69\x6E\x6E\x69\x6E\x67\x20\x6F\x66\x20\x74\x65\x73\x74\x20";
+ outTestStream << str1 << "\x20\x20" << str2 << str3 << "\x31\x20" << UTF8_NEW_LINE << str4 << ends;
+#ifdef USE_SSTREAM
+ string tempStr = outTestStream.str();
+ const char *testStreamBuf = tempStr.c_str();
+#endif
+ if (strcmp(testStreamBuf, testStr) != 0) {
+ log_err("Got: \"%s\", Expected: \"%s\"\n", testStreamBuf, testStr);
+ }
+
+ inTestStream >> inStr >> inStr2;
+ if (inStr.compare(thisMu) != 0) {
+ u_austrncpy(inStrC, inStr.getBuffer(), inStr.length());
+ inStrC[inStr.length()] = 0;
+ log_err("Got: \"%s\", Expected: \"tHis\\u03BC\"\n", inStrC);
+ }
+ if (inStr2.compare(mu) != 0) {
+ u_austrncpy(inStrC, inStr.getBuffer(), inStr.length());
+ inStrC[inStr.length()] = 0;
+ log_err("Got: \"%s\", Expected: \"mu\"\n", inStrC);
+ }
+
+ /* return the default converter to the original state. */
+ ucnv_setDefaultName(defConvName);
+ defConv = u_getDefaultConverter(&status);
+ if (U_FAILURE(status)) {
+ log_err("Can't get default converter");
+ return;
+ }
+ ucnv_close(defConv);
+#else
+ log_info("U_IOSTREAM_SOURCE is disabled\n");
+#endif
+}
+
+#define IOSTREAM_GOOD_SHIFT 3
+#define IOSTREAM_GOOD (1<<IOSTREAM_GOOD_SHIFT)
+#define IOSTREAM_BAD_SHIFT 2
+#define IOSTREAM_BAD (1<<IOSTREAM_BAD_SHIFT)
+#define IOSTREAM_EOF_SHIFT 1
+#define IOSTREAM_EOF (1<<IOSTREAM_EOF_SHIFT)
+#define IOSTREAM_FAIL_SHIFT 0
+#define IOSTREAM_FAIL (1<<IOSTREAM_FAIL_SHIFT)
+
+static int32_t getBitStatus(const iostream& stream) {
+ return (stream.good()<<IOSTREAM_GOOD_SHIFT)
+ | (stream.bad()<<IOSTREAM_BAD_SHIFT)
+ | (stream.eof()<<IOSTREAM_EOF_SHIFT)
+ | (stream.fail()<<IOSTREAM_FAIL_SHIFT);
+}
+
+void
+printBits(const iostream& stream)
+{
+ int32_t status = getBitStatus(stream);
+ log_verbose("status 0x%02X (", status);
+ if (status & IOSTREAM_GOOD) {
+ log_verbose("good");
+ }
+ if (status & IOSTREAM_BAD) {
+ log_verbose("bad");
+ }
+ if (status & IOSTREAM_EOF) {
+ log_verbose("eof");
+ }
+ if (status & IOSTREAM_FAIL) {
+ log_verbose("fail");
+ }
+ log_verbose(")\n");
+}
+
+void
+testString(
+ UnicodeString& str,
+ const char* testString,
+ const char* expectedString,
+ int32_t expectedStatus)
+{
+#ifdef USE_SSTREAM
+ stringstream sstrm;
+#else
+ strstream sstrm;
+#endif
+
+ sstrm << testString;
+
+ /*log_verbose("iostream before operator::>>() call \"%s\" ", testString);
+ printBits(sstrm);*/
+
+ sstrm >> str;
+
+ log_verbose("iostream after operator::>>() call \"%s\" ", testString);
+ printBits(sstrm);
+
+ if (getBitStatus(sstrm) != expectedStatus) {
+ printBits(sstrm);
+ log_err("Expected status %d, Got %d. See verbose output for details\n", getBitStatus(sstrm), expectedStatus);
+ }
+ if (str != UnicodeString(expectedString)) {
+ log_err("Did not get expected results from \"%s\", expected \"%s\"\n", testString, expectedString);
+ }
+}
+
+static void U_CALLCONV TestStreamEOF(void)
+{
+ UnicodeString dest;
+ fstream fs(STANDARD_TEST_FILE, fstream::in | fstream::out | fstream::trunc);
+#ifdef USE_SSTREAM
+ stringstream ss;
+#else
+ strstream ss;
+#endif
+
+ fs << "EXAMPLE";
+ fs.seekg(0);
+ ss << "EXAMPLE";
+
+ if (!(fs >> dest)) {
+ log_err("Reading of file did not return expected status result\n");
+ }
+ if (dest != "EXAMPLE") {
+ log_err("Reading of file did not return expected string\n");
+ }
+
+ if (!(ss >> dest)) {
+ log_err("Reading of string did not return expected status result\n");
+ }
+ if (dest != "EXAMPLE") {
+ log_err("Reading of string did not return expected string\n");
+ }
+ fs.close();
+
+ log_verbose("Testing operator >> for UnicodeString...\n");
+
+ UnicodeString UStr;
+ testString(UStr, "", "", IOSTREAM_EOF|IOSTREAM_FAIL);
+ testString(UStr, "foo", "foo", IOSTREAM_EOF);
+ UStr = "unchanged";
+ testString(UStr, " ", "unchanged", IOSTREAM_EOF|IOSTREAM_FAIL);
+ testString(UStr, " bar", "bar", IOSTREAM_EOF);
+ testString(UStr, "bar ", "bar", IOSTREAM_GOOD);
+ testString(UStr, " bar ", "bar", IOSTREAM_GOOD);
+}
+U_CDECL_END
+
+U_CFUNC void addStreamTests(TestNode** root) {
+ addTest(root, &TestStream, "stream/TestStream");
+ addTest(root, &TestStreamEOF, "stream/TestStreamEOF");
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/strtst.c b/Build/source/libs/icu/icu-xetex/test/iotest/strtst.c
new file mode 100644
index 00000000000..0412f25efb2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/strtst.c
@@ -0,0 +1,790 @@
+/*
+**********************************************************************
+* Copyright (C) 2004-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: strtst.c
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2004apr06
+* created by: George Rhoten
+*/
+
+#include "unicode/ustdio.h"
+#include "unicode/ustring.h"
+#include "iotest.h"
+
+#include <string.h>
+
+static void TestString(void) {
+#if !UCONFIG_NO_FORMATTING
+ int32_t n[1];
+ float myFloat = -1234.0;
+ int32_t newValuePtr[1];
+ double newDoubleValuePtr[1];
+ UChar myUString[512];
+ UChar uStringBuf[512];
+ char myString[512] = "";
+ int32_t retVal;
+ void *origPtr, *ptr;
+ U_STRING_DECL(myStringOrig, "My-String", 9);
+
+ U_STRING_INIT(myStringOrig, "My-String", 9);
+ u_memset(myUString, 0x0a, sizeof(myUString)/ sizeof(*myUString));
+ u_memset(uStringBuf, 0x0a, sizeof(uStringBuf) / sizeof(*uStringBuf));
+
+ *n = -1234;
+ if (sizeof(void *) == 4) {
+ origPtr = (void *)0xdeadbeef;
+ } else if (sizeof(void *) == 8) {
+ origPtr = (void *) INT64_C(0x1000200030004000);
+ } else if (sizeof(void *) == 16) {
+ /* iSeries */
+ union {
+ int32_t arr[4];
+ void *ptr;
+ } massiveBigEndianPtr = {{ 0x10002000, 0x30004000, 0x50006000, 0x70008000 }};
+ origPtr = massiveBigEndianPtr.ptr;
+ } else {
+ log_err("sizeof(void*)=%d hasn't been tested before", (int)sizeof(void*));
+ }
+
+ /* Test sprintf */
+ u_sprintf(uStringBuf, "Signed decimal integer d: %d", *n);
+ *newValuePtr = 1;
+ u_sscanf(uStringBuf, "Signed decimal integer d: %d", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%d Got: %d, Expected: %d\n", *newValuePtr, *n);
+ }
+
+ u_sprintf(uStringBuf, "Signed decimal integer i: %i", *n);
+ *newValuePtr = 1;
+ u_sscanf(uStringBuf, "Signed decimal integer i: %i", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%i Got: %i, Expected: %i\n", *newValuePtr, *n);
+ }
+
+ u_sprintf(uStringBuf, "Unsigned octal integer o: %o", *n);
+ *newValuePtr = 1;
+ u_sscanf(uStringBuf, "Unsigned octal integer o: %o", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%o Got: %o, Expected: %o\n", *newValuePtr, *n);
+ }
+
+ u_sprintf(uStringBuf, "Unsigned decimal integer %%u: %u", *n);
+ *newValuePtr = 1;
+ u_sscanf(uStringBuf, "Unsigned decimal integer %%u: %u", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%u Got: %u, Expected: %u\n", *newValuePtr, *n);
+ }
+
+ u_sprintf(uStringBuf, "Lowercase unsigned hexadecimal integer x: %x", *n);
+ *newValuePtr = 1;
+ u_sscanf(uStringBuf, "Lowercase unsigned hexadecimal integer x: %x", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%x Got: %x, Expected: %x\n", *newValuePtr, *n);
+ }
+
+ u_sprintf(uStringBuf, "Uppercase unsigned hexadecimal integer X: %X", *n);
+ *newValuePtr = 1;
+ u_sscanf(uStringBuf, "Uppercase unsigned hexadecimal integer X: %X", newValuePtr);
+ if (*n != *newValuePtr) {
+ log_err("%%X Got: %X, Expected: %X\n", *newValuePtr, *n);
+ }
+
+ u_sprintf(uStringBuf, "Float f: %f", myFloat);
+ *newDoubleValuePtr = -1.0;
+ u_sscanf(uStringBuf, "Float f: %lf", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%f Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat);
+ }
+
+ u_sprintf(uStringBuf, "Lowercase float e: %e", myFloat);
+ *newDoubleValuePtr = -1.0;
+ u_sscanf(uStringBuf, "Lowercase float e: %le", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%e Got: %e, Expected: %e\n", *newDoubleValuePtr, myFloat);
+ }
+
+ u_sprintf(uStringBuf, "Uppercase float E: %E", myFloat);
+ *newDoubleValuePtr = -1.0;
+ u_sscanf(uStringBuf, "Uppercase float E: %lE", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%E Got: %E, Expected: %E\n", *newDoubleValuePtr, myFloat);
+ }
+
+ u_sprintf(uStringBuf, "Lowercase float g: %g", myFloat);
+ *newDoubleValuePtr = -1.0;
+ u_sscanf(uStringBuf, "Lowercase float g: %lg", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%g Got: %g, Expected: %g\n", *newDoubleValuePtr, myFloat);
+ }
+
+ u_sprintf(uStringBuf, "Uppercase float G: %G", myFloat);
+ *newDoubleValuePtr = -1.0;
+ u_sscanf(uStringBuf, "Uppercase float G: %lG", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%G Got: %G, Expected: %G\n", *newDoubleValuePtr, myFloat);
+ }
+
+ ptr = NULL;
+ u_sprintf(uStringBuf, "Pointer %%p: %p\n", origPtr);
+ u_sscanf(uStringBuf, "Pointer %%p: %p\n", &ptr);
+ if (ptr != origPtr || u_strlen(uStringBuf) != 13+(sizeof(void*)*2)) {
+ log_err("%%p Got: %p, Expected: %p\n", ptr, origPtr);
+ }
+
+ u_sprintf(uStringBuf, "Char c: %c", 'A');
+ u_sscanf(uStringBuf, "Char c: %c", myString);
+ if (*myString != 'A') {
+ log_err("%%c Got: %c, Expected: A\n", *myString);
+ }
+
+ u_sprintf(uStringBuf, "UChar %%C: %C", (UChar)0x0041); /*'A'*/
+ u_sscanf(uStringBuf, "UChar %%C: %C", myUString);
+ if (*myUString != (UChar)0x0041) { /*'A'*/
+ log_err("%%C Got: %C, Expected: A\n", *myUString);
+ }
+
+ u_sprintf(uStringBuf, "String %%s: %s", "My-String");
+ u_sscanf(uStringBuf, "String %%s: %s", myString);
+ if (strcmp(myString, "My-String")) {
+ log_err("%%s Got: %s, Expected: My-String\n", myString);
+ }
+ if (uStringBuf[20] != 0) {
+ log_err("String not terminated. Got %c\n", uStringBuf[20] );
+ }
+ u_sprintf(uStringBuf, "NULL String %%s: %s", NULL);
+ u_sscanf(uStringBuf, "NULL String %%s: %s", myString);
+ if (strcmp(myString, "(null)")) {
+ log_err("%%s Got: %s, Expected: My-String\n", myString);
+ }
+
+ u_sprintf(uStringBuf, "Unicode String %%S: %S", myStringOrig);
+ u_sscanf(uStringBuf, "Unicode String %%S: %S", myUString);
+ u_austrncpy(myString, myUString, sizeof(myString)/sizeof(*myString));
+ if (strcmp(myString, "My-String")) {
+ log_err("%%S Got: %s, Expected: My String\n", myString);
+ }
+
+ u_sprintf(uStringBuf, "NULL Unicode String %%S: %S", NULL);
+ u_sscanf(uStringBuf, "NULL Unicode String %%S: %S", myUString);
+ u_austrncpy(myString, myUString, sizeof(myString)/sizeof(*myString));
+ if (strcmp(myString, "(null)")) {
+ log_err("%%S Got: %s, Expected: (null)\n", myString);
+ }
+
+ u_sprintf(uStringBuf, "Percent %%P (non-ANSI): %P", myFloat);
+ *newDoubleValuePtr = -1.0;
+ u_sscanf(uStringBuf, "Percent %%P (non-ANSI): %P", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%P Got: %P, Expected: %P\n", *newDoubleValuePtr, myFloat);
+ }
+
+ u_sprintf(uStringBuf, "Spell Out %%V (non-ANSI): %V", myFloat);
+ *newDoubleValuePtr = -1.0;
+ u_sscanf(uStringBuf, "Spell Out %%V (non-ANSI): %V", newDoubleValuePtr);
+ if (myFloat != *newDoubleValuePtr) {
+ log_err("%%V Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat);
+ }
+
+ *newValuePtr = 1;
+ u_sprintf(uStringBuf, "\t\nPointer to integer (Count) %%n: n=%d %n n=%d\n", *newValuePtr, newValuePtr, *newValuePtr);
+ if (*newValuePtr != 37) {
+ log_err("%%V Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat);
+ }
+
+/* u_sscanf(uStringBuf, "Pointer %%p: %p\n", myFile);*/
+
+ {
+ static const char longStr[] = "This is a long test12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
+
+ retVal = u_sprintf(uStringBuf, longStr);
+ u_austrncpy(myString, uStringBuf, sizeof(uStringBuf)/sizeof(*uStringBuf));
+ if (strcmp(myString, longStr)) {
+ log_err("%%S Got: %s, Expected: %s\n", myString, longStr);
+ }
+ if (retVal != (int32_t)strlen(longStr)) {
+ log_err("%%S returned different sizes. Got: %d Expected: %d\n", retVal, strlen(longStr));
+ }
+
+ retVal = u_sprintf(uStringBuf, "%s", longStr);
+ u_austrncpy(myString, uStringBuf, sizeof(uStringBuf)/sizeof(*uStringBuf));
+ if (strcmp(myString, longStr)) {
+ log_err("%%S Got: %s, Expected: %s\n", myString, longStr);
+ }
+ if (retVal != (int32_t)strlen(longStr)) {
+ log_err("%%S returned different sizes. Got: %d Expected: %d\n", retVal, strlen(longStr));
+ }
+
+ u_uastrncpy(myUString, longStr, sizeof(longStr)/sizeof(*longStr));
+ u_sprintf_u(uStringBuf, myUString);
+ if (u_strcmp(myUString, uStringBuf)) {
+ log_err("%%S Long strings differ. Expected: %s\n", longStr);
+ }
+
+ u_uastrncpy(myUString, longStr, sizeof(longStr)/sizeof(*longStr));
+ retVal = u_sprintf_u(uStringBuf, myUString+10);
+ if (u_strcmp(myUString+10, uStringBuf)) {
+ log_err("%%S Long strings differ. Expected: %s\n", longStr + 10);
+ }
+ if (retVal != (int32_t)strlen(longStr + 10)) {
+ log_err("%%S returned different sizes. Got: %d Expected: %d\n", retVal, strlen(longStr));
+ }
+
+ u_memset(uStringBuf, 1, sizeof(longStr)/sizeof(*longStr));
+ u_uastrncpy(myUString, longStr, sizeof(longStr)/sizeof(*longStr));
+ retVal = u_snprintf_u(uStringBuf, 10, myUString);
+ if (u_strncmp(myUString, uStringBuf, 10) || uStringBuf[10] != 1 || retVal != 10) {
+ log_err("%%S Long strings differ. Expected the first 10 characters of %s\n", longStr);
+ }
+ }
+#endif
+}
+
+static void TestLocalizedString(void) {
+#if !UCONFIG_NO_FORMATTING
+ UChar testStr[256];
+ UChar uBuffer[256];
+ char cBuffer[256];
+ int32_t numResult = -1;
+ const char *locale;
+ UFILE *strFile = u_fstropen(testStr, sizeof(testStr)/sizeof(testStr[0]), "en_US");
+
+ if (!strFile) {
+ log_err("u_fstropen failed to work\n");
+ return;
+ }
+ u_fprintf(strFile, "%d", 1234);
+ u_frewind(strFile);
+ u_fscanf(strFile, "%d", &numResult);
+ u_uastrcpy(uBuffer,"1,234");
+ u_austrcpy(cBuffer,testStr);
+ if (u_strcmp(testStr, uBuffer) != 0) {
+ log_err("u_fprintf failed to work on an en string Got: %s\n", cBuffer);
+ }
+ if (numResult != 1234) {
+ log_err("u_fscanf failed to work on an en string Got: %d\n", numResult);
+ }
+
+ u_frewind(strFile);
+ locale = u_fgetlocale(strFile);
+ if (locale == NULL || strcmp(locale, "en_US") != 0) {
+ log_err("u_fgetlocale didn't return \"en\" Got: %d\n", u_fgetlocale(strFile));
+ }
+ u_fsetlocale(strFile, "de_DE");
+ locale = u_fgetlocale(strFile);
+ if (locale == NULL || strcmp(locale, "de_DE") != 0) {
+ log_err("u_fgetlocale didn't return \"de\" Got: %d\n", u_fgetlocale(strFile));
+ }
+
+ u_fprintf(strFile, "%d", 1234);
+ u_frewind(strFile);
+ numResult = -1;
+ u_fscanf(strFile, "%d", &numResult);
+ u_fclose(strFile);
+ u_uastrcpy(uBuffer,"1.234");
+ u_austrcpy(cBuffer,testStr);
+ if (u_strcmp(testStr, uBuffer) != 0) {
+ log_err("u_fprintf failed to work on a de string Got: %s\n", cBuffer);
+ }
+ if (numResult != 1234) {
+ log_err("u_fscanf failed to work on a de string Got: %d\n", numResult);
+ }
+
+ strFile = u_fstropen(testStr, sizeof(testStr)/sizeof(testStr[0]), NULL);
+ u_fprintf(strFile, "%d", 1234);
+ u_frewind(strFile);
+ numResult = -1;
+ u_fscanf(strFile, "%d", &numResult);
+ u_fclose(strFile);
+ if (numResult != 1234) {
+ log_err("u_fscanf failed to work on a default locale string Got: %d, Expected: 1234\n", numResult);
+ }
+ if (u_fstropen(testStr, -1, NULL) != NULL) {
+ log_err("u_fstropen returned a UFILE* on a negative buffer size\n", numResult);
+ }
+#endif
+}
+
+#if !UCONFIG_NO_FORMATTING
+#define Test_u_snprintf(limit, format, value, expectedSize, expectedStr) \
+ u_uastrncpy(testStr, "xxxxxxxxxxxxxx", sizeof(testStr)/sizeof(testStr[0]));\
+ size = u_snprintf(testStr, limit, format, value);\
+ u_austrncpy(cTestResult, testStr, sizeof(cTestResult)/sizeof(cTestResult[0]));\
+ if (size != expectedSize || strcmp(cTestResult, expectedStr) != 0) {\
+ log_err("Unexpected formatting. size=%d expectedSize=%d cTestResult=%s expectedStr=%s\n",\
+ size, expectedSize, cTestResult, expectedStr);\
+ }\
+ else {\
+ log_verbose("Got: %s\n", cTestResult);\
+ }\
+
+#endif
+
+static void TestSnprintf(void) {
+#if !UCONFIG_NO_FORMATTING
+ UChar testStr[256];
+ char cTestResult[256];
+ int32_t size;
+
+ Test_u_snprintf(0, "%d", 123, 0, "xxxxxxxxxxxxxx");
+ Test_u_snprintf(2, "%d", 123, 2, "12xxxxxxxxxxxx");
+ Test_u_snprintf(3, "%d", 123, 3, "123xxxxxxxxxxx");
+ Test_u_snprintf(4, "%d", 123, 3, "123");
+
+ Test_u_snprintf(0, "%s", "abcd", 0, "xxxxxxxxxxxxxx");
+ Test_u_snprintf(3, "%s", "abcd", 3, "abcxxxxxxxxxxx");
+ Test_u_snprintf(4, "%s", "abcd", 4, "abcdxxxxxxxxxx");
+ Test_u_snprintf(5, "%s", "abcd", 4, "abcd");
+
+ Test_u_snprintf(0, "%e", 12.34, 0, "xxxxxxxxxxxxxx");
+ Test_u_snprintf(1, "%e", 12.34, 1, "1xxxxxxxxxxxxx");
+ Test_u_snprintf(2, "%e", 12.34, 2, "1.xxxxxxxxxxxx");
+ Test_u_snprintf(3, "%e", 12.34, 3, "1.2xxxxxxxxxxx");
+ Test_u_snprintf(5, "%e", 12.34, 5, "1.234xxxxxxxxx");
+ Test_u_snprintf(6, "%e", 12.34, 6, "1.2340xxxxxxxx");
+ Test_u_snprintf(8, "%e", 12.34, 8, "1.234000xxxxxx");
+ Test_u_snprintf(9, "%e", 12.34, 9, "1.234000exxxxx");
+ Test_u_snprintf(10, "%e", 12.34, 10, "1.234000e+xxxx");
+ Test_u_snprintf(11, "%e", 12.34, 11, "1.234000e+0xxx");
+ Test_u_snprintf(13, "%e", 12.34, 13, "1.234000e+001x");
+ Test_u_snprintf(14, "%e", 12.34, 13, "1.234000e+001");
+#endif
+}
+
+#define TestSPrintFormat(uFormat, uValue, cFormat, cValue) \
+ /* Reinitialize the buffer to verify null termination works. */\
+ u_memset(uBuffer, 0x2a, sizeof(uBuffer)/sizeof(*uBuffer));\
+ memset(buffer, '*', sizeof(buffer)/sizeof(*buffer));\
+ \
+ uNumPrinted = u_sprintf(uBuffer, uFormat, uValue);\
+ u_austrncpy(compBuffer, uBuffer, sizeof(uBuffer)/sizeof(uBuffer[0]));\
+ cNumPrinted = sprintf(buffer, cFormat, cValue);\
+ if (strcmp(buffer, compBuffer) != 0) {\
+ log_err("%" uFormat " Got: \"%s\", Expected: \"%s\"\n", compBuffer, buffer);\
+ }\
+ if (cNumPrinted != uNumPrinted) {\
+ log_err("%" uFormat " number printed Got: %d, Expected: %d\n", uNumPrinted, cNumPrinted);\
+ }\
+ if (buffer[uNumPrinted+1] != '*') {\
+ log_err("%" uFormat " too much stored\n");\
+ }\
+
+static void TestSprintfFormat(void) {
+#if !UCONFIG_NO_FORMATTING
+ static const UChar abcUChars[] = {0x61,0x62,0x63,0};
+ static const char abcChars[] = "abc";
+ UChar uBuffer[256];
+ char buffer[256];
+ char compBuffer[256];
+ int32_t uNumPrinted;
+ int32_t cNumPrinted;
+
+
+ TestSPrintFormat("%8S", abcUChars, "%8s", abcChars);
+ TestSPrintFormat("%-8S", abcUChars, "%-8s", abcChars);
+ TestSPrintFormat("%.2S", abcUChars, "%.2s", abcChars); /* strlen is 3 */
+
+ TestSPrintFormat("%8s", abcChars, "%8s", abcChars);
+ TestSPrintFormat("%-8s", abcChars, "%-8s", abcChars);
+ TestSPrintFormat("%.2s", abcChars, "%.2s", abcChars); /* strlen is 3 */
+
+ TestSPrintFormat("%8c", (char)'e', "%8c", (char)'e');
+ TestSPrintFormat("%-8c", (char)'e', "%-8c", (char)'e');
+
+ TestSPrintFormat("%8C", (UChar)0x65, "%8c", (char)'e');
+ TestSPrintFormat("%-8C", (UChar)0x65, "%-8c", (char)'e');
+
+ TestSPrintFormat("%f", 1.23456789, "%f", 1.23456789);
+ TestSPrintFormat("%f", 12345.6789, "%f", 12345.6789);
+ TestSPrintFormat("%f", 123456.789, "%f", 123456.789);
+ TestSPrintFormat("%f", 1234567.89, "%f", 1234567.89);
+ TestSPrintFormat("%10f", 1.23456789, "%10f", 1.23456789);
+ TestSPrintFormat("%-10f", 1.23456789, "%-10f", 1.23456789);
+ TestSPrintFormat("%10f", 123.456789, "%10f", 123.456789);
+ TestSPrintFormat("%10.4f", 123.456789, "%10.4f", 123.456789);
+ TestSPrintFormat("%-10f", 123.456789, "%-10f", 123.456789);
+
+/* TestSPrintFormat("%g", 12345.6789, "%g", 12345.6789);
+ TestSPrintFormat("%g", 123456.789, "%g", 123456.789);
+ TestSPrintFormat("%g", 1234567.89, "%g", 1234567.89);
+ TestSPrintFormat("%G", 123456.789, "%G", 123456.789);
+ TestSPrintFormat("%G", 1234567.89, "%G", 1234567.89);*/
+ TestSPrintFormat("%10g", 1.23456789, "%10g", 1.23456789);
+ TestSPrintFormat("%10.4g", 1.23456789, "%10.4g", 1.23456789);
+ TestSPrintFormat("%-10g", 1.23456789, "%-10g", 1.23456789);
+ TestSPrintFormat("%10g", 123.456789, "%10g", 123.456789);
+ TestSPrintFormat("%-10g", 123.456789, "%-10g", 123.456789);
+
+ TestSPrintFormat("%8x", 123456, "%8x", 123456);
+ TestSPrintFormat("%-8x", 123456, "%-8x", 123456);
+ TestSPrintFormat("%08x", 123456, "%08x", 123456);
+
+ TestSPrintFormat("%8X", 123456, "%8X", 123456);
+ TestSPrintFormat("%-8X", 123456, "%-8X", 123456);
+ TestSPrintFormat("%08X", 123456, "%08X", 123456);
+ TestSPrintFormat("%#x", 123456, "%#x", 123456);
+ TestSPrintFormat("%#x", -123456, "%#x", -123456);
+
+ TestSPrintFormat("%8o", 123456, "%8o", 123456);
+ TestSPrintFormat("%-8o", 123456, "%-8o", 123456);
+ TestSPrintFormat("%08o", 123456, "%08o", 123456);
+ TestSPrintFormat("%#o", 123, "%#o", 123);
+ TestSPrintFormat("%#o", -123, "%#o", -123);
+
+ TestSPrintFormat("%8u", 123456, "%8u", 123456);
+ TestSPrintFormat("%-8u", 123456, "%-8u", 123456);
+ TestSPrintFormat("%08u", 123456, "%08u", 123456);
+ TestSPrintFormat("%8u", -123456, "%8u", -123456);
+ TestSPrintFormat("%-8u", -123456, "%-8u", -123456);
+ TestSPrintFormat("%.5u", 123456, "%.5u", 123456);
+ TestSPrintFormat("%.6u", 123456, "%.6u", 123456);
+ TestSPrintFormat("%.7u", 123456, "%.7u", 123456);
+
+ TestSPrintFormat("%8d", 123456, "%8d", 123456);
+ TestSPrintFormat("%-8d", 123456, "%-8d", 123456);
+ TestSPrintFormat("%08d", 123456, "%08d", 123456);
+ TestSPrintFormat("% d", 123456, "% d", 123456);
+ TestSPrintFormat("% d", -123456, "% d", -123456);
+
+ TestSPrintFormat("%8i", 123456, "%8i", 123456);
+ TestSPrintFormat("%-8i", 123456, "%-8i", 123456);
+ TestSPrintFormat("%08i", 123456, "%08i", 123456);
+
+ log_verbose("Get really crazy with the formatting.\n");
+
+ TestSPrintFormat("%-#12x", 123, "%-#12x", 123);
+ TestSPrintFormat("%-#12x", -123, "%-#12x", -123);
+ TestSPrintFormat("%#12x", 123, "%#12x", 123);
+ TestSPrintFormat("%#12x", -123, "%#12x", -123);
+
+ TestSPrintFormat("%-+12d", 123, "%-+12d", 123);
+ TestSPrintFormat("%-+12d", -123, "%-+12d", -123);
+ TestSPrintFormat("%- 12d", 123, "%- 12d", 123);
+ TestSPrintFormat("%- 12d", -123, "%- 12d", -123);
+ TestSPrintFormat("%+12d", 123, "%+12d", 123);
+ TestSPrintFormat("%+12d", -123, "%+12d", -123);
+ TestSPrintFormat("% 12d", 123, "% 12d", 123);
+ TestSPrintFormat("% 12d", -123, "% 12d", -123);
+ TestSPrintFormat("%12d", 123, "%12d", 123);
+ TestSPrintFormat("%12d", -123, "%12d", -123);
+ TestSPrintFormat("%.12d", 123, "%.12d", 123);
+ TestSPrintFormat("%.12d", -123, "%.12d", -123);
+
+ TestSPrintFormat("%-+12.1f", 1.234, "%-+12.1f", 1.234);
+ TestSPrintFormat("%-+12.1f", -1.234, "%-+12.1f", -1.234);
+ TestSPrintFormat("%- 12.10f", 1.234, "%- 12.10f", 1.234);
+ TestSPrintFormat("%- 12.1f", -1.234, "%- 12.1f", -1.234);
+ TestSPrintFormat("%+12.1f", 1.234, "%+12.1f", 1.234);
+ TestSPrintFormat("%+12.1f", -1.234, "%+12.1f", -1.234);
+ TestSPrintFormat("% 12.1f", 1.234, "% 12.1f", 1.234);
+ TestSPrintFormat("% 12.1f", -1.234, "% 12.1f", -1.234);
+ TestSPrintFormat("%12.1f", 1.234, "%12.1f", 1.234);
+ TestSPrintFormat("%12.1f", -1.234, "%12.1f", -1.234);
+ TestSPrintFormat("%.2f", 1.234, "%.2f", 1.234);
+ TestSPrintFormat("%.2f", -1.234, "%.2f", -1.234);
+ TestSPrintFormat("%3f", 1.234, "%3f", 1.234);
+ TestSPrintFormat("%3f", -1.234, "%3f", -1.234);
+#endif
+}
+
+#undef TestSPrintFormat
+
+static void TestStringCompatibility(void) {
+#if !UCONFIG_NO_FORMATTING
+ UChar myUString[256];
+ UChar uStringBuf[256];
+ char myString[256] = "";
+ char testBuf[256] = "";
+ int32_t num;
+
+ u_memset(myUString, 0x0a, sizeof(myUString)/ sizeof(*myUString));
+ u_memset(uStringBuf, 0x0a, sizeof(uStringBuf) / sizeof(*uStringBuf));
+
+ /* Compare against C API compatibility */
+ for (num = -STANDARD_TEST_NUM_RANGE; num < STANDARD_TEST_NUM_RANGE; num++) {
+ sprintf(testBuf, "%x", (int)num);
+ u_sprintf(uStringBuf, "%x", num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%x Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+ sprintf(testBuf, "%X", (int)num);
+ u_sprintf(uStringBuf, "%X", num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%X Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+ sprintf(testBuf, "%o", (int)num);
+ u_sprintf(uStringBuf, "%o", num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%o Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+ /* sprintf is not compatible on all platforms e.g. the iSeries*/
+ sprintf(testBuf, "%d", (int)num);
+ u_sprintf(uStringBuf, "%d", num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%d Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+ sprintf(testBuf, "%i", (int)num);
+ u_sprintf(uStringBuf, "%i", num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%i Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+ sprintf(testBuf, "%f", (double)num);
+ u_sprintf(uStringBuf, "%f", (double)num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%f Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+/* sprintf(testBuf, "%e", (double)num);
+ u_sprintf(uStringBuf, "%e", (double)num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%e Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+ sprintf(testBuf, "%E", (double)num);
+ u_sprintf(uStringBuf, "%E", (double)num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%E Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }*/
+
+ sprintf(testBuf, "%g", (double)num);
+ u_sprintf(uStringBuf, "%g", (double)num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%g Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+
+ sprintf(testBuf, "%G", (double)num);
+ u_sprintf(uStringBuf, "%G", (double)num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (strcmp(myString, testBuf) != 0) {
+ log_err("%%G Got: \"%s\", Expected: \"%s\"\n", myString, testBuf);
+ }
+ }
+
+ for (num = 0; num < 0x80; num++) {
+ testBuf[0] = (char)0xFF;
+ uStringBuf[0] = (UChar)0xfffe;
+ sprintf(testBuf, "%c", (char)num);
+ u_sprintf(uStringBuf, "%c", num);
+ u_austrncpy(myString, uStringBuf, sizeof(myString)/sizeof(myString[0]));
+ if (testBuf[0] != myString[0] || myString[0] != num) {
+ log_err("%%c Got: 0x%x, Expected: 0x%x\n", myString[0], testBuf[0]);
+ }
+ }
+#endif
+}
+
+static void TestSScanSetFormat(const char *format, const UChar *uValue, const char *cValue, UBool expectedToPass) {
+#if !UCONFIG_NO_FORMATTING
+ UChar uBuffer[256];
+ char buffer[256];
+ char compBuffer[256];
+ int32_t uNumScanned;
+ int32_t cNumScanned;
+
+ /* Reinitialize the buffer to verify null termination works. */
+ u_memset(uBuffer, 0x2a, sizeof(uBuffer)/sizeof(*uBuffer));
+ uBuffer[sizeof(uBuffer)/sizeof(*uBuffer)-1] = 0;
+ memset(buffer, '*', sizeof(buffer)/sizeof(*buffer));
+ buffer[sizeof(buffer)/sizeof(*buffer)-1] = 0;
+
+ uNumScanned = u_sscanf(uValue, format, uBuffer);
+ if (expectedToPass) {
+ u_austrncpy(compBuffer, uBuffer, sizeof(uBuffer)/sizeof(uBuffer[0]));
+ cNumScanned = sscanf(cValue, format, buffer);
+ if (strncmp(buffer, compBuffer, sizeof(uBuffer)/sizeof(uBuffer[0])) != 0) {
+ log_err("%s Got: \"%s\", Expected: \"%s\"\n", format, compBuffer, buffer);
+ }
+ if (cNumScanned != uNumScanned) {
+ log_err("%s number scanned Got: %d, Expected: %d\n", format, uNumScanned, cNumScanned);
+ }
+ if (uNumScanned > 0 && uBuffer[u_strlen(uBuffer)+1] != 0x2a) {
+ log_err("%s too much stored\n", format);
+ }
+ }
+ else {
+ if (uNumScanned != 0 || uBuffer[0] != 0x2a || uBuffer[1] != 0x2a) {
+ log_err("%s too much stored on a failure\n", format);
+ }
+ }
+#endif
+}
+
+static void TestSScanset(void) {
+#if !UCONFIG_NO_FORMATTING
+ static const UChar abcUChars[] = {0x61,0x62,0x63,0x63,0x64,0x65,0x66,0x67,0};
+ static const char abcChars[] = "abccdefg";
+
+ TestSScanSetFormat("%[bc]S", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[cb]S", abcUChars, abcChars, TRUE);
+
+ TestSScanSetFormat("%[ab]S", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[ba]S", abcUChars, abcChars, TRUE);
+
+ TestSScanSetFormat("%[ab]", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[ba]", abcUChars, abcChars, TRUE);
+
+ TestSScanSetFormat("%[abcdefgh]", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[;hgfedcba]", abcUChars, abcChars, TRUE);
+
+ TestSScanSetFormat("%[^a]", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[^e]", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[^ed]", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[^dc]", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%[^e] ", abcUChars, abcChars, TRUE);
+
+ TestSScanSetFormat("%1[ab] ", abcUChars, abcChars, TRUE);
+ TestSScanSetFormat("%2[^f]", abcUChars, abcChars, TRUE);
+
+ TestSScanSetFormat("%[qrst]", abcUChars, abcChars, TRUE);
+
+ /* Extra long string for testing */
+ TestSScanSetFormat(" %[qrst]",
+ abcUChars, abcChars, TRUE);
+
+ TestSScanSetFormat("%[a-]", abcUChars, abcChars, TRUE);
+
+ /* Bad format */
+ TestSScanSetFormat("%[a", abcUChars, abcChars, FALSE);
+ TestSScanSetFormat("%[f-a]", abcUChars, abcChars, FALSE);
+ TestSScanSetFormat("%[c-a]", abcUChars, abcChars, FALSE);
+ /* The following is not deterministic on Windows */
+/* TestSScanSetFormat("%[a-", abcUChars, abcChars);*/
+
+ /* TODO: Need to specify precision with a "*" */
+#endif
+}
+
+static void TestBadSScanfFormat(const char *format, const UChar *uValue, const char *cValue) {
+#if !UCONFIG_NO_FORMATTING
+ UChar uBuffer[256];
+ int32_t uNumScanned;
+
+ /* Reinitialize the buffer to verify null termination works. */
+ u_memset(uBuffer, 0x2a, sizeof(uBuffer)/sizeof(*uBuffer));
+ uBuffer[sizeof(uBuffer)/sizeof(*uBuffer)-1] = 0;
+
+ uNumScanned = u_sscanf(uValue, format, uBuffer);
+ if (uNumScanned != 0 || uBuffer[0] != 0x2a || uBuffer[1] != 0x2a) {
+ log_err("%s too much stored on a failure\n", format);
+ }
+#endif
+}
+
+static void TestBadScanfFormat(void) {
+#if !UCONFIG_NO_FORMATTING
+ static const UChar abcUChars[] = {0x61,0x62,0x63,0x63,0x64,0x65,0x66,0x67,0};
+ static const char abcChars[] = "abccdefg";
+
+ TestBadSScanfFormat("%[] ", abcUChars, abcChars);
+#endif
+}
+
+static void Test_u_vfprintf(const char *expectedResult, const char *format, ...) {
+#if !UCONFIG_NO_FORMATTING
+ UChar uBuffer[256];
+ UChar uBuffer2[256];
+ va_list ap;
+ int32_t count;
+
+ va_start(ap, format);
+ count = u_vsprintf(uBuffer, format, ap);
+ va_end(ap);
+ u_uastrcpy(uBuffer2, expectedResult);
+ if (u_strcmp(uBuffer, uBuffer2) != 0) {
+ log_err("Got two different results for \"%s\" expected \"%s\"\n", format, expectedResult);
+ }
+
+ u_uastrcpy(uBuffer2, format);
+ va_start(ap, format);
+ count = u_vsprintf_u(uBuffer, uBuffer2, ap);
+ va_end(ap);
+ u_uastrcpy(uBuffer2, expectedResult);
+ if (u_strcmp(uBuffer, uBuffer2) != 0) {
+ log_err("Got two different results for \"%s\" expected \"%s\"\n", format, expectedResult);
+ }
+#endif
+}
+
+static void TestVargs(void) {
+#if !UCONFIG_NO_FORMATTING
+ Test_u_vfprintf("8 9 a B 8.9", "%d %u %x %X %.1f", 8, 9, 10, 11, 8.9);
+#endif
+}
+
+static void TestCount(void) {
+#if !UCONFIG_NO_FORMATTING
+ static const UChar x15[] = { 0x78, 0x31, 0x35, 0 };
+ UChar testStr[16];
+ UChar character;
+ int16_t i16 = -1;
+ int32_t i32 = -1, actual_count, actual_result;
+ int64_t i64 = -1;
+ u_uastrcpy(testStr, "1233456789");
+ if (u_sscanf(testStr, "%*3[123]%n%*[1-9]", &i32) != 0) {
+ log_err("test 1: scanf did not return 0\n");
+ }
+ if (i32 != 3) {
+ log_err("test 1: scanf returned %hd instead of 3\n", i32);
+ }
+ if (u_sscanf(testStr, "%*4[123]%hn%*[1-9]", &i16) != 0) {
+ log_err("test 2: scanf did not return 0\n");
+ }
+ if (i16 != 4) {
+ log_err("test 2: scanf returned %d instead of 4\n", i16);
+ }
+ if (u_sscanf(testStr, "%*[123]%*[1-9]%lln", &i64) != 0) {
+ log_err("test 3: scanf did not return 0\n");
+ }
+ if (i64 != 10) {
+ log_err("test 3: scanf did not return 10\n", i64);
+ }
+ actual_result = u_sscanf(x15, "%C%d%n", &character, &i32, &actual_count);
+ if (actual_result != 2) {
+ log_err("scanf should return 2, but returned %d\n", actual_result);
+ }
+ if (character != 0x78) {
+ log_err("scanf should return 0x78 for the character, but returned %X\n", character);
+ }
+ if (i32 != 15) {
+ log_err("scanf should return 15 for the number, but returned %d\n", i32);
+ }
+ if (actual_count != 3) {
+ log_err("scanf should return 3 for actual_count, but returned %d\n", actual_count);
+ }
+#endif
+}
+
+U_CFUNC void
+addStringTest(TestNode** root) {
+#if !UCONFIG_NO_FORMATTING
+ addTest(root, &TestString, "string/TestString");
+ addTest(root, &TestLocalizedString, "string/TestLocalizedString");
+ addTest(root, &TestSprintfFormat, "string/TestSprintfFormat");
+ addTest(root, &TestSnprintf, "string/TestSnprintf");
+ addTest(root, &TestSScanset, "string/TestSScanset");
+ addTest(root, &TestStringCompatibility, "string/TestStringCompatibility");
+ addTest(root, &TestBadScanfFormat, "string/TestBadScanfFormat");
+ addTest(root, &TestVargs, "string/TestVargs");
+ addTest(root, &TestCount, "string/TestCount");
+#endif
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/iotest/trnstst.c b/Build/source/libs/icu/icu-xetex/test/iotest/trnstst.c
new file mode 100644
index 00000000000..8f6101323f8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/iotest/trnstst.c
@@ -0,0 +1,316 @@
+/*
+**********************************************************************
+* Copyright (C) 2005-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: strtst.c
+* created by: George Rhoten
+*/
+
+#include "iotest.h"
+#include "unicode/ustdio.h"
+#include "unicode/utrans.h"
+#include "unicode/ustring.h"
+
+static void TestTranslitOps(void)
+{
+#if !UCONFIG_NO_TRANSLITERATION
+ UFILE *f;
+ UErrorCode err = U_ZERO_ERROR;
+ UTransliterator *a = NULL, *b = NULL, *c = NULL;
+
+ log_verbose("opening a transliterator and UFILE for testing\n");
+
+ f = u_fopen(STANDARD_TEST_FILE, "w", "en_US_POSIX", NULL);
+ if(f == NULL)
+ {
+ log_err("Couldn't open test file for writing\n");
+ return;
+ }
+
+ a = utrans_open("Latin-Greek", UTRANS_FORWARD, NULL, -1, NULL, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Error opening transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+
+ log_verbose("setting a transliterator\n");
+ b = u_fsettransliterator(f, U_WRITE, a, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Error setting transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ if(b != NULL)
+ {
+ log_err("Error, a transliterator was already set!\n");
+ }
+
+ b = u_fsettransliterator(NULL, U_WRITE, a, &err);
+ if(err != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ log_err("Error setting transliterator on NULL file err=%s\n", u_errorName(err));
+ }
+
+ if(b != a)
+ {
+ log_err("Error getting the same transliterator was not returned on NULL file\n");
+ }
+
+ err = U_FILE_ACCESS_ERROR;
+ b = u_fsettransliterator(f, U_WRITE, a, &err);
+ if(err != U_FILE_ACCESS_ERROR)
+ {
+ log_err("Error setting transliterator on error status err=%s\n", u_errorName(err));
+ }
+
+ if(b != a)
+ {
+ log_err("Error getting the same transliterator on error status\n");
+ }
+ err = U_ZERO_ERROR;
+
+
+ log_verbose("un-setting transliterator (setting to null)\n");
+ c = u_fsettransliterator(f, U_WRITE, NULL, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err setting transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ if(c != a)
+ {
+ log_err("Err, transliterator that came back was not the original one.\n");
+ }
+
+ log_verbose("Trying to set read transliterator (should fail)\n");
+ b = u_fsettransliterator(f, U_READ, NULL, &err);
+ if(err != U_UNSUPPORTED_ERROR)
+ {
+ log_err("Should have U_UNSUPPORTED_ERROR setting Read transliterator but got %s - REVISIT AND UPDATE TEST\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+ else
+ {
+ log_verbose("Got %s error (expected) setting READ transliterator.\n", u_errorName(err));
+ err = U_ZERO_ERROR;
+ }
+
+
+ utrans_close(c);
+ u_fclose(f);
+#endif
+}
+
+static void TestTranslitFileOut(void)
+{
+#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_TRANSLITERATION
+ UFILE *f;
+ UErrorCode err = U_ZERO_ERROR;
+ UTransliterator *a = NULL, *b = NULL, *c = NULL;
+ FILE *infile;
+ UChar compare[] = { 0xfeff, 0x03a3, 0x03c4, 0x03b5, 0x03c6, 0x1f00, 0x03bd, 0x03bf, 0x03c2, 0x043C, 0x0000 };
+ UChar ubuf[256];
+ int len;
+
+ log_verbose("opening a transliterator and UFILE for testing\n");
+
+ f = u_fopen(STANDARD_TEST_FILE, "w", "en_US_POSIX", "utf-16");
+ if(f == NULL)
+ {
+ log_err("Couldn't open test file for writing\n");
+ return;
+ }
+
+ a = utrans_open("Latin-Greek", UTRANS_FORWARD, NULL, -1, NULL, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err opening transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ log_verbose("setting a transliterator\n");
+ b = u_fsettransliterator(f, U_WRITE, a, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err setting transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ if(b != NULL)
+ {
+ log_err("Err, a transliterator was already set!\n");
+ }
+
+ u_fprintf(f, "Stephanos");
+
+ c = utrans_open("Latin-Cyrillic", UTRANS_FORWARD, NULL, -1, NULL, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err opening transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ log_verbose("setting a transliterator\n");
+ b = u_fsettransliterator(f, U_WRITE, c, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err setting transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ if(b != a)
+ {
+ log_err("Error: a different transliterator was returned!\n");
+ }
+ utrans_close(b);
+
+ u_fprintf(f, "m");
+
+ u_fclose(f);
+
+ log_verbose("Re reading test file to verify transliteration\n");
+ infile = fopen(STANDARD_TEST_FILE, "rb");
+ if(infile == NULL)
+ {
+ log_err("Couldn't reopen test file\n");
+ return;
+ }
+
+ len=fread(ubuf, sizeof(UChar), u_strlen(compare), infile);
+ log_verbose("Read %d UChars\n", len);
+ if(len != u_strlen(compare))
+ {
+ log_err("Wanted %d UChars from file, got %d\n", u_strlen(compare), len);
+ }
+ ubuf[len]=0;
+
+ if(u_strlen(compare) != u_strlen(ubuf))
+ {
+ log_err("Wanted %d UChars from file, but u_strlen() returns %d\n", u_strlen(compare), len);
+ }
+
+ if(u_strcmp(compare, ubuf))
+ {
+ log_err("Read string doesn't match expected.\n");
+ }
+ else
+ {
+ log_verbose("Read string matches expected.\n");
+ }
+
+ fclose(infile);
+#endif
+#endif
+}
+
+static void TestTranslitStringOut(void)
+{
+#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_TRANSLITERATION
+ UFILE *f;
+ UErrorCode err = U_ZERO_ERROR;
+ UTransliterator *a = NULL, *b = NULL, *c = NULL;
+ UChar compare[] = { 0x03a3, 0x03c4, 0x03b5, 0x03c6, 0x1f00, 0x03bd, 0x03bf, 0x03c2, 0x043C, 0x0000 };
+ UChar ubuf[256];
+
+ log_verbose("opening a transliterator and UFILE for testing\n");
+
+ f = u_fstropen(ubuf, sizeof(ubuf)/sizeof(ubuf[0]), "en_US_POSIX");
+ if(f == NULL)
+ {
+ log_err("Couldn't open test file for writing\n");
+ return;
+ }
+
+ a = utrans_open("Latin-Greek", UTRANS_FORWARD, NULL, -1, NULL, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err opening transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ log_verbose("setting a transliterator\n");
+ b = u_fsettransliterator(f, U_WRITE, a, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err setting transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ if(b != NULL)
+ {
+ log_err("Err, a transliterator was already set!\n");
+ }
+
+ u_fprintf(f, "Stephanos");
+
+ c = utrans_open("Latin-Cyrillic", UTRANS_FORWARD, NULL, -1, NULL, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err opening transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ log_verbose("setting a transliterator\n");
+ b = u_fsettransliterator(f, U_WRITE, c, &err);
+ if(U_FAILURE(err))
+ {
+ log_err("Err setting transliterator %s\n", u_errorName(err));
+ u_fclose(f);
+ return;
+ }
+
+ if(b != a)
+ {
+ log_err("Error: a different transliterator was returned!\n");
+ }
+ utrans_close(b);
+
+ u_fprintf(f, "m");
+
+ u_fclose(f);
+
+ if(u_strlen(compare) != u_strlen(ubuf))
+ {
+ log_err("Wanted %d UChars from file, but u_strlen() returns %d\n", u_strlen(compare), u_strlen(ubuf));
+ }
+
+ if(u_strcmp(compare, ubuf))
+ {
+ log_err("Read string doesn't match expected.\n");
+ }
+ else
+ {
+ log_verbose("Read string matches expected.\n");
+ }
+#endif
+#endif
+}
+
+U_CFUNC void
+addTranslitTest(TestNode** root) {
+#if !UCONFIG_NO_TRANSLITERATION
+ addTest(root, &TestTranslitOps, "translit/ops");
+#if !UCONFIG_NO_FORMATTING
+ addTest(root, &TestTranslitFileOut, "translit/fileOut");
+ addTest(root, &TestTranslitStringOut, "translit/stringOut");
+#endif
+#endif
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/FontObject.cpp b/Build/source/libs/icu/icu-xetex/test/letest/FontObject.cpp
new file mode 100644
index 00000000000..1f8370bdecd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/FontObject.cpp
@@ -0,0 +1,240 @@
+/***************************************************************************
+*
+* Copyright (C) 1998-2002, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+************************************************************************/
+
+#include <stdio.h>
+
+#include "LETypes.h"
+#include "FontObject.h"
+#include "LESwaps.h"
+
+FontObject::FontObject(char *fileName)
+ : directory(NULL), numTables(0), searchRange(0),entrySelector(0),
+ cmapTable(NULL), cmSegCount(0), cmSearchRange(0), cmEntrySelector(0),
+ cmEndCodes(NULL), cmStartCodes(NULL), cmIdDelta(0), cmIdRangeOffset(0),
+ headTable(NULL), hmtxTable(NULL), numGlyphs(0), numOfLongHorMetrics(0), file(NULL)
+{
+ file = fopen(fileName, "rb");
+
+ if (file == NULL) {
+ printf("?? Couldn't open %s", fileName);
+ return;
+ }
+
+ SFNTDirectory tempDir;
+
+ fread(&tempDir, sizeof tempDir, 1, file);
+
+ numTables = SWAPW(tempDir.numTables);
+ searchRange = SWAPW(tempDir.searchRange) >> 4;
+ entrySelector = SWAPW(tempDir.entrySelector);
+ rangeShift = SWAPW(tempDir.rangeShift) >> 4;
+
+ int dirSize = sizeof tempDir + ((numTables - ANY_NUMBER) * sizeof(DirectoryEntry));
+
+ directory = (SFNTDirectory *) new char[dirSize];
+
+ fseek(file, 0L, SEEK_SET);
+ fread(directory, sizeof(char), dirSize, file);
+
+ initUnicodeCMAP();
+}
+
+FontObject::~FontObject()
+{
+ fclose(file);
+ delete[] directory;
+ delete[] cmapTable;
+ delete[] headTable;
+ delete[] hmtxTable;
+}
+
+void FontObject::deleteTable(void *table)
+{
+ delete[] (char *) table;
+}
+
+DirectoryEntry *FontObject::findTable(LETag tag)
+{
+ le_uint16 table = 0;
+ le_uint16 probe = 1 << entrySelector;
+
+ if (SWAPL(directory->tableDirectory[rangeShift].tag) <= tag) {
+ table = rangeShift;
+ }
+
+ while (probe > (1 << 0)) {
+ probe >>= 1;
+
+ if (SWAPL(directory->tableDirectory[table + probe].tag) <= tag) {
+ table += probe;
+ }
+ }
+
+ if (SWAPL(directory->tableDirectory[table].tag) == tag) {
+ return &directory->tableDirectory[table];
+ }
+
+ return NULL;
+}
+
+void *FontObject::readTable(LETag tag, le_uint32 *length)
+{
+ DirectoryEntry *entry = findTable(tag);
+
+ if (entry == NULL) {
+ *length = 0;
+ return NULL;
+ }
+
+ *length = SWAPL(entry->length);
+
+ void *table = new char[*length];
+
+ fseek(file, SWAPL(entry->offset), SEEK_SET);
+ fread(table, sizeof(char), *length, file);
+
+ return table;
+}
+
+CMAPEncodingSubtable *FontObject::findCMAP(le_uint16 platformID, le_uint16 platformSpecificID)
+{
+ LETag cmapTag = 0x636D6170; // 'cmap'
+
+ if (cmapTable == NULL) {
+ le_uint32 length;
+
+ cmapTable = (CMAPTable *) readTable(cmapTag, &length);
+ }
+
+ if (cmapTable != NULL) {
+ le_uint16 i;
+ le_uint16 nSubtables = SWAPW(cmapTable->numberSubtables);
+
+
+ for (i = 0; i < nSubtables; i += 1) {
+ CMAPEncodingSubtableHeader *esh = &cmapTable->encodingSubtableHeaders[i];
+
+ if (SWAPW(esh->platformID) == platformID &&
+ SWAPW(esh->platformSpecificID) == platformSpecificID) {
+ return (CMAPEncodingSubtable *) ((char *) cmapTable + SWAPL(esh->encodingOffset));
+ }
+ }
+ }
+
+ return NULL;
+}
+
+void FontObject::initUnicodeCMAP()
+{
+ CMAPEncodingSubtable *encodingSubtable = findCMAP(3, 1);
+
+ if (encodingSubtable == 0 ||
+ SWAPW(encodingSubtable->format) != 4) {
+ printf("Can't find unicode 'cmap'");
+ return;
+ }
+
+ CMAPFormat4Encoding *header = (CMAPFormat4Encoding *) encodingSubtable;
+
+ cmSegCount = SWAPW(header->segCountX2) / 2;
+ cmSearchRange = SWAPW(header->searchRange);
+ cmEntrySelector = SWAPW(header->entrySelector);
+ cmRangeShift = SWAPW(header->rangeShift) / 2;
+ cmEndCodes = &header->endCodes[0];
+ cmStartCodes = &header->endCodes[cmSegCount + 1]; // + 1 for reservedPad...
+ cmIdDelta = &cmStartCodes[cmSegCount];
+ cmIdRangeOffset = &cmIdDelta[cmSegCount];
+}
+
+LEGlyphID FontObject::unicodeToGlyph(LEUnicode32 unicode32)
+{
+ if (unicode32 >= 0x10000) {
+ return 0;
+ }
+
+ LEUnicode16 unicode = (LEUnicode16) unicode32;
+ le_uint16 index = 0;
+ le_uint16 probe = 1 << cmEntrySelector;
+ LEGlyphID result = 0;
+
+ if (SWAPW(cmStartCodes[cmRangeShift]) <= unicode) {
+ index = cmRangeShift;
+ }
+
+ while (probe > (1 << 0)) {
+ probe >>= 1;
+
+ if (SWAPW(cmStartCodes[index + probe]) <= unicode) {
+ index += probe;
+ }
+ }
+
+ if (unicode >= SWAPW(cmStartCodes[index]) && unicode <= SWAPW(cmEndCodes[index])) {
+ if (cmIdRangeOffset[index] == 0) {
+ result = (LEGlyphID) unicode;
+ } else {
+ le_uint16 offset = unicode - SWAPW(cmStartCodes[index]);
+ le_uint16 rangeOffset = SWAPW(cmIdRangeOffset[index]);
+ le_uint16 *glyphIndexTable = (le_uint16 *) ((char *) &cmIdRangeOffset[index] + rangeOffset);
+
+ result = SWAPW(glyphIndexTable[offset]);
+ }
+
+ result += SWAPW(cmIdDelta[index]);
+ } else {
+ result = 0;
+ }
+
+ return result;
+}
+
+le_uint16 FontObject::getUnitsPerEM()
+{
+ if (headTable == NULL) {
+ LETag headTag = 0x68656164; // 'head'
+ le_uint32 length;
+
+ headTable = (HEADTable *) readTable(headTag, &length);
+ }
+
+ return SWAPW(headTable->unitsPerEm);
+}
+
+le_uint16 FontObject::getGlyphAdvance(LEGlyphID glyph)
+{
+ if (hmtxTable == NULL) {
+ LETag maxpTag = 0x6D617870; // 'maxp'
+ LETag hheaTag = 0x68686561; // 'hhea'
+ LETag hmtxTag = 0x686D7478; // 'hmtx'
+ le_uint32 length;
+ HHEATable *hheaTable;
+ MAXPTable *maxpTable = (MAXPTable *) readTable(maxpTag, &length);
+
+ numGlyphs = SWAPW(maxpTable->numGlyphs);
+ deleteTable(maxpTable);
+
+ hheaTable = (HHEATable *) readTable(hheaTag, &length);
+ numOfLongHorMetrics = SWAPW(hheaTable->numOfLongHorMetrics);
+ deleteTable(hheaTable);
+
+ hmtxTable = (HMTXTable *) readTable(hmtxTag, &length);
+ }
+
+ le_uint16 index = glyph;
+
+ if (glyph >= numGlyphs) {
+ return 0;
+ }
+
+ if (glyph >= numOfLongHorMetrics) {
+ index = numOfLongHorMetrics - 1;
+ }
+
+ return SWAPW(hmtxTable->hMetrics[index].advanceWidth);
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/FontObject.h b/Build/source/libs/icu/icu-xetex/test/letest/FontObject.h
new file mode 100644
index 00000000000..76af46b5ee5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/FontObject.h
@@ -0,0 +1,235 @@
+/***************************************************************************
+*
+* Copyright (C) 1998-2002, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+************************************************************************/
+
+
+#ifndef __FONTOBJECT_H
+#define __FONTOBJECT_H
+
+#include <stdio.h>
+
+#include "LETypes.h"
+
+
+#ifndef ANY_NUMBER
+#define ANY_NUMBER 1
+#endif
+
+struct DirectoryEntry
+{
+ le_uint32 tag;
+ le_uint32 checksum;
+ le_uint32 offset;
+ le_uint32 length;
+};
+
+struct SFNTDirectory
+{
+ le_uint32 scalerType;
+ le_uint16 numTables;
+ le_uint16 searchRange;
+ le_uint16 entrySelector;
+ le_uint16 rangeShift;
+ DirectoryEntry tableDirectory[ANY_NUMBER];
+};
+
+
+struct CMAPEncodingSubtableHeader
+{
+ le_uint16 platformID;
+ le_uint16 platformSpecificID;
+ le_uint32 encodingOffset;
+};
+
+struct CMAPTable
+{
+ le_uint16 version;
+ le_uint16 numberSubtables;
+ CMAPEncodingSubtableHeader encodingSubtableHeaders[ANY_NUMBER];
+};
+
+struct CMAPEncodingSubtable
+{
+ le_uint16 format;
+ le_uint16 length;
+ le_uint16 language;
+};
+
+struct CMAPFormat0Encoding : CMAPEncodingSubtable
+{
+ le_uint8 glyphIndexArray[256];
+};
+
+struct CMAPFormat2Subheader
+{
+ le_uint16 firstCode;
+ le_uint16 entryCount;
+ le_int16 idDelta;
+ le_uint16 idRangeOffset;
+};
+
+struct CMAPFormat2Encoding : CMAPEncodingSubtable
+{
+ le_uint16 subHeadKeys[256];
+ CMAPFormat2Subheader subheaders[ANY_NUMBER];
+};
+
+struct CMAPFormat4Encoding : CMAPEncodingSubtable
+{
+ le_uint16 segCountX2;
+ le_uint16 searchRange;
+ le_uint16 entrySelector;
+ le_uint16 rangeShift;
+ le_uint16 endCodes[ANY_NUMBER];
+// le_uint16 reservedPad;
+// le_uint16 startCodes[ANY_NUMBER];
+// le_uint16 idDelta[ANY_NUMBER];
+// le_uint16 idRangeOffset[ANY_NUMBER];
+// le_uint16 glyphIndexArray[ANY_NUMBER];
+};
+
+struct CMAPFormat6Encoding : CMAPEncodingSubtable
+{
+ le_uint16 firstCode;
+ le_uint16 entryCount;
+ le_uint16 glyphIndexArray[ANY_NUMBER];
+};
+
+typedef le_int32 fixed;
+
+struct BigDate
+{
+ le_uint32 bc;
+ le_uint32 ad;
+};
+
+struct HEADTable
+{
+ fixed version;
+ fixed fontRevision;
+ le_uint32 checksumAdjustment;
+ le_uint32 magicNumber;
+ le_uint16 flags;
+ le_uint16 unitsPerEm;
+ BigDate created;
+ BigDate modified;
+ le_int16 xMin;
+ le_int16 yMin;
+ le_int16 xMax;
+ le_int16 yMax;
+ le_int16 lowestRecPPEM;
+ le_int16 fontDirectionHint;
+ le_int16 indexToLocFormat;
+ le_int16 glyphDataFormat;
+};
+
+struct MAXPTable
+{
+ fixed version;
+ le_uint16 numGlyphs;
+ le_uint16 maxPoints;
+ le_uint16 maxContours;
+ le_uint16 maxComponentPoints;
+ le_uint16 maxComponentContours;
+ le_uint16 maxZones;
+ le_uint16 maxTwilightPoints;
+ le_uint16 maxStorage;
+ le_uint16 maxFunctionDefs;
+ le_uint16 maxInstructionDefs;
+ le_uint16 maxStackElements;
+ le_uint16 maxSizeOfInstructions;
+ le_uint16 maxComponentElements;
+ le_uint16 maxComponentDepth;
+};
+
+struct HHEATable
+{
+ fixed version;
+ le_int16 ascent;
+ le_int16 descent;
+ le_int16 lineGap;
+ le_uint16 advanceWidthMax;
+ le_int16 minLeftSideBearing;
+ le_int16 minRightSideBearing;
+ le_int16 xMaxExtent;
+ le_int16 caretSlopeRise;
+ le_int16 caretSlopeRun;
+ le_int16 caretOffset;
+ le_int16 reserved1;
+ le_int16 reserved2;
+ le_int16 reserved3;
+ le_int16 reserved4;
+ le_int16 metricDataFormat;
+ le_uint16 numOfLongHorMetrics;
+};
+
+struct LongHorMetric
+{
+ le_uint16 advanceWidth;
+ le_int16 leftSideBearing;
+};
+
+struct HMTXTable
+{
+ LongHorMetric hMetrics[ANY_NUMBER]; // ANY_NUMBER = numOfLongHorMetrics from hhea table
+// le_int16 leftSideBearing[ANY_NUMBER]; // ANY_NUMBER = numGlyphs - numOfLongHorMetrics
+};
+
+class FontObject
+{
+public:
+ FontObject(char *fontName);
+ ~FontObject();
+
+ void *readTable(LETag tag, le_uint32 *length);
+ void deleteTable(void *table);
+
+ LEGlyphID unicodeToGlyph(LEUnicode32 unicode);
+
+#if 0
+ le_uint32 unicodesToGlyphs(LEUnicode *chars, le_uint32 nChars, LEGlyphID *glyphs,
+ le_uint32 *charIndices, le_bool rightToLeft);
+#endif
+
+ le_uint16 getUnitsPerEM();
+
+ le_uint16 getGlyphAdvance(LEGlyphID glyph);
+
+private:
+ FontObject();
+
+ DirectoryEntry *findTable(LETag tag);
+ CMAPEncodingSubtable *findCMAP(le_uint16 platformID, le_uint16 platformSpecificID);
+ void initUnicodeCMAP();
+
+ SFNTDirectory *directory;
+ le_uint16 numTables;
+ le_uint16 searchRange;
+ le_uint16 entrySelector;
+ le_uint16 rangeShift;
+
+ CMAPTable *cmapTable;
+ le_uint16 cmSegCount;
+ le_uint16 cmSearchRange;
+ le_uint16 cmEntrySelector;
+ le_uint16 cmRangeShift;
+ le_uint16 *cmEndCodes;
+ le_uint16 *cmStartCodes;
+ le_uint16 *cmIdDelta;
+ le_uint16 *cmIdRangeOffset;
+
+ HEADTable *headTable;
+
+ HMTXTable *hmtxTable;
+ le_uint16 numGlyphs;
+ le_uint16 numOfLongHorMetrics;
+
+ FILE *file;
+
+};
+
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.cpp b/Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.cpp
new file mode 100644
index 00000000000..cf28de2228b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.cpp
@@ -0,0 +1,86 @@
+/*
+ **********************************************************************
+ * Copyright (C) 2003-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ */
+
+#include "layout/LETypes.h"
+
+#include "letest.h"
+#include "FontTableCache.h"
+
+#define TABLE_CACHE_INIT 5
+#define TABLE_CACHE_GROW 5
+
+struct FontTableCacheEntry
+{
+ LETag tag;
+ const void *table;
+};
+
+FontTableCache::FontTableCache()
+ : fTableCacheCurr(0), fTableCacheSize(TABLE_CACHE_INIT)
+{
+ fTableCache = NEW_ARRAY(FontTableCacheEntry, fTableCacheSize);
+
+ if (fTableCache == NULL) {
+ fTableCacheSize = 0;
+ return;
+ }
+
+ for (int i = 0; i < fTableCacheSize; i += 1) {
+ fTableCache[i].tag = 0;
+ fTableCache[i].table = NULL;
+ }
+}
+
+FontTableCache::~FontTableCache()
+{
+ for (int i = fTableCacheCurr - 1; i >= 0; i -= 1) {
+ DELETE_ARRAY(fTableCache[i].table);
+
+ fTableCache[i].tag = 0;
+ fTableCache[i].table = NULL;
+ }
+
+ fTableCacheCurr = 0;
+
+ DELETE_ARRAY(fTableCache);
+}
+
+const void *FontTableCache::find(LETag tableTag) const
+{
+ for (int i = 0; i < fTableCacheCurr; i += 1) {
+ if (fTableCache[i].tag == tableTag) {
+ return fTableCache[i].table;
+ }
+ }
+
+ const void *table = readFontTable(tableTag);
+
+ ((FontTableCache *) this)->add(tableTag, table);
+
+ return table;
+}
+
+void FontTableCache::add(LETag tableTag, const void *table)
+{
+ if (fTableCacheCurr >= fTableCacheSize) {
+ le_int32 newSize = fTableCacheSize + TABLE_CACHE_GROW;
+
+ fTableCache = (FontTableCacheEntry *) GROW_ARRAY(fTableCache, newSize);
+
+ for (le_int32 i = fTableCacheSize; i < newSize; i += 1) {
+ fTableCache[i].tag = 0;
+ fTableCache[i].table = NULL;
+ }
+
+ fTableCacheSize = newSize;
+ }
+
+ fTableCache[fTableCacheCurr].tag = tableTag;
+ fTableCache[fTableCacheCurr].table = table;
+
+ fTableCacheCurr += 1;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.h b/Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.h
new file mode 100644
index 00000000000..088d7aa7948
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/FontTableCache.h
@@ -0,0 +1,40 @@
+/*
+ **********************************************************************
+ * Copyright (C) 2003-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ */
+
+#ifndef __FONTTABLECACHE_H
+
+#define __FONTTABLECACHE_H
+
+#include "layout/LETypes.h"
+
+U_NAMESPACE_USE
+
+struct FontTableCacheEntry;
+
+class FontTableCache
+{
+public:
+ FontTableCache();
+
+ virtual ~FontTableCache();
+
+ const void *find(LETag tableTag) const;
+
+protected:
+ virtual const void *readFontTable(LETag tableTag) const = 0;
+
+private:
+
+ void add(LETag tableTag, const void *table);
+
+ FontTableCacheEntry *fTableCache;
+ le_int32 fTableCacheCurr;
+ le_int32 fTableCacheSize;
+};
+
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/Makefile.in b/Build/source/libs/icu/icu-xetex/test/letest/Makefile.in
new file mode 100644
index 00000000000..62138995d6d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/Makefile.in
@@ -0,0 +1,105 @@
+## Makefile.in for ICU - test/letest
+## Copyright (c) 2001-2007, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+include $(top_builddir)/icudefs.mk
+
+## Platform-specific setup
+include @platform_make_fragment@
+
+## Build directory information
+subdir = test/letest
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TESTTARGET = letest
+GENTARGET = gendata
+
+BUILDDIR := $(CURR_SRCCODE_FULL_DIR)/../../
+# Simplify the path for Unix
+BUILDDIR := $(BUILDDIR:test/cintltst/../../=)
+# Simplify the path for Windows
+BUILDDIR := $(BUILDDIR:test\\cintltst/../../=)
+# Simplify the path for Windows 98
+BUILDDIR := $(BUILDDIR:TEST\\CINTLTST/../../=)
+
+ifneq ($(top_builddir),$(top_srcdir))
+CPPFLAGS += -I$(top_builddir)/common
+endif
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/layout -I$(top_srcdir)/layoutex -I$(top_srcdir)
+DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
+LIBS = $(LIBICULX) $(LIBICULE) $(LIBICUUC) $(LIBICUI18N) $(LIBCTESTFW) $(LIBICUTOOLUTIL) @LIBS@ @LIB_M@
+
+COMMONOBJECTS = letsutil.o cmaps.o FontTableCache.o SimpleFontInstance.o PortableFontInstance.o
+TESTOBJECTS = letest.o
+CTESTOBJECTS = cfonts.o xmlreader.o cletest.o
+GENOBJECTS = gendata.o
+
+OBJECTS = $(COMMONOBJECTS) $(TESTOBJECTS) $(GENOBJECTS)
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TESTTARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(COMMONOBJECTS) $(TESTOBJECTS) $(CTESTOBJECTS) $(GENOBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+ $(INVOKE) ./$(TESTTARGET)
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TESTTARGET) : $(COMMONOBJECTS) $(TESTOBJECTS) $(CTESTOBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+$(GENTARGET) : $(COMMONOBJECTS) $(GENOBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.cpp b/Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.cpp
new file mode 100644
index 00000000000..db5bf2fd16d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.cpp
@@ -0,0 +1,441 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2008, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: PortableFontInstance.cpp
+ *
+ * created on: 11/22/1999
+ * created by: Eric R. Mader
+ */
+
+#include <stdio.h>
+
+#include "layout/LETypes.h"
+#include "layout/LEFontInstance.h"
+#include "layout/LESwaps.h"
+
+#include "PortableFontInstance.h"
+
+#include "letest.h"
+#include "sfnt.h"
+
+#include <string.h>
+
+//
+// Finds the high bit by binary searching
+// through the bits in n.
+//
+le_int8 PortableFontInstance::highBit(le_int32 value)
+{
+ if (value <= 0) {
+ return -32;
+ }
+
+ le_uint8 bit = 0;
+
+ if (value >= 1 << 16) {
+ value >>= 16;
+ bit += 16;
+ }
+
+ if (value >= 1 << 8) {
+ value >>= 8;
+ bit += 8;
+ }
+
+ if (value >= 1 << 4) {
+ value >>= 4;
+ bit += 4;
+ }
+
+ if (value >= 1 << 2) {
+ value >>= 2;
+ bit += 2;
+ }
+
+ if (value >= 1 << 1) {
+ value >>= 1;
+ bit += 1;
+ }
+
+ return bit;
+}
+
+PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize, LEErrorCode &status)
+ : fFile(NULL), fPointSize(pointSize), fUnitsPerEM(0), fFontChecksum(0), fAscent(0), fDescent(0), fLeading(0),
+ fDirectory(NULL), fNAMETable(NULL), fNameCount(0), fNameStringOffset(0), fCMAPMapper(NULL), fHMTXTable(NULL), fNumGlyphs(0), fNumLongHorMetrics(0)
+{
+ if (LE_FAILURE(status)) {
+ return;
+ }
+
+ // open the font file
+ fFile = fopen(fileName, "rb");
+
+ if (fFile == NULL) {
+ status = LE_FONT_FILE_NOT_FOUND_ERROR;
+ return;
+ }
+
+ // read in the directory
+ SFNTDirectory tempDir;
+
+ fread(&tempDir, sizeof tempDir, 1, fFile);
+
+ le_int32 dirSize = sizeof tempDir + ((SWAPW(tempDir.numTables) - ANY_NUMBER) * sizeof(DirectoryEntry));
+ const LETag headTag = LE_HEAD_TABLE_TAG;
+ const LETag hheaTag = LE_HHEA_TABLE_TAG;
+ const HEADTable *headTable = NULL;
+ const HHEATable *hheaTable = NULL;
+// const NAMETable *nameTable = NULL;
+ le_uint16 numTables = 0;
+
+ fDirectory = (const SFNTDirectory *) NEW_ARRAY(char, dirSize);
+
+ if (fDirectory == NULL) {
+ status = LE_MEMORY_ALLOCATION_ERROR;
+ goto error_exit;
+ }
+
+ fseek(fFile, 0L, SEEK_SET);
+ fread((void *) fDirectory, sizeof(char), dirSize, fFile);
+
+ //
+ // We calculate these numbers 'cause some fonts
+ // have bogus values for them in the directory header.
+ //
+ numTables = SWAPW(fDirectory->numTables);
+ fDirPower = 1 << highBit(numTables);
+ fDirExtra = numTables - fDirPower;
+
+ // read unitsPerEm from 'head' table
+ headTable = (const HEADTable *) readFontTable(headTag);
+
+ if (headTable == NULL) {
+ status = LE_MISSING_FONT_TABLE_ERROR;
+ goto error_exit;
+ }
+
+ fUnitsPerEM = SWAPW(headTable->unitsPerEm);
+ fFontChecksum = SWAPL(headTable->checksumAdjustment);
+ deleteTable(headTable);
+
+ //nameTable = (NAMETable *) readFontTable(nameTag);
+
+ //if (nameTable == NULL) {
+ // status = LE_MISSING_FONT_TABLE_ERROR;
+ // goto error_exit;
+ //}
+
+ //fFontVersionString = findName(nameTable, NAME_VERSION_STRING, PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH);
+
+ //if (fFontVersionString == NULL) {
+ // status = LE_MISSING_FONT_TABLE_ERROR;
+ // goto error_exit;
+ //}
+
+ //deleteTable(nameTable);
+
+ hheaTable = (HHEATable *) readFontTable(hheaTag);
+
+ if (hheaTable == NULL) {
+ status = LE_MISSING_FONT_TABLE_ERROR;
+ goto error_exit;
+ }
+
+ fAscent = (le_int32) yUnitsToPoints((float) SWAPW(hheaTable->ascent));
+ fDescent = (le_int32) yUnitsToPoints((float) SWAPW(hheaTable->descent));
+ fLeading = (le_int32) yUnitsToPoints((float) SWAPW(hheaTable->lineGap));
+
+ fNumLongHorMetrics = SWAPW(hheaTable->numOfLongHorMetrics);
+
+ deleteTable((void *) hheaTable);
+
+ fCMAPMapper = findUnicodeMapper();
+
+ if (fCMAPMapper == NULL) {
+ status = LE_MISSING_FONT_TABLE_ERROR;
+ goto error_exit;
+ }
+
+ return;
+
+error_exit:
+ fclose(fFile);
+ fFile = NULL;
+ return;
+}
+
+PortableFontInstance::~PortableFontInstance()
+{
+ if (fFile != NULL) {
+ fclose(fFile);
+
+ deleteTable(fHMTXTable);
+ deleteTable(fNAMETable);
+
+ delete fCMAPMapper;
+
+ DELETE_ARRAY(fDirectory);
+ }
+}
+
+void PortableFontInstance::deleteTable(const void *table) const
+{
+ DELETE_ARRAY(table);
+}
+
+const DirectoryEntry *PortableFontInstance::findTable(LETag tag) const
+{
+ if (fDirectory != NULL) {
+ le_uint16 table = 0;
+ le_uint16 probe = fDirPower;
+
+ if (SWAPL(fDirectory->tableDirectory[fDirExtra].tag) <= tag) {
+ table = fDirExtra;
+ }
+
+ while (probe > (1 << 0)) {
+ probe >>= 1;
+
+ if (SWAPL(fDirectory->tableDirectory[table + probe].tag) <= tag) {
+ table += probe;
+ }
+ }
+
+ if (SWAPL(fDirectory->tableDirectory[table].tag) == tag) {
+ return &fDirectory->tableDirectory[table];
+ }
+ }
+
+ return NULL;
+}
+
+const void *PortableFontInstance::readTable(LETag tag, le_uint32 *length) const
+{
+ const DirectoryEntry *entry = findTable(tag);
+
+ if (entry == NULL) {
+ *length = 0;
+ return NULL;
+ }
+
+ *length = SWAPL(entry->length);
+
+ void *table = NEW_ARRAY(char, *length);
+
+ if (table != NULL) {
+ fseek(fFile, SWAPL(entry->offset), SEEK_SET);
+ fread(table, sizeof(char), *length, fFile);
+ }
+
+ return table;
+}
+
+const void *PortableFontInstance::getFontTable(LETag tableTag) const
+{
+ return FontTableCache::find(tableTag);
+}
+
+const void *PortableFontInstance::readFontTable(LETag tableTag) const
+{
+ le_uint32 len;
+
+ return readTable(tableTag, &len);
+}
+
+CMAPMapper *PortableFontInstance::findUnicodeMapper()
+{
+ LETag cmapTag = LE_CMAP_TABLE_TAG;
+ const CMAPTable *cmap = (CMAPTable *) readFontTable(cmapTag);
+
+ if (cmap == NULL) {
+ return NULL;
+ }
+
+ return CMAPMapper::createUnicodeMapper(cmap);
+}
+
+const char *PortableFontInstance::getNameString(le_uint16 nameID, le_uint16 platformID, le_uint16 encodingID, le_uint16 languageID) const
+{
+ if (fNAMETable == NULL) {
+ LETag nameTag = LE_NAME_TABLE_TAG;
+ PortableFontInstance *realThis = (PortableFontInstance *) this;
+
+ realThis->fNAMETable = (const NAMETable *) readFontTable(nameTag);
+
+ if (realThis->fNAMETable != NULL) {
+ realThis->fNameCount = SWAPW(realThis->fNAMETable->count);
+ realThis->fNameStringOffset = SWAPW(realThis->fNAMETable->stringOffset);
+ }
+ }
+
+ for(le_int32 i = 0; i < fNameCount; i += 1) {
+ const NameRecord *nameRecord = &fNAMETable->nameRecords[i];
+
+ if (SWAPW(nameRecord->platformID) == platformID && SWAPW(nameRecord->encodingID) == encodingID &&
+ SWAPW(nameRecord->languageID) == languageID && SWAPW(nameRecord->nameID) == nameID) {
+ char *name = ((char *) fNAMETable) + fNameStringOffset + SWAPW(nameRecord->offset);
+ le_uint16 length = SWAPW(nameRecord->length);
+ char *result = NEW_ARRAY(char, length + 2);
+
+ ARRAY_COPY(result, name, length);
+ result[length] = result[length + 1] = 0;
+
+ return result;
+ }
+ }
+
+ return NULL;
+}
+
+const LEUnicode16 *PortableFontInstance::getUnicodeNameString(le_uint16 nameID, le_uint16 platformID, le_uint16 encodingID, le_uint16 languageID) const
+{
+ if (fNAMETable == NULL) {
+ LETag nameTag = LE_NAME_TABLE_TAG;
+ PortableFontInstance *realThis = (PortableFontInstance *) this;
+
+ realThis->fNAMETable = (const NAMETable *) readFontTable(nameTag);
+
+ if (realThis->fNAMETable != NULL) {
+ realThis->fNameCount = SWAPW(realThis->fNAMETable->count);
+ realThis->fNameStringOffset = SWAPW(realThis->fNAMETable->stringOffset);
+ }
+ }
+
+ for(le_int32 i = 0; i < fNameCount; i += 1) {
+ const NameRecord *nameRecord = &fNAMETable->nameRecords[i];
+
+ if (SWAPW(nameRecord->platformID) == platformID && SWAPW(nameRecord->encodingID) == encodingID &&
+ SWAPW(nameRecord->languageID) == languageID && SWAPW(nameRecord->nameID) == nameID) {
+ LEUnicode16 *name = (LEUnicode16 *) (((char *) fNAMETable) + fNameStringOffset + SWAPW(nameRecord->offset));
+ le_uint16 length = SWAPW(nameRecord->length) / 2;
+ LEUnicode16 *result = NEW_ARRAY(LEUnicode16, length + 2);
+
+ for (le_int32 c = 0; c < length; c += 1) {
+ result[c] = SWAPW(name[c]);
+ }
+
+ result[length] = 0;
+
+ return result;
+ }
+ }
+
+ return NULL;
+}
+
+void PortableFontInstance::deleteNameString(const char *name) const
+{
+ DELETE_ARRAY(name);
+}
+
+void PortableFontInstance::deleteNameString(const LEUnicode16 *name) const
+{
+ DELETE_ARRAY(name);
+}
+
+void PortableFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const
+{
+ TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(glyph);
+
+ if (fHMTXTable == NULL) {
+ LETag maxpTag = LE_MAXP_TABLE_TAG;
+ LETag hmtxTag = LE_HMTX_TABLE_TAG;
+ const MAXPTable *maxpTable = (MAXPTable *) readFontTable(maxpTag);
+ PortableFontInstance *realThis = (PortableFontInstance *) this;
+
+ if (maxpTable != NULL) {
+ realThis->fNumGlyphs = SWAPW(maxpTable->numGlyphs);
+ deleteTable(maxpTable);
+ }
+
+ realThis->fHMTXTable = (const HMTXTable *) readFontTable(hmtxTag);
+ }
+
+ le_uint16 index = ttGlyph;
+
+ if (ttGlyph >= fNumGlyphs || fHMTXTable == NULL) {
+ advance.fX = advance.fY = 0;
+ return;
+ }
+
+ if (ttGlyph >= fNumLongHorMetrics) {
+ index = fNumLongHorMetrics - 1;
+ }
+
+ advance.fX = xUnitsToPoints(SWAPW(fHMTXTable->hMetrics[index].advanceWidth));
+ advance.fY = 0;
+}
+
+le_bool PortableFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointNumber*/, LEPoint &/*point*/) const
+{
+ return FALSE;
+}
+
+le_int32 PortableFontInstance::getUnitsPerEM() const
+{
+ return fUnitsPerEM;
+}
+
+le_uint32 PortableFontInstance::getFontChecksum() const
+{
+ return fFontChecksum;
+}
+
+le_int32 PortableFontInstance::getAscent() const
+{
+ return fAscent;
+}
+
+le_int32 PortableFontInstance::getDescent() const
+{
+ return fDescent;
+}
+
+le_int32 PortableFontInstance::getLeading() const
+{
+ return fLeading;
+}
+
+// We really want to inherit this method from the superclass, but some compilers
+// issue a warning if we don't implement it...
+LEGlyphID PortableFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const
+{
+ return LEFontInstance::mapCharToGlyph(ch, mapper, filterZeroWidth);
+}
+
+// We really want to inherit this method from the superclass, but some compilers
+// issue a warning if we don't implement it...
+LEGlyphID PortableFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const
+{
+ return LEFontInstance::mapCharToGlyph(ch, mapper);
+}
+
+LEGlyphID PortableFontInstance::mapCharToGlyph(LEUnicode32 ch) const
+{
+ return fCMAPMapper->unicodeToGlyph(ch);
+}
+
+float PortableFontInstance::getXPixelsPerEm() const
+{
+ return fPointSize;
+}
+
+float PortableFontInstance::getYPixelsPerEm() const
+{
+ return fPointSize;
+}
+
+float PortableFontInstance::getScaleFactorX() const
+{
+ return 1.0;
+}
+
+float PortableFontInstance::getScaleFactorY() const
+{
+ return 1.0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.h b/Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.h
new file mode 100644
index 00000000000..e47cb65b197
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/PortableFontInstance.h
@@ -0,0 +1,118 @@
+
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2008, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: PortableFontInstance.h
+ *
+ * created on: 11/12/1999
+ * created by: Eric R. Mader
+ */
+
+#ifndef __PORTABLEFONTINSTANCE_H
+#define __PORTABLEFONTINSTANCE_H
+
+#include <stdio.h>
+
+#include "layout/LETypes.h"
+#include "layout/LEFontInstance.h"
+
+#include "FontTableCache.h"
+
+#include "sfnt.h"
+#include "cmaps.h"
+
+class PortableFontInstance : public LEFontInstance, protected FontTableCache
+{
+private:
+ FILE *fFile;
+
+ float fPointSize;
+ le_int32 fUnitsPerEM;
+ le_uint32 fFontChecksum;
+ le_int32 fAscent;
+ le_int32 fDescent;
+ le_int32 fLeading;
+
+ const SFNTDirectory *fDirectory;
+ le_uint16 fDirPower;
+ le_uint16 fDirExtra;
+
+ float fDeviceScaleX;
+ float fDeviceScaleY;
+
+ const NAMETable *fNAMETable;
+ le_uint16 fNameCount;
+ le_uint16 fNameStringOffset;
+
+ CMAPMapper *fCMAPMapper;
+
+ const HMTXTable *fHMTXTable;
+ le_uint16 fNumGlyphs;
+ le_uint16 fNumLongHorMetrics;
+
+ static le_int8 highBit(le_int32 value);
+
+ const DirectoryEntry *findTable(LETag tag) const;
+ const void *readTable(LETag tag, le_uint32 *length) const;
+ void deleteTable(const void *table) const;
+ void getMetrics();
+
+ CMAPMapper *findUnicodeMapper();
+
+protected:
+ const void *readFontTable(LETag tableTag) const;
+
+public:
+ PortableFontInstance(const char *fileName, float pointSize, LEErrorCode &status);
+
+ virtual ~PortableFontInstance();
+
+ virtual const void *getFontTable(LETag tableTag) const;
+
+ virtual const char *getNameString(le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language) const;
+
+ virtual const LEUnicode16 *getUnicodeNameString(le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language) const;
+
+ virtual void deleteNameString(const char *name) const;
+
+ virtual void deleteNameString(const LEUnicode16 *name) const;
+
+ virtual le_int32 getUnitsPerEM() const;
+
+ virtual le_uint32 getFontChecksum() const;
+
+ virtual le_int32 getAscent() const;
+
+ virtual le_int32 getDescent() const;
+
+ virtual le_int32 getLeading() const;
+
+ // We really want to inherit this method from the superclass, but some compilers
+ // issue a warning if we don't implement it...
+ virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const;
+
+ // We really want to inherit this method from the superclass, but some compilers
+ // issue a warning if we don't implement it...
+ virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const;
+
+ virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const;
+
+ virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
+
+ virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
+
+ float getXPixelsPerEm() const;
+
+ float getYPixelsPerEm() const;
+
+ float getScaleFactorX() const;
+
+ float getScaleFactorY() const;
+
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.cpp b/Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.cpp
new file mode 100644
index 00000000000..fa5aaedda0a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.cpp
@@ -0,0 +1,132 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: SimpleFontInstance.cpp
+ *
+ * created on: 03/30/2006
+ * created by: Eric R. Mader
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+
+#include "layout/LETypes.h"
+#include "layout/LEFontInstance.h"
+
+#include "CanonShaping.h"
+#include "SimpleFontInstance.h"
+
+SimpleFontInstance::SimpleFontInstance(float pointSize, LEErrorCode &status)
+ : fPointSize(pointSize), fAscent(0), fDescent(0)
+{
+ if (LE_FAILURE(status)) {
+ return;
+ }
+
+ fAscent = (le_int32) yUnitsToPoints(2000.0);
+ fDescent = (le_int32) yUnitsToPoints(600.0);
+
+ return;
+}
+
+SimpleFontInstance::~SimpleFontInstance()
+{
+ // nothing to do...
+}
+
+const void *SimpleFontInstance::getFontTable(LETag tableTag) const
+{
+ if (tableTag == LE_GSUB_TABLE_TAG) {
+ return CanonShaping::glyphSubstitutionTable;
+ }
+
+ if (tableTag == LE_GDEF_TABLE_TAG) {
+ return CanonShaping::glyphDefinitionTable;
+ }
+
+ return NULL;
+}
+
+void SimpleFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const
+{
+#if 0
+ if (u_getCombiningClass((UChar32) glyph) == 0) {
+ advance.fX = xUnitsToPoints(2048);
+ } else {
+ advance.fX = 0;
+ }
+#else
+ advance.fX = xUnitsToPoints(2048);
+#endif
+
+ advance.fY = 0;
+}
+
+le_int32 SimpleFontInstance::getUnitsPerEM() const
+{
+ return 2048;
+}
+
+le_int32 SimpleFontInstance::getAscent() const
+{
+ return fAscent;
+}
+
+le_int32 SimpleFontInstance::getDescent() const
+{
+ return fDescent;
+}
+
+le_int32 SimpleFontInstance::getLeading() const
+{
+ return 0;
+}
+
+// We really want to inherit this method from the superclass, but some compilers
+// issue a warning if we don't implement it...
+LEGlyphID SimpleFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const
+{
+ return LEFontInstance::mapCharToGlyph(ch, mapper, filterZeroWidth);
+}
+
+// We really want to inherit this method from the superclass, but some compilers
+// issue a warning if we don't implement it...
+LEGlyphID SimpleFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const
+{
+ return LEFontInstance::mapCharToGlyph(ch, mapper);
+}
+
+LEGlyphID SimpleFontInstance::mapCharToGlyph(LEUnicode32 ch) const
+{
+ return (LEGlyphID) ch;
+}
+
+float SimpleFontInstance::getXPixelsPerEm() const
+{
+ return fPointSize;
+}
+
+float SimpleFontInstance::getYPixelsPerEm() const
+{
+ return fPointSize;
+}
+
+float SimpleFontInstance::getScaleFactorX() const
+{
+ return 1.0;
+}
+
+float SimpleFontInstance::getScaleFactorY() const
+{
+ return 1.0;
+}
+
+le_bool SimpleFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointNumber*/, LEPoint &/*point*/) const
+{
+ return FALSE;
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.h b/Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.h
new file mode 100644
index 00000000000..9c13659dc29
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/SimpleFontInstance.h
@@ -0,0 +1,71 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: SimpleFontInstance.h
+ *
+ * created on: 03/30/2006
+ * created by: Eric R. Mader
+ */
+
+#ifndef __SIMPLEFONTINSTANCE_H
+#define __SIMPLEFONTINSTANCE_H
+
+#include "layout/LETypes.h"
+#include "layout/LEFontInstance.h"
+
+U_NAMESPACE_USE
+
+class SimpleFontInstance : public LEFontInstance
+{
+private:
+ float fPointSize;
+ le_int32 fAscent;
+ le_int32 fDescent;
+
+protected:
+ const void *readFontTable(LETag tableTag) const;
+
+public:
+ SimpleFontInstance(float pointSize, LEErrorCode &status);
+
+ virtual ~SimpleFontInstance();
+
+ virtual const void *getFontTable(LETag tableTag) const;
+
+ virtual le_int32 getUnitsPerEM() const;
+
+ virtual le_int32 getAscent() const;
+
+ virtual le_int32 getDescent() const;
+
+ virtual le_int32 getLeading() const;
+
+ // We really want to inherit this method from the superclass, but some compilers
+ // issue a warning if we don't implement it...
+ virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const;
+
+ // We really want to inherit this method from the superclass, but some compilers
+ // issue a warning if we don't implement it...
+ virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const;
+
+ virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const;
+
+ virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
+
+ virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
+
+ float getXPixelsPerEm() const;
+
+ float getYPixelsPerEm() const;
+
+ float getScaleFactorX() const;
+
+ float getScaleFactorY() const;
+
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/cfonts.cpp b/Build/source/libs/icu/icu-xetex/test/letest/cfonts.cpp
new file mode 100644
index 00000000000..a06ec08d5fd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/cfonts.cpp
@@ -0,0 +1,55 @@
+/*
+ *
+ * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "loengine.h"
+#include "PortableFontInstance.h"
+#include "SimpleFontInstance.h"
+
+U_CDECL_BEGIN
+
+le_font *le_portableFontOpen(const char *fileName,
+ float pointSize,
+ LEErrorCode *status)
+{
+ return (le_font *) new PortableFontInstance(fileName, pointSize, *status);
+}
+
+le_font *le_simpleFontOpen(float pointSize,
+ LEErrorCode *status)
+{
+ return (le_font *) new SimpleFontInstance(pointSize, *status);
+}
+
+void le_fontClose(le_font *font)
+{
+ LEFontInstance *fontInstance = (LEFontInstance *) font;
+
+ delete fontInstance;
+}
+
+const char *le_getNameString(le_font *font, le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language)
+{
+ PortableFontInstance *pfi = (PortableFontInstance *) font;
+
+ return pfi->getNameString(nameID, platform, encoding, language);
+}
+
+void le_deleteNameString(le_font *font, const char *name)
+{
+ PortableFontInstance *pfi = (PortableFontInstance *) font;
+
+ pfi->deleteNameString(name);
+}
+
+le_uint32 le_getFontChecksum(le_font *font)
+{
+ PortableFontInstance *pfi = (PortableFontInstance *) font;
+
+ return pfi->getFontChecksum();
+}
+
+U_CDECL_END
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/cfonts.h b/Build/source/libs/icu/icu-xetex/test/letest/cfonts.h
new file mode 100644
index 00000000000..2dda8a2a283
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/cfonts.h
@@ -0,0 +1,28 @@
+/*
+ *
+ * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
+ *
+ */
+
+#ifndef __CFONTS_H
+#define __CFONTS_H
+
+#include "LETypes.h"
+#include "loengine.h"
+
+le_font *le_portableFontOpen(const char *fileName,
+ float pointSize,
+ LEErrorCode *status);
+
+le_font *le_simpleFontOpen(float pointSize,
+ LEErrorCode *status);
+
+void le_fontClose(le_font *font);
+
+const char *le_getNameString(le_font *font, le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language);
+
+void le_deleteNameString(le_font *font, const char *name);
+
+le_uint32 le_getFontChecksum(le_font *font);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/cletest.c b/Build/source/libs/icu/icu-xetex/test/letest/cletest.c
new file mode 100644
index 00000000000..fdd5a5f0e1e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/cletest.c
@@ -0,0 +1,726 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/ubidi.h"
+#include "unicode/uscript.h"
+#include "unicode/ctest.h"
+
+#include "layout/LETypes.h"
+#include "layout/LEScripts.h"
+#include "layout/loengine.h"
+
+#include "layout/playout.h"
+#include "layout/plruns.h"
+
+#include "cfonts.h"
+
+#include "letest.h"
+
+#include "sfnt.h"
+#include "xmlreader.h"
+#include "putilimp.h" /* for U_FILE_SEP_STRING */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#define CH_COMMA 0x002C
+
+U_CDECL_BEGIN
+static void U_CALLCONV ParamTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ le_font *font = le_simpleFontOpen(12, &status);
+ le_engine *engine = le_create(font, arabScriptCode, -1, 0, &status);
+ LEGlyphID *glyphs = NULL;
+ le_int32 *indices = NULL;
+ float *positions = NULL;
+ le_int32 glyphCount = 0;
+
+ float x = 0.0, y = 0.0;
+ LEUnicode chars[] = {
+ 0x0045, 0x006E, 0x0067, 0x006C, 0x0069, 0x0073, 0x0068, 0x0020, /* "English " */
+ 0x0645, 0x0627, 0x0646, 0x062A, 0x0648, 0x0634, /* MEM ALIF KAF NOON TEH WAW SHEEN */
+ 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x02E /* " text." */
+ };
+
+
+ glyphCount = le_getGlyphCount(engine, &status);
+ if (glyphCount != 0) {
+ log_err("Calling getGlyphCount() on an empty layout returned %d.\n", glyphCount);
+ }
+
+ glyphs = NEW_ARRAY(LEGlyphID, glyphCount + 10);
+ indices = NEW_ARRAY(le_int32, glyphCount + 10);
+ positions = NEW_ARRAY(float, glyphCount + 10);
+
+ le_getGlyphs(engine, NULL, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getGlyphs(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getGlyphs(engine, glyphs, &status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getGlyphs(glyphs, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getCharIndices(engine, NULL, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getCharIndices(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getCharIndices(engine, indices, &status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getCharIndices(indices, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getCharIndicesWithBase(engine, NULL, 1024, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getCharIndices(NULL, 1024, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getCharIndicesWithBase(engine, indices, 1024, &status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getCharIndices(indices, 1024, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getGlyphPositions(engine, NULL, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getGlyphPositions(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getGlyphPositions(engine, positions, &status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getGlyphPositions(positions, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ DELETE_ARRAY(positions);
+ DELETE_ARRAY(indices);
+ DELETE_ARRAY(glyphs);
+
+ status = LE_NO_ERROR;
+ glyphCount = le_layoutChars(engine, NULL, 0, 0, 0, FALSE, 0.0, 0.0, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = le_layoutChars(engine, chars, -1, 6, 20, TRUE, 0.0, 0.0, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = le_layoutChars(engine, chars, 8, -1, 20, TRUE, 0.0, 0.0, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = le_layoutChars(engine, chars, 8, 6, -1, TRUE, 0.0, 0.0, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars((chars, 8, 6, -1, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = le_layoutChars(engine, chars, 8, 6, 10, TRUE, 0.0, 0.0, &status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = le_layoutChars(engine, chars, 8, 6, 20, TRUE, 0.0, 0.0, &status);
+
+ if (LE_FAILURE(status)) {
+ log_err("Calling layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
+ goto bail;
+ }
+
+ le_getGlyphPosition(engine, -1, &x, &y, &status);
+
+ if (status != LE_INDEX_OUT_OF_BOUNDS_ERROR) {
+ log_err("Calling getGlyphPosition(-1, x, y, status) did not fail w/ LE_INDEX_OUT_OF_BOUNDS_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ le_getGlyphPosition(engine, glyphCount + 1, &x, &y, &status);
+
+ if (status != LE_INDEX_OUT_OF_BOUNDS_ERROR) {
+ log_err("Calling getGlyphPosition(glyphCount + 1, x, y, status) did not fail w/ LE_INDEX_OUT_OF_BOUNDS_ERROR.\n");
+ }
+
+bail:
+ le_close(engine);
+ le_fontClose(font);
+}
+U_CDECL_END
+
+U_CDECL_BEGIN
+static void U_CALLCONV FactoryTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ le_font *font = le_simpleFontOpen(12, &status);
+ le_engine *engine = NULL;
+ le_int32 scriptCode;
+
+ for(scriptCode = 0; scriptCode < scriptCodeCount; scriptCode += 1) {
+ status = LE_NO_ERROR;
+ engine = le_create(font, scriptCode, -1, 0, &status);
+
+ if (LE_FAILURE(status)) {
+ log_err("Could not create a LayoutEngine for script \'%s\'.\n", uscript_getShortName((UScriptCode)scriptCode));
+ }
+
+ le_close(engine);
+ }
+
+ le_fontClose(font);
+}
+U_CDECL_END
+
+U_CDECL_BEGIN
+static void U_CALLCONV AccessTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ le_font *font = le_simpleFontOpen(12, &status);
+ le_engine *engine =le_create(font, arabScriptCode, -1, 0, &status);
+ le_int32 glyphCount;
+ LEGlyphID glyphs[6];
+ le_int32 biasedIndices[6], indices[6], glyph;
+ float positions[6 * 2 + 2];
+ LEUnicode chars[] = {
+ 0x0045, 0x006E, 0x0067, 0x006C, 0x0069, 0x0073, 0x0068, 0x0020, /* "English " */
+ 0x0645, 0x0627, 0x0646, 0x062A, 0x0648, 0x0634, /* MEM ALIF KAF NOON TEH WAW SHEEN */
+ 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x02E /* " text." */
+ };
+
+ if (LE_FAILURE(status)) {
+ log_err("Could not create LayoutEngine.\n");
+ goto bail;
+ }
+
+ glyphCount = le_layoutChars(engine, chars, 8, 6, 20, TRUE, 0.0, 0.0, &status);
+
+ if (LE_FAILURE(status) || glyphCount != 6) {
+ log_err("layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
+ goto bail;
+ }
+
+ le_getGlyphs(engine, glyphs, &status);
+ le_getCharIndices(engine, indices, &status);
+ le_getGlyphPositions(engine, positions, &status);
+
+ if (LE_FAILURE(status)) {
+ log_err("Could not get glyph, indices and position arrays.\n");
+ goto bail;
+ }
+
+ status = LE_NO_ERROR;
+ le_getCharIndicesWithBase(engine, biasedIndices, 1024, &status);
+
+ if (LE_FAILURE(status)) {
+ log_err("getCharIndices(biasedIndices, 1024, status) failed.\n");
+ } else {
+ for (glyph = 0; glyph < glyphCount; glyph += 1) {
+ if (biasedIndices[glyph] != (indices[glyph] + 1024)) {
+ log_err("biasedIndices[%d] != indices[%d] + 1024: %8X, %8X\n",
+ glyph, glyph, biasedIndices[glyph], indices[glyph]);
+ break;
+ }
+ }
+ }
+
+ status = LE_NO_ERROR;
+ for (glyph = 0; glyph <= glyphCount; glyph += 1) {
+ float x = 0.0, y = 0.0;
+
+ le_getGlyphPosition(engine, glyph, &x, &y, &status);
+
+ if (LE_FAILURE(status)) {
+ log_err("getGlyphPosition(%d, x, y, status) failed.\n", glyph);
+ break;
+ }
+
+ if (x != positions[glyph*2] || y != positions[glyph*2 + 1]) {
+ log_err("getGlyphPosition(%d, x, y, status) returned bad position: (%f, %f) != (%f, %f)\n",
+ glyph, x, y, positions[glyph*2], positions[glyph*2 + 1]);
+ break;
+ }
+ }
+
+bail:
+ le_close(engine);
+ le_fontClose(font);
+}
+U_CDECL_END
+
+static le_bool compareResults(const char *testID, TestResult *expected, TestResult *actual)
+{
+ le_int32 i;
+
+ /* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
+ if (actual->glyphCount != expected->glyphCount) {
+ log_err("Test %s: incorrect glyph count: exptected %d, got %d\n",
+ testID, expected->glyphCount, actual->glyphCount);
+ return FALSE;
+ }
+
+ for (i = 0; i < actual->glyphCount; i += 1) {
+ if (actual->glyphs[i] != expected->glyphs[i]) {
+ log_err("Test %s: incorrect id for glyph %d: expected %4X, got %4X\n",
+ testID, i, expected->glyphs[i], actual->glyphs[i]);
+ return FALSE;
+ }
+ }
+
+ for (i = 0; i < actual->glyphCount; i += 1) {
+ if (actual->indices[i] != expected->indices[i]) {
+ log_err("Test %s: incorrect index for glyph %d: expected %8X, got %8X\n",
+ testID, i, expected->indices[i], actual->indices[i]);
+ return FALSE;
+ }
+ }
+
+ for (i = 0; i <= actual->glyphCount; i += 1) {
+ double xError = uprv_fabs(actual->positions[i * 2] - expected->positions[i * 2]);
+ double yError = uprv_fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]);
+
+ if (xError > 0.0001) {
+ log_err("Test %s: incorrect x position for glyph %d: expected %f, got %f\n",
+ testID, i, expected->positions[i * 2], actual->positions[i * 2]);
+ return FALSE;
+ }
+
+ if (yError < 0) {
+ yError = -yError;
+ }
+
+ if (yError > 0.0001) {
+ log_err("Test %s: incorrect y position for glyph %d: expected %f, got %f\n",
+ testID, i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static void checkFontVersion(le_font *font, const char *testVersionString,
+ le_uint32 testChecksum, const char *testID)
+{
+ le_uint32 fontChecksum = le_getFontChecksum(font);
+
+ if (fontChecksum != testChecksum) {
+ const char *fontVersionString = le_getNameString(font, NAME_VERSION_STRING,
+ PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH);
+
+ log_info("Test %s: this may not be the same font used to generate the test data.\n", testID);
+ log_info("Your font's version string is \"%s\"\n", fontVersionString);
+ log_info("The expected version string is \"%s\"\n", testVersionString);
+ log_info("If you see errors, they may be due to the version of the font you're using.\n");
+
+ le_deleteNameString(font, fontVersionString);
+ }
+}
+
+/* Returns the path to icu/source/test/testdata/ */
+static const char *getSourceTestData() {
+#ifdef U_TOPSRCDIR
+ const char *srcDataDir = U_TOPSRCDIR U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+#else
+ const char *srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+ FILE *f = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"rbbitst.txt", "r");
+
+ if (f != NULL) {
+ /* We're in icu/source/test/letest/ */
+ fclose(f);
+ } else {
+ /* We're in icu/source/test/letest/(Debug|Release) */
+ srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+ }
+#endif
+
+ return srcDataDir;
+}
+
+static const char *getPath(char buffer[2048], const char *filename) {
+ const char *testDataDirectory = getSourceTestData();
+
+ strcpy(buffer, testDataDirectory);
+ strcat(buffer, filename);
+
+ return buffer;
+}
+
+static le_font *openFont(const char *fontName, const char *checksum, const char *version, const char *testID)
+{
+ char path[2048];
+ le_font *font;
+ LEErrorCode fontStatus = LE_NO_ERROR;
+
+ if (fontName != NULL) {
+ font = le_portableFontOpen(getPath(path, fontName), 12, &fontStatus);
+
+ if (LE_FAILURE(fontStatus)) {
+ log_info("Test %s: can't open font %s - test skipped.\n", testID, fontName);
+ le_fontClose(font);
+ return NULL;
+ } else {
+ le_uint32 cksum = 0;
+
+ sscanf(checksum, "%x", &cksum);
+
+ checkFontVersion(font, version, cksum, testID);
+ }
+ } else {
+ font = le_simpleFontOpen(12, &fontStatus);
+ }
+
+ return font;
+}
+
+static le_bool getRTL(const LEUnicode *text, le_int32 charCount)
+{
+ UBiDiLevel paraLevel;
+ UErrorCode status = U_ZERO_ERROR;
+ UBiDi *ubidi = ubidi_openSized(charCount, 0, &status);
+
+ ubidi_setPara(ubidi, text, charCount, UBIDI_DEFAULT_LTR, NULL, &status);
+ paraLevel = ubidi_getParaLevel(ubidi);
+ ubidi_close(ubidi);
+
+ return paraLevel & 1;
+}
+
+static void doTestCase (const char *testID,
+ const char *fontName,
+ const char *fontVersion,
+ const char *fontChecksum,
+ le_int32 scriptCode,
+ le_int32 languageCode,
+ const LEUnicode *text,
+ le_int32 charCount,
+ TestResult *expected)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ le_engine *engine;
+ le_font *font = openFont(fontName, fontChecksum, fontVersion, testID);
+ le_int32 typoFlags = 3; /* kerning + ligatures */
+ TestResult actual;
+
+ if (font == NULL) {
+ /* error message already printed. */
+ return;
+ }
+
+ if (fontName == NULL) {
+ typoFlags |= 0x80000000L; /* use CharSubstitutionFilter... */
+ }
+
+ engine = le_create(font, scriptCode, languageCode, typoFlags, &status);
+
+ if (LE_FAILURE(status)) {
+ log_err("Test %s: could not create a LayoutEngine.\n", testID);
+ goto free_expected;
+ }
+
+ actual.glyphCount = le_layoutChars(engine, text, 0, charCount, charCount, getRTL(text, charCount), 0, 0, &status);
+
+ actual.glyphs = NEW_ARRAY(LEGlyphID, actual.glyphCount);
+ actual.indices = NEW_ARRAY(le_int32, actual.glyphCount);
+ actual.positions = NEW_ARRAY(float, actual.glyphCount * 2 + 2);
+
+ le_getGlyphs(engine, actual.glyphs, &status);
+ le_getCharIndices(engine, actual.indices, &status);
+ le_getGlyphPositions(engine, actual.positions, &status);
+
+ compareResults(testID, expected, &actual);
+
+ DELETE_ARRAY(actual.positions);
+ DELETE_ARRAY(actual.indices);
+ DELETE_ARRAY(actual.glyphs);
+
+ le_close(engine);
+
+free_expected:
+ le_fontClose(font);
+}
+
+static void U_CALLCONV DataDrivenTest(void)
+{
+ char path[2048];
+ const char *testFilePath = getPath(path, "letest.xml");
+
+ readTestFile(testFilePath, doTestCase);
+}
+
+/*
+ * From ticket:5923:
+ *
+ * Build a paragraph that contains a mixture of left to right and right to left text.
+ * Break it into multiple lines and make sure that the glyphToCharMap for run in each
+ * line is correct.
+ *
+ * Note: it might be a good idea to also check the glyphs and positions for each run,
+ * that we get the expected number of runs per line and that the line breaks are where
+ * we expect them to be. Really, it would be a good idea to make a whole test suite
+ * for pl_paragraph.
+ */
+static void U_CALLCONV GlyphToCharTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ le_font *font;
+ pl_fontRuns *fontRuns;
+ pl_paragraph *paragraph;
+ const pl_line *line;
+ /*
+ * This is the same text that's in <icu>/source/samples/layout/Sample.txt
+ */
+ LEUnicode chars[] = {
+ /*BOM*/ 0x0054, 0x0068, 0x0065, 0x0020, 0x004c, 0x0061, 0x0079,
+ 0x006f, 0x0075, 0x0074, 0x0045, 0x006e, 0x0067, 0x0069, 0x006e,
+ 0x0065, 0x0020, 0x0064, 0x006f, 0x0065, 0x0073, 0x0020, 0x0061,
+ 0x006c, 0x006c, 0x0020, 0x0074, 0x0068, 0x0065, 0x0020, 0x0077,
+ 0x006f, 0x0072, 0x006b, 0x0020, 0x006e, 0x0065, 0x0063, 0x0065,
+ 0x0073, 0x0073, 0x0061, 0x0072, 0x0079, 0x0020, 0x0074, 0x006f,
+ 0x0020, 0x0064, 0x0069, 0x0073, 0x0070, 0x006c, 0x0061, 0x0079,
+ 0x0020, 0x0055, 0x006e, 0x0069, 0x0063, 0x006f, 0x0064, 0x0065,
+ 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x0020, 0x0077, 0x0072,
+ 0x0069, 0x0074, 0x0074, 0x0065, 0x006e, 0x0020, 0x0069, 0x006e,
+ 0x0020, 0x006c, 0x0061, 0x006e, 0x0067, 0x0075, 0x0061, 0x0067,
+ 0x0065, 0x0073, 0x0020, 0x0077, 0x0069, 0x0074, 0x0068, 0x0020,
+ 0x0063, 0x006f, 0x006d, 0x0070, 0x006c, 0x0065, 0x0078, 0x0020,
+ 0x0077, 0x0072, 0x0069, 0x0074, 0x0069, 0x006e, 0x0067, 0x0020,
+ 0x0073, 0x0079, 0x0073, 0x0074, 0x0065, 0x006d, 0x0073, 0x0020,
+ 0x0073, 0x0075, 0x0063, 0x0068, 0x0020, 0x0061, 0x0073, 0x0020,
+ 0x0048, 0x0069, 0x006e, 0x0064, 0x0069, 0x0020, 0x0028, 0x0939,
+ 0x093f, 0x0928, 0x094d, 0x0926, 0x0940, 0x0029, 0x0020, 0x0054,
+ 0x0068, 0x0061, 0x0069, 0x0020, 0x0028, 0x0e44, 0x0e17, 0x0e22,
+ 0x0029, 0x0020, 0x0061, 0x006e, 0x0064, 0x0020, 0x0041, 0x0072,
+ 0x0061, 0x0062, 0x0069, 0x0063, 0x0020, 0x0028, 0x0627, 0x0644,
+ 0x0639, 0x0631, 0x0628, 0x064a, 0x0629, 0x0029, 0x002e, 0x0020,
+ 0x0048, 0x0065, 0x0072, 0x0065, 0x0027, 0x0073, 0x0020, 0x0061,
+ 0x0020, 0x0073, 0x0061, 0x006d, 0x0070, 0x006c, 0x0065, 0x0020,
+ 0x006f, 0x0066, 0x0020, 0x0073, 0x006f, 0x006d, 0x0065, 0x0020,
+ 0x0074, 0x0065, 0x0078, 0x0074, 0x0020, 0x0077, 0x0072, 0x0069,
+ 0x0074, 0x0074, 0x0065, 0x006e, 0x0020, 0x0069, 0x006e, 0x0020,
+ 0x0053, 0x0061, 0x006e, 0x0073, 0x006b, 0x0072, 0x0069, 0x0074,
+ 0x003a, 0x0020, 0x0936, 0x094d, 0x0930, 0x0940, 0x092e, 0x0926,
+ 0x094d, 0x0020, 0x092d, 0x0917, 0x0935, 0x0926, 0x094d, 0x0917,
+ 0x0940, 0x0924, 0x093e, 0x0020, 0x0905, 0x0927, 0x094d, 0x092f,
+ 0x093e, 0x092f, 0x0020, 0x0905, 0x0930, 0x094d, 0x091c, 0x0941,
+ 0x0928, 0x0020, 0x0935, 0x093f, 0x0937, 0x093e, 0x0926, 0x0020,
+ 0x092f, 0x094b, 0x0917, 0x0020, 0x0927, 0x0943, 0x0924, 0x0930,
+ 0x093e, 0x0937, 0x094d, 0x091f, 0x094d, 0x0930, 0x0020, 0x0909,
+ 0x0935, 0x093e, 0x091a, 0x0964, 0x0020, 0x0927, 0x0930, 0x094d,
+ 0x092e, 0x0915, 0x094d, 0x0937, 0x0947, 0x0924, 0x094d, 0x0930,
+ 0x0947, 0x0020, 0x0915, 0x0941, 0x0930, 0x0941, 0x0915, 0x094d,
+ 0x0937, 0x0947, 0x0924, 0x094d, 0x0930, 0x0947, 0x0020, 0x0938,
+ 0x092e, 0x0935, 0x0947, 0x0924, 0x093e, 0x0020, 0x092f, 0x0941,
+ 0x092f, 0x0941, 0x0924, 0x094d, 0x0938, 0x0935, 0x0903, 0x0020,
+ 0x092e, 0x093e, 0x092e, 0x0915, 0x093e, 0x0903, 0x0020, 0x092a,
+ 0x093e, 0x0923, 0x094d, 0x0921, 0x0935, 0x093e, 0x0936, 0x094d,
+ 0x091a, 0x0948, 0x0935, 0x0020, 0x0915, 0x093f, 0x092e, 0x0915,
+ 0x0941, 0x0930, 0x094d, 0x0935, 0x0924, 0x0020, 0x0938, 0x0902,
+ 0x091c, 0x092f, 0x0020, 0x0048, 0x0065, 0x0072, 0x0065, 0x0027,
+ 0x0073, 0x0020, 0x0061, 0x0020, 0x0073, 0x0061, 0x006d, 0x0070,
+ 0x006c, 0x0065, 0x0020, 0x006f, 0x0066, 0x0020, 0x0073, 0x006f,
+ 0x006d, 0x0065, 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x0020,
+ 0x0077, 0x0072, 0x0069, 0x0074, 0x0074, 0x0065, 0x006e, 0x0020,
+ 0x0069, 0x006e, 0x0020, 0x0041, 0x0072, 0x0061, 0x0062, 0x0069,
+ 0x0063, 0x003a, 0x0020, 0x0623, 0x0633, 0x0627, 0x0633, 0x064b,
+ 0x0627, 0x060c, 0x0020, 0x062a, 0x062a, 0x0639, 0x0627, 0x0645,
+ 0x0644, 0x0020, 0x0627, 0x0644, 0x062d, 0x0648, 0x0627, 0x0633,
+ 0x064a, 0x0628, 0x0020, 0x0641, 0x0642, 0x0637, 0x0020, 0x0645,
+ 0x0639, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631, 0x0642, 0x0627,
+ 0x0645, 0x060c, 0x0020, 0x0648, 0x062a, 0x0642, 0x0648, 0x0645,
+ 0x0020, 0x0628, 0x062a, 0x062e, 0x0632, 0x064a, 0x0646, 0x0020,
+ 0x0627, 0x0644, 0x0623, 0x062d, 0x0631, 0x0641, 0x0020, 0x0648,
+ 0x0627, 0x0644, 0x0645, 0x062d, 0x0627, 0x0631, 0x0641, 0x0020,
+ 0x0627, 0x0644, 0x0623, 0x062e, 0x0631, 0x0649, 0x0020, 0x0628,
+ 0x0639, 0x062f, 0x0020, 0x0623, 0x0646, 0x0020, 0x062a, 0x064f,
+ 0x0639, 0x0637, 0x064a, 0x0020, 0x0631, 0x0642, 0x0645, 0x0627,
+ 0x0020, 0x0645, 0x0639, 0x064a, 0x0646, 0x0627, 0x0020, 0x0644,
+ 0x0643, 0x0644, 0x0020, 0x0648, 0x0627, 0x062d, 0x062f, 0x0020,
+ 0x0645, 0x0646, 0x0647, 0x0627, 0x002e, 0x0020, 0x0648, 0x0642,
+ 0x0628, 0x0644, 0x0020, 0x0627, 0x062e, 0x062a, 0x0631, 0x0627,
+ 0x0639, 0x0020, 0x0022, 0x064a, 0x0648, 0x0646, 0x0650, 0x0643,
+ 0x0648, 0x062f, 0x0022, 0x060c, 0x0020, 0x0643, 0x0627, 0x0646,
+ 0x0020, 0x0647, 0x0646, 0x0627, 0x0643, 0x0020, 0x0645, 0x0626,
+ 0x0627, 0x062a, 0x0020, 0x0627, 0x0644, 0x0623, 0x0646, 0x0638,
+ 0x0645, 0x0629, 0x0020, 0x0644, 0x0644, 0x062a, 0x0634, 0x0641,
+ 0x064a, 0x0631, 0x0020, 0x0648, 0x062a, 0x062e, 0x0635, 0x064a,
+ 0x0635, 0x0020, 0x0647, 0x0630, 0x0647, 0x0020, 0x0627, 0x0644,
+ 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x0020, 0x0644, 0x0644,
+ 0x0645, 0x062d, 0x0627, 0x0631, 0x0641, 0x060c, 0x0020, 0x0648,
+ 0x0644, 0x0645, 0x0020, 0x064a, 0x0648, 0x062c, 0x062f, 0x0020,
+ 0x0646, 0x0638, 0x0627, 0x0645, 0x0020, 0x062a, 0x0634, 0x0641,
+ 0x064a, 0x0631, 0x0020, 0x0648, 0x0627, 0x062d, 0x062f, 0x0020,
+ 0x064a, 0x062d, 0x062a, 0x0648, 0x064a, 0x0020, 0x0639, 0x0644,
+ 0x0649, 0x0020, 0x062c, 0x0645, 0x064a, 0x0639, 0x0020, 0x0627,
+ 0x0644, 0x0645, 0x062d, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627,
+ 0x0644, 0x0636, 0x0631, 0x0648, 0x0631, 0x064a, 0x0629, 0x0020,
+ 0x0061, 0x006e, 0x0064, 0x0020, 0x0068, 0x0065, 0x0072, 0x0065,
+ 0x0027, 0x0073, 0x0020, 0x0061, 0x0020, 0x0073, 0x0061, 0x006d,
+ 0x0070, 0x006c, 0x0065, 0x0020, 0x006f, 0x0066, 0x0020, 0x0073,
+ 0x006f, 0x006d, 0x0065, 0x0020, 0x0074, 0x0065, 0x0078, 0x0074,
+ 0x0020, 0x0077, 0x0072, 0x0069, 0x0074, 0x0074, 0x0065, 0x006e,
+ 0x0020, 0x0069, 0x006e, 0x0020, 0x0054, 0x0068, 0x0061, 0x0069,
+ 0x003a, 0x0020, 0x0e1a, 0x0e17, 0x0e17, 0x0e35, 0x0e48, 0x0e51,
+ 0x0e1e, 0x0e32, 0x0e22, 0x0e38, 0x0e44, 0x0e0b, 0x0e42, 0x0e04,
+ 0x0e25, 0x0e19, 0x0e42, 0x0e14, 0x0e42, 0x0e23, 0x0e18, 0x0e35,
+ 0x0e2d, 0x0e32, 0x0e28, 0x0e31, 0x0e22, 0x0e2d, 0x0e22, 0x0e39,
+ 0x0e48, 0x0e17, 0x0e48, 0x0e32, 0x0e21, 0x0e01, 0x0e25, 0x0e32,
+ 0x0e07, 0x0e17, 0x0e38, 0x0e48, 0x0e07, 0x0e43, 0x0e2b, 0x0e0d,
+ 0x0e48, 0x0e43, 0x0e19, 0x0e41, 0x0e04, 0x0e19, 0x0e0b, 0x0e31,
+ 0x0e2a, 0x0e01, 0x0e31, 0x0e1a, 0x0e25, 0x0e38, 0x0e07, 0x0e40,
+ 0x0e2e, 0x0e19, 0x0e23, 0x0e35, 0x0e0a, 0x0e32, 0x0e27, 0x0e44,
+ 0x0e23, 0x0e48, 0x0e41, 0x0e25, 0x0e30, 0x0e1b, 0x0e49, 0x0e32,
+ 0x0e40, 0x0e2d, 0x0e47, 0x0e21, 0x0e20, 0x0e23, 0x0e23, 0x0e22,
+ 0x0e32, 0x0e0a, 0x0e32, 0x0e27, 0x0e44, 0x0e23, 0x0e48, 0x0e1a,
+ 0x0e49, 0x0e32, 0x0e19, 0x0e02, 0x0e2d, 0x0e07, 0x0e1e, 0x0e27,
+ 0x0e01, 0x0e40, 0x0e02, 0x0e32, 0x0e2b, 0x0e25, 0x0e31, 0x0e07,
+ 0x0e40, 0x0e25, 0x0e47, 0x0e01, 0x0e40, 0x0e1e, 0x0e23, 0x0e32,
+ 0x0e30, 0x0e44, 0x0e21, 0x0e49, 0x0e2a, 0x0e23, 0x0e49, 0x0e32,
+ 0x0e07, 0x0e1a, 0x0e49, 0x0e32, 0x0e19, 0x0e15, 0x0e49, 0x0e2d,
+ 0x0e07, 0x0e02, 0x0e19, 0x0e21, 0x0e32, 0x0e14, 0x0e49, 0x0e27,
+ 0x0e22, 0x0e40, 0x0e01, 0x0e27, 0x0e35, 0x0e22, 0x0e19, 0x0e40,
+ 0x0e1b, 0x0e47, 0x0e19, 0x0e23, 0x0e30, 0x0e22, 0x0e30, 0x0e17,
+ 0x0e32, 0x0e07, 0x0e2b, 0x0e25, 0x0e32, 0x0e22, 0x0e44, 0x0e21,
+ 0x0e25, 0x0e4c
+ };
+ le_int32 charCount = LE_ARRAY_SIZE(chars);
+ le_int32 charIndex = 0, lineNumber = 1;
+ le_int32 run, i;
+ const float lineWidth = 600;
+
+ font = le_simpleFontOpen(12, &status);
+
+ if (LE_FAILURE(status)) {
+ log_err("le_simpleFontOpen(12, &status) failed");
+ goto finish;
+ }
+
+ fontRuns = pl_openEmptyFontRuns(0);
+ pl_addFontRun(fontRuns, font, charCount);
+
+ paragraph = pl_create(chars, charCount, fontRuns, NULL, NULL, NULL, 0, FALSE, &status);
+
+ pl_closeFontRuns(fontRuns);
+
+ if (LE_FAILURE(status)) {
+ log_err("pl_create failed.");
+ goto close_font;
+ }
+
+ pl_reflow(paragraph);
+ while ((line = pl_nextLine(paragraph, lineWidth)) != NULL) {
+ le_int32 runCount = pl_countLineRuns(line);
+
+ for(run = 0; run < runCount; run += 1) {
+ const pl_visualRun *visualRun = pl_getLineVisualRun(line, run);
+ const le_int32 glyphCount = pl_getVisualRunGlyphCount(visualRun);
+ const le_int32 *glyphToCharMap = pl_getVisualRunGlyphToCharMap(visualRun);
+
+ if (pl_getVisualRunDirection(visualRun) == UBIDI_RTL) {
+ /*
+ * For a right to left run, make sure that the character indices
+ * increase from the right most glyph to the left most glyph. If
+ * there are any one to many glyph substitutions, we might get several
+ * glyphs in a row with the same character index.
+ */
+ for(i = glyphCount - 1; i >= 0; i -= 1) {
+ le_int32 ix = glyphToCharMap[i];
+
+ if (ix != charIndex) {
+ if (ix != charIndex - 1) {
+ log_err("Bad glyph to char index for glyph %d on line %d: expected %d, got %d\n",
+ i, lineNumber, charIndex, ix);
+ goto close_paragraph; /* once there's one error, we can't count on anything else... */
+ }
+ } else {
+ charIndex += 1;
+ }
+ }
+ } else {
+ /*
+ * We can't just check the order of the character indices
+ * for left to right runs because Indic text might have been
+ * reordered. What we can do is find the minimum and maximum
+ * character indices in the run and make sure that the minimum
+ * is equal to charIndex and then advance charIndex to the maximum.
+ */
+ le_int32 minIndex = 0x7FFFFFFF, maxIndex = -1;
+
+ for(i = 0; i < glyphCount; i += 1) {
+ le_int32 ix = glyphToCharMap[i];
+
+ if (ix > maxIndex) {
+ maxIndex = ix;
+ }
+
+ if (ix < minIndex) {
+ minIndex = ix;
+ }
+ }
+
+ if (minIndex != charIndex) {
+ log_err("Bad minIndex for run %d on line %d: expected %d, got %d\n",
+ run, lineNumber, charIndex, minIndex);
+ goto close_paragraph; /* once there's one error, we can't count on anything else... */
+ }
+
+ charIndex = maxIndex + 1;
+ }
+ }
+
+ lineNumber += 1;
+ }
+
+close_paragraph:
+ pl_close(paragraph);
+
+close_font:
+ le_fontClose(font);
+
+finish:
+ return;
+}
+
+U_CFUNC void addCTests(TestNode **root)
+{
+ addTest(root, &ParamTest, "c_api/ParameterTest");
+ addTest(root, &FactoryTest, "c_api/FactoryTest");
+ addTest(root, &AccessTest, "c_layout/AccessTest");
+ addTest(root, &DataDrivenTest, "c_layout/DataDrivenTest");
+ addTest(root, &GlyphToCharTest, "c_paragraph/GlyphToCharTest");
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/cletest.sln b/Build/source/libs/icu/icu-xetex/test/letest/cletest.sln
new file mode 100644
index 00000000000..1ac75a272b2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/cletest.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cletest", "cletest.vcproj", "{798E3AE4-A984-43FF-8928-EACFF43F56AE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {798E3AE4-A984-43FF-8928-EACFF43F56AE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {798E3AE4-A984-43FF-8928-EACFF43F56AE}.Debug|Win32.Build.0 = Debug|Win32
+ {798E3AE4-A984-43FF-8928-EACFF43F56AE}.Release|Win32.ActiveCfg = Release|Win32
+ {798E3AE4-A984-43FF-8928-EACFF43F56AE}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/cletest.vcproj b/Build/source/libs/icu/icu-xetex/test/letest/cletest.vcproj
new file mode 100644
index 00000000000..ed9685ab355
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/cletest.vcproj
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="cletest"
+ ProjectGUID="{798E3AE4-A984-43FF-8928-EACFF43F56AE}"
+ RootNamespace="cletest"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\tools\ctestfw;..\..\tools\toolutil;..\..\layout"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\..\lib\icuucd.lib ..\..\..\lib\icuind.lib ..\..\..\lib\icutestd.lib ..\..\..\lib\icutud.lib ..\..\..\lib\iculed.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\tools\ctestfw;..\..\tools\toolutil;..\..\layout"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\..\lib\icuuc.lib ..\..\..\lib\icuin.lib ..\..\..\lib\icutest.lib ..\..\..\lib\icutu.lib ..\..\..\lib\icule.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\cfonts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\cletest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cmaps.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FontObject.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FontTableCache.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\letsutil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PortableFontInstance.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleFontInstance.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\xmlreader.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\cfonts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cmaps.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FontObject.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FontTableCache.h"
+ >
+ </File>
+ <File
+ RelativePath=".\letest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\letsutil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PortableFontInstance.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sfnt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleFontInstance.h"
+ >
+ </File>
+ <File
+ RelativePath=".\xmlreader.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/cmaps.cpp b/Build/source/libs/icu/icu-xetex/test/letest/cmaps.cpp
new file mode 100644
index 00000000000..3b8501b4cec
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/cmaps.cpp
@@ -0,0 +1,200 @@
+/***************************************************************************
+*
+* Copyright (C) 1998-2003, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+************************************************************************/
+
+#include "LETypes.h"
+#include "LESwaps.h"
+
+#include "sfnt.h"
+#include "cmaps.h"
+
+#define SWAPU16(code) ((LEUnicode16) SWAPW(code))
+#define SWAPU32(code) ((LEUnicode32) SWAPL(code))
+
+//
+// Finds the high bit by binary searching
+// through the bits in value.
+//
+le_int8 highBit(le_uint32 value)
+{
+ le_uint8 bit = 0;
+
+ if (value >= 1 << 16) {
+ value >>= 16;
+ bit += 16;
+ }
+
+ if (value >= 1 << 8) {
+ value >>= 8;
+ bit += 8;
+ }
+
+ if (value >= 1 << 4) {
+ value >>= 4;
+ bit += 4;
+ }
+
+ if (value >= 1 << 2) {
+ value >>= 2;
+ bit += 2;
+ }
+
+ if (value >= 1 << 1) {
+ value >>= 1;
+ bit += 1;
+ }
+
+ return bit;
+}
+
+CMAPMapper *CMAPMapper::createUnicodeMapper(const CMAPTable *cmap)
+{
+ le_uint16 i;
+ le_uint16 nSubtables = SWAPW(cmap->numberSubtables);
+ const CMAPEncodingSubtable *subtable = NULL;
+ le_uint32 offset1 = 0, offset10 = 0;
+
+ for (i = 0; i < nSubtables; i += 1) {
+ const CMAPEncodingSubtableHeader *esh = &cmap->encodingSubtableHeaders[i];
+
+ if (SWAPW(esh->platformID) == 3) {
+ switch (SWAPW(esh->platformSpecificID)) {
+ case 1:
+ offset1 = SWAPL(esh->encodingOffset);
+ break;
+
+ case 10:
+ offset10 = SWAPL(esh->encodingOffset);
+ break;
+ }
+ }
+ }
+
+
+ if (offset10 != 0)
+ {
+ subtable = (const CMAPEncodingSubtable *) ((const char *) cmap + offset10);
+ } else if (offset1 != 0) {
+ subtable = (const CMAPEncodingSubtable *) ((const char *) cmap + offset1);
+ } else {
+ return NULL;
+ }
+
+ switch (SWAPW(subtable->format)) {
+ case 4:
+ return new CMAPFormat4Mapper(cmap, (const CMAPFormat4Encoding *) subtable);
+
+ case 12:
+ {
+ const CMAPFormat12Encoding *encoding = (const CMAPFormat12Encoding *) subtable;
+
+ return new CMAPGroupMapper(cmap, encoding->groups, SWAPL(encoding->nGroups));
+ }
+
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+CMAPFormat4Mapper::CMAPFormat4Mapper(const CMAPTable *cmap, const CMAPFormat4Encoding *header)
+ : CMAPMapper(cmap)
+{
+ le_uint16 segCount = SWAPW(header->segCountX2) / 2;
+
+ fEntrySelector = SWAPW(header->entrySelector);
+ fRangeShift = SWAPW(header->rangeShift) / 2;
+ fEndCodes = &header->endCodes[0];
+ fStartCodes = &header->endCodes[segCount + 1]; // + 1 for reservedPad...
+ fIdDelta = &fStartCodes[segCount];
+ fIdRangeOffset = &fIdDelta[segCount];
+}
+
+LEGlyphID CMAPFormat4Mapper::unicodeToGlyph(LEUnicode32 unicode32) const
+{
+ if (unicode32 >= 0x10000) {
+ return 0;
+ }
+
+ LEUnicode16 unicode = (LEUnicode16) unicode32;
+ le_uint16 index = 0;
+ le_uint16 probe = 1 << fEntrySelector;
+ TTGlyphID result = 0;
+
+ if (SWAPU16(fStartCodes[fRangeShift]) <= unicode) {
+ index = fRangeShift;
+ }
+
+ while (probe > (1 << 0)) {
+ probe >>= 1;
+
+ if (SWAPU16(fStartCodes[index + probe]) <= unicode) {
+ index += probe;
+ }
+ }
+
+ if (unicode >= SWAPU16(fStartCodes[index]) && unicode <= SWAPU16(fEndCodes[index])) {
+ if (fIdRangeOffset[index] == 0) {
+ result = (TTGlyphID) unicode;
+ } else {
+ le_uint16 offset = unicode - SWAPU16(fStartCodes[index]);
+ le_uint16 rangeOffset = SWAPW(fIdRangeOffset[index]);
+ le_uint16 *glyphIndexTable = (le_uint16 *) ((char *) &fIdRangeOffset[index] + rangeOffset);
+
+ result = SWAPW(glyphIndexTable[offset]);
+ }
+
+ result += SWAPW(fIdDelta[index]);
+ } else {
+ result = 0;
+ }
+
+ return LE_SET_GLYPH(0, result);
+}
+
+CMAPFormat4Mapper::~CMAPFormat4Mapper()
+{
+ // parent destructor does it all
+}
+
+CMAPGroupMapper::CMAPGroupMapper(const CMAPTable *cmap, const CMAPGroup *groups, le_uint32 nGroups)
+ : CMAPMapper(cmap), fGroups(groups)
+{
+ le_uint8 bit = highBit(nGroups);
+ fPower = 1 << bit;
+ fRangeOffset = nGroups - fPower;
+}
+
+LEGlyphID CMAPGroupMapper::unicodeToGlyph(LEUnicode32 unicode32) const
+{
+ le_int32 probe = fPower;
+ le_int32 range = 0;
+
+ if (SWAPU32(fGroups[fRangeOffset].startCharCode) <= unicode32) {
+ range = fRangeOffset;
+ }
+
+ while (probe > (1 << 0)) {
+ probe >>= 1;
+
+ if (SWAPU32(fGroups[range + probe].startCharCode) <= unicode32) {
+ range += probe;
+ }
+ }
+
+ if (SWAPU32(fGroups[range].startCharCode) <= unicode32 && SWAPU32(fGroups[range].endCharCode) >= unicode32) {
+ return (LEGlyphID) (SWAPU32(fGroups[range].startGlyphCode) + unicode32 - SWAPU32(fGroups[range].startCharCode));
+ }
+
+ return 0;
+}
+
+CMAPGroupMapper::~CMAPGroupMapper()
+{
+ // parent destructor does it all
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/cmaps.h b/Build/source/libs/icu/icu-xetex/test/letest/cmaps.h
new file mode 100644
index 00000000000..df0bb116ba5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/cmaps.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+*
+* Copyright (C) 1998-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+************************************************************************/
+
+
+#ifndef __CMAPS_H
+#define __CMAPS_H
+
+#include "layout/LETypes.h"
+#include "letest.h"
+#include "sfnt.h"
+
+class CMAPMapper
+{
+public:
+ virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const = 0;
+
+ virtual ~CMAPMapper();
+
+ static CMAPMapper *createUnicodeMapper(const CMAPTable *cmap);
+
+protected:
+ CMAPMapper(const CMAPTable *cmap);
+
+ CMAPMapper() {};
+
+private:
+ const CMAPTable *fcmap;
+};
+
+class CMAPFormat4Mapper : public CMAPMapper
+{
+public:
+ CMAPFormat4Mapper(const CMAPTable *cmap, const CMAPFormat4Encoding *header);
+
+ virtual ~CMAPFormat4Mapper();
+
+ virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
+
+protected:
+ CMAPFormat4Mapper() {};
+
+private:
+ le_uint16 fEntrySelector;
+ le_uint16 fRangeShift;
+ const le_uint16 *fEndCodes;
+ const le_uint16 *fStartCodes;
+ const le_uint16 *fIdDelta;
+ const le_uint16 *fIdRangeOffset;
+};
+
+class CMAPGroupMapper : public CMAPMapper
+{
+public:
+ CMAPGroupMapper(const CMAPTable *cmap, const CMAPGroup *groups, le_uint32 nGroups);
+
+ virtual ~CMAPGroupMapper();
+
+ virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
+
+protected:
+ CMAPGroupMapper() {};
+
+private:
+ le_int32 fPower;
+ le_int32 fRangeOffset;
+ const CMAPGroup *fGroups;
+};
+
+inline CMAPMapper::CMAPMapper(const CMAPTable *cmap)
+ : fcmap(cmap)
+{
+ // nothing else to do
+}
+
+inline CMAPMapper::~CMAPMapper()
+{
+ DELETE_ARRAY(fcmap);
+}
+
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/gendata.cpp b/Build/source/libs/icu/icu-xetex/test/letest/gendata.cpp
new file mode 100644
index 00000000000..103fb4b6fdd
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/gendata.cpp
@@ -0,0 +1,295 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2008, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: gendata.cpp
+ *
+ * created on: 11/03/2000
+ * created by: Eric R. Mader
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+#include "unicode/uscript.h"
+#include "unicode/ubidi.h"
+
+#include "layout/LETypes.h"
+#include "layout/LEScripts.h"
+#include "layout/LayoutEngine.h"
+
+#include "PortableFontInstance.h"
+#include "SimpleFontInstance.h"
+
+#include "xmlparser.h"
+
+#include "letsutil.h"
+#include "letest.h"
+
+U_NAMESPACE_USE
+
+struct TestInput
+{
+ const char *fontName;
+ LEUnicode *text;
+ le_int32 textLength;
+ le_int32 scriptCode;
+ le_bool rightToLeft;
+};
+
+/*
+ * FIXME: should use the output file name and the current date.
+ */
+const char *header =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "\n"
+ "<!--\n"
+ " Copyright (c) 1999-%4.4d International Business Machines\n"
+ " Corporation and others. All rights reserved.\n"
+ "\n"
+ " WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT\n"
+ " UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.\n"
+ "\n"
+ " file name: letest.xml\n"
+ " generated on: %s\n"
+ " generated by: gendata.cpp\n"
+ "-->\n"
+ "\n"
+ "<layout-tests>\n";
+
+void dumpLongs(FILE *file, const char *tag, le_int32 *longs, le_int32 count) {
+ char lineBuffer[8 * 12 + 2];
+ le_int32 bufp = 0;
+
+ fprintf(file, " <%s>\n", tag);
+
+ for (int i = 0; i < count; i += 1) {
+ if (i % 8 == 0 && bufp != 0) {
+ fprintf(file, " %s\n", lineBuffer);
+ bufp = 0;
+ }
+
+ bufp += sprintf(&lineBuffer[bufp], "0x%8.8X, ", longs[i]);
+ }
+
+ if (bufp != 0) {
+ lineBuffer[bufp - 2] = '\0';
+ fprintf(file, " %s\n", lineBuffer);
+ }
+
+ fprintf(file, " </%s>\n\n", tag);
+}
+
+void dumpFloats(FILE *file, const char *tag, float *floats, le_int32 count) {
+ char lineBuffer[8 * 16 + 2];
+ le_int32 bufp = 0;
+
+ fprintf(file, " <%s>\n", tag);
+
+ for (int i = 0; i < count; i += 1) {
+ if (i % 8 == 0 && bufp != 0) {
+ fprintf(file, " %s\n", lineBuffer);
+ bufp = 0;
+ }
+
+ bufp += sprintf(&lineBuffer[bufp], "%f, ", floats[i]);
+ }
+
+ if (bufp != 0) {
+ lineBuffer[bufp - 2] = '\0';
+ fprintf(file, " %s\n", lineBuffer);
+ }
+
+ fprintf(file, " </%s>\n", tag);
+}
+
+int main(int /*argc*/, char *argv[])
+{
+ UErrorCode status = U_ZERO_ERROR;
+ FILE *outputFile = fopen(argv[1], "w");
+ time_t now = time(NULL);
+ struct tm *local = localtime(&now);
+ const char *tmFormat = "%m/%d/%Y %I:%M:%S %p %Z";
+ char tmString[64];
+
+ strftime(tmString, 64, tmFormat, local);
+ fprintf(outputFile, header, local->tm_year + 1900, tmString);
+
+ UXMLParser *parser = UXMLParser::createParser(status);
+ UXMLElement *root = parser->parseFile("gendata.xml", status);
+
+ if (root == NULL) {
+ printf("Error: Could not open gendata.xml\n");
+ delete parser;
+ return -1;
+ }
+
+ UnicodeString test_case = UNICODE_STRING_SIMPLE("test-case");
+ UnicodeString test_text = UNICODE_STRING_SIMPLE("test-text");
+ UnicodeString test_font = UNICODE_STRING_SIMPLE("test-font");
+
+ // test-case attributes
+ UnicodeString id_attr = UNICODE_STRING_SIMPLE("id");
+ UnicodeString script_attr = UNICODE_STRING_SIMPLE("script");
+ UnicodeString lang_attr = UNICODE_STRING_SIMPLE("lang");
+
+ // test-font attributes
+ UnicodeString name_attr = UNICODE_STRING_SIMPLE("name");
+
+ const UXMLElement *testCase;
+ int32_t tc = 0;
+
+ while((testCase = root->nextChildElement(tc)) != NULL) {
+ if (testCase->getTagName().compare(test_case) == 0) {
+ char *id = getCString(testCase->getAttribute(id_attr));
+ char *script = getCString(testCase->getAttribute(script_attr));
+ char *lang = getCString(testCase->getAttribute(lang_attr));
+ LEFontInstance *font = NULL;
+ const UXMLElement *element;
+ int32_t ec = 0;
+ int32_t charCount = 0;
+ int32_t typoFlags = 3; // kerning + ligatures...
+ UScriptCode scriptCode;
+ le_int32 languageCode = -1;
+ UnicodeString text;
+ int32_t glyphCount = 0;
+ LEErrorCode leStatus = LE_NO_ERROR;
+ LayoutEngine *engine = NULL;
+ LEGlyphID *glyphs = NULL;
+ le_int32 *indices = NULL;
+ float *positions = NULL;
+
+ uscript_getCode(script, &scriptCode, 1, &status);
+ if (LE_FAILURE(status)) {
+ printf("Error: invalid script name: %s.\n", script);
+ goto free_c_strings;
+ }
+
+ if (lang != NULL) {
+ languageCode = getLanguageCode(lang);
+
+ if (languageCode < 0) {
+ printf("Error: invalid language name: %s.\n", lang);
+ goto free_c_strings;
+ }
+
+ fprintf(outputFile, " <test-case id=\"%s\" script=\"%s\" lang=\"%s\">\n", id, script, lang);
+ } else {
+ fprintf(outputFile, " <test-case id=\"%s\" script=\"%s\">\n", id, script);
+ }
+
+ while((element = testCase->nextChildElement(ec)) != NULL) {
+ UnicodeString tag = element->getTagName();
+
+ // TODO: make sure that each element is only used once.
+ if (tag.compare(test_font) == 0) {
+ char *fontName = getCString(element->getAttribute(name_attr));
+ const char *version = NULL;
+ PortableFontInstance *pfi = new PortableFontInstance(fontName, 12, leStatus);
+
+ if (LE_FAILURE(leStatus)) {
+ printf("Error: could not open font: %s\n", fontName);
+ freeCString(fontName);
+ goto free_c_strings;
+ }
+
+ version = pfi->getNameString(NAME_VERSION_STRING, PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH);
+
+ // The standard recommends that the Macintosh Roman/English name string be present, but
+ // if it's not, try the Microsoft Unicode/English string.
+ if (version == NULL) {
+ const LEUnicode16 *uversion = pfi->getUnicodeNameString(NAME_VERSION_STRING, PLATFORM_MICROSOFT, MICROSOFT_UNICODE_BMP, MICROSOFT_ENGLISH);
+
+ if (uversion != NULL) {
+ const UnicodeString usversion((const UChar *)uversion);
+
+ version = getCString(&usversion);
+ pfi->deleteNameString(uversion);
+ }
+ }
+
+ fprintf(outputFile, " <test-font name=\"%s\" version=\"%s\" checksum=\"0x%8.8X\"/>\n\n",
+ fontName, version, pfi->getFontChecksum());
+
+ pfi->deleteNameString(version);
+ freeCString(fontName);
+ font = pfi;
+ } else if (tag.compare(test_text) == 0) {
+ char *utf8 = NULL;
+
+ text = element->getText(TRUE);
+ charCount = text.length();
+
+ utf8 = getUTF8String(&text);
+ fprintf(outputFile, " <test-text>%s</test-text>\n\n", utf8);
+ freeCString(utf8);
+ } else {
+ // an unknown tag...
+ char *cTag = getCString(&tag);
+
+ printf("Test %s: unknown element with tag \"%s\"\n", id, cTag);
+ freeCString(cTag);
+ }
+ }
+
+ if (font == NULL) {
+ LEErrorCode fontStatus = LE_NO_ERROR;
+
+ font = new SimpleFontInstance(12, fontStatus);
+ typoFlags |= 0x80000000L; // use CharSubstitutionFilter...
+ }
+
+ engine = LayoutEngine::layoutEngineFactory(font, scriptCode, languageCode, typoFlags, leStatus);
+
+ if (LE_FAILURE(leStatus)) {
+ printf("Error for test %s: could not create a LayoutEngine.\n", id);
+ goto delete_font;
+ }
+
+ glyphCount = engine->layoutChars(text.getBuffer(), 0, charCount, charCount, getRTL(text), 0, 0, leStatus);
+
+ glyphs = NEW_ARRAY(LEGlyphID, glyphCount);
+ indices = NEW_ARRAY(le_int32, glyphCount);
+ positions = NEW_ARRAY(float, glyphCount * 2 + 2);
+
+ engine->getGlyphs(glyphs, leStatus);
+ engine->getCharIndices(indices, leStatus);
+ engine->getGlyphPositions(positions, leStatus);
+
+ dumpLongs(outputFile, "result-glyphs", (le_int32 *) glyphs, glyphCount);
+
+ dumpLongs(outputFile, "result-indices", indices, glyphCount);
+
+ dumpFloats(outputFile, "result-positions", positions, glyphCount * 2 + 2);
+
+ fprintf(outputFile, " </test-case>\n\n");
+
+ DELETE_ARRAY(positions);
+ DELETE_ARRAY(indices);
+ DELETE_ARRAY(glyphs);
+
+ delete engine;
+
+delete_font:
+ delete font;
+
+free_c_strings:
+ freeCString(lang);
+ freeCString(script);
+ freeCString(id);
+ }
+ }
+
+ delete root;
+ delete parser;
+
+ fprintf(outputFile, "</layout-tests>\n");
+
+ fclose(outputFile);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/gendata.sln b/Build/source/libs/icu/icu-xetex/test/letest/gendata.sln
new file mode 100644
index 00000000000..8f46c1c2f1d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/gendata.sln
@@ -0,0 +1,19 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gendata", "gendata.vcproj", "{DA322426-C37C-4909-A99D-16B05E7FA498}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DA322426-C37C-4909-A99D-16B05E7FA498}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DA322426-C37C-4909-A99D-16B05E7FA498}.Debug|Win32.Build.0 = Debug|Win32
+ {DA322426-C37C-4909-A99D-16B05E7FA498}.Release|Win32.ActiveCfg = Release|Win32
+ {DA322426-C37C-4909-A99D-16B05E7FA498}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/gendata.vcproj b/Build/source/libs/icu/icu-xetex/test/letest/gendata.vcproj
new file mode 100644
index 00000000000..e76679d334d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/gendata.vcproj
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="gendata"
+ ProjectGUID="{DA322426-C37C-4909-A99D-16B05E7FA498}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/gendata.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\layout;..\..\tools\ctestfw;..\..\tools\toolutil"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;LE_USE_CMEMORY;_CRT_SECURE_NO_DEPRECATE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ TreatWChar_tAsBuiltInType="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/gendata.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\..\lib\iculed.lib ..\..\..\lib\icuucd.lib ..\..\..\lib\icutud.lib odbc32.lib odbccp32.lib"
+ OutputFile=".\Debug/gendata.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/gendata.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/gendata.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\layout;..\..\tools\ctestfw;..\..\tools\toolutil"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;LE_USE_CMEMORY;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ TreatWChar_tAsBuiltInType="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/gendata.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\..\lib\icule.lib ..\..\..\lib\icuuc.lib ..\..\..\lib\icutu.lib odbc32.lib odbccp32.lib"
+ OutputFile=".\Release/gendata.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\Release/gendata.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\cmaps.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FontTableCache.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\gendata.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\letsutil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PortableFontInstance.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleFontInstance.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\cmaps.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FontTableCache.h"
+ >
+ </File>
+ <File
+ RelativePath=".\letest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\letsutil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PortableFontInstance.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sfnt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleFontInstance.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/gendata.xml b/Build/source/libs/icu/icu-xetex/test/letest/gendata.xml
new file mode 100644
index 00000000000..a672644bc4c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/gendata.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright (c) 1999-2008 International Business Machines
+ Corporation and others. All rights reserved.
+-->
+
+<layout-tests>
+ <test-case id="Ghita" script="deva">
+ <test-font name="raghu.ttf"/>
+ <test-text>शà¥à¤°à¥€à¤®à¤¦à¥ भगवदà¥à¤—ीता अधà¥à¤¯à¤¾à¤¯ अरà¥à¤œà¥à¤¨ विषाद योग धृतराषà¥à¤Ÿà¥à¤° उवाचृ धरà¥à¤®à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ कà¥à¤°à¥à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ समवेता यà¥à¤¯à¥à¤¤à¥à¤¸à¤µà¤ƒ मामकाः पाणà¥à¤¡à¤µà¤¾à¤¶à¥à¤šà¥ˆà¤µ किमकà¥à¤°à¥à¤µà¤¤ संजव</test-text>
+ </test-case>
+
+ <test-case id="Arabic" script="arab">
+ <test-font name="CODE2000.TTF"/>
+ <test-text>أساسًا، تتعامل الحواسيب Ùقط مع الأرقام، وتقوم بتخزين الأحر٠والمحار٠الأخرى بعد أن تÙعطي رقما معينا لكل واحد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمحارÙØŒ ولم يوجد نظام تشÙير واحد يحتوي على جميع المحار٠الضرورية</test-text>
+ </test-case>
+
+ <test-case id="Unicode Arabic" script="arab">
+ <test-font name="LucidaSansRegular.ttf"/>
+ <test-text>أساسًا، تتعامل الحواسيب Ùقط مع الأرقام، وتقوم بتخزين الأحر٠والمحار٠الأخرى بعد أن تÙعطي رقما معينا لكل واحد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمحارÙØŒ ولم يوجد نظام تشÙير واحد يحتوي على جميع المحار٠الضرورية</test-text>
+ </test-case>
+
+ <test-case id="Thai" script="thai">
+ <test-font name="angsd___.ttf"/>
+ <test-text>บทที่๑พายุไซโคลนโดโรธีอาศัยอยู่ท่ามà¸à¸¥à¸²à¸‡à¸—ุ่งใหà¸à¹ˆà¹ƒà¸™à¹à¸„นซัสà¸à¸±à¸šà¸¥à¸¸à¸‡à¹€à¸®à¸™à¸£à¸µà¸Šà¸²à¸§à¹„ร่à¹à¸¥à¸°à¸›à¹‰à¸²à¹€à¸­à¹‡à¸¡à¸ à¸£à¸£à¸¢à¸²à¸Šà¸²à¸§à¹„ร่บ้านของพวà¸à¹€à¸‚าหลังเล็à¸à¹€à¸žà¸£à¸²à¸°à¹„ม้สร้างบ้านต้องขนมาด้วยเà¸à¸§à¸µà¸¢à¸™à¹€à¸›à¹‡à¸™à¸£à¸°à¸¢à¸°à¸—างหลายไมล์</test-text>
+ </test-case>
+
+ <test-case id="Arabic Simple" script="arab">
+ <test-text>أساسًا، تتعامل الحواسيب Ùقط مع الأرقام، وتقوم بتخزين الأحر٠والمحار٠الأخرى بعد أن تÙعطي رقما معينا لكل واحد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمحارÙØŒ ولم يوجد نظام تشÙير واحد يحتوي على جميع المحار٠الضرورية</test-text>
+ </test-case>
+
+ <test-case id="Matra Test" script="deva">
+ <test-font name="Devamt.ttf"/>
+ <test-text>à¥à¤‚ ं॑</test-text>
+ </test-case>
+
+ <test-case id="Deva Stress Test" script="deva">
+ <test-font name="Devamt.ttf"/>
+ <test-text>कठकं कः क॑ क॒ कà¤à¥‘ कं॒ कà¤à¤‚ः क॒॑</test-text>
+ </test-case>
+
+ <test-case id="Deva Test" script="deva">
+ <test-font name="Devamt.ttf"/>
+ <test-text>रू क़ॠकà¥à¤· कà¥à¤•à¤¿ कà¥à¤°à¤¿ टà¥à¤°à¤¿ हिनà¥à¤¦à¥€ रà¥à¤•à¥à¤°à¤¿à¤‚ कà¥à¤·à¤¤à¥à¤°à¤œà¥à¤žà¤¤à¥à¤°à¤•à¥à¤· शà¥à¤° थà¥à¤° शà¥à¤° कके रà¥à¤•à¥‡à¤‚ केूकूेकेृ रà¥à¤•à¥‚ क़ क कॠकà¥à¤· कà¥à¤·à¥ कà¥à¤·à¥à¤• ज़ ज जॠजà¥à¤ž जà¥à¤žà¥ जà¥à¤žà¥à¤• रà¥à¤• रà¥à¤•à¥à¤• डà¥à¤° कà¥à¤• क़à¥à¤• क़à¥à¤• क़ॠकà¥à¤·à¥à¤• कà¥à¤·à¥ तà¥à¤°à¥à¤• दà¥à¤¦ कि हि रू रॠरà¥à¤•à¥‡ रà¥à¤•à¤‚ कॠकॠके दà¥à¤¦à¥à¤¦ क़à¥à¤· कà¥à¤· रà¥à¤•à¥à¤·à¥‡ दà¥à¤¦à¤¤à¥à¤°à¥à¤• जà¥à¤ž कà¥à¤¤à¥à¤µ जà¥à¤žà¥à¤• रà¥à¤•à¤ रà¥à¤•à¤¿à¤ रà¥à¤•à¥‡à¤ रà¥à¤•à¥à¤°à¤¿à¤ हिंदी हà¥à¤®à¤¿à¤¹à¥à¤¯à¤¿à¤–ि ङà¥à¤• ङà¥à¤® ङà¥à¤•à¥à¤¤ ङà¥à¤– ङà¥à¤— ङà¥à¤˜ ङà¥à¤•à¥à¤· ङà¥à¤•à¥à¤·à¥à¤µ ङà¥à¤•à¥à¤·à¥à¤¯ रà¥à¤•à¥à¤¤à¥à¤µà¤¿ रà¥à¤°à¥à¤°à¥à¤° कै के कॠकू कृ कॅ कॆ हॠहू हॆ है हे</test-text>
+ </test-case>
+
+ <test-case id="Japanese Han" script="hani" lang="JAN">
+ <test-font name="ARIALUNI.TTF"/>
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+ </test-case>
+
+ <test-case id="Korean Han" script="hani" lang="KOR">
+ <test-font name="ARIALUNI.TTF"/>
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+ </test-case>
+
+ <test-case id="Traditional Han" script="hani" lang="ZHT">
+ <test-font name="ARIALUNI.TTF"/>
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+ </test-case>
+
+ <test-case id="Simplified Han" script="hani" lang="ZHS">
+ <test-font name="ARIALUNI.TTF"/>
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+ </test-case>
+
+ <test-case id="Deva locl Hindi" script="deva" lang="HIN">
+ <test-font name="TestFont1.otf"/>
+ <test-text>शङ़à¥</test-text>
+ </test-case>
+
+ <test-case id="Deva locl Marathi" script="deva" lang="MAR">
+ <test-font name="TestFont1.otf"/>
+ <test-text>शङ़à¥</test-text>
+ </test-case>
+
+ <test-case id="Deva ZWJ" script="deva">
+ <test-font name="raghu.ttf"/>
+ <test-text>कà¥à¤· रà¥à¤• कà¥â€à¤· रà¥â€à¤•</test-text>
+ </test-case>
+
+ <test-case id="Hangul" script="hang">
+ <test-text>마만만</test-text>
+ </test-case>
+
+ <test-case id="Hebrew Mark Test" script="hebr">
+ <test-font name="SBL_Hbrw.ttf"/>
+ <test-text>מָש×Ö°×›Öµ× Ö´×™×ַחֲרֶיךָנָּרוּצָההֱבִי×ַנִיהַמֶּלֶךְחֲדָרָיונָגִילָהוְנִשְׂמְחָהבָּךְנַזְכִּירָהדֹדֶיךָמִיַּיִןמֵיש×ָרִי××ֲהֵבוּךָ</test-text>
+ </test-case>
+
+ <test-case id="Broken Font Test" script="hani" lang="ZHT">
+ <test-font name="BMIN00M.TTF"/>
+ <test-text>中è¯äººæ°‘共和國 臺ç£</test-text>
+ </test-case>
+
+ <test-case id="Sinhala Al-Lakuna Test" script="sinh">
+ <test-font name="lklug.hj.ttf"/>
+ <test-text>ක්â€à¶»à·™ ක්â€à¶ºà·™ ක්â€à·‚à·™ ක්â€à·‚à·Šâ€à¶ºà·™ ක්ෂෙ කර්â€à¶¸à·™ ස්ට්â€à¶»à·š à·ƒâ€à·Šà·ƒà·™ ස්ස</test-text>
+ </test-case>
+</layout-tests>
+ <test-case id="Not Language Specific" script="latn">
+ <test-font name="fp9r8a.otf"/>
+ <test-text>Ţhiş iş a ţeşţ.</test-text>
+ </test-case>
+
+ <test-case id="Romanian Language Specific" script="latn" lang="ROM">
+ <test-font name="fp9r8a.otf"/>
+ <test-text>Ţhiş iş a ţeşţ.</test-text>
+ </test-case>
+
+ <test-case id="Malayalam Samvruthokaram Test" script="mlym">
+ <test-font name="lohit_ml.ttf"/>
+ <test-text>à´£àµàµ</test-text>
+ </test-case>
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/letest.cpp b/Build/source/libs/icu/icu-xetex/test/letest/letest.cpp
new file mode 100644
index 00000000000..df9bf8da932
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/letest.cpp
@@ -0,0 +1,1116 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2008, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: letest.cpp
+ *
+ * created on: 11/06/2000
+ * created by: Eric R. Mader
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/uclean.h"
+#include "unicode/uchar.h"
+#include "unicode/unistr.h"
+#include "unicode/uscript.h"
+#include "unicode/putil.h"
+#include "unicode/ctest.h"
+
+#include "layout/LETypes.h"
+#include "layout/LEScripts.h"
+#include "layout/LayoutEngine.h"
+
+#include "layout/ParagraphLayout.h"
+#include "layout/RunArrays.h"
+
+#include "PortableFontInstance.h"
+#include "SimpleFontInstance.h"
+
+#include "letsutil.h"
+#include "letest.h"
+
+#include "xmlparser.h"
+#include "putilimp.h" // for uprv_getUTCtime()
+
+#include <stdlib.h>
+#include <string.h>
+
+U_NAMESPACE_USE
+
+#define CH_COMMA 0x002C
+
+U_CDECL_BEGIN
+
+static void U_CALLCONV ScriptTest(void)
+{
+ if (scriptCodeCount != USCRIPT_CODE_LIMIT) {
+ log_err("ScriptCodes::scriptCodeCount = %n, but UScriptCode::USCRIPT_CODE_LIMIT = %n\n", scriptCodeCount, USCRIPT_CODE_LIMIT);
+ }
+}
+
+static void U_CALLCONV ParamTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ SimpleFontInstance *font = new SimpleFontInstance(12, status);
+ LayoutEngine *engine = LayoutEngine::layoutEngineFactory(font, arabScriptCode, -1, status);
+ LEGlyphID *glyphs = NULL;
+ le_int32 *indices = NULL;
+ float *positions = NULL;
+ le_int32 glyphCount = 0;
+
+ glyphCount = engine->getGlyphCount();
+ if (glyphCount != 0) {
+ log_err("Calling getGlyphCount() on an empty layout returned %d.\n", glyphCount);
+ }
+
+ glyphs = NEW_ARRAY(LEGlyphID, glyphCount + 10);
+ indices = NEW_ARRAY(le_int32, glyphCount + 10);
+ positions = NEW_ARRAY(float, glyphCount + 10);
+
+ engine->getGlyphs(NULL, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getGlyphs(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getGlyphs(glyphs, status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getGlyphs(glyphs, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getGlyphs(NULL, 0xFF000000L, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getGlyphs(NULL, 0xFF000000L, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getGlyphs(glyphs, 0xFF000000L, status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getGlyphs(glyphs, 0xFF000000L, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getCharIndices(NULL, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getCharIndices(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getCharIndices(indices, status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getCharIndices(indices, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getCharIndices(NULL, 1024, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getCharIndices(NULL, 1024, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getCharIndices(indices, 1024, status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getCharIndices(indices, 1024, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getGlyphPositions(NULL, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling getGlyphPositions(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getGlyphPositions(positions, status);
+
+ if (status != LE_NO_LAYOUT_ERROR) {
+ log_err("Calling getGlyphPositions(positions, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n");
+ }
+
+ DELETE_ARRAY(positions);
+ DELETE_ARRAY(indices);
+ DELETE_ARRAY(glyphs);
+
+ status = LE_NO_ERROR;
+ glyphCount = engine->layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ LEUnicode chars[] = {
+ 0x0045, 0x006E, 0x0067, 0x006C, 0x0069, 0x0073, 0x0068, 0x0020, // "English "
+ 0x0645, 0x0627, 0x0646, 0x062A, 0x0648, 0x0634, // MEM ALIF KAF NOON TEH WAW SHEEN
+ 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x02E // " text."
+ };
+
+ status = LE_NO_ERROR;
+ glyphCount = engine->layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = engine->layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = engine->layoutChars(chars, 8, 6, -1, TRUE, 0.0, 0.0, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars((chars, 8, 6, -1, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ glyphCount = engine->layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status);
+
+ if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
+ log_err("Calling layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
+ }
+
+ float x = 0.0, y = 0.0;
+
+ status = LE_NO_ERROR;
+ glyphCount = engine->layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status);
+
+ if (LE_FAILURE(status)) {
+ log_err("Calling layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
+ goto bail;
+ }
+
+ engine->getGlyphPosition(-1, x, y, status);
+
+ if (status != LE_INDEX_OUT_OF_BOUNDS_ERROR) {
+ log_err("Calling getGlyphPosition(-1, x, y, status) did not fail w/ LE_INDEX_OUT_OF_BOUNDS_ERROR.\n");
+ }
+
+ status = LE_NO_ERROR;
+ engine->getGlyphPosition(glyphCount + 1, x, y, status);
+
+ if (status != LE_INDEX_OUT_OF_BOUNDS_ERROR) {
+ log_err("Calling getGlyphPosition(glyphCount + 1, x, y, status) did not fail w/ LE_INDEX_OUT_OF_BOUNDS_ERROR.\n");
+ }
+
+bail:
+ delete engine;
+ delete font;
+}
+U_CDECL_END
+
+U_CDECL_BEGIN
+static void U_CALLCONV FactoryTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ SimpleFontInstance *font = new SimpleFontInstance(12, status);
+ LayoutEngine *engine = NULL;
+
+ for(le_int32 scriptCode = 0; scriptCode < scriptCodeCount; scriptCode += 1) {
+ status = LE_NO_ERROR;
+ engine = LayoutEngine::layoutEngineFactory(font, scriptCode, -1, status);
+
+ if (LE_FAILURE(status)) {
+ log_err("Could not create a LayoutEngine for script \'%s\'.\n", uscript_getShortName((UScriptCode)scriptCode));
+ }
+
+ delete engine;
+ }
+
+ delete font;
+}
+U_CDECL_END
+
+U_CDECL_BEGIN
+static void U_CALLCONV AccessTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ SimpleFontInstance *font = new SimpleFontInstance(12, status);
+ LayoutEngine *engine = LayoutEngine::layoutEngineFactory(font, arabScriptCode, -1, status);
+ le_int32 glyphCount;
+ LEGlyphID glyphs[6], extraBitGlyphs[6];;
+ le_int32 biasedIndices[6], indices[6], glyph;
+ float positions[6 * 2 + 2];
+ LEUnicode chars[] = {
+ 0x0045, 0x006E, 0x0067, 0x006C, 0x0069, 0x0073, 0x0068, 0x0020, // "English "
+ 0x0645, 0x0627, 0x0646, 0x062A, 0x0648, 0x0634, // MEM ALIF KAF NOON TEH WAW SHEEN
+ 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x02E // " text."
+ };
+
+ if (LE_FAILURE(status)) {
+ log_err("Could not create LayoutEngine.\n");
+ goto bail;
+ }
+
+ glyphCount = engine->layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status);
+
+ if (LE_FAILURE(status) || glyphCount != 6) {
+ log_err("layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
+ goto bail;
+ }
+
+ engine->getGlyphs(glyphs, status);
+ engine->getCharIndices(indices, status);
+ engine->getGlyphPositions(positions, status);
+
+ if (LE_FAILURE(status)) {
+ log_err("Could not get glyph, indices and position arrays.\n");
+ goto bail;
+ }
+
+ engine->getGlyphs(extraBitGlyphs, 0xFF000000L, status);
+
+ if (LE_FAILURE(status)) {
+ log_err("getGlyphs(extraBitGlyphs, 0xFF000000L, status); failed.\n");
+ } else {
+ for(glyph = 0; glyph < glyphCount; glyph += 1) {
+ if (extraBitGlyphs[glyph] != (glyphs[glyph] | 0xFF000000L)) {
+ log_err("extraBigGlyphs[%d] != glyphs[%d] | 0xFF000000L: %8X, %8X\n",
+ glyph, glyph, extraBitGlyphs[glyph], glyphs[glyph]);
+ break;
+ }
+ }
+ }
+
+ status = LE_NO_ERROR;
+ engine->getCharIndices(biasedIndices, 1024, status);
+
+ if (LE_FAILURE(status)) {
+ log_err("getCharIndices(biasedIndices, 1024, status) failed.\n");
+ } else {
+ for (glyph = 0; glyph < glyphCount; glyph += 1) {
+ if (biasedIndices[glyph] != (indices[glyph] + 1024)) {
+ log_err("biasedIndices[%d] != indices[%d] + 1024: %8X, %8X\n",
+ glyph, glyph, biasedIndices[glyph], indices[glyph]);
+ break;
+ }
+ }
+ }
+
+ status = LE_NO_ERROR;
+ for (glyph = 0; glyph <= glyphCount; glyph += 1) {
+ float x = 0.0, y = 0.0;
+
+ engine->getGlyphPosition(glyph, x, y, status);
+
+ if (LE_FAILURE(status)) {
+ log_err("getGlyphPosition(%d, x, y, status) failed.\n", glyph);
+ break;
+ }
+
+ if (x != positions[glyph*2] || y != positions[glyph*2 + 1]) {
+ log_err("getGlyphPosition(%d, x, y, status) returned bad position: (%f, %f) != (%f, %f)\n",
+ glyph, x, y, positions[glyph*2], positions[glyph*2 + 1]);
+ break;
+ }
+ }
+
+bail:
+ delete engine;
+ delete font;
+}
+U_CDECL_END
+
+le_bool compareResults(const char *testID, TestResult *expected, TestResult *actual)
+{
+ /* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
+ if (actual->glyphCount != expected->glyphCount) {
+ log_err("Test %s: incorrect glyph count: exptected %d, got %d\n",
+ testID, expected->glyphCount, actual->glyphCount);
+ return FALSE;
+ }
+
+ le_int32 i;
+
+ for (i = 0; i < actual->glyphCount; i += 1) {
+ if (actual->glyphs[i] != expected->glyphs[i]) {
+ log_err("Test %s: incorrect id for glyph %d: expected %4X, got %4X\n",
+ testID, i, expected->glyphs[i], actual->glyphs[i]);
+ return FALSE;
+ }
+ }
+
+ for (i = 0; i < actual->glyphCount; i += 1) {
+ if (actual->indices[i] != expected->indices[i]) {
+ log_err("Test %s: incorrect index for glyph %d: expected %8X, got %8X\n",
+ testID, i, expected->indices[i], actual->indices[i]);
+ return FALSE;
+ }
+ }
+
+ for (i = 0; i <= actual->glyphCount; i += 1) {
+ double xError = uprv_fabs(actual->positions[i * 2] - expected->positions[i * 2]);
+
+ if (xError > 0.0001) {
+ log_err("Test %s: incorrect x position for glyph %d: expected %f, got %f\n",
+ testID, i, expected->positions[i * 2], actual->positions[i * 2]);
+ return FALSE;
+ }
+
+ double yError = uprv_fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]);
+
+ if (yError < 0) {
+ yError = -yError;
+ }
+
+ if (yError > 0.0001) {
+ log_err("Test %s: incorrect y position for glyph %d: expected %f, got %f\n",
+ testID, i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static void checkFontVersion(PortableFontInstance *fontInstance, const char *testVersionString,
+ le_uint32 testChecksum, const char *testID)
+{
+ le_uint32 fontChecksum = fontInstance->getFontChecksum();
+
+ if (fontChecksum != testChecksum) {
+ const char *fontVersionString = fontInstance->getNameString(NAME_VERSION_STRING,
+ PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH);
+
+ // The standard recommends that the Macintosh Roman/English name string be present, but
+ // if it's not, try the Microsoft Unicode/English string.
+ if (fontVersionString == NULL) {
+ const LEUnicode16 *uversion = fontInstance->getUnicodeNameString(NAME_VERSION_STRING, PLATFORM_MICROSOFT, MICROSOFT_UNICODE_BMP, MICROSOFT_ENGLISH);
+
+ if (uversion != NULL) {
+ const UnicodeString usversion((const UChar *)uversion);
+
+ fontVersionString = getCString(&usversion);
+ fontInstance->deleteNameString(uversion);
+ }
+ }
+
+ log_info("Test %s: this may not be the same font used to generate the test data.\n", testID);
+ log_info("Your font's version string is \"%s\"\n", fontVersionString);
+ log_info("The expected version string is \"%s\"\n", testVersionString);
+ log_info("If you see errors, they may be due to the version of the font you're using.\n");
+
+ fontInstance->deleteNameString(fontVersionString);
+ }
+}
+
+/* Returns the path to icu/source/test/testdata/ */
+const char *getSourceTestData() {
+ const char *srcDataDir = NULL;
+#ifdef U_TOPSRCDIR
+ srcDataDir = U_TOPSRCDIR U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+#else
+ srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+ FILE *f = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"rbbitst.txt", "r");
+
+ if (f != NULL) {
+ /* We're in icu/source/test/letest/ */
+ fclose(f);
+ } else {
+ /* We're in icu/source/test/letest/(Debug|Release) */
+ srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING;
+ }
+#endif
+
+ return srcDataDir;
+}
+
+const char *getPath(char buffer[2048], const char *filename) {
+ const char *testDataDirectory = getSourceTestData();
+
+ strcpy(buffer, testDataDirectory);
+ strcat(buffer, filename);
+
+ return buffer;
+}
+
+le_uint32 *getHexArray(const UnicodeString &numbers, int32_t &arraySize)
+{
+ int32_t offset = -1;
+
+ arraySize = 1;
+ while((offset = numbers.indexOf(CH_COMMA, offset + 1)) >= 0) {
+ arraySize += 1;
+ }
+
+ le_uint32 *array = NEW_ARRAY(le_uint32, arraySize);
+ char number[16];
+ le_int32 count = 0;
+ le_int32 start = 0, end = 0;
+ le_int32 len = 0;
+
+ // trim leading whitespace
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+
+ while((end = numbers.indexOf(CH_COMMA, start)) >= 0) {
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ start = end + 1;
+
+ sscanf(number, "%x", &array[count++]);
+
+ // trim whitespace following the comma
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+ }
+
+ // trim trailing whitespace
+ end = numbers.length();
+ while(u_isUWhiteSpace(numbers[end - 1])) {
+ end -= 1;
+ }
+
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ sscanf(number, "%x", &array[count]);
+
+ return array;
+}
+
+float *getFloatArray(const UnicodeString &numbers, int32_t &arraySize)
+{
+ int32_t offset = -1;
+
+ arraySize = 1;
+ while((offset = numbers.indexOf(CH_COMMA, offset + 1)) >= 0) {
+ arraySize += 1;
+ }
+
+ float *array = NEW_ARRAY(float, arraySize);
+ char number[32];
+ le_int32 count = 0;
+ le_int32 start = 0, end = 0;
+ le_int32 len = 0;
+
+ // trim leading whitespace
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+
+ while((end = numbers.indexOf(CH_COMMA, start)) >= 0) {
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ start = end + 1;
+
+ sscanf(number, "%f", &array[count++]);
+
+ // trim whiteapce following the comma
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+ }
+
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+
+ // trim trailing whitespace
+ end = numbers.length();
+ while(u_isUWhiteSpace(numbers[end - 1])) {
+ end -= 1;
+ }
+
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ sscanf(number, "%f", &array[count]);
+
+ return array;
+}
+
+LEFontInstance *openFont(const char *fontName, const char *checksum, const char *version, const char *testID)
+{
+ char path[2048];
+ PortableFontInstance *font;
+ LEErrorCode fontStatus = LE_NO_ERROR;
+
+
+ font = new PortableFontInstance(getPath(path, fontName), 12, fontStatus);
+
+ if (LE_FAILURE(fontStatus)) {
+ log_info("Test %s: can't open font %s - test skipped.\n", testID, fontName);
+ delete font;
+ return NULL;
+ } else {
+ le_uint32 cksum = 0;
+
+ sscanf(checksum, "%x", &cksum);
+
+ checkFontVersion(font, version, cksum, testID);
+ }
+
+ return font;
+}
+
+U_CDECL_BEGIN
+static void U_CALLCONV DataDrivenTest(void)
+{
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ UErrorCode status = U_ZERO_ERROR;
+ char path[2048];
+ const char *testFilePath = getPath(path, "letest.xml");
+
+ UXMLParser *parser = UXMLParser::createParser(status);
+ UXMLElement *root = parser->parseFile(testFilePath, status);
+
+ if (root == NULL) {
+ log_err("Could not open the test data file: %s\n", testFilePath);
+ delete parser;
+ return;
+ }
+
+ UnicodeString test_case = UNICODE_STRING_SIMPLE("test-case");
+ UnicodeString test_text = UNICODE_STRING_SIMPLE("test-text");
+ UnicodeString test_font = UNICODE_STRING_SIMPLE("test-font");
+ UnicodeString result_glyphs = UNICODE_STRING_SIMPLE("result-glyphs");
+ UnicodeString result_indices = UNICODE_STRING_SIMPLE("result-indices");
+ UnicodeString result_positions = UNICODE_STRING_SIMPLE("result-positions");
+
+ // test-case attributes
+ UnicodeString id_attr = UNICODE_STRING_SIMPLE("id");
+ UnicodeString script_attr = UNICODE_STRING_SIMPLE("script");
+ UnicodeString lang_attr = UNICODE_STRING_SIMPLE("lang");
+
+ // test-font attributes
+ UnicodeString name_attr = UNICODE_STRING_SIMPLE("name");
+ UnicodeString ver_attr = UNICODE_STRING_SIMPLE("version");
+ UnicodeString cksum_attr = UNICODE_STRING_SIMPLE("checksum");
+
+ const UXMLElement *testCase;
+ int32_t tc = 0;
+
+ while((testCase = root->nextChildElement(tc)) != NULL) {
+ if (testCase->getTagName().compare(test_case) == 0) {
+ char *id = getCString(testCase->getAttribute(id_attr));
+ char *script = getCString(testCase->getAttribute(script_attr));
+ char *lang = getCString(testCase->getAttribute(lang_attr));
+ LEFontInstance *font = NULL;
+ const UXMLElement *element;
+ int32_t ec = 0;
+ int32_t charCount = 0;
+ int32_t typoFlags = 3; // kerning + ligatures...
+ UScriptCode scriptCode;
+ le_int32 languageCode = -1;
+ UnicodeString text, glyphs, indices, positions;
+ int32_t glyphCount = 0, indexCount = 0, positionCount = 0;
+ TestResult expected = {0, NULL, NULL, NULL};
+ TestResult actual = {0, NULL, NULL, NULL};
+ LEErrorCode success = LE_NO_ERROR;
+ LayoutEngine *engine = NULL;
+
+ uscript_getCode(script, &scriptCode, 1, &status);
+ if (LE_FAILURE(status)) {
+ log_err("invalid script name: %s.\n", script);
+ goto free_c_strings;
+ }
+
+ if (lang != NULL) {
+ languageCode = getLanguageCode(lang);
+
+ if (languageCode < 0) {
+ log_err("invalid language name: %s.\n", lang);
+ goto free_c_strings;
+ }
+ }
+
+ while((element = testCase->nextChildElement(ec)) != NULL) {
+ UnicodeString tag = element->getTagName();
+
+ // TODO: make sure that each element is only used once.
+ if (tag.compare(test_font) == 0) {
+ char *fontName = getCString(element->getAttribute(name_attr));
+ char *fontVer = getCString(element->getAttribute(ver_attr));
+ char *fontCksum = getCString(element->getAttribute(cksum_attr));
+
+ font = openFont(fontName, fontCksum, fontVer, id);
+ freeCString(fontCksum);
+ freeCString(fontVer);
+ freeCString(fontName);
+
+ if (font == NULL) {
+ // warning message already displayed...
+ goto free_c_strings;
+ }
+ } else if (tag.compare(test_text) == 0) {
+ text = element->getText(TRUE);
+ charCount = text.length();
+ } else if (tag.compare(result_glyphs) == 0) {
+ glyphs = element->getText(TRUE);
+ } else if (tag.compare(result_indices) == 0) {
+ indices = element->getText(TRUE);
+ } else if (tag.compare(result_positions) == 0) {
+ positions = element->getText(TRUE);
+ } else {
+ // an unknown tag...
+ char *cTag = getCString(&tag);
+
+ log_info("Test %s: unknown element with tag \"%s\"\n", id, cTag);
+ freeCString(cTag);
+ }
+ }
+
+ // TODO: make sure that the font, test-text, result-glyphs, result-indices and result-positions
+ // have all been provided
+ if (font == NULL) {
+ LEErrorCode fontStatus = LE_NO_ERROR;
+
+ font = new SimpleFontInstance(12, fontStatus);
+ typoFlags |= 0x80000000L; // use CharSubstitutionFilter...
+ }
+
+ expected.glyphs = (LEGlyphID *) getHexArray(glyphs, glyphCount);
+ expected.indices = (le_int32 *) getHexArray(indices, indexCount);
+ expected.positions = getFloatArray(positions, positionCount);
+
+ expected.glyphCount = glyphCount;
+
+ if (glyphCount < charCount || indexCount != glyphCount || positionCount < glyphCount * 2 + 2) {
+ log_err("Test %s: inconsistent input data: charCount = %d, glyphCount = %d, indexCount = %d, positionCount = %d\n",
+ id, charCount, glyphCount, indexCount, positionCount);
+ goto free_expected;
+ };
+
+ engine = LayoutEngine::layoutEngineFactory(font, scriptCode, languageCode, typoFlags, success);
+
+ if (LE_FAILURE(success)) {
+ log_err("Test %s: could not create a LayoutEngine.\n", id);
+ goto free_expected;
+ }
+
+ actual.glyphCount = engine->layoutChars(text.getBuffer(), 0, charCount, charCount, getRTL(text), 0, 0, success);
+
+ actual.glyphs = NEW_ARRAY(LEGlyphID, actual.glyphCount);
+ actual.indices = NEW_ARRAY(le_int32, actual.glyphCount);
+ actual.positions = NEW_ARRAY(float, actual.glyphCount * 2 + 2);
+
+ engine->getGlyphs(actual.glyphs, success);
+ engine->getCharIndices(actual.indices, success);
+ engine->getGlyphPositions(actual.positions, success);
+
+ compareResults(id, &expected, &actual);
+
+ DELETE_ARRAY(actual.positions);
+ DELETE_ARRAY(actual.indices);
+ DELETE_ARRAY(actual.glyphs);
+
+ delete engine;
+
+free_expected:
+ DELETE_ARRAY(expected.positions);
+ DELETE_ARRAY(expected.indices);
+ DELETE_ARRAY(expected.glyphs);
+
+ delete font;
+
+free_c_strings:
+ freeCString(lang);
+ freeCString(script);
+ freeCString(id);
+ }
+ }
+
+ delete root;
+ delete parser;
+#endif
+}
+U_CDECL_END
+
+U_CDECL_BEGIN
+/*
+ * From ticket:5923:
+ *
+ * Build a paragraph that contains a mixture of left to right and right to left text.
+ * Break it into multiple lines and make sure that the glyphToCharMap for run in each
+ * line is correct.
+ *
+ * Note: it might be a good idea to also check the glyphs and positions for each run,
+ * that we get the expected number of runs per line and that the line breaks are where
+ * we expect them to be. Really, it would be a good idea to make a whole test suite
+ * for ParagraphLayout.
+ */
+static void U_CALLCONV GlyphToCharTest(void)
+{
+ LEErrorCode status = LE_NO_ERROR;
+ LEFontInstance *font;
+ FontRuns fontRuns(0);
+ ParagraphLayout *paragraphLayout;
+ const ParagraphLayout::Line *line;
+ /*
+ * This is the same text that's in <icu>/source/samples/layout/Sample.txt
+ */
+ LEUnicode chars[] = {
+ /*BOM*/ 0x0054, 0x0068, 0x0065, 0x0020, 0x004c, 0x0061, 0x0079,
+ 0x006f, 0x0075, 0x0074, 0x0045, 0x006e, 0x0067, 0x0069, 0x006e,
+ 0x0065, 0x0020, 0x0064, 0x006f, 0x0065, 0x0073, 0x0020, 0x0061,
+ 0x006c, 0x006c, 0x0020, 0x0074, 0x0068, 0x0065, 0x0020, 0x0077,
+ 0x006f, 0x0072, 0x006b, 0x0020, 0x006e, 0x0065, 0x0063, 0x0065,
+ 0x0073, 0x0073, 0x0061, 0x0072, 0x0079, 0x0020, 0x0074, 0x006f,
+ 0x0020, 0x0064, 0x0069, 0x0073, 0x0070, 0x006c, 0x0061, 0x0079,
+ 0x0020, 0x0055, 0x006e, 0x0069, 0x0063, 0x006f, 0x0064, 0x0065,
+ 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x0020, 0x0077, 0x0072,
+ 0x0069, 0x0074, 0x0074, 0x0065, 0x006e, 0x0020, 0x0069, 0x006e,
+ 0x0020, 0x006c, 0x0061, 0x006e, 0x0067, 0x0075, 0x0061, 0x0067,
+ 0x0065, 0x0073, 0x0020, 0x0077, 0x0069, 0x0074, 0x0068, 0x0020,
+ 0x0063, 0x006f, 0x006d, 0x0070, 0x006c, 0x0065, 0x0078, 0x0020,
+ 0x0077, 0x0072, 0x0069, 0x0074, 0x0069, 0x006e, 0x0067, 0x0020,
+ 0x0073, 0x0079, 0x0073, 0x0074, 0x0065, 0x006d, 0x0073, 0x0020,
+ 0x0073, 0x0075, 0x0063, 0x0068, 0x0020, 0x0061, 0x0073, 0x0020,
+ 0x0048, 0x0069, 0x006e, 0x0064, 0x0069, 0x0020, 0x0028, 0x0939,
+ 0x093f, 0x0928, 0x094d, 0x0926, 0x0940, 0x0029, 0x0020, 0x0054,
+ 0x0068, 0x0061, 0x0069, 0x0020, 0x0028, 0x0e44, 0x0e17, 0x0e22,
+ 0x0029, 0x0020, 0x0061, 0x006e, 0x0064, 0x0020, 0x0041, 0x0072,
+ 0x0061, 0x0062, 0x0069, 0x0063, 0x0020, 0x0028, 0x0627, 0x0644,
+ 0x0639, 0x0631, 0x0628, 0x064a, 0x0629, 0x0029, 0x002e, 0x0020,
+ 0x0048, 0x0065, 0x0072, 0x0065, 0x0027, 0x0073, 0x0020, 0x0061,
+ 0x0020, 0x0073, 0x0061, 0x006d, 0x0070, 0x006c, 0x0065, 0x0020,
+ 0x006f, 0x0066, 0x0020, 0x0073, 0x006f, 0x006d, 0x0065, 0x0020,
+ 0x0074, 0x0065, 0x0078, 0x0074, 0x0020, 0x0077, 0x0072, 0x0069,
+ 0x0074, 0x0074, 0x0065, 0x006e, 0x0020, 0x0069, 0x006e, 0x0020,
+ 0x0053, 0x0061, 0x006e, 0x0073, 0x006b, 0x0072, 0x0069, 0x0074,
+ 0x003a, 0x0020, 0x0936, 0x094d, 0x0930, 0x0940, 0x092e, 0x0926,
+ 0x094d, 0x0020, 0x092d, 0x0917, 0x0935, 0x0926, 0x094d, 0x0917,
+ 0x0940, 0x0924, 0x093e, 0x0020, 0x0905, 0x0927, 0x094d, 0x092f,
+ 0x093e, 0x092f, 0x0020, 0x0905, 0x0930, 0x094d, 0x091c, 0x0941,
+ 0x0928, 0x0020, 0x0935, 0x093f, 0x0937, 0x093e, 0x0926, 0x0020,
+ 0x092f, 0x094b, 0x0917, 0x0020, 0x0927, 0x0943, 0x0924, 0x0930,
+ 0x093e, 0x0937, 0x094d, 0x091f, 0x094d, 0x0930, 0x0020, 0x0909,
+ 0x0935, 0x093e, 0x091a, 0x0964, 0x0020, 0x0927, 0x0930, 0x094d,
+ 0x092e, 0x0915, 0x094d, 0x0937, 0x0947, 0x0924, 0x094d, 0x0930,
+ 0x0947, 0x0020, 0x0915, 0x0941, 0x0930, 0x0941, 0x0915, 0x094d,
+ 0x0937, 0x0947, 0x0924, 0x094d, 0x0930, 0x0947, 0x0020, 0x0938,
+ 0x092e, 0x0935, 0x0947, 0x0924, 0x093e, 0x0020, 0x092f, 0x0941,
+ 0x092f, 0x0941, 0x0924, 0x094d, 0x0938, 0x0935, 0x0903, 0x0020,
+ 0x092e, 0x093e, 0x092e, 0x0915, 0x093e, 0x0903, 0x0020, 0x092a,
+ 0x093e, 0x0923, 0x094d, 0x0921, 0x0935, 0x093e, 0x0936, 0x094d,
+ 0x091a, 0x0948, 0x0935, 0x0020, 0x0915, 0x093f, 0x092e, 0x0915,
+ 0x0941, 0x0930, 0x094d, 0x0935, 0x0924, 0x0020, 0x0938, 0x0902,
+ 0x091c, 0x092f, 0x0020, 0x0048, 0x0065, 0x0072, 0x0065, 0x0027,
+ 0x0073, 0x0020, 0x0061, 0x0020, 0x0073, 0x0061, 0x006d, 0x0070,
+ 0x006c, 0x0065, 0x0020, 0x006f, 0x0066, 0x0020, 0x0073, 0x006f,
+ 0x006d, 0x0065, 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x0020,
+ 0x0077, 0x0072, 0x0069, 0x0074, 0x0074, 0x0065, 0x006e, 0x0020,
+ 0x0069, 0x006e, 0x0020, 0x0041, 0x0072, 0x0061, 0x0062, 0x0069,
+ 0x0063, 0x003a, 0x0020, 0x0623, 0x0633, 0x0627, 0x0633, 0x064b,
+ 0x0627, 0x060c, 0x0020, 0x062a, 0x062a, 0x0639, 0x0627, 0x0645,
+ 0x0644, 0x0020, 0x0627, 0x0644, 0x062d, 0x0648, 0x0627, 0x0633,
+ 0x064a, 0x0628, 0x0020, 0x0641, 0x0642, 0x0637, 0x0020, 0x0645,
+ 0x0639, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631, 0x0642, 0x0627,
+ 0x0645, 0x060c, 0x0020, 0x0648, 0x062a, 0x0642, 0x0648, 0x0645,
+ 0x0020, 0x0628, 0x062a, 0x062e, 0x0632, 0x064a, 0x0646, 0x0020,
+ 0x0627, 0x0644, 0x0623, 0x062d, 0x0631, 0x0641, 0x0020, 0x0648,
+ 0x0627, 0x0644, 0x0645, 0x062d, 0x0627, 0x0631, 0x0641, 0x0020,
+ 0x0627, 0x0644, 0x0623, 0x062e, 0x0631, 0x0649, 0x0020, 0x0628,
+ 0x0639, 0x062f, 0x0020, 0x0623, 0x0646, 0x0020, 0x062a, 0x064f,
+ 0x0639, 0x0637, 0x064a, 0x0020, 0x0631, 0x0642, 0x0645, 0x0627,
+ 0x0020, 0x0645, 0x0639, 0x064a, 0x0646, 0x0627, 0x0020, 0x0644,
+ 0x0643, 0x0644, 0x0020, 0x0648, 0x0627, 0x062d, 0x062f, 0x0020,
+ 0x0645, 0x0646, 0x0647, 0x0627, 0x002e, 0x0020, 0x0648, 0x0642,
+ 0x0628, 0x0644, 0x0020, 0x0627, 0x062e, 0x062a, 0x0631, 0x0627,
+ 0x0639, 0x0020, 0x0022, 0x064a, 0x0648, 0x0646, 0x0650, 0x0643,
+ 0x0648, 0x062f, 0x0022, 0x060c, 0x0020, 0x0643, 0x0627, 0x0646,
+ 0x0020, 0x0647, 0x0646, 0x0627, 0x0643, 0x0020, 0x0645, 0x0626,
+ 0x0627, 0x062a, 0x0020, 0x0627, 0x0644, 0x0623, 0x0646, 0x0638,
+ 0x0645, 0x0629, 0x0020, 0x0644, 0x0644, 0x062a, 0x0634, 0x0641,
+ 0x064a, 0x0631, 0x0020, 0x0648, 0x062a, 0x062e, 0x0635, 0x064a,
+ 0x0635, 0x0020, 0x0647, 0x0630, 0x0647, 0x0020, 0x0627, 0x0644,
+ 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x0020, 0x0644, 0x0644,
+ 0x0645, 0x062d, 0x0627, 0x0631, 0x0641, 0x060c, 0x0020, 0x0648,
+ 0x0644, 0x0645, 0x0020, 0x064a, 0x0648, 0x062c, 0x062f, 0x0020,
+ 0x0646, 0x0638, 0x0627, 0x0645, 0x0020, 0x062a, 0x0634, 0x0641,
+ 0x064a, 0x0631, 0x0020, 0x0648, 0x0627, 0x062d, 0x062f, 0x0020,
+ 0x064a, 0x062d, 0x062a, 0x0648, 0x064a, 0x0020, 0x0639, 0x0644,
+ 0x0649, 0x0020, 0x062c, 0x0645, 0x064a, 0x0639, 0x0020, 0x0627,
+ 0x0644, 0x0645, 0x062d, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627,
+ 0x0644, 0x0636, 0x0631, 0x0648, 0x0631, 0x064a, 0x0629, 0x0020,
+ 0x0061, 0x006e, 0x0064, 0x0020, 0x0068, 0x0065, 0x0072, 0x0065,
+ 0x0027, 0x0073, 0x0020, 0x0061, 0x0020, 0x0073, 0x0061, 0x006d,
+ 0x0070, 0x006c, 0x0065, 0x0020, 0x006f, 0x0066, 0x0020, 0x0073,
+ 0x006f, 0x006d, 0x0065, 0x0020, 0x0074, 0x0065, 0x0078, 0x0074,
+ 0x0020, 0x0077, 0x0072, 0x0069, 0x0074, 0x0074, 0x0065, 0x006e,
+ 0x0020, 0x0069, 0x006e, 0x0020, 0x0054, 0x0068, 0x0061, 0x0069,
+ 0x003a, 0x0020, 0x0e1a, 0x0e17, 0x0e17, 0x0e35, 0x0e48, 0x0e51,
+ 0x0e1e, 0x0e32, 0x0e22, 0x0e38, 0x0e44, 0x0e0b, 0x0e42, 0x0e04,
+ 0x0e25, 0x0e19, 0x0e42, 0x0e14, 0x0e42, 0x0e23, 0x0e18, 0x0e35,
+ 0x0e2d, 0x0e32, 0x0e28, 0x0e31, 0x0e22, 0x0e2d, 0x0e22, 0x0e39,
+ 0x0e48, 0x0e17, 0x0e48, 0x0e32, 0x0e21, 0x0e01, 0x0e25, 0x0e32,
+ 0x0e07, 0x0e17, 0x0e38, 0x0e48, 0x0e07, 0x0e43, 0x0e2b, 0x0e0d,
+ 0x0e48, 0x0e43, 0x0e19, 0x0e41, 0x0e04, 0x0e19, 0x0e0b, 0x0e31,
+ 0x0e2a, 0x0e01, 0x0e31, 0x0e1a, 0x0e25, 0x0e38, 0x0e07, 0x0e40,
+ 0x0e2e, 0x0e19, 0x0e23, 0x0e35, 0x0e0a, 0x0e32, 0x0e27, 0x0e44,
+ 0x0e23, 0x0e48, 0x0e41, 0x0e25, 0x0e30, 0x0e1b, 0x0e49, 0x0e32,
+ 0x0e40, 0x0e2d, 0x0e47, 0x0e21, 0x0e20, 0x0e23, 0x0e23, 0x0e22,
+ 0x0e32, 0x0e0a, 0x0e32, 0x0e27, 0x0e44, 0x0e23, 0x0e48, 0x0e1a,
+ 0x0e49, 0x0e32, 0x0e19, 0x0e02, 0x0e2d, 0x0e07, 0x0e1e, 0x0e27,
+ 0x0e01, 0x0e40, 0x0e02, 0x0e32, 0x0e2b, 0x0e25, 0x0e31, 0x0e07,
+ 0x0e40, 0x0e25, 0x0e47, 0x0e01, 0x0e40, 0x0e1e, 0x0e23, 0x0e32,
+ 0x0e30, 0x0e44, 0x0e21, 0x0e49, 0x0e2a, 0x0e23, 0x0e49, 0x0e32,
+ 0x0e07, 0x0e1a, 0x0e49, 0x0e32, 0x0e19, 0x0e15, 0x0e49, 0x0e2d,
+ 0x0e07, 0x0e02, 0x0e19, 0x0e21, 0x0e32, 0x0e14, 0x0e49, 0x0e27,
+ 0x0e22, 0x0e40, 0x0e01, 0x0e27, 0x0e35, 0x0e22, 0x0e19, 0x0e40,
+ 0x0e1b, 0x0e47, 0x0e19, 0x0e23, 0x0e30, 0x0e22, 0x0e30, 0x0e17,
+ 0x0e32, 0x0e07, 0x0e2b, 0x0e25, 0x0e32, 0x0e22, 0x0e44, 0x0e21,
+ 0x0e25, 0x0e4c
+ };
+ le_int32 charCount = LE_ARRAY_SIZE(chars);
+ le_int32 charIndex = 0, lineNumber = 1;
+ const float lineWidth = 600;
+
+ font = new SimpleFontInstance(12, status);
+
+ if (LE_FAILURE(status)) {
+ goto finish;
+ }
+
+ fontRuns.add(font, charCount);
+
+ paragraphLayout = new ParagraphLayout(chars, charCount, &fontRuns, NULL, NULL, NULL, 0, FALSE, status);
+
+ if (LE_FAILURE(status)) {
+ goto close_font;
+ }
+
+ paragraphLayout->reflow();
+ while ((line = paragraphLayout->nextLine(lineWidth)) != NULL) {
+ le_int32 runCount = line->countRuns();
+
+ for(le_int32 run = 0; run < runCount; run += 1) {
+ const ParagraphLayout::VisualRun *visualRun = line->getVisualRun(run);
+ le_int32 glyphCount = visualRun->getGlyphCount();
+ const le_int32 *glyphToCharMap = visualRun->getGlyphToCharMap();
+
+ if (visualRun->getDirection() == UBIDI_RTL) {
+ /*
+ * For a right to left run, make sure that the character indices
+ * increase from the right most glyph to the left most glyph. If
+ * there are any one to many glyph substitutions, we might get several
+ * glyphs in a row with the same character index.
+ */
+ for(le_int32 i = glyphCount - 1; i >= 0; i -= 1) {
+ le_int32 ix = glyphToCharMap[i];
+
+ if (ix != charIndex) {
+ if (ix != charIndex - 1) {
+ log_err("Bad glyph to char index for glyph %d on line %d: expected %d, got %d\n",
+ i, lineNumber, charIndex, ix);
+ goto close_paragraph; // once there's one error, we can't count on anything else...
+ }
+ } else {
+ charIndex += 1;
+ }
+ }
+ } else {
+ /*
+ * We can't just check the order of the character indices
+ * for left to right runs because Indic text might have been
+ * reordered. What we can do is find the minimum and maximum
+ * character indices in the run and make sure that the minimum
+ * is equal to charIndex and then advance charIndex to the maximum.
+ */
+ le_int32 minIndex = 0x7FFFFFFF, maxIndex = -1;
+
+ for(le_int32 i = 0; i < glyphCount; i += 1) {
+ le_int32 ix = glyphToCharMap[i];
+
+ if (ix > maxIndex) {
+ maxIndex = ix;
+ }
+
+ if (ix < minIndex) {
+ minIndex = ix;
+ }
+ }
+
+ if (minIndex != charIndex) {
+ log_err("Bad minIndex for run %d on line %d: expected %d, got %d\n",
+ run, lineNumber, charIndex, minIndex);
+ goto close_paragraph; // once there's one error, we can't count on anything else...
+ }
+
+ charIndex = maxIndex + 1;
+ }
+ }
+
+ lineNumber += 1;
+ }
+close_paragraph:
+ delete paragraphLayout;
+
+close_font:
+ delete font;
+
+finish:
+ return;
+}
+U_CDECL_END
+
+static void addAllTests(TestNode **root)
+{
+ addTest(root, &ScriptTest, "api/ScriptTest");
+ addTest(root, &ParamTest, "api/ParameterTest");
+ addTest(root, &FactoryTest, "api/FactoryTest");
+ addTest(root, &AccessTest, "layout/AccessTest");
+ addTest(root, &DataDrivenTest, "layout/DataDrivenTest");
+ addTest(root, &GlyphToCharTest, "paragraph/GlyphToCharTest");
+
+ addCTests(root);
+}
+
+/* returns the path to icu/source/data/out */
+static const char *ctest_dataOutDir()
+{
+ static const char *dataOutDir = NULL;
+
+ if(dataOutDir) {
+ return dataOutDir;
+ }
+
+ /* U_TOPBUILDDIR is set by the makefiles on UNIXes when building cintltst and intltst
+ // to point to the top of the build hierarchy, which may or
+ // may not be the same as the source directory, depending on
+ // the configure options used. At any rate,
+ // set the data path to the built data from this directory.
+ // The value is complete with quotes, so it can be used
+ // as-is as a string constant.
+ */
+#if defined (U_TOPBUILDDIR)
+ {
+ dataOutDir = U_TOPBUILDDIR "data"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING;
+ }
+#else
+
+ /* On Windows, the file name obtained from __FILE__ includes a full path.
+ * This file is "wherever\icu\source\test\cintltst\cintltst.c"
+ * Change to "wherever\icu\source\data"
+ */
+ {
+ static char p[sizeof(__FILE__) + 20];
+ char *pBackSlash;
+ int i;
+
+ strcpy(p, __FILE__);
+ /* We want to back over three '\' chars. */
+ /* Only Windows should end up here, so looking for '\' is safe. */
+ for (i=1; i<=3; i++) {
+ pBackSlash = strrchr(p, U_FILE_SEP_CHAR);
+ if (pBackSlash != NULL) {
+ *pBackSlash = 0; /* Truncate the string at the '\' */
+ }
+ }
+
+ if (pBackSlash != NULL) {
+ /* We found and truncated three names from the path.
+ * Now append "source\data" and set the environment
+ */
+ strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING);
+ dataOutDir = p;
+ }
+ else {
+ /* __FILE__ on MSVC7 does not contain the directory */
+ FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r");
+ if (file) {
+ fclose(file);
+ dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
+ }
+ else {
+ dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
+ }
+ }
+ }
+#endif
+
+ return dataOutDir;
+}
+
+/* ctest_setICU_DATA - if the ICU_DATA environment variable is not already
+ * set, try to deduce the directory in which ICU was built,
+ * and set ICU_DATA to "icu/source/data" in that location.
+ * The intent is to allow the tests to have a good chance
+ * of running without requiring that the user manually set
+ * ICU_DATA. Common data isn't a problem, since it is
+ * picked up via a static (build time) reference, but the
+ * tests dynamically load some data.
+ */
+static void ctest_setICU_DATA() {
+
+ /* No location for the data dir was identifiable.
+ * Add other fallbacks for the test data location here if the need arises
+ */
+ if (getenv("ICU_DATA") == NULL) {
+ /* If ICU_DATA isn't set, set it to the usual location */
+ u_setDataDirectory(ctest_dataOutDir());
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ int32_t nerrors = 0;
+ TestNode *root = NULL;
+ UErrorCode errorCode = U_ZERO_ERROR;
+ UDate startTime, endTime;
+ int32_t diffTime;
+
+ startTime = uprv_getUTCtime();
+
+ /* Check whether ICU will initialize without forcing the build data directory into
+ * the ICU_DATA path. Success here means either the data dll contains data, or that
+ * this test program was run with ICU_DATA set externally. Failure of this check
+ * is normal when ICU data is not packaged into a shared library.
+ *
+ * Whether or not this test succeeds, we want to cleanup and reinitialize
+ * with a data path so that data loading from individual files can be tested.
+ */
+ u_init(&errorCode);
+
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### Note: ICU Init without build-specific setDataDirectory() failed.\n");
+ }
+
+ u_cleanup();
+ errorCode = U_ZERO_ERROR;
+
+ /* Initialize ICU */
+ ctest_setICU_DATA(); /* u_setDataDirectory() must happen Before u_init() */
+ u_init(&errorCode);
+
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr,
+ "#### ERROR! %s: u_init() failed with status = \"%s\".\n"
+ "*** Check the ICU_DATA environment variable and \n"
+ "*** check that the data files are present.\n", argv[0], u_errorName(errorCode));
+ return 1;
+ }
+
+ addAllTests(&root);
+ nerrors = processArgs(root, argc, argv);
+
+ cleanUpTestTree(root);
+ u_cleanup();
+
+ endTime = uprv_getUTCtime();
+ diffTime = (int32_t)(endTime - startTime);
+ printf("Elapsed Time: %02d:%02d:%02d.%03d\n",
+ (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR),
+ (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE),
+ (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND),
+ (int)(diffTime%U_MILLIS_PER_SECOND));
+
+ return nerrors;
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/letest.h b/Build/source/libs/icu/icu-xetex/test/letest/letest.h
new file mode 100644
index 00000000000..9f066ca8c99
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/letest.h
@@ -0,0 +1,49 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: letest.h
+ *
+ * created on: 11/06/2000
+ * created by: Eric R. Mader
+ */
+
+#ifndef __LETEST_H
+#define __LETEST_H
+
+#include "LETypes.h"
+#include "unicode/ctest.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+U_NAMESPACE_USE
+
+#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+
+#define ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
+
+#define NEW_ARRAY(type,count) (type *) malloc((count) * sizeof(type))
+
+#define DELETE_ARRAY(array) free((void *) (array))
+
+#define GROW_ARRAY(array,newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
+
+struct TestResult
+{
+ le_int32 glyphCount;
+ LEGlyphID *glyphs;
+ le_int32 *indices;
+ float *positions;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct TestResult TestResult;
+#endif
+
+U_CFUNC void addCTests(TestNode **root);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/letest.sln b/Build/source/libs/icu/icu-xetex/test/letest/letest.sln
new file mode 100644
index 00000000000..de181d150ee
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/letest.sln
@@ -0,0 +1,30 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "letest", "letest.vcproj", "{88CD8CC8-2CD7-40D1-8B31-672AF434468B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65} = {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctestfw", "..\..\tools\ctestfw\ctestfw.vcproj", "{E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {88CD8CC8-2CD7-40D1-8B31-672AF434468B}.Debug.ActiveCfg = Debug|Win32
+ {88CD8CC8-2CD7-40D1-8B31-672AF434468B}.Debug.Build.0 = Debug|Win32
+ {88CD8CC8-2CD7-40D1-8B31-672AF434468B}.Release.ActiveCfg = Release|Win32
+ {88CD8CC8-2CD7-40D1-8B31-672AF434468B}.Release.Build.0 = Release|Win32
+ {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Debug.ActiveCfg = Debug|Win32
+ {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Debug.Build.0 = Debug|Win32
+ {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Release.ActiveCfg = Release|Win32
+ {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/letest.vcproj b/Build/source/libs/icu/icu-xetex/test/letest/letest.vcproj
new file mode 100644
index 00000000000..a028ac97a8e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/letest.vcproj
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="letest"
+ ProjectGUID="{67351485-4D18-4245-BE39-A7EF0675ACD2}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/letest.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\tools\ctestfw;..\..\tools\toolutil;..\..\layout"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ TreatWChar_tAsBuiltInType="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/letest.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="../../../lib/icule.lib ../../../lib/icuuc.lib"
+ OutputFile=".\Release/letest.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\Release/letest.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/letest.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\tools\ctestfw;..\..\tools\toolutil;..\..\layout"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ TreatWChar_tAsBuiltInType="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/letest.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=".\Debug/letest.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/letest.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseFAT32Workaround="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\cfonts.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\cletest.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cmaps.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FontTableCache.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\letest.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\letsutil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PortableFontInstance.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleFontInstance.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\xmlreader.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\cfonts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cmaps.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FontTableCache.h"
+ >
+ </File>
+ <File
+ RelativePath=".\letest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\letsutil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PortableFontInstance.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sfnt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleFontInstance.h"
+ >
+ </File>
+ <File
+ RelativePath=".\xmlreader.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/letsutil.cpp b/Build/source/libs/icu/icu-xetex/test/letest/letsutil.cpp
new file mode 100644
index 00000000000..edac65ac9a2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/letsutil.cpp
@@ -0,0 +1,98 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: letsutil.cpp
+ *
+ * created on: 04/25/2006
+ * created by: Eric R. Mader
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+#include "unicode/ubidi.h"
+
+#include "layout/LETypes.h"
+#include "layout/LEScripts.h"
+#include "layout/LayoutEngine.h"
+#include "layout/LELanguages.h"
+
+#include "OpenTypeLayoutEngine.h"
+
+#include "letest.h"
+#include "letsutil.h"
+
+U_NAMESPACE_USE
+
+char *getCString(const UnicodeString *uString)
+{
+ if (uString == NULL) {
+ return NULL;
+ }
+
+ le_int32 uLength = uString->length();
+ le_int32 cLength = uString->extract(0, uLength, NULL, 0, US_INV);
+ char *cString = NEW_ARRAY(char, cLength + 1);
+
+ uString->extract(0, uLength, cString, cLength, US_INV);
+ cString[cLength] = '\0';
+
+ return cString;
+}
+
+char *getUTF8String(const UnicodeString *uString)
+{
+ if (uString == NULL) {
+ return NULL;
+ }
+
+ le_int32 uLength = uString->length();
+ le_int32 cLength = uString->extract(0, uLength, NULL, 0, "UTF-8");
+ char *cString = NEW_ARRAY(char, cLength + 1);
+
+ uString->extract(0, uLength, cString, cLength, "UTF-8");
+
+ cString[cLength] = '\0';
+
+ return cString;
+}
+
+void freeCString(char *cString)
+{
+ DELETE_ARRAY(cString);
+}
+
+le_bool getRTL(const UnicodeString &text)
+{
+ UBiDiLevel paraLevel;
+ UErrorCode status = U_ZERO_ERROR;
+ le_int32 charCount = text.length();
+ UBiDi *ubidi = ubidi_openSized(charCount, 0, &status);
+
+ ubidi_setPara(ubidi, text.getBuffer(), charCount, UBIDI_DEFAULT_LTR, NULL, &status);
+ paraLevel = ubidi_getParaLevel(ubidi);
+ ubidi_close(ubidi);
+
+ return paraLevel & 1;
+}
+
+le_int32 getLanguageCode(const char *lang)
+{
+ if (strlen(lang) != 3) {
+ return -1;
+ }
+
+ LETag langTag = (LETag) ((lang[0] << 24) + (lang[1] << 16) + (lang[2] << 8) + 0x20);
+
+ for (le_int32 i = 0; i < languageCodeCount; i += 1) {
+ if (langTag == OpenTypeLayoutEngine::languageTags[i]) {
+ return i;
+ }
+ }
+
+ return -1;
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/letsutil.h b/Build/source/libs/icu/icu-xetex/test/letest/letsutil.h
new file mode 100644
index 00000000000..b7822e5d900
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/letsutil.h
@@ -0,0 +1,36 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2006, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: letsutil.h
+ *
+ * created on: 04/25/2006
+ * created by: Eric R. Mader
+ */
+
+#ifndef __LETSUTIL_H
+#define __LETSUTIL_H
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+#include "unicode/ubidi.h"
+
+#include "layout/LETypes.h"
+#include "layout/LEScripts.h"
+#include "layout/LayoutEngine.h"
+#include "layout/LELanguages.h"
+
+#include "OpenTypeLayoutEngine.h"
+
+#include "letest.h"
+
+char *getCString(const UnicodeString *uString);
+char *getUTF8String(const UnicodeString *uString);
+void freeCString(char *cString);
+le_bool getRTL(const UnicodeString &text);
+le_int32 getLanguageCode(const char *lang);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/readme.html b/Build/source/libs/icu/icu-xetex/test/letest/readme.html
new file mode 100644
index 00000000000..8e91b9ae254
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/readme.html
@@ -0,0 +1,114 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<meta name="generator" content=
+"HTML Tidy for Windows (vers 26 April 2007), see www.w3.org">
+<meta http-equiv="Content-Type" content=
+"text/html; charset=us-ascii">
+<meta name="Copyright" content=
+"Copyright (c) 2001-2007, International Business Machines Corporation and others. All Rights Reserved.">
+<meta name="Author" content="Eric Mader">
+<meta name="GENERATOR" content=
+"Mozilla/4.72 [en] (Windows NT 5.0; U) [Netscape]">
+<title>Readme file for letest and gendata</title>
+</head>
+<body>
+<h2>What are letest and gendata?</h2>
+letest is a test program that you can use to verify the basic
+functionality of the ICU LayoutEngine. It tests the LayoutEngine's
+API and reads an XML file that contains test cases to test some of
+the features of the LayoutEngine. These test cases are not
+comprehensive, but they do test the most important features of
+&nbsp;the LayoutEngine. When you have successfully run letest, you
+can use the ICU LayoutEngine in you application knowing that the
+basic functionality is working correctly.<br>
+<p>gendata is a program that is used by the ICU team to build the
+file letest.xml which contains the test cases. Unless you have
+changed your copy of the LayoutEngine and want to validate the
+changes on other platforms, there's no reason for you to run this
+program.</p>
+<p>(The ICU team first runs a Windows application which uses the
+ICU LayoutEngine to display the text that letest uses. Once it has
+been verified that the text is displayed correctly, gendata is run
+to produce letest.xml, and then letest is run on Windows to verify
+that letest still works with the new data.)<br></p>
+<h2>How do I build letest?</h2>
+First, you need to build ICU, including the LayoutEngine.&nbsp;
+<p>On Windows, letest is part of the allinone project, so a normal
+build of ICU will also build letest. On UNIX systems, connect to
+&lt;top-build-dir&gt;/test/letest and do "make all" .<br></p>
+<h2>How do I run letest?</h2>
+Before you can run letest, you'll need to get the fonts it uses.
+For legal reasons, we can't include most of them with ICU, but you
+can download them from the web. To do this, you'll need access to a
+computer running Windows. All of the fonts should be stored in
+&lt;icu&gt;/source/test/testdata. Here's how to get the fonts:
+<p>Download a recent version of the Java 2 Platform, Standard
+Edition (J2SE) from <a href=
+"http://java.sun.com/javase/downloads/index.html">java.sun.com</a>.
+Click on the "Download" button for the version of Java that you
+want to download. The page offers both JDKs and JREs. (The JRE is
+sufficient for letest.) The download page will have a link to the
+license agreement. Be sure to read and understand the license
+agreement, and then click on the Accept button. Download the
+package and install it. You'll need one font. On Windows, it will
+be in, for example, "C:\Program Files\Java\jdk1.6.0\jre\lib\fonts".
+The file you want is "LucidaSansRegular.ttf". Copy this file into
+the directory from which you'll run letest.<br></p>
+<p>Next is the Hindi font. Go to the NCST site and download
+<a href="http://tdil.mit.gov.in/download/Raghu.htm">raghu.ttf</a>.
+When you hit the DOWNLOAD button on the page, it will open another
+window which contains a disclaimer and a license agreement. Be sure
+that you understand and agree to all of this before you download
+the font. You can download raghu.ttf into the directory from which
+you'll run letest.<br></p>
+<p>Then download the Thai font. Go to <a href=
+"http://www.into-asia.com/thai_language/thaifont/">into-asia.com</a>
+and click on the link for the Angsana font. This will download a
+.ZIP file. Extract the font file, angsd___.ttf, into the directory
+from which you will run letest.<br></p>
+<p>There's still one more font to get, the Code2000 Unicode font.
+Go to James Kass' <a href="http://www.code2000.net/">Unicode
+Support In Your Browser</a> page and click on the link that says
+"Click Here to download Code2000 shareware demo Unicode font." This
+will download a .ZIP file which contains CODE2000.TTF and
+CODE2000.HTM. Expand this .ZIP file and put the CODE2000.TTF file
+in the directory from which you'll run letest.<br></p>
+<p><span style="font-weight: bold;">Note:</span> The Code2000 font
+is shareware. If you want to use it for longer than a trial period,
+you should send a shareware fee to James. Directions for how to do
+this are in CODE2000.HTM.</p>
+<p>letest.xml references three other fonts:</p>
+<ul>
+<li>ARIALUNI.TTF is Microsoft's Arial Unicode MS font, which is
+distributed with Microsoft Office and is licensed only for use on
+the Windows operating system.</li>
+<li>Devamt.ttf is a proprietary font which cannot be freely
+downloaded.</li>
+<li>TestFont1.otf is included with ICU.</li>
+</ul>
+To run letest type CTRL+F5 in Visual Studio, or "make check" in
+UNIX.&nbsp; If everything's OK you should see something like this:
+<blockquote><tt>&nbsp;/<br>
+&nbsp;/api/<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/api/ParameterTest<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/api/FactoryTest<br>
+&nbsp;/layout/<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/layout/AccessTest<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/layout/DataDrivenTest<br>
+&nbsp;/c_api/<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/c_api/ParameterTest<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/c_api/FactoryTest<br>
+&nbsp;/c_layout/<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/c_layout/AccessTest<br>
+&nbsp;&nbsp; ---[OK]&nbsp; ---/c_layout/DataDrivenTest<br>
+<br>
+[All tests passed successfully...]<br>
+Elapsed Time: 00:00:00.351<br></tt></blockquote>
+If letest cannot open a font, it will print a warning message and
+skip the test. letest will also check the version of the font you
+have to make sure it's the same one that was used to generate the
+test case. If the version doesn't match, letest will print a
+warning message and proceed with the test.<br>
+</body>
+</html>
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/sfnt.h b/Build/source/libs/icu/icu-xetex/test/letest/sfnt.h
new file mode 100644
index 00000000000..f83f9212e35
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/sfnt.h
@@ -0,0 +1,449 @@
+/***************************************************************************
+*
+* Copyright (C) 1998-2008, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+************************************************************************/
+
+#ifndef __SFNT_H
+#define __SFNT_H
+
+#include "LETypes.h"
+
+U_NAMESPACE_USE
+
+#ifndef ANY_NUMBER
+#define ANY_NUMBER 1
+#endif
+
+struct DirectoryEntry
+{
+ le_uint32 tag;
+ le_uint32 checksum;
+ le_uint32 offset;
+ le_uint32 length;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct DirectoryEntry DirectoryEntry;
+#endif
+
+struct SFNTDirectory
+{
+ le_uint32 scalerType;
+ le_uint16 numTables;
+ le_uint16 searchRange;
+ le_uint16 entrySelector;
+ le_uint16 rangeShift;
+ DirectoryEntry tableDirectory[ANY_NUMBER];
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct SFNTDirectory SFNTDirectory;
+#endif
+
+
+struct CMAPEncodingSubtableHeader
+{
+ le_uint16 platformID;
+ le_uint16 platformSpecificID;
+ le_uint32 encodingOffset;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct CMAPEncodingSubtableHeader CMAPEncodingSubtableHeader;
+#endif
+
+struct CMAPTable
+{
+ le_uint16 version;
+ le_uint16 numberSubtables;
+ CMAPEncodingSubtableHeader encodingSubtableHeaders[ANY_NUMBER];
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct CMAPTable CMAPTable;
+#endif
+
+struct CMAPEncodingSubtable
+{
+ le_uint16 format;
+ le_uint16 length;
+ le_uint16 language;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct CMAPEncodingSubtable CMAPEncodingSubtable;
+#endif
+
+#ifdef XP_CPLUSPLUS
+struct CMAPFormat0Encoding : CMAPEncodingSubtable
+{
+ le_uint8 glyphIndexArray[256];
+};
+#else
+struct CMAPFormat0Encoding
+{
+ CMAPEncodingSubtable base;
+
+ le_uint8 glyphIndexArray[256];
+};
+
+typedef struct CMAPFormat0Encoding CMAPFormat0Encoding;
+#endif
+
+struct CMAPFormat2Subheader
+{
+ le_uint16 firstCode;
+ le_uint16 entryCount;
+ le_int16 idDelta;
+ le_uint16 idRangeOffset;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct CMAPFormat2Subheader CMAPFormat2Subheader;
+#endif
+
+#ifdef XP_CPLUSPLUS
+struct CMAPFormat2Encoding : CMAPEncodingSubtable
+{
+ le_uint16 subHeadKeys[256];
+ CMAPFormat2Subheader subheaders[ANY_NUMBER];
+};
+#else
+struct CMAPFormat2Encoding
+{
+ CMAPEncodingSubtable base;
+
+ le_uint16 subHeadKeys[256];
+ CMAPFormat2Subheader subheaders[ANY_NUMBER];
+};
+
+typedef struct CMAPFormat2Encoding CMAPFormat2Encoding;
+#endif
+
+#ifdef XP_CPLUSPLUS
+struct CMAPFormat4Encoding : CMAPEncodingSubtable
+{
+ le_uint16 segCountX2;
+ le_uint16 searchRange;
+ le_uint16 entrySelector;
+ le_uint16 rangeShift;
+ le_uint16 endCodes[ANY_NUMBER];
+/*
+ le_uint16 reservedPad;
+ le_uint16 startCodes[ANY_NUMBER];
+ le_uint16 idDelta[ANY_NUMBER];
+ le_uint16 idRangeOffset[ANY_NUMBER];
+ le_uint16 glyphIndexArray[ANY_NUMBER];
+*/
+};
+#else
+struct CMAPFormat4Encoding
+{
+ CMAPEncodingSubtable base;
+
+ le_uint16 segCountX2;
+ le_uint16 searchRange;
+ le_uint16 entrySelector;
+ le_uint16 rangeShift;
+ le_uint16 endCodes[ANY_NUMBER];
+/*
+// le_uint16 reservedPad;
+// le_uint16 startCodes[ANY_NUMBER];
+// le_uint16 idDelta[ANY_NUMBER];
+// le_uint16 idRangeOffset[ANY_NUMBER];
+// le_uint16 glyphIndexArray[ANY_NUMBER];
+*/
+};
+
+typedef struct CMAPFormat4Encoding CMAPFormat4Encoding;
+#endif
+
+#ifdef XP_CPLUSPLUS
+struct CMAPFormat6Encoding : CMAPEncodingSubtable
+{
+ le_uint16 firstCode;
+ le_uint16 entryCount;
+ le_uint16 glyphIndexArray[ANY_NUMBER];
+};
+#else
+struct CMAPFormat6Encoding
+{
+ CMAPEncodingSubtable base;
+
+ le_uint16 firstCode;
+ le_uint16 entryCount;
+ le_uint16 glyphIndexArray[ANY_NUMBER];
+};
+
+typedef struct CMAPFormat6Encoding CMAPFormat6Encoding;
+#endif
+
+struct CMAPEncodingSubtable32
+{
+ le_uint32 format;
+ le_uint32 length;
+ le_uint32 language;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct CMAPEncodingSubtable32 CMAPEncodingSubtable32;
+#endif
+
+struct CMAPGroup
+{
+ le_uint32 startCharCode;
+ le_uint32 endCharCode;
+ le_uint32 startGlyphCode;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct CMAPGroup CMAPGroup;
+#endif
+
+#ifdef XP_CPLUSPLUS
+struct CMAPFormat8Encoding : CMAPEncodingSubtable32
+{
+ le_uint32 is32[65536/32];
+ le_uint32 nGroups;
+ CMAPGroup groups[ANY_NUMBER];
+};
+#else
+struct CMAPFormat8Encoding
+{
+ CMAPEncodingSubtable32 base;
+
+ le_uint32 is32[65536/32];
+ le_uint32 nGroups;
+ CMAPGroup groups[ANY_NUMBER];
+};
+
+typedef struct CMAPFormat8Encoding CMAPFormat8Encoding;
+#endif
+
+#ifdef XP_CPLUSPLUS
+struct CMAPFormat10Encoding : CMAPEncodingSubtable32
+{
+ le_uint32 startCharCode;
+ le_uint32 numCharCodes;
+ le_uint16 glyphs[ANY_NUMBER];
+};
+#else
+struct CMAPFormat10Encoding
+{
+ CMAPEncodingSubtable32 base;
+
+ le_uint32 startCharCode;
+ le_uint32 numCharCodes;
+ le_uint16 glyphs[ANY_NUMBER];
+};
+
+typedef struct CMAPFormat10Encoding CMAPFormat10Encoding;
+#endif
+
+#ifdef XP_CPLUSPLUS
+struct CMAPFormat12Encoding : CMAPEncodingSubtable32
+{
+ le_uint32 nGroups;
+ CMAPGroup groups[ANY_NUMBER];
+};
+#else
+struct CMAPFormat12Encoding
+{
+ CMAPEncodingSubtable32 base;
+
+ le_uint32 nGroups;
+ CMAPGroup groups[ANY_NUMBER];
+};
+
+typedef struct CMAPFormat12Encoding CMAPFormat12Encoding;
+#endif
+
+typedef le_int32 fixed;
+
+struct BigDate
+{
+ le_uint32 bc;
+ le_uint32 ad;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct BigDate BigDate;
+#endif
+
+struct HEADTable
+{
+ fixed version;
+ fixed fontRevision;
+ le_uint32 checksumAdjustment;
+ le_uint32 magicNumber;
+ le_uint16 flags;
+ le_uint16 unitsPerEm;
+ BigDate created;
+ BigDate modified;
+ le_int16 xMin;
+ le_int16 yMin;
+ le_int16 xMax;
+ le_int16 yMax;
+ le_int16 lowestRecPPEM;
+ le_int16 fontDirectionHint;
+ le_int16 indexToLocFormat;
+ le_int16 glyphDataFormat;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct HEADTable HEADTable;
+#endif
+
+struct MAXPTable
+{
+ fixed version;
+ le_uint16 numGlyphs;
+ le_uint16 maxPoints;
+ le_uint16 maxContours;
+ le_uint16 maxComponentPoints;
+ le_uint16 maxComponentContours;
+ le_uint16 maxZones;
+ le_uint16 maxTwilightPoints;
+ le_uint16 maxStorage;
+ le_uint16 maxFunctionDefs;
+ le_uint16 maxInstructionDefs;
+ le_uint16 maxStackElements;
+ le_uint16 maxSizeOfInstructions;
+ le_uint16 maxComponentElements;
+ le_uint16 maxComponentDepth;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct MAXPTable MAXPTable;
+#endif
+
+struct HHEATable
+{
+ fixed version;
+ le_int16 ascent;
+ le_int16 descent;
+ le_int16 lineGap;
+ le_uint16 advanceWidthMax;
+ le_int16 minLeftSideBearing;
+ le_int16 minRightSideBearing;
+ le_int16 xMaxExtent;
+ le_int16 caretSlopeRise;
+ le_int16 caretSlopeRun;
+ le_int16 caretOffset;
+ le_int16 reserved1;
+ le_int16 reserved2;
+ le_int16 reserved3;
+ le_int16 reserved4;
+ le_int16 metricDataFormat;
+ le_uint16 numOfLongHorMetrics;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct HHEATable HHEATable;
+#endif
+
+struct LongHorMetric
+{
+ le_uint16 advanceWidth;
+ le_int16 leftSideBearing;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct LongHorMetric LongHorMetric;
+#endif
+
+struct HMTXTable
+{
+ LongHorMetric hMetrics[ANY_NUMBER]; /* ANY_NUMBER = numOfLongHorMetrics from hhea table */
+/* le_int16 leftSideBearing[ANY_NUMBER]; ANY_NUMBER = numGlyphs - numOfLongHorMetrics */
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct HMTXTable HMTXTable;
+#endif
+
+enum PlatformID
+{
+ PLATFORM_UNICODE = 0,
+ PLATFORM_MACINTOSH = 1,
+ PLATFORM_ISO = 2,
+ PLATFORM_MICROSOFT = 3,
+ PLATFORM_CUSTOM = 4
+};
+
+enum MacintoshEncodingID
+{
+ MACINTOSH_ROMAN = 0
+};
+
+enum MacintoshLanguageID
+{
+ MACINTOSH_ENGLISH = 0
+};
+
+enum MicrosoftEncodingID
+{
+ MICROSOFT_UNICODE_BMP = 1,
+ MICROSOFT_UNICODE_FULL = 10
+};
+
+enum MicrosoftLanguageID
+{
+ MICROSOFT_ENGLISH = 0x409
+};
+
+enum NameID
+{
+ NAME_COPYRIGHT_NOTICE = 0,
+ NAME_FONT_FAMILY = 1,
+ NAME_FONT_SUB_FAMILY = 2,
+ NAME_UNIQUE_FONT_ID = 3,
+ NAME_FULL_FONT_NAME = 4,
+ NAME_VERSION_STRING = 5,
+ NAME_POSTSCRIPT_NAME = 6,
+ NAME_TRADEMARK = 7,
+ NAME_MANUFACTURER = 8,
+ NAME_DESIGNER = 9,
+ NAME_DESCRIPTION = 10,
+ NAME_VENDOR_URL = 11,
+ NAME_DESIGNER_URL = 12,
+ NAME_LICENSE_DESCRIPTION = 13,
+ NAME_LICENSE_URL = 14,
+ NAME_RESERVED = 15,
+ NAME_PREFERRED_FAMILY = 16,
+ NAME_PREFERRED_SUB_FAMILY = 17,
+ NAME_COMPATIBLE_FULL = 18,
+ NAME_SAMPLE_TEXT = 19,
+ NAME_POSTSCRIPT_CID = 20
+};
+
+struct NameRecord
+{
+ le_uint16 platformID;
+ le_uint16 encodingID;
+ le_uint16 languageID;
+ le_uint16 nameID;
+ le_uint16 length;
+ le_uint16 offset;
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct NameRecord NameRecord;
+#endif
+
+struct NAMETable
+{
+ le_uint16 version;
+ le_uint16 count;
+ le_uint16 stringOffset;
+ NameRecord nameRecords[ANY_NUMBER];
+};
+
+#ifndef XP_CPLUSPLUS
+typedef struct NAMETable NAMETable;
+#endif
+
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/testdata.cpp b/Build/source/libs/icu/icu-xetex/test/letest/testdata.cpp
new file mode 100644
index 00000000000..f0624d2f7de
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/testdata.cpp
@@ -0,0 +1,638 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2005, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT
+ * UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
+ *
+ *******************************************************************************
+ *
+ * file name: testdata.cpp
+ * generated on: 02/28/2005 03:20:06 PM Pacific Standard Time
+ * generated by: gendata.cpp
+ */
+
+#include "LETypes.h"
+#include "LEScripts.h"
+#include "letest.h"
+
+const char *fontVersionString0 = "Version 0.99";
+le_uint32 fontChecksum0 = 0x541C94C7;
+
+LEUnicode inputText0[] =
+{
+ 0x0936, 0x094D, 0x0930, 0x0940, 0x092E, 0x0926, 0x094D, 0x0020,
+ 0x092D, 0x0917, 0x0935, 0x0926, 0x094D, 0x0917, 0x0940, 0x0924,
+ 0x093E, 0x0020, 0x0905, 0x0927, 0x094D, 0x092F, 0x093E, 0x092F,
+ 0x0020, 0x0905, 0x0930, 0x094D, 0x091C, 0x0941, 0x0928, 0x0020,
+ 0x0935, 0x093F, 0x0937, 0x093E, 0x0926, 0x0020, 0x092F, 0x094B,
+ 0x0917, 0x0020, 0x0927, 0x0943, 0x0924, 0x0930, 0x093E, 0x0937,
+ 0x094D, 0x091F, 0x094D, 0x0930, 0x0020, 0x0909, 0x0935, 0x093E,
+ 0x091A, 0x0943, 0x0020, 0x0927, 0x0930, 0x094D, 0x092E, 0x0915,
+ 0x094D, 0x0937, 0x0947, 0x0924, 0x094D, 0x0930, 0x0947, 0x0020,
+ 0x0915, 0x0941, 0x0930, 0x0941, 0x0915, 0x094D, 0x0937, 0x0947,
+ 0x0924, 0x094D, 0x0930, 0x0947, 0x0020, 0x0938, 0x092E, 0x0935,
+ 0x0947, 0x0924, 0x093E, 0x0020, 0x092F, 0x0941, 0x092F, 0x0941,
+ 0x0924, 0x094D, 0x0938, 0x0935, 0x0903, 0x0020, 0x092E, 0x093E,
+ 0x092E, 0x0915, 0x093E, 0x0903, 0x0020, 0x092A, 0x093E, 0x0923,
+ 0x094D, 0x0921, 0x0935, 0x093E, 0x0936, 0x094D, 0x091A, 0x0948,
+ 0x0935, 0x0020, 0x0915, 0x093F, 0x092E, 0x0915, 0x0941, 0x0930,
+ 0x094D, 0x0935, 0x0924, 0x0020, 0x0938, 0x0902, 0x091C, 0x0935
+};
+
+LEGlyphID resultGlyphs0[] =
+{
+ 0x0000012E, 0x0000FFFF, 0x0000FFFF, 0x00000222, 0x00000098, 0x0000026E, 0x0000FFFF, 0x00000003,
+ 0x00000097, 0x00000082, 0x0000009D, 0x000001A5, 0x0000FFFF, 0x0000FFFF, 0x00000222, 0x0000008F,
+ 0x00000221, 0x00000003, 0x0000005C, 0x000000DA, 0x0000FFFF, 0x00000099, 0x00000221, 0x00000099,
+ 0x00000003, 0x0000005C, 0x00000087, 0x000001D5, 0x0000005B, 0x0000FFFF, 0x00000093, 0x00000003,
+ 0x000001D2, 0x0000009D, 0x0000009F, 0x00000221, 0x00000091, 0x00000003, 0x00000099, 0x0000022A,
+ 0x00000082, 0x00000003, 0x00000092, 0x000001D9, 0x0000008F, 0x0000009A, 0x00000221, 0x000001B6,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000060, 0x0000009D, 0x00000221,
+ 0x00000085, 0x000001D9, 0x00000003, 0x00000092, 0x00000098, 0x0000005B, 0x0000FFFF, 0x000000A2,
+ 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x0000011F, 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x00000003,
+ 0x00000080, 0x000001D5, 0x0000009A, 0x000001FD, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x0000022F,
+ 0x0000011F, 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x00000003, 0x000000A0, 0x00000098, 0x0000009D,
+ 0x0000022F, 0x0000008F, 0x00000221, 0x00000003, 0x00000099, 0x000001D5, 0x00000099, 0x000001D5,
+ 0x000000D7, 0x0000FFFF, 0x000000A0, 0x0000009D, 0x0000022C, 0x00000003, 0x00000098, 0x00000221,
+ 0x00000098, 0x00000080, 0x00000221, 0x0000022C, 0x00000003, 0x00000094, 0x00000221, 0x000000D6,
+ 0x0000FFFF, 0x0000008C, 0x0000009D, 0x00000221, 0x000001B1, 0x0000FFFF, 0x0000FFFF, 0x00000230,
+ 0x0000009D, 0x00000003, 0x000001D1, 0x00000080, 0x00000098, 0x00000080, 0x000001D5, 0x0000009D,
+ 0x0000005B, 0x0000FFFF, 0x0000008F, 0x00000003, 0x000000A0, 0x00000232, 0x00000087, 0x0000009D
+};
+
+le_int32 resultGlyphCount0 = 136;
+
+le_int32 resultIndices0[] =
+{
+ 0x00000000, 0x00000002, 0x00000001, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017,
+ 0x00000018, 0x00000019, 0x0000001C, 0x0000001D, 0x0000001A, 0x0000001B, 0x0000001E, 0x0000001F,
+ 0x00000021, 0x00000020, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027,
+ 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F,
+ 0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037,
+ 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003E, 0x0000003C, 0x0000003D, 0x0000003F,
+ 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000045, 0x00000044, 0x00000046, 0x00000047,
+ 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F,
+ 0x00000050, 0x00000052, 0x00000051, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057,
+ 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F,
+ 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067,
+ 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F,
+ 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077,
+ 0x00000078, 0x00000079, 0x0000007B, 0x0000007A, 0x0000007C, 0x0000007D, 0x0000007E, 0x00000081,
+ 0x0000007F, 0x00000080, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087
+};
+
+float resultPositions0[] =
+{
+ 0.000000F, 0.000000F, 9.468750F, 0.000000F, 9.468750F, 0.000000F, 9.468750F, 0.000000F,
+ 13.125000F, 0.000000F, 22.593750F, 0.000000F, 30.562500F, 0.000000F, 30.562500F, 0.000000F,
+ 36.562500F, 0.000000F, 46.031250F, 0.000000F, 55.500000F, 0.000000F, 63.468750F, 0.000000F,
+ 71.437500F, 0.000000F, 71.437500F, 0.000000F, 71.437500F, 0.000000F, 75.093750F, 0.000000F,
+ 83.062500F, 0.000000F, 86.718750F, 0.000000F, 92.718750F, 0.000000F, 102.656250F, 0.000000F,
+ 109.921875F, 0.000000F, 109.921875F, 0.000000F, 119.390625F, 0.000000F, 123.046875F, 0.000000F,
+ 132.515625F, 0.000000F, 138.515625F, 0.000000F, 148.453125F, 0.000000F, 158.203125F, -0.011719F,
+ 158.203125F, 0.263672F, 157.921875F, 0.000000F, 157.921875F, 0.000000F, 167.390625F, 0.000000F,
+ 173.390625F, 0.000000F, 177.750000F, 0.000000F, 185.718750F, 0.000000F, 193.687500F, 0.000000F,
+ 197.343750F, 0.000000F, 205.312500F, 0.000000F, 211.312500F, 0.000000F, 220.781250F, 0.000000F,
+ 224.859375F, 0.000000F, 234.328125F, 0.000000F, 240.328125F, 0.000000F, 250.224609F, -0.011719F,
+ 249.796875F, 0.000000F, 257.765625F, 0.000000F, 264.281250F, 0.000000F, 267.937500F, 0.000000F,
+ 276.281250F, 0.000000F, 276.281250F, 0.000000F, 276.281250F, 0.000000F, 276.281250F, 0.000000F,
+ 276.281250F, 0.000000F, 282.281250F, 0.000000F, 290.250000F, 0.000000F, 298.218750F, 0.000000F,
+ 301.875000F, 0.000000F, 311.859375F, -0.011719F, 311.343750F, 0.000000F, 317.343750F, 0.000000F,
+ 326.812500F, 0.000000F, 336.644531F, 0.263672F, 336.281250F, 0.000000F, 336.281250F, 0.000000F,
+ 347.156250F, 0.000000F, 347.156250F, 0.000000F, 346.353516F, 0.275391F, 347.156250F, 0.000000F,
+ 355.125000F, 0.000000F, 355.125000F, 0.000000F, 355.263672F, 0.263672F, 355.125000F, 0.000000F,
+ 361.125000F, 0.000000F, 368.824219F, -0.011719F, 372.000000F, 0.000000F, 378.515625F, 0.000000F,
+ 379.875000F, 0.000000F, 390.750000F, 0.000000F, 390.750000F, 0.000000F, 389.947266F, 0.275391F,
+ 390.750000F, 0.000000F, 398.718750F, 0.000000F, 398.718750F, 0.000000F, 398.857422F, 0.263672F,
+ 398.718750F, 0.000000F, 404.718750F, 0.000000F, 414.187500F, 0.000000F, 423.656250F, 0.000000F,
+ 430.769531F, 0.263672F, 431.625000F, 0.000000F, 439.593750F, 0.000000F, 443.250000F, 0.000000F,
+ 449.250000F, 0.000000F, 458.859375F, -0.011719F, 458.718750F, 0.000000F, 468.328125F, -0.011719F,
+ 468.187500F, 0.000000F, 474.117188F, 0.000000F, 474.117188F, 0.000000F, 483.585938F, 0.000000F,
+ 491.554688F, 0.000000F, 495.914063F, 0.000000F, 501.914063F, 0.000000F, 511.382813F, 0.000000F,
+ 515.039063F, 0.000000F, 524.507813F, 0.000000F, 535.382813F, 0.000000F, 539.039063F, 0.000000F,
+ 543.398438F, 0.000000F, 549.398438F, 0.000000F, 557.367188F, 0.000000F, 561.023438F, 0.000000F,
+ 568.289063F, 0.000000F, 568.289063F, 0.000000F, 576.257813F, 0.000000F, 584.226563F, 0.000000F,
+ 587.882813F, 0.000000F, 598.757813F, 0.000000F, 598.757813F, 0.000000F, 598.628906F, 0.263672F,
+ 598.757813F, 0.000000F, 606.726563F, 0.000000F, 612.726563F, 0.000000F, 617.085938F, 0.000000F,
+ 627.960938F, 0.000000F, 637.429688F, 0.000000F, 645.128906F, -0.011719F, 648.304688F, 0.000000F,
+ 656.566406F, 0.263672F, 656.273438F, 0.000000F, 656.273438F, 0.000000F, 664.242188F, 0.000000F,
+ 670.242188F, 0.000000F, 679.429688F, 0.966797F, 679.710938F, 0.000000F, 689.179688F, 0.000000F,
+ 697.148438F, 0.000000F
+};
+
+
+const char *fontVersionString1 = "Version 1.14";
+le_uint32 fontChecksum1 = 0x2B6E171D;
+
+LEUnicode inputText1[] =
+{
+ 0x0623, 0x0633, 0x0627, 0x0633, 0x064B, 0x0627, 0x060C, 0x0020,
+ 0x062A, 0x062A, 0x0639, 0x0627, 0x0645, 0x0644, 0x0020, 0x0627,
+ 0x0644, 0x062D, 0x0648, 0x0627, 0x0633, 0x064A, 0x0628, 0x0020,
+ 0x0641, 0x0642, 0x0637, 0x0020, 0x0645, 0x0639, 0x0020, 0x0627,
+ 0x0644, 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x060C, 0x0020,
+ 0x0648, 0x062A, 0x0642, 0x0648, 0x0645, 0x0020, 0x0628, 0x062A,
+ 0x062E, 0x0632, 0x064A, 0x0646, 0x0020, 0x0627, 0x0644, 0x0623,
+ 0x062D, 0x0631, 0x0641, 0x0020, 0x0648, 0x0627, 0x0644, 0x0645,
+ 0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0623,
+ 0x062E, 0x0631, 0x0649, 0x0020, 0x0628, 0x0639, 0x062F, 0x0020,
+ 0x0623, 0x0646, 0x0020, 0x062A, 0x064F, 0x0639, 0x0637, 0x064A,
+ 0x0020, 0x0631, 0x0642, 0x0645, 0x0627, 0x0020, 0x0645, 0x0639,
+ 0x064A, 0x0646, 0x0627, 0x0020, 0x0644, 0x0643, 0x0644, 0x0020,
+ 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0645, 0x0646, 0x0647,
+ 0x0627, 0x002E, 0x0020, 0x0648, 0x0642, 0x0628, 0x0644, 0x0020,
+ 0x0627, 0x062E, 0x062A, 0x0631, 0x0627, 0x0639, 0x0020, 0x0022,
+ 0x064A, 0x0648, 0x0646, 0x0650, 0x0643, 0x0648, 0x062F, 0x0022,
+ 0x060C, 0x0020, 0x0643, 0x0627, 0x0646, 0x0020, 0x0647, 0x0646,
+ 0x0627, 0x0643, 0x0020, 0x0645, 0x0626, 0x0627, 0x062A, 0x0020,
+ 0x0627, 0x0644, 0x0623, 0x0646, 0x0638, 0x0645, 0x0629, 0x0020,
+ 0x0644, 0x0644, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
+ 0x0648, 0x062A, 0x062E, 0x0635, 0x064A, 0x0635, 0x0020, 0x0647,
+ 0x0630, 0x0647, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631, 0x0642,
+ 0x0627, 0x0645, 0x0020, 0x0644, 0x0644, 0x0645, 0x062D, 0x0627,
+ 0x0631, 0x0641, 0x060C, 0x0020, 0x0648, 0x0644, 0x0645, 0x0020,
+ 0x064A, 0x0648, 0x062C, 0x062F, 0x0020, 0x0646, 0x0638, 0x0627,
+ 0x0645, 0x0020, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
+ 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x064A, 0x062D, 0x062A,
+ 0x0648, 0x064A, 0x0020, 0x0639, 0x0644, 0x0649, 0x0020, 0x062C,
+ 0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0645, 0x062D,
+ 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0636, 0x0631,
+ 0x0648, 0x0631, 0x064A, 0x0629
+};
+
+LEGlyphID resultGlyphs1[] =
+{
+ 0x0000C530, 0x0000C58F, 0x0000C549, 0x0000C589, 0x0000C54A, 0x0000C55C, 0x0000C57B, 0x0000C529,
+ 0x00000003, 0x0000C56D, 0x0000C549, 0x0000C52A, 0x0000C540, 0x0000C580, 0x0000C57B, 0x0000C529,
+ 0x00000003, 0x0000C566, 0x0000C590, 0x0000C580, 0x0000C53B, 0x00000003, 0x0000C58C, 0x0000C57C,
+ 0x0000C567, 0x00000003, 0x0000C58D, 0x0000C58A, 0x0000C534, 0x0000C540, 0x0000C58F, 0x00000003,
+ 0x0000C546, 0x0000C53F, 0x0000C529, 0x0000C589, 0x00000003, 0x0000C54A, 0x0000C590, 0x0000C570,
+ 0x0000C554, 0x0000C533, 0x00000003, 0x0000C57D, 0x0000C52A, 0x0000C564, 0x0000C583, 0x00000003,
+ 0x0000C546, 0x0000C53B, 0x0000C58A, 0x0000C58F, 0x00000003, 0x0000C57E, 0x0000C57B, 0x0000C589,
+ 0x00000003, 0x00000528, 0x0000C56D, 0x0000C549, 0x0000C52A, 0x0000C540, 0x0000C580, 0x0000C57C,
+ 0x0000C57B, 0x00000003, 0x0000C57D, 0x0000C52A, 0x0000C573, 0x0000C549, 0x0000FFFE, 0x0000C593,
+ 0x0000C529, 0x00000003, 0x0000C585, 0x0000C548, 0x0000C587, 0x00000003, 0x0000C556, 0x0000C590,
+ 0x0000C558, 0x0000C544, 0x0000C533, 0x0000C589, 0x00000003, 0x0000C54A, 0x0000C590, 0x0000C570,
+ 0x0000C554, 0x0000C534, 0x0000C57C, 0x0000C57B, 0x00000003, 0x0000C530, 0x0000C580, 0x0000C564,
+ 0x0000C583, 0x0000FFFE, 0x0000C593, 0x0000C529, 0x00000003, 0x0000C531, 0x0000C52A, 0x00000530,
+ 0x0000C57F, 0x00000003, 0x0000C575, 0x0000C52A, 0x0000C584, 0x0000C587, 0x00000003, 0x0000C581,
+ 0x0000C52A, 0x0000C577, 0x00000003, 0x00000528, 0x00000005, 0x0000C545, 0x0000C58A, 0x0000C578,
+ 0x00000555, 0x0000C583, 0x0000C58A, 0x0000C58F, 0x00000005, 0x00000003, 0x0000C565, 0x0000C529,
+ 0x0000C54A, 0x0000C534, 0x0000C543, 0x0000C529, 0x00000003, 0x0000C57A, 0x0000C52E, 0x0000C573,
+ 0x0000C589, 0x00000003, 0x00000011, 0x0000C52A, 0x0000C588, 0x0000C584, 0x0000C57F, 0x00000003,
+ 0x0000C546, 0x0000C53F, 0x0000C529, 0x0000C589, 0x00000003, 0x0000C57A, 0x0000C578, 0x0000C57B,
+ 0x00000003, 0x0000C52A, 0x0000C584, 0x0000C590, 0x0000C568, 0x0000C57F, 0x00000003, 0x0000C52A,
+ 0x0000C580, 0x0000C573, 0x0000C549, 0x00000003, 0x0000C58E, 0x0000C560, 0x0000C568, 0x00000554,
+ 0x0000C533, 0x00000003, 0x0000C581, 0x0000C51F, 0x00000003, 0x0000C546, 0x0000C568, 0x0000C52D,
+ 0x00000003, 0x0000C58B, 0x0000C54A, 0x0000C543, 0x0000FFFE, 0x0000C593, 0x0000C529, 0x00000003,
+ 0x0000C56D, 0x0000C549, 0x0000C52A, 0x0000C540, 0x0000C580, 0x0000C57B, 0x0000C529, 0x0000C589,
+ 0x00000003, 0x0000C56D, 0x0000C54A, 0x0000C53F, 0x0000FFFE, 0x0000C593, 0x0000C529, 0x00000003,
+ 0x0000C582, 0x0000C58F, 0x0000C54C, 0x0000C544, 0x0000C534, 0x0000C52D, 0x00000003, 0x0000C57D,
+ 0x0000C58A, 0x0000C574, 0x0000C533, 0x0000C589, 0x00000003, 0x00000528, 0x0000C57D, 0x0000C52A,
+ 0x0000C573, 0x0000C549, 0x0000FFFE, 0x0000C593, 0x0000C529, 0x00000003, 0x0000C566, 0x0000C57F,
+ 0x00000003, 0x0000C55E, 0x0000C574, 0x0000C56F, 0x00000003, 0x0000C52C, 0x0000C590, 0x0000C54F,
+ 0x0000C529, 0x0000C58A, 0x0000C540, 0x0000C57B, 0x0000C529, 0x00000003, 0x0000C57A, 0x0000C57F,
+ 0x0000C52A, 0x0000C568, 0x0000C534, 0x0000C533, 0x00000003, 0x00000528, 0x0000C52A, 0x00000550,
+ 0x0000C54F, 0x0000C52A, 0x0000C54F, 0x0000C51F
+};
+
+le_int32 resultGlyphCount1 = 252;
+
+le_int32 resultIndices1[] =
+{
+ 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4,
+ 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC,
+ 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4,
+ 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC,
+ 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4,
+ 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC,
+ 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4,
+ 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC,
+ 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4,
+ 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC,
+ 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4,
+ 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C,
+ 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094,
+ 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C,
+ 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084,
+ 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C,
+ 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074,
+ 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C,
+ 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064,
+ 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C,
+ 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054,
+ 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C,
+ 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044,
+ 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C,
+ 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034,
+ 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C,
+ 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024,
+ 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C,
+ 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014,
+ 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C,
+ 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004,
+ 0x00000003, 0x00000002, 0x00000001, 0x00000000
+};
+
+float resultPositions1[] =
+{
+ 0.000000F, 0.000000F, 4.007813F, 0.000000F, 8.226563F, 0.000000F, 12.679688F, 0.000000F,
+ 18.679688F, 0.000000F, 23.132813F, 0.000000F, 31.289063F, 0.000000F, 34.312500F, 0.000000F,
+ 36.375000F, 0.000000F, 41.062500F, 0.000000F, 50.296875F, 0.000000F, 54.750000F, 0.000000F,
+ 56.859375F, 0.000000F, 62.367188F, 0.000000F, 66.632813F, 0.000000F, 69.656250F, 0.000000F,
+ 71.718750F, 0.000000F, 76.406250F, 0.000000F, 81.421875F, 0.000000F, 85.664063F, 0.000000F,
+ 89.929688F, 0.000000F, 95.742188F, 0.000000F, 100.429688F, 0.000000F, 108.796875F, 0.000000F,
+ 112.171875F, 0.000000F, 115.734375F, 0.000000F, 120.421875F, 0.000000F, 128.765625F, 0.000000F,
+ 134.765625F, 0.000000F, 139.007813F, 0.000000F, 144.515625F, 0.000000F, 148.734375F, 0.000000F,
+ 153.421875F, 0.000000F, 157.359375F, 0.000000F, 163.171875F, 0.000000F, 165.234375F, 0.000000F,
+ 171.234375F, 0.000000F, 175.921875F, 0.000000F, 180.375000F, 0.000000F, 184.617188F, 0.000000F,
+ 188.085938F, 0.000000F, 195.117188F, 0.000000F, 199.312500F, 0.000000F, 204.000000F, 0.000000F,
+ 208.007813F, 0.000000F, 210.117188F, 0.000000F, 217.054688F, 0.000000F, 220.429688F, 0.000000F,
+ 225.117188F, 0.000000F, 229.054688F, 0.000000F, 234.867188F, 0.000000F, 240.867188F, 0.000000F,
+ 245.085938F, 0.000000F, 249.773438F, 0.000000F, 253.781250F, 0.000000F, 256.804688F, 0.000000F,
+ 262.804688F, 0.000000F, 267.492188F, 0.000000F, 271.007813F, 0.000000F, 280.242188F, 0.000000F,
+ 284.695313F, 0.000000F, 286.804688F, 0.000000F, 292.312500F, 0.000000F, 296.578125F, 0.000000F,
+ 299.953125F, 0.000000F, 302.976563F, 0.000000F, 307.664063F, 0.000000F, 311.671875F, 0.000000F,
+ 313.781250F, 0.000000F, 317.882813F, 0.000000F, 322.335938F, 0.000000F, 322.335938F, 0.000000F,
+ 328.500000F, 0.000000F, 330.562500F, 0.000000F, 335.250000F, 0.000000F, 339.140625F, 0.000000F,
+ 343.078125F, 0.000000F, 348.984375F, 0.000000F, 353.671875F, 0.000000F, 366.445313F, 0.000000F,
+ 370.687500F, 0.000000F, 378.843750F, 0.000000F, 384.351563F, 0.000000F, 388.546875F, 0.000000F,
+ 394.546875F, 0.000000F, 399.234375F, 0.000000F, 403.687500F, 0.000000F, 407.929688F, 0.000000F,
+ 411.398438F, 0.000000F, 418.429688F, 0.000000F, 422.671875F, 0.000000F, 426.046875F, 0.000000F,
+ 429.070313F, 0.000000F, 433.757813F, 0.000000F, 437.765625F, 0.000000F, 442.031250F, 0.000000F,
+ 448.968750F, 0.000000F, 452.343750F, 0.000000F, 452.343750F, 0.000000F, 458.507813F, 0.000000F,
+ 460.570313F, 0.000000F, 465.257813F, 0.000000F, 474.492188F, 0.000000F, 476.601563F, 0.000000F,
+ 484.968750F, 0.000000F, 489.234375F, 0.000000F, 493.921875F, 0.000000F, 501.562500F, 0.000000F,
+ 503.671875F, 0.000000F, 507.890625F, 0.000000F, 513.796875F, 0.000000F, 518.484375F, 0.000000F,
+ 525.796875F, 0.000000F, 527.906250F, 0.000000F, 533.578125F, 0.000000F, 538.265625F, 0.000000F,
+ 541.781250F, 0.000000F, 547.171875F, 0.000000F, 550.710938F, 0.000000F, 556.710938F, 0.000000F,
+ 564.492188F, 0.000000F, 564.492188F, 0.000000F, 567.867188F, 0.000000F, 573.867188F, 0.000000F,
+ 578.085938F, 0.000000F, 583.476563F, 0.000000F, 588.164063F, 0.000000F, 593.976563F, 0.000000F,
+ 596.039063F, 0.000000F, 600.492188F, 0.000000F, 604.734375F, 0.000000F, 610.546875F, 0.000000F,
+ 612.609375F, 0.000000F, 617.296875F, 0.000000F, 623.695313F, 0.000000F, 627.937500F, 0.000000F,
+ 632.039063F, 0.000000F, 638.039063F, 0.000000F, 642.726563F, 0.000000F, 646.054688F, 0.000000F,
+ 648.164063F, 0.000000F, 651.914063F, 0.000000F, 656.132813F, 0.000000F, 660.398438F, 0.000000F,
+ 665.085938F, 0.000000F, 669.023438F, 0.000000F, 674.835938F, 0.000000F, 676.898438F, 0.000000F,
+ 682.898438F, 0.000000F, 687.585938F, 0.000000F, 693.984375F, 0.000000F, 701.765625F, 0.000000F,
+ 704.789063F, 0.000000F, 709.476563F, 0.000000F, 711.585938F, 0.000000F, 715.804688F, 0.000000F,
+ 720.046875F, 0.000000F, 723.515625F, 0.000000F, 727.781250F, 0.000000F, 732.468750F, 0.000000F,
+ 734.578125F, 0.000000F, 738.843750F, 0.000000F, 742.945313F, 0.000000F, 747.398438F, 0.000000F,
+ 752.085938F, 0.000000F, 760.453125F, 0.000000F, 767.390625F, 0.000000F, 770.859375F, 0.000000F,
+ 770.859375F, 0.000000F, 775.054688F, 0.000000F, 779.742188F, 0.000000F, 787.054688F, 0.000000F,
+ 789.398438F, 0.000000F, 794.085938F, 0.000000F, 798.023438F, 0.000000F, 801.492188F, 0.000000F,
+ 804.937500F, 0.000000F, 809.625000F, 0.000000F, 817.968750F, 0.000000F, 822.421875F, 0.000000F,
+ 828.234375F, 0.000000F, 828.234375F, 0.000000F, 834.398438F, 0.000000F, 836.460938F, 0.000000F,
+ 841.148438F, 0.000000F, 850.382813F, 0.000000F, 854.835938F, 0.000000F, 856.945313F, 0.000000F,
+ 862.453125F, 0.000000F, 866.718750F, 0.000000F, 869.742188F, 0.000000F, 871.804688F, 0.000000F,
+ 877.804688F, 0.000000F, 882.492188F, 0.000000F, 891.726563F, 0.000000F, 896.179688F, 0.000000F,
+ 901.992188F, 0.000000F, 901.992188F, 0.000000F, 908.156250F, 0.000000F, 910.218750F, 0.000000F,
+ 914.906250F, 0.000000F, 922.382813F, 0.000000F, 926.601563F, 0.000000F, 931.054688F, 0.000000F,
+ 936.562500F, 0.000000F, 940.804688F, 0.000000F, 944.250000F, 0.000000F, 948.937500F, 0.000000F,
+ 952.945313F, 0.000000F, 958.945313F, 0.000000F, 962.414063F, 0.000000F, 966.609375F, 0.000000F,
+ 972.609375F, 0.000000F, 977.296875F, 0.000000F, 980.812500F, 0.000000F, 984.820313F, 0.000000F,
+ 986.929688F, 0.000000F, 991.031250F, 0.000000F, 995.484375F, 0.000000F, 995.484375F, 0.000000F,
+ 1001.648438F, 0.000000F, 1003.710938F, 0.000000F, 1008.398438F, 0.000000F, 1013.414063F, 0.000000F,
+ 1017.679688F, 0.000000F, 1022.367188F, 0.000000F, 1030.312500F, 0.000000F, 1033.781250F, 0.000000F,
+ 1037.882813F, 0.000000F, 1042.570313F, 0.000000F, 1051.921875F, 0.000000F, 1056.164063F, 0.000000F,
+ 1062.984375F, 0.000000F, 1065.046875F, 0.000000F, 1071.046875F, 0.000000F, 1076.554688F, 0.000000F,
+ 1079.578125F, 0.000000F, 1081.640625F, 0.000000F, 1086.328125F, 0.000000F, 1092.726563F, 0.000000F,
+ 1096.992188F, 0.000000F, 1099.101563F, 0.000000F, 1102.570313F, 0.000000F, 1106.812500F, 0.000000F,
+ 1111.007813F, 0.000000F, 1115.695313F, 0.000000F, 1119.210938F, 0.000000F, 1121.320313F, 0.000000F,
+ 1121.320313F, 0.000000F, 1128.140625F, 0.000000F, 1130.250000F, 0.000000F, 1137.070313F, 0.000000F,
+ 1139.414063F, 0.000000F
+};
+
+
+const char *fontVersionString2 = "Version 1.20 - October 2000";
+le_uint32 fontChecksum2 = 0xF5D9BA6D;
+
+LEUnicode inputText2[] =
+{
+ 0x0623, 0x0633, 0x0627, 0x0633, 0x064B, 0x0627, 0x060C, 0x0020,
+ 0x062A, 0x062A, 0x0639, 0x0627, 0x0645, 0x0644, 0x0020, 0x0627,
+ 0x0644, 0x062D, 0x0648, 0x0627, 0x0633, 0x064A, 0x0628, 0x0020,
+ 0x0641, 0x0642, 0x0637, 0x0020, 0x0645, 0x0639, 0x0020, 0x0627,
+ 0x0644, 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x060C, 0x0020,
+ 0x0648, 0x062A, 0x0642, 0x0648, 0x0645, 0x0020, 0x0628, 0x062A,
+ 0x062E, 0x0632, 0x064A, 0x0646, 0x0020, 0x0627, 0x0644, 0x0623,
+ 0x062D, 0x0631, 0x0641, 0x0020, 0x0648, 0x0627, 0x0644, 0x0645,
+ 0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0623,
+ 0x062E, 0x0631, 0x0649, 0x0020, 0x0628, 0x0639, 0x062F, 0x0020,
+ 0x0623, 0x0646, 0x0020, 0x062A, 0x064F, 0x0639, 0x0637, 0x064A,
+ 0x0020, 0x0631, 0x0642, 0x0645, 0x0627, 0x0020, 0x0645, 0x0639,
+ 0x064A, 0x0646, 0x0627, 0x0020, 0x0644, 0x0643, 0x0644, 0x0020,
+ 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0645, 0x0646, 0x0647,
+ 0x0627, 0x002E, 0x0020, 0x0648, 0x0642, 0x0628, 0x0644, 0x0020,
+ 0x0627, 0x062E, 0x062A, 0x0631, 0x0627, 0x0639, 0x0020, 0x0022,
+ 0x064A, 0x0648, 0x0646, 0x0650, 0x0643, 0x0648, 0x062F, 0x0022,
+ 0x060C, 0x0020, 0x0643, 0x0627, 0x0646, 0x0020, 0x0647, 0x0646,
+ 0x0627, 0x0643, 0x0020, 0x0645, 0x0626, 0x0627, 0x062A, 0x0020,
+ 0x0627, 0x0644, 0x0623, 0x0646, 0x0638, 0x0645, 0x0629, 0x0020,
+ 0x0644, 0x0644, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
+ 0x0648, 0x062A, 0x062E, 0x0635, 0x064A, 0x0635, 0x0020, 0x0647,
+ 0x0630, 0x0647, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631, 0x0642,
+ 0x0627, 0x0645, 0x0020, 0x0644, 0x0644, 0x0645, 0x062D, 0x0627,
+ 0x0631, 0x0641, 0x060C, 0x0020, 0x0648, 0x0644, 0x0645, 0x0020,
+ 0x064A, 0x0648, 0x062C, 0x062F, 0x0020, 0x0646, 0x0638, 0x0627,
+ 0x0645, 0x0020, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
+ 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x064A, 0x062D, 0x062A,
+ 0x0648, 0x064A, 0x0020, 0x0639, 0x0644, 0x0649, 0x0020, 0x062C,
+ 0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0645, 0x062D,
+ 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0636, 0x0631,
+ 0x0648, 0x0631, 0x064A, 0x0629
+};
+
+LEGlyphID resultGlyphs2[] =
+{
+ 0x00000872, 0x000008D1, 0x000003F9, 0x0000040B, 0x0000088C, 0x0000089E, 0x000008BD, 0x000003EF,
+ 0x00000003, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF,
+ 0x00000003, 0x000008A8, 0x000008D2, 0x000008C2, 0x0000087D, 0x00000003, 0x000008CE, 0x000008BE,
+ 0x000008A9, 0x00000003, 0x0000040D, 0x000008CC, 0x00000876, 0x00000882, 0x000008D1, 0x00000003,
+ 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2,
+ 0x00000896, 0x00000875, 0x00000003, 0x00000408, 0x0000086C, 0x000008A6, 0x000008C5, 0x00000003,
+ 0x00000888, 0x0000087D, 0x000008CC, 0x000008D1, 0x00000003, 0x000008C0, 0x000008BD, 0x0000040B,
+ 0x00000003, 0x000003E6, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BE,
+ 0x000008BD, 0x00000003, 0x00000408, 0x0000086C, 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5,
+ 0x000003EF, 0x00000003, 0x0000040A, 0x0000088A, 0x000008C9, 0x00000003, 0x00000898, 0x000008D2,
+ 0x0000089A, 0x00000886, 0x00000875, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2,
+ 0x00000896, 0x00000876, 0x000008BE, 0x000008BD, 0x00000003, 0x00000872, 0x000008C2, 0x000008A6,
+ 0x000008C5, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000003F2, 0x0000086C, 0x0000086A,
+ 0x000008C1, 0x00000003, 0x00000406, 0x0000086C, 0x000008C6, 0x000008C9, 0x00000003, 0x00000409,
+ 0x0000086C, 0x000008B9, 0x00000003, 0x000003E6, 0x00000005, 0x000003F7, 0x000008CC, 0x000008BA,
+ 0x00000413, 0x000008C5, 0x000008CC, 0x000008D1, 0x00000005, 0x00000003, 0x00000401, 0x000003EF,
+ 0x0000088C, 0x00000876, 0x00000885, 0x000003EF, 0x00000003, 0x000008BC, 0x00000870, 0x000008B5,
+ 0x0000040B, 0x00000003, 0x00000011, 0x0000086C, 0x000008CA, 0x000008C6, 0x000008C1, 0x00000003,
+ 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x000008BC, 0x000008BA, 0x000008BD,
+ 0x00000003, 0x0000086C, 0x000008C6, 0x000008D2, 0x000008AA, 0x000008C1, 0x00000003, 0x0000086C,
+ 0x000008C2, 0x000008B5, 0x000003F9, 0x00000003, 0x000008D0, 0x000008A2, 0x000008AA, 0x00000412,
+ 0x00000875, 0x00000003, 0x00000409, 0x000003EB, 0x00000003, 0x00000888, 0x000008AA, 0x0000086F,
+ 0x00000003, 0x0000040C, 0x0000088C, 0x00000885, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003,
+ 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, 0x0000040B,
+ 0x00000003, 0x00000404, 0x0000088C, 0x00000881, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003,
+ 0x000008C4, 0x000008D1, 0x0000088E, 0x00000886, 0x00000876, 0x0000086F, 0x00000003, 0x00000408,
+ 0x000008CC, 0x000008B6, 0x00000875, 0x0000040B, 0x00000003, 0x000003E6, 0x00000408, 0x0000086C,
+ 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000008A8, 0x000008C1,
+ 0x00000003, 0x000008A0, 0x000008B6, 0x000008B1, 0x00000003, 0x0000086E, 0x000008D2, 0x00000891,
+ 0x000003EF, 0x000008CC, 0x00000882, 0x000008BD, 0x000003EF, 0x00000003, 0x000008BC, 0x000008C1,
+ 0x0000086C, 0x000008AA, 0x00000876, 0x00000875, 0x00000003, 0x000003E6, 0x0000086C, 0x0000040E,
+ 0x00000891, 0x0000086C, 0x00000891, 0x000003EB
+};
+
+le_int32 resultGlyphCount2 = 252;
+
+le_int32 resultIndices2[] =
+{
+ 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4,
+ 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC,
+ 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4,
+ 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC,
+ 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4,
+ 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC,
+ 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4,
+ 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC,
+ 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4,
+ 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC,
+ 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4,
+ 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C,
+ 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094,
+ 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C,
+ 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084,
+ 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C,
+ 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074,
+ 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C,
+ 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064,
+ 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C,
+ 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054,
+ 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C,
+ 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044,
+ 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C,
+ 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034,
+ 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C,
+ 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024,
+ 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C,
+ 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014,
+ 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C,
+ 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004,
+ 0x00000003, 0x00000002, 0x00000001, 0x00000000
+};
+
+float resultPositions2[] =
+{
+ 0.000000F, 0.000000F, 6.316406F, 0.000000F, 10.382813F, 0.000000F, 15.492188F, 0.000000F,
+ 21.035156F, 0.000000F, 27.058594F, 0.000000F, 39.527344F, 0.000000F, 43.792969F, 0.000000F,
+ 47.408203F, 0.000000F, 51.205078F, 0.000000F, 66.216797F, 0.000000F, 71.326172F, 0.000000F,
+ 74.695313F, 0.000000F, 83.367188F, 0.000000F, 90.826172F, 0.000000F, 95.091797F, 0.000000F,
+ 98.707031F, 0.000000F, 102.503906F, 0.000000F, 109.962891F, 0.000000F, 114.949219F, 0.000000F,
+ 122.408203F, 0.000000F, 130.687500F, 0.000000F, 134.484375F, 0.000000F, 145.787109F, 0.000000F,
+ 150.773438F, 0.000000F, 156.884766F, 0.000000F, 160.681641F, 0.000000F, 172.277344F, 0.000000F,
+ 177.919922F, 0.000000F, 182.906250F, 0.000000F, 191.578125F, 0.000000F, 195.644531F, 0.000000F,
+ 199.441406F, 0.000000F, 206.507813F, 0.000000F, 214.787109F, 0.000000F, 218.402344F, 0.000000F,
+ 223.945313F, 0.000000F, 227.742188F, 0.000000F, 233.765625F, 0.000000F, 238.751953F, 0.000000F,
+ 245.185547F, 0.000000F, 257.982422F, 0.000000F, 262.048828F, 0.000000F, 265.845703F, 0.000000F,
+ 272.654297F, 0.000000F, 276.023438F, 0.000000F, 285.240234F, 0.000000F, 289.306641F, 0.000000F,
+ 293.103516F, 0.000000F, 300.169922F, 0.000000F, 308.449219F, 0.000000F, 314.091797F, 0.000000F,
+ 318.158203F, 0.000000F, 321.955078F, 0.000000F, 329.572266F, 0.000000F, 333.837891F, 0.000000F,
+ 339.380859F, 0.000000F, 343.177734F, 0.000000F, 346.974609F, 0.000000F, 361.986328F, 0.000000F,
+ 367.095703F, 0.000000F, 370.464844F, 0.000000F, 379.136719F, 0.000000F, 386.595703F, 0.000000F,
+ 391.582031F, 0.000000F, 395.847656F, 0.000000F, 399.644531F, 0.000000F, 406.453125F, 0.000000F,
+ 409.822266F, 0.000000F, 415.523438F, 0.000000F, 420.632813F, 0.000000F, 420.632813F, 0.000000F,
+ 427.441406F, 0.000000F, 431.056641F, 0.000000F, 434.853516F, 0.000000F, 441.357422F, 0.000000F,
+ 448.423828F, 0.000000F, 455.912109F, 0.000000F, 459.708984F, 0.000000F, 479.255859F, 0.000000F,
+ 484.242188F, 0.000000F, 496.710938F, 0.000000F, 505.382813F, 0.000000F, 509.449219F, 0.000000F,
+ 514.992188F, 0.000000F, 518.789063F, 0.000000F, 524.812500F, 0.000000F, 529.798828F, 0.000000F,
+ 536.232422F, 0.000000F, 549.029297F, 0.000000F, 554.015625F, 0.000000F, 559.001953F, 0.000000F,
+ 563.267578F, 0.000000F, 567.064453F, 0.000000F, 573.380859F, 0.000000F, 580.839844F, 0.000000F,
+ 590.056641F, 0.000000F, 594.123047F, 0.000000F, 594.123047F, 0.000000F, 600.931641F, 0.000000F,
+ 604.546875F, 0.000000F, 608.343750F, 0.000000F, 620.636719F, 0.000000F, 624.005859F, 0.000000F,
+ 628.992188F, 0.000000F, 635.830078F, 0.000000F, 639.626953F, 0.000000F, 653.361328F, 0.000000F,
+ 656.730469F, 0.000000F, 661.716797F, 0.000000F, 669.205078F, 0.000000F, 673.001953F, 0.000000F,
+ 683.777344F, 0.000000F, 687.146484F, 0.000000F, 692.660156F, 0.000000F, 696.457031F, 0.000000F,
+ 700.253906F, 0.000000F, 704.736328F, 0.000000F, 711.105469F, 0.000000F, 716.748047F, 0.000000F,
+ 722.994141F, 0.000000F, 722.994141F, 0.000000F, 727.060547F, 0.000000F, 732.703125F, 0.000000F,
+ 736.769531F, 0.000000F, 741.251953F, 0.000000F, 745.048828F, 0.000000F, 752.507813F, 0.000000F,
+ 756.123047F, 0.000000F, 762.146484F, 0.000000F, 767.132813F, 0.000000F, 775.412109F, 0.000000F,
+ 779.027344F, 0.000000F, 782.824219F, 0.000000F, 794.203125F, 0.000000F, 799.189453F, 0.000000F,
+ 804.890625F, 0.000000F, 810.433594F, 0.000000F, 814.230469F, 0.000000F, 818.027344F, 0.000000F,
+ 821.396484F, 0.000000F, 828.128906F, 0.000000F, 833.115234F, 0.000000F, 839.953125F, 0.000000F,
+ 843.750000F, 0.000000F, 850.816406F, 0.000000F, 859.095703F, 0.000000F, 862.710938F, 0.000000F,
+ 868.253906F, 0.000000F, 872.050781F, 0.000000F, 883.429688F, 0.000000F, 889.675781F, 0.000000F,
+ 893.941406F, 0.000000F, 897.738281F, 0.000000F, 901.107422F, 0.000000F, 906.093750F, 0.000000F,
+ 911.080078F, 0.000000F, 917.800781F, 0.000000F, 924.638672F, 0.000000F, 928.435547F, 0.000000F,
+ 931.804688F, 0.000000F, 939.263672F, 0.000000F, 944.964844F, 0.000000F, 950.074219F, 0.000000F,
+ 953.871094F, 0.000000F, 965.173828F, 0.000000F, 974.390625F, 0.000000F, 981.111328F, 0.000000F,
+ 981.111328F, 0.000000F, 985.177734F, 0.000000F, 988.974609F, 0.000000F, 999.750000F, 0.000000F,
+ 1003.365234F, 0.000000F, 1007.162109F, 0.000000F, 1014.228516F, 0.000000F, 1020.949219F, 0.000000F,
+ 1025.015625F, 0.000000F, 1028.812500F, 0.000000F, 1040.408203F, 0.000000F, 1046.431641F, 0.000000F,
+ 1054.710938F, 0.000000F, 1054.710938F, 0.000000F, 1061.519531F, 0.000000F, 1065.134766F, 0.000000F,
+ 1068.931641F, 0.000000F, 1083.943359F, 0.000000F, 1089.052734F, 0.000000F, 1092.421875F, 0.000000F,
+ 1101.093750F, 0.000000F, 1108.552734F, 0.000000F, 1112.818359F, 0.000000F, 1116.433594F, 0.000000F,
+ 1121.976563F, 0.000000F, 1125.773438F, 0.000000F, 1140.785156F, 0.000000F, 1146.808594F, 0.000000F,
+ 1155.087891F, 0.000000F, 1155.087891F, 0.000000F, 1161.896484F, 0.000000F, 1165.511719F, 0.000000F,
+ 1169.308594F, 0.000000F, 1180.541016F, 0.000000F, 1184.607422F, 0.000000F, 1190.630859F, 0.000000F,
+ 1199.302734F, 0.000000F, 1204.289063F, 0.000000F, 1208.355469F, 0.000000F, 1212.152344F, 0.000000F,
+ 1218.960938F, 0.000000F, 1224.603516F, 0.000000F, 1231.037109F, 0.000000F, 1235.103516F, 0.000000F,
+ 1240.646484F, 0.000000F, 1244.443359F, 0.000000F, 1248.240234F, 0.000000F, 1255.048828F, 0.000000F,
+ 1258.417969F, 0.000000F, 1264.119141F, 0.000000F, 1269.228516F, 0.000000F, 1269.228516F, 0.000000F,
+ 1276.037109F, 0.000000F, 1279.652344F, 0.000000F, 1283.449219F, 0.000000F, 1290.908203F, 0.000000F,
+ 1297.746094F, 0.000000F, 1301.542969F, 0.000000F, 1311.427734F, 0.000000F, 1317.861328F, 0.000000F,
+ 1323.562500F, 0.000000F, 1327.359375F, 0.000000F, 1341.492188F, 0.000000F, 1346.478516F, 0.000000F,
+ 1357.904297F, 0.000000F, 1361.519531F, 0.000000F, 1367.162109F, 0.000000F, 1375.833984F, 0.000000F,
+ 1380.099609F, 0.000000F, 1383.714844F, 0.000000F, 1387.511719F, 0.000000F, 1398.890625F, 0.000000F,
+ 1405.728516F, 0.000000F, 1409.097656F, 0.000000F, 1415.818359F, 0.000000F, 1420.804688F, 0.000000F,
+ 1424.871094F, 0.000000F, 1428.667969F, 0.000000F, 1432.464844F, 0.000000F, 1435.833984F, 0.000000F,
+ 1435.833984F, 0.000000F, 1447.259766F, 0.000000F, 1450.628906F, 0.000000F, 1462.054688F, 0.000000F,
+ 1465.669922F, 0.000000F
+};
+
+
+const char *fontVersionString3 = "Version 2.1 - July 1995";
+le_uint32 fontChecksum3 = 0x49B67200;
+
+LEUnicode inputText3[] =
+{
+ 0x0E1A, 0x0E17, 0x0E17, 0x0E35, 0x0E48, 0x0E51, 0x0E1E, 0x0E32,
+ 0x0E22, 0x0E38, 0x0E44, 0x0E0B, 0x0E42, 0x0E04, 0x0E25, 0x0E19,
+ 0x0E42, 0x0E14, 0x0E42, 0x0E23, 0x0E18, 0x0E35, 0x0E2D, 0x0E32,
+ 0x0E28, 0x0E31, 0x0E22, 0x0E2D, 0x0E22, 0x0E39, 0x0E48, 0x0E17,
+ 0x0E48, 0x0E32, 0x0E21, 0x0E01, 0x0E25, 0x0E32, 0x0E07, 0x0E17,
+ 0x0E38, 0x0E48, 0x0E07, 0x0E43, 0x0E2B, 0x0E0D, 0x0E48, 0x0E43,
+ 0x0E19, 0x0E41, 0x0E04, 0x0E19, 0x0E0B, 0x0E31, 0x0E2A, 0x0E01,
+ 0x0E31, 0x0E1A, 0x0E25, 0x0E38, 0x0E07, 0x0E40, 0x0E2E, 0x0E19,
+ 0x0E23, 0x0E35, 0x0E0A, 0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48,
+ 0x0E41, 0x0E25, 0x0E30, 0x0E1B, 0x0E49, 0x0E32, 0x0E40, 0x0E2D,
+ 0x0E47, 0x0E21, 0x0E20, 0x0E23, 0x0E23, 0x0E22, 0x0E32, 0x0E0A,
+ 0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48, 0x0E1A, 0x0E49, 0x0E32,
+ 0x0E19, 0x0E02, 0x0E2D, 0x0E07, 0x0E1E, 0x0E27, 0x0E01, 0x0E40,
+ 0x0E02, 0x0E32, 0x0E2B, 0x0E25, 0x0E31, 0x0E07, 0x0E40, 0x0E25,
+ 0x0E47, 0x0E01, 0x0E40, 0x0E1E, 0x0E23, 0x0E32, 0x0E30, 0x0E44,
+ 0x0E21, 0x0E49, 0x0E2A, 0x0E23, 0x0E49, 0x0E32, 0x0E07, 0x0E1A,
+ 0x0E49, 0x0E32, 0x0E19, 0x0E15, 0x0E49, 0x0E2D, 0x0E07, 0x0E02,
+ 0x0E19, 0x0E21, 0x0E32, 0x0E14, 0x0E49, 0x0E27, 0x0E22, 0x0E40,
+ 0x0E01, 0x0E27, 0x0E35, 0x0E22, 0x0E19, 0x0E40, 0x0E1B, 0x0E47,
+ 0x0E19, 0x0E23, 0x0E30, 0x0E22, 0x0E30, 0x0E17, 0x0E32, 0x0E07,
+ 0x0E2B, 0x0E25, 0x0E32, 0x0E22, 0x0E44, 0x0E21, 0x0E25, 0x0E4C
+};
+
+LEGlyphID resultGlyphs3[] =
+{
+ 0x000000F3, 0x000000F0, 0x000000F0, 0x0000010E, 0x0000011D, 0x00000126, 0x000000F7, 0x0000010B,
+ 0x000000FB, 0x00000111, 0x00000119, 0x000000E4, 0x00000117, 0x000000DD, 0x000000FE, 0x000000F2,
+ 0x00000117, 0x000000ED, 0x00000117, 0x000000FC, 0x000000F1, 0x0000010E, 0x00000106, 0x0000010B,
+ 0x00000101, 0x0000010A, 0x000000FB, 0x00000106, 0x000000FB, 0x00000112, 0x0000013B, 0x000000F0,
+ 0x0000013B, 0x0000010B, 0x000000FA, 0x000000DA, 0x000000FE, 0x0000010B, 0x000000E0, 0x000000F0,
+ 0x00000111, 0x0000013B, 0x000000E0, 0x00000118, 0x00000104, 0x000000E6, 0x0000013B, 0x00000118,
+ 0x000000F2, 0x00000116, 0x000000DD, 0x000000F2, 0x000000E4, 0x0000010A, 0x00000103, 0x000000DA,
+ 0x0000010A, 0x000000F3, 0x000000FE, 0x00000111, 0x000000E0, 0x00000115, 0x00000107, 0x000000F2,
+ 0x000000FC, 0x0000010E, 0x000000E3, 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B,
+ 0x00000116, 0x000000FE, 0x00000109, 0x000000F4, 0x00000137, 0x0000010B, 0x00000115, 0x00000106,
+ 0x0000011C, 0x000000FA, 0x000000F9, 0x000000FC, 0x000000FC, 0x000000FB, 0x0000010B, 0x000000E3,
+ 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B, 0x000000F3, 0x0000013C, 0x0000010B,
+ 0x000000F2, 0x000000DB, 0x00000106, 0x000000E0, 0x000000F7, 0x00000100, 0x000000DA, 0x00000115,
+ 0x000000DB, 0x0000010B, 0x00000104, 0x000000FE, 0x0000010A, 0x000000E0, 0x00000115, 0x000000FE,
+ 0x0000011C, 0x000000DA, 0x00000115, 0x000000F7, 0x000000FC, 0x0000010B, 0x00000109, 0x00000119,
+ 0x000000FA, 0x0000013C, 0x00000103, 0x000000FC, 0x0000013C, 0x0000010B, 0x000000E0, 0x000000F3,
+ 0x0000013C, 0x0000010B, 0x000000F2, 0x000000EE, 0x0000013C, 0x00000106, 0x000000E0, 0x000000DB,
+ 0x000000F2, 0x000000FA, 0x0000010B, 0x000000ED, 0x0000013C, 0x00000100, 0x000000FB, 0x00000115,
+ 0x000000DA, 0x00000100, 0x0000010E, 0x000000FB, 0x000000F2, 0x00000115, 0x000000F4, 0x00000143,
+ 0x000000F2, 0x000000FC, 0x00000109, 0x000000FB, 0x00000109, 0x000000F0, 0x0000010B, 0x000000E0,
+ 0x00000104, 0x000000FE, 0x0000010B, 0x000000FB, 0x00000119, 0x000000FA, 0x000000FE, 0x0000013F
+};
+
+le_int32 resultGlyphCount3 = 168;
+
+le_int32 resultIndices3[] =
+{
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017,
+ 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F,
+ 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027,
+ 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F,
+ 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037,
+ 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F,
+ 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047,
+ 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F,
+ 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057,
+ 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F,
+ 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067,
+ 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F,
+ 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077,
+ 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F,
+ 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087,
+ 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F,
+ 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097,
+ 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F,
+ 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7
+};
+
+float resultPositions3[] =
+{
+ 0.000000F, 0.000000F, 5.399414F, 0.000000F, 10.798828F, 0.000000F, 16.198242F, 0.000000F,
+ 16.198242F, 0.000000F, 16.198242F, 0.000000F, 21.046875F, 0.000000F, 26.616211F, 0.000000F,
+ 30.035156F, 0.000000F, 34.151367F, 0.000000F, 34.151367F, 0.000000F, 38.279297F, 0.000000F,
+ 43.558594F, 0.000000F, 47.663086F, 0.000000F, 52.438477F, 0.000000F, 57.178711F, 0.000000F,
+ 62.698242F, 0.000000F, 66.802734F, 0.000000F, 71.601563F, 0.000000F, 75.706055F, 0.000000F,
+ 79.810547F, 0.000000F, 84.369141F, 0.000000F, 84.369141F, 0.000000F, 89.097656F, 0.000000F,
+ 92.516602F, 0.000000F, 97.195313F, 0.000000F, 97.195313F, 0.000000F, 101.311523F, 0.000000F,
+ 106.040039F, 0.000000F, 110.156250F, 0.000000F, 110.156250F, 0.000000F, 110.156250F, 0.000000F,
+ 115.555664F, 0.000000F, 115.555664F, 0.000000F, 118.974609F, 0.000000F, 124.013672F, 0.000000F,
+ 128.765625F, 0.000000F, 133.505859F, 0.000000F, 136.924805F, 0.000000F, 140.704102F, 0.000000F,
+ 146.103516F, 0.000000F, 146.103516F, 0.000000F, 146.103516F, 0.000000F, 149.882813F, 0.000000F,
+ 153.553711F, 0.000000F, 159.158203F, 0.000000F, 165.421875F, 0.000000F, 165.421875F, 0.000000F,
+ 169.092773F, 0.000000F, 174.612305F, 0.000000F, 179.135742F, 0.000000F, 183.911133F, 0.000000F,
+ 189.430664F, 0.000000F, 194.709961F, 0.000000F, 194.709961F, 0.000000F, 199.989258F, 0.000000F,
+ 204.741211F, 0.000000F, 204.741211F, 0.000000F, 210.140625F, 0.000000F, 214.880859F, 0.000000F,
+ 214.880859F, 0.000000F, 218.660156F, 0.000000F, 220.675781F, 0.000000F, 225.128906F, 0.000000F,
+ 230.648438F, 0.000000F, 234.752930F, 0.000000F, 234.752930F, 0.000000F, 239.613281F, 0.000000F,
+ 243.032227F, 0.000000F, 247.280273F, 0.000000F, 251.408203F, 0.000000F, 255.512695F, 0.000000F,
+ 255.512695F, 0.000000F, 260.036133F, 0.000000F, 264.776367F, 0.000000F, 269.071289F, 0.000000F,
+ 274.470703F, 0.000000F, 274.470703F, 0.000000F, 277.889648F, 0.000000F, 279.905273F, 0.000000F,
+ 284.633789F, 0.000000F, 284.633789F, 0.000000F, 289.672852F, 0.000000F, 294.641602F, 0.000000F,
+ 298.746094F, 0.000000F, 302.850586F, 0.000000F, 306.966797F, 0.000000F, 310.385742F, 0.000000F,
+ 315.246094F, 0.000000F, 318.665039F, 0.000000F, 322.913086F, 0.000000F, 327.041016F, 0.000000F,
+ 331.145508F, 0.000000F, 331.145508F, 0.000000F, 336.544922F, 0.000000F, 336.544922F, 0.000000F,
+ 339.963867F, 0.000000F, 345.483398F, 0.000000F, 350.258789F, 0.000000F, 354.987305F, 0.000000F,
+ 358.766602F, 0.000000F, 364.335938F, 0.000000F, 368.583984F, 0.000000F, 373.335938F, 0.000000F,
+ 375.351563F, 0.000000F, 380.126953F, 0.000000F, 383.545898F, 0.000000F, 389.150391F, 0.000000F,
+ 393.890625F, 0.000000F, 393.890625F, 0.000000F, 397.669922F, 0.000000F, 399.685547F, 0.000000F,
+ 404.425781F, 0.000000F, 404.425781F, 0.000000F, 409.177734F, 0.000000F, 411.193359F, 0.000000F,
+ 416.762695F, 0.000000F, 420.867188F, 0.000000F, 424.286133F, 0.000000F, 428.581055F, 0.000000F,
+ 432.708984F, 0.000000F, 437.748047F, 0.000000F, 437.748047F, 0.000000F, 443.027344F, 0.000000F,
+ 447.131836F, 0.000000F, 447.131836F, 0.000000F, 450.550781F, 0.000000F, 454.330078F, 0.000000F,
+ 459.729492F, 0.000000F, 459.729492F, 0.000000F, 463.148438F, 0.000000F, 468.667969F, 0.000000F,
+ 473.478516F, 0.000000F, 473.478516F, 0.000000F, 478.207031F, 0.000000F, 481.986328F, 0.000000F,
+ 486.761719F, 0.000000F, 492.281250F, 0.000000F, 497.320313F, 0.000000F, 500.739258F, 0.000000F,
+ 505.538086F, 0.000000F, 505.538086F, 0.000000F, 509.786133F, 0.000000F, 513.902344F, 0.000000F,
+ 515.917969F, 0.000000F, 520.669922F, 0.000000F, 524.917969F, 0.000000F, 524.917969F, 0.000000F,
+ 529.034180F, 0.000000F, 534.553711F, 0.000000F, 536.569336F, 0.000000F, 541.968750F, 0.000000F,
+ 541.968750F, 0.000000F, 547.488281F, 0.000000F, 551.592773F, 0.000000F, 555.887695F, 0.000000F,
+ 560.003906F, 0.000000F, 564.298828F, 0.000000F, 569.698242F, 0.000000F, 573.117188F, 0.000000F,
+ 576.896484F, 0.000000F, 582.500977F, 0.000000F, 587.241211F, 0.000000F, 590.660156F, 0.000000F,
+ 594.776367F, 0.000000F, 598.904297F, 0.000000F, 603.943359F, 0.000000F, 608.683594F, 0.000000F,
+ 608.683594F, 0.000000F
+};
+
+
+TestInput testInputs[] =
+{
+ {"raghu.ttf", fontVersionString0, fontChecksum0, inputText0, 136, devaScriptCode, FALSE},
+ {"CODE2000.TTF", fontVersionString1, fontChecksum1, inputText1, 252, arabScriptCode, TRUE},
+ {"LucidaSansRegular.ttf", fontVersionString2, fontChecksum2, inputText2, 252, arabScriptCode, TRUE},
+ {"angsd___.ttf", fontVersionString3, fontChecksum3, inputText3, 168, thaiScriptCode, FALSE},
+};
+
+le_int32 testCount = ARRAY_LENGTH(testInputs);
+
+TestResult testResults[] =
+{
+ {resultGlyphCount0, resultGlyphs0, resultIndices0, resultPositions0},
+ {resultGlyphCount1, resultGlyphs1, resultIndices1, resultPositions1},
+ {resultGlyphCount2, resultGlyphs2, resultIndices2, resultPositions2},
+ {resultGlyphCount3, resultGlyphs3, resultIndices3, resultPositions3},
+};
+
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/xmlreader.cpp b/Build/source/libs/icu/icu-xetex/test/letest/xmlreader.cpp
new file mode 100644
index 00000000000..c84dc8ce28c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/xmlreader.cpp
@@ -0,0 +1,259 @@
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/uclean.h"
+#include "unicode/uchar.h"
+#include "unicode/unistr.h"
+#include "unicode/uscript.h"
+#include "unicode/putil.h"
+#include "unicode/ctest.h"
+
+#include "layout/LETypes.h"
+#include "layout/LEScripts.h"
+
+#include "letsutil.h"
+#include "letest.h"
+
+#include "xmlreader.h"
+
+#include "xmlparser.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+//U_NAMESPACE_USE
+
+#define CH_COMMA 0x002C
+
+static le_uint32 *getHexArray(const UnicodeString &numbers, int32_t &arraySize)
+{
+ int32_t offset = -1;
+
+ arraySize = 1;
+ while((offset = numbers.indexOf(CH_COMMA, offset + 1)) >= 0) {
+ arraySize += 1;
+ }
+
+ le_uint32 *array = NEW_ARRAY(le_uint32, arraySize);
+ char number[16];
+ le_int32 count = 0;
+ le_int32 start = 0, end = 0;
+ le_int32 len = 0;
+
+ // trim leading whitespace
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+
+ while((end = numbers.indexOf(CH_COMMA, start)) >= 0) {
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ start = end + 1;
+
+ sscanf(number, "%x", &array[count++]);
+
+ // trim whitespace following the comma
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+ }
+
+ // trim trailing whitespace
+ end = numbers.length();
+ while(u_isUWhiteSpace(numbers[end - 1])) {
+ end -= 1;
+ }
+
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ sscanf(number, "%x", &array[count]);
+
+ return array;
+}
+
+static float *getFloatArray(const UnicodeString &numbers, int32_t &arraySize)
+{
+ int32_t offset = -1;
+
+ arraySize = 1;
+ while((offset = numbers.indexOf(CH_COMMA, offset + 1)) >= 0) {
+ arraySize += 1;
+ }
+
+ float *array = NEW_ARRAY(float, arraySize);
+ char number[32];
+ le_int32 count = 0;
+ le_int32 start = 0, end = 0;
+ le_int32 len = 0;
+
+ // trim leading whitespace
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+
+ while((end = numbers.indexOf(CH_COMMA, start)) >= 0) {
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ start = end + 1;
+
+ sscanf(number, "%f", &array[count++]);
+
+ // trim whiteapce following the comma
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+ }
+
+ while(u_isUWhiteSpace(numbers[start])) {
+ start += 1;
+ }
+
+ // trim trailing whitespace
+ end = numbers.length();
+ while(u_isUWhiteSpace(numbers[end - 1])) {
+ end -= 1;
+ }
+
+ len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV);
+ number[len] = '\0';
+ sscanf(number, "%f", &array[count]);
+
+ return array;
+}
+
+U_CDECL_BEGIN
+void readTestFile(const char *testFilePath, TestCaseCallback callback)
+{
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+ UErrorCode status = U_ZERO_ERROR;
+ UXMLParser *parser = UXMLParser::createParser(status);
+ UXMLElement *root = parser->parseFile(testFilePath, status);
+
+ if (root == NULL) {
+ log_err("Could not open the test data file: %s\n", testFilePath);
+ delete parser;
+ return;
+ }
+
+ UnicodeString test_case = UNICODE_STRING_SIMPLE("test-case");
+ UnicodeString test_text = UNICODE_STRING_SIMPLE("test-text");
+ UnicodeString test_font = UNICODE_STRING_SIMPLE("test-font");
+ UnicodeString result_glyphs = UNICODE_STRING_SIMPLE("result-glyphs");
+ UnicodeString result_indices = UNICODE_STRING_SIMPLE("result-indices");
+ UnicodeString result_positions = UNICODE_STRING_SIMPLE("result-positions");
+
+ // test-case attributes
+ UnicodeString id_attr = UNICODE_STRING_SIMPLE("id");
+ UnicodeString script_attr = UNICODE_STRING_SIMPLE("script");
+ UnicodeString lang_attr = UNICODE_STRING_SIMPLE("lang");
+
+ // test-font attributes
+ UnicodeString name_attr = UNICODE_STRING_SIMPLE("name");
+ UnicodeString ver_attr = UNICODE_STRING_SIMPLE("version");
+ UnicodeString cksum_attr = UNICODE_STRING_SIMPLE("checksum");
+
+ const UXMLElement *testCase;
+ int32_t tc = 0;
+
+ while((testCase = root->nextChildElement(tc)) != NULL) {
+ if (testCase->getTagName().compare(test_case) == 0) {
+ char *id = getCString(testCase->getAttribute(id_attr));
+ char *script = getCString(testCase->getAttribute(script_attr));
+ char *lang = getCString(testCase->getAttribute(lang_attr));
+ char *fontName = NULL;
+ char *fontVer = NULL;
+ char *fontCksum = NULL;
+ const UXMLElement *element;
+ int32_t ec = 0;
+ int32_t charCount = 0;
+ int32_t typoFlags = 3; // kerning + ligatures...
+ UScriptCode scriptCode;
+ le_int32 languageCode = -1;
+ UnicodeString text, glyphs, indices, positions;
+ int32_t glyphCount = 0, indexCount = 0, positionCount = 0;
+ TestResult expected = {0, NULL, NULL, NULL};
+
+ uscript_getCode(script, &scriptCode, 1, &status);
+ if (LE_FAILURE(status)) {
+ log_err("invalid script name: %s.\n", script);
+ goto free_c_strings;
+ }
+
+ if (lang != NULL) {
+ languageCode = getLanguageCode(lang);
+
+ if (languageCode < 0) {
+ log_err("invalid language name: %s.\n", lang);
+ goto free_c_strings;
+ }
+ }
+
+ while((element = testCase->nextChildElement(ec)) != NULL) {
+ UnicodeString tag = element->getTagName();
+
+ // TODO: make sure that each element is only used once.
+ if (tag.compare(test_font) == 0) {
+ fontName = getCString(element->getAttribute(name_attr));
+ fontVer = getCString(element->getAttribute(ver_attr));
+ fontCksum = getCString(element->getAttribute(cksum_attr));
+
+ } else if (tag.compare(test_text) == 0) {
+ text = element->getText(TRUE);
+ charCount = text.length();
+ } else if (tag.compare(result_glyphs) == 0) {
+ glyphs = element->getText(TRUE);
+ } else if (tag.compare(result_indices) == 0) {
+ indices = element->getText(TRUE);
+ } else if (tag.compare(result_positions) == 0) {
+ positions = element->getText(TRUE);
+ } else {
+ // an unknown tag...
+ char *cTag = getCString(&tag);
+
+ log_info("Test %s: unknown element with tag \"%s\"\n", id, cTag);
+ freeCString(cTag);
+ }
+ }
+
+ expected.glyphs = (LEGlyphID *) getHexArray(glyphs, glyphCount);
+ expected.indices = (le_int32 *) getHexArray(indices, indexCount);
+ expected.positions = getFloatArray(positions, positionCount);
+
+ expected.glyphCount = glyphCount;
+
+ if (glyphCount < charCount || indexCount != glyphCount || positionCount < glyphCount * 2 + 2) {
+ log_err("Test %s: inconsistent input data: charCount = %d, glyphCount = %d, indexCount = %d, positionCount = %d\n",
+ id, charCount, glyphCount, indexCount, positionCount);
+ goto free_expected;
+ };
+
+ (*callback)(id, fontName, fontVer, fontCksum, scriptCode, languageCode, text.getBuffer(), charCount, &expected);
+
+free_expected:
+ DELETE_ARRAY(expected.positions);
+ DELETE_ARRAY(expected.indices);
+ DELETE_ARRAY(expected.glyphs);
+
+free_c_strings:
+ freeCString(fontCksum);
+ freeCString(fontVer);
+ freeCString(fontName);
+ freeCString(lang);
+ freeCString(script);
+ freeCString(id);
+ }
+ }
+
+ delete root;
+ delete parser;
+#endif
+}
+U_CDECL_END
diff --git a/Build/source/libs/icu/icu-xetex/test/letest/xmlreader.h b/Build/source/libs/icu/icu-xetex/test/letest/xmlreader.h
new file mode 100644
index 00000000000..be47b562795
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/letest/xmlreader.h
@@ -0,0 +1,25 @@
+/*
+ *
+ * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
+ *
+ */
+
+#ifndef __XMLREADER_H
+#define __XMLREADER_H
+
+#include "LETypes.h"
+#include "letest.h"
+
+typedef void (*TestCaseCallback) (const char *testID,
+ const char *fontName,
+ const char *fontVersion,
+ const char *fontChecksum,
+ le_int32 scriptCode,
+ le_int32 languageCode,
+ const LEUnicode *text,
+ le_int32 charCount,
+ TestResult *expected);
+
+U_CAPI void readTestFile(const char *testFilePath, TestCaseCallback callback);
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf.pl
new file mode 100755
index 00000000000..ef5e1cf2e9e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"Character property performance: ICU vs. STDLib",
+ "headers"=>"StdLib ICU",
+ "operationIs"=>"code point",
+ "timePerOperationIs"=>"Time per code point",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"../results"
+ };
+
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "charperf.exe";
+
+my $tests = {
+"isAlpha", ["$p TestStdLibIsAlpha" , "$p TestIsAlpha" ],
+"isUpper", ["$p TestStdLibIsUpper" , "$p TestIsUpper" ],
+"isLower", ["$p TestStdLibIsLower" , "$p TestIsLower" ],
+"isDigit", ["$p TestStdLibIsDigit" , "$p TestIsDigit" ],
+"isSpace", ["$p TestStdLibIsSpace" , "$p TestIsSpace" ],
+"isAlphaNumeric", ["$p TestStdLibIsAlphaNumeric" , "$p TestIsAlphaNumeric" ],
+"isPrint", ["$p TestStdLibIsPrint" , "$p TestIsPrint" ],
+"isControl", ["$p TestStdLibIsControl" , "$p TestIsControl" ],
+"toLower", ["$p TestStdLibToLower" , "$p TestToLower" ],
+"toUpper", ["$p TestStdLibToUpper" , "$p TestToUpper" ],
+"isWhiteSpace", ["$p TestStdLibIsWhiteSpace" , "$p TestIsWhiteSpace" ],
+};
+
+my $dataFiles;
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf_r.pl
new file mode 100644
index 00000000000..a6f95842e8f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf_r.pl
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002-2007, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+#Assume we are running outside of the icu source
+use lib './icu-3.0/icu/source/test/perf/perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"Character property performance regression (ICU 2.8 and 3.0)",
+ "headers"=>"ICU28 ICU30",
+ "operationIs"=>"code point",
+ "timePerOperationIs"=>"Time per code point",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"results_ICU4C"
+ };
+
+# programs
+
+my $p1 = "icu-2.8/icu/bin/charperf28.exe";
+my $p2 = "icu-3.0/icu/bin/charperf30.exe";
+
+my $dataFiles = "";
+
+
+my $tests = {
+"isAlpha", ["$p1 TestIsAlpha" , "$p2 TestIsAlpha" ],
+"isUpper", ["$p1 TestIsUpper" , "$p2 TestIsUpper" ],
+"isLower", ["$p1 TestIsLower" , "$p2 TestIsLower" ],
+"isDigit", ["$p1 TestIsDigit" , "$p2 TestIsDigit" ],
+"isSpace", ["$p1 TestIsSpace" , "$p2 TestIsSpace" ],
+"isAlphaNumeric", ["$p1 TestIsAlphaNumeric" , "$p2 TestIsAlphaNumeric" ],
+"isPrint", ["$p1 TestIsPrint" , "$p2 TestIsPrint" ],
+"isControl", ["$p1 TestIsControl" , "$p2 TestIsControl" ],
+"toLower", ["$p1 TestToLower" , "$p2 TestToLower" ],
+"toUpper", ["$p1 TestToUpper" , "$p2 TestToUpper" ],
+"isWhiteSpace", ["$p1 TestIsWhiteSpace" , "$p2 TestIsWhiteSpace" ],
+};
+
+runTests($options, $tests, $dataFiles);
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/charperf/Makefile.in
new file mode 100644
index 00000000000..610b90d84ca
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/charperf
+## Copyright (c) 2001-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/charperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = charperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = charperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.cpp
new file mode 100644
index 00000000000..c964625bf2f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.cpp
@@ -0,0 +1,255 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (C) 2002-2006 IBM, Inc. All Rights Reserved.
+ *
+ ********************************************************************/
+/*****************************************************************************
+* File charperf.cpp
+*
+* Modification History:
+* Name Description
+* Syn Wee Quek First Version
+******************************************************************************
+*/
+
+/**
+ * This program tests character properties performance.
+ * APIs tested:
+ * ICU4C
+ * Windows
+ */
+
+#include "charperf.h"
+#include "uoptions.h"
+
+UOption options[] = {
+ UOPTION_DEF("min", 'n', UOPT_REQUIRES_ARG),
+ UOPTION_DEF("min", 'x', UOPT_REQUIRES_ARG),
+};
+int MIN_OPTION_ = 0;
+int MAX_OPTION_ = 1;
+
+int main(int argc, const char *argv[])
+{
+ UErrorCode status = U_ZERO_ERROR;
+ CharPerformanceTest test(argc, argv, status);
+ if (U_FAILURE(status)){
+ return status;
+ }
+ if (test.run() == FALSE){
+ fprintf(stderr, "FAILED: Tests could not be run please check the "
+ "arguments.\n");
+ return -1;
+ }
+ return 0;
+}
+
+CharPerformanceTest::CharPerformanceTest(int32_t argc, const char *argv[],
+ UErrorCode &status)
+ : UPerfTest(argc, argv, status)
+{
+ if (status== U_ILLEGAL_ARGUMENT_ERROR){
+ fprintf(stderr,gUsageString, "charperf");
+ return;
+ }
+ if (U_FAILURE(status)){
+ fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n",
+ u_errorName(status));
+ return;
+ }
+
+ if (_remainingArgc < 0) {
+ // that means there are some -names not matched in the super class
+ // first tag is always skipped in u_parseArgs
+ int size = - _remainingArgc;
+ argv += argc - size;
+ argc = size;
+ _remainingArgc = u_parseArgs(argc, (char**)argv,
+ (int32_t)(sizeof(options)/sizeof(options[0])), options);
+ }
+ MIN_ = 0;
+ if (sizeof(wchar_t) > 2) {
+ // for stdlibs like glibc that supports 32 bits wchar
+ // we test for the whole unicode character set by default
+ MAX_ = 0x10ffff;
+ }
+ else {
+ MAX_ = 0xffff;
+ }
+ printf("MAX_ size will be 0x%x\n", MAX_);
+ if (options[MIN_OPTION_].doesOccur) {
+ MIN_ = atoi(options[MIN_OPTION_].value);
+ }
+ if (options[MAX_OPTION_].doesOccur) {
+ MAX_ = atoi(options[MAX_OPTION_].value);
+ }
+}
+
+CharPerformanceTest::~CharPerformanceTest()
+{
+}
+
+UPerfFunction* CharPerformanceTest::runIndexedTest(int32_t index, UBool exec,
+ const char *&name,
+ char* par)
+{
+ switch (index) {
+ TESTCASE(0, TestIsAlpha);
+ TESTCASE(1, TestIsUpper);
+ TESTCASE(2, TestIsLower);
+ TESTCASE(3, TestIsDigit);
+ TESTCASE(4, TestIsSpace);
+ TESTCASE(5, TestIsAlphaNumeric);
+ TESTCASE(6, TestIsPrint);
+ TESTCASE(7, TestIsControl);
+ TESTCASE(8, TestToLower);
+ TESTCASE(9, TestToUpper);
+ TESTCASE(10, TestIsWhiteSpace);
+ TESTCASE(11, TestStdLibIsAlpha);
+ TESTCASE(12, TestStdLibIsUpper);
+ TESTCASE(13, TestStdLibIsLower);
+ TESTCASE(14, TestStdLibIsDigit);
+ TESTCASE(15, TestStdLibIsSpace);
+ TESTCASE(16, TestStdLibIsAlphaNumeric);
+ TESTCASE(17, TestStdLibIsPrint);
+ TESTCASE(18, TestStdLibIsControl);
+ TESTCASE(19, TestStdLibToLower);
+ TESTCASE(20, TestStdLibToUpper);
+ TESTCASE(21, TestStdLibIsWhiteSpace);
+ default:
+ name = "";
+ return NULL;
+ }
+ return NULL;
+}
+
+UPerfFunction* CharPerformanceTest::TestIsAlpha()
+{
+ return new CharPerfFunction(isAlpha, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestIsUpper()
+{
+ return new CharPerfFunction(isUpper, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestIsLower()
+{
+ return new CharPerfFunction(isLower, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestIsDigit()
+{
+ return new CharPerfFunction(isDigit, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestIsSpace()
+{
+ return new CharPerfFunction(isSpace, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestIsAlphaNumeric()
+{
+ return new CharPerfFunction(isAlphaNumeric, MIN_, MAX_);
+}
+
+/**
+* This test may be different since c lib has a type PUNCT and it is printable.
+* iswgraph is not used for testing since it is a subset of iswprint with the
+* exception of returning true for white spaces. no match found in icu4c.
+*/
+UPerfFunction* CharPerformanceTest::TestIsPrint()
+{
+ return new CharPerfFunction(isPrint, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestIsControl()
+{
+ return new CharPerfFunction(isControl, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestToLower()
+{
+ return new CharPerfFunction(toLower, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestToUpper()
+{
+ return new CharPerfFunction(toUpper, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestIsWhiteSpace()
+{
+ return new CharPerfFunction(isWhiteSpace, MIN_, MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsAlpha()
+{
+ return new StdLibCharPerfFunction(StdLibIsAlpha, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsUpper()
+{
+ return new StdLibCharPerfFunction(StdLibIsUpper, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsLower()
+{
+ return new StdLibCharPerfFunction(StdLibIsLower, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsDigit()
+{
+ return new StdLibCharPerfFunction(StdLibIsDigit, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsSpace()
+{
+ return new StdLibCharPerfFunction(StdLibIsSpace, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsAlphaNumeric()
+{
+ return new StdLibCharPerfFunction(StdLibIsAlphaNumeric, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+/**
+* This test may be different since c lib has a type PUNCT and it is printable.
+* iswgraph is not used for testing since it is a subset of iswprint with the
+* exception of returning true for white spaces. no match found in icu4c.
+*/
+UPerfFunction* CharPerformanceTest::TestStdLibIsPrint()
+{
+ return new StdLibCharPerfFunction(StdLibIsPrint, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsControl()
+{
+ return new StdLibCharPerfFunction(StdLibIsControl, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibToLower()
+{
+ return new StdLibCharPerfFunction(StdLibToLower, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibToUpper()
+{
+ return new StdLibCharPerfFunction(StdLibToUpper, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
+
+UPerfFunction* CharPerformanceTest::TestStdLibIsWhiteSpace()
+{
+ return new StdLibCharPerfFunction(StdLibIsWhiteSpace, (wchar_t)MIN_,
+ (wchar_t)MAX_);
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.h b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.h
new file mode 100644
index 00000000000..e23785f84cb
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.h
@@ -0,0 +1,239 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+**********************************************************************
+*/
+#ifndef _CHARPERF_H
+#define _CHARPERF_H
+
+#include "unicode/uchar.h"
+
+#include "unicode/uperf.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <wchar.h>
+#include <wctype.h>
+
+typedef void (*CharPerfFn)(UChar32 ch);
+typedef void (*StdLibCharPerfFn)(wchar_t ch);
+
+class CharPerfFunction : public UPerfFunction
+{
+public:
+ virtual void call(UErrorCode* status)
+ {
+ for (UChar32 i = MIN_; i < MAX_; i ++) {
+ (*m_fn_)(i);
+ }
+ }
+
+ virtual long getOperationsPerIteration()
+ {
+ return MAX_ - MIN_;
+ }
+ CharPerfFunction(CharPerfFn func, UChar32 min, UChar32 max)
+ {
+ m_fn_ = func;
+ MIN_ = min;
+ MAX_ = max;
+ }
+
+private:
+ CharPerfFn m_fn_;
+ UChar32 MIN_;
+ UChar32 MAX_;
+};
+
+class StdLibCharPerfFunction : public UPerfFunction
+{
+public:
+ virtual void call(UErrorCode* status)
+ {
+ // note wchar_t is unsigned, it will revert to 0 once it reaches
+ // 65535
+ for (wchar_t i = MIN_; i < MAX_; i ++) {
+ (*m_fn_)(i);
+ }
+ }
+
+ virtual long getOperationsPerIteration()
+ {
+ return MAX_ - MIN_;
+ }
+
+ StdLibCharPerfFunction(StdLibCharPerfFn func, wchar_t min, wchar_t max)
+ {
+ m_fn_ = func;
+ MIN_ = min;
+ MAX_ = max;
+ }
+
+ ~StdLibCharPerfFunction()
+ {
+ }
+
+private:
+ StdLibCharPerfFn m_fn_;
+ wchar_t MIN_;
+ wchar_t MAX_;
+};
+
+class CharPerformanceTest : public UPerfTest
+{
+public:
+ CharPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status);
+ ~CharPerformanceTest();
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,
+ const char *&name,
+ char *par = NULL);
+ UPerfFunction* TestIsAlpha();
+ UPerfFunction* TestIsUpper();
+ UPerfFunction* TestIsLower();
+ UPerfFunction* TestIsDigit();
+ UPerfFunction* TestIsSpace();
+ UPerfFunction* TestIsAlphaNumeric();
+ UPerfFunction* TestIsPrint();
+ UPerfFunction* TestIsControl();
+ UPerfFunction* TestToLower();
+ UPerfFunction* TestToUpper();
+ UPerfFunction* TestIsWhiteSpace();
+ UPerfFunction* TestStdLibIsAlpha();
+ UPerfFunction* TestStdLibIsUpper();
+ UPerfFunction* TestStdLibIsLower();
+ UPerfFunction* TestStdLibIsDigit();
+ UPerfFunction* TestStdLibIsSpace();
+ UPerfFunction* TestStdLibIsAlphaNumeric();
+ UPerfFunction* TestStdLibIsPrint();
+ UPerfFunction* TestStdLibIsControl();
+ UPerfFunction* TestStdLibToLower();
+ UPerfFunction* TestStdLibToUpper();
+ UPerfFunction* TestStdLibIsWhiteSpace();
+
+private:
+ UChar32 MIN_;
+ UChar32 MAX_;
+};
+
+inline void isAlpha(UChar32 ch)
+{
+ u_isalpha(ch);
+}
+
+inline void isUpper(UChar32 ch)
+{
+ u_isupper(ch);
+}
+
+inline void isLower(UChar32 ch)
+{
+ u_islower(ch);
+}
+
+inline void isDigit(UChar32 ch)
+{
+ u_isdigit(ch);
+}
+
+inline void isSpace(UChar32 ch)
+{
+ u_isspace(ch);
+}
+
+inline void isAlphaNumeric(UChar32 ch)
+{
+ u_isalnum(ch);
+}
+
+/**
+* This test may be different since c lib has a type PUNCT and it is printable.
+* iswgraph is not used for testing since it is a subset of iswprint with the
+* exception of returning true for white spaces. no match found in icu4c.
+*/
+inline void isPrint(UChar32 ch)
+{
+ u_isprint(ch);
+}
+
+inline void isControl(UChar32 ch)
+{
+ u_iscntrl(ch);
+}
+
+inline void toLower(UChar32 ch)
+{
+ u_tolower(ch);
+}
+
+inline void toUpper(UChar32 ch)
+{
+ u_toupper(ch);
+}
+
+inline void isWhiteSpace(UChar32 ch)
+{
+ u_isWhitespace(ch);
+}
+
+inline void StdLibIsAlpha(wchar_t ch)
+{
+ iswalpha(ch);
+}
+
+inline void StdLibIsUpper(wchar_t ch)
+{
+ iswupper(ch);
+}
+
+inline void StdLibIsLower(wchar_t ch)
+{
+ iswlower(ch);
+}
+
+inline void StdLibIsDigit(wchar_t ch)
+{
+ iswdigit(ch);
+}
+
+inline void StdLibIsSpace(wchar_t ch)
+{
+ iswspace(ch);
+}
+
+inline void StdLibIsAlphaNumeric(wchar_t ch)
+{
+ iswalnum(ch);
+}
+
+/**
+* This test may be different since c lib has a type PUNCT and it is printable.
+* iswgraph is not used for testing since it is a subset of iswprint with the
+* exception of returning true for white spaces. no match found in icu4c.
+*/
+inline void StdLibIsPrint(wchar_t ch)
+{
+ iswprint(ch);
+}
+
+inline void StdLibIsControl(wchar_t ch)
+{
+ iswcntrl(ch);
+}
+
+inline void StdLibToLower(wchar_t ch)
+{
+ towlower(ch);
+}
+
+inline void StdLibToUpper(wchar_t ch)
+{
+ towupper(ch);
+}
+
+inline void StdLibIsWhiteSpace(wchar_t ch)
+{
+ iswspace(ch);
+}
+
+#endif // CHARPERF_H
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.vcproj
new file mode 100644
index 00000000000..d6f276a0a8b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.vcproj
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="charperf"
+ ProjectGUID="{D850A4B6-7D94-476E-9392-E9272DA4EAAF}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/charperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/charperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib"
+ OutputFile=".\Debug/charperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/charperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/charperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/charperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib"
+ OutputFile=".\Release/charperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib"
+ ProgramDatabaseFile=".\Release/charperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="charperf.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="charperf.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/CollPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/collperf/CollPerf.pl
new file mode 100755
index 00000000000..78c69f3549c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/CollPerf.pl
@@ -0,0 +1,82 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2005, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+
+my $options = {
+ "title"=>"Collation performance: ICU,POSIX,and Win",
+ "headers"=>"ICU_POSIX_WIN",
+ "operationIs"=>"unicode String",
+ "passes"=>"1",
+ "time"=>"2",
+ #"outputType"=>"HTML",
+ "dataDir"=>"../data",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "debug/collperf.exe ";
+
+my $tests = {
+ "Key Gen ICU null", ["$p TestIcu_KeyGen_null"],
+ "Key Gen ICU len", ["$p TestIcu_KeyGen_len"],
+ "Key Gen POSIX", ["$p TestPosix_KeyGen_null"],
+ "Key Gen Win", ["$p TestWin_KeyGen_null"],
+ "Iteration icu forward null", ["$p TestIcu_ForwardIter_null"],
+ "Iteration icu forward len", ["$p TestIcu_ForwardIter_len"],
+ "Iteration icu backward null", ["$p TestIcu_BackwardIter_null"],
+ "Iteration icu backward len", ["$p TestIcu_BackwardIter_len"],
+ "Iteration/all icu forward null", ["$p TestIcu_ForwardIter_all_null"],
+ "Iteration/all icu forward len", ["$p TestIcu_ForwardIter_all_len"],
+ "Iteration/all icu backward null", ["$p TestIcu_BackwardIter_all_null"],
+ "Iteration/all icu backward len", ["$p TestIcu_BackwardIter_all_len"],
+ "qsort icu strcoll null", ["$p TestIcu_qsort_strcoll_null"],
+ "qsort icu strcoll len", ["$p TestIcu_qsort_strcoll_len"],
+ "qsort icu use key", ["$p TestIcu_qsort_usekey"],
+ "qsort posix strcoll null", ["$p TestPosix_qsort_strcoll_null"],
+ "qsort posix use key", ["$p TestPosix_qsort_usekey"],
+ "qsort win CompareStringW null", ["$p TestWin_qsort_CompareStringW_null"],
+ "qsort win CompareStringW len", ["$p TestWin_qsort_CompareStringW_len"],
+ "qsort win use key", ["$p TestWin_qsort_usekey"],
+ "Binary Search icu strcoll null", ["$p TestIcu_BinarySearch_strcoll_null"],
+ "Binary Search icu strcoll len", ["$p TestIcu_BinarySearch_strcoll_len"],
+ "Binary Search icu use key", ["$p TestIcu_BinarySearch_usekey"],
+ "Binary Search icu u_strcmp", ["$p TestIcu_BinarySearch_strcmp"],
+ "Binary Search icu cmpCPO", ["$p TestIcu_BinarySearch_cmpCPO"],
+ "Binary Search posix strcoll null", ["$p TestPosix_BinarySearch_strcoll_null"],
+ "Binary Search posix use key", ["$p TestPosix_BinarySearch_usekey"],
+ "Binary Search win CompareStringW null", ["$p TestWin_BinarySearch_CompareStringW_null"],
+ "Binary Search win CompareStringW len", ["$p TestWin_BinarySearch_CompareStringW_len"],
+ "Binary Search win use key", ["$p TestWin_BinarySearch_usekey"],
+ "Binary Search win wcscmp", ["$p TestWin_BinarySearch_wcscmp"],
+ };
+
+my $dataFiles = {
+ "",
+ [
+ "TestNames_Asian.txt",
+# "TestNames_Chinese.txt",
+# "TestNames_Japanese.txt",
+# "TestNames_Japanese_h.txt",
+# "TestNames_Japanese_k.txt",
+# "TestNames_Korean.txt",
+# "TestNames_Latin.txt",
+# "Testnames_Russian.txt",
+# "TestNames_SerbianSH.txt",
+# "TestNames_SerbianSR.txt",
+# "TestNames_Simplified_Chinese.txt",
+# "TestNames_Thai.txt"
+ ]
+ };
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/collperf/Makefile.in
new file mode 100644
index 00000000000..fcc1615b3fb
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/collperf
+## Copyright (c) 2001-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/collperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = collperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = collperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.cpp
new file mode 100644
index 00000000000..fd30f50bdea
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.cpp
@@ -0,0 +1,880 @@
+/********************************************************************
+* COPYRIGHT:
+* Copyright (C) 2001-2006 IBM, Inc. All Rights Reserved.
+*
+********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <limits.h>
+#include <string.h>
+#include "unicode/uperf.h"
+#include "uoptions.h"
+#include "unicode/coll.h"
+#include <unicode/ucoleitr.h>
+
+
+
+/* To store an array of string<UNIT> in continue space.
+Since string<UNIT> itself is treated as an array of UNIT, this
+class will ease our memory management for an array of string<UNIT>.
+*/
+
+//template<typename UNIT>
+#define COMPATCT_ARRAY(CompactArrays, UNIT) \
+struct CompactArrays{\
+ CompactArrays(const CompactArrays & );\
+ CompactArrays & operator=(const CompactArrays & );\
+ int32_t count;/*total number of the strings*/ \
+ int32_t * index;/*relative offset in data*/ \
+ UNIT * data; /*the real space to hold strings*/ \
+ \
+ ~CompactArrays(){free(index);free(data);} \
+ CompactArrays():data(NULL), index(NULL), count(0){ \
+ index = (int32_t *) realloc(index, sizeof(int32_t)); \
+ index[0] = 0; \
+ } \
+ void append_one(int32_t theLen){ /*include terminal NULL*/ \
+ count++; \
+ index = (int32_t *) realloc(index, sizeof(int32_t) * (count + 1)); \
+ index[count] = index[count - 1] + theLen; \
+ data = (UNIT *) realloc(data, sizeof(UNIT) * index[count]); \
+ } \
+ UNIT * last(){return data + index[count - 1];} \
+ UNIT * dataOf(int32_t i){return data + index[i];} \
+ int32_t lengthOf(int i){return index[i+1] - index[i] - 1; } /*exclude terminating NULL*/ \
+};
+
+//typedef CompactArrays<UChar> CA_uchar;
+//typedef CompactArrays<char> CA_char;
+//typedef CompactArrays<uint8_t> CA_uint8;
+//typedef CompactArrays<WCHAR> CA_win_wchar;
+
+COMPATCT_ARRAY(CA_uchar, UChar)
+COMPATCT_ARRAY(CA_char, char)
+COMPATCT_ARRAY(CA_uint8, uint8_t)
+COMPATCT_ARRAY(CA_win_wchar, WCHAR)
+
+
+struct DataIndex {
+ static DWORD win_langid; // for qsort callback function
+ static UCollator * col; // for qsort callback function
+ uint8_t * icu_key;
+ UChar * icu_data;
+ int32_t icu_data_len;
+ char* posix_key;
+ char* posix_data;
+ int32_t posix_data_len;
+ char* win_key;
+ WCHAR * win_data;
+ int32_t win_data_len;
+};
+DWORD DataIndex::win_langid;
+UCollator * DataIndex::col;
+
+
+
+class CmdKeyGen : public UPerfFunction {
+ typedef void (CmdKeyGen::* Func)(int32_t);
+ enum{MAX_KEY_LENGTH = 5000};
+ UCollator * col;
+ DWORD win_langid;
+ int32_t count;
+ DataIndex * data;
+ Func fn;
+
+ union { // to save sapce
+ uint8_t icu_key[MAX_KEY_LENGTH];
+ char posix_key[MAX_KEY_LENGTH];
+ WCHAR win_key[MAX_KEY_LENGTH];
+ };
+public:
+ CmdKeyGen(UErrorCode, UCollator * col,DWORD win_langid, int32_t count, DataIndex * data,Func fn,int32_t)
+ :col(col),win_langid(win_langid), count(count), data(data), fn(fn){}
+
+ virtual long getOperationsPerIteration(){return count;}
+
+ virtual void call(UErrorCode* status){
+ for(int32_t i = 0; i< count; i++){
+ (this->*fn)(i);
+ }
+ }
+
+ void icu_key_null(int32_t i){
+ ucol_getSortKey(col, data[i].icu_data, -1, icu_key, MAX_KEY_LENGTH);
+ }
+
+ void icu_key_len(int32_t i){
+ ucol_getSortKey(col, data[i].icu_data, data[i].icu_data_len, icu_key, MAX_KEY_LENGTH);
+ }
+
+ // pre-generated in CollPerfTest::prepareData(), need not to check error here
+ void win_key_null(int32_t i){
+ //LCMAP_SORTsk 0x00000400 // WC sort sk (normalize)
+ LCMapStringW(win_langid, LCMAP_SORTKEY, data[i].win_data, -1, win_key, MAX_KEY_LENGTH);
+ }
+
+ void win_key_len(int32_t i){
+ LCMapStringW(win_langid, LCMAP_SORTKEY, data[i].win_data, data[i].win_data_len, win_key, MAX_KEY_LENGTH);
+ }
+
+ void posix_key_null(int32_t i){
+ strxfrm(posix_key, data[i].posix_data, MAX_KEY_LENGTH);
+ }
+};
+
+
+class CmdIter : public UPerfFunction {
+ typedef void (CmdIter::* Func)(UErrorCode* , int32_t );
+ int32_t count;
+ CA_uchar * data;
+ Func fn;
+ UCollationElements *iter;
+ int32_t exec_count;
+public:
+ CmdIter(UErrorCode & status, UCollator * col, int32_t count, CA_uchar *data, Func fn, int32_t,int32_t)
+ :count(count), data(data), fn(fn){
+ exec_count = 0;
+ UChar dummytext[] = {0, 0};
+ iter = ucol_openElements(col, NULL, 0, &status);
+ ucol_setText(iter, dummytext, 1, &status);
+ }
+ ~CmdIter(){
+ ucol_closeElements(iter);
+ }
+
+ virtual long getOperationsPerIteration(){return exec_count ? exec_count : 1;}
+
+ virtual void call(UErrorCode* status){
+ exec_count = 0;
+ for(int32_t i = 0; i< count; i++){
+ (this->*fn)(status, i);
+ }
+ }
+
+ void icu_forward_null(UErrorCode* status, int32_t i){
+ ucol_setText(iter, data->dataOf(i), -1, status);
+ while (ucol_next(iter, status) != UCOL_NULLORDER) exec_count++;
+ }
+
+ void icu_forward_len(UErrorCode* status, int32_t i){
+ ucol_setText(iter, data->dataOf(i), data->lengthOf(i) , status);
+ while (ucol_next(iter, status) != UCOL_NULLORDER) exec_count++;
+ }
+
+ void icu_backward_null(UErrorCode* status, int32_t i){
+ ucol_setText(iter, data->dataOf(i), -1, status);
+ while (ucol_previous(iter, status) != UCOL_NULLORDER) exec_count++;
+ }
+
+ void icu_backward_len(UErrorCode* status, int32_t i){
+ ucol_setText(iter, data->dataOf(i), data->lengthOf(i) , status);
+ while (ucol_previous(iter, status) != UCOL_NULLORDER) exec_count++;
+ }
+};
+
+class CmdIterAll : public UPerfFunction {
+ typedef void (CmdIterAll::* Func)(UErrorCode* status);
+ int32_t count;
+ UChar * data;
+ Func fn;
+ UCollationElements *iter;
+ int32_t exec_count;
+
+public:
+ enum CALL {forward_null, forward_len, backward_null, backward_len};
+
+ ~CmdIterAll(){
+ ucol_closeElements(iter);
+ }
+ CmdIterAll(UErrorCode & status, UCollator * col, int32_t count, UChar * data, CALL call,int32_t,int32_t)
+ :count(count),data(data)
+ {
+ exec_count = 0;
+ if (call == forward_null || call == backward_null) {
+ iter = ucol_openElements(col, data, -1, &status);
+ } else {
+ iter = ucol_openElements(col, data, count, &status);
+ }
+
+ if (call == forward_null || call == forward_len){
+ fn = &CmdIterAll::icu_forward_all;
+ } else {
+ fn = &CmdIterAll::icu_backward_all;
+ }
+ }
+ virtual long getOperationsPerIteration(){return exec_count ? exec_count : 1;}
+
+ virtual void call(UErrorCode* status){
+ (this->*fn)(status);
+ }
+
+ void icu_forward_all(UErrorCode* status){
+ int strlen = count - 5;
+ int count5 = 5;
+ int strindex = 0;
+ ucol_setOffset(iter, strindex, status);
+ while (TRUE) {
+ if (ucol_next(iter, status) == UCOL_NULLORDER) {
+ break;
+ }
+ exec_count++;
+ count5 --;
+ if (count5 == 0) {
+ strindex += 10;
+ if (strindex > strlen) {
+ break;
+ }
+ ucol_setOffset(iter, strindex, status);
+ count5 = 5;
+ }
+ }
+ }
+
+ void icu_backward_all(UErrorCode* status){
+ int strlen = count;
+ int count5 = 5;
+ int strindex = 5;
+ ucol_setOffset(iter, strindex, status);
+ while (TRUE) {
+ if (ucol_previous(iter, status) == UCOL_NULLORDER) {
+ break;
+ }
+ exec_count++;
+ count5 --;
+ if (count5 == 0) {
+ strindex += 10;
+ if (strindex > strlen) {
+ break;
+ }
+ ucol_setOffset(iter, strindex, status);
+ count5 = 5;
+ }
+ }
+ }
+
+};
+
+struct CmdQsort : public UPerfFunction{
+
+ static int q_random(const void * a, const void * b){
+ uint8_t * key_a = ((DataIndex *)a)->icu_key;
+ uint8_t * key_b = ((DataIndex *)b)->icu_key;
+
+ int val_a = 0;
+ int val_b = 0;
+ while (*key_a != 0) {val_a += val_a*37 + *key_a++;}
+ while (*key_b != 0) {val_b += val_b*37 + *key_b++;}
+ return val_a - val_b;
+ }
+
+#define QCAST() \
+ DataIndex * da = (DataIndex *) a; \
+ DataIndex * db = (DataIndex *) b; \
+ ++exec_count
+
+ static int icu_strcoll_null(const void *a, const void *b){
+ QCAST();
+ return ucol_strcoll(da->col, da->icu_data, -1, db->icu_data, -1) - UCOL_EQUAL;
+ }
+
+ static int icu_strcoll_len(const void *a, const void *b){
+ QCAST();
+ return ucol_strcoll(da->col, da->icu_data, da->icu_data_len, db->icu_data, db->icu_data_len) - UCOL_EQUAL;
+ }
+
+ static int icu_cmpkey (const void *a, const void *b){
+ QCAST();
+ return strcmp((char *) da->icu_key, (char *) db->icu_key);
+ }
+
+ static int win_cmp_null(const void *a, const void *b) {
+ QCAST();
+ //CSTR_LESS_THAN 1
+ //CSTR_EQUAL 2
+ //CSTR_GREATER_THAN 3
+ int t = CompareStringW(da->win_langid, 0, da->win_data, -1, db->win_data, -1);
+ if (t == 0){
+ fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError());
+ exit(-1);
+ } else{
+ return t - CSTR_EQUAL;
+ }
+ }
+
+ static int win_cmp_len(const void *a, const void *b) {
+ QCAST();
+ int t = CompareStringW(da->win_langid, 0, da->win_data, da->win_data_len, db->win_data, db->win_data_len);
+ if (t == 0){
+ fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError());
+ exit(-1);
+ } else{
+ return t - CSTR_EQUAL;
+ }
+ }
+
+#define QFUNC(name, func, data) \
+ static int name (const void *a, const void *b){ \
+ QCAST(); \
+ return func(da->data, db->data); \
+ }
+
+ QFUNC(posix_strcoll_null, strcoll, posix_data)
+ QFUNC(posix_cmpkey, strcmp, posix_key)
+ QFUNC(win_cmpkey, strcmp, win_key)
+ QFUNC(win_wcscmp, wcscmp, win_data)
+ QFUNC(icu_strcmp, u_strcmp, icu_data)
+ QFUNC(icu_cmpcpo, u_strcmpCodePointOrder, icu_data)
+
+private:
+ static int32_t exec_count; // potential muilt-thread problem
+
+ typedef int (* Func)(const void *, const void *);
+
+ Func fn;
+ void * base; //Start of target array.
+ int32_t num; //Array size in elements.
+ int32_t width; //Element size in bytes.
+
+ void * backup; //copy source of base
+public:
+ CmdQsort(UErrorCode & status,void *theBase, int32_t num, int32_t width, Func fn, int32_t,int32_t)
+ :backup(theBase),num(num),width(width),fn(fn){
+ base = malloc(num * width);
+ time_empty(100, &status); // warm memory/cache
+ }
+
+ ~CmdQsort(){
+ free(base);
+ }
+
+ void empty_call(){
+ exec_count = 0;
+ memcpy(base, backup, num * width);
+ }
+
+ double time_empty(int32_t n, UErrorCode* status) {
+ UTimer start, stop;
+ utimer_getTime(&start);
+ while (n-- > 0) {
+ empty_call();
+ }
+ utimer_getTime(&stop);
+ return utimer_getDeltaSeconds(&start,&stop); // ms
+ }
+
+ virtual void call(UErrorCode* status){
+ exec_count = 0;
+ memcpy(base, backup, num * width);
+ qsort(base, num, width, fn);
+ }
+ virtual double time(int32_t n, UErrorCode* status) {
+ double t1 = time_empty(n,status);
+ double t2 = UPerfFunction::time(n, status);
+ return t2-t1;// < 0 ? t2 : t2-t1;
+ }
+
+ virtual long getOperationsPerIteration(){ return exec_count?exec_count:1;}
+};
+int32_t CmdQsort::exec_count;
+
+
+class CmdBinSearch : public UPerfFunction{
+public:
+ typedef int (CmdBinSearch::* Func)(int, int);
+
+ UCollator * col;
+ DWORD win_langid;
+ int32_t count;
+ DataIndex * rnd;
+ DataIndex * ord;
+ Func fn;
+ int32_t exec_count;
+
+ CmdBinSearch(UErrorCode, UCollator * col,DWORD win_langid,int32_t count,DataIndex * rnd,DataIndex * ord,Func fn)
+ :col(col),win_langid(win_langid), count(count), rnd(rnd), ord(ord), fn(fn),exec_count(0){}
+
+
+ virtual void call(UErrorCode* status){
+ exec_count = 0;
+ for(int32_t i = 0; i< count; i++){ // search all data
+ binary_search(i);
+ }
+ }
+ virtual long getOperationsPerIteration(){ return exec_count?exec_count:1;}
+
+ void binary_search(int32_t random) {
+ int low = 0;
+ int high = count - 1;
+ int guess;
+ int last_guess = -1;
+ int r;
+ while (TRUE) {
+ guess = (high + low)/2;
+ if (last_guess == guess) break; // nothing to search
+
+ r = (this->*fn)(random, guess);
+ exec_count++;
+
+ if (r == 0)
+ return; // found, search end.
+ if (r < 0) {
+ high = guess;
+ } else {
+ low = guess;
+ }
+ last_guess = guess;
+ }
+ }
+
+ int icu_strcoll_null(int32_t i, int32_t j){
+ return ucol_strcoll(col, rnd[i].icu_data, -1, ord[j].icu_data,-1);
+ }
+
+ int icu_strcoll_len(int32_t i, int32_t j){
+ return ucol_strcoll(col, rnd[i].icu_data, rnd[i].icu_data_len, ord[j].icu_data, ord[j].icu_data_len);
+ }
+
+ int icu_cmpkey(int32_t i, int32_t j) {
+ return strcmp( (char *) rnd[i].icu_key, (char *) ord[j].icu_key );
+ }
+
+ int win_cmp_null(int32_t i, int32_t j) {
+ int t = CompareStringW(win_langid, 0, rnd[i].win_data, -1, ord[j].win_data, -1);
+ if (t == 0){
+ fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError());
+ exit(-1);
+ } else{
+ return t - CSTR_EQUAL;
+ }
+ }
+
+ int win_cmp_len(int32_t i, int32_t j) {
+ int t = CompareStringW(win_langid, 0, rnd[i].win_data, rnd[i].win_data_len, ord[j].win_data, ord[j].win_data_len);
+ if (t == 0){
+ fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError());
+ exit(-1);
+ } else{
+ return t - CSTR_EQUAL;
+ }
+ }
+
+#define BFUNC(name, func, data) \
+ int name(int32_t i, int32_t j) { \
+ return func(rnd[i].data, ord[j].data); \
+ }
+
+ BFUNC(posix_strcoll_null, strcoll, posix_data)
+ BFUNC(posix_cmpkey, strcmp, posix_key)
+ BFUNC(win_cmpkey, strcmp, win_key)
+ BFUNC(win_wcscmp, wcscmp, win_data)
+ BFUNC(icu_strcmp, u_strcmp, icu_data)
+ BFUNC(icu_cmpcpo, u_strcmpCodePointOrder, icu_data)
+};
+
+class CollPerfTest : public UPerfTest {
+public:
+ UCollator * col;
+ DWORD win_langid;
+
+ UChar * icu_data_all;
+ int32_t icu_data_all_len;
+
+ int32_t count;
+ CA_uchar * icu_data;
+ CA_uint8 * icu_key;
+ CA_char * posix_data;
+ CA_char * posix_key;
+ CA_win_wchar * win_data;
+ CA_char * win_key;
+
+ DataIndex * rnd_index; // random by icu key
+ DataIndex * ord_win_data;
+ DataIndex * ord_win_key;
+ DataIndex * ord_posix_data;
+ DataIndex * ord_posix_key;
+ DataIndex * ord_icu_data;
+ DataIndex * ord_icu_key;
+ DataIndex * ord_win_wcscmp;
+ DataIndex * ord_icu_strcmp;
+ DataIndex * ord_icu_cmpcpo;
+
+ virtual ~CollPerfTest(){
+ ucol_close(col);
+ delete [] icu_data_all;
+ delete icu_data;
+ delete icu_key;
+ delete posix_data;
+ delete posix_key;
+ delete win_data;
+ delete win_key;
+ delete[] rnd_index;
+ delete[] ord_win_data;
+ delete[] ord_win_key;
+ delete[] ord_posix_data;
+ delete[] ord_posix_key;
+ delete[] ord_icu_data;
+ delete[] ord_icu_key;
+ delete[] ord_win_wcscmp;
+ delete[] ord_icu_strcmp;
+ delete[] ord_icu_cmpcpo;
+ }
+
+ CollPerfTest(int32_t argc, const char* argv[], UErrorCode& status):UPerfTest(argc, argv, status){
+ col = NULL;
+ icu_data_all = NULL;
+ icu_data = NULL;
+ icu_key = NULL;
+ posix_data = NULL;
+ posix_key = NULL;
+ win_data =NULL;
+ win_key = NULL;
+
+ rnd_index = NULL;
+ ord_win_data= NULL;
+ ord_win_key= NULL;
+ ord_posix_data= NULL;
+ ord_posix_key= NULL;
+ ord_icu_data= NULL;
+ ord_icu_key= NULL;
+ ord_win_wcscmp = NULL;
+ ord_icu_strcmp = NULL;
+ ord_icu_cmpcpo = NULL;
+
+ if (U_FAILURE(status)){
+ return;
+ }
+
+ // Parse additional arguments
+
+ UOption options[] = {
+ UOPTION_DEF("langid", 'i', UOPT_REQUIRES_ARG), // Windows Language ID number.
+ UOPTION_DEF("rulefile", 'r', UOPT_REQUIRES_ARG), // --rulefile <filename>
+ // Collation related arguments. All are optional.
+ // To simplify parsing, two choice arguments are disigned as NO_ARG.
+ // The default value is UPPER word in the comment
+ UOPTION_DEF("c_french", 'f', UOPT_NO_ARG), // --french <on | OFF>
+ UOPTION_DEF("c_alternate", 'a', UOPT_NO_ARG), // --alternate <NON_IGNORE | shifted>
+ UOPTION_DEF("c_casefirst", 'c', UOPT_REQUIRES_ARG), // --casefirst <lower | upper | OFF>
+ UOPTION_DEF("c_caselevel", 'l', UOPT_NO_ARG), // --caselevel <on | OFF>
+ UOPTION_DEF("c_normal", 'n', UOPT_NO_ARG), // --normal <on | OFF>
+ UOPTION_DEF("c_strength", 's', UOPT_REQUIRES_ARG), // --strength <1-5>
+ };
+ int32_t opt_len = (sizeof(options)/sizeof(options[0]));
+ enum {i, r,f,a,c,l,n,s}; // The buffer between the option items' order and their references
+
+ _remainingArgc = u_parseArgs(_remainingArgc, (char**)argv, opt_len, options);
+
+ if (_remainingArgc < 0){
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+
+ if (locale == NULL){
+ locale = "en_US"; // set default locale
+ }
+
+ //#ifdef U_WINDOWS
+ if (options[i].doesOccur) {
+ char *endp;
+ int tmp = strtol(options[i].value, &endp, 0);
+ if (endp == options[i].value) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ win_langid = MAKELCID(tmp, SORT_DEFAULT);
+ } else {
+ win_langid = uloc_getLCID(locale);
+ }
+ //#endif
+
+ // Set up an ICU collator
+ if (options[r].doesOccur) {
+ // TODO: implement it
+ } else {
+ col = ucol_open(locale, &status);
+ if (U_FAILURE(status)) {
+ return;
+ }
+ }
+
+ if (options[f].doesOccur) {
+ ucol_setAttribute(col, UCOL_FRENCH_COLLATION, UCOL_ON, &status);
+ } else {
+ ucol_setAttribute(col, UCOL_FRENCH_COLLATION, UCOL_OFF, &status);
+ }
+
+ if (options[a].doesOccur) {
+ ucol_setAttribute(col, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
+ }
+
+ if (options[c].doesOccur) { // strcmp() has i18n encoding problem
+ if (strcmp("lower", options[c].value) == 0){
+ ucol_setAttribute(col, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, &status);
+ } else if (strcmp("upper", options[c].value) == 0) {
+ ucol_setAttribute(col, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, &status);
+ } else {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ }
+
+ if (options[l].doesOccur){
+ ucol_setAttribute(col, UCOL_CASE_LEVEL, UCOL_ON, &status);
+ }
+
+ if (options[n].doesOccur){
+ ucol_setAttribute(col, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
+ }
+
+ if (options[s].doesOccur) {
+ char *endp;
+ int tmp = strtol(options[l].value, &endp, 0);
+ if (endp == options[l].value) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ switch (tmp) {
+ case 1: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_PRIMARY, &status); break;
+ case 2: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_SECONDARY, &status); break;
+ case 3: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_TERTIARY, &status); break;
+ case 4: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_QUATERNARY, &status); break;
+ case 5: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_IDENTICAL, &status); break;
+ default: status = U_ILLEGAL_ARGUMENT_ERROR; return;
+ }
+ }
+ prepareData(status);
+ }
+
+ //to avoid use the annoying 'id' in TESTCASE(id,test) macro or the like
+#define TEST(testname, classname, arg1, arg2, arg3, arg4, arg5, arg6) \
+ if(temp == index) {\
+ name = #testname;\
+ if (exec) {\
+ UErrorCode status = U_ZERO_ERROR;\
+ UPerfFunction * t = new classname(status,arg1, arg2, arg3, arg4, arg5, arg6);\
+ if (U_FAILURE(status)) {\
+ delete t;\
+ return NULL;\
+ } else {\
+ return t;\
+ }\
+ } else {\
+ return NULL;\
+ }\
+ }\
+ temp++\
+
+
+ virtual UPerfFunction* runIndexedTest( /*[in]*/int32_t index, /*[in]*/UBool exec, /*[out]*/const char* &name, /*[in]*/ char* par = NULL ){
+ int temp = 0;
+
+#define TEST_KEYGEN(testname, func)\
+ TEST(testname, CmdKeyGen, col, win_langid, count, rnd_index, &CmdKeyGen::func, 0)
+ TEST_KEYGEN(TestIcu_KeyGen_null, icu_key_null);
+ TEST_KEYGEN(TestIcu_KeyGen_len, icu_key_len);
+ TEST_KEYGEN(TestPosix_KeyGen_null, posix_key_null);
+ TEST_KEYGEN(TestWin_KeyGen_null, win_key_null);
+ TEST_KEYGEN(TestWin_KeyGen_len, win_key_len);
+
+#define TEST_ITER(testname, func)\
+ TEST(testname, CmdIter, col, count, icu_data, &CmdIter::func,0,0)
+ TEST_ITER(TestIcu_ForwardIter_null, icu_forward_null);
+ TEST_ITER(TestIcu_ForwardIter_len, icu_forward_len);
+ TEST_ITER(TestIcu_BackwardIter_null, icu_backward_null);
+ TEST_ITER(TestIcu_BackwardIter_len, icu_backward_len);
+
+#define TEST_ITER_ALL(testname, func)\
+ TEST(testname, CmdIterAll, col, icu_data_all_len, icu_data_all, CmdIterAll::func,0,0)
+ TEST_ITER_ALL(TestIcu_ForwardIter_all_null, forward_null);
+ TEST_ITER_ALL(TestIcu_ForwardIter_all_len, forward_len);
+ TEST_ITER_ALL(TestIcu_BackwardIter_all_null, backward_null);
+ TEST_ITER_ALL(TestIcu_BackwardIter_all_len, backward_len);
+
+#define TEST_QSORT(testname, func)\
+ TEST(testname, CmdQsort, rnd_index, count, sizeof(DataIndex), CmdQsort::func,0,0)
+ TEST_QSORT(TestIcu_qsort_strcoll_null, icu_strcoll_null);
+ TEST_QSORT(TestIcu_qsort_strcoll_len, icu_strcoll_len);
+ TEST_QSORT(TestIcu_qsort_usekey, icu_cmpkey);
+ TEST_QSORT(TestPosix_qsort_strcoll_null, posix_strcoll_null);
+ TEST_QSORT(TestPosix_qsort_usekey, posix_cmpkey);
+ TEST_QSORT(TestWin_qsort_CompareStringW_null, win_cmp_null);
+ TEST_QSORT(TestWin_qsort_CompareStringW_len, win_cmp_len);
+ TEST_QSORT(TestWin_qsort_usekey, win_cmpkey);
+
+#define TEST_BIN(testname, func)\
+ TEST(testname, CmdBinSearch, col, win_langid, count, rnd_index, ord_icu_key, &CmdBinSearch::func)
+ TEST_BIN(TestIcu_BinarySearch_strcoll_null, icu_strcoll_null);
+ TEST_BIN(TestIcu_BinarySearch_strcoll_len, icu_strcoll_len);
+ TEST_BIN(TestIcu_BinarySearch_usekey, icu_cmpkey);
+ TEST_BIN(TestIcu_BinarySearch_strcmp, icu_strcmp);
+ TEST_BIN(TestIcu_BinarySearch_cmpCPO, icu_cmpcpo);
+ TEST_BIN(TestPosix_BinarySearch_strcoll_null, posix_strcoll_null);
+ TEST_BIN(TestPosix_BinarySearch_usekey, posix_cmpkey);
+ TEST_BIN(TestWin_BinarySearch_CompareStringW_null, win_cmp_null);
+ TEST_BIN(TestWin_BinarySearch_CompareStringW_len, win_cmp_len);
+ TEST_BIN(TestWin_BinarySearch_usekey, win_cmpkey);
+ TEST_BIN(TestWin_BinarySearch_wcscmp, win_wcscmp);
+
+ name="";
+ return NULL;
+ }
+
+
+
+ void prepareData(UErrorCode& status){
+ if(U_FAILURE(status)) return;
+ if (icu_data) return; // prepared
+
+ icu_data = new CA_uchar();
+
+ // Following code is borrowed from UPerfTest::getLines();
+ const UChar* line=NULL;
+ int32_t len =0;
+ for (;;) {
+ line = ucbuf_readline(ucharBuf,&len,&status);
+ if(line == NULL || U_FAILURE(status)){break;}
+
+ // Refer to the source code of ucbuf_readline()
+ // 1. 'len' includs the line terminal symbols
+ // 2. The length of the line terminal symbols is only one character
+ // 3. The Windows CR LF line terminal symbols will be converted to CR
+
+ if (len == 1) {
+ continue; //skip empty line
+ } else {
+ icu_data->append_one(len);
+ memcpy(icu_data->last(), line, len * sizeof(UChar));
+ icu_data->last()[len -1] = NULL;
+ }
+ }
+ if(U_FAILURE(status)) return;
+
+ // UTF-16 -> UTF-8 conversion.
+ UConverter *conv = ucnv_open("utf-8", &status); // just UTF-8 for now.
+ if (U_FAILURE(status)) return;
+
+ count = icu_data->count;
+
+ icu_data_all_len = icu_data->index[count]; // includes all NULLs
+ icu_data_all_len -= count; // excludes all NULLs
+ icu_data_all_len += 1; // the terminal NULL
+ icu_data_all = new UChar[icu_data_all_len];
+ icu_data_all[icu_data_all_len - 1] = 0; //the terminal NULL
+
+ icu_key = new CA_uint8;
+ win_data = new CA_win_wchar;
+ win_key = new CA_char;
+ posix_data = new CA_char;
+ posix_key = new CA_char;
+ rnd_index = new DataIndex[count];
+ DataIndex::win_langid = win_langid;
+ DataIndex::col = col;
+
+
+ UChar * p = icu_data_all;
+ int32_t s;
+ int32_t t;
+ for (int i=0; i < count; i++) {
+ // ICU all data
+ s = sizeof(UChar) * icu_data->lengthOf(i);
+ memcpy(p, icu_data->dataOf(i), s);
+ p += icu_data->lengthOf(i);
+
+ // ICU data
+
+ // ICU key
+ s = ucol_getSortKey(col, icu_data->dataOf(i), -1,NULL, 0);
+ icu_key->append_one(s);
+ t = ucol_getSortKey(col, icu_data->dataOf(i), -1,icu_key->last(), s);
+ if (t != s) {status = U_INVALID_FORMAT_ERROR;return;}
+
+ // POSIX data
+ s = ucnv_fromUChars(conv,NULL, 0, icu_data->dataOf(i), icu_data->lengthOf(i), &status);
+ if (status == U_BUFFER_OVERFLOW_ERROR || status == U_ZERO_ERROR){
+ status = U_ZERO_ERROR;
+ } else {
+ return;
+ }
+ posix_data->append_one(s + 1); // plus terminal NULL
+ t = ucnv_fromUChars(conv,posix_data->last(), s, icu_data->dataOf(i), icu_data->lengthOf(i), &status);
+ if (U_FAILURE(status)) return;
+ if ( t != s){status = U_INVALID_FORMAT_ERROR;return;}
+ posix_data->last()[s] = 0;
+
+ // POSIX key
+ s = strxfrm(NULL, posix_data->dataOf(i), 0);
+ if (s == INT_MAX){status = U_INVALID_FORMAT_ERROR;return;}
+ posix_key->append_one(s);
+ t = strxfrm(posix_key->last(), posix_data->dataOf(i), s);
+ if (t != s) {status = U_INVALID_FORMAT_ERROR;return;}
+
+ // Win data
+ s = icu_data->lengthOf(i) + 1; // plus terminal NULL
+ win_data->append_one(s);
+ memcpy(win_data->last(), icu_data->dataOf(i), sizeof(WCHAR) * s);
+
+ // Win key
+ s = LCMapStringW(win_langid, LCMAP_SORTKEY, win_data->dataOf(i), win_data->lengthOf(i), NULL,0);
+ if (s == 0) {status = U_INVALID_FORMAT_ERROR;return;}
+ win_key->append_one(s);
+ t = LCMapStringW(win_langid, LCMAP_SORTKEY, win_data->dataOf(i), win_data->lengthOf(i), (WCHAR *)(win_key->last()),s);
+ if (t != s) {status = U_INVALID_FORMAT_ERROR;return;}
+
+ };
+
+ // append_one() will make points shifting, should not merge following code into previous iteration
+ for (int i=0; i < count; i++) {
+ rnd_index[i].icu_key = icu_key->dataOf(i);
+ rnd_index[i].icu_data = icu_data->dataOf(i);
+ rnd_index[i].icu_data_len = icu_data->lengthOf(i);
+ rnd_index[i].posix_key = posix_key->last();
+ rnd_index[i].posix_data = posix_data->dataOf(i);
+ rnd_index[i].posix_data_len = posix_data->lengthOf(i);
+ rnd_index[i].win_key = win_key->dataOf(i);
+ rnd_index[i].win_data = win_data->dataOf(i);
+ rnd_index[i].win_data_len = win_data->lengthOf(i);
+ };
+
+ ucnv_close(conv);
+ qsort(rnd_index, count, sizeof(DataIndex), CmdQsort::q_random);
+
+#define SORT(data, func) \
+ data = new DataIndex[count];\
+ memcpy(data, rnd_index, count * sizeof(DataIndex));\
+ qsort(data, count, sizeof(DataIndex), CmdQsort::func)
+
+ SORT(ord_icu_data, icu_strcoll_len);
+ SORT(ord_icu_key, icu_cmpkey);
+ SORT(ord_posix_data, posix_strcoll_null);
+ SORT(ord_posix_key, posix_cmpkey);
+ SORT(ord_win_data, win_cmp_len);
+ SORT(ord_win_key, win_cmpkey);
+ SORT(ord_win_wcscmp, win_wcscmp);
+ SORT(ord_icu_strcmp, icu_strcmp);
+ SORT(ord_icu_cmpcpo, icu_cmpcpo);
+ }
+};
+
+
+int main(int argc, const char *argv[])
+{
+
+ UErrorCode status = U_ZERO_ERROR;
+ CollPerfTest test(argc, argv, status);
+
+ if (U_FAILURE(status)){
+ printf("The error is %s\n", u_errorName(status));
+ //TODO: print usage here
+ return status;
+ }
+
+ if (test.run() == FALSE){
+ fprintf(stderr, "FAILED: Tests could not be run please check the "
+ "arguments.\n");
+ return -1;
+ }
+ return 0;
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.vcproj
new file mode 100644
index 00000000000..f34d8bd48a7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.vcproj
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="collperf"
+ ProjectGUID="{01807B4A-E3B5-4B97-A7F3-207746DCD71E}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/collperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/collperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icuind.lib icutud.lib winmm.lib icutestd.lib"
+ OutputFile=".\Debug/collperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/collperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/collperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="2"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/collperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icuin.lib icutest.lib icutu.lib winmm.lib"
+ OutputFile=".\Release/collperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ ProgramDatabaseFile=".\Release/collperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="collperf.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/ConvPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/convperf/ConvPerf_r.pl
new file mode 100644
index 00000000000..1b3e7c1a025
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/ConvPerf_r.pl
@@ -0,0 +1,61 @@
+#!/usr/bin/perl
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002-2007, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+#Assume we are running outside of the icu source
+use lib './icu-3.0/icu/source/test/perf/perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"Conversion performance regression (ICU 2.8 and 3.0)",
+ "headers"=>"ICU28 ICU30",
+ "operationIs"=>"code point",
+ "timePerOperationIs"=>"Time per code point",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"results_ICU4C"
+ };
+
+# programs
+
+my $p1 = "icu-2.8/icu/bin/convperf28.exe";
+my $p2 = "icu-3.0/icu/bin/convperf30.exe";
+
+my $dataFiles = "";
+
+
+my $tests = {
+ "UTF-8 From Unicode", ["$p1 TestICU_UTF8_FromUnicode" , "$p2 TestICU_UTF8_FromUnicode" ],
+ "UTF-8 To Unicode", ["$p1 TestICU_UTF8_ToUnicode" , "$p2 TestICU_UTF8_ToUnicode" ],
+ ####
+ "ISO-8859-1 From Unicode", ["$p1 TestICU_Latin1_FromUnicode" , "$p2 TestICU_Latin1_FromUnicode" ],
+ "ISO-8859-1 To Unicode", ["$p1 TestICU_Latin1_ToUnicode" , "$p2 TestICU_Latin1_ToUnicode" ],
+ ####
+ "Shift-JIS From Unicode", ["$p1 TestICU_SJIS_FromUnicode" , "$p2 TestICU_SJIS_FromUnicode" ],
+ "Shift-JIS To Unicode", ["$p1 TestICU_SJIS_ToUnicode" , "$p2 TestICU_SJIS_ToUnicode" ],
+ ####
+ "EUC-JP From Unicode", ["$p1 TestICU_EUCJP_FromUnicode" , "$p2 TestICU_EUCJP_FromUnicode" ],
+ "EUC-JP To Unicode", ["$p1 TestICU_EUCJP_ToUnicode" , "$p2 TestICU_EUCJP_ToUnicode" ],
+ ####
+ "GB2312 From Unicode", ["$p1 TestICU_GB2312_FromUnicode" , "$p2 TestICU_GB2312_FromUnicode" ],
+ "GB2312 To Unicode", ["$p1 TestICU_GB2312_ToUnicode" , "$p2 TestICU_GB2312_ToUnicode" ],
+ ####
+ "ISO2022KR From Unicode", ["$p1 TestICU_ISO2022KR_FromUnicode", "$p2 TestICU_ISO2022KR_FromUnicode" ],
+ "ISO2022KR To Unicode", ["$p1 TestICU_ISO2022KR_ToUnicode" , "$p2 TestICU_ISO2022KR_ToUnicode" ],
+ ####
+ "ISO2022JP From Unicode", ["$p1 TestICU_ISO2022JP_FromUnicode", "$p2 TestICU_ISO2022JP_FromUnicode" ],
+ "ISO2022JP To Unicode", ["$p1 TestICU_ISO2022JP_ToUnicode" , "$p2 TestICU_ISO2022JP_ToUnicode" ],
+ };
+
+
+runTests($options, $tests, $dataFiles);
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/convperf/Makefile.in
new file mode 100644
index 00000000000..b2ec30bc698
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/collperf
+## Copyright (c) 2001-2007, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/convperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = collperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = convperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.cpp
new file mode 100644
index 00000000000..dabbef7f6ef
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.cpp
@@ -0,0 +1,654 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+**********************************************************************
+*/
+/**
+ * This Program tests the performance of ICU's Normalization engine against Windows
+ * to run it use the command like
+ *
+ * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 -p 15 -f TestNames_Asian.txt -u -e UTF-8 -l
+ */
+#include "convperf.h"
+#include "data.h"
+#include <stdio.h>
+
+int main(int argc, const char* argv[]){
+ UErrorCode status = U_ZERO_ERROR;
+ ConverterPerformanceTest test(argc, argv, status);
+ if(U_FAILURE(status)){
+ return status;
+ }
+ if(test.run()==FALSE){
+ fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
+ return -1;
+ }
+ return 0;
+}
+
+
+ConverterPerformanceTest::ConverterPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status)
+: UPerfTest(argc,argv,status){
+
+}
+
+ConverterPerformanceTest::~ConverterPerformanceTest(){
+
+}
+
+UPerfFunction* ConverterPerformanceTest::runIndexedTest(int32_t index, UBool exec,const char* &name, char* par) {
+ switch (index) {
+ TESTCASE(0,TestICU_CleanOpenAllConverters);// This calls u_cleanup()
+ TESTCASE(1,TestICU_OpenAllConverters);// This doesn't call u_cleanup()
+
+ TESTCASE(2,TestICU_UTF8_ToUnicode);
+ TESTCASE(3,TestICU_UTF8_FromUnicode);
+ TESTCASE(4,TestWinANSI_UTF8_ToUnicode);
+ TESTCASE(5,TestWinANSI_UTF8_FromUnicode);
+ TESTCASE(6,TestWinIML2_UTF8_ToUnicode);
+ TESTCASE(7,TestWinIML2_UTF8_FromUnicode);
+
+ TESTCASE(8,TestICU_Latin1_ToUnicode);
+ TESTCASE(9,TestICU_Latin1_FromUnicode);
+ TESTCASE(10,TestWinIML2_Latin1_ToUnicode);
+ TESTCASE(11,TestWinIML2_Latin1_FromUnicode);
+
+ TESTCASE(12,TestICU_Latin8_ToUnicode);
+ TESTCASE(13,TestICU_Latin8_FromUnicode);
+ TESTCASE(14,TestWinIML2_Latin8_ToUnicode);
+ TESTCASE(15,TestWinIML2_Latin8_FromUnicode);
+
+ TESTCASE(16,TestICU_EBCDIC_Arabic_ToUnicode);
+ TESTCASE(17,TestICU_EBCDIC_Arabic_FromUnicode);
+ TESTCASE(18,TestWinIML2_EBCDIC_Arabic_ToUnicode);
+ TESTCASE(19,TestWinIML2_EBCDIC_Arabic_FromUnicode);
+
+ TESTCASE(20,TestICU_SJIS_ToUnicode);
+ TESTCASE(21,TestICU_SJIS_FromUnicode);
+ TESTCASE(22,TestWinIML2_SJIS_ToUnicode);
+ TESTCASE(23,TestWinIML2_SJIS_FromUnicode);
+
+ TESTCASE(24,TestICU_EUCJP_ToUnicode);
+ TESTCASE(25,TestICU_EUCJP_FromUnicode);
+ TESTCASE(26,TestWinIML2_EUCJP_ToUnicode);
+ TESTCASE(27,TestWinIML2_EUCJP_FromUnicode);
+
+ TESTCASE(28,TestICU_GB2312_FromUnicode);
+ TESTCASE(29,TestICU_GB2312_ToUnicode);
+ TESTCASE(30,TestWinIML2_GB2312_ToUnicode);
+ TESTCASE(31,TestWinIML2_GB2312_FromUnicode);
+
+ TESTCASE(32,TestICU_ISO2022KR_ToUnicode);
+ TESTCASE(33,TestICU_ISO2022KR_FromUnicode);
+ TESTCASE(34,TestWinIML2_ISO2022KR_ToUnicode);
+ TESTCASE(35,TestWinIML2_ISO2022KR_FromUnicode);
+
+ TESTCASE(36,TestICU_ISO2022JP_ToUnicode);
+ TESTCASE(37,TestICU_ISO2022JP_FromUnicode);
+ TESTCASE(38,TestWinIML2_ISO2022JP_ToUnicode);
+ TESTCASE(39,TestWinIML2_ISO2022JP_FromUnicode);
+
+ TESTCASE(40,TestWinANSI_Latin1_ToUnicode);
+ TESTCASE(41,TestWinANSI_Latin1_FromUnicode);
+
+ TESTCASE(42,TestWinANSI_Latin8_ToUnicode);
+ TESTCASE(43,TestWinANSI_Latin8_FromUnicode);
+
+ TESTCASE(44,TestWinANSI_SJIS_ToUnicode);
+ TESTCASE(45,TestWinANSI_SJIS_FromUnicode);
+
+ TESTCASE(46,TestWinANSI_EUCJP_ToUnicode);
+ TESTCASE(47,TestWinANSI_EUCJP_FromUnicode);
+
+ TESTCASE(48,TestWinANSI_GB2312_ToUnicode);
+ TESTCASE(49,TestWinANSI_GB2312_FromUnicode);
+
+ TESTCASE(50,TestWinANSI_ISO2022KR_ToUnicode);
+ TESTCASE(51,TestWinANSI_ISO2022KR_FromUnicode);
+
+ TESTCASE(52,TestWinANSI_ISO2022JP_ToUnicode);
+ TESTCASE(53,TestWinANSI_ISO2022JP_FromUnicode);
+
+ default:
+ name = "";
+ return NULL;
+ }
+ return NULL;
+
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_CleanOpenAllConverters() {
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUOpenAllConvertersFunction(TRUE, status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_OpenAllConverters() {
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUOpenAllConvertersFunction(FALSE, status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+//################
+
+UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+//##################
+
+UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+//#################
+
+
+UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+//#################
+
+
+UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+//#################
+
+
+UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+//#################
+
+
+UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+//#################
+
+
+UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+//#################
+
+
+UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_FromUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+}
+
+UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_ToUnicode(){
+ UErrorCode status = U_ZERO_ERROR;
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status);
+ if(U_FAILURE(status)){
+ return NULL;
+ }
+ return pf;
+} \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.h b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.h
new file mode 100644
index 00000000000..994553aa52d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.h
@@ -0,0 +1,568 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+**********************************************************************
+*/
+#ifndef _CONVPERF_H
+#define _CONVPERF_H
+
+#include <mlang.h>
+#include <objbase.h>
+#include <stdlib.h>
+#include "unicode/ucnv.h"
+#include "unicode/uclean.h"
+#include "unicode/ustring.h"
+
+#include "unicode/uperf.h"
+
+#define CONVERSION_FLAGS (0) /*WC_DEFAULTCHAR WC_COMPOSITECHECK & WC_SEPCHARS*/
+#define MAX_BUF_SIZE 3048
+#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
+
+class ICUToUnicodePerfFunction : public UPerfFunction{
+private:
+ UConverter* conv;
+ const char* src;
+ int32_t srcLen;
+ UChar* target;
+ UChar* targetLimit;
+
+public:
+ ICUToUnicodePerfFunction(const char* name, const char* source, int32_t sourceLen, UErrorCode& status){
+ conv = ucnv_open(name,&status);
+ src = source;
+ srcLen = sourceLen;
+ if(U_FAILURE(status)){
+ conv = NULL;
+ return;
+ }
+ target = NULL;
+ targetLimit = NULL;
+ int32_t reqdLen = ucnv_toUChars(conv, target, 0,
+ source, srcLen, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ target=(UChar*)malloc((reqdLen) * U_SIZEOF_UCHAR*2);
+ targetLimit = target + reqdLen;
+ if(target == NULL){
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+ }
+ }
+ virtual void call(UErrorCode* status){
+ const char* mySrc = src;
+ const char* sourceLimit = src + srcLen;
+ UChar* myTarget = target;
+ ucnv_toUnicode(conv, &myTarget, targetLimit, &mySrc, sourceLimit, NULL, TRUE, status);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+ ~ICUToUnicodePerfFunction(){
+ free(target);
+ ucnv_close(conv);
+ }
+};
+class ICUFromUnicodePerfFunction : public UPerfFunction{
+private:
+ UConverter* conv;
+ const UChar* src;
+ int32_t srcLen;
+ char* target;
+ char* targetLimit;
+ const char* name;
+
+public:
+ ICUFromUnicodePerfFunction(const char* name, const UChar* source, int32_t sourceLen, UErrorCode& status){
+ conv = ucnv_open(name,&status);
+ src = source;
+ srcLen = sourceLen;
+ if(U_FAILURE(status)){
+ conv = NULL;
+ return;
+ }
+ target = NULL;
+ targetLimit = NULL;
+ int32_t reqdLen = ucnv_fromUChars(conv, target, 0,
+ source, srcLen, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ status=U_ZERO_ERROR;
+ target=(char*)malloc((reqdLen*2));
+ targetLimit = target + reqdLen;
+ if(target == NULL){
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+ }
+ }
+ virtual void call(UErrorCode* status){
+ const UChar* mySrc = src;
+ const UChar* sourceLimit = src + srcLen;
+ char* myTarget = target;
+ ucnv_fromUnicode(conv,&myTarget, targetLimit, &mySrc, sourceLimit, NULL, TRUE, status);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+ ~ICUFromUnicodePerfFunction(){
+ free(target);
+ ucnv_close(conv);
+ }
+};
+
+class ICUOpenAllConvertersFunction : public UPerfFunction{
+private:
+ UBool cleanup;
+ int32_t availableConverters;
+ const char **convNames;
+public:
+ ICUOpenAllConvertersFunction(UBool callCleanup, UErrorCode& status){
+ int32_t idx;
+ cleanup = callCleanup;
+ availableConverters = ucnv_countAvailable();
+ convNames = new const char *[availableConverters];
+ for (idx = 0; idx < availableConverters; idx++) {
+ convNames[idx] = ucnv_getAvailableName(idx);
+ }
+ }
+ virtual void call(UErrorCode* status){
+ int32_t idx;
+ if (cleanup) {
+ u_cleanup();
+ }
+ for (idx = 0; idx < availableConverters; idx++) {
+ ucnv_close(ucnv_open(convNames[idx], status));
+ }
+ }
+ virtual long getOperationsPerIteration(void){
+ return availableConverters;
+ }
+ ~ICUOpenAllConvertersFunction(){
+ delete []convNames;
+ }
+};
+
+class WinANSIToUnicodePerfFunction : public UPerfFunction{
+
+private:
+ DWORD uiCodePage;
+ char* src;
+ UINT srcLen;
+ WCHAR dest[MAX_BUF_SIZE];
+ UINT dstLen;
+ const char* name;
+public:
+ WinANSIToUnicodePerfFunction(const char* cpName, char* pszIn,UINT szLen, UErrorCode& status){
+ name = cpName;
+ src = pszIn;
+ srcLen = szLen;
+ dstLen = LENGTHOF(dest);
+ unsigned short bEnc[30]={'\0'};
+ const char* tenc=name;
+ for(int i=0;*tenc!='\0';i++){
+ bEnc[i]=*tenc;
+ tenc++;
+ }
+ LPMULTILANGUAGE2 pMulti;
+
+ CoInitialize(NULL);
+
+ /* create instance of converter object*/
+ CoCreateInstance(
+ __uuidof(CMultiLanguage),
+ NULL,
+ CLSCTX_SERVER,
+ __uuidof(IMultiLanguage2),
+ (void**)&pMulti
+ );
+
+
+
+ MIMECSETINFO mimeInfo;
+
+ mimeInfo.uiCodePage = 0;
+ mimeInfo.uiInternetEncoding =0;
+ /* get the charset info */
+ pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo);
+ uiCodePage = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding;
+ }
+ virtual void call(UErrorCode* status){
+ int winSize =MultiByteToWideChar(uiCodePage,CONVERSION_FLAGS,src,srcLen,dest,dstLen);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+};
+
+class WinANSIFromUnicodePerfFunction : public UPerfFunction{
+
+private:
+ DWORD uiCodePage;
+ WCHAR* src;
+ UINT srcLen;
+ char dest[MAX_BUF_SIZE];
+ UINT dstLen;
+ const char* name;
+ BOOL lpUsedDefaultChar;
+
+public:
+ WinANSIFromUnicodePerfFunction(const char* cpName, WCHAR* pszIn,UINT szLen, UErrorCode& status){
+ name = cpName;
+ src = pszIn;
+ srcLen = szLen;
+ dstLen = LENGTHOF(dest);
+ lpUsedDefaultChar=FALSE;
+ unsigned short bEnc[30]={'\0'};
+ const char* tenc=name;
+ for(int i=0;*tenc!='\0';i++){
+ bEnc[i]=*tenc;
+ tenc++;
+ }
+ LPMULTILANGUAGE2 pMulti;
+
+ CoInitialize(NULL);
+
+ /* create instance of converter object*/
+ CoCreateInstance(
+ __uuidof(CMultiLanguage),
+ NULL,
+ CLSCTX_SERVER,
+ __uuidof(IMultiLanguage2),
+ (void**)&pMulti
+ );
+
+
+
+ MIMECSETINFO mimeInfo;
+ mimeInfo.uiCodePage = 0;
+ mimeInfo.uiInternetEncoding =0;
+ /* get the charset info */
+ pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo);
+ uiCodePage = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding;
+ }
+ virtual void call(UErrorCode* status){
+ BOOL* pUsedDefaultChar =(uiCodePage==CP_UTF8)?NULL:&lpUsedDefaultChar;
+ int winSize = WideCharToMultiByte(uiCodePage,CONVERSION_FLAGS,src,srcLen,dest,dstLen,NULL, pUsedDefaultChar);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+};
+static inline void getErr(HRESULT err, UErrorCode& status){
+
+ switch (err){
+
+ case S_OK:
+ //printf("Operation %s successful\n",operation);
+ break;
+ case S_FALSE:
+ status = U_INTERNAL_PROGRAM_ERROR;
+ break;
+ case E_FAIL:
+ status = U_ILLEGAL_CHAR_FOUND;
+ }
+}
+class WinIMultiLanguageToUnicodePerfFunction : public UPerfFunction{
+
+private:
+ LPMULTILANGUAGE2 pMulti;
+ LPMLANGCONVERTCHARSET pConvToUni;
+ char* src;
+ UINT srcLen;
+ WCHAR dst[MAX_BUF_SIZE];
+ UINT dstLen;
+ const char* cpName;
+
+public:
+ WinIMultiLanguageToUnicodePerfFunction(const char* name,char* source, UINT sourceLen, UErrorCode& status){
+
+ CoInitialize(NULL);
+
+ /* create instance of converter object*/
+ CoCreateInstance(
+ __uuidof(CMultiLanguage),
+ NULL,
+ CLSCTX_SERVER,
+ __uuidof(IMultiLanguage2),
+ (void**)&pMulti
+ );
+
+
+
+ MIMECSETINFO mimeInfo;
+ mimeInfo.uiCodePage = 0;
+ mimeInfo.uiInternetEncoding =0;
+ HRESULT err=S_OK;
+ unsigned short bEnc[30]={'\0'};
+ const char* tenc=name;
+ for(int i=0;*tenc!='\0';i++){
+ bEnc[i]=*tenc;
+ tenc++;
+ }
+ /* get the charset info */
+ pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo);
+ pMulti->CreateConvertCharset(mimeInfo.uiCodePage, 1200 /*unicode*/, (DWORD)0,&pConvToUni);
+ getErr(err,status);
+ src = source;
+ srcLen = sourceLen;
+ dstLen = LENGTHOF(dst);
+ cpName = name;
+ }
+
+ virtual void call(UErrorCode* status){
+ HRESULT err= pConvToUni->DoConversionToUnicode(src,&srcLen,dst, &dstLen);
+ getErr(err,*status);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+};
+
+class WinIMultiLanguageFromUnicodePerfFunction : public UPerfFunction{
+
+private:
+ LPMULTILANGUAGE2 pMulti;
+ LPMLANGCONVERTCHARSET pConvFromUni;
+ WCHAR* src;
+ UINT srcLen;
+ char dst[MAX_BUF_SIZE];
+ UINT dstLen;
+ const char* cpName;
+
+public:
+ WinIMultiLanguageFromUnicodePerfFunction(const char* name,WCHAR* source, UINT sourceLen, UErrorCode& status){
+
+ CoInitialize(NULL);
+
+ /* create instance of converter object*/
+ CoCreateInstance(
+ __uuidof(CMultiLanguage),
+ NULL,
+ CLSCTX_SERVER,
+ __uuidof(IMultiLanguage2),
+ (void**)&pMulti
+ );
+
+
+
+ MIMECSETINFO mimeInfo;
+ mimeInfo.uiCodePage = 0;
+ mimeInfo.uiInternetEncoding =0;
+ HRESULT err=S_OK;
+ unsigned short bEnc[30]={'\0'};
+ const char* tenc=name;
+ for(int i=0;*tenc!='\0';i++){
+ bEnc[i]=*tenc;
+ tenc++;
+ }
+ /* get the charset info */
+ pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo);
+ pMulti->CreateConvertCharset(1200 /*unicode*/, mimeInfo.uiCodePage, (DWORD)0,&pConvFromUni);
+ getErr(err,status);
+ src = source;
+ srcLen = sourceLen;
+ dstLen = LENGTHOF(dst);
+ cpName = name;
+
+ }
+
+ virtual void call(UErrorCode* status){
+ HRESULT err= pConvFromUni->DoConversionFromUnicode(src,&srcLen,dst, &dstLen);
+ getErr(err,*status);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+};
+
+class WinIMultiLanguage2ToUnicodePerfFunction : public UPerfFunction{
+
+private:
+ LPMULTILANGUAGE2 pMulti;
+ char* src;
+ UINT srcLen;
+ WCHAR dst[MAX_BUF_SIZE];
+ UINT dstLen;
+ const char* cpName;
+ DWORD dwEnc;
+public:
+ WinIMultiLanguage2ToUnicodePerfFunction(const char* name,char* source, UINT sourceLen, UErrorCode& status){
+
+ CoInitialize(NULL);
+
+ /* create instance of converter object*/
+ CoCreateInstance(
+ __uuidof(CMultiLanguage),
+ NULL,
+ CLSCTX_SERVER,
+ __uuidof(IMultiLanguage2),
+ (void**)&pMulti
+ );
+
+ src = source;
+ srcLen = sourceLen;
+ dstLen = LENGTHOF(dst);
+ cpName = name;
+ unsigned short bEnc[30]={'\0'};
+ const char* tenc=name;
+ for(int i=0;*tenc!='\0';i++){
+ bEnc[i]=*tenc;
+ tenc++;
+ }
+ /* get the charset info */
+ MIMECSETINFO mimeInfo;
+ mimeInfo.uiCodePage = 0;
+ mimeInfo.uiInternetEncoding =0;
+ pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo);
+ dwEnc = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding;
+ }
+
+ virtual void call(UErrorCode* status){
+ DWORD dwMode=0;
+ HRESULT err= pMulti->ConvertStringToUnicode(&dwMode,dwEnc,(char*)src,&srcLen,dst, &dstLen);
+ getErr(err,*status);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+};
+
+class WinIMultiLanguage2FromUnicodePerfFunction : public UPerfFunction{
+
+private:
+ LPMULTILANGUAGE2 pMulti;
+ LPMLANGCONVERTCHARSET pConvFromUni;
+ WCHAR* src;
+ UINT srcLen;
+ char dst[MAX_BUF_SIZE];
+ UINT dstLen;
+ const char* cpName;
+ DWORD dwEnc;
+
+public:
+ WinIMultiLanguage2FromUnicodePerfFunction(const char* name,WCHAR* source, UINT sourceLen, UErrorCode& status){
+
+ CoInitialize(NULL);
+
+ /* create instance of converter object*/
+ CoCreateInstance(
+ __uuidof(CMultiLanguage),
+ NULL,
+ CLSCTX_SERVER,
+ __uuidof(IMultiLanguage2),
+ (void**)&pMulti
+ );
+
+
+ unsigned short bEnc[30]={'\0'};
+ const char* tenc=name;
+ for(int i=0;*tenc!='\0';i++){
+ bEnc[i]=*tenc;
+ tenc++;
+ }
+ src = source;
+ srcLen = sourceLen;
+ dstLen = LENGTHOF(dst);
+ cpName = name;
+ /* get the charset info */
+ MIMECSETINFO mimeInfo;
+ mimeInfo.uiCodePage = 0;
+ mimeInfo.uiInternetEncoding =0;
+
+ pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo);
+ dwEnc = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding;
+ }
+
+ virtual void call(UErrorCode* status){
+ DWORD dwMode=0;
+ HRESULT err= pMulti->ConvertStringFromUnicode(&dwMode,dwEnc,src,&srcLen,dst, &dstLen);
+ getErr(err,*status);
+ }
+ virtual long getOperationsPerIteration(void){
+ return srcLen;
+ }
+};
+
+class ConverterPerformanceTest : public UPerfTest{
+
+public:
+
+ ConverterPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status);
+ ~ConverterPerformanceTest();
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,const char* &name, char* par = NULL);
+
+ UPerfFunction* TestICU_CleanOpenAllConverters();
+ UPerfFunction* TestICU_OpenAllConverters();
+
+ UPerfFunction* TestICU_UTF8_ToUnicode();
+ UPerfFunction* TestICU_UTF8_FromUnicode();
+ UPerfFunction* TestWinANSI_UTF8_ToUnicode();
+ UPerfFunction* TestWinANSI_UTF8_FromUnicode();
+ UPerfFunction* TestWinIML2_UTF8_ToUnicode();
+ UPerfFunction* TestWinIML2_UTF8_FromUnicode();
+
+ UPerfFunction* TestICU_Latin1_ToUnicode();
+ UPerfFunction* TestICU_Latin1_FromUnicode();
+ UPerfFunction* TestWinANSI_Latin1_ToUnicode();
+ UPerfFunction* TestWinANSI_Latin1_FromUnicode();
+ UPerfFunction* TestWinIML2_Latin1_ToUnicode();
+ UPerfFunction* TestWinIML2_Latin1_FromUnicode();
+
+ UPerfFunction* TestICU_EBCDIC_Arabic_ToUnicode();
+ UPerfFunction* TestICU_EBCDIC_Arabic_FromUnicode();
+ UPerfFunction* TestWinANSI_EBCDIC_Arabic_ToUnicode();
+ UPerfFunction* TestWinANSI_EBCDIC_Arabic_FromUnicode();
+ UPerfFunction* TestWinIML2_EBCDIC_Arabic_ToUnicode();
+ UPerfFunction* TestWinIML2_EBCDIC_Arabic_FromUnicode();
+
+ UPerfFunction* TestICU_Latin8_ToUnicode();
+ UPerfFunction* TestICU_Latin8_FromUnicode();
+ UPerfFunction* TestWinANSI_Latin8_ToUnicode();
+ UPerfFunction* TestWinANSI_Latin8_FromUnicode();
+ UPerfFunction* TestWinIML2_Latin8_ToUnicode();
+ UPerfFunction* TestWinIML2_Latin8_FromUnicode();
+
+
+ UPerfFunction* TestICU_SJIS_ToUnicode();
+ UPerfFunction* TestICU_SJIS_FromUnicode();
+ UPerfFunction* TestWinANSI_SJIS_ToUnicode();
+ UPerfFunction* TestWinANSI_SJIS_FromUnicode();
+ UPerfFunction* TestWinIML2_SJIS_ToUnicode();
+ UPerfFunction* TestWinIML2_SJIS_FromUnicode();
+
+ UPerfFunction* TestICU_EUCJP_ToUnicode();
+ UPerfFunction* TestICU_EUCJP_FromUnicode();
+ UPerfFunction* TestWinANSI_EUCJP_ToUnicode();
+ UPerfFunction* TestWinANSI_EUCJP_FromUnicode();
+ UPerfFunction* TestWinIML2_EUCJP_ToUnicode();
+ UPerfFunction* TestWinIML2_EUCJP_FromUnicode();
+
+ UPerfFunction* TestICU_GB2312_ToUnicode();
+ UPerfFunction* TestICU_GB2312_FromUnicode();
+ UPerfFunction* TestWinANSI_GB2312_ToUnicode();
+ UPerfFunction* TestWinANSI_GB2312_FromUnicode();
+ UPerfFunction* TestWinIML2_GB2312_ToUnicode();
+ UPerfFunction* TestWinIML2_GB2312_FromUnicode();
+
+
+ UPerfFunction* TestICU_ISO2022KR_ToUnicode();
+ UPerfFunction* TestICU_ISO2022KR_FromUnicode();
+ UPerfFunction* TestWinANSI_ISO2022KR_ToUnicode();
+ UPerfFunction* TestWinANSI_ISO2022KR_FromUnicode();
+ UPerfFunction* TestWinIML2_ISO2022KR_ToUnicode();
+ UPerfFunction* TestWinIML2_ISO2022KR_FromUnicode();
+
+ UPerfFunction* TestICU_ISO2022JP_ToUnicode();
+ UPerfFunction* TestICU_ISO2022JP_FromUnicode();
+ UPerfFunction* TestWinANSI_ISO2022JP_ToUnicode();
+ UPerfFunction* TestWinANSI_ISO2022JP_FromUnicode();
+ UPerfFunction* TestWinIML2_ISO2022JP_ToUnicode();
+ UPerfFunction* TestWinIML2_ISO2022JP_FromUnicode();
+
+};
+
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.vcproj
new file mode 100644
index 00000000000..8649cb78a46
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.vcproj
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="convperf"
+ ProjectGUID="{B4C03939-D417-41F0-85B4-848ECF105E3A}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/convperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/convperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib icutest.lib"
+ OutputFile=".\Release/convperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ ProgramDatabaseFile=".\Release/convperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/convperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/convperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib"
+ OutputFile=".\Debug/convperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/convperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="convperf.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="convperf.h"
+ >
+ </File>
+ <File
+ RelativePath="data.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_ansi.pl b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_ansi.pl
new file mode 100755
index 00000000000..691a21f63fa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_ansi.pl
@@ -0,0 +1,49 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002-2003, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+
+my $options = {
+ "title"=>"Conversion Performance: ICU 2.6 vs. Windows2000 ANSI Interface",
+ "headers"=>"Windows2000(IMultiLanguage2) ICU",
+ "operationIs"=>"code point",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "release/convperf.exe";
+
+my $tests = {
+ "UTF-8 From Unicode", ["$p TestWinANSI_UTF8_FromUnicode" , "$p TestICU_UTF8_FromUnicode" ],
+ "UTF-8 To Unicode", ["$p TestWinANSI_UTF8_ToUnicode" , "$p TestICU_UTF8_ToUnicode" ],
+ ####
+ "ISO-8859-1 From Unicode", ["$p TestWinANSI_Latin1_FromUnicode" , "$p TestICU_Latin1_FromUnicode" ],
+ "ISO-8859-1 To Unicode", ["$p TestWinANSI_Latin1_ToUnicode" , "$p TestICU_Latin1_ToUnicode" ],
+ ####
+ "Shift-JIS From Unicode", ["$p TestWinANSI_SJIS_FromUnicode" , "$p TestICU_SJIS_FromUnicode" ],
+ "Shift-JIS To Unicode", ["$p TestWinANSI_SJIS_ToUnicode" , "$p TestICU_SJIS_ToUnicode" ],
+ ####
+ "EUC-JP From Unicode", ["$p TestWinANSI_EUCJP_FromUnicode" , "$p TestICU_EUCJP_FromUnicode" ],
+ "EUC-JP To Unicode", ["$p TestWinANSI_EUCJP_ToUnicode" , "$p TestICU_EUCJP_ToUnicode" ],
+ ####
+ "GB2312 From Unicode", ["$p TestWinANSI_GB2312_FromUnicode" , "$p TestICU_GB2312_FromUnicode" ],
+ "GB2312 To Unicode", ["$p TestWinANSI_GB2312_ToUnicode" , "$p TestICU_GB2312_ToUnicode" ],
+ };
+
+my $dataFiles = "";
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_iml.pl b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_iml.pl
new file mode 100755
index 00000000000..194a1cce549
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_iml.pl
@@ -0,0 +1,55 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002-2003, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+
+my $options = {
+ "title"=>"Conversion Performance: ICU 2.6 vs. Windows2000 IMultiLanguage Interface",
+ "headers"=>"Windows2000(IMultiLanguage2) ICU",
+ "operationIs"=>"code point",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "release/convperf.exe";
+
+my $tests = {
+ "UTF-8 From Unicode", ["$p TestWinIML2_UTF8_FromUnicode" , "$p TestICU_UTF8_FromUnicode" ],
+ "UTF-8 To Unicode", ["$p TestWinIML2_UTF8_ToUnicode" , "$p TestICU_UTF8_ToUnicode" ],
+ ####
+ "ISO-8859-1 From Unicode", ["$p TestWinIML2_Latin1_FromUnicode" , "$p TestICU_Latin1_FromUnicode" ],
+ "ISO-8859-1 To Unicode", ["$p TestWinIML2_Latin1_ToUnicode" , "$p TestICU_Latin1_ToUnicode" ],
+ ####
+ "Shift-JIS From Unicode", ["$p TestWinIML2_SJIS_FromUnicode" , "$p TestICU_SJIS_FromUnicode" ],
+ "Shift-JIS To Unicode", ["$p TestWinIML2_SJIS_ToUnicode" , "$p TestICU_SJIS_ToUnicode" ],
+ ####
+ "EUC-JP From Unicode", ["$p TestWinIML2_EUCJP_FromUnicode" , "$p TestICU_EUCJP_FromUnicode" ],
+ "EUC-JP To Unicode", ["$p TestWinIML2_EUCJP_ToUnicode" , "$p TestICU_EUCJP_ToUnicode" ],
+ ####
+ "GB2312 From Unicode", ["$p TestWinIML2_GB2312_FromUnicode" , "$p TestICU_GB2312_FromUnicode" ],
+ "GB2312 To Unicode", ["$p TestWinIML2_GB2312_ToUnicode" , "$p TestICU_GB2312_ToUnicode" ],
+ ####
+ "ISO2022KR From Unicode", ["$p TestWinIML2_ISO2022KR_FromUnicode", "$p TestICU_ISO2022KR_FromUnicode" ],
+ "ISO2022KR To Unicode", ["$p TestWinIML2_ISO2022KR_ToUnicode" , "$p TestICU_ISO2022KR_ToUnicode" ],
+ ####
+ "ISO2022JP From Unicode", ["$p TestWinIML2_ISO2022JP_FromUnicode", "$p TestICU_ISO2022JP_FromUnicode" ],
+ "ISO2022JP To Unicode", ["$p TestWinIML2_ISO2022JP_ToUnicode" , "$p TestICU_ISO2022JP_ToUnicode" ],
+ };
+
+my $dataFiles = "";
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/data.h b/Build/source/libs/icu/icu-xetex/test/perf/convperf/data.h
new file mode 100644
index 00000000000..e80be75c1cc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/data.h
@@ -0,0 +1,2731 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2003,International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+**********************************************************************
+*/
+#ifndef _DATA_H
+#define _DATA_H
+
+char iso2022jp_encSource[]={
+ 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26,
+ 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B,
+ 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28,
+ 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32,
+ 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,
+ 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B,
+ 0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x31,0x25,0x33,0x25,0x35,0x25,0x37,0x25,0x39,0x25,0x3B,0x25,
+ 0x3D,0x25,0x3F,0x1B,0x28,0x42,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,
+ 0x42,0x25,0x41,0x25,0x44,0x25,0x46,0x25,0x48,0x25,0x4A,0x25,0x4B,0x25,0x4C,0x25,0x4D,0x1B,0x28,0x42,
+ 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x4E,0x25,0x4F,0x25,
+ 0x52,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x25,0x58,0x25,0x5B,0x25,0x5E,0x25,0x5F,0x1B,0x28,0x42,0x0D,
+ 0x0A,0x1B,0x24,0x42,0x25,0x60,0x25,0x61,0x25,0x62,0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,0x25,0x6A,
+ 0x1B,0x28,0x42,0x0D,0x0A,
+ /**/
+ 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26,
+ 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B,
+ 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28,
+ 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32,
+ 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,
+ 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B,
+ 0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x31,0x25,0x33,0x25,0x35,0x25,0x37,0x25,0x39,0x25,0x3B,0x25,
+ 0x3D,0x25,0x3F,0x1B,0x28,0x42,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,
+ 0x42,0x25,0x41,0x25,0x44,0x25,0x46,0x25,0x48,0x25,0x4A,0x25,0x4B,0x25,0x4C,0x25,0x4D,0x1B,0x28,0x42,
+ 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x4E,0x25,0x4F,0x25,
+ 0x52,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x25,0x58,0x25,0x5B,0x25,0x5E,0x25,0x5F,0x1B,0x28,0x42,0x0D,
+ 0x0A,0x1B,0x24,0x42,0x25,0x60,0x25,0x61,0x25,0x62,0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,0x25,0x6A,
+ 0x1B,0x28,0x42,0x0D,0x0A,
+ /**/
+ 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26,
+ 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B,
+ 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28,
+ 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32,
+ 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,
+ 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B,
+ 0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x31,0x25,0x33,0x25,0x35,0x25,0x37,0x25,0x39,0x25,0x3B,0x25,
+ 0x3D,0x25,0x3F,0x1B,0x28,0x42,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,
+ 0x42,0x25,0x41,0x25,0x44,0x25,0x46,0x25,0x48,0x25,0x4A,0x25,0x4B,0x25,0x4C,0x25,0x4D,0x1B,0x28,0x42,
+ 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x4E,0x25,0x4F,0x25,
+ 0x52,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x25,0x58,0x25,0x5B,0x25,0x5E,0x25,0x5F,0x1B,0x28,0x42,0x0D,
+ 0x0A,0x1B,0x24,0x42,0x25,0x60,0x25,0x61,0x25,0x62,0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,0x25,0x6A,
+ 0x1B,0x28,0x42,0x0D,0x0A,
+ /**/
+ 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26,
+ 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B,
+ 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28,
+ 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32,
+ 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,
+ 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A,
+ 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B,
+ 0x28,0x42,0x0D,0x0A,
+ 0x1B,0x28,0x42,0x0D,0x0A,
+
+};
+WCHAR iso2022jp_uniSource[]={
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,
+};
+WCHAR iso2022jp_uniSmSource[]={
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x00A8,0xFF3E,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0xFF7F,0xFF80
+};
+char iso2022jp_encSmSource[] ={
+ 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,
+ 0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26
+};
+
+unsigned char sjis_encSource[]={
+ 0x83,0x9F,0x83,0xA0,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,
+ 0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,
+ 0x83,0xB3,0x83,0xB4,0x83,0xB5,0x83,0xB6,0x83,0xBF,0x83,0xC0,0x83,0xC1,0x83,0xC2,0x83,0xC3,0x83,0xC4,
+ 0x83,0xC5,0x83,0xC6,0x83,0xC7,0x83,0xC8,0x83,0xC9,0x83,0xCA,0x83,0xCB,0x83,0xCC,0x83,0xCD,0x83,0xCE,
+ 0x83,0xCF,0x83,0xD0,0x83,0xD1,0x83,0xD2,0x83,0xD3,0x83,0xD4,0x83,0xD5,0x83,0xD6,0x84,0x46,0x84,0x40,
+ 0x84,0x41,0x84,0x42,0x84,0x43,0x84,0x44,0x84,0x45,0x84,0x47,0x84,0x48,0x84,0x49,0x84,0x4A,0x84,0x4B,
+ 0x84,0x4C,0x84,0x4D,0x84,0x4E,0x84,0x4F,0x84,0x50,0x84,0x51,0x84,0x52,0x84,0x53,0x84,0x54,0x84,0x55,
+ 0x84,0x56,0x84,0x57,0x84,0x58,0x84,0x59,0x84,0x5A,0x84,0x5B,0x84,0x5C,0x84,0x5D,0x84,0x5E,0x84,0x5F,
+ 0x84,0x60,0x84,0x70,0x84,0x71,0x84,0x72,0x84,0x73,0x84,0x74,0x84,0x75,0x84,0x77,0x84,0x78,0x84,0x79,
+ 0x84,0x7A,0x84,0x7B,0x84,0x7C,0x84,0x7D,0x84,0x7E,0x84,0x80,0x84,0x81,0x84,0x82,0x84,0x83,0x84,0x84,
+ 0x84,0x85,0x84,0x86,0x84,0x87,0x84,0x88,0x84,0x89,0x84,0x8A,0x84,0x8B,0x84,0x8C,0x84,0x8D,0x84,0x8E,
+ 0x84,0x8F,0x84,0x90,0x84,0x91,0x84,0x76,0x81,0x5D,0x81,0x5C,0x81,0x61,0x81,0x65,0x81,0x66,0x81,0x67,
+ 0x81,0x68,0x81,0xF5,0x81,0xF6,0x81,0x64,0x81,0x63,0x81,0xF1,0x81,0x8C,0x81,0x8D,0x81,0xA6,0x7E,0x81,
+ 0x8E,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,
+ 0x14,0x15,0x16,0x17,0x18,0x19,0x7F,0x1B,0x1A,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
+ 0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,
+ 0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+ 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,
+ 0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,
+ 0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,
+ 0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0x9F,0x83,0xA0,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,
+ 0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,
+ 0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xB3,0x83,0xB4,0x83,0xB5,0x83,0xB6,0x83,0xBF,0x83,0xC0,
+ 0x83,0xC1,0x83,0xC2,0x83,0xC3,0x83,0xC4,0x83,0xC5,0x83,0xC6,0x83,0xC7,0x83,0xC8,0x83,0xC9,0x83,0xCA,
+ 0x83,0xCB,0x83,0xCC,0x83,0xCD,0x83,0xCE,0x83,0xCF,0x83,0xD0,0x83,0xD1,0x83,0xD2,0x83,0xD3,0x83,0xD4,
+ 0x83,0xD5,0x83,0xD6,0x84,0x46,0x84,0x40,0x84,0x41,0x84,0x42,0x84,0x43,0x84,0x44,0x84,0x45,0x84,0x47,
+ 0x84,0x48,0x84,0x49,0x84,0x4A,0x84,0x4B,0x84,0x4C,0x84,0x4D,0x84,0x4E,0x84,0x4F,0x84,0x50,0x84,0x51,
+ 0x84,0x52,0x84,0x53,0x84,0x54,0x84,0x55,0x84,0x56,0x84,0x57,0x84,0x58,0x84,0x59,0x84,0x5A,0x84,0x5B,
+ 0x84,0x5C,0x84,0x5D,0x84,0x5E,0x84,0x5F,0x84,0x60,0x84,0x70,0x84,0x71,0x84,0x72,0x84,0x73,0x84,0x74,
+ 0x84,0x75,0x84,0x77,0x84,0x78,0x84,0x79,0x84,0x7A,0x84,0x7B,0x84,0x7C,0x84,0x7D,0x84,0x7E,0x84,0x80,
+ 0x84,0x81,0x84,0x82,0x84,0x83,0x84,0x84,0x84,0x85,0x84,0x86,0x84,0x87,0x84,0x88,0x84,0x89,0x84,0x8A,
+ 0x84,0x8B,0x84,0x8C,0x84,0x8D,0x84,0x8E,0x84,0x8F,0x84,0x90,0x84,0x91,0x84,0x76,0x81,0x5D,0x81,0x5C,
+ 0x81,0x61,0x81,0x65,0x81,0x66,0x81,0x67,0x81,0x68,0x81,0xF5,0x81,0xF6,0x81,0x64,0x81,0x63,0x81,0xF1,
+ 0x81,0x8C,0x81,0x8D,0x81,0xA6,0x7E,0x81,0x8E,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,
+ 0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x7F,0x1B,0x1A,0x1D,0x1E,0x1F,
+ 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,
+ 0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,
+ 0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,
+ 0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA,
+ 0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xA9,0x83,0xAA,
+ 0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0x9F,0x83,0xA0,
+ 0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA,
+ 0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xB3,0x83,0xB4,
+ 0x83,0xB5,0x83,0xB6,0x83,0xBF,0x83,0xC0,0x83,0xC1,0x83,0xC2,0x83,0xC3,0x83,0xC4,0x83,0xC5,0x83,0xC6,
+ 0x83,0xC7,0x83,0xC8,0x83,0xC9,0x83,0xCA,0x83,0xCB,0x83,0xCC,0x83,0xCD,0x83,0xCE,0x83,0xCF,0x83,0xD0,
+ 0x83,0xD1,0x83,0xD2,0x83,0xD3,0x83,0xD4,0x83,0xD5,0x83,0xD6,0x84,0x46,0x84,0x40,0x84,0x41,0x84,0x42,
+ 0x84,0x43,0x84,0x44,0x84,0x45,0x84,0x47,0x84,0x48,0x84,0x49,0x84,0x4A,0x84,0x4B,0x84,0x4C,0x84,0x4D,
+ 0x84,0x4E,0x84,0x4F,0x84,0x50,0x84,0x51,0x84,0x52,0x84,0x53,0x84,0x54,0x84,0x55,0x84,0x56,0x84,0x57,
+ 0x84,0x58,0x84,0x59,0x84,0x5A,0x84,0x5B,0x84,0x5C,0x84,0x5D,0x84,0x5E,0x84,0x5F,0x84,0x60,0x84,0x70,
+ 0x84,0x71,0x84,0x72,0x84,0x73,0x84,0x74,0x84,0x75,0x84,0x77,0x84,0x78,0x84,0x79,0x84,0x7A,0x84,0x7B,
+ 0x84,0x7C,0x84,0x7D,0x84,0x7E,0x84,0x80,0x84,0x81,0x84,0x82,0x84,0x83,0x84,0x84,0x84,0x85,0x84,0x86,
+ 0x84,0x87,0x84,0x88,
+
+};
+
+WCHAR sjis_uniSource[]={
+ 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,
+ 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0,
+ 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410,
+ 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,
+ 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,
+ 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,
+ 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,
+ 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C,
+ 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E,
+ 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,
+ 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0,
+ 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410,
+ 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,
+ 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,
+ 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,
+ 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,
+ 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C,
+ 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E,
+ 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,
+ 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0,
+ 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410,
+ 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,
+ 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,
+ 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,
+ 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+
+ 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,
+ 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0,
+ 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410,
+ 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,
+ 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,
+ 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,
+ 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,
+ 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C,
+ 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E,
+ 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+ 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,
+ 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0,
+ 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410,
+ 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,
+ 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,
+ 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,
+ 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,
+ 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C,
+ 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E,
+ 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,
+
+};
+WCHAR sjis_uniSmSource[]={
+ 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,
+ 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,
+};
+unsigned char sjis_encSmSource[]={
+ 0x83,0x9F,0x83,0xA0,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,
+
+};
+
+unsigned char eucjp_encSource[]={
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x8E,0xE3,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,
+ 0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,
+ 0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x8E,0xE4,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,
+ 0x8B,0x8C,0x8D,0xA6,0xD4,0xA6,0xD5,0xA6,0xD6,0xA6,0xD7,0xA6,0xD8,0xA7,0xA7,0xA7,0xA1,0xA7,0xA2,0xA7,
+ 0xA3,0xA7,0xA4,0xA7,0xA5,0xA7,0xA6,0xA7,0xA8,0xA7,0xA9,0xA7,0xAA,0xA7,0xAB,0xA7,0xAC,0xA7,0xAD,0xA7,
+ 0xAE,0xA7,0xAF,0xA7,0xB0,0xA7,0xB1,0xA7,0xB2,0xA7,0xB3,0xA7,0xB4,0xA7,0xB5,0xA7,0xB6,0xA7,0xB7,0xA7,
+ 0xB8,0xA7,0xB9,0xA7,0xBA,0xA7,0xBB,0xA7,0xBC,0xA7,0xBD,0xA7,0xBE,0xA7,0xBF,0xA7,0xC0,0xA7,0xC1,0xA7,
+ 0xD1,0xA7,0xD2,0xA7,0xD3,0xA7,0xD4,0xA7,0xD5,0xA7,0xD6,0xA7,0xD8,0xA7,0xD9,0xA7,0xDA,0xA7,0xDB,0xA7,
+ 0xDC,0xA7,0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7,
+ 0xE6,0xA7,0xE7,0xA7,0xE8,0xA7,0xE9,0xA7,0xEA,0xA7,0xEB,0xA7,0xEC,0xA7,0xED,0xA7,0xEE,0xA7,0xEF,0xA7,
+ 0xF0,0xA7,0xF1,0xA7,0xD7,0xA1,0xBE,0xA1,0xBD,0xA1,0xC2,0xA1,0xC6,0xA1,0xC7,0xA1,0xC8,0xA1,0xC9,0xA2,
+ 0xF7,0xA2,0xF8,0xA1,0xC5,0xA1,0xC4,0xA2,0xF3,0xA1,0xEC,0xA1,0xED,0xA2,0xA8,0x7E,0xA1,0xEE,0x8F,0xF3,
+ 0xB8,0x8F,0xF3,0xB9,0xA2,0xF2,0x8F,0xF3,0xAB,0x8F,0xF3,0xAC,0x8F,0xF3,0xAD,0x8F,0xF3,0xAE,0x8F,0xF3,
+ 0xAF,0x8F,0xF3,0xB0,0x8F,0xF3,0xB1,0x8F,0xF3,0xB2,0x8F,0xF3,0xB3,0x8F,0xF3,0xB4,0x8F,0xF3,0xA1,0x8F,
+ 0xF3,0xA2,0x8F,0xF3,0xA3,0x8F,0xF3,0xA4,0x8F,0xF3,0xA5,0x8F,0xF3,0xA6,0x8F,0xF3,0xA7,0xA1,0xC2,0x01,
+ 0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,
+ 0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
+ 0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,
+ 0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,
+ 0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x8E,0xE3,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+ 0x79,0x7A,0x7B,0x7C,0x7D,0x8E,0xE4,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,
+ 0x8C,0x8D,0xA6,0xD4,0xA6,0xD5,0xA6,0xD6,0xA6,0xD7,0xA6,0xD8,0xA7,0xA7,0xA7,0xA1,0xA7,0xA2,0xA7,0xA3,
+ 0xA7,0xA4,0xA7,0xA5,0xA7,0xA6,0xA7,0xA8,0xA7,0xA9,0xA7,0xAA,0xA7,0xAB,0xA7,0xAC,0xA7,0xAD,0xA7,0xAE,
+ 0xA7,0xAF,0xA7,0xB0,0xA7,0xB1,0xA7,0xB2,0xA7,0xB3,0xA7,0xB4,0xA7,0xB5,0xA7,0xB6,0xA7,0xB7,0xA7,0xB8,
+ 0xA7,0xB9,0xA7,0xBA,0xA7,0xBB,0xA7,0xBC,0xA7,0xBD,0xA7,0xBE,0xA7,0xBF,0xA7,0xC0,0xA7,0xC1,0xA7,0xD1,
+ 0xA7,0xD2,0xA7,0xD3,0xA7,0xD4,0xA7,0xD5,0xA7,0xD6,0xA7,0xD8,0xA7,0xD9,0xA7,0xDA,0xA7,0xDB,0xA7,0xDC,
+ 0xA7,0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7,0xE6,
+ 0xA7,0xE7,0xA7,0xE8,0xA7,0xE9,0xA7,0xEA,0xA7,0xEB,0xA7,0xEC,0xA7,0xED,0xA7,0xEE,0xA7,0xEF,0xA7,0xF0,
+ 0xA7,0xF1,0xA7,0xD7,0xA1,0xBE,0xA1,0xBD,0xA1,0xC2,0xA1,0xC6,0xA1,0xC7,0xA1,0xC8,0xA1,0xC9,0xA2,0xF7,
+ 0xA2,0xF8,0xA1,0xC5,0xA1,0xC4,0xA2,0xF3,0xA1,0xEC,0xA1,0xED,0xA2,0xA8,0x7E,0xA1,0xEE,0x8F,0xF3,0xB8,
+ 0x8F,0xF3,0xB9,0xA2,0xF2,0x8F,0xF3,0xAB,0x8F,0xF3,0xAC,0x8F,0xF3,0xAD,0x8F,0xF3,0xAE,0x8F,0xF3,0xAF,
+ 0x8F,0xF3,0xB0,0x8F,0xF3,0xB1,0x8F,0xF3,0xB2,0x8F,0xF3,0xB3,0x8F,0xF3,0xB4,0x8F,0xF3,0xA1,0x8F,0xF3,
+ 0xA2,0x8F,0xF3,0xA3,0x8F,0xF3,0xA4,0x8F,0xF3,0xA5,0x8F,0xF3,0xA6,0x8F,0xF3,0xA7,0xA1,0xC2,0x01,0x02,
+ 0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,
+ 0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,
+ 0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,
+ 0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,
+ 0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x8E,0xE3,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,
+ 0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
+ 0x7A,0x7B,0x7C,0x7D,0x8E,0xE4,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,
+ 0x8D,0xA6,0xD4,0xA6,0xD5,0xA6,0xD6,0xA6,0xD7,0xA6,0xD8,0xA7,0xA7,0xA7,0xA1,0xA7,0xA2,0xA7,0xA3,0xA7,
+ 0xA4,0xA7,0xA5,0xA7,0xA6,0xA7,0xA8,0xA7,0xA9,0xA7,0xAA,0xA7,0xAB,0xA7,0xAC,0xA7,0xAD,0xA7,0xAE,0xA7,
+ 0xAF,0xA7,0xB0,0xA7,0xB1,0xA7,0xB2,0xA7,0xB3,0xA7,0xB4,0xA7,0xB5,0xA7,0xB6,0xA7,0xB7,0xA7,0xB8,0xA7,
+ 0xB9,0xA7,0xBA,0xA7,0xBB,0xA7,0xBC,0xA7,0xBD,0xA7,0xBE,0xA7,0xBF,0xA7,0xC0,0xA7,0xC1,0xA7,0xD1,0xA7,
+ 0xD2,0xA7,0xD3,0xA7,0xD4,0xA7,0xD5,0xA7,0xD6,0xA7,0xD8,0xA7,0xD9,0xA7,0xDA,0xA7,0xDB,0xA7,0xDC,0xA7,
+ 0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7,0xE6,0xA7,
+ 0xF1,0xA7,0xD7,0xA1,0xBE,
+};
+
+WCHAR eucjp_uniSource[]={
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,
+ 0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,
+ 0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4,0x30FB,0x32A7,
+ 0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410,
+ 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,
+ 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,
+ 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,
+ 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,
+ 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C,
+ 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E,
+ 0x2103,0x5834,0x0057,0x5834,0x0058,0x212B,0x5834,0x004A,0x5834,0x004B,
+ 0x5834,0x004C,0x5834,0x004D,0x5834,0x004E,0x5834,0x004F,0x5834,0x0050,
+ 0x5834,0x0051,0x5834,0x0052,0x5834,0x0053,0x5834,0x0040,0x5834,0x0041,
+ 0x5834,0x0042,0x5834,0x0043,0x5834,0x0044,0x5834,0x0045,0x5834,0x0046,
+ 0x2225,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+ 0x0079,0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4,0x30FB,
+ 0x32A7,0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,
+ 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,
+ 0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,
+ 0x0424,0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,
+ 0x042E,0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
+ 0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,
+ 0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,
+ 0x044C,0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,
+ 0x201C,0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,
+ 0x007E,0x2103,0x5834,0x0057,0x5834,0x0058,0x212B,0x5834,0x004A,0x5834,
+ 0x004B,0x5834,0x004C,0x5834,0x004D,0x5834,0x004E,0x5834,0x004F,0x5834,
+ 0x0050,0x5834,0x0051,0x5834,0x0052,0x5834,0x0053,0x5834,0x0040,0x5834,
+ 0x0041,0x5834,0x0042,0x5834,0x0043,0x5834,0x0044,0x5834,0x0045,0x5834,
+ 0x0046,0x2225,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,
+ 0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,
+ 0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,
+ 0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,
+ 0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,
+ 0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,
+ 0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,
+ 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,
+ 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+ 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4,
+ 0x30FB,0x32A7,0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9,
+ 0x0401,0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,
+ 0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,
+ 0x0423,0x0424,0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,
+ 0x042D,0x042E,0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,
+ 0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,
+ 0x0441,0x0442,0x0443,0x0444,0x044F,0x0451,0x2010,0x043E,0x043F,0x0440,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,
+ 0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,
+ 0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4,0x30FB,0x32A7,
+ 0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410,
+ 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,
+ 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,
+ 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,
+ 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,
+ 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C,
+ 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E,
+ 0x2103,0x5834,0x0057,0x5834,0x0058,0x212B,0x5834,0x004A,0x5834,0x004B,
+ 0x5834,0x004C,0x5834,0x004D,0x5834,0x004E,0x5834,0x004F,0x5834,0x0050,
+ 0x5834,0x0051,0x5834,0x0052,0x5834,0x0053,0x5834,0x0040,0x5834,0x0041,
+ 0x5834,0x0042,0x5834,0x0043,0x5834,0x0044,0x5834,0x0045,0x5834,0x0046,
+ 0x2225,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0041,0x5834,0x0042,0x5834,
+};
+
+WCHAR eucjp_uniSmSource[]={
+ 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,
+ 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,
+};
+unsigned char eucjp_encSmSource[]={
+ 0xA7,0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7,0xE6,
+};
+
+unsigned char iso2022kr_encSource[]={
+ 0x1B,0x24,0x29,0x43,
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E,
+ 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64,
+ 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D,
+ /**/
+
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65,
+ 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23,
+ 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,
+ 0x0F,0x0A,0x0D,
+
+};
+WCHAR iso2022kr_uniSource[]={
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B,
+ 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4,
+ 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD,
+ /**/
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+ 0xAC09,0x0025,0x0026,0x0027
+
+};
+
+unsigned char iso2022kr_encSmSource[]={
+ 0x1B,0x24,0x29,0x43,
+ 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D
+};
+WCHAR iso2022kr_uniSmSource[]={
+ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C,
+ 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08,
+};
+unsigned char gb2312_encSource[]={
+ 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75,
+ 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A,
+ 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,
+ 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A,
+ 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F,
+ 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,
+ 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E,
+ 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3,
+ 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+ 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2,
+ 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82,
+ 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82,
+ 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6,
+
+ 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75,
+ 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A,
+ 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,
+ 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A,
+ 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F,
+ 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,
+ 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E,
+ 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3,
+ 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+ 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2,
+ 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82,
+ 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82,
+ 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6,
+
+ 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75,
+ 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A,
+ 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,
+ 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A,
+ 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F,
+ 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,
+ 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E,
+ 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3,
+ 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+ 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2,
+ 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82,
+ 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82,
+ 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6,
+
+ 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75,
+ 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A,
+ 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,
+ 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A,
+ 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F,
+ 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,
+ 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E,
+ 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3,
+ 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+ 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2,
+ 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82,
+ 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82,
+ 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6,0x82,0xC4,0x82,
+};
+WCHAR gb2312_uniSource[]={
+ 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
+ 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174,
+ 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208,
+ 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229,
+ 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C,
+ 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460,
+ 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474,
+ 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E,
+ 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488,
+ 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492,
+ 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500,
+ 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A,
+ 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514,
+ 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E,
+ 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528,
+ 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532,
+ 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C,
+ 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,
+ 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC,
+ 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642,
+ 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4,
+ 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394,
+ 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,
+ 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,
+ 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,
+
+ 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
+ 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174,
+ 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208,
+ 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229,
+ 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C,
+ 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460,
+ 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474,
+ 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E,
+ 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488,
+ 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492,
+ 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500,
+ 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A,
+ 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514,
+ 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E,
+ 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528,
+ 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532,
+ 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C,
+ 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,
+ 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC,
+ 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642,
+ 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4,
+ 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394,
+ 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,
+ 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,
+ 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,
+
+ 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
+ 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174,
+ 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208,
+ 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229,
+ 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C,
+ 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460,
+ 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474,
+ 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E,
+ 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488,
+ 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492,
+ 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500,
+ 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A,
+ 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514,
+ 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E,
+ 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528,
+ 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532,
+ 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C,
+ 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,
+ 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC,
+ 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642,
+ 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4,
+ 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394,
+ 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,
+ 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,
+ 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,
+
+ 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
+ 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174,
+ 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208,
+ 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229,
+ 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C,
+ 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460,
+ 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474,
+ 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E,
+ 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488,
+ 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492,
+ 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500,
+ 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A,
+ 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514,
+ 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E,
+ 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528,
+ 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532,
+ 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C,
+ 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,
+ 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC,
+ 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642,
+ 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4,
+ 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394,
+ 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,
+ 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,
+ 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,
+
+ 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
+ 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174,
+ 0x2175,0x2176,0x2177,0x2178,
+};
+
+WCHAR gb2312_uniSmSource[]={
+ 0x4FF5,0x4FF6,0x4FF7,0x4FF9,0x4FFB,0x4FFC,0x4FFD,0x4FFF,0x5000,0x5001,
+ 0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D
+};
+unsigned char gb2312_encSmSource[]={
+ 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75
+};
+
+unsigned char latin1_encSource[]={
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,
+
+};
+
+WCHAR latin1_uniSource[]={
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040
+
+};
+
+unsigned char latin2_encSource[]={
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,
+
+
+};
+WCHAR latin2_uniSource[]={
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x0015,0x0016,0x0017,0x0018,
+
+};
+
+unsigned char latin3_encSource[]={
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,
+
+
+};
+WCHAR latin3_uniSource[]={
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,
+
+};
+
+unsigned char latin4_encSource[]={
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,
+};
+WCHAR latin4_uniSource[]={
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,
+};
+ unsigned char latin5_encSource[]={
+ 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,
+ 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,
+ 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,
+ 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,
+ 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,
+ 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,
+ 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,
+ 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,
+ 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,
+ 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,
+ 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,
+ 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
+ 0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,
+ 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,
+ 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,
+ 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,
+ 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,
+ 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,
+ 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,
+ 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,
+ 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,
+ 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,
+ 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,
+ 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,
+ 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
+ 0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,
+ 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,
+ 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,
+ 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,
+ 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,
+ 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,
+ 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,
+ 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,
+ 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,
+ 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,
+ 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,
+ 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,
+ 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
+ 0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,
+ 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,
+ 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,
+ 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,
+ 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,
+ 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,
+ 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,
+ 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,
+ 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,
+ 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,
+ 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,
+ 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,
+ 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
+ 0xEF,0xF1,0xF2,0xF3
+
+};
+
+WCHAR latin5_uniSource[]={
+ 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,
+ 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,
+ 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+ 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,
+ 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,
+ 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,
+ 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
+ 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,
+ 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412,
+ 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,
+ 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
+ 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430,
+ 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A,
+ 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,
+ 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,
+ 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,
+ /**/
+ 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,
+ 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,
+ 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+ 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,
+ 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,
+ 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,
+ 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
+ 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,
+ 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412,
+ 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,
+ 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
+ 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430,
+ 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A,
+ 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,
+ 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,
+ 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,
+ /**/
+ 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,
+ 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,
+ 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+ 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,
+ 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,
+ 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,
+ 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
+ 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,
+ 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412,
+ 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,
+ 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
+ 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430,
+ 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A,
+ 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,
+ 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,
+ 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,
+ /**/
+ 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,
+ 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,
+ 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+ 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,
+ 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,
+ 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,
+ 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
+ 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,
+ 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412,
+ 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,
+ 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
+ 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430,
+ 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A,
+ 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,
+ 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,
+ 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,
+ /**/
+ 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,
+ 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+ 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,
+ 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,
+ 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,
+ 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,
+ 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,
+ 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,
+ 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+ 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,
+ 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,
+ 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,
+ 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
+ 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,
+ 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412,
+ 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,
+ 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
+ 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430,
+ 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A,
+ 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,
+ 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,
+ 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,
+ /**/
+ 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,
+ 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,
+ 0x0014,0x0015,0x0016,0x0017,
+
+};
+unsigned char latin6_encSource[]={
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
+ 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,
+ 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3,
+
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
+ 0x74,0x75,0x76,0x77,
+};
+WCHAR latin6_uniSource[]={
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,
+ 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F,
+ 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A,
+ 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634,
+ 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
+
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,
+ 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,
+ 0x0074,0x0075,0x0076,0x0077
+};
+
+unsigned char latin7_encSource[]={
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+ 0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,
+ 0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,
+ 0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1,0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9,
+ 0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
+ 0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,
+ 0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,
+ 0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,
+ 0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,
+ 0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,
+ 0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,
+ 0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,
+ 0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,
+ 0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,
+ 0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,
+ 0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1,
+ 0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,
+ 0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,
+ 0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
+ 0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8,
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,
+ 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
+ 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
+ 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,
+ 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+ 0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,
+ 0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,
+ 0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1,0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9,
+ 0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
+ 0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,
+ 0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,
+ 0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,
+ 0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,
+ 0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,
+ 0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,
+ 0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,
+ 0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,
+ 0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,
+ 0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,
+ 0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1,
+ 0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,
+ 0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,
+ 0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
+ 0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8,
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,
+ 0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,
+
+
+};
+WCHAR latin7_uniSource[]={
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+ 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,
+ 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,
+ 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,
+ 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,
+ 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1,
+ 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389,
+ 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,
+ 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,
+ 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA,
+ 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,
+ 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,
+ 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+ 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,
+ 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,
+ 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,
+ 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,
+ 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1,
+ 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389,
+ 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,
+ 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,
+ 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA,
+ 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,
+ 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,
+ 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+ 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,
+ 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,
+ 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,
+ 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,
+ 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1,
+ 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389,
+ 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,
+ 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,
+ 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA,
+ 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,
+ 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,
+ 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
+ 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,
+ 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,
+ 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,
+ 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,
+ 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,
+ 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,
+ 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,
+ 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,
+ 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,
+ 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,
+ 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,
+ 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,
+ 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,
+ 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1,
+ 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389,
+ 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,
+ 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,
+ 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA,
+ 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,
+ 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,
+ 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8,
+ 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,
+ 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,
+ 0x0015,0x0016,0x0017,0x0018
+ };
+
+unsigned char latin8_encSource[]={
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,
+ 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,
+ 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,
+ 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+
+ 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x5B,0x5C,
+
+};
+WCHAR latin8_uniSource[]={
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,
+ 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,
+ 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,
+ 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,
+ 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,
+ 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,
+ 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,
+ 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,
+
+ 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,
+ 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,
+ 0x0059,0x005A,0x005B,0x005C,
+};
+unsigned char ebcdic_arabic_encSource[]={
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+ 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0,
+ 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31,
+
+ 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,
+ 0x4F,0x07,0x20,0x21,
+
+};
+WCHAR ebcdic_arabic_uniSource[]={
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+ 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7,
+ 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+ 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
+ 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,
+
+
+ 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,
+ 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,
+ 0x007C,0x007F,0x0080,0x0081,
+};
+
+
+unsigned char utf8_encSource[]={
+ 0xE3,0x80,0x80,0xE3,0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,
+ 0xEF,0xBC,0x9A,0xEF,0xBC,0x9B,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,
+ 0x0D,0x0A,0xEF,0xBC,0x9F,0xEF,0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4,
+ 0xEF,0xBD,0x80,0xC2,0xA8,0xEF,0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,
+ 0x51,0x52,0x0D,0x0A,0xEF,0xBF,0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE,
+ 0xE3,0x82,0x9D,0xE3,0x82,0x9E,0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80,
+ 0x85,0xE3,0x80,0x86,0xE3,0x80,0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90,
+ 0xEF,0xBC,0x8F,0x5C,0x0D,0x0A,0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2,
+ 0x80,0x98,0xE2,0x80,0x99,0xE2,0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88,
+ 0xEF,0xBC,0x89,0xE3,0x80,0x94,0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF,
+ 0xBD,0xB8,0x0D,0x0A,0xEF,0xBD,0xB9,0xEF,0xBD,0xBA,0xEF,0xBD,0xBB,0xEF,0xBD,0xBC,
+ 0xEF,0xBD,0xBD,0xEF,0xBD,0xBE,0xEF,0xBD,0xBF,0xEF,0xBE,0x80,0x0D,0x0A,0x53,0x54,
+ 0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x81,0xEF,0xBE,0x82,0xEF,0xBE,
+ 0x83,0xEF,0xBE,0x84,0xEF,0xBE,0x85,0xEF,0xBE,0x86,0xEF,0xBE,0x87,0xEF,0xBE,0x88,
+ 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x89,0xEF,
+ 0xBE,0x8A,0xEF,0xBE,0x8B,0x20,0xEF,0xBE,0x8D,0xEF,0xBE,0x8E,0xEF,0xBE,0x8F,0xEF,
+ 0xBE,0x90,0x0D,0x0A,0xEF,0xBE,0x91,0xEF,0xBE,0x92,0xEF,0xBE,0x93,0xEF,0xBE,0x94,
+ 0xEF,0xBE,0x95,0xEF,0xBE,0x96,0xEF,0xBE,0x97,0xEF,0xBE,0x98,0x0D,0x0A,0xE3,0x80,
+ 0x80,0xE3,0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,0xEF,0xBC,
+ 0x9A,0xEF,0xBC,0x9B,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,
+ 0xEF,0xBC,0x9F,0xEF,0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4,0xEF,0xBD,
+ 0x80,0xC2,0xA8,0xEF,0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,
+ 0x0D,0x0A,0xEF,0xBF,0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE,0xE3,0x82,
+ 0x9D,0xE3,0x82,0x9E,0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80,0x85,0xE3,
+ 0x80,0x86,0xE3,0x80,0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90,0xEF,0xBC,
+ 0x8F,0x5C,0x0D,0x0A,0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2,0x80,0x98,
+ 0xE2,0x80,0x99,0xE2,0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88,0xEF,0xBC,
+ 0x89,0xE3,0x80,0x94,0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF,0xBD,0xB8,
+ 0x0D,0x0A,0xEF,0xBD,0xB9,0xEF,0xBD,0xBA,0xEF,0xBD,0xBB,0xEF,0xBD,0xBC,0xEF,0xBD,
+ 0xBD,0xEF,0xBD,0xBE,0xEF,0xBD,0xBF,0xEF,0xBE,0x80,0x0D,0x0A,0x53,0x54,0x55,0x56,
+ 0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x81,0xEF,0xBE,0x82,0xEF,0xBE,0x83,0xEF,
+ 0xBE,0x84,0xEF,0xBE,0x85,0xEF,0xBE,0x86,0xEF,0xBE,0x87,0xEF,0xBE,0x88,0x0D,0x0A,
+ 0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x89,0xEF,0xBE,0x8A,
+ 0xEF,0xBE,0x8B,0x20,0xEF,0xBE,0x8D,0xEF,0xBE,0x8E,0xEF,0xBE,0x8F,0xEF,0xBE,0x90,
+ 0x0D,0x0A,0xEF,0xBE,0x91,0xEF,0xBE,0x92,0xEF,0xBE,0x93,0xEF,0xBE,0x94,0xEF,0xBE,
+ 0x95,0xEF,0xBE,0x96,0xEF,0xBE,0x97,0xEF,0xBE,0x98,0x0D,0x0A,0xE3,0x80,0x80,0xE3,
+ 0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,0xEF,0xBC,0x9A,0xEF,
+ 0xBC,0x9B,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0xEF,0xBC,
+ 0x9F,0xEF,0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4,0xEF,0xBD,0x80,0xC2,
+ 0xA8,0xEF,0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,
+ 0xEF,0xBF,0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE,0xE3,0x82,0x9D,0xE3,
+ 0x82,0x9E,0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80,0x85,0xE3,0x80,0x86,
+ 0xE3,0x80,0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90,0xEF,0xBC,0x8F,0x5C,
+ 0x0D,0x0A,0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2,0x80,0x98,0xE2,0x80,
+ 0x99,0xE2,0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88,0xEF,0xBC,0x89,0xE3,
+ 0x80,0x94,0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF,0xBD,0xB8,0x0D,0x0A,
+ 0xEF,0xBD,0xB9,0xEF,0xBD,0xBA,0xEF,0xBD,0xBB,0xEF,0xBD,0xBC,0xEF,0xBD,0xBD,0xEF,
+ 0xBD,0xBE,0xEF,0xBD,0xBF,0xEF,0xBE,0x80,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x81,0xEF,0xBE,0x82,0xEF,0xBE,0x83,0xEF,0xBE,0x84,
+ 0xEF,0xBE,0x85,0xEF,0xBE,0x86,0xEF,0xBE,0x87,0xEF,0xBE,0x88,0x0D,0x0A,0x53,0x54,
+ 0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x89,0xEF,0xBE,0x8A,0xEF,0xBE,
+ 0x8B,0x20,0xEF,0xBE,0x8D,0xEF,0xBE,0x8E,0xEF,0xBE,0x8F,0xEF,0xBE,0x90,0x0D,0x0A,
+ 0xEF,0xBE,0x91,0xEF,0xBE,0x92,0xEF,0xBE,0x93,0xEF,0xBE,0x94,0xEF,0xBE,0x95,0xEF,
+ 0xBE,0x96,0xEF,0xBE,0x97,0xEF,0xBE,0x98,0x0D,0x0A,0xE3,0x80,0x80,0xE3,0x80,0x81,
+ 0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,0xEF,0xBC,0x9A,0xEF,0xBC,0x9B,
+ 0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0xEF,0xBC,0x9F,0xEF,
+ 0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4,0xEF,0xBD,0x80,0xC2,0xA8,0xEF,
+ 0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0xEF,0xBF,
+ 0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE,0xE3,0x82,0x9D,0xE3,0x82,0x9E,
+ 0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80,0x85,0xE3,0x80,0x86,0xE3,0x80,
+ 0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90,0xEF,0xBC,0x8F,0x5C,0x0D,0x0A,
+ 0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2,0x80,0x98,0xE2,0x80,0x99,0xE2,
+ 0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88,0xEF,0xBC,0x89,0xE3,0x80,0x94,
+ 0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF,0xBD,0xB8,0x0D,0x0A
+
+};
+WCHAR utf8_uniSource[]={
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A,
+ /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A,
+ 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A,
+ 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A,
+ 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A,
+ 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A,
+ 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A,
+ /**/
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+ 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A,
+ 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A,
+ 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A,
+ 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,
+};
+
+WCHAR utf8_uniSmSource[]={
+ 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A,
+ 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A,
+};
+unsigned char utf8_encSmSource[]={
+ 0xE3,0x80,0x80,0xE3,0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,
+ 0xEF,0xBC,0x9A,0xEF,0xBC,0x9B,0x0D,0x0A
+};
+#endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/normperf/Makefile.in
new file mode 100644
index 00000000000..8b35cab0465
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/normperf
+## Copyright (c) 2001-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/normperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = normperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = normperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf.pl
new file mode 100755
index 00000000000..2f8df8c0129
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf.pl
@@ -0,0 +1,58 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * Copyright (c) 2002-2007, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+
+my $options = {
+ "title"=>"Normalization performance: ICU vs. Win",
+ "headers"=>"Win ICU",
+ "operationIs"=>"code point",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/LocalCVS/icu4c/collation-perf-data",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "Release/normperf.exe -b -u";
+
+my $tests = {
+ "NFC_NFD_Text", ["$p TestWin_NFC_NFD_Text" , "$p TestICU_NFC_NFD_Text" ],
+ "NFC_NFC_Text", ["$p TestWin_NFC_NFC_Text" , "$p TestICU_NFC_NFC_Text" ],
+ "NFC_Orig_Text", ["$p TestWin_NFC_Orig_Text" , "$p TestICU_NFC_Orig_Text"],
+ "NFD_NFD_Text", ["$p TestWin_NFD_NFD_Text" , "$p TestICU_NFD_NFD_Text" ],
+ "NFD_NFC_Text", ["$p TestWin_NFD_NFC_Text" , "$p TestICU_NFD_NFC_Text" ],
+ "NFD_Orig_Text", ["$p TestWin_NFD_Orig_Text" , "$p TestICU_NFD_Orig_Text"]
+ };
+
+my $dataFiles = {
+ "",
+ [
+ "TestNames_Asian.txt",
+ "TestNames_Chinese.txt",
+ "TestNames_Japanese.txt",
+ "TestNames_Japanese_h.txt",
+ "TestNames_Japanese_k.txt",
+ "TestNames_Korean.txt",
+ "TestNames_Latin.txt",
+ "TestNames_SerbianSH.txt",
+ "TestNames_SerbianSR.txt",
+ "TestNames_Thai.txt",
+ "Testnames_Russian.txt",
+ "th18057.txt",
+ "thesis.txt",
+ "vfear11a.txt",
+ ]
+ };
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf_r.pl
new file mode 100644
index 00000000000..92900072be7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf_r.pl
@@ -0,0 +1,79 @@
+#!/usr/bin/perl
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002-2007, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+#Assume we are running outside of the ICU source
+use lib './ICU-3.0/ICU/source/test/perf/perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"Normalization performance regression (ICU 2.8 and 3.0)",
+ "headers"=>"ICU28 ICU30",
+ "operationIs"=>"code point",
+ "timePerOperationIs"=>"Time per code point",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"results_ICU4C"
+ };
+
+# programs
+
+my $p1 = "icu-2.8/icu/bin/normperf28.exe -b -u";
+my $p2 = "icu-3.0/icu/bin/normperf30.exe -b -u";
+
+my $dataFiles = {
+ "",
+ [
+ "TestNames_Asian.txt",
+ "TestNames_Chinese.txt",
+ "TestNames_Japanese.txt",
+ "TestNames_Japanese_h.txt",
+ "TestNames_Japanese_k.txt",
+ "TestNames_Korean.txt",
+ "TestNames_Latin.txt",
+ "TestNames_SerbianSH.txt",
+ "TestNames_SerbianSR.txt",
+ "TestNames_Thai.txt",
+ "Testnames_Russian.txt",
+# "th18057.txt",
+# "thesis.txt",
+# "vfear11a.txt",
+ ]
+ };
+
+
+my $tests = {
+ "NFC_NFD_Text", ["$p1 TestICU_NFC_NFD_Text" , "$p2 TestICU_NFC_NFD_Text" ],
+ "NFC_NFC_Text", ["$p1 TestICU_NFC_NFC_Text" , "$p2 TestICU_NFC_NFC_Text" ],
+ "NFC_Orig_Text", ["$p1 TestICU_NFC_Orig_Text" , "$p2 TestICU_NFC_Orig_Text"],
+ "NFD_NFD_Text", ["$p1 TestICU_NFD_NFD_Text" , "$p2 TestICU_NFD_NFD_Text" ],
+ "NFD_NFC_Text", ["$p1 TestICU_NFD_NFC_Text" , "$p2 TestICU_NFD_NFC_Text" ],
+ "NFD_Orig_Text", ["$p1 TestICU_NFD_Orig_Text" , "$p2 TestICU_NFD_Orig_Text"],
+ ##
+ "QC_NFC_NFD_Text", ["$p1 TestQC_NFC_NFD_Text" , "$p2 TestQC_NFC_NFD_Text" ],
+ "QC_NFC_NFC_Text", ["$p1 TestQC_NFC_NFC_Text" , "$p2 TestQC_NFC_NFC_Text" ],
+ "QC_NFC_Orig_Text", ["$p1 TestQC_NFC_Orig_Text" , "$p2 TestQC_NFC_Orig_Text"],
+ "QC_NFD_NFD_Text", ["$p1 TestQC_NFD_NFD_Text" , "$p2 TestQC_NFD_NFD_Text" ],
+ "QC_NFD_NFC_Text", ["$p1 TestQC_NFD_NFC_Text" , "$p2 TestQC_NFD_NFC_Text" ],
+ "QC_NFD_Orig_Text", ["$p1 TestQC_NFD_Orig_Text" , "$p2 TestQC_NFD_Orig_Text"],
+ ##
+ "IsNormalized_NFC_NFD_Text", ["$p1 TestIsNormalized_NFC_NFD_Text" , "$p2 TestIsNormalized_NFC_NFD_Text" ],
+ "IsNormalized_NFC_NFC_Text", ["$p1 TestIsNormalized_NFC_NFC_Text" , "$p2 TestIsNormalized_NFC_NFC_Text" ],
+ "IsNormalized_NFC_Orig_Text", ["$p1 TestIsNormalized_NFC_Orig_Text" , "$p2 TestIsNormalized_NFC_Orig_Text"],
+ "IsNormalized_NFD_NFD_Text", ["$p1 TestIsNormalized_NFD_NFD_Text" , "$p2 TestIsNormalized_NFD_NFD_Text" ],
+ "IsNormalized_NFD_NFC_Text", ["$p1 TestIsNormalized_NFD_NFC_Text" , "$p2 TestIsNormalized_NFD_NFC_Text" ],
+ "IsNormalized_NFD_Orig_Text", ["$p1 TestIsNormalized_NFD_Orig_Text" , "$p2 TestIsNormalized_NFD_Orig_Text"]
+ };
+
+
+runTests($options, $tests, $dataFiles);
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.cpp
new file mode 100644
index 00000000000..011bbcbd3ec
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.cpp
@@ -0,0 +1,505 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+**********************************************************************
+*/
+/**
+ * This Program tests the performance of ICU's Normalization engine against Windows
+ * to run it use the command like
+ *
+ * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 -p 15 -f TestNames_Asian.txt -u -e UTF-8 -l
+ */
+#include "normperf.h"
+#include "uoptions.h"
+#include <stdio.h>
+
+#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
+
+UPerfFunction* NormalizerPerformanceTest::runIndexedTest(int32_t index, UBool exec,const char* &name, char* par) {
+ switch (index) {
+ TESTCASE(0,TestICU_NFC_NFD_Text);
+ TESTCASE(1,TestICU_NFC_NFC_Text);
+ TESTCASE(2,TestICU_NFC_Orig_Text);
+
+ TESTCASE(3,TestICU_NFD_NFD_Text);
+ TESTCASE(4,TestICU_NFD_NFC_Text);
+ TESTCASE(5,TestICU_NFD_Orig_Text);
+
+ TESTCASE(6,TestICU_FCD_NFD_Text);
+ TESTCASE(7,TestICU_FCD_NFC_Text);
+ TESTCASE(8,TestICU_FCD_Orig_Text);
+
+ TESTCASE(9,TestWin_NFC_NFD_Text);
+ TESTCASE(10,TestWin_NFC_NFC_Text);
+ TESTCASE(11,TestWin_NFC_Orig_Text);
+
+ TESTCASE(12,TestWin_NFD_NFD_Text);
+ TESTCASE(13,TestWin_NFD_NFC_Text);
+ TESTCASE(14,TestWin_NFD_Orig_Text);
+
+ TESTCASE(15,TestQC_NFC_NFD_Text);
+ TESTCASE(16,TestQC_NFC_NFC_Text);
+ TESTCASE(17,TestQC_NFC_Orig_Text);
+
+ TESTCASE(18,TestQC_NFD_NFD_Text);
+ TESTCASE(19,TestQC_NFD_NFC_Text);
+ TESTCASE(20,TestQC_NFD_Orig_Text);
+
+ TESTCASE(21,TestQC_FCD_NFD_Text);
+ TESTCASE(22,TestQC_FCD_NFC_Text);
+ TESTCASE(23,TestQC_FCD_Orig_Text);
+
+ TESTCASE(24,TestIsNormalized_NFC_NFD_Text);
+ TESTCASE(25,TestIsNormalized_NFC_NFC_Text);
+ TESTCASE(26,TestIsNormalized_NFC_Orig_Text);
+
+ TESTCASE(27,TestIsNormalized_NFD_NFD_Text);
+ TESTCASE(28,TestIsNormalized_NFD_NFC_Text);
+ TESTCASE(29,TestIsNormalized_NFD_Orig_Text);
+
+ TESTCASE(30,TestIsNormalized_FCD_NFD_Text);
+ TESTCASE(31,TestIsNormalized_FCD_NFC_Text);
+ TESTCASE(32,TestIsNormalized_FCD_Orig_Text);
+
+ default:
+ name = "";
+ return NULL;
+ }
+ return NULL;
+
+}
+
+void NormalizerPerformanceTest::normalizeInput(ULine* dest,const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options){
+ int32_t reqLen = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ for(;;){
+ /* pure pre-flight */
+ reqLen=unorm_normalize(src,srcLen,mode, options,NULL,0,&status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ dest->name = new UChar[reqLen+1];
+ reqLen= unorm_normalize(src,srcLen,mode, options,dest->name,reqLen+1,&status);
+ dest->len=reqLen;
+ break;
+ }else if(U_FAILURE(status)){
+ printf("Could not normalize input. Error: %s", u_errorName(status));
+ }
+ }
+}
+UChar* NormalizerPerformanceTest::normalizeInput(int32_t& len, const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options){
+ int32_t reqLen = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ UChar* dest = NULL;
+ for(;;){
+ /* pure pre-flight */
+ reqLen=unorm_normalize(src,srcLen,mode, options,NULL,0,&status);
+ if(status==U_BUFFER_OVERFLOW_ERROR){
+ status=U_ZERO_ERROR;
+ dest = new UChar[reqLen+1];
+ reqLen= unorm_normalize(src,srcLen,mode, options,dest,reqLen+1,&status);
+ len=reqLen;
+ break;
+ }else if(U_FAILURE(status)){
+ printf("Could not normalize input. Error: %s", u_errorName(status));
+ return NULL;
+ }
+ }
+ return dest;
+}
+
+static UOption cmdLineOptions[]={
+ UOPTION_DEF("options", 'o', UOPT_OPTIONAL_ARG)
+};
+
+NormalizerPerformanceTest::NormalizerPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status)
+: UPerfTest(argc,argv,status), options(0) {
+ NFDBuffer = NULL;
+ NFCBuffer = NULL;
+ NFDBufferLen = 0;
+ NFCBufferLen = 0;
+ NFDFileLines = NULL;
+ NFCFileLines = NULL;
+
+ if(status== U_ILLEGAL_ARGUMENT_ERROR){
+ fprintf(stderr,gUsageString, "normperf");
+ return;
+ }
+
+ if(U_FAILURE(status)){
+ fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", u_errorName(status));
+ return;
+ }
+
+ _remainingArgc = u_parseArgs(_remainingArgc, (char **)argv, (int32_t)(LENGTHOF(cmdLineOptions)), cmdLineOptions);
+ if(cmdLineOptions[0].doesOccur && cmdLineOptions[0].value!=NULL) {
+ options=(int32_t)strtol(cmdLineOptions[0].value, NULL, 16);
+ }
+
+ if(line_mode){
+ ULine* filelines = getLines(status);
+ if(U_FAILURE(status)){
+ fprintf(stderr, "FAILED to read lines from file and create UPerfTest object. Error: %s\n", u_errorName(status));
+ return;
+ }
+ NFDFileLines = new ULine[numLines];
+ NFCFileLines = new ULine[numLines];
+
+ for(int32_t i=0;i<numLines;i++){
+ normalizeInput(&NFDFileLines[i],filelines[i].name,filelines[i].len,UNORM_NFD, options);
+ normalizeInput(&NFCFileLines[i],filelines[i].name,filelines[i].len,UNORM_NFC, options);
+
+ }
+ }else if(bulk_mode){
+ int32_t srcLen = 0;
+ const UChar* src = getBuffer(srcLen,status);
+ NFDBufferLen = 0;
+ NFCBufferLen = 0;
+
+ if(U_FAILURE(status)){
+ fprintf(stderr, "FAILED to read buffer from file and create UPerfTest object. Error: %s\n", u_errorName(status));
+ return;
+ }
+
+ NFDBuffer = normalizeInput(NFDBufferLen,src,srcLen,UNORM_NFD, options);
+ NFCBuffer = normalizeInput(NFCBufferLen,src,srcLen,UNORM_NFC, options);
+ }
+
+}
+
+NormalizerPerformanceTest::~NormalizerPerformanceTest(){
+ delete[] NFDFileLines;
+ delete[] NFCFileLines;
+ delete[] NFDBuffer;
+ delete[] NFCBuffer;
+}
+
+// Test NFC Performance
+UPerfFunction* NormalizerPerformanceTest::TestICU_NFC_NFD_Text(){
+ if(line_mode){
+ NormPerfFunction* func= new NormPerfFunction(ICUNormNFC, options,NFDFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func= new NormPerfFunction(ICUNormNFC, options,NFDBuffer, NFDBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestICU_NFC_NFC_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFC, options,NFCFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func= new NormPerfFunction(ICUNormNFC, options,NFCBuffer, NFCBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestICU_NFC_Orig_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFC, options,lines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFC, options,buffer, bufferLen, uselen);
+ return func;
+ }
+}
+
+// Test NFD Performance
+UPerfFunction* NormalizerPerformanceTest::TestICU_NFD_NFD_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFDFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFDBuffer,NFDBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestICU_NFD_NFC_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFCFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFCBuffer,NFCBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestICU_NFD_Orig_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,lines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,buffer,bufferLen, uselen);
+ return func;
+ }
+}
+
+// Test FCD Performance
+UPerfFunction* NormalizerPerformanceTest::TestICU_FCD_NFD_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFDFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFDBuffer,NFDBufferLen, uselen);
+ return func;
+ }
+
+}
+UPerfFunction* NormalizerPerformanceTest::TestICU_FCD_NFC_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFCFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFCBuffer,NFCBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestICU_FCD_Orig_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,lines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,buffer,bufferLen, uselen);
+ return func;
+ }
+}
+
+// Test Win NFC Performance
+UPerfFunction* NormalizerPerformanceTest::TestWin_NFC_NFD_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFDFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFDBuffer,NFDBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestWin_NFC_NFC_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFCFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFCBuffer,NFCBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestWin_NFC_Orig_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,lines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,buffer,bufferLen, uselen);
+ return func;
+ }
+}
+
+// Test Win NFD Performance
+UPerfFunction* NormalizerPerformanceTest::TestWin_NFD_NFD_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFDFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFDBuffer,NFDBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestWin_NFD_NFC_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFCFileLines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFCBuffer,NFCBufferLen, uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestWin_NFD_Orig_Text(){
+ if(line_mode){
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,lines,numLines, uselen);
+ return func;
+ }else{
+ NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,buffer,bufferLen, uselen);
+ return func;
+ }
+}
+
+// Test Quick Check Performance
+UPerfFunction* NormalizerPerformanceTest::TestQC_NFC_NFD_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDFileLines, numLines, UNORM_NFC, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDBuffer, NFDBufferLen, UNORM_NFC, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestQC_NFC_NFC_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCFileLines, numLines, UNORM_NFC, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCBuffer, NFCBufferLen, UNORM_NFC, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestQC_NFC_Orig_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,lines, numLines, UNORM_NFC, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,buffer, bufferLen, UNORM_NFC, options,uselen);
+ return func;
+ }
+}
+
+UPerfFunction* NormalizerPerformanceTest::TestQC_NFD_NFD_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDFileLines, numLines, UNORM_NFD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDBuffer, NFDBufferLen, UNORM_NFD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestQC_NFD_NFC_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCFileLines, numLines, UNORM_NFD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCBuffer, NFCBufferLen, UNORM_NFD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestQC_NFD_Orig_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,lines, numLines, UNORM_NFD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,buffer, bufferLen, UNORM_NFD, options,uselen);
+ return func;
+ }
+}
+
+UPerfFunction* NormalizerPerformanceTest::TestQC_FCD_NFD_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDFileLines, numLines, UNORM_FCD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDBuffer, NFDBufferLen, UNORM_FCD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestQC_FCD_NFC_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCFileLines, numLines, UNORM_FCD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCBuffer, NFCBufferLen, UNORM_FCD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestQC_FCD_Orig_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,lines, numLines, UNORM_FCD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,buffer, bufferLen, UNORM_FCD, options,uselen);
+ return func;
+ }
+}
+
+// Test isNormalized Performance
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFC_NFD_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDFileLines, numLines, UNORM_NFC, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDBuffer, NFDBufferLen, UNORM_NFC, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFC_NFC_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCFileLines, numLines, UNORM_NFC, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCBuffer, NFCBufferLen, UNORM_NFC, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFC_Orig_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,lines, numLines, UNORM_NFC, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,buffer, bufferLen, UNORM_NFC, options,uselen);
+ return func;
+ }
+}
+
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFD_NFD_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDFileLines, numLines, UNORM_NFD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDBuffer, NFDBufferLen, UNORM_NFD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFD_NFC_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCFileLines, numLines, UNORM_NFD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCBuffer, NFCBufferLen, UNORM_NFD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFD_Orig_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,lines, numLines, UNORM_NFD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,buffer, bufferLen, UNORM_NFD, options,uselen);
+ return func;
+ }
+}
+
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_FCD_NFD_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDFileLines, numLines, UNORM_FCD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDBuffer, NFDBufferLen, UNORM_FCD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_FCD_NFC_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCFileLines, numLines, UNORM_FCD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCBuffer, NFCBufferLen, UNORM_FCD, options,uselen);
+ return func;
+ }
+}
+UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_FCD_Orig_Text(){
+ if(line_mode){
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,lines, numLines, UNORM_FCD, options,uselen);
+ return func;
+ }else{
+ QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,buffer, bufferLen, UNORM_FCD, options,uselen);
+ return func;
+ }
+}
+
+int main(int argc, const char* argv[]){
+ UErrorCode status = U_ZERO_ERROR;
+ NormalizerPerformanceTest test(argc, argv, status);
+ if(U_FAILURE(status)){
+ return status;
+ }
+ if(test.run()==FALSE){
+ fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
+ return -1;
+ }
+ return 0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.h b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.h
new file mode 100644
index 00000000000..6a43a7727be
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.h
@@ -0,0 +1,353 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+**********************************************************************
+*/
+#ifndef _NORMPERF_H
+#define _NORMPERF_H
+
+#include "unicode/unorm.h"
+#include "unicode/ustring.h"
+
+#include "unicode/uperf.h"
+#include <stdlib.h>
+
+// Stubs for Windows API functions when building on UNIXes.
+//
+#if defined(U_WINDOWS)
+// do nothing
+#else
+#define _UNICODE
+typedef int DWORD;
+inline int FoldStringW(DWORD dwMapFlags, const UChar* lpSrcStr,int cchSrc, UChar* lpDestStr,int cchDest);
+#endif
+
+#define DEST_BUFFER_CAPACITY 6000
+typedef int32_t (*NormFn)(const UChar* src,int32_t srcLen, UChar* dest,int32_t dstLen, int32_t options, UErrorCode* status);
+typedef int32_t (*QuickCheckFn)(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status);
+
+class QuickCheckPerfFunction : public UPerfFunction{
+private:
+ ULine* lines;
+ int32_t numLines;
+ QuickCheckFn fn;
+ UNormalizationMode mode;
+ int32_t retVal;
+ UBool uselen;
+ const UChar* src;
+ int32_t srcLen;
+ UBool line_mode;
+ int32_t options;
+
+public:
+ virtual void call(UErrorCode* status){
+ if(line_mode==TRUE){
+ if(uselen){
+ for(int32_t i = 0; i< numLines; i++){
+ retVal = (*fn)(lines[i].name,lines[i].len,mode, options, status);
+ }
+ }else{
+ for(int32_t i = 0; i< numLines; i++){
+ retVal = (*fn)(lines[i].name,-1,mode, options, status);
+ }
+ }
+ }else{
+ if(uselen){
+
+ retVal = (*fn)(src,srcLen,mode, options, status);
+ }else{
+ retVal = (*fn)(src,-1,mode, options, status);
+ }
+ }
+
+ }
+ virtual long getOperationsPerIteration(){
+ if(line_mode==TRUE){
+ int32_t totalChars=0;
+ for(int32_t i =0; i< numLines; i++){
+ totalChars+= lines[i].len;
+ }
+ return totalChars;
+ }else{
+ return srcLen;
+ }
+ }
+ QuickCheckPerfFunction(QuickCheckFn func, ULine* srcLines,int32_t srcNumLines, UNormalizationMode _mode, int32_t opts, UBool _uselen) : options(opts) {
+ fn = func;
+ lines = srcLines;
+ numLines = srcNumLines;
+ uselen = _uselen;
+ mode = _mode;
+ src = NULL;
+ srcLen = 0;
+ line_mode = TRUE;
+ }
+ QuickCheckPerfFunction(QuickCheckFn func, const UChar* source,int32_t sourceLen, UNormalizationMode _mode, int32_t opts, UBool _uselen) : options(opts) {
+ fn = func;
+ lines = NULL;
+ numLines = 0;
+ uselen = _uselen;
+ mode = _mode;
+ src = source;
+ srcLen = sourceLen;
+ line_mode = FALSE;
+ }
+};
+
+
+class NormPerfFunction : public UPerfFunction{
+private:
+ ULine* lines;
+ int32_t numLines;
+ UChar dest[DEST_BUFFER_CAPACITY];
+ UChar* pDest;
+ int32_t destLen;
+ NormFn fn;
+ int32_t retVal;
+ UBool uselen;
+ const UChar* src;
+ int32_t srcLen;
+ UBool line_mode;
+ int32_t options;
+
+public:
+ virtual void call(UErrorCode* status){
+ if(line_mode==TRUE){
+ if(uselen){
+ for(int32_t i = 0; i< numLines; i++){
+ retVal = (*fn)(lines[i].name,lines[i].len,pDest,destLen, options, status);
+ }
+ }else{
+ for(int32_t i = 0; i< numLines; i++){
+ retVal = (*fn)(lines[i].name,-1,pDest,destLen, options, status);
+ }
+ }
+ }else{
+ if(uselen){
+ retVal = (*fn)(src,srcLen,pDest,destLen, options, status);
+ }else{
+ retVal = (*fn)(src,-1,pDest,destLen, options, status);
+ }
+ }
+ }
+ virtual long getOperationsPerIteration(){
+ if(line_mode ==TRUE){
+ int32_t totalChars=0;
+ for(int32_t i =0; i< numLines; i++){
+ totalChars+= lines[i].len;
+ }
+ return totalChars;
+ }else{
+ return srcLen;
+ }
+ }
+ NormPerfFunction(NormFn func, int32_t opts, ULine* srcLines,int32_t srcNumLines,UBool _uselen) : options(opts) {
+ fn = func;
+ lines = srcLines;
+ numLines = srcNumLines;
+ uselen = _uselen;
+ destLen = DEST_BUFFER_CAPACITY;
+ pDest = dest;
+ src = NULL;
+ srcLen = 0;
+ line_mode = TRUE;
+ }
+ NormPerfFunction(NormFn func, int32_t opts, const UChar* source,int32_t sourceLen,UBool _uselen) : options(opts) {
+ fn = func;
+ lines = NULL;
+ numLines = 0;
+ uselen = _uselen;
+ destLen = sourceLen*3;
+ pDest = (UChar*) malloc(destLen * U_SIZEOF_UCHAR);
+ src = source;
+ srcLen = sourceLen;
+ line_mode = FALSE;
+ }
+ ~NormPerfFunction(){
+ if(dest != pDest){
+ free(pDest);
+ }
+ }
+};
+
+
+
+class NormalizerPerformanceTest : public UPerfTest{
+private:
+ ULine* NFDFileLines;
+ ULine* NFCFileLines;
+ UChar* NFDBuffer;
+ UChar* NFCBuffer;
+ UChar* origBuffer;
+ int32_t origBufferLen;
+ int32_t NFDBufferLen;
+ int32_t NFCBufferLen;
+ int32_t options;
+
+ void normalizeInput(ULine* dest,const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options);
+ UChar* normalizeInput(int32_t& len, const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options);
+
+public:
+
+ NormalizerPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status);
+ ~NormalizerPerformanceTest();
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,const char* &name, char* par = NULL);
+ /* NFC performance */
+ UPerfFunction* TestICU_NFC_NFD_Text();
+ UPerfFunction* TestICU_NFC_NFC_Text();
+ UPerfFunction* TestICU_NFC_Orig_Text();
+
+ /* NFD performance */
+ UPerfFunction* TestICU_NFD_NFD_Text();
+ UPerfFunction* TestICU_NFD_NFC_Text();
+ UPerfFunction* TestICU_NFD_Orig_Text();
+
+ /* FCD performance */
+ UPerfFunction* TestICU_FCD_NFD_Text();
+ UPerfFunction* TestICU_FCD_NFC_Text();
+ UPerfFunction* TestICU_FCD_Orig_Text();
+
+ /*Win NFC performance */
+ UPerfFunction* TestWin_NFC_NFD_Text();
+ UPerfFunction* TestWin_NFC_NFC_Text();
+ UPerfFunction* TestWin_NFC_Orig_Text();
+
+ /* Win NFD performance */
+ UPerfFunction* TestWin_NFD_NFD_Text();
+ UPerfFunction* TestWin_NFD_NFC_Text();
+ UPerfFunction* TestWin_NFD_Orig_Text();
+
+ /* Quick check performance */
+ UPerfFunction* TestQC_NFC_NFD_Text();
+ UPerfFunction* TestQC_NFC_NFC_Text();
+ UPerfFunction* TestQC_NFC_Orig_Text();
+
+ UPerfFunction* TestQC_NFD_NFD_Text();
+ UPerfFunction* TestQC_NFD_NFC_Text();
+ UPerfFunction* TestQC_NFD_Orig_Text();
+
+ UPerfFunction* TestQC_FCD_NFD_Text();
+ UPerfFunction* TestQC_FCD_NFC_Text();
+ UPerfFunction* TestQC_FCD_Orig_Text();
+
+ /* IsNormalized performnace */
+ UPerfFunction* TestIsNormalized_NFC_NFD_Text();
+ UPerfFunction* TestIsNormalized_NFC_NFC_Text();
+ UPerfFunction* TestIsNormalized_NFC_Orig_Text();
+
+ UPerfFunction* TestIsNormalized_NFD_NFD_Text();
+ UPerfFunction* TestIsNormalized_NFD_NFC_Text();
+ UPerfFunction* TestIsNormalized_NFD_Orig_Text();
+
+ UPerfFunction* TestIsNormalized_FCD_NFD_Text();
+ UPerfFunction* TestIsNormalized_FCD_NFC_Text();
+ UPerfFunction* TestIsNormalized_FCD_Orig_Text();
+
+};
+
+//---------------------------------------------------------------------------------------
+// Platform / ICU version specific proto-types
+//---------------------------------------------------------------------------------------
+
+
+#if (U_ICU_VERSION_MAJOR_NUM > 1 ) || ((U_ICU_VERSION_MAJOR_NUM == 1 )&&(U_ICU_VERSION_MINOR_NUM > 8) && (U_ICU_VERSION_PATCHLEVEL_NUM >=1))
+
+int32_t ICUNormNFD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UNORM_NFD, options,dest,dstLen,status);
+}
+
+int32_t ICUNormNFC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UNORM_NFC, options,dest,dstLen,status);
+}
+
+int32_t ICUNormNFKD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UNORM_NFKD, options,dest,dstLen,status);
+}
+int32_t ICUNormNFKC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UNORM_NFKC, options,dest,dstLen,status);
+}
+
+int32_t ICUNormFCD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UNORM_FCD, options,dest,dstLen,status);
+}
+
+int32_t ICUQuickCheck(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){
+#if (U_ICU_VERSION_MAJOR_NUM > 2 ) || ((U_ICU_VERSION_MAJOR_NUM == 2 )&&(U_ICU_VERSION_MINOR_NUM >= 6))
+ return unorm_quickCheckWithOptions(src,srcLen,mode, options, status);
+#else
+ return unorm_quickCheck(src,srcLen,mode,status);
+#endif
+}
+int32_t ICUIsNormalized(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){
+ return unorm_isNormalized(src,srcLen,mode,status);
+}
+
+
+#else
+
+int32_t ICUNormNFD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UCOL_DECOMP_CAN, options,dest,dstLen,status);
+}
+
+int32_t ICUNormNFC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UCOL_COMPOSE_CAN, options,dest,dstLen,status);
+}
+
+int32_t ICUNormNFKD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UCOL_DECOMP_COMPAT, options,dest,dstLen,status);
+}
+int32_t ICUNormNFKC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UCOL_COMPOSE_COMPAT, options,dest,dstLen,status);
+}
+
+int32_t ICUNormFCD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return unorm_normalize(src,srcLen,UNORM_FCD, options,dest,dstLen,status);
+}
+
+int32_t ICUQuickCheck(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){
+ return unorm_quickCheck(src,srcLen,mode,status);
+}
+
+int32_t ICUIsNormalized(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){
+ return 0;
+}
+#endif
+
+#if defined(U_WINDOWS)
+
+int32_t WinNormNFD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return FoldStringW(MAP_COMPOSITE,src,srcLen,dest,dstLen);
+}
+
+int32_t WinNormNFC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return FoldStringW(MAP_PRECOMPOSED,src,srcLen,dest,dstLen);
+}
+
+int32_t WinNormNFKD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return FoldStringW(MAP_COMPOSITE+MAP_FOLDCZONE,src,srcLen,dest,dstLen);
+}
+int32_t WinNormNFKC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return FoldStringW(MAP_FOLDCZONE,src,srcLen,dest,dstLen);
+}
+#else
+int32_t WinNormNFD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return 0 ;
+}
+
+int32_t WinNormNFC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return 0;
+}
+
+int32_t WinNormNFKD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return 0;
+}
+int32_t WinNormNFKC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) {
+ return 0;
+}
+#endif
+
+
+#endif // NORMPERF_H
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.vcproj
new file mode 100644
index 00000000000..b2151a3b9b3
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.vcproj
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="normperf"
+ ProjectGUID="{56CCC661-8D33-4F0A-B62F-C619CE843C68}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/normperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_MBCS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/normperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib"
+ OutputFile=".\Debug/normperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/normperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/normperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/normperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib"
+ OutputFile=".\Release/normperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ ProgramDatabaseFile=".\Release/normperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="normperf.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_MBCS;_UNICODE;$(NoInherit)"
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="normperf.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perf.sln b/Build/source/libs/icu/icu-xetex/test/perf/perf.sln
new file mode 100644
index 00000000000..49312f49d91
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/perf.sln
@@ -0,0 +1,61 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "charperf", "charperf\charperf.vcproj", "{D850A4B6-7D94-476E-9392-E9272DA4EAAF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "normperf", "normperf\normperf.vcproj", "{56CCC661-8D33-4F0A-B62F-C619CE843C68}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convperf", "convperf\convperf.vcproj", "{B4C03939-D417-41F0-85B4-848ECF105E3A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stringperf", "ustrperf\stringperf.vcproj", "{523710EA-349D-45BF-8B39-289CC86E7D91}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubrkperf", "ubrkperf\ubrkperf.vcproj", "{7E280294-49BD-43D1-9903-CF29648D88CA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utfperf", "utfperf\utfperf.vcproj", "{E7728E98-0469-43F4-AF37-4529A3D52C6B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "collperf", "collperf\collperf.vcproj", "{01807B4A-E3B5-4B97-A7F3-207746DCD71E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usetperf", "usetperf\usetperf.vcproj", "{EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Debug|Win32.Build.0 = Debug|Win32
+ {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Release|Win32.ActiveCfg = Release|Win32
+ {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Release|Win32.Build.0 = Release|Win32
+ {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Debug|Win32.ActiveCfg = Debug|Win32
+ {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Debug|Win32.Build.0 = Debug|Win32
+ {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Release|Win32.ActiveCfg = Release|Win32
+ {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Release|Win32.Build.0 = Release|Win32
+ {B4C03939-D417-41F0-85B4-848ECF105E3A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B4C03939-D417-41F0-85B4-848ECF105E3A}.Debug|Win32.Build.0 = Debug|Win32
+ {B4C03939-D417-41F0-85B4-848ECF105E3A}.Release|Win32.ActiveCfg = Release|Win32
+ {B4C03939-D417-41F0-85B4-848ECF105E3A}.Release|Win32.Build.0 = Release|Win32
+ {523710EA-349D-45BF-8B39-289CC86E7D91}.Debug|Win32.ActiveCfg = Debug|Win32
+ {523710EA-349D-45BF-8B39-289CC86E7D91}.Debug|Win32.Build.0 = Debug|Win32
+ {523710EA-349D-45BF-8B39-289CC86E7D91}.Release|Win32.ActiveCfg = Release|Win32
+ {523710EA-349D-45BF-8B39-289CC86E7D91}.Release|Win32.Build.0 = Release|Win32
+ {7E280294-49BD-43D1-9903-CF29648D88CA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7E280294-49BD-43D1-9903-CF29648D88CA}.Debug|Win32.Build.0 = Debug|Win32
+ {7E280294-49BD-43D1-9903-CF29648D88CA}.Release|Win32.ActiveCfg = Release|Win32
+ {7E280294-49BD-43D1-9903-CF29648D88CA}.Release|Win32.Build.0 = Release|Win32
+ {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Debug|Win32.Build.0 = Debug|Win32
+ {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Release|Win32.ActiveCfg = Release|Win32
+ {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Release|Win32.Build.0 = Release|Win32
+ {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Debug|Win32.Build.0 = Debug|Win32
+ {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Release|Win32.ActiveCfg = Release|Win32
+ {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Release|Win32.Build.0 = Release|Win32
+ {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Debug|Win32.Build.0 = Debug|Win32
+ {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Release|Win32.ActiveCfg = Release|Win32
+ {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Dataset.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Dataset.pm
new file mode 100644
index 00000000000..ab5d05bbb4e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Dataset.pm
@@ -0,0 +1,139 @@
+#!/usr/local/bin/perl
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+package Dataset;
+use Statistics::Descriptive;
+use Statistics::Distributions;
+use strict;
+
+# Create a new Dataset with the given data.
+sub new {
+ my ($class) = shift;
+ my $self = bless {
+ _data => \@_,
+ _scale => 1.0,
+ _mean => 0.0,
+ _error => 0.0,
+ }, $class;
+
+ my $n = @_;
+
+ if ($n >= 1) {
+ my $stats = Statistics::Descriptive::Full->new();
+ $stats->add_data(@{$self->{_data}});
+ $self->{_mean} = $stats->mean();
+
+ if ($n >= 2) {
+ # Use a t distribution rather than Gaussian because (a) we
+ # assume an underlying normal dist, (b) we do not know the
+ # standard deviation -- we estimate it from the data, and (c)
+ # we MAY have a small sample size (also works for large n).
+ my $t = Statistics::Distributions::tdistr($n-1, 0.005);
+ $self->{_error} = $t * $stats->standard_deviation();
+ }
+ }
+
+ $self;
+}
+
+# Set a scaling factor for all data; 1.0 means no scaling.
+# Scale must be > 0.
+sub setScale {
+ my ($self, $scale) = @_;
+ $self->{_scale} = $scale;
+}
+
+# Multiply the scaling factor by a value.
+sub scaleBy {
+ my ($self, $a) = @_;
+ $self->{_scale} *= $a;
+}
+
+# Return the mean.
+sub getMean {
+ my $self = shift;
+ return $self->{_mean} * $self->{_scale};
+}
+
+# Return a 99% error based on the t distribution. The dataset
+# is desribed as getMean() +/- getError().
+sub getError {
+ my $self = shift;
+ return $self->{_error} * $self->{_scale};
+}
+
+# Divide two Datasets and return a new one, maintaining the
+# mean+/-error. The new Dataset has no data points.
+sub divide {
+ my $self = shift;
+ my $rhs = shift;
+
+ my $minratio = ($self->{_mean} - $self->{_error}) /
+ ($rhs->{_mean} + $rhs->{_error});
+ my $maxratio = ($self->{_mean} + $self->{_error}) /
+ ($rhs->{_mean} - $rhs->{_error});
+
+ my $result = Dataset->new();
+ $result->{_mean} = ($minratio + $maxratio) / 2;
+ $result->{_error} = $result->{_mean} - $minratio;
+ $result->{_scale} = $self->{_scale} / $rhs->{_scale};
+ $result;
+}
+
+# subtracts two Datasets and return a new one, maintaining the
+# mean+/-error. The new Dataset has no data points.
+sub subtract {
+ my $self = shift;
+ my $rhs = shift;
+
+ my $result = Dataset->new();
+ $result->{_mean} = $self->{_mean} - $rhs->{_mean};
+ $result->{_error} = $self->{_error} + $rhs->{_error};
+ $result->{_scale} = $self->{_scale};
+ $result;
+}
+
+# adds two Datasets and return a new one, maintaining the
+# mean+/-error. The new Dataset has no data points.
+sub add {
+ my $self = shift;
+ my $rhs = shift;
+
+ my $result = Dataset->new();
+ $result->{_mean} = $self->{_mean} + $rhs->{_mean};
+ $result->{_error} = $self->{_error} + $rhs->{_error};
+ $result->{_scale} = $self->{_scale};
+ $result;
+}
+
+# Divides a dataset by a scalar.
+# The new Dataset has no data points.
+sub divideByScalar {
+ my $self = shift;
+ my $s = shift;
+
+ my $result = Dataset->new();
+ $result->{_mean} = $self->{_mean}/$s;
+ $result->{_error} = $self->{_error}/$s;
+ $result->{_scale} = $self->{_scale};
+ $result;
+}
+
+# Divides a dataset by a scalar.
+# The new Dataset has no data points.
+sub multiplyByScalar {
+ my $self = shift;
+ my $s = shift;
+
+ my $result = Dataset->new();
+ $result->{_mean} = $self->{_mean}*$s;
+ $result->{_error} = $self->{_error}*$s;
+ $result->{_scale} = $self->{_scale};
+ $result;
+}
+
+1;
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Format.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Format.pm
new file mode 100644
index 00000000000..d12fd18ad25
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Format.pm
@@ -0,0 +1,166 @@
+#!/usr/local/bin/perl
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+my $PLUS_MINUS = "&plusmn;";
+
+#|#---------------------------------------------------------------------
+#|# Format a confidence interval, as given by a Dataset. Output is as
+#|# as follows:
+#|# 241.23 - 241.98 => 241.5 +/- 0.3
+#|# 241.2 - 243.8 => 242 +/- 1
+#|# 211.0 - 241.0 => 226 +/- 15 or? 230 +/- 20
+#|# 220.3 - 234.3 => 227 +/- 7
+#|# 220.3 - 300.3 => 260 +/- 40
+#|# 220.3 - 1000 => 610 +/- 390 or? 600 +/- 400
+#|# 0.022 - 0.024 => 0.023 +/- 0.001
+#|# 0.022 - 0.032 => 0.027 +/- 0.005
+#|# 0.022 - 1.000 => 0.5 +/- 0.5
+#|# In other words, take one significant digit of the error value and
+#|# display the mean to the same precision.
+#|sub formatDataset {
+#| my $ds = shift;
+#| my $lower = $ds->getMean() - $ds->getError();
+#| my $upper = $ds->getMean() + $ds->getError();
+#| my $scale = 0;
+#| # Find how many initial digits are the same
+#| while ($lower < 1 ||
+#| int($lower) == int($upper)) {
+#| $lower *= 10;
+#| $upper *= 10;
+#| $scale++;
+#| }
+#| while ($lower >= 10 &&
+#| int($lower) == int($upper)) {
+#| $lower /= 10;
+#| $upper /= 10;
+#| $scale--;
+#| }
+#|}
+
+#---------------------------------------------------------------------
+# Format a number, optionally with a +/- delta, to n significant
+# digits.
+#
+# @param significant digit, a value >= 1
+# @param multiplier
+# @param time in seconds to be formatted
+# @optional delta in seconds
+#
+# @return string of the form "23" or "23 +/- 10".
+#
+sub formatNumber {
+ my $sigdig = shift;
+ my $mult = shift;
+ my $a = shift;
+ my $delta = shift; # may be undef
+
+ my $result = formatSigDig($sigdig, $a*$mult);
+ if (defined($delta)) {
+ my $d = formatSigDig($sigdig, $delta*$mult);
+ # restrict PRECISION of delta to that of main number
+ if ($result =~ /\.(\d+)/) {
+ # TODO make this work for values with all significant
+ # digits to the left of the decimal, e.g., 1234000.
+
+ # TODO the other thing wrong with this is that it
+ # isn't rounding the $delta properly. Have to put
+ # this logic into formatSigDig().
+ my $x = length($1);
+ $d =~ s/\.(\d{$x})\d+/.$1/;
+ }
+ $result .= " $PLUS_MINUS " . $d;
+ }
+ $result;
+}
+
+#---------------------------------------------------------------------
+# Format a time, optionally with a +/- delta, to n significant
+# digits.
+#
+# @param significant digit, a value >= 1
+# @param time in seconds to be formatted
+# @optional delta in seconds
+#
+# @return string of the form "23 ms" or "23 +/- 10 ms".
+#
+sub formatSeconds {
+ my $sigdig = shift;
+ my $a = shift;
+ my $delta = shift; # may be undef
+
+ my @MULT = (1 , 1e3, 1e6, 1e9);
+ my @SUFF = ('s' , 'ms', 'us', 'ns');
+
+ # Determine our scale
+ my $i = 0;
+ #always do seconds if the following line is commented out
+ ++$i while ($a*$MULT[$i] < 1 && $i < @MULT);
+
+ formatNumber($sigdig, $MULT[$i], $a, $delta) . ' ' . $SUFF[$i];
+}
+
+#---------------------------------------------------------------------
+# Format a percentage, optionally with a +/- delta, to n significant
+# digits.
+#
+# @param significant digit, a value >= 1
+# @param value to be formatted, as a fraction, e.g. 0.5 for 50%
+# @optional delta, as a fraction
+#
+# @return string of the form "23 %" or "23 +/- 10 %".
+#
+sub formatPercent {
+ my $sigdig = shift;
+ my $a = shift;
+ my $delta = shift; # may be undef
+
+ formatNumber($sigdig, 100, $a, $delta) . '%';
+}
+
+#---------------------------------------------------------------------
+# Format a number to n significant digits without using exponential
+# notation.
+#
+# @param significant digit, a value >= 1
+# @param number to be formatted
+#
+# @return string of the form "1234" "12.34" or "0.001234". If
+# number was negative, prefixed by '-'.
+#
+sub formatSigDig {
+ my $n = shift() - 1;
+ my $a = shift;
+
+ local $_ = sprintf("%.${n}e", $a);
+ my $sign = (s/^-//) ? '-' : '';
+
+ my $a_e;
+ my $result;
+ if (/^(\d)\.(\d+)e([-+]\d+)$/) {
+ my ($d, $dn, $e) = ($1, $2, $3);
+ $a_e = $e;
+ $d .= $dn;
+ $e++;
+ $d .= '0' while ($e > length($d));
+ while ($e < 1) {
+ $e++;
+ $d = '0' . $d;
+ }
+ if ($e == length($d)) {
+ $result = $sign . $d;
+ } else {
+ $result = $sign . substr($d, 0, $e) . '.' . substr($d, $e);
+ }
+ } else {
+ die "Can't parse $_";
+ }
+ $result;
+}
+
+1;
+
+#eof
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Output.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Output.pm
new file mode 100644
index 00000000000..7b67a9c337b
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Output.pm
@@ -0,0 +1,389 @@
+#!/usr/local/bin/perl
+
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+
+use strict;
+
+use Dataset;
+
+my $TABLEATTR = 'BORDER="1" CELLPADDING="4" CELLSPACING="0"';
+my $outType = "HTML";
+my $html = "noName";
+my $inTable;
+my @headers;
+my @timetypes = ("mean per op", "error per op", "events", "per event");
+my %raw;
+my $current = "";
+my $exp = 0;
+my $mult = 1e9; #use nanoseconds
+my $perc = 100; #for percent
+my $printEvents = 0;
+my $legend = "<a name=\"Legend\">\n<h2>Table legend</h2></a><ul>";
+my $legendDone = 0;
+my %options;
+my $operationIs = "operation";
+my $eventIs = "event";
+
+sub startTest {
+ $current = shift;
+ $exp = 0;
+ outputData($current);
+}
+
+sub printLeg {
+ if(!$legendDone) {
+ my $message;
+ foreach $message (@_) {
+ $legend .= "<li>".$message."</li>\n";
+ }
+ }
+}
+
+sub outputDist {
+ my $value = shift;
+ my $percent = shift;
+ my $mean = $value->getMean;
+ my $error = $value->getError;
+ print HTML "<td class=\"";
+ if($mean > 0) {
+ print HTML "value";
+ } else {
+ print HTML "worse";
+ }
+ print HTML "\">";
+ if($percent) {
+ print HTML formatPercent(2, $mean);
+ } else {
+ print HTML formatNumber(2, $mult, $mean);
+ }
+ print HTML "</td>\n";
+ print HTML "<td class=\"";
+ if((($error*$mult < 10)&&!$percent) || (($error<10)&&$percent)) {
+ print HTML "error";
+ } else {
+ print HTML "errorLarge";
+ }
+ print HTML "\">&plusmn;";
+ if($percent) {
+ print HTML formatPercent(2, $error);
+ } else {
+ print HTML formatNumber(2, $mult, $error);
+ }
+ print HTML "</td>\n";
+}
+
+sub outputValue {
+ my $value = shift;
+ print HTML "<td class=\"sepvalue\">";
+ print HTML $value;
+ #print HTML formatNumber(2, 1, $value);
+ print HTML "</td>\n";
+}
+
+sub startTable {
+ #my $printEvents = shift;
+ $inTable = 1;
+ my $i;
+ print HTML "<table $TABLEATTR>\n";
+ print HTML "<tbody>\n";
+ if($#headers >= 0) {
+ my ($header, $i);
+ print HTML "<tr>\n";
+ print HTML "<th rowspan=\"2\" class=\"testNameHeader\"><a href=\"#TestName\">Test Name</a></th>\n";
+ print HTML "<th rowspan=\"2\" class=\"testNameHeader\"><a href=\"#Ops\">Ops</a></th>\n";
+ printLeg("<a name=\"Test Name\">TestName</a> - name of the test as set by the test writer\n", "<a name=\"Ops\">Ops</a> - number of ".$operationIs."s per iteration\n");
+ if(!$printEvents) {
+ print HTML "<th colspan=".((4*($#headers+1))-2)." class=\"sourceType\">Per Operation</th>\n";
+ } else {
+ print HTML "<th colspan=".((2*($#headers+1))-2)." class=\"sourceType\">Per Operation</th>\n";
+ print HTML "<th colspan=".((5*($#headers+1))-2)." class=\"sourceType\">Per Event</th>\n";
+ }
+ print HTML "</tr>\n<tr>\n";
+ if(!$printEvents) {
+ foreach $header (@headers) {
+ print HTML "<th class=\"source\" colspan=2><a href=\"#meanop_$header\">$header<br>/op</a></th>\n";
+ printLeg("<a name=\"meanop_$header\">$header /op</a> - mean time and error for $header per $operationIs");
+ }
+ }
+ for $i (1 .. $#headers) {
+ print HTML "<th class=\"source\" colspan=2><a href=\"#mean_op_$i\">ratio $i<br>/op</a></th>\n";
+ printLeg("<a name=\"mean_op_$i\">ratio $i /op</a> - ratio and error of per $operationIs time, calculated as: (($headers[0] - $headers[$i])/$headers[$i])*100%, mean value");
+ }
+ if($printEvents) {
+ foreach $header (@headers) {
+ print HTML "<th class=\"source\"><a href=\"#events_$header\">$header<br>events</a></th>\n";
+ printLeg("<a name=\"events_$header\">$header events</a> - number of ".$eventIs."s for $header per iteration");
+ }
+ foreach $header (@headers) {
+ print HTML "<th class=\"source\" colspan=2><a href=\"#mean_ev_$header\">$header<br>/ev</a></th>\n";
+ printLeg("<a name=\"mean_ev_$header\">$header /ev</a> - mean time and error for $header per $eventIs");
+ }
+ for $i (1 .. $#headers) {
+ print HTML "<th class=\"source\" colspan=2><a href=\"#mean_ev_$i\">ratio $i<br>/ev</a></th>\n";
+ printLeg("<a name=\"mean_ev_$i\">ratio $i /ev</a> - ratio and error of per $eventIs time, calculated as: (($headers[0] - $headers[$i])/$headers[$i])*100%, mean value");
+ }
+ }
+ print HTML "</tr>\n";
+ }
+ $legendDone = 1;
+}
+
+sub closeTable {
+ if($inTable) {
+ undef $inTable;
+ print HTML "</tr>\n";
+ print HTML "</tbody>";
+ print HTML "</table>\n";
+ }
+}
+
+sub newRow {
+ if(!$inTable) {
+ startTable;
+ } else {
+ print HTML "</tr>\n";
+ }
+ print HTML "<tr>";
+}
+
+sub outputData {
+ if($inTable) {
+ my $msg = shift;
+ my $align = shift;
+ print HTML "<td";
+ if($align) {
+ print HTML " align = $align>";
+ } else {
+ print HTML ">";
+ }
+ print HTML "$msg";
+ print HTML "</td>";
+ } else {
+ my $message;
+ foreach $message (@_) {
+ print HTML "$message";
+ }
+ }
+}
+
+sub setupOutput {
+ my $date = localtime;
+ my $options = shift;
+ %options = %{ $options };
+ my $title = $options{ "title" };
+ my $headers = $options{ "headers" };
+ if($options{ "operationIs" }) {
+ $operationIs = $options{ "operationIs" };
+ }
+ if($options{ "eventIs" }) {
+ $eventIs = $options{ "eventIs" };
+ }
+ @headers = split(/ /, $headers);
+ my ($t, $rest);
+ ($t, $rest) = split(/\.\w+/, $0);
+ $t =~ /^.*\W(\w+)$/;
+ $t = $1;
+ if($outType eq 'HTML') {
+ $html = $date;
+ $html =~ s/://g; # ':' illegal
+ $html =~ s/\s*\d+$//; # delete year
+ $html =~ s/^\w+\s*//; # delete dow
+ $html = "$t $html.html";
+ if($options{ "outputDir" }) {
+ $html = $options{ "outputDir" }."/".$html;
+ }
+ $html =~ s/ /_/g;
+
+ open(HTML,">$html") or die "Can't write to $html: $!";
+
+#<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+ print HTML <<EOF;
+<HTML>
+ <HEAD>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <TITLE>$title</TITLE>
+<style>
+<!--
+body { font-size: 10pt; font-family: sans-serif }
+th { font-size: 10pt; border: 0 solid #000080; padding: 5 }
+th.testNameHeader { border-width: 1 }
+th.testName { text-align: left; border-left-width: 1; border-right-width: 1;
+ border-bottom-width: 1 }
+th.source { border-right-width: 1; border-bottom-width: 1 }
+th.sourceType { border-right-width: 1; border-top-width: 1; border-bottom-width: 1 }
+td { font-size: 10pt; text-align: Right; border: 0 solid #000080; padding: 5 }
+td.string { text-align: Left; border-bottom-width:1; border-right-width:1 }
+td.sepvalue { border-bottom-width: 1; border-right-width: 1 }
+td.value { border-bottom-width: 1 }
+td.worse { color: #FF0000; font-weight: bold; border-bottom-width: 1 }
+td.error { font-size: 75%; border-right-width: 1; border-bottom-width: 1 }
+td.errorLarge { font-size: 75%; color: #FF0000; font-weight: bold; border-right-width: 1;
+ border-bottom-width: 1 }
+A:link { color: black; font-weight: normal; text-decoration: none} /* unvisited links */
+A:visited { color: blue; font-weight: normal; text-decoration: none } /* visited links */
+A:hover { color: red; font-weight: normal; text-decoration: none } /* user hovers */
+A:active { color: lime; font-weight: normal; text-decoration: none } /* active links */
+-->
+</style>
+ </HEAD>
+ <BODY bgcolor="#FFFFFF" LINK="#006666" VLINK="#000000">
+EOF
+ print HTML "<H1>$title</H1>\n";
+
+ #print HTML "<H2>$TESTCLASS</H2>\n";
+ }
+}
+
+sub closeOutput {
+ if($outType eq 'HTML') {
+ if($inTable) {
+ closeTable;
+ }
+ $legend .= "</ul>\n";
+ print HTML $legend;
+ outputRaw();
+ print HTML <<EOF;
+ </BODY>
+</HTML>
+EOF
+ close(HTML) or die "Can't close $html: $!";
+ }
+}
+
+
+sub outputRaw {
+ print HTML "<h2>Raw data</h2>";
+ my $key;
+ my $i;
+ my $j;
+ my $k;
+ print HTML "<table $TABLEATTR>\n";
+ for $key (sort keys %raw) {
+ my $printkey = $key;
+ $printkey =~ s/\<br\>/ /g;
+ if($printEvents) {
+ if($key ne "") {
+ print HTML "<tr><th class=\"testNameHeader\" colspan = 7>$printkey</td></tr>\n"; # locale and data file
+ }
+ print HTML "<tr><th class=\"testName\">test name</th><th class=\"testName\">interesting arguments</th><th class=\"testName\">iterations</th><th class=\"testName\">operations</th><th class=\"testName\">mean time (ns)</th><th class=\"testName\">error (ns)</th><th class=\"testName\">events</th></tr>\n";
+ } else {
+ if($key ne "") {
+ print HTML "<tr><th class=\"testName\" colspan = 6>$printkey</td></tr>\n"; # locale and data file
+ }
+ print HTML "<tr><th class=\"testName\">test name</th><th class=\"testName\">interesting arguments</th><th class=\"testName\">iterations</th><th class=\"testName\">operations</th><th class=\"testName\">mean time (ns)</th><th class=\"testName\">error (ns)</th></tr>\n";
+ }
+ $printkey =~ s/[\<\>\/ ]//g;
+
+ my %done;
+ for $i ( $raw{$key} ) {
+ print HTML "<tr>";
+ for $j ( @$i ) {
+ my ($test, $args);
+ ($test, $args) = split(/,/, shift(@$j));
+
+ print HTML "<th class=\"testName\">";
+ if(!$done{$test}) {
+ print HTML "<a name=\"".$printkey."_".$test."\">".$test."</a>";
+ $done{$test} = 1;
+ } else {
+ print HTML $test;
+ }
+ print HTML "</th>";
+
+ print HTML "<td class=\"string\">".$args."</td>";
+
+ print HTML "<td class=\"sepvalue\">".shift(@$j)."</td>";
+ print HTML "<td class=\"sepvalue\">".shift(@$j)."</td>";
+
+ my @data = @{ shift(@$j) };
+ my $ds = Dataset->new(@data);
+ print HTML "<td class=\"sepvalue\">".formatNumber(4, $mult, $ds->getMean)."</td><td class=\"sepvalue\">".formatNumber(4, $mult, $ds->getError)."</td>";
+ if($#{ $j } >= 0) {
+ print HTML "<td class=\"sepvalue\">".shift(@$j)."</td>";
+ }
+ print HTML "</tr>\n";
+ }
+ }
+ }
+}
+
+sub store {
+ $raw{$current}[$exp++] = [@_];
+}
+
+sub outputRow {
+ #$raw{$current}[$exp++] = [@_];
+ my $testName = shift;
+ my @iterPerPass = @{shift(@_)};
+ my @noopers = @{shift(@_)};
+ my @timedata = @{shift(@_)};
+ my @noevents;
+ if($#_ >= 0) {
+ @noevents = @{shift(@_)};
+ }
+ if(!$inTable) {
+ if(@noevents) {
+ $printEvents = 1;
+ startTable;
+ } else {
+ startTable;
+ }
+ }
+ debug("No events: @noevents, $#noevents\n");
+
+ my $j;
+ my $loc = $current;
+ $loc =~ s/\<br\>/ /g;
+ $loc =~ s/[\<\>\/ ]//g;
+
+ # Finished one row of results. Outputting
+ newRow;
+ #outputData($testName, "LEFT");
+ print HTML "<th class=\"testName\"><a href=\"#".$loc."_".$testName."\">$testName</a></th>\n";
+ #outputData($iterCount);
+ #outputData($noopers[0], "RIGHT");
+ outputValue($noopers[0]);
+
+ if(!$printEvents) {
+ for $j ( 0 .. $#timedata ) {
+ my $perOperation = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noopers[$j]); # time per operation
+ #debug("Time per operation: ".formatSeconds(4, $perOperation->getMean, $perOperation->getError)."\n");
+ outputDist($perOperation);
+ }
+ }
+ my $baseLinePO = $timedata[0]->divideByScalar($iterPerPass[0]*$noopers[0]);
+ for $j ( 1 .. $#timedata ) {
+ my $perOperation = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noopers[$j]); # time per operation
+ my $ratio = $baseLinePO->subtract($perOperation);
+ $ratio = $ratio->divide($perOperation);
+ outputDist($ratio, "%");
+ }
+ if (@noevents) {
+ for $j ( 0 .. $#timedata ) {
+ #outputData($noevents[$j], "RIGHT");
+ outputValue($noevents[$j]);
+ }
+ for $j ( 0 .. $#timedata ) {
+ my $perEvent = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noevents[$j]); # time per event
+ #debug("Time per operation: ".formatSeconds(4, $perEvent->getMean, $perEvent->getError)."\n");
+ outputDist($perEvent);
+ }
+ my $baseLinePO = $timedata[0]->divideByScalar($iterPerPass[0]*$noevents[0]);
+ for $j ( 1 .. $#timedata ) {
+ my $perOperation = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noevents[$j]); # time per operation
+ my $ratio = $baseLinePO->subtract($perOperation);
+ $ratio = $ratio->divide($perOperation);
+ outputDist($ratio, "%");
+ }
+ }
+}
+
+
+1;
+
+#eof
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/PerfFramework.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/PerfFramework.pm
new file mode 100644
index 00000000000..04d96a2b655
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/PerfFramework.pm
@@ -0,0 +1,391 @@
+#!/usr/local/bin/perl
+# ***********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002-2004, International Business Machines Corporation
+# * and others. All Rights Reserved.
+# ***********************************************************************
+
+use strict;
+
+#use Dataset;
+use Format;
+use Output;
+
+my $VERBOSE = 0;
+my $DEBUG = 1;
+my $start_l = ""; #formatting help
+my $end_l = "";
+my @testArgs; # different kinds of tests we want to do
+my $datadir = "data";
+my $extraArgs; # stuff that always gets passed to the test program
+
+
+my $iterCount = 0;
+my $NUMPASSES = 4;
+my $TIME = 2;
+my $ITERATIONS; #Added by Doug
+my $DATADIR;
+
+sub setupOptions {
+ my %options = %{shift @_};
+
+ if($options{"time"}) {
+ $TIME = $options{"time"};
+ }
+
+ if($options{"passes"}) {
+ $NUMPASSES = $options{"passes"};
+ }
+
+ if($options{"dataDir"}) {
+ $DATADIR = $options{"dataDir"};
+ }
+
+ # Added by Doug
+ if ($options{"iterations"}) {
+ $ITERATIONS = $options{"iterations"};
+ }
+}
+
+sub runTests {
+ my $options = shift;
+ my @programs;
+ my $tests = shift;
+ my %datafiles;
+ if($#_ >= 0) { # maybe no files/locales
+ my $datafiles = shift;
+ if($datafiles) {
+ %datafiles = %{$datafiles};
+ }
+ }
+ setupOutput($options);
+ setupOptions($options);
+
+ my($locale, $iter, $data, $program, $args, $variable);
+#
+# Outer loop runs through the locales to test
+#
+ if (%datafiles) {
+ foreach $locale (sort keys %datafiles ) {
+ foreach $data (@{ $datafiles{$locale} }) {
+ closeTable;
+ my $locdata = "";
+ if(!($locale eq "")) {
+ $locdata = "<b>Locale:</b> $locale<br>";
+ }
+ $locdata .= "<b>Datafile:</b> $data<br>";
+ startTest($locdata);
+
+ if($DATADIR) {
+ compareLoop ($tests, $locale, $DATADIR."/".$data);
+ } else {
+ compareLoop ($tests, $locale, $data);
+ }
+ }
+ }
+ } else {
+ compareLoop($tests);
+ }
+ closeOutput();
+}
+
+sub compareLoop {
+ my $tests = shift;
+ #my @tests = @{$tests};
+ my %tests = %{$tests};
+ my $locale = shift;
+ my $datafile = shift;
+ my $locAndData = "";
+ if($locale) {
+ $locAndData .= " -L $locale";
+ }
+ if($datafile) {
+ $locAndData .= " -f $datafile";
+ }
+
+ my $args;
+ my ($i, $j, $aref);
+ foreach $i ( sort keys %tests ) {
+ debug("Test: $i\n");
+ $aref = $tests{$i};
+ my @timedata;
+ my @iterPerPass;
+ my @noopers;
+ my @noevents;
+
+ my $program;
+ my @argsAndTest;
+ for $j ( 0 .. $#{$aref} ) {
+ # first we calibrate. Use time from somewhere
+ # first test is used for calibration
+ ($program, @argsAndTest) = split(/\ /, @{ $tests{$i} }[$j]);
+ #Modified by Doug
+ my $commandLine;
+ if ($ITERATIONS) {
+ $commandLine = "$program -i $ITERATIONS -p $NUMPASSES $locAndData @argsAndTest";
+ } else {
+ $commandLine = "$program -t $TIME -p $NUMPASSES $locAndData @argsAndTest";
+ }
+ #my $commandLine = "$program -i 5 -p $NUMPASSES $locAndData @argsAndTest";
+ my @res = measure1($commandLine);
+ store("$i, $program @argsAndTest", @res);
+
+ push(@iterPerPass, shift(@res));
+ push(@noopers, shift(@res));
+ my @data = @{ shift(@res) };
+ if($#res >= 0) {
+ push(@noevents, shift(@res));
+ }
+
+
+ shift(@data) if (@data > 1); # discard first run
+
+ #debug("data is @data\n");
+ my $ds = Dataset->new(@data);
+
+ push(@timedata, $ds);
+ }
+
+ outputRow($i, \@iterPerPass, \@noopers, \@timedata, \@noevents);
+ }
+
+}
+
+#---------------------------------------------------------------------
+# Measure a given test method with a give test pattern using the
+# global run parameters.
+#
+# @param the method to run
+# @param the pattern defining characters to test
+# @param if >0 then the number of iterations per pass. If <0 then
+# (negative of) the number of seconds per pass.
+#
+# @return array of:
+# [0] iterations per pass
+# [1] events per iteration
+# [2..] ms reported for each pass, in order
+#
+sub measure1 {
+ # run passes
+ my @t = callProg(shift); #"$program $args $argsAndTest");
+ my @ms = ();
+ my @b; # scratch
+ for my $a (@t) {
+ # $a->[0]: method name, corresponds to $method
+ # $a->[1]: 'begin' data, == $iterCount
+ # $a->[2]: 'end' data, of the form <ms> <eventsPerIter>
+ # $a->[3...]: gc messages from JVM during pass
+ @b = split(/\s+/, $a->[2]);
+ #push(@ms, $b[0]);
+ push(@ms, shift(@b));
+ }
+ my $iterCount = shift(@b);
+ my $operationsPerIter = shift(@b);
+ my $eventsPerIter;
+ if($#b >= 0) {
+ $eventsPerIter = shift(@b);
+ }
+
+# out("Iterations per pass: $iterCount<BR>\n");
+# out("Events per iteration: $eventsPerIter<BR>\n");
+# debug("Iterations per pass: $iterCount<BR>\n");
+# if($eventsPerIter) {
+# debug("Events per iteration: $eventsPerIter<BR>\n");
+# }
+
+ my @ms_str = @ms;
+ $ms_str[0] .= " (discarded)" if (@ms_str > 1);
+# out("Raw times (ms/pass): ", join(", ", @ms_str), "<BR>\n");
+ debug("Raw times (ms/pass): ", join(", ", @ms_str), "<BR>\n");
+ if($eventsPerIter) {
+ ($iterCount, $operationsPerIter, \@ms, $eventsPerIter);
+ } else {
+ ($iterCount, $operationsPerIter, \@ms);
+ }
+}
+
+
+
+#---------------------------------------------------------------------
+# Measure a given test method with a give test pattern using the
+# global run parameters.
+#
+# @param the method to run
+# @param the pattern defining characters to test
+# @param if >0 then the number of iterations per pass. If <0 then
+# (negative of) the number of seconds per pass.
+#
+# @return a Dataset object, scaled by iterations per pass and
+# events per iteration, to give time per event
+#
+sub measure2 {
+ my @res = measure1(@_);
+ my $iterPerPass = shift(@res);
+ my $operationsPerIter = shift(@res);
+ my @data = @{ shift(@res) };
+ my $eventsPerIter = shift(@res);
+
+
+ shift(@data) if (@data > 1); # discard first run
+
+ my $ds = Dataset->new(@data);
+ #$ds->setScale(1.0e-3 / ($iterPerPass * $operationsPerIter));
+ ($ds, $iterPerPass, $operationsPerIter, $eventsPerIter);
+}
+
+
+#---------------------------------------------------------------------
+# Invoke program and capture results, passing it the given parameters.
+#
+# @param the method to run
+# @param the number of iterations, or if negative, the duration
+# in seconds. If more than on pass is desired, pass in
+# a string, e.g., "100 100 100".
+# @param the pattern defining characters to test
+#
+# @return an array of results. Each result is an array REF
+# describing one pass. The array REF contains:
+# ->[0]: The method name as reported
+# ->[1]: The params on the '= <meth> begin ...' line
+# ->[2]: The params on the '= <meth> end ...' line
+# ->[3..]: GC messages from the JVM, if any
+#
+sub callProg {
+ my $cmd = shift;
+ #my $pat = shift;
+ #my $n = shift;
+
+ #my $cmd = "java -cp c:\\dev\\myicu4j\\classes $TESTCLASS $method $n $pat";
+ debug( "[$cmd]\n"); # for debugging
+ open(PIPE, "$cmd|") or die "Can't run \"$cmd\"";
+ my @out;
+ while (<PIPE>) {
+ push(@out, $_);
+ }
+ close(PIPE) or die "Program failed: \"$cmd\"";
+
+ @out = grep(!/^\#/, @out); # filter out comments
+
+ #debug( "[", join("\n", @out), "]\n");
+
+ my @results;
+ my $method = '';
+ my $data = [];
+ foreach (@out) {
+ next unless (/\S/);
+
+ if (/^=\s*(\w+)\s*(\w+)\s*(.*)/) {
+ my ($m, $state, $d) = ($1, $2, $3);
+ #debug ("$_ => [[$m $state !!!$d!!! $data ]]\n");
+ if ($state eq 'begin') {
+ die "$method was begun but not finished" if ($method);
+ $method = $m;
+ push(@$data, $d);
+ push(@$data, ''); # placeholder for end data
+ } elsif ($state eq 'end') {
+ if ($m ne $method) {
+ die "$method end does not match: $_";
+ }
+ $data->[1] = $d; # insert end data at [1]
+ #debug( "#$method:", join(";",@$data), "\n");
+ unshift(@$data, $method); # add method to start
+ push(@results, $data);
+ $method = '';
+ $data = [];
+ } else {
+ die "Can't parse: $_";
+ }
+ }
+
+ elsif (/^\[/) {
+ if ($method) {
+ push(@$data, $_);
+ } else {
+ # ignore extraneous GC notices
+ }
+ }
+
+ else {
+ die "Can't parse: $_";
+ }
+ }
+
+ die "$method was begun but not finished" if ($method);
+
+ @results;
+}
+
+sub debug {
+ my $message;
+ if($DEBUG != 0) {
+ foreach $message (@_) {
+ print STDERR "$message";
+ }
+ }
+}
+
+sub measure1Alan {
+ #Added here, was global
+ my $CALIBRATE = 2; # duration in seconds for initial calibration
+
+ my $method = shift;
+ my $pat = shift;
+ my $iterCount = shift; # actually might be -seconds/pass
+
+ out("<P>Measuring $method using $pat, ");
+ if ($iterCount > 0) {
+ out("$iterCount iterations/pass, $NUMPASSES passes</P>\n");
+ } else {
+ out(-$iterCount, " seconds/pass, $NUMPASSES passes</P>\n");
+ }
+
+ # is $iterCount actually -seconds?
+ if ($iterCount < 0) {
+
+ # calibrate: estimate ms/iteration
+ print "Calibrating...";
+ my @t = callJava($method, $pat, -$CALIBRATE);
+ print "done.\n";
+
+ my @data = split(/\s+/, $t[0]->[2]);
+ my $timePerIter = 1.0e-3 * $data[0] / $data[2];
+
+ # determine iterations/pass
+ $iterCount = int(-$iterCount / $timePerIter + 0.5);
+
+ out("<P>Calibration pass ($CALIBRATE sec): ");
+ out("$data[0] ms, ");
+ out("$data[2] iterations = ");
+ out(formatSeconds(4, $timePerIter), "/iteration<BR>\n");
+ }
+
+ # run passes
+ print "Measuring $iterCount iterations x $NUMPASSES passes...";
+ my @t = callJava($method, $pat, "$iterCount " x $NUMPASSES);
+ print "done.\n";
+ my @ms = ();
+ my @b; # scratch
+ for my $a (@t) {
+ # $a->[0]: method name, corresponds to $method
+ # $a->[1]: 'begin' data, == $iterCount
+ # $a->[2]: 'end' data, of the form <ms> <eventsPerIter>
+ # $a->[3...]: gc messages from JVM during pass
+ @b = split(/\s+/, $a->[2]);
+ push(@ms, $b[0]);
+ }
+ my $eventsPerIter = $b[1];
+
+ out("Iterations per pass: $iterCount<BR>\n");
+ out("Events per iteration: $eventsPerIter<BR>\n");
+
+ my @ms_str = @ms;
+ $ms_str[0] .= " (discarded)" if (@ms_str > 1);
+ out("Raw times (ms/pass): ", join(", ", @ms_str), "<BR>\n");
+
+ ($iterCount, $eventsPerIter, @ms);
+}
+
+
+1;
+
+#eof
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/Makefile.in
new file mode 100644
index 00000000000..e255c38940e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/ubrkperf
+## Copyright (c) 2001-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/ubrkperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = ubrkperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = ubrkperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf.pl
new file mode 100755
index 00000000000..4971ecf6f2c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf.pl
@@ -0,0 +1,82 @@
+#!/usr/bin/perl
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"BreakIterator performance regression (ICU 2.0, 2.2 and 2.4)",
+ "headers"=>"ICU20 ICU22 ICU24",
+ "operationIs"=>"code point",
+ "eventIs"=>"break",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $m1 = "-- -m char";
+my $m2 = "-- -m word";
+my $m3 = "-- -m line";
+my $m4 = "-- -m sentence";
+
+my $m;
+
+if(@_ >= 0) {
+ $m = "-- -m ".shift;
+} else {
+ $m = $m1;
+}
+
+my $p1 = "ubrkperf20.exe";
+my $p2 = "ubrkperf22.exe";
+my $p3 = "ubrkperf24.exe";
+
+my $dataFiles = {
+"en", ["thesis.txt",
+ #"2drvb10.txt",
+ #"ulyss10.txt",
+ "nvsbl10.txt",
+ "vfear11a.txt",
+ "TestNames_Asian.txt",
+ "TestNames_Chinese.txt",
+ "TestNames_Japanese.txt",
+ "TestNames_Japanese_h.txt",
+ "TestNames_Japanese_k.txt",
+ "TestNames_Korean.txt",
+ "TestNames_Latin.txt",
+ "TestNames_SerbianSH.txt",
+ "TestNames_SerbianSR.txt",
+ "TestNames_Thai.txt",
+ "Testnames_Russian.txt",
+],
+#"th", ["TestNames_Thai.txt", "th18057.txt"]
+};
+
+
+my $tests = {
+"TestForwardChar", ["$p1 $m1 TestICUForward", "$p2 $m1 TestICUForward", "$p3 $m1 TestICUForward"],
+"TestForwardWord", ["$p1 $m2 TestICUForward", "$p2 $m2 TestICUForward", "$p3 $m2 TestICUForward"],
+"TestForwardLine", ["$p1 $m3 TestICUForward", "$p2 $m3 TestICUForward", "$p3 $m3 TestICUForward"],
+"TestForwardSentence", ["$p1 $m4 TestICUForward", "$p2 $m4 TestICUForward", "$p3 $m4 TestICUForward"],
+
+"TestIsBoundChar", ["$p1 $m1 TestICUIsBound", "$p2 $m1 TestICUIsBound", "$p3 $m1 TestICUIsBound"],
+"TestIsBoundWord", ["$p1 $m2 TestICUIsBound", "$p2 $m2 TestICUIsBound", "$p3 $m2 TestICUIsBound"],
+"TestIsBoundLine", ["$p1 $m3 TestICUIsBound", "$p2 $m3 TestICUIsBound", "$p3 $m3 TestICUIsBound"],
+"TestIsBoundSentence", ["$p1 $m4 TestICUIsBound", "$p2 $m4 TestICUIsBound", "$p3 $m4 TestICUIsBound"],
+
+};
+
+runTests($options, $tests, $dataFiles);
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf_r.pl
new file mode 100644
index 00000000000..73983476296
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf_r.pl
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+# ********************************************************************
+# * Copyright (c) 2002-2007, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+#Assume we are running outside of the icu source
+use lib './icu-3.0/icu/source/test/perf/perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"BreakIterator performance regression (ICU 2.8 and 3.0)",
+ "headers"=>"ICU28 ICU30",
+ "operationIs"=>"code point",
+ "eventIs"=>"break",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"results_ICU4C"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $m1 = "-- -m char";
+my $m2 = "-- -m word";
+my $m3 = "-- -m line";
+my $m4 = "-- -m sentence";
+
+my $m;
+
+if(@_ >= 0) {
+ $m = "-- -m ".shift;
+} else {
+ $m = $m1;
+}
+
+my $p1 = "icu-2.8/icu/bin/ubrkperf28.exe";
+my $p2 = "icu-3.0/icu/bin/ubrkperf30.exe";
+
+my $dataFiles = {
+"en", [
+ "TestNames_Asian.txt",
+ "TestNames_Chinese.txt",
+ "TestNames_Japanese.txt",
+ "TestNames_Japanese_h.txt",
+ "TestNames_Japanese_k.txt",
+ "TestNames_Korean.txt",
+ "TestNames_Latin.txt",
+ "TestNames_SerbianSH.txt",
+ "TestNames_SerbianSR.txt",
+ "TestNames_Thai.txt",
+ "Testnames_Russian.txt",
+],
+#"th", ["TestNames_Thai.txt", "th18057.txt"]
+};
+
+
+my $tests = {
+"TestForwardChar", ["$p1 $m1 TestICUForward", "$p2 $m1 TestICUForward"],
+"TestForwardWord", ["$p1 $m2 TestICUForward", "$p2 $m2 TestICUForward"],
+"TestForwardLine", ["$p1 $m3 TestICUForward", "$p2 $m3 TestICUForward"],
+"TestForwardSentence", ["$p1 $m4 TestICUForward", "$p2 $m4 TestICUForward"],
+
+"TestIsBoundChar", ["$p1 $m1 TestICUIsBound", "$p2 $m1 TestICUIsBound"],
+"TestIsBoundWord", ["$p1 $m2 TestICUIsBound", "$p2 $m2 TestICUIsBound"],
+"TestIsBoundLine", ["$p1 $m3 TestICUIsBound", "$p2 $m3 TestICUIsBound"],
+"TestIsBoundSentence", ["$p1 $m4 TestICUIsBound", "$p2 $m4 TestICUIsBound"],
+
+};
+
+runTests($options, $tests, $dataFiles);
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.cpp
new file mode 100644
index 00000000000..18ed4038028
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.cpp
@@ -0,0 +1,251 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (C) 2001-2005 International Business Machines Corporation
+ * and others. All Rights Reserved.
+ *
+ ********************************************************************/
+/********************************************************************************
+*
+* File ubrkperf.cpp
+*
+* Modification History:
+* Name Description
+* Vladimir Weinstein First Version, based on collperf
+*
+*********************************************************************************
+*/
+
+#include "ubrkperf.h"
+#include "uoptions.h"
+#include <stdio.h>
+
+
+#if 0
+#ifdef U_DARWIN
+#include <ApplicationServices/ApplicationServices.h>
+enum{
+ kUCTextBreakAllMask = (kUCTextBreakClusterMask | kUCTextBreakWordMask | kUCTextBreakLineMask)
+ };
+UCTextBreakType breakTypes[4] = {kUCTextBreakCharMask, kUCTextBreakClusterMask, kUCTextBreakWordMask, kUCTextBreakLineMask};
+TextBreakLocatorRef breakRef;
+UCTextBreakType macBreakType;
+
+void createMACBrkIt() {
+ OSStatus status = noErr;
+ LocaleRef lref;
+ status = LocaleRefFromLocaleString(opt_locale, &lref);
+ status = UCCreateTextBreakLocator(lref, 0, kUCTextBreakAllMask, (TextBreakLocatorRef*)&breakRef);
+ if(opt_char == TRUE) {
+ macBreakType = kUCTextBreakClusterMask;
+ } else if(opt_word == TRUE) {
+ macBreakType = kUCTextBreakWordMask;
+ } else if(opt_line == TRUE) {
+ macBreakType = kUCTextBreakLineMask;
+ } else if(opt_sentence == TRUE) {
+ // error
+ // brkit = BreakIterator::createSentenceInstance(opt_locale, status);
+ } else {
+ // default is character iterator
+ macBreakType = kUCTextBreakClusterMask;
+ }
+}
+#endif
+
+
+void doForwardTest() {
+ if (opt_terse == FALSE) {
+ printf("Doing the forward test\n");
+ }
+ int32_t noBreaks = 0;
+ int32_t i = 0;
+ unsigned long startTime = timeGetTime();
+ unsigned long elapsedTime = 0;
+ if(opt_icu) {
+ createICUBrkIt();
+ brkit->setText(text);
+ brkit->first();
+ if (opt_terse == FALSE) {
+ printf("Warmup\n");
+ }
+ while(brkit->next() != BreakIterator::DONE) {
+ noBreaks++;
+ }
+
+ if (opt_terse == FALSE) {
+ printf("Measure\n");
+ }
+ startTime = timeGetTime();
+ for(i = 0; i < opt_loopCount; i++) {
+ brkit->first();
+ while(brkit->next() != BreakIterator::DONE) {
+ }
+ }
+
+ elapsedTime = timeGetTime()-startTime;
+ } else if(opt_mac) {
+#ifdef U_DARWIN
+ createMACBrkIt();
+ UniChar* filePtr = text;
+ OSStatus status = noErr;
+ UniCharCount startOffset = 0, breakOffset = 0, numUniChars = textSize;
+ startOffset = 0;
+ //printf("\t---Search forward--\n");
+
+ while (startOffset < numUniChars)
+ {
+ status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars,
+ startOffset, &breakOffset);
+ //require_action(status == noErr, EXIT, printf( "**UCFindTextBreak failed: startOffset %d, status %d\n", (int)startOffset, (int)status));
+ //require_action((breakOffset <= numUniChars),EXIT, printf("**UCFindTextBreak breakOffset too big: startOffset %d, breakOffset %d\n", (int)startOffset, (int)breakOffset));
+
+ // Output break
+ //printf("\t%d\n", (int)breakOffset);
+
+ // Increment counters
+ noBreaks++;
+ startOffset = breakOffset;
+ }
+ startTime = timeGetTime();
+ for(i = 0; i < opt_loopCount; i++) {
+ startOffset = 0;
+
+ while (startOffset < numUniChars)
+ {
+ status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars,
+ startOffset, &breakOffset);
+ // Increment counters
+ startOffset = breakOffset;
+ }
+ }
+ elapsedTime = timeGetTime()-startTime;
+ UCDisposeTextBreakLocator(&breakRef);
+#endif
+
+
+ }
+
+
+ if (opt_terse == FALSE) {
+ int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount));
+ int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize));
+ int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks));
+ printf("forward break iteration average loop time %d\n", loopTime);
+ printf("number of code units %d average time per code unit %d\n", textSize, timePerCU);
+ printf("number of breaks %d average time per break %d\n", noBreaks, timePerBreak);
+ } else {
+ printf("time=%d\nevents=%d\nsize=%d\n", elapsedTime, noBreaks, textSize);
+ }
+
+
+}
+
+
+
+
+#endif
+
+UPerfFunction* BreakIteratorPerformanceTest::TestICUForward()
+{
+ return new ICUForward(locale, m_mode_, m_file_, m_fileLen_);
+}
+
+UPerfFunction* BreakIteratorPerformanceTest::TestICUIsBound()
+{
+ return new ICUIsBound(locale, m_mode_, m_file_, m_fileLen_);
+}
+
+UPerfFunction* BreakIteratorPerformanceTest::TestDarwinForward()
+{
+ return NULL;
+}
+
+UPerfFunction* BreakIteratorPerformanceTest::TestDarwinIsBound()
+{
+ return NULL;
+}
+
+UPerfFunction* BreakIteratorPerformanceTest::runIndexedTest(int32_t index, UBool exec,
+ const char *&name,
+ char* par)
+{
+ switch (index) {
+ TESTCASE(0, TestICUForward);
+ TESTCASE(1, TestICUIsBound);
+ TESTCASE(2, TestDarwinForward);
+ TESTCASE(3, TestDarwinIsBound);
+ default:
+ name = "";
+ return NULL;
+ }
+ return NULL;
+}
+
+UOption options[]={
+ UOPTION_DEF( "mode", 'm', UOPT_REQUIRES_ARG)
+ };
+
+
+BreakIteratorPerformanceTest::BreakIteratorPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status)
+: UPerfTest(argc,argv,status),
+m_mode_(NULL),
+m_file_(NULL),
+m_fileLen_(0)
+{
+
+ _remainingArgc = u_parseArgs(_remainingArgc, (char**)argv, (int32_t)(sizeof(options)/sizeof(options[0])), options);
+
+
+ if(options[0].doesOccur) {
+ m_mode_ = options[0].value;
+ switch(options[0].value[0]) {
+ case 'w' :
+ case 'c' :
+ case 's' :
+ case 'l' :
+ break;
+ default:
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ break;
+ }
+ } else {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+
+ m_file_ = getBuffer(m_fileLen_, status);
+
+ if(status== U_ILLEGAL_ARGUMENT_ERROR){
+ fprintf(stderr, gUsageString, "normperf");
+ fprintf(stderr, "\t-m or --mode Required mode for breakiterator: char, word, line or sentence\n");
+
+ return;
+ }
+
+ if(U_FAILURE(status)){
+ fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", u_errorName(status));
+ return;
+ }
+}
+
+BreakIteratorPerformanceTest::~BreakIteratorPerformanceTest()
+{
+}
+
+
+//----------------------------------------------------------------------------------------
+//
+// Main -- process command line, read in and pre-process the test file,
+// call other functions to do the actual tests.
+//
+//----------------------------------------------------------------------------------------
+int main(int argc, const char** argv) {
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIteratorPerformanceTest test(argc, argv, status);
+ if(U_FAILURE(status)){
+ return status;
+ }
+ if(test.run()==FALSE){
+ fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
+ return -1;
+ }
+ return 0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.dsp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.dsp
new file mode 100644
index 00000000000..d3417e55961
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.dsp
@@ -0,0 +1,172 @@
+# Microsoft Developer Studio Project File - Name="ubrkperf" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=UBRKPERF - WIN32 RELEASE
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "ubrkperf.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "ubrkperf.mak" CFG="UBRKPERF - WIN32 RELEASE"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ubrkperf - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf - Win64 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf - Win64 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "ubrkperf - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\..\bin\ubrkperf24.exe" /libpath:"..\..\..\..\lib\\"
+# Begin Custom Build
+InputPath=\dev\0_icu\bin\ubrkperf24.exe
+SOURCE="$(InputPath)"
+
+"c:\dev\0_icu\bin\ubrkperf22.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ copy $(InputPath) c:\dev\0_icu\bin\ubrkperf22.exe
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "ubrkperf - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\\"
+
+!ELSEIF "$(CFG)" == "ubrkperf - Win64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /machine:IA64
+# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:IX86 /libpath:"..\..\..\..\lib\\" /machine:IA64
+
+!ELSEIF "$(CFG)" == "ubrkperf - Win64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FR /FD /GZ /Wp64 /Zm600 /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /machine:IA64
+# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /libpath:"..\..\..\..\lib\\" /machine:IA64
+
+!ENDIF
+
+# Begin Target
+
+# Name "ubrkperf - Win32 Release"
+# Name "ubrkperf - Win32 Debug"
+# Name "ubrkperf - Win64 Release"
+# Name "ubrkperf - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\ubrkperf.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\ubrkperf.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.h b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.h
new file mode 100644
index 00000000000..4c55a73976c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.h
@@ -0,0 +1,137 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+**********************************************************************
+*/
+#ifndef _UBRKPERF_H
+#define _UBRKPERF_H
+
+#include "unicode/uperf.h"
+
+#include <unicode/brkiter.h>
+
+class ICUBreakFunction : public UPerfFunction {
+protected:
+ BreakIterator *m_brkIt_;
+ const UChar *m_file_;
+ int32_t m_fileLen_;
+ int32_t m_noBreaks_;
+ UErrorCode m_status_;
+public:
+ ICUBreakFunction(const char *locale, const char *mode, const UChar *file, int32_t file_len) :
+ m_brkIt_(NULL),
+ m_file_(file),
+ m_fileLen_(file_len),
+ m_noBreaks_(-1),
+ m_status_(U_ZERO_ERROR)
+ {
+ switch(mode[0]) {
+ case 'c' :
+ m_brkIt_ = BreakIterator::createCharacterInstance(locale, m_status_);
+ break;
+ case 'w' :
+ m_brkIt_ = BreakIterator::createWordInstance(locale, m_status_);
+ break;
+ case 'l' :
+ m_brkIt_ = BreakIterator::createLineInstance(locale, m_status_);
+ break;
+ case 's' :
+ m_brkIt_ = BreakIterator::createSentenceInstance(locale, m_status_);
+ break;
+ default:
+ // should not happen as we already check for this in the caller
+ m_status_ = U_ILLEGAL_ARGUMENT_ERROR;
+ break;
+ }
+ }
+
+ ~ICUBreakFunction() { delete m_brkIt_; }
+ virtual void call(UErrorCode *status) = 0;
+ virtual long getOperationsPerIteration() { return m_fileLen_; }
+ virtual long getEventsPerIteration() { return m_noBreaks_; }
+ virtual UErrorCode getStatus() { return m_status_; }
+};
+
+class ICUIsBound : public ICUBreakFunction {
+public:
+ ICUIsBound(const char *locale, const char *mode, const UChar *file, int32_t file_len) :
+ ICUBreakFunction(locale, mode, file, file_len)
+ {
+ m_noBreaks_ = 0;
+ m_brkIt_->setText(UnicodeString(m_file_, m_fileLen_));
+ m_brkIt_->first();
+ int32_t j = 0;
+ for(j = 0; j < m_fileLen_; j++) {
+ if(m_brkIt_->isBoundary(j)) {
+ m_noBreaks_++;
+ }
+ }
+ }
+ virtual void call(UErrorCode *status)
+ {
+ m_noBreaks_ = 0;
+ int32_t j = 0;
+ for(j = 0; j < m_fileLen_; j++) {
+ if(m_brkIt_->isBoundary(j)) {
+ m_noBreaks_++;
+ }
+ }
+ }
+};
+
+class ICUForward : public ICUBreakFunction {
+public:
+ ICUForward(const char *locale, const char *mode, const UChar *file, int32_t file_len) :
+ ICUBreakFunction(locale, mode, file, file_len)
+ {
+ m_noBreaks_ = 0;
+ m_brkIt_->setText(UnicodeString(m_file_, m_fileLen_));
+ m_brkIt_->first();
+ while(m_brkIt_->next() != BreakIterator::DONE) {
+ m_noBreaks_++;
+ }
+ }
+ virtual void call(UErrorCode *status)
+ {
+ m_noBreaks_ = 0;
+ m_brkIt_->first();
+ while(m_brkIt_->next() != BreakIterator::DONE) {
+ m_noBreaks_++;
+ }
+ }
+};
+
+class DarwinBreakFunction : public UPerfFunction {
+#ifdef U_DARWIN
+public:
+ virtual void call(UErrorCode *status) {};
+#else
+public:
+ virtual void call(UErrorCode *status) {};
+#endif
+};
+
+class BreakIteratorPerformanceTest : public UPerfTest {
+private:
+ const char* m_mode_;
+ const UChar* m_file_;
+ int32_t m_fileLen_;
+
+public:
+ BreakIteratorPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status);
+ ~BreakIteratorPerformanceTest();
+
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,
+ const char* &name, char* par = NULL);
+
+ UPerfFunction* TestICUForward();
+ UPerfFunction* TestICUIsBound();
+
+ UPerfFunction* TestDarwinForward();
+ UPerfFunction* TestDarwinIsBound();
+
+};
+
+#endif // UBRKPERF_H
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.vcproj
new file mode 100644
index 00000000000..31f5bc03a51
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.vcproj
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ubrkperf"
+ ProjectGUID="{7E280294-49BD-43D1-9903-CF29648D88CA}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/ubrkperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/ubrkperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib"
+ OutputFile=".\Debug/ubrkperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/ubrkperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/ubrkperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="2"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/ubrkperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib"
+ OutputFile="..\..\..\..\bin\ubrkperf24.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ ProgramDatabaseFile=".\Release/ubrkperf24.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="ubrkperf.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="ubrkperf.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf20.dsp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf20.dsp
new file mode 100644
index 00000000000..197aed77abe
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf20.dsp
@@ -0,0 +1,172 @@
+# Microsoft Developer Studio Project File - Name="ubrkperf20" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ubrkperf20 - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "ubrkperf20.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "ubrkperf20.mak" CFG="ubrkperf20 - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ubrkperf20 - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf20 - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf20 - Win64 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf20 - Win64 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "ubrkperf20 - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 c:\src\oldICU\icu-2-0\lib\icuuc.lib c:\src\oldICU\icu-2-0\lib\icuin.lib ..\..\..\..\lib\icutu.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\..\bin\ubrkperf20.exe" /libpath:"..\..\..\..\lib\\"
+# Begin Custom Build
+InputPath=\dev\0_icu\bin\ubrkperf20.exe
+SOURCE="$(InputPath)"
+
+"c:\dev\0_icu\bin\ubrkperf20.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ copy $(InputPath) c:\dev\0_icu\bin\ubrkperf20.exe
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "ubrkperf20 - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 c:\src\oldICU\icu-2-0\lib\icuucd.lib c:\src\oldICU\icu-2-0\lib\icuind.lib ..\..\..\..\lib\icutud.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ELSEIF "$(CFG)" == "ubrkperf20 - Win64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /machine:IA64
+# ADD LINK32 c:\src\oldICU\icu-2-0\lib\icuuc.lib c:\src\oldICU\icu-2-0\lib\icuin.lib ..\..\..\..\lib\icutu.lib /nologo /subsystem:console /machine:IX86 /machine:IA64
+
+!ELSEIF "$(CFG)" == "ubrkperf20 - Win64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FR /FD /GZ /Wp64 /Zm600 /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /machine:IA64
+# ADD LINK32 c:\src\oldICU\icu-2-0\lib\icuucd.lib c:\src\oldICU\icu-2-0\lib\icuind.lib ..\..\..\..\lib\icutud.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /machine:IA64
+
+!ENDIF
+
+# Begin Target
+
+# Name "ubrkperf20 - Win32 Release"
+# Name "ubrkperf20 - Win32 Debug"
+# Name "ubrkperf20 - Win64 Release"
+# Name "ubrkperf20 - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\..\..\dev\0_icu\source\test\perf\ubrkperf\ubrkperf.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\ubrkperf.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.cpp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.cpp
new file mode 100644
index 00000000000..4ab8190f5ba
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.cpp
@@ -0,0 +1,771 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (C) 2001-2005 IBM, Inc. All Rights Reserved.
+ *
+ ********************************************************************/
+/********************************************************************************
+*
+* File ubrkperf.cpp
+*
+* Modification History:
+* Name Description
+* Vladimir Weinstein First Version, based on collperf
+*
+*********************************************************************************
+*/
+
+//
+// This program tests break iterator performance
+// Currently we test only ICU APIs with the future possibility of testing *nix & win32 APIs
+// (if any)
+// A text file is required as input. It must be in utf-8 or utf-16 format,
+// and include a byte order mark. Either LE or BE format is OK.
+//
+
+const char gUsageString[] =
+ "usage: ubrkperf options...\n"
+ "-help Display this message.\n"
+ "-file file_name utf-16/utf-8 format file.\n"
+ "-locale name ICU locale to use. Default is en_US\n"
+ "-langid 0x1234 Windows Language ID number. Default to value for -locale option\n"
+ " see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm\n"
+ "-win Run test using Windows native services. (currently not working) (ICU is default)\n"
+ "-unix Run test using Unix word breaking services. (currently not working) \n"
+ "-mac Run test using MacOSX word breaking services.\n"
+ "-uselen Use API with string lengths. Default is null-terminated strings\n"
+ "-char Use character break iterator\n"
+ "-word Use word break iterator\n"
+ "-line Use line break iterator\n"
+ "-sentence Use sentence break iterator\n"
+ "-loop nnnn Loopcount for test. Adjust for reasonable total running time.\n"
+ "-iloop n Inner Loop Count. Default = 1. Number of calls to function\n"
+ " under test at each call point. For measuring test overhead.\n"
+ "-terse Terse numbers-only output. Intended for use by scripts.\n"
+ "-dump Display stuff.\n"
+ "-capi Use C APIs instead of C++ APIs (currently not working)\n"
+ "-next Do the next test\n"
+ "-isBound Do the isBound test\n"
+ ;
+
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+#include <locale.h>
+#include <errno.h>
+#include <sys/stat.h>
+
+#include <unicode/utypes.h>
+#include <unicode/ucol.h>
+#include <unicode/ucoleitr.h>
+#include <unicode/uloc.h>
+#include <unicode/ustring.h>
+#include <unicode/ures.h>
+#include <unicode/uchar.h>
+#include <unicode/ucnv.h>
+#include <unicode/utf8.h>
+
+#include <unicode/brkiter.h>
+
+
+#ifdef U_WINDOWS
+#include <windows.h>
+#else
+//
+// Stubs for Windows API functions when building on UNIXes.
+//
+#include <sys/time.h>
+unsigned long timeGetTime() {
+ struct timeval t;
+ gettimeofday(&t, 0);
+ unsigned long val = t.tv_sec * 1000; // Let it overflow. Who cares.
+ val += t.tv_usec / 1000;
+ return val;
+};
+#define MAKELCID(a,b) 0
+#endif
+
+
+//
+// Command line option variables
+// These global variables are set according to the options specified
+// on the command line by the user.
+char * opt_fName = 0;
+char * opt_locale = "en_US";
+int opt_langid = 0; // Defaults to value corresponding to opt_locale.
+char * opt_rules = 0;
+UBool opt_help = FALSE;
+int opt_time = 0;
+int opt_loopCount = 0;
+int opt_passesCount= 1;
+UBool opt_terse = FALSE;
+UBool opt_icu = TRUE;
+UBool opt_win = FALSE; // Run with Windows native functions.
+UBool opt_unix = FALSE; // Run with UNIX strcoll, strxfrm functions.
+UBool opt_mac = FALSE; // Run with MacOSX word break services.
+UBool opt_uselen = FALSE;
+UBool opt_dump = FALSE;
+UBool opt_char = FALSE;
+UBool opt_word = FALSE;
+UBool opt_line = FALSE;
+UBool opt_sentence = FALSE;
+UBool opt_capi = FALSE;
+
+UBool opt_next = FALSE;
+UBool opt_isBound = FALSE;
+
+
+
+//
+// Definitions for the command line options
+//
+struct OptSpec {
+ const char *name;
+ enum {FLAG, NUM, STRING} type;
+ void *pVar;
+};
+
+OptSpec opts[] = {
+ {"-file", OptSpec::STRING, &opt_fName},
+ {"-locale", OptSpec::STRING, &opt_locale},
+ {"-langid", OptSpec::NUM, &opt_langid},
+ {"-win", OptSpec::FLAG, &opt_win},
+ {"-unix", OptSpec::FLAG, &opt_unix},
+ {"-mac", OptSpec::FLAG, &opt_mac},
+ {"-uselen", OptSpec::FLAG, &opt_uselen},
+ {"-loop", OptSpec::NUM, &opt_loopCount},
+ {"-time", OptSpec::NUM, &opt_time},
+ {"-passes", OptSpec::NUM, &opt_passesCount},
+ {"-char", OptSpec::FLAG, &opt_char},
+ {"-word", OptSpec::FLAG, &opt_word},
+ {"-line", OptSpec::FLAG, &opt_line},
+ {"-sentence", OptSpec::FLAG, &opt_sentence},
+ {"-terse", OptSpec::FLAG, &opt_terse},
+ {"-dump", OptSpec::FLAG, &opt_dump},
+ {"-capi", OptSpec::FLAG, &opt_capi},
+ {"-next", OptSpec::FLAG, &opt_next},
+ {"-isBound", OptSpec::FLAG, &opt_isBound},
+ {"-help", OptSpec::FLAG, &opt_help},
+ {"-?", OptSpec::FLAG, &opt_help},
+ {0, OptSpec::FLAG, 0}
+};
+
+
+//---------------------------------------------------------------------------
+//
+// Global variables pointing to and describing the test file
+//
+//---------------------------------------------------------------------------
+
+//DWORD gWinLCID;
+BreakIterator *brkit = NULL;
+UChar *text = NULL;
+int32_t textSize = 0;
+
+
+
+#ifdef U_DARWIN
+#include <ApplicationServices/ApplicationServices.h>
+enum{
+ kUCTextBreakAllMask = (kUCTextBreakClusterMask | kUCTextBreakWordMask | kUCTextBreakLineMask)
+ };
+UCTextBreakType breakTypes[4] = {kUCTextBreakCharMask, kUCTextBreakClusterMask, kUCTextBreakWordMask, kUCTextBreakLineMask};
+TextBreakLocatorRef breakRef;
+UCTextBreakType macBreakType;
+
+void createMACBrkIt() {
+ OSStatus status = noErr;
+ LocaleRef lref;
+ status = LocaleRefFromLocaleString(opt_locale, &lref);
+ status = UCCreateTextBreakLocator(lref, 0, kUCTextBreakAllMask, (TextBreakLocatorRef*)&breakRef);
+ if(opt_char == TRUE) {
+ macBreakType = kUCTextBreakClusterMask;
+ } else if(opt_word == TRUE) {
+ macBreakType = kUCTextBreakWordMask;
+ } else if(opt_line == TRUE) {
+ macBreakType = kUCTextBreakLineMask;
+ } else if(opt_sentence == TRUE) {
+ // error
+ // brkit = BreakIterator::createSentenceInstance(opt_locale, status);
+ } else {
+ // default is character iterator
+ macBreakType = kUCTextBreakClusterMask;
+ }
+}
+#endif
+
+void createICUBrkIt() {
+ //
+ // Set up an ICU break iterator
+ //
+ UErrorCode status = U_ZERO_ERROR;
+ if(opt_char == TRUE) {
+ brkit = BreakIterator::createCharacterInstance(opt_locale, status);
+ } else if(opt_word == TRUE) {
+ brkit = BreakIterator::createWordInstance(opt_locale, status);
+ } else if(opt_line == TRUE) {
+ brkit = BreakIterator::createLineInstance(opt_locale, status);
+ } else if(opt_sentence == TRUE) {
+ brkit = BreakIterator::createSentenceInstance(opt_locale, status);
+ } else {
+ // default is character iterator
+ brkit = BreakIterator::createCharacterInstance(opt_locale, status);
+ }
+ if (status==U_USING_DEFAULT_WARNING && opt_terse==FALSE) {
+ fprintf(stderr, "Warning, U_USING_DEFAULT_WARNING for %s\n", opt_locale);
+ }
+ if (status==U_USING_FALLBACK_WARNING && opt_terse==FALSE) {
+ fprintf(stderr, "Warning, U_USING_FALLBACK_ERROR for %s\n", opt_locale);
+ }
+
+}
+
+//---------------------------------------------------------------------------
+//
+// ProcessOptions() Function to read the command line options.
+//
+//---------------------------------------------------------------------------
+UBool ProcessOptions(int argc, const char **argv, OptSpec opts[])
+{
+ int i;
+ int argNum;
+ const char *pArgName;
+ OptSpec *pOpt;
+
+ for (argNum=1; argNum<argc; argNum++) {
+ pArgName = argv[argNum];
+ for (pOpt = opts; pOpt->name != 0; pOpt++) {
+ if (strcmp(pOpt->name, pArgName) == 0) {
+ switch (pOpt->type) {
+ case OptSpec::FLAG:
+ *(UBool *)(pOpt->pVar) = TRUE;
+ break;
+ case OptSpec::STRING:
+ argNum ++;
+ if (argNum >= argc) {
+ fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name);
+ return FALSE;
+ }
+ *(const char **)(pOpt->pVar) = argv[argNum];
+ break;
+ case OptSpec::NUM:
+ argNum ++;
+ if (argNum >= argc) {
+ fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name);
+ return FALSE;
+ }
+ char *endp;
+ i = strtol(argv[argNum], &endp, 0);
+ if (endp == argv[argNum]) {
+ fprintf(stderr, "integer value expected for \"%s\" option.\n", pOpt->name);
+ return FALSE;
+ }
+ *(int *)(pOpt->pVar) = i;
+ }
+ break;
+ }
+ }
+ if (pOpt->name == 0)
+ {
+ fprintf(stderr, "Unrecognized option \"%s\"\n", pArgName);
+ return FALSE;
+ }
+ }
+return TRUE;
+}
+
+
+void doForwardTest() {
+ if (opt_terse == FALSE) {
+ printf("Doing the forward test\n");
+ }
+ int32_t noBreaks = 0;
+ int32_t i = 0;
+ unsigned long startTime = timeGetTime();
+ unsigned long elapsedTime = 0;
+ if(opt_icu) {
+ createICUBrkIt();
+ brkit->setText(UnicodeString(text, textSize));
+ brkit->first();
+ if (opt_terse == FALSE) {
+ printf("Warmup\n");
+ }
+ int j;
+ while((j = brkit->next()) != BreakIterator::DONE) {
+ noBreaks++;
+ //fprintf(stderr, "%d ", j);
+ }
+
+ if (opt_terse == FALSE) {
+ printf("Measure\n");
+ }
+ startTime = timeGetTime();
+ for(i = 0; i < opt_loopCount; i++) {
+ brkit->first();
+ while(brkit->next() != BreakIterator::DONE) {
+ }
+ }
+
+ elapsedTime = timeGetTime()-startTime;
+ } else if(opt_mac) {
+#ifdef U_DARWIN
+ createMACBrkIt();
+ UniChar* filePtr = text;
+ OSStatus status = noErr;
+ UniCharCount startOffset = 0, breakOffset = 0, numUniChars = textSize;
+ startOffset = 0;
+ //printf("\t---Search forward--\n");
+
+ while (startOffset < numUniChars)
+ {
+ status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars,
+ startOffset, &breakOffset);
+ //require_action(status == noErr, EXIT, printf( "**UCFindTextBreak failed: startOffset %d, status %d\n", (int)startOffset, (int)status));
+ //require_action((breakOffset <= numUniChars),EXIT, printf("**UCFindTextBreak breakOffset too big: startOffset %d, breakOffset %d\n", (int)startOffset, (int)breakOffset));
+
+ // Output break
+ //printf("\t%d\n", (int)breakOffset);
+
+ // Increment counters
+ noBreaks++;
+ startOffset = breakOffset;
+ }
+ startTime = timeGetTime();
+ for(i = 0; i < opt_loopCount; i++) {
+ startOffset = 0;
+
+ while (startOffset < numUniChars)
+ {
+ status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars,
+ startOffset, &breakOffset);
+ // Increment counters
+ startOffset = breakOffset;
+ }
+ }
+ elapsedTime = timeGetTime()-startTime;
+ UCDisposeTextBreakLocator(&breakRef);
+#endif
+
+
+ }
+
+
+ if (opt_terse == FALSE) {
+ int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount));
+ int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize));
+ int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks));
+ printf("forward break iteration average loop time %d\n", loopTime);
+ printf("number of code units %d average time per code unit %d\n", textSize, timePerCU);
+ printf("number of breaks %d average time per break %d\n", noBreaks, timePerBreak);
+ } else {
+ printf("time=%d\nevents=%d\nsize=%d\n", elapsedTime, noBreaks, textSize);
+ }
+
+
+}
+
+void doIsBoundTest() {
+ int32_t noBreaks = 0, hit = 0;
+ int32_t i = 0, j = 0;
+ unsigned long startTime = timeGetTime();
+ unsigned long elapsedTime = 0;
+ createICUBrkIt();
+ brkit->setText(UnicodeString(text, textSize));
+ brkit->first();
+ for(j = 0; j < textSize; j++) {
+ if(brkit->isBoundary(j)) {
+ noBreaks++;
+ //fprintf(stderr, "%d ", j);
+ }
+ }
+ /*
+ while(brkit->next() != BreakIterator::DONE) {
+ noBreaks++;
+ }
+ */
+
+ startTime = timeGetTime();
+ for(i = 0; i < opt_loopCount; i++) {
+ for(j = 0; j < textSize; j++) {
+ if(brkit->isBoundary(j)) {
+ hit++;
+ }
+ }
+ }
+
+ elapsedTime = timeGetTime()-startTime;
+ int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount));
+ if (opt_terse == FALSE) {
+ int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize));
+ int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks));
+ printf("forward break iteration average loop time %d\n", loopTime);
+ printf("number of code units %d average time per code unit %d\n", textSize, timePerCU);
+ printf("number of breaks %d average time per break %d\n", noBreaks, timePerBreak);
+ } else {
+ printf("time=%d\nevents=%d\nsize=%d\n", elapsedTime, noBreaks, textSize);
+ }
+}
+
+//----------------------------------------------------------------------------------------
+//
+// UnixConvert -- Convert the lines of the file to the encoding for UNIX
+// Since it appears that Unicode support is going in the general
+// direction of the use of UTF-8 locales, that is the approach
+// that is used here.
+//
+//----------------------------------------------------------------------------------------
+void UnixConvert() {
+#if 0
+ int line;
+
+ UConverter *cvrtr; // An ICU code page converter.
+ UErrorCode status = U_ZERO_ERROR;
+
+
+ cvrtr = ucnv_open("utf-8", &status); // we are just doing UTF-8 locales for now.
+ if (U_FAILURE(status)) {
+ fprintf(stderr, "ICU Converter open failed.: %d\n", &status);
+ exit(-1);
+ }
+ // redo for unix
+ for (line=0; line < gNumFileLines; line++) {
+ int sizeNeeded = ucnv_fromUChars(cvrtr,
+ 0, // ptr to target buffer.
+ 0, // length of target buffer.
+ gFileLines[line].name,
+ -1, // source is null terminated
+ &status);
+ if (status != U_BUFFER_OVERFLOW_ERROR && status != U_ZERO_ERROR) {
+ fprintf(stderr, "Conversion from Unicode, something is wrong.\n");
+ exit(-1);
+ }
+ status = U_ZERO_ERROR;
+ gFileLines[line].unixName = new char[sizeNeeded+1];
+ sizeNeeded = ucnv_fromUChars(cvrtr,
+ gFileLines[line].unixName, // ptr to target buffer.
+ sizeNeeded+1, // length of target buffer.
+ gFileLines[line].name,
+ -1, // source is null terminated
+ &status);
+ if (U_FAILURE(status)) {
+ fprintf(stderr, "ICU Conversion Failed.: %d\n", status);
+ exit(-1);
+ }
+ gFileLines[line].unixName[sizeNeeded] = 0;
+ };
+ ucnv_close(cvrtr);
+#endif
+}
+
+
+//----------------------------------------------------------------------------------------
+//
+// class UCharFile Class to hide all the gorp to read a file in
+// and produce a stream of UChars.
+//
+//----------------------------------------------------------------------------------------
+class UCharFile {
+public:
+ UCharFile(const char *fileName);
+ ~UCharFile();
+ UChar get();
+ UBool eof() {return fEof;};
+ UBool error() {return fError;};
+ int32_t size() { return fFileSize; };
+
+private:
+ UCharFile (const UCharFile &other) {}; // No copy constructor.
+ UCharFile & operator = (const UCharFile &other) {return *this;}; // No assignment op
+
+ FILE *fFile;
+ const char *fName;
+ UBool fEof;
+ UBool fError;
+ UChar fPending2ndSurrogate;
+ int32_t fFileSize;
+
+ enum {UTF16LE, UTF16BE, UTF8} fEncoding;
+};
+
+UCharFile::UCharFile(const char * fileName) {
+ fEof = FALSE;
+ fError = FALSE;
+ fName = fileName;
+ struct stat buf;
+ int32_t result = stat(fileName, &buf);
+ if(result != 0) {
+ fprintf(stderr, "Error getting info\n");
+ fFileSize = -1;
+ } else {
+ fFileSize = buf.st_size;
+ }
+ fFile = fopen(fName, "rb");
+ fPending2ndSurrogate = 0;
+ if (fFile == NULL) {
+ fprintf(stderr, "Can not open file \"%s\"\n", opt_fName);
+ fError = TRUE;
+ return;
+ }
+ //
+ // Look for the byte order mark at the start of the file.
+ //
+ int BOMC1, BOMC2, BOMC3;
+ BOMC1 = fgetc(fFile);
+ BOMC2 = fgetc(fFile);
+
+ if (BOMC1 == 0xff && BOMC2 == 0xfe) {
+ fEncoding = UTF16LE; }
+ else if (BOMC1 == 0xfe && BOMC2 == 0xff) {
+ fEncoding = UTF16BE; }
+ else if (BOMC1 == 0xEF && BOMC2 == 0xBB && (BOMC3 = fgetc(fFile)) == 0xBF ) {
+ fEncoding = UTF8; }
+ else
+ {
+ fprintf(stderr, "collperf: file \"%s\" encoding must be UTF-8 or UTF-16, and "
+ "must include a BOM.\n", fileName);
+ fError = true;
+ return;
+ }
+}
+
+
+UCharFile::~UCharFile() {
+ fclose(fFile);
+}
+
+
+
+UChar UCharFile::get() {
+ UChar c;
+ switch (fEncoding) {
+ case UTF16LE:
+ {
+ int cL, cH;
+ cL = fgetc(fFile);
+ cH = fgetc(fFile);
+ c = cL | (cH << 8);
+ if (cH == EOF) {
+ c = 0;
+ fEof = TRUE;
+ }
+ break;
+ }
+ case UTF16BE:
+ {
+ int cL, cH;
+ cH = fgetc(fFile);
+ cL = fgetc(fFile);
+ c = cL | (cH << 8);
+ if (cL == EOF) {
+ c = 0;
+ fEof = TRUE;
+ }
+ break;
+ }
+ case UTF8:
+ {
+ if (fPending2ndSurrogate != 0) {
+ c = fPending2ndSurrogate;
+ fPending2ndSurrogate = 0;
+ break;
+ }
+
+ int ch = fgetc(fFile); // Note: c and ch are separate cause eof test doesn't work on UChar type.
+ if (ch == EOF) {
+ c = 0;
+ fEof = TRUE;
+ break;
+ }
+
+ if (ch <= 0x7f) {
+ // It's ascii. No further utf-8 conversion.
+ c = ch;
+ break;
+ }
+
+ // Figure out the lenght of the char and read the rest of the bytes
+ // into a temp array.
+ int nBytes;
+ if (ch >= 0xF0) {nBytes=4;}
+ else if (ch >= 0xE0) {nBytes=3;}
+ else if (ch >= 0xC0) {nBytes=2;}
+ else {
+ fprintf(stderr, "not likely utf-8 encoded file %s contains corrupt data at offset %d.\n", fName, ftell(fFile));
+ fError = TRUE;
+ return 0;
+ }
+
+ unsigned char bytes[10];
+ bytes[0] = (unsigned char)ch;
+ int i;
+ for (i=1; i<nBytes; i++) {
+ bytes[i] = fgetc(fFile);
+ if (bytes[i] < 0x80 || bytes[i] >= 0xc0) {
+ fprintf(stderr, "utf-8 encoded file %s contains corrupt data at offset %d. Expected %d bytes, byte %d is invalid. First byte is %02X\n", fName, ftell(fFile), nBytes, i, ch);
+ fError = TRUE;
+ return 0;
+ }
+ }
+
+ // Convert the bytes from the temp array to a Unicode char.
+ i = 0;
+ uint32_t cp;
+ UTF8_NEXT_CHAR_UNSAFE(bytes, i, cp);
+ c = (UChar)cp;
+
+ if (cp >= 0x10000) {
+ // The code point needs to be broken up into a utf-16 surrogate pair.
+ // Process first half this time through the main loop, and
+ // remember the other half for the next time through.
+ UChar utf16Buf[3];
+ i = 0;
+ UTF16_APPEND_CHAR_UNSAFE(utf16Buf, i, cp);
+ fPending2ndSurrogate = utf16Buf[1];
+ c = utf16Buf[0];
+ }
+ break;
+ };
+ }
+ return c;
+}
+
+
+//----------------------------------------------------------------------------------------
+//
+// Main -- process command line, read in and pre-process the test file,
+// call other functions to do the actual tests.
+//
+//----------------------------------------------------------------------------------------
+int main(int argc, const char** argv) {
+ if (ProcessOptions(argc, argv, opts) != TRUE || opt_help || opt_fName == 0) {
+ printf(gUsageString);
+ exit (1);
+ }
+ // Make sure that we've only got one API selected.
+ if (opt_mac || opt_unix || opt_win) opt_icu = FALSE;
+ if (opt_mac || opt_unix) opt_win = FALSE;
+ if (opt_mac) opt_unix = FALSE;
+
+ UErrorCode status = U_ZERO_ERROR;
+
+
+
+ //
+ // Set up a Windows LCID
+ //
+ /*
+ if (opt_langid != 0) {
+ gWinLCID = MAKELCID(opt_langid, SORT_DEFAULT);
+ }
+ else {
+ gWinLCID = uloc_getLCID(opt_locale);
+ }
+ */
+
+ //
+ // Set the UNIX locale
+ //
+ if (opt_unix) {
+ if (setlocale(LC_ALL, opt_locale) == 0) {
+ fprintf(stderr, "setlocale(LC_ALL, %s) failed.\n", opt_locale);
+ exit(-1);
+ }
+ }
+
+ // Read in the input file.
+ // File assumed to be utf-16.
+ // Lines go onto heap buffers. Global index array to line starts is created.
+ // Lines themselves are null terminated.
+ //
+
+ UCharFile f(opt_fName);
+ if (f.error()) {
+ exit(-1);
+ }
+ int32_t fileSize = f.size();
+ const int STARTSIZE = 70000;
+ int32_t bufSize = 0;
+ int32_t charCount = 0;
+ if(fileSize != -1) {
+ text = (UChar *)malloc(fileSize*sizeof(UChar));
+ bufSize = fileSize;
+ } else {
+ text = (UChar *)malloc(STARTSIZE*sizeof(UChar));
+ bufSize = STARTSIZE;
+ }
+ if(text == NULL) {
+ fprintf(stderr, "Allocating buffer failed\n");
+ exit(-1);
+ }
+
+
+ // Read the file, split into lines, and save in memory.
+ // Loop runs once per utf-16 value from the input file,
+ // (The number of bytes read from file per loop iteration depends on external encoding.)
+ for (;;) {
+
+ UChar c = f.get();
+ if(f.eof()) {
+ break;
+ }
+ if (f.error()){
+ exit(-1);
+ }
+ // We now have a good UTF-16 value in c.
+ text[charCount++] = c;
+ if(charCount == bufSize) {
+ text = (UChar *)realloc(text, 2*bufSize*sizeof(UChar));
+ if(text == NULL) {
+ fprintf(stderr, "Reallocating buffer failed\n");
+ exit(-1);
+ }
+ bufSize *= 2;
+ }
+ }
+
+
+ if (opt_terse == FALSE) {
+ printf("file \"%s\", %d charCount code units.\n", opt_fName, charCount);
+ }
+
+ textSize = charCount;
+
+
+
+
+ //
+ // Dump file contents if requested.
+ //
+ if (opt_dump) {
+ // dump file, etc... possibly
+ }
+
+
+ //
+ // We've got the file read into memory. Go do something with it.
+ //
+ int32_t i = 0;
+ for(i = 0; i < opt_passesCount; i++) {
+ if(opt_loopCount != 0) {
+ if(opt_next) {
+ doForwardTest();
+ } else if(opt_isBound) {
+ doIsBoundTest();
+ } else {
+ doForwardTest();
+ }
+ } else if(opt_time != 0) {
+
+ }
+ }
+
+ if(text != NULL) {
+ free(text);
+ }
+ if(brkit != NULL) {
+ delete brkit;
+ }
+
+ return 0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.dsp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.dsp
new file mode 100644
index 00000000000..2befc0aba27
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.dsp
@@ -0,0 +1,168 @@
+# Microsoft Developer Studio Project File - Name="ubrkperfold" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ubrkperfold - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "ubrkperfold.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "ubrkperfold.mak" CFG="ubrkperfold - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ubrkperfold - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperfold - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperfold - Win64 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperfold - Win64 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "ubrkperfold - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib\\"
+# Begin Custom Build
+InputPath=.\Release\ubrkperfold.exe
+SOURCE="$(InputPath)"
+
+"c:\dev\0_icu\bin\ubrkperf20.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ copy $(InputPath) c:\dev\0_icu\bin\ubrkperf20.exe
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "ubrkperfold - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\..\tools\ctestfw" /I "..\..\..\common" /I "..\..\..\i18n" /I "..\..\..\tools\toolutil" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\\"
+
+!ELSEIF "$(CFG)" == "ubrkperfold - Win64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /machine:IA64
+# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:IX86 /libpath:"..\..\..\lib\\" /machine:IA64
+
+!ELSEIF "$(CFG)" == "ubrkperfold - Win64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FR /FD /GZ /Wp64 /Zm600 /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /machine:IA64
+# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /libpath:"..\..\..\lib\\" /machine:IA64
+
+!ENDIF
+
+# Begin Target
+
+# Name "ubrkperfold - Win32 Release"
+# Name "ubrkperfold - Win32 Debug"
+# Name "ubrkperfold - Win64 Release"
+# Name "ubrkperfold - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\ubrkperfold.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/Makefile.in
new file mode 100644
index 00000000000..07c62d657da
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/Makefile.in
@@ -0,0 +1,78 @@
+## Makefile.in for ICU - test/perf/unisetperf
+## Copyright (c) 2001-2007, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/unisetperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = unisetperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = unisetperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/bitset.cpp b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/bitset.cpp
new file mode 100644
index 00000000000..487d0c0985f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/bitset.cpp
@@ -0,0 +1,197 @@
+/*
+**********************************************************************
+* Copyright (C) 2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: bitset.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2007jan15
+* created by: Markus Scherer
+*
+* Idea for a "compiled", fast, read-only (immutable) version of a UnicodeSet
+* using a folded bit set consisting of a 1k-entry index table and a
+* compacted array of 64-bit words.
+* Uses a simple hash table for compaction.
+* Uses the original set for supplementary code points.
+*/
+
+#include "unicode/utypes.h"
+#include "unicont.h"
+
+/*
+ * Hash table for up to 1k 64-bit words, for 1 bit per BMP code point.
+ * Hashes 64-bit words and maps them to 16-bit integers which are
+ * assigned in order of new incoming words for subsequent storage
+ * in a contiguous array.
+ */
+struct BMPBitHash : public UObject {
+ int64_t keys[0x800]; // 2k
+ uint16_t values[0x800];
+ uint16_t reverse[0x400];
+ uint16_t count;
+ const int32_t prime=1301; // Less than 2k.
+
+ BMPBitHash() : count(0) {
+ // Fill values[] with 0xffff.
+ uprv_memset(values, 0xff, sizeof(values));
+ }
+
+ /*
+ * Map a key to an integer count.
+ * Map at most 1k=0x400 different keys with this data structure.
+ */
+ uint16_t map(int64_t key) {
+ int32_t hash=(int32_t)(key>>55)&0x1ff;
+ hash^=(int32_t)(key>>44)&0x7ff;
+ hash^=(int32_t)(key>>33)&0x7ff;
+ hash^=(int32_t)(key>>22)&0x7ff;
+ hash^=(int32_t)(key>>11)&0x7ff;
+ hash^=(int32_t)key&0x7ff;
+ for(;;) {
+ if(values[hash]==0xffff) {
+ // Unused slot.
+ keys[hash]=key;
+ reverse[count]=hash;
+ return values[hash]=count++;
+ } else if(keys[hash]==key) {
+ // Found a slot with this key.
+ return values[hash];
+ } else {
+ // Used slot with a different key, move to another slot.
+ hash=(hash+prime)&0x7ff;
+ }
+ }
+ }
+
+ uint16_t countKeys() const { return count; }
+
+ /*
+ * Invert the hash map: Fill an array of length countKeys() with the keys
+ * indexed by their mapped values.
+ */
+ void invert(int64_t *k) const {
+ uint16_t i;
+
+ for(i=0; i<count; ++i) {
+ k[i]=keys[reverse[i]];
+ }
+ }
+};
+
+class BitSet : public UObject, public UnicodeContainable {
+public:
+ BitSet(const UnicodeSet &set, UErrorCode &errorCode) : bits(shortBits), restSet(set.clone()) {
+ if(U_FAILURE(errorCode)) {
+ return;
+ }
+ BMPBitHash *bitHash=new BMPBitHash;
+ if(bitHash==NULL || restSet==NULL) {
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+
+ UnicodeSetIterator iter(set);
+ int64_t b;
+ UChar32 start, end;
+ int32_t prevIndex, i, j;
+
+ b=0; // Not necessary but makes compilers happy.
+ prevIndex=-1;
+ for(;;) {
+ if(iter.nextRange() && !iter.isString()) {
+ start=iter.getCodepoint();
+ end=iter.getCodepointEnd();
+ } else {
+ start=0x10000;
+ }
+ i=start>>6;
+ if(prevIndex!=i) {
+ // Finish the end of the previous range.
+ if(prevIndex<0) {
+ prevIndex=0;
+ } else {
+ index[prevIndex++]=bitHash->map(b);
+ }
+ // Fill all-zero entries between ranges.
+ if(prevIndex<i) {
+ uint16_t zero=bitHash->map(0);
+ do {
+ index[prevIndex++]=zero;
+ } while(prevIndex<i);
+ }
+ b=0;
+ }
+ if(start>0xffff) {
+ break;
+ }
+ b|=~((INT64_C(1)<<(start&0x3f))-1);
+ j=end>>6;
+ if(i<j) {
+ // Set bits for the start of the range.
+ index[i++]=bitHash->map(b);
+ // Fill all-one entries inside the range.
+ if(i<j) {
+ uint16_t all=bitHash->map(INT64_C(0xffffffffffffffff));
+ do {
+ index[i++]=all;
+ } while(i<j);
+ }
+ b=INT64_C(0xffffffffffffffff);
+ }
+ /* i==j */
+ b&=(INT64_C(1)<<(end&0x3f))-1;
+ prevIndex=j;
+ }
+
+ if(bitHash->countKeys()>LENGTHOF(shortBits)) {
+ bits=(int64_t *)uprv_malloc(bitHash->countKeys()*8);
+ }
+ if(bits!=NULL) {
+ bitHash->invert(bits);
+ } else {
+ bits=shortBits;
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+
+ latin1Set[0]=(uint32_t)bits[0];
+ latin1Set[1]=(uint32_t)(bits[0]>>32);
+ latin1Set[2]=(uint32_t)bits[1];
+ latin1Set[3]=(uint32_t)(bits[1]>>32);
+ latin1Set[4]=(uint32_t)bits[2];
+ latin1Set[5]=(uint32_t)(bits[2]>>32);
+ latin1Set[6]=(uint32_t)bits[3];
+ latin1Set[7]=(uint32_t)(bits[3]>>32);
+
+ restSet.remove(0, 0xffff);
+ }
+
+ ~BitSet() {
+ if(bits!=shortBits) {
+ uprv_free(bits);
+ }
+ delete restSet;
+ }
+
+ UBool contains(UChar32 c) const {
+ if((uint32_t)c<=0xff) {
+ return (UBool)((latin1Set[c>>5]&((uint32_t)1<<(c&0x1f)))!=0);
+ } else if((uint32_t)c<0xffff) {
+ return (UBool)((bits[c>>6]&(INT64_C(1)<<(c&0x3f)))!=0);
+ } else {
+ return restSet->contains(c);
+ }
+ }
+
+private:
+ uint16_t index[0x400];
+ int64_t shortBits[32];
+ int64_t *bits;
+
+ uint32_t latin1Bits[8];
+
+ UnicodeSet *restSet;
+};
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.bat b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.bat
new file mode 100755
index 00000000000..9ba8ea4ee14
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.bat
@@ -0,0 +1,19 @@
+rem Copyright (c) 2007, International Business Machines Corporation and
+rem others. All Rights Reserved.
+
+set PERF=c:\svn\icuproj\icu\ucnvutf8\source\test\perf\unisetperf\release\unisetperf
+rem types: slow Bv Bv0 B0
+rem --pattern [:White_Space:]
+
+for %%f in (udhr_eng.txt
+ udhr_deu.txt
+ udhr_fra.txt
+ udhr_rus.txt
+ udhr_tha.txt
+ udhr_jpn.txt
+ udhr_cmn.txt
+ udhr_jpn.html) do (
+ for %%t in (slow Bv Bv0 B0) do (
+ %PERF% Contains --type %%t -f \temp\udhr\%%f --pattern [:White_Space:] -v -e UTF-8 --passes 3 --iterations 10000
+ )
+)
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.sh b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.sh
new file mode 100755
index 00000000000..027897ef2e0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (c) 2007, International Business Machines Corporation and
+# others. All Rights Reserved.
+
+# Echo shell script commands.
+set -ex
+
+PERF=test/perf/unisetperf/unisetperf
+# slow Bv Bv0 B0
+# --pattern [:White_Space:]
+
+for file in udhr_eng.txt \
+ udhr_deu.txt \
+ udhr_fra.txt \
+ udhr_rus.txt \
+ udhr_tha.txt \
+ udhr_jpn.txt \
+ udhr_cmn.txt \
+ udhr_jpn.html; do
+ for type in slow Bv Bv0; do
+ $PERF Contains --type $type -f ~/udhr/$file -v -e UTF-8 --passes 3 --iterations 10000
+ done
+done
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.bat b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.bat
new file mode 100755
index 00000000000..f67cdb26e69
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.bat
@@ -0,0 +1,19 @@
+rem Copyright (c) 2007, International Business Machines Corporation and
+rem others. All Rights Reserved.
+
+set PERF=c:\svn\icuproj\icu\ucnvutf8\source\test\perf\unisetperf\release\unisetperf
+rem types: slow Bv Bv0 B0
+rem --pattern [:White_Space:]
+
+for %%f in (udhr_eng.txt
+ udhr_deu.txt
+ udhr_fra.txt
+ udhr_rus.txt
+ udhr_tha.txt
+ udhr_jpn.txt
+ udhr_cmn.txt
+ udhr_jpn.html) do (
+ for %%t in (slow Bv Bv0) do (
+ %PERF% SpanUTF16 --type %%t -f \temp\udhr\%%f --pattern [:White_Space:] -v -e UTF-8 --passes 3 --iterations 10000
+ )
+)
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.sh b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.sh
new file mode 100755
index 00000000000..8a647e31858
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (c) 2007, International Business Machines Corporation and
+# others. All Rights Reserved.
+
+# Echo shell script commands.
+set -ex
+
+PERF=test/perf/unisetperf/unisetperf
+# slow Bv Bv0 B0
+# --pattern [:White_Space:]
+
+for file in udhr_eng.txt \
+ udhr_deu.txt \
+ udhr_fra.txt \
+ udhr_rus.txt \
+ udhr_tha.txt \
+ udhr_jpn.txt \
+ udhr_cmn.txt \
+ udhr_jpn.html; do
+ for type in slow Bv Bv0; do
+ $PERF SpanUTF16 --type $type -f ~/udhr/$file -v -e UTF-8 --passes 3 --iterations 10000
+ done
+done
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.bat b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.bat
new file mode 100755
index 00000000000..611eaf633b8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.bat
@@ -0,0 +1,19 @@
+rem Copyright (c) 2007, International Business Machines Corporation and
+rem others. All Rights Reserved.
+
+set PERF=c:\svn\icuproj\icu\ucnvutf8\source\test\perf\unisetperf\release\unisetperf
+rem types: slow Bh bh Bv Bv0 B0 BvF Bvp BvpF L Bvl BvL
+rem --pattern [:White_Space:]
+
+for %%f in (udhr_eng.txt
+ udhr_deu.txt
+ udhr_fra.txt
+ udhr_rus.txt
+ udhr_tha.txt
+ udhr_jpn.txt
+ udhr_cmn.txt
+ udhr_jpn.html) do (
+ for %%t in (slow BvF BvpF Bvl BvL) do (
+ %PERF% SpanUTF8 --type %%t -f \temp\udhr\%%f --pattern [:White_Space:] -v -e UTF-8 --passes 3 --iterations 10000
+ )
+)
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.sh b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.sh
new file mode 100755
index 00000000000..b508320c3ef
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (c) 2007, International Business Machines Corporation and
+# others. All Rights Reserved.
+
+# Echo shell script commands.
+set -ex
+
+PERF=test/perf/unisetperf/unisetperf
+# slow Bh bh Bv Bv0 B0 BvF Bvp BvpF L Bvl BvL
+# --pattern [:White_Space:]
+
+for file in udhr_eng.txt \
+ udhr_deu.txt \
+ udhr_fra.txt \
+ udhr_rus.txt \
+ udhr_tha.txt \
+ udhr_jpn.txt \
+ udhr_cmn.txt \
+ udhr_jpn.html; do
+ for type in slow BvF BvpF Bvl BvL; do
+ $PERF SpanUTF8 --type $type -f ~/udhr/$file -v -e UTF-8 --passes 3 --iterations 10000
+ done
+done
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/trieset.cpp b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/trieset.cpp
new file mode 100644
index 00000000000..6c4720888c9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/trieset.cpp
@@ -0,0 +1,111 @@
+/*
+**********************************************************************
+* Copyright (C) 2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: trieset.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2007jan15
+* created by: Markus Scherer
+*
+* Idea for a "compiled", fast, read-only (immutable) version of a UnicodeSet
+* using a UTrie with 8-bit (byte) results per code point.
+* Modifies the trie index to make the BMP linear, and uses the original set
+* for supplementary code points.
+*/
+
+#include "unicode/utypes.h"
+#include "unicont.h"
+
+#define UTRIE_GET8_LATIN1(trie) ((const uint8_t *)(trie)->data32+UTRIE_DATA_BLOCK_LENGTH)
+
+#define UTRIE_GET8_FROM_LEAD(trie, c16) \
+ ((const uint8_t *)(trie)->data32)[ \
+ ((int32_t)((trie)->index[(c16)>>UTRIE_SHIFT])<<UTRIE_INDEX_SHIFT)+ \
+ ((c16)&UTRIE_MASK) \
+ ]
+
+class TrieSet : public UObject, public UnicodeContainable {
+public:
+ TrieSet(const UnicodeSet &set, UErrorCode &errorCode)
+ : trieData(NULL), latin1(NULL), restSet(set.clone()) {
+ if(U_FAILURE(errorCode)) {
+ return;
+ }
+ if(restSet==NULL) {
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+
+ UNewTrie *newTrie=utrie_open(NULL, NULL, 0x11000, 0, 0, TRUE);
+ UChar32 start, end;
+
+ UnicodeSetIterator iter(set);
+
+ while(iter.nextRange() && !iter.isString()) {
+ start=iter.getCodepoint();
+ end=iter.getCodepointEnd();
+ if(start>0xffff) {
+ break;
+ }
+ if(end>0xffff) {
+ end=0xffff;
+ }
+ if(!utrie_setRange32(newTrie, start, end+1, TRUE, TRUE)) {
+ errorCode=U_INTERNAL_PROGRAM_ERROR;
+ return;
+ }
+ }
+
+ // Preflight the trie length.
+ int32_t length=utrie_serialize(newTrie, NULL, 0, NULL, 8, &errorCode);
+ if(errorCode!=U_BUFFER_OVERFLOW_ERROR) {
+ return;
+ }
+
+ trieData=(uint32_t *)uprv_malloc(length);
+ if(trieData==NULL) {
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+
+ errorCode=U_ZERO_ERROR;
+ utrie_serialize(newTrie, trieData, length, NULL, 8, &errorCode);
+ utrie_unserialize(&trie, trieData, length, &errorCode); // TODO: Implement for 8-bit UTrie!
+
+ if(U_SUCCESS(errorCode)) {
+ // Copy the indexes for surrogate code points into the BMP range
+ // for simple access across the entire BMP.
+ uprv_memcpy((uint16_t *)trie.index+(0xd800>>UTRIE_SHIFT),
+ trie.index+UTRIE_BMP_INDEX_LENGTH,
+ (0x800>>UTRIE_SHIFT)*2);
+ latin1=UTRIE_GET8_LATIN1(&trie);
+ }
+
+ restSet.remove(0, 0xffff);
+ }
+
+ ~TrieSet() {
+ uprv_free(trieData);
+ delete restSet;
+ }
+
+ UBool contains(UChar32 c) const {
+ if((uint32_t)c<=0xff) {
+ return (UBool)latin1[c];
+ } else if((uint32_t)c<0xffff) {
+ return (UBool)UTRIE_GET8_FROM_LEAD(&trie, c);
+ } else {
+ return restSet->contains(c);
+ }
+ }
+
+private:
+ uint32_t *trieData;
+ const uint8_t *latin1;
+ UTrie trie;
+ UnicodeSet *restSet;
+};
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/unicont.h b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/unicont.h
new file mode 100644
index 00000000000..2e8a64e8cd9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/unicont.h
@@ -0,0 +1,34 @@
+/*
+**********************************************************************
+* Copyright (C) 2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: unicont.h
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2007jan15
+* created by: Markus Scherer
+*
+* Idea for new common interface underneath the normal UnicodeSet
+* and other classes, such as "compiled", fast, read-only (immutable)
+* versions of UnicodeSet.
+*/
+
+class UnicodeContainable {
+public:
+ virtual ~UnicodeContainable() {}
+
+ virtual UBool contains(UChar32 c) const = 0;
+
+ virtual int32_t span(const UChar *s, int32_t length);
+
+ virtual int32_t spanNot(const UChar *s, int32_t length);
+
+ virtual int32_t spanUTF8(const UChar *s, int32_t length);
+
+ virtual int32_t spanNotUTF8(const UChar *s, int32_t length);
+
+ virtual UClassID getDynamicClassID(void) const;
+};
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.cpp
new file mode 100644
index 00000000000..36d61c1e193
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.cpp
@@ -0,0 +1,441 @@
+/*
+**********************************************************************
+* Copyright (C) 2007, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* file name: unisetperf.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2007jan31
+* created by: Markus Scherer
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "unicode/uperf.h"
+#include "unicode/uniset.h"
+#include "unicode/unistr.h"
+#include "uoptions.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+// Command-line options specific to unisetperf.
+// Options do not have abbreviations: Force readable command lines.
+// (Using U+0001 for abbreviation characters.)
+enum {
+ SET_PATTERN,
+ FAST_TYPE,
+ UNISETPERF_OPTIONS_COUNT
+};
+
+static UOption options[UNISETPERF_OPTIONS_COUNT]={
+ UOPTION_DEF("pattern", '\x01', UOPT_REQUIRES_ARG),
+ UOPTION_DEF("type", '\x01', UOPT_REQUIRES_ARG)
+};
+
+static const char *const unisetperf_usage =
+ "\t--pattern UnicodeSet pattern for instantiation.\n"
+ "\t Default: [:ID_Continue:]\n"
+ "\t--type Type of UnicodeSet: slow fast\n"
+ "\t Default: slow\n";
+
+// Test object with setup data.
+class UnicodeSetPerformanceTest : public UPerfTest {
+public:
+ UnicodeSetPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status)
+ : UPerfTest(argc, argv, options, LENGTHOF(options), unisetperf_usage, status),
+ utf8(NULL), utf8Length(0), countInputCodePoints(0), spanCount(0) {
+ if (U_SUCCESS(status)) {
+ UnicodeString pattern=UnicodeString(options[SET_PATTERN].value, -1, US_INV).unescape();
+ set.applyPattern(pattern, status);
+ prefrozen=set;
+ if(0==strcmp(options[FAST_TYPE].value, "fast")) {
+ set.freeze();
+ }
+
+ int32_t inputLength;
+ UPerfTest::getBuffer(inputLength, status);
+ if(U_SUCCESS(status) && inputLength>0) {
+ countInputCodePoints = u_countChar32(buffer, bufferLen);
+
+ countSpans();
+
+ // Preflight the UTF-8 length and allocate utf8.
+ u_strToUTF8(NULL, 0, &utf8Length, buffer, bufferLen, &status);
+ if(status==U_BUFFER_OVERFLOW_ERROR) {
+ utf8=(char *)malloc(utf8Length);
+ if(utf8!=NULL) {
+ status=U_ZERO_ERROR;
+ u_strToUTF8(utf8, utf8Length, NULL, buffer, bufferLen, &status);
+ } else {
+ status=U_MEMORY_ALLOCATION_ERROR;
+ }
+ }
+
+ if(verbose) {
+ printf("code points:%ld len16:%ld len8:%ld spans:%ld "
+ "cp/span:%.3g UChar/span:%.3g B/span:%.3g B/cp:%.3g\n",
+ (long)countInputCodePoints, (long)bufferLen, (long)utf8Length, (long)spanCount,
+ (double)countInputCodePoints/spanCount, (double)bufferLen/spanCount, (double)utf8Length/spanCount,
+ (double)utf8Length/countInputCodePoints);
+ }
+ }
+ }
+ }
+
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+
+ // Count spans of characters that are in the set,
+ // and spans of characters that are not in the set.
+ // If the very first character is in the set, then one additional
+ // not-span is counted.
+ void countSpans() {
+ const UChar *s=getBuffer();
+ int32_t length=getBufferLen();
+ int32_t i=0;
+ UBool tf=FALSE;
+ while(i<length) {
+ i=span(s, length, i, tf);
+ tf=(UBool)(!tf);
+ ++spanCount;
+ }
+ }
+ int32_t span(const UChar *s, int32_t length, int32_t start, UBool tf) const {
+ UChar32 c;
+ int32_t prev;
+ while((prev=start)<length) {
+ U16_NEXT(s, start, length, c);
+ if(tf!=set.contains(c)) {
+ break;
+ }
+ }
+ return prev;
+ }
+
+ const UChar *getBuffer() const { return buffer; }
+ int32_t getBufferLen() const { return bufferLen; }
+
+ char *utf8;
+ int32_t utf8Length;
+
+ // Number of code points in the input text.
+ int32_t countInputCodePoints;
+ int32_t spanCount;
+
+ UnicodeSet set;
+ UnicodeSet prefrozen;
+};
+
+// Performance test function object.
+class Command : public UPerfFunction {
+protected:
+ Command(const UnicodeSetPerformanceTest &testcase) : testcase(testcase) {}
+
+public:
+ virtual ~Command() {}
+
+ // virtual void call(UErrorCode* pErrorCode) { ... }
+
+ virtual long getOperationsPerIteration() {
+ // Number of code points tested:
+ // Input code points, plus one for the end of each span except the last span.
+ return testcase.countInputCodePoints+testcase.spanCount-1;
+ }
+
+ virtual long getEventsPerIteration() {
+ return testcase.spanCount;
+ }
+
+ const UnicodeSetPerformanceTest &testcase;
+};
+
+class Contains : public Command {
+protected:
+ Contains(const UnicodeSetPerformanceTest &testcase) : Command(testcase) {
+ // Verify that the frozen set is equal to the unfrozen one.
+ UnicodeSet set;
+ UChar32 c;
+
+ for(c=0; c<=0x10ffff; ++c) {
+ if(testcase.set.contains(c)) {
+ set.add(c);
+ }
+ }
+ if(set!=testcase.set) {
+ fprintf(stderr, "error: frozen set != original!\n");
+ }
+ }
+public:
+ static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) {
+ return new Contains(testcase);
+ }
+ virtual void call(UErrorCode* pErrorCode) {
+ const UnicodeSet &set=testcase.set;
+ const UChar *s=testcase.getBuffer();
+ int32_t length=testcase.getBufferLen();
+ int32_t count=0;
+ int32_t i=0;
+ UBool tf=FALSE;
+ while(i<length) {
+ i+=span(set, s+i, length-i, tf);
+ tf=(UBool)(!tf);
+ ++count;
+ }
+ if(count!=testcase.spanCount) {
+ fprintf(stderr, "error: Contains() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n",
+ (long)count, (long)testcase.spanCount);
+ }
+ }
+ static int32_t span(const UnicodeSet &set, const UChar *s, int32_t length, UBool tf) {
+ UChar32 c;
+ int32_t start=0, prev;
+ while((prev=start)<length) {
+ U16_NEXT(s, start, length, c);
+ if(tf!=set.contains(c)) {
+ break;
+ }
+ }
+ return prev;
+ }
+};
+
+class SpanUTF16 : public Command {
+protected:
+ SpanUTF16(const UnicodeSetPerformanceTest &testcase) : Command(testcase) {
+ // Verify that the frozen set is equal to the unfrozen one.
+ UnicodeSet set;
+ UChar utf16[2];
+ UChar32 c, c2;
+
+ for(c=0; c<=0xffff; ++c) {
+ utf16[0]=(UChar)c;
+ if(testcase.set.span(utf16, 1, USET_SPAN_CONTAINED)>0) {
+ set.add(c);
+ }
+ }
+ for(c=0xd800; c<=0xdbff; ++c) {
+ utf16[0]=(UChar)c;
+ for(c2=0xdc00; c2<=0xdfff; ++c2) {
+ utf16[1]=(UChar)c2;
+ if(testcase.set.span(utf16, 2, USET_SPAN_CONTAINED)>0) {
+ set.add(U16_GET_SUPPLEMENTARY(c, c2));
+ }
+ }
+ }
+
+ if(set!=testcase.set) {
+ fprintf(stderr, "error: frozen set != original!\n");
+ }
+ }
+public:
+ static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) {
+ return new SpanUTF16(testcase);
+ }
+ virtual void call(UErrorCode* pErrorCode) {
+ const UnicodeSet &set=testcase.set;
+ const UChar *s=testcase.getBuffer();
+ int32_t length=testcase.getBufferLen();
+ int32_t count=0;
+ int32_t i=0;
+ UBool tf=FALSE;
+ while(i<length) {
+ i+=set.span(s+i, length-i, (USetSpanCondition)tf);
+ tf=(UBool)(!tf);
+ ++count;
+ }
+ if(count!=testcase.spanCount) {
+ fprintf(stderr, "error: SpanUTF16() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n",
+ (long)count, (long)testcase.spanCount);
+ }
+ }
+};
+
+class SpanBackUTF16 : public Command {
+protected:
+ SpanBackUTF16(const UnicodeSetPerformanceTest &testcase) : Command(testcase) {
+ // Verify that the frozen set is equal to the unfrozen one.
+ UnicodeSet set;
+ UChar utf16[2];
+ UChar32 c, c2;
+
+ for(c=0; c<=0xffff; ++c) {
+ utf16[0]=(UChar)c;
+ if(testcase.set.spanBack(utf16, 1, USET_SPAN_CONTAINED)==0) {
+ set.add(c);
+ }
+ }
+ for(c=0xd800; c<=0xdbff; ++c) {
+ utf16[0]=(UChar)c;
+ for(c2=0xdc00; c2<=0xdfff; ++c2) {
+ utf16[1]=(UChar)c2;
+ if(testcase.set.spanBack(utf16, 2, USET_SPAN_CONTAINED)==0) {
+ set.add(U16_GET_SUPPLEMENTARY(c, c2));
+ }
+ }
+ }
+
+ if(set!=testcase.set) {
+ fprintf(stderr, "error: frozen set != original!\n");
+ }
+ }
+public:
+ static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) {
+ return new SpanBackUTF16(testcase);
+ }
+ virtual void call(UErrorCode* pErrorCode) {
+ const UnicodeSet &set=testcase.set;
+ const UChar *s=testcase.getBuffer();
+ int32_t length=testcase.getBufferLen();
+ int32_t count=0;
+ /*
+ * Get the same spans as with span() where we always start with a not-contained span.
+ * If testcase.spanCount is an odd number, then the last span() was not-contained.
+ * The last spanBack() must be not-contained to match the first span().
+ */
+ UBool tf=(UBool)((testcase.spanCount&1)==0);
+ while(length>0 || !tf) {
+ length=set.spanBack(s, length, (USetSpanCondition)tf);
+ tf=(UBool)(!tf);
+ ++count;
+ }
+ if(count!=testcase.spanCount) {
+ fprintf(stderr, "error: SpanBackUTF16() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n",
+ (long)count, (long)testcase.spanCount);
+ }
+ }
+};
+
+class SpanUTF8 : public Command {
+protected:
+ SpanUTF8(const UnicodeSetPerformanceTest &testcase) : Command(testcase) {
+ // Verify that the frozen set is equal to the unfrozen one.
+ UnicodeSet set;
+ char utf8[4];
+ UChar32 c;
+ int32_t length;
+
+ for(c=0; c<=0x10ffff; ++c) {
+ if(c==0xd800) {
+ c=0xe000;
+ }
+ length=0;
+ U8_APPEND_UNSAFE(utf8, length, c);
+ if(testcase.set.spanUTF8(utf8, length, USET_SPAN_CONTAINED)>0) {
+ set.add(c);
+ }
+ }
+ if(set!=testcase.set) {
+ fprintf(stderr, "error: frozen set != original!\n");
+ }
+ }
+public:
+ static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) {
+ return new SpanUTF8(testcase);
+ }
+ virtual void call(UErrorCode* pErrorCode) {
+ const UnicodeSet &set=testcase.set;
+ const char *s=testcase.utf8;
+ int32_t length=testcase.utf8Length;
+ int32_t count=0;
+ int32_t i=0;
+ UBool tf=FALSE;
+ while(i<length) {
+ i+=set.spanUTF8(s+i, length-i, (USetSpanCondition)tf);
+ tf=(UBool)(!tf);
+ ++count;
+ }
+ if(count!=testcase.spanCount) {
+ fprintf(stderr, "error: SpanUTF8() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n",
+ (long)count, (long)testcase.spanCount);
+ }
+ }
+};
+
+class SpanBackUTF8 : public Command {
+protected:
+ SpanBackUTF8(const UnicodeSetPerformanceTest &testcase) : Command(testcase) {
+ // Verify that the frozen set is equal to the unfrozen one.
+ UnicodeSet set;
+ char utf8[4];
+ UChar32 c;
+ int32_t length;
+
+ for(c=0; c<=0x10ffff; ++c) {
+ if(c==0xd800) {
+ c=0xe000;
+ }
+ length=0;
+ U8_APPEND_UNSAFE(utf8, length, c);
+ if(testcase.set.spanBackUTF8(utf8, length, USET_SPAN_CONTAINED)==0) {
+ set.add(c);
+ }
+ }
+ if(set!=testcase.set) {
+ fprintf(stderr, "error: frozen set != original!\n");
+ }
+ }
+public:
+ static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) {
+ return new SpanBackUTF8(testcase);
+ }
+ virtual void call(UErrorCode* pErrorCode) {
+ const UnicodeSet &set=testcase.set;
+ const char *s=testcase.utf8;
+ int32_t length=testcase.utf8Length;
+ int32_t count=0;
+ /*
+ * Get the same spans as with span() where we always start with a not-contained span.
+ * If testcase.spanCount is an odd number, then the last span() was not-contained.
+ * The last spanBack() must be not-contained to match the first span().
+ */
+ UBool tf=(UBool)((testcase.spanCount&1)==0);
+ while(length>0 || !tf) {
+ length=set.spanBackUTF8(s, length, (USetSpanCondition)tf);
+ tf=(UBool)(!tf);
+ ++count;
+ }
+ if(count!=testcase.spanCount) {
+ fprintf(stderr, "error: SpanBackUTF8() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n",
+ (long)count, (long)testcase.spanCount);
+ }
+ }
+};
+
+UPerfFunction* UnicodeSetPerformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) {
+ switch (index) {
+ case 0: name = "Contains"; if (exec) return Contains::get(*this); break;
+ case 1: name = "SpanUTF16"; if (exec) return SpanUTF16::get(*this); break;
+ case 2: name = "SpanBackUTF16";if (exec) return SpanBackUTF16::get(*this); break;
+ case 3: name = "SpanUTF8"; if (exec) return SpanUTF8::get(*this); break;
+ case 4: name = "SpanBackUTF8"; if (exec) return SpanBackUTF8::get(*this); break;
+ default: name = ""; break;
+ }
+ return NULL;
+}
+
+int main(int argc, const char *argv[])
+{
+ // Default values for command-line options.
+ options[SET_PATTERN].value = "[:ID_Continue:]";
+ options[FAST_TYPE].value = "slow";
+
+ UErrorCode status = U_ZERO_ERROR;
+ UnicodeSetPerformanceTest test(argc, argv, status);
+
+ if (U_FAILURE(status)){
+ printf("The error is %s\n", u_errorName(status));
+ test.usage();
+ return status;
+ }
+
+ if (test.run() == FALSE){
+ fprintf(stderr, "FAILED: Tests could not be run, please check the "
+ "arguments.\n");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.pl b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.pl
new file mode 100755
index 00000000000..18f83b8e070
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.pl
@@ -0,0 +1,76 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2005-2007, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+use lib '../perldriver';
+use PerfFramework;
+
+my $options = {
+ "title"=>"UnicodeSet span()/contains() performance",
+ "headers"=>"Bv Bv0",
+ "operationIs"=>"tested Unicode code point",
+ "passes"=>"3",
+ "time"=>"2",
+ #"outputType"=>"HTML",
+ "dataDir"=>"/temp/udhr",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "Release/unisetperf.exe -e UTF-8";
+my $pc = "$p Contains";
+my $p16 = "$p SpanUTF16";
+my $p8 = "$p SpanUTF8";
+
+my $tests = {
+ "Contains", ["$pc --type Bv",
+ "$pc --type Bv0"
+ ],
+ "SpanUTF16", ["$p16 --type Bv",
+ "$p16 --type Bv0"
+ ]
+ };
+
+my $dataFiles = {
+ "",
+ [
+ "udhr_eng.txt",
+ "udhr_deu.txt",
+ "udhr_fra.txt",
+ "udhr_rus.txt",
+ "udhr_tha.txt",
+ "udhr_jpn.txt",
+ "udhr_cmn.txt",
+ "udhr_jpn.html"
+ ]
+ };
+
+runTests($options, $tests, $dataFiles);
+
+$options = {
+ "title"=>"UnicodeSet span()/contains() performance",
+ "headers"=>"Bv BvF Bvp BvpF L Bvl",
+ "operationIs"=>"tested Unicode code point",
+ "passes"=>"3",
+ "time"=>"2",
+ #"outputType"=>"HTML",
+ "dataDir"=>"/temp/udhr",
+ "outputDir"=>"../results"
+ };
+
+$tests = {
+ "SpanUTF8", ["$p8 --type Bv",
+ "$p8 --type BvF",
+ "$p8 --type Bvp",
+ "$p8 --type BvpF",
+ "$p8 --type L",
+ "$p8 --type Bvl"
+ ]
+ };
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.vcproj
new file mode 100644
index 00000000000..4a281ef978e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.vcproj
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="unisetperf"
+ ProjectGUID="{E7728E98-0469-AF37-43F4-4529A3D52C6B}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/unisetperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/unisetperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib"
+ OutputFile=".\Debug/unisetperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/unisetperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/unisetperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/unisetperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib"
+ OutputFile=".\Release/unisetperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ ProgramDatabaseFile=".\Release/unisetperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\unisetperf.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/Makefile.in
new file mode 100644
index 00000000000..3e737304748
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/usetperf
+## Copyright (c) 2001-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/usetperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = usetperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = usetperf.o bitset.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/UsetPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/UsetPerf.pl
new file mode 100755
index 00000000000..8c493806e20
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/UsetPerf.pl
@@ -0,0 +1,45 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2005, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+
+my $options = {
+ "title"=>"Uset performance: ICU",
+ "headers"=>"ICU",
+ "operationIs"=>"unicode string",
+ "passes"=>"1",
+ "time"=>"2",
+ #"outputType"=>"HTML",
+ "dataDir"=>"../data",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "debug/usetperf.exe ";
+
+my $tests = {
+ "titlecase_letter/add", ["$p titlecase_letter_add"],
+ "titlecase_letter/contains", ["$p titlecase_letter_contains"],
+ "titlecase_letter/iterator", ["$p titlecase_letter_iterator"],
+ "unassigned/add", ["$p unassigned_add"],
+ "unassigned/contains", ["$p unassigned_contains"],
+ "unassigned/iterator", ["$p unassigned_iterator"],
+ "pattern1", ["$p pattern1"],
+ "pattern2", ["$p pattern2"],
+ "pattern3", ["$p pattern3"],
+ };
+
+my $dataFiles = {
+ };
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.cpp b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.cpp
new file mode 100644
index 00000000000..ea5f11b8b2f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.cpp
@@ -0,0 +1,63 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* 2002-09-20 aliu Created.
+*/
+
+#include "unicode/utypes.h"
+#include "cmemory.h"
+#include "bitset.h"
+
+// TODO: have a separate capacity, so the len can just be set to
+// zero in the clearAll() method, and growth can be smarter.
+
+const int32_t SLOP = 8;
+
+const int32_t BYTES_PER_WORD = sizeof(int32_t);
+
+BitSet::BitSet() {
+ len = SLOP;
+ data = (int32_t*) uprv_malloc(len * BYTES_PER_WORD);
+ clearAll();
+}
+
+BitSet::~BitSet() {
+ uprv_free(data);
+}
+
+UBool BitSet::get(int32_t bitIndex) const {
+ uint32_t longIndex = bitIndex >> 5;
+ int32_t bitInLong = bitIndex & 0x1F;
+ return (longIndex < len) ? (((data[longIndex] >> bitInLong) & 1) != 0)
+ : FALSE;
+}
+
+void BitSet::set(int32_t bitIndex) {
+ uint32_t longIndex = bitIndex >> 5;
+ int32_t bitInLong = bitIndex & 0x1F;
+ if (longIndex >= len) {
+ ensureCapacity(longIndex+1);
+ }
+ data[longIndex] |= (1 << bitInLong);
+}
+
+void BitSet::clearAll() {
+ for (uint32_t i=0; i<len; ++i) data[i] = 0;
+}
+
+void BitSet::ensureCapacity(uint32_t minLen) {
+ uint32_t newLen = len;
+ while (newLen < minLen) newLen <<= 1; // grow exponentially
+ int32_t* newData = (int32_t*) uprv_malloc(newLen * BYTES_PER_WORD);
+ uprv_memcpy(newData, data, len * BYTES_PER_WORD);
+ uprv_free(data);
+ data = newData;
+ int32_t* p = data + len;
+ int32_t* limit = data + newLen;
+ while (p < limit) *p++ = 0;
+ len = newLen;
+}
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.h b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.h
new file mode 100644
index 00000000000..3148b1d7070
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.h
@@ -0,0 +1,38 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* 2002-09-20 aliu Created.
+*/
+#ifndef __BITSET_H__
+#define __BITSET_H__
+
+#include "unicode/utypes.h"
+
+/**
+ * A simple, limited clone of the java.util.BitSet.
+ */
+class BitSet {
+
+ uint32_t len;
+ int32_t* data;
+
+ void ensureCapacity(uint32_t minLen);
+
+public:
+
+ BitSet();
+ ~BitSet();
+
+ UBool get(int32_t bitIndex) const;
+
+ void set(int32_t bitIndex);
+
+ // Non-java
+ void clearAll();
+
+ // TODO add other methods as needed.
+};
+
+#endif
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.cpp
new file mode 100644
index 00000000000..c75406a1ec4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.cpp
@@ -0,0 +1,143 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2005, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+* 2005Nov22 Raymond Yang
+*
+* migrate old test created by aliu to perf test framework.
+*/
+
+#include <stdio.h>
+
+#include "unicode/utypes.h"
+#include "unicode/uniset.h"
+#include "unicode/uchar.h"
+#include "unicode/usetiter.h"
+#include "bitset.h"
+#include "unicode/uperf.h"
+
+static const char* PAT[] = {
+ "['A-Za-z\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E1\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u01FB\\u0200-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u212A-\\u212B]",
+
+ "['.0-9A-Za-z~\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u0301\\u0303-\\u0304\\u0306-\\u0307\\u0310\\u0314-\\u0315\\u0323\\u0325\\u0331\\u0341\\u0344\\u0385-\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u0390\\u03AC-\\u03B0\\u03CC-\\u03CE\\u03D3\\u0403\\u040C\\u040E\\u0419\\u0439\\u0453\\u045C\\u045E\\u04C1-\\u04C2\\u04D0-\\u04D1\\u04D6-\\u04D7\\u04E2-\\u04E3\\u04EE-\\u04EF\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u1F01\\u1F03-\\u1F05\\u1F07\\u1F09\\u1F0B-\\u1F0D\\u1F0F\\u1F11\\u1F13-\\u1F15\\u1F19\\u1F1B-\\u1F1D\\u1F21\\u1F23-\\u1F25\\u1F27\\u1F29\\u1F2B-\\u1F2D\\u1F2F\\u1F31\\u1F33-\\u1F35\\u1F37\\u1F39\\u1F3B-\\u1F3D\\u1F3F\\u1F41\\u1F43-\\u1F45\\u1F49\\u1F4B-\\u1F4D\\u1F51\\u1F53-\\u1F55\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F61\\u1F63-\\u1F65\\u1F67\\u1F69\\u1F6B-\\u1F6D\\u1F6F\\u1F71\\u1F73\\u1F75\\u1F77\\u1F79\\u1F7B\\u1F7D\\u1F81\\u1F83-\\u1F85\\u1F87\\u1F89\\u1F8B-\\u1F8D\\u1F8F\\u1F91\\u1F93-\\u1F95\\u1F97\\u1F99\\u1F9B-\\u1F9D\\u1F9F\\u1FA1\\u1FA3-\\u1FA5\\u1FA7\\u1FA9\\u1FAB-\\u1FAD\\u1FAF-\\u1FB1\\u1FB4\\u1FB8-\\u1FB9\\u1FBB\\u1FC4\\u1FC9\\u1FCB\\u1FCE\\u1FD0-\\u1FD1\\u1FD3\\u1FD8-\\u1FD9\\u1FDB\\u1FDE\\u1FE0-\\u1FE1\\u1FE3\\u1FE5\\u1FE8-\\u1FE9\\u1FEB-\\u1FEC\\u1FEE\\u1FF4\\u1FF9\\u1FFB\\u212A-\\u212B\\uE04D\\uE064]",
+
+ "[\\u0901-\\u0903\\u0905-\\u0939\\u093C-\\u094D\\u0950-\\u0954\\u0958-\\u096F]",
+};
+
+class CmdPattern : public UPerfFunction {
+private:
+ UnicodeString pat;
+ UnicodeSet set;
+public:
+ CmdPattern(const char * pattern):pat(pattern,""){
+ }
+ virtual long getOperationsPerIteration(){
+ return 1;
+ }
+ virtual void call(UErrorCode* pErrorCode){
+ set.applyPattern(pat, *pErrorCode);
+ }
+};
+
+class CmdOp : public UPerfFunction {
+private:
+ UnicodeSet us;
+ BitSet bs;
+ int32_t total;
+ void (CmdOp::*op) ();
+public:
+ CmdOp(UCharCategory prop, void (CmdOp::*op)()):op(op){
+ total = 0;
+ bs.clearAll();
+ for (UChar32 cp=0; cp<0x110000; ++cp) {
+ if (u_charType(cp) == prop) {
+ bs.set((int32_t) cp);
+ ++total;
+ }
+ }
+ }
+ virtual long getOperationsPerIteration(){
+ return total;
+ }
+
+ virtual void call(UErrorCode* pErrorCode){
+ (this->*op)();
+ }
+ void add (void){
+ us.clear();
+ for (UChar32 cp=0; cp<0x110000; ++cp) {
+ if (bs.get((int32_t) cp)) {
+ us.add(cp);
+ }
+ }
+ }
+
+ void contains(void){
+ int32_t temp = 0;
+ us.clear();
+ for (UChar32 cp=0; cp<0x110000; ++cp) {
+ if (us.contains(cp)) {
+ temp += cp;
+ }
+ }
+ }
+
+ void iterator(void){
+ int32_t temp = 0;
+ UnicodeSetIterator uit(us);
+ while (uit.next()) {
+ temp += uit.getCodepoint();
+ }
+ }
+};
+
+class UsetPerformanceTest : public UPerfTest{
+public:
+ UsetPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status) :UPerfTest(argc,argv,status){
+ }
+
+ virtual UPerfFunction* runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ){
+ switch (index) {
+ case 0: name = "titlecase_letter_add";
+ if (exec) return new CmdOp(U_TITLECASE_LETTER, &CmdOp::add) ; break;
+ case 1: name = "titlecase_letter_contains";
+ if (exec) return new CmdOp(U_TITLECASE_LETTER, &CmdOp::contains) ; break;
+ case 2: name = "titlecase_letter_iterator";
+ if (exec) return new CmdOp(U_TITLECASE_LETTER, &CmdOp::iterator) ; break;
+ case 3: name = "unassigned_add";
+ if (exec) return new CmdOp(U_UNASSIGNED, &CmdOp::add) ; break;
+ case 4: name = "unassigned_contains";
+ if (exec) return new CmdOp(U_UNASSIGNED, &CmdOp::contains) ; break;
+ case 5: name = "unassigned_iterator";
+ if (exec) return new CmdOp(U_UNASSIGNED, &CmdOp::iterator) ; break;
+ case 6: name = "pattern1";
+ if (exec) return new CmdPattern(PAT[0]) ; break;
+ case 7: name = "pattern2";
+ if (exec) return new CmdPattern(PAT[1]) ; break;
+ case 8: name = "pattern3";
+ if (exec) return new CmdPattern(PAT[2]) ; break;
+ default: name = ""; break;
+ }
+ return NULL;
+ }
+};
+
+
+int main(int argc, const char *argv[])
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UsetPerformanceTest test(argc, argv, status);
+
+ if (U_FAILURE(status)){
+ printf("The error is %s\n", u_errorName(status));
+ return status;
+ }
+
+ if (test.run() == FALSE){
+ fprintf(stderr, "FAILED: Tests could not be run please check the "
+ "arguments.\n");
+ return -1;
+ }
+ return 0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.vcproj
new file mode 100644
index 00000000000..c128b0487bc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.vcproj
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="usetperf"
+ ProjectGUID="{EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/usetperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/usetperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib winmm.lib icutest.lib"
+ OutputFile=".\Release/usetperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib"
+ ProgramDatabaseFile=".\Release/usetperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/usetperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/usetperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib"
+ OutputFile=".\Debug/usetperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/usetperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="bitset.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories="..\..\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\common"
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="usetperf.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories="..\..\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\common"
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\bitset.h"
+ >
+ </File>
+ <File
+ RelativePath=".\timer.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/Makefile.in
new file mode 100644
index 00000000000..08bf330d82d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/ustrperf
+## Copyright (c) 2001-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/ustrperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = ustrperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = stringperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf.pl
new file mode 100755
index 00000000000..02cde457e0f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf.pl
@@ -0,0 +1,68 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2003-2004, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"Unicode String performance: ICU vs. STDLib",
+ "headers"=>"StdLib ICU",
+ "operationIs"=>"Unicode String",
+ "timePerOperationIs"=>"Time per Unicode String",
+ "passes"=>"5",
+ "time"=>"2",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"../results"
+ };
+
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "stringperf.exe -l -u";
+
+my $tests = {
+"Object Construction(empty string)", ["$p TestStdLibCtor" , "$p TestCtor" ],
+"Object Construction(single char)", ["$p TestStdLibCtor1" , "$p TestCtor1" ],
+"Object Construction(another string)", ["$p TestStdLibCtor2" , "$p TestCtor2" ],
+"Object Construction(string literal)", ["$p TestStdLibCtor3" , "$p TestCtor3" ],
+"String Assignment(helper)", ["$p TestStdLibAssign" , "$p TestAssign" ],
+"String Assignment(string literal)", ["$p TestStdLibAssign1" , "$p TestAssign1" ],
+"String Assignment(another string)", ["$p TestStdLibAssign2" , "$p TestAssign2" ],
+"Get String or Character", ["$p TestStdLibGetch" , "$p TestGetch" ],
+"Concatenation", ["$p TestStdLibCatenate" , "$p TestCatenate" ],
+"String Scanning(char)", ["$p TestStdLibScan" , "$p TestScan" ],
+"String Scanning(string)", ["$p TestStdLibScan1" , "$p TestScan1" ],
+"String Scanning(char set)", ["$p TestStdLibScan2" , "$p TestScan2" ],
+};
+
+my $dataFiles = {
+ "",
+ [
+ "TestNames_Asian.txt",
+ "TestNames_Chinese.txt",
+ "TestNames_Simplified_Chinese.txt",
+ "TestNames_Japanese_h.txt",
+ "TestNames_Japanese_k.txt",
+ "TestNames_Korean.txt",
+ "TestNames_Latin.txt",
+ "TestNames_SerbianSH.txt",
+ "TestNames_SerbianSR.txt",
+ "TestNames_Thai.txt",
+ "Testnames_Russian.txt",
+ "th18057.txt",
+ ]
+ };
+
+runTests($options, $tests, $dataFiles);
+
+# The whole command line would be something like:
+# stringperf.exe -p 5 -t 2 -f c:/src/data/perf/TestNames_Asian.txt -l -u TestStdLibCatenate \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf_r.pl
new file mode 100644
index 00000000000..4a1ffa86420
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf_r.pl
@@ -0,0 +1,70 @@
+#!/usr/bin/perl
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2002-2007, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+#Assume we are running outside of the ICU source
+use lib './ICU-3.0/ICU/source/test/perf/perldriver';
+
+use PerfFramework;
+
+my $options = {
+ "title"=>"Unicode String performance regression (ICU 2.8 and 3.0)",
+ "headers"=>"ICU28 ICU30",
+ "operationIs"=>"Unicode String",
+ "passes"=>"10",
+ "time"=>"5",
+ #"outputType"=>"HTML",
+ "dataDir"=>"c:/src/perf/data",
+ "outputDir"=>"results_ICU4C"
+ };
+
+# programs
+
+my $p1 = "icu-2.8/icu/bin/stringperf28.exe -b -u";
+my $p2 = "icu-3.0/icu/bin/stringperf30.exe -b -u";
+
+my $dataFiles = {
+ "",
+ [
+ "TestNames_Asian.txt",
+ "TestNames_Chinese.txt",
+ "TestNames_Japanese.txt",
+ "TestNames_Japanese_h.txt",
+ "TestNames_Japanese_k.txt",
+ "TestNames_Korean.txt",
+ "TestNames_Latin.txt",
+ "TestNames_SerbianSH.txt",
+ "TestNames_SerbianSR.txt",
+ "TestNames_Thai.txt",
+ "Testnames_Russian.txt",
+# "th18057.txt",
+# "thesis.txt",
+# "vfear11a.txt",
+ ]
+ };
+
+
+my $tests = {
+"Object Construction(empty string)", ["$p1 TestCtor" , "$p2 TestCtor" ],
+"Object Construction(single char)", ["$p1 TestCtor1" , "$p2 TestCtor1" ],
+"Object Construction(another string)", ["$p1 TestCtor2" , "$p2 TestCtor2" ],
+"Object Construction(string literal)", ["$p1 TestCtor3" , "$p2 TestCtor3" ],
+"String Assignment(helper)", ["$p1 TestAssign" , "$p2 TestAssign" ],
+"String Assignment(string literal)", ["$p1 TestAssign1" , "$p2 TestAssign1" ],
+"String Assignment(another string)", ["$p1 TestAssign2" , "$p2 TestAssign2" ],
+"Get String or Character", ["$p1 TestGetch" , "$p2 TestGetch" ],
+"Concatenation", ["$p1 TestCatenate" , "$p2 TestCatenate" ],
+"String Scanning(char)", ["$p1 TestScan" , "$p2 TestScan" ],
+"String Scanning(string)", ["$p1 TestScan1" , "$p2 TestScan1" ],
+"String Scanning(char set)", ["$p1 TestScan2" , "$p2 TestScan2" ],
+};
+
+
+runTests($options, $tests, $dataFiles);
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.cpp
new file mode 100644
index 00000000000..342e060aa8c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.cpp
@@ -0,0 +1,377 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (C) 2002-2006 International Business Machines Corporation
+ * and others. All Rights Reserved.
+ *
+ ********************************************************************/
+/*****************************************************************************
+* File stringperf.cpp
+*
+* Modification History:
+* Name Description
+* Doug Wang Second version
+* Doug Wang First Version
+******************************************************************************
+*/
+
+/**
+ * This program tests UnicodeString performance.
+ * APIs tested: UnicodeString
+ * ICU4C
+ * Windows 2000/XP, Linux
+ */
+
+#include "stringperf.h"
+
+
+int main(int argc, const char *argv[])
+{
+ UErrorCode status = U_ZERO_ERROR;
+
+ bCatenatePrealloc=TRUE;
+
+ StringPerformanceTest test(argc, argv, status);
+ if (U_FAILURE(status)){
+ return status;
+ }
+
+ int loops = LOOPS;
+ if (bCatenatePrealloc) {
+ int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN);
+ catICU = new UnicodeString(to_alloc,'a',0);
+ //catICU = new UnicodeString();
+
+ catStd = new stlstring();
+ catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN));
+ //catStd -> reserve(110000000);
+ } else {
+ catICU = new UnicodeString();
+ catStd = new stlstring();
+ }
+
+ if (test.run() == FALSE){
+ fprintf(stderr, "FAILED: Tests could not be run please check the "
+ "arguments.\n");
+ return -1;
+ }
+
+ delete catICU;
+ delete catStd;
+ return 0;
+}
+
+StringPerformanceTest::StringPerformanceTest(int32_t argc, const char *argv[],
+ UErrorCode &status)
+ : UPerfTest(argc, argv, status)
+{
+ filelines_=NULL;
+ StrBuffer=NULL;
+ StrBufferLen=0;
+
+ int32_t len =0;
+
+ if (status== U_ILLEGAL_ARGUMENT_ERROR){
+ //fprintf(stderr,gUsageString, "stringperf");
+ return;
+ }
+ if (U_FAILURE(status)){
+ fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n",
+ u_errorName(status));
+ return;
+ }
+
+
+ if(line_mode){
+ ULine* filelines = getLines(status);
+ if(U_FAILURE(status)){
+ fprintf(stderr, "FAILED to read lines from file and create UPerfTest object. Error: %s\n", u_errorName(status));
+ return;
+ }
+
+ filelines_ = new ULine[numLines];
+ for (int i =0; i < numLines; i++) {
+ len = filelines[i].len;
+ filelines_[i].name = new UChar[len];
+ filelines_[i].len = len;
+ memcpy(filelines_[i].name, filelines[i].name, len * U_SIZEOF_UCHAR);
+ }
+
+ }else if(bulk_mode){
+ int32_t srcLen = 0;
+ const UChar* src = getBuffer(srcLen,status);
+ if(U_FAILURE(status)){
+ fprintf(stderr, "FAILED to read buffer from file and create UPerfTest object. Error: %s\n", u_errorName(status));
+ return;
+ }
+
+ StrBuffer = new UChar[srcLen];
+ StrBufferLen = srcLen;
+ memcpy(StrBuffer, src, srcLen * U_SIZEOF_UCHAR);
+
+ }
+}
+
+StringPerformanceTest::~StringPerformanceTest()
+{
+ delete[] filelines_;
+ delete[] StrBuffer;
+}
+
+UPerfFunction* StringPerformanceTest::runIndexedTest(int32_t index, UBool exec,
+ const char *&name,
+ char* par)
+{
+ switch (index) {
+ TESTCASE(0, TestCtor);
+ TESTCASE(1, TestCtor1);
+ TESTCASE(2, TestCtor2);
+ TESTCASE(3, TestCtor3);
+ TESTCASE(4, TestAssign);
+ TESTCASE(5, TestAssign1);
+ TESTCASE(6, TestAssign2);
+ TESTCASE(7, TestGetch);
+ TESTCASE(8, TestCatenate);
+ TESTCASE(9, TestScan);
+ TESTCASE(10, TestScan1);
+ TESTCASE(11, TestScan2);
+
+ TESTCASE(12, TestStdLibCtor);
+ TESTCASE(13, TestStdLibCtor1);
+ TESTCASE(14, TestStdLibCtor2);
+ TESTCASE(15, TestStdLibCtor3);
+ TESTCASE(16, TestStdLibAssign);
+ TESTCASE(17, TestStdLibAssign1);
+ TESTCASE(18, TestStdLibAssign2);
+ TESTCASE(19, TestStdLibGetch);
+ TESTCASE(20, TestStdLibCatenate);
+ TESTCASE(21, TestStdLibScan);
+ TESTCASE(22, TestStdLibScan1);
+ TESTCASE(23, TestStdLibScan2);
+
+ default:
+ name = "";
+ return NULL;
+ }
+ return NULL;
+}
+
+UPerfFunction* StringPerformanceTest::TestCtor()
+{
+ if (line_mode) {
+ return new StringPerfFunction(ctor, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(ctor, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestCtor1()
+{
+ if (line_mode) {
+ return new StringPerfFunction(ctor1, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(ctor1, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestCtor2()
+{
+ if (line_mode) {
+ return new StringPerfFunction(ctor2, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(ctor2, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestCtor3()
+{
+ if (line_mode) {
+ return new StringPerfFunction(ctor3, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(ctor3, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestAssign()
+{
+ if (line_mode) {
+ return new StringPerfFunction(assign, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(assign, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestAssign1()
+{
+ if (line_mode) {
+ return new StringPerfFunction(assign1, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(assign1, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestAssign2()
+{
+ if (line_mode) {
+ return new StringPerfFunction(assign2, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(assign2, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+
+UPerfFunction* StringPerformanceTest::TestGetch()
+{
+ if (line_mode) {
+ return new StringPerfFunction(getch, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(getch, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestCatenate()
+{
+ if (line_mode) {
+ return new StringPerfFunction(catenate, filelines_, numLines, uselen);
+ } else {
+ //return new StringPerfFunction(catenate, buffer, bufferLen, uselen);
+ return new StringPerfFunction(catenate, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestScan()
+{
+ if (line_mode) {
+ return new StringPerfFunction(scan, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(scan, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestScan1()
+{
+ if (line_mode) {
+ return new StringPerfFunction(scan1, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(scan1, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestScan2()
+{
+ if (line_mode) {
+ return new StringPerfFunction(scan2, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(scan2, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibCtor()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibCtor, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibCtor, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibCtor1()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibCtor1, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibCtor1, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibCtor2()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibCtor2, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibCtor2, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibCtor3()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibCtor3, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibCtor3, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibAssign()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibAssign, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibAssign, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibAssign1()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibAssign1, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibAssign1, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibAssign2()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibAssign2, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibAssign2, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibGetch()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibGetch, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibGetch, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibCatenate()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibCatenate, filelines_, numLines, uselen);
+ } else {
+ //return new StringPerfFunction(StdLibCatenate, buffer, bufferLen, uselen);
+ return new StringPerfFunction(StdLibCatenate, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibScan()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibScan, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibScan, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibScan1()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibScan1, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibScan1, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+UPerfFunction* StringPerformanceTest::TestStdLibScan2()
+{
+ if (line_mode) {
+ return new StringPerfFunction(StdLibScan2, filelines_, numLines, uselen);
+ } else {
+ return new StringPerfFunction(StdLibScan2, StrBuffer, StrBufferLen, uselen);
+ }
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.h b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.h
new file mode 100644
index 00000000000..84d6493a405
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.h
@@ -0,0 +1,549 @@
+/*
+**********************************************************************
+* Copyright (c) 2002-2006, International Business Machines
+* Corporation and others. All Rights Reserved.
+**********************************************************************
+*/
+#ifndef _STRINGPERF_H
+#define _STRINGPERF_H
+
+#include <string>
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+
+#include "unicode/uperf.h"
+
+typedef std::wstring stlstring;
+
+/* Define all constants for test case operations */
+#define MAXNUMLINES 40000 //Max number of lines in a test data file
+#define MAXSRCLEN 20 //Max length of one line. maybe a larger number, but it need more mem
+#define LOOPS 100 //Iterations
+//#define LOOPS 10
+#define catenate_STRLEN 2
+
+const UChar uTESTCHAR1 = 'a';
+const wchar_t wTESTCHAR1 = 'a';
+const UnicodeString uEMPTY;
+const stlstring sEMPTY;
+UnicodeString unistr;
+stlstring stlstr;
+// Simulate construction with a single-char string for basic_string
+wchar_t simulate[2]={wTESTCHAR1, 0};
+
+/* Constants for scan operation */
+U_STRING_DECL(scan_STRING, "Dot. 123. Some more data.", 25);
+const UnicodeString uScan_STRING=UnicodeString(scan_STRING);
+const stlstring sScan_STRING=stlstring(L"Dot. 123. Some more data.");
+
+/* global variables or constants for concatenation operation */
+U_STRING_DECL(uCatenate_STR, "!!", 2);
+const stlstring sCatenate_STR=stlstring(L"!!");
+static UnicodeString* catICU;
+static stlstring* catStd;
+UBool bCatenatePrealloc;
+
+/* type defines */
+typedef struct WLine WLine;
+struct WLine {
+ wchar_t name[100];
+ int32_t len;
+}; //struct to store one line of wchar_t string
+
+enum FnType { Fn_ICU, Fn_STD };
+typedef FnType FnType;
+typedef void (*ICUStringPerfFn)(const UChar* src,int32_t srcLen, UnicodeString s0);
+typedef void (*StdStringPerfFn)(const wchar_t* src,int32_t srcLen, stlstring s0);
+
+
+class StringPerfFunction : public UPerfFunction
+{
+public:
+
+ virtual long getEventsPerIteration(){
+ int loops = LOOPS;
+ if (catICU) { delete catICU;}
+ if (catStd) { delete catStd;}
+
+ if (bCatenatePrealloc) {
+
+ int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN);
+ catICU = new UnicodeString(to_alloc,'a',0);
+ //catICU = new UnicodeString();
+
+ catStd = new stlstring();
+ //catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN));
+ catStd -> reserve(110000000);
+ } else {
+ catICU = new UnicodeString();
+ catStd = new stlstring();
+ }
+
+ return -1;
+ }
+
+ virtual void call(UErrorCode* status)
+ {
+ if(line_mode_==TRUE){
+ if(uselen_){
+ for(int32_t i = 0; i< numLines_; i++){
+ if (fnType_==Fn_ICU) {
+ (*fn1_)(lines_[i].name,lines_[i].len,uS0_[i]);
+ } else {
+ (*fn2_)(wlines_[i].name,wlines_[i].len,sS0_[i]);
+ }
+ }
+ }else{
+ for(int32_t i = 0; i< numLines_; i++){
+ if (fnType_==Fn_ICU) {
+ (*fn1_)(lines_[i].name,-1,uS0_[i]);
+ } else {
+ (*fn2_)(wlines_[i].name,-1,sS0_[i]);
+ }
+ }
+ }
+ }else{
+ if(uselen_){
+ if (fnType_==Fn_ICU) {
+ (*fn1_)(src_,srcLen_,*ubulk_);
+ } else {
+ (*fn2_)(wsrc_,wsrcLen_,*sbulk_);
+ }
+ }else{
+ if (fnType_==Fn_ICU) {
+ (*fn1_)(src_,-1,*ubulk_);
+ } else {
+ (*fn2_)(wsrc_,-1,*sbulk_);
+ }
+ }
+ }
+ }
+
+ virtual long getOperationsPerIteration()
+ {
+ if(line_mode_==TRUE){
+ return numLines_;
+ }else{
+ return 1;
+ }
+ }
+
+ StringPerfFunction(ICUStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen)
+ {
+
+ fn1_ = func;
+ lines_=srcLines;
+ wlines_=NULL;
+ numLines_=srcNumLines;
+ uselen_=uselen;
+ line_mode_=TRUE;
+ src_ = NULL;
+ srcLen_ = 0;
+ wsrc_ = NULL;
+ wsrcLen_ = 0;
+ fnType_ = Fn_ICU;
+
+ uS0_=new UnicodeString[numLines_];
+ for(int32_t i=0; i<numLines_; i++) {
+ uS0_[i]=UnicodeString(lines_[i].name, lines_[i].len);
+ }
+ sS0_=NULL;
+ ubulk_=NULL;
+ sbulk_=NULL;
+ }
+
+ StringPerfFunction(StdStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen)
+ {
+
+ fn2_ = func;
+ lines_=srcLines;
+ wlines_=NULL;
+ numLines_=srcNumLines;
+ uselen_=uselen;
+ line_mode_=TRUE;
+ src_ = NULL;
+ srcLen_ = 0;
+ wsrc_ = NULL;
+ wsrcLen_ = 0;
+ fnType_ = Fn_STD;
+
+ uS0_=NULL;
+ ubulk_=NULL;
+ sbulk_=NULL;
+
+ //fillin wlines_[], sS0_[]
+ prepareLinesForStd();
+ }
+
+ StringPerfFunction(ICUStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen)
+ {
+
+ fn1_ = func;
+ lines_=NULL;
+ wlines_=NULL;
+ numLines_=0;
+ uselen_=uselen;
+ line_mode_=FALSE;
+ src_ = new UChar[sourceLen];
+ memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR);
+ srcLen_ = sourceLen;
+ wsrc_ = NULL;
+ wsrcLen_ = 0;
+ fnType_ = Fn_ICU;
+
+ uS0_=NULL;
+ sS0_=NULL;
+ ubulk_=new UnicodeString(src_,srcLen_);
+ sbulk_=NULL;
+ }
+
+ StringPerfFunction(StdStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen)
+ {
+
+ fn2_ = func;
+ lines_=NULL;
+ wlines_=NULL;
+ numLines_=0;
+ uselen_=uselen;
+ line_mode_=FALSE;
+ src_ = new UChar[sourceLen];
+ memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR);
+ srcLen_ = sourceLen;
+ fnType_ = Fn_STD;
+
+ uS0_=NULL;
+ sS0_=NULL;
+ ubulk_=NULL;
+
+ //fillin wsrc_, sbulk_
+ prepareBulkForStd();
+
+ }
+
+ ~StringPerfFunction()
+ {
+ //free(src_);
+ free(wsrc_);
+ delete[] src_;
+ delete ubulk_;
+ delete sbulk_;
+ delete[] uS0_;
+ delete[] sS0_;
+ delete[] wlines_;
+ }
+
+private:
+ void prepareLinesForStd(void)
+ {
+ UErrorCode err=U_ZERO_ERROR;
+
+ wlines_=new WLine[numLines_];
+ wchar_t ws[100];
+ int32_t wcap = sizeof(ws) / sizeof(*ws);
+ int32_t wl;
+ wchar_t* wcs;
+
+ sS0_=new stlstring[numLines_];
+ for(int32_t i=0; i<numLines_; i++) {
+ if(uselen_) {
+ wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len, &err);
+ memcpy(wlines_[i].name, wcs, wl * sizeof(wchar_t));
+ wlines_[i].len = wl;
+ sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len);
+ } else {
+ wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len-1, &err);
+ memcpy(wlines_[i].name, wcs, wl*sizeof(wchar_t));
+ wlines_[i].len = wl;
+ sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len+1);
+ }
+
+ if (U_FAILURE(err)) {
+ return;
+ }
+ }
+
+ }
+
+ void prepareBulkForStd(void)
+ {
+ UErrorCode err=U_ZERO_ERROR;
+
+ const UChar* uSrc = src_;
+ int32_t uSrcLen = srcLen_;
+ wchar_t* wDest = NULL;
+ int32_t wDestLen = 0;
+ int32_t reqLen= 0 ;
+
+ if(uselen_) {
+ /* pre-flight*/
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err=U_ZERO_ERROR;
+ wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen));
+ wDestLen = reqLen;
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err);
+ }
+
+ if (U_SUCCESS(err)) {
+ wsrc_ = wDest;
+ wsrcLen_ = wDestLen;
+ sbulk_=new stlstring(wsrc_,wsrcLen_);
+ }
+
+ } else {
+ /* pre-flight*/
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR){
+ err=U_ZERO_ERROR;
+ wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1));
+ wDestLen = reqLen+1;
+ u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err);
+ }
+
+ if (U_SUCCESS(err)) {
+ wsrc_ = wDest;
+ wsrcLen_ = wDestLen;
+ sbulk_=new stlstring(wsrc_);
+ }
+ }
+
+ //free(wDest);
+ }
+
+
+private:
+ ICUStringPerfFn fn1_;
+ StdStringPerfFn fn2_;
+
+ ULine* lines_;
+ WLine* wlines_;
+ int32_t numLines_;
+
+ UBool uselen_;
+ UChar* src_;
+ int32_t srcLen_;
+ wchar_t* wsrc_;
+ int32_t wsrcLen_;
+ UBool line_mode_;
+
+ //added for preparing testing data
+ UnicodeString* uS0_;
+ stlstring* sS0_;
+ UnicodeString* ubulk_;
+ stlstring* sbulk_;
+ FnType fnType_;
+};
+
+
+class StringPerformanceTest : public UPerfTest
+{
+public:
+ StringPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status);
+ ~StringPerformanceTest();
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,
+ const char *&name,
+ char *par = NULL);
+ UPerfFunction* TestCtor();
+ UPerfFunction* TestCtor1();
+ UPerfFunction* TestCtor2();
+ UPerfFunction* TestCtor3();
+ UPerfFunction* TestAssign();
+ UPerfFunction* TestAssign1();
+ UPerfFunction* TestAssign2();
+ UPerfFunction* TestGetch();
+ UPerfFunction* TestCatenate();
+ UPerfFunction* TestScan();
+ UPerfFunction* TestScan1();
+ UPerfFunction* TestScan2();
+
+ UPerfFunction* TestStdLibCtor();
+ UPerfFunction* TestStdLibCtor1();
+ UPerfFunction* TestStdLibCtor2();
+ UPerfFunction* TestStdLibCtor3();
+ UPerfFunction* TestStdLibAssign();
+ UPerfFunction* TestStdLibAssign1();
+ UPerfFunction* TestStdLibAssign2();
+ UPerfFunction* TestStdLibGetch();
+ UPerfFunction* TestStdLibCatenate();
+ UPerfFunction* TestStdLibScan();
+ UPerfFunction* TestStdLibScan1();
+ UPerfFunction* TestStdLibScan2();
+
+private:
+ long COUNT_;
+ ULine* filelines_;
+ UChar* StrBuffer;
+ int32_t StrBufferLen;
+
+};
+
+
+inline void ctor(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ UnicodeString a;
+}
+
+inline void ctor1(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ UnicodeString b(uTESTCHAR1);
+}
+
+inline void ctor2(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ UnicodeString c(uEMPTY);
+}
+
+inline void ctor3(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ UnicodeString d(src,srcLen);
+}
+
+inline UnicodeString icu_assign_helper(const UChar* src,int32_t srcLen)
+{
+ if (srcLen==-1) { return src;}
+ else { return UnicodeString(src, srcLen);}
+}
+
+inline void assign(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ unistr = icu_assign_helper(src,srcLen);
+}
+
+inline void assign1(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ unistr.setTo(src, srcLen);
+}
+
+inline void assign2(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ unistr = s0;
+}
+
+inline void getch(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ s0.charAt(0);
+}
+
+
+inline void catenate(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ UTimer mystart, mystop;
+ utimer_getTime(&mystart);
+
+ *catICU += s0;
+
+ utimer_getTime(&mystop);
+ double mytime = utimer_getDeltaSeconds(&mystart,&mystop);
+ printf("\nmytime=%f \n", mytime);
+
+ *catICU += uCatenate_STR;
+}
+
+volatile int scan_idx;
+U_STRING_DECL(SCAN1, "123", 3);
+
+inline void scan(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ UChar c='.';
+ scan_idx = uScan_STRING.indexOf(c);
+}
+
+inline void scan1(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ scan_idx = uScan_STRING.indexOf(SCAN1,3);
+}
+
+inline void scan2(const UChar* src,int32_t srcLen, UnicodeString s0)
+{
+ UChar c1='s';
+ UChar c2='m';
+ scan_idx = uScan_STRING.indexOf(c1);
+ scan_idx = uScan_STRING.indexOf(c2);
+}
+
+
+inline void StdLibCtor(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ stlstring a;
+}
+
+inline void StdLibCtor1(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ stlstring b(simulate);
+}
+
+inline void StdLibCtor2(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ stlstring c(sEMPTY);
+}
+
+inline void StdLibCtor3(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ if (srcLen==-1) {
+ stlstring d(src);
+ }else {
+ stlstring d(src, srcLen);
+ }
+}
+
+inline stlstring stl_assign_helper(const wchar_t* src,int32_t srcLen)
+{
+ if (srcLen==-1) { return src;}
+ else { return stlstring(src, srcLen);}
+}
+
+inline void StdLibAssign(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ stlstr = stl_assign_helper(src,srcLen);
+}
+
+inline void StdLibAssign1(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ if (srcLen==-1) { stlstr=src;}
+ else { stlstr.assign(src, srcLen);}
+}
+
+inline void StdLibAssign2(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ stlstr=s0;
+}
+
+inline void StdLibGetch(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ s0.at(0);
+}
+
+inline void StdLibCatenate(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ UTimer mystart, mystop;
+ utimer_getTime(&mystart);
+
+ *catStd += s0;
+ *catStd += sCatenate_STR;
+
+ utimer_getTime(&mystop);
+ double mytime = utimer_getDeltaSeconds(&mystart,&mystop);
+ printf("\nmytime=%f \n", mytime);
+
+}
+
+inline void StdLibScan(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ scan_idx = (int) sScan_STRING.find('.');
+}
+
+inline void StdLibScan1(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ scan_idx = (int) sScan_STRING.find(L"123");
+}
+
+inline void StdLibScan2(const wchar_t* src,int32_t srcLen, stlstring s0)
+{
+ scan_idx = (int) sScan_STRING.find_first_of(L"sm");
+}
+
+#endif // STRINGPERF_H
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.vcproj
new file mode 100644
index 00000000000..1c1f32309e6
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.vcproj
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="stringperf"
+ ProjectGUID="{523710EA-349D-45BF-8B39-289CC86E7D91}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/stringperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/stringperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib"
+ OutputFile=".\Release/stringperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ ProgramDatabaseFile=".\Release/stringperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/stringperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/stringperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1047"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib"
+ OutputFile=".\Debug/stringperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/stringperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="stringperf.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="stringperf.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/Makefile.in
new file mode 100644
index 00000000000..dbaf1ab4316
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/Makefile.in
@@ -0,0 +1,79 @@
+## Makefile.in for ICU - test/perf/utfperf
+## Copyright (c) 2001-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/perf/utfperf
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = utfperf
+
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
+LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = utfperf.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/UtfPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/UtfPerf.pl
new file mode 100755
index 00000000000..0c7ff961a3a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/UtfPerf.pl
@@ -0,0 +1,46 @@
+#!/usr/bin/perl -w
+# ********************************************************************
+# * COPYRIGHT:
+# * Copyright (c) 2005, International Business Machines Corporation and
+# * others. All Rights Reserved.
+# ********************************************************************
+
+use strict;
+
+use lib '../perldriver';
+
+use PerfFramework;
+
+
+my $options = {
+ "title"=>"Utf performance: ICU",
+ "headers"=>"ICU",
+ "operationIs"=>"gb18030 encoding string",
+ "passes"=>"1",
+ "time"=>"2",
+ #"outputType"=>"HTML",
+ "dataDir"=>"../data",
+ "outputDir"=>"../results"
+ };
+
+# programs
+# tests will be done for all the programs. Results will be stored and connected
+my $p = "debug/utfperf.exe -e gb18030";
+
+my $tests = {
+ "UTF-8", ["$p UTF_8"],
+ "UTF-8 small buffer", ["$p UTF_8_SB"],
+ "SCSU", ["$p SCSU"],
+ "SCSU small buffer", ["$p SCSU_SB"],
+ "BOCU_1", ["$p BOCU_1"],
+ "BOCU_1 small buffer", ["$p BOCU_1_SB"],
+ };
+
+my $dataFiles = {
+ "",
+ [
+ "four.txt"
+ ]
+ };
+
+runTests($options, $tests, $dataFiles);
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.cpp
new file mode 100644
index 00000000000..e5e26ca49ea
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.cpp
@@ -0,0 +1,365 @@
+/*
+ **********************************************************************
+ * Copyright (C) 2002-2007, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ * file name: utfperf.cpp
+ * encoding: US-ASCII
+ * tab size: 8 (not used)
+ * indentation:4
+ *
+ * created on: 2005Nov17
+ * created by: Raymond Yang
+ *
+ * Ported from utfper.c created by Markus W. Scherer
+ * Performance test program for Unicode converters
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "unicode/uperf.h"
+#include "uoptions.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+/* definitions and text buffers */
+
+#define INPUT_CAPACITY (1024*1024)
+#define INTERMEDIATE_CAPACITY 4096
+#define INTERMEDIATE_SMALL_CAPACITY 20
+#define PIVOT_CAPACITY 1024
+#define OUTPUT_CAPACITY INPUT_CAPACITY
+
+static char utf8[INPUT_CAPACITY];
+static UChar pivot[INTERMEDIATE_CAPACITY];
+
+static UChar output[OUTPUT_CAPACITY];
+static char intermediate[OUTPUT_CAPACITY];
+
+static int32_t utf8Length, encodedLength, outputLength, countInputCodePoints;
+
+static int32_t fromUCallbackCount;
+
+// Command-line options specific to utfperf.
+// Options do not have abbreviations: Force readable command lines.
+// (Using U+0001 for abbreviation characters.)
+enum {
+ CHARSET,
+ CHUNK_LENGTH,
+ PIVOT_LENGTH,
+ UTFPERF_OPTIONS_COUNT
+};
+
+static UOption options[UTFPERF_OPTIONS_COUNT]={
+ UOPTION_DEF("charset", '\x01', UOPT_REQUIRES_ARG),
+ UOPTION_DEF("chunk", '\x01', UOPT_REQUIRES_ARG),
+ UOPTION_DEF("pivot", '\x01', UOPT_REQUIRES_ARG)
+};
+
+static const char *const utfperf_usage =
+ "\t--charset Charset for which to test performance, e.g. windows-1251.\n"
+ "\t Default: UTF-8\n"
+ "\t--chunk Length (in bytes) of charset output chunks. [4096]\n"
+ "\t--pivot Length (in UChars) of the UTF-16 pivot buffer, if applicable.\n"
+ "\t [1024]\n";
+
+// Test object.
+class UtfPerformanceTest : public UPerfTest{
+public:
+ UtfPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status)
+ : UPerfTest(argc, argv, options, LENGTHOF(options), utfperf_usage, status) {
+ if (U_SUCCESS(status)) {
+ charset = options[CHARSET].value;
+
+ chunkLength = atoi(options[CHUNK_LENGTH].value);
+ if (chunkLength < 1 || OUTPUT_CAPACITY < chunkLength) {
+ fprintf(stderr, "error: chunk length must be 1..%ld\n", (long)OUTPUT_CAPACITY);
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+
+ pivotLength = atoi(options[PIVOT_LENGTH].value);
+ if (pivotLength < 1 || PIVOT_CAPACITY < pivotLength) {
+ fprintf(stderr, "error: pivot length must be 1..%ld\n", (long)PIVOT_CAPACITY);
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+
+ int32_t inputLength;
+ UPerfTest::getBuffer(inputLength, status);
+ countInputCodePoints = u_countChar32(buffer, bufferLen);
+ u_strToUTF8(utf8, (int32_t)sizeof(utf8), &utf8Length, buffer, bufferLen, &status);
+ }
+ }
+
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+
+ const UChar *getBuffer() const { return buffer; }
+ int32_t getBufferLen() const { return bufferLen; }
+
+ const char *charset;
+ int32_t chunkLength, pivotLength;
+};
+
+U_CDECL_BEGIN
+// Custom callback for counting callback calls.
+static void U_CALLCONV
+fromUCallback(const void *context,
+ UConverterFromUnicodeArgs *fromUArgs,
+ const UChar *codeUnits,
+ int32_t length,
+ UChar32 codePoint,
+ UConverterCallbackReason reason,
+ UErrorCode *pErrorCode) {
+ if (reason <= UCNV_IRREGULAR) {
+ ++fromUCallbackCount;
+ }
+ UCNV_FROM_U_CALLBACK_SUBSTITUTE(context, fromUArgs, codeUnits, length, codePoint, reason, pErrorCode);
+}
+U_CDECL_END
+
+// Base class for Roundtrip, FromUnicode and FromUTF8 with common setup.
+class Command : public UPerfFunction {
+protected:
+ Command(const UtfPerformanceTest &testcase)
+ : testcase(testcase),
+ input(testcase.getBuffer()), inputLength(testcase.getBufferLen()),
+ errorCode(U_ZERO_ERROR) {
+ cnv=ucnv_open(testcase.charset, &errorCode);
+ if (U_FAILURE(errorCode)) {
+ fprintf(stderr, "error opening converter for \"%s\" - %s\n", testcase.charset, u_errorName(errorCode));
+ }
+ ucnv_setFromUCallBack(cnv, fromUCallback, NULL, NULL, NULL, &errorCode);
+ }
+public:
+ virtual ~Command(){
+ if(U_SUCCESS(errorCode)) {
+ ucnv_close(cnv);
+ }
+ }
+ // virtual void call(UErrorCode* pErrorCode) { ... }
+ virtual long getOperationsPerIteration(){
+ return countInputCodePoints;
+ }
+
+ const UtfPerformanceTest &testcase;
+ const UChar *input;
+ int32_t inputLength;
+ UErrorCode errorCode;
+ UConverter *cnv;
+};
+
+// Test roundtrip UTF-16->encoding->UTF-16.
+class Roundtrip : public Command {
+protected:
+ Roundtrip(const UtfPerformanceTest &testcase) : Command(testcase) {}
+public:
+ static UPerfFunction* get(const UtfPerformanceTest &testcase) {
+ Roundtrip * t = new Roundtrip(testcase);
+ if (U_SUCCESS(t->errorCode)){
+ return t;
+ } else {
+ delete t;
+ return NULL;
+ }
+ }
+ virtual void call(UErrorCode* pErrorCode){
+ const UChar *pIn, *pInLimit;
+ UChar *pOut, *pOutLimit;
+ char *pInter, *pInterLimit;
+ const char *p;
+ UBool flush;
+
+ ucnv_reset(cnv);
+ fromUCallbackCount=0;
+
+ pIn=input;
+ pInLimit=input+inputLength;
+
+ pOut=output;
+ pOutLimit=output+OUTPUT_CAPACITY;
+
+ pInterLimit=intermediate+testcase.chunkLength;
+
+ encodedLength=outputLength=0;
+ flush=FALSE;
+
+ do {
+ /* convert a block of [pIn..pInLimit[ to the encoding in intermediate[] */
+ pInter=intermediate;
+ ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode);
+ encodedLength+=(int32_t)(pInter-intermediate);
+
+ if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) {
+ /* make sure that we convert once more to really flush */
+ *pErrorCode=U_ZERO_ERROR;
+ } else if(U_FAILURE(*pErrorCode)) {
+ return;
+ } else if(pIn==pInLimit) {
+ flush=TRUE;
+ }
+
+ /* convert the block [intermediate..pInter[ back to UTF-16 */
+ p=intermediate;
+ ucnv_toUnicode(cnv, &pOut, pOutLimit,&p, pInter,NULL, flush,pErrorCode);
+ if(U_FAILURE(*pErrorCode)) {
+ return;
+ }
+ /* intermediate must have been consumed (p==pInter) because of the converter semantics */
+ } while(!flush);
+
+ outputLength=pOut-output;
+ if(inputLength!=outputLength) {
+ fprintf(stderr, "error: roundtrip failed, inputLength %d!=outputLength %d\n", inputLength, outputLength);
+ *pErrorCode=U_INTERNAL_PROGRAM_ERROR;
+ }
+ }
+};
+
+// Test one-way conversion UTF-16->encoding.
+class FromUnicode : public Command {
+protected:
+ FromUnicode(const UtfPerformanceTest &testcase) : Command(testcase) {}
+public:
+ static UPerfFunction* get(const UtfPerformanceTest &testcase) {
+ FromUnicode * t = new FromUnicode(testcase);
+ if (U_SUCCESS(t->errorCode)){
+ return t;
+ } else {
+ delete t;
+ return NULL;
+ }
+ }
+ virtual void call(UErrorCode* pErrorCode){
+ const UChar *pIn, *pInLimit;
+ char *pInter, *pInterLimit;
+
+ ucnv_resetFromUnicode(cnv);
+ fromUCallbackCount=0;
+
+ pIn=input;
+ pInLimit=input+inputLength;
+
+ pInterLimit=intermediate+testcase.chunkLength;
+
+ encodedLength=0;
+
+ for(;;) {
+ pInter=intermediate;
+ ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode);
+ encodedLength+=(int32_t)(pInter-intermediate);
+
+ if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) {
+ /* make sure that we convert once more to really flush */
+ *pErrorCode=U_ZERO_ERROR;
+ } else if(U_FAILURE(*pErrorCode)) {
+ return;
+ } else {
+ break; // all done
+ }
+ }
+ }
+};
+
+// Test one-way conversion UTF-8->encoding.
+class FromUTF8 : public Command {
+protected:
+ FromUTF8(const UtfPerformanceTest &testcase)
+ : Command(testcase),
+ utf8Cnv(NULL),
+ input8(utf8), input8Length(utf8Length) {
+ utf8Cnv=ucnv_open("UTF-8", &errorCode);
+ }
+public:
+ static UPerfFunction* get(const UtfPerformanceTest &testcase) {
+ FromUTF8 * t = new FromUTF8(testcase);
+ if (U_SUCCESS(t->errorCode)){
+ return t;
+ } else {
+ delete t;
+ return NULL;
+ }
+ }
+ ~FromUTF8() {
+ ucnv_close(utf8Cnv);
+ }
+ virtual void call(UErrorCode* pErrorCode){
+ const char *pIn, *pInLimit;
+ char *pInter, *pInterLimit;
+ UChar *pivotSource, *pivotTarget, *pivotLimit;
+
+ ucnv_resetToUnicode(utf8Cnv);
+ ucnv_resetFromUnicode(cnv);
+ fromUCallbackCount=0;
+
+ pIn=input8;
+ pInLimit=input8+input8Length;
+
+ pInterLimit=intermediate+testcase.chunkLength;
+
+ pivotSource=pivotTarget=pivot;
+ pivotLimit=pivot+testcase.pivotLength;
+
+ encodedLength=0;
+
+ for(;;) {
+ pInter=intermediate;
+ ucnv_convertEx(cnv, utf8Cnv,
+ &pInter, pInterLimit,
+ &pIn, pInLimit,
+ pivot, &pivotSource, &pivotTarget, pivotLimit,
+ FALSE, TRUE, pErrorCode);
+ encodedLength+=(int32_t)(pInter-intermediate);
+
+ if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) {
+ /* make sure that we convert once more to really flush */
+ *pErrorCode=U_ZERO_ERROR;
+ } else if(U_FAILURE(*pErrorCode)) {
+ return;
+ } else {
+ break; // all done
+ }
+ }
+ }
+protected:
+ UConverter *utf8Cnv;
+ const char *input8;
+ int32_t input8Length;
+};
+
+UPerfFunction* UtfPerformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) {
+ switch (index) {
+ case 0: name = "Roundtrip"; if (exec) return Roundtrip::get(*this); break;
+ case 1: name = "FromUnicode"; if (exec) return FromUnicode::get(*this); break;
+ case 2: name = "FromUTF8"; if (exec) return FromUTF8::get(*this); break;
+ default: name = ""; break;
+ }
+ return NULL;
+}
+
+int main(int argc, const char *argv[])
+{
+ // Default values for command-line options.
+ options[CHARSET].value = "UTF-8";
+ options[CHUNK_LENGTH].value = "4096";
+ options[PIVOT_LENGTH].value = "1024";
+
+ UErrorCode status = U_ZERO_ERROR;
+ UtfPerformanceTest test(argc, argv, status);
+
+ if (U_FAILURE(status)){
+ printf("The error is %s\n", u_errorName(status));
+ test.usage();
+ return status;
+ }
+
+ if (test.run() == FALSE){
+ fprintf(stderr, "FAILED: Tests could not be run please check the "
+ "arguments.\n");
+ return -1;
+ }
+
+ if (fromUCallbackCount > 0) {
+ printf("Number of fromUnicode callback calls in the last iteration: %ld\n", (long)fromUCallbackCount);
+ }
+
+ return 0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.vcproj
new file mode 100644
index 00000000000..d333f02fd16
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.vcproj
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="utfperf"
+ ProjectGUID="{E7728E98-0469-43F4-AF37-4529A3D52C6B}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/utfperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/utfperf.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib"
+ OutputFile=".\Debug/utfperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/utfperf.pdb"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/utfperf.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/utfperf.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib"
+ OutputFile=".\Release/utfperf.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\..\..\lib\"
+ ProgramDatabaseFile=".\Release/utfperf.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\utfperf.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt b/Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt
new file mode 100644
index 00000000000..e980f37b977
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt
@@ -0,0 +1,4335 @@
+0334 05A9;
+0334 06E8;
+0334 1D181;
+059F 0334;
+06DA 0334;
+1B71 0334;
+1D18B 0334;
+030A 0334;
+030F 0334;
+0320 0334;
+0331 0334;
+034A 0334;
+035A 0334;
+1DC5 0334;
+0334 05B7;
+064F 0334;
+065E 0334;
+073C 0334;
+07EC 0334;
+10A0D 0334;
+17DD 0334;
+20D5 0334;
+20E5 0334;
+0085 003F;
+0020 003F;
+205F 0061;
+205F 0062;
+FF40 0041;
+FF3E 0061;
+FE49 0041;
+00A8 0021;
+02DD 0021;
+1FCE 0061;
+1FFE 0061;
+FF3F 003F;
+2017 0041;
+FF0D 0061;
+2011 003F;
+FE58 0061;
+3030 0041;
+FE50 0041;
+066C 0041;
+FF64 0041;
+037E 0041;
+FE13 0021;
+0703 0041;
+1361 0041;
+1805 0041;
+16ED 0041;
+0080 0021;
+009F 0021;
+05AB 0021;
+06E2 0021;
+1B72 0021;
+FDD1 0021;
+1D165 0021;
+1D188 0021;
+AFFFF 0021;
+E0036 0021;
+E0054 0021;
+E0072 0021;
+E0110 0021;
+E012E 0021;
+E014C 0021;
+E016A 0021;
+E0188 0021;
+E01A6 0021;
+E01C4 0021;
+E01E2 0021;
+0342 0021;
+0321 0021;
+0348 0021;
+1DC2 0021;
+05BC 0021;
+FC63 0021;
+073C 0021;
+0953 0021;
+0D83 0021;
+0F7F 0021;
+309A 0021;
+20EC 0021;
+0021 0062;
+0006 003F;
+0089 003F;
+0595 003F;
+0600 003F;
+06ED 003F;
+202B 003F;
+FE03 003F;
+1D170 003F;
+1D242 003F;
+E0020 003F;
+E003E 003F;
+E005C 003F;
+E007A 003F;
+E0118 003F;
+E0136 003F;
+E0154 003F;
+E0172 003F;
+E0190 003F;
+E01AE 003F;
+E01CC 003F;
+E01EA 003F;
+0328 003F;
+032B 003F;
+0351 003F;
+1DCA 003F;
+064D 003F;
+0657 003F;
+0744 003F;
+0A02 003F;
+10A0D 003F;
+17C9 003F;
+20D6 003F;
+2048 0021;
+00BF 0062;
+2CFA 0062;
+FE19 0041;
+06D4 0062;
+166E 0062;
+FE12 0062;
+A877 0062;
+17D5 0062;
+07F7 0062;
+1B5A 0062;
+205A 0062;
+2CFF 0062;
+1091F 0062;
+FF07 0062;
+203A 0062;
+201F 0062;
+208D 0021;
+2480 0061;
+2486 0061;
+2479 0061;
+249C 0021;
+24A0 0062;
+24A6 0062;
+24AC 0062;
+24B2 0062;
+3201 0062;
+3204 0062;
+3207 0062;
+321C 0062;
+3219 0062;
+3226 0062;
+323D 0062;
+323F 0062;
+3230 0062;
+322B 0062;
+3242 0062;
+207E 003F;
+FF3B 0041;
+007B 0041;
+FE38 0062;
+169C 0062;
+2984 0062;
+2988 0062;
+298E 0062;
+2994 0062;
+2E03 0062;
+2E0D 0062;
+3009 003F;
+FE3E 0062;
+FE42 0062;
+FE3B 0062;
+FE5E 003F;
+FE18 0062;
+FD3F 0062;
+FF20 003F;
+204E 0062;
+FF3C 003F;
+214B 0062;
+FF05 0041;
+2020 0062;
+204C 0062;
+2037 0021;
+203B 0062;
+2042 0062;
+2E0B 0062;
+2E13 0062;
+055F 0062;
+05F4 0062;
+180A 0062;
+0F05 0062;
+0FD0 0062;
+0F0F 0062;
+104C 0062;
+17D9 0062;
+10A51 0062;
+02B9 0061;
+02C4 0062;
+02CA 0062;
+02D2 0062;
+02DE 0062;
+02E9 0062;
+02F0 0062;
+02F6 0062;
+02FC 0062;
+1392 0062;
+1398 0062;
+A704 0062;
+A70A 0062;
+A710 0062;
+A716 0062;
+A721 0062;
+060F 0062;
+0BF3 0062;
+0BFA 0062;
+A82B 0062;
+0F15 0062;
+0F1D 0062;
+0F3E 0062;
+0FC2 0062;
+0FC9 0062;
+19E1 0062;
+19E7 0062;
+19ED 0062;
+19F3 0062;
+19F9 0062;
+19FF 0062;
+1B66 0062;
+1B75 0062;
+1B7B 0062;
+2118 0062;
+2129 0062;
+2144 0062;
+2190 0062;
+2193 0021;
+2196 0041;
+219E 0041;
+21A4 0041;
+21AA 0041;
+21B1 0041;
+21B7 0041;
+21BD 0041;
+21C3 0041;
+21C9 0041;
+21D1 003F;
+21CE 0041;
+21DA 0061;
+21E0 0061;
+21E6 0061;
+21EC 0061;
+21F2 0061;
+21F8 0061;
+21FE 0061;
+2202 0061;
+2205 0021;
+1D6FB 0041;
+220C 0021;
+2210 003F;
+FB29 0061;
+226E 0334;
+FF1D 003F;
+207C 0062;
+00AC 0041;
+007E 0021;
+2214 0021;
+221A 0021;
+2220 0021;
+2226 0021;
+222B 003F;
+222F 0062;
+2236 003F;
+2241 0334;
+2240 0062;
+2246 0021;
+224C 0041;
+2251 003F;
+2257 003F;
+225D 003F;
+2263 0062;
+2267 0021;
+2272 0338 0334;
+2276 0061;
+227B 0338 0334;
+227D 0061;
+2283 0021;
+2289 0061;
+228F 003F;
+22E3 0041;
+2298 0061;
+229E 0061;
+22A3 0021;
+22AD 003F;
+22AB 0061;
+22B3 0021;
+22ED 0061;
+22BB 003F;
+22C1 003F;
+22C7 003F;
+22CD 003F;
+22D3 003F;
+22D9 003F;
+22DF 003F;
+22E9 003F;
+22F3 003F;
+22F9 003F;
+22FF 003F;
+2305 003F;
+230B 003F;
+2311 003F;
+2317 003F;
+231D 003F;
+2323 003F;
+232B 003F;
+2331 003F;
+2337 003F;
+233D 003F;
+2343 003F;
+2349 003F;
+234F 003F;
+2355 003F;
+235B 003F;
+2361 003F;
+2367 003F;
+236D 003F;
+2373 003F;
+2379 003F;
+237F 003F;
+2385 003F;
+238B 003F;
+2391 003F;
+2397 003F;
+239D 003F;
+23A3 003F;
+23A9 003F;
+23AF 003F;
+23B5 003F;
+23BB 003F;
+23C1 003F;
+23C7 003F;
+23CD 003F;
+23D3 003F;
+23D9 003F;
+23DF 003F;
+23E5 003F;
+2403 003F;
+2409 003F;
+240F 003F;
+2415 003F;
+241B 003F;
+2421 003F;
+2440 003F;
+2446 003F;
+2501 003F;
+2506 003F;
+250C 003F;
+2512 003F;
+2518 003F;
+251E 003F;
+2524 003F;
+252A 003F;
+2530 003F;
+2536 003F;
+253C 003F;
+2542 003F;
+2548 003F;
+254E 003F;
+2554 003F;
+255A 003F;
+2560 003F;
+2566 003F;
+256C 003F;
+2572 003F;
+2578 003F;
+257E 003F;
+2584 003F;
+258A 003F;
+2590 003F;
+2596 003F;
+259C 003F;
+25A1 003F;
+25A7 003F;
+25AD 003F;
+25B3 003F;
+25B9 003F;
+25BF 003F;
+25C5 003F;
+FFEE 0021;
+25D0 003F;
+25D6 003F;
+25DC 003F;
+25E2 003F;
+25E8 003F;
+25EE 003F;
+25F4 003F;
+25FA 003F;
+2600 003F;
+2606 003F;
+260C 003F;
+2612 003F;
+2618 003F;
+261E 003F;
+2624 003F;
+262A 003F;
+2638 003F;
+263E 003F;
+2644 003F;
+264A 003F;
+2650 003F;
+2656 003F;
+265C 003F;
+2662 003F;
+2668 003F;
+2671 003F;
+2677 003F;
+267D 003F;
+2683 003F;
+2689 003F;
+2695 003F;
+269B 003F;
+26A4 003F;
+26AA 003F;
+26B0 003F;
+2704 003F;
+270D 003F;
+2713 003F;
+2719 003F;
+271F 003F;
+2725 003F;
+272C 003F;
+2732 003F;
+2738 003F;
+273E 003F;
+2744 003F;
+274A 003F;
+2752 003F;
+275C 003F;
+2764 003F;
+276A 003F;
+2770 003F;
+2794 003F;
+279D 003F;
+27A3 003F;
+27A9 003F;
+27AF 003F;
+27B6 003F;
+27BC 003F;
+27C3 003F;
+27C9 003F;
+27D4 003F;
+27DA 003F;
+27E0 003F;
+27E6 003F;
+27F0 003F;
+27F6 003F;
+27FC 003F;
+2902 003F;
+2908 003F;
+290E 003F;
+2914 003F;
+291A 003F;
+2920 003F;
+2926 003F;
+292C 003F;
+2932 003F;
+2938 003F;
+293E 003F;
+2944 003F;
+294A 003F;
+2950 003F;
+2956 003F;
+295C 003F;
+2962 003F;
+2968 003F;
+296E 003F;
+2974 003F;
+297A 003F;
+2980 003F;
+299C 003F;
+29A2 003F;
+29A8 003F;
+29AE 003F;
+29B4 003F;
+29BA 003F;
+29C0 003F;
+29C6 003F;
+29CC 003F;
+29D2 003F;
+29D8 003F;
+29DE 003F;
+29E4 003F;
+29EA 003F;
+29F0 003F;
+29F6 003F;
+29FE 003F;
+2A04 003F;
+2A0A 003F;
+2A11 003F;
+2A17 003F;
+2A1D 003F;
+2A23 003F;
+2A29 003F;
+2A2F 003F;
+2A35 003F;
+2A3B 003F;
+2A41 003F;
+2A47 003F;
+2A4D 003F;
+2A53 003F;
+2A59 003F;
+2A5F 003F;
+2A65 003F;
+2A6B 003F;
+2A71 003F;
+2A7A 003F;
+2A80 003F;
+2A86 003F;
+2A8C 003F;
+2A92 003F;
+2A98 003F;
+2A9E 003F;
+2AA4 003F;
+2AAA 003F;
+2AB0 003F;
+2AB6 003F;
+2ABC 003F;
+2AC2 003F;
+2AC8 003F;
+2ACE 003F;
+2AD4 003F;
+2ADA 003F;
+2ADF 0062;
+2AE5 0062;
+2AEB 0062;
+2AF1 0062;
+2AF7 0062;
+2AFD 0062;
+2B03 0062;
+2B09 0062;
+2B0F 0062;
+2B15 0062;
+2B20 0062;
+2CE7 0062;
+2802 0062;
+2808 0062;
+280E 0062;
+2814 0062;
+281A 0062;
+2820 0062;
+2826 0062;
+282C 0062;
+2832 0062;
+2838 0062;
+283E 0062;
+2844 0062;
+284A 0062;
+2850 0062;
+2856 0062;
+285C 0062;
+2862 0062;
+2868 0062;
+286E 0062;
+2874 0062;
+287A 0062;
+2880 0062;
+2886 0062;
+288C 0062;
+2892 0062;
+2898 0062;
+289E 0062;
+28A4 0062;
+28AA 0062;
+28B0 0062;
+28B6 0062;
+28BC 0062;
+28C2 0062;
+28C8 0062;
+28CE 0062;
+28D4 0062;
+28DA 0062;
+28E0 0062;
+28E6 0062;
+28EC 0062;
+28F2 0062;
+28F8 0062;
+28FE 0062;
+268E 0062;
+2634 0062;
+4DC2 0062;
+4DC8 0062;
+4DCE 0062;
+4DD4 0062;
+4DDA 0062;
+4DE0 0062;
+4DE6 0062;
+4DEC 0062;
+4DF2 0062;
+4DF8 0062;
+4DFE 0062;
+1D304 0062;
+1D30A 0062;
+1D310 0062;
+1D316 0062;
+1D31C 0062;
+1D322 0062;
+1D328 0062;
+1D32E 0062;
+1D334 0062;
+1D33A 0062;
+1D340 0062;
+1D346 0062;
+1D34C 0062;
+1D352 0062;
+A491 0062;
+A497 0062;
+A49D 0062;
+A4A3 0062;
+A4A9 0062;
+A4AF 0062;
+A4B5 0062;
+A4BB 0062;
+A4C1 0062;
+10137 0062;
+1013D 0062;
+1017C 0062;
+10182 0062;
+10188 0062;
+1D004 0062;
+1D00A 0062;
+1D010 0062;
+1D016 0062;
+1D01C 0062;
+1D022 0062;
+1D028 0062;
+1D02E 0062;
+1D034 0062;
+1D03A 0062;
+1D040 0062;
+1D046 0062;
+1D04C 0062;
+1D052 0062;
+1D058 0062;
+1D05E 0062;
+1D064 0062;
+1D06A 0062;
+1D070 0062;
+1D076 0062;
+1D07C 0062;
+1D082 0062;
+1D088 0062;
+1D08E 0062;
+1D094 0062;
+1D09A 0062;
+1D0A0 0062;
+1D0A6 0062;
+1D0AC 0062;
+1D0B2 0062;
+1D0B8 0062;
+1D0BE 0062;
+1D0C4 0062;
+1D0CA 0062;
+1D0D0 0062;
+1D0D6 0062;
+1D0DC 0062;
+1D0E2 0062;
+1D0E8 0062;
+1D0EE 0062;
+1D0F4 0062;
+1D104 0062;
+1D10A 0062;
+1D110 0062;
+1D116 0062;
+1D11C 0062;
+1D122 0062;
+266E 0062;
+1D12E 0062;
+1D134 0062;
+1D13A 0062;
+1D140 0062;
+1D146 0062;
+1D14C 0062;
+1D152 0062;
+1D157 0041;
+1D161 0021;
+1D163 0062;
+1D16A 0041;
+1D18D 0041;
+1D193 0041;
+1D199 0041;
+1D19F 0041;
+1D1A5 0041;
+1D1AF 0041;
+1D1B5 0041;
+1D1BD 0021;
+1D1BC 0021;
+1D1C3 003F;
+1D1C9 003F;
+1D1CF 003F;
+1D1D5 003F;
+1D1DB 003F;
+1D203 003F;
+1D209 003F;
+1D20F 003F;
+1D215 003F;
+1D21B 003F;
+1D221 003F;
+1D227 003F;
+1D22D 003F;
+1D233 003F;
+1D239 003F;
+1D23F 003F;
+2FF2 003F;
+2FF8 003F;
+31C2 003F;
+31C8 003F;
+31CE 003F;
+3020 003F;
+327F 003F;
+0BF1 003F;
+1376 003F;
+137C 003F;
+10323 003F;
+10115 003F;
+1011B 003F;
+10121 003F;
+10127 003F;
+1012D 003F;
+10133 003F;
+10147 003F;
+1014E 003F;
+10155 003F;
+10163 003F;
+10169 003F;
+1016F 003F;
+10176 003F;
+10917 003F;
+10A47 003F;
+1245B 003F;
+12461 003F;
+1D36D 003F;
+02D1 003F;
+3032 0061;
+309D 0062;
+00A2 0021;
+00A3 0041;
+0AF1 0021;
+20A2 0021;
+20A9 0021;
+20AE 0021;
+20B4 0021;
+0BE6 0021;
+07C0 003F;
+1D7E2 0061;
+0AE6 0061;
+1B50 0061;
+0CE6 0062;
+2780 0021;
+3021 0021;
+2081 003F;
+10158 003F;
+2153 0062;
+24FE 003F;
+32C9 003F;
+32CA 003F;
+32CB 003F;
+3365 003F;
+24EF 0021;
+2497 0061;
+2470 0041;
+33F1 003F;
+336B 003F;
+2081 0061;
+0D67 0061;
+10159 0061;
+1D7CF 0062;
+0ED1 0062;
+32C0 0021;
+09E8 0021;
+12423 0021;
+0A68 003F;
+12435 003F;
+2473 0061;
+336D 0062;
+336F 0062;
+3256 0062;
+3259 0062;
+00B2 0061;
+0CE8 0061;
+1015B 0061;
+1D361 0061;
+0D68 0062;
+33E1 0021;
+06F3 0021;
+12420 0021;
+136B 003F;
+12425 003F;
+215C 0062;
+325D 0062;
+32B4 0062;
+0663 0041;
+1949 0041;
+12425 0061;
+1D7DB 0062;
+0F23 0062;
+32C2 0021;
+09EA 0021;
+1243C 0021;
+09F7 003F;
+1243D 003F;
+32B7 0061;
+32BD 0061;
+2783 0041;
+0C6A 0061;
+1010A 0061;
+12452 0041;
+0B6A 0062;
+1244C 0062;
+2784 0021;
+1010B 0021;
+278E 003F;
+10143 003F;
+215D 0061;
+2784 0041;
+0CEB 0061;
+10143 0061;
+12439 0041;
+0BEB 0062;
+12439 0062;
+2785 0021;
+1010C 0021;
+0A6C 003F;
+248D 0061;
+2086 0041;
+194C 0041;
+12440 0061;
+096C 0062;
+33E5 0021;
+06F7 0021;
+12429 0021;
+0C6D 003F;
+215E 0021;
+2077 0041;
+0D6D 0041;
+1241B 0061;
+06F7 0062;
+12429 0062;
+2787 0021;
+1010E 0021;
+0A6E 003F;
+248F 0061;
+2088 0041;
+194E 0041;
+12444 0061;
+096E 0062;
+33E7 0021;
+06F9 0021;
+1242B 0021;
+0BEF 003F;
+2490 0041;
+0669 0061;
+19D9 0061;
+12447 0061;
+07C9 0062;
+12446 0062;
+000F 0061;
+008D 0061;
+0599 0061;
+0610 0061;
+0F35 0061;
+2060 0061;
+FE07 0061;
+1D174 0061;
+1FFFF 0061;
+E0024 0061;
+E0042 0061;
+E0060 0061;
+E007E 0061;
+E011C 0061;
+E013A 0061;
+E0158 0061;
+E0176 0061;
+E0194 0061;
+E01B2 0061;
+E01D0 0061;
+E01EE 0061;
+001D 0041;
+009B 0041;
+05A7 0041;
+06DE 0041;
+1B6E 0041;
+D804 0041;
+FFFA 0041;
+1D182 0041;
+8FFFF 0041;
+E0032 0041;
+E0050 0041;
+E006E 0041;
+E010C 0041;
+E012A 0041;
+E0148 0041;
+E0166 0041;
+E0184 0041;
+E01A2 0041;
+E01C0 0041;
+E01DE 0041;
+0061 0334 0300;
+0061 0334 0306 0303;
+0061 0302 0300 0334;
+0061 030A 0334;
+0061 0334 0303;
+0100 0334;
+0041 0334 0323 0306;
+0340 0061;
+0304 0041;
+031B 0041;
+032C 0041;
+033C 0041;
+0351 0041;
+FE22 0061;
+1DCA 0041;
+05B8 0041;
+064D 0041;
+FE7D 0041;
+0657 0041;
+0735 0041;
+0744 0041;
+07F3 0041;
+0A02 0041;
+0C03 0041;
+10A0D 0041;
+0EC9 0041;
+17C9 0041;
+302B 0041;
+20D6 0041;
+20E5 0041;
+1D552 0021;
+00E0 0021;
+00C4 0021;
+1D41A 003F;
+00AA 003F;
+00E5 003F;
+1EAC 003F;
+1D44E 0061;
+FF21 0041;
+1D43 0061;
+1EB4 0041;
+00E5 0041;
+0105 0041;
+1EAC 0041;
+1D538 0062;
+1EA7 0062;
+0200 0062;
+01E3 0021;
+3373 0021;
+1D01 0021;
+0251 0041;
+000F 0062;
+008D 0062;
+0599 0062;
+0610 0062;
+0F35 0062;
+2060 0062;
+FE07 0062;
+1D174 0062;
+1FFFF 0062;
+E0024 0062;
+E0042 0062;
+E0060 0062;
+E007E 0062;
+E011C 0062;
+E013A 0062;
+E0158 0062;
+E0176 0062;
+E0194 0062;
+E01B2 0062;
+E01D0 0062;
+E01EE 0062;
+0300 0062;
+031B 0062;
+033D 0062;
+FE22 0062;
+05C7 0062;
+FC5E 0062;
+0736 0062;
+093C 0062;
+0CBC 0062;
+0ECA 0062;
+302C 0062;
+20E6 0062;
+1D435 0021;
+1D5BB 003F;
+0062 0061;
+24D1 0061;
+1D63D 0041;
+1D4B7 0062;
+1E02 0062;
+1D03 0021;
+0183 0041;
+010A 0334;
+1D5F0 0021;
+010A 0021;
+1D46A 003F;
+2106 0061;
+1D450 0041;
+1D60A 0061;
+010C 0061;
+1D588 0062;
+010C 0062;
+339D 0041;
+0188 0062;
+1E0B 0334;
+0064 0021;
+1D56F 0021;
+2146 003F;
+1D63F 003F;
+2146 0061;
+0044 0061;
+1D5D7 0041;
+1E0F 0061;
+1D555 0062;
+1E0B 0062;
+3377 0021;
+02A3 0061;
+1D05 0021;
+0257 0021;
+0065 0301 0334;
+0065 0302 0334 0341;
+0065 030C 0334;
+0065 0334 0306 0327;
+0065 0334 0304 0300;
+0065 0302 0334 0323;
+1D4EE 0021;
+00C9 0021;
+0112 0021;
+1D58A 003F;
+0115 003F;
+1E15 003F;
+1D58A 0061;
+1D4D4 0061;
+00E9 0061;
+1EC2 0061;
+0113 0061;
+1EC6 0061;
+2130 0062;
+1EC4 0062;
+1EB8 0062;
+0247 0062;
+0259 0061;
+2107 0041;
+025C 0062;
+029A 0041;
+FF26 0021;
+1D627 003F;
+1D4BB 0061;
+1D405 0061;
+1E1F 0041;
+1D4D5 0062;
+FB01 0061;
+0192 003F;
+0047 0334 0306;
+0047 0334 0304;
+1D60E 0021;
+1D5C0 003F;
+01E7 003F;
+1D524 0041;
+1D4A2 0041;
+01E6 0061;
+1D5F4 0062;
+01E6 0062;
+1DA2 003F;
+1D83 0041;
+0194 0061;
+0068 0334 0308;
+0068 0334 0331;
+1D573 0021;
+210E 003F;
+02B0 003F;
+1D4F1 0061;
+210D 0061;
+0125 0061;
+0127 0061;
+210B 0062;
+1E96 0062;
+01F6 0021;
+2C75 0021;
+0049 0341 0334;
+00EF 0334;
+0049 0304 0334;
+0049 0330 0334;
+1D408 0021;
+0128 0021;
+1D5C2 003F;
+012D 003F;
+FF49 0041;
+1D5C2 0041;
+1D470 0041;
+00EE 0041;
+1EC9 0041;
+1D526 0062;
+00CD 0062;
+2171 0021;
+33CC 0021;
+0131 0021;
+0268 0021;
+0269 0021;
+FF4A 0021;
+1D679 0021;
+1D4D9 003F;
+1D62B 0061;
+1D575 0061;
+01F0 0041;
+1D611 0062;
+0248 0061;
+006B 0334 0341;
+1E35 0334;
+1D542 0021;
+1D5C4 003F;
+0136 003F;
+1D5C4 0041;
+1D4DA 0041;
+1E32 0041;
+1D43E 0062;
+3389 0021;
+33A2 003F;
+33BE 0021;
+2C6A 0021;
+006C 0334 0327;
+1E3A 0334;
+1D5AB 0021;
+1D48D 003F;
+1D38 003F;
+FF4C 0041;
+1D695 0041;
+1D5AB 0041;
+1E38 0041;
+24DB 0062;
+1E3D 0062;
+33D1 0062;
+029F 0061;
+2C60 0062;
+026D 0061;
+004D 0334 0301;
+1D5C6 0021;
+1E42 0021;
+1D5AC 003F;
+33A5 003F;
+1D52A 0041;
+1D40C 0041;
+3383 0021;
+1D4DC 0062;
+338E 0061;
+339C 0061;
+33BD 003F;
+0271 003F;
+006E 0303 0334;
+006E 0331 0334;
+1D511 0021;
+1D427 003F;
+207F 003F;
+1D55F 0061;
+1D4A9 0061;
+0143 0061;
+1E49 0061;
+1D475 0062;
+1E48 0062;
+2116 0062;
+1D3B 0062;
+019E 0061;
+014A 003F;
+00F2 0334;
+004F 0334 0302 0340;
+00D6 0334;
+00F5 0308 0334;
+006F 0334 0328;
+014D 0340 0334;
+006F 031B 0334 0301;
+1EDE 0334;
+1D45C 0021;
+2092 0021;
+1E4F 0021;
+1EDB 0021;
+24DE 003F;
+1ED0 003F;
+01FE 003F;
+1ECC 003F;
+1D5C8 0041;
+1D546 0041;
+00F4 0041;
+022A 0041;
+00F8 0041;
+1ECE 0041;
+1EE3 0041;
+1D40E 0062;
+1ED7 0062;
+01ED 0062;
+0153 0021;
+1D14 0021;
+1D12 0021;
+0275 0021;
+1D3D 0061;
+1D4F9 0021;
+1E57 0021;
+1D617 003F;
+1D665 0061;
+1D5E3 0061;
+1E56 0041;
+1D40F 0062;
+33D7 003F;
+33BA 003F;
+01A4 0021;
+1D4FA 0021;
+1D492 003F;
+FF51 0061;
+0051 0061;
+24C6 0061;
+1D618 0062;
+0072 0334 0301;
+0210 0334;
+FF52 0021;
+1D681 0021;
+1D4FB 003F;
+0154 003F;
+1D597 0061;
+1D479 0061;
+0155 0041;
+1E5C 0041;
+1D597 0062;
+1E59 0062;
+1D19 003F;
+1D1A 003F;
+2C64 0021;
+02B6 0061;
+0053 0334 030C;
+1E63 0307 0334;
+24E2 0021;
+015F 0021;
+1D47A 003F;
+1E68 003F;
+1D5CC 0041;
+1D54A 0041;
+1E66 0041;
+1D4C8 0062;
+1E65 0062;
+00DF 0021;
+0282 0021;
+1D8B 0021;
+0164 0334;
+1E71 0334;
+FF34 0021;
+1E6F 0021;
+1D5E7 003F;
+1D495 0061;
+1D413 0061;
+1D40 0061;
+1E6E 0061;
+1D5E7 0062;
+2121 0041;
+02A7 0041;
+1D75 0041;
+0288 0062;
+016D 0334;
+00FC 0334 0301;
+0075 030B 0334;
+0055 0334 0304;
+01B0 0334;
+0075 0334 031B 0309;
+0055 0334 032D;
+1D448 0021;
+01D8 0021;
+1EEB 0021;
+1D66A 003F;
+01D4 003F;
+0217 003F;
+1D496 0061;
+1D414 0061;
+1D64 0061;
+00DC 0061;
+0173 0061;
+1EE8 0061;
+1E75 0061;
+1D580 0062;
+01D6 0062;
+1EF1 0062;
+1D1E 0021;
+1D99 0021;
+1D5A 003F;
+1DB7 003F;
+FF56 0021;
+1D61D 0021;
+2164 003F;
+036E 0061;
+24E5 0061;
+1D5E9 0041;
+1D5CF 0062;
+2165 0021;
+1D20 003F;
+0245 0021;
+0077 0302 0334;
+1D464 0021;
+1D42 0021;
+0057 003F;
+1E88 003F;
+1D6A0 0041;
+1D61E 0041;
+1E86 0041;
+1D582 0062;
+1D21 0041;
+1D535 0021;
+1E8B 0021;
+1D583 003F;
+1D605 0061;
+1D51B 0061;
+1E8C 0041;
+1D4E7 0062;
+217B 0061;
+0059 0302 0334;
+0079 0309 0334;
+1D418 0021;
+1EF7 0021;
+1D5B8 003F;
+1D432 0061;
+FF39 0061;
+02B8 0061;
+0232 0061;
+1D480 0062;
+1EF5 0062;
+017A 0334;
+007A 0334 0331;
+1D585 0021;
+1D5D3 003F;
+017B 003F;
+1D5D3 0041;
+1D4E9 0041;
+1E92 0041;
+1D585 0062;
+01B6 0021;
+0290 0021;
+2C6C 0041;
+01EE 0041;
+01BA 0062;
+01BF 0061;
+01BC 0062;
+02C0 0062;
+02E4 0062;
+02A1 0062;
+01C3 0062;
+03B1 0334 0313 0301;
+0391 0345 0313 0334 0300;
+1F09 0334;
+0391 0345 0314 0334 0340;
+1F71 0334;
+03B1 0334 0345 0342;
+1F04 0021;
+03AC 0021;
+1F04 003F;
+03AC 003F;
+1D6A8 0061;
+1F06 0061;
+1F8B 0061;
+1FB0 0061;
+1F04 0062;
+03AC 0062;
+1D66 0021;
+0392 0061;
+1D66 0062;
+1D792 003F;
+1D792 0041;
+1D773 0021;
+1D6FF 0041;
+1D5F 0062;
+1F19 0334;
+0395 0334 0300;
+1F1D 0021;
+1F1C 003F;
+1D6DC 0041;
+1F12 0041;
+1D6DC 0062;
+1FC9 0062;
+03DA 0041;
+1D701 0061;
+1D721 0062;
+03B7 0334 0343 0340;
+1FC3 0313 0334;
+03B7 0314 0334 0340;
+1FCC 0314 0342 0334;
+03B7 0334 0340 0345;
+1F24 0021;
+03AE 0021;
+1F22 003F;
+1FC4 003F;
+1D75C 0041;
+1F90 0061;
+1F9F 0061;
+03B7 0062;
+1F25 0062;
+1D703 0021;
+1D78B 003F;
+1D6C9 0041;
+1D75D 0041;
+1DBF 0062;
+0399 0343 0334 0342;
+0399 0314 0342 0334;
+1FD6 0334;
+1D6CA 0021;
+1FDB 0021;
+1F34 003F;
+1FD9 003F;
+1F30 0041;
+1F3F 0041;
+1FD7 0041;
+1F3D 0062;
+1D6DE 0021;
+1D725 003F;
+1D6EB 0061;
+03D7 0041;
+1D740 0061;
+1D760 0062;
+1D727 003F;
+3382 003F;
+3395 0041;
+1D6EE 0021;
+1D6B4 0061;
+1D6EF 0021;
+1D6B5 0061;
+03BF 0313 0301 0334;
+03BF 0314 0340 0334;
+039F 0021;
+039F 003F;
+1D7B8 0061;
+1F41 0061;
+039F 0062;
+1D71B 0021;
+1D6F1 003F;
+03A0 0061;
+1D6F1 0062;
+03D8 0021;
+1D7C8 0021;
+1FE4 003F;
+1D6F2 0061;
+1D6B8 0062;
+1D7BC 0021;
+03C3 0041;
+1D768 0061;
+03FE 0021;
+1D6D5 0021;
+1D6D5 0041;
+03C5 0334 0343;
+03C5 0314 0334 0300;
+03C5 0340 0334;
+03CB 0340 0334;
+1F55 0021;
+1D7BE 003F;
+03CB 003F;
+1D6BC 0041;
+1F7B 0061;
+1FE2 0041;
+1F57 0062;
+1D78D 0021;
+1D69 003F;
+1D76B 0061;
+1D69 0062;
+03C7 0041;
+1D74C 0062;
+1D6BF 003F;
+1D6D9 0062;
+03A9 0343 0334 0341;
+1F6E 0334;
+1F61 0341 0334;
+03C9 0314 0342 0334;
+2126 0334 0341;
+2126 0345 0334;
+1F61 0021;
+1D714 003F;
+1F6D 003F;
+1D788 0061;
+1FA4 0041;
+1F6D 0041;
+1FFB 0061;
+1D76E 0062;
+1FA7 0062;
+03F8 0061;
+2C85 0061;
+2CB7 0061;
+2C8F 0061;
+2C95 0061;
+2C96 0062;
+2CBA 0062;
+2C9E 0062;
+2CA4 0062;
+2CAA 0062;
+2CB0 0062;
+03E2 0062;
+2CC6 0062;
+2CC8 0062;
+2CCC 0062;
+2CD2 0062;
+2CD6 0062;
+2CDA 0062;
+2CB2 0062;
+2CE0 0062;
+04D0 0334;
+04D2 0334;
+04D9 0041;
+04DA 0061;
+0412 003F;
+0490 0062;
+0494 0062;
+0500 0062;
+0433 0341 0021;
+0413 0341 0041;
+0415 0334 0308;
+0400 0062;
+04D7 0062;
+0416 0041;
+04DD 0041;
+0417 0001 0308 0061;
+04DF 0021;
+0405 0041;
+0418 0340 0334;
+0418 0001 0308 0061;
+04E4 0021;
+0406 0001 0308 0061;
+0457 0062;
+0439 0062;
+049A 003F;
+049E 003F;
+1D2B 0041;
+0459 0062;
+04CE 0062;
+04A2 003F;
+040A 003F;
+043E 0334 0308;
+04E8 0021;
+04EB 0041;
+04A6 0062;
+048E 0062;
+04AA 0062;
+04AC 0062;
+041A 0341 003F;
+0423 0304 0334;
+0443 0334 0306;
+0443 0334 0308;
+0443 0334 030B;
+04AE 0021;
+0424 0021;
+04FE 0021;
+0460 0021;
+047A 0021;
+0427 0021;
+04F5 0041;
+04CB 0062;
+04BE 0062;
+0429 0062;
+04F9 0021;
+042C 0041;
+042D 0041;
+04EC 0041;
+0465 0041;
+0469 0041;
+0471 0041;
+0474 030F 0334;
+04A8 003F;
+2C01 003F;
+2C04 003F;
+2C07 003F;
+2C0A 003F;
+2C0D 003F;
+2C10 003F;
+2C13 003F;
+2C16 003F;
+2C19 003F;
+2C1C 003F;
+2C1F 003F;
+2C22 003F;
+2C25 003F;
+2C28 003F;
+2C2B 003F;
+2C2E 003F;
+10A1 003F;
+10A3 003F;
+10A5 003F;
+10C1 003F;
+10A8 003F;
+10AA 003F;
+10DC 0062;
+10DD 0041;
+10DF 0041;
+10E1 0041;
+10F3 0041;
+10E4 0041;
+10E6 0041;
+10E8 0041;
+10EA 0041;
+10EC 0041;
+10EE 0041;
+10EF 0041;
+10F5 0041;
+10F9 0041;
+0533 003F;
+0587 0041;
+0568 0062;
+056B 0062;
+056E 0062;
+0571 0062;
+0574 0062;
+0575 0062;
+0578 0062;
+057B 0062;
+057E 0062;
+0551 003F;
+0554 003F;
+0559 0041;
+FB2E 0041;
+05D1 0061;
+05D3 0334 05BC;
+FB23 003F;
+FB4B 0062;
+05D8 0334 05BC;
+FB39 0041;
+FB3A 0021;
+FB25 0021;
+05DD 0041;
+05E1 003F;
+FB43 0021;
+FB46 003F;
+FB27 003F;
+FB2A 0021;
+FB4A 0334;
+10902 0062;
+10908 0062;
+1090E 0062;
+10914 0062;
+0627 0653 0021;
+FE84 003F;
+FB51 0041;
+FE85 0062;
+0626 0334;
+064A 0654 0062;
+FC98 0041;
+FCDF 0061;
+FBED 0041;
+FBF1 0041;
+FC68 0041;
+FBF6 0061;
+FE8E 0062;
+FE91 003F;
+FC06 0021;
+FC6A 003F;
+FC6D 003F;
+FC0A 0061;
+FB58 0021;
+FB5C 003F;
+0752 003F;
+0629 0061;
+FE97 0062;
+FC0C 0021;
+FC0D 0061;
+FCE3 0021;
+FD57 003F;
+FC0F 0021;
+062B 0041;
+FCE5 0021;
+FC13 0021;
+0679 0041;
+FB5F 0061;
+067F 0041;
+FE9E 0061;
+FDFB 003F;
+FDA5 003F;
+FB78 003F;
+0684 0041;
+FB7B 0061;
+FB7F 0061;
+FEA3 0062;
+FD5B 003F;
+FEA7 0021;
+FC19 0061;
+FD04 0021;
+0758 003F;
+FEAC 0041;
+068A 003F;
+068D 0061;
+0690 003F;
+FEAE 0041;
+FEAF 0041;
+0694 003F;
+FB8A 0041;
+FEB3 0021;
+FCAD 0061;
+FC1D 0041;
+FDC6 003F;
+FD61 003F;
+FCE8 0061;
+FEB7 003F;
+FD37 0041;
+FD2E 0062;
+FD39 0041;
+FCE9 0041;
+FCEA 0021;
+069A 003F;
+FEBB 0021;
+FC20 0061;
+FD0F 0061;
+FC21 0061;
+FD06 0061;
+FC22 0021;
+FC24 0021;
+FC25 0021;
+069D 003F;
+FEC2 0061;
+FC27 0041;
+FCF5 0061;
+FEC6 0061;
+FECB 0021;
+FC29 0061;
+FD76 0021;
+FCF8 0021;
+FECF 0062;
+FD7B 003F;
+06A0 003F;
+FED3 003F;
+FC2E 0021;
+FC30 0021;
+FC32 0061;
+06A4 0041;
+06A6 0041;
+FED7 0021;
+FC33 0061;
+FD7F 003F;
+06A7 003F;
+FEDB 0062;
+FC39 0061;
+FCC7 0062;
+FDBB 0061;
+FB90 0021;
+06AB 003F;
+FBD5 0062;
+FB94 0062;
+FB9C 0062;
+FB98 0062;
+FEDF 003F;
+FEF7 0021;
+FC3F 0021;
+FDAC 003F;
+FD81 003F;
+FC85 003F;
+FCCD 003F;
+06B6 003F;
+06FE 003F;
+FC45 0061;
+FC46 0061;
+FC47 0061;
+FC48 0041;
+FEE7 0021;
+FC4B 0061;
+FDC7 003F;
+FC4D 0021;
+FCEE 0041;
+FCEF 0061;
+06BA 0061;
+FBA2 0062;
+0769 003F;
+FEEC 0062;
+FD94 003F;
+FBAB 0061;
+FBA7 0061;
+06C0 003F;
+FEED 0041;
+FBE1 0041;
+FBD8 0041;
+FBDB 0062;
+FBDF 0041;
+FBE9 0041;
+06E6 0061;
+FCDA 0062;
+FCDC 0062;
+FC93 0062;
+FCDE 0062;
+FBFD 003F;
+FBE5 0021;
+06D2 0021;
+0710 0021;
+0716 0021;
+074D 0021;
+071F 0021;
+0723 0041;
+0729 0021;
+079A 0021;
+0785 0021;
+07A5 0021;
+0798 0021;
+078F 0021;
+0792 0021;
+07B1 0021;
+07AB 0021;
+07CA 0021;
+07D0 0021;
+07D6 0021;
+07D9 0041;
+07DF 0021;
+07E5 0021;
+2D31 0021;
+2D37 0021;
+2D3D 0021;
+2D43 0021;
+2D49 0021;
+2D4F 0021;
+2D55 0021;
+2D5B 0021;
+2D61 0021;
+1200 0021;
+1206 0021;
+120C 0021;
+1211 0021;
+1217 0021;
+121D 0021;
+1383 0021;
+1224 0021;
+122A 0021;
+2D82 0021;
+1235 0021;
+123A 0021;
+2D84 0021;
+1245 0021;
+124C 0021;
+1254 0021;
+125C 0021;
+1264 0021;
+1386 0021;
+126B 0021;
+1271 0021;
+1277 0021;
+127C 0021;
+1281 0021;
+1287 0021;
+1290 0021;
+1296 0021;
+129B 0021;
+12A0 0021;
+12A6 0021;
+12AB 0021;
+12B2 0021;
+12BA 0021;
+12C2 0021;
+12CA 0021;
+12D0 0021;
+12D6 0021;
+12DD 0021;
+12E2 0021;
+12E8 0021;
+12EE 0021;
+12F4 0021;
+12F9 0021;
+12FF 0021;
+1304 0021;
+1309 0021;
+130F 0021;
+1318 0021;
+131E 0021;
+1320 0021;
+1326 0021;
+132B 0021;
+1330 0021;
+1336 0021;
+133B 0021;
+1341 0021;
+1347 0021;
+134D 0021;
+138B 0021;
+1355 0021;
+138F 0021;
+2DA1 0021;
+2DA8 0021;
+2DAE 0021;
+2DB5 0021;
+2DBC 0021;
+2DC3 0021;
+2DCA 0021;
+2DD1 0021;
+2DD8 0021;
+2DDE 0021;
+0908 0021;
+0961 0021;
+0912 0021;
+0959 0334;
+0918 003F;
+091C 0062;
+0921 0021;
+0923 0061;
+0928 0061;
+097F 003F;
+0930 0021;
+0935 0061;
+097D 0061;
+0943 0061;
+0947 0061;
+094D 0021;
+098A 0021;
+0990 0021;
+0998 0021;
+099E 0021;
+09DD 0334;
+09A5 0062;
+09AC 0062;
+09F0 003F;
+09B9 003F;
+09C2 003F;
+09C7 0591 09BE 0061;
+0334 09CD;
+0A0A 0041;
+0A72 0041;
+0A39 0021;
+0A17 0061;
+0A5B 0021;
+0A21 003F;
+0A27 003F;
+0A2C 0041;
+0A32 0041;
+0A41 0021;
+0334 0A4D;
+0A88 0041;
+0AE1 0041;
+0A94 0041;
+0A9A 0041;
+0AA0 0041;
+0AA6 0041;
+0AAD 0041;
+0AB5 0041;
+0ABE 0041;
+0AC4 0041;
+0AC9 0041;
+0B07 003F;
+0B0C 003F;
+0B15 003F;
+0B1B 003F;
+0B21 0B3C 0334;
+0B24 0021;
+0B2B 0021;
+0B30 0021;
+0B37 0021;
+0B40 0021;
+0B47 1D165 0B56 0061;
+0B47 0B57 0041;
+0B85 0062;
+0B8E 0062;
+0B92 0BD7 0041;
+0B9F 003F;
+0BAE 003F;
+0BB4 003F;
+0BBE 003F;
+0BC6 0591 0BBE 0061;
+0BC7 0BBE 003F;
+0C05 0021;
+0C0B 0021;
+0C10 0021;
+0C17 0021;
+0C1D 0021;
+0C23 0021;
+0C2A 0021;
+0C30 0021;
+0C37 0021;
+0C41 0021;
+0C47 0062;
+0C4C 0062;
+0C86 0041;
+0CE0 0041;
+0C92 0041;
+0C98 0041;
+0C9E 0041;
+0CA4 0041;
+0CAB 0041;
+0CB1 0041;
+0CB9 0041;
+0CBF 0CD5 0021;
+0CE2 0021;
+0CC7 003F;
+0CCA 0001 0CD5 0061;
+0CD5 0021;
+0D09 0021;
+0D0E 0021;
+0D15 0021;
+0D1B 0021;
+0D21 0021;
+0D27 0021;
+0D2E 0021;
+0D34 0021;
+0D3E 0021;
+0D46 0021;
+0D46 0D3E 0041;
+0D4D 0334;
+0D89 0062;
+0D8F 0062;
+0D95 0062;
+0D9E 0062;
+0DA4 0062;
+0DAA 0062;
+0DB0 0062;
+0DB7 0062;
+0DC0 0062;
+0DC6 0062;
+0DD3 0061;
+0DD9 0001 0DDF 0061;
+0DDC 0041;
+0DD9 0DDF 003F;
+A801 0061;
+A807 0021;
+A80E 0021;
+A814 0021;
+A81A 0021;
+A820 0021;
+A826 0021;
+10A05 0021;
+10A13 0021;
+10A1B 0021;
+10A21 0021;
+10A27 0021;
+10A2D 0021;
+10A33 0021;
+0E42 0E01 0041;
+0E42 0E02 0041;
+0E42 0E03 0041;
+0E42 0E04 0041;
+0E42 0E05 0041;
+0E42 0E06 0041;
+0E42 0E07 0041;
+0E42 0E08 0041;
+0E42 0E09 0041;
+0E42 0E0A 0041;
+0E42 0E0B 0041;
+0E42 0E0C 0041;
+0E42 0E0D 0041;
+0E42 0E0E 0041;
+0E42 0E0F 0041;
+0E42 0E10 0041;
+0E42 0E11 0041;
+0E42 0E12 0041;
+0E42 0E13 0041;
+0E42 0E14 0041;
+0E42 0E15 0041;
+0E42 0E16 0041;
+0E42 0E17 0041;
+0E42 0E18 0041;
+0E42 0E19 0041;
+0E42 0E1A 0041;
+0E42 0E1B 0041;
+0E42 0E1C 0041;
+0E42 0E1D 0041;
+0E42 0E1E 0041;
+0E42 0E1F 0041;
+0E42 0E20 0041;
+0E42 0E21 0041;
+0E42 0E22 0041;
+0E42 0E23 0041;
+0E42 0E24 0041;
+0E42 0E25 0041;
+0E42 0E26 0041;
+0E42 0E27 0041;
+0E42 0E28 0041;
+0E42 0E29 0041;
+0E42 0E2A 0041;
+0E42 0E2B 0041;
+0E42 0E2C 0041;
+0E42 0E2D 0041;
+0E42 0E2E 0041;
+0E32 0041;
+0E37 0021;
+0E40 0062;
+0E40 1D165 0E0A 0061;
+0E40 1D165 0E14 0061;
+0E40 1D165 0E1E 0061;
+0E40 1D165 0E28 0061;
+0E41 0001 0E03 0061;
+0E41 0001 0E0D 0061;
+0E41 0001 0E17 0061;
+0E41 0001 0E21 0061;
+0E41 0001 0E2B 0061;
+0E42 0591 0E05 0061;
+0E42 0591 0E0F 0061;
+0E42 0591 0E19 0061;
+0E42 0591 0E23 0061;
+0E42 0591 0E2D 0061;
+0E43 1D165 0E07 0061;
+0E43 1D165 0E11 0061;
+0E43 1D165 0E1B 0061;
+0E43 1D165 0E25 0061;
+0E44 0061;
+0E44 0001 0E0A 0061;
+0E44 0001 0E14 0061;
+0E44 0001 0E1E 0061;
+0E44 0001 0E28 0061;
+0E81 0062;
+0E82 0062;
+0E84 0062;
+0E87 0062;
+0E88 0062;
+0E8A 0062;
+0E8D 0062;
+0E94 0062;
+0E95 0062;
+0E96 0062;
+0E97 0062;
+0E99 0062;
+0E9A 0062;
+0E9B 0062;
+0E9C 0062;
+0E9D 0062;
+0E9E 0062;
+0E9F 0062;
+0EA1 0062;
+0EA2 0062;
+0EA3 0062;
+0EA5 0062;
+0EA7 0062;
+0EAA 0062;
+0EAB 0062;
+0EC4 0EDC 0062;
+0EC4 0EDD 0062;
+0EAD 0062;
+0EAE 0062;
+0EAF 0062;
+0EB4 003F;
+0EB9 0061;
+0EC0 0591 0E84 0061;
+0EC0 0591 0E9A 0061;
+0EC0 0591 0EA7 0061;
+0EC1 1D165 0E82 0061;
+0EC1 1D165 0E99 0061;
+0EC1 1D165 0EA5 0061;
+0EC2 0001 0E82 0061;
+0EC2 0001 0E99 0061;
+0EC2 0001 0EA5 0061;
+0EC3 0591 0E81 0061;
+0EC3 0591 0E97 0061;
+0EC3 0591 0EA3 0061;
+0EC4 0062;
+0EC4 1D165 0E96 0061;
+0EC4 1D165 0EA2 0061;
+0F40 0061;
+0F42 0061;
+0F45 0061;
+0F49 0061;
+0F4C 0061;
+0F4F 0061;
+0FA1 0061;
+0F55 0061;
+0F58 0061;
+0F5B 0061;
+0FBA 0041;
+0FB0 0061;
+0FB2 003F;
+0FB3 0F71 0021;
+0FB5 0041;
+0F00 0041;
+0F71 003F;
+0334 0F80;
+0334 0F74 0F71;
+0FB2 0F80 0062;
+0FB3 0591 0F80 0061;
+0F7A 0021;
+0F84 0061;
+A845 0061;
+A86C 0061;
+A84D 0061;
+A853 0061;
+A868 0061;
+A85A 0061;
+A85D 0061;
+A85F 0061;
+1901 0061;
+1907 0061;
+190D 0061;
+1913 0061;
+1919 0061;
+1922 0061;
+1928 0061;
+1932 0061;
+1938 0061;
+1705 0061;
+170B 0061;
+1712 0061;
+1723 0021;
+1729 0021;
+172F 0021;
+1734 0041;
+1745 0041;
+174B 0041;
+1751 0041;
+1763 0041;
+1769 0041;
+1770 0041;
+1A03 0041;
+1A09 0041;
+1A0F 0041;
+1A15 0041;
+1A1A 0062;
+1004 0062;
+100A 0062;
+1010 0062;
+1016 0062;
+101C 0062;
+1020 0062;
+1025 102E 0041;
+1054 003F;
+1030 003F;
+1059 003F;
+1783 0062;
+1789 0062;
+178F 0062;
+1795 0062;
+179B 0062;
+17A1 0062;
+17A6 0062;
+17AC 0062;
+17B2 0062;
+17B8 0062;
+17BE 0062;
+17C4 0062;
+1953 0061;
+1959 0061;
+195F 0061;
+1965 0061;
+196B 0061;
+1973 0061;
+1984 0061;
+198A 0061;
+1990 0061;
+1996 0061;
+199C 0061;
+19A0 0061;
+19A6 0061;
+19B2 0061;
+19B8 0061;
+19BE 0061;
+19C4 0061;
+1B05 0061;
+1B07 1B35 0041;
+1B0B 1B35 0021;
+1B0F 0061;
+1B13 0062;
+1B17 0062;
+1B1D 0062;
+1B47 0062;
+1B48 0062;
+1B2D 0062;
+1B32 0062;
+1B37 0062;
+1B3C 003F;
+1B3F 0001 1B35 0061;
+1B42 1D165 1B35 0061;
+1882 0041;
+1820 0041;
+1845 0041;
+1846 0041;
+1826 0041;
+184A 0041;
+182B 0041;
+184E 0041;
+182F 0041;
+18A2 0041;
+1833 0041;
+185C 0041;
+1836 0041;
+1856 0041;
+1863 0041;
+186E 0041;
+1859 0041;
+185A 0041;
+188E 0041;
+1891 0041;
+18A3 0041;
+18A7 0041;
+13A4 003F;
+13AA 003F;
+13B0 003F;
+13B6 003F;
+13BC 003F;
+13C2 003F;
+13C8 003F;
+13CE 003F;
+13D4 003F;
+13DA 003F;
+13E0 003F;
+13E6 003F;
+13EC 003F;
+13F2 003F;
+1404 003F;
+140A 003F;
+1410 003F;
+1416 003F;
+141C 003F;
+1422 003F;
+1428 003F;
+142E 003F;
+1434 003F;
+143A 003F;
+1440 003F;
+1446 003F;
+144C 003F;
+1452 003F;
+1458 003F;
+145E 003F;
+1464 003F;
+146A 003F;
+1470 003F;
+1476 003F;
+147C 003F;
+1482 003F;
+1488 003F;
+148E 003F;
+1494 003F;
+149A 003F;
+14A0 003F;
+14A6 003F;
+14AC 003F;
+14B2 003F;
+14B8 003F;
+14BE 003F;
+14C4 003F;
+14CA 003F;
+14D0 003F;
+14D6 003F;
+14DC 003F;
+14E2 003F;
+14E8 003F;
+14EE 003F;
+14F4 003F;
+14FA 003F;
+1500 003F;
+1506 003F;
+150C 003F;
+1512 003F;
+1518 003F;
+151E 003F;
+1524 003F;
+152A 003F;
+1530 003F;
+1536 003F;
+153C 003F;
+1542 003F;
+1548 003F;
+154E 003F;
+1554 003F;
+155A 003F;
+1560 003F;
+1566 003F;
+156C 003F;
+1572 003F;
+1578 003F;
+157E 003F;
+1584 003F;
+158A 003F;
+158F 003F;
+1595 003F;
+1676 003F;
+159B 003F;
+15A1 003F;
+157C 003F;
+15AC 003F;
+15B2 003F;
+15B8 003F;
+15BE 003F;
+15C4 003F;
+15CA 003F;
+15D0 003F;
+15D6 003F;
+15DC 003F;
+15E2 003F;
+15E8 003F;
+15EE 003F;
+15F4 003F;
+15FA 003F;
+1600 003F;
+1606 003F;
+160C 003F;
+1612 003F;
+1618 003F;
+161E 003F;
+1624 003F;
+162A 003F;
+1630 003F;
+1636 003F;
+163C 003F;
+1642 003F;
+1648 003F;
+164E 003F;
+1654 003F;
+165A 003F;
+1660 003F;
+1666 003F;
+166C 003F;
+1686 003F;
+168C 003F;
+1692 003F;
+1698 003F;
+16A2 0061;
+16A9 003F;
+16B1 003F;
+16B7 003F;
+16BA 0062;
+16C4 0021;
+16D5 0021;
+16EA 0061;
+16D3 0021;
+16D9 0041;
+16DE 003F;
+16E3 003F;
+16E7 0021;
+1100 0062;
+AC00 1175 0021;
+AC05 0061;
+1102 003F;
+1103 0041;
+FFA8 0062;
+1106 003F;
+1107 0041;
+FFB3 0062;
+3146 003F;
+FFB7 0062;
+FFB8 0062;
+110E 003F;
+110F 003F;
+1110 0041;
+FFBD 0061;
+FFBE 0062;
+D788 1175 0021;
+D7A2 0061;
+3166 0041;
+111A 0041;
+3171 0041;
+FFB4 0021;
+3175 0041;
+1128 0061;
+112C 003F;
+112F 003F;
+1133 0061;
+1138 0061;
+113E 0061;
+1143 0061;
+1148 0061;
+114D 0061;
+1153 0061;
+1158 003F;
+1160 0041;
+1162 0041;
+1164 0041;
+1166 0041;
+1168 0041;
+116A 0041;
+116C 0041;
+116E 0041;
+1170 0041;
+1172 0041;
+1174 0041;
+1177 0061;
+117D 0061;
+1183 0061;
+1187 0061;
+118C 0061;
+318A 0041;
+1195 0061;
+119B 0061;
+11A0 0061;
+FFA3 0021;
+11AC 0062;
+FFAA 0021;
+FFAC 0021;
+FFAE 0021;
+11B6 0061;
+11BC 0061;
+11C2 0061;
+3167 0041;
+11CC 003F;
+11D0 0061;
+11D5 0061;
+316D 0041;
+11DE 0061;
+11E3 0061;
+11E9 0061;
+11EF 0061;
+11F3 0061;
+11F9 0061;
+30A2 0061;
+30A3 0021;
+30A4 0062;
+30A5 003F;
+FF73 0062;
+3048 0061;
+32D4 0021;
+FF6B 0062;
+30AC 003F;
+330C 0021;
+304E 0021;
+3310 0062;
+3316 0062;
+30AF 0061;
+331A 0041;
+331C 003F;
+3054 0334;
+3054 0041;
+30B6 0021;
+3320 0021;
+30B7 0041;
+30B9 3099 0334;
+3059 0062;
+FF7E 0041;
+30BD 0021;
+305F 3099 0334;
+3060 0061;
+30C1 0061;
+30C5 0021;
+30C3 0062;
+FF83 0041;
+30C9 0021;
+3326 003F;
+3328 003F;
+31F4 003F;
+30CD 0041;
+3329 003F;
+3070 003F;
+3070 0041;
+30D2 0334 309A;
+32EA 0041;
+3330 0061;
+31F7 003F;
+32EB 0062;
+30D9 0334;
+333C 0021;
+307A 0062;
+30DB 0334 3099;
+3341 0041;
+307C 0062;
+FF8F 003F;
+3345 003F;
+307F 0062;
+3080 0041;
+30E1 0041;
+30E2 0041;
+334F 0061;
+32F4 0021;
+3350 003F;
+32F5 0061;
+FF97 0061;
+31FC 0062;
+308B 0041;
+308C 0041;
+31FF 003F;
+308F 003F;
+3357 0041;
+32FD 0021;
+30FA 003F;
+FF9D 0062;
+3108 0062;
+310C 0062;
+31AD 0062;
+3112 0062;
+3117 0061;
+311B 0061;
+31A5 0062;
+3121 0062;
+31B0 0062;
+31B3 0062;
+A001 0062;
+A007 0062;
+A00D 0062;
+A013 0062;
+A019 0062;
+A01F 0062;
+A025 0062;
+A02B 0062;
+A031 0062;
+A037 0062;
+A03D 0062;
+A043 0062;
+A049 0062;
+A04F 0062;
+A055 0062;
+A05B 0062;
+A061 0062;
+A067 0062;
+A06D 0062;
+A073 0062;
+A079 0062;
+A07F 0062;
+A085 0062;
+A08B 0062;
+A091 0062;
+A097 0062;
+A09D 0062;
+A0A3 0062;
+A0A9 0062;
+A0AF 0062;
+A0B5 0062;
+A0BB 0062;
+A0C1 0062;
+A0C7 0062;
+A0CD 0062;
+A0D3 0062;
+A0D9 0062;
+A0DF 0062;
+A0E5 0062;
+A0EB 0062;
+A0F1 0062;
+A0F7 0062;
+A0FD 0062;
+A103 0062;
+A109 0062;
+A10F 0062;
+A115 0062;
+A11B 0062;
+A121 0062;
+A127 0062;
+A12D 0062;
+A133 0062;
+A139 0062;
+A13F 0062;
+A145 0062;
+A14B 0062;
+A151 0062;
+A157 0062;
+A15D 0062;
+A163 0062;
+A169 0062;
+A16F 0062;
+A175 0062;
+A17B 0062;
+A181 0062;
+A187 0062;
+A18D 0062;
+A193 0062;
+A199 0062;
+A19F 0062;
+A1A5 0062;
+A1AB 0062;
+A1B1 0062;
+A1B7 0062;
+A1BD 0062;
+A1C3 0062;
+A1C9 0062;
+A1CF 0062;
+A1D5 0062;
+A1DB 0062;
+A1E1 0062;
+A1E7 0062;
+A1ED 0062;
+A1F3 0062;
+A1F9 0062;
+A1FF 0062;
+A205 0062;
+A20B 0062;
+A211 0062;
+A217 0062;
+A21D 0062;
+A223 0062;
+A229 0062;
+A22F 0062;
+A235 0062;
+A23B 0062;
+A241 0062;
+A247 0062;
+A24D 0062;
+A253 0062;
+A259 0062;
+A25F 0062;
+A265 0062;
+A26B 0062;
+A271 0062;
+A277 0062;
+A27D 0062;
+A283 0062;
+A289 0062;
+A28F 0062;
+A295 0062;
+A29B 0062;
+A2A1 0062;
+A2A7 0062;
+A2AD 0062;
+A2B3 0062;
+A2B9 0062;
+A2BF 0062;
+A2C5 0062;
+A2CB 0062;
+A2D1 0062;
+A2D7 0062;
+A2DD 0062;
+A2E3 0062;
+A2E9 0062;
+A2EF 0062;
+A2F5 0062;
+A2FB 0062;
+A301 0062;
+A307 0062;
+A30D 0062;
+A313 0062;
+A319 0062;
+A31F 0062;
+A325 0062;
+A32B 0062;
+A331 0062;
+A337 0062;
+A33D 0062;
+A343 0062;
+A349 0062;
+A34F 0062;
+A355 0062;
+A35B 0062;
+A361 0062;
+A367 0062;
+A36D 0062;
+A373 0062;
+A379 0062;
+A37F 0062;
+A385 0062;
+A38B 0062;
+A391 0062;
+A397 0062;
+A39D 0062;
+A3A3 0062;
+A3A9 0062;
+A3AF 0062;
+A3B5 0062;
+A3BB 0062;
+A3C1 0062;
+A3C7 0062;
+A3CD 0062;
+A3D3 0062;
+A3D9 0062;
+A3DF 0062;
+A3E5 0062;
+A3EB 0062;
+A3F1 0062;
+A3F7 0062;
+A3FD 0062;
+A403 0062;
+A409 0062;
+A40F 0062;
+A415 0062;
+A41B 0062;
+A421 0062;
+A427 0062;
+A42D 0062;
+A433 0062;
+A439 0062;
+A43F 0062;
+A445 0062;
+A44B 0062;
+A451 0062;
+A457 0062;
+A45D 0062;
+A463 0062;
+A469 0062;
+A46F 0062;
+A475 0062;
+A47B 0062;
+A481 0062;
+A487 0062;
+10300 0062;
+10306 0062;
+1030C 0062;
+10312 0062;
+10318 0062;
+1031E 0062;
+10335 0062;
+1033B 0062;
+10341 0062;
+10347 0062;
+10429 0061;
+1042C 0061;
+1042F 0061;
+10432 0061;
+10435 0061;
+10438 0061;
+1043B 0061;
+1043E 0061;
+10441 0061;
+10444 0061;
+10447 0061;
+1044A 0061;
+1044D 0061;
+10450 0062;
+10456 0062;
+1045C 0062;
+10462 0062;
+10468 0062;
+1046E 0062;
+10474 0062;
+1047A 0062;
+10480 0062;
+10486 0062;
+1048C 0062;
+10492 0062;
+10498 0062;
+10000 0062;
+10006 0062;
+1000D 0062;
+10013 0062;
+10019 0062;
+1001F 0062;
+10025 0062;
+1002C 0062;
+10032 0062;
+10038 0062;
+10040 0062;
+10046 0062;
+1004C 0062;
+10054 0062;
+1005A 0062;
+10082 0062;
+10088 0062;
+1008E 0062;
+10094 0062;
+1009A 0062;
+100A0 0062;
+100A6 0062;
+100AC 0062;
+100B2 0062;
+100B8 0062;
+100BE 0062;
+100C4 0062;
+100CA 0062;
+100D0 0062;
+100D6 0062;
+100DC 0062;
+100E2 0062;
+100E8 0062;
+100EE 0062;
+100F4 0062;
+100FA 0062;
+10805 0062;
+1080E 0062;
+10814 0062;
+1081A 0062;
+10820 0062;
+10826 0062;
+1082C 0062;
+10832 0062;
+1083C 0062;
+10384 0062;
+1038A 0062;
+10390 0062;
+10396 0062;
+1039C 0062;
+103A4 0062;
+103AA 0062;
+103B0 0062;
+103B6 0062;
+103BC 0062;
+103C2 0062;
+103CC 0062;
+12002 0062;
+12008 0062;
+1200E 0062;
+12014 0062;
+1201A 0062;
+12020 0062;
+12026 0062;
+1202C 0062;
+12032 0062;
+12038 0062;
+1203E 0062;
+12044 0062;
+1204A 0062;
+12050 0062;
+12056 0062;
+1205C 0062;
+12062 0062;
+12068 0062;
+1206E 0062;
+12074 0062;
+1207A 0062;
+12080 0062;
+12086 0062;
+1208C 0062;
+12092 0062;
+12098 0062;
+1209E 0062;
+120A4 0062;
+120AA 0062;
+120B0 0062;
+120B6 0062;
+120BC 0062;
+120C2 0062;
+120C8 0062;
+120CE 0062;
+120D4 0062;
+120DA 0062;
+120E0 0062;
+120E6 0062;
+120EC 0062;
+120F2 0062;
+120F8 0062;
+120FE 0062;
+12104 0062;
+1210A 0062;
+12110 0062;
+12116 0062;
+1211C 0062;
+12122 0062;
+12128 0062;
+1212E 0062;
+12134 0062;
+1213A 0062;
+12140 0062;
+12146 0062;
+1214C 0062;
+12152 0062;
+12158 0062;
+1215E 0062;
+12164 0062;
+1216A 0062;
+12170 0062;
+12176 0062;
+1217C 0062;
+12182 0062;
+12188 0062;
+1218E 0062;
+12194 0062;
+1219A 0062;
+121A0 0062;
+121A6 0062;
+121AC 0062;
+121B2 0062;
+121B8 0062;
+121BE 0062;
+121C4 0062;
+121CA 0062;
+121D0 0062;
+121D6 0062;
+121DC 0062;
+121E2 0062;
+121E8 0062;
+121EE 0062;
+121F4 0062;
+121FA 0062;
+12200 0062;
+12206 0062;
+1220C 0062;
+12212 0062;
+12218 0062;
+1221E 0062;
+12224 0062;
+1222A 0062;
+12230 0062;
+12236 0062;
+1223C 0062;
+12242 0062;
+12248 0062;
+1224E 0062;
+12254 0062;
+1225A 0062;
+12260 0062;
+12266 0062;
+1226C 0062;
+12272 0062;
+12278 0062;
+1227E 0062;
+12284 0062;
+1228A 0062;
+12290 0062;
+12296 0062;
+1229C 0062;
+122A2 0062;
+122A8 0062;
+122AE 0062;
+122B4 0062;
+122BA 0062;
+122C0 0062;
+122C6 0062;
+122CC 0062;
+122D2 0062;
+122D8 0062;
+122DE 0062;
+122E4 0062;
+122EA 0062;
+122F0 0062;
+122F6 0062;
+122FC 0062;
+12302 0062;
+12308 0062;
+1230E 0062;
+12314 0062;
+1231A 0062;
+12320 0062;
+12326 0062;
+1232C 0062;
+12332 0062;
+12338 0062;
+1233E 0062;
+12344 0062;
+1234A 0062;
+12350 0062;
+12356 0062;
+1235C 0062;
+12362 0062;
+12368 0062;
+1236E 0062;
+319C 0062;
+3282 0061;
+F967 0062;
+3197 0062;
+2F800 0062;
+2E83 0062;
+3281 003F;
+2F08 0061;
+32AD 0062;
+FA30 0061;
+2F808 0062;
+329D 0062;
+2F80F 0062;
+2F0B 0061;
+2F0C 0061;
+2F817 0062;
+2F81B 0062;
+2F0F 0061;
+2E89 0062;
+F9FF 0062;
+F98A 0061;
+2F825 0062;
+2F827 0062;
+2F82A 0062;
+32A9 0062;
+303A 0062;
+2F18 0061;
+F91C 0062;
+2E81 0062;
+2F1D 0062;
+3294 0062;
+2F83F 0062;
+2F843 0062;
+FA7A 0061;
+FA0D 0062;
+FA38 0062;
+2F84B 0062;
+2F852 0062;
+FA10 0061;
+F94A 0062;
+2F21 0062;
+2F85E 0062;
+F909 0062;
+2F865 0062;
+2F986 0062;
+32AB 0062;
+F9AA 003F;
+2F872 0062;
+2F875 0041;
+F9BD 0062;
+2F878 0041;
+2F87C 0062;
+F9AB 0062;
+2F30 0062;
+2F887 0062;
+2F34 0062;
+F928 0061;
+2F35 0062;
+2F894 0061;
+2F3A 0062;
+2F89C 0062;
+2F89D 0062;
+2F8A0 0062;
+FA88 0062;
+2F8A8 0062;
+2F8AB 0062;
+FA8B 003F;
+2F3D 0062;
+2F3F 0062;
+FA02 0062;
+2F8BB 0062;
+2F8C0 0062;
+2F8C6 0062;
+2F41 0062;
+F969 0062;
+F983 0062;
+3290 0041;
+FA12 0061;
+FA06 0062;
+328A 003F;
+2F8D8 0062;
+F9E1 0062;
+F9F4 0062;
+337F 0062;
+F9E2 0062;
+F914 0041;
+F91D 0062;
+2F8F3 0062;
+F9A5 0062;
+2F4F 0062;
+2F53 0062;
+2F8FE 0062;
+329F 0062;
+FA97 003F;
+2F901 0062;
+2F90E 0062;
+2F90C 0062;
+FA47 0061;
+F984 0062;
+2F55 0061;
+F9FB 0062;
+FA48 0061;
+F91E 0062;
+FA9E 0061;
+2F922 0062;
+2F924 0062;
+F92B 0062;
+F961 0061;
+F9AD 0062;
+2F92F 0062;
+F9EF 0062;
+2F63 0062;
+FAA3 0062;
+2F66 0061;
+FAA5 0062;
+2F6B 0062;
+2F6C 0061;
+2F946 0061;
+FA9D 0062;
+F93B 0061;
+F964 0062;
+FA4C 0061;
+2F953 0062;
+FA52 0062;
+2F72 0062;
+2F959 0062;
+F9F7 0061;
+FA56 0061;
+2F76 0062;
+2F969 0062;
+F9CF 0062;
+F957 0062;
+FA58 0062;
+FAB1 0062;
+2EB4 0062;
+2EB6 0041;
+2F7B 0062;
+FA5B 0041;
+2F97D 0062;
+2EBA 0062;
+2F983 0062;
+FA5C 0062;
+2F98C 0062;
+2F8A 0062;
+2EC0 0062;
+2F995 0062;
+F9FE 0062;
+F93E 0062;
+F958 0062;
+2F9A8 0062;
+F9F0 0062;
+2EC1 0062;
+2F8D 0062;
+2F9BD 0062;
+2F9C1 0062;
+2F9C4 0061;
+2F9C7 0062;
+F924 0062;
+2F92 0062;
+2EC7 0062;
+FABB 0062;
+FABA 0062;
+FABF 0062;
+2F95 0062;
+2F99 0062;
+F903 0062;
+2F9A 0062;
+2F9DA 0062;
+2F9DE 0062;
+F98D 0062;
+2FA1 0062;
+FA25 0061;
+2FA2 0061;
+2F9E4 0062;
+2FA4 0062;
+328E 0062;
+2F9E9 0062;
+2ED1 0061;
+F986 0062;
+F9C6 0062;
+F9DC 0062;
+F9EA 0062;
+F949 0062;
+FA1C 0061;
+FAC9 0062;
+FACA 0062;
+F9B4 0062;
+2FB5 0062;
+2EDF 0061;
+2FA04 0062;
+2FBA 0062;
+2FBB 0061;
+2FBE 0062;
+F939 0062;
+2FA0F 0062;
+2EE7 0062;
+2EE8 0062;
+F989 0062;
+2EEA 0062;
+2FCF 0062;
+2EEC 0062;
+2EEF 0062;
+2FD4 0041;
+9FA1 0062;
+FA0F 0062;
+FA23 0062;
+3401 0062;
+3407 0062;
+340D 0062;
+3413 0062;
+3419 0062;
+341F 0062;
+3425 0062;
+342B 0062;
+3431 0062;
+3437 0062;
+343D 0062;
+3443 0062;
+3449 0062;
+344F 0062;
+3455 0062;
+345B 0062;
+3461 0062;
+3467 0062;
+346D 0062;
+3473 0062;
+3479 0062;
+347F 0062;
+3485 0062;
+348B 0062;
+3491 0062;
+3497 0062;
+349D 0062;
+34A2 0062;
+34A8 0062;
+34AE 0062;
+34B4 0062;
+2F813 0062;
+34BE 0062;
+34C4 0062;
+34CA 0062;
+34D0 0062;
+34D6 0062;
+34DC 0062;
+34E1 0062;
+34E7 0062;
+34ED 0062;
+34F3 0062;
+34F9 0062;
+34FF 0062;
+3505 0062;
+350B 0062;
+3511 0062;
+3516 0062;
+351C 0062;
+3522 0062;
+3528 0062;
+352E 0062;
+3534 0062;
+353A 0062;
+3540 0062;
+3546 0062;
+354C 0062;
+3552 0062;
+3558 0062;
+355E 0062;
+3564 0062;
+356A 0062;
+3570 0062;
+3576 0062;
+357C 0062;
+3582 0062;
+3588 0062;
+358E 0062;
+3594 0062;
+359A 0062;
+35A0 0062;
+35A6 0062;
+35AC 0062;
+35B2 0062;
+35B8 0062;
+35BE 0062;
+35C4 0062;
+35CA 0062;
+35D0 0062;
+35D6 0062;
+35DC 0062;
+35E2 0062;
+35E8 0062;
+35EE 0062;
+35F4 0062;
+35FA 0062;
+3600 0062;
+3606 0062;
+360C 0062;
+3612 0062;
+3618 0062;
+361E 0062;
+3624 0062;
+362A 0062;
+3630 0062;
+3636 0062;
+363C 0062;
+3642 0062;
+3648 0062;
+364E 0062;
+3654 0062;
+365A 0062;
+3660 0062;
+3666 0062;
+366C 0062;
+3672 0062;
+3678 0062;
+367E 0062;
+3684 0062;
+368A 0062;
+3690 0062;
+3696 0062;
+369C 0062;
+36A2 0062;
+36A8 0062;
+36AE 0062;
+36B4 0062;
+36BA 0062;
+36C0 0062;
+36C6 0062;
+36CC 0062;
+36D2 0062;
+36D8 0062;
+36DE 0062;
+36E4 0062;
+36EA 0062;
+36EF 0062;
+36F5 0062;
+36FB 0062;
+3700 0062;
+3706 0062;
+370C 0062;
+3712 0062;
+3718 0062;
+371E 0062;
+3724 0062;
+372A 0062;
+3730 0062;
+3736 0062;
+373C 0062;
+3742 0062;
+3748 0062;
+374E 0062;
+3754 0062;
+375A 0062;
+3760 0062;
+3766 0062;
+376C 0062;
+3772 0062;
+3778 0062;
+377E 0062;
+3783 0062;
+3789 0062;
+378F 0062;
+3795 0062;
+379B 0062;
+37A1 0062;
+37A7 0062;
+37AD 0062;
+37B3 0062;
+37B9 0062;
+37BF 0062;
+37C5 0062;
+37CB 0062;
+37D1 0062;
+37D7 0062;
+37DD 0062;
+37E3 0062;
+37E9 0062;
+37EF 0062;
+37F5 0062;
+37FB 0062;
+3801 0062;
+3807 0062;
+380D 0062;
+3813 0062;
+3819 0062;
+381F 0062;
+3825 0062;
+382B 0062;
+3830 0062;
+3836 0062;
+383C 0062;
+3842 0062;
+3848 0062;
+384E 0062;
+3854 0062;
+385A 0062;
+3860 0062;
+3865 0062;
+386B 0062;
+3871 0062;
+3877 0062;
+2F88A 0062;
+3882 0062;
+3888 0062;
+388E 0062;
+3894 0062;
+389A 0062;
+38A0 0062;
+38A6 0062;
+38AC 0062;
+38B2 0062;
+38B8 0062;
+38BE 0062;
+38C4 0062;
+38C9 0062;
+38CF 0062;
+38D5 0062;
+38DB 0062;
+38E1 0062;
+38E6 0062;
+38EC 0062;
+38F2 0062;
+38F8 0062;
+38FE 0062;
+3904 0062;
+390A 0062;
+3910 0062;
+3916 0062;
+391C 0061;
+3921 0062;
+3927 0062;
+392D 0062;
+3933 0062;
+3939 0062;
+393E 0062;
+3944 0062;
+394A 0062;
+3950 0062;
+3956 0062;
+395C 0062;
+3962 0062;
+3968 0062;
+396E 0062;
+3974 0062;
+397A 0062;
+3980 0062;
+3986 0062;
+398C 0062;
+3992 0062;
+3998 0062;
+399E 0062;
+39A4 0062;
+39AA 0062;
+39B0 0062;
+39B6 0062;
+39BC 0062;
+39C2 0062;
+39C8 0062;
+39CE 0062;
+39D4 0062;
+39DA 0062;
+39E0 0062;
+39E6 0062;
+39EC 0062;
+39F2 0062;
+39F8 0062;
+39FE 0062;
+3A04 0062;
+3A0A 0062;
+3A10 0062;
+3A16 0062;
+3A1C 0062;
+3A22 0062;
+3A28 0062;
+3A2E 0061;
+3A33 0062;
+3A39 0062;
+3A3F 0062;
+3A45 0062;
+3A4B 0062;
+3A51 0062;
+3A57 0062;
+3A5D 0062;
+3A63 0062;
+3A69 0062;
+3A6E 0062;
+3A74 0062;
+3A7A 0062;
+3A80 0062;
+3A86 0062;
+3A8C 0062;
+3A92 0062;
+3A98 0062;
+3A9E 0062;
+3AA4 0062;
+3AAA 0062;
+3AB0 0062;
+3AB6 0062;
+3ABC 0062;
+3AC2 0062;
+3AC8 0062;
+3ACE 0062;
+3AD4 0062;
+3ADA 0062;
+3AE0 0062;
+3AE5 0062;
+3AEB 0062;
+3AF1 0062;
+3AF7 0062;
+3AFD 0062;
+3B03 0062;
+2F8D0 0062;
+3B0E 0062;
+3B14 0062;
+2F8CE 0062;
+3B1F 0062;
+3B25 0062;
+3B2B 0062;
+3B31 0062;
+3B37 0062;
+3B3D 0062;
+3B43 0062;
+3B49 0061;
+3B4E 0062;
+3B54 0062;
+3B5A 0062;
+3B60 0062;
+3B66 0062;
+3B6C 0062;
+3B72 0062;
+3B78 0062;
+3B7E 0062;
+3B84 0062;
+3B8A 0062;
+3B90 0062;
+3B96 0062;
+3B9C 0062;
+3BA0 0062;
+3BA6 0062;
+3BAC 0062;
+3BB2 0062;
+3BB8 0062;
+3BBE 0062;
+3BC4 0062;
+3BCA 0062;
+3BD0 0062;
+3BD6 0062;
+3BDC 0062;
+3BE2 0062;
+3BE8 0062;
+3BEE 0062;
+3BF4 0062;
+3BFA 0062;
+3C00 0062;
+3C06 0062;
+3C0C 0062;
+3C12 0062;
+3C18 0061;
+3C1D 0062;
+3C23 0062;
+3C29 0062;
+3C2F 0062;
+3C35 0062;
+3C3B 0062;
+3C41 0062;
+3C47 0062;
+3C4D 0062;
+3C52 0062;
+3C58 0062;
+3C5E 0062;
+3C64 0062;
+3C6A 0062;
+3C70 0062;
+3C76 0062;
+3C7C 0062;
+3C82 0062;
+3C88 0062;
+3C8E 0062;
+3C94 0062;
+3C9A 0062;
+3CA0 0062;
+3CA6 0062;
+3CAC 0062;
+3CB2 0062;
+3CB8 0062;
+3CBE 0062;
+3CC4 0062;
+3CCA 0062;
+3CD0 0062;
+3CD6 0062;
+3CDC 0062;
+3CE2 0062;
+3CE8 0062;
+3CEE 0062;
+3CF4 0062;
+3CFA 0062;
+3D00 0062;
+3D06 0062;
+3D0C 0062;
+3D12 0062;
+3D18 0062;
+3D1E 0062;
+3D24 0062;
+3D2A 0062;
+3D30 0062;
+3D35 0062;
+3D3B 0062;
+3D41 0062;
+3D47 0062;
+3D4D 0062;
+3D53 0062;
+3D59 0062;
+3D5F 0062;
+3D65 0062;
+3D6B 0062;
+3D71 0062;
+3D77 0062;
+3D7D 0062;
+3D83 0062;
+3D89 0062;
+3D8F 0062;
+3D95 0062;
+3D9A 0062;
+3DA0 0062;
+3DA6 0062;
+3DAC 0062;
+3DB2 0062;
+3DB8 0062;
+3DBE 0062;
+3DC4 0062;
+3DCA 0062;
+3DD0 0062;
+3DD6 0062;
+3DDC 0062;
+3DE2 0062;
+3DE8 0062;
+3DEE 0062;
+3DF4 0062;
+3DFA 0062;
+3E00 0062;
+3E06 0062;
+3E0C 0062;
+3E12 0062;
+3E18 0062;
+3E1E 0062;
+3E24 0062;
+3E2A 0062;
+3E30 0062;
+3E36 0062;
+3E3C 0062;
+3E42 0062;
+3E48 0062;
+3E4E 0062;
+3E54 0062;
+3E5A 0062;
+3E60 0062;
+3E66 0062;
+3E6C 0062;
+3E72 0062;
+3E78 0062;
+3E7E 0062;
+3E84 0062;
+3E8A 0062;
+3E90 0062;
+3E96 0062;
+3E9C 0062;
+3EA2 0062;
+3EA8 0062;
+3EAD 0062;
+3EB3 0062;
+3EB8 0041;
+3EBD 0062;
+3EC3 0062;
+3EC9 0062;
+3ECF 0062;
+3ED5 0062;
+3EDB 0062;
+3EE1 0062;
+3EE7 0062;
+3EED 0062;
+3EF3 0062;
+3EF9 0062;
+3EFF 0062;
+3F05 0062;
+3F0B 0062;
+3F11 0062;
+3F17 0062;
+3F1C 0062;
+3F22 0062;
+3F28 0062;
+3F2E 0062;
+3F34 0062;
+3F3A 0062;
+3F40 0062;
+3F46 0062;
+3F4C 0062;
+3F52 0062;
+3F58 0062;
+3F5E 0062;
+3F64 0062;
+3F6A 0062;
+3F70 0062;
+3F76 0062;
+3F7C 0062;
+3F82 0062;
+3F88 0062;
+3F8E 0062;
+3F94 0062;
+3F9A 0062;
+3FA0 0062;
+3FA6 0062;
+3FAC 0062;
+3FB2 0062;
+3FB8 0062;
+3FBE 0062;
+3FC4 0062;
+3FCA 0062;
+3FD0 0062;
+3FD6 0062;
+3FDC 0062;
+3FE2 0062;
+3FE8 0062;
+3FEE 0062;
+3FF4 0062;
+3FFA 0062;
+3FFF 0062;
+4005 0062;
+400A 0062;
+4010 0062;
+4016 0062;
+401B 0062;
+4021 0062;
+4027 0062;
+402D 0062;
+4033 0062;
+FAD4 003F;
+403D 0062;
+4043 0062;
+4048 0062;
+404E 0062;
+4054 0062;
+405A 0062;
+4060 0062;
+4066 0062;
+406C 0062;
+4072 0062;
+4078 0062;
+407E 0062;
+4084 0062;
+408A 0062;
+4090 0062;
+4096 0061;
+409B 0062;
+40A1 0062;
+40A7 0062;
+40AD 0062;
+40B3 0062;
+40B9 0062;
+40BF 0062;
+40C5 0062;
+40CB 0062;
+40D1 0062;
+40D7 0062;
+40DD 0062;
+40E3 0061;
+40E8 0062;
+40EE 0062;
+40F4 0062;
+40FA 0062;
+4100 0062;
+4106 0062;
+410C 0062;
+4112 0062;
+4118 0062;
+411E 0062;
+4124 0062;
+412A 0062;
+2F958 0062;
+4135 0062;
+413B 0062;
+4141 0062;
+4147 0062;
+414D 0062;
+4153 0062;
+4159 0062;
+415F 0062;
+4165 0062;
+416B 0062;
+4171 0062;
+4177 0062;
+417D 0062;
+4183 0062;
+4189 0062;
+418F 0062;
+4195 0062;
+419B 0062;
+41A1 0062;
+41A7 0062;
+41AD 0062;
+41B3 0062;
+41B9 0062;
+41BF 0062;
+41C5 0062;
+41CB 0062;
+41D1 0062;
+41D7 0062;
+41DD 0062;
+41E3 0062;
+41E9 0062;
+41EF 0062;
+41F5 0062;
+41FB 0062;
+4201 0062;
+4206 0062;
+420C 0062;
+4212 0062;
+4218 0062;
+421E 0062;
+4224 0062;
+4229 0062;
+422F 0062;
+4235 0062;
+423B 0062;
+4241 0062;
+4247 0062;
+424D 0062;
+4253 0062;
+4259 0062;
+425F 0062;
+4265 0062;
+426B 0062;
+4271 0062;
+4277 0062;
+427D 0062;
+4283 0062;
+4289 0062;
+428F 0062;
+4295 0062;
+429B 0062;
+2F967 0062;
+42A6 0062;
+42AC 0062;
+42B2 0062;
+42B8 0062;
+42BE 0062;
+42C4 0062;
+42CA 0062;
+42D0 0062;
+42D6 0062;
+42DC 0062;
+42E2 0062;
+42E8 0062;
+42EE 0062;
+42F4 0062;
+42FA 0062;
+4300 0062;
+4305 0062;
+430B 0062;
+4311 0062;
+4317 0062;
+431D 0062;
+4323 0062;
+4329 0062;
+432F 0062;
+2F971 0062;
+433A 0062;
+4340 0062;
+4346 0062;
+434C 0062;
+4352 0062;
+4358 0062;
+435D 0062;
+4363 0062;
+4369 0062;
+436F 0062;
+4375 0062;
+437B 0062;
+4381 0062;
+4387 0062;
+438D 0062;
+4393 0062;
+4399 0062;
+439F 0062;
+43A5 0062;
+43AB 0062;
+43B1 0062;
+43B7 0062;
+43BD 0062;
+43C3 0062;
+43C9 0062;
+43CF 0062;
+43D5 0061;
+2F8D7 0062;
+43DF 0062;
+43E5 0062;
+43EB 0062;
+43F1 0062;
+43F7 0062;
+43FD 0062;
+4403 0062;
+4409 0062;
+440E 0062;
+4414 0062;
+441A 0062;
+4420 0062;
+4426 0062;
+442C 0062;
+4432 0062;
+4438 0062;
+443E 0062;
+4444 0062;
+444A 0062;
+4450 0062;
+4456 0062;
+445C 0062;
+4462 0062;
+4468 0062;
+446D 0062;
+4473 0062;
+4479 0062;
+447F 0062;
+4485 0062;
+448B 0062;
+4491 0062;
+4497 0062;
+449D 0062;
+44A3 0062;
+44A9 0062;
+44AF 0062;
+44B5 0062;
+44BB 0062;
+44C1 0062;
+44C7 0062;
+44CD 0062;
+44D3 0062;
+44D9 0062;
+44DF 0062;
+44E5 0062;
+44EB 0062;
+44F1 0062;
+44F7 0062;
+44FD 0062;
+4503 0062;
+4509 0062;
+450F 0062;
+4515 0062;
+451B 0062;
+4521 0062;
+4527 0062;
+452C 0062;
+4532 0062;
+4538 0062;
+453E 0062;
+4544 0062;
+454A 0062;
+4550 0062;
+4556 0062;
+455C 0062;
+4561 0061;
+4566 0062;
+2F9B2 0062;
+4571 0062;
+4577 0062;
+457D 0062;
+4583 0062;
+4589 0062;
+458F 0062;
+4595 0062;
+459B 0062;
+45A1 0062;
+45A7 0062;
+45AD 0062;
+45B3 0062;
+45B9 0062;
+45BF 0062;
+45C5 0062;
+45CB 0062;
+45D1 0062;
+45D7 0061;
+45DC 0062;
+45E2 0062;
+45E8 0062;
+45EE 0062;
+45F4 0062;
+2F9C2 0062;
+45FF 0062;
+4605 0062;
+460B 0062;
+4611 0062;
+4617 0062;
+461D 0062;
+4623 0062;
+4629 0062;
+462F 0062;
+4635 0061;
+463A 0062;
+4640 0062;
+4646 0062;
+464C 0062;
+4652 0062;
+4658 0062;
+465E 0062;
+4664 0062;
+466A 0062;
+4670 0062;
+4676 0062;
+467C 0062;
+4682 0062;
+4688 0062;
+468E 0062;
+4694 0062;
+469A 0062;
+46A0 0062;
+46A6 0062;
+46AC 0062;
+46B2 0062;
+46B8 0062;
+46BE 0061;
+46C3 0062;
+46C8 0062;
+46CE 0062;
+46D4 0062;
+46DA 0062;
+46E0 0062;
+46E6 0062;
+46EC 0062;
+46F2 0062;
+46F8 0062;
+46FE 0062;
+4704 0062;
+470A 0062;
+4710 0062;
+4716 0062;
+471C 0062;
+4722 0062;
+4728 0062;
+472E 0062;
+4734 0062;
+473A 0062;
+4740 0062;
+4746 0062;
+474C 0062;
+4752 0062;
+4758 0062;
+475E 0062;
+4764 0062;
+476A 0062;
+4770 0062;
+4776 0062;
+477C 0062;
+4782 0062;
+4788 0062;
+478E 0062;
+4794 0062;
+479A 0062;
+47A0 0062;
+47A6 0062;
+47AC 0062;
+47B2 0062;
+47B8 0062;
+47BE 0062;
+47C4 0062;
+47CA 0062;
+47D0 0062;
+47D6 0062;
+47DC 0062;
+47E2 0062;
+47E8 0062;
+47EE 0062;
+47F4 0062;
+47FA 0062;
+4800 0062;
+4806 0062;
+480C 0062;
+4812 0062;
+4818 0062;
+481E 0062;
+4824 0062;
+482A 0062;
+4830 0062;
+4836 0062;
+483C 0062;
+4842 0062;
+4848 0062;
+484E 0062;
+4854 0062;
+485A 0062;
+4860 0062;
+4866 0062;
+486C 0062;
+4872 0062;
+4878 0062;
+487E 0062;
+4884 0062;
+488A 0062;
+4890 0062;
+4896 0062;
+489C 0062;
+48A2 0062;
+48A8 0062;
+48AE 0062;
+48B4 0062;
+48BA 0062;
+48C0 0062;
+48C6 0062;
+48CC 0062;
+48D2 0062;
+48D8 0062;
+48DE 0062;
+48E4 0062;
+48EA 0062;
+48F0 0062;
+48F6 0062;
+48FC 0062;
+4902 0062;
+4908 0062;
+490E 0062;
+4914 0062;
+491A 0062;
+4920 0062;
+4926 0062;
+492C 0062;
+4932 0062;
+4938 0062;
+493E 0062;
+4944 0062;
+494A 0062;
+4950 0062;
+4956 0062;
+495C 0062;
+4962 0062;
+4968 0062;
+496E 0062;
+4974 0062;
+497A 0062;
+4980 0062;
+4986 0062;
+498C 0062;
+4992 0062;
+4997 0062;
+499D 0062;
+49A3 0062;
+49A9 0062;
+49AF 0062;
+49B5 0062;
+49BB 0062;
+49C1 0062;
+49C7 0062;
+49CD 0062;
+49D3 0062;
+49D9 0062;
+49DF 0062;
+49E5 0062;
+49EA 0062;
+49F0 0062;
+49F6 0062;
+49FC 0062;
+4A02 0062;
+4A08 0062;
+4A0E 0062;
+4A14 0062;
+4A1A 0062;
+4A20 0062;
+4A26 0062;
+4A2C 0062;
+4A32 0062;
+4A38 0062;
+4A3E 0062;
+4A44 0062;
+4A4A 0062;
+4A50 0062;
+4A56 0062;
+4A5C 0062;
+4A62 0062;
+4A68 0062;
+4A6E 0061;
+4A73 0062;
+4A78 0062;
+4A7E 0062;
+4A84 0062;
+4A8A 0062;
+4A90 0062;
+4A96 0062;
+4A9C 0062;
+4AA2 0062;
+4AA8 0062;
+4AAE 0062;
+4AB3 0062;
+4AB9 0062;
+4ABF 0062;
+4AC5 0062;
+4ACB 0062;
+4AD1 0062;
+4AD7 0062;
+4ADD 0062;
+4AE3 0062;
+4AE9 0062;
+4AEF 0062;
+4AF5 0062;
+4AFB 0062;
+4B01 0062;
+4B07 0062;
+4B0D 0062;
+4B13 0062;
+4B19 0062;
+4B1F 0062;
+4B25 0062;
+4B2B 0062;
+4B31 0062;
+4B36 0062;
+4B3C 0062;
+4B42 0062;
+4B48 0062;
+4B4E 0062;
+4B54 0062;
+4B5A 0062;
+4B60 0062;
+4B66 0062;
+4B6C 0062;
+4B72 0062;
+4B78 0062;
+4B7E 0062;
+4B84 0062;
+4B8A 0062;
+4B90 0062;
+4B96 0062;
+4B9C 0062;
+4BA2 0062;
+4BA8 0062;
+4BAE 0062;
+4BB4 0062;
+4BBA 0062;
+4BC0 0062;
+4BC6 0062;
+4BCC 0062;
+4BD1 0062;
+4BD7 0062;
+4BDD 0062;
+4BE3 0062;
+4BE9 0062;
+4BEF 0062;
+4BF5 0062;
+4BFB 0062;
+4C01 0062;
+4C07 0062;
+4C0D 0062;
+4C13 0062;
+4C19 0062;
+4C1F 0062;
+4C25 0062;
+4C2B 0062;
+4C31 0062;
+4C37 0062;
+4C3D 0062;
+4C43 0062;
+4C49 0062;
+4C4F 0062;
+4C55 0062;
+4C5B 0062;
+4C61 0062;
+4C67 0062;
+4C6D 0062;
+4C73 0062;
+4C79 0062;
+4C7F 0062;
+4C85 0062;
+4C8B 0062;
+4C91 0062;
+4C97 0062;
+4C9D 0062;
+4CA3 0062;
+4CA9 0062;
+4CAF 0062;
+4CB5 0062;
+4CBB 0062;
+4CC1 0062;
+4CC7 0062;
+4CCD 0062;
+4CD2 0062;
+4CD8 0062;
+4CDE 0062;
+4CE4 0062;
+4CEA 0062;
+4CEF 0062;
+4CF5 0062;
+4CFA 0062;
+4D00 0062;
+4D06 0062;
+4D0C 0062;
+4D12 0062;
+4D18 0062;
+4D1E 0062;
+4D24 0062;
+4D2A 0062;
+4D30 0062;
+4D36 0062;
+4D3C 0062;
+4D42 0062;
+4D48 0062;
+4D4E 0062;
+4D54 0062;
+4D59 0062;
+4D5F 0062;
+4D65 0062;
+4D6B 0062;
+4D71 0062;
+4D77 0062;
+4D7D 0062;
+4D83 0062;
+4D89 0062;
+4D8F 0062;
+4D95 0062;
+4D9B 0062;
+4DA1 0062;
+4DA7 0062;
+4DAD 0062;
+4DB3 0062;
+20003 0062;
+2F816 0062;
+2F859 0062;
+2F87B 0062;
+2F8A4 0062;
+2F897 0062;
+2F8E3 0062;
+2F906 0062;
+2F923 0062;
+2F93C 0062;
+FAD5 0062;
+2F95D 0061;
+2F898 0062;
+2F97C 0062;
+2F9A6 0062;
+2F9C5 0062;
+2F9E0 0062;
+2F81C 0062;
+2FA10 0062;
+2A6D1 0062;
+0370 0062;
+E005 0062;
+F8FF 0062;
+E0003 0062;
+F0003 0062;
+F00FB 0062;
+FFF03 0062;
+FFFFB 0062;
+100003 0062;
+1000FB 0062;
+10FF03 0062;
+10FFFB 0062;
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt b/Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt
new file mode 100644
index 00000000000..9f9221c4be9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt
@@ -0,0 +1,4335 @@
+2007 0021;
+1FEF 0021;
+FE4C 003F;
+1FBF 0300 0334;
+1FFE 0341 0334;
+1FC0 0021;
+2013 003F;
+FE50 003F;
+003B 0021;
+0704 0021;
+16EB 0021;
+001D 0021;
+009B 0021;
+05A7 0021;
+06DE 0021;
+1B6E 0021;
+D804 0021;
+FFFA 0021;
+1D182 0021;
+8FFFF 0021;
+E0032 0021;
+E0050 0021;
+E006E 0021;
+E010C 0021;
+E012A 0021;
+E0148 0021;
+E0166 0021;
+E0184 0021;
+E01A2 0021;
+E01C0 0021;
+E01DE 0021;
+FE57 003F;
+0017 003F;
+0095 003F;
+05A1 003F;
+06D8 003F;
+180C 003F;
+206E 003F;
+FE0F 003F;
+1D17C 003F;
+5FFFF 003F;
+E002C 003F;
+E004A 003F;
+E0068 003F;
+E0106 003F;
+E0124 003F;
+E0142 003F;
+E0160 003F;
+E017E 003F;
+E019C 003F;
+E01BA 003F;
+E01D8 003F;
+FE56 0021;
+FE52 0021;
+1B5C 0021;
+104B 0021;
+1B5B 0021;
+1039F 0021;
+0022 0021;
+208D 003F;
+FE5B 0021;
+29FC 0021;
+298E 0021;
+2E09 0021;
+300B 003F;
+3014 0021;
+FD3F 0021;
+002F 0021;
+FF05 0021;
+2033 0021;
+2042 0021;
+2E16 0021;
+180A 0021;
+0F0B 003F;
+17D9 0021;
+02BA 0021;
+02D2 0021;
+02EC 0021;
+02FC 0021;
+A701 0021;
+A710 0021;
+060E 0021;
+0CF2 0021;
+0F1C 0021;
+0FC4 0021;
+19E6 0021;
+19F5 0021;
+1B65 0021;
+2104 0021;
+2143 0021;
+2193 0021;
+21A1 0021;
+21B1 0021;
+21C0 0021;
+21CD 003F;
+21DB 0021;
+21EA 0021;
+21F9 0021;
+2203 0338 0334;
+220B 0338 0334;
+FE62 003F;
+FE66 003F;
+007E 0021;
+221D 0021;
+222A 0021;
+2238 0021;
+2245 0338 0334;
+2250 0021;
+225F 0021;
+226A 0021;
+227A 0338 0334;
+2282 0021;
+228E 0021;
+2299 0021;
+22A6 0021;
+22B2 0021;
+22BA 0021;
+22C9 0021;
+22D8 0021;
+22EF 0021;
+22FE 0021;
+230D 0021;
+231C 0021;
+232D 0021;
+233C 0021;
+234B 0021;
+235A 0021;
+2369 0021;
+2378 0021;
+2387 0021;
+2396 0021;
+23A5 0021;
+23B4 0021;
+23C3 0021;
+23D2 0021;
+23E1 0021;
+2408 0021;
+2417 0021;
+2426 0021;
+2502 003F;
+2511 0021;
+2520 0021;
+252F 0021;
+253E 0021;
+254D 0021;
+255C 0021;
+256B 0021;
+257A 0021;
+2589 0021;
+2598 0021;
+25A6 0021;
+25B5 0021;
+25C4 0021;
+25D2 0021;
+25E1 0021;
+25F0 0021;
+25FF 0021;
+260E 0021;
+261D 0021;
+262C 0021;
+2643 0021;
+2652 0021;
+2661 0021;
+2673 0021;
+2682 0021;
+2697 0021;
+26A9 0021;
+2707 0021;
+2718 0021;
+2727 0021;
+2737 0021;
+2746 0021;
+275B 0021;
+276C 0021;
+279C 0021;
+27AB 0021;
+27BB 0021;
+27D0 0021;
+27DF 0021;
+27F2 0021;
+2901 0021;
+2910 0021;
+291F 0021;
+292E 0021;
+293D 0021;
+294C 0021;
+295B 0021;
+296A 0021;
+2979 0021;
+299E 0021;
+29AD 0021;
+29BC 0021;
+29CB 0021;
+29DA 0021;
+29E9 0021;
+29F8 0021;
+2A09 0021;
+2A19 0021;
+2A28 0021;
+2A37 0021;
+2A46 0021;
+2A55 0021;
+2A64 0021;
+2A73 0021;
+2A85 0021;
+2A94 0021;
+2AA3 0021;
+2AB2 0021;
+2AC1 0021;
+2AD0 0021;
+2ADE 0021;
+2AED 0021;
+2AFC 0021;
+2B0B 0021;
+2B1A 0021;
+2804 0021;
+2813 0021;
+2822 0021;
+2831 0021;
+2840 0021;
+284F 0021;
+285E 0021;
+286D 0021;
+287C 0021;
+288B 0021;
+289A 0021;
+28A9 0021;
+28B8 0021;
+28C7 0021;
+28D6 0021;
+28E5 0021;
+28F4 0021;
+268D 0021;
+4DC4 0021;
+4DD3 0021;
+4DE2 0021;
+4DF1 0021;
+1D300 0021;
+1D30F 0021;
+1D31E 0021;
+1D32D 0021;
+1D33C 0021;
+1D34B 0021;
+A493 0021;
+A4A2 0021;
+A4B1 0021;
+A4C0 0021;
+1013F 0021;
+10187 0021;
+1D00C 0021;
+1D01B 0021;
+1D02A 0021;
+1D039 0021;
+1D048 0021;
+1D057 0021;
+1D066 0021;
+1D075 0021;
+1D084 0021;
+1D093 0021;
+1D0A2 0021;
+1D0B1 0021;
+1D0C0 0021;
+1D0CF 0021;
+1D0DE 0021;
+1D0ED 0021;
+1D106 0021;
+1D115 0021;
+1D124 0021;
+1D133 0021;
+1D142 0021;
+1D151 0021;
+1D158 1D165 1D170 0334;
+1D15B 0021;
+1D193 0021;
+1D1A2 0021;
+1D1B5 0021;
+1D1BA 1D165 0334 1D16F;
+1D1C8 0021;
+1D1D7 0021;
+1D208 0021;
+1D217 0021;
+1D226 0021;
+1D235 0021;
+2FF1 0021;
+31C4 0021;
+3013 0021;
+1372 0021;
+10322 0021;
+1011D 0021;
+1012C 0021;
+1014A 0021;
+10162 0021;
+10171 0021;
+10A46 0021;
+1D369 0021;
+0300 0021;
+0328 003F;
+031A 003F;
+032B 003F;
+0334 05A0;
+0334 06DB;
+0334 1D170;
+0596 0334;
+0611 0334;
+0F86 0334;
+1D180 0334;
+0341 0334;
+0334 0328;
+0334 031A;
+0334 032B;
+0334 0345;
+0334 0355;
+0334 0362;
+05B1 0334;
+0334 FB1E;
+0334 0659;
+0334 0737;
+0334 0746;
+09BC 0334;
+0334 0ECA;
+0334 3099;
+20EE 0334;
+0347 003F;
+0357 003F;
+1DC1 003F;
+0486 003F;
+05C1 003F;
+FE79 003F;
+FE7C 003F;
+065D 003F;
+073B 003F;
+074A 003F;
+0952 003F;
+0A82 003F;
+0D82 003F;
+0E4E 0021;
+0F7E 0021;
+17CF 0021;
+FF9E 0021;
+20DA 0021;
+20E7 003F;
+0E46 003F;
+3033 003F;
+FF70 003F;
+00A2 0041;
+00A5 0021;
+0BF9 0021;
+20A3 0021;
+20A9 0041;
+20AF 0021;
+20B5 0021;
+06F0 003F;
+0ED0 003F;
+1D7E2 0041;
+0BE6 0041;
+3007 0041;
+0ED0 0062;
+1D7E3 003F;
+0967 003F;
+0F2A 003F;
+12434 0021;
+2491 0041;
+3362 0021;
+32CA 0021;
+2493 0062;
+2494 0061;
+24EE 0021;
+2496 0021;
+3367 0021;
+33EF 0021;
+33F0 0021;
+2499 0062;
+24F3 0041;
+1D7E3 0041;
+0967 0041;
+0F2A 0041;
+12434 0061;
+2081 0062;
+10142 0062;
+0032 0021;
+2082 0021;
+0D68 0021;
+1015D 0021;
+249B 0021;
+3251 0021;
+3253 0021;
+3370 0021;
+3257 0021;
+0032 0061;
+2082 0061;
+0D68 0061;
+1015D 0061;
+0032 0062;
+0D68 0062;
+33E1 0021;
+1D7E5 003F;
+09F6 0021;
+1043 003F;
+12420 003F;
+33FE 0021;
+325F 0041;
+0033 0061;
+2083 0061;
+0D69 0061;
+12417 0061;
+0033 0062;
+0D69 0062;
+33E2 0021;
+1D7E6 003F;
+09F7 0021;
+1044 003F;
+1240F 003F;
+32B7 0041;
+32BC 0041;
+2463 0061;
+0A6A 0061;
+17F4 0061;
+12426 0041;
+0664 0062;
+1240F 0062;
+0035 0021;
+2085 0021;
+194B 0021;
+10173 0021;
+1D364 0021;
+1D7D3 0041;
+096B 0041;
+1045 0041;
+12427 0061;
+277A 0062;
+3025 0062;
+335D 0021;
+277B 003F;
+0C6C 003F;
+1010C 003F;
+1D7D4 0041;
+096C 0041;
+1046 0041;
+FF16 0062;
+19D6 0062;
+335E 0021;
+277C 003F;
+0C6D 003F;
+1010D 003F;
+247A 0041;
+07C7 0061;
+0ED7 0061;
+12412 0041;
+09ED 0062;
+33E6 0021;
+1D7EA 003F;
+09EE 003F;
+17E8 003F;
+FF18 0041;
+0668 0041;
+19D8 0041;
+12406 0041;
+096E 0062;
+33E7 0021;
+1D7EB 003F;
+09EF 003F;
+17E9 003F;
+1D368 003F;
+2079 0041;
+0D6F 0041;
+1241D 0061;
+2792 0062;
+12407 0062;
+0085 0061;
+FF3E 0061;
+FE34 0061;
+30A0 0061;
+FE13 0061;
+00A1 0061;
+0702 0061;
+1360 0061;
+2019 0061;
+FF3B 0061;
+2989 0061;
+3009 0061;
+3018 0061;
+204A 0061;
+203F 0061;
+070A 0061;
+104D 0061;
+02CB 0061;
+02F7 0061;
+A70B 0061;
+0BF6 0061;
+0FBF 0061;
+19F0 0061;
+1B78 0061;
+FFEB 0061;
+21AF 0061;
+21CD 0061;
+21EB 0061;
+2204 0061;
+003C 0061;
+2215 0061;
+2232 0061;
+224F 0061;
+226C 0061;
+228D 0061;
+22A8 0061;
+22C3 0061;
+22E5 0061;
+2307 0061;
+2325 0061;
+2345 0061;
+2363 0061;
+2381 0061;
+239F 0061;
+23BD 0061;
+23DB 0061;
+2411 0061;
+2448 0061;
+251A 0061;
+2538 0061;
+2556 0061;
+2574 0061;
+2592 0061;
+25AF 0061;
+25CC 0061;
+25EA 0061;
+2608 0061;
+2626 0061;
+264C 0061;
+266A 0061;
+2691 0061;
+26B2 0061;
+2721 0061;
+2740 0061;
+2766 0061;
+27A5 0061;
+27C5 0061;
+27E8 0061;
+290A 0061;
+2928 0061;
+2946 0061;
+2964 0061;
+2982 0061;
+29B6 0061;
+29D4 0061;
+29F2 0061;
+2A13 0061;
+2A31 0061;
+2A4F 0061;
+2A6D 0061;
+2A8E 0061;
+2AAC 0061;
+2ACA 0061;
+2AE8 0061;
+2B06 0061;
+2CEA 0061;
+281D 0061;
+283B 0061;
+2859 0061;
+2877 0061;
+2895 0061;
+28B3 0061;
+28D1 0061;
+28EF 0061;
+2637 0061;
+4DDD 0061;
+4DFB 0061;
+1D319 0061;
+1D337 0061;
+1D355 0061;
+A4AC 0061;
+1013A 0061;
+1D007 0061;
+1D025 0061;
+1D043 0061;
+1D061 0061;
+1D07F 0061;
+1D09D 0061;
+1D0BB 0061;
+1D0D9 0061;
+1D101 0061;
+1D11F 0061;
+1D13D 0061;
+1D160 0061;
+1D19B 0061;
+1D1BA 0061;
+1D1DB 0061;
+1D21B 0061;
+1D239 0061;
+31C8 0061;
+1376 0061;
+10121 0061;
+1014E 0061;
+10176 0061;
+1D36D 0061;
+001E 0061;
+009C 0061;
+05A8 0061;
+06DF 0061;
+1B6F 0061;
+D805 0061;
+FFFB 0061;
+1D185 0061;
+9FFFE 0061;
+E0033 0061;
+E0051 0061;
+E006F 0061;
+E010D 0061;
+E012B 0061;
+E0149 0061;
+E0167 0061;
+E0185 0061;
+E01A3 0061;
+E01C1 0061;
+E01DF 0061;
+1D44E 0021;
+000C 0041;
+02DC 0041;
+005F 0041;
+301C 0041;
+2A74 0041;
+FE57 0041;
+06D4 0041;
+07F7 0041;
+FF07 0041;
+005B 0041;
+2987 0041;
+FE3F 0041;
+3017 0041;
+FF06 0041;
+2038 0041;
+05F3 0041;
+1940 0041;
+02C9 0041;
+02F5 0041;
+A709 0041;
+0BF4 0041;
+0F3F 0041;
+19EE 0041;
+1B76 0041;
+2192 0041;
+21AC 0041;
+21CB 0041;
+21E9 0041;
+1D7C3 0041;
+00F7 0041;
+2213 0041;
+222E 0041;
+226D 0041;
+226A 0041;
+228B 0041;
+22A6 0041;
+22C1 0041;
+22DF 0041;
+2305 0041;
+2323 0041;
+2343 0041;
+2361 0041;
+237F 0041;
+239D 0041;
+23BB 0041;
+23D9 0041;
+240F 0041;
+2446 0041;
+2518 0041;
+2536 0041;
+2554 0041;
+2572 0041;
+2590 0041;
+25AD 0041;
+25CB 0041;
+25E8 0041;
+2606 0041;
+2624 0041;
+264A 0041;
+2668 0041;
+2689 0041;
+26B0 0041;
+271F 0041;
+273E 0041;
+2764 0041;
+27A3 0041;
+27C3 0041;
+27E6 0041;
+2908 0041;
+2926 0041;
+2944 0041;
+2962 0041;
+2980 0041;
+29B4 0041;
+29D2 0041;
+29F0 0041;
+2A11 0041;
+2A2F 0041;
+2A4D 0041;
+2A6B 0041;
+2A8C 0041;
+2AAA 0041;
+2AC8 0041;
+2AE6 0041;
+2B04 0041;
+2CE8 0041;
+281B 0041;
+2839 0041;
+2857 0041;
+2875 0041;
+2893 0041;
+28B1 0041;
+28CF 0041;
+28ED 0041;
+2635 0041;
+4DDB 0041;
+4DF9 0041;
+1D317 0041;
+1D335 0041;
+1D353 0041;
+A4AA 0041;
+10138 0041;
+1D005 0041;
+1D023 0041;
+1D041 0041;
+1D05F 0041;
+1D07D 0041;
+1D09B 0041;
+1D0B9 0041;
+1D0D7 0041;
+1D0F5 0041;
+1D11D 0041;
+1D13B 0041;
+1D158 0041;
+1D199 0041;
+1D1BD 0041;
+1D1D9 0041;
+1D219 0041;
+1D237 0041;
+31C6 0041;
+1374 0041;
+1011F 0041;
+1014C 0041;
+10174 0041;
+1D36B 0041;
+001C 0041;
+009A 0041;
+05A6 0041;
+06DD 0041;
+1B6D 0041;
+D803 0041;
+FFF9 0041;
+1D181 0041;
+8FFFE 0041;
+E0031 0041;
+E004F 0041;
+E006D 0041;
+E010B 0041;
+E0129 0041;
+E0147 0041;
+E0165 0041;
+E0183 0041;
+E01A1 0041;
+E01BF 0041;
+E01DD 0041;
+1D49C 0021;
+2090 003F;
+1EB2 003F;
+212B 003F;
+0101 003F;
+1E00 003F;
+1EAE 0334;
+00C2 0334;
+0041 0334 0302 0309;
+0061 0308 0304 0334;
+0105 0334;
+1EA1 0334;
+0313 0041;
+0307 0061;
+0317 0061;
+0326 0061;
+0337 0061;
+034C 0061;
+035C 0061;
+1DC6 0061;
+05B4 0061;
+FE71 0061;
+0651 0061;
+0653 0061;
+0731 0061;
+0740 0061;
+07EF 0061;
+0982 0061;
+0B03 0061;
+1B02 0061;
+0E4B 0061;
+135F 0061;
+1939 0061;
+20D2 0061;
+20E1 0061;
+0061 0061;
+1D5EE 0041;
+1D56C 0041;
+1EAE 0061;
+1EA9 0061;
+0227 0061;
+1EA0 0061;
+1D68A 0062;
+1EB1 0062;
+0226 0062;
+1D2D 0021;
+01FD 0061;
+3373 0021;
+1D01 0021;
+0251 0041;
+2000 0062;
+FE4A 0062;
+2017 0062;
+FE50 0062;
+0703 0062;
+2047 0062;
+1B5C 0062;
+1B5B 0062;
+0022 0062;
+FE37 0062;
+298E 0062;
+FE3E 0062;
+FD3F 0062;
+FE6A 0062;
+2042 0062;
+180A 0062;
+17D9 0062;
+02D2 0062;
+02FC 0062;
+A710 0062;
+0CF2 0062;
+0FC4 0062;
+19F5 0062;
+2104 0062;
+2194 0062;
+21B4 0062;
+21D3 0062;
+21F0 0062;
+1D6FB 0062;
+2A75 0062;
+221A 0062;
+2237 0062;
+2254 0062;
+2276 0062;
+22E2 0062;
+22AB 0062;
+22C8 0062;
+22EE 0062;
+230C 0062;
+232C 0062;
+234A 0062;
+2368 0062;
+2386 0062;
+23A4 0062;
+23C2 0062;
+23E0 0062;
+2416 0062;
+2502 0062;
+251F 0062;
+253D 0062;
+255B 0062;
+2579 0062;
+2597 0062;
+25B4 0062;
+25D1 0062;
+25EF 0062;
+260D 0062;
+262B 0062;
+2651 0062;
+2672 0062;
+2696 0062;
+2706 0062;
+2726 0062;
+2745 0062;
+276B 0062;
+27AA 0062;
+27CA 0062;
+27F1 0062;
+290F 0062;
+292D 0062;
+294B 0062;
+2969 0062;
+299D 0062;
+29BB 0062;
+29D9 0062;
+29F7 0062;
+2A18 0062;
+2A36 0062;
+2A54 0062;
+2A72 0062;
+2A93 0062;
+2AB1 0062;
+2ACF 0062;
+2AED 0062;
+2B0B 0062;
+2804 0062;
+2822 0062;
+2840 0062;
+285E 0062;
+287C 0062;
+289A 0062;
+28B8 0062;
+28D6 0062;
+28F4 0062;
+4DC4 0062;
+4DE2 0062;
+1D300 0062;
+1D31E 0062;
+1D33C 0062;
+A493 0062;
+A4B1 0062;
+1013F 0062;
+1D00C 0062;
+1D02A 0062;
+1D048 0062;
+1D066 0062;
+1D084 0062;
+1D0A2 0062;
+1D0C0 0062;
+1D0DE 0062;
+1D106 0062;
+1D124 0062;
+1D142 0062;
+1D159 0062;
+1D1A0 0062;
+1D1C2 0062;
+1D202 0062;
+1D220 0062;
+1D23E 0062;
+31CD 0062;
+137B 0062;
+10126 0062;
+10154 0062;
+103D5 0062;
+0000 0062;
+0082 0062;
+0488 0062;
+05AD 0062;
+06E4 0062;
+200B 0062;
+FDD3 0062;
+1D167 0062;
+1D18A 0062;
+BFFFF 0062;
+E0038 0062;
+E0056 0062;
+E0074 0062;
+E0112 0062;
+E0130 0062;
+E014E 0062;
+E016C 0062;
+E018A 0062;
+E01A8 0062;
+E01C6 0062;
+E01E4 0062;
+1D5BB 0021;
+1D539 0021;
+1E05 0021;
+0301 0062;
+0319 0062;
+033B 0062;
+035F 0062;
+05B7 0062;
+FCF4 0062;
+0734 0062;
+07F2 0062;
+0C02 0062;
+0EC8 0062;
+302A 0062;
+20E4 0062;
+1D68B 0061;
+1D609 0061;
+1E07 0061;
+1D435 0062;
+0180 0021;
+0253 0021;
+1D41C 0021;
+FF23 0021;
+1D63E 003F;
+0063 0301 0334;
+0043 0334 0327;
+1D5BC 0061;
+1D402 0061;
+0106 0061;
+0368 0062;
+1D60A 0062;
+33C6 0041;
+2106 0041;
+1D9D 003F;
+1D485 0021;
+FF24 003F;
+1D673 003F;
+1E0E 003F;
+1E12 0334;
+1D41D 0061;
+0044 0041;
+1D60B 0041;
+1E12 0041;
+1D4ED 0062;
+33C8 003F;
+3377 0021;
+02A3 0061;
+1D05 0021;
+0257 0021;
+0065 0021;
+1D58A 003F;
+1D508 003F;
+00CA 0021;
+0117 0021;
+1EBA 0021;
+0045 0301 0334;
+00CA 0334 0301;
+0045 0334 030C;
+0045 0327 0334 0306;
+0112 0334 0340;
+0045 0302 0334 0323;
+1D486 0061;
+2130 0061;
+2091 0061;
+1EC4 0061;
+0119 0061;
+1EB8 0061;
+1D65A 0062;
+1EBF 0062;
+0205 0062;
+0246 003F;
+018F 003F;
+025B 0061;
+1D9F 003F;
+025E 0041;
+1D68F 0021;
+1D5A5 0021;
+0046 0334 0307;
+1D5F3 0041;
+1D509 0041;
+1D557 0062;
+FB00 0061;
+02A9 0061;
+2132 0041;
+1D5C0 003F;
+1D53E 003F;
+0121 003F;
+011C 0334;
+24A2 0041;
+0047 0041;
+24BC 0041;
+1E21 0041;
+1D4A2 0062;
+3387 0041;
+1D79 0041;
+0260 0062;
+01A2 003F;
+1D489 003F;
+210B 003F;
+1E26 003F;
+021E 0334;
+1E2A 0334;
+1D629 0061;
+1D5A7 0061;
+021F 0061;
+0126 0061;
+1D46F 0062;
+32CC 003F;
+01F6 0061;
+2C75 0061;
+2148 0021;
+24D8 003F;
+1D610 003F;
+01CF 003F;
+0208 003F;
+0069 0334 0306;
+1E2E 0334;
+0209 0334;
+2170 0061;
+1D5F6 0041;
+1D4D8 0041;
+00CE 0061;
+1EC8 0061;
+1D526 0062;
+00CD 0062;
+2171 0021;
+33CC 0021;
+0131 0021;
+0268 0021;
+0269 0021;
+1D4BF 0021;
+1D409 0021;
+1D36 0021;
+1D55B 0061;
+1D4A5 0061;
+0135 0041;
+1D50D 0062;
+0249 003F;
+0284 003F;
+1D590 003F;
+1D4A6 003F;
+1E32 0021;
+1E33 0334;
+1D694 0061;
+1D5AA 0061;
+01E9 0061;
+1D5C4 0062;
+01E8 0062;
+3398 0021;
+33CF 0021;
+0199 0021;
+24A7 003F;
+1D695 003F;
+1D5AB 003F;
+1E38 003F;
+006C 0334 0323;
+0140 003F;
+1D4F5 0041;
+2112 0041;
+013B 0041;
+1D425 0062;
+24C1 0062;
+01C8 0041;
+32CF 0062;
+019A 0061;
+026C 0062;
+026E 0062;
+1D5FA 0021;
+1D510 0021;
+1E3E 003F;
+036B 0334;
+1D5FA 0061;
+1D510 0061;
+1E3F 0041;
+1D662 0062;
+1E43 0062;
+339F 0021;
+33A8 0041;
+33C1 0061;
+FF4E 0021;
+24DD 0021;
+1D649 003F;
+0145 0021;
+006E 030C 0334;
+006E 032D 0334;
+1D697 0061;
+1D615 0061;
+01F8 0061;
+3381 0061;
+1D5AD 0062;
+338B 0062;
+33B1 0062;
+1D0E 0062;
+0220 0062;
+014A 0041;
+1D490 003F;
+1D442 003F;
+014F 0021;
+00D6 0021;
+0231 0021;
+014C 0021;
+1EDD 0021;
+004F 0341 0334;
+006F 0302 0300 0334;
+006F 0308 0334;
+004F 0334 0303 0301;
+004F 0307 0304 0334;
+014C 0301 0334;
+01A1 0334;
+006F 0334 0309 031B;
+006F 0061;
+1D5FC 0041;
+1D57A 0041;
+00D4 0061;
+0151 0061;
+00D8 0061;
+020D 0061;
+1EE2 0061;
+1D40E 0062;
+1ED7 0062;
+01ED 0062;
+0153 0021;
+1D14 0021;
+1D12 0021;
+0275 0021;
+1D3D 0061;
+1D45D 003F;
+1D67F 0021;
+0070 0341 0334;
+1D699 0061;
+1D617 0061;
+1E57 0061;
+1D40F 0062;
+33D7 003F;
+33B4 003F;
+1D88 003F;
+0071 003F;
+1D69A 003F;
+1D618 003F;
+1D562 0041;
+1D4AC 0041;
+211A 0062;
+024A 0061;
+1D42B 003F;
+1D64D 0021;
+0158 003F;
+0072 0334 0301;
+0210 0334;
+0072 0041;
+1D633 0041;
+1D5B1 0041;
+0211 0041;
+33AF 0062;
+1D4E1 0062;
+20A8 003F;
+1D72 003F;
+027B 003F;
+1D73 003F;
+1D530 0021;
+1D4AE 0021;
+015A 003F;
+1E69 003F;
+0073 0334 030C;
+1E62 0334;
+1D494 0061;
+1D412 0061;
+015B 0061;
+1E62 0061;
+24E2 0062;
+015F 0062;
+FB06 0041;
+023F 0021;
+0285 0021;
+1D599 0021;
+1D517 0021;
+0164 003F;
+0054 030C 0334;
+0074 032D 0334;
+1D5CD 0061;
+1D54B 0061;
+1E97 0061;
+1D42D 0062;
+1D57 0062;
+1D7A 0041;
+1D1B 0041;
+1DB5 003F;
+0236 0041;
+1D496 003F;
+1D414 003F;
+016D 003F;
+01D9 003F;
+1EE7 003F;
+1EEC 003F;
+0075 0334 0300;
+016E 0334;
+00DC 0334 030C;
+0075 0334 0328;
+0214 0334;
+0075 0334 0303 031B;
+0075 0334 0324;
+1D4CA 0061;
+1D448 0061;
+1D64 0041;
+00DC 0041;
+0173 0041;
+1EE8 0041;
+1E75 0041;
+1D580 0062;
+01D6 0062;
+1EF1 0062;
+1D1E 0021;
+1D99 0021;
+1D5A 003F;
+1DB7 003F;
+1D533 0021;
+1D449 0021;
+1D65 003F;
+24B1 0041;
+24E5 0041;
+1D61D 0041;
+1D5CF 0062;
+2175 003F;
+33DE 003F;
+2C74 003F;
+1D534 0021;
+1D4B2 0021;
+1E83 003F;
+0057 0334 0301;
+0057 0334 0307;
+1D4CC 0041;
+1D44A 0041;
+1E98 0061;
+24E6 0062;
+1E87 0062;
+1D4CD 0021;
+2169 003F;
+02E3 003F;
+036F 0061;
+1D6A1 0041;
+1D5B7 0041;
+1D569 0062;
+1E8A 0062;
+24B4 0021;
+0059 0021;
+24CE 0021;
+0233 0021;
+0177 0334;
+0232 0334;
+1D66E 0061;
+1D5EC 0061;
+0177 0041;
+FF59 0062;
+1D688 0062;
+024E 003F;
+1D59F 0021;
+1D4B5 0021;
+1E91 003F;
+005A 0302 0334;
+FF5A 0041;
+24E9 0041;
+1D689 0041;
+FF5A 0062;
+1D689 0062;
+01B6 0041;
+0290 0041;
+0292 0021;
+01EE 0062;
+0293 0062;
+01F7 0062;
+0185 0061;
+02BC 0062;
+02BF 0062;
+02A2 0062;
+0297 0062;
+1D6A8 0021;
+1F06 0021;
+1F8B 0021;
+1FB0 0021;
+03B1 0343 0341 0334 0345;
+03B1 0313 0345 0342 0334;
+03B1 0334 0314 0341 0345;
+1F09 0342 0334;
+03B1 0334 0300;
+1FB9 0334;
+1D6A8 0041;
+1F86 0041;
+1F0F 0041;
+1FB6 0041;
+1F0A 0062;
+1F70 0062;
+1D757 0021;
+1D757 0061;
+1D6FE 0021;
+213D 0061;
+03B3 0062;
+1D739 003F;
+0394 0041;
+1D6C6 0021;
+1D75A 003F;
+0388 0021;
+1F18 0334 0300;
+0395 0334 0341;
+1D774 0041;
+1F19 0061;
+1D774 0062;
+1D7CB 0021;
+1D6C7 0021;
+1D701 0041;
+1D6C8 0021;
+1F94 0021;
+1F2D 0021;
+0389 0021;
+0397 0334 0343 0341;
+0397 0313 0334 0342;
+0397 0314 0334 0301;
+1F21 0334 0342;
+03B7 0334 0341 0345;
+1FC3 003F;
+1F28 0041;
+1F21 0041;
+1F99 0041;
+1D7B0 0062;
+1F2B 0062;
+1D751 0021;
+1D6B9 003F;
+1D751 0041;
+1DBF 0041;
+037A 0021;
+1F3C 0021;
+038A 0021;
+03B9 0334 0313;
+1F38 0334 0342;
+0399 0334 0314 0342;
+03B9 0308 0334;
+037A 0061;
+1F3C 0061;
+038A 0061;
+03B9 0062;
+03AF 0062;
+1D73F 0021;
+03F0 0061;
+1D6EB 0041;
+1D706 0021;
+1D740 0041;
+1D27 0041;
+00B5 0061;
+00B5 0062;
+339B 0041;
+039D 003F;
+1D6B4 0041;
+039E 003F;
+1D6B5 0041;
+039F 003F;
+1F4D 003F;
+039F 0334 0313 0301;
+1F49 0334 0340;
+1D7B8 0041;
+1F45 0041;
+1D79E 0062;
+1D77F 0021;
+03C0 0041;
+1D72B 0061;
+1D28 003F;
+03D8 0061;
+1D6B8 0021;
+03F1 0061;
+1D6F2 0041;
+1D68 0062;
+1D70D 003F;
+1D70D 0061;
+1D768 0041;
+03FE 0061;
+1D7BD 0021;
+03A4 0061;
+1D7BE 0021;
+1F59 0021;
+1FE8 0021;
+03C5 0313 0300 0334;
+03C5 0314 0334 0342;
+1FE0 0334;
+1FE1 0334;
+1F50 0061;
+038E 0041;
+1FE9 0061;
+1FEB 0062;
+1D6D7 003F;
+1D6D7 0061;
+1D76B 0041;
+1D74C 0021;
+1D7C0 0061;
+1D6F8 0062;
+03C8 0061;
+03A8 0062;
+1D76E 0021;
+1F6E 003F;
+1F67 003F;
+1FF7 003F;
+03A9 0334 0343 0340;
+1FA0 0334;
+1F61 0340 0334;
+03C9 0334 0314 0345;
+03C9 0340 0334 0345;
+1D788 0041;
+1F6A 0061;
+1F63 0061;
+1F7C 0061;
+1F6C 0062;
+1F7D 0062;
+03F7 0062;
+2C84 0062;
+2CB6 0062;
+2C8E 0062;
+2C94 0062;
+2C99 0061;
+2CBD 0061;
+2CA1 0061;
+2CA7 0061;
+2CAD 0061;
+2CBF 0061;
+2CC3 0061;
+03E5 0061;
+03E9 0061;
+2CCF 0061;
+2CD5 0061;
+03ED 0061;
+2CDD 0061;
+2CB5 0061;
+2CE3 0061;
+04D1 0334;
+04D3 0334;
+04D9 0062;
+04D8 0308 0062;
+0432 0062;
+0493 0061;
+04F7 0061;
+0452 0061;
+0433 0341 0334;
+0413 0301 0062;
+0415 0334 0300;
+0435 0306 003F;
+0404 0021;
+0436 0001 0308 0061;
+0416 0308 0041;
+0504 0021;
+0417 0334 0308;
+04E0 0021;
+0438 0300 0334;
+0438 0062;
+0438 0308 0061;
+0456 0308 003F;
+0438 0306 003F;
+0408 0021;
+049B 0062;
+049F 0062;
+04C5 003F;
+0508 003F;
+041D 003F;
+04A3 0062;
+045A 0062;
+041E 0308 003F;
+04E8 0061;
+04E8 0308 0041;
+0481 0061;
+0441 0061;
+0442 0061;
+045B 0061;
+043A 1D165 0301 0061;
+0443 0304 0334;
+040E 003F;
+0423 0308 003F;
+0423 030B 003F;
+04AE 0061;
+0424 0061;
+04FE 0061;
+0460 0061;
+047A 0061;
+0427 0061;
+0427 0308 0041;
+04B9 0061;
+045F 0061;
+044A 0061;
+042B 0334 0308;
+048C 0021;
+044D 0308 0021;
+044E 0021;
+0467 0021;
+046D 0021;
+0473 0021;
+0475 030F 0334;
+04A9 0062;
+2C31 0062;
+2C34 0062;
+2C37 0062;
+2C3A 0062;
+2C3D 0062;
+2C40 0062;
+2C43 0062;
+2C46 0062;
+2C49 0062;
+2C4C 0062;
+2C4F 0062;
+2C52 0062;
+2C55 0062;
+2C58 0062;
+2C5B 0062;
+2C5E 0062;
+2D01 0062;
+2D03 0062;
+2D05 0062;
+2D21 0062;
+2D08 0062;
+2D0A 0062;
+10AC 003F;
+10AD 003F;
+10AF 003F;
+10B1 003F;
+10C3 003F;
+10B4 003F;
+10B6 003F;
+10B8 003F;
+10BA 003F;
+10BC 003F;
+10BE 003F;
+10BF 003F;
+10C5 003F;
+10FA 0041;
+0563 0062;
+0536 003F;
+0539 003F;
+053C 003F;
+053F 003F;
+0542 003F;
+FB14 0041;
+0546 003F;
+0549 003F;
+054C 003F;
+FB16 0041;
+0581 0062;
+0584 0062;
+2135 003F;
+05D0 0062;
+FB31 0041;
+FB22 003F;
+FB23 0041;
+05F0 0041;
+FB38 0021;
+05F2 003F;
+FB3A 003F;
+05DC 0061;
+05DD 0062;
+FB41 0041;
+FB4E 0021;
+FB46 0061;
+FB27 0041;
+FB49 003F;
+FB4A 0021;
+10903 0062;
+10909 0062;
+1090F 0062;
+10915 0062;
+0627 0334 0653;
+0627 1D165 0654 0061;
+FB50 0062;
+FE88 0021;
+FE8B 003F;
+FBEB 0021;
+FC99 0021;
+FC02 0041;
+FBEF 0021;
+FBF5 0021;
+FBFB 0062;
+0627 0021;
+0675 003F;
+0628 0041;
+FC06 0061;
+FC6B 003F;
+FCA0 003F;
+067B 003F;
+FB57 0021;
+0680 0041;
+0753 003F;
+FE93 0041;
+FCA1 003F;
+FC0C 0061;
+FD54 003F;
+FC0E 0021;
+FDA4 003F;
+FC0F 0061;
+FE9A 0061;
+FC12 0021;
+FC13 0061;
+FB67 0061;
+FB60 0062;
+FB63 0061;
+FE9F 0062;
+FCA8 003F;
+FD1D 003F;
+0683 0041;
+FB73 0061;
+FB7C 0062;
+FB80 0062;
+FCA9 003F;
+FD5A 003F;
+FEA6 0021;
+FC1A 003F;
+FD04 0061;
+062F 003F;
+0630 0062;
+068B 003F;
+FB82 0041;
+06EE 003F;
+0631 0062;
+0691 003F;
+0695 003F;
+0699 003F;
+FEB2 0021;
+FC1C 0041;
+FD5C 003F;
+FD2A 003F;
+FD60 003F;
+FD17 003F;
+0634 0041;
+FD2D 0062;
+FD68 003F;
+FD2F 0062;
+FD30 0062;
+FCEA 0061;
+069B 003F;
+FEBA 0021;
+FD65 003F;
+FDF5 003F;
+FDC5 003F;
+0636 003F;
+FC22 0061;
+FC24 0061;
+FC25 0061;
+069E 003F;
+FEC3 0062;
+FD72 003F;
+FD12 003F;
+FEC7 0062;
+FECA 0021;
+FDC4 003F;
+FD76 0061;
+FCF8 0061;
+FCBC 003F;
+FD7A 003F;
+06FC 003F;
+0641 0041;
+FC2E 0061;
+FC30 0061;
+06A1 003F;
+FB6B 0061;
+FB6F 0061;
+FED6 0021;
+FDF1 003F;
+FDB2 003F;
+06A8 003F;
+FC80 003F;
+FCC6 003F;
+FCC8 003F;
+FDB7 003F;
+FB8F 0021;
+06AC 003F;
+06AE 003F;
+06B0 003F;
+06B2 003F;
+06B4 003F;
+0644 0041;
+FEF7 0061;
+FC3F 0061;
+FCCA 003F;
+FCCB 003F;
+FCED 0041;
+FC86 003F;
+06B7 003F;
+FEE4 0061;
+FD8C 003F;
+FD89 003F;
+FD8E 003F;
+FDB1 003F;
+FEE6 0021;
+FDB8 003F;
+FCD3 003F;
+FC4D 0061;
+FCD5 0062;
+FC8E 003F;
+FB9E 0041;
+06BC 003F;
+0647 003F;
+FCD7 003F;
+FC53 003F;
+FBAC 0062;
+06C2 0041;
+06C0 0061;
+FEED 0062;
+FBE0 0062;
+FBD7 0062;
+FBE2 0021;
+FBDE 0062;
+FC90 0061;
+FEF4 0041;
+FDAF 0041;
+FC91 0041;
+FD9C 003F;
+FC59 003F;
+FBFE 0041;
+FBE4 0021;
+06D3 0334;
+0712 0021;
+0715 0021;
+071A 0021;
+074E 0021;
+0725 0021;
+072A 0021;
+0781 0021;
+0786 0021;
+0789 0021;
+07A0 0021;
+0790 0021;
+0793 0021;
+07A6 0021;
+07AC 0021;
+07CB 0021;
+07D1 0021;
+07D6 0041;
+07DA 0021;
+07E0 0021;
+07E6 0021;
+2D32 0021;
+2D38 0021;
+2D3E 0021;
+2D44 0021;
+2D4A 0021;
+2D50 0021;
+2D56 0021;
+2D5C 0021;
+2D62 0021;
+1201 0021;
+1207 0021;
+120D 0021;
+1212 0021;
+1218 0021;
+121E 0021;
+2D81 0021;
+1225 0021;
+122B 0021;
+1230 0021;
+1236 0021;
+123B 0021;
+1240 0021;
+1246 0021;
+124D 0021;
+1255 0021;
+125D 0021;
+1265 0021;
+1387 0021;
+126C 0021;
+1272 0021;
+2D86 0021;
+127D 0021;
+1282 0021;
+1288 0021;
+1291 0021;
+1297 0021;
+129C 0021;
+12A1 0021;
+12A7 0021;
+12AC 0021;
+12B3 0021;
+12BB 0021;
+12C3 0021;
+12CB 0021;
+12D1 0021;
+12D8 0021;
+12DE 0021;
+12E3 0021;
+12E9 0021;
+12EF 0021;
+12F5 0021;
+12FA 0021;
+2D8D 0021;
+1305 0021;
+130A 0021;
+1310 0021;
+1319 0021;
+131F 0021;
+1321 0021;
+1327 0021;
+132C 0021;
+1331 0021;
+1337 0021;
+133C 0021;
+1342 0021;
+1348 0021;
+134E 0021;
+1350 0021;
+1356 0021;
+2D92 0021;
+2DA2 0021;
+2DA9 0021;
+2DB0 0021;
+2DB6 0021;
+2DBD 0021;
+2DC4 0021;
+2DCB 0021;
+2DD2 0021;
+2DD9 0021;
+0950 0021;
+0909 0021;
+090D 0021;
+0913 0021;
+0916 0061;
+0919 003F;
+097C 0041;
+0921 0041;
+0924 0061;
+0929 0062;
+092D 003F;
+0930 0041;
+0936 0061;
+093E 0061;
+0944 0061;
+0948 0061;
+0985 0021;
+098B 0021;
+0993 0021;
+0999 0021;
+099F 0021;
+09A2 0061;
+09A6 0062;
+09AD 0062;
+09B2 003F;
+09BD 003F;
+09C3 003F;
+09C8 0021;
+09CD 0041;
+0A13 0041;
+0A07 0041;
+0A15 0021;
+0A5A 0062;
+0A5B 0061;
+0A22 003F;
+0A28 003F;
+0A2D 0041;
+0A35 0021;
+0A42 0021;
+0A4D 0041;
+0A89 0041;
+0A8D 0041;
+0A95 0041;
+0A9B 0041;
+0AA1 0041;
+0AA7 0041;
+0AAE 0041;
+0AB6 0041;
+0ABF 0041;
+0AE2 0041;
+0ACB 0041;
+0B08 003F;
+0B61 003F;
+0B16 003F;
+0B1C 003F;
+0B5C 003F;
+0B25 0021;
+0B2C 0021;
+0B32 0021;
+0B38 0021;
+0B41 0021;
+0B48 0021;
+0B4D 003F;
+0B86 0062;
+0B8F 0062;
+0B95 003F;
+0BA3 003F;
+0BAF 003F;
+0BB5 003F;
+0BBF 003F;
+0BC7 0021;
+0BCB 0041;
+0C06 0021;
+0C60 0021;
+0C12 0021;
+0C18 0021;
+0C1E 0021;
+0C24 0021;
+0C2B 0021;
+0C31 0021;
+0C38 0021;
+0C42 0021;
+0C46 0334 0C56;
+0C4D 0061;
+0C87 0041;
+0C8C 0041;
+0C93 0041;
+0C99 0041;
+0C9F 0041;
+0CA5 0041;
+0CAC 0041;
+0CB2 0041;
+0CB3 0041;
+0CC0 0061;
+0CE3 0021;
+0CC6 0CD5 0062;
+0CCB 0021;
+0CD6 0021;
+0D0A 0021;
+0D0F 0021;
+0D16 0021;
+0D1C 0021;
+0D22 0021;
+0D28 0021;
+0D2F 0021;
+0D35 0021;
+0D3F 0021;
+0D46 0001 0D3E 0061;
+0D4B 0021;
+0D4D 0062;
+0D8A 0062;
+0D90 0062;
+0D96 0062;
+0D9F 0062;
+0DA5 0062;
+0DAB 0062;
+0DB1 0062;
+0DB8 0062;
+0DC1 0062;
+0DCA 0061;
+0DD4 0061;
+0DD9 0DCA 003F;
+0DD9 0DCF 0DCA 0021;
+0DDE 0041;
+A802 0061;
+A808 0021;
+A80F 0021;
+A815 0021;
+A81B 0021;
+A821 0021;
+A827 0021;
+10A06 0021;
+10A15 0021;
+10A1C 0021;
+10A22 0021;
+10A28 0021;
+10A2E 0021;
+10A3F 0021;
+0E43 0E01 0041;
+0E43 0E02 0041;
+0E43 0E03 0041;
+0E43 0E04 0041;
+0E43 0E05 0041;
+0E43 0E06 0041;
+0E43 0E07 0041;
+0E43 0E08 0041;
+0E43 0E09 0041;
+0E43 0E0A 0041;
+0E43 0E0B 0041;
+0E43 0E0C 0041;
+0E43 0E0D 0041;
+0E43 0E0E 0041;
+0E43 0E0F 0041;
+0E43 0E10 0041;
+0E43 0E11 0041;
+0E43 0E12 0041;
+0E43 0E13 0041;
+0E43 0E14 0041;
+0E43 0E15 0041;
+0E43 0E16 0041;
+0E43 0E17 0041;
+0E43 0E18 0041;
+0E43 0E19 0041;
+0E43 0E1A 0041;
+0E43 0E1B 0041;
+0E43 0E1C 0041;
+0E43 0E1D 0041;
+0E43 0E1E 0041;
+0E43 0E1F 0041;
+0E43 0E20 0041;
+0E43 0E21 0041;
+0E43 0E22 0041;
+0E43 0E23 0041;
+0E43 0E24 0041;
+0E43 0E25 0041;
+0E43 0E26 0041;
+0E43 0E27 0041;
+0E43 0E28 0041;
+0E43 0E29 0041;
+0E43 0E2A 0041;
+0E43 0E2B 0041;
+0E43 0E2C 0041;
+0E43 0E2D 0041;
+0E43 0E2E 0041;
+0E33 0021;
+0E38 0021;
+0E40 0591 0E02 0061;
+0E40 0591 0E0C 0061;
+0E40 0591 0E16 0061;
+0E40 0591 0E20 0061;
+0E40 0591 0E2A 0061;
+0E41 1D165 0E04 0061;
+0E41 1D165 0E0E 0061;
+0E41 1D165 0E18 0061;
+0E41 1D165 0E22 0061;
+0E41 1D165 0E2C 0061;
+0E42 0001 0E07 0061;
+0E42 0001 0E11 0061;
+0E42 0001 0E1B 0061;
+0E42 0001 0E25 0061;
+0E43 0021;
+0E43 0591 0E09 0061;
+0E43 0591 0E13 0061;
+0E43 0591 0E1D 0061;
+0E43 0591 0E27 0061;
+0E44 1D165 0E01 0061;
+0E44 1D165 0E0B 0061;
+0E44 1D165 0E15 0061;
+0E44 1D165 0E1F 0061;
+0E44 1D165 0E29 0061;
+0EC0 0E81 0062;
+0EC0 0E82 0062;
+0EC0 0E84 0062;
+0EC0 0E87 0062;
+0EC0 0E88 0062;
+0EC0 0E8A 0062;
+0EC0 0E8D 0062;
+0EC0 0E94 0062;
+0EC0 0E95 0062;
+0EC0 0E96 0062;
+0EC0 0E97 0062;
+0EC0 0E99 0062;
+0EC0 0E9A 0062;
+0EC0 0E9B 0062;
+0EC0 0E9C 0062;
+0EC0 0E9D 0062;
+0EC0 0E9E 0062;
+0EC0 0E9F 0062;
+0EC0 0EA1 0062;
+0EC0 0EA2 0062;
+0EC0 0EA3 0062;
+0EC0 0EA5 0062;
+0EC0 0EA7 0062;
+0EC0 0EAA 0062;
+0EDC 0062;
+0EDD 0062;
+0EC0 0EAB 0062;
+0EC0 0EAD 0062;
+0EC0 0EAE 0062;
+0EB0 0062;
+0EB5 003F;
+0EBB 0061;
+0EC0 0001 0E88 0061;
+0EC0 0001 0E9C 0061;
+0EC0 0001 0EAB 0061;
+0EC1 0591 0E87 0061;
+0EC1 0591 0E9B 0061;
+0EC1 0591 0EAA 0061;
+0EC2 1D165 0E84 0061;
+0EC2 1D165 0E9A 0061;
+0EC2 1D165 0EA7 0061;
+0EC3 0001 0E84 0061;
+0EC3 0001 0E9A 0061;
+0EC3 0001 0EA7 0061;
+0EC4 0591 0E82 0061;
+0EC4 0591 0E99 0061;
+0EC4 0591 0EA5 0061;
+0F69 0061;
+0F43 0061;
+0F95 0061;
+0F99 0061;
+0F4D 0061;
+0F9F 0061;
+0FA2 0061;
+0FA5 0061;
+0FA8 0061;
+0F5C 0061;
+0F5E 0061;
+0F61 0061;
+0FBC 0041;
+0FB3 1D165 0F71 0061;
+0F66 0041;
+0FB8 0041;
+0F71 0001 0F80 0061;
+0F80 0041;
+0334 0F75;
+0FB2 0F71 0F80 003F;
+0F78 0062;
+0F7B 0021;
+A840 0061;
+A846 0061;
+A848 0061;
+A84E 0061;
+A867 0061;
+A86D 0061;
+A86E 0061;
+A862 0061;
+A860 0061;
+1902 0061;
+1908 0061;
+190E 0061;
+1914 0061;
+191A 0061;
+1923 0061;
+1929 0061;
+1933 0061;
+1700 0061;
+1706 0061;
+170C 0061;
+1713 0061;
+1724 0021;
+172A 0021;
+1730 0021;
+1740 0041;
+1746 0041;
+174C 0041;
+1752 0041;
+1764 0041;
+176A 0041;
+1772 0041;
+1A04 0041;
+1A0A 0041;
+1A10 0041;
+1A16 0041;
+1A1B 0062;
+1005 0062;
+100B 0062;
+1011 0062;
+1017 0062;
+101D 0062;
+1021 0062;
+1027 003F;
+1055 003F;
+1031 003F;
+1039 003F;
+1784 0062;
+178A 0062;
+1790 0062;
+1796 0062;
+179C 0062;
+17A2 0062;
+17A7 0062;
+17AD 0062;
+17B3 0062;
+17B9 0062;
+17BF 0062;
+17C5 0062;
+1954 0061;
+195A 0061;
+1960 0061;
+1966 0061;
+196C 0061;
+1974 0061;
+1985 0061;
+198B 0061;
+1991 0061;
+1997 0061;
+19DE 0061;
+19A1 0061;
+19A7 0061;
+19B3 0061;
+19B9 0061;
+19BF 0061;
+19C5 0061;
+1B05 1D165 1B35 0061;
+1B09 003F;
+1B0C 0061;
+1B10 0061;
+1B45 0062;
+1B18 0062;
+1B1E 0062;
+1B23 0062;
+1B28 0062;
+1B2E 0062;
+1B4A 0062;
+1B38 0062;
+1B3C 0591 1B35 0061;
+1B3E 1B35 003F;
+1B42 1B35 0061;
+1883 0041;
+1887 0041;
+185E 0041;
+1824 0041;
+1849 0041;
+1862 0041;
+184C 0041;
+1864 0041;
+1830 0041;
+18A4 0041;
+1851 0041;
+188B 0041;
+1855 0041;
+1839 0041;
+1874 0041;
+183D 0041;
+186D 0041;
+185B 0041;
+189F 0041;
+18A1 0041;
+1895 0041;
+18A9 0334;
+13A5 003F;
+13AB 003F;
+13B1 003F;
+13B7 003F;
+13BD 003F;
+13C3 003F;
+13C9 003F;
+13CF 003F;
+13D5 003F;
+13DB 003F;
+13E1 003F;
+13E7 003F;
+13ED 003F;
+13F3 003F;
+1405 003F;
+140B 003F;
+1411 003F;
+1417 003F;
+141D 003F;
+1423 003F;
+1429 003F;
+142F 003F;
+1435 003F;
+143B 003F;
+1441 003F;
+1447 003F;
+144D 003F;
+1453 003F;
+1459 003F;
+145F 003F;
+1465 003F;
+146B 003F;
+1471 003F;
+1477 003F;
+147D 003F;
+1483 003F;
+1489 003F;
+148F 003F;
+1495 003F;
+149B 003F;
+14A1 003F;
+14A7 003F;
+14AD 003F;
+14B3 003F;
+14B9 003F;
+14BF 003F;
+14C5 003F;
+14CB 003F;
+14D1 003F;
+14D7 003F;
+14DD 003F;
+14E3 003F;
+14E9 003F;
+14EF 003F;
+14F5 003F;
+14FB 003F;
+1501 003F;
+1507 003F;
+150D 003F;
+1513 003F;
+1519 003F;
+151F 003F;
+1525 003F;
+152B 003F;
+1531 003F;
+1537 003F;
+153D 003F;
+1543 003F;
+1549 003F;
+154F 003F;
+1555 003F;
+155B 003F;
+1561 003F;
+1567 003F;
+156D 003F;
+1573 003F;
+1579 003F;
+157F 003F;
+1585 003F;
+158B 003F;
+1590 003F;
+1671 003F;
+1596 003F;
+159C 003F;
+15A2 003F;
+15A7 003F;
+15AD 003F;
+15B3 003F;
+15B9 003F;
+15BF 003F;
+15C5 003F;
+15CB 003F;
+15D1 003F;
+15D7 003F;
+15DD 003F;
+15E3 003F;
+15E9 003F;
+15EF 003F;
+15F5 003F;
+15FB 003F;
+1601 003F;
+1607 003F;
+160D 003F;
+1613 003F;
+1619 003F;
+161F 003F;
+1625 003F;
+162B 003F;
+1631 003F;
+1637 003F;
+163D 003F;
+1643 003F;
+1649 003F;
+164F 003F;
+1655 003F;
+165B 003F;
+1661 003F;
+1667 003F;
+1681 003F;
+1687 003F;
+168D 003F;
+1693 003F;
+1699 003F;
+16A5 0041;
+16A8 0041;
+16B2 003F;
+16B9 003F;
+16BE 003F;
+16C4 0061;
+16D5 0061;
+16CD 0041;
+16D2 0061;
+16EF 003F;
+16DF 003F;
+16B8 003F;
+16E6 0061;
+3200 0062;
+AC00 0591 1161 0061;
+AC04 0061;
+FFA2 0062;
+320F 0061;
+FFA7 0062;
+3139 0021;
+3271 0062;
+3212 0061;
+FFB2 0062;
+3145 0021;
+3274 0062;
+3207 0041;
+321E 0062;
+FFB8 0062;
+3149 0041;
+FFBA 0062;
+320A 0041;
+FFBC 003F;
+314D 0021;
+327A 0062;
+327B 0021;
+D788 1175 0021;
+D7A2 0061;
+3166 0041;
+111A 0041;
+3171 0041;
+3144 0021;
+3175 0041;
+1128 0061;
+3179 0021;
+317C 0021;
+1133 0061;
+1138 0061;
+113E 0061;
+1143 0061;
+1148 0061;
+114D 0061;
+1153 0061;
+3185 0021;
+1160 0041;
+1162 0041;
+1164 0041;
+1166 0041;
+1168 0041;
+116A 0041;
+116C 0041;
+116E 0041;
+1170 0041;
+1172 0041;
+1174 0041;
+1177 0061;
+117D 0061;
+1183 0061;
+1187 0061;
+118C 0061;
+318A 0041;
+1195 0061;
+119B 0061;
+11A0 0061;
+3133 0021;
+11AC 0062;
+313A 0021;
+313C 0021;
+313E 0021;
+11B6 0061;
+11BC 0061;
+11C2 0061;
+3167 0041;
+3169 0021;
+11D0 0061;
+11D5 0061;
+316D 0041;
+11DE 0061;
+11E3 0061;
+11E9 0061;
+11EF 0061;
+11F3 0061;
+11F9 0061;
+30A2 0061;
+3044 0021;
+30A4 0062;
+30A6 0334 3099;
+FF73 0062;
+3048 0061;
+FF6B 0021;
+FF6B 0062;
+30AC 003F;
+330C 0021;
+304E 0334;
+3310 0062;
+3316 0062;
+30AF 0061;
+331A 0041;
+331C 003F;
+30B3 0021;
+3054 0041;
+30B5 0334 3099;
+3320 0021;
+30B7 0041;
+30B9 0021;
+3059 0062;
+FF7E 0041;
+32DE 003F;
+305F 003F;
+3060 0061;
+30C1 0061;
+3064 0334 3099;
+30C3 0062;
+FF83 0041;
+3069 0334;
+3326 003F;
+3328 003F;
+FF87 0021;
+30CD 0041;
+3329 003F;
+3071 0021;
+3070 0041;
+32EA 003F;
+32EA 0041;
+3330 0061;
+3076 0021;
+32EB 0062;
+30D8 003F;
+333C 0021;
+307A 0062;
+31F9 003F;
+3341 0041;
+307C 0062;
+32EE 0021;
+3345 003F;
+307F 0062;
+3080 0041;
+30E1 0041;
+30E2 0041;
+334F 0061;
+FF6D 0021;
+3350 003F;
+32F5 0061;
+FF97 0061;
+31FC 0062;
+308B 0041;
+308C 0041;
+FF9B 0021;
+32FB 003F;
+3357 0041;
+32FD 003F;
+30FA 003F;
+FF9D 0062;
+3108 0062;
+310C 0062;
+31AD 0062;
+3112 0062;
+3117 0061;
+311B 0061;
+31A5 0062;
+3121 0062;
+31B0 0062;
+31B3 0062;
+A001 0062;
+A007 0062;
+A00D 0062;
+A013 0062;
+A019 0062;
+A01F 0062;
+A025 0062;
+A02B 0062;
+A031 0062;
+A037 0062;
+A03D 0062;
+A043 0062;
+A049 0062;
+A04F 0062;
+A055 0062;
+A05B 0062;
+A061 0062;
+A067 0062;
+A06D 0062;
+A073 0062;
+A079 0062;
+A07F 0062;
+A085 0062;
+A08B 0062;
+A091 0062;
+A097 0062;
+A09D 0062;
+A0A3 0062;
+A0A9 0062;
+A0AF 0062;
+A0B5 0062;
+A0BB 0062;
+A0C1 0062;
+A0C7 0062;
+A0CD 0062;
+A0D3 0062;
+A0D9 0062;
+A0DF 0062;
+A0E5 0062;
+A0EB 0062;
+A0F1 0062;
+A0F7 0062;
+A0FD 0062;
+A103 0062;
+A109 0062;
+A10F 0062;
+A115 0062;
+A11B 0062;
+A121 0062;
+A127 0062;
+A12D 0062;
+A133 0062;
+A139 0062;
+A13F 0062;
+A145 0062;
+A14B 0062;
+A151 0062;
+A157 0062;
+A15D 0062;
+A163 0062;
+A169 0062;
+A16F 0062;
+A175 0062;
+A17B 0062;
+A181 0062;
+A187 0062;
+A18D 0062;
+A193 0062;
+A199 0062;
+A19F 0062;
+A1A5 0062;
+A1AB 0062;
+A1B1 0062;
+A1B7 0062;
+A1BD 0062;
+A1C3 0062;
+A1C9 0062;
+A1CF 0062;
+A1D5 0062;
+A1DB 0062;
+A1E1 0062;
+A1E7 0062;
+A1ED 0062;
+A1F3 0062;
+A1F9 0062;
+A1FF 0062;
+A205 0062;
+A20B 0062;
+A211 0062;
+A217 0062;
+A21D 0062;
+A223 0062;
+A229 0062;
+A22F 0062;
+A235 0062;
+A23B 0062;
+A241 0062;
+A247 0062;
+A24D 0062;
+A253 0062;
+A259 0062;
+A25F 0062;
+A265 0062;
+A26B 0062;
+A271 0062;
+A277 0062;
+A27D 0062;
+A283 0062;
+A289 0062;
+A28F 0062;
+A295 0062;
+A29B 0062;
+A2A1 0062;
+A2A7 0062;
+A2AD 0062;
+A2B3 0062;
+A2B9 0062;
+A2BF 0062;
+A2C5 0062;
+A2CB 0062;
+A2D1 0062;
+A2D7 0062;
+A2DD 0062;
+A2E3 0062;
+A2E9 0062;
+A2EF 0062;
+A2F5 0062;
+A2FB 0062;
+A301 0062;
+A307 0062;
+A30D 0062;
+A313 0062;
+A319 0062;
+A31F 0062;
+A325 0062;
+A32B 0062;
+A331 0062;
+A337 0062;
+A33D 0062;
+A343 0062;
+A349 0062;
+A34F 0062;
+A355 0062;
+A35B 0062;
+A361 0062;
+A367 0062;
+A36D 0062;
+A373 0062;
+A379 0062;
+A37F 0062;
+A385 0062;
+A38B 0062;
+A391 0062;
+A397 0062;
+A39D 0062;
+A3A3 0062;
+A3A9 0062;
+A3AF 0062;
+A3B5 0062;
+A3BB 0062;
+A3C1 0062;
+A3C7 0062;
+A3CD 0062;
+A3D3 0062;
+A3D9 0062;
+A3DF 0062;
+A3E5 0062;
+A3EB 0062;
+A3F1 0062;
+A3F7 0062;
+A3FD 0062;
+A403 0062;
+A409 0062;
+A40F 0062;
+A415 0062;
+A41B 0062;
+A421 0062;
+A427 0062;
+A42D 0062;
+A433 0062;
+A439 0062;
+A43F 0062;
+A445 0062;
+A44B 0062;
+A451 0062;
+A457 0062;
+A45D 0062;
+A463 0062;
+A469 0062;
+A46F 0062;
+A475 0062;
+A47B 0062;
+A481 0062;
+A487 0062;
+10300 0062;
+10306 0062;
+1030C 0062;
+10312 0062;
+10318 0062;
+1031E 0062;
+10335 0062;
+1033B 0062;
+10341 0062;
+10347 0062;
+10429 0061;
+1042C 0061;
+1042F 0061;
+10432 0061;
+10435 0061;
+10438 0061;
+1043B 0061;
+1043E 0061;
+10441 0061;
+10444 0061;
+10447 0061;
+1044A 0061;
+1044D 0061;
+10450 0062;
+10456 0062;
+1045C 0062;
+10462 0062;
+10468 0062;
+1046E 0062;
+10474 0062;
+1047A 0062;
+10480 0062;
+10486 0062;
+1048C 0062;
+10492 0062;
+10498 0062;
+10000 0062;
+10006 0062;
+1000D 0062;
+10013 0062;
+10019 0062;
+1001F 0062;
+10025 0062;
+1002C 0062;
+10032 0062;
+10038 0062;
+10040 0062;
+10046 0062;
+1004C 0062;
+10054 0062;
+1005A 0062;
+10082 0062;
+10088 0062;
+1008E 0062;
+10094 0062;
+1009A 0062;
+100A0 0062;
+100A6 0062;
+100AC 0062;
+100B2 0062;
+100B8 0062;
+100BE 0062;
+100C4 0062;
+100CA 0062;
+100D0 0062;
+100D6 0062;
+100DC 0062;
+100E2 0062;
+100E8 0062;
+100EE 0062;
+100F4 0062;
+100FA 0062;
+10805 0062;
+1080E 0062;
+10814 0062;
+1081A 0062;
+10820 0062;
+10826 0062;
+1082C 0062;
+10832 0062;
+1083C 0062;
+10384 0062;
+1038A 0062;
+10390 0062;
+10396 0062;
+1039C 0062;
+103A4 0062;
+103AA 0062;
+103B0 0062;
+103B6 0062;
+103BC 0062;
+103C2 0062;
+103CC 0062;
+12002 0062;
+12008 0062;
+1200E 0062;
+12014 0062;
+1201A 0062;
+12020 0062;
+12026 0062;
+1202C 0062;
+12032 0062;
+12038 0062;
+1203E 0062;
+12044 0062;
+1204A 0062;
+12050 0062;
+12056 0062;
+1205C 0062;
+12062 0062;
+12068 0062;
+1206E 0062;
+12074 0062;
+1207A 0062;
+12080 0062;
+12086 0062;
+1208C 0062;
+12092 0062;
+12098 0062;
+1209E 0062;
+120A4 0062;
+120AA 0062;
+120B0 0062;
+120B6 0062;
+120BC 0062;
+120C2 0062;
+120C8 0062;
+120CE 0062;
+120D4 0062;
+120DA 0062;
+120E0 0062;
+120E6 0062;
+120EC 0062;
+120F2 0062;
+120F8 0062;
+120FE 0062;
+12104 0062;
+1210A 0062;
+12110 0062;
+12116 0062;
+1211C 0062;
+12122 0062;
+12128 0062;
+1212E 0062;
+12134 0062;
+1213A 0062;
+12140 0062;
+12146 0062;
+1214C 0062;
+12152 0062;
+12158 0062;
+1215E 0062;
+12164 0062;
+1216A 0062;
+12170 0062;
+12176 0062;
+1217C 0062;
+12182 0062;
+12188 0062;
+1218E 0062;
+12194 0062;
+1219A 0062;
+121A0 0062;
+121A6 0062;
+121AC 0062;
+121B2 0062;
+121B8 0062;
+121BE 0062;
+121C4 0062;
+121CA 0062;
+121D0 0062;
+121D6 0062;
+121DC 0062;
+121E2 0062;
+121E8 0062;
+121EE 0062;
+121F4 0062;
+121FA 0062;
+12200 0062;
+12206 0062;
+1220C 0062;
+12212 0062;
+12218 0062;
+1221E 0062;
+12224 0062;
+1222A 0062;
+12230 0062;
+12236 0062;
+1223C 0062;
+12242 0062;
+12248 0062;
+1224E 0062;
+12254 0062;
+1225A 0062;
+12260 0062;
+12266 0062;
+1226C 0062;
+12272 0062;
+12278 0062;
+1227E 0062;
+12284 0062;
+1228A 0062;
+12290 0062;
+12296 0062;
+1229C 0062;
+122A2 0062;
+122A8 0062;
+122AE 0062;
+122B4 0062;
+122BA 0062;
+122C0 0062;
+122C6 0062;
+122CC 0062;
+122D2 0062;
+122D8 0062;
+122DE 0062;
+122E4 0062;
+122EA 0062;
+122F0 0062;
+122F6 0062;
+122FC 0062;
+12302 0062;
+12308 0062;
+1230E 0062;
+12314 0062;
+1231A 0062;
+12320 0062;
+12326 0062;
+1232C 0062;
+12332 0062;
+12338 0062;
+1233E 0062;
+12344 0062;
+1234A 0062;
+12350 0062;
+12356 0062;
+1235C 0062;
+12362 0062;
+12368 0062;
+1236E 0062;
+4E01 0061;
+4E04 0062;
+3196 0062;
+2F01 0062;
+2E80 0062;
+2E84 0021;
+3288 0062;
+3193 0061;
+2F08 0061;
+F9A8 0062;
+FA73 0062;
+F965 0062;
+F9BB 0062;
+FA74 0062;
+2F814 0062;
+3285 0021;
+2E86 0062;
+32A2 0062;
+F92E 0062;
+2E87 0062;
+2F81E 0062;
+2F820 0062;
+2F12 0062;
+2F825 0062;
+2F827 0062;
+2F82A 0062;
+32A9 0062;
+3039 0062;
+32AF 0062;
+329E 0062;
+2F833 0062;
+2F836 0062;
+32A8 0062;
+2F83D 0062;
+2F840 0062;
+2F844 0062;
+FA36 0061;
+FA7B 0062;
+2F1E 0062;
+2F84D 0062;
+2F852 0062;
+FA10 0061;
+F94A 0062;
+2F21 0062;
+2F85E 0062;
+F909 0062;
+2F865 0062;
+2F986 0062;
+323B 0061;
+2F86E 0062;
+2F28 0062;
+2E90 003F;
+2F2B 0062;
+2F2C 0021;
+F9D5 0062;
+2F9F4 0062;
+32A7 0062;
+2F886 0062;
+2F33 0062;
+F9A2 0062;
+F982 0062;
+2F38 0062;
+2F874 0062;
+F9D8 0062;
+2E96 0062;
+F9AC 0062;
+F9B9 0062;
+FA87 0061;
+FA3F 0041;
+2F8AF 0062;
+F990 0062;
+2F3E 0062;
+F95B 0062;
+2F8B7 0062;
+FA8D 0062;
+2F8C3 0062;
+2F40 0062;
+2F8C9 0062;
+2F45 0062;
+3290 0021;
+337C 0062;
+2F8CF 0062;
+2F8CC 0062;
+3232 0061;
+2F8D9 0062;
+2F8DC 0062;
+F9C9 0062;
+337F 0062;
+F9E2 0062;
+F914 0041;
+F91D 0062;
+2F8F3 0062;
+F9A5 0062;
+2F4F 0062;
+2F53 0062;
+2F8FA 0062;
+F9E3 0062;
+2F900 0062;
+FA45 0061;
+F9D6 0062;
+F9EC 0062;
+F94E 0062;
+F922 0062;
+2F917 0062;
+2F919 0062;
+2F91C 0062;
+F9EE 0062;
+2EA4 0041;
+2F59 0062;
+F946 0062;
+2EA8 0062;
+F9A7 0062;
+2F929 0061;
+F9CC 0062;
+2F930 0062;
+2F61 0062;
+2F65 0062;
+F976 0062;
+F9E5 0062;
+2F68 0062;
+FAA7 0062;
+FAA8 0061;
+FAAA 0062;
+2F6E 0062;
+FA4B 0062;
+2F70 0061;
+3293 0062;
+3297 0021;
+F93C 0062;
+2F71 0062;
+FA54 0061;
+FAAC 0062;
+F9F8 0062;
+F944 0062;
+FA03 0062;
+2F96A 0062;
+F93D 0062;
+2F96F 0062;
+2F78 0062;
+2EB3 0041;
+2EB7 0021;
+FA1E 0061;
+FAB2 003F;
+F9B0 0062;
+2EBB 0062;
+2F982 0062;
+3242 0061;
+2EBD 0062;
+2F88 0062;
+2EC0 003F;
+2F991 0062;
+2F996 0062;
+2F99A 0062;
+2F9A3 0062;
+FA5F 0061;
+2F9AA 0062;
+F91F 0062;
+2F9B4 0062;
+2F9BA 0062;
+2F9BE 0062;
+FA08 0061;
+F9A0 0062;
+2F9C9 0062;
+2EC3 0062;
+2EC5 0062;
+F96F 0061;
+FABE 0061;
+FA62 0061;
+FAC0 0061;
+2F9D2 0061;
+2F9D4 0062;
+FA64 0062;
+2F9B 0062;
+F937 0062;
+F998 0062;
+2ECB 0062;
+2ECD 0021;
+FA67 0062;
+2ECF 0062;
+2F9E6 0062;
+F9E9 0061;
+328E 0062;
+2F9E9 0062;
+2ED1 0061;
+F986 0062;
+F9C6 0062;
+F9DC 0062;
+F9EA 0062;
+F949 0062;
+FA1C 0061;
+FAC9 0062;
+FACA 0062;
+F9B4 0062;
+2FB5 0062;
+2EDF 0061;
+2FA04 0062;
+2FBA 0062;
+2FBB 0061;
+2FBE 0062;
+F939 0062;
+2FA0F 0062;
+2EE7 0062;
+2EE8 0062;
+F989 0062;
+2EEA 0062;
+2FCF 0062;
+2EEC 0062;
+2EEF 0062;
+2FD4 0041;
+9FA1 0062;
+FA0F 0062;
+FA23 0062;
+3401 0062;
+3407 0062;
+340D 0062;
+3413 0062;
+3419 0062;
+341F 0062;
+3425 0062;
+342B 0062;
+3431 0062;
+3437 0062;
+343D 0062;
+3443 0062;
+3449 0062;
+344F 0062;
+3455 0062;
+345B 0062;
+3461 0062;
+3467 0062;
+346D 0062;
+3473 0062;
+3479 0062;
+347F 0062;
+3485 0062;
+348B 0062;
+3491 0062;
+3497 0062;
+349D 0062;
+34A2 0062;
+34A8 0062;
+34AE 0062;
+34B4 0062;
+2F813 0062;
+34BE 0062;
+34C4 0062;
+34CA 0062;
+34D0 0062;
+34D6 0062;
+34DC 0062;
+34E1 0062;
+34E7 0062;
+34ED 0062;
+34F3 0062;
+34F9 0062;
+34FF 0062;
+3505 0062;
+350B 0062;
+3511 0062;
+3516 0062;
+351C 0062;
+3522 0062;
+3528 0062;
+352E 0062;
+3534 0062;
+353A 0062;
+3540 0062;
+3546 0062;
+354C 0062;
+3552 0062;
+3558 0062;
+355E 0062;
+3564 0062;
+356A 0062;
+3570 0062;
+3576 0062;
+357C 0062;
+3582 0062;
+3588 0062;
+358E 0062;
+3594 0062;
+359A 0062;
+35A0 0062;
+35A6 0062;
+35AC 0062;
+35B2 0062;
+35B8 0062;
+35BE 0062;
+35C4 0062;
+35CA 0062;
+35D0 0062;
+35D6 0062;
+35DC 0062;
+35E2 0062;
+35E8 0062;
+35EE 0062;
+35F4 0062;
+35FA 0062;
+3600 0062;
+3606 0062;
+360C 0062;
+3612 0062;
+3618 0062;
+361E 0062;
+3624 0062;
+362A 0062;
+3630 0062;
+3636 0062;
+363C 0062;
+3642 0062;
+3648 0062;
+364E 0062;
+3654 0062;
+365A 0062;
+3660 0062;
+3666 0062;
+366C 0062;
+3672 0062;
+3678 0062;
+367E 0062;
+3684 0062;
+368A 0062;
+3690 0062;
+3696 0062;
+369C 0062;
+36A2 0062;
+36A8 0062;
+36AE 0062;
+36B4 0062;
+36BA 0062;
+36C0 0062;
+36C6 0062;
+36CC 0062;
+36D2 0062;
+36D8 0062;
+36DE 0062;
+36E4 0062;
+36EA 0062;
+36EF 0062;
+36F5 0062;
+36FB 0062;
+3700 0062;
+3706 0062;
+370C 0062;
+3712 0062;
+3718 0062;
+371E 0062;
+3724 0062;
+372A 0062;
+3730 0062;
+3736 0062;
+373C 0062;
+3742 0062;
+3748 0062;
+374E 0062;
+3754 0062;
+375A 0062;
+3760 0062;
+3766 0062;
+376C 0062;
+3772 0062;
+3778 0062;
+377E 0062;
+3783 0062;
+3789 0062;
+378F 0062;
+3795 0062;
+379B 0062;
+37A1 0062;
+37A7 0062;
+37AD 0062;
+37B3 0062;
+37B9 0062;
+37BF 0062;
+37C5 0062;
+37CB 0062;
+37D1 0062;
+37D7 0062;
+37DD 0062;
+37E3 0062;
+37E9 0062;
+37EF 0062;
+37F5 0062;
+37FB 0062;
+3801 0062;
+3807 0062;
+380D 0062;
+3813 0062;
+3819 0062;
+381F 0062;
+3825 0062;
+382B 0062;
+3830 0062;
+3836 0062;
+383C 0062;
+3842 0062;
+3848 0062;
+384E 0062;
+3854 0062;
+385A 0062;
+3860 0062;
+3865 0062;
+386B 0062;
+3871 0062;
+3877 0062;
+2F88A 0062;
+3882 0062;
+3888 0062;
+388E 0062;
+3894 0062;
+389A 0062;
+38A0 0062;
+38A6 0062;
+38AC 0062;
+38B2 0062;
+38B8 0062;
+38BE 0062;
+38C4 0062;
+38C9 0062;
+38CF 0062;
+38D5 0062;
+38DB 0062;
+38E1 0062;
+38E6 0062;
+38EC 0062;
+38F2 0062;
+38F8 0062;
+38FE 0062;
+3904 0062;
+390A 0062;
+3910 0062;
+3916 0062;
+391C 0061;
+3921 0062;
+3927 0062;
+392D 0062;
+3933 0062;
+3939 0062;
+393E 0062;
+3944 0062;
+394A 0062;
+3950 0062;
+3956 0062;
+395C 0062;
+3962 0062;
+3968 0062;
+396E 0062;
+3974 0062;
+397A 0062;
+3980 0062;
+3986 0062;
+398C 0062;
+3992 0062;
+3998 0062;
+399E 0062;
+39A4 0062;
+39AA 0062;
+39B0 0062;
+39B6 0062;
+39BC 0062;
+39C2 0062;
+39C8 0062;
+39CE 0062;
+39D4 0062;
+39DA 0062;
+39E0 0062;
+39E6 0062;
+39EC 0062;
+39F2 0062;
+39F8 0062;
+39FE 0062;
+3A04 0062;
+3A0A 0062;
+3A10 0062;
+3A16 0062;
+3A1C 0062;
+3A22 0062;
+3A28 0062;
+3A2E 0061;
+3A33 0062;
+3A39 0062;
+3A3F 0062;
+3A45 0062;
+3A4B 0062;
+3A51 0062;
+3A57 0062;
+3A5D 0062;
+3A63 0062;
+3A69 0062;
+3A6E 0062;
+3A74 0062;
+3A7A 0062;
+3A80 0062;
+3A86 0062;
+3A8C 0062;
+3A92 0062;
+3A98 0062;
+3A9E 0062;
+3AA4 0062;
+3AAA 0062;
+3AB0 0062;
+3AB6 0062;
+3ABC 0062;
+3AC2 0062;
+3AC8 0062;
+3ACE 0062;
+3AD4 0062;
+3ADA 0062;
+3AE0 0062;
+3AE5 0062;
+3AEB 0062;
+3AF1 0062;
+3AF7 0062;
+3AFD 0062;
+3B03 0062;
+2F8D0 0062;
+3B0E 0062;
+3B14 0062;
+2F8CE 0062;
+3B1F 0062;
+3B25 0062;
+3B2B 0062;
+3B31 0062;
+3B37 0062;
+3B3D 0062;
+3B43 0062;
+3B49 0061;
+3B4E 0062;
+3B54 0062;
+3B5A 0062;
+3B60 0062;
+3B66 0062;
+3B6C 0062;
+3B72 0062;
+3B78 0062;
+3B7E 0062;
+3B84 0062;
+3B8A 0062;
+3B90 0062;
+3B96 0062;
+3B9C 0062;
+3BA0 0062;
+3BA6 0062;
+3BAC 0062;
+3BB2 0062;
+3BB8 0062;
+3BBE 0062;
+3BC4 0062;
+3BCA 0062;
+3BD0 0062;
+3BD6 0062;
+3BDC 0062;
+3BE2 0062;
+3BE8 0062;
+3BEE 0062;
+3BF4 0062;
+3BFA 0062;
+3C00 0062;
+3C06 0062;
+3C0C 0062;
+3C12 0062;
+3C18 0061;
+3C1D 0062;
+3C23 0062;
+3C29 0062;
+3C2F 0062;
+3C35 0062;
+3C3B 0062;
+3C41 0062;
+3C47 0062;
+3C4D 0062;
+3C52 0062;
+3C58 0062;
+3C5E 0062;
+3C64 0062;
+3C6A 0062;
+3C70 0062;
+3C76 0062;
+3C7C 0062;
+3C82 0062;
+3C88 0062;
+3C8E 0062;
+3C94 0062;
+3C9A 0062;
+3CA0 0062;
+3CA6 0062;
+3CAC 0062;
+3CB2 0062;
+3CB8 0062;
+3CBE 0062;
+3CC4 0062;
+3CCA 0062;
+3CD0 0062;
+3CD6 0062;
+3CDC 0062;
+3CE2 0062;
+3CE8 0062;
+3CEE 0062;
+3CF4 0062;
+3CFA 0062;
+3D00 0062;
+3D06 0062;
+3D0C 0062;
+3D12 0062;
+3D18 0062;
+3D1E 0062;
+3D24 0062;
+3D2A 0062;
+3D30 0062;
+3D35 0062;
+3D3B 0062;
+3D41 0062;
+3D47 0062;
+3D4D 0062;
+3D53 0062;
+3D59 0062;
+3D5F 0062;
+3D65 0062;
+3D6B 0062;
+3D71 0062;
+3D77 0062;
+3D7D 0062;
+3D83 0062;
+3D89 0062;
+3D8F 0062;
+3D95 0062;
+3D9A 0062;
+3DA0 0062;
+3DA6 0062;
+3DAC 0062;
+3DB2 0062;
+3DB8 0062;
+3DBE 0062;
+3DC4 0062;
+3DCA 0062;
+3DD0 0062;
+3DD6 0062;
+3DDC 0062;
+3DE2 0062;
+3DE8 0062;
+3DEE 0062;
+3DF4 0062;
+3DFA 0062;
+3E00 0062;
+3E06 0062;
+3E0C 0062;
+3E12 0062;
+3E18 0062;
+3E1E 0062;
+3E24 0062;
+3E2A 0062;
+3E30 0062;
+3E36 0062;
+3E3C 0062;
+3E42 0062;
+3E48 0062;
+3E4E 0062;
+3E54 0062;
+3E5A 0062;
+3E60 0062;
+3E66 0062;
+3E6C 0062;
+3E72 0062;
+3E78 0062;
+3E7E 0062;
+3E84 0062;
+3E8A 0062;
+3E90 0062;
+3E96 0062;
+3E9C 0062;
+3EA2 0062;
+3EA8 0062;
+3EAD 0062;
+3EB3 0062;
+3EB8 0041;
+3EBD 0062;
+3EC3 0062;
+3EC9 0062;
+3ECF 0062;
+3ED5 0062;
+3EDB 0062;
+3EE1 0062;
+3EE7 0062;
+3EED 0062;
+3EF3 0062;
+3EF9 0062;
+3EFF 0062;
+3F05 0062;
+3F0B 0062;
+3F11 0062;
+3F17 0062;
+3F1C 0062;
+3F22 0062;
+3F28 0062;
+3F2E 0062;
+3F34 0062;
+3F3A 0062;
+3F40 0062;
+3F46 0062;
+3F4C 0062;
+3F52 0062;
+3F58 0062;
+3F5E 0062;
+3F64 0062;
+3F6A 0062;
+3F70 0062;
+3F76 0062;
+3F7C 0062;
+3F82 0062;
+3F88 0062;
+3F8E 0062;
+3F94 0062;
+3F9A 0062;
+3FA0 0062;
+3FA6 0062;
+3FAC 0062;
+3FB2 0062;
+3FB8 0062;
+3FBE 0062;
+3FC4 0062;
+3FCA 0062;
+3FD0 0062;
+3FD6 0062;
+3FDC 0062;
+3FE2 0062;
+3FE8 0062;
+3FEE 0062;
+3FF4 0062;
+3FFA 0062;
+3FFF 0062;
+4005 0062;
+400A 0062;
+4010 0062;
+4016 0062;
+401B 0062;
+4021 0062;
+4027 0062;
+402D 0062;
+4033 0062;
+FAD4 003F;
+403D 0062;
+4043 0062;
+4048 0062;
+404E 0062;
+4054 0062;
+405A 0062;
+4060 0062;
+4066 0062;
+406C 0062;
+4072 0062;
+4078 0062;
+407E 0062;
+4084 0062;
+408A 0062;
+4090 0062;
+4096 0061;
+409B 0062;
+40A1 0062;
+40A7 0062;
+40AD 0062;
+40B3 0062;
+40B9 0062;
+40BF 0062;
+40C5 0062;
+40CB 0062;
+40D1 0062;
+40D7 0062;
+40DD 0062;
+40E3 0061;
+40E8 0062;
+40EE 0062;
+40F4 0062;
+40FA 0062;
+4100 0062;
+4106 0062;
+410C 0062;
+4112 0062;
+4118 0062;
+411E 0062;
+4124 0062;
+412A 0062;
+2F958 0062;
+4135 0062;
+413B 0062;
+4141 0062;
+4147 0062;
+414D 0062;
+4153 0062;
+4159 0062;
+415F 0062;
+4165 0062;
+416B 0062;
+4171 0062;
+4177 0062;
+417D 0062;
+4183 0062;
+4189 0062;
+418F 0062;
+4195 0062;
+419B 0062;
+41A1 0062;
+41A7 0062;
+41AD 0062;
+41B3 0062;
+41B9 0062;
+41BF 0062;
+41C5 0062;
+41CB 0062;
+41D1 0062;
+41D7 0062;
+41DD 0062;
+41E3 0062;
+41E9 0062;
+41EF 0062;
+41F5 0062;
+41FB 0062;
+4201 0062;
+4206 0062;
+420C 0062;
+4212 0062;
+4218 0062;
+421E 0062;
+4224 0062;
+4229 0062;
+422F 0062;
+4235 0062;
+423B 0062;
+4241 0062;
+4247 0062;
+424D 0062;
+4253 0062;
+4259 0062;
+425F 0062;
+4265 0062;
+426B 0062;
+4271 0062;
+4277 0062;
+427D 0062;
+4283 0062;
+4289 0062;
+428F 0062;
+4295 0062;
+429B 0062;
+2F967 0062;
+42A6 0062;
+42AC 0062;
+42B2 0062;
+42B8 0062;
+42BE 0062;
+42C4 0062;
+42CA 0062;
+42D0 0062;
+42D6 0062;
+42DC 0062;
+42E2 0062;
+42E8 0062;
+42EE 0062;
+42F4 0062;
+42FA 0062;
+4300 0062;
+4305 0062;
+430B 0062;
+4311 0062;
+4317 0062;
+431D 0062;
+4323 0062;
+4329 0062;
+432F 0062;
+2F971 0062;
+433A 0062;
+4340 0062;
+4346 0062;
+434C 0062;
+4352 0062;
+4358 0062;
+435D 0062;
+4363 0062;
+4369 0062;
+436F 0062;
+4375 0062;
+437B 0062;
+4381 0062;
+4387 0062;
+438D 0062;
+4393 0062;
+4399 0062;
+439F 0062;
+43A5 0062;
+43AB 0062;
+43B1 0062;
+43B7 0062;
+43BD 0062;
+43C3 0062;
+43C9 0062;
+43CF 0062;
+43D5 0061;
+2F8D7 0062;
+43DF 0062;
+43E5 0062;
+43EB 0062;
+43F1 0062;
+43F7 0062;
+43FD 0062;
+4403 0062;
+4409 0062;
+440E 0062;
+4414 0062;
+441A 0062;
+4420 0062;
+4426 0062;
+442C 0062;
+4432 0062;
+4438 0062;
+443E 0062;
+4444 0062;
+444A 0062;
+4450 0062;
+4456 0062;
+445C 0062;
+4462 0062;
+4468 0062;
+446D 0062;
+4473 0062;
+4479 0062;
+447F 0062;
+4485 0062;
+448B 0062;
+4491 0062;
+4497 0062;
+449D 0062;
+44A3 0062;
+44A9 0062;
+44AF 0062;
+44B5 0062;
+44BB 0062;
+44C1 0062;
+44C7 0062;
+44CD 0062;
+44D3 0062;
+44D9 0062;
+44DF 0062;
+44E5 0062;
+44EB 0062;
+44F1 0062;
+44F7 0062;
+44FD 0062;
+4503 0062;
+4509 0062;
+450F 0062;
+4515 0062;
+451B 0062;
+4521 0062;
+4527 0062;
+452C 0062;
+4532 0062;
+4538 0062;
+453E 0062;
+4544 0062;
+454A 0062;
+4550 0062;
+4556 0062;
+455C 0062;
+4561 0061;
+4566 0062;
+2F9B2 0062;
+4571 0062;
+4577 0062;
+457D 0062;
+4583 0062;
+4589 0062;
+458F 0062;
+4595 0062;
+459B 0062;
+45A1 0062;
+45A7 0062;
+45AD 0062;
+45B3 0062;
+45B9 0062;
+45BF 0062;
+45C5 0062;
+45CB 0062;
+45D1 0062;
+45D7 0061;
+45DC 0062;
+45E2 0062;
+45E8 0062;
+45EE 0062;
+45F4 0062;
+2F9C2 0062;
+45FF 0062;
+4605 0062;
+460B 0062;
+4611 0062;
+4617 0062;
+461D 0062;
+4623 0062;
+4629 0062;
+462F 0062;
+4635 0061;
+463A 0062;
+4640 0062;
+4646 0062;
+464C 0062;
+4652 0062;
+4658 0062;
+465E 0062;
+4664 0062;
+466A 0062;
+4670 0062;
+4676 0062;
+467C 0062;
+4682 0062;
+4688 0062;
+468E 0062;
+4694 0062;
+469A 0062;
+46A0 0062;
+46A6 0062;
+46AC 0062;
+46B2 0062;
+46B8 0062;
+46BE 0061;
+46C3 0062;
+46C8 0062;
+46CE 0062;
+46D4 0062;
+46DA 0062;
+46E0 0062;
+46E6 0062;
+46EC 0062;
+46F2 0062;
+46F8 0062;
+46FE 0062;
+4704 0062;
+470A 0062;
+4710 0062;
+4716 0062;
+471C 0062;
+4722 0062;
+4728 0062;
+472E 0062;
+4734 0062;
+473A 0062;
+4740 0062;
+4746 0062;
+474C 0062;
+4752 0062;
+4758 0062;
+475E 0062;
+4764 0062;
+476A 0062;
+4770 0062;
+4776 0062;
+477C 0062;
+4782 0062;
+4788 0062;
+478E 0062;
+4794 0062;
+479A 0062;
+47A0 0062;
+47A6 0062;
+47AC 0062;
+47B2 0062;
+47B8 0062;
+47BE 0062;
+47C4 0062;
+47CA 0062;
+47D0 0062;
+47D6 0062;
+47DC 0062;
+47E2 0062;
+47E8 0062;
+47EE 0062;
+47F4 0062;
+47FA 0062;
+4800 0062;
+4806 0062;
+480C 0062;
+4812 0062;
+4818 0062;
+481E 0062;
+4824 0062;
+482A 0062;
+4830 0062;
+4836 0062;
+483C 0062;
+4842 0062;
+4848 0062;
+484E 0062;
+4854 0062;
+485A 0062;
+4860 0062;
+4866 0062;
+486C 0062;
+4872 0062;
+4878 0062;
+487E 0062;
+4884 0062;
+488A 0062;
+4890 0062;
+4896 0062;
+489C 0062;
+48A2 0062;
+48A8 0062;
+48AE 0062;
+48B4 0062;
+48BA 0062;
+48C0 0062;
+48C6 0062;
+48CC 0062;
+48D2 0062;
+48D8 0062;
+48DE 0062;
+48E4 0062;
+48EA 0062;
+48F0 0062;
+48F6 0062;
+48FC 0062;
+4902 0062;
+4908 0062;
+490E 0062;
+4914 0062;
+491A 0062;
+4920 0062;
+4926 0062;
+492C 0062;
+4932 0062;
+4938 0062;
+493E 0062;
+4944 0062;
+494A 0062;
+4950 0062;
+4956 0062;
+495C 0062;
+4962 0062;
+4968 0062;
+496E 0062;
+4974 0062;
+497A 0062;
+4980 0062;
+4986 0062;
+498C 0062;
+4992 0062;
+4997 0062;
+499D 0062;
+49A3 0062;
+49A9 0062;
+49AF 0062;
+49B5 0062;
+49BB 0062;
+49C1 0062;
+49C7 0062;
+49CD 0062;
+49D3 0062;
+49D9 0062;
+49DF 0062;
+49E5 0062;
+49EA 0062;
+49F0 0062;
+49F6 0062;
+49FC 0062;
+4A02 0062;
+4A08 0062;
+4A0E 0062;
+4A14 0062;
+4A1A 0062;
+4A20 0062;
+4A26 0062;
+4A2C 0062;
+4A32 0062;
+4A38 0062;
+4A3E 0062;
+4A44 0062;
+4A4A 0062;
+4A50 0062;
+4A56 0062;
+4A5C 0062;
+4A62 0062;
+4A68 0062;
+4A6E 0061;
+4A73 0062;
+4A78 0062;
+4A7E 0062;
+4A84 0062;
+4A8A 0062;
+4A90 0062;
+4A96 0062;
+4A9C 0062;
+4AA2 0062;
+4AA8 0062;
+4AAE 0062;
+4AB3 0062;
+4AB9 0062;
+4ABF 0062;
+4AC5 0062;
+4ACB 0062;
+4AD1 0062;
+4AD7 0062;
+4ADD 0062;
+4AE3 0062;
+4AE9 0062;
+4AEF 0062;
+4AF5 0062;
+4AFB 0062;
+4B01 0062;
+4B07 0062;
+4B0D 0062;
+4B13 0062;
+4B19 0062;
+4B1F 0062;
+4B25 0062;
+4B2B 0062;
+4B31 0062;
+4B36 0062;
+4B3C 0062;
+4B42 0062;
+4B48 0062;
+4B4E 0062;
+4B54 0062;
+4B5A 0062;
+4B60 0062;
+4B66 0062;
+4B6C 0062;
+4B72 0062;
+4B78 0062;
+4B7E 0062;
+4B84 0062;
+4B8A 0062;
+4B90 0062;
+4B96 0062;
+4B9C 0062;
+4BA2 0062;
+4BA8 0062;
+4BAE 0062;
+4BB4 0062;
+4BBA 0062;
+4BC0 0062;
+4BC6 0062;
+4BCC 0062;
+4BD1 0062;
+4BD7 0062;
+4BDD 0062;
+4BE3 0062;
+4BE9 0062;
+4BEF 0062;
+4BF5 0062;
+4BFB 0062;
+4C01 0062;
+4C07 0062;
+4C0D 0062;
+4C13 0062;
+4C19 0062;
+4C1F 0062;
+4C25 0062;
+4C2B 0062;
+4C31 0062;
+4C37 0062;
+4C3D 0062;
+4C43 0062;
+4C49 0062;
+4C4F 0062;
+4C55 0062;
+4C5B 0062;
+4C61 0062;
+4C67 0062;
+4C6D 0062;
+4C73 0062;
+4C79 0062;
+4C7F 0062;
+4C85 0062;
+4C8B 0062;
+4C91 0062;
+4C97 0062;
+4C9D 0062;
+4CA3 0062;
+4CA9 0062;
+4CAF 0062;
+4CB5 0062;
+4CBB 0062;
+4CC1 0062;
+4CC7 0062;
+4CCD 0062;
+4CD2 0062;
+4CD8 0062;
+4CDE 0062;
+4CE4 0062;
+4CEA 0062;
+4CEF 0062;
+4CF5 0062;
+4CFA 0062;
+4D00 0062;
+4D06 0062;
+4D0C 0062;
+4D12 0062;
+4D18 0062;
+4D1E 0062;
+4D24 0062;
+4D2A 0062;
+4D30 0062;
+4D36 0062;
+4D3C 0062;
+4D42 0062;
+4D48 0062;
+4D4E 0062;
+4D54 0062;
+4D59 0062;
+4D5F 0062;
+4D65 0062;
+4D6B 0062;
+4D71 0062;
+4D77 0062;
+4D7D 0062;
+4D83 0062;
+4D89 0062;
+4D8F 0062;
+4D95 0062;
+4D9B 0062;
+4DA1 0062;
+4DA7 0062;
+4DAD 0062;
+4DB3 0062;
+20003 0062;
+2F816 0062;
+2F859 0062;
+2F87B 0062;
+2F8A4 0062;
+2F897 0062;
+2F8E3 0062;
+2F906 0062;
+2F923 0062;
+2F93C 0062;
+FAD5 0062;
+2F95D 0061;
+2F898 0062;
+2F97C 0062;
+2F9A6 0062;
+2F9C5 0062;
+2F9E0 0062;
+2F81C 0062;
+2FA10 0062;
+2A6D1 0062;
+0370 0062;
+E005 0062;
+F8FF 0062;
+E0003 0062;
+F0003 0062;
+F00FB 0062;
+FFF03 0062;
+FFFFB 0062;
+100003 0062;
+1000FB 0062;
+10FF03 0062;
+10FFFB 0062;
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/DataDrivenCollationTest.txt b/Build/source/libs/icu/icu-xetex/test/testdata/DataDrivenCollationTest.txt
new file mode 100644
index 00000000000..6374f4d0f78
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/DataDrivenCollationTest.txt
@@ -0,0 +1,518 @@
+// Copyright (c) 2001-2007 International Business Machines
+// Corporation and others. All Rights Reserved.
+DataDrivenCollationTest:table(nofallback) {
+ Info {
+ Headers { "sequence" }
+ Description { "These are the data driven tests" }
+ LongDescription { "The following entries are separate tests containing test data for various locales."
+ "Each entry has the following fields: "
+ "Info/Description - short descrioption of the test"
+ "Settings - settings for the test."
+ "Settings/TestLocale - locale for the collator OR"
+ "Settings/Rules - rules for the collator (can't have both)"
+ "Settings/Arguments - arguments to be passed to the collator before testing. Use rule syntax."
+ "Cases - set of test cases, which are sequences of strings that will be parsed"
+ "Sequences must not change the sign of relation, i.e. we can only have < and = or"
+ "> and = in single sequence. Cannot mix < and > in the same sequence. Whitespace is"
+ "is ignored unless quoted."
+ }
+ }
+ TestData {
+ TestMorePinyin {
+ Info {
+ Description { "Testing the primary strength." }
+ }
+ Settings {
+ {
+ TestLocale { "zh" }
+ Arguments { "[strength 1]" }
+ }
+ }
+ Cases { "lÄ = lÄ€ = LÄ = LÄ€ < lÄn = lÄ€n < lÄ“ = lÄ’ = LÄ“ = LÄ’ < lÄ“n = lÄ’n" }
+
+ }
+ TestLithuanian {
+ Info {
+ Description { "Lithuanian sort order." }
+ }
+ Settings {
+ {
+ TestLocale { "lt" }
+ }
+ }
+ Cases { "cz<Ä<d<iz<y<j<sz<Å¡<t<zz<ž" }
+ }
+ TestLatvian {
+ Info {
+ Description { "Latvian sort order." }
+ }
+ Settings {
+ {
+ TestLocale { "lv" }
+ }
+ }
+ Cases { "cz<Ä<d<gz<Ä£<h<iz<y<j<kz<Ä·<l<lz<ļ<m<nz<ņ<o<rz<Å—<s<sz<Å¡<t<zz<ž" }
+ }
+ TestEstonian {
+ Info {
+ Description { "Estonian sort order." }
+ }
+ Settings {
+ {
+ TestLocale { "et" }
+ }
+ }
+ Cases { "sy<š<šy<z<zy<ž<v<w<va<õ<õy<ä<äy<ö<öy<ü<üy<x" }
+ }
+ TestAlbanian {
+ Info {
+ Description { "Albanian sort order." }
+ }
+ Settings {
+ {
+ TestLocale { "sq" }
+ }
+ }
+ Cases { "cz<ç<d<dz<dh<e<ez<ë<f<gz<gj<h<lz<ll<m<nz<nj<o<rz<rr<s<sz<sh<t<tz<th<u<xz<xh<y<zz<zh" }
+ }
+
+ TestSimplifiedChineseOrder {
+ Info {
+ Description { "Sorted file has different order." }
+ }
+ Settings {
+ {
+ TestLocale { "root" }
+ Arguments { "[normalization on]" }
+ }
+ }
+
+ Cases { "\u5F20<\u5F20\u4E00\u8E3F" }
+ }
+
+ TestTibetanNormalizedIterativeCrash {
+ Info {
+ Description { "This pretty much crashes." }
+ }
+ Settings {
+ {
+ TestLocale { "root" }
+ }
+ }
+
+ Cases { "\u0f71\u0f72\u0f80\u0f71\u0f72"
+ "<\u0f80"
+ }
+ }
+ TestThaiPartialSortKeyProblems {
+ Info {
+ Description { "These are examples of strings that caused trouble in partial sort key testing." }
+ }
+ Settings {
+ {
+ TestLocale { "th_TH" }
+ }
+ }
+ // TODO: the tests that are commented out should be enabled when j2720 is fixed
+ Cases { "\u0E01\u0E01\u0E38\u0E18\u0E20\u0E31\u0E13\u0E11\u0E4C"
+ "<\u0E01\u0E01\u0E38\u0E2A\u0E31\u0E19\u0E42\u0E18",
+ "\u0E01\u0E07\u0E01\u0E32\u0E23"
+ "<\u0E01\u0E07\u0E42\u0E01\u0E49",
+ "\u0E01\u0E23\u0E19\u0E17\u0E32"
+ "<\u0E01\u0E23\u0E19\u0E19\u0E40\u0E0A\u0E49\u0E32",
+ "\u0E01\u0E23\u0E30\u0E40\u0E08\u0E35\u0E22\u0E27"
+ "<\u0E01\u0E23\u0E30\u0E40\u0E08\u0E35\u0E4A\u0E22\u0E27",
+ "\u0E01\u0E23\u0E23\u0E40\u0E0A\u0E2D"
+ "<\u0E01\u0E23\u0E23\u0E40\u0E0A\u0E49\u0E32"
+ }
+ }
+ TestJavaStyleRule {
+ Info {
+ Description { "java.text allows rules to start as '<<<x<<<y...' "
+ "we emulate this by assuming a &[first tertiary ignorable] "
+ "in this case."
+ }
+ }
+ Settings {
+ {
+ Rules { "=equal<<<z<<x<<<w<y &[first tertiary ignorable]=a &[first primary ignorable]=b" }
+ }
+ }
+ Cases { "a = equal < z < x < w < b < y" }
+ }
+ TestShiftedIgnorable {
+ Info {
+ Description { "New UCA states that primary ignorables should be completely "
+ "ignorable when following a shifted code point."
+ }
+ }
+ Settings {
+ {
+ TestLocale { "root" }
+ Arguments { "[alternate shifted][strength 4]" }
+ }
+ }
+ Cases {
+ "a' 'b="
+ "a' '\u0300b="
+ "a' '\u0301b<"
+ "a_b="
+ "a_\u0300b="
+ "a_\u0301b<"
+ "A' 'b="
+ "A' '\u0300b="
+ "A' '\u0301b<"
+ "A_b="
+ "A_\u0300b="
+ "A_\u0301b<"
+ "a\u0301b<"
+ "A\u0301b<"
+ "a\u0300b<"
+ "A\u0300b"
+
+ }
+ }
+
+ TestNShiftedIgnorable {
+ Info {
+ Description { "New UCA states that primary ignorables should be completely "
+ "ignorable when following a shifted code point."
+ }
+ }
+ Settings {
+ {
+ TestLocale { "root" }
+ Arguments { "[alternate non-ignorable][strength 3]" }
+ }
+ }
+ Cases {
+ "a' 'b<"
+ "A' 'b<"
+ "a' '\u0301b<"
+ "A' '\u0301b<"
+ "a' '\u0300b<"
+ "A' '\u0300b<"
+ "a_b<"
+ "A_b<"
+ "a_\u0301b<"
+ "A_\u0301b<"
+ "a_\u0300b<"
+ "A_\u0300b<"
+ "a\u0301b<"
+ "A\u0301b<"
+ "a\u0300b<"
+ "A\u0300b<"
+ }
+ }
+
+ TestSafeSurrogates {
+ Info {
+ Description { "It turned out that surrogates were not skipped properly "
+ "when iterating backwards if they were in the middle of a "
+ "contraction. This test assures that this is fixed."
+ }
+ }
+ Settings {
+ {
+ Rules {
+ "&a < x\ud800\udc00b"
+ }
+ }
+ }
+ Cases {
+ "a<x\ud800\udc00b"
+ }
+ }
+/*
+ UCA 4.1 removes skipping of ignorable code points in contractions!
+ TestCIgnorableContraction {
+ Info {
+ Description { "Checks whether completely ignorable code points are "
+ "skipped in contractions."
+ }
+ }
+ Settings {
+ {
+ TestLocale { "sh" }
+ }
+ {
+ Rules {
+ "& L < lj, Lj <<< LJ"
+ "& N < nj, Nj <<< NJ "
+ }
+ }
+ }
+ Cases {
+ "njiva=n\ud834\udd65jiva=n\uD834\uDD79jiva=n\u0000\u0000\u0000jiva=n\u0000jiva=n\ud800jiva=n\ufffejiva",
+ "ljubav=l\u0000jubav=l\uD834\uDD79jubav=l\u0000\u0000\u0000jubav=l\ud800jubav=l\ufffejubav",
+ "Ljubav=L\u0000jubav=L\uD834\uDD79jubav=L\u0000\u0000\u0000jubav=L\ud800jubav=L\ufffejubav",
+ }
+ }
+
+*/
+/*
+ UCA 4.1 removes skipping of ignorable code points in contractions!
+ TestCIgnorablePrefix {
+ Info {
+ Description { "Checks whether completely ignorable code points are "
+ "skipped in prefix processing."
+ }
+ }
+ Settings {
+ {
+ TestLocale { "ja" }
+ }
+ }
+ Cases {
+ "\u30A1\u30FC"
+ "= \u30A1\uDB40\uDC30\u30FC"
+ "= \u30A1\uD800\u30FC"
+ "= \u30A1\uFFFE\u30FC"
+ "= \u30A1\uD834\uDD79\u30FC"
+ "= \u30A1\u0000\u0000\u0000\u30FC"
+ "= \u30A1\u0000\u30FC"
+ "= \u30A1\u30FC"
+ "= \u30A1\u0000\u059a\u30FC"
+ "= \u30A1\u30FC"
+ }
+ }
+*/
+ da_TestPrimary {
+ Info {
+ Description { "This test goes through primary strength cases" }
+ }
+ Settings {
+ {
+ TestLocale { "da" }
+ Arguments { "[strength 1]" }
+ }
+ }
+ Cases {
+ "Lvi<Lwi",
+ "L\u00e4vi<L\u00f6wi",
+ "L\u00fcbeck=Lybeck",
+ }
+ }
+ da_TestTertiary {
+ Info {
+ Description { "This test goes through tertiary strength cases" }
+ }
+ Settings {
+ {
+ TestLocale { "da" }
+ Arguments { "[strength 3]" }
+ }
+ }
+ Cases {
+ "Luc<luck",
+ "luck<L\u00fcbeck",
+ "L\u00fcbeck>lybeck",
+ "L\u00e4vi<L\u00f6we",
+ "L\u00f6ww<mast",
+ // constUCharCollationDanishTest::testBugs[][CollationDanishTest::MAX_TOKEN_LEN]="
+ "A/S<"
+ "ANDRE<"
+ "ANDR\u00c9<"
+ "ANDREAS<"
+ "AS<"
+ "CA<"
+ "\u00c7A<"
+ "CB<"
+ "\u00c7C<"
+ "D.S.B.<"
+ "DA<"
+ "\u00d0A<"
+ "DB<"
+ "\u00d0C<"
+ "DSB<"
+ "DSC<"
+ "EKSTRA_ARBEJDE<"
+ "EKSTRABUD0<"
+ "H\u00d8ST<"
+ "HAAG<"
+ "H\u00c5NDBOG<"
+ "HAANDV\u00c6RKSBANKEN<"
+ "Karl<"
+ "karl<"
+ "'NIELS J\u00d8RGEN'<"
+ "NIELS-J\u00d8RGEN<"
+ "NIELSEN<"
+ "'R\u00c9E, A'<"
+ "'REE, B'<"
+ "'R\u00c9E, L'<"
+ "'REE, V'<"
+ "'SCHYTT, B'<"
+ "'SCHYTT, H'<"
+ "'SCH\u00dcTT, H'<"
+ "'SCHYTT, L'<"
+ "'SCH\u00dcTT, M'<"
+ "SS<"
+ "\u00df<"
+ "SSA<"
+ "'STORE VILDMOSE'<"
+ "STOREK\u00c6R0<"
+ "'STORM PETERSEN'<"
+ "STORMLY<"
+ "THORVALD<"
+ "THORVARDUR<"
+ "\u00feORVAR\u00d0UR<"
+ "THYGESEN<"
+ "'VESTERG\u00c5RD, A'<"
+ "'VESTERGAARD, A'<"
+ "'VESTERG\u00c5RD, B'<"
+ "\u00c6BLE<"
+ "\u00c4BLE<"
+ "\u00d8BERG<"
+ "\u00d6BERG",
+
+ // constUCharCollationDanishTest::testNTList[][CollationDanishTest::MAX_TOKEN_LEN]="
+ "andere<"
+ "chaque<"
+ "chemin<"
+ "cote<"
+ "cot\u00e9<"
+ "c\u00f4te<"
+ "c\u00f4t\u00e9<"
+ "\u010du\u010d\u0113t<"
+ "Czech<"
+ "hi\u0161a<"
+ "irdisch<"
+ "lie<"
+ "lire<"
+ "llama<"
+ "l\u00f5ug<"
+ "l\u00f2za<"
+ "lu\u010d<"
+ "luck<"
+ "L\u00fcbeck<"
+ "lye<"
+ "l\u00e4vi<"
+ "L\u00f6wen<"
+ "m\u00e0\u0161ta<"
+ "m\u00eer<"
+ "myndig<"
+ "M\u00e4nner<"
+ "m\u00f6chten<"
+ "pi\u00f1a<"
+ "pint<"
+ "pylon<"
+ "\u0161\u00e0ran<"
+ "savoir<"
+ "\u0160erb\u016bra<"
+ "Sietla<"
+ "\u015blub<"
+ "subtle<"
+ "symbol<"
+ "s\u00e4mtlich<"
+ "verkehrt<"
+ "vox<"
+ "v\u00e4ga<"
+ "waffle<"
+ "wood<"
+ "yen<"
+ "yuan<"
+ "yucca<"
+ "\u017eal<"
+ "\u017eena<"
+ "\u017den\u0113va<"
+ "zoo0<"
+ "Zviedrija<"
+ "Z\u00fcrich<"
+ "zysk0<"
+ "\u00e4ndere"
+ }
+ }
+ hi_TestNewRules {
+ Info {
+ Description { "This test goes through new rules and tests against old rules" }
+ }
+ Settings {
+ {
+ TestLocale { "hi" }
+ }
+ }
+ Cases {
+ "à¥<।<॥<॰<०<१<२<३"
+ "<४<५<६<७<८<९<अ<आ"
+ "<इ<ई<उ<ऊ<ऋ<ॠ<ऌ<ॡ"
+ "<à¤<ऎ<à¤<à¤<ऑ<ऒ<ओ<औ"
+ "<क<क़=क़<कà¤<कं<कः<क॑<क॒"
+ "<क॓<क॔<कऽ<कà¥<का<कि<की<कà¥"
+ "<कू<कृ<कॄ<कॢ<कॣ<कॅ<कॆ<के"
+ "<कै<कॉ<कॊ<को<कौ<ख<ख़ =ख़<खà¤<खं<खः"
+ "<ख॑<ख॒<ख॓<ख॔<खऽ<खà¥<खा<खि"
+ "<खी<खà¥<खू<खृ<खॄ<खॢ<खॣ<खॅ"
+ "<खॆ<खे<खै<खॉ<खॊ<खो<खौ<ग"
+ "<ग़=ग़<गà¤<गं<गः<ग॑<ग॒<ग॓<ग॔"
+ "<गऽ<गà¥<गा<गि<गी<गà¥<गू<गृ"
+ "<गॄ<गॢ<गॣ<गॅ<गॆ<गे<गै<गॉ"
+ "<गॊ<गो<गौ<घ<ङ<च<छ<ज<ज़ =ज़<जà¤<जं<जः"
+ "<ज॑<ज॒<ज॓<ज॔<जऽ<जà¥<जा<जि"
+ "<जी<जà¥<जू<जृ<जॄ<जॢ<जॣ<जॅ"
+ "<जॆ<जे<जै<जॉ<जॊ<जो<जौ<à¤"
+ "<ञ<ट<ठ<ड<ड़=ड़<डà¤<डं<डः<ड॑<ड॒<ड॓<ड॔"
+ "<डऽ<डà¥<डा<डि<डी<डà¥<डू<डृ"
+ "<डॄ<डॢ<डॣ<डॅ<डॆ<डे<डै<डॉ"
+ "<डॊ<डो<डौ<ढ<ढ़=à¥<ढà¤<ढं<ढः"
+ "<ढ॑<ढ॒<ढ॓<ढ॔<ढऽ<ढà¥<ढा<ढि"
+ "<ढी<ढà¥<ढू<ढृ<ढॄ<ढॢ<ढॣ<ढॅ"
+ "<ढॆ<ढे<ढै<ढॉ<ढॊ<ढो<ढौ<ण"
+ "<त<थ<द<ध<न<ऩ =ऩ< नà¤<नं< नः"
+ "<न॑<न॒<न॓<न॔<नऽ<नà¥<ना<नि"
+ "<नी<नà¥<नू<नृ<नॄ<नॢ<नॣ<नॅ"
+ "<नॆ<ने<नै<नॉ<नॊ<नो<नौ"
+ "<प<फ<फ़=फ़<फà¤<फं<फः<फ॑<फ॒"
+ "<फ॓<फ॔<फऽ<फà¥<फा<फि<फी<फà¥<फू<फृ"
+ "<फॄ<फॢ<फॣ<फॅ<फॆ<फे<फै<फॉ"
+ "<फॊ<फो<फौ<ब<भ<म<य<य़=य़ "
+ "<यà¤<यं<यः<य॑<य॒<य॓<य॔"
+ "<यऽ<यà¥<या<यि<यी<यà¥<यू<यृ"
+ "<यॄ<यॢ<यॣ<यॅ<यॆ<ये<यै<यॉ"
+ "<यॊ<यो<यौ<र<ऱ=ऱ<रà¤<रं<रः"
+ "<र॑<र॒<र॓<र॔<रऽ<रà¥<रा<रि"
+ "<री<रà¥<रू<रृ<रॄ<रॢ<रॣ<रॅ"
+ "<रॆ<रे<रै<रॉ<रॊ<रो<रौ"
+ "<ल<ळ<ऴ=ऴ<ळà¤<ळं<ळः<ळ॑<ळ॒"
+ "<ळ॓<ळ॔<ळऽ<ळà¥<ळा<ळि<ळी<ळà¥"
+ "<ळू<ळृ<ळॄ<ळॢ<ळॣ<ळॅ<ळॆ<ळे"
+ "<ळै<ळॉ<ळॊ<ळो<ळौ<व<श<ष<स<ह"
+ "<़<à¤<ं<ः<॑<॒<॓<॔<ऽ<à¥<ा<ि<ी"
+ "<à¥<ू<ृ<ॄ<ॢ<ॣ<ॅ<ॆ"
+ "<े<ै<ॉ<ॊ<ो<ौ"
+ }
+ }
+// fi_TestNewRules {
+// Info {
+// Description { "This test goes through new rules and tests against old rules" }
+// }
+// Settings {
+// {
+// TestLocale { "fi" }
+// }
+// }
+// Cases {
+// "xa<xA<Xa<XA<xá<Xá<xax<xAx<xáx<xd<Xd<xð<xÃ<Xð<XÃ<xÄ‘<xÄ<XÄ‘<XÄ<"
+// "xdx<xðx<xÃx<xÄ‘x<xÄx<xe<Xe<xex<xn<Xn<xÅ‹<xÅŠ<XÅ‹<XÅŠ<xnx<xÅ‹x<xÅŠx<"
+// "xo<Xo<xó<Xó<xox<xóx<xs<Xs<xß<Xß<xßx<xsx<xt<Xt<xþ<xÞ<Xþ<XÞ<xþx<"
+// "xÞx<xtx<xu<Xu<xú<Xú<xux<xúx<xv<Xv<xw<Xw<xvx<xwx<xy<Xy<xü<Xü<"
+// "xű<Xű<xyx<xüx<xűx<xz<Xz<xzx<xå<Xå<xåx<xä<Xä<xæ<xÆ<Xæ<XÆ<xäx<"
+// "xæx<xÆx<xö<Xö<xø<Xø<xő<Xő<xõ<Xõ<xœ<xŒ<Xœ<XŒ<xöx<xøx<xőx<xõx<xœx<xŒx"
+//}
+//}
+ ro_TestNewRules {
+ Info {
+ Description { "This test goes through new rules and tests against old rules" }
+ }
+ Settings {
+ {
+ TestLocale { "ro" }
+ }
+ }
+ Cases {
+ "xAx<xă<xĂ<Xă<XĂ<xăx<xĂx<xâ<xÂ<Xâ<XÂ<xâx<xÂx<xb<xIx<xî<xÎ<Xî<XÎ<xîx<xÎx<"
+ "xj<xSx<xș=xş<xȘ=xŞ<Xș=Xş<XȘ=XŞ<xșx=xşx<xȘx=xŞx<xT<xTx<xț=xţ<xȚ=xŢ<Xț=Xţ<XȚ"
+ "=XŢ<xțx=xţx<xȚx=xŢx<xU"
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/GraphemeBreakTest.txt b/Build/source/libs/icu/icu-xetex/test/testdata/GraphemeBreakTest.txt
new file mode 100644
index 00000000000..69096e10659
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/GraphemeBreakTest.txt
@@ -0,0 +1,123 @@
+# GraphemeBreakTest-5.0.0.txt
+# Date: 2006-06-11, 20:09:11 GMT [MD]
+#
+# Unicode Character Database
+# Copyright (c) 1991-2006 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see UCD.html
+#
+# Default Grapheme Break Test
+#
+# Format:
+# <string> (# <comment>)?
+# <string> contains hex Unicode code points, with
+# ÷ wherever there is a break opportunity, and
+# × wherever there is not.
+# <comment> the format can change, but currently it shows:
+# - the sample character name
+# - (x) the line_break property* for the sample character
+# - [x] the rule that determines whether there is a break or not
+#
+# These samples may be extended or changed in the future.
+#
+÷ 0020 ÷ 0020 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0020 ÷ 000D ÷ # ÷ [0.2] SPACE (Other) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 0020 ÷ 000A ÷ # ÷ [0.2] SPACE (Other) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 0020 ÷ 0001 ÷ # ÷ [0.2] SPACE (Other) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 0020 × 0300 ÷ # ÷ [0.2] SPACE (Other) × [9.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 0020 ÷ 1100 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 0020 ÷ 1160 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 0020 ÷ 11A8 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 0020 ÷ AC00 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 0020 ÷ AC01 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ 000D ÷ 0020 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] SPACE (Other) ÷ [0.3]
+÷ 000D ÷ 000D ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 000D × 000A ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) × [3.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 000D ÷ 0001 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 000D ÷ 0300 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 000D ÷ 1100 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 000D ÷ 1160 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 000D ÷ 11A8 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 000D ÷ AC00 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 000D ÷ AC01 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ 000A ÷ 0020 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] SPACE (Other) ÷ [0.3]
+÷ 000A ÷ 000D ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 000A ÷ 000A ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 000A ÷ 0001 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 000A ÷ 0300 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 000A ÷ 1100 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 000A ÷ 1160 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 000A ÷ 11A8 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 000A ÷ AC00 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 000A ÷ AC01 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ 0001 ÷ 0020 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] SPACE (Other) ÷ [0.3]
+÷ 0001 ÷ 000D ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 0001 ÷ 000A ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 0001 ÷ 0001 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 0001 ÷ 0300 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 0001 ÷ 1100 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 0001 ÷ 1160 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 0001 ÷ 11A8 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 0001 ÷ AC00 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 0001 ÷ AC01 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ 0300 ÷ 0020 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0300 ÷ 000D ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 0300 ÷ 000A ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 0300 ÷ 0001 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 0300 × 0300 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) × [9.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 0300 ÷ 1100 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 0300 ÷ 1160 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 0300 ÷ 11A8 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [999.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 0300 ÷ AC00 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 0300 ÷ AC01 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ 1100 ÷ 0020 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 1100 ÷ 000D ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 1100 ÷ 000A ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 1100 ÷ 0001 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 1100 × 0300 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [9.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 1100 × 1100 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [6.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 1100 × 1160 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [6.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 1100 ÷ 11A8 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [999.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 1100 × AC00 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [6.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 1100 × AC01 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [6.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ 1160 ÷ 0020 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 1160 ÷ 000D ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 1160 ÷ 000A ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 1160 ÷ 0001 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 1160 × 0300 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) × [9.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 1160 ÷ 1100 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 1160 × 1160 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) × [7.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 1160 × 11A8 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) × [7.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 1160 ÷ AC00 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 1160 ÷ AC01 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ 11A8 ÷ 0020 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 11A8 ÷ 000D ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ 11A8 ÷ 000A ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ 11A8 ÷ 0001 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ 11A8 × 0300 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) × [9.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ 11A8 ÷ 1100 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ 11A8 ÷ 1160 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ 11A8 × 11A8 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) × [8.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ 11A8 ÷ AC00 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ 11A8 ÷ AC01 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ AC00 ÷ 0020 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ AC00 ÷ 000D ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ AC00 ÷ 000A ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ AC00 ÷ 0001 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ AC00 × 0300 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) × [9.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ AC00 ÷ 1100 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ AC00 × 1160 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) × [7.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ AC00 × 11A8 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) × [7.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ AC00 ÷ AC00 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ AC00 ÷ AC01 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+÷ AC01 ÷ 0020 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ AC01 ÷ 000D ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
+÷ AC01 ÷ 000A ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
+÷ AC01 ÷ 0001 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
+÷ AC01 × 0300 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) × [9.0] COMBINING GRAVE ACCENT (Extend) ÷ [0.3]
+÷ AC01 ÷ 1100 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
+÷ AC01 ÷ 1160 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
+÷ AC01 × 11A8 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) × [8.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
+÷ AC01 ÷ AC00 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
+÷ AC01 ÷ AC01 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
+# Lines: 100
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/GraphemeClusterBreakTest.txt b/Build/source/libs/icu/icu-xetex/test/testdata/GraphemeClusterBreakTest.txt
new file mode 100644
index 00000000000..edf77bd0aa1
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/GraphemeClusterBreakTest.txt
@@ -0,0 +1,116 @@
+# Default GraphemeCluster Break Test
+# Generated: 2003-04-19, 01:55:08 GMT, MED
+#
+# Format:
+# <string> (# <comment>)?
+# <string> contains hex Unicode code points, with
+# ÷ wherever there is a break opportunity, and
+# × wherever there is not.
+# <comment> the format can change, but currently it shows:
+# - the sample character name
+# - (x) the line_break property* for the sample character
+# - [x] the rule that determines whether there is a break or not
+#
+# These samples may be extended or changed in the future.
+#
+÷ 000D ÷ 000D ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 000D × 000A ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) × [3: CR × LF] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 000D ÷ 0001 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 000D ÷ 0300 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 000D ÷ 1100 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 000D ÷ 1160 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 000D ÷ 11A8 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 000D ÷ AC00 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 000D ÷ AC01 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 000D ÷ 0020 ÷ # ÷ [1: sot ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [4: ( Control | CR | LF ) ÷] SPACE (Other) ÷ [2: ÷ eot]
+÷ 000A ÷ 000D ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 000A ÷ 000A ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 000A ÷ 0001 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 000A ÷ 0300 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 000A ÷ 1100 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 000A ÷ 1160 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 000A ÷ 11A8 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 000A ÷ AC00 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 000A ÷ AC01 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 000A ÷ 0020 ÷ # ÷ [1: sot ÷] <LINE FEED (LF)> (LF) ÷ [4: ( Control | CR | LF ) ÷] SPACE (Other) ÷ [2: ÷ eot]
+÷ 0001 ÷ 000D ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 0001 ÷ 000A ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 0001 ÷ 0001 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 0001 ÷ 0300 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 0001 ÷ 1100 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 0001 ÷ 1160 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 0001 ÷ 11A8 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 0001 ÷ AC00 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 0001 ÷ AC01 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 0001 ÷ 0020 ÷ # ÷ [1: sot ÷] <START OF HEADING> (Control) ÷ [4: ( Control | CR | LF ) ÷] SPACE (Other) ÷ [2: ÷ eot]
+÷ 0300 ÷ 000D ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [5: ÷ ( Control | CR | LF )] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 0300 ÷ 000A ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [5: ÷ ( Control | CR | LF )] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 0300 ÷ 0001 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [5: ÷ ( Control | CR | LF )] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 0300 × 0300 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) × [9: × Extend] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 0300 ÷ 1100 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [10: Any ÷ Any] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 0300 ÷ 1160 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [10: Any ÷ Any] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 0300 ÷ 11A8 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [10: Any ÷ Any] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 0300 ÷ AC00 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 0300 ÷ AC01 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 0300 ÷ 0020 ÷ # ÷ [1: sot ÷] COMBINING GRAVE ACCENT (Extend) ÷ [10: Any ÷ Any] SPACE (Other) ÷ [2: ÷ eot]
+÷ 1100 ÷ 000D ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [5: ÷ ( Control | CR | LF )] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 1100 ÷ 000A ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [5: ÷ ( Control | CR | LF )] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 1100 ÷ 0001 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [5: ÷ ( Control | CR | LF )] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 1100 × 0300 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) × [9: × Extend] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 1100 × 1100 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) × [6: L × ( L | V | LV | LVT )] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 1100 × 1160 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) × [6: L × ( L | V | LV | LVT )] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 1100 ÷ 11A8 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [10: Any ÷ Any] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 1100 × AC00 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) × [6: L × ( L | V | LV | LVT )] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 1100 × AC01 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) × [6: L × ( L | V | LV | LVT )] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 1100 ÷ 0020 ÷ # ÷ [1: sot ÷] HANGUL CHOSEONG KIYEOK (L) ÷ [10: Any ÷ Any] SPACE (Other) ÷ [2: ÷ eot]
+÷ 1160 ÷ 000D ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) ÷ [5: ÷ ( Control | CR | LF )] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 1160 ÷ 000A ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) ÷ [5: ÷ ( Control | CR | LF )] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 1160 ÷ 0001 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) ÷ [5: ÷ ( Control | CR | LF )] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 1160 × 0300 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) × [9: × Extend] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 1160 ÷ 1100 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) ÷ [10: Any ÷ Any] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 1160 × 1160 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) × [7: ( LV | V ) × ( V | T )] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 1160 × 11A8 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) × [7: ( LV | V ) × ( V | T )] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 1160 ÷ AC00 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 1160 ÷ AC01 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 1160 ÷ 0020 ÷ # ÷ [1: sot ÷] HANGUL JUNGSEONG FILLER (V) ÷ [10: Any ÷ Any] SPACE (Other) ÷ [2: ÷ eot]
+÷ 11A8 ÷ 000D ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [5: ÷ ( Control | CR | LF )] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 11A8 ÷ 000A ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [5: ÷ ( Control | CR | LF )] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 11A8 ÷ 0001 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [5: ÷ ( Control | CR | LF )] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 11A8 × 0300 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) × [9: × Extend] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 11A8 ÷ 1100 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [10: Any ÷ Any] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 11A8 ÷ 1160 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [10: Any ÷ Any] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 11A8 × 11A8 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) × [8: ( LVT | T ) × T] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 11A8 ÷ AC00 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 11A8 ÷ AC01 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 11A8 ÷ 0020 ÷ # ÷ [1: sot ÷] HANGUL JONGSEONG KIYEOK (T) ÷ [10: Any ÷ Any] SPACE (Other) ÷ [2: ÷ eot]
+÷ AC00 ÷ 000D ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) ÷ [5: ÷ ( Control | CR | LF )] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ AC00 ÷ 000A ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) ÷ [5: ÷ ( Control | CR | LF )] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ AC00 ÷ 0001 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) ÷ [5: ÷ ( Control | CR | LF )] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ AC00 × 0300 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) × [9: × Extend] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ AC00 ÷ 1100 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) ÷ [10: Any ÷ Any] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ AC00 × 1160 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) × [7: ( LV | V ) × ( V | T )] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ AC00 × 11A8 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) × [7: ( LV | V ) × ( V | T )] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ AC00 ÷ AC00 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ AC00 ÷ AC01 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ AC00 ÷ 0020 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GA (LV) ÷ [10: Any ÷ Any] SPACE (Other) ÷ [2: ÷ eot]
+÷ AC01 ÷ 000D ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [5: ÷ ( Control | CR | LF )] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ AC01 ÷ 000A ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [5: ÷ ( Control | CR | LF )] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ AC01 ÷ 0001 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [5: ÷ ( Control | CR | LF )] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ AC01 × 0300 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) × [9: × Extend] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ AC01 ÷ 1100 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [10: Any ÷ Any] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ AC01 ÷ 1160 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [10: Any ÷ Any] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ AC01 × 11A8 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) × [8: ( LVT | T ) × T] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ AC01 ÷ AC00 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ AC01 ÷ AC01 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ AC01 ÷ 0020 ÷ # ÷ [1: sot ÷] HANGUL SYLLABLE GAG (LVT) ÷ [10: Any ÷ Any] SPACE (Other) ÷ [2: ÷ eot]
+÷ 0020 ÷ 000D ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [5: ÷ ( Control | CR | LF )] <CARRIAGE RETURN (CR)> (CR) ÷ [2: ÷ eot]
+÷ 0020 ÷ 000A ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [5: ÷ ( Control | CR | LF )] <LINE FEED (LF)> (LF) ÷ [2: ÷ eot]
+÷ 0020 ÷ 0001 ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [5: ÷ ( Control | CR | LF )] <START OF HEADING> (Control) ÷ [2: ÷ eot]
+÷ 0020 × 0300 ÷ # ÷ [1: sot ÷] SPACE (Other) × [9: × Extend] COMBINING GRAVE ACCENT (Extend) ÷ [2: ÷ eot]
+÷ 0020 ÷ 1100 ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [10: Any ÷ Any] HANGUL CHOSEONG KIYEOK (L) ÷ [2: ÷ eot]
+÷ 0020 ÷ 1160 ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [10: Any ÷ Any] HANGUL JUNGSEONG FILLER (V) ÷ [2: ÷ eot]
+÷ 0020 ÷ 11A8 ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [10: Any ÷ Any] HANGUL JONGSEONG KIYEOK (T) ÷ [2: ÷ eot]
+÷ 0020 ÷ AC00 ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GA (LV) ÷ [2: ÷ eot]
+÷ 0020 ÷ AC01 ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [10: Any ÷ Any] HANGUL SYLLABLE GAG (LVT) ÷ [2: ÷ eot]
+÷ 0020 ÷ 0020 ÷ # ÷ [1: sot ÷] SPACE (Other) ÷ [10: Any ÷ Any] SPACE (Other) ÷ [2: ÷ eot]
+# Lines: 100
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/Makefile.in b/Build/source/libs/icu/icu-xetex/test/testdata/Makefile.in
new file mode 100644
index 00000000000..657c770c972
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/Makefile.in
@@ -0,0 +1,220 @@
+#******************************************************************************
+#
+# Copyright (C) 1998-2007, International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+#******************************************************************************
+## Top-level Makefile.in for ICU
+## Stephen F. Booth
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/testdata
+
+## Files to remove for 'make clean'
+CLEANFILES = *~
+
+SUBDIRS =
+
+## List of phony targets
+.PHONY : all all-local all-recursive install install-local \
+install-recursive clean clean-local clean-recursive distclean \
+distclean-local distclean-recursive doc dist dist-local dist-recursive \
+check check-local check-recursive build-dir java-output
+
+.NOTPARALLEL: build-dir
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: build-dir build-testdata testdata packagetest
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(TESTOUTDIR)
+
+distclean-local: clean-local
+ $(RMV) Makefile pkgdata.inc
+
+check-local:
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+pkgdata.inc: $(srcdir)/pkgdata.inc.in Makefile $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+#########################################################################
+############################## Test ## stuff ############################
+
+ifeq ($(PKGDATA_OPTS),)
+PKGDATA_OPTS = -O $(top_builddir)/test/testdata/pkgdata.inc
+endif
+
+# relative lib links from pkgdata are the same as for tmp
+GENRBOPTS=-k
+TOOLDIR=$(top_builddir)/tools
+SRCDATADIR=$(top_srcdir)/data
+UNICODEDATADIR=$(SRCDATADIR)/unidata
+OUTDIR=$(top_builddir)/data/out
+OUTTMPDIR=$(top_builddir)/data/out/tmp
+BUILDDIR=$(OUTDIR)/build/$(ICUDATA_PLATFORM_NAME)
+TESTSRCDATADIR=$(top_srcdir)/test/testdata
+TESTOUTDIR=$(top_builddir)/test/testdata/out
+BUILD_DIRS = $(TESTOUTDIR) $(TESTBUILDDIR) $(TESTOUTDIR)/$(TESTDT)
+
+ifeq ($(PKGDATA_MODE),common)
+ICU_DATA_OPT = -i $(OUTDIR)
+else
+ifeq ($(PKGDATA_MODE),dll)
+ifneq ($(ENABLE_SHARED),YES)
+ICU_DATA_OPT = -i $(BUILDDIR)
+else
+ICU_DATA_OPT =
+endif
+else
+ICU_DATA_OPT = -i $(BUILDDIR)
+endif
+endif
+
+PKGDATA = $(BINDIR)/pkgdata $(PKGDATA_OPTS) -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME)
+PKGDATA_INVOKE:=$(INVOKE) $(PKGDATA_INVOKE_OPTS)
+
+# Contains all 'intermediate' files (and temp files) except for 'unpackaged data' below
+TESTBUILDDIR=$(TESTOUTDIR)/build
+
+# unpackaged files - live in 'out' so that the path can find them as part of the pkg
+UNPACKAGEDTESTDATA=$(TESTOUTDIR)/$(TESTDT)/nam.typ
+
+# pkg name for testdata
+TESTDATA=testdata
+# prefix for files that are testdata
+TESTDT=$(TESTDATA)
+
+# File definitions
+TEST_DAT_FILES=$(TESTBUILDDIR)/test.icu
+TEST_SPP_FILES=$(TESTBUILDDIR)/nfscsi.spp $(TESTBUILDDIR)/nfscss.spp $(TESTBUILDDIR)/nfscis.spp $(TESTBUILDDIR)/nfsmxs.spp $(TESTBUILDDIR)/nfsmxp.spp
+
+TEST_UCM_SOURCE= test1.ucm test3.ucm test4.ucm test4x.ucm ibm9027.ucm
+TEST_UCM_FILES=$(TEST_UCM_SOURCE:%=$(TESTSRCDATADIR)/data/%)
+TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=$(TESTBUILDDIR)/%.cnv)
+
+# import the shared .mk file
+include $(TESTSRCDATADIR)/tstfiles.mk
+
+# TEST_RES_SOURCE comes from tstfiles.mk
+TEST_RES = $(TEST_RES_SOURCE) casing.txt mc.txt root.txt sh.txt sh_YU.txt te.txt te_IN.txt te_IN_REVISED.txt testtypes.txt testaliases.txt testempty.txt structLocale.txt idna_rules.txt conversion.txt icuio.txt testtable32.txt
+TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/%.res) $(TESTBUILDDIR)/iscii.res $(TESTBUILDDIR)/icu26_testtypes.res $(TESTBUILDDIR)/icu26e_testtypes.res
+
+ALL_TEST_FILES = $(TEST_DAT_FILES) $(TEST_SPP_FILES) $(TEST_BRK_FILES) $(TEST_CNV_FILES) $(TEST_RES_FILES) $(TESTOUTDIR)/$(TESTDT)/nam.typ
+
+# list
+
+$(TESTBUILDDIR)/testdata.lst: $(SRCLISTDEPS)
+ @echo "generating $@ (list of data files)"
+ @-$(RMV) $@
+ @for file in $(TEST_RES_FILES:$(TESTBUILDDIR)/%.res=%.res) $(TEST_DAT_FILES:$(TESTBUILDDIR)/%.icu=%.icu) $(TEST_SPP_FILES:$(TESTBUILDDIR)/%.spp=%.spp) $(TEST_CNV_FILES:$(TESTBUILDDIR)/%.cnv=%.cnv); do \
+ echo $$file >> $@; \
+ done;
+
+
+build-testdata: build-dir $(ALL_TEST_FILES) $(TESTBUILDDIR)/testdata.lst $(TESTBUILDDIR)/iscii.res
+
+# test.icu
+$(TESTBUILDDIR)/test.icu: $(TOOLDIR)/gentest/gentest$(EXEEXT)
+ $(INVOKE) $(TOOLDIR)/gentest/gentest -d $(TESTBUILDDIR)
+
+$(TESTBUILDDIR)/testtable32.txt: $(TOOLDIR)/gentest/gentest$(EXEEXT)
+ $(INVOKE) $(TOOLDIR)/gentest/gentest -r -d $(TESTBUILDDIR)
+
+# java output
+java-output: $(JAVA_OUT_DIR)/DebugUtilitiesData.java
+
+$(JAVA_OUT_DIR)/DebugUtilitiesData.java: $(TOOLDIR)/gentest/gentest$(EXEEXT)
+ $(MKINSTALLDIRS) $(JAVA_OUT_DIR)
+ $(INVOKE) $(TOOLDIR)/gentest/gentest -j -d $(JAVA_OUT_DIR)
+
+
+$(TESTBUILDDIR)/testtable32.res: $(TESTBUILDDIR)/testtable32.txt $(BINDIR)/genrb$(EXEEXT)
+ $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -s $(TESTBUILDDIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F)
+
+# Targets for nfscsi.spp
+$(TESTBUILDDIR)/nfscsi.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_ci.txt
+ @echo Building nfscsi.icu
+ $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscsi -u 3.2.0 nfs4_cs_prep_ci.txt
+
+# Targets for nfscss.spp
+$(TESTBUILDDIR)/nfscss.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_cs.txt
+ @echo Building nfscss.icu
+ $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscss -u 3.2.0 nfs4_cs_prep_cs.txt
+
+# Targets for nfscis.spp
+$(TESTBUILDDIR)/nfscis.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cis_prep.txt
+ @echo Building nfscis.spp
+ $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscis -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_cis_prep.txt
+
+# Targets for nfsmxs.spp
+$(TESTBUILDDIR)/nfsmxs.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_s.txt
+ @echo Building nfsmxs.spp
+ $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfsmxs -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_s.txt
+
+# Targets for nfsmxp.spp
+$(TESTBUILDDIR)/nfsmxp.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_p.txt
+ @echo Building nfsmxp.spp
+ $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfsmxp -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_p.txt
+
+$(TESTBUILDDIR)/%.cnv: $(TESTSRCDATADIR)/%.ucm $(BINDIR)/makeconv$(EXEEXT)
+ $(INVOKE) $(BINDIR)/makeconv -c -d $(TESTBUILDDIR) $(TESTSRCDATADIR)/$(<F)
+
+$(TESTBUILDDIR)/%.res: $(TESTSRCDATADIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
+ $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -q -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F)
+
+$(TESTBUILDDIR)/iscii.res: $(TESTSRCDATADIR)/iscii.bin $(BINDIR)/genrb$(EXEEXT)
+ @echo Testing genrb -e option
+ @ICU_DATA=$(BUILDDIR) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -s $(TESTSRCDATADIR) -eISCII,version=0 -d $(TESTBUILDDIR) $(<F) >/dev/null || ( echo "WARNING: could not open ISCII - it may have been disabled." | tee $@ )
+ @echo Finished testing genrb -e option
+
+################################################################### TYP
+# TYP FILES
+
+$(TESTOUTDIR)/$(TESTDT)/nam.typ: $(TESTBUILDDIR)/te_IN.res
+ cp $< $@
+$(TESTBUILDDIR)/icu26_testtypes.res: $(TESTSRCDATADIR)/icu26_testtypes.res
+ cp $< $@
+$(TESTBUILDDIR)/icu26e_testtypes.res: $(TESTSRCDATADIR)/icu26e_testtypes.res
+ cp $< $@
+
+testdata: build-dir $(ALL_TEST_FILES) $(UNPACKAGEDTESTDATA)
+
+#$(ALL_TEST_FILES) $(TESTBUILDDIR)/testtable32.txt $(TESTBUILDDIR)/testdata.lst: build-dir
+
+packagetest: build-dir testdata pkgdata.inc $(TESTBUILDDIR)/testdata.lst
+ $(PKGDATA_INVOKE) $(PKGDATA) -T $(TESTBUILDDIR) -d $(TESTOUTDIR) -s $(TESTBUILDDIR) -p $(TESTDATA) -m common $(TESTBUILDDIR)/testdata.lst
+
+build-dir: $(BUILD_DIRS)
+$(BUILD_DIRS):
+ -$(MKINSTALLDIRS) $(BUILD_DIRS)
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/NormalizationTest-3.2.0.txt b/Build/source/libs/icu/icu-xetex/test/testdata/NormalizationTest-3.2.0.txt
new file mode 100644
index 00000000000..927b831e953
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/NormalizationTest-3.2.0.txt
@@ -0,0 +1,17055 @@
+# Copyright (c) 2001-2003 International Business Machines
+# Corporation and others. All Rights Reserved.
+# NormalizationTest-3.2.0.txt
+# Date: 2002-03-19,23:31:18 GMT [MD]
+#
+# Note: Code points whose decomposition changed since the Unicode version
+# for this NormalizationTest.txt have corrected test results in order to pass
+# all tests.
+# See also the current NormalizationTest.txt in icu/source/data/unidata/.
+# See NormalizationCorrections.txt
+# and search for "NormalizationCorrections" in this file.
+# markus 2003mar05
+#
+# Normalization Test Suite
+# Format:
+#
+# Columns (c1, c2,...) are separated by semicolons
+# Comments are indicated with hash marks
+#
+# CONFORMANCE:
+# 1. The following invariants must be true for all conformant implementations
+#
+# NFC
+# c2 == NFC(c1) == NFC(c2) == NFC(c3)
+# c4 == NFC(c4) == NFC(c5)
+#
+# NFD
+# c3 == NFD(c1) == NFD(c2) == NFD(c3)
+# c5 == NFD(c4) == NFD(c5)
+#
+# NFKC
+# c4 == NFKC(c1) == NFKC(c2) == NFKC(c3) == NFKC(c4) == NFKC(c5)
+#
+# NFKD
+# c5 == NFKD(c1) == NFKD(c2) == NFKD(c3) == NFKD(c4) == NFKD(c5)
+#
+# 2. For every assigned Unicode 3.1.0 code point X that is not specifically
+# listed in Part 1, the following invariants must be true for all conformant
+# implementations:
+#
+# X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X)
+#
+@Part0 # Specific cases
+#
+1E0A;1E0A;0044 0307;1E0A;0044 0307;
+1E0C;1E0C;0044 0323;1E0C;0044 0323;
+1E0A 0323;1E0C 0307;0044 0323 0307;1E0C 0307;0044 0323 0307;
+1E0C 0307;1E0C 0307;0044 0323 0307;1E0C 0307;0044 0323 0307;
+0044 0307 0323;1E0C 0307;0044 0323 0307;1E0C 0307;0044 0323 0307;
+0044 0323 0307;1E0C 0307;0044 0323 0307;1E0C 0307;0044 0323 0307;
+1E0A 031B;1E0A 031B;0044 031B 0307;1E0A 031B;0044 031B 0307;
+1E0C 031B;1E0C 031B;0044 031B 0323;1E0C 031B;0044 031B 0323;
+1E0A 031B 0323;1E0C 031B 0307;0044 031B 0323 0307;1E0C 031B 0307;0044 031B 0323 0307;
+1E0C 031B 0307;1E0C 031B 0307;0044 031B 0323 0307;1E0C 031B 0307;0044 031B 0323 0307;
+0044 031B 0307 0323;1E0C 031B 0307;0044 031B 0323 0307;1E0C 031B 0307;0044 031B 0323 0307;
+0044 031B 0323 0307;1E0C 031B 0307;0044 031B 0323 0307;1E0C 031B 0307;0044 031B 0323 0307;
+00C8;00C8;0045 0300;00C8;0045 0300;
+0112;0112;0045 0304;0112;0045 0304;
+0045 0300;00C8;0045 0300;00C8;0045 0300;
+0045 0304;0112;0045 0304;0112;0045 0304;
+1E14;1E14;0045 0304 0300;1E14;0045 0304 0300;
+0112 0300;1E14;0045 0304 0300;1E14;0045 0304 0300;
+1E14 0304;1E14 0304;0045 0304 0300 0304;1E14 0304;0045 0304 0300 0304;
+0045 0304 0300;1E14;0045 0304 0300;1E14;0045 0304 0300;
+0045 0300 0304;00C8 0304;0045 0300 0304;00C8 0304;0045 0300 0304;
+05B8 05B9 05B1 0591 05C3 05B0 05AC 059F;05B1 05B8 05B9 0591 05C3 05B0 05AC 059F;05B1 05B8 05B9 0591 05C3 05B0 05AC 059F;05B1 05B8 05B9 0591 05C3 05B0 05AC 059F;05B1 05B8 05B9 0591 05C3 05B0 05AC 059F;
+0592 05B7 05BC 05A5 05B0 05C0 05C4 05AD;05B0 05B7 05BC 05A5 0592 05C0 05AD 05C4;05B0 05B7 05BC 05A5 0592 05C0 05AD 05C4;05B0 05B7 05BC 05A5 0592 05C0 05AD 05C4;05B0 05B7 05BC 05A5 0592 05C0 05AD 05C4;
+#
+@Part1 # Character by character test
+# All characters not explicitly occurring in c1 of Part 1 have identical NFC, D, KC, KD forms.
+#
+00A0;00A0;00A0;0020;0020;
+00A8;00A8;00A8;0020 0308;0020 0308;
+00AA;00AA;00AA;0061;0061;
+00AF;00AF;00AF;0020 0304;0020 0304;
+00B2;00B2;00B2;0032;0032;
+00B3;00B3;00B3;0033;0033;
+00B4;00B4;00B4;0020 0301;0020 0301;
+00B5;00B5;00B5;03BC;03BC;
+00B8;00B8;00B8;0020 0327;0020 0327;
+00B9;00B9;00B9;0031;0031;
+00BA;00BA;00BA;006F;006F;
+00BC;00BC;00BC;0031 2044 0034;0031 2044 0034;
+00BD;00BD;00BD;0031 2044 0032;0031 2044 0032;
+00BE;00BE;00BE;0033 2044 0034;0033 2044 0034;
+00C0;00C0;0041 0300;00C0;0041 0300;
+00C1;00C1;0041 0301;00C1;0041 0301;
+00C2;00C2;0041 0302;00C2;0041 0302;
+00C3;00C3;0041 0303;00C3;0041 0303;
+00C4;00C4;0041 0308;00C4;0041 0308;
+00C5;00C5;0041 030A;00C5;0041 030A;
+00C7;00C7;0043 0327;00C7;0043 0327;
+00C8;00C8;0045 0300;00C8;0045 0300;
+00C9;00C9;0045 0301;00C9;0045 0301;
+00CA;00CA;0045 0302;00CA;0045 0302;
+00CB;00CB;0045 0308;00CB;0045 0308;
+00CC;00CC;0049 0300;00CC;0049 0300;
+00CD;00CD;0049 0301;00CD;0049 0301;
+00CE;00CE;0049 0302;00CE;0049 0302;
+00CF;00CF;0049 0308;00CF;0049 0308;
+00D1;00D1;004E 0303;00D1;004E 0303;
+00D2;00D2;004F 0300;00D2;004F 0300;
+00D3;00D3;004F 0301;00D3;004F 0301;
+00D4;00D4;004F 0302;00D4;004F 0302;
+00D5;00D5;004F 0303;00D5;004F 0303;
+00D6;00D6;004F 0308;00D6;004F 0308;
+00D9;00D9;0055 0300;00D9;0055 0300;
+00DA;00DA;0055 0301;00DA;0055 0301;
+00DB;00DB;0055 0302;00DB;0055 0302;
+00DC;00DC;0055 0308;00DC;0055 0308;
+00DD;00DD;0059 0301;00DD;0059 0301;
+00E0;00E0;0061 0300;00E0;0061 0300;
+00E1;00E1;0061 0301;00E1;0061 0301;
+00E2;00E2;0061 0302;00E2;0061 0302;
+00E3;00E3;0061 0303;00E3;0061 0303;
+00E4;00E4;0061 0308;00E4;0061 0308;
+00E5;00E5;0061 030A;00E5;0061 030A;
+00E7;00E7;0063 0327;00E7;0063 0327;
+00E8;00E8;0065 0300;00E8;0065 0300;
+00E9;00E9;0065 0301;00E9;0065 0301;
+00EA;00EA;0065 0302;00EA;0065 0302;
+00EB;00EB;0065 0308;00EB;0065 0308;
+00EC;00EC;0069 0300;00EC;0069 0300;
+00ED;00ED;0069 0301;00ED;0069 0301;
+00EE;00EE;0069 0302;00EE;0069 0302;
+00EF;00EF;0069 0308;00EF;0069 0308;
+00F1;00F1;006E 0303;00F1;006E 0303;
+00F2;00F2;006F 0300;00F2;006F 0300;
+00F3;00F3;006F 0301;00F3;006F 0301;
+00F4;00F4;006F 0302;00F4;006F 0302;
+00F5;00F5;006F 0303;00F5;006F 0303;
+00F6;00F6;006F 0308;00F6;006F 0308;
+00F9;00F9;0075 0300;00F9;0075 0300;
+00FA;00FA;0075 0301;00FA;0075 0301;
+00FB;00FB;0075 0302;00FB;0075 0302;
+00FC;00FC;0075 0308;00FC;0075 0308;
+00FD;00FD;0079 0301;00FD;0079 0301;
+00FF;00FF;0079 0308;00FF;0079 0308;
+0100;0100;0041 0304;0100;0041 0304;
+0101;0101;0061 0304;0101;0061 0304;
+0102;0102;0041 0306;0102;0041 0306;
+0103;0103;0061 0306;0103;0061 0306;
+0104;0104;0041 0328;0104;0041 0328;
+0105;0105;0061 0328;0105;0061 0328;
+0106;0106;0043 0301;0106;0043 0301;
+0107;0107;0063 0301;0107;0063 0301;
+0108;0108;0043 0302;0108;0043 0302;
+0109;0109;0063 0302;0109;0063 0302;
+010A;010A;0043 0307;010A;0043 0307;
+010B;010B;0063 0307;010B;0063 0307;
+010C;010C;0043 030C;010C;0043 030C;
+010D;010D;0063 030C;010D;0063 030C;
+010E;010E;0044 030C;010E;0044 030C;
+010F;010F;0064 030C;010F;0064 030C;
+0112;0112;0045 0304;0112;0045 0304;
+0113;0113;0065 0304;0113;0065 0304;
+0114;0114;0045 0306;0114;0045 0306;
+0115;0115;0065 0306;0115;0065 0306;
+0116;0116;0045 0307;0116;0045 0307;
+0117;0117;0065 0307;0117;0065 0307;
+0118;0118;0045 0328;0118;0045 0328;
+0119;0119;0065 0328;0119;0065 0328;
+011A;011A;0045 030C;011A;0045 030C;
+011B;011B;0065 030C;011B;0065 030C;
+011C;011C;0047 0302;011C;0047 0302;
+011D;011D;0067 0302;011D;0067 0302;
+011E;011E;0047 0306;011E;0047 0306;
+011F;011F;0067 0306;011F;0067 0306;
+0120;0120;0047 0307;0120;0047 0307;
+0121;0121;0067 0307;0121;0067 0307;
+0122;0122;0047 0327;0122;0047 0327;
+0123;0123;0067 0327;0123;0067 0327;
+0124;0124;0048 0302;0124;0048 0302;
+0125;0125;0068 0302;0125;0068 0302;
+0128;0128;0049 0303;0128;0049 0303;
+0129;0129;0069 0303;0129;0069 0303;
+012A;012A;0049 0304;012A;0049 0304;
+012B;012B;0069 0304;012B;0069 0304;
+012C;012C;0049 0306;012C;0049 0306;
+012D;012D;0069 0306;012D;0069 0306;
+012E;012E;0049 0328;012E;0049 0328;
+012F;012F;0069 0328;012F;0069 0328;
+0130;0130;0049 0307;0130;0049 0307;
+0132;0132;0132;0049 004A;0049 004A;
+0133;0133;0133;0069 006A;0069 006A;
+0134;0134;004A 0302;0134;004A 0302;
+0135;0135;006A 0302;0135;006A 0302;
+0136;0136;004B 0327;0136;004B 0327;
+0137;0137;006B 0327;0137;006B 0327;
+0139;0139;004C 0301;0139;004C 0301;
+013A;013A;006C 0301;013A;006C 0301;
+013B;013B;004C 0327;013B;004C 0327;
+013C;013C;006C 0327;013C;006C 0327;
+013D;013D;004C 030C;013D;004C 030C;
+013E;013E;006C 030C;013E;006C 030C;
+013F;013F;013F;004C 00B7;004C 00B7;
+0140;0140;0140;006C 00B7;006C 00B7;
+0143;0143;004E 0301;0143;004E 0301;
+0144;0144;006E 0301;0144;006E 0301;
+0145;0145;004E 0327;0145;004E 0327;
+0146;0146;006E 0327;0146;006E 0327;
+0147;0147;004E 030C;0147;004E 030C;
+0148;0148;006E 030C;0148;006E 030C;
+0149;0149;0149;02BC 006E;02BC 006E;
+014C;014C;004F 0304;014C;004F 0304;
+014D;014D;006F 0304;014D;006F 0304;
+014E;014E;004F 0306;014E;004F 0306;
+014F;014F;006F 0306;014F;006F 0306;
+0150;0150;004F 030B;0150;004F 030B;
+0151;0151;006F 030B;0151;006F 030B;
+0154;0154;0052 0301;0154;0052 0301;
+0155;0155;0072 0301;0155;0072 0301;
+0156;0156;0052 0327;0156;0052 0327;
+0157;0157;0072 0327;0157;0072 0327;
+0158;0158;0052 030C;0158;0052 030C;
+0159;0159;0072 030C;0159;0072 030C;
+015A;015A;0053 0301;015A;0053 0301;
+015B;015B;0073 0301;015B;0073 0301;
+015C;015C;0053 0302;015C;0053 0302;
+015D;015D;0073 0302;015D;0073 0302;
+015E;015E;0053 0327;015E;0053 0327;
+015F;015F;0073 0327;015F;0073 0327;
+0160;0160;0053 030C;0160;0053 030C;
+0161;0161;0073 030C;0161;0073 030C;
+0162;0162;0054 0327;0162;0054 0327;
+0163;0163;0074 0327;0163;0074 0327;
+0164;0164;0054 030C;0164;0054 030C;
+0165;0165;0074 030C;0165;0074 030C;
+0168;0168;0055 0303;0168;0055 0303;
+0169;0169;0075 0303;0169;0075 0303;
+016A;016A;0055 0304;016A;0055 0304;
+016B;016B;0075 0304;016B;0075 0304;
+016C;016C;0055 0306;016C;0055 0306;
+016D;016D;0075 0306;016D;0075 0306;
+016E;016E;0055 030A;016E;0055 030A;
+016F;016F;0075 030A;016F;0075 030A;
+0170;0170;0055 030B;0170;0055 030B;
+0171;0171;0075 030B;0171;0075 030B;
+0172;0172;0055 0328;0172;0055 0328;
+0173;0173;0075 0328;0173;0075 0328;
+0174;0174;0057 0302;0174;0057 0302;
+0175;0175;0077 0302;0175;0077 0302;
+0176;0176;0059 0302;0176;0059 0302;
+0177;0177;0079 0302;0177;0079 0302;
+0178;0178;0059 0308;0178;0059 0308;
+0179;0179;005A 0301;0179;005A 0301;
+017A;017A;007A 0301;017A;007A 0301;
+017B;017B;005A 0307;017B;005A 0307;
+017C;017C;007A 0307;017C;007A 0307;
+017D;017D;005A 030C;017D;005A 030C;
+017E;017E;007A 030C;017E;007A 030C;
+017F;017F;017F;0073;0073;
+01A0;01A0;004F 031B;01A0;004F 031B;
+01A1;01A1;006F 031B;01A1;006F 031B;
+01AF;01AF;0055 031B;01AF;0055 031B;
+01B0;01B0;0075 031B;01B0;0075 031B;
+01C4;01C4;01C4;0044 017D;0044 005A 030C;
+01C5;01C5;01C5;0044 017E;0044 007A 030C;
+01C6;01C6;01C6;0064 017E;0064 007A 030C;
+01C7;01C7;01C7;004C 004A;004C 004A;
+01C8;01C8;01C8;004C 006A;004C 006A;
+01C9;01C9;01C9;006C 006A;006C 006A;
+01CA;01CA;01CA;004E 004A;004E 004A;
+01CB;01CB;01CB;004E 006A;004E 006A;
+01CC;01CC;01CC;006E 006A;006E 006A;
+01CD;01CD;0041 030C;01CD;0041 030C;
+01CE;01CE;0061 030C;01CE;0061 030C;
+01CF;01CF;0049 030C;01CF;0049 030C;
+01D0;01D0;0069 030C;01D0;0069 030C;
+01D1;01D1;004F 030C;01D1;004F 030C;
+01D2;01D2;006F 030C;01D2;006F 030C;
+01D3;01D3;0055 030C;01D3;0055 030C;
+01D4;01D4;0075 030C;01D4;0075 030C;
+01D5;01D5;0055 0308 0304;01D5;0055 0308 0304;
+01D6;01D6;0075 0308 0304;01D6;0075 0308 0304;
+01D7;01D7;0055 0308 0301;01D7;0055 0308 0301;
+01D8;01D8;0075 0308 0301;01D8;0075 0308 0301;
+01D9;01D9;0055 0308 030C;01D9;0055 0308 030C;
+01DA;01DA;0075 0308 030C;01DA;0075 0308 030C;
+01DB;01DB;0055 0308 0300;01DB;0055 0308 0300;
+01DC;01DC;0075 0308 0300;01DC;0075 0308 0300;
+01DE;01DE;0041 0308 0304;01DE;0041 0308 0304;
+01DF;01DF;0061 0308 0304;01DF;0061 0308 0304;
+01E0;01E0;0041 0307 0304;01E0;0041 0307 0304;
+01E1;01E1;0061 0307 0304;01E1;0061 0307 0304;
+01E2;01E2;00C6 0304;01E2;00C6 0304;
+01E3;01E3;00E6 0304;01E3;00E6 0304;
+01E6;01E6;0047 030C;01E6;0047 030C;
+01E7;01E7;0067 030C;01E7;0067 030C;
+01E8;01E8;004B 030C;01E8;004B 030C;
+01E9;01E9;006B 030C;01E9;006B 030C;
+01EA;01EA;004F 0328;01EA;004F 0328;
+01EB;01EB;006F 0328;01EB;006F 0328;
+01EC;01EC;004F 0328 0304;01EC;004F 0328 0304;
+01ED;01ED;006F 0328 0304;01ED;006F 0328 0304;
+01EE;01EE;01B7 030C;01EE;01B7 030C;
+01EF;01EF;0292 030C;01EF;0292 030C;
+01F0;01F0;006A 030C;01F0;006A 030C;
+01F1;01F1;01F1;0044 005A;0044 005A;
+01F2;01F2;01F2;0044 007A;0044 007A;
+01F3;01F3;01F3;0064 007A;0064 007A;
+01F4;01F4;0047 0301;01F4;0047 0301;
+01F5;01F5;0067 0301;01F5;0067 0301;
+01F8;01F8;004E 0300;01F8;004E 0300;
+01F9;01F9;006E 0300;01F9;006E 0300;
+01FA;01FA;0041 030A 0301;01FA;0041 030A 0301;
+01FB;01FB;0061 030A 0301;01FB;0061 030A 0301;
+01FC;01FC;00C6 0301;01FC;00C6 0301;
+01FD;01FD;00E6 0301;01FD;00E6 0301;
+01FE;01FE;00D8 0301;01FE;00D8 0301;
+01FF;01FF;00F8 0301;01FF;00F8 0301;
+0200;0200;0041 030F;0200;0041 030F;
+0201;0201;0061 030F;0201;0061 030F;
+0202;0202;0041 0311;0202;0041 0311;
+0203;0203;0061 0311;0203;0061 0311;
+0204;0204;0045 030F;0204;0045 030F;
+0205;0205;0065 030F;0205;0065 030F;
+0206;0206;0045 0311;0206;0045 0311;
+0207;0207;0065 0311;0207;0065 0311;
+0208;0208;0049 030F;0208;0049 030F;
+0209;0209;0069 030F;0209;0069 030F;
+020A;020A;0049 0311;020A;0049 0311;
+020B;020B;0069 0311;020B;0069 0311;
+020C;020C;004F 030F;020C;004F 030F;
+020D;020D;006F 030F;020D;006F 030F;
+020E;020E;004F 0311;020E;004F 0311;
+020F;020F;006F 0311;020F;006F 0311;
+0210;0210;0052 030F;0210;0052 030F;
+0211;0211;0072 030F;0211;0072 030F;
+0212;0212;0052 0311;0212;0052 0311;
+0213;0213;0072 0311;0213;0072 0311;
+0214;0214;0055 030F;0214;0055 030F;
+0215;0215;0075 030F;0215;0075 030F;
+0216;0216;0055 0311;0216;0055 0311;
+0217;0217;0075 0311;0217;0075 0311;
+0218;0218;0053 0326;0218;0053 0326;
+0219;0219;0073 0326;0219;0073 0326;
+021A;021A;0054 0326;021A;0054 0326;
+021B;021B;0074 0326;021B;0074 0326;
+021E;021E;0048 030C;021E;0048 030C;
+021F;021F;0068 030C;021F;0068 030C;
+0226;0226;0041 0307;0226;0041 0307;
+0227;0227;0061 0307;0227;0061 0307;
+0228;0228;0045 0327;0228;0045 0327;
+0229;0229;0065 0327;0229;0065 0327;
+022A;022A;004F 0308 0304;022A;004F 0308 0304;
+022B;022B;006F 0308 0304;022B;006F 0308 0304;
+022C;022C;004F 0303 0304;022C;004F 0303 0304;
+022D;022D;006F 0303 0304;022D;006F 0303 0304;
+022E;022E;004F 0307;022E;004F 0307;
+022F;022F;006F 0307;022F;006F 0307;
+0230;0230;004F 0307 0304;0230;004F 0307 0304;
+0231;0231;006F 0307 0304;0231;006F 0307 0304;
+0232;0232;0059 0304;0232;0059 0304;
+0233;0233;0079 0304;0233;0079 0304;
+02B0;02B0;02B0;0068;0068;
+02B1;02B1;02B1;0266;0266;
+02B2;02B2;02B2;006A;006A;
+02B3;02B3;02B3;0072;0072;
+02B4;02B4;02B4;0279;0279;
+02B5;02B5;02B5;027B;027B;
+02B6;02B6;02B6;0281;0281;
+02B7;02B7;02B7;0077;0077;
+02B8;02B8;02B8;0079;0079;
+02D8;02D8;02D8;0020 0306;0020 0306;
+02D9;02D9;02D9;0020 0307;0020 0307;
+02DA;02DA;02DA;0020 030A;0020 030A;
+02DB;02DB;02DB;0020 0328;0020 0328;
+02DC;02DC;02DC;0020 0303;0020 0303;
+02DD;02DD;02DD;0020 030B;0020 030B;
+02E0;02E0;02E0;0263;0263;
+02E1;02E1;02E1;006C;006C;
+02E2;02E2;02E2;0073;0073;
+02E3;02E3;02E3;0078;0078;
+02E4;02E4;02E4;0295;0295;
+0340;0300;0300;0300;0300;
+0341;0301;0301;0301;0301;
+0343;0313;0313;0313;0313;
+0344;0308 0301;0308 0301;0308 0301;0308 0301;
+0374;02B9;02B9;02B9;02B9;
+037A;037A;037A;0020 0345;0020 0345;
+037E;003B;003B;003B;003B;
+0384;0384;0384;0020 0301;0020 0301;
+0385;0385;00A8 0301;0020 0308 0301;0020 0308 0301;
+0386;0386;0391 0301;0386;0391 0301;
+0387;00B7;00B7;00B7;00B7;
+0388;0388;0395 0301;0388;0395 0301;
+0389;0389;0397 0301;0389;0397 0301;
+038A;038A;0399 0301;038A;0399 0301;
+038C;038C;039F 0301;038C;039F 0301;
+038E;038E;03A5 0301;038E;03A5 0301;
+038F;038F;03A9 0301;038F;03A9 0301;
+0390;0390;03B9 0308 0301;0390;03B9 0308 0301;
+03AA;03AA;0399 0308;03AA;0399 0308;
+03AB;03AB;03A5 0308;03AB;03A5 0308;
+03AC;03AC;03B1 0301;03AC;03B1 0301;
+03AD;03AD;03B5 0301;03AD;03B5 0301;
+03AE;03AE;03B7 0301;03AE;03B7 0301;
+03AF;03AF;03B9 0301;03AF;03B9 0301;
+03B0;03B0;03C5 0308 0301;03B0;03C5 0308 0301;
+03CA;03CA;03B9 0308;03CA;03B9 0308;
+03CB;03CB;03C5 0308;03CB;03C5 0308;
+03CC;03CC;03BF 0301;03CC;03BF 0301;
+03CD;03CD;03C5 0301;03CD;03C5 0301;
+03CE;03CE;03C9 0301;03CE;03C9 0301;
+03D0;03D0;03D0;03B2;03B2;
+03D1;03D1;03D1;03B8;03B8;
+03D2;03D2;03D2;03A5;03A5;
+03D3;03D3;03D2 0301;038E;03A5 0301;
+03D4;03D4;03D2 0308;03AB;03A5 0308;
+03D5;03D5;03D5;03C6;03C6;
+03D6;03D6;03D6;03C0;03C0;
+03F0;03F0;03F0;03BA;03BA;
+03F1;03F1;03F1;03C1;03C1;
+03F2;03F2;03F2;03C2;03C2;
+03F4;03F4;03F4;0398;0398;
+03F5;03F5;03F5;03B5;03B5;
+0400;0400;0415 0300;0400;0415 0300;
+0401;0401;0415 0308;0401;0415 0308;
+0403;0403;0413 0301;0403;0413 0301;
+0407;0407;0406 0308;0407;0406 0308;
+040C;040C;041A 0301;040C;041A 0301;
+040D;040D;0418 0300;040D;0418 0300;
+040E;040E;0423 0306;040E;0423 0306;
+0419;0419;0418 0306;0419;0418 0306;
+0439;0439;0438 0306;0439;0438 0306;
+0450;0450;0435 0300;0450;0435 0300;
+0451;0451;0435 0308;0451;0435 0308;
+0453;0453;0433 0301;0453;0433 0301;
+0457;0457;0456 0308;0457;0456 0308;
+045C;045C;043A 0301;045C;043A 0301;
+045D;045D;0438 0300;045D;0438 0300;
+045E;045E;0443 0306;045E;0443 0306;
+0476;0476;0474 030F;0476;0474 030F;
+0477;0477;0475 030F;0477;0475 030F;
+04C1;04C1;0416 0306;04C1;0416 0306;
+04C2;04C2;0436 0306;04C2;0436 0306;
+04D0;04D0;0410 0306;04D0;0410 0306;
+04D1;04D1;0430 0306;04D1;0430 0306;
+04D2;04D2;0410 0308;04D2;0410 0308;
+04D3;04D3;0430 0308;04D3;0430 0308;
+04D6;04D6;0415 0306;04D6;0415 0306;
+04D7;04D7;0435 0306;04D7;0435 0306;
+04DA;04DA;04D8 0308;04DA;04D8 0308;
+04DB;04DB;04D9 0308;04DB;04D9 0308;
+04DC;04DC;0416 0308;04DC;0416 0308;
+04DD;04DD;0436 0308;04DD;0436 0308;
+04DE;04DE;0417 0308;04DE;0417 0308;
+04DF;04DF;0437 0308;04DF;0437 0308;
+04E2;04E2;0418 0304;04E2;0418 0304;
+04E3;04E3;0438 0304;04E3;0438 0304;
+04E4;04E4;0418 0308;04E4;0418 0308;
+04E5;04E5;0438 0308;04E5;0438 0308;
+04E6;04E6;041E 0308;04E6;041E 0308;
+04E7;04E7;043E 0308;04E7;043E 0308;
+04EA;04EA;04E8 0308;04EA;04E8 0308;
+04EB;04EB;04E9 0308;04EB;04E9 0308;
+04EC;04EC;042D 0308;04EC;042D 0308;
+04ED;04ED;044D 0308;04ED;044D 0308;
+04EE;04EE;0423 0304;04EE;0423 0304;
+04EF;04EF;0443 0304;04EF;0443 0304;
+04F0;04F0;0423 0308;04F0;0423 0308;
+04F1;04F1;0443 0308;04F1;0443 0308;
+04F2;04F2;0423 030B;04F2;0423 030B;
+04F3;04F3;0443 030B;04F3;0443 030B;
+04F4;04F4;0427 0308;04F4;0427 0308;
+04F5;04F5;0447 0308;04F5;0447 0308;
+04F8;04F8;042B 0308;04F8;042B 0308;
+04F9;04F9;044B 0308;04F9;044B 0308;
+0587;0587;0587;0565 0582;0565 0582;
+0622;0622;0627 0653;0622;0627 0653;
+0623;0623;0627 0654;0623;0627 0654;
+0624;0624;0648 0654;0624;0648 0654;
+0625;0625;0627 0655;0625;0627 0655;
+0626;0626;064A 0654;0626;064A 0654;
+0675;0675;0675;0627 0674;0627 0674;
+0676;0676;0676;0648 0674;0648 0674;
+0677;0677;0677;06C7 0674;06C7 0674;
+0678;0678;0678;064A 0674;064A 0674;
+06C0;06C0;06D5 0654;06C0;06D5 0654;
+06C2;06C2;06C1 0654;06C2;06C1 0654;
+06D3;06D3;06D2 0654;06D3;06D2 0654;
+0929;0929;0928 093C;0929;0928 093C;
+0931;0931;0930 093C;0931;0930 093C;
+0934;0934;0933 093C;0934;0933 093C;
+0958;0915 093C;0915 093C;0915 093C;0915 093C;
+0959;0916 093C;0916 093C;0916 093C;0916 093C;
+095A;0917 093C;0917 093C;0917 093C;0917 093C;
+095B;091C 093C;091C 093C;091C 093C;091C 093C;
+095C;0921 093C;0921 093C;0921 093C;0921 093C;
+095D;0922 093C;0922 093C;0922 093C;0922 093C;
+095E;092B 093C;092B 093C;092B 093C;092B 093C;
+095F;092F 093C;092F 093C;092F 093C;092F 093C;
+09CB;09CB;09C7 09BE;09CB;09C7 09BE;
+09CC;09CC;09C7 09D7;09CC;09C7 09D7;
+09DC;09A1 09BC;09A1 09BC;09A1 09BC;09A1 09BC;
+09DD;09A2 09BC;09A2 09BC;09A2 09BC;09A2 09BC;
+09DF;09AF 09BC;09AF 09BC;09AF 09BC;09AF 09BC;
+0A33;0A32 0A3C;0A32 0A3C;0A32 0A3C;0A32 0A3C;
+0A36;0A38 0A3C;0A38 0A3C;0A38 0A3C;0A38 0A3C;
+0A59;0A16 0A3C;0A16 0A3C;0A16 0A3C;0A16 0A3C;
+0A5A;0A17 0A3C;0A17 0A3C;0A17 0A3C;0A17 0A3C;
+0A5B;0A1C 0A3C;0A1C 0A3C;0A1C 0A3C;0A1C 0A3C;
+0A5E;0A2B 0A3C;0A2B 0A3C;0A2B 0A3C;0A2B 0A3C;
+0B48;0B48;0B47 0B56;0B48;0B47 0B56;
+0B4B;0B4B;0B47 0B3E;0B4B;0B47 0B3E;
+0B4C;0B4C;0B47 0B57;0B4C;0B47 0B57;
+0B5C;0B21 0B3C;0B21 0B3C;0B21 0B3C;0B21 0B3C;
+0B5D;0B22 0B3C;0B22 0B3C;0B22 0B3C;0B22 0B3C;
+0B94;0B94;0B92 0BD7;0B94;0B92 0BD7;
+0BCA;0BCA;0BC6 0BBE;0BCA;0BC6 0BBE;
+0BCB;0BCB;0BC7 0BBE;0BCB;0BC7 0BBE;
+0BCC;0BCC;0BC6 0BD7;0BCC;0BC6 0BD7;
+0C48;0C48;0C46 0C56;0C48;0C46 0C56;
+0CC0;0CC0;0CBF 0CD5;0CC0;0CBF 0CD5;
+0CC7;0CC7;0CC6 0CD5;0CC7;0CC6 0CD5;
+0CC8;0CC8;0CC6 0CD6;0CC8;0CC6 0CD6;
+0CCA;0CCA;0CC6 0CC2;0CCA;0CC6 0CC2;
+0CCB;0CCB;0CC6 0CC2 0CD5;0CCB;0CC6 0CC2 0CD5;
+0D4A;0D4A;0D46 0D3E;0D4A;0D46 0D3E;
+0D4B;0D4B;0D47 0D3E;0D4B;0D47 0D3E;
+0D4C;0D4C;0D46 0D57;0D4C;0D46 0D57;
+0DDA;0DDA;0DD9 0DCA;0DDA;0DD9 0DCA;
+0DDC;0DDC;0DD9 0DCF;0DDC;0DD9 0DCF;
+0DDD;0DDD;0DD9 0DCF 0DCA;0DDD;0DD9 0DCF 0DCA;
+0DDE;0DDE;0DD9 0DDF;0DDE;0DD9 0DDF;
+0E33;0E33;0E33;0E4D 0E32;0E4D 0E32;
+0EB3;0EB3;0EB3;0ECD 0EB2;0ECD 0EB2;
+0EDC;0EDC;0EDC;0EAB 0E99;0EAB 0E99;
+0EDD;0EDD;0EDD;0EAB 0EA1;0EAB 0EA1;
+0F0C;0F0C;0F0C;0F0B;0F0B;
+0F43;0F42 0FB7;0F42 0FB7;0F42 0FB7;0F42 0FB7;
+0F4D;0F4C 0FB7;0F4C 0FB7;0F4C 0FB7;0F4C 0FB7;
+0F52;0F51 0FB7;0F51 0FB7;0F51 0FB7;0F51 0FB7;
+0F57;0F56 0FB7;0F56 0FB7;0F56 0FB7;0F56 0FB7;
+0F5C;0F5B 0FB7;0F5B 0FB7;0F5B 0FB7;0F5B 0FB7;
+0F69;0F40 0FB5;0F40 0FB5;0F40 0FB5;0F40 0FB5;
+0F73;0F71 0F72;0F71 0F72;0F71 0F72;0F71 0F72;
+0F75;0F71 0F74;0F71 0F74;0F71 0F74;0F71 0F74;
+0F76;0FB2 0F80;0FB2 0F80;0FB2 0F80;0FB2 0F80;
+0F77;0F77;0F77;0FB2 0F71 0F80;0FB2 0F71 0F80;
+0F78;0FB3 0F80;0FB3 0F80;0FB3 0F80;0FB3 0F80;
+0F79;0F79;0F79;0FB3 0F71 0F80;0FB3 0F71 0F80;
+0F81;0F71 0F80;0F71 0F80;0F71 0F80;0F71 0F80;
+0F93;0F92 0FB7;0F92 0FB7;0F92 0FB7;0F92 0FB7;
+0F9D;0F9C 0FB7;0F9C 0FB7;0F9C 0FB7;0F9C 0FB7;
+0FA2;0FA1 0FB7;0FA1 0FB7;0FA1 0FB7;0FA1 0FB7;
+0FA7;0FA6 0FB7;0FA6 0FB7;0FA6 0FB7;0FA6 0FB7;
+0FAC;0FAB 0FB7;0FAB 0FB7;0FAB 0FB7;0FAB 0FB7;
+0FB9;0F90 0FB5;0F90 0FB5;0F90 0FB5;0F90 0FB5;
+1026;1026;1025 102E;1026;1025 102E;
+1E00;1E00;0041 0325;1E00;0041 0325;
+1E01;1E01;0061 0325;1E01;0061 0325;
+1E02;1E02;0042 0307;1E02;0042 0307;
+1E03;1E03;0062 0307;1E03;0062 0307;
+1E04;1E04;0042 0323;1E04;0042 0323;
+1E05;1E05;0062 0323;1E05;0062 0323;
+1E06;1E06;0042 0331;1E06;0042 0331;
+1E07;1E07;0062 0331;1E07;0062 0331;
+1E08;1E08;0043 0327 0301;1E08;0043 0327 0301;
+1E09;1E09;0063 0327 0301;1E09;0063 0327 0301;
+1E0A;1E0A;0044 0307;1E0A;0044 0307;
+1E0B;1E0B;0064 0307;1E0B;0064 0307;
+1E0C;1E0C;0044 0323;1E0C;0044 0323;
+1E0D;1E0D;0064 0323;1E0D;0064 0323;
+1E0E;1E0E;0044 0331;1E0E;0044 0331;
+1E0F;1E0F;0064 0331;1E0F;0064 0331;
+1E10;1E10;0044 0327;1E10;0044 0327;
+1E11;1E11;0064 0327;1E11;0064 0327;
+1E12;1E12;0044 032D;1E12;0044 032D;
+1E13;1E13;0064 032D;1E13;0064 032D;
+1E14;1E14;0045 0304 0300;1E14;0045 0304 0300;
+1E15;1E15;0065 0304 0300;1E15;0065 0304 0300;
+1E16;1E16;0045 0304 0301;1E16;0045 0304 0301;
+1E17;1E17;0065 0304 0301;1E17;0065 0304 0301;
+1E18;1E18;0045 032D;1E18;0045 032D;
+1E19;1E19;0065 032D;1E19;0065 032D;
+1E1A;1E1A;0045 0330;1E1A;0045 0330;
+1E1B;1E1B;0065 0330;1E1B;0065 0330;
+1E1C;1E1C;0045 0327 0306;1E1C;0045 0327 0306;
+1E1D;1E1D;0065 0327 0306;1E1D;0065 0327 0306;
+1E1E;1E1E;0046 0307;1E1E;0046 0307;
+1E1F;1E1F;0066 0307;1E1F;0066 0307;
+1E20;1E20;0047 0304;1E20;0047 0304;
+1E21;1E21;0067 0304;1E21;0067 0304;
+1E22;1E22;0048 0307;1E22;0048 0307;
+1E23;1E23;0068 0307;1E23;0068 0307;
+1E24;1E24;0048 0323;1E24;0048 0323;
+1E25;1E25;0068 0323;1E25;0068 0323;
+1E26;1E26;0048 0308;1E26;0048 0308;
+1E27;1E27;0068 0308;1E27;0068 0308;
+1E28;1E28;0048 0327;1E28;0048 0327;
+1E29;1E29;0068 0327;1E29;0068 0327;
+1E2A;1E2A;0048 032E;1E2A;0048 032E;
+1E2B;1E2B;0068 032E;1E2B;0068 032E;
+1E2C;1E2C;0049 0330;1E2C;0049 0330;
+1E2D;1E2D;0069 0330;1E2D;0069 0330;
+1E2E;1E2E;0049 0308 0301;1E2E;0049 0308 0301;
+1E2F;1E2F;0069 0308 0301;1E2F;0069 0308 0301;
+1E30;1E30;004B 0301;1E30;004B 0301;
+1E31;1E31;006B 0301;1E31;006B 0301;
+1E32;1E32;004B 0323;1E32;004B 0323;
+1E33;1E33;006B 0323;1E33;006B 0323;
+1E34;1E34;004B 0331;1E34;004B 0331;
+1E35;1E35;006B 0331;1E35;006B 0331;
+1E36;1E36;004C 0323;1E36;004C 0323;
+1E37;1E37;006C 0323;1E37;006C 0323;
+1E38;1E38;004C 0323 0304;1E38;004C 0323 0304;
+1E39;1E39;006C 0323 0304;1E39;006C 0323 0304;
+1E3A;1E3A;004C 0331;1E3A;004C 0331;
+1E3B;1E3B;006C 0331;1E3B;006C 0331;
+1E3C;1E3C;004C 032D;1E3C;004C 032D;
+1E3D;1E3D;006C 032D;1E3D;006C 032D;
+1E3E;1E3E;004D 0301;1E3E;004D 0301;
+1E3F;1E3F;006D 0301;1E3F;006D 0301;
+1E40;1E40;004D 0307;1E40;004D 0307;
+1E41;1E41;006D 0307;1E41;006D 0307;
+1E42;1E42;004D 0323;1E42;004D 0323;
+1E43;1E43;006D 0323;1E43;006D 0323;
+1E44;1E44;004E 0307;1E44;004E 0307;
+1E45;1E45;006E 0307;1E45;006E 0307;
+1E46;1E46;004E 0323;1E46;004E 0323;
+1E47;1E47;006E 0323;1E47;006E 0323;
+1E48;1E48;004E 0331;1E48;004E 0331;
+1E49;1E49;006E 0331;1E49;006E 0331;
+1E4A;1E4A;004E 032D;1E4A;004E 032D;
+1E4B;1E4B;006E 032D;1E4B;006E 032D;
+1E4C;1E4C;004F 0303 0301;1E4C;004F 0303 0301;
+1E4D;1E4D;006F 0303 0301;1E4D;006F 0303 0301;
+1E4E;1E4E;004F 0303 0308;1E4E;004F 0303 0308;
+1E4F;1E4F;006F 0303 0308;1E4F;006F 0303 0308;
+1E50;1E50;004F 0304 0300;1E50;004F 0304 0300;
+1E51;1E51;006F 0304 0300;1E51;006F 0304 0300;
+1E52;1E52;004F 0304 0301;1E52;004F 0304 0301;
+1E53;1E53;006F 0304 0301;1E53;006F 0304 0301;
+1E54;1E54;0050 0301;1E54;0050 0301;
+1E55;1E55;0070 0301;1E55;0070 0301;
+1E56;1E56;0050 0307;1E56;0050 0307;
+1E57;1E57;0070 0307;1E57;0070 0307;
+1E58;1E58;0052 0307;1E58;0052 0307;
+1E59;1E59;0072 0307;1E59;0072 0307;
+1E5A;1E5A;0052 0323;1E5A;0052 0323;
+1E5B;1E5B;0072 0323;1E5B;0072 0323;
+1E5C;1E5C;0052 0323 0304;1E5C;0052 0323 0304;
+1E5D;1E5D;0072 0323 0304;1E5D;0072 0323 0304;
+1E5E;1E5E;0052 0331;1E5E;0052 0331;
+1E5F;1E5F;0072 0331;1E5F;0072 0331;
+1E60;1E60;0053 0307;1E60;0053 0307;
+1E61;1E61;0073 0307;1E61;0073 0307;
+1E62;1E62;0053 0323;1E62;0053 0323;
+1E63;1E63;0073 0323;1E63;0073 0323;
+1E64;1E64;0053 0301 0307;1E64;0053 0301 0307;
+1E65;1E65;0073 0301 0307;1E65;0073 0301 0307;
+1E66;1E66;0053 030C 0307;1E66;0053 030C 0307;
+1E67;1E67;0073 030C 0307;1E67;0073 030C 0307;
+1E68;1E68;0053 0323 0307;1E68;0053 0323 0307;
+1E69;1E69;0073 0323 0307;1E69;0073 0323 0307;
+1E6A;1E6A;0054 0307;1E6A;0054 0307;
+1E6B;1E6B;0074 0307;1E6B;0074 0307;
+1E6C;1E6C;0054 0323;1E6C;0054 0323;
+1E6D;1E6D;0074 0323;1E6D;0074 0323;
+1E6E;1E6E;0054 0331;1E6E;0054 0331;
+1E6F;1E6F;0074 0331;1E6F;0074 0331;
+1E70;1E70;0054 032D;1E70;0054 032D;
+1E71;1E71;0074 032D;1E71;0074 032D;
+1E72;1E72;0055 0324;1E72;0055 0324;
+1E73;1E73;0075 0324;1E73;0075 0324;
+1E74;1E74;0055 0330;1E74;0055 0330;
+1E75;1E75;0075 0330;1E75;0075 0330;
+1E76;1E76;0055 032D;1E76;0055 032D;
+1E77;1E77;0075 032D;1E77;0075 032D;
+1E78;1E78;0055 0303 0301;1E78;0055 0303 0301;
+1E79;1E79;0075 0303 0301;1E79;0075 0303 0301;
+1E7A;1E7A;0055 0304 0308;1E7A;0055 0304 0308;
+1E7B;1E7B;0075 0304 0308;1E7B;0075 0304 0308;
+1E7C;1E7C;0056 0303;1E7C;0056 0303;
+1E7D;1E7D;0076 0303;1E7D;0076 0303;
+1E7E;1E7E;0056 0323;1E7E;0056 0323;
+1E7F;1E7F;0076 0323;1E7F;0076 0323;
+1E80;1E80;0057 0300;1E80;0057 0300;
+1E81;1E81;0077 0300;1E81;0077 0300;
+1E82;1E82;0057 0301;1E82;0057 0301;
+1E83;1E83;0077 0301;1E83;0077 0301;
+1E84;1E84;0057 0308;1E84;0057 0308;
+1E85;1E85;0077 0308;1E85;0077 0308;
+1E86;1E86;0057 0307;1E86;0057 0307;
+1E87;1E87;0077 0307;1E87;0077 0307;
+1E88;1E88;0057 0323;1E88;0057 0323;
+1E89;1E89;0077 0323;1E89;0077 0323;
+1E8A;1E8A;0058 0307;1E8A;0058 0307;
+1E8B;1E8B;0078 0307;1E8B;0078 0307;
+1E8C;1E8C;0058 0308;1E8C;0058 0308;
+1E8D;1E8D;0078 0308;1E8D;0078 0308;
+1E8E;1E8E;0059 0307;1E8E;0059 0307;
+1E8F;1E8F;0079 0307;1E8F;0079 0307;
+1E90;1E90;005A 0302;1E90;005A 0302;
+1E91;1E91;007A 0302;1E91;007A 0302;
+1E92;1E92;005A 0323;1E92;005A 0323;
+1E93;1E93;007A 0323;1E93;007A 0323;
+1E94;1E94;005A 0331;1E94;005A 0331;
+1E95;1E95;007A 0331;1E95;007A 0331;
+1E96;1E96;0068 0331;1E96;0068 0331;
+1E97;1E97;0074 0308;1E97;0074 0308;
+1E98;1E98;0077 030A;1E98;0077 030A;
+1E99;1E99;0079 030A;1E99;0079 030A;
+1E9A;1E9A;1E9A;0061 02BE;0061 02BE;
+1E9B;1E9B;017F 0307;1E61;0073 0307;
+1EA0;1EA0;0041 0323;1EA0;0041 0323;
+1EA1;1EA1;0061 0323;1EA1;0061 0323;
+1EA2;1EA2;0041 0309;1EA2;0041 0309;
+1EA3;1EA3;0061 0309;1EA3;0061 0309;
+1EA4;1EA4;0041 0302 0301;1EA4;0041 0302 0301;
+1EA5;1EA5;0061 0302 0301;1EA5;0061 0302 0301;
+1EA6;1EA6;0041 0302 0300;1EA6;0041 0302 0300;
+1EA7;1EA7;0061 0302 0300;1EA7;0061 0302 0300;
+1EA8;1EA8;0041 0302 0309;1EA8;0041 0302 0309;
+1EA9;1EA9;0061 0302 0309;1EA9;0061 0302 0309;
+1EAA;1EAA;0041 0302 0303;1EAA;0041 0302 0303;
+1EAB;1EAB;0061 0302 0303;1EAB;0061 0302 0303;
+1EAC;1EAC;0041 0323 0302;1EAC;0041 0323 0302;
+1EAD;1EAD;0061 0323 0302;1EAD;0061 0323 0302;
+1EAE;1EAE;0041 0306 0301;1EAE;0041 0306 0301;
+1EAF;1EAF;0061 0306 0301;1EAF;0061 0306 0301;
+1EB0;1EB0;0041 0306 0300;1EB0;0041 0306 0300;
+1EB1;1EB1;0061 0306 0300;1EB1;0061 0306 0300;
+1EB2;1EB2;0041 0306 0309;1EB2;0041 0306 0309;
+1EB3;1EB3;0061 0306 0309;1EB3;0061 0306 0309;
+1EB4;1EB4;0041 0306 0303;1EB4;0041 0306 0303;
+1EB5;1EB5;0061 0306 0303;1EB5;0061 0306 0303;
+1EB6;1EB6;0041 0323 0306;1EB6;0041 0323 0306;
+1EB7;1EB7;0061 0323 0306;1EB7;0061 0323 0306;
+1EB8;1EB8;0045 0323;1EB8;0045 0323;
+1EB9;1EB9;0065 0323;1EB9;0065 0323;
+1EBA;1EBA;0045 0309;1EBA;0045 0309;
+1EBB;1EBB;0065 0309;1EBB;0065 0309;
+1EBC;1EBC;0045 0303;1EBC;0045 0303;
+1EBD;1EBD;0065 0303;1EBD;0065 0303;
+1EBE;1EBE;0045 0302 0301;1EBE;0045 0302 0301;
+1EBF;1EBF;0065 0302 0301;1EBF;0065 0302 0301;
+1EC0;1EC0;0045 0302 0300;1EC0;0045 0302 0300;
+1EC1;1EC1;0065 0302 0300;1EC1;0065 0302 0300;
+1EC2;1EC2;0045 0302 0309;1EC2;0045 0302 0309;
+1EC3;1EC3;0065 0302 0309;1EC3;0065 0302 0309;
+1EC4;1EC4;0045 0302 0303;1EC4;0045 0302 0303;
+1EC5;1EC5;0065 0302 0303;1EC5;0065 0302 0303;
+1EC6;1EC6;0045 0323 0302;1EC6;0045 0323 0302;
+1EC7;1EC7;0065 0323 0302;1EC7;0065 0323 0302;
+1EC8;1EC8;0049 0309;1EC8;0049 0309;
+1EC9;1EC9;0069 0309;1EC9;0069 0309;
+1ECA;1ECA;0049 0323;1ECA;0049 0323;
+1ECB;1ECB;0069 0323;1ECB;0069 0323;
+1ECC;1ECC;004F 0323;1ECC;004F 0323;
+1ECD;1ECD;006F 0323;1ECD;006F 0323;
+1ECE;1ECE;004F 0309;1ECE;004F 0309;
+1ECF;1ECF;006F 0309;1ECF;006F 0309;
+1ED0;1ED0;004F 0302 0301;1ED0;004F 0302 0301;
+1ED1;1ED1;006F 0302 0301;1ED1;006F 0302 0301;
+1ED2;1ED2;004F 0302 0300;1ED2;004F 0302 0300;
+1ED3;1ED3;006F 0302 0300;1ED3;006F 0302 0300;
+1ED4;1ED4;004F 0302 0309;1ED4;004F 0302 0309;
+1ED5;1ED5;006F 0302 0309;1ED5;006F 0302 0309;
+1ED6;1ED6;004F 0302 0303;1ED6;004F 0302 0303;
+1ED7;1ED7;006F 0302 0303;1ED7;006F 0302 0303;
+1ED8;1ED8;004F 0323 0302;1ED8;004F 0323 0302;
+1ED9;1ED9;006F 0323 0302;1ED9;006F 0323 0302;
+1EDA;1EDA;004F 031B 0301;1EDA;004F 031B 0301;
+1EDB;1EDB;006F 031B 0301;1EDB;006F 031B 0301;
+1EDC;1EDC;004F 031B 0300;1EDC;004F 031B 0300;
+1EDD;1EDD;006F 031B 0300;1EDD;006F 031B 0300;
+1EDE;1EDE;004F 031B 0309;1EDE;004F 031B 0309;
+1EDF;1EDF;006F 031B 0309;1EDF;006F 031B 0309;
+1EE0;1EE0;004F 031B 0303;1EE0;004F 031B 0303;
+1EE1;1EE1;006F 031B 0303;1EE1;006F 031B 0303;
+1EE2;1EE2;004F 031B 0323;1EE2;004F 031B 0323;
+1EE3;1EE3;006F 031B 0323;1EE3;006F 031B 0323;
+1EE4;1EE4;0055 0323;1EE4;0055 0323;
+1EE5;1EE5;0075 0323;1EE5;0075 0323;
+1EE6;1EE6;0055 0309;1EE6;0055 0309;
+1EE7;1EE7;0075 0309;1EE7;0075 0309;
+1EE8;1EE8;0055 031B 0301;1EE8;0055 031B 0301;
+1EE9;1EE9;0075 031B 0301;1EE9;0075 031B 0301;
+1EEA;1EEA;0055 031B 0300;1EEA;0055 031B 0300;
+1EEB;1EEB;0075 031B 0300;1EEB;0075 031B 0300;
+1EEC;1EEC;0055 031B 0309;1EEC;0055 031B 0309;
+1EED;1EED;0075 031B 0309;1EED;0075 031B 0309;
+1EEE;1EEE;0055 031B 0303;1EEE;0055 031B 0303;
+1EEF;1EEF;0075 031B 0303;1EEF;0075 031B 0303;
+1EF0;1EF0;0055 031B 0323;1EF0;0055 031B 0323;
+1EF1;1EF1;0075 031B 0323;1EF1;0075 031B 0323;
+1EF2;1EF2;0059 0300;1EF2;0059 0300;
+1EF3;1EF3;0079 0300;1EF3;0079 0300;
+1EF4;1EF4;0059 0323;1EF4;0059 0323;
+1EF5;1EF5;0079 0323;1EF5;0079 0323;
+1EF6;1EF6;0059 0309;1EF6;0059 0309;
+1EF7;1EF7;0079 0309;1EF7;0079 0309;
+1EF8;1EF8;0059 0303;1EF8;0059 0303;
+1EF9;1EF9;0079 0303;1EF9;0079 0303;
+1F00;1F00;03B1 0313;1F00;03B1 0313;
+1F01;1F01;03B1 0314;1F01;03B1 0314;
+1F02;1F02;03B1 0313 0300;1F02;03B1 0313 0300;
+1F03;1F03;03B1 0314 0300;1F03;03B1 0314 0300;
+1F04;1F04;03B1 0313 0301;1F04;03B1 0313 0301;
+1F05;1F05;03B1 0314 0301;1F05;03B1 0314 0301;
+1F06;1F06;03B1 0313 0342;1F06;03B1 0313 0342;
+1F07;1F07;03B1 0314 0342;1F07;03B1 0314 0342;
+1F08;1F08;0391 0313;1F08;0391 0313;
+1F09;1F09;0391 0314;1F09;0391 0314;
+1F0A;1F0A;0391 0313 0300;1F0A;0391 0313 0300;
+1F0B;1F0B;0391 0314 0300;1F0B;0391 0314 0300;
+1F0C;1F0C;0391 0313 0301;1F0C;0391 0313 0301;
+1F0D;1F0D;0391 0314 0301;1F0D;0391 0314 0301;
+1F0E;1F0E;0391 0313 0342;1F0E;0391 0313 0342;
+1F0F;1F0F;0391 0314 0342;1F0F;0391 0314 0342;
+1F10;1F10;03B5 0313;1F10;03B5 0313;
+1F11;1F11;03B5 0314;1F11;03B5 0314;
+1F12;1F12;03B5 0313 0300;1F12;03B5 0313 0300;
+1F13;1F13;03B5 0314 0300;1F13;03B5 0314 0300;
+1F14;1F14;03B5 0313 0301;1F14;03B5 0313 0301;
+1F15;1F15;03B5 0314 0301;1F15;03B5 0314 0301;
+1F18;1F18;0395 0313;1F18;0395 0313;
+1F19;1F19;0395 0314;1F19;0395 0314;
+1F1A;1F1A;0395 0313 0300;1F1A;0395 0313 0300;
+1F1B;1F1B;0395 0314 0300;1F1B;0395 0314 0300;
+1F1C;1F1C;0395 0313 0301;1F1C;0395 0313 0301;
+1F1D;1F1D;0395 0314 0301;1F1D;0395 0314 0301;
+1F20;1F20;03B7 0313;1F20;03B7 0313;
+1F21;1F21;03B7 0314;1F21;03B7 0314;
+1F22;1F22;03B7 0313 0300;1F22;03B7 0313 0300;
+1F23;1F23;03B7 0314 0300;1F23;03B7 0314 0300;
+1F24;1F24;03B7 0313 0301;1F24;03B7 0313 0301;
+1F25;1F25;03B7 0314 0301;1F25;03B7 0314 0301;
+1F26;1F26;03B7 0313 0342;1F26;03B7 0313 0342;
+1F27;1F27;03B7 0314 0342;1F27;03B7 0314 0342;
+1F28;1F28;0397 0313;1F28;0397 0313;
+1F29;1F29;0397 0314;1F29;0397 0314;
+1F2A;1F2A;0397 0313 0300;1F2A;0397 0313 0300;
+1F2B;1F2B;0397 0314 0300;1F2B;0397 0314 0300;
+1F2C;1F2C;0397 0313 0301;1F2C;0397 0313 0301;
+1F2D;1F2D;0397 0314 0301;1F2D;0397 0314 0301;
+1F2E;1F2E;0397 0313 0342;1F2E;0397 0313 0342;
+1F2F;1F2F;0397 0314 0342;1F2F;0397 0314 0342;
+1F30;1F30;03B9 0313;1F30;03B9 0313;
+1F31;1F31;03B9 0314;1F31;03B9 0314;
+1F32;1F32;03B9 0313 0300;1F32;03B9 0313 0300;
+1F33;1F33;03B9 0314 0300;1F33;03B9 0314 0300;
+1F34;1F34;03B9 0313 0301;1F34;03B9 0313 0301;
+1F35;1F35;03B9 0314 0301;1F35;03B9 0314 0301;
+1F36;1F36;03B9 0313 0342;1F36;03B9 0313 0342;
+1F37;1F37;03B9 0314 0342;1F37;03B9 0314 0342;
+1F38;1F38;0399 0313;1F38;0399 0313;
+1F39;1F39;0399 0314;1F39;0399 0314;
+1F3A;1F3A;0399 0313 0300;1F3A;0399 0313 0300;
+1F3B;1F3B;0399 0314 0300;1F3B;0399 0314 0300;
+1F3C;1F3C;0399 0313 0301;1F3C;0399 0313 0301;
+1F3D;1F3D;0399 0314 0301;1F3D;0399 0314 0301;
+1F3E;1F3E;0399 0313 0342;1F3E;0399 0313 0342;
+1F3F;1F3F;0399 0314 0342;1F3F;0399 0314 0342;
+1F40;1F40;03BF 0313;1F40;03BF 0313;
+1F41;1F41;03BF 0314;1F41;03BF 0314;
+1F42;1F42;03BF 0313 0300;1F42;03BF 0313 0300;
+1F43;1F43;03BF 0314 0300;1F43;03BF 0314 0300;
+1F44;1F44;03BF 0313 0301;1F44;03BF 0313 0301;
+1F45;1F45;03BF 0314 0301;1F45;03BF 0314 0301;
+1F48;1F48;039F 0313;1F48;039F 0313;
+1F49;1F49;039F 0314;1F49;039F 0314;
+1F4A;1F4A;039F 0313 0300;1F4A;039F 0313 0300;
+1F4B;1F4B;039F 0314 0300;1F4B;039F 0314 0300;
+1F4C;1F4C;039F 0313 0301;1F4C;039F 0313 0301;
+1F4D;1F4D;039F 0314 0301;1F4D;039F 0314 0301;
+1F50;1F50;03C5 0313;1F50;03C5 0313;
+1F51;1F51;03C5 0314;1F51;03C5 0314;
+1F52;1F52;03C5 0313 0300;1F52;03C5 0313 0300;
+1F53;1F53;03C5 0314 0300;1F53;03C5 0314 0300;
+1F54;1F54;03C5 0313 0301;1F54;03C5 0313 0301;
+1F55;1F55;03C5 0314 0301;1F55;03C5 0314 0301;
+1F56;1F56;03C5 0313 0342;1F56;03C5 0313 0342;
+1F57;1F57;03C5 0314 0342;1F57;03C5 0314 0342;
+1F59;1F59;03A5 0314;1F59;03A5 0314;
+1F5B;1F5B;03A5 0314 0300;1F5B;03A5 0314 0300;
+1F5D;1F5D;03A5 0314 0301;1F5D;03A5 0314 0301;
+1F5F;1F5F;03A5 0314 0342;1F5F;03A5 0314 0342;
+1F60;1F60;03C9 0313;1F60;03C9 0313;
+1F61;1F61;03C9 0314;1F61;03C9 0314;
+1F62;1F62;03C9 0313 0300;1F62;03C9 0313 0300;
+1F63;1F63;03C9 0314 0300;1F63;03C9 0314 0300;
+1F64;1F64;03C9 0313 0301;1F64;03C9 0313 0301;
+1F65;1F65;03C9 0314 0301;1F65;03C9 0314 0301;
+1F66;1F66;03C9 0313 0342;1F66;03C9 0313 0342;
+1F67;1F67;03C9 0314 0342;1F67;03C9 0314 0342;
+1F68;1F68;03A9 0313;1F68;03A9 0313;
+1F69;1F69;03A9 0314;1F69;03A9 0314;
+1F6A;1F6A;03A9 0313 0300;1F6A;03A9 0313 0300;
+1F6B;1F6B;03A9 0314 0300;1F6B;03A9 0314 0300;
+1F6C;1F6C;03A9 0313 0301;1F6C;03A9 0313 0301;
+1F6D;1F6D;03A9 0314 0301;1F6D;03A9 0314 0301;
+1F6E;1F6E;03A9 0313 0342;1F6E;03A9 0313 0342;
+1F6F;1F6F;03A9 0314 0342;1F6F;03A9 0314 0342;
+1F70;1F70;03B1 0300;1F70;03B1 0300;
+1F71;03AC;03B1 0301;03AC;03B1 0301;
+1F72;1F72;03B5 0300;1F72;03B5 0300;
+1F73;03AD;03B5 0301;03AD;03B5 0301;
+1F74;1F74;03B7 0300;1F74;03B7 0300;
+1F75;03AE;03B7 0301;03AE;03B7 0301;
+1F76;1F76;03B9 0300;1F76;03B9 0300;
+1F77;03AF;03B9 0301;03AF;03B9 0301;
+1F78;1F78;03BF 0300;1F78;03BF 0300;
+1F79;03CC;03BF 0301;03CC;03BF 0301;
+1F7A;1F7A;03C5 0300;1F7A;03C5 0300;
+1F7B;03CD;03C5 0301;03CD;03C5 0301;
+1F7C;1F7C;03C9 0300;1F7C;03C9 0300;
+1F7D;03CE;03C9 0301;03CE;03C9 0301;
+1F80;1F80;03B1 0313 0345;1F80;03B1 0313 0345;
+1F81;1F81;03B1 0314 0345;1F81;03B1 0314 0345;
+1F82;1F82;03B1 0313 0300 0345;1F82;03B1 0313 0300 0345;
+1F83;1F83;03B1 0314 0300 0345;1F83;03B1 0314 0300 0345;
+1F84;1F84;03B1 0313 0301 0345;1F84;03B1 0313 0301 0345;
+1F85;1F85;03B1 0314 0301 0345;1F85;03B1 0314 0301 0345;
+1F86;1F86;03B1 0313 0342 0345;1F86;03B1 0313 0342 0345;
+1F87;1F87;03B1 0314 0342 0345;1F87;03B1 0314 0342 0345;
+1F88;1F88;0391 0313 0345;1F88;0391 0313 0345;
+1F89;1F89;0391 0314 0345;1F89;0391 0314 0345;
+1F8A;1F8A;0391 0313 0300 0345;1F8A;0391 0313 0300 0345;
+1F8B;1F8B;0391 0314 0300 0345;1F8B;0391 0314 0300 0345;
+1F8C;1F8C;0391 0313 0301 0345;1F8C;0391 0313 0301 0345;
+1F8D;1F8D;0391 0314 0301 0345;1F8D;0391 0314 0301 0345;
+1F8E;1F8E;0391 0313 0342 0345;1F8E;0391 0313 0342 0345;
+1F8F;1F8F;0391 0314 0342 0345;1F8F;0391 0314 0342 0345;
+1F90;1F90;03B7 0313 0345;1F90;03B7 0313 0345;
+1F91;1F91;03B7 0314 0345;1F91;03B7 0314 0345;
+1F92;1F92;03B7 0313 0300 0345;1F92;03B7 0313 0300 0345;
+1F93;1F93;03B7 0314 0300 0345;1F93;03B7 0314 0300 0345;
+1F94;1F94;03B7 0313 0301 0345;1F94;03B7 0313 0301 0345;
+1F95;1F95;03B7 0314 0301 0345;1F95;03B7 0314 0301 0345;
+1F96;1F96;03B7 0313 0342 0345;1F96;03B7 0313 0342 0345;
+1F97;1F97;03B7 0314 0342 0345;1F97;03B7 0314 0342 0345;
+1F98;1F98;0397 0313 0345;1F98;0397 0313 0345;
+1F99;1F99;0397 0314 0345;1F99;0397 0314 0345;
+1F9A;1F9A;0397 0313 0300 0345;1F9A;0397 0313 0300 0345;
+1F9B;1F9B;0397 0314 0300 0345;1F9B;0397 0314 0300 0345;
+1F9C;1F9C;0397 0313 0301 0345;1F9C;0397 0313 0301 0345;
+1F9D;1F9D;0397 0314 0301 0345;1F9D;0397 0314 0301 0345;
+1F9E;1F9E;0397 0313 0342 0345;1F9E;0397 0313 0342 0345;
+1F9F;1F9F;0397 0314 0342 0345;1F9F;0397 0314 0342 0345;
+1FA0;1FA0;03C9 0313 0345;1FA0;03C9 0313 0345;
+1FA1;1FA1;03C9 0314 0345;1FA1;03C9 0314 0345;
+1FA2;1FA2;03C9 0313 0300 0345;1FA2;03C9 0313 0300 0345;
+1FA3;1FA3;03C9 0314 0300 0345;1FA3;03C9 0314 0300 0345;
+1FA4;1FA4;03C9 0313 0301 0345;1FA4;03C9 0313 0301 0345;
+1FA5;1FA5;03C9 0314 0301 0345;1FA5;03C9 0314 0301 0345;
+1FA6;1FA6;03C9 0313 0342 0345;1FA6;03C9 0313 0342 0345;
+1FA7;1FA7;03C9 0314 0342 0345;1FA7;03C9 0314 0342 0345;
+1FA8;1FA8;03A9 0313 0345;1FA8;03A9 0313 0345;
+1FA9;1FA9;03A9 0314 0345;1FA9;03A9 0314 0345;
+1FAA;1FAA;03A9 0313 0300 0345;1FAA;03A9 0313 0300 0345;
+1FAB;1FAB;03A9 0314 0300 0345;1FAB;03A9 0314 0300 0345;
+1FAC;1FAC;03A9 0313 0301 0345;1FAC;03A9 0313 0301 0345;
+1FAD;1FAD;03A9 0314 0301 0345;1FAD;03A9 0314 0301 0345;
+1FAE;1FAE;03A9 0313 0342 0345;1FAE;03A9 0313 0342 0345;
+1FAF;1FAF;03A9 0314 0342 0345;1FAF;03A9 0314 0342 0345;
+1FB0;1FB0;03B1 0306;1FB0;03B1 0306;
+1FB1;1FB1;03B1 0304;1FB1;03B1 0304;
+1FB2;1FB2;03B1 0300 0345;1FB2;03B1 0300 0345;
+1FB3;1FB3;03B1 0345;1FB3;03B1 0345;
+1FB4;1FB4;03B1 0301 0345;1FB4;03B1 0301 0345;
+1FB6;1FB6;03B1 0342;1FB6;03B1 0342;
+1FB7;1FB7;03B1 0342 0345;1FB7;03B1 0342 0345;
+1FB8;1FB8;0391 0306;1FB8;0391 0306;
+1FB9;1FB9;0391 0304;1FB9;0391 0304;
+1FBA;1FBA;0391 0300;1FBA;0391 0300;
+1FBB;0386;0391 0301;0386;0391 0301;
+1FBC;1FBC;0391 0345;1FBC;0391 0345;
+1FBD;1FBD;1FBD;0020 0313;0020 0313;
+1FBE;03B9;03B9;03B9;03B9;
+1FBF;1FBF;1FBF;0020 0313;0020 0313;
+1FC0;1FC0;1FC0;0020 0342;0020 0342;
+1FC1;1FC1;00A8 0342;0020 0308 0342;0020 0308 0342;
+1FC2;1FC2;03B7 0300 0345;1FC2;03B7 0300 0345;
+1FC3;1FC3;03B7 0345;1FC3;03B7 0345;
+1FC4;1FC4;03B7 0301 0345;1FC4;03B7 0301 0345;
+1FC6;1FC6;03B7 0342;1FC6;03B7 0342;
+1FC7;1FC7;03B7 0342 0345;1FC7;03B7 0342 0345;
+1FC8;1FC8;0395 0300;1FC8;0395 0300;
+1FC9;0388;0395 0301;0388;0395 0301;
+1FCA;1FCA;0397 0300;1FCA;0397 0300;
+1FCB;0389;0397 0301;0389;0397 0301;
+1FCC;1FCC;0397 0345;1FCC;0397 0345;
+1FCD;1FCD;1FBF 0300;0020 0313 0300;0020 0313 0300;
+1FCE;1FCE;1FBF 0301;0020 0313 0301;0020 0313 0301;
+1FCF;1FCF;1FBF 0342;0020 0313 0342;0020 0313 0342;
+1FD0;1FD0;03B9 0306;1FD0;03B9 0306;
+1FD1;1FD1;03B9 0304;1FD1;03B9 0304;
+1FD2;1FD2;03B9 0308 0300;1FD2;03B9 0308 0300;
+1FD3;0390;03B9 0308 0301;0390;03B9 0308 0301;
+1FD6;1FD6;03B9 0342;1FD6;03B9 0342;
+1FD7;1FD7;03B9 0308 0342;1FD7;03B9 0308 0342;
+1FD8;1FD8;0399 0306;1FD8;0399 0306;
+1FD9;1FD9;0399 0304;1FD9;0399 0304;
+1FDA;1FDA;0399 0300;1FDA;0399 0300;
+1FDB;038A;0399 0301;038A;0399 0301;
+1FDD;1FDD;1FFE 0300;0020 0314 0300;0020 0314 0300;
+1FDE;1FDE;1FFE 0301;0020 0314 0301;0020 0314 0301;
+1FDF;1FDF;1FFE 0342;0020 0314 0342;0020 0314 0342;
+1FE0;1FE0;03C5 0306;1FE0;03C5 0306;
+1FE1;1FE1;03C5 0304;1FE1;03C5 0304;
+1FE2;1FE2;03C5 0308 0300;1FE2;03C5 0308 0300;
+1FE3;03B0;03C5 0308 0301;03B0;03C5 0308 0301;
+1FE4;1FE4;03C1 0313;1FE4;03C1 0313;
+1FE5;1FE5;03C1 0314;1FE5;03C1 0314;
+1FE6;1FE6;03C5 0342;1FE6;03C5 0342;
+1FE7;1FE7;03C5 0308 0342;1FE7;03C5 0308 0342;
+1FE8;1FE8;03A5 0306;1FE8;03A5 0306;
+1FE9;1FE9;03A5 0304;1FE9;03A5 0304;
+1FEA;1FEA;03A5 0300;1FEA;03A5 0300;
+1FEB;038E;03A5 0301;038E;03A5 0301;
+1FEC;1FEC;03A1 0314;1FEC;03A1 0314;
+1FED;1FED;00A8 0300;0020 0308 0300;0020 0308 0300;
+1FEE;0385;00A8 0301;0020 0308 0301;0020 0308 0301;
+1FEF;0060;0060;0060;0060;
+1FF2;1FF2;03C9 0300 0345;1FF2;03C9 0300 0345;
+1FF3;1FF3;03C9 0345;1FF3;03C9 0345;
+1FF4;1FF4;03C9 0301 0345;1FF4;03C9 0301 0345;
+1FF6;1FF6;03C9 0342;1FF6;03C9 0342;
+1FF7;1FF7;03C9 0342 0345;1FF7;03C9 0342 0345;
+1FF8;1FF8;039F 0300;1FF8;039F 0300;
+1FF9;038C;039F 0301;038C;039F 0301;
+1FFA;1FFA;03A9 0300;1FFA;03A9 0300;
+1FFB;038F;03A9 0301;038F;03A9 0301;
+1FFC;1FFC;03A9 0345;1FFC;03A9 0345;
+1FFD;00B4;00B4;0020 0301;0020 0301;
+1FFE;1FFE;1FFE;0020 0314;0020 0314;
+2000;2002;2002;0020;0020;
+2001;2003;2003;0020;0020;
+2002;2002;2002;0020;0020;
+2003;2003;2003;0020;0020;
+2004;2004;2004;0020;0020;
+2005;2005;2005;0020;0020;
+2006;2006;2006;0020;0020;
+2007;2007;2007;0020;0020;
+2008;2008;2008;0020;0020;
+2009;2009;2009;0020;0020;
+200A;200A;200A;0020;0020;
+2011;2011;2011;2010;2010;
+2017;2017;2017;0020 0333;0020 0333;
+2024;2024;2024;002E;002E;
+2025;2025;2025;002E 002E;002E 002E;
+2026;2026;2026;002E 002E 002E;002E 002E 002E;
+202F;202F;202F;0020;0020;
+2033;2033;2033;2032 2032;2032 2032;
+2034;2034;2034;2032 2032 2032;2032 2032 2032;
+2036;2036;2036;2035 2035;2035 2035;
+2037;2037;2037;2035 2035 2035;2035 2035 2035;
+203C;203C;203C;0021 0021;0021 0021;
+203E;203E;203E;0020 0305;0020 0305;
+2047;2047;2047;003F 003F;003F 003F;
+2048;2048;2048;003F 0021;003F 0021;
+2049;2049;2049;0021 003F;0021 003F;
+2057;2057;2057;2032 2032 2032 2032;2032 2032 2032 2032;
+205F;205F;205F;0020;0020;
+2070;2070;2070;0030;0030;
+2071;2071;2071;0069;0069;
+2074;2074;2074;0034;0034;
+2075;2075;2075;0035;0035;
+2076;2076;2076;0036;0036;
+2077;2077;2077;0037;0037;
+2078;2078;2078;0038;0038;
+2079;2079;2079;0039;0039;
+207A;207A;207A;002B;002B;
+207B;207B;207B;2212;2212;
+207C;207C;207C;003D;003D;
+207D;207D;207D;0028;0028;
+207E;207E;207E;0029;0029;
+207F;207F;207F;006E;006E;
+2080;2080;2080;0030;0030;
+2081;2081;2081;0031;0031;
+2082;2082;2082;0032;0032;
+2083;2083;2083;0033;0033;
+2084;2084;2084;0034;0034;
+2085;2085;2085;0035;0035;
+2086;2086;2086;0036;0036;
+2087;2087;2087;0037;0037;
+2088;2088;2088;0038;0038;
+2089;2089;2089;0039;0039;
+208A;208A;208A;002B;002B;
+208B;208B;208B;2212;2212;
+208C;208C;208C;003D;003D;
+208D;208D;208D;0028;0028;
+208E;208E;208E;0029;0029;
+20A8;20A8;20A8;0052 0073;0052 0073;
+2100;2100;2100;0061 002F 0063;0061 002F 0063;
+2101;2101;2101;0061 002F 0073;0061 002F 0073;
+2102;2102;2102;0043;0043;
+2103;2103;2103;00B0 0043;00B0 0043;
+2105;2105;2105;0063 002F 006F;0063 002F 006F;
+2106;2106;2106;0063 002F 0075;0063 002F 0075;
+2107;2107;2107;0190;0190;
+2109;2109;2109;00B0 0046;00B0 0046;
+210A;210A;210A;0067;0067;
+210B;210B;210B;0048;0048;
+210C;210C;210C;0048;0048;
+210D;210D;210D;0048;0048;
+210E;210E;210E;0068;0068;
+210F;210F;210F;0127;0127;
+2110;2110;2110;0049;0049;
+2111;2111;2111;0049;0049;
+2112;2112;2112;004C;004C;
+2113;2113;2113;006C;006C;
+2115;2115;2115;004E;004E;
+2116;2116;2116;004E 006F;004E 006F;
+2119;2119;2119;0050;0050;
+211A;211A;211A;0051;0051;
+211B;211B;211B;0052;0052;
+211C;211C;211C;0052;0052;
+211D;211D;211D;0052;0052;
+2120;2120;2120;0053 004D;0053 004D;
+2121;2121;2121;0054 0045 004C;0054 0045 004C;
+2122;2122;2122;0054 004D;0054 004D;
+2124;2124;2124;005A;005A;
+2126;03A9;03A9;03A9;03A9;
+2128;2128;2128;005A;005A;
+212A;004B;004B;004B;004B;
+212B;00C5;0041 030A;00C5;0041 030A;
+212C;212C;212C;0042;0042;
+212D;212D;212D;0043;0043;
+212F;212F;212F;0065;0065;
+2130;2130;2130;0045;0045;
+2131;2131;2131;0046;0046;
+2133;2133;2133;004D;004D;
+2134;2134;2134;006F;006F;
+2135;2135;2135;05D0;05D0;
+2136;2136;2136;05D1;05D1;
+2137;2137;2137;05D2;05D2;
+2138;2138;2138;05D3;05D3;
+2139;2139;2139;0069;0069;
+213D;213D;213D;03B3;03B3;
+213E;213E;213E;0393;0393;
+213F;213F;213F;03A0;03A0;
+2140;2140;2140;2211;2211;
+2145;2145;2145;0044;0044;
+2146;2146;2146;0064;0064;
+2147;2147;2147;0065;0065;
+2148;2148;2148;0069;0069;
+2149;2149;2149;006A;006A;
+2153;2153;2153;0031 2044 0033;0031 2044 0033;
+2154;2154;2154;0032 2044 0033;0032 2044 0033;
+2155;2155;2155;0031 2044 0035;0031 2044 0035;
+2156;2156;2156;0032 2044 0035;0032 2044 0035;
+2157;2157;2157;0033 2044 0035;0033 2044 0035;
+2158;2158;2158;0034 2044 0035;0034 2044 0035;
+2159;2159;2159;0031 2044 0036;0031 2044 0036;
+215A;215A;215A;0035 2044 0036;0035 2044 0036;
+215B;215B;215B;0031 2044 0038;0031 2044 0038;
+215C;215C;215C;0033 2044 0038;0033 2044 0038;
+215D;215D;215D;0035 2044 0038;0035 2044 0038;
+215E;215E;215E;0037 2044 0038;0037 2044 0038;
+215F;215F;215F;0031 2044;0031 2044;
+2160;2160;2160;0049;0049;
+2161;2161;2161;0049 0049;0049 0049;
+2162;2162;2162;0049 0049 0049;0049 0049 0049;
+2163;2163;2163;0049 0056;0049 0056;
+2164;2164;2164;0056;0056;
+2165;2165;2165;0056 0049;0056 0049;
+2166;2166;2166;0056 0049 0049;0056 0049 0049;
+2167;2167;2167;0056 0049 0049 0049;0056 0049 0049 0049;
+2168;2168;2168;0049 0058;0049 0058;
+2169;2169;2169;0058;0058;
+216A;216A;216A;0058 0049;0058 0049;
+216B;216B;216B;0058 0049 0049;0058 0049 0049;
+216C;216C;216C;004C;004C;
+216D;216D;216D;0043;0043;
+216E;216E;216E;0044;0044;
+216F;216F;216F;004D;004D;
+2170;2170;2170;0069;0069;
+2171;2171;2171;0069 0069;0069 0069;
+2172;2172;2172;0069 0069 0069;0069 0069 0069;
+2173;2173;2173;0069 0076;0069 0076;
+2174;2174;2174;0076;0076;
+2175;2175;2175;0076 0069;0076 0069;
+2176;2176;2176;0076 0069 0069;0076 0069 0069;
+2177;2177;2177;0076 0069 0069 0069;0076 0069 0069 0069;
+2178;2178;2178;0069 0078;0069 0078;
+2179;2179;2179;0078;0078;
+217A;217A;217A;0078 0069;0078 0069;
+217B;217B;217B;0078 0069 0069;0078 0069 0069;
+217C;217C;217C;006C;006C;
+217D;217D;217D;0063;0063;
+217E;217E;217E;0064;0064;
+217F;217F;217F;006D;006D;
+219A;219A;2190 0338;219A;2190 0338;
+219B;219B;2192 0338;219B;2192 0338;
+21AE;21AE;2194 0338;21AE;2194 0338;
+21CD;21CD;21D0 0338;21CD;21D0 0338;
+21CE;21CE;21D4 0338;21CE;21D4 0338;
+21CF;21CF;21D2 0338;21CF;21D2 0338;
+2204;2204;2203 0338;2204;2203 0338;
+2209;2209;2208 0338;2209;2208 0338;
+220C;220C;220B 0338;220C;220B 0338;
+2224;2224;2223 0338;2224;2223 0338;
+2226;2226;2225 0338;2226;2225 0338;
+222C;222C;222C;222B 222B;222B 222B;
+222D;222D;222D;222B 222B 222B;222B 222B 222B;
+222F;222F;222F;222E 222E;222E 222E;
+2230;2230;2230;222E 222E 222E;222E 222E 222E;
+2241;2241;223C 0338;2241;223C 0338;
+2244;2244;2243 0338;2244;2243 0338;
+2247;2247;2245 0338;2247;2245 0338;
+2249;2249;2248 0338;2249;2248 0338;
+2260;2260;003D 0338;2260;003D 0338;
+2262;2262;2261 0338;2262;2261 0338;
+226D;226D;224D 0338;226D;224D 0338;
+226E;226E;003C 0338;226E;003C 0338;
+226F;226F;003E 0338;226F;003E 0338;
+2270;2270;2264 0338;2270;2264 0338;
+2271;2271;2265 0338;2271;2265 0338;
+2274;2274;2272 0338;2274;2272 0338;
+2275;2275;2273 0338;2275;2273 0338;
+2278;2278;2276 0338;2278;2276 0338;
+2279;2279;2277 0338;2279;2277 0338;
+2280;2280;227A 0338;2280;227A 0338;
+2281;2281;227B 0338;2281;227B 0338;
+2284;2284;2282 0338;2284;2282 0338;
+2285;2285;2283 0338;2285;2283 0338;
+2288;2288;2286 0338;2288;2286 0338;
+2289;2289;2287 0338;2289;2287 0338;
+22AC;22AC;22A2 0338;22AC;22A2 0338;
+22AD;22AD;22A8 0338;22AD;22A8 0338;
+22AE;22AE;22A9 0338;22AE;22A9 0338;
+22AF;22AF;22AB 0338;22AF;22AB 0338;
+22E0;22E0;227C 0338;22E0;227C 0338;
+22E1;22E1;227D 0338;22E1;227D 0338;
+22E2;22E2;2291 0338;22E2;2291 0338;
+22E3;22E3;2292 0338;22E3;2292 0338;
+22EA;22EA;22B2 0338;22EA;22B2 0338;
+22EB;22EB;22B3 0338;22EB;22B3 0338;
+22EC;22EC;22B4 0338;22EC;22B4 0338;
+22ED;22ED;22B5 0338;22ED;22B5 0338;
+2329;3008;3008;3008;3008;
+232A;3009;3009;3009;3009;
+2460;2460;2460;0031;0031;
+2461;2461;2461;0032;0032;
+2462;2462;2462;0033;0033;
+2463;2463;2463;0034;0034;
+2464;2464;2464;0035;0035;
+2465;2465;2465;0036;0036;
+2466;2466;2466;0037;0037;
+2467;2467;2467;0038;0038;
+2468;2468;2468;0039;0039;
+2469;2469;2469;0031 0030;0031 0030;
+246A;246A;246A;0031 0031;0031 0031;
+246B;246B;246B;0031 0032;0031 0032;
+246C;246C;246C;0031 0033;0031 0033;
+246D;246D;246D;0031 0034;0031 0034;
+246E;246E;246E;0031 0035;0031 0035;
+246F;246F;246F;0031 0036;0031 0036;
+2470;2470;2470;0031 0037;0031 0037;
+2471;2471;2471;0031 0038;0031 0038;
+2472;2472;2472;0031 0039;0031 0039;
+2473;2473;2473;0032 0030;0032 0030;
+2474;2474;2474;0028 0031 0029;0028 0031 0029;
+2475;2475;2475;0028 0032 0029;0028 0032 0029;
+2476;2476;2476;0028 0033 0029;0028 0033 0029;
+2477;2477;2477;0028 0034 0029;0028 0034 0029;
+2478;2478;2478;0028 0035 0029;0028 0035 0029;
+2479;2479;2479;0028 0036 0029;0028 0036 0029;
+247A;247A;247A;0028 0037 0029;0028 0037 0029;
+247B;247B;247B;0028 0038 0029;0028 0038 0029;
+247C;247C;247C;0028 0039 0029;0028 0039 0029;
+247D;247D;247D;0028 0031 0030 0029;0028 0031 0030 0029;
+247E;247E;247E;0028 0031 0031 0029;0028 0031 0031 0029;
+247F;247F;247F;0028 0031 0032 0029;0028 0031 0032 0029;
+2480;2480;2480;0028 0031 0033 0029;0028 0031 0033 0029;
+2481;2481;2481;0028 0031 0034 0029;0028 0031 0034 0029;
+2482;2482;2482;0028 0031 0035 0029;0028 0031 0035 0029;
+2483;2483;2483;0028 0031 0036 0029;0028 0031 0036 0029;
+2484;2484;2484;0028 0031 0037 0029;0028 0031 0037 0029;
+2485;2485;2485;0028 0031 0038 0029;0028 0031 0038 0029;
+2486;2486;2486;0028 0031 0039 0029;0028 0031 0039 0029;
+2487;2487;2487;0028 0032 0030 0029;0028 0032 0030 0029;
+2488;2488;2488;0031 002E;0031 002E;
+2489;2489;2489;0032 002E;0032 002E;
+248A;248A;248A;0033 002E;0033 002E;
+248B;248B;248B;0034 002E;0034 002E;
+248C;248C;248C;0035 002E;0035 002E;
+248D;248D;248D;0036 002E;0036 002E;
+248E;248E;248E;0037 002E;0037 002E;
+248F;248F;248F;0038 002E;0038 002E;
+2490;2490;2490;0039 002E;0039 002E;
+2491;2491;2491;0031 0030 002E;0031 0030 002E;
+2492;2492;2492;0031 0031 002E;0031 0031 002E;
+2493;2493;2493;0031 0032 002E;0031 0032 002E;
+2494;2494;2494;0031 0033 002E;0031 0033 002E;
+2495;2495;2495;0031 0034 002E;0031 0034 002E;
+2496;2496;2496;0031 0035 002E;0031 0035 002E;
+2497;2497;2497;0031 0036 002E;0031 0036 002E;
+2498;2498;2498;0031 0037 002E;0031 0037 002E;
+2499;2499;2499;0031 0038 002E;0031 0038 002E;
+249A;249A;249A;0031 0039 002E;0031 0039 002E;
+249B;249B;249B;0032 0030 002E;0032 0030 002E;
+249C;249C;249C;0028 0061 0029;0028 0061 0029;
+249D;249D;249D;0028 0062 0029;0028 0062 0029;
+249E;249E;249E;0028 0063 0029;0028 0063 0029;
+249F;249F;249F;0028 0064 0029;0028 0064 0029;
+24A0;24A0;24A0;0028 0065 0029;0028 0065 0029;
+24A1;24A1;24A1;0028 0066 0029;0028 0066 0029;
+24A2;24A2;24A2;0028 0067 0029;0028 0067 0029;
+24A3;24A3;24A3;0028 0068 0029;0028 0068 0029;
+24A4;24A4;24A4;0028 0069 0029;0028 0069 0029;
+24A5;24A5;24A5;0028 006A 0029;0028 006A 0029;
+24A6;24A6;24A6;0028 006B 0029;0028 006B 0029;
+24A7;24A7;24A7;0028 006C 0029;0028 006C 0029;
+24A8;24A8;24A8;0028 006D 0029;0028 006D 0029;
+24A9;24A9;24A9;0028 006E 0029;0028 006E 0029;
+24AA;24AA;24AA;0028 006F 0029;0028 006F 0029;
+24AB;24AB;24AB;0028 0070 0029;0028 0070 0029;
+24AC;24AC;24AC;0028 0071 0029;0028 0071 0029;
+24AD;24AD;24AD;0028 0072 0029;0028 0072 0029;
+24AE;24AE;24AE;0028 0073 0029;0028 0073 0029;
+24AF;24AF;24AF;0028 0074 0029;0028 0074 0029;
+24B0;24B0;24B0;0028 0075 0029;0028 0075 0029;
+24B1;24B1;24B1;0028 0076 0029;0028 0076 0029;
+24B2;24B2;24B2;0028 0077 0029;0028 0077 0029;
+24B3;24B3;24B3;0028 0078 0029;0028 0078 0029;
+24B4;24B4;24B4;0028 0079 0029;0028 0079 0029;
+24B5;24B5;24B5;0028 007A 0029;0028 007A 0029;
+24B6;24B6;24B6;0041;0041;
+24B7;24B7;24B7;0042;0042;
+24B8;24B8;24B8;0043;0043;
+24B9;24B9;24B9;0044;0044;
+24BA;24BA;24BA;0045;0045;
+24BB;24BB;24BB;0046;0046;
+24BC;24BC;24BC;0047;0047;
+24BD;24BD;24BD;0048;0048;
+24BE;24BE;24BE;0049;0049;
+24BF;24BF;24BF;004A;004A;
+24C0;24C0;24C0;004B;004B;
+24C1;24C1;24C1;004C;004C;
+24C2;24C2;24C2;004D;004D;
+24C3;24C3;24C3;004E;004E;
+24C4;24C4;24C4;004F;004F;
+24C5;24C5;24C5;0050;0050;
+24C6;24C6;24C6;0051;0051;
+24C7;24C7;24C7;0052;0052;
+24C8;24C8;24C8;0053;0053;
+24C9;24C9;24C9;0054;0054;
+24CA;24CA;24CA;0055;0055;
+24CB;24CB;24CB;0056;0056;
+24CC;24CC;24CC;0057;0057;
+24CD;24CD;24CD;0058;0058;
+24CE;24CE;24CE;0059;0059;
+24CF;24CF;24CF;005A;005A;
+24D0;24D0;24D0;0061;0061;
+24D1;24D1;24D1;0062;0062;
+24D2;24D2;24D2;0063;0063;
+24D3;24D3;24D3;0064;0064;
+24D4;24D4;24D4;0065;0065;
+24D5;24D5;24D5;0066;0066;
+24D6;24D6;24D6;0067;0067;
+24D7;24D7;24D7;0068;0068;
+24D8;24D8;24D8;0069;0069;
+24D9;24D9;24D9;006A;006A;
+24DA;24DA;24DA;006B;006B;
+24DB;24DB;24DB;006C;006C;
+24DC;24DC;24DC;006D;006D;
+24DD;24DD;24DD;006E;006E;
+24DE;24DE;24DE;006F;006F;
+24DF;24DF;24DF;0070;0070;
+24E0;24E0;24E0;0071;0071;
+24E1;24E1;24E1;0072;0072;
+24E2;24E2;24E2;0073;0073;
+24E3;24E3;24E3;0074;0074;
+24E4;24E4;24E4;0075;0075;
+24E5;24E5;24E5;0076;0076;
+24E6;24E6;24E6;0077;0077;
+24E7;24E7;24E7;0078;0078;
+24E8;24E8;24E8;0079;0079;
+24E9;24E9;24E9;007A;007A;
+24EA;24EA;24EA;0030;0030;
+2A0C;2A0C;2A0C;222B 222B 222B 222B;222B 222B 222B 222B;
+2A74;2A74;2A74;003A 003A 003D;003A 003A 003D;
+2A75;2A75;2A75;003D 003D;003D 003D;
+2A76;2A76;2A76;003D 003D 003D;003D 003D 003D;
+2ADC;2ADD 0338;2ADD 0338;2ADD 0338;2ADD 0338;
+2E9F;2E9F;2E9F;6BCD;6BCD;
+2EF3;2EF3;2EF3;9F9F;9F9F;
+2F00;2F00;2F00;4E00;4E00;
+2F01;2F01;2F01;4E28;4E28;
+2F02;2F02;2F02;4E36;4E36;
+2F03;2F03;2F03;4E3F;4E3F;
+2F04;2F04;2F04;4E59;4E59;
+2F05;2F05;2F05;4E85;4E85;
+2F06;2F06;2F06;4E8C;4E8C;
+2F07;2F07;2F07;4EA0;4EA0;
+2F08;2F08;2F08;4EBA;4EBA;
+2F09;2F09;2F09;513F;513F;
+2F0A;2F0A;2F0A;5165;5165;
+2F0B;2F0B;2F0B;516B;516B;
+2F0C;2F0C;2F0C;5182;5182;
+2F0D;2F0D;2F0D;5196;5196;
+2F0E;2F0E;2F0E;51AB;51AB;
+2F0F;2F0F;2F0F;51E0;51E0;
+2F10;2F10;2F10;51F5;51F5;
+2F11;2F11;2F11;5200;5200;
+2F12;2F12;2F12;529B;529B;
+2F13;2F13;2F13;52F9;52F9;
+2F14;2F14;2F14;5315;5315;
+2F15;2F15;2F15;531A;531A;
+2F16;2F16;2F16;5338;5338;
+2F17;2F17;2F17;5341;5341;
+2F18;2F18;2F18;535C;535C;
+2F19;2F19;2F19;5369;5369;
+2F1A;2F1A;2F1A;5382;5382;
+2F1B;2F1B;2F1B;53B6;53B6;
+2F1C;2F1C;2F1C;53C8;53C8;
+2F1D;2F1D;2F1D;53E3;53E3;
+2F1E;2F1E;2F1E;56D7;56D7;
+2F1F;2F1F;2F1F;571F;571F;
+2F20;2F20;2F20;58EB;58EB;
+2F21;2F21;2F21;5902;5902;
+2F22;2F22;2F22;590A;590A;
+2F23;2F23;2F23;5915;5915;
+2F24;2F24;2F24;5927;5927;
+2F25;2F25;2F25;5973;5973;
+2F26;2F26;2F26;5B50;5B50;
+2F27;2F27;2F27;5B80;5B80;
+2F28;2F28;2F28;5BF8;5BF8;
+2F29;2F29;2F29;5C0F;5C0F;
+2F2A;2F2A;2F2A;5C22;5C22;
+2F2B;2F2B;2F2B;5C38;5C38;
+2F2C;2F2C;2F2C;5C6E;5C6E;
+2F2D;2F2D;2F2D;5C71;5C71;
+2F2E;2F2E;2F2E;5DDB;5DDB;
+2F2F;2F2F;2F2F;5DE5;5DE5;
+2F30;2F30;2F30;5DF1;5DF1;
+2F31;2F31;2F31;5DFE;5DFE;
+2F32;2F32;2F32;5E72;5E72;
+2F33;2F33;2F33;5E7A;5E7A;
+2F34;2F34;2F34;5E7F;5E7F;
+2F35;2F35;2F35;5EF4;5EF4;
+2F36;2F36;2F36;5EFE;5EFE;
+2F37;2F37;2F37;5F0B;5F0B;
+2F38;2F38;2F38;5F13;5F13;
+2F39;2F39;2F39;5F50;5F50;
+2F3A;2F3A;2F3A;5F61;5F61;
+2F3B;2F3B;2F3B;5F73;5F73;
+2F3C;2F3C;2F3C;5FC3;5FC3;
+2F3D;2F3D;2F3D;6208;6208;
+2F3E;2F3E;2F3E;6236;6236;
+2F3F;2F3F;2F3F;624B;624B;
+2F40;2F40;2F40;652F;652F;
+2F41;2F41;2F41;6534;6534;
+2F42;2F42;2F42;6587;6587;
+2F43;2F43;2F43;6597;6597;
+2F44;2F44;2F44;65A4;65A4;
+2F45;2F45;2F45;65B9;65B9;
+2F46;2F46;2F46;65E0;65E0;
+2F47;2F47;2F47;65E5;65E5;
+2F48;2F48;2F48;66F0;66F0;
+2F49;2F49;2F49;6708;6708;
+2F4A;2F4A;2F4A;6728;6728;
+2F4B;2F4B;2F4B;6B20;6B20;
+2F4C;2F4C;2F4C;6B62;6B62;
+2F4D;2F4D;2F4D;6B79;6B79;
+2F4E;2F4E;2F4E;6BB3;6BB3;
+2F4F;2F4F;2F4F;6BCB;6BCB;
+2F50;2F50;2F50;6BD4;6BD4;
+2F51;2F51;2F51;6BDB;6BDB;
+2F52;2F52;2F52;6C0F;6C0F;
+2F53;2F53;2F53;6C14;6C14;
+2F54;2F54;2F54;6C34;6C34;
+2F55;2F55;2F55;706B;706B;
+2F56;2F56;2F56;722A;722A;
+2F57;2F57;2F57;7236;7236;
+2F58;2F58;2F58;723B;723B;
+2F59;2F59;2F59;723F;723F;
+2F5A;2F5A;2F5A;7247;7247;
+2F5B;2F5B;2F5B;7259;7259;
+2F5C;2F5C;2F5C;725B;725B;
+2F5D;2F5D;2F5D;72AC;72AC;
+2F5E;2F5E;2F5E;7384;7384;
+2F5F;2F5F;2F5F;7389;7389;
+2F60;2F60;2F60;74DC;74DC;
+2F61;2F61;2F61;74E6;74E6;
+2F62;2F62;2F62;7518;7518;
+2F63;2F63;2F63;751F;751F;
+2F64;2F64;2F64;7528;7528;
+2F65;2F65;2F65;7530;7530;
+2F66;2F66;2F66;758B;758B;
+2F67;2F67;2F67;7592;7592;
+2F68;2F68;2F68;7676;7676;
+2F69;2F69;2F69;767D;767D;
+2F6A;2F6A;2F6A;76AE;76AE;
+2F6B;2F6B;2F6B;76BF;76BF;
+2F6C;2F6C;2F6C;76EE;76EE;
+2F6D;2F6D;2F6D;77DB;77DB;
+2F6E;2F6E;2F6E;77E2;77E2;
+2F6F;2F6F;2F6F;77F3;77F3;
+2F70;2F70;2F70;793A;793A;
+2F71;2F71;2F71;79B8;79B8;
+2F72;2F72;2F72;79BE;79BE;
+2F73;2F73;2F73;7A74;7A74;
+2F74;2F74;2F74;7ACB;7ACB;
+2F75;2F75;2F75;7AF9;7AF9;
+2F76;2F76;2F76;7C73;7C73;
+2F77;2F77;2F77;7CF8;7CF8;
+2F78;2F78;2F78;7F36;7F36;
+2F79;2F79;2F79;7F51;7F51;
+2F7A;2F7A;2F7A;7F8A;7F8A;
+2F7B;2F7B;2F7B;7FBD;7FBD;
+2F7C;2F7C;2F7C;8001;8001;
+2F7D;2F7D;2F7D;800C;800C;
+2F7E;2F7E;2F7E;8012;8012;
+2F7F;2F7F;2F7F;8033;8033;
+2F80;2F80;2F80;807F;807F;
+2F81;2F81;2F81;8089;8089;
+2F82;2F82;2F82;81E3;81E3;
+2F83;2F83;2F83;81EA;81EA;
+2F84;2F84;2F84;81F3;81F3;
+2F85;2F85;2F85;81FC;81FC;
+2F86;2F86;2F86;820C;820C;
+2F87;2F87;2F87;821B;821B;
+2F88;2F88;2F88;821F;821F;
+2F89;2F89;2F89;826E;826E;
+2F8A;2F8A;2F8A;8272;8272;
+2F8B;2F8B;2F8B;8278;8278;
+2F8C;2F8C;2F8C;864D;864D;
+2F8D;2F8D;2F8D;866B;866B;
+2F8E;2F8E;2F8E;8840;8840;
+2F8F;2F8F;2F8F;884C;884C;
+2F90;2F90;2F90;8863;8863;
+2F91;2F91;2F91;897E;897E;
+2F92;2F92;2F92;898B;898B;
+2F93;2F93;2F93;89D2;89D2;
+2F94;2F94;2F94;8A00;8A00;
+2F95;2F95;2F95;8C37;8C37;
+2F96;2F96;2F96;8C46;8C46;
+2F97;2F97;2F97;8C55;8C55;
+2F98;2F98;2F98;8C78;8C78;
+2F99;2F99;2F99;8C9D;8C9D;
+2F9A;2F9A;2F9A;8D64;8D64;
+2F9B;2F9B;2F9B;8D70;8D70;
+2F9C;2F9C;2F9C;8DB3;8DB3;
+2F9D;2F9D;2F9D;8EAB;8EAB;
+2F9E;2F9E;2F9E;8ECA;8ECA;
+2F9F;2F9F;2F9F;8F9B;8F9B;
+2FA0;2FA0;2FA0;8FB0;8FB0;
+2FA1;2FA1;2FA1;8FB5;8FB5;
+2FA2;2FA2;2FA2;9091;9091;
+2FA3;2FA3;2FA3;9149;9149;
+2FA4;2FA4;2FA4;91C6;91C6;
+2FA5;2FA5;2FA5;91CC;91CC;
+2FA6;2FA6;2FA6;91D1;91D1;
+2FA7;2FA7;2FA7;9577;9577;
+2FA8;2FA8;2FA8;9580;9580;
+2FA9;2FA9;2FA9;961C;961C;
+2FAA;2FAA;2FAA;96B6;96B6;
+2FAB;2FAB;2FAB;96B9;96B9;
+2FAC;2FAC;2FAC;96E8;96E8;
+2FAD;2FAD;2FAD;9751;9751;
+2FAE;2FAE;2FAE;975E;975E;
+2FAF;2FAF;2FAF;9762;9762;
+2FB0;2FB0;2FB0;9769;9769;
+2FB1;2FB1;2FB1;97CB;97CB;
+2FB2;2FB2;2FB2;97ED;97ED;
+2FB3;2FB3;2FB3;97F3;97F3;
+2FB4;2FB4;2FB4;9801;9801;
+2FB5;2FB5;2FB5;98A8;98A8;
+2FB6;2FB6;2FB6;98DB;98DB;
+2FB7;2FB7;2FB7;98DF;98DF;
+2FB8;2FB8;2FB8;9996;9996;
+2FB9;2FB9;2FB9;9999;9999;
+2FBA;2FBA;2FBA;99AC;99AC;
+2FBB;2FBB;2FBB;9AA8;9AA8;
+2FBC;2FBC;2FBC;9AD8;9AD8;
+2FBD;2FBD;2FBD;9ADF;9ADF;
+2FBE;2FBE;2FBE;9B25;9B25;
+2FBF;2FBF;2FBF;9B2F;9B2F;
+2FC0;2FC0;2FC0;9B32;9B32;
+2FC1;2FC1;2FC1;9B3C;9B3C;
+2FC2;2FC2;2FC2;9B5A;9B5A;
+2FC3;2FC3;2FC3;9CE5;9CE5;
+2FC4;2FC4;2FC4;9E75;9E75;
+2FC5;2FC5;2FC5;9E7F;9E7F;
+2FC6;2FC6;2FC6;9EA5;9EA5;
+2FC7;2FC7;2FC7;9EBB;9EBB;
+2FC8;2FC8;2FC8;9EC3;9EC3;
+2FC9;2FC9;2FC9;9ECD;9ECD;
+2FCA;2FCA;2FCA;9ED1;9ED1;
+2FCB;2FCB;2FCB;9EF9;9EF9;
+2FCC;2FCC;2FCC;9EFD;9EFD;
+2FCD;2FCD;2FCD;9F0E;9F0E;
+2FCE;2FCE;2FCE;9F13;9F13;
+2FCF;2FCF;2FCF;9F20;9F20;
+2FD0;2FD0;2FD0;9F3B;9F3B;
+2FD1;2FD1;2FD1;9F4A;9F4A;
+2FD2;2FD2;2FD2;9F52;9F52;
+2FD3;2FD3;2FD3;9F8D;9F8D;
+2FD4;2FD4;2FD4;9F9C;9F9C;
+2FD5;2FD5;2FD5;9FA0;9FA0;
+3000;3000;3000;0020;0020;
+3036;3036;3036;3012;3012;
+3038;3038;3038;5341;5341;
+3039;3039;3039;5344;5344;
+303A;303A;303A;5345;5345;
+304C;304C;304B 3099;304C;304B 3099;
+304E;304E;304D 3099;304E;304D 3099;
+3050;3050;304F 3099;3050;304F 3099;
+3052;3052;3051 3099;3052;3051 3099;
+3054;3054;3053 3099;3054;3053 3099;
+3056;3056;3055 3099;3056;3055 3099;
+3058;3058;3057 3099;3058;3057 3099;
+305A;305A;3059 3099;305A;3059 3099;
+305C;305C;305B 3099;305C;305B 3099;
+305E;305E;305D 3099;305E;305D 3099;
+3060;3060;305F 3099;3060;305F 3099;
+3062;3062;3061 3099;3062;3061 3099;
+3065;3065;3064 3099;3065;3064 3099;
+3067;3067;3066 3099;3067;3066 3099;
+3069;3069;3068 3099;3069;3068 3099;
+3070;3070;306F 3099;3070;306F 3099;
+3071;3071;306F 309A;3071;306F 309A;
+3073;3073;3072 3099;3073;3072 3099;
+3074;3074;3072 309A;3074;3072 309A;
+3076;3076;3075 3099;3076;3075 3099;
+3077;3077;3075 309A;3077;3075 309A;
+3079;3079;3078 3099;3079;3078 3099;
+307A;307A;3078 309A;307A;3078 309A;
+307C;307C;307B 3099;307C;307B 3099;
+307D;307D;307B 309A;307D;307B 309A;
+3094;3094;3046 3099;3094;3046 3099;
+309B;309B;309B;0020 3099;0020 3099;
+309C;309C;309C;0020 309A;0020 309A;
+309E;309E;309D 3099;309E;309D 3099;
+309F;309F;309F;3088 308A;3088 308A;
+30AC;30AC;30AB 3099;30AC;30AB 3099;
+30AE;30AE;30AD 3099;30AE;30AD 3099;
+30B0;30B0;30AF 3099;30B0;30AF 3099;
+30B2;30B2;30B1 3099;30B2;30B1 3099;
+30B4;30B4;30B3 3099;30B4;30B3 3099;
+30B6;30B6;30B5 3099;30B6;30B5 3099;
+30B8;30B8;30B7 3099;30B8;30B7 3099;
+30BA;30BA;30B9 3099;30BA;30B9 3099;
+30BC;30BC;30BB 3099;30BC;30BB 3099;
+30BE;30BE;30BD 3099;30BE;30BD 3099;
+30C0;30C0;30BF 3099;30C0;30BF 3099;
+30C2;30C2;30C1 3099;30C2;30C1 3099;
+30C5;30C5;30C4 3099;30C5;30C4 3099;
+30C7;30C7;30C6 3099;30C7;30C6 3099;
+30C9;30C9;30C8 3099;30C9;30C8 3099;
+30D0;30D0;30CF 3099;30D0;30CF 3099;
+30D1;30D1;30CF 309A;30D1;30CF 309A;
+30D3;30D3;30D2 3099;30D3;30D2 3099;
+30D4;30D4;30D2 309A;30D4;30D2 309A;
+30D6;30D6;30D5 3099;30D6;30D5 3099;
+30D7;30D7;30D5 309A;30D7;30D5 309A;
+30D9;30D9;30D8 3099;30D9;30D8 3099;
+30DA;30DA;30D8 309A;30DA;30D8 309A;
+30DC;30DC;30DB 3099;30DC;30DB 3099;
+30DD;30DD;30DB 309A;30DD;30DB 309A;
+30F4;30F4;30A6 3099;30F4;30A6 3099;
+30F7;30F7;30EF 3099;30F7;30EF 3099;
+30F8;30F8;30F0 3099;30F8;30F0 3099;
+30F9;30F9;30F1 3099;30F9;30F1 3099;
+30FA;30FA;30F2 3099;30FA;30F2 3099;
+30FE;30FE;30FD 3099;30FE;30FD 3099;
+30FF;30FF;30FF;30B3 30C8;30B3 30C8;
+3131;3131;3131;1100;1100;
+3132;3132;3132;1101;1101;
+3133;3133;3133;11AA;11AA;
+3134;3134;3134;1102;1102;
+3135;3135;3135;11AC;11AC;
+3136;3136;3136;11AD;11AD;
+3137;3137;3137;1103;1103;
+3138;3138;3138;1104;1104;
+3139;3139;3139;1105;1105;
+313A;313A;313A;11B0;11B0;
+313B;313B;313B;11B1;11B1;
+313C;313C;313C;11B2;11B2;
+313D;313D;313D;11B3;11B3;
+313E;313E;313E;11B4;11B4;
+313F;313F;313F;11B5;11B5;
+3140;3140;3140;111A;111A;
+3141;3141;3141;1106;1106;
+3142;3142;3142;1107;1107;
+3143;3143;3143;1108;1108;
+3144;3144;3144;1121;1121;
+3145;3145;3145;1109;1109;
+3146;3146;3146;110A;110A;
+3147;3147;3147;110B;110B;
+3148;3148;3148;110C;110C;
+3149;3149;3149;110D;110D;
+314A;314A;314A;110E;110E;
+314B;314B;314B;110F;110F;
+314C;314C;314C;1110;1110;
+314D;314D;314D;1111;1111;
+314E;314E;314E;1112;1112;
+314F;314F;314F;1161;1161;
+3150;3150;3150;1162;1162;
+3151;3151;3151;1163;1163;
+3152;3152;3152;1164;1164;
+3153;3153;3153;1165;1165;
+3154;3154;3154;1166;1166;
+3155;3155;3155;1167;1167;
+3156;3156;3156;1168;1168;
+3157;3157;3157;1169;1169;
+3158;3158;3158;116A;116A;
+3159;3159;3159;116B;116B;
+315A;315A;315A;116C;116C;
+315B;315B;315B;116D;116D;
+315C;315C;315C;116E;116E;
+315D;315D;315D;116F;116F;
+315E;315E;315E;1170;1170;
+315F;315F;315F;1171;1171;
+3160;3160;3160;1172;1172;
+3161;3161;3161;1173;1173;
+3162;3162;3162;1174;1174;
+3163;3163;3163;1175;1175;
+3164;3164;3164;1160;1160;
+3165;3165;3165;1114;1114;
+3166;3166;3166;1115;1115;
+3167;3167;3167;11C7;11C7;
+3168;3168;3168;11C8;11C8;
+3169;3169;3169;11CC;11CC;
+316A;316A;316A;11CE;11CE;
+316B;316B;316B;11D3;11D3;
+316C;316C;316C;11D7;11D7;
+316D;316D;316D;11D9;11D9;
+316E;316E;316E;111C;111C;
+316F;316F;316F;11DD;11DD;
+3170;3170;3170;11DF;11DF;
+3171;3171;3171;111D;111D;
+3172;3172;3172;111E;111E;
+3173;3173;3173;1120;1120;
+3174;3174;3174;1122;1122;
+3175;3175;3175;1123;1123;
+3176;3176;3176;1127;1127;
+3177;3177;3177;1129;1129;
+3178;3178;3178;112B;112B;
+3179;3179;3179;112C;112C;
+317A;317A;317A;112D;112D;
+317B;317B;317B;112E;112E;
+317C;317C;317C;112F;112F;
+317D;317D;317D;1132;1132;
+317E;317E;317E;1136;1136;
+317F;317F;317F;1140;1140;
+3180;3180;3180;1147;1147;
+3181;3181;3181;114C;114C;
+3182;3182;3182;11F1;11F1;
+3183;3183;3183;11F2;11F2;
+3184;3184;3184;1157;1157;
+3185;3185;3185;1158;1158;
+3186;3186;3186;1159;1159;
+3187;3187;3187;1184;1184;
+3188;3188;3188;1185;1185;
+3189;3189;3189;1188;1188;
+318A;318A;318A;1191;1191;
+318B;318B;318B;1192;1192;
+318C;318C;318C;1194;1194;
+318D;318D;318D;119E;119E;
+318E;318E;318E;11A1;11A1;
+3192;3192;3192;4E00;4E00;
+3193;3193;3193;4E8C;4E8C;
+3194;3194;3194;4E09;4E09;
+3195;3195;3195;56DB;56DB;
+3196;3196;3196;4E0A;4E0A;
+3197;3197;3197;4E2D;4E2D;
+3198;3198;3198;4E0B;4E0B;
+3199;3199;3199;7532;7532;
+319A;319A;319A;4E59;4E59;
+319B;319B;319B;4E19;4E19;
+319C;319C;319C;4E01;4E01;
+319D;319D;319D;5929;5929;
+319E;319E;319E;5730;5730;
+319F;319F;319F;4EBA;4EBA;
+3200;3200;3200;0028 1100 0029;0028 1100 0029;
+3201;3201;3201;0028 1102 0029;0028 1102 0029;
+3202;3202;3202;0028 1103 0029;0028 1103 0029;
+3203;3203;3203;0028 1105 0029;0028 1105 0029;
+3204;3204;3204;0028 1106 0029;0028 1106 0029;
+3205;3205;3205;0028 1107 0029;0028 1107 0029;
+3206;3206;3206;0028 1109 0029;0028 1109 0029;
+3207;3207;3207;0028 110B 0029;0028 110B 0029;
+3208;3208;3208;0028 110C 0029;0028 110C 0029;
+3209;3209;3209;0028 110E 0029;0028 110E 0029;
+320A;320A;320A;0028 110F 0029;0028 110F 0029;
+320B;320B;320B;0028 1110 0029;0028 1110 0029;
+320C;320C;320C;0028 1111 0029;0028 1111 0029;
+320D;320D;320D;0028 1112 0029;0028 1112 0029;
+320E;320E;320E;0028 AC00 0029;0028 1100 1161 0029;
+320F;320F;320F;0028 B098 0029;0028 1102 1161 0029;
+3210;3210;3210;0028 B2E4 0029;0028 1103 1161 0029;
+3211;3211;3211;0028 B77C 0029;0028 1105 1161 0029;
+3212;3212;3212;0028 B9C8 0029;0028 1106 1161 0029;
+3213;3213;3213;0028 BC14 0029;0028 1107 1161 0029;
+3214;3214;3214;0028 C0AC 0029;0028 1109 1161 0029;
+3215;3215;3215;0028 C544 0029;0028 110B 1161 0029;
+3216;3216;3216;0028 C790 0029;0028 110C 1161 0029;
+3217;3217;3217;0028 CC28 0029;0028 110E 1161 0029;
+3218;3218;3218;0028 CE74 0029;0028 110F 1161 0029;
+3219;3219;3219;0028 D0C0 0029;0028 1110 1161 0029;
+321A;321A;321A;0028 D30C 0029;0028 1111 1161 0029;
+321B;321B;321B;0028 D558 0029;0028 1112 1161 0029;
+321C;321C;321C;0028 C8FC 0029;0028 110C 116E 0029;
+3220;3220;3220;0028 4E00 0029;0028 4E00 0029;
+3221;3221;3221;0028 4E8C 0029;0028 4E8C 0029;
+3222;3222;3222;0028 4E09 0029;0028 4E09 0029;
+3223;3223;3223;0028 56DB 0029;0028 56DB 0029;
+3224;3224;3224;0028 4E94 0029;0028 4E94 0029;
+3225;3225;3225;0028 516D 0029;0028 516D 0029;
+3226;3226;3226;0028 4E03 0029;0028 4E03 0029;
+3227;3227;3227;0028 516B 0029;0028 516B 0029;
+3228;3228;3228;0028 4E5D 0029;0028 4E5D 0029;
+3229;3229;3229;0028 5341 0029;0028 5341 0029;
+322A;322A;322A;0028 6708 0029;0028 6708 0029;
+322B;322B;322B;0028 706B 0029;0028 706B 0029;
+322C;322C;322C;0028 6C34 0029;0028 6C34 0029;
+322D;322D;322D;0028 6728 0029;0028 6728 0029;
+322E;322E;322E;0028 91D1 0029;0028 91D1 0029;
+322F;322F;322F;0028 571F 0029;0028 571F 0029;
+3230;3230;3230;0028 65E5 0029;0028 65E5 0029;
+3231;3231;3231;0028 682A 0029;0028 682A 0029;
+3232;3232;3232;0028 6709 0029;0028 6709 0029;
+3233;3233;3233;0028 793E 0029;0028 793E 0029;
+3234;3234;3234;0028 540D 0029;0028 540D 0029;
+3235;3235;3235;0028 7279 0029;0028 7279 0029;
+3236;3236;3236;0028 8CA1 0029;0028 8CA1 0029;
+3237;3237;3237;0028 795D 0029;0028 795D 0029;
+3238;3238;3238;0028 52B4 0029;0028 52B4 0029;
+3239;3239;3239;0028 4EE3 0029;0028 4EE3 0029;
+323A;323A;323A;0028 547C 0029;0028 547C 0029;
+323B;323B;323B;0028 5B66 0029;0028 5B66 0029;
+323C;323C;323C;0028 76E3 0029;0028 76E3 0029;
+323D;323D;323D;0028 4F01 0029;0028 4F01 0029;
+323E;323E;323E;0028 8CC7 0029;0028 8CC7 0029;
+323F;323F;323F;0028 5354 0029;0028 5354 0029;
+3240;3240;3240;0028 796D 0029;0028 796D 0029;
+3241;3241;3241;0028 4F11 0029;0028 4F11 0029;
+3242;3242;3242;0028 81EA 0029;0028 81EA 0029;
+3243;3243;3243;0028 81F3 0029;0028 81F3 0029;
+3251;3251;3251;0032 0031;0032 0031;
+3252;3252;3252;0032 0032;0032 0032;
+3253;3253;3253;0032 0033;0032 0033;
+3254;3254;3254;0032 0034;0032 0034;
+3255;3255;3255;0032 0035;0032 0035;
+3256;3256;3256;0032 0036;0032 0036;
+3257;3257;3257;0032 0037;0032 0037;
+3258;3258;3258;0032 0038;0032 0038;
+3259;3259;3259;0032 0039;0032 0039;
+325A;325A;325A;0033 0030;0033 0030;
+325B;325B;325B;0033 0031;0033 0031;
+325C;325C;325C;0033 0032;0033 0032;
+325D;325D;325D;0033 0033;0033 0033;
+325E;325E;325E;0033 0034;0033 0034;
+325F;325F;325F;0033 0035;0033 0035;
+3260;3260;3260;1100;1100;
+3261;3261;3261;1102;1102;
+3262;3262;3262;1103;1103;
+3263;3263;3263;1105;1105;
+3264;3264;3264;1106;1106;
+3265;3265;3265;1107;1107;
+3266;3266;3266;1109;1109;
+3267;3267;3267;110B;110B;
+3268;3268;3268;110C;110C;
+3269;3269;3269;110E;110E;
+326A;326A;326A;110F;110F;
+326B;326B;326B;1110;1110;
+326C;326C;326C;1111;1111;
+326D;326D;326D;1112;1112;
+326E;326E;326E;AC00;1100 1161;
+326F;326F;326F;B098;1102 1161;
+3270;3270;3270;B2E4;1103 1161;
+3271;3271;3271;B77C;1105 1161;
+3272;3272;3272;B9C8;1106 1161;
+3273;3273;3273;BC14;1107 1161;
+3274;3274;3274;C0AC;1109 1161;
+3275;3275;3275;C544;110B 1161;
+3276;3276;3276;C790;110C 1161;
+3277;3277;3277;CC28;110E 1161;
+3278;3278;3278;CE74;110F 1161;
+3279;3279;3279;D0C0;1110 1161;
+327A;327A;327A;D30C;1111 1161;
+327B;327B;327B;D558;1112 1161;
+3280;3280;3280;4E00;4E00;
+3281;3281;3281;4E8C;4E8C;
+3282;3282;3282;4E09;4E09;
+3283;3283;3283;56DB;56DB;
+3284;3284;3284;4E94;4E94;
+3285;3285;3285;516D;516D;
+3286;3286;3286;4E03;4E03;
+3287;3287;3287;516B;516B;
+3288;3288;3288;4E5D;4E5D;
+3289;3289;3289;5341;5341;
+328A;328A;328A;6708;6708;
+328B;328B;328B;706B;706B;
+328C;328C;328C;6C34;6C34;
+328D;328D;328D;6728;6728;
+328E;328E;328E;91D1;91D1;
+328F;328F;328F;571F;571F;
+3290;3290;3290;65E5;65E5;
+3291;3291;3291;682A;682A;
+3292;3292;3292;6709;6709;
+3293;3293;3293;793E;793E;
+3294;3294;3294;540D;540D;
+3295;3295;3295;7279;7279;
+3296;3296;3296;8CA1;8CA1;
+3297;3297;3297;795D;795D;
+3298;3298;3298;52B4;52B4;
+3299;3299;3299;79D8;79D8;
+329A;329A;329A;7537;7537;
+329B;329B;329B;5973;5973;
+329C;329C;329C;9069;9069;
+329D;329D;329D;512A;512A;
+329E;329E;329E;5370;5370;
+329F;329F;329F;6CE8;6CE8;
+32A0;32A0;32A0;9805;9805;
+32A1;32A1;32A1;4F11;4F11;
+32A2;32A2;32A2;5199;5199;
+32A3;32A3;32A3;6B63;6B63;
+32A4;32A4;32A4;4E0A;4E0A;
+32A5;32A5;32A5;4E2D;4E2D;
+32A6;32A6;32A6;4E0B;4E0B;
+32A7;32A7;32A7;5DE6;5DE6;
+32A8;32A8;32A8;53F3;53F3;
+32A9;32A9;32A9;533B;533B;
+32AA;32AA;32AA;5B97;5B97;
+32AB;32AB;32AB;5B66;5B66;
+32AC;32AC;32AC;76E3;76E3;
+32AD;32AD;32AD;4F01;4F01;
+32AE;32AE;32AE;8CC7;8CC7;
+32AF;32AF;32AF;5354;5354;
+32B0;32B0;32B0;591C;591C;
+32B1;32B1;32B1;0033 0036;0033 0036;
+32B2;32B2;32B2;0033 0037;0033 0037;
+32B3;32B3;32B3;0033 0038;0033 0038;
+32B4;32B4;32B4;0033 0039;0033 0039;
+32B5;32B5;32B5;0034 0030;0034 0030;
+32B6;32B6;32B6;0034 0031;0034 0031;
+32B7;32B7;32B7;0034 0032;0034 0032;
+32B8;32B8;32B8;0034 0033;0034 0033;
+32B9;32B9;32B9;0034 0034;0034 0034;
+32BA;32BA;32BA;0034 0035;0034 0035;
+32BB;32BB;32BB;0034 0036;0034 0036;
+32BC;32BC;32BC;0034 0037;0034 0037;
+32BD;32BD;32BD;0034 0038;0034 0038;
+32BE;32BE;32BE;0034 0039;0034 0039;
+32BF;32BF;32BF;0035 0030;0035 0030;
+32C0;32C0;32C0;0031 6708;0031 6708;
+32C1;32C1;32C1;0032 6708;0032 6708;
+32C2;32C2;32C2;0033 6708;0033 6708;
+32C3;32C3;32C3;0034 6708;0034 6708;
+32C4;32C4;32C4;0035 6708;0035 6708;
+32C5;32C5;32C5;0036 6708;0036 6708;
+32C6;32C6;32C6;0037 6708;0037 6708;
+32C7;32C7;32C7;0038 6708;0038 6708;
+32C8;32C8;32C8;0039 6708;0039 6708;
+32C9;32C9;32C9;0031 0030 6708;0031 0030 6708;
+32CA;32CA;32CA;0031 0031 6708;0031 0031 6708;
+32CB;32CB;32CB;0031 0032 6708;0031 0032 6708;
+32D0;32D0;32D0;30A2;30A2;
+32D1;32D1;32D1;30A4;30A4;
+32D2;32D2;32D2;30A6;30A6;
+32D3;32D3;32D3;30A8;30A8;
+32D4;32D4;32D4;30AA;30AA;
+32D5;32D5;32D5;30AB;30AB;
+32D6;32D6;32D6;30AD;30AD;
+32D7;32D7;32D7;30AF;30AF;
+32D8;32D8;32D8;30B1;30B1;
+32D9;32D9;32D9;30B3;30B3;
+32DA;32DA;32DA;30B5;30B5;
+32DB;32DB;32DB;30B7;30B7;
+32DC;32DC;32DC;30B9;30B9;
+32DD;32DD;32DD;30BB;30BB;
+32DE;32DE;32DE;30BD;30BD;
+32DF;32DF;32DF;30BF;30BF;
+32E0;32E0;32E0;30C1;30C1;
+32E1;32E1;32E1;30C4;30C4;
+32E2;32E2;32E2;30C6;30C6;
+32E3;32E3;32E3;30C8;30C8;
+32E4;32E4;32E4;30CA;30CA;
+32E5;32E5;32E5;30CB;30CB;
+32E6;32E6;32E6;30CC;30CC;
+32E7;32E7;32E7;30CD;30CD;
+32E8;32E8;32E8;30CE;30CE;
+32E9;32E9;32E9;30CF;30CF;
+32EA;32EA;32EA;30D2;30D2;
+32EB;32EB;32EB;30D5;30D5;
+32EC;32EC;32EC;30D8;30D8;
+32ED;32ED;32ED;30DB;30DB;
+32EE;32EE;32EE;30DE;30DE;
+32EF;32EF;32EF;30DF;30DF;
+32F0;32F0;32F0;30E0;30E0;
+32F1;32F1;32F1;30E1;30E1;
+32F2;32F2;32F2;30E2;30E2;
+32F3;32F3;32F3;30E4;30E4;
+32F4;32F4;32F4;30E6;30E6;
+32F5;32F5;32F5;30E8;30E8;
+32F6;32F6;32F6;30E9;30E9;
+32F7;32F7;32F7;30EA;30EA;
+32F8;32F8;32F8;30EB;30EB;
+32F9;32F9;32F9;30EC;30EC;
+32FA;32FA;32FA;30ED;30ED;
+32FB;32FB;32FB;30EF;30EF;
+32FC;32FC;32FC;30F0;30F0;
+32FD;32FD;32FD;30F1;30F1;
+32FE;32FE;32FE;30F2;30F2;
+3300;3300;3300;30A2 30D1 30FC 30C8;30A2 30CF 309A 30FC 30C8;
+3301;3301;3301;30A2 30EB 30D5 30A1;30A2 30EB 30D5 30A1;
+3302;3302;3302;30A2 30F3 30DA 30A2;30A2 30F3 30D8 309A 30A2;
+3303;3303;3303;30A2 30FC 30EB;30A2 30FC 30EB;
+3304;3304;3304;30A4 30CB 30F3 30B0;30A4 30CB 30F3 30AF 3099;
+3305;3305;3305;30A4 30F3 30C1;30A4 30F3 30C1;
+3306;3306;3306;30A6 30A9 30F3;30A6 30A9 30F3;
+3307;3307;3307;30A8 30B9 30AF 30FC 30C9;30A8 30B9 30AF 30FC 30C8 3099;
+3308;3308;3308;30A8 30FC 30AB 30FC;30A8 30FC 30AB 30FC;
+3309;3309;3309;30AA 30F3 30B9;30AA 30F3 30B9;
+330A;330A;330A;30AA 30FC 30E0;30AA 30FC 30E0;
+330B;330B;330B;30AB 30A4 30EA;30AB 30A4 30EA;
+330C;330C;330C;30AB 30E9 30C3 30C8;30AB 30E9 30C3 30C8;
+330D;330D;330D;30AB 30ED 30EA 30FC;30AB 30ED 30EA 30FC;
+330E;330E;330E;30AC 30ED 30F3;30AB 3099 30ED 30F3;
+330F;330F;330F;30AC 30F3 30DE;30AB 3099 30F3 30DE;
+3310;3310;3310;30AE 30AC;30AD 3099 30AB 3099;
+3311;3311;3311;30AE 30CB 30FC;30AD 3099 30CB 30FC;
+3312;3312;3312;30AD 30E5 30EA 30FC;30AD 30E5 30EA 30FC;
+3313;3313;3313;30AE 30EB 30C0 30FC;30AD 3099 30EB 30BF 3099 30FC;
+3314;3314;3314;30AD 30ED;30AD 30ED;
+3315;3315;3315;30AD 30ED 30B0 30E9 30E0;30AD 30ED 30AF 3099 30E9 30E0;
+3316;3316;3316;30AD 30ED 30E1 30FC 30C8 30EB;30AD 30ED 30E1 30FC 30C8 30EB;
+3317;3317;3317;30AD 30ED 30EF 30C3 30C8;30AD 30ED 30EF 30C3 30C8;
+3318;3318;3318;30B0 30E9 30E0;30AF 3099 30E9 30E0;
+3319;3319;3319;30B0 30E9 30E0 30C8 30F3;30AF 3099 30E9 30E0 30C8 30F3;
+331A;331A;331A;30AF 30EB 30BC 30A4 30ED;30AF 30EB 30BB 3099 30A4 30ED;
+331B;331B;331B;30AF 30ED 30FC 30CD;30AF 30ED 30FC 30CD;
+331C;331C;331C;30B1 30FC 30B9;30B1 30FC 30B9;
+331D;331D;331D;30B3 30EB 30CA;30B3 30EB 30CA;
+331E;331E;331E;30B3 30FC 30DD;30B3 30FC 30DB 309A;
+331F;331F;331F;30B5 30A4 30AF 30EB;30B5 30A4 30AF 30EB;
+3320;3320;3320;30B5 30F3 30C1 30FC 30E0;30B5 30F3 30C1 30FC 30E0;
+3321;3321;3321;30B7 30EA 30F3 30B0;30B7 30EA 30F3 30AF 3099;
+3322;3322;3322;30BB 30F3 30C1;30BB 30F3 30C1;
+3323;3323;3323;30BB 30F3 30C8;30BB 30F3 30C8;
+3324;3324;3324;30C0 30FC 30B9;30BF 3099 30FC 30B9;
+3325;3325;3325;30C7 30B7;30C6 3099 30B7;
+3326;3326;3326;30C9 30EB;30C8 3099 30EB;
+3327;3327;3327;30C8 30F3;30C8 30F3;
+3328;3328;3328;30CA 30CE;30CA 30CE;
+3329;3329;3329;30CE 30C3 30C8;30CE 30C3 30C8;
+332A;332A;332A;30CF 30A4 30C4;30CF 30A4 30C4;
+332B;332B;332B;30D1 30FC 30BB 30F3 30C8;30CF 309A 30FC 30BB 30F3 30C8;
+332C;332C;332C;30D1 30FC 30C4;30CF 309A 30FC 30C4;
+332D;332D;332D;30D0 30FC 30EC 30EB;30CF 3099 30FC 30EC 30EB;
+332E;332E;332E;30D4 30A2 30B9 30C8 30EB;30D2 309A 30A2 30B9 30C8 30EB;
+332F;332F;332F;30D4 30AF 30EB;30D2 309A 30AF 30EB;
+3330;3330;3330;30D4 30B3;30D2 309A 30B3;
+3331;3331;3331;30D3 30EB;30D2 3099 30EB;
+3332;3332;3332;30D5 30A1 30E9 30C3 30C9;30D5 30A1 30E9 30C3 30C8 3099;
+3333;3333;3333;30D5 30A3 30FC 30C8;30D5 30A3 30FC 30C8;
+3334;3334;3334;30D6 30C3 30B7 30A7 30EB;30D5 3099 30C3 30B7 30A7 30EB;
+3335;3335;3335;30D5 30E9 30F3;30D5 30E9 30F3;
+3336;3336;3336;30D8 30AF 30BF 30FC 30EB;30D8 30AF 30BF 30FC 30EB;
+3337;3337;3337;30DA 30BD;30D8 309A 30BD;
+3338;3338;3338;30DA 30CB 30D2;30D8 309A 30CB 30D2;
+3339;3339;3339;30D8 30EB 30C4;30D8 30EB 30C4;
+333A;333A;333A;30DA 30F3 30B9;30D8 309A 30F3 30B9;
+333B;333B;333B;30DA 30FC 30B8;30D8 309A 30FC 30B7 3099;
+333C;333C;333C;30D9 30FC 30BF;30D8 3099 30FC 30BF;
+333D;333D;333D;30DD 30A4 30F3 30C8;30DB 309A 30A4 30F3 30C8;
+333E;333E;333E;30DC 30EB 30C8;30DB 3099 30EB 30C8;
+333F;333F;333F;30DB 30F3;30DB 30F3;
+3340;3340;3340;30DD 30F3 30C9;30DB 309A 30F3 30C8 3099;
+3341;3341;3341;30DB 30FC 30EB;30DB 30FC 30EB;
+3342;3342;3342;30DB 30FC 30F3;30DB 30FC 30F3;
+3343;3343;3343;30DE 30A4 30AF 30ED;30DE 30A4 30AF 30ED;
+3344;3344;3344;30DE 30A4 30EB;30DE 30A4 30EB;
+3345;3345;3345;30DE 30C3 30CF;30DE 30C3 30CF;
+3346;3346;3346;30DE 30EB 30AF;30DE 30EB 30AF;
+3347;3347;3347;30DE 30F3 30B7 30E7 30F3;30DE 30F3 30B7 30E7 30F3;
+3348;3348;3348;30DF 30AF 30ED 30F3;30DF 30AF 30ED 30F3;
+3349;3349;3349;30DF 30EA;30DF 30EA;
+334A;334A;334A;30DF 30EA 30D0 30FC 30EB;30DF 30EA 30CF 3099 30FC 30EB;
+334B;334B;334B;30E1 30AC;30E1 30AB 3099;
+334C;334C;334C;30E1 30AC 30C8 30F3;30E1 30AB 3099 30C8 30F3;
+334D;334D;334D;30E1 30FC 30C8 30EB;30E1 30FC 30C8 30EB;
+334E;334E;334E;30E4 30FC 30C9;30E4 30FC 30C8 3099;
+334F;334F;334F;30E4 30FC 30EB;30E4 30FC 30EB;
+3350;3350;3350;30E6 30A2 30F3;30E6 30A2 30F3;
+3351;3351;3351;30EA 30C3 30C8 30EB;30EA 30C3 30C8 30EB;
+3352;3352;3352;30EA 30E9;30EA 30E9;
+3353;3353;3353;30EB 30D4 30FC;30EB 30D2 309A 30FC;
+3354;3354;3354;30EB 30FC 30D6 30EB;30EB 30FC 30D5 3099 30EB;
+3355;3355;3355;30EC 30E0;30EC 30E0;
+3356;3356;3356;30EC 30F3 30C8 30B2 30F3;30EC 30F3 30C8 30B1 3099 30F3;
+3357;3357;3357;30EF 30C3 30C8;30EF 30C3 30C8;
+3358;3358;3358;0030 70B9;0030 70B9;
+3359;3359;3359;0031 70B9;0031 70B9;
+335A;335A;335A;0032 70B9;0032 70B9;
+335B;335B;335B;0033 70B9;0033 70B9;
+335C;335C;335C;0034 70B9;0034 70B9;
+335D;335D;335D;0035 70B9;0035 70B9;
+335E;335E;335E;0036 70B9;0036 70B9;
+335F;335F;335F;0037 70B9;0037 70B9;
+3360;3360;3360;0038 70B9;0038 70B9;
+3361;3361;3361;0039 70B9;0039 70B9;
+3362;3362;3362;0031 0030 70B9;0031 0030 70B9;
+3363;3363;3363;0031 0031 70B9;0031 0031 70B9;
+3364;3364;3364;0031 0032 70B9;0031 0032 70B9;
+3365;3365;3365;0031 0033 70B9;0031 0033 70B9;
+3366;3366;3366;0031 0034 70B9;0031 0034 70B9;
+3367;3367;3367;0031 0035 70B9;0031 0035 70B9;
+3368;3368;3368;0031 0036 70B9;0031 0036 70B9;
+3369;3369;3369;0031 0037 70B9;0031 0037 70B9;
+336A;336A;336A;0031 0038 70B9;0031 0038 70B9;
+336B;336B;336B;0031 0039 70B9;0031 0039 70B9;
+336C;336C;336C;0032 0030 70B9;0032 0030 70B9;
+336D;336D;336D;0032 0031 70B9;0032 0031 70B9;
+336E;336E;336E;0032 0032 70B9;0032 0032 70B9;
+336F;336F;336F;0032 0033 70B9;0032 0033 70B9;
+3370;3370;3370;0032 0034 70B9;0032 0034 70B9;
+3371;3371;3371;0068 0050 0061;0068 0050 0061;
+3372;3372;3372;0064 0061;0064 0061;
+3373;3373;3373;0041 0055;0041 0055;
+3374;3374;3374;0062 0061 0072;0062 0061 0072;
+3375;3375;3375;006F 0056;006F 0056;
+3376;3376;3376;0070 0063;0070 0063;
+337B;337B;337B;5E73 6210;5E73 6210;
+337C;337C;337C;662D 548C;662D 548C;
+337D;337D;337D;5927 6B63;5927 6B63;
+337E;337E;337E;660E 6CBB;660E 6CBB;
+337F;337F;337F;682A 5F0F 4F1A 793E;682A 5F0F 4F1A 793E;
+3380;3380;3380;0070 0041;0070 0041;
+3381;3381;3381;006E 0041;006E 0041;
+3382;3382;3382;03BC 0041;03BC 0041;
+3383;3383;3383;006D 0041;006D 0041;
+3384;3384;3384;006B 0041;006B 0041;
+3385;3385;3385;004B 0042;004B 0042;
+3386;3386;3386;004D 0042;004D 0042;
+3387;3387;3387;0047 0042;0047 0042;
+3388;3388;3388;0063 0061 006C;0063 0061 006C;
+3389;3389;3389;006B 0063 0061 006C;006B 0063 0061 006C;
+338A;338A;338A;0070 0046;0070 0046;
+338B;338B;338B;006E 0046;006E 0046;
+338C;338C;338C;03BC 0046;03BC 0046;
+338D;338D;338D;03BC 0067;03BC 0067;
+338E;338E;338E;006D 0067;006D 0067;
+338F;338F;338F;006B 0067;006B 0067;
+3390;3390;3390;0048 007A;0048 007A;
+3391;3391;3391;006B 0048 007A;006B 0048 007A;
+3392;3392;3392;004D 0048 007A;004D 0048 007A;
+3393;3393;3393;0047 0048 007A;0047 0048 007A;
+3394;3394;3394;0054 0048 007A;0054 0048 007A;
+3395;3395;3395;03BC 006C;03BC 006C;
+3396;3396;3396;006D 006C;006D 006C;
+3397;3397;3397;0064 006C;0064 006C;
+3398;3398;3398;006B 006C;006B 006C;
+3399;3399;3399;0066 006D;0066 006D;
+339A;339A;339A;006E 006D;006E 006D;
+339B;339B;339B;03BC 006D;03BC 006D;
+339C;339C;339C;006D 006D;006D 006D;
+339D;339D;339D;0063 006D;0063 006D;
+339E;339E;339E;006B 006D;006B 006D;
+339F;339F;339F;006D 006D 0032;006D 006D 0032;
+33A0;33A0;33A0;0063 006D 0032;0063 006D 0032;
+33A1;33A1;33A1;006D 0032;006D 0032;
+33A2;33A2;33A2;006B 006D 0032;006B 006D 0032;
+33A3;33A3;33A3;006D 006D 0033;006D 006D 0033;
+33A4;33A4;33A4;0063 006D 0033;0063 006D 0033;
+33A5;33A5;33A5;006D 0033;006D 0033;
+33A6;33A6;33A6;006B 006D 0033;006B 006D 0033;
+33A7;33A7;33A7;006D 2215 0073;006D 2215 0073;
+33A8;33A8;33A8;006D 2215 0073 0032;006D 2215 0073 0032;
+33A9;33A9;33A9;0050 0061;0050 0061;
+33AA;33AA;33AA;006B 0050 0061;006B 0050 0061;
+33AB;33AB;33AB;004D 0050 0061;004D 0050 0061;
+33AC;33AC;33AC;0047 0050 0061;0047 0050 0061;
+33AD;33AD;33AD;0072 0061 0064;0072 0061 0064;
+33AE;33AE;33AE;0072 0061 0064 2215 0073;0072 0061 0064 2215 0073;
+33AF;33AF;33AF;0072 0061 0064 2215 0073 0032;0072 0061 0064 2215 0073 0032;
+33B0;33B0;33B0;0070 0073;0070 0073;
+33B1;33B1;33B1;006E 0073;006E 0073;
+33B2;33B2;33B2;03BC 0073;03BC 0073;
+33B3;33B3;33B3;006D 0073;006D 0073;
+33B4;33B4;33B4;0070 0056;0070 0056;
+33B5;33B5;33B5;006E 0056;006E 0056;
+33B6;33B6;33B6;03BC 0056;03BC 0056;
+33B7;33B7;33B7;006D 0056;006D 0056;
+33B8;33B8;33B8;006B 0056;006B 0056;
+33B9;33B9;33B9;004D 0056;004D 0056;
+33BA;33BA;33BA;0070 0057;0070 0057;
+33BB;33BB;33BB;006E 0057;006E 0057;
+33BC;33BC;33BC;03BC 0057;03BC 0057;
+33BD;33BD;33BD;006D 0057;006D 0057;
+33BE;33BE;33BE;006B 0057;006B 0057;
+33BF;33BF;33BF;004D 0057;004D 0057;
+33C0;33C0;33C0;006B 03A9;006B 03A9;
+33C1;33C1;33C1;004D 03A9;004D 03A9;
+33C2;33C2;33C2;0061 002E 006D 002E;0061 002E 006D 002E;
+33C3;33C3;33C3;0042 0071;0042 0071;
+33C4;33C4;33C4;0063 0063;0063 0063;
+33C5;33C5;33C5;0063 0064;0063 0064;
+33C6;33C6;33C6;0043 2215 006B 0067;0043 2215 006B 0067;
+33C7;33C7;33C7;0043 006F 002E;0043 006F 002E;
+33C8;33C8;33C8;0064 0042;0064 0042;
+33C9;33C9;33C9;0047 0079;0047 0079;
+33CA;33CA;33CA;0068 0061;0068 0061;
+33CB;33CB;33CB;0048 0050;0048 0050;
+33CC;33CC;33CC;0069 006E;0069 006E;
+33CD;33CD;33CD;004B 004B;004B 004B;
+33CE;33CE;33CE;004B 004D;004B 004D;
+33CF;33CF;33CF;006B 0074;006B 0074;
+33D0;33D0;33D0;006C 006D;006C 006D;
+33D1;33D1;33D1;006C 006E;006C 006E;
+33D2;33D2;33D2;006C 006F 0067;006C 006F 0067;
+33D3;33D3;33D3;006C 0078;006C 0078;
+33D4;33D4;33D4;006D 0062;006D 0062;
+33D5;33D5;33D5;006D 0069 006C;006D 0069 006C;
+33D6;33D6;33D6;006D 006F 006C;006D 006F 006C;
+33D7;33D7;33D7;0050 0048;0050 0048;
+33D8;33D8;33D8;0070 002E 006D 002E;0070 002E 006D 002E;
+33D9;33D9;33D9;0050 0050 004D;0050 0050 004D;
+33DA;33DA;33DA;0050 0052;0050 0052;
+33DB;33DB;33DB;0073 0072;0073 0072;
+33DC;33DC;33DC;0053 0076;0053 0076;
+33DD;33DD;33DD;0057 0062;0057 0062;
+33E0;33E0;33E0;0031 65E5;0031 65E5;
+33E1;33E1;33E1;0032 65E5;0032 65E5;
+33E2;33E2;33E2;0033 65E5;0033 65E5;
+33E3;33E3;33E3;0034 65E5;0034 65E5;
+33E4;33E4;33E4;0035 65E5;0035 65E5;
+33E5;33E5;33E5;0036 65E5;0036 65E5;
+33E6;33E6;33E6;0037 65E5;0037 65E5;
+33E7;33E7;33E7;0038 65E5;0038 65E5;
+33E8;33E8;33E8;0039 65E5;0039 65E5;
+33E9;33E9;33E9;0031 0030 65E5;0031 0030 65E5;
+33EA;33EA;33EA;0031 0031 65E5;0031 0031 65E5;
+33EB;33EB;33EB;0031 0032 65E5;0031 0032 65E5;
+33EC;33EC;33EC;0031 0033 65E5;0031 0033 65E5;
+33ED;33ED;33ED;0031 0034 65E5;0031 0034 65E5;
+33EE;33EE;33EE;0031 0035 65E5;0031 0035 65E5;
+33EF;33EF;33EF;0031 0036 65E5;0031 0036 65E5;
+33F0;33F0;33F0;0031 0037 65E5;0031 0037 65E5;
+33F1;33F1;33F1;0031 0038 65E5;0031 0038 65E5;
+33F2;33F2;33F2;0031 0039 65E5;0031 0039 65E5;
+33F3;33F3;33F3;0032 0030 65E5;0032 0030 65E5;
+33F4;33F4;33F4;0032 0031 65E5;0032 0031 65E5;
+33F5;33F5;33F5;0032 0032 65E5;0032 0032 65E5;
+33F6;33F6;33F6;0032 0033 65E5;0032 0033 65E5;
+33F7;33F7;33F7;0032 0034 65E5;0032 0034 65E5;
+33F8;33F8;33F8;0032 0035 65E5;0032 0035 65E5;
+33F9;33F9;33F9;0032 0036 65E5;0032 0036 65E5;
+33FA;33FA;33FA;0032 0037 65E5;0032 0037 65E5;
+33FB;33FB;33FB;0032 0038 65E5;0032 0038 65E5;
+33FC;33FC;33FC;0032 0039 65E5;0032 0039 65E5;
+33FD;33FD;33FD;0033 0030 65E5;0033 0030 65E5;
+33FE;33FE;33FE;0033 0031 65E5;0033 0031 65E5;
+AC00;AC00;1100 1161;AC00;1100 1161;
+AC01;AC01;1100 1161 11A8;AC01;1100 1161 11A8;
+AC02;AC02;1100 1161 11A9;AC02;1100 1161 11A9;
+AC03;AC03;1100 1161 11AA;AC03;1100 1161 11AA;
+AC04;AC04;1100 1161 11AB;AC04;1100 1161 11AB;
+AC05;AC05;1100 1161 11AC;AC05;1100 1161 11AC;
+AC06;AC06;1100 1161 11AD;AC06;1100 1161 11AD;
+AC07;AC07;1100 1161 11AE;AC07;1100 1161 11AE;
+AC08;AC08;1100 1161 11AF;AC08;1100 1161 11AF;
+AC09;AC09;1100 1161 11B0;AC09;1100 1161 11B0;
+AC0A;AC0A;1100 1161 11B1;AC0A;1100 1161 11B1;
+AC0B;AC0B;1100 1161 11B2;AC0B;1100 1161 11B2;
+AC0C;AC0C;1100 1161 11B3;AC0C;1100 1161 11B3;
+AC0D;AC0D;1100 1161 11B4;AC0D;1100 1161 11B4;
+AC0E;AC0E;1100 1161 11B5;AC0E;1100 1161 11B5;
+AC0F;AC0F;1100 1161 11B6;AC0F;1100 1161 11B6;
+AC10;AC10;1100 1161 11B7;AC10;1100 1161 11B7;
+AC11;AC11;1100 1161 11B8;AC11;1100 1161 11B8;
+AC12;AC12;1100 1161 11B9;AC12;1100 1161 11B9;
+AC13;AC13;1100 1161 11BA;AC13;1100 1161 11BA;
+AC14;AC14;1100 1161 11BB;AC14;1100 1161 11BB;
+AC15;AC15;1100 1161 11BC;AC15;1100 1161 11BC;
+AC16;AC16;1100 1161 11BD;AC16;1100 1161 11BD;
+AC17;AC17;1100 1161 11BE;AC17;1100 1161 11BE;
+AC18;AC18;1100 1161 11BF;AC18;1100 1161 11BF;
+AC19;AC19;1100 1161 11C0;AC19;1100 1161 11C0;
+AC1A;AC1A;1100 1161 11C1;AC1A;1100 1161 11C1;
+AC1B;AC1B;1100 1161 11C2;AC1B;1100 1161 11C2;
+AC1C;AC1C;1100 1162;AC1C;1100 1162;
+AC1D;AC1D;1100 1162 11A8;AC1D;1100 1162 11A8;
+AC1E;AC1E;1100 1162 11A9;AC1E;1100 1162 11A9;
+AC1F;AC1F;1100 1162 11AA;AC1F;1100 1162 11AA;
+AC20;AC20;1100 1162 11AB;AC20;1100 1162 11AB;
+AC21;AC21;1100 1162 11AC;AC21;1100 1162 11AC;
+AC22;AC22;1100 1162 11AD;AC22;1100 1162 11AD;
+AC23;AC23;1100 1162 11AE;AC23;1100 1162 11AE;
+AC24;AC24;1100 1162 11AF;AC24;1100 1162 11AF;
+AC25;AC25;1100 1162 11B0;AC25;1100 1162 11B0;
+AC26;AC26;1100 1162 11B1;AC26;1100 1162 11B1;
+AC27;AC27;1100 1162 11B2;AC27;1100 1162 11B2;
+AC28;AC28;1100 1162 11B3;AC28;1100 1162 11B3;
+AC29;AC29;1100 1162 11B4;AC29;1100 1162 11B4;
+AC2A;AC2A;1100 1162 11B5;AC2A;1100 1162 11B5;
+AC2B;AC2B;1100 1162 11B6;AC2B;1100 1162 11B6;
+AC2C;AC2C;1100 1162 11B7;AC2C;1100 1162 11B7;
+AC2D;AC2D;1100 1162 11B8;AC2D;1100 1162 11B8;
+AC2E;AC2E;1100 1162 11B9;AC2E;1100 1162 11B9;
+AC2F;AC2F;1100 1162 11BA;AC2F;1100 1162 11BA;
+AC30;AC30;1100 1162 11BB;AC30;1100 1162 11BB;
+AC31;AC31;1100 1162 11BC;AC31;1100 1162 11BC;
+AC32;AC32;1100 1162 11BD;AC32;1100 1162 11BD;
+AC33;AC33;1100 1162 11BE;AC33;1100 1162 11BE;
+AC34;AC34;1100 1162 11BF;AC34;1100 1162 11BF;
+AC35;AC35;1100 1162 11C0;AC35;1100 1162 11C0;
+AC36;AC36;1100 1162 11C1;AC36;1100 1162 11C1;
+AC37;AC37;1100 1162 11C2;AC37;1100 1162 11C2;
+AC38;AC38;1100 1163;AC38;1100 1163;
+AC39;AC39;1100 1163 11A8;AC39;1100 1163 11A8;
+AC3A;AC3A;1100 1163 11A9;AC3A;1100 1163 11A9;
+AC3B;AC3B;1100 1163 11AA;AC3B;1100 1163 11AA;
+AC3C;AC3C;1100 1163 11AB;AC3C;1100 1163 11AB;
+AC3D;AC3D;1100 1163 11AC;AC3D;1100 1163 11AC;
+AC3E;AC3E;1100 1163 11AD;AC3E;1100 1163 11AD;
+AC3F;AC3F;1100 1163 11AE;AC3F;1100 1163 11AE;
+AC40;AC40;1100 1163 11AF;AC40;1100 1163 11AF;
+AC41;AC41;1100 1163 11B0;AC41;1100 1163 11B0;
+AC42;AC42;1100 1163 11B1;AC42;1100 1163 11B1;
+AC43;AC43;1100 1163 11B2;AC43;1100 1163 11B2;
+AC44;AC44;1100 1163 11B3;AC44;1100 1163 11B3;
+AC45;AC45;1100 1163 11B4;AC45;1100 1163 11B4;
+AC46;AC46;1100 1163 11B5;AC46;1100 1163 11B5;
+AC47;AC47;1100 1163 11B6;AC47;1100 1163 11B6;
+AC48;AC48;1100 1163 11B7;AC48;1100 1163 11B7;
+AC49;AC49;1100 1163 11B8;AC49;1100 1163 11B8;
+AC4A;AC4A;1100 1163 11B9;AC4A;1100 1163 11B9;
+AC4B;AC4B;1100 1163 11BA;AC4B;1100 1163 11BA;
+AC4C;AC4C;1100 1163 11BB;AC4C;1100 1163 11BB;
+AC4D;AC4D;1100 1163 11BC;AC4D;1100 1163 11BC;
+AC4E;AC4E;1100 1163 11BD;AC4E;1100 1163 11BD;
+AC4F;AC4F;1100 1163 11BE;AC4F;1100 1163 11BE;
+AC50;AC50;1100 1163 11BF;AC50;1100 1163 11BF;
+AC51;AC51;1100 1163 11C0;AC51;1100 1163 11C0;
+AC52;AC52;1100 1163 11C1;AC52;1100 1163 11C1;
+AC53;AC53;1100 1163 11C2;AC53;1100 1163 11C2;
+AC54;AC54;1100 1164;AC54;1100 1164;
+AC55;AC55;1100 1164 11A8;AC55;1100 1164 11A8;
+AC56;AC56;1100 1164 11A9;AC56;1100 1164 11A9;
+AC57;AC57;1100 1164 11AA;AC57;1100 1164 11AA;
+AC58;AC58;1100 1164 11AB;AC58;1100 1164 11AB;
+AC59;AC59;1100 1164 11AC;AC59;1100 1164 11AC;
+AC5A;AC5A;1100 1164 11AD;AC5A;1100 1164 11AD;
+AC5B;AC5B;1100 1164 11AE;AC5B;1100 1164 11AE;
+AC5C;AC5C;1100 1164 11AF;AC5C;1100 1164 11AF;
+AC5D;AC5D;1100 1164 11B0;AC5D;1100 1164 11B0;
+AC5E;AC5E;1100 1164 11B1;AC5E;1100 1164 11B1;
+AC5F;AC5F;1100 1164 11B2;AC5F;1100 1164 11B2;
+AC60;AC60;1100 1164 11B3;AC60;1100 1164 11B3;
+AC61;AC61;1100 1164 11B4;AC61;1100 1164 11B4;
+AC62;AC62;1100 1164 11B5;AC62;1100 1164 11B5;
+AC63;AC63;1100 1164 11B6;AC63;1100 1164 11B6;
+AC64;AC64;1100 1164 11B7;AC64;1100 1164 11B7;
+AC65;AC65;1100 1164 11B8;AC65;1100 1164 11B8;
+AC66;AC66;1100 1164 11B9;AC66;1100 1164 11B9;
+AC67;AC67;1100 1164 11BA;AC67;1100 1164 11BA;
+AC68;AC68;1100 1164 11BB;AC68;1100 1164 11BB;
+AC69;AC69;1100 1164 11BC;AC69;1100 1164 11BC;
+AC6A;AC6A;1100 1164 11BD;AC6A;1100 1164 11BD;
+AC6B;AC6B;1100 1164 11BE;AC6B;1100 1164 11BE;
+AC6C;AC6C;1100 1164 11BF;AC6C;1100 1164 11BF;
+AC6D;AC6D;1100 1164 11C0;AC6D;1100 1164 11C0;
+AC6E;AC6E;1100 1164 11C1;AC6E;1100 1164 11C1;
+AC6F;AC6F;1100 1164 11C2;AC6F;1100 1164 11C2;
+AC70;AC70;1100 1165;AC70;1100 1165;
+AC71;AC71;1100 1165 11A8;AC71;1100 1165 11A8;
+AC72;AC72;1100 1165 11A9;AC72;1100 1165 11A9;
+AC73;AC73;1100 1165 11AA;AC73;1100 1165 11AA;
+AC74;AC74;1100 1165 11AB;AC74;1100 1165 11AB;
+AC75;AC75;1100 1165 11AC;AC75;1100 1165 11AC;
+AC76;AC76;1100 1165 11AD;AC76;1100 1165 11AD;
+AC77;AC77;1100 1165 11AE;AC77;1100 1165 11AE;
+AC78;AC78;1100 1165 11AF;AC78;1100 1165 11AF;
+AC79;AC79;1100 1165 11B0;AC79;1100 1165 11B0;
+AC7A;AC7A;1100 1165 11B1;AC7A;1100 1165 11B1;
+AC7B;AC7B;1100 1165 11B2;AC7B;1100 1165 11B2;
+AC7C;AC7C;1100 1165 11B3;AC7C;1100 1165 11B3;
+AC7D;AC7D;1100 1165 11B4;AC7D;1100 1165 11B4;
+AC7E;AC7E;1100 1165 11B5;AC7E;1100 1165 11B5;
+AC7F;AC7F;1100 1165 11B6;AC7F;1100 1165 11B6;
+AC80;AC80;1100 1165 11B7;AC80;1100 1165 11B7;
+AC81;AC81;1100 1165 11B8;AC81;1100 1165 11B8;
+AC82;AC82;1100 1165 11B9;AC82;1100 1165 11B9;
+AC83;AC83;1100 1165 11BA;AC83;1100 1165 11BA;
+AC84;AC84;1100 1165 11BB;AC84;1100 1165 11BB;
+AC85;AC85;1100 1165 11BC;AC85;1100 1165 11BC;
+AC86;AC86;1100 1165 11BD;AC86;1100 1165 11BD;
+AC87;AC87;1100 1165 11BE;AC87;1100 1165 11BE;
+AC88;AC88;1100 1165 11BF;AC88;1100 1165 11BF;
+AC89;AC89;1100 1165 11C0;AC89;1100 1165 11C0;
+AC8A;AC8A;1100 1165 11C1;AC8A;1100 1165 11C1;
+AC8B;AC8B;1100 1165 11C2;AC8B;1100 1165 11C2;
+AC8C;AC8C;1100 1166;AC8C;1100 1166;
+AC8D;AC8D;1100 1166 11A8;AC8D;1100 1166 11A8;
+AC8E;AC8E;1100 1166 11A9;AC8E;1100 1166 11A9;
+AC8F;AC8F;1100 1166 11AA;AC8F;1100 1166 11AA;
+AC90;AC90;1100 1166 11AB;AC90;1100 1166 11AB;
+AC91;AC91;1100 1166 11AC;AC91;1100 1166 11AC;
+AC92;AC92;1100 1166 11AD;AC92;1100 1166 11AD;
+AC93;AC93;1100 1166 11AE;AC93;1100 1166 11AE;
+AC94;AC94;1100 1166 11AF;AC94;1100 1166 11AF;
+AC95;AC95;1100 1166 11B0;AC95;1100 1166 11B0;
+AC96;AC96;1100 1166 11B1;AC96;1100 1166 11B1;
+AC97;AC97;1100 1166 11B2;AC97;1100 1166 11B2;
+AC98;AC98;1100 1166 11B3;AC98;1100 1166 11B3;
+AC99;AC99;1100 1166 11B4;AC99;1100 1166 11B4;
+AC9A;AC9A;1100 1166 11B5;AC9A;1100 1166 11B5;
+AC9B;AC9B;1100 1166 11B6;AC9B;1100 1166 11B6;
+AC9C;AC9C;1100 1166 11B7;AC9C;1100 1166 11B7;
+AC9D;AC9D;1100 1166 11B8;AC9D;1100 1166 11B8;
+AC9E;AC9E;1100 1166 11B9;AC9E;1100 1166 11B9;
+AC9F;AC9F;1100 1166 11BA;AC9F;1100 1166 11BA;
+ACA0;ACA0;1100 1166 11BB;ACA0;1100 1166 11BB;
+ACA1;ACA1;1100 1166 11BC;ACA1;1100 1166 11BC;
+ACA2;ACA2;1100 1166 11BD;ACA2;1100 1166 11BD;
+ACA3;ACA3;1100 1166 11BE;ACA3;1100 1166 11BE;
+ACA4;ACA4;1100 1166 11BF;ACA4;1100 1166 11BF;
+ACA5;ACA5;1100 1166 11C0;ACA5;1100 1166 11C0;
+ACA6;ACA6;1100 1166 11C1;ACA6;1100 1166 11C1;
+ACA7;ACA7;1100 1166 11C2;ACA7;1100 1166 11C2;
+ACA8;ACA8;1100 1167;ACA8;1100 1167;
+ACA9;ACA9;1100 1167 11A8;ACA9;1100 1167 11A8;
+ACAA;ACAA;1100 1167 11A9;ACAA;1100 1167 11A9;
+ACAB;ACAB;1100 1167 11AA;ACAB;1100 1167 11AA;
+ACAC;ACAC;1100 1167 11AB;ACAC;1100 1167 11AB;
+ACAD;ACAD;1100 1167 11AC;ACAD;1100 1167 11AC;
+ACAE;ACAE;1100 1167 11AD;ACAE;1100 1167 11AD;
+ACAF;ACAF;1100 1167 11AE;ACAF;1100 1167 11AE;
+ACB0;ACB0;1100 1167 11AF;ACB0;1100 1167 11AF;
+ACB1;ACB1;1100 1167 11B0;ACB1;1100 1167 11B0;
+ACB2;ACB2;1100 1167 11B1;ACB2;1100 1167 11B1;
+ACB3;ACB3;1100 1167 11B2;ACB3;1100 1167 11B2;
+ACB4;ACB4;1100 1167 11B3;ACB4;1100 1167 11B3;
+ACB5;ACB5;1100 1167 11B4;ACB5;1100 1167 11B4;
+ACB6;ACB6;1100 1167 11B5;ACB6;1100 1167 11B5;
+ACB7;ACB7;1100 1167 11B6;ACB7;1100 1167 11B6;
+ACB8;ACB8;1100 1167 11B7;ACB8;1100 1167 11B7;
+ACB9;ACB9;1100 1167 11B8;ACB9;1100 1167 11B8;
+ACBA;ACBA;1100 1167 11B9;ACBA;1100 1167 11B9;
+ACBB;ACBB;1100 1167 11BA;ACBB;1100 1167 11BA;
+ACBC;ACBC;1100 1167 11BB;ACBC;1100 1167 11BB;
+ACBD;ACBD;1100 1167 11BC;ACBD;1100 1167 11BC;
+ACBE;ACBE;1100 1167 11BD;ACBE;1100 1167 11BD;
+ACBF;ACBF;1100 1167 11BE;ACBF;1100 1167 11BE;
+ACC0;ACC0;1100 1167 11BF;ACC0;1100 1167 11BF;
+ACC1;ACC1;1100 1167 11C0;ACC1;1100 1167 11C0;
+ACC2;ACC2;1100 1167 11C1;ACC2;1100 1167 11C1;
+ACC3;ACC3;1100 1167 11C2;ACC3;1100 1167 11C2;
+ACC4;ACC4;1100 1168;ACC4;1100 1168;
+ACC5;ACC5;1100 1168 11A8;ACC5;1100 1168 11A8;
+ACC6;ACC6;1100 1168 11A9;ACC6;1100 1168 11A9;
+ACC7;ACC7;1100 1168 11AA;ACC7;1100 1168 11AA;
+ACC8;ACC8;1100 1168 11AB;ACC8;1100 1168 11AB;
+ACC9;ACC9;1100 1168 11AC;ACC9;1100 1168 11AC;
+ACCA;ACCA;1100 1168 11AD;ACCA;1100 1168 11AD;
+ACCB;ACCB;1100 1168 11AE;ACCB;1100 1168 11AE;
+ACCC;ACCC;1100 1168 11AF;ACCC;1100 1168 11AF;
+ACCD;ACCD;1100 1168 11B0;ACCD;1100 1168 11B0;
+ACCE;ACCE;1100 1168 11B1;ACCE;1100 1168 11B1;
+ACCF;ACCF;1100 1168 11B2;ACCF;1100 1168 11B2;
+ACD0;ACD0;1100 1168 11B3;ACD0;1100 1168 11B3;
+ACD1;ACD1;1100 1168 11B4;ACD1;1100 1168 11B4;
+ACD2;ACD2;1100 1168 11B5;ACD2;1100 1168 11B5;
+ACD3;ACD3;1100 1168 11B6;ACD3;1100 1168 11B6;
+ACD4;ACD4;1100 1168 11B7;ACD4;1100 1168 11B7;
+ACD5;ACD5;1100 1168 11B8;ACD5;1100 1168 11B8;
+ACD6;ACD6;1100 1168 11B9;ACD6;1100 1168 11B9;
+ACD7;ACD7;1100 1168 11BA;ACD7;1100 1168 11BA;
+ACD8;ACD8;1100 1168 11BB;ACD8;1100 1168 11BB;
+ACD9;ACD9;1100 1168 11BC;ACD9;1100 1168 11BC;
+ACDA;ACDA;1100 1168 11BD;ACDA;1100 1168 11BD;
+ACDB;ACDB;1100 1168 11BE;ACDB;1100 1168 11BE;
+ACDC;ACDC;1100 1168 11BF;ACDC;1100 1168 11BF;
+ACDD;ACDD;1100 1168 11C0;ACDD;1100 1168 11C0;
+ACDE;ACDE;1100 1168 11C1;ACDE;1100 1168 11C1;
+ACDF;ACDF;1100 1168 11C2;ACDF;1100 1168 11C2;
+ACE0;ACE0;1100 1169;ACE0;1100 1169;
+ACE1;ACE1;1100 1169 11A8;ACE1;1100 1169 11A8;
+ACE2;ACE2;1100 1169 11A9;ACE2;1100 1169 11A9;
+ACE3;ACE3;1100 1169 11AA;ACE3;1100 1169 11AA;
+ACE4;ACE4;1100 1169 11AB;ACE4;1100 1169 11AB;
+ACE5;ACE5;1100 1169 11AC;ACE5;1100 1169 11AC;
+ACE6;ACE6;1100 1169 11AD;ACE6;1100 1169 11AD;
+ACE7;ACE7;1100 1169 11AE;ACE7;1100 1169 11AE;
+ACE8;ACE8;1100 1169 11AF;ACE8;1100 1169 11AF;
+ACE9;ACE9;1100 1169 11B0;ACE9;1100 1169 11B0;
+ACEA;ACEA;1100 1169 11B1;ACEA;1100 1169 11B1;
+ACEB;ACEB;1100 1169 11B2;ACEB;1100 1169 11B2;
+ACEC;ACEC;1100 1169 11B3;ACEC;1100 1169 11B3;
+ACED;ACED;1100 1169 11B4;ACED;1100 1169 11B4;
+ACEE;ACEE;1100 1169 11B5;ACEE;1100 1169 11B5;
+ACEF;ACEF;1100 1169 11B6;ACEF;1100 1169 11B6;
+ACF0;ACF0;1100 1169 11B7;ACF0;1100 1169 11B7;
+ACF1;ACF1;1100 1169 11B8;ACF1;1100 1169 11B8;
+ACF2;ACF2;1100 1169 11B9;ACF2;1100 1169 11B9;
+ACF3;ACF3;1100 1169 11BA;ACF3;1100 1169 11BA;
+ACF4;ACF4;1100 1169 11BB;ACF4;1100 1169 11BB;
+ACF5;ACF5;1100 1169 11BC;ACF5;1100 1169 11BC;
+ACF6;ACF6;1100 1169 11BD;ACF6;1100 1169 11BD;
+ACF7;ACF7;1100 1169 11BE;ACF7;1100 1169 11BE;
+ACF8;ACF8;1100 1169 11BF;ACF8;1100 1169 11BF;
+ACF9;ACF9;1100 1169 11C0;ACF9;1100 1169 11C0;
+ACFA;ACFA;1100 1169 11C1;ACFA;1100 1169 11C1;
+ACFB;ACFB;1100 1169 11C2;ACFB;1100 1169 11C2;
+ACFC;ACFC;1100 116A;ACFC;1100 116A;
+ACFD;ACFD;1100 116A 11A8;ACFD;1100 116A 11A8;
+ACFE;ACFE;1100 116A 11A9;ACFE;1100 116A 11A9;
+ACFF;ACFF;1100 116A 11AA;ACFF;1100 116A 11AA;
+AD00;AD00;1100 116A 11AB;AD00;1100 116A 11AB;
+AD01;AD01;1100 116A 11AC;AD01;1100 116A 11AC;
+AD02;AD02;1100 116A 11AD;AD02;1100 116A 11AD;
+AD03;AD03;1100 116A 11AE;AD03;1100 116A 11AE;
+AD04;AD04;1100 116A 11AF;AD04;1100 116A 11AF;
+AD05;AD05;1100 116A 11B0;AD05;1100 116A 11B0;
+AD06;AD06;1100 116A 11B1;AD06;1100 116A 11B1;
+AD07;AD07;1100 116A 11B2;AD07;1100 116A 11B2;
+AD08;AD08;1100 116A 11B3;AD08;1100 116A 11B3;
+AD09;AD09;1100 116A 11B4;AD09;1100 116A 11B4;
+AD0A;AD0A;1100 116A 11B5;AD0A;1100 116A 11B5;
+AD0B;AD0B;1100 116A 11B6;AD0B;1100 116A 11B6;
+AD0C;AD0C;1100 116A 11B7;AD0C;1100 116A 11B7;
+AD0D;AD0D;1100 116A 11B8;AD0D;1100 116A 11B8;
+AD0E;AD0E;1100 116A 11B9;AD0E;1100 116A 11B9;
+AD0F;AD0F;1100 116A 11BA;AD0F;1100 116A 11BA;
+AD10;AD10;1100 116A 11BB;AD10;1100 116A 11BB;
+AD11;AD11;1100 116A 11BC;AD11;1100 116A 11BC;
+AD12;AD12;1100 116A 11BD;AD12;1100 116A 11BD;
+AD13;AD13;1100 116A 11BE;AD13;1100 116A 11BE;
+AD14;AD14;1100 116A 11BF;AD14;1100 116A 11BF;
+AD15;AD15;1100 116A 11C0;AD15;1100 116A 11C0;
+AD16;AD16;1100 116A 11C1;AD16;1100 116A 11C1;
+AD17;AD17;1100 116A 11C2;AD17;1100 116A 11C2;
+AD18;AD18;1100 116B;AD18;1100 116B;
+AD19;AD19;1100 116B 11A8;AD19;1100 116B 11A8;
+AD1A;AD1A;1100 116B 11A9;AD1A;1100 116B 11A9;
+AD1B;AD1B;1100 116B 11AA;AD1B;1100 116B 11AA;
+AD1C;AD1C;1100 116B 11AB;AD1C;1100 116B 11AB;
+AD1D;AD1D;1100 116B 11AC;AD1D;1100 116B 11AC;
+AD1E;AD1E;1100 116B 11AD;AD1E;1100 116B 11AD;
+AD1F;AD1F;1100 116B 11AE;AD1F;1100 116B 11AE;
+AD20;AD20;1100 116B 11AF;AD20;1100 116B 11AF;
+AD21;AD21;1100 116B 11B0;AD21;1100 116B 11B0;
+AD22;AD22;1100 116B 11B1;AD22;1100 116B 11B1;
+AD23;AD23;1100 116B 11B2;AD23;1100 116B 11B2;
+AD24;AD24;1100 116B 11B3;AD24;1100 116B 11B3;
+AD25;AD25;1100 116B 11B4;AD25;1100 116B 11B4;
+AD26;AD26;1100 116B 11B5;AD26;1100 116B 11B5;
+AD27;AD27;1100 116B 11B6;AD27;1100 116B 11B6;
+AD28;AD28;1100 116B 11B7;AD28;1100 116B 11B7;
+AD29;AD29;1100 116B 11B8;AD29;1100 116B 11B8;
+AD2A;AD2A;1100 116B 11B9;AD2A;1100 116B 11B9;
+AD2B;AD2B;1100 116B 11BA;AD2B;1100 116B 11BA;
+AD2C;AD2C;1100 116B 11BB;AD2C;1100 116B 11BB;
+AD2D;AD2D;1100 116B 11BC;AD2D;1100 116B 11BC;
+AD2E;AD2E;1100 116B 11BD;AD2E;1100 116B 11BD;
+AD2F;AD2F;1100 116B 11BE;AD2F;1100 116B 11BE;
+AD30;AD30;1100 116B 11BF;AD30;1100 116B 11BF;
+AD31;AD31;1100 116B 11C0;AD31;1100 116B 11C0;
+AD32;AD32;1100 116B 11C1;AD32;1100 116B 11C1;
+AD33;AD33;1100 116B 11C2;AD33;1100 116B 11C2;
+AD34;AD34;1100 116C;AD34;1100 116C;
+AD35;AD35;1100 116C 11A8;AD35;1100 116C 11A8;
+AD36;AD36;1100 116C 11A9;AD36;1100 116C 11A9;
+AD37;AD37;1100 116C 11AA;AD37;1100 116C 11AA;
+AD38;AD38;1100 116C 11AB;AD38;1100 116C 11AB;
+AD39;AD39;1100 116C 11AC;AD39;1100 116C 11AC;
+AD3A;AD3A;1100 116C 11AD;AD3A;1100 116C 11AD;
+AD3B;AD3B;1100 116C 11AE;AD3B;1100 116C 11AE;
+AD3C;AD3C;1100 116C 11AF;AD3C;1100 116C 11AF;
+AD3D;AD3D;1100 116C 11B0;AD3D;1100 116C 11B0;
+AD3E;AD3E;1100 116C 11B1;AD3E;1100 116C 11B1;
+AD3F;AD3F;1100 116C 11B2;AD3F;1100 116C 11B2;
+AD40;AD40;1100 116C 11B3;AD40;1100 116C 11B3;
+AD41;AD41;1100 116C 11B4;AD41;1100 116C 11B4;
+AD42;AD42;1100 116C 11B5;AD42;1100 116C 11B5;
+AD43;AD43;1100 116C 11B6;AD43;1100 116C 11B6;
+AD44;AD44;1100 116C 11B7;AD44;1100 116C 11B7;
+AD45;AD45;1100 116C 11B8;AD45;1100 116C 11B8;
+AD46;AD46;1100 116C 11B9;AD46;1100 116C 11B9;
+AD47;AD47;1100 116C 11BA;AD47;1100 116C 11BA;
+AD48;AD48;1100 116C 11BB;AD48;1100 116C 11BB;
+AD49;AD49;1100 116C 11BC;AD49;1100 116C 11BC;
+AD4A;AD4A;1100 116C 11BD;AD4A;1100 116C 11BD;
+AD4B;AD4B;1100 116C 11BE;AD4B;1100 116C 11BE;
+AD4C;AD4C;1100 116C 11BF;AD4C;1100 116C 11BF;
+AD4D;AD4D;1100 116C 11C0;AD4D;1100 116C 11C0;
+AD4E;AD4E;1100 116C 11C1;AD4E;1100 116C 11C1;
+AD4F;AD4F;1100 116C 11C2;AD4F;1100 116C 11C2;
+AD50;AD50;1100 116D;AD50;1100 116D;
+AD51;AD51;1100 116D 11A8;AD51;1100 116D 11A8;
+AD52;AD52;1100 116D 11A9;AD52;1100 116D 11A9;
+AD53;AD53;1100 116D 11AA;AD53;1100 116D 11AA;
+AD54;AD54;1100 116D 11AB;AD54;1100 116D 11AB;
+AD55;AD55;1100 116D 11AC;AD55;1100 116D 11AC;
+AD56;AD56;1100 116D 11AD;AD56;1100 116D 11AD;
+AD57;AD57;1100 116D 11AE;AD57;1100 116D 11AE;
+AD58;AD58;1100 116D 11AF;AD58;1100 116D 11AF;
+AD59;AD59;1100 116D 11B0;AD59;1100 116D 11B0;
+AD5A;AD5A;1100 116D 11B1;AD5A;1100 116D 11B1;
+AD5B;AD5B;1100 116D 11B2;AD5B;1100 116D 11B2;
+AD5C;AD5C;1100 116D 11B3;AD5C;1100 116D 11B3;
+AD5D;AD5D;1100 116D 11B4;AD5D;1100 116D 11B4;
+AD5E;AD5E;1100 116D 11B5;AD5E;1100 116D 11B5;
+AD5F;AD5F;1100 116D 11B6;AD5F;1100 116D 11B6;
+AD60;AD60;1100 116D 11B7;AD60;1100 116D 11B7;
+AD61;AD61;1100 116D 11B8;AD61;1100 116D 11B8;
+AD62;AD62;1100 116D 11B9;AD62;1100 116D 11B9;
+AD63;AD63;1100 116D 11BA;AD63;1100 116D 11BA;
+AD64;AD64;1100 116D 11BB;AD64;1100 116D 11BB;
+AD65;AD65;1100 116D 11BC;AD65;1100 116D 11BC;
+AD66;AD66;1100 116D 11BD;AD66;1100 116D 11BD;
+AD67;AD67;1100 116D 11BE;AD67;1100 116D 11BE;
+AD68;AD68;1100 116D 11BF;AD68;1100 116D 11BF;
+AD69;AD69;1100 116D 11C0;AD69;1100 116D 11C0;
+AD6A;AD6A;1100 116D 11C1;AD6A;1100 116D 11C1;
+AD6B;AD6B;1100 116D 11C2;AD6B;1100 116D 11C2;
+AD6C;AD6C;1100 116E;AD6C;1100 116E;
+AD6D;AD6D;1100 116E 11A8;AD6D;1100 116E 11A8;
+AD6E;AD6E;1100 116E 11A9;AD6E;1100 116E 11A9;
+AD6F;AD6F;1100 116E 11AA;AD6F;1100 116E 11AA;
+AD70;AD70;1100 116E 11AB;AD70;1100 116E 11AB;
+AD71;AD71;1100 116E 11AC;AD71;1100 116E 11AC;
+AD72;AD72;1100 116E 11AD;AD72;1100 116E 11AD;
+AD73;AD73;1100 116E 11AE;AD73;1100 116E 11AE;
+AD74;AD74;1100 116E 11AF;AD74;1100 116E 11AF;
+AD75;AD75;1100 116E 11B0;AD75;1100 116E 11B0;
+AD76;AD76;1100 116E 11B1;AD76;1100 116E 11B1;
+AD77;AD77;1100 116E 11B2;AD77;1100 116E 11B2;
+AD78;AD78;1100 116E 11B3;AD78;1100 116E 11B3;
+AD79;AD79;1100 116E 11B4;AD79;1100 116E 11B4;
+AD7A;AD7A;1100 116E 11B5;AD7A;1100 116E 11B5;
+AD7B;AD7B;1100 116E 11B6;AD7B;1100 116E 11B6;
+AD7C;AD7C;1100 116E 11B7;AD7C;1100 116E 11B7;
+AD7D;AD7D;1100 116E 11B8;AD7D;1100 116E 11B8;
+AD7E;AD7E;1100 116E 11B9;AD7E;1100 116E 11B9;
+AD7F;AD7F;1100 116E 11BA;AD7F;1100 116E 11BA;
+AD80;AD80;1100 116E 11BB;AD80;1100 116E 11BB;
+AD81;AD81;1100 116E 11BC;AD81;1100 116E 11BC;
+AD82;AD82;1100 116E 11BD;AD82;1100 116E 11BD;
+AD83;AD83;1100 116E 11BE;AD83;1100 116E 11BE;
+AD84;AD84;1100 116E 11BF;AD84;1100 116E 11BF;
+AD85;AD85;1100 116E 11C0;AD85;1100 116E 11C0;
+AD86;AD86;1100 116E 11C1;AD86;1100 116E 11C1;
+AD87;AD87;1100 116E 11C2;AD87;1100 116E 11C2;
+AD88;AD88;1100 116F;AD88;1100 116F;
+AD89;AD89;1100 116F 11A8;AD89;1100 116F 11A8;
+AD8A;AD8A;1100 116F 11A9;AD8A;1100 116F 11A9;
+AD8B;AD8B;1100 116F 11AA;AD8B;1100 116F 11AA;
+AD8C;AD8C;1100 116F 11AB;AD8C;1100 116F 11AB;
+AD8D;AD8D;1100 116F 11AC;AD8D;1100 116F 11AC;
+AD8E;AD8E;1100 116F 11AD;AD8E;1100 116F 11AD;
+AD8F;AD8F;1100 116F 11AE;AD8F;1100 116F 11AE;
+AD90;AD90;1100 116F 11AF;AD90;1100 116F 11AF;
+AD91;AD91;1100 116F 11B0;AD91;1100 116F 11B0;
+AD92;AD92;1100 116F 11B1;AD92;1100 116F 11B1;
+AD93;AD93;1100 116F 11B2;AD93;1100 116F 11B2;
+AD94;AD94;1100 116F 11B3;AD94;1100 116F 11B3;
+AD95;AD95;1100 116F 11B4;AD95;1100 116F 11B4;
+AD96;AD96;1100 116F 11B5;AD96;1100 116F 11B5;
+AD97;AD97;1100 116F 11B6;AD97;1100 116F 11B6;
+AD98;AD98;1100 116F 11B7;AD98;1100 116F 11B7;
+AD99;AD99;1100 116F 11B8;AD99;1100 116F 11B8;
+AD9A;AD9A;1100 116F 11B9;AD9A;1100 116F 11B9;
+AD9B;AD9B;1100 116F 11BA;AD9B;1100 116F 11BA;
+AD9C;AD9C;1100 116F 11BB;AD9C;1100 116F 11BB;
+AD9D;AD9D;1100 116F 11BC;AD9D;1100 116F 11BC;
+AD9E;AD9E;1100 116F 11BD;AD9E;1100 116F 11BD;
+AD9F;AD9F;1100 116F 11BE;AD9F;1100 116F 11BE;
+ADA0;ADA0;1100 116F 11BF;ADA0;1100 116F 11BF;
+ADA1;ADA1;1100 116F 11C0;ADA1;1100 116F 11C0;
+ADA2;ADA2;1100 116F 11C1;ADA2;1100 116F 11C1;
+ADA3;ADA3;1100 116F 11C2;ADA3;1100 116F 11C2;
+ADA4;ADA4;1100 1170;ADA4;1100 1170;
+ADA5;ADA5;1100 1170 11A8;ADA5;1100 1170 11A8;
+ADA6;ADA6;1100 1170 11A9;ADA6;1100 1170 11A9;
+ADA7;ADA7;1100 1170 11AA;ADA7;1100 1170 11AA;
+ADA8;ADA8;1100 1170 11AB;ADA8;1100 1170 11AB;
+ADA9;ADA9;1100 1170 11AC;ADA9;1100 1170 11AC;
+ADAA;ADAA;1100 1170 11AD;ADAA;1100 1170 11AD;
+ADAB;ADAB;1100 1170 11AE;ADAB;1100 1170 11AE;
+ADAC;ADAC;1100 1170 11AF;ADAC;1100 1170 11AF;
+ADAD;ADAD;1100 1170 11B0;ADAD;1100 1170 11B0;
+ADAE;ADAE;1100 1170 11B1;ADAE;1100 1170 11B1;
+ADAF;ADAF;1100 1170 11B2;ADAF;1100 1170 11B2;
+ADB0;ADB0;1100 1170 11B3;ADB0;1100 1170 11B3;
+ADB1;ADB1;1100 1170 11B4;ADB1;1100 1170 11B4;
+ADB2;ADB2;1100 1170 11B5;ADB2;1100 1170 11B5;
+ADB3;ADB3;1100 1170 11B6;ADB3;1100 1170 11B6;
+ADB4;ADB4;1100 1170 11B7;ADB4;1100 1170 11B7;
+ADB5;ADB5;1100 1170 11B8;ADB5;1100 1170 11B8;
+ADB6;ADB6;1100 1170 11B9;ADB6;1100 1170 11B9;
+ADB7;ADB7;1100 1170 11BA;ADB7;1100 1170 11BA;
+ADB8;ADB8;1100 1170 11BB;ADB8;1100 1170 11BB;
+ADB9;ADB9;1100 1170 11BC;ADB9;1100 1170 11BC;
+ADBA;ADBA;1100 1170 11BD;ADBA;1100 1170 11BD;
+ADBB;ADBB;1100 1170 11BE;ADBB;1100 1170 11BE;
+ADBC;ADBC;1100 1170 11BF;ADBC;1100 1170 11BF;
+ADBD;ADBD;1100 1170 11C0;ADBD;1100 1170 11C0;
+ADBE;ADBE;1100 1170 11C1;ADBE;1100 1170 11C1;
+ADBF;ADBF;1100 1170 11C2;ADBF;1100 1170 11C2;
+ADC0;ADC0;1100 1171;ADC0;1100 1171;
+ADC1;ADC1;1100 1171 11A8;ADC1;1100 1171 11A8;
+ADC2;ADC2;1100 1171 11A9;ADC2;1100 1171 11A9;
+ADC3;ADC3;1100 1171 11AA;ADC3;1100 1171 11AA;
+ADC4;ADC4;1100 1171 11AB;ADC4;1100 1171 11AB;
+ADC5;ADC5;1100 1171 11AC;ADC5;1100 1171 11AC;
+ADC6;ADC6;1100 1171 11AD;ADC6;1100 1171 11AD;
+ADC7;ADC7;1100 1171 11AE;ADC7;1100 1171 11AE;
+ADC8;ADC8;1100 1171 11AF;ADC8;1100 1171 11AF;
+ADC9;ADC9;1100 1171 11B0;ADC9;1100 1171 11B0;
+ADCA;ADCA;1100 1171 11B1;ADCA;1100 1171 11B1;
+ADCB;ADCB;1100 1171 11B2;ADCB;1100 1171 11B2;
+ADCC;ADCC;1100 1171 11B3;ADCC;1100 1171 11B3;
+ADCD;ADCD;1100 1171 11B4;ADCD;1100 1171 11B4;
+ADCE;ADCE;1100 1171 11B5;ADCE;1100 1171 11B5;
+ADCF;ADCF;1100 1171 11B6;ADCF;1100 1171 11B6;
+ADD0;ADD0;1100 1171 11B7;ADD0;1100 1171 11B7;
+ADD1;ADD1;1100 1171 11B8;ADD1;1100 1171 11B8;
+ADD2;ADD2;1100 1171 11B9;ADD2;1100 1171 11B9;
+ADD3;ADD3;1100 1171 11BA;ADD3;1100 1171 11BA;
+ADD4;ADD4;1100 1171 11BB;ADD4;1100 1171 11BB;
+ADD5;ADD5;1100 1171 11BC;ADD5;1100 1171 11BC;
+ADD6;ADD6;1100 1171 11BD;ADD6;1100 1171 11BD;
+ADD7;ADD7;1100 1171 11BE;ADD7;1100 1171 11BE;
+ADD8;ADD8;1100 1171 11BF;ADD8;1100 1171 11BF;
+ADD9;ADD9;1100 1171 11C0;ADD9;1100 1171 11C0;
+ADDA;ADDA;1100 1171 11C1;ADDA;1100 1171 11C1;
+ADDB;ADDB;1100 1171 11C2;ADDB;1100 1171 11C2;
+ADDC;ADDC;1100 1172;ADDC;1100 1172;
+ADDD;ADDD;1100 1172 11A8;ADDD;1100 1172 11A8;
+ADDE;ADDE;1100 1172 11A9;ADDE;1100 1172 11A9;
+ADDF;ADDF;1100 1172 11AA;ADDF;1100 1172 11AA;
+ADE0;ADE0;1100 1172 11AB;ADE0;1100 1172 11AB;
+ADE1;ADE1;1100 1172 11AC;ADE1;1100 1172 11AC;
+ADE2;ADE2;1100 1172 11AD;ADE2;1100 1172 11AD;
+ADE3;ADE3;1100 1172 11AE;ADE3;1100 1172 11AE;
+ADE4;ADE4;1100 1172 11AF;ADE4;1100 1172 11AF;
+ADE5;ADE5;1100 1172 11B0;ADE5;1100 1172 11B0;
+ADE6;ADE6;1100 1172 11B1;ADE6;1100 1172 11B1;
+ADE7;ADE7;1100 1172 11B2;ADE7;1100 1172 11B2;
+ADE8;ADE8;1100 1172 11B3;ADE8;1100 1172 11B3;
+ADE9;ADE9;1100 1172 11B4;ADE9;1100 1172 11B4;
+ADEA;ADEA;1100 1172 11B5;ADEA;1100 1172 11B5;
+ADEB;ADEB;1100 1172 11B6;ADEB;1100 1172 11B6;
+ADEC;ADEC;1100 1172 11B7;ADEC;1100 1172 11B7;
+ADED;ADED;1100 1172 11B8;ADED;1100 1172 11B8;
+ADEE;ADEE;1100 1172 11B9;ADEE;1100 1172 11B9;
+ADEF;ADEF;1100 1172 11BA;ADEF;1100 1172 11BA;
+ADF0;ADF0;1100 1172 11BB;ADF0;1100 1172 11BB;
+ADF1;ADF1;1100 1172 11BC;ADF1;1100 1172 11BC;
+ADF2;ADF2;1100 1172 11BD;ADF2;1100 1172 11BD;
+ADF3;ADF3;1100 1172 11BE;ADF3;1100 1172 11BE;
+ADF4;ADF4;1100 1172 11BF;ADF4;1100 1172 11BF;
+ADF5;ADF5;1100 1172 11C0;ADF5;1100 1172 11C0;
+ADF6;ADF6;1100 1172 11C1;ADF6;1100 1172 11C1;
+ADF7;ADF7;1100 1172 11C2;ADF7;1100 1172 11C2;
+ADF8;ADF8;1100 1173;ADF8;1100 1173;
+ADF9;ADF9;1100 1173 11A8;ADF9;1100 1173 11A8;
+ADFA;ADFA;1100 1173 11A9;ADFA;1100 1173 11A9;
+ADFB;ADFB;1100 1173 11AA;ADFB;1100 1173 11AA;
+ADFC;ADFC;1100 1173 11AB;ADFC;1100 1173 11AB;
+ADFD;ADFD;1100 1173 11AC;ADFD;1100 1173 11AC;
+ADFE;ADFE;1100 1173 11AD;ADFE;1100 1173 11AD;
+ADFF;ADFF;1100 1173 11AE;ADFF;1100 1173 11AE;
+AE00;AE00;1100 1173 11AF;AE00;1100 1173 11AF;
+AE01;AE01;1100 1173 11B0;AE01;1100 1173 11B0;
+AE02;AE02;1100 1173 11B1;AE02;1100 1173 11B1;
+AE03;AE03;1100 1173 11B2;AE03;1100 1173 11B2;
+AE04;AE04;1100 1173 11B3;AE04;1100 1173 11B3;
+AE05;AE05;1100 1173 11B4;AE05;1100 1173 11B4;
+AE06;AE06;1100 1173 11B5;AE06;1100 1173 11B5;
+AE07;AE07;1100 1173 11B6;AE07;1100 1173 11B6;
+AE08;AE08;1100 1173 11B7;AE08;1100 1173 11B7;
+AE09;AE09;1100 1173 11B8;AE09;1100 1173 11B8;
+AE0A;AE0A;1100 1173 11B9;AE0A;1100 1173 11B9;
+AE0B;AE0B;1100 1173 11BA;AE0B;1100 1173 11BA;
+AE0C;AE0C;1100 1173 11BB;AE0C;1100 1173 11BB;
+AE0D;AE0D;1100 1173 11BC;AE0D;1100 1173 11BC;
+AE0E;AE0E;1100 1173 11BD;AE0E;1100 1173 11BD;
+AE0F;AE0F;1100 1173 11BE;AE0F;1100 1173 11BE;
+AE10;AE10;1100 1173 11BF;AE10;1100 1173 11BF;
+AE11;AE11;1100 1173 11C0;AE11;1100 1173 11C0;
+AE12;AE12;1100 1173 11C1;AE12;1100 1173 11C1;
+AE13;AE13;1100 1173 11C2;AE13;1100 1173 11C2;
+AE14;AE14;1100 1174;AE14;1100 1174;
+AE15;AE15;1100 1174 11A8;AE15;1100 1174 11A8;
+AE16;AE16;1100 1174 11A9;AE16;1100 1174 11A9;
+AE17;AE17;1100 1174 11AA;AE17;1100 1174 11AA;
+AE18;AE18;1100 1174 11AB;AE18;1100 1174 11AB;
+AE19;AE19;1100 1174 11AC;AE19;1100 1174 11AC;
+AE1A;AE1A;1100 1174 11AD;AE1A;1100 1174 11AD;
+AE1B;AE1B;1100 1174 11AE;AE1B;1100 1174 11AE;
+AE1C;AE1C;1100 1174 11AF;AE1C;1100 1174 11AF;
+AE1D;AE1D;1100 1174 11B0;AE1D;1100 1174 11B0;
+AE1E;AE1E;1100 1174 11B1;AE1E;1100 1174 11B1;
+AE1F;AE1F;1100 1174 11B2;AE1F;1100 1174 11B2;
+AE20;AE20;1100 1174 11B3;AE20;1100 1174 11B3;
+AE21;AE21;1100 1174 11B4;AE21;1100 1174 11B4;
+AE22;AE22;1100 1174 11B5;AE22;1100 1174 11B5;
+AE23;AE23;1100 1174 11B6;AE23;1100 1174 11B6;
+AE24;AE24;1100 1174 11B7;AE24;1100 1174 11B7;
+AE25;AE25;1100 1174 11B8;AE25;1100 1174 11B8;
+AE26;AE26;1100 1174 11B9;AE26;1100 1174 11B9;
+AE27;AE27;1100 1174 11BA;AE27;1100 1174 11BA;
+AE28;AE28;1100 1174 11BB;AE28;1100 1174 11BB;
+AE29;AE29;1100 1174 11BC;AE29;1100 1174 11BC;
+AE2A;AE2A;1100 1174 11BD;AE2A;1100 1174 11BD;
+AE2B;AE2B;1100 1174 11BE;AE2B;1100 1174 11BE;
+AE2C;AE2C;1100 1174 11BF;AE2C;1100 1174 11BF;
+AE2D;AE2D;1100 1174 11C0;AE2D;1100 1174 11C0;
+AE2E;AE2E;1100 1174 11C1;AE2E;1100 1174 11C1;
+AE2F;AE2F;1100 1174 11C2;AE2F;1100 1174 11C2;
+AE30;AE30;1100 1175;AE30;1100 1175;
+AE31;AE31;1100 1175 11A8;AE31;1100 1175 11A8;
+AE32;AE32;1100 1175 11A9;AE32;1100 1175 11A9;
+AE33;AE33;1100 1175 11AA;AE33;1100 1175 11AA;
+AE34;AE34;1100 1175 11AB;AE34;1100 1175 11AB;
+AE35;AE35;1100 1175 11AC;AE35;1100 1175 11AC;
+AE36;AE36;1100 1175 11AD;AE36;1100 1175 11AD;
+AE37;AE37;1100 1175 11AE;AE37;1100 1175 11AE;
+AE38;AE38;1100 1175 11AF;AE38;1100 1175 11AF;
+AE39;AE39;1100 1175 11B0;AE39;1100 1175 11B0;
+AE3A;AE3A;1100 1175 11B1;AE3A;1100 1175 11B1;
+AE3B;AE3B;1100 1175 11B2;AE3B;1100 1175 11B2;
+AE3C;AE3C;1100 1175 11B3;AE3C;1100 1175 11B3;
+AE3D;AE3D;1100 1175 11B4;AE3D;1100 1175 11B4;
+AE3E;AE3E;1100 1175 11B5;AE3E;1100 1175 11B5;
+AE3F;AE3F;1100 1175 11B6;AE3F;1100 1175 11B6;
+AE40;AE40;1100 1175 11B7;AE40;1100 1175 11B7;
+AE41;AE41;1100 1175 11B8;AE41;1100 1175 11B8;
+AE42;AE42;1100 1175 11B9;AE42;1100 1175 11B9;
+AE43;AE43;1100 1175 11BA;AE43;1100 1175 11BA;
+AE44;AE44;1100 1175 11BB;AE44;1100 1175 11BB;
+AE45;AE45;1100 1175 11BC;AE45;1100 1175 11BC;
+AE46;AE46;1100 1175 11BD;AE46;1100 1175 11BD;
+AE47;AE47;1100 1175 11BE;AE47;1100 1175 11BE;
+AE48;AE48;1100 1175 11BF;AE48;1100 1175 11BF;
+AE49;AE49;1100 1175 11C0;AE49;1100 1175 11C0;
+AE4A;AE4A;1100 1175 11C1;AE4A;1100 1175 11C1;
+AE4B;AE4B;1100 1175 11C2;AE4B;1100 1175 11C2;
+AE4C;AE4C;1101 1161;AE4C;1101 1161;
+AE4D;AE4D;1101 1161 11A8;AE4D;1101 1161 11A8;
+AE4E;AE4E;1101 1161 11A9;AE4E;1101 1161 11A9;
+AE4F;AE4F;1101 1161 11AA;AE4F;1101 1161 11AA;
+AE50;AE50;1101 1161 11AB;AE50;1101 1161 11AB;
+AE51;AE51;1101 1161 11AC;AE51;1101 1161 11AC;
+AE52;AE52;1101 1161 11AD;AE52;1101 1161 11AD;
+AE53;AE53;1101 1161 11AE;AE53;1101 1161 11AE;
+AE54;AE54;1101 1161 11AF;AE54;1101 1161 11AF;
+AE55;AE55;1101 1161 11B0;AE55;1101 1161 11B0;
+AE56;AE56;1101 1161 11B1;AE56;1101 1161 11B1;
+AE57;AE57;1101 1161 11B2;AE57;1101 1161 11B2;
+AE58;AE58;1101 1161 11B3;AE58;1101 1161 11B3;
+AE59;AE59;1101 1161 11B4;AE59;1101 1161 11B4;
+AE5A;AE5A;1101 1161 11B5;AE5A;1101 1161 11B5;
+AE5B;AE5B;1101 1161 11B6;AE5B;1101 1161 11B6;
+AE5C;AE5C;1101 1161 11B7;AE5C;1101 1161 11B7;
+AE5D;AE5D;1101 1161 11B8;AE5D;1101 1161 11B8;
+AE5E;AE5E;1101 1161 11B9;AE5E;1101 1161 11B9;
+AE5F;AE5F;1101 1161 11BA;AE5F;1101 1161 11BA;
+AE60;AE60;1101 1161 11BB;AE60;1101 1161 11BB;
+AE61;AE61;1101 1161 11BC;AE61;1101 1161 11BC;
+AE62;AE62;1101 1161 11BD;AE62;1101 1161 11BD;
+AE63;AE63;1101 1161 11BE;AE63;1101 1161 11BE;
+AE64;AE64;1101 1161 11BF;AE64;1101 1161 11BF;
+AE65;AE65;1101 1161 11C0;AE65;1101 1161 11C0;
+AE66;AE66;1101 1161 11C1;AE66;1101 1161 11C1;
+AE67;AE67;1101 1161 11C2;AE67;1101 1161 11C2;
+AE68;AE68;1101 1162;AE68;1101 1162;
+AE69;AE69;1101 1162 11A8;AE69;1101 1162 11A8;
+AE6A;AE6A;1101 1162 11A9;AE6A;1101 1162 11A9;
+AE6B;AE6B;1101 1162 11AA;AE6B;1101 1162 11AA;
+AE6C;AE6C;1101 1162 11AB;AE6C;1101 1162 11AB;
+AE6D;AE6D;1101 1162 11AC;AE6D;1101 1162 11AC;
+AE6E;AE6E;1101 1162 11AD;AE6E;1101 1162 11AD;
+AE6F;AE6F;1101 1162 11AE;AE6F;1101 1162 11AE;
+AE70;AE70;1101 1162 11AF;AE70;1101 1162 11AF;
+AE71;AE71;1101 1162 11B0;AE71;1101 1162 11B0;
+AE72;AE72;1101 1162 11B1;AE72;1101 1162 11B1;
+AE73;AE73;1101 1162 11B2;AE73;1101 1162 11B2;
+AE74;AE74;1101 1162 11B3;AE74;1101 1162 11B3;
+AE75;AE75;1101 1162 11B4;AE75;1101 1162 11B4;
+AE76;AE76;1101 1162 11B5;AE76;1101 1162 11B5;
+AE77;AE77;1101 1162 11B6;AE77;1101 1162 11B6;
+AE78;AE78;1101 1162 11B7;AE78;1101 1162 11B7;
+AE79;AE79;1101 1162 11B8;AE79;1101 1162 11B8;
+AE7A;AE7A;1101 1162 11B9;AE7A;1101 1162 11B9;
+AE7B;AE7B;1101 1162 11BA;AE7B;1101 1162 11BA;
+AE7C;AE7C;1101 1162 11BB;AE7C;1101 1162 11BB;
+AE7D;AE7D;1101 1162 11BC;AE7D;1101 1162 11BC;
+AE7E;AE7E;1101 1162 11BD;AE7E;1101 1162 11BD;
+AE7F;AE7F;1101 1162 11BE;AE7F;1101 1162 11BE;
+AE80;AE80;1101 1162 11BF;AE80;1101 1162 11BF;
+AE81;AE81;1101 1162 11C0;AE81;1101 1162 11C0;
+AE82;AE82;1101 1162 11C1;AE82;1101 1162 11C1;
+AE83;AE83;1101 1162 11C2;AE83;1101 1162 11C2;
+AE84;AE84;1101 1163;AE84;1101 1163;
+AE85;AE85;1101 1163 11A8;AE85;1101 1163 11A8;
+AE86;AE86;1101 1163 11A9;AE86;1101 1163 11A9;
+AE87;AE87;1101 1163 11AA;AE87;1101 1163 11AA;
+AE88;AE88;1101 1163 11AB;AE88;1101 1163 11AB;
+AE89;AE89;1101 1163 11AC;AE89;1101 1163 11AC;
+AE8A;AE8A;1101 1163 11AD;AE8A;1101 1163 11AD;
+AE8B;AE8B;1101 1163 11AE;AE8B;1101 1163 11AE;
+AE8C;AE8C;1101 1163 11AF;AE8C;1101 1163 11AF;
+AE8D;AE8D;1101 1163 11B0;AE8D;1101 1163 11B0;
+AE8E;AE8E;1101 1163 11B1;AE8E;1101 1163 11B1;
+AE8F;AE8F;1101 1163 11B2;AE8F;1101 1163 11B2;
+AE90;AE90;1101 1163 11B3;AE90;1101 1163 11B3;
+AE91;AE91;1101 1163 11B4;AE91;1101 1163 11B4;
+AE92;AE92;1101 1163 11B5;AE92;1101 1163 11B5;
+AE93;AE93;1101 1163 11B6;AE93;1101 1163 11B6;
+AE94;AE94;1101 1163 11B7;AE94;1101 1163 11B7;
+AE95;AE95;1101 1163 11B8;AE95;1101 1163 11B8;
+AE96;AE96;1101 1163 11B9;AE96;1101 1163 11B9;
+AE97;AE97;1101 1163 11BA;AE97;1101 1163 11BA;
+AE98;AE98;1101 1163 11BB;AE98;1101 1163 11BB;
+AE99;AE99;1101 1163 11BC;AE99;1101 1163 11BC;
+AE9A;AE9A;1101 1163 11BD;AE9A;1101 1163 11BD;
+AE9B;AE9B;1101 1163 11BE;AE9B;1101 1163 11BE;
+AE9C;AE9C;1101 1163 11BF;AE9C;1101 1163 11BF;
+AE9D;AE9D;1101 1163 11C0;AE9D;1101 1163 11C0;
+AE9E;AE9E;1101 1163 11C1;AE9E;1101 1163 11C1;
+AE9F;AE9F;1101 1163 11C2;AE9F;1101 1163 11C2;
+AEA0;AEA0;1101 1164;AEA0;1101 1164;
+AEA1;AEA1;1101 1164 11A8;AEA1;1101 1164 11A8;
+AEA2;AEA2;1101 1164 11A9;AEA2;1101 1164 11A9;
+AEA3;AEA3;1101 1164 11AA;AEA3;1101 1164 11AA;
+AEA4;AEA4;1101 1164 11AB;AEA4;1101 1164 11AB;
+AEA5;AEA5;1101 1164 11AC;AEA5;1101 1164 11AC;
+AEA6;AEA6;1101 1164 11AD;AEA6;1101 1164 11AD;
+AEA7;AEA7;1101 1164 11AE;AEA7;1101 1164 11AE;
+AEA8;AEA8;1101 1164 11AF;AEA8;1101 1164 11AF;
+AEA9;AEA9;1101 1164 11B0;AEA9;1101 1164 11B0;
+AEAA;AEAA;1101 1164 11B1;AEAA;1101 1164 11B1;
+AEAB;AEAB;1101 1164 11B2;AEAB;1101 1164 11B2;
+AEAC;AEAC;1101 1164 11B3;AEAC;1101 1164 11B3;
+AEAD;AEAD;1101 1164 11B4;AEAD;1101 1164 11B4;
+AEAE;AEAE;1101 1164 11B5;AEAE;1101 1164 11B5;
+AEAF;AEAF;1101 1164 11B6;AEAF;1101 1164 11B6;
+AEB0;AEB0;1101 1164 11B7;AEB0;1101 1164 11B7;
+AEB1;AEB1;1101 1164 11B8;AEB1;1101 1164 11B8;
+AEB2;AEB2;1101 1164 11B9;AEB2;1101 1164 11B9;
+AEB3;AEB3;1101 1164 11BA;AEB3;1101 1164 11BA;
+AEB4;AEB4;1101 1164 11BB;AEB4;1101 1164 11BB;
+AEB5;AEB5;1101 1164 11BC;AEB5;1101 1164 11BC;
+AEB6;AEB6;1101 1164 11BD;AEB6;1101 1164 11BD;
+AEB7;AEB7;1101 1164 11BE;AEB7;1101 1164 11BE;
+AEB8;AEB8;1101 1164 11BF;AEB8;1101 1164 11BF;
+AEB9;AEB9;1101 1164 11C0;AEB9;1101 1164 11C0;
+AEBA;AEBA;1101 1164 11C1;AEBA;1101 1164 11C1;
+AEBB;AEBB;1101 1164 11C2;AEBB;1101 1164 11C2;
+AEBC;AEBC;1101 1165;AEBC;1101 1165;
+AEBD;AEBD;1101 1165 11A8;AEBD;1101 1165 11A8;
+AEBE;AEBE;1101 1165 11A9;AEBE;1101 1165 11A9;
+AEBF;AEBF;1101 1165 11AA;AEBF;1101 1165 11AA;
+AEC0;AEC0;1101 1165 11AB;AEC0;1101 1165 11AB;
+AEC1;AEC1;1101 1165 11AC;AEC1;1101 1165 11AC;
+AEC2;AEC2;1101 1165 11AD;AEC2;1101 1165 11AD;
+AEC3;AEC3;1101 1165 11AE;AEC3;1101 1165 11AE;
+AEC4;AEC4;1101 1165 11AF;AEC4;1101 1165 11AF;
+AEC5;AEC5;1101 1165 11B0;AEC5;1101 1165 11B0;
+AEC6;AEC6;1101 1165 11B1;AEC6;1101 1165 11B1;
+AEC7;AEC7;1101 1165 11B2;AEC7;1101 1165 11B2;
+AEC8;AEC8;1101 1165 11B3;AEC8;1101 1165 11B3;
+AEC9;AEC9;1101 1165 11B4;AEC9;1101 1165 11B4;
+AECA;AECA;1101 1165 11B5;AECA;1101 1165 11B5;
+AECB;AECB;1101 1165 11B6;AECB;1101 1165 11B6;
+AECC;AECC;1101 1165 11B7;AECC;1101 1165 11B7;
+AECD;AECD;1101 1165 11B8;AECD;1101 1165 11B8;
+AECE;AECE;1101 1165 11B9;AECE;1101 1165 11B9;
+AECF;AECF;1101 1165 11BA;AECF;1101 1165 11BA;
+AED0;AED0;1101 1165 11BB;AED0;1101 1165 11BB;
+AED1;AED1;1101 1165 11BC;AED1;1101 1165 11BC;
+AED2;AED2;1101 1165 11BD;AED2;1101 1165 11BD;
+AED3;AED3;1101 1165 11BE;AED3;1101 1165 11BE;
+AED4;AED4;1101 1165 11BF;AED4;1101 1165 11BF;
+AED5;AED5;1101 1165 11C0;AED5;1101 1165 11C0;
+AED6;AED6;1101 1165 11C1;AED6;1101 1165 11C1;
+AED7;AED7;1101 1165 11C2;AED7;1101 1165 11C2;
+AED8;AED8;1101 1166;AED8;1101 1166;
+AED9;AED9;1101 1166 11A8;AED9;1101 1166 11A8;
+AEDA;AEDA;1101 1166 11A9;AEDA;1101 1166 11A9;
+AEDB;AEDB;1101 1166 11AA;AEDB;1101 1166 11AA;
+AEDC;AEDC;1101 1166 11AB;AEDC;1101 1166 11AB;
+AEDD;AEDD;1101 1166 11AC;AEDD;1101 1166 11AC;
+AEDE;AEDE;1101 1166 11AD;AEDE;1101 1166 11AD;
+AEDF;AEDF;1101 1166 11AE;AEDF;1101 1166 11AE;
+AEE0;AEE0;1101 1166 11AF;AEE0;1101 1166 11AF;
+AEE1;AEE1;1101 1166 11B0;AEE1;1101 1166 11B0;
+AEE2;AEE2;1101 1166 11B1;AEE2;1101 1166 11B1;
+AEE3;AEE3;1101 1166 11B2;AEE3;1101 1166 11B2;
+AEE4;AEE4;1101 1166 11B3;AEE4;1101 1166 11B3;
+AEE5;AEE5;1101 1166 11B4;AEE5;1101 1166 11B4;
+AEE6;AEE6;1101 1166 11B5;AEE6;1101 1166 11B5;
+AEE7;AEE7;1101 1166 11B6;AEE7;1101 1166 11B6;
+AEE8;AEE8;1101 1166 11B7;AEE8;1101 1166 11B7;
+AEE9;AEE9;1101 1166 11B8;AEE9;1101 1166 11B8;
+AEEA;AEEA;1101 1166 11B9;AEEA;1101 1166 11B9;
+AEEB;AEEB;1101 1166 11BA;AEEB;1101 1166 11BA;
+AEEC;AEEC;1101 1166 11BB;AEEC;1101 1166 11BB;
+AEED;AEED;1101 1166 11BC;AEED;1101 1166 11BC;
+AEEE;AEEE;1101 1166 11BD;AEEE;1101 1166 11BD;
+AEEF;AEEF;1101 1166 11BE;AEEF;1101 1166 11BE;
+AEF0;AEF0;1101 1166 11BF;AEF0;1101 1166 11BF;
+AEF1;AEF1;1101 1166 11C0;AEF1;1101 1166 11C0;
+AEF2;AEF2;1101 1166 11C1;AEF2;1101 1166 11C1;
+AEF3;AEF3;1101 1166 11C2;AEF3;1101 1166 11C2;
+AEF4;AEF4;1101 1167;AEF4;1101 1167;
+AEF5;AEF5;1101 1167 11A8;AEF5;1101 1167 11A8;
+AEF6;AEF6;1101 1167 11A9;AEF6;1101 1167 11A9;
+AEF7;AEF7;1101 1167 11AA;AEF7;1101 1167 11AA;
+AEF8;AEF8;1101 1167 11AB;AEF8;1101 1167 11AB;
+AEF9;AEF9;1101 1167 11AC;AEF9;1101 1167 11AC;
+AEFA;AEFA;1101 1167 11AD;AEFA;1101 1167 11AD;
+AEFB;AEFB;1101 1167 11AE;AEFB;1101 1167 11AE;
+AEFC;AEFC;1101 1167 11AF;AEFC;1101 1167 11AF;
+AEFD;AEFD;1101 1167 11B0;AEFD;1101 1167 11B0;
+AEFE;AEFE;1101 1167 11B1;AEFE;1101 1167 11B1;
+AEFF;AEFF;1101 1167 11B2;AEFF;1101 1167 11B2;
+AF00;AF00;1101 1167 11B3;AF00;1101 1167 11B3;
+AF01;AF01;1101 1167 11B4;AF01;1101 1167 11B4;
+AF02;AF02;1101 1167 11B5;AF02;1101 1167 11B5;
+AF03;AF03;1101 1167 11B6;AF03;1101 1167 11B6;
+AF04;AF04;1101 1167 11B7;AF04;1101 1167 11B7;
+AF05;AF05;1101 1167 11B8;AF05;1101 1167 11B8;
+AF06;AF06;1101 1167 11B9;AF06;1101 1167 11B9;
+AF07;AF07;1101 1167 11BA;AF07;1101 1167 11BA;
+AF08;AF08;1101 1167 11BB;AF08;1101 1167 11BB;
+AF09;AF09;1101 1167 11BC;AF09;1101 1167 11BC;
+AF0A;AF0A;1101 1167 11BD;AF0A;1101 1167 11BD;
+AF0B;AF0B;1101 1167 11BE;AF0B;1101 1167 11BE;
+AF0C;AF0C;1101 1167 11BF;AF0C;1101 1167 11BF;
+AF0D;AF0D;1101 1167 11C0;AF0D;1101 1167 11C0;
+AF0E;AF0E;1101 1167 11C1;AF0E;1101 1167 11C1;
+AF0F;AF0F;1101 1167 11C2;AF0F;1101 1167 11C2;
+AF10;AF10;1101 1168;AF10;1101 1168;
+AF11;AF11;1101 1168 11A8;AF11;1101 1168 11A8;
+AF12;AF12;1101 1168 11A9;AF12;1101 1168 11A9;
+AF13;AF13;1101 1168 11AA;AF13;1101 1168 11AA;
+AF14;AF14;1101 1168 11AB;AF14;1101 1168 11AB;
+AF15;AF15;1101 1168 11AC;AF15;1101 1168 11AC;
+AF16;AF16;1101 1168 11AD;AF16;1101 1168 11AD;
+AF17;AF17;1101 1168 11AE;AF17;1101 1168 11AE;
+AF18;AF18;1101 1168 11AF;AF18;1101 1168 11AF;
+AF19;AF19;1101 1168 11B0;AF19;1101 1168 11B0;
+AF1A;AF1A;1101 1168 11B1;AF1A;1101 1168 11B1;
+AF1B;AF1B;1101 1168 11B2;AF1B;1101 1168 11B2;
+AF1C;AF1C;1101 1168 11B3;AF1C;1101 1168 11B3;
+AF1D;AF1D;1101 1168 11B4;AF1D;1101 1168 11B4;
+AF1E;AF1E;1101 1168 11B5;AF1E;1101 1168 11B5;
+AF1F;AF1F;1101 1168 11B6;AF1F;1101 1168 11B6;
+AF20;AF20;1101 1168 11B7;AF20;1101 1168 11B7;
+AF21;AF21;1101 1168 11B8;AF21;1101 1168 11B8;
+AF22;AF22;1101 1168 11B9;AF22;1101 1168 11B9;
+AF23;AF23;1101 1168 11BA;AF23;1101 1168 11BA;
+AF24;AF24;1101 1168 11BB;AF24;1101 1168 11BB;
+AF25;AF25;1101 1168 11BC;AF25;1101 1168 11BC;
+AF26;AF26;1101 1168 11BD;AF26;1101 1168 11BD;
+AF27;AF27;1101 1168 11BE;AF27;1101 1168 11BE;
+AF28;AF28;1101 1168 11BF;AF28;1101 1168 11BF;
+AF29;AF29;1101 1168 11C0;AF29;1101 1168 11C0;
+AF2A;AF2A;1101 1168 11C1;AF2A;1101 1168 11C1;
+AF2B;AF2B;1101 1168 11C2;AF2B;1101 1168 11C2;
+AF2C;AF2C;1101 1169;AF2C;1101 1169;
+AF2D;AF2D;1101 1169 11A8;AF2D;1101 1169 11A8;
+AF2E;AF2E;1101 1169 11A9;AF2E;1101 1169 11A9;
+AF2F;AF2F;1101 1169 11AA;AF2F;1101 1169 11AA;
+AF30;AF30;1101 1169 11AB;AF30;1101 1169 11AB;
+AF31;AF31;1101 1169 11AC;AF31;1101 1169 11AC;
+AF32;AF32;1101 1169 11AD;AF32;1101 1169 11AD;
+AF33;AF33;1101 1169 11AE;AF33;1101 1169 11AE;
+AF34;AF34;1101 1169 11AF;AF34;1101 1169 11AF;
+AF35;AF35;1101 1169 11B0;AF35;1101 1169 11B0;
+AF36;AF36;1101 1169 11B1;AF36;1101 1169 11B1;
+AF37;AF37;1101 1169 11B2;AF37;1101 1169 11B2;
+AF38;AF38;1101 1169 11B3;AF38;1101 1169 11B3;
+AF39;AF39;1101 1169 11B4;AF39;1101 1169 11B4;
+AF3A;AF3A;1101 1169 11B5;AF3A;1101 1169 11B5;
+AF3B;AF3B;1101 1169 11B6;AF3B;1101 1169 11B6;
+AF3C;AF3C;1101 1169 11B7;AF3C;1101 1169 11B7;
+AF3D;AF3D;1101 1169 11B8;AF3D;1101 1169 11B8;
+AF3E;AF3E;1101 1169 11B9;AF3E;1101 1169 11B9;
+AF3F;AF3F;1101 1169 11BA;AF3F;1101 1169 11BA;
+AF40;AF40;1101 1169 11BB;AF40;1101 1169 11BB;
+AF41;AF41;1101 1169 11BC;AF41;1101 1169 11BC;
+AF42;AF42;1101 1169 11BD;AF42;1101 1169 11BD;
+AF43;AF43;1101 1169 11BE;AF43;1101 1169 11BE;
+AF44;AF44;1101 1169 11BF;AF44;1101 1169 11BF;
+AF45;AF45;1101 1169 11C0;AF45;1101 1169 11C0;
+AF46;AF46;1101 1169 11C1;AF46;1101 1169 11C1;
+AF47;AF47;1101 1169 11C2;AF47;1101 1169 11C2;
+AF48;AF48;1101 116A;AF48;1101 116A;
+AF49;AF49;1101 116A 11A8;AF49;1101 116A 11A8;
+AF4A;AF4A;1101 116A 11A9;AF4A;1101 116A 11A9;
+AF4B;AF4B;1101 116A 11AA;AF4B;1101 116A 11AA;
+AF4C;AF4C;1101 116A 11AB;AF4C;1101 116A 11AB;
+AF4D;AF4D;1101 116A 11AC;AF4D;1101 116A 11AC;
+AF4E;AF4E;1101 116A 11AD;AF4E;1101 116A 11AD;
+AF4F;AF4F;1101 116A 11AE;AF4F;1101 116A 11AE;
+AF50;AF50;1101 116A 11AF;AF50;1101 116A 11AF;
+AF51;AF51;1101 116A 11B0;AF51;1101 116A 11B0;
+AF52;AF52;1101 116A 11B1;AF52;1101 116A 11B1;
+AF53;AF53;1101 116A 11B2;AF53;1101 116A 11B2;
+AF54;AF54;1101 116A 11B3;AF54;1101 116A 11B3;
+AF55;AF55;1101 116A 11B4;AF55;1101 116A 11B4;
+AF56;AF56;1101 116A 11B5;AF56;1101 116A 11B5;
+AF57;AF57;1101 116A 11B6;AF57;1101 116A 11B6;
+AF58;AF58;1101 116A 11B7;AF58;1101 116A 11B7;
+AF59;AF59;1101 116A 11B8;AF59;1101 116A 11B8;
+AF5A;AF5A;1101 116A 11B9;AF5A;1101 116A 11B9;
+AF5B;AF5B;1101 116A 11BA;AF5B;1101 116A 11BA;
+AF5C;AF5C;1101 116A 11BB;AF5C;1101 116A 11BB;
+AF5D;AF5D;1101 116A 11BC;AF5D;1101 116A 11BC;
+AF5E;AF5E;1101 116A 11BD;AF5E;1101 116A 11BD;
+AF5F;AF5F;1101 116A 11BE;AF5F;1101 116A 11BE;
+AF60;AF60;1101 116A 11BF;AF60;1101 116A 11BF;
+AF61;AF61;1101 116A 11C0;AF61;1101 116A 11C0;
+AF62;AF62;1101 116A 11C1;AF62;1101 116A 11C1;
+AF63;AF63;1101 116A 11C2;AF63;1101 116A 11C2;
+AF64;AF64;1101 116B;AF64;1101 116B;
+AF65;AF65;1101 116B 11A8;AF65;1101 116B 11A8;
+AF66;AF66;1101 116B 11A9;AF66;1101 116B 11A9;
+AF67;AF67;1101 116B 11AA;AF67;1101 116B 11AA;
+AF68;AF68;1101 116B 11AB;AF68;1101 116B 11AB;
+AF69;AF69;1101 116B 11AC;AF69;1101 116B 11AC;
+AF6A;AF6A;1101 116B 11AD;AF6A;1101 116B 11AD;
+AF6B;AF6B;1101 116B 11AE;AF6B;1101 116B 11AE;
+AF6C;AF6C;1101 116B 11AF;AF6C;1101 116B 11AF;
+AF6D;AF6D;1101 116B 11B0;AF6D;1101 116B 11B0;
+AF6E;AF6E;1101 116B 11B1;AF6E;1101 116B 11B1;
+AF6F;AF6F;1101 116B 11B2;AF6F;1101 116B 11B2;
+AF70;AF70;1101 116B 11B3;AF70;1101 116B 11B3;
+AF71;AF71;1101 116B 11B4;AF71;1101 116B 11B4;
+AF72;AF72;1101 116B 11B5;AF72;1101 116B 11B5;
+AF73;AF73;1101 116B 11B6;AF73;1101 116B 11B6;
+AF74;AF74;1101 116B 11B7;AF74;1101 116B 11B7;
+AF75;AF75;1101 116B 11B8;AF75;1101 116B 11B8;
+AF76;AF76;1101 116B 11B9;AF76;1101 116B 11B9;
+AF77;AF77;1101 116B 11BA;AF77;1101 116B 11BA;
+AF78;AF78;1101 116B 11BB;AF78;1101 116B 11BB;
+AF79;AF79;1101 116B 11BC;AF79;1101 116B 11BC;
+AF7A;AF7A;1101 116B 11BD;AF7A;1101 116B 11BD;
+AF7B;AF7B;1101 116B 11BE;AF7B;1101 116B 11BE;
+AF7C;AF7C;1101 116B 11BF;AF7C;1101 116B 11BF;
+AF7D;AF7D;1101 116B 11C0;AF7D;1101 116B 11C0;
+AF7E;AF7E;1101 116B 11C1;AF7E;1101 116B 11C1;
+AF7F;AF7F;1101 116B 11C2;AF7F;1101 116B 11C2;
+AF80;AF80;1101 116C;AF80;1101 116C;
+AF81;AF81;1101 116C 11A8;AF81;1101 116C 11A8;
+AF82;AF82;1101 116C 11A9;AF82;1101 116C 11A9;
+AF83;AF83;1101 116C 11AA;AF83;1101 116C 11AA;
+AF84;AF84;1101 116C 11AB;AF84;1101 116C 11AB;
+AF85;AF85;1101 116C 11AC;AF85;1101 116C 11AC;
+AF86;AF86;1101 116C 11AD;AF86;1101 116C 11AD;
+AF87;AF87;1101 116C 11AE;AF87;1101 116C 11AE;
+AF88;AF88;1101 116C 11AF;AF88;1101 116C 11AF;
+AF89;AF89;1101 116C 11B0;AF89;1101 116C 11B0;
+AF8A;AF8A;1101 116C 11B1;AF8A;1101 116C 11B1;
+AF8B;AF8B;1101 116C 11B2;AF8B;1101 116C 11B2;
+AF8C;AF8C;1101 116C 11B3;AF8C;1101 116C 11B3;
+AF8D;AF8D;1101 116C 11B4;AF8D;1101 116C 11B4;
+AF8E;AF8E;1101 116C 11B5;AF8E;1101 116C 11B5;
+AF8F;AF8F;1101 116C 11B6;AF8F;1101 116C 11B6;
+AF90;AF90;1101 116C 11B7;AF90;1101 116C 11B7;
+AF91;AF91;1101 116C 11B8;AF91;1101 116C 11B8;
+AF92;AF92;1101 116C 11B9;AF92;1101 116C 11B9;
+AF93;AF93;1101 116C 11BA;AF93;1101 116C 11BA;
+AF94;AF94;1101 116C 11BB;AF94;1101 116C 11BB;
+AF95;AF95;1101 116C 11BC;AF95;1101 116C 11BC;
+AF96;AF96;1101 116C 11BD;AF96;1101 116C 11BD;
+AF97;AF97;1101 116C 11BE;AF97;1101 116C 11BE;
+AF98;AF98;1101 116C 11BF;AF98;1101 116C 11BF;
+AF99;AF99;1101 116C 11C0;AF99;1101 116C 11C0;
+AF9A;AF9A;1101 116C 11C1;AF9A;1101 116C 11C1;
+AF9B;AF9B;1101 116C 11C2;AF9B;1101 116C 11C2;
+AF9C;AF9C;1101 116D;AF9C;1101 116D;
+AF9D;AF9D;1101 116D 11A8;AF9D;1101 116D 11A8;
+AF9E;AF9E;1101 116D 11A9;AF9E;1101 116D 11A9;
+AF9F;AF9F;1101 116D 11AA;AF9F;1101 116D 11AA;
+AFA0;AFA0;1101 116D 11AB;AFA0;1101 116D 11AB;
+AFA1;AFA1;1101 116D 11AC;AFA1;1101 116D 11AC;
+AFA2;AFA2;1101 116D 11AD;AFA2;1101 116D 11AD;
+AFA3;AFA3;1101 116D 11AE;AFA3;1101 116D 11AE;
+AFA4;AFA4;1101 116D 11AF;AFA4;1101 116D 11AF;
+AFA5;AFA5;1101 116D 11B0;AFA5;1101 116D 11B0;
+AFA6;AFA6;1101 116D 11B1;AFA6;1101 116D 11B1;
+AFA7;AFA7;1101 116D 11B2;AFA7;1101 116D 11B2;
+AFA8;AFA8;1101 116D 11B3;AFA8;1101 116D 11B3;
+AFA9;AFA9;1101 116D 11B4;AFA9;1101 116D 11B4;
+AFAA;AFAA;1101 116D 11B5;AFAA;1101 116D 11B5;
+AFAB;AFAB;1101 116D 11B6;AFAB;1101 116D 11B6;
+AFAC;AFAC;1101 116D 11B7;AFAC;1101 116D 11B7;
+AFAD;AFAD;1101 116D 11B8;AFAD;1101 116D 11B8;
+AFAE;AFAE;1101 116D 11B9;AFAE;1101 116D 11B9;
+AFAF;AFAF;1101 116D 11BA;AFAF;1101 116D 11BA;
+AFB0;AFB0;1101 116D 11BB;AFB0;1101 116D 11BB;
+AFB1;AFB1;1101 116D 11BC;AFB1;1101 116D 11BC;
+AFB2;AFB2;1101 116D 11BD;AFB2;1101 116D 11BD;
+AFB3;AFB3;1101 116D 11BE;AFB3;1101 116D 11BE;
+AFB4;AFB4;1101 116D 11BF;AFB4;1101 116D 11BF;
+AFB5;AFB5;1101 116D 11C0;AFB5;1101 116D 11C0;
+AFB6;AFB6;1101 116D 11C1;AFB6;1101 116D 11C1;
+AFB7;AFB7;1101 116D 11C2;AFB7;1101 116D 11C2;
+AFB8;AFB8;1101 116E;AFB8;1101 116E;
+AFB9;AFB9;1101 116E 11A8;AFB9;1101 116E 11A8;
+AFBA;AFBA;1101 116E 11A9;AFBA;1101 116E 11A9;
+AFBB;AFBB;1101 116E 11AA;AFBB;1101 116E 11AA;
+AFBC;AFBC;1101 116E 11AB;AFBC;1101 116E 11AB;
+AFBD;AFBD;1101 116E 11AC;AFBD;1101 116E 11AC;
+AFBE;AFBE;1101 116E 11AD;AFBE;1101 116E 11AD;
+AFBF;AFBF;1101 116E 11AE;AFBF;1101 116E 11AE;
+AFC0;AFC0;1101 116E 11AF;AFC0;1101 116E 11AF;
+AFC1;AFC1;1101 116E 11B0;AFC1;1101 116E 11B0;
+AFC2;AFC2;1101 116E 11B1;AFC2;1101 116E 11B1;
+AFC3;AFC3;1101 116E 11B2;AFC3;1101 116E 11B2;
+AFC4;AFC4;1101 116E 11B3;AFC4;1101 116E 11B3;
+AFC5;AFC5;1101 116E 11B4;AFC5;1101 116E 11B4;
+AFC6;AFC6;1101 116E 11B5;AFC6;1101 116E 11B5;
+AFC7;AFC7;1101 116E 11B6;AFC7;1101 116E 11B6;
+AFC8;AFC8;1101 116E 11B7;AFC8;1101 116E 11B7;
+AFC9;AFC9;1101 116E 11B8;AFC9;1101 116E 11B8;
+AFCA;AFCA;1101 116E 11B9;AFCA;1101 116E 11B9;
+AFCB;AFCB;1101 116E 11BA;AFCB;1101 116E 11BA;
+AFCC;AFCC;1101 116E 11BB;AFCC;1101 116E 11BB;
+AFCD;AFCD;1101 116E 11BC;AFCD;1101 116E 11BC;
+AFCE;AFCE;1101 116E 11BD;AFCE;1101 116E 11BD;
+AFCF;AFCF;1101 116E 11BE;AFCF;1101 116E 11BE;
+AFD0;AFD0;1101 116E 11BF;AFD0;1101 116E 11BF;
+AFD1;AFD1;1101 116E 11C0;AFD1;1101 116E 11C0;
+AFD2;AFD2;1101 116E 11C1;AFD2;1101 116E 11C1;
+AFD3;AFD3;1101 116E 11C2;AFD3;1101 116E 11C2;
+AFD4;AFD4;1101 116F;AFD4;1101 116F;
+AFD5;AFD5;1101 116F 11A8;AFD5;1101 116F 11A8;
+AFD6;AFD6;1101 116F 11A9;AFD6;1101 116F 11A9;
+AFD7;AFD7;1101 116F 11AA;AFD7;1101 116F 11AA;
+AFD8;AFD8;1101 116F 11AB;AFD8;1101 116F 11AB;
+AFD9;AFD9;1101 116F 11AC;AFD9;1101 116F 11AC;
+AFDA;AFDA;1101 116F 11AD;AFDA;1101 116F 11AD;
+AFDB;AFDB;1101 116F 11AE;AFDB;1101 116F 11AE;
+AFDC;AFDC;1101 116F 11AF;AFDC;1101 116F 11AF;
+AFDD;AFDD;1101 116F 11B0;AFDD;1101 116F 11B0;
+AFDE;AFDE;1101 116F 11B1;AFDE;1101 116F 11B1;
+AFDF;AFDF;1101 116F 11B2;AFDF;1101 116F 11B2;
+AFE0;AFE0;1101 116F 11B3;AFE0;1101 116F 11B3;
+AFE1;AFE1;1101 116F 11B4;AFE1;1101 116F 11B4;
+AFE2;AFE2;1101 116F 11B5;AFE2;1101 116F 11B5;
+AFE3;AFE3;1101 116F 11B6;AFE3;1101 116F 11B6;
+AFE4;AFE4;1101 116F 11B7;AFE4;1101 116F 11B7;
+AFE5;AFE5;1101 116F 11B8;AFE5;1101 116F 11B8;
+AFE6;AFE6;1101 116F 11B9;AFE6;1101 116F 11B9;
+AFE7;AFE7;1101 116F 11BA;AFE7;1101 116F 11BA;
+AFE8;AFE8;1101 116F 11BB;AFE8;1101 116F 11BB;
+AFE9;AFE9;1101 116F 11BC;AFE9;1101 116F 11BC;
+AFEA;AFEA;1101 116F 11BD;AFEA;1101 116F 11BD;
+AFEB;AFEB;1101 116F 11BE;AFEB;1101 116F 11BE;
+AFEC;AFEC;1101 116F 11BF;AFEC;1101 116F 11BF;
+AFED;AFED;1101 116F 11C0;AFED;1101 116F 11C0;
+AFEE;AFEE;1101 116F 11C1;AFEE;1101 116F 11C1;
+AFEF;AFEF;1101 116F 11C2;AFEF;1101 116F 11C2;
+AFF0;AFF0;1101 1170;AFF0;1101 1170;
+AFF1;AFF1;1101 1170 11A8;AFF1;1101 1170 11A8;
+AFF2;AFF2;1101 1170 11A9;AFF2;1101 1170 11A9;
+AFF3;AFF3;1101 1170 11AA;AFF3;1101 1170 11AA;
+AFF4;AFF4;1101 1170 11AB;AFF4;1101 1170 11AB;
+AFF5;AFF5;1101 1170 11AC;AFF5;1101 1170 11AC;
+AFF6;AFF6;1101 1170 11AD;AFF6;1101 1170 11AD;
+AFF7;AFF7;1101 1170 11AE;AFF7;1101 1170 11AE;
+AFF8;AFF8;1101 1170 11AF;AFF8;1101 1170 11AF;
+AFF9;AFF9;1101 1170 11B0;AFF9;1101 1170 11B0;
+AFFA;AFFA;1101 1170 11B1;AFFA;1101 1170 11B1;
+AFFB;AFFB;1101 1170 11B2;AFFB;1101 1170 11B2;
+AFFC;AFFC;1101 1170 11B3;AFFC;1101 1170 11B3;
+AFFD;AFFD;1101 1170 11B4;AFFD;1101 1170 11B4;
+AFFE;AFFE;1101 1170 11B5;AFFE;1101 1170 11B5;
+AFFF;AFFF;1101 1170 11B6;AFFF;1101 1170 11B6;
+B000;B000;1101 1170 11B7;B000;1101 1170 11B7;
+B001;B001;1101 1170 11B8;B001;1101 1170 11B8;
+B002;B002;1101 1170 11B9;B002;1101 1170 11B9;
+B003;B003;1101 1170 11BA;B003;1101 1170 11BA;
+B004;B004;1101 1170 11BB;B004;1101 1170 11BB;
+B005;B005;1101 1170 11BC;B005;1101 1170 11BC;
+B006;B006;1101 1170 11BD;B006;1101 1170 11BD;
+B007;B007;1101 1170 11BE;B007;1101 1170 11BE;
+B008;B008;1101 1170 11BF;B008;1101 1170 11BF;
+B009;B009;1101 1170 11C0;B009;1101 1170 11C0;
+B00A;B00A;1101 1170 11C1;B00A;1101 1170 11C1;
+B00B;B00B;1101 1170 11C2;B00B;1101 1170 11C2;
+B00C;B00C;1101 1171;B00C;1101 1171;
+B00D;B00D;1101 1171 11A8;B00D;1101 1171 11A8;
+B00E;B00E;1101 1171 11A9;B00E;1101 1171 11A9;
+B00F;B00F;1101 1171 11AA;B00F;1101 1171 11AA;
+B010;B010;1101 1171 11AB;B010;1101 1171 11AB;
+B011;B011;1101 1171 11AC;B011;1101 1171 11AC;
+B012;B012;1101 1171 11AD;B012;1101 1171 11AD;
+B013;B013;1101 1171 11AE;B013;1101 1171 11AE;
+B014;B014;1101 1171 11AF;B014;1101 1171 11AF;
+B015;B015;1101 1171 11B0;B015;1101 1171 11B0;
+B016;B016;1101 1171 11B1;B016;1101 1171 11B1;
+B017;B017;1101 1171 11B2;B017;1101 1171 11B2;
+B018;B018;1101 1171 11B3;B018;1101 1171 11B3;
+B019;B019;1101 1171 11B4;B019;1101 1171 11B4;
+B01A;B01A;1101 1171 11B5;B01A;1101 1171 11B5;
+B01B;B01B;1101 1171 11B6;B01B;1101 1171 11B6;
+B01C;B01C;1101 1171 11B7;B01C;1101 1171 11B7;
+B01D;B01D;1101 1171 11B8;B01D;1101 1171 11B8;
+B01E;B01E;1101 1171 11B9;B01E;1101 1171 11B9;
+B01F;B01F;1101 1171 11BA;B01F;1101 1171 11BA;
+B020;B020;1101 1171 11BB;B020;1101 1171 11BB;
+B021;B021;1101 1171 11BC;B021;1101 1171 11BC;
+B022;B022;1101 1171 11BD;B022;1101 1171 11BD;
+B023;B023;1101 1171 11BE;B023;1101 1171 11BE;
+B024;B024;1101 1171 11BF;B024;1101 1171 11BF;
+B025;B025;1101 1171 11C0;B025;1101 1171 11C0;
+B026;B026;1101 1171 11C1;B026;1101 1171 11C1;
+B027;B027;1101 1171 11C2;B027;1101 1171 11C2;
+B028;B028;1101 1172;B028;1101 1172;
+B029;B029;1101 1172 11A8;B029;1101 1172 11A8;
+B02A;B02A;1101 1172 11A9;B02A;1101 1172 11A9;
+B02B;B02B;1101 1172 11AA;B02B;1101 1172 11AA;
+B02C;B02C;1101 1172 11AB;B02C;1101 1172 11AB;
+B02D;B02D;1101 1172 11AC;B02D;1101 1172 11AC;
+B02E;B02E;1101 1172 11AD;B02E;1101 1172 11AD;
+B02F;B02F;1101 1172 11AE;B02F;1101 1172 11AE;
+B030;B030;1101 1172 11AF;B030;1101 1172 11AF;
+B031;B031;1101 1172 11B0;B031;1101 1172 11B0;
+B032;B032;1101 1172 11B1;B032;1101 1172 11B1;
+B033;B033;1101 1172 11B2;B033;1101 1172 11B2;
+B034;B034;1101 1172 11B3;B034;1101 1172 11B3;
+B035;B035;1101 1172 11B4;B035;1101 1172 11B4;
+B036;B036;1101 1172 11B5;B036;1101 1172 11B5;
+B037;B037;1101 1172 11B6;B037;1101 1172 11B6;
+B038;B038;1101 1172 11B7;B038;1101 1172 11B7;
+B039;B039;1101 1172 11B8;B039;1101 1172 11B8;
+B03A;B03A;1101 1172 11B9;B03A;1101 1172 11B9;
+B03B;B03B;1101 1172 11BA;B03B;1101 1172 11BA;
+B03C;B03C;1101 1172 11BB;B03C;1101 1172 11BB;
+B03D;B03D;1101 1172 11BC;B03D;1101 1172 11BC;
+B03E;B03E;1101 1172 11BD;B03E;1101 1172 11BD;
+B03F;B03F;1101 1172 11BE;B03F;1101 1172 11BE;
+B040;B040;1101 1172 11BF;B040;1101 1172 11BF;
+B041;B041;1101 1172 11C0;B041;1101 1172 11C0;
+B042;B042;1101 1172 11C1;B042;1101 1172 11C1;
+B043;B043;1101 1172 11C2;B043;1101 1172 11C2;
+B044;B044;1101 1173;B044;1101 1173;
+B045;B045;1101 1173 11A8;B045;1101 1173 11A8;
+B046;B046;1101 1173 11A9;B046;1101 1173 11A9;
+B047;B047;1101 1173 11AA;B047;1101 1173 11AA;
+B048;B048;1101 1173 11AB;B048;1101 1173 11AB;
+B049;B049;1101 1173 11AC;B049;1101 1173 11AC;
+B04A;B04A;1101 1173 11AD;B04A;1101 1173 11AD;
+B04B;B04B;1101 1173 11AE;B04B;1101 1173 11AE;
+B04C;B04C;1101 1173 11AF;B04C;1101 1173 11AF;
+B04D;B04D;1101 1173 11B0;B04D;1101 1173 11B0;
+B04E;B04E;1101 1173 11B1;B04E;1101 1173 11B1;
+B04F;B04F;1101 1173 11B2;B04F;1101 1173 11B2;
+B050;B050;1101 1173 11B3;B050;1101 1173 11B3;
+B051;B051;1101 1173 11B4;B051;1101 1173 11B4;
+B052;B052;1101 1173 11B5;B052;1101 1173 11B5;
+B053;B053;1101 1173 11B6;B053;1101 1173 11B6;
+B054;B054;1101 1173 11B7;B054;1101 1173 11B7;
+B055;B055;1101 1173 11B8;B055;1101 1173 11B8;
+B056;B056;1101 1173 11B9;B056;1101 1173 11B9;
+B057;B057;1101 1173 11BA;B057;1101 1173 11BA;
+B058;B058;1101 1173 11BB;B058;1101 1173 11BB;
+B059;B059;1101 1173 11BC;B059;1101 1173 11BC;
+B05A;B05A;1101 1173 11BD;B05A;1101 1173 11BD;
+B05B;B05B;1101 1173 11BE;B05B;1101 1173 11BE;
+B05C;B05C;1101 1173 11BF;B05C;1101 1173 11BF;
+B05D;B05D;1101 1173 11C0;B05D;1101 1173 11C0;
+B05E;B05E;1101 1173 11C1;B05E;1101 1173 11C1;
+B05F;B05F;1101 1173 11C2;B05F;1101 1173 11C2;
+B060;B060;1101 1174;B060;1101 1174;
+B061;B061;1101 1174 11A8;B061;1101 1174 11A8;
+B062;B062;1101 1174 11A9;B062;1101 1174 11A9;
+B063;B063;1101 1174 11AA;B063;1101 1174 11AA;
+B064;B064;1101 1174 11AB;B064;1101 1174 11AB;
+B065;B065;1101 1174 11AC;B065;1101 1174 11AC;
+B066;B066;1101 1174 11AD;B066;1101 1174 11AD;
+B067;B067;1101 1174 11AE;B067;1101 1174 11AE;
+B068;B068;1101 1174 11AF;B068;1101 1174 11AF;
+B069;B069;1101 1174 11B0;B069;1101 1174 11B0;
+B06A;B06A;1101 1174 11B1;B06A;1101 1174 11B1;
+B06B;B06B;1101 1174 11B2;B06B;1101 1174 11B2;
+B06C;B06C;1101 1174 11B3;B06C;1101 1174 11B3;
+B06D;B06D;1101 1174 11B4;B06D;1101 1174 11B4;
+B06E;B06E;1101 1174 11B5;B06E;1101 1174 11B5;
+B06F;B06F;1101 1174 11B6;B06F;1101 1174 11B6;
+B070;B070;1101 1174 11B7;B070;1101 1174 11B7;
+B071;B071;1101 1174 11B8;B071;1101 1174 11B8;
+B072;B072;1101 1174 11B9;B072;1101 1174 11B9;
+B073;B073;1101 1174 11BA;B073;1101 1174 11BA;
+B074;B074;1101 1174 11BB;B074;1101 1174 11BB;
+B075;B075;1101 1174 11BC;B075;1101 1174 11BC;
+B076;B076;1101 1174 11BD;B076;1101 1174 11BD;
+B077;B077;1101 1174 11BE;B077;1101 1174 11BE;
+B078;B078;1101 1174 11BF;B078;1101 1174 11BF;
+B079;B079;1101 1174 11C0;B079;1101 1174 11C0;
+B07A;B07A;1101 1174 11C1;B07A;1101 1174 11C1;
+B07B;B07B;1101 1174 11C2;B07B;1101 1174 11C2;
+B07C;B07C;1101 1175;B07C;1101 1175;
+B07D;B07D;1101 1175 11A8;B07D;1101 1175 11A8;
+B07E;B07E;1101 1175 11A9;B07E;1101 1175 11A9;
+B07F;B07F;1101 1175 11AA;B07F;1101 1175 11AA;
+B080;B080;1101 1175 11AB;B080;1101 1175 11AB;
+B081;B081;1101 1175 11AC;B081;1101 1175 11AC;
+B082;B082;1101 1175 11AD;B082;1101 1175 11AD;
+B083;B083;1101 1175 11AE;B083;1101 1175 11AE;
+B084;B084;1101 1175 11AF;B084;1101 1175 11AF;
+B085;B085;1101 1175 11B0;B085;1101 1175 11B0;
+B086;B086;1101 1175 11B1;B086;1101 1175 11B1;
+B087;B087;1101 1175 11B2;B087;1101 1175 11B2;
+B088;B088;1101 1175 11B3;B088;1101 1175 11B3;
+B089;B089;1101 1175 11B4;B089;1101 1175 11B4;
+B08A;B08A;1101 1175 11B5;B08A;1101 1175 11B5;
+B08B;B08B;1101 1175 11B6;B08B;1101 1175 11B6;
+B08C;B08C;1101 1175 11B7;B08C;1101 1175 11B7;
+B08D;B08D;1101 1175 11B8;B08D;1101 1175 11B8;
+B08E;B08E;1101 1175 11B9;B08E;1101 1175 11B9;
+B08F;B08F;1101 1175 11BA;B08F;1101 1175 11BA;
+B090;B090;1101 1175 11BB;B090;1101 1175 11BB;
+B091;B091;1101 1175 11BC;B091;1101 1175 11BC;
+B092;B092;1101 1175 11BD;B092;1101 1175 11BD;
+B093;B093;1101 1175 11BE;B093;1101 1175 11BE;
+B094;B094;1101 1175 11BF;B094;1101 1175 11BF;
+B095;B095;1101 1175 11C0;B095;1101 1175 11C0;
+B096;B096;1101 1175 11C1;B096;1101 1175 11C1;
+B097;B097;1101 1175 11C2;B097;1101 1175 11C2;
+B098;B098;1102 1161;B098;1102 1161;
+B099;B099;1102 1161 11A8;B099;1102 1161 11A8;
+B09A;B09A;1102 1161 11A9;B09A;1102 1161 11A9;
+B09B;B09B;1102 1161 11AA;B09B;1102 1161 11AA;
+B09C;B09C;1102 1161 11AB;B09C;1102 1161 11AB;
+B09D;B09D;1102 1161 11AC;B09D;1102 1161 11AC;
+B09E;B09E;1102 1161 11AD;B09E;1102 1161 11AD;
+B09F;B09F;1102 1161 11AE;B09F;1102 1161 11AE;
+B0A0;B0A0;1102 1161 11AF;B0A0;1102 1161 11AF;
+B0A1;B0A1;1102 1161 11B0;B0A1;1102 1161 11B0;
+B0A2;B0A2;1102 1161 11B1;B0A2;1102 1161 11B1;
+B0A3;B0A3;1102 1161 11B2;B0A3;1102 1161 11B2;
+B0A4;B0A4;1102 1161 11B3;B0A4;1102 1161 11B3;
+B0A5;B0A5;1102 1161 11B4;B0A5;1102 1161 11B4;
+B0A6;B0A6;1102 1161 11B5;B0A6;1102 1161 11B5;
+B0A7;B0A7;1102 1161 11B6;B0A7;1102 1161 11B6;
+B0A8;B0A8;1102 1161 11B7;B0A8;1102 1161 11B7;
+B0A9;B0A9;1102 1161 11B8;B0A9;1102 1161 11B8;
+B0AA;B0AA;1102 1161 11B9;B0AA;1102 1161 11B9;
+B0AB;B0AB;1102 1161 11BA;B0AB;1102 1161 11BA;
+B0AC;B0AC;1102 1161 11BB;B0AC;1102 1161 11BB;
+B0AD;B0AD;1102 1161 11BC;B0AD;1102 1161 11BC;
+B0AE;B0AE;1102 1161 11BD;B0AE;1102 1161 11BD;
+B0AF;B0AF;1102 1161 11BE;B0AF;1102 1161 11BE;
+B0B0;B0B0;1102 1161 11BF;B0B0;1102 1161 11BF;
+B0B1;B0B1;1102 1161 11C0;B0B1;1102 1161 11C0;
+B0B2;B0B2;1102 1161 11C1;B0B2;1102 1161 11C1;
+B0B3;B0B3;1102 1161 11C2;B0B3;1102 1161 11C2;
+B0B4;B0B4;1102 1162;B0B4;1102 1162;
+B0B5;B0B5;1102 1162 11A8;B0B5;1102 1162 11A8;
+B0B6;B0B6;1102 1162 11A9;B0B6;1102 1162 11A9;
+B0B7;B0B7;1102 1162 11AA;B0B7;1102 1162 11AA;
+B0B8;B0B8;1102 1162 11AB;B0B8;1102 1162 11AB;
+B0B9;B0B9;1102 1162 11AC;B0B9;1102 1162 11AC;
+B0BA;B0BA;1102 1162 11AD;B0BA;1102 1162 11AD;
+B0BB;B0BB;1102 1162 11AE;B0BB;1102 1162 11AE;
+B0BC;B0BC;1102 1162 11AF;B0BC;1102 1162 11AF;
+B0BD;B0BD;1102 1162 11B0;B0BD;1102 1162 11B0;
+B0BE;B0BE;1102 1162 11B1;B0BE;1102 1162 11B1;
+B0BF;B0BF;1102 1162 11B2;B0BF;1102 1162 11B2;
+B0C0;B0C0;1102 1162 11B3;B0C0;1102 1162 11B3;
+B0C1;B0C1;1102 1162 11B4;B0C1;1102 1162 11B4;
+B0C2;B0C2;1102 1162 11B5;B0C2;1102 1162 11B5;
+B0C3;B0C3;1102 1162 11B6;B0C3;1102 1162 11B6;
+B0C4;B0C4;1102 1162 11B7;B0C4;1102 1162 11B7;
+B0C5;B0C5;1102 1162 11B8;B0C5;1102 1162 11B8;
+B0C6;B0C6;1102 1162 11B9;B0C6;1102 1162 11B9;
+B0C7;B0C7;1102 1162 11BA;B0C7;1102 1162 11BA;
+B0C8;B0C8;1102 1162 11BB;B0C8;1102 1162 11BB;
+B0C9;B0C9;1102 1162 11BC;B0C9;1102 1162 11BC;
+B0CA;B0CA;1102 1162 11BD;B0CA;1102 1162 11BD;
+B0CB;B0CB;1102 1162 11BE;B0CB;1102 1162 11BE;
+B0CC;B0CC;1102 1162 11BF;B0CC;1102 1162 11BF;
+B0CD;B0CD;1102 1162 11C0;B0CD;1102 1162 11C0;
+B0CE;B0CE;1102 1162 11C1;B0CE;1102 1162 11C1;
+B0CF;B0CF;1102 1162 11C2;B0CF;1102 1162 11C2;
+B0D0;B0D0;1102 1163;B0D0;1102 1163;
+B0D1;B0D1;1102 1163 11A8;B0D1;1102 1163 11A8;
+B0D2;B0D2;1102 1163 11A9;B0D2;1102 1163 11A9;
+B0D3;B0D3;1102 1163 11AA;B0D3;1102 1163 11AA;
+B0D4;B0D4;1102 1163 11AB;B0D4;1102 1163 11AB;
+B0D5;B0D5;1102 1163 11AC;B0D5;1102 1163 11AC;
+B0D6;B0D6;1102 1163 11AD;B0D6;1102 1163 11AD;
+B0D7;B0D7;1102 1163 11AE;B0D7;1102 1163 11AE;
+B0D8;B0D8;1102 1163 11AF;B0D8;1102 1163 11AF;
+B0D9;B0D9;1102 1163 11B0;B0D9;1102 1163 11B0;
+B0DA;B0DA;1102 1163 11B1;B0DA;1102 1163 11B1;
+B0DB;B0DB;1102 1163 11B2;B0DB;1102 1163 11B2;
+B0DC;B0DC;1102 1163 11B3;B0DC;1102 1163 11B3;
+B0DD;B0DD;1102 1163 11B4;B0DD;1102 1163 11B4;
+B0DE;B0DE;1102 1163 11B5;B0DE;1102 1163 11B5;
+B0DF;B0DF;1102 1163 11B6;B0DF;1102 1163 11B6;
+B0E0;B0E0;1102 1163 11B7;B0E0;1102 1163 11B7;
+B0E1;B0E1;1102 1163 11B8;B0E1;1102 1163 11B8;
+B0E2;B0E2;1102 1163 11B9;B0E2;1102 1163 11B9;
+B0E3;B0E3;1102 1163 11BA;B0E3;1102 1163 11BA;
+B0E4;B0E4;1102 1163 11BB;B0E4;1102 1163 11BB;
+B0E5;B0E5;1102 1163 11BC;B0E5;1102 1163 11BC;
+B0E6;B0E6;1102 1163 11BD;B0E6;1102 1163 11BD;
+B0E7;B0E7;1102 1163 11BE;B0E7;1102 1163 11BE;
+B0E8;B0E8;1102 1163 11BF;B0E8;1102 1163 11BF;
+B0E9;B0E9;1102 1163 11C0;B0E9;1102 1163 11C0;
+B0EA;B0EA;1102 1163 11C1;B0EA;1102 1163 11C1;
+B0EB;B0EB;1102 1163 11C2;B0EB;1102 1163 11C2;
+B0EC;B0EC;1102 1164;B0EC;1102 1164;
+B0ED;B0ED;1102 1164 11A8;B0ED;1102 1164 11A8;
+B0EE;B0EE;1102 1164 11A9;B0EE;1102 1164 11A9;
+B0EF;B0EF;1102 1164 11AA;B0EF;1102 1164 11AA;
+B0F0;B0F0;1102 1164 11AB;B0F0;1102 1164 11AB;
+B0F1;B0F1;1102 1164 11AC;B0F1;1102 1164 11AC;
+B0F2;B0F2;1102 1164 11AD;B0F2;1102 1164 11AD;
+B0F3;B0F3;1102 1164 11AE;B0F3;1102 1164 11AE;
+B0F4;B0F4;1102 1164 11AF;B0F4;1102 1164 11AF;
+B0F5;B0F5;1102 1164 11B0;B0F5;1102 1164 11B0;
+B0F6;B0F6;1102 1164 11B1;B0F6;1102 1164 11B1;
+B0F7;B0F7;1102 1164 11B2;B0F7;1102 1164 11B2;
+B0F8;B0F8;1102 1164 11B3;B0F8;1102 1164 11B3;
+B0F9;B0F9;1102 1164 11B4;B0F9;1102 1164 11B4;
+B0FA;B0FA;1102 1164 11B5;B0FA;1102 1164 11B5;
+B0FB;B0FB;1102 1164 11B6;B0FB;1102 1164 11B6;
+B0FC;B0FC;1102 1164 11B7;B0FC;1102 1164 11B7;
+B0FD;B0FD;1102 1164 11B8;B0FD;1102 1164 11B8;
+B0FE;B0FE;1102 1164 11B9;B0FE;1102 1164 11B9;
+B0FF;B0FF;1102 1164 11BA;B0FF;1102 1164 11BA;
+B100;B100;1102 1164 11BB;B100;1102 1164 11BB;
+B101;B101;1102 1164 11BC;B101;1102 1164 11BC;
+B102;B102;1102 1164 11BD;B102;1102 1164 11BD;
+B103;B103;1102 1164 11BE;B103;1102 1164 11BE;
+B104;B104;1102 1164 11BF;B104;1102 1164 11BF;
+B105;B105;1102 1164 11C0;B105;1102 1164 11C0;
+B106;B106;1102 1164 11C1;B106;1102 1164 11C1;
+B107;B107;1102 1164 11C2;B107;1102 1164 11C2;
+B108;B108;1102 1165;B108;1102 1165;
+B109;B109;1102 1165 11A8;B109;1102 1165 11A8;
+B10A;B10A;1102 1165 11A9;B10A;1102 1165 11A9;
+B10B;B10B;1102 1165 11AA;B10B;1102 1165 11AA;
+B10C;B10C;1102 1165 11AB;B10C;1102 1165 11AB;
+B10D;B10D;1102 1165 11AC;B10D;1102 1165 11AC;
+B10E;B10E;1102 1165 11AD;B10E;1102 1165 11AD;
+B10F;B10F;1102 1165 11AE;B10F;1102 1165 11AE;
+B110;B110;1102 1165 11AF;B110;1102 1165 11AF;
+B111;B111;1102 1165 11B0;B111;1102 1165 11B0;
+B112;B112;1102 1165 11B1;B112;1102 1165 11B1;
+B113;B113;1102 1165 11B2;B113;1102 1165 11B2;
+B114;B114;1102 1165 11B3;B114;1102 1165 11B3;
+B115;B115;1102 1165 11B4;B115;1102 1165 11B4;
+B116;B116;1102 1165 11B5;B116;1102 1165 11B5;
+B117;B117;1102 1165 11B6;B117;1102 1165 11B6;
+B118;B118;1102 1165 11B7;B118;1102 1165 11B7;
+B119;B119;1102 1165 11B8;B119;1102 1165 11B8;
+B11A;B11A;1102 1165 11B9;B11A;1102 1165 11B9;
+B11B;B11B;1102 1165 11BA;B11B;1102 1165 11BA;
+B11C;B11C;1102 1165 11BB;B11C;1102 1165 11BB;
+B11D;B11D;1102 1165 11BC;B11D;1102 1165 11BC;
+B11E;B11E;1102 1165 11BD;B11E;1102 1165 11BD;
+B11F;B11F;1102 1165 11BE;B11F;1102 1165 11BE;
+B120;B120;1102 1165 11BF;B120;1102 1165 11BF;
+B121;B121;1102 1165 11C0;B121;1102 1165 11C0;
+B122;B122;1102 1165 11C1;B122;1102 1165 11C1;
+B123;B123;1102 1165 11C2;B123;1102 1165 11C2;
+B124;B124;1102 1166;B124;1102 1166;
+B125;B125;1102 1166 11A8;B125;1102 1166 11A8;
+B126;B126;1102 1166 11A9;B126;1102 1166 11A9;
+B127;B127;1102 1166 11AA;B127;1102 1166 11AA;
+B128;B128;1102 1166 11AB;B128;1102 1166 11AB;
+B129;B129;1102 1166 11AC;B129;1102 1166 11AC;
+B12A;B12A;1102 1166 11AD;B12A;1102 1166 11AD;
+B12B;B12B;1102 1166 11AE;B12B;1102 1166 11AE;
+B12C;B12C;1102 1166 11AF;B12C;1102 1166 11AF;
+B12D;B12D;1102 1166 11B0;B12D;1102 1166 11B0;
+B12E;B12E;1102 1166 11B1;B12E;1102 1166 11B1;
+B12F;B12F;1102 1166 11B2;B12F;1102 1166 11B2;
+B130;B130;1102 1166 11B3;B130;1102 1166 11B3;
+B131;B131;1102 1166 11B4;B131;1102 1166 11B4;
+B132;B132;1102 1166 11B5;B132;1102 1166 11B5;
+B133;B133;1102 1166 11B6;B133;1102 1166 11B6;
+B134;B134;1102 1166 11B7;B134;1102 1166 11B7;
+B135;B135;1102 1166 11B8;B135;1102 1166 11B8;
+B136;B136;1102 1166 11B9;B136;1102 1166 11B9;
+B137;B137;1102 1166 11BA;B137;1102 1166 11BA;
+B138;B138;1102 1166 11BB;B138;1102 1166 11BB;
+B139;B139;1102 1166 11BC;B139;1102 1166 11BC;
+B13A;B13A;1102 1166 11BD;B13A;1102 1166 11BD;
+B13B;B13B;1102 1166 11BE;B13B;1102 1166 11BE;
+B13C;B13C;1102 1166 11BF;B13C;1102 1166 11BF;
+B13D;B13D;1102 1166 11C0;B13D;1102 1166 11C0;
+B13E;B13E;1102 1166 11C1;B13E;1102 1166 11C1;
+B13F;B13F;1102 1166 11C2;B13F;1102 1166 11C2;
+B140;B140;1102 1167;B140;1102 1167;
+B141;B141;1102 1167 11A8;B141;1102 1167 11A8;
+B142;B142;1102 1167 11A9;B142;1102 1167 11A9;
+B143;B143;1102 1167 11AA;B143;1102 1167 11AA;
+B144;B144;1102 1167 11AB;B144;1102 1167 11AB;
+B145;B145;1102 1167 11AC;B145;1102 1167 11AC;
+B146;B146;1102 1167 11AD;B146;1102 1167 11AD;
+B147;B147;1102 1167 11AE;B147;1102 1167 11AE;
+B148;B148;1102 1167 11AF;B148;1102 1167 11AF;
+B149;B149;1102 1167 11B0;B149;1102 1167 11B0;
+B14A;B14A;1102 1167 11B1;B14A;1102 1167 11B1;
+B14B;B14B;1102 1167 11B2;B14B;1102 1167 11B2;
+B14C;B14C;1102 1167 11B3;B14C;1102 1167 11B3;
+B14D;B14D;1102 1167 11B4;B14D;1102 1167 11B4;
+B14E;B14E;1102 1167 11B5;B14E;1102 1167 11B5;
+B14F;B14F;1102 1167 11B6;B14F;1102 1167 11B6;
+B150;B150;1102 1167 11B7;B150;1102 1167 11B7;
+B151;B151;1102 1167 11B8;B151;1102 1167 11B8;
+B152;B152;1102 1167 11B9;B152;1102 1167 11B9;
+B153;B153;1102 1167 11BA;B153;1102 1167 11BA;
+B154;B154;1102 1167 11BB;B154;1102 1167 11BB;
+B155;B155;1102 1167 11BC;B155;1102 1167 11BC;
+B156;B156;1102 1167 11BD;B156;1102 1167 11BD;
+B157;B157;1102 1167 11BE;B157;1102 1167 11BE;
+B158;B158;1102 1167 11BF;B158;1102 1167 11BF;
+B159;B159;1102 1167 11C0;B159;1102 1167 11C0;
+B15A;B15A;1102 1167 11C1;B15A;1102 1167 11C1;
+B15B;B15B;1102 1167 11C2;B15B;1102 1167 11C2;
+B15C;B15C;1102 1168;B15C;1102 1168;
+B15D;B15D;1102 1168 11A8;B15D;1102 1168 11A8;
+B15E;B15E;1102 1168 11A9;B15E;1102 1168 11A9;
+B15F;B15F;1102 1168 11AA;B15F;1102 1168 11AA;
+B160;B160;1102 1168 11AB;B160;1102 1168 11AB;
+B161;B161;1102 1168 11AC;B161;1102 1168 11AC;
+B162;B162;1102 1168 11AD;B162;1102 1168 11AD;
+B163;B163;1102 1168 11AE;B163;1102 1168 11AE;
+B164;B164;1102 1168 11AF;B164;1102 1168 11AF;
+B165;B165;1102 1168 11B0;B165;1102 1168 11B0;
+B166;B166;1102 1168 11B1;B166;1102 1168 11B1;
+B167;B167;1102 1168 11B2;B167;1102 1168 11B2;
+B168;B168;1102 1168 11B3;B168;1102 1168 11B3;
+B169;B169;1102 1168 11B4;B169;1102 1168 11B4;
+B16A;B16A;1102 1168 11B5;B16A;1102 1168 11B5;
+B16B;B16B;1102 1168 11B6;B16B;1102 1168 11B6;
+B16C;B16C;1102 1168 11B7;B16C;1102 1168 11B7;
+B16D;B16D;1102 1168 11B8;B16D;1102 1168 11B8;
+B16E;B16E;1102 1168 11B9;B16E;1102 1168 11B9;
+B16F;B16F;1102 1168 11BA;B16F;1102 1168 11BA;
+B170;B170;1102 1168 11BB;B170;1102 1168 11BB;
+B171;B171;1102 1168 11BC;B171;1102 1168 11BC;
+B172;B172;1102 1168 11BD;B172;1102 1168 11BD;
+B173;B173;1102 1168 11BE;B173;1102 1168 11BE;
+B174;B174;1102 1168 11BF;B174;1102 1168 11BF;
+B175;B175;1102 1168 11C0;B175;1102 1168 11C0;
+B176;B176;1102 1168 11C1;B176;1102 1168 11C1;
+B177;B177;1102 1168 11C2;B177;1102 1168 11C2;
+B178;B178;1102 1169;B178;1102 1169;
+B179;B179;1102 1169 11A8;B179;1102 1169 11A8;
+B17A;B17A;1102 1169 11A9;B17A;1102 1169 11A9;
+B17B;B17B;1102 1169 11AA;B17B;1102 1169 11AA;
+B17C;B17C;1102 1169 11AB;B17C;1102 1169 11AB;
+B17D;B17D;1102 1169 11AC;B17D;1102 1169 11AC;
+B17E;B17E;1102 1169 11AD;B17E;1102 1169 11AD;
+B17F;B17F;1102 1169 11AE;B17F;1102 1169 11AE;
+B180;B180;1102 1169 11AF;B180;1102 1169 11AF;
+B181;B181;1102 1169 11B0;B181;1102 1169 11B0;
+B182;B182;1102 1169 11B1;B182;1102 1169 11B1;
+B183;B183;1102 1169 11B2;B183;1102 1169 11B2;
+B184;B184;1102 1169 11B3;B184;1102 1169 11B3;
+B185;B185;1102 1169 11B4;B185;1102 1169 11B4;
+B186;B186;1102 1169 11B5;B186;1102 1169 11B5;
+B187;B187;1102 1169 11B6;B187;1102 1169 11B6;
+B188;B188;1102 1169 11B7;B188;1102 1169 11B7;
+B189;B189;1102 1169 11B8;B189;1102 1169 11B8;
+B18A;B18A;1102 1169 11B9;B18A;1102 1169 11B9;
+B18B;B18B;1102 1169 11BA;B18B;1102 1169 11BA;
+B18C;B18C;1102 1169 11BB;B18C;1102 1169 11BB;
+B18D;B18D;1102 1169 11BC;B18D;1102 1169 11BC;
+B18E;B18E;1102 1169 11BD;B18E;1102 1169 11BD;
+B18F;B18F;1102 1169 11BE;B18F;1102 1169 11BE;
+B190;B190;1102 1169 11BF;B190;1102 1169 11BF;
+B191;B191;1102 1169 11C0;B191;1102 1169 11C0;
+B192;B192;1102 1169 11C1;B192;1102 1169 11C1;
+B193;B193;1102 1169 11C2;B193;1102 1169 11C2;
+B194;B194;1102 116A;B194;1102 116A;
+B195;B195;1102 116A 11A8;B195;1102 116A 11A8;
+B196;B196;1102 116A 11A9;B196;1102 116A 11A9;
+B197;B197;1102 116A 11AA;B197;1102 116A 11AA;
+B198;B198;1102 116A 11AB;B198;1102 116A 11AB;
+B199;B199;1102 116A 11AC;B199;1102 116A 11AC;
+B19A;B19A;1102 116A 11AD;B19A;1102 116A 11AD;
+B19B;B19B;1102 116A 11AE;B19B;1102 116A 11AE;
+B19C;B19C;1102 116A 11AF;B19C;1102 116A 11AF;
+B19D;B19D;1102 116A 11B0;B19D;1102 116A 11B0;
+B19E;B19E;1102 116A 11B1;B19E;1102 116A 11B1;
+B19F;B19F;1102 116A 11B2;B19F;1102 116A 11B2;
+B1A0;B1A0;1102 116A 11B3;B1A0;1102 116A 11B3;
+B1A1;B1A1;1102 116A 11B4;B1A1;1102 116A 11B4;
+B1A2;B1A2;1102 116A 11B5;B1A2;1102 116A 11B5;
+B1A3;B1A3;1102 116A 11B6;B1A3;1102 116A 11B6;
+B1A4;B1A4;1102 116A 11B7;B1A4;1102 116A 11B7;
+B1A5;B1A5;1102 116A 11B8;B1A5;1102 116A 11B8;
+B1A6;B1A6;1102 116A 11B9;B1A6;1102 116A 11B9;
+B1A7;B1A7;1102 116A 11BA;B1A7;1102 116A 11BA;
+B1A8;B1A8;1102 116A 11BB;B1A8;1102 116A 11BB;
+B1A9;B1A9;1102 116A 11BC;B1A9;1102 116A 11BC;
+B1AA;B1AA;1102 116A 11BD;B1AA;1102 116A 11BD;
+B1AB;B1AB;1102 116A 11BE;B1AB;1102 116A 11BE;
+B1AC;B1AC;1102 116A 11BF;B1AC;1102 116A 11BF;
+B1AD;B1AD;1102 116A 11C0;B1AD;1102 116A 11C0;
+B1AE;B1AE;1102 116A 11C1;B1AE;1102 116A 11C1;
+B1AF;B1AF;1102 116A 11C2;B1AF;1102 116A 11C2;
+B1B0;B1B0;1102 116B;B1B0;1102 116B;
+B1B1;B1B1;1102 116B 11A8;B1B1;1102 116B 11A8;
+B1B2;B1B2;1102 116B 11A9;B1B2;1102 116B 11A9;
+B1B3;B1B3;1102 116B 11AA;B1B3;1102 116B 11AA;
+B1B4;B1B4;1102 116B 11AB;B1B4;1102 116B 11AB;
+B1B5;B1B5;1102 116B 11AC;B1B5;1102 116B 11AC;
+B1B6;B1B6;1102 116B 11AD;B1B6;1102 116B 11AD;
+B1B7;B1B7;1102 116B 11AE;B1B7;1102 116B 11AE;
+B1B8;B1B8;1102 116B 11AF;B1B8;1102 116B 11AF;
+B1B9;B1B9;1102 116B 11B0;B1B9;1102 116B 11B0;
+B1BA;B1BA;1102 116B 11B1;B1BA;1102 116B 11B1;
+B1BB;B1BB;1102 116B 11B2;B1BB;1102 116B 11B2;
+B1BC;B1BC;1102 116B 11B3;B1BC;1102 116B 11B3;
+B1BD;B1BD;1102 116B 11B4;B1BD;1102 116B 11B4;
+B1BE;B1BE;1102 116B 11B5;B1BE;1102 116B 11B5;
+B1BF;B1BF;1102 116B 11B6;B1BF;1102 116B 11B6;
+B1C0;B1C0;1102 116B 11B7;B1C0;1102 116B 11B7;
+B1C1;B1C1;1102 116B 11B8;B1C1;1102 116B 11B8;
+B1C2;B1C2;1102 116B 11B9;B1C2;1102 116B 11B9;
+B1C3;B1C3;1102 116B 11BA;B1C3;1102 116B 11BA;
+B1C4;B1C4;1102 116B 11BB;B1C4;1102 116B 11BB;
+B1C5;B1C5;1102 116B 11BC;B1C5;1102 116B 11BC;
+B1C6;B1C6;1102 116B 11BD;B1C6;1102 116B 11BD;
+B1C7;B1C7;1102 116B 11BE;B1C7;1102 116B 11BE;
+B1C8;B1C8;1102 116B 11BF;B1C8;1102 116B 11BF;
+B1C9;B1C9;1102 116B 11C0;B1C9;1102 116B 11C0;
+B1CA;B1CA;1102 116B 11C1;B1CA;1102 116B 11C1;
+B1CB;B1CB;1102 116B 11C2;B1CB;1102 116B 11C2;
+B1CC;B1CC;1102 116C;B1CC;1102 116C;
+B1CD;B1CD;1102 116C 11A8;B1CD;1102 116C 11A8;
+B1CE;B1CE;1102 116C 11A9;B1CE;1102 116C 11A9;
+B1CF;B1CF;1102 116C 11AA;B1CF;1102 116C 11AA;
+B1D0;B1D0;1102 116C 11AB;B1D0;1102 116C 11AB;
+B1D1;B1D1;1102 116C 11AC;B1D1;1102 116C 11AC;
+B1D2;B1D2;1102 116C 11AD;B1D2;1102 116C 11AD;
+B1D3;B1D3;1102 116C 11AE;B1D3;1102 116C 11AE;
+B1D4;B1D4;1102 116C 11AF;B1D4;1102 116C 11AF;
+B1D5;B1D5;1102 116C 11B0;B1D5;1102 116C 11B0;
+B1D6;B1D6;1102 116C 11B1;B1D6;1102 116C 11B1;
+B1D7;B1D7;1102 116C 11B2;B1D7;1102 116C 11B2;
+B1D8;B1D8;1102 116C 11B3;B1D8;1102 116C 11B3;
+B1D9;B1D9;1102 116C 11B4;B1D9;1102 116C 11B4;
+B1DA;B1DA;1102 116C 11B5;B1DA;1102 116C 11B5;
+B1DB;B1DB;1102 116C 11B6;B1DB;1102 116C 11B6;
+B1DC;B1DC;1102 116C 11B7;B1DC;1102 116C 11B7;
+B1DD;B1DD;1102 116C 11B8;B1DD;1102 116C 11B8;
+B1DE;B1DE;1102 116C 11B9;B1DE;1102 116C 11B9;
+B1DF;B1DF;1102 116C 11BA;B1DF;1102 116C 11BA;
+B1E0;B1E0;1102 116C 11BB;B1E0;1102 116C 11BB;
+B1E1;B1E1;1102 116C 11BC;B1E1;1102 116C 11BC;
+B1E2;B1E2;1102 116C 11BD;B1E2;1102 116C 11BD;
+B1E3;B1E3;1102 116C 11BE;B1E3;1102 116C 11BE;
+B1E4;B1E4;1102 116C 11BF;B1E4;1102 116C 11BF;
+B1E5;B1E5;1102 116C 11C0;B1E5;1102 116C 11C0;
+B1E6;B1E6;1102 116C 11C1;B1E6;1102 116C 11C1;
+B1E7;B1E7;1102 116C 11C2;B1E7;1102 116C 11C2;
+B1E8;B1E8;1102 116D;B1E8;1102 116D;
+B1E9;B1E9;1102 116D 11A8;B1E9;1102 116D 11A8;
+B1EA;B1EA;1102 116D 11A9;B1EA;1102 116D 11A9;
+B1EB;B1EB;1102 116D 11AA;B1EB;1102 116D 11AA;
+B1EC;B1EC;1102 116D 11AB;B1EC;1102 116D 11AB;
+B1ED;B1ED;1102 116D 11AC;B1ED;1102 116D 11AC;
+B1EE;B1EE;1102 116D 11AD;B1EE;1102 116D 11AD;
+B1EF;B1EF;1102 116D 11AE;B1EF;1102 116D 11AE;
+B1F0;B1F0;1102 116D 11AF;B1F0;1102 116D 11AF;
+B1F1;B1F1;1102 116D 11B0;B1F1;1102 116D 11B0;
+B1F2;B1F2;1102 116D 11B1;B1F2;1102 116D 11B1;
+B1F3;B1F3;1102 116D 11B2;B1F3;1102 116D 11B2;
+B1F4;B1F4;1102 116D 11B3;B1F4;1102 116D 11B3;
+B1F5;B1F5;1102 116D 11B4;B1F5;1102 116D 11B4;
+B1F6;B1F6;1102 116D 11B5;B1F6;1102 116D 11B5;
+B1F7;B1F7;1102 116D 11B6;B1F7;1102 116D 11B6;
+B1F8;B1F8;1102 116D 11B7;B1F8;1102 116D 11B7;
+B1F9;B1F9;1102 116D 11B8;B1F9;1102 116D 11B8;
+B1FA;B1FA;1102 116D 11B9;B1FA;1102 116D 11B9;
+B1FB;B1FB;1102 116D 11BA;B1FB;1102 116D 11BA;
+B1FC;B1FC;1102 116D 11BB;B1FC;1102 116D 11BB;
+B1FD;B1FD;1102 116D 11BC;B1FD;1102 116D 11BC;
+B1FE;B1FE;1102 116D 11BD;B1FE;1102 116D 11BD;
+B1FF;B1FF;1102 116D 11BE;B1FF;1102 116D 11BE;
+B200;B200;1102 116D 11BF;B200;1102 116D 11BF;
+B201;B201;1102 116D 11C0;B201;1102 116D 11C0;
+B202;B202;1102 116D 11C1;B202;1102 116D 11C1;
+B203;B203;1102 116D 11C2;B203;1102 116D 11C2;
+B204;B204;1102 116E;B204;1102 116E;
+B205;B205;1102 116E 11A8;B205;1102 116E 11A8;
+B206;B206;1102 116E 11A9;B206;1102 116E 11A9;
+B207;B207;1102 116E 11AA;B207;1102 116E 11AA;
+B208;B208;1102 116E 11AB;B208;1102 116E 11AB;
+B209;B209;1102 116E 11AC;B209;1102 116E 11AC;
+B20A;B20A;1102 116E 11AD;B20A;1102 116E 11AD;
+B20B;B20B;1102 116E 11AE;B20B;1102 116E 11AE;
+B20C;B20C;1102 116E 11AF;B20C;1102 116E 11AF;
+B20D;B20D;1102 116E 11B0;B20D;1102 116E 11B0;
+B20E;B20E;1102 116E 11B1;B20E;1102 116E 11B1;
+B20F;B20F;1102 116E 11B2;B20F;1102 116E 11B2;
+B210;B210;1102 116E 11B3;B210;1102 116E 11B3;
+B211;B211;1102 116E 11B4;B211;1102 116E 11B4;
+B212;B212;1102 116E 11B5;B212;1102 116E 11B5;
+B213;B213;1102 116E 11B6;B213;1102 116E 11B6;
+B214;B214;1102 116E 11B7;B214;1102 116E 11B7;
+B215;B215;1102 116E 11B8;B215;1102 116E 11B8;
+B216;B216;1102 116E 11B9;B216;1102 116E 11B9;
+B217;B217;1102 116E 11BA;B217;1102 116E 11BA;
+B218;B218;1102 116E 11BB;B218;1102 116E 11BB;
+B219;B219;1102 116E 11BC;B219;1102 116E 11BC;
+B21A;B21A;1102 116E 11BD;B21A;1102 116E 11BD;
+B21B;B21B;1102 116E 11BE;B21B;1102 116E 11BE;
+B21C;B21C;1102 116E 11BF;B21C;1102 116E 11BF;
+B21D;B21D;1102 116E 11C0;B21D;1102 116E 11C0;
+B21E;B21E;1102 116E 11C1;B21E;1102 116E 11C1;
+B21F;B21F;1102 116E 11C2;B21F;1102 116E 11C2;
+B220;B220;1102 116F;B220;1102 116F;
+B221;B221;1102 116F 11A8;B221;1102 116F 11A8;
+B222;B222;1102 116F 11A9;B222;1102 116F 11A9;
+B223;B223;1102 116F 11AA;B223;1102 116F 11AA;
+B224;B224;1102 116F 11AB;B224;1102 116F 11AB;
+B225;B225;1102 116F 11AC;B225;1102 116F 11AC;
+B226;B226;1102 116F 11AD;B226;1102 116F 11AD;
+B227;B227;1102 116F 11AE;B227;1102 116F 11AE;
+B228;B228;1102 116F 11AF;B228;1102 116F 11AF;
+B229;B229;1102 116F 11B0;B229;1102 116F 11B0;
+B22A;B22A;1102 116F 11B1;B22A;1102 116F 11B1;
+B22B;B22B;1102 116F 11B2;B22B;1102 116F 11B2;
+B22C;B22C;1102 116F 11B3;B22C;1102 116F 11B3;
+B22D;B22D;1102 116F 11B4;B22D;1102 116F 11B4;
+B22E;B22E;1102 116F 11B5;B22E;1102 116F 11B5;
+B22F;B22F;1102 116F 11B6;B22F;1102 116F 11B6;
+B230;B230;1102 116F 11B7;B230;1102 116F 11B7;
+B231;B231;1102 116F 11B8;B231;1102 116F 11B8;
+B232;B232;1102 116F 11B9;B232;1102 116F 11B9;
+B233;B233;1102 116F 11BA;B233;1102 116F 11BA;
+B234;B234;1102 116F 11BB;B234;1102 116F 11BB;
+B235;B235;1102 116F 11BC;B235;1102 116F 11BC;
+B236;B236;1102 116F 11BD;B236;1102 116F 11BD;
+B237;B237;1102 116F 11BE;B237;1102 116F 11BE;
+B238;B238;1102 116F 11BF;B238;1102 116F 11BF;
+B239;B239;1102 116F 11C0;B239;1102 116F 11C0;
+B23A;B23A;1102 116F 11C1;B23A;1102 116F 11C1;
+B23B;B23B;1102 116F 11C2;B23B;1102 116F 11C2;
+B23C;B23C;1102 1170;B23C;1102 1170;
+B23D;B23D;1102 1170 11A8;B23D;1102 1170 11A8;
+B23E;B23E;1102 1170 11A9;B23E;1102 1170 11A9;
+B23F;B23F;1102 1170 11AA;B23F;1102 1170 11AA;
+B240;B240;1102 1170 11AB;B240;1102 1170 11AB;
+B241;B241;1102 1170 11AC;B241;1102 1170 11AC;
+B242;B242;1102 1170 11AD;B242;1102 1170 11AD;
+B243;B243;1102 1170 11AE;B243;1102 1170 11AE;
+B244;B244;1102 1170 11AF;B244;1102 1170 11AF;
+B245;B245;1102 1170 11B0;B245;1102 1170 11B0;
+B246;B246;1102 1170 11B1;B246;1102 1170 11B1;
+B247;B247;1102 1170 11B2;B247;1102 1170 11B2;
+B248;B248;1102 1170 11B3;B248;1102 1170 11B3;
+B249;B249;1102 1170 11B4;B249;1102 1170 11B4;
+B24A;B24A;1102 1170 11B5;B24A;1102 1170 11B5;
+B24B;B24B;1102 1170 11B6;B24B;1102 1170 11B6;
+B24C;B24C;1102 1170 11B7;B24C;1102 1170 11B7;
+B24D;B24D;1102 1170 11B8;B24D;1102 1170 11B8;
+B24E;B24E;1102 1170 11B9;B24E;1102 1170 11B9;
+B24F;B24F;1102 1170 11BA;B24F;1102 1170 11BA;
+B250;B250;1102 1170 11BB;B250;1102 1170 11BB;
+B251;B251;1102 1170 11BC;B251;1102 1170 11BC;
+B252;B252;1102 1170 11BD;B252;1102 1170 11BD;
+B253;B253;1102 1170 11BE;B253;1102 1170 11BE;
+B254;B254;1102 1170 11BF;B254;1102 1170 11BF;
+B255;B255;1102 1170 11C0;B255;1102 1170 11C0;
+B256;B256;1102 1170 11C1;B256;1102 1170 11C1;
+B257;B257;1102 1170 11C2;B257;1102 1170 11C2;
+B258;B258;1102 1171;B258;1102 1171;
+B259;B259;1102 1171 11A8;B259;1102 1171 11A8;
+B25A;B25A;1102 1171 11A9;B25A;1102 1171 11A9;
+B25B;B25B;1102 1171 11AA;B25B;1102 1171 11AA;
+B25C;B25C;1102 1171 11AB;B25C;1102 1171 11AB;
+B25D;B25D;1102 1171 11AC;B25D;1102 1171 11AC;
+B25E;B25E;1102 1171 11AD;B25E;1102 1171 11AD;
+B25F;B25F;1102 1171 11AE;B25F;1102 1171 11AE;
+B260;B260;1102 1171 11AF;B260;1102 1171 11AF;
+B261;B261;1102 1171 11B0;B261;1102 1171 11B0;
+B262;B262;1102 1171 11B1;B262;1102 1171 11B1;
+B263;B263;1102 1171 11B2;B263;1102 1171 11B2;
+B264;B264;1102 1171 11B3;B264;1102 1171 11B3;
+B265;B265;1102 1171 11B4;B265;1102 1171 11B4;
+B266;B266;1102 1171 11B5;B266;1102 1171 11B5;
+B267;B267;1102 1171 11B6;B267;1102 1171 11B6;
+B268;B268;1102 1171 11B7;B268;1102 1171 11B7;
+B269;B269;1102 1171 11B8;B269;1102 1171 11B8;
+B26A;B26A;1102 1171 11B9;B26A;1102 1171 11B9;
+B26B;B26B;1102 1171 11BA;B26B;1102 1171 11BA;
+B26C;B26C;1102 1171 11BB;B26C;1102 1171 11BB;
+B26D;B26D;1102 1171 11BC;B26D;1102 1171 11BC;
+B26E;B26E;1102 1171 11BD;B26E;1102 1171 11BD;
+B26F;B26F;1102 1171 11BE;B26F;1102 1171 11BE;
+B270;B270;1102 1171 11BF;B270;1102 1171 11BF;
+B271;B271;1102 1171 11C0;B271;1102 1171 11C0;
+B272;B272;1102 1171 11C1;B272;1102 1171 11C1;
+B273;B273;1102 1171 11C2;B273;1102 1171 11C2;
+B274;B274;1102 1172;B274;1102 1172;
+B275;B275;1102 1172 11A8;B275;1102 1172 11A8;
+B276;B276;1102 1172 11A9;B276;1102 1172 11A9;
+B277;B277;1102 1172 11AA;B277;1102 1172 11AA;
+B278;B278;1102 1172 11AB;B278;1102 1172 11AB;
+B279;B279;1102 1172 11AC;B279;1102 1172 11AC;
+B27A;B27A;1102 1172 11AD;B27A;1102 1172 11AD;
+B27B;B27B;1102 1172 11AE;B27B;1102 1172 11AE;
+B27C;B27C;1102 1172 11AF;B27C;1102 1172 11AF;
+B27D;B27D;1102 1172 11B0;B27D;1102 1172 11B0;
+B27E;B27E;1102 1172 11B1;B27E;1102 1172 11B1;
+B27F;B27F;1102 1172 11B2;B27F;1102 1172 11B2;
+B280;B280;1102 1172 11B3;B280;1102 1172 11B3;
+B281;B281;1102 1172 11B4;B281;1102 1172 11B4;
+B282;B282;1102 1172 11B5;B282;1102 1172 11B5;
+B283;B283;1102 1172 11B6;B283;1102 1172 11B6;
+B284;B284;1102 1172 11B7;B284;1102 1172 11B7;
+B285;B285;1102 1172 11B8;B285;1102 1172 11B8;
+B286;B286;1102 1172 11B9;B286;1102 1172 11B9;
+B287;B287;1102 1172 11BA;B287;1102 1172 11BA;
+B288;B288;1102 1172 11BB;B288;1102 1172 11BB;
+B289;B289;1102 1172 11BC;B289;1102 1172 11BC;
+B28A;B28A;1102 1172 11BD;B28A;1102 1172 11BD;
+B28B;B28B;1102 1172 11BE;B28B;1102 1172 11BE;
+B28C;B28C;1102 1172 11BF;B28C;1102 1172 11BF;
+B28D;B28D;1102 1172 11C0;B28D;1102 1172 11C0;
+B28E;B28E;1102 1172 11C1;B28E;1102 1172 11C1;
+B28F;B28F;1102 1172 11C2;B28F;1102 1172 11C2;
+B290;B290;1102 1173;B290;1102 1173;
+B291;B291;1102 1173 11A8;B291;1102 1173 11A8;
+B292;B292;1102 1173 11A9;B292;1102 1173 11A9;
+B293;B293;1102 1173 11AA;B293;1102 1173 11AA;
+B294;B294;1102 1173 11AB;B294;1102 1173 11AB;
+B295;B295;1102 1173 11AC;B295;1102 1173 11AC;
+B296;B296;1102 1173 11AD;B296;1102 1173 11AD;
+B297;B297;1102 1173 11AE;B297;1102 1173 11AE;
+B298;B298;1102 1173 11AF;B298;1102 1173 11AF;
+B299;B299;1102 1173 11B0;B299;1102 1173 11B0;
+B29A;B29A;1102 1173 11B1;B29A;1102 1173 11B1;
+B29B;B29B;1102 1173 11B2;B29B;1102 1173 11B2;
+B29C;B29C;1102 1173 11B3;B29C;1102 1173 11B3;
+B29D;B29D;1102 1173 11B4;B29D;1102 1173 11B4;
+B29E;B29E;1102 1173 11B5;B29E;1102 1173 11B5;
+B29F;B29F;1102 1173 11B6;B29F;1102 1173 11B6;
+B2A0;B2A0;1102 1173 11B7;B2A0;1102 1173 11B7;
+B2A1;B2A1;1102 1173 11B8;B2A1;1102 1173 11B8;
+B2A2;B2A2;1102 1173 11B9;B2A2;1102 1173 11B9;
+B2A3;B2A3;1102 1173 11BA;B2A3;1102 1173 11BA;
+B2A4;B2A4;1102 1173 11BB;B2A4;1102 1173 11BB;
+B2A5;B2A5;1102 1173 11BC;B2A5;1102 1173 11BC;
+B2A6;B2A6;1102 1173 11BD;B2A6;1102 1173 11BD;
+B2A7;B2A7;1102 1173 11BE;B2A7;1102 1173 11BE;
+B2A8;B2A8;1102 1173 11BF;B2A8;1102 1173 11BF;
+B2A9;B2A9;1102 1173 11C0;B2A9;1102 1173 11C0;
+B2AA;B2AA;1102 1173 11C1;B2AA;1102 1173 11C1;
+B2AB;B2AB;1102 1173 11C2;B2AB;1102 1173 11C2;
+B2AC;B2AC;1102 1174;B2AC;1102 1174;
+B2AD;B2AD;1102 1174 11A8;B2AD;1102 1174 11A8;
+B2AE;B2AE;1102 1174 11A9;B2AE;1102 1174 11A9;
+B2AF;B2AF;1102 1174 11AA;B2AF;1102 1174 11AA;
+B2B0;B2B0;1102 1174 11AB;B2B0;1102 1174 11AB;
+B2B1;B2B1;1102 1174 11AC;B2B1;1102 1174 11AC;
+B2B2;B2B2;1102 1174 11AD;B2B2;1102 1174 11AD;
+B2B3;B2B3;1102 1174 11AE;B2B3;1102 1174 11AE;
+B2B4;B2B4;1102 1174 11AF;B2B4;1102 1174 11AF;
+B2B5;B2B5;1102 1174 11B0;B2B5;1102 1174 11B0;
+B2B6;B2B6;1102 1174 11B1;B2B6;1102 1174 11B1;
+B2B7;B2B7;1102 1174 11B2;B2B7;1102 1174 11B2;
+B2B8;B2B8;1102 1174 11B3;B2B8;1102 1174 11B3;
+B2B9;B2B9;1102 1174 11B4;B2B9;1102 1174 11B4;
+B2BA;B2BA;1102 1174 11B5;B2BA;1102 1174 11B5;
+B2BB;B2BB;1102 1174 11B6;B2BB;1102 1174 11B6;
+B2BC;B2BC;1102 1174 11B7;B2BC;1102 1174 11B7;
+B2BD;B2BD;1102 1174 11B8;B2BD;1102 1174 11B8;
+B2BE;B2BE;1102 1174 11B9;B2BE;1102 1174 11B9;
+B2BF;B2BF;1102 1174 11BA;B2BF;1102 1174 11BA;
+B2C0;B2C0;1102 1174 11BB;B2C0;1102 1174 11BB;
+B2C1;B2C1;1102 1174 11BC;B2C1;1102 1174 11BC;
+B2C2;B2C2;1102 1174 11BD;B2C2;1102 1174 11BD;
+B2C3;B2C3;1102 1174 11BE;B2C3;1102 1174 11BE;
+B2C4;B2C4;1102 1174 11BF;B2C4;1102 1174 11BF;
+B2C5;B2C5;1102 1174 11C0;B2C5;1102 1174 11C0;
+B2C6;B2C6;1102 1174 11C1;B2C6;1102 1174 11C1;
+B2C7;B2C7;1102 1174 11C2;B2C7;1102 1174 11C2;
+B2C8;B2C8;1102 1175;B2C8;1102 1175;
+B2C9;B2C9;1102 1175 11A8;B2C9;1102 1175 11A8;
+B2CA;B2CA;1102 1175 11A9;B2CA;1102 1175 11A9;
+B2CB;B2CB;1102 1175 11AA;B2CB;1102 1175 11AA;
+B2CC;B2CC;1102 1175 11AB;B2CC;1102 1175 11AB;
+B2CD;B2CD;1102 1175 11AC;B2CD;1102 1175 11AC;
+B2CE;B2CE;1102 1175 11AD;B2CE;1102 1175 11AD;
+B2CF;B2CF;1102 1175 11AE;B2CF;1102 1175 11AE;
+B2D0;B2D0;1102 1175 11AF;B2D0;1102 1175 11AF;
+B2D1;B2D1;1102 1175 11B0;B2D1;1102 1175 11B0;
+B2D2;B2D2;1102 1175 11B1;B2D2;1102 1175 11B1;
+B2D3;B2D3;1102 1175 11B2;B2D3;1102 1175 11B2;
+B2D4;B2D4;1102 1175 11B3;B2D4;1102 1175 11B3;
+B2D5;B2D5;1102 1175 11B4;B2D5;1102 1175 11B4;
+B2D6;B2D6;1102 1175 11B5;B2D6;1102 1175 11B5;
+B2D7;B2D7;1102 1175 11B6;B2D7;1102 1175 11B6;
+B2D8;B2D8;1102 1175 11B7;B2D8;1102 1175 11B7;
+B2D9;B2D9;1102 1175 11B8;B2D9;1102 1175 11B8;
+B2DA;B2DA;1102 1175 11B9;B2DA;1102 1175 11B9;
+B2DB;B2DB;1102 1175 11BA;B2DB;1102 1175 11BA;
+B2DC;B2DC;1102 1175 11BB;B2DC;1102 1175 11BB;
+B2DD;B2DD;1102 1175 11BC;B2DD;1102 1175 11BC;
+B2DE;B2DE;1102 1175 11BD;B2DE;1102 1175 11BD;
+B2DF;B2DF;1102 1175 11BE;B2DF;1102 1175 11BE;
+B2E0;B2E0;1102 1175 11BF;B2E0;1102 1175 11BF;
+B2E1;B2E1;1102 1175 11C0;B2E1;1102 1175 11C0;
+B2E2;B2E2;1102 1175 11C1;B2E2;1102 1175 11C1;
+B2E3;B2E3;1102 1175 11C2;B2E3;1102 1175 11C2;
+B2E4;B2E4;1103 1161;B2E4;1103 1161;
+B2E5;B2E5;1103 1161 11A8;B2E5;1103 1161 11A8;
+B2E6;B2E6;1103 1161 11A9;B2E6;1103 1161 11A9;
+B2E7;B2E7;1103 1161 11AA;B2E7;1103 1161 11AA;
+B2E8;B2E8;1103 1161 11AB;B2E8;1103 1161 11AB;
+B2E9;B2E9;1103 1161 11AC;B2E9;1103 1161 11AC;
+B2EA;B2EA;1103 1161 11AD;B2EA;1103 1161 11AD;
+B2EB;B2EB;1103 1161 11AE;B2EB;1103 1161 11AE;
+B2EC;B2EC;1103 1161 11AF;B2EC;1103 1161 11AF;
+B2ED;B2ED;1103 1161 11B0;B2ED;1103 1161 11B0;
+B2EE;B2EE;1103 1161 11B1;B2EE;1103 1161 11B1;
+B2EF;B2EF;1103 1161 11B2;B2EF;1103 1161 11B2;
+B2F0;B2F0;1103 1161 11B3;B2F0;1103 1161 11B3;
+B2F1;B2F1;1103 1161 11B4;B2F1;1103 1161 11B4;
+B2F2;B2F2;1103 1161 11B5;B2F2;1103 1161 11B5;
+B2F3;B2F3;1103 1161 11B6;B2F3;1103 1161 11B6;
+B2F4;B2F4;1103 1161 11B7;B2F4;1103 1161 11B7;
+B2F5;B2F5;1103 1161 11B8;B2F5;1103 1161 11B8;
+B2F6;B2F6;1103 1161 11B9;B2F6;1103 1161 11B9;
+B2F7;B2F7;1103 1161 11BA;B2F7;1103 1161 11BA;
+B2F8;B2F8;1103 1161 11BB;B2F8;1103 1161 11BB;
+B2F9;B2F9;1103 1161 11BC;B2F9;1103 1161 11BC;
+B2FA;B2FA;1103 1161 11BD;B2FA;1103 1161 11BD;
+B2FB;B2FB;1103 1161 11BE;B2FB;1103 1161 11BE;
+B2FC;B2FC;1103 1161 11BF;B2FC;1103 1161 11BF;
+B2FD;B2FD;1103 1161 11C0;B2FD;1103 1161 11C0;
+B2FE;B2FE;1103 1161 11C1;B2FE;1103 1161 11C1;
+B2FF;B2FF;1103 1161 11C2;B2FF;1103 1161 11C2;
+B300;B300;1103 1162;B300;1103 1162;
+B301;B301;1103 1162 11A8;B301;1103 1162 11A8;
+B302;B302;1103 1162 11A9;B302;1103 1162 11A9;
+B303;B303;1103 1162 11AA;B303;1103 1162 11AA;
+B304;B304;1103 1162 11AB;B304;1103 1162 11AB;
+B305;B305;1103 1162 11AC;B305;1103 1162 11AC;
+B306;B306;1103 1162 11AD;B306;1103 1162 11AD;
+B307;B307;1103 1162 11AE;B307;1103 1162 11AE;
+B308;B308;1103 1162 11AF;B308;1103 1162 11AF;
+B309;B309;1103 1162 11B0;B309;1103 1162 11B0;
+B30A;B30A;1103 1162 11B1;B30A;1103 1162 11B1;
+B30B;B30B;1103 1162 11B2;B30B;1103 1162 11B2;
+B30C;B30C;1103 1162 11B3;B30C;1103 1162 11B3;
+B30D;B30D;1103 1162 11B4;B30D;1103 1162 11B4;
+B30E;B30E;1103 1162 11B5;B30E;1103 1162 11B5;
+B30F;B30F;1103 1162 11B6;B30F;1103 1162 11B6;
+B310;B310;1103 1162 11B7;B310;1103 1162 11B7;
+B311;B311;1103 1162 11B8;B311;1103 1162 11B8;
+B312;B312;1103 1162 11B9;B312;1103 1162 11B9;
+B313;B313;1103 1162 11BA;B313;1103 1162 11BA;
+B314;B314;1103 1162 11BB;B314;1103 1162 11BB;
+B315;B315;1103 1162 11BC;B315;1103 1162 11BC;
+B316;B316;1103 1162 11BD;B316;1103 1162 11BD;
+B317;B317;1103 1162 11BE;B317;1103 1162 11BE;
+B318;B318;1103 1162 11BF;B318;1103 1162 11BF;
+B319;B319;1103 1162 11C0;B319;1103 1162 11C0;
+B31A;B31A;1103 1162 11C1;B31A;1103 1162 11C1;
+B31B;B31B;1103 1162 11C2;B31B;1103 1162 11C2;
+B31C;B31C;1103 1163;B31C;1103 1163;
+B31D;B31D;1103 1163 11A8;B31D;1103 1163 11A8;
+B31E;B31E;1103 1163 11A9;B31E;1103 1163 11A9;
+B31F;B31F;1103 1163 11AA;B31F;1103 1163 11AA;
+B320;B320;1103 1163 11AB;B320;1103 1163 11AB;
+B321;B321;1103 1163 11AC;B321;1103 1163 11AC;
+B322;B322;1103 1163 11AD;B322;1103 1163 11AD;
+B323;B323;1103 1163 11AE;B323;1103 1163 11AE;
+B324;B324;1103 1163 11AF;B324;1103 1163 11AF;
+B325;B325;1103 1163 11B0;B325;1103 1163 11B0;
+B326;B326;1103 1163 11B1;B326;1103 1163 11B1;
+B327;B327;1103 1163 11B2;B327;1103 1163 11B2;
+B328;B328;1103 1163 11B3;B328;1103 1163 11B3;
+B329;B329;1103 1163 11B4;B329;1103 1163 11B4;
+B32A;B32A;1103 1163 11B5;B32A;1103 1163 11B5;
+B32B;B32B;1103 1163 11B6;B32B;1103 1163 11B6;
+B32C;B32C;1103 1163 11B7;B32C;1103 1163 11B7;
+B32D;B32D;1103 1163 11B8;B32D;1103 1163 11B8;
+B32E;B32E;1103 1163 11B9;B32E;1103 1163 11B9;
+B32F;B32F;1103 1163 11BA;B32F;1103 1163 11BA;
+B330;B330;1103 1163 11BB;B330;1103 1163 11BB;
+B331;B331;1103 1163 11BC;B331;1103 1163 11BC;
+B332;B332;1103 1163 11BD;B332;1103 1163 11BD;
+B333;B333;1103 1163 11BE;B333;1103 1163 11BE;
+B334;B334;1103 1163 11BF;B334;1103 1163 11BF;
+B335;B335;1103 1163 11C0;B335;1103 1163 11C0;
+B336;B336;1103 1163 11C1;B336;1103 1163 11C1;
+B337;B337;1103 1163 11C2;B337;1103 1163 11C2;
+B338;B338;1103 1164;B338;1103 1164;
+B339;B339;1103 1164 11A8;B339;1103 1164 11A8;
+B33A;B33A;1103 1164 11A9;B33A;1103 1164 11A9;
+B33B;B33B;1103 1164 11AA;B33B;1103 1164 11AA;
+B33C;B33C;1103 1164 11AB;B33C;1103 1164 11AB;
+B33D;B33D;1103 1164 11AC;B33D;1103 1164 11AC;
+B33E;B33E;1103 1164 11AD;B33E;1103 1164 11AD;
+B33F;B33F;1103 1164 11AE;B33F;1103 1164 11AE;
+B340;B340;1103 1164 11AF;B340;1103 1164 11AF;
+B341;B341;1103 1164 11B0;B341;1103 1164 11B0;
+B342;B342;1103 1164 11B1;B342;1103 1164 11B1;
+B343;B343;1103 1164 11B2;B343;1103 1164 11B2;
+B344;B344;1103 1164 11B3;B344;1103 1164 11B3;
+B345;B345;1103 1164 11B4;B345;1103 1164 11B4;
+B346;B346;1103 1164 11B5;B346;1103 1164 11B5;
+B347;B347;1103 1164 11B6;B347;1103 1164 11B6;
+B348;B348;1103 1164 11B7;B348;1103 1164 11B7;
+B349;B349;1103 1164 11B8;B349;1103 1164 11B8;
+B34A;B34A;1103 1164 11B9;B34A;1103 1164 11B9;
+B34B;B34B;1103 1164 11BA;B34B;1103 1164 11BA;
+B34C;B34C;1103 1164 11BB;B34C;1103 1164 11BB;
+B34D;B34D;1103 1164 11BC;B34D;1103 1164 11BC;
+B34E;B34E;1103 1164 11BD;B34E;1103 1164 11BD;
+B34F;B34F;1103 1164 11BE;B34F;1103 1164 11BE;
+B350;B350;1103 1164 11BF;B350;1103 1164 11BF;
+B351;B351;1103 1164 11C0;B351;1103 1164 11C0;
+B352;B352;1103 1164 11C1;B352;1103 1164 11C1;
+B353;B353;1103 1164 11C2;B353;1103 1164 11C2;
+B354;B354;1103 1165;B354;1103 1165;
+B355;B355;1103 1165 11A8;B355;1103 1165 11A8;
+B356;B356;1103 1165 11A9;B356;1103 1165 11A9;
+B357;B357;1103 1165 11AA;B357;1103 1165 11AA;
+B358;B358;1103 1165 11AB;B358;1103 1165 11AB;
+B359;B359;1103 1165 11AC;B359;1103 1165 11AC;
+B35A;B35A;1103 1165 11AD;B35A;1103 1165 11AD;
+B35B;B35B;1103 1165 11AE;B35B;1103 1165 11AE;
+B35C;B35C;1103 1165 11AF;B35C;1103 1165 11AF;
+B35D;B35D;1103 1165 11B0;B35D;1103 1165 11B0;
+B35E;B35E;1103 1165 11B1;B35E;1103 1165 11B1;
+B35F;B35F;1103 1165 11B2;B35F;1103 1165 11B2;
+B360;B360;1103 1165 11B3;B360;1103 1165 11B3;
+B361;B361;1103 1165 11B4;B361;1103 1165 11B4;
+B362;B362;1103 1165 11B5;B362;1103 1165 11B5;
+B363;B363;1103 1165 11B6;B363;1103 1165 11B6;
+B364;B364;1103 1165 11B7;B364;1103 1165 11B7;
+B365;B365;1103 1165 11B8;B365;1103 1165 11B8;
+B366;B366;1103 1165 11B9;B366;1103 1165 11B9;
+B367;B367;1103 1165 11BA;B367;1103 1165 11BA;
+B368;B368;1103 1165 11BB;B368;1103 1165 11BB;
+B369;B369;1103 1165 11BC;B369;1103 1165 11BC;
+B36A;B36A;1103 1165 11BD;B36A;1103 1165 11BD;
+B36B;B36B;1103 1165 11BE;B36B;1103 1165 11BE;
+B36C;B36C;1103 1165 11BF;B36C;1103 1165 11BF;
+B36D;B36D;1103 1165 11C0;B36D;1103 1165 11C0;
+B36E;B36E;1103 1165 11C1;B36E;1103 1165 11C1;
+B36F;B36F;1103 1165 11C2;B36F;1103 1165 11C2;
+B370;B370;1103 1166;B370;1103 1166;
+B371;B371;1103 1166 11A8;B371;1103 1166 11A8;
+B372;B372;1103 1166 11A9;B372;1103 1166 11A9;
+B373;B373;1103 1166 11AA;B373;1103 1166 11AA;
+B374;B374;1103 1166 11AB;B374;1103 1166 11AB;
+B375;B375;1103 1166 11AC;B375;1103 1166 11AC;
+B376;B376;1103 1166 11AD;B376;1103 1166 11AD;
+B377;B377;1103 1166 11AE;B377;1103 1166 11AE;
+B378;B378;1103 1166 11AF;B378;1103 1166 11AF;
+B379;B379;1103 1166 11B0;B379;1103 1166 11B0;
+B37A;B37A;1103 1166 11B1;B37A;1103 1166 11B1;
+B37B;B37B;1103 1166 11B2;B37B;1103 1166 11B2;
+B37C;B37C;1103 1166 11B3;B37C;1103 1166 11B3;
+B37D;B37D;1103 1166 11B4;B37D;1103 1166 11B4;
+B37E;B37E;1103 1166 11B5;B37E;1103 1166 11B5;
+B37F;B37F;1103 1166 11B6;B37F;1103 1166 11B6;
+B380;B380;1103 1166 11B7;B380;1103 1166 11B7;
+B381;B381;1103 1166 11B8;B381;1103 1166 11B8;
+B382;B382;1103 1166 11B9;B382;1103 1166 11B9;
+B383;B383;1103 1166 11BA;B383;1103 1166 11BA;
+B384;B384;1103 1166 11BB;B384;1103 1166 11BB;
+B385;B385;1103 1166 11BC;B385;1103 1166 11BC;
+B386;B386;1103 1166 11BD;B386;1103 1166 11BD;
+B387;B387;1103 1166 11BE;B387;1103 1166 11BE;
+B388;B388;1103 1166 11BF;B388;1103 1166 11BF;
+B389;B389;1103 1166 11C0;B389;1103 1166 11C0;
+B38A;B38A;1103 1166 11C1;B38A;1103 1166 11C1;
+B38B;B38B;1103 1166 11C2;B38B;1103 1166 11C2;
+B38C;B38C;1103 1167;B38C;1103 1167;
+B38D;B38D;1103 1167 11A8;B38D;1103 1167 11A8;
+B38E;B38E;1103 1167 11A9;B38E;1103 1167 11A9;
+B38F;B38F;1103 1167 11AA;B38F;1103 1167 11AA;
+B390;B390;1103 1167 11AB;B390;1103 1167 11AB;
+B391;B391;1103 1167 11AC;B391;1103 1167 11AC;
+B392;B392;1103 1167 11AD;B392;1103 1167 11AD;
+B393;B393;1103 1167 11AE;B393;1103 1167 11AE;
+B394;B394;1103 1167 11AF;B394;1103 1167 11AF;
+B395;B395;1103 1167 11B0;B395;1103 1167 11B0;
+B396;B396;1103 1167 11B1;B396;1103 1167 11B1;
+B397;B397;1103 1167 11B2;B397;1103 1167 11B2;
+B398;B398;1103 1167 11B3;B398;1103 1167 11B3;
+B399;B399;1103 1167 11B4;B399;1103 1167 11B4;
+B39A;B39A;1103 1167 11B5;B39A;1103 1167 11B5;
+B39B;B39B;1103 1167 11B6;B39B;1103 1167 11B6;
+B39C;B39C;1103 1167 11B7;B39C;1103 1167 11B7;
+B39D;B39D;1103 1167 11B8;B39D;1103 1167 11B8;
+B39E;B39E;1103 1167 11B9;B39E;1103 1167 11B9;
+B39F;B39F;1103 1167 11BA;B39F;1103 1167 11BA;
+B3A0;B3A0;1103 1167 11BB;B3A0;1103 1167 11BB;
+B3A1;B3A1;1103 1167 11BC;B3A1;1103 1167 11BC;
+B3A2;B3A2;1103 1167 11BD;B3A2;1103 1167 11BD;
+B3A3;B3A3;1103 1167 11BE;B3A3;1103 1167 11BE;
+B3A4;B3A4;1103 1167 11BF;B3A4;1103 1167 11BF;
+B3A5;B3A5;1103 1167 11C0;B3A5;1103 1167 11C0;
+B3A6;B3A6;1103 1167 11C1;B3A6;1103 1167 11C1;
+B3A7;B3A7;1103 1167 11C2;B3A7;1103 1167 11C2;
+B3A8;B3A8;1103 1168;B3A8;1103 1168;
+B3A9;B3A9;1103 1168 11A8;B3A9;1103 1168 11A8;
+B3AA;B3AA;1103 1168 11A9;B3AA;1103 1168 11A9;
+B3AB;B3AB;1103 1168 11AA;B3AB;1103 1168 11AA;
+B3AC;B3AC;1103 1168 11AB;B3AC;1103 1168 11AB;
+B3AD;B3AD;1103 1168 11AC;B3AD;1103 1168 11AC;
+B3AE;B3AE;1103 1168 11AD;B3AE;1103 1168 11AD;
+B3AF;B3AF;1103 1168 11AE;B3AF;1103 1168 11AE;
+B3B0;B3B0;1103 1168 11AF;B3B0;1103 1168 11AF;
+B3B1;B3B1;1103 1168 11B0;B3B1;1103 1168 11B0;
+B3B2;B3B2;1103 1168 11B1;B3B2;1103 1168 11B1;
+B3B3;B3B3;1103 1168 11B2;B3B3;1103 1168 11B2;
+B3B4;B3B4;1103 1168 11B3;B3B4;1103 1168 11B3;
+B3B5;B3B5;1103 1168 11B4;B3B5;1103 1168 11B4;
+B3B6;B3B6;1103 1168 11B5;B3B6;1103 1168 11B5;
+B3B7;B3B7;1103 1168 11B6;B3B7;1103 1168 11B6;
+B3B8;B3B8;1103 1168 11B7;B3B8;1103 1168 11B7;
+B3B9;B3B9;1103 1168 11B8;B3B9;1103 1168 11B8;
+B3BA;B3BA;1103 1168 11B9;B3BA;1103 1168 11B9;
+B3BB;B3BB;1103 1168 11BA;B3BB;1103 1168 11BA;
+B3BC;B3BC;1103 1168 11BB;B3BC;1103 1168 11BB;
+B3BD;B3BD;1103 1168 11BC;B3BD;1103 1168 11BC;
+B3BE;B3BE;1103 1168 11BD;B3BE;1103 1168 11BD;
+B3BF;B3BF;1103 1168 11BE;B3BF;1103 1168 11BE;
+B3C0;B3C0;1103 1168 11BF;B3C0;1103 1168 11BF;
+B3C1;B3C1;1103 1168 11C0;B3C1;1103 1168 11C0;
+B3C2;B3C2;1103 1168 11C1;B3C2;1103 1168 11C1;
+B3C3;B3C3;1103 1168 11C2;B3C3;1103 1168 11C2;
+B3C4;B3C4;1103 1169;B3C4;1103 1169;
+B3C5;B3C5;1103 1169 11A8;B3C5;1103 1169 11A8;
+B3C6;B3C6;1103 1169 11A9;B3C6;1103 1169 11A9;
+B3C7;B3C7;1103 1169 11AA;B3C7;1103 1169 11AA;
+B3C8;B3C8;1103 1169 11AB;B3C8;1103 1169 11AB;
+B3C9;B3C9;1103 1169 11AC;B3C9;1103 1169 11AC;
+B3CA;B3CA;1103 1169 11AD;B3CA;1103 1169 11AD;
+B3CB;B3CB;1103 1169 11AE;B3CB;1103 1169 11AE;
+B3CC;B3CC;1103 1169 11AF;B3CC;1103 1169 11AF;
+B3CD;B3CD;1103 1169 11B0;B3CD;1103 1169 11B0;
+B3CE;B3CE;1103 1169 11B1;B3CE;1103 1169 11B1;
+B3CF;B3CF;1103 1169 11B2;B3CF;1103 1169 11B2;
+B3D0;B3D0;1103 1169 11B3;B3D0;1103 1169 11B3;
+B3D1;B3D1;1103 1169 11B4;B3D1;1103 1169 11B4;
+B3D2;B3D2;1103 1169 11B5;B3D2;1103 1169 11B5;
+B3D3;B3D3;1103 1169 11B6;B3D3;1103 1169 11B6;
+B3D4;B3D4;1103 1169 11B7;B3D4;1103 1169 11B7;
+B3D5;B3D5;1103 1169 11B8;B3D5;1103 1169 11B8;
+B3D6;B3D6;1103 1169 11B9;B3D6;1103 1169 11B9;
+B3D7;B3D7;1103 1169 11BA;B3D7;1103 1169 11BA;
+B3D8;B3D8;1103 1169 11BB;B3D8;1103 1169 11BB;
+B3D9;B3D9;1103 1169 11BC;B3D9;1103 1169 11BC;
+B3DA;B3DA;1103 1169 11BD;B3DA;1103 1169 11BD;
+B3DB;B3DB;1103 1169 11BE;B3DB;1103 1169 11BE;
+B3DC;B3DC;1103 1169 11BF;B3DC;1103 1169 11BF;
+B3DD;B3DD;1103 1169 11C0;B3DD;1103 1169 11C0;
+B3DE;B3DE;1103 1169 11C1;B3DE;1103 1169 11C1;
+B3DF;B3DF;1103 1169 11C2;B3DF;1103 1169 11C2;
+B3E0;B3E0;1103 116A;B3E0;1103 116A;
+B3E1;B3E1;1103 116A 11A8;B3E1;1103 116A 11A8;
+B3E2;B3E2;1103 116A 11A9;B3E2;1103 116A 11A9;
+B3E3;B3E3;1103 116A 11AA;B3E3;1103 116A 11AA;
+B3E4;B3E4;1103 116A 11AB;B3E4;1103 116A 11AB;
+B3E5;B3E5;1103 116A 11AC;B3E5;1103 116A 11AC;
+B3E6;B3E6;1103 116A 11AD;B3E6;1103 116A 11AD;
+B3E7;B3E7;1103 116A 11AE;B3E7;1103 116A 11AE;
+B3E8;B3E8;1103 116A 11AF;B3E8;1103 116A 11AF;
+B3E9;B3E9;1103 116A 11B0;B3E9;1103 116A 11B0;
+B3EA;B3EA;1103 116A 11B1;B3EA;1103 116A 11B1;
+B3EB;B3EB;1103 116A 11B2;B3EB;1103 116A 11B2;
+B3EC;B3EC;1103 116A 11B3;B3EC;1103 116A 11B3;
+B3ED;B3ED;1103 116A 11B4;B3ED;1103 116A 11B4;
+B3EE;B3EE;1103 116A 11B5;B3EE;1103 116A 11B5;
+B3EF;B3EF;1103 116A 11B6;B3EF;1103 116A 11B6;
+B3F0;B3F0;1103 116A 11B7;B3F0;1103 116A 11B7;
+B3F1;B3F1;1103 116A 11B8;B3F1;1103 116A 11B8;
+B3F2;B3F2;1103 116A 11B9;B3F2;1103 116A 11B9;
+B3F3;B3F3;1103 116A 11BA;B3F3;1103 116A 11BA;
+B3F4;B3F4;1103 116A 11BB;B3F4;1103 116A 11BB;
+B3F5;B3F5;1103 116A 11BC;B3F5;1103 116A 11BC;
+B3F6;B3F6;1103 116A 11BD;B3F6;1103 116A 11BD;
+B3F7;B3F7;1103 116A 11BE;B3F7;1103 116A 11BE;
+B3F8;B3F8;1103 116A 11BF;B3F8;1103 116A 11BF;
+B3F9;B3F9;1103 116A 11C0;B3F9;1103 116A 11C0;
+B3FA;B3FA;1103 116A 11C1;B3FA;1103 116A 11C1;
+B3FB;B3FB;1103 116A 11C2;B3FB;1103 116A 11C2;
+B3FC;B3FC;1103 116B;B3FC;1103 116B;
+B3FD;B3FD;1103 116B 11A8;B3FD;1103 116B 11A8;
+B3FE;B3FE;1103 116B 11A9;B3FE;1103 116B 11A9;
+B3FF;B3FF;1103 116B 11AA;B3FF;1103 116B 11AA;
+B400;B400;1103 116B 11AB;B400;1103 116B 11AB;
+B401;B401;1103 116B 11AC;B401;1103 116B 11AC;
+B402;B402;1103 116B 11AD;B402;1103 116B 11AD;
+B403;B403;1103 116B 11AE;B403;1103 116B 11AE;
+B404;B404;1103 116B 11AF;B404;1103 116B 11AF;
+B405;B405;1103 116B 11B0;B405;1103 116B 11B0;
+B406;B406;1103 116B 11B1;B406;1103 116B 11B1;
+B407;B407;1103 116B 11B2;B407;1103 116B 11B2;
+B408;B408;1103 116B 11B3;B408;1103 116B 11B3;
+B409;B409;1103 116B 11B4;B409;1103 116B 11B4;
+B40A;B40A;1103 116B 11B5;B40A;1103 116B 11B5;
+B40B;B40B;1103 116B 11B6;B40B;1103 116B 11B6;
+B40C;B40C;1103 116B 11B7;B40C;1103 116B 11B7;
+B40D;B40D;1103 116B 11B8;B40D;1103 116B 11B8;
+B40E;B40E;1103 116B 11B9;B40E;1103 116B 11B9;
+B40F;B40F;1103 116B 11BA;B40F;1103 116B 11BA;
+B410;B410;1103 116B 11BB;B410;1103 116B 11BB;
+B411;B411;1103 116B 11BC;B411;1103 116B 11BC;
+B412;B412;1103 116B 11BD;B412;1103 116B 11BD;
+B413;B413;1103 116B 11BE;B413;1103 116B 11BE;
+B414;B414;1103 116B 11BF;B414;1103 116B 11BF;
+B415;B415;1103 116B 11C0;B415;1103 116B 11C0;
+B416;B416;1103 116B 11C1;B416;1103 116B 11C1;
+B417;B417;1103 116B 11C2;B417;1103 116B 11C2;
+B418;B418;1103 116C;B418;1103 116C;
+B419;B419;1103 116C 11A8;B419;1103 116C 11A8;
+B41A;B41A;1103 116C 11A9;B41A;1103 116C 11A9;
+B41B;B41B;1103 116C 11AA;B41B;1103 116C 11AA;
+B41C;B41C;1103 116C 11AB;B41C;1103 116C 11AB;
+B41D;B41D;1103 116C 11AC;B41D;1103 116C 11AC;
+B41E;B41E;1103 116C 11AD;B41E;1103 116C 11AD;
+B41F;B41F;1103 116C 11AE;B41F;1103 116C 11AE;
+B420;B420;1103 116C 11AF;B420;1103 116C 11AF;
+B421;B421;1103 116C 11B0;B421;1103 116C 11B0;
+B422;B422;1103 116C 11B1;B422;1103 116C 11B1;
+B423;B423;1103 116C 11B2;B423;1103 116C 11B2;
+B424;B424;1103 116C 11B3;B424;1103 116C 11B3;
+B425;B425;1103 116C 11B4;B425;1103 116C 11B4;
+B426;B426;1103 116C 11B5;B426;1103 116C 11B5;
+B427;B427;1103 116C 11B6;B427;1103 116C 11B6;
+B428;B428;1103 116C 11B7;B428;1103 116C 11B7;
+B429;B429;1103 116C 11B8;B429;1103 116C 11B8;
+B42A;B42A;1103 116C 11B9;B42A;1103 116C 11B9;
+B42B;B42B;1103 116C 11BA;B42B;1103 116C 11BA;
+B42C;B42C;1103 116C 11BB;B42C;1103 116C 11BB;
+B42D;B42D;1103 116C 11BC;B42D;1103 116C 11BC;
+B42E;B42E;1103 116C 11BD;B42E;1103 116C 11BD;
+B42F;B42F;1103 116C 11BE;B42F;1103 116C 11BE;
+B430;B430;1103 116C 11BF;B430;1103 116C 11BF;
+B431;B431;1103 116C 11C0;B431;1103 116C 11C0;
+B432;B432;1103 116C 11C1;B432;1103 116C 11C1;
+B433;B433;1103 116C 11C2;B433;1103 116C 11C2;
+B434;B434;1103 116D;B434;1103 116D;
+B435;B435;1103 116D 11A8;B435;1103 116D 11A8;
+B436;B436;1103 116D 11A9;B436;1103 116D 11A9;
+B437;B437;1103 116D 11AA;B437;1103 116D 11AA;
+B438;B438;1103 116D 11AB;B438;1103 116D 11AB;
+B439;B439;1103 116D 11AC;B439;1103 116D 11AC;
+B43A;B43A;1103 116D 11AD;B43A;1103 116D 11AD;
+B43B;B43B;1103 116D 11AE;B43B;1103 116D 11AE;
+B43C;B43C;1103 116D 11AF;B43C;1103 116D 11AF;
+B43D;B43D;1103 116D 11B0;B43D;1103 116D 11B0;
+B43E;B43E;1103 116D 11B1;B43E;1103 116D 11B1;
+B43F;B43F;1103 116D 11B2;B43F;1103 116D 11B2;
+B440;B440;1103 116D 11B3;B440;1103 116D 11B3;
+B441;B441;1103 116D 11B4;B441;1103 116D 11B4;
+B442;B442;1103 116D 11B5;B442;1103 116D 11B5;
+B443;B443;1103 116D 11B6;B443;1103 116D 11B6;
+B444;B444;1103 116D 11B7;B444;1103 116D 11B7;
+B445;B445;1103 116D 11B8;B445;1103 116D 11B8;
+B446;B446;1103 116D 11B9;B446;1103 116D 11B9;
+B447;B447;1103 116D 11BA;B447;1103 116D 11BA;
+B448;B448;1103 116D 11BB;B448;1103 116D 11BB;
+B449;B449;1103 116D 11BC;B449;1103 116D 11BC;
+B44A;B44A;1103 116D 11BD;B44A;1103 116D 11BD;
+B44B;B44B;1103 116D 11BE;B44B;1103 116D 11BE;
+B44C;B44C;1103 116D 11BF;B44C;1103 116D 11BF;
+B44D;B44D;1103 116D 11C0;B44D;1103 116D 11C0;
+B44E;B44E;1103 116D 11C1;B44E;1103 116D 11C1;
+B44F;B44F;1103 116D 11C2;B44F;1103 116D 11C2;
+B450;B450;1103 116E;B450;1103 116E;
+B451;B451;1103 116E 11A8;B451;1103 116E 11A8;
+B452;B452;1103 116E 11A9;B452;1103 116E 11A9;
+B453;B453;1103 116E 11AA;B453;1103 116E 11AA;
+B454;B454;1103 116E 11AB;B454;1103 116E 11AB;
+B455;B455;1103 116E 11AC;B455;1103 116E 11AC;
+B456;B456;1103 116E 11AD;B456;1103 116E 11AD;
+B457;B457;1103 116E 11AE;B457;1103 116E 11AE;
+B458;B458;1103 116E 11AF;B458;1103 116E 11AF;
+B459;B459;1103 116E 11B0;B459;1103 116E 11B0;
+B45A;B45A;1103 116E 11B1;B45A;1103 116E 11B1;
+B45B;B45B;1103 116E 11B2;B45B;1103 116E 11B2;
+B45C;B45C;1103 116E 11B3;B45C;1103 116E 11B3;
+B45D;B45D;1103 116E 11B4;B45D;1103 116E 11B4;
+B45E;B45E;1103 116E 11B5;B45E;1103 116E 11B5;
+B45F;B45F;1103 116E 11B6;B45F;1103 116E 11B6;
+B460;B460;1103 116E 11B7;B460;1103 116E 11B7;
+B461;B461;1103 116E 11B8;B461;1103 116E 11B8;
+B462;B462;1103 116E 11B9;B462;1103 116E 11B9;
+B463;B463;1103 116E 11BA;B463;1103 116E 11BA;
+B464;B464;1103 116E 11BB;B464;1103 116E 11BB;
+B465;B465;1103 116E 11BC;B465;1103 116E 11BC;
+B466;B466;1103 116E 11BD;B466;1103 116E 11BD;
+B467;B467;1103 116E 11BE;B467;1103 116E 11BE;
+B468;B468;1103 116E 11BF;B468;1103 116E 11BF;
+B469;B469;1103 116E 11C0;B469;1103 116E 11C0;
+B46A;B46A;1103 116E 11C1;B46A;1103 116E 11C1;
+B46B;B46B;1103 116E 11C2;B46B;1103 116E 11C2;
+B46C;B46C;1103 116F;B46C;1103 116F;
+B46D;B46D;1103 116F 11A8;B46D;1103 116F 11A8;
+B46E;B46E;1103 116F 11A9;B46E;1103 116F 11A9;
+B46F;B46F;1103 116F 11AA;B46F;1103 116F 11AA;
+B470;B470;1103 116F 11AB;B470;1103 116F 11AB;
+B471;B471;1103 116F 11AC;B471;1103 116F 11AC;
+B472;B472;1103 116F 11AD;B472;1103 116F 11AD;
+B473;B473;1103 116F 11AE;B473;1103 116F 11AE;
+B474;B474;1103 116F 11AF;B474;1103 116F 11AF;
+B475;B475;1103 116F 11B0;B475;1103 116F 11B0;
+B476;B476;1103 116F 11B1;B476;1103 116F 11B1;
+B477;B477;1103 116F 11B2;B477;1103 116F 11B2;
+B478;B478;1103 116F 11B3;B478;1103 116F 11B3;
+B479;B479;1103 116F 11B4;B479;1103 116F 11B4;
+B47A;B47A;1103 116F 11B5;B47A;1103 116F 11B5;
+B47B;B47B;1103 116F 11B6;B47B;1103 116F 11B6;
+B47C;B47C;1103 116F 11B7;B47C;1103 116F 11B7;
+B47D;B47D;1103 116F 11B8;B47D;1103 116F 11B8;
+B47E;B47E;1103 116F 11B9;B47E;1103 116F 11B9;
+B47F;B47F;1103 116F 11BA;B47F;1103 116F 11BA;
+B480;B480;1103 116F 11BB;B480;1103 116F 11BB;
+B481;B481;1103 116F 11BC;B481;1103 116F 11BC;
+B482;B482;1103 116F 11BD;B482;1103 116F 11BD;
+B483;B483;1103 116F 11BE;B483;1103 116F 11BE;
+B484;B484;1103 116F 11BF;B484;1103 116F 11BF;
+B485;B485;1103 116F 11C0;B485;1103 116F 11C0;
+B486;B486;1103 116F 11C1;B486;1103 116F 11C1;
+B487;B487;1103 116F 11C2;B487;1103 116F 11C2;
+B488;B488;1103 1170;B488;1103 1170;
+B489;B489;1103 1170 11A8;B489;1103 1170 11A8;
+B48A;B48A;1103 1170 11A9;B48A;1103 1170 11A9;
+B48B;B48B;1103 1170 11AA;B48B;1103 1170 11AA;
+B48C;B48C;1103 1170 11AB;B48C;1103 1170 11AB;
+B48D;B48D;1103 1170 11AC;B48D;1103 1170 11AC;
+B48E;B48E;1103 1170 11AD;B48E;1103 1170 11AD;
+B48F;B48F;1103 1170 11AE;B48F;1103 1170 11AE;
+B490;B490;1103 1170 11AF;B490;1103 1170 11AF;
+B491;B491;1103 1170 11B0;B491;1103 1170 11B0;
+B492;B492;1103 1170 11B1;B492;1103 1170 11B1;
+B493;B493;1103 1170 11B2;B493;1103 1170 11B2;
+B494;B494;1103 1170 11B3;B494;1103 1170 11B3;
+B495;B495;1103 1170 11B4;B495;1103 1170 11B4;
+B496;B496;1103 1170 11B5;B496;1103 1170 11B5;
+B497;B497;1103 1170 11B6;B497;1103 1170 11B6;
+B498;B498;1103 1170 11B7;B498;1103 1170 11B7;
+B499;B499;1103 1170 11B8;B499;1103 1170 11B8;
+B49A;B49A;1103 1170 11B9;B49A;1103 1170 11B9;
+B49B;B49B;1103 1170 11BA;B49B;1103 1170 11BA;
+B49C;B49C;1103 1170 11BB;B49C;1103 1170 11BB;
+B49D;B49D;1103 1170 11BC;B49D;1103 1170 11BC;
+B49E;B49E;1103 1170 11BD;B49E;1103 1170 11BD;
+B49F;B49F;1103 1170 11BE;B49F;1103 1170 11BE;
+B4A0;B4A0;1103 1170 11BF;B4A0;1103 1170 11BF;
+B4A1;B4A1;1103 1170 11C0;B4A1;1103 1170 11C0;
+B4A2;B4A2;1103 1170 11C1;B4A2;1103 1170 11C1;
+B4A3;B4A3;1103 1170 11C2;B4A3;1103 1170 11C2;
+B4A4;B4A4;1103 1171;B4A4;1103 1171;
+B4A5;B4A5;1103 1171 11A8;B4A5;1103 1171 11A8;
+B4A6;B4A6;1103 1171 11A9;B4A6;1103 1171 11A9;
+B4A7;B4A7;1103 1171 11AA;B4A7;1103 1171 11AA;
+B4A8;B4A8;1103 1171 11AB;B4A8;1103 1171 11AB;
+B4A9;B4A9;1103 1171 11AC;B4A9;1103 1171 11AC;
+B4AA;B4AA;1103 1171 11AD;B4AA;1103 1171 11AD;
+B4AB;B4AB;1103 1171 11AE;B4AB;1103 1171 11AE;
+B4AC;B4AC;1103 1171 11AF;B4AC;1103 1171 11AF;
+B4AD;B4AD;1103 1171 11B0;B4AD;1103 1171 11B0;
+B4AE;B4AE;1103 1171 11B1;B4AE;1103 1171 11B1;
+B4AF;B4AF;1103 1171 11B2;B4AF;1103 1171 11B2;
+B4B0;B4B0;1103 1171 11B3;B4B0;1103 1171 11B3;
+B4B1;B4B1;1103 1171 11B4;B4B1;1103 1171 11B4;
+B4B2;B4B2;1103 1171 11B5;B4B2;1103 1171 11B5;
+B4B3;B4B3;1103 1171 11B6;B4B3;1103 1171 11B6;
+B4B4;B4B4;1103 1171 11B7;B4B4;1103 1171 11B7;
+B4B5;B4B5;1103 1171 11B8;B4B5;1103 1171 11B8;
+B4B6;B4B6;1103 1171 11B9;B4B6;1103 1171 11B9;
+B4B7;B4B7;1103 1171 11BA;B4B7;1103 1171 11BA;
+B4B8;B4B8;1103 1171 11BB;B4B8;1103 1171 11BB;
+B4B9;B4B9;1103 1171 11BC;B4B9;1103 1171 11BC;
+B4BA;B4BA;1103 1171 11BD;B4BA;1103 1171 11BD;
+B4BB;B4BB;1103 1171 11BE;B4BB;1103 1171 11BE;
+B4BC;B4BC;1103 1171 11BF;B4BC;1103 1171 11BF;
+B4BD;B4BD;1103 1171 11C0;B4BD;1103 1171 11C0;
+B4BE;B4BE;1103 1171 11C1;B4BE;1103 1171 11C1;
+B4BF;B4BF;1103 1171 11C2;B4BF;1103 1171 11C2;
+B4C0;B4C0;1103 1172;B4C0;1103 1172;
+B4C1;B4C1;1103 1172 11A8;B4C1;1103 1172 11A8;
+B4C2;B4C2;1103 1172 11A9;B4C2;1103 1172 11A9;
+B4C3;B4C3;1103 1172 11AA;B4C3;1103 1172 11AA;
+B4C4;B4C4;1103 1172 11AB;B4C4;1103 1172 11AB;
+B4C5;B4C5;1103 1172 11AC;B4C5;1103 1172 11AC;
+B4C6;B4C6;1103 1172 11AD;B4C6;1103 1172 11AD;
+B4C7;B4C7;1103 1172 11AE;B4C7;1103 1172 11AE;
+B4C8;B4C8;1103 1172 11AF;B4C8;1103 1172 11AF;
+B4C9;B4C9;1103 1172 11B0;B4C9;1103 1172 11B0;
+B4CA;B4CA;1103 1172 11B1;B4CA;1103 1172 11B1;
+B4CB;B4CB;1103 1172 11B2;B4CB;1103 1172 11B2;
+B4CC;B4CC;1103 1172 11B3;B4CC;1103 1172 11B3;
+B4CD;B4CD;1103 1172 11B4;B4CD;1103 1172 11B4;
+B4CE;B4CE;1103 1172 11B5;B4CE;1103 1172 11B5;
+B4CF;B4CF;1103 1172 11B6;B4CF;1103 1172 11B6;
+B4D0;B4D0;1103 1172 11B7;B4D0;1103 1172 11B7;
+B4D1;B4D1;1103 1172 11B8;B4D1;1103 1172 11B8;
+B4D2;B4D2;1103 1172 11B9;B4D2;1103 1172 11B9;
+B4D3;B4D3;1103 1172 11BA;B4D3;1103 1172 11BA;
+B4D4;B4D4;1103 1172 11BB;B4D4;1103 1172 11BB;
+B4D5;B4D5;1103 1172 11BC;B4D5;1103 1172 11BC;
+B4D6;B4D6;1103 1172 11BD;B4D6;1103 1172 11BD;
+B4D7;B4D7;1103 1172 11BE;B4D7;1103 1172 11BE;
+B4D8;B4D8;1103 1172 11BF;B4D8;1103 1172 11BF;
+B4D9;B4D9;1103 1172 11C0;B4D9;1103 1172 11C0;
+B4DA;B4DA;1103 1172 11C1;B4DA;1103 1172 11C1;
+B4DB;B4DB;1103 1172 11C2;B4DB;1103 1172 11C2;
+B4DC;B4DC;1103 1173;B4DC;1103 1173;
+B4DD;B4DD;1103 1173 11A8;B4DD;1103 1173 11A8;
+B4DE;B4DE;1103 1173 11A9;B4DE;1103 1173 11A9;
+B4DF;B4DF;1103 1173 11AA;B4DF;1103 1173 11AA;
+B4E0;B4E0;1103 1173 11AB;B4E0;1103 1173 11AB;
+B4E1;B4E1;1103 1173 11AC;B4E1;1103 1173 11AC;
+B4E2;B4E2;1103 1173 11AD;B4E2;1103 1173 11AD;
+B4E3;B4E3;1103 1173 11AE;B4E3;1103 1173 11AE;
+B4E4;B4E4;1103 1173 11AF;B4E4;1103 1173 11AF;
+B4E5;B4E5;1103 1173 11B0;B4E5;1103 1173 11B0;
+B4E6;B4E6;1103 1173 11B1;B4E6;1103 1173 11B1;
+B4E7;B4E7;1103 1173 11B2;B4E7;1103 1173 11B2;
+B4E8;B4E8;1103 1173 11B3;B4E8;1103 1173 11B3;
+B4E9;B4E9;1103 1173 11B4;B4E9;1103 1173 11B4;
+B4EA;B4EA;1103 1173 11B5;B4EA;1103 1173 11B5;
+B4EB;B4EB;1103 1173 11B6;B4EB;1103 1173 11B6;
+B4EC;B4EC;1103 1173 11B7;B4EC;1103 1173 11B7;
+B4ED;B4ED;1103 1173 11B8;B4ED;1103 1173 11B8;
+B4EE;B4EE;1103 1173 11B9;B4EE;1103 1173 11B9;
+B4EF;B4EF;1103 1173 11BA;B4EF;1103 1173 11BA;
+B4F0;B4F0;1103 1173 11BB;B4F0;1103 1173 11BB;
+B4F1;B4F1;1103 1173 11BC;B4F1;1103 1173 11BC;
+B4F2;B4F2;1103 1173 11BD;B4F2;1103 1173 11BD;
+B4F3;B4F3;1103 1173 11BE;B4F3;1103 1173 11BE;
+B4F4;B4F4;1103 1173 11BF;B4F4;1103 1173 11BF;
+B4F5;B4F5;1103 1173 11C0;B4F5;1103 1173 11C0;
+B4F6;B4F6;1103 1173 11C1;B4F6;1103 1173 11C1;
+B4F7;B4F7;1103 1173 11C2;B4F7;1103 1173 11C2;
+B4F8;B4F8;1103 1174;B4F8;1103 1174;
+B4F9;B4F9;1103 1174 11A8;B4F9;1103 1174 11A8;
+B4FA;B4FA;1103 1174 11A9;B4FA;1103 1174 11A9;
+B4FB;B4FB;1103 1174 11AA;B4FB;1103 1174 11AA;
+B4FC;B4FC;1103 1174 11AB;B4FC;1103 1174 11AB;
+B4FD;B4FD;1103 1174 11AC;B4FD;1103 1174 11AC;
+B4FE;B4FE;1103 1174 11AD;B4FE;1103 1174 11AD;
+B4FF;B4FF;1103 1174 11AE;B4FF;1103 1174 11AE;
+B500;B500;1103 1174 11AF;B500;1103 1174 11AF;
+B501;B501;1103 1174 11B0;B501;1103 1174 11B0;
+B502;B502;1103 1174 11B1;B502;1103 1174 11B1;
+B503;B503;1103 1174 11B2;B503;1103 1174 11B2;
+B504;B504;1103 1174 11B3;B504;1103 1174 11B3;
+B505;B505;1103 1174 11B4;B505;1103 1174 11B4;
+B506;B506;1103 1174 11B5;B506;1103 1174 11B5;
+B507;B507;1103 1174 11B6;B507;1103 1174 11B6;
+B508;B508;1103 1174 11B7;B508;1103 1174 11B7;
+B509;B509;1103 1174 11B8;B509;1103 1174 11B8;
+B50A;B50A;1103 1174 11B9;B50A;1103 1174 11B9;
+B50B;B50B;1103 1174 11BA;B50B;1103 1174 11BA;
+B50C;B50C;1103 1174 11BB;B50C;1103 1174 11BB;
+B50D;B50D;1103 1174 11BC;B50D;1103 1174 11BC;
+B50E;B50E;1103 1174 11BD;B50E;1103 1174 11BD;
+B50F;B50F;1103 1174 11BE;B50F;1103 1174 11BE;
+B510;B510;1103 1174 11BF;B510;1103 1174 11BF;
+B511;B511;1103 1174 11C0;B511;1103 1174 11C0;
+B512;B512;1103 1174 11C1;B512;1103 1174 11C1;
+B513;B513;1103 1174 11C2;B513;1103 1174 11C2;
+B514;B514;1103 1175;B514;1103 1175;
+B515;B515;1103 1175 11A8;B515;1103 1175 11A8;
+B516;B516;1103 1175 11A9;B516;1103 1175 11A9;
+B517;B517;1103 1175 11AA;B517;1103 1175 11AA;
+B518;B518;1103 1175 11AB;B518;1103 1175 11AB;
+B519;B519;1103 1175 11AC;B519;1103 1175 11AC;
+B51A;B51A;1103 1175 11AD;B51A;1103 1175 11AD;
+B51B;B51B;1103 1175 11AE;B51B;1103 1175 11AE;
+B51C;B51C;1103 1175 11AF;B51C;1103 1175 11AF;
+B51D;B51D;1103 1175 11B0;B51D;1103 1175 11B0;
+B51E;B51E;1103 1175 11B1;B51E;1103 1175 11B1;
+B51F;B51F;1103 1175 11B2;B51F;1103 1175 11B2;
+B520;B520;1103 1175 11B3;B520;1103 1175 11B3;
+B521;B521;1103 1175 11B4;B521;1103 1175 11B4;
+B522;B522;1103 1175 11B5;B522;1103 1175 11B5;
+B523;B523;1103 1175 11B6;B523;1103 1175 11B6;
+B524;B524;1103 1175 11B7;B524;1103 1175 11B7;
+B525;B525;1103 1175 11B8;B525;1103 1175 11B8;
+B526;B526;1103 1175 11B9;B526;1103 1175 11B9;
+B527;B527;1103 1175 11BA;B527;1103 1175 11BA;
+B528;B528;1103 1175 11BB;B528;1103 1175 11BB;
+B529;B529;1103 1175 11BC;B529;1103 1175 11BC;
+B52A;B52A;1103 1175 11BD;B52A;1103 1175 11BD;
+B52B;B52B;1103 1175 11BE;B52B;1103 1175 11BE;
+B52C;B52C;1103 1175 11BF;B52C;1103 1175 11BF;
+B52D;B52D;1103 1175 11C0;B52D;1103 1175 11C0;
+B52E;B52E;1103 1175 11C1;B52E;1103 1175 11C1;
+B52F;B52F;1103 1175 11C2;B52F;1103 1175 11C2;
+B530;B530;1104 1161;B530;1104 1161;
+B531;B531;1104 1161 11A8;B531;1104 1161 11A8;
+B532;B532;1104 1161 11A9;B532;1104 1161 11A9;
+B533;B533;1104 1161 11AA;B533;1104 1161 11AA;
+B534;B534;1104 1161 11AB;B534;1104 1161 11AB;
+B535;B535;1104 1161 11AC;B535;1104 1161 11AC;
+B536;B536;1104 1161 11AD;B536;1104 1161 11AD;
+B537;B537;1104 1161 11AE;B537;1104 1161 11AE;
+B538;B538;1104 1161 11AF;B538;1104 1161 11AF;
+B539;B539;1104 1161 11B0;B539;1104 1161 11B0;
+B53A;B53A;1104 1161 11B1;B53A;1104 1161 11B1;
+B53B;B53B;1104 1161 11B2;B53B;1104 1161 11B2;
+B53C;B53C;1104 1161 11B3;B53C;1104 1161 11B3;
+B53D;B53D;1104 1161 11B4;B53D;1104 1161 11B4;
+B53E;B53E;1104 1161 11B5;B53E;1104 1161 11B5;
+B53F;B53F;1104 1161 11B6;B53F;1104 1161 11B6;
+B540;B540;1104 1161 11B7;B540;1104 1161 11B7;
+B541;B541;1104 1161 11B8;B541;1104 1161 11B8;
+B542;B542;1104 1161 11B9;B542;1104 1161 11B9;
+B543;B543;1104 1161 11BA;B543;1104 1161 11BA;
+B544;B544;1104 1161 11BB;B544;1104 1161 11BB;
+B545;B545;1104 1161 11BC;B545;1104 1161 11BC;
+B546;B546;1104 1161 11BD;B546;1104 1161 11BD;
+B547;B547;1104 1161 11BE;B547;1104 1161 11BE;
+B548;B548;1104 1161 11BF;B548;1104 1161 11BF;
+B549;B549;1104 1161 11C0;B549;1104 1161 11C0;
+B54A;B54A;1104 1161 11C1;B54A;1104 1161 11C1;
+B54B;B54B;1104 1161 11C2;B54B;1104 1161 11C2;
+B54C;B54C;1104 1162;B54C;1104 1162;
+B54D;B54D;1104 1162 11A8;B54D;1104 1162 11A8;
+B54E;B54E;1104 1162 11A9;B54E;1104 1162 11A9;
+B54F;B54F;1104 1162 11AA;B54F;1104 1162 11AA;
+B550;B550;1104 1162 11AB;B550;1104 1162 11AB;
+B551;B551;1104 1162 11AC;B551;1104 1162 11AC;
+B552;B552;1104 1162 11AD;B552;1104 1162 11AD;
+B553;B553;1104 1162 11AE;B553;1104 1162 11AE;
+B554;B554;1104 1162 11AF;B554;1104 1162 11AF;
+B555;B555;1104 1162 11B0;B555;1104 1162 11B0;
+B556;B556;1104 1162 11B1;B556;1104 1162 11B1;
+B557;B557;1104 1162 11B2;B557;1104 1162 11B2;
+B558;B558;1104 1162 11B3;B558;1104 1162 11B3;
+B559;B559;1104 1162 11B4;B559;1104 1162 11B4;
+B55A;B55A;1104 1162 11B5;B55A;1104 1162 11B5;
+B55B;B55B;1104 1162 11B6;B55B;1104 1162 11B6;
+B55C;B55C;1104 1162 11B7;B55C;1104 1162 11B7;
+B55D;B55D;1104 1162 11B8;B55D;1104 1162 11B8;
+B55E;B55E;1104 1162 11B9;B55E;1104 1162 11B9;
+B55F;B55F;1104 1162 11BA;B55F;1104 1162 11BA;
+B560;B560;1104 1162 11BB;B560;1104 1162 11BB;
+B561;B561;1104 1162 11BC;B561;1104 1162 11BC;
+B562;B562;1104 1162 11BD;B562;1104 1162 11BD;
+B563;B563;1104 1162 11BE;B563;1104 1162 11BE;
+B564;B564;1104 1162 11BF;B564;1104 1162 11BF;
+B565;B565;1104 1162 11C0;B565;1104 1162 11C0;
+B566;B566;1104 1162 11C1;B566;1104 1162 11C1;
+B567;B567;1104 1162 11C2;B567;1104 1162 11C2;
+B568;B568;1104 1163;B568;1104 1163;
+B569;B569;1104 1163 11A8;B569;1104 1163 11A8;
+B56A;B56A;1104 1163 11A9;B56A;1104 1163 11A9;
+B56B;B56B;1104 1163 11AA;B56B;1104 1163 11AA;
+B56C;B56C;1104 1163 11AB;B56C;1104 1163 11AB;
+B56D;B56D;1104 1163 11AC;B56D;1104 1163 11AC;
+B56E;B56E;1104 1163 11AD;B56E;1104 1163 11AD;
+B56F;B56F;1104 1163 11AE;B56F;1104 1163 11AE;
+B570;B570;1104 1163 11AF;B570;1104 1163 11AF;
+B571;B571;1104 1163 11B0;B571;1104 1163 11B0;
+B572;B572;1104 1163 11B1;B572;1104 1163 11B1;
+B573;B573;1104 1163 11B2;B573;1104 1163 11B2;
+B574;B574;1104 1163 11B3;B574;1104 1163 11B3;
+B575;B575;1104 1163 11B4;B575;1104 1163 11B4;
+B576;B576;1104 1163 11B5;B576;1104 1163 11B5;
+B577;B577;1104 1163 11B6;B577;1104 1163 11B6;
+B578;B578;1104 1163 11B7;B578;1104 1163 11B7;
+B579;B579;1104 1163 11B8;B579;1104 1163 11B8;
+B57A;B57A;1104 1163 11B9;B57A;1104 1163 11B9;
+B57B;B57B;1104 1163 11BA;B57B;1104 1163 11BA;
+B57C;B57C;1104 1163 11BB;B57C;1104 1163 11BB;
+B57D;B57D;1104 1163 11BC;B57D;1104 1163 11BC;
+B57E;B57E;1104 1163 11BD;B57E;1104 1163 11BD;
+B57F;B57F;1104 1163 11BE;B57F;1104 1163 11BE;
+B580;B580;1104 1163 11BF;B580;1104 1163 11BF;
+B581;B581;1104 1163 11C0;B581;1104 1163 11C0;
+B582;B582;1104 1163 11C1;B582;1104 1163 11C1;
+B583;B583;1104 1163 11C2;B583;1104 1163 11C2;
+B584;B584;1104 1164;B584;1104 1164;
+B585;B585;1104 1164 11A8;B585;1104 1164 11A8;
+B586;B586;1104 1164 11A9;B586;1104 1164 11A9;
+B587;B587;1104 1164 11AA;B587;1104 1164 11AA;
+B588;B588;1104 1164 11AB;B588;1104 1164 11AB;
+B589;B589;1104 1164 11AC;B589;1104 1164 11AC;
+B58A;B58A;1104 1164 11AD;B58A;1104 1164 11AD;
+B58B;B58B;1104 1164 11AE;B58B;1104 1164 11AE;
+B58C;B58C;1104 1164 11AF;B58C;1104 1164 11AF;
+B58D;B58D;1104 1164 11B0;B58D;1104 1164 11B0;
+B58E;B58E;1104 1164 11B1;B58E;1104 1164 11B1;
+B58F;B58F;1104 1164 11B2;B58F;1104 1164 11B2;
+B590;B590;1104 1164 11B3;B590;1104 1164 11B3;
+B591;B591;1104 1164 11B4;B591;1104 1164 11B4;
+B592;B592;1104 1164 11B5;B592;1104 1164 11B5;
+B593;B593;1104 1164 11B6;B593;1104 1164 11B6;
+B594;B594;1104 1164 11B7;B594;1104 1164 11B7;
+B595;B595;1104 1164 11B8;B595;1104 1164 11B8;
+B596;B596;1104 1164 11B9;B596;1104 1164 11B9;
+B597;B597;1104 1164 11BA;B597;1104 1164 11BA;
+B598;B598;1104 1164 11BB;B598;1104 1164 11BB;
+B599;B599;1104 1164 11BC;B599;1104 1164 11BC;
+B59A;B59A;1104 1164 11BD;B59A;1104 1164 11BD;
+B59B;B59B;1104 1164 11BE;B59B;1104 1164 11BE;
+B59C;B59C;1104 1164 11BF;B59C;1104 1164 11BF;
+B59D;B59D;1104 1164 11C0;B59D;1104 1164 11C0;
+B59E;B59E;1104 1164 11C1;B59E;1104 1164 11C1;
+B59F;B59F;1104 1164 11C2;B59F;1104 1164 11C2;
+B5A0;B5A0;1104 1165;B5A0;1104 1165;
+B5A1;B5A1;1104 1165 11A8;B5A1;1104 1165 11A8;
+B5A2;B5A2;1104 1165 11A9;B5A2;1104 1165 11A9;
+B5A3;B5A3;1104 1165 11AA;B5A3;1104 1165 11AA;
+B5A4;B5A4;1104 1165 11AB;B5A4;1104 1165 11AB;
+B5A5;B5A5;1104 1165 11AC;B5A5;1104 1165 11AC;
+B5A6;B5A6;1104 1165 11AD;B5A6;1104 1165 11AD;
+B5A7;B5A7;1104 1165 11AE;B5A7;1104 1165 11AE;
+B5A8;B5A8;1104 1165 11AF;B5A8;1104 1165 11AF;
+B5A9;B5A9;1104 1165 11B0;B5A9;1104 1165 11B0;
+B5AA;B5AA;1104 1165 11B1;B5AA;1104 1165 11B1;
+B5AB;B5AB;1104 1165 11B2;B5AB;1104 1165 11B2;
+B5AC;B5AC;1104 1165 11B3;B5AC;1104 1165 11B3;
+B5AD;B5AD;1104 1165 11B4;B5AD;1104 1165 11B4;
+B5AE;B5AE;1104 1165 11B5;B5AE;1104 1165 11B5;
+B5AF;B5AF;1104 1165 11B6;B5AF;1104 1165 11B6;
+B5B0;B5B0;1104 1165 11B7;B5B0;1104 1165 11B7;
+B5B1;B5B1;1104 1165 11B8;B5B1;1104 1165 11B8;
+B5B2;B5B2;1104 1165 11B9;B5B2;1104 1165 11B9;
+B5B3;B5B3;1104 1165 11BA;B5B3;1104 1165 11BA;
+B5B4;B5B4;1104 1165 11BB;B5B4;1104 1165 11BB;
+B5B5;B5B5;1104 1165 11BC;B5B5;1104 1165 11BC;
+B5B6;B5B6;1104 1165 11BD;B5B6;1104 1165 11BD;
+B5B7;B5B7;1104 1165 11BE;B5B7;1104 1165 11BE;
+B5B8;B5B8;1104 1165 11BF;B5B8;1104 1165 11BF;
+B5B9;B5B9;1104 1165 11C0;B5B9;1104 1165 11C0;
+B5BA;B5BA;1104 1165 11C1;B5BA;1104 1165 11C1;
+B5BB;B5BB;1104 1165 11C2;B5BB;1104 1165 11C2;
+B5BC;B5BC;1104 1166;B5BC;1104 1166;
+B5BD;B5BD;1104 1166 11A8;B5BD;1104 1166 11A8;
+B5BE;B5BE;1104 1166 11A9;B5BE;1104 1166 11A9;
+B5BF;B5BF;1104 1166 11AA;B5BF;1104 1166 11AA;
+B5C0;B5C0;1104 1166 11AB;B5C0;1104 1166 11AB;
+B5C1;B5C1;1104 1166 11AC;B5C1;1104 1166 11AC;
+B5C2;B5C2;1104 1166 11AD;B5C2;1104 1166 11AD;
+B5C3;B5C3;1104 1166 11AE;B5C3;1104 1166 11AE;
+B5C4;B5C4;1104 1166 11AF;B5C4;1104 1166 11AF;
+B5C5;B5C5;1104 1166 11B0;B5C5;1104 1166 11B0;
+B5C6;B5C6;1104 1166 11B1;B5C6;1104 1166 11B1;
+B5C7;B5C7;1104 1166 11B2;B5C7;1104 1166 11B2;
+B5C8;B5C8;1104 1166 11B3;B5C8;1104 1166 11B3;
+B5C9;B5C9;1104 1166 11B4;B5C9;1104 1166 11B4;
+B5CA;B5CA;1104 1166 11B5;B5CA;1104 1166 11B5;
+B5CB;B5CB;1104 1166 11B6;B5CB;1104 1166 11B6;
+B5CC;B5CC;1104 1166 11B7;B5CC;1104 1166 11B7;
+B5CD;B5CD;1104 1166 11B8;B5CD;1104 1166 11B8;
+B5CE;B5CE;1104 1166 11B9;B5CE;1104 1166 11B9;
+B5CF;B5CF;1104 1166 11BA;B5CF;1104 1166 11BA;
+B5D0;B5D0;1104 1166 11BB;B5D0;1104 1166 11BB;
+B5D1;B5D1;1104 1166 11BC;B5D1;1104 1166 11BC;
+B5D2;B5D2;1104 1166 11BD;B5D2;1104 1166 11BD;
+B5D3;B5D3;1104 1166 11BE;B5D3;1104 1166 11BE;
+B5D4;B5D4;1104 1166 11BF;B5D4;1104 1166 11BF;
+B5D5;B5D5;1104 1166 11C0;B5D5;1104 1166 11C0;
+B5D6;B5D6;1104 1166 11C1;B5D6;1104 1166 11C1;
+B5D7;B5D7;1104 1166 11C2;B5D7;1104 1166 11C2;
+B5D8;B5D8;1104 1167;B5D8;1104 1167;
+B5D9;B5D9;1104 1167 11A8;B5D9;1104 1167 11A8;
+B5DA;B5DA;1104 1167 11A9;B5DA;1104 1167 11A9;
+B5DB;B5DB;1104 1167 11AA;B5DB;1104 1167 11AA;
+B5DC;B5DC;1104 1167 11AB;B5DC;1104 1167 11AB;
+B5DD;B5DD;1104 1167 11AC;B5DD;1104 1167 11AC;
+B5DE;B5DE;1104 1167 11AD;B5DE;1104 1167 11AD;
+B5DF;B5DF;1104 1167 11AE;B5DF;1104 1167 11AE;
+B5E0;B5E0;1104 1167 11AF;B5E0;1104 1167 11AF;
+B5E1;B5E1;1104 1167 11B0;B5E1;1104 1167 11B0;
+B5E2;B5E2;1104 1167 11B1;B5E2;1104 1167 11B1;
+B5E3;B5E3;1104 1167 11B2;B5E3;1104 1167 11B2;
+B5E4;B5E4;1104 1167 11B3;B5E4;1104 1167 11B3;
+B5E5;B5E5;1104 1167 11B4;B5E5;1104 1167 11B4;
+B5E6;B5E6;1104 1167 11B5;B5E6;1104 1167 11B5;
+B5E7;B5E7;1104 1167 11B6;B5E7;1104 1167 11B6;
+B5E8;B5E8;1104 1167 11B7;B5E8;1104 1167 11B7;
+B5E9;B5E9;1104 1167 11B8;B5E9;1104 1167 11B8;
+B5EA;B5EA;1104 1167 11B9;B5EA;1104 1167 11B9;
+B5EB;B5EB;1104 1167 11BA;B5EB;1104 1167 11BA;
+B5EC;B5EC;1104 1167 11BB;B5EC;1104 1167 11BB;
+B5ED;B5ED;1104 1167 11BC;B5ED;1104 1167 11BC;
+B5EE;B5EE;1104 1167 11BD;B5EE;1104 1167 11BD;
+B5EF;B5EF;1104 1167 11BE;B5EF;1104 1167 11BE;
+B5F0;B5F0;1104 1167 11BF;B5F0;1104 1167 11BF;
+B5F1;B5F1;1104 1167 11C0;B5F1;1104 1167 11C0;
+B5F2;B5F2;1104 1167 11C1;B5F2;1104 1167 11C1;
+B5F3;B5F3;1104 1167 11C2;B5F3;1104 1167 11C2;
+B5F4;B5F4;1104 1168;B5F4;1104 1168;
+B5F5;B5F5;1104 1168 11A8;B5F5;1104 1168 11A8;
+B5F6;B5F6;1104 1168 11A9;B5F6;1104 1168 11A9;
+B5F7;B5F7;1104 1168 11AA;B5F7;1104 1168 11AA;
+B5F8;B5F8;1104 1168 11AB;B5F8;1104 1168 11AB;
+B5F9;B5F9;1104 1168 11AC;B5F9;1104 1168 11AC;
+B5FA;B5FA;1104 1168 11AD;B5FA;1104 1168 11AD;
+B5FB;B5FB;1104 1168 11AE;B5FB;1104 1168 11AE;
+B5FC;B5FC;1104 1168 11AF;B5FC;1104 1168 11AF;
+B5FD;B5FD;1104 1168 11B0;B5FD;1104 1168 11B0;
+B5FE;B5FE;1104 1168 11B1;B5FE;1104 1168 11B1;
+B5FF;B5FF;1104 1168 11B2;B5FF;1104 1168 11B2;
+B600;B600;1104 1168 11B3;B600;1104 1168 11B3;
+B601;B601;1104 1168 11B4;B601;1104 1168 11B4;
+B602;B602;1104 1168 11B5;B602;1104 1168 11B5;
+B603;B603;1104 1168 11B6;B603;1104 1168 11B6;
+B604;B604;1104 1168 11B7;B604;1104 1168 11B7;
+B605;B605;1104 1168 11B8;B605;1104 1168 11B8;
+B606;B606;1104 1168 11B9;B606;1104 1168 11B9;
+B607;B607;1104 1168 11BA;B607;1104 1168 11BA;
+B608;B608;1104 1168 11BB;B608;1104 1168 11BB;
+B609;B609;1104 1168 11BC;B609;1104 1168 11BC;
+B60A;B60A;1104 1168 11BD;B60A;1104 1168 11BD;
+B60B;B60B;1104 1168 11BE;B60B;1104 1168 11BE;
+B60C;B60C;1104 1168 11BF;B60C;1104 1168 11BF;
+B60D;B60D;1104 1168 11C0;B60D;1104 1168 11C0;
+B60E;B60E;1104 1168 11C1;B60E;1104 1168 11C1;
+B60F;B60F;1104 1168 11C2;B60F;1104 1168 11C2;
+B610;B610;1104 1169;B610;1104 1169;
+B611;B611;1104 1169 11A8;B611;1104 1169 11A8;
+B612;B612;1104 1169 11A9;B612;1104 1169 11A9;
+B613;B613;1104 1169 11AA;B613;1104 1169 11AA;
+B614;B614;1104 1169 11AB;B614;1104 1169 11AB;
+B615;B615;1104 1169 11AC;B615;1104 1169 11AC;
+B616;B616;1104 1169 11AD;B616;1104 1169 11AD;
+B617;B617;1104 1169 11AE;B617;1104 1169 11AE;
+B618;B618;1104 1169 11AF;B618;1104 1169 11AF;
+B619;B619;1104 1169 11B0;B619;1104 1169 11B0;
+B61A;B61A;1104 1169 11B1;B61A;1104 1169 11B1;
+B61B;B61B;1104 1169 11B2;B61B;1104 1169 11B2;
+B61C;B61C;1104 1169 11B3;B61C;1104 1169 11B3;
+B61D;B61D;1104 1169 11B4;B61D;1104 1169 11B4;
+B61E;B61E;1104 1169 11B5;B61E;1104 1169 11B5;
+B61F;B61F;1104 1169 11B6;B61F;1104 1169 11B6;
+B620;B620;1104 1169 11B7;B620;1104 1169 11B7;
+B621;B621;1104 1169 11B8;B621;1104 1169 11B8;
+B622;B622;1104 1169 11B9;B622;1104 1169 11B9;
+B623;B623;1104 1169 11BA;B623;1104 1169 11BA;
+B624;B624;1104 1169 11BB;B624;1104 1169 11BB;
+B625;B625;1104 1169 11BC;B625;1104 1169 11BC;
+B626;B626;1104 1169 11BD;B626;1104 1169 11BD;
+B627;B627;1104 1169 11BE;B627;1104 1169 11BE;
+B628;B628;1104 1169 11BF;B628;1104 1169 11BF;
+B629;B629;1104 1169 11C0;B629;1104 1169 11C0;
+B62A;B62A;1104 1169 11C1;B62A;1104 1169 11C1;
+B62B;B62B;1104 1169 11C2;B62B;1104 1169 11C2;
+B62C;B62C;1104 116A;B62C;1104 116A;
+B62D;B62D;1104 116A 11A8;B62D;1104 116A 11A8;
+B62E;B62E;1104 116A 11A9;B62E;1104 116A 11A9;
+B62F;B62F;1104 116A 11AA;B62F;1104 116A 11AA;
+B630;B630;1104 116A 11AB;B630;1104 116A 11AB;
+B631;B631;1104 116A 11AC;B631;1104 116A 11AC;
+B632;B632;1104 116A 11AD;B632;1104 116A 11AD;
+B633;B633;1104 116A 11AE;B633;1104 116A 11AE;
+B634;B634;1104 116A 11AF;B634;1104 116A 11AF;
+B635;B635;1104 116A 11B0;B635;1104 116A 11B0;
+B636;B636;1104 116A 11B1;B636;1104 116A 11B1;
+B637;B637;1104 116A 11B2;B637;1104 116A 11B2;
+B638;B638;1104 116A 11B3;B638;1104 116A 11B3;
+B639;B639;1104 116A 11B4;B639;1104 116A 11B4;
+B63A;B63A;1104 116A 11B5;B63A;1104 116A 11B5;
+B63B;B63B;1104 116A 11B6;B63B;1104 116A 11B6;
+B63C;B63C;1104 116A 11B7;B63C;1104 116A 11B7;
+B63D;B63D;1104 116A 11B8;B63D;1104 116A 11B8;
+B63E;B63E;1104 116A 11B9;B63E;1104 116A 11B9;
+B63F;B63F;1104 116A 11BA;B63F;1104 116A 11BA;
+B640;B640;1104 116A 11BB;B640;1104 116A 11BB;
+B641;B641;1104 116A 11BC;B641;1104 116A 11BC;
+B642;B642;1104 116A 11BD;B642;1104 116A 11BD;
+B643;B643;1104 116A 11BE;B643;1104 116A 11BE;
+B644;B644;1104 116A 11BF;B644;1104 116A 11BF;
+B645;B645;1104 116A 11C0;B645;1104 116A 11C0;
+B646;B646;1104 116A 11C1;B646;1104 116A 11C1;
+B647;B647;1104 116A 11C2;B647;1104 116A 11C2;
+B648;B648;1104 116B;B648;1104 116B;
+B649;B649;1104 116B 11A8;B649;1104 116B 11A8;
+B64A;B64A;1104 116B 11A9;B64A;1104 116B 11A9;
+B64B;B64B;1104 116B 11AA;B64B;1104 116B 11AA;
+B64C;B64C;1104 116B 11AB;B64C;1104 116B 11AB;
+B64D;B64D;1104 116B 11AC;B64D;1104 116B 11AC;
+B64E;B64E;1104 116B 11AD;B64E;1104 116B 11AD;
+B64F;B64F;1104 116B 11AE;B64F;1104 116B 11AE;
+B650;B650;1104 116B 11AF;B650;1104 116B 11AF;
+B651;B651;1104 116B 11B0;B651;1104 116B 11B0;
+B652;B652;1104 116B 11B1;B652;1104 116B 11B1;
+B653;B653;1104 116B 11B2;B653;1104 116B 11B2;
+B654;B654;1104 116B 11B3;B654;1104 116B 11B3;
+B655;B655;1104 116B 11B4;B655;1104 116B 11B4;
+B656;B656;1104 116B 11B5;B656;1104 116B 11B5;
+B657;B657;1104 116B 11B6;B657;1104 116B 11B6;
+B658;B658;1104 116B 11B7;B658;1104 116B 11B7;
+B659;B659;1104 116B 11B8;B659;1104 116B 11B8;
+B65A;B65A;1104 116B 11B9;B65A;1104 116B 11B9;
+B65B;B65B;1104 116B 11BA;B65B;1104 116B 11BA;
+B65C;B65C;1104 116B 11BB;B65C;1104 116B 11BB;
+B65D;B65D;1104 116B 11BC;B65D;1104 116B 11BC;
+B65E;B65E;1104 116B 11BD;B65E;1104 116B 11BD;
+B65F;B65F;1104 116B 11BE;B65F;1104 116B 11BE;
+B660;B660;1104 116B 11BF;B660;1104 116B 11BF;
+B661;B661;1104 116B 11C0;B661;1104 116B 11C0;
+B662;B662;1104 116B 11C1;B662;1104 116B 11C1;
+B663;B663;1104 116B 11C2;B663;1104 116B 11C2;
+B664;B664;1104 116C;B664;1104 116C;
+B665;B665;1104 116C 11A8;B665;1104 116C 11A8;
+B666;B666;1104 116C 11A9;B666;1104 116C 11A9;
+B667;B667;1104 116C 11AA;B667;1104 116C 11AA;
+B668;B668;1104 116C 11AB;B668;1104 116C 11AB;
+B669;B669;1104 116C 11AC;B669;1104 116C 11AC;
+B66A;B66A;1104 116C 11AD;B66A;1104 116C 11AD;
+B66B;B66B;1104 116C 11AE;B66B;1104 116C 11AE;
+B66C;B66C;1104 116C 11AF;B66C;1104 116C 11AF;
+B66D;B66D;1104 116C 11B0;B66D;1104 116C 11B0;
+B66E;B66E;1104 116C 11B1;B66E;1104 116C 11B1;
+B66F;B66F;1104 116C 11B2;B66F;1104 116C 11B2;
+B670;B670;1104 116C 11B3;B670;1104 116C 11B3;
+B671;B671;1104 116C 11B4;B671;1104 116C 11B4;
+B672;B672;1104 116C 11B5;B672;1104 116C 11B5;
+B673;B673;1104 116C 11B6;B673;1104 116C 11B6;
+B674;B674;1104 116C 11B7;B674;1104 116C 11B7;
+B675;B675;1104 116C 11B8;B675;1104 116C 11B8;
+B676;B676;1104 116C 11B9;B676;1104 116C 11B9;
+B677;B677;1104 116C 11BA;B677;1104 116C 11BA;
+B678;B678;1104 116C 11BB;B678;1104 116C 11BB;
+B679;B679;1104 116C 11BC;B679;1104 116C 11BC;
+B67A;B67A;1104 116C 11BD;B67A;1104 116C 11BD;
+B67B;B67B;1104 116C 11BE;B67B;1104 116C 11BE;
+B67C;B67C;1104 116C 11BF;B67C;1104 116C 11BF;
+B67D;B67D;1104 116C 11C0;B67D;1104 116C 11C0;
+B67E;B67E;1104 116C 11C1;B67E;1104 116C 11C1;
+B67F;B67F;1104 116C 11C2;B67F;1104 116C 11C2;
+B680;B680;1104 116D;B680;1104 116D;
+B681;B681;1104 116D 11A8;B681;1104 116D 11A8;
+B682;B682;1104 116D 11A9;B682;1104 116D 11A9;
+B683;B683;1104 116D 11AA;B683;1104 116D 11AA;
+B684;B684;1104 116D 11AB;B684;1104 116D 11AB;
+B685;B685;1104 116D 11AC;B685;1104 116D 11AC;
+B686;B686;1104 116D 11AD;B686;1104 116D 11AD;
+B687;B687;1104 116D 11AE;B687;1104 116D 11AE;
+B688;B688;1104 116D 11AF;B688;1104 116D 11AF;
+B689;B689;1104 116D 11B0;B689;1104 116D 11B0;
+B68A;B68A;1104 116D 11B1;B68A;1104 116D 11B1;
+B68B;B68B;1104 116D 11B2;B68B;1104 116D 11B2;
+B68C;B68C;1104 116D 11B3;B68C;1104 116D 11B3;
+B68D;B68D;1104 116D 11B4;B68D;1104 116D 11B4;
+B68E;B68E;1104 116D 11B5;B68E;1104 116D 11B5;
+B68F;B68F;1104 116D 11B6;B68F;1104 116D 11B6;
+B690;B690;1104 116D 11B7;B690;1104 116D 11B7;
+B691;B691;1104 116D 11B8;B691;1104 116D 11B8;
+B692;B692;1104 116D 11B9;B692;1104 116D 11B9;
+B693;B693;1104 116D 11BA;B693;1104 116D 11BA;
+B694;B694;1104 116D 11BB;B694;1104 116D 11BB;
+B695;B695;1104 116D 11BC;B695;1104 116D 11BC;
+B696;B696;1104 116D 11BD;B696;1104 116D 11BD;
+B697;B697;1104 116D 11BE;B697;1104 116D 11BE;
+B698;B698;1104 116D 11BF;B698;1104 116D 11BF;
+B699;B699;1104 116D 11C0;B699;1104 116D 11C0;
+B69A;B69A;1104 116D 11C1;B69A;1104 116D 11C1;
+B69B;B69B;1104 116D 11C2;B69B;1104 116D 11C2;
+B69C;B69C;1104 116E;B69C;1104 116E;
+B69D;B69D;1104 116E 11A8;B69D;1104 116E 11A8;
+B69E;B69E;1104 116E 11A9;B69E;1104 116E 11A9;
+B69F;B69F;1104 116E 11AA;B69F;1104 116E 11AA;
+B6A0;B6A0;1104 116E 11AB;B6A0;1104 116E 11AB;
+B6A1;B6A1;1104 116E 11AC;B6A1;1104 116E 11AC;
+B6A2;B6A2;1104 116E 11AD;B6A2;1104 116E 11AD;
+B6A3;B6A3;1104 116E 11AE;B6A3;1104 116E 11AE;
+B6A4;B6A4;1104 116E 11AF;B6A4;1104 116E 11AF;
+B6A5;B6A5;1104 116E 11B0;B6A5;1104 116E 11B0;
+B6A6;B6A6;1104 116E 11B1;B6A6;1104 116E 11B1;
+B6A7;B6A7;1104 116E 11B2;B6A7;1104 116E 11B2;
+B6A8;B6A8;1104 116E 11B3;B6A8;1104 116E 11B3;
+B6A9;B6A9;1104 116E 11B4;B6A9;1104 116E 11B4;
+B6AA;B6AA;1104 116E 11B5;B6AA;1104 116E 11B5;
+B6AB;B6AB;1104 116E 11B6;B6AB;1104 116E 11B6;
+B6AC;B6AC;1104 116E 11B7;B6AC;1104 116E 11B7;
+B6AD;B6AD;1104 116E 11B8;B6AD;1104 116E 11B8;
+B6AE;B6AE;1104 116E 11B9;B6AE;1104 116E 11B9;
+B6AF;B6AF;1104 116E 11BA;B6AF;1104 116E 11BA;
+B6B0;B6B0;1104 116E 11BB;B6B0;1104 116E 11BB;
+B6B1;B6B1;1104 116E 11BC;B6B1;1104 116E 11BC;
+B6B2;B6B2;1104 116E 11BD;B6B2;1104 116E 11BD;
+B6B3;B6B3;1104 116E 11BE;B6B3;1104 116E 11BE;
+B6B4;B6B4;1104 116E 11BF;B6B4;1104 116E 11BF;
+B6B5;B6B5;1104 116E 11C0;B6B5;1104 116E 11C0;
+B6B6;B6B6;1104 116E 11C1;B6B6;1104 116E 11C1;
+B6B7;B6B7;1104 116E 11C2;B6B7;1104 116E 11C2;
+B6B8;B6B8;1104 116F;B6B8;1104 116F;
+B6B9;B6B9;1104 116F 11A8;B6B9;1104 116F 11A8;
+B6BA;B6BA;1104 116F 11A9;B6BA;1104 116F 11A9;
+B6BB;B6BB;1104 116F 11AA;B6BB;1104 116F 11AA;
+B6BC;B6BC;1104 116F 11AB;B6BC;1104 116F 11AB;
+B6BD;B6BD;1104 116F 11AC;B6BD;1104 116F 11AC;
+B6BE;B6BE;1104 116F 11AD;B6BE;1104 116F 11AD;
+B6BF;B6BF;1104 116F 11AE;B6BF;1104 116F 11AE;
+B6C0;B6C0;1104 116F 11AF;B6C0;1104 116F 11AF;
+B6C1;B6C1;1104 116F 11B0;B6C1;1104 116F 11B0;
+B6C2;B6C2;1104 116F 11B1;B6C2;1104 116F 11B1;
+B6C3;B6C3;1104 116F 11B2;B6C3;1104 116F 11B2;
+B6C4;B6C4;1104 116F 11B3;B6C4;1104 116F 11B3;
+B6C5;B6C5;1104 116F 11B4;B6C5;1104 116F 11B4;
+B6C6;B6C6;1104 116F 11B5;B6C6;1104 116F 11B5;
+B6C7;B6C7;1104 116F 11B6;B6C7;1104 116F 11B6;
+B6C8;B6C8;1104 116F 11B7;B6C8;1104 116F 11B7;
+B6C9;B6C9;1104 116F 11B8;B6C9;1104 116F 11B8;
+B6CA;B6CA;1104 116F 11B9;B6CA;1104 116F 11B9;
+B6CB;B6CB;1104 116F 11BA;B6CB;1104 116F 11BA;
+B6CC;B6CC;1104 116F 11BB;B6CC;1104 116F 11BB;
+B6CD;B6CD;1104 116F 11BC;B6CD;1104 116F 11BC;
+B6CE;B6CE;1104 116F 11BD;B6CE;1104 116F 11BD;
+B6CF;B6CF;1104 116F 11BE;B6CF;1104 116F 11BE;
+B6D0;B6D0;1104 116F 11BF;B6D0;1104 116F 11BF;
+B6D1;B6D1;1104 116F 11C0;B6D1;1104 116F 11C0;
+B6D2;B6D2;1104 116F 11C1;B6D2;1104 116F 11C1;
+B6D3;B6D3;1104 116F 11C2;B6D3;1104 116F 11C2;
+B6D4;B6D4;1104 1170;B6D4;1104 1170;
+B6D5;B6D5;1104 1170 11A8;B6D5;1104 1170 11A8;
+B6D6;B6D6;1104 1170 11A9;B6D6;1104 1170 11A9;
+B6D7;B6D7;1104 1170 11AA;B6D7;1104 1170 11AA;
+B6D8;B6D8;1104 1170 11AB;B6D8;1104 1170 11AB;
+B6D9;B6D9;1104 1170 11AC;B6D9;1104 1170 11AC;
+B6DA;B6DA;1104 1170 11AD;B6DA;1104 1170 11AD;
+B6DB;B6DB;1104 1170 11AE;B6DB;1104 1170 11AE;
+B6DC;B6DC;1104 1170 11AF;B6DC;1104 1170 11AF;
+B6DD;B6DD;1104 1170 11B0;B6DD;1104 1170 11B0;
+B6DE;B6DE;1104 1170 11B1;B6DE;1104 1170 11B1;
+B6DF;B6DF;1104 1170 11B2;B6DF;1104 1170 11B2;
+B6E0;B6E0;1104 1170 11B3;B6E0;1104 1170 11B3;
+B6E1;B6E1;1104 1170 11B4;B6E1;1104 1170 11B4;
+B6E2;B6E2;1104 1170 11B5;B6E2;1104 1170 11B5;
+B6E3;B6E3;1104 1170 11B6;B6E3;1104 1170 11B6;
+B6E4;B6E4;1104 1170 11B7;B6E4;1104 1170 11B7;
+B6E5;B6E5;1104 1170 11B8;B6E5;1104 1170 11B8;
+B6E6;B6E6;1104 1170 11B9;B6E6;1104 1170 11B9;
+B6E7;B6E7;1104 1170 11BA;B6E7;1104 1170 11BA;
+B6E8;B6E8;1104 1170 11BB;B6E8;1104 1170 11BB;
+B6E9;B6E9;1104 1170 11BC;B6E9;1104 1170 11BC;
+B6EA;B6EA;1104 1170 11BD;B6EA;1104 1170 11BD;
+B6EB;B6EB;1104 1170 11BE;B6EB;1104 1170 11BE;
+B6EC;B6EC;1104 1170 11BF;B6EC;1104 1170 11BF;
+B6ED;B6ED;1104 1170 11C0;B6ED;1104 1170 11C0;
+B6EE;B6EE;1104 1170 11C1;B6EE;1104 1170 11C1;
+B6EF;B6EF;1104 1170 11C2;B6EF;1104 1170 11C2;
+B6F0;B6F0;1104 1171;B6F0;1104 1171;
+B6F1;B6F1;1104 1171 11A8;B6F1;1104 1171 11A8;
+B6F2;B6F2;1104 1171 11A9;B6F2;1104 1171 11A9;
+B6F3;B6F3;1104 1171 11AA;B6F3;1104 1171 11AA;
+B6F4;B6F4;1104 1171 11AB;B6F4;1104 1171 11AB;
+B6F5;B6F5;1104 1171 11AC;B6F5;1104 1171 11AC;
+B6F6;B6F6;1104 1171 11AD;B6F6;1104 1171 11AD;
+B6F7;B6F7;1104 1171 11AE;B6F7;1104 1171 11AE;
+B6F8;B6F8;1104 1171 11AF;B6F8;1104 1171 11AF;
+B6F9;B6F9;1104 1171 11B0;B6F9;1104 1171 11B0;
+B6FA;B6FA;1104 1171 11B1;B6FA;1104 1171 11B1;
+B6FB;B6FB;1104 1171 11B2;B6FB;1104 1171 11B2;
+B6FC;B6FC;1104 1171 11B3;B6FC;1104 1171 11B3;
+B6FD;B6FD;1104 1171 11B4;B6FD;1104 1171 11B4;
+B6FE;B6FE;1104 1171 11B5;B6FE;1104 1171 11B5;
+B6FF;B6FF;1104 1171 11B6;B6FF;1104 1171 11B6;
+B700;B700;1104 1171 11B7;B700;1104 1171 11B7;
+B701;B701;1104 1171 11B8;B701;1104 1171 11B8;
+B702;B702;1104 1171 11B9;B702;1104 1171 11B9;
+B703;B703;1104 1171 11BA;B703;1104 1171 11BA;
+B704;B704;1104 1171 11BB;B704;1104 1171 11BB;
+B705;B705;1104 1171 11BC;B705;1104 1171 11BC;
+B706;B706;1104 1171 11BD;B706;1104 1171 11BD;
+B707;B707;1104 1171 11BE;B707;1104 1171 11BE;
+B708;B708;1104 1171 11BF;B708;1104 1171 11BF;
+B709;B709;1104 1171 11C0;B709;1104 1171 11C0;
+B70A;B70A;1104 1171 11C1;B70A;1104 1171 11C1;
+B70B;B70B;1104 1171 11C2;B70B;1104 1171 11C2;
+B70C;B70C;1104 1172;B70C;1104 1172;
+B70D;B70D;1104 1172 11A8;B70D;1104 1172 11A8;
+B70E;B70E;1104 1172 11A9;B70E;1104 1172 11A9;
+B70F;B70F;1104 1172 11AA;B70F;1104 1172 11AA;
+B710;B710;1104 1172 11AB;B710;1104 1172 11AB;
+B711;B711;1104 1172 11AC;B711;1104 1172 11AC;
+B712;B712;1104 1172 11AD;B712;1104 1172 11AD;
+B713;B713;1104 1172 11AE;B713;1104 1172 11AE;
+B714;B714;1104 1172 11AF;B714;1104 1172 11AF;
+B715;B715;1104 1172 11B0;B715;1104 1172 11B0;
+B716;B716;1104 1172 11B1;B716;1104 1172 11B1;
+B717;B717;1104 1172 11B2;B717;1104 1172 11B2;
+B718;B718;1104 1172 11B3;B718;1104 1172 11B3;
+B719;B719;1104 1172 11B4;B719;1104 1172 11B4;
+B71A;B71A;1104 1172 11B5;B71A;1104 1172 11B5;
+B71B;B71B;1104 1172 11B6;B71B;1104 1172 11B6;
+B71C;B71C;1104 1172 11B7;B71C;1104 1172 11B7;
+B71D;B71D;1104 1172 11B8;B71D;1104 1172 11B8;
+B71E;B71E;1104 1172 11B9;B71E;1104 1172 11B9;
+B71F;B71F;1104 1172 11BA;B71F;1104 1172 11BA;
+B720;B720;1104 1172 11BB;B720;1104 1172 11BB;
+B721;B721;1104 1172 11BC;B721;1104 1172 11BC;
+B722;B722;1104 1172 11BD;B722;1104 1172 11BD;
+B723;B723;1104 1172 11BE;B723;1104 1172 11BE;
+B724;B724;1104 1172 11BF;B724;1104 1172 11BF;
+B725;B725;1104 1172 11C0;B725;1104 1172 11C0;
+B726;B726;1104 1172 11C1;B726;1104 1172 11C1;
+B727;B727;1104 1172 11C2;B727;1104 1172 11C2;
+B728;B728;1104 1173;B728;1104 1173;
+B729;B729;1104 1173 11A8;B729;1104 1173 11A8;
+B72A;B72A;1104 1173 11A9;B72A;1104 1173 11A9;
+B72B;B72B;1104 1173 11AA;B72B;1104 1173 11AA;
+B72C;B72C;1104 1173 11AB;B72C;1104 1173 11AB;
+B72D;B72D;1104 1173 11AC;B72D;1104 1173 11AC;
+B72E;B72E;1104 1173 11AD;B72E;1104 1173 11AD;
+B72F;B72F;1104 1173 11AE;B72F;1104 1173 11AE;
+B730;B730;1104 1173 11AF;B730;1104 1173 11AF;
+B731;B731;1104 1173 11B0;B731;1104 1173 11B0;
+B732;B732;1104 1173 11B1;B732;1104 1173 11B1;
+B733;B733;1104 1173 11B2;B733;1104 1173 11B2;
+B734;B734;1104 1173 11B3;B734;1104 1173 11B3;
+B735;B735;1104 1173 11B4;B735;1104 1173 11B4;
+B736;B736;1104 1173 11B5;B736;1104 1173 11B5;
+B737;B737;1104 1173 11B6;B737;1104 1173 11B6;
+B738;B738;1104 1173 11B7;B738;1104 1173 11B7;
+B739;B739;1104 1173 11B8;B739;1104 1173 11B8;
+B73A;B73A;1104 1173 11B9;B73A;1104 1173 11B9;
+B73B;B73B;1104 1173 11BA;B73B;1104 1173 11BA;
+B73C;B73C;1104 1173 11BB;B73C;1104 1173 11BB;
+B73D;B73D;1104 1173 11BC;B73D;1104 1173 11BC;
+B73E;B73E;1104 1173 11BD;B73E;1104 1173 11BD;
+B73F;B73F;1104 1173 11BE;B73F;1104 1173 11BE;
+B740;B740;1104 1173 11BF;B740;1104 1173 11BF;
+B741;B741;1104 1173 11C0;B741;1104 1173 11C0;
+B742;B742;1104 1173 11C1;B742;1104 1173 11C1;
+B743;B743;1104 1173 11C2;B743;1104 1173 11C2;
+B744;B744;1104 1174;B744;1104 1174;
+B745;B745;1104 1174 11A8;B745;1104 1174 11A8;
+B746;B746;1104 1174 11A9;B746;1104 1174 11A9;
+B747;B747;1104 1174 11AA;B747;1104 1174 11AA;
+B748;B748;1104 1174 11AB;B748;1104 1174 11AB;
+B749;B749;1104 1174 11AC;B749;1104 1174 11AC;
+B74A;B74A;1104 1174 11AD;B74A;1104 1174 11AD;
+B74B;B74B;1104 1174 11AE;B74B;1104 1174 11AE;
+B74C;B74C;1104 1174 11AF;B74C;1104 1174 11AF;
+B74D;B74D;1104 1174 11B0;B74D;1104 1174 11B0;
+B74E;B74E;1104 1174 11B1;B74E;1104 1174 11B1;
+B74F;B74F;1104 1174 11B2;B74F;1104 1174 11B2;
+B750;B750;1104 1174 11B3;B750;1104 1174 11B3;
+B751;B751;1104 1174 11B4;B751;1104 1174 11B4;
+B752;B752;1104 1174 11B5;B752;1104 1174 11B5;
+B753;B753;1104 1174 11B6;B753;1104 1174 11B6;
+B754;B754;1104 1174 11B7;B754;1104 1174 11B7;
+B755;B755;1104 1174 11B8;B755;1104 1174 11B8;
+B756;B756;1104 1174 11B9;B756;1104 1174 11B9;
+B757;B757;1104 1174 11BA;B757;1104 1174 11BA;
+B758;B758;1104 1174 11BB;B758;1104 1174 11BB;
+B759;B759;1104 1174 11BC;B759;1104 1174 11BC;
+B75A;B75A;1104 1174 11BD;B75A;1104 1174 11BD;
+B75B;B75B;1104 1174 11BE;B75B;1104 1174 11BE;
+B75C;B75C;1104 1174 11BF;B75C;1104 1174 11BF;
+B75D;B75D;1104 1174 11C0;B75D;1104 1174 11C0;
+B75E;B75E;1104 1174 11C1;B75E;1104 1174 11C1;
+B75F;B75F;1104 1174 11C2;B75F;1104 1174 11C2;
+B760;B760;1104 1175;B760;1104 1175;
+B761;B761;1104 1175 11A8;B761;1104 1175 11A8;
+B762;B762;1104 1175 11A9;B762;1104 1175 11A9;
+B763;B763;1104 1175 11AA;B763;1104 1175 11AA;
+B764;B764;1104 1175 11AB;B764;1104 1175 11AB;
+B765;B765;1104 1175 11AC;B765;1104 1175 11AC;
+B766;B766;1104 1175 11AD;B766;1104 1175 11AD;
+B767;B767;1104 1175 11AE;B767;1104 1175 11AE;
+B768;B768;1104 1175 11AF;B768;1104 1175 11AF;
+B769;B769;1104 1175 11B0;B769;1104 1175 11B0;
+B76A;B76A;1104 1175 11B1;B76A;1104 1175 11B1;
+B76B;B76B;1104 1175 11B2;B76B;1104 1175 11B2;
+B76C;B76C;1104 1175 11B3;B76C;1104 1175 11B3;
+B76D;B76D;1104 1175 11B4;B76D;1104 1175 11B4;
+B76E;B76E;1104 1175 11B5;B76E;1104 1175 11B5;
+B76F;B76F;1104 1175 11B6;B76F;1104 1175 11B6;
+B770;B770;1104 1175 11B7;B770;1104 1175 11B7;
+B771;B771;1104 1175 11B8;B771;1104 1175 11B8;
+B772;B772;1104 1175 11B9;B772;1104 1175 11B9;
+B773;B773;1104 1175 11BA;B773;1104 1175 11BA;
+B774;B774;1104 1175 11BB;B774;1104 1175 11BB;
+B775;B775;1104 1175 11BC;B775;1104 1175 11BC;
+B776;B776;1104 1175 11BD;B776;1104 1175 11BD;
+B777;B777;1104 1175 11BE;B777;1104 1175 11BE;
+B778;B778;1104 1175 11BF;B778;1104 1175 11BF;
+B779;B779;1104 1175 11C0;B779;1104 1175 11C0;
+B77A;B77A;1104 1175 11C1;B77A;1104 1175 11C1;
+B77B;B77B;1104 1175 11C2;B77B;1104 1175 11C2;
+B77C;B77C;1105 1161;B77C;1105 1161;
+B77D;B77D;1105 1161 11A8;B77D;1105 1161 11A8;
+B77E;B77E;1105 1161 11A9;B77E;1105 1161 11A9;
+B77F;B77F;1105 1161 11AA;B77F;1105 1161 11AA;
+B780;B780;1105 1161 11AB;B780;1105 1161 11AB;
+B781;B781;1105 1161 11AC;B781;1105 1161 11AC;
+B782;B782;1105 1161 11AD;B782;1105 1161 11AD;
+B783;B783;1105 1161 11AE;B783;1105 1161 11AE;
+B784;B784;1105 1161 11AF;B784;1105 1161 11AF;
+B785;B785;1105 1161 11B0;B785;1105 1161 11B0;
+B786;B786;1105 1161 11B1;B786;1105 1161 11B1;
+B787;B787;1105 1161 11B2;B787;1105 1161 11B2;
+B788;B788;1105 1161 11B3;B788;1105 1161 11B3;
+B789;B789;1105 1161 11B4;B789;1105 1161 11B4;
+B78A;B78A;1105 1161 11B5;B78A;1105 1161 11B5;
+B78B;B78B;1105 1161 11B6;B78B;1105 1161 11B6;
+B78C;B78C;1105 1161 11B7;B78C;1105 1161 11B7;
+B78D;B78D;1105 1161 11B8;B78D;1105 1161 11B8;
+B78E;B78E;1105 1161 11B9;B78E;1105 1161 11B9;
+B78F;B78F;1105 1161 11BA;B78F;1105 1161 11BA;
+B790;B790;1105 1161 11BB;B790;1105 1161 11BB;
+B791;B791;1105 1161 11BC;B791;1105 1161 11BC;
+B792;B792;1105 1161 11BD;B792;1105 1161 11BD;
+B793;B793;1105 1161 11BE;B793;1105 1161 11BE;
+B794;B794;1105 1161 11BF;B794;1105 1161 11BF;
+B795;B795;1105 1161 11C0;B795;1105 1161 11C0;
+B796;B796;1105 1161 11C1;B796;1105 1161 11C1;
+B797;B797;1105 1161 11C2;B797;1105 1161 11C2;
+B798;B798;1105 1162;B798;1105 1162;
+B799;B799;1105 1162 11A8;B799;1105 1162 11A8;
+B79A;B79A;1105 1162 11A9;B79A;1105 1162 11A9;
+B79B;B79B;1105 1162 11AA;B79B;1105 1162 11AA;
+B79C;B79C;1105 1162 11AB;B79C;1105 1162 11AB;
+B79D;B79D;1105 1162 11AC;B79D;1105 1162 11AC;
+B79E;B79E;1105 1162 11AD;B79E;1105 1162 11AD;
+B79F;B79F;1105 1162 11AE;B79F;1105 1162 11AE;
+B7A0;B7A0;1105 1162 11AF;B7A0;1105 1162 11AF;
+B7A1;B7A1;1105 1162 11B0;B7A1;1105 1162 11B0;
+B7A2;B7A2;1105 1162 11B1;B7A2;1105 1162 11B1;
+B7A3;B7A3;1105 1162 11B2;B7A3;1105 1162 11B2;
+B7A4;B7A4;1105 1162 11B3;B7A4;1105 1162 11B3;
+B7A5;B7A5;1105 1162 11B4;B7A5;1105 1162 11B4;
+B7A6;B7A6;1105 1162 11B5;B7A6;1105 1162 11B5;
+B7A7;B7A7;1105 1162 11B6;B7A7;1105 1162 11B6;
+B7A8;B7A8;1105 1162 11B7;B7A8;1105 1162 11B7;
+B7A9;B7A9;1105 1162 11B8;B7A9;1105 1162 11B8;
+B7AA;B7AA;1105 1162 11B9;B7AA;1105 1162 11B9;
+B7AB;B7AB;1105 1162 11BA;B7AB;1105 1162 11BA;
+B7AC;B7AC;1105 1162 11BB;B7AC;1105 1162 11BB;
+B7AD;B7AD;1105 1162 11BC;B7AD;1105 1162 11BC;
+B7AE;B7AE;1105 1162 11BD;B7AE;1105 1162 11BD;
+B7AF;B7AF;1105 1162 11BE;B7AF;1105 1162 11BE;
+B7B0;B7B0;1105 1162 11BF;B7B0;1105 1162 11BF;
+B7B1;B7B1;1105 1162 11C0;B7B1;1105 1162 11C0;
+B7B2;B7B2;1105 1162 11C1;B7B2;1105 1162 11C1;
+B7B3;B7B3;1105 1162 11C2;B7B3;1105 1162 11C2;
+B7B4;B7B4;1105 1163;B7B4;1105 1163;
+B7B5;B7B5;1105 1163 11A8;B7B5;1105 1163 11A8;
+B7B6;B7B6;1105 1163 11A9;B7B6;1105 1163 11A9;
+B7B7;B7B7;1105 1163 11AA;B7B7;1105 1163 11AA;
+B7B8;B7B8;1105 1163 11AB;B7B8;1105 1163 11AB;
+B7B9;B7B9;1105 1163 11AC;B7B9;1105 1163 11AC;
+B7BA;B7BA;1105 1163 11AD;B7BA;1105 1163 11AD;
+B7BB;B7BB;1105 1163 11AE;B7BB;1105 1163 11AE;
+B7BC;B7BC;1105 1163 11AF;B7BC;1105 1163 11AF;
+B7BD;B7BD;1105 1163 11B0;B7BD;1105 1163 11B0;
+B7BE;B7BE;1105 1163 11B1;B7BE;1105 1163 11B1;
+B7BF;B7BF;1105 1163 11B2;B7BF;1105 1163 11B2;
+B7C0;B7C0;1105 1163 11B3;B7C0;1105 1163 11B3;
+B7C1;B7C1;1105 1163 11B4;B7C1;1105 1163 11B4;
+B7C2;B7C2;1105 1163 11B5;B7C2;1105 1163 11B5;
+B7C3;B7C3;1105 1163 11B6;B7C3;1105 1163 11B6;
+B7C4;B7C4;1105 1163 11B7;B7C4;1105 1163 11B7;
+B7C5;B7C5;1105 1163 11B8;B7C5;1105 1163 11B8;
+B7C6;B7C6;1105 1163 11B9;B7C6;1105 1163 11B9;
+B7C7;B7C7;1105 1163 11BA;B7C7;1105 1163 11BA;
+B7C8;B7C8;1105 1163 11BB;B7C8;1105 1163 11BB;
+B7C9;B7C9;1105 1163 11BC;B7C9;1105 1163 11BC;
+B7CA;B7CA;1105 1163 11BD;B7CA;1105 1163 11BD;
+B7CB;B7CB;1105 1163 11BE;B7CB;1105 1163 11BE;
+B7CC;B7CC;1105 1163 11BF;B7CC;1105 1163 11BF;
+B7CD;B7CD;1105 1163 11C0;B7CD;1105 1163 11C0;
+B7CE;B7CE;1105 1163 11C1;B7CE;1105 1163 11C1;
+B7CF;B7CF;1105 1163 11C2;B7CF;1105 1163 11C2;
+B7D0;B7D0;1105 1164;B7D0;1105 1164;
+B7D1;B7D1;1105 1164 11A8;B7D1;1105 1164 11A8;
+B7D2;B7D2;1105 1164 11A9;B7D2;1105 1164 11A9;
+B7D3;B7D3;1105 1164 11AA;B7D3;1105 1164 11AA;
+B7D4;B7D4;1105 1164 11AB;B7D4;1105 1164 11AB;
+B7D5;B7D5;1105 1164 11AC;B7D5;1105 1164 11AC;
+B7D6;B7D6;1105 1164 11AD;B7D6;1105 1164 11AD;
+B7D7;B7D7;1105 1164 11AE;B7D7;1105 1164 11AE;
+B7D8;B7D8;1105 1164 11AF;B7D8;1105 1164 11AF;
+B7D9;B7D9;1105 1164 11B0;B7D9;1105 1164 11B0;
+B7DA;B7DA;1105 1164 11B1;B7DA;1105 1164 11B1;
+B7DB;B7DB;1105 1164 11B2;B7DB;1105 1164 11B2;
+B7DC;B7DC;1105 1164 11B3;B7DC;1105 1164 11B3;
+B7DD;B7DD;1105 1164 11B4;B7DD;1105 1164 11B4;
+B7DE;B7DE;1105 1164 11B5;B7DE;1105 1164 11B5;
+B7DF;B7DF;1105 1164 11B6;B7DF;1105 1164 11B6;
+B7E0;B7E0;1105 1164 11B7;B7E0;1105 1164 11B7;
+B7E1;B7E1;1105 1164 11B8;B7E1;1105 1164 11B8;
+B7E2;B7E2;1105 1164 11B9;B7E2;1105 1164 11B9;
+B7E3;B7E3;1105 1164 11BA;B7E3;1105 1164 11BA;
+B7E4;B7E4;1105 1164 11BB;B7E4;1105 1164 11BB;
+B7E5;B7E5;1105 1164 11BC;B7E5;1105 1164 11BC;
+B7E6;B7E6;1105 1164 11BD;B7E6;1105 1164 11BD;
+B7E7;B7E7;1105 1164 11BE;B7E7;1105 1164 11BE;
+B7E8;B7E8;1105 1164 11BF;B7E8;1105 1164 11BF;
+B7E9;B7E9;1105 1164 11C0;B7E9;1105 1164 11C0;
+B7EA;B7EA;1105 1164 11C1;B7EA;1105 1164 11C1;
+B7EB;B7EB;1105 1164 11C2;B7EB;1105 1164 11C2;
+B7EC;B7EC;1105 1165;B7EC;1105 1165;
+B7ED;B7ED;1105 1165 11A8;B7ED;1105 1165 11A8;
+B7EE;B7EE;1105 1165 11A9;B7EE;1105 1165 11A9;
+B7EF;B7EF;1105 1165 11AA;B7EF;1105 1165 11AA;
+B7F0;B7F0;1105 1165 11AB;B7F0;1105 1165 11AB;
+B7F1;B7F1;1105 1165 11AC;B7F1;1105 1165 11AC;
+B7F2;B7F2;1105 1165 11AD;B7F2;1105 1165 11AD;
+B7F3;B7F3;1105 1165 11AE;B7F3;1105 1165 11AE;
+B7F4;B7F4;1105 1165 11AF;B7F4;1105 1165 11AF;
+B7F5;B7F5;1105 1165 11B0;B7F5;1105 1165 11B0;
+B7F6;B7F6;1105 1165 11B1;B7F6;1105 1165 11B1;
+B7F7;B7F7;1105 1165 11B2;B7F7;1105 1165 11B2;
+B7F8;B7F8;1105 1165 11B3;B7F8;1105 1165 11B3;
+B7F9;B7F9;1105 1165 11B4;B7F9;1105 1165 11B4;
+B7FA;B7FA;1105 1165 11B5;B7FA;1105 1165 11B5;
+B7FB;B7FB;1105 1165 11B6;B7FB;1105 1165 11B6;
+B7FC;B7FC;1105 1165 11B7;B7FC;1105 1165 11B7;
+B7FD;B7FD;1105 1165 11B8;B7FD;1105 1165 11B8;
+B7FE;B7FE;1105 1165 11B9;B7FE;1105 1165 11B9;
+B7FF;B7FF;1105 1165 11BA;B7FF;1105 1165 11BA;
+B800;B800;1105 1165 11BB;B800;1105 1165 11BB;
+B801;B801;1105 1165 11BC;B801;1105 1165 11BC;
+B802;B802;1105 1165 11BD;B802;1105 1165 11BD;
+B803;B803;1105 1165 11BE;B803;1105 1165 11BE;
+B804;B804;1105 1165 11BF;B804;1105 1165 11BF;
+B805;B805;1105 1165 11C0;B805;1105 1165 11C0;
+B806;B806;1105 1165 11C1;B806;1105 1165 11C1;
+B807;B807;1105 1165 11C2;B807;1105 1165 11C2;
+B808;B808;1105 1166;B808;1105 1166;
+B809;B809;1105 1166 11A8;B809;1105 1166 11A8;
+B80A;B80A;1105 1166 11A9;B80A;1105 1166 11A9;
+B80B;B80B;1105 1166 11AA;B80B;1105 1166 11AA;
+B80C;B80C;1105 1166 11AB;B80C;1105 1166 11AB;
+B80D;B80D;1105 1166 11AC;B80D;1105 1166 11AC;
+B80E;B80E;1105 1166 11AD;B80E;1105 1166 11AD;
+B80F;B80F;1105 1166 11AE;B80F;1105 1166 11AE;
+B810;B810;1105 1166 11AF;B810;1105 1166 11AF;
+B811;B811;1105 1166 11B0;B811;1105 1166 11B0;
+B812;B812;1105 1166 11B1;B812;1105 1166 11B1;
+B813;B813;1105 1166 11B2;B813;1105 1166 11B2;
+B814;B814;1105 1166 11B3;B814;1105 1166 11B3;
+B815;B815;1105 1166 11B4;B815;1105 1166 11B4;
+B816;B816;1105 1166 11B5;B816;1105 1166 11B5;
+B817;B817;1105 1166 11B6;B817;1105 1166 11B6;
+B818;B818;1105 1166 11B7;B818;1105 1166 11B7;
+B819;B819;1105 1166 11B8;B819;1105 1166 11B8;
+B81A;B81A;1105 1166 11B9;B81A;1105 1166 11B9;
+B81B;B81B;1105 1166 11BA;B81B;1105 1166 11BA;
+B81C;B81C;1105 1166 11BB;B81C;1105 1166 11BB;
+B81D;B81D;1105 1166 11BC;B81D;1105 1166 11BC;
+B81E;B81E;1105 1166 11BD;B81E;1105 1166 11BD;
+B81F;B81F;1105 1166 11BE;B81F;1105 1166 11BE;
+B820;B820;1105 1166 11BF;B820;1105 1166 11BF;
+B821;B821;1105 1166 11C0;B821;1105 1166 11C0;
+B822;B822;1105 1166 11C1;B822;1105 1166 11C1;
+B823;B823;1105 1166 11C2;B823;1105 1166 11C2;
+B824;B824;1105 1167;B824;1105 1167;
+B825;B825;1105 1167 11A8;B825;1105 1167 11A8;
+B826;B826;1105 1167 11A9;B826;1105 1167 11A9;
+B827;B827;1105 1167 11AA;B827;1105 1167 11AA;
+B828;B828;1105 1167 11AB;B828;1105 1167 11AB;
+B829;B829;1105 1167 11AC;B829;1105 1167 11AC;
+B82A;B82A;1105 1167 11AD;B82A;1105 1167 11AD;
+B82B;B82B;1105 1167 11AE;B82B;1105 1167 11AE;
+B82C;B82C;1105 1167 11AF;B82C;1105 1167 11AF;
+B82D;B82D;1105 1167 11B0;B82D;1105 1167 11B0;
+B82E;B82E;1105 1167 11B1;B82E;1105 1167 11B1;
+B82F;B82F;1105 1167 11B2;B82F;1105 1167 11B2;
+B830;B830;1105 1167 11B3;B830;1105 1167 11B3;
+B831;B831;1105 1167 11B4;B831;1105 1167 11B4;
+B832;B832;1105 1167 11B5;B832;1105 1167 11B5;
+B833;B833;1105 1167 11B6;B833;1105 1167 11B6;
+B834;B834;1105 1167 11B7;B834;1105 1167 11B7;
+B835;B835;1105 1167 11B8;B835;1105 1167 11B8;
+B836;B836;1105 1167 11B9;B836;1105 1167 11B9;
+B837;B837;1105 1167 11BA;B837;1105 1167 11BA;
+B838;B838;1105 1167 11BB;B838;1105 1167 11BB;
+B839;B839;1105 1167 11BC;B839;1105 1167 11BC;
+B83A;B83A;1105 1167 11BD;B83A;1105 1167 11BD;
+B83B;B83B;1105 1167 11BE;B83B;1105 1167 11BE;
+B83C;B83C;1105 1167 11BF;B83C;1105 1167 11BF;
+B83D;B83D;1105 1167 11C0;B83D;1105 1167 11C0;
+B83E;B83E;1105 1167 11C1;B83E;1105 1167 11C1;
+B83F;B83F;1105 1167 11C2;B83F;1105 1167 11C2;
+B840;B840;1105 1168;B840;1105 1168;
+B841;B841;1105 1168 11A8;B841;1105 1168 11A8;
+B842;B842;1105 1168 11A9;B842;1105 1168 11A9;
+B843;B843;1105 1168 11AA;B843;1105 1168 11AA;
+B844;B844;1105 1168 11AB;B844;1105 1168 11AB;
+B845;B845;1105 1168 11AC;B845;1105 1168 11AC;
+B846;B846;1105 1168 11AD;B846;1105 1168 11AD;
+B847;B847;1105 1168 11AE;B847;1105 1168 11AE;
+B848;B848;1105 1168 11AF;B848;1105 1168 11AF;
+B849;B849;1105 1168 11B0;B849;1105 1168 11B0;
+B84A;B84A;1105 1168 11B1;B84A;1105 1168 11B1;
+B84B;B84B;1105 1168 11B2;B84B;1105 1168 11B2;
+B84C;B84C;1105 1168 11B3;B84C;1105 1168 11B3;
+B84D;B84D;1105 1168 11B4;B84D;1105 1168 11B4;
+B84E;B84E;1105 1168 11B5;B84E;1105 1168 11B5;
+B84F;B84F;1105 1168 11B6;B84F;1105 1168 11B6;
+B850;B850;1105 1168 11B7;B850;1105 1168 11B7;
+B851;B851;1105 1168 11B8;B851;1105 1168 11B8;
+B852;B852;1105 1168 11B9;B852;1105 1168 11B9;
+B853;B853;1105 1168 11BA;B853;1105 1168 11BA;
+B854;B854;1105 1168 11BB;B854;1105 1168 11BB;
+B855;B855;1105 1168 11BC;B855;1105 1168 11BC;
+B856;B856;1105 1168 11BD;B856;1105 1168 11BD;
+B857;B857;1105 1168 11BE;B857;1105 1168 11BE;
+B858;B858;1105 1168 11BF;B858;1105 1168 11BF;
+B859;B859;1105 1168 11C0;B859;1105 1168 11C0;
+B85A;B85A;1105 1168 11C1;B85A;1105 1168 11C1;
+B85B;B85B;1105 1168 11C2;B85B;1105 1168 11C2;
+B85C;B85C;1105 1169;B85C;1105 1169;
+B85D;B85D;1105 1169 11A8;B85D;1105 1169 11A8;
+B85E;B85E;1105 1169 11A9;B85E;1105 1169 11A9;
+B85F;B85F;1105 1169 11AA;B85F;1105 1169 11AA;
+B860;B860;1105 1169 11AB;B860;1105 1169 11AB;
+B861;B861;1105 1169 11AC;B861;1105 1169 11AC;
+B862;B862;1105 1169 11AD;B862;1105 1169 11AD;
+B863;B863;1105 1169 11AE;B863;1105 1169 11AE;
+B864;B864;1105 1169 11AF;B864;1105 1169 11AF;
+B865;B865;1105 1169 11B0;B865;1105 1169 11B0;
+B866;B866;1105 1169 11B1;B866;1105 1169 11B1;
+B867;B867;1105 1169 11B2;B867;1105 1169 11B2;
+B868;B868;1105 1169 11B3;B868;1105 1169 11B3;
+B869;B869;1105 1169 11B4;B869;1105 1169 11B4;
+B86A;B86A;1105 1169 11B5;B86A;1105 1169 11B5;
+B86B;B86B;1105 1169 11B6;B86B;1105 1169 11B6;
+B86C;B86C;1105 1169 11B7;B86C;1105 1169 11B7;
+B86D;B86D;1105 1169 11B8;B86D;1105 1169 11B8;
+B86E;B86E;1105 1169 11B9;B86E;1105 1169 11B9;
+B86F;B86F;1105 1169 11BA;B86F;1105 1169 11BA;
+B870;B870;1105 1169 11BB;B870;1105 1169 11BB;
+B871;B871;1105 1169 11BC;B871;1105 1169 11BC;
+B872;B872;1105 1169 11BD;B872;1105 1169 11BD;
+B873;B873;1105 1169 11BE;B873;1105 1169 11BE;
+B874;B874;1105 1169 11BF;B874;1105 1169 11BF;
+B875;B875;1105 1169 11C0;B875;1105 1169 11C0;
+B876;B876;1105 1169 11C1;B876;1105 1169 11C1;
+B877;B877;1105 1169 11C2;B877;1105 1169 11C2;
+B878;B878;1105 116A;B878;1105 116A;
+B879;B879;1105 116A 11A8;B879;1105 116A 11A8;
+B87A;B87A;1105 116A 11A9;B87A;1105 116A 11A9;
+B87B;B87B;1105 116A 11AA;B87B;1105 116A 11AA;
+B87C;B87C;1105 116A 11AB;B87C;1105 116A 11AB;
+B87D;B87D;1105 116A 11AC;B87D;1105 116A 11AC;
+B87E;B87E;1105 116A 11AD;B87E;1105 116A 11AD;
+B87F;B87F;1105 116A 11AE;B87F;1105 116A 11AE;
+B880;B880;1105 116A 11AF;B880;1105 116A 11AF;
+B881;B881;1105 116A 11B0;B881;1105 116A 11B0;
+B882;B882;1105 116A 11B1;B882;1105 116A 11B1;
+B883;B883;1105 116A 11B2;B883;1105 116A 11B2;
+B884;B884;1105 116A 11B3;B884;1105 116A 11B3;
+B885;B885;1105 116A 11B4;B885;1105 116A 11B4;
+B886;B886;1105 116A 11B5;B886;1105 116A 11B5;
+B887;B887;1105 116A 11B6;B887;1105 116A 11B6;
+B888;B888;1105 116A 11B7;B888;1105 116A 11B7;
+B889;B889;1105 116A 11B8;B889;1105 116A 11B8;
+B88A;B88A;1105 116A 11B9;B88A;1105 116A 11B9;
+B88B;B88B;1105 116A 11BA;B88B;1105 116A 11BA;
+B88C;B88C;1105 116A 11BB;B88C;1105 116A 11BB;
+B88D;B88D;1105 116A 11BC;B88D;1105 116A 11BC;
+B88E;B88E;1105 116A 11BD;B88E;1105 116A 11BD;
+B88F;B88F;1105 116A 11BE;B88F;1105 116A 11BE;
+B890;B890;1105 116A 11BF;B890;1105 116A 11BF;
+B891;B891;1105 116A 11C0;B891;1105 116A 11C0;
+B892;B892;1105 116A 11C1;B892;1105 116A 11C1;
+B893;B893;1105 116A 11C2;B893;1105 116A 11C2;
+B894;B894;1105 116B;B894;1105 116B;
+B895;B895;1105 116B 11A8;B895;1105 116B 11A8;
+B896;B896;1105 116B 11A9;B896;1105 116B 11A9;
+B897;B897;1105 116B 11AA;B897;1105 116B 11AA;
+B898;B898;1105 116B 11AB;B898;1105 116B 11AB;
+B899;B899;1105 116B 11AC;B899;1105 116B 11AC;
+B89A;B89A;1105 116B 11AD;B89A;1105 116B 11AD;
+B89B;B89B;1105 116B 11AE;B89B;1105 116B 11AE;
+B89C;B89C;1105 116B 11AF;B89C;1105 116B 11AF;
+B89D;B89D;1105 116B 11B0;B89D;1105 116B 11B0;
+B89E;B89E;1105 116B 11B1;B89E;1105 116B 11B1;
+B89F;B89F;1105 116B 11B2;B89F;1105 116B 11B2;
+B8A0;B8A0;1105 116B 11B3;B8A0;1105 116B 11B3;
+B8A1;B8A1;1105 116B 11B4;B8A1;1105 116B 11B4;
+B8A2;B8A2;1105 116B 11B5;B8A2;1105 116B 11B5;
+B8A3;B8A3;1105 116B 11B6;B8A3;1105 116B 11B6;
+B8A4;B8A4;1105 116B 11B7;B8A4;1105 116B 11B7;
+B8A5;B8A5;1105 116B 11B8;B8A5;1105 116B 11B8;
+B8A6;B8A6;1105 116B 11B9;B8A6;1105 116B 11B9;
+B8A7;B8A7;1105 116B 11BA;B8A7;1105 116B 11BA;
+B8A8;B8A8;1105 116B 11BB;B8A8;1105 116B 11BB;
+B8A9;B8A9;1105 116B 11BC;B8A9;1105 116B 11BC;
+B8AA;B8AA;1105 116B 11BD;B8AA;1105 116B 11BD;
+B8AB;B8AB;1105 116B 11BE;B8AB;1105 116B 11BE;
+B8AC;B8AC;1105 116B 11BF;B8AC;1105 116B 11BF;
+B8AD;B8AD;1105 116B 11C0;B8AD;1105 116B 11C0;
+B8AE;B8AE;1105 116B 11C1;B8AE;1105 116B 11C1;
+B8AF;B8AF;1105 116B 11C2;B8AF;1105 116B 11C2;
+B8B0;B8B0;1105 116C;B8B0;1105 116C;
+B8B1;B8B1;1105 116C 11A8;B8B1;1105 116C 11A8;
+B8B2;B8B2;1105 116C 11A9;B8B2;1105 116C 11A9;
+B8B3;B8B3;1105 116C 11AA;B8B3;1105 116C 11AA;
+B8B4;B8B4;1105 116C 11AB;B8B4;1105 116C 11AB;
+B8B5;B8B5;1105 116C 11AC;B8B5;1105 116C 11AC;
+B8B6;B8B6;1105 116C 11AD;B8B6;1105 116C 11AD;
+B8B7;B8B7;1105 116C 11AE;B8B7;1105 116C 11AE;
+B8B8;B8B8;1105 116C 11AF;B8B8;1105 116C 11AF;
+B8B9;B8B9;1105 116C 11B0;B8B9;1105 116C 11B0;
+B8BA;B8BA;1105 116C 11B1;B8BA;1105 116C 11B1;
+B8BB;B8BB;1105 116C 11B2;B8BB;1105 116C 11B2;
+B8BC;B8BC;1105 116C 11B3;B8BC;1105 116C 11B3;
+B8BD;B8BD;1105 116C 11B4;B8BD;1105 116C 11B4;
+B8BE;B8BE;1105 116C 11B5;B8BE;1105 116C 11B5;
+B8BF;B8BF;1105 116C 11B6;B8BF;1105 116C 11B6;
+B8C0;B8C0;1105 116C 11B7;B8C0;1105 116C 11B7;
+B8C1;B8C1;1105 116C 11B8;B8C1;1105 116C 11B8;
+B8C2;B8C2;1105 116C 11B9;B8C2;1105 116C 11B9;
+B8C3;B8C3;1105 116C 11BA;B8C3;1105 116C 11BA;
+B8C4;B8C4;1105 116C 11BB;B8C4;1105 116C 11BB;
+B8C5;B8C5;1105 116C 11BC;B8C5;1105 116C 11BC;
+B8C6;B8C6;1105 116C 11BD;B8C6;1105 116C 11BD;
+B8C7;B8C7;1105 116C 11BE;B8C7;1105 116C 11BE;
+B8C8;B8C8;1105 116C 11BF;B8C8;1105 116C 11BF;
+B8C9;B8C9;1105 116C 11C0;B8C9;1105 116C 11C0;
+B8CA;B8CA;1105 116C 11C1;B8CA;1105 116C 11C1;
+B8CB;B8CB;1105 116C 11C2;B8CB;1105 116C 11C2;
+B8CC;B8CC;1105 116D;B8CC;1105 116D;
+B8CD;B8CD;1105 116D 11A8;B8CD;1105 116D 11A8;
+B8CE;B8CE;1105 116D 11A9;B8CE;1105 116D 11A9;
+B8CF;B8CF;1105 116D 11AA;B8CF;1105 116D 11AA;
+B8D0;B8D0;1105 116D 11AB;B8D0;1105 116D 11AB;
+B8D1;B8D1;1105 116D 11AC;B8D1;1105 116D 11AC;
+B8D2;B8D2;1105 116D 11AD;B8D2;1105 116D 11AD;
+B8D3;B8D3;1105 116D 11AE;B8D3;1105 116D 11AE;
+B8D4;B8D4;1105 116D 11AF;B8D4;1105 116D 11AF;
+B8D5;B8D5;1105 116D 11B0;B8D5;1105 116D 11B0;
+B8D6;B8D6;1105 116D 11B1;B8D6;1105 116D 11B1;
+B8D7;B8D7;1105 116D 11B2;B8D7;1105 116D 11B2;
+B8D8;B8D8;1105 116D 11B3;B8D8;1105 116D 11B3;
+B8D9;B8D9;1105 116D 11B4;B8D9;1105 116D 11B4;
+B8DA;B8DA;1105 116D 11B5;B8DA;1105 116D 11B5;
+B8DB;B8DB;1105 116D 11B6;B8DB;1105 116D 11B6;
+B8DC;B8DC;1105 116D 11B7;B8DC;1105 116D 11B7;
+B8DD;B8DD;1105 116D 11B8;B8DD;1105 116D 11B8;
+B8DE;B8DE;1105 116D 11B9;B8DE;1105 116D 11B9;
+B8DF;B8DF;1105 116D 11BA;B8DF;1105 116D 11BA;
+B8E0;B8E0;1105 116D 11BB;B8E0;1105 116D 11BB;
+B8E1;B8E1;1105 116D 11BC;B8E1;1105 116D 11BC;
+B8E2;B8E2;1105 116D 11BD;B8E2;1105 116D 11BD;
+B8E3;B8E3;1105 116D 11BE;B8E3;1105 116D 11BE;
+B8E4;B8E4;1105 116D 11BF;B8E4;1105 116D 11BF;
+B8E5;B8E5;1105 116D 11C0;B8E5;1105 116D 11C0;
+B8E6;B8E6;1105 116D 11C1;B8E6;1105 116D 11C1;
+B8E7;B8E7;1105 116D 11C2;B8E7;1105 116D 11C2;
+B8E8;B8E8;1105 116E;B8E8;1105 116E;
+B8E9;B8E9;1105 116E 11A8;B8E9;1105 116E 11A8;
+B8EA;B8EA;1105 116E 11A9;B8EA;1105 116E 11A9;
+B8EB;B8EB;1105 116E 11AA;B8EB;1105 116E 11AA;
+B8EC;B8EC;1105 116E 11AB;B8EC;1105 116E 11AB;
+B8ED;B8ED;1105 116E 11AC;B8ED;1105 116E 11AC;
+B8EE;B8EE;1105 116E 11AD;B8EE;1105 116E 11AD;
+B8EF;B8EF;1105 116E 11AE;B8EF;1105 116E 11AE;
+B8F0;B8F0;1105 116E 11AF;B8F0;1105 116E 11AF;
+B8F1;B8F1;1105 116E 11B0;B8F1;1105 116E 11B0;
+B8F2;B8F2;1105 116E 11B1;B8F2;1105 116E 11B1;
+B8F3;B8F3;1105 116E 11B2;B8F3;1105 116E 11B2;
+B8F4;B8F4;1105 116E 11B3;B8F4;1105 116E 11B3;
+B8F5;B8F5;1105 116E 11B4;B8F5;1105 116E 11B4;
+B8F6;B8F6;1105 116E 11B5;B8F6;1105 116E 11B5;
+B8F7;B8F7;1105 116E 11B6;B8F7;1105 116E 11B6;
+B8F8;B8F8;1105 116E 11B7;B8F8;1105 116E 11B7;
+B8F9;B8F9;1105 116E 11B8;B8F9;1105 116E 11B8;
+B8FA;B8FA;1105 116E 11B9;B8FA;1105 116E 11B9;
+B8FB;B8FB;1105 116E 11BA;B8FB;1105 116E 11BA;
+B8FC;B8FC;1105 116E 11BB;B8FC;1105 116E 11BB;
+B8FD;B8FD;1105 116E 11BC;B8FD;1105 116E 11BC;
+B8FE;B8FE;1105 116E 11BD;B8FE;1105 116E 11BD;
+B8FF;B8FF;1105 116E 11BE;B8FF;1105 116E 11BE;
+B900;B900;1105 116E 11BF;B900;1105 116E 11BF;
+B901;B901;1105 116E 11C0;B901;1105 116E 11C0;
+B902;B902;1105 116E 11C1;B902;1105 116E 11C1;
+B903;B903;1105 116E 11C2;B903;1105 116E 11C2;
+B904;B904;1105 116F;B904;1105 116F;
+B905;B905;1105 116F 11A8;B905;1105 116F 11A8;
+B906;B906;1105 116F 11A9;B906;1105 116F 11A9;
+B907;B907;1105 116F 11AA;B907;1105 116F 11AA;
+B908;B908;1105 116F 11AB;B908;1105 116F 11AB;
+B909;B909;1105 116F 11AC;B909;1105 116F 11AC;
+B90A;B90A;1105 116F 11AD;B90A;1105 116F 11AD;
+B90B;B90B;1105 116F 11AE;B90B;1105 116F 11AE;
+B90C;B90C;1105 116F 11AF;B90C;1105 116F 11AF;
+B90D;B90D;1105 116F 11B0;B90D;1105 116F 11B0;
+B90E;B90E;1105 116F 11B1;B90E;1105 116F 11B1;
+B90F;B90F;1105 116F 11B2;B90F;1105 116F 11B2;
+B910;B910;1105 116F 11B3;B910;1105 116F 11B3;
+B911;B911;1105 116F 11B4;B911;1105 116F 11B4;
+B912;B912;1105 116F 11B5;B912;1105 116F 11B5;
+B913;B913;1105 116F 11B6;B913;1105 116F 11B6;
+B914;B914;1105 116F 11B7;B914;1105 116F 11B7;
+B915;B915;1105 116F 11B8;B915;1105 116F 11B8;
+B916;B916;1105 116F 11B9;B916;1105 116F 11B9;
+B917;B917;1105 116F 11BA;B917;1105 116F 11BA;
+B918;B918;1105 116F 11BB;B918;1105 116F 11BB;
+B919;B919;1105 116F 11BC;B919;1105 116F 11BC;
+B91A;B91A;1105 116F 11BD;B91A;1105 116F 11BD;
+B91B;B91B;1105 116F 11BE;B91B;1105 116F 11BE;
+B91C;B91C;1105 116F 11BF;B91C;1105 116F 11BF;
+B91D;B91D;1105 116F 11C0;B91D;1105 116F 11C0;
+B91E;B91E;1105 116F 11C1;B91E;1105 116F 11C1;
+B91F;B91F;1105 116F 11C2;B91F;1105 116F 11C2;
+B920;B920;1105 1170;B920;1105 1170;
+B921;B921;1105 1170 11A8;B921;1105 1170 11A8;
+B922;B922;1105 1170 11A9;B922;1105 1170 11A9;
+B923;B923;1105 1170 11AA;B923;1105 1170 11AA;
+B924;B924;1105 1170 11AB;B924;1105 1170 11AB;
+B925;B925;1105 1170 11AC;B925;1105 1170 11AC;
+B926;B926;1105 1170 11AD;B926;1105 1170 11AD;
+B927;B927;1105 1170 11AE;B927;1105 1170 11AE;
+B928;B928;1105 1170 11AF;B928;1105 1170 11AF;
+B929;B929;1105 1170 11B0;B929;1105 1170 11B0;
+B92A;B92A;1105 1170 11B1;B92A;1105 1170 11B1;
+B92B;B92B;1105 1170 11B2;B92B;1105 1170 11B2;
+B92C;B92C;1105 1170 11B3;B92C;1105 1170 11B3;
+B92D;B92D;1105 1170 11B4;B92D;1105 1170 11B4;
+B92E;B92E;1105 1170 11B5;B92E;1105 1170 11B5;
+B92F;B92F;1105 1170 11B6;B92F;1105 1170 11B6;
+B930;B930;1105 1170 11B7;B930;1105 1170 11B7;
+B931;B931;1105 1170 11B8;B931;1105 1170 11B8;
+B932;B932;1105 1170 11B9;B932;1105 1170 11B9;
+B933;B933;1105 1170 11BA;B933;1105 1170 11BA;
+B934;B934;1105 1170 11BB;B934;1105 1170 11BB;
+B935;B935;1105 1170 11BC;B935;1105 1170 11BC;
+B936;B936;1105 1170 11BD;B936;1105 1170 11BD;
+B937;B937;1105 1170 11BE;B937;1105 1170 11BE;
+B938;B938;1105 1170 11BF;B938;1105 1170 11BF;
+B939;B939;1105 1170 11C0;B939;1105 1170 11C0;
+B93A;B93A;1105 1170 11C1;B93A;1105 1170 11C1;
+B93B;B93B;1105 1170 11C2;B93B;1105 1170 11C2;
+B93C;B93C;1105 1171;B93C;1105 1171;
+B93D;B93D;1105 1171 11A8;B93D;1105 1171 11A8;
+B93E;B93E;1105 1171 11A9;B93E;1105 1171 11A9;
+B93F;B93F;1105 1171 11AA;B93F;1105 1171 11AA;
+B940;B940;1105 1171 11AB;B940;1105 1171 11AB;
+B941;B941;1105 1171 11AC;B941;1105 1171 11AC;
+B942;B942;1105 1171 11AD;B942;1105 1171 11AD;
+B943;B943;1105 1171 11AE;B943;1105 1171 11AE;
+B944;B944;1105 1171 11AF;B944;1105 1171 11AF;
+B945;B945;1105 1171 11B0;B945;1105 1171 11B0;
+B946;B946;1105 1171 11B1;B946;1105 1171 11B1;
+B947;B947;1105 1171 11B2;B947;1105 1171 11B2;
+B948;B948;1105 1171 11B3;B948;1105 1171 11B3;
+B949;B949;1105 1171 11B4;B949;1105 1171 11B4;
+B94A;B94A;1105 1171 11B5;B94A;1105 1171 11B5;
+B94B;B94B;1105 1171 11B6;B94B;1105 1171 11B6;
+B94C;B94C;1105 1171 11B7;B94C;1105 1171 11B7;
+B94D;B94D;1105 1171 11B8;B94D;1105 1171 11B8;
+B94E;B94E;1105 1171 11B9;B94E;1105 1171 11B9;
+B94F;B94F;1105 1171 11BA;B94F;1105 1171 11BA;
+B950;B950;1105 1171 11BB;B950;1105 1171 11BB;
+B951;B951;1105 1171 11BC;B951;1105 1171 11BC;
+B952;B952;1105 1171 11BD;B952;1105 1171 11BD;
+B953;B953;1105 1171 11BE;B953;1105 1171 11BE;
+B954;B954;1105 1171 11BF;B954;1105 1171 11BF;
+B955;B955;1105 1171 11C0;B955;1105 1171 11C0;
+B956;B956;1105 1171 11C1;B956;1105 1171 11C1;
+B957;B957;1105 1171 11C2;B957;1105 1171 11C2;
+B958;B958;1105 1172;B958;1105 1172;
+B959;B959;1105 1172 11A8;B959;1105 1172 11A8;
+B95A;B95A;1105 1172 11A9;B95A;1105 1172 11A9;
+B95B;B95B;1105 1172 11AA;B95B;1105 1172 11AA;
+B95C;B95C;1105 1172 11AB;B95C;1105 1172 11AB;
+B95D;B95D;1105 1172 11AC;B95D;1105 1172 11AC;
+B95E;B95E;1105 1172 11AD;B95E;1105 1172 11AD;
+B95F;B95F;1105 1172 11AE;B95F;1105 1172 11AE;
+B960;B960;1105 1172 11AF;B960;1105 1172 11AF;
+B961;B961;1105 1172 11B0;B961;1105 1172 11B0;
+B962;B962;1105 1172 11B1;B962;1105 1172 11B1;
+B963;B963;1105 1172 11B2;B963;1105 1172 11B2;
+B964;B964;1105 1172 11B3;B964;1105 1172 11B3;
+B965;B965;1105 1172 11B4;B965;1105 1172 11B4;
+B966;B966;1105 1172 11B5;B966;1105 1172 11B5;
+B967;B967;1105 1172 11B6;B967;1105 1172 11B6;
+B968;B968;1105 1172 11B7;B968;1105 1172 11B7;
+B969;B969;1105 1172 11B8;B969;1105 1172 11B8;
+B96A;B96A;1105 1172 11B9;B96A;1105 1172 11B9;
+B96B;B96B;1105 1172 11BA;B96B;1105 1172 11BA;
+B96C;B96C;1105 1172 11BB;B96C;1105 1172 11BB;
+B96D;B96D;1105 1172 11BC;B96D;1105 1172 11BC;
+B96E;B96E;1105 1172 11BD;B96E;1105 1172 11BD;
+B96F;B96F;1105 1172 11BE;B96F;1105 1172 11BE;
+B970;B970;1105 1172 11BF;B970;1105 1172 11BF;
+B971;B971;1105 1172 11C0;B971;1105 1172 11C0;
+B972;B972;1105 1172 11C1;B972;1105 1172 11C1;
+B973;B973;1105 1172 11C2;B973;1105 1172 11C2;
+B974;B974;1105 1173;B974;1105 1173;
+B975;B975;1105 1173 11A8;B975;1105 1173 11A8;
+B976;B976;1105 1173 11A9;B976;1105 1173 11A9;
+B977;B977;1105 1173 11AA;B977;1105 1173 11AA;
+B978;B978;1105 1173 11AB;B978;1105 1173 11AB;
+B979;B979;1105 1173 11AC;B979;1105 1173 11AC;
+B97A;B97A;1105 1173 11AD;B97A;1105 1173 11AD;
+B97B;B97B;1105 1173 11AE;B97B;1105 1173 11AE;
+B97C;B97C;1105 1173 11AF;B97C;1105 1173 11AF;
+B97D;B97D;1105 1173 11B0;B97D;1105 1173 11B0;
+B97E;B97E;1105 1173 11B1;B97E;1105 1173 11B1;
+B97F;B97F;1105 1173 11B2;B97F;1105 1173 11B2;
+B980;B980;1105 1173 11B3;B980;1105 1173 11B3;
+B981;B981;1105 1173 11B4;B981;1105 1173 11B4;
+B982;B982;1105 1173 11B5;B982;1105 1173 11B5;
+B983;B983;1105 1173 11B6;B983;1105 1173 11B6;
+B984;B984;1105 1173 11B7;B984;1105 1173 11B7;
+B985;B985;1105 1173 11B8;B985;1105 1173 11B8;
+B986;B986;1105 1173 11B9;B986;1105 1173 11B9;
+B987;B987;1105 1173 11BA;B987;1105 1173 11BA;
+B988;B988;1105 1173 11BB;B988;1105 1173 11BB;
+B989;B989;1105 1173 11BC;B989;1105 1173 11BC;
+B98A;B98A;1105 1173 11BD;B98A;1105 1173 11BD;
+B98B;B98B;1105 1173 11BE;B98B;1105 1173 11BE;
+B98C;B98C;1105 1173 11BF;B98C;1105 1173 11BF;
+B98D;B98D;1105 1173 11C0;B98D;1105 1173 11C0;
+B98E;B98E;1105 1173 11C1;B98E;1105 1173 11C1;
+B98F;B98F;1105 1173 11C2;B98F;1105 1173 11C2;
+B990;B990;1105 1174;B990;1105 1174;
+B991;B991;1105 1174 11A8;B991;1105 1174 11A8;
+B992;B992;1105 1174 11A9;B992;1105 1174 11A9;
+B993;B993;1105 1174 11AA;B993;1105 1174 11AA;
+B994;B994;1105 1174 11AB;B994;1105 1174 11AB;
+B995;B995;1105 1174 11AC;B995;1105 1174 11AC;
+B996;B996;1105 1174 11AD;B996;1105 1174 11AD;
+B997;B997;1105 1174 11AE;B997;1105 1174 11AE;
+B998;B998;1105 1174 11AF;B998;1105 1174 11AF;
+B999;B999;1105 1174 11B0;B999;1105 1174 11B0;
+B99A;B99A;1105 1174 11B1;B99A;1105 1174 11B1;
+B99B;B99B;1105 1174 11B2;B99B;1105 1174 11B2;
+B99C;B99C;1105 1174 11B3;B99C;1105 1174 11B3;
+B99D;B99D;1105 1174 11B4;B99D;1105 1174 11B4;
+B99E;B99E;1105 1174 11B5;B99E;1105 1174 11B5;
+B99F;B99F;1105 1174 11B6;B99F;1105 1174 11B6;
+B9A0;B9A0;1105 1174 11B7;B9A0;1105 1174 11B7;
+B9A1;B9A1;1105 1174 11B8;B9A1;1105 1174 11B8;
+B9A2;B9A2;1105 1174 11B9;B9A2;1105 1174 11B9;
+B9A3;B9A3;1105 1174 11BA;B9A3;1105 1174 11BA;
+B9A4;B9A4;1105 1174 11BB;B9A4;1105 1174 11BB;
+B9A5;B9A5;1105 1174 11BC;B9A5;1105 1174 11BC;
+B9A6;B9A6;1105 1174 11BD;B9A6;1105 1174 11BD;
+B9A7;B9A7;1105 1174 11BE;B9A7;1105 1174 11BE;
+B9A8;B9A8;1105 1174 11BF;B9A8;1105 1174 11BF;
+B9A9;B9A9;1105 1174 11C0;B9A9;1105 1174 11C0;
+B9AA;B9AA;1105 1174 11C1;B9AA;1105 1174 11C1;
+B9AB;B9AB;1105 1174 11C2;B9AB;1105 1174 11C2;
+B9AC;B9AC;1105 1175;B9AC;1105 1175;
+B9AD;B9AD;1105 1175 11A8;B9AD;1105 1175 11A8;
+B9AE;B9AE;1105 1175 11A9;B9AE;1105 1175 11A9;
+B9AF;B9AF;1105 1175 11AA;B9AF;1105 1175 11AA;
+B9B0;B9B0;1105 1175 11AB;B9B0;1105 1175 11AB;
+B9B1;B9B1;1105 1175 11AC;B9B1;1105 1175 11AC;
+B9B2;B9B2;1105 1175 11AD;B9B2;1105 1175 11AD;
+B9B3;B9B3;1105 1175 11AE;B9B3;1105 1175 11AE;
+B9B4;B9B4;1105 1175 11AF;B9B4;1105 1175 11AF;
+B9B5;B9B5;1105 1175 11B0;B9B5;1105 1175 11B0;
+B9B6;B9B6;1105 1175 11B1;B9B6;1105 1175 11B1;
+B9B7;B9B7;1105 1175 11B2;B9B7;1105 1175 11B2;
+B9B8;B9B8;1105 1175 11B3;B9B8;1105 1175 11B3;
+B9B9;B9B9;1105 1175 11B4;B9B9;1105 1175 11B4;
+B9BA;B9BA;1105 1175 11B5;B9BA;1105 1175 11B5;
+B9BB;B9BB;1105 1175 11B6;B9BB;1105 1175 11B6;
+B9BC;B9BC;1105 1175 11B7;B9BC;1105 1175 11B7;
+B9BD;B9BD;1105 1175 11B8;B9BD;1105 1175 11B8;
+B9BE;B9BE;1105 1175 11B9;B9BE;1105 1175 11B9;
+B9BF;B9BF;1105 1175 11BA;B9BF;1105 1175 11BA;
+B9C0;B9C0;1105 1175 11BB;B9C0;1105 1175 11BB;
+B9C1;B9C1;1105 1175 11BC;B9C1;1105 1175 11BC;
+B9C2;B9C2;1105 1175 11BD;B9C2;1105 1175 11BD;
+B9C3;B9C3;1105 1175 11BE;B9C3;1105 1175 11BE;
+B9C4;B9C4;1105 1175 11BF;B9C4;1105 1175 11BF;
+B9C5;B9C5;1105 1175 11C0;B9C5;1105 1175 11C0;
+B9C6;B9C6;1105 1175 11C1;B9C6;1105 1175 11C1;
+B9C7;B9C7;1105 1175 11C2;B9C7;1105 1175 11C2;
+B9C8;B9C8;1106 1161;B9C8;1106 1161;
+B9C9;B9C9;1106 1161 11A8;B9C9;1106 1161 11A8;
+B9CA;B9CA;1106 1161 11A9;B9CA;1106 1161 11A9;
+B9CB;B9CB;1106 1161 11AA;B9CB;1106 1161 11AA;
+B9CC;B9CC;1106 1161 11AB;B9CC;1106 1161 11AB;
+B9CD;B9CD;1106 1161 11AC;B9CD;1106 1161 11AC;
+B9CE;B9CE;1106 1161 11AD;B9CE;1106 1161 11AD;
+B9CF;B9CF;1106 1161 11AE;B9CF;1106 1161 11AE;
+B9D0;B9D0;1106 1161 11AF;B9D0;1106 1161 11AF;
+B9D1;B9D1;1106 1161 11B0;B9D1;1106 1161 11B0;
+B9D2;B9D2;1106 1161 11B1;B9D2;1106 1161 11B1;
+B9D3;B9D3;1106 1161 11B2;B9D3;1106 1161 11B2;
+B9D4;B9D4;1106 1161 11B3;B9D4;1106 1161 11B3;
+B9D5;B9D5;1106 1161 11B4;B9D5;1106 1161 11B4;
+B9D6;B9D6;1106 1161 11B5;B9D6;1106 1161 11B5;
+B9D7;B9D7;1106 1161 11B6;B9D7;1106 1161 11B6;
+B9D8;B9D8;1106 1161 11B7;B9D8;1106 1161 11B7;
+B9D9;B9D9;1106 1161 11B8;B9D9;1106 1161 11B8;
+B9DA;B9DA;1106 1161 11B9;B9DA;1106 1161 11B9;
+B9DB;B9DB;1106 1161 11BA;B9DB;1106 1161 11BA;
+B9DC;B9DC;1106 1161 11BB;B9DC;1106 1161 11BB;
+B9DD;B9DD;1106 1161 11BC;B9DD;1106 1161 11BC;
+B9DE;B9DE;1106 1161 11BD;B9DE;1106 1161 11BD;
+B9DF;B9DF;1106 1161 11BE;B9DF;1106 1161 11BE;
+B9E0;B9E0;1106 1161 11BF;B9E0;1106 1161 11BF;
+B9E1;B9E1;1106 1161 11C0;B9E1;1106 1161 11C0;
+B9E2;B9E2;1106 1161 11C1;B9E2;1106 1161 11C1;
+B9E3;B9E3;1106 1161 11C2;B9E3;1106 1161 11C2;
+B9E4;B9E4;1106 1162;B9E4;1106 1162;
+B9E5;B9E5;1106 1162 11A8;B9E5;1106 1162 11A8;
+B9E6;B9E6;1106 1162 11A9;B9E6;1106 1162 11A9;
+B9E7;B9E7;1106 1162 11AA;B9E7;1106 1162 11AA;
+B9E8;B9E8;1106 1162 11AB;B9E8;1106 1162 11AB;
+B9E9;B9E9;1106 1162 11AC;B9E9;1106 1162 11AC;
+B9EA;B9EA;1106 1162 11AD;B9EA;1106 1162 11AD;
+B9EB;B9EB;1106 1162 11AE;B9EB;1106 1162 11AE;
+B9EC;B9EC;1106 1162 11AF;B9EC;1106 1162 11AF;
+B9ED;B9ED;1106 1162 11B0;B9ED;1106 1162 11B0;
+B9EE;B9EE;1106 1162 11B1;B9EE;1106 1162 11B1;
+B9EF;B9EF;1106 1162 11B2;B9EF;1106 1162 11B2;
+B9F0;B9F0;1106 1162 11B3;B9F0;1106 1162 11B3;
+B9F1;B9F1;1106 1162 11B4;B9F1;1106 1162 11B4;
+B9F2;B9F2;1106 1162 11B5;B9F2;1106 1162 11B5;
+B9F3;B9F3;1106 1162 11B6;B9F3;1106 1162 11B6;
+B9F4;B9F4;1106 1162 11B7;B9F4;1106 1162 11B7;
+B9F5;B9F5;1106 1162 11B8;B9F5;1106 1162 11B8;
+B9F6;B9F6;1106 1162 11B9;B9F6;1106 1162 11B9;
+B9F7;B9F7;1106 1162 11BA;B9F7;1106 1162 11BA;
+B9F8;B9F8;1106 1162 11BB;B9F8;1106 1162 11BB;
+B9F9;B9F9;1106 1162 11BC;B9F9;1106 1162 11BC;
+B9FA;B9FA;1106 1162 11BD;B9FA;1106 1162 11BD;
+B9FB;B9FB;1106 1162 11BE;B9FB;1106 1162 11BE;
+B9FC;B9FC;1106 1162 11BF;B9FC;1106 1162 11BF;
+B9FD;B9FD;1106 1162 11C0;B9FD;1106 1162 11C0;
+B9FE;B9FE;1106 1162 11C1;B9FE;1106 1162 11C1;
+B9FF;B9FF;1106 1162 11C2;B9FF;1106 1162 11C2;
+BA00;BA00;1106 1163;BA00;1106 1163;
+BA01;BA01;1106 1163 11A8;BA01;1106 1163 11A8;
+BA02;BA02;1106 1163 11A9;BA02;1106 1163 11A9;
+BA03;BA03;1106 1163 11AA;BA03;1106 1163 11AA;
+BA04;BA04;1106 1163 11AB;BA04;1106 1163 11AB;
+BA05;BA05;1106 1163 11AC;BA05;1106 1163 11AC;
+BA06;BA06;1106 1163 11AD;BA06;1106 1163 11AD;
+BA07;BA07;1106 1163 11AE;BA07;1106 1163 11AE;
+BA08;BA08;1106 1163 11AF;BA08;1106 1163 11AF;
+BA09;BA09;1106 1163 11B0;BA09;1106 1163 11B0;
+BA0A;BA0A;1106 1163 11B1;BA0A;1106 1163 11B1;
+BA0B;BA0B;1106 1163 11B2;BA0B;1106 1163 11B2;
+BA0C;BA0C;1106 1163 11B3;BA0C;1106 1163 11B3;
+BA0D;BA0D;1106 1163 11B4;BA0D;1106 1163 11B4;
+BA0E;BA0E;1106 1163 11B5;BA0E;1106 1163 11B5;
+BA0F;BA0F;1106 1163 11B6;BA0F;1106 1163 11B6;
+BA10;BA10;1106 1163 11B7;BA10;1106 1163 11B7;
+BA11;BA11;1106 1163 11B8;BA11;1106 1163 11B8;
+BA12;BA12;1106 1163 11B9;BA12;1106 1163 11B9;
+BA13;BA13;1106 1163 11BA;BA13;1106 1163 11BA;
+BA14;BA14;1106 1163 11BB;BA14;1106 1163 11BB;
+BA15;BA15;1106 1163 11BC;BA15;1106 1163 11BC;
+BA16;BA16;1106 1163 11BD;BA16;1106 1163 11BD;
+BA17;BA17;1106 1163 11BE;BA17;1106 1163 11BE;
+BA18;BA18;1106 1163 11BF;BA18;1106 1163 11BF;
+BA19;BA19;1106 1163 11C0;BA19;1106 1163 11C0;
+BA1A;BA1A;1106 1163 11C1;BA1A;1106 1163 11C1;
+BA1B;BA1B;1106 1163 11C2;BA1B;1106 1163 11C2;
+BA1C;BA1C;1106 1164;BA1C;1106 1164;
+BA1D;BA1D;1106 1164 11A8;BA1D;1106 1164 11A8;
+BA1E;BA1E;1106 1164 11A9;BA1E;1106 1164 11A9;
+BA1F;BA1F;1106 1164 11AA;BA1F;1106 1164 11AA;
+BA20;BA20;1106 1164 11AB;BA20;1106 1164 11AB;
+BA21;BA21;1106 1164 11AC;BA21;1106 1164 11AC;
+BA22;BA22;1106 1164 11AD;BA22;1106 1164 11AD;
+BA23;BA23;1106 1164 11AE;BA23;1106 1164 11AE;
+BA24;BA24;1106 1164 11AF;BA24;1106 1164 11AF;
+BA25;BA25;1106 1164 11B0;BA25;1106 1164 11B0;
+BA26;BA26;1106 1164 11B1;BA26;1106 1164 11B1;
+BA27;BA27;1106 1164 11B2;BA27;1106 1164 11B2;
+BA28;BA28;1106 1164 11B3;BA28;1106 1164 11B3;
+BA29;BA29;1106 1164 11B4;BA29;1106 1164 11B4;
+BA2A;BA2A;1106 1164 11B5;BA2A;1106 1164 11B5;
+BA2B;BA2B;1106 1164 11B6;BA2B;1106 1164 11B6;
+BA2C;BA2C;1106 1164 11B7;BA2C;1106 1164 11B7;
+BA2D;BA2D;1106 1164 11B8;BA2D;1106 1164 11B8;
+BA2E;BA2E;1106 1164 11B9;BA2E;1106 1164 11B9;
+BA2F;BA2F;1106 1164 11BA;BA2F;1106 1164 11BA;
+BA30;BA30;1106 1164 11BB;BA30;1106 1164 11BB;
+BA31;BA31;1106 1164 11BC;BA31;1106 1164 11BC;
+BA32;BA32;1106 1164 11BD;BA32;1106 1164 11BD;
+BA33;BA33;1106 1164 11BE;BA33;1106 1164 11BE;
+BA34;BA34;1106 1164 11BF;BA34;1106 1164 11BF;
+BA35;BA35;1106 1164 11C0;BA35;1106 1164 11C0;
+BA36;BA36;1106 1164 11C1;BA36;1106 1164 11C1;
+BA37;BA37;1106 1164 11C2;BA37;1106 1164 11C2;
+BA38;BA38;1106 1165;BA38;1106 1165;
+BA39;BA39;1106 1165 11A8;BA39;1106 1165 11A8;
+BA3A;BA3A;1106 1165 11A9;BA3A;1106 1165 11A9;
+BA3B;BA3B;1106 1165 11AA;BA3B;1106 1165 11AA;
+BA3C;BA3C;1106 1165 11AB;BA3C;1106 1165 11AB;
+BA3D;BA3D;1106 1165 11AC;BA3D;1106 1165 11AC;
+BA3E;BA3E;1106 1165 11AD;BA3E;1106 1165 11AD;
+BA3F;BA3F;1106 1165 11AE;BA3F;1106 1165 11AE;
+BA40;BA40;1106 1165 11AF;BA40;1106 1165 11AF;
+BA41;BA41;1106 1165 11B0;BA41;1106 1165 11B0;
+BA42;BA42;1106 1165 11B1;BA42;1106 1165 11B1;
+BA43;BA43;1106 1165 11B2;BA43;1106 1165 11B2;
+BA44;BA44;1106 1165 11B3;BA44;1106 1165 11B3;
+BA45;BA45;1106 1165 11B4;BA45;1106 1165 11B4;
+BA46;BA46;1106 1165 11B5;BA46;1106 1165 11B5;
+BA47;BA47;1106 1165 11B6;BA47;1106 1165 11B6;
+BA48;BA48;1106 1165 11B7;BA48;1106 1165 11B7;
+BA49;BA49;1106 1165 11B8;BA49;1106 1165 11B8;
+BA4A;BA4A;1106 1165 11B9;BA4A;1106 1165 11B9;
+BA4B;BA4B;1106 1165 11BA;BA4B;1106 1165 11BA;
+BA4C;BA4C;1106 1165 11BB;BA4C;1106 1165 11BB;
+BA4D;BA4D;1106 1165 11BC;BA4D;1106 1165 11BC;
+BA4E;BA4E;1106 1165 11BD;BA4E;1106 1165 11BD;
+BA4F;BA4F;1106 1165 11BE;BA4F;1106 1165 11BE;
+BA50;BA50;1106 1165 11BF;BA50;1106 1165 11BF;
+BA51;BA51;1106 1165 11C0;BA51;1106 1165 11C0;
+BA52;BA52;1106 1165 11C1;BA52;1106 1165 11C1;
+BA53;BA53;1106 1165 11C2;BA53;1106 1165 11C2;
+BA54;BA54;1106 1166;BA54;1106 1166;
+BA55;BA55;1106 1166 11A8;BA55;1106 1166 11A8;
+BA56;BA56;1106 1166 11A9;BA56;1106 1166 11A9;
+BA57;BA57;1106 1166 11AA;BA57;1106 1166 11AA;
+BA58;BA58;1106 1166 11AB;BA58;1106 1166 11AB;
+BA59;BA59;1106 1166 11AC;BA59;1106 1166 11AC;
+BA5A;BA5A;1106 1166 11AD;BA5A;1106 1166 11AD;
+BA5B;BA5B;1106 1166 11AE;BA5B;1106 1166 11AE;
+BA5C;BA5C;1106 1166 11AF;BA5C;1106 1166 11AF;
+BA5D;BA5D;1106 1166 11B0;BA5D;1106 1166 11B0;
+BA5E;BA5E;1106 1166 11B1;BA5E;1106 1166 11B1;
+BA5F;BA5F;1106 1166 11B2;BA5F;1106 1166 11B2;
+BA60;BA60;1106 1166 11B3;BA60;1106 1166 11B3;
+BA61;BA61;1106 1166 11B4;BA61;1106 1166 11B4;
+BA62;BA62;1106 1166 11B5;BA62;1106 1166 11B5;
+BA63;BA63;1106 1166 11B6;BA63;1106 1166 11B6;
+BA64;BA64;1106 1166 11B7;BA64;1106 1166 11B7;
+BA65;BA65;1106 1166 11B8;BA65;1106 1166 11B8;
+BA66;BA66;1106 1166 11B9;BA66;1106 1166 11B9;
+BA67;BA67;1106 1166 11BA;BA67;1106 1166 11BA;
+BA68;BA68;1106 1166 11BB;BA68;1106 1166 11BB;
+BA69;BA69;1106 1166 11BC;BA69;1106 1166 11BC;
+BA6A;BA6A;1106 1166 11BD;BA6A;1106 1166 11BD;
+BA6B;BA6B;1106 1166 11BE;BA6B;1106 1166 11BE;
+BA6C;BA6C;1106 1166 11BF;BA6C;1106 1166 11BF;
+BA6D;BA6D;1106 1166 11C0;BA6D;1106 1166 11C0;
+BA6E;BA6E;1106 1166 11C1;BA6E;1106 1166 11C1;
+BA6F;BA6F;1106 1166 11C2;BA6F;1106 1166 11C2;
+BA70;BA70;1106 1167;BA70;1106 1167;
+BA71;BA71;1106 1167 11A8;BA71;1106 1167 11A8;
+BA72;BA72;1106 1167 11A9;BA72;1106 1167 11A9;
+BA73;BA73;1106 1167 11AA;BA73;1106 1167 11AA;
+BA74;BA74;1106 1167 11AB;BA74;1106 1167 11AB;
+BA75;BA75;1106 1167 11AC;BA75;1106 1167 11AC;
+BA76;BA76;1106 1167 11AD;BA76;1106 1167 11AD;
+BA77;BA77;1106 1167 11AE;BA77;1106 1167 11AE;
+BA78;BA78;1106 1167 11AF;BA78;1106 1167 11AF;
+BA79;BA79;1106 1167 11B0;BA79;1106 1167 11B0;
+BA7A;BA7A;1106 1167 11B1;BA7A;1106 1167 11B1;
+BA7B;BA7B;1106 1167 11B2;BA7B;1106 1167 11B2;
+BA7C;BA7C;1106 1167 11B3;BA7C;1106 1167 11B3;
+BA7D;BA7D;1106 1167 11B4;BA7D;1106 1167 11B4;
+BA7E;BA7E;1106 1167 11B5;BA7E;1106 1167 11B5;
+BA7F;BA7F;1106 1167 11B6;BA7F;1106 1167 11B6;
+BA80;BA80;1106 1167 11B7;BA80;1106 1167 11B7;
+BA81;BA81;1106 1167 11B8;BA81;1106 1167 11B8;
+BA82;BA82;1106 1167 11B9;BA82;1106 1167 11B9;
+BA83;BA83;1106 1167 11BA;BA83;1106 1167 11BA;
+BA84;BA84;1106 1167 11BB;BA84;1106 1167 11BB;
+BA85;BA85;1106 1167 11BC;BA85;1106 1167 11BC;
+BA86;BA86;1106 1167 11BD;BA86;1106 1167 11BD;
+BA87;BA87;1106 1167 11BE;BA87;1106 1167 11BE;
+BA88;BA88;1106 1167 11BF;BA88;1106 1167 11BF;
+BA89;BA89;1106 1167 11C0;BA89;1106 1167 11C0;
+BA8A;BA8A;1106 1167 11C1;BA8A;1106 1167 11C1;
+BA8B;BA8B;1106 1167 11C2;BA8B;1106 1167 11C2;
+BA8C;BA8C;1106 1168;BA8C;1106 1168;
+BA8D;BA8D;1106 1168 11A8;BA8D;1106 1168 11A8;
+BA8E;BA8E;1106 1168 11A9;BA8E;1106 1168 11A9;
+BA8F;BA8F;1106 1168 11AA;BA8F;1106 1168 11AA;
+BA90;BA90;1106 1168 11AB;BA90;1106 1168 11AB;
+BA91;BA91;1106 1168 11AC;BA91;1106 1168 11AC;
+BA92;BA92;1106 1168 11AD;BA92;1106 1168 11AD;
+BA93;BA93;1106 1168 11AE;BA93;1106 1168 11AE;
+BA94;BA94;1106 1168 11AF;BA94;1106 1168 11AF;
+BA95;BA95;1106 1168 11B0;BA95;1106 1168 11B0;
+BA96;BA96;1106 1168 11B1;BA96;1106 1168 11B1;
+BA97;BA97;1106 1168 11B2;BA97;1106 1168 11B2;
+BA98;BA98;1106 1168 11B3;BA98;1106 1168 11B3;
+BA99;BA99;1106 1168 11B4;BA99;1106 1168 11B4;
+BA9A;BA9A;1106 1168 11B5;BA9A;1106 1168 11B5;
+BA9B;BA9B;1106 1168 11B6;BA9B;1106 1168 11B6;
+BA9C;BA9C;1106 1168 11B7;BA9C;1106 1168 11B7;
+BA9D;BA9D;1106 1168 11B8;BA9D;1106 1168 11B8;
+BA9E;BA9E;1106 1168 11B9;BA9E;1106 1168 11B9;
+BA9F;BA9F;1106 1168 11BA;BA9F;1106 1168 11BA;
+BAA0;BAA0;1106 1168 11BB;BAA0;1106 1168 11BB;
+BAA1;BAA1;1106 1168 11BC;BAA1;1106 1168 11BC;
+BAA2;BAA2;1106 1168 11BD;BAA2;1106 1168 11BD;
+BAA3;BAA3;1106 1168 11BE;BAA3;1106 1168 11BE;
+BAA4;BAA4;1106 1168 11BF;BAA4;1106 1168 11BF;
+BAA5;BAA5;1106 1168 11C0;BAA5;1106 1168 11C0;
+BAA6;BAA6;1106 1168 11C1;BAA6;1106 1168 11C1;
+BAA7;BAA7;1106 1168 11C2;BAA7;1106 1168 11C2;
+BAA8;BAA8;1106 1169;BAA8;1106 1169;
+BAA9;BAA9;1106 1169 11A8;BAA9;1106 1169 11A8;
+BAAA;BAAA;1106 1169 11A9;BAAA;1106 1169 11A9;
+BAAB;BAAB;1106 1169 11AA;BAAB;1106 1169 11AA;
+BAAC;BAAC;1106 1169 11AB;BAAC;1106 1169 11AB;
+BAAD;BAAD;1106 1169 11AC;BAAD;1106 1169 11AC;
+BAAE;BAAE;1106 1169 11AD;BAAE;1106 1169 11AD;
+BAAF;BAAF;1106 1169 11AE;BAAF;1106 1169 11AE;
+BAB0;BAB0;1106 1169 11AF;BAB0;1106 1169 11AF;
+BAB1;BAB1;1106 1169 11B0;BAB1;1106 1169 11B0;
+BAB2;BAB2;1106 1169 11B1;BAB2;1106 1169 11B1;
+BAB3;BAB3;1106 1169 11B2;BAB3;1106 1169 11B2;
+BAB4;BAB4;1106 1169 11B3;BAB4;1106 1169 11B3;
+BAB5;BAB5;1106 1169 11B4;BAB5;1106 1169 11B4;
+BAB6;BAB6;1106 1169 11B5;BAB6;1106 1169 11B5;
+BAB7;BAB7;1106 1169 11B6;BAB7;1106 1169 11B6;
+BAB8;BAB8;1106 1169 11B7;BAB8;1106 1169 11B7;
+BAB9;BAB9;1106 1169 11B8;BAB9;1106 1169 11B8;
+BABA;BABA;1106 1169 11B9;BABA;1106 1169 11B9;
+BABB;BABB;1106 1169 11BA;BABB;1106 1169 11BA;
+BABC;BABC;1106 1169 11BB;BABC;1106 1169 11BB;
+BABD;BABD;1106 1169 11BC;BABD;1106 1169 11BC;
+BABE;BABE;1106 1169 11BD;BABE;1106 1169 11BD;
+BABF;BABF;1106 1169 11BE;BABF;1106 1169 11BE;
+BAC0;BAC0;1106 1169 11BF;BAC0;1106 1169 11BF;
+BAC1;BAC1;1106 1169 11C0;BAC1;1106 1169 11C0;
+BAC2;BAC2;1106 1169 11C1;BAC2;1106 1169 11C1;
+BAC3;BAC3;1106 1169 11C2;BAC3;1106 1169 11C2;
+BAC4;BAC4;1106 116A;BAC4;1106 116A;
+BAC5;BAC5;1106 116A 11A8;BAC5;1106 116A 11A8;
+BAC6;BAC6;1106 116A 11A9;BAC6;1106 116A 11A9;
+BAC7;BAC7;1106 116A 11AA;BAC7;1106 116A 11AA;
+BAC8;BAC8;1106 116A 11AB;BAC8;1106 116A 11AB;
+BAC9;BAC9;1106 116A 11AC;BAC9;1106 116A 11AC;
+BACA;BACA;1106 116A 11AD;BACA;1106 116A 11AD;
+BACB;BACB;1106 116A 11AE;BACB;1106 116A 11AE;
+BACC;BACC;1106 116A 11AF;BACC;1106 116A 11AF;
+BACD;BACD;1106 116A 11B0;BACD;1106 116A 11B0;
+BACE;BACE;1106 116A 11B1;BACE;1106 116A 11B1;
+BACF;BACF;1106 116A 11B2;BACF;1106 116A 11B2;
+BAD0;BAD0;1106 116A 11B3;BAD0;1106 116A 11B3;
+BAD1;BAD1;1106 116A 11B4;BAD1;1106 116A 11B4;
+BAD2;BAD2;1106 116A 11B5;BAD2;1106 116A 11B5;
+BAD3;BAD3;1106 116A 11B6;BAD3;1106 116A 11B6;
+BAD4;BAD4;1106 116A 11B7;BAD4;1106 116A 11B7;
+BAD5;BAD5;1106 116A 11B8;BAD5;1106 116A 11B8;
+BAD6;BAD6;1106 116A 11B9;BAD6;1106 116A 11B9;
+BAD7;BAD7;1106 116A 11BA;BAD7;1106 116A 11BA;
+BAD8;BAD8;1106 116A 11BB;BAD8;1106 116A 11BB;
+BAD9;BAD9;1106 116A 11BC;BAD9;1106 116A 11BC;
+BADA;BADA;1106 116A 11BD;BADA;1106 116A 11BD;
+BADB;BADB;1106 116A 11BE;BADB;1106 116A 11BE;
+BADC;BADC;1106 116A 11BF;BADC;1106 116A 11BF;
+BADD;BADD;1106 116A 11C0;BADD;1106 116A 11C0;
+BADE;BADE;1106 116A 11C1;BADE;1106 116A 11C1;
+BADF;BADF;1106 116A 11C2;BADF;1106 116A 11C2;
+BAE0;BAE0;1106 116B;BAE0;1106 116B;
+BAE1;BAE1;1106 116B 11A8;BAE1;1106 116B 11A8;
+BAE2;BAE2;1106 116B 11A9;BAE2;1106 116B 11A9;
+BAE3;BAE3;1106 116B 11AA;BAE3;1106 116B 11AA;
+BAE4;BAE4;1106 116B 11AB;BAE4;1106 116B 11AB;
+BAE5;BAE5;1106 116B 11AC;BAE5;1106 116B 11AC;
+BAE6;BAE6;1106 116B 11AD;BAE6;1106 116B 11AD;
+BAE7;BAE7;1106 116B 11AE;BAE7;1106 116B 11AE;
+BAE8;BAE8;1106 116B 11AF;BAE8;1106 116B 11AF;
+BAE9;BAE9;1106 116B 11B0;BAE9;1106 116B 11B0;
+BAEA;BAEA;1106 116B 11B1;BAEA;1106 116B 11B1;
+BAEB;BAEB;1106 116B 11B2;BAEB;1106 116B 11B2;
+BAEC;BAEC;1106 116B 11B3;BAEC;1106 116B 11B3;
+BAED;BAED;1106 116B 11B4;BAED;1106 116B 11B4;
+BAEE;BAEE;1106 116B 11B5;BAEE;1106 116B 11B5;
+BAEF;BAEF;1106 116B 11B6;BAEF;1106 116B 11B6;
+BAF0;BAF0;1106 116B 11B7;BAF0;1106 116B 11B7;
+BAF1;BAF1;1106 116B 11B8;BAF1;1106 116B 11B8;
+BAF2;BAF2;1106 116B 11B9;BAF2;1106 116B 11B9;
+BAF3;BAF3;1106 116B 11BA;BAF3;1106 116B 11BA;
+BAF4;BAF4;1106 116B 11BB;BAF4;1106 116B 11BB;
+BAF5;BAF5;1106 116B 11BC;BAF5;1106 116B 11BC;
+BAF6;BAF6;1106 116B 11BD;BAF6;1106 116B 11BD;
+BAF7;BAF7;1106 116B 11BE;BAF7;1106 116B 11BE;
+BAF8;BAF8;1106 116B 11BF;BAF8;1106 116B 11BF;
+BAF9;BAF9;1106 116B 11C0;BAF9;1106 116B 11C0;
+BAFA;BAFA;1106 116B 11C1;BAFA;1106 116B 11C1;
+BAFB;BAFB;1106 116B 11C2;BAFB;1106 116B 11C2;
+BAFC;BAFC;1106 116C;BAFC;1106 116C;
+BAFD;BAFD;1106 116C 11A8;BAFD;1106 116C 11A8;
+BAFE;BAFE;1106 116C 11A9;BAFE;1106 116C 11A9;
+BAFF;BAFF;1106 116C 11AA;BAFF;1106 116C 11AA;
+BB00;BB00;1106 116C 11AB;BB00;1106 116C 11AB;
+BB01;BB01;1106 116C 11AC;BB01;1106 116C 11AC;
+BB02;BB02;1106 116C 11AD;BB02;1106 116C 11AD;
+BB03;BB03;1106 116C 11AE;BB03;1106 116C 11AE;
+BB04;BB04;1106 116C 11AF;BB04;1106 116C 11AF;
+BB05;BB05;1106 116C 11B0;BB05;1106 116C 11B0;
+BB06;BB06;1106 116C 11B1;BB06;1106 116C 11B1;
+BB07;BB07;1106 116C 11B2;BB07;1106 116C 11B2;
+BB08;BB08;1106 116C 11B3;BB08;1106 116C 11B3;
+BB09;BB09;1106 116C 11B4;BB09;1106 116C 11B4;
+BB0A;BB0A;1106 116C 11B5;BB0A;1106 116C 11B5;
+BB0B;BB0B;1106 116C 11B6;BB0B;1106 116C 11B6;
+BB0C;BB0C;1106 116C 11B7;BB0C;1106 116C 11B7;
+BB0D;BB0D;1106 116C 11B8;BB0D;1106 116C 11B8;
+BB0E;BB0E;1106 116C 11B9;BB0E;1106 116C 11B9;
+BB0F;BB0F;1106 116C 11BA;BB0F;1106 116C 11BA;
+BB10;BB10;1106 116C 11BB;BB10;1106 116C 11BB;
+BB11;BB11;1106 116C 11BC;BB11;1106 116C 11BC;
+BB12;BB12;1106 116C 11BD;BB12;1106 116C 11BD;
+BB13;BB13;1106 116C 11BE;BB13;1106 116C 11BE;
+BB14;BB14;1106 116C 11BF;BB14;1106 116C 11BF;
+BB15;BB15;1106 116C 11C0;BB15;1106 116C 11C0;
+BB16;BB16;1106 116C 11C1;BB16;1106 116C 11C1;
+BB17;BB17;1106 116C 11C2;BB17;1106 116C 11C2;
+BB18;BB18;1106 116D;BB18;1106 116D;
+BB19;BB19;1106 116D 11A8;BB19;1106 116D 11A8;
+BB1A;BB1A;1106 116D 11A9;BB1A;1106 116D 11A9;
+BB1B;BB1B;1106 116D 11AA;BB1B;1106 116D 11AA;
+BB1C;BB1C;1106 116D 11AB;BB1C;1106 116D 11AB;
+BB1D;BB1D;1106 116D 11AC;BB1D;1106 116D 11AC;
+BB1E;BB1E;1106 116D 11AD;BB1E;1106 116D 11AD;
+BB1F;BB1F;1106 116D 11AE;BB1F;1106 116D 11AE;
+BB20;BB20;1106 116D 11AF;BB20;1106 116D 11AF;
+BB21;BB21;1106 116D 11B0;BB21;1106 116D 11B0;
+BB22;BB22;1106 116D 11B1;BB22;1106 116D 11B1;
+BB23;BB23;1106 116D 11B2;BB23;1106 116D 11B2;
+BB24;BB24;1106 116D 11B3;BB24;1106 116D 11B3;
+BB25;BB25;1106 116D 11B4;BB25;1106 116D 11B4;
+BB26;BB26;1106 116D 11B5;BB26;1106 116D 11B5;
+BB27;BB27;1106 116D 11B6;BB27;1106 116D 11B6;
+BB28;BB28;1106 116D 11B7;BB28;1106 116D 11B7;
+BB29;BB29;1106 116D 11B8;BB29;1106 116D 11B8;
+BB2A;BB2A;1106 116D 11B9;BB2A;1106 116D 11B9;
+BB2B;BB2B;1106 116D 11BA;BB2B;1106 116D 11BA;
+BB2C;BB2C;1106 116D 11BB;BB2C;1106 116D 11BB;
+BB2D;BB2D;1106 116D 11BC;BB2D;1106 116D 11BC;
+BB2E;BB2E;1106 116D 11BD;BB2E;1106 116D 11BD;
+BB2F;BB2F;1106 116D 11BE;BB2F;1106 116D 11BE;
+BB30;BB30;1106 116D 11BF;BB30;1106 116D 11BF;
+BB31;BB31;1106 116D 11C0;BB31;1106 116D 11C0;
+BB32;BB32;1106 116D 11C1;BB32;1106 116D 11C1;
+BB33;BB33;1106 116D 11C2;BB33;1106 116D 11C2;
+BB34;BB34;1106 116E;BB34;1106 116E;
+BB35;BB35;1106 116E 11A8;BB35;1106 116E 11A8;
+BB36;BB36;1106 116E 11A9;BB36;1106 116E 11A9;
+BB37;BB37;1106 116E 11AA;BB37;1106 116E 11AA;
+BB38;BB38;1106 116E 11AB;BB38;1106 116E 11AB;
+BB39;BB39;1106 116E 11AC;BB39;1106 116E 11AC;
+BB3A;BB3A;1106 116E 11AD;BB3A;1106 116E 11AD;
+BB3B;BB3B;1106 116E 11AE;BB3B;1106 116E 11AE;
+BB3C;BB3C;1106 116E 11AF;BB3C;1106 116E 11AF;
+BB3D;BB3D;1106 116E 11B0;BB3D;1106 116E 11B0;
+BB3E;BB3E;1106 116E 11B1;BB3E;1106 116E 11B1;
+BB3F;BB3F;1106 116E 11B2;BB3F;1106 116E 11B2;
+BB40;BB40;1106 116E 11B3;BB40;1106 116E 11B3;
+BB41;BB41;1106 116E 11B4;BB41;1106 116E 11B4;
+BB42;BB42;1106 116E 11B5;BB42;1106 116E 11B5;
+BB43;BB43;1106 116E 11B6;BB43;1106 116E 11B6;
+BB44;BB44;1106 116E 11B7;BB44;1106 116E 11B7;
+BB45;BB45;1106 116E 11B8;BB45;1106 116E 11B8;
+BB46;BB46;1106 116E 11B9;BB46;1106 116E 11B9;
+BB47;BB47;1106 116E 11BA;BB47;1106 116E 11BA;
+BB48;BB48;1106 116E 11BB;BB48;1106 116E 11BB;
+BB49;BB49;1106 116E 11BC;BB49;1106 116E 11BC;
+BB4A;BB4A;1106 116E 11BD;BB4A;1106 116E 11BD;
+BB4B;BB4B;1106 116E 11BE;BB4B;1106 116E 11BE;
+BB4C;BB4C;1106 116E 11BF;BB4C;1106 116E 11BF;
+BB4D;BB4D;1106 116E 11C0;BB4D;1106 116E 11C0;
+BB4E;BB4E;1106 116E 11C1;BB4E;1106 116E 11C1;
+BB4F;BB4F;1106 116E 11C2;BB4F;1106 116E 11C2;
+BB50;BB50;1106 116F;BB50;1106 116F;
+BB51;BB51;1106 116F 11A8;BB51;1106 116F 11A8;
+BB52;BB52;1106 116F 11A9;BB52;1106 116F 11A9;
+BB53;BB53;1106 116F 11AA;BB53;1106 116F 11AA;
+BB54;BB54;1106 116F 11AB;BB54;1106 116F 11AB;
+BB55;BB55;1106 116F 11AC;BB55;1106 116F 11AC;
+BB56;BB56;1106 116F 11AD;BB56;1106 116F 11AD;
+BB57;BB57;1106 116F 11AE;BB57;1106 116F 11AE;
+BB58;BB58;1106 116F 11AF;BB58;1106 116F 11AF;
+BB59;BB59;1106 116F 11B0;BB59;1106 116F 11B0;
+BB5A;BB5A;1106 116F 11B1;BB5A;1106 116F 11B1;
+BB5B;BB5B;1106 116F 11B2;BB5B;1106 116F 11B2;
+BB5C;BB5C;1106 116F 11B3;BB5C;1106 116F 11B3;
+BB5D;BB5D;1106 116F 11B4;BB5D;1106 116F 11B4;
+BB5E;BB5E;1106 116F 11B5;BB5E;1106 116F 11B5;
+BB5F;BB5F;1106 116F 11B6;BB5F;1106 116F 11B6;
+BB60;BB60;1106 116F 11B7;BB60;1106 116F 11B7;
+BB61;BB61;1106 116F 11B8;BB61;1106 116F 11B8;
+BB62;BB62;1106 116F 11B9;BB62;1106 116F 11B9;
+BB63;BB63;1106 116F 11BA;BB63;1106 116F 11BA;
+BB64;BB64;1106 116F 11BB;BB64;1106 116F 11BB;
+BB65;BB65;1106 116F 11BC;BB65;1106 116F 11BC;
+BB66;BB66;1106 116F 11BD;BB66;1106 116F 11BD;
+BB67;BB67;1106 116F 11BE;BB67;1106 116F 11BE;
+BB68;BB68;1106 116F 11BF;BB68;1106 116F 11BF;
+BB69;BB69;1106 116F 11C0;BB69;1106 116F 11C0;
+BB6A;BB6A;1106 116F 11C1;BB6A;1106 116F 11C1;
+BB6B;BB6B;1106 116F 11C2;BB6B;1106 116F 11C2;
+BB6C;BB6C;1106 1170;BB6C;1106 1170;
+BB6D;BB6D;1106 1170 11A8;BB6D;1106 1170 11A8;
+BB6E;BB6E;1106 1170 11A9;BB6E;1106 1170 11A9;
+BB6F;BB6F;1106 1170 11AA;BB6F;1106 1170 11AA;
+BB70;BB70;1106 1170 11AB;BB70;1106 1170 11AB;
+BB71;BB71;1106 1170 11AC;BB71;1106 1170 11AC;
+BB72;BB72;1106 1170 11AD;BB72;1106 1170 11AD;
+BB73;BB73;1106 1170 11AE;BB73;1106 1170 11AE;
+BB74;BB74;1106 1170 11AF;BB74;1106 1170 11AF;
+BB75;BB75;1106 1170 11B0;BB75;1106 1170 11B0;
+BB76;BB76;1106 1170 11B1;BB76;1106 1170 11B1;
+BB77;BB77;1106 1170 11B2;BB77;1106 1170 11B2;
+BB78;BB78;1106 1170 11B3;BB78;1106 1170 11B3;
+BB79;BB79;1106 1170 11B4;BB79;1106 1170 11B4;
+BB7A;BB7A;1106 1170 11B5;BB7A;1106 1170 11B5;
+BB7B;BB7B;1106 1170 11B6;BB7B;1106 1170 11B6;
+BB7C;BB7C;1106 1170 11B7;BB7C;1106 1170 11B7;
+BB7D;BB7D;1106 1170 11B8;BB7D;1106 1170 11B8;
+BB7E;BB7E;1106 1170 11B9;BB7E;1106 1170 11B9;
+BB7F;BB7F;1106 1170 11BA;BB7F;1106 1170 11BA;
+BB80;BB80;1106 1170 11BB;BB80;1106 1170 11BB;
+BB81;BB81;1106 1170 11BC;BB81;1106 1170 11BC;
+BB82;BB82;1106 1170 11BD;BB82;1106 1170 11BD;
+BB83;BB83;1106 1170 11BE;BB83;1106 1170 11BE;
+BB84;BB84;1106 1170 11BF;BB84;1106 1170 11BF;
+BB85;BB85;1106 1170 11C0;BB85;1106 1170 11C0;
+BB86;BB86;1106 1170 11C1;BB86;1106 1170 11C1;
+BB87;BB87;1106 1170 11C2;BB87;1106 1170 11C2;
+BB88;BB88;1106 1171;BB88;1106 1171;
+BB89;BB89;1106 1171 11A8;BB89;1106 1171 11A8;
+BB8A;BB8A;1106 1171 11A9;BB8A;1106 1171 11A9;
+BB8B;BB8B;1106 1171 11AA;BB8B;1106 1171 11AA;
+BB8C;BB8C;1106 1171 11AB;BB8C;1106 1171 11AB;
+BB8D;BB8D;1106 1171 11AC;BB8D;1106 1171 11AC;
+BB8E;BB8E;1106 1171 11AD;BB8E;1106 1171 11AD;
+BB8F;BB8F;1106 1171 11AE;BB8F;1106 1171 11AE;
+BB90;BB90;1106 1171 11AF;BB90;1106 1171 11AF;
+BB91;BB91;1106 1171 11B0;BB91;1106 1171 11B0;
+BB92;BB92;1106 1171 11B1;BB92;1106 1171 11B1;
+BB93;BB93;1106 1171 11B2;BB93;1106 1171 11B2;
+BB94;BB94;1106 1171 11B3;BB94;1106 1171 11B3;
+BB95;BB95;1106 1171 11B4;BB95;1106 1171 11B4;
+BB96;BB96;1106 1171 11B5;BB96;1106 1171 11B5;
+BB97;BB97;1106 1171 11B6;BB97;1106 1171 11B6;
+BB98;BB98;1106 1171 11B7;BB98;1106 1171 11B7;
+BB99;BB99;1106 1171 11B8;BB99;1106 1171 11B8;
+BB9A;BB9A;1106 1171 11B9;BB9A;1106 1171 11B9;
+BB9B;BB9B;1106 1171 11BA;BB9B;1106 1171 11BA;
+BB9C;BB9C;1106 1171 11BB;BB9C;1106 1171 11BB;
+BB9D;BB9D;1106 1171 11BC;BB9D;1106 1171 11BC;
+BB9E;BB9E;1106 1171 11BD;BB9E;1106 1171 11BD;
+BB9F;BB9F;1106 1171 11BE;BB9F;1106 1171 11BE;
+BBA0;BBA0;1106 1171 11BF;BBA0;1106 1171 11BF;
+BBA1;BBA1;1106 1171 11C0;BBA1;1106 1171 11C0;
+BBA2;BBA2;1106 1171 11C1;BBA2;1106 1171 11C1;
+BBA3;BBA3;1106 1171 11C2;BBA3;1106 1171 11C2;
+BBA4;BBA4;1106 1172;BBA4;1106 1172;
+BBA5;BBA5;1106 1172 11A8;BBA5;1106 1172 11A8;
+BBA6;BBA6;1106 1172 11A9;BBA6;1106 1172 11A9;
+BBA7;BBA7;1106 1172 11AA;BBA7;1106 1172 11AA;
+BBA8;BBA8;1106 1172 11AB;BBA8;1106 1172 11AB;
+BBA9;BBA9;1106 1172 11AC;BBA9;1106 1172 11AC;
+BBAA;BBAA;1106 1172 11AD;BBAA;1106 1172 11AD;
+BBAB;BBAB;1106 1172 11AE;BBAB;1106 1172 11AE;
+BBAC;BBAC;1106 1172 11AF;BBAC;1106 1172 11AF;
+BBAD;BBAD;1106 1172 11B0;BBAD;1106 1172 11B0;
+BBAE;BBAE;1106 1172 11B1;BBAE;1106 1172 11B1;
+BBAF;BBAF;1106 1172 11B2;BBAF;1106 1172 11B2;
+BBB0;BBB0;1106 1172 11B3;BBB0;1106 1172 11B3;
+BBB1;BBB1;1106 1172 11B4;BBB1;1106 1172 11B4;
+BBB2;BBB2;1106 1172 11B5;BBB2;1106 1172 11B5;
+BBB3;BBB3;1106 1172 11B6;BBB3;1106 1172 11B6;
+BBB4;BBB4;1106 1172 11B7;BBB4;1106 1172 11B7;
+BBB5;BBB5;1106 1172 11B8;BBB5;1106 1172 11B8;
+BBB6;BBB6;1106 1172 11B9;BBB6;1106 1172 11B9;
+BBB7;BBB7;1106 1172 11BA;BBB7;1106 1172 11BA;
+BBB8;BBB8;1106 1172 11BB;BBB8;1106 1172 11BB;
+BBB9;BBB9;1106 1172 11BC;BBB9;1106 1172 11BC;
+BBBA;BBBA;1106 1172 11BD;BBBA;1106 1172 11BD;
+BBBB;BBBB;1106 1172 11BE;BBBB;1106 1172 11BE;
+BBBC;BBBC;1106 1172 11BF;BBBC;1106 1172 11BF;
+BBBD;BBBD;1106 1172 11C0;BBBD;1106 1172 11C0;
+BBBE;BBBE;1106 1172 11C1;BBBE;1106 1172 11C1;
+BBBF;BBBF;1106 1172 11C2;BBBF;1106 1172 11C2;
+BBC0;BBC0;1106 1173;BBC0;1106 1173;
+BBC1;BBC1;1106 1173 11A8;BBC1;1106 1173 11A8;
+BBC2;BBC2;1106 1173 11A9;BBC2;1106 1173 11A9;
+BBC3;BBC3;1106 1173 11AA;BBC3;1106 1173 11AA;
+BBC4;BBC4;1106 1173 11AB;BBC4;1106 1173 11AB;
+BBC5;BBC5;1106 1173 11AC;BBC5;1106 1173 11AC;
+BBC6;BBC6;1106 1173 11AD;BBC6;1106 1173 11AD;
+BBC7;BBC7;1106 1173 11AE;BBC7;1106 1173 11AE;
+BBC8;BBC8;1106 1173 11AF;BBC8;1106 1173 11AF;
+BBC9;BBC9;1106 1173 11B0;BBC9;1106 1173 11B0;
+BBCA;BBCA;1106 1173 11B1;BBCA;1106 1173 11B1;
+BBCB;BBCB;1106 1173 11B2;BBCB;1106 1173 11B2;
+BBCC;BBCC;1106 1173 11B3;BBCC;1106 1173 11B3;
+BBCD;BBCD;1106 1173 11B4;BBCD;1106 1173 11B4;
+BBCE;BBCE;1106 1173 11B5;BBCE;1106 1173 11B5;
+BBCF;BBCF;1106 1173 11B6;BBCF;1106 1173 11B6;
+BBD0;BBD0;1106 1173 11B7;BBD0;1106 1173 11B7;
+BBD1;BBD1;1106 1173 11B8;BBD1;1106 1173 11B8;
+BBD2;BBD2;1106 1173 11B9;BBD2;1106 1173 11B9;
+BBD3;BBD3;1106 1173 11BA;BBD3;1106 1173 11BA;
+BBD4;BBD4;1106 1173 11BB;BBD4;1106 1173 11BB;
+BBD5;BBD5;1106 1173 11BC;BBD5;1106 1173 11BC;
+BBD6;BBD6;1106 1173 11BD;BBD6;1106 1173 11BD;
+BBD7;BBD7;1106 1173 11BE;BBD7;1106 1173 11BE;
+BBD8;BBD8;1106 1173 11BF;BBD8;1106 1173 11BF;
+BBD9;BBD9;1106 1173 11C0;BBD9;1106 1173 11C0;
+BBDA;BBDA;1106 1173 11C1;BBDA;1106 1173 11C1;
+BBDB;BBDB;1106 1173 11C2;BBDB;1106 1173 11C2;
+BBDC;BBDC;1106 1174;BBDC;1106 1174;
+BBDD;BBDD;1106 1174 11A8;BBDD;1106 1174 11A8;
+BBDE;BBDE;1106 1174 11A9;BBDE;1106 1174 11A9;
+BBDF;BBDF;1106 1174 11AA;BBDF;1106 1174 11AA;
+BBE0;BBE0;1106 1174 11AB;BBE0;1106 1174 11AB;
+BBE1;BBE1;1106 1174 11AC;BBE1;1106 1174 11AC;
+BBE2;BBE2;1106 1174 11AD;BBE2;1106 1174 11AD;
+BBE3;BBE3;1106 1174 11AE;BBE3;1106 1174 11AE;
+BBE4;BBE4;1106 1174 11AF;BBE4;1106 1174 11AF;
+BBE5;BBE5;1106 1174 11B0;BBE5;1106 1174 11B0;
+BBE6;BBE6;1106 1174 11B1;BBE6;1106 1174 11B1;
+BBE7;BBE7;1106 1174 11B2;BBE7;1106 1174 11B2;
+BBE8;BBE8;1106 1174 11B3;BBE8;1106 1174 11B3;
+BBE9;BBE9;1106 1174 11B4;BBE9;1106 1174 11B4;
+BBEA;BBEA;1106 1174 11B5;BBEA;1106 1174 11B5;
+BBEB;BBEB;1106 1174 11B6;BBEB;1106 1174 11B6;
+BBEC;BBEC;1106 1174 11B7;BBEC;1106 1174 11B7;
+BBED;BBED;1106 1174 11B8;BBED;1106 1174 11B8;
+BBEE;BBEE;1106 1174 11B9;BBEE;1106 1174 11B9;
+BBEF;BBEF;1106 1174 11BA;BBEF;1106 1174 11BA;
+BBF0;BBF0;1106 1174 11BB;BBF0;1106 1174 11BB;
+BBF1;BBF1;1106 1174 11BC;BBF1;1106 1174 11BC;
+BBF2;BBF2;1106 1174 11BD;BBF2;1106 1174 11BD;
+BBF3;BBF3;1106 1174 11BE;BBF3;1106 1174 11BE;
+BBF4;BBF4;1106 1174 11BF;BBF4;1106 1174 11BF;
+BBF5;BBF5;1106 1174 11C0;BBF5;1106 1174 11C0;
+BBF6;BBF6;1106 1174 11C1;BBF6;1106 1174 11C1;
+BBF7;BBF7;1106 1174 11C2;BBF7;1106 1174 11C2;
+BBF8;BBF8;1106 1175;BBF8;1106 1175;
+BBF9;BBF9;1106 1175 11A8;BBF9;1106 1175 11A8;
+BBFA;BBFA;1106 1175 11A9;BBFA;1106 1175 11A9;
+BBFB;BBFB;1106 1175 11AA;BBFB;1106 1175 11AA;
+BBFC;BBFC;1106 1175 11AB;BBFC;1106 1175 11AB;
+BBFD;BBFD;1106 1175 11AC;BBFD;1106 1175 11AC;
+BBFE;BBFE;1106 1175 11AD;BBFE;1106 1175 11AD;
+BBFF;BBFF;1106 1175 11AE;BBFF;1106 1175 11AE;
+BC00;BC00;1106 1175 11AF;BC00;1106 1175 11AF;
+BC01;BC01;1106 1175 11B0;BC01;1106 1175 11B0;
+BC02;BC02;1106 1175 11B1;BC02;1106 1175 11B1;
+BC03;BC03;1106 1175 11B2;BC03;1106 1175 11B2;
+BC04;BC04;1106 1175 11B3;BC04;1106 1175 11B3;
+BC05;BC05;1106 1175 11B4;BC05;1106 1175 11B4;
+BC06;BC06;1106 1175 11B5;BC06;1106 1175 11B5;
+BC07;BC07;1106 1175 11B6;BC07;1106 1175 11B6;
+BC08;BC08;1106 1175 11B7;BC08;1106 1175 11B7;
+BC09;BC09;1106 1175 11B8;BC09;1106 1175 11B8;
+BC0A;BC0A;1106 1175 11B9;BC0A;1106 1175 11B9;
+BC0B;BC0B;1106 1175 11BA;BC0B;1106 1175 11BA;
+BC0C;BC0C;1106 1175 11BB;BC0C;1106 1175 11BB;
+BC0D;BC0D;1106 1175 11BC;BC0D;1106 1175 11BC;
+BC0E;BC0E;1106 1175 11BD;BC0E;1106 1175 11BD;
+BC0F;BC0F;1106 1175 11BE;BC0F;1106 1175 11BE;
+BC10;BC10;1106 1175 11BF;BC10;1106 1175 11BF;
+BC11;BC11;1106 1175 11C0;BC11;1106 1175 11C0;
+BC12;BC12;1106 1175 11C1;BC12;1106 1175 11C1;
+BC13;BC13;1106 1175 11C2;BC13;1106 1175 11C2;
+BC14;BC14;1107 1161;BC14;1107 1161;
+BC15;BC15;1107 1161 11A8;BC15;1107 1161 11A8;
+BC16;BC16;1107 1161 11A9;BC16;1107 1161 11A9;
+BC17;BC17;1107 1161 11AA;BC17;1107 1161 11AA;
+BC18;BC18;1107 1161 11AB;BC18;1107 1161 11AB;
+BC19;BC19;1107 1161 11AC;BC19;1107 1161 11AC;
+BC1A;BC1A;1107 1161 11AD;BC1A;1107 1161 11AD;
+BC1B;BC1B;1107 1161 11AE;BC1B;1107 1161 11AE;
+BC1C;BC1C;1107 1161 11AF;BC1C;1107 1161 11AF;
+BC1D;BC1D;1107 1161 11B0;BC1D;1107 1161 11B0;
+BC1E;BC1E;1107 1161 11B1;BC1E;1107 1161 11B1;
+BC1F;BC1F;1107 1161 11B2;BC1F;1107 1161 11B2;
+BC20;BC20;1107 1161 11B3;BC20;1107 1161 11B3;
+BC21;BC21;1107 1161 11B4;BC21;1107 1161 11B4;
+BC22;BC22;1107 1161 11B5;BC22;1107 1161 11B5;
+BC23;BC23;1107 1161 11B6;BC23;1107 1161 11B6;
+BC24;BC24;1107 1161 11B7;BC24;1107 1161 11B7;
+BC25;BC25;1107 1161 11B8;BC25;1107 1161 11B8;
+BC26;BC26;1107 1161 11B9;BC26;1107 1161 11B9;
+BC27;BC27;1107 1161 11BA;BC27;1107 1161 11BA;
+BC28;BC28;1107 1161 11BB;BC28;1107 1161 11BB;
+BC29;BC29;1107 1161 11BC;BC29;1107 1161 11BC;
+BC2A;BC2A;1107 1161 11BD;BC2A;1107 1161 11BD;
+BC2B;BC2B;1107 1161 11BE;BC2B;1107 1161 11BE;
+BC2C;BC2C;1107 1161 11BF;BC2C;1107 1161 11BF;
+BC2D;BC2D;1107 1161 11C0;BC2D;1107 1161 11C0;
+BC2E;BC2E;1107 1161 11C1;BC2E;1107 1161 11C1;
+BC2F;BC2F;1107 1161 11C2;BC2F;1107 1161 11C2;
+BC30;BC30;1107 1162;BC30;1107 1162;
+BC31;BC31;1107 1162 11A8;BC31;1107 1162 11A8;
+BC32;BC32;1107 1162 11A9;BC32;1107 1162 11A9;
+BC33;BC33;1107 1162 11AA;BC33;1107 1162 11AA;
+BC34;BC34;1107 1162 11AB;BC34;1107 1162 11AB;
+BC35;BC35;1107 1162 11AC;BC35;1107 1162 11AC;
+BC36;BC36;1107 1162 11AD;BC36;1107 1162 11AD;
+BC37;BC37;1107 1162 11AE;BC37;1107 1162 11AE;
+BC38;BC38;1107 1162 11AF;BC38;1107 1162 11AF;
+BC39;BC39;1107 1162 11B0;BC39;1107 1162 11B0;
+BC3A;BC3A;1107 1162 11B1;BC3A;1107 1162 11B1;
+BC3B;BC3B;1107 1162 11B2;BC3B;1107 1162 11B2;
+BC3C;BC3C;1107 1162 11B3;BC3C;1107 1162 11B3;
+BC3D;BC3D;1107 1162 11B4;BC3D;1107 1162 11B4;
+BC3E;BC3E;1107 1162 11B5;BC3E;1107 1162 11B5;
+BC3F;BC3F;1107 1162 11B6;BC3F;1107 1162 11B6;
+BC40;BC40;1107 1162 11B7;BC40;1107 1162 11B7;
+BC41;BC41;1107 1162 11B8;BC41;1107 1162 11B8;
+BC42;BC42;1107 1162 11B9;BC42;1107 1162 11B9;
+BC43;BC43;1107 1162 11BA;BC43;1107 1162 11BA;
+BC44;BC44;1107 1162 11BB;BC44;1107 1162 11BB;
+BC45;BC45;1107 1162 11BC;BC45;1107 1162 11BC;
+BC46;BC46;1107 1162 11BD;BC46;1107 1162 11BD;
+BC47;BC47;1107 1162 11BE;BC47;1107 1162 11BE;
+BC48;BC48;1107 1162 11BF;BC48;1107 1162 11BF;
+BC49;BC49;1107 1162 11C0;BC49;1107 1162 11C0;
+BC4A;BC4A;1107 1162 11C1;BC4A;1107 1162 11C1;
+BC4B;BC4B;1107 1162 11C2;BC4B;1107 1162 11C2;
+BC4C;BC4C;1107 1163;BC4C;1107 1163;
+BC4D;BC4D;1107 1163 11A8;BC4D;1107 1163 11A8;
+BC4E;BC4E;1107 1163 11A9;BC4E;1107 1163 11A9;
+BC4F;BC4F;1107 1163 11AA;BC4F;1107 1163 11AA;
+BC50;BC50;1107 1163 11AB;BC50;1107 1163 11AB;
+BC51;BC51;1107 1163 11AC;BC51;1107 1163 11AC;
+BC52;BC52;1107 1163 11AD;BC52;1107 1163 11AD;
+BC53;BC53;1107 1163 11AE;BC53;1107 1163 11AE;
+BC54;BC54;1107 1163 11AF;BC54;1107 1163 11AF;
+BC55;BC55;1107 1163 11B0;BC55;1107 1163 11B0;
+BC56;BC56;1107 1163 11B1;BC56;1107 1163 11B1;
+BC57;BC57;1107 1163 11B2;BC57;1107 1163 11B2;
+BC58;BC58;1107 1163 11B3;BC58;1107 1163 11B3;
+BC59;BC59;1107 1163 11B4;BC59;1107 1163 11B4;
+BC5A;BC5A;1107 1163 11B5;BC5A;1107 1163 11B5;
+BC5B;BC5B;1107 1163 11B6;BC5B;1107 1163 11B6;
+BC5C;BC5C;1107 1163 11B7;BC5C;1107 1163 11B7;
+BC5D;BC5D;1107 1163 11B8;BC5D;1107 1163 11B8;
+BC5E;BC5E;1107 1163 11B9;BC5E;1107 1163 11B9;
+BC5F;BC5F;1107 1163 11BA;BC5F;1107 1163 11BA;
+BC60;BC60;1107 1163 11BB;BC60;1107 1163 11BB;
+BC61;BC61;1107 1163 11BC;BC61;1107 1163 11BC;
+BC62;BC62;1107 1163 11BD;BC62;1107 1163 11BD;
+BC63;BC63;1107 1163 11BE;BC63;1107 1163 11BE;
+BC64;BC64;1107 1163 11BF;BC64;1107 1163 11BF;
+BC65;BC65;1107 1163 11C0;BC65;1107 1163 11C0;
+BC66;BC66;1107 1163 11C1;BC66;1107 1163 11C1;
+BC67;BC67;1107 1163 11C2;BC67;1107 1163 11C2;
+BC68;BC68;1107 1164;BC68;1107 1164;
+BC69;BC69;1107 1164 11A8;BC69;1107 1164 11A8;
+BC6A;BC6A;1107 1164 11A9;BC6A;1107 1164 11A9;
+BC6B;BC6B;1107 1164 11AA;BC6B;1107 1164 11AA;
+BC6C;BC6C;1107 1164 11AB;BC6C;1107 1164 11AB;
+BC6D;BC6D;1107 1164 11AC;BC6D;1107 1164 11AC;
+BC6E;BC6E;1107 1164 11AD;BC6E;1107 1164 11AD;
+BC6F;BC6F;1107 1164 11AE;BC6F;1107 1164 11AE;
+BC70;BC70;1107 1164 11AF;BC70;1107 1164 11AF;
+BC71;BC71;1107 1164 11B0;BC71;1107 1164 11B0;
+BC72;BC72;1107 1164 11B1;BC72;1107 1164 11B1;
+BC73;BC73;1107 1164 11B2;BC73;1107 1164 11B2;
+BC74;BC74;1107 1164 11B3;BC74;1107 1164 11B3;
+BC75;BC75;1107 1164 11B4;BC75;1107 1164 11B4;
+BC76;BC76;1107 1164 11B5;BC76;1107 1164 11B5;
+BC77;BC77;1107 1164 11B6;BC77;1107 1164 11B6;
+BC78;BC78;1107 1164 11B7;BC78;1107 1164 11B7;
+BC79;BC79;1107 1164 11B8;BC79;1107 1164 11B8;
+BC7A;BC7A;1107 1164 11B9;BC7A;1107 1164 11B9;
+BC7B;BC7B;1107 1164 11BA;BC7B;1107 1164 11BA;
+BC7C;BC7C;1107 1164 11BB;BC7C;1107 1164 11BB;
+BC7D;BC7D;1107 1164 11BC;BC7D;1107 1164 11BC;
+BC7E;BC7E;1107 1164 11BD;BC7E;1107 1164 11BD;
+BC7F;BC7F;1107 1164 11BE;BC7F;1107 1164 11BE;
+BC80;BC80;1107 1164 11BF;BC80;1107 1164 11BF;
+BC81;BC81;1107 1164 11C0;BC81;1107 1164 11C0;
+BC82;BC82;1107 1164 11C1;BC82;1107 1164 11C1;
+BC83;BC83;1107 1164 11C2;BC83;1107 1164 11C2;
+BC84;BC84;1107 1165;BC84;1107 1165;
+BC85;BC85;1107 1165 11A8;BC85;1107 1165 11A8;
+BC86;BC86;1107 1165 11A9;BC86;1107 1165 11A9;
+BC87;BC87;1107 1165 11AA;BC87;1107 1165 11AA;
+BC88;BC88;1107 1165 11AB;BC88;1107 1165 11AB;
+BC89;BC89;1107 1165 11AC;BC89;1107 1165 11AC;
+BC8A;BC8A;1107 1165 11AD;BC8A;1107 1165 11AD;
+BC8B;BC8B;1107 1165 11AE;BC8B;1107 1165 11AE;
+BC8C;BC8C;1107 1165 11AF;BC8C;1107 1165 11AF;
+BC8D;BC8D;1107 1165 11B0;BC8D;1107 1165 11B0;
+BC8E;BC8E;1107 1165 11B1;BC8E;1107 1165 11B1;
+BC8F;BC8F;1107 1165 11B2;BC8F;1107 1165 11B2;
+BC90;BC90;1107 1165 11B3;BC90;1107 1165 11B3;
+BC91;BC91;1107 1165 11B4;BC91;1107 1165 11B4;
+BC92;BC92;1107 1165 11B5;BC92;1107 1165 11B5;
+BC93;BC93;1107 1165 11B6;BC93;1107 1165 11B6;
+BC94;BC94;1107 1165 11B7;BC94;1107 1165 11B7;
+BC95;BC95;1107 1165 11B8;BC95;1107 1165 11B8;
+BC96;BC96;1107 1165 11B9;BC96;1107 1165 11B9;
+BC97;BC97;1107 1165 11BA;BC97;1107 1165 11BA;
+BC98;BC98;1107 1165 11BB;BC98;1107 1165 11BB;
+BC99;BC99;1107 1165 11BC;BC99;1107 1165 11BC;
+BC9A;BC9A;1107 1165 11BD;BC9A;1107 1165 11BD;
+BC9B;BC9B;1107 1165 11BE;BC9B;1107 1165 11BE;
+BC9C;BC9C;1107 1165 11BF;BC9C;1107 1165 11BF;
+BC9D;BC9D;1107 1165 11C0;BC9D;1107 1165 11C0;
+BC9E;BC9E;1107 1165 11C1;BC9E;1107 1165 11C1;
+BC9F;BC9F;1107 1165 11C2;BC9F;1107 1165 11C2;
+BCA0;BCA0;1107 1166;BCA0;1107 1166;
+BCA1;BCA1;1107 1166 11A8;BCA1;1107 1166 11A8;
+BCA2;BCA2;1107 1166 11A9;BCA2;1107 1166 11A9;
+BCA3;BCA3;1107 1166 11AA;BCA3;1107 1166 11AA;
+BCA4;BCA4;1107 1166 11AB;BCA4;1107 1166 11AB;
+BCA5;BCA5;1107 1166 11AC;BCA5;1107 1166 11AC;
+BCA6;BCA6;1107 1166 11AD;BCA6;1107 1166 11AD;
+BCA7;BCA7;1107 1166 11AE;BCA7;1107 1166 11AE;
+BCA8;BCA8;1107 1166 11AF;BCA8;1107 1166 11AF;
+BCA9;BCA9;1107 1166 11B0;BCA9;1107 1166 11B0;
+BCAA;BCAA;1107 1166 11B1;BCAA;1107 1166 11B1;
+BCAB;BCAB;1107 1166 11B2;BCAB;1107 1166 11B2;
+BCAC;BCAC;1107 1166 11B3;BCAC;1107 1166 11B3;
+BCAD;BCAD;1107 1166 11B4;BCAD;1107 1166 11B4;
+BCAE;BCAE;1107 1166 11B5;BCAE;1107 1166 11B5;
+BCAF;BCAF;1107 1166 11B6;BCAF;1107 1166 11B6;
+BCB0;BCB0;1107 1166 11B7;BCB0;1107 1166 11B7;
+BCB1;BCB1;1107 1166 11B8;BCB1;1107 1166 11B8;
+BCB2;BCB2;1107 1166 11B9;BCB2;1107 1166 11B9;
+BCB3;BCB3;1107 1166 11BA;BCB3;1107 1166 11BA;
+BCB4;BCB4;1107 1166 11BB;BCB4;1107 1166 11BB;
+BCB5;BCB5;1107 1166 11BC;BCB5;1107 1166 11BC;
+BCB6;BCB6;1107 1166 11BD;BCB6;1107 1166 11BD;
+BCB7;BCB7;1107 1166 11BE;BCB7;1107 1166 11BE;
+BCB8;BCB8;1107 1166 11BF;BCB8;1107 1166 11BF;
+BCB9;BCB9;1107 1166 11C0;BCB9;1107 1166 11C0;
+BCBA;BCBA;1107 1166 11C1;BCBA;1107 1166 11C1;
+BCBB;BCBB;1107 1166 11C2;BCBB;1107 1166 11C2;
+BCBC;BCBC;1107 1167;BCBC;1107 1167;
+BCBD;BCBD;1107 1167 11A8;BCBD;1107 1167 11A8;
+BCBE;BCBE;1107 1167 11A9;BCBE;1107 1167 11A9;
+BCBF;BCBF;1107 1167 11AA;BCBF;1107 1167 11AA;
+BCC0;BCC0;1107 1167 11AB;BCC0;1107 1167 11AB;
+BCC1;BCC1;1107 1167 11AC;BCC1;1107 1167 11AC;
+BCC2;BCC2;1107 1167 11AD;BCC2;1107 1167 11AD;
+BCC3;BCC3;1107 1167 11AE;BCC3;1107 1167 11AE;
+BCC4;BCC4;1107 1167 11AF;BCC4;1107 1167 11AF;
+BCC5;BCC5;1107 1167 11B0;BCC5;1107 1167 11B0;
+BCC6;BCC6;1107 1167 11B1;BCC6;1107 1167 11B1;
+BCC7;BCC7;1107 1167 11B2;BCC7;1107 1167 11B2;
+BCC8;BCC8;1107 1167 11B3;BCC8;1107 1167 11B3;
+BCC9;BCC9;1107 1167 11B4;BCC9;1107 1167 11B4;
+BCCA;BCCA;1107 1167 11B5;BCCA;1107 1167 11B5;
+BCCB;BCCB;1107 1167 11B6;BCCB;1107 1167 11B6;
+BCCC;BCCC;1107 1167 11B7;BCCC;1107 1167 11B7;
+BCCD;BCCD;1107 1167 11B8;BCCD;1107 1167 11B8;
+BCCE;BCCE;1107 1167 11B9;BCCE;1107 1167 11B9;
+BCCF;BCCF;1107 1167 11BA;BCCF;1107 1167 11BA;
+BCD0;BCD0;1107 1167 11BB;BCD0;1107 1167 11BB;
+BCD1;BCD1;1107 1167 11BC;BCD1;1107 1167 11BC;
+BCD2;BCD2;1107 1167 11BD;BCD2;1107 1167 11BD;
+BCD3;BCD3;1107 1167 11BE;BCD3;1107 1167 11BE;
+BCD4;BCD4;1107 1167 11BF;BCD4;1107 1167 11BF;
+BCD5;BCD5;1107 1167 11C0;BCD5;1107 1167 11C0;
+BCD6;BCD6;1107 1167 11C1;BCD6;1107 1167 11C1;
+BCD7;BCD7;1107 1167 11C2;BCD7;1107 1167 11C2;
+BCD8;BCD8;1107 1168;BCD8;1107 1168;
+BCD9;BCD9;1107 1168 11A8;BCD9;1107 1168 11A8;
+BCDA;BCDA;1107 1168 11A9;BCDA;1107 1168 11A9;
+BCDB;BCDB;1107 1168 11AA;BCDB;1107 1168 11AA;
+BCDC;BCDC;1107 1168 11AB;BCDC;1107 1168 11AB;
+BCDD;BCDD;1107 1168 11AC;BCDD;1107 1168 11AC;
+BCDE;BCDE;1107 1168 11AD;BCDE;1107 1168 11AD;
+BCDF;BCDF;1107 1168 11AE;BCDF;1107 1168 11AE;
+BCE0;BCE0;1107 1168 11AF;BCE0;1107 1168 11AF;
+BCE1;BCE1;1107 1168 11B0;BCE1;1107 1168 11B0;
+BCE2;BCE2;1107 1168 11B1;BCE2;1107 1168 11B1;
+BCE3;BCE3;1107 1168 11B2;BCE3;1107 1168 11B2;
+BCE4;BCE4;1107 1168 11B3;BCE4;1107 1168 11B3;
+BCE5;BCE5;1107 1168 11B4;BCE5;1107 1168 11B4;
+BCE6;BCE6;1107 1168 11B5;BCE6;1107 1168 11B5;
+BCE7;BCE7;1107 1168 11B6;BCE7;1107 1168 11B6;
+BCE8;BCE8;1107 1168 11B7;BCE8;1107 1168 11B7;
+BCE9;BCE9;1107 1168 11B8;BCE9;1107 1168 11B8;
+BCEA;BCEA;1107 1168 11B9;BCEA;1107 1168 11B9;
+BCEB;BCEB;1107 1168 11BA;BCEB;1107 1168 11BA;
+BCEC;BCEC;1107 1168 11BB;BCEC;1107 1168 11BB;
+BCED;BCED;1107 1168 11BC;BCED;1107 1168 11BC;
+BCEE;BCEE;1107 1168 11BD;BCEE;1107 1168 11BD;
+BCEF;BCEF;1107 1168 11BE;BCEF;1107 1168 11BE;
+BCF0;BCF0;1107 1168 11BF;BCF0;1107 1168 11BF;
+BCF1;BCF1;1107 1168 11C0;BCF1;1107 1168 11C0;
+BCF2;BCF2;1107 1168 11C1;BCF2;1107 1168 11C1;
+BCF3;BCF3;1107 1168 11C2;BCF3;1107 1168 11C2;
+BCF4;BCF4;1107 1169;BCF4;1107 1169;
+BCF5;BCF5;1107 1169 11A8;BCF5;1107 1169 11A8;
+BCF6;BCF6;1107 1169 11A9;BCF6;1107 1169 11A9;
+BCF7;BCF7;1107 1169 11AA;BCF7;1107 1169 11AA;
+BCF8;BCF8;1107 1169 11AB;BCF8;1107 1169 11AB;
+BCF9;BCF9;1107 1169 11AC;BCF9;1107 1169 11AC;
+BCFA;BCFA;1107 1169 11AD;BCFA;1107 1169 11AD;
+BCFB;BCFB;1107 1169 11AE;BCFB;1107 1169 11AE;
+BCFC;BCFC;1107 1169 11AF;BCFC;1107 1169 11AF;
+BCFD;BCFD;1107 1169 11B0;BCFD;1107 1169 11B0;
+BCFE;BCFE;1107 1169 11B1;BCFE;1107 1169 11B1;
+BCFF;BCFF;1107 1169 11B2;BCFF;1107 1169 11B2;
+BD00;BD00;1107 1169 11B3;BD00;1107 1169 11B3;
+BD01;BD01;1107 1169 11B4;BD01;1107 1169 11B4;
+BD02;BD02;1107 1169 11B5;BD02;1107 1169 11B5;
+BD03;BD03;1107 1169 11B6;BD03;1107 1169 11B6;
+BD04;BD04;1107 1169 11B7;BD04;1107 1169 11B7;
+BD05;BD05;1107 1169 11B8;BD05;1107 1169 11B8;
+BD06;BD06;1107 1169 11B9;BD06;1107 1169 11B9;
+BD07;BD07;1107 1169 11BA;BD07;1107 1169 11BA;
+BD08;BD08;1107 1169 11BB;BD08;1107 1169 11BB;
+BD09;BD09;1107 1169 11BC;BD09;1107 1169 11BC;
+BD0A;BD0A;1107 1169 11BD;BD0A;1107 1169 11BD;
+BD0B;BD0B;1107 1169 11BE;BD0B;1107 1169 11BE;
+BD0C;BD0C;1107 1169 11BF;BD0C;1107 1169 11BF;
+BD0D;BD0D;1107 1169 11C0;BD0D;1107 1169 11C0;
+BD0E;BD0E;1107 1169 11C1;BD0E;1107 1169 11C1;
+BD0F;BD0F;1107 1169 11C2;BD0F;1107 1169 11C2;
+BD10;BD10;1107 116A;BD10;1107 116A;
+BD11;BD11;1107 116A 11A8;BD11;1107 116A 11A8;
+BD12;BD12;1107 116A 11A9;BD12;1107 116A 11A9;
+BD13;BD13;1107 116A 11AA;BD13;1107 116A 11AA;
+BD14;BD14;1107 116A 11AB;BD14;1107 116A 11AB;
+BD15;BD15;1107 116A 11AC;BD15;1107 116A 11AC;
+BD16;BD16;1107 116A 11AD;BD16;1107 116A 11AD;
+BD17;BD17;1107 116A 11AE;BD17;1107 116A 11AE;
+BD18;BD18;1107 116A 11AF;BD18;1107 116A 11AF;
+BD19;BD19;1107 116A 11B0;BD19;1107 116A 11B0;
+BD1A;BD1A;1107 116A 11B1;BD1A;1107 116A 11B1;
+BD1B;BD1B;1107 116A 11B2;BD1B;1107 116A 11B2;
+BD1C;BD1C;1107 116A 11B3;BD1C;1107 116A 11B3;
+BD1D;BD1D;1107 116A 11B4;BD1D;1107 116A 11B4;
+BD1E;BD1E;1107 116A 11B5;BD1E;1107 116A 11B5;
+BD1F;BD1F;1107 116A 11B6;BD1F;1107 116A 11B6;
+BD20;BD20;1107 116A 11B7;BD20;1107 116A 11B7;
+BD21;BD21;1107 116A 11B8;BD21;1107 116A 11B8;
+BD22;BD22;1107 116A 11B9;BD22;1107 116A 11B9;
+BD23;BD23;1107 116A 11BA;BD23;1107 116A 11BA;
+BD24;BD24;1107 116A 11BB;BD24;1107 116A 11BB;
+BD25;BD25;1107 116A 11BC;BD25;1107 116A 11BC;
+BD26;BD26;1107 116A 11BD;BD26;1107 116A 11BD;
+BD27;BD27;1107 116A 11BE;BD27;1107 116A 11BE;
+BD28;BD28;1107 116A 11BF;BD28;1107 116A 11BF;
+BD29;BD29;1107 116A 11C0;BD29;1107 116A 11C0;
+BD2A;BD2A;1107 116A 11C1;BD2A;1107 116A 11C1;
+BD2B;BD2B;1107 116A 11C2;BD2B;1107 116A 11C2;
+BD2C;BD2C;1107 116B;BD2C;1107 116B;
+BD2D;BD2D;1107 116B 11A8;BD2D;1107 116B 11A8;
+BD2E;BD2E;1107 116B 11A9;BD2E;1107 116B 11A9;
+BD2F;BD2F;1107 116B 11AA;BD2F;1107 116B 11AA;
+BD30;BD30;1107 116B 11AB;BD30;1107 116B 11AB;
+BD31;BD31;1107 116B 11AC;BD31;1107 116B 11AC;
+BD32;BD32;1107 116B 11AD;BD32;1107 116B 11AD;
+BD33;BD33;1107 116B 11AE;BD33;1107 116B 11AE;
+BD34;BD34;1107 116B 11AF;BD34;1107 116B 11AF;
+BD35;BD35;1107 116B 11B0;BD35;1107 116B 11B0;
+BD36;BD36;1107 116B 11B1;BD36;1107 116B 11B1;
+BD37;BD37;1107 116B 11B2;BD37;1107 116B 11B2;
+BD38;BD38;1107 116B 11B3;BD38;1107 116B 11B3;
+BD39;BD39;1107 116B 11B4;BD39;1107 116B 11B4;
+BD3A;BD3A;1107 116B 11B5;BD3A;1107 116B 11B5;
+BD3B;BD3B;1107 116B 11B6;BD3B;1107 116B 11B6;
+BD3C;BD3C;1107 116B 11B7;BD3C;1107 116B 11B7;
+BD3D;BD3D;1107 116B 11B8;BD3D;1107 116B 11B8;
+BD3E;BD3E;1107 116B 11B9;BD3E;1107 116B 11B9;
+BD3F;BD3F;1107 116B 11BA;BD3F;1107 116B 11BA;
+BD40;BD40;1107 116B 11BB;BD40;1107 116B 11BB;
+BD41;BD41;1107 116B 11BC;BD41;1107 116B 11BC;
+BD42;BD42;1107 116B 11BD;BD42;1107 116B 11BD;
+BD43;BD43;1107 116B 11BE;BD43;1107 116B 11BE;
+BD44;BD44;1107 116B 11BF;BD44;1107 116B 11BF;
+BD45;BD45;1107 116B 11C0;BD45;1107 116B 11C0;
+BD46;BD46;1107 116B 11C1;BD46;1107 116B 11C1;
+BD47;BD47;1107 116B 11C2;BD47;1107 116B 11C2;
+BD48;BD48;1107 116C;BD48;1107 116C;
+BD49;BD49;1107 116C 11A8;BD49;1107 116C 11A8;
+BD4A;BD4A;1107 116C 11A9;BD4A;1107 116C 11A9;
+BD4B;BD4B;1107 116C 11AA;BD4B;1107 116C 11AA;
+BD4C;BD4C;1107 116C 11AB;BD4C;1107 116C 11AB;
+BD4D;BD4D;1107 116C 11AC;BD4D;1107 116C 11AC;
+BD4E;BD4E;1107 116C 11AD;BD4E;1107 116C 11AD;
+BD4F;BD4F;1107 116C 11AE;BD4F;1107 116C 11AE;
+BD50;BD50;1107 116C 11AF;BD50;1107 116C 11AF;
+BD51;BD51;1107 116C 11B0;BD51;1107 116C 11B0;
+BD52;BD52;1107 116C 11B1;BD52;1107 116C 11B1;
+BD53;BD53;1107 116C 11B2;BD53;1107 116C 11B2;
+BD54;BD54;1107 116C 11B3;BD54;1107 116C 11B3;
+BD55;BD55;1107 116C 11B4;BD55;1107 116C 11B4;
+BD56;BD56;1107 116C 11B5;BD56;1107 116C 11B5;
+BD57;BD57;1107 116C 11B6;BD57;1107 116C 11B6;
+BD58;BD58;1107 116C 11B7;BD58;1107 116C 11B7;
+BD59;BD59;1107 116C 11B8;BD59;1107 116C 11B8;
+BD5A;BD5A;1107 116C 11B9;BD5A;1107 116C 11B9;
+BD5B;BD5B;1107 116C 11BA;BD5B;1107 116C 11BA;
+BD5C;BD5C;1107 116C 11BB;BD5C;1107 116C 11BB;
+BD5D;BD5D;1107 116C 11BC;BD5D;1107 116C 11BC;
+BD5E;BD5E;1107 116C 11BD;BD5E;1107 116C 11BD;
+BD5F;BD5F;1107 116C 11BE;BD5F;1107 116C 11BE;
+BD60;BD60;1107 116C 11BF;BD60;1107 116C 11BF;
+BD61;BD61;1107 116C 11C0;BD61;1107 116C 11C0;
+BD62;BD62;1107 116C 11C1;BD62;1107 116C 11C1;
+BD63;BD63;1107 116C 11C2;BD63;1107 116C 11C2;
+BD64;BD64;1107 116D;BD64;1107 116D;
+BD65;BD65;1107 116D 11A8;BD65;1107 116D 11A8;
+BD66;BD66;1107 116D 11A9;BD66;1107 116D 11A9;
+BD67;BD67;1107 116D 11AA;BD67;1107 116D 11AA;
+BD68;BD68;1107 116D 11AB;BD68;1107 116D 11AB;
+BD69;BD69;1107 116D 11AC;BD69;1107 116D 11AC;
+BD6A;BD6A;1107 116D 11AD;BD6A;1107 116D 11AD;
+BD6B;BD6B;1107 116D 11AE;BD6B;1107 116D 11AE;
+BD6C;BD6C;1107 116D 11AF;BD6C;1107 116D 11AF;
+BD6D;BD6D;1107 116D 11B0;BD6D;1107 116D 11B0;
+BD6E;BD6E;1107 116D 11B1;BD6E;1107 116D 11B1;
+BD6F;BD6F;1107 116D 11B2;BD6F;1107 116D 11B2;
+BD70;BD70;1107 116D 11B3;BD70;1107 116D 11B3;
+BD71;BD71;1107 116D 11B4;BD71;1107 116D 11B4;
+BD72;BD72;1107 116D 11B5;BD72;1107 116D 11B5;
+BD73;BD73;1107 116D 11B6;BD73;1107 116D 11B6;
+BD74;BD74;1107 116D 11B7;BD74;1107 116D 11B7;
+BD75;BD75;1107 116D 11B8;BD75;1107 116D 11B8;
+BD76;BD76;1107 116D 11B9;BD76;1107 116D 11B9;
+BD77;BD77;1107 116D 11BA;BD77;1107 116D 11BA;
+BD78;BD78;1107 116D 11BB;BD78;1107 116D 11BB;
+BD79;BD79;1107 116D 11BC;BD79;1107 116D 11BC;
+BD7A;BD7A;1107 116D 11BD;BD7A;1107 116D 11BD;
+BD7B;BD7B;1107 116D 11BE;BD7B;1107 116D 11BE;
+BD7C;BD7C;1107 116D 11BF;BD7C;1107 116D 11BF;
+BD7D;BD7D;1107 116D 11C0;BD7D;1107 116D 11C0;
+BD7E;BD7E;1107 116D 11C1;BD7E;1107 116D 11C1;
+BD7F;BD7F;1107 116D 11C2;BD7F;1107 116D 11C2;
+BD80;BD80;1107 116E;BD80;1107 116E;
+BD81;BD81;1107 116E 11A8;BD81;1107 116E 11A8;
+BD82;BD82;1107 116E 11A9;BD82;1107 116E 11A9;
+BD83;BD83;1107 116E 11AA;BD83;1107 116E 11AA;
+BD84;BD84;1107 116E 11AB;BD84;1107 116E 11AB;
+BD85;BD85;1107 116E 11AC;BD85;1107 116E 11AC;
+BD86;BD86;1107 116E 11AD;BD86;1107 116E 11AD;
+BD87;BD87;1107 116E 11AE;BD87;1107 116E 11AE;
+BD88;BD88;1107 116E 11AF;BD88;1107 116E 11AF;
+BD89;BD89;1107 116E 11B0;BD89;1107 116E 11B0;
+BD8A;BD8A;1107 116E 11B1;BD8A;1107 116E 11B1;
+BD8B;BD8B;1107 116E 11B2;BD8B;1107 116E 11B2;
+BD8C;BD8C;1107 116E 11B3;BD8C;1107 116E 11B3;
+BD8D;BD8D;1107 116E 11B4;BD8D;1107 116E 11B4;
+BD8E;BD8E;1107 116E 11B5;BD8E;1107 116E 11B5;
+BD8F;BD8F;1107 116E 11B6;BD8F;1107 116E 11B6;
+BD90;BD90;1107 116E 11B7;BD90;1107 116E 11B7;
+BD91;BD91;1107 116E 11B8;BD91;1107 116E 11B8;
+BD92;BD92;1107 116E 11B9;BD92;1107 116E 11B9;
+BD93;BD93;1107 116E 11BA;BD93;1107 116E 11BA;
+BD94;BD94;1107 116E 11BB;BD94;1107 116E 11BB;
+BD95;BD95;1107 116E 11BC;BD95;1107 116E 11BC;
+BD96;BD96;1107 116E 11BD;BD96;1107 116E 11BD;
+BD97;BD97;1107 116E 11BE;BD97;1107 116E 11BE;
+BD98;BD98;1107 116E 11BF;BD98;1107 116E 11BF;
+BD99;BD99;1107 116E 11C0;BD99;1107 116E 11C0;
+BD9A;BD9A;1107 116E 11C1;BD9A;1107 116E 11C1;
+BD9B;BD9B;1107 116E 11C2;BD9B;1107 116E 11C2;
+BD9C;BD9C;1107 116F;BD9C;1107 116F;
+BD9D;BD9D;1107 116F 11A8;BD9D;1107 116F 11A8;
+BD9E;BD9E;1107 116F 11A9;BD9E;1107 116F 11A9;
+BD9F;BD9F;1107 116F 11AA;BD9F;1107 116F 11AA;
+BDA0;BDA0;1107 116F 11AB;BDA0;1107 116F 11AB;
+BDA1;BDA1;1107 116F 11AC;BDA1;1107 116F 11AC;
+BDA2;BDA2;1107 116F 11AD;BDA2;1107 116F 11AD;
+BDA3;BDA3;1107 116F 11AE;BDA3;1107 116F 11AE;
+BDA4;BDA4;1107 116F 11AF;BDA4;1107 116F 11AF;
+BDA5;BDA5;1107 116F 11B0;BDA5;1107 116F 11B0;
+BDA6;BDA6;1107 116F 11B1;BDA6;1107 116F 11B1;
+BDA7;BDA7;1107 116F 11B2;BDA7;1107 116F 11B2;
+BDA8;BDA8;1107 116F 11B3;BDA8;1107 116F 11B3;
+BDA9;BDA9;1107 116F 11B4;BDA9;1107 116F 11B4;
+BDAA;BDAA;1107 116F 11B5;BDAA;1107 116F 11B5;
+BDAB;BDAB;1107 116F 11B6;BDAB;1107 116F 11B6;
+BDAC;BDAC;1107 116F 11B7;BDAC;1107 116F 11B7;
+BDAD;BDAD;1107 116F 11B8;BDAD;1107 116F 11B8;
+BDAE;BDAE;1107 116F 11B9;BDAE;1107 116F 11B9;
+BDAF;BDAF;1107 116F 11BA;BDAF;1107 116F 11BA;
+BDB0;BDB0;1107 116F 11BB;BDB0;1107 116F 11BB;
+BDB1;BDB1;1107 116F 11BC;BDB1;1107 116F 11BC;
+BDB2;BDB2;1107 116F 11BD;BDB2;1107 116F 11BD;
+BDB3;BDB3;1107 116F 11BE;BDB3;1107 116F 11BE;
+BDB4;BDB4;1107 116F 11BF;BDB4;1107 116F 11BF;
+BDB5;BDB5;1107 116F 11C0;BDB5;1107 116F 11C0;
+BDB6;BDB6;1107 116F 11C1;BDB6;1107 116F 11C1;
+BDB7;BDB7;1107 116F 11C2;BDB7;1107 116F 11C2;
+BDB8;BDB8;1107 1170;BDB8;1107 1170;
+BDB9;BDB9;1107 1170 11A8;BDB9;1107 1170 11A8;
+BDBA;BDBA;1107 1170 11A9;BDBA;1107 1170 11A9;
+BDBB;BDBB;1107 1170 11AA;BDBB;1107 1170 11AA;
+BDBC;BDBC;1107 1170 11AB;BDBC;1107 1170 11AB;
+BDBD;BDBD;1107 1170 11AC;BDBD;1107 1170 11AC;
+BDBE;BDBE;1107 1170 11AD;BDBE;1107 1170 11AD;
+BDBF;BDBF;1107 1170 11AE;BDBF;1107 1170 11AE;
+BDC0;BDC0;1107 1170 11AF;BDC0;1107 1170 11AF;
+BDC1;BDC1;1107 1170 11B0;BDC1;1107 1170 11B0;
+BDC2;BDC2;1107 1170 11B1;BDC2;1107 1170 11B1;
+BDC3;BDC3;1107 1170 11B2;BDC3;1107 1170 11B2;
+BDC4;BDC4;1107 1170 11B3;BDC4;1107 1170 11B3;
+BDC5;BDC5;1107 1170 11B4;BDC5;1107 1170 11B4;
+BDC6;BDC6;1107 1170 11B5;BDC6;1107 1170 11B5;
+BDC7;BDC7;1107 1170 11B6;BDC7;1107 1170 11B6;
+BDC8;BDC8;1107 1170 11B7;BDC8;1107 1170 11B7;
+BDC9;BDC9;1107 1170 11B8;BDC9;1107 1170 11B8;
+BDCA;BDCA;1107 1170 11B9;BDCA;1107 1170 11B9;
+BDCB;BDCB;1107 1170 11BA;BDCB;1107 1170 11BA;
+BDCC;BDCC;1107 1170 11BB;BDCC;1107 1170 11BB;
+BDCD;BDCD;1107 1170 11BC;BDCD;1107 1170 11BC;
+BDCE;BDCE;1107 1170 11BD;BDCE;1107 1170 11BD;
+BDCF;BDCF;1107 1170 11BE;BDCF;1107 1170 11BE;
+BDD0;BDD0;1107 1170 11BF;BDD0;1107 1170 11BF;
+BDD1;BDD1;1107 1170 11C0;BDD1;1107 1170 11C0;
+BDD2;BDD2;1107 1170 11C1;BDD2;1107 1170 11C1;
+BDD3;BDD3;1107 1170 11C2;BDD3;1107 1170 11C2;
+BDD4;BDD4;1107 1171;BDD4;1107 1171;
+BDD5;BDD5;1107 1171 11A8;BDD5;1107 1171 11A8;
+BDD6;BDD6;1107 1171 11A9;BDD6;1107 1171 11A9;
+BDD7;BDD7;1107 1171 11AA;BDD7;1107 1171 11AA;
+BDD8;BDD8;1107 1171 11AB;BDD8;1107 1171 11AB;
+BDD9;BDD9;1107 1171 11AC;BDD9;1107 1171 11AC;
+BDDA;BDDA;1107 1171 11AD;BDDA;1107 1171 11AD;
+BDDB;BDDB;1107 1171 11AE;BDDB;1107 1171 11AE;
+BDDC;BDDC;1107 1171 11AF;BDDC;1107 1171 11AF;
+BDDD;BDDD;1107 1171 11B0;BDDD;1107 1171 11B0;
+BDDE;BDDE;1107 1171 11B1;BDDE;1107 1171 11B1;
+BDDF;BDDF;1107 1171 11B2;BDDF;1107 1171 11B2;
+BDE0;BDE0;1107 1171 11B3;BDE0;1107 1171 11B3;
+BDE1;BDE1;1107 1171 11B4;BDE1;1107 1171 11B4;
+BDE2;BDE2;1107 1171 11B5;BDE2;1107 1171 11B5;
+BDE3;BDE3;1107 1171 11B6;BDE3;1107 1171 11B6;
+BDE4;BDE4;1107 1171 11B7;BDE4;1107 1171 11B7;
+BDE5;BDE5;1107 1171 11B8;BDE5;1107 1171 11B8;
+BDE6;BDE6;1107 1171 11B9;BDE6;1107 1171 11B9;
+BDE7;BDE7;1107 1171 11BA;BDE7;1107 1171 11BA;
+BDE8;BDE8;1107 1171 11BB;BDE8;1107 1171 11BB;
+BDE9;BDE9;1107 1171 11BC;BDE9;1107 1171 11BC;
+BDEA;BDEA;1107 1171 11BD;BDEA;1107 1171 11BD;
+BDEB;BDEB;1107 1171 11BE;BDEB;1107 1171 11BE;
+BDEC;BDEC;1107 1171 11BF;BDEC;1107 1171 11BF;
+BDED;BDED;1107 1171 11C0;BDED;1107 1171 11C0;
+BDEE;BDEE;1107 1171 11C1;BDEE;1107 1171 11C1;
+BDEF;BDEF;1107 1171 11C2;BDEF;1107 1171 11C2;
+BDF0;BDF0;1107 1172;BDF0;1107 1172;
+BDF1;BDF1;1107 1172 11A8;BDF1;1107 1172 11A8;
+BDF2;BDF2;1107 1172 11A9;BDF2;1107 1172 11A9;
+BDF3;BDF3;1107 1172 11AA;BDF3;1107 1172 11AA;
+BDF4;BDF4;1107 1172 11AB;BDF4;1107 1172 11AB;
+BDF5;BDF5;1107 1172 11AC;BDF5;1107 1172 11AC;
+BDF6;BDF6;1107 1172 11AD;BDF6;1107 1172 11AD;
+BDF7;BDF7;1107 1172 11AE;BDF7;1107 1172 11AE;
+BDF8;BDF8;1107 1172 11AF;BDF8;1107 1172 11AF;
+BDF9;BDF9;1107 1172 11B0;BDF9;1107 1172 11B0;
+BDFA;BDFA;1107 1172 11B1;BDFA;1107 1172 11B1;
+BDFB;BDFB;1107 1172 11B2;BDFB;1107 1172 11B2;
+BDFC;BDFC;1107 1172 11B3;BDFC;1107 1172 11B3;
+BDFD;BDFD;1107 1172 11B4;BDFD;1107 1172 11B4;
+BDFE;BDFE;1107 1172 11B5;BDFE;1107 1172 11B5;
+BDFF;BDFF;1107 1172 11B6;BDFF;1107 1172 11B6;
+BE00;BE00;1107 1172 11B7;BE00;1107 1172 11B7;
+BE01;BE01;1107 1172 11B8;BE01;1107 1172 11B8;
+BE02;BE02;1107 1172 11B9;BE02;1107 1172 11B9;
+BE03;BE03;1107 1172 11BA;BE03;1107 1172 11BA;
+BE04;BE04;1107 1172 11BB;BE04;1107 1172 11BB;
+BE05;BE05;1107 1172 11BC;BE05;1107 1172 11BC;
+BE06;BE06;1107 1172 11BD;BE06;1107 1172 11BD;
+BE07;BE07;1107 1172 11BE;BE07;1107 1172 11BE;
+BE08;BE08;1107 1172 11BF;BE08;1107 1172 11BF;
+BE09;BE09;1107 1172 11C0;BE09;1107 1172 11C0;
+BE0A;BE0A;1107 1172 11C1;BE0A;1107 1172 11C1;
+BE0B;BE0B;1107 1172 11C2;BE0B;1107 1172 11C2;
+BE0C;BE0C;1107 1173;BE0C;1107 1173;
+BE0D;BE0D;1107 1173 11A8;BE0D;1107 1173 11A8;
+BE0E;BE0E;1107 1173 11A9;BE0E;1107 1173 11A9;
+BE0F;BE0F;1107 1173 11AA;BE0F;1107 1173 11AA;
+BE10;BE10;1107 1173 11AB;BE10;1107 1173 11AB;
+BE11;BE11;1107 1173 11AC;BE11;1107 1173 11AC;
+BE12;BE12;1107 1173 11AD;BE12;1107 1173 11AD;
+BE13;BE13;1107 1173 11AE;BE13;1107 1173 11AE;
+BE14;BE14;1107 1173 11AF;BE14;1107 1173 11AF;
+BE15;BE15;1107 1173 11B0;BE15;1107 1173 11B0;
+BE16;BE16;1107 1173 11B1;BE16;1107 1173 11B1;
+BE17;BE17;1107 1173 11B2;BE17;1107 1173 11B2;
+BE18;BE18;1107 1173 11B3;BE18;1107 1173 11B3;
+BE19;BE19;1107 1173 11B4;BE19;1107 1173 11B4;
+BE1A;BE1A;1107 1173 11B5;BE1A;1107 1173 11B5;
+BE1B;BE1B;1107 1173 11B6;BE1B;1107 1173 11B6;
+BE1C;BE1C;1107 1173 11B7;BE1C;1107 1173 11B7;
+BE1D;BE1D;1107 1173 11B8;BE1D;1107 1173 11B8;
+BE1E;BE1E;1107 1173 11B9;BE1E;1107 1173 11B9;
+BE1F;BE1F;1107 1173 11BA;BE1F;1107 1173 11BA;
+BE20;BE20;1107 1173 11BB;BE20;1107 1173 11BB;
+BE21;BE21;1107 1173 11BC;BE21;1107 1173 11BC;
+BE22;BE22;1107 1173 11BD;BE22;1107 1173 11BD;
+BE23;BE23;1107 1173 11BE;BE23;1107 1173 11BE;
+BE24;BE24;1107 1173 11BF;BE24;1107 1173 11BF;
+BE25;BE25;1107 1173 11C0;BE25;1107 1173 11C0;
+BE26;BE26;1107 1173 11C1;BE26;1107 1173 11C1;
+BE27;BE27;1107 1173 11C2;BE27;1107 1173 11C2;
+BE28;BE28;1107 1174;BE28;1107 1174;
+BE29;BE29;1107 1174 11A8;BE29;1107 1174 11A8;
+BE2A;BE2A;1107 1174 11A9;BE2A;1107 1174 11A9;
+BE2B;BE2B;1107 1174 11AA;BE2B;1107 1174 11AA;
+BE2C;BE2C;1107 1174 11AB;BE2C;1107 1174 11AB;
+BE2D;BE2D;1107 1174 11AC;BE2D;1107 1174 11AC;
+BE2E;BE2E;1107 1174 11AD;BE2E;1107 1174 11AD;
+BE2F;BE2F;1107 1174 11AE;BE2F;1107 1174 11AE;
+BE30;BE30;1107 1174 11AF;BE30;1107 1174 11AF;
+BE31;BE31;1107 1174 11B0;BE31;1107 1174 11B0;
+BE32;BE32;1107 1174 11B1;BE32;1107 1174 11B1;
+BE33;BE33;1107 1174 11B2;BE33;1107 1174 11B2;
+BE34;BE34;1107 1174 11B3;BE34;1107 1174 11B3;
+BE35;BE35;1107 1174 11B4;BE35;1107 1174 11B4;
+BE36;BE36;1107 1174 11B5;BE36;1107 1174 11B5;
+BE37;BE37;1107 1174 11B6;BE37;1107 1174 11B6;
+BE38;BE38;1107 1174 11B7;BE38;1107 1174 11B7;
+BE39;BE39;1107 1174 11B8;BE39;1107 1174 11B8;
+BE3A;BE3A;1107 1174 11B9;BE3A;1107 1174 11B9;
+BE3B;BE3B;1107 1174 11BA;BE3B;1107 1174 11BA;
+BE3C;BE3C;1107 1174 11BB;BE3C;1107 1174 11BB;
+BE3D;BE3D;1107 1174 11BC;BE3D;1107 1174 11BC;
+BE3E;BE3E;1107 1174 11BD;BE3E;1107 1174 11BD;
+BE3F;BE3F;1107 1174 11BE;BE3F;1107 1174 11BE;
+BE40;BE40;1107 1174 11BF;BE40;1107 1174 11BF;
+BE41;BE41;1107 1174 11C0;BE41;1107 1174 11C0;
+BE42;BE42;1107 1174 11C1;BE42;1107 1174 11C1;
+BE43;BE43;1107 1174 11C2;BE43;1107 1174 11C2;
+BE44;BE44;1107 1175;BE44;1107 1175;
+BE45;BE45;1107 1175 11A8;BE45;1107 1175 11A8;
+BE46;BE46;1107 1175 11A9;BE46;1107 1175 11A9;
+BE47;BE47;1107 1175 11AA;BE47;1107 1175 11AA;
+BE48;BE48;1107 1175 11AB;BE48;1107 1175 11AB;
+BE49;BE49;1107 1175 11AC;BE49;1107 1175 11AC;
+BE4A;BE4A;1107 1175 11AD;BE4A;1107 1175 11AD;
+BE4B;BE4B;1107 1175 11AE;BE4B;1107 1175 11AE;
+BE4C;BE4C;1107 1175 11AF;BE4C;1107 1175 11AF;
+BE4D;BE4D;1107 1175 11B0;BE4D;1107 1175 11B0;
+BE4E;BE4E;1107 1175 11B1;BE4E;1107 1175 11B1;
+BE4F;BE4F;1107 1175 11B2;BE4F;1107 1175 11B2;
+BE50;BE50;1107 1175 11B3;BE50;1107 1175 11B3;
+BE51;BE51;1107 1175 11B4;BE51;1107 1175 11B4;
+BE52;BE52;1107 1175 11B5;BE52;1107 1175 11B5;
+BE53;BE53;1107 1175 11B6;BE53;1107 1175 11B6;
+BE54;BE54;1107 1175 11B7;BE54;1107 1175 11B7;
+BE55;BE55;1107 1175 11B8;BE55;1107 1175 11B8;
+BE56;BE56;1107 1175 11B9;BE56;1107 1175 11B9;
+BE57;BE57;1107 1175 11BA;BE57;1107 1175 11BA;
+BE58;BE58;1107 1175 11BB;BE58;1107 1175 11BB;
+BE59;BE59;1107 1175 11BC;BE59;1107 1175 11BC;
+BE5A;BE5A;1107 1175 11BD;BE5A;1107 1175 11BD;
+BE5B;BE5B;1107 1175 11BE;BE5B;1107 1175 11BE;
+BE5C;BE5C;1107 1175 11BF;BE5C;1107 1175 11BF;
+BE5D;BE5D;1107 1175 11C0;BE5D;1107 1175 11C0;
+BE5E;BE5E;1107 1175 11C1;BE5E;1107 1175 11C1;
+BE5F;BE5F;1107 1175 11C2;BE5F;1107 1175 11C2;
+BE60;BE60;1108 1161;BE60;1108 1161;
+BE61;BE61;1108 1161 11A8;BE61;1108 1161 11A8;
+BE62;BE62;1108 1161 11A9;BE62;1108 1161 11A9;
+BE63;BE63;1108 1161 11AA;BE63;1108 1161 11AA;
+BE64;BE64;1108 1161 11AB;BE64;1108 1161 11AB;
+BE65;BE65;1108 1161 11AC;BE65;1108 1161 11AC;
+BE66;BE66;1108 1161 11AD;BE66;1108 1161 11AD;
+BE67;BE67;1108 1161 11AE;BE67;1108 1161 11AE;
+BE68;BE68;1108 1161 11AF;BE68;1108 1161 11AF;
+BE69;BE69;1108 1161 11B0;BE69;1108 1161 11B0;
+BE6A;BE6A;1108 1161 11B1;BE6A;1108 1161 11B1;
+BE6B;BE6B;1108 1161 11B2;BE6B;1108 1161 11B2;
+BE6C;BE6C;1108 1161 11B3;BE6C;1108 1161 11B3;
+BE6D;BE6D;1108 1161 11B4;BE6D;1108 1161 11B4;
+BE6E;BE6E;1108 1161 11B5;BE6E;1108 1161 11B5;
+BE6F;BE6F;1108 1161 11B6;BE6F;1108 1161 11B6;
+BE70;BE70;1108 1161 11B7;BE70;1108 1161 11B7;
+BE71;BE71;1108 1161 11B8;BE71;1108 1161 11B8;
+BE72;BE72;1108 1161 11B9;BE72;1108 1161 11B9;
+BE73;BE73;1108 1161 11BA;BE73;1108 1161 11BA;
+BE74;BE74;1108 1161 11BB;BE74;1108 1161 11BB;
+BE75;BE75;1108 1161 11BC;BE75;1108 1161 11BC;
+BE76;BE76;1108 1161 11BD;BE76;1108 1161 11BD;
+BE77;BE77;1108 1161 11BE;BE77;1108 1161 11BE;
+BE78;BE78;1108 1161 11BF;BE78;1108 1161 11BF;
+BE79;BE79;1108 1161 11C0;BE79;1108 1161 11C0;
+BE7A;BE7A;1108 1161 11C1;BE7A;1108 1161 11C1;
+BE7B;BE7B;1108 1161 11C2;BE7B;1108 1161 11C2;
+BE7C;BE7C;1108 1162;BE7C;1108 1162;
+BE7D;BE7D;1108 1162 11A8;BE7D;1108 1162 11A8;
+BE7E;BE7E;1108 1162 11A9;BE7E;1108 1162 11A9;
+BE7F;BE7F;1108 1162 11AA;BE7F;1108 1162 11AA;
+BE80;BE80;1108 1162 11AB;BE80;1108 1162 11AB;
+BE81;BE81;1108 1162 11AC;BE81;1108 1162 11AC;
+BE82;BE82;1108 1162 11AD;BE82;1108 1162 11AD;
+BE83;BE83;1108 1162 11AE;BE83;1108 1162 11AE;
+BE84;BE84;1108 1162 11AF;BE84;1108 1162 11AF;
+BE85;BE85;1108 1162 11B0;BE85;1108 1162 11B0;
+BE86;BE86;1108 1162 11B1;BE86;1108 1162 11B1;
+BE87;BE87;1108 1162 11B2;BE87;1108 1162 11B2;
+BE88;BE88;1108 1162 11B3;BE88;1108 1162 11B3;
+BE89;BE89;1108 1162 11B4;BE89;1108 1162 11B4;
+BE8A;BE8A;1108 1162 11B5;BE8A;1108 1162 11B5;
+BE8B;BE8B;1108 1162 11B6;BE8B;1108 1162 11B6;
+BE8C;BE8C;1108 1162 11B7;BE8C;1108 1162 11B7;
+BE8D;BE8D;1108 1162 11B8;BE8D;1108 1162 11B8;
+BE8E;BE8E;1108 1162 11B9;BE8E;1108 1162 11B9;
+BE8F;BE8F;1108 1162 11BA;BE8F;1108 1162 11BA;
+BE90;BE90;1108 1162 11BB;BE90;1108 1162 11BB;
+BE91;BE91;1108 1162 11BC;BE91;1108 1162 11BC;
+BE92;BE92;1108 1162 11BD;BE92;1108 1162 11BD;
+BE93;BE93;1108 1162 11BE;BE93;1108 1162 11BE;
+BE94;BE94;1108 1162 11BF;BE94;1108 1162 11BF;
+BE95;BE95;1108 1162 11C0;BE95;1108 1162 11C0;
+BE96;BE96;1108 1162 11C1;BE96;1108 1162 11C1;
+BE97;BE97;1108 1162 11C2;BE97;1108 1162 11C2;
+BE98;BE98;1108 1163;BE98;1108 1163;
+BE99;BE99;1108 1163 11A8;BE99;1108 1163 11A8;
+BE9A;BE9A;1108 1163 11A9;BE9A;1108 1163 11A9;
+BE9B;BE9B;1108 1163 11AA;BE9B;1108 1163 11AA;
+BE9C;BE9C;1108 1163 11AB;BE9C;1108 1163 11AB;
+BE9D;BE9D;1108 1163 11AC;BE9D;1108 1163 11AC;
+BE9E;BE9E;1108 1163 11AD;BE9E;1108 1163 11AD;
+BE9F;BE9F;1108 1163 11AE;BE9F;1108 1163 11AE;
+BEA0;BEA0;1108 1163 11AF;BEA0;1108 1163 11AF;
+BEA1;BEA1;1108 1163 11B0;BEA1;1108 1163 11B0;
+BEA2;BEA2;1108 1163 11B1;BEA2;1108 1163 11B1;
+BEA3;BEA3;1108 1163 11B2;BEA3;1108 1163 11B2;
+BEA4;BEA4;1108 1163 11B3;BEA4;1108 1163 11B3;
+BEA5;BEA5;1108 1163 11B4;BEA5;1108 1163 11B4;
+BEA6;BEA6;1108 1163 11B5;BEA6;1108 1163 11B5;
+BEA7;BEA7;1108 1163 11B6;BEA7;1108 1163 11B6;
+BEA8;BEA8;1108 1163 11B7;BEA8;1108 1163 11B7;
+BEA9;BEA9;1108 1163 11B8;BEA9;1108 1163 11B8;
+BEAA;BEAA;1108 1163 11B9;BEAA;1108 1163 11B9;
+BEAB;BEAB;1108 1163 11BA;BEAB;1108 1163 11BA;
+BEAC;BEAC;1108 1163 11BB;BEAC;1108 1163 11BB;
+BEAD;BEAD;1108 1163 11BC;BEAD;1108 1163 11BC;
+BEAE;BEAE;1108 1163 11BD;BEAE;1108 1163 11BD;
+BEAF;BEAF;1108 1163 11BE;BEAF;1108 1163 11BE;
+BEB0;BEB0;1108 1163 11BF;BEB0;1108 1163 11BF;
+BEB1;BEB1;1108 1163 11C0;BEB1;1108 1163 11C0;
+BEB2;BEB2;1108 1163 11C1;BEB2;1108 1163 11C1;
+BEB3;BEB3;1108 1163 11C2;BEB3;1108 1163 11C2;
+BEB4;BEB4;1108 1164;BEB4;1108 1164;
+BEB5;BEB5;1108 1164 11A8;BEB5;1108 1164 11A8;
+BEB6;BEB6;1108 1164 11A9;BEB6;1108 1164 11A9;
+BEB7;BEB7;1108 1164 11AA;BEB7;1108 1164 11AA;
+BEB8;BEB8;1108 1164 11AB;BEB8;1108 1164 11AB;
+BEB9;BEB9;1108 1164 11AC;BEB9;1108 1164 11AC;
+BEBA;BEBA;1108 1164 11AD;BEBA;1108 1164 11AD;
+BEBB;BEBB;1108 1164 11AE;BEBB;1108 1164 11AE;
+BEBC;BEBC;1108 1164 11AF;BEBC;1108 1164 11AF;
+BEBD;BEBD;1108 1164 11B0;BEBD;1108 1164 11B0;
+BEBE;BEBE;1108 1164 11B1;BEBE;1108 1164 11B1;
+BEBF;BEBF;1108 1164 11B2;BEBF;1108 1164 11B2;
+BEC0;BEC0;1108 1164 11B3;BEC0;1108 1164 11B3;
+BEC1;BEC1;1108 1164 11B4;BEC1;1108 1164 11B4;
+BEC2;BEC2;1108 1164 11B5;BEC2;1108 1164 11B5;
+BEC3;BEC3;1108 1164 11B6;BEC3;1108 1164 11B6;
+BEC4;BEC4;1108 1164 11B7;BEC4;1108 1164 11B7;
+BEC5;BEC5;1108 1164 11B8;BEC5;1108 1164 11B8;
+BEC6;BEC6;1108 1164 11B9;BEC6;1108 1164 11B9;
+BEC7;BEC7;1108 1164 11BA;BEC7;1108 1164 11BA;
+BEC8;BEC8;1108 1164 11BB;BEC8;1108 1164 11BB;
+BEC9;BEC9;1108 1164 11BC;BEC9;1108 1164 11BC;
+BECA;BECA;1108 1164 11BD;BECA;1108 1164 11BD;
+BECB;BECB;1108 1164 11BE;BECB;1108 1164 11BE;
+BECC;BECC;1108 1164 11BF;BECC;1108 1164 11BF;
+BECD;BECD;1108 1164 11C0;BECD;1108 1164 11C0;
+BECE;BECE;1108 1164 11C1;BECE;1108 1164 11C1;
+BECF;BECF;1108 1164 11C2;BECF;1108 1164 11C2;
+BED0;BED0;1108 1165;BED0;1108 1165;
+BED1;BED1;1108 1165 11A8;BED1;1108 1165 11A8;
+BED2;BED2;1108 1165 11A9;BED2;1108 1165 11A9;
+BED3;BED3;1108 1165 11AA;BED3;1108 1165 11AA;
+BED4;BED4;1108 1165 11AB;BED4;1108 1165 11AB;
+BED5;BED5;1108 1165 11AC;BED5;1108 1165 11AC;
+BED6;BED6;1108 1165 11AD;BED6;1108 1165 11AD;
+BED7;BED7;1108 1165 11AE;BED7;1108 1165 11AE;
+BED8;BED8;1108 1165 11AF;BED8;1108 1165 11AF;
+BED9;BED9;1108 1165 11B0;BED9;1108 1165 11B0;
+BEDA;BEDA;1108 1165 11B1;BEDA;1108 1165 11B1;
+BEDB;BEDB;1108 1165 11B2;BEDB;1108 1165 11B2;
+BEDC;BEDC;1108 1165 11B3;BEDC;1108 1165 11B3;
+BEDD;BEDD;1108 1165 11B4;BEDD;1108 1165 11B4;
+BEDE;BEDE;1108 1165 11B5;BEDE;1108 1165 11B5;
+BEDF;BEDF;1108 1165 11B6;BEDF;1108 1165 11B6;
+BEE0;BEE0;1108 1165 11B7;BEE0;1108 1165 11B7;
+BEE1;BEE1;1108 1165 11B8;BEE1;1108 1165 11B8;
+BEE2;BEE2;1108 1165 11B9;BEE2;1108 1165 11B9;
+BEE3;BEE3;1108 1165 11BA;BEE3;1108 1165 11BA;
+BEE4;BEE4;1108 1165 11BB;BEE4;1108 1165 11BB;
+BEE5;BEE5;1108 1165 11BC;BEE5;1108 1165 11BC;
+BEE6;BEE6;1108 1165 11BD;BEE6;1108 1165 11BD;
+BEE7;BEE7;1108 1165 11BE;BEE7;1108 1165 11BE;
+BEE8;BEE8;1108 1165 11BF;BEE8;1108 1165 11BF;
+BEE9;BEE9;1108 1165 11C0;BEE9;1108 1165 11C0;
+BEEA;BEEA;1108 1165 11C1;BEEA;1108 1165 11C1;
+BEEB;BEEB;1108 1165 11C2;BEEB;1108 1165 11C2;
+BEEC;BEEC;1108 1166;BEEC;1108 1166;
+BEED;BEED;1108 1166 11A8;BEED;1108 1166 11A8;
+BEEE;BEEE;1108 1166 11A9;BEEE;1108 1166 11A9;
+BEEF;BEEF;1108 1166 11AA;BEEF;1108 1166 11AA;
+BEF0;BEF0;1108 1166 11AB;BEF0;1108 1166 11AB;
+BEF1;BEF1;1108 1166 11AC;BEF1;1108 1166 11AC;
+BEF2;BEF2;1108 1166 11AD;BEF2;1108 1166 11AD;
+BEF3;BEF3;1108 1166 11AE;BEF3;1108 1166 11AE;
+BEF4;BEF4;1108 1166 11AF;BEF4;1108 1166 11AF;
+BEF5;BEF5;1108 1166 11B0;BEF5;1108 1166 11B0;
+BEF6;BEF6;1108 1166 11B1;BEF6;1108 1166 11B1;
+BEF7;BEF7;1108 1166 11B2;BEF7;1108 1166 11B2;
+BEF8;BEF8;1108 1166 11B3;BEF8;1108 1166 11B3;
+BEF9;BEF9;1108 1166 11B4;BEF9;1108 1166 11B4;
+BEFA;BEFA;1108 1166 11B5;BEFA;1108 1166 11B5;
+BEFB;BEFB;1108 1166 11B6;BEFB;1108 1166 11B6;
+BEFC;BEFC;1108 1166 11B7;BEFC;1108 1166 11B7;
+BEFD;BEFD;1108 1166 11B8;BEFD;1108 1166 11B8;
+BEFE;BEFE;1108 1166 11B9;BEFE;1108 1166 11B9;
+BEFF;BEFF;1108 1166 11BA;BEFF;1108 1166 11BA;
+BF00;BF00;1108 1166 11BB;BF00;1108 1166 11BB;
+BF01;BF01;1108 1166 11BC;BF01;1108 1166 11BC;
+BF02;BF02;1108 1166 11BD;BF02;1108 1166 11BD;
+BF03;BF03;1108 1166 11BE;BF03;1108 1166 11BE;
+BF04;BF04;1108 1166 11BF;BF04;1108 1166 11BF;
+BF05;BF05;1108 1166 11C0;BF05;1108 1166 11C0;
+BF06;BF06;1108 1166 11C1;BF06;1108 1166 11C1;
+BF07;BF07;1108 1166 11C2;BF07;1108 1166 11C2;
+BF08;BF08;1108 1167;BF08;1108 1167;
+BF09;BF09;1108 1167 11A8;BF09;1108 1167 11A8;
+BF0A;BF0A;1108 1167 11A9;BF0A;1108 1167 11A9;
+BF0B;BF0B;1108 1167 11AA;BF0B;1108 1167 11AA;
+BF0C;BF0C;1108 1167 11AB;BF0C;1108 1167 11AB;
+BF0D;BF0D;1108 1167 11AC;BF0D;1108 1167 11AC;
+BF0E;BF0E;1108 1167 11AD;BF0E;1108 1167 11AD;
+BF0F;BF0F;1108 1167 11AE;BF0F;1108 1167 11AE;
+BF10;BF10;1108 1167 11AF;BF10;1108 1167 11AF;
+BF11;BF11;1108 1167 11B0;BF11;1108 1167 11B0;
+BF12;BF12;1108 1167 11B1;BF12;1108 1167 11B1;
+BF13;BF13;1108 1167 11B2;BF13;1108 1167 11B2;
+BF14;BF14;1108 1167 11B3;BF14;1108 1167 11B3;
+BF15;BF15;1108 1167 11B4;BF15;1108 1167 11B4;
+BF16;BF16;1108 1167 11B5;BF16;1108 1167 11B5;
+BF17;BF17;1108 1167 11B6;BF17;1108 1167 11B6;
+BF18;BF18;1108 1167 11B7;BF18;1108 1167 11B7;
+BF19;BF19;1108 1167 11B8;BF19;1108 1167 11B8;
+BF1A;BF1A;1108 1167 11B9;BF1A;1108 1167 11B9;
+BF1B;BF1B;1108 1167 11BA;BF1B;1108 1167 11BA;
+BF1C;BF1C;1108 1167 11BB;BF1C;1108 1167 11BB;
+BF1D;BF1D;1108 1167 11BC;BF1D;1108 1167 11BC;
+BF1E;BF1E;1108 1167 11BD;BF1E;1108 1167 11BD;
+BF1F;BF1F;1108 1167 11BE;BF1F;1108 1167 11BE;
+BF20;BF20;1108 1167 11BF;BF20;1108 1167 11BF;
+BF21;BF21;1108 1167 11C0;BF21;1108 1167 11C0;
+BF22;BF22;1108 1167 11C1;BF22;1108 1167 11C1;
+BF23;BF23;1108 1167 11C2;BF23;1108 1167 11C2;
+BF24;BF24;1108 1168;BF24;1108 1168;
+BF25;BF25;1108 1168 11A8;BF25;1108 1168 11A8;
+BF26;BF26;1108 1168 11A9;BF26;1108 1168 11A9;
+BF27;BF27;1108 1168 11AA;BF27;1108 1168 11AA;
+BF28;BF28;1108 1168 11AB;BF28;1108 1168 11AB;
+BF29;BF29;1108 1168 11AC;BF29;1108 1168 11AC;
+BF2A;BF2A;1108 1168 11AD;BF2A;1108 1168 11AD;
+BF2B;BF2B;1108 1168 11AE;BF2B;1108 1168 11AE;
+BF2C;BF2C;1108 1168 11AF;BF2C;1108 1168 11AF;
+BF2D;BF2D;1108 1168 11B0;BF2D;1108 1168 11B0;
+BF2E;BF2E;1108 1168 11B1;BF2E;1108 1168 11B1;
+BF2F;BF2F;1108 1168 11B2;BF2F;1108 1168 11B2;
+BF30;BF30;1108 1168 11B3;BF30;1108 1168 11B3;
+BF31;BF31;1108 1168 11B4;BF31;1108 1168 11B4;
+BF32;BF32;1108 1168 11B5;BF32;1108 1168 11B5;
+BF33;BF33;1108 1168 11B6;BF33;1108 1168 11B6;
+BF34;BF34;1108 1168 11B7;BF34;1108 1168 11B7;
+BF35;BF35;1108 1168 11B8;BF35;1108 1168 11B8;
+BF36;BF36;1108 1168 11B9;BF36;1108 1168 11B9;
+BF37;BF37;1108 1168 11BA;BF37;1108 1168 11BA;
+BF38;BF38;1108 1168 11BB;BF38;1108 1168 11BB;
+BF39;BF39;1108 1168 11BC;BF39;1108 1168 11BC;
+BF3A;BF3A;1108 1168 11BD;BF3A;1108 1168 11BD;
+BF3B;BF3B;1108 1168 11BE;BF3B;1108 1168 11BE;
+BF3C;BF3C;1108 1168 11BF;BF3C;1108 1168 11BF;
+BF3D;BF3D;1108 1168 11C0;BF3D;1108 1168 11C0;
+BF3E;BF3E;1108 1168 11C1;BF3E;1108 1168 11C1;
+BF3F;BF3F;1108 1168 11C2;BF3F;1108 1168 11C2;
+BF40;BF40;1108 1169;BF40;1108 1169;
+BF41;BF41;1108 1169 11A8;BF41;1108 1169 11A8;
+BF42;BF42;1108 1169 11A9;BF42;1108 1169 11A9;
+BF43;BF43;1108 1169 11AA;BF43;1108 1169 11AA;
+BF44;BF44;1108 1169 11AB;BF44;1108 1169 11AB;
+BF45;BF45;1108 1169 11AC;BF45;1108 1169 11AC;
+BF46;BF46;1108 1169 11AD;BF46;1108 1169 11AD;
+BF47;BF47;1108 1169 11AE;BF47;1108 1169 11AE;
+BF48;BF48;1108 1169 11AF;BF48;1108 1169 11AF;
+BF49;BF49;1108 1169 11B0;BF49;1108 1169 11B0;
+BF4A;BF4A;1108 1169 11B1;BF4A;1108 1169 11B1;
+BF4B;BF4B;1108 1169 11B2;BF4B;1108 1169 11B2;
+BF4C;BF4C;1108 1169 11B3;BF4C;1108 1169 11B3;
+BF4D;BF4D;1108 1169 11B4;BF4D;1108 1169 11B4;
+BF4E;BF4E;1108 1169 11B5;BF4E;1108 1169 11B5;
+BF4F;BF4F;1108 1169 11B6;BF4F;1108 1169 11B6;
+BF50;BF50;1108 1169 11B7;BF50;1108 1169 11B7;
+BF51;BF51;1108 1169 11B8;BF51;1108 1169 11B8;
+BF52;BF52;1108 1169 11B9;BF52;1108 1169 11B9;
+BF53;BF53;1108 1169 11BA;BF53;1108 1169 11BA;
+BF54;BF54;1108 1169 11BB;BF54;1108 1169 11BB;
+BF55;BF55;1108 1169 11BC;BF55;1108 1169 11BC;
+BF56;BF56;1108 1169 11BD;BF56;1108 1169 11BD;
+BF57;BF57;1108 1169 11BE;BF57;1108 1169 11BE;
+BF58;BF58;1108 1169 11BF;BF58;1108 1169 11BF;
+BF59;BF59;1108 1169 11C0;BF59;1108 1169 11C0;
+BF5A;BF5A;1108 1169 11C1;BF5A;1108 1169 11C1;
+BF5B;BF5B;1108 1169 11C2;BF5B;1108 1169 11C2;
+BF5C;BF5C;1108 116A;BF5C;1108 116A;
+BF5D;BF5D;1108 116A 11A8;BF5D;1108 116A 11A8;
+BF5E;BF5E;1108 116A 11A9;BF5E;1108 116A 11A9;
+BF5F;BF5F;1108 116A 11AA;BF5F;1108 116A 11AA;
+BF60;BF60;1108 116A 11AB;BF60;1108 116A 11AB;
+BF61;BF61;1108 116A 11AC;BF61;1108 116A 11AC;
+BF62;BF62;1108 116A 11AD;BF62;1108 116A 11AD;
+BF63;BF63;1108 116A 11AE;BF63;1108 116A 11AE;
+BF64;BF64;1108 116A 11AF;BF64;1108 116A 11AF;
+BF65;BF65;1108 116A 11B0;BF65;1108 116A 11B0;
+BF66;BF66;1108 116A 11B1;BF66;1108 116A 11B1;
+BF67;BF67;1108 116A 11B2;BF67;1108 116A 11B2;
+BF68;BF68;1108 116A 11B3;BF68;1108 116A 11B3;
+BF69;BF69;1108 116A 11B4;BF69;1108 116A 11B4;
+BF6A;BF6A;1108 116A 11B5;BF6A;1108 116A 11B5;
+BF6B;BF6B;1108 116A 11B6;BF6B;1108 116A 11B6;
+BF6C;BF6C;1108 116A 11B7;BF6C;1108 116A 11B7;
+BF6D;BF6D;1108 116A 11B8;BF6D;1108 116A 11B8;
+BF6E;BF6E;1108 116A 11B9;BF6E;1108 116A 11B9;
+BF6F;BF6F;1108 116A 11BA;BF6F;1108 116A 11BA;
+BF70;BF70;1108 116A 11BB;BF70;1108 116A 11BB;
+BF71;BF71;1108 116A 11BC;BF71;1108 116A 11BC;
+BF72;BF72;1108 116A 11BD;BF72;1108 116A 11BD;
+BF73;BF73;1108 116A 11BE;BF73;1108 116A 11BE;
+BF74;BF74;1108 116A 11BF;BF74;1108 116A 11BF;
+BF75;BF75;1108 116A 11C0;BF75;1108 116A 11C0;
+BF76;BF76;1108 116A 11C1;BF76;1108 116A 11C1;
+BF77;BF77;1108 116A 11C2;BF77;1108 116A 11C2;
+BF78;BF78;1108 116B;BF78;1108 116B;
+BF79;BF79;1108 116B 11A8;BF79;1108 116B 11A8;
+BF7A;BF7A;1108 116B 11A9;BF7A;1108 116B 11A9;
+BF7B;BF7B;1108 116B 11AA;BF7B;1108 116B 11AA;
+BF7C;BF7C;1108 116B 11AB;BF7C;1108 116B 11AB;
+BF7D;BF7D;1108 116B 11AC;BF7D;1108 116B 11AC;
+BF7E;BF7E;1108 116B 11AD;BF7E;1108 116B 11AD;
+BF7F;BF7F;1108 116B 11AE;BF7F;1108 116B 11AE;
+BF80;BF80;1108 116B 11AF;BF80;1108 116B 11AF;
+BF81;BF81;1108 116B 11B0;BF81;1108 116B 11B0;
+BF82;BF82;1108 116B 11B1;BF82;1108 116B 11B1;
+BF83;BF83;1108 116B 11B2;BF83;1108 116B 11B2;
+BF84;BF84;1108 116B 11B3;BF84;1108 116B 11B3;
+BF85;BF85;1108 116B 11B4;BF85;1108 116B 11B4;
+BF86;BF86;1108 116B 11B5;BF86;1108 116B 11B5;
+BF87;BF87;1108 116B 11B6;BF87;1108 116B 11B6;
+BF88;BF88;1108 116B 11B7;BF88;1108 116B 11B7;
+BF89;BF89;1108 116B 11B8;BF89;1108 116B 11B8;
+BF8A;BF8A;1108 116B 11B9;BF8A;1108 116B 11B9;
+BF8B;BF8B;1108 116B 11BA;BF8B;1108 116B 11BA;
+BF8C;BF8C;1108 116B 11BB;BF8C;1108 116B 11BB;
+BF8D;BF8D;1108 116B 11BC;BF8D;1108 116B 11BC;
+BF8E;BF8E;1108 116B 11BD;BF8E;1108 116B 11BD;
+BF8F;BF8F;1108 116B 11BE;BF8F;1108 116B 11BE;
+BF90;BF90;1108 116B 11BF;BF90;1108 116B 11BF;
+BF91;BF91;1108 116B 11C0;BF91;1108 116B 11C0;
+BF92;BF92;1108 116B 11C1;BF92;1108 116B 11C1;
+BF93;BF93;1108 116B 11C2;BF93;1108 116B 11C2;
+BF94;BF94;1108 116C;BF94;1108 116C;
+BF95;BF95;1108 116C 11A8;BF95;1108 116C 11A8;
+BF96;BF96;1108 116C 11A9;BF96;1108 116C 11A9;
+BF97;BF97;1108 116C 11AA;BF97;1108 116C 11AA;
+BF98;BF98;1108 116C 11AB;BF98;1108 116C 11AB;
+BF99;BF99;1108 116C 11AC;BF99;1108 116C 11AC;
+BF9A;BF9A;1108 116C 11AD;BF9A;1108 116C 11AD;
+BF9B;BF9B;1108 116C 11AE;BF9B;1108 116C 11AE;
+BF9C;BF9C;1108 116C 11AF;BF9C;1108 116C 11AF;
+BF9D;BF9D;1108 116C 11B0;BF9D;1108 116C 11B0;
+BF9E;BF9E;1108 116C 11B1;BF9E;1108 116C 11B1;
+BF9F;BF9F;1108 116C 11B2;BF9F;1108 116C 11B2;
+BFA0;BFA0;1108 116C 11B3;BFA0;1108 116C 11B3;
+BFA1;BFA1;1108 116C 11B4;BFA1;1108 116C 11B4;
+BFA2;BFA2;1108 116C 11B5;BFA2;1108 116C 11B5;
+BFA3;BFA3;1108 116C 11B6;BFA3;1108 116C 11B6;
+BFA4;BFA4;1108 116C 11B7;BFA4;1108 116C 11B7;
+BFA5;BFA5;1108 116C 11B8;BFA5;1108 116C 11B8;
+BFA6;BFA6;1108 116C 11B9;BFA6;1108 116C 11B9;
+BFA7;BFA7;1108 116C 11BA;BFA7;1108 116C 11BA;
+BFA8;BFA8;1108 116C 11BB;BFA8;1108 116C 11BB;
+BFA9;BFA9;1108 116C 11BC;BFA9;1108 116C 11BC;
+BFAA;BFAA;1108 116C 11BD;BFAA;1108 116C 11BD;
+BFAB;BFAB;1108 116C 11BE;BFAB;1108 116C 11BE;
+BFAC;BFAC;1108 116C 11BF;BFAC;1108 116C 11BF;
+BFAD;BFAD;1108 116C 11C0;BFAD;1108 116C 11C0;
+BFAE;BFAE;1108 116C 11C1;BFAE;1108 116C 11C1;
+BFAF;BFAF;1108 116C 11C2;BFAF;1108 116C 11C2;
+BFB0;BFB0;1108 116D;BFB0;1108 116D;
+BFB1;BFB1;1108 116D 11A8;BFB1;1108 116D 11A8;
+BFB2;BFB2;1108 116D 11A9;BFB2;1108 116D 11A9;
+BFB3;BFB3;1108 116D 11AA;BFB3;1108 116D 11AA;
+BFB4;BFB4;1108 116D 11AB;BFB4;1108 116D 11AB;
+BFB5;BFB5;1108 116D 11AC;BFB5;1108 116D 11AC;
+BFB6;BFB6;1108 116D 11AD;BFB6;1108 116D 11AD;
+BFB7;BFB7;1108 116D 11AE;BFB7;1108 116D 11AE;
+BFB8;BFB8;1108 116D 11AF;BFB8;1108 116D 11AF;
+BFB9;BFB9;1108 116D 11B0;BFB9;1108 116D 11B0;
+BFBA;BFBA;1108 116D 11B1;BFBA;1108 116D 11B1;
+BFBB;BFBB;1108 116D 11B2;BFBB;1108 116D 11B2;
+BFBC;BFBC;1108 116D 11B3;BFBC;1108 116D 11B3;
+BFBD;BFBD;1108 116D 11B4;BFBD;1108 116D 11B4;
+BFBE;BFBE;1108 116D 11B5;BFBE;1108 116D 11B5;
+BFBF;BFBF;1108 116D 11B6;BFBF;1108 116D 11B6;
+BFC0;BFC0;1108 116D 11B7;BFC0;1108 116D 11B7;
+BFC1;BFC1;1108 116D 11B8;BFC1;1108 116D 11B8;
+BFC2;BFC2;1108 116D 11B9;BFC2;1108 116D 11B9;
+BFC3;BFC3;1108 116D 11BA;BFC3;1108 116D 11BA;
+BFC4;BFC4;1108 116D 11BB;BFC4;1108 116D 11BB;
+BFC5;BFC5;1108 116D 11BC;BFC5;1108 116D 11BC;
+BFC6;BFC6;1108 116D 11BD;BFC6;1108 116D 11BD;
+BFC7;BFC7;1108 116D 11BE;BFC7;1108 116D 11BE;
+BFC8;BFC8;1108 116D 11BF;BFC8;1108 116D 11BF;
+BFC9;BFC9;1108 116D 11C0;BFC9;1108 116D 11C0;
+BFCA;BFCA;1108 116D 11C1;BFCA;1108 116D 11C1;
+BFCB;BFCB;1108 116D 11C2;BFCB;1108 116D 11C2;
+BFCC;BFCC;1108 116E;BFCC;1108 116E;
+BFCD;BFCD;1108 116E 11A8;BFCD;1108 116E 11A8;
+BFCE;BFCE;1108 116E 11A9;BFCE;1108 116E 11A9;
+BFCF;BFCF;1108 116E 11AA;BFCF;1108 116E 11AA;
+BFD0;BFD0;1108 116E 11AB;BFD0;1108 116E 11AB;
+BFD1;BFD1;1108 116E 11AC;BFD1;1108 116E 11AC;
+BFD2;BFD2;1108 116E 11AD;BFD2;1108 116E 11AD;
+BFD3;BFD3;1108 116E 11AE;BFD3;1108 116E 11AE;
+BFD4;BFD4;1108 116E 11AF;BFD4;1108 116E 11AF;
+BFD5;BFD5;1108 116E 11B0;BFD5;1108 116E 11B0;
+BFD6;BFD6;1108 116E 11B1;BFD6;1108 116E 11B1;
+BFD7;BFD7;1108 116E 11B2;BFD7;1108 116E 11B2;
+BFD8;BFD8;1108 116E 11B3;BFD8;1108 116E 11B3;
+BFD9;BFD9;1108 116E 11B4;BFD9;1108 116E 11B4;
+BFDA;BFDA;1108 116E 11B5;BFDA;1108 116E 11B5;
+BFDB;BFDB;1108 116E 11B6;BFDB;1108 116E 11B6;
+BFDC;BFDC;1108 116E 11B7;BFDC;1108 116E 11B7;
+BFDD;BFDD;1108 116E 11B8;BFDD;1108 116E 11B8;
+BFDE;BFDE;1108 116E 11B9;BFDE;1108 116E 11B9;
+BFDF;BFDF;1108 116E 11BA;BFDF;1108 116E 11BA;
+BFE0;BFE0;1108 116E 11BB;BFE0;1108 116E 11BB;
+BFE1;BFE1;1108 116E 11BC;BFE1;1108 116E 11BC;
+BFE2;BFE2;1108 116E 11BD;BFE2;1108 116E 11BD;
+BFE3;BFE3;1108 116E 11BE;BFE3;1108 116E 11BE;
+BFE4;BFE4;1108 116E 11BF;BFE4;1108 116E 11BF;
+BFE5;BFE5;1108 116E 11C0;BFE5;1108 116E 11C0;
+BFE6;BFE6;1108 116E 11C1;BFE6;1108 116E 11C1;
+BFE7;BFE7;1108 116E 11C2;BFE7;1108 116E 11C2;
+BFE8;BFE8;1108 116F;BFE8;1108 116F;
+BFE9;BFE9;1108 116F 11A8;BFE9;1108 116F 11A8;
+BFEA;BFEA;1108 116F 11A9;BFEA;1108 116F 11A9;
+BFEB;BFEB;1108 116F 11AA;BFEB;1108 116F 11AA;
+BFEC;BFEC;1108 116F 11AB;BFEC;1108 116F 11AB;
+BFED;BFED;1108 116F 11AC;BFED;1108 116F 11AC;
+BFEE;BFEE;1108 116F 11AD;BFEE;1108 116F 11AD;
+BFEF;BFEF;1108 116F 11AE;BFEF;1108 116F 11AE;
+BFF0;BFF0;1108 116F 11AF;BFF0;1108 116F 11AF;
+BFF1;BFF1;1108 116F 11B0;BFF1;1108 116F 11B0;
+BFF2;BFF2;1108 116F 11B1;BFF2;1108 116F 11B1;
+BFF3;BFF3;1108 116F 11B2;BFF3;1108 116F 11B2;
+BFF4;BFF4;1108 116F 11B3;BFF4;1108 116F 11B3;
+BFF5;BFF5;1108 116F 11B4;BFF5;1108 116F 11B4;
+BFF6;BFF6;1108 116F 11B5;BFF6;1108 116F 11B5;
+BFF7;BFF7;1108 116F 11B6;BFF7;1108 116F 11B6;
+BFF8;BFF8;1108 116F 11B7;BFF8;1108 116F 11B7;
+BFF9;BFF9;1108 116F 11B8;BFF9;1108 116F 11B8;
+BFFA;BFFA;1108 116F 11B9;BFFA;1108 116F 11B9;
+BFFB;BFFB;1108 116F 11BA;BFFB;1108 116F 11BA;
+BFFC;BFFC;1108 116F 11BB;BFFC;1108 116F 11BB;
+BFFD;BFFD;1108 116F 11BC;BFFD;1108 116F 11BC;
+BFFE;BFFE;1108 116F 11BD;BFFE;1108 116F 11BD;
+BFFF;BFFF;1108 116F 11BE;BFFF;1108 116F 11BE;
+C000;C000;1108 116F 11BF;C000;1108 116F 11BF;
+C001;C001;1108 116F 11C0;C001;1108 116F 11C0;
+C002;C002;1108 116F 11C1;C002;1108 116F 11C1;
+C003;C003;1108 116F 11C2;C003;1108 116F 11C2;
+C004;C004;1108 1170;C004;1108 1170;
+C005;C005;1108 1170 11A8;C005;1108 1170 11A8;
+C006;C006;1108 1170 11A9;C006;1108 1170 11A9;
+C007;C007;1108 1170 11AA;C007;1108 1170 11AA;
+C008;C008;1108 1170 11AB;C008;1108 1170 11AB;
+C009;C009;1108 1170 11AC;C009;1108 1170 11AC;
+C00A;C00A;1108 1170 11AD;C00A;1108 1170 11AD;
+C00B;C00B;1108 1170 11AE;C00B;1108 1170 11AE;
+C00C;C00C;1108 1170 11AF;C00C;1108 1170 11AF;
+C00D;C00D;1108 1170 11B0;C00D;1108 1170 11B0;
+C00E;C00E;1108 1170 11B1;C00E;1108 1170 11B1;
+C00F;C00F;1108 1170 11B2;C00F;1108 1170 11B2;
+C010;C010;1108 1170 11B3;C010;1108 1170 11B3;
+C011;C011;1108 1170 11B4;C011;1108 1170 11B4;
+C012;C012;1108 1170 11B5;C012;1108 1170 11B5;
+C013;C013;1108 1170 11B6;C013;1108 1170 11B6;
+C014;C014;1108 1170 11B7;C014;1108 1170 11B7;
+C015;C015;1108 1170 11B8;C015;1108 1170 11B8;
+C016;C016;1108 1170 11B9;C016;1108 1170 11B9;
+C017;C017;1108 1170 11BA;C017;1108 1170 11BA;
+C018;C018;1108 1170 11BB;C018;1108 1170 11BB;
+C019;C019;1108 1170 11BC;C019;1108 1170 11BC;
+C01A;C01A;1108 1170 11BD;C01A;1108 1170 11BD;
+C01B;C01B;1108 1170 11BE;C01B;1108 1170 11BE;
+C01C;C01C;1108 1170 11BF;C01C;1108 1170 11BF;
+C01D;C01D;1108 1170 11C0;C01D;1108 1170 11C0;
+C01E;C01E;1108 1170 11C1;C01E;1108 1170 11C1;
+C01F;C01F;1108 1170 11C2;C01F;1108 1170 11C2;
+C020;C020;1108 1171;C020;1108 1171;
+C021;C021;1108 1171 11A8;C021;1108 1171 11A8;
+C022;C022;1108 1171 11A9;C022;1108 1171 11A9;
+C023;C023;1108 1171 11AA;C023;1108 1171 11AA;
+C024;C024;1108 1171 11AB;C024;1108 1171 11AB;
+C025;C025;1108 1171 11AC;C025;1108 1171 11AC;
+C026;C026;1108 1171 11AD;C026;1108 1171 11AD;
+C027;C027;1108 1171 11AE;C027;1108 1171 11AE;
+C028;C028;1108 1171 11AF;C028;1108 1171 11AF;
+C029;C029;1108 1171 11B0;C029;1108 1171 11B0;
+C02A;C02A;1108 1171 11B1;C02A;1108 1171 11B1;
+C02B;C02B;1108 1171 11B2;C02B;1108 1171 11B2;
+C02C;C02C;1108 1171 11B3;C02C;1108 1171 11B3;
+C02D;C02D;1108 1171 11B4;C02D;1108 1171 11B4;
+C02E;C02E;1108 1171 11B5;C02E;1108 1171 11B5;
+C02F;C02F;1108 1171 11B6;C02F;1108 1171 11B6;
+C030;C030;1108 1171 11B7;C030;1108 1171 11B7;
+C031;C031;1108 1171 11B8;C031;1108 1171 11B8;
+C032;C032;1108 1171 11B9;C032;1108 1171 11B9;
+C033;C033;1108 1171 11BA;C033;1108 1171 11BA;
+C034;C034;1108 1171 11BB;C034;1108 1171 11BB;
+C035;C035;1108 1171 11BC;C035;1108 1171 11BC;
+C036;C036;1108 1171 11BD;C036;1108 1171 11BD;
+C037;C037;1108 1171 11BE;C037;1108 1171 11BE;
+C038;C038;1108 1171 11BF;C038;1108 1171 11BF;
+C039;C039;1108 1171 11C0;C039;1108 1171 11C0;
+C03A;C03A;1108 1171 11C1;C03A;1108 1171 11C1;
+C03B;C03B;1108 1171 11C2;C03B;1108 1171 11C2;
+C03C;C03C;1108 1172;C03C;1108 1172;
+C03D;C03D;1108 1172 11A8;C03D;1108 1172 11A8;
+C03E;C03E;1108 1172 11A9;C03E;1108 1172 11A9;
+C03F;C03F;1108 1172 11AA;C03F;1108 1172 11AA;
+C040;C040;1108 1172 11AB;C040;1108 1172 11AB;
+C041;C041;1108 1172 11AC;C041;1108 1172 11AC;
+C042;C042;1108 1172 11AD;C042;1108 1172 11AD;
+C043;C043;1108 1172 11AE;C043;1108 1172 11AE;
+C044;C044;1108 1172 11AF;C044;1108 1172 11AF;
+C045;C045;1108 1172 11B0;C045;1108 1172 11B0;
+C046;C046;1108 1172 11B1;C046;1108 1172 11B1;
+C047;C047;1108 1172 11B2;C047;1108 1172 11B2;
+C048;C048;1108 1172 11B3;C048;1108 1172 11B3;
+C049;C049;1108 1172 11B4;C049;1108 1172 11B4;
+C04A;C04A;1108 1172 11B5;C04A;1108 1172 11B5;
+C04B;C04B;1108 1172 11B6;C04B;1108 1172 11B6;
+C04C;C04C;1108 1172 11B7;C04C;1108 1172 11B7;
+C04D;C04D;1108 1172 11B8;C04D;1108 1172 11B8;
+C04E;C04E;1108 1172 11B9;C04E;1108 1172 11B9;
+C04F;C04F;1108 1172 11BA;C04F;1108 1172 11BA;
+C050;C050;1108 1172 11BB;C050;1108 1172 11BB;
+C051;C051;1108 1172 11BC;C051;1108 1172 11BC;
+C052;C052;1108 1172 11BD;C052;1108 1172 11BD;
+C053;C053;1108 1172 11BE;C053;1108 1172 11BE;
+C054;C054;1108 1172 11BF;C054;1108 1172 11BF;
+C055;C055;1108 1172 11C0;C055;1108 1172 11C0;
+C056;C056;1108 1172 11C1;C056;1108 1172 11C1;
+C057;C057;1108 1172 11C2;C057;1108 1172 11C2;
+C058;C058;1108 1173;C058;1108 1173;
+C059;C059;1108 1173 11A8;C059;1108 1173 11A8;
+C05A;C05A;1108 1173 11A9;C05A;1108 1173 11A9;
+C05B;C05B;1108 1173 11AA;C05B;1108 1173 11AA;
+C05C;C05C;1108 1173 11AB;C05C;1108 1173 11AB;
+C05D;C05D;1108 1173 11AC;C05D;1108 1173 11AC;
+C05E;C05E;1108 1173 11AD;C05E;1108 1173 11AD;
+C05F;C05F;1108 1173 11AE;C05F;1108 1173 11AE;
+C060;C060;1108 1173 11AF;C060;1108 1173 11AF;
+C061;C061;1108 1173 11B0;C061;1108 1173 11B0;
+C062;C062;1108 1173 11B1;C062;1108 1173 11B1;
+C063;C063;1108 1173 11B2;C063;1108 1173 11B2;
+C064;C064;1108 1173 11B3;C064;1108 1173 11B3;
+C065;C065;1108 1173 11B4;C065;1108 1173 11B4;
+C066;C066;1108 1173 11B5;C066;1108 1173 11B5;
+C067;C067;1108 1173 11B6;C067;1108 1173 11B6;
+C068;C068;1108 1173 11B7;C068;1108 1173 11B7;
+C069;C069;1108 1173 11B8;C069;1108 1173 11B8;
+C06A;C06A;1108 1173 11B9;C06A;1108 1173 11B9;
+C06B;C06B;1108 1173 11BA;C06B;1108 1173 11BA;
+C06C;C06C;1108 1173 11BB;C06C;1108 1173 11BB;
+C06D;C06D;1108 1173 11BC;C06D;1108 1173 11BC;
+C06E;C06E;1108 1173 11BD;C06E;1108 1173 11BD;
+C06F;C06F;1108 1173 11BE;C06F;1108 1173 11BE;
+C070;C070;1108 1173 11BF;C070;1108 1173 11BF;
+C071;C071;1108 1173 11C0;C071;1108 1173 11C0;
+C072;C072;1108 1173 11C1;C072;1108 1173 11C1;
+C073;C073;1108 1173 11C2;C073;1108 1173 11C2;
+C074;C074;1108 1174;C074;1108 1174;
+C075;C075;1108 1174 11A8;C075;1108 1174 11A8;
+C076;C076;1108 1174 11A9;C076;1108 1174 11A9;
+C077;C077;1108 1174 11AA;C077;1108 1174 11AA;
+C078;C078;1108 1174 11AB;C078;1108 1174 11AB;
+C079;C079;1108 1174 11AC;C079;1108 1174 11AC;
+C07A;C07A;1108 1174 11AD;C07A;1108 1174 11AD;
+C07B;C07B;1108 1174 11AE;C07B;1108 1174 11AE;
+C07C;C07C;1108 1174 11AF;C07C;1108 1174 11AF;
+C07D;C07D;1108 1174 11B0;C07D;1108 1174 11B0;
+C07E;C07E;1108 1174 11B1;C07E;1108 1174 11B1;
+C07F;C07F;1108 1174 11B2;C07F;1108 1174 11B2;
+C080;C080;1108 1174 11B3;C080;1108 1174 11B3;
+C081;C081;1108 1174 11B4;C081;1108 1174 11B4;
+C082;C082;1108 1174 11B5;C082;1108 1174 11B5;
+C083;C083;1108 1174 11B6;C083;1108 1174 11B6;
+C084;C084;1108 1174 11B7;C084;1108 1174 11B7;
+C085;C085;1108 1174 11B8;C085;1108 1174 11B8;
+C086;C086;1108 1174 11B9;C086;1108 1174 11B9;
+C087;C087;1108 1174 11BA;C087;1108 1174 11BA;
+C088;C088;1108 1174 11BB;C088;1108 1174 11BB;
+C089;C089;1108 1174 11BC;C089;1108 1174 11BC;
+C08A;C08A;1108 1174 11BD;C08A;1108 1174 11BD;
+C08B;C08B;1108 1174 11BE;C08B;1108 1174 11BE;
+C08C;C08C;1108 1174 11BF;C08C;1108 1174 11BF;
+C08D;C08D;1108 1174 11C0;C08D;1108 1174 11C0;
+C08E;C08E;1108 1174 11C1;C08E;1108 1174 11C1;
+C08F;C08F;1108 1174 11C2;C08F;1108 1174 11C2;
+C090;C090;1108 1175;C090;1108 1175;
+C091;C091;1108 1175 11A8;C091;1108 1175 11A8;
+C092;C092;1108 1175 11A9;C092;1108 1175 11A9;
+C093;C093;1108 1175 11AA;C093;1108 1175 11AA;
+C094;C094;1108 1175 11AB;C094;1108 1175 11AB;
+C095;C095;1108 1175 11AC;C095;1108 1175 11AC;
+C096;C096;1108 1175 11AD;C096;1108 1175 11AD;
+C097;C097;1108 1175 11AE;C097;1108 1175 11AE;
+C098;C098;1108 1175 11AF;C098;1108 1175 11AF;
+C099;C099;1108 1175 11B0;C099;1108 1175 11B0;
+C09A;C09A;1108 1175 11B1;C09A;1108 1175 11B1;
+C09B;C09B;1108 1175 11B2;C09B;1108 1175 11B2;
+C09C;C09C;1108 1175 11B3;C09C;1108 1175 11B3;
+C09D;C09D;1108 1175 11B4;C09D;1108 1175 11B4;
+C09E;C09E;1108 1175 11B5;C09E;1108 1175 11B5;
+C09F;C09F;1108 1175 11B6;C09F;1108 1175 11B6;
+C0A0;C0A0;1108 1175 11B7;C0A0;1108 1175 11B7;
+C0A1;C0A1;1108 1175 11B8;C0A1;1108 1175 11B8;
+C0A2;C0A2;1108 1175 11B9;C0A2;1108 1175 11B9;
+C0A3;C0A3;1108 1175 11BA;C0A3;1108 1175 11BA;
+C0A4;C0A4;1108 1175 11BB;C0A4;1108 1175 11BB;
+C0A5;C0A5;1108 1175 11BC;C0A5;1108 1175 11BC;
+C0A6;C0A6;1108 1175 11BD;C0A6;1108 1175 11BD;
+C0A7;C0A7;1108 1175 11BE;C0A7;1108 1175 11BE;
+C0A8;C0A8;1108 1175 11BF;C0A8;1108 1175 11BF;
+C0A9;C0A9;1108 1175 11C0;C0A9;1108 1175 11C0;
+C0AA;C0AA;1108 1175 11C1;C0AA;1108 1175 11C1;
+C0AB;C0AB;1108 1175 11C2;C0AB;1108 1175 11C2;
+C0AC;C0AC;1109 1161;C0AC;1109 1161;
+C0AD;C0AD;1109 1161 11A8;C0AD;1109 1161 11A8;
+C0AE;C0AE;1109 1161 11A9;C0AE;1109 1161 11A9;
+C0AF;C0AF;1109 1161 11AA;C0AF;1109 1161 11AA;
+C0B0;C0B0;1109 1161 11AB;C0B0;1109 1161 11AB;
+C0B1;C0B1;1109 1161 11AC;C0B1;1109 1161 11AC;
+C0B2;C0B2;1109 1161 11AD;C0B2;1109 1161 11AD;
+C0B3;C0B3;1109 1161 11AE;C0B3;1109 1161 11AE;
+C0B4;C0B4;1109 1161 11AF;C0B4;1109 1161 11AF;
+C0B5;C0B5;1109 1161 11B0;C0B5;1109 1161 11B0;
+C0B6;C0B6;1109 1161 11B1;C0B6;1109 1161 11B1;
+C0B7;C0B7;1109 1161 11B2;C0B7;1109 1161 11B2;
+C0B8;C0B8;1109 1161 11B3;C0B8;1109 1161 11B3;
+C0B9;C0B9;1109 1161 11B4;C0B9;1109 1161 11B4;
+C0BA;C0BA;1109 1161 11B5;C0BA;1109 1161 11B5;
+C0BB;C0BB;1109 1161 11B6;C0BB;1109 1161 11B6;
+C0BC;C0BC;1109 1161 11B7;C0BC;1109 1161 11B7;
+C0BD;C0BD;1109 1161 11B8;C0BD;1109 1161 11B8;
+C0BE;C0BE;1109 1161 11B9;C0BE;1109 1161 11B9;
+C0BF;C0BF;1109 1161 11BA;C0BF;1109 1161 11BA;
+C0C0;C0C0;1109 1161 11BB;C0C0;1109 1161 11BB;
+C0C1;C0C1;1109 1161 11BC;C0C1;1109 1161 11BC;
+C0C2;C0C2;1109 1161 11BD;C0C2;1109 1161 11BD;
+C0C3;C0C3;1109 1161 11BE;C0C3;1109 1161 11BE;
+C0C4;C0C4;1109 1161 11BF;C0C4;1109 1161 11BF;
+C0C5;C0C5;1109 1161 11C0;C0C5;1109 1161 11C0;
+C0C6;C0C6;1109 1161 11C1;C0C6;1109 1161 11C1;
+C0C7;C0C7;1109 1161 11C2;C0C7;1109 1161 11C2;
+C0C8;C0C8;1109 1162;C0C8;1109 1162;
+C0C9;C0C9;1109 1162 11A8;C0C9;1109 1162 11A8;
+C0CA;C0CA;1109 1162 11A9;C0CA;1109 1162 11A9;
+C0CB;C0CB;1109 1162 11AA;C0CB;1109 1162 11AA;
+C0CC;C0CC;1109 1162 11AB;C0CC;1109 1162 11AB;
+C0CD;C0CD;1109 1162 11AC;C0CD;1109 1162 11AC;
+C0CE;C0CE;1109 1162 11AD;C0CE;1109 1162 11AD;
+C0CF;C0CF;1109 1162 11AE;C0CF;1109 1162 11AE;
+C0D0;C0D0;1109 1162 11AF;C0D0;1109 1162 11AF;
+C0D1;C0D1;1109 1162 11B0;C0D1;1109 1162 11B0;
+C0D2;C0D2;1109 1162 11B1;C0D2;1109 1162 11B1;
+C0D3;C0D3;1109 1162 11B2;C0D3;1109 1162 11B2;
+C0D4;C0D4;1109 1162 11B3;C0D4;1109 1162 11B3;
+C0D5;C0D5;1109 1162 11B4;C0D5;1109 1162 11B4;
+C0D6;C0D6;1109 1162 11B5;C0D6;1109 1162 11B5;
+C0D7;C0D7;1109 1162 11B6;C0D7;1109 1162 11B6;
+C0D8;C0D8;1109 1162 11B7;C0D8;1109 1162 11B7;
+C0D9;C0D9;1109 1162 11B8;C0D9;1109 1162 11B8;
+C0DA;C0DA;1109 1162 11B9;C0DA;1109 1162 11B9;
+C0DB;C0DB;1109 1162 11BA;C0DB;1109 1162 11BA;
+C0DC;C0DC;1109 1162 11BB;C0DC;1109 1162 11BB;
+C0DD;C0DD;1109 1162 11BC;C0DD;1109 1162 11BC;
+C0DE;C0DE;1109 1162 11BD;C0DE;1109 1162 11BD;
+C0DF;C0DF;1109 1162 11BE;C0DF;1109 1162 11BE;
+C0E0;C0E0;1109 1162 11BF;C0E0;1109 1162 11BF;
+C0E1;C0E1;1109 1162 11C0;C0E1;1109 1162 11C0;
+C0E2;C0E2;1109 1162 11C1;C0E2;1109 1162 11C1;
+C0E3;C0E3;1109 1162 11C2;C0E3;1109 1162 11C2;
+C0E4;C0E4;1109 1163;C0E4;1109 1163;
+C0E5;C0E5;1109 1163 11A8;C0E5;1109 1163 11A8;
+C0E6;C0E6;1109 1163 11A9;C0E6;1109 1163 11A9;
+C0E7;C0E7;1109 1163 11AA;C0E7;1109 1163 11AA;
+C0E8;C0E8;1109 1163 11AB;C0E8;1109 1163 11AB;
+C0E9;C0E9;1109 1163 11AC;C0E9;1109 1163 11AC;
+C0EA;C0EA;1109 1163 11AD;C0EA;1109 1163 11AD;
+C0EB;C0EB;1109 1163 11AE;C0EB;1109 1163 11AE;
+C0EC;C0EC;1109 1163 11AF;C0EC;1109 1163 11AF;
+C0ED;C0ED;1109 1163 11B0;C0ED;1109 1163 11B0;
+C0EE;C0EE;1109 1163 11B1;C0EE;1109 1163 11B1;
+C0EF;C0EF;1109 1163 11B2;C0EF;1109 1163 11B2;
+C0F0;C0F0;1109 1163 11B3;C0F0;1109 1163 11B3;
+C0F1;C0F1;1109 1163 11B4;C0F1;1109 1163 11B4;
+C0F2;C0F2;1109 1163 11B5;C0F2;1109 1163 11B5;
+C0F3;C0F3;1109 1163 11B6;C0F3;1109 1163 11B6;
+C0F4;C0F4;1109 1163 11B7;C0F4;1109 1163 11B7;
+C0F5;C0F5;1109 1163 11B8;C0F5;1109 1163 11B8;
+C0F6;C0F6;1109 1163 11B9;C0F6;1109 1163 11B9;
+C0F7;C0F7;1109 1163 11BA;C0F7;1109 1163 11BA;
+C0F8;C0F8;1109 1163 11BB;C0F8;1109 1163 11BB;
+C0F9;C0F9;1109 1163 11BC;C0F9;1109 1163 11BC;
+C0FA;C0FA;1109 1163 11BD;C0FA;1109 1163 11BD;
+C0FB;C0FB;1109 1163 11BE;C0FB;1109 1163 11BE;
+C0FC;C0FC;1109 1163 11BF;C0FC;1109 1163 11BF;
+C0FD;C0FD;1109 1163 11C0;C0FD;1109 1163 11C0;
+C0FE;C0FE;1109 1163 11C1;C0FE;1109 1163 11C1;
+C0FF;C0FF;1109 1163 11C2;C0FF;1109 1163 11C2;
+C100;C100;1109 1164;C100;1109 1164;
+C101;C101;1109 1164 11A8;C101;1109 1164 11A8;
+C102;C102;1109 1164 11A9;C102;1109 1164 11A9;
+C103;C103;1109 1164 11AA;C103;1109 1164 11AA;
+C104;C104;1109 1164 11AB;C104;1109 1164 11AB;
+C105;C105;1109 1164 11AC;C105;1109 1164 11AC;
+C106;C106;1109 1164 11AD;C106;1109 1164 11AD;
+C107;C107;1109 1164 11AE;C107;1109 1164 11AE;
+C108;C108;1109 1164 11AF;C108;1109 1164 11AF;
+C109;C109;1109 1164 11B0;C109;1109 1164 11B0;
+C10A;C10A;1109 1164 11B1;C10A;1109 1164 11B1;
+C10B;C10B;1109 1164 11B2;C10B;1109 1164 11B2;
+C10C;C10C;1109 1164 11B3;C10C;1109 1164 11B3;
+C10D;C10D;1109 1164 11B4;C10D;1109 1164 11B4;
+C10E;C10E;1109 1164 11B5;C10E;1109 1164 11B5;
+C10F;C10F;1109 1164 11B6;C10F;1109 1164 11B6;
+C110;C110;1109 1164 11B7;C110;1109 1164 11B7;
+C111;C111;1109 1164 11B8;C111;1109 1164 11B8;
+C112;C112;1109 1164 11B9;C112;1109 1164 11B9;
+C113;C113;1109 1164 11BA;C113;1109 1164 11BA;
+C114;C114;1109 1164 11BB;C114;1109 1164 11BB;
+C115;C115;1109 1164 11BC;C115;1109 1164 11BC;
+C116;C116;1109 1164 11BD;C116;1109 1164 11BD;
+C117;C117;1109 1164 11BE;C117;1109 1164 11BE;
+C118;C118;1109 1164 11BF;C118;1109 1164 11BF;
+C119;C119;1109 1164 11C0;C119;1109 1164 11C0;
+C11A;C11A;1109 1164 11C1;C11A;1109 1164 11C1;
+C11B;C11B;1109 1164 11C2;C11B;1109 1164 11C2;
+C11C;C11C;1109 1165;C11C;1109 1165;
+C11D;C11D;1109 1165 11A8;C11D;1109 1165 11A8;
+C11E;C11E;1109 1165 11A9;C11E;1109 1165 11A9;
+C11F;C11F;1109 1165 11AA;C11F;1109 1165 11AA;
+C120;C120;1109 1165 11AB;C120;1109 1165 11AB;
+C121;C121;1109 1165 11AC;C121;1109 1165 11AC;
+C122;C122;1109 1165 11AD;C122;1109 1165 11AD;
+C123;C123;1109 1165 11AE;C123;1109 1165 11AE;
+C124;C124;1109 1165 11AF;C124;1109 1165 11AF;
+C125;C125;1109 1165 11B0;C125;1109 1165 11B0;
+C126;C126;1109 1165 11B1;C126;1109 1165 11B1;
+C127;C127;1109 1165 11B2;C127;1109 1165 11B2;
+C128;C128;1109 1165 11B3;C128;1109 1165 11B3;
+C129;C129;1109 1165 11B4;C129;1109 1165 11B4;
+C12A;C12A;1109 1165 11B5;C12A;1109 1165 11B5;
+C12B;C12B;1109 1165 11B6;C12B;1109 1165 11B6;
+C12C;C12C;1109 1165 11B7;C12C;1109 1165 11B7;
+C12D;C12D;1109 1165 11B8;C12D;1109 1165 11B8;
+C12E;C12E;1109 1165 11B9;C12E;1109 1165 11B9;
+C12F;C12F;1109 1165 11BA;C12F;1109 1165 11BA;
+C130;C130;1109 1165 11BB;C130;1109 1165 11BB;
+C131;C131;1109 1165 11BC;C131;1109 1165 11BC;
+C132;C132;1109 1165 11BD;C132;1109 1165 11BD;
+C133;C133;1109 1165 11BE;C133;1109 1165 11BE;
+C134;C134;1109 1165 11BF;C134;1109 1165 11BF;
+C135;C135;1109 1165 11C0;C135;1109 1165 11C0;
+C136;C136;1109 1165 11C1;C136;1109 1165 11C1;
+C137;C137;1109 1165 11C2;C137;1109 1165 11C2;
+C138;C138;1109 1166;C138;1109 1166;
+C139;C139;1109 1166 11A8;C139;1109 1166 11A8;
+C13A;C13A;1109 1166 11A9;C13A;1109 1166 11A9;
+C13B;C13B;1109 1166 11AA;C13B;1109 1166 11AA;
+C13C;C13C;1109 1166 11AB;C13C;1109 1166 11AB;
+C13D;C13D;1109 1166 11AC;C13D;1109 1166 11AC;
+C13E;C13E;1109 1166 11AD;C13E;1109 1166 11AD;
+C13F;C13F;1109 1166 11AE;C13F;1109 1166 11AE;
+C140;C140;1109 1166 11AF;C140;1109 1166 11AF;
+C141;C141;1109 1166 11B0;C141;1109 1166 11B0;
+C142;C142;1109 1166 11B1;C142;1109 1166 11B1;
+C143;C143;1109 1166 11B2;C143;1109 1166 11B2;
+C144;C144;1109 1166 11B3;C144;1109 1166 11B3;
+C145;C145;1109 1166 11B4;C145;1109 1166 11B4;
+C146;C146;1109 1166 11B5;C146;1109 1166 11B5;
+C147;C147;1109 1166 11B6;C147;1109 1166 11B6;
+C148;C148;1109 1166 11B7;C148;1109 1166 11B7;
+C149;C149;1109 1166 11B8;C149;1109 1166 11B8;
+C14A;C14A;1109 1166 11B9;C14A;1109 1166 11B9;
+C14B;C14B;1109 1166 11BA;C14B;1109 1166 11BA;
+C14C;C14C;1109 1166 11BB;C14C;1109 1166 11BB;
+C14D;C14D;1109 1166 11BC;C14D;1109 1166 11BC;
+C14E;C14E;1109 1166 11BD;C14E;1109 1166 11BD;
+C14F;C14F;1109 1166 11BE;C14F;1109 1166 11BE;
+C150;C150;1109 1166 11BF;C150;1109 1166 11BF;
+C151;C151;1109 1166 11C0;C151;1109 1166 11C0;
+C152;C152;1109 1166 11C1;C152;1109 1166 11C1;
+C153;C153;1109 1166 11C2;C153;1109 1166 11C2;
+C154;C154;1109 1167;C154;1109 1167;
+C155;C155;1109 1167 11A8;C155;1109 1167 11A8;
+C156;C156;1109 1167 11A9;C156;1109 1167 11A9;
+C157;C157;1109 1167 11AA;C157;1109 1167 11AA;
+C158;C158;1109 1167 11AB;C158;1109 1167 11AB;
+C159;C159;1109 1167 11AC;C159;1109 1167 11AC;
+C15A;C15A;1109 1167 11AD;C15A;1109 1167 11AD;
+C15B;C15B;1109 1167 11AE;C15B;1109 1167 11AE;
+C15C;C15C;1109 1167 11AF;C15C;1109 1167 11AF;
+C15D;C15D;1109 1167 11B0;C15D;1109 1167 11B0;
+C15E;C15E;1109 1167 11B1;C15E;1109 1167 11B1;
+C15F;C15F;1109 1167 11B2;C15F;1109 1167 11B2;
+C160;C160;1109 1167 11B3;C160;1109 1167 11B3;
+C161;C161;1109 1167 11B4;C161;1109 1167 11B4;
+C162;C162;1109 1167 11B5;C162;1109 1167 11B5;
+C163;C163;1109 1167 11B6;C163;1109 1167 11B6;
+C164;C164;1109 1167 11B7;C164;1109 1167 11B7;
+C165;C165;1109 1167 11B8;C165;1109 1167 11B8;
+C166;C166;1109 1167 11B9;C166;1109 1167 11B9;
+C167;C167;1109 1167 11BA;C167;1109 1167 11BA;
+C168;C168;1109 1167 11BB;C168;1109 1167 11BB;
+C169;C169;1109 1167 11BC;C169;1109 1167 11BC;
+C16A;C16A;1109 1167 11BD;C16A;1109 1167 11BD;
+C16B;C16B;1109 1167 11BE;C16B;1109 1167 11BE;
+C16C;C16C;1109 1167 11BF;C16C;1109 1167 11BF;
+C16D;C16D;1109 1167 11C0;C16D;1109 1167 11C0;
+C16E;C16E;1109 1167 11C1;C16E;1109 1167 11C1;
+C16F;C16F;1109 1167 11C2;C16F;1109 1167 11C2;
+C170;C170;1109 1168;C170;1109 1168;
+C171;C171;1109 1168 11A8;C171;1109 1168 11A8;
+C172;C172;1109 1168 11A9;C172;1109 1168 11A9;
+C173;C173;1109 1168 11AA;C173;1109 1168 11AA;
+C174;C174;1109 1168 11AB;C174;1109 1168 11AB;
+C175;C175;1109 1168 11AC;C175;1109 1168 11AC;
+C176;C176;1109 1168 11AD;C176;1109 1168 11AD;
+C177;C177;1109 1168 11AE;C177;1109 1168 11AE;
+C178;C178;1109 1168 11AF;C178;1109 1168 11AF;
+C179;C179;1109 1168 11B0;C179;1109 1168 11B0;
+C17A;C17A;1109 1168 11B1;C17A;1109 1168 11B1;
+C17B;C17B;1109 1168 11B2;C17B;1109 1168 11B2;
+C17C;C17C;1109 1168 11B3;C17C;1109 1168 11B3;
+C17D;C17D;1109 1168 11B4;C17D;1109 1168 11B4;
+C17E;C17E;1109 1168 11B5;C17E;1109 1168 11B5;
+C17F;C17F;1109 1168 11B6;C17F;1109 1168 11B6;
+C180;C180;1109 1168 11B7;C180;1109 1168 11B7;
+C181;C181;1109 1168 11B8;C181;1109 1168 11B8;
+C182;C182;1109 1168 11B9;C182;1109 1168 11B9;
+C183;C183;1109 1168 11BA;C183;1109 1168 11BA;
+C184;C184;1109 1168 11BB;C184;1109 1168 11BB;
+C185;C185;1109 1168 11BC;C185;1109 1168 11BC;
+C186;C186;1109 1168 11BD;C186;1109 1168 11BD;
+C187;C187;1109 1168 11BE;C187;1109 1168 11BE;
+C188;C188;1109 1168 11BF;C188;1109 1168 11BF;
+C189;C189;1109 1168 11C0;C189;1109 1168 11C0;
+C18A;C18A;1109 1168 11C1;C18A;1109 1168 11C1;
+C18B;C18B;1109 1168 11C2;C18B;1109 1168 11C2;
+C18C;C18C;1109 1169;C18C;1109 1169;
+C18D;C18D;1109 1169 11A8;C18D;1109 1169 11A8;
+C18E;C18E;1109 1169 11A9;C18E;1109 1169 11A9;
+C18F;C18F;1109 1169 11AA;C18F;1109 1169 11AA;
+C190;C190;1109 1169 11AB;C190;1109 1169 11AB;
+C191;C191;1109 1169 11AC;C191;1109 1169 11AC;
+C192;C192;1109 1169 11AD;C192;1109 1169 11AD;
+C193;C193;1109 1169 11AE;C193;1109 1169 11AE;
+C194;C194;1109 1169 11AF;C194;1109 1169 11AF;
+C195;C195;1109 1169 11B0;C195;1109 1169 11B0;
+C196;C196;1109 1169 11B1;C196;1109 1169 11B1;
+C197;C197;1109 1169 11B2;C197;1109 1169 11B2;
+C198;C198;1109 1169 11B3;C198;1109 1169 11B3;
+C199;C199;1109 1169 11B4;C199;1109 1169 11B4;
+C19A;C19A;1109 1169 11B5;C19A;1109 1169 11B5;
+C19B;C19B;1109 1169 11B6;C19B;1109 1169 11B6;
+C19C;C19C;1109 1169 11B7;C19C;1109 1169 11B7;
+C19D;C19D;1109 1169 11B8;C19D;1109 1169 11B8;
+C19E;C19E;1109 1169 11B9;C19E;1109 1169 11B9;
+C19F;C19F;1109 1169 11BA;C19F;1109 1169 11BA;
+C1A0;C1A0;1109 1169 11BB;C1A0;1109 1169 11BB;
+C1A1;C1A1;1109 1169 11BC;C1A1;1109 1169 11BC;
+C1A2;C1A2;1109 1169 11BD;C1A2;1109 1169 11BD;
+C1A3;C1A3;1109 1169 11BE;C1A3;1109 1169 11BE;
+C1A4;C1A4;1109 1169 11BF;C1A4;1109 1169 11BF;
+C1A5;C1A5;1109 1169 11C0;C1A5;1109 1169 11C0;
+C1A6;C1A6;1109 1169 11C1;C1A6;1109 1169 11C1;
+C1A7;C1A7;1109 1169 11C2;C1A7;1109 1169 11C2;
+C1A8;C1A8;1109 116A;C1A8;1109 116A;
+C1A9;C1A9;1109 116A 11A8;C1A9;1109 116A 11A8;
+C1AA;C1AA;1109 116A 11A9;C1AA;1109 116A 11A9;
+C1AB;C1AB;1109 116A 11AA;C1AB;1109 116A 11AA;
+C1AC;C1AC;1109 116A 11AB;C1AC;1109 116A 11AB;
+C1AD;C1AD;1109 116A 11AC;C1AD;1109 116A 11AC;
+C1AE;C1AE;1109 116A 11AD;C1AE;1109 116A 11AD;
+C1AF;C1AF;1109 116A 11AE;C1AF;1109 116A 11AE;
+C1B0;C1B0;1109 116A 11AF;C1B0;1109 116A 11AF;
+C1B1;C1B1;1109 116A 11B0;C1B1;1109 116A 11B0;
+C1B2;C1B2;1109 116A 11B1;C1B2;1109 116A 11B1;
+C1B3;C1B3;1109 116A 11B2;C1B3;1109 116A 11B2;
+C1B4;C1B4;1109 116A 11B3;C1B4;1109 116A 11B3;
+C1B5;C1B5;1109 116A 11B4;C1B5;1109 116A 11B4;
+C1B6;C1B6;1109 116A 11B5;C1B6;1109 116A 11B5;
+C1B7;C1B7;1109 116A 11B6;C1B7;1109 116A 11B6;
+C1B8;C1B8;1109 116A 11B7;C1B8;1109 116A 11B7;
+C1B9;C1B9;1109 116A 11B8;C1B9;1109 116A 11B8;
+C1BA;C1BA;1109 116A 11B9;C1BA;1109 116A 11B9;
+C1BB;C1BB;1109 116A 11BA;C1BB;1109 116A 11BA;
+C1BC;C1BC;1109 116A 11BB;C1BC;1109 116A 11BB;
+C1BD;C1BD;1109 116A 11BC;C1BD;1109 116A 11BC;
+C1BE;C1BE;1109 116A 11BD;C1BE;1109 116A 11BD;
+C1BF;C1BF;1109 116A 11BE;C1BF;1109 116A 11BE;
+C1C0;C1C0;1109 116A 11BF;C1C0;1109 116A 11BF;
+C1C1;C1C1;1109 116A 11C0;C1C1;1109 116A 11C0;
+C1C2;C1C2;1109 116A 11C1;C1C2;1109 116A 11C1;
+C1C3;C1C3;1109 116A 11C2;C1C3;1109 116A 11C2;
+C1C4;C1C4;1109 116B;C1C4;1109 116B;
+C1C5;C1C5;1109 116B 11A8;C1C5;1109 116B 11A8;
+C1C6;C1C6;1109 116B 11A9;C1C6;1109 116B 11A9;
+C1C7;C1C7;1109 116B 11AA;C1C7;1109 116B 11AA;
+C1C8;C1C8;1109 116B 11AB;C1C8;1109 116B 11AB;
+C1C9;C1C9;1109 116B 11AC;C1C9;1109 116B 11AC;
+C1CA;C1CA;1109 116B 11AD;C1CA;1109 116B 11AD;
+C1CB;C1CB;1109 116B 11AE;C1CB;1109 116B 11AE;
+C1CC;C1CC;1109 116B 11AF;C1CC;1109 116B 11AF;
+C1CD;C1CD;1109 116B 11B0;C1CD;1109 116B 11B0;
+C1CE;C1CE;1109 116B 11B1;C1CE;1109 116B 11B1;
+C1CF;C1CF;1109 116B 11B2;C1CF;1109 116B 11B2;
+C1D0;C1D0;1109 116B 11B3;C1D0;1109 116B 11B3;
+C1D1;C1D1;1109 116B 11B4;C1D1;1109 116B 11B4;
+C1D2;C1D2;1109 116B 11B5;C1D2;1109 116B 11B5;
+C1D3;C1D3;1109 116B 11B6;C1D3;1109 116B 11B6;
+C1D4;C1D4;1109 116B 11B7;C1D4;1109 116B 11B7;
+C1D5;C1D5;1109 116B 11B8;C1D5;1109 116B 11B8;
+C1D6;C1D6;1109 116B 11B9;C1D6;1109 116B 11B9;
+C1D7;C1D7;1109 116B 11BA;C1D7;1109 116B 11BA;
+C1D8;C1D8;1109 116B 11BB;C1D8;1109 116B 11BB;
+C1D9;C1D9;1109 116B 11BC;C1D9;1109 116B 11BC;
+C1DA;C1DA;1109 116B 11BD;C1DA;1109 116B 11BD;
+C1DB;C1DB;1109 116B 11BE;C1DB;1109 116B 11BE;
+C1DC;C1DC;1109 116B 11BF;C1DC;1109 116B 11BF;
+C1DD;C1DD;1109 116B 11C0;C1DD;1109 116B 11C0;
+C1DE;C1DE;1109 116B 11C1;C1DE;1109 116B 11C1;
+C1DF;C1DF;1109 116B 11C2;C1DF;1109 116B 11C2;
+C1E0;C1E0;1109 116C;C1E0;1109 116C;
+C1E1;C1E1;1109 116C 11A8;C1E1;1109 116C 11A8;
+C1E2;C1E2;1109 116C 11A9;C1E2;1109 116C 11A9;
+C1E3;C1E3;1109 116C 11AA;C1E3;1109 116C 11AA;
+C1E4;C1E4;1109 116C 11AB;C1E4;1109 116C 11AB;
+C1E5;C1E5;1109 116C 11AC;C1E5;1109 116C 11AC;
+C1E6;C1E6;1109 116C 11AD;C1E6;1109 116C 11AD;
+C1E7;C1E7;1109 116C 11AE;C1E7;1109 116C 11AE;
+C1E8;C1E8;1109 116C 11AF;C1E8;1109 116C 11AF;
+C1E9;C1E9;1109 116C 11B0;C1E9;1109 116C 11B0;
+C1EA;C1EA;1109 116C 11B1;C1EA;1109 116C 11B1;
+C1EB;C1EB;1109 116C 11B2;C1EB;1109 116C 11B2;
+C1EC;C1EC;1109 116C 11B3;C1EC;1109 116C 11B3;
+C1ED;C1ED;1109 116C 11B4;C1ED;1109 116C 11B4;
+C1EE;C1EE;1109 116C 11B5;C1EE;1109 116C 11B5;
+C1EF;C1EF;1109 116C 11B6;C1EF;1109 116C 11B6;
+C1F0;C1F0;1109 116C 11B7;C1F0;1109 116C 11B7;
+C1F1;C1F1;1109 116C 11B8;C1F1;1109 116C 11B8;
+C1F2;C1F2;1109 116C 11B9;C1F2;1109 116C 11B9;
+C1F3;C1F3;1109 116C 11BA;C1F3;1109 116C 11BA;
+C1F4;C1F4;1109 116C 11BB;C1F4;1109 116C 11BB;
+C1F5;C1F5;1109 116C 11BC;C1F5;1109 116C 11BC;
+C1F6;C1F6;1109 116C 11BD;C1F6;1109 116C 11BD;
+C1F7;C1F7;1109 116C 11BE;C1F7;1109 116C 11BE;
+C1F8;C1F8;1109 116C 11BF;C1F8;1109 116C 11BF;
+C1F9;C1F9;1109 116C 11C0;C1F9;1109 116C 11C0;
+C1FA;C1FA;1109 116C 11C1;C1FA;1109 116C 11C1;
+C1FB;C1FB;1109 116C 11C2;C1FB;1109 116C 11C2;
+C1FC;C1FC;1109 116D;C1FC;1109 116D;
+C1FD;C1FD;1109 116D 11A8;C1FD;1109 116D 11A8;
+C1FE;C1FE;1109 116D 11A9;C1FE;1109 116D 11A9;
+C1FF;C1FF;1109 116D 11AA;C1FF;1109 116D 11AA;
+C200;C200;1109 116D 11AB;C200;1109 116D 11AB;
+C201;C201;1109 116D 11AC;C201;1109 116D 11AC;
+C202;C202;1109 116D 11AD;C202;1109 116D 11AD;
+C203;C203;1109 116D 11AE;C203;1109 116D 11AE;
+C204;C204;1109 116D 11AF;C204;1109 116D 11AF;
+C205;C205;1109 116D 11B0;C205;1109 116D 11B0;
+C206;C206;1109 116D 11B1;C206;1109 116D 11B1;
+C207;C207;1109 116D 11B2;C207;1109 116D 11B2;
+C208;C208;1109 116D 11B3;C208;1109 116D 11B3;
+C209;C209;1109 116D 11B4;C209;1109 116D 11B4;
+C20A;C20A;1109 116D 11B5;C20A;1109 116D 11B5;
+C20B;C20B;1109 116D 11B6;C20B;1109 116D 11B6;
+C20C;C20C;1109 116D 11B7;C20C;1109 116D 11B7;
+C20D;C20D;1109 116D 11B8;C20D;1109 116D 11B8;
+C20E;C20E;1109 116D 11B9;C20E;1109 116D 11B9;
+C20F;C20F;1109 116D 11BA;C20F;1109 116D 11BA;
+C210;C210;1109 116D 11BB;C210;1109 116D 11BB;
+C211;C211;1109 116D 11BC;C211;1109 116D 11BC;
+C212;C212;1109 116D 11BD;C212;1109 116D 11BD;
+C213;C213;1109 116D 11BE;C213;1109 116D 11BE;
+C214;C214;1109 116D 11BF;C214;1109 116D 11BF;
+C215;C215;1109 116D 11C0;C215;1109 116D 11C0;
+C216;C216;1109 116D 11C1;C216;1109 116D 11C1;
+C217;C217;1109 116D 11C2;C217;1109 116D 11C2;
+C218;C218;1109 116E;C218;1109 116E;
+C219;C219;1109 116E 11A8;C219;1109 116E 11A8;
+C21A;C21A;1109 116E 11A9;C21A;1109 116E 11A9;
+C21B;C21B;1109 116E 11AA;C21B;1109 116E 11AA;
+C21C;C21C;1109 116E 11AB;C21C;1109 116E 11AB;
+C21D;C21D;1109 116E 11AC;C21D;1109 116E 11AC;
+C21E;C21E;1109 116E 11AD;C21E;1109 116E 11AD;
+C21F;C21F;1109 116E 11AE;C21F;1109 116E 11AE;
+C220;C220;1109 116E 11AF;C220;1109 116E 11AF;
+C221;C221;1109 116E 11B0;C221;1109 116E 11B0;
+C222;C222;1109 116E 11B1;C222;1109 116E 11B1;
+C223;C223;1109 116E 11B2;C223;1109 116E 11B2;
+C224;C224;1109 116E 11B3;C224;1109 116E 11B3;
+C225;C225;1109 116E 11B4;C225;1109 116E 11B4;
+C226;C226;1109 116E 11B5;C226;1109 116E 11B5;
+C227;C227;1109 116E 11B6;C227;1109 116E 11B6;
+C228;C228;1109 116E 11B7;C228;1109 116E 11B7;
+C229;C229;1109 116E 11B8;C229;1109 116E 11B8;
+C22A;C22A;1109 116E 11B9;C22A;1109 116E 11B9;
+C22B;C22B;1109 116E 11BA;C22B;1109 116E 11BA;
+C22C;C22C;1109 116E 11BB;C22C;1109 116E 11BB;
+C22D;C22D;1109 116E 11BC;C22D;1109 116E 11BC;
+C22E;C22E;1109 116E 11BD;C22E;1109 116E 11BD;
+C22F;C22F;1109 116E 11BE;C22F;1109 116E 11BE;
+C230;C230;1109 116E 11BF;C230;1109 116E 11BF;
+C231;C231;1109 116E 11C0;C231;1109 116E 11C0;
+C232;C232;1109 116E 11C1;C232;1109 116E 11C1;
+C233;C233;1109 116E 11C2;C233;1109 116E 11C2;
+C234;C234;1109 116F;C234;1109 116F;
+C235;C235;1109 116F 11A8;C235;1109 116F 11A8;
+C236;C236;1109 116F 11A9;C236;1109 116F 11A9;
+C237;C237;1109 116F 11AA;C237;1109 116F 11AA;
+C238;C238;1109 116F 11AB;C238;1109 116F 11AB;
+C239;C239;1109 116F 11AC;C239;1109 116F 11AC;
+C23A;C23A;1109 116F 11AD;C23A;1109 116F 11AD;
+C23B;C23B;1109 116F 11AE;C23B;1109 116F 11AE;
+C23C;C23C;1109 116F 11AF;C23C;1109 116F 11AF;
+C23D;C23D;1109 116F 11B0;C23D;1109 116F 11B0;
+C23E;C23E;1109 116F 11B1;C23E;1109 116F 11B1;
+C23F;C23F;1109 116F 11B2;C23F;1109 116F 11B2;
+C240;C240;1109 116F 11B3;C240;1109 116F 11B3;
+C241;C241;1109 116F 11B4;C241;1109 116F 11B4;
+C242;C242;1109 116F 11B5;C242;1109 116F 11B5;
+C243;C243;1109 116F 11B6;C243;1109 116F 11B6;
+C244;C244;1109 116F 11B7;C244;1109 116F 11B7;
+C245;C245;1109 116F 11B8;C245;1109 116F 11B8;
+C246;C246;1109 116F 11B9;C246;1109 116F 11B9;
+C247;C247;1109 116F 11BA;C247;1109 116F 11BA;
+C248;C248;1109 116F 11BB;C248;1109 116F 11BB;
+C249;C249;1109 116F 11BC;C249;1109 116F 11BC;
+C24A;C24A;1109 116F 11BD;C24A;1109 116F 11BD;
+C24B;C24B;1109 116F 11BE;C24B;1109 116F 11BE;
+C24C;C24C;1109 116F 11BF;C24C;1109 116F 11BF;
+C24D;C24D;1109 116F 11C0;C24D;1109 116F 11C0;
+C24E;C24E;1109 116F 11C1;C24E;1109 116F 11C1;
+C24F;C24F;1109 116F 11C2;C24F;1109 116F 11C2;
+C250;C250;1109 1170;C250;1109 1170;
+C251;C251;1109 1170 11A8;C251;1109 1170 11A8;
+C252;C252;1109 1170 11A9;C252;1109 1170 11A9;
+C253;C253;1109 1170 11AA;C253;1109 1170 11AA;
+C254;C254;1109 1170 11AB;C254;1109 1170 11AB;
+C255;C255;1109 1170 11AC;C255;1109 1170 11AC;
+C256;C256;1109 1170 11AD;C256;1109 1170 11AD;
+C257;C257;1109 1170 11AE;C257;1109 1170 11AE;
+C258;C258;1109 1170 11AF;C258;1109 1170 11AF;
+C259;C259;1109 1170 11B0;C259;1109 1170 11B0;
+C25A;C25A;1109 1170 11B1;C25A;1109 1170 11B1;
+C25B;C25B;1109 1170 11B2;C25B;1109 1170 11B2;
+C25C;C25C;1109 1170 11B3;C25C;1109 1170 11B3;
+C25D;C25D;1109 1170 11B4;C25D;1109 1170 11B4;
+C25E;C25E;1109 1170 11B5;C25E;1109 1170 11B5;
+C25F;C25F;1109 1170 11B6;C25F;1109 1170 11B6;
+C260;C260;1109 1170 11B7;C260;1109 1170 11B7;
+C261;C261;1109 1170 11B8;C261;1109 1170 11B8;
+C262;C262;1109 1170 11B9;C262;1109 1170 11B9;
+C263;C263;1109 1170 11BA;C263;1109 1170 11BA;
+C264;C264;1109 1170 11BB;C264;1109 1170 11BB;
+C265;C265;1109 1170 11BC;C265;1109 1170 11BC;
+C266;C266;1109 1170 11BD;C266;1109 1170 11BD;
+C267;C267;1109 1170 11BE;C267;1109 1170 11BE;
+C268;C268;1109 1170 11BF;C268;1109 1170 11BF;
+C269;C269;1109 1170 11C0;C269;1109 1170 11C0;
+C26A;C26A;1109 1170 11C1;C26A;1109 1170 11C1;
+C26B;C26B;1109 1170 11C2;C26B;1109 1170 11C2;
+C26C;C26C;1109 1171;C26C;1109 1171;
+C26D;C26D;1109 1171 11A8;C26D;1109 1171 11A8;
+C26E;C26E;1109 1171 11A9;C26E;1109 1171 11A9;
+C26F;C26F;1109 1171 11AA;C26F;1109 1171 11AA;
+C270;C270;1109 1171 11AB;C270;1109 1171 11AB;
+C271;C271;1109 1171 11AC;C271;1109 1171 11AC;
+C272;C272;1109 1171 11AD;C272;1109 1171 11AD;
+C273;C273;1109 1171 11AE;C273;1109 1171 11AE;
+C274;C274;1109 1171 11AF;C274;1109 1171 11AF;
+C275;C275;1109 1171 11B0;C275;1109 1171 11B0;
+C276;C276;1109 1171 11B1;C276;1109 1171 11B1;
+C277;C277;1109 1171 11B2;C277;1109 1171 11B2;
+C278;C278;1109 1171 11B3;C278;1109 1171 11B3;
+C279;C279;1109 1171 11B4;C279;1109 1171 11B4;
+C27A;C27A;1109 1171 11B5;C27A;1109 1171 11B5;
+C27B;C27B;1109 1171 11B6;C27B;1109 1171 11B6;
+C27C;C27C;1109 1171 11B7;C27C;1109 1171 11B7;
+C27D;C27D;1109 1171 11B8;C27D;1109 1171 11B8;
+C27E;C27E;1109 1171 11B9;C27E;1109 1171 11B9;
+C27F;C27F;1109 1171 11BA;C27F;1109 1171 11BA;
+C280;C280;1109 1171 11BB;C280;1109 1171 11BB;
+C281;C281;1109 1171 11BC;C281;1109 1171 11BC;
+C282;C282;1109 1171 11BD;C282;1109 1171 11BD;
+C283;C283;1109 1171 11BE;C283;1109 1171 11BE;
+C284;C284;1109 1171 11BF;C284;1109 1171 11BF;
+C285;C285;1109 1171 11C0;C285;1109 1171 11C0;
+C286;C286;1109 1171 11C1;C286;1109 1171 11C1;
+C287;C287;1109 1171 11C2;C287;1109 1171 11C2;
+C288;C288;1109 1172;C288;1109 1172;
+C289;C289;1109 1172 11A8;C289;1109 1172 11A8;
+C28A;C28A;1109 1172 11A9;C28A;1109 1172 11A9;
+C28B;C28B;1109 1172 11AA;C28B;1109 1172 11AA;
+C28C;C28C;1109 1172 11AB;C28C;1109 1172 11AB;
+C28D;C28D;1109 1172 11AC;C28D;1109 1172 11AC;
+C28E;C28E;1109 1172 11AD;C28E;1109 1172 11AD;
+C28F;C28F;1109 1172 11AE;C28F;1109 1172 11AE;
+C290;C290;1109 1172 11AF;C290;1109 1172 11AF;
+C291;C291;1109 1172 11B0;C291;1109 1172 11B0;
+C292;C292;1109 1172 11B1;C292;1109 1172 11B1;
+C293;C293;1109 1172 11B2;C293;1109 1172 11B2;
+C294;C294;1109 1172 11B3;C294;1109 1172 11B3;
+C295;C295;1109 1172 11B4;C295;1109 1172 11B4;
+C296;C296;1109 1172 11B5;C296;1109 1172 11B5;
+C297;C297;1109 1172 11B6;C297;1109 1172 11B6;
+C298;C298;1109 1172 11B7;C298;1109 1172 11B7;
+C299;C299;1109 1172 11B8;C299;1109 1172 11B8;
+C29A;C29A;1109 1172 11B9;C29A;1109 1172 11B9;
+C29B;C29B;1109 1172 11BA;C29B;1109 1172 11BA;
+C29C;C29C;1109 1172 11BB;C29C;1109 1172 11BB;
+C29D;C29D;1109 1172 11BC;C29D;1109 1172 11BC;
+C29E;C29E;1109 1172 11BD;C29E;1109 1172 11BD;
+C29F;C29F;1109 1172 11BE;C29F;1109 1172 11BE;
+C2A0;C2A0;1109 1172 11BF;C2A0;1109 1172 11BF;
+C2A1;C2A1;1109 1172 11C0;C2A1;1109 1172 11C0;
+C2A2;C2A2;1109 1172 11C1;C2A2;1109 1172 11C1;
+C2A3;C2A3;1109 1172 11C2;C2A3;1109 1172 11C2;
+C2A4;C2A4;1109 1173;C2A4;1109 1173;
+C2A5;C2A5;1109 1173 11A8;C2A5;1109 1173 11A8;
+C2A6;C2A6;1109 1173 11A9;C2A6;1109 1173 11A9;
+C2A7;C2A7;1109 1173 11AA;C2A7;1109 1173 11AA;
+C2A8;C2A8;1109 1173 11AB;C2A8;1109 1173 11AB;
+C2A9;C2A9;1109 1173 11AC;C2A9;1109 1173 11AC;
+C2AA;C2AA;1109 1173 11AD;C2AA;1109 1173 11AD;
+C2AB;C2AB;1109 1173 11AE;C2AB;1109 1173 11AE;
+C2AC;C2AC;1109 1173 11AF;C2AC;1109 1173 11AF;
+C2AD;C2AD;1109 1173 11B0;C2AD;1109 1173 11B0;
+C2AE;C2AE;1109 1173 11B1;C2AE;1109 1173 11B1;
+C2AF;C2AF;1109 1173 11B2;C2AF;1109 1173 11B2;
+C2B0;C2B0;1109 1173 11B3;C2B0;1109 1173 11B3;
+C2B1;C2B1;1109 1173 11B4;C2B1;1109 1173 11B4;
+C2B2;C2B2;1109 1173 11B5;C2B2;1109 1173 11B5;
+C2B3;C2B3;1109 1173 11B6;C2B3;1109 1173 11B6;
+C2B4;C2B4;1109 1173 11B7;C2B4;1109 1173 11B7;
+C2B5;C2B5;1109 1173 11B8;C2B5;1109 1173 11B8;
+C2B6;C2B6;1109 1173 11B9;C2B6;1109 1173 11B9;
+C2B7;C2B7;1109 1173 11BA;C2B7;1109 1173 11BA;
+C2B8;C2B8;1109 1173 11BB;C2B8;1109 1173 11BB;
+C2B9;C2B9;1109 1173 11BC;C2B9;1109 1173 11BC;
+C2BA;C2BA;1109 1173 11BD;C2BA;1109 1173 11BD;
+C2BB;C2BB;1109 1173 11BE;C2BB;1109 1173 11BE;
+C2BC;C2BC;1109 1173 11BF;C2BC;1109 1173 11BF;
+C2BD;C2BD;1109 1173 11C0;C2BD;1109 1173 11C0;
+C2BE;C2BE;1109 1173 11C1;C2BE;1109 1173 11C1;
+C2BF;C2BF;1109 1173 11C2;C2BF;1109 1173 11C2;
+C2C0;C2C0;1109 1174;C2C0;1109 1174;
+C2C1;C2C1;1109 1174 11A8;C2C1;1109 1174 11A8;
+C2C2;C2C2;1109 1174 11A9;C2C2;1109 1174 11A9;
+C2C3;C2C3;1109 1174 11AA;C2C3;1109 1174 11AA;
+C2C4;C2C4;1109 1174 11AB;C2C4;1109 1174 11AB;
+C2C5;C2C5;1109 1174 11AC;C2C5;1109 1174 11AC;
+C2C6;C2C6;1109 1174 11AD;C2C6;1109 1174 11AD;
+C2C7;C2C7;1109 1174 11AE;C2C7;1109 1174 11AE;
+C2C8;C2C8;1109 1174 11AF;C2C8;1109 1174 11AF;
+C2C9;C2C9;1109 1174 11B0;C2C9;1109 1174 11B0;
+C2CA;C2CA;1109 1174 11B1;C2CA;1109 1174 11B1;
+C2CB;C2CB;1109 1174 11B2;C2CB;1109 1174 11B2;
+C2CC;C2CC;1109 1174 11B3;C2CC;1109 1174 11B3;
+C2CD;C2CD;1109 1174 11B4;C2CD;1109 1174 11B4;
+C2CE;C2CE;1109 1174 11B5;C2CE;1109 1174 11B5;
+C2CF;C2CF;1109 1174 11B6;C2CF;1109 1174 11B6;
+C2D0;C2D0;1109 1174 11B7;C2D0;1109 1174 11B7;
+C2D1;C2D1;1109 1174 11B8;C2D1;1109 1174 11B8;
+C2D2;C2D2;1109 1174 11B9;C2D2;1109 1174 11B9;
+C2D3;C2D3;1109 1174 11BA;C2D3;1109 1174 11BA;
+C2D4;C2D4;1109 1174 11BB;C2D4;1109 1174 11BB;
+C2D5;C2D5;1109 1174 11BC;C2D5;1109 1174 11BC;
+C2D6;C2D6;1109 1174 11BD;C2D6;1109 1174 11BD;
+C2D7;C2D7;1109 1174 11BE;C2D7;1109 1174 11BE;
+C2D8;C2D8;1109 1174 11BF;C2D8;1109 1174 11BF;
+C2D9;C2D9;1109 1174 11C0;C2D9;1109 1174 11C0;
+C2DA;C2DA;1109 1174 11C1;C2DA;1109 1174 11C1;
+C2DB;C2DB;1109 1174 11C2;C2DB;1109 1174 11C2;
+C2DC;C2DC;1109 1175;C2DC;1109 1175;
+C2DD;C2DD;1109 1175 11A8;C2DD;1109 1175 11A8;
+C2DE;C2DE;1109 1175 11A9;C2DE;1109 1175 11A9;
+C2DF;C2DF;1109 1175 11AA;C2DF;1109 1175 11AA;
+C2E0;C2E0;1109 1175 11AB;C2E0;1109 1175 11AB;
+C2E1;C2E1;1109 1175 11AC;C2E1;1109 1175 11AC;
+C2E2;C2E2;1109 1175 11AD;C2E2;1109 1175 11AD;
+C2E3;C2E3;1109 1175 11AE;C2E3;1109 1175 11AE;
+C2E4;C2E4;1109 1175 11AF;C2E4;1109 1175 11AF;
+C2E5;C2E5;1109 1175 11B0;C2E5;1109 1175 11B0;
+C2E6;C2E6;1109 1175 11B1;C2E6;1109 1175 11B1;
+C2E7;C2E7;1109 1175 11B2;C2E7;1109 1175 11B2;
+C2E8;C2E8;1109 1175 11B3;C2E8;1109 1175 11B3;
+C2E9;C2E9;1109 1175 11B4;C2E9;1109 1175 11B4;
+C2EA;C2EA;1109 1175 11B5;C2EA;1109 1175 11B5;
+C2EB;C2EB;1109 1175 11B6;C2EB;1109 1175 11B6;
+C2EC;C2EC;1109 1175 11B7;C2EC;1109 1175 11B7;
+C2ED;C2ED;1109 1175 11B8;C2ED;1109 1175 11B8;
+C2EE;C2EE;1109 1175 11B9;C2EE;1109 1175 11B9;
+C2EF;C2EF;1109 1175 11BA;C2EF;1109 1175 11BA;
+C2F0;C2F0;1109 1175 11BB;C2F0;1109 1175 11BB;
+C2F1;C2F1;1109 1175 11BC;C2F1;1109 1175 11BC;
+C2F2;C2F2;1109 1175 11BD;C2F2;1109 1175 11BD;
+C2F3;C2F3;1109 1175 11BE;C2F3;1109 1175 11BE;
+C2F4;C2F4;1109 1175 11BF;C2F4;1109 1175 11BF;
+C2F5;C2F5;1109 1175 11C0;C2F5;1109 1175 11C0;
+C2F6;C2F6;1109 1175 11C1;C2F6;1109 1175 11C1;
+C2F7;C2F7;1109 1175 11C2;C2F7;1109 1175 11C2;
+C2F8;C2F8;110A 1161;C2F8;110A 1161;
+C2F9;C2F9;110A 1161 11A8;C2F9;110A 1161 11A8;
+C2FA;C2FA;110A 1161 11A9;C2FA;110A 1161 11A9;
+C2FB;C2FB;110A 1161 11AA;C2FB;110A 1161 11AA;
+C2FC;C2FC;110A 1161 11AB;C2FC;110A 1161 11AB;
+C2FD;C2FD;110A 1161 11AC;C2FD;110A 1161 11AC;
+C2FE;C2FE;110A 1161 11AD;C2FE;110A 1161 11AD;
+C2FF;C2FF;110A 1161 11AE;C2FF;110A 1161 11AE;
+C300;C300;110A 1161 11AF;C300;110A 1161 11AF;
+C301;C301;110A 1161 11B0;C301;110A 1161 11B0;
+C302;C302;110A 1161 11B1;C302;110A 1161 11B1;
+C303;C303;110A 1161 11B2;C303;110A 1161 11B2;
+C304;C304;110A 1161 11B3;C304;110A 1161 11B3;
+C305;C305;110A 1161 11B4;C305;110A 1161 11B4;
+C306;C306;110A 1161 11B5;C306;110A 1161 11B5;
+C307;C307;110A 1161 11B6;C307;110A 1161 11B6;
+C308;C308;110A 1161 11B7;C308;110A 1161 11B7;
+C309;C309;110A 1161 11B8;C309;110A 1161 11B8;
+C30A;C30A;110A 1161 11B9;C30A;110A 1161 11B9;
+C30B;C30B;110A 1161 11BA;C30B;110A 1161 11BA;
+C30C;C30C;110A 1161 11BB;C30C;110A 1161 11BB;
+C30D;C30D;110A 1161 11BC;C30D;110A 1161 11BC;
+C30E;C30E;110A 1161 11BD;C30E;110A 1161 11BD;
+C30F;C30F;110A 1161 11BE;C30F;110A 1161 11BE;
+C310;C310;110A 1161 11BF;C310;110A 1161 11BF;
+C311;C311;110A 1161 11C0;C311;110A 1161 11C0;
+C312;C312;110A 1161 11C1;C312;110A 1161 11C1;
+C313;C313;110A 1161 11C2;C313;110A 1161 11C2;
+C314;C314;110A 1162;C314;110A 1162;
+C315;C315;110A 1162 11A8;C315;110A 1162 11A8;
+C316;C316;110A 1162 11A9;C316;110A 1162 11A9;
+C317;C317;110A 1162 11AA;C317;110A 1162 11AA;
+C318;C318;110A 1162 11AB;C318;110A 1162 11AB;
+C319;C319;110A 1162 11AC;C319;110A 1162 11AC;
+C31A;C31A;110A 1162 11AD;C31A;110A 1162 11AD;
+C31B;C31B;110A 1162 11AE;C31B;110A 1162 11AE;
+C31C;C31C;110A 1162 11AF;C31C;110A 1162 11AF;
+C31D;C31D;110A 1162 11B0;C31D;110A 1162 11B0;
+C31E;C31E;110A 1162 11B1;C31E;110A 1162 11B1;
+C31F;C31F;110A 1162 11B2;C31F;110A 1162 11B2;
+C320;C320;110A 1162 11B3;C320;110A 1162 11B3;
+C321;C321;110A 1162 11B4;C321;110A 1162 11B4;
+C322;C322;110A 1162 11B5;C322;110A 1162 11B5;
+C323;C323;110A 1162 11B6;C323;110A 1162 11B6;
+C324;C324;110A 1162 11B7;C324;110A 1162 11B7;
+C325;C325;110A 1162 11B8;C325;110A 1162 11B8;
+C326;C326;110A 1162 11B9;C326;110A 1162 11B9;
+C327;C327;110A 1162 11BA;C327;110A 1162 11BA;
+C328;C328;110A 1162 11BB;C328;110A 1162 11BB;
+C329;C329;110A 1162 11BC;C329;110A 1162 11BC;
+C32A;C32A;110A 1162 11BD;C32A;110A 1162 11BD;
+C32B;C32B;110A 1162 11BE;C32B;110A 1162 11BE;
+C32C;C32C;110A 1162 11BF;C32C;110A 1162 11BF;
+C32D;C32D;110A 1162 11C0;C32D;110A 1162 11C0;
+C32E;C32E;110A 1162 11C1;C32E;110A 1162 11C1;
+C32F;C32F;110A 1162 11C2;C32F;110A 1162 11C2;
+C330;C330;110A 1163;C330;110A 1163;
+C331;C331;110A 1163 11A8;C331;110A 1163 11A8;
+C332;C332;110A 1163 11A9;C332;110A 1163 11A9;
+C333;C333;110A 1163 11AA;C333;110A 1163 11AA;
+C334;C334;110A 1163 11AB;C334;110A 1163 11AB;
+C335;C335;110A 1163 11AC;C335;110A 1163 11AC;
+C336;C336;110A 1163 11AD;C336;110A 1163 11AD;
+C337;C337;110A 1163 11AE;C337;110A 1163 11AE;
+C338;C338;110A 1163 11AF;C338;110A 1163 11AF;
+C339;C339;110A 1163 11B0;C339;110A 1163 11B0;
+C33A;C33A;110A 1163 11B1;C33A;110A 1163 11B1;
+C33B;C33B;110A 1163 11B2;C33B;110A 1163 11B2;
+C33C;C33C;110A 1163 11B3;C33C;110A 1163 11B3;
+C33D;C33D;110A 1163 11B4;C33D;110A 1163 11B4;
+C33E;C33E;110A 1163 11B5;C33E;110A 1163 11B5;
+C33F;C33F;110A 1163 11B6;C33F;110A 1163 11B6;
+C340;C340;110A 1163 11B7;C340;110A 1163 11B7;
+C341;C341;110A 1163 11B8;C341;110A 1163 11B8;
+C342;C342;110A 1163 11B9;C342;110A 1163 11B9;
+C343;C343;110A 1163 11BA;C343;110A 1163 11BA;
+C344;C344;110A 1163 11BB;C344;110A 1163 11BB;
+C345;C345;110A 1163 11BC;C345;110A 1163 11BC;
+C346;C346;110A 1163 11BD;C346;110A 1163 11BD;
+C347;C347;110A 1163 11BE;C347;110A 1163 11BE;
+C348;C348;110A 1163 11BF;C348;110A 1163 11BF;
+C349;C349;110A 1163 11C0;C349;110A 1163 11C0;
+C34A;C34A;110A 1163 11C1;C34A;110A 1163 11C1;
+C34B;C34B;110A 1163 11C2;C34B;110A 1163 11C2;
+C34C;C34C;110A 1164;C34C;110A 1164;
+C34D;C34D;110A 1164 11A8;C34D;110A 1164 11A8;
+C34E;C34E;110A 1164 11A9;C34E;110A 1164 11A9;
+C34F;C34F;110A 1164 11AA;C34F;110A 1164 11AA;
+C350;C350;110A 1164 11AB;C350;110A 1164 11AB;
+C351;C351;110A 1164 11AC;C351;110A 1164 11AC;
+C352;C352;110A 1164 11AD;C352;110A 1164 11AD;
+C353;C353;110A 1164 11AE;C353;110A 1164 11AE;
+C354;C354;110A 1164 11AF;C354;110A 1164 11AF;
+C355;C355;110A 1164 11B0;C355;110A 1164 11B0;
+C356;C356;110A 1164 11B1;C356;110A 1164 11B1;
+C357;C357;110A 1164 11B2;C357;110A 1164 11B2;
+C358;C358;110A 1164 11B3;C358;110A 1164 11B3;
+C359;C359;110A 1164 11B4;C359;110A 1164 11B4;
+C35A;C35A;110A 1164 11B5;C35A;110A 1164 11B5;
+C35B;C35B;110A 1164 11B6;C35B;110A 1164 11B6;
+C35C;C35C;110A 1164 11B7;C35C;110A 1164 11B7;
+C35D;C35D;110A 1164 11B8;C35D;110A 1164 11B8;
+C35E;C35E;110A 1164 11B9;C35E;110A 1164 11B9;
+C35F;C35F;110A 1164 11BA;C35F;110A 1164 11BA;
+C360;C360;110A 1164 11BB;C360;110A 1164 11BB;
+C361;C361;110A 1164 11BC;C361;110A 1164 11BC;
+C362;C362;110A 1164 11BD;C362;110A 1164 11BD;
+C363;C363;110A 1164 11BE;C363;110A 1164 11BE;
+C364;C364;110A 1164 11BF;C364;110A 1164 11BF;
+C365;C365;110A 1164 11C0;C365;110A 1164 11C0;
+C366;C366;110A 1164 11C1;C366;110A 1164 11C1;
+C367;C367;110A 1164 11C2;C367;110A 1164 11C2;
+C368;C368;110A 1165;C368;110A 1165;
+C369;C369;110A 1165 11A8;C369;110A 1165 11A8;
+C36A;C36A;110A 1165 11A9;C36A;110A 1165 11A9;
+C36B;C36B;110A 1165 11AA;C36B;110A 1165 11AA;
+C36C;C36C;110A 1165 11AB;C36C;110A 1165 11AB;
+C36D;C36D;110A 1165 11AC;C36D;110A 1165 11AC;
+C36E;C36E;110A 1165 11AD;C36E;110A 1165 11AD;
+C36F;C36F;110A 1165 11AE;C36F;110A 1165 11AE;
+C370;C370;110A 1165 11AF;C370;110A 1165 11AF;
+C371;C371;110A 1165 11B0;C371;110A 1165 11B0;
+C372;C372;110A 1165 11B1;C372;110A 1165 11B1;
+C373;C373;110A 1165 11B2;C373;110A 1165 11B2;
+C374;C374;110A 1165 11B3;C374;110A 1165 11B3;
+C375;C375;110A 1165 11B4;C375;110A 1165 11B4;
+C376;C376;110A 1165 11B5;C376;110A 1165 11B5;
+C377;C377;110A 1165 11B6;C377;110A 1165 11B6;
+C378;C378;110A 1165 11B7;C378;110A 1165 11B7;
+C379;C379;110A 1165 11B8;C379;110A 1165 11B8;
+C37A;C37A;110A 1165 11B9;C37A;110A 1165 11B9;
+C37B;C37B;110A 1165 11BA;C37B;110A 1165 11BA;
+C37C;C37C;110A 1165 11BB;C37C;110A 1165 11BB;
+C37D;C37D;110A 1165 11BC;C37D;110A 1165 11BC;
+C37E;C37E;110A 1165 11BD;C37E;110A 1165 11BD;
+C37F;C37F;110A 1165 11BE;C37F;110A 1165 11BE;
+C380;C380;110A 1165 11BF;C380;110A 1165 11BF;
+C381;C381;110A 1165 11C0;C381;110A 1165 11C0;
+C382;C382;110A 1165 11C1;C382;110A 1165 11C1;
+C383;C383;110A 1165 11C2;C383;110A 1165 11C2;
+C384;C384;110A 1166;C384;110A 1166;
+C385;C385;110A 1166 11A8;C385;110A 1166 11A8;
+C386;C386;110A 1166 11A9;C386;110A 1166 11A9;
+C387;C387;110A 1166 11AA;C387;110A 1166 11AA;
+C388;C388;110A 1166 11AB;C388;110A 1166 11AB;
+C389;C389;110A 1166 11AC;C389;110A 1166 11AC;
+C38A;C38A;110A 1166 11AD;C38A;110A 1166 11AD;
+C38B;C38B;110A 1166 11AE;C38B;110A 1166 11AE;
+C38C;C38C;110A 1166 11AF;C38C;110A 1166 11AF;
+C38D;C38D;110A 1166 11B0;C38D;110A 1166 11B0;
+C38E;C38E;110A 1166 11B1;C38E;110A 1166 11B1;
+C38F;C38F;110A 1166 11B2;C38F;110A 1166 11B2;
+C390;C390;110A 1166 11B3;C390;110A 1166 11B3;
+C391;C391;110A 1166 11B4;C391;110A 1166 11B4;
+C392;C392;110A 1166 11B5;C392;110A 1166 11B5;
+C393;C393;110A 1166 11B6;C393;110A 1166 11B6;
+C394;C394;110A 1166 11B7;C394;110A 1166 11B7;
+C395;C395;110A 1166 11B8;C395;110A 1166 11B8;
+C396;C396;110A 1166 11B9;C396;110A 1166 11B9;
+C397;C397;110A 1166 11BA;C397;110A 1166 11BA;
+C398;C398;110A 1166 11BB;C398;110A 1166 11BB;
+C399;C399;110A 1166 11BC;C399;110A 1166 11BC;
+C39A;C39A;110A 1166 11BD;C39A;110A 1166 11BD;
+C39B;C39B;110A 1166 11BE;C39B;110A 1166 11BE;
+C39C;C39C;110A 1166 11BF;C39C;110A 1166 11BF;
+C39D;C39D;110A 1166 11C0;C39D;110A 1166 11C0;
+C39E;C39E;110A 1166 11C1;C39E;110A 1166 11C1;
+C39F;C39F;110A 1166 11C2;C39F;110A 1166 11C2;
+C3A0;C3A0;110A 1167;C3A0;110A 1167;
+C3A1;C3A1;110A 1167 11A8;C3A1;110A 1167 11A8;
+C3A2;C3A2;110A 1167 11A9;C3A2;110A 1167 11A9;
+C3A3;C3A3;110A 1167 11AA;C3A3;110A 1167 11AA;
+C3A4;C3A4;110A 1167 11AB;C3A4;110A 1167 11AB;
+C3A5;C3A5;110A 1167 11AC;C3A5;110A 1167 11AC;
+C3A6;C3A6;110A 1167 11AD;C3A6;110A 1167 11AD;
+C3A7;C3A7;110A 1167 11AE;C3A7;110A 1167 11AE;
+C3A8;C3A8;110A 1167 11AF;C3A8;110A 1167 11AF;
+C3A9;C3A9;110A 1167 11B0;C3A9;110A 1167 11B0;
+C3AA;C3AA;110A 1167 11B1;C3AA;110A 1167 11B1;
+C3AB;C3AB;110A 1167 11B2;C3AB;110A 1167 11B2;
+C3AC;C3AC;110A 1167 11B3;C3AC;110A 1167 11B3;
+C3AD;C3AD;110A 1167 11B4;C3AD;110A 1167 11B4;
+C3AE;C3AE;110A 1167 11B5;C3AE;110A 1167 11B5;
+C3AF;C3AF;110A 1167 11B6;C3AF;110A 1167 11B6;
+C3B0;C3B0;110A 1167 11B7;C3B0;110A 1167 11B7;
+C3B1;C3B1;110A 1167 11B8;C3B1;110A 1167 11B8;
+C3B2;C3B2;110A 1167 11B9;C3B2;110A 1167 11B9;
+C3B3;C3B3;110A 1167 11BA;C3B3;110A 1167 11BA;
+C3B4;C3B4;110A 1167 11BB;C3B4;110A 1167 11BB;
+C3B5;C3B5;110A 1167 11BC;C3B5;110A 1167 11BC;
+C3B6;C3B6;110A 1167 11BD;C3B6;110A 1167 11BD;
+C3B7;C3B7;110A 1167 11BE;C3B7;110A 1167 11BE;
+C3B8;C3B8;110A 1167 11BF;C3B8;110A 1167 11BF;
+C3B9;C3B9;110A 1167 11C0;C3B9;110A 1167 11C0;
+C3BA;C3BA;110A 1167 11C1;C3BA;110A 1167 11C1;
+C3BB;C3BB;110A 1167 11C2;C3BB;110A 1167 11C2;
+C3BC;C3BC;110A 1168;C3BC;110A 1168;
+C3BD;C3BD;110A 1168 11A8;C3BD;110A 1168 11A8;
+C3BE;C3BE;110A 1168 11A9;C3BE;110A 1168 11A9;
+C3BF;C3BF;110A 1168 11AA;C3BF;110A 1168 11AA;
+C3C0;C3C0;110A 1168 11AB;C3C0;110A 1168 11AB;
+C3C1;C3C1;110A 1168 11AC;C3C1;110A 1168 11AC;
+C3C2;C3C2;110A 1168 11AD;C3C2;110A 1168 11AD;
+C3C3;C3C3;110A 1168 11AE;C3C3;110A 1168 11AE;
+C3C4;C3C4;110A 1168 11AF;C3C4;110A 1168 11AF;
+C3C5;C3C5;110A 1168 11B0;C3C5;110A 1168 11B0;
+C3C6;C3C6;110A 1168 11B1;C3C6;110A 1168 11B1;
+C3C7;C3C7;110A 1168 11B2;C3C7;110A 1168 11B2;
+C3C8;C3C8;110A 1168 11B3;C3C8;110A 1168 11B3;
+C3C9;C3C9;110A 1168 11B4;C3C9;110A 1168 11B4;
+C3CA;C3CA;110A 1168 11B5;C3CA;110A 1168 11B5;
+C3CB;C3CB;110A 1168 11B6;C3CB;110A 1168 11B6;
+C3CC;C3CC;110A 1168 11B7;C3CC;110A 1168 11B7;
+C3CD;C3CD;110A 1168 11B8;C3CD;110A 1168 11B8;
+C3CE;C3CE;110A 1168 11B9;C3CE;110A 1168 11B9;
+C3CF;C3CF;110A 1168 11BA;C3CF;110A 1168 11BA;
+C3D0;C3D0;110A 1168 11BB;C3D0;110A 1168 11BB;
+C3D1;C3D1;110A 1168 11BC;C3D1;110A 1168 11BC;
+C3D2;C3D2;110A 1168 11BD;C3D2;110A 1168 11BD;
+C3D3;C3D3;110A 1168 11BE;C3D3;110A 1168 11BE;
+C3D4;C3D4;110A 1168 11BF;C3D4;110A 1168 11BF;
+C3D5;C3D5;110A 1168 11C0;C3D5;110A 1168 11C0;
+C3D6;C3D6;110A 1168 11C1;C3D6;110A 1168 11C1;
+C3D7;C3D7;110A 1168 11C2;C3D7;110A 1168 11C2;
+C3D8;C3D8;110A 1169;C3D8;110A 1169;
+C3D9;C3D9;110A 1169 11A8;C3D9;110A 1169 11A8;
+C3DA;C3DA;110A 1169 11A9;C3DA;110A 1169 11A9;
+C3DB;C3DB;110A 1169 11AA;C3DB;110A 1169 11AA;
+C3DC;C3DC;110A 1169 11AB;C3DC;110A 1169 11AB;
+C3DD;C3DD;110A 1169 11AC;C3DD;110A 1169 11AC;
+C3DE;C3DE;110A 1169 11AD;C3DE;110A 1169 11AD;
+C3DF;C3DF;110A 1169 11AE;C3DF;110A 1169 11AE;
+C3E0;C3E0;110A 1169 11AF;C3E0;110A 1169 11AF;
+C3E1;C3E1;110A 1169 11B0;C3E1;110A 1169 11B0;
+C3E2;C3E2;110A 1169 11B1;C3E2;110A 1169 11B1;
+C3E3;C3E3;110A 1169 11B2;C3E3;110A 1169 11B2;
+C3E4;C3E4;110A 1169 11B3;C3E4;110A 1169 11B3;
+C3E5;C3E5;110A 1169 11B4;C3E5;110A 1169 11B4;
+C3E6;C3E6;110A 1169 11B5;C3E6;110A 1169 11B5;
+C3E7;C3E7;110A 1169 11B6;C3E7;110A 1169 11B6;
+C3E8;C3E8;110A 1169 11B7;C3E8;110A 1169 11B7;
+C3E9;C3E9;110A 1169 11B8;C3E9;110A 1169 11B8;
+C3EA;C3EA;110A 1169 11B9;C3EA;110A 1169 11B9;
+C3EB;C3EB;110A 1169 11BA;C3EB;110A 1169 11BA;
+C3EC;C3EC;110A 1169 11BB;C3EC;110A 1169 11BB;
+C3ED;C3ED;110A 1169 11BC;C3ED;110A 1169 11BC;
+C3EE;C3EE;110A 1169 11BD;C3EE;110A 1169 11BD;
+C3EF;C3EF;110A 1169 11BE;C3EF;110A 1169 11BE;
+C3F0;C3F0;110A 1169 11BF;C3F0;110A 1169 11BF;
+C3F1;C3F1;110A 1169 11C0;C3F1;110A 1169 11C0;
+C3F2;C3F2;110A 1169 11C1;C3F2;110A 1169 11C1;
+C3F3;C3F3;110A 1169 11C2;C3F3;110A 1169 11C2;
+C3F4;C3F4;110A 116A;C3F4;110A 116A;
+C3F5;C3F5;110A 116A 11A8;C3F5;110A 116A 11A8;
+C3F6;C3F6;110A 116A 11A9;C3F6;110A 116A 11A9;
+C3F7;C3F7;110A 116A 11AA;C3F7;110A 116A 11AA;
+C3F8;C3F8;110A 116A 11AB;C3F8;110A 116A 11AB;
+C3F9;C3F9;110A 116A 11AC;C3F9;110A 116A 11AC;
+C3FA;C3FA;110A 116A 11AD;C3FA;110A 116A 11AD;
+C3FB;C3FB;110A 116A 11AE;C3FB;110A 116A 11AE;
+C3FC;C3FC;110A 116A 11AF;C3FC;110A 116A 11AF;
+C3FD;C3FD;110A 116A 11B0;C3FD;110A 116A 11B0;
+C3FE;C3FE;110A 116A 11B1;C3FE;110A 116A 11B1;
+C3FF;C3FF;110A 116A 11B2;C3FF;110A 116A 11B2;
+C400;C400;110A 116A 11B3;C400;110A 116A 11B3;
+C401;C401;110A 116A 11B4;C401;110A 116A 11B4;
+C402;C402;110A 116A 11B5;C402;110A 116A 11B5;
+C403;C403;110A 116A 11B6;C403;110A 116A 11B6;
+C404;C404;110A 116A 11B7;C404;110A 116A 11B7;
+C405;C405;110A 116A 11B8;C405;110A 116A 11B8;
+C406;C406;110A 116A 11B9;C406;110A 116A 11B9;
+C407;C407;110A 116A 11BA;C407;110A 116A 11BA;
+C408;C408;110A 116A 11BB;C408;110A 116A 11BB;
+C409;C409;110A 116A 11BC;C409;110A 116A 11BC;
+C40A;C40A;110A 116A 11BD;C40A;110A 116A 11BD;
+C40B;C40B;110A 116A 11BE;C40B;110A 116A 11BE;
+C40C;C40C;110A 116A 11BF;C40C;110A 116A 11BF;
+C40D;C40D;110A 116A 11C0;C40D;110A 116A 11C0;
+C40E;C40E;110A 116A 11C1;C40E;110A 116A 11C1;
+C40F;C40F;110A 116A 11C2;C40F;110A 116A 11C2;
+C410;C410;110A 116B;C410;110A 116B;
+C411;C411;110A 116B 11A8;C411;110A 116B 11A8;
+C412;C412;110A 116B 11A9;C412;110A 116B 11A9;
+C413;C413;110A 116B 11AA;C413;110A 116B 11AA;
+C414;C414;110A 116B 11AB;C414;110A 116B 11AB;
+C415;C415;110A 116B 11AC;C415;110A 116B 11AC;
+C416;C416;110A 116B 11AD;C416;110A 116B 11AD;
+C417;C417;110A 116B 11AE;C417;110A 116B 11AE;
+C418;C418;110A 116B 11AF;C418;110A 116B 11AF;
+C419;C419;110A 116B 11B0;C419;110A 116B 11B0;
+C41A;C41A;110A 116B 11B1;C41A;110A 116B 11B1;
+C41B;C41B;110A 116B 11B2;C41B;110A 116B 11B2;
+C41C;C41C;110A 116B 11B3;C41C;110A 116B 11B3;
+C41D;C41D;110A 116B 11B4;C41D;110A 116B 11B4;
+C41E;C41E;110A 116B 11B5;C41E;110A 116B 11B5;
+C41F;C41F;110A 116B 11B6;C41F;110A 116B 11B6;
+C420;C420;110A 116B 11B7;C420;110A 116B 11B7;
+C421;C421;110A 116B 11B8;C421;110A 116B 11B8;
+C422;C422;110A 116B 11B9;C422;110A 116B 11B9;
+C423;C423;110A 116B 11BA;C423;110A 116B 11BA;
+C424;C424;110A 116B 11BB;C424;110A 116B 11BB;
+C425;C425;110A 116B 11BC;C425;110A 116B 11BC;
+C426;C426;110A 116B 11BD;C426;110A 116B 11BD;
+C427;C427;110A 116B 11BE;C427;110A 116B 11BE;
+C428;C428;110A 116B 11BF;C428;110A 116B 11BF;
+C429;C429;110A 116B 11C0;C429;110A 116B 11C0;
+C42A;C42A;110A 116B 11C1;C42A;110A 116B 11C1;
+C42B;C42B;110A 116B 11C2;C42B;110A 116B 11C2;
+C42C;C42C;110A 116C;C42C;110A 116C;
+C42D;C42D;110A 116C 11A8;C42D;110A 116C 11A8;
+C42E;C42E;110A 116C 11A9;C42E;110A 116C 11A9;
+C42F;C42F;110A 116C 11AA;C42F;110A 116C 11AA;
+C430;C430;110A 116C 11AB;C430;110A 116C 11AB;
+C431;C431;110A 116C 11AC;C431;110A 116C 11AC;
+C432;C432;110A 116C 11AD;C432;110A 116C 11AD;
+C433;C433;110A 116C 11AE;C433;110A 116C 11AE;
+C434;C434;110A 116C 11AF;C434;110A 116C 11AF;
+C435;C435;110A 116C 11B0;C435;110A 116C 11B0;
+C436;C436;110A 116C 11B1;C436;110A 116C 11B1;
+C437;C437;110A 116C 11B2;C437;110A 116C 11B2;
+C438;C438;110A 116C 11B3;C438;110A 116C 11B3;
+C439;C439;110A 116C 11B4;C439;110A 116C 11B4;
+C43A;C43A;110A 116C 11B5;C43A;110A 116C 11B5;
+C43B;C43B;110A 116C 11B6;C43B;110A 116C 11B6;
+C43C;C43C;110A 116C 11B7;C43C;110A 116C 11B7;
+C43D;C43D;110A 116C 11B8;C43D;110A 116C 11B8;
+C43E;C43E;110A 116C 11B9;C43E;110A 116C 11B9;
+C43F;C43F;110A 116C 11BA;C43F;110A 116C 11BA;
+C440;C440;110A 116C 11BB;C440;110A 116C 11BB;
+C441;C441;110A 116C 11BC;C441;110A 116C 11BC;
+C442;C442;110A 116C 11BD;C442;110A 116C 11BD;
+C443;C443;110A 116C 11BE;C443;110A 116C 11BE;
+C444;C444;110A 116C 11BF;C444;110A 116C 11BF;
+C445;C445;110A 116C 11C0;C445;110A 116C 11C0;
+C446;C446;110A 116C 11C1;C446;110A 116C 11C1;
+C447;C447;110A 116C 11C2;C447;110A 116C 11C2;
+C448;C448;110A 116D;C448;110A 116D;
+C449;C449;110A 116D 11A8;C449;110A 116D 11A8;
+C44A;C44A;110A 116D 11A9;C44A;110A 116D 11A9;
+C44B;C44B;110A 116D 11AA;C44B;110A 116D 11AA;
+C44C;C44C;110A 116D 11AB;C44C;110A 116D 11AB;
+C44D;C44D;110A 116D 11AC;C44D;110A 116D 11AC;
+C44E;C44E;110A 116D 11AD;C44E;110A 116D 11AD;
+C44F;C44F;110A 116D 11AE;C44F;110A 116D 11AE;
+C450;C450;110A 116D 11AF;C450;110A 116D 11AF;
+C451;C451;110A 116D 11B0;C451;110A 116D 11B0;
+C452;C452;110A 116D 11B1;C452;110A 116D 11B1;
+C453;C453;110A 116D 11B2;C453;110A 116D 11B2;
+C454;C454;110A 116D 11B3;C454;110A 116D 11B3;
+C455;C455;110A 116D 11B4;C455;110A 116D 11B4;
+C456;C456;110A 116D 11B5;C456;110A 116D 11B5;
+C457;C457;110A 116D 11B6;C457;110A 116D 11B6;
+C458;C458;110A 116D 11B7;C458;110A 116D 11B7;
+C459;C459;110A 116D 11B8;C459;110A 116D 11B8;
+C45A;C45A;110A 116D 11B9;C45A;110A 116D 11B9;
+C45B;C45B;110A 116D 11BA;C45B;110A 116D 11BA;
+C45C;C45C;110A 116D 11BB;C45C;110A 116D 11BB;
+C45D;C45D;110A 116D 11BC;C45D;110A 116D 11BC;
+C45E;C45E;110A 116D 11BD;C45E;110A 116D 11BD;
+C45F;C45F;110A 116D 11BE;C45F;110A 116D 11BE;
+C460;C460;110A 116D 11BF;C460;110A 116D 11BF;
+C461;C461;110A 116D 11C0;C461;110A 116D 11C0;
+C462;C462;110A 116D 11C1;C462;110A 116D 11C1;
+C463;C463;110A 116D 11C2;C463;110A 116D 11C2;
+C464;C464;110A 116E;C464;110A 116E;
+C465;C465;110A 116E 11A8;C465;110A 116E 11A8;
+C466;C466;110A 116E 11A9;C466;110A 116E 11A9;
+C467;C467;110A 116E 11AA;C467;110A 116E 11AA;
+C468;C468;110A 116E 11AB;C468;110A 116E 11AB;
+C469;C469;110A 116E 11AC;C469;110A 116E 11AC;
+C46A;C46A;110A 116E 11AD;C46A;110A 116E 11AD;
+C46B;C46B;110A 116E 11AE;C46B;110A 116E 11AE;
+C46C;C46C;110A 116E 11AF;C46C;110A 116E 11AF;
+C46D;C46D;110A 116E 11B0;C46D;110A 116E 11B0;
+C46E;C46E;110A 116E 11B1;C46E;110A 116E 11B1;
+C46F;C46F;110A 116E 11B2;C46F;110A 116E 11B2;
+C470;C470;110A 116E 11B3;C470;110A 116E 11B3;
+C471;C471;110A 116E 11B4;C471;110A 116E 11B4;
+C472;C472;110A 116E 11B5;C472;110A 116E 11B5;
+C473;C473;110A 116E 11B6;C473;110A 116E 11B6;
+C474;C474;110A 116E 11B7;C474;110A 116E 11B7;
+C475;C475;110A 116E 11B8;C475;110A 116E 11B8;
+C476;C476;110A 116E 11B9;C476;110A 116E 11B9;
+C477;C477;110A 116E 11BA;C477;110A 116E 11BA;
+C478;C478;110A 116E 11BB;C478;110A 116E 11BB;
+C479;C479;110A 116E 11BC;C479;110A 116E 11BC;
+C47A;C47A;110A 116E 11BD;C47A;110A 116E 11BD;
+C47B;C47B;110A 116E 11BE;C47B;110A 116E 11BE;
+C47C;C47C;110A 116E 11BF;C47C;110A 116E 11BF;
+C47D;C47D;110A 116E 11C0;C47D;110A 116E 11C0;
+C47E;C47E;110A 116E 11C1;C47E;110A 116E 11C1;
+C47F;C47F;110A 116E 11C2;C47F;110A 116E 11C2;
+C480;C480;110A 116F;C480;110A 116F;
+C481;C481;110A 116F 11A8;C481;110A 116F 11A8;
+C482;C482;110A 116F 11A9;C482;110A 116F 11A9;
+C483;C483;110A 116F 11AA;C483;110A 116F 11AA;
+C484;C484;110A 116F 11AB;C484;110A 116F 11AB;
+C485;C485;110A 116F 11AC;C485;110A 116F 11AC;
+C486;C486;110A 116F 11AD;C486;110A 116F 11AD;
+C487;C487;110A 116F 11AE;C487;110A 116F 11AE;
+C488;C488;110A 116F 11AF;C488;110A 116F 11AF;
+C489;C489;110A 116F 11B0;C489;110A 116F 11B0;
+C48A;C48A;110A 116F 11B1;C48A;110A 116F 11B1;
+C48B;C48B;110A 116F 11B2;C48B;110A 116F 11B2;
+C48C;C48C;110A 116F 11B3;C48C;110A 116F 11B3;
+C48D;C48D;110A 116F 11B4;C48D;110A 116F 11B4;
+C48E;C48E;110A 116F 11B5;C48E;110A 116F 11B5;
+C48F;C48F;110A 116F 11B6;C48F;110A 116F 11B6;
+C490;C490;110A 116F 11B7;C490;110A 116F 11B7;
+C491;C491;110A 116F 11B8;C491;110A 116F 11B8;
+C492;C492;110A 116F 11B9;C492;110A 116F 11B9;
+C493;C493;110A 116F 11BA;C493;110A 116F 11BA;
+C494;C494;110A 116F 11BB;C494;110A 116F 11BB;
+C495;C495;110A 116F 11BC;C495;110A 116F 11BC;
+C496;C496;110A 116F 11BD;C496;110A 116F 11BD;
+C497;C497;110A 116F 11BE;C497;110A 116F 11BE;
+C498;C498;110A 116F 11BF;C498;110A 116F 11BF;
+C499;C499;110A 116F 11C0;C499;110A 116F 11C0;
+C49A;C49A;110A 116F 11C1;C49A;110A 116F 11C1;
+C49B;C49B;110A 116F 11C2;C49B;110A 116F 11C2;
+C49C;C49C;110A 1170;C49C;110A 1170;
+C49D;C49D;110A 1170 11A8;C49D;110A 1170 11A8;
+C49E;C49E;110A 1170 11A9;C49E;110A 1170 11A9;
+C49F;C49F;110A 1170 11AA;C49F;110A 1170 11AA;
+C4A0;C4A0;110A 1170 11AB;C4A0;110A 1170 11AB;
+C4A1;C4A1;110A 1170 11AC;C4A1;110A 1170 11AC;
+C4A2;C4A2;110A 1170 11AD;C4A2;110A 1170 11AD;
+C4A3;C4A3;110A 1170 11AE;C4A3;110A 1170 11AE;
+C4A4;C4A4;110A 1170 11AF;C4A4;110A 1170 11AF;
+C4A5;C4A5;110A 1170 11B0;C4A5;110A 1170 11B0;
+C4A6;C4A6;110A 1170 11B1;C4A6;110A 1170 11B1;
+C4A7;C4A7;110A 1170 11B2;C4A7;110A 1170 11B2;
+C4A8;C4A8;110A 1170 11B3;C4A8;110A 1170 11B3;
+C4A9;C4A9;110A 1170 11B4;C4A9;110A 1170 11B4;
+C4AA;C4AA;110A 1170 11B5;C4AA;110A 1170 11B5;
+C4AB;C4AB;110A 1170 11B6;C4AB;110A 1170 11B6;
+C4AC;C4AC;110A 1170 11B7;C4AC;110A 1170 11B7;
+C4AD;C4AD;110A 1170 11B8;C4AD;110A 1170 11B8;
+C4AE;C4AE;110A 1170 11B9;C4AE;110A 1170 11B9;
+C4AF;C4AF;110A 1170 11BA;C4AF;110A 1170 11BA;
+C4B0;C4B0;110A 1170 11BB;C4B0;110A 1170 11BB;
+C4B1;C4B1;110A 1170 11BC;C4B1;110A 1170 11BC;
+C4B2;C4B2;110A 1170 11BD;C4B2;110A 1170 11BD;
+C4B3;C4B3;110A 1170 11BE;C4B3;110A 1170 11BE;
+C4B4;C4B4;110A 1170 11BF;C4B4;110A 1170 11BF;
+C4B5;C4B5;110A 1170 11C0;C4B5;110A 1170 11C0;
+C4B6;C4B6;110A 1170 11C1;C4B6;110A 1170 11C1;
+C4B7;C4B7;110A 1170 11C2;C4B7;110A 1170 11C2;
+C4B8;C4B8;110A 1171;C4B8;110A 1171;
+C4B9;C4B9;110A 1171 11A8;C4B9;110A 1171 11A8;
+C4BA;C4BA;110A 1171 11A9;C4BA;110A 1171 11A9;
+C4BB;C4BB;110A 1171 11AA;C4BB;110A 1171 11AA;
+C4BC;C4BC;110A 1171 11AB;C4BC;110A 1171 11AB;
+C4BD;C4BD;110A 1171 11AC;C4BD;110A 1171 11AC;
+C4BE;C4BE;110A 1171 11AD;C4BE;110A 1171 11AD;
+C4BF;C4BF;110A 1171 11AE;C4BF;110A 1171 11AE;
+C4C0;C4C0;110A 1171 11AF;C4C0;110A 1171 11AF;
+C4C1;C4C1;110A 1171 11B0;C4C1;110A 1171 11B0;
+C4C2;C4C2;110A 1171 11B1;C4C2;110A 1171 11B1;
+C4C3;C4C3;110A 1171 11B2;C4C3;110A 1171 11B2;
+C4C4;C4C4;110A 1171 11B3;C4C4;110A 1171 11B3;
+C4C5;C4C5;110A 1171 11B4;C4C5;110A 1171 11B4;
+C4C6;C4C6;110A 1171 11B5;C4C6;110A 1171 11B5;
+C4C7;C4C7;110A 1171 11B6;C4C7;110A 1171 11B6;
+C4C8;C4C8;110A 1171 11B7;C4C8;110A 1171 11B7;
+C4C9;C4C9;110A 1171 11B8;C4C9;110A 1171 11B8;
+C4CA;C4CA;110A 1171 11B9;C4CA;110A 1171 11B9;
+C4CB;C4CB;110A 1171 11BA;C4CB;110A 1171 11BA;
+C4CC;C4CC;110A 1171 11BB;C4CC;110A 1171 11BB;
+C4CD;C4CD;110A 1171 11BC;C4CD;110A 1171 11BC;
+C4CE;C4CE;110A 1171 11BD;C4CE;110A 1171 11BD;
+C4CF;C4CF;110A 1171 11BE;C4CF;110A 1171 11BE;
+C4D0;C4D0;110A 1171 11BF;C4D0;110A 1171 11BF;
+C4D1;C4D1;110A 1171 11C0;C4D1;110A 1171 11C0;
+C4D2;C4D2;110A 1171 11C1;C4D2;110A 1171 11C1;
+C4D3;C4D3;110A 1171 11C2;C4D3;110A 1171 11C2;
+C4D4;C4D4;110A 1172;C4D4;110A 1172;
+C4D5;C4D5;110A 1172 11A8;C4D5;110A 1172 11A8;
+C4D6;C4D6;110A 1172 11A9;C4D6;110A 1172 11A9;
+C4D7;C4D7;110A 1172 11AA;C4D7;110A 1172 11AA;
+C4D8;C4D8;110A 1172 11AB;C4D8;110A 1172 11AB;
+C4D9;C4D9;110A 1172 11AC;C4D9;110A 1172 11AC;
+C4DA;C4DA;110A 1172 11AD;C4DA;110A 1172 11AD;
+C4DB;C4DB;110A 1172 11AE;C4DB;110A 1172 11AE;
+C4DC;C4DC;110A 1172 11AF;C4DC;110A 1172 11AF;
+C4DD;C4DD;110A 1172 11B0;C4DD;110A 1172 11B0;
+C4DE;C4DE;110A 1172 11B1;C4DE;110A 1172 11B1;
+C4DF;C4DF;110A 1172 11B2;C4DF;110A 1172 11B2;
+C4E0;C4E0;110A 1172 11B3;C4E0;110A 1172 11B3;
+C4E1;C4E1;110A 1172 11B4;C4E1;110A 1172 11B4;
+C4E2;C4E2;110A 1172 11B5;C4E2;110A 1172 11B5;
+C4E3;C4E3;110A 1172 11B6;C4E3;110A 1172 11B6;
+C4E4;C4E4;110A 1172 11B7;C4E4;110A 1172 11B7;
+C4E5;C4E5;110A 1172 11B8;C4E5;110A 1172 11B8;
+C4E6;C4E6;110A 1172 11B9;C4E6;110A 1172 11B9;
+C4E7;C4E7;110A 1172 11BA;C4E7;110A 1172 11BA;
+C4E8;C4E8;110A 1172 11BB;C4E8;110A 1172 11BB;
+C4E9;C4E9;110A 1172 11BC;C4E9;110A 1172 11BC;
+C4EA;C4EA;110A 1172 11BD;C4EA;110A 1172 11BD;
+C4EB;C4EB;110A 1172 11BE;C4EB;110A 1172 11BE;
+C4EC;C4EC;110A 1172 11BF;C4EC;110A 1172 11BF;
+C4ED;C4ED;110A 1172 11C0;C4ED;110A 1172 11C0;
+C4EE;C4EE;110A 1172 11C1;C4EE;110A 1172 11C1;
+C4EF;C4EF;110A 1172 11C2;C4EF;110A 1172 11C2;
+C4F0;C4F0;110A 1173;C4F0;110A 1173;
+C4F1;C4F1;110A 1173 11A8;C4F1;110A 1173 11A8;
+C4F2;C4F2;110A 1173 11A9;C4F2;110A 1173 11A9;
+C4F3;C4F3;110A 1173 11AA;C4F3;110A 1173 11AA;
+C4F4;C4F4;110A 1173 11AB;C4F4;110A 1173 11AB;
+C4F5;C4F5;110A 1173 11AC;C4F5;110A 1173 11AC;
+C4F6;C4F6;110A 1173 11AD;C4F6;110A 1173 11AD;
+C4F7;C4F7;110A 1173 11AE;C4F7;110A 1173 11AE;
+C4F8;C4F8;110A 1173 11AF;C4F8;110A 1173 11AF;
+C4F9;C4F9;110A 1173 11B0;C4F9;110A 1173 11B0;
+C4FA;C4FA;110A 1173 11B1;C4FA;110A 1173 11B1;
+C4FB;C4FB;110A 1173 11B2;C4FB;110A 1173 11B2;
+C4FC;C4FC;110A 1173 11B3;C4FC;110A 1173 11B3;
+C4FD;C4FD;110A 1173 11B4;C4FD;110A 1173 11B4;
+C4FE;C4FE;110A 1173 11B5;C4FE;110A 1173 11B5;
+C4FF;C4FF;110A 1173 11B6;C4FF;110A 1173 11B6;
+C500;C500;110A 1173 11B7;C500;110A 1173 11B7;
+C501;C501;110A 1173 11B8;C501;110A 1173 11B8;
+C502;C502;110A 1173 11B9;C502;110A 1173 11B9;
+C503;C503;110A 1173 11BA;C503;110A 1173 11BA;
+C504;C504;110A 1173 11BB;C504;110A 1173 11BB;
+C505;C505;110A 1173 11BC;C505;110A 1173 11BC;
+C506;C506;110A 1173 11BD;C506;110A 1173 11BD;
+C507;C507;110A 1173 11BE;C507;110A 1173 11BE;
+C508;C508;110A 1173 11BF;C508;110A 1173 11BF;
+C509;C509;110A 1173 11C0;C509;110A 1173 11C0;
+C50A;C50A;110A 1173 11C1;C50A;110A 1173 11C1;
+C50B;C50B;110A 1173 11C2;C50B;110A 1173 11C2;
+C50C;C50C;110A 1174;C50C;110A 1174;
+C50D;C50D;110A 1174 11A8;C50D;110A 1174 11A8;
+C50E;C50E;110A 1174 11A9;C50E;110A 1174 11A9;
+C50F;C50F;110A 1174 11AA;C50F;110A 1174 11AA;
+C510;C510;110A 1174 11AB;C510;110A 1174 11AB;
+C511;C511;110A 1174 11AC;C511;110A 1174 11AC;
+C512;C512;110A 1174 11AD;C512;110A 1174 11AD;
+C513;C513;110A 1174 11AE;C513;110A 1174 11AE;
+C514;C514;110A 1174 11AF;C514;110A 1174 11AF;
+C515;C515;110A 1174 11B0;C515;110A 1174 11B0;
+C516;C516;110A 1174 11B1;C516;110A 1174 11B1;
+C517;C517;110A 1174 11B2;C517;110A 1174 11B2;
+C518;C518;110A 1174 11B3;C518;110A 1174 11B3;
+C519;C519;110A 1174 11B4;C519;110A 1174 11B4;
+C51A;C51A;110A 1174 11B5;C51A;110A 1174 11B5;
+C51B;C51B;110A 1174 11B6;C51B;110A 1174 11B6;
+C51C;C51C;110A 1174 11B7;C51C;110A 1174 11B7;
+C51D;C51D;110A 1174 11B8;C51D;110A 1174 11B8;
+C51E;C51E;110A 1174 11B9;C51E;110A 1174 11B9;
+C51F;C51F;110A 1174 11BA;C51F;110A 1174 11BA;
+C520;C520;110A 1174 11BB;C520;110A 1174 11BB;
+C521;C521;110A 1174 11BC;C521;110A 1174 11BC;
+C522;C522;110A 1174 11BD;C522;110A 1174 11BD;
+C523;C523;110A 1174 11BE;C523;110A 1174 11BE;
+C524;C524;110A 1174 11BF;C524;110A 1174 11BF;
+C525;C525;110A 1174 11C0;C525;110A 1174 11C0;
+C526;C526;110A 1174 11C1;C526;110A 1174 11C1;
+C527;C527;110A 1174 11C2;C527;110A 1174 11C2;
+C528;C528;110A 1175;C528;110A 1175;
+C529;C529;110A 1175 11A8;C529;110A 1175 11A8;
+C52A;C52A;110A 1175 11A9;C52A;110A 1175 11A9;
+C52B;C52B;110A 1175 11AA;C52B;110A 1175 11AA;
+C52C;C52C;110A 1175 11AB;C52C;110A 1175 11AB;
+C52D;C52D;110A 1175 11AC;C52D;110A 1175 11AC;
+C52E;C52E;110A 1175 11AD;C52E;110A 1175 11AD;
+C52F;C52F;110A 1175 11AE;C52F;110A 1175 11AE;
+C530;C530;110A 1175 11AF;C530;110A 1175 11AF;
+C531;C531;110A 1175 11B0;C531;110A 1175 11B0;
+C532;C532;110A 1175 11B1;C532;110A 1175 11B1;
+C533;C533;110A 1175 11B2;C533;110A 1175 11B2;
+C534;C534;110A 1175 11B3;C534;110A 1175 11B3;
+C535;C535;110A 1175 11B4;C535;110A 1175 11B4;
+C536;C536;110A 1175 11B5;C536;110A 1175 11B5;
+C537;C537;110A 1175 11B6;C537;110A 1175 11B6;
+C538;C538;110A 1175 11B7;C538;110A 1175 11B7;
+C539;C539;110A 1175 11B8;C539;110A 1175 11B8;
+C53A;C53A;110A 1175 11B9;C53A;110A 1175 11B9;
+C53B;C53B;110A 1175 11BA;C53B;110A 1175 11BA;
+C53C;C53C;110A 1175 11BB;C53C;110A 1175 11BB;
+C53D;C53D;110A 1175 11BC;C53D;110A 1175 11BC;
+C53E;C53E;110A 1175 11BD;C53E;110A 1175 11BD;
+C53F;C53F;110A 1175 11BE;C53F;110A 1175 11BE;
+C540;C540;110A 1175 11BF;C540;110A 1175 11BF;
+C541;C541;110A 1175 11C0;C541;110A 1175 11C0;
+C542;C542;110A 1175 11C1;C542;110A 1175 11C1;
+C543;C543;110A 1175 11C2;C543;110A 1175 11C2;
+C544;C544;110B 1161;C544;110B 1161;
+C545;C545;110B 1161 11A8;C545;110B 1161 11A8;
+C546;C546;110B 1161 11A9;C546;110B 1161 11A9;
+C547;C547;110B 1161 11AA;C547;110B 1161 11AA;
+C548;C548;110B 1161 11AB;C548;110B 1161 11AB;
+C549;C549;110B 1161 11AC;C549;110B 1161 11AC;
+C54A;C54A;110B 1161 11AD;C54A;110B 1161 11AD;
+C54B;C54B;110B 1161 11AE;C54B;110B 1161 11AE;
+C54C;C54C;110B 1161 11AF;C54C;110B 1161 11AF;
+C54D;C54D;110B 1161 11B0;C54D;110B 1161 11B0;
+C54E;C54E;110B 1161 11B1;C54E;110B 1161 11B1;
+C54F;C54F;110B 1161 11B2;C54F;110B 1161 11B2;
+C550;C550;110B 1161 11B3;C550;110B 1161 11B3;
+C551;C551;110B 1161 11B4;C551;110B 1161 11B4;
+C552;C552;110B 1161 11B5;C552;110B 1161 11B5;
+C553;C553;110B 1161 11B6;C553;110B 1161 11B6;
+C554;C554;110B 1161 11B7;C554;110B 1161 11B7;
+C555;C555;110B 1161 11B8;C555;110B 1161 11B8;
+C556;C556;110B 1161 11B9;C556;110B 1161 11B9;
+C557;C557;110B 1161 11BA;C557;110B 1161 11BA;
+C558;C558;110B 1161 11BB;C558;110B 1161 11BB;
+C559;C559;110B 1161 11BC;C559;110B 1161 11BC;
+C55A;C55A;110B 1161 11BD;C55A;110B 1161 11BD;
+C55B;C55B;110B 1161 11BE;C55B;110B 1161 11BE;
+C55C;C55C;110B 1161 11BF;C55C;110B 1161 11BF;
+C55D;C55D;110B 1161 11C0;C55D;110B 1161 11C0;
+C55E;C55E;110B 1161 11C1;C55E;110B 1161 11C1;
+C55F;C55F;110B 1161 11C2;C55F;110B 1161 11C2;
+C560;C560;110B 1162;C560;110B 1162;
+C561;C561;110B 1162 11A8;C561;110B 1162 11A8;
+C562;C562;110B 1162 11A9;C562;110B 1162 11A9;
+C563;C563;110B 1162 11AA;C563;110B 1162 11AA;
+C564;C564;110B 1162 11AB;C564;110B 1162 11AB;
+C565;C565;110B 1162 11AC;C565;110B 1162 11AC;
+C566;C566;110B 1162 11AD;C566;110B 1162 11AD;
+C567;C567;110B 1162 11AE;C567;110B 1162 11AE;
+C568;C568;110B 1162 11AF;C568;110B 1162 11AF;
+C569;C569;110B 1162 11B0;C569;110B 1162 11B0;
+C56A;C56A;110B 1162 11B1;C56A;110B 1162 11B1;
+C56B;C56B;110B 1162 11B2;C56B;110B 1162 11B2;
+C56C;C56C;110B 1162 11B3;C56C;110B 1162 11B3;
+C56D;C56D;110B 1162 11B4;C56D;110B 1162 11B4;
+C56E;C56E;110B 1162 11B5;C56E;110B 1162 11B5;
+C56F;C56F;110B 1162 11B6;C56F;110B 1162 11B6;
+C570;C570;110B 1162 11B7;C570;110B 1162 11B7;
+C571;C571;110B 1162 11B8;C571;110B 1162 11B8;
+C572;C572;110B 1162 11B9;C572;110B 1162 11B9;
+C573;C573;110B 1162 11BA;C573;110B 1162 11BA;
+C574;C574;110B 1162 11BB;C574;110B 1162 11BB;
+C575;C575;110B 1162 11BC;C575;110B 1162 11BC;
+C576;C576;110B 1162 11BD;C576;110B 1162 11BD;
+C577;C577;110B 1162 11BE;C577;110B 1162 11BE;
+C578;C578;110B 1162 11BF;C578;110B 1162 11BF;
+C579;C579;110B 1162 11C0;C579;110B 1162 11C0;
+C57A;C57A;110B 1162 11C1;C57A;110B 1162 11C1;
+C57B;C57B;110B 1162 11C2;C57B;110B 1162 11C2;
+C57C;C57C;110B 1163;C57C;110B 1163;
+C57D;C57D;110B 1163 11A8;C57D;110B 1163 11A8;
+C57E;C57E;110B 1163 11A9;C57E;110B 1163 11A9;
+C57F;C57F;110B 1163 11AA;C57F;110B 1163 11AA;
+C580;C580;110B 1163 11AB;C580;110B 1163 11AB;
+C581;C581;110B 1163 11AC;C581;110B 1163 11AC;
+C582;C582;110B 1163 11AD;C582;110B 1163 11AD;
+C583;C583;110B 1163 11AE;C583;110B 1163 11AE;
+C584;C584;110B 1163 11AF;C584;110B 1163 11AF;
+C585;C585;110B 1163 11B0;C585;110B 1163 11B0;
+C586;C586;110B 1163 11B1;C586;110B 1163 11B1;
+C587;C587;110B 1163 11B2;C587;110B 1163 11B2;
+C588;C588;110B 1163 11B3;C588;110B 1163 11B3;
+C589;C589;110B 1163 11B4;C589;110B 1163 11B4;
+C58A;C58A;110B 1163 11B5;C58A;110B 1163 11B5;
+C58B;C58B;110B 1163 11B6;C58B;110B 1163 11B6;
+C58C;C58C;110B 1163 11B7;C58C;110B 1163 11B7;
+C58D;C58D;110B 1163 11B8;C58D;110B 1163 11B8;
+C58E;C58E;110B 1163 11B9;C58E;110B 1163 11B9;
+C58F;C58F;110B 1163 11BA;C58F;110B 1163 11BA;
+C590;C590;110B 1163 11BB;C590;110B 1163 11BB;
+C591;C591;110B 1163 11BC;C591;110B 1163 11BC;
+C592;C592;110B 1163 11BD;C592;110B 1163 11BD;
+C593;C593;110B 1163 11BE;C593;110B 1163 11BE;
+C594;C594;110B 1163 11BF;C594;110B 1163 11BF;
+C595;C595;110B 1163 11C0;C595;110B 1163 11C0;
+C596;C596;110B 1163 11C1;C596;110B 1163 11C1;
+C597;C597;110B 1163 11C2;C597;110B 1163 11C2;
+C598;C598;110B 1164;C598;110B 1164;
+C599;C599;110B 1164 11A8;C599;110B 1164 11A8;
+C59A;C59A;110B 1164 11A9;C59A;110B 1164 11A9;
+C59B;C59B;110B 1164 11AA;C59B;110B 1164 11AA;
+C59C;C59C;110B 1164 11AB;C59C;110B 1164 11AB;
+C59D;C59D;110B 1164 11AC;C59D;110B 1164 11AC;
+C59E;C59E;110B 1164 11AD;C59E;110B 1164 11AD;
+C59F;C59F;110B 1164 11AE;C59F;110B 1164 11AE;
+C5A0;C5A0;110B 1164 11AF;C5A0;110B 1164 11AF;
+C5A1;C5A1;110B 1164 11B0;C5A1;110B 1164 11B0;
+C5A2;C5A2;110B 1164 11B1;C5A2;110B 1164 11B1;
+C5A3;C5A3;110B 1164 11B2;C5A3;110B 1164 11B2;
+C5A4;C5A4;110B 1164 11B3;C5A4;110B 1164 11B3;
+C5A5;C5A5;110B 1164 11B4;C5A5;110B 1164 11B4;
+C5A6;C5A6;110B 1164 11B5;C5A6;110B 1164 11B5;
+C5A7;C5A7;110B 1164 11B6;C5A7;110B 1164 11B6;
+C5A8;C5A8;110B 1164 11B7;C5A8;110B 1164 11B7;
+C5A9;C5A9;110B 1164 11B8;C5A9;110B 1164 11B8;
+C5AA;C5AA;110B 1164 11B9;C5AA;110B 1164 11B9;
+C5AB;C5AB;110B 1164 11BA;C5AB;110B 1164 11BA;
+C5AC;C5AC;110B 1164 11BB;C5AC;110B 1164 11BB;
+C5AD;C5AD;110B 1164 11BC;C5AD;110B 1164 11BC;
+C5AE;C5AE;110B 1164 11BD;C5AE;110B 1164 11BD;
+C5AF;C5AF;110B 1164 11BE;C5AF;110B 1164 11BE;
+C5B0;C5B0;110B 1164 11BF;C5B0;110B 1164 11BF;
+C5B1;C5B1;110B 1164 11C0;C5B1;110B 1164 11C0;
+C5B2;C5B2;110B 1164 11C1;C5B2;110B 1164 11C1;
+C5B3;C5B3;110B 1164 11C2;C5B3;110B 1164 11C2;
+C5B4;C5B4;110B 1165;C5B4;110B 1165;
+C5B5;C5B5;110B 1165 11A8;C5B5;110B 1165 11A8;
+C5B6;C5B6;110B 1165 11A9;C5B6;110B 1165 11A9;
+C5B7;C5B7;110B 1165 11AA;C5B7;110B 1165 11AA;
+C5B8;C5B8;110B 1165 11AB;C5B8;110B 1165 11AB;
+C5B9;C5B9;110B 1165 11AC;C5B9;110B 1165 11AC;
+C5BA;C5BA;110B 1165 11AD;C5BA;110B 1165 11AD;
+C5BB;C5BB;110B 1165 11AE;C5BB;110B 1165 11AE;
+C5BC;C5BC;110B 1165 11AF;C5BC;110B 1165 11AF;
+C5BD;C5BD;110B 1165 11B0;C5BD;110B 1165 11B0;
+C5BE;C5BE;110B 1165 11B1;C5BE;110B 1165 11B1;
+C5BF;C5BF;110B 1165 11B2;C5BF;110B 1165 11B2;
+C5C0;C5C0;110B 1165 11B3;C5C0;110B 1165 11B3;
+C5C1;C5C1;110B 1165 11B4;C5C1;110B 1165 11B4;
+C5C2;C5C2;110B 1165 11B5;C5C2;110B 1165 11B5;
+C5C3;C5C3;110B 1165 11B6;C5C3;110B 1165 11B6;
+C5C4;C5C4;110B 1165 11B7;C5C4;110B 1165 11B7;
+C5C5;C5C5;110B 1165 11B8;C5C5;110B 1165 11B8;
+C5C6;C5C6;110B 1165 11B9;C5C6;110B 1165 11B9;
+C5C7;C5C7;110B 1165 11BA;C5C7;110B 1165 11BA;
+C5C8;C5C8;110B 1165 11BB;C5C8;110B 1165 11BB;
+C5C9;C5C9;110B 1165 11BC;C5C9;110B 1165 11BC;
+C5CA;C5CA;110B 1165 11BD;C5CA;110B 1165 11BD;
+C5CB;C5CB;110B 1165 11BE;C5CB;110B 1165 11BE;
+C5CC;C5CC;110B 1165 11BF;C5CC;110B 1165 11BF;
+C5CD;C5CD;110B 1165 11C0;C5CD;110B 1165 11C0;
+C5CE;C5CE;110B 1165 11C1;C5CE;110B 1165 11C1;
+C5CF;C5CF;110B 1165 11C2;C5CF;110B 1165 11C2;
+C5D0;C5D0;110B 1166;C5D0;110B 1166;
+C5D1;C5D1;110B 1166 11A8;C5D1;110B 1166 11A8;
+C5D2;C5D2;110B 1166 11A9;C5D2;110B 1166 11A9;
+C5D3;C5D3;110B 1166 11AA;C5D3;110B 1166 11AA;
+C5D4;C5D4;110B 1166 11AB;C5D4;110B 1166 11AB;
+C5D5;C5D5;110B 1166 11AC;C5D5;110B 1166 11AC;
+C5D6;C5D6;110B 1166 11AD;C5D6;110B 1166 11AD;
+C5D7;C5D7;110B 1166 11AE;C5D7;110B 1166 11AE;
+C5D8;C5D8;110B 1166 11AF;C5D8;110B 1166 11AF;
+C5D9;C5D9;110B 1166 11B0;C5D9;110B 1166 11B0;
+C5DA;C5DA;110B 1166 11B1;C5DA;110B 1166 11B1;
+C5DB;C5DB;110B 1166 11B2;C5DB;110B 1166 11B2;
+C5DC;C5DC;110B 1166 11B3;C5DC;110B 1166 11B3;
+C5DD;C5DD;110B 1166 11B4;C5DD;110B 1166 11B4;
+C5DE;C5DE;110B 1166 11B5;C5DE;110B 1166 11B5;
+C5DF;C5DF;110B 1166 11B6;C5DF;110B 1166 11B6;
+C5E0;C5E0;110B 1166 11B7;C5E0;110B 1166 11B7;
+C5E1;C5E1;110B 1166 11B8;C5E1;110B 1166 11B8;
+C5E2;C5E2;110B 1166 11B9;C5E2;110B 1166 11B9;
+C5E3;C5E3;110B 1166 11BA;C5E3;110B 1166 11BA;
+C5E4;C5E4;110B 1166 11BB;C5E4;110B 1166 11BB;
+C5E5;C5E5;110B 1166 11BC;C5E5;110B 1166 11BC;
+C5E6;C5E6;110B 1166 11BD;C5E6;110B 1166 11BD;
+C5E7;C5E7;110B 1166 11BE;C5E7;110B 1166 11BE;
+C5E8;C5E8;110B 1166 11BF;C5E8;110B 1166 11BF;
+C5E9;C5E9;110B 1166 11C0;C5E9;110B 1166 11C0;
+C5EA;C5EA;110B 1166 11C1;C5EA;110B 1166 11C1;
+C5EB;C5EB;110B 1166 11C2;C5EB;110B 1166 11C2;
+C5EC;C5EC;110B 1167;C5EC;110B 1167;
+C5ED;C5ED;110B 1167 11A8;C5ED;110B 1167 11A8;
+C5EE;C5EE;110B 1167 11A9;C5EE;110B 1167 11A9;
+C5EF;C5EF;110B 1167 11AA;C5EF;110B 1167 11AA;
+C5F0;C5F0;110B 1167 11AB;C5F0;110B 1167 11AB;
+C5F1;C5F1;110B 1167 11AC;C5F1;110B 1167 11AC;
+C5F2;C5F2;110B 1167 11AD;C5F2;110B 1167 11AD;
+C5F3;C5F3;110B 1167 11AE;C5F3;110B 1167 11AE;
+C5F4;C5F4;110B 1167 11AF;C5F4;110B 1167 11AF;
+C5F5;C5F5;110B 1167 11B0;C5F5;110B 1167 11B0;
+C5F6;C5F6;110B 1167 11B1;C5F6;110B 1167 11B1;
+C5F7;C5F7;110B 1167 11B2;C5F7;110B 1167 11B2;
+C5F8;C5F8;110B 1167 11B3;C5F8;110B 1167 11B3;
+C5F9;C5F9;110B 1167 11B4;C5F9;110B 1167 11B4;
+C5FA;C5FA;110B 1167 11B5;C5FA;110B 1167 11B5;
+C5FB;C5FB;110B 1167 11B6;C5FB;110B 1167 11B6;
+C5FC;C5FC;110B 1167 11B7;C5FC;110B 1167 11B7;
+C5FD;C5FD;110B 1167 11B8;C5FD;110B 1167 11B8;
+C5FE;C5FE;110B 1167 11B9;C5FE;110B 1167 11B9;
+C5FF;C5FF;110B 1167 11BA;C5FF;110B 1167 11BA;
+C600;C600;110B 1167 11BB;C600;110B 1167 11BB;
+C601;C601;110B 1167 11BC;C601;110B 1167 11BC;
+C602;C602;110B 1167 11BD;C602;110B 1167 11BD;
+C603;C603;110B 1167 11BE;C603;110B 1167 11BE;
+C604;C604;110B 1167 11BF;C604;110B 1167 11BF;
+C605;C605;110B 1167 11C0;C605;110B 1167 11C0;
+C606;C606;110B 1167 11C1;C606;110B 1167 11C1;
+C607;C607;110B 1167 11C2;C607;110B 1167 11C2;
+C608;C608;110B 1168;C608;110B 1168;
+C609;C609;110B 1168 11A8;C609;110B 1168 11A8;
+C60A;C60A;110B 1168 11A9;C60A;110B 1168 11A9;
+C60B;C60B;110B 1168 11AA;C60B;110B 1168 11AA;
+C60C;C60C;110B 1168 11AB;C60C;110B 1168 11AB;
+C60D;C60D;110B 1168 11AC;C60D;110B 1168 11AC;
+C60E;C60E;110B 1168 11AD;C60E;110B 1168 11AD;
+C60F;C60F;110B 1168 11AE;C60F;110B 1168 11AE;
+C610;C610;110B 1168 11AF;C610;110B 1168 11AF;
+C611;C611;110B 1168 11B0;C611;110B 1168 11B0;
+C612;C612;110B 1168 11B1;C612;110B 1168 11B1;
+C613;C613;110B 1168 11B2;C613;110B 1168 11B2;
+C614;C614;110B 1168 11B3;C614;110B 1168 11B3;
+C615;C615;110B 1168 11B4;C615;110B 1168 11B4;
+C616;C616;110B 1168 11B5;C616;110B 1168 11B5;
+C617;C617;110B 1168 11B6;C617;110B 1168 11B6;
+C618;C618;110B 1168 11B7;C618;110B 1168 11B7;
+C619;C619;110B 1168 11B8;C619;110B 1168 11B8;
+C61A;C61A;110B 1168 11B9;C61A;110B 1168 11B9;
+C61B;C61B;110B 1168 11BA;C61B;110B 1168 11BA;
+C61C;C61C;110B 1168 11BB;C61C;110B 1168 11BB;
+C61D;C61D;110B 1168 11BC;C61D;110B 1168 11BC;
+C61E;C61E;110B 1168 11BD;C61E;110B 1168 11BD;
+C61F;C61F;110B 1168 11BE;C61F;110B 1168 11BE;
+C620;C620;110B 1168 11BF;C620;110B 1168 11BF;
+C621;C621;110B 1168 11C0;C621;110B 1168 11C0;
+C622;C622;110B 1168 11C1;C622;110B 1168 11C1;
+C623;C623;110B 1168 11C2;C623;110B 1168 11C2;
+C624;C624;110B 1169;C624;110B 1169;
+C625;C625;110B 1169 11A8;C625;110B 1169 11A8;
+C626;C626;110B 1169 11A9;C626;110B 1169 11A9;
+C627;C627;110B 1169 11AA;C627;110B 1169 11AA;
+C628;C628;110B 1169 11AB;C628;110B 1169 11AB;
+C629;C629;110B 1169 11AC;C629;110B 1169 11AC;
+C62A;C62A;110B 1169 11AD;C62A;110B 1169 11AD;
+C62B;C62B;110B 1169 11AE;C62B;110B 1169 11AE;
+C62C;C62C;110B 1169 11AF;C62C;110B 1169 11AF;
+C62D;C62D;110B 1169 11B0;C62D;110B 1169 11B0;
+C62E;C62E;110B 1169 11B1;C62E;110B 1169 11B1;
+C62F;C62F;110B 1169 11B2;C62F;110B 1169 11B2;
+C630;C630;110B 1169 11B3;C630;110B 1169 11B3;
+C631;C631;110B 1169 11B4;C631;110B 1169 11B4;
+C632;C632;110B 1169 11B5;C632;110B 1169 11B5;
+C633;C633;110B 1169 11B6;C633;110B 1169 11B6;
+C634;C634;110B 1169 11B7;C634;110B 1169 11B7;
+C635;C635;110B 1169 11B8;C635;110B 1169 11B8;
+C636;C636;110B 1169 11B9;C636;110B 1169 11B9;
+C637;C637;110B 1169 11BA;C637;110B 1169 11BA;
+C638;C638;110B 1169 11BB;C638;110B 1169 11BB;
+C639;C639;110B 1169 11BC;C639;110B 1169 11BC;
+C63A;C63A;110B 1169 11BD;C63A;110B 1169 11BD;
+C63B;C63B;110B 1169 11BE;C63B;110B 1169 11BE;
+C63C;C63C;110B 1169 11BF;C63C;110B 1169 11BF;
+C63D;C63D;110B 1169 11C0;C63D;110B 1169 11C0;
+C63E;C63E;110B 1169 11C1;C63E;110B 1169 11C1;
+C63F;C63F;110B 1169 11C2;C63F;110B 1169 11C2;
+C640;C640;110B 116A;C640;110B 116A;
+C641;C641;110B 116A 11A8;C641;110B 116A 11A8;
+C642;C642;110B 116A 11A9;C642;110B 116A 11A9;
+C643;C643;110B 116A 11AA;C643;110B 116A 11AA;
+C644;C644;110B 116A 11AB;C644;110B 116A 11AB;
+C645;C645;110B 116A 11AC;C645;110B 116A 11AC;
+C646;C646;110B 116A 11AD;C646;110B 116A 11AD;
+C647;C647;110B 116A 11AE;C647;110B 116A 11AE;
+C648;C648;110B 116A 11AF;C648;110B 116A 11AF;
+C649;C649;110B 116A 11B0;C649;110B 116A 11B0;
+C64A;C64A;110B 116A 11B1;C64A;110B 116A 11B1;
+C64B;C64B;110B 116A 11B2;C64B;110B 116A 11B2;
+C64C;C64C;110B 116A 11B3;C64C;110B 116A 11B3;
+C64D;C64D;110B 116A 11B4;C64D;110B 116A 11B4;
+C64E;C64E;110B 116A 11B5;C64E;110B 116A 11B5;
+C64F;C64F;110B 116A 11B6;C64F;110B 116A 11B6;
+C650;C650;110B 116A 11B7;C650;110B 116A 11B7;
+C651;C651;110B 116A 11B8;C651;110B 116A 11B8;
+C652;C652;110B 116A 11B9;C652;110B 116A 11B9;
+C653;C653;110B 116A 11BA;C653;110B 116A 11BA;
+C654;C654;110B 116A 11BB;C654;110B 116A 11BB;
+C655;C655;110B 116A 11BC;C655;110B 116A 11BC;
+C656;C656;110B 116A 11BD;C656;110B 116A 11BD;
+C657;C657;110B 116A 11BE;C657;110B 116A 11BE;
+C658;C658;110B 116A 11BF;C658;110B 116A 11BF;
+C659;C659;110B 116A 11C0;C659;110B 116A 11C0;
+C65A;C65A;110B 116A 11C1;C65A;110B 116A 11C1;
+C65B;C65B;110B 116A 11C2;C65B;110B 116A 11C2;
+C65C;C65C;110B 116B;C65C;110B 116B;
+C65D;C65D;110B 116B 11A8;C65D;110B 116B 11A8;
+C65E;C65E;110B 116B 11A9;C65E;110B 116B 11A9;
+C65F;C65F;110B 116B 11AA;C65F;110B 116B 11AA;
+C660;C660;110B 116B 11AB;C660;110B 116B 11AB;
+C661;C661;110B 116B 11AC;C661;110B 116B 11AC;
+C662;C662;110B 116B 11AD;C662;110B 116B 11AD;
+C663;C663;110B 116B 11AE;C663;110B 116B 11AE;
+C664;C664;110B 116B 11AF;C664;110B 116B 11AF;
+C665;C665;110B 116B 11B0;C665;110B 116B 11B0;
+C666;C666;110B 116B 11B1;C666;110B 116B 11B1;
+C667;C667;110B 116B 11B2;C667;110B 116B 11B2;
+C668;C668;110B 116B 11B3;C668;110B 116B 11B3;
+C669;C669;110B 116B 11B4;C669;110B 116B 11B4;
+C66A;C66A;110B 116B 11B5;C66A;110B 116B 11B5;
+C66B;C66B;110B 116B 11B6;C66B;110B 116B 11B6;
+C66C;C66C;110B 116B 11B7;C66C;110B 116B 11B7;
+C66D;C66D;110B 116B 11B8;C66D;110B 116B 11B8;
+C66E;C66E;110B 116B 11B9;C66E;110B 116B 11B9;
+C66F;C66F;110B 116B 11BA;C66F;110B 116B 11BA;
+C670;C670;110B 116B 11BB;C670;110B 116B 11BB;
+C671;C671;110B 116B 11BC;C671;110B 116B 11BC;
+C672;C672;110B 116B 11BD;C672;110B 116B 11BD;
+C673;C673;110B 116B 11BE;C673;110B 116B 11BE;
+C674;C674;110B 116B 11BF;C674;110B 116B 11BF;
+C675;C675;110B 116B 11C0;C675;110B 116B 11C0;
+C676;C676;110B 116B 11C1;C676;110B 116B 11C1;
+C677;C677;110B 116B 11C2;C677;110B 116B 11C2;
+C678;C678;110B 116C;C678;110B 116C;
+C679;C679;110B 116C 11A8;C679;110B 116C 11A8;
+C67A;C67A;110B 116C 11A9;C67A;110B 116C 11A9;
+C67B;C67B;110B 116C 11AA;C67B;110B 116C 11AA;
+C67C;C67C;110B 116C 11AB;C67C;110B 116C 11AB;
+C67D;C67D;110B 116C 11AC;C67D;110B 116C 11AC;
+C67E;C67E;110B 116C 11AD;C67E;110B 116C 11AD;
+C67F;C67F;110B 116C 11AE;C67F;110B 116C 11AE;
+C680;C680;110B 116C 11AF;C680;110B 116C 11AF;
+C681;C681;110B 116C 11B0;C681;110B 116C 11B0;
+C682;C682;110B 116C 11B1;C682;110B 116C 11B1;
+C683;C683;110B 116C 11B2;C683;110B 116C 11B2;
+C684;C684;110B 116C 11B3;C684;110B 116C 11B3;
+C685;C685;110B 116C 11B4;C685;110B 116C 11B4;
+C686;C686;110B 116C 11B5;C686;110B 116C 11B5;
+C687;C687;110B 116C 11B6;C687;110B 116C 11B6;
+C688;C688;110B 116C 11B7;C688;110B 116C 11B7;
+C689;C689;110B 116C 11B8;C689;110B 116C 11B8;
+C68A;C68A;110B 116C 11B9;C68A;110B 116C 11B9;
+C68B;C68B;110B 116C 11BA;C68B;110B 116C 11BA;
+C68C;C68C;110B 116C 11BB;C68C;110B 116C 11BB;
+C68D;C68D;110B 116C 11BC;C68D;110B 116C 11BC;
+C68E;C68E;110B 116C 11BD;C68E;110B 116C 11BD;
+C68F;C68F;110B 116C 11BE;C68F;110B 116C 11BE;
+C690;C690;110B 116C 11BF;C690;110B 116C 11BF;
+C691;C691;110B 116C 11C0;C691;110B 116C 11C0;
+C692;C692;110B 116C 11C1;C692;110B 116C 11C1;
+C693;C693;110B 116C 11C2;C693;110B 116C 11C2;
+C694;C694;110B 116D;C694;110B 116D;
+C695;C695;110B 116D 11A8;C695;110B 116D 11A8;
+C696;C696;110B 116D 11A9;C696;110B 116D 11A9;
+C697;C697;110B 116D 11AA;C697;110B 116D 11AA;
+C698;C698;110B 116D 11AB;C698;110B 116D 11AB;
+C699;C699;110B 116D 11AC;C699;110B 116D 11AC;
+C69A;C69A;110B 116D 11AD;C69A;110B 116D 11AD;
+C69B;C69B;110B 116D 11AE;C69B;110B 116D 11AE;
+C69C;C69C;110B 116D 11AF;C69C;110B 116D 11AF;
+C69D;C69D;110B 116D 11B0;C69D;110B 116D 11B0;
+C69E;C69E;110B 116D 11B1;C69E;110B 116D 11B1;
+C69F;C69F;110B 116D 11B2;C69F;110B 116D 11B2;
+C6A0;C6A0;110B 116D 11B3;C6A0;110B 116D 11B3;
+C6A1;C6A1;110B 116D 11B4;C6A1;110B 116D 11B4;
+C6A2;C6A2;110B 116D 11B5;C6A2;110B 116D 11B5;
+C6A3;C6A3;110B 116D 11B6;C6A3;110B 116D 11B6;
+C6A4;C6A4;110B 116D 11B7;C6A4;110B 116D 11B7;
+C6A5;C6A5;110B 116D 11B8;C6A5;110B 116D 11B8;
+C6A6;C6A6;110B 116D 11B9;C6A6;110B 116D 11B9;
+C6A7;C6A7;110B 116D 11BA;C6A7;110B 116D 11BA;
+C6A8;C6A8;110B 116D 11BB;C6A8;110B 116D 11BB;
+C6A9;C6A9;110B 116D 11BC;C6A9;110B 116D 11BC;
+C6AA;C6AA;110B 116D 11BD;C6AA;110B 116D 11BD;
+C6AB;C6AB;110B 116D 11BE;C6AB;110B 116D 11BE;
+C6AC;C6AC;110B 116D 11BF;C6AC;110B 116D 11BF;
+C6AD;C6AD;110B 116D 11C0;C6AD;110B 116D 11C0;
+C6AE;C6AE;110B 116D 11C1;C6AE;110B 116D 11C1;
+C6AF;C6AF;110B 116D 11C2;C6AF;110B 116D 11C2;
+C6B0;C6B0;110B 116E;C6B0;110B 116E;
+C6B1;C6B1;110B 116E 11A8;C6B1;110B 116E 11A8;
+C6B2;C6B2;110B 116E 11A9;C6B2;110B 116E 11A9;
+C6B3;C6B3;110B 116E 11AA;C6B3;110B 116E 11AA;
+C6B4;C6B4;110B 116E 11AB;C6B4;110B 116E 11AB;
+C6B5;C6B5;110B 116E 11AC;C6B5;110B 116E 11AC;
+C6B6;C6B6;110B 116E 11AD;C6B6;110B 116E 11AD;
+C6B7;C6B7;110B 116E 11AE;C6B7;110B 116E 11AE;
+C6B8;C6B8;110B 116E 11AF;C6B8;110B 116E 11AF;
+C6B9;C6B9;110B 116E 11B0;C6B9;110B 116E 11B0;
+C6BA;C6BA;110B 116E 11B1;C6BA;110B 116E 11B1;
+C6BB;C6BB;110B 116E 11B2;C6BB;110B 116E 11B2;
+C6BC;C6BC;110B 116E 11B3;C6BC;110B 116E 11B3;
+C6BD;C6BD;110B 116E 11B4;C6BD;110B 116E 11B4;
+C6BE;C6BE;110B 116E 11B5;C6BE;110B 116E 11B5;
+C6BF;C6BF;110B 116E 11B6;C6BF;110B 116E 11B6;
+C6C0;C6C0;110B 116E 11B7;C6C0;110B 116E 11B7;
+C6C1;C6C1;110B 116E 11B8;C6C1;110B 116E 11B8;
+C6C2;C6C2;110B 116E 11B9;C6C2;110B 116E 11B9;
+C6C3;C6C3;110B 116E 11BA;C6C3;110B 116E 11BA;
+C6C4;C6C4;110B 116E 11BB;C6C4;110B 116E 11BB;
+C6C5;C6C5;110B 116E 11BC;C6C5;110B 116E 11BC;
+C6C6;C6C6;110B 116E 11BD;C6C6;110B 116E 11BD;
+C6C7;C6C7;110B 116E 11BE;C6C7;110B 116E 11BE;
+C6C8;C6C8;110B 116E 11BF;C6C8;110B 116E 11BF;
+C6C9;C6C9;110B 116E 11C0;C6C9;110B 116E 11C0;
+C6CA;C6CA;110B 116E 11C1;C6CA;110B 116E 11C1;
+C6CB;C6CB;110B 116E 11C2;C6CB;110B 116E 11C2;
+C6CC;C6CC;110B 116F;C6CC;110B 116F;
+C6CD;C6CD;110B 116F 11A8;C6CD;110B 116F 11A8;
+C6CE;C6CE;110B 116F 11A9;C6CE;110B 116F 11A9;
+C6CF;C6CF;110B 116F 11AA;C6CF;110B 116F 11AA;
+C6D0;C6D0;110B 116F 11AB;C6D0;110B 116F 11AB;
+C6D1;C6D1;110B 116F 11AC;C6D1;110B 116F 11AC;
+C6D2;C6D2;110B 116F 11AD;C6D2;110B 116F 11AD;
+C6D3;C6D3;110B 116F 11AE;C6D3;110B 116F 11AE;
+C6D4;C6D4;110B 116F 11AF;C6D4;110B 116F 11AF;
+C6D5;C6D5;110B 116F 11B0;C6D5;110B 116F 11B0;
+C6D6;C6D6;110B 116F 11B1;C6D6;110B 116F 11B1;
+C6D7;C6D7;110B 116F 11B2;C6D7;110B 116F 11B2;
+C6D8;C6D8;110B 116F 11B3;C6D8;110B 116F 11B3;
+C6D9;C6D9;110B 116F 11B4;C6D9;110B 116F 11B4;
+C6DA;C6DA;110B 116F 11B5;C6DA;110B 116F 11B5;
+C6DB;C6DB;110B 116F 11B6;C6DB;110B 116F 11B6;
+C6DC;C6DC;110B 116F 11B7;C6DC;110B 116F 11B7;
+C6DD;C6DD;110B 116F 11B8;C6DD;110B 116F 11B8;
+C6DE;C6DE;110B 116F 11B9;C6DE;110B 116F 11B9;
+C6DF;C6DF;110B 116F 11BA;C6DF;110B 116F 11BA;
+C6E0;C6E0;110B 116F 11BB;C6E0;110B 116F 11BB;
+C6E1;C6E1;110B 116F 11BC;C6E1;110B 116F 11BC;
+C6E2;C6E2;110B 116F 11BD;C6E2;110B 116F 11BD;
+C6E3;C6E3;110B 116F 11BE;C6E3;110B 116F 11BE;
+C6E4;C6E4;110B 116F 11BF;C6E4;110B 116F 11BF;
+C6E5;C6E5;110B 116F 11C0;C6E5;110B 116F 11C0;
+C6E6;C6E6;110B 116F 11C1;C6E6;110B 116F 11C1;
+C6E7;C6E7;110B 116F 11C2;C6E7;110B 116F 11C2;
+C6E8;C6E8;110B 1170;C6E8;110B 1170;
+C6E9;C6E9;110B 1170 11A8;C6E9;110B 1170 11A8;
+C6EA;C6EA;110B 1170 11A9;C6EA;110B 1170 11A9;
+C6EB;C6EB;110B 1170 11AA;C6EB;110B 1170 11AA;
+C6EC;C6EC;110B 1170 11AB;C6EC;110B 1170 11AB;
+C6ED;C6ED;110B 1170 11AC;C6ED;110B 1170 11AC;
+C6EE;C6EE;110B 1170 11AD;C6EE;110B 1170 11AD;
+C6EF;C6EF;110B 1170 11AE;C6EF;110B 1170 11AE;
+C6F0;C6F0;110B 1170 11AF;C6F0;110B 1170 11AF;
+C6F1;C6F1;110B 1170 11B0;C6F1;110B 1170 11B0;
+C6F2;C6F2;110B 1170 11B1;C6F2;110B 1170 11B1;
+C6F3;C6F3;110B 1170 11B2;C6F3;110B 1170 11B2;
+C6F4;C6F4;110B 1170 11B3;C6F4;110B 1170 11B3;
+C6F5;C6F5;110B 1170 11B4;C6F5;110B 1170 11B4;
+C6F6;C6F6;110B 1170 11B5;C6F6;110B 1170 11B5;
+C6F7;C6F7;110B 1170 11B6;C6F7;110B 1170 11B6;
+C6F8;C6F8;110B 1170 11B7;C6F8;110B 1170 11B7;
+C6F9;C6F9;110B 1170 11B8;C6F9;110B 1170 11B8;
+C6FA;C6FA;110B 1170 11B9;C6FA;110B 1170 11B9;
+C6FB;C6FB;110B 1170 11BA;C6FB;110B 1170 11BA;
+C6FC;C6FC;110B 1170 11BB;C6FC;110B 1170 11BB;
+C6FD;C6FD;110B 1170 11BC;C6FD;110B 1170 11BC;
+C6FE;C6FE;110B 1170 11BD;C6FE;110B 1170 11BD;
+C6FF;C6FF;110B 1170 11BE;C6FF;110B 1170 11BE;
+C700;C700;110B 1170 11BF;C700;110B 1170 11BF;
+C701;C701;110B 1170 11C0;C701;110B 1170 11C0;
+C702;C702;110B 1170 11C1;C702;110B 1170 11C1;
+C703;C703;110B 1170 11C2;C703;110B 1170 11C2;
+C704;C704;110B 1171;C704;110B 1171;
+C705;C705;110B 1171 11A8;C705;110B 1171 11A8;
+C706;C706;110B 1171 11A9;C706;110B 1171 11A9;
+C707;C707;110B 1171 11AA;C707;110B 1171 11AA;
+C708;C708;110B 1171 11AB;C708;110B 1171 11AB;
+C709;C709;110B 1171 11AC;C709;110B 1171 11AC;
+C70A;C70A;110B 1171 11AD;C70A;110B 1171 11AD;
+C70B;C70B;110B 1171 11AE;C70B;110B 1171 11AE;
+C70C;C70C;110B 1171 11AF;C70C;110B 1171 11AF;
+C70D;C70D;110B 1171 11B0;C70D;110B 1171 11B0;
+C70E;C70E;110B 1171 11B1;C70E;110B 1171 11B1;
+C70F;C70F;110B 1171 11B2;C70F;110B 1171 11B2;
+C710;C710;110B 1171 11B3;C710;110B 1171 11B3;
+C711;C711;110B 1171 11B4;C711;110B 1171 11B4;
+C712;C712;110B 1171 11B5;C712;110B 1171 11B5;
+C713;C713;110B 1171 11B6;C713;110B 1171 11B6;
+C714;C714;110B 1171 11B7;C714;110B 1171 11B7;
+C715;C715;110B 1171 11B8;C715;110B 1171 11B8;
+C716;C716;110B 1171 11B9;C716;110B 1171 11B9;
+C717;C717;110B 1171 11BA;C717;110B 1171 11BA;
+C718;C718;110B 1171 11BB;C718;110B 1171 11BB;
+C719;C719;110B 1171 11BC;C719;110B 1171 11BC;
+C71A;C71A;110B 1171 11BD;C71A;110B 1171 11BD;
+C71B;C71B;110B 1171 11BE;C71B;110B 1171 11BE;
+C71C;C71C;110B 1171 11BF;C71C;110B 1171 11BF;
+C71D;C71D;110B 1171 11C0;C71D;110B 1171 11C0;
+C71E;C71E;110B 1171 11C1;C71E;110B 1171 11C1;
+C71F;C71F;110B 1171 11C2;C71F;110B 1171 11C2;
+C720;C720;110B 1172;C720;110B 1172;
+C721;C721;110B 1172 11A8;C721;110B 1172 11A8;
+C722;C722;110B 1172 11A9;C722;110B 1172 11A9;
+C723;C723;110B 1172 11AA;C723;110B 1172 11AA;
+C724;C724;110B 1172 11AB;C724;110B 1172 11AB;
+C725;C725;110B 1172 11AC;C725;110B 1172 11AC;
+C726;C726;110B 1172 11AD;C726;110B 1172 11AD;
+C727;C727;110B 1172 11AE;C727;110B 1172 11AE;
+C728;C728;110B 1172 11AF;C728;110B 1172 11AF;
+C729;C729;110B 1172 11B0;C729;110B 1172 11B0;
+C72A;C72A;110B 1172 11B1;C72A;110B 1172 11B1;
+C72B;C72B;110B 1172 11B2;C72B;110B 1172 11B2;
+C72C;C72C;110B 1172 11B3;C72C;110B 1172 11B3;
+C72D;C72D;110B 1172 11B4;C72D;110B 1172 11B4;
+C72E;C72E;110B 1172 11B5;C72E;110B 1172 11B5;
+C72F;C72F;110B 1172 11B6;C72F;110B 1172 11B6;
+C730;C730;110B 1172 11B7;C730;110B 1172 11B7;
+C731;C731;110B 1172 11B8;C731;110B 1172 11B8;
+C732;C732;110B 1172 11B9;C732;110B 1172 11B9;
+C733;C733;110B 1172 11BA;C733;110B 1172 11BA;
+C734;C734;110B 1172 11BB;C734;110B 1172 11BB;
+C735;C735;110B 1172 11BC;C735;110B 1172 11BC;
+C736;C736;110B 1172 11BD;C736;110B 1172 11BD;
+C737;C737;110B 1172 11BE;C737;110B 1172 11BE;
+C738;C738;110B 1172 11BF;C738;110B 1172 11BF;
+C739;C739;110B 1172 11C0;C739;110B 1172 11C0;
+C73A;C73A;110B 1172 11C1;C73A;110B 1172 11C1;
+C73B;C73B;110B 1172 11C2;C73B;110B 1172 11C2;
+C73C;C73C;110B 1173;C73C;110B 1173;
+C73D;C73D;110B 1173 11A8;C73D;110B 1173 11A8;
+C73E;C73E;110B 1173 11A9;C73E;110B 1173 11A9;
+C73F;C73F;110B 1173 11AA;C73F;110B 1173 11AA;
+C740;C740;110B 1173 11AB;C740;110B 1173 11AB;
+C741;C741;110B 1173 11AC;C741;110B 1173 11AC;
+C742;C742;110B 1173 11AD;C742;110B 1173 11AD;
+C743;C743;110B 1173 11AE;C743;110B 1173 11AE;
+C744;C744;110B 1173 11AF;C744;110B 1173 11AF;
+C745;C745;110B 1173 11B0;C745;110B 1173 11B0;
+C746;C746;110B 1173 11B1;C746;110B 1173 11B1;
+C747;C747;110B 1173 11B2;C747;110B 1173 11B2;
+C748;C748;110B 1173 11B3;C748;110B 1173 11B3;
+C749;C749;110B 1173 11B4;C749;110B 1173 11B4;
+C74A;C74A;110B 1173 11B5;C74A;110B 1173 11B5;
+C74B;C74B;110B 1173 11B6;C74B;110B 1173 11B6;
+C74C;C74C;110B 1173 11B7;C74C;110B 1173 11B7;
+C74D;C74D;110B 1173 11B8;C74D;110B 1173 11B8;
+C74E;C74E;110B 1173 11B9;C74E;110B 1173 11B9;
+C74F;C74F;110B 1173 11BA;C74F;110B 1173 11BA;
+C750;C750;110B 1173 11BB;C750;110B 1173 11BB;
+C751;C751;110B 1173 11BC;C751;110B 1173 11BC;
+C752;C752;110B 1173 11BD;C752;110B 1173 11BD;
+C753;C753;110B 1173 11BE;C753;110B 1173 11BE;
+C754;C754;110B 1173 11BF;C754;110B 1173 11BF;
+C755;C755;110B 1173 11C0;C755;110B 1173 11C0;
+C756;C756;110B 1173 11C1;C756;110B 1173 11C1;
+C757;C757;110B 1173 11C2;C757;110B 1173 11C2;
+C758;C758;110B 1174;C758;110B 1174;
+C759;C759;110B 1174 11A8;C759;110B 1174 11A8;
+C75A;C75A;110B 1174 11A9;C75A;110B 1174 11A9;
+C75B;C75B;110B 1174 11AA;C75B;110B 1174 11AA;
+C75C;C75C;110B 1174 11AB;C75C;110B 1174 11AB;
+C75D;C75D;110B 1174 11AC;C75D;110B 1174 11AC;
+C75E;C75E;110B 1174 11AD;C75E;110B 1174 11AD;
+C75F;C75F;110B 1174 11AE;C75F;110B 1174 11AE;
+C760;C760;110B 1174 11AF;C760;110B 1174 11AF;
+C761;C761;110B 1174 11B0;C761;110B 1174 11B0;
+C762;C762;110B 1174 11B1;C762;110B 1174 11B1;
+C763;C763;110B 1174 11B2;C763;110B 1174 11B2;
+C764;C764;110B 1174 11B3;C764;110B 1174 11B3;
+C765;C765;110B 1174 11B4;C765;110B 1174 11B4;
+C766;C766;110B 1174 11B5;C766;110B 1174 11B5;
+C767;C767;110B 1174 11B6;C767;110B 1174 11B6;
+C768;C768;110B 1174 11B7;C768;110B 1174 11B7;
+C769;C769;110B 1174 11B8;C769;110B 1174 11B8;
+C76A;C76A;110B 1174 11B9;C76A;110B 1174 11B9;
+C76B;C76B;110B 1174 11BA;C76B;110B 1174 11BA;
+C76C;C76C;110B 1174 11BB;C76C;110B 1174 11BB;
+C76D;C76D;110B 1174 11BC;C76D;110B 1174 11BC;
+C76E;C76E;110B 1174 11BD;C76E;110B 1174 11BD;
+C76F;C76F;110B 1174 11BE;C76F;110B 1174 11BE;
+C770;C770;110B 1174 11BF;C770;110B 1174 11BF;
+C771;C771;110B 1174 11C0;C771;110B 1174 11C0;
+C772;C772;110B 1174 11C1;C772;110B 1174 11C1;
+C773;C773;110B 1174 11C2;C773;110B 1174 11C2;
+C774;C774;110B 1175;C774;110B 1175;
+C775;C775;110B 1175 11A8;C775;110B 1175 11A8;
+C776;C776;110B 1175 11A9;C776;110B 1175 11A9;
+C777;C777;110B 1175 11AA;C777;110B 1175 11AA;
+C778;C778;110B 1175 11AB;C778;110B 1175 11AB;
+C779;C779;110B 1175 11AC;C779;110B 1175 11AC;
+C77A;C77A;110B 1175 11AD;C77A;110B 1175 11AD;
+C77B;C77B;110B 1175 11AE;C77B;110B 1175 11AE;
+C77C;C77C;110B 1175 11AF;C77C;110B 1175 11AF;
+C77D;C77D;110B 1175 11B0;C77D;110B 1175 11B0;
+C77E;C77E;110B 1175 11B1;C77E;110B 1175 11B1;
+C77F;C77F;110B 1175 11B2;C77F;110B 1175 11B2;
+C780;C780;110B 1175 11B3;C780;110B 1175 11B3;
+C781;C781;110B 1175 11B4;C781;110B 1175 11B4;
+C782;C782;110B 1175 11B5;C782;110B 1175 11B5;
+C783;C783;110B 1175 11B6;C783;110B 1175 11B6;
+C784;C784;110B 1175 11B7;C784;110B 1175 11B7;
+C785;C785;110B 1175 11B8;C785;110B 1175 11B8;
+C786;C786;110B 1175 11B9;C786;110B 1175 11B9;
+C787;C787;110B 1175 11BA;C787;110B 1175 11BA;
+C788;C788;110B 1175 11BB;C788;110B 1175 11BB;
+C789;C789;110B 1175 11BC;C789;110B 1175 11BC;
+C78A;C78A;110B 1175 11BD;C78A;110B 1175 11BD;
+C78B;C78B;110B 1175 11BE;C78B;110B 1175 11BE;
+C78C;C78C;110B 1175 11BF;C78C;110B 1175 11BF;
+C78D;C78D;110B 1175 11C0;C78D;110B 1175 11C0;
+C78E;C78E;110B 1175 11C1;C78E;110B 1175 11C1;
+C78F;C78F;110B 1175 11C2;C78F;110B 1175 11C2;
+C790;C790;110C 1161;C790;110C 1161;
+C791;C791;110C 1161 11A8;C791;110C 1161 11A8;
+C792;C792;110C 1161 11A9;C792;110C 1161 11A9;
+C793;C793;110C 1161 11AA;C793;110C 1161 11AA;
+C794;C794;110C 1161 11AB;C794;110C 1161 11AB;
+C795;C795;110C 1161 11AC;C795;110C 1161 11AC;
+C796;C796;110C 1161 11AD;C796;110C 1161 11AD;
+C797;C797;110C 1161 11AE;C797;110C 1161 11AE;
+C798;C798;110C 1161 11AF;C798;110C 1161 11AF;
+C799;C799;110C 1161 11B0;C799;110C 1161 11B0;
+C79A;C79A;110C 1161 11B1;C79A;110C 1161 11B1;
+C79B;C79B;110C 1161 11B2;C79B;110C 1161 11B2;
+C79C;C79C;110C 1161 11B3;C79C;110C 1161 11B3;
+C79D;C79D;110C 1161 11B4;C79D;110C 1161 11B4;
+C79E;C79E;110C 1161 11B5;C79E;110C 1161 11B5;
+C79F;C79F;110C 1161 11B6;C79F;110C 1161 11B6;
+C7A0;C7A0;110C 1161 11B7;C7A0;110C 1161 11B7;
+C7A1;C7A1;110C 1161 11B8;C7A1;110C 1161 11B8;
+C7A2;C7A2;110C 1161 11B9;C7A2;110C 1161 11B9;
+C7A3;C7A3;110C 1161 11BA;C7A3;110C 1161 11BA;
+C7A4;C7A4;110C 1161 11BB;C7A4;110C 1161 11BB;
+C7A5;C7A5;110C 1161 11BC;C7A5;110C 1161 11BC;
+C7A6;C7A6;110C 1161 11BD;C7A6;110C 1161 11BD;
+C7A7;C7A7;110C 1161 11BE;C7A7;110C 1161 11BE;
+C7A8;C7A8;110C 1161 11BF;C7A8;110C 1161 11BF;
+C7A9;C7A9;110C 1161 11C0;C7A9;110C 1161 11C0;
+C7AA;C7AA;110C 1161 11C1;C7AA;110C 1161 11C1;
+C7AB;C7AB;110C 1161 11C2;C7AB;110C 1161 11C2;
+C7AC;C7AC;110C 1162;C7AC;110C 1162;
+C7AD;C7AD;110C 1162 11A8;C7AD;110C 1162 11A8;
+C7AE;C7AE;110C 1162 11A9;C7AE;110C 1162 11A9;
+C7AF;C7AF;110C 1162 11AA;C7AF;110C 1162 11AA;
+C7B0;C7B0;110C 1162 11AB;C7B0;110C 1162 11AB;
+C7B1;C7B1;110C 1162 11AC;C7B1;110C 1162 11AC;
+C7B2;C7B2;110C 1162 11AD;C7B2;110C 1162 11AD;
+C7B3;C7B3;110C 1162 11AE;C7B3;110C 1162 11AE;
+C7B4;C7B4;110C 1162 11AF;C7B4;110C 1162 11AF;
+C7B5;C7B5;110C 1162 11B0;C7B5;110C 1162 11B0;
+C7B6;C7B6;110C 1162 11B1;C7B6;110C 1162 11B1;
+C7B7;C7B7;110C 1162 11B2;C7B7;110C 1162 11B2;
+C7B8;C7B8;110C 1162 11B3;C7B8;110C 1162 11B3;
+C7B9;C7B9;110C 1162 11B4;C7B9;110C 1162 11B4;
+C7BA;C7BA;110C 1162 11B5;C7BA;110C 1162 11B5;
+C7BB;C7BB;110C 1162 11B6;C7BB;110C 1162 11B6;
+C7BC;C7BC;110C 1162 11B7;C7BC;110C 1162 11B7;
+C7BD;C7BD;110C 1162 11B8;C7BD;110C 1162 11B8;
+C7BE;C7BE;110C 1162 11B9;C7BE;110C 1162 11B9;
+C7BF;C7BF;110C 1162 11BA;C7BF;110C 1162 11BA;
+C7C0;C7C0;110C 1162 11BB;C7C0;110C 1162 11BB;
+C7C1;C7C1;110C 1162 11BC;C7C1;110C 1162 11BC;
+C7C2;C7C2;110C 1162 11BD;C7C2;110C 1162 11BD;
+C7C3;C7C3;110C 1162 11BE;C7C3;110C 1162 11BE;
+C7C4;C7C4;110C 1162 11BF;C7C4;110C 1162 11BF;
+C7C5;C7C5;110C 1162 11C0;C7C5;110C 1162 11C0;
+C7C6;C7C6;110C 1162 11C1;C7C6;110C 1162 11C1;
+C7C7;C7C7;110C 1162 11C2;C7C7;110C 1162 11C2;
+C7C8;C7C8;110C 1163;C7C8;110C 1163;
+C7C9;C7C9;110C 1163 11A8;C7C9;110C 1163 11A8;
+C7CA;C7CA;110C 1163 11A9;C7CA;110C 1163 11A9;
+C7CB;C7CB;110C 1163 11AA;C7CB;110C 1163 11AA;
+C7CC;C7CC;110C 1163 11AB;C7CC;110C 1163 11AB;
+C7CD;C7CD;110C 1163 11AC;C7CD;110C 1163 11AC;
+C7CE;C7CE;110C 1163 11AD;C7CE;110C 1163 11AD;
+C7CF;C7CF;110C 1163 11AE;C7CF;110C 1163 11AE;
+C7D0;C7D0;110C 1163 11AF;C7D0;110C 1163 11AF;
+C7D1;C7D1;110C 1163 11B0;C7D1;110C 1163 11B0;
+C7D2;C7D2;110C 1163 11B1;C7D2;110C 1163 11B1;
+C7D3;C7D3;110C 1163 11B2;C7D3;110C 1163 11B2;
+C7D4;C7D4;110C 1163 11B3;C7D4;110C 1163 11B3;
+C7D5;C7D5;110C 1163 11B4;C7D5;110C 1163 11B4;
+C7D6;C7D6;110C 1163 11B5;C7D6;110C 1163 11B5;
+C7D7;C7D7;110C 1163 11B6;C7D7;110C 1163 11B6;
+C7D8;C7D8;110C 1163 11B7;C7D8;110C 1163 11B7;
+C7D9;C7D9;110C 1163 11B8;C7D9;110C 1163 11B8;
+C7DA;C7DA;110C 1163 11B9;C7DA;110C 1163 11B9;
+C7DB;C7DB;110C 1163 11BA;C7DB;110C 1163 11BA;
+C7DC;C7DC;110C 1163 11BB;C7DC;110C 1163 11BB;
+C7DD;C7DD;110C 1163 11BC;C7DD;110C 1163 11BC;
+C7DE;C7DE;110C 1163 11BD;C7DE;110C 1163 11BD;
+C7DF;C7DF;110C 1163 11BE;C7DF;110C 1163 11BE;
+C7E0;C7E0;110C 1163 11BF;C7E0;110C 1163 11BF;
+C7E1;C7E1;110C 1163 11C0;C7E1;110C 1163 11C0;
+C7E2;C7E2;110C 1163 11C1;C7E2;110C 1163 11C1;
+C7E3;C7E3;110C 1163 11C2;C7E3;110C 1163 11C2;
+C7E4;C7E4;110C 1164;C7E4;110C 1164;
+C7E5;C7E5;110C 1164 11A8;C7E5;110C 1164 11A8;
+C7E6;C7E6;110C 1164 11A9;C7E6;110C 1164 11A9;
+C7E7;C7E7;110C 1164 11AA;C7E7;110C 1164 11AA;
+C7E8;C7E8;110C 1164 11AB;C7E8;110C 1164 11AB;
+C7E9;C7E9;110C 1164 11AC;C7E9;110C 1164 11AC;
+C7EA;C7EA;110C 1164 11AD;C7EA;110C 1164 11AD;
+C7EB;C7EB;110C 1164 11AE;C7EB;110C 1164 11AE;
+C7EC;C7EC;110C 1164 11AF;C7EC;110C 1164 11AF;
+C7ED;C7ED;110C 1164 11B0;C7ED;110C 1164 11B0;
+C7EE;C7EE;110C 1164 11B1;C7EE;110C 1164 11B1;
+C7EF;C7EF;110C 1164 11B2;C7EF;110C 1164 11B2;
+C7F0;C7F0;110C 1164 11B3;C7F0;110C 1164 11B3;
+C7F1;C7F1;110C 1164 11B4;C7F1;110C 1164 11B4;
+C7F2;C7F2;110C 1164 11B5;C7F2;110C 1164 11B5;
+C7F3;C7F3;110C 1164 11B6;C7F3;110C 1164 11B6;
+C7F4;C7F4;110C 1164 11B7;C7F4;110C 1164 11B7;
+C7F5;C7F5;110C 1164 11B8;C7F5;110C 1164 11B8;
+C7F6;C7F6;110C 1164 11B9;C7F6;110C 1164 11B9;
+C7F7;C7F7;110C 1164 11BA;C7F7;110C 1164 11BA;
+C7F8;C7F8;110C 1164 11BB;C7F8;110C 1164 11BB;
+C7F9;C7F9;110C 1164 11BC;C7F9;110C 1164 11BC;
+C7FA;C7FA;110C 1164 11BD;C7FA;110C 1164 11BD;
+C7FB;C7FB;110C 1164 11BE;C7FB;110C 1164 11BE;
+C7FC;C7FC;110C 1164 11BF;C7FC;110C 1164 11BF;
+C7FD;C7FD;110C 1164 11C0;C7FD;110C 1164 11C0;
+C7FE;C7FE;110C 1164 11C1;C7FE;110C 1164 11C1;
+C7FF;C7FF;110C 1164 11C2;C7FF;110C 1164 11C2;
+C800;C800;110C 1165;C800;110C 1165;
+C801;C801;110C 1165 11A8;C801;110C 1165 11A8;
+C802;C802;110C 1165 11A9;C802;110C 1165 11A9;
+C803;C803;110C 1165 11AA;C803;110C 1165 11AA;
+C804;C804;110C 1165 11AB;C804;110C 1165 11AB;
+C805;C805;110C 1165 11AC;C805;110C 1165 11AC;
+C806;C806;110C 1165 11AD;C806;110C 1165 11AD;
+C807;C807;110C 1165 11AE;C807;110C 1165 11AE;
+C808;C808;110C 1165 11AF;C808;110C 1165 11AF;
+C809;C809;110C 1165 11B0;C809;110C 1165 11B0;
+C80A;C80A;110C 1165 11B1;C80A;110C 1165 11B1;
+C80B;C80B;110C 1165 11B2;C80B;110C 1165 11B2;
+C80C;C80C;110C 1165 11B3;C80C;110C 1165 11B3;
+C80D;C80D;110C 1165 11B4;C80D;110C 1165 11B4;
+C80E;C80E;110C 1165 11B5;C80E;110C 1165 11B5;
+C80F;C80F;110C 1165 11B6;C80F;110C 1165 11B6;
+C810;C810;110C 1165 11B7;C810;110C 1165 11B7;
+C811;C811;110C 1165 11B8;C811;110C 1165 11B8;
+C812;C812;110C 1165 11B9;C812;110C 1165 11B9;
+C813;C813;110C 1165 11BA;C813;110C 1165 11BA;
+C814;C814;110C 1165 11BB;C814;110C 1165 11BB;
+C815;C815;110C 1165 11BC;C815;110C 1165 11BC;
+C816;C816;110C 1165 11BD;C816;110C 1165 11BD;
+C817;C817;110C 1165 11BE;C817;110C 1165 11BE;
+C818;C818;110C 1165 11BF;C818;110C 1165 11BF;
+C819;C819;110C 1165 11C0;C819;110C 1165 11C0;
+C81A;C81A;110C 1165 11C1;C81A;110C 1165 11C1;
+C81B;C81B;110C 1165 11C2;C81B;110C 1165 11C2;
+C81C;C81C;110C 1166;C81C;110C 1166;
+C81D;C81D;110C 1166 11A8;C81D;110C 1166 11A8;
+C81E;C81E;110C 1166 11A9;C81E;110C 1166 11A9;
+C81F;C81F;110C 1166 11AA;C81F;110C 1166 11AA;
+C820;C820;110C 1166 11AB;C820;110C 1166 11AB;
+C821;C821;110C 1166 11AC;C821;110C 1166 11AC;
+C822;C822;110C 1166 11AD;C822;110C 1166 11AD;
+C823;C823;110C 1166 11AE;C823;110C 1166 11AE;
+C824;C824;110C 1166 11AF;C824;110C 1166 11AF;
+C825;C825;110C 1166 11B0;C825;110C 1166 11B0;
+C826;C826;110C 1166 11B1;C826;110C 1166 11B1;
+C827;C827;110C 1166 11B2;C827;110C 1166 11B2;
+C828;C828;110C 1166 11B3;C828;110C 1166 11B3;
+C829;C829;110C 1166 11B4;C829;110C 1166 11B4;
+C82A;C82A;110C 1166 11B5;C82A;110C 1166 11B5;
+C82B;C82B;110C 1166 11B6;C82B;110C 1166 11B6;
+C82C;C82C;110C 1166 11B7;C82C;110C 1166 11B7;
+C82D;C82D;110C 1166 11B8;C82D;110C 1166 11B8;
+C82E;C82E;110C 1166 11B9;C82E;110C 1166 11B9;
+C82F;C82F;110C 1166 11BA;C82F;110C 1166 11BA;
+C830;C830;110C 1166 11BB;C830;110C 1166 11BB;
+C831;C831;110C 1166 11BC;C831;110C 1166 11BC;
+C832;C832;110C 1166 11BD;C832;110C 1166 11BD;
+C833;C833;110C 1166 11BE;C833;110C 1166 11BE;
+C834;C834;110C 1166 11BF;C834;110C 1166 11BF;
+C835;C835;110C 1166 11C0;C835;110C 1166 11C0;
+C836;C836;110C 1166 11C1;C836;110C 1166 11C1;
+C837;C837;110C 1166 11C2;C837;110C 1166 11C2;
+C838;C838;110C 1167;C838;110C 1167;
+C839;C839;110C 1167 11A8;C839;110C 1167 11A8;
+C83A;C83A;110C 1167 11A9;C83A;110C 1167 11A9;
+C83B;C83B;110C 1167 11AA;C83B;110C 1167 11AA;
+C83C;C83C;110C 1167 11AB;C83C;110C 1167 11AB;
+C83D;C83D;110C 1167 11AC;C83D;110C 1167 11AC;
+C83E;C83E;110C 1167 11AD;C83E;110C 1167 11AD;
+C83F;C83F;110C 1167 11AE;C83F;110C 1167 11AE;
+C840;C840;110C 1167 11AF;C840;110C 1167 11AF;
+C841;C841;110C 1167 11B0;C841;110C 1167 11B0;
+C842;C842;110C 1167 11B1;C842;110C 1167 11B1;
+C843;C843;110C 1167 11B2;C843;110C 1167 11B2;
+C844;C844;110C 1167 11B3;C844;110C 1167 11B3;
+C845;C845;110C 1167 11B4;C845;110C 1167 11B4;
+C846;C846;110C 1167 11B5;C846;110C 1167 11B5;
+C847;C847;110C 1167 11B6;C847;110C 1167 11B6;
+C848;C848;110C 1167 11B7;C848;110C 1167 11B7;
+C849;C849;110C 1167 11B8;C849;110C 1167 11B8;
+C84A;C84A;110C 1167 11B9;C84A;110C 1167 11B9;
+C84B;C84B;110C 1167 11BA;C84B;110C 1167 11BA;
+C84C;C84C;110C 1167 11BB;C84C;110C 1167 11BB;
+C84D;C84D;110C 1167 11BC;C84D;110C 1167 11BC;
+C84E;C84E;110C 1167 11BD;C84E;110C 1167 11BD;
+C84F;C84F;110C 1167 11BE;C84F;110C 1167 11BE;
+C850;C850;110C 1167 11BF;C850;110C 1167 11BF;
+C851;C851;110C 1167 11C0;C851;110C 1167 11C0;
+C852;C852;110C 1167 11C1;C852;110C 1167 11C1;
+C853;C853;110C 1167 11C2;C853;110C 1167 11C2;
+C854;C854;110C 1168;C854;110C 1168;
+C855;C855;110C 1168 11A8;C855;110C 1168 11A8;
+C856;C856;110C 1168 11A9;C856;110C 1168 11A9;
+C857;C857;110C 1168 11AA;C857;110C 1168 11AA;
+C858;C858;110C 1168 11AB;C858;110C 1168 11AB;
+C859;C859;110C 1168 11AC;C859;110C 1168 11AC;
+C85A;C85A;110C 1168 11AD;C85A;110C 1168 11AD;
+C85B;C85B;110C 1168 11AE;C85B;110C 1168 11AE;
+C85C;C85C;110C 1168 11AF;C85C;110C 1168 11AF;
+C85D;C85D;110C 1168 11B0;C85D;110C 1168 11B0;
+C85E;C85E;110C 1168 11B1;C85E;110C 1168 11B1;
+C85F;C85F;110C 1168 11B2;C85F;110C 1168 11B2;
+C860;C860;110C 1168 11B3;C860;110C 1168 11B3;
+C861;C861;110C 1168 11B4;C861;110C 1168 11B4;
+C862;C862;110C 1168 11B5;C862;110C 1168 11B5;
+C863;C863;110C 1168 11B6;C863;110C 1168 11B6;
+C864;C864;110C 1168 11B7;C864;110C 1168 11B7;
+C865;C865;110C 1168 11B8;C865;110C 1168 11B8;
+C866;C866;110C 1168 11B9;C866;110C 1168 11B9;
+C867;C867;110C 1168 11BA;C867;110C 1168 11BA;
+C868;C868;110C 1168 11BB;C868;110C 1168 11BB;
+C869;C869;110C 1168 11BC;C869;110C 1168 11BC;
+C86A;C86A;110C 1168 11BD;C86A;110C 1168 11BD;
+C86B;C86B;110C 1168 11BE;C86B;110C 1168 11BE;
+C86C;C86C;110C 1168 11BF;C86C;110C 1168 11BF;
+C86D;C86D;110C 1168 11C0;C86D;110C 1168 11C0;
+C86E;C86E;110C 1168 11C1;C86E;110C 1168 11C1;
+C86F;C86F;110C 1168 11C2;C86F;110C 1168 11C2;
+C870;C870;110C 1169;C870;110C 1169;
+C871;C871;110C 1169 11A8;C871;110C 1169 11A8;
+C872;C872;110C 1169 11A9;C872;110C 1169 11A9;
+C873;C873;110C 1169 11AA;C873;110C 1169 11AA;
+C874;C874;110C 1169 11AB;C874;110C 1169 11AB;
+C875;C875;110C 1169 11AC;C875;110C 1169 11AC;
+C876;C876;110C 1169 11AD;C876;110C 1169 11AD;
+C877;C877;110C 1169 11AE;C877;110C 1169 11AE;
+C878;C878;110C 1169 11AF;C878;110C 1169 11AF;
+C879;C879;110C 1169 11B0;C879;110C 1169 11B0;
+C87A;C87A;110C 1169 11B1;C87A;110C 1169 11B1;
+C87B;C87B;110C 1169 11B2;C87B;110C 1169 11B2;
+C87C;C87C;110C 1169 11B3;C87C;110C 1169 11B3;
+C87D;C87D;110C 1169 11B4;C87D;110C 1169 11B4;
+C87E;C87E;110C 1169 11B5;C87E;110C 1169 11B5;
+C87F;C87F;110C 1169 11B6;C87F;110C 1169 11B6;
+C880;C880;110C 1169 11B7;C880;110C 1169 11B7;
+C881;C881;110C 1169 11B8;C881;110C 1169 11B8;
+C882;C882;110C 1169 11B9;C882;110C 1169 11B9;
+C883;C883;110C 1169 11BA;C883;110C 1169 11BA;
+C884;C884;110C 1169 11BB;C884;110C 1169 11BB;
+C885;C885;110C 1169 11BC;C885;110C 1169 11BC;
+C886;C886;110C 1169 11BD;C886;110C 1169 11BD;
+C887;C887;110C 1169 11BE;C887;110C 1169 11BE;
+C888;C888;110C 1169 11BF;C888;110C 1169 11BF;
+C889;C889;110C 1169 11C0;C889;110C 1169 11C0;
+C88A;C88A;110C 1169 11C1;C88A;110C 1169 11C1;
+C88B;C88B;110C 1169 11C2;C88B;110C 1169 11C2;
+C88C;C88C;110C 116A;C88C;110C 116A;
+C88D;C88D;110C 116A 11A8;C88D;110C 116A 11A8;
+C88E;C88E;110C 116A 11A9;C88E;110C 116A 11A9;
+C88F;C88F;110C 116A 11AA;C88F;110C 116A 11AA;
+C890;C890;110C 116A 11AB;C890;110C 116A 11AB;
+C891;C891;110C 116A 11AC;C891;110C 116A 11AC;
+C892;C892;110C 116A 11AD;C892;110C 116A 11AD;
+C893;C893;110C 116A 11AE;C893;110C 116A 11AE;
+C894;C894;110C 116A 11AF;C894;110C 116A 11AF;
+C895;C895;110C 116A 11B0;C895;110C 116A 11B0;
+C896;C896;110C 116A 11B1;C896;110C 116A 11B1;
+C897;C897;110C 116A 11B2;C897;110C 116A 11B2;
+C898;C898;110C 116A 11B3;C898;110C 116A 11B3;
+C899;C899;110C 116A 11B4;C899;110C 116A 11B4;
+C89A;C89A;110C 116A 11B5;C89A;110C 116A 11B5;
+C89B;C89B;110C 116A 11B6;C89B;110C 116A 11B6;
+C89C;C89C;110C 116A 11B7;C89C;110C 116A 11B7;
+C89D;C89D;110C 116A 11B8;C89D;110C 116A 11B8;
+C89E;C89E;110C 116A 11B9;C89E;110C 116A 11B9;
+C89F;C89F;110C 116A 11BA;C89F;110C 116A 11BA;
+C8A0;C8A0;110C 116A 11BB;C8A0;110C 116A 11BB;
+C8A1;C8A1;110C 116A 11BC;C8A1;110C 116A 11BC;
+C8A2;C8A2;110C 116A 11BD;C8A2;110C 116A 11BD;
+C8A3;C8A3;110C 116A 11BE;C8A3;110C 116A 11BE;
+C8A4;C8A4;110C 116A 11BF;C8A4;110C 116A 11BF;
+C8A5;C8A5;110C 116A 11C0;C8A5;110C 116A 11C0;
+C8A6;C8A6;110C 116A 11C1;C8A6;110C 116A 11C1;
+C8A7;C8A7;110C 116A 11C2;C8A7;110C 116A 11C2;
+C8A8;C8A8;110C 116B;C8A8;110C 116B;
+C8A9;C8A9;110C 116B 11A8;C8A9;110C 116B 11A8;
+C8AA;C8AA;110C 116B 11A9;C8AA;110C 116B 11A9;
+C8AB;C8AB;110C 116B 11AA;C8AB;110C 116B 11AA;
+C8AC;C8AC;110C 116B 11AB;C8AC;110C 116B 11AB;
+C8AD;C8AD;110C 116B 11AC;C8AD;110C 116B 11AC;
+C8AE;C8AE;110C 116B 11AD;C8AE;110C 116B 11AD;
+C8AF;C8AF;110C 116B 11AE;C8AF;110C 116B 11AE;
+C8B0;C8B0;110C 116B 11AF;C8B0;110C 116B 11AF;
+C8B1;C8B1;110C 116B 11B0;C8B1;110C 116B 11B0;
+C8B2;C8B2;110C 116B 11B1;C8B2;110C 116B 11B1;
+C8B3;C8B3;110C 116B 11B2;C8B3;110C 116B 11B2;
+C8B4;C8B4;110C 116B 11B3;C8B4;110C 116B 11B3;
+C8B5;C8B5;110C 116B 11B4;C8B5;110C 116B 11B4;
+C8B6;C8B6;110C 116B 11B5;C8B6;110C 116B 11B5;
+C8B7;C8B7;110C 116B 11B6;C8B7;110C 116B 11B6;
+C8B8;C8B8;110C 116B 11B7;C8B8;110C 116B 11B7;
+C8B9;C8B9;110C 116B 11B8;C8B9;110C 116B 11B8;
+C8BA;C8BA;110C 116B 11B9;C8BA;110C 116B 11B9;
+C8BB;C8BB;110C 116B 11BA;C8BB;110C 116B 11BA;
+C8BC;C8BC;110C 116B 11BB;C8BC;110C 116B 11BB;
+C8BD;C8BD;110C 116B 11BC;C8BD;110C 116B 11BC;
+C8BE;C8BE;110C 116B 11BD;C8BE;110C 116B 11BD;
+C8BF;C8BF;110C 116B 11BE;C8BF;110C 116B 11BE;
+C8C0;C8C0;110C 116B 11BF;C8C0;110C 116B 11BF;
+C8C1;C8C1;110C 116B 11C0;C8C1;110C 116B 11C0;
+C8C2;C8C2;110C 116B 11C1;C8C2;110C 116B 11C1;
+C8C3;C8C3;110C 116B 11C2;C8C3;110C 116B 11C2;
+C8C4;C8C4;110C 116C;C8C4;110C 116C;
+C8C5;C8C5;110C 116C 11A8;C8C5;110C 116C 11A8;
+C8C6;C8C6;110C 116C 11A9;C8C6;110C 116C 11A9;
+C8C7;C8C7;110C 116C 11AA;C8C7;110C 116C 11AA;
+C8C8;C8C8;110C 116C 11AB;C8C8;110C 116C 11AB;
+C8C9;C8C9;110C 116C 11AC;C8C9;110C 116C 11AC;
+C8CA;C8CA;110C 116C 11AD;C8CA;110C 116C 11AD;
+C8CB;C8CB;110C 116C 11AE;C8CB;110C 116C 11AE;
+C8CC;C8CC;110C 116C 11AF;C8CC;110C 116C 11AF;
+C8CD;C8CD;110C 116C 11B0;C8CD;110C 116C 11B0;
+C8CE;C8CE;110C 116C 11B1;C8CE;110C 116C 11B1;
+C8CF;C8CF;110C 116C 11B2;C8CF;110C 116C 11B2;
+C8D0;C8D0;110C 116C 11B3;C8D0;110C 116C 11B3;
+C8D1;C8D1;110C 116C 11B4;C8D1;110C 116C 11B4;
+C8D2;C8D2;110C 116C 11B5;C8D2;110C 116C 11B5;
+C8D3;C8D3;110C 116C 11B6;C8D3;110C 116C 11B6;
+C8D4;C8D4;110C 116C 11B7;C8D4;110C 116C 11B7;
+C8D5;C8D5;110C 116C 11B8;C8D5;110C 116C 11B8;
+C8D6;C8D6;110C 116C 11B9;C8D6;110C 116C 11B9;
+C8D7;C8D7;110C 116C 11BA;C8D7;110C 116C 11BA;
+C8D8;C8D8;110C 116C 11BB;C8D8;110C 116C 11BB;
+C8D9;C8D9;110C 116C 11BC;C8D9;110C 116C 11BC;
+C8DA;C8DA;110C 116C 11BD;C8DA;110C 116C 11BD;
+C8DB;C8DB;110C 116C 11BE;C8DB;110C 116C 11BE;
+C8DC;C8DC;110C 116C 11BF;C8DC;110C 116C 11BF;
+C8DD;C8DD;110C 116C 11C0;C8DD;110C 116C 11C0;
+C8DE;C8DE;110C 116C 11C1;C8DE;110C 116C 11C1;
+C8DF;C8DF;110C 116C 11C2;C8DF;110C 116C 11C2;
+C8E0;C8E0;110C 116D;C8E0;110C 116D;
+C8E1;C8E1;110C 116D 11A8;C8E1;110C 116D 11A8;
+C8E2;C8E2;110C 116D 11A9;C8E2;110C 116D 11A9;
+C8E3;C8E3;110C 116D 11AA;C8E3;110C 116D 11AA;
+C8E4;C8E4;110C 116D 11AB;C8E4;110C 116D 11AB;
+C8E5;C8E5;110C 116D 11AC;C8E5;110C 116D 11AC;
+C8E6;C8E6;110C 116D 11AD;C8E6;110C 116D 11AD;
+C8E7;C8E7;110C 116D 11AE;C8E7;110C 116D 11AE;
+C8E8;C8E8;110C 116D 11AF;C8E8;110C 116D 11AF;
+C8E9;C8E9;110C 116D 11B0;C8E9;110C 116D 11B0;
+C8EA;C8EA;110C 116D 11B1;C8EA;110C 116D 11B1;
+C8EB;C8EB;110C 116D 11B2;C8EB;110C 116D 11B2;
+C8EC;C8EC;110C 116D 11B3;C8EC;110C 116D 11B3;
+C8ED;C8ED;110C 116D 11B4;C8ED;110C 116D 11B4;
+C8EE;C8EE;110C 116D 11B5;C8EE;110C 116D 11B5;
+C8EF;C8EF;110C 116D 11B6;C8EF;110C 116D 11B6;
+C8F0;C8F0;110C 116D 11B7;C8F0;110C 116D 11B7;
+C8F1;C8F1;110C 116D 11B8;C8F1;110C 116D 11B8;
+C8F2;C8F2;110C 116D 11B9;C8F2;110C 116D 11B9;
+C8F3;C8F3;110C 116D 11BA;C8F3;110C 116D 11BA;
+C8F4;C8F4;110C 116D 11BB;C8F4;110C 116D 11BB;
+C8F5;C8F5;110C 116D 11BC;C8F5;110C 116D 11BC;
+C8F6;C8F6;110C 116D 11BD;C8F6;110C 116D 11BD;
+C8F7;C8F7;110C 116D 11BE;C8F7;110C 116D 11BE;
+C8F8;C8F8;110C 116D 11BF;C8F8;110C 116D 11BF;
+C8F9;C8F9;110C 116D 11C0;C8F9;110C 116D 11C0;
+C8FA;C8FA;110C 116D 11C1;C8FA;110C 116D 11C1;
+C8FB;C8FB;110C 116D 11C2;C8FB;110C 116D 11C2;
+C8FC;C8FC;110C 116E;C8FC;110C 116E;
+C8FD;C8FD;110C 116E 11A8;C8FD;110C 116E 11A8;
+C8FE;C8FE;110C 116E 11A9;C8FE;110C 116E 11A9;
+C8FF;C8FF;110C 116E 11AA;C8FF;110C 116E 11AA;
+C900;C900;110C 116E 11AB;C900;110C 116E 11AB;
+C901;C901;110C 116E 11AC;C901;110C 116E 11AC;
+C902;C902;110C 116E 11AD;C902;110C 116E 11AD;
+C903;C903;110C 116E 11AE;C903;110C 116E 11AE;
+C904;C904;110C 116E 11AF;C904;110C 116E 11AF;
+C905;C905;110C 116E 11B0;C905;110C 116E 11B0;
+C906;C906;110C 116E 11B1;C906;110C 116E 11B1;
+C907;C907;110C 116E 11B2;C907;110C 116E 11B2;
+C908;C908;110C 116E 11B3;C908;110C 116E 11B3;
+C909;C909;110C 116E 11B4;C909;110C 116E 11B4;
+C90A;C90A;110C 116E 11B5;C90A;110C 116E 11B5;
+C90B;C90B;110C 116E 11B6;C90B;110C 116E 11B6;
+C90C;C90C;110C 116E 11B7;C90C;110C 116E 11B7;
+C90D;C90D;110C 116E 11B8;C90D;110C 116E 11B8;
+C90E;C90E;110C 116E 11B9;C90E;110C 116E 11B9;
+C90F;C90F;110C 116E 11BA;C90F;110C 116E 11BA;
+C910;C910;110C 116E 11BB;C910;110C 116E 11BB;
+C911;C911;110C 116E 11BC;C911;110C 116E 11BC;
+C912;C912;110C 116E 11BD;C912;110C 116E 11BD;
+C913;C913;110C 116E 11BE;C913;110C 116E 11BE;
+C914;C914;110C 116E 11BF;C914;110C 116E 11BF;
+C915;C915;110C 116E 11C0;C915;110C 116E 11C0;
+C916;C916;110C 116E 11C1;C916;110C 116E 11C1;
+C917;C917;110C 116E 11C2;C917;110C 116E 11C2;
+C918;C918;110C 116F;C918;110C 116F;
+C919;C919;110C 116F 11A8;C919;110C 116F 11A8;
+C91A;C91A;110C 116F 11A9;C91A;110C 116F 11A9;
+C91B;C91B;110C 116F 11AA;C91B;110C 116F 11AA;
+C91C;C91C;110C 116F 11AB;C91C;110C 116F 11AB;
+C91D;C91D;110C 116F 11AC;C91D;110C 116F 11AC;
+C91E;C91E;110C 116F 11AD;C91E;110C 116F 11AD;
+C91F;C91F;110C 116F 11AE;C91F;110C 116F 11AE;
+C920;C920;110C 116F 11AF;C920;110C 116F 11AF;
+C921;C921;110C 116F 11B0;C921;110C 116F 11B0;
+C922;C922;110C 116F 11B1;C922;110C 116F 11B1;
+C923;C923;110C 116F 11B2;C923;110C 116F 11B2;
+C924;C924;110C 116F 11B3;C924;110C 116F 11B3;
+C925;C925;110C 116F 11B4;C925;110C 116F 11B4;
+C926;C926;110C 116F 11B5;C926;110C 116F 11B5;
+C927;C927;110C 116F 11B6;C927;110C 116F 11B6;
+C928;C928;110C 116F 11B7;C928;110C 116F 11B7;
+C929;C929;110C 116F 11B8;C929;110C 116F 11B8;
+C92A;C92A;110C 116F 11B9;C92A;110C 116F 11B9;
+C92B;C92B;110C 116F 11BA;C92B;110C 116F 11BA;
+C92C;C92C;110C 116F 11BB;C92C;110C 116F 11BB;
+C92D;C92D;110C 116F 11BC;C92D;110C 116F 11BC;
+C92E;C92E;110C 116F 11BD;C92E;110C 116F 11BD;
+C92F;C92F;110C 116F 11BE;C92F;110C 116F 11BE;
+C930;C930;110C 116F 11BF;C930;110C 116F 11BF;
+C931;C931;110C 116F 11C0;C931;110C 116F 11C0;
+C932;C932;110C 116F 11C1;C932;110C 116F 11C1;
+C933;C933;110C 116F 11C2;C933;110C 116F 11C2;
+C934;C934;110C 1170;C934;110C 1170;
+C935;C935;110C 1170 11A8;C935;110C 1170 11A8;
+C936;C936;110C 1170 11A9;C936;110C 1170 11A9;
+C937;C937;110C 1170 11AA;C937;110C 1170 11AA;
+C938;C938;110C 1170 11AB;C938;110C 1170 11AB;
+C939;C939;110C 1170 11AC;C939;110C 1170 11AC;
+C93A;C93A;110C 1170 11AD;C93A;110C 1170 11AD;
+C93B;C93B;110C 1170 11AE;C93B;110C 1170 11AE;
+C93C;C93C;110C 1170 11AF;C93C;110C 1170 11AF;
+C93D;C93D;110C 1170 11B0;C93D;110C 1170 11B0;
+C93E;C93E;110C 1170 11B1;C93E;110C 1170 11B1;
+C93F;C93F;110C 1170 11B2;C93F;110C 1170 11B2;
+C940;C940;110C 1170 11B3;C940;110C 1170 11B3;
+C941;C941;110C 1170 11B4;C941;110C 1170 11B4;
+C942;C942;110C 1170 11B5;C942;110C 1170 11B5;
+C943;C943;110C 1170 11B6;C943;110C 1170 11B6;
+C944;C944;110C 1170 11B7;C944;110C 1170 11B7;
+C945;C945;110C 1170 11B8;C945;110C 1170 11B8;
+C946;C946;110C 1170 11B9;C946;110C 1170 11B9;
+C947;C947;110C 1170 11BA;C947;110C 1170 11BA;
+C948;C948;110C 1170 11BB;C948;110C 1170 11BB;
+C949;C949;110C 1170 11BC;C949;110C 1170 11BC;
+C94A;C94A;110C 1170 11BD;C94A;110C 1170 11BD;
+C94B;C94B;110C 1170 11BE;C94B;110C 1170 11BE;
+C94C;C94C;110C 1170 11BF;C94C;110C 1170 11BF;
+C94D;C94D;110C 1170 11C0;C94D;110C 1170 11C0;
+C94E;C94E;110C 1170 11C1;C94E;110C 1170 11C1;
+C94F;C94F;110C 1170 11C2;C94F;110C 1170 11C2;
+C950;C950;110C 1171;C950;110C 1171;
+C951;C951;110C 1171 11A8;C951;110C 1171 11A8;
+C952;C952;110C 1171 11A9;C952;110C 1171 11A9;
+C953;C953;110C 1171 11AA;C953;110C 1171 11AA;
+C954;C954;110C 1171 11AB;C954;110C 1171 11AB;
+C955;C955;110C 1171 11AC;C955;110C 1171 11AC;
+C956;C956;110C 1171 11AD;C956;110C 1171 11AD;
+C957;C957;110C 1171 11AE;C957;110C 1171 11AE;
+C958;C958;110C 1171 11AF;C958;110C 1171 11AF;
+C959;C959;110C 1171 11B0;C959;110C 1171 11B0;
+C95A;C95A;110C 1171 11B1;C95A;110C 1171 11B1;
+C95B;C95B;110C 1171 11B2;C95B;110C 1171 11B2;
+C95C;C95C;110C 1171 11B3;C95C;110C 1171 11B3;
+C95D;C95D;110C 1171 11B4;C95D;110C 1171 11B4;
+C95E;C95E;110C 1171 11B5;C95E;110C 1171 11B5;
+C95F;C95F;110C 1171 11B6;C95F;110C 1171 11B6;
+C960;C960;110C 1171 11B7;C960;110C 1171 11B7;
+C961;C961;110C 1171 11B8;C961;110C 1171 11B8;
+C962;C962;110C 1171 11B9;C962;110C 1171 11B9;
+C963;C963;110C 1171 11BA;C963;110C 1171 11BA;
+C964;C964;110C 1171 11BB;C964;110C 1171 11BB;
+C965;C965;110C 1171 11BC;C965;110C 1171 11BC;
+C966;C966;110C 1171 11BD;C966;110C 1171 11BD;
+C967;C967;110C 1171 11BE;C967;110C 1171 11BE;
+C968;C968;110C 1171 11BF;C968;110C 1171 11BF;
+C969;C969;110C 1171 11C0;C969;110C 1171 11C0;
+C96A;C96A;110C 1171 11C1;C96A;110C 1171 11C1;
+C96B;C96B;110C 1171 11C2;C96B;110C 1171 11C2;
+C96C;C96C;110C 1172;C96C;110C 1172;
+C96D;C96D;110C 1172 11A8;C96D;110C 1172 11A8;
+C96E;C96E;110C 1172 11A9;C96E;110C 1172 11A9;
+C96F;C96F;110C 1172 11AA;C96F;110C 1172 11AA;
+C970;C970;110C 1172 11AB;C970;110C 1172 11AB;
+C971;C971;110C 1172 11AC;C971;110C 1172 11AC;
+C972;C972;110C 1172 11AD;C972;110C 1172 11AD;
+C973;C973;110C 1172 11AE;C973;110C 1172 11AE;
+C974;C974;110C 1172 11AF;C974;110C 1172 11AF;
+C975;C975;110C 1172 11B0;C975;110C 1172 11B0;
+C976;C976;110C 1172 11B1;C976;110C 1172 11B1;
+C977;C977;110C 1172 11B2;C977;110C 1172 11B2;
+C978;C978;110C 1172 11B3;C978;110C 1172 11B3;
+C979;C979;110C 1172 11B4;C979;110C 1172 11B4;
+C97A;C97A;110C 1172 11B5;C97A;110C 1172 11B5;
+C97B;C97B;110C 1172 11B6;C97B;110C 1172 11B6;
+C97C;C97C;110C 1172 11B7;C97C;110C 1172 11B7;
+C97D;C97D;110C 1172 11B8;C97D;110C 1172 11B8;
+C97E;C97E;110C 1172 11B9;C97E;110C 1172 11B9;
+C97F;C97F;110C 1172 11BA;C97F;110C 1172 11BA;
+C980;C980;110C 1172 11BB;C980;110C 1172 11BB;
+C981;C981;110C 1172 11BC;C981;110C 1172 11BC;
+C982;C982;110C 1172 11BD;C982;110C 1172 11BD;
+C983;C983;110C 1172 11BE;C983;110C 1172 11BE;
+C984;C984;110C 1172 11BF;C984;110C 1172 11BF;
+C985;C985;110C 1172 11C0;C985;110C 1172 11C0;
+C986;C986;110C 1172 11C1;C986;110C 1172 11C1;
+C987;C987;110C 1172 11C2;C987;110C 1172 11C2;
+C988;C988;110C 1173;C988;110C 1173;
+C989;C989;110C 1173 11A8;C989;110C 1173 11A8;
+C98A;C98A;110C 1173 11A9;C98A;110C 1173 11A9;
+C98B;C98B;110C 1173 11AA;C98B;110C 1173 11AA;
+C98C;C98C;110C 1173 11AB;C98C;110C 1173 11AB;
+C98D;C98D;110C 1173 11AC;C98D;110C 1173 11AC;
+C98E;C98E;110C 1173 11AD;C98E;110C 1173 11AD;
+C98F;C98F;110C 1173 11AE;C98F;110C 1173 11AE;
+C990;C990;110C 1173 11AF;C990;110C 1173 11AF;
+C991;C991;110C 1173 11B0;C991;110C 1173 11B0;
+C992;C992;110C 1173 11B1;C992;110C 1173 11B1;
+C993;C993;110C 1173 11B2;C993;110C 1173 11B2;
+C994;C994;110C 1173 11B3;C994;110C 1173 11B3;
+C995;C995;110C 1173 11B4;C995;110C 1173 11B4;
+C996;C996;110C 1173 11B5;C996;110C 1173 11B5;
+C997;C997;110C 1173 11B6;C997;110C 1173 11B6;
+C998;C998;110C 1173 11B7;C998;110C 1173 11B7;
+C999;C999;110C 1173 11B8;C999;110C 1173 11B8;
+C99A;C99A;110C 1173 11B9;C99A;110C 1173 11B9;
+C99B;C99B;110C 1173 11BA;C99B;110C 1173 11BA;
+C99C;C99C;110C 1173 11BB;C99C;110C 1173 11BB;
+C99D;C99D;110C 1173 11BC;C99D;110C 1173 11BC;
+C99E;C99E;110C 1173 11BD;C99E;110C 1173 11BD;
+C99F;C99F;110C 1173 11BE;C99F;110C 1173 11BE;
+C9A0;C9A0;110C 1173 11BF;C9A0;110C 1173 11BF;
+C9A1;C9A1;110C 1173 11C0;C9A1;110C 1173 11C0;
+C9A2;C9A2;110C 1173 11C1;C9A2;110C 1173 11C1;
+C9A3;C9A3;110C 1173 11C2;C9A3;110C 1173 11C2;
+C9A4;C9A4;110C 1174;C9A4;110C 1174;
+C9A5;C9A5;110C 1174 11A8;C9A5;110C 1174 11A8;
+C9A6;C9A6;110C 1174 11A9;C9A6;110C 1174 11A9;
+C9A7;C9A7;110C 1174 11AA;C9A7;110C 1174 11AA;
+C9A8;C9A8;110C 1174 11AB;C9A8;110C 1174 11AB;
+C9A9;C9A9;110C 1174 11AC;C9A9;110C 1174 11AC;
+C9AA;C9AA;110C 1174 11AD;C9AA;110C 1174 11AD;
+C9AB;C9AB;110C 1174 11AE;C9AB;110C 1174 11AE;
+C9AC;C9AC;110C 1174 11AF;C9AC;110C 1174 11AF;
+C9AD;C9AD;110C 1174 11B0;C9AD;110C 1174 11B0;
+C9AE;C9AE;110C 1174 11B1;C9AE;110C 1174 11B1;
+C9AF;C9AF;110C 1174 11B2;C9AF;110C 1174 11B2;
+C9B0;C9B0;110C 1174 11B3;C9B0;110C 1174 11B3;
+C9B1;C9B1;110C 1174 11B4;C9B1;110C 1174 11B4;
+C9B2;C9B2;110C 1174 11B5;C9B2;110C 1174 11B5;
+C9B3;C9B3;110C 1174 11B6;C9B3;110C 1174 11B6;
+C9B4;C9B4;110C 1174 11B7;C9B4;110C 1174 11B7;
+C9B5;C9B5;110C 1174 11B8;C9B5;110C 1174 11B8;
+C9B6;C9B6;110C 1174 11B9;C9B6;110C 1174 11B9;
+C9B7;C9B7;110C 1174 11BA;C9B7;110C 1174 11BA;
+C9B8;C9B8;110C 1174 11BB;C9B8;110C 1174 11BB;
+C9B9;C9B9;110C 1174 11BC;C9B9;110C 1174 11BC;
+C9BA;C9BA;110C 1174 11BD;C9BA;110C 1174 11BD;
+C9BB;C9BB;110C 1174 11BE;C9BB;110C 1174 11BE;
+C9BC;C9BC;110C 1174 11BF;C9BC;110C 1174 11BF;
+C9BD;C9BD;110C 1174 11C0;C9BD;110C 1174 11C0;
+C9BE;C9BE;110C 1174 11C1;C9BE;110C 1174 11C1;
+C9BF;C9BF;110C 1174 11C2;C9BF;110C 1174 11C2;
+C9C0;C9C0;110C 1175;C9C0;110C 1175;
+C9C1;C9C1;110C 1175 11A8;C9C1;110C 1175 11A8;
+C9C2;C9C2;110C 1175 11A9;C9C2;110C 1175 11A9;
+C9C3;C9C3;110C 1175 11AA;C9C3;110C 1175 11AA;
+C9C4;C9C4;110C 1175 11AB;C9C4;110C 1175 11AB;
+C9C5;C9C5;110C 1175 11AC;C9C5;110C 1175 11AC;
+C9C6;C9C6;110C 1175 11AD;C9C6;110C 1175 11AD;
+C9C7;C9C7;110C 1175 11AE;C9C7;110C 1175 11AE;
+C9C8;C9C8;110C 1175 11AF;C9C8;110C 1175 11AF;
+C9C9;C9C9;110C 1175 11B0;C9C9;110C 1175 11B0;
+C9CA;C9CA;110C 1175 11B1;C9CA;110C 1175 11B1;
+C9CB;C9CB;110C 1175 11B2;C9CB;110C 1175 11B2;
+C9CC;C9CC;110C 1175 11B3;C9CC;110C 1175 11B3;
+C9CD;C9CD;110C 1175 11B4;C9CD;110C 1175 11B4;
+C9CE;C9CE;110C 1175 11B5;C9CE;110C 1175 11B5;
+C9CF;C9CF;110C 1175 11B6;C9CF;110C 1175 11B6;
+C9D0;C9D0;110C 1175 11B7;C9D0;110C 1175 11B7;
+C9D1;C9D1;110C 1175 11B8;C9D1;110C 1175 11B8;
+C9D2;C9D2;110C 1175 11B9;C9D2;110C 1175 11B9;
+C9D3;C9D3;110C 1175 11BA;C9D3;110C 1175 11BA;
+C9D4;C9D4;110C 1175 11BB;C9D4;110C 1175 11BB;
+C9D5;C9D5;110C 1175 11BC;C9D5;110C 1175 11BC;
+C9D6;C9D6;110C 1175 11BD;C9D6;110C 1175 11BD;
+C9D7;C9D7;110C 1175 11BE;C9D7;110C 1175 11BE;
+C9D8;C9D8;110C 1175 11BF;C9D8;110C 1175 11BF;
+C9D9;C9D9;110C 1175 11C0;C9D9;110C 1175 11C0;
+C9DA;C9DA;110C 1175 11C1;C9DA;110C 1175 11C1;
+C9DB;C9DB;110C 1175 11C2;C9DB;110C 1175 11C2;
+C9DC;C9DC;110D 1161;C9DC;110D 1161;
+C9DD;C9DD;110D 1161 11A8;C9DD;110D 1161 11A8;
+C9DE;C9DE;110D 1161 11A9;C9DE;110D 1161 11A9;
+C9DF;C9DF;110D 1161 11AA;C9DF;110D 1161 11AA;
+C9E0;C9E0;110D 1161 11AB;C9E0;110D 1161 11AB;
+C9E1;C9E1;110D 1161 11AC;C9E1;110D 1161 11AC;
+C9E2;C9E2;110D 1161 11AD;C9E2;110D 1161 11AD;
+C9E3;C9E3;110D 1161 11AE;C9E3;110D 1161 11AE;
+C9E4;C9E4;110D 1161 11AF;C9E4;110D 1161 11AF;
+C9E5;C9E5;110D 1161 11B0;C9E5;110D 1161 11B0;
+C9E6;C9E6;110D 1161 11B1;C9E6;110D 1161 11B1;
+C9E7;C9E7;110D 1161 11B2;C9E7;110D 1161 11B2;
+C9E8;C9E8;110D 1161 11B3;C9E8;110D 1161 11B3;
+C9E9;C9E9;110D 1161 11B4;C9E9;110D 1161 11B4;
+C9EA;C9EA;110D 1161 11B5;C9EA;110D 1161 11B5;
+C9EB;C9EB;110D 1161 11B6;C9EB;110D 1161 11B6;
+C9EC;C9EC;110D 1161 11B7;C9EC;110D 1161 11B7;
+C9ED;C9ED;110D 1161 11B8;C9ED;110D 1161 11B8;
+C9EE;C9EE;110D 1161 11B9;C9EE;110D 1161 11B9;
+C9EF;C9EF;110D 1161 11BA;C9EF;110D 1161 11BA;
+C9F0;C9F0;110D 1161 11BB;C9F0;110D 1161 11BB;
+C9F1;C9F1;110D 1161 11BC;C9F1;110D 1161 11BC;
+C9F2;C9F2;110D 1161 11BD;C9F2;110D 1161 11BD;
+C9F3;C9F3;110D 1161 11BE;C9F3;110D 1161 11BE;
+C9F4;C9F4;110D 1161 11BF;C9F4;110D 1161 11BF;
+C9F5;C9F5;110D 1161 11C0;C9F5;110D 1161 11C0;
+C9F6;C9F6;110D 1161 11C1;C9F6;110D 1161 11C1;
+C9F7;C9F7;110D 1161 11C2;C9F7;110D 1161 11C2;
+C9F8;C9F8;110D 1162;C9F8;110D 1162;
+C9F9;C9F9;110D 1162 11A8;C9F9;110D 1162 11A8;
+C9FA;C9FA;110D 1162 11A9;C9FA;110D 1162 11A9;
+C9FB;C9FB;110D 1162 11AA;C9FB;110D 1162 11AA;
+C9FC;C9FC;110D 1162 11AB;C9FC;110D 1162 11AB;
+C9FD;C9FD;110D 1162 11AC;C9FD;110D 1162 11AC;
+C9FE;C9FE;110D 1162 11AD;C9FE;110D 1162 11AD;
+C9FF;C9FF;110D 1162 11AE;C9FF;110D 1162 11AE;
+CA00;CA00;110D 1162 11AF;CA00;110D 1162 11AF;
+CA01;CA01;110D 1162 11B0;CA01;110D 1162 11B0;
+CA02;CA02;110D 1162 11B1;CA02;110D 1162 11B1;
+CA03;CA03;110D 1162 11B2;CA03;110D 1162 11B2;
+CA04;CA04;110D 1162 11B3;CA04;110D 1162 11B3;
+CA05;CA05;110D 1162 11B4;CA05;110D 1162 11B4;
+CA06;CA06;110D 1162 11B5;CA06;110D 1162 11B5;
+CA07;CA07;110D 1162 11B6;CA07;110D 1162 11B6;
+CA08;CA08;110D 1162 11B7;CA08;110D 1162 11B7;
+CA09;CA09;110D 1162 11B8;CA09;110D 1162 11B8;
+CA0A;CA0A;110D 1162 11B9;CA0A;110D 1162 11B9;
+CA0B;CA0B;110D 1162 11BA;CA0B;110D 1162 11BA;
+CA0C;CA0C;110D 1162 11BB;CA0C;110D 1162 11BB;
+CA0D;CA0D;110D 1162 11BC;CA0D;110D 1162 11BC;
+CA0E;CA0E;110D 1162 11BD;CA0E;110D 1162 11BD;
+CA0F;CA0F;110D 1162 11BE;CA0F;110D 1162 11BE;
+CA10;CA10;110D 1162 11BF;CA10;110D 1162 11BF;
+CA11;CA11;110D 1162 11C0;CA11;110D 1162 11C0;
+CA12;CA12;110D 1162 11C1;CA12;110D 1162 11C1;
+CA13;CA13;110D 1162 11C2;CA13;110D 1162 11C2;
+CA14;CA14;110D 1163;CA14;110D 1163;
+CA15;CA15;110D 1163 11A8;CA15;110D 1163 11A8;
+CA16;CA16;110D 1163 11A9;CA16;110D 1163 11A9;
+CA17;CA17;110D 1163 11AA;CA17;110D 1163 11AA;
+CA18;CA18;110D 1163 11AB;CA18;110D 1163 11AB;
+CA19;CA19;110D 1163 11AC;CA19;110D 1163 11AC;
+CA1A;CA1A;110D 1163 11AD;CA1A;110D 1163 11AD;
+CA1B;CA1B;110D 1163 11AE;CA1B;110D 1163 11AE;
+CA1C;CA1C;110D 1163 11AF;CA1C;110D 1163 11AF;
+CA1D;CA1D;110D 1163 11B0;CA1D;110D 1163 11B0;
+CA1E;CA1E;110D 1163 11B1;CA1E;110D 1163 11B1;
+CA1F;CA1F;110D 1163 11B2;CA1F;110D 1163 11B2;
+CA20;CA20;110D 1163 11B3;CA20;110D 1163 11B3;
+CA21;CA21;110D 1163 11B4;CA21;110D 1163 11B4;
+CA22;CA22;110D 1163 11B5;CA22;110D 1163 11B5;
+CA23;CA23;110D 1163 11B6;CA23;110D 1163 11B6;
+CA24;CA24;110D 1163 11B7;CA24;110D 1163 11B7;
+CA25;CA25;110D 1163 11B8;CA25;110D 1163 11B8;
+CA26;CA26;110D 1163 11B9;CA26;110D 1163 11B9;
+CA27;CA27;110D 1163 11BA;CA27;110D 1163 11BA;
+CA28;CA28;110D 1163 11BB;CA28;110D 1163 11BB;
+CA29;CA29;110D 1163 11BC;CA29;110D 1163 11BC;
+CA2A;CA2A;110D 1163 11BD;CA2A;110D 1163 11BD;
+CA2B;CA2B;110D 1163 11BE;CA2B;110D 1163 11BE;
+CA2C;CA2C;110D 1163 11BF;CA2C;110D 1163 11BF;
+CA2D;CA2D;110D 1163 11C0;CA2D;110D 1163 11C0;
+CA2E;CA2E;110D 1163 11C1;CA2E;110D 1163 11C1;
+CA2F;CA2F;110D 1163 11C2;CA2F;110D 1163 11C2;
+CA30;CA30;110D 1164;CA30;110D 1164;
+CA31;CA31;110D 1164 11A8;CA31;110D 1164 11A8;
+CA32;CA32;110D 1164 11A9;CA32;110D 1164 11A9;
+CA33;CA33;110D 1164 11AA;CA33;110D 1164 11AA;
+CA34;CA34;110D 1164 11AB;CA34;110D 1164 11AB;
+CA35;CA35;110D 1164 11AC;CA35;110D 1164 11AC;
+CA36;CA36;110D 1164 11AD;CA36;110D 1164 11AD;
+CA37;CA37;110D 1164 11AE;CA37;110D 1164 11AE;
+CA38;CA38;110D 1164 11AF;CA38;110D 1164 11AF;
+CA39;CA39;110D 1164 11B0;CA39;110D 1164 11B0;
+CA3A;CA3A;110D 1164 11B1;CA3A;110D 1164 11B1;
+CA3B;CA3B;110D 1164 11B2;CA3B;110D 1164 11B2;
+CA3C;CA3C;110D 1164 11B3;CA3C;110D 1164 11B3;
+CA3D;CA3D;110D 1164 11B4;CA3D;110D 1164 11B4;
+CA3E;CA3E;110D 1164 11B5;CA3E;110D 1164 11B5;
+CA3F;CA3F;110D 1164 11B6;CA3F;110D 1164 11B6;
+CA40;CA40;110D 1164 11B7;CA40;110D 1164 11B7;
+CA41;CA41;110D 1164 11B8;CA41;110D 1164 11B8;
+CA42;CA42;110D 1164 11B9;CA42;110D 1164 11B9;
+CA43;CA43;110D 1164 11BA;CA43;110D 1164 11BA;
+CA44;CA44;110D 1164 11BB;CA44;110D 1164 11BB;
+CA45;CA45;110D 1164 11BC;CA45;110D 1164 11BC;
+CA46;CA46;110D 1164 11BD;CA46;110D 1164 11BD;
+CA47;CA47;110D 1164 11BE;CA47;110D 1164 11BE;
+CA48;CA48;110D 1164 11BF;CA48;110D 1164 11BF;
+CA49;CA49;110D 1164 11C0;CA49;110D 1164 11C0;
+CA4A;CA4A;110D 1164 11C1;CA4A;110D 1164 11C1;
+CA4B;CA4B;110D 1164 11C2;CA4B;110D 1164 11C2;
+CA4C;CA4C;110D 1165;CA4C;110D 1165;
+CA4D;CA4D;110D 1165 11A8;CA4D;110D 1165 11A8;
+CA4E;CA4E;110D 1165 11A9;CA4E;110D 1165 11A9;
+CA4F;CA4F;110D 1165 11AA;CA4F;110D 1165 11AA;
+CA50;CA50;110D 1165 11AB;CA50;110D 1165 11AB;
+CA51;CA51;110D 1165 11AC;CA51;110D 1165 11AC;
+CA52;CA52;110D 1165 11AD;CA52;110D 1165 11AD;
+CA53;CA53;110D 1165 11AE;CA53;110D 1165 11AE;
+CA54;CA54;110D 1165 11AF;CA54;110D 1165 11AF;
+CA55;CA55;110D 1165 11B0;CA55;110D 1165 11B0;
+CA56;CA56;110D 1165 11B1;CA56;110D 1165 11B1;
+CA57;CA57;110D 1165 11B2;CA57;110D 1165 11B2;
+CA58;CA58;110D 1165 11B3;CA58;110D 1165 11B3;
+CA59;CA59;110D 1165 11B4;CA59;110D 1165 11B4;
+CA5A;CA5A;110D 1165 11B5;CA5A;110D 1165 11B5;
+CA5B;CA5B;110D 1165 11B6;CA5B;110D 1165 11B6;
+CA5C;CA5C;110D 1165 11B7;CA5C;110D 1165 11B7;
+CA5D;CA5D;110D 1165 11B8;CA5D;110D 1165 11B8;
+CA5E;CA5E;110D 1165 11B9;CA5E;110D 1165 11B9;
+CA5F;CA5F;110D 1165 11BA;CA5F;110D 1165 11BA;
+CA60;CA60;110D 1165 11BB;CA60;110D 1165 11BB;
+CA61;CA61;110D 1165 11BC;CA61;110D 1165 11BC;
+CA62;CA62;110D 1165 11BD;CA62;110D 1165 11BD;
+CA63;CA63;110D 1165 11BE;CA63;110D 1165 11BE;
+CA64;CA64;110D 1165 11BF;CA64;110D 1165 11BF;
+CA65;CA65;110D 1165 11C0;CA65;110D 1165 11C0;
+CA66;CA66;110D 1165 11C1;CA66;110D 1165 11C1;
+CA67;CA67;110D 1165 11C2;CA67;110D 1165 11C2;
+CA68;CA68;110D 1166;CA68;110D 1166;
+CA69;CA69;110D 1166 11A8;CA69;110D 1166 11A8;
+CA6A;CA6A;110D 1166 11A9;CA6A;110D 1166 11A9;
+CA6B;CA6B;110D 1166 11AA;CA6B;110D 1166 11AA;
+CA6C;CA6C;110D 1166 11AB;CA6C;110D 1166 11AB;
+CA6D;CA6D;110D 1166 11AC;CA6D;110D 1166 11AC;
+CA6E;CA6E;110D 1166 11AD;CA6E;110D 1166 11AD;
+CA6F;CA6F;110D 1166 11AE;CA6F;110D 1166 11AE;
+CA70;CA70;110D 1166 11AF;CA70;110D 1166 11AF;
+CA71;CA71;110D 1166 11B0;CA71;110D 1166 11B0;
+CA72;CA72;110D 1166 11B1;CA72;110D 1166 11B1;
+CA73;CA73;110D 1166 11B2;CA73;110D 1166 11B2;
+CA74;CA74;110D 1166 11B3;CA74;110D 1166 11B3;
+CA75;CA75;110D 1166 11B4;CA75;110D 1166 11B4;
+CA76;CA76;110D 1166 11B5;CA76;110D 1166 11B5;
+CA77;CA77;110D 1166 11B6;CA77;110D 1166 11B6;
+CA78;CA78;110D 1166 11B7;CA78;110D 1166 11B7;
+CA79;CA79;110D 1166 11B8;CA79;110D 1166 11B8;
+CA7A;CA7A;110D 1166 11B9;CA7A;110D 1166 11B9;
+CA7B;CA7B;110D 1166 11BA;CA7B;110D 1166 11BA;
+CA7C;CA7C;110D 1166 11BB;CA7C;110D 1166 11BB;
+CA7D;CA7D;110D 1166 11BC;CA7D;110D 1166 11BC;
+CA7E;CA7E;110D 1166 11BD;CA7E;110D 1166 11BD;
+CA7F;CA7F;110D 1166 11BE;CA7F;110D 1166 11BE;
+CA80;CA80;110D 1166 11BF;CA80;110D 1166 11BF;
+CA81;CA81;110D 1166 11C0;CA81;110D 1166 11C0;
+CA82;CA82;110D 1166 11C1;CA82;110D 1166 11C1;
+CA83;CA83;110D 1166 11C2;CA83;110D 1166 11C2;
+CA84;CA84;110D 1167;CA84;110D 1167;
+CA85;CA85;110D 1167 11A8;CA85;110D 1167 11A8;
+CA86;CA86;110D 1167 11A9;CA86;110D 1167 11A9;
+CA87;CA87;110D 1167 11AA;CA87;110D 1167 11AA;
+CA88;CA88;110D 1167 11AB;CA88;110D 1167 11AB;
+CA89;CA89;110D 1167 11AC;CA89;110D 1167 11AC;
+CA8A;CA8A;110D 1167 11AD;CA8A;110D 1167 11AD;
+CA8B;CA8B;110D 1167 11AE;CA8B;110D 1167 11AE;
+CA8C;CA8C;110D 1167 11AF;CA8C;110D 1167 11AF;
+CA8D;CA8D;110D 1167 11B0;CA8D;110D 1167 11B0;
+CA8E;CA8E;110D 1167 11B1;CA8E;110D 1167 11B1;
+CA8F;CA8F;110D 1167 11B2;CA8F;110D 1167 11B2;
+CA90;CA90;110D 1167 11B3;CA90;110D 1167 11B3;
+CA91;CA91;110D 1167 11B4;CA91;110D 1167 11B4;
+CA92;CA92;110D 1167 11B5;CA92;110D 1167 11B5;
+CA93;CA93;110D 1167 11B6;CA93;110D 1167 11B6;
+CA94;CA94;110D 1167 11B7;CA94;110D 1167 11B7;
+CA95;CA95;110D 1167 11B8;CA95;110D 1167 11B8;
+CA96;CA96;110D 1167 11B9;CA96;110D 1167 11B9;
+CA97;CA97;110D 1167 11BA;CA97;110D 1167 11BA;
+CA98;CA98;110D 1167 11BB;CA98;110D 1167 11BB;
+CA99;CA99;110D 1167 11BC;CA99;110D 1167 11BC;
+CA9A;CA9A;110D 1167 11BD;CA9A;110D 1167 11BD;
+CA9B;CA9B;110D 1167 11BE;CA9B;110D 1167 11BE;
+CA9C;CA9C;110D 1167 11BF;CA9C;110D 1167 11BF;
+CA9D;CA9D;110D 1167 11C0;CA9D;110D 1167 11C0;
+CA9E;CA9E;110D 1167 11C1;CA9E;110D 1167 11C1;
+CA9F;CA9F;110D 1167 11C2;CA9F;110D 1167 11C2;
+CAA0;CAA0;110D 1168;CAA0;110D 1168;
+CAA1;CAA1;110D 1168 11A8;CAA1;110D 1168 11A8;
+CAA2;CAA2;110D 1168 11A9;CAA2;110D 1168 11A9;
+CAA3;CAA3;110D 1168 11AA;CAA3;110D 1168 11AA;
+CAA4;CAA4;110D 1168 11AB;CAA4;110D 1168 11AB;
+CAA5;CAA5;110D 1168 11AC;CAA5;110D 1168 11AC;
+CAA6;CAA6;110D 1168 11AD;CAA6;110D 1168 11AD;
+CAA7;CAA7;110D 1168 11AE;CAA7;110D 1168 11AE;
+CAA8;CAA8;110D 1168 11AF;CAA8;110D 1168 11AF;
+CAA9;CAA9;110D 1168 11B0;CAA9;110D 1168 11B0;
+CAAA;CAAA;110D 1168 11B1;CAAA;110D 1168 11B1;
+CAAB;CAAB;110D 1168 11B2;CAAB;110D 1168 11B2;
+CAAC;CAAC;110D 1168 11B3;CAAC;110D 1168 11B3;
+CAAD;CAAD;110D 1168 11B4;CAAD;110D 1168 11B4;
+CAAE;CAAE;110D 1168 11B5;CAAE;110D 1168 11B5;
+CAAF;CAAF;110D 1168 11B6;CAAF;110D 1168 11B6;
+CAB0;CAB0;110D 1168 11B7;CAB0;110D 1168 11B7;
+CAB1;CAB1;110D 1168 11B8;CAB1;110D 1168 11B8;
+CAB2;CAB2;110D 1168 11B9;CAB2;110D 1168 11B9;
+CAB3;CAB3;110D 1168 11BA;CAB3;110D 1168 11BA;
+CAB4;CAB4;110D 1168 11BB;CAB4;110D 1168 11BB;
+CAB5;CAB5;110D 1168 11BC;CAB5;110D 1168 11BC;
+CAB6;CAB6;110D 1168 11BD;CAB6;110D 1168 11BD;
+CAB7;CAB7;110D 1168 11BE;CAB7;110D 1168 11BE;
+CAB8;CAB8;110D 1168 11BF;CAB8;110D 1168 11BF;
+CAB9;CAB9;110D 1168 11C0;CAB9;110D 1168 11C0;
+CABA;CABA;110D 1168 11C1;CABA;110D 1168 11C1;
+CABB;CABB;110D 1168 11C2;CABB;110D 1168 11C2;
+CABC;CABC;110D 1169;CABC;110D 1169;
+CABD;CABD;110D 1169 11A8;CABD;110D 1169 11A8;
+CABE;CABE;110D 1169 11A9;CABE;110D 1169 11A9;
+CABF;CABF;110D 1169 11AA;CABF;110D 1169 11AA;
+CAC0;CAC0;110D 1169 11AB;CAC0;110D 1169 11AB;
+CAC1;CAC1;110D 1169 11AC;CAC1;110D 1169 11AC;
+CAC2;CAC2;110D 1169 11AD;CAC2;110D 1169 11AD;
+CAC3;CAC3;110D 1169 11AE;CAC3;110D 1169 11AE;
+CAC4;CAC4;110D 1169 11AF;CAC4;110D 1169 11AF;
+CAC5;CAC5;110D 1169 11B0;CAC5;110D 1169 11B0;
+CAC6;CAC6;110D 1169 11B1;CAC6;110D 1169 11B1;
+CAC7;CAC7;110D 1169 11B2;CAC7;110D 1169 11B2;
+CAC8;CAC8;110D 1169 11B3;CAC8;110D 1169 11B3;
+CAC9;CAC9;110D 1169 11B4;CAC9;110D 1169 11B4;
+CACA;CACA;110D 1169 11B5;CACA;110D 1169 11B5;
+CACB;CACB;110D 1169 11B6;CACB;110D 1169 11B6;
+CACC;CACC;110D 1169 11B7;CACC;110D 1169 11B7;
+CACD;CACD;110D 1169 11B8;CACD;110D 1169 11B8;
+CACE;CACE;110D 1169 11B9;CACE;110D 1169 11B9;
+CACF;CACF;110D 1169 11BA;CACF;110D 1169 11BA;
+CAD0;CAD0;110D 1169 11BB;CAD0;110D 1169 11BB;
+CAD1;CAD1;110D 1169 11BC;CAD1;110D 1169 11BC;
+CAD2;CAD2;110D 1169 11BD;CAD2;110D 1169 11BD;
+CAD3;CAD3;110D 1169 11BE;CAD3;110D 1169 11BE;
+CAD4;CAD4;110D 1169 11BF;CAD4;110D 1169 11BF;
+CAD5;CAD5;110D 1169 11C0;CAD5;110D 1169 11C0;
+CAD6;CAD6;110D 1169 11C1;CAD6;110D 1169 11C1;
+CAD7;CAD7;110D 1169 11C2;CAD7;110D 1169 11C2;
+CAD8;CAD8;110D 116A;CAD8;110D 116A;
+CAD9;CAD9;110D 116A 11A8;CAD9;110D 116A 11A8;
+CADA;CADA;110D 116A 11A9;CADA;110D 116A 11A9;
+CADB;CADB;110D 116A 11AA;CADB;110D 116A 11AA;
+CADC;CADC;110D 116A 11AB;CADC;110D 116A 11AB;
+CADD;CADD;110D 116A 11AC;CADD;110D 116A 11AC;
+CADE;CADE;110D 116A 11AD;CADE;110D 116A 11AD;
+CADF;CADF;110D 116A 11AE;CADF;110D 116A 11AE;
+CAE0;CAE0;110D 116A 11AF;CAE0;110D 116A 11AF;
+CAE1;CAE1;110D 116A 11B0;CAE1;110D 116A 11B0;
+CAE2;CAE2;110D 116A 11B1;CAE2;110D 116A 11B1;
+CAE3;CAE3;110D 116A 11B2;CAE3;110D 116A 11B2;
+CAE4;CAE4;110D 116A 11B3;CAE4;110D 116A 11B3;
+CAE5;CAE5;110D 116A 11B4;CAE5;110D 116A 11B4;
+CAE6;CAE6;110D 116A 11B5;CAE6;110D 116A 11B5;
+CAE7;CAE7;110D 116A 11B6;CAE7;110D 116A 11B6;
+CAE8;CAE8;110D 116A 11B7;CAE8;110D 116A 11B7;
+CAE9;CAE9;110D 116A 11B8;CAE9;110D 116A 11B8;
+CAEA;CAEA;110D 116A 11B9;CAEA;110D 116A 11B9;
+CAEB;CAEB;110D 116A 11BA;CAEB;110D 116A 11BA;
+CAEC;CAEC;110D 116A 11BB;CAEC;110D 116A 11BB;
+CAED;CAED;110D 116A 11BC;CAED;110D 116A 11BC;
+CAEE;CAEE;110D 116A 11BD;CAEE;110D 116A 11BD;
+CAEF;CAEF;110D 116A 11BE;CAEF;110D 116A 11BE;
+CAF0;CAF0;110D 116A 11BF;CAF0;110D 116A 11BF;
+CAF1;CAF1;110D 116A 11C0;CAF1;110D 116A 11C0;
+CAF2;CAF2;110D 116A 11C1;CAF2;110D 116A 11C1;
+CAF3;CAF3;110D 116A 11C2;CAF3;110D 116A 11C2;
+CAF4;CAF4;110D 116B;CAF4;110D 116B;
+CAF5;CAF5;110D 116B 11A8;CAF5;110D 116B 11A8;
+CAF6;CAF6;110D 116B 11A9;CAF6;110D 116B 11A9;
+CAF7;CAF7;110D 116B 11AA;CAF7;110D 116B 11AA;
+CAF8;CAF8;110D 116B 11AB;CAF8;110D 116B 11AB;
+CAF9;CAF9;110D 116B 11AC;CAF9;110D 116B 11AC;
+CAFA;CAFA;110D 116B 11AD;CAFA;110D 116B 11AD;
+CAFB;CAFB;110D 116B 11AE;CAFB;110D 116B 11AE;
+CAFC;CAFC;110D 116B 11AF;CAFC;110D 116B 11AF;
+CAFD;CAFD;110D 116B 11B0;CAFD;110D 116B 11B0;
+CAFE;CAFE;110D 116B 11B1;CAFE;110D 116B 11B1;
+CAFF;CAFF;110D 116B 11B2;CAFF;110D 116B 11B2;
+CB00;CB00;110D 116B 11B3;CB00;110D 116B 11B3;
+CB01;CB01;110D 116B 11B4;CB01;110D 116B 11B4;
+CB02;CB02;110D 116B 11B5;CB02;110D 116B 11B5;
+CB03;CB03;110D 116B 11B6;CB03;110D 116B 11B6;
+CB04;CB04;110D 116B 11B7;CB04;110D 116B 11B7;
+CB05;CB05;110D 116B 11B8;CB05;110D 116B 11B8;
+CB06;CB06;110D 116B 11B9;CB06;110D 116B 11B9;
+CB07;CB07;110D 116B 11BA;CB07;110D 116B 11BA;
+CB08;CB08;110D 116B 11BB;CB08;110D 116B 11BB;
+CB09;CB09;110D 116B 11BC;CB09;110D 116B 11BC;
+CB0A;CB0A;110D 116B 11BD;CB0A;110D 116B 11BD;
+CB0B;CB0B;110D 116B 11BE;CB0B;110D 116B 11BE;
+CB0C;CB0C;110D 116B 11BF;CB0C;110D 116B 11BF;
+CB0D;CB0D;110D 116B 11C0;CB0D;110D 116B 11C0;
+CB0E;CB0E;110D 116B 11C1;CB0E;110D 116B 11C1;
+CB0F;CB0F;110D 116B 11C2;CB0F;110D 116B 11C2;
+CB10;CB10;110D 116C;CB10;110D 116C;
+CB11;CB11;110D 116C 11A8;CB11;110D 116C 11A8;
+CB12;CB12;110D 116C 11A9;CB12;110D 116C 11A9;
+CB13;CB13;110D 116C 11AA;CB13;110D 116C 11AA;
+CB14;CB14;110D 116C 11AB;CB14;110D 116C 11AB;
+CB15;CB15;110D 116C 11AC;CB15;110D 116C 11AC;
+CB16;CB16;110D 116C 11AD;CB16;110D 116C 11AD;
+CB17;CB17;110D 116C 11AE;CB17;110D 116C 11AE;
+CB18;CB18;110D 116C 11AF;CB18;110D 116C 11AF;
+CB19;CB19;110D 116C 11B0;CB19;110D 116C 11B0;
+CB1A;CB1A;110D 116C 11B1;CB1A;110D 116C 11B1;
+CB1B;CB1B;110D 116C 11B2;CB1B;110D 116C 11B2;
+CB1C;CB1C;110D 116C 11B3;CB1C;110D 116C 11B3;
+CB1D;CB1D;110D 116C 11B4;CB1D;110D 116C 11B4;
+CB1E;CB1E;110D 116C 11B5;CB1E;110D 116C 11B5;
+CB1F;CB1F;110D 116C 11B6;CB1F;110D 116C 11B6;
+CB20;CB20;110D 116C 11B7;CB20;110D 116C 11B7;
+CB21;CB21;110D 116C 11B8;CB21;110D 116C 11B8;
+CB22;CB22;110D 116C 11B9;CB22;110D 116C 11B9;
+CB23;CB23;110D 116C 11BA;CB23;110D 116C 11BA;
+CB24;CB24;110D 116C 11BB;CB24;110D 116C 11BB;
+CB25;CB25;110D 116C 11BC;CB25;110D 116C 11BC;
+CB26;CB26;110D 116C 11BD;CB26;110D 116C 11BD;
+CB27;CB27;110D 116C 11BE;CB27;110D 116C 11BE;
+CB28;CB28;110D 116C 11BF;CB28;110D 116C 11BF;
+CB29;CB29;110D 116C 11C0;CB29;110D 116C 11C0;
+CB2A;CB2A;110D 116C 11C1;CB2A;110D 116C 11C1;
+CB2B;CB2B;110D 116C 11C2;CB2B;110D 116C 11C2;
+CB2C;CB2C;110D 116D;CB2C;110D 116D;
+CB2D;CB2D;110D 116D 11A8;CB2D;110D 116D 11A8;
+CB2E;CB2E;110D 116D 11A9;CB2E;110D 116D 11A9;
+CB2F;CB2F;110D 116D 11AA;CB2F;110D 116D 11AA;
+CB30;CB30;110D 116D 11AB;CB30;110D 116D 11AB;
+CB31;CB31;110D 116D 11AC;CB31;110D 116D 11AC;
+CB32;CB32;110D 116D 11AD;CB32;110D 116D 11AD;
+CB33;CB33;110D 116D 11AE;CB33;110D 116D 11AE;
+CB34;CB34;110D 116D 11AF;CB34;110D 116D 11AF;
+CB35;CB35;110D 116D 11B0;CB35;110D 116D 11B0;
+CB36;CB36;110D 116D 11B1;CB36;110D 116D 11B1;
+CB37;CB37;110D 116D 11B2;CB37;110D 116D 11B2;
+CB38;CB38;110D 116D 11B3;CB38;110D 116D 11B3;
+CB39;CB39;110D 116D 11B4;CB39;110D 116D 11B4;
+CB3A;CB3A;110D 116D 11B5;CB3A;110D 116D 11B5;
+CB3B;CB3B;110D 116D 11B6;CB3B;110D 116D 11B6;
+CB3C;CB3C;110D 116D 11B7;CB3C;110D 116D 11B7;
+CB3D;CB3D;110D 116D 11B8;CB3D;110D 116D 11B8;
+CB3E;CB3E;110D 116D 11B9;CB3E;110D 116D 11B9;
+CB3F;CB3F;110D 116D 11BA;CB3F;110D 116D 11BA;
+CB40;CB40;110D 116D 11BB;CB40;110D 116D 11BB;
+CB41;CB41;110D 116D 11BC;CB41;110D 116D 11BC;
+CB42;CB42;110D 116D 11BD;CB42;110D 116D 11BD;
+CB43;CB43;110D 116D 11BE;CB43;110D 116D 11BE;
+CB44;CB44;110D 116D 11BF;CB44;110D 116D 11BF;
+CB45;CB45;110D 116D 11C0;CB45;110D 116D 11C0;
+CB46;CB46;110D 116D 11C1;CB46;110D 116D 11C1;
+CB47;CB47;110D 116D 11C2;CB47;110D 116D 11C2;
+CB48;CB48;110D 116E;CB48;110D 116E;
+CB49;CB49;110D 116E 11A8;CB49;110D 116E 11A8;
+CB4A;CB4A;110D 116E 11A9;CB4A;110D 116E 11A9;
+CB4B;CB4B;110D 116E 11AA;CB4B;110D 116E 11AA;
+CB4C;CB4C;110D 116E 11AB;CB4C;110D 116E 11AB;
+CB4D;CB4D;110D 116E 11AC;CB4D;110D 116E 11AC;
+CB4E;CB4E;110D 116E 11AD;CB4E;110D 116E 11AD;
+CB4F;CB4F;110D 116E 11AE;CB4F;110D 116E 11AE;
+CB50;CB50;110D 116E 11AF;CB50;110D 116E 11AF;
+CB51;CB51;110D 116E 11B0;CB51;110D 116E 11B0;
+CB52;CB52;110D 116E 11B1;CB52;110D 116E 11B1;
+CB53;CB53;110D 116E 11B2;CB53;110D 116E 11B2;
+CB54;CB54;110D 116E 11B3;CB54;110D 116E 11B3;
+CB55;CB55;110D 116E 11B4;CB55;110D 116E 11B4;
+CB56;CB56;110D 116E 11B5;CB56;110D 116E 11B5;
+CB57;CB57;110D 116E 11B6;CB57;110D 116E 11B6;
+CB58;CB58;110D 116E 11B7;CB58;110D 116E 11B7;
+CB59;CB59;110D 116E 11B8;CB59;110D 116E 11B8;
+CB5A;CB5A;110D 116E 11B9;CB5A;110D 116E 11B9;
+CB5B;CB5B;110D 116E 11BA;CB5B;110D 116E 11BA;
+CB5C;CB5C;110D 116E 11BB;CB5C;110D 116E 11BB;
+CB5D;CB5D;110D 116E 11BC;CB5D;110D 116E 11BC;
+CB5E;CB5E;110D 116E 11BD;CB5E;110D 116E 11BD;
+CB5F;CB5F;110D 116E 11BE;CB5F;110D 116E 11BE;
+CB60;CB60;110D 116E 11BF;CB60;110D 116E 11BF;
+CB61;CB61;110D 116E 11C0;CB61;110D 116E 11C0;
+CB62;CB62;110D 116E 11C1;CB62;110D 116E 11C1;
+CB63;CB63;110D 116E 11C2;CB63;110D 116E 11C2;
+CB64;CB64;110D 116F;CB64;110D 116F;
+CB65;CB65;110D 116F 11A8;CB65;110D 116F 11A8;
+CB66;CB66;110D 116F 11A9;CB66;110D 116F 11A9;
+CB67;CB67;110D 116F 11AA;CB67;110D 116F 11AA;
+CB68;CB68;110D 116F 11AB;CB68;110D 116F 11AB;
+CB69;CB69;110D 116F 11AC;CB69;110D 116F 11AC;
+CB6A;CB6A;110D 116F 11AD;CB6A;110D 116F 11AD;
+CB6B;CB6B;110D 116F 11AE;CB6B;110D 116F 11AE;
+CB6C;CB6C;110D 116F 11AF;CB6C;110D 116F 11AF;
+CB6D;CB6D;110D 116F 11B0;CB6D;110D 116F 11B0;
+CB6E;CB6E;110D 116F 11B1;CB6E;110D 116F 11B1;
+CB6F;CB6F;110D 116F 11B2;CB6F;110D 116F 11B2;
+CB70;CB70;110D 116F 11B3;CB70;110D 116F 11B3;
+CB71;CB71;110D 116F 11B4;CB71;110D 116F 11B4;
+CB72;CB72;110D 116F 11B5;CB72;110D 116F 11B5;
+CB73;CB73;110D 116F 11B6;CB73;110D 116F 11B6;
+CB74;CB74;110D 116F 11B7;CB74;110D 116F 11B7;
+CB75;CB75;110D 116F 11B8;CB75;110D 116F 11B8;
+CB76;CB76;110D 116F 11B9;CB76;110D 116F 11B9;
+CB77;CB77;110D 116F 11BA;CB77;110D 116F 11BA;
+CB78;CB78;110D 116F 11BB;CB78;110D 116F 11BB;
+CB79;CB79;110D 116F 11BC;CB79;110D 116F 11BC;
+CB7A;CB7A;110D 116F 11BD;CB7A;110D 116F 11BD;
+CB7B;CB7B;110D 116F 11BE;CB7B;110D 116F 11BE;
+CB7C;CB7C;110D 116F 11BF;CB7C;110D 116F 11BF;
+CB7D;CB7D;110D 116F 11C0;CB7D;110D 116F 11C0;
+CB7E;CB7E;110D 116F 11C1;CB7E;110D 116F 11C1;
+CB7F;CB7F;110D 116F 11C2;CB7F;110D 116F 11C2;
+CB80;CB80;110D 1170;CB80;110D 1170;
+CB81;CB81;110D 1170 11A8;CB81;110D 1170 11A8;
+CB82;CB82;110D 1170 11A9;CB82;110D 1170 11A9;
+CB83;CB83;110D 1170 11AA;CB83;110D 1170 11AA;
+CB84;CB84;110D 1170 11AB;CB84;110D 1170 11AB;
+CB85;CB85;110D 1170 11AC;CB85;110D 1170 11AC;
+CB86;CB86;110D 1170 11AD;CB86;110D 1170 11AD;
+CB87;CB87;110D 1170 11AE;CB87;110D 1170 11AE;
+CB88;CB88;110D 1170 11AF;CB88;110D 1170 11AF;
+CB89;CB89;110D 1170 11B0;CB89;110D 1170 11B0;
+CB8A;CB8A;110D 1170 11B1;CB8A;110D 1170 11B1;
+CB8B;CB8B;110D 1170 11B2;CB8B;110D 1170 11B2;
+CB8C;CB8C;110D 1170 11B3;CB8C;110D 1170 11B3;
+CB8D;CB8D;110D 1170 11B4;CB8D;110D 1170 11B4;
+CB8E;CB8E;110D 1170 11B5;CB8E;110D 1170 11B5;
+CB8F;CB8F;110D 1170 11B6;CB8F;110D 1170 11B6;
+CB90;CB90;110D 1170 11B7;CB90;110D 1170 11B7;
+CB91;CB91;110D 1170 11B8;CB91;110D 1170 11B8;
+CB92;CB92;110D 1170 11B9;CB92;110D 1170 11B9;
+CB93;CB93;110D 1170 11BA;CB93;110D 1170 11BA;
+CB94;CB94;110D 1170 11BB;CB94;110D 1170 11BB;
+CB95;CB95;110D 1170 11BC;CB95;110D 1170 11BC;
+CB96;CB96;110D 1170 11BD;CB96;110D 1170 11BD;
+CB97;CB97;110D 1170 11BE;CB97;110D 1170 11BE;
+CB98;CB98;110D 1170 11BF;CB98;110D 1170 11BF;
+CB99;CB99;110D 1170 11C0;CB99;110D 1170 11C0;
+CB9A;CB9A;110D 1170 11C1;CB9A;110D 1170 11C1;
+CB9B;CB9B;110D 1170 11C2;CB9B;110D 1170 11C2;
+CB9C;CB9C;110D 1171;CB9C;110D 1171;
+CB9D;CB9D;110D 1171 11A8;CB9D;110D 1171 11A8;
+CB9E;CB9E;110D 1171 11A9;CB9E;110D 1171 11A9;
+CB9F;CB9F;110D 1171 11AA;CB9F;110D 1171 11AA;
+CBA0;CBA0;110D 1171 11AB;CBA0;110D 1171 11AB;
+CBA1;CBA1;110D 1171 11AC;CBA1;110D 1171 11AC;
+CBA2;CBA2;110D 1171 11AD;CBA2;110D 1171 11AD;
+CBA3;CBA3;110D 1171 11AE;CBA3;110D 1171 11AE;
+CBA4;CBA4;110D 1171 11AF;CBA4;110D 1171 11AF;
+CBA5;CBA5;110D 1171 11B0;CBA5;110D 1171 11B0;
+CBA6;CBA6;110D 1171 11B1;CBA6;110D 1171 11B1;
+CBA7;CBA7;110D 1171 11B2;CBA7;110D 1171 11B2;
+CBA8;CBA8;110D 1171 11B3;CBA8;110D 1171 11B3;
+CBA9;CBA9;110D 1171 11B4;CBA9;110D 1171 11B4;
+CBAA;CBAA;110D 1171 11B5;CBAA;110D 1171 11B5;
+CBAB;CBAB;110D 1171 11B6;CBAB;110D 1171 11B6;
+CBAC;CBAC;110D 1171 11B7;CBAC;110D 1171 11B7;
+CBAD;CBAD;110D 1171 11B8;CBAD;110D 1171 11B8;
+CBAE;CBAE;110D 1171 11B9;CBAE;110D 1171 11B9;
+CBAF;CBAF;110D 1171 11BA;CBAF;110D 1171 11BA;
+CBB0;CBB0;110D 1171 11BB;CBB0;110D 1171 11BB;
+CBB1;CBB1;110D 1171 11BC;CBB1;110D 1171 11BC;
+CBB2;CBB2;110D 1171 11BD;CBB2;110D 1171 11BD;
+CBB3;CBB3;110D 1171 11BE;CBB3;110D 1171 11BE;
+CBB4;CBB4;110D 1171 11BF;CBB4;110D 1171 11BF;
+CBB5;CBB5;110D 1171 11C0;CBB5;110D 1171 11C0;
+CBB6;CBB6;110D 1171 11C1;CBB6;110D 1171 11C1;
+CBB7;CBB7;110D 1171 11C2;CBB7;110D 1171 11C2;
+CBB8;CBB8;110D 1172;CBB8;110D 1172;
+CBB9;CBB9;110D 1172 11A8;CBB9;110D 1172 11A8;
+CBBA;CBBA;110D 1172 11A9;CBBA;110D 1172 11A9;
+CBBB;CBBB;110D 1172 11AA;CBBB;110D 1172 11AA;
+CBBC;CBBC;110D 1172 11AB;CBBC;110D 1172 11AB;
+CBBD;CBBD;110D 1172 11AC;CBBD;110D 1172 11AC;
+CBBE;CBBE;110D 1172 11AD;CBBE;110D 1172 11AD;
+CBBF;CBBF;110D 1172 11AE;CBBF;110D 1172 11AE;
+CBC0;CBC0;110D 1172 11AF;CBC0;110D 1172 11AF;
+CBC1;CBC1;110D 1172 11B0;CBC1;110D 1172 11B0;
+CBC2;CBC2;110D 1172 11B1;CBC2;110D 1172 11B1;
+CBC3;CBC3;110D 1172 11B2;CBC3;110D 1172 11B2;
+CBC4;CBC4;110D 1172 11B3;CBC4;110D 1172 11B3;
+CBC5;CBC5;110D 1172 11B4;CBC5;110D 1172 11B4;
+CBC6;CBC6;110D 1172 11B5;CBC6;110D 1172 11B5;
+CBC7;CBC7;110D 1172 11B6;CBC7;110D 1172 11B6;
+CBC8;CBC8;110D 1172 11B7;CBC8;110D 1172 11B7;
+CBC9;CBC9;110D 1172 11B8;CBC9;110D 1172 11B8;
+CBCA;CBCA;110D 1172 11B9;CBCA;110D 1172 11B9;
+CBCB;CBCB;110D 1172 11BA;CBCB;110D 1172 11BA;
+CBCC;CBCC;110D 1172 11BB;CBCC;110D 1172 11BB;
+CBCD;CBCD;110D 1172 11BC;CBCD;110D 1172 11BC;
+CBCE;CBCE;110D 1172 11BD;CBCE;110D 1172 11BD;
+CBCF;CBCF;110D 1172 11BE;CBCF;110D 1172 11BE;
+CBD0;CBD0;110D 1172 11BF;CBD0;110D 1172 11BF;
+CBD1;CBD1;110D 1172 11C0;CBD1;110D 1172 11C0;
+CBD2;CBD2;110D 1172 11C1;CBD2;110D 1172 11C1;
+CBD3;CBD3;110D 1172 11C2;CBD3;110D 1172 11C2;
+CBD4;CBD4;110D 1173;CBD4;110D 1173;
+CBD5;CBD5;110D 1173 11A8;CBD5;110D 1173 11A8;
+CBD6;CBD6;110D 1173 11A9;CBD6;110D 1173 11A9;
+CBD7;CBD7;110D 1173 11AA;CBD7;110D 1173 11AA;
+CBD8;CBD8;110D 1173 11AB;CBD8;110D 1173 11AB;
+CBD9;CBD9;110D 1173 11AC;CBD9;110D 1173 11AC;
+CBDA;CBDA;110D 1173 11AD;CBDA;110D 1173 11AD;
+CBDB;CBDB;110D 1173 11AE;CBDB;110D 1173 11AE;
+CBDC;CBDC;110D 1173 11AF;CBDC;110D 1173 11AF;
+CBDD;CBDD;110D 1173 11B0;CBDD;110D 1173 11B0;
+CBDE;CBDE;110D 1173 11B1;CBDE;110D 1173 11B1;
+CBDF;CBDF;110D 1173 11B2;CBDF;110D 1173 11B2;
+CBE0;CBE0;110D 1173 11B3;CBE0;110D 1173 11B3;
+CBE1;CBE1;110D 1173 11B4;CBE1;110D 1173 11B4;
+CBE2;CBE2;110D 1173 11B5;CBE2;110D 1173 11B5;
+CBE3;CBE3;110D 1173 11B6;CBE3;110D 1173 11B6;
+CBE4;CBE4;110D 1173 11B7;CBE4;110D 1173 11B7;
+CBE5;CBE5;110D 1173 11B8;CBE5;110D 1173 11B8;
+CBE6;CBE6;110D 1173 11B9;CBE6;110D 1173 11B9;
+CBE7;CBE7;110D 1173 11BA;CBE7;110D 1173 11BA;
+CBE8;CBE8;110D 1173 11BB;CBE8;110D 1173 11BB;
+CBE9;CBE9;110D 1173 11BC;CBE9;110D 1173 11BC;
+CBEA;CBEA;110D 1173 11BD;CBEA;110D 1173 11BD;
+CBEB;CBEB;110D 1173 11BE;CBEB;110D 1173 11BE;
+CBEC;CBEC;110D 1173 11BF;CBEC;110D 1173 11BF;
+CBED;CBED;110D 1173 11C0;CBED;110D 1173 11C0;
+CBEE;CBEE;110D 1173 11C1;CBEE;110D 1173 11C1;
+CBEF;CBEF;110D 1173 11C2;CBEF;110D 1173 11C2;
+CBF0;CBF0;110D 1174;CBF0;110D 1174;
+CBF1;CBF1;110D 1174 11A8;CBF1;110D 1174 11A8;
+CBF2;CBF2;110D 1174 11A9;CBF2;110D 1174 11A9;
+CBF3;CBF3;110D 1174 11AA;CBF3;110D 1174 11AA;
+CBF4;CBF4;110D 1174 11AB;CBF4;110D 1174 11AB;
+CBF5;CBF5;110D 1174 11AC;CBF5;110D 1174 11AC;
+CBF6;CBF6;110D 1174 11AD;CBF6;110D 1174 11AD;
+CBF7;CBF7;110D 1174 11AE;CBF7;110D 1174 11AE;
+CBF8;CBF8;110D 1174 11AF;CBF8;110D 1174 11AF;
+CBF9;CBF9;110D 1174 11B0;CBF9;110D 1174 11B0;
+CBFA;CBFA;110D 1174 11B1;CBFA;110D 1174 11B1;
+CBFB;CBFB;110D 1174 11B2;CBFB;110D 1174 11B2;
+CBFC;CBFC;110D 1174 11B3;CBFC;110D 1174 11B3;
+CBFD;CBFD;110D 1174 11B4;CBFD;110D 1174 11B4;
+CBFE;CBFE;110D 1174 11B5;CBFE;110D 1174 11B5;
+CBFF;CBFF;110D 1174 11B6;CBFF;110D 1174 11B6;
+CC00;CC00;110D 1174 11B7;CC00;110D 1174 11B7;
+CC01;CC01;110D 1174 11B8;CC01;110D 1174 11B8;
+CC02;CC02;110D 1174 11B9;CC02;110D 1174 11B9;
+CC03;CC03;110D 1174 11BA;CC03;110D 1174 11BA;
+CC04;CC04;110D 1174 11BB;CC04;110D 1174 11BB;
+CC05;CC05;110D 1174 11BC;CC05;110D 1174 11BC;
+CC06;CC06;110D 1174 11BD;CC06;110D 1174 11BD;
+CC07;CC07;110D 1174 11BE;CC07;110D 1174 11BE;
+CC08;CC08;110D 1174 11BF;CC08;110D 1174 11BF;
+CC09;CC09;110D 1174 11C0;CC09;110D 1174 11C0;
+CC0A;CC0A;110D 1174 11C1;CC0A;110D 1174 11C1;
+CC0B;CC0B;110D 1174 11C2;CC0B;110D 1174 11C2;
+CC0C;CC0C;110D 1175;CC0C;110D 1175;
+CC0D;CC0D;110D 1175 11A8;CC0D;110D 1175 11A8;
+CC0E;CC0E;110D 1175 11A9;CC0E;110D 1175 11A9;
+CC0F;CC0F;110D 1175 11AA;CC0F;110D 1175 11AA;
+CC10;CC10;110D 1175 11AB;CC10;110D 1175 11AB;
+CC11;CC11;110D 1175 11AC;CC11;110D 1175 11AC;
+CC12;CC12;110D 1175 11AD;CC12;110D 1175 11AD;
+CC13;CC13;110D 1175 11AE;CC13;110D 1175 11AE;
+CC14;CC14;110D 1175 11AF;CC14;110D 1175 11AF;
+CC15;CC15;110D 1175 11B0;CC15;110D 1175 11B0;
+CC16;CC16;110D 1175 11B1;CC16;110D 1175 11B1;
+CC17;CC17;110D 1175 11B2;CC17;110D 1175 11B2;
+CC18;CC18;110D 1175 11B3;CC18;110D 1175 11B3;
+CC19;CC19;110D 1175 11B4;CC19;110D 1175 11B4;
+CC1A;CC1A;110D 1175 11B5;CC1A;110D 1175 11B5;
+CC1B;CC1B;110D 1175 11B6;CC1B;110D 1175 11B6;
+CC1C;CC1C;110D 1175 11B7;CC1C;110D 1175 11B7;
+CC1D;CC1D;110D 1175 11B8;CC1D;110D 1175 11B8;
+CC1E;CC1E;110D 1175 11B9;CC1E;110D 1175 11B9;
+CC1F;CC1F;110D 1175 11BA;CC1F;110D 1175 11BA;
+CC20;CC20;110D 1175 11BB;CC20;110D 1175 11BB;
+CC21;CC21;110D 1175 11BC;CC21;110D 1175 11BC;
+CC22;CC22;110D 1175 11BD;CC22;110D 1175 11BD;
+CC23;CC23;110D 1175 11BE;CC23;110D 1175 11BE;
+CC24;CC24;110D 1175 11BF;CC24;110D 1175 11BF;
+CC25;CC25;110D 1175 11C0;CC25;110D 1175 11C0;
+CC26;CC26;110D 1175 11C1;CC26;110D 1175 11C1;
+CC27;CC27;110D 1175 11C2;CC27;110D 1175 11C2;
+CC28;CC28;110E 1161;CC28;110E 1161;
+CC29;CC29;110E 1161 11A8;CC29;110E 1161 11A8;
+CC2A;CC2A;110E 1161 11A9;CC2A;110E 1161 11A9;
+CC2B;CC2B;110E 1161 11AA;CC2B;110E 1161 11AA;
+CC2C;CC2C;110E 1161 11AB;CC2C;110E 1161 11AB;
+CC2D;CC2D;110E 1161 11AC;CC2D;110E 1161 11AC;
+CC2E;CC2E;110E 1161 11AD;CC2E;110E 1161 11AD;
+CC2F;CC2F;110E 1161 11AE;CC2F;110E 1161 11AE;
+CC30;CC30;110E 1161 11AF;CC30;110E 1161 11AF;
+CC31;CC31;110E 1161 11B0;CC31;110E 1161 11B0;
+CC32;CC32;110E 1161 11B1;CC32;110E 1161 11B1;
+CC33;CC33;110E 1161 11B2;CC33;110E 1161 11B2;
+CC34;CC34;110E 1161 11B3;CC34;110E 1161 11B3;
+CC35;CC35;110E 1161 11B4;CC35;110E 1161 11B4;
+CC36;CC36;110E 1161 11B5;CC36;110E 1161 11B5;
+CC37;CC37;110E 1161 11B6;CC37;110E 1161 11B6;
+CC38;CC38;110E 1161 11B7;CC38;110E 1161 11B7;
+CC39;CC39;110E 1161 11B8;CC39;110E 1161 11B8;
+CC3A;CC3A;110E 1161 11B9;CC3A;110E 1161 11B9;
+CC3B;CC3B;110E 1161 11BA;CC3B;110E 1161 11BA;
+CC3C;CC3C;110E 1161 11BB;CC3C;110E 1161 11BB;
+CC3D;CC3D;110E 1161 11BC;CC3D;110E 1161 11BC;
+CC3E;CC3E;110E 1161 11BD;CC3E;110E 1161 11BD;
+CC3F;CC3F;110E 1161 11BE;CC3F;110E 1161 11BE;
+CC40;CC40;110E 1161 11BF;CC40;110E 1161 11BF;
+CC41;CC41;110E 1161 11C0;CC41;110E 1161 11C0;
+CC42;CC42;110E 1161 11C1;CC42;110E 1161 11C1;
+CC43;CC43;110E 1161 11C2;CC43;110E 1161 11C2;
+CC44;CC44;110E 1162;CC44;110E 1162;
+CC45;CC45;110E 1162 11A8;CC45;110E 1162 11A8;
+CC46;CC46;110E 1162 11A9;CC46;110E 1162 11A9;
+CC47;CC47;110E 1162 11AA;CC47;110E 1162 11AA;
+CC48;CC48;110E 1162 11AB;CC48;110E 1162 11AB;
+CC49;CC49;110E 1162 11AC;CC49;110E 1162 11AC;
+CC4A;CC4A;110E 1162 11AD;CC4A;110E 1162 11AD;
+CC4B;CC4B;110E 1162 11AE;CC4B;110E 1162 11AE;
+CC4C;CC4C;110E 1162 11AF;CC4C;110E 1162 11AF;
+CC4D;CC4D;110E 1162 11B0;CC4D;110E 1162 11B0;
+CC4E;CC4E;110E 1162 11B1;CC4E;110E 1162 11B1;
+CC4F;CC4F;110E 1162 11B2;CC4F;110E 1162 11B2;
+CC50;CC50;110E 1162 11B3;CC50;110E 1162 11B3;
+CC51;CC51;110E 1162 11B4;CC51;110E 1162 11B4;
+CC52;CC52;110E 1162 11B5;CC52;110E 1162 11B5;
+CC53;CC53;110E 1162 11B6;CC53;110E 1162 11B6;
+CC54;CC54;110E 1162 11B7;CC54;110E 1162 11B7;
+CC55;CC55;110E 1162 11B8;CC55;110E 1162 11B8;
+CC56;CC56;110E 1162 11B9;CC56;110E 1162 11B9;
+CC57;CC57;110E 1162 11BA;CC57;110E 1162 11BA;
+CC58;CC58;110E 1162 11BB;CC58;110E 1162 11BB;
+CC59;CC59;110E 1162 11BC;CC59;110E 1162 11BC;
+CC5A;CC5A;110E 1162 11BD;CC5A;110E 1162 11BD;
+CC5B;CC5B;110E 1162 11BE;CC5B;110E 1162 11BE;
+CC5C;CC5C;110E 1162 11BF;CC5C;110E 1162 11BF;
+CC5D;CC5D;110E 1162 11C0;CC5D;110E 1162 11C0;
+CC5E;CC5E;110E 1162 11C1;CC5E;110E 1162 11C1;
+CC5F;CC5F;110E 1162 11C2;CC5F;110E 1162 11C2;
+CC60;CC60;110E 1163;CC60;110E 1163;
+CC61;CC61;110E 1163 11A8;CC61;110E 1163 11A8;
+CC62;CC62;110E 1163 11A9;CC62;110E 1163 11A9;
+CC63;CC63;110E 1163 11AA;CC63;110E 1163 11AA;
+CC64;CC64;110E 1163 11AB;CC64;110E 1163 11AB;
+CC65;CC65;110E 1163 11AC;CC65;110E 1163 11AC;
+CC66;CC66;110E 1163 11AD;CC66;110E 1163 11AD;
+CC67;CC67;110E 1163 11AE;CC67;110E 1163 11AE;
+CC68;CC68;110E 1163 11AF;CC68;110E 1163 11AF;
+CC69;CC69;110E 1163 11B0;CC69;110E 1163 11B0;
+CC6A;CC6A;110E 1163 11B1;CC6A;110E 1163 11B1;
+CC6B;CC6B;110E 1163 11B2;CC6B;110E 1163 11B2;
+CC6C;CC6C;110E 1163 11B3;CC6C;110E 1163 11B3;
+CC6D;CC6D;110E 1163 11B4;CC6D;110E 1163 11B4;
+CC6E;CC6E;110E 1163 11B5;CC6E;110E 1163 11B5;
+CC6F;CC6F;110E 1163 11B6;CC6F;110E 1163 11B6;
+CC70;CC70;110E 1163 11B7;CC70;110E 1163 11B7;
+CC71;CC71;110E 1163 11B8;CC71;110E 1163 11B8;
+CC72;CC72;110E 1163 11B9;CC72;110E 1163 11B9;
+CC73;CC73;110E 1163 11BA;CC73;110E 1163 11BA;
+CC74;CC74;110E 1163 11BB;CC74;110E 1163 11BB;
+CC75;CC75;110E 1163 11BC;CC75;110E 1163 11BC;
+CC76;CC76;110E 1163 11BD;CC76;110E 1163 11BD;
+CC77;CC77;110E 1163 11BE;CC77;110E 1163 11BE;
+CC78;CC78;110E 1163 11BF;CC78;110E 1163 11BF;
+CC79;CC79;110E 1163 11C0;CC79;110E 1163 11C0;
+CC7A;CC7A;110E 1163 11C1;CC7A;110E 1163 11C1;
+CC7B;CC7B;110E 1163 11C2;CC7B;110E 1163 11C2;
+CC7C;CC7C;110E 1164;CC7C;110E 1164;
+CC7D;CC7D;110E 1164 11A8;CC7D;110E 1164 11A8;
+CC7E;CC7E;110E 1164 11A9;CC7E;110E 1164 11A9;
+CC7F;CC7F;110E 1164 11AA;CC7F;110E 1164 11AA;
+CC80;CC80;110E 1164 11AB;CC80;110E 1164 11AB;
+CC81;CC81;110E 1164 11AC;CC81;110E 1164 11AC;
+CC82;CC82;110E 1164 11AD;CC82;110E 1164 11AD;
+CC83;CC83;110E 1164 11AE;CC83;110E 1164 11AE;
+CC84;CC84;110E 1164 11AF;CC84;110E 1164 11AF;
+CC85;CC85;110E 1164 11B0;CC85;110E 1164 11B0;
+CC86;CC86;110E 1164 11B1;CC86;110E 1164 11B1;
+CC87;CC87;110E 1164 11B2;CC87;110E 1164 11B2;
+CC88;CC88;110E 1164 11B3;CC88;110E 1164 11B3;
+CC89;CC89;110E 1164 11B4;CC89;110E 1164 11B4;
+CC8A;CC8A;110E 1164 11B5;CC8A;110E 1164 11B5;
+CC8B;CC8B;110E 1164 11B6;CC8B;110E 1164 11B6;
+CC8C;CC8C;110E 1164 11B7;CC8C;110E 1164 11B7;
+CC8D;CC8D;110E 1164 11B8;CC8D;110E 1164 11B8;
+CC8E;CC8E;110E 1164 11B9;CC8E;110E 1164 11B9;
+CC8F;CC8F;110E 1164 11BA;CC8F;110E 1164 11BA;
+CC90;CC90;110E 1164 11BB;CC90;110E 1164 11BB;
+CC91;CC91;110E 1164 11BC;CC91;110E 1164 11BC;
+CC92;CC92;110E 1164 11BD;CC92;110E 1164 11BD;
+CC93;CC93;110E 1164 11BE;CC93;110E 1164 11BE;
+CC94;CC94;110E 1164 11BF;CC94;110E 1164 11BF;
+CC95;CC95;110E 1164 11C0;CC95;110E 1164 11C0;
+CC96;CC96;110E 1164 11C1;CC96;110E 1164 11C1;
+CC97;CC97;110E 1164 11C2;CC97;110E 1164 11C2;
+CC98;CC98;110E 1165;CC98;110E 1165;
+CC99;CC99;110E 1165 11A8;CC99;110E 1165 11A8;
+CC9A;CC9A;110E 1165 11A9;CC9A;110E 1165 11A9;
+CC9B;CC9B;110E 1165 11AA;CC9B;110E 1165 11AA;
+CC9C;CC9C;110E 1165 11AB;CC9C;110E 1165 11AB;
+CC9D;CC9D;110E 1165 11AC;CC9D;110E 1165 11AC;
+CC9E;CC9E;110E 1165 11AD;CC9E;110E 1165 11AD;
+CC9F;CC9F;110E 1165 11AE;CC9F;110E 1165 11AE;
+CCA0;CCA0;110E 1165 11AF;CCA0;110E 1165 11AF;
+CCA1;CCA1;110E 1165 11B0;CCA1;110E 1165 11B0;
+CCA2;CCA2;110E 1165 11B1;CCA2;110E 1165 11B1;
+CCA3;CCA3;110E 1165 11B2;CCA3;110E 1165 11B2;
+CCA4;CCA4;110E 1165 11B3;CCA4;110E 1165 11B3;
+CCA5;CCA5;110E 1165 11B4;CCA5;110E 1165 11B4;
+CCA6;CCA6;110E 1165 11B5;CCA6;110E 1165 11B5;
+CCA7;CCA7;110E 1165 11B6;CCA7;110E 1165 11B6;
+CCA8;CCA8;110E 1165 11B7;CCA8;110E 1165 11B7;
+CCA9;CCA9;110E 1165 11B8;CCA9;110E 1165 11B8;
+CCAA;CCAA;110E 1165 11B9;CCAA;110E 1165 11B9;
+CCAB;CCAB;110E 1165 11BA;CCAB;110E 1165 11BA;
+CCAC;CCAC;110E 1165 11BB;CCAC;110E 1165 11BB;
+CCAD;CCAD;110E 1165 11BC;CCAD;110E 1165 11BC;
+CCAE;CCAE;110E 1165 11BD;CCAE;110E 1165 11BD;
+CCAF;CCAF;110E 1165 11BE;CCAF;110E 1165 11BE;
+CCB0;CCB0;110E 1165 11BF;CCB0;110E 1165 11BF;
+CCB1;CCB1;110E 1165 11C0;CCB1;110E 1165 11C0;
+CCB2;CCB2;110E 1165 11C1;CCB2;110E 1165 11C1;
+CCB3;CCB3;110E 1165 11C2;CCB3;110E 1165 11C2;
+CCB4;CCB4;110E 1166;CCB4;110E 1166;
+CCB5;CCB5;110E 1166 11A8;CCB5;110E 1166 11A8;
+CCB6;CCB6;110E 1166 11A9;CCB6;110E 1166 11A9;
+CCB7;CCB7;110E 1166 11AA;CCB7;110E 1166 11AA;
+CCB8;CCB8;110E 1166 11AB;CCB8;110E 1166 11AB;
+CCB9;CCB9;110E 1166 11AC;CCB9;110E 1166 11AC;
+CCBA;CCBA;110E 1166 11AD;CCBA;110E 1166 11AD;
+CCBB;CCBB;110E 1166 11AE;CCBB;110E 1166 11AE;
+CCBC;CCBC;110E 1166 11AF;CCBC;110E 1166 11AF;
+CCBD;CCBD;110E 1166 11B0;CCBD;110E 1166 11B0;
+CCBE;CCBE;110E 1166 11B1;CCBE;110E 1166 11B1;
+CCBF;CCBF;110E 1166 11B2;CCBF;110E 1166 11B2;
+CCC0;CCC0;110E 1166 11B3;CCC0;110E 1166 11B3;
+CCC1;CCC1;110E 1166 11B4;CCC1;110E 1166 11B4;
+CCC2;CCC2;110E 1166 11B5;CCC2;110E 1166 11B5;
+CCC3;CCC3;110E 1166 11B6;CCC3;110E 1166 11B6;
+CCC4;CCC4;110E 1166 11B7;CCC4;110E 1166 11B7;
+CCC5;CCC5;110E 1166 11B8;CCC5;110E 1166 11B8;
+CCC6;CCC6;110E 1166 11B9;CCC6;110E 1166 11B9;
+CCC7;CCC7;110E 1166 11BA;CCC7;110E 1166 11BA;
+CCC8;CCC8;110E 1166 11BB;CCC8;110E 1166 11BB;
+CCC9;CCC9;110E 1166 11BC;CCC9;110E 1166 11BC;
+CCCA;CCCA;110E 1166 11BD;CCCA;110E 1166 11BD;
+CCCB;CCCB;110E 1166 11BE;CCCB;110E 1166 11BE;
+CCCC;CCCC;110E 1166 11BF;CCCC;110E 1166 11BF;
+CCCD;CCCD;110E 1166 11C0;CCCD;110E 1166 11C0;
+CCCE;CCCE;110E 1166 11C1;CCCE;110E 1166 11C1;
+CCCF;CCCF;110E 1166 11C2;CCCF;110E 1166 11C2;
+CCD0;CCD0;110E 1167;CCD0;110E 1167;
+CCD1;CCD1;110E 1167 11A8;CCD1;110E 1167 11A8;
+CCD2;CCD2;110E 1167 11A9;CCD2;110E 1167 11A9;
+CCD3;CCD3;110E 1167 11AA;CCD3;110E 1167 11AA;
+CCD4;CCD4;110E 1167 11AB;CCD4;110E 1167 11AB;
+CCD5;CCD5;110E 1167 11AC;CCD5;110E 1167 11AC;
+CCD6;CCD6;110E 1167 11AD;CCD6;110E 1167 11AD;
+CCD7;CCD7;110E 1167 11AE;CCD7;110E 1167 11AE;
+CCD8;CCD8;110E 1167 11AF;CCD8;110E 1167 11AF;
+CCD9;CCD9;110E 1167 11B0;CCD9;110E 1167 11B0;
+CCDA;CCDA;110E 1167 11B1;CCDA;110E 1167 11B1;
+CCDB;CCDB;110E 1167 11B2;CCDB;110E 1167 11B2;
+CCDC;CCDC;110E 1167 11B3;CCDC;110E 1167 11B3;
+CCDD;CCDD;110E 1167 11B4;CCDD;110E 1167 11B4;
+CCDE;CCDE;110E 1167 11B5;CCDE;110E 1167 11B5;
+CCDF;CCDF;110E 1167 11B6;CCDF;110E 1167 11B6;
+CCE0;CCE0;110E 1167 11B7;CCE0;110E 1167 11B7;
+CCE1;CCE1;110E 1167 11B8;CCE1;110E 1167 11B8;
+CCE2;CCE2;110E 1167 11B9;CCE2;110E 1167 11B9;
+CCE3;CCE3;110E 1167 11BA;CCE3;110E 1167 11BA;
+CCE4;CCE4;110E 1167 11BB;CCE4;110E 1167 11BB;
+CCE5;CCE5;110E 1167 11BC;CCE5;110E 1167 11BC;
+CCE6;CCE6;110E 1167 11BD;CCE6;110E 1167 11BD;
+CCE7;CCE7;110E 1167 11BE;CCE7;110E 1167 11BE;
+CCE8;CCE8;110E 1167 11BF;CCE8;110E 1167 11BF;
+CCE9;CCE9;110E 1167 11C0;CCE9;110E 1167 11C0;
+CCEA;CCEA;110E 1167 11C1;CCEA;110E 1167 11C1;
+CCEB;CCEB;110E 1167 11C2;CCEB;110E 1167 11C2;
+CCEC;CCEC;110E 1168;CCEC;110E 1168;
+CCED;CCED;110E 1168 11A8;CCED;110E 1168 11A8;
+CCEE;CCEE;110E 1168 11A9;CCEE;110E 1168 11A9;
+CCEF;CCEF;110E 1168 11AA;CCEF;110E 1168 11AA;
+CCF0;CCF0;110E 1168 11AB;CCF0;110E 1168 11AB;
+CCF1;CCF1;110E 1168 11AC;CCF1;110E 1168 11AC;
+CCF2;CCF2;110E 1168 11AD;CCF2;110E 1168 11AD;
+CCF3;CCF3;110E 1168 11AE;CCF3;110E 1168 11AE;
+CCF4;CCF4;110E 1168 11AF;CCF4;110E 1168 11AF;
+CCF5;CCF5;110E 1168 11B0;CCF5;110E 1168 11B0;
+CCF6;CCF6;110E 1168 11B1;CCF6;110E 1168 11B1;
+CCF7;CCF7;110E 1168 11B2;CCF7;110E 1168 11B2;
+CCF8;CCF8;110E 1168 11B3;CCF8;110E 1168 11B3;
+CCF9;CCF9;110E 1168 11B4;CCF9;110E 1168 11B4;
+CCFA;CCFA;110E 1168 11B5;CCFA;110E 1168 11B5;
+CCFB;CCFB;110E 1168 11B6;CCFB;110E 1168 11B6;
+CCFC;CCFC;110E 1168 11B7;CCFC;110E 1168 11B7;
+CCFD;CCFD;110E 1168 11B8;CCFD;110E 1168 11B8;
+CCFE;CCFE;110E 1168 11B9;CCFE;110E 1168 11B9;
+CCFF;CCFF;110E 1168 11BA;CCFF;110E 1168 11BA;
+CD00;CD00;110E 1168 11BB;CD00;110E 1168 11BB;
+CD01;CD01;110E 1168 11BC;CD01;110E 1168 11BC;
+CD02;CD02;110E 1168 11BD;CD02;110E 1168 11BD;
+CD03;CD03;110E 1168 11BE;CD03;110E 1168 11BE;
+CD04;CD04;110E 1168 11BF;CD04;110E 1168 11BF;
+CD05;CD05;110E 1168 11C0;CD05;110E 1168 11C0;
+CD06;CD06;110E 1168 11C1;CD06;110E 1168 11C1;
+CD07;CD07;110E 1168 11C2;CD07;110E 1168 11C2;
+CD08;CD08;110E 1169;CD08;110E 1169;
+CD09;CD09;110E 1169 11A8;CD09;110E 1169 11A8;
+CD0A;CD0A;110E 1169 11A9;CD0A;110E 1169 11A9;
+CD0B;CD0B;110E 1169 11AA;CD0B;110E 1169 11AA;
+CD0C;CD0C;110E 1169 11AB;CD0C;110E 1169 11AB;
+CD0D;CD0D;110E 1169 11AC;CD0D;110E 1169 11AC;
+CD0E;CD0E;110E 1169 11AD;CD0E;110E 1169 11AD;
+CD0F;CD0F;110E 1169 11AE;CD0F;110E 1169 11AE;
+CD10;CD10;110E 1169 11AF;CD10;110E 1169 11AF;
+CD11;CD11;110E 1169 11B0;CD11;110E 1169 11B0;
+CD12;CD12;110E 1169 11B1;CD12;110E 1169 11B1;
+CD13;CD13;110E 1169 11B2;CD13;110E 1169 11B2;
+CD14;CD14;110E 1169 11B3;CD14;110E 1169 11B3;
+CD15;CD15;110E 1169 11B4;CD15;110E 1169 11B4;
+CD16;CD16;110E 1169 11B5;CD16;110E 1169 11B5;
+CD17;CD17;110E 1169 11B6;CD17;110E 1169 11B6;
+CD18;CD18;110E 1169 11B7;CD18;110E 1169 11B7;
+CD19;CD19;110E 1169 11B8;CD19;110E 1169 11B8;
+CD1A;CD1A;110E 1169 11B9;CD1A;110E 1169 11B9;
+CD1B;CD1B;110E 1169 11BA;CD1B;110E 1169 11BA;
+CD1C;CD1C;110E 1169 11BB;CD1C;110E 1169 11BB;
+CD1D;CD1D;110E 1169 11BC;CD1D;110E 1169 11BC;
+CD1E;CD1E;110E 1169 11BD;CD1E;110E 1169 11BD;
+CD1F;CD1F;110E 1169 11BE;CD1F;110E 1169 11BE;
+CD20;CD20;110E 1169 11BF;CD20;110E 1169 11BF;
+CD21;CD21;110E 1169 11C0;CD21;110E 1169 11C0;
+CD22;CD22;110E 1169 11C1;CD22;110E 1169 11C1;
+CD23;CD23;110E 1169 11C2;CD23;110E 1169 11C2;
+CD24;CD24;110E 116A;CD24;110E 116A;
+CD25;CD25;110E 116A 11A8;CD25;110E 116A 11A8;
+CD26;CD26;110E 116A 11A9;CD26;110E 116A 11A9;
+CD27;CD27;110E 116A 11AA;CD27;110E 116A 11AA;
+CD28;CD28;110E 116A 11AB;CD28;110E 116A 11AB;
+CD29;CD29;110E 116A 11AC;CD29;110E 116A 11AC;
+CD2A;CD2A;110E 116A 11AD;CD2A;110E 116A 11AD;
+CD2B;CD2B;110E 116A 11AE;CD2B;110E 116A 11AE;
+CD2C;CD2C;110E 116A 11AF;CD2C;110E 116A 11AF;
+CD2D;CD2D;110E 116A 11B0;CD2D;110E 116A 11B0;
+CD2E;CD2E;110E 116A 11B1;CD2E;110E 116A 11B1;
+CD2F;CD2F;110E 116A 11B2;CD2F;110E 116A 11B2;
+CD30;CD30;110E 116A 11B3;CD30;110E 116A 11B3;
+CD31;CD31;110E 116A 11B4;CD31;110E 116A 11B4;
+CD32;CD32;110E 116A 11B5;CD32;110E 116A 11B5;
+CD33;CD33;110E 116A 11B6;CD33;110E 116A 11B6;
+CD34;CD34;110E 116A 11B7;CD34;110E 116A 11B7;
+CD35;CD35;110E 116A 11B8;CD35;110E 116A 11B8;
+CD36;CD36;110E 116A 11B9;CD36;110E 116A 11B9;
+CD37;CD37;110E 116A 11BA;CD37;110E 116A 11BA;
+CD38;CD38;110E 116A 11BB;CD38;110E 116A 11BB;
+CD39;CD39;110E 116A 11BC;CD39;110E 116A 11BC;
+CD3A;CD3A;110E 116A 11BD;CD3A;110E 116A 11BD;
+CD3B;CD3B;110E 116A 11BE;CD3B;110E 116A 11BE;
+CD3C;CD3C;110E 116A 11BF;CD3C;110E 116A 11BF;
+CD3D;CD3D;110E 116A 11C0;CD3D;110E 116A 11C0;
+CD3E;CD3E;110E 116A 11C1;CD3E;110E 116A 11C1;
+CD3F;CD3F;110E 116A 11C2;CD3F;110E 116A 11C2;
+CD40;CD40;110E 116B;CD40;110E 116B;
+CD41;CD41;110E 116B 11A8;CD41;110E 116B 11A8;
+CD42;CD42;110E 116B 11A9;CD42;110E 116B 11A9;
+CD43;CD43;110E 116B 11AA;CD43;110E 116B 11AA;
+CD44;CD44;110E 116B 11AB;CD44;110E 116B 11AB;
+CD45;CD45;110E 116B 11AC;CD45;110E 116B 11AC;
+CD46;CD46;110E 116B 11AD;CD46;110E 116B 11AD;
+CD47;CD47;110E 116B 11AE;CD47;110E 116B 11AE;
+CD48;CD48;110E 116B 11AF;CD48;110E 116B 11AF;
+CD49;CD49;110E 116B 11B0;CD49;110E 116B 11B0;
+CD4A;CD4A;110E 116B 11B1;CD4A;110E 116B 11B1;
+CD4B;CD4B;110E 116B 11B2;CD4B;110E 116B 11B2;
+CD4C;CD4C;110E 116B 11B3;CD4C;110E 116B 11B3;
+CD4D;CD4D;110E 116B 11B4;CD4D;110E 116B 11B4;
+CD4E;CD4E;110E 116B 11B5;CD4E;110E 116B 11B5;
+CD4F;CD4F;110E 116B 11B6;CD4F;110E 116B 11B6;
+CD50;CD50;110E 116B 11B7;CD50;110E 116B 11B7;
+CD51;CD51;110E 116B 11B8;CD51;110E 116B 11B8;
+CD52;CD52;110E 116B 11B9;CD52;110E 116B 11B9;
+CD53;CD53;110E 116B 11BA;CD53;110E 116B 11BA;
+CD54;CD54;110E 116B 11BB;CD54;110E 116B 11BB;
+CD55;CD55;110E 116B 11BC;CD55;110E 116B 11BC;
+CD56;CD56;110E 116B 11BD;CD56;110E 116B 11BD;
+CD57;CD57;110E 116B 11BE;CD57;110E 116B 11BE;
+CD58;CD58;110E 116B 11BF;CD58;110E 116B 11BF;
+CD59;CD59;110E 116B 11C0;CD59;110E 116B 11C0;
+CD5A;CD5A;110E 116B 11C1;CD5A;110E 116B 11C1;
+CD5B;CD5B;110E 116B 11C2;CD5B;110E 116B 11C2;
+CD5C;CD5C;110E 116C;CD5C;110E 116C;
+CD5D;CD5D;110E 116C 11A8;CD5D;110E 116C 11A8;
+CD5E;CD5E;110E 116C 11A9;CD5E;110E 116C 11A9;
+CD5F;CD5F;110E 116C 11AA;CD5F;110E 116C 11AA;
+CD60;CD60;110E 116C 11AB;CD60;110E 116C 11AB;
+CD61;CD61;110E 116C 11AC;CD61;110E 116C 11AC;
+CD62;CD62;110E 116C 11AD;CD62;110E 116C 11AD;
+CD63;CD63;110E 116C 11AE;CD63;110E 116C 11AE;
+CD64;CD64;110E 116C 11AF;CD64;110E 116C 11AF;
+CD65;CD65;110E 116C 11B0;CD65;110E 116C 11B0;
+CD66;CD66;110E 116C 11B1;CD66;110E 116C 11B1;
+CD67;CD67;110E 116C 11B2;CD67;110E 116C 11B2;
+CD68;CD68;110E 116C 11B3;CD68;110E 116C 11B3;
+CD69;CD69;110E 116C 11B4;CD69;110E 116C 11B4;
+CD6A;CD6A;110E 116C 11B5;CD6A;110E 116C 11B5;
+CD6B;CD6B;110E 116C 11B6;CD6B;110E 116C 11B6;
+CD6C;CD6C;110E 116C 11B7;CD6C;110E 116C 11B7;
+CD6D;CD6D;110E 116C 11B8;CD6D;110E 116C 11B8;
+CD6E;CD6E;110E 116C 11B9;CD6E;110E 116C 11B9;
+CD6F;CD6F;110E 116C 11BA;CD6F;110E 116C 11BA;
+CD70;CD70;110E 116C 11BB;CD70;110E 116C 11BB;
+CD71;CD71;110E 116C 11BC;CD71;110E 116C 11BC;
+CD72;CD72;110E 116C 11BD;CD72;110E 116C 11BD;
+CD73;CD73;110E 116C 11BE;CD73;110E 116C 11BE;
+CD74;CD74;110E 116C 11BF;CD74;110E 116C 11BF;
+CD75;CD75;110E 116C 11C0;CD75;110E 116C 11C0;
+CD76;CD76;110E 116C 11C1;CD76;110E 116C 11C1;
+CD77;CD77;110E 116C 11C2;CD77;110E 116C 11C2;
+CD78;CD78;110E 116D;CD78;110E 116D;
+CD79;CD79;110E 116D 11A8;CD79;110E 116D 11A8;
+CD7A;CD7A;110E 116D 11A9;CD7A;110E 116D 11A9;
+CD7B;CD7B;110E 116D 11AA;CD7B;110E 116D 11AA;
+CD7C;CD7C;110E 116D 11AB;CD7C;110E 116D 11AB;
+CD7D;CD7D;110E 116D 11AC;CD7D;110E 116D 11AC;
+CD7E;CD7E;110E 116D 11AD;CD7E;110E 116D 11AD;
+CD7F;CD7F;110E 116D 11AE;CD7F;110E 116D 11AE;
+CD80;CD80;110E 116D 11AF;CD80;110E 116D 11AF;
+CD81;CD81;110E 116D 11B0;CD81;110E 116D 11B0;
+CD82;CD82;110E 116D 11B1;CD82;110E 116D 11B1;
+CD83;CD83;110E 116D 11B2;CD83;110E 116D 11B2;
+CD84;CD84;110E 116D 11B3;CD84;110E 116D 11B3;
+CD85;CD85;110E 116D 11B4;CD85;110E 116D 11B4;
+CD86;CD86;110E 116D 11B5;CD86;110E 116D 11B5;
+CD87;CD87;110E 116D 11B6;CD87;110E 116D 11B6;
+CD88;CD88;110E 116D 11B7;CD88;110E 116D 11B7;
+CD89;CD89;110E 116D 11B8;CD89;110E 116D 11B8;
+CD8A;CD8A;110E 116D 11B9;CD8A;110E 116D 11B9;
+CD8B;CD8B;110E 116D 11BA;CD8B;110E 116D 11BA;
+CD8C;CD8C;110E 116D 11BB;CD8C;110E 116D 11BB;
+CD8D;CD8D;110E 116D 11BC;CD8D;110E 116D 11BC;
+CD8E;CD8E;110E 116D 11BD;CD8E;110E 116D 11BD;
+CD8F;CD8F;110E 116D 11BE;CD8F;110E 116D 11BE;
+CD90;CD90;110E 116D 11BF;CD90;110E 116D 11BF;
+CD91;CD91;110E 116D 11C0;CD91;110E 116D 11C0;
+CD92;CD92;110E 116D 11C1;CD92;110E 116D 11C1;
+CD93;CD93;110E 116D 11C2;CD93;110E 116D 11C2;
+CD94;CD94;110E 116E;CD94;110E 116E;
+CD95;CD95;110E 116E 11A8;CD95;110E 116E 11A8;
+CD96;CD96;110E 116E 11A9;CD96;110E 116E 11A9;
+CD97;CD97;110E 116E 11AA;CD97;110E 116E 11AA;
+CD98;CD98;110E 116E 11AB;CD98;110E 116E 11AB;
+CD99;CD99;110E 116E 11AC;CD99;110E 116E 11AC;
+CD9A;CD9A;110E 116E 11AD;CD9A;110E 116E 11AD;
+CD9B;CD9B;110E 116E 11AE;CD9B;110E 116E 11AE;
+CD9C;CD9C;110E 116E 11AF;CD9C;110E 116E 11AF;
+CD9D;CD9D;110E 116E 11B0;CD9D;110E 116E 11B0;
+CD9E;CD9E;110E 116E 11B1;CD9E;110E 116E 11B1;
+CD9F;CD9F;110E 116E 11B2;CD9F;110E 116E 11B2;
+CDA0;CDA0;110E 116E 11B3;CDA0;110E 116E 11B3;
+CDA1;CDA1;110E 116E 11B4;CDA1;110E 116E 11B4;
+CDA2;CDA2;110E 116E 11B5;CDA2;110E 116E 11B5;
+CDA3;CDA3;110E 116E 11B6;CDA3;110E 116E 11B6;
+CDA4;CDA4;110E 116E 11B7;CDA4;110E 116E 11B7;
+CDA5;CDA5;110E 116E 11B8;CDA5;110E 116E 11B8;
+CDA6;CDA6;110E 116E 11B9;CDA6;110E 116E 11B9;
+CDA7;CDA7;110E 116E 11BA;CDA7;110E 116E 11BA;
+CDA8;CDA8;110E 116E 11BB;CDA8;110E 116E 11BB;
+CDA9;CDA9;110E 116E 11BC;CDA9;110E 116E 11BC;
+CDAA;CDAA;110E 116E 11BD;CDAA;110E 116E 11BD;
+CDAB;CDAB;110E 116E 11BE;CDAB;110E 116E 11BE;
+CDAC;CDAC;110E 116E 11BF;CDAC;110E 116E 11BF;
+CDAD;CDAD;110E 116E 11C0;CDAD;110E 116E 11C0;
+CDAE;CDAE;110E 116E 11C1;CDAE;110E 116E 11C1;
+CDAF;CDAF;110E 116E 11C2;CDAF;110E 116E 11C2;
+CDB0;CDB0;110E 116F;CDB0;110E 116F;
+CDB1;CDB1;110E 116F 11A8;CDB1;110E 116F 11A8;
+CDB2;CDB2;110E 116F 11A9;CDB2;110E 116F 11A9;
+CDB3;CDB3;110E 116F 11AA;CDB3;110E 116F 11AA;
+CDB4;CDB4;110E 116F 11AB;CDB4;110E 116F 11AB;
+CDB5;CDB5;110E 116F 11AC;CDB5;110E 116F 11AC;
+CDB6;CDB6;110E 116F 11AD;CDB6;110E 116F 11AD;
+CDB7;CDB7;110E 116F 11AE;CDB7;110E 116F 11AE;
+CDB8;CDB8;110E 116F 11AF;CDB8;110E 116F 11AF;
+CDB9;CDB9;110E 116F 11B0;CDB9;110E 116F 11B0;
+CDBA;CDBA;110E 116F 11B1;CDBA;110E 116F 11B1;
+CDBB;CDBB;110E 116F 11B2;CDBB;110E 116F 11B2;
+CDBC;CDBC;110E 116F 11B3;CDBC;110E 116F 11B3;
+CDBD;CDBD;110E 116F 11B4;CDBD;110E 116F 11B4;
+CDBE;CDBE;110E 116F 11B5;CDBE;110E 116F 11B5;
+CDBF;CDBF;110E 116F 11B6;CDBF;110E 116F 11B6;
+CDC0;CDC0;110E 116F 11B7;CDC0;110E 116F 11B7;
+CDC1;CDC1;110E 116F 11B8;CDC1;110E 116F 11B8;
+CDC2;CDC2;110E 116F 11B9;CDC2;110E 116F 11B9;
+CDC3;CDC3;110E 116F 11BA;CDC3;110E 116F 11BA;
+CDC4;CDC4;110E 116F 11BB;CDC4;110E 116F 11BB;
+CDC5;CDC5;110E 116F 11BC;CDC5;110E 116F 11BC;
+CDC6;CDC6;110E 116F 11BD;CDC6;110E 116F 11BD;
+CDC7;CDC7;110E 116F 11BE;CDC7;110E 116F 11BE;
+CDC8;CDC8;110E 116F 11BF;CDC8;110E 116F 11BF;
+CDC9;CDC9;110E 116F 11C0;CDC9;110E 116F 11C0;
+CDCA;CDCA;110E 116F 11C1;CDCA;110E 116F 11C1;
+CDCB;CDCB;110E 116F 11C2;CDCB;110E 116F 11C2;
+CDCC;CDCC;110E 1170;CDCC;110E 1170;
+CDCD;CDCD;110E 1170 11A8;CDCD;110E 1170 11A8;
+CDCE;CDCE;110E 1170 11A9;CDCE;110E 1170 11A9;
+CDCF;CDCF;110E 1170 11AA;CDCF;110E 1170 11AA;
+CDD0;CDD0;110E 1170 11AB;CDD0;110E 1170 11AB;
+CDD1;CDD1;110E 1170 11AC;CDD1;110E 1170 11AC;
+CDD2;CDD2;110E 1170 11AD;CDD2;110E 1170 11AD;
+CDD3;CDD3;110E 1170 11AE;CDD3;110E 1170 11AE;
+CDD4;CDD4;110E 1170 11AF;CDD4;110E 1170 11AF;
+CDD5;CDD5;110E 1170 11B0;CDD5;110E 1170 11B0;
+CDD6;CDD6;110E 1170 11B1;CDD6;110E 1170 11B1;
+CDD7;CDD7;110E 1170 11B2;CDD7;110E 1170 11B2;
+CDD8;CDD8;110E 1170 11B3;CDD8;110E 1170 11B3;
+CDD9;CDD9;110E 1170 11B4;CDD9;110E 1170 11B4;
+CDDA;CDDA;110E 1170 11B5;CDDA;110E 1170 11B5;
+CDDB;CDDB;110E 1170 11B6;CDDB;110E 1170 11B6;
+CDDC;CDDC;110E 1170 11B7;CDDC;110E 1170 11B7;
+CDDD;CDDD;110E 1170 11B8;CDDD;110E 1170 11B8;
+CDDE;CDDE;110E 1170 11B9;CDDE;110E 1170 11B9;
+CDDF;CDDF;110E 1170 11BA;CDDF;110E 1170 11BA;
+CDE0;CDE0;110E 1170 11BB;CDE0;110E 1170 11BB;
+CDE1;CDE1;110E 1170 11BC;CDE1;110E 1170 11BC;
+CDE2;CDE2;110E 1170 11BD;CDE2;110E 1170 11BD;
+CDE3;CDE3;110E 1170 11BE;CDE3;110E 1170 11BE;
+CDE4;CDE4;110E 1170 11BF;CDE4;110E 1170 11BF;
+CDE5;CDE5;110E 1170 11C0;CDE5;110E 1170 11C0;
+CDE6;CDE6;110E 1170 11C1;CDE6;110E 1170 11C1;
+CDE7;CDE7;110E 1170 11C2;CDE7;110E 1170 11C2;
+CDE8;CDE8;110E 1171;CDE8;110E 1171;
+CDE9;CDE9;110E 1171 11A8;CDE9;110E 1171 11A8;
+CDEA;CDEA;110E 1171 11A9;CDEA;110E 1171 11A9;
+CDEB;CDEB;110E 1171 11AA;CDEB;110E 1171 11AA;
+CDEC;CDEC;110E 1171 11AB;CDEC;110E 1171 11AB;
+CDED;CDED;110E 1171 11AC;CDED;110E 1171 11AC;
+CDEE;CDEE;110E 1171 11AD;CDEE;110E 1171 11AD;
+CDEF;CDEF;110E 1171 11AE;CDEF;110E 1171 11AE;
+CDF0;CDF0;110E 1171 11AF;CDF0;110E 1171 11AF;
+CDF1;CDF1;110E 1171 11B0;CDF1;110E 1171 11B0;
+CDF2;CDF2;110E 1171 11B1;CDF2;110E 1171 11B1;
+CDF3;CDF3;110E 1171 11B2;CDF3;110E 1171 11B2;
+CDF4;CDF4;110E 1171 11B3;CDF4;110E 1171 11B3;
+CDF5;CDF5;110E 1171 11B4;CDF5;110E 1171 11B4;
+CDF6;CDF6;110E 1171 11B5;CDF6;110E 1171 11B5;
+CDF7;CDF7;110E 1171 11B6;CDF7;110E 1171 11B6;
+CDF8;CDF8;110E 1171 11B7;CDF8;110E 1171 11B7;
+CDF9;CDF9;110E 1171 11B8;CDF9;110E 1171 11B8;
+CDFA;CDFA;110E 1171 11B9;CDFA;110E 1171 11B9;
+CDFB;CDFB;110E 1171 11BA;CDFB;110E 1171 11BA;
+CDFC;CDFC;110E 1171 11BB;CDFC;110E 1171 11BB;
+CDFD;CDFD;110E 1171 11BC;CDFD;110E 1171 11BC;
+CDFE;CDFE;110E 1171 11BD;CDFE;110E 1171 11BD;
+CDFF;CDFF;110E 1171 11BE;CDFF;110E 1171 11BE;
+CE00;CE00;110E 1171 11BF;CE00;110E 1171 11BF;
+CE01;CE01;110E 1171 11C0;CE01;110E 1171 11C0;
+CE02;CE02;110E 1171 11C1;CE02;110E 1171 11C1;
+CE03;CE03;110E 1171 11C2;CE03;110E 1171 11C2;
+CE04;CE04;110E 1172;CE04;110E 1172;
+CE05;CE05;110E 1172 11A8;CE05;110E 1172 11A8;
+CE06;CE06;110E 1172 11A9;CE06;110E 1172 11A9;
+CE07;CE07;110E 1172 11AA;CE07;110E 1172 11AA;
+CE08;CE08;110E 1172 11AB;CE08;110E 1172 11AB;
+CE09;CE09;110E 1172 11AC;CE09;110E 1172 11AC;
+CE0A;CE0A;110E 1172 11AD;CE0A;110E 1172 11AD;
+CE0B;CE0B;110E 1172 11AE;CE0B;110E 1172 11AE;
+CE0C;CE0C;110E 1172 11AF;CE0C;110E 1172 11AF;
+CE0D;CE0D;110E 1172 11B0;CE0D;110E 1172 11B0;
+CE0E;CE0E;110E 1172 11B1;CE0E;110E 1172 11B1;
+CE0F;CE0F;110E 1172 11B2;CE0F;110E 1172 11B2;
+CE10;CE10;110E 1172 11B3;CE10;110E 1172 11B3;
+CE11;CE11;110E 1172 11B4;CE11;110E 1172 11B4;
+CE12;CE12;110E 1172 11B5;CE12;110E 1172 11B5;
+CE13;CE13;110E 1172 11B6;CE13;110E 1172 11B6;
+CE14;CE14;110E 1172 11B7;CE14;110E 1172 11B7;
+CE15;CE15;110E 1172 11B8;CE15;110E 1172 11B8;
+CE16;CE16;110E 1172 11B9;CE16;110E 1172 11B9;
+CE17;CE17;110E 1172 11BA;CE17;110E 1172 11BA;
+CE18;CE18;110E 1172 11BB;CE18;110E 1172 11BB;
+CE19;CE19;110E 1172 11BC;CE19;110E 1172 11BC;
+CE1A;CE1A;110E 1172 11BD;CE1A;110E 1172 11BD;
+CE1B;CE1B;110E 1172 11BE;CE1B;110E 1172 11BE;
+CE1C;CE1C;110E 1172 11BF;CE1C;110E 1172 11BF;
+CE1D;CE1D;110E 1172 11C0;CE1D;110E 1172 11C0;
+CE1E;CE1E;110E 1172 11C1;CE1E;110E 1172 11C1;
+CE1F;CE1F;110E 1172 11C2;CE1F;110E 1172 11C2;
+CE20;CE20;110E 1173;CE20;110E 1173;
+CE21;CE21;110E 1173 11A8;CE21;110E 1173 11A8;
+CE22;CE22;110E 1173 11A9;CE22;110E 1173 11A9;
+CE23;CE23;110E 1173 11AA;CE23;110E 1173 11AA;
+CE24;CE24;110E 1173 11AB;CE24;110E 1173 11AB;
+CE25;CE25;110E 1173 11AC;CE25;110E 1173 11AC;
+CE26;CE26;110E 1173 11AD;CE26;110E 1173 11AD;
+CE27;CE27;110E 1173 11AE;CE27;110E 1173 11AE;
+CE28;CE28;110E 1173 11AF;CE28;110E 1173 11AF;
+CE29;CE29;110E 1173 11B0;CE29;110E 1173 11B0;
+CE2A;CE2A;110E 1173 11B1;CE2A;110E 1173 11B1;
+CE2B;CE2B;110E 1173 11B2;CE2B;110E 1173 11B2;
+CE2C;CE2C;110E 1173 11B3;CE2C;110E 1173 11B3;
+CE2D;CE2D;110E 1173 11B4;CE2D;110E 1173 11B4;
+CE2E;CE2E;110E 1173 11B5;CE2E;110E 1173 11B5;
+CE2F;CE2F;110E 1173 11B6;CE2F;110E 1173 11B6;
+CE30;CE30;110E 1173 11B7;CE30;110E 1173 11B7;
+CE31;CE31;110E 1173 11B8;CE31;110E 1173 11B8;
+CE32;CE32;110E 1173 11B9;CE32;110E 1173 11B9;
+CE33;CE33;110E 1173 11BA;CE33;110E 1173 11BA;
+CE34;CE34;110E 1173 11BB;CE34;110E 1173 11BB;
+CE35;CE35;110E 1173 11BC;CE35;110E 1173 11BC;
+CE36;CE36;110E 1173 11BD;CE36;110E 1173 11BD;
+CE37;CE37;110E 1173 11BE;CE37;110E 1173 11BE;
+CE38;CE38;110E 1173 11BF;CE38;110E 1173 11BF;
+CE39;CE39;110E 1173 11C0;CE39;110E 1173 11C0;
+CE3A;CE3A;110E 1173 11C1;CE3A;110E 1173 11C1;
+CE3B;CE3B;110E 1173 11C2;CE3B;110E 1173 11C2;
+CE3C;CE3C;110E 1174;CE3C;110E 1174;
+CE3D;CE3D;110E 1174 11A8;CE3D;110E 1174 11A8;
+CE3E;CE3E;110E 1174 11A9;CE3E;110E 1174 11A9;
+CE3F;CE3F;110E 1174 11AA;CE3F;110E 1174 11AA;
+CE40;CE40;110E 1174 11AB;CE40;110E 1174 11AB;
+CE41;CE41;110E 1174 11AC;CE41;110E 1174 11AC;
+CE42;CE42;110E 1174 11AD;CE42;110E 1174 11AD;
+CE43;CE43;110E 1174 11AE;CE43;110E 1174 11AE;
+CE44;CE44;110E 1174 11AF;CE44;110E 1174 11AF;
+CE45;CE45;110E 1174 11B0;CE45;110E 1174 11B0;
+CE46;CE46;110E 1174 11B1;CE46;110E 1174 11B1;
+CE47;CE47;110E 1174 11B2;CE47;110E 1174 11B2;
+CE48;CE48;110E 1174 11B3;CE48;110E 1174 11B3;
+CE49;CE49;110E 1174 11B4;CE49;110E 1174 11B4;
+CE4A;CE4A;110E 1174 11B5;CE4A;110E 1174 11B5;
+CE4B;CE4B;110E 1174 11B6;CE4B;110E 1174 11B6;
+CE4C;CE4C;110E 1174 11B7;CE4C;110E 1174 11B7;
+CE4D;CE4D;110E 1174 11B8;CE4D;110E 1174 11B8;
+CE4E;CE4E;110E 1174 11B9;CE4E;110E 1174 11B9;
+CE4F;CE4F;110E 1174 11BA;CE4F;110E 1174 11BA;
+CE50;CE50;110E 1174 11BB;CE50;110E 1174 11BB;
+CE51;CE51;110E 1174 11BC;CE51;110E 1174 11BC;
+CE52;CE52;110E 1174 11BD;CE52;110E 1174 11BD;
+CE53;CE53;110E 1174 11BE;CE53;110E 1174 11BE;
+CE54;CE54;110E 1174 11BF;CE54;110E 1174 11BF;
+CE55;CE55;110E 1174 11C0;CE55;110E 1174 11C0;
+CE56;CE56;110E 1174 11C1;CE56;110E 1174 11C1;
+CE57;CE57;110E 1174 11C2;CE57;110E 1174 11C2;
+CE58;CE58;110E 1175;CE58;110E 1175;
+CE59;CE59;110E 1175 11A8;CE59;110E 1175 11A8;
+CE5A;CE5A;110E 1175 11A9;CE5A;110E 1175 11A9;
+CE5B;CE5B;110E 1175 11AA;CE5B;110E 1175 11AA;
+CE5C;CE5C;110E 1175 11AB;CE5C;110E 1175 11AB;
+CE5D;CE5D;110E 1175 11AC;CE5D;110E 1175 11AC;
+CE5E;CE5E;110E 1175 11AD;CE5E;110E 1175 11AD;
+CE5F;CE5F;110E 1175 11AE;CE5F;110E 1175 11AE;
+CE60;CE60;110E 1175 11AF;CE60;110E 1175 11AF;
+CE61;CE61;110E 1175 11B0;CE61;110E 1175 11B0;
+CE62;CE62;110E 1175 11B1;CE62;110E 1175 11B1;
+CE63;CE63;110E 1175 11B2;CE63;110E 1175 11B2;
+CE64;CE64;110E 1175 11B3;CE64;110E 1175 11B3;
+CE65;CE65;110E 1175 11B4;CE65;110E 1175 11B4;
+CE66;CE66;110E 1175 11B5;CE66;110E 1175 11B5;
+CE67;CE67;110E 1175 11B6;CE67;110E 1175 11B6;
+CE68;CE68;110E 1175 11B7;CE68;110E 1175 11B7;
+CE69;CE69;110E 1175 11B8;CE69;110E 1175 11B8;
+CE6A;CE6A;110E 1175 11B9;CE6A;110E 1175 11B9;
+CE6B;CE6B;110E 1175 11BA;CE6B;110E 1175 11BA;
+CE6C;CE6C;110E 1175 11BB;CE6C;110E 1175 11BB;
+CE6D;CE6D;110E 1175 11BC;CE6D;110E 1175 11BC;
+CE6E;CE6E;110E 1175 11BD;CE6E;110E 1175 11BD;
+CE6F;CE6F;110E 1175 11BE;CE6F;110E 1175 11BE;
+CE70;CE70;110E 1175 11BF;CE70;110E 1175 11BF;
+CE71;CE71;110E 1175 11C0;CE71;110E 1175 11C0;
+CE72;CE72;110E 1175 11C1;CE72;110E 1175 11C1;
+CE73;CE73;110E 1175 11C2;CE73;110E 1175 11C2;
+CE74;CE74;110F 1161;CE74;110F 1161;
+CE75;CE75;110F 1161 11A8;CE75;110F 1161 11A8;
+CE76;CE76;110F 1161 11A9;CE76;110F 1161 11A9;
+CE77;CE77;110F 1161 11AA;CE77;110F 1161 11AA;
+CE78;CE78;110F 1161 11AB;CE78;110F 1161 11AB;
+CE79;CE79;110F 1161 11AC;CE79;110F 1161 11AC;
+CE7A;CE7A;110F 1161 11AD;CE7A;110F 1161 11AD;
+CE7B;CE7B;110F 1161 11AE;CE7B;110F 1161 11AE;
+CE7C;CE7C;110F 1161 11AF;CE7C;110F 1161 11AF;
+CE7D;CE7D;110F 1161 11B0;CE7D;110F 1161 11B0;
+CE7E;CE7E;110F 1161 11B1;CE7E;110F 1161 11B1;
+CE7F;CE7F;110F 1161 11B2;CE7F;110F 1161 11B2;
+CE80;CE80;110F 1161 11B3;CE80;110F 1161 11B3;
+CE81;CE81;110F 1161 11B4;CE81;110F 1161 11B4;
+CE82;CE82;110F 1161 11B5;CE82;110F 1161 11B5;
+CE83;CE83;110F 1161 11B6;CE83;110F 1161 11B6;
+CE84;CE84;110F 1161 11B7;CE84;110F 1161 11B7;
+CE85;CE85;110F 1161 11B8;CE85;110F 1161 11B8;
+CE86;CE86;110F 1161 11B9;CE86;110F 1161 11B9;
+CE87;CE87;110F 1161 11BA;CE87;110F 1161 11BA;
+CE88;CE88;110F 1161 11BB;CE88;110F 1161 11BB;
+CE89;CE89;110F 1161 11BC;CE89;110F 1161 11BC;
+CE8A;CE8A;110F 1161 11BD;CE8A;110F 1161 11BD;
+CE8B;CE8B;110F 1161 11BE;CE8B;110F 1161 11BE;
+CE8C;CE8C;110F 1161 11BF;CE8C;110F 1161 11BF;
+CE8D;CE8D;110F 1161 11C0;CE8D;110F 1161 11C0;
+CE8E;CE8E;110F 1161 11C1;CE8E;110F 1161 11C1;
+CE8F;CE8F;110F 1161 11C2;CE8F;110F 1161 11C2;
+CE90;CE90;110F 1162;CE90;110F 1162;
+CE91;CE91;110F 1162 11A8;CE91;110F 1162 11A8;
+CE92;CE92;110F 1162 11A9;CE92;110F 1162 11A9;
+CE93;CE93;110F 1162 11AA;CE93;110F 1162 11AA;
+CE94;CE94;110F 1162 11AB;CE94;110F 1162 11AB;
+CE95;CE95;110F 1162 11AC;CE95;110F 1162 11AC;
+CE96;CE96;110F 1162 11AD;CE96;110F 1162 11AD;
+CE97;CE97;110F 1162 11AE;CE97;110F 1162 11AE;
+CE98;CE98;110F 1162 11AF;CE98;110F 1162 11AF;
+CE99;CE99;110F 1162 11B0;CE99;110F 1162 11B0;
+CE9A;CE9A;110F 1162 11B1;CE9A;110F 1162 11B1;
+CE9B;CE9B;110F 1162 11B2;CE9B;110F 1162 11B2;
+CE9C;CE9C;110F 1162 11B3;CE9C;110F 1162 11B3;
+CE9D;CE9D;110F 1162 11B4;CE9D;110F 1162 11B4;
+CE9E;CE9E;110F 1162 11B5;CE9E;110F 1162 11B5;
+CE9F;CE9F;110F 1162 11B6;CE9F;110F 1162 11B6;
+CEA0;CEA0;110F 1162 11B7;CEA0;110F 1162 11B7;
+CEA1;CEA1;110F 1162 11B8;CEA1;110F 1162 11B8;
+CEA2;CEA2;110F 1162 11B9;CEA2;110F 1162 11B9;
+CEA3;CEA3;110F 1162 11BA;CEA3;110F 1162 11BA;
+CEA4;CEA4;110F 1162 11BB;CEA4;110F 1162 11BB;
+CEA5;CEA5;110F 1162 11BC;CEA5;110F 1162 11BC;
+CEA6;CEA6;110F 1162 11BD;CEA6;110F 1162 11BD;
+CEA7;CEA7;110F 1162 11BE;CEA7;110F 1162 11BE;
+CEA8;CEA8;110F 1162 11BF;CEA8;110F 1162 11BF;
+CEA9;CEA9;110F 1162 11C0;CEA9;110F 1162 11C0;
+CEAA;CEAA;110F 1162 11C1;CEAA;110F 1162 11C1;
+CEAB;CEAB;110F 1162 11C2;CEAB;110F 1162 11C2;
+CEAC;CEAC;110F 1163;CEAC;110F 1163;
+CEAD;CEAD;110F 1163 11A8;CEAD;110F 1163 11A8;
+CEAE;CEAE;110F 1163 11A9;CEAE;110F 1163 11A9;
+CEAF;CEAF;110F 1163 11AA;CEAF;110F 1163 11AA;
+CEB0;CEB0;110F 1163 11AB;CEB0;110F 1163 11AB;
+CEB1;CEB1;110F 1163 11AC;CEB1;110F 1163 11AC;
+CEB2;CEB2;110F 1163 11AD;CEB2;110F 1163 11AD;
+CEB3;CEB3;110F 1163 11AE;CEB3;110F 1163 11AE;
+CEB4;CEB4;110F 1163 11AF;CEB4;110F 1163 11AF;
+CEB5;CEB5;110F 1163 11B0;CEB5;110F 1163 11B0;
+CEB6;CEB6;110F 1163 11B1;CEB6;110F 1163 11B1;
+CEB7;CEB7;110F 1163 11B2;CEB7;110F 1163 11B2;
+CEB8;CEB8;110F 1163 11B3;CEB8;110F 1163 11B3;
+CEB9;CEB9;110F 1163 11B4;CEB9;110F 1163 11B4;
+CEBA;CEBA;110F 1163 11B5;CEBA;110F 1163 11B5;
+CEBB;CEBB;110F 1163 11B6;CEBB;110F 1163 11B6;
+CEBC;CEBC;110F 1163 11B7;CEBC;110F 1163 11B7;
+CEBD;CEBD;110F 1163 11B8;CEBD;110F 1163 11B8;
+CEBE;CEBE;110F 1163 11B9;CEBE;110F 1163 11B9;
+CEBF;CEBF;110F 1163 11BA;CEBF;110F 1163 11BA;
+CEC0;CEC0;110F 1163 11BB;CEC0;110F 1163 11BB;
+CEC1;CEC1;110F 1163 11BC;CEC1;110F 1163 11BC;
+CEC2;CEC2;110F 1163 11BD;CEC2;110F 1163 11BD;
+CEC3;CEC3;110F 1163 11BE;CEC3;110F 1163 11BE;
+CEC4;CEC4;110F 1163 11BF;CEC4;110F 1163 11BF;
+CEC5;CEC5;110F 1163 11C0;CEC5;110F 1163 11C0;
+CEC6;CEC6;110F 1163 11C1;CEC6;110F 1163 11C1;
+CEC7;CEC7;110F 1163 11C2;CEC7;110F 1163 11C2;
+CEC8;CEC8;110F 1164;CEC8;110F 1164;
+CEC9;CEC9;110F 1164 11A8;CEC9;110F 1164 11A8;
+CECA;CECA;110F 1164 11A9;CECA;110F 1164 11A9;
+CECB;CECB;110F 1164 11AA;CECB;110F 1164 11AA;
+CECC;CECC;110F 1164 11AB;CECC;110F 1164 11AB;
+CECD;CECD;110F 1164 11AC;CECD;110F 1164 11AC;
+CECE;CECE;110F 1164 11AD;CECE;110F 1164 11AD;
+CECF;CECF;110F 1164 11AE;CECF;110F 1164 11AE;
+CED0;CED0;110F 1164 11AF;CED0;110F 1164 11AF;
+CED1;CED1;110F 1164 11B0;CED1;110F 1164 11B0;
+CED2;CED2;110F 1164 11B1;CED2;110F 1164 11B1;
+CED3;CED3;110F 1164 11B2;CED3;110F 1164 11B2;
+CED4;CED4;110F 1164 11B3;CED4;110F 1164 11B3;
+CED5;CED5;110F 1164 11B4;CED5;110F 1164 11B4;
+CED6;CED6;110F 1164 11B5;CED6;110F 1164 11B5;
+CED7;CED7;110F 1164 11B6;CED7;110F 1164 11B6;
+CED8;CED8;110F 1164 11B7;CED8;110F 1164 11B7;
+CED9;CED9;110F 1164 11B8;CED9;110F 1164 11B8;
+CEDA;CEDA;110F 1164 11B9;CEDA;110F 1164 11B9;
+CEDB;CEDB;110F 1164 11BA;CEDB;110F 1164 11BA;
+CEDC;CEDC;110F 1164 11BB;CEDC;110F 1164 11BB;
+CEDD;CEDD;110F 1164 11BC;CEDD;110F 1164 11BC;
+CEDE;CEDE;110F 1164 11BD;CEDE;110F 1164 11BD;
+CEDF;CEDF;110F 1164 11BE;CEDF;110F 1164 11BE;
+CEE0;CEE0;110F 1164 11BF;CEE0;110F 1164 11BF;
+CEE1;CEE1;110F 1164 11C0;CEE1;110F 1164 11C0;
+CEE2;CEE2;110F 1164 11C1;CEE2;110F 1164 11C1;
+CEE3;CEE3;110F 1164 11C2;CEE3;110F 1164 11C2;
+CEE4;CEE4;110F 1165;CEE4;110F 1165;
+CEE5;CEE5;110F 1165 11A8;CEE5;110F 1165 11A8;
+CEE6;CEE6;110F 1165 11A9;CEE6;110F 1165 11A9;
+CEE7;CEE7;110F 1165 11AA;CEE7;110F 1165 11AA;
+CEE8;CEE8;110F 1165 11AB;CEE8;110F 1165 11AB;
+CEE9;CEE9;110F 1165 11AC;CEE9;110F 1165 11AC;
+CEEA;CEEA;110F 1165 11AD;CEEA;110F 1165 11AD;
+CEEB;CEEB;110F 1165 11AE;CEEB;110F 1165 11AE;
+CEEC;CEEC;110F 1165 11AF;CEEC;110F 1165 11AF;
+CEED;CEED;110F 1165 11B0;CEED;110F 1165 11B0;
+CEEE;CEEE;110F 1165 11B1;CEEE;110F 1165 11B1;
+CEEF;CEEF;110F 1165 11B2;CEEF;110F 1165 11B2;
+CEF0;CEF0;110F 1165 11B3;CEF0;110F 1165 11B3;
+CEF1;CEF1;110F 1165 11B4;CEF1;110F 1165 11B4;
+CEF2;CEF2;110F 1165 11B5;CEF2;110F 1165 11B5;
+CEF3;CEF3;110F 1165 11B6;CEF3;110F 1165 11B6;
+CEF4;CEF4;110F 1165 11B7;CEF4;110F 1165 11B7;
+CEF5;CEF5;110F 1165 11B8;CEF5;110F 1165 11B8;
+CEF6;CEF6;110F 1165 11B9;CEF6;110F 1165 11B9;
+CEF7;CEF7;110F 1165 11BA;CEF7;110F 1165 11BA;
+CEF8;CEF8;110F 1165 11BB;CEF8;110F 1165 11BB;
+CEF9;CEF9;110F 1165 11BC;CEF9;110F 1165 11BC;
+CEFA;CEFA;110F 1165 11BD;CEFA;110F 1165 11BD;
+CEFB;CEFB;110F 1165 11BE;CEFB;110F 1165 11BE;
+CEFC;CEFC;110F 1165 11BF;CEFC;110F 1165 11BF;
+CEFD;CEFD;110F 1165 11C0;CEFD;110F 1165 11C0;
+CEFE;CEFE;110F 1165 11C1;CEFE;110F 1165 11C1;
+CEFF;CEFF;110F 1165 11C2;CEFF;110F 1165 11C2;
+CF00;CF00;110F 1166;CF00;110F 1166;
+CF01;CF01;110F 1166 11A8;CF01;110F 1166 11A8;
+CF02;CF02;110F 1166 11A9;CF02;110F 1166 11A9;
+CF03;CF03;110F 1166 11AA;CF03;110F 1166 11AA;
+CF04;CF04;110F 1166 11AB;CF04;110F 1166 11AB;
+CF05;CF05;110F 1166 11AC;CF05;110F 1166 11AC;
+CF06;CF06;110F 1166 11AD;CF06;110F 1166 11AD;
+CF07;CF07;110F 1166 11AE;CF07;110F 1166 11AE;
+CF08;CF08;110F 1166 11AF;CF08;110F 1166 11AF;
+CF09;CF09;110F 1166 11B0;CF09;110F 1166 11B0;
+CF0A;CF0A;110F 1166 11B1;CF0A;110F 1166 11B1;
+CF0B;CF0B;110F 1166 11B2;CF0B;110F 1166 11B2;
+CF0C;CF0C;110F 1166 11B3;CF0C;110F 1166 11B3;
+CF0D;CF0D;110F 1166 11B4;CF0D;110F 1166 11B4;
+CF0E;CF0E;110F 1166 11B5;CF0E;110F 1166 11B5;
+CF0F;CF0F;110F 1166 11B6;CF0F;110F 1166 11B6;
+CF10;CF10;110F 1166 11B7;CF10;110F 1166 11B7;
+CF11;CF11;110F 1166 11B8;CF11;110F 1166 11B8;
+CF12;CF12;110F 1166 11B9;CF12;110F 1166 11B9;
+CF13;CF13;110F 1166 11BA;CF13;110F 1166 11BA;
+CF14;CF14;110F 1166 11BB;CF14;110F 1166 11BB;
+CF15;CF15;110F 1166 11BC;CF15;110F 1166 11BC;
+CF16;CF16;110F 1166 11BD;CF16;110F 1166 11BD;
+CF17;CF17;110F 1166 11BE;CF17;110F 1166 11BE;
+CF18;CF18;110F 1166 11BF;CF18;110F 1166 11BF;
+CF19;CF19;110F 1166 11C0;CF19;110F 1166 11C0;
+CF1A;CF1A;110F 1166 11C1;CF1A;110F 1166 11C1;
+CF1B;CF1B;110F 1166 11C2;CF1B;110F 1166 11C2;
+CF1C;CF1C;110F 1167;CF1C;110F 1167;
+CF1D;CF1D;110F 1167 11A8;CF1D;110F 1167 11A8;
+CF1E;CF1E;110F 1167 11A9;CF1E;110F 1167 11A9;
+CF1F;CF1F;110F 1167 11AA;CF1F;110F 1167 11AA;
+CF20;CF20;110F 1167 11AB;CF20;110F 1167 11AB;
+CF21;CF21;110F 1167 11AC;CF21;110F 1167 11AC;
+CF22;CF22;110F 1167 11AD;CF22;110F 1167 11AD;
+CF23;CF23;110F 1167 11AE;CF23;110F 1167 11AE;
+CF24;CF24;110F 1167 11AF;CF24;110F 1167 11AF;
+CF25;CF25;110F 1167 11B0;CF25;110F 1167 11B0;
+CF26;CF26;110F 1167 11B1;CF26;110F 1167 11B1;
+CF27;CF27;110F 1167 11B2;CF27;110F 1167 11B2;
+CF28;CF28;110F 1167 11B3;CF28;110F 1167 11B3;
+CF29;CF29;110F 1167 11B4;CF29;110F 1167 11B4;
+CF2A;CF2A;110F 1167 11B5;CF2A;110F 1167 11B5;
+CF2B;CF2B;110F 1167 11B6;CF2B;110F 1167 11B6;
+CF2C;CF2C;110F 1167 11B7;CF2C;110F 1167 11B7;
+CF2D;CF2D;110F 1167 11B8;CF2D;110F 1167 11B8;
+CF2E;CF2E;110F 1167 11B9;CF2E;110F 1167 11B9;
+CF2F;CF2F;110F 1167 11BA;CF2F;110F 1167 11BA;
+CF30;CF30;110F 1167 11BB;CF30;110F 1167 11BB;
+CF31;CF31;110F 1167 11BC;CF31;110F 1167 11BC;
+CF32;CF32;110F 1167 11BD;CF32;110F 1167 11BD;
+CF33;CF33;110F 1167 11BE;CF33;110F 1167 11BE;
+CF34;CF34;110F 1167 11BF;CF34;110F 1167 11BF;
+CF35;CF35;110F 1167 11C0;CF35;110F 1167 11C0;
+CF36;CF36;110F 1167 11C1;CF36;110F 1167 11C1;
+CF37;CF37;110F 1167 11C2;CF37;110F 1167 11C2;
+CF38;CF38;110F 1168;CF38;110F 1168;
+CF39;CF39;110F 1168 11A8;CF39;110F 1168 11A8;
+CF3A;CF3A;110F 1168 11A9;CF3A;110F 1168 11A9;
+CF3B;CF3B;110F 1168 11AA;CF3B;110F 1168 11AA;
+CF3C;CF3C;110F 1168 11AB;CF3C;110F 1168 11AB;
+CF3D;CF3D;110F 1168 11AC;CF3D;110F 1168 11AC;
+CF3E;CF3E;110F 1168 11AD;CF3E;110F 1168 11AD;
+CF3F;CF3F;110F 1168 11AE;CF3F;110F 1168 11AE;
+CF40;CF40;110F 1168 11AF;CF40;110F 1168 11AF;
+CF41;CF41;110F 1168 11B0;CF41;110F 1168 11B0;
+CF42;CF42;110F 1168 11B1;CF42;110F 1168 11B1;
+CF43;CF43;110F 1168 11B2;CF43;110F 1168 11B2;
+CF44;CF44;110F 1168 11B3;CF44;110F 1168 11B3;
+CF45;CF45;110F 1168 11B4;CF45;110F 1168 11B4;
+CF46;CF46;110F 1168 11B5;CF46;110F 1168 11B5;
+CF47;CF47;110F 1168 11B6;CF47;110F 1168 11B6;
+CF48;CF48;110F 1168 11B7;CF48;110F 1168 11B7;
+CF49;CF49;110F 1168 11B8;CF49;110F 1168 11B8;
+CF4A;CF4A;110F 1168 11B9;CF4A;110F 1168 11B9;
+CF4B;CF4B;110F 1168 11BA;CF4B;110F 1168 11BA;
+CF4C;CF4C;110F 1168 11BB;CF4C;110F 1168 11BB;
+CF4D;CF4D;110F 1168 11BC;CF4D;110F 1168 11BC;
+CF4E;CF4E;110F 1168 11BD;CF4E;110F 1168 11BD;
+CF4F;CF4F;110F 1168 11BE;CF4F;110F 1168 11BE;
+CF50;CF50;110F 1168 11BF;CF50;110F 1168 11BF;
+CF51;CF51;110F 1168 11C0;CF51;110F 1168 11C0;
+CF52;CF52;110F 1168 11C1;CF52;110F 1168 11C1;
+CF53;CF53;110F 1168 11C2;CF53;110F 1168 11C2;
+CF54;CF54;110F 1169;CF54;110F 1169;
+CF55;CF55;110F 1169 11A8;CF55;110F 1169 11A8;
+CF56;CF56;110F 1169 11A9;CF56;110F 1169 11A9;
+CF57;CF57;110F 1169 11AA;CF57;110F 1169 11AA;
+CF58;CF58;110F 1169 11AB;CF58;110F 1169 11AB;
+CF59;CF59;110F 1169 11AC;CF59;110F 1169 11AC;
+CF5A;CF5A;110F 1169 11AD;CF5A;110F 1169 11AD;
+CF5B;CF5B;110F 1169 11AE;CF5B;110F 1169 11AE;
+CF5C;CF5C;110F 1169 11AF;CF5C;110F 1169 11AF;
+CF5D;CF5D;110F 1169 11B0;CF5D;110F 1169 11B0;
+CF5E;CF5E;110F 1169 11B1;CF5E;110F 1169 11B1;
+CF5F;CF5F;110F 1169 11B2;CF5F;110F 1169 11B2;
+CF60;CF60;110F 1169 11B3;CF60;110F 1169 11B3;
+CF61;CF61;110F 1169 11B4;CF61;110F 1169 11B4;
+CF62;CF62;110F 1169 11B5;CF62;110F 1169 11B5;
+CF63;CF63;110F 1169 11B6;CF63;110F 1169 11B6;
+CF64;CF64;110F 1169 11B7;CF64;110F 1169 11B7;
+CF65;CF65;110F 1169 11B8;CF65;110F 1169 11B8;
+CF66;CF66;110F 1169 11B9;CF66;110F 1169 11B9;
+CF67;CF67;110F 1169 11BA;CF67;110F 1169 11BA;
+CF68;CF68;110F 1169 11BB;CF68;110F 1169 11BB;
+CF69;CF69;110F 1169 11BC;CF69;110F 1169 11BC;
+CF6A;CF6A;110F 1169 11BD;CF6A;110F 1169 11BD;
+CF6B;CF6B;110F 1169 11BE;CF6B;110F 1169 11BE;
+CF6C;CF6C;110F 1169 11BF;CF6C;110F 1169 11BF;
+CF6D;CF6D;110F 1169 11C0;CF6D;110F 1169 11C0;
+CF6E;CF6E;110F 1169 11C1;CF6E;110F 1169 11C1;
+CF6F;CF6F;110F 1169 11C2;CF6F;110F 1169 11C2;
+CF70;CF70;110F 116A;CF70;110F 116A;
+CF71;CF71;110F 116A 11A8;CF71;110F 116A 11A8;
+CF72;CF72;110F 116A 11A9;CF72;110F 116A 11A9;
+CF73;CF73;110F 116A 11AA;CF73;110F 116A 11AA;
+CF74;CF74;110F 116A 11AB;CF74;110F 116A 11AB;
+CF75;CF75;110F 116A 11AC;CF75;110F 116A 11AC;
+CF76;CF76;110F 116A 11AD;CF76;110F 116A 11AD;
+CF77;CF77;110F 116A 11AE;CF77;110F 116A 11AE;
+CF78;CF78;110F 116A 11AF;CF78;110F 116A 11AF;
+CF79;CF79;110F 116A 11B0;CF79;110F 116A 11B0;
+CF7A;CF7A;110F 116A 11B1;CF7A;110F 116A 11B1;
+CF7B;CF7B;110F 116A 11B2;CF7B;110F 116A 11B2;
+CF7C;CF7C;110F 116A 11B3;CF7C;110F 116A 11B3;
+CF7D;CF7D;110F 116A 11B4;CF7D;110F 116A 11B4;
+CF7E;CF7E;110F 116A 11B5;CF7E;110F 116A 11B5;
+CF7F;CF7F;110F 116A 11B6;CF7F;110F 116A 11B6;
+CF80;CF80;110F 116A 11B7;CF80;110F 116A 11B7;
+CF81;CF81;110F 116A 11B8;CF81;110F 116A 11B8;
+CF82;CF82;110F 116A 11B9;CF82;110F 116A 11B9;
+CF83;CF83;110F 116A 11BA;CF83;110F 116A 11BA;
+CF84;CF84;110F 116A 11BB;CF84;110F 116A 11BB;
+CF85;CF85;110F 116A 11BC;CF85;110F 116A 11BC;
+CF86;CF86;110F 116A 11BD;CF86;110F 116A 11BD;
+CF87;CF87;110F 116A 11BE;CF87;110F 116A 11BE;
+CF88;CF88;110F 116A 11BF;CF88;110F 116A 11BF;
+CF89;CF89;110F 116A 11C0;CF89;110F 116A 11C0;
+CF8A;CF8A;110F 116A 11C1;CF8A;110F 116A 11C1;
+CF8B;CF8B;110F 116A 11C2;CF8B;110F 116A 11C2;
+CF8C;CF8C;110F 116B;CF8C;110F 116B;
+CF8D;CF8D;110F 116B 11A8;CF8D;110F 116B 11A8;
+CF8E;CF8E;110F 116B 11A9;CF8E;110F 116B 11A9;
+CF8F;CF8F;110F 116B 11AA;CF8F;110F 116B 11AA;
+CF90;CF90;110F 116B 11AB;CF90;110F 116B 11AB;
+CF91;CF91;110F 116B 11AC;CF91;110F 116B 11AC;
+CF92;CF92;110F 116B 11AD;CF92;110F 116B 11AD;
+CF93;CF93;110F 116B 11AE;CF93;110F 116B 11AE;
+CF94;CF94;110F 116B 11AF;CF94;110F 116B 11AF;
+CF95;CF95;110F 116B 11B0;CF95;110F 116B 11B0;
+CF96;CF96;110F 116B 11B1;CF96;110F 116B 11B1;
+CF97;CF97;110F 116B 11B2;CF97;110F 116B 11B2;
+CF98;CF98;110F 116B 11B3;CF98;110F 116B 11B3;
+CF99;CF99;110F 116B 11B4;CF99;110F 116B 11B4;
+CF9A;CF9A;110F 116B 11B5;CF9A;110F 116B 11B5;
+CF9B;CF9B;110F 116B 11B6;CF9B;110F 116B 11B6;
+CF9C;CF9C;110F 116B 11B7;CF9C;110F 116B 11B7;
+CF9D;CF9D;110F 116B 11B8;CF9D;110F 116B 11B8;
+CF9E;CF9E;110F 116B 11B9;CF9E;110F 116B 11B9;
+CF9F;CF9F;110F 116B 11BA;CF9F;110F 116B 11BA;
+CFA0;CFA0;110F 116B 11BB;CFA0;110F 116B 11BB;
+CFA1;CFA1;110F 116B 11BC;CFA1;110F 116B 11BC;
+CFA2;CFA2;110F 116B 11BD;CFA2;110F 116B 11BD;
+CFA3;CFA3;110F 116B 11BE;CFA3;110F 116B 11BE;
+CFA4;CFA4;110F 116B 11BF;CFA4;110F 116B 11BF;
+CFA5;CFA5;110F 116B 11C0;CFA5;110F 116B 11C0;
+CFA6;CFA6;110F 116B 11C1;CFA6;110F 116B 11C1;
+CFA7;CFA7;110F 116B 11C2;CFA7;110F 116B 11C2;
+CFA8;CFA8;110F 116C;CFA8;110F 116C;
+CFA9;CFA9;110F 116C 11A8;CFA9;110F 116C 11A8;
+CFAA;CFAA;110F 116C 11A9;CFAA;110F 116C 11A9;
+CFAB;CFAB;110F 116C 11AA;CFAB;110F 116C 11AA;
+CFAC;CFAC;110F 116C 11AB;CFAC;110F 116C 11AB;
+CFAD;CFAD;110F 116C 11AC;CFAD;110F 116C 11AC;
+CFAE;CFAE;110F 116C 11AD;CFAE;110F 116C 11AD;
+CFAF;CFAF;110F 116C 11AE;CFAF;110F 116C 11AE;
+CFB0;CFB0;110F 116C 11AF;CFB0;110F 116C 11AF;
+CFB1;CFB1;110F 116C 11B0;CFB1;110F 116C 11B0;
+CFB2;CFB2;110F 116C 11B1;CFB2;110F 116C 11B1;
+CFB3;CFB3;110F 116C 11B2;CFB3;110F 116C 11B2;
+CFB4;CFB4;110F 116C 11B3;CFB4;110F 116C 11B3;
+CFB5;CFB5;110F 116C 11B4;CFB5;110F 116C 11B4;
+CFB6;CFB6;110F 116C 11B5;CFB6;110F 116C 11B5;
+CFB7;CFB7;110F 116C 11B6;CFB7;110F 116C 11B6;
+CFB8;CFB8;110F 116C 11B7;CFB8;110F 116C 11B7;
+CFB9;CFB9;110F 116C 11B8;CFB9;110F 116C 11B8;
+CFBA;CFBA;110F 116C 11B9;CFBA;110F 116C 11B9;
+CFBB;CFBB;110F 116C 11BA;CFBB;110F 116C 11BA;
+CFBC;CFBC;110F 116C 11BB;CFBC;110F 116C 11BB;
+CFBD;CFBD;110F 116C 11BC;CFBD;110F 116C 11BC;
+CFBE;CFBE;110F 116C 11BD;CFBE;110F 116C 11BD;
+CFBF;CFBF;110F 116C 11BE;CFBF;110F 116C 11BE;
+CFC0;CFC0;110F 116C 11BF;CFC0;110F 116C 11BF;
+CFC1;CFC1;110F 116C 11C0;CFC1;110F 116C 11C0;
+CFC2;CFC2;110F 116C 11C1;CFC2;110F 116C 11C1;
+CFC3;CFC3;110F 116C 11C2;CFC3;110F 116C 11C2;
+CFC4;CFC4;110F 116D;CFC4;110F 116D;
+CFC5;CFC5;110F 116D 11A8;CFC5;110F 116D 11A8;
+CFC6;CFC6;110F 116D 11A9;CFC6;110F 116D 11A9;
+CFC7;CFC7;110F 116D 11AA;CFC7;110F 116D 11AA;
+CFC8;CFC8;110F 116D 11AB;CFC8;110F 116D 11AB;
+CFC9;CFC9;110F 116D 11AC;CFC9;110F 116D 11AC;
+CFCA;CFCA;110F 116D 11AD;CFCA;110F 116D 11AD;
+CFCB;CFCB;110F 116D 11AE;CFCB;110F 116D 11AE;
+CFCC;CFCC;110F 116D 11AF;CFCC;110F 116D 11AF;
+CFCD;CFCD;110F 116D 11B0;CFCD;110F 116D 11B0;
+CFCE;CFCE;110F 116D 11B1;CFCE;110F 116D 11B1;
+CFCF;CFCF;110F 116D 11B2;CFCF;110F 116D 11B2;
+CFD0;CFD0;110F 116D 11B3;CFD0;110F 116D 11B3;
+CFD1;CFD1;110F 116D 11B4;CFD1;110F 116D 11B4;
+CFD2;CFD2;110F 116D 11B5;CFD2;110F 116D 11B5;
+CFD3;CFD3;110F 116D 11B6;CFD3;110F 116D 11B6;
+CFD4;CFD4;110F 116D 11B7;CFD4;110F 116D 11B7;
+CFD5;CFD5;110F 116D 11B8;CFD5;110F 116D 11B8;
+CFD6;CFD6;110F 116D 11B9;CFD6;110F 116D 11B9;
+CFD7;CFD7;110F 116D 11BA;CFD7;110F 116D 11BA;
+CFD8;CFD8;110F 116D 11BB;CFD8;110F 116D 11BB;
+CFD9;CFD9;110F 116D 11BC;CFD9;110F 116D 11BC;
+CFDA;CFDA;110F 116D 11BD;CFDA;110F 116D 11BD;
+CFDB;CFDB;110F 116D 11BE;CFDB;110F 116D 11BE;
+CFDC;CFDC;110F 116D 11BF;CFDC;110F 116D 11BF;
+CFDD;CFDD;110F 116D 11C0;CFDD;110F 116D 11C0;
+CFDE;CFDE;110F 116D 11C1;CFDE;110F 116D 11C1;
+CFDF;CFDF;110F 116D 11C2;CFDF;110F 116D 11C2;
+CFE0;CFE0;110F 116E;CFE0;110F 116E;
+CFE1;CFE1;110F 116E 11A8;CFE1;110F 116E 11A8;
+CFE2;CFE2;110F 116E 11A9;CFE2;110F 116E 11A9;
+CFE3;CFE3;110F 116E 11AA;CFE3;110F 116E 11AA;
+CFE4;CFE4;110F 116E 11AB;CFE4;110F 116E 11AB;
+CFE5;CFE5;110F 116E 11AC;CFE5;110F 116E 11AC;
+CFE6;CFE6;110F 116E 11AD;CFE6;110F 116E 11AD;
+CFE7;CFE7;110F 116E 11AE;CFE7;110F 116E 11AE;
+CFE8;CFE8;110F 116E 11AF;CFE8;110F 116E 11AF;
+CFE9;CFE9;110F 116E 11B0;CFE9;110F 116E 11B0;
+CFEA;CFEA;110F 116E 11B1;CFEA;110F 116E 11B1;
+CFEB;CFEB;110F 116E 11B2;CFEB;110F 116E 11B2;
+CFEC;CFEC;110F 116E 11B3;CFEC;110F 116E 11B3;
+CFED;CFED;110F 116E 11B4;CFED;110F 116E 11B4;
+CFEE;CFEE;110F 116E 11B5;CFEE;110F 116E 11B5;
+CFEF;CFEF;110F 116E 11B6;CFEF;110F 116E 11B6;
+CFF0;CFF0;110F 116E 11B7;CFF0;110F 116E 11B7;
+CFF1;CFF1;110F 116E 11B8;CFF1;110F 116E 11B8;
+CFF2;CFF2;110F 116E 11B9;CFF2;110F 116E 11B9;
+CFF3;CFF3;110F 116E 11BA;CFF3;110F 116E 11BA;
+CFF4;CFF4;110F 116E 11BB;CFF4;110F 116E 11BB;
+CFF5;CFF5;110F 116E 11BC;CFF5;110F 116E 11BC;
+CFF6;CFF6;110F 116E 11BD;CFF6;110F 116E 11BD;
+CFF7;CFF7;110F 116E 11BE;CFF7;110F 116E 11BE;
+CFF8;CFF8;110F 116E 11BF;CFF8;110F 116E 11BF;
+CFF9;CFF9;110F 116E 11C0;CFF9;110F 116E 11C0;
+CFFA;CFFA;110F 116E 11C1;CFFA;110F 116E 11C1;
+CFFB;CFFB;110F 116E 11C2;CFFB;110F 116E 11C2;
+CFFC;CFFC;110F 116F;CFFC;110F 116F;
+CFFD;CFFD;110F 116F 11A8;CFFD;110F 116F 11A8;
+CFFE;CFFE;110F 116F 11A9;CFFE;110F 116F 11A9;
+CFFF;CFFF;110F 116F 11AA;CFFF;110F 116F 11AA;
+D000;D000;110F 116F 11AB;D000;110F 116F 11AB;
+D001;D001;110F 116F 11AC;D001;110F 116F 11AC;
+D002;D002;110F 116F 11AD;D002;110F 116F 11AD;
+D003;D003;110F 116F 11AE;D003;110F 116F 11AE;
+D004;D004;110F 116F 11AF;D004;110F 116F 11AF;
+D005;D005;110F 116F 11B0;D005;110F 116F 11B0;
+D006;D006;110F 116F 11B1;D006;110F 116F 11B1;
+D007;D007;110F 116F 11B2;D007;110F 116F 11B2;
+D008;D008;110F 116F 11B3;D008;110F 116F 11B3;
+D009;D009;110F 116F 11B4;D009;110F 116F 11B4;
+D00A;D00A;110F 116F 11B5;D00A;110F 116F 11B5;
+D00B;D00B;110F 116F 11B6;D00B;110F 116F 11B6;
+D00C;D00C;110F 116F 11B7;D00C;110F 116F 11B7;
+D00D;D00D;110F 116F 11B8;D00D;110F 116F 11B8;
+D00E;D00E;110F 116F 11B9;D00E;110F 116F 11B9;
+D00F;D00F;110F 116F 11BA;D00F;110F 116F 11BA;
+D010;D010;110F 116F 11BB;D010;110F 116F 11BB;
+D011;D011;110F 116F 11BC;D011;110F 116F 11BC;
+D012;D012;110F 116F 11BD;D012;110F 116F 11BD;
+D013;D013;110F 116F 11BE;D013;110F 116F 11BE;
+D014;D014;110F 116F 11BF;D014;110F 116F 11BF;
+D015;D015;110F 116F 11C0;D015;110F 116F 11C0;
+D016;D016;110F 116F 11C1;D016;110F 116F 11C1;
+D017;D017;110F 116F 11C2;D017;110F 116F 11C2;
+D018;D018;110F 1170;D018;110F 1170;
+D019;D019;110F 1170 11A8;D019;110F 1170 11A8;
+D01A;D01A;110F 1170 11A9;D01A;110F 1170 11A9;
+D01B;D01B;110F 1170 11AA;D01B;110F 1170 11AA;
+D01C;D01C;110F 1170 11AB;D01C;110F 1170 11AB;
+D01D;D01D;110F 1170 11AC;D01D;110F 1170 11AC;
+D01E;D01E;110F 1170 11AD;D01E;110F 1170 11AD;
+D01F;D01F;110F 1170 11AE;D01F;110F 1170 11AE;
+D020;D020;110F 1170 11AF;D020;110F 1170 11AF;
+D021;D021;110F 1170 11B0;D021;110F 1170 11B0;
+D022;D022;110F 1170 11B1;D022;110F 1170 11B1;
+D023;D023;110F 1170 11B2;D023;110F 1170 11B2;
+D024;D024;110F 1170 11B3;D024;110F 1170 11B3;
+D025;D025;110F 1170 11B4;D025;110F 1170 11B4;
+D026;D026;110F 1170 11B5;D026;110F 1170 11B5;
+D027;D027;110F 1170 11B6;D027;110F 1170 11B6;
+D028;D028;110F 1170 11B7;D028;110F 1170 11B7;
+D029;D029;110F 1170 11B8;D029;110F 1170 11B8;
+D02A;D02A;110F 1170 11B9;D02A;110F 1170 11B9;
+D02B;D02B;110F 1170 11BA;D02B;110F 1170 11BA;
+D02C;D02C;110F 1170 11BB;D02C;110F 1170 11BB;
+D02D;D02D;110F 1170 11BC;D02D;110F 1170 11BC;
+D02E;D02E;110F 1170 11BD;D02E;110F 1170 11BD;
+D02F;D02F;110F 1170 11BE;D02F;110F 1170 11BE;
+D030;D030;110F 1170 11BF;D030;110F 1170 11BF;
+D031;D031;110F 1170 11C0;D031;110F 1170 11C0;
+D032;D032;110F 1170 11C1;D032;110F 1170 11C1;
+D033;D033;110F 1170 11C2;D033;110F 1170 11C2;
+D034;D034;110F 1171;D034;110F 1171;
+D035;D035;110F 1171 11A8;D035;110F 1171 11A8;
+D036;D036;110F 1171 11A9;D036;110F 1171 11A9;
+D037;D037;110F 1171 11AA;D037;110F 1171 11AA;
+D038;D038;110F 1171 11AB;D038;110F 1171 11AB;
+D039;D039;110F 1171 11AC;D039;110F 1171 11AC;
+D03A;D03A;110F 1171 11AD;D03A;110F 1171 11AD;
+D03B;D03B;110F 1171 11AE;D03B;110F 1171 11AE;
+D03C;D03C;110F 1171 11AF;D03C;110F 1171 11AF;
+D03D;D03D;110F 1171 11B0;D03D;110F 1171 11B0;
+D03E;D03E;110F 1171 11B1;D03E;110F 1171 11B1;
+D03F;D03F;110F 1171 11B2;D03F;110F 1171 11B2;
+D040;D040;110F 1171 11B3;D040;110F 1171 11B3;
+D041;D041;110F 1171 11B4;D041;110F 1171 11B4;
+D042;D042;110F 1171 11B5;D042;110F 1171 11B5;
+D043;D043;110F 1171 11B6;D043;110F 1171 11B6;
+D044;D044;110F 1171 11B7;D044;110F 1171 11B7;
+D045;D045;110F 1171 11B8;D045;110F 1171 11B8;
+D046;D046;110F 1171 11B9;D046;110F 1171 11B9;
+D047;D047;110F 1171 11BA;D047;110F 1171 11BA;
+D048;D048;110F 1171 11BB;D048;110F 1171 11BB;
+D049;D049;110F 1171 11BC;D049;110F 1171 11BC;
+D04A;D04A;110F 1171 11BD;D04A;110F 1171 11BD;
+D04B;D04B;110F 1171 11BE;D04B;110F 1171 11BE;
+D04C;D04C;110F 1171 11BF;D04C;110F 1171 11BF;
+D04D;D04D;110F 1171 11C0;D04D;110F 1171 11C0;
+D04E;D04E;110F 1171 11C1;D04E;110F 1171 11C1;
+D04F;D04F;110F 1171 11C2;D04F;110F 1171 11C2;
+D050;D050;110F 1172;D050;110F 1172;
+D051;D051;110F 1172 11A8;D051;110F 1172 11A8;
+D052;D052;110F 1172 11A9;D052;110F 1172 11A9;
+D053;D053;110F 1172 11AA;D053;110F 1172 11AA;
+D054;D054;110F 1172 11AB;D054;110F 1172 11AB;
+D055;D055;110F 1172 11AC;D055;110F 1172 11AC;
+D056;D056;110F 1172 11AD;D056;110F 1172 11AD;
+D057;D057;110F 1172 11AE;D057;110F 1172 11AE;
+D058;D058;110F 1172 11AF;D058;110F 1172 11AF;
+D059;D059;110F 1172 11B0;D059;110F 1172 11B0;
+D05A;D05A;110F 1172 11B1;D05A;110F 1172 11B1;
+D05B;D05B;110F 1172 11B2;D05B;110F 1172 11B2;
+D05C;D05C;110F 1172 11B3;D05C;110F 1172 11B3;
+D05D;D05D;110F 1172 11B4;D05D;110F 1172 11B4;
+D05E;D05E;110F 1172 11B5;D05E;110F 1172 11B5;
+D05F;D05F;110F 1172 11B6;D05F;110F 1172 11B6;
+D060;D060;110F 1172 11B7;D060;110F 1172 11B7;
+D061;D061;110F 1172 11B8;D061;110F 1172 11B8;
+D062;D062;110F 1172 11B9;D062;110F 1172 11B9;
+D063;D063;110F 1172 11BA;D063;110F 1172 11BA;
+D064;D064;110F 1172 11BB;D064;110F 1172 11BB;
+D065;D065;110F 1172 11BC;D065;110F 1172 11BC;
+D066;D066;110F 1172 11BD;D066;110F 1172 11BD;
+D067;D067;110F 1172 11BE;D067;110F 1172 11BE;
+D068;D068;110F 1172 11BF;D068;110F 1172 11BF;
+D069;D069;110F 1172 11C0;D069;110F 1172 11C0;
+D06A;D06A;110F 1172 11C1;D06A;110F 1172 11C1;
+D06B;D06B;110F 1172 11C2;D06B;110F 1172 11C2;
+D06C;D06C;110F 1173;D06C;110F 1173;
+D06D;D06D;110F 1173 11A8;D06D;110F 1173 11A8;
+D06E;D06E;110F 1173 11A9;D06E;110F 1173 11A9;
+D06F;D06F;110F 1173 11AA;D06F;110F 1173 11AA;
+D070;D070;110F 1173 11AB;D070;110F 1173 11AB;
+D071;D071;110F 1173 11AC;D071;110F 1173 11AC;
+D072;D072;110F 1173 11AD;D072;110F 1173 11AD;
+D073;D073;110F 1173 11AE;D073;110F 1173 11AE;
+D074;D074;110F 1173 11AF;D074;110F 1173 11AF;
+D075;D075;110F 1173 11B0;D075;110F 1173 11B0;
+D076;D076;110F 1173 11B1;D076;110F 1173 11B1;
+D077;D077;110F 1173 11B2;D077;110F 1173 11B2;
+D078;D078;110F 1173 11B3;D078;110F 1173 11B3;
+D079;D079;110F 1173 11B4;D079;110F 1173 11B4;
+D07A;D07A;110F 1173 11B5;D07A;110F 1173 11B5;
+D07B;D07B;110F 1173 11B6;D07B;110F 1173 11B6;
+D07C;D07C;110F 1173 11B7;D07C;110F 1173 11B7;
+D07D;D07D;110F 1173 11B8;D07D;110F 1173 11B8;
+D07E;D07E;110F 1173 11B9;D07E;110F 1173 11B9;
+D07F;D07F;110F 1173 11BA;D07F;110F 1173 11BA;
+D080;D080;110F 1173 11BB;D080;110F 1173 11BB;
+D081;D081;110F 1173 11BC;D081;110F 1173 11BC;
+D082;D082;110F 1173 11BD;D082;110F 1173 11BD;
+D083;D083;110F 1173 11BE;D083;110F 1173 11BE;
+D084;D084;110F 1173 11BF;D084;110F 1173 11BF;
+D085;D085;110F 1173 11C0;D085;110F 1173 11C0;
+D086;D086;110F 1173 11C1;D086;110F 1173 11C1;
+D087;D087;110F 1173 11C2;D087;110F 1173 11C2;
+D088;D088;110F 1174;D088;110F 1174;
+D089;D089;110F 1174 11A8;D089;110F 1174 11A8;
+D08A;D08A;110F 1174 11A9;D08A;110F 1174 11A9;
+D08B;D08B;110F 1174 11AA;D08B;110F 1174 11AA;
+D08C;D08C;110F 1174 11AB;D08C;110F 1174 11AB;
+D08D;D08D;110F 1174 11AC;D08D;110F 1174 11AC;
+D08E;D08E;110F 1174 11AD;D08E;110F 1174 11AD;
+D08F;D08F;110F 1174 11AE;D08F;110F 1174 11AE;
+D090;D090;110F 1174 11AF;D090;110F 1174 11AF;
+D091;D091;110F 1174 11B0;D091;110F 1174 11B0;
+D092;D092;110F 1174 11B1;D092;110F 1174 11B1;
+D093;D093;110F 1174 11B2;D093;110F 1174 11B2;
+D094;D094;110F 1174 11B3;D094;110F 1174 11B3;
+D095;D095;110F 1174 11B4;D095;110F 1174 11B4;
+D096;D096;110F 1174 11B5;D096;110F 1174 11B5;
+D097;D097;110F 1174 11B6;D097;110F 1174 11B6;
+D098;D098;110F 1174 11B7;D098;110F 1174 11B7;
+D099;D099;110F 1174 11B8;D099;110F 1174 11B8;
+D09A;D09A;110F 1174 11B9;D09A;110F 1174 11B9;
+D09B;D09B;110F 1174 11BA;D09B;110F 1174 11BA;
+D09C;D09C;110F 1174 11BB;D09C;110F 1174 11BB;
+D09D;D09D;110F 1174 11BC;D09D;110F 1174 11BC;
+D09E;D09E;110F 1174 11BD;D09E;110F 1174 11BD;
+D09F;D09F;110F 1174 11BE;D09F;110F 1174 11BE;
+D0A0;D0A0;110F 1174 11BF;D0A0;110F 1174 11BF;
+D0A1;D0A1;110F 1174 11C0;D0A1;110F 1174 11C0;
+D0A2;D0A2;110F 1174 11C1;D0A2;110F 1174 11C1;
+D0A3;D0A3;110F 1174 11C2;D0A3;110F 1174 11C2;
+D0A4;D0A4;110F 1175;D0A4;110F 1175;
+D0A5;D0A5;110F 1175 11A8;D0A5;110F 1175 11A8;
+D0A6;D0A6;110F 1175 11A9;D0A6;110F 1175 11A9;
+D0A7;D0A7;110F 1175 11AA;D0A7;110F 1175 11AA;
+D0A8;D0A8;110F 1175 11AB;D0A8;110F 1175 11AB;
+D0A9;D0A9;110F 1175 11AC;D0A9;110F 1175 11AC;
+D0AA;D0AA;110F 1175 11AD;D0AA;110F 1175 11AD;
+D0AB;D0AB;110F 1175 11AE;D0AB;110F 1175 11AE;
+D0AC;D0AC;110F 1175 11AF;D0AC;110F 1175 11AF;
+D0AD;D0AD;110F 1175 11B0;D0AD;110F 1175 11B0;
+D0AE;D0AE;110F 1175 11B1;D0AE;110F 1175 11B1;
+D0AF;D0AF;110F 1175 11B2;D0AF;110F 1175 11B2;
+D0B0;D0B0;110F 1175 11B3;D0B0;110F 1175 11B3;
+D0B1;D0B1;110F 1175 11B4;D0B1;110F 1175 11B4;
+D0B2;D0B2;110F 1175 11B5;D0B2;110F 1175 11B5;
+D0B3;D0B3;110F 1175 11B6;D0B3;110F 1175 11B6;
+D0B4;D0B4;110F 1175 11B7;D0B4;110F 1175 11B7;
+D0B5;D0B5;110F 1175 11B8;D0B5;110F 1175 11B8;
+D0B6;D0B6;110F 1175 11B9;D0B6;110F 1175 11B9;
+D0B7;D0B7;110F 1175 11BA;D0B7;110F 1175 11BA;
+D0B8;D0B8;110F 1175 11BB;D0B8;110F 1175 11BB;
+D0B9;D0B9;110F 1175 11BC;D0B9;110F 1175 11BC;
+D0BA;D0BA;110F 1175 11BD;D0BA;110F 1175 11BD;
+D0BB;D0BB;110F 1175 11BE;D0BB;110F 1175 11BE;
+D0BC;D0BC;110F 1175 11BF;D0BC;110F 1175 11BF;
+D0BD;D0BD;110F 1175 11C0;D0BD;110F 1175 11C0;
+D0BE;D0BE;110F 1175 11C1;D0BE;110F 1175 11C1;
+D0BF;D0BF;110F 1175 11C2;D0BF;110F 1175 11C2;
+D0C0;D0C0;1110 1161;D0C0;1110 1161;
+D0C1;D0C1;1110 1161 11A8;D0C1;1110 1161 11A8;
+D0C2;D0C2;1110 1161 11A9;D0C2;1110 1161 11A9;
+D0C3;D0C3;1110 1161 11AA;D0C3;1110 1161 11AA;
+D0C4;D0C4;1110 1161 11AB;D0C4;1110 1161 11AB;
+D0C5;D0C5;1110 1161 11AC;D0C5;1110 1161 11AC;
+D0C6;D0C6;1110 1161 11AD;D0C6;1110 1161 11AD;
+D0C7;D0C7;1110 1161 11AE;D0C7;1110 1161 11AE;
+D0C8;D0C8;1110 1161 11AF;D0C8;1110 1161 11AF;
+D0C9;D0C9;1110 1161 11B0;D0C9;1110 1161 11B0;
+D0CA;D0CA;1110 1161 11B1;D0CA;1110 1161 11B1;
+D0CB;D0CB;1110 1161 11B2;D0CB;1110 1161 11B2;
+D0CC;D0CC;1110 1161 11B3;D0CC;1110 1161 11B3;
+D0CD;D0CD;1110 1161 11B4;D0CD;1110 1161 11B4;
+D0CE;D0CE;1110 1161 11B5;D0CE;1110 1161 11B5;
+D0CF;D0CF;1110 1161 11B6;D0CF;1110 1161 11B6;
+D0D0;D0D0;1110 1161 11B7;D0D0;1110 1161 11B7;
+D0D1;D0D1;1110 1161 11B8;D0D1;1110 1161 11B8;
+D0D2;D0D2;1110 1161 11B9;D0D2;1110 1161 11B9;
+D0D3;D0D3;1110 1161 11BA;D0D3;1110 1161 11BA;
+D0D4;D0D4;1110 1161 11BB;D0D4;1110 1161 11BB;
+D0D5;D0D5;1110 1161 11BC;D0D5;1110 1161 11BC;
+D0D6;D0D6;1110 1161 11BD;D0D6;1110 1161 11BD;
+D0D7;D0D7;1110 1161 11BE;D0D7;1110 1161 11BE;
+D0D8;D0D8;1110 1161 11BF;D0D8;1110 1161 11BF;
+D0D9;D0D9;1110 1161 11C0;D0D9;1110 1161 11C0;
+D0DA;D0DA;1110 1161 11C1;D0DA;1110 1161 11C1;
+D0DB;D0DB;1110 1161 11C2;D0DB;1110 1161 11C2;
+D0DC;D0DC;1110 1162;D0DC;1110 1162;
+D0DD;D0DD;1110 1162 11A8;D0DD;1110 1162 11A8;
+D0DE;D0DE;1110 1162 11A9;D0DE;1110 1162 11A9;
+D0DF;D0DF;1110 1162 11AA;D0DF;1110 1162 11AA;
+D0E0;D0E0;1110 1162 11AB;D0E0;1110 1162 11AB;
+D0E1;D0E1;1110 1162 11AC;D0E1;1110 1162 11AC;
+D0E2;D0E2;1110 1162 11AD;D0E2;1110 1162 11AD;
+D0E3;D0E3;1110 1162 11AE;D0E3;1110 1162 11AE;
+D0E4;D0E4;1110 1162 11AF;D0E4;1110 1162 11AF;
+D0E5;D0E5;1110 1162 11B0;D0E5;1110 1162 11B0;
+D0E6;D0E6;1110 1162 11B1;D0E6;1110 1162 11B1;
+D0E7;D0E7;1110 1162 11B2;D0E7;1110 1162 11B2;
+D0E8;D0E8;1110 1162 11B3;D0E8;1110 1162 11B3;
+D0E9;D0E9;1110 1162 11B4;D0E9;1110 1162 11B4;
+D0EA;D0EA;1110 1162 11B5;D0EA;1110 1162 11B5;
+D0EB;D0EB;1110 1162 11B6;D0EB;1110 1162 11B6;
+D0EC;D0EC;1110 1162 11B7;D0EC;1110 1162 11B7;
+D0ED;D0ED;1110 1162 11B8;D0ED;1110 1162 11B8;
+D0EE;D0EE;1110 1162 11B9;D0EE;1110 1162 11B9;
+D0EF;D0EF;1110 1162 11BA;D0EF;1110 1162 11BA;
+D0F0;D0F0;1110 1162 11BB;D0F0;1110 1162 11BB;
+D0F1;D0F1;1110 1162 11BC;D0F1;1110 1162 11BC;
+D0F2;D0F2;1110 1162 11BD;D0F2;1110 1162 11BD;
+D0F3;D0F3;1110 1162 11BE;D0F3;1110 1162 11BE;
+D0F4;D0F4;1110 1162 11BF;D0F4;1110 1162 11BF;
+D0F5;D0F5;1110 1162 11C0;D0F5;1110 1162 11C0;
+D0F6;D0F6;1110 1162 11C1;D0F6;1110 1162 11C1;
+D0F7;D0F7;1110 1162 11C2;D0F7;1110 1162 11C2;
+D0F8;D0F8;1110 1163;D0F8;1110 1163;
+D0F9;D0F9;1110 1163 11A8;D0F9;1110 1163 11A8;
+D0FA;D0FA;1110 1163 11A9;D0FA;1110 1163 11A9;
+D0FB;D0FB;1110 1163 11AA;D0FB;1110 1163 11AA;
+D0FC;D0FC;1110 1163 11AB;D0FC;1110 1163 11AB;
+D0FD;D0FD;1110 1163 11AC;D0FD;1110 1163 11AC;
+D0FE;D0FE;1110 1163 11AD;D0FE;1110 1163 11AD;
+D0FF;D0FF;1110 1163 11AE;D0FF;1110 1163 11AE;
+D100;D100;1110 1163 11AF;D100;1110 1163 11AF;
+D101;D101;1110 1163 11B0;D101;1110 1163 11B0;
+D102;D102;1110 1163 11B1;D102;1110 1163 11B1;
+D103;D103;1110 1163 11B2;D103;1110 1163 11B2;
+D104;D104;1110 1163 11B3;D104;1110 1163 11B3;
+D105;D105;1110 1163 11B4;D105;1110 1163 11B4;
+D106;D106;1110 1163 11B5;D106;1110 1163 11B5;
+D107;D107;1110 1163 11B6;D107;1110 1163 11B6;
+D108;D108;1110 1163 11B7;D108;1110 1163 11B7;
+D109;D109;1110 1163 11B8;D109;1110 1163 11B8;
+D10A;D10A;1110 1163 11B9;D10A;1110 1163 11B9;
+D10B;D10B;1110 1163 11BA;D10B;1110 1163 11BA;
+D10C;D10C;1110 1163 11BB;D10C;1110 1163 11BB;
+D10D;D10D;1110 1163 11BC;D10D;1110 1163 11BC;
+D10E;D10E;1110 1163 11BD;D10E;1110 1163 11BD;
+D10F;D10F;1110 1163 11BE;D10F;1110 1163 11BE;
+D110;D110;1110 1163 11BF;D110;1110 1163 11BF;
+D111;D111;1110 1163 11C0;D111;1110 1163 11C0;
+D112;D112;1110 1163 11C1;D112;1110 1163 11C1;
+D113;D113;1110 1163 11C2;D113;1110 1163 11C2;
+D114;D114;1110 1164;D114;1110 1164;
+D115;D115;1110 1164 11A8;D115;1110 1164 11A8;
+D116;D116;1110 1164 11A9;D116;1110 1164 11A9;
+D117;D117;1110 1164 11AA;D117;1110 1164 11AA;
+D118;D118;1110 1164 11AB;D118;1110 1164 11AB;
+D119;D119;1110 1164 11AC;D119;1110 1164 11AC;
+D11A;D11A;1110 1164 11AD;D11A;1110 1164 11AD;
+D11B;D11B;1110 1164 11AE;D11B;1110 1164 11AE;
+D11C;D11C;1110 1164 11AF;D11C;1110 1164 11AF;
+D11D;D11D;1110 1164 11B0;D11D;1110 1164 11B0;
+D11E;D11E;1110 1164 11B1;D11E;1110 1164 11B1;
+D11F;D11F;1110 1164 11B2;D11F;1110 1164 11B2;
+D120;D120;1110 1164 11B3;D120;1110 1164 11B3;
+D121;D121;1110 1164 11B4;D121;1110 1164 11B4;
+D122;D122;1110 1164 11B5;D122;1110 1164 11B5;
+D123;D123;1110 1164 11B6;D123;1110 1164 11B6;
+D124;D124;1110 1164 11B7;D124;1110 1164 11B7;
+D125;D125;1110 1164 11B8;D125;1110 1164 11B8;
+D126;D126;1110 1164 11B9;D126;1110 1164 11B9;
+D127;D127;1110 1164 11BA;D127;1110 1164 11BA;
+D128;D128;1110 1164 11BB;D128;1110 1164 11BB;
+D129;D129;1110 1164 11BC;D129;1110 1164 11BC;
+D12A;D12A;1110 1164 11BD;D12A;1110 1164 11BD;
+D12B;D12B;1110 1164 11BE;D12B;1110 1164 11BE;
+D12C;D12C;1110 1164 11BF;D12C;1110 1164 11BF;
+D12D;D12D;1110 1164 11C0;D12D;1110 1164 11C0;
+D12E;D12E;1110 1164 11C1;D12E;1110 1164 11C1;
+D12F;D12F;1110 1164 11C2;D12F;1110 1164 11C2;
+D130;D130;1110 1165;D130;1110 1165;
+D131;D131;1110 1165 11A8;D131;1110 1165 11A8;
+D132;D132;1110 1165 11A9;D132;1110 1165 11A9;
+D133;D133;1110 1165 11AA;D133;1110 1165 11AA;
+D134;D134;1110 1165 11AB;D134;1110 1165 11AB;
+D135;D135;1110 1165 11AC;D135;1110 1165 11AC;
+D136;D136;1110 1165 11AD;D136;1110 1165 11AD;
+D137;D137;1110 1165 11AE;D137;1110 1165 11AE;
+D138;D138;1110 1165 11AF;D138;1110 1165 11AF;
+D139;D139;1110 1165 11B0;D139;1110 1165 11B0;
+D13A;D13A;1110 1165 11B1;D13A;1110 1165 11B1;
+D13B;D13B;1110 1165 11B2;D13B;1110 1165 11B2;
+D13C;D13C;1110 1165 11B3;D13C;1110 1165 11B3;
+D13D;D13D;1110 1165 11B4;D13D;1110 1165 11B4;
+D13E;D13E;1110 1165 11B5;D13E;1110 1165 11B5;
+D13F;D13F;1110 1165 11B6;D13F;1110 1165 11B6;
+D140;D140;1110 1165 11B7;D140;1110 1165 11B7;
+D141;D141;1110 1165 11B8;D141;1110 1165 11B8;
+D142;D142;1110 1165 11B9;D142;1110 1165 11B9;
+D143;D143;1110 1165 11BA;D143;1110 1165 11BA;
+D144;D144;1110 1165 11BB;D144;1110 1165 11BB;
+D145;D145;1110 1165 11BC;D145;1110 1165 11BC;
+D146;D146;1110 1165 11BD;D146;1110 1165 11BD;
+D147;D147;1110 1165 11BE;D147;1110 1165 11BE;
+D148;D148;1110 1165 11BF;D148;1110 1165 11BF;
+D149;D149;1110 1165 11C0;D149;1110 1165 11C0;
+D14A;D14A;1110 1165 11C1;D14A;1110 1165 11C1;
+D14B;D14B;1110 1165 11C2;D14B;1110 1165 11C2;
+D14C;D14C;1110 1166;D14C;1110 1166;
+D14D;D14D;1110 1166 11A8;D14D;1110 1166 11A8;
+D14E;D14E;1110 1166 11A9;D14E;1110 1166 11A9;
+D14F;D14F;1110 1166 11AA;D14F;1110 1166 11AA;
+D150;D150;1110 1166 11AB;D150;1110 1166 11AB;
+D151;D151;1110 1166 11AC;D151;1110 1166 11AC;
+D152;D152;1110 1166 11AD;D152;1110 1166 11AD;
+D153;D153;1110 1166 11AE;D153;1110 1166 11AE;
+D154;D154;1110 1166 11AF;D154;1110 1166 11AF;
+D155;D155;1110 1166 11B0;D155;1110 1166 11B0;
+D156;D156;1110 1166 11B1;D156;1110 1166 11B1;
+D157;D157;1110 1166 11B2;D157;1110 1166 11B2;
+D158;D158;1110 1166 11B3;D158;1110 1166 11B3;
+D159;D159;1110 1166 11B4;D159;1110 1166 11B4;
+D15A;D15A;1110 1166 11B5;D15A;1110 1166 11B5;
+D15B;D15B;1110 1166 11B6;D15B;1110 1166 11B6;
+D15C;D15C;1110 1166 11B7;D15C;1110 1166 11B7;
+D15D;D15D;1110 1166 11B8;D15D;1110 1166 11B8;
+D15E;D15E;1110 1166 11B9;D15E;1110 1166 11B9;
+D15F;D15F;1110 1166 11BA;D15F;1110 1166 11BA;
+D160;D160;1110 1166 11BB;D160;1110 1166 11BB;
+D161;D161;1110 1166 11BC;D161;1110 1166 11BC;
+D162;D162;1110 1166 11BD;D162;1110 1166 11BD;
+D163;D163;1110 1166 11BE;D163;1110 1166 11BE;
+D164;D164;1110 1166 11BF;D164;1110 1166 11BF;
+D165;D165;1110 1166 11C0;D165;1110 1166 11C0;
+D166;D166;1110 1166 11C1;D166;1110 1166 11C1;
+D167;D167;1110 1166 11C2;D167;1110 1166 11C2;
+D168;D168;1110 1167;D168;1110 1167;
+D169;D169;1110 1167 11A8;D169;1110 1167 11A8;
+D16A;D16A;1110 1167 11A9;D16A;1110 1167 11A9;
+D16B;D16B;1110 1167 11AA;D16B;1110 1167 11AA;
+D16C;D16C;1110 1167 11AB;D16C;1110 1167 11AB;
+D16D;D16D;1110 1167 11AC;D16D;1110 1167 11AC;
+D16E;D16E;1110 1167 11AD;D16E;1110 1167 11AD;
+D16F;D16F;1110 1167 11AE;D16F;1110 1167 11AE;
+D170;D170;1110 1167 11AF;D170;1110 1167 11AF;
+D171;D171;1110 1167 11B0;D171;1110 1167 11B0;
+D172;D172;1110 1167 11B1;D172;1110 1167 11B1;
+D173;D173;1110 1167 11B2;D173;1110 1167 11B2;
+D174;D174;1110 1167 11B3;D174;1110 1167 11B3;
+D175;D175;1110 1167 11B4;D175;1110 1167 11B4;
+D176;D176;1110 1167 11B5;D176;1110 1167 11B5;
+D177;D177;1110 1167 11B6;D177;1110 1167 11B6;
+D178;D178;1110 1167 11B7;D178;1110 1167 11B7;
+D179;D179;1110 1167 11B8;D179;1110 1167 11B8;
+D17A;D17A;1110 1167 11B9;D17A;1110 1167 11B9;
+D17B;D17B;1110 1167 11BA;D17B;1110 1167 11BA;
+D17C;D17C;1110 1167 11BB;D17C;1110 1167 11BB;
+D17D;D17D;1110 1167 11BC;D17D;1110 1167 11BC;
+D17E;D17E;1110 1167 11BD;D17E;1110 1167 11BD;
+D17F;D17F;1110 1167 11BE;D17F;1110 1167 11BE;
+D180;D180;1110 1167 11BF;D180;1110 1167 11BF;
+D181;D181;1110 1167 11C0;D181;1110 1167 11C0;
+D182;D182;1110 1167 11C1;D182;1110 1167 11C1;
+D183;D183;1110 1167 11C2;D183;1110 1167 11C2;
+D184;D184;1110 1168;D184;1110 1168;
+D185;D185;1110 1168 11A8;D185;1110 1168 11A8;
+D186;D186;1110 1168 11A9;D186;1110 1168 11A9;
+D187;D187;1110 1168 11AA;D187;1110 1168 11AA;
+D188;D188;1110 1168 11AB;D188;1110 1168 11AB;
+D189;D189;1110 1168 11AC;D189;1110 1168 11AC;
+D18A;D18A;1110 1168 11AD;D18A;1110 1168 11AD;
+D18B;D18B;1110 1168 11AE;D18B;1110 1168 11AE;
+D18C;D18C;1110 1168 11AF;D18C;1110 1168 11AF;
+D18D;D18D;1110 1168 11B0;D18D;1110 1168 11B0;
+D18E;D18E;1110 1168 11B1;D18E;1110 1168 11B1;
+D18F;D18F;1110 1168 11B2;D18F;1110 1168 11B2;
+D190;D190;1110 1168 11B3;D190;1110 1168 11B3;
+D191;D191;1110 1168 11B4;D191;1110 1168 11B4;
+D192;D192;1110 1168 11B5;D192;1110 1168 11B5;
+D193;D193;1110 1168 11B6;D193;1110 1168 11B6;
+D194;D194;1110 1168 11B7;D194;1110 1168 11B7;
+D195;D195;1110 1168 11B8;D195;1110 1168 11B8;
+D196;D196;1110 1168 11B9;D196;1110 1168 11B9;
+D197;D197;1110 1168 11BA;D197;1110 1168 11BA;
+D198;D198;1110 1168 11BB;D198;1110 1168 11BB;
+D199;D199;1110 1168 11BC;D199;1110 1168 11BC;
+D19A;D19A;1110 1168 11BD;D19A;1110 1168 11BD;
+D19B;D19B;1110 1168 11BE;D19B;1110 1168 11BE;
+D19C;D19C;1110 1168 11BF;D19C;1110 1168 11BF;
+D19D;D19D;1110 1168 11C0;D19D;1110 1168 11C0;
+D19E;D19E;1110 1168 11C1;D19E;1110 1168 11C1;
+D19F;D19F;1110 1168 11C2;D19F;1110 1168 11C2;
+D1A0;D1A0;1110 1169;D1A0;1110 1169;
+D1A1;D1A1;1110 1169 11A8;D1A1;1110 1169 11A8;
+D1A2;D1A2;1110 1169 11A9;D1A2;1110 1169 11A9;
+D1A3;D1A3;1110 1169 11AA;D1A3;1110 1169 11AA;
+D1A4;D1A4;1110 1169 11AB;D1A4;1110 1169 11AB;
+D1A5;D1A5;1110 1169 11AC;D1A5;1110 1169 11AC;
+D1A6;D1A6;1110 1169 11AD;D1A6;1110 1169 11AD;
+D1A7;D1A7;1110 1169 11AE;D1A7;1110 1169 11AE;
+D1A8;D1A8;1110 1169 11AF;D1A8;1110 1169 11AF;
+D1A9;D1A9;1110 1169 11B0;D1A9;1110 1169 11B0;
+D1AA;D1AA;1110 1169 11B1;D1AA;1110 1169 11B1;
+D1AB;D1AB;1110 1169 11B2;D1AB;1110 1169 11B2;
+D1AC;D1AC;1110 1169 11B3;D1AC;1110 1169 11B3;
+D1AD;D1AD;1110 1169 11B4;D1AD;1110 1169 11B4;
+D1AE;D1AE;1110 1169 11B5;D1AE;1110 1169 11B5;
+D1AF;D1AF;1110 1169 11B6;D1AF;1110 1169 11B6;
+D1B0;D1B0;1110 1169 11B7;D1B0;1110 1169 11B7;
+D1B1;D1B1;1110 1169 11B8;D1B1;1110 1169 11B8;
+D1B2;D1B2;1110 1169 11B9;D1B2;1110 1169 11B9;
+D1B3;D1B3;1110 1169 11BA;D1B3;1110 1169 11BA;
+D1B4;D1B4;1110 1169 11BB;D1B4;1110 1169 11BB;
+D1B5;D1B5;1110 1169 11BC;D1B5;1110 1169 11BC;
+D1B6;D1B6;1110 1169 11BD;D1B6;1110 1169 11BD;
+D1B7;D1B7;1110 1169 11BE;D1B7;1110 1169 11BE;
+D1B8;D1B8;1110 1169 11BF;D1B8;1110 1169 11BF;
+D1B9;D1B9;1110 1169 11C0;D1B9;1110 1169 11C0;
+D1BA;D1BA;1110 1169 11C1;D1BA;1110 1169 11C1;
+D1BB;D1BB;1110 1169 11C2;D1BB;1110 1169 11C2;
+D1BC;D1BC;1110 116A;D1BC;1110 116A;
+D1BD;D1BD;1110 116A 11A8;D1BD;1110 116A 11A8;
+D1BE;D1BE;1110 116A 11A9;D1BE;1110 116A 11A9;
+D1BF;D1BF;1110 116A 11AA;D1BF;1110 116A 11AA;
+D1C0;D1C0;1110 116A 11AB;D1C0;1110 116A 11AB;
+D1C1;D1C1;1110 116A 11AC;D1C1;1110 116A 11AC;
+D1C2;D1C2;1110 116A 11AD;D1C2;1110 116A 11AD;
+D1C3;D1C3;1110 116A 11AE;D1C3;1110 116A 11AE;
+D1C4;D1C4;1110 116A 11AF;D1C4;1110 116A 11AF;
+D1C5;D1C5;1110 116A 11B0;D1C5;1110 116A 11B0;
+D1C6;D1C6;1110 116A 11B1;D1C6;1110 116A 11B1;
+D1C7;D1C7;1110 116A 11B2;D1C7;1110 116A 11B2;
+D1C8;D1C8;1110 116A 11B3;D1C8;1110 116A 11B3;
+D1C9;D1C9;1110 116A 11B4;D1C9;1110 116A 11B4;
+D1CA;D1CA;1110 116A 11B5;D1CA;1110 116A 11B5;
+D1CB;D1CB;1110 116A 11B6;D1CB;1110 116A 11B6;
+D1CC;D1CC;1110 116A 11B7;D1CC;1110 116A 11B7;
+D1CD;D1CD;1110 116A 11B8;D1CD;1110 116A 11B8;
+D1CE;D1CE;1110 116A 11B9;D1CE;1110 116A 11B9;
+D1CF;D1CF;1110 116A 11BA;D1CF;1110 116A 11BA;
+D1D0;D1D0;1110 116A 11BB;D1D0;1110 116A 11BB;
+D1D1;D1D1;1110 116A 11BC;D1D1;1110 116A 11BC;
+D1D2;D1D2;1110 116A 11BD;D1D2;1110 116A 11BD;
+D1D3;D1D3;1110 116A 11BE;D1D3;1110 116A 11BE;
+D1D4;D1D4;1110 116A 11BF;D1D4;1110 116A 11BF;
+D1D5;D1D5;1110 116A 11C0;D1D5;1110 116A 11C0;
+D1D6;D1D6;1110 116A 11C1;D1D6;1110 116A 11C1;
+D1D7;D1D7;1110 116A 11C2;D1D7;1110 116A 11C2;
+D1D8;D1D8;1110 116B;D1D8;1110 116B;
+D1D9;D1D9;1110 116B 11A8;D1D9;1110 116B 11A8;
+D1DA;D1DA;1110 116B 11A9;D1DA;1110 116B 11A9;
+D1DB;D1DB;1110 116B 11AA;D1DB;1110 116B 11AA;
+D1DC;D1DC;1110 116B 11AB;D1DC;1110 116B 11AB;
+D1DD;D1DD;1110 116B 11AC;D1DD;1110 116B 11AC;
+D1DE;D1DE;1110 116B 11AD;D1DE;1110 116B 11AD;
+D1DF;D1DF;1110 116B 11AE;D1DF;1110 116B 11AE;
+D1E0;D1E0;1110 116B 11AF;D1E0;1110 116B 11AF;
+D1E1;D1E1;1110 116B 11B0;D1E1;1110 116B 11B0;
+D1E2;D1E2;1110 116B 11B1;D1E2;1110 116B 11B1;
+D1E3;D1E3;1110 116B 11B2;D1E3;1110 116B 11B2;
+D1E4;D1E4;1110 116B 11B3;D1E4;1110 116B 11B3;
+D1E5;D1E5;1110 116B 11B4;D1E5;1110 116B 11B4;
+D1E6;D1E6;1110 116B 11B5;D1E6;1110 116B 11B5;
+D1E7;D1E7;1110 116B 11B6;D1E7;1110 116B 11B6;
+D1E8;D1E8;1110 116B 11B7;D1E8;1110 116B 11B7;
+D1E9;D1E9;1110 116B 11B8;D1E9;1110 116B 11B8;
+D1EA;D1EA;1110 116B 11B9;D1EA;1110 116B 11B9;
+D1EB;D1EB;1110 116B 11BA;D1EB;1110 116B 11BA;
+D1EC;D1EC;1110 116B 11BB;D1EC;1110 116B 11BB;
+D1ED;D1ED;1110 116B 11BC;D1ED;1110 116B 11BC;
+D1EE;D1EE;1110 116B 11BD;D1EE;1110 116B 11BD;
+D1EF;D1EF;1110 116B 11BE;D1EF;1110 116B 11BE;
+D1F0;D1F0;1110 116B 11BF;D1F0;1110 116B 11BF;
+D1F1;D1F1;1110 116B 11C0;D1F1;1110 116B 11C0;
+D1F2;D1F2;1110 116B 11C1;D1F2;1110 116B 11C1;
+D1F3;D1F3;1110 116B 11C2;D1F3;1110 116B 11C2;
+D1F4;D1F4;1110 116C;D1F4;1110 116C;
+D1F5;D1F5;1110 116C 11A8;D1F5;1110 116C 11A8;
+D1F6;D1F6;1110 116C 11A9;D1F6;1110 116C 11A9;
+D1F7;D1F7;1110 116C 11AA;D1F7;1110 116C 11AA;
+D1F8;D1F8;1110 116C 11AB;D1F8;1110 116C 11AB;
+D1F9;D1F9;1110 116C 11AC;D1F9;1110 116C 11AC;
+D1FA;D1FA;1110 116C 11AD;D1FA;1110 116C 11AD;
+D1FB;D1FB;1110 116C 11AE;D1FB;1110 116C 11AE;
+D1FC;D1FC;1110 116C 11AF;D1FC;1110 116C 11AF;
+D1FD;D1FD;1110 116C 11B0;D1FD;1110 116C 11B0;
+D1FE;D1FE;1110 116C 11B1;D1FE;1110 116C 11B1;
+D1FF;D1FF;1110 116C 11B2;D1FF;1110 116C 11B2;
+D200;D200;1110 116C 11B3;D200;1110 116C 11B3;
+D201;D201;1110 116C 11B4;D201;1110 116C 11B4;
+D202;D202;1110 116C 11B5;D202;1110 116C 11B5;
+D203;D203;1110 116C 11B6;D203;1110 116C 11B6;
+D204;D204;1110 116C 11B7;D204;1110 116C 11B7;
+D205;D205;1110 116C 11B8;D205;1110 116C 11B8;
+D206;D206;1110 116C 11B9;D206;1110 116C 11B9;
+D207;D207;1110 116C 11BA;D207;1110 116C 11BA;
+D208;D208;1110 116C 11BB;D208;1110 116C 11BB;
+D209;D209;1110 116C 11BC;D209;1110 116C 11BC;
+D20A;D20A;1110 116C 11BD;D20A;1110 116C 11BD;
+D20B;D20B;1110 116C 11BE;D20B;1110 116C 11BE;
+D20C;D20C;1110 116C 11BF;D20C;1110 116C 11BF;
+D20D;D20D;1110 116C 11C0;D20D;1110 116C 11C0;
+D20E;D20E;1110 116C 11C1;D20E;1110 116C 11C1;
+D20F;D20F;1110 116C 11C2;D20F;1110 116C 11C2;
+D210;D210;1110 116D;D210;1110 116D;
+D211;D211;1110 116D 11A8;D211;1110 116D 11A8;
+D212;D212;1110 116D 11A9;D212;1110 116D 11A9;
+D213;D213;1110 116D 11AA;D213;1110 116D 11AA;
+D214;D214;1110 116D 11AB;D214;1110 116D 11AB;
+D215;D215;1110 116D 11AC;D215;1110 116D 11AC;
+D216;D216;1110 116D 11AD;D216;1110 116D 11AD;
+D217;D217;1110 116D 11AE;D217;1110 116D 11AE;
+D218;D218;1110 116D 11AF;D218;1110 116D 11AF;
+D219;D219;1110 116D 11B0;D219;1110 116D 11B0;
+D21A;D21A;1110 116D 11B1;D21A;1110 116D 11B1;
+D21B;D21B;1110 116D 11B2;D21B;1110 116D 11B2;
+D21C;D21C;1110 116D 11B3;D21C;1110 116D 11B3;
+D21D;D21D;1110 116D 11B4;D21D;1110 116D 11B4;
+D21E;D21E;1110 116D 11B5;D21E;1110 116D 11B5;
+D21F;D21F;1110 116D 11B6;D21F;1110 116D 11B6;
+D220;D220;1110 116D 11B7;D220;1110 116D 11B7;
+D221;D221;1110 116D 11B8;D221;1110 116D 11B8;
+D222;D222;1110 116D 11B9;D222;1110 116D 11B9;
+D223;D223;1110 116D 11BA;D223;1110 116D 11BA;
+D224;D224;1110 116D 11BB;D224;1110 116D 11BB;
+D225;D225;1110 116D 11BC;D225;1110 116D 11BC;
+D226;D226;1110 116D 11BD;D226;1110 116D 11BD;
+D227;D227;1110 116D 11BE;D227;1110 116D 11BE;
+D228;D228;1110 116D 11BF;D228;1110 116D 11BF;
+D229;D229;1110 116D 11C0;D229;1110 116D 11C0;
+D22A;D22A;1110 116D 11C1;D22A;1110 116D 11C1;
+D22B;D22B;1110 116D 11C2;D22B;1110 116D 11C2;
+D22C;D22C;1110 116E;D22C;1110 116E;
+D22D;D22D;1110 116E 11A8;D22D;1110 116E 11A8;
+D22E;D22E;1110 116E 11A9;D22E;1110 116E 11A9;
+D22F;D22F;1110 116E 11AA;D22F;1110 116E 11AA;
+D230;D230;1110 116E 11AB;D230;1110 116E 11AB;
+D231;D231;1110 116E 11AC;D231;1110 116E 11AC;
+D232;D232;1110 116E 11AD;D232;1110 116E 11AD;
+D233;D233;1110 116E 11AE;D233;1110 116E 11AE;
+D234;D234;1110 116E 11AF;D234;1110 116E 11AF;
+D235;D235;1110 116E 11B0;D235;1110 116E 11B0;
+D236;D236;1110 116E 11B1;D236;1110 116E 11B1;
+D237;D237;1110 116E 11B2;D237;1110 116E 11B2;
+D238;D238;1110 116E 11B3;D238;1110 116E 11B3;
+D239;D239;1110 116E 11B4;D239;1110 116E 11B4;
+D23A;D23A;1110 116E 11B5;D23A;1110 116E 11B5;
+D23B;D23B;1110 116E 11B6;D23B;1110 116E 11B6;
+D23C;D23C;1110 116E 11B7;D23C;1110 116E 11B7;
+D23D;D23D;1110 116E 11B8;D23D;1110 116E 11B8;
+D23E;D23E;1110 116E 11B9;D23E;1110 116E 11B9;
+D23F;D23F;1110 116E 11BA;D23F;1110 116E 11BA;
+D240;D240;1110 116E 11BB;D240;1110 116E 11BB;
+D241;D241;1110 116E 11BC;D241;1110 116E 11BC;
+D242;D242;1110 116E 11BD;D242;1110 116E 11BD;
+D243;D243;1110 116E 11BE;D243;1110 116E 11BE;
+D244;D244;1110 116E 11BF;D244;1110 116E 11BF;
+D245;D245;1110 116E 11C0;D245;1110 116E 11C0;
+D246;D246;1110 116E 11C1;D246;1110 116E 11C1;
+D247;D247;1110 116E 11C2;D247;1110 116E 11C2;
+D248;D248;1110 116F;D248;1110 116F;
+D249;D249;1110 116F 11A8;D249;1110 116F 11A8;
+D24A;D24A;1110 116F 11A9;D24A;1110 116F 11A9;
+D24B;D24B;1110 116F 11AA;D24B;1110 116F 11AA;
+D24C;D24C;1110 116F 11AB;D24C;1110 116F 11AB;
+D24D;D24D;1110 116F 11AC;D24D;1110 116F 11AC;
+D24E;D24E;1110 116F 11AD;D24E;1110 116F 11AD;
+D24F;D24F;1110 116F 11AE;D24F;1110 116F 11AE;
+D250;D250;1110 116F 11AF;D250;1110 116F 11AF;
+D251;D251;1110 116F 11B0;D251;1110 116F 11B0;
+D252;D252;1110 116F 11B1;D252;1110 116F 11B1;
+D253;D253;1110 116F 11B2;D253;1110 116F 11B2;
+D254;D254;1110 116F 11B3;D254;1110 116F 11B3;
+D255;D255;1110 116F 11B4;D255;1110 116F 11B4;
+D256;D256;1110 116F 11B5;D256;1110 116F 11B5;
+D257;D257;1110 116F 11B6;D257;1110 116F 11B6;
+D258;D258;1110 116F 11B7;D258;1110 116F 11B7;
+D259;D259;1110 116F 11B8;D259;1110 116F 11B8;
+D25A;D25A;1110 116F 11B9;D25A;1110 116F 11B9;
+D25B;D25B;1110 116F 11BA;D25B;1110 116F 11BA;
+D25C;D25C;1110 116F 11BB;D25C;1110 116F 11BB;
+D25D;D25D;1110 116F 11BC;D25D;1110 116F 11BC;
+D25E;D25E;1110 116F 11BD;D25E;1110 116F 11BD;
+D25F;D25F;1110 116F 11BE;D25F;1110 116F 11BE;
+D260;D260;1110 116F 11BF;D260;1110 116F 11BF;
+D261;D261;1110 116F 11C0;D261;1110 116F 11C0;
+D262;D262;1110 116F 11C1;D262;1110 116F 11C1;
+D263;D263;1110 116F 11C2;D263;1110 116F 11C2;
+D264;D264;1110 1170;D264;1110 1170;
+D265;D265;1110 1170 11A8;D265;1110 1170 11A8;
+D266;D266;1110 1170 11A9;D266;1110 1170 11A9;
+D267;D267;1110 1170 11AA;D267;1110 1170 11AA;
+D268;D268;1110 1170 11AB;D268;1110 1170 11AB;
+D269;D269;1110 1170 11AC;D269;1110 1170 11AC;
+D26A;D26A;1110 1170 11AD;D26A;1110 1170 11AD;
+D26B;D26B;1110 1170 11AE;D26B;1110 1170 11AE;
+D26C;D26C;1110 1170 11AF;D26C;1110 1170 11AF;
+D26D;D26D;1110 1170 11B0;D26D;1110 1170 11B0;
+D26E;D26E;1110 1170 11B1;D26E;1110 1170 11B1;
+D26F;D26F;1110 1170 11B2;D26F;1110 1170 11B2;
+D270;D270;1110 1170 11B3;D270;1110 1170 11B3;
+D271;D271;1110 1170 11B4;D271;1110 1170 11B4;
+D272;D272;1110 1170 11B5;D272;1110 1170 11B5;
+D273;D273;1110 1170 11B6;D273;1110 1170 11B6;
+D274;D274;1110 1170 11B7;D274;1110 1170 11B7;
+D275;D275;1110 1170 11B8;D275;1110 1170 11B8;
+D276;D276;1110 1170 11B9;D276;1110 1170 11B9;
+D277;D277;1110 1170 11BA;D277;1110 1170 11BA;
+D278;D278;1110 1170 11BB;D278;1110 1170 11BB;
+D279;D279;1110 1170 11BC;D279;1110 1170 11BC;
+D27A;D27A;1110 1170 11BD;D27A;1110 1170 11BD;
+D27B;D27B;1110 1170 11BE;D27B;1110 1170 11BE;
+D27C;D27C;1110 1170 11BF;D27C;1110 1170 11BF;
+D27D;D27D;1110 1170 11C0;D27D;1110 1170 11C0;
+D27E;D27E;1110 1170 11C1;D27E;1110 1170 11C1;
+D27F;D27F;1110 1170 11C2;D27F;1110 1170 11C2;
+D280;D280;1110 1171;D280;1110 1171;
+D281;D281;1110 1171 11A8;D281;1110 1171 11A8;
+D282;D282;1110 1171 11A9;D282;1110 1171 11A9;
+D283;D283;1110 1171 11AA;D283;1110 1171 11AA;
+D284;D284;1110 1171 11AB;D284;1110 1171 11AB;
+D285;D285;1110 1171 11AC;D285;1110 1171 11AC;
+D286;D286;1110 1171 11AD;D286;1110 1171 11AD;
+D287;D287;1110 1171 11AE;D287;1110 1171 11AE;
+D288;D288;1110 1171 11AF;D288;1110 1171 11AF;
+D289;D289;1110 1171 11B0;D289;1110 1171 11B0;
+D28A;D28A;1110 1171 11B1;D28A;1110 1171 11B1;
+D28B;D28B;1110 1171 11B2;D28B;1110 1171 11B2;
+D28C;D28C;1110 1171 11B3;D28C;1110 1171 11B3;
+D28D;D28D;1110 1171 11B4;D28D;1110 1171 11B4;
+D28E;D28E;1110 1171 11B5;D28E;1110 1171 11B5;
+D28F;D28F;1110 1171 11B6;D28F;1110 1171 11B6;
+D290;D290;1110 1171 11B7;D290;1110 1171 11B7;
+D291;D291;1110 1171 11B8;D291;1110 1171 11B8;
+D292;D292;1110 1171 11B9;D292;1110 1171 11B9;
+D293;D293;1110 1171 11BA;D293;1110 1171 11BA;
+D294;D294;1110 1171 11BB;D294;1110 1171 11BB;
+D295;D295;1110 1171 11BC;D295;1110 1171 11BC;
+D296;D296;1110 1171 11BD;D296;1110 1171 11BD;
+D297;D297;1110 1171 11BE;D297;1110 1171 11BE;
+D298;D298;1110 1171 11BF;D298;1110 1171 11BF;
+D299;D299;1110 1171 11C0;D299;1110 1171 11C0;
+D29A;D29A;1110 1171 11C1;D29A;1110 1171 11C1;
+D29B;D29B;1110 1171 11C2;D29B;1110 1171 11C2;
+D29C;D29C;1110 1172;D29C;1110 1172;
+D29D;D29D;1110 1172 11A8;D29D;1110 1172 11A8;
+D29E;D29E;1110 1172 11A9;D29E;1110 1172 11A9;
+D29F;D29F;1110 1172 11AA;D29F;1110 1172 11AA;
+D2A0;D2A0;1110 1172 11AB;D2A0;1110 1172 11AB;
+D2A1;D2A1;1110 1172 11AC;D2A1;1110 1172 11AC;
+D2A2;D2A2;1110 1172 11AD;D2A2;1110 1172 11AD;
+D2A3;D2A3;1110 1172 11AE;D2A3;1110 1172 11AE;
+D2A4;D2A4;1110 1172 11AF;D2A4;1110 1172 11AF;
+D2A5;D2A5;1110 1172 11B0;D2A5;1110 1172 11B0;
+D2A6;D2A6;1110 1172 11B1;D2A6;1110 1172 11B1;
+D2A7;D2A7;1110 1172 11B2;D2A7;1110 1172 11B2;
+D2A8;D2A8;1110 1172 11B3;D2A8;1110 1172 11B3;
+D2A9;D2A9;1110 1172 11B4;D2A9;1110 1172 11B4;
+D2AA;D2AA;1110 1172 11B5;D2AA;1110 1172 11B5;
+D2AB;D2AB;1110 1172 11B6;D2AB;1110 1172 11B6;
+D2AC;D2AC;1110 1172 11B7;D2AC;1110 1172 11B7;
+D2AD;D2AD;1110 1172 11B8;D2AD;1110 1172 11B8;
+D2AE;D2AE;1110 1172 11B9;D2AE;1110 1172 11B9;
+D2AF;D2AF;1110 1172 11BA;D2AF;1110 1172 11BA;
+D2B0;D2B0;1110 1172 11BB;D2B0;1110 1172 11BB;
+D2B1;D2B1;1110 1172 11BC;D2B1;1110 1172 11BC;
+D2B2;D2B2;1110 1172 11BD;D2B2;1110 1172 11BD;
+D2B3;D2B3;1110 1172 11BE;D2B3;1110 1172 11BE;
+D2B4;D2B4;1110 1172 11BF;D2B4;1110 1172 11BF;
+D2B5;D2B5;1110 1172 11C0;D2B5;1110 1172 11C0;
+D2B6;D2B6;1110 1172 11C1;D2B6;1110 1172 11C1;
+D2B7;D2B7;1110 1172 11C2;D2B7;1110 1172 11C2;
+D2B8;D2B8;1110 1173;D2B8;1110 1173;
+D2B9;D2B9;1110 1173 11A8;D2B9;1110 1173 11A8;
+D2BA;D2BA;1110 1173 11A9;D2BA;1110 1173 11A9;
+D2BB;D2BB;1110 1173 11AA;D2BB;1110 1173 11AA;
+D2BC;D2BC;1110 1173 11AB;D2BC;1110 1173 11AB;
+D2BD;D2BD;1110 1173 11AC;D2BD;1110 1173 11AC;
+D2BE;D2BE;1110 1173 11AD;D2BE;1110 1173 11AD;
+D2BF;D2BF;1110 1173 11AE;D2BF;1110 1173 11AE;
+D2C0;D2C0;1110 1173 11AF;D2C0;1110 1173 11AF;
+D2C1;D2C1;1110 1173 11B0;D2C1;1110 1173 11B0;
+D2C2;D2C2;1110 1173 11B1;D2C2;1110 1173 11B1;
+D2C3;D2C3;1110 1173 11B2;D2C3;1110 1173 11B2;
+D2C4;D2C4;1110 1173 11B3;D2C4;1110 1173 11B3;
+D2C5;D2C5;1110 1173 11B4;D2C5;1110 1173 11B4;
+D2C6;D2C6;1110 1173 11B5;D2C6;1110 1173 11B5;
+D2C7;D2C7;1110 1173 11B6;D2C7;1110 1173 11B6;
+D2C8;D2C8;1110 1173 11B7;D2C8;1110 1173 11B7;
+D2C9;D2C9;1110 1173 11B8;D2C9;1110 1173 11B8;
+D2CA;D2CA;1110 1173 11B9;D2CA;1110 1173 11B9;
+D2CB;D2CB;1110 1173 11BA;D2CB;1110 1173 11BA;
+D2CC;D2CC;1110 1173 11BB;D2CC;1110 1173 11BB;
+D2CD;D2CD;1110 1173 11BC;D2CD;1110 1173 11BC;
+D2CE;D2CE;1110 1173 11BD;D2CE;1110 1173 11BD;
+D2CF;D2CF;1110 1173 11BE;D2CF;1110 1173 11BE;
+D2D0;D2D0;1110 1173 11BF;D2D0;1110 1173 11BF;
+D2D1;D2D1;1110 1173 11C0;D2D1;1110 1173 11C0;
+D2D2;D2D2;1110 1173 11C1;D2D2;1110 1173 11C1;
+D2D3;D2D3;1110 1173 11C2;D2D3;1110 1173 11C2;
+D2D4;D2D4;1110 1174;D2D4;1110 1174;
+D2D5;D2D5;1110 1174 11A8;D2D5;1110 1174 11A8;
+D2D6;D2D6;1110 1174 11A9;D2D6;1110 1174 11A9;
+D2D7;D2D7;1110 1174 11AA;D2D7;1110 1174 11AA;
+D2D8;D2D8;1110 1174 11AB;D2D8;1110 1174 11AB;
+D2D9;D2D9;1110 1174 11AC;D2D9;1110 1174 11AC;
+D2DA;D2DA;1110 1174 11AD;D2DA;1110 1174 11AD;
+D2DB;D2DB;1110 1174 11AE;D2DB;1110 1174 11AE;
+D2DC;D2DC;1110 1174 11AF;D2DC;1110 1174 11AF;
+D2DD;D2DD;1110 1174 11B0;D2DD;1110 1174 11B0;
+D2DE;D2DE;1110 1174 11B1;D2DE;1110 1174 11B1;
+D2DF;D2DF;1110 1174 11B2;D2DF;1110 1174 11B2;
+D2E0;D2E0;1110 1174 11B3;D2E0;1110 1174 11B3;
+D2E1;D2E1;1110 1174 11B4;D2E1;1110 1174 11B4;
+D2E2;D2E2;1110 1174 11B5;D2E2;1110 1174 11B5;
+D2E3;D2E3;1110 1174 11B6;D2E3;1110 1174 11B6;
+D2E4;D2E4;1110 1174 11B7;D2E4;1110 1174 11B7;
+D2E5;D2E5;1110 1174 11B8;D2E5;1110 1174 11B8;
+D2E6;D2E6;1110 1174 11B9;D2E6;1110 1174 11B9;
+D2E7;D2E7;1110 1174 11BA;D2E7;1110 1174 11BA;
+D2E8;D2E8;1110 1174 11BB;D2E8;1110 1174 11BB;
+D2E9;D2E9;1110 1174 11BC;D2E9;1110 1174 11BC;
+D2EA;D2EA;1110 1174 11BD;D2EA;1110 1174 11BD;
+D2EB;D2EB;1110 1174 11BE;D2EB;1110 1174 11BE;
+D2EC;D2EC;1110 1174 11BF;D2EC;1110 1174 11BF;
+D2ED;D2ED;1110 1174 11C0;D2ED;1110 1174 11C0;
+D2EE;D2EE;1110 1174 11C1;D2EE;1110 1174 11C1;
+D2EF;D2EF;1110 1174 11C2;D2EF;1110 1174 11C2;
+D2F0;D2F0;1110 1175;D2F0;1110 1175;
+D2F1;D2F1;1110 1175 11A8;D2F1;1110 1175 11A8;
+D2F2;D2F2;1110 1175 11A9;D2F2;1110 1175 11A9;
+D2F3;D2F3;1110 1175 11AA;D2F3;1110 1175 11AA;
+D2F4;D2F4;1110 1175 11AB;D2F4;1110 1175 11AB;
+D2F5;D2F5;1110 1175 11AC;D2F5;1110 1175 11AC;
+D2F6;D2F6;1110 1175 11AD;D2F6;1110 1175 11AD;
+D2F7;D2F7;1110 1175 11AE;D2F7;1110 1175 11AE;
+D2F8;D2F8;1110 1175 11AF;D2F8;1110 1175 11AF;
+D2F9;D2F9;1110 1175 11B0;D2F9;1110 1175 11B0;
+D2FA;D2FA;1110 1175 11B1;D2FA;1110 1175 11B1;
+D2FB;D2FB;1110 1175 11B2;D2FB;1110 1175 11B2;
+D2FC;D2FC;1110 1175 11B3;D2FC;1110 1175 11B3;
+D2FD;D2FD;1110 1175 11B4;D2FD;1110 1175 11B4;
+D2FE;D2FE;1110 1175 11B5;D2FE;1110 1175 11B5;
+D2FF;D2FF;1110 1175 11B6;D2FF;1110 1175 11B6;
+D300;D300;1110 1175 11B7;D300;1110 1175 11B7;
+D301;D301;1110 1175 11B8;D301;1110 1175 11B8;
+D302;D302;1110 1175 11B9;D302;1110 1175 11B9;
+D303;D303;1110 1175 11BA;D303;1110 1175 11BA;
+D304;D304;1110 1175 11BB;D304;1110 1175 11BB;
+D305;D305;1110 1175 11BC;D305;1110 1175 11BC;
+D306;D306;1110 1175 11BD;D306;1110 1175 11BD;
+D307;D307;1110 1175 11BE;D307;1110 1175 11BE;
+D308;D308;1110 1175 11BF;D308;1110 1175 11BF;
+D309;D309;1110 1175 11C0;D309;1110 1175 11C0;
+D30A;D30A;1110 1175 11C1;D30A;1110 1175 11C1;
+D30B;D30B;1110 1175 11C2;D30B;1110 1175 11C2;
+D30C;D30C;1111 1161;D30C;1111 1161;
+D30D;D30D;1111 1161 11A8;D30D;1111 1161 11A8;
+D30E;D30E;1111 1161 11A9;D30E;1111 1161 11A9;
+D30F;D30F;1111 1161 11AA;D30F;1111 1161 11AA;
+D310;D310;1111 1161 11AB;D310;1111 1161 11AB;
+D311;D311;1111 1161 11AC;D311;1111 1161 11AC;
+D312;D312;1111 1161 11AD;D312;1111 1161 11AD;
+D313;D313;1111 1161 11AE;D313;1111 1161 11AE;
+D314;D314;1111 1161 11AF;D314;1111 1161 11AF;
+D315;D315;1111 1161 11B0;D315;1111 1161 11B0;
+D316;D316;1111 1161 11B1;D316;1111 1161 11B1;
+D317;D317;1111 1161 11B2;D317;1111 1161 11B2;
+D318;D318;1111 1161 11B3;D318;1111 1161 11B3;
+D319;D319;1111 1161 11B4;D319;1111 1161 11B4;
+D31A;D31A;1111 1161 11B5;D31A;1111 1161 11B5;
+D31B;D31B;1111 1161 11B6;D31B;1111 1161 11B6;
+D31C;D31C;1111 1161 11B7;D31C;1111 1161 11B7;
+D31D;D31D;1111 1161 11B8;D31D;1111 1161 11B8;
+D31E;D31E;1111 1161 11B9;D31E;1111 1161 11B9;
+D31F;D31F;1111 1161 11BA;D31F;1111 1161 11BA;
+D320;D320;1111 1161 11BB;D320;1111 1161 11BB;
+D321;D321;1111 1161 11BC;D321;1111 1161 11BC;
+D322;D322;1111 1161 11BD;D322;1111 1161 11BD;
+D323;D323;1111 1161 11BE;D323;1111 1161 11BE;
+D324;D324;1111 1161 11BF;D324;1111 1161 11BF;
+D325;D325;1111 1161 11C0;D325;1111 1161 11C0;
+D326;D326;1111 1161 11C1;D326;1111 1161 11C1;
+D327;D327;1111 1161 11C2;D327;1111 1161 11C2;
+D328;D328;1111 1162;D328;1111 1162;
+D329;D329;1111 1162 11A8;D329;1111 1162 11A8;
+D32A;D32A;1111 1162 11A9;D32A;1111 1162 11A9;
+D32B;D32B;1111 1162 11AA;D32B;1111 1162 11AA;
+D32C;D32C;1111 1162 11AB;D32C;1111 1162 11AB;
+D32D;D32D;1111 1162 11AC;D32D;1111 1162 11AC;
+D32E;D32E;1111 1162 11AD;D32E;1111 1162 11AD;
+D32F;D32F;1111 1162 11AE;D32F;1111 1162 11AE;
+D330;D330;1111 1162 11AF;D330;1111 1162 11AF;
+D331;D331;1111 1162 11B0;D331;1111 1162 11B0;
+D332;D332;1111 1162 11B1;D332;1111 1162 11B1;
+D333;D333;1111 1162 11B2;D333;1111 1162 11B2;
+D334;D334;1111 1162 11B3;D334;1111 1162 11B3;
+D335;D335;1111 1162 11B4;D335;1111 1162 11B4;
+D336;D336;1111 1162 11B5;D336;1111 1162 11B5;
+D337;D337;1111 1162 11B6;D337;1111 1162 11B6;
+D338;D338;1111 1162 11B7;D338;1111 1162 11B7;
+D339;D339;1111 1162 11B8;D339;1111 1162 11B8;
+D33A;D33A;1111 1162 11B9;D33A;1111 1162 11B9;
+D33B;D33B;1111 1162 11BA;D33B;1111 1162 11BA;
+D33C;D33C;1111 1162 11BB;D33C;1111 1162 11BB;
+D33D;D33D;1111 1162 11BC;D33D;1111 1162 11BC;
+D33E;D33E;1111 1162 11BD;D33E;1111 1162 11BD;
+D33F;D33F;1111 1162 11BE;D33F;1111 1162 11BE;
+D340;D340;1111 1162 11BF;D340;1111 1162 11BF;
+D341;D341;1111 1162 11C0;D341;1111 1162 11C0;
+D342;D342;1111 1162 11C1;D342;1111 1162 11C1;
+D343;D343;1111 1162 11C2;D343;1111 1162 11C2;
+D344;D344;1111 1163;D344;1111 1163;
+D345;D345;1111 1163 11A8;D345;1111 1163 11A8;
+D346;D346;1111 1163 11A9;D346;1111 1163 11A9;
+D347;D347;1111 1163 11AA;D347;1111 1163 11AA;
+D348;D348;1111 1163 11AB;D348;1111 1163 11AB;
+D349;D349;1111 1163 11AC;D349;1111 1163 11AC;
+D34A;D34A;1111 1163 11AD;D34A;1111 1163 11AD;
+D34B;D34B;1111 1163 11AE;D34B;1111 1163 11AE;
+D34C;D34C;1111 1163 11AF;D34C;1111 1163 11AF;
+D34D;D34D;1111 1163 11B0;D34D;1111 1163 11B0;
+D34E;D34E;1111 1163 11B1;D34E;1111 1163 11B1;
+D34F;D34F;1111 1163 11B2;D34F;1111 1163 11B2;
+D350;D350;1111 1163 11B3;D350;1111 1163 11B3;
+D351;D351;1111 1163 11B4;D351;1111 1163 11B4;
+D352;D352;1111 1163 11B5;D352;1111 1163 11B5;
+D353;D353;1111 1163 11B6;D353;1111 1163 11B6;
+D354;D354;1111 1163 11B7;D354;1111 1163 11B7;
+D355;D355;1111 1163 11B8;D355;1111 1163 11B8;
+D356;D356;1111 1163 11B9;D356;1111 1163 11B9;
+D357;D357;1111 1163 11BA;D357;1111 1163 11BA;
+D358;D358;1111 1163 11BB;D358;1111 1163 11BB;
+D359;D359;1111 1163 11BC;D359;1111 1163 11BC;
+D35A;D35A;1111 1163 11BD;D35A;1111 1163 11BD;
+D35B;D35B;1111 1163 11BE;D35B;1111 1163 11BE;
+D35C;D35C;1111 1163 11BF;D35C;1111 1163 11BF;
+D35D;D35D;1111 1163 11C0;D35D;1111 1163 11C0;
+D35E;D35E;1111 1163 11C1;D35E;1111 1163 11C1;
+D35F;D35F;1111 1163 11C2;D35F;1111 1163 11C2;
+D360;D360;1111 1164;D360;1111 1164;
+D361;D361;1111 1164 11A8;D361;1111 1164 11A8;
+D362;D362;1111 1164 11A9;D362;1111 1164 11A9;
+D363;D363;1111 1164 11AA;D363;1111 1164 11AA;
+D364;D364;1111 1164 11AB;D364;1111 1164 11AB;
+D365;D365;1111 1164 11AC;D365;1111 1164 11AC;
+D366;D366;1111 1164 11AD;D366;1111 1164 11AD;
+D367;D367;1111 1164 11AE;D367;1111 1164 11AE;
+D368;D368;1111 1164 11AF;D368;1111 1164 11AF;
+D369;D369;1111 1164 11B0;D369;1111 1164 11B0;
+D36A;D36A;1111 1164 11B1;D36A;1111 1164 11B1;
+D36B;D36B;1111 1164 11B2;D36B;1111 1164 11B2;
+D36C;D36C;1111 1164 11B3;D36C;1111 1164 11B3;
+D36D;D36D;1111 1164 11B4;D36D;1111 1164 11B4;
+D36E;D36E;1111 1164 11B5;D36E;1111 1164 11B5;
+D36F;D36F;1111 1164 11B6;D36F;1111 1164 11B6;
+D370;D370;1111 1164 11B7;D370;1111 1164 11B7;
+D371;D371;1111 1164 11B8;D371;1111 1164 11B8;
+D372;D372;1111 1164 11B9;D372;1111 1164 11B9;
+D373;D373;1111 1164 11BA;D373;1111 1164 11BA;
+D374;D374;1111 1164 11BB;D374;1111 1164 11BB;
+D375;D375;1111 1164 11BC;D375;1111 1164 11BC;
+D376;D376;1111 1164 11BD;D376;1111 1164 11BD;
+D377;D377;1111 1164 11BE;D377;1111 1164 11BE;
+D378;D378;1111 1164 11BF;D378;1111 1164 11BF;
+D379;D379;1111 1164 11C0;D379;1111 1164 11C0;
+D37A;D37A;1111 1164 11C1;D37A;1111 1164 11C1;
+D37B;D37B;1111 1164 11C2;D37B;1111 1164 11C2;
+D37C;D37C;1111 1165;D37C;1111 1165;
+D37D;D37D;1111 1165 11A8;D37D;1111 1165 11A8;
+D37E;D37E;1111 1165 11A9;D37E;1111 1165 11A9;
+D37F;D37F;1111 1165 11AA;D37F;1111 1165 11AA;
+D380;D380;1111 1165 11AB;D380;1111 1165 11AB;
+D381;D381;1111 1165 11AC;D381;1111 1165 11AC;
+D382;D382;1111 1165 11AD;D382;1111 1165 11AD;
+D383;D383;1111 1165 11AE;D383;1111 1165 11AE;
+D384;D384;1111 1165 11AF;D384;1111 1165 11AF;
+D385;D385;1111 1165 11B0;D385;1111 1165 11B0;
+D386;D386;1111 1165 11B1;D386;1111 1165 11B1;
+D387;D387;1111 1165 11B2;D387;1111 1165 11B2;
+D388;D388;1111 1165 11B3;D388;1111 1165 11B3;
+D389;D389;1111 1165 11B4;D389;1111 1165 11B4;
+D38A;D38A;1111 1165 11B5;D38A;1111 1165 11B5;
+D38B;D38B;1111 1165 11B6;D38B;1111 1165 11B6;
+D38C;D38C;1111 1165 11B7;D38C;1111 1165 11B7;
+D38D;D38D;1111 1165 11B8;D38D;1111 1165 11B8;
+D38E;D38E;1111 1165 11B9;D38E;1111 1165 11B9;
+D38F;D38F;1111 1165 11BA;D38F;1111 1165 11BA;
+D390;D390;1111 1165 11BB;D390;1111 1165 11BB;
+D391;D391;1111 1165 11BC;D391;1111 1165 11BC;
+D392;D392;1111 1165 11BD;D392;1111 1165 11BD;
+D393;D393;1111 1165 11BE;D393;1111 1165 11BE;
+D394;D394;1111 1165 11BF;D394;1111 1165 11BF;
+D395;D395;1111 1165 11C0;D395;1111 1165 11C0;
+D396;D396;1111 1165 11C1;D396;1111 1165 11C1;
+D397;D397;1111 1165 11C2;D397;1111 1165 11C2;
+D398;D398;1111 1166;D398;1111 1166;
+D399;D399;1111 1166 11A8;D399;1111 1166 11A8;
+D39A;D39A;1111 1166 11A9;D39A;1111 1166 11A9;
+D39B;D39B;1111 1166 11AA;D39B;1111 1166 11AA;
+D39C;D39C;1111 1166 11AB;D39C;1111 1166 11AB;
+D39D;D39D;1111 1166 11AC;D39D;1111 1166 11AC;
+D39E;D39E;1111 1166 11AD;D39E;1111 1166 11AD;
+D39F;D39F;1111 1166 11AE;D39F;1111 1166 11AE;
+D3A0;D3A0;1111 1166 11AF;D3A0;1111 1166 11AF;
+D3A1;D3A1;1111 1166 11B0;D3A1;1111 1166 11B0;
+D3A2;D3A2;1111 1166 11B1;D3A2;1111 1166 11B1;
+D3A3;D3A3;1111 1166 11B2;D3A3;1111 1166 11B2;
+D3A4;D3A4;1111 1166 11B3;D3A4;1111 1166 11B3;
+D3A5;D3A5;1111 1166 11B4;D3A5;1111 1166 11B4;
+D3A6;D3A6;1111 1166 11B5;D3A6;1111 1166 11B5;
+D3A7;D3A7;1111 1166 11B6;D3A7;1111 1166 11B6;
+D3A8;D3A8;1111 1166 11B7;D3A8;1111 1166 11B7;
+D3A9;D3A9;1111 1166 11B8;D3A9;1111 1166 11B8;
+D3AA;D3AA;1111 1166 11B9;D3AA;1111 1166 11B9;
+D3AB;D3AB;1111 1166 11BA;D3AB;1111 1166 11BA;
+D3AC;D3AC;1111 1166 11BB;D3AC;1111 1166 11BB;
+D3AD;D3AD;1111 1166 11BC;D3AD;1111 1166 11BC;
+D3AE;D3AE;1111 1166 11BD;D3AE;1111 1166 11BD;
+D3AF;D3AF;1111 1166 11BE;D3AF;1111 1166 11BE;
+D3B0;D3B0;1111 1166 11BF;D3B0;1111 1166 11BF;
+D3B1;D3B1;1111 1166 11C0;D3B1;1111 1166 11C0;
+D3B2;D3B2;1111 1166 11C1;D3B2;1111 1166 11C1;
+D3B3;D3B3;1111 1166 11C2;D3B3;1111 1166 11C2;
+D3B4;D3B4;1111 1167;D3B4;1111 1167;
+D3B5;D3B5;1111 1167 11A8;D3B5;1111 1167 11A8;
+D3B6;D3B6;1111 1167 11A9;D3B6;1111 1167 11A9;
+D3B7;D3B7;1111 1167 11AA;D3B7;1111 1167 11AA;
+D3B8;D3B8;1111 1167 11AB;D3B8;1111 1167 11AB;
+D3B9;D3B9;1111 1167 11AC;D3B9;1111 1167 11AC;
+D3BA;D3BA;1111 1167 11AD;D3BA;1111 1167 11AD;
+D3BB;D3BB;1111 1167 11AE;D3BB;1111 1167 11AE;
+D3BC;D3BC;1111 1167 11AF;D3BC;1111 1167 11AF;
+D3BD;D3BD;1111 1167 11B0;D3BD;1111 1167 11B0;
+D3BE;D3BE;1111 1167 11B1;D3BE;1111 1167 11B1;
+D3BF;D3BF;1111 1167 11B2;D3BF;1111 1167 11B2;
+D3C0;D3C0;1111 1167 11B3;D3C0;1111 1167 11B3;
+D3C1;D3C1;1111 1167 11B4;D3C1;1111 1167 11B4;
+D3C2;D3C2;1111 1167 11B5;D3C2;1111 1167 11B5;
+D3C3;D3C3;1111 1167 11B6;D3C3;1111 1167 11B6;
+D3C4;D3C4;1111 1167 11B7;D3C4;1111 1167 11B7;
+D3C5;D3C5;1111 1167 11B8;D3C5;1111 1167 11B8;
+D3C6;D3C6;1111 1167 11B9;D3C6;1111 1167 11B9;
+D3C7;D3C7;1111 1167 11BA;D3C7;1111 1167 11BA;
+D3C8;D3C8;1111 1167 11BB;D3C8;1111 1167 11BB;
+D3C9;D3C9;1111 1167 11BC;D3C9;1111 1167 11BC;
+D3CA;D3CA;1111 1167 11BD;D3CA;1111 1167 11BD;
+D3CB;D3CB;1111 1167 11BE;D3CB;1111 1167 11BE;
+D3CC;D3CC;1111 1167 11BF;D3CC;1111 1167 11BF;
+D3CD;D3CD;1111 1167 11C0;D3CD;1111 1167 11C0;
+D3CE;D3CE;1111 1167 11C1;D3CE;1111 1167 11C1;
+D3CF;D3CF;1111 1167 11C2;D3CF;1111 1167 11C2;
+D3D0;D3D0;1111 1168;D3D0;1111 1168;
+D3D1;D3D1;1111 1168 11A8;D3D1;1111 1168 11A8;
+D3D2;D3D2;1111 1168 11A9;D3D2;1111 1168 11A9;
+D3D3;D3D3;1111 1168 11AA;D3D3;1111 1168 11AA;
+D3D4;D3D4;1111 1168 11AB;D3D4;1111 1168 11AB;
+D3D5;D3D5;1111 1168 11AC;D3D5;1111 1168 11AC;
+D3D6;D3D6;1111 1168 11AD;D3D6;1111 1168 11AD;
+D3D7;D3D7;1111 1168 11AE;D3D7;1111 1168 11AE;
+D3D8;D3D8;1111 1168 11AF;D3D8;1111 1168 11AF;
+D3D9;D3D9;1111 1168 11B0;D3D9;1111 1168 11B0;
+D3DA;D3DA;1111 1168 11B1;D3DA;1111 1168 11B1;
+D3DB;D3DB;1111 1168 11B2;D3DB;1111 1168 11B2;
+D3DC;D3DC;1111 1168 11B3;D3DC;1111 1168 11B3;
+D3DD;D3DD;1111 1168 11B4;D3DD;1111 1168 11B4;
+D3DE;D3DE;1111 1168 11B5;D3DE;1111 1168 11B5;
+D3DF;D3DF;1111 1168 11B6;D3DF;1111 1168 11B6;
+D3E0;D3E0;1111 1168 11B7;D3E0;1111 1168 11B7;
+D3E1;D3E1;1111 1168 11B8;D3E1;1111 1168 11B8;
+D3E2;D3E2;1111 1168 11B9;D3E2;1111 1168 11B9;
+D3E3;D3E3;1111 1168 11BA;D3E3;1111 1168 11BA;
+D3E4;D3E4;1111 1168 11BB;D3E4;1111 1168 11BB;
+D3E5;D3E5;1111 1168 11BC;D3E5;1111 1168 11BC;
+D3E6;D3E6;1111 1168 11BD;D3E6;1111 1168 11BD;
+D3E7;D3E7;1111 1168 11BE;D3E7;1111 1168 11BE;
+D3E8;D3E8;1111 1168 11BF;D3E8;1111 1168 11BF;
+D3E9;D3E9;1111 1168 11C0;D3E9;1111 1168 11C0;
+D3EA;D3EA;1111 1168 11C1;D3EA;1111 1168 11C1;
+D3EB;D3EB;1111 1168 11C2;D3EB;1111 1168 11C2;
+D3EC;D3EC;1111 1169;D3EC;1111 1169;
+D3ED;D3ED;1111 1169 11A8;D3ED;1111 1169 11A8;
+D3EE;D3EE;1111 1169 11A9;D3EE;1111 1169 11A9;
+D3EF;D3EF;1111 1169 11AA;D3EF;1111 1169 11AA;
+D3F0;D3F0;1111 1169 11AB;D3F0;1111 1169 11AB;
+D3F1;D3F1;1111 1169 11AC;D3F1;1111 1169 11AC;
+D3F2;D3F2;1111 1169 11AD;D3F2;1111 1169 11AD;
+D3F3;D3F3;1111 1169 11AE;D3F3;1111 1169 11AE;
+D3F4;D3F4;1111 1169 11AF;D3F4;1111 1169 11AF;
+D3F5;D3F5;1111 1169 11B0;D3F5;1111 1169 11B0;
+D3F6;D3F6;1111 1169 11B1;D3F6;1111 1169 11B1;
+D3F7;D3F7;1111 1169 11B2;D3F7;1111 1169 11B2;
+D3F8;D3F8;1111 1169 11B3;D3F8;1111 1169 11B3;
+D3F9;D3F9;1111 1169 11B4;D3F9;1111 1169 11B4;
+D3FA;D3FA;1111 1169 11B5;D3FA;1111 1169 11B5;
+D3FB;D3FB;1111 1169 11B6;D3FB;1111 1169 11B6;
+D3FC;D3FC;1111 1169 11B7;D3FC;1111 1169 11B7;
+D3FD;D3FD;1111 1169 11B8;D3FD;1111 1169 11B8;
+D3FE;D3FE;1111 1169 11B9;D3FE;1111 1169 11B9;
+D3FF;D3FF;1111 1169 11BA;D3FF;1111 1169 11BA;
+D400;D400;1111 1169 11BB;D400;1111 1169 11BB;
+D401;D401;1111 1169 11BC;D401;1111 1169 11BC;
+D402;D402;1111 1169 11BD;D402;1111 1169 11BD;
+D403;D403;1111 1169 11BE;D403;1111 1169 11BE;
+D404;D404;1111 1169 11BF;D404;1111 1169 11BF;
+D405;D405;1111 1169 11C0;D405;1111 1169 11C0;
+D406;D406;1111 1169 11C1;D406;1111 1169 11C1;
+D407;D407;1111 1169 11C2;D407;1111 1169 11C2;
+D408;D408;1111 116A;D408;1111 116A;
+D409;D409;1111 116A 11A8;D409;1111 116A 11A8;
+D40A;D40A;1111 116A 11A9;D40A;1111 116A 11A9;
+D40B;D40B;1111 116A 11AA;D40B;1111 116A 11AA;
+D40C;D40C;1111 116A 11AB;D40C;1111 116A 11AB;
+D40D;D40D;1111 116A 11AC;D40D;1111 116A 11AC;
+D40E;D40E;1111 116A 11AD;D40E;1111 116A 11AD;
+D40F;D40F;1111 116A 11AE;D40F;1111 116A 11AE;
+D410;D410;1111 116A 11AF;D410;1111 116A 11AF;
+D411;D411;1111 116A 11B0;D411;1111 116A 11B0;
+D412;D412;1111 116A 11B1;D412;1111 116A 11B1;
+D413;D413;1111 116A 11B2;D413;1111 116A 11B2;
+D414;D414;1111 116A 11B3;D414;1111 116A 11B3;
+D415;D415;1111 116A 11B4;D415;1111 116A 11B4;
+D416;D416;1111 116A 11B5;D416;1111 116A 11B5;
+D417;D417;1111 116A 11B6;D417;1111 116A 11B6;
+D418;D418;1111 116A 11B7;D418;1111 116A 11B7;
+D419;D419;1111 116A 11B8;D419;1111 116A 11B8;
+D41A;D41A;1111 116A 11B9;D41A;1111 116A 11B9;
+D41B;D41B;1111 116A 11BA;D41B;1111 116A 11BA;
+D41C;D41C;1111 116A 11BB;D41C;1111 116A 11BB;
+D41D;D41D;1111 116A 11BC;D41D;1111 116A 11BC;
+D41E;D41E;1111 116A 11BD;D41E;1111 116A 11BD;
+D41F;D41F;1111 116A 11BE;D41F;1111 116A 11BE;
+D420;D420;1111 116A 11BF;D420;1111 116A 11BF;
+D421;D421;1111 116A 11C0;D421;1111 116A 11C0;
+D422;D422;1111 116A 11C1;D422;1111 116A 11C1;
+D423;D423;1111 116A 11C2;D423;1111 116A 11C2;
+D424;D424;1111 116B;D424;1111 116B;
+D425;D425;1111 116B 11A8;D425;1111 116B 11A8;
+D426;D426;1111 116B 11A9;D426;1111 116B 11A9;
+D427;D427;1111 116B 11AA;D427;1111 116B 11AA;
+D428;D428;1111 116B 11AB;D428;1111 116B 11AB;
+D429;D429;1111 116B 11AC;D429;1111 116B 11AC;
+D42A;D42A;1111 116B 11AD;D42A;1111 116B 11AD;
+D42B;D42B;1111 116B 11AE;D42B;1111 116B 11AE;
+D42C;D42C;1111 116B 11AF;D42C;1111 116B 11AF;
+D42D;D42D;1111 116B 11B0;D42D;1111 116B 11B0;
+D42E;D42E;1111 116B 11B1;D42E;1111 116B 11B1;
+D42F;D42F;1111 116B 11B2;D42F;1111 116B 11B2;
+D430;D430;1111 116B 11B3;D430;1111 116B 11B3;
+D431;D431;1111 116B 11B4;D431;1111 116B 11B4;
+D432;D432;1111 116B 11B5;D432;1111 116B 11B5;
+D433;D433;1111 116B 11B6;D433;1111 116B 11B6;
+D434;D434;1111 116B 11B7;D434;1111 116B 11B7;
+D435;D435;1111 116B 11B8;D435;1111 116B 11B8;
+D436;D436;1111 116B 11B9;D436;1111 116B 11B9;
+D437;D437;1111 116B 11BA;D437;1111 116B 11BA;
+D438;D438;1111 116B 11BB;D438;1111 116B 11BB;
+D439;D439;1111 116B 11BC;D439;1111 116B 11BC;
+D43A;D43A;1111 116B 11BD;D43A;1111 116B 11BD;
+D43B;D43B;1111 116B 11BE;D43B;1111 116B 11BE;
+D43C;D43C;1111 116B 11BF;D43C;1111 116B 11BF;
+D43D;D43D;1111 116B 11C0;D43D;1111 116B 11C0;
+D43E;D43E;1111 116B 11C1;D43E;1111 116B 11C1;
+D43F;D43F;1111 116B 11C2;D43F;1111 116B 11C2;
+D440;D440;1111 116C;D440;1111 116C;
+D441;D441;1111 116C 11A8;D441;1111 116C 11A8;
+D442;D442;1111 116C 11A9;D442;1111 116C 11A9;
+D443;D443;1111 116C 11AA;D443;1111 116C 11AA;
+D444;D444;1111 116C 11AB;D444;1111 116C 11AB;
+D445;D445;1111 116C 11AC;D445;1111 116C 11AC;
+D446;D446;1111 116C 11AD;D446;1111 116C 11AD;
+D447;D447;1111 116C 11AE;D447;1111 116C 11AE;
+D448;D448;1111 116C 11AF;D448;1111 116C 11AF;
+D449;D449;1111 116C 11B0;D449;1111 116C 11B0;
+D44A;D44A;1111 116C 11B1;D44A;1111 116C 11B1;
+D44B;D44B;1111 116C 11B2;D44B;1111 116C 11B2;
+D44C;D44C;1111 116C 11B3;D44C;1111 116C 11B3;
+D44D;D44D;1111 116C 11B4;D44D;1111 116C 11B4;
+D44E;D44E;1111 116C 11B5;D44E;1111 116C 11B5;
+D44F;D44F;1111 116C 11B6;D44F;1111 116C 11B6;
+D450;D450;1111 116C 11B7;D450;1111 116C 11B7;
+D451;D451;1111 116C 11B8;D451;1111 116C 11B8;
+D452;D452;1111 116C 11B9;D452;1111 116C 11B9;
+D453;D453;1111 116C 11BA;D453;1111 116C 11BA;
+D454;D454;1111 116C 11BB;D454;1111 116C 11BB;
+D455;D455;1111 116C 11BC;D455;1111 116C 11BC;
+D456;D456;1111 116C 11BD;D456;1111 116C 11BD;
+D457;D457;1111 116C 11BE;D457;1111 116C 11BE;
+D458;D458;1111 116C 11BF;D458;1111 116C 11BF;
+D459;D459;1111 116C 11C0;D459;1111 116C 11C0;
+D45A;D45A;1111 116C 11C1;D45A;1111 116C 11C1;
+D45B;D45B;1111 116C 11C2;D45B;1111 116C 11C2;
+D45C;D45C;1111 116D;D45C;1111 116D;
+D45D;D45D;1111 116D 11A8;D45D;1111 116D 11A8;
+D45E;D45E;1111 116D 11A9;D45E;1111 116D 11A9;
+D45F;D45F;1111 116D 11AA;D45F;1111 116D 11AA;
+D460;D460;1111 116D 11AB;D460;1111 116D 11AB;
+D461;D461;1111 116D 11AC;D461;1111 116D 11AC;
+D462;D462;1111 116D 11AD;D462;1111 116D 11AD;
+D463;D463;1111 116D 11AE;D463;1111 116D 11AE;
+D464;D464;1111 116D 11AF;D464;1111 116D 11AF;
+D465;D465;1111 116D 11B0;D465;1111 116D 11B0;
+D466;D466;1111 116D 11B1;D466;1111 116D 11B1;
+D467;D467;1111 116D 11B2;D467;1111 116D 11B2;
+D468;D468;1111 116D 11B3;D468;1111 116D 11B3;
+D469;D469;1111 116D 11B4;D469;1111 116D 11B4;
+D46A;D46A;1111 116D 11B5;D46A;1111 116D 11B5;
+D46B;D46B;1111 116D 11B6;D46B;1111 116D 11B6;
+D46C;D46C;1111 116D 11B7;D46C;1111 116D 11B7;
+D46D;D46D;1111 116D 11B8;D46D;1111 116D 11B8;
+D46E;D46E;1111 116D 11B9;D46E;1111 116D 11B9;
+D46F;D46F;1111 116D 11BA;D46F;1111 116D 11BA;
+D470;D470;1111 116D 11BB;D470;1111 116D 11BB;
+D471;D471;1111 116D 11BC;D471;1111 116D 11BC;
+D472;D472;1111 116D 11BD;D472;1111 116D 11BD;
+D473;D473;1111 116D 11BE;D473;1111 116D 11BE;
+D474;D474;1111 116D 11BF;D474;1111 116D 11BF;
+D475;D475;1111 116D 11C0;D475;1111 116D 11C0;
+D476;D476;1111 116D 11C1;D476;1111 116D 11C1;
+D477;D477;1111 116D 11C2;D477;1111 116D 11C2;
+D478;D478;1111 116E;D478;1111 116E;
+D479;D479;1111 116E 11A8;D479;1111 116E 11A8;
+D47A;D47A;1111 116E 11A9;D47A;1111 116E 11A9;
+D47B;D47B;1111 116E 11AA;D47B;1111 116E 11AA;
+D47C;D47C;1111 116E 11AB;D47C;1111 116E 11AB;
+D47D;D47D;1111 116E 11AC;D47D;1111 116E 11AC;
+D47E;D47E;1111 116E 11AD;D47E;1111 116E 11AD;
+D47F;D47F;1111 116E 11AE;D47F;1111 116E 11AE;
+D480;D480;1111 116E 11AF;D480;1111 116E 11AF;
+D481;D481;1111 116E 11B0;D481;1111 116E 11B0;
+D482;D482;1111 116E 11B1;D482;1111 116E 11B1;
+D483;D483;1111 116E 11B2;D483;1111 116E 11B2;
+D484;D484;1111 116E 11B3;D484;1111 116E 11B3;
+D485;D485;1111 116E 11B4;D485;1111 116E 11B4;
+D486;D486;1111 116E 11B5;D486;1111 116E 11B5;
+D487;D487;1111 116E 11B6;D487;1111 116E 11B6;
+D488;D488;1111 116E 11B7;D488;1111 116E 11B7;
+D489;D489;1111 116E 11B8;D489;1111 116E 11B8;
+D48A;D48A;1111 116E 11B9;D48A;1111 116E 11B9;
+D48B;D48B;1111 116E 11BA;D48B;1111 116E 11BA;
+D48C;D48C;1111 116E 11BB;D48C;1111 116E 11BB;
+D48D;D48D;1111 116E 11BC;D48D;1111 116E 11BC;
+D48E;D48E;1111 116E 11BD;D48E;1111 116E 11BD;
+D48F;D48F;1111 116E 11BE;D48F;1111 116E 11BE;
+D490;D490;1111 116E 11BF;D490;1111 116E 11BF;
+D491;D491;1111 116E 11C0;D491;1111 116E 11C0;
+D492;D492;1111 116E 11C1;D492;1111 116E 11C1;
+D493;D493;1111 116E 11C2;D493;1111 116E 11C2;
+D494;D494;1111 116F;D494;1111 116F;
+D495;D495;1111 116F 11A8;D495;1111 116F 11A8;
+D496;D496;1111 116F 11A9;D496;1111 116F 11A9;
+D497;D497;1111 116F 11AA;D497;1111 116F 11AA;
+D498;D498;1111 116F 11AB;D498;1111 116F 11AB;
+D499;D499;1111 116F 11AC;D499;1111 116F 11AC;
+D49A;D49A;1111 116F 11AD;D49A;1111 116F 11AD;
+D49B;D49B;1111 116F 11AE;D49B;1111 116F 11AE;
+D49C;D49C;1111 116F 11AF;D49C;1111 116F 11AF;
+D49D;D49D;1111 116F 11B0;D49D;1111 116F 11B0;
+D49E;D49E;1111 116F 11B1;D49E;1111 116F 11B1;
+D49F;D49F;1111 116F 11B2;D49F;1111 116F 11B2;
+D4A0;D4A0;1111 116F 11B3;D4A0;1111 116F 11B3;
+D4A1;D4A1;1111 116F 11B4;D4A1;1111 116F 11B4;
+D4A2;D4A2;1111 116F 11B5;D4A2;1111 116F 11B5;
+D4A3;D4A3;1111 116F 11B6;D4A3;1111 116F 11B6;
+D4A4;D4A4;1111 116F 11B7;D4A4;1111 116F 11B7;
+D4A5;D4A5;1111 116F 11B8;D4A5;1111 116F 11B8;
+D4A6;D4A6;1111 116F 11B9;D4A6;1111 116F 11B9;
+D4A7;D4A7;1111 116F 11BA;D4A7;1111 116F 11BA;
+D4A8;D4A8;1111 116F 11BB;D4A8;1111 116F 11BB;
+D4A9;D4A9;1111 116F 11BC;D4A9;1111 116F 11BC;
+D4AA;D4AA;1111 116F 11BD;D4AA;1111 116F 11BD;
+D4AB;D4AB;1111 116F 11BE;D4AB;1111 116F 11BE;
+D4AC;D4AC;1111 116F 11BF;D4AC;1111 116F 11BF;
+D4AD;D4AD;1111 116F 11C0;D4AD;1111 116F 11C0;
+D4AE;D4AE;1111 116F 11C1;D4AE;1111 116F 11C1;
+D4AF;D4AF;1111 116F 11C2;D4AF;1111 116F 11C2;
+D4B0;D4B0;1111 1170;D4B0;1111 1170;
+D4B1;D4B1;1111 1170 11A8;D4B1;1111 1170 11A8;
+D4B2;D4B2;1111 1170 11A9;D4B2;1111 1170 11A9;
+D4B3;D4B3;1111 1170 11AA;D4B3;1111 1170 11AA;
+D4B4;D4B4;1111 1170 11AB;D4B4;1111 1170 11AB;
+D4B5;D4B5;1111 1170 11AC;D4B5;1111 1170 11AC;
+D4B6;D4B6;1111 1170 11AD;D4B6;1111 1170 11AD;
+D4B7;D4B7;1111 1170 11AE;D4B7;1111 1170 11AE;
+D4B8;D4B8;1111 1170 11AF;D4B8;1111 1170 11AF;
+D4B9;D4B9;1111 1170 11B0;D4B9;1111 1170 11B0;
+D4BA;D4BA;1111 1170 11B1;D4BA;1111 1170 11B1;
+D4BB;D4BB;1111 1170 11B2;D4BB;1111 1170 11B2;
+D4BC;D4BC;1111 1170 11B3;D4BC;1111 1170 11B3;
+D4BD;D4BD;1111 1170 11B4;D4BD;1111 1170 11B4;
+D4BE;D4BE;1111 1170 11B5;D4BE;1111 1170 11B5;
+D4BF;D4BF;1111 1170 11B6;D4BF;1111 1170 11B6;
+D4C0;D4C0;1111 1170 11B7;D4C0;1111 1170 11B7;
+D4C1;D4C1;1111 1170 11B8;D4C1;1111 1170 11B8;
+D4C2;D4C2;1111 1170 11B9;D4C2;1111 1170 11B9;
+D4C3;D4C3;1111 1170 11BA;D4C3;1111 1170 11BA;
+D4C4;D4C4;1111 1170 11BB;D4C4;1111 1170 11BB;
+D4C5;D4C5;1111 1170 11BC;D4C5;1111 1170 11BC;
+D4C6;D4C6;1111 1170 11BD;D4C6;1111 1170 11BD;
+D4C7;D4C7;1111 1170 11BE;D4C7;1111 1170 11BE;
+D4C8;D4C8;1111 1170 11BF;D4C8;1111 1170 11BF;
+D4C9;D4C9;1111 1170 11C0;D4C9;1111 1170 11C0;
+D4CA;D4CA;1111 1170 11C1;D4CA;1111 1170 11C1;
+D4CB;D4CB;1111 1170 11C2;D4CB;1111 1170 11C2;
+D4CC;D4CC;1111 1171;D4CC;1111 1171;
+D4CD;D4CD;1111 1171 11A8;D4CD;1111 1171 11A8;
+D4CE;D4CE;1111 1171 11A9;D4CE;1111 1171 11A9;
+D4CF;D4CF;1111 1171 11AA;D4CF;1111 1171 11AA;
+D4D0;D4D0;1111 1171 11AB;D4D0;1111 1171 11AB;
+D4D1;D4D1;1111 1171 11AC;D4D1;1111 1171 11AC;
+D4D2;D4D2;1111 1171 11AD;D4D2;1111 1171 11AD;
+D4D3;D4D3;1111 1171 11AE;D4D3;1111 1171 11AE;
+D4D4;D4D4;1111 1171 11AF;D4D4;1111 1171 11AF;
+D4D5;D4D5;1111 1171 11B0;D4D5;1111 1171 11B0;
+D4D6;D4D6;1111 1171 11B1;D4D6;1111 1171 11B1;
+D4D7;D4D7;1111 1171 11B2;D4D7;1111 1171 11B2;
+D4D8;D4D8;1111 1171 11B3;D4D8;1111 1171 11B3;
+D4D9;D4D9;1111 1171 11B4;D4D9;1111 1171 11B4;
+D4DA;D4DA;1111 1171 11B5;D4DA;1111 1171 11B5;
+D4DB;D4DB;1111 1171 11B6;D4DB;1111 1171 11B6;
+D4DC;D4DC;1111 1171 11B7;D4DC;1111 1171 11B7;
+D4DD;D4DD;1111 1171 11B8;D4DD;1111 1171 11B8;
+D4DE;D4DE;1111 1171 11B9;D4DE;1111 1171 11B9;
+D4DF;D4DF;1111 1171 11BA;D4DF;1111 1171 11BA;
+D4E0;D4E0;1111 1171 11BB;D4E0;1111 1171 11BB;
+D4E1;D4E1;1111 1171 11BC;D4E1;1111 1171 11BC;
+D4E2;D4E2;1111 1171 11BD;D4E2;1111 1171 11BD;
+D4E3;D4E3;1111 1171 11BE;D4E3;1111 1171 11BE;
+D4E4;D4E4;1111 1171 11BF;D4E4;1111 1171 11BF;
+D4E5;D4E5;1111 1171 11C0;D4E5;1111 1171 11C0;
+D4E6;D4E6;1111 1171 11C1;D4E6;1111 1171 11C1;
+D4E7;D4E7;1111 1171 11C2;D4E7;1111 1171 11C2;
+D4E8;D4E8;1111 1172;D4E8;1111 1172;
+D4E9;D4E9;1111 1172 11A8;D4E9;1111 1172 11A8;
+D4EA;D4EA;1111 1172 11A9;D4EA;1111 1172 11A9;
+D4EB;D4EB;1111 1172 11AA;D4EB;1111 1172 11AA;
+D4EC;D4EC;1111 1172 11AB;D4EC;1111 1172 11AB;
+D4ED;D4ED;1111 1172 11AC;D4ED;1111 1172 11AC;
+D4EE;D4EE;1111 1172 11AD;D4EE;1111 1172 11AD;
+D4EF;D4EF;1111 1172 11AE;D4EF;1111 1172 11AE;
+D4F0;D4F0;1111 1172 11AF;D4F0;1111 1172 11AF;
+D4F1;D4F1;1111 1172 11B0;D4F1;1111 1172 11B0;
+D4F2;D4F2;1111 1172 11B1;D4F2;1111 1172 11B1;
+D4F3;D4F3;1111 1172 11B2;D4F3;1111 1172 11B2;
+D4F4;D4F4;1111 1172 11B3;D4F4;1111 1172 11B3;
+D4F5;D4F5;1111 1172 11B4;D4F5;1111 1172 11B4;
+D4F6;D4F6;1111 1172 11B5;D4F6;1111 1172 11B5;
+D4F7;D4F7;1111 1172 11B6;D4F7;1111 1172 11B6;
+D4F8;D4F8;1111 1172 11B7;D4F8;1111 1172 11B7;
+D4F9;D4F9;1111 1172 11B8;D4F9;1111 1172 11B8;
+D4FA;D4FA;1111 1172 11B9;D4FA;1111 1172 11B9;
+D4FB;D4FB;1111 1172 11BA;D4FB;1111 1172 11BA;
+D4FC;D4FC;1111 1172 11BB;D4FC;1111 1172 11BB;
+D4FD;D4FD;1111 1172 11BC;D4FD;1111 1172 11BC;
+D4FE;D4FE;1111 1172 11BD;D4FE;1111 1172 11BD;
+D4FF;D4FF;1111 1172 11BE;D4FF;1111 1172 11BE;
+D500;D500;1111 1172 11BF;D500;1111 1172 11BF;
+D501;D501;1111 1172 11C0;D501;1111 1172 11C0;
+D502;D502;1111 1172 11C1;D502;1111 1172 11C1;
+D503;D503;1111 1172 11C2;D503;1111 1172 11C2;
+D504;D504;1111 1173;D504;1111 1173;
+D505;D505;1111 1173 11A8;D505;1111 1173 11A8;
+D506;D506;1111 1173 11A9;D506;1111 1173 11A9;
+D507;D507;1111 1173 11AA;D507;1111 1173 11AA;
+D508;D508;1111 1173 11AB;D508;1111 1173 11AB;
+D509;D509;1111 1173 11AC;D509;1111 1173 11AC;
+D50A;D50A;1111 1173 11AD;D50A;1111 1173 11AD;
+D50B;D50B;1111 1173 11AE;D50B;1111 1173 11AE;
+D50C;D50C;1111 1173 11AF;D50C;1111 1173 11AF;
+D50D;D50D;1111 1173 11B0;D50D;1111 1173 11B0;
+D50E;D50E;1111 1173 11B1;D50E;1111 1173 11B1;
+D50F;D50F;1111 1173 11B2;D50F;1111 1173 11B2;
+D510;D510;1111 1173 11B3;D510;1111 1173 11B3;
+D511;D511;1111 1173 11B4;D511;1111 1173 11B4;
+D512;D512;1111 1173 11B5;D512;1111 1173 11B5;
+D513;D513;1111 1173 11B6;D513;1111 1173 11B6;
+D514;D514;1111 1173 11B7;D514;1111 1173 11B7;
+D515;D515;1111 1173 11B8;D515;1111 1173 11B8;
+D516;D516;1111 1173 11B9;D516;1111 1173 11B9;
+D517;D517;1111 1173 11BA;D517;1111 1173 11BA;
+D518;D518;1111 1173 11BB;D518;1111 1173 11BB;
+D519;D519;1111 1173 11BC;D519;1111 1173 11BC;
+D51A;D51A;1111 1173 11BD;D51A;1111 1173 11BD;
+D51B;D51B;1111 1173 11BE;D51B;1111 1173 11BE;
+D51C;D51C;1111 1173 11BF;D51C;1111 1173 11BF;
+D51D;D51D;1111 1173 11C0;D51D;1111 1173 11C0;
+D51E;D51E;1111 1173 11C1;D51E;1111 1173 11C1;
+D51F;D51F;1111 1173 11C2;D51F;1111 1173 11C2;
+D520;D520;1111 1174;D520;1111 1174;
+D521;D521;1111 1174 11A8;D521;1111 1174 11A8;
+D522;D522;1111 1174 11A9;D522;1111 1174 11A9;
+D523;D523;1111 1174 11AA;D523;1111 1174 11AA;
+D524;D524;1111 1174 11AB;D524;1111 1174 11AB;
+D525;D525;1111 1174 11AC;D525;1111 1174 11AC;
+D526;D526;1111 1174 11AD;D526;1111 1174 11AD;
+D527;D527;1111 1174 11AE;D527;1111 1174 11AE;
+D528;D528;1111 1174 11AF;D528;1111 1174 11AF;
+D529;D529;1111 1174 11B0;D529;1111 1174 11B0;
+D52A;D52A;1111 1174 11B1;D52A;1111 1174 11B1;
+D52B;D52B;1111 1174 11B2;D52B;1111 1174 11B2;
+D52C;D52C;1111 1174 11B3;D52C;1111 1174 11B3;
+D52D;D52D;1111 1174 11B4;D52D;1111 1174 11B4;
+D52E;D52E;1111 1174 11B5;D52E;1111 1174 11B5;
+D52F;D52F;1111 1174 11B6;D52F;1111 1174 11B6;
+D530;D530;1111 1174 11B7;D530;1111 1174 11B7;
+D531;D531;1111 1174 11B8;D531;1111 1174 11B8;
+D532;D532;1111 1174 11B9;D532;1111 1174 11B9;
+D533;D533;1111 1174 11BA;D533;1111 1174 11BA;
+D534;D534;1111 1174 11BB;D534;1111 1174 11BB;
+D535;D535;1111 1174 11BC;D535;1111 1174 11BC;
+D536;D536;1111 1174 11BD;D536;1111 1174 11BD;
+D537;D537;1111 1174 11BE;D537;1111 1174 11BE;
+D538;D538;1111 1174 11BF;D538;1111 1174 11BF;
+D539;D539;1111 1174 11C0;D539;1111 1174 11C0;
+D53A;D53A;1111 1174 11C1;D53A;1111 1174 11C1;
+D53B;D53B;1111 1174 11C2;D53B;1111 1174 11C2;
+D53C;D53C;1111 1175;D53C;1111 1175;
+D53D;D53D;1111 1175 11A8;D53D;1111 1175 11A8;
+D53E;D53E;1111 1175 11A9;D53E;1111 1175 11A9;
+D53F;D53F;1111 1175 11AA;D53F;1111 1175 11AA;
+D540;D540;1111 1175 11AB;D540;1111 1175 11AB;
+D541;D541;1111 1175 11AC;D541;1111 1175 11AC;
+D542;D542;1111 1175 11AD;D542;1111 1175 11AD;
+D543;D543;1111 1175 11AE;D543;1111 1175 11AE;
+D544;D544;1111 1175 11AF;D544;1111 1175 11AF;
+D545;D545;1111 1175 11B0;D545;1111 1175 11B0;
+D546;D546;1111 1175 11B1;D546;1111 1175 11B1;
+D547;D547;1111 1175 11B2;D547;1111 1175 11B2;
+D548;D548;1111 1175 11B3;D548;1111 1175 11B3;
+D549;D549;1111 1175 11B4;D549;1111 1175 11B4;
+D54A;D54A;1111 1175 11B5;D54A;1111 1175 11B5;
+D54B;D54B;1111 1175 11B6;D54B;1111 1175 11B6;
+D54C;D54C;1111 1175 11B7;D54C;1111 1175 11B7;
+D54D;D54D;1111 1175 11B8;D54D;1111 1175 11B8;
+D54E;D54E;1111 1175 11B9;D54E;1111 1175 11B9;
+D54F;D54F;1111 1175 11BA;D54F;1111 1175 11BA;
+D550;D550;1111 1175 11BB;D550;1111 1175 11BB;
+D551;D551;1111 1175 11BC;D551;1111 1175 11BC;
+D552;D552;1111 1175 11BD;D552;1111 1175 11BD;
+D553;D553;1111 1175 11BE;D553;1111 1175 11BE;
+D554;D554;1111 1175 11BF;D554;1111 1175 11BF;
+D555;D555;1111 1175 11C0;D555;1111 1175 11C0;
+D556;D556;1111 1175 11C1;D556;1111 1175 11C1;
+D557;D557;1111 1175 11C2;D557;1111 1175 11C2;
+D558;D558;1112 1161;D558;1112 1161;
+D559;D559;1112 1161 11A8;D559;1112 1161 11A8;
+D55A;D55A;1112 1161 11A9;D55A;1112 1161 11A9;
+D55B;D55B;1112 1161 11AA;D55B;1112 1161 11AA;
+D55C;D55C;1112 1161 11AB;D55C;1112 1161 11AB;
+D55D;D55D;1112 1161 11AC;D55D;1112 1161 11AC;
+D55E;D55E;1112 1161 11AD;D55E;1112 1161 11AD;
+D55F;D55F;1112 1161 11AE;D55F;1112 1161 11AE;
+D560;D560;1112 1161 11AF;D560;1112 1161 11AF;
+D561;D561;1112 1161 11B0;D561;1112 1161 11B0;
+D562;D562;1112 1161 11B1;D562;1112 1161 11B1;
+D563;D563;1112 1161 11B2;D563;1112 1161 11B2;
+D564;D564;1112 1161 11B3;D564;1112 1161 11B3;
+D565;D565;1112 1161 11B4;D565;1112 1161 11B4;
+D566;D566;1112 1161 11B5;D566;1112 1161 11B5;
+D567;D567;1112 1161 11B6;D567;1112 1161 11B6;
+D568;D568;1112 1161 11B7;D568;1112 1161 11B7;
+D569;D569;1112 1161 11B8;D569;1112 1161 11B8;
+D56A;D56A;1112 1161 11B9;D56A;1112 1161 11B9;
+D56B;D56B;1112 1161 11BA;D56B;1112 1161 11BA;
+D56C;D56C;1112 1161 11BB;D56C;1112 1161 11BB;
+D56D;D56D;1112 1161 11BC;D56D;1112 1161 11BC;
+D56E;D56E;1112 1161 11BD;D56E;1112 1161 11BD;
+D56F;D56F;1112 1161 11BE;D56F;1112 1161 11BE;
+D570;D570;1112 1161 11BF;D570;1112 1161 11BF;
+D571;D571;1112 1161 11C0;D571;1112 1161 11C0;
+D572;D572;1112 1161 11C1;D572;1112 1161 11C1;
+D573;D573;1112 1161 11C2;D573;1112 1161 11C2;
+D574;D574;1112 1162;D574;1112 1162;
+D575;D575;1112 1162 11A8;D575;1112 1162 11A8;
+D576;D576;1112 1162 11A9;D576;1112 1162 11A9;
+D577;D577;1112 1162 11AA;D577;1112 1162 11AA;
+D578;D578;1112 1162 11AB;D578;1112 1162 11AB;
+D579;D579;1112 1162 11AC;D579;1112 1162 11AC;
+D57A;D57A;1112 1162 11AD;D57A;1112 1162 11AD;
+D57B;D57B;1112 1162 11AE;D57B;1112 1162 11AE;
+D57C;D57C;1112 1162 11AF;D57C;1112 1162 11AF;
+D57D;D57D;1112 1162 11B0;D57D;1112 1162 11B0;
+D57E;D57E;1112 1162 11B1;D57E;1112 1162 11B1;
+D57F;D57F;1112 1162 11B2;D57F;1112 1162 11B2;
+D580;D580;1112 1162 11B3;D580;1112 1162 11B3;
+D581;D581;1112 1162 11B4;D581;1112 1162 11B4;
+D582;D582;1112 1162 11B5;D582;1112 1162 11B5;
+D583;D583;1112 1162 11B6;D583;1112 1162 11B6;
+D584;D584;1112 1162 11B7;D584;1112 1162 11B7;
+D585;D585;1112 1162 11B8;D585;1112 1162 11B8;
+D586;D586;1112 1162 11B9;D586;1112 1162 11B9;
+D587;D587;1112 1162 11BA;D587;1112 1162 11BA;
+D588;D588;1112 1162 11BB;D588;1112 1162 11BB;
+D589;D589;1112 1162 11BC;D589;1112 1162 11BC;
+D58A;D58A;1112 1162 11BD;D58A;1112 1162 11BD;
+D58B;D58B;1112 1162 11BE;D58B;1112 1162 11BE;
+D58C;D58C;1112 1162 11BF;D58C;1112 1162 11BF;
+D58D;D58D;1112 1162 11C0;D58D;1112 1162 11C0;
+D58E;D58E;1112 1162 11C1;D58E;1112 1162 11C1;
+D58F;D58F;1112 1162 11C2;D58F;1112 1162 11C2;
+D590;D590;1112 1163;D590;1112 1163;
+D591;D591;1112 1163 11A8;D591;1112 1163 11A8;
+D592;D592;1112 1163 11A9;D592;1112 1163 11A9;
+D593;D593;1112 1163 11AA;D593;1112 1163 11AA;
+D594;D594;1112 1163 11AB;D594;1112 1163 11AB;
+D595;D595;1112 1163 11AC;D595;1112 1163 11AC;
+D596;D596;1112 1163 11AD;D596;1112 1163 11AD;
+D597;D597;1112 1163 11AE;D597;1112 1163 11AE;
+D598;D598;1112 1163 11AF;D598;1112 1163 11AF;
+D599;D599;1112 1163 11B0;D599;1112 1163 11B0;
+D59A;D59A;1112 1163 11B1;D59A;1112 1163 11B1;
+D59B;D59B;1112 1163 11B2;D59B;1112 1163 11B2;
+D59C;D59C;1112 1163 11B3;D59C;1112 1163 11B3;
+D59D;D59D;1112 1163 11B4;D59D;1112 1163 11B4;
+D59E;D59E;1112 1163 11B5;D59E;1112 1163 11B5;
+D59F;D59F;1112 1163 11B6;D59F;1112 1163 11B6;
+D5A0;D5A0;1112 1163 11B7;D5A0;1112 1163 11B7;
+D5A1;D5A1;1112 1163 11B8;D5A1;1112 1163 11B8;
+D5A2;D5A2;1112 1163 11B9;D5A2;1112 1163 11B9;
+D5A3;D5A3;1112 1163 11BA;D5A3;1112 1163 11BA;
+D5A4;D5A4;1112 1163 11BB;D5A4;1112 1163 11BB;
+D5A5;D5A5;1112 1163 11BC;D5A5;1112 1163 11BC;
+D5A6;D5A6;1112 1163 11BD;D5A6;1112 1163 11BD;
+D5A7;D5A7;1112 1163 11BE;D5A7;1112 1163 11BE;
+D5A8;D5A8;1112 1163 11BF;D5A8;1112 1163 11BF;
+D5A9;D5A9;1112 1163 11C0;D5A9;1112 1163 11C0;
+D5AA;D5AA;1112 1163 11C1;D5AA;1112 1163 11C1;
+D5AB;D5AB;1112 1163 11C2;D5AB;1112 1163 11C2;
+D5AC;D5AC;1112 1164;D5AC;1112 1164;
+D5AD;D5AD;1112 1164 11A8;D5AD;1112 1164 11A8;
+D5AE;D5AE;1112 1164 11A9;D5AE;1112 1164 11A9;
+D5AF;D5AF;1112 1164 11AA;D5AF;1112 1164 11AA;
+D5B0;D5B0;1112 1164 11AB;D5B0;1112 1164 11AB;
+D5B1;D5B1;1112 1164 11AC;D5B1;1112 1164 11AC;
+D5B2;D5B2;1112 1164 11AD;D5B2;1112 1164 11AD;
+D5B3;D5B3;1112 1164 11AE;D5B3;1112 1164 11AE;
+D5B4;D5B4;1112 1164 11AF;D5B4;1112 1164 11AF;
+D5B5;D5B5;1112 1164 11B0;D5B5;1112 1164 11B0;
+D5B6;D5B6;1112 1164 11B1;D5B6;1112 1164 11B1;
+D5B7;D5B7;1112 1164 11B2;D5B7;1112 1164 11B2;
+D5B8;D5B8;1112 1164 11B3;D5B8;1112 1164 11B3;
+D5B9;D5B9;1112 1164 11B4;D5B9;1112 1164 11B4;
+D5BA;D5BA;1112 1164 11B5;D5BA;1112 1164 11B5;
+D5BB;D5BB;1112 1164 11B6;D5BB;1112 1164 11B6;
+D5BC;D5BC;1112 1164 11B7;D5BC;1112 1164 11B7;
+D5BD;D5BD;1112 1164 11B8;D5BD;1112 1164 11B8;
+D5BE;D5BE;1112 1164 11B9;D5BE;1112 1164 11B9;
+D5BF;D5BF;1112 1164 11BA;D5BF;1112 1164 11BA;
+D5C0;D5C0;1112 1164 11BB;D5C0;1112 1164 11BB;
+D5C1;D5C1;1112 1164 11BC;D5C1;1112 1164 11BC;
+D5C2;D5C2;1112 1164 11BD;D5C2;1112 1164 11BD;
+D5C3;D5C3;1112 1164 11BE;D5C3;1112 1164 11BE;
+D5C4;D5C4;1112 1164 11BF;D5C4;1112 1164 11BF;
+D5C5;D5C5;1112 1164 11C0;D5C5;1112 1164 11C0;
+D5C6;D5C6;1112 1164 11C1;D5C6;1112 1164 11C1;
+D5C7;D5C7;1112 1164 11C2;D5C7;1112 1164 11C2;
+D5C8;D5C8;1112 1165;D5C8;1112 1165;
+D5C9;D5C9;1112 1165 11A8;D5C9;1112 1165 11A8;
+D5CA;D5CA;1112 1165 11A9;D5CA;1112 1165 11A9;
+D5CB;D5CB;1112 1165 11AA;D5CB;1112 1165 11AA;
+D5CC;D5CC;1112 1165 11AB;D5CC;1112 1165 11AB;
+D5CD;D5CD;1112 1165 11AC;D5CD;1112 1165 11AC;
+D5CE;D5CE;1112 1165 11AD;D5CE;1112 1165 11AD;
+D5CF;D5CF;1112 1165 11AE;D5CF;1112 1165 11AE;
+D5D0;D5D0;1112 1165 11AF;D5D0;1112 1165 11AF;
+D5D1;D5D1;1112 1165 11B0;D5D1;1112 1165 11B0;
+D5D2;D5D2;1112 1165 11B1;D5D2;1112 1165 11B1;
+D5D3;D5D3;1112 1165 11B2;D5D3;1112 1165 11B2;
+D5D4;D5D4;1112 1165 11B3;D5D4;1112 1165 11B3;
+D5D5;D5D5;1112 1165 11B4;D5D5;1112 1165 11B4;
+D5D6;D5D6;1112 1165 11B5;D5D6;1112 1165 11B5;
+D5D7;D5D7;1112 1165 11B6;D5D7;1112 1165 11B6;
+D5D8;D5D8;1112 1165 11B7;D5D8;1112 1165 11B7;
+D5D9;D5D9;1112 1165 11B8;D5D9;1112 1165 11B8;
+D5DA;D5DA;1112 1165 11B9;D5DA;1112 1165 11B9;
+D5DB;D5DB;1112 1165 11BA;D5DB;1112 1165 11BA;
+D5DC;D5DC;1112 1165 11BB;D5DC;1112 1165 11BB;
+D5DD;D5DD;1112 1165 11BC;D5DD;1112 1165 11BC;
+D5DE;D5DE;1112 1165 11BD;D5DE;1112 1165 11BD;
+D5DF;D5DF;1112 1165 11BE;D5DF;1112 1165 11BE;
+D5E0;D5E0;1112 1165 11BF;D5E0;1112 1165 11BF;
+D5E1;D5E1;1112 1165 11C0;D5E1;1112 1165 11C0;
+D5E2;D5E2;1112 1165 11C1;D5E2;1112 1165 11C1;
+D5E3;D5E3;1112 1165 11C2;D5E3;1112 1165 11C2;
+D5E4;D5E4;1112 1166;D5E4;1112 1166;
+D5E5;D5E5;1112 1166 11A8;D5E5;1112 1166 11A8;
+D5E6;D5E6;1112 1166 11A9;D5E6;1112 1166 11A9;
+D5E7;D5E7;1112 1166 11AA;D5E7;1112 1166 11AA;
+D5E8;D5E8;1112 1166 11AB;D5E8;1112 1166 11AB;
+D5E9;D5E9;1112 1166 11AC;D5E9;1112 1166 11AC;
+D5EA;D5EA;1112 1166 11AD;D5EA;1112 1166 11AD;
+D5EB;D5EB;1112 1166 11AE;D5EB;1112 1166 11AE;
+D5EC;D5EC;1112 1166 11AF;D5EC;1112 1166 11AF;
+D5ED;D5ED;1112 1166 11B0;D5ED;1112 1166 11B0;
+D5EE;D5EE;1112 1166 11B1;D5EE;1112 1166 11B1;
+D5EF;D5EF;1112 1166 11B2;D5EF;1112 1166 11B2;
+D5F0;D5F0;1112 1166 11B3;D5F0;1112 1166 11B3;
+D5F1;D5F1;1112 1166 11B4;D5F1;1112 1166 11B4;
+D5F2;D5F2;1112 1166 11B5;D5F2;1112 1166 11B5;
+D5F3;D5F3;1112 1166 11B6;D5F3;1112 1166 11B6;
+D5F4;D5F4;1112 1166 11B7;D5F4;1112 1166 11B7;
+D5F5;D5F5;1112 1166 11B8;D5F5;1112 1166 11B8;
+D5F6;D5F6;1112 1166 11B9;D5F6;1112 1166 11B9;
+D5F7;D5F7;1112 1166 11BA;D5F7;1112 1166 11BA;
+D5F8;D5F8;1112 1166 11BB;D5F8;1112 1166 11BB;
+D5F9;D5F9;1112 1166 11BC;D5F9;1112 1166 11BC;
+D5FA;D5FA;1112 1166 11BD;D5FA;1112 1166 11BD;
+D5FB;D5FB;1112 1166 11BE;D5FB;1112 1166 11BE;
+D5FC;D5FC;1112 1166 11BF;D5FC;1112 1166 11BF;
+D5FD;D5FD;1112 1166 11C0;D5FD;1112 1166 11C0;
+D5FE;D5FE;1112 1166 11C1;D5FE;1112 1166 11C1;
+D5FF;D5FF;1112 1166 11C2;D5FF;1112 1166 11C2;
+D600;D600;1112 1167;D600;1112 1167;
+D601;D601;1112 1167 11A8;D601;1112 1167 11A8;
+D602;D602;1112 1167 11A9;D602;1112 1167 11A9;
+D603;D603;1112 1167 11AA;D603;1112 1167 11AA;
+D604;D604;1112 1167 11AB;D604;1112 1167 11AB;
+D605;D605;1112 1167 11AC;D605;1112 1167 11AC;
+D606;D606;1112 1167 11AD;D606;1112 1167 11AD;
+D607;D607;1112 1167 11AE;D607;1112 1167 11AE;
+D608;D608;1112 1167 11AF;D608;1112 1167 11AF;
+D609;D609;1112 1167 11B0;D609;1112 1167 11B0;
+D60A;D60A;1112 1167 11B1;D60A;1112 1167 11B1;
+D60B;D60B;1112 1167 11B2;D60B;1112 1167 11B2;
+D60C;D60C;1112 1167 11B3;D60C;1112 1167 11B3;
+D60D;D60D;1112 1167 11B4;D60D;1112 1167 11B4;
+D60E;D60E;1112 1167 11B5;D60E;1112 1167 11B5;
+D60F;D60F;1112 1167 11B6;D60F;1112 1167 11B6;
+D610;D610;1112 1167 11B7;D610;1112 1167 11B7;
+D611;D611;1112 1167 11B8;D611;1112 1167 11B8;
+D612;D612;1112 1167 11B9;D612;1112 1167 11B9;
+D613;D613;1112 1167 11BA;D613;1112 1167 11BA;
+D614;D614;1112 1167 11BB;D614;1112 1167 11BB;
+D615;D615;1112 1167 11BC;D615;1112 1167 11BC;
+D616;D616;1112 1167 11BD;D616;1112 1167 11BD;
+D617;D617;1112 1167 11BE;D617;1112 1167 11BE;
+D618;D618;1112 1167 11BF;D618;1112 1167 11BF;
+D619;D619;1112 1167 11C0;D619;1112 1167 11C0;
+D61A;D61A;1112 1167 11C1;D61A;1112 1167 11C1;
+D61B;D61B;1112 1167 11C2;D61B;1112 1167 11C2;
+D61C;D61C;1112 1168;D61C;1112 1168;
+D61D;D61D;1112 1168 11A8;D61D;1112 1168 11A8;
+D61E;D61E;1112 1168 11A9;D61E;1112 1168 11A9;
+D61F;D61F;1112 1168 11AA;D61F;1112 1168 11AA;
+D620;D620;1112 1168 11AB;D620;1112 1168 11AB;
+D621;D621;1112 1168 11AC;D621;1112 1168 11AC;
+D622;D622;1112 1168 11AD;D622;1112 1168 11AD;
+D623;D623;1112 1168 11AE;D623;1112 1168 11AE;
+D624;D624;1112 1168 11AF;D624;1112 1168 11AF;
+D625;D625;1112 1168 11B0;D625;1112 1168 11B0;
+D626;D626;1112 1168 11B1;D626;1112 1168 11B1;
+D627;D627;1112 1168 11B2;D627;1112 1168 11B2;
+D628;D628;1112 1168 11B3;D628;1112 1168 11B3;
+D629;D629;1112 1168 11B4;D629;1112 1168 11B4;
+D62A;D62A;1112 1168 11B5;D62A;1112 1168 11B5;
+D62B;D62B;1112 1168 11B6;D62B;1112 1168 11B6;
+D62C;D62C;1112 1168 11B7;D62C;1112 1168 11B7;
+D62D;D62D;1112 1168 11B8;D62D;1112 1168 11B8;
+D62E;D62E;1112 1168 11B9;D62E;1112 1168 11B9;
+D62F;D62F;1112 1168 11BA;D62F;1112 1168 11BA;
+D630;D630;1112 1168 11BB;D630;1112 1168 11BB;
+D631;D631;1112 1168 11BC;D631;1112 1168 11BC;
+D632;D632;1112 1168 11BD;D632;1112 1168 11BD;
+D633;D633;1112 1168 11BE;D633;1112 1168 11BE;
+D634;D634;1112 1168 11BF;D634;1112 1168 11BF;
+D635;D635;1112 1168 11C0;D635;1112 1168 11C0;
+D636;D636;1112 1168 11C1;D636;1112 1168 11C1;
+D637;D637;1112 1168 11C2;D637;1112 1168 11C2;
+D638;D638;1112 1169;D638;1112 1169;
+D639;D639;1112 1169 11A8;D639;1112 1169 11A8;
+D63A;D63A;1112 1169 11A9;D63A;1112 1169 11A9;
+D63B;D63B;1112 1169 11AA;D63B;1112 1169 11AA;
+D63C;D63C;1112 1169 11AB;D63C;1112 1169 11AB;
+D63D;D63D;1112 1169 11AC;D63D;1112 1169 11AC;
+D63E;D63E;1112 1169 11AD;D63E;1112 1169 11AD;
+D63F;D63F;1112 1169 11AE;D63F;1112 1169 11AE;
+D640;D640;1112 1169 11AF;D640;1112 1169 11AF;
+D641;D641;1112 1169 11B0;D641;1112 1169 11B0;
+D642;D642;1112 1169 11B1;D642;1112 1169 11B1;
+D643;D643;1112 1169 11B2;D643;1112 1169 11B2;
+D644;D644;1112 1169 11B3;D644;1112 1169 11B3;
+D645;D645;1112 1169 11B4;D645;1112 1169 11B4;
+D646;D646;1112 1169 11B5;D646;1112 1169 11B5;
+D647;D647;1112 1169 11B6;D647;1112 1169 11B6;
+D648;D648;1112 1169 11B7;D648;1112 1169 11B7;
+D649;D649;1112 1169 11B8;D649;1112 1169 11B8;
+D64A;D64A;1112 1169 11B9;D64A;1112 1169 11B9;
+D64B;D64B;1112 1169 11BA;D64B;1112 1169 11BA;
+D64C;D64C;1112 1169 11BB;D64C;1112 1169 11BB;
+D64D;D64D;1112 1169 11BC;D64D;1112 1169 11BC;
+D64E;D64E;1112 1169 11BD;D64E;1112 1169 11BD;
+D64F;D64F;1112 1169 11BE;D64F;1112 1169 11BE;
+D650;D650;1112 1169 11BF;D650;1112 1169 11BF;
+D651;D651;1112 1169 11C0;D651;1112 1169 11C0;
+D652;D652;1112 1169 11C1;D652;1112 1169 11C1;
+D653;D653;1112 1169 11C2;D653;1112 1169 11C2;
+D654;D654;1112 116A;D654;1112 116A;
+D655;D655;1112 116A 11A8;D655;1112 116A 11A8;
+D656;D656;1112 116A 11A9;D656;1112 116A 11A9;
+D657;D657;1112 116A 11AA;D657;1112 116A 11AA;
+D658;D658;1112 116A 11AB;D658;1112 116A 11AB;
+D659;D659;1112 116A 11AC;D659;1112 116A 11AC;
+D65A;D65A;1112 116A 11AD;D65A;1112 116A 11AD;
+D65B;D65B;1112 116A 11AE;D65B;1112 116A 11AE;
+D65C;D65C;1112 116A 11AF;D65C;1112 116A 11AF;
+D65D;D65D;1112 116A 11B0;D65D;1112 116A 11B0;
+D65E;D65E;1112 116A 11B1;D65E;1112 116A 11B1;
+D65F;D65F;1112 116A 11B2;D65F;1112 116A 11B2;
+D660;D660;1112 116A 11B3;D660;1112 116A 11B3;
+D661;D661;1112 116A 11B4;D661;1112 116A 11B4;
+D662;D662;1112 116A 11B5;D662;1112 116A 11B5;
+D663;D663;1112 116A 11B6;D663;1112 116A 11B6;
+D664;D664;1112 116A 11B7;D664;1112 116A 11B7;
+D665;D665;1112 116A 11B8;D665;1112 116A 11B8;
+D666;D666;1112 116A 11B9;D666;1112 116A 11B9;
+D667;D667;1112 116A 11BA;D667;1112 116A 11BA;
+D668;D668;1112 116A 11BB;D668;1112 116A 11BB;
+D669;D669;1112 116A 11BC;D669;1112 116A 11BC;
+D66A;D66A;1112 116A 11BD;D66A;1112 116A 11BD;
+D66B;D66B;1112 116A 11BE;D66B;1112 116A 11BE;
+D66C;D66C;1112 116A 11BF;D66C;1112 116A 11BF;
+D66D;D66D;1112 116A 11C0;D66D;1112 116A 11C0;
+D66E;D66E;1112 116A 11C1;D66E;1112 116A 11C1;
+D66F;D66F;1112 116A 11C2;D66F;1112 116A 11C2;
+D670;D670;1112 116B;D670;1112 116B;
+D671;D671;1112 116B 11A8;D671;1112 116B 11A8;
+D672;D672;1112 116B 11A9;D672;1112 116B 11A9;
+D673;D673;1112 116B 11AA;D673;1112 116B 11AA;
+D674;D674;1112 116B 11AB;D674;1112 116B 11AB;
+D675;D675;1112 116B 11AC;D675;1112 116B 11AC;
+D676;D676;1112 116B 11AD;D676;1112 116B 11AD;
+D677;D677;1112 116B 11AE;D677;1112 116B 11AE;
+D678;D678;1112 116B 11AF;D678;1112 116B 11AF;
+D679;D679;1112 116B 11B0;D679;1112 116B 11B0;
+D67A;D67A;1112 116B 11B1;D67A;1112 116B 11B1;
+D67B;D67B;1112 116B 11B2;D67B;1112 116B 11B2;
+D67C;D67C;1112 116B 11B3;D67C;1112 116B 11B3;
+D67D;D67D;1112 116B 11B4;D67D;1112 116B 11B4;
+D67E;D67E;1112 116B 11B5;D67E;1112 116B 11B5;
+D67F;D67F;1112 116B 11B6;D67F;1112 116B 11B6;
+D680;D680;1112 116B 11B7;D680;1112 116B 11B7;
+D681;D681;1112 116B 11B8;D681;1112 116B 11B8;
+D682;D682;1112 116B 11B9;D682;1112 116B 11B9;
+D683;D683;1112 116B 11BA;D683;1112 116B 11BA;
+D684;D684;1112 116B 11BB;D684;1112 116B 11BB;
+D685;D685;1112 116B 11BC;D685;1112 116B 11BC;
+D686;D686;1112 116B 11BD;D686;1112 116B 11BD;
+D687;D687;1112 116B 11BE;D687;1112 116B 11BE;
+D688;D688;1112 116B 11BF;D688;1112 116B 11BF;
+D689;D689;1112 116B 11C0;D689;1112 116B 11C0;
+D68A;D68A;1112 116B 11C1;D68A;1112 116B 11C1;
+D68B;D68B;1112 116B 11C2;D68B;1112 116B 11C2;
+D68C;D68C;1112 116C;D68C;1112 116C;
+D68D;D68D;1112 116C 11A8;D68D;1112 116C 11A8;
+D68E;D68E;1112 116C 11A9;D68E;1112 116C 11A9;
+D68F;D68F;1112 116C 11AA;D68F;1112 116C 11AA;
+D690;D690;1112 116C 11AB;D690;1112 116C 11AB;
+D691;D691;1112 116C 11AC;D691;1112 116C 11AC;
+D692;D692;1112 116C 11AD;D692;1112 116C 11AD;
+D693;D693;1112 116C 11AE;D693;1112 116C 11AE;
+D694;D694;1112 116C 11AF;D694;1112 116C 11AF;
+D695;D695;1112 116C 11B0;D695;1112 116C 11B0;
+D696;D696;1112 116C 11B1;D696;1112 116C 11B1;
+D697;D697;1112 116C 11B2;D697;1112 116C 11B2;
+D698;D698;1112 116C 11B3;D698;1112 116C 11B3;
+D699;D699;1112 116C 11B4;D699;1112 116C 11B4;
+D69A;D69A;1112 116C 11B5;D69A;1112 116C 11B5;
+D69B;D69B;1112 116C 11B6;D69B;1112 116C 11B6;
+D69C;D69C;1112 116C 11B7;D69C;1112 116C 11B7;
+D69D;D69D;1112 116C 11B8;D69D;1112 116C 11B8;
+D69E;D69E;1112 116C 11B9;D69E;1112 116C 11B9;
+D69F;D69F;1112 116C 11BA;D69F;1112 116C 11BA;
+D6A0;D6A0;1112 116C 11BB;D6A0;1112 116C 11BB;
+D6A1;D6A1;1112 116C 11BC;D6A1;1112 116C 11BC;
+D6A2;D6A2;1112 116C 11BD;D6A2;1112 116C 11BD;
+D6A3;D6A3;1112 116C 11BE;D6A3;1112 116C 11BE;
+D6A4;D6A4;1112 116C 11BF;D6A4;1112 116C 11BF;
+D6A5;D6A5;1112 116C 11C0;D6A5;1112 116C 11C0;
+D6A6;D6A6;1112 116C 11C1;D6A6;1112 116C 11C1;
+D6A7;D6A7;1112 116C 11C2;D6A7;1112 116C 11C2;
+D6A8;D6A8;1112 116D;D6A8;1112 116D;
+D6A9;D6A9;1112 116D 11A8;D6A9;1112 116D 11A8;
+D6AA;D6AA;1112 116D 11A9;D6AA;1112 116D 11A9;
+D6AB;D6AB;1112 116D 11AA;D6AB;1112 116D 11AA;
+D6AC;D6AC;1112 116D 11AB;D6AC;1112 116D 11AB;
+D6AD;D6AD;1112 116D 11AC;D6AD;1112 116D 11AC;
+D6AE;D6AE;1112 116D 11AD;D6AE;1112 116D 11AD;
+D6AF;D6AF;1112 116D 11AE;D6AF;1112 116D 11AE;
+D6B0;D6B0;1112 116D 11AF;D6B0;1112 116D 11AF;
+D6B1;D6B1;1112 116D 11B0;D6B1;1112 116D 11B0;
+D6B2;D6B2;1112 116D 11B1;D6B2;1112 116D 11B1;
+D6B3;D6B3;1112 116D 11B2;D6B3;1112 116D 11B2;
+D6B4;D6B4;1112 116D 11B3;D6B4;1112 116D 11B3;
+D6B5;D6B5;1112 116D 11B4;D6B5;1112 116D 11B4;
+D6B6;D6B6;1112 116D 11B5;D6B6;1112 116D 11B5;
+D6B7;D6B7;1112 116D 11B6;D6B7;1112 116D 11B6;
+D6B8;D6B8;1112 116D 11B7;D6B8;1112 116D 11B7;
+D6B9;D6B9;1112 116D 11B8;D6B9;1112 116D 11B8;
+D6BA;D6BA;1112 116D 11B9;D6BA;1112 116D 11B9;
+D6BB;D6BB;1112 116D 11BA;D6BB;1112 116D 11BA;
+D6BC;D6BC;1112 116D 11BB;D6BC;1112 116D 11BB;
+D6BD;D6BD;1112 116D 11BC;D6BD;1112 116D 11BC;
+D6BE;D6BE;1112 116D 11BD;D6BE;1112 116D 11BD;
+D6BF;D6BF;1112 116D 11BE;D6BF;1112 116D 11BE;
+D6C0;D6C0;1112 116D 11BF;D6C0;1112 116D 11BF;
+D6C1;D6C1;1112 116D 11C0;D6C1;1112 116D 11C0;
+D6C2;D6C2;1112 116D 11C1;D6C2;1112 116D 11C1;
+D6C3;D6C3;1112 116D 11C2;D6C3;1112 116D 11C2;
+D6C4;D6C4;1112 116E;D6C4;1112 116E;
+D6C5;D6C5;1112 116E 11A8;D6C5;1112 116E 11A8;
+D6C6;D6C6;1112 116E 11A9;D6C6;1112 116E 11A9;
+D6C7;D6C7;1112 116E 11AA;D6C7;1112 116E 11AA;
+D6C8;D6C8;1112 116E 11AB;D6C8;1112 116E 11AB;
+D6C9;D6C9;1112 116E 11AC;D6C9;1112 116E 11AC;
+D6CA;D6CA;1112 116E 11AD;D6CA;1112 116E 11AD;
+D6CB;D6CB;1112 116E 11AE;D6CB;1112 116E 11AE;
+D6CC;D6CC;1112 116E 11AF;D6CC;1112 116E 11AF;
+D6CD;D6CD;1112 116E 11B0;D6CD;1112 116E 11B0;
+D6CE;D6CE;1112 116E 11B1;D6CE;1112 116E 11B1;
+D6CF;D6CF;1112 116E 11B2;D6CF;1112 116E 11B2;
+D6D0;D6D0;1112 116E 11B3;D6D0;1112 116E 11B3;
+D6D1;D6D1;1112 116E 11B4;D6D1;1112 116E 11B4;
+D6D2;D6D2;1112 116E 11B5;D6D2;1112 116E 11B5;
+D6D3;D6D3;1112 116E 11B6;D6D3;1112 116E 11B6;
+D6D4;D6D4;1112 116E 11B7;D6D4;1112 116E 11B7;
+D6D5;D6D5;1112 116E 11B8;D6D5;1112 116E 11B8;
+D6D6;D6D6;1112 116E 11B9;D6D6;1112 116E 11B9;
+D6D7;D6D7;1112 116E 11BA;D6D7;1112 116E 11BA;
+D6D8;D6D8;1112 116E 11BB;D6D8;1112 116E 11BB;
+D6D9;D6D9;1112 116E 11BC;D6D9;1112 116E 11BC;
+D6DA;D6DA;1112 116E 11BD;D6DA;1112 116E 11BD;
+D6DB;D6DB;1112 116E 11BE;D6DB;1112 116E 11BE;
+D6DC;D6DC;1112 116E 11BF;D6DC;1112 116E 11BF;
+D6DD;D6DD;1112 116E 11C0;D6DD;1112 116E 11C0;
+D6DE;D6DE;1112 116E 11C1;D6DE;1112 116E 11C1;
+D6DF;D6DF;1112 116E 11C2;D6DF;1112 116E 11C2;
+D6E0;D6E0;1112 116F;D6E0;1112 116F;
+D6E1;D6E1;1112 116F 11A8;D6E1;1112 116F 11A8;
+D6E2;D6E2;1112 116F 11A9;D6E2;1112 116F 11A9;
+D6E3;D6E3;1112 116F 11AA;D6E3;1112 116F 11AA;
+D6E4;D6E4;1112 116F 11AB;D6E4;1112 116F 11AB;
+D6E5;D6E5;1112 116F 11AC;D6E5;1112 116F 11AC;
+D6E6;D6E6;1112 116F 11AD;D6E6;1112 116F 11AD;
+D6E7;D6E7;1112 116F 11AE;D6E7;1112 116F 11AE;
+D6E8;D6E8;1112 116F 11AF;D6E8;1112 116F 11AF;
+D6E9;D6E9;1112 116F 11B0;D6E9;1112 116F 11B0;
+D6EA;D6EA;1112 116F 11B1;D6EA;1112 116F 11B1;
+D6EB;D6EB;1112 116F 11B2;D6EB;1112 116F 11B2;
+D6EC;D6EC;1112 116F 11B3;D6EC;1112 116F 11B3;
+D6ED;D6ED;1112 116F 11B4;D6ED;1112 116F 11B4;
+D6EE;D6EE;1112 116F 11B5;D6EE;1112 116F 11B5;
+D6EF;D6EF;1112 116F 11B6;D6EF;1112 116F 11B6;
+D6F0;D6F0;1112 116F 11B7;D6F0;1112 116F 11B7;
+D6F1;D6F1;1112 116F 11B8;D6F1;1112 116F 11B8;
+D6F2;D6F2;1112 116F 11B9;D6F2;1112 116F 11B9;
+D6F3;D6F3;1112 116F 11BA;D6F3;1112 116F 11BA;
+D6F4;D6F4;1112 116F 11BB;D6F4;1112 116F 11BB;
+D6F5;D6F5;1112 116F 11BC;D6F5;1112 116F 11BC;
+D6F6;D6F6;1112 116F 11BD;D6F6;1112 116F 11BD;
+D6F7;D6F7;1112 116F 11BE;D6F7;1112 116F 11BE;
+D6F8;D6F8;1112 116F 11BF;D6F8;1112 116F 11BF;
+D6F9;D6F9;1112 116F 11C0;D6F9;1112 116F 11C0;
+D6FA;D6FA;1112 116F 11C1;D6FA;1112 116F 11C1;
+D6FB;D6FB;1112 116F 11C2;D6FB;1112 116F 11C2;
+D6FC;D6FC;1112 1170;D6FC;1112 1170;
+D6FD;D6FD;1112 1170 11A8;D6FD;1112 1170 11A8;
+D6FE;D6FE;1112 1170 11A9;D6FE;1112 1170 11A9;
+D6FF;D6FF;1112 1170 11AA;D6FF;1112 1170 11AA;
+D700;D700;1112 1170 11AB;D700;1112 1170 11AB;
+D701;D701;1112 1170 11AC;D701;1112 1170 11AC;
+D702;D702;1112 1170 11AD;D702;1112 1170 11AD;
+D703;D703;1112 1170 11AE;D703;1112 1170 11AE;
+D704;D704;1112 1170 11AF;D704;1112 1170 11AF;
+D705;D705;1112 1170 11B0;D705;1112 1170 11B0;
+D706;D706;1112 1170 11B1;D706;1112 1170 11B1;
+D707;D707;1112 1170 11B2;D707;1112 1170 11B2;
+D708;D708;1112 1170 11B3;D708;1112 1170 11B3;
+D709;D709;1112 1170 11B4;D709;1112 1170 11B4;
+D70A;D70A;1112 1170 11B5;D70A;1112 1170 11B5;
+D70B;D70B;1112 1170 11B6;D70B;1112 1170 11B6;
+D70C;D70C;1112 1170 11B7;D70C;1112 1170 11B7;
+D70D;D70D;1112 1170 11B8;D70D;1112 1170 11B8;
+D70E;D70E;1112 1170 11B9;D70E;1112 1170 11B9;
+D70F;D70F;1112 1170 11BA;D70F;1112 1170 11BA;
+D710;D710;1112 1170 11BB;D710;1112 1170 11BB;
+D711;D711;1112 1170 11BC;D711;1112 1170 11BC;
+D712;D712;1112 1170 11BD;D712;1112 1170 11BD;
+D713;D713;1112 1170 11BE;D713;1112 1170 11BE;
+D714;D714;1112 1170 11BF;D714;1112 1170 11BF;
+D715;D715;1112 1170 11C0;D715;1112 1170 11C0;
+D716;D716;1112 1170 11C1;D716;1112 1170 11C1;
+D717;D717;1112 1170 11C2;D717;1112 1170 11C2;
+D718;D718;1112 1171;D718;1112 1171;
+D719;D719;1112 1171 11A8;D719;1112 1171 11A8;
+D71A;D71A;1112 1171 11A9;D71A;1112 1171 11A9;
+D71B;D71B;1112 1171 11AA;D71B;1112 1171 11AA;
+D71C;D71C;1112 1171 11AB;D71C;1112 1171 11AB;
+D71D;D71D;1112 1171 11AC;D71D;1112 1171 11AC;
+D71E;D71E;1112 1171 11AD;D71E;1112 1171 11AD;
+D71F;D71F;1112 1171 11AE;D71F;1112 1171 11AE;
+D720;D720;1112 1171 11AF;D720;1112 1171 11AF;
+D721;D721;1112 1171 11B0;D721;1112 1171 11B0;
+D722;D722;1112 1171 11B1;D722;1112 1171 11B1;
+D723;D723;1112 1171 11B2;D723;1112 1171 11B2;
+D724;D724;1112 1171 11B3;D724;1112 1171 11B3;
+D725;D725;1112 1171 11B4;D725;1112 1171 11B4;
+D726;D726;1112 1171 11B5;D726;1112 1171 11B5;
+D727;D727;1112 1171 11B6;D727;1112 1171 11B6;
+D728;D728;1112 1171 11B7;D728;1112 1171 11B7;
+D729;D729;1112 1171 11B8;D729;1112 1171 11B8;
+D72A;D72A;1112 1171 11B9;D72A;1112 1171 11B9;
+D72B;D72B;1112 1171 11BA;D72B;1112 1171 11BA;
+D72C;D72C;1112 1171 11BB;D72C;1112 1171 11BB;
+D72D;D72D;1112 1171 11BC;D72D;1112 1171 11BC;
+D72E;D72E;1112 1171 11BD;D72E;1112 1171 11BD;
+D72F;D72F;1112 1171 11BE;D72F;1112 1171 11BE;
+D730;D730;1112 1171 11BF;D730;1112 1171 11BF;
+D731;D731;1112 1171 11C0;D731;1112 1171 11C0;
+D732;D732;1112 1171 11C1;D732;1112 1171 11C1;
+D733;D733;1112 1171 11C2;D733;1112 1171 11C2;
+D734;D734;1112 1172;D734;1112 1172;
+D735;D735;1112 1172 11A8;D735;1112 1172 11A8;
+D736;D736;1112 1172 11A9;D736;1112 1172 11A9;
+D737;D737;1112 1172 11AA;D737;1112 1172 11AA;
+D738;D738;1112 1172 11AB;D738;1112 1172 11AB;
+D739;D739;1112 1172 11AC;D739;1112 1172 11AC;
+D73A;D73A;1112 1172 11AD;D73A;1112 1172 11AD;
+D73B;D73B;1112 1172 11AE;D73B;1112 1172 11AE;
+D73C;D73C;1112 1172 11AF;D73C;1112 1172 11AF;
+D73D;D73D;1112 1172 11B0;D73D;1112 1172 11B0;
+D73E;D73E;1112 1172 11B1;D73E;1112 1172 11B1;
+D73F;D73F;1112 1172 11B2;D73F;1112 1172 11B2;
+D740;D740;1112 1172 11B3;D740;1112 1172 11B3;
+D741;D741;1112 1172 11B4;D741;1112 1172 11B4;
+D742;D742;1112 1172 11B5;D742;1112 1172 11B5;
+D743;D743;1112 1172 11B6;D743;1112 1172 11B6;
+D744;D744;1112 1172 11B7;D744;1112 1172 11B7;
+D745;D745;1112 1172 11B8;D745;1112 1172 11B8;
+D746;D746;1112 1172 11B9;D746;1112 1172 11B9;
+D747;D747;1112 1172 11BA;D747;1112 1172 11BA;
+D748;D748;1112 1172 11BB;D748;1112 1172 11BB;
+D749;D749;1112 1172 11BC;D749;1112 1172 11BC;
+D74A;D74A;1112 1172 11BD;D74A;1112 1172 11BD;
+D74B;D74B;1112 1172 11BE;D74B;1112 1172 11BE;
+D74C;D74C;1112 1172 11BF;D74C;1112 1172 11BF;
+D74D;D74D;1112 1172 11C0;D74D;1112 1172 11C0;
+D74E;D74E;1112 1172 11C1;D74E;1112 1172 11C1;
+D74F;D74F;1112 1172 11C2;D74F;1112 1172 11C2;
+D750;D750;1112 1173;D750;1112 1173;
+D751;D751;1112 1173 11A8;D751;1112 1173 11A8;
+D752;D752;1112 1173 11A9;D752;1112 1173 11A9;
+D753;D753;1112 1173 11AA;D753;1112 1173 11AA;
+D754;D754;1112 1173 11AB;D754;1112 1173 11AB;
+D755;D755;1112 1173 11AC;D755;1112 1173 11AC;
+D756;D756;1112 1173 11AD;D756;1112 1173 11AD;
+D757;D757;1112 1173 11AE;D757;1112 1173 11AE;
+D758;D758;1112 1173 11AF;D758;1112 1173 11AF;
+D759;D759;1112 1173 11B0;D759;1112 1173 11B0;
+D75A;D75A;1112 1173 11B1;D75A;1112 1173 11B1;
+D75B;D75B;1112 1173 11B2;D75B;1112 1173 11B2;
+D75C;D75C;1112 1173 11B3;D75C;1112 1173 11B3;
+D75D;D75D;1112 1173 11B4;D75D;1112 1173 11B4;
+D75E;D75E;1112 1173 11B5;D75E;1112 1173 11B5;
+D75F;D75F;1112 1173 11B6;D75F;1112 1173 11B6;
+D760;D760;1112 1173 11B7;D760;1112 1173 11B7;
+D761;D761;1112 1173 11B8;D761;1112 1173 11B8;
+D762;D762;1112 1173 11B9;D762;1112 1173 11B9;
+D763;D763;1112 1173 11BA;D763;1112 1173 11BA;
+D764;D764;1112 1173 11BB;D764;1112 1173 11BB;
+D765;D765;1112 1173 11BC;D765;1112 1173 11BC;
+D766;D766;1112 1173 11BD;D766;1112 1173 11BD;
+D767;D767;1112 1173 11BE;D767;1112 1173 11BE;
+D768;D768;1112 1173 11BF;D768;1112 1173 11BF;
+D769;D769;1112 1173 11C0;D769;1112 1173 11C0;
+D76A;D76A;1112 1173 11C1;D76A;1112 1173 11C1;
+D76B;D76B;1112 1173 11C2;D76B;1112 1173 11C2;
+D76C;D76C;1112 1174;D76C;1112 1174;
+D76D;D76D;1112 1174 11A8;D76D;1112 1174 11A8;
+D76E;D76E;1112 1174 11A9;D76E;1112 1174 11A9;
+D76F;D76F;1112 1174 11AA;D76F;1112 1174 11AA;
+D770;D770;1112 1174 11AB;D770;1112 1174 11AB;
+D771;D771;1112 1174 11AC;D771;1112 1174 11AC;
+D772;D772;1112 1174 11AD;D772;1112 1174 11AD;
+D773;D773;1112 1174 11AE;D773;1112 1174 11AE;
+D774;D774;1112 1174 11AF;D774;1112 1174 11AF;
+D775;D775;1112 1174 11B0;D775;1112 1174 11B0;
+D776;D776;1112 1174 11B1;D776;1112 1174 11B1;
+D777;D777;1112 1174 11B2;D777;1112 1174 11B2;
+D778;D778;1112 1174 11B3;D778;1112 1174 11B3;
+D779;D779;1112 1174 11B4;D779;1112 1174 11B4;
+D77A;D77A;1112 1174 11B5;D77A;1112 1174 11B5;
+D77B;D77B;1112 1174 11B6;D77B;1112 1174 11B6;
+D77C;D77C;1112 1174 11B7;D77C;1112 1174 11B7;
+D77D;D77D;1112 1174 11B8;D77D;1112 1174 11B8;
+D77E;D77E;1112 1174 11B9;D77E;1112 1174 11B9;
+D77F;D77F;1112 1174 11BA;D77F;1112 1174 11BA;
+D780;D780;1112 1174 11BB;D780;1112 1174 11BB;
+D781;D781;1112 1174 11BC;D781;1112 1174 11BC;
+D782;D782;1112 1174 11BD;D782;1112 1174 11BD;
+D783;D783;1112 1174 11BE;D783;1112 1174 11BE;
+D784;D784;1112 1174 11BF;D784;1112 1174 11BF;
+D785;D785;1112 1174 11C0;D785;1112 1174 11C0;
+D786;D786;1112 1174 11C1;D786;1112 1174 11C1;
+D787;D787;1112 1174 11C2;D787;1112 1174 11C2;
+D788;D788;1112 1175;D788;1112 1175;
+D789;D789;1112 1175 11A8;D789;1112 1175 11A8;
+D78A;D78A;1112 1175 11A9;D78A;1112 1175 11A9;
+D78B;D78B;1112 1175 11AA;D78B;1112 1175 11AA;
+D78C;D78C;1112 1175 11AB;D78C;1112 1175 11AB;
+D78D;D78D;1112 1175 11AC;D78D;1112 1175 11AC;
+D78E;D78E;1112 1175 11AD;D78E;1112 1175 11AD;
+D78F;D78F;1112 1175 11AE;D78F;1112 1175 11AE;
+D790;D790;1112 1175 11AF;D790;1112 1175 11AF;
+D791;D791;1112 1175 11B0;D791;1112 1175 11B0;
+D792;D792;1112 1175 11B1;D792;1112 1175 11B1;
+D793;D793;1112 1175 11B2;D793;1112 1175 11B2;
+D794;D794;1112 1175 11B3;D794;1112 1175 11B3;
+D795;D795;1112 1175 11B4;D795;1112 1175 11B4;
+D796;D796;1112 1175 11B5;D796;1112 1175 11B5;
+D797;D797;1112 1175 11B6;D797;1112 1175 11B6;
+D798;D798;1112 1175 11B7;D798;1112 1175 11B7;
+D799;D799;1112 1175 11B8;D799;1112 1175 11B8;
+D79A;D79A;1112 1175 11B9;D79A;1112 1175 11B9;
+D79B;D79B;1112 1175 11BA;D79B;1112 1175 11BA;
+D79C;D79C;1112 1175 11BB;D79C;1112 1175 11BB;
+D79D;D79D;1112 1175 11BC;D79D;1112 1175 11BC;
+D79E;D79E;1112 1175 11BD;D79E;1112 1175 11BD;
+D79F;D79F;1112 1175 11BE;D79F;1112 1175 11BE;
+D7A0;D7A0;1112 1175 11BF;D7A0;1112 1175 11BF;
+D7A1;D7A1;1112 1175 11C0;D7A1;1112 1175 11C0;
+D7A2;D7A2;1112 1175 11C1;D7A2;1112 1175 11C1;
+D7A3;D7A3;1112 1175 11C2;D7A3;1112 1175 11C2;
+F900;8C48;8C48;8C48;8C48;
+F901;66F4;66F4;66F4;66F4;
+F902;8ECA;8ECA;8ECA;8ECA;
+F903;8CC8;8CC8;8CC8;8CC8;
+F904;6ED1;6ED1;6ED1;6ED1;
+F905;4E32;4E32;4E32;4E32;
+F906;53E5;53E5;53E5;53E5;
+F907;9F9C;9F9C;9F9C;9F9C;
+F908;9F9C;9F9C;9F9C;9F9C;
+F909;5951;5951;5951;5951;
+F90A;91D1;91D1;91D1;91D1;
+F90B;5587;5587;5587;5587;
+F90C;5948;5948;5948;5948;
+F90D;61F6;61F6;61F6;61F6;
+F90E;7669;7669;7669;7669;
+F90F;7F85;7F85;7F85;7F85;
+F910;863F;863F;863F;863F;
+F911;87BA;87BA;87BA;87BA;
+F912;88F8;88F8;88F8;88F8;
+F913;908F;908F;908F;908F;
+F914;6A02;6A02;6A02;6A02;
+F915;6D1B;6D1B;6D1B;6D1B;
+F916;70D9;70D9;70D9;70D9;
+F917;73DE;73DE;73DE;73DE;
+F918;843D;843D;843D;843D;
+F919;916A;916A;916A;916A;
+F91A;99F1;99F1;99F1;99F1;
+F91B;4E82;4E82;4E82;4E82;
+F91C;5375;5375;5375;5375;
+F91D;6B04;6B04;6B04;6B04;
+F91E;721B;721B;721B;721B;
+F91F;862D;862D;862D;862D;
+F920;9E1E;9E1E;9E1E;9E1E;
+F921;5D50;5D50;5D50;5D50;
+F922;6FEB;6FEB;6FEB;6FEB;
+F923;85CD;85CD;85CD;85CD;
+F924;8964;8964;8964;8964;
+F925;62C9;62C9;62C9;62C9;
+F926;81D8;81D8;81D8;81D8;
+F927;881F;881F;881F;881F;
+F928;5ECA;5ECA;5ECA;5ECA;
+F929;6717;6717;6717;6717;
+F92A;6D6A;6D6A;6D6A;6D6A;
+F92B;72FC;72FC;72FC;72FC;
+F92C;90CE;90CE;90CE;90CE;
+F92D;4F86;4F86;4F86;4F86;
+F92E;51B7;51B7;51B7;51B7;
+F92F;52DE;52DE;52DE;52DE;
+F930;64C4;64C4;64C4;64C4;
+F931;6AD3;6AD3;6AD3;6AD3;
+F932;7210;7210;7210;7210;
+F933;76E7;76E7;76E7;76E7;
+F934;8001;8001;8001;8001;
+F935;8606;8606;8606;8606;
+F936;865C;865C;865C;865C;
+F937;8DEF;8DEF;8DEF;8DEF;
+F938;9732;9732;9732;9732;
+F939;9B6F;9B6F;9B6F;9B6F;
+F93A;9DFA;9DFA;9DFA;9DFA;
+F93B;788C;788C;788C;788C;
+F93C;797F;797F;797F;797F;
+F93D;7DA0;7DA0;7DA0;7DA0;
+F93E;83C9;83C9;83C9;83C9;
+F93F;9304;9304;9304;9304;
+F940;9E7F;9E7F;9E7F;9E7F;
+F941;8AD6;8AD6;8AD6;8AD6;
+F942;58DF;58DF;58DF;58DF;
+F943;5F04;5F04;5F04;5F04;
+F944;7C60;7C60;7C60;7C60;
+F945;807E;807E;807E;807E;
+F946;7262;7262;7262;7262;
+F947;78CA;78CA;78CA;78CA;
+F948;8CC2;8CC2;8CC2;8CC2;
+F949;96F7;96F7;96F7;96F7;
+F94A;58D8;58D8;58D8;58D8;
+F94B;5C62;5C62;5C62;5C62;
+F94C;6A13;6A13;6A13;6A13;
+F94D;6DDA;6DDA;6DDA;6DDA;
+F94E;6F0F;6F0F;6F0F;6F0F;
+F94F;7D2F;7D2F;7D2F;7D2F;
+F950;7E37;7E37;7E37;7E37;
+F951;964B;964B;964B;964B;
+F952;52D2;52D2;52D2;52D2;
+F953;808B;808B;808B;808B;
+F954;51DC;51DC;51DC;51DC;
+F955;51CC;51CC;51CC;51CC;
+F956;7A1C;7A1C;7A1C;7A1C;
+F957;7DBE;7DBE;7DBE;7DBE;
+F958;83F1;83F1;83F1;83F1;
+F959;9675;9675;9675;9675;
+F95A;8B80;8B80;8B80;8B80;
+F95B;62CF;62CF;62CF;62CF;
+F95C;6A02;6A02;6A02;6A02;
+F95D;8AFE;8AFE;8AFE;8AFE;
+F95E;4E39;4E39;4E39;4E39;
+F95F;5BE7;5BE7;5BE7;5BE7;
+F960;6012;6012;6012;6012;
+F961;7387;7387;7387;7387;
+F962;7570;7570;7570;7570;
+F963;5317;5317;5317;5317;
+F964;78FB;78FB;78FB;78FB;
+F965;4FBF;4FBF;4FBF;4FBF;
+F966;5FA9;5FA9;5FA9;5FA9;
+F967;4E0D;4E0D;4E0D;4E0D;
+F968;6CCC;6CCC;6CCC;6CCC;
+F969;6578;6578;6578;6578;
+F96A;7D22;7D22;7D22;7D22;
+F96B;53C3;53C3;53C3;53C3;
+F96C;585E;585E;585E;585E;
+F96D;7701;7701;7701;7701;
+F96E;8449;8449;8449;8449;
+F96F;8AAA;8AAA;8AAA;8AAA;
+F970;6BBA;6BBA;6BBA;6BBA;
+F971;8FB0;8FB0;8FB0;8FB0;
+F972;6C88;6C88;6C88;6C88;
+F973;62FE;62FE;62FE;62FE;
+F974;82E5;82E5;82E5;82E5;
+F975;63A0;63A0;63A0;63A0;
+F976;7565;7565;7565;7565;
+F977;4EAE;4EAE;4EAE;4EAE;
+F978;5169;5169;5169;5169;
+F979;51C9;51C9;51C9;51C9;
+F97A;6881;6881;6881;6881;
+F97B;7CE7;7CE7;7CE7;7CE7;
+F97C;826F;826F;826F;826F;
+F97D;8AD2;8AD2;8AD2;8AD2;
+F97E;91CF;91CF;91CF;91CF;
+F97F;52F5;52F5;52F5;52F5;
+F980;5442;5442;5442;5442;
+F981;5973;5973;5973;5973;
+F982;5EEC;5EEC;5EEC;5EEC;
+F983;65C5;65C5;65C5;65C5;
+F984;6FFE;6FFE;6FFE;6FFE;
+F985;792A;792A;792A;792A;
+F986;95AD;95AD;95AD;95AD;
+F987;9A6A;9A6A;9A6A;9A6A;
+F988;9E97;9E97;9E97;9E97;
+F989;9ECE;9ECE;9ECE;9ECE;
+F98A;529B;529B;529B;529B;
+F98B;66C6;66C6;66C6;66C6;
+F98C;6B77;6B77;6B77;6B77;
+F98D;8F62;8F62;8F62;8F62;
+F98E;5E74;5E74;5E74;5E74;
+F98F;6190;6190;6190;6190;
+F990;6200;6200;6200;6200;
+F991;649A;649A;649A;649A;
+F992;6F23;6F23;6F23;6F23;
+F993;7149;7149;7149;7149;
+F994;7489;7489;7489;7489;
+F995;79CA;79CA;79CA;79CA;
+F996;7DF4;7DF4;7DF4;7DF4;
+F997;806F;806F;806F;806F;
+F998;8F26;8F26;8F26;8F26;
+F999;84EE;84EE;84EE;84EE;
+F99A;9023;9023;9023;9023;
+F99B;934A;934A;934A;934A;
+F99C;5217;5217;5217;5217;
+F99D;52A3;52A3;52A3;52A3;
+F99E;54BD;54BD;54BD;54BD;
+F99F;70C8;70C8;70C8;70C8;
+F9A0;88C2;88C2;88C2;88C2;
+F9A1;8AAA;8AAA;8AAA;8AAA;
+F9A2;5EC9;5EC9;5EC9;5EC9;
+F9A3;5FF5;5FF5;5FF5;5FF5;
+F9A4;637B;637B;637B;637B;
+F9A5;6BAE;6BAE;6BAE;6BAE;
+F9A6;7C3E;7C3E;7C3E;7C3E;
+F9A7;7375;7375;7375;7375;
+F9A8;4EE4;4EE4;4EE4;4EE4;
+F9A9;56F9;56F9;56F9;56F9;
+F9AA;5BE7;5BE7;5BE7;5BE7;
+F9AB;5DBA;5DBA;5DBA;5DBA;
+F9AC;601C;601C;601C;601C;
+F9AD;73B2;73B2;73B2;73B2;
+F9AE;7469;7469;7469;7469;
+F9AF;7F9A;7F9A;7F9A;7F9A;
+F9B0;8046;8046;8046;8046;
+F9B1;9234;9234;9234;9234;
+F9B2;96F6;96F6;96F6;96F6;
+F9B3;9748;9748;9748;9748;
+F9B4;9818;9818;9818;9818;
+F9B5;4F8B;4F8B;4F8B;4F8B;
+F9B6;79AE;79AE;79AE;79AE;
+F9B7;91B4;91B4;91B4;91B4;
+F9B8;96B8;96B8;96B8;96B8;
+F9B9;60E1;60E1;60E1;60E1;
+F9BA;4E86;4E86;4E86;4E86;
+F9BB;50DA;50DA;50DA;50DA;
+F9BC;5BEE;5BEE;5BEE;5BEE;
+F9BD;5C3F;5C3F;5C3F;5C3F;
+F9BE;6599;6599;6599;6599;
+F9BF;6A02;6A02;6A02;6A02;
+F9C0;71CE;71CE;71CE;71CE;
+F9C1;7642;7642;7642;7642;
+F9C2;84FC;84FC;84FC;84FC;
+F9C3;907C;907C;907C;907C;
+F9C4;9F8D;9F8D;9F8D;9F8D;
+F9C5;6688;6688;6688;6688;
+F9C6;962E;962E;962E;962E;
+F9C7;5289;5289;5289;5289;
+F9C8;677B;677B;677B;677B;
+F9C9;67F3;67F3;67F3;67F3;
+F9CA;6D41;6D41;6D41;6D41;
+F9CB;6E9C;6E9C;6E9C;6E9C;
+F9CC;7409;7409;7409;7409;
+F9CD;7559;7559;7559;7559;
+F9CE;786B;786B;786B;786B;
+F9CF;7D10;7D10;7D10;7D10;
+F9D0;985E;985E;985E;985E;
+F9D1;516D;516D;516D;516D;
+F9D2;622E;622E;622E;622E;
+F9D3;9678;9678;9678;9678;
+F9D4;502B;502B;502B;502B;
+F9D5;5D19;5D19;5D19;5D19;
+F9D6;6DEA;6DEA;6DEA;6DEA;
+F9D7;8F2A;8F2A;8F2A;8F2A;
+F9D8;5F8B;5F8B;5F8B;5F8B;
+F9D9;6144;6144;6144;6144;
+F9DA;6817;6817;6817;6817;
+F9DB;7387;7387;7387;7387;
+F9DC;9686;9686;9686;9686;
+F9DD;5229;5229;5229;5229;
+F9DE;540F;540F;540F;540F;
+F9DF;5C65;5C65;5C65;5C65;
+F9E0;6613;6613;6613;6613;
+F9E1;674E;674E;674E;674E;
+F9E2;68A8;68A8;68A8;68A8;
+F9E3;6CE5;6CE5;6CE5;6CE5;
+F9E4;7406;7406;7406;7406;
+F9E5;75E2;75E2;75E2;75E2;
+F9E6;7F79;7F79;7F79;7F79;
+F9E7;88CF;88CF;88CF;88CF;
+F9E8;88E1;88E1;88E1;88E1;
+F9E9;91CC;91CC;91CC;91CC;
+F9EA;96E2;96E2;96E2;96E2;
+F9EB;533F;533F;533F;533F;
+F9EC;6EBA;6EBA;6EBA;6EBA;
+F9ED;541D;541D;541D;541D;
+F9EE;71D0;71D0;71D0;71D0;
+F9EF;7498;7498;7498;7498;
+F9F0;85FA;85FA;85FA;85FA;
+F9F1;96A3;96A3;96A3;96A3;
+F9F2;9C57;9C57;9C57;9C57;
+F9F3;9E9F;9E9F;9E9F;9E9F;
+F9F4;6797;6797;6797;6797;
+F9F5;6DCB;6DCB;6DCB;6DCB;
+F9F6;81E8;81E8;81E8;81E8;
+F9F7;7ACB;7ACB;7ACB;7ACB;
+F9F8;7B20;7B20;7B20;7B20;
+F9F9;7C92;7C92;7C92;7C92;
+F9FA;72C0;72C0;72C0;72C0;
+F9FB;7099;7099;7099;7099;
+F9FC;8B58;8B58;8B58;8B58;
+F9FD;4EC0;4EC0;4EC0;4EC0;
+F9FE;8336;8336;8336;8336;
+F9FF;523A;523A;523A;523A;
+FA00;5207;5207;5207;5207;
+FA01;5EA6;5EA6;5EA6;5EA6;
+FA02;62D3;62D3;62D3;62D3;
+FA03;7CD6;7CD6;7CD6;7CD6;
+FA04;5B85;5B85;5B85;5B85;
+FA05;6D1E;6D1E;6D1E;6D1E;
+FA06;66B4;66B4;66B4;66B4;
+FA07;8F3B;8F3B;8F3B;8F3B;
+FA08;884C;884C;884C;884C;
+FA09;964D;964D;964D;964D;
+FA0A;898B;898B;898B;898B;
+FA0B;5ED3;5ED3;5ED3;5ED3;
+FA0C;5140;5140;5140;5140;
+FA0D;55C0;55C0;55C0;55C0;
+FA10;585A;585A;585A;585A;
+FA12;6674;6674;6674;6674;
+FA15;51DE;51DE;51DE;51DE;
+FA16;732A;732A;732A;732A;
+FA17;76CA;76CA;76CA;76CA;
+FA18;793C;793C;793C;793C;
+FA19;795E;795E;795E;795E;
+FA1A;7965;7965;7965;7965;
+FA1B;798F;798F;798F;798F;
+FA1C;9756;9756;9756;9756;
+FA1D;7CBE;7CBE;7CBE;7CBE;
+FA1E;7FBD;7FBD;7FBD;7FBD;
+FA20;8612;8612;8612;8612;
+FA22;8AF8;8AF8;8AF8;8AF8;
+FA25;9038;9038;9038;9038;
+FA26;90FD;90FD;90FD;90FD;
+FA2A;98EF;98EF;98EF;98EF;
+FA2B;98FC;98FC;98FC;98FC;
+FA2C;9928;9928;9928;9928;
+FA2D;9DB4;9DB4;9DB4;9DB4;
+FA30;4FAE;4FAE;4FAE;4FAE;
+FA31;50E7;50E7;50E7;50E7;
+FA32;514D;514D;514D;514D;
+FA33;52C9;52C9;52C9;52C9;
+FA34;52E4;52E4;52E4;52E4;
+FA35;5351;5351;5351;5351;
+FA36;559D;559D;559D;559D;
+FA37;5606;5606;5606;5606;
+FA38;5668;5668;5668;5668;
+FA39;5840;5840;5840;5840;
+FA3A;58A8;58A8;58A8;58A8;
+FA3B;5C64;5C64;5C64;5C64;
+FA3C;5C6E;5C6E;5C6E;5C6E;
+FA3D;6094;6094;6094;6094;
+FA3E;6168;6168;6168;6168;
+FA3F;618E;618E;618E;618E;
+FA40;61F2;61F2;61F2;61F2;
+FA41;654F;654F;654F;654F;
+FA42;65E2;65E2;65E2;65E2;
+FA43;6691;6691;6691;6691;
+FA44;6885;6885;6885;6885;
+FA45;6D77;6D77;6D77;6D77;
+FA46;6E1A;6E1A;6E1A;6E1A;
+FA47;6F22;6F22;6F22;6F22;
+FA48;716E;716E;716E;716E;
+FA49;722B;722B;722B;722B;
+FA4A;7422;7422;7422;7422;
+FA4B;7891;7891;7891;7891;
+FA4C;793E;793E;793E;793E;
+FA4D;7949;7949;7949;7949;
+FA4E;7948;7948;7948;7948;
+FA4F;7950;7950;7950;7950;
+FA50;7956;7956;7956;7956;
+FA51;795D;795D;795D;795D;
+FA52;798D;798D;798D;798D;
+FA53;798E;798E;798E;798E;
+FA54;7A40;7A40;7A40;7A40;
+FA55;7A81;7A81;7A81;7A81;
+FA56;7BC0;7BC0;7BC0;7BC0;
+FA57;7DF4;7DF4;7DF4;7DF4;
+FA58;7E09;7E09;7E09;7E09;
+FA59;7E41;7E41;7E41;7E41;
+FA5A;7F72;7F72;7F72;7F72;
+FA5B;8005;8005;8005;8005;
+FA5C;81ED;81ED;81ED;81ED;
+FA5D;8279;8279;8279;8279;
+FA5E;8279;8279;8279;8279;
+FA5F;8457;8457;8457;8457;
+FA60;8910;8910;8910;8910;
+FA61;8996;8996;8996;8996;
+FA62;8B01;8B01;8B01;8B01;
+FA63;8B39;8B39;8B39;8B39;
+FA64;8CD3;8CD3;8CD3;8CD3;
+FA65;8D08;8D08;8D08;8D08;
+FA66;8FB6;8FB6;8FB6;8FB6;
+FA67;9038;9038;9038;9038;
+FA68;96E3;96E3;96E3;96E3;
+FA69;97FF;97FF;97FF;97FF;
+FA6A;983B;983B;983B;983B;
+FB00;FB00;FB00;0066 0066;0066 0066;
+FB01;FB01;FB01;0066 0069;0066 0069;
+FB02;FB02;FB02;0066 006C;0066 006C;
+FB03;FB03;FB03;0066 0066 0069;0066 0066 0069;
+FB04;FB04;FB04;0066 0066 006C;0066 0066 006C;
+FB05;FB05;FB05;0073 0074;0073 0074;
+FB06;FB06;FB06;0073 0074;0073 0074;
+FB13;FB13;FB13;0574 0576;0574 0576;
+FB14;FB14;FB14;0574 0565;0574 0565;
+FB15;FB15;FB15;0574 056B;0574 056B;
+FB16;FB16;FB16;057E 0576;057E 0576;
+FB17;FB17;FB17;0574 056D;0574 056D;
+FB1D;05D9 05B4;05D9 05B4;05D9 05B4;05D9 05B4;
+FB1F;05F2 05B7;05F2 05B7;05F2 05B7;05F2 05B7;
+FB20;FB20;FB20;05E2;05E2;
+FB21;FB21;FB21;05D0;05D0;
+FB22;FB22;FB22;05D3;05D3;
+FB23;FB23;FB23;05D4;05D4;
+FB24;FB24;FB24;05DB;05DB;
+FB25;FB25;FB25;05DC;05DC;
+FB26;FB26;FB26;05DD;05DD;
+FB27;FB27;FB27;05E8;05E8;
+FB28;FB28;FB28;05EA;05EA;
+FB29;FB29;FB29;002B;002B;
+FB2A;05E9 05C1;05E9 05C1;05E9 05C1;05E9 05C1;
+FB2B;05E9 05C2;05E9 05C2;05E9 05C2;05E9 05C2;
+FB2C;05E9 05BC 05C1;05E9 05BC 05C1;05E9 05BC 05C1;05E9 05BC 05C1;
+FB2D;05E9 05BC 05C2;05E9 05BC 05C2;05E9 05BC 05C2;05E9 05BC 05C2;
+FB2E;05D0 05B7;05D0 05B7;05D0 05B7;05D0 05B7;
+FB2F;05D0 05B8;05D0 05B8;05D0 05B8;05D0 05B8;
+FB30;05D0 05BC;05D0 05BC;05D0 05BC;05D0 05BC;
+FB31;05D1 05BC;05D1 05BC;05D1 05BC;05D1 05BC;
+FB32;05D2 05BC;05D2 05BC;05D2 05BC;05D2 05BC;
+FB33;05D3 05BC;05D3 05BC;05D3 05BC;05D3 05BC;
+FB34;05D4 05BC;05D4 05BC;05D4 05BC;05D4 05BC;
+FB35;05D5 05BC;05D5 05BC;05D5 05BC;05D5 05BC;
+FB36;05D6 05BC;05D6 05BC;05D6 05BC;05D6 05BC;
+FB38;05D8 05BC;05D8 05BC;05D8 05BC;05D8 05BC;
+FB39;05D9 05BC;05D9 05BC;05D9 05BC;05D9 05BC;
+FB3A;05DA 05BC;05DA 05BC;05DA 05BC;05DA 05BC;
+FB3B;05DB 05BC;05DB 05BC;05DB 05BC;05DB 05BC;
+FB3C;05DC 05BC;05DC 05BC;05DC 05BC;05DC 05BC;
+FB3E;05DE 05BC;05DE 05BC;05DE 05BC;05DE 05BC;
+FB40;05E0 05BC;05E0 05BC;05E0 05BC;05E0 05BC;
+FB41;05E1 05BC;05E1 05BC;05E1 05BC;05E1 05BC;
+FB43;05E3 05BC;05E3 05BC;05E3 05BC;05E3 05BC;
+FB44;05E4 05BC;05E4 05BC;05E4 05BC;05E4 05BC;
+FB46;05E6 05BC;05E6 05BC;05E6 05BC;05E6 05BC;
+FB47;05E7 05BC;05E7 05BC;05E7 05BC;05E7 05BC;
+FB48;05E8 05BC;05E8 05BC;05E8 05BC;05E8 05BC;
+FB49;05E9 05BC;05E9 05BC;05E9 05BC;05E9 05BC;
+FB4A;05EA 05BC;05EA 05BC;05EA 05BC;05EA 05BC;
+FB4B;05D5 05B9;05D5 05B9;05D5 05B9;05D5 05B9;
+FB4C;05D1 05BF;05D1 05BF;05D1 05BF;05D1 05BF;
+FB4D;05DB 05BF;05DB 05BF;05DB 05BF;05DB 05BF;
+FB4E;05E4 05BF;05E4 05BF;05E4 05BF;05E4 05BF;
+FB4F;FB4F;FB4F;05D0 05DC;05D0 05DC;
+FB50;FB50;FB50;0671;0671;
+FB51;FB51;FB51;0671;0671;
+FB52;FB52;FB52;067B;067B;
+FB53;FB53;FB53;067B;067B;
+FB54;FB54;FB54;067B;067B;
+FB55;FB55;FB55;067B;067B;
+FB56;FB56;FB56;067E;067E;
+FB57;FB57;FB57;067E;067E;
+FB58;FB58;FB58;067E;067E;
+FB59;FB59;FB59;067E;067E;
+FB5A;FB5A;FB5A;0680;0680;
+FB5B;FB5B;FB5B;0680;0680;
+FB5C;FB5C;FB5C;0680;0680;
+FB5D;FB5D;FB5D;0680;0680;
+FB5E;FB5E;FB5E;067A;067A;
+FB5F;FB5F;FB5F;067A;067A;
+FB60;FB60;FB60;067A;067A;
+FB61;FB61;FB61;067A;067A;
+FB62;FB62;FB62;067F;067F;
+FB63;FB63;FB63;067F;067F;
+FB64;FB64;FB64;067F;067F;
+FB65;FB65;FB65;067F;067F;
+FB66;FB66;FB66;0679;0679;
+FB67;FB67;FB67;0679;0679;
+FB68;FB68;FB68;0679;0679;
+FB69;FB69;FB69;0679;0679;
+FB6A;FB6A;FB6A;06A4;06A4;
+FB6B;FB6B;FB6B;06A4;06A4;
+FB6C;FB6C;FB6C;06A4;06A4;
+FB6D;FB6D;FB6D;06A4;06A4;
+FB6E;FB6E;FB6E;06A6;06A6;
+FB6F;FB6F;FB6F;06A6;06A6;
+FB70;FB70;FB70;06A6;06A6;
+FB71;FB71;FB71;06A6;06A6;
+FB72;FB72;FB72;0684;0684;
+FB73;FB73;FB73;0684;0684;
+FB74;FB74;FB74;0684;0684;
+FB75;FB75;FB75;0684;0684;
+FB76;FB76;FB76;0683;0683;
+FB77;FB77;FB77;0683;0683;
+FB78;FB78;FB78;0683;0683;
+FB79;FB79;FB79;0683;0683;
+FB7A;FB7A;FB7A;0686;0686;
+FB7B;FB7B;FB7B;0686;0686;
+FB7C;FB7C;FB7C;0686;0686;
+FB7D;FB7D;FB7D;0686;0686;
+FB7E;FB7E;FB7E;0687;0687;
+FB7F;FB7F;FB7F;0687;0687;
+FB80;FB80;FB80;0687;0687;
+FB81;FB81;FB81;0687;0687;
+FB82;FB82;FB82;068D;068D;
+FB83;FB83;FB83;068D;068D;
+FB84;FB84;FB84;068C;068C;
+FB85;FB85;FB85;068C;068C;
+FB86;FB86;FB86;068E;068E;
+FB87;FB87;FB87;068E;068E;
+FB88;FB88;FB88;0688;0688;
+FB89;FB89;FB89;0688;0688;
+FB8A;FB8A;FB8A;0698;0698;
+FB8B;FB8B;FB8B;0698;0698;
+FB8C;FB8C;FB8C;0691;0691;
+FB8D;FB8D;FB8D;0691;0691;
+FB8E;FB8E;FB8E;06A9;06A9;
+FB8F;FB8F;FB8F;06A9;06A9;
+FB90;FB90;FB90;06A9;06A9;
+FB91;FB91;FB91;06A9;06A9;
+FB92;FB92;FB92;06AF;06AF;
+FB93;FB93;FB93;06AF;06AF;
+FB94;FB94;FB94;06AF;06AF;
+FB95;FB95;FB95;06AF;06AF;
+FB96;FB96;FB96;06B3;06B3;
+FB97;FB97;FB97;06B3;06B3;
+FB98;FB98;FB98;06B3;06B3;
+FB99;FB99;FB99;06B3;06B3;
+FB9A;FB9A;FB9A;06B1;06B1;
+FB9B;FB9B;FB9B;06B1;06B1;
+FB9C;FB9C;FB9C;06B1;06B1;
+FB9D;FB9D;FB9D;06B1;06B1;
+FB9E;FB9E;FB9E;06BA;06BA;
+FB9F;FB9F;FB9F;06BA;06BA;
+FBA0;FBA0;FBA0;06BB;06BB;
+FBA1;FBA1;FBA1;06BB;06BB;
+FBA2;FBA2;FBA2;06BB;06BB;
+FBA3;FBA3;FBA3;06BB;06BB;
+FBA4;FBA4;FBA4;06C0;06D5 0654;
+FBA5;FBA5;FBA5;06C0;06D5 0654;
+FBA6;FBA6;FBA6;06C1;06C1;
+FBA7;FBA7;FBA7;06C1;06C1;
+FBA8;FBA8;FBA8;06C1;06C1;
+FBA9;FBA9;FBA9;06C1;06C1;
+FBAA;FBAA;FBAA;06BE;06BE;
+FBAB;FBAB;FBAB;06BE;06BE;
+FBAC;FBAC;FBAC;06BE;06BE;
+FBAD;FBAD;FBAD;06BE;06BE;
+FBAE;FBAE;FBAE;06D2;06D2;
+FBAF;FBAF;FBAF;06D2;06D2;
+FBB0;FBB0;FBB0;06D3;06D2 0654;
+FBB1;FBB1;FBB1;06D3;06D2 0654;
+FBD3;FBD3;FBD3;06AD;06AD;
+FBD4;FBD4;FBD4;06AD;06AD;
+FBD5;FBD5;FBD5;06AD;06AD;
+FBD6;FBD6;FBD6;06AD;06AD;
+FBD7;FBD7;FBD7;06C7;06C7;
+FBD8;FBD8;FBD8;06C7;06C7;
+FBD9;FBD9;FBD9;06C6;06C6;
+FBDA;FBDA;FBDA;06C6;06C6;
+FBDB;FBDB;FBDB;06C8;06C8;
+FBDC;FBDC;FBDC;06C8;06C8;
+FBDD;FBDD;FBDD;06C7 0674;06C7 0674;
+FBDE;FBDE;FBDE;06CB;06CB;
+FBDF;FBDF;FBDF;06CB;06CB;
+FBE0;FBE0;FBE0;06C5;06C5;
+FBE1;FBE1;FBE1;06C5;06C5;
+FBE2;FBE2;FBE2;06C9;06C9;
+FBE3;FBE3;FBE3;06C9;06C9;
+FBE4;FBE4;FBE4;06D0;06D0;
+FBE5;FBE5;FBE5;06D0;06D0;
+FBE6;FBE6;FBE6;06D0;06D0;
+FBE7;FBE7;FBE7;06D0;06D0;
+FBE8;FBE8;FBE8;0649;0649;
+FBE9;FBE9;FBE9;0649;0649;
+FBEA;FBEA;FBEA;0626 0627;064A 0654 0627;
+FBEB;FBEB;FBEB;0626 0627;064A 0654 0627;
+FBEC;FBEC;FBEC;0626 06D5;064A 0654 06D5;
+FBED;FBED;FBED;0626 06D5;064A 0654 06D5;
+FBEE;FBEE;FBEE;0626 0648;064A 0654 0648;
+FBEF;FBEF;FBEF;0626 0648;064A 0654 0648;
+FBF0;FBF0;FBF0;0626 06C7;064A 0654 06C7;
+FBF1;FBF1;FBF1;0626 06C7;064A 0654 06C7;
+FBF2;FBF2;FBF2;0626 06C6;064A 0654 06C6;
+FBF3;FBF3;FBF3;0626 06C6;064A 0654 06C6;
+FBF4;FBF4;FBF4;0626 06C8;064A 0654 06C8;
+FBF5;FBF5;FBF5;0626 06C8;064A 0654 06C8;
+FBF6;FBF6;FBF6;0626 06D0;064A 0654 06D0;
+FBF7;FBF7;FBF7;0626 06D0;064A 0654 06D0;
+FBF8;FBF8;FBF8;0626 06D0;064A 0654 06D0;
+FBF9;FBF9;FBF9;0626 0649;064A 0654 0649;
+FBFA;FBFA;FBFA;0626 0649;064A 0654 0649;
+FBFB;FBFB;FBFB;0626 0649;064A 0654 0649;
+FBFC;FBFC;FBFC;06CC;06CC;
+FBFD;FBFD;FBFD;06CC;06CC;
+FBFE;FBFE;FBFE;06CC;06CC;
+FBFF;FBFF;FBFF;06CC;06CC;
+FC00;FC00;FC00;0626 062C;064A 0654 062C;
+FC01;FC01;FC01;0626 062D;064A 0654 062D;
+FC02;FC02;FC02;0626 0645;064A 0654 0645;
+FC03;FC03;FC03;0626 0649;064A 0654 0649;
+FC04;FC04;FC04;0626 064A;064A 0654 064A;
+FC05;FC05;FC05;0628 062C;0628 062C;
+FC06;FC06;FC06;0628 062D;0628 062D;
+FC07;FC07;FC07;0628 062E;0628 062E;
+FC08;FC08;FC08;0628 0645;0628 0645;
+FC09;FC09;FC09;0628 0649;0628 0649;
+FC0A;FC0A;FC0A;0628 064A;0628 064A;
+FC0B;FC0B;FC0B;062A 062C;062A 062C;
+FC0C;FC0C;FC0C;062A 062D;062A 062D;
+FC0D;FC0D;FC0D;062A 062E;062A 062E;
+FC0E;FC0E;FC0E;062A 0645;062A 0645;
+FC0F;FC0F;FC0F;062A 0649;062A 0649;
+FC10;FC10;FC10;062A 064A;062A 064A;
+FC11;FC11;FC11;062B 062C;062B 062C;
+FC12;FC12;FC12;062B 0645;062B 0645;
+FC13;FC13;FC13;062B 0649;062B 0649;
+FC14;FC14;FC14;062B 064A;062B 064A;
+FC15;FC15;FC15;062C 062D;062C 062D;
+FC16;FC16;FC16;062C 0645;062C 0645;
+FC17;FC17;FC17;062D 062C;062D 062C;
+FC18;FC18;FC18;062D 0645;062D 0645;
+FC19;FC19;FC19;062E 062C;062E 062C;
+FC1A;FC1A;FC1A;062E 062D;062E 062D;
+FC1B;FC1B;FC1B;062E 0645;062E 0645;
+FC1C;FC1C;FC1C;0633 062C;0633 062C;
+FC1D;FC1D;FC1D;0633 062D;0633 062D;
+FC1E;FC1E;FC1E;0633 062E;0633 062E;
+FC1F;FC1F;FC1F;0633 0645;0633 0645;
+FC20;FC20;FC20;0635 062D;0635 062D;
+FC21;FC21;FC21;0635 0645;0635 0645;
+FC22;FC22;FC22;0636 062C;0636 062C;
+FC23;FC23;FC23;0636 062D;0636 062D;
+FC24;FC24;FC24;0636 062E;0636 062E;
+FC25;FC25;FC25;0636 0645;0636 0645;
+FC26;FC26;FC26;0637 062D;0637 062D;
+FC27;FC27;FC27;0637 0645;0637 0645;
+FC28;FC28;FC28;0638 0645;0638 0645;
+FC29;FC29;FC29;0639 062C;0639 062C;
+FC2A;FC2A;FC2A;0639 0645;0639 0645;
+FC2B;FC2B;FC2B;063A 062C;063A 062C;
+FC2C;FC2C;FC2C;063A 0645;063A 0645;
+FC2D;FC2D;FC2D;0641 062C;0641 062C;
+FC2E;FC2E;FC2E;0641 062D;0641 062D;
+FC2F;FC2F;FC2F;0641 062E;0641 062E;
+FC30;FC30;FC30;0641 0645;0641 0645;
+FC31;FC31;FC31;0641 0649;0641 0649;
+FC32;FC32;FC32;0641 064A;0641 064A;
+FC33;FC33;FC33;0642 062D;0642 062D;
+FC34;FC34;FC34;0642 0645;0642 0645;
+FC35;FC35;FC35;0642 0649;0642 0649;
+FC36;FC36;FC36;0642 064A;0642 064A;
+FC37;FC37;FC37;0643 0627;0643 0627;
+FC38;FC38;FC38;0643 062C;0643 062C;
+FC39;FC39;FC39;0643 062D;0643 062D;
+FC3A;FC3A;FC3A;0643 062E;0643 062E;
+FC3B;FC3B;FC3B;0643 0644;0643 0644;
+FC3C;FC3C;FC3C;0643 0645;0643 0645;
+FC3D;FC3D;FC3D;0643 0649;0643 0649;
+FC3E;FC3E;FC3E;0643 064A;0643 064A;
+FC3F;FC3F;FC3F;0644 062C;0644 062C;
+FC40;FC40;FC40;0644 062D;0644 062D;
+FC41;FC41;FC41;0644 062E;0644 062E;
+FC42;FC42;FC42;0644 0645;0644 0645;
+FC43;FC43;FC43;0644 0649;0644 0649;
+FC44;FC44;FC44;0644 064A;0644 064A;
+FC45;FC45;FC45;0645 062C;0645 062C;
+FC46;FC46;FC46;0645 062D;0645 062D;
+FC47;FC47;FC47;0645 062E;0645 062E;
+FC48;FC48;FC48;0645 0645;0645 0645;
+FC49;FC49;FC49;0645 0649;0645 0649;
+FC4A;FC4A;FC4A;0645 064A;0645 064A;
+FC4B;FC4B;FC4B;0646 062C;0646 062C;
+FC4C;FC4C;FC4C;0646 062D;0646 062D;
+FC4D;FC4D;FC4D;0646 062E;0646 062E;
+FC4E;FC4E;FC4E;0646 0645;0646 0645;
+FC4F;FC4F;FC4F;0646 0649;0646 0649;
+FC50;FC50;FC50;0646 064A;0646 064A;
+FC51;FC51;FC51;0647 062C;0647 062C;
+FC52;FC52;FC52;0647 0645;0647 0645;
+FC53;FC53;FC53;0647 0649;0647 0649;
+FC54;FC54;FC54;0647 064A;0647 064A;
+FC55;FC55;FC55;064A 062C;064A 062C;
+FC56;FC56;FC56;064A 062D;064A 062D;
+FC57;FC57;FC57;064A 062E;064A 062E;
+FC58;FC58;FC58;064A 0645;064A 0645;
+FC59;FC59;FC59;064A 0649;064A 0649;
+FC5A;FC5A;FC5A;064A 064A;064A 064A;
+FC5B;FC5B;FC5B;0630 0670;0630 0670;
+FC5C;FC5C;FC5C;0631 0670;0631 0670;
+FC5D;FC5D;FC5D;0649 0670;0649 0670;
+FC5E;FC5E;FC5E;0020 064C 0651;0020 064C 0651;
+FC5F;FC5F;FC5F;0020 064D 0651;0020 064D 0651;
+FC60;FC60;FC60;0020 064E 0651;0020 064E 0651;
+FC61;FC61;FC61;0020 064F 0651;0020 064F 0651;
+FC62;FC62;FC62;0020 0650 0651;0020 0650 0651;
+FC63;FC63;FC63;0020 0651 0670;0020 0651 0670;
+FC64;FC64;FC64;0626 0631;064A 0654 0631;
+FC65;FC65;FC65;0626 0632;064A 0654 0632;
+FC66;FC66;FC66;0626 0645;064A 0654 0645;
+FC67;FC67;FC67;0626 0646;064A 0654 0646;
+FC68;FC68;FC68;0626 0649;064A 0654 0649;
+FC69;FC69;FC69;0626 064A;064A 0654 064A;
+FC6A;FC6A;FC6A;0628 0631;0628 0631;
+FC6B;FC6B;FC6B;0628 0632;0628 0632;
+FC6C;FC6C;FC6C;0628 0645;0628 0645;
+FC6D;FC6D;FC6D;0628 0646;0628 0646;
+FC6E;FC6E;FC6E;0628 0649;0628 0649;
+FC6F;FC6F;FC6F;0628 064A;0628 064A;
+FC70;FC70;FC70;062A 0631;062A 0631;
+FC71;FC71;FC71;062A 0632;062A 0632;
+FC72;FC72;FC72;062A 0645;062A 0645;
+FC73;FC73;FC73;062A 0646;062A 0646;
+FC74;FC74;FC74;062A 0649;062A 0649;
+FC75;FC75;FC75;062A 064A;062A 064A;
+FC76;FC76;FC76;062B 0631;062B 0631;
+FC77;FC77;FC77;062B 0632;062B 0632;
+FC78;FC78;FC78;062B 0645;062B 0645;
+FC79;FC79;FC79;062B 0646;062B 0646;
+FC7A;FC7A;FC7A;062B 0649;062B 0649;
+FC7B;FC7B;FC7B;062B 064A;062B 064A;
+FC7C;FC7C;FC7C;0641 0649;0641 0649;
+FC7D;FC7D;FC7D;0641 064A;0641 064A;
+FC7E;FC7E;FC7E;0642 0649;0642 0649;
+FC7F;FC7F;FC7F;0642 064A;0642 064A;
+FC80;FC80;FC80;0643 0627;0643 0627;
+FC81;FC81;FC81;0643 0644;0643 0644;
+FC82;FC82;FC82;0643 0645;0643 0645;
+FC83;FC83;FC83;0643 0649;0643 0649;
+FC84;FC84;FC84;0643 064A;0643 064A;
+FC85;FC85;FC85;0644 0645;0644 0645;
+FC86;FC86;FC86;0644 0649;0644 0649;
+FC87;FC87;FC87;0644 064A;0644 064A;
+FC88;FC88;FC88;0645 0627;0645 0627;
+FC89;FC89;FC89;0645 0645;0645 0645;
+FC8A;FC8A;FC8A;0646 0631;0646 0631;
+FC8B;FC8B;FC8B;0646 0632;0646 0632;
+FC8C;FC8C;FC8C;0646 0645;0646 0645;
+FC8D;FC8D;FC8D;0646 0646;0646 0646;
+FC8E;FC8E;FC8E;0646 0649;0646 0649;
+FC8F;FC8F;FC8F;0646 064A;0646 064A;
+FC90;FC90;FC90;0649 0670;0649 0670;
+FC91;FC91;FC91;064A 0631;064A 0631;
+FC92;FC92;FC92;064A 0632;064A 0632;
+FC93;FC93;FC93;064A 0645;064A 0645;
+FC94;FC94;FC94;064A 0646;064A 0646;
+FC95;FC95;FC95;064A 0649;064A 0649;
+FC96;FC96;FC96;064A 064A;064A 064A;
+FC97;FC97;FC97;0626 062C;064A 0654 062C;
+FC98;FC98;FC98;0626 062D;064A 0654 062D;
+FC99;FC99;FC99;0626 062E;064A 0654 062E;
+FC9A;FC9A;FC9A;0626 0645;064A 0654 0645;
+FC9B;FC9B;FC9B;0626 0647;064A 0654 0647;
+FC9C;FC9C;FC9C;0628 062C;0628 062C;
+FC9D;FC9D;FC9D;0628 062D;0628 062D;
+FC9E;FC9E;FC9E;0628 062E;0628 062E;
+FC9F;FC9F;FC9F;0628 0645;0628 0645;
+FCA0;FCA0;FCA0;0628 0647;0628 0647;
+FCA1;FCA1;FCA1;062A 062C;062A 062C;
+FCA2;FCA2;FCA2;062A 062D;062A 062D;
+FCA3;FCA3;FCA3;062A 062E;062A 062E;
+FCA4;FCA4;FCA4;062A 0645;062A 0645;
+FCA5;FCA5;FCA5;062A 0647;062A 0647;
+FCA6;FCA6;FCA6;062B 0645;062B 0645;
+FCA7;FCA7;FCA7;062C 062D;062C 062D;
+FCA8;FCA8;FCA8;062C 0645;062C 0645;
+FCA9;FCA9;FCA9;062D 062C;062D 062C;
+FCAA;FCAA;FCAA;062D 0645;062D 0645;
+FCAB;FCAB;FCAB;062E 062C;062E 062C;
+FCAC;FCAC;FCAC;062E 0645;062E 0645;
+FCAD;FCAD;FCAD;0633 062C;0633 062C;
+FCAE;FCAE;FCAE;0633 062D;0633 062D;
+FCAF;FCAF;FCAF;0633 062E;0633 062E;
+FCB0;FCB0;FCB0;0633 0645;0633 0645;
+FCB1;FCB1;FCB1;0635 062D;0635 062D;
+FCB2;FCB2;FCB2;0635 062E;0635 062E;
+FCB3;FCB3;FCB3;0635 0645;0635 0645;
+FCB4;FCB4;FCB4;0636 062C;0636 062C;
+FCB5;FCB5;FCB5;0636 062D;0636 062D;
+FCB6;FCB6;FCB6;0636 062E;0636 062E;
+FCB7;FCB7;FCB7;0636 0645;0636 0645;
+FCB8;FCB8;FCB8;0637 062D;0637 062D;
+FCB9;FCB9;FCB9;0638 0645;0638 0645;
+FCBA;FCBA;FCBA;0639 062C;0639 062C;
+FCBB;FCBB;FCBB;0639 0645;0639 0645;
+FCBC;FCBC;FCBC;063A 062C;063A 062C;
+FCBD;FCBD;FCBD;063A 0645;063A 0645;
+FCBE;FCBE;FCBE;0641 062C;0641 062C;
+FCBF;FCBF;FCBF;0641 062D;0641 062D;
+FCC0;FCC0;FCC0;0641 062E;0641 062E;
+FCC1;FCC1;FCC1;0641 0645;0641 0645;
+FCC2;FCC2;FCC2;0642 062D;0642 062D;
+FCC3;FCC3;FCC3;0642 0645;0642 0645;
+FCC4;FCC4;FCC4;0643 062C;0643 062C;
+FCC5;FCC5;FCC5;0643 062D;0643 062D;
+FCC6;FCC6;FCC6;0643 062E;0643 062E;
+FCC7;FCC7;FCC7;0643 0644;0643 0644;
+FCC8;FCC8;FCC8;0643 0645;0643 0645;
+FCC9;FCC9;FCC9;0644 062C;0644 062C;
+FCCA;FCCA;FCCA;0644 062D;0644 062D;
+FCCB;FCCB;FCCB;0644 062E;0644 062E;
+FCCC;FCCC;FCCC;0644 0645;0644 0645;
+FCCD;FCCD;FCCD;0644 0647;0644 0647;
+FCCE;FCCE;FCCE;0645 062C;0645 062C;
+FCCF;FCCF;FCCF;0645 062D;0645 062D;
+FCD0;FCD0;FCD0;0645 062E;0645 062E;
+FCD1;FCD1;FCD1;0645 0645;0645 0645;
+FCD2;FCD2;FCD2;0646 062C;0646 062C;
+FCD3;FCD3;FCD3;0646 062D;0646 062D;
+FCD4;FCD4;FCD4;0646 062E;0646 062E;
+FCD5;FCD5;FCD5;0646 0645;0646 0645;
+FCD6;FCD6;FCD6;0646 0647;0646 0647;
+FCD7;FCD7;FCD7;0647 062C;0647 062C;
+FCD8;FCD8;FCD8;0647 0645;0647 0645;
+FCD9;FCD9;FCD9;0647 0670;0647 0670;
+FCDA;FCDA;FCDA;064A 062C;064A 062C;
+FCDB;FCDB;FCDB;064A 062D;064A 062D;
+FCDC;FCDC;FCDC;064A 062E;064A 062E;
+FCDD;FCDD;FCDD;064A 0645;064A 0645;
+FCDE;FCDE;FCDE;064A 0647;064A 0647;
+FCDF;FCDF;FCDF;0626 0645;064A 0654 0645;
+FCE0;FCE0;FCE0;0626 0647;064A 0654 0647;
+FCE1;FCE1;FCE1;0628 0645;0628 0645;
+FCE2;FCE2;FCE2;0628 0647;0628 0647;
+FCE3;FCE3;FCE3;062A 0645;062A 0645;
+FCE4;FCE4;FCE4;062A 0647;062A 0647;
+FCE5;FCE5;FCE5;062B 0645;062B 0645;
+FCE6;FCE6;FCE6;062B 0647;062B 0647;
+FCE7;FCE7;FCE7;0633 0645;0633 0645;
+FCE8;FCE8;FCE8;0633 0647;0633 0647;
+FCE9;FCE9;FCE9;0634 0645;0634 0645;
+FCEA;FCEA;FCEA;0634 0647;0634 0647;
+FCEB;FCEB;FCEB;0643 0644;0643 0644;
+FCEC;FCEC;FCEC;0643 0645;0643 0645;
+FCED;FCED;FCED;0644 0645;0644 0645;
+FCEE;FCEE;FCEE;0646 0645;0646 0645;
+FCEF;FCEF;FCEF;0646 0647;0646 0647;
+FCF0;FCF0;FCF0;064A 0645;064A 0645;
+FCF1;FCF1;FCF1;064A 0647;064A 0647;
+FCF2;FCF2;FCF2;0640 064E 0651;0640 064E 0651;
+FCF3;FCF3;FCF3;0640 064F 0651;0640 064F 0651;
+FCF4;FCF4;FCF4;0640 0650 0651;0640 0650 0651;
+FCF5;FCF5;FCF5;0637 0649;0637 0649;
+FCF6;FCF6;FCF6;0637 064A;0637 064A;
+FCF7;FCF7;FCF7;0639 0649;0639 0649;
+FCF8;FCF8;FCF8;0639 064A;0639 064A;
+FCF9;FCF9;FCF9;063A 0649;063A 0649;
+FCFA;FCFA;FCFA;063A 064A;063A 064A;
+FCFB;FCFB;FCFB;0633 0649;0633 0649;
+FCFC;FCFC;FCFC;0633 064A;0633 064A;
+FCFD;FCFD;FCFD;0634 0649;0634 0649;
+FCFE;FCFE;FCFE;0634 064A;0634 064A;
+FCFF;FCFF;FCFF;062D 0649;062D 0649;
+FD00;FD00;FD00;062D 064A;062D 064A;
+FD01;FD01;FD01;062C 0649;062C 0649;
+FD02;FD02;FD02;062C 064A;062C 064A;
+FD03;FD03;FD03;062E 0649;062E 0649;
+FD04;FD04;FD04;062E 064A;062E 064A;
+FD05;FD05;FD05;0635 0649;0635 0649;
+FD06;FD06;FD06;0635 064A;0635 064A;
+FD07;FD07;FD07;0636 0649;0636 0649;
+FD08;FD08;FD08;0636 064A;0636 064A;
+FD09;FD09;FD09;0634 062C;0634 062C;
+FD0A;FD0A;FD0A;0634 062D;0634 062D;
+FD0B;FD0B;FD0B;0634 062E;0634 062E;
+FD0C;FD0C;FD0C;0634 0645;0634 0645;
+FD0D;FD0D;FD0D;0634 0631;0634 0631;
+FD0E;FD0E;FD0E;0633 0631;0633 0631;
+FD0F;FD0F;FD0F;0635 0631;0635 0631;
+FD10;FD10;FD10;0636 0631;0636 0631;
+FD11;FD11;FD11;0637 0649;0637 0649;
+FD12;FD12;FD12;0637 064A;0637 064A;
+FD13;FD13;FD13;0639 0649;0639 0649;
+FD14;FD14;FD14;0639 064A;0639 064A;
+FD15;FD15;FD15;063A 0649;063A 0649;
+FD16;FD16;FD16;063A 064A;063A 064A;
+FD17;FD17;FD17;0633 0649;0633 0649;
+FD18;FD18;FD18;0633 064A;0633 064A;
+FD19;FD19;FD19;0634 0649;0634 0649;
+FD1A;FD1A;FD1A;0634 064A;0634 064A;
+FD1B;FD1B;FD1B;062D 0649;062D 0649;
+FD1C;FD1C;FD1C;062D 064A;062D 064A;
+FD1D;FD1D;FD1D;062C 0649;062C 0649;
+FD1E;FD1E;FD1E;062C 064A;062C 064A;
+FD1F;FD1F;FD1F;062E 0649;062E 0649;
+FD20;FD20;FD20;062E 064A;062E 064A;
+FD21;FD21;FD21;0635 0649;0635 0649;
+FD22;FD22;FD22;0635 064A;0635 064A;
+FD23;FD23;FD23;0636 0649;0636 0649;
+FD24;FD24;FD24;0636 064A;0636 064A;
+FD25;FD25;FD25;0634 062C;0634 062C;
+FD26;FD26;FD26;0634 062D;0634 062D;
+FD27;FD27;FD27;0634 062E;0634 062E;
+FD28;FD28;FD28;0634 0645;0634 0645;
+FD29;FD29;FD29;0634 0631;0634 0631;
+FD2A;FD2A;FD2A;0633 0631;0633 0631;
+FD2B;FD2B;FD2B;0635 0631;0635 0631;
+FD2C;FD2C;FD2C;0636 0631;0636 0631;
+FD2D;FD2D;FD2D;0634 062C;0634 062C;
+FD2E;FD2E;FD2E;0634 062D;0634 062D;
+FD2F;FD2F;FD2F;0634 062E;0634 062E;
+FD30;FD30;FD30;0634 0645;0634 0645;
+FD31;FD31;FD31;0633 0647;0633 0647;
+FD32;FD32;FD32;0634 0647;0634 0647;
+FD33;FD33;FD33;0637 0645;0637 0645;
+FD34;FD34;FD34;0633 062C;0633 062C;
+FD35;FD35;FD35;0633 062D;0633 062D;
+FD36;FD36;FD36;0633 062E;0633 062E;
+FD37;FD37;FD37;0634 062C;0634 062C;
+FD38;FD38;FD38;0634 062D;0634 062D;
+FD39;FD39;FD39;0634 062E;0634 062E;
+FD3A;FD3A;FD3A;0637 0645;0637 0645;
+FD3B;FD3B;FD3B;0638 0645;0638 0645;
+FD3C;FD3C;FD3C;0627 064B;0627 064B;
+FD3D;FD3D;FD3D;0627 064B;0627 064B;
+FD50;FD50;FD50;062A 062C 0645;062A 062C 0645;
+FD51;FD51;FD51;062A 062D 062C;062A 062D 062C;
+FD52;FD52;FD52;062A 062D 062C;062A 062D 062C;
+FD53;FD53;FD53;062A 062D 0645;062A 062D 0645;
+FD54;FD54;FD54;062A 062E 0645;062A 062E 0645;
+FD55;FD55;FD55;062A 0645 062C;062A 0645 062C;
+FD56;FD56;FD56;062A 0645 062D;062A 0645 062D;
+FD57;FD57;FD57;062A 0645 062E;062A 0645 062E;
+FD58;FD58;FD58;062C 0645 062D;062C 0645 062D;
+FD59;FD59;FD59;062C 0645 062D;062C 0645 062D;
+FD5A;FD5A;FD5A;062D 0645 064A;062D 0645 064A;
+FD5B;FD5B;FD5B;062D 0645 0649;062D 0645 0649;
+FD5C;FD5C;FD5C;0633 062D 062C;0633 062D 062C;
+FD5D;FD5D;FD5D;0633 062C 062D;0633 062C 062D;
+FD5E;FD5E;FD5E;0633 062C 0649;0633 062C 0649;
+FD5F;FD5F;FD5F;0633 0645 062D;0633 0645 062D;
+FD60;FD60;FD60;0633 0645 062D;0633 0645 062D;
+FD61;FD61;FD61;0633 0645 062C;0633 0645 062C;
+FD62;FD62;FD62;0633 0645 0645;0633 0645 0645;
+FD63;FD63;FD63;0633 0645 0645;0633 0645 0645;
+FD64;FD64;FD64;0635 062D 062D;0635 062D 062D;
+FD65;FD65;FD65;0635 062D 062D;0635 062D 062D;
+FD66;FD66;FD66;0635 0645 0645;0635 0645 0645;
+FD67;FD67;FD67;0634 062D 0645;0634 062D 0645;
+FD68;FD68;FD68;0634 062D 0645;0634 062D 0645;
+FD69;FD69;FD69;0634 062C 064A;0634 062C 064A;
+FD6A;FD6A;FD6A;0634 0645 062E;0634 0645 062E;
+FD6B;FD6B;FD6B;0634 0645 062E;0634 0645 062E;
+FD6C;FD6C;FD6C;0634 0645 0645;0634 0645 0645;
+FD6D;FD6D;FD6D;0634 0645 0645;0634 0645 0645;
+FD6E;FD6E;FD6E;0636 062D 0649;0636 062D 0649;
+FD6F;FD6F;FD6F;0636 062E 0645;0636 062E 0645;
+FD70;FD70;FD70;0636 062E 0645;0636 062E 0645;
+FD71;FD71;FD71;0637 0645 062D;0637 0645 062D;
+FD72;FD72;FD72;0637 0645 062D;0637 0645 062D;
+FD73;FD73;FD73;0637 0645 0645;0637 0645 0645;
+FD74;FD74;FD74;0637 0645 064A;0637 0645 064A;
+FD75;FD75;FD75;0639 062C 0645;0639 062C 0645;
+FD76;FD76;FD76;0639 0645 0645;0639 0645 0645;
+FD77;FD77;FD77;0639 0645 0645;0639 0645 0645;
+FD78;FD78;FD78;0639 0645 0649;0639 0645 0649;
+FD79;FD79;FD79;063A 0645 0645;063A 0645 0645;
+FD7A;FD7A;FD7A;063A 0645 064A;063A 0645 064A;
+FD7B;FD7B;FD7B;063A 0645 0649;063A 0645 0649;
+FD7C;FD7C;FD7C;0641 062E 0645;0641 062E 0645;
+FD7D;FD7D;FD7D;0641 062E 0645;0641 062E 0645;
+FD7E;FD7E;FD7E;0642 0645 062D;0642 0645 062D;
+FD7F;FD7F;FD7F;0642 0645 0645;0642 0645 0645;
+FD80;FD80;FD80;0644 062D 0645;0644 062D 0645;
+FD81;FD81;FD81;0644 062D 064A;0644 062D 064A;
+FD82;FD82;FD82;0644 062D 0649;0644 062D 0649;
+FD83;FD83;FD83;0644 062C 062C;0644 062C 062C;
+FD84;FD84;FD84;0644 062C 062C;0644 062C 062C;
+FD85;FD85;FD85;0644 062E 0645;0644 062E 0645;
+FD86;FD86;FD86;0644 062E 0645;0644 062E 0645;
+FD87;FD87;FD87;0644 0645 062D;0644 0645 062D;
+FD88;FD88;FD88;0644 0645 062D;0644 0645 062D;
+FD89;FD89;FD89;0645 062D 062C;0645 062D 062C;
+FD8A;FD8A;FD8A;0645 062D 0645;0645 062D 0645;
+FD8B;FD8B;FD8B;0645 062D 064A;0645 062D 064A;
+FD8C;FD8C;FD8C;0645 062C 062D;0645 062C 062D;
+FD8D;FD8D;FD8D;0645 062C 0645;0645 062C 0645;
+FD8E;FD8E;FD8E;0645 062E 062C;0645 062E 062C;
+FD8F;FD8F;FD8F;0645 062E 0645;0645 062E 0645;
+FD92;FD92;FD92;0645 062C 062E;0645 062C 062E;
+FD93;FD93;FD93;0647 0645 062C;0647 0645 062C;
+FD94;FD94;FD94;0647 0645 0645;0647 0645 0645;
+FD95;FD95;FD95;0646 062D 0645;0646 062D 0645;
+FD96;FD96;FD96;0646 062D 0649;0646 062D 0649;
+FD97;FD97;FD97;0646 062C 0645;0646 062C 0645;
+FD98;FD98;FD98;0646 062C 0645;0646 062C 0645;
+FD99;FD99;FD99;0646 062C 0649;0646 062C 0649;
+FD9A;FD9A;FD9A;0646 0645 064A;0646 0645 064A;
+FD9B;FD9B;FD9B;0646 0645 0649;0646 0645 0649;
+FD9C;FD9C;FD9C;064A 0645 0645;064A 0645 0645;
+FD9D;FD9D;FD9D;064A 0645 0645;064A 0645 0645;
+FD9E;FD9E;FD9E;0628 062E 064A;0628 062E 064A;
+FD9F;FD9F;FD9F;062A 062C 064A;062A 062C 064A;
+FDA0;FDA0;FDA0;062A 062C 0649;062A 062C 0649;
+FDA1;FDA1;FDA1;062A 062E 064A;062A 062E 064A;
+FDA2;FDA2;FDA2;062A 062E 0649;062A 062E 0649;
+FDA3;FDA3;FDA3;062A 0645 064A;062A 0645 064A;
+FDA4;FDA4;FDA4;062A 0645 0649;062A 0645 0649;
+FDA5;FDA5;FDA5;062C 0645 064A;062C 0645 064A;
+FDA6;FDA6;FDA6;062C 062D 0649;062C 062D 0649;
+FDA7;FDA7;FDA7;062C 0645 0649;062C 0645 0649;
+FDA8;FDA8;FDA8;0633 062E 0649;0633 062E 0649;
+FDA9;FDA9;FDA9;0635 062D 064A;0635 062D 064A;
+FDAA;FDAA;FDAA;0634 062D 064A;0634 062D 064A;
+FDAB;FDAB;FDAB;0636 062D 064A;0636 062D 064A;
+FDAC;FDAC;FDAC;0644 062C 064A;0644 062C 064A;
+FDAD;FDAD;FDAD;0644 0645 064A;0644 0645 064A;
+FDAE;FDAE;FDAE;064A 062D 064A;064A 062D 064A;
+FDAF;FDAF;FDAF;064A 062C 064A;064A 062C 064A;
+FDB0;FDB0;FDB0;064A 0645 064A;064A 0645 064A;
+FDB1;FDB1;FDB1;0645 0645 064A;0645 0645 064A;
+FDB2;FDB2;FDB2;0642 0645 064A;0642 0645 064A;
+FDB3;FDB3;FDB3;0646 062D 064A;0646 062D 064A;
+FDB4;FDB4;FDB4;0642 0645 062D;0642 0645 062D;
+FDB5;FDB5;FDB5;0644 062D 0645;0644 062D 0645;
+FDB6;FDB6;FDB6;0639 0645 064A;0639 0645 064A;
+FDB7;FDB7;FDB7;0643 0645 064A;0643 0645 064A;
+FDB8;FDB8;FDB8;0646 062C 062D;0646 062C 062D;
+FDB9;FDB9;FDB9;0645 062E 064A;0645 062E 064A;
+FDBA;FDBA;FDBA;0644 062C 0645;0644 062C 0645;
+FDBB;FDBB;FDBB;0643 0645 0645;0643 0645 0645;
+FDBC;FDBC;FDBC;0644 062C 0645;0644 062C 0645;
+FDBD;FDBD;FDBD;0646 062C 062D;0646 062C 062D;
+FDBE;FDBE;FDBE;062C 062D 064A;062C 062D 064A;
+FDBF;FDBF;FDBF;062D 062C 064A;062D 062C 064A;
+FDC0;FDC0;FDC0;0645 062C 064A;0645 062C 064A;
+FDC1;FDC1;FDC1;0641 0645 064A;0641 0645 064A;
+FDC2;FDC2;FDC2;0628 062D 064A;0628 062D 064A;
+FDC3;FDC3;FDC3;0643 0645 0645;0643 0645 0645;
+FDC4;FDC4;FDC4;0639 062C 0645;0639 062C 0645;
+FDC5;FDC5;FDC5;0635 0645 0645;0635 0645 0645;
+FDC6;FDC6;FDC6;0633 062E 064A;0633 062E 064A;
+FDC7;FDC7;FDC7;0646 062C 064A;0646 062C 064A;
+FDF0;FDF0;FDF0;0635 0644 06D2;0635 0644 06D2;
+FDF1;FDF1;FDF1;0642 0644 06D2;0642 0644 06D2;
+FDF2;FDF2;FDF2;0627 0644 0644 0647;0627 0644 0644 0647;
+FDF3;FDF3;FDF3;0627 0643 0628 0631;0627 0643 0628 0631;
+FDF4;FDF4;FDF4;0645 062D 0645 062F;0645 062D 0645 062F;
+FDF5;FDF5;FDF5;0635 0644 0639 0645;0635 0644 0639 0645;
+FDF6;FDF6;FDF6;0631 0633 0648 0644;0631 0633 0648 0644;
+FDF7;FDF7;FDF7;0639 0644 064A 0647;0639 0644 064A 0647;
+FDF8;FDF8;FDF8;0648 0633 0644 0645;0648 0633 0644 0645;
+FDF9;FDF9;FDF9;0635 0644 0649;0635 0644 0649;
+FDFA;FDFA;FDFA;0635 0644 0649 0020 0627 0644 0644 0647 0020 0639 0644 064A 0647 0020 0648 0633 0644 0645;0635 0644 0649 0020 0627 0644 0644 0647 0020 0639 0644 064A 0647 0020 0648 0633 0644 0645;
+FDFB;FDFB;FDFB;062C 0644 0020 062C 0644 0627 0644 0647;062C 0644 0020 062C 0644 0627 0644 0647;
+FDFC;FDFC;FDFC;0631 06CC 0627 0644;0631 06CC 0627 0644;
+FE30;FE30;FE30;002E 002E;002E 002E;
+FE31;FE31;FE31;2014;2014;
+FE32;FE32;FE32;2013;2013;
+FE33;FE33;FE33;005F;005F;
+FE34;FE34;FE34;005F;005F;
+FE35;FE35;FE35;0028;0028;
+FE36;FE36;FE36;0029;0029;
+FE37;FE37;FE37;007B;007B;
+FE38;FE38;FE38;007D;007D;
+FE39;FE39;FE39;3014;3014;
+FE3A;FE3A;FE3A;3015;3015;
+FE3B;FE3B;FE3B;3010;3010;
+FE3C;FE3C;FE3C;3011;3011;
+FE3D;FE3D;FE3D;300A;300A;
+FE3E;FE3E;FE3E;300B;300B;
+FE3F;FE3F;FE3F;3008;3008;
+FE40;FE40;FE40;3009;3009;
+FE41;FE41;FE41;300C;300C;
+FE42;FE42;FE42;300D;300D;
+FE43;FE43;FE43;300E;300E;
+FE44;FE44;FE44;300F;300F;
+FE49;FE49;FE49;0020 0305;0020 0305;
+FE4A;FE4A;FE4A;0020 0305;0020 0305;
+FE4B;FE4B;FE4B;0020 0305;0020 0305;
+FE4C;FE4C;FE4C;0020 0305;0020 0305;
+FE4D;FE4D;FE4D;005F;005F;
+FE4E;FE4E;FE4E;005F;005F;
+FE4F;FE4F;FE4F;005F;005F;
+FE50;FE50;FE50;002C;002C;
+FE51;FE51;FE51;3001;3001;
+FE52;FE52;FE52;002E;002E;
+FE54;FE54;FE54;003B;003B;
+FE55;FE55;FE55;003A;003A;
+FE56;FE56;FE56;003F;003F;
+FE57;FE57;FE57;0021;0021;
+FE58;FE58;FE58;2014;2014;
+FE59;FE59;FE59;0028;0028;
+FE5A;FE5A;FE5A;0029;0029;
+FE5B;FE5B;FE5B;007B;007B;
+FE5C;FE5C;FE5C;007D;007D;
+FE5D;FE5D;FE5D;3014;3014;
+FE5E;FE5E;FE5E;3015;3015;
+FE5F;FE5F;FE5F;0023;0023;
+FE60;FE60;FE60;0026;0026;
+FE61;FE61;FE61;002A;002A;
+FE62;FE62;FE62;002B;002B;
+FE63;FE63;FE63;002D;002D;
+FE64;FE64;FE64;003C;003C;
+FE65;FE65;FE65;003E;003E;
+FE66;FE66;FE66;003D;003D;
+FE68;FE68;FE68;005C;005C;
+FE69;FE69;FE69;0024;0024;
+FE6A;FE6A;FE6A;0025;0025;
+FE6B;FE6B;FE6B;0040;0040;
+FE70;FE70;FE70;0020 064B;0020 064B;
+FE71;FE71;FE71;0640 064B;0640 064B;
+FE72;FE72;FE72;0020 064C;0020 064C;
+FE74;FE74;FE74;0020 064D;0020 064D;
+FE76;FE76;FE76;0020 064E;0020 064E;
+FE77;FE77;FE77;0640 064E;0640 064E;
+FE78;FE78;FE78;0020 064F;0020 064F;
+FE79;FE79;FE79;0640 064F;0640 064F;
+FE7A;FE7A;FE7A;0020 0650;0020 0650;
+FE7B;FE7B;FE7B;0640 0650;0640 0650;
+FE7C;FE7C;FE7C;0020 0651;0020 0651;
+FE7D;FE7D;FE7D;0640 0651;0640 0651;
+FE7E;FE7E;FE7E;0020 0652;0020 0652;
+FE7F;FE7F;FE7F;0640 0652;0640 0652;
+FE80;FE80;FE80;0621;0621;
+FE81;FE81;FE81;0622;0627 0653;
+FE82;FE82;FE82;0622;0627 0653;
+FE83;FE83;FE83;0623;0627 0654;
+FE84;FE84;FE84;0623;0627 0654;
+FE85;FE85;FE85;0624;0648 0654;
+FE86;FE86;FE86;0624;0648 0654;
+FE87;FE87;FE87;0625;0627 0655;
+FE88;FE88;FE88;0625;0627 0655;
+FE89;FE89;FE89;0626;064A 0654;
+FE8A;FE8A;FE8A;0626;064A 0654;
+FE8B;FE8B;FE8B;0626;064A 0654;
+FE8C;FE8C;FE8C;0626;064A 0654;
+FE8D;FE8D;FE8D;0627;0627;
+FE8E;FE8E;FE8E;0627;0627;
+FE8F;FE8F;FE8F;0628;0628;
+FE90;FE90;FE90;0628;0628;
+FE91;FE91;FE91;0628;0628;
+FE92;FE92;FE92;0628;0628;
+FE93;FE93;FE93;0629;0629;
+FE94;FE94;FE94;0629;0629;
+FE95;FE95;FE95;062A;062A;
+FE96;FE96;FE96;062A;062A;
+FE97;FE97;FE97;062A;062A;
+FE98;FE98;FE98;062A;062A;
+FE99;FE99;FE99;062B;062B;
+FE9A;FE9A;FE9A;062B;062B;
+FE9B;FE9B;FE9B;062B;062B;
+FE9C;FE9C;FE9C;062B;062B;
+FE9D;FE9D;FE9D;062C;062C;
+FE9E;FE9E;FE9E;062C;062C;
+FE9F;FE9F;FE9F;062C;062C;
+FEA0;FEA0;FEA0;062C;062C;
+FEA1;FEA1;FEA1;062D;062D;
+FEA2;FEA2;FEA2;062D;062D;
+FEA3;FEA3;FEA3;062D;062D;
+FEA4;FEA4;FEA4;062D;062D;
+FEA5;FEA5;FEA5;062E;062E;
+FEA6;FEA6;FEA6;062E;062E;
+FEA7;FEA7;FEA7;062E;062E;
+FEA8;FEA8;FEA8;062E;062E;
+FEA9;FEA9;FEA9;062F;062F;
+FEAA;FEAA;FEAA;062F;062F;
+FEAB;FEAB;FEAB;0630;0630;
+FEAC;FEAC;FEAC;0630;0630;
+FEAD;FEAD;FEAD;0631;0631;
+FEAE;FEAE;FEAE;0631;0631;
+FEAF;FEAF;FEAF;0632;0632;
+FEB0;FEB0;FEB0;0632;0632;
+FEB1;FEB1;FEB1;0633;0633;
+FEB2;FEB2;FEB2;0633;0633;
+FEB3;FEB3;FEB3;0633;0633;
+FEB4;FEB4;FEB4;0633;0633;
+FEB5;FEB5;FEB5;0634;0634;
+FEB6;FEB6;FEB6;0634;0634;
+FEB7;FEB7;FEB7;0634;0634;
+FEB8;FEB8;FEB8;0634;0634;
+FEB9;FEB9;FEB9;0635;0635;
+FEBA;FEBA;FEBA;0635;0635;
+FEBB;FEBB;FEBB;0635;0635;
+FEBC;FEBC;FEBC;0635;0635;
+FEBD;FEBD;FEBD;0636;0636;
+FEBE;FEBE;FEBE;0636;0636;
+FEBF;FEBF;FEBF;0636;0636;
+FEC0;FEC0;FEC0;0636;0636;
+FEC1;FEC1;FEC1;0637;0637;
+FEC2;FEC2;FEC2;0637;0637;
+FEC3;FEC3;FEC3;0637;0637;
+FEC4;FEC4;FEC4;0637;0637;
+FEC5;FEC5;FEC5;0638;0638;
+FEC6;FEC6;FEC6;0638;0638;
+FEC7;FEC7;FEC7;0638;0638;
+FEC8;FEC8;FEC8;0638;0638;
+FEC9;FEC9;FEC9;0639;0639;
+FECA;FECA;FECA;0639;0639;
+FECB;FECB;FECB;0639;0639;
+FECC;FECC;FECC;0639;0639;
+FECD;FECD;FECD;063A;063A;
+FECE;FECE;FECE;063A;063A;
+FECF;FECF;FECF;063A;063A;
+FED0;FED0;FED0;063A;063A;
+FED1;FED1;FED1;0641;0641;
+FED2;FED2;FED2;0641;0641;
+FED3;FED3;FED3;0641;0641;
+FED4;FED4;FED4;0641;0641;
+FED5;FED5;FED5;0642;0642;
+FED6;FED6;FED6;0642;0642;
+FED7;FED7;FED7;0642;0642;
+FED8;FED8;FED8;0642;0642;
+FED9;FED9;FED9;0643;0643;
+FEDA;FEDA;FEDA;0643;0643;
+FEDB;FEDB;FEDB;0643;0643;
+FEDC;FEDC;FEDC;0643;0643;
+FEDD;FEDD;FEDD;0644;0644;
+FEDE;FEDE;FEDE;0644;0644;
+FEDF;FEDF;FEDF;0644;0644;
+FEE0;FEE0;FEE0;0644;0644;
+FEE1;FEE1;FEE1;0645;0645;
+FEE2;FEE2;FEE2;0645;0645;
+FEE3;FEE3;FEE3;0645;0645;
+FEE4;FEE4;FEE4;0645;0645;
+FEE5;FEE5;FEE5;0646;0646;
+FEE6;FEE6;FEE6;0646;0646;
+FEE7;FEE7;FEE7;0646;0646;
+FEE8;FEE8;FEE8;0646;0646;
+FEE9;FEE9;FEE9;0647;0647;
+FEEA;FEEA;FEEA;0647;0647;
+FEEB;FEEB;FEEB;0647;0647;
+FEEC;FEEC;FEEC;0647;0647;
+FEED;FEED;FEED;0648;0648;
+FEEE;FEEE;FEEE;0648;0648;
+FEEF;FEEF;FEEF;0649;0649;
+FEF0;FEF0;FEF0;0649;0649;
+FEF1;FEF1;FEF1;064A;064A;
+FEF2;FEF2;FEF2;064A;064A;
+FEF3;FEF3;FEF3;064A;064A;
+FEF4;FEF4;FEF4;064A;064A;
+FEF5;FEF5;FEF5;0644 0622;0644 0627 0653;
+FEF6;FEF6;FEF6;0644 0622;0644 0627 0653;
+FEF7;FEF7;FEF7;0644 0623;0644 0627 0654;
+FEF8;FEF8;FEF8;0644 0623;0644 0627 0654;
+FEF9;FEF9;FEF9;0644 0625;0644 0627 0655;
+FEFA;FEFA;FEFA;0644 0625;0644 0627 0655;
+FEFB;FEFB;FEFB;0644 0627;0644 0627;
+FEFC;FEFC;FEFC;0644 0627;0644 0627;
+FF01;FF01;FF01;0021;0021;
+FF02;FF02;FF02;0022;0022;
+FF03;FF03;FF03;0023;0023;
+FF04;FF04;FF04;0024;0024;
+FF05;FF05;FF05;0025;0025;
+FF06;FF06;FF06;0026;0026;
+FF07;FF07;FF07;0027;0027;
+FF08;FF08;FF08;0028;0028;
+FF09;FF09;FF09;0029;0029;
+FF0A;FF0A;FF0A;002A;002A;
+FF0B;FF0B;FF0B;002B;002B;
+FF0C;FF0C;FF0C;002C;002C;
+FF0D;FF0D;FF0D;002D;002D;
+FF0E;FF0E;FF0E;002E;002E;
+FF0F;FF0F;FF0F;002F;002F;
+FF10;FF10;FF10;0030;0030;
+FF11;FF11;FF11;0031;0031;
+FF12;FF12;FF12;0032;0032;
+FF13;FF13;FF13;0033;0033;
+FF14;FF14;FF14;0034;0034;
+FF15;FF15;FF15;0035;0035;
+FF16;FF16;FF16;0036;0036;
+FF17;FF17;FF17;0037;0037;
+FF18;FF18;FF18;0038;0038;
+FF19;FF19;FF19;0039;0039;
+FF1A;FF1A;FF1A;003A;003A;
+FF1B;FF1B;FF1B;003B;003B;
+FF1C;FF1C;FF1C;003C;003C;
+FF1D;FF1D;FF1D;003D;003D;
+FF1E;FF1E;FF1E;003E;003E;
+FF1F;FF1F;FF1F;003F;003F;
+FF20;FF20;FF20;0040;0040;
+FF21;FF21;FF21;0041;0041;
+FF22;FF22;FF22;0042;0042;
+FF23;FF23;FF23;0043;0043;
+FF24;FF24;FF24;0044;0044;
+FF25;FF25;FF25;0045;0045;
+FF26;FF26;FF26;0046;0046;
+FF27;FF27;FF27;0047;0047;
+FF28;FF28;FF28;0048;0048;
+FF29;FF29;FF29;0049;0049;
+FF2A;FF2A;FF2A;004A;004A;
+FF2B;FF2B;FF2B;004B;004B;
+FF2C;FF2C;FF2C;004C;004C;
+FF2D;FF2D;FF2D;004D;004D;
+FF2E;FF2E;FF2E;004E;004E;
+FF2F;FF2F;FF2F;004F;004F;
+FF30;FF30;FF30;0050;0050;
+FF31;FF31;FF31;0051;0051;
+FF32;FF32;FF32;0052;0052;
+FF33;FF33;FF33;0053;0053;
+FF34;FF34;FF34;0054;0054;
+FF35;FF35;FF35;0055;0055;
+FF36;FF36;FF36;0056;0056;
+FF37;FF37;FF37;0057;0057;
+FF38;FF38;FF38;0058;0058;
+FF39;FF39;FF39;0059;0059;
+FF3A;FF3A;FF3A;005A;005A;
+FF3B;FF3B;FF3B;005B;005B;
+FF3C;FF3C;FF3C;005C;005C;
+FF3D;FF3D;FF3D;005D;005D;
+FF3E;FF3E;FF3E;005E;005E;
+FF3F;FF3F;FF3F;005F;005F;
+FF40;FF40;FF40;0060;0060;
+FF41;FF41;FF41;0061;0061;
+FF42;FF42;FF42;0062;0062;
+FF43;FF43;FF43;0063;0063;
+FF44;FF44;FF44;0064;0064;
+FF45;FF45;FF45;0065;0065;
+FF46;FF46;FF46;0066;0066;
+FF47;FF47;FF47;0067;0067;
+FF48;FF48;FF48;0068;0068;
+FF49;FF49;FF49;0069;0069;
+FF4A;FF4A;FF4A;006A;006A;
+FF4B;FF4B;FF4B;006B;006B;
+FF4C;FF4C;FF4C;006C;006C;
+FF4D;FF4D;FF4D;006D;006D;
+FF4E;FF4E;FF4E;006E;006E;
+FF4F;FF4F;FF4F;006F;006F;
+FF50;FF50;FF50;0070;0070;
+FF51;FF51;FF51;0071;0071;
+FF52;FF52;FF52;0072;0072;
+FF53;FF53;FF53;0073;0073;
+FF54;FF54;FF54;0074;0074;
+FF55;FF55;FF55;0075;0075;
+FF56;FF56;FF56;0076;0076;
+FF57;FF57;FF57;0077;0077;
+FF58;FF58;FF58;0078;0078;
+FF59;FF59;FF59;0079;0079;
+FF5A;FF5A;FF5A;007A;007A;
+FF5B;FF5B;FF5B;007B;007B;
+FF5C;FF5C;FF5C;007C;007C;
+FF5D;FF5D;FF5D;007D;007D;
+FF5E;FF5E;FF5E;007E;007E;
+FF5F;FF5F;FF5F;2985;2985;
+FF60;FF60;FF60;2986;2986;
+FF61;FF61;FF61;3002;3002;
+FF62;FF62;FF62;300C;300C;
+FF63;FF63;FF63;300D;300D;
+FF64;FF64;FF64;3001;3001;
+FF65;FF65;FF65;30FB;30FB;
+FF66;FF66;FF66;30F2;30F2;
+FF67;FF67;FF67;30A1;30A1;
+FF68;FF68;FF68;30A3;30A3;
+FF69;FF69;FF69;30A5;30A5;
+FF6A;FF6A;FF6A;30A7;30A7;
+FF6B;FF6B;FF6B;30A9;30A9;
+FF6C;FF6C;FF6C;30E3;30E3;
+FF6D;FF6D;FF6D;30E5;30E5;
+FF6E;FF6E;FF6E;30E7;30E7;
+FF6F;FF6F;FF6F;30C3;30C3;
+FF70;FF70;FF70;30FC;30FC;
+FF71;FF71;FF71;30A2;30A2;
+FF72;FF72;FF72;30A4;30A4;
+FF73;FF73;FF73;30A6;30A6;
+FF74;FF74;FF74;30A8;30A8;
+FF75;FF75;FF75;30AA;30AA;
+FF76;FF76;FF76;30AB;30AB;
+FF77;FF77;FF77;30AD;30AD;
+FF78;FF78;FF78;30AF;30AF;
+FF79;FF79;FF79;30B1;30B1;
+FF7A;FF7A;FF7A;30B3;30B3;
+FF7B;FF7B;FF7B;30B5;30B5;
+FF7C;FF7C;FF7C;30B7;30B7;
+FF7D;FF7D;FF7D;30B9;30B9;
+FF7E;FF7E;FF7E;30BB;30BB;
+FF7F;FF7F;FF7F;30BD;30BD;
+FF80;FF80;FF80;30BF;30BF;
+FF81;FF81;FF81;30C1;30C1;
+FF82;FF82;FF82;30C4;30C4;
+FF83;FF83;FF83;30C6;30C6;
+FF84;FF84;FF84;30C8;30C8;
+FF85;FF85;FF85;30CA;30CA;
+FF86;FF86;FF86;30CB;30CB;
+FF87;FF87;FF87;30CC;30CC;
+FF88;FF88;FF88;30CD;30CD;
+FF89;FF89;FF89;30CE;30CE;
+FF8A;FF8A;FF8A;30CF;30CF;
+FF8B;FF8B;FF8B;30D2;30D2;
+FF8C;FF8C;FF8C;30D5;30D5;
+FF8D;FF8D;FF8D;30D8;30D8;
+FF8E;FF8E;FF8E;30DB;30DB;
+FF8F;FF8F;FF8F;30DE;30DE;
+FF90;FF90;FF90;30DF;30DF;
+FF91;FF91;FF91;30E0;30E0;
+FF92;FF92;FF92;30E1;30E1;
+FF93;FF93;FF93;30E2;30E2;
+FF94;FF94;FF94;30E4;30E4;
+FF95;FF95;FF95;30E6;30E6;
+FF96;FF96;FF96;30E8;30E8;
+FF97;FF97;FF97;30E9;30E9;
+FF98;FF98;FF98;30EA;30EA;
+FF99;FF99;FF99;30EB;30EB;
+FF9A;FF9A;FF9A;30EC;30EC;
+FF9B;FF9B;FF9B;30ED;30ED;
+FF9C;FF9C;FF9C;30EF;30EF;
+FF9D;FF9D;FF9D;30F3;30F3;
+FF9E;FF9E;FF9E;3099;3099;
+FF9F;FF9F;FF9F;309A;309A;
+FFA0;FFA0;FFA0;1160;1160;
+FFA1;FFA1;FFA1;1100;1100;
+FFA2;FFA2;FFA2;1101;1101;
+FFA3;FFA3;FFA3;11AA;11AA;
+FFA4;FFA4;FFA4;1102;1102;
+FFA5;FFA5;FFA5;11AC;11AC;
+FFA6;FFA6;FFA6;11AD;11AD;
+FFA7;FFA7;FFA7;1103;1103;
+FFA8;FFA8;FFA8;1104;1104;
+FFA9;FFA9;FFA9;1105;1105;
+FFAA;FFAA;FFAA;11B0;11B0;
+FFAB;FFAB;FFAB;11B1;11B1;
+FFAC;FFAC;FFAC;11B2;11B2;
+FFAD;FFAD;FFAD;11B3;11B3;
+FFAE;FFAE;FFAE;11B4;11B4;
+FFAF;FFAF;FFAF;11B5;11B5;
+FFB0;FFB0;FFB0;111A;111A;
+FFB1;FFB1;FFB1;1106;1106;
+FFB2;FFB2;FFB2;1107;1107;
+FFB3;FFB3;FFB3;1108;1108;
+FFB4;FFB4;FFB4;1121;1121;
+FFB5;FFB5;FFB5;1109;1109;
+FFB6;FFB6;FFB6;110A;110A;
+FFB7;FFB7;FFB7;110B;110B;
+FFB8;FFB8;FFB8;110C;110C;
+FFB9;FFB9;FFB9;110D;110D;
+FFBA;FFBA;FFBA;110E;110E;
+FFBB;FFBB;FFBB;110F;110F;
+FFBC;FFBC;FFBC;1110;1110;
+FFBD;FFBD;FFBD;1111;1111;
+FFBE;FFBE;FFBE;1112;1112;
+FFC2;FFC2;FFC2;1161;1161;
+FFC3;FFC3;FFC3;1162;1162;
+FFC4;FFC4;FFC4;1163;1163;
+FFC5;FFC5;FFC5;1164;1164;
+FFC6;FFC6;FFC6;1165;1165;
+FFC7;FFC7;FFC7;1166;1166;
+FFCA;FFCA;FFCA;1167;1167;
+FFCB;FFCB;FFCB;1168;1168;
+FFCC;FFCC;FFCC;1169;1169;
+FFCD;FFCD;FFCD;116A;116A;
+FFCE;FFCE;FFCE;116B;116B;
+FFCF;FFCF;FFCF;116C;116C;
+FFD2;FFD2;FFD2;116D;116D;
+FFD3;FFD3;FFD3;116E;116E;
+FFD4;FFD4;FFD4;116F;116F;
+FFD5;FFD5;FFD5;1170;1170;
+FFD6;FFD6;FFD6;1171;1171;
+FFD7;FFD7;FFD7;1172;1172;
+FFDA;FFDA;FFDA;1173;1173;
+FFDB;FFDB;FFDB;1174;1174;
+FFDC;FFDC;FFDC;1175;1175;
+FFE0;FFE0;FFE0;00A2;00A2;
+FFE1;FFE1;FFE1;00A3;00A3;
+FFE2;FFE2;FFE2;00AC;00AC;
+FFE3;FFE3;FFE3;0020 0304;0020 0304;
+FFE4;FFE4;FFE4;00A6;00A6;
+FFE5;FFE5;FFE5;00A5;00A5;
+FFE6;FFE6;FFE6;20A9;20A9;
+FFE8;FFE8;FFE8;2502;2502;
+FFE9;FFE9;FFE9;2190;2190;
+FFEA;FFEA;FFEA;2191;2191;
+FFEB;FFEB;FFEB;2192;2192;
+FFEC;FFEC;FFEC;2193;2193;
+FFED;FFED;FFED;25A0;25A0;
+FFEE;FFEE;FFEE;25CB;25CB;
+1D15E;1D157 1D165;1D157 1D165;1D157 1D165;1D157 1D165;
+1D15F;1D158 1D165;1D158 1D165;1D158 1D165;1D158 1D165;
+1D160;1D158 1D165 1D16E;1D158 1D165 1D16E;1D158 1D165 1D16E;1D158 1D165 1D16E;
+1D161;1D158 1D165 1D16F;1D158 1D165 1D16F;1D158 1D165 1D16F;1D158 1D165 1D16F;
+1D162;1D158 1D165 1D170;1D158 1D165 1D170;1D158 1D165 1D170;1D158 1D165 1D170;
+1D163;1D158 1D165 1D171;1D158 1D165 1D171;1D158 1D165 1D171;1D158 1D165 1D171;
+1D164;1D158 1D165 1D172;1D158 1D165 1D172;1D158 1D165 1D172;1D158 1D165 1D172;
+1D1BB;1D1B9 1D165;1D1B9 1D165;1D1B9 1D165;1D1B9 1D165;
+1D1BC;1D1BA 1D165;1D1BA 1D165;1D1BA 1D165;1D1BA 1D165;
+1D1BD;1D1B9 1D165 1D16E;1D1B9 1D165 1D16E;1D1B9 1D165 1D16E;1D1B9 1D165 1D16E;
+1D1BE;1D1BA 1D165 1D16E;1D1BA 1D165 1D16E;1D1BA 1D165 1D16E;1D1BA 1D165 1D16E;
+1D1BF;1D1B9 1D165 1D16F;1D1B9 1D165 1D16F;1D1B9 1D165 1D16F;1D1B9 1D165 1D16F;
+1D1C0;1D1BA 1D165 1D16F;1D1BA 1D165 1D16F;1D1BA 1D165 1D16F;1D1BA 1D165 1D16F;
+1D400;1D400;1D400;0041;0041;
+1D401;1D401;1D401;0042;0042;
+1D402;1D402;1D402;0043;0043;
+1D403;1D403;1D403;0044;0044;
+1D404;1D404;1D404;0045;0045;
+1D405;1D405;1D405;0046;0046;
+1D406;1D406;1D406;0047;0047;
+1D407;1D407;1D407;0048;0048;
+1D408;1D408;1D408;0049;0049;
+1D409;1D409;1D409;004A;004A;
+1D40A;1D40A;1D40A;004B;004B;
+1D40B;1D40B;1D40B;004C;004C;
+1D40C;1D40C;1D40C;004D;004D;
+1D40D;1D40D;1D40D;004E;004E;
+1D40E;1D40E;1D40E;004F;004F;
+1D40F;1D40F;1D40F;0050;0050;
+1D410;1D410;1D410;0051;0051;
+1D411;1D411;1D411;0052;0052;
+1D412;1D412;1D412;0053;0053;
+1D413;1D413;1D413;0054;0054;
+1D414;1D414;1D414;0055;0055;
+1D415;1D415;1D415;0056;0056;
+1D416;1D416;1D416;0057;0057;
+1D417;1D417;1D417;0058;0058;
+1D418;1D418;1D418;0059;0059;
+1D419;1D419;1D419;005A;005A;
+1D41A;1D41A;1D41A;0061;0061;
+1D41B;1D41B;1D41B;0062;0062;
+1D41C;1D41C;1D41C;0063;0063;
+1D41D;1D41D;1D41D;0064;0064;
+1D41E;1D41E;1D41E;0065;0065;
+1D41F;1D41F;1D41F;0066;0066;
+1D420;1D420;1D420;0067;0067;
+1D421;1D421;1D421;0068;0068;
+1D422;1D422;1D422;0069;0069;
+1D423;1D423;1D423;006A;006A;
+1D424;1D424;1D424;006B;006B;
+1D425;1D425;1D425;006C;006C;
+1D426;1D426;1D426;006D;006D;
+1D427;1D427;1D427;006E;006E;
+1D428;1D428;1D428;006F;006F;
+1D429;1D429;1D429;0070;0070;
+1D42A;1D42A;1D42A;0071;0071;
+1D42B;1D42B;1D42B;0072;0072;
+1D42C;1D42C;1D42C;0073;0073;
+1D42D;1D42D;1D42D;0074;0074;
+1D42E;1D42E;1D42E;0075;0075;
+1D42F;1D42F;1D42F;0076;0076;
+1D430;1D430;1D430;0077;0077;
+1D431;1D431;1D431;0078;0078;
+1D432;1D432;1D432;0079;0079;
+1D433;1D433;1D433;007A;007A;
+1D434;1D434;1D434;0041;0041;
+1D435;1D435;1D435;0042;0042;
+1D436;1D436;1D436;0043;0043;
+1D437;1D437;1D437;0044;0044;
+1D438;1D438;1D438;0045;0045;
+1D439;1D439;1D439;0046;0046;
+1D43A;1D43A;1D43A;0047;0047;
+1D43B;1D43B;1D43B;0048;0048;
+1D43C;1D43C;1D43C;0049;0049;
+1D43D;1D43D;1D43D;004A;004A;
+1D43E;1D43E;1D43E;004B;004B;
+1D43F;1D43F;1D43F;004C;004C;
+1D440;1D440;1D440;004D;004D;
+1D441;1D441;1D441;004E;004E;
+1D442;1D442;1D442;004F;004F;
+1D443;1D443;1D443;0050;0050;
+1D444;1D444;1D444;0051;0051;
+1D445;1D445;1D445;0052;0052;
+1D446;1D446;1D446;0053;0053;
+1D447;1D447;1D447;0054;0054;
+1D448;1D448;1D448;0055;0055;
+1D449;1D449;1D449;0056;0056;
+1D44A;1D44A;1D44A;0057;0057;
+1D44B;1D44B;1D44B;0058;0058;
+1D44C;1D44C;1D44C;0059;0059;
+1D44D;1D44D;1D44D;005A;005A;
+1D44E;1D44E;1D44E;0061;0061;
+1D44F;1D44F;1D44F;0062;0062;
+1D450;1D450;1D450;0063;0063;
+1D451;1D451;1D451;0064;0064;
+1D452;1D452;1D452;0065;0065;
+1D453;1D453;1D453;0066;0066;
+1D454;1D454;1D454;0067;0067;
+1D456;1D456;1D456;0069;0069;
+1D457;1D457;1D457;006A;006A;
+1D458;1D458;1D458;006B;006B;
+1D459;1D459;1D459;006C;006C;
+1D45A;1D45A;1D45A;006D;006D;
+1D45B;1D45B;1D45B;006E;006E;
+1D45C;1D45C;1D45C;006F;006F;
+1D45D;1D45D;1D45D;0070;0070;
+1D45E;1D45E;1D45E;0071;0071;
+1D45F;1D45F;1D45F;0072;0072;
+1D460;1D460;1D460;0073;0073;
+1D461;1D461;1D461;0074;0074;
+1D462;1D462;1D462;0075;0075;
+1D463;1D463;1D463;0076;0076;
+1D464;1D464;1D464;0077;0077;
+1D465;1D465;1D465;0078;0078;
+1D466;1D466;1D466;0079;0079;
+1D467;1D467;1D467;007A;007A;
+1D468;1D468;1D468;0041;0041;
+1D469;1D469;1D469;0042;0042;
+1D46A;1D46A;1D46A;0043;0043;
+1D46B;1D46B;1D46B;0044;0044;
+1D46C;1D46C;1D46C;0045;0045;
+1D46D;1D46D;1D46D;0046;0046;
+1D46E;1D46E;1D46E;0047;0047;
+1D46F;1D46F;1D46F;0048;0048;
+1D470;1D470;1D470;0049;0049;
+1D471;1D471;1D471;004A;004A;
+1D472;1D472;1D472;004B;004B;
+1D473;1D473;1D473;004C;004C;
+1D474;1D474;1D474;004D;004D;
+1D475;1D475;1D475;004E;004E;
+1D476;1D476;1D476;004F;004F;
+1D477;1D477;1D477;0050;0050;
+1D478;1D478;1D478;0051;0051;
+1D479;1D479;1D479;0052;0052;
+1D47A;1D47A;1D47A;0053;0053;
+1D47B;1D47B;1D47B;0054;0054;
+1D47C;1D47C;1D47C;0055;0055;
+1D47D;1D47D;1D47D;0056;0056;
+1D47E;1D47E;1D47E;0057;0057;
+1D47F;1D47F;1D47F;0058;0058;
+1D480;1D480;1D480;0059;0059;
+1D481;1D481;1D481;005A;005A;
+1D482;1D482;1D482;0061;0061;
+1D483;1D483;1D483;0062;0062;
+1D484;1D484;1D484;0063;0063;
+1D485;1D485;1D485;0064;0064;
+1D486;1D486;1D486;0065;0065;
+1D487;1D487;1D487;0066;0066;
+1D488;1D488;1D488;0067;0067;
+1D489;1D489;1D489;0068;0068;
+1D48A;1D48A;1D48A;0069;0069;
+1D48B;1D48B;1D48B;006A;006A;
+1D48C;1D48C;1D48C;006B;006B;
+1D48D;1D48D;1D48D;006C;006C;
+1D48E;1D48E;1D48E;006D;006D;
+1D48F;1D48F;1D48F;006E;006E;
+1D490;1D490;1D490;006F;006F;
+1D491;1D491;1D491;0070;0070;
+1D492;1D492;1D492;0071;0071;
+1D493;1D493;1D493;0072;0072;
+1D494;1D494;1D494;0073;0073;
+1D495;1D495;1D495;0074;0074;
+1D496;1D496;1D496;0075;0075;
+1D497;1D497;1D497;0076;0076;
+1D498;1D498;1D498;0077;0077;
+1D499;1D499;1D499;0078;0078;
+1D49A;1D49A;1D49A;0079;0079;
+1D49B;1D49B;1D49B;007A;007A;
+1D49C;1D49C;1D49C;0041;0041;
+1D49E;1D49E;1D49E;0043;0043;
+1D49F;1D49F;1D49F;0044;0044;
+1D4A2;1D4A2;1D4A2;0047;0047;
+1D4A5;1D4A5;1D4A5;004A;004A;
+1D4A6;1D4A6;1D4A6;004B;004B;
+1D4A9;1D4A9;1D4A9;004E;004E;
+1D4AA;1D4AA;1D4AA;004F;004F;
+1D4AB;1D4AB;1D4AB;0050;0050;
+1D4AC;1D4AC;1D4AC;0051;0051;
+1D4AE;1D4AE;1D4AE;0053;0053;
+1D4AF;1D4AF;1D4AF;0054;0054;
+1D4B0;1D4B0;1D4B0;0055;0055;
+1D4B1;1D4B1;1D4B1;0056;0056;
+1D4B2;1D4B2;1D4B2;0057;0057;
+1D4B3;1D4B3;1D4B3;0058;0058;
+1D4B4;1D4B4;1D4B4;0059;0059;
+1D4B5;1D4B5;1D4B5;005A;005A;
+1D4B6;1D4B6;1D4B6;0061;0061;
+1D4B7;1D4B7;1D4B7;0062;0062;
+1D4B8;1D4B8;1D4B8;0063;0063;
+1D4B9;1D4B9;1D4B9;0064;0064;
+1D4BB;1D4BB;1D4BB;0066;0066;
+1D4BD;1D4BD;1D4BD;0068;0068;
+1D4BE;1D4BE;1D4BE;0069;0069;
+1D4BF;1D4BF;1D4BF;006A;006A;
+1D4C0;1D4C0;1D4C0;006B;006B;
+1D4C2;1D4C2;1D4C2;006D;006D;
+1D4C3;1D4C3;1D4C3;006E;006E;
+1D4C5;1D4C5;1D4C5;0070;0070;
+1D4C6;1D4C6;1D4C6;0071;0071;
+1D4C7;1D4C7;1D4C7;0072;0072;
+1D4C8;1D4C8;1D4C8;0073;0073;
+1D4C9;1D4C9;1D4C9;0074;0074;
+1D4CA;1D4CA;1D4CA;0075;0075;
+1D4CB;1D4CB;1D4CB;0076;0076;
+1D4CC;1D4CC;1D4CC;0077;0077;
+1D4CD;1D4CD;1D4CD;0078;0078;
+1D4CE;1D4CE;1D4CE;0079;0079;
+1D4CF;1D4CF;1D4CF;007A;007A;
+1D4D0;1D4D0;1D4D0;0041;0041;
+1D4D1;1D4D1;1D4D1;0042;0042;
+1D4D2;1D4D2;1D4D2;0043;0043;
+1D4D3;1D4D3;1D4D3;0044;0044;
+1D4D4;1D4D4;1D4D4;0045;0045;
+1D4D5;1D4D5;1D4D5;0046;0046;
+1D4D6;1D4D6;1D4D6;0047;0047;
+1D4D7;1D4D7;1D4D7;0048;0048;
+1D4D8;1D4D8;1D4D8;0049;0049;
+1D4D9;1D4D9;1D4D9;004A;004A;
+1D4DA;1D4DA;1D4DA;004B;004B;
+1D4DB;1D4DB;1D4DB;004C;004C;
+1D4DC;1D4DC;1D4DC;004D;004D;
+1D4DD;1D4DD;1D4DD;004E;004E;
+1D4DE;1D4DE;1D4DE;004F;004F;
+1D4DF;1D4DF;1D4DF;0050;0050;
+1D4E0;1D4E0;1D4E0;0051;0051;
+1D4E1;1D4E1;1D4E1;0052;0052;
+1D4E2;1D4E2;1D4E2;0053;0053;
+1D4E3;1D4E3;1D4E3;0054;0054;
+1D4E4;1D4E4;1D4E4;0055;0055;
+1D4E5;1D4E5;1D4E5;0056;0056;
+1D4E6;1D4E6;1D4E6;0057;0057;
+1D4E7;1D4E7;1D4E7;0058;0058;
+1D4E8;1D4E8;1D4E8;0059;0059;
+1D4E9;1D4E9;1D4E9;005A;005A;
+1D4EA;1D4EA;1D4EA;0061;0061;
+1D4EB;1D4EB;1D4EB;0062;0062;
+1D4EC;1D4EC;1D4EC;0063;0063;
+1D4ED;1D4ED;1D4ED;0064;0064;
+1D4EE;1D4EE;1D4EE;0065;0065;
+1D4EF;1D4EF;1D4EF;0066;0066;
+1D4F0;1D4F0;1D4F0;0067;0067;
+1D4F1;1D4F1;1D4F1;0068;0068;
+1D4F2;1D4F2;1D4F2;0069;0069;
+1D4F3;1D4F3;1D4F3;006A;006A;
+1D4F4;1D4F4;1D4F4;006B;006B;
+1D4F5;1D4F5;1D4F5;006C;006C;
+1D4F6;1D4F6;1D4F6;006D;006D;
+1D4F7;1D4F7;1D4F7;006E;006E;
+1D4F8;1D4F8;1D4F8;006F;006F;
+1D4F9;1D4F9;1D4F9;0070;0070;
+1D4FA;1D4FA;1D4FA;0071;0071;
+1D4FB;1D4FB;1D4FB;0072;0072;
+1D4FC;1D4FC;1D4FC;0073;0073;
+1D4FD;1D4FD;1D4FD;0074;0074;
+1D4FE;1D4FE;1D4FE;0075;0075;
+1D4FF;1D4FF;1D4FF;0076;0076;
+1D500;1D500;1D500;0077;0077;
+1D501;1D501;1D501;0078;0078;
+1D502;1D502;1D502;0079;0079;
+1D503;1D503;1D503;007A;007A;
+1D504;1D504;1D504;0041;0041;
+1D505;1D505;1D505;0042;0042;
+1D507;1D507;1D507;0044;0044;
+1D508;1D508;1D508;0045;0045;
+1D509;1D509;1D509;0046;0046;
+1D50A;1D50A;1D50A;0047;0047;
+1D50D;1D50D;1D50D;004A;004A;
+1D50E;1D50E;1D50E;004B;004B;
+1D50F;1D50F;1D50F;004C;004C;
+1D510;1D510;1D510;004D;004D;
+1D511;1D511;1D511;004E;004E;
+1D512;1D512;1D512;004F;004F;
+1D513;1D513;1D513;0050;0050;
+1D514;1D514;1D514;0051;0051;
+1D516;1D516;1D516;0053;0053;
+1D517;1D517;1D517;0054;0054;
+1D518;1D518;1D518;0055;0055;
+1D519;1D519;1D519;0056;0056;
+1D51A;1D51A;1D51A;0057;0057;
+1D51B;1D51B;1D51B;0058;0058;
+1D51C;1D51C;1D51C;0059;0059;
+1D51E;1D51E;1D51E;0061;0061;
+1D51F;1D51F;1D51F;0062;0062;
+1D520;1D520;1D520;0063;0063;
+1D521;1D521;1D521;0064;0064;
+1D522;1D522;1D522;0065;0065;
+1D523;1D523;1D523;0066;0066;
+1D524;1D524;1D524;0067;0067;
+1D525;1D525;1D525;0068;0068;
+1D526;1D526;1D526;0069;0069;
+1D527;1D527;1D527;006A;006A;
+1D528;1D528;1D528;006B;006B;
+1D529;1D529;1D529;006C;006C;
+1D52A;1D52A;1D52A;006D;006D;
+1D52B;1D52B;1D52B;006E;006E;
+1D52C;1D52C;1D52C;006F;006F;
+1D52D;1D52D;1D52D;0070;0070;
+1D52E;1D52E;1D52E;0071;0071;
+1D52F;1D52F;1D52F;0072;0072;
+1D530;1D530;1D530;0073;0073;
+1D531;1D531;1D531;0074;0074;
+1D532;1D532;1D532;0075;0075;
+1D533;1D533;1D533;0076;0076;
+1D534;1D534;1D534;0077;0077;
+1D535;1D535;1D535;0078;0078;
+1D536;1D536;1D536;0079;0079;
+1D537;1D537;1D537;007A;007A;
+1D538;1D538;1D538;0041;0041;
+1D539;1D539;1D539;0042;0042;
+1D53B;1D53B;1D53B;0044;0044;
+1D53C;1D53C;1D53C;0045;0045;
+1D53D;1D53D;1D53D;0046;0046;
+1D53E;1D53E;1D53E;0047;0047;
+1D540;1D540;1D540;0049;0049;
+1D541;1D541;1D541;004A;004A;
+1D542;1D542;1D542;004B;004B;
+1D543;1D543;1D543;004C;004C;
+1D544;1D544;1D544;004D;004D;
+1D546;1D546;1D546;004F;004F;
+1D54A;1D54A;1D54A;0053;0053;
+1D54B;1D54B;1D54B;0054;0054;
+1D54C;1D54C;1D54C;0055;0055;
+1D54D;1D54D;1D54D;0056;0056;
+1D54E;1D54E;1D54E;0057;0057;
+1D54F;1D54F;1D54F;0058;0058;
+1D550;1D550;1D550;0059;0059;
+1D552;1D552;1D552;0061;0061;
+1D553;1D553;1D553;0062;0062;
+1D554;1D554;1D554;0063;0063;
+1D555;1D555;1D555;0064;0064;
+1D556;1D556;1D556;0065;0065;
+1D557;1D557;1D557;0066;0066;
+1D558;1D558;1D558;0067;0067;
+1D559;1D559;1D559;0068;0068;
+1D55A;1D55A;1D55A;0069;0069;
+1D55B;1D55B;1D55B;006A;006A;
+1D55C;1D55C;1D55C;006B;006B;
+1D55D;1D55D;1D55D;006C;006C;
+1D55E;1D55E;1D55E;006D;006D;
+1D55F;1D55F;1D55F;006E;006E;
+1D560;1D560;1D560;006F;006F;
+1D561;1D561;1D561;0070;0070;
+1D562;1D562;1D562;0071;0071;
+1D563;1D563;1D563;0072;0072;
+1D564;1D564;1D564;0073;0073;
+1D565;1D565;1D565;0074;0074;
+1D566;1D566;1D566;0075;0075;
+1D567;1D567;1D567;0076;0076;
+1D568;1D568;1D568;0077;0077;
+1D569;1D569;1D569;0078;0078;
+1D56A;1D56A;1D56A;0079;0079;
+1D56B;1D56B;1D56B;007A;007A;
+1D56C;1D56C;1D56C;0041;0041;
+1D56D;1D56D;1D56D;0042;0042;
+1D56E;1D56E;1D56E;0043;0043;
+1D56F;1D56F;1D56F;0044;0044;
+1D570;1D570;1D570;0045;0045;
+1D571;1D571;1D571;0046;0046;
+1D572;1D572;1D572;0047;0047;
+1D573;1D573;1D573;0048;0048;
+1D574;1D574;1D574;0049;0049;
+1D575;1D575;1D575;004A;004A;
+1D576;1D576;1D576;004B;004B;
+1D577;1D577;1D577;004C;004C;
+1D578;1D578;1D578;004D;004D;
+1D579;1D579;1D579;004E;004E;
+1D57A;1D57A;1D57A;004F;004F;
+1D57B;1D57B;1D57B;0050;0050;
+1D57C;1D57C;1D57C;0051;0051;
+1D57D;1D57D;1D57D;0052;0052;
+1D57E;1D57E;1D57E;0053;0053;
+1D57F;1D57F;1D57F;0054;0054;
+1D580;1D580;1D580;0055;0055;
+1D581;1D581;1D581;0056;0056;
+1D582;1D582;1D582;0057;0057;
+1D583;1D583;1D583;0058;0058;
+1D584;1D584;1D584;0059;0059;
+1D585;1D585;1D585;005A;005A;
+1D586;1D586;1D586;0061;0061;
+1D587;1D587;1D587;0062;0062;
+1D588;1D588;1D588;0063;0063;
+1D589;1D589;1D589;0064;0064;
+1D58A;1D58A;1D58A;0065;0065;
+1D58B;1D58B;1D58B;0066;0066;
+1D58C;1D58C;1D58C;0067;0067;
+1D58D;1D58D;1D58D;0068;0068;
+1D58E;1D58E;1D58E;0069;0069;
+1D58F;1D58F;1D58F;006A;006A;
+1D590;1D590;1D590;006B;006B;
+1D591;1D591;1D591;006C;006C;
+1D592;1D592;1D592;006D;006D;
+1D593;1D593;1D593;006E;006E;
+1D594;1D594;1D594;006F;006F;
+1D595;1D595;1D595;0070;0070;
+1D596;1D596;1D596;0071;0071;
+1D597;1D597;1D597;0072;0072;
+1D598;1D598;1D598;0073;0073;
+1D599;1D599;1D599;0074;0074;
+1D59A;1D59A;1D59A;0075;0075;
+1D59B;1D59B;1D59B;0076;0076;
+1D59C;1D59C;1D59C;0077;0077;
+1D59D;1D59D;1D59D;0078;0078;
+1D59E;1D59E;1D59E;0079;0079;
+1D59F;1D59F;1D59F;007A;007A;
+1D5A0;1D5A0;1D5A0;0041;0041;
+1D5A1;1D5A1;1D5A1;0042;0042;
+1D5A2;1D5A2;1D5A2;0043;0043;
+1D5A3;1D5A3;1D5A3;0044;0044;
+1D5A4;1D5A4;1D5A4;0045;0045;
+1D5A5;1D5A5;1D5A5;0046;0046;
+1D5A6;1D5A6;1D5A6;0047;0047;
+1D5A7;1D5A7;1D5A7;0048;0048;
+1D5A8;1D5A8;1D5A8;0049;0049;
+1D5A9;1D5A9;1D5A9;004A;004A;
+1D5AA;1D5AA;1D5AA;004B;004B;
+1D5AB;1D5AB;1D5AB;004C;004C;
+1D5AC;1D5AC;1D5AC;004D;004D;
+1D5AD;1D5AD;1D5AD;004E;004E;
+1D5AE;1D5AE;1D5AE;004F;004F;
+1D5AF;1D5AF;1D5AF;0050;0050;
+1D5B0;1D5B0;1D5B0;0051;0051;
+1D5B1;1D5B1;1D5B1;0052;0052;
+1D5B2;1D5B2;1D5B2;0053;0053;
+1D5B3;1D5B3;1D5B3;0054;0054;
+1D5B4;1D5B4;1D5B4;0055;0055;
+1D5B5;1D5B5;1D5B5;0056;0056;
+1D5B6;1D5B6;1D5B6;0057;0057;
+1D5B7;1D5B7;1D5B7;0058;0058;
+1D5B8;1D5B8;1D5B8;0059;0059;
+1D5B9;1D5B9;1D5B9;005A;005A;
+1D5BA;1D5BA;1D5BA;0061;0061;
+1D5BB;1D5BB;1D5BB;0062;0062;
+1D5BC;1D5BC;1D5BC;0063;0063;
+1D5BD;1D5BD;1D5BD;0064;0064;
+1D5BE;1D5BE;1D5BE;0065;0065;
+1D5BF;1D5BF;1D5BF;0066;0066;
+1D5C0;1D5C0;1D5C0;0067;0067;
+1D5C1;1D5C1;1D5C1;0068;0068;
+1D5C2;1D5C2;1D5C2;0069;0069;
+1D5C3;1D5C3;1D5C3;006A;006A;
+1D5C4;1D5C4;1D5C4;006B;006B;
+1D5C5;1D5C5;1D5C5;006C;006C;
+1D5C6;1D5C6;1D5C6;006D;006D;
+1D5C7;1D5C7;1D5C7;006E;006E;
+1D5C8;1D5C8;1D5C8;006F;006F;
+1D5C9;1D5C9;1D5C9;0070;0070;
+1D5CA;1D5CA;1D5CA;0071;0071;
+1D5CB;1D5CB;1D5CB;0072;0072;
+1D5CC;1D5CC;1D5CC;0073;0073;
+1D5CD;1D5CD;1D5CD;0074;0074;
+1D5CE;1D5CE;1D5CE;0075;0075;
+1D5CF;1D5CF;1D5CF;0076;0076;
+1D5D0;1D5D0;1D5D0;0077;0077;
+1D5D1;1D5D1;1D5D1;0078;0078;
+1D5D2;1D5D2;1D5D2;0079;0079;
+1D5D3;1D5D3;1D5D3;007A;007A;
+1D5D4;1D5D4;1D5D4;0041;0041;
+1D5D5;1D5D5;1D5D5;0042;0042;
+1D5D6;1D5D6;1D5D6;0043;0043;
+1D5D7;1D5D7;1D5D7;0044;0044;
+1D5D8;1D5D8;1D5D8;0045;0045;
+1D5D9;1D5D9;1D5D9;0046;0046;
+1D5DA;1D5DA;1D5DA;0047;0047;
+1D5DB;1D5DB;1D5DB;0048;0048;
+1D5DC;1D5DC;1D5DC;0049;0049;
+1D5DD;1D5DD;1D5DD;004A;004A;
+1D5DE;1D5DE;1D5DE;004B;004B;
+1D5DF;1D5DF;1D5DF;004C;004C;
+1D5E0;1D5E0;1D5E0;004D;004D;
+1D5E1;1D5E1;1D5E1;004E;004E;
+1D5E2;1D5E2;1D5E2;004F;004F;
+1D5E3;1D5E3;1D5E3;0050;0050;
+1D5E4;1D5E4;1D5E4;0051;0051;
+1D5E5;1D5E5;1D5E5;0052;0052;
+1D5E6;1D5E6;1D5E6;0053;0053;
+1D5E7;1D5E7;1D5E7;0054;0054;
+1D5E8;1D5E8;1D5E8;0055;0055;
+1D5E9;1D5E9;1D5E9;0056;0056;
+1D5EA;1D5EA;1D5EA;0057;0057;
+1D5EB;1D5EB;1D5EB;0058;0058;
+1D5EC;1D5EC;1D5EC;0059;0059;
+1D5ED;1D5ED;1D5ED;005A;005A;
+1D5EE;1D5EE;1D5EE;0061;0061;
+1D5EF;1D5EF;1D5EF;0062;0062;
+1D5F0;1D5F0;1D5F0;0063;0063;
+1D5F1;1D5F1;1D5F1;0064;0064;
+1D5F2;1D5F2;1D5F2;0065;0065;
+1D5F3;1D5F3;1D5F3;0066;0066;
+1D5F4;1D5F4;1D5F4;0067;0067;
+1D5F5;1D5F5;1D5F5;0068;0068;
+1D5F6;1D5F6;1D5F6;0069;0069;
+1D5F7;1D5F7;1D5F7;006A;006A;
+1D5F8;1D5F8;1D5F8;006B;006B;
+1D5F9;1D5F9;1D5F9;006C;006C;
+1D5FA;1D5FA;1D5FA;006D;006D;
+1D5FB;1D5FB;1D5FB;006E;006E;
+1D5FC;1D5FC;1D5FC;006F;006F;
+1D5FD;1D5FD;1D5FD;0070;0070;
+1D5FE;1D5FE;1D5FE;0071;0071;
+1D5FF;1D5FF;1D5FF;0072;0072;
+1D600;1D600;1D600;0073;0073;
+1D601;1D601;1D601;0074;0074;
+1D602;1D602;1D602;0075;0075;
+1D603;1D603;1D603;0076;0076;
+1D604;1D604;1D604;0077;0077;
+1D605;1D605;1D605;0078;0078;
+1D606;1D606;1D606;0079;0079;
+1D607;1D607;1D607;007A;007A;
+1D608;1D608;1D608;0041;0041;
+1D609;1D609;1D609;0042;0042;
+1D60A;1D60A;1D60A;0043;0043;
+1D60B;1D60B;1D60B;0044;0044;
+1D60C;1D60C;1D60C;0045;0045;
+1D60D;1D60D;1D60D;0046;0046;
+1D60E;1D60E;1D60E;0047;0047;
+1D60F;1D60F;1D60F;0048;0048;
+1D610;1D610;1D610;0049;0049;
+1D611;1D611;1D611;004A;004A;
+1D612;1D612;1D612;004B;004B;
+1D613;1D613;1D613;004C;004C;
+1D614;1D614;1D614;004D;004D;
+1D615;1D615;1D615;004E;004E;
+1D616;1D616;1D616;004F;004F;
+1D617;1D617;1D617;0050;0050;
+1D618;1D618;1D618;0051;0051;
+1D619;1D619;1D619;0052;0052;
+1D61A;1D61A;1D61A;0053;0053;
+1D61B;1D61B;1D61B;0054;0054;
+1D61C;1D61C;1D61C;0055;0055;
+1D61D;1D61D;1D61D;0056;0056;
+1D61E;1D61E;1D61E;0057;0057;
+1D61F;1D61F;1D61F;0058;0058;
+1D620;1D620;1D620;0059;0059;
+1D621;1D621;1D621;005A;005A;
+1D622;1D622;1D622;0061;0061;
+1D623;1D623;1D623;0062;0062;
+1D624;1D624;1D624;0063;0063;
+1D625;1D625;1D625;0064;0064;
+1D626;1D626;1D626;0065;0065;
+1D627;1D627;1D627;0066;0066;
+1D628;1D628;1D628;0067;0067;
+1D629;1D629;1D629;0068;0068;
+1D62A;1D62A;1D62A;0069;0069;
+1D62B;1D62B;1D62B;006A;006A;
+1D62C;1D62C;1D62C;006B;006B;
+1D62D;1D62D;1D62D;006C;006C;
+1D62E;1D62E;1D62E;006D;006D;
+1D62F;1D62F;1D62F;006E;006E;
+1D630;1D630;1D630;006F;006F;
+1D631;1D631;1D631;0070;0070;
+1D632;1D632;1D632;0071;0071;
+1D633;1D633;1D633;0072;0072;
+1D634;1D634;1D634;0073;0073;
+1D635;1D635;1D635;0074;0074;
+1D636;1D636;1D636;0075;0075;
+1D637;1D637;1D637;0076;0076;
+1D638;1D638;1D638;0077;0077;
+1D639;1D639;1D639;0078;0078;
+1D63A;1D63A;1D63A;0079;0079;
+1D63B;1D63B;1D63B;007A;007A;
+1D63C;1D63C;1D63C;0041;0041;
+1D63D;1D63D;1D63D;0042;0042;
+1D63E;1D63E;1D63E;0043;0043;
+1D63F;1D63F;1D63F;0044;0044;
+1D640;1D640;1D640;0045;0045;
+1D641;1D641;1D641;0046;0046;
+1D642;1D642;1D642;0047;0047;
+1D643;1D643;1D643;0048;0048;
+1D644;1D644;1D644;0049;0049;
+1D645;1D645;1D645;004A;004A;
+1D646;1D646;1D646;004B;004B;
+1D647;1D647;1D647;004C;004C;
+1D648;1D648;1D648;004D;004D;
+1D649;1D649;1D649;004E;004E;
+1D64A;1D64A;1D64A;004F;004F;
+1D64B;1D64B;1D64B;0050;0050;
+1D64C;1D64C;1D64C;0051;0051;
+1D64D;1D64D;1D64D;0052;0052;
+1D64E;1D64E;1D64E;0053;0053;
+1D64F;1D64F;1D64F;0054;0054;
+1D650;1D650;1D650;0055;0055;
+1D651;1D651;1D651;0056;0056;
+1D652;1D652;1D652;0057;0057;
+1D653;1D653;1D653;0058;0058;
+1D654;1D654;1D654;0059;0059;
+1D655;1D655;1D655;005A;005A;
+1D656;1D656;1D656;0061;0061;
+1D657;1D657;1D657;0062;0062;
+1D658;1D658;1D658;0063;0063;
+1D659;1D659;1D659;0064;0064;
+1D65A;1D65A;1D65A;0065;0065;
+1D65B;1D65B;1D65B;0066;0066;
+1D65C;1D65C;1D65C;0067;0067;
+1D65D;1D65D;1D65D;0068;0068;
+1D65E;1D65E;1D65E;0069;0069;
+1D65F;1D65F;1D65F;006A;006A;
+1D660;1D660;1D660;006B;006B;
+1D661;1D661;1D661;006C;006C;
+1D662;1D662;1D662;006D;006D;
+1D663;1D663;1D663;006E;006E;
+1D664;1D664;1D664;006F;006F;
+1D665;1D665;1D665;0070;0070;
+1D666;1D666;1D666;0071;0071;
+1D667;1D667;1D667;0072;0072;
+1D668;1D668;1D668;0073;0073;
+1D669;1D669;1D669;0074;0074;
+1D66A;1D66A;1D66A;0075;0075;
+1D66B;1D66B;1D66B;0076;0076;
+1D66C;1D66C;1D66C;0077;0077;
+1D66D;1D66D;1D66D;0078;0078;
+1D66E;1D66E;1D66E;0079;0079;
+1D66F;1D66F;1D66F;007A;007A;
+1D670;1D670;1D670;0041;0041;
+1D671;1D671;1D671;0042;0042;
+1D672;1D672;1D672;0043;0043;
+1D673;1D673;1D673;0044;0044;
+1D674;1D674;1D674;0045;0045;
+1D675;1D675;1D675;0046;0046;
+1D676;1D676;1D676;0047;0047;
+1D677;1D677;1D677;0048;0048;
+1D678;1D678;1D678;0049;0049;
+1D679;1D679;1D679;004A;004A;
+1D67A;1D67A;1D67A;004B;004B;
+1D67B;1D67B;1D67B;004C;004C;
+1D67C;1D67C;1D67C;004D;004D;
+1D67D;1D67D;1D67D;004E;004E;
+1D67E;1D67E;1D67E;004F;004F;
+1D67F;1D67F;1D67F;0050;0050;
+1D680;1D680;1D680;0051;0051;
+1D681;1D681;1D681;0052;0052;
+1D682;1D682;1D682;0053;0053;
+1D683;1D683;1D683;0054;0054;
+1D684;1D684;1D684;0055;0055;
+1D685;1D685;1D685;0056;0056;
+1D686;1D686;1D686;0057;0057;
+1D687;1D687;1D687;0058;0058;
+1D688;1D688;1D688;0059;0059;
+1D689;1D689;1D689;005A;005A;
+1D68A;1D68A;1D68A;0061;0061;
+1D68B;1D68B;1D68B;0062;0062;
+1D68C;1D68C;1D68C;0063;0063;
+1D68D;1D68D;1D68D;0064;0064;
+1D68E;1D68E;1D68E;0065;0065;
+1D68F;1D68F;1D68F;0066;0066;
+1D690;1D690;1D690;0067;0067;
+1D691;1D691;1D691;0068;0068;
+1D692;1D692;1D692;0069;0069;
+1D693;1D693;1D693;006A;006A;
+1D694;1D694;1D694;006B;006B;
+1D695;1D695;1D695;006C;006C;
+1D696;1D696;1D696;006D;006D;
+1D697;1D697;1D697;006E;006E;
+1D698;1D698;1D698;006F;006F;
+1D699;1D699;1D699;0070;0070;
+1D69A;1D69A;1D69A;0071;0071;
+1D69B;1D69B;1D69B;0072;0072;
+1D69C;1D69C;1D69C;0073;0073;
+1D69D;1D69D;1D69D;0074;0074;
+1D69E;1D69E;1D69E;0075;0075;
+1D69F;1D69F;1D69F;0076;0076;
+1D6A0;1D6A0;1D6A0;0077;0077;
+1D6A1;1D6A1;1D6A1;0078;0078;
+1D6A2;1D6A2;1D6A2;0079;0079;
+1D6A3;1D6A3;1D6A3;007A;007A;
+1D6A8;1D6A8;1D6A8;0391;0391;
+1D6A9;1D6A9;1D6A9;0392;0392;
+1D6AA;1D6AA;1D6AA;0393;0393;
+1D6AB;1D6AB;1D6AB;0394;0394;
+1D6AC;1D6AC;1D6AC;0395;0395;
+1D6AD;1D6AD;1D6AD;0396;0396;
+1D6AE;1D6AE;1D6AE;0397;0397;
+1D6AF;1D6AF;1D6AF;0398;0398;
+1D6B0;1D6B0;1D6B0;0399;0399;
+1D6B1;1D6B1;1D6B1;039A;039A;
+1D6B2;1D6B2;1D6B2;039B;039B;
+1D6B3;1D6B3;1D6B3;039C;039C;
+1D6B4;1D6B4;1D6B4;039D;039D;
+1D6B5;1D6B5;1D6B5;039E;039E;
+1D6B6;1D6B6;1D6B6;039F;039F;
+1D6B7;1D6B7;1D6B7;03A0;03A0;
+1D6B8;1D6B8;1D6B8;03A1;03A1;
+1D6B9;1D6B9;1D6B9;0398;0398;
+1D6BA;1D6BA;1D6BA;03A3;03A3;
+1D6BB;1D6BB;1D6BB;03A4;03A4;
+1D6BC;1D6BC;1D6BC;03A5;03A5;
+1D6BD;1D6BD;1D6BD;03A6;03A6;
+1D6BE;1D6BE;1D6BE;03A7;03A7;
+1D6BF;1D6BF;1D6BF;03A8;03A8;
+1D6C0;1D6C0;1D6C0;03A9;03A9;
+1D6C1;1D6C1;1D6C1;2207;2207;
+1D6C2;1D6C2;1D6C2;03B1;03B1;
+1D6C3;1D6C3;1D6C3;03B2;03B2;
+1D6C4;1D6C4;1D6C4;03B3;03B3;
+1D6C5;1D6C5;1D6C5;03B4;03B4;
+1D6C6;1D6C6;1D6C6;03B5;03B5;
+1D6C7;1D6C7;1D6C7;03B6;03B6;
+1D6C8;1D6C8;1D6C8;03B7;03B7;
+1D6C9;1D6C9;1D6C9;03B8;03B8;
+1D6CA;1D6CA;1D6CA;03B9;03B9;
+1D6CB;1D6CB;1D6CB;03BA;03BA;
+1D6CC;1D6CC;1D6CC;03BB;03BB;
+1D6CD;1D6CD;1D6CD;03BC;03BC;
+1D6CE;1D6CE;1D6CE;03BD;03BD;
+1D6CF;1D6CF;1D6CF;03BE;03BE;
+1D6D0;1D6D0;1D6D0;03BF;03BF;
+1D6D1;1D6D1;1D6D1;03C0;03C0;
+1D6D2;1D6D2;1D6D2;03C1;03C1;
+1D6D3;1D6D3;1D6D3;03C2;03C2;
+1D6D4;1D6D4;1D6D4;03C3;03C3;
+1D6D5;1D6D5;1D6D5;03C4;03C4;
+1D6D6;1D6D6;1D6D6;03C5;03C5;
+1D6D7;1D6D7;1D6D7;03C6;03C6;
+1D6D8;1D6D8;1D6D8;03C7;03C7;
+1D6D9;1D6D9;1D6D9;03C8;03C8;
+1D6DA;1D6DA;1D6DA;03C9;03C9;
+1D6DB;1D6DB;1D6DB;2202;2202;
+1D6DC;1D6DC;1D6DC;03B5;03B5;
+1D6DD;1D6DD;1D6DD;03B8;03B8;
+1D6DE;1D6DE;1D6DE;03BA;03BA;
+1D6DF;1D6DF;1D6DF;03C6;03C6;
+1D6E0;1D6E0;1D6E0;03C1;03C1;
+1D6E1;1D6E1;1D6E1;03C0;03C0;
+1D6E2;1D6E2;1D6E2;0391;0391;
+1D6E3;1D6E3;1D6E3;0392;0392;
+1D6E4;1D6E4;1D6E4;0393;0393;
+1D6E5;1D6E5;1D6E5;0394;0394;
+1D6E6;1D6E6;1D6E6;0395;0395;
+1D6E7;1D6E7;1D6E7;0396;0396;
+1D6E8;1D6E8;1D6E8;0397;0397;
+1D6E9;1D6E9;1D6E9;0398;0398;
+1D6EA;1D6EA;1D6EA;0399;0399;
+1D6EB;1D6EB;1D6EB;039A;039A;
+1D6EC;1D6EC;1D6EC;039B;039B;
+1D6ED;1D6ED;1D6ED;039C;039C;
+1D6EE;1D6EE;1D6EE;039D;039D;
+1D6EF;1D6EF;1D6EF;039E;039E;
+1D6F0;1D6F0;1D6F0;039F;039F;
+1D6F1;1D6F1;1D6F1;03A0;03A0;
+1D6F2;1D6F2;1D6F2;03A1;03A1;
+1D6F3;1D6F3;1D6F3;0398;0398;
+1D6F4;1D6F4;1D6F4;03A3;03A3;
+1D6F5;1D6F5;1D6F5;03A4;03A4;
+1D6F6;1D6F6;1D6F6;03A5;03A5;
+1D6F7;1D6F7;1D6F7;03A6;03A6;
+1D6F8;1D6F8;1D6F8;03A7;03A7;
+1D6F9;1D6F9;1D6F9;03A8;03A8;
+1D6FA;1D6FA;1D6FA;03A9;03A9;
+1D6FB;1D6FB;1D6FB;2207;2207;
+1D6FC;1D6FC;1D6FC;03B1;03B1;
+1D6FD;1D6FD;1D6FD;03B2;03B2;
+1D6FE;1D6FE;1D6FE;03B3;03B3;
+1D6FF;1D6FF;1D6FF;03B4;03B4;
+1D700;1D700;1D700;03B5;03B5;
+1D701;1D701;1D701;03B6;03B6;
+1D702;1D702;1D702;03B7;03B7;
+1D703;1D703;1D703;03B8;03B8;
+1D704;1D704;1D704;03B9;03B9;
+1D705;1D705;1D705;03BA;03BA;
+1D706;1D706;1D706;03BB;03BB;
+1D707;1D707;1D707;03BC;03BC;
+1D708;1D708;1D708;03BD;03BD;
+1D709;1D709;1D709;03BE;03BE;
+1D70A;1D70A;1D70A;03BF;03BF;
+1D70B;1D70B;1D70B;03C0;03C0;
+1D70C;1D70C;1D70C;03C1;03C1;
+1D70D;1D70D;1D70D;03C2;03C2;
+1D70E;1D70E;1D70E;03C3;03C3;
+1D70F;1D70F;1D70F;03C4;03C4;
+1D710;1D710;1D710;03C5;03C5;
+1D711;1D711;1D711;03C6;03C6;
+1D712;1D712;1D712;03C7;03C7;
+1D713;1D713;1D713;03C8;03C8;
+1D714;1D714;1D714;03C9;03C9;
+1D715;1D715;1D715;2202;2202;
+1D716;1D716;1D716;03B5;03B5;
+1D717;1D717;1D717;03B8;03B8;
+1D718;1D718;1D718;03BA;03BA;
+1D719;1D719;1D719;03C6;03C6;
+1D71A;1D71A;1D71A;03C1;03C1;
+1D71B;1D71B;1D71B;03C0;03C0;
+1D71C;1D71C;1D71C;0391;0391;
+1D71D;1D71D;1D71D;0392;0392;
+1D71E;1D71E;1D71E;0393;0393;
+1D71F;1D71F;1D71F;0394;0394;
+1D720;1D720;1D720;0395;0395;
+1D721;1D721;1D721;0396;0396;
+1D722;1D722;1D722;0397;0397;
+1D723;1D723;1D723;0398;0398;
+1D724;1D724;1D724;0399;0399;
+1D725;1D725;1D725;039A;039A;
+1D726;1D726;1D726;039B;039B;
+1D727;1D727;1D727;039C;039C;
+1D728;1D728;1D728;039D;039D;
+1D729;1D729;1D729;039E;039E;
+1D72A;1D72A;1D72A;039F;039F;
+1D72B;1D72B;1D72B;03A0;03A0;
+1D72C;1D72C;1D72C;03A1;03A1;
+1D72D;1D72D;1D72D;0398;0398;
+1D72E;1D72E;1D72E;03A3;03A3;
+1D72F;1D72F;1D72F;03A4;03A4;
+1D730;1D730;1D730;03A5;03A5;
+1D731;1D731;1D731;03A6;03A6;
+1D732;1D732;1D732;03A7;03A7;
+1D733;1D733;1D733;03A8;03A8;
+1D734;1D734;1D734;03A9;03A9;
+1D735;1D735;1D735;2207;2207;
+1D736;1D736;1D736;03B1;03B1;
+1D737;1D737;1D737;03B2;03B2;
+1D738;1D738;1D738;03B3;03B3;
+1D739;1D739;1D739;03B4;03B4;
+1D73A;1D73A;1D73A;03B5;03B5;
+1D73B;1D73B;1D73B;03B6;03B6;
+1D73C;1D73C;1D73C;03B7;03B7;
+1D73D;1D73D;1D73D;03B8;03B8;
+1D73E;1D73E;1D73E;03B9;03B9;
+1D73F;1D73F;1D73F;03BA;03BA;
+1D740;1D740;1D740;03BB;03BB;
+1D741;1D741;1D741;03BC;03BC;
+1D742;1D742;1D742;03BD;03BD;
+1D743;1D743;1D743;03BE;03BE;
+1D744;1D744;1D744;03BF;03BF;
+1D745;1D745;1D745;03C0;03C0;
+1D746;1D746;1D746;03C1;03C1;
+1D747;1D747;1D747;03C2;03C2;
+1D748;1D748;1D748;03C3;03C3;
+1D749;1D749;1D749;03C4;03C4;
+1D74A;1D74A;1D74A;03C5;03C5;
+1D74B;1D74B;1D74B;03C6;03C6;
+1D74C;1D74C;1D74C;03C7;03C7;
+1D74D;1D74D;1D74D;03C8;03C8;
+1D74E;1D74E;1D74E;03C9;03C9;
+1D74F;1D74F;1D74F;2202;2202;
+1D750;1D750;1D750;03B5;03B5;
+1D751;1D751;1D751;03B8;03B8;
+1D752;1D752;1D752;03BA;03BA;
+1D753;1D753;1D753;03C6;03C6;
+1D754;1D754;1D754;03C1;03C1;
+1D755;1D755;1D755;03C0;03C0;
+1D756;1D756;1D756;0391;0391;
+1D757;1D757;1D757;0392;0392;
+1D758;1D758;1D758;0393;0393;
+1D759;1D759;1D759;0394;0394;
+1D75A;1D75A;1D75A;0395;0395;
+1D75B;1D75B;1D75B;0396;0396;
+1D75C;1D75C;1D75C;0397;0397;
+1D75D;1D75D;1D75D;0398;0398;
+1D75E;1D75E;1D75E;0399;0399;
+1D75F;1D75F;1D75F;039A;039A;
+1D760;1D760;1D760;039B;039B;
+1D761;1D761;1D761;039C;039C;
+1D762;1D762;1D762;039D;039D;
+1D763;1D763;1D763;039E;039E;
+1D764;1D764;1D764;039F;039F;
+1D765;1D765;1D765;03A0;03A0;
+1D766;1D766;1D766;03A1;03A1;
+1D767;1D767;1D767;0398;0398;
+1D768;1D768;1D768;03A3;03A3;
+1D769;1D769;1D769;03A4;03A4;
+1D76A;1D76A;1D76A;03A5;03A5;
+1D76B;1D76B;1D76B;03A6;03A6;
+1D76C;1D76C;1D76C;03A7;03A7;
+1D76D;1D76D;1D76D;03A8;03A8;
+1D76E;1D76E;1D76E;03A9;03A9;
+1D76F;1D76F;1D76F;2207;2207;
+1D770;1D770;1D770;03B1;03B1;
+1D771;1D771;1D771;03B2;03B2;
+1D772;1D772;1D772;03B3;03B3;
+1D773;1D773;1D773;03B4;03B4;
+1D774;1D774;1D774;03B5;03B5;
+1D775;1D775;1D775;03B6;03B6;
+1D776;1D776;1D776;03B7;03B7;
+1D777;1D777;1D777;03B8;03B8;
+1D778;1D778;1D778;03B9;03B9;
+1D779;1D779;1D779;03BA;03BA;
+1D77A;1D77A;1D77A;03BB;03BB;
+1D77B;1D77B;1D77B;03BC;03BC;
+1D77C;1D77C;1D77C;03BD;03BD;
+1D77D;1D77D;1D77D;03BE;03BE;
+1D77E;1D77E;1D77E;03BF;03BF;
+1D77F;1D77F;1D77F;03C0;03C0;
+1D780;1D780;1D780;03C1;03C1;
+1D781;1D781;1D781;03C2;03C2;
+1D782;1D782;1D782;03C3;03C3;
+1D783;1D783;1D783;03C4;03C4;
+1D784;1D784;1D784;03C5;03C5;
+1D785;1D785;1D785;03C6;03C6;
+1D786;1D786;1D786;03C7;03C7;
+1D787;1D787;1D787;03C8;03C8;
+1D788;1D788;1D788;03C9;03C9;
+1D789;1D789;1D789;2202;2202;
+1D78A;1D78A;1D78A;03B5;03B5;
+1D78B;1D78B;1D78B;03B8;03B8;
+1D78C;1D78C;1D78C;03BA;03BA;
+1D78D;1D78D;1D78D;03C6;03C6;
+1D78E;1D78E;1D78E;03C1;03C1;
+1D78F;1D78F;1D78F;03C0;03C0;
+1D790;1D790;1D790;0391;0391;
+1D791;1D791;1D791;0392;0392;
+1D792;1D792;1D792;0393;0393;
+1D793;1D793;1D793;0394;0394;
+1D794;1D794;1D794;0395;0395;
+1D795;1D795;1D795;0396;0396;
+1D796;1D796;1D796;0397;0397;
+1D797;1D797;1D797;0398;0398;
+1D798;1D798;1D798;0399;0399;
+1D799;1D799;1D799;039A;039A;
+1D79A;1D79A;1D79A;039B;039B;
+1D79B;1D79B;1D79B;039C;039C;
+1D79C;1D79C;1D79C;039D;039D;
+1D79D;1D79D;1D79D;039E;039E;
+1D79E;1D79E;1D79E;039F;039F;
+1D79F;1D79F;1D79F;03A0;03A0;
+1D7A0;1D7A0;1D7A0;03A1;03A1;
+1D7A1;1D7A1;1D7A1;0398;0398;
+1D7A2;1D7A2;1D7A2;03A3;03A3;
+1D7A3;1D7A3;1D7A3;03A4;03A4;
+1D7A4;1D7A4;1D7A4;03A5;03A5;
+1D7A5;1D7A5;1D7A5;03A6;03A6;
+1D7A6;1D7A6;1D7A6;03A7;03A7;
+1D7A7;1D7A7;1D7A7;03A8;03A8;
+1D7A8;1D7A8;1D7A8;03A9;03A9;
+1D7A9;1D7A9;1D7A9;2207;2207;
+1D7AA;1D7AA;1D7AA;03B1;03B1;
+1D7AB;1D7AB;1D7AB;03B2;03B2;
+1D7AC;1D7AC;1D7AC;03B3;03B3;
+1D7AD;1D7AD;1D7AD;03B4;03B4;
+1D7AE;1D7AE;1D7AE;03B5;03B5;
+1D7AF;1D7AF;1D7AF;03B6;03B6;
+1D7B0;1D7B0;1D7B0;03B7;03B7;
+1D7B1;1D7B1;1D7B1;03B8;03B8;
+1D7B2;1D7B2;1D7B2;03B9;03B9;
+1D7B3;1D7B3;1D7B3;03BA;03BA;
+1D7B4;1D7B4;1D7B4;03BB;03BB;
+1D7B5;1D7B5;1D7B5;03BC;03BC;
+1D7B6;1D7B6;1D7B6;03BD;03BD;
+1D7B7;1D7B7;1D7B7;03BE;03BE;
+1D7B8;1D7B8;1D7B8;03BF;03BF;
+1D7B9;1D7B9;1D7B9;03C0;03C0;
+1D7BA;1D7BA;1D7BA;03C1;03C1;
+1D7BB;1D7BB;1D7BB;03C2;03C2;
+1D7BC;1D7BC;1D7BC;03C3;03C3;
+1D7BD;1D7BD;1D7BD;03C4;03C4;
+1D7BE;1D7BE;1D7BE;03C5;03C5;
+1D7BF;1D7BF;1D7BF;03C6;03C6;
+1D7C0;1D7C0;1D7C0;03C7;03C7;
+1D7C1;1D7C1;1D7C1;03C8;03C8;
+1D7C2;1D7C2;1D7C2;03C9;03C9;
+1D7C3;1D7C3;1D7C3;2202;2202;
+1D7C4;1D7C4;1D7C4;03B5;03B5;
+1D7C5;1D7C5;1D7C5;03B8;03B8;
+1D7C6;1D7C6;1D7C6;03BA;03BA;
+1D7C7;1D7C7;1D7C7;03C6;03C6;
+1D7C8;1D7C8;1D7C8;03C1;03C1;
+1D7C9;1D7C9;1D7C9;03C0;03C0;
+1D7CE;1D7CE;1D7CE;0030;0030;
+1D7CF;1D7CF;1D7CF;0031;0031;
+1D7D0;1D7D0;1D7D0;0032;0032;
+1D7D1;1D7D1;1D7D1;0033;0033;
+1D7D2;1D7D2;1D7D2;0034;0034;
+1D7D3;1D7D3;1D7D3;0035;0035;
+1D7D4;1D7D4;1D7D4;0036;0036;
+1D7D5;1D7D5;1D7D5;0037;0037;
+1D7D6;1D7D6;1D7D6;0038;0038;
+1D7D7;1D7D7;1D7D7;0039;0039;
+1D7D8;1D7D8;1D7D8;0030;0030;
+1D7D9;1D7D9;1D7D9;0031;0031;
+1D7DA;1D7DA;1D7DA;0032;0032;
+1D7DB;1D7DB;1D7DB;0033;0033;
+1D7DC;1D7DC;1D7DC;0034;0034;
+1D7DD;1D7DD;1D7DD;0035;0035;
+1D7DE;1D7DE;1D7DE;0036;0036;
+1D7DF;1D7DF;1D7DF;0037;0037;
+1D7E0;1D7E0;1D7E0;0038;0038;
+1D7E1;1D7E1;1D7E1;0039;0039;
+1D7E2;1D7E2;1D7E2;0030;0030;
+1D7E3;1D7E3;1D7E3;0031;0031;
+1D7E4;1D7E4;1D7E4;0032;0032;
+1D7E5;1D7E5;1D7E5;0033;0033;
+1D7E6;1D7E6;1D7E6;0034;0034;
+1D7E7;1D7E7;1D7E7;0035;0035;
+1D7E8;1D7E8;1D7E8;0036;0036;
+1D7E9;1D7E9;1D7E9;0037;0037;
+1D7EA;1D7EA;1D7EA;0038;0038;
+1D7EB;1D7EB;1D7EB;0039;0039;
+1D7EC;1D7EC;1D7EC;0030;0030;
+1D7ED;1D7ED;1D7ED;0031;0031;
+1D7EE;1D7EE;1D7EE;0032;0032;
+1D7EF;1D7EF;1D7EF;0033;0033;
+1D7F0;1D7F0;1D7F0;0034;0034;
+1D7F1;1D7F1;1D7F1;0035;0035;
+1D7F2;1D7F2;1D7F2;0036;0036;
+1D7F3;1D7F3;1D7F3;0037;0037;
+1D7F4;1D7F4;1D7F4;0038;0038;
+1D7F5;1D7F5;1D7F5;0039;0039;
+1D7F6;1D7F6;1D7F6;0030;0030;
+1D7F7;1D7F7;1D7F7;0031;0031;
+1D7F8;1D7F8;1D7F8;0032;0032;
+1D7F9;1D7F9;1D7F9;0033;0033;
+1D7FA;1D7FA;1D7FA;0034;0034;
+1D7FB;1D7FB;1D7FB;0035;0035;
+1D7FC;1D7FC;1D7FC;0036;0036;
+1D7FD;1D7FD;1D7FD;0037;0037;
+1D7FE;1D7FE;1D7FE;0038;0038;
+1D7FF;1D7FF;1D7FF;0039;0039;
+2F800;4E3D;4E3D;4E3D;4E3D;
+2F801;4E38;4E38;4E38;4E38;
+2F802;4E41;4E41;4E41;4E41;
+2F803;20122;20122;20122;20122;
+2F804;4F60;4F60;4F60;4F60;
+2F805;4FAE;4FAE;4FAE;4FAE;
+2F806;4FBB;4FBB;4FBB;4FBB;
+2F807;5002;5002;5002;5002;
+2F808;507A;507A;507A;507A;
+2F809;5099;5099;5099;5099;
+2F80A;50E7;50E7;50E7;50E7;
+2F80B;50CF;50CF;50CF;50CF;
+2F80C;349E;349E;349E;349E;
+2F80D;2063A;2063A;2063A;2063A;
+2F80E;514D;514D;514D;514D;
+2F80F;5154;5154;5154;5154;
+2F810;5164;5164;5164;5164;
+2F811;5177;5177;5177;5177;
+2F812;2051C;2051C;2051C;2051C;
+2F813;34B9;34B9;34B9;34B9;
+2F814;5167;5167;5167;5167;
+2F815;518D;518D;518D;518D;
+2F816;2054B;2054B;2054B;2054B;
+2F817;5197;5197;5197;5197;
+2F818;51A4;51A4;51A4;51A4;
+2F819;4ECC;4ECC;4ECC;4ECC;
+2F81A;51AC;51AC;51AC;51AC;
+2F81B;51B5;51B5;51B5;51B5;
+2F81C;291DF;291DF;291DF;291DF;
+2F81D;51F5;51F5;51F5;51F5;
+2F81E;5203;5203;5203;5203;
+2F81F;34DF;34DF;34DF;34DF;
+2F820;523B;523B;523B;523B;
+2F821;5246;5246;5246;5246;
+2F822;5272;5272;5272;5272;
+2F823;5277;5277;5277;5277;
+2F824;3515;3515;3515;3515;
+2F825;52C7;52C7;52C7;52C7;
+2F826;52C9;52C9;52C9;52C9;
+2F827;52E4;52E4;52E4;52E4;
+2F828;52FA;52FA;52FA;52FA;
+2F829;5305;5305;5305;5305;
+2F82A;5306;5306;5306;5306;
+2F82B;5317;5317;5317;5317;
+2F82C;5349;5349;5349;5349;
+2F82D;5351;5351;5351;5351;
+2F82E;535A;535A;535A;535A;
+2F82F;5373;5373;5373;5373;
+2F830;537D;537D;537D;537D;
+2F831;537F;537F;537F;537F;
+2F832;537F;537F;537F;537F;
+2F833;537F;537F;537F;537F;
+2F834;20A2C;20A2C;20A2C;20A2C;
+2F835;7070;7070;7070;7070;
+2F836;53CA;53CA;53CA;53CA;
+2F837;53DF;53DF;53DF;53DF;
+2F838;20B63;20B63;20B63;20B63;
+2F839;53EB;53EB;53EB;53EB;
+2F83A;53F1;53F1;53F1;53F1;
+2F83B;5406;5406;5406;5406;
+2F83C;549E;549E;549E;549E;
+2F83D;5438;5438;5438;5438;
+2F83E;5448;5448;5448;5448;
+2F83F;5468;5468;5468;5468;
+2F840;54A2;54A2;54A2;54A2;
+2F841;54F6;54F6;54F6;54F6;
+2F842;5510;5510;5510;5510;
+2F843;5553;5553;5553;5553;
+2F844;5563;5563;5563;5563;
+2F845;5584;5584;5584;5584;
+2F846;5584;5584;5584;5584;
+2F847;5599;5599;5599;5599;
+2F848;55AB;55AB;55AB;55AB;
+2F849;55B3;55B3;55B3;55B3;
+2F84A;55C2;55C2;55C2;55C2;
+2F84B;5716;5716;5716;5716;
+2F84C;5606;5606;5606;5606;
+2F84D;5717;5717;5717;5717;
+2F84E;5651;5651;5651;5651;
+2F84F;5674;5674;5674;5674;
+2F850;5207;5207;5207;5207;
+2F851;58EE;58EE;58EE;58EE;
+2F852;57CE;57CE;57CE;57CE;
+2F853;57F4;57F4;57F4;57F4;
+2F854;580D;580D;580D;580D;
+2F855;578B;578B;578B;578B;
+2F856;5832;5832;5832;5832;
+2F857;5831;5831;5831;5831;
+2F858;58AC;58AC;58AC;58AC;
+2F859;214E4;214E4;214E4;214E4;
+2F85A;58F2;58F2;58F2;58F2;
+2F85B;58F7;58F7;58F7;58F7;
+2F85C;5906;5906;5906;5906;
+2F85D;591A;591A;591A;591A;
+2F85E;5922;5922;5922;5922;
+2F85F;5962;5962;5962;5962;
+2F860;216A8;216A8;216A8;216A8;
+2F861;216EA;216EA;216EA;216EA;
+2F862;59EC;59EC;59EC;59EC;
+2F863;5A1B;5A1B;5A1B;5A1B;
+2F864;5A27;5A27;5A27;5A27;
+2F865;59D8;59D8;59D8;59D8;
+2F866;5A66;5A66;5A66;5A66;
+2F867;36EE;36EE;36EE;36EE;
+# NormalizationCorrections-4.0.0.txt -- 2F868;2136A;2136A;2136A;2136A;
+2F868;36FC;36FC;36FC;36FC;
+
+2F869;5B08;5B08;5B08;5B08;
+2F86A;5B3E;5B3E;5B3E;5B3E;
+2F86B;5B3E;5B3E;5B3E;5B3E;
+2F86C;219C8;219C8;219C8;219C8;
+2F86D;5BC3;5BC3;5BC3;5BC3;
+2F86E;5BD8;5BD8;5BD8;5BD8;
+2F86F;5BE7;5BE7;5BE7;5BE7;
+2F870;5BF3;5BF3;5BF3;5BF3;
+2F871;21B18;21B18;21B18;21B18;
+2F872;5BFF;5BFF;5BFF;5BFF;
+2F873;5C06;5C06;5C06;5C06;
+# NormalizationCorrections-4.0.0.txt -- 2F874;5F33;5F33;5F33;5F33;
+2F874;5F53;5F53;5F53;5F53;
+
+2F875;5C22;5C22;5C22;5C22;
+2F876;3781;3781;3781;3781;
+2F877;5C60;5C60;5C60;5C60;
+2F878;5C6E;5C6E;5C6E;5C6E;
+2F879;5CC0;5CC0;5CC0;5CC0;
+2F87A;5C8D;5C8D;5C8D;5C8D;
+2F87B;21DE4;21DE4;21DE4;21DE4;
+2F87C;5D43;5D43;5D43;5D43;
+2F87D;21DE6;21DE6;21DE6;21DE6;
+2F87E;5D6E;5D6E;5D6E;5D6E;
+2F87F;5D6B;5D6B;5D6B;5D6B;
+2F880;5D7C;5D7C;5D7C;5D7C;
+2F881;5DE1;5DE1;5DE1;5DE1;
+2F882;5DE2;5DE2;5DE2;5DE2;
+2F883;382F;382F;382F;382F;
+2F884;5DFD;5DFD;5DFD;5DFD;
+2F885;5E28;5E28;5E28;5E28;
+2F886;5E3D;5E3D;5E3D;5E3D;
+2F887;5E69;5E69;5E69;5E69;
+2F888;3862;3862;3862;3862;
+2F889;22183;22183;22183;22183;
+2F88A;387C;387C;387C;387C;
+2F88B;5EB0;5EB0;5EB0;5EB0;
+2F88C;5EB3;5EB3;5EB3;5EB3;
+2F88D;5EB6;5EB6;5EB6;5EB6;
+2F88E;5ECA;5ECA;5ECA;5ECA;
+2F88F;2A392;2A392;2A392;2A392;
+2F890;5EFE;5EFE;5EFE;5EFE;
+2F891;22331;22331;22331;22331;
+2F892;22331;22331;22331;22331;
+2F893;8201;8201;8201;8201;
+2F894;5F22;5F22;5F22;5F22;
+2F895;5F22;5F22;5F22;5F22;
+2F896;38C7;38C7;38C7;38C7;
+2F897;232B8;232B8;232B8;232B8;
+2F898;261DA;261DA;261DA;261DA;
+2F899;5F62;5F62;5F62;5F62;
+2F89A;5F6B;5F6B;5F6B;5F6B;
+2F89B;38E3;38E3;38E3;38E3;
+2F89C;5F9A;5F9A;5F9A;5F9A;
+2F89D;5FCD;5FCD;5FCD;5FCD;
+2F89E;5FD7;5FD7;5FD7;5FD7;
+2F89F;5FF9;5FF9;5FF9;5FF9;
+2F8A0;6081;6081;6081;6081;
+2F8A1;393A;393A;393A;393A;
+2F8A2;391C;391C;391C;391C;
+2F8A3;6094;6094;6094;6094;
+2F8A4;226D4;226D4;226D4;226D4;
+2F8A5;60C7;60C7;60C7;60C7;
+2F8A6;6148;6148;6148;6148;
+2F8A7;614C;614C;614C;614C;
+2F8A8;614E;614E;614E;614E;
+2F8A9;614C;614C;614C;614C;
+2F8AA;617A;617A;617A;617A;
+2F8AB;618E;618E;618E;618E;
+2F8AC;61B2;61B2;61B2;61B2;
+2F8AD;61A4;61A4;61A4;61A4;
+2F8AE;61AF;61AF;61AF;61AF;
+2F8AF;61DE;61DE;61DE;61DE;
+2F8B0;61F2;61F2;61F2;61F2;
+2F8B1;61F6;61F6;61F6;61F6;
+2F8B2;6210;6210;6210;6210;
+2F8B3;621B;621B;621B;621B;
+2F8B4;625D;625D;625D;625D;
+2F8B5;62B1;62B1;62B1;62B1;
+2F8B6;62D4;62D4;62D4;62D4;
+2F8B7;6350;6350;6350;6350;
+2F8B8;22B0C;22B0C;22B0C;22B0C;
+2F8B9;633D;633D;633D;633D;
+2F8BA;62FC;62FC;62FC;62FC;
+2F8BB;6368;6368;6368;6368;
+2F8BC;6383;6383;6383;6383;
+2F8BD;63E4;63E4;63E4;63E4;
+2F8BE;22BF1;22BF1;22BF1;22BF1;
+2F8BF;6422;6422;6422;6422;
+2F8C0;63C5;63C5;63C5;63C5;
+2F8C1;63A9;63A9;63A9;63A9;
+2F8C2;3A2E;3A2E;3A2E;3A2E;
+2F8C3;6469;6469;6469;6469;
+2F8C4;647E;647E;647E;647E;
+2F8C5;649D;649D;649D;649D;
+2F8C6;6477;6477;6477;6477;
+2F8C7;3A6C;3A6C;3A6C;3A6C;
+2F8C8;654F;654F;654F;654F;
+2F8C9;656C;656C;656C;656C;
+2F8CA;2300A;2300A;2300A;2300A;
+2F8CB;65E3;65E3;65E3;65E3;
+2F8CC;66F8;66F8;66F8;66F8;
+2F8CD;6649;6649;6649;6649;
+2F8CE;3B19;3B19;3B19;3B19;
+2F8CF;6691;6691;6691;6691;
+2F8D0;3B08;3B08;3B08;3B08;
+2F8D1;3AE4;3AE4;3AE4;3AE4;
+2F8D2;5192;5192;5192;5192;
+2F8D3;5195;5195;5195;5195;
+2F8D4;6700;6700;6700;6700;
+2F8D5;669C;669C;669C;669C;
+2F8D6;80AD;80AD;80AD;80AD;
+2F8D7;43D9;43D9;43D9;43D9;
+2F8D8;6717;6717;6717;6717;
+2F8D9;671B;671B;671B;671B;
+2F8DA;6721;6721;6721;6721;
+2F8DB;675E;675E;675E;675E;
+2F8DC;6753;6753;6753;6753;
+2F8DD;233C3;233C3;233C3;233C3;
+2F8DE;3B49;3B49;3B49;3B49;
+2F8DF;67FA;67FA;67FA;67FA;
+2F8E0;6785;6785;6785;6785;
+2F8E1;6852;6852;6852;6852;
+2F8E2;6885;6885;6885;6885;
+2F8E3;2346D;2346D;2346D;2346D;
+2F8E4;688E;688E;688E;688E;
+2F8E5;681F;681F;681F;681F;
+2F8E6;6914;6914;6914;6914;
+2F8E7;3B9D;3B9D;3B9D;3B9D;
+2F8E8;6942;6942;6942;6942;
+2F8E9;69A3;69A3;69A3;69A3;
+2F8EA;69EA;69EA;69EA;69EA;
+2F8EB;6AA8;6AA8;6AA8;6AA8;
+2F8EC;236A3;236A3;236A3;236A3;
+2F8ED;6ADB;6ADB;6ADB;6ADB;
+2F8EE;3C18;3C18;3C18;3C18;
+2F8EF;6B21;6B21;6B21;6B21;
+2F8F0;238A7;238A7;238A7;238A7;
+2F8F1;6B54;6B54;6B54;6B54;
+2F8F2;3C4E;3C4E;3C4E;3C4E;
+2F8F3;6B72;6B72;6B72;6B72;
+2F8F4;6B9F;6B9F;6B9F;6B9F;
+2F8F5;6BBA;6BBA;6BBA;6BBA;
+2F8F6;6BBB;6BBB;6BBB;6BBB;
+2F8F7;23A8D;23A8D;23A8D;23A8D;
+2F8F8;21D0B;21D0B;21D0B;21D0B;
+2F8F9;23AFA;23AFA;23AFA;23AFA;
+2F8FA;6C4E;6C4E;6C4E;6C4E;
+2F8FB;23CBC;23CBC;23CBC;23CBC;
+2F8FC;6CBF;6CBF;6CBF;6CBF;
+2F8FD;6CCD;6CCD;6CCD;6CCD;
+2F8FE;6C67;6C67;6C67;6C67;
+2F8FF;6D16;6D16;6D16;6D16;
+2F900;6D3E;6D3E;6D3E;6D3E;
+2F901;6D77;6D77;6D77;6D77;
+2F902;6D41;6D41;6D41;6D41;
+2F903;6D69;6D69;6D69;6D69;
+2F904;6D78;6D78;6D78;6D78;
+2F905;6D85;6D85;6D85;6D85;
+2F906;23D1E;23D1E;23D1E;23D1E;
+2F907;6D34;6D34;6D34;6D34;
+2F908;6E2F;6E2F;6E2F;6E2F;
+2F909;6E6E;6E6E;6E6E;6E6E;
+2F90A;3D33;3D33;3D33;3D33;
+2F90B;6ECB;6ECB;6ECB;6ECB;
+2F90C;6EC7;6EC7;6EC7;6EC7;
+2F90D;23ED1;23ED1;23ED1;23ED1;
+2F90E;6DF9;6DF9;6DF9;6DF9;
+2F90F;6F6E;6F6E;6F6E;6F6E;
+2F910;23F5E;23F5E;23F5E;23F5E;
+2F911;23F8E;23F8E;23F8E;23F8E;
+2F912;6FC6;6FC6;6FC6;6FC6;
+2F913;7039;7039;7039;7039;
+2F914;701E;701E;701E;701E;
+2F915;701B;701B;701B;701B;
+2F916;3D96;3D96;3D96;3D96;
+2F917;704A;704A;704A;704A;
+2F918;707D;707D;707D;707D;
+2F919;7077;7077;7077;7077;
+2F91A;70AD;70AD;70AD;70AD;
+2F91B;20525;20525;20525;20525;
+2F91C;7145;7145;7145;7145;
+2F91D;24263;24263;24263;24263;
+2F91E;719C;719C;719C;719C;
+# NormalizationCorrections-4.0.0.txt -- 2F91F;43AB;43AB;43AB;43AB;
+2F91F;243AB;243AB;243AB;243AB;
+
+2F920;7228;7228;7228;7228;
+2F921;7235;7235;7235;7235;
+2F922;7250;7250;7250;7250;
+2F923;24608;24608;24608;24608;
+2F924;7280;7280;7280;7280;
+2F925;7295;7295;7295;7295;
+2F926;24735;24735;24735;24735;
+2F927;24814;24814;24814;24814;
+2F928;737A;737A;737A;737A;
+2F929;738B;738B;738B;738B;
+2F92A;3EAC;3EAC;3EAC;3EAC;
+2F92B;73A5;73A5;73A5;73A5;
+2F92C;3EB8;3EB8;3EB8;3EB8;
+2F92D;3EB8;3EB8;3EB8;3EB8;
+2F92E;7447;7447;7447;7447;
+2F92F;745C;745C;745C;745C;
+2F930;7471;7471;7471;7471;
+2F931;7485;7485;7485;7485;
+2F932;74CA;74CA;74CA;74CA;
+2F933;3F1B;3F1B;3F1B;3F1B;
+2F934;7524;7524;7524;7524;
+2F935;24C36;24C36;24C36;24C36;
+2F936;753E;753E;753E;753E;
+2F937;24C92;24C92;24C92;24C92;
+2F938;7570;7570;7570;7570;
+2F939;2219F;2219F;2219F;2219F;
+2F93A;7610;7610;7610;7610;
+2F93B;24FA1;24FA1;24FA1;24FA1;
+2F93C;24FB8;24FB8;24FB8;24FB8;
+2F93D;25044;25044;25044;25044;
+2F93E;3FFC;3FFC;3FFC;3FFC;
+2F93F;4008;4008;4008;4008;
+2F940;76F4;76F4;76F4;76F4;
+2F941;250F3;250F3;250F3;250F3;
+2F942;250F2;250F2;250F2;250F2;
+2F943;25119;25119;25119;25119;
+2F944;25133;25133;25133;25133;
+2F945;771E;771E;771E;771E;
+2F946;771F;771F;771F;771F;
+2F947;771F;771F;771F;771F;
+2F948;774A;774A;774A;774A;
+2F949;4039;4039;4039;4039;
+2F94A;778B;778B;778B;778B;
+2F94B;4046;4046;4046;4046;
+2F94C;4096;4096;4096;4096;
+2F94D;2541D;2541D;2541D;2541D;
+2F94E;784E;784E;784E;784E;
+2F94F;788C;788C;788C;788C;
+2F950;78CC;78CC;78CC;78CC;
+2F951;40E3;40E3;40E3;40E3;
+2F952;25626;25626;25626;25626;
+2F953;7956;7956;7956;7956;
+2F954;2569A;2569A;2569A;2569A;
+2F955;256C5;256C5;256C5;256C5;
+2F956;798F;798F;798F;798F;
+2F957;79EB;79EB;79EB;79EB;
+2F958;412F;412F;412F;412F;
+2F959;7A40;7A40;7A40;7A40;
+2F95A;7A4A;7A4A;7A4A;7A4A;
+2F95B;7A4F;7A4F;7A4F;7A4F;
+2F95C;2597C;2597C;2597C;2597C;
+2F95D;25AA7;25AA7;25AA7;25AA7;
+2F95E;25AA7;25AA7;25AA7;25AA7;
+# NormalizationCorrections-4.0.0.txt -- 2F95F;7AAE;7AAE;7AAE;7AAE;
+2F95F;7AEE;7AEE;7AEE;7AEE;
+
+2F960;4202;4202;4202;4202;
+2F961;25BAB;25BAB;25BAB;25BAB;
+2F962;7BC6;7BC6;7BC6;7BC6;
+2F963;7BC9;7BC9;7BC9;7BC9;
+2F964;4227;4227;4227;4227;
+2F965;25C80;25C80;25C80;25C80;
+2F966;7CD2;7CD2;7CD2;7CD2;
+2F967;42A0;42A0;42A0;42A0;
+2F968;7CE8;7CE8;7CE8;7CE8;
+2F969;7CE3;7CE3;7CE3;7CE3;
+2F96A;7D00;7D00;7D00;7D00;
+2F96B;25F86;25F86;25F86;25F86;
+2F96C;7D63;7D63;7D63;7D63;
+2F96D;4301;4301;4301;4301;
+2F96E;7DC7;7DC7;7DC7;7DC7;
+2F96F;7E02;7E02;7E02;7E02;
+2F970;7E45;7E45;7E45;7E45;
+2F971;4334;4334;4334;4334;
+2F972;26228;26228;26228;26228;
+2F973;26247;26247;26247;26247;
+2F974;4359;4359;4359;4359;
+2F975;262D9;262D9;262D9;262D9;
+2F976;7F7A;7F7A;7F7A;7F7A;
+2F977;2633E;2633E;2633E;2633E;
+2F978;7F95;7F95;7F95;7F95;
+2F979;7FFA;7FFA;7FFA;7FFA;
+2F97A;8005;8005;8005;8005;
+2F97B;264DA;264DA;264DA;264DA;
+2F97C;26523;26523;26523;26523;
+2F97D;8060;8060;8060;8060;
+2F97E;265A8;265A8;265A8;265A8;
+2F97F;8070;8070;8070;8070;
+2F980;2335F;2335F;2335F;2335F;
+2F981;43D5;43D5;43D5;43D5;
+2F982;80B2;80B2;80B2;80B2;
+2F983;8103;8103;8103;8103;
+2F984;440B;440B;440B;440B;
+2F985;813E;813E;813E;813E;
+2F986;5AB5;5AB5;5AB5;5AB5;
+2F987;267A7;267A7;267A7;267A7;
+2F988;267B5;267B5;267B5;267B5;
+2F989;23393;23393;23393;23393;
+2F98A;2339C;2339C;2339C;2339C;
+2F98B;8201;8201;8201;8201;
+2F98C;8204;8204;8204;8204;
+2F98D;8F9E;8F9E;8F9E;8F9E;
+2F98E;446B;446B;446B;446B;
+2F98F;8291;8291;8291;8291;
+2F990;828B;828B;828B;828B;
+2F991;829D;829D;829D;829D;
+2F992;52B3;52B3;52B3;52B3;
+2F993;82B1;82B1;82B1;82B1;
+2F994;82B3;82B3;82B3;82B3;
+2F995;82BD;82BD;82BD;82BD;
+2F996;82E6;82E6;82E6;82E6;
+2F997;26B3C;26B3C;26B3C;26B3C;
+2F998;82E5;82E5;82E5;82E5;
+2F999;831D;831D;831D;831D;
+2F99A;8363;8363;8363;8363;
+2F99B;83AD;83AD;83AD;83AD;
+2F99C;8323;8323;8323;8323;
+2F99D;83BD;83BD;83BD;83BD;
+2F99E;83E7;83E7;83E7;83E7;
+2F99F;8457;8457;8457;8457;
+2F9A0;8353;8353;8353;8353;
+2F9A1;83CA;83CA;83CA;83CA;
+2F9A2;83CC;83CC;83CC;83CC;
+2F9A3;83DC;83DC;83DC;83DC;
+2F9A4;26C36;26C36;26C36;26C36;
+2F9A5;26D6B;26D6B;26D6B;26D6B;
+2F9A6;26CD5;26CD5;26CD5;26CD5;
+2F9A7;452B;452B;452B;452B;
+2F9A8;84F1;84F1;84F1;84F1;
+2F9A9;84F3;84F3;84F3;84F3;
+2F9AA;8516;8516;8516;8516;
+2F9AB;273CA;273CA;273CA;273CA;
+2F9AC;8564;8564;8564;8564;
+2F9AD;26F2C;26F2C;26F2C;26F2C;
+2F9AE;455D;455D;455D;455D;
+2F9AF;4561;4561;4561;4561;
+2F9B0;26FB1;26FB1;26FB1;26FB1;
+2F9B1;270D2;270D2;270D2;270D2;
+2F9B2;456B;456B;456B;456B;
+2F9B3;8650;8650;8650;8650;
+2F9B4;865C;865C;865C;865C;
+2F9B5;8667;8667;8667;8667;
+2F9B6;8669;8669;8669;8669;
+2F9B7;86A9;86A9;86A9;86A9;
+2F9B8;8688;8688;8688;8688;
+2F9B9;870E;870E;870E;870E;
+2F9BA;86E2;86E2;86E2;86E2;
+2F9BB;8779;8779;8779;8779;
+2F9BC;8728;8728;8728;8728;
+2F9BD;876B;876B;876B;876B;
+2F9BE;8786;8786;8786;8786;
+# NormalizationCorrections-4.0.0.txt -- 2F9BF;4D57;4D57;4D57;4D57;
+2F9BF;45D7;45D7;45D7;45D7;
+
+2F9C0;87E1;87E1;87E1;87E1;
+2F9C1;8801;8801;8801;8801;
+2F9C2;45F9;45F9;45F9;45F9;
+2F9C3;8860;8860;8860;8860;
+2F9C4;8863;8863;8863;8863;
+2F9C5;27667;27667;27667;27667;
+2F9C6;88D7;88D7;88D7;88D7;
+2F9C7;88DE;88DE;88DE;88DE;
+2F9C8;4635;4635;4635;4635;
+2F9C9;88FA;88FA;88FA;88FA;
+2F9CA;34BB;34BB;34BB;34BB;
+2F9CB;278AE;278AE;278AE;278AE;
+2F9CC;27966;27966;27966;27966;
+2F9CD;46BE;46BE;46BE;46BE;
+2F9CE;46C7;46C7;46C7;46C7;
+2F9CF;8AA0;8AA0;8AA0;8AA0;
+2F9D0;8AED;8AED;8AED;8AED;
+2F9D1;8B8A;8B8A;8B8A;8B8A;
+2F9D2;8C55;8C55;8C55;8C55;
+2F9D3;27CA8;27CA8;27CA8;27CA8;
+2F9D4;8CAB;8CAB;8CAB;8CAB;
+2F9D5;8CC1;8CC1;8CC1;8CC1;
+2F9D6;8D1B;8D1B;8D1B;8D1B;
+2F9D7;8D77;8D77;8D77;8D77;
+2F9D8;27F2F;27F2F;27F2F;27F2F;
+2F9D9;20804;20804;20804;20804;
+2F9DA;8DCB;8DCB;8DCB;8DCB;
+2F9DB;8DBC;8DBC;8DBC;8DBC;
+2F9DC;8DF0;8DF0;8DF0;8DF0;
+2F9DD;208DE;208DE;208DE;208DE;
+2F9DE;8ED4;8ED4;8ED4;8ED4;
+2F9DF;8F38;8F38;8F38;8F38;
+2F9E0;285D2;285D2;285D2;285D2;
+2F9E1;285ED;285ED;285ED;285ED;
+2F9E2;9094;9094;9094;9094;
+2F9E3;90F1;90F1;90F1;90F1;
+2F9E4;9111;9111;9111;9111;
+2F9E5;2872E;2872E;2872E;2872E;
+2F9E6;911B;911B;911B;911B;
+2F9E7;9238;9238;9238;9238;
+2F9E8;92D7;92D7;92D7;92D7;
+2F9E9;92D8;92D8;92D8;92D8;
+2F9EA;927C;927C;927C;927C;
+2F9EB;93F9;93F9;93F9;93F9;
+2F9EC;9415;9415;9415;9415;
+2F9ED;28BFA;28BFA;28BFA;28BFA;
+2F9EE;958B;958B;958B;958B;
+2F9EF;4995;4995;4995;4995;
+2F9F0;95B7;95B7;95B7;95B7;
+2F9F1;28D77;28D77;28D77;28D77;
+2F9F2;49E6;49E6;49E6;49E6;
+2F9F3;96C3;96C3;96C3;96C3;
+2F9F4;5DB2;5DB2;5DB2;5DB2;
+2F9F5;9723;9723;9723;9723;
+2F9F6;29145;29145;29145;29145;
+2F9F7;2921A;2921A;2921A;2921A;
+2F9F8;4A6E;4A6E;4A6E;4A6E;
+2F9F9;4A76;4A76;4A76;4A76;
+2F9FA;97E0;97E0;97E0;97E0;
+2F9FB;2940A;2940A;2940A;2940A;
+2F9FC;4AB2;4AB2;4AB2;4AB2;
+2F9FD;29496;29496;29496;29496;
+2F9FE;980B;980B;980B;980B;
+2F9FF;980B;980B;980B;980B;
+2FA00;9829;9829;9829;9829;
+2FA01;295B6;295B6;295B6;295B6;
+2FA02;98E2;98E2;98E2;98E2;
+2FA03;4B33;4B33;4B33;4B33;
+2FA04;9929;9929;9929;9929;
+2FA05;99A7;99A7;99A7;99A7;
+2FA06;99C2;99C2;99C2;99C2;
+2FA07;99FE;99FE;99FE;99FE;
+2FA08;4BCE;4BCE;4BCE;4BCE;
+2FA09;29B30;29B30;29B30;29B30;
+2FA0A;9B12;9B12;9B12;9B12;
+2FA0B;9C40;9C40;9C40;9C40;
+2FA0C;9CFD;9CFD;9CFD;9CFD;
+2FA0D;4CCE;4CCE;4CCE;4CCE;
+2FA0E;4CED;4CED;4CED;4CED;
+2FA0F;9D67;9D67;9D67;9D67;
+2FA10;2A0CE;2A0CE;2A0CE;2A0CE;
+2FA11;4CF8;4CF8;4CF8;4CF8;
+2FA12;2A105;2A105;2A105;2A105;
+2FA13;2A20E;2A20E;2A20E;2A20E;
+2FA14;2A291;2A291;2A291;2A291;
+2FA15;9EBB;9EBB;9EBB;9EBB;
+2FA16;4D56;4D56;4D56;4D56;
+2FA17;9EF9;9EF9;9EF9;9EF9;
+2FA18;9EFE;9EFE;9EFE;9EFE;
+2FA19;9F05;9F05;9F05;9F05;
+2FA1A;9F0F;9F0F;9F0F;9F0F;
+2FA1B;9F16;9F16;9F16;9F16;
+2FA1C;9F3B;9F3B;9F3B;9F3B;
+2FA1D;2A600;2A600;2A600;2A600;
+#
+@Part2 # Canonical Order Test
+#
+0061 0315 0300 05AE 0300 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;
+0061 0300 0315 0300 05AE 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;
+0061 0315 0300 05AE 0301 0062;00E0 05AE 0301 0315 0062;0061 05AE 0300 0301 0315 0062;00E0 05AE 0301 0315 0062;0061 05AE 0300 0301 0315 0062;
+0061 0301 0315 0300 05AE 0062;00E1 05AE 0300 0315 0062;0061 05AE 0301 0300 0315 0062;00E1 05AE 0300 0315 0062;0061 05AE 0301 0300 0315 0062;
+0061 0315 0300 05AE 0302 0062;00E0 05AE 0302 0315 0062;0061 05AE 0300 0302 0315 0062;00E0 05AE 0302 0315 0062;0061 05AE 0300 0302 0315 0062;
+0061 0302 0315 0300 05AE 0062;1EA7 05AE 0315 0062;0061 05AE 0302 0300 0315 0062;1EA7 05AE 0315 0062;0061 05AE 0302 0300 0315 0062;
+0061 0315 0300 05AE 0303 0062;00E0 05AE 0303 0315 0062;0061 05AE 0300 0303 0315 0062;00E0 05AE 0303 0315 0062;0061 05AE 0300 0303 0315 0062;
+0061 0303 0315 0300 05AE 0062;00E3 05AE 0300 0315 0062;0061 05AE 0303 0300 0315 0062;00E3 05AE 0300 0315 0062;0061 05AE 0303 0300 0315 0062;
+0061 0315 0300 05AE 0304 0062;00E0 05AE 0304 0315 0062;0061 05AE 0300 0304 0315 0062;00E0 05AE 0304 0315 0062;0061 05AE 0300 0304 0315 0062;
+0061 0304 0315 0300 05AE 0062;0101 05AE 0300 0315 0062;0061 05AE 0304 0300 0315 0062;0101 05AE 0300 0315 0062;0061 05AE 0304 0300 0315 0062;
+0061 0315 0300 05AE 0305 0062;00E0 05AE 0305 0315 0062;0061 05AE 0300 0305 0315 0062;00E0 05AE 0305 0315 0062;0061 05AE 0300 0305 0315 0062;
+0061 0305 0315 0300 05AE 0062;0061 05AE 0305 0300 0315 0062;0061 05AE 0305 0300 0315 0062;0061 05AE 0305 0300 0315 0062;0061 05AE 0305 0300 0315 0062;
+0061 0315 0300 05AE 0306 0062;00E0 05AE 0306 0315 0062;0061 05AE 0300 0306 0315 0062;00E0 05AE 0306 0315 0062;0061 05AE 0300 0306 0315 0062;
+0061 0306 0315 0300 05AE 0062;1EB1 05AE 0315 0062;0061 05AE 0306 0300 0315 0062;1EB1 05AE 0315 0062;0061 05AE 0306 0300 0315 0062;
+0061 0315 0300 05AE 0307 0062;00E0 05AE 0307 0315 0062;0061 05AE 0300 0307 0315 0062;00E0 05AE 0307 0315 0062;0061 05AE 0300 0307 0315 0062;
+0061 0307 0315 0300 05AE 0062;0227 05AE 0300 0315 0062;0061 05AE 0307 0300 0315 0062;0227 05AE 0300 0315 0062;0061 05AE 0307 0300 0315 0062;
+0061 0315 0300 05AE 0308 0062;00E0 05AE 0308 0315 0062;0061 05AE 0300 0308 0315 0062;00E0 05AE 0308 0315 0062;0061 05AE 0300 0308 0315 0062;
+0061 0308 0315 0300 05AE 0062;00E4 05AE 0300 0315 0062;0061 05AE 0308 0300 0315 0062;00E4 05AE 0300 0315 0062;0061 05AE 0308 0300 0315 0062;
+0061 0315 0300 05AE 0309 0062;00E0 05AE 0309 0315 0062;0061 05AE 0300 0309 0315 0062;00E0 05AE 0309 0315 0062;0061 05AE 0300 0309 0315 0062;
+0061 0309 0315 0300 05AE 0062;1EA3 05AE 0300 0315 0062;0061 05AE 0309 0300 0315 0062;1EA3 05AE 0300 0315 0062;0061 05AE 0309 0300 0315 0062;
+0061 0315 0300 05AE 030A 0062;00E0 05AE 030A 0315 0062;0061 05AE 0300 030A 0315 0062;00E0 05AE 030A 0315 0062;0061 05AE 0300 030A 0315 0062;
+0061 030A 0315 0300 05AE 0062;00E5 05AE 0300 0315 0062;0061 05AE 030A 0300 0315 0062;00E5 05AE 0300 0315 0062;0061 05AE 030A 0300 0315 0062;
+0061 0315 0300 05AE 030B 0062;00E0 05AE 030B 0315 0062;0061 05AE 0300 030B 0315 0062;00E0 05AE 030B 0315 0062;0061 05AE 0300 030B 0315 0062;
+0061 030B 0315 0300 05AE 0062;0061 05AE 030B 0300 0315 0062;0061 05AE 030B 0300 0315 0062;0061 05AE 030B 0300 0315 0062;0061 05AE 030B 0300 0315 0062;
+0061 0315 0300 05AE 030C 0062;00E0 05AE 030C 0315 0062;0061 05AE 0300 030C 0315 0062;00E0 05AE 030C 0315 0062;0061 05AE 0300 030C 0315 0062;
+0061 030C 0315 0300 05AE 0062;01CE 05AE 0300 0315 0062;0061 05AE 030C 0300 0315 0062;01CE 05AE 0300 0315 0062;0061 05AE 030C 0300 0315 0062;
+0061 0315 0300 05AE 030D 0062;00E0 05AE 030D 0315 0062;0061 05AE 0300 030D 0315 0062;00E0 05AE 030D 0315 0062;0061 05AE 0300 030D 0315 0062;
+0061 030D 0315 0300 05AE 0062;0061 05AE 030D 0300 0315 0062;0061 05AE 030D 0300 0315 0062;0061 05AE 030D 0300 0315 0062;0061 05AE 030D 0300 0315 0062;
+0061 0315 0300 05AE 030E 0062;00E0 05AE 030E 0315 0062;0061 05AE 0300 030E 0315 0062;00E0 05AE 030E 0315 0062;0061 05AE 0300 030E 0315 0062;
+0061 030E 0315 0300 05AE 0062;0061 05AE 030E 0300 0315 0062;0061 05AE 030E 0300 0315 0062;0061 05AE 030E 0300 0315 0062;0061 05AE 030E 0300 0315 0062;
+0061 0315 0300 05AE 030F 0062;00E0 05AE 030F 0315 0062;0061 05AE 0300 030F 0315 0062;00E0 05AE 030F 0315 0062;0061 05AE 0300 030F 0315 0062;
+0061 030F 0315 0300 05AE 0062;0201 05AE 0300 0315 0062;0061 05AE 030F 0300 0315 0062;0201 05AE 0300 0315 0062;0061 05AE 030F 0300 0315 0062;
+0061 0315 0300 05AE 0310 0062;00E0 05AE 0310 0315 0062;0061 05AE 0300 0310 0315 0062;00E0 05AE 0310 0315 0062;0061 05AE 0300 0310 0315 0062;
+0061 0310 0315 0300 05AE 0062;0061 05AE 0310 0300 0315 0062;0061 05AE 0310 0300 0315 0062;0061 05AE 0310 0300 0315 0062;0061 05AE 0310 0300 0315 0062;
+0061 0315 0300 05AE 0311 0062;00E0 05AE 0311 0315 0062;0061 05AE 0300 0311 0315 0062;00E0 05AE 0311 0315 0062;0061 05AE 0300 0311 0315 0062;
+0061 0311 0315 0300 05AE 0062;0203 05AE 0300 0315 0062;0061 05AE 0311 0300 0315 0062;0203 05AE 0300 0315 0062;0061 05AE 0311 0300 0315 0062;
+0061 0315 0300 05AE 0312 0062;00E0 05AE 0312 0315 0062;0061 05AE 0300 0312 0315 0062;00E0 05AE 0312 0315 0062;0061 05AE 0300 0312 0315 0062;
+0061 0312 0315 0300 05AE 0062;0061 05AE 0312 0300 0315 0062;0061 05AE 0312 0300 0315 0062;0061 05AE 0312 0300 0315 0062;0061 05AE 0312 0300 0315 0062;
+0061 0315 0300 05AE 0313 0062;00E0 05AE 0313 0315 0062;0061 05AE 0300 0313 0315 0062;00E0 05AE 0313 0315 0062;0061 05AE 0300 0313 0315 0062;
+0061 0313 0315 0300 05AE 0062;0061 05AE 0313 0300 0315 0062;0061 05AE 0313 0300 0315 0062;0061 05AE 0313 0300 0315 0062;0061 05AE 0313 0300 0315 0062;
+0061 0315 0300 05AE 0314 0062;00E0 05AE 0314 0315 0062;0061 05AE 0300 0314 0315 0062;00E0 05AE 0314 0315 0062;0061 05AE 0300 0314 0315 0062;
+0061 0314 0315 0300 05AE 0062;0061 05AE 0314 0300 0315 0062;0061 05AE 0314 0300 0315 0062;0061 05AE 0314 0300 0315 0062;0061 05AE 0314 0300 0315 0062;
+0061 0362 0315 0300 0315 0062;00E0 0315 0315 0362 0062;0061 0300 0315 0315 0362 0062;00E0 0315 0315 0362 0062;0061 0300 0315 0315 0362 0062;
+0061 0315 0362 0315 0300 0062;00E0 0315 0315 0362 0062;0061 0300 0315 0315 0362 0062;00E0 0315 0315 0362 0062;0061 0300 0315 0315 0362 0062;
+0061 059A 0316 302A 0316 0062;0061 302A 0316 0316 059A 0062;0061 302A 0316 0316 059A 0062;0061 302A 0316 0316 059A 0062;0061 302A 0316 0316 059A 0062;
+0061 0316 059A 0316 302A 0062;0061 302A 0316 0316 059A 0062;0061 302A 0316 0316 059A 0062;0061 302A 0316 0316 059A 0062;0061 302A 0316 0316 059A 0062;
+0061 059A 0316 302A 0317 0062;0061 302A 0316 0317 059A 0062;0061 302A 0316 0317 059A 0062;0061 302A 0316 0317 059A 0062;0061 302A 0316 0317 059A 0062;
+0061 0317 059A 0316 302A 0062;0061 302A 0317 0316 059A 0062;0061 302A 0317 0316 059A 0062;0061 302A 0317 0316 059A 0062;0061 302A 0317 0316 059A 0062;
+0061 059A 0316 302A 0318 0062;0061 302A 0316 0318 059A 0062;0061 302A 0316 0318 059A 0062;0061 302A 0316 0318 059A 0062;0061 302A 0316 0318 059A 0062;
+0061 0318 059A 0316 302A 0062;0061 302A 0318 0316 059A 0062;0061 302A 0318 0316 059A 0062;0061 302A 0318 0316 059A 0062;0061 302A 0318 0316 059A 0062;
+0061 059A 0316 302A 0319 0062;0061 302A 0316 0319 059A 0062;0061 302A 0316 0319 059A 0062;0061 302A 0316 0319 059A 0062;0061 302A 0316 0319 059A 0062;
+0061 0319 059A 0316 302A 0062;0061 302A 0319 0316 059A 0062;0061 302A 0319 0316 059A 0062;0061 302A 0319 0316 059A 0062;0061 302A 0319 0316 059A 0062;
+0061 0362 0315 0300 031A 0062;00E0 0315 031A 0362 0062;0061 0300 0315 031A 0362 0062;00E0 0315 031A 0362 0062;0061 0300 0315 031A 0362 0062;
+0061 031A 0362 0315 0300 0062;00E0 031A 0315 0362 0062;0061 0300 031A 0315 0362 0062;00E0 031A 0315 0362 0062;0061 0300 031A 0315 0362 0062;
+0061 302A 031B 0321 031B 0062;0061 0321 031B 031B 302A 0062;0061 0321 031B 031B 302A 0062;0061 0321 031B 031B 302A 0062;0061 0321 031B 031B 302A 0062;
+0061 031B 302A 031B 0321 0062;0061 0321 031B 031B 302A 0062;0061 0321 031B 031B 302A 0062;0061 0321 031B 031B 302A 0062;0061 0321 031B 031B 302A 0062;
+0061 059A 0316 302A 031C 0062;0061 302A 0316 031C 059A 0062;0061 302A 0316 031C 059A 0062;0061 302A 0316 031C 059A 0062;0061 302A 0316 031C 059A 0062;
+0061 031C 059A 0316 302A 0062;0061 302A 031C 0316 059A 0062;0061 302A 031C 0316 059A 0062;0061 302A 031C 0316 059A 0062;0061 302A 031C 0316 059A 0062;
+0061 059A 0316 302A 031D 0062;0061 302A 0316 031D 059A 0062;0061 302A 0316 031D 059A 0062;0061 302A 0316 031D 059A 0062;0061 302A 0316 031D 059A 0062;
+0061 031D 059A 0316 302A 0062;0061 302A 031D 0316 059A 0062;0061 302A 031D 0316 059A 0062;0061 302A 031D 0316 059A 0062;0061 302A 031D 0316 059A 0062;
+0061 059A 0316 302A 031E 0062;0061 302A 0316 031E 059A 0062;0061 302A 0316 031E 059A 0062;0061 302A 0316 031E 059A 0062;0061 302A 0316 031E 059A 0062;
+0061 031E 059A 0316 302A 0062;0061 302A 031E 0316 059A 0062;0061 302A 031E 0316 059A 0062;0061 302A 031E 0316 059A 0062;0061 302A 031E 0316 059A 0062;
+0061 059A 0316 302A 031F 0062;0061 302A 0316 031F 059A 0062;0061 302A 0316 031F 059A 0062;0061 302A 0316 031F 059A 0062;0061 302A 0316 031F 059A 0062;
+0061 031F 059A 0316 302A 0062;0061 302A 031F 0316 059A 0062;0061 302A 031F 0316 059A 0062;0061 302A 031F 0316 059A 0062;0061 302A 031F 0316 059A 0062;
+0061 059A 0316 302A 0320 0062;0061 302A 0316 0320 059A 0062;0061 302A 0316 0320 059A 0062;0061 302A 0316 0320 059A 0062;0061 302A 0316 0320 059A 0062;
+0061 0320 059A 0316 302A 0062;0061 302A 0320 0316 059A 0062;0061 302A 0320 0316 059A 0062;0061 302A 0320 0316 059A 0062;0061 302A 0320 0316 059A 0062;
+0061 031B 0321 0F74 0321 0062;0061 0F74 0321 0321 031B 0062;0061 0F74 0321 0321 031B 0062;0061 0F74 0321 0321 031B 0062;0061 0F74 0321 0321 031B 0062;
+0061 0321 031B 0321 0F74 0062;0061 0F74 0321 0321 031B 0062;0061 0F74 0321 0321 031B 0062;0061 0F74 0321 0321 031B 0062;0061 0F74 0321 0321 031B 0062;
+0061 031B 0321 0F74 0322 0062;0061 0F74 0321 0322 031B 0062;0061 0F74 0321 0322 031B 0062;0061 0F74 0321 0322 031B 0062;0061 0F74 0321 0322 031B 0062;
+0061 0322 031B 0321 0F74 0062;0061 0F74 0322 0321 031B 0062;0061 0F74 0322 0321 031B 0062;0061 0F74 0322 0321 031B 0062;0061 0F74 0322 0321 031B 0062;
+0061 059A 0316 302A 0323 0062;0061 302A 0316 0323 059A 0062;0061 302A 0316 0323 059A 0062;0061 302A 0316 0323 059A 0062;0061 302A 0316 0323 059A 0062;
+0061 0323 059A 0316 302A 0062;1EA1 302A 0316 059A 0062;0061 302A 0323 0316 059A 0062;1EA1 302A 0316 059A 0062;0061 302A 0323 0316 059A 0062;
+0061 059A 0316 302A 0324 0062;0061 302A 0316 0324 059A 0062;0061 302A 0316 0324 059A 0062;0061 302A 0316 0324 059A 0062;0061 302A 0316 0324 059A 0062;
+0061 0324 059A 0316 302A 0062;0061 302A 0324 0316 059A 0062;0061 302A 0324 0316 059A 0062;0061 302A 0324 0316 059A 0062;0061 302A 0324 0316 059A 0062;
+0061 059A 0316 302A 0325 0062;0061 302A 0316 0325 059A 0062;0061 302A 0316 0325 059A 0062;0061 302A 0316 0325 059A 0062;0061 302A 0316 0325 059A 0062;
+0061 0325 059A 0316 302A 0062;1E01 302A 0316 059A 0062;0061 302A 0325 0316 059A 0062;1E01 302A 0316 059A 0062;0061 302A 0325 0316 059A 0062;
+0061 059A 0316 302A 0326 0062;0061 302A 0316 0326 059A 0062;0061 302A 0316 0326 059A 0062;0061 302A 0316 0326 059A 0062;0061 302A 0316 0326 059A 0062;
+0061 0326 059A 0316 302A 0062;0061 302A 0326 0316 059A 0062;0061 302A 0326 0316 059A 0062;0061 302A 0326 0316 059A 0062;0061 302A 0326 0316 059A 0062;
+0061 031B 0321 0F74 0327 0062;0061 0F74 0321 0327 031B 0062;0061 0F74 0321 0327 031B 0062;0061 0F74 0321 0327 031B 0062;0061 0F74 0321 0327 031B 0062;
+0061 0327 031B 0321 0F74 0062;0061 0F74 0327 0321 031B 0062;0061 0F74 0327 0321 031B 0062;0061 0F74 0327 0321 031B 0062;0061 0F74 0327 0321 031B 0062;
+0061 031B 0321 0F74 0328 0062;0061 0F74 0321 0328 031B 0062;0061 0F74 0321 0328 031B 0062;0061 0F74 0321 0328 031B 0062;0061 0F74 0321 0328 031B 0062;
+0061 0328 031B 0321 0F74 0062;0105 0F74 0321 031B 0062;0061 0F74 0328 0321 031B 0062;0105 0F74 0321 031B 0062;0061 0F74 0328 0321 031B 0062;
+0061 059A 0316 302A 0329 0062;0061 302A 0316 0329 059A 0062;0061 302A 0316 0329 059A 0062;0061 302A 0316 0329 059A 0062;0061 302A 0316 0329 059A 0062;
+0061 0329 059A 0316 302A 0062;0061 302A 0329 0316 059A 0062;0061 302A 0329 0316 059A 0062;0061 302A 0329 0316 059A 0062;0061 302A 0329 0316 059A 0062;
+0061 059A 0316 302A 032A 0062;0061 302A 0316 032A 059A 0062;0061 302A 0316 032A 059A 0062;0061 302A 0316 032A 059A 0062;0061 302A 0316 032A 059A 0062;
+0061 032A 059A 0316 302A 0062;0061 302A 032A 0316 059A 0062;0061 302A 032A 0316 059A 0062;0061 302A 032A 0316 059A 0062;0061 302A 032A 0316 059A 0062;
+0061 059A 0316 302A 032B 0062;0061 302A 0316 032B 059A 0062;0061 302A 0316 032B 059A 0062;0061 302A 0316 032B 059A 0062;0061 302A 0316 032B 059A 0062;
+0061 032B 059A 0316 302A 0062;0061 302A 032B 0316 059A 0062;0061 302A 032B 0316 059A 0062;0061 302A 032B 0316 059A 0062;0061 302A 032B 0316 059A 0062;
+0061 059A 0316 302A 032C 0062;0061 302A 0316 032C 059A 0062;0061 302A 0316 032C 059A 0062;0061 302A 0316 032C 059A 0062;0061 302A 0316 032C 059A 0062;
+0061 032C 059A 0316 302A 0062;0061 302A 032C 0316 059A 0062;0061 302A 032C 0316 059A 0062;0061 302A 032C 0316 059A 0062;0061 302A 032C 0316 059A 0062;
+0061 059A 0316 302A 032D 0062;0061 302A 0316 032D 059A 0062;0061 302A 0316 032D 059A 0062;0061 302A 0316 032D 059A 0062;0061 302A 0316 032D 059A 0062;
+0061 032D 059A 0316 302A 0062;0061 302A 032D 0316 059A 0062;0061 302A 032D 0316 059A 0062;0061 302A 032D 0316 059A 0062;0061 302A 032D 0316 059A 0062;
+0061 059A 0316 302A 032E 0062;0061 302A 0316 032E 059A 0062;0061 302A 0316 032E 059A 0062;0061 302A 0316 032E 059A 0062;0061 302A 0316 032E 059A 0062;
+0061 032E 059A 0316 302A 0062;0061 302A 032E 0316 059A 0062;0061 302A 032E 0316 059A 0062;0061 302A 032E 0316 059A 0062;0061 302A 032E 0316 059A 0062;
+0061 059A 0316 302A 032F 0062;0061 302A 0316 032F 059A 0062;0061 302A 0316 032F 059A 0062;0061 302A 0316 032F 059A 0062;0061 302A 0316 032F 059A 0062;
+0061 032F 059A 0316 302A 0062;0061 302A 032F 0316 059A 0062;0061 302A 032F 0316 059A 0062;0061 302A 032F 0316 059A 0062;0061 302A 032F 0316 059A 0062;
+0061 059A 0316 302A 0330 0062;0061 302A 0316 0330 059A 0062;0061 302A 0316 0330 059A 0062;0061 302A 0316 0330 059A 0062;0061 302A 0316 0330 059A 0062;
+0061 0330 059A 0316 302A 0062;0061 302A 0330 0316 059A 0062;0061 302A 0330 0316 059A 0062;0061 302A 0330 0316 059A 0062;0061 302A 0330 0316 059A 0062;
+0061 059A 0316 302A 0331 0062;0061 302A 0316 0331 059A 0062;0061 302A 0316 0331 059A 0062;0061 302A 0316 0331 059A 0062;0061 302A 0316 0331 059A 0062;
+0061 0331 059A 0316 302A 0062;0061 302A 0331 0316 059A 0062;0061 302A 0331 0316 059A 0062;0061 302A 0331 0316 059A 0062;0061 302A 0331 0316 059A 0062;
+0061 059A 0316 302A 0332 0062;0061 302A 0316 0332 059A 0062;0061 302A 0316 0332 059A 0062;0061 302A 0316 0332 059A 0062;0061 302A 0316 0332 059A 0062;
+0061 0332 059A 0316 302A 0062;0061 302A 0332 0316 059A 0062;0061 302A 0332 0316 059A 0062;0061 302A 0332 0316 059A 0062;0061 302A 0332 0316 059A 0062;
+0061 059A 0316 302A 0333 0062;0061 302A 0316 0333 059A 0062;0061 302A 0316 0333 059A 0062;0061 302A 0316 0333 059A 0062;0061 302A 0316 0333 059A 0062;
+0061 0333 059A 0316 302A 0062;0061 302A 0333 0316 059A 0062;0061 302A 0333 0316 059A 0062;0061 302A 0333 0316 059A 0062;0061 302A 0333 0316 059A 0062;
+0061 093C 0334 0334 0062;0061 0334 0334 093C 0062;0061 0334 0334 093C 0062;0061 0334 0334 093C 0062;0061 0334 0334 093C 0062;
+0061 0334 093C 0334 0062;0061 0334 0334 093C 0062;0061 0334 0334 093C 0062;0061 0334 0334 093C 0062;0061 0334 0334 093C 0062;
+0061 093C 0334 0335 0062;0061 0334 0335 093C 0062;0061 0334 0335 093C 0062;0061 0334 0335 093C 0062;0061 0334 0335 093C 0062;
+0061 0335 093C 0334 0062;0061 0335 0334 093C 0062;0061 0335 0334 093C 0062;0061 0335 0334 093C 0062;0061 0335 0334 093C 0062;
+0061 093C 0334 0336 0062;0061 0334 0336 093C 0062;0061 0334 0336 093C 0062;0061 0334 0336 093C 0062;0061 0334 0336 093C 0062;
+0061 0336 093C 0334 0062;0061 0336 0334 093C 0062;0061 0336 0334 093C 0062;0061 0336 0334 093C 0062;0061 0336 0334 093C 0062;
+0061 093C 0334 0337 0062;0061 0334 0337 093C 0062;0061 0334 0337 093C 0062;0061 0334 0337 093C 0062;0061 0334 0337 093C 0062;
+0061 0337 093C 0334 0062;0061 0337 0334 093C 0062;0061 0337 0334 093C 0062;0061 0337 0334 093C 0062;0061 0337 0334 093C 0062;
+0061 093C 0334 0338 0062;0061 0334 0338 093C 0062;0061 0334 0338 093C 0062;0061 0334 0338 093C 0062;0061 0334 0338 093C 0062;
+0061 0338 093C 0334 0062;0061 0338 0334 093C 0062;0061 0338 0334 093C 0062;0061 0338 0334 093C 0062;0061 0338 0334 093C 0062;
+0061 059A 0316 302A 0339 0062;0061 302A 0316 0339 059A 0062;0061 302A 0316 0339 059A 0062;0061 302A 0316 0339 059A 0062;0061 302A 0316 0339 059A 0062;
+0061 0339 059A 0316 302A 0062;0061 302A 0339 0316 059A 0062;0061 302A 0339 0316 059A 0062;0061 302A 0339 0316 059A 0062;0061 302A 0339 0316 059A 0062;
+0061 059A 0316 302A 033A 0062;0061 302A 0316 033A 059A 0062;0061 302A 0316 033A 059A 0062;0061 302A 0316 033A 059A 0062;0061 302A 0316 033A 059A 0062;
+0061 033A 059A 0316 302A 0062;0061 302A 033A 0316 059A 0062;0061 302A 033A 0316 059A 0062;0061 302A 033A 0316 059A 0062;0061 302A 033A 0316 059A 0062;
+0061 059A 0316 302A 033B 0062;0061 302A 0316 033B 059A 0062;0061 302A 0316 033B 059A 0062;0061 302A 0316 033B 059A 0062;0061 302A 0316 033B 059A 0062;
+0061 033B 059A 0316 302A 0062;0061 302A 033B 0316 059A 0062;0061 302A 033B 0316 059A 0062;0061 302A 033B 0316 059A 0062;0061 302A 033B 0316 059A 0062;
+0061 059A 0316 302A 033C 0062;0061 302A 0316 033C 059A 0062;0061 302A 0316 033C 059A 0062;0061 302A 0316 033C 059A 0062;0061 302A 0316 033C 059A 0062;
+0061 033C 059A 0316 302A 0062;0061 302A 033C 0316 059A 0062;0061 302A 033C 0316 059A 0062;0061 302A 033C 0316 059A 0062;0061 302A 033C 0316 059A 0062;
+0061 0315 0300 05AE 033D 0062;00E0 05AE 033D 0315 0062;0061 05AE 0300 033D 0315 0062;00E0 05AE 033D 0315 0062;0061 05AE 0300 033D 0315 0062;
+0061 033D 0315 0300 05AE 0062;0061 05AE 033D 0300 0315 0062;0061 05AE 033D 0300 0315 0062;0061 05AE 033D 0300 0315 0062;0061 05AE 033D 0300 0315 0062;
+0061 0315 0300 05AE 033E 0062;00E0 05AE 033E 0315 0062;0061 05AE 0300 033E 0315 0062;00E0 05AE 033E 0315 0062;0061 05AE 0300 033E 0315 0062;
+0061 033E 0315 0300 05AE 0062;0061 05AE 033E 0300 0315 0062;0061 05AE 033E 0300 0315 0062;0061 05AE 033E 0300 0315 0062;0061 05AE 033E 0300 0315 0062;
+0061 0315 0300 05AE 033F 0062;00E0 05AE 033F 0315 0062;0061 05AE 0300 033F 0315 0062;00E0 05AE 033F 0315 0062;0061 05AE 0300 033F 0315 0062;
+0061 033F 0315 0300 05AE 0062;0061 05AE 033F 0300 0315 0062;0061 05AE 033F 0300 0315 0062;0061 05AE 033F 0300 0315 0062;0061 05AE 033F 0300 0315 0062;
+0061 0315 0300 05AE 0340 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;
+0061 0340 0315 0300 05AE 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;00E0 05AE 0300 0315 0062;0061 05AE 0300 0300 0315 0062;
+0061 0315 0300 05AE 0341 0062;00E0 05AE 0301 0315 0062;0061 05AE 0300 0301 0315 0062;00E0 05AE 0301 0315 0062;0061 05AE 0300 0301 0315 0062;
+0061 0341 0315 0300 05AE 0062;00E1 05AE 0300 0315 0062;0061 05AE 0301 0300 0315 0062;00E1 05AE 0300 0315 0062;0061 05AE 0301 0300 0315 0062;
+0061 0315 0300 05AE 0342 0062;00E0 05AE 0342 0315 0062;0061 05AE 0300 0342 0315 0062;00E0 05AE 0342 0315 0062;0061 05AE 0300 0342 0315 0062;
+0061 0342 0315 0300 05AE 0062;0061 05AE 0342 0300 0315 0062;0061 05AE 0342 0300 0315 0062;0061 05AE 0342 0300 0315 0062;0061 05AE 0342 0300 0315 0062;
+0061 0315 0300 05AE 0343 0062;00E0 05AE 0313 0315 0062;0061 05AE 0300 0313 0315 0062;00E0 05AE 0313 0315 0062;0061 05AE 0300 0313 0315 0062;
+0061 0343 0315 0300 05AE 0062;0061 05AE 0313 0300 0315 0062;0061 05AE 0313 0300 0315 0062;0061 05AE 0313 0300 0315 0062;0061 05AE 0313 0300 0315 0062;
+0061 0315 0300 05AE 0344 0062;00E0 05AE 0308 0301 0315 0062;0061 05AE 0300 0308 0301 0315 0062;00E0 05AE 0308 0301 0315 0062;0061 05AE 0300 0308 0301 0315 0062;
+0061 0344 0315 0300 05AE 0062;00E4 05AE 0301 0300 0315 0062;0061 05AE 0308 0301 0300 0315 0062;00E4 05AE 0301 0300 0315 0062;0061 05AE 0308 0301 0300 0315 0062;
+0061 0345 0360 0345 0062;0061 0360 0345 0345 0062;0061 0360 0345 0345 0062;0061 0360 0345 0345 0062;0061 0360 0345 0345 0062;
+0061 0345 0345 0360 0062;0061 0360 0345 0345 0062;0061 0360 0345 0345 0062;0061 0360 0345 0345 0062;0061 0360 0345 0345 0062;
+0061 0315 0300 05AE 0346 0062;00E0 05AE 0346 0315 0062;0061 05AE 0300 0346 0315 0062;00E0 05AE 0346 0315 0062;0061 05AE 0300 0346 0315 0062;
+0061 0346 0315 0300 05AE 0062;0061 05AE 0346 0300 0315 0062;0061 05AE 0346 0300 0315 0062;0061 05AE 0346 0300 0315 0062;0061 05AE 0346 0300 0315 0062;
+0061 059A 0316 302A 0347 0062;0061 302A 0316 0347 059A 0062;0061 302A 0316 0347 059A 0062;0061 302A 0316 0347 059A 0062;0061 302A 0316 0347 059A 0062;
+0061 0347 059A 0316 302A 0062;0061 302A 0347 0316 059A 0062;0061 302A 0347 0316 059A 0062;0061 302A 0347 0316 059A 0062;0061 302A 0347 0316 059A 0062;
+0061 059A 0316 302A 0348 0062;0061 302A 0316 0348 059A 0062;0061 302A 0316 0348 059A 0062;0061 302A 0316 0348 059A 0062;0061 302A 0316 0348 059A 0062;
+0061 0348 059A 0316 302A 0062;0061 302A 0348 0316 059A 0062;0061 302A 0348 0316 059A 0062;0061 302A 0348 0316 059A 0062;0061 302A 0348 0316 059A 0062;
+0061 059A 0316 302A 0349 0062;0061 302A 0316 0349 059A 0062;0061 302A 0316 0349 059A 0062;0061 302A 0316 0349 059A 0062;0061 302A 0316 0349 059A 0062;
+0061 0349 059A 0316 302A 0062;0061 302A 0349 0316 059A 0062;0061 302A 0349 0316 059A 0062;0061 302A 0349 0316 059A 0062;0061 302A 0349 0316 059A 0062;
+0061 0315 0300 05AE 034A 0062;00E0 05AE 034A 0315 0062;0061 05AE 0300 034A 0315 0062;00E0 05AE 034A 0315 0062;0061 05AE 0300 034A 0315 0062;
+0061 034A 0315 0300 05AE 0062;0061 05AE 034A 0300 0315 0062;0061 05AE 034A 0300 0315 0062;0061 05AE 034A 0300 0315 0062;0061 05AE 034A 0300 0315 0062;
+0061 0315 0300 05AE 034B 0062;00E0 05AE 034B 0315 0062;0061 05AE 0300 034B 0315 0062;00E0 05AE 034B 0315 0062;0061 05AE 0300 034B 0315 0062;
+0061 034B 0315 0300 05AE 0062;0061 05AE 034B 0300 0315 0062;0061 05AE 034B 0300 0315 0062;0061 05AE 034B 0300 0315 0062;0061 05AE 034B 0300 0315 0062;
+0061 0315 0300 05AE 034C 0062;00E0 05AE 034C 0315 0062;0061 05AE 0300 034C 0315 0062;00E0 05AE 034C 0315 0062;0061 05AE 0300 034C 0315 0062;
+0061 034C 0315 0300 05AE 0062;0061 05AE 034C 0300 0315 0062;0061 05AE 034C 0300 0315 0062;0061 05AE 034C 0300 0315 0062;0061 05AE 034C 0300 0315 0062;
+0061 059A 0316 302A 034D 0062;0061 302A 0316 034D 059A 0062;0061 302A 0316 034D 059A 0062;0061 302A 0316 034D 059A 0062;0061 302A 0316 034D 059A 0062;
+0061 034D 059A 0316 302A 0062;0061 302A 034D 0316 059A 0062;0061 302A 034D 0316 059A 0062;0061 302A 034D 0316 059A 0062;0061 302A 034D 0316 059A 0062;
+0061 059A 0316 302A 034E 0062;0061 302A 0316 034E 059A 0062;0061 302A 0316 034E 059A 0062;0061 302A 0316 034E 059A 0062;0061 302A 0316 034E 059A 0062;
+0061 034E 059A 0316 302A 0062;0061 302A 034E 0316 059A 0062;0061 302A 034E 0316 059A 0062;0061 302A 034E 0316 059A 0062;0061 302A 034E 0316 059A 0062;
+0061 0345 0360 0362 0360 0062;0061 0362 0360 0360 0345 0062;0061 0362 0360 0360 0345 0062;0061 0362 0360 0360 0345 0062;0061 0362 0360 0360 0345 0062;
+0061 0360 0345 0360 0362 0062;0061 0362 0360 0360 0345 0062;0061 0362 0360 0360 0345 0062;0061 0362 0360 0360 0345 0062;0061 0362 0360 0360 0345 0062;
+0061 0345 0360 0362 0361 0062;0061 0362 0360 0361 0345 0062;0061 0362 0360 0361 0345 0062;0061 0362 0360 0361 0345 0062;0061 0362 0360 0361 0345 0062;
+0061 0361 0345 0360 0362 0062;0061 0362 0361 0360 0345 0062;0061 0362 0361 0360 0345 0062;0061 0362 0361 0360 0345 0062;0061 0362 0361 0360 0345 0062;
+0061 0360 0362 0315 0362 0062;0061 0315 0362 0362 0360 0062;0061 0315 0362 0362 0360 0062;0061 0315 0362 0362 0360 0062;0061 0315 0362 0362 0360 0062;
+0061 0362 0360 0362 0315 0062;0061 0315 0362 0362 0360 0062;0061 0315 0362 0362 0360 0062;0061 0315 0362 0362 0360 0062;0061 0315 0362 0362 0360 0062;
+0061 0315 0300 05AE 0363 0062;00E0 05AE 0363 0315 0062;0061 05AE 0300 0363 0315 0062;00E0 05AE 0363 0315 0062;0061 05AE 0300 0363 0315 0062;
+0061 0363 0315 0300 05AE 0062;0061 05AE 0363 0300 0315 0062;0061 05AE 0363 0300 0315 0062;0061 05AE 0363 0300 0315 0062;0061 05AE 0363 0300 0315 0062;
+0061 0315 0300 05AE 0364 0062;00E0 05AE 0364 0315 0062;0061 05AE 0300 0364 0315 0062;00E0 05AE 0364 0315 0062;0061 05AE 0300 0364 0315 0062;
+0061 0364 0315 0300 05AE 0062;0061 05AE 0364 0300 0315 0062;0061 05AE 0364 0300 0315 0062;0061 05AE 0364 0300 0315 0062;0061 05AE 0364 0300 0315 0062;
+0061 0315 0300 05AE 0365 0062;00E0 05AE 0365 0315 0062;0061 05AE 0300 0365 0315 0062;00E0 05AE 0365 0315 0062;0061 05AE 0300 0365 0315 0062;
+0061 0365 0315 0300 05AE 0062;0061 05AE 0365 0300 0315 0062;0061 05AE 0365 0300 0315 0062;0061 05AE 0365 0300 0315 0062;0061 05AE 0365 0300 0315 0062;
+0061 0315 0300 05AE 0366 0062;00E0 05AE 0366 0315 0062;0061 05AE 0300 0366 0315 0062;00E0 05AE 0366 0315 0062;0061 05AE 0300 0366 0315 0062;
+0061 0366 0315 0300 05AE 0062;0061 05AE 0366 0300 0315 0062;0061 05AE 0366 0300 0315 0062;0061 05AE 0366 0300 0315 0062;0061 05AE 0366 0300 0315 0062;
+0061 0315 0300 05AE 0367 0062;00E0 05AE 0367 0315 0062;0061 05AE 0300 0367 0315 0062;00E0 05AE 0367 0315 0062;0061 05AE 0300 0367 0315 0062;
+0061 0367 0315 0300 05AE 0062;0061 05AE 0367 0300 0315 0062;0061 05AE 0367 0300 0315 0062;0061 05AE 0367 0300 0315 0062;0061 05AE 0367 0300 0315 0062;
+0061 0315 0300 05AE 0368 0062;00E0 05AE 0368 0315 0062;0061 05AE 0300 0368 0315 0062;00E0 05AE 0368 0315 0062;0061 05AE 0300 0368 0315 0062;
+0061 0368 0315 0300 05AE 0062;0061 05AE 0368 0300 0315 0062;0061 05AE 0368 0300 0315 0062;0061 05AE 0368 0300 0315 0062;0061 05AE 0368 0300 0315 0062;
+0061 0315 0300 05AE 0369 0062;00E0 05AE 0369 0315 0062;0061 05AE 0300 0369 0315 0062;00E0 05AE 0369 0315 0062;0061 05AE 0300 0369 0315 0062;
+0061 0369 0315 0300 05AE 0062;0061 05AE 0369 0300 0315 0062;0061 05AE 0369 0300 0315 0062;0061 05AE 0369 0300 0315 0062;0061 05AE 0369 0300 0315 0062;
+0061 0315 0300 05AE 036A 0062;00E0 05AE 036A 0315 0062;0061 05AE 0300 036A 0315 0062;00E0 05AE 036A 0315 0062;0061 05AE 0300 036A 0315 0062;
+0061 036A 0315 0300 05AE 0062;0061 05AE 036A 0300 0315 0062;0061 05AE 036A 0300 0315 0062;0061 05AE 036A 0300 0315 0062;0061 05AE 036A 0300 0315 0062;
+0061 0315 0300 05AE 036B 0062;00E0 05AE 036B 0315 0062;0061 05AE 0300 036B 0315 0062;00E0 05AE 036B 0315 0062;0061 05AE 0300 036B 0315 0062;
+0061 036B 0315 0300 05AE 0062;0061 05AE 036B 0300 0315 0062;0061 05AE 036B 0300 0315 0062;0061 05AE 036B 0300 0315 0062;0061 05AE 036B 0300 0315 0062;
+0061 0315 0300 05AE 036C 0062;00E0 05AE 036C 0315 0062;0061 05AE 0300 036C 0315 0062;00E0 05AE 036C 0315 0062;0061 05AE 0300 036C 0315 0062;
+0061 036C 0315 0300 05AE 0062;0061 05AE 036C 0300 0315 0062;0061 05AE 036C 0300 0315 0062;0061 05AE 036C 0300 0315 0062;0061 05AE 036C 0300 0315 0062;
+0061 0315 0300 05AE 036D 0062;00E0 05AE 036D 0315 0062;0061 05AE 0300 036D 0315 0062;00E0 05AE 036D 0315 0062;0061 05AE 0300 036D 0315 0062;
+0061 036D 0315 0300 05AE 0062;0061 05AE 036D 0300 0315 0062;0061 05AE 036D 0300 0315 0062;0061 05AE 036D 0300 0315 0062;0061 05AE 036D 0300 0315 0062;
+0061 0315 0300 05AE 036E 0062;00E0 05AE 036E 0315 0062;0061 05AE 0300 036E 0315 0062;00E0 05AE 036E 0315 0062;0061 05AE 0300 036E 0315 0062;
+0061 036E 0315 0300 05AE 0062;0061 05AE 036E 0300 0315 0062;0061 05AE 036E 0300 0315 0062;0061 05AE 036E 0300 0315 0062;0061 05AE 036E 0300 0315 0062;
+0061 0315 0300 05AE 036F 0062;00E0 05AE 036F 0315 0062;0061 05AE 0300 036F 0315 0062;00E0 05AE 036F 0315 0062;0061 05AE 0300 036F 0315 0062;
+0061 036F 0315 0300 05AE 0062;0061 05AE 036F 0300 0315 0062;0061 05AE 036F 0300 0315 0062;0061 05AE 036F 0300 0315 0062;0061 05AE 036F 0300 0315 0062;
+0061 0315 0300 05AE 0483 0062;00E0 05AE 0483 0315 0062;0061 05AE 0300 0483 0315 0062;00E0 05AE 0483 0315 0062;0061 05AE 0300 0483 0315 0062;
+0061 0483 0315 0300 05AE 0062;0061 05AE 0483 0300 0315 0062;0061 05AE 0483 0300 0315 0062;0061 05AE 0483 0300 0315 0062;0061 05AE 0483 0300 0315 0062;
+0061 0315 0300 05AE 0484 0062;00E0 05AE 0484 0315 0062;0061 05AE 0300 0484 0315 0062;00E0 05AE 0484 0315 0062;0061 05AE 0300 0484 0315 0062;
+0061 0484 0315 0300 05AE 0062;0061 05AE 0484 0300 0315 0062;0061 05AE 0484 0300 0315 0062;0061 05AE 0484 0300 0315 0062;0061 05AE 0484 0300 0315 0062;
+0061 0315 0300 05AE 0485 0062;00E0 05AE 0485 0315 0062;0061 05AE 0300 0485 0315 0062;00E0 05AE 0485 0315 0062;0061 05AE 0300 0485 0315 0062;
+0061 0485 0315 0300 05AE 0062;0061 05AE 0485 0300 0315 0062;0061 05AE 0485 0300 0315 0062;0061 05AE 0485 0300 0315 0062;0061 05AE 0485 0300 0315 0062;
+0061 0315 0300 05AE 0486 0062;00E0 05AE 0486 0315 0062;0061 05AE 0300 0486 0315 0062;00E0 05AE 0486 0315 0062;0061 05AE 0300 0486 0315 0062;
+0061 0486 0315 0300 05AE 0062;0061 05AE 0486 0300 0315 0062;0061 05AE 0486 0300 0315 0062;0061 05AE 0486 0300 0315 0062;0061 05AE 0486 0300 0315 0062;
+0061 059A 0316 302A 0591 0062;0061 302A 0316 0591 059A 0062;0061 302A 0316 0591 059A 0062;0061 302A 0316 0591 059A 0062;0061 302A 0316 0591 059A 0062;
+0061 0591 059A 0316 302A 0062;0061 302A 0591 0316 059A 0062;0061 302A 0591 0316 059A 0062;0061 302A 0591 0316 059A 0062;0061 302A 0591 0316 059A 0062;
+0061 0315 0300 05AE 0592 0062;00E0 05AE 0592 0315 0062;0061 05AE 0300 0592 0315 0062;00E0 05AE 0592 0315 0062;0061 05AE 0300 0592 0315 0062;
+0061 0592 0315 0300 05AE 0062;0061 05AE 0592 0300 0315 0062;0061 05AE 0592 0300 0315 0062;0061 05AE 0592 0300 0315 0062;0061 05AE 0592 0300 0315 0062;
+0061 0315 0300 05AE 0593 0062;00E0 05AE 0593 0315 0062;0061 05AE 0300 0593 0315 0062;00E0 05AE 0593 0315 0062;0061 05AE 0300 0593 0315 0062;
+0061 0593 0315 0300 05AE 0062;0061 05AE 0593 0300 0315 0062;0061 05AE 0593 0300 0315 0062;0061 05AE 0593 0300 0315 0062;0061 05AE 0593 0300 0315 0062;
+0061 0315 0300 05AE 0594 0062;00E0 05AE 0594 0315 0062;0061 05AE 0300 0594 0315 0062;00E0 05AE 0594 0315 0062;0061 05AE 0300 0594 0315 0062;
+0061 0594 0315 0300 05AE 0062;0061 05AE 0594 0300 0315 0062;0061 05AE 0594 0300 0315 0062;0061 05AE 0594 0300 0315 0062;0061 05AE 0594 0300 0315 0062;
+0061 0315 0300 05AE 0595 0062;00E0 05AE 0595 0315 0062;0061 05AE 0300 0595 0315 0062;00E0 05AE 0595 0315 0062;0061 05AE 0300 0595 0315 0062;
+0061 0595 0315 0300 05AE 0062;0061 05AE 0595 0300 0315 0062;0061 05AE 0595 0300 0315 0062;0061 05AE 0595 0300 0315 0062;0061 05AE 0595 0300 0315 0062;
+0061 059A 0316 302A 0596 0062;0061 302A 0316 0596 059A 0062;0061 302A 0316 0596 059A 0062;0061 302A 0316 0596 059A 0062;0061 302A 0316 0596 059A 0062;
+0061 0596 059A 0316 302A 0062;0061 302A 0596 0316 059A 0062;0061 302A 0596 0316 059A 0062;0061 302A 0596 0316 059A 0062;0061 302A 0596 0316 059A 0062;
+0061 0315 0300 05AE 0597 0062;00E0 05AE 0597 0315 0062;0061 05AE 0300 0597 0315 0062;00E0 05AE 0597 0315 0062;0061 05AE 0300 0597 0315 0062;
+0061 0597 0315 0300 05AE 0062;0061 05AE 0597 0300 0315 0062;0061 05AE 0597 0300 0315 0062;0061 05AE 0597 0300 0315 0062;0061 05AE 0597 0300 0315 0062;
+0061 0315 0300 05AE 0598 0062;00E0 05AE 0598 0315 0062;0061 05AE 0300 0598 0315 0062;00E0 05AE 0598 0315 0062;0061 05AE 0300 0598 0315 0062;
+0061 0598 0315 0300 05AE 0062;0061 05AE 0598 0300 0315 0062;0061 05AE 0598 0300 0315 0062;0061 05AE 0598 0300 0315 0062;0061 05AE 0598 0300 0315 0062;
+0061 0315 0300 05AE 0599 0062;00E0 05AE 0599 0315 0062;0061 05AE 0300 0599 0315 0062;00E0 05AE 0599 0315 0062;0061 05AE 0300 0599 0315 0062;
+0061 0599 0315 0300 05AE 0062;0061 05AE 0599 0300 0315 0062;0061 05AE 0599 0300 0315 0062;0061 05AE 0599 0300 0315 0062;0061 05AE 0599 0300 0315 0062;
+0061 302E 059A 0316 059A 0062;0061 0316 059A 059A 302E 0062;0061 0316 059A 059A 302E 0062;0061 0316 059A 059A 302E 0062;0061 0316 059A 059A 302E 0062;
+0061 059A 302E 059A 0316 0062;0061 0316 059A 059A 302E 0062;0061 0316 059A 059A 302E 0062;0061 0316 059A 059A 302E 0062;0061 0316 059A 059A 302E 0062;
+0061 059A 0316 302A 059B 0062;0061 302A 0316 059B 059A 0062;0061 302A 0316 059B 059A 0062;0061 302A 0316 059B 059A 0062;0061 302A 0316 059B 059A 0062;
+0061 059B 059A 0316 302A 0062;0061 302A 059B 0316 059A 0062;0061 302A 059B 0316 059A 0062;0061 302A 059B 0316 059A 0062;0061 302A 059B 0316 059A 0062;
+0061 0315 0300 05AE 059C 0062;00E0 05AE 059C 0315 0062;0061 05AE 0300 059C 0315 0062;00E0 05AE 059C 0315 0062;0061 05AE 0300 059C 0315 0062;
+0061 059C 0315 0300 05AE 0062;0061 05AE 059C 0300 0315 0062;0061 05AE 059C 0300 0315 0062;0061 05AE 059C 0300 0315 0062;0061 05AE 059C 0300 0315 0062;
+0061 0315 0300 05AE 059D 0062;00E0 05AE 059D 0315 0062;0061 05AE 0300 059D 0315 0062;00E0 05AE 059D 0315 0062;0061 05AE 0300 059D 0315 0062;
+0061 059D 0315 0300 05AE 0062;0061 05AE 059D 0300 0315 0062;0061 05AE 059D 0300 0315 0062;0061 05AE 059D 0300 0315 0062;0061 05AE 059D 0300 0315 0062;
+0061 0315 0300 05AE 059E 0062;00E0 05AE 059E 0315 0062;0061 05AE 0300 059E 0315 0062;00E0 05AE 059E 0315 0062;0061 05AE 0300 059E 0315 0062;
+0061 059E 0315 0300 05AE 0062;0061 05AE 059E 0300 0315 0062;0061 05AE 059E 0300 0315 0062;0061 05AE 059E 0300 0315 0062;0061 05AE 059E 0300 0315 0062;
+0061 0315 0300 05AE 059F 0062;00E0 05AE 059F 0315 0062;0061 05AE 0300 059F 0315 0062;00E0 05AE 059F 0315 0062;0061 05AE 0300 059F 0315 0062;
+0061 059F 0315 0300 05AE 0062;0061 05AE 059F 0300 0315 0062;0061 05AE 059F 0300 0315 0062;0061 05AE 059F 0300 0315 0062;0061 05AE 059F 0300 0315 0062;
+0061 0315 0300 05AE 05A0 0062;00E0 05AE 05A0 0315 0062;0061 05AE 0300 05A0 0315 0062;00E0 05AE 05A0 0315 0062;0061 05AE 0300 05A0 0315 0062;
+0061 05A0 0315 0300 05AE 0062;0061 05AE 05A0 0300 0315 0062;0061 05AE 05A0 0300 0315 0062;0061 05AE 05A0 0300 0315 0062;0061 05AE 05A0 0300 0315 0062;
+0061 0315 0300 05AE 05A1 0062;00E0 05AE 05A1 0315 0062;0061 05AE 0300 05A1 0315 0062;00E0 05AE 05A1 0315 0062;0061 05AE 0300 05A1 0315 0062;
+0061 05A1 0315 0300 05AE 0062;0061 05AE 05A1 0300 0315 0062;0061 05AE 05A1 0300 0315 0062;0061 05AE 05A1 0300 0315 0062;0061 05AE 05A1 0300 0315 0062;
+0061 059A 0316 302A 05A3 0062;0061 302A 0316 05A3 059A 0062;0061 302A 0316 05A3 059A 0062;0061 302A 0316 05A3 059A 0062;0061 302A 0316 05A3 059A 0062;
+0061 05A3 059A 0316 302A 0062;0061 302A 05A3 0316 059A 0062;0061 302A 05A3 0316 059A 0062;0061 302A 05A3 0316 059A 0062;0061 302A 05A3 0316 059A 0062;
+0061 059A 0316 302A 05A4 0062;0061 302A 0316 05A4 059A 0062;0061 302A 0316 05A4 059A 0062;0061 302A 0316 05A4 059A 0062;0061 302A 0316 05A4 059A 0062;
+0061 05A4 059A 0316 302A 0062;0061 302A 05A4 0316 059A 0062;0061 302A 05A4 0316 059A 0062;0061 302A 05A4 0316 059A 0062;0061 302A 05A4 0316 059A 0062;
+0061 059A 0316 302A 05A5 0062;0061 302A 0316 05A5 059A 0062;0061 302A 0316 05A5 059A 0062;0061 302A 0316 05A5 059A 0062;0061 302A 0316 05A5 059A 0062;
+0061 05A5 059A 0316 302A 0062;0061 302A 05A5 0316 059A 0062;0061 302A 05A5 0316 059A 0062;0061 302A 05A5 0316 059A 0062;0061 302A 05A5 0316 059A 0062;
+0061 059A 0316 302A 05A6 0062;0061 302A 0316 05A6 059A 0062;0061 302A 0316 05A6 059A 0062;0061 302A 0316 05A6 059A 0062;0061 302A 0316 05A6 059A 0062;
+0061 05A6 059A 0316 302A 0062;0061 302A 05A6 0316 059A 0062;0061 302A 05A6 0316 059A 0062;0061 302A 05A6 0316 059A 0062;0061 302A 05A6 0316 059A 0062;
+0061 059A 0316 302A 05A7 0062;0061 302A 0316 05A7 059A 0062;0061 302A 0316 05A7 059A 0062;0061 302A 0316 05A7 059A 0062;0061 302A 0316 05A7 059A 0062;
+0061 05A7 059A 0316 302A 0062;0061 302A 05A7 0316 059A 0062;0061 302A 05A7 0316 059A 0062;0061 302A 05A7 0316 059A 0062;0061 302A 05A7 0316 059A 0062;
+0061 0315 0300 05AE 05A8 0062;00E0 05AE 05A8 0315 0062;0061 05AE 0300 05A8 0315 0062;00E0 05AE 05A8 0315 0062;0061 05AE 0300 05A8 0315 0062;
+0061 05A8 0315 0300 05AE 0062;0061 05AE 05A8 0300 0315 0062;0061 05AE 05A8 0300 0315 0062;0061 05AE 05A8 0300 0315 0062;0061 05AE 05A8 0300 0315 0062;
+0061 0315 0300 05AE 05A9 0062;00E0 05AE 05A9 0315 0062;0061 05AE 0300 05A9 0315 0062;00E0 05AE 05A9 0315 0062;0061 05AE 0300 05A9 0315 0062;
+0061 05A9 0315 0300 05AE 0062;0061 05AE 05A9 0300 0315 0062;0061 05AE 05A9 0300 0315 0062;0061 05AE 05A9 0300 0315 0062;0061 05AE 05A9 0300 0315 0062;
+0061 059A 0316 302A 05AA 0062;0061 302A 0316 05AA 059A 0062;0061 302A 0316 05AA 059A 0062;0061 302A 0316 05AA 059A 0062;0061 302A 0316 05AA 059A 0062;
+0061 05AA 059A 0316 302A 0062;0061 302A 05AA 0316 059A 0062;0061 302A 05AA 0316 059A 0062;0061 302A 05AA 0316 059A 0062;0061 302A 05AA 0316 059A 0062;
+0061 0315 0300 05AE 05AB 0062;00E0 05AE 05AB 0315 0062;0061 05AE 0300 05AB 0315 0062;00E0 05AE 05AB 0315 0062;0061 05AE 0300 05AB 0315 0062;
+0061 05AB 0315 0300 05AE 0062;0061 05AE 05AB 0300 0315 0062;0061 05AE 05AB 0300 0315 0062;0061 05AE 05AB 0300 0315 0062;0061 05AE 05AB 0300 0315 0062;
+0061 0315 0300 05AE 05AC 0062;00E0 05AE 05AC 0315 0062;0061 05AE 0300 05AC 0315 0062;00E0 05AE 05AC 0315 0062;0061 05AE 0300 05AC 0315 0062;
+0061 05AC 0315 0300 05AE 0062;0061 05AE 05AC 0300 0315 0062;0061 05AE 05AC 0300 0315 0062;0061 05AE 05AC 0300 0315 0062;0061 05AE 05AC 0300 0315 0062;
+0061 302E 059A 0316 05AD 0062;0061 0316 059A 05AD 302E 0062;0061 0316 059A 05AD 302E 0062;0061 0316 059A 05AD 302E 0062;0061 0316 059A 05AD 302E 0062;
+0061 05AD 302E 059A 0316 0062;0061 0316 05AD 059A 302E 0062;0061 0316 05AD 059A 302E 0062;0061 0316 05AD 059A 302E 0062;0061 0316 05AD 059A 302E 0062;
+0061 0300 05AE 1D16D 05AE 0062;00E0 1D16D 05AE 05AE 0062;0061 1D16D 05AE 05AE 0300 0062;00E0 1D16D 05AE 05AE 0062;0061 1D16D 05AE 05AE 0300 0062;
+0061 05AE 0300 05AE 1D16D 0062;00E0 1D16D 05AE 05AE 0062;0061 1D16D 05AE 05AE 0300 0062;00E0 1D16D 05AE 05AE 0062;0061 1D16D 05AE 05AE 0300 0062;
+0061 0315 0300 05AE 05AF 0062;00E0 05AE 05AF 0315 0062;0061 05AE 0300 05AF 0315 0062;00E0 05AE 05AF 0315 0062;0061 05AE 0300 05AF 0315 0062;
+0061 05AF 0315 0300 05AE 0062;0061 05AE 05AF 0300 0315 0062;0061 05AE 05AF 0300 0315 0062;0061 05AE 05AF 0300 0315 0062;0061 05AE 05AF 0300 0315 0062;
+0061 05B1 05B0 094D 05B0 0062;0061 094D 05B0 05B0 05B1 0062;0061 094D 05B0 05B0 05B1 0062;0061 094D 05B0 05B0 05B1 0062;0061 094D 05B0 05B0 05B1 0062;
+0061 05B0 05B1 05B0 094D 0062;0061 094D 05B0 05B0 05B1 0062;0061 094D 05B0 05B0 05B1 0062;0061 094D 05B0 05B0 05B1 0062;0061 094D 05B0 05B0 05B1 0062;
+0061 05B2 05B1 05B0 05B1 0062;0061 05B0 05B1 05B1 05B2 0062;0061 05B0 05B1 05B1 05B2 0062;0061 05B0 05B1 05B1 05B2 0062;0061 05B0 05B1 05B1 05B2 0062;
+0061 05B1 05B2 05B1 05B0 0062;0061 05B0 05B1 05B1 05B2 0062;0061 05B0 05B1 05B1 05B2 0062;0061 05B0 05B1 05B1 05B2 0062;0061 05B0 05B1 05B1 05B2 0062;
+0061 05B3 05B2 05B1 05B2 0062;0061 05B1 05B2 05B2 05B3 0062;0061 05B1 05B2 05B2 05B3 0062;0061 05B1 05B2 05B2 05B3 0062;0061 05B1 05B2 05B2 05B3 0062;
+0061 05B2 05B3 05B2 05B1 0062;0061 05B1 05B2 05B2 05B3 0062;0061 05B1 05B2 05B2 05B3 0062;0061 05B1 05B2 05B2 05B3 0062;0061 05B1 05B2 05B2 05B3 0062;
+0061 05B4 05B3 05B2 05B3 0062;0061 05B2 05B3 05B3 05B4 0062;0061 05B2 05B3 05B3 05B4 0062;0061 05B2 05B3 05B3 05B4 0062;0061 05B2 05B3 05B3 05B4 0062;
+0061 05B3 05B4 05B3 05B2 0062;0061 05B2 05B3 05B3 05B4 0062;0061 05B2 05B3 05B3 05B4 0062;0061 05B2 05B3 05B3 05B4 0062;0061 05B2 05B3 05B3 05B4 0062;
+0061 05B5 05B4 05B3 05B4 0062;0061 05B3 05B4 05B4 05B5 0062;0061 05B3 05B4 05B4 05B5 0062;0061 05B3 05B4 05B4 05B5 0062;0061 05B3 05B4 05B4 05B5 0062;
+0061 05B4 05B5 05B4 05B3 0062;0061 05B3 05B4 05B4 05B5 0062;0061 05B3 05B4 05B4 05B5 0062;0061 05B3 05B4 05B4 05B5 0062;0061 05B3 05B4 05B4 05B5 0062;
+0061 05B6 05B5 05B4 05B5 0062;0061 05B4 05B5 05B5 05B6 0062;0061 05B4 05B5 05B5 05B6 0062;0061 05B4 05B5 05B5 05B6 0062;0061 05B4 05B5 05B5 05B6 0062;
+0061 05B5 05B6 05B5 05B4 0062;0061 05B4 05B5 05B5 05B6 0062;0061 05B4 05B5 05B5 05B6 0062;0061 05B4 05B5 05B5 05B6 0062;0061 05B4 05B5 05B5 05B6 0062;
+0061 05B7 05B6 05B5 05B6 0062;0061 05B5 05B6 05B6 05B7 0062;0061 05B5 05B6 05B6 05B7 0062;0061 05B5 05B6 05B6 05B7 0062;0061 05B5 05B6 05B6 05B7 0062;
+0061 05B6 05B7 05B6 05B5 0062;0061 05B5 05B6 05B6 05B7 0062;0061 05B5 05B6 05B6 05B7 0062;0061 05B5 05B6 05B6 05B7 0062;0061 05B5 05B6 05B6 05B7 0062;
+0061 05B8 05B7 05B6 05B7 0062;0061 05B6 05B7 05B7 05B8 0062;0061 05B6 05B7 05B7 05B8 0062;0061 05B6 05B7 05B7 05B8 0062;0061 05B6 05B7 05B7 05B8 0062;
+0061 05B7 05B8 05B7 05B6 0062;0061 05B6 05B7 05B7 05B8 0062;0061 05B6 05B7 05B7 05B8 0062;0061 05B6 05B7 05B7 05B8 0062;0061 05B6 05B7 05B7 05B8 0062;
+0061 05B9 05B8 05B7 05B8 0062;0061 05B7 05B8 05B8 05B9 0062;0061 05B7 05B8 05B8 05B9 0062;0061 05B7 05B8 05B8 05B9 0062;0061 05B7 05B8 05B8 05B9 0062;
+0061 05B8 05B9 05B8 05B7 0062;0061 05B7 05B8 05B8 05B9 0062;0061 05B7 05B8 05B8 05B9 0062;0061 05B7 05B8 05B8 05B9 0062;0061 05B7 05B8 05B8 05B9 0062;
+0061 05BB 05B9 05B8 05B9 0062;0061 05B8 05B9 05B9 05BB 0062;0061 05B8 05B9 05B9 05BB 0062;0061 05B8 05B9 05B9 05BB 0062;0061 05B8 05B9 05B9 05BB 0062;
+0061 05B9 05BB 05B9 05B8 0062;0061 05B8 05B9 05B9 05BB 0062;0061 05B8 05B9 05B9 05BB 0062;0061 05B8 05B9 05B9 05BB 0062;0061 05B8 05B9 05B9 05BB 0062;
+0061 05BC 05BB 05B9 05BB 0062;0061 05B9 05BB 05BB 05BC 0062;0061 05B9 05BB 05BB 05BC 0062;0061 05B9 05BB 05BB 05BC 0062;0061 05B9 05BB 05BB 05BC 0062;
+0061 05BB 05BC 05BB 05B9 0062;0061 05B9 05BB 05BB 05BC 0062;0061 05B9 05BB 05BB 05BC 0062;0061 05B9 05BB 05BB 05BC 0062;0061 05B9 05BB 05BB 05BC 0062;
+0061 05BD 05BC 05BB 05BC 0062;0061 05BB 05BC 05BC 05BD 0062;0061 05BB 05BC 05BC 05BD 0062;0061 05BB 05BC 05BC 05BD 0062;0061 05BB 05BC 05BC 05BD 0062;
+0061 05BC 05BD 05BC 05BB 0062;0061 05BB 05BC 05BC 05BD 0062;0061 05BB 05BC 05BC 05BD 0062;0061 05BB 05BC 05BC 05BD 0062;0061 05BB 05BC 05BC 05BD 0062;
+0061 05BF 05BD 05BC 05BD 0062;0061 05BC 05BD 05BD 05BF 0062;0061 05BC 05BD 05BD 05BF 0062;0061 05BC 05BD 05BD 05BF 0062;0061 05BC 05BD 05BD 05BF 0062;
+0061 05BD 05BF 05BD 05BC 0062;0061 05BC 05BD 05BD 05BF 0062;0061 05BC 05BD 05BD 05BF 0062;0061 05BC 05BD 05BD 05BF 0062;0061 05BC 05BD 05BD 05BF 0062;
+0061 05C1 05BF 05BD 05BF 0062;0061 05BD 05BF 05BF 05C1 0062;0061 05BD 05BF 05BF 05C1 0062;0061 05BD 05BF 05BF 05C1 0062;0061 05BD 05BF 05BF 05C1 0062;
+0061 05BF 05C1 05BF 05BD 0062;0061 05BD 05BF 05BF 05C1 0062;0061 05BD 05BF 05BF 05C1 0062;0061 05BD 05BF 05BF 05C1 0062;0061 05BD 05BF 05BF 05C1 0062;
+0061 05C2 05C1 05BF 05C1 0062;0061 05BF 05C1 05C1 05C2 0062;0061 05BF 05C1 05C1 05C2 0062;0061 05BF 05C1 05C1 05C2 0062;0061 05BF 05C1 05C1 05C2 0062;
+0061 05C1 05C2 05C1 05BF 0062;0061 05BF 05C1 05C1 05C2 0062;0061 05BF 05C1 05C1 05C2 0062;0061 05BF 05C1 05C1 05C2 0062;0061 05BF 05C1 05C1 05C2 0062;
+0061 FB1E 05C2 05C1 05C2 0062;0061 05C1 05C2 05C2 FB1E 0062;0061 05C1 05C2 05C2 FB1E 0062;0061 05C1 05C2 05C2 FB1E 0062;0061 05C1 05C2 05C2 FB1E 0062;
+0061 05C2 FB1E 05C2 05C1 0062;0061 05C1 05C2 05C2 FB1E 0062;0061 05C1 05C2 05C2 FB1E 0062;0061 05C1 05C2 05C2 FB1E 0062;0061 05C1 05C2 05C2 FB1E 0062;
+0061 0315 0300 05AE 05C4 0062;00E0 05AE 05C4 0315 0062;0061 05AE 0300 05C4 0315 0062;00E0 05AE 05C4 0315 0062;0061 05AE 0300 05C4 0315 0062;
+0061 05C4 0315 0300 05AE 0062;0061 05AE 05C4 0300 0315 0062;0061 05AE 05C4 0300 0315 0062;0061 05AE 05C4 0300 0315 0062;0061 05AE 05C4 0300 0315 0062;
+0061 064C 064B FB1E 064B 0062;0061 FB1E 064B 064B 064C 0062;0061 FB1E 064B 064B 064C 0062;0061 FB1E 064B 064B 064C 0062;0061 FB1E 064B 064B 064C 0062;
+0061 064B 064C 064B FB1E 0062;0061 FB1E 064B 064B 064C 0062;0061 FB1E 064B 064B 064C 0062;0061 FB1E 064B 064B 064C 0062;0061 FB1E 064B 064B 064C 0062;
+0061 064D 064C 064B 064C 0062;0061 064B 064C 064C 064D 0062;0061 064B 064C 064C 064D 0062;0061 064B 064C 064C 064D 0062;0061 064B 064C 064C 064D 0062;
+0061 064C 064D 064C 064B 0062;0061 064B 064C 064C 064D 0062;0061 064B 064C 064C 064D 0062;0061 064B 064C 064C 064D 0062;0061 064B 064C 064C 064D 0062;
+0061 064E 064D 064C 064D 0062;0061 064C 064D 064D 064E 0062;0061 064C 064D 064D 064E 0062;0061 064C 064D 064D 064E 0062;0061 064C 064D 064D 064E 0062;
+0061 064D 064E 064D 064C 0062;0061 064C 064D 064D 064E 0062;0061 064C 064D 064D 064E 0062;0061 064C 064D 064D 064E 0062;0061 064C 064D 064D 064E 0062;
+0061 064F 064E 064D 064E 0062;0061 064D 064E 064E 064F 0062;0061 064D 064E 064E 064F 0062;0061 064D 064E 064E 064F 0062;0061 064D 064E 064E 064F 0062;
+0061 064E 064F 064E 064D 0062;0061 064D 064E 064E 064F 0062;0061 064D 064E 064E 064F 0062;0061 064D 064E 064E 064F 0062;0061 064D 064E 064E 064F 0062;
+0061 0650 064F 064E 064F 0062;0061 064E 064F 064F 0650 0062;0061 064E 064F 064F 0650 0062;0061 064E 064F 064F 0650 0062;0061 064E 064F 064F 0650 0062;
+0061 064F 0650 064F 064E 0062;0061 064E 064F 064F 0650 0062;0061 064E 064F 064F 0650 0062;0061 064E 064F 064F 0650 0062;0061 064E 064F 064F 0650 0062;
+0061 0651 0650 064F 0650 0062;0061 064F 0650 0650 0651 0062;0061 064F 0650 0650 0651 0062;0061 064F 0650 0650 0651 0062;0061 064F 0650 0650 0651 0062;
+0061 0650 0651 0650 064F 0062;0061 064F 0650 0650 0651 0062;0061 064F 0650 0650 0651 0062;0061 064F 0650 0650 0651 0062;0061 064F 0650 0650 0651 0062;
+0061 0652 0651 0650 0651 0062;0061 0650 0651 0651 0652 0062;0061 0650 0651 0651 0652 0062;0061 0650 0651 0651 0652 0062;0061 0650 0651 0651 0652 0062;
+0061 0651 0652 0651 0650 0062;0061 0650 0651 0651 0652 0062;0061 0650 0651 0651 0652 0062;0061 0650 0651 0651 0652 0062;0061 0650 0651 0651 0652 0062;
+0061 0670 0652 0651 0652 0062;0061 0651 0652 0652 0670 0062;0061 0651 0652 0652 0670 0062;0061 0651 0652 0652 0670 0062;0061 0651 0652 0652 0670 0062;
+0061 0652 0670 0652 0651 0062;0061 0651 0652 0652 0670 0062;0061 0651 0652 0652 0670 0062;0061 0651 0652 0652 0670 0062;0061 0651 0652 0652 0670 0062;
+0061 0315 0300 05AE 0653 0062;00E0 05AE 0653 0315 0062;0061 05AE 0300 0653 0315 0062;00E0 05AE 0653 0315 0062;0061 05AE 0300 0653 0315 0062;
+0061 0653 0315 0300 05AE 0062;0061 05AE 0653 0300 0315 0062;0061 05AE 0653 0300 0315 0062;0061 05AE 0653 0300 0315 0062;0061 05AE 0653 0300 0315 0062;
+0061 0315 0300 05AE 0654 0062;00E0 05AE 0654 0315 0062;0061 05AE 0300 0654 0315 0062;00E0 05AE 0654 0315 0062;0061 05AE 0300 0654 0315 0062;
+0061 0654 0315 0300 05AE 0062;0061 05AE 0654 0300 0315 0062;0061 05AE 0654 0300 0315 0062;0061 05AE 0654 0300 0315 0062;0061 05AE 0654 0300 0315 0062;
+0061 059A 0316 302A 0655 0062;0061 302A 0316 0655 059A 0062;0061 302A 0316 0655 059A 0062;0061 302A 0316 0655 059A 0062;0061 302A 0316 0655 059A 0062;
+0061 0655 059A 0316 302A 0062;0061 302A 0655 0316 059A 0062;0061 302A 0655 0316 059A 0062;0061 302A 0655 0316 059A 0062;0061 302A 0655 0316 059A 0062;
+0061 0711 0670 0652 0670 0062;0061 0652 0670 0670 0711 0062;0061 0652 0670 0670 0711 0062;0061 0652 0670 0670 0711 0062;0061 0652 0670 0670 0711 0062;
+0061 0670 0711 0670 0652 0062;0061 0652 0670 0670 0711 0062;0061 0652 0670 0670 0711 0062;0061 0652 0670 0670 0711 0062;0061 0652 0670 0670 0711 0062;
+0061 0315 0300 05AE 06D6 0062;00E0 05AE 06D6 0315 0062;0061 05AE 0300 06D6 0315 0062;00E0 05AE 06D6 0315 0062;0061 05AE 0300 06D6 0315 0062;
+0061 06D6 0315 0300 05AE 0062;0061 05AE 06D6 0300 0315 0062;0061 05AE 06D6 0300 0315 0062;0061 05AE 06D6 0300 0315 0062;0061 05AE 06D6 0300 0315 0062;
+0061 0315 0300 05AE 06D7 0062;00E0 05AE 06D7 0315 0062;0061 05AE 0300 06D7 0315 0062;00E0 05AE 06D7 0315 0062;0061 05AE 0300 06D7 0315 0062;
+0061 06D7 0315 0300 05AE 0062;0061 05AE 06D7 0300 0315 0062;0061 05AE 06D7 0300 0315 0062;0061 05AE 06D7 0300 0315 0062;0061 05AE 06D7 0300 0315 0062;
+0061 0315 0300 05AE 06D8 0062;00E0 05AE 06D8 0315 0062;0061 05AE 0300 06D8 0315 0062;00E0 05AE 06D8 0315 0062;0061 05AE 0300 06D8 0315 0062;
+0061 06D8 0315 0300 05AE 0062;0061 05AE 06D8 0300 0315 0062;0061 05AE 06D8 0300 0315 0062;0061 05AE 06D8 0300 0315 0062;0061 05AE 06D8 0300 0315 0062;
+0061 0315 0300 05AE 06D9 0062;00E0 05AE 06D9 0315 0062;0061 05AE 0300 06D9 0315 0062;00E0 05AE 06D9 0315 0062;0061 05AE 0300 06D9 0315 0062;
+0061 06D9 0315 0300 05AE 0062;0061 05AE 06D9 0300 0315 0062;0061 05AE 06D9 0300 0315 0062;0061 05AE 06D9 0300 0315 0062;0061 05AE 06D9 0300 0315 0062;
+0061 0315 0300 05AE 06DA 0062;00E0 05AE 06DA 0315 0062;0061 05AE 0300 06DA 0315 0062;00E0 05AE 06DA 0315 0062;0061 05AE 0300 06DA 0315 0062;
+0061 06DA 0315 0300 05AE 0062;0061 05AE 06DA 0300 0315 0062;0061 05AE 06DA 0300 0315 0062;0061 05AE 06DA 0300 0315 0062;0061 05AE 06DA 0300 0315 0062;
+0061 0315 0300 05AE 06DB 0062;00E0 05AE 06DB 0315 0062;0061 05AE 0300 06DB 0315 0062;00E0 05AE 06DB 0315 0062;0061 05AE 0300 06DB 0315 0062;
+0061 06DB 0315 0300 05AE 0062;0061 05AE 06DB 0300 0315 0062;0061 05AE 06DB 0300 0315 0062;0061 05AE 06DB 0300 0315 0062;0061 05AE 06DB 0300 0315 0062;
+0061 0315 0300 05AE 06DC 0062;00E0 05AE 06DC 0315 0062;0061 05AE 0300 06DC 0315 0062;00E0 05AE 06DC 0315 0062;0061 05AE 0300 06DC 0315 0062;
+0061 06DC 0315 0300 05AE 0062;0061 05AE 06DC 0300 0315 0062;0061 05AE 06DC 0300 0315 0062;0061 05AE 06DC 0300 0315 0062;0061 05AE 06DC 0300 0315 0062;
+0061 0315 0300 05AE 06DF 0062;00E0 05AE 06DF 0315 0062;0061 05AE 0300 06DF 0315 0062;00E0 05AE 06DF 0315 0062;0061 05AE 0300 06DF 0315 0062;
+0061 06DF 0315 0300 05AE 0062;0061 05AE 06DF 0300 0315 0062;0061 05AE 06DF 0300 0315 0062;0061 05AE 06DF 0300 0315 0062;0061 05AE 06DF 0300 0315 0062;
+0061 0315 0300 05AE 06E0 0062;00E0 05AE 06E0 0315 0062;0061 05AE 0300 06E0 0315 0062;00E0 05AE 06E0 0315 0062;0061 05AE 0300 06E0 0315 0062;
+0061 06E0 0315 0300 05AE 0062;0061 05AE 06E0 0300 0315 0062;0061 05AE 06E0 0300 0315 0062;0061 05AE 06E0 0300 0315 0062;0061 05AE 06E0 0300 0315 0062;
+0061 0315 0300 05AE 06E1 0062;00E0 05AE 06E1 0315 0062;0061 05AE 0300 06E1 0315 0062;00E0 05AE 06E1 0315 0062;0061 05AE 0300 06E1 0315 0062;
+0061 06E1 0315 0300 05AE 0062;0061 05AE 06E1 0300 0315 0062;0061 05AE 06E1 0300 0315 0062;0061 05AE 06E1 0300 0315 0062;0061 05AE 06E1 0300 0315 0062;
+0061 0315 0300 05AE 06E2 0062;00E0 05AE 06E2 0315 0062;0061 05AE 0300 06E2 0315 0062;00E0 05AE 06E2 0315 0062;0061 05AE 0300 06E2 0315 0062;
+0061 06E2 0315 0300 05AE 0062;0061 05AE 06E2 0300 0315 0062;0061 05AE 06E2 0300 0315 0062;0061 05AE 06E2 0300 0315 0062;0061 05AE 06E2 0300 0315 0062;
+0061 059A 0316 302A 06E3 0062;0061 302A 0316 06E3 059A 0062;0061 302A 0316 06E3 059A 0062;0061 302A 0316 06E3 059A 0062;0061 302A 0316 06E3 059A 0062;
+0061 06E3 059A 0316 302A 0062;0061 302A 06E3 0316 059A 0062;0061 302A 06E3 0316 059A 0062;0061 302A 06E3 0316 059A 0062;0061 302A 06E3 0316 059A 0062;
+0061 0315 0300 05AE 06E4 0062;00E0 05AE 06E4 0315 0062;0061 05AE 0300 06E4 0315 0062;00E0 05AE 06E4 0315 0062;0061 05AE 0300 06E4 0315 0062;
+0061 06E4 0315 0300 05AE 0062;0061 05AE 06E4 0300 0315 0062;0061 05AE 06E4 0300 0315 0062;0061 05AE 06E4 0300 0315 0062;0061 05AE 06E4 0300 0315 0062;
+0061 0315 0300 05AE 06E7 0062;00E0 05AE 06E7 0315 0062;0061 05AE 0300 06E7 0315 0062;00E0 05AE 06E7 0315 0062;0061 05AE 0300 06E7 0315 0062;
+0061 06E7 0315 0300 05AE 0062;0061 05AE 06E7 0300 0315 0062;0061 05AE 06E7 0300 0315 0062;0061 05AE 06E7 0300 0315 0062;0061 05AE 06E7 0300 0315 0062;
+0061 0315 0300 05AE 06E8 0062;00E0 05AE 06E8 0315 0062;0061 05AE 0300 06E8 0315 0062;00E0 05AE 06E8 0315 0062;0061 05AE 0300 06E8 0315 0062;
+0061 06E8 0315 0300 05AE 0062;0061 05AE 06E8 0300 0315 0062;0061 05AE 06E8 0300 0315 0062;0061 05AE 06E8 0300 0315 0062;0061 05AE 06E8 0300 0315 0062;
+0061 059A 0316 302A 06EA 0062;0061 302A 0316 06EA 059A 0062;0061 302A 0316 06EA 059A 0062;0061 302A 0316 06EA 059A 0062;0061 302A 0316 06EA 059A 0062;
+0061 06EA 059A 0316 302A 0062;0061 302A 06EA 0316 059A 0062;0061 302A 06EA 0316 059A 0062;0061 302A 06EA 0316 059A 0062;0061 302A 06EA 0316 059A 0062;
+0061 0315 0300 05AE 06EB 0062;00E0 05AE 06EB 0315 0062;0061 05AE 0300 06EB 0315 0062;00E0 05AE 06EB 0315 0062;0061 05AE 0300 06EB 0315 0062;
+0061 06EB 0315 0300 05AE 0062;0061 05AE 06EB 0300 0315 0062;0061 05AE 06EB 0300 0315 0062;0061 05AE 06EB 0300 0315 0062;0061 05AE 06EB 0300 0315 0062;
+0061 0315 0300 05AE 06EC 0062;00E0 05AE 06EC 0315 0062;0061 05AE 0300 06EC 0315 0062;00E0 05AE 06EC 0315 0062;0061 05AE 0300 06EC 0315 0062;
+0061 06EC 0315 0300 05AE 0062;0061 05AE 06EC 0300 0315 0062;0061 05AE 06EC 0300 0315 0062;0061 05AE 06EC 0300 0315 0062;0061 05AE 06EC 0300 0315 0062;
+0061 059A 0316 302A 06ED 0062;0061 302A 0316 06ED 059A 0062;0061 302A 0316 06ED 059A 0062;0061 302A 0316 06ED 059A 0062;0061 302A 0316 06ED 059A 0062;
+0061 06ED 059A 0316 302A 0062;0061 302A 06ED 0316 059A 0062;0061 302A 06ED 0316 059A 0062;0061 302A 06ED 0316 059A 0062;0061 302A 06ED 0316 059A 0062;
+0061 0C55 0711 0670 0711 0062;0061 0670 0711 0711 0C55 0062;0061 0670 0711 0711 0C55 0062;0061 0670 0711 0711 0C55 0062;0061 0670 0711 0711 0C55 0062;
+0061 0711 0C55 0711 0670 0062;0061 0670 0711 0711 0C55 0062;0061 0670 0711 0711 0C55 0062;0061 0670 0711 0711 0C55 0062;0061 0670 0711 0711 0C55 0062;
+0061 0315 0300 05AE 0730 0062;00E0 05AE 0730 0315 0062;0061 05AE 0300 0730 0315 0062;00E0 05AE 0730 0315 0062;0061 05AE 0300 0730 0315 0062;
+0061 0730 0315 0300 05AE 0062;0061 05AE 0730 0300 0315 0062;0061 05AE 0730 0300 0315 0062;0061 05AE 0730 0300 0315 0062;0061 05AE 0730 0300 0315 0062;
+0061 059A 0316 302A 0731 0062;0061 302A 0316 0731 059A 0062;0061 302A 0316 0731 059A 0062;0061 302A 0316 0731 059A 0062;0061 302A 0316 0731 059A 0062;
+0061 0731 059A 0316 302A 0062;0061 302A 0731 0316 059A 0062;0061 302A 0731 0316 059A 0062;0061 302A 0731 0316 059A 0062;0061 302A 0731 0316 059A 0062;
+0061 0315 0300 05AE 0732 0062;00E0 05AE 0732 0315 0062;0061 05AE 0300 0732 0315 0062;00E0 05AE 0732 0315 0062;0061 05AE 0300 0732 0315 0062;
+0061 0732 0315 0300 05AE 0062;0061 05AE 0732 0300 0315 0062;0061 05AE 0732 0300 0315 0062;0061 05AE 0732 0300 0315 0062;0061 05AE 0732 0300 0315 0062;
+0061 0315 0300 05AE 0733 0062;00E0 05AE 0733 0315 0062;0061 05AE 0300 0733 0315 0062;00E0 05AE 0733 0315 0062;0061 05AE 0300 0733 0315 0062;
+0061 0733 0315 0300 05AE 0062;0061 05AE 0733 0300 0315 0062;0061 05AE 0733 0300 0315 0062;0061 05AE 0733 0300 0315 0062;0061 05AE 0733 0300 0315 0062;
+0061 059A 0316 302A 0734 0062;0061 302A 0316 0734 059A 0062;0061 302A 0316 0734 059A 0062;0061 302A 0316 0734 059A 0062;0061 302A 0316 0734 059A 0062;
+0061 0734 059A 0316 302A 0062;0061 302A 0734 0316 059A 0062;0061 302A 0734 0316 059A 0062;0061 302A 0734 0316 059A 0062;0061 302A 0734 0316 059A 0062;
+0061 0315 0300 05AE 0735 0062;00E0 05AE 0735 0315 0062;0061 05AE 0300 0735 0315 0062;00E0 05AE 0735 0315 0062;0061 05AE 0300 0735 0315 0062;
+0061 0735 0315 0300 05AE 0062;0061 05AE 0735 0300 0315 0062;0061 05AE 0735 0300 0315 0062;0061 05AE 0735 0300 0315 0062;0061 05AE 0735 0300 0315 0062;
+0061 0315 0300 05AE 0736 0062;00E0 05AE 0736 0315 0062;0061 05AE 0300 0736 0315 0062;00E0 05AE 0736 0315 0062;0061 05AE 0300 0736 0315 0062;
+0061 0736 0315 0300 05AE 0062;0061 05AE 0736 0300 0315 0062;0061 05AE 0736 0300 0315 0062;0061 05AE 0736 0300 0315 0062;0061 05AE 0736 0300 0315 0062;
+0061 059A 0316 302A 0737 0062;0061 302A 0316 0737 059A 0062;0061 302A 0316 0737 059A 0062;0061 302A 0316 0737 059A 0062;0061 302A 0316 0737 059A 0062;
+0061 0737 059A 0316 302A 0062;0061 302A 0737 0316 059A 0062;0061 302A 0737 0316 059A 0062;0061 302A 0737 0316 059A 0062;0061 302A 0737 0316 059A 0062;
+0061 059A 0316 302A 0738 0062;0061 302A 0316 0738 059A 0062;0061 302A 0316 0738 059A 0062;0061 302A 0316 0738 059A 0062;0061 302A 0316 0738 059A 0062;
+0061 0738 059A 0316 302A 0062;0061 302A 0738 0316 059A 0062;0061 302A 0738 0316 059A 0062;0061 302A 0738 0316 059A 0062;0061 302A 0738 0316 059A 0062;
+0061 059A 0316 302A 0739 0062;0061 302A 0316 0739 059A 0062;0061 302A 0316 0739 059A 0062;0061 302A 0316 0739 059A 0062;0061 302A 0316 0739 059A 0062;
+0061 0739 059A 0316 302A 0062;0061 302A 0739 0316 059A 0062;0061 302A 0739 0316 059A 0062;0061 302A 0739 0316 059A 0062;0061 302A 0739 0316 059A 0062;
+0061 0315 0300 05AE 073A 0062;00E0 05AE 073A 0315 0062;0061 05AE 0300 073A 0315 0062;00E0 05AE 073A 0315 0062;0061 05AE 0300 073A 0315 0062;
+0061 073A 0315 0300 05AE 0062;0061 05AE 073A 0300 0315 0062;0061 05AE 073A 0300 0315 0062;0061 05AE 073A 0300 0315 0062;0061 05AE 073A 0300 0315 0062;
+0061 059A 0316 302A 073B 0062;0061 302A 0316 073B 059A 0062;0061 302A 0316 073B 059A 0062;0061 302A 0316 073B 059A 0062;0061 302A 0316 073B 059A 0062;
+0061 073B 059A 0316 302A 0062;0061 302A 073B 0316 059A 0062;0061 302A 073B 0316 059A 0062;0061 302A 073B 0316 059A 0062;0061 302A 073B 0316 059A 0062;
+0061 059A 0316 302A 073C 0062;0061 302A 0316 073C 059A 0062;0061 302A 0316 073C 059A 0062;0061 302A 0316 073C 059A 0062;0061 302A 0316 073C 059A 0062;
+0061 073C 059A 0316 302A 0062;0061 302A 073C 0316 059A 0062;0061 302A 073C 0316 059A 0062;0061 302A 073C 0316 059A 0062;0061 302A 073C 0316 059A 0062;
+0061 0315 0300 05AE 073D 0062;00E0 05AE 073D 0315 0062;0061 05AE 0300 073D 0315 0062;00E0 05AE 073D 0315 0062;0061 05AE 0300 073D 0315 0062;
+0061 073D 0315 0300 05AE 0062;0061 05AE 073D 0300 0315 0062;0061 05AE 073D 0300 0315 0062;0061 05AE 073D 0300 0315 0062;0061 05AE 073D 0300 0315 0062;
+0061 059A 0316 302A 073E 0062;0061 302A 0316 073E 059A 0062;0061 302A 0316 073E 059A 0062;0061 302A 0316 073E 059A 0062;0061 302A 0316 073E 059A 0062;
+0061 073E 059A 0316 302A 0062;0061 302A 073E 0316 059A 0062;0061 302A 073E 0316 059A 0062;0061 302A 073E 0316 059A 0062;0061 302A 073E 0316 059A 0062;
+0061 0315 0300 05AE 073F 0062;00E0 05AE 073F 0315 0062;0061 05AE 0300 073F 0315 0062;00E0 05AE 073F 0315 0062;0061 05AE 0300 073F 0315 0062;
+0061 073F 0315 0300 05AE 0062;0061 05AE 073F 0300 0315 0062;0061 05AE 073F 0300 0315 0062;0061 05AE 073F 0300 0315 0062;0061 05AE 073F 0300 0315 0062;
+0061 0315 0300 05AE 0740 0062;00E0 05AE 0740 0315 0062;0061 05AE 0300 0740 0315 0062;00E0 05AE 0740 0315 0062;0061 05AE 0300 0740 0315 0062;
+0061 0740 0315 0300 05AE 0062;0061 05AE 0740 0300 0315 0062;0061 05AE 0740 0300 0315 0062;0061 05AE 0740 0300 0315 0062;0061 05AE 0740 0300 0315 0062;
+0061 0315 0300 05AE 0741 0062;00E0 05AE 0741 0315 0062;0061 05AE 0300 0741 0315 0062;00E0 05AE 0741 0315 0062;0061 05AE 0300 0741 0315 0062;
+0061 0741 0315 0300 05AE 0062;0061 05AE 0741 0300 0315 0062;0061 05AE 0741 0300 0315 0062;0061 05AE 0741 0300 0315 0062;0061 05AE 0741 0300 0315 0062;
+0061 059A 0316 302A 0742 0062;0061 302A 0316 0742 059A 0062;0061 302A 0316 0742 059A 0062;0061 302A 0316 0742 059A 0062;0061 302A 0316 0742 059A 0062;
+0061 0742 059A 0316 302A 0062;0061 302A 0742 0316 059A 0062;0061 302A 0742 0316 059A 0062;0061 302A 0742 0316 059A 0062;0061 302A 0742 0316 059A 0062;
+0061 0315 0300 05AE 0743 0062;00E0 05AE 0743 0315 0062;0061 05AE 0300 0743 0315 0062;00E0 05AE 0743 0315 0062;0061 05AE 0300 0743 0315 0062;
+0061 0743 0315 0300 05AE 0062;0061 05AE 0743 0300 0315 0062;0061 05AE 0743 0300 0315 0062;0061 05AE 0743 0300 0315 0062;0061 05AE 0743 0300 0315 0062;
+0061 059A 0316 302A 0744 0062;0061 302A 0316 0744 059A 0062;0061 302A 0316 0744 059A 0062;0061 302A 0316 0744 059A 0062;0061 302A 0316 0744 059A 0062;
+0061 0744 059A 0316 302A 0062;0061 302A 0744 0316 059A 0062;0061 302A 0744 0316 059A 0062;0061 302A 0744 0316 059A 0062;0061 302A 0744 0316 059A 0062;
+0061 0315 0300 05AE 0745 0062;00E0 05AE 0745 0315 0062;0061 05AE 0300 0745 0315 0062;00E0 05AE 0745 0315 0062;0061 05AE 0300 0745 0315 0062;
+0061 0745 0315 0300 05AE 0062;0061 05AE 0745 0300 0315 0062;0061 05AE 0745 0300 0315 0062;0061 05AE 0745 0300 0315 0062;0061 05AE 0745 0300 0315 0062;
+0061 059A 0316 302A 0746 0062;0061 302A 0316 0746 059A 0062;0061 302A 0316 0746 059A 0062;0061 302A 0316 0746 059A 0062;0061 302A 0316 0746 059A 0062;
+0061 0746 059A 0316 302A 0062;0061 302A 0746 0316 059A 0062;0061 302A 0746 0316 059A 0062;0061 302A 0746 0316 059A 0062;0061 302A 0746 0316 059A 0062;
+0061 0315 0300 05AE 0747 0062;00E0 05AE 0747 0315 0062;0061 05AE 0300 0747 0315 0062;00E0 05AE 0747 0315 0062;0061 05AE 0300 0747 0315 0062;
+0061 0747 0315 0300 05AE 0062;0061 05AE 0747 0300 0315 0062;0061 05AE 0747 0300 0315 0062;0061 05AE 0747 0300 0315 0062;0061 05AE 0747 0300 0315 0062;
+0061 059A 0316 302A 0748 0062;0061 302A 0316 0748 059A 0062;0061 302A 0316 0748 059A 0062;0061 302A 0316 0748 059A 0062;0061 302A 0316 0748 059A 0062;
+0061 0748 059A 0316 302A 0062;0061 302A 0748 0316 059A 0062;0061 302A 0748 0316 059A 0062;0061 302A 0748 0316 059A 0062;0061 302A 0748 0316 059A 0062;
+0061 0315 0300 05AE 0749 0062;00E0 05AE 0749 0315 0062;0061 05AE 0300 0749 0315 0062;00E0 05AE 0749 0315 0062;0061 05AE 0300 0749 0315 0062;
+0061 0749 0315 0300 05AE 0062;0061 05AE 0749 0300 0315 0062;0061 05AE 0749 0300 0315 0062;0061 05AE 0749 0300 0315 0062;0061 05AE 0749 0300 0315 0062;
+0061 0315 0300 05AE 074A 0062;00E0 05AE 074A 0315 0062;0061 05AE 0300 074A 0315 0062;00E0 05AE 074A 0315 0062;0061 05AE 0300 074A 0315 0062;
+0061 074A 0315 0300 05AE 0062;0061 05AE 074A 0300 0315 0062;0061 05AE 074A 0300 0315 0062;0061 05AE 074A 0300 0315 0062;0061 05AE 074A 0300 0315 0062;
+0061 3099 093C 0334 093C 0062;0061 0334 093C 093C 3099 0062;0061 0334 093C 093C 3099 0062;0061 0334 093C 093C 3099 0062;0061 0334 093C 093C 3099 0062;
+0061 093C 3099 093C 0334 0062;0061 0334 093C 093C 3099 0062;0061 0334 093C 093C 3099 0062;0061 0334 093C 093C 3099 0062;0061 0334 093C 093C 3099 0062;
+0061 05B0 094D 3099 094D 0062;0061 3099 094D 094D 05B0 0062;0061 3099 094D 094D 05B0 0062;0061 3099 094D 094D 05B0 0062;0061 3099 094D 094D 05B0 0062;
+0061 094D 05B0 094D 3099 0062;0061 3099 094D 094D 05B0 0062;0061 3099 094D 094D 05B0 0062;0061 3099 094D 094D 05B0 0062;0061 3099 094D 094D 05B0 0062;
+0061 0315 0300 05AE 0951 0062;00E0 05AE 0951 0315 0062;0061 05AE 0300 0951 0315 0062;00E0 05AE 0951 0315 0062;0061 05AE 0300 0951 0315 0062;
+0061 0951 0315 0300 05AE 0062;0061 05AE 0951 0300 0315 0062;0061 05AE 0951 0300 0315 0062;0061 05AE 0951 0300 0315 0062;0061 05AE 0951 0300 0315 0062;
+0061 059A 0316 302A 0952 0062;0061 302A 0316 0952 059A 0062;0061 302A 0316 0952 059A 0062;0061 302A 0316 0952 059A 0062;0061 302A 0316 0952 059A 0062;
+0061 0952 059A 0316 302A 0062;0061 302A 0952 0316 059A 0062;0061 302A 0952 0316 059A 0062;0061 302A 0952 0316 059A 0062;0061 302A 0952 0316 059A 0062;
+0061 0315 0300 05AE 0953 0062;00E0 05AE 0953 0315 0062;0061 05AE 0300 0953 0315 0062;00E0 05AE 0953 0315 0062;0061 05AE 0300 0953 0315 0062;
+0061 0953 0315 0300 05AE 0062;0061 05AE 0953 0300 0315 0062;0061 05AE 0953 0300 0315 0062;0061 05AE 0953 0300 0315 0062;0061 05AE 0953 0300 0315 0062;
+0061 0315 0300 05AE 0954 0062;00E0 05AE 0954 0315 0062;0061 05AE 0300 0954 0315 0062;00E0 05AE 0954 0315 0062;0061 05AE 0300 0954 0315 0062;
+0061 0954 0315 0300 05AE 0062;0061 05AE 0954 0300 0315 0062;0061 05AE 0954 0300 0315 0062;0061 05AE 0954 0300 0315 0062;0061 05AE 0954 0300 0315 0062;
+0061 3099 093C 0334 09BC 0062;0061 0334 093C 09BC 3099 0062;0061 0334 093C 09BC 3099 0062;0061 0334 093C 09BC 3099 0062;0061 0334 093C 09BC 3099 0062;
+0061 09BC 3099 093C 0334 0062;0061 0334 09BC 093C 3099 0062;0061 0334 09BC 093C 3099 0062;0061 0334 09BC 093C 3099 0062;0061 0334 09BC 093C 3099 0062;
+0061 05B0 094D 3099 09CD 0062;0061 3099 094D 09CD 05B0 0062;0061 3099 094D 09CD 05B0 0062;0061 3099 094D 09CD 05B0 0062;0061 3099 094D 09CD 05B0 0062;
+0061 09CD 05B0 094D 3099 0062;0061 3099 09CD 094D 05B0 0062;0061 3099 09CD 094D 05B0 0062;0061 3099 09CD 094D 05B0 0062;0061 3099 09CD 094D 05B0 0062;
+0061 3099 093C 0334 0A3C 0062;0061 0334 093C 0A3C 3099 0062;0061 0334 093C 0A3C 3099 0062;0061 0334 093C 0A3C 3099 0062;0061 0334 093C 0A3C 3099 0062;
+0061 0A3C 3099 093C 0334 0062;0061 0334 0A3C 093C 3099 0062;0061 0334 0A3C 093C 3099 0062;0061 0334 0A3C 093C 3099 0062;0061 0334 0A3C 093C 3099 0062;
+0061 05B0 094D 3099 0A4D 0062;0061 3099 094D 0A4D 05B0 0062;0061 3099 094D 0A4D 05B0 0062;0061 3099 094D 0A4D 05B0 0062;0061 3099 094D 0A4D 05B0 0062;
+0061 0A4D 05B0 094D 3099 0062;0061 3099 0A4D 094D 05B0 0062;0061 3099 0A4D 094D 05B0 0062;0061 3099 0A4D 094D 05B0 0062;0061 3099 0A4D 094D 05B0 0062;
+0061 3099 093C 0334 0ABC 0062;0061 0334 093C 0ABC 3099 0062;0061 0334 093C 0ABC 3099 0062;0061 0334 093C 0ABC 3099 0062;0061 0334 093C 0ABC 3099 0062;
+0061 0ABC 3099 093C 0334 0062;0061 0334 0ABC 093C 3099 0062;0061 0334 0ABC 093C 3099 0062;0061 0334 0ABC 093C 3099 0062;0061 0334 0ABC 093C 3099 0062;
+0061 05B0 094D 3099 0ACD 0062;0061 3099 094D 0ACD 05B0 0062;0061 3099 094D 0ACD 05B0 0062;0061 3099 094D 0ACD 05B0 0062;0061 3099 094D 0ACD 05B0 0062;
+0061 0ACD 05B0 094D 3099 0062;0061 3099 0ACD 094D 05B0 0062;0061 3099 0ACD 094D 05B0 0062;0061 3099 0ACD 094D 05B0 0062;0061 3099 0ACD 094D 05B0 0062;
+0061 3099 093C 0334 0B3C 0062;0061 0334 093C 0B3C 3099 0062;0061 0334 093C 0B3C 3099 0062;0061 0334 093C 0B3C 3099 0062;0061 0334 093C 0B3C 3099 0062;
+0061 0B3C 3099 093C 0334 0062;0061 0334 0B3C 093C 3099 0062;0061 0334 0B3C 093C 3099 0062;0061 0334 0B3C 093C 3099 0062;0061 0334 0B3C 093C 3099 0062;
+0061 05B0 094D 3099 0B4D 0062;0061 3099 094D 0B4D 05B0 0062;0061 3099 094D 0B4D 05B0 0062;0061 3099 094D 0B4D 05B0 0062;0061 3099 094D 0B4D 05B0 0062;
+0061 0B4D 05B0 094D 3099 0062;0061 3099 0B4D 094D 05B0 0062;0061 3099 0B4D 094D 05B0 0062;0061 3099 0B4D 094D 05B0 0062;0061 3099 0B4D 094D 05B0 0062;
+0061 05B0 094D 3099 0BCD 0062;0061 3099 094D 0BCD 05B0 0062;0061 3099 094D 0BCD 05B0 0062;0061 3099 094D 0BCD 05B0 0062;0061 3099 094D 0BCD 05B0 0062;
+0061 0BCD 05B0 094D 3099 0062;0061 3099 0BCD 094D 05B0 0062;0061 3099 0BCD 094D 05B0 0062;0061 3099 0BCD 094D 05B0 0062;0061 3099 0BCD 094D 05B0 0062;
+0061 05B0 094D 3099 0C4D 0062;0061 3099 094D 0C4D 05B0 0062;0061 3099 094D 0C4D 05B0 0062;0061 3099 094D 0C4D 05B0 0062;0061 3099 094D 0C4D 05B0 0062;
+0061 0C4D 05B0 094D 3099 0062;0061 3099 0C4D 094D 05B0 0062;0061 3099 0C4D 094D 05B0 0062;0061 3099 0C4D 094D 05B0 0062;0061 3099 0C4D 094D 05B0 0062;
+0061 0C56 0C55 0711 0C55 0062;0061 0711 0C55 0C55 0C56 0062;0061 0711 0C55 0C55 0C56 0062;0061 0711 0C55 0C55 0C56 0062;0061 0711 0C55 0C55 0C56 0062;
+0061 0C55 0C56 0C55 0711 0062;0061 0711 0C55 0C55 0C56 0062;0061 0711 0C55 0C55 0C56 0062;0061 0711 0C55 0C55 0C56 0062;0061 0711 0C55 0C55 0C56 0062;
+0061 0E38 0C56 0C55 0C56 0062;0061 0C55 0C56 0C56 0E38 0062;0061 0C55 0C56 0C56 0E38 0062;0061 0C55 0C56 0C56 0E38 0062;0061 0C55 0C56 0C56 0E38 0062;
+0061 0C56 0E38 0C56 0C55 0062;0061 0C55 0C56 0C56 0E38 0062;0061 0C55 0C56 0C56 0E38 0062;0061 0C55 0C56 0C56 0E38 0062;0061 0C55 0C56 0C56 0E38 0062;
+0061 05B0 094D 3099 0CCD 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062;
+0061 0CCD 05B0 094D 3099 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062;
+0061 05B0 094D 3099 0D4D 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062;
+0061 0D4D 05B0 094D 3099 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062;
+0061 05B0 094D 3099 0DCA 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062;
+0061 0DCA 05B0 094D 3099 0062;0061 3099 0DCA 094D 05B0 0062;0061 3099 0DCA 094D 05B0 0062;0061 3099 0DCA 094D 05B0 0062;0061 3099 0DCA 094D 05B0 0062;
+0061 0E48 0E38 0C56 0E38 0062;0061 0C56 0E38 0E38 0E48 0062;0061 0C56 0E38 0E38 0E48 0062;0061 0C56 0E38 0E38 0E48 0062;0061 0C56 0E38 0E38 0E48 0062;
+0061 0E38 0E48 0E38 0C56 0062;0061 0C56 0E38 0E38 0E48 0062;0061 0C56 0E38 0E38 0E48 0062;0061 0C56 0E38 0E38 0E48 0062;0061 0C56 0E38 0E38 0E48 0062;
+0061 0E48 0E38 0C56 0E39 0062;0061 0C56 0E38 0E39 0E48 0062;0061 0C56 0E38 0E39 0E48 0062;0061 0C56 0E38 0E39 0E48 0062;0061 0C56 0E38 0E39 0E48 0062;
+0061 0E39 0E48 0E38 0C56 0062;0061 0C56 0E39 0E38 0E48 0062;0061 0C56 0E39 0E38 0E48 0062;0061 0C56 0E39 0E38 0E48 0062;0061 0C56 0E39 0E38 0E48 0062;
+0061 05B0 094D 3099 0E3A 0062;0061 3099 094D 0E3A 05B0 0062;0061 3099 094D 0E3A 05B0 0062;0061 3099 094D 0E3A 05B0 0062;0061 3099 094D 0E3A 05B0 0062;
+0061 0E3A 05B0 094D 3099 0062;0061 3099 0E3A 094D 05B0 0062;0061 3099 0E3A 094D 05B0 0062;0061 3099 0E3A 094D 05B0 0062;0061 3099 0E3A 094D 05B0 0062;
+0061 0EB8 0E48 0E38 0E48 0062;0061 0E38 0E48 0E48 0EB8 0062;0061 0E38 0E48 0E48 0EB8 0062;0061 0E38 0E48 0E48 0EB8 0062;0061 0E38 0E48 0E48 0EB8 0062;
+0061 0E48 0EB8 0E48 0E38 0062;0061 0E38 0E48 0E48 0EB8 0062;0061 0E38 0E48 0E48 0EB8 0062;0061 0E38 0E48 0E48 0EB8 0062;0061 0E38 0E48 0E48 0EB8 0062;
+0061 0EB8 0E48 0E38 0E49 0062;0061 0E38 0E48 0E49 0EB8 0062;0061 0E38 0E48 0E49 0EB8 0062;0061 0E38 0E48 0E49 0EB8 0062;0061 0E38 0E48 0E49 0EB8 0062;
+0061 0E49 0EB8 0E48 0E38 0062;0061 0E38 0E49 0E48 0EB8 0062;0061 0E38 0E49 0E48 0EB8 0062;0061 0E38 0E49 0E48 0EB8 0062;0061 0E38 0E49 0E48 0EB8 0062;
+0061 0EB8 0E48 0E38 0E4A 0062;0061 0E38 0E48 0E4A 0EB8 0062;0061 0E38 0E48 0E4A 0EB8 0062;0061 0E38 0E48 0E4A 0EB8 0062;0061 0E38 0E48 0E4A 0EB8 0062;
+0061 0E4A 0EB8 0E48 0E38 0062;0061 0E38 0E4A 0E48 0EB8 0062;0061 0E38 0E4A 0E48 0EB8 0062;0061 0E38 0E4A 0E48 0EB8 0062;0061 0E38 0E4A 0E48 0EB8 0062;
+0061 0EB8 0E48 0E38 0E4B 0062;0061 0E38 0E48 0E4B 0EB8 0062;0061 0E38 0E48 0E4B 0EB8 0062;0061 0E38 0E48 0E4B 0EB8 0062;0061 0E38 0E48 0E4B 0EB8 0062;
+0061 0E4B 0EB8 0E48 0E38 0062;0061 0E38 0E4B 0E48 0EB8 0062;0061 0E38 0E4B 0E48 0EB8 0062;0061 0E38 0E4B 0E48 0EB8 0062;0061 0E38 0E4B 0E48 0EB8 0062;
+0061 0EC8 0EB8 0E48 0EB8 0062;0061 0E48 0EB8 0EB8 0EC8 0062;0061 0E48 0EB8 0EB8 0EC8 0062;0061 0E48 0EB8 0EB8 0EC8 0062;0061 0E48 0EB8 0EB8 0EC8 0062;
+0061 0EB8 0EC8 0EB8 0E48 0062;0061 0E48 0EB8 0EB8 0EC8 0062;0061 0E48 0EB8 0EB8 0EC8 0062;0061 0E48 0EB8 0EB8 0EC8 0062;0061 0E48 0EB8 0EB8 0EC8 0062;
+0061 0EC8 0EB8 0E48 0EB9 0062;0061 0E48 0EB8 0EB9 0EC8 0062;0061 0E48 0EB8 0EB9 0EC8 0062;0061 0E48 0EB8 0EB9 0EC8 0062;0061 0E48 0EB8 0EB9 0EC8 0062;
+0061 0EB9 0EC8 0EB8 0E48 0062;0061 0E48 0EB9 0EB8 0EC8 0062;0061 0E48 0EB9 0EB8 0EC8 0062;0061 0E48 0EB9 0EB8 0EC8 0062;0061 0E48 0EB9 0EB8 0EC8 0062;
+0061 0F71 0EC8 0EB8 0EC8 0062;0061 0EB8 0EC8 0EC8 0F71 0062;0061 0EB8 0EC8 0EC8 0F71 0062;0061 0EB8 0EC8 0EC8 0F71 0062;0061 0EB8 0EC8 0EC8 0F71 0062;
+0061 0EC8 0F71 0EC8 0EB8 0062;0061 0EB8 0EC8 0EC8 0F71 0062;0061 0EB8 0EC8 0EC8 0F71 0062;0061 0EB8 0EC8 0EC8 0F71 0062;0061 0EB8 0EC8 0EC8 0F71 0062;
+0061 0F71 0EC8 0EB8 0EC9 0062;0061 0EB8 0EC8 0EC9 0F71 0062;0061 0EB8 0EC8 0EC9 0F71 0062;0061 0EB8 0EC8 0EC9 0F71 0062;0061 0EB8 0EC8 0EC9 0F71 0062;
+0061 0EC9 0F71 0EC8 0EB8 0062;0061 0EB8 0EC9 0EC8 0F71 0062;0061 0EB8 0EC9 0EC8 0F71 0062;0061 0EB8 0EC9 0EC8 0F71 0062;0061 0EB8 0EC9 0EC8 0F71 0062;
+0061 0F71 0EC8 0EB8 0ECA 0062;0061 0EB8 0EC8 0ECA 0F71 0062;0061 0EB8 0EC8 0ECA 0F71 0062;0061 0EB8 0EC8 0ECA 0F71 0062;0061 0EB8 0EC8 0ECA 0F71 0062;
+0061 0ECA 0F71 0EC8 0EB8 0062;0061 0EB8 0ECA 0EC8 0F71 0062;0061 0EB8 0ECA 0EC8 0F71 0062;0061 0EB8 0ECA 0EC8 0F71 0062;0061 0EB8 0ECA 0EC8 0F71 0062;
+0061 0F71 0EC8 0EB8 0ECB 0062;0061 0EB8 0EC8 0ECB 0F71 0062;0061 0EB8 0EC8 0ECB 0F71 0062;0061 0EB8 0EC8 0ECB 0F71 0062;0061 0EB8 0EC8 0ECB 0F71 0062;
+0061 0ECB 0F71 0EC8 0EB8 0062;0061 0EB8 0ECB 0EC8 0F71 0062;0061 0EB8 0ECB 0EC8 0F71 0062;0061 0EB8 0ECB 0EC8 0F71 0062;0061 0EB8 0ECB 0EC8 0F71 0062;
+0061 059A 0316 302A 0F18 0062;0061 302A 0316 0F18 059A 0062;0061 302A 0316 0F18 059A 0062;0061 302A 0316 0F18 059A 0062;0061 302A 0316 0F18 059A 0062;
+0061 0F18 059A 0316 302A 0062;0061 302A 0F18 0316 059A 0062;0061 302A 0F18 0316 059A 0062;0061 302A 0F18 0316 059A 0062;0061 302A 0F18 0316 059A 0062;
+0061 059A 0316 302A 0F19 0062;0061 302A 0316 0F19 059A 0062;0061 302A 0316 0F19 059A 0062;0061 302A 0316 0F19 059A 0062;0061 302A 0316 0F19 059A 0062;
+0061 0F19 059A 0316 302A 0062;0061 302A 0F19 0316 059A 0062;0061 302A 0F19 0316 059A 0062;0061 302A 0F19 0316 059A 0062;0061 302A 0F19 0316 059A 0062;
+0061 059A 0316 302A 0F35 0062;0061 302A 0316 0F35 059A 0062;0061 302A 0316 0F35 059A 0062;0061 302A 0316 0F35 059A 0062;0061 302A 0316 0F35 059A 0062;
+0061 0F35 059A 0316 302A 0062;0061 302A 0F35 0316 059A 0062;0061 302A 0F35 0316 059A 0062;0061 302A 0F35 0316 059A 0062;0061 302A 0F35 0316 059A 0062;
+0061 059A 0316 302A 0F37 0062;0061 302A 0316 0F37 059A 0062;0061 302A 0316 0F37 059A 0062;0061 302A 0316 0F37 059A 0062;0061 302A 0316 0F37 059A 0062;
+0061 0F37 059A 0316 302A 0062;0061 302A 0F37 0316 059A 0062;0061 302A 0F37 0316 059A 0062;0061 302A 0F37 0316 059A 0062;0061 302A 0F37 0316 059A 0062;
+0061 302A 031B 0321 0F39 0062;0061 0321 031B 0F39 302A 0062;0061 0321 031B 0F39 302A 0062;0061 0321 031B 0F39 302A 0062;0061 0321 031B 0F39 302A 0062;
+0061 0F39 302A 031B 0321 0062;0061 0321 0F39 031B 302A 0062;0061 0321 0F39 031B 302A 0062;0061 0321 0F39 031B 302A 0062;0061 0321 0F39 031B 302A 0062;
+0061 0F72 0F71 0EC8 0F71 0062;0061 0EC8 0F71 0F71 0F72 0062;0061 0EC8 0F71 0F71 0F72 0062;0061 0EC8 0F71 0F71 0F72 0062;0061 0EC8 0F71 0F71 0F72 0062;
+0061 0F71 0F72 0F71 0EC8 0062;0061 0EC8 0F71 0F71 0F72 0062;0061 0EC8 0F71 0F71 0F72 0062;0061 0EC8 0F71 0F71 0F72 0062;0061 0EC8 0F71 0F71 0F72 0062;
+0061 0F74 0F72 0F71 0F72 0062;0061 0F71 0F72 0F72 0F74 0062;0061 0F71 0F72 0F72 0F74 0062;0061 0F71 0F72 0F72 0F74 0062;0061 0F71 0F72 0F72 0F74 0062;
+0061 0F72 0F74 0F72 0F71 0062;0061 0F71 0F72 0F72 0F74 0062;0061 0F71 0F72 0F72 0F74 0062;0061 0F71 0F72 0F72 0F74 0062;0061 0F71 0F72 0F72 0F74 0062;
+0061 0321 0F74 0F72 0F74 0062;0061 0F72 0F74 0F74 0321 0062;0061 0F72 0F74 0F74 0321 0062;0061 0F72 0F74 0F74 0321 0062;0061 0F72 0F74 0F74 0321 0062;
+0061 0F74 0321 0F74 0F72 0062;0061 0F72 0F74 0F74 0321 0062;0061 0F72 0F74 0F74 0321 0062;0061 0F72 0F74 0F74 0321 0062;0061 0F72 0F74 0F74 0321 0062;
+0061 0F74 0F72 0F71 0F7A 0062;0061 0F71 0F72 0F7A 0F74 0062;0061 0F71 0F72 0F7A 0F74 0062;0061 0F71 0F72 0F7A 0F74 0062;0061 0F71 0F72 0F7A 0F74 0062;
+0061 0F7A 0F74 0F72 0F71 0062;0061 0F71 0F7A 0F72 0F74 0062;0061 0F71 0F7A 0F72 0F74 0062;0061 0F71 0F7A 0F72 0F74 0062;0061 0F71 0F7A 0F72 0F74 0062;
+0061 0F74 0F72 0F71 0F7B 0062;0061 0F71 0F72 0F7B 0F74 0062;0061 0F71 0F72 0F7B 0F74 0062;0061 0F71 0F72 0F7B 0F74 0062;0061 0F71 0F72 0F7B 0F74 0062;
+0061 0F7B 0F74 0F72 0F71 0062;0061 0F71 0F7B 0F72 0F74 0062;0061 0F71 0F7B 0F72 0F74 0062;0061 0F71 0F7B 0F72 0F74 0062;0061 0F71 0F7B 0F72 0F74 0062;
+0061 0F74 0F72 0F71 0F7C 0062;0061 0F71 0F72 0F7C 0F74 0062;0061 0F71 0F72 0F7C 0F74 0062;0061 0F71 0F72 0F7C 0F74 0062;0061 0F71 0F72 0F7C 0F74 0062;
+0061 0F7C 0F74 0F72 0F71 0062;0061 0F71 0F7C 0F72 0F74 0062;0061 0F71 0F7C 0F72 0F74 0062;0061 0F71 0F7C 0F72 0F74 0062;0061 0F71 0F7C 0F72 0F74 0062;
+0061 0F74 0F72 0F71 0F7D 0062;0061 0F71 0F72 0F7D 0F74 0062;0061 0F71 0F72 0F7D 0F74 0062;0061 0F71 0F72 0F7D 0F74 0062;0061 0F71 0F72 0F7D 0F74 0062;
+0061 0F7D 0F74 0F72 0F71 0062;0061 0F71 0F7D 0F72 0F74 0062;0061 0F71 0F7D 0F72 0F74 0062;0061 0F71 0F7D 0F72 0F74 0062;0061 0F71 0F7D 0F72 0F74 0062;
+0061 0F74 0F72 0F71 0F80 0062;0061 0F71 0F72 0F80 0F74 0062;0061 0F71 0F72 0F80 0F74 0062;0061 0F71 0F72 0F80 0F74 0062;0061 0F71 0F72 0F80 0F74 0062;
+0061 0F80 0F74 0F72 0F71 0062;0061 0F71 0F80 0F72 0F74 0062;0061 0F71 0F80 0F72 0F74 0062;0061 0F71 0F80 0F72 0F74 0062;0061 0F71 0F80 0F72 0F74 0062;
+0061 0315 0300 05AE 0F82 0062;00E0 05AE 0F82 0315 0062;0061 05AE 0300 0F82 0315 0062;00E0 05AE 0F82 0315 0062;0061 05AE 0300 0F82 0315 0062;
+0061 0F82 0315 0300 05AE 0062;0061 05AE 0F82 0300 0315 0062;0061 05AE 0F82 0300 0315 0062;0061 05AE 0F82 0300 0315 0062;0061 05AE 0F82 0300 0315 0062;
+0061 0315 0300 05AE 0F83 0062;00E0 05AE 0F83 0315 0062;0061 05AE 0300 0F83 0315 0062;00E0 05AE 0F83 0315 0062;0061 05AE 0300 0F83 0315 0062;
+0061 0F83 0315 0300 05AE 0062;0061 05AE 0F83 0300 0315 0062;0061 05AE 0F83 0300 0315 0062;0061 05AE 0F83 0300 0315 0062;0061 05AE 0F83 0300 0315 0062;
+0061 05B0 094D 3099 0F84 0062;0061 3099 094D 0F84 05B0 0062;0061 3099 094D 0F84 05B0 0062;0061 3099 094D 0F84 05B0 0062;0061 3099 094D 0F84 05B0 0062;
+0061 0F84 05B0 094D 3099 0062;0061 3099 0F84 094D 05B0 0062;0061 3099 0F84 094D 05B0 0062;0061 3099 0F84 094D 05B0 0062;0061 3099 0F84 094D 05B0 0062;
+0061 0315 0300 05AE 0F86 0062;00E0 05AE 0F86 0315 0062;0061 05AE 0300 0F86 0315 0062;00E0 05AE 0F86 0315 0062;0061 05AE 0300 0F86 0315 0062;
+0061 0F86 0315 0300 05AE 0062;0061 05AE 0F86 0300 0315 0062;0061 05AE 0F86 0300 0315 0062;0061 05AE 0F86 0300 0315 0062;0061 05AE 0F86 0300 0315 0062;
+0061 0315 0300 05AE 0F87 0062;00E0 05AE 0F87 0315 0062;0061 05AE 0300 0F87 0315 0062;00E0 05AE 0F87 0315 0062;0061 05AE 0300 0F87 0315 0062;
+0061 0F87 0315 0300 05AE 0062;0061 05AE 0F87 0300 0315 0062;0061 05AE 0F87 0300 0315 0062;0061 05AE 0F87 0300 0315 0062;0061 05AE 0F87 0300 0315 0062;
+0061 059A 0316 302A 0FC6 0062;0061 302A 0316 0FC6 059A 0062;0061 302A 0316 0FC6 059A 0062;0061 302A 0316 0FC6 059A 0062;0061 302A 0316 0FC6 059A 0062;
+0061 0FC6 059A 0316 302A 0062;0061 302A 0FC6 0316 059A 0062;0061 302A 0FC6 0316 059A 0062;0061 302A 0FC6 0316 059A 0062;0061 302A 0FC6 0316 059A 0062;
+0061 3099 093C 0334 1037 0062;0061 0334 093C 1037 3099 0062;0061 0334 093C 1037 3099 0062;0061 0334 093C 1037 3099 0062;0061 0334 093C 1037 3099 0062;
+0061 1037 3099 093C 0334 0062;0061 0334 1037 093C 3099 0062;0061 0334 1037 093C 3099 0062;0061 0334 1037 093C 3099 0062;0061 0334 1037 093C 3099 0062;
+0061 05B0 094D 3099 1039 0062;0061 3099 094D 1039 05B0 0062;0061 3099 094D 1039 05B0 0062;0061 3099 094D 1039 05B0 0062;0061 3099 094D 1039 05B0 0062;
+0061 1039 05B0 094D 3099 0062;0061 3099 1039 094D 05B0 0062;0061 3099 1039 094D 05B0 0062;0061 3099 1039 094D 05B0 0062;0061 3099 1039 094D 05B0 0062;
+0061 05B0 094D 3099 1714 0062;0061 3099 094D 1714 05B0 0062;0061 3099 094D 1714 05B0 0062;0061 3099 094D 1714 05B0 0062;0061 3099 094D 1714 05B0 0062;
+0061 1714 05B0 094D 3099 0062;0061 3099 1714 094D 05B0 0062;0061 3099 1714 094D 05B0 0062;0061 3099 1714 094D 05B0 0062;0061 3099 1714 094D 05B0 0062;
+0061 05B0 094D 3099 1734 0062;0061 3099 094D 1734 05B0 0062;0061 3099 094D 1734 05B0 0062;0061 3099 094D 1734 05B0 0062;0061 3099 094D 1734 05B0 0062;
+0061 1734 05B0 094D 3099 0062;0061 3099 1734 094D 05B0 0062;0061 3099 1734 094D 05B0 0062;0061 3099 1734 094D 05B0 0062;0061 3099 1734 094D 05B0 0062;
+0061 05B0 094D 3099 17D2 0062;0061 3099 094D 17D2 05B0 0062;0061 3099 094D 17D2 05B0 0062;0061 3099 094D 17D2 05B0 0062;0061 3099 094D 17D2 05B0 0062;
+0061 17D2 05B0 094D 3099 0062;0061 3099 17D2 094D 05B0 0062;0061 3099 17D2 094D 05B0 0062;0061 3099 17D2 094D 05B0 0062;0061 3099 17D2 094D 05B0 0062;
+0061 0300 05AE 1D16D 18A9 0062;00E0 1D16D 05AE 18A9 0062;0061 1D16D 05AE 18A9 0300 0062;00E0 1D16D 05AE 18A9 0062;0061 1D16D 05AE 18A9 0300 0062;
+0061 18A9 0300 05AE 1D16D 0062;00E0 1D16D 18A9 05AE 0062;0061 1D16D 18A9 05AE 0300 0062;00E0 1D16D 18A9 05AE 0062;0061 1D16D 18A9 05AE 0300 0062;
+0061 0315 0300 05AE 20D0 0062;00E0 05AE 20D0 0315 0062;0061 05AE 0300 20D0 0315 0062;00E0 05AE 20D0 0315 0062;0061 05AE 0300 20D0 0315 0062;
+0061 20D0 0315 0300 05AE 0062;0061 05AE 20D0 0300 0315 0062;0061 05AE 20D0 0300 0315 0062;0061 05AE 20D0 0300 0315 0062;0061 05AE 20D0 0300 0315 0062;
+0061 0315 0300 05AE 20D1 0062;00E0 05AE 20D1 0315 0062;0061 05AE 0300 20D1 0315 0062;00E0 05AE 20D1 0315 0062;0061 05AE 0300 20D1 0315 0062;
+0061 20D1 0315 0300 05AE 0062;0061 05AE 20D1 0300 0315 0062;0061 05AE 20D1 0300 0315 0062;0061 05AE 20D1 0300 0315 0062;0061 05AE 20D1 0300 0315 0062;
+0061 093C 0334 20D2 0062;0061 0334 20D2 093C 0062;0061 0334 20D2 093C 0062;0061 0334 20D2 093C 0062;0061 0334 20D2 093C 0062;
+0061 20D2 093C 0334 0062;0061 20D2 0334 093C 0062;0061 20D2 0334 093C 0062;0061 20D2 0334 093C 0062;0061 20D2 0334 093C 0062;
+0061 093C 0334 20D3 0062;0061 0334 20D3 093C 0062;0061 0334 20D3 093C 0062;0061 0334 20D3 093C 0062;0061 0334 20D3 093C 0062;
+0061 20D3 093C 0334 0062;0061 20D3 0334 093C 0062;0061 20D3 0334 093C 0062;0061 20D3 0334 093C 0062;0061 20D3 0334 093C 0062;
+0061 0315 0300 05AE 20D4 0062;00E0 05AE 20D4 0315 0062;0061 05AE 0300 20D4 0315 0062;00E0 05AE 20D4 0315 0062;0061 05AE 0300 20D4 0315 0062;
+0061 20D4 0315 0300 05AE 0062;0061 05AE 20D4 0300 0315 0062;0061 05AE 20D4 0300 0315 0062;0061 05AE 20D4 0300 0315 0062;0061 05AE 20D4 0300 0315 0062;
+0061 0315 0300 05AE 20D5 0062;00E0 05AE 20D5 0315 0062;0061 05AE 0300 20D5 0315 0062;00E0 05AE 20D5 0315 0062;0061 05AE 0300 20D5 0315 0062;
+0061 20D5 0315 0300 05AE 0062;0061 05AE 20D5 0300 0315 0062;0061 05AE 20D5 0300 0315 0062;0061 05AE 20D5 0300 0315 0062;0061 05AE 20D5 0300 0315 0062;
+0061 0315 0300 05AE 20D6 0062;00E0 05AE 20D6 0315 0062;0061 05AE 0300 20D6 0315 0062;00E0 05AE 20D6 0315 0062;0061 05AE 0300 20D6 0315 0062;
+0061 20D6 0315 0300 05AE 0062;0061 05AE 20D6 0300 0315 0062;0061 05AE 20D6 0300 0315 0062;0061 05AE 20D6 0300 0315 0062;0061 05AE 20D6 0300 0315 0062;
+0061 0315 0300 05AE 20D7 0062;00E0 05AE 20D7 0315 0062;0061 05AE 0300 20D7 0315 0062;00E0 05AE 20D7 0315 0062;0061 05AE 0300 20D7 0315 0062;
+0061 20D7 0315 0300 05AE 0062;0061 05AE 20D7 0300 0315 0062;0061 05AE 20D7 0300 0315 0062;0061 05AE 20D7 0300 0315 0062;0061 05AE 20D7 0300 0315 0062;
+0061 093C 0334 20D8 0062;0061 0334 20D8 093C 0062;0061 0334 20D8 093C 0062;0061 0334 20D8 093C 0062;0061 0334 20D8 093C 0062;
+0061 20D8 093C 0334 0062;0061 20D8 0334 093C 0062;0061 20D8 0334 093C 0062;0061 20D8 0334 093C 0062;0061 20D8 0334 093C 0062;
+0061 093C 0334 20D9 0062;0061 0334 20D9 093C 0062;0061 0334 20D9 093C 0062;0061 0334 20D9 093C 0062;0061 0334 20D9 093C 0062;
+0061 20D9 093C 0334 0062;0061 20D9 0334 093C 0062;0061 20D9 0334 093C 0062;0061 20D9 0334 093C 0062;0061 20D9 0334 093C 0062;
+0061 093C 0334 20DA 0062;0061 0334 20DA 093C 0062;0061 0334 20DA 093C 0062;0061 0334 20DA 093C 0062;0061 0334 20DA 093C 0062;
+0061 20DA 093C 0334 0062;0061 20DA 0334 093C 0062;0061 20DA 0334 093C 0062;0061 20DA 0334 093C 0062;0061 20DA 0334 093C 0062;
+0061 0315 0300 05AE 20DB 0062;00E0 05AE 20DB 0315 0062;0061 05AE 0300 20DB 0315 0062;00E0 05AE 20DB 0315 0062;0061 05AE 0300 20DB 0315 0062;
+0061 20DB 0315 0300 05AE 0062;0061 05AE 20DB 0300 0315 0062;0061 05AE 20DB 0300 0315 0062;0061 05AE 20DB 0300 0315 0062;0061 05AE 20DB 0300 0315 0062;
+0061 0315 0300 05AE 20DC 0062;00E0 05AE 20DC 0315 0062;0061 05AE 0300 20DC 0315 0062;00E0 05AE 20DC 0315 0062;0061 05AE 0300 20DC 0315 0062;
+0061 20DC 0315 0300 05AE 0062;0061 05AE 20DC 0300 0315 0062;0061 05AE 20DC 0300 0315 0062;0061 05AE 20DC 0300 0315 0062;0061 05AE 20DC 0300 0315 0062;
+0061 0315 0300 05AE 20E1 0062;00E0 05AE 20E1 0315 0062;0061 05AE 0300 20E1 0315 0062;00E0 05AE 20E1 0315 0062;0061 05AE 0300 20E1 0315 0062;
+0061 20E1 0315 0300 05AE 0062;0061 05AE 20E1 0300 0315 0062;0061 05AE 20E1 0300 0315 0062;0061 05AE 20E1 0300 0315 0062;0061 05AE 20E1 0300 0315 0062;
+0061 093C 0334 20E5 0062;0061 0334 20E5 093C 0062;0061 0334 20E5 093C 0062;0061 0334 20E5 093C 0062;0061 0334 20E5 093C 0062;
+0061 20E5 093C 0334 0062;0061 20E5 0334 093C 0062;0061 20E5 0334 093C 0062;0061 20E5 0334 093C 0062;0061 20E5 0334 093C 0062;
+0061 093C 0334 20E6 0062;0061 0334 20E6 093C 0062;0061 0334 20E6 093C 0062;0061 0334 20E6 093C 0062;0061 0334 20E6 093C 0062;
+0061 20E6 093C 0334 0062;0061 20E6 0334 093C 0062;0061 20E6 0334 093C 0062;0061 20E6 0334 093C 0062;0061 20E6 0334 093C 0062;
+0061 0315 0300 05AE 20E7 0062;00E0 05AE 20E7 0315 0062;0061 05AE 0300 20E7 0315 0062;00E0 05AE 20E7 0315 0062;0061 05AE 0300 20E7 0315 0062;
+0061 20E7 0315 0300 05AE 0062;0061 05AE 20E7 0300 0315 0062;0061 05AE 20E7 0300 0315 0062;0061 05AE 20E7 0300 0315 0062;0061 05AE 20E7 0300 0315 0062;
+0061 059A 0316 302A 20E8 0062;0061 302A 0316 20E8 059A 0062;0061 302A 0316 20E8 059A 0062;0061 302A 0316 20E8 059A 0062;0061 302A 0316 20E8 059A 0062;
+0061 20E8 059A 0316 302A 0062;0061 302A 20E8 0316 059A 0062;0061 302A 20E8 0316 059A 0062;0061 302A 20E8 0316 059A 0062;0061 302A 20E8 0316 059A 0062;
+0061 0315 0300 05AE 20E9 0062;00E0 05AE 20E9 0315 0062;0061 05AE 0300 20E9 0315 0062;00E0 05AE 20E9 0315 0062;0061 05AE 0300 20E9 0315 0062;
+0061 20E9 0315 0300 05AE 0062;0061 05AE 20E9 0300 0315 0062;0061 05AE 20E9 0300 0315 0062;0061 05AE 20E9 0300 0315 0062;0061 05AE 20E9 0300 0315 0062;
+0061 093C 0334 20EA 0062;0061 0334 20EA 093C 0062;0061 0334 20EA 093C 0062;0061 0334 20EA 093C 0062;0061 0334 20EA 093C 0062;
+0061 20EA 093C 0334 0062;0061 20EA 0334 093C 0062;0061 20EA 0334 093C 0062;0061 20EA 0334 093C 0062;0061 20EA 0334 093C 0062;
+0061 0316 302A 031B 302A 0062;0061 031B 302A 302A 0316 0062;0061 031B 302A 302A 0316 0062;0061 031B 302A 302A 0316 0062;0061 031B 302A 302A 0316 0062;
+0061 302A 0316 302A 031B 0062;0061 031B 302A 302A 0316 0062;0061 031B 302A 302A 0316 0062;0061 031B 302A 302A 0316 0062;0061 031B 302A 302A 0316 0062;
+0061 0300 05AE 1D16D 302B 0062;00E0 1D16D 05AE 302B 0062;0061 1D16D 05AE 302B 0300 0062;00E0 1D16D 05AE 302B 0062;0061 1D16D 05AE 302B 0300 0062;
+0061 302B 0300 05AE 1D16D 0062;00E0 1D16D 302B 05AE 0062;0061 1D16D 302B 05AE 0300 0062;00E0 1D16D 302B 05AE 0062;0061 1D16D 302B 05AE 0300 0062;
+0061 0362 0315 0300 302C 0062;00E0 0315 302C 0362 0062;0061 0300 0315 302C 0362 0062;00E0 0315 302C 0362 0062;0061 0300 0315 302C 0362 0062;
+0061 302C 0362 0315 0300 0062;00E0 302C 0315 0362 0062;0061 0300 302C 0315 0362 0062;00E0 302C 0315 0362 0062;0061 0300 302C 0315 0362 0062;
+0061 302E 059A 0316 302D 0062;0061 0316 059A 302D 302E 0062;0061 0316 059A 302D 302E 0062;0061 0316 059A 302D 302E 0062;0061 0316 059A 302D 302E 0062;
+0061 302D 302E 059A 0316 0062;0061 0316 302D 059A 302E 0062;0061 0316 302D 059A 302E 0062;0061 0316 302D 059A 302E 0062;0061 0316 302D 059A 302E 0062;
+0061 1D16D 302E 059A 302E 0062;0061 059A 302E 302E 1D16D 0062;0061 059A 302E 302E 1D16D 0062;0061 059A 302E 302E 1D16D 0062;0061 059A 302E 302E 1D16D 0062;
+0061 302E 1D16D 302E 059A 0062;0061 059A 302E 302E 1D16D 0062;0061 059A 302E 302E 1D16D 0062;0061 059A 302E 302E 1D16D 0062;0061 059A 302E 302E 1D16D 0062;
+0061 1D16D 302E 059A 302F 0062;0061 059A 302E 302F 1D16D 0062;0061 059A 302E 302F 1D16D 0062;0061 059A 302E 302F 1D16D 0062;0061 059A 302E 302F 1D16D 0062;
+0061 302F 1D16D 302E 059A 0062;0061 059A 302F 302E 1D16D 0062;0061 059A 302F 302E 1D16D 0062;0061 059A 302F 302E 1D16D 0062;0061 059A 302F 302E 1D16D 0062;
+0061 094D 3099 093C 3099 0062;0061 093C 3099 3099 094D 0062;0061 093C 3099 3099 094D 0062;0061 093C 3099 3099 094D 0062;0061 093C 3099 3099 094D 0062;
+0061 3099 094D 3099 093C 0062;0061 093C 3099 3099 094D 0062;0061 093C 3099 3099 094D 0062;0061 093C 3099 3099 094D 0062;0061 093C 3099 3099 094D 0062;
+0061 094D 3099 093C 309A 0062;0061 093C 3099 309A 094D 0062;0061 093C 3099 309A 094D 0062;0061 093C 3099 309A 094D 0062;0061 093C 3099 309A 094D 0062;
+0061 309A 094D 3099 093C 0062;0061 093C 309A 3099 094D 0062;0061 093C 309A 3099 094D 0062;0061 093C 309A 3099 094D 0062;0061 093C 309A 3099 094D 0062;
+0061 064B FB1E 05C2 FB1E 0062;0061 05C2 FB1E FB1E 064B 0062;0061 05C2 FB1E FB1E 064B 0062;0061 05C2 FB1E FB1E 064B 0062;0061 05C2 FB1E FB1E 064B 0062;
+0061 FB1E 064B FB1E 05C2 0062;0061 05C2 FB1E FB1E 064B 0062;0061 05C2 FB1E FB1E 064B 0062;0061 05C2 FB1E FB1E 064B 0062;0061 05C2 FB1E FB1E 064B 0062;
+0061 0315 0300 05AE FE20 0062;00E0 05AE FE20 0315 0062;0061 05AE 0300 FE20 0315 0062;00E0 05AE FE20 0315 0062;0061 05AE 0300 FE20 0315 0062;
+0061 FE20 0315 0300 05AE 0062;0061 05AE FE20 0300 0315 0062;0061 05AE FE20 0300 0315 0062;0061 05AE FE20 0300 0315 0062;0061 05AE FE20 0300 0315 0062;
+0061 0315 0300 05AE FE21 0062;00E0 05AE FE21 0315 0062;0061 05AE 0300 FE21 0315 0062;00E0 05AE FE21 0315 0062;0061 05AE 0300 FE21 0315 0062;
+0061 FE21 0315 0300 05AE 0062;0061 05AE FE21 0300 0315 0062;0061 05AE FE21 0300 0315 0062;0061 05AE FE21 0300 0315 0062;0061 05AE FE21 0300 0315 0062;
+0061 0315 0300 05AE FE22 0062;00E0 05AE FE22 0315 0062;0061 05AE 0300 FE22 0315 0062;00E0 05AE FE22 0315 0062;0061 05AE 0300 FE22 0315 0062;
+0061 FE22 0315 0300 05AE 0062;0061 05AE FE22 0300 0315 0062;0061 05AE FE22 0300 0315 0062;0061 05AE FE22 0300 0315 0062;0061 05AE FE22 0300 0315 0062;
+0061 0315 0300 05AE FE23 0062;00E0 05AE FE23 0315 0062;0061 05AE 0300 FE23 0315 0062;00E0 05AE FE23 0315 0062;0061 05AE 0300 FE23 0315 0062;
+0061 FE23 0315 0300 05AE 0062;0061 05AE FE23 0300 0315 0062;0061 05AE FE23 0300 0315 0062;0061 05AE FE23 0300 0315 0062;0061 05AE FE23 0300 0315 0062;
+0061 302A 031B 0321 1D165 0062;0061 0321 031B 1D165 302A 0062;0061 0321 031B 1D165 302A 0062;0061 0321 031B 1D165 302A 0062;0061 0321 031B 1D165 302A 0062;
+0061 1D165 302A 031B 0321 0062;0061 0321 1D165 031B 302A 0062;0061 0321 1D165 031B 302A 0062;0061 0321 1D165 031B 302A 0062;0061 0321 1D165 031B 302A 0062;
+0061 302A 031B 0321 1D166 0062;0061 0321 031B 1D166 302A 0062;0061 0321 031B 1D166 302A 0062;0061 0321 031B 1D166 302A 0062;0061 0321 031B 1D166 302A 0062;
+0061 1D166 302A 031B 0321 0062;0061 0321 1D166 031B 302A 0062;0061 0321 1D166 031B 302A 0062;0061 0321 1D166 031B 302A 0062;0061 0321 1D166 031B 302A 0062;
+0061 093C 0334 1D167 0062;0061 0334 1D167 093C 0062;0061 0334 1D167 093C 0062;0061 0334 1D167 093C 0062;0061 0334 1D167 093C 0062;
+0061 1D167 093C 0334 0062;0061 1D167 0334 093C 0062;0061 1D167 0334 093C 0062;0061 1D167 0334 093C 0062;0061 1D167 0334 093C 0062;
+0061 093C 0334 1D168 0062;0061 0334 1D168 093C 0062;0061 0334 1D168 093C 0062;0061 0334 1D168 093C 0062;0061 0334 1D168 093C 0062;
+0061 1D168 093C 0334 0062;0061 1D168 0334 093C 0062;0061 1D168 0334 093C 0062;0061 1D168 0334 093C 0062;0061 1D168 0334 093C 0062;
+0061 093C 0334 1D169 0062;0061 0334 1D169 093C 0062;0061 0334 1D169 093C 0062;0061 0334 1D169 093C 0062;0061 0334 1D169 093C 0062;
+0061 1D169 093C 0334 0062;0061 1D169 0334 093C 0062;0061 1D169 0334 093C 0062;0061 1D169 0334 093C 0062;0061 1D169 0334 093C 0062;
+0061 05AE 1D16D 302E 1D16D 0062;0061 302E 1D16D 1D16D 05AE 0062;0061 302E 1D16D 1D16D 05AE 0062;0061 302E 1D16D 1D16D 05AE 0062;0061 302E 1D16D 1D16D 05AE 0062;
+0061 1D16D 05AE 1D16D 302E 0062;0061 302E 1D16D 1D16D 05AE 0062;0061 302E 1D16D 1D16D 05AE 0062;0061 302E 1D16D 1D16D 05AE 0062;0061 302E 1D16D 1D16D 05AE 0062;
+0061 302A 031B 0321 1D16E 0062;0061 0321 031B 1D16E 302A 0062;0061 0321 031B 1D16E 302A 0062;0061 0321 031B 1D16E 302A 0062;0061 0321 031B 1D16E 302A 0062;
+0061 1D16E 302A 031B 0321 0062;0061 0321 1D16E 031B 302A 0062;0061 0321 1D16E 031B 302A 0062;0061 0321 1D16E 031B 302A 0062;0061 0321 1D16E 031B 302A 0062;
+0061 302A 031B 0321 1D16F 0062;0061 0321 031B 1D16F 302A 0062;0061 0321 031B 1D16F 302A 0062;0061 0321 031B 1D16F 302A 0062;0061 0321 031B 1D16F 302A 0062;
+0061 1D16F 302A 031B 0321 0062;0061 0321 1D16F 031B 302A 0062;0061 0321 1D16F 031B 302A 0062;0061 0321 1D16F 031B 302A 0062;0061 0321 1D16F 031B 302A 0062;
+0061 302A 031B 0321 1D170 0062;0061 0321 031B 1D170 302A 0062;0061 0321 031B 1D170 302A 0062;0061 0321 031B 1D170 302A 0062;0061 0321 031B 1D170 302A 0062;
+0061 1D170 302A 031B 0321 0062;0061 0321 1D170 031B 302A 0062;0061 0321 1D170 031B 302A 0062;0061 0321 1D170 031B 302A 0062;0061 0321 1D170 031B 302A 0062;
+0061 302A 031B 0321 1D171 0062;0061 0321 031B 1D171 302A 0062;0061 0321 031B 1D171 302A 0062;0061 0321 031B 1D171 302A 0062;0061 0321 031B 1D171 302A 0062;
+0061 1D171 302A 031B 0321 0062;0061 0321 1D171 031B 302A 0062;0061 0321 1D171 031B 302A 0062;0061 0321 1D171 031B 302A 0062;0061 0321 1D171 031B 302A 0062;
+0061 302A 031B 0321 1D172 0062;0061 0321 031B 1D172 302A 0062;0061 0321 031B 1D172 302A 0062;0061 0321 031B 1D172 302A 0062;0061 0321 031B 1D172 302A 0062;
+0061 1D172 302A 031B 0321 0062;0061 0321 1D172 031B 302A 0062;0061 0321 1D172 031B 302A 0062;0061 0321 1D172 031B 302A 0062;0061 0321 1D172 031B 302A 0062;
+0061 059A 0316 302A 1D17B 0062;0061 302A 0316 1D17B 059A 0062;0061 302A 0316 1D17B 059A 0062;0061 302A 0316 1D17B 059A 0062;0061 302A 0316 1D17B 059A 0062;
+0061 1D17B 059A 0316 302A 0062;0061 302A 1D17B 0316 059A 0062;0061 302A 1D17B 0316 059A 0062;0061 302A 1D17B 0316 059A 0062;0061 302A 1D17B 0316 059A 0062;
+0061 059A 0316 302A 1D17C 0062;0061 302A 0316 1D17C 059A 0062;0061 302A 0316 1D17C 059A 0062;0061 302A 0316 1D17C 059A 0062;0061 302A 0316 1D17C 059A 0062;
+0061 1D17C 059A 0316 302A 0062;0061 302A 1D17C 0316 059A 0062;0061 302A 1D17C 0316 059A 0062;0061 302A 1D17C 0316 059A 0062;0061 302A 1D17C 0316 059A 0062;
+0061 059A 0316 302A 1D17D 0062;0061 302A 0316 1D17D 059A 0062;0061 302A 0316 1D17D 059A 0062;0061 302A 0316 1D17D 059A 0062;0061 302A 0316 1D17D 059A 0062;
+0061 1D17D 059A 0316 302A 0062;0061 302A 1D17D 0316 059A 0062;0061 302A 1D17D 0316 059A 0062;0061 302A 1D17D 0316 059A 0062;0061 302A 1D17D 0316 059A 0062;
+0061 059A 0316 302A 1D17E 0062;0061 302A 0316 1D17E 059A 0062;0061 302A 0316 1D17E 059A 0062;0061 302A 0316 1D17E 059A 0062;0061 302A 0316 1D17E 059A 0062;
+0061 1D17E 059A 0316 302A 0062;0061 302A 1D17E 0316 059A 0062;0061 302A 1D17E 0316 059A 0062;0061 302A 1D17E 0316 059A 0062;0061 302A 1D17E 0316 059A 0062;
+0061 059A 0316 302A 1D17F 0062;0061 302A 0316 1D17F 059A 0062;0061 302A 0316 1D17F 059A 0062;0061 302A 0316 1D17F 059A 0062;0061 302A 0316 1D17F 059A 0062;
+0061 1D17F 059A 0316 302A 0062;0061 302A 1D17F 0316 059A 0062;0061 302A 1D17F 0316 059A 0062;0061 302A 1D17F 0316 059A 0062;0061 302A 1D17F 0316 059A 0062;
+0061 059A 0316 302A 1D180 0062;0061 302A 0316 1D180 059A 0062;0061 302A 0316 1D180 059A 0062;0061 302A 0316 1D180 059A 0062;0061 302A 0316 1D180 059A 0062;
+0061 1D180 059A 0316 302A 0062;0061 302A 1D180 0316 059A 0062;0061 302A 1D180 0316 059A 0062;0061 302A 1D180 0316 059A 0062;0061 302A 1D180 0316 059A 0062;
+0061 059A 0316 302A 1D181 0062;0061 302A 0316 1D181 059A 0062;0061 302A 0316 1D181 059A 0062;0061 302A 0316 1D181 059A 0062;0061 302A 0316 1D181 059A 0062;
+0061 1D181 059A 0316 302A 0062;0061 302A 1D181 0316 059A 0062;0061 302A 1D181 0316 059A 0062;0061 302A 1D181 0316 059A 0062;0061 302A 1D181 0316 059A 0062;
+0061 059A 0316 302A 1D182 0062;0061 302A 0316 1D182 059A 0062;0061 302A 0316 1D182 059A 0062;0061 302A 0316 1D182 059A 0062;0061 302A 0316 1D182 059A 0062;
+0061 1D182 059A 0316 302A 0062;0061 302A 1D182 0316 059A 0062;0061 302A 1D182 0316 059A 0062;0061 302A 1D182 0316 059A 0062;0061 302A 1D182 0316 059A 0062;
+0061 0315 0300 05AE 1D185 0062;00E0 05AE 1D185 0315 0062;0061 05AE 0300 1D185 0315 0062;00E0 05AE 1D185 0315 0062;0061 05AE 0300 1D185 0315 0062;
+0061 1D185 0315 0300 05AE 0062;0061 05AE 1D185 0300 0315 0062;0061 05AE 1D185 0300 0315 0062;0061 05AE 1D185 0300 0315 0062;0061 05AE 1D185 0300 0315 0062;
+0061 0315 0300 05AE 1D186 0062;00E0 05AE 1D186 0315 0062;0061 05AE 0300 1D186 0315 0062;00E0 05AE 1D186 0315 0062;0061 05AE 0300 1D186 0315 0062;
+0061 1D186 0315 0300 05AE 0062;0061 05AE 1D186 0300 0315 0062;0061 05AE 1D186 0300 0315 0062;0061 05AE 1D186 0300 0315 0062;0061 05AE 1D186 0300 0315 0062;
+0061 0315 0300 05AE 1D187 0062;00E0 05AE 1D187 0315 0062;0061 05AE 0300 1D187 0315 0062;00E0 05AE 1D187 0315 0062;0061 05AE 0300 1D187 0315 0062;
+0061 1D187 0315 0300 05AE 0062;0061 05AE 1D187 0300 0315 0062;0061 05AE 1D187 0300 0315 0062;0061 05AE 1D187 0300 0315 0062;0061 05AE 1D187 0300 0315 0062;
+0061 0315 0300 05AE 1D188 0062;00E0 05AE 1D188 0315 0062;0061 05AE 0300 1D188 0315 0062;00E0 05AE 1D188 0315 0062;0061 05AE 0300 1D188 0315 0062;
+0061 1D188 0315 0300 05AE 0062;0061 05AE 1D188 0300 0315 0062;0061 05AE 1D188 0300 0315 0062;0061 05AE 1D188 0300 0315 0062;0061 05AE 1D188 0300 0315 0062;
+0061 0315 0300 05AE 1D189 0062;00E0 05AE 1D189 0315 0062;0061 05AE 0300 1D189 0315 0062;00E0 05AE 1D189 0315 0062;0061 05AE 0300 1D189 0315 0062;
+0061 1D189 0315 0300 05AE 0062;0061 05AE 1D189 0300 0315 0062;0061 05AE 1D189 0300 0315 0062;0061 05AE 1D189 0300 0315 0062;0061 05AE 1D189 0300 0315 0062;
+0061 059A 0316 302A 1D18A 0062;0061 302A 0316 1D18A 059A 0062;0061 302A 0316 1D18A 059A 0062;0061 302A 0316 1D18A 059A 0062;0061 302A 0316 1D18A 059A 0062;
+0061 1D18A 059A 0316 302A 0062;0061 302A 1D18A 0316 059A 0062;0061 302A 1D18A 0316 059A 0062;0061 302A 1D18A 0316 059A 0062;0061 302A 1D18A 0316 059A 0062;
+0061 059A 0316 302A 1D18B 0062;0061 302A 0316 1D18B 059A 0062;0061 302A 0316 1D18B 059A 0062;0061 302A 0316 1D18B 059A 0062;0061 302A 0316 1D18B 059A 0062;
+0061 1D18B 059A 0316 302A 0062;0061 302A 1D18B 0316 059A 0062;0061 302A 1D18B 0316 059A 0062;0061 302A 1D18B 0316 059A 0062;0061 302A 1D18B 0316 059A 0062;
+0061 0315 0300 05AE 1D1AA 0062;00E0 05AE 1D1AA 0315 0062;0061 05AE 0300 1D1AA 0315 0062;00E0 05AE 1D1AA 0315 0062;0061 05AE 0300 1D1AA 0315 0062;
+0061 1D1AA 0315 0300 05AE 0062;0061 05AE 1D1AA 0300 0315 0062;0061 05AE 1D1AA 0300 0315 0062;0061 05AE 1D1AA 0300 0315 0062;0061 05AE 1D1AA 0300 0315 0062;
+0061 0315 0300 05AE 1D1AB 0062;00E0 05AE 1D1AB 0315 0062;0061 05AE 0300 1D1AB 0315 0062;00E0 05AE 1D1AB 0315 0062;0061 05AE 0300 1D1AB 0315 0062;
+0061 1D1AB 0315 0300 05AE 0062;0061 05AE 1D1AB 0300 0315 0062;0061 05AE 1D1AB 0300 0315 0062;0061 05AE 1D1AB 0300 0315 0062;0061 05AE 1D1AB 0300 0315 0062;
+0061 0315 0300 05AE 1D1AC 0062;00E0 05AE 1D1AC 0315 0062;0061 05AE 0300 1D1AC 0315 0062;00E0 05AE 1D1AC 0315 0062;0061 05AE 0300 1D1AC 0315 0062;
+0061 1D1AC 0315 0300 05AE 0062;0061 05AE 1D1AC 0300 0315 0062;0061 05AE 1D1AC 0300 0315 0062;0061 05AE 1D1AC 0300 0315 0062;0061 05AE 1D1AC 0300 0315 0062;
+0061 0315 0300 05AE 1D1AD 0062;00E0 05AE 1D1AD 0315 0062;0061 05AE 0300 1D1AD 0315 0062;00E0 05AE 1D1AD 0315 0062;0061 05AE 0300 1D1AD 0315 0062;
+0061 1D1AD 0315 0300 05AE 0062;0061 05AE 1D1AD 0300 0315 0062;0061 05AE 1D1AD 0300 0315 0062;0061 05AE 1D1AD 0300 0315 0062;0061 05AE 1D1AD 0300 0315 0062;
+#
+# END OF FILE
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/NumberFormatTestCases.txt b/Build/source/libs/icu/icu-xetex/test/testdata/NumberFormatTestCases.txt
new file mode 100644
index 00000000000..5003e6dfc64
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/NumberFormatTestCases.txt
@@ -0,0 +1,85 @@
+######################################################################
+# Copyright (c) 2004, International Business Machines
+# Corporation and others. All Rights Reserved.
+######################################################################
+# Author: Alan Liu
+# Created: March 15 2004
+# Since: ICU 3.0
+######################################################################
+
+ref= "#.#"
+
+rt: "0.###" 1.0 "1"
+
+# Basics
+fp: "0.####" 0.10005 "0.1" 0.1
+fp: - 0.10006 "0.1001" 0.1001
+pat: - "#0.####"
+fp: "#.####" 0.10005 "0.1" 0.1
+pat: - "#0.####"
+
+rt: "0" 1234 "1234"
+pat: - "#0"
+
+# Significant digits
+fp: "@@@" 1.234567 "1.23" 1.23
+fp: - 1234567 "1230000" 1230000
+fp: - 0.012345 "0.0123" 0.0123
+pat: - -
+fp: "#,@@@" 1234567 "1,230,000" 1230000
+pat: - "#,@@@"
+rt: "@@@@" 0.0012 "0.001200"
+fp: - 0.99999 "1.000" 1
+pat: - -
+rt: "@###" 0.00123 "0.00123"
+rt: - 123000 "123000"
+fp: - 123456 "123500" 123500
+fp: - 12.3456 "12.35" 12.35
+fp: - 0.0123456 "0.01235" 0.01235
+pat: - -
+fp: "@,###" 27182 "27,180" 27180
+rt: - 123000 "123,000"
+fp: - 0.99999 "1" 1
+rt: - 0.9999 "0.9999"
+pat: - -
+rt: "@##E0" 20000 "2E4"
+rt: - 27000 "2.7E4"
+rt: - 27100 "2.71E4"
+fp: - 27182 "2.72E4" 27200
+pat: - -
+rt: "@@@E0" 20000 "2.00E4"
+rt: - 27000 "2.70E4"
+rt: - 27100 "2.71E4"
+fp: - 27182 "2.72E4" 27200
+pat: - -
+fp: "#,@@##" 314156 "31,4200" 314200
+rt: - 3 "3.0"
+rt: - 5000 "5000"
+rt: - 0.005 "0.0050"
+pat: - -
+fp: "@@@@@@" 123456.7 "123457" 123457
+pat: - -
+
+pat: "##,@@##" "#,@@##"
+pat: "##@@##" "@@##"
+
+pat: "@@.@@" err # decimal sep. disallowed in sig. digits
+pat: "@#@" err # only one cluster of sig. digits
+pat: "@@0" err # either @ or 0, not both
+
+# NumberRegression/Test4140009
+rt: "" 123.456 "123.456"
+rt: "" -123.456 "-123.456"
+
+# Currency
+fpc: "en_US" 1234.56/USD "$1,234.56" 1234.56/USD
+fpc: - 1234.56/JPY "\u00A51,235" 1235/JPY
+# ISO codes that overlap display names (QQQ vs. Q)
+fpc: - 123/QQQ "QQQ123.00" 123/QQQ # QQQ is fake
+fpc: - 123/GTQ "Q123.00" 123/GTQ
+# ChoiceFormat-based display names
+fpc: - 1/INR "Re.1.00" 1/INR
+fpc: - 2/INR "Rs.2.00" 2/INR
+# Display names with shared prefix (YDD vs. Y)
+fpc: - 100/YDD "YDD100.00" 100/YDD
+fpc: - 100/CNY "Y100.00" 100/CNY
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/SentenceBreakTest.txt b/Build/source/libs/icu/icu-xetex/test/testdata/SentenceBreakTest.txt
new file mode 100644
index 00000000000..431d0e6a368
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/SentenceBreakTest.txt
@@ -0,0 +1,307 @@
+# SentenceBreakTest-5.0.0.txt
+# Date: 2006-06-11, 20:09:14 GMT [MD]
+#
+# Unicode Character Database
+# Copyright (c) 1991-2006 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see UCD.html
+#
+# Default Sentence Break Test
+#
+# Format:
+# <string> (# <comment>)?
+# <string> contains hex Unicode code points, with
+# ÷ wherever there is a break opportunity, and
+# × wherever there is not.
+# <comment> the format can change, but currently it shows:
+# - the sample character name
+# - (x) the line_break property* for the sample character
+# - [x] the rule that determines whether there is a break or not
+#
+# These samples may be extended or changed in the future.
+#
+÷ 0023 × 0023 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0023 × 0001 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0023 × 0300 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0023 × 00AD ÷ # ÷ [0.2] NUMBER SIGN (Other) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0023 × 000A ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0023 × 000D ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0023 × 0085 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0023 × 0009 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0023 × 0020 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0023 × 0061 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0023 × 0041 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0023 × 00A0 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0023 × 0030 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0023 × 002E ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0023 × 0021 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0023 × 0022 ÷ # ÷ [0.2] NUMBER SIGN (Other) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0001 × 0023 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0001 × 0001 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0001 × 0300 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0001 × 00AD ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0001 × 000A ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0001 × 000D ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0001 × 0085 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0001 × 0009 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0001 × 0020 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0001 × 0061 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0001 × 0041 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0001 × 00A0 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0001 × 0030 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0001 × 002E ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0001 × 0021 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0001 × 0022 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0300 × 0023 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0300 × 0001 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0300 × 0300 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0300 × 00AD ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0300 × 000A ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0300 × 000D ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0300 × 0085 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0300 × 0009 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0300 × 0020 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0300 × 0061 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0300 × 0041 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0300 × 00A0 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0300 × 0030 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0300 × 002E ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0300 × 0021 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0300 × 0022 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 00AD × 0023 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 00AD × 0001 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 00AD × 0300 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 00AD × 00AD ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 00AD × 000A ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 00AD × 000D ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 00AD × 0085 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 00AD × 0009 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 00AD × 0020 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 00AD × 0061 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 00AD × 0041 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 00AD × 00A0 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 00AD × 0030 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 00AD × 002E ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 00AD × 0021 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 00AD × 0022 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 000A ÷ 0023 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 000A ÷ 0001 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 000A ÷ 0300 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 000A ÷ 00AD ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 000A ÷ 000A ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 000A ÷ 000D ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 000A ÷ 0085 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 000A ÷ 0009 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 000A ÷ 0020 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] SPACE (Sp) ÷ [0.3]
+÷ 000A ÷ 0061 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 000A ÷ 0041 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 000A ÷ 00A0 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 000A ÷ 0030 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 000A ÷ 002E ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 000A ÷ 0021 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 000A ÷ 0022 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [4.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 000D ÷ 0023 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 000D ÷ 0001 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 000D ÷ 0300 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 000D ÷ 00AD ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 000D × 000A ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) × [3.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 000D ÷ 000D ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 000D ÷ 0085 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 000D ÷ 0009 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 000D ÷ 0020 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] SPACE (Sp) ÷ [0.3]
+÷ 000D ÷ 0061 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 000D ÷ 0041 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 000D ÷ 00A0 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 000D ÷ 0030 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 000D ÷ 002E ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 000D ÷ 0021 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 000D ÷ 0022 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [4.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0085 ÷ 0023 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0085 ÷ 0001 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0085 ÷ 0300 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0085 ÷ 00AD ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0085 ÷ 000A ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0085 ÷ 000D ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0085 ÷ 0085 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0085 ÷ 0009 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0085 ÷ 0020 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] SPACE (Sp) ÷ [0.3]
+÷ 0085 ÷ 0061 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0085 ÷ 0041 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0085 ÷ 00A0 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0085 ÷ 0030 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0085 ÷ 002E ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0085 ÷ 0021 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0085 ÷ 0022 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [4.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0009 × 0023 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0009 × 0001 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0009 × 0300 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0009 × 00AD ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0009 × 000A ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0009 × 000D ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0009 × 0085 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0009 × 0009 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0009 × 0020 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0009 × 0061 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0009 × 0041 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0009 × 00A0 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0009 × 0030 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0009 × 002E ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0009 × 0021 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0009 × 0022 ÷ # ÷ [0.2] <CHARACTER TABULATION> (GCControl_Sp) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0020 × 0023 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0020 × 0001 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0020 × 0300 ÷ # ÷ [0.2] SPACE (Sp) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0020 × 00AD ÷ # ÷ [0.2] SPACE (Sp) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0020 × 000A ÷ # ÷ [0.2] SPACE (Sp) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0020 × 000D ÷ # ÷ [0.2] SPACE (Sp) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0020 × 0085 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0020 × 0009 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0020 × 0020 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0020 × 0061 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0020 × 0041 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0020 × 00A0 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0020 × 0030 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0020 × 002E ÷ # ÷ [0.2] SPACE (Sp) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0020 × 0021 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0020 × 0022 ÷ # ÷ [0.2] SPACE (Sp) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0061 × 0023 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0061 × 0001 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0061 × 0300 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0061 × 00AD ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0061 × 000A ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0061 × 000D ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0061 × 0085 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0061 × 0009 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0061 × 0020 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0061 × 0061 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0061 × 0041 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0061 × 00A0 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0061 × 0030 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0061 × 002E ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0061 × 0021 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0061 × 0022 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Lower) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0041 × 0023 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0041 × 0001 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0041 × 0300 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0041 × 00AD ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0041 × 000A ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0041 × 000D ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0041 × 0085 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0041 × 0009 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0041 × 0020 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0041 × 0061 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0041 × 0041 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0041 × 00A0 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0041 × 0030 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0041 × 002E ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0041 × 0021 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0041 × 0022 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (Upper) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 00A0 × 0023 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 00A0 × 0001 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 00A0 × 0300 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 00A0 × 00AD ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 00A0 × 000A ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 00A0 × 000D ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 00A0 × 0085 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 00A0 × 0009 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 00A0 × 0020 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 00A0 × 0061 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 00A0 × 0041 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 00A0 × 00A0 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 00A0 × 0030 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 00A0 × 002E ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 00A0 × 0021 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 00A0 × 0022 ÷ # ÷ [0.2] NO-BREAK SPACE (OLetter) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0030 × 0023 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0030 × 0001 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0030 × 0300 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0030 × 00AD ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0030 × 000A ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0030 × 000D ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0030 × 0085 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0030 × 0009 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0030 × 0020 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0030 × 0061 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0030 × 0041 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0030 × 00A0 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0030 × 0030 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0030 × 002E ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0030 × 0021 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0030 × 0022 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 002E ÷ 0023 ÷ # ÷ [0.2] FULL STOP (ATerm) ÷ [11.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 002E ÷ 0001 ÷ # ÷ [0.2] FULL STOP (ATerm) ÷ [11.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 002E × 0300 ÷ # ÷ [0.2] FULL STOP (ATerm) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 002E × 00AD ÷ # ÷ [0.2] FULL STOP (ATerm) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 002E × 000A ÷ # ÷ [0.2] FULL STOP (ATerm) × [9.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 002E × 000D ÷ # ÷ [0.2] FULL STOP (ATerm) × [9.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 002E × 0085 ÷ # ÷ [0.2] FULL STOP (ATerm) × [9.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 002E × 0009 ÷ # ÷ [0.2] FULL STOP (ATerm) × [9.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 002E × 0020 ÷ # ÷ [0.2] FULL STOP (ATerm) × [9.0] SPACE (Sp) ÷ [0.3]
+÷ 002E × 0061 ÷ # ÷ [0.2] FULL STOP (ATerm) × [8.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 002E ÷ 0041 ÷ # ÷ [0.2] FULL STOP (ATerm) ÷ [11.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 002E ÷ 00A0 ÷ # ÷ [0.2] FULL STOP (ATerm) ÷ [11.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 002E × 0030 ÷ # ÷ [0.2] FULL STOP (ATerm) × [6.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 002E × 002E ÷ # ÷ [0.2] FULL STOP (ATerm) × [8.1] FULL STOP (ATerm) ÷ [0.3]
+÷ 002E × 0021 ÷ # ÷ [0.2] FULL STOP (ATerm) × [8.1] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 002E × 0022 ÷ # ÷ [0.2] FULL STOP (ATerm) × [9.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0021 ÷ 0023 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) ÷ [11.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0021 ÷ 0001 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) ÷ [11.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0021 × 0300 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0021 × 00AD ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0021 × 000A ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [9.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0021 × 000D ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [9.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0021 × 0085 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [9.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0021 × 0009 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [9.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0021 × 0020 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [9.0] SPACE (Sp) ÷ [0.3]
+÷ 0021 ÷ 0061 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) ÷ [11.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0021 ÷ 0041 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) ÷ [11.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0021 ÷ 00A0 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) ÷ [11.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0021 ÷ 0030 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) ÷ [11.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0021 × 002E ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [8.1] FULL STOP (ATerm) ÷ [0.3]
+÷ 0021 × 0021 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [8.1] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0021 × 0022 ÷ # ÷ [0.2] EXCLAMATION MARK (STerm) × [9.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0022 × 0023 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] NUMBER SIGN (Other) ÷ [0.3]
+÷ 0022 × 0001 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0022 × 0300 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [5.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0022 × 00AD ÷ # ÷ [0.2] QUOTATION MARK (Close) × [5.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0022 × 000A ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0022 × 000D ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0022 × 0085 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0022 × 0009 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] <CHARACTER TABULATION> (GCControl_Sp) ÷ [0.3]
+÷ 0022 × 0020 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] SPACE (Sp) ÷ [0.3]
+÷ 0022 × 0061 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] LATIN SMALL LETTER A (Lower) ÷ [0.3]
+÷ 0022 × 0041 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] LATIN CAPITAL LETTER A (Upper) ÷ [0.3]
+÷ 0022 × 00A0 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] NO-BREAK SPACE (OLetter) ÷ [0.3]
+÷ 0022 × 0030 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0022 × 002E ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0022 × 0021 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] EXCLAMATION MARK (STerm) ÷ [0.3]
+÷ 0022 × 0022 ÷ # ÷ [0.2] QUOTATION MARK (Close) × [12.0] QUOTATION MARK (Close) ÷ [0.3]
+÷ 0028 × 0022 × 0047 × 006F × 002E × 0022 × 0029 × 0020 ÷ 0028 × 0048 × 0065 × 0020 × 0064 × 0069 × 0064 × 002E × 0029 ÷ # ÷ [0.2] LEFT PARENTHESIS (Close) × [12.0] QUOTATION MARK (Close) × [12.0] LATIN CAPITAL LETTER G (Upper) × [12.0] LATIN SMALL LETTER O (Lower) × [12.0] FULL STOP (ATerm) × [9.0] QUOTATION MARK (Close) × [9.0] RIGHT PARENTHESIS (Close) × [9.0] SPACE (Sp) ÷ [11.0] LEFT PARENTHESIS (Close) × [12.0] LATIN CAPITAL LETTER H (Upper) × [12.0] LATIN SMALL LETTER E (Lower) × [12.0] SPACE (Sp) × [12.0] LATIN SMALL LETTER D (Lower) × [12.0] LATIN SMALL LETTER I (Lower) × [12.0] LATIN SMALL LETTER D (Lower) × [12.0] FULL STOP (ATerm) × [9.0] RIGHT PARENTHESIS (Close) ÷ [0.3]
+÷ 0028 × 201C × 0047 × 006F × 003F × 201D × 0029 × 0020 ÷ 0028 × 0048 × 0065 × 0020 × 0064 × 0069 × 0064 × 002E × 0029 ÷ # ÷ [0.2] LEFT PARENTHESIS (Close) × [12.0] LEFT DOUBLE QUOTATION MARK (Close) × [12.0] LATIN CAPITAL LETTER G (Upper) × [12.0] LATIN SMALL LETTER O (Lower) × [12.0] QUESTION MARK (STerm) × [9.0] RIGHT DOUBLE QUOTATION MARK (Close) × [9.0] RIGHT PARENTHESIS (Close) × [9.0] SPACE (Sp) ÷ [11.0] LEFT PARENTHESIS (Close) × [12.0] LATIN CAPITAL LETTER H (Upper) × [12.0] LATIN SMALL LETTER E (Lower) × [12.0] SPACE (Sp) × [12.0] LATIN SMALL LETTER D (Lower) × [12.0] LATIN SMALL LETTER I (Lower) × [12.0] LATIN SMALL LETTER D (Lower) × [12.0] FULL STOP (ATerm) × [9.0] RIGHT PARENTHESIS (Close) ÷ [0.3]
+÷ 0055 × 002E × 0053 × 002E × 0041 × 0300 × 002E × 0020 × 0069 × 0073 ÷ # ÷ [0.2] LATIN CAPITAL LETTER U (Upper) × [12.0] FULL STOP (ATerm) × [7.0] LATIN CAPITAL LETTER S (Upper) × [12.0] FULL STOP (ATerm) × [7.0] LATIN CAPITAL LETTER A (Upper) × [5.0] COMBINING GRAVE ACCENT (GCExtend) × [12.0] FULL STOP (ATerm) × [8.0] SPACE (Sp) × [8.0] LATIN SMALL LETTER I (Lower) × [12.0] LATIN SMALL LETTER S (Lower) ÷ [0.3]
+÷ 0055 × 002E × 0053 × 002E × 0041 × 0300 × 003F × 0020 ÷ 0048 × 0065 ÷ # ÷ [0.2] LATIN CAPITAL LETTER U (Upper) × [12.0] FULL STOP (ATerm) × [7.0] LATIN CAPITAL LETTER S (Upper) × [12.0] FULL STOP (ATerm) × [7.0] LATIN CAPITAL LETTER A (Upper) × [5.0] COMBINING GRAVE ACCENT (GCExtend) × [12.0] QUESTION MARK (STerm) × [9.0] SPACE (Sp) ÷ [11.0] LATIN CAPITAL LETTER H (Upper) × [12.0] LATIN SMALL LETTER E (Lower) ÷ [0.3]
+÷ 0055 × 002E × 0053 × 002E × 0041 × 0300 × 002E ÷ # ÷ [0.2] LATIN CAPITAL LETTER U (Upper) × [12.0] FULL STOP (ATerm) × [7.0] LATIN CAPITAL LETTER S (Upper) × [12.0] FULL STOP (ATerm) × [7.0] LATIN CAPITAL LETTER A (Upper) × [5.0] COMBINING GRAVE ACCENT (GCExtend) × [12.0] FULL STOP (ATerm) ÷ [0.3]
+÷ 0033 × 002E × 0034 ÷ # ÷ [0.2] DIGIT THREE (Numeric) × [12.0] FULL STOP (ATerm) × [6.0] DIGIT FOUR (Numeric) ÷ [0.3]
+÷ 0063 × 002E × 0064 ÷ # ÷ [0.2] LATIN SMALL LETTER C (Lower) × [12.0] FULL STOP (ATerm) × [8.0] LATIN SMALL LETTER D (Lower) ÷ [0.3]
+÷ 0065 × 0074 × 0063 × 002E × 0029 × 2019 ÷ 00A0 × 2018 × 0028 × 0074 × 0068 × 0065 ÷ # ÷ [0.2] LATIN SMALL LETTER E (Lower) × [12.0] LATIN SMALL LETTER T (Lower) × [12.0] LATIN SMALL LETTER C (Lower) × [12.0] FULL STOP (ATerm) × [9.0] RIGHT PARENTHESIS (Close) × [9.0] RIGHT SINGLE QUOTATION MARK (Close) ÷ [11.0] NO-BREAK SPACE (OLetter) × [12.0] LEFT SINGLE QUOTATION MARK (Close) × [12.0] LEFT PARENTHESIS (Close) × [12.0] LATIN SMALL LETTER T (Lower) × [12.0] LATIN SMALL LETTER H (Lower) × [12.0] LATIN SMALL LETTER E (Lower) ÷ [0.3]
+÷ 0065 × 0074 × 0063 × 002E × 0029 × 2019 ÷ 00A0 × 2018 × 0028 × 0054 × 0068 × 0065 ÷ # ÷ [0.2] LATIN SMALL LETTER E (Lower) × [12.0] LATIN SMALL LETTER T (Lower) × [12.0] LATIN SMALL LETTER C (Lower) × [12.0] FULL STOP (ATerm) × [9.0] RIGHT PARENTHESIS (Close) × [9.0] RIGHT SINGLE QUOTATION MARK (Close) ÷ [11.0] NO-BREAK SPACE (OLetter) × [12.0] LEFT SINGLE QUOTATION MARK (Close) × [12.0] LEFT PARENTHESIS (Close) × [12.0] LATIN CAPITAL LETTER T (Upper) × [12.0] LATIN SMALL LETTER H (Lower) × [12.0] LATIN SMALL LETTER E (Lower) ÷ [0.3]
+÷ 0074 × 0068 × 0065 × 0020 × 0072 × 0065 × 0073 × 0070 × 002E × 0020 × 006C × 0065 × 0061 × 0064 × 0065 × 0072 × 0073 × 0020 × 0061 × 0072 × 0065 ÷ # ÷ [0.2] LATIN SMALL LETTER T (Lower) × [12.0] LATIN SMALL LETTER H (Lower) × [12.0] LATIN SMALL LETTER E (Lower) × [12.0] SPACE (Sp) × [12.0] LATIN SMALL LETTER R (Lower) × [12.0] LATIN SMALL LETTER E (Lower) × [12.0] LATIN SMALL LETTER S (Lower) × [12.0] LATIN SMALL LETTER P (Lower) × [12.0] FULL STOP (ATerm) × [8.0] SPACE (Sp) × [8.0] LATIN SMALL LETTER L (Lower) × [12.0] LATIN SMALL LETTER E (Lower) × [12.0] LATIN SMALL LETTER A (Lower) × [12.0] LATIN SMALL LETTER D (Lower) × [12.0] LATIN SMALL LETTER E (Lower) × [12.0] LATIN SMALL LETTER R (Lower) × [12.0] LATIN SMALL LETTER S (Lower) × [12.0] SPACE (Sp) × [12.0] LATIN SMALL LETTER A (Lower) × [12.0] LATIN SMALL LETTER R (Lower) × [12.0] LATIN SMALL LETTER E (Lower) ÷ [0.3]
+÷ 5B57 × 002E ÷ 5B57 ÷ # ÷ [0.2] CJK UNIFIED IDEOGRAPH-5B57 (OLetter) × [12.0] FULL STOP (ATerm) ÷ [11.0] CJK UNIFIED IDEOGRAPH-5B57 (OLetter) ÷ [0.3]
+÷ 0065 × 0074 × 0063 × 002E ÷ 5B83 ÷ # ÷ [0.2] LATIN SMALL LETTER E (Lower) × [12.0] LATIN SMALL LETTER T (Lower) × [12.0] LATIN SMALL LETTER C (Lower) × [12.0] FULL STOP (ATerm) ÷ [11.0] CJK UNIFIED IDEOGRAPH-5B83 (OLetter) ÷ [0.3]
+÷ 0065 × 0074 × 0063 × 002E × 3002 ÷ # ÷ [0.2] LATIN SMALL LETTER E (Lower) × [12.0] LATIN SMALL LETTER T (Lower) × [12.0] LATIN SMALL LETTER C (Lower) × [12.0] FULL STOP (ATerm) × [8.1] IDEOGRAPHIC FULL STOP (STerm) ÷ [0.3]
+÷ 5B57 × 3002 ÷ 5B83 ÷ # ÷ [0.2] CJK UNIFIED IDEOGRAPH-5B57 (OLetter) × [12.0] IDEOGRAPHIC FULL STOP (STerm) ÷ [11.0] CJK UNIFIED IDEOGRAPH-5B83 (OLetter) ÷ [0.3]
+÷ 2060 × 0028 × 2060 × 0022 × 2060 × 0047 × 2060 × 006F × 2060 × 002E × 2060 × 0022 × 2060 × 0029 × 2060 × 0020 × 2060 ÷ 0028 × 2060 × 0048 × 2060 × 0065 × 2060 × 0020 × 2060 × 0064 × 2060 × 0069 × 2060 × 0064 × 2060 × 002E × 2060 × 0029 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LEFT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER G (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER O (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [9.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] LEFT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER H (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER D (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER I (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER D (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0028 × 2060 × 201C × 2060 × 0047 × 2060 × 006F × 2060 × 003F × 2060 × 201D × 2060 × 0029 × 2060 × 0020 × 2060 ÷ 0028 × 2060 × 0048 × 2060 × 0065 × 2060 × 0020 × 2060 × 0064 × 2060 × 0069 × 2060 × 0064 × 2060 × 002E × 2060 × 0029 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LEFT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LEFT DOUBLE QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER G (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER O (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] QUESTION MARK (STerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT DOUBLE QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [9.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] LEFT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER H (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER D (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER I (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER D (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0055 × 2060 × 002E × 2060 × 0053 × 2060 × 002E × 2060 × 0041 × 2060 × 0300 × 002E × 2060 × 0020 × 2060 × 0069 × 2060 × 0073 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER U (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [7.0] LATIN CAPITAL LETTER S (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [7.0] LATIN CAPITAL LETTER A (Upper) × [5.0] WORD JOINER (GCControl_Format) × [5.0] COMBINING GRAVE ACCENT (GCExtend) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) × [8.0] LATIN SMALL LETTER I (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER S (Lower) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0055 × 2060 × 002E × 2060 × 0053 × 2060 × 002E × 2060 × 0041 × 2060 × 0300 × 003F × 2060 × 0020 × 2060 ÷ 0048 × 2060 × 0065 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER U (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [7.0] LATIN CAPITAL LETTER S (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [7.0] LATIN CAPITAL LETTER A (Upper) × [5.0] WORD JOINER (GCControl_Format) × [5.0] COMBINING GRAVE ACCENT (GCExtend) × [12.0] QUESTION MARK (STerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] LATIN CAPITAL LETTER H (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0055 × 2060 × 002E × 2060 × 0053 × 2060 × 002E × 2060 × 0041 × 2060 × 0300 × 002E × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER U (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [7.0] LATIN CAPITAL LETTER S (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [7.0] LATIN CAPITAL LETTER A (Upper) × [5.0] WORD JOINER (GCControl_Format) × [5.0] COMBINING GRAVE ACCENT (GCExtend) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0033 × 2060 × 002E × 2060 × 0034 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] DIGIT THREE (Numeric) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [6.0] DIGIT FOUR (Numeric) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0063 × 2060 × 002E × 2060 × 0064 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER C (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [8.0] LATIN SMALL LETTER D (Lower) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0065 × 2060 × 0074 × 2060 × 0063 × 2060 × 002E × 2060 × 0029 × 2060 × 2019 × 2060 ÷ 00A0 × 2060 × 2018 × 2060 × 0028 × 2060 × 0074 × 2060 × 0068 × 2060 × 0065 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER T (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER C (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT SINGLE QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] NO-BREAK SPACE (OLetter) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LEFT SINGLE QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LEFT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER T (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER H (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0065 × 2060 × 0074 × 2060 × 0063 × 2060 × 002E × 2060 × 0029 × 2060 × 2019 × 2060 ÷ 00A0 × 2060 × 2018 × 2060 × 0028 × 2060 × 0054 × 2060 × 0068 × 2060 × 0065 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER T (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER C (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [9.0] RIGHT SINGLE QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] NO-BREAK SPACE (OLetter) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LEFT SINGLE QUOTATION MARK (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LEFT PARENTHESIS (Close) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN CAPITAL LETTER T (Upper) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER H (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0074 × 2060 × 0068 × 2060 × 0065 × 2060 × 0020 × 2060 × 0072 × 2060 × 0065 × 2060 × 0073 × 2060 × 0070 × 2060 × 002E × 2060 × 0020 × 2060 × 006C × 2060 × 0065 × 2060 × 0061 × 2060 × 0064 × 2060 × 0065 × 2060 × 0072 × 2060 × 0073 × 2060 × 0020 × 2060 × 0061 × 2060 × 0072 × 2060 × 0065 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER T (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER H (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER R (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER S (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER P (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [9.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) × [8.0] LATIN SMALL LETTER L (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER A (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER D (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER R (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER S (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] SPACE (Sp) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER A (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER R (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 5B57 × 2060 × 002E × 2060 ÷ 5B57 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] CJK UNIFIED IDEOGRAPH-5B57 (OLetter) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] CJK UNIFIED IDEOGRAPH-5B57 (OLetter) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0065 × 2060 × 0074 × 2060 × 0063 × 2060 × 002E × 2060 ÷ 5B83 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER T (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER C (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] CJK UNIFIED IDEOGRAPH-5B83 (OLetter) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 0065 × 2060 × 0074 × 2060 × 0063 × 2060 × 002E × 2060 × 3002 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER E (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER T (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] LATIN SMALL LETTER C (Lower) × [5.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (ATerm) × [5.0] WORD JOINER (GCControl_Format) × [8.1] IDEOGRAPHIC FULL STOP (STerm) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 × 5B57 × 2060 × 3002 × 2060 ÷ 5B83 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) × [12.0] CJK UNIFIED IDEOGRAPH-5B57 (OLetter) × [5.0] WORD JOINER (GCControl_Format) × [12.0] IDEOGRAPHIC FULL STOP (STerm) × [5.0] WORD JOINER (GCControl_Format) ÷ [11.0] CJK UNIFIED IDEOGRAPH-5B83 (OLetter) × [5.0] WORD JOINER (GCControl_Format) × [5.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+# Lines: 256
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/TestFont1.otf b/Build/source/libs/icu/icu-xetex/test/testdata/TestFont1.otf
new file mode 100644
index 00000000000..5aa8abdbd1c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/TestFont1.otf
Binary files differ
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/WordBreakTest.txt b/Build/source/libs/icu/icu-xetex/test/testdata/WordBreakTest.txt
new file mode 100644
index 00000000000..1828b35f855
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/WordBreakTest.txt
@@ -0,0 +1,519 @@
+# WordBreakTest-5.0.0.txt
+# Date: 2006-06-11, 20:09:15 GMT [MD]
+#
+# TODO: 6 tests are commented out, at lines 91, 95, 113, 117, 135, 139. Resolve this somehow.
+#
+# Unicode Character Database
+# Copyright (c) 1991-2006 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see UCD.html
+#
+# Default Word Break Test
+#
+# Format:
+# <string> (# <comment>)?
+# <string> contains hex Unicode code points, with
+# ÷ wherever there is a break opportunity, and
+# × wherever there is not.
+# <comment> the format can change, but currently it shows:
+# - the sample character name
+# - (x) the line_break property* for the sample character
+# - [x] the rule that determines whether there is a break or not
+#
+# These samples may be extended or changed in the future.
+#
+÷ 0020 ÷ 0020 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0020 ÷ 0001 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0020 × 0300 ÷ # ÷ [0.2] SPACE (Other) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0020 ÷ 000A ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0020 ÷ 000D ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0020 ÷ 0085 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0020 × 00AD ÷ # ÷ [0.2] SPACE (Other) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0020 ÷ 3031 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0020 ÷ 0041 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0020 ÷ 0027 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0020 ÷ 002C ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0020 ÷ 0030 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0020 ÷ 005F ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0020 ÷ 0061 × 2060 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0020 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0020 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0020 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0020 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0020 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0020 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0020 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0020 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0001 ÷ 0020 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0001 ÷ 0001 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0001 × 0300 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0001 ÷ 000A ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0001 ÷ 000D ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0001 ÷ 0085 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0001 × 00AD ÷ # ÷ [0.2] <START OF HEADING> (GCControl) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0001 ÷ 3031 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0001 ÷ 0041 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0001 ÷ 0027 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0001 ÷ 002C ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0001 ÷ 0030 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0001 ÷ 005F ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0001 ÷ 0061 × 2060 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0001 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0001 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0001 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0001 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0001 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0001 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0001 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0001 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] <START OF HEADING> (GCControl) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0300 ÷ 0020 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0300 ÷ 0001 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0300 × 0300 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0300 ÷ 000A ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0300 ÷ 000D ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0300 ÷ 0085 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0300 × 00AD ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0300 ÷ 3031 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0300 ÷ 0041 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0300 ÷ 0027 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0300 ÷ 002C ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0300 ÷ 0030 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0300 ÷ 005F ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0300 ÷ 0061 × 2060 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0300 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0300 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0300 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0300 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0300 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0300 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0300 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0300 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (GCExtend) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 000A ÷ 0020 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 000A ÷ 0001 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+#÷ 000A ÷ 0300 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 000A ÷ 000A ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 000A ÷ 000D ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 000A ÷ 0085 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+#÷ 000A ÷ 00AD ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 000A ÷ 3031 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 000A ÷ 0041 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 000A ÷ 0027 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 000A ÷ 002C ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 000A ÷ 0030 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 000A ÷ 005F ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 000A ÷ 0061 × 2060 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 000A ÷ 0061 ÷ 003A ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 000A ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 000A ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 000A ÷ 0061 ÷ 002C ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 000A ÷ 0031 ÷ 003A ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 000A ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 000A ÷ 0031 ÷ 002C ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 000A ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] <LINE FEED (LF)> (GCLF_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 000D ÷ 0020 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 000D ÷ 0001 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+#÷ 000D ÷ 0300 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 000D × 000A ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) × [3.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 000D ÷ 000D ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 000D ÷ 0085 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+#÷ 000D ÷ 00AD ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 000D ÷ 3031 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 000D ÷ 0041 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 000D ÷ 0027 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 000D ÷ 002C ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 000D ÷ 0030 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 000D ÷ 005F ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 000D ÷ 0061 × 2060 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 000D ÷ 0061 ÷ 003A ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 000D ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 000D ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 000D ÷ 0061 ÷ 002C ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 000D ÷ 0031 ÷ 003A ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 000D ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 000D ÷ 0031 ÷ 002C ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 000D ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0085 ÷ 0020 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0085 ÷ 0001 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+#÷ 0085 ÷ 0300 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0085 ÷ 000A ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0085 ÷ 000D ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0085 ÷ 0085 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+#÷ 0085 ÷ 00AD ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0085 ÷ 3031 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0085 ÷ 0041 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0085 ÷ 0027 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0085 ÷ 002C ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0085 ÷ 0030 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0085 ÷ 005F ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0085 ÷ 0061 × 2060 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0085 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0085 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0085 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0085 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0085 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0085 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0085 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0085 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 00AD ÷ 0020 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 00AD ÷ 0001 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 00AD × 0300 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 00AD ÷ 000A ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 00AD ÷ 000D ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 00AD ÷ 0085 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 00AD × 00AD ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 00AD ÷ 3031 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 00AD ÷ 0041 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 00AD ÷ 0027 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 00AD ÷ 002C ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 00AD ÷ 0030 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 00AD ÷ 005F ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 00AD ÷ 0061 × 2060 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 00AD ÷ 0061 ÷ 003A ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 00AD ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 00AD ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 00AD ÷ 0061 ÷ 002C ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 00AD ÷ 0031 ÷ 003A ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 00AD ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 00AD ÷ 0031 ÷ 002C ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 00AD ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] SOFT HYPHEN (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 3031 ÷ 0020 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 3031 ÷ 0001 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 3031 × 0300 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 3031 ÷ 000A ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 3031 ÷ 000D ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 3031 ÷ 0085 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 3031 × 00AD ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 3031 × 3031 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) × [13.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 3031 ÷ 0041 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 3031 ÷ 0027 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 3031 ÷ 002C ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 3031 ÷ 0030 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 3031 × 005F ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) × [13.1] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 3031 ÷ 0061 × 2060 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 3031 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 3031 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 3031 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 3031 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 3031 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 3031 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 3031 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 3031 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0041 ÷ 0020 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0041 ÷ 0001 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0041 × 0300 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0041 ÷ 000A ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0041 ÷ 000D ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0041 ÷ 0085 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0041 × 00AD ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0041 ÷ 3031 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0041 × 0041 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [5.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0041 ÷ 0027 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0041 ÷ 002C ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0041 × 0030 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [9.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0041 × 005F ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [13.1] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0041 × 0061 × 2060 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0041 × 0061 ÷ 003A ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0041 × 0061 ÷ 0027 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0041 × 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0041 × 0061 ÷ 002C ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0041 × 0031 ÷ 003A ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0041 × 0031 ÷ 0027 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0041 × 0031 ÷ 002C ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0041 × 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] LATIN CAPITAL LETTER A (ALetter) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0027 ÷ 0020 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0027 ÷ 0001 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0027 × 0300 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0027 ÷ 000A ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0027 ÷ 000D ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0027 ÷ 0085 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0027 × 00AD ÷ # ÷ [0.2] APOSTROPHE (MidLetter) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0027 ÷ 3031 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0027 ÷ 0041 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0027 ÷ 0027 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0027 ÷ 002C ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0027 ÷ 0030 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0027 ÷ 005F ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0027 ÷ 0061 × 2060 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0027 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0027 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0027 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0027 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0027 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0027 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0027 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0027 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 002C ÷ 0020 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 002C ÷ 0001 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 002C × 0300 ÷ # ÷ [0.2] COMMA (MidNum) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 002C ÷ 000A ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 002C ÷ 000D ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 002C ÷ 0085 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 002C × 00AD ÷ # ÷ [0.2] COMMA (MidNum) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 002C ÷ 3031 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 002C ÷ 0041 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 002C ÷ 0027 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 002C ÷ 002C ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 002C ÷ 0030 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 002C ÷ 005F ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 002C ÷ 0061 × 2060 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 002C ÷ 0061 ÷ 003A ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 002C ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 002C ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 002C ÷ 0061 ÷ 002C ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 002C ÷ 0031 ÷ 003A ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 002C ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 002C ÷ 0031 ÷ 002C ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 002C ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0030 ÷ 0020 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0030 ÷ 0001 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0030 × 0300 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0030 ÷ 000A ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0030 ÷ 000D ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0030 ÷ 0085 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0030 × 00AD ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0030 ÷ 3031 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0030 × 0041 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [10.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0030 ÷ 0027 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0030 ÷ 002C ÷ # ÷ [0.2] DIGIT ZERO (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0030 × 0030 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [8.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0030 × 005F ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [13.1] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0030 × 0061 × 2060 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [10.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0030 × 0061 ÷ 003A ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [10.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0030 × 0061 ÷ 0027 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [10.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0030 × 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [10.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0030 × 0061 ÷ 002C ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [10.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0030 × 0031 ÷ 003A ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [8.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0030 × 0031 ÷ 0027 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [8.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0030 × 0031 ÷ 002C ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [8.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0030 × 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] DIGIT ZERO (Numeric) × [8.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 005F ÷ 0020 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 005F ÷ 0001 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 005F × 0300 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 005F ÷ 000A ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 005F ÷ 000D ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 005F ÷ 0085 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 005F × 00AD ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 005F × 3031 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 005F × 0041 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 005F ÷ 0027 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 005F ÷ 002C ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 005F × 0030 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 005F × 005F ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.1] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 005F × 0061 × 2060 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 005F × 0061 ÷ 003A ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 005F × 0061 ÷ 0027 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 005F × 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 005F × 0061 ÷ 002C ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 005F × 0031 ÷ 003A ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 005F × 0031 ÷ 0027 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 005F × 0031 ÷ 002C ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 005F × 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] LOW LINE (ExtendNumLet) × [13.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 2060 ÷ 0020 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0061 × 2060 ÷ 0001 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0061 × 2060 × 0300 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0061 × 2060 ÷ 000A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0061 × 2060 ÷ 000D ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0061 × 2060 ÷ 0085 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0061 × 2060 × 00AD ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0061 × 2060 ÷ 3031 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0061 × 2060 × 0041 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0061 × 2060 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 × 2060 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 × 2060 × 0030 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [9.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0061 × 2060 × 005F ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [13.1] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0061 × 2060 × 0061 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 2060 × 0061 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 × 2060 × 0061 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 × 2060 × 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 2060 × 0061 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 × 2060 × 0031 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 × 2060 × 0031 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 × 2060 × 0031 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 × 2060 × 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [9.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0020 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0001 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0061 ÷ 003A × 0300 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 000A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 000D ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0085 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0061 ÷ 003A × 00AD ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 3031 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0061 × 003A × 0041 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] COLON (MidLetter) × [7.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0030 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 005F ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0061 × 003A × 0061 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] COLON (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 003A × 0061 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] COLON (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 × 003A × 0061 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] COLON (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 × 003A × 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] COLON (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 003A × 0061 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] COLON (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0031 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0031 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 003A ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0020 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0001 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0061 ÷ 0027 × 0300 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 000A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 000D ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0085 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0061 ÷ 0027 × 00AD ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 3031 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0061 × 0027 × 0041 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [7.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0030 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 005F ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0061 × 0027 × 0061 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 0027 × 0061 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 × 0027 × 0061 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 × 0027 × 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 0027 × 0061 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 0027 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0020 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0001 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 × 0300 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 000A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 000D ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0085 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 × 00AD ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 3031 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0061 × 0027 × 2060 × 0041 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0030 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 005F ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0061 × 0027 × 2060 × 0061 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 0027 × 2060 × 0061 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 × 0027 × 2060 × 0061 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 × 0027 × 2060 × 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 × 0027 × 2060 × 0061 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [6.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 0027 × 2060 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0020 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0001 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0061 ÷ 002C × 0300 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 000A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 000D ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0085 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0061 ÷ 002C × 00AD ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 3031 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0041 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0030 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 005F ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0061 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0061 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0061 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0031 ÷ 003A ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0031 ÷ 002C ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0061 ÷ 002C ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0020 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0001 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0031 ÷ 003A × 0300 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 000A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 000D ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0085 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0031 ÷ 003A × 00AD ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 3031 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0041 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0030 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 005F ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0061 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0061 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0061 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0031 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0031 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 ÷ 003A ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0020 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0001 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0031 ÷ 0027 × 0300 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 000A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 000D ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0085 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0031 ÷ 0027 × 00AD ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 3031 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0041 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0030 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 005F ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0061 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0031 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0031 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0031 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 ÷ 0027 ÷ 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [999.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0020 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0001 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0031 ÷ 002C × 0300 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 000A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 000D ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0085 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0031 ÷ 002C × 00AD ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 3031 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0041 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 × 002C × 0030 ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] COMMA (MidNum) × [11.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 005F ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0061 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0061 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002C ÷ 0061 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 × 002C × 0031 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] COMMA (MidNum) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 × 002C × 0031 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] COMMA (MidNum) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 × 002C × 0031 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] COMMA (MidNum) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 × 002C × 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] COMMA (MidNum) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0020 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] SPACE (Other) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0001 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <START OF HEADING> (GCControl) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 × 0300 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [4.0] COMBINING GRAVE ACCENT (GCExtend) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 000A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <LINE FEED (LF)> (GCLF_Sep) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 000D ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <CARRIAGE RETURN (CR)> (GCCR_Sep) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0085 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] <NEXT LINE (NEL)> (GCControl_Sep) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 × 00AD ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [4.0] SOFT HYPHEN (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 3031 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] VERTICAL KANA REPEAT MARK (Katakana) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0041 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN CAPITAL LETTER A (ALetter) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 × 002E × 2060 × 0030 ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [11.0] DIGIT ZERO (Numeric) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 005F ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LOW LINE (ExtendNumLet) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0061 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0061 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0061 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0061 ÷ 0027 × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0031 ÷ 002E × 2060 ÷ 0061 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 × 002E × 2060 × 0031 ÷ 003A ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] COLON (MidLetter) ÷ [0.3]
+÷ 0031 × 002E × 2060 × 0031 ÷ 0027 ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] APOSTROPHE (MidLetter) ÷ [0.3]
+÷ 0031 × 002E × 2060 × 0031 ÷ 002C ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] COMMA (MidNum) ÷ [0.3]
+÷ 0031 × 002E × 2060 × 0031 ÷ 002E × 2060 ÷ # ÷ [0.2] DIGIT ONE (Numeric) × [12.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [11.0] DIGIT ONE (Numeric) ÷ [999.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 0063 × 0061 × 006E × 0027 × 0074 ÷ # ÷ [0.2] LATIN SMALL LETTER C (ALetter) × [5.0] LATIN SMALL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER N (ALetter) × [6.0] APOSTROPHE (MidLetter) × [7.0] LATIN SMALL LETTER T (ALetter) ÷ [0.3]
+÷ 0063 × 0061 × 006E × 2019 × 0074 ÷ # ÷ [0.2] LATIN SMALL LETTER C (ALetter) × [5.0] LATIN SMALL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER N (ALetter) × [6.0] RIGHT SINGLE QUOTATION MARK (MidLetter) × [7.0] LATIN SMALL LETTER T (ALetter) ÷ [0.3]
+÷ 0061 × 0062 × 00AD × 0062 × 0079 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) × [5.0] LATIN SMALL LETTER B (ALetter) × [4.0] SOFT HYPHEN (GCControl_Format) × [5.0] LATIN SMALL LETTER B (ALetter) × [5.0] LATIN SMALL LETTER Y (ALetter) ÷ [0.3]
+÷ 0061 ÷ 0024 ÷ 002D ÷ 0033 × 0034 × 002C × 0035 × 0036 × 0037 × 002E × 0031 × 0034 ÷ 0025 ÷ 0062 ÷ # ÷ [0.2] LATIN SMALL LETTER A (ALetter) ÷ [999.0] DOLLAR SIGN (Other) ÷ [999.0] HYPHEN-MINUS (Other) ÷ [999.0] DIGIT THREE (Numeric) × [8.0] DIGIT FOUR (Numeric) × [12.0] COMMA (MidNum) × [11.0] DIGIT FIVE (Numeric) × [8.0] DIGIT SIX (Numeric) × [8.0] DIGIT SEVEN (Numeric) × [12.0] FULL STOP (MidNum) × [11.0] DIGIT ONE (Numeric) × [8.0] DIGIT FOUR (Numeric) ÷ [999.0] PERCENT SIGN (Other) ÷ [999.0] LATIN SMALL LETTER B (ALetter) ÷ [0.3]
+÷ 0033 × 0061 ÷ # ÷ [0.2] DIGIT THREE (Numeric) × [10.0] LATIN SMALL LETTER A (ALetter) ÷ [0.3]
+÷ 2060 ÷ 0063 × 2060 × 0061 × 2060 × 006E × 2060 × 0027 × 2060 × 0074 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER C (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER N (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [6.0] APOSTROPHE (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN SMALL LETTER T (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 ÷ 0063 × 2060 × 0061 × 2060 × 006E × 2060 × 2019 × 2060 × 0074 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER C (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER N (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [6.0] RIGHT SINGLE QUOTATION MARK (MidLetter) × [4.0] WORD JOINER (GCControl_Format) × [7.0] LATIN SMALL LETTER T (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 ÷ 0061 × 2060 × 0062 × 2060 × 00AD × 2060 × 0062 × 2060 × 0079 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER B (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] SOFT HYPHEN (GCControl_Format) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER B (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [5.0] LATIN SMALL LETTER Y (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 ÷ 0061 × 2060 ÷ 0024 × 2060 ÷ 002D × 2060 ÷ 0033 × 2060 × 0034 × 2060 × 002C × 2060 × 0035 × 2060 × 0036 × 2060 × 0037 × 2060 × 002E × 2060 × 0031 × 2060 × 0034 × 2060 ÷ 0025 × 2060 ÷ 0062 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] DOLLAR SIGN (Other) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] HYPHEN-MINUS (Other) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] DIGIT THREE (Numeric) × [4.0] WORD JOINER (GCControl_Format) × [8.0] DIGIT FOUR (Numeric) × [4.0] WORD JOINER (GCControl_Format) × [12.0] COMMA (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [11.0] DIGIT FIVE (Numeric) × [4.0] WORD JOINER (GCControl_Format) × [8.0] DIGIT SIX (Numeric) × [4.0] WORD JOINER (GCControl_Format) × [8.0] DIGIT SEVEN (Numeric) × [4.0] WORD JOINER (GCControl_Format) × [12.0] FULL STOP (MidNum) × [4.0] WORD JOINER (GCControl_Format) × [11.0] DIGIT ONE (Numeric) × [4.0] WORD JOINER (GCControl_Format) × [8.0] DIGIT FOUR (Numeric) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] PERCENT SIGN (Other) × [4.0] WORD JOINER (GCControl_Format) ÷ [999.0] LATIN SMALL LETTER B (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+÷ 2060 ÷ 0033 × 2060 × 0061 × 2060 × 2060 ÷ # ÷ [0.2] WORD JOINER (GCControl_Format) ÷ [999.0] DIGIT THREE (Numeric) × [4.0] WORD JOINER (GCControl_Format) × [10.0] LATIN SMALL LETTER A (ALetter) × [4.0] WORD JOINER (GCControl_Format) × [4.0] WORD JOINER (GCControl_Format) ÷ [0.3]
+# Lines: 484
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/calendar.txt b/Build/source/libs/icu/icu-xetex/test/testdata/calendar.txt
new file mode 100644
index 00000000000..1d126213fb9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/calendar.txt
@@ -0,0 +1,92 @@
+// Copyright (c) 2007 International Business Machines
+// Corporation and others. All Rights Reserved.
+calendar:table(nofallback) {
+ Info {
+ Description { "These are the data driven calendar tests" }
+ LongDescription { "Data for data driven calendar tests." }
+ }
+ TestData {
+ TestCalendarConversion {
+ Headers { "locale","from","to" }
+ Info {
+ Description { "Test data for calendar conversion :" }
+ }
+ Settings {
+ {
+ ToCalendar { "en_US@calendar=gregorian" }
+ Type { "convert_fwd" }
+ },
+ {
+ ToCalendar { "en_US@calendar=gregorian" }
+ Type { "convert_rev" }
+ },
+ }
+ // "0/1/1912/june/4 == gregorian year=1912, ERA=AD, same month, same day
+ Cases {
+ {
+ "en_US@calendar=taiwan",
+ "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
+ "ERA=1,YEAR=1912,MONTH=,DATE=" // greg
+ },
+ {
+ "en_US@calendar=taiwan",
+ "ERA=1,YEAR=3,MONTH=FEBRUARY,DATE=12", // tw
+ "ERA=1,YEAR=1914,MONTH=,DATE=" // greg
+ },
+ {
+ "en_US@calendar=taiwan",
+ "ERA=1,YEAR=96,MONTH=FEBRUARY,DATE=12", // tw
+ "ERA=1,YEAR=2007,MONTH=,DATE=" // greg
+ },
+ // before 1912:
+ // [before minguo]2 1[month] 24[day] -> 1910-1-24
+ {
+ "en_US@calendar=taiwan",
+ "ERA=0,YEAR=2,MONTH=JANUARY,DATE=24", // tw
+ "ERA=1,YEAR=1910,MONTH=JANUARY,DATE=24", // greg
+ }
+ }
+ }
+ TestCalendarOperations {
+ Headers { "locale","from","operation","params","to" }
+ Info {
+ Description { "Test data for calendar operation :" }
+ }
+ Settings {
+ {
+ Type { "ops" }
+ },
+ }
+ Cases {
+ {
+ "en_US@calendar=taiwan",
+ "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
+ "roll",
+ "DATE=1", // date + 1
+ "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw
+ },
+ {
+ "en_US@calendar=taiwan",
+ "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
+ "add",
+ "DATE=1", // date + 1
+ "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw
+ },
+ {
+ "en_US@calendar=taiwan",
+ "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
+ "roll",
+ "YEAR=1", // date + 1
+ "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw
+ },
+ {
+ "en_US@calendar=taiwan",
+ "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
+ "add",
+ "YEAR=1", // date + 1
+ "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw
+ },
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/casing.txt b/Build/source/libs/icu/icu-xetex/test/testdata/casing.txt
new file mode 100644
index 00000000000..11df9611043
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/casing.txt
@@ -0,0 +1,64 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 2002-2007, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+casing:table(nofallback) {
+ Info {
+ Description { "This is test data file for string casing." }
+
+ LongDescription {
+ "each item is an array with\n"
+ "input string, result string, locale ID[, break iterator]\n"
+ "the break iterator (only for titlecasing) is specified as an int, same as in UBreakIteratorType:\n"
+ "0=UBRK_CHARACTER 1=UBRK_WORD 2=UBRK_LINE 3=UBRK_SENTENCE 4=UBRK_TITLE -1=default (NULL=words) -2=no breaks (.*)\n"
+ "options: T=U_FOLD_CASE_EXCLUDE_SPECIAL_I L=U_TITLECASE_NO_LOWERCASE A=U_TITLECASE_NO_BREAK_ADJUSTMENT\n"
+ }
+ }
+ TestData {
+ lowercasing {
+ Headers { "Input", "Output", "Locale" }
+ Cases {
+ { " tHe QUIcK bRoWn", " the quick brown", "" },
+ { "aBIΣßΣ/ñŸ¿¿ð…", "abiσßς/ñŸ¿¿ð­", "" },
+ { "aBIΣßΣ/ñŸ¿¿ð…", "abıσßς/ñŸ¿¿ð­", "tur" } // tur: 3-letter code for Turkish
+ }
+ }
+ uppercasing {
+ Headers { "Input", "Output", "Locale" }
+ Cases {
+ { " tHe QUIcK bRoWn", " THE QUICK BROWN", "" },
+ { "aBiσßς/ffiñŸ¿¿ð­", "ABIΣSSΣ/FFIñŸ¿¿ð…", "" },
+ { "aBiσßς/ffiñŸ¿¿ð­", "ABİΣSSΣ/FFIñŸ¿¿ð…", "az" } // az same casing as tr
+ }
+ }
+ titlecasing {
+ Headers { "Input", "Output", "Locale", "Type", "Options" }
+ Cases {
+ { "ʻaMeLikA huI Pū ʻʻʻiA", "ʻAmelika Hui Pū ʻʻʻIa", "", "-1", "" }, // titlecase first _cased_ letter, j4933
+ { " tHe QUIcK bRoWn", " The Quick Brown", "", "4", "" },
+ { "DŽDždžLJLjljNJNjnj", "DžDžDžLjLjLjNjNjNj", "", "0", "" }, // UBRK_CHARACTER
+ { "ljubav ljubav", "Ljubav Ljubav", "", "-1", "" }, // Lj vs. L+j
+ { "'oH dOn'T tItLeCaSe AfTeR lEtTeR+'", "'Oh Don't Titlecase After Letter+'", "", "-1", "" },
+
+ { "a ʻCaT. A ʻdOg! ʻeTc.", "A ʻCat. A ʻDog! ʻEtc.", "", "-1", "" }, // default
+ { "a ʻCaT. A ʻdOg! ʻeTc.", "A ʻcat. A ʻdog! ʻetc.", "", "-1", "A" }, // U_TITLECASE_NO_BREAK_ADJUSTMENT
+ { "a ʻCaT. A ʻdOg! ʻeTc.", "A ʻCaT. A ʻdOg! ʻETc.", "", "3", "L" }, // UBRK_SENTENCE and U_TITLECASE_NO_LOWERCASE
+
+ { "ʻcAt! ʻeTc.", "ʻCat! ʻetc.", "", "-2", "" }, // -2=Trivial break iterator
+ { "ʻcAt! ʻeTc.", "ʻcat! ʻetc.", "", "-2", "A" }, // U_TITLECASE_NO_BREAK_ADJUSTMENT
+ { "ʻcAt! ʻeTc.", "ʻCAt! ʻeTc.", "", "-2", "L" }, // U_TITLECASE_NO_LOWERCASE
+ { "ʻcAt! ʻeTc.", "ʻcAt! ʻeTc.", "", "-2", "AL" } // Both options
+ }
+ }
+ casefolding {
+ Headers { "Input", "Output", "Options" }
+ Cases {
+ { "aBÄ°IıÏßffiñŸ¿¿", "abi̇iıβssffiñŸ¿¿", "" },
+ { "aBÄ°IıÏßffiñŸ¿¿", "abiııβssffiñŸ¿¿", "T" } // U_FOLD_CASE_EXCLUDE_SPECIAL_I
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/conversion.txt b/Build/source/libs/icu/icu-xetex/test/testdata/conversion.txt
new file mode 100644
index 00000000000..5e792b9be87
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/conversion.txt
@@ -0,0 +1,1356 @@
+//*******************************************************************************
+//
+// Copyright (C) 2003-2007, International Business Machines
+// Corporation and others. All Rights Reserved.
+//
+// file name: conversion.txt
+// encoding: US-ASCII
+// tab size: 8 (not used)
+// indentation:4
+//
+// created on: 2003jul15
+// created by: Markus W. Scherer
+//
+// ICU resource bundle source file with test data for data-driven conversion tests.
+//
+//*******************************************************************************
+
+conversion:table(nofallback) {
+ Info {
+ Description { "Test data for conversion" }
+ LongDescription {
+ "Test data for data-driven conversion tests in icu/source/test/intltest/convtest.cpp\n"
+ "Run intltest conversion\n"
+
+ "Charset names starting with '*' are for testdata names.\n"
+
+ "ICU callbacks are specified as strings with pairs of characters, each optional.\n"
+ "Callback function - '?'=Sub '0'=Skip '.'=Stop '&'=Escape\n"
+ "Callback option - a letter is passed in directly as const char * see ucnv_err.h\n"
+ "Empty string: Sub callback with NULL option\n"
+
+ "In order to specify a charset substitution character (for ucnv_setSubstChars()),\n"
+ "add a NUL (U+0000) to the callback string followed by the subchar bytes as Latin-1\n"
+ "characters. For example, for a Sub callback with no option and a subchar of FC FC,\n"
+ "use the string \"?\x00\xFC\xFC\"\n"
+
+ "In order to specify a substitution string (for ucnv_setSubstString()),\n"
+ "add an '=' to the callback string followed by the substitution string.\n"
+ "For example, for a Sub callback with no option and a substitution string\n"
+ "of \"ab\", use the string \"?=ab\"\n"
+
+ "fallbacks: per-direction boolean, currently only for fromUnicode; see Jitterbug 2401\n"
+
+ "errorCode: (empty)==zero | invalid | illegal | truncated | illesc | unsuppesc\n"
+ }
+ }
+ TestData {
+ toUnicode {
+ Headers { "charset", "bytes", "unicode", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidChars" }
+ Cases {
+ // improve coverage of unrolled loops in ucnvmbcs.c/ucnv_MBCSSingleToBMPWithOffsets()
+ {
+ "ISO-8859-3",
+ :bin{ 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627 },
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\x22#$%&'",
+ :intvector{ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ // test that ISO-2022-JP encodes ASCII as itself
+ {
+ "ISO-2022-JP",
+ :bin{ 3f4041424344454647 },
+ "?@ABCDEFG",
+ :intvector{ 0,1,2,3,4,5,6,7,8 },
+ :int{1}, :int{1}, "", "?", :bin{""}
+ }
+ // test that ISO-2022-CN encodes ASCII as itself
+ {
+ "ISO-2022-CN",
+ :bin{ 3f4041424344454647 },
+ "?@ABCDEFG",
+ :intvector{ 0,1,2,3,4,5,6,7,8 },
+ :int{1}, :int{1}, "", "?", :bin{""}
+ }
+
+ // ISO-2022-KR
+
+ // truncated, partial escape sequence
+ {
+ "ibm-25546",
+ :bin{ 1b }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b }
+ }
+ {
+ "ibm-25546",
+ :bin{ 1b24 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b24 }
+ }
+ {
+ "ibm-25546",
+ :bin{ 1b2429 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b2429 }
+ }
+ // complete escape sequence but nothing else
+ {
+ "ibm-25546",
+ :bin{ 1b242943 }, "", :intvector{},
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ {
+ "ibm-25546",
+ :bin{ 1b2429430e }, "", :intvector{},
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // escape plus ASCII character
+ {
+ "ibm-25546",
+ :bin{ 1b24294341 }, "A", :intvector{ 4 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // escape plus incomplete DBCS character
+ {
+ "ibm-25546",
+ :bin{ 1b2429430e41 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 41 }
+ }
+ // all complete with DBCS character
+ {
+ "ibm-25546",
+ :bin{ 1b2429430e4141 }, "\uc88b", :intvector{ 5 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // more complicated example
+ {
+ "ibm-25546",
+ :bin{ 411b242943420e4141affe0f43 },
+ "AB\uc88b%XAF%XFEC",
+ :intvector{ 0, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 12 },
+ :int{1}, :int{1}, "", "&", :bin{""}
+ }
+
+ // truncated, partial escape sequence
+ {
+ "ISO-2022-KR",
+ :bin{ 1b }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b }
+ }
+ {
+ "ISO-2022-KR",
+ :bin{ 1b24 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b24 }
+ }
+ {
+ "ISO-2022-KR",
+ :bin{ 1b2429 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b2429 }
+ }
+ // complete escape sequence but nothing else
+ {
+ "ISO-2022-KR",
+ :bin{ 1b242943 }, "", :intvector{},
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ {
+ "ISO-2022-KR",
+ :bin{ 1b2429430e }, "", :intvector{},
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // escape plus ASCII character
+ {
+ "ISO-2022-KR",
+ :bin{ 1b24294341 }, "A", :intvector{ 4 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // escape plus incomplete DBCS character
+ {
+ "ISO-2022-KR",
+ :bin{ 1b2429430e41 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 41 }
+ }
+ // all complete with DBCS character
+ {
+ "ISO-2022-KR",
+ :bin{ 1b2429430e4141 }, "\uc88b", :intvector{ 5 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // more complicated example
+ {
+ "ISO-2022-KR",
+ :bin{ 411b242943420e4141affe0f43 },
+ "AB\uc88b%XAF%XFEC",
+ :intvector{ 0, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 12 },
+ :int{1}, :int{1}, "", "&", :bin{""}
+ }
+
+ // ISO-2022-JP
+
+ // truncated, partial escape sequence
+ {
+ "ISO-2022-JP",
+ :bin{ 1b }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b }
+ }
+ {
+ "ISO-2022-JP-2",
+ :bin{ 1b24 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b24 }
+ }
+ // complete escape sequence but nothing else
+ {
+ "ISO-2022-JP-2",
+ :bin{ 1b2442 }, "", :intvector{},
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // escape plus incomplete DBCS character
+ {
+ "ISO-2022-JP-2",
+ :bin{ 1b244241 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 41 }
+ }
+ // all complete with DBCS character
+ {
+ "ISO-2022-JP-2",
+ :bin{ 1b24424141 }, "\u758f", :intvector{ 3 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // test the G2 designator & SS2 shift
+ {
+ "ISO-2022-JP-2",
+ :bin{ 431b2e46461b244241411b4e4e353f }, "CF\u758f\u039e\u7591", :intvector{ 0, 4, 8, 12, 13 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // JIS7 with Katakana
+ {
+ "JIS7",
+ :bin{ 41420e41420f4142 }, "AB\uff81\uff82AB", :intvector{ 0, 1, 3, 4, 6, 7 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // JIS8 with Katakana
+ {
+ "JIS8",
+ :bin{ 41c15c1b284a5cc242 }, "A\uff81\\\xa5\uff82B", :intvector{ 0, 1, 2, 6, 7, 8 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+
+ // ISO-2022-CN
+
+ // truncated, partial escape sequence
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b }
+ }
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b24 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b24 }
+ }
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b2429 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 1b2429 }
+ }
+ // complete escape sequence but nothing else
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b242941 }, "", :intvector{},
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b2429410e }, "", :intvector{},
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // escape plus ASCII character
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b24294141 }, "\x41", :intvector{ 4 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // escape plus incomplete DBCS character
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b2429410e41 }, "", :intvector{},
+ :int{1}, :int{1}, "truncated", ".", :bin{ 41 }
+ }
+ // all complete with DBCS character
+ {
+ "ISO_2022,locale=zh,version=1",
+ :bin{ 1b2429410e4141 }, "\u4eae", :intvector{ 5 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+ // ISO-2022-CN-EXT with all subcharsets and shifts and with supplementary code points
+ {
+ "ISO-2022-CN-EXT",
+ :bin{ 1b2429411b242a480e41411b2429457e7c1b4e70341b242b4d1b2429477c341b4f664c2421 },
+ "\u4eae\u9f82\u56cd\u56cc\U0002a6d6\x30",
+ :intvector{ 9, 15, 19, 29, 33, 33, 35 },
+ :int{1}, :int{1}, "", ".", :bin{""}
+ }
+
+ // illegal and unsupported escape sequences
+ // SS2 without designator: illegal
+ {
+ "ISO-2022-CN-EXT",
+ :bin{ 411b4e2121 }, "\x41", :intvector{ 0 },
+ :int{1}, :int{1}, "illesc", ".", :bin{ 1b4e }
+ }
+ // G3 designator: recognized, but not supported for -CN (only for -CN-EXT)
+ {
+ "ISO-2022-CN",
+ :bin{ 411b242b491b4f2121 }, "\x41", :intvector{ 0 },
+ :int{1}, :int{1}, "unsuppesc", ".", :bin{ 1b242b49 }
+ }
+
+ // ISO-2022 SBCS
+ // [U_ENABLE_GENERIC_ISO_2022]
+ // The _generic_ ISO-2022 converter is disabled starting 2003-dec-03 (ICU 2.8).
+ // For details see the icu mailing list from 2003-dec-01 and the ucnv2022.c file.
+ // Language-specific variants of ISO-2022 continue to be available as listed below.
+ //{
+ // "ISO_2022",
+ // :bin{ 0008090a0d1a1c1f203f415c7d7e7f },
+ // "\x00\x08\t\n\r\x1a\x1c\x1f ?A\\}~\x7f",
+ // :intvector{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
+ // :int{1}, :int{1}, "", ".", :bin{""}
+ //}
+
+ // DBCS-only extensions
+ {
+ "ibm-970",
+ :bin{ 617eece9b2eb },
+ "\x61\x7e\u4e00\ub000",
+ :intvector{ 0, 1, 2, 4 },
+ :int{1}, :int{1}, "", "?", :bin{""}
+ }
+
+ {
+ "ibm-971",
+ :bin{ 617eece9b2eb },
+ "\ufffd\u4e00\ub000",
+ :intvector{ 0, 2, 4 },
+ :int{1}, :int{1}, "", "?", :bin{""}
+ }
+
+ {
+ "ibm-16684",
+ :bin{ 430e4395ecc1404042e1 },
+ "\ufffd\u30C8\u30C8\u309A\u3000\u20ac",
+ :intvector{ 0, 2, 4, 4, 6, 8 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
+ {
+ "ibm-1399",
+ :bin{ 430e4395ecc140400fe1 },
+ "\uff62\u30C8\u30C8\u309A\u3000\u20ac",
+ :intvector{ 0, 2, 4, 4, 6, 9 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
+ // extensions
+ {
+ "ibm-1390",
+ :bin{ 430e4395ecc1 },
+ "\uff63\u30C8\u30C8\u309A",
+ :intvector{ 0, 2, 4, 4 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
+ {
+ "ibm-16684",
+ :bin{ ececec8bec8cec8d4386ecb5ecb6ecb7 },
+ "\ufffd\u31f6\u31f7\u31f8\u30ab\u304b\u309a\u304d\u309a\u304f\u309a",
+ :intvector{ 0, 2, 4, 6, 8, 10, 10, 12, 12, 14, 14 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
+ {
+ "ibm-1390",
+ :bin{ 43860eececec8bec8cec8d4386ecb5ecb6ecb7ecc10fec },
+ "\uff63\uff76\ufffd\u31f6\u31f7\u31f8\u30ab\u304b\u309a\u304d\u309a\u304f\u309a\u30C8\u309A\x1a",
+ :intvector{ 0, 1, 3, 5, 7, 9, 11, 13, 13, 15, 15, 17, 17, 19, 19, 22 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
+ {
+ "*test3",
+ :bin{ 00050601020b0701020a01020c },
+ "\u20ac\x05\x06\x0b\U00101234\U00023456\ufffd",
+ :intvector{ 0, 1, 2, 3, 6, 6, 7, 7, 10 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
+ // normal conversions
+ {
+ "UTF-16LE",
+ :bin{ 310000d801dc00d902dc320000d8330001dc3400 },
+ "1\U00010001\U000500022\ufffd3\ufffd4",
+ :intvector{ 0, 2, 2, 6, 6, 10, 12, 14, 16, 18 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ { "UTF-16LE", :bin{ 00 }, "", :intvector{}, :int{1}, :int{0}, "truncated", ".", :bin{ 00 } }
+ { "UTF-16LE", :bin{ 00d800 }, "", :intvector{}, :int{1}, :int{0}, "truncated", ".", :bin{ 00d800 } }
+
+ {
+ "UTF-16BE",
+ :bin{ 0031d800dc01d900dc020032d8000033dc010034 },
+ "1\U00010001\U000500022\ufffd3\ufffd4",
+ :intvector{ 0, 2, 2, 6, 6, 10, 12, 14, 16, 18 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ { "UTF-16BE", :bin{ 00 }, "", :intvector{}, :int{1}, :int{0}, "truncated", ".", :bin{ 00 } }
+ { "UTF-16BE", :bin{ d800dc }, "", :intvector{}, :int{1}, :int{0}, "truncated", ".", :bin{ d800dc } }
+
+ // e4b8 is a partial sequence
+ { "UTF-8", :bin{ 31e4ba8ce4b8 }, "1\u4e8c", :intvector{ 0, 1 }, :int{1}, :int{0}, "truncated", ".", :bin{ e4b8 } }
+ { "UTF-8", :bin{ 31e4ba8ce4b8 }, "1\u4e8c\ufffd", :intvector{ 0, 1, 4 }, :int{1}, :int{0}, "", "?", :bin{""} }
+
+ // LMBCS with escape callback (1292a0 is unassigned)
+ {
+ "LMBCS",
+ :bin{ 12c9501292a01292a1 },
+ "\u4e2e%X12%X92%XA0\ue5c4",
+ :intvector{ 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6 },
+ :int{1}, :int{0}, "", "&", :bin{""}
+ }
+
+ // IMAP-mailbox-name with SUB
+ // a<DEL> a&AB~ a&AB\x0c a&AB- a&AB. a&.
+ {
+ "IMAP-mailbox-name",
+ :bin{ 617f612641427e612641420c612641422d612641422e61262e },
+ "a\ufffda\ufffda\ufffda\ufffda\ufffda\ufffd",
+ :intvector{ 0, 1, 2, 4, 7, 9, 12, 14, 17, 19, 22, 23 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
+ // using testdata_test1.cnv
+ { "*test1", :bin{ 000506070809 }, "\u20ac\x05\x06\U00101234\ufffd\ufffd", :intvector{ 0, 1, 2, 3, 3, 4, 5 }, :int{1}, :int{0}, "", "", :bin{""} }
+
+ // surrogates in CESU-8
+ { "CESU-8", :bin{ eda080eda081edb081 }, "\ud800\U00010401", :intvector{ 0, 3, 6 }, :int{1}, :int{0}, "", "", :bin{""} }
+ // e080 is a partial sequence
+ { "UTF-8", :bin{ 31ffe4ba8ce08061 }, "1\ufffd\u4e8c\ufffda", :intvector{ 0, 1, 2, 5, 7 }, :int{0}, :int{0}, "", "", :bin{ e080 } }
+ // fbbfbfbfbf exceedes U+10ffff
+ { "UTF-8", :bin{ 31fbbfbfbfbf61 }, "1\ufffda", :intvector{ 0, 1, 6 }, :int{0}, :int{0}, "", "", :bin{ fbbfbfbfbf } }
+
+ // lead byte a2 without trail byte
+ { "ibm-1363", :bin{ a2aea2 }, "\u00a1", :intvector{ 0 }, :int{1}, :int{0}, "truncated", ".", :bin{ a2 } }
+ { "ibm-1363", :bin{ a2aea2 }, "\u00a1\u001a", :intvector{ 0, 2 }, :int{1}, :int{0}, "", "?", :bin{""} }
+
+ // simple sample, no error handling
+ { "UTF-8", :bin{ 61F48FBFBF }, "a\U0010FFFF", :intvector{ 0, 1, 1 }, :int{1}, :int{0}, "", "", :bin{""} }
+ // Headers { "charset", "bytes", "unicode", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidChars" }
+ {
+ "iscii",
+ :bin{ EF4BC0E9BFE9E8D80AEF4AC0D4BFD4E8D80AEF4838B30AEF4939B30AEF4A3AB30AEF4B3BB30A},
+ "\u0A22\u0A3C\u0A5C\u0A4D\u0A39\u000A" /* Gurmukhi test */
+ "\u0AA2\u0AB5\u0AA1\u0AB5\u0ACD\u0AB9\u000A" /* Gujarati test */
+ "\u0038\u0C95\u000A" /* Kannada test */
+ "\u0039\u0D15\u000A" /* Malayalam test */
+ "\u003A\u0A95\u000A" /* Gujarati test */
+ "\u003B\u0A15\u000A" /* Punjabi test */,
+ :intvector { 2, 3, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 31, 32, 35, 36, 37 },
+ :int{1}, :int{0}, "", "", :bin{ "" }
+ }
+ {
+ "iscii-gur",
+ :bin{3BB30AC0E9BFE9E8D80AEF43C0E9BFE9E8D80A3BB30AEF403BB30A},
+ "\u003b\u0a15\u000a" /* Easy characters */
+ "\u0a22\u0a3c\u0a5c\u0a4d\u0a39\u000a" /* Gurmukhi test */
+ "\u09dd\u09dc\u09cd\u09b9\u000a" /* Switch script: to Bengali*/
+ "\u003b\u0a15\u000a" /* Easy characters - new line" so should default!*/
+ "\u003b\u0a15\u000a", /* Back to Gurmukhi*/
+ :intvector { 0, 1, 2, 3, 4, 6, 7, 8, 9, 13, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26 },
+ :int{1}, :int{0}, "", "", :bin{ "" }
+ }
+ { // Verify Supplementary support
+ "Big5-HKSCS",
+ :bin{ fcfcfcfd },
+ "\U000233E6\U00026DA0",
+ :intvector{ 0, 0, 2, 2 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ { // Verify non-supplementary support
+ "big5-hkscs:unicode3.0",
+ :bin{ fcfcfcfd },
+ "\uE1D4\uE1D5",
+ :intvector{ 0, 2 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ { // Verify gb18030 enumeration
+ "gb18030",
+ :bin{ 8130D2398130D3308136A5318136A532 },
+ "\u0450\u0452\u200F\u2011",
+ :intvector{ 0, 4, 8, 12 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ }
+ }
+
+ // --------------------------------------------------------------------- ***
+
+ fromUnicode {
+ Headers { "charset", "unicode", "bytes", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidUChars" }
+ Cases {
+ // Verify that mappings that would result in byte values outside 20..7F (for SBCS)
+ // or 21..7E (for DBCS) are not used.
+ // ibm-9005_X110-2007.ucm (ISO 8859-7, <ESC>.F=1b2e46):
+ // <U009F> \x9F |0 (also in ISO 8859-1)
+ // <U0387> \xB7 |1
+ // windows-949-2000 (KSC_5601, <ESC>$(C=1b242843):
+ // <UC829> \xA0\xA1 |0
+ // <UD4FE> \xC0\x41 |0
+ // <UD79D> \xC8\xFE |0
+ {
+ "JIS8", // =ISO_2022,locale=ja,version=4
+ "\u009f\u0387\uc829\ud4fe\ud79d",
+ :bin{ 1a1b2e461b4e371a1a1b242843487e1b2842 },
+ :intvector{ 0,1,1,1,1,1,1,2,3,4,4,4,4,4,4,4,4,4 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ // Ticket 5483: ISO 2022 converter incorrectly using fallback mapping
+ // Verify that a roundtrip mapping is used even when a fallback mapping is
+ // available in the current state.
+ // U+FF61 is handled in code
+ // jisx-208.ucm (<ESC>$B=1b2442):
+ // <U30FE> \x21\x34 |0
+ // <UFF5D> \x21\x51 |0 and
+ // ibm-897_P100-1995.ucm (JIS X 0201, <ESC>(J=1b284a):
+ // <UFF5D> \x7D |1
+ // ibm-9005_X110-2007.ucm (ISO 8859-7, <ESC>.F=1b2e46):
+ // <U03D5> \xF6 |1
+ // <U2015> \xAF |0
+ // <UFF5D> \x7D |1 (not legal for ISO 2022)
+ // windows-949-2000 (KSC_5601, <ESC>$(C=1b242843):
+ // <UAC00> \xB0\xA1 |0
+ // <UFF5D> \xA3\xFD |0
+ // <U223C> \xA1\xAD |0 (in extension table)
+ {
+ "JIS8", // =ISO_2022,locale=ja,version=4
+ "a\uff61\u03d5\uff5d\uac00\u223c\uff5d\u30fe\uff5d", // Make it switch to ISO-8859-7, KSC 5601 and JIS X 0208.
+ :bin{ 61a11b2e461b4e761b244221511b2428433021212d237d1b2442213421511b2842 },
+ :intvector{ 0,1,2,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,5,5,6,6,7,7,7,7,7,8,8,8,8,8 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ // Code coverage for UTF-8->SBCS conversion (ucnv_convertEx()).
+ // Test code path for non-roundtripping ASCII characters
+ // (try EBCDIC SBCS, and IBM PC SBCS with control code rotation).
+ {
+ "ibm-37",
+ "a\x85c",
+ :bin{ 811583 },
+ :intvector{ 0,1,2 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ {
+ "ibm-850",
+ "a\x1ac",
+ :bin{ 617f63 },
+ :intvector{ 0,1,2 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ // Code coverage for UTF-8->DBCS conversion (ucnv_convertEx()).
+ // Test code path for non-roundtripping ASCII characters
+ // (try IBM PC DBCS with control code rotation).
+ {
+ "ibm-943",
+ "a\x1ac\u30a1\x7ff",
+ :bin{ 617f6383401c66 },
+ :intvector{ 0,1,2,3,3,4,5 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ // SCSU regression test.
+ {
+ "SCSU",
+ "1\U00010001\u0085\U000500022\ud8003\udc014\ue001",
+ :bin{ 310be0008102050fd900dc02e7320efffd330efffd34186881 },
+ :intvector{ 0,1,1,1,1,3,3,4,4,4,4,4,6,6,7,7,7,8,9,9,9,10,11,11,11 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ // Test substitution strings.
+ {
+ "windows-1252", // stateless MBCS with WriteSub(), should internally set char *
+ "a\ufdd0c",
+ :bin{ 61402421402463 },
+ :intvector{ 0,1,1,1,1,1,2 },
+ :int{1}, :int{0}, "", "?=@$!@$", ""
+ }
+ {
+ "windows-1252",
+ "1\U00010001\u0085\U000500022\ud8003\udc014\ue001",
+ :bin{ 311a1a1a321a331a341a },
+ :intvector{ 0,1,3,4,6,7,8,9,10,11 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ {
+ "windows-1252",
+ "\uD87E", // lone surrogate can cause an offset overflow
+ :bin{ 1a },
+ :intvector{ 0 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ {
+ "windows-1252",
+ "\uD87E", // lone surrogate can cause an offset overflow
+ :bin{ 6875683f },
+ :intvector{ 0,0,0,0 },
+ :int{1}, :int{0}, "", "?=huh?", "" // Use a long substitution character
+ }
+ {
+ "*test4",
+ "\u30ab", // An incomplete multi-codepoint character
+ :bin{ ff },
+ :intvector{ 0 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ {
+ "ibm-930", // stateful MBCS
+ "a\ufdd0\u4e00\ufdd0e",
+ :bin{ 620e4bce0f400e45414bce0f4066 },
+ :intvector{ 0,1,1,1,1,1,2,2,2,3,3,3,3,4 },
+ :int{1}, :int{0}, "", "?=\u4e01 ", ""
+ }
+ {
+ "iso-2022-jp",
+ "a\x1bc", // Unicode ESC must not occur as a character
+ :bin{ 6163 },
+ :intvector{ 0,2 },
+ :int{1}, :int{0}, "", "?=", "" // empty substitution string
+ }
+ {
+ "iso-2022-cn",
+ "a\x1bc", // Unicode ESC must not occur as a character
+ :bin{ 61202063 },
+ :intvector{ 0,1,1,2 },
+ :int{1}, :int{0}, "", "?= ", ""
+ }
+ {
+ "iso-2022-cn",
+ "a\x1bc", // Unicode ESC must not occur as a character
+ :bin{ 611b2429410e523b0f2063 },
+ :intvector{ 0,1,1,1,1,1,1,1,1,1,2 },
+ :int{1}, :int{0}, "", "?=\u4e00 ", ""
+ }
+ {
+ "us-ascii",
+ "a\x85c",
+ :bin{ 61402421402463 },
+ :intvector{ 0,1,1,1,1,1,2 },
+ :int{1}, :int{0}, "", "?=@$!@$", ""
+ }
+ // ISO 2022-CN: test a single-byte subchar, j5171
+ {
+ "iso-2022-cn",
+ "a\x1bc", // Unicode ESC must not occur as a character
+ :bin{ 612163 },
+ :intvector{ 0,1,2 },
+ :int{1}, :int{0}, "", "?\x00\x21", ""
+ }
+ // UTF-16/32: do not output a BOM if there is no data at all
+ {
+ "UTF-16",
+ "",
+ :bin{ "" },
+ :intvector{ },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "UTF-32",
+ "",
+ :bin{ "" },
+ :intvector{ },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // do not convert SO/SI/ESC
+ {
+ "iso-2022-jp",
+ "A\x0eB\x0f\x09\x1bC",
+ :bin{ 411a421a091a43 },
+ :intvector{ 0,1,2,3,4,5,6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "iso-2022-cn",
+ "A\x0eB\x0f\x09\x1bC",
+ :bin{ 411a421a091a43 },
+ :intvector{ 0,1,2,3,4,5,6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "iso-2022-kr",
+ "A\x0eB\x0f\x09\x1bC",
+ :bin{ 1b242943411a421a091a43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,3,4,5,6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "ibm-25546",
+ "A\x0eB\x0f\x09\x1bC",
+ :bin{ 1b242943411a421a091a43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,3,4,5,6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // test ISO 8859-1/7 vs. JIS X 0201
+ {
+ "ISO-2022-JP-2",
+ "?@A\u00e4\u03b1\u203EB",
+ :bin{ 3f40411B2E411B4E641B2E461B4E611B284A7E421B2842 },
+ :intvector{ 0,1,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // Improve ucnv_ext.c code coverage:
+ // There will be a partial match up to the lead surrogate of U+603ff
+ // which then results in one more unit in the prefetch buffer
+ // than the match length when converting one code unit at a time.
+ // See ucnv_extContinueMatchFromU() comment
+ // "the match did not use all of preFromU[] - keep the rest for replay"
+ {
+ "*test3",
+ "\U00101234\U00101234\U00050005\U000603ff",
+ :bin{ 07070001020e05ff },
+ :intvector{ 0, 2, 2, 2, 2, 2, 2, 6 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ // test that ISO-2022-JP encodes ASCII as itself
+ {
+ "ISO-2022-JP",
+ "?@ABCDEFG",
+ :bin{ 3f4041424344454647 },
+ :intvector{ 0,1,2,3,4,5,6,7,8 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ // test that ISO-2022-CN encodes ASCII as itself
+ {
+ "ISO-2022-CN",
+ "?@ABCDEFG",
+ :bin{ 3f4041424344454647 },
+ :intvector{ 0,1,2,3,4,5,6,7,8 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // moved from cintltst /tsconv/nccbtst/TestSkipCallBack
+ {
+ "iso-2022-jp",
+ "\u3000\xe9\u3001",
+ :bin{ 1b2442212121221b2842 },
+ :intvector{ 0,0,0,0,0,2,2,2,2,2 },
+ :int{1}, :int{1}, "", "0", ""
+ }
+ // moved from cintltst /tsconv/nccbtst/TestSubCallBack
+ {
+ "iso-2022-jp",
+ "A\xe9B\xe9\u3000",
+ :bin{ 411a421a1b244221211b2842 },
+ :intvector{ 0,1,2,3,4,4,4,4,4,4,4,4 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ // moved from cintltst /tsconv/nccbtst/TestSubWithValueCallBack
+ {
+ "iso-2022-jp",
+ "A\xe9B\xe9\u3000",
+ :bin{ 41255530304539422555303045391b244221211b2842 },
+ :intvector{ 0,1,1,1,1,1,1,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4 },
+ :int{1}, :int{1}, "", "&", ""
+ }
+ {
+ "iso-2022-cn",
+ "\u4e00\u3712\u4e01",
+ :bin{ 1b2429410e523b0f2555333731320e36210f },
+ :intvector{ 0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2 },
+ :int{1}, :int{1}, "", "&", ""
+ }
+ {
+ "iso-2022-cn",
+ "A\u3712\u4e00",
+ :bin{ 412555333731321b2429410e523b0f },
+ :intvector{ 0,1,1,1,1,1,1,2,2,2,2,2,2,2,2 },
+ :int{1}, :int{1}, "", "&", ""
+ }
+ {
+ "iso-2022-cn",
+ "\u3000\u3712\u3001",
+ :bin{ 1b2429410e21210f2555333731320e21220f },
+ :intvector{ 0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2 },
+ :int{1}, :int{1}, "", "&", ""
+ }
+
+ // moved from cintltst /tsconv/nucnvtst/TestJIS
+ {
+ "JIS",
+ "\uFF81\uFF82\u30EC\u30ED\u30EE\u30EF\uFF93\uFF94\uFF95\uFF96\uFF97\uFF98",
+ :bin{ 1b244225412544256c256d256e256F25622564256625682569256a1b2842 },
+ :intvector{ 0,0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,11,11,11 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "JIS7",
+ "\uFF81\uFF82\u30EC\u30ED\u30EE\u30EF\uFF93\uFF94\uFF95\uFF96\uFF97\uFF98",
+ :bin{ 0e41420f1b2442256c256d256e256F0e5354555657580f1b2842 },
+ :intvector{ 0,0,1,2,2,2,2,2,2,3,3,4,4,5,5,6,6,7,8,9,10,11,11,11,11,11 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "JIS8",
+ "\uFF81\uFF82\u30EC\u30ED\u30EE\u30EF\uFF93\uFF94\uFF95\uFF96\uFF97\uFF98",
+ :bin{ C1C21b2442256c256d256e256F1b284AD3D4D5D6D7D81b2842 },
+ :intvector{ 0,1,2,2,2,2,2,3,3,4,4,5,5,6,6,6,6,7,8,9,10,11,11,11,11 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // moved from cintltst /tsconv/ncnvtst/TestErrorBehaviour
+ {
+ "iso-2022-jp",
+ "\u3000\x50\udc01\u3001",
+ :bin{ 1B244221211B2842501A1B24422122 },
+ :intvector{ 0,0,0,0,0,1,1,1,1,2,3,3,3,3,3 },
+ :int{0}, :int{1}, "", "?", "\udc01"
+ }
+ {
+ "iso-2022-jp",
+ "\u3000\x50\udc01\u3001",
+ :bin{ 1B244221211B2842501A1B244221221b2842 },
+ :intvector{ 0,0,0,0,0,1,1,1,1,2,3,3,3,3,3,3,3,3 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "iso-2022-kr",
+ "\x61\u4e00\udc01\u4e00",
+ :bin{ 1b242943610e6c690f1a0e6c69 },
+ :intvector{ -1,-1,-1,-1,0,1,1,1,2,2,3,3,3 },
+ :int{0}, :int{1}, "", "?", "\udc01"
+ }
+ {
+ "iso-2022-kr",
+ "\x61\u4e00\udc01\u4e00",
+ :bin{ 1b242943610e6c690f1a0e6c690f },
+ :intvector{ -1,-1,-1,-1,0,1,1,1,2,2,3,3,3,3 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // ISO-2022-KR
+ {
+ "ibm-25546",
+ "AB\uc88b\U00050005\uacccC",
+ :bin{ 1b24294341420e41410f7b552b35303030357d0e306a0f43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,3,3,3,3,3,3,3,3,5,5,5,6,6 },
+ :int{1}, :int{1}, "", "&U", ""
+ }
+ {
+ "ibm-25546",
+ "AB\uc88b\U00050005\uacccC",
+ :bin{ 1b24294341420e41410f1a0e306a0f43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,5,5,5,6,6 },
+ :int{1}, :int{1}, "", "?\x00\x1a", ""
+ }
+ {
+ "ibm-25546",
+ "AB\uc88b\U00050005\uacccC",
+ :bin{ 1b24294341420e41412f7e306a0f43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,5,5,6,6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "ibm-25546",
+ "AB\uc88b\U00050005\uaccc",
+ :bin{ 1b24294341420e41412f7e306a0f },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,5,5,5 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "ISO-2022-KR",
+ "AB\uc88b\U00050005\uacccC",
+ :bin{ 1b24294341420e41410f7b552b35303030357d0e306a0f43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,3,3,3,3,3,3,3,3,5,5,5,6,6 },
+ :int{1}, :int{1}, "", "&U", ""
+ }
+ {
+ "ISO-2022-KR",
+ "AB\uc88b\U00050005\uacccC",
+ :bin{ 1b24294341420e41410f1a0e306a0f43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,5,5,5,6,6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "ISO-2022-KR",
+ "AB\uc88b\U00050005\uacccC",
+ :bin{ 1b24294341420e41412f7e306a0f43 },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,5,5,6,6 },
+ :int{1}, :int{1}, "", "?\x00\x2f\x7e", ""
+ }
+ {
+ "ISO-2022-KR",
+ "AB\uc88b\U00050005\uaccc",
+ :bin{ 1b24294341420e41412f7e306a0f },
+ :intvector{ -1,-1,-1,-1,0,1,2,2,2,3,3,5,5,5 },
+ :int{1}, :int{1}, "", "?\x00\x2f\x7e", ""
+ }
+
+ // ISO-2022-JP-2 with G2 designator & SS2 shift
+ {
+ "ISO-2022-JP-2",
+ "CF\u758f\u038f\u7591",
+ :bin{ 43461b244241411b2e461b4e3f353f1b2842 },
+ :intvector{ 0,1,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4 },
+ :int{1}, :int{1}, "", ".", ""
+ }
+ // JIS7 with Katakana
+ {
+ "JIS7",
+ "AB\uff81\uff82AB",
+ :bin{ 41420e41420f4142 },
+ :intvector{ 0,1,2,2,3,4,4,5 },
+ :int{1}, :int{1}, "", ".", ""
+ }
+ // JIS7 with shift to ASCII at the very end
+ {
+ "JIS7",
+ "AB\uff81\uff82",
+ :bin{ 41420e41420f },
+ :intvector{ 0,1,2,2,3,3 },
+ :int{1}, :int{1}, "", ".", ""
+ }
+ // JIS8 with Katakana
+ {
+ "JIS8",
+ "A\uff81\\\xa5\uff82B",
+ :bin{ 41c15c1b284a5cc2421b2842 },
+ :intvector{ 0,1,2,3,3,3,3,4,5,5,5,5 },
+ :int{1}, :int{1}, "", ".", ""
+ }
+
+ // ISO-2022-CN-EXT with all subcharsets and shifts and with supplementary code points
+ {
+ "ISO-2022-CN-EXT",
+ "\u4eae\u9f82\u56cd\u56cc\U0002a6d6\x30",
+ :bin{ 1b2429410e41411b2429457e7c1b242a481b4e70341b2429477c341b242b4d1b4f664c0f30 },
+ :intvector{ 0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4,6,6 },
+ :int{1}, :int{1}, "", ".", ""
+ }
+ // ISO-2022-CN-EXT with shift to ASCII at the very end
+ {
+ "ISO-2022-CN-EXT",
+ "\u4eae\u9f82\u56cd\u56cc\U0002a6d6",
+ :bin{ 1b2429410e41411b2429457e7c1b242a481b4e70341b2429477c341b242b4d1b4f664c0f },
+ :intvector{ 0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4 },
+ :int{1}, :int{1}, "", ".", ""
+ }
+ // ISO-2022-CN-EXT without flush so do not shift to ASCII at the very end
+ {
+ "ISO-2022-CN-EXT",
+ "\u4eae\u9f82\u56cd\u56cc\U0002a6d6",
+ :bin{ 1b2429410e41411b2429457e7c1b242a481b4e70341b2429477c341b242b4d1b4f664c },
+ :intvector{ 0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4 },
+ :int{0}, :int{1}, "", ".", ""
+ }
+
+ // windows-936 vs. ibm-1386
+ {
+ "ibm-1386",
+ "\x1a\u20ac\u5555\x80\x81\U00055555",
+ :bin{ 7fa2e3dffb7f7fa1a1 },
+ :intvector{ 0, 1, 1, 2, 2, 3, 4, 5, 5 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ {
+ "windows-936",
+ "\x1a\u20ac\u5555\x80\x81\U00055555",
+ :bin{ 1a80dffb3f3f3f },
+ :intvector{ 0, 1, 2, 2, 3, 4, 5 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // verify that if a conversion table does not have any mapping for U+0000,
+ // then there will not even be a phantom fallback to 00
+ {
+ "ibm-971",
+ "\x00",
+ :bin{ affe },
+ :intvector{ 0, 0 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ {
+ "*test4",
+ "\x00",
+ :bin{ ff },
+ :intvector{ 0 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // extension in testdata
+ {
+ "*test4x",
+ "\u20ac\x09",
+ :bin{ 0009 },
+ :intvector{ 0, 1 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // DBCS-only extensions
+ {
+ "ibm-970",
+ "\x61\uffa1\u2015\ub000",
+ :bin{ 611aa1aab2eb },
+ :intvector{ 0, 1, 2, 2, 3, 3 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ {
+ "ibm-971",
+ "\x61\uffa1\u2015\ub000",
+ :bin{ affeaffeaffeb2eb },
+ :intvector{ 0, 0, 1, 1, 2, 2, 3, 3 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ {
+ "ibm-1390,swaplfnl",
+ "\uff63\u30C8\u30C8\u309A\u3000\x41\u20ac\x0a",
+ :bin{ 430e4395ecc140400fc1e115 },
+ :intvector{ 0, 1, 1, 1, 2, 2, 4, 4, 5, 5, 6, 7 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ {
+ "ibm-16684",
+ "\uff63\u30C8\u30C8\u309A\u3000\x41\u20ac\x0a",
+ :bin{ fefe4395ecc14040fefe42e1fefe },
+ :intvector{ 0, 0, 1, 1, 2, 2, 4, 4, 5, 5, 6, 6, 7, 7 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ {
+ "ibm-1399",
+ "\uff63\u30C8\u30C8\u309A\u3000\x41\u20ac\x0a",
+ :bin{ 440e4395ecc140400fc1e125 },
+ :intvector{ 0, 1, 1, 1, 2, 2, 4, 4, 5, 5, 6, 7 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ // <subchar1> from |2 mappings
+ {
+ "ibm-1390",
+ "\x0e\x0f\u0901\U00050000\uffe8\uffee",
+ :bin{ 3f3f0efefefefe0f3f3f },
+ :intvector{ 0, 1, 2, 2, 2, 3, 3, 5, 5, 6 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // <subchar1> from |2 mappings, and also contains a fallback to 00
+ {
+ "*test4",
+ "\u20ac\u20ad\U00050005\U00023456\U0010ffff\x30",
+ :bin{ 0000e10102030affff },
+ :intvector{ 0, 1, 2, 4, 4, 4, 4, 6, 8 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // setting a <subchar> resets the <subchar1>
+ {
+ "*test4",
+ "\u20ac\u20ad\U00050005\U00023456\U0010ffff\x30",
+ :bin{ 00000102030f0102030a0102030f0102030f },
+ :intvector{ 0, 1, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8 },
+ :int{1}, :int{1}, "", "?\x00\x01\x02\x03\x0f", ""
+ }
+
+ // fallback to 00 with old single-byte data structure
+ {
+ "*test1",
+ "\u20ac\u20ad\U00101234\U00050000",
+ :bin{ 000007ff },
+ :intvector{ 0, 1, 2, 4 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+
+ // extensions
+ {
+ "ibm-1390",
+ "\u025a\u025a\u0300\u025a\u0301\u025a\u0302\uffe8\U0002a0f9",
+ :bin{ 0ed896eccaeccbd896ea530f3f0eb7c20f },
+ :intvector{ 0, 0, 0, 1, 1, 3, 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ {
+ "*test3",
+ "\xc4\xc4\xc4\U00101234\xc4\xc4\U00101234\x05",
+ :bin{ ffffff070501020c },
+ :intvector{ 0, 1, 2, 3, 5, 5, 5, 5 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ {
+ "*test3",
+ "\U00101234\U00101234\U00050005\U00101234\U00050005\U00060006",
+ :bin{ 07070001020e05070001020f09 },
+ :intvector{ 0, 2, 2, 2, 2, 2, 2, 6, 6, 6, 6, 6, 6 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ // normal conversions
+ {
+ "UTF-16LE",
+ "1\U00010001\U000500022\ud8003\udc014",
+ :bin{ 310000d801dc00d902dc3200fdff3300fdff3400 },
+ :intvector{ 0, 0, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ { "UTF-16LE", "\ud800", :bin{""}, :intvector{}, :int{1}, :int{0}, "truncated", ".", "\ud800" }
+
+ {
+ "UTF-16BE",
+ "1\U00010001\U000500022\ud8003\udc014",
+ :bin{ 0031d800dc01d900dc020032fffd0033fffd0034 },
+ :intvector{ 0, 0, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ { "UTF-16BE", "\ud800", :bin{""}, :intvector{}, :int{1}, :int{0}, "truncated", ".", "\ud800" }
+
+ {
+ "SCSU",
+ "1\U00010001\u00082\ud8003\udc014\ue001",
+ :bin{ 310be000810108320efffd330efffd34186881 },
+ :intvector{ 0, 1, 1, 1, 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 9 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ // escape callback
+ {
+ "ISCII",
+ "A\u0901\U00023456\u0902B\U00023456C",
+ :bin{ 41ef42a1255544383444255544433536a24225554438344425554443353643 },
+ :intvector{
+ 0,
+ 1,1,1,
+ 2,2,2,2,2,2,
+ 2,2,2,2,2,2,
+ 4,
+ 5,
+ 6,6,6,6,6,6,
+ 6,6,6,6,6,6,
+ 8
+ },
+ :int{1}, :int{0}, "", "&", ""
+ }
+
+ // escape callback (hex)
+ {
+ "iso-2022-jp",
+ "\u3000\U00023456\u3001\U00023456B\u901c",
+ :bin{ 1b244221211b284226237832333435363b1b244221221b284226237832333435363b42262378393031433b },
+ :intvector{
+ 0,0,0,0,0,
+ 1,1,1,1,1,1,1,1,1,1,1,1,
+ 3,3,3,3,3,
+ 4,4,4,4,4,4,4,4,4,4,4,4,
+ 6,
+ 7,7,7,7,7,7,7,7
+ },
+ :int{1}, :int{0}, "", "&X", ""
+ }
+
+ // sub callback
+ {
+ "gb18030",
+ "$\x7f\x80\u01f9\u20ac\u4e00\u9fa6\uffff\U00010000\U0010ffff",
+ :bin{ 247f81308130a8bfa2e3d2bb82358f338431a43990308130e3329a35 },
+ :intvector{ 0, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 10, 10, 10, 10 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+
+ // skip callback
+ { "ibm-930", "\u6D63\u6D64\u6D65\u6D66", :bin{ 0e5d5f5d63466b0f }, :intvector{ 0, 0, 0, 1, 1, 3, 3, 3 }, :int{1}, :int{0}, "", "0", "" }
+ { "ibm-930", "\u6D63\u6D64\ud89a\u6D66", :bin{ 0e5d5f5d63466b0f }, :intvector{ 0, 0, 0, 1, 1, 3, 3, 3 }, :int{1}, :int{0}, "", "0", "" }
+ { "ibm-930", "\u6D63\u6D64\ud89a\u6D66", :bin{ 0e5d5f5d63 }, :intvector{ 0, 0, 0, 1, 1 }, :int{1}, :int{0}, "illegal", "0i", "\ud89a" }
+
+ // sub callback for supplementary code point
+ { "LATIN1", "1\U000104012", :bin{ 311a32 }, :intvector{ 0, 1, 3 }, :int{1}, :int{0}, "", "", "" }
+ { "ibm-920", "1\U000104012", :bin{ 311a32 }, :intvector{ 0, 1, 3 }, :int{1}, :int{0}, "", "", "" }
+
+ // sub callback with AA as subchar
+ { "ibm-920", "1\U000104012", :bin{ 31AA32 }, :intvector{ 0, 1, 3 }, :int{1}, :int{0}, "", "?\x00\xAA", "" }
+
+ // same but not flushing
+ { "LATIN1", "1\U000104012", :bin{ 311a32 }, :intvector{ 0, 1, 3 }, :int{0}, :int{0}, "", "", "\U00010401" }
+ { "ibm-920", "1\U000104012", :bin{ 311a32 }, :intvector{ 0, 1, 3 }, :int{0}, :int{0}, "", "", "\U00010401" }
+
+ // simple sample, no error handling
+ { "UTF-8", "a\U0010FFFF", :bin{ 61F48FBFBF }, :intvector{ 0, 1, 1, 1, 1 }, :int{1}, :int{0}, "", "", "" }
+
+ // Verify that incomplete surrogates are handled as an error
+ { "UTF-8", "a\udc00", :bin{ 61efbfbd }, :intvector{ 0, 1, 1, 1 }, :int{1}, :int{0}, "", "", "" }
+ { "UTF-8", "a\ud800", :bin{ 61efbfbd }, :intvector{ 0, 1, 1, 1 }, :int{1}, :int{0}, "", "", "" }
+ { "UTF-8", "a\udc00b", :bin{ 61efbfbd62 }, :intvector{ 0, 1, 1, 1, 2 }, :int{1}, :int{0}, "", "", "" }
+ { "UTF-8", "a\ud800b", :bin{ 61efbfbd62 }, :intvector{ 0, 1, 1, 1, 2 }, :int{1}, :int{0}, "", "", "" }
+
+ // Code coverage for the EUC variants.
+ { "EUC-JP", "\u0061\u4edd\u5bec\ud801\udc01\ud801\u0061\u00a2", :bin{ 61a1b88ff4ae618ee0 }, :intvector{ 0, 1, 1, 2, 2, 2, 6, 7, 7 }, :int{1}, :int{0}, "", "0", "" }
+ { "EUC-JP", "\u0061\u4edd\u5bec\ud801\udc01\ud801\u0061\u00a2", :bin{ 61a1b88ff4aef4fef4fe618ee0 }, :intvector{ 0, 1, 1, 2, 2, 2, 3, 3, 5, 5, 6, 7, 7 }, :int{1}, :int{0}, "", "", "" }
+ { "EUC-TW", "\u0061\u2295\u5BF2\ud801\udc01\ud801\u0061\u8706\u008a", :bin{ 61a2d38ea2dce561e6ca8a }, :intvector{ 0, 1, 1, 2, 2, 2, 2, 6, 7, 7, 8 }, :int{1}, :int{0}, "", "0", "" }
+ { "EUC-TW", "\u0061\u2295\u5BF2\ud801\udc01\ud801\u0061\u8706\u008a", :bin{ 61a2d38ea2dce5fdfefdfe61e6ca8a }, :intvector{ 0, 1, 1, 2, 2, 2, 2, 3, 3, 5, 5, 6, 7, 7, 8 }, :int{1}, :int{0}, "", "", "" }
+ }
+ }
+
+ getUnicodeSet {
+ // charset - will be opened, and ucnv_getUnicodeSet() called on it
+ // map - set of code points and strings that must be in the returned set
+ // mapnot - set of code points and strings that must *not* be in the returned set
+ // which - numeric UConverterUnicodeSet value
+ Headers { "charset", "map", "mapnot", "which" }
+ Cases {
+ // Unicode charsets that do not map surrogate code points
+ {
+ "UTF-8",
+ "[\x00-\ud7ff\ue000-\U0010ffff]",
+ "[\ud800-\udfff]",
+ :int{0}
+ }
+ {
+ "UTF-16",
+ "[\x00-\ud7ff\ue000-\U0010ffff]",
+ "[\ud800-\udfff]",
+ :int{0}
+ }
+ {
+ "UTF-16BE",
+ "[\x00-\ud7ff\ue000-\U0010ffff]",
+ "[\ud800-\udfff]",
+ :int{0}
+ }
+ {
+ "UTF-16LE",
+ "[\x00-\ud7ff\ue000-\U0010ffff]",
+ "[\ud800-\udfff]",
+ :int{0}
+ }
+ {
+ "UTF-32",
+ "[\x00-\ud7ff\ue000-\U0010ffff]",
+ "[\ud800-\udfff]",
+ :int{0}
+ }
+ {
+ "UTF-32BE",
+ "[\x00-\ud7ff\ue000-\U0010ffff]",
+ "[\ud800-\udfff]",
+ :int{0}
+ }
+ {
+ "UTF-32LE",
+ "[\x00-\ud7ff\ue000-\U0010ffff]",
+ "[\ud800-\udfff]",
+ :int{0}
+ }
+
+ // Unicode charsets that do map surrogate code points
+ {
+ "UTF-7",
+ "[\x00-\U0010ffff]",
+ "[]",
+ :int{0}
+ }
+ {
+ "SCSU",
+ "[\x00-\U0010ffff]",
+ "[]",
+ :int{0}
+ }
+ {
+ "BOCU-1",
+ "[\x00-\U0010ffff]",
+ "[]",
+ :int{0}
+ }
+ {
+ "CESU-8",
+ "[\x00-\U0010ffff]",
+ "[]",
+ :int{0}
+ }
+
+ // versions of ISO-2022-KR
+ {
+ "ISO-2022-KR",
+ "[\x00-\x0d\x10-\x1a\x1c-\x7f\xa1\xa4\xfe\u0111\u4e00\u4e01\uac00-\uac02\uffe6]",
+ "[\x0e\x0f\x1b\x80-\xa0\xa3\xa5\xff-\u0110\uac03\uffe7-\U0010ffff]",
+ :int{0}
+ }
+ {
+ "ibm-25546",
+ "[\x00-\x0d\x10-\x1a\x1c-\x7f\xa1\xa4\xfe\u0111\u4e00\u4e01\uac00-\uac01\uffe6]",
+ "[\x0e\x0f\x1b\x80-\xa0\xa3\xa5\xff-\u0110\uac02\uffe7-\U0010ffff]",
+ :int{0}
+ }
+
+ // versions of ISO-2022-JP
+ {
+ "ISO-2022-JP",
+ "[\x00-\x0d\x10-\x1a\x1c-\x7f\u0391-\u03a1\uff61-\uff9f\u4e00\u4e01\uffe5]",
+ "[\x0e\x0f\x1b\u0100-\u0113\u0385-\u038a\u4e02\u4e27-\u4e29\uffe6-\U0010ffff]",
+ :int{0}
+ }
+ {
+ "ISO-2022-JP-2",
+ "[\x00-\x0d\x10-\x1a\x1c-\u0113\u0384-\u0386\u0388-\u038a\u0390-\u03a1\uff61-\uff9f\u4e00-\u4e05\uffe6]",
+ "[\x0e\x0f\x1b\uffe7-\U0010ffff]",
+ :int{0}
+ }
+
+ // versions of ISO-2022-CN
+ {
+ "ISO-2022-CN",
+ "[\x00-\x0d\x10-\x1a\x1c-\x7f\u4e00\u4e01\u9f98\ufe6b]",
+ "[\x0e\x0f\x1b\u4e29\uffe6-\U0010ffff]",
+ :int{0}
+ }
+ {
+ "ISO-2022-CN-EXT",
+ "[\x00-\x0d\x10-\x1a\x1c-\x7f\u4e00-\u4e05\u9f98\ufe6b\u4e28-\u4e2b\U00020000\U00020003-\U00020005\U00029664]",
+ "[\x0e\x0f\x1b\U00020001\U00020002\U0002a6d7-\U0010ffff]",
+ :int{0}
+ }
+
+ // DBCS-only
+ {
+ "ibm-971",
+ "[\xa1\xa4\uac01\ub000]",
+ "[\x00-\x9f\u2015]",
+ :int{0}
+ }
+
+ {
+ "ibm-16684",
+ "[\xa0\xa1\xa4\xa6-\xab\xad-\u017f\u0254\u309b-\u30ff\u4e00-\u4e05\U00023d00\U000243bc\U0002a6b2"
+ "{\u0254\u0300}{\u0254\u0301}{\u304b\u309a}{\u30ad\u309a}{\u30af\u309a}]",
+ "[\x00-0x9f\xa2\xa3\xa5\xac\u0200-\u024f\U00010000-\U0001ffff\U0002a61b-\U0002a6b1]",
+ :int{0}
+ }
+
+ // extensions
+ {
+ "ibm-1390",
+ "[\x00-\x0d\x10-\u017f\u0254\u309b-\u30ff\u4e00-\u4e05\U00023d00\U000243bc\U0002a6b2"
+ "{\u0254\u0300}{\u0254\u0301}{\u304b\u309a}{\u30ad\u309a}{\u30af\u309a}]",
+ "[\x0e\x0f\u0200-\u024f\U00010000-\U0001ffff\U0002a61b-\U0002a6b1]",
+ :int{0}
+ }
+
+ {
+ "*test3",
+ "[\x05\x0b\xc0\u20ac\U00023456\U00101234"
+ "{\U00101234\U00050005\U00060006}{\U00101234\U00050005}{\U00101234\U00060006}{\xc4\xc4\U00101234\x05}]",
+ "[\x06\x0e\U00034567\U000febcd{\U00101234\U00070007}]",
+ :int{0}
+ }
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/csdetest.xml b/Build/source/libs/icu/icu-xetex/test/testdata/csdetest.xml
new file mode 100644
index 00000000000..03b0ac8583f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/csdetest.xml
@@ -0,0 +1,551 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Copyright (c) 2005-2007 IBM Corporation and others. All rights reserved -->
+<!-- See individual test cases for their specific copyright. -->
+
+<charset-detection-tests>
+ <test-case id="IUC10-ar" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-6/ar windows-1256/ar">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ أوروبا, برمجيات الحاسوب + انترنيت :
+ تصبح عالميا مع يونيكود
+ IUC10
+ تسجّل الآن لحضور المؤتمر الدولي العاشر ليونيكود, الذي سيعقد ÙÙŠ 10-12 آذار 1997 بمدينة ماينتس,
+ ألمانيا. وسيجمع المؤتمر بين خبراء من كاÙØ© قطاعات الصناعة على الشبكة العالمية انترنيت ويونيكود, حيث ستتم,
+ على الصعيدين الدولي والمحلي على حد سواء مناقشة سبل استخدام يونكود ÙÙŠ النظم القائمة ÙˆÙيما يخص التطبيقات
+ الحاسوبية, الخطوط, تصميم النصوص والحوسبة متعددة اللغات.
+
+ Unicode
+ عندما يريد العالم أن يتكلّم, Ùهو يتحدّث بلغة يونيكود
+
+ </test-case>
+
+ <test-case id="IUC10-da-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1252/da">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software + Internet:
+ Bliv global med Unicode
+ IUC10
+ Indskriv dig nu til den tiende internationale Unicode-konference, der holdes den 10-12
+ marts 1997 i Mainz, Tyskland. Konferencen samler eksperter fra hele verden inden for det
+ globale Internet og Unicode, internationalisering og lokalisering, implementering af
+ Unicode i styresystemer og programmer, skrifttyper, tekst-layout og flersproget databehandling.
+
+ Unicode
+ NÃ¥r verden vil tale, taler den “Unicode.â€
+
+ </test-case>
+
+ <test-case id="IUC10-da" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/da">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software + Internet:
+ Bliv global med Unicode
+ IUC10
+ Indskriv dig nu til den tiende internationale Unicode-konference, der holdes den 10-12
+ marts 1997 i Mainz, Tyskland. Konferencen samler eksperter fra hele verden inden for det
+ globale Internet og Unicode, internationalisering og lokalisering, implementering af
+ Unicode i styresystemer og programmer, skrifttyper, tekst-layout og flersproget databehandling.
+
+ Unicode
+ NÃ¥r verden vil tale, taler den Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-de" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/de">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software + das Internet:
+ International mit Unicode
+ IUC10
+ Melden Sie sich jetzt für die 10. Internationale Unicode Konferenz an, die in der Zeit vom 10.-12. März 1997 in
+ Mainz stattfinden wird. Die Konferenz ist ein Treffpunkt für Betriebsexperten aus den Bereichen globales
+ Internet und Unicode, Internationalisierung und Lokalisierung, die Implementierung von Unicode in
+ Betriebssystemen und Programmen, sowie für Schriftarten, Textlayout und mehrsprachige Computeranwendungen.
+
+ Unicode
+ Wenn die Welt miteinander spricht, spricht sie Unicode.
+
+ </test-case>
+
+ <!-- No UTF-8 in this test because there are no non-ASCII characters. -->
+ <test-case id="IUC10-en" encodings="UTF-32BE UTF-32LE ISO-8859-1/en">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europe, Software + the Internet:
+ Going Global with Unicode
+ IUC10
+ Register now for the Tenth International Unicode Conference, to be held on March 10-12, 1997,
+ in Mainz, Germany. The Conference will bring together industry-wide experts on the global Internet and
+ Unicode, internationalization and localization, implementation of Unicode in operating systems and applications,
+ fonts, text layout, and multilingual computing.
+
+ Unicode
+ When the world wants to talk, it speaks Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-es" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/es">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software + el Internet:
+ Mundializando con Unicode
+ IUC10
+ Inscríbase ahora para la Décima Conferencia Internacional Unicode, que tendrá lugar del 10 al 12 de marzo de
+ 1997 en Maguncia, Alemania. La Conferencia reunirá expertos de los sectores de la mundialización del Internet y
+ Unicode, la internacionalización y localización, implementación de Unicode en sistemas operativos y aplicaciones,
+ tipos, composición de texto e informática multilingüe.
+
+ Unicode
+ Cuando el mundo quiere conversar, habla Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-fr" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/fr">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ L'Europe, le logiciel et l'Internet :
+ la mondialisation avec Unicode
+ IUC10
+ Inscrivez-vous dès maintenant à la dixième Conférence internationale sur Unicode, qui se tiendra du 10 au 12
+ mars 1997 à Mayence, en Allemagne. Cette conférence rassemblera des experts de tous les horizons industriels
+ sur les sujets suivants : l'Internet mondial et Unicode, l'internationalisation et l'adaptation locale,
+ l'implémentation d'Unicode dans les systèmes d'exploitation et les applications, les polices de caractères,
+ la disposition de texte, l'informatique plurilingue.
+
+ Unicode
+ Quand le monde veut communiquer, il parle en Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-he" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-8-I/he">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ ×ירופה, תוכנה וה×ינטרנט:
+ Unicode ×™×•×¦× ×œ×©×•×§ העולמי
+ IUC10
+ הירשמו כעת לכנס Unicode הבינל×ומי העשירי, שייערך בין הת××¨×™×›×™× 12-10 במרץ 1997, במיינץ שבגרמניה. בכנס
+ ישתתפו ×ž×•×ž×—×™× ×ž×›×œ ענפי התעשייה ×‘× ×•×©× ×”×ינטרנט העולמי וה-Unicode, בהת×מה לשוק הבינל×ומי והמקומי, ביישו×
+ Unicode במערכות הפעלה וביישומי×, בגופני×, בפריסת טקסט ובמחשוב רב-לשוני.
+
+ Unicode
+ ×›×שר ×”×¢×•×œ× ×¨×•×¦×” לדבר, ×”×•× ×ž×“×‘×¨ ב-Unicode
+
+ </test-case>
+
+ <test-case id="IUC10-he-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1255/he">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ ×ירופה, תוכנה וה×ינטרנט:
+ Unicode ×™×•×¦× ×œ×©×•×§ העולמי
+ IUC10
+ הירשמו כעת לכנס Unicode הבינל×ומי העשירי, שייערך בין הת××¨×™×›×™× 12-10 במרץ 1997, במיינץ שבגרמניה. בכנס
+ ישתתפו ×ž×•×ž×—×™× ×ž×›×œ ענפי התעשייה ×‘× ×•×©× ×”×ינטרנט העולמי וה-Unicode, בהת×מה לשוק הבינל×ומי והמקומי, ביישו×
+ Unicode במערכות הפעלה וביישומי×, בגופני×, בפריסת טקסט ובמחשוב רב-לשוני.
+
+ Unicode
+ ×›×שר ×”×¢×•×œ× ×¨×•×¦×” לדבר, ×”×•× ×ž×“×‘×¨ -“Unicode.â€
+
+ </test-case>
+
+ <test-case id="IUC10-hu" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/hu">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Európa, a Szoftver s az Internet -
+ Globálissá Változik a Unicode Ãltal
+ IUC10
+ Iratkozzon már most a Tizedik Nemzetközi Unicode Konferenciára, amely Március 10-12 1997
+ lesz megtartva, Meinz-be, Németországba. Ebben a Konferencián az iparág szerte sok szakértő
+ fog részt venni: a globális Internet s Unicode nemzetközisítése s lokalizálása, a
+ Unicode beteljesítése a működő rendszerekben s alkalmazásokban, fontokba, szöveg
+ térbeosztásba s többnyelvű computerekben.
+
+ Unicode
+ Ha a világ beszélni akar, azt Unicode-ul mondja.
+
+ </test-case>
+
+ <test-case id="IUC10-hu-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1250/hu">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Európa, a Szoftver s az Internet -
+ Globálissá Változik a Unicode Ãltal
+ IUC10
+ Iratkozzon már most a Tizedik Nemzetközi Unicode Konferenciára, amely Március 10-12 1997
+ lesz megtartva, Meinz-be, Németországba. Ebben a Konferencián az iparág szerte sok szakértő
+ fog részt venni: a globális Internet s Unicode nemzetközisítése s lokalizálása, a
+ Unicode beteljesítése a működő rendszerekben s alkalmazásokban, fontokba, szöveg
+ térbeosztásba s többnyelvű computerekben.
+
+ Unicode
+ Ha a világ beszélni akar, azt “Unicodeâ€-ul mondja.
+
+ </test-case>
+
+ <test-case id="IUC10-it" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/it">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, software e Internet:
+ Globalizzazione con Unicode
+ IUC10
+ Iscrivetevi subito alla X Conferenza Internazionale su Unicode, che si terrà dal 10 al 12 marzo 1997 a
+ Mainz in Germania. Alla Conferenza parteciperanno esperti di tutti i settori per discutere di Internet globale e
+ Unicode, internazionalizzazione e localizzazione, implementazione di Unicode in sistemi operativi e applicazioni,
+ caratteri, composizione dei testi ed elaborazione multilingue.
+
+ Unicode
+ Quando il mondo vuole comunicare, parla Unicode.
+
+ </test-case>
+
+ <!-- No EUC-JP in this test because it detects as GB18030 -->
+ <test-case id="IUC10-jp" encodings="UTF-8 UTF-32BE UTF-32LE Shift_JIS/ja ISO-2022-JP">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ ヨーロッパã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã€ãã—ã¦ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆ:
+ Unicode ã§ã‚°ãƒ­ãƒ¼ãƒãƒ«åŒ–ã‚’ç‹™ã£ã¦
+ IUC10
+ 第 10 回㮠Unicode 会議㯠1997 å¹´ 3 月 10-12æ—¥ã€ãƒ‰ã‚¤ãƒ„ã®ãƒžã‚¤ãƒ³ãƒ„ã§é–‹ã‹ã‚Œã¾ã™ã€‚å‚加希望ã®æ–¹ã¯ä»Šã™ã登録ã—ã¦ãã ã•ã„。
+ ã“ã®ä¼šè­°ã§ã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ãªã‚¤ãƒ³ã‚¿ãƒãƒƒãƒˆã€Unicodeã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã®å›½éš›åŒ–ãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒªã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã€OS ãŠã‚ˆã³ã‚¢ãƒ—リケーションã§ã®
+ Unicode ã®ã‚¤ãƒ³ãƒ—リメンテーションã€ãƒ•ã‚©ãƒ³ãƒˆã€ãƒ†ã‚­ã‚¹ãƒˆè¡¨ç¤ºã€ãƒžãƒ«ãƒè¨€èªžã‚³ãƒ³ãƒ”ューティングã«ãŠã‘る業界ã®å°‚門家ãŒé›†ã¾ã‚Šã¾ã™ã€‚
+
+ Unicode
+ 世界的ã«è©±ã™ãªã‚‰ã€Unicode ã§ã™ã€‚
+
+ </test-case>
+
+ <test-case id="IUC10-ko" encodings="UTF-8 UTF-32BE UTF-32LE EUC-KR/ko ISO-2022-KR">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ 유럽, 소프트웨어 그리고 ì¸í„°ë„·:
+ 유니코드와 함께 세계로
+ IUC10
+ ì œ10회 유니코드 êµ­ì œ 회ì˜ê°€ 1997ë…„ 3ì›” 10ì¼ë¶€í„° 12ì¼ê¹Œì§€ ë…ì¼ì˜ 마ì¸ì¦ˆì—ì„œ 열립니다. 지금 등ë¡í•˜ì‹­ì‹œì˜¤.
+ ì´ íšŒì˜ì—서는 업계 ì „ë°˜ì˜ ì „ë¬¸ê°€ë“¤ì´ í•¨ê»˜ 모여 다ìŒê³¼ ê°™ì€ ë¶„ì•¼ë¥¼ 다룹니다. - ì¸í„°ë„·ê³¼ 유니코드, 국제화와 지역화,
+ ìš´ì˜ ì²´ì œì™€ ì‘ìš© 프로그램ì—ì„œ ìœ ë‹ˆì½”ë“œì˜ êµ¬í˜„, 글꼴, ë¬¸ìž ë°°ì—´, 다국어 컴퓨팅.
+
+ Unicode
+ 세계를 향한 대화, 유니코드로 하십시오
+
+ </test-case>
+
+ <!-- No UTF-8 in this test because there are no non-ASCII characters. -->
+ <test-case id="IUC10-nl" encodings="UTF-32BE UTF-32LE ISO-8859-1/nl">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software + het Internet:
+ wereldwijd met Unicode
+ IUC10
+ Meld u nu aan voor de Tiende Internationale Unicode-conferentie, die van 10 tot 12 maart 1997 in
+ Mainz (Duitsland) wordt gehouden. De Conferentie is een ontmoetingsplaats voor experts uit de industrie op het
+ gebied van het wereldwijde Internet en Unicode, internationalisatie en localisatie, implementatie van Unicode in
+ besturingssystemen en applicaties, lettertypes, tekstopmaak en meertalig computergebruik.
+
+ Unicode
+ Als de wereld wil praten, spreekt hij Unicode.
+
+ </test-case>
+
+ <!-- No language for ISO-8859-1 in this test because no-NO is recogonized as Danish... -->
+ <test-case id="IUC10-no-NO" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/da">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Programvare og Internet:
+ Global fokus med Unicode
+ IUC10
+ Registrer deg som deltager på den tiende inernasjonale Unicode konferansen i Mainz, Tyskland, fra 10. til 12. mars,
+ 1997. Konferansen vil samle eksperter på Internet, Unicode, internasjonalisering og integrasjon av Unicode i
+ operativsystemer og programmer, fonter, tekst layout og flerspråklig databehandling.
+
+ Unicode
+ NÃ¥r verden vil snakke, snakker den Unicode
+
+ </test-case>
+
+ <test-case id="IUC10-no-NO-NY" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/no">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, programvare og Internett:
+ Femn verda med Unicode
+ IUC10
+ Meld deg på den 10. internasjonale Unicode-konferansen. Han går føre seg i Mainz i Tyskland i dagane 10.--12. mars
+ 1997, og samlar fagkunnige innan konferansetemaet frå heile databransjen. Tema: Det globale Internettet og
+ Unicode, internasjonalisering og nasjonal tilpassing, implementering av Unicode i operativsystem og brukarprogram,
+ skriftsnitt (fontar), tekstutlegg, og fleirspråkleg databehandling.
+
+ Unicode
+ Når verda ønskjer å snakke, talar ho Unicode
+
+ </test-case>
+
+ <test-case id="IUC10-pt-BR" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/pt">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software e a Internet:
+ Globalização com o Unicode
+ IUC10
+ Inscreva-se agora para a Décima Conferência Internacional Sobre O Unicode, realizada entre os dias 10 e 12 de
+ março de 1997 em Mainz na Alemanha. A Conferência reunirá peritos de todas as áreas da indústria especializados
+ em assuntos relacionados com a Internet global e o Unicode, internacionalização e localização de software,
+ implementação do Unicode em sistemas operacionais e aplicativos, fontes, layout de texto e informática multilíngüe.
+
+ Unicode
+ Quando o mundo quer falar, fala Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-pt-PT" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/pt">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software e a Internet:
+ Globalização com o Unicode
+ IUC10
+ Inscreva-se agora para a Décima Conferência Internacional Sobre O Unicode, a ser realizada entre os dias 10 e 12
+ de Março de 1997 em Mainz na Alemanha. A Conferência reunirá peritos de todas as áreas da indústria
+ especializados em assuntos relacionados com a Internet global e o Unicode, internacionalização e localização de
+ software, implementação do Unicode em sistemas operativos e aplicações, tipos de letra, esquematização de
+ texto e informática multilíngue.
+
+ Unicode
+ Quando o mundo quer falar, fala Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-ro" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/ro">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, Software ÅŸi Internet:
+ Globalizarea cu Unicode
+ IUC10
+ Inscrieţi-vă acum la a Zecea Conferinţă Internaţională "Unicode" ce va avea loc in
+ perioada de 10-12 martie, 1997 în Mainz, Germania. Conferinţa va întruni experţi din
+ variate domenii: Internet global şi Unicode, internaţionalizare şi localizare,
+ implementarede Unicode în sisteme de operare şi aplicaţii, fonturi, aranjare de text în
+ pagină, computerizare multilinguală.
+
+ Unicode
+ Când lumea vrea să comunice, vorbeşte Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-ru" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-5/ru windows-1251/ru KOI8-R/ru">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Европа, Программное обеÑпечение + Интернет:
+ Unicode в глобальных маÑштабах
+ IUC10
+ ЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ
+ 10-12 марта 1997 года в Майнце в Германии. ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по и
+ вопроÑам глобального Интернета и Unicode, локализации и интернационализации, воплощению
+ применению Unicode в различных операционных ÑиÑтемах и программных приложениÑÑ…,
+ шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах.
+
+ Unicode
+ Когда мир желает общатьÑÑ, он общаетÑÑ Ð½Ð° Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-sv" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/sv">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Europa, programvara och Internet:
+ globalisera med Unicode
+ IUC10
+ Anmäl Dig till den tionde internationella Unicode-konferensen, som hålls den 10-12 mars 1997 i Mainz,
+ Tyskland. Vid konferensen kommer experter inom följande områden att delta: det globala Internet och Unicode,
+ internationalisering och lokalisering, implementering av Unicode i operativsystem, tillämpningar, typsnitt,
+ textlayout och mångspråklig datoranvändning.
+
+ Unicode
+ När världen vill tala, så talar den Unicode.
+
+ </test-case>
+
+ <test-case id="IUC10-yi" encodings="UTF-8 UTF-32BE UTF-32LE">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ ×ײר×ָפּע: פּר×ָגר×ַמװ×ַרג ×ון די װעלטנעץ:
+ ×וניק×ָד ×יבער דער ×’×ָרער װעלט
+ IUC10
+ פֿ×ַרשרײַבט זיך שױן ××±×£ דער צענטער ×ינטערנ×ַצי×ָנ×ַלער ×וניק×ָד-ק×ָנפֿערענץ, ×°×ָס װעט פֿ×ָרקומען דע×
+ 10טן ביזן 12טן מ×ַרץ, 1997, ×ין מײַנץ, דײַטשל×ַנד. די ק×ָנפֿערענץ װעט צוז×ַמענברענגן ×ž×‘Ö¿×™× ×™× ×¤Ö¿×•×Ÿ װעלטנעץ,
+ ×וניק×ָד, ××™ ×ַלװעלטלעכן ××™ סבֿיבֿהדיקן פּר×ָגר×ַמװ×ַרג, ×ַרײַנשטעלן ×וניק×ָד ×ין ×ָפּעריר-סיסטעמען ×ון
+ ×ָנװענדונגען, שריפֿטן, טעקסט-×ױסשטעל, ×ון מערשפּר×ַכיקע ק×ָמפּיוטערײַ.
+
+ Unicode
+ ×Ö·×– די װעלט װיל רעדן, רעדט ×–×™ ×וניק×ָד
+
+ </test-case>
+
+ <test-case id="IUC10-zh-Hant" encodings="UTF-8 UTF-32BE UTF-32LE Big5/zh">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ æ­æ´²ï¼Œè»Ÿé«”åŠç¶²éš›ç¶²è·¯ï¼š
+ 讓統一碼(Unicode)領你進入全世界
+ IUC10
+ ä½ ç¾åœ¨å°±æ‡‰å ±å將在1997年3月1ï¼è‡³ï¼‘2日於德國美姿城(Mainz)å¬é–‹çš„第å屆國際統一碼研討會。
+ 本次研討會將邀請多ä½æ¥­ç•Œå°ˆå®¶ç ”討關於全çƒç¶²éš›ç¶²è·¯åŠçµ±ä¸€ç¢¼ç™¼å±•ã€åœ‹éš›åŒ–åŠæœ¬åœŸåŒ–ã€
+ 支æ´çµ±ä¸€ç¢¼çš„作業系統åŠæ‡‰ç”¨ç¨‹å¼ã€å­—åž‹ã€æ–‡å­—排版ã€é›»è…¦å¤šåœ‹èªžæ–‡åŒ–等多項課題。
+
+ Unicode
+ 當世界需è¦æºé€šæ™‚,請用統一碼(Unicode)
+
+ </test-case>
+
+ <!-- No ISO-2022-CN in this test because Java doesn't support it in both directions :-( -->
+ <test-case id="IUC10-zh-Hans" encodings="UTF-8 UTF-32BE UTF-32LE ISO-2022-CN GB18030/zh">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ 欧洲,软件+互è”网
+ ç”¨ç»Ÿä¸€ç  (Unicode) èµ°é世界
+ IUC10
+ 将于1997å¹´ 3 月10æ—¥ï¼12日在德国 Mainz 市举行的第å届统一ç å›½é™…研讨会现在开始注册。
+ 本次会议将汇集å„æ–¹é¢çš„专家。涉åŠçš„领域包括:国际互è”网和统一ç ï¼Œå›½é™…化和本地化,
+ 统一ç åœ¨æ“作系统和应用软件中的实现,字型,文本格å¼ä»¥åŠå¤šæ–‡ç§è®¡ç®—等。
+
+ Unicode
+ 当世界需è¦æ²Ÿé€šæ—¶ï¼Œè¯·ç”¨Unicodeï¼
+
+Conference Program
+ </test-case>
+
+ <test-case id="WIU-cz" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/cs">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Co je Unicode?
+
+ Unicode pÅ™iÅ™azuje každému znaku jedineÄné Äíslo,
+ nezávisle na platformě,
+ nezávisle na programu,
+ nezávisle na jazyce.
+
+ PoÄítaÄe, ze své podstaty, pracují pouze s Äísly. Písmena a další znaky ukládají tak, že každému z nich
+ pÅ™iÅ™adí Äíslo. PÅ™ed vznikem Unicode existovaly stovky rozdílných kódovacích systémů pro pÅ™iÅ™azování tÄ›chto
+ Äísel. Žádné z tÄ›chto kódování nemohlo obsahovat dostatek znaků: například Evropská unie sama potÅ™ebuje
+ nÄ›kolik různých kódování, aby pokryla vÅ¡echny své jazyky. Dokonce i pro jeden jediný jazyk, jako je angliÄtina,
+ nevyhovovalo žádné kódování pro všechny písmena, interpunkci a běžně používané technické symboly.
+
+ Tyto kódovací systémy také byly v konfliktu jeden s druhým. To znamená, že dvě kódování mohou používat
+ stejné Äíslo pro dva různé znaky, nebo používat různá Äísla pro stejný znak. Jakýkoli poÄítaÄ (zvláštÄ› servery)
+ musí podporovat mnoho různých kódování; přesto, kdykoli jsou data předávána mezi různými kódováními nebo
+ platformami, hrozí, že tato data budou poškozena.
+
+ </test-case>
+
+ <test-case id="WIU-el" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-7/el">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Τι είναι το Unicode;
+
+ Η κωδικοσελίδα Unicode Ï€Ïοτείνει έναν και μοναδικό αÏιθμό για κάθε χαÏακτήÏα,
+ ανεξάÏτητα από το λειτουÏγικό σÏστημα,
+ ανεξάÏτητα από το λογισμικό,
+ ανεξάÏτητα από την γλώσσα.
+
+ Οι ηλεκτÏονικοί υπολογιστές, σε τελική ανάλυση, χειÏίζονται απλώς αÏιθμοÏÏ‚. ΑποθηκεÏουν γÏάμματα και
+ άλλους χαÏακτήÏες αντιστοιχώντας στο καθένα τους από έναν αÏιθμό (ονομάζουμε μία τέτοια αντιστοιχία
+ κωδικοσελίδα). ΠÏιν την εφεÏÏεση του Unicode, υπήÏχαν εκατοντάδες διαφοÏετικές κωδικοσελίδες. Λόγω
+ πεÏιοÏισμών μεγέθους όμως, σε καμία κωδικοσελίδα δεν χωÏοÏσαν αÏκετοί χαÏακτήÏες: λόγου χάÏιν,
+ η ΕυÏωπαϊκή Ένωση χÏειαζόταν πλήθος διαφοÏετικών κωδικοσελίδων για να καλÏψει όλες τις γλώσσες των
+ χωÏών-μελών της. Ακόμα και για μία και μόνη γλώσσα, όπως Ï€.χ. τα Αγγλικά, μία κωδικοσελίδα δεν
+ επαÏκοÏσε για να καλÏψει όλα τα γÏάμματα, σημεία στίξης και τεχνικά σÏμβολα ευÏείας χÏήσης.
+
+ Εκτός αυτοÏ, οι κωδικοσελίδες αυτές διαφωνοÏσαν Î¼ÎµÏ„Î±Î¾Ï Ï„Î¿Ï…Ï‚. Έτσι, δÏο κωδικοσελίδες μποÏοÏσαν κάλλιστα να
+ χÏησιμοποιοÏν τον ίδιο αÏιθμό για δÏο διαφοÏετικοÏÏ‚ χαÏακτήÏες, ή να χÏησιμοποιοÏν διαφοÏετικοÏÏ‚ αÏιθμοÏÏ‚ για
+ τον ίδιο χαÏακτήÏα. Κάθε υπολογιστής (και ιδίως εάν ήταν διακομιστής) έπÏεπε να υποστηÏίζει πλήθος διαφοÏετικών
+ κωδικοσελίδων ταυτόχÏονα κάθε φοÏά που δεδομένα μεταφέÏονταν Î¼ÎµÏ„Î±Î¾Ï Î´Î¹Î±Ï†Î¿Ïετικών κωδικοσελίδων ή
+ λειτουÏγικών συστημάτων, τα δεδομένα αυτά κινδÏνευαν να αλλοιωθοÏν.
+
+ </test-case>
+
+ <test-case id="WIU-el-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1253/el">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Τι είναι το “Unicodeâ€;
+
+ Η κωδικοσελίδα Unicode Ï€Ïοτείνει έναν και μοναδικό αÏιθμό για κάθε χαÏακτήÏα,
+ ανεξάÏτητα από το λειτουÏγικό σÏστημα,
+ ανεξάÏτητα από το λογισμικό,
+ ανεξάÏτητα από την γλώσσα.
+
+ Οι ηλεκτÏονικοί υπολογιστές, σε τελική ανάλυση, χειÏίζονται απλώς αÏιθμοÏÏ‚. ΑποθηκεÏουν γÏάμματα και
+ άλλους χαÏακτήÏες αντιστοιχώντας στο καθένα τους από έναν αÏιθμό (ονομάζουμε μία τέτοια αντιστοιχία
+ κωδικοσελίδα). ΠÏιν την εφεÏÏεση του Unicode, υπήÏχαν εκατοντάδες διαφοÏετικές κωδικοσελίδες. Λόγω
+ πεÏιοÏισμών μεγέθους όμως, σε καμία κωδικοσελίδα δεν χωÏοÏσαν αÏκετοί χαÏακτήÏες: λόγου χάÏιν,
+ η ΕυÏωπαϊκή Ένωση χÏειαζόταν πλήθος διαφοÏετικών κωδικοσελίδων για να καλÏψει όλες τις γλώσσες των
+ χωÏών-μελών της. Ακόμα και για μία και μόνη γλώσσα, όπως Ï€.χ. τα Αγγλικά, μία κωδικοσελίδα δεν
+ επαÏκοÏσε για να καλÏψει όλα τα γÏάμματα, σημεία στίξης και τεχνικά σÏμβολα ευÏείας χÏήσης.
+
+ Εκτός αυτοÏ, οι κωδικοσελίδες αυτές διαφωνοÏσαν Î¼ÎµÏ„Î±Î¾Ï Ï„Î¿Ï…Ï‚. Έτσι, δÏο κωδικοσελίδες μποÏοÏσαν κάλλιστα να
+ χÏησιμοποιοÏν τον ίδιο αÏιθμό για δÏο διαφοÏετικοÏÏ‚ χαÏακτήÏες, ή να χÏησιμοποιοÏν διαφοÏετικοÏÏ‚ αÏιθμοÏÏ‚ για
+ τον ίδιο χαÏακτήÏα. Κάθε υπολογιστής (και ιδίως εάν ήταν διακομιστής) έπÏεπε να υποστηÏίζει πλήθος διαφοÏετικών
+ κωδικοσελίδων ταυτόχÏονα κάθε φοÏά που δεδομένα μεταφέÏονταν Î¼ÎµÏ„Î±Î¾Ï Î´Î¹Î±Ï†Î¿Ïετικών κωδικοσελίδων ή
+ λειτουÏγικών συστημάτων, τα δεδομένα αυτά κινδÏνευαν να αλλοιωθοÏν.
+
+ </test-case>
+
+ <test-case id="WIU-pl" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/pl">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Czym jest Unikod ?
+
+ Unikod przypisuje unikalny numer każdemu znakowi, niezależny od używanej platformy, programu czy języka.
+
+ Zasadniczo, komputery rozumieją tylko liczby. Zapisują litery i inne znaki przypisując każdemu z nich liczbę.
+ Nim powstał Unikod, było wiele różnych systemów kodowania przypisujących te liczby. Brakowało jednego,
+ który mógłby pomieścić wystarczająco dużą liczbę znaków. Przykładowo, sama Unia Europejska potrzebowała
+ kilku różnych kodowań, by móc używać wszystkich używanych w niej języków. Nawet dla pojedynczego języka
+ takiego jak np. angielski brakowało jednego kodowania, które byłoby odpowiednie dla zaprezentowania
+ wszystkich liter, znaków przestankowych i popularnych symboli technicznych.
+
+ Innym problemem było, że kodowania te kolidowały ze sobą. Dwa, różne kodowania używały jednej liczby dla dwu
+ różnych znaków lub różnych liczb dla tego samego znaku. Wszystkie komputery (między innymi serwery) muszą
+ wspierać wszystkie te kodowania, gdyż dane przesyłane między różnymi systemami operacyjnymi zawsze
+ narażone są na uszkodzenie.
+
+ </test-case>
+
+ <test-case id="WIU-tr" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-9/tr">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ Evrensel Kod Nedir?
+
+ Evrensel Kod her yazı karakteri için bir ve yalnız bir sayı şart koşar,
+ hangi altyapı,
+ hangi yazılım,
+ hangi dil olursa olsun.
+
+ İlke olarak, bilgisayarlar sadece sayılarla işlem yaparlar. Kelimelerin ve yazı karakterlerinin her biri için
+ birer sayı atarlar ve böyle saklarlar. Evrensel Kod keşfedilmeden önce, bu sayıları atamak için birçok şifreleme
+ yöntemi vardı. Ancak, tüm bu dilleri gösterebilecek, örneğin; Avrupa Topluluğu bünyesindeki tüm ülkelerin dillerini
+ kapsayacak bir tek şifreleme yöntemi yoktu. Bunun yanısıra, sadece İngilizcedeki harfleri, noktalama
+ işaretlerini ve teknik sembolleri kapsayan tek bir şifreleme yöntemi de bulunmamaktaydı.
+
+ Bu şifreleme yöntemleri kendi aralarında çelişmektedir. İki farklı şifreleme, aynı sayıyı iki farklı karaktere
+ vermiş olabilir ya da farklı sayılar aynı karekteri kodlayabilir. Bilgisayarlar, özellikle sunucular, birçok
+ şifrelemeyi desteklemek zorundadırlar; veriler, farklı şifreleme ve altyapılardan geçerken bozulma riski taşırlar.
+
+ </test-case>
+
+ <test-case id="WIU-tr-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1254/tr">
+ <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. -->
+
+ “Evrensel Kod†Nedir?
+
+ Evrensel Kod her yazı karakteri için bir ve yalnız bir sayı şart koşar,
+ hangi altyapı,
+ hangi yazılım,
+ hangi dil olursa olsun.
+
+ İlke olarak, bilgisayarlar sadece sayılarla işlem yaparlar. Kelimelerin ve yazı karakterlerinin her biri için
+ birer sayı atarlar ve böyle saklarlar. Evrensel Kod keşfedilmeden önce, bu sayıları atamak için birçok şifreleme
+ yöntemi vardı. Ancak, tüm bu dilleri gösterebilecek, örneğin; Avrupa Topluluğu bünyesindeki tüm ülkelerin dillerini
+ kapsayacak bir tek şifreleme yöntemi yoktu. Bunun yanısıra, sadece İngilizcedeki harfleri, noktalama
+ işaretlerini ve teknik sembolleri kapsayan tek bir şifreleme yöntemi de bulunmamaktaydı.
+
+ Bu şifreleme yöntemleri kendi aralarında çelişmektedir. İki farklı şifreleme, aynı sayıyı iki farklı karaktere
+ vermiş olabilir ya da farklı sayılar aynı karekteri kodlayabilir. Bilgisayarlar, özellikle sunucular, birçok
+ şifrelemeyi desteklemek zorundadırlar; veriler, farklı şifreleme ve altyapılardan geçerken bozulma riski taşırlar.
+
+ </test-case>
+</charset-detection-tests> \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/default.txt b/Build/source/libs/icu/icu-xetex/test/testdata/default.txt
new file mode 100644
index 00000000000..d26f3831e9e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/default.txt
@@ -0,0 +1,96 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 1998-2000, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+
+// This is a test default locale file
+
+default
+{
+ Version { 44.0 }
+
+ ShortLanguage { xxx }
+
+ string_only_in_Default { DEFAULT }
+
+ array_only_in_Default { DEFAULT0, DEFAULT1, DEFAULT2, DEFAULT3 }
+
+ array_2d_only_in_Default
+ {
+ { DEFAULT00, DEFAULT01 }
+ { DEFAULT10, DEFAULT11 }
+ }
+
+ tagged_array_only_in_Default
+ {
+ tag2 { DEFAULT2 }
+ tag1 { DEFAULT1 }
+ tag3 { DEFAULT3 }
+ tag6 { DEFAULT6 }
+ tag12 { DEFAULT12 }
+ tag7 { DEFAULT7 }
+ tag14 { DEFAULT14 }
+ tag9 { DEFAULT9 }
+ }
+
+ string_in_Default_te_te_IN { DEFAULT }
+
+ array_in_Default_te_te_IN { DEFAULT0, DEFAULT1, DEFAULT2, DEFAULT3, DEFAULT4 }
+
+ array_2d_in_Default_te_te_IN
+ {
+ { DEFAULT00, DEFAULT01, DEFAULT02 }
+ { DEFAULT10, DEFAULT11, DEFAULT12 }
+ { DEFAULT20, DEFAULT21, DEFAULT22 }
+ { DEFAULT30, DEFAULT31, DEFAULT32 }
+ }
+
+ tagged_array_in_Default_te_te_IN
+ {
+ tag4 { DEFAULT4 }
+ tag9 { DEFAULT9 }
+ tag12 { DEFAULT12 }
+ }
+
+ string_in_Default_te { DEFAULT }
+
+ array_in_Default_te { DEFAULT0, DEFAULT1, DEFAULT2, DEFAULT3, DEFAULT4 }
+
+ array_2d_in_Default_te
+ {
+ { DEFAULT00, DEFAULT01, DEFAULT02 }
+ { DEFAULT10, DEFAULT11, DEFAULT12 }
+ { DEFAULT20, DEFAULT21, DEFAULT22 }
+ { DEFAULT30, DEFAULT31, DEFAULT32 }
+ }
+
+ tagged_array_in_Default_te
+ {
+ tag12 { DEFAULT12 }
+ tag1 { DEFAULT1 }
+ tag7 { DEFAULT7 }
+ tag3 { DEFAULT3 }
+ }
+
+ string_in_Default_te_IN { DEFAULT }
+
+ array_in_Default_te_IN { DEFAULT0, DEFAULT1, DEFAULT2 }
+
+ array_2d_in_Default_te_IN
+ {
+ { DEFAULT00, DEFAULT01, DEFAULT02, DEFAULT03 }
+ { DEFAULT10, DEFAULT11, DEFAULT12, DEFAULT13 }
+ { DEFAULT20, DEFAULT21, DEFAULT22, DEFAULT23 }
+ }
+
+ tagged_array_in_Default_te_IN
+ {
+ tag13 { DEFAULT13 }
+ tag8 { DEFAULT8 }
+ }
+}
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/format.txt b/Build/source/libs/icu/icu-xetex/test/testdata/format.txt
new file mode 100644
index 00000000000..2d6e8756f7e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/format.txt
@@ -0,0 +1,105 @@
+// Copyright (c) 2007 International Business Machines
+// Corporation and others. All Rights Reserved.
+format:table(nofallback) {
+ Info {
+ Description { "These are the data driven format tests" }
+ LongDescription { "Data for data driven format tests." }
+ }
+ TestData {
+ TestDateFormatBasic {
+ Info {
+ Description { "Test data for format and parse :" }
+ }
+ Settings {
+ // options: 'format', or 'parse'. One can be omitted if this is a 1 way test.
+ {
+ Type { "date_format" }
+ },
+ {
+ Type { "date_parse" }
+ },
+ }
+ Headers { "locale","spec", "date", "str"}
+ // locale: locale including calendar type
+ // spec: either 'PATTERN=y mm h' etc, or 'DATE=SHORT,TIME=LONG'
+ // date: either 'MILLIS=####' where #### is an unsigned long (millis), or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the locale
+ // str: the expected unicode string
+ Cases {
+ {
+ "en_US@calendar=gregorian",
+ "DATE=SHORT,TIME=SHORT",
+ "ERA=1,YEAR=2007,MONTH=AUGUST,DATE=8,HOUR_OF_DAY=18,MINUTE=54,SECOND=0",
+ "8/8/07 6:54 PM"
+ },
+ {
+ "zh_TW@calendar=taiwan",
+ "DATE=LONG",
+ "ERA=1,YEAR=98,MONTH=0,DATE=24",
+ "民國98年1月24日",
+ },
+ {
+ //民國å‰2å¹´1月24æ—¥ -> 1910-1-24
+ "zh_TW@calendar=taiwan",
+ "DATE=LONG",
+ "ERA=0,YEAR=2,MONTH=0,DATE=24",
+ "民國å‰2å¹´1月24æ—¥",
+ },
+ }
+ }
+ TestFormatRelative {
+ Info {
+ Description { "relative format :" }
+ }
+ Settings {
+ {
+ Type { "date_format" }
+ },
+ }
+ Headers { "locale","spec", "date", "str"}
+ Cases {
+ {
+ "en_US@calendar=gregorian",
+ "DATE=RELATIVE_SHORT",
+ "RELATIVE_MILLIS=86410000", // one day from now
+ "Tomorrow"
+ },
+ {
+ "en_US@calendar=gregorian",
+ "DATE=RELATIVE_SHORT",
+ "RELATIVE_MILLIS=0", // one day before now
+ "Today"
+ },
+ {
+ "en_US@calendar=gregorian",
+ "DATE=RELATIVE_SHORT",
+ "RELATIVE_MILLIS=-86410000", // one day before now
+ "Yesterday"
+ },
+ {
+ "mt_MT@calendar=gregorian",
+ "DATE=RELATIVE_SHORT",
+ "RELATIVE_MILLIS=86410000", // one day from now
+ "Għada"
+ },
+ {
+ "mt_MT@calendar=gregorian",
+ "DATE=RELATIVE_SHORT",
+ "RELATIVE_MILLIS=0", // one day before now
+ "Illum"
+ },
+ {
+ "mt_MT@calendar=gregorian",
+ "DATE=RELATIVE_SHORT",
+ "RELATIVE_MILLIS=-86410000", // one day before now
+ "Lbieraħ"
+ },
+ {
+ "ru",
+ "DATE=RELATIVE_SHORT",
+ "RELATIVE_MILLIS=-172810000", // 2 days ago
+ "Позавчера"
+ },
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/ibm9027.ucm b/Build/source/libs/icu/icu-xetex/test/testdata/ibm9027.ucm
new file mode 100644
index 00000000000..4e0b88a2418
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/ibm9027.ucm
@@ -0,0 +1,20292 @@
+# ***************************************************************************
+# *
+# * Copyright (C) 1995-2003, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# *
+# ***************************************************************************
+#
+# File created by rptp2ucm (compiled on Dec 3 2002)
+# from source files 44B02343.RPMAP100 and 234344B0.TPMAP100
+#
+<code_set_name> "ibm9027"
+<char_name_mask> "AXXXX"
+<mb_cur_max> 2
+<mb_cur_min> 2
+<uconv_class> "DBCS"
+<subchar> \xFE\xFE
+#
+<icu:charsetFamily> "ASCII"
+<icu:alias> "ibm-9027_VPUA"
+
+CHARMAP
+<U00A7> \x44\x6A |0
+<U00A8> \x44\x60 |0
+<U00AF> \x42\xA1 |1
+<U00B0> \x44\xED |0
+<U00B1> \x44\x4B |0
+<U00B4> \x44\xEE |0
+<U00B6> \x43\x79 |0
+<U00B7> \x46\xE5 |0
+<U00D7> \x44\x7A |0
+<U00F7> \x44\x7B |0
+<U02BA> \x44\x5B |0
+<U02C7> \x45\x53 |0
+<U02C9> \x45\x51 |0
+<U02CA> \x45\x52 |0
+<U02CB> \x45\x54 |0
+<U02CD> \x47\x52 |0
+<U02D9> \x45\x55 |0
+<U0391> \x41\x61 |0
+<U0392> \x41\x62 |0
+<U0393> \x41\x63 |0
+<U0394> \x41\x64 |0
+<U0395> \x41\x65 |0
+<U0396> \x41\x66 |0
+<U0397> \x41\x67 |0
+<U0398> \x41\x68 |0
+<U0399> \x41\x69 |0
+<U039A> \x41\x6A |0
+<U039B> \x41\x6B |0
+<U039C> \x41\x6C |0
+<U039D> \x41\x6D |0
+<U039E> \x41\x6E |0
+<U039F> \x41\x6F |0
+<U03A0> \x41\x70 |0
+<U03A1> \x41\x71 |0
+<U03A3> \x41\x72 |0
+<U03A4> \x41\x73 |0
+<U03A5> \x41\x74 |0
+<U03A6> \x41\x75 |0
+<U03A7> \x41\x76 |0
+<U03A8> \x41\x77 |0
+<U03A9> \x41\x78 |0
+<U03B1> \x41\x41 |0
+<U03B2> \x41\x42 |0
+<U03B3> \x41\x43 |0
+<U03B4> \x41\x44 |0
+<U03B5> \x41\x45 |0
+<U03B6> \x41\x46 |0
+<U03B7> \x41\x47 |0
+<U03B8> \x41\x48 |0
+<U03B9> \x41\x49 |0
+<U03BA> \x41\x4A |0
+<U03BB> \x41\x4B |0
+<U03BC> \x41\x4C |0
+<U03BD> \x41\x4D |0
+<U03BE> \x41\x4E |0
+<U03BF> \x41\x4F |0
+<U03C0> \x41\x50 |0
+<U03C1> \x41\x51 |0
+<U03C3> \x41\x52 |0
+<U03C4> \x41\x53 |0
+<U03C5> \x41\x54 |0
+<U03C6> \x41\x55 |0
+<U03C7> \x41\x56 |0
+<U03C8> \x41\x57 |0
+<U03C9> \x41\x58 |0
+<U0401> \x41\xC6 |0
+<U0410> \x41\xC0 |0
+<U0411> \x41\xC1 |0
+<U0412> \x41\xC2 |0
+<U0413> \x41\xC3 |0
+<U0414> \x41\xC4 |0
+<U0415> \x41\xC5 |0
+<U0416> \x41\xC7 |0
+<U0417> \x41\xC8 |0
+<U0418> \x41\xC9 |0
+<U0419> \x41\xCA |0
+<U041A> \x41\xCB |0
+<U041B> \x41\xCC |0
+<U041C> \x41\xCD |0
+<U041D> \x41\xCE |0
+<U041E> \x41\xCF |0
+<U041F> \x41\xD0 |0
+<U0420> \x41\xD1 |0
+<U0421> \x41\xD2 |0
+<U0422> \x41\xD3 |0
+<U0423> \x41\xD4 |0
+<U0424> \x41\xD5 |0
+<U0425> \x41\xD6 |0
+<U0426> \x41\xD7 |0
+<U0427> \x41\xD8 |0
+<U0428> \x41\xD9 |0
+<U0429> \x41\xDA |0
+<U042A> \x41\xDB |0
+<U042B> \x41\xDC |0
+<U042C> \x41\xDD |0
+<U042D> \x41\xDE |0
+<U042E> \x41\xDF |0
+<U042F> \x41\xE0 |0
+<U0430> \x41\x80 |0
+<U0431> \x41\x81 |0
+<U0432> \x41\x82 |0
+<U0433> \x41\x83 |0
+<U0434> \x41\x84 |0
+<U0435> \x41\x85 |0
+<U0436> \x41\x87 |0
+<U0437> \x41\x88 |0
+<U0438> \x41\x89 |0
+<U0439> \x41\x8A |0
+<U043A> \x41\x8B |0
+<U043B> \x41\x8C |0
+<U043C> \x41\x8D |0
+<U043D> \x41\x8E |0
+<U043E> \x41\x8F |0
+<U043F> \x41\x90 |0
+<U0440> \x41\x91 |0
+<U0441> \x41\x92 |0
+<U0442> \x41\x93 |0
+<U0443> \x41\x94 |0
+<U0444> \x41\x95 |0
+<U0445> \x41\x96 |0
+<U0446> \x41\x97 |0
+<U0447> \x41\x98 |0
+<U0448> \x41\x99 |0
+<U0449> \x41\x9A |0
+<U044A> \x41\x9B |0
+<U044B> \x41\x9C |0
+<U044C> \x41\x9D |0
+<U044D> \x41\x9E |0
+<U044E> \x41\x9F |0
+<U044F> \x41\xA0 |0
+<U0451> \x41\x86 |0
+<U2010> \x44\x5A |0
+<U2013> \x44\x4A |1
+<U2014> \x44\x4A |0
+<U2018> \x44\x61 |0
+<U2019> \x44\x71 |0
+<U201C> \x44\x62 |0
+<U201D> \x44\x72 |0
+<U2020> \x43\x77 |0
+<U2021> \x43\x78 |0
+<U2025> \x44\x7E |0
+<U2026> \x44\x7F |0
+<U2027> \x43\x45 |0
+<U2030> \x43\x73 |0
+<U2032> \x44\x50 |0
+<U2033> \x44\xEF |0
+<U2035> \x42\x79 |0
+<U203B> \x44\x6B |0
+<U203E> \x42\xA1 |0
+<U20AC> \x47\xA2 |0
+<U2103> \x44\x4E |0
+<U2105> \x46\xBB |0
+<U2109> \x46\xDB |0
+<U2116> \x44\x6E |0
+<U2121> \x44\x6F |0
+<U212B> \x43\x72 |0
+<U2160> \x41\xF1 |0
+<U2161> \x41\xF2 |0
+<U2162> \x41\xF3 |0
+<U2163> \x41\xF4 |0
+<U2164> \x41\xF5 |0
+<U2165> \x41\xF6 |0
+<U2166> \x41\xF7 |0
+<U2167> \x41\xF8 |0
+<U2168> \x41\xF9 |0
+<U2169> \x41\xFA |0
+<U2170> \x41\xB1 |0
+<U2171> \x41\xB2 |0
+<U2172> \x41\xB3 |0
+<U2173> \x41\xB4 |0
+<U2174> \x41\xB5 |0
+<U2175> \x41\xB6 |0
+<U2176> \x41\xB7 |0
+<U2177> \x41\xB8 |0
+<U2178> \x41\xB9 |0
+<U2179> \x41\xBA |0
+<U2190> \x44\xF1 |0
+<U2191> \x44\xF2 |0
+<U2192> \x44\xF0 |0
+<U2193> \x44\xF3 |0
+<U2196> \x46\xD4 |0
+<U2197> \x46\xD5 |0
+<U2198> \x46\xD7 |0
+<U2199> \x46\xD6 |0
+<U21B8> \x46\xEF |0
+<U21B9> \x46\xF0 |0
+<U21D2> \x43\x6E |0
+<U21D4> \x43\x6F |0
+<U21E7> \x46\xEE |0
+<U2200> \x43\x70 |0
+<U2202> \x43\x4E |0
+<U2203> \x43\x71 |0
+<U2207> \x43\x4F |0
+<U2208> \x43\x64 |0
+<U220B> \x43\x65 |0
+<U2215> \x46\xDA |0
+<U221A> \x46\xC5 |0
+<U221D> \x43\x61 |0
+<U221E> \x44\x4D |0
+<U221F> \x46\xCC |0
+<U2220> \x46\xCB |0
+<U2223> \x42\x4F |1
+<U2225> \x44\x7C |0
+<U2227> \x43\x6C |0
+<U2228> \x43\x6D |0
+<U2229> \x46\xC8 |0
+<U222A> \x46\xC9 |0
+<U222B> \x46\xD0 |0
+<U222C> \x43\x63 |0
+<U222E> \x46\xD1 |0
+<U2234> \x44\x68 |0
+<U2235> \x44\x78 |0
+<U223C> \x43\xA1 |0
+<U223D> \x43\x60 |0
+<U2252> \x46\xC6 |0
+<U2260> \x44\x4C |0
+<U2261> \x46\xC7 |0
+<U2266> \x44\x67 |0
+<U2267> \x44\x77 |0
+<U226A> \x43\x5D |0
+<U226B> \x43\x5E |0
+<U2282> \x43\x68 |0
+<U2283> \x43\x69 |0
+<U2286> \x43\x66 |0
+<U2287> \x43\x67 |0
+<U2295> \x46\xD2 |0
+<U2299> \x46\xD3 |0
+<U22A5> \x46\xCA |0
+<U22BF> \x46\xCD |0
+<U2312> \x43\x4D |0
+<U2400> \x47\x81 |0
+<U2401> \x47\x82 |0
+<U2402> \x47\x83 |0
+<U2403> \x47\x84 |0
+<U2404> \x47\x85 |0
+<U2405> \x47\x86 |0
+<U2406> \x47\x87 |0
+<U2407> \x47\x88 |0
+<U2408> \x47\x89 |0
+<U2409> \x47\x8A |0
+<U240A> \x47\x8B |0
+<U240B> \x47\x8C |0
+<U240C> \x47\x8D |0
+<U240D> \x47\x8E |0
+<U240E> \x47\x8F |0
+<U240F> \x47\x90 |0
+<U2410> \x47\x91 |0
+<U2411> \x47\x92 |0
+<U2412> \x47\x93 |0
+<U2413> \x47\x94 |0
+<U2414> \x47\x95 |0
+<U2415> \x47\x96 |0
+<U2416> \x47\x97 |0
+<U2417> \x47\x98 |0
+<U2418> \x47\x99 |0
+<U2419> \x47\x9A |0
+<U241A> \x47\x9B |0
+<U241B> \x47\x9C |0
+<U241C> \x47\x9D |0
+<U241D> \x47\x9E |0
+<U241E> \x47\x9F |0
+<U241F> \x47\xA0 |0
+<U2421> \x47\xA1 |0
+<U2460> \x46\x41 |0
+<U2461> \x46\x42 |0
+<U2462> \x46\x43 |0
+<U2463> \x46\x44 |0
+<U2464> \x46\x45 |0
+<U2465> \x46\x46 |0
+<U2466> \x46\x47 |0
+<U2467> \x46\x48 |0
+<U2468> \x46\x49 |0
+<U2469> \x46\x4A |0
+<U2474> \x46\x51 |0
+<U2475> \x46\x52 |0
+<U2476> \x46\x53 |0
+<U2477> \x46\x54 |0
+<U2478> \x46\x55 |0
+<U2479> \x46\x56 |0
+<U247A> \x46\x57 |0
+<U247B> \x46\x58 |0
+<U247C> \x46\x59 |0
+<U247D> \x46\x5A |0
+<U2500> \x46\x75 |0
+<U2501> \x43\xB7 |0
+<U2502> \x46\x76 |0
+<U2503> \x43\xB8 |0
+<U250C> \x46\x78 |0
+<U250F> \x43\xB9 |0
+<U2510> \x46\x79 |0
+<U2513> \x43\xE1 |0
+<U2514> \x46\x7A |0
+<U2517> \x43\xE3 |0
+<U2518> \x46\x7B |0
+<U251B> \x43\xE2 |0
+<U251C> \x46\x73 |0
+<U251D> \x43\xEE |0
+<U2520> \x43\xE9 |0
+<U2523> \x43\xE4 |0
+<U2524> \x46\x72 |0
+<U2525> \x43\xF0 |0
+<U2528> \x43\xEB |0
+<U252B> \x43\xE6 |0
+<U252C> \x46\x71 |0
+<U252F> \x43\xEA |0
+<U2530> \x43\xEF |0
+<U2533> \x43\xE5 |0
+<U2534> \x46\x70 |0
+<U2537> \x43\xEC |0
+<U2538> \x43\xF1 |0
+<U253B> \x43\xE7 |0
+<U253C> \x46\x6F |0
+<U253F> \x43\xED |0
+<U2542> \x43\xF2 |0
+<U254B> \x43\xE8 |0
+<U2550> \x46\x81 |0
+<U255E> \x46\x82 |0
+<U2561> \x46\x84 |0
+<U256A> \x46\x83 |0
+<U256D> \x46\x7C |0
+<U256E> \x46\x7D |0
+<U256F> \x46\x7F |0
+<U2570> \x46\x7E |0
+<U2571> \x46\x89 |0
+<U2572> \x46\x8A |0
+<U2573> \x46\x8B |0
+<U2574> \x46\xB7 |0
+<U2581> \x46\x60 |0
+<U2582> \x46\x61 |0
+<U2583> \x46\x62 |0
+<U2584> \x46\x63 |0
+<U2585> \x46\x64 |0
+<U2586> \x46\x65 |0
+<U2587> \x46\x66 |0
+<U2588> \x46\x67 |0
+<U2589> \x46\x6E |0
+<U258A> \x46\x6D |0
+<U258B> \x46\x6C |0
+<U258C> \x46\x6B |0
+<U258D> \x46\x6A |0
+<U258E> \x46\x69 |0
+<U258F> \x46\x68 |0
+<U2594> \x46\x74 |0
+<U2595> \x46\x77 |0
+<U25A0> \x44\xEA |0
+<U25A1> \x44\xE9 |0
+<U25B2> \x44\xE3 |0
+<U25B3> \x44\xE2 |0
+<U25BC> \x44\xEC |0
+<U25BD> \x44\xEB |0
+<U25C6> \x44\xE8 |0
+<U25C7> \x44\xE7 |0
+<U25CB> \x44\xE0 |0
+<U25CE> \x44\xE4 |0
+<U25CF> \x44\xE1 |0
+<U25E2> \x46\x85 |0
+<U25E3> \x46\x86 |0
+<U25E4> \x46\x88 |0
+<U25E5> \x46\x87 |0
+<U25EF> \x43\x7A |0
+<U2605> \x44\xE6 |0
+<U2606> \x44\xE5 |0
+<U2640> \x44\x79 |0
+<U2642> \x44\x69 |0
+<U266A> \x43\x76 |0
+<U266D> \x43\x75 |0
+<U266F> \x43\x74 |0
+<U273D> \x42\x5C |0
+<U3000> \x40\x40 |0
+<U3001> \x43\x44 |0
+<U3002> \x43\x41 |0
+<U3003> \x46\xB9 |0
+<U3005> \x44\x5D |0
+<U3006> \x44\x5E |0
+<U3007> \x44\x5F |0
+<U3008> \x44\x64 |0
+<U3009> \x44\x74 |0
+<U300A> \x44\x65 |0
+<U300B> \x44\x75 |0
+<U300C> \x43\x42 |0
+<U300D> \x43\x43 |0
+<U300E> \x44\x42 |0
+<U300F> \x44\x43 |0
+<U3010> \x44\x66 |0
+<U3011> \x44\x76 |0
+<U3012> \x44\x6C |0
+<U3013> \x44\x7D |0
+<U3014> \x44\x63 |0
+<U3015> \x44\x73 |0
+<U301D> \x46\xE9 |0
+<U301E> \x46\xEA |0
+<U3021> \x45\x41 |0
+<U3022> \x45\x42 |0
+<U3023> \x45\x43 |0
+<U3024> \x45\x44 |0
+<U3025> \x45\x45 |0
+<U3026> \x45\x46 |0
+<U3027> \x45\x47 |0
+<U3028> \x45\x48 |0
+<U3029> \x45\x49 |0
+<U3041> \x44\x47 |0
+<U3042> \x44\x81 |0
+<U3043> \x44\x48 |0
+<U3044> \x44\x82 |0
+<U3045> \x44\x49 |0
+<U3046> \x44\x83 |0
+<U3047> \x44\x51 |0
+<U3048> \x44\x84 |0
+<U3049> \x44\x52 |0
+<U304A> \x44\x85 |0
+<U304B> \x44\x86 |0
+<U304C> \x44\xC0 |0
+<U304D> \x44\x87 |0
+<U304E> \x44\xC1 |0
+<U304F> \x44\x88 |0
+<U3050> \x44\xC2 |0
+<U3051> \x44\x89 |0
+<U3052> \x44\xC3 |0
+<U3053> \x44\x8A |0
+<U3054> \x44\xC4 |0
+<U3055> \x44\x8C |0
+<U3056> \x44\xC5 |0
+<U3057> \x44\x8D |0
+<U3058> \x44\xC6 |0
+<U3059> \x44\x8E |0
+<U305A> \x44\xC7 |0
+<U305B> \x44\x8F |0
+<U305C> \x44\xC8 |0
+<U305D> \x44\x90 |0
+<U305E> \x44\xC9 |0
+<U305F> \x44\x91 |0
+<U3060> \x44\xCA |0
+<U3061> \x44\x92 |0
+<U3062> \x44\xCB |0
+<U3063> \x44\x56 |0
+<U3064> \x44\x93 |0
+<U3065> \x44\xCC |0
+<U3066> \x44\x94 |0
+<U3067> \x44\xCD |0
+<U3068> \x44\x95 |0
+<U3069> \x44\xCE |0
+<U306A> \x44\x96 |0
+<U306B> \x44\x97 |0
+<U306C> \x44\x98 |0
+<U306D> \x44\x99 |0
+<U306E> \x44\x9A |0
+<U306F> \x44\x9D |0
+<U3070> \x44\xCF |0
+<U3071> \x44\xD5 |0
+<U3072> \x44\x9E |0
+<U3073> \x44\xD0 |0
+<U3074> \x44\xD6 |0
+<U3075> \x44\x9F |0
+<U3076> \x44\xD1 |0
+<U3077> \x44\xD7 |0
+<U3078> \x44\xA2 |0
+<U3079> \x44\xD2 |0
+<U307A> \x44\xD8 |0
+<U307B> \x44\xA3 |0
+<U307C> \x44\xD3 |0
+<U307D> \x44\xD9 |0
+<U307E> \x44\xA4 |0
+<U307F> \x44\xA5 |0
+<U3080> \x44\xA6 |0
+<U3081> \x44\xA7 |0
+<U3082> \x44\xA8 |0
+<U3083> \x44\x53 |0
+<U3084> \x44\xA9 |0
+<U3085> \x44\x54 |0
+<U3086> \x44\xAA |0
+<U3087> \x44\x55 |0
+<U3088> \x44\xAC |0
+<U3089> \x44\xAD |0
+<U308A> \x44\xAE |0
+<U308B> \x44\xAF |0
+<U308C> \x44\xBA |0
+<U308D> \x44\xBB |0
+<U308E> \x44\x57 |0
+<U308F> \x44\xBC |0
+<U3090> \x44\xDA |0
+<U3091> \x44\xDB |0
+<U3092> \x44\x46 |0
+<U3093> \x44\xBD |0
+<U309B> \x43\xBE |0
+<U309C> \x43\xBF |0
+<U309D> \x44\xDC |0
+<U309E> \x44\xDD |0
+<U30A1> \x43\x47 |0
+<U30A2> \x43\x81 |0
+<U30A3> \x43\x48 |0
+<U30A4> \x43\x82 |0
+<U30A5> \x43\x49 |0
+<U30A6> \x43\x83 |0
+<U30A7> \x43\x51 |0
+<U30A8> \x43\x84 |0
+<U30A9> \x43\x52 |0
+<U30AA> \x43\x85 |0
+<U30AB> \x43\x86 |0
+<U30AC> \x43\xC0 |0
+<U30AD> \x43\x87 |0
+<U30AE> \x43\xC1 |0
+<U30AF> \x43\x88 |0
+<U30B0> \x43\xC2 |0
+<U30B1> \x43\x89 |0
+<U30B2> \x43\xC3 |0
+<U30B3> \x43\x8A |0
+<U30B4> \x43\xC4 |0
+<U30B5> \x43\x8C |0
+<U30B6> \x43\xC5 |0
+<U30B7> \x43\x8D |0
+<U30B8> \x43\xC6 |0
+<U30B9> \x43\x8E |0
+<U30BA> \x43\xC7 |0
+<U30BB> \x43\x8F |0
+<U30BC> \x43\xC8 |0
+<U30BD> \x43\x90 |0
+<U30BE> \x43\xC9 |0
+<U30BF> \x43\x91 |0
+<U30C0> \x43\xCA |0
+<U30C1> \x43\x92 |0
+<U30C2> \x43\xCB |0
+<U30C3> \x43\x56 |0
+<U30C4> \x43\x93 |0
+<U30C5> \x43\xCC |0
+<U30C6> \x43\x94 |0
+<U30C7> \x43\xCD |0
+<U30C8> \x43\x95 |0
+<U30C9> \x43\xCE |0
+<U30CA> \x43\x96 |0
+<U30CB> \x43\x97 |0
+<U30CC> \x43\x98 |0
+<U30CD> \x43\x99 |0
+<U30CE> \x43\x9A |0
+<U30CF> \x43\x9D |0
+<U30D0> \x43\xCF |0
+<U30D1> \x43\xD5 |0
+<U30D2> \x43\x9E |0
+<U30D3> \x43\xD0 |0
+<U30D4> \x43\xD6 |0
+<U30D5> \x43\x9F |0
+<U30D6> \x43\xD1 |0
+<U30D7> \x43\xD7 |0
+<U30D8> \x43\xA2 |0
+<U30D9> \x43\xD2 |0
+<U30DA> \x43\xD8 |0
+<U30DB> \x43\xA3 |0
+<U30DC> \x43\xD3 |0
+<U30DD> \x43\xD9 |0
+<U30DE> \x43\xA4 |0
+<U30DF> \x43\xA5 |0
+<U30E0> \x43\xA6 |0
+<U30E1> \x43\xA7 |0
+<U30E2> \x43\xA8 |0
+<U30E3> \x43\x53 |0
+<U30E4> \x43\xA9 |0
+<U30E5> \x43\x54 |0
+<U30E6> \x43\xAA |0
+<U30E7> \x43\x55 |0
+<U30E8> \x43\xAC |0
+<U30E9> \x43\xAD |0
+<U30EA> \x43\xAE |0
+<U30EB> \x43\xAF |0
+<U30EC> \x43\xBA |0
+<U30ED> \x43\xBB |0
+<U30EE> \x43\x57 |0
+<U30EF> \x43\xBC |0
+<U30F0> \x43\xDA |0
+<U30F1> \x43\xDB |0
+<U30F2> \x43\x46 |0
+<U30F3> \x43\xBD |0
+<U30F4> \x43\xD4 |0
+<U30F5> \x43\x59 |0
+<U30F6> \x43\x5A |0
+<U30FC> \x43\x58 |0
+<U30FD> \x43\xDC |0
+<U30FE> \x43\xDD |0
+<U3105> \x45\x56 |0
+<U3106> \x45\x57 |0
+<U3107> \x45\x58 |0
+<U3108> \x45\x59 |0
+<U3109> \x45\x5A |0
+<U310A> \x45\x5B |0
+<U310B> \x45\x5C |0
+<U310C> \x45\x5D |0
+<U310D> \x45\x5E |0
+<U310E> \x45\x5F |0
+<U310F> \x45\x60 |0
+<U3110> \x45\x61 |0
+<U3111> \x45\x62 |0
+<U3112> \x45\x63 |0
+<U3113> \x45\x64 |0
+<U3114> \x45\x65 |0
+<U3115> \x45\x66 |0
+<U3116> \x45\x67 |0
+<U3117> \x45\x68 |0
+<U3118> \x45\x69 |0
+<U3119> \x45\x6A |0
+<U311A> \x45\x6B |0
+<U311B> \x45\x6C |0
+<U311C> \x45\x6D |0
+<U311D> \x45\x6E |0
+<U311E> \x45\x6F |0
+<U311F> \x45\x70 |0
+<U3120> \x45\x71 |0
+<U3121> \x45\x72 |0
+<U3122> \x45\x73 |0
+<U3123> \x45\x74 |0
+<U3124> \x45\x75 |0
+<U3125> \x45\x76 |0
+<U3126> \x45\x77 |0
+<U3127> \x45\x78 |0
+<U3128> \x45\x79 |0
+<U3129> \x45\x7A |0
+<U3231> \x44\x6D |0
+<U32A3> \x46\xBA |0
+<U338E> \x46\xE2 |0
+<U338F> \x46\xE3 |0
+<U339C> \x46\xDD |0
+<U339D> \x46\xDE |0
+<U339E> \x46\xDF |0
+<U33A1> \x46\xE1 |0
+<U33C4> \x46\xE4 |0
+<U33CE> \x46\xE0 |0
+<U33D1> \x46\xCF |0
+<U33D2> \x46\xCE |0
+<U33D5> \x46\xDC |0
+<U4E00> \x48\x41 |3
+<U4E00> \x4C\x41 |0
+<U4E01> \x4C\x43 |0
+<U4E03> \x4C\x44 |0
+<U4E07> \x69\x46 |0
+<U4E08> \x4C\x57 |0
+<U4E09> \x4C\x55 |0
+<U4E0A> \x4C\x58 |0
+<U4E0B> \x4C\x56 |0
+<U4E0C> \x69\x47 |0
+<U4E0D> \x4C\x83 |0
+<U4E0E> \x69\x50 |0
+<U4E0F> \x69\x4E |0
+<U4E10> \x4C\x82 |0
+<U4E11> \x4C\x81 |0
+<U4E14> \x4C\xE1 |0
+<U4E15> \x4C\xE0 |0
+<U4E16> \x4C\xDF |0
+<U4E18> \x4C\xE2 |0
+<U4E19> \x4C\xDE |0
+<U4E1E> \x4D\xA1 |0
+<U4E1F> \x4D\xA2 |0
+<U4E26> \x4F\xE3 |0
+<U4E28> \x48\x42 |0
+<U4E2B> \x4C\x59 |0
+<U4E2D> \x4C\x84 |0
+<U4E2E> \x69\x51 |0
+<U4E30> \x4C\x85 |0
+<U4E31> \x69\x64 |0
+<U4E32> \x4E\x8C |0
+<U4E33> \x6B\x52 |0
+<U4E36> \x48\x43 |0
+<U4E38> \x4C\x5A |0
+<U4E39> \x4C\x86 |0
+<U4E3B> \x4C\xE3 |0
+<U4E3C> \x69\x65 |0
+<U4E3F> \x48\x44 |0
+<U4E42> \x69\x41 |0
+<U4E43> \x4C\x45 |0
+<U4E45> \x4C\x5C |0
+<U4E47> \x69\x48 |0
+<U4E48> \x4C\x5D |0
+<U4E4B> \x4C\x87 |0
+<U4E4D> \x4C\xE4 |0
+<U4E4E> \x4C\xE6 |0
+<U4E4F> \x4C\xE5 |0
+<U4E52> \x4D\xA3 |0
+<U4E53> \x4D\xA4 |0
+<U4E56> \x4F\xE4 |0
+<U4E58> \x53\xFD |0
+<U4E59> \x48\x45 |3
+<U4E59> \x4C\x42 |0
+<U4E5C> \x69\x42 |0
+<U4E5D> \x4C\x46 |0
+<U4E5E> \x4C\x5F |0
+<U4E5F> \x4C\x5E |0
+<U4E69> \x4D\xA5 |0
+<U4E73> \x4F\xE5 |0
+<U4E7E> \x56\x92 |0
+<U4E7F> \x72\x6F |0
+<U4E82> \x5B\xA9 |0
+<U4E83> \x79\x77 |0
+<U4E84> \x79\x78 |0
+<U4E85> \x48\x46 |0
+<U4E86> \x4C\x47 |0
+<U4E88> \x4C\x89 |0
+<U4E8B> \x4F\xE6 |0
+<U4E8C> \x48\x47 |3
+<U4E8C> \x4C\x48 |0
+<U4E8D> \x69\x49 |0
+<U4E8E> \x4C\x60 |0
+<U4E91> \x4C\x8A |0
+<U4E92> \x4C\x8C |0
+<U4E93> \x69\x52 |0
+<U4E94> \x4C\x8D |0
+<U4E95> \x4C\x8B |0
+<U4E99> \x4D\xA6 |0
+<U4E9B> \x4F\xE7 |0
+<U4E9E> \x4F\xE8 |0
+<U4E9F> \x51\xE6 |0
+<U4EA0> \x48\x48 |0
+<U4EA1> \x4C\x61 |0
+<U4EA2> \x4C\x8E |0
+<U4EA4> \x4D\xA7 |0
+<U4EA5> \x4D\xA9 |0
+<U4EA6> \x4D\xA8 |0
+<U4EA8> \x4E\x8D |0
+<U4EAB> \x4F\xE9 |0
+<U4EAC> \x4F\xEA |0
+<U4EAD> \x51\xE7 |0
+<U4EAE> \x51\xE8 |0
+<U4EB3> \x54\x41 |0
+<U4EB6> \x79\x79 |0
+<U4EB9> \x8F\x66 |0
+<U4EBA> \x48\x49 |3
+<U4EBA> \x4C\x49 |0
+<U4EC0> \x4C\x90 |0
+<U4EC1> \x4C\x8F |0
+<U4EC2> \x69\x53 |0
+<U4EC3> \x4C\x91 |0
+<U4EC4> \x4C\x97 |0
+<U4EC6> \x4C\x92 |0
+<U4EC7> \x4C\x93 |0
+<U4EC8> \x69\x55 |0
+<U4EC9> \x69\x54 |0
+<U4ECA> \x4C\x95 |0
+<U4ECB> \x4C\x96 |0
+<U4ECD> \x4C\x94 |0
+<U4ED4> \x4C\xE9 |0
+<U4ED5> \x4C\xEA |0
+<U4ED6> \x4C\xEB |0
+<U4ED7> \x4C\xEC |0
+<U4ED8> \x4C\xE8 |0
+<U4ED9> \x4C\xEF |0
+<U4EDA> \x69\x6B |0
+<U4EDC> \x69\x67 |0
+<U4EDD> \x69\x6A |0
+<U4EDE> \x4C\xF0 |0
+<U4EDF> \x4D\x43 |0
+<U4EE1> \x69\x69 |0
+<U4EE3> \x4C\xED |0
+<U4EE4> \x4C\xEE |0
+<U4EE5> \x4C\xE7 |0
+<U4EE8> \x69\x66 |0
+<U4EE9> \x69\x68 |0
+<U4EF0> \x4D\xB6 |0
+<U4EF1> \x69\x90 |0
+<U4EF2> \x4D\xB3 |0
+<U4EF3> \x4D\xB7 |0
+<U4EF4> \x69\x9A |0
+<U4EF5> \x69\x8E |0
+<U4EF6> \x4D\xB4 |0
+<U4EF7> \x69\x92 |0
+<U4EFB> \x4D\xB5 |0
+<U4EFD> \x4D\xB8 |0
+<U4EFF> \x4D\xAA |0
+<U4F00> \x69\x91 |0
+<U4F01> \x4D\xB9 |0
+<U4F02> \x69\x95 |0
+<U4F04> \x69\x99 |0
+<U4F05> \x69\x96 |0
+<U4F08> \x69\x93 |0
+<U4F09> \x4D\xAB |0
+<U4F0A> \x4D\xAD |0
+<U4F0B> \x4D\xBA |0
+<U4F0D> \x4D\xAF |0
+<U4F0E> \x69\x8B |0
+<U4F0F> \x4D\xB2 |0
+<U4F10> \x4D\xB0 |0
+<U4F11> \x4D\xB1 |0
+<U4F12> \x69\x9B |0
+<U4F13> \x69\x98 |0
+<U4F14> \x69\x8F |0
+<U4F15> \x4D\xAE |0
+<U4F18> \x69\x8C |0
+<U4F19> \x4D\xAC |0
+<U4F1D> \x69\x94 |0
+<U4F22> \x69\x97 |0
+<U4F2C> \x69\x8D |0
+<U4F2D> \x6A\x48 |0
+<U4F2F> \x4E\xA3 |0
+<U4F30> \x4E\x96 |0
+<U4F33> \x6A\x49 |0
+<U4F34> \x4E\x93 |0
+<U4F36> \x4E\xA5 |0
+<U4F38> \x4E\x9B |0
+<U4F3A> \x4E\x9A |0
+<U4F3B> \x69\xFA |0
+<U4F3C> \x4E\x9E |0
+<U4F3D> \x4E\x99 |0
+<U4F3E> \x6A\x42 |0
+<U4F3F> \x6A\x4A |0
+<U4F41> \x6A\x46 |0
+<U4F43> \x4E\x9C |0
+<U4F46> \x4E\x9F |0
+<U4F47> \x4E\x90 |0
+<U4F48> \x4E\xA8 |0
+<U4F49> \x69\xFC |0
+<U4F4C> \x6B\x5E |0
+<U4F4D> \x4E\x8E |0
+<U4F4E> \x4E\xA4 |0
+<U4F4F> \x4E\x8F |0
+<U4F50> \x4E\x97 |0
+<U4F51> \x4E\x98 |0
+<U4F52> \x6A\x44 |0
+<U4F53> \x69\xFD |0
+<U4F54> \x4E\x9D |0
+<U4F55> \x4E\x95 |0
+<U4F56> \x69\xF9 |0
+<U4F57> \x4E\x91 |0
+<U4F58> \x6A\x47 |0
+<U4F59> \x4E\xA6 |0
+<U4F5A> \x4E\xA9 |0
+<U4F5B> \x4E\x94 |0
+<U4F5C> \x4E\xA1 |0
+<U4F5D> \x4E\xA7 |0
+<U4F5E> \x4E\x92 |0
+<U4F5F> \x6A\x45 |0
+<U4F60> \x4E\xA2 |0
+<U4F61> \x6A\x4B |0
+<U4F62> \x69\xFB |0
+<U4F63> \x4E\xA0 |0
+<U4F64> \x6A\x41 |0
+<U4F67> \x6A\x43 |0
+<U4F69> \x4F\xF8 |0
+<U4F6A> \x6B\x60 |0
+<U4F6B> \x6B\x6C |0
+<U4F6C> \x4F\xF0 |0
+<U4F6E> \x6B\x6D |0
+<U4F6F> \x4F\xEB |0
+<U4F70> \x4F\xF5 |0
+<U4F73> \x4F\xEE |0
+<U4F74> \x6B\x5A |0
+<U4F75> \x4F\xF6 |0
+<U4F76> \x6B\x59 |0
+<U4F77> \x6B\x5D |0
+<U4F78> \x6B\x64 |0
+<U4F79> \x6B\x62 |0
+<U4F7A> \x50\x41 |0
+<U4F7B> \x4F\xF9 |0
+<U4F7C> \x6B\x54 |0
+<U4F7D> \x6B\x56 |0
+<U4F7E> \x4F\xFB |0
+<U4F7F> \x4F\xEF |0
+<U4F80> \x6B\x57 |0
+<U4F81> \x6B\x63 |0
+<U4F82> \x6B\x6A |0
+<U4F83> \x4F\xF4 |0
+<U4F84> \x6B\x5C |0
+<U4F85> \x6B\x55 |0
+<U4F86> \x4F\xF3 |0
+<U4F87> \x6B\x58 |0
+<U4F88> \x4F\xF7 |0
+<U4F89> \x6B\x5B |0
+<U4F8B> \x4F\xF2 |0
+<U4F8D> \x4F\xED |0
+<U4F8F> \x4F\xFC |0
+<U4F90> \x6B\x65 |0
+<U4F91> \x4F\xFD |0
+<U4F92> \x6B\x69 |0
+<U4F94> \x6B\x67 |0
+<U4F95> \x6B\x6B |0
+<U4F96> \x4F\xFA |0
+<U4F97> \x6B\x5F |0
+<U4F98> \x6B\x53 |0
+<U4F9A> \x6B\x61 |0
+<U4F9B> \x4F\xF1 |0
+<U4F9C> \x6B\x66 |0
+<U4F9D> \x4F\xEC |0
+<U4F9E> \x6B\x68 |0
+<U4FAE> \x51\xF7 |0
+<U4FAF> \x51\xEB |0
+<U4FB2> \x6D\x43 |0
+<U4FB3> \x6D\x4B |0
+<U4FB5> \x51\xEA |0
+<U4FB6> \x51\xF2 |0
+<U4FB7> \x52\x41 |0
+<U4FB9> \x6D\x51 |0
+<U4FBA> \x6D\x4F |0
+<U4FBB> \x6D\x4A |0
+<U4FBF> \x51\xEC |0
+<U4FC0> \x6D\x50 |0
+<U4FC1> \x6D\x46 |0
+<U4FC2> \x51\xFA |0
+<U4FC3> \x51\xF1 |0
+<U4FC4> \x51\xF9 |0
+<U4FC5> \x6D\x41 |0
+<U4FC7> \x6D\x4D |0
+<U4FC9> \x6D\x44 |0
+<U4FCA> \x51\xF5 |0
+<U4FCB> \x6D\x45 |0
+<U4FCD> \x6C\xFD |0
+<U4FCE> \x51\xFC |0
+<U4FCF> \x51\xEF |0
+<U4FD0> \x51\xF8 |0
+<U4FD1> \x51\xEE |0
+<U4FD3> \x6D\x42 |0
+<U4FD4> \x6D\x47 |0
+<U4FD6> \x6D\x4E |0
+<U4FD7> \x51\xF6 |0
+<U4FD8> \x51\xF3 |0
+<U4FD9> \x6D\x49 |0
+<U4FDA> \x51\xFB |0
+<U4FDB> \x6D\x4C |0
+<U4FDC> \x6D\x48 |0
+<U4FDD> \x51\xF0 |0
+<U4FDE> \x51\xFD |0
+<U4FDF> \x51\xF4 |0
+<U4FE0> \x51\xED |0
+<U4FE1> \x51\xE9 |0
+<U4FEC> \x6D\x52 |0
+<U4FEE> \x54\x5B |0
+<U4FEF> \x54\x45 |0
+<U4FF1> \x54\x55 |0
+<U4FF3> \x54\x5A |0
+<U4FF4> \x6F\x93 |0
+<U4FF5> \x6F\x92 |0
+<U4FF6> \x6F\x97 |0
+<U4FF7> \x6F\x98 |0
+<U4FF8> \x54\x48 |0
+<U4FFA> \x54\x51 |0
+<U4FFE> \x54\x5E |0
+<U5000> \x54\x52 |0
+<U5005> \x6F\x8C |0
+<U5006> \x54\x4B |0
+<U5007> \x6F\x8D |0
+<U5009> \x54\x60 |0
+<U500B> \x54\x57 |0
+<U500C> \x54\x42 |0
+<U500D> \x54\x43 |0
+<U500E> \x6F\xA0 |0
+<U500F> \x56\xA3 |0
+<U5011> \x54\x50 |0
+<U5012> \x54\x4F |0
+<U5013> \x6F\x8E |0
+<U5014> \x54\x53 |0
+<U5015> \x72\x7F |0
+<U5016> \x54\x4A |0
+<U5017> \x6F\x99 |0
+<U5018> \x54\x59 |0
+<U5019> \x54\x58 |0
+<U501A> \x54\x4E |0
+<U501B> \x6F\x91 |0
+<U501C> \x6F\x9A |0
+<U501E> \x6F\x8B |0
+<U501F> \x54\x4D |0
+<U5020> \x6F\x9B |0
+<U5021> \x54\x56 |0
+<U5022> \x6F\x8F |0
+<U5023> \x54\x44 |0
+<U5025> \x54\x47 |0
+<U5026> \x54\x46 |0
+<U5027> \x6F\x9C |0
+<U5028> \x54\x54 |0
+<U5029> \x54\x49 |0
+<U502A> \x54\x5D |0
+<U502B> \x54\x5F |0
+<U502C> \x6F\x96 |0
+<U502D> \x54\x5C |0
+<U502F> \x6F\x9E |0
+<U5030> \x6F\x90 |0
+<U5031> \x6F\x9F |0
+<U5033> \x6F\x94 |0
+<U5035> \x6F\x9D |0
+<U5037> \x6F\x95 |0
+<U503C> \x54\x4C |0
+<U5040> \x72\x88 |0
+<U5041> \x72\x7B |0
+<U5043> \x56\x97 |0
+<U5045> \x72\x81 |0
+<U5046> \x72\x87 |0
+<U5047> \x56\x96 |0
+<U5048> \x72\x79 |0
+<U5049> \x56\x9A |0
+<U504A> \x72\x7D |0
+<U504B> \x72\x76 |0
+<U504C> \x56\x98 |0
+<U504D> \x72\x7A |0
+<U504E> \x56\x9D |0
+<U504F> \x56\xA2 |0
+<U5051> \x72\x8C |0
+<U5053> \x72\x75 |0
+<U5055> \x56\x9E |0
+<U5057> \x72\x8B |0
+<U505A> \x56\x99 |0
+<U505B> \x72\x7C |0
+<U505C> \x56\x95 |0
+<U505D> \x72\x77 |0
+<U505E> \x72\x73 |0
+<U505F> \x72\x82 |0
+<U5060> \x72\x74 |0
+<U5061> \x72\x72 |0
+<U5062> \x72\x7E |0
+<U5063> \x72\x85 |0
+<U5064> \x72\x86 |0
+<U5065> \x56\x9B |0
+<U5068> \x75\xC0 |0
+<U5069> \x72\x83 |0
+<U506A> \x72\x71 |0
+<U506B> \x72\x84 |0
+<U506D> \x56\xA5 |0
+<U506E> \x72\x89 |0
+<U506F> \x56\xA4 |0
+<U5070> \x72\x70 |0
+<U5072> \x72\x78 |0
+<U5073> \x72\x8A |0
+<U5074> \x56\xA0 |0
+<U5075> \x56\x9F |0
+<U5076> \x56\x9C |0
+<U5077> \x56\xA1 |0
+<U507A> \x56\x93 |0
+<U507D> \x56\x94 |0
+<U5080> \x59\x4E |0
+<U5082> \x75\xC3 |0
+<U5083> \x75\xBC |0
+<U5085> \x59\x4B |0
+<U5087> \x75\xC4 |0
+<U508B> \x75\xBA |0
+<U508C> \x75\xBD |0
+<U508D> \x59\x4A |0
+<U508E> \x75\xBE |0
+<U5091> \x59\x4D |0
+<U5092> \x75\xC2 |0
+<U5094> \x75\xB8 |0
+<U5095> \x75\xB7 |0
+<U5096> \x59\x4F |0
+<U5098> \x59\x50 |0
+<U5099> \x59\x4C |0
+<U509A> \x59\x51 |0
+<U509B> \x75\xB6 |0
+<U509C> \x75\xC1 |0
+<U509D> \x75\xBF |0
+<U509E> \x75\xB9 |0
+<U50A2> \x59\x49 |0
+<U50A3> \x75\xBB |0
+<U50AC> \x5B\xB0 |0
+<U50AD> \x5B\xAA |0
+<U50AE> \x79\x7D |0
+<U50AF> \x5B\xB3 |0
+<U50B0> \x79\x84 |0
+<U50B1> \x79\x87 |0
+<U50B2> \x5B\xAC |0
+<U50B3> \x5B\xAD |0
+<U50B4> \x79\x81 |0
+<U50B5> \x5B\xAB |0
+<U50B6> \x79\x8A |0
+<U50B7> \x5B\xB1 |0
+<U50B8> \x79\x8B |0
+<U50BA> \x79\x86 |0
+<U50BB> \x5B\xB2 |0
+<U50BD> \x79\x7A |0
+<U50BE> \x5B\xAF |0
+<U50BF> \x79\x7B |0
+<U50C1> \x79\x85 |0
+<U50C2> \x79\x83 |0
+<U50C4> \x79\x7E |0
+<U50C5> \x5B\xAE |0
+<U50C6> \x79\x7C |0
+<U50C7> \x5B\xB4 |0
+<U50C8> \x79\x82 |0
+<U50C9> \x79\x89 |0
+<U50CA> \x79\x7F |0
+<U50CB> \x79\x88 |0
+<U50CE> \x5D\xFB |0
+<U50CF> \x5D\xF8 |0
+<U50D1> \x5D\xF9 |0
+<U50D3> \x7D\x43 |0
+<U50D4> \x7C\xF8 |0
+<U50D5> \x5D\xF7 |0
+<U50D6> \x5D\xF4 |0
+<U50D7> \x7C\xF9 |0
+<U50DA> \x5D\xF6 |0
+<U50DB> \x7C\xFC |0
+<U50DD> \x7D\x41 |0
+<U50E0> \x7D\x48 |0
+<U50E3> \x7D\x47 |0
+<U50E4> \x7D\x42 |0
+<U50E5> \x5D\xF3 |0
+<U50E6> \x7C\xF7 |0
+<U50E7> \x5D\xF1 |0
+<U50E8> \x7C\xFA |0
+<U50E9> \x5D\xFC |0
+<U50EA> \x7C\xFD |0
+<U50EC> \x7D\x44 |0
+<U50ED> \x5D\xF5 |0
+<U50EE> \x5D\xF2 |0
+<U50EF> \x7D\x46 |0
+<U50F0> \x7D\x45 |0
+<U50F1> \x5D\xFA |0
+<U50F3> \x7C\xFB |0
+<U50F5> \x60\x42 |0
+<U50F6> \x80\x76 |0
+<U50F8> \x80\x73 |0
+<U50F9> \x60\x43 |0
+<U50FB> \x60\x41 |0
+<U50FD> \x80\x7A |0
+<U50FE> \x80\x77 |0
+<U50FF> \x80\x70 |0
+<U5100> \x5F\xFD |0
+<U5102> \x60\x44 |0
+<U5103> \x80\x71 |0
+<U5104> \x5F\xFC |0
+<U5105> \x60\x47 |0
+<U5106> \x80\x74 |0
+<U5107> \x80\x75 |0
+<U5108> \x60\x45 |0
+<U5109> \x60\x46 |0
+<U510A> \x80\x7B |0
+<U510B> \x80\x78 |0
+<U510C> \x80\x79 |0
+<U5110> \x62\x53 |0
+<U5111> \x83\xC3 |0
+<U5112> \x62\x50 |0
+<U5113> \x83\xC0 |0
+<U5114> \x62\x52 |0
+<U5115> \x62\x54 |0
+<U5117> \x83\xC1 |0
+<U5118> \x62\x51 |0
+<U511A> \x83\xC2 |0
+<U511C> \x83\xBF |0
+<U511F> \x63\xC0 |0
+<U5120> \x86\xC8 |0
+<U5121> \x63\xC1 |0
+<U5122> \x86\xC6 |0
+<U5124> \x86\xC7 |0
+<U5125> \x86\xC5 |0
+<U5126> \x86\xC4 |0
+<U5129> \x86\xC9 |0
+<U512A> \x63\xBF |0
+<U512D> \x89\x65 |0
+<U512E> \x89\x66 |0
+<U5130> \x80\x72 |0
+<U5131> \x89\x64 |0
+<U5132> \x63\xC2 |0
+<U5133> \x66\x4B |0
+<U5134> \x8B\x5A |0
+<U5135> \x8B\x5B |0
+<U5137> \x67\x83 |0
+<U5138> \x67\x84 |0
+<U5139> \x8E\x70 |0
+<U513A> \x8E\x6F |0
+<U513B> \x67\xD7 |0
+<U513C> \x67\xD6 |0
+<U513D> \x90\x41 |0
+<U513F> \x48\x4A |3
+<U513F> \x4C\x4A |0
+<U5140> \x4C\x62 |0
+<U5141> \x4C\x99 |0
+<U5143> \x4C\x98 |0
+<U5144> \x4C\xF2 |0
+<U5145> \x4C\xF1 |0
+<U5146> \x4D\xBD |0
+<U5147> \x4D\xBC |0
+<U5148> \x4D\xBE |0
+<U5149> \x4D\xBB |0
+<U514B> \x4E\xAB |0
+<U514C> \x4E\xAA |0
+<U514D> \x4E\xAC |0
+<U5152> \x50\x43 |0
+<U5154> \x50\x42 |0
+<U5155> \x50\x44 |0
+<U5157> \x52\x42 |0
+<U5159> \x46\xF1 |0
+<U515A> \x6F\xA1 |0
+<U515B> \x46\xF2 |0
+<U515C> \x56\xA6 |0
+<U515D> \x46\xF4 |0
+<U515E> \x46\xF3 |0
+<U515F> \x75\xC5 |0
+<U5161> \x46\xF5 |0
+<U5162> \x5D\xFD |0
+<U5163> \x46\xF6 |0
+<U5165> \x48\x4B |3
+<U5165> \x4C\x4B |0
+<U5167> \x4C\x9A |0
+<U5168> \x4D\xBF |0
+<U5169> \x50\x45 |0
+<U516B> \x48\x4C |3
+<U516B> \x4C\x4C |0
+<U516C> \x4C\x9D |0
+<U516D> \x4C\x9B |0
+<U516E> \x4C\x9C |0
+<U5171> \x4D\xC0 |0
+<U5175> \x4E\xAD |0
+<U5176> \x50\x47 |0
+<U5177> \x50\x46 |0
+<U5178> \x50\x48 |0
+<U517C> \x54\x61 |0
+<U5180> \x62\x55 |0
+<U5182> \x48\x4D |0
+<U5187> \x69\x4F |0
+<U5189> \x4C\xF3 |0
+<U518A> \x4C\xF4 |0
+<U518D> \x4D\xC1 |0
+<U518F> \x6A\x4C |0
+<U5191> \x52\x44 |0
+<U5192> \x52\x43 |0
+<U5193> \x6F\xA3 |0
+<U5194> \x6F\xA2 |0
+<U5195> \x56\xA7 |0
+<U5196> \x48\x4E |0
+<U5197> \x4C\x9E |0
+<U5198> \x69\x56 |0
+<U519E> \x6B\x6E |0
+<U51A0> \x52\x45 |0
+<U51A2> \x54\x64 |0
+<U51A4> \x54\x62 |0
+<U51A5> \x54\x63 |0
+<U51AA> \x62\x56 |0
+<U51AB> \x48\x4F |0
+<U51AC> \x4C\xF5 |0
+<U51B0> \x4D\xC2 |0
+<U51B1> \x69\x9C |0
+<U51B6> \x4E\xAE |0
+<U51B7> \x4E\xAF |0
+<U51B9> \x6A\x4D |0
+<U51BC> \x6B\x6F |0
+<U51BD> \x50\x49 |0
+<U51BE> \x6B\x70 |0
+<U51C4> \x6F\xA5 |0
+<U51C5> \x6F\xA6 |0
+<U51C6> \x54\x67 |0
+<U51C8> \x6F\xA7 |0
+<U51CA> \x6F\xA4 |0
+<U51CB> \x54\x68 |0
+<U51CC> \x54\x66 |0
+<U51CD> \x54\x65 |0
+<U51CE> \x6F\xA8 |0
+<U51D0> \x72\x8D |0
+<U51D4> \x75\xC6 |0
+<U51D7> \x79\x8C |0
+<U51D8> \x7D\x49 |0
+<U51DC> \x60\x48 |0
+<U51DD> \x62\x57 |0
+<U51DE> \x83\xC4 |0
+<U51E0> \x48\x50 |3
+<U51E0> \x4C\x4D |0
+<U51E1> \x4C\x5B |0
+<U51F0> \x56\xA8 |0
+<U51F1> \x59\x53 |0
+<U51F3> \x5E\x41 |0
+<U51F5> \x48\x51 |3
+<U51F5> \x69\x43 |0
+<U51F6> \x4C\x9F |0
+<U51F8> \x4C\xF8 |0
+<U51F9> \x4C\xF6 |0
+<U51FA> \x4C\xF7 |0
+<U51FD> \x50\x4A |0
+<U5200> \x48\x52 |3
+<U5200> \x4C\x4E |0
+<U5201> \x4C\x4F |0
+<U5203> \x4C\x63 |0
+<U5206> \x4C\xA0 |0
+<U5207> \x4C\xA1 |0
+<U5208> \x4C\xA2 |0
+<U5209> \x69\x9E |0
+<U520A> \x4C\xF9 |0
+<U520C> \x69\x6C |0
+<U520E> \x4D\xC6 |0
+<U5210> \x69\x9F |0
+<U5211> \x4D\xC4 |0
+<U5212> \x4D\xC5 |0
+<U5213> \x69\x9D |0
+<U5216> \x4D\xC7 |0
+<U5217> \x4D\xC3 |0
+<U521C> \x6A\x4E |0
+<U521D> \x51\xCE |0
+<U521E> \x6A\x4F |0
+<U5221> \x6A\x50 |0
+<U5224> \x4E\xB1 |0
+<U5225> \x4E\xB0 |0
+<U5228> \x4E\xB4 |0
+<U5229> \x4E\xB2 |0
+<U522A> \x4E\xB3 |0
+<U522E> \x50\x50 |0
+<U5230> \x50\x4F |0
+<U5231> \x6B\x75 |0
+<U5232> \x6B\x72 |0
+<U5233> \x6B\x73 |0
+<U5235> \x6B\x71 |0
+<U5236> \x50\x51 |0
+<U5237> \x50\x4D |0
+<U5238> \x50\x4C |0
+<U523A> \x50\x4E |0
+<U523B> \x50\x4B |0
+<U5241> \x50\x52 |0
+<U5243> \x52\x47 |0
+<U5244> \x6D\x53 |0
+<U5246> \x6B\x74 |0
+<U5247> \x52\x4C |0
+<U5249> \x6D\x54 |0
+<U524A> \x52\x48 |0
+<U524B> \x52\x4B |0
+<U524C> \x52\x4A |0
+<U524D> \x52\x49 |0
+<U524E> \x52\x46 |0
+<U5252> \x6F\xAB |0
+<U5254> \x54\x6B |0
+<U5255> \x6F\xAE |0
+<U5256> \x54\x69 |0
+<U525A> \x6F\xAA |0
+<U525B> \x54\x6C |0
+<U525C> \x54\x6A |0
+<U525D> \x54\x6D |0
+<U525E> \x6F\xAC |0
+<U525F> \x6F\xAD |0
+<U5261> \x6F\xA9 |0
+<U5262> \x6F\xAF |0
+<U5269> \x59\x57 |0
+<U526A> \x56\xA9 |0
+<U526B> \x72\x8E |0
+<U526C> \x72\x90 |0
+<U526D> \x72\x8F |0
+<U526E> \x72\x91 |0
+<U526F> \x56\xAA |0
+<U5272> \x59\x54 |0
+<U5274> \x59\x55 |0
+<U5275> \x59\x56 |0
+<U5277> \x5B\xB6 |0
+<U5278> \x79\x8E |0
+<U527A> \x79\x8D |0
+<U527B> \x79\x8F |0
+<U527C> \x79\x90 |0
+<U527D> \x5B\xB7 |0
+<U527F> \x5B\xB5 |0
+<U5280> \x7D\x4A |0
+<U5281> \x7D\x4B |0
+<U5282> \x5E\x43 |0
+<U5283> \x5E\x42 |0
+<U5284> \x7E\xE2 |0
+<U5287> \x60\x49 |0
+<U5288> \x60\x4A |0
+<U5289> \x60\x4B |0
+<U528A> \x60\x4D |0
+<U528B> \x80\x7C |0
+<U528C> \x80\x7D |0
+<U528D> \x60\x4C |0
+<U5291> \x62\x58 |0
+<U5293> \x62\x59 |0
+<U5296> \x8B\x5C |0
+<U5297> \x8E\x72 |0
+<U5298> \x8E\x71 |0
+<U5299> \x90\x42 |0
+<U529B> \x48\x53 |3
+<U529B> \x4C\x50 |0
+<U529F> \x4C\xFB |0
+<U52A0> \x4C\xFA |0
+<U52A3> \x4D\xC8 |0
+<U52A6> \x69\xA0 |0
+<U52A9> \x4E\xB6 |0
+<U52AA> \x4E\xB7 |0
+<U52AB> \x4E\xB5 |0
+<U52AC> \x4E\xB8 |0
+<U52AD> \x6A\x51 |0
+<U52AE> \x6A\x52 |0
+<U52BB> \x50\x54 |0
+<U52BC> \x6B\x76 |0
+<U52BE> \x50\x53 |0
+<U52C0> \x6D\x55 |0
+<U52C1> \x52\x50 |0
+<U52C2> \x6D\x56 |0
+<U52C3> \x52\x4F |0
+<U52C7> \x52\x4D |0
+<U52C9> \x52\x4E |0
+<U52CD> \x6F\xB0 |0
+<U52D2> \x56\xAB |0
+<U52D3> \x72\x93 |0
+<U52D5> \x56\xAE |0
+<U52D6> \x72\x92 |0
+<U52D7> \x57\xAA |0
+<U52D8> \x56\xAD |0
+<U52D9> \x56\xAC |0
+<U52DB> \x59\x5A |0
+<U52DD> \x59\x59 |0
+<U52DE> \x59\x58 |0
+<U52DF> \x5B\xB8 |0
+<U52E2> \x5B\xBB |0
+<U52E3> \x5B\xBC |0
+<U52E4> \x5B\xBA |0
+<U52E6> \x5B\xB9 |0
+<U52E9> \x7D\x4C |0
+<U52EB> \x7D\x4D |0
+<U52EF> \x80\x7F |0
+<U52F0> \x60\x4E |0
+<U52F1> \x80\x7E |0
+<U52F3> \x62\x5A |0
+<U52F4> \x86\xCA |0
+<U52F5> \x63\xC3 |0
+<U52F7> \x8B\x5D |0
+<U52F8> \x66\xDF |0
+<U52F9> \x48\x54 |0
+<U52FA> \x4C\x64 |0
+<U52FB> \x4C\xA3 |0
+<U52FC> \x69\x57 |0
+<U52FE> \x4C\xA4 |0
+<U52FF> \x4C\xA5 |0
+<U5305> \x4C\xFC |0
+<U5306> \x4C\xFD |0
+<U5308> \x4D\xC9 |0
+<U5309> \x6A\x53 |0
+<U530A> \x6B\x77 |0
+<U530B> \x6B\x78 |0
+<U530D> \x52\x51 |0
+<U530E> \x6F\xB1 |0
+<U530F> \x56\xB0 |0
+<U5310> \x56\xAF |0
+<U5311> \x75\xC8 |0
+<U5312> \x75\xC7 |0
+<U5315> \x48\x55 |3
+<U5315> \x4C\x51 |0
+<U5316> \x4C\xA6 |0
+<U5317> \x4D\x41 |0
+<U5319> \x56\xB1 |0
+<U531A> \x48\x56 |3
+<U531A> \x69\x44 |0
+<U531C> \x69\x6D |0
+<U531D> \x4D\x42 |0
+<U531F> \x69\xA2 |0
+<U5320> \x4D\xCB |0
+<U5321> \x4D\xCA |0
+<U5322> \x69\xA1 |0
+<U5323> \x4E\xB9 |0
+<U532A> \x54\x6E |0
+<U532D> \x72\x94 |0
+<U532F> \x5B\xBD |0
+<U5330> \x7D\x4E |0
+<U5331> \x5E\x44 |0
+<U5334> \x83\xC5 |0
+<U5337> \x8C\xEB |0
+<U5338> \x48\x57 |0
+<U5339> \x4C\xA7 |0
+<U533C> \x6B\x79 |0
+<U533D> \x6D\x57 |0
+<U533E> \x56\xB4 |0
+<U533F> \x56\xB2 |0
+<U5340> \x56\xB3 |0
+<U5341> \x45\x4A |3
+<U5341> \x48\x58 |3
+<U5341> \x4C\x52 |0
+<U5343> \x4C\x65 |0
+<U5344> \x45\x4B |0
+<U5345> \x45\x4C |3
+<U5345> \x4C\xAA |0
+<U5347> \x4C\xA9 |0
+<U5348> \x4C\xA8 |0
+<U5349> \x4D\x45 |0
+<U534A> \x4D\x44 |0
+<U534C> \x69\x6E |0
+<U534D> \x69\xA3 |0
+<U5351> \x50\x58 |0
+<U5352> \x50\x55 |0
+<U5353> \x50\x57 |0
+<U5354> \x50\x56 |0
+<U5357> \x52\x52 |0
+<U535A> \x59\x5B |0
+<U535C> \x48\x59 |3
+<U535C> \x4C\x53 |0
+<U535E> \x4C\xAB |0
+<U5360> \x4D\x47 |0
+<U5361> \x4D\x46 |0
+<U5363> \x6A\x54 |0
+<U5366> \x50\x59 |0
+<U5369> \x48\x5A |0
+<U536C> \x69\x58 |0
+<U536E> \x4D\x49 |0
+<U536F> \x4D\x48 |0
+<U5370> \x4D\xCC |0
+<U5371> \x4D\xCD |0
+<U5372> \x6A\x55 |0
+<U5373> \x4E\xBA |0
+<U5375> \x4E\xBB |0
+<U5377> \x50\x5A |0
+<U5378> \x50\x5B |0
+<U5379> \x50\x5C |0
+<U537B> \x52\x53 |0
+<U537C> \x6D\x58 |0
+<U537F> \x54\x6F |0
+<U5382> \x48\x5B |3
+<U5382> \x69\x45 |0
+<U5384> \x4C\xAC |0
+<U538A> \x69\xA4 |0
+<U538E> \x6A\x56 |0
+<U538F> \x6A\x57 |0
+<U5392> \x6B\x7A |0
+<U5394> \x6B\x7B |0
+<U5396> \x6D\x5A |0
+<U5397> \x6D\x59 |0
+<U5398> \x6D\x5C |0
+<U5399> \x6D\x5B |0
+<U539A> \x52\x54 |0
+<U539C> \x72\x95 |0
+<U539D> \x54\x71 |0
+<U539E> \x6F\xB2 |0
+<U539F> \x54\x70 |0
+<U53A4> \x75\xC9 |0
+<U53A5> \x59\x5C |0
+<U53A7> \x75\xCA |0
+<U53AC> \x7D\x4F |0
+<U53AD> \x5E\x45 |0
+<U53B2> \x60\x4F |0
+<U53B4> \x8B\x5E |0
+<U53B6> \x48\x5C |0
+<U53B9> \x69\x59 |0
+<U53BB> \x4D\x4A |0
+<U53C3> \x56\xB5 |0
+<U53C8> \x48\x5D |3
+<U53C8> \x4C\x54 |0
+<U53C9> \x4C\x66 |0
+<U53CA> \x4C\xAE |0
+<U53CB> \x4C\xAD |0
+<U53CD> \x4C\xAF |0
+<U53D4> \x50\x5E |0
+<U53D6> \x50\x5D |0
+<U53D7> \x50\x5F |0
+<U53DB> \x52\x55 |0
+<U53DF> \x54\x72 |0
+<U53E1> \x83\xC6 |0
+<U53E2> \x65\x5A |0
+<U53E3> \x48\x5E |3
+<U53E3> \x4C\x67 |0
+<U53E4> \x4D\x4C |0
+<U53E5> \x4D\x5B |0
+<U53E6> \x4D\x56 |0
+<U53E8> \x4D\x51 |0
+<U53E9> \x4D\x50 |0
+<U53EA> \x4D\x57 |0
+<U53EB> \x4D\x55 |0
+<U53EC> \x4D\x4E |0
+<U53ED> \x4D\x5C |0
+<U53EE> \x4D\x4F |0
+<U53EF> \x4D\x4B |0
+<U53F0> \x4D\x5A |0
+<U53F1> \x4D\x59 |0
+<U53F2> \x4D\x58 |0
+<U53F3> \x4D\x4D |0
+<U53F5> \x4D\x54 |0
+<U53F8> \x4D\x53 |0
+<U53FB> \x4D\x5D |0
+<U53FC> \x4D\x52 |0
+<U5401> \x4D\xD3 |0
+<U5403> \x4D\xD9 |0
+<U5404> \x4D\xD5 |0
+<U5406> \x4D\xDB |0
+<U5407> \x69\xA5 |0
+<U5408> \x4D\xD8 |0
+<U5409> \x4D\xCE |0
+<U540A> \x4D\xD1 |0
+<U540B> \x4D\xD4 |0
+<U540C> \x4D\xD0 |0
+<U540D> \x4D\xD7 |0
+<U540E> \x4D\xDA |0
+<U540F> \x4D\xCF |0
+<U5410> \x4D\xD2 |0
+<U5411> \x4D\xD6 |0
+<U5412> \x4D\xDC |0
+<U5418> \x6A\x60 |0
+<U5419> \x6A\x5D |0
+<U541B> \x4E\xC8 |0
+<U541C> \x6A\x5E |0
+<U541D> \x4E\xBC |0
+<U541E> \x4E\xBE |0
+<U541F> \x4E\xD6 |0
+<U5420> \x4E\xD1 |0
+<U5424> \x6A\x65 |0
+<U5425> \x6A\x5F |0
+<U5426> \x4E\xC0 |0
+<U5427> \x4E\xC2 |0
+<U5428> \x6A\x64 |0
+<U5429> \x4E\xC9 |0
+<U542A> \x6A\x5A |0
+<U542B> \x4E\xD5 |0
+<U542C> \x4E\xD7 |0
+<U542D> \x4E\xBD |0
+<U542E> \x4E\xCE |0
+<U5430> \x6A\x58 |0
+<U5431> \x4E\xD4 |0
+<U5433> \x4E\xC5 |0
+<U5435> \x4E\xCF |0
+<U5436> \x4E\xD0 |0
+<U5437> \x6A\x59 |0
+<U5438> \x4E\xCD |0
+<U5439> \x4E\xCB |0
+<U543B> \x4E\xCC |0
+<U543C> \x4E\xD2 |0
+<U543D> \x6A\x61 |0
+<U543E> \x4E\xBF |0
+<U5440> \x4E\xD3 |0
+<U5441> \x6A\x63 |0
+<U5442> \x4E\xC7 |0
+<U5443> \x4E\xC4 |0
+<U5445> \x6A\x5C |0
+<U5446> \x4E\xC3 |0
+<U5447> \x6A\x66 |0
+<U5448> \x4E\xC6 |0
+<U544A> \x4E\xCA |0
+<U544E> \x4E\xC1 |0
+<U544F> \x6A\x62 |0
+<U5454> \x6A\x5B |0
+<U5460> \x6B\x8D |0
+<U5461> \x6B\x8C |0
+<U5462> \x50\x71 |0
+<U5463> \x6B\x8F |0
+<U5464> \x6B\x91 |0
+<U5465> \x6B\x86 |0
+<U5466> \x6B\x89 |0
+<U5467> \x6B\x90 |0
+<U5468> \x50\x72 |0
+<U546B> \x6B\x83 |0
+<U546C> \x6B\x87 |0
+<U546F> \x6B\x8B |0
+<U5470> \x6D\x6B |0
+<U5471> \x50\x6D |0
+<U5472> \x6D\x6F |0
+<U5473> \x50\x60 |0
+<U5474> \x6B\x88 |0
+<U5475> \x50\x61 |0
+<U5476> \x50\x6E |0
+<U5477> \x50\x67 |0
+<U5478> \x50\x63 |0
+<U547A> \x6B\x84 |0
+<U547B> \x50\x66 |0
+<U547C> \x50\x6B |0
+<U547D> \x50\x74 |0
+<U547E> \x6B\x85 |0
+<U547F> \x6B\x7D |0
+<U5480> \x50\x65 |0
+<U5481> \x6B\x7E |0
+<U5482> \x6B\x81 |0
+<U5484> \x50\x68 |0
+<U5486> \x50\x6A |0
+<U5487> \x6B\x7C |0
+<U5488> \x6B\x82 |0
+<U548B> \x50\x73 |0
+<U548C> \x50\x6F |0
+<U548D> \x6B\x8A |0
+<U548E> \x50\x75 |0
+<U5490> \x50\x6C |0
+<U5491> \x6B\x7F |0
+<U5492> \x50\x69 |0
+<U5495> \x50\x64 |0
+<U5496> \x50\x62 |0
+<U5498> \x6B\x8E |0
+<U549A> \x50\x70 |0
+<U54A0> \x6D\x6A |0
+<U54A1> \x6D\x5E |0
+<U54A2> \x6D\x6D |0
+<U54A5> \x6D\x60 |0
+<U54A6> \x52\x5C |0
+<U54A7> \x52\x6A |0
+<U54A8> \x52\x58 |0
+<U54A9> \x52\x69 |0
+<U54AA> \x52\x61 |0
+<U54AB> \x52\x66 |0
+<U54AC> \x52\x56 |0
+<U54AD> \x6D\x5F |0
+<U54AE> \x6D\x65 |0
+<U54AF> \x52\x65 |0
+<U54B0> \x6D\x71 |0
+<U54B1> \x52\x67 |0
+<U54B3> \x52\x5D |0
+<U54B6> \x6D\x67 |0
+<U54B7> \x6D\x64 |0
+<U54B8> \x52\x5B |0
+<U54BA> \x6D\x5D |0
+<U54BB> \x52\x68 |0
+<U54BC> \x6D\x6C |0
+<U54BD> \x52\x60 |0
+<U54BE> \x6D\x6E |0
+<U54BF> \x52\x6B |0
+<U54C0> \x52\x57 |0
+<U54C1> \x52\x62 |0
+<U54C2> \x52\x5F |0
+<U54C3> \x6D\x62 |0
+<U54C4> \x52\x63 |0
+<U54C5> \x6D\x68 |0
+<U54C6> \x6D\x69 |0
+<U54C7> \x52\x5E |0
+<U54C8> \x52\x64 |0
+<U54C9> \x52\x5A |0
+<U54CE> \x52\x59 |0
+<U54CF> \x6D\x61 |0
+<U54D6> \x6D\x66 |0
+<U54DE> \x6D\x70 |0
+<U54E0> \x6F\xC6 |0
+<U54E1> \x54\x7F |0
+<U54E2> \x6F\xB4 |0
+<U54E4> \x6F\xB9 |0
+<U54E5> \x54\x78 |0
+<U54E6> \x54\x84 |0
+<U54E7> \x6F\xB7 |0
+<U54E8> \x54\x73 |0
+<U54E9> \x54\x7D |0
+<U54EA> \x54\x83 |0
+<U54EB> \x6F\xBE |0
+<U54ED> \x54\x7E |0
+<U54EE> \x54\x82 |0
+<U54F1> \x6F\xC1 |0
+<U54F2> \x54\x79 |0
+<U54F3> \x6F\xB8 |0
+<U54F7> \x6F\xC4 |0
+<U54F8> \x6F\xC5 |0
+<U54FA> \x54\x7B |0
+<U54FB> \x6F\xC3 |0
+<U54FC> \x54\x77 |0
+<U54FD> \x54\x87 |0
+<U54FF> \x6F\xBB |0
+<U5501> \x54\x75 |0
+<U5503> \x6F\xC8 |0
+<U5504> \x6F\xBC |0
+<U5505> \x6F\xC0 |0
+<U5506> \x54\x7A |0
+<U5507> \x54\x86 |0
+<U5508> \x6F\xBD |0
+<U5509> \x54\x81 |0
+<U550A> \x6F\xC2 |0
+<U550B> \x6F\xC9 |0
+<U550C> \x72\xA4 |0
+<U550E> \x6F\xC7 |0
+<U550F> \x54\x88 |0
+<U5510> \x54\x74 |0
+<U5511> \x6F\xBF |0
+<U5512> \x6F\xB6 |0
+<U5514> \x54\x7C |0
+<U5517> \x6F\xB5 |0
+<U551A> \x6F\xBA |0
+<U5526> \x6F\xB3 |0
+<U5527> \x54\x85 |0
+<U552A> \x72\x9C |0
+<U552C> \x56\xC8 |0
+<U552D> \x72\xAA |0
+<U552E> \x56\xC6 |0
+<U552F> \x56\xC3 |0
+<U5530> \x72\xA1 |0
+<U5531> \x56\xBF |0
+<U5532> \x72\xA5 |0
+<U5533> \x56\xCA |0
+<U5534> \x72\x9B |0
+<U5535> \x72\xA0 |0
+<U5536> \x72\x9F |0
+<U5537> \x54\x76 |0
+<U5538> \x56\xC5 |0
+<U5539> \x72\xA8 |0
+<U553B> \x72\xAB |0
+<U553C> \x72\x98 |0
+<U553E> \x59\x6E |0
+<U5540> \x72\xAC |0
+<U5541> \x56\xCB |0
+<U5543> \x56\xBD |0
+<U5544> \x56\xBA |0
+<U5545> \x72\xA3 |0
+<U5546> \x56\xB7 |0
+<U5548> \x72\xA9 |0
+<U554A> \x56\xBE |0
+<U554B> \x72\xAD |0
+<U554D> \x72\x99 |0
+<U554E> \x72\xA7 |0
+<U554F> \x56\xC1 |0
+<U5550> \x72\x9A |0
+<U5551> \x72\x9D |0
+<U5552> \x72\xA2 |0
+<U5555> \x56\xC2 |0
+<U5556> \x56\xC0 |0
+<U5557> \x56\xCC |0
+<U555C> \x56\xC7 |0
+<U555E> \x56\xBB |0
+<U555F> \x57\x97 |0
+<U5561> \x56\xBC |0
+<U5562> \x72\x9E |0
+<U5563> \x56\xC9 |0
+<U5564> \x56\xC4 |0
+<U5565> \x72\xA6 |0
+<U5566> \x56\xB9 |0
+<U556A> \x56\xB8 |0
+<U5575> \x72\x96 |0
+<U5576> \x72\x97 |0
+<U5577> \x75\xCF |0
+<U557B> \x59\x5D |0
+<U557C> \x59\x60 |0
+<U557D> \x75\xDA |0
+<U557E> \x59\x74 |0
+<U557F> \x75\xDD |0
+<U5580> \x59\x5E |0
+<U5581> \x75\xD6 |0
+<U5582> \x59\x64 |0
+<U5583> \x59\x6A |0
+<U5584> \x5A\xC2 |0
+<U5587> \x59\x68 |0
+<U5588> \x75\xD3 |0
+<U5589> \x59\x75 |0
+<U558A> \x59\x61 |0
+<U558B> \x59\x69 |0
+<U558C> \x75\xDB |0
+<U558D> \x79\x9E |0
+<U558E> \x75\xE0 |0
+<U558F> \x75\xD4 |0
+<U5591> \x75\xCB |0
+<U5592> \x75\xD8 |0
+<U5593> \x75\xD2 |0
+<U5594> \x59\x67 |0
+<U5595> \x75\xDE |0
+<U5598> \x59\x63 |0
+<U5599> \x59\x77 |0
+<U559A> \x59\x70 |0
+<U559C> \x59\x65 |0
+<U559D> \x59\x62 |0
+<U559F> \x59\x6D |0
+<U55A1> \x75\xDF |0
+<U55A2> \x75\xD1 |0
+<U55A3> \x75\xD7 |0
+<U55A4> \x75\xD9 |0
+<U55A5> \x75\xCD |0
+<U55A6> \x75\xDC |0
+<U55A7> \x59\x5F |0
+<U55A8> \x75\xCC |0
+<U55AA> \x59\x66 |0
+<U55AB> \x59\x76 |0
+<U55AC> \x59\x72 |0
+<U55AD> \x75\xCE |0
+<U55AE> \x59\x6C |0
+<U55B1> \x59\x73 |0
+<U55B2> \x59\x6F |0
+<U55B3> \x59\x6B |0
+<U55B5> \x75\xD5 |0
+<U55BB> \x59\x71 |0
+<U55BF> \x79\x9C |0
+<U55C0> \x79\x98 |0
+<U55C2> \x79\xA7 |0
+<U55C3> \x79\x91 |0
+<U55C4> \x79\x9A |0
+<U55C5> \x5B\xCB |0
+<U55C6> \x5B\xCC |0
+<U55C7> \x5B\xC4 |0
+<U55C8> \x79\xA3 |0
+<U55C9> \x5B\xCE |0
+<U55CA> \x79\x96 |0
+<U55CB> \x79\x95 |0
+<U55CC> \x79\x93 |0
+<U55CD> \x79\xA5 |0
+<U55CE> \x5B\xC2 |0
+<U55CF> \x79\x9F |0
+<U55D0> \x79\x94 |0
+<U55D1> \x5B\xC5 |0
+<U55D2> \x79\x9D |0
+<U55D3> \x5B\xC0 |0
+<U55D4> \x79\x99 |0
+<U55D5> \x79\xA0 |0
+<U55D6> \x79\xA2 |0
+<U55D9> \x79\xA6 |0
+<U55DA> \x5B\xC9 |0
+<U55DB> \x79\x92 |0
+<U55DC> \x5B\xC3 |0
+<U55DD> \x79\x97 |0
+<U55DF> \x5B\xBE |0
+<U55E1> \x5B\xCA |0
+<U55E2> \x79\xA1 |0
+<U55E3> \x5B\xC6 |0
+<U55E4> \x5B\xC7 |0
+<U55E5> \x5B\xCD |0
+<U55E6> \x5B\xC1 |0
+<U55E7> \x46\xF7 |0
+<U55E8> \x5B\xBF |0
+<U55E9> \x79\x9B |0
+<U55EF> \x5B\xC8 |0
+<U55F2> \x79\xA4 |0
+<U55F6> \x5E\x55 |0
+<U55F7> \x5E\x50 |0
+<U55F9> \x7D\x5E |0
+<U55FA> \x7D\x5A |0
+<U55FC> \x7D\x54 |0
+<U55FD> \x5E\x4A |0
+<U55FE> \x5E\x46 |0
+<U55FF> \x7D\x5D |0
+<U5600> \x5E\x47 |0
+<U5601> \x7D\x57 |0
+<U5602> \x7D\x59 |0
+<U5604> \x7D\x5C |0
+<U5606> \x5E\x4C |0
+<U5608> \x5E\x53 |0
+<U5609> \x5E\x4D |0
+<U560C> \x7D\x52 |0
+<U560D> \x5E\x4E |0
+<U560E> \x5E\x4F |0
+<U560F> \x7D\x55 |0
+<U5610> \x5E\x54 |0
+<U5612> \x7D\x53 |0
+<U5613> \x7D\x58 |0
+<U5614> \x5E\x4B |0
+<U5615> \x7D\x51 |0
+<U5616> \x5E\x51 |0
+<U5617> \x5E\x49 |0
+<U561B> \x5E\x48 |0
+<U561C> \x7D\x56 |0
+<U561D> \x7D\x5B |0
+<U561F> \x5E\x52 |0
+<U5627> \x7D\x50 |0
+<U5629> \x60\x56 |0
+<U562A> \x80\x91 |0
+<U562C> \x80\x8E |0
+<U562E> \x60\x50 |0
+<U562F> \x60\x5C |0
+<U5630> \x60\x5D |0
+<U5632> \x60\x53 |0
+<U5633> \x80\x8C |0
+<U5634> \x60\x55 |0
+<U5635> \x80\x84 |0
+<U5636> \x60\x5B |0
+<U5638> \x80\x90 |0
+<U5639> \x60\x52 |0
+<U563A> \x80\x92 |0
+<U563B> \x60\x51 |0
+<U563D> \x80\x8D |0
+<U563E> \x80\x8F |0
+<U563F> \x60\x54 |0
+<U5640> \x80\x8B |0
+<U5641> \x80\x85 |0
+<U5642> \x80\x82 |0
+<U5645> \x75\xD0 |0
+<U5646> \x80\x88 |0
+<U5648> \x80\x81 |0
+<U5649> \x80\x87 |0
+<U564A> \x80\x86 |0
+<U564C> \x80\x83 |0
+<U564E> \x60\x58 |0
+<U5653> \x60\x57 |0
+<U5657> \x60\x59 |0
+<U5658> \x80\x89 |0
+<U5659> \x62\x5B |0
+<U565A> \x80\x8A |0
+<U565E> \x83\xCF |0
+<U5660> \x83\xC8 |0
+<U5662> \x62\x67 |0
+<U5663> \x83\xCC |0
+<U5664> \x62\x5F |0
+<U5665> \x62\x63 |0
+<U5666> \x83\xCB |0
+<U5668> \x62\x62 |0
+<U5669> \x62\x5E |0
+<U566A> \x62\x61 |0
+<U566B> \x62\x5C |0
+<U566C> \x62\x66 |0
+<U566D> \x83\xCD |0
+<U566E> \x83\xC9 |0
+<U566F> \x62\x65 |0
+<U5670> \x83\xC7 |0
+<U5671> \x62\x64 |0
+<U5672> \x83\xCE |0
+<U5673> \x83\xCA |0
+<U5674> \x60\x5A |0
+<U5676> \x62\x68 |0
+<U5677> \x83\xD0 |0
+<U5678> \x62\x60 |0
+<U5679> \x62\x5D |0
+<U567E> \x86\xD1 |0
+<U567F> \x86\xD3 |0
+<U5680> \x63\xC5 |0
+<U5681> \x86\xD4 |0
+<U5682> \x86\xD2 |0
+<U5683> \x86\xD0 |0
+<U5684> \x86\xCF |0
+<U5685> \x63\xC7 |0
+<U5686> \x86\xCE |0
+<U5687> \x63\xC8 |0
+<U568C> \x86\xCC |0
+<U568D> \x86\xCD |0
+<U568E> \x63\xC4 |0
+<U568F> \x63\xC9 |0
+<U5690> \x63\xC6 |0
+<U5693> \x86\xCB |0
+<U5695> \x65\x5B |0
+<U5697> \x89\x69 |0
+<U5698> \x89\x67 |0
+<U5699> \x89\x6C |0
+<U569A> \x89\x6A |0
+<U569C> \x89\x68 |0
+<U569D> \x89\x6B |0
+<U56A5> \x66\x4C |0
+<U56A6> \x8B\x61 |0
+<U56A7> \x8B\x62 |0
+<U56A8> \x66\xE0 |0
+<U56AA> \x8B\x63 |0
+<U56AB> \x8B\x5F |0
+<U56AC> \x8B\x64 |0
+<U56AD> \x8B\x60 |0
+<U56AE> \x65\x5C |0
+<U56B2> \x8C\xEC |0
+<U56B3> \x8C\xEE |0
+<U56B4> \x66\xE3 |0
+<U56B5> \x8C\xED |0
+<U56B6> \x66\xE2 |0
+<U56B7> \x66\xE1 |0
+<U56BC> \x66\xE4 |0
+<U56BD> \x8E\x74 |0
+<U56BE> \x8E\x75 |0
+<U56C0> \x67\x86 |0
+<U56C1> \x67\x85 |0
+<U56C2> \x67\x87 |0
+<U56C3> \x8E\x73 |0
+<U56C5> \x8F\x68 |0
+<U56C6> \x8F\x67 |0
+<U56C8> \x67\xD8 |0
+<U56C9> \x67\xDA |0
+<U56CA> \x67\xD9 |0
+<U56CB> \x8F\x69 |0
+<U56CC> \x68\x54 |0
+<U56CD> \x90\xB5 |0
+<U56D1> \x68\x7D |0
+<U56D3> \x90\xB4 |0
+<U56D4> \x90\xFD |0
+<U56D7> \x48\x5F |3
+<U56D7> \x69\x4A |0
+<U56DA> \x4D\x5F |0
+<U56DB> \x4D\x5E |0
+<U56DD> \x4D\xDF |0
+<U56DE> \x4D\xDE |0
+<U56DF> \x69\xA7 |0
+<U56E0> \x4D\xDD |0
+<U56E1> \x69\xA6 |0
+<U56E4> \x4E\xDA |0
+<U56E5> \x6A\x69 |0
+<U56E7> \x6A\x68 |0
+<U56EA> \x4E\xD8 |0
+<U56EB> \x4E\xDB |0
+<U56EE> \x6A\x67 |0
+<U56F0> \x4E\xD9 |0
+<U56F7> \x6B\x92 |0
+<U56F9> \x6B\x93 |0
+<U56FA> \x50\x76 |0
+<U56FF> \x52\x6C |0
+<U5701> \x6F\xCA |0
+<U5702> \x6F\xCB |0
+<U5703> \x54\x89 |0
+<U5704> \x54\x8A |0
+<U5707> \x72\xAF |0
+<U5708> \x56\xCD |0
+<U5709> \x56\xCF |0
+<U570A> \x72\xAE |0
+<U570B> \x56\xCE |0
+<U570C> \x75\xE1 |0
+<U570D> \x59\x78 |0
+<U5712> \x5B\xCF |0
+<U5713> \x5B\xD0 |0
+<U5714> \x79\xA8 |0
+<U5716> \x5E\x57 |0
+<U5718> \x5E\x56 |0
+<U571A> \x80\x93 |0
+<U571B> \x83\xD2 |0
+<U571C> \x83\xD1 |0
+<U571E> \x91\x7C |0
+<U571F> \x48\x60 |3
+<U571F> \x4C\x68 |0
+<U5720> \x69\x5A |0
+<U5722> \x69\x6F |0
+<U5723> \x69\x70 |0
+<U5728> \x4D\xE2 |0
+<U5729> \x4D\xE6 |0
+<U572A> \x69\xA9 |0
+<U572C> \x4D\xE4 |0
+<U572D> \x4D\xE3 |0
+<U572E> \x69\xA8 |0
+<U572F> \x4D\xE5 |0
+<U5730> \x4D\xE1 |0
+<U5733> \x4D\xE0 |0
+<U5734> \x69\xAA |0
+<U573B> \x4E\xE5 |0
+<U573E> \x4E\xE2 |0
+<U5740> \x4E\xDE |0
+<U5741> \x6A\x6A |0
+<U5745> \x6A\x6B |0
+<U5747> \x4E\xE0 |0
+<U5749> \x6A\x6D |0
+<U574A> \x4E\xDC |0
+<U574B> \x6A\x6E |0
+<U574C> \x6A\x6C |0
+<U574D> \x4E\xDF |0
+<U574E> \x4E\xE1 |0
+<U574F> \x4E\xE4 |0
+<U5750> \x4E\xE3 |0
+<U5751> \x4E\xDD |0
+<U5752> \x6A\x6F |0
+<U5761> \x50\x7B |0
+<U5762> \x6B\xA0 |0
+<U5764> \x50\x7D |0
+<U5766> \x50\x7C |0
+<U5768> \x6B\xA1 |0
+<U5769> \x50\x7A |0
+<U576A> \x50\x79 |0
+<U576B> \x6B\x97 |0
+<U576D> \x6B\x96 |0
+<U576F> \x6B\x94 |0
+<U5770> \x6B\x99 |0
+<U5771> \x6B\x98 |0
+<U5772> \x6B\x95 |0
+<U5773> \x6B\x9E |0
+<U5774> \x6B\x9F |0
+<U5775> \x6B\x9C |0
+<U5776> \x6B\x9A |0
+<U5777> \x50\x78 |0
+<U577B> \x6B\x9D |0
+<U577C> \x50\x7E |0
+<U577D> \x6B\xA2 |0
+<U5780> \x6B\x9B |0
+<U5782> \x52\x6D |0
+<U5783> \x50\x77 |0
+<U578B> \x52\x6E |0
+<U578C> \x6D\x76 |0
+<U578F> \x6D\x7C |0
+<U5793> \x52\x74 |0
+<U5794> \x6D\x7A |0
+<U5795> \x6D\x81 |0
+<U5797> \x6D\x77 |0
+<U5798> \x6D\x7B |0
+<U5799> \x6D\x7D |0
+<U579A> \x6D\x7F |0
+<U579B> \x6D\x79 |0
+<U579D> \x6D\x78 |0
+<U579E> \x6D\x73 |0
+<U579F> \x6D\x74 |0
+<U57A0> \x52\x6F |0
+<U57A2> \x52\x71 |0
+<U57A3> \x52\x70 |0
+<U57A4> \x6D\x75 |0
+<U57A5> \x6D\x7E |0
+<U57AE> \x52\x73 |0
+<U57B5> \x6D\x72 |0
+<U57B6> \x6F\xD5 |0
+<U57B8> \x6F\xD4 |0
+<U57B9> \x6F\xD9 |0
+<U57BA> \x6F\xD0 |0
+<U57BC> \x6F\xD3 |0
+<U57BD> \x6F\xD2 |0
+<U57BF> \x6F\xD6 |0
+<U57C1> \x6F\xDA |0
+<U57C2> \x54\x8B |0
+<U57C3> \x54\x8E |0
+<U57C6> \x6F\xD1 |0
+<U57C7> \x6F\xD7 |0
+<U57CB> \x54\x8D |0
+<U57CC> \x6F\xCC |0
+<U57CE> \x52\x72 |0
+<U57CF> \x72\xBD |0
+<U57D0> \x6F\xD8 |0
+<U57D2> \x6F\xCF |0
+<U57D4> \x54\x8C |0
+<U57D5> \x6F\xCE |0
+<U57DC> \x72\xB4 |0
+<U57DF> \x56\xD0 |0
+<U57E0> \x56\xD4 |0
+<U57E1> \x72\xC4 |0
+<U57E2> \x72\xB2 |0
+<U57E3> \x72\xC0 |0
+<U57E4> \x56\xD5 |0
+<U57E5> \x72\xC2 |0
+<U57E7> \x72\xC8 |0
+<U57E9> \x72\xCC |0
+<U57EC> \x72\xC3 |0
+<U57ED> \x72\xB7 |0
+<U57EE> \x72\xBF |0
+<U57F0> \x72\xCD |0
+<U57F1> \x72\xCB |0
+<U57F2> \x72\xC1 |0
+<U57F3> \x72\xBC |0
+<U57F4> \x72\xB5 |0
+<U57F5> \x75\xE9 |0
+<U57F6> \x72\xB3 |0
+<U57F7> \x56\xD9 |0
+<U57F8> \x72\xBA |0
+<U57F9> \x56\xDA |0
+<U57FA> \x56\xD6 |0
+<U57FB> \x72\xB0 |0
+<U57FC> \x72\xC6 |0
+<U57FD> \x72\xB8 |0
+<U5800> \x72\xB6 |0
+<U5801> \x72\xC9 |0
+<U5802> \x56\xD7 |0
+<U5804> \x72\xCF |0
+<U5805> \x56\xD1 |0
+<U5806> \x56\xD3 |0
+<U5807> \x72\xBE |0
+<U5808> \x72\xB9 |0
+<U5809> \x54\x8F |0
+<U580A> \x56\xD2 |0
+<U580B> \x72\xBB |0
+<U580C> \x72\xCA |0
+<U580D> \x72\xCE |0
+<U580E> \x72\xC5 |0
+<U5810> \x72\xC7 |0
+<U5814> \x72\xB1 |0
+<U5819> \x75\xE4 |0
+<U581B> \x75\xED |0
+<U581C> \x75\xEC |0
+<U581D> \x59\x81 |0
+<U581E> \x75\xE5 |0
+<U5820> \x59\x82 |0
+<U5821> \x59\x7F |0
+<U5823> \x75\xE7 |0
+<U5824> \x59\x7C |0
+<U5825> \x75\xEB |0
+<U5827> \x75\xE6 |0
+<U5828> \x75\xE8 |0
+<U5829> \x75\xE2 |0
+<U582A> \x59\x7A |0
+<U582C> \x75\xF5 |0
+<U582D> \x75\xF4 |0
+<U582E> \x75\xF1 |0
+<U582F> \x59\x79 |0
+<U5830> \x59\x7D |0
+<U5831> \x59\x7E |0
+<U5832> \x6F\xCD |0
+<U5833> \x75\xEE |0
+<U5834> \x59\x7B |0
+<U5835> \x56\xD8 |0
+<U5836> \x75\xF0 |0
+<U5837> \x75\xE3 |0
+<U5838> \x75\xF3 |0
+<U5839> \x75\xF2 |0
+<U583B> \x75\xF6 |0
+<U583D> \x79\xB6 |0
+<U583F> \x75\xEF |0
+<U5848> \x75\xEA |0
+<U5849> \x79\xAE |0
+<U584A> \x5B\xDA |0
+<U584B> \x5B\xDD |0
+<U584C> \x5B\xD8 |0
+<U584D> \x79\xAD |0
+<U584E> \x79\xB1 |0
+<U584F> \x79\xAC |0
+<U5851> \x5B\xD2 |0
+<U5852> \x5B\xDC |0
+<U5853> \x79\xA9 |0
+<U5854> \x5B\xD6 |0
+<U5855> \x79\xB0 |0
+<U5857> \x5B\xD4 |0
+<U5858> \x5B\xD3 |0
+<U5859> \x79\xB3 |0
+<U585A> \x5B\xD5 |0
+<U585B> \x79\xB5 |0
+<U585D> \x79\xB2 |0
+<U585E> \x5B\xD1 |0
+<U5862> \x5B\xDB |0
+<U5863> \x79\xB7 |0
+<U5864> \x79\xAB |0
+<U5865> \x79\xB4 |0
+<U5868> \x79\xAA |0
+<U586B> \x5B\xD7 |0
+<U586D> \x5B\xD9 |0
+<U586F> \x79\xAF |0
+<U5871> \x79\xB8 |0
+<U5874> \x7D\x66 |0
+<U5875> \x5E\x58 |0
+<U5876> \x7D\x6C |0
+<U5879> \x5E\x5D |0
+<U587A> \x7D\x68 |0
+<U587B> \x7D\x6F |0
+<U587C> \x7D\x60 |0
+<U587D> \x5E\x5F |0
+<U587E> \x5E\x59 |0
+<U587F> \x7D\x65 |0
+<U5880> \x60\x5E |0
+<U5881> \x7D\x64 |0
+<U5882> \x7D\x6D |0
+<U5883> \x5E\x5A |0
+<U5885> \x5E\x5E |0
+<U5886> \x7D\x63 |0
+<U5887> \x7D\x69 |0
+<U5888> \x7D\x6E |0
+<U5889> \x7D\x5F |0
+<U588A> \x5E\x5C |0
+<U588B> \x7D\x67 |0
+<U588E> \x7D\x6B |0
+<U588F> \x7D\x71 |0
+<U5890> \x7D\x61 |0
+<U5891> \x7D\x6A |0
+<U5893> \x5E\x5B |0
+<U5894> \x7D\x70 |0
+<U5898> \x7D\x62 |0
+<U589C> \x60\x62 |0
+<U589D> \x80\x95 |0
+<U589E> \x60\x60 |0
+<U589F> \x60\x5F |0
+<U58A0> \x80\x97 |0
+<U58A1> \x80\x9C |0
+<U58A3> \x80\x98 |0
+<U58A5> \x80\x9B |0
+<U58A6> \x60\x65 |0
+<U58A8> \x62\x4E |0
+<U58A9> \x60\x64 |0
+<U58AB> \x80\x94 |0
+<U58AC> \x80\x9A |0
+<U58AE> \x60\x63 |0
+<U58AF> \x80\x99 |0
+<U58B1> \x80\x96 |0
+<U58B3> \x60\x61 |0
+<U58BA> \x83\xD7 |0
+<U58BC> \x83\xD9 |0
+<U58BD> \x83\xD4 |0
+<U58BE> \x62\x6A |0
+<U58BF> \x83\xD6 |0
+<U58C1> \x62\x69 |0
+<U58C2> \x83\xD8 |0
+<U58C5> \x62\x6C |0
+<U58C6> \x83\xDA |0
+<U58C7> \x62\x6B |0
+<U58C8> \x83\xD3 |0
+<U58C9> \x83\xD5 |0
+<U58CE> \x63\xCD |0
+<U58CF> \x86\xD7 |0
+<U58D1> \x63\xCC |0
+<U58D2> \x86\xD8 |0
+<U58D3> \x63\xCB |0
+<U58D4> \x86\xD6 |0
+<U58D5> \x63\xCA |0
+<U58D6> \x86\xD5 |0
+<U58D8> \x65\x5E |0
+<U58D9> \x65\x5D |0
+<U58DA> \x8B\x65 |0
+<U58DB> \x8B\x67 |0
+<U58DD> \x8B\x66 |0
+<U58DE> \x66\x4D |0
+<U58DF> \x66\x4E |0
+<U58E2> \x66\x4F |0
+<U58E3> \x8C\xEF |0
+<U58E4> \x66\xE5 |0
+<U58E7> \x90\x44 |0
+<U58E8> \x90\x43 |0
+<U58E9> \x68\x7E |0
+<U58EB> \x48\x61 |3
+<U58EB> \x4C\x69 |0
+<U58EC> \x4C\xB0 |0
+<U58EF> \x4E\xE6 |0
+<U58F4> \x6D\x82 |0
+<U58F9> \x59\x83 |0
+<U58FA> \x59\x84 |0
+<U58FC> \x79\xB9 |0
+<U58FD> \x5E\x60 |0
+<U58FE> \x7D\x72 |0
+<U58FF> \x80\x9D |0
+<U5903> \x69\x5B |0
+<U5906> \x6A\x70 |0
+<U590A> \x48\x62 |0
+<U590C> \x6B\xA3 |0
+<U590D> \x6D\x83 |0
+<U590E> \x6F\xDB |0
+<U590F> \x54\x90 |0
+<U5912> \x8B\x68 |0
+<U5914> \x67\x88 |0
+<U5915> \x48\x63 |3
+<U5915> \x4C\x6A |0
+<U5916> \x4D\x60 |0
+<U5917> \x69\x71 |0
+<U5919> \x4D\xE7 |0
+<U591A> \x4D\xE8 |0
+<U591C> \x50\x7F |0
+<U5920> \x56\xDB |0
+<U5922> \x5E\x62 |0
+<U5924> \x5E\x63 |0
+<U5925> \x5E\x61 |0
+<U5927> \x48\x64 |3
+<U5927> \x4C\x6B |0
+<U5929> \x4C\xB1 |0
+<U592A> \x4C\xB3 |0
+<U592B> \x4C\xB2 |0
+<U592C> \x69\x5C |0
+<U592D> \x4C\xB4 |0
+<U592E> \x4D\x61 |0
+<U592F> \x69\x72 |0
+<U5931> \x4D\x62 |0
+<U5937> \x4D\xE9 |0
+<U5938> \x4D\xEA |0
+<U593C> \x69\xAB |0
+<U593E> \x4E\xE7 |0
+<U5940> \x6A\x71 |0
+<U5944> \x50\x84 |0
+<U5945> \x6B\xA4 |0
+<U5947> \x50\x82 |0
+<U5948> \x50\x83 |0
+<U5949> \x50\x81 |0
+<U594A> \x6F\xDC |0
+<U594E> \x52\x78 |0
+<U594F> \x52\x77 |0
+<U5950> \x52\x79 |0
+<U5951> \x52\x76 |0
+<U5953> \x6D\x84 |0
+<U5954> \x50\x85 |0
+<U5955> \x52\x75 |0
+<U5957> \x54\x91 |0
+<U5958> \x54\x92 |0
+<U595A> \x54\x93 |0
+<U595C> \x72\xD0 |0
+<U5960> \x59\x85 |0
+<U5961> \x75\xF7 |0
+<U5962> \x56\xDC |0
+<U5967> \x5B\xDE |0
+<U5969> \x5E\x65 |0
+<U596A> \x5E\x64 |0
+<U596B> \x7D\x73 |0
+<U596D> \x60\x66 |0
+<U596E> \x62\x6D |0
+<U5970> \x89\x6D |0
+<U5971> \x8F\x6A |0
+<U5972> \x90\x45 |0
+<U5973> \x48\x65 |3
+<U5973> \x4C\x6C |0
+<U5974> \x4D\x63 |0
+<U5976> \x4D\x64 |0
+<U5977> \x69\xB1 |0
+<U5978> \x4D\xEC |0
+<U5979> \x4D\xEF |0
+<U597B> \x69\xAF |0
+<U597C> \x69\xAD |0
+<U597D> \x4D\xEE |0
+<U597E> \x69\xB0 |0
+<U597F> \x69\xB2 |0
+<U5980> \x69\xAC |0
+<U5981> \x4D\xF1 |0
+<U5982> \x4D\xF0 |0
+<U5983> \x4D\xED |0
+<U5984> \x4D\xEB |0
+<U5985> \x69\xAE |0
+<U598A> \x4E\xF2 |0
+<U598D> \x4E\xEF |0
+<U598E> \x6A\x76 |0
+<U598F> \x6A\x79 |0
+<U5990> \x6A\x78 |0
+<U5992> \x4E\xE9 |0
+<U5993> \x4E\xF1 |0
+<U5996> \x4E\xEE |0
+<U5997> \x6A\x75 |0
+<U5998> \x6A\x73 |0
+<U5999> \x4E\xED |0
+<U599D> \x4E\xE8 |0
+<U599E> \x4E\xEB |0
+<U59A0> \x6A\x74 |0
+<U59A1> \x6A\x7B |0
+<U59A2> \x6A\x77 |0
+<U59A3> \x4E\xEC |0
+<U59A4> \x4E\xF0 |0
+<U59A5> \x4E\xF3 |0
+<U59A6> \x6A\x72 |0
+<U59A7> \x6A\x7A |0
+<U59A8> \x4E\xEA |0
+<U59AE> \x50\x8A |0
+<U59AF> \x50\x92 |0
+<U59B1> \x6B\xB0 |0
+<U59B2> \x6B\xA9 |0
+<U59B3> \x50\x93 |0
+<U59B4> \x6B\xB4 |0
+<U59B5> \x6B\xA5 |0
+<U59B6> \x6B\xAC |0
+<U59B9> \x50\x89 |0
+<U59BA> \x6B\xA6 |0
+<U59BB> \x50\x87 |0
+<U59BC> \x6B\xAD |0
+<U59BD> \x6B\xB1 |0
+<U59BE> \x50\x86 |0
+<U59C0> \x6B\xB2 |0
+<U59C1> \x6B\xAB |0
+<U59C3> \x6B\xAE |0
+<U59C5> \x50\x95 |0
+<U59C6> \x50\x8C |0
+<U59C7> \x6B\xB5 |0
+<U59C8> \x6B\xB3 |0
+<U59CA> \x50\x91 |0
+<U59CB> \x50\x8F |0
+<U59CC> \x6B\xAA |0
+<U59CD> \x50\x8E |0
+<U59CE> \x6B\xA8 |0
+<U59CF> \x6B\xA7 |0
+<U59D0> \x50\x8D |0
+<U59D1> \x50\x8B |0
+<U59D2> \x50\x94 |0
+<U59D3> \x50\x90 |0
+<U59D4> \x50\x88 |0
+<U59D6> \x6B\xAF |0
+<U59D8> \x52\x7B |0
+<U59DA> \x52\x83 |0
+<U59DB> \x6D\x92 |0
+<U59DC> \x52\x7A |0
+<U59DD> \x6D\x8A |0
+<U59DE> \x6D\x86 |0
+<U59E0> \x6D\x96 |0
+<U59E1> \x6D\x85 |0
+<U59E3> \x52\x7D |0
+<U59E4> \x6D\x8F |0
+<U59E5> \x52\x81 |0
+<U59E6> \x52\x84 |0
+<U59E8> \x52\x7E |0
+<U59E9> \x6D\x93 |0
+<U59EA> \x52\x82 |0
+<U59EC> \x54\x9A |0
+<U59ED> \x6D\x99 |0
+<U59EE> \x6D\x87 |0
+<U59F1> \x6D\x89 |0
+<U59F2> \x6D\x90 |0
+<U59F3> \x6D\x94 |0
+<U59F4> \x6D\x98 |0
+<U59F5> \x6D\x95 |0
+<U59F6> \x6D\x8E |0
+<U59F7> \x6D\x91 |0
+<U59FA> \x6D\x8B |0
+<U59FB> \x52\x86 |0
+<U59FC> \x6D\x8D |0
+<U59FD> \x6D\x8C |0
+<U59FE> \x6D\x97 |0
+<U59FF> \x52\x7C |0
+<U5A00> \x6D\x88 |0
+<U5A01> \x52\x85 |0
+<U5A03> \x52\x7F |0
+<U5A09> \x54\xA0 |0
+<U5A0A> \x6F\xE4 |0
+<U5A0C> \x54\x9F |0
+<U5A0F> \x6F\xE2 |0
+<U5A11> \x54\x94 |0
+<U5A13> \x54\x99 |0
+<U5A15> \x6F\xE1 |0
+<U5A16> \x6F\xDE |0
+<U5A17> \x6F\xE3 |0
+<U5A18> \x54\x95 |0
+<U5A19> \x6F\xDD |0
+<U5A1B> \x54\x98 |0
+<U5A1C> \x54\x96 |0
+<U5A1E> \x6F\xE5 |0
+<U5A1F> \x54\x97 |0
+<U5A20> \x54\x9B |0
+<U5A23> \x54\x9C |0
+<U5A25> \x54\x9E |0
+<U5A29> \x54\x9D |0
+<U5A2D> \x6F\xDF |0
+<U5A2E> \x6F\xE0 |0
+<U5A33> \x6F\xE6 |0
+<U5A35> \x72\xD7 |0
+<U5A36> \x56\xDD |0
+<U5A37> \x76\x48 |0
+<U5A38> \x72\xD6 |0
+<U5A39> \x72\xE9 |0
+<U5A3C> \x56\xE3 |0
+<U5A3E> \x72\xE7 |0
+<U5A40> \x56\xE2 |0
+<U5A41> \x56\xDE |0
+<U5A42> \x72\xF0 |0
+<U5A43> \x72\xE0 |0
+<U5A44> \x72\xE3 |0
+<U5A46> \x56\xE6 |0
+<U5A47> \x72\xED |0
+<U5A48> \x72\xE5 |0
+<U5A49> \x56\xDF |0
+<U5A4A> \x56\xE7 |0
+<U5A4C> \x72\xEA |0
+<U5A4D> \x72\xE8 |0
+<U5A50> \x72\xD9 |0
+<U5A51> \x72\xEE |0
+<U5A52> \x72\xE2 |0
+<U5A53> \x72\xDD |0
+<U5A55> \x72\xD3 |0
+<U5A56> \x72\xEF |0
+<U5A57> \x72\xDF |0
+<U5A58> \x72\xD2 |0
+<U5A5A> \x56\xE5 |0
+<U5A5B> \x72\xE4 |0
+<U5A5C> \x72\xF1 |0
+<U5A5D> \x72\xE1 |0
+<U5A5E> \x72\xD5 |0
+<U5A5F> \x72\xDA |0
+<U5A60> \x72\xD1 |0
+<U5A62> \x56\xE4 |0
+<U5A64> \x72\xDE |0
+<U5A65> \x72\xDB |0
+<U5A66> \x56\xE0 |0
+<U5A67> \x72\xD4 |0
+<U5A69> \x72\xEC |0
+<U5A6A> \x56\xE1 |0
+<U5A6C> \x72\xDC |0
+<U5A6D> \x72\xD8 |0
+<U5A70> \x72\xEB |0
+<U5A77> \x59\x86 |0
+<U5A78> \x76\x41 |0
+<U5A7A> \x75\xFB |0
+<U5A7B> \x76\x4F |0
+<U5A7C> \x76\x43 |0
+<U5A7D> \x76\x50 |0
+<U5A7F> \x59\x88 |0
+<U5A83> \x76\x4C |0
+<U5A84> \x76\x49 |0
+<U5A8A> \x76\x4A |0
+<U5A8B> \x76\x4D |0
+<U5A8C> \x76\x51 |0
+<U5A8E> \x72\xE6 |0
+<U5A8F> \x76\x53 |0
+<U5A90> \x79\xCD |0
+<U5A92> \x59\x89 |0
+<U5A93> \x76\x54 |0
+<U5A94> \x75\xF9 |0
+<U5A95> \x76\x46 |0
+<U5A97> \x76\x4B |0
+<U5A9A> \x59\x87 |0
+<U5A9B> \x59\x8A |0
+<U5A9C> \x76\x52 |0
+<U5A9D> \x76\x55 |0
+<U5A9E> \x75\xFD |0
+<U5A9F> \x75\xFA |0
+<U5AA2> \x75\xFC |0
+<U5AA5> \x76\x44 |0
+<U5AA6> \x76\x42 |0
+<U5AA7> \x59\x8B |0
+<U5AA9> \x76\x4E |0
+<U5AAC> \x76\x45 |0
+<U5AAE> \x76\x47 |0
+<U5AAF> \x75\xF8 |0
+<U5AB0> \x79\xC1 |0
+<U5AB1> \x79\xBF |0
+<U5AB2> \x5B\xE7 |0
+<U5AB3> \x5B\xE5 |0
+<U5AB4> \x79\xC9 |0
+<U5AB5> \x79\xC0 |0
+<U5AB6> \x79\xCA |0
+<U5AB7> \x79\xC6 |0
+<U5AB8> \x79\xBE |0
+<U5AB9> \x79\xCC |0
+<U5ABA> \x79\xBD |0
+<U5ABB> \x79\xC4 |0
+<U5ABC> \x5B\xE4 |0
+<U5ABD> \x5B\xE3 |0
+<U5ABE> \x5B\xE2 |0
+<U5ABF> \x79\xC2 |0
+<U5AC0> \x79\xC7 |0
+<U5AC1> \x5B\xDF |0
+<U5AC2> \x5B\xE6 |0
+<U5AC4> \x79\xBB |0
+<U5AC6> \x79\xC5 |0
+<U5AC7> \x79\xBA |0
+<U5AC8> \x79\xC3 |0
+<U5AC9> \x5B\xE0 |0
+<U5ACA> \x79\xC8 |0
+<U5ACB> \x79\xBC |0
+<U5ACC> \x5B\xE1 |0
+<U5ACD> \x79\xCB |0
+<U5AD5> \x7D\x77 |0
+<U5AD6> \x5E\x6A |0
+<U5AD7> \x5E\x69 |0
+<U5AD8> \x5E\x6B |0
+<U5AD9> \x7D\x84 |0
+<U5ADA> \x7D\x79 |0
+<U5ADB> \x7D\x7F |0
+<U5ADC> \x7D\x74 |0
+<U5ADD> \x7D\x83 |0
+<U5ADE> \x7D\x82 |0
+<U5ADF> \x7D\x86 |0
+<U5AE0> \x7D\x7E |0
+<U5AE1> \x5E\x66 |0
+<U5AE2> \x7D\x7D |0
+<U5AE3> \x5E\x6C |0
+<U5AE5> \x7D\x76 |0
+<U5AE6> \x5E\x67 |0
+<U5AE8> \x7D\x85 |0
+<U5AE9> \x5E\x68 |0
+<U5AEA> \x7D\x78 |0
+<U5AEB> \x7D\x7B |0
+<U5AEC> \x7D\x81 |0
+<U5AED> \x7D\x7A |0
+<U5AEE> \x7D\x75 |0
+<U5AF3> \x7D\x7C |0
+<U5AF4> \x80\x9F |0
+<U5AF5> \x60\x6A |0
+<U5AF6> \x80\xA2 |0
+<U5AF7> \x80\xA1 |0
+<U5AF8> \x80\xA4 |0
+<U5AF9> \x80\xA6 |0
+<U5AFB> \x60\x68 |0
+<U5AFD> \x80\xA0 |0
+<U5AFF> \x80\x9E |0
+<U5B01> \x80\xA7 |0
+<U5B02> \x80\xA5 |0
+<U5B03> \x80\xA3 |0
+<U5B05> \x80\xA9 |0
+<U5B07> \x80\xA8 |0
+<U5B08> \x60\x6C |0
+<U5B09> \x60\x67 |0
+<U5B0B> \x60\x69 |0
+<U5B0C> \x60\x6B |0
+<U5B0F> \x80\xAA |0
+<U5B10> \x83\xE1 |0
+<U5B13> \x83\xE0 |0
+<U5B14> \x83\xDF |0
+<U5B16> \x83\xE2 |0
+<U5B17> \x83\xDB |0
+<U5B19> \x83\xDC |0
+<U5B1A> \x83\xE4 |0
+<U5B1B> \x83\xDD |0
+<U5B1D> \x62\x6E |0
+<U5B1E> \x83\xE6 |0
+<U5B20> \x83\xE5 |0
+<U5B21> \x83\xDE |0
+<U5B23> \x86\xDC |0
+<U5B24> \x63\xD0 |0
+<U5B25> \x86\xDA |0
+<U5B26> \x86\xDF |0
+<U5B27> \x86\xDE |0
+<U5B28> \x83\xE3 |0
+<U5B2A> \x63\xCF |0
+<U5B2C> \x86\xDD |0
+<U5B2D> \x86\xD9 |0
+<U5B2E> \x86\xE1 |0
+<U5B2F> \x86\xE0 |0
+<U5B30> \x63\xCE |0
+<U5B32> \x86\xDB |0
+<U5B34> \x62\x6F |0
+<U5B38> \x65\x5F |0
+<U5B3C> \x89\x6E |0
+<U5B3D> \x8B\x69 |0
+<U5B3E> \x8B\x6A |0
+<U5B3F> \x8B\x6B |0
+<U5B40> \x66\xE6 |0
+<U5B43> \x66\xE7 |0
+<U5B45> \x8C\xF0 |0
+<U5B47> \x8E\x77 |0
+<U5B48> \x8E\x76 |0
+<U5B4B> \x8F\x6B |0
+<U5B4C> \x8F\x6C |0
+<U5B4D> \x90\x46 |0
+<U5B4E> \x90\xB6 |0
+<U5B50> \x48\x66 |3
+<U5B50> \x4C\x6D |0
+<U5B51> \x4C\x6E |0
+<U5B53> \x4C\x6F |0
+<U5B54> \x4C\xB5 |0
+<U5B55> \x4D\x65 |0
+<U5B56> \x69\xB3 |0
+<U5B57> \x4D\xF2 |0
+<U5B58> \x4D\xF3 |0
+<U5B5A> \x4E\xF6 |0
+<U5B5B> \x4E\xF7 |0
+<U5B5C> \x4E\xF5 |0
+<U5B5D> \x4E\xF4 |0
+<U5B5F> \x50\x96 |0
+<U5B62> \x6B\xB6 |0
+<U5B63> \x50\x98 |0
+<U5B64> \x50\x97 |0
+<U5B65> \x6B\xB7 |0
+<U5B69> \x52\x87 |0
+<U5B6B> \x54\xA1 |0
+<U5B6C> \x6F\xE7 |0
+<U5B6E> \x72\xF3 |0
+<U5B70> \x56\xE8 |0
+<U5B71> \x59\x8D |0
+<U5B72> \x72\xF2 |0
+<U5B73> \x59\x8C |0
+<U5B75> \x5E\x6D |0
+<U5B77> \x7D\x87 |0
+<U5B78> \x62\x70 |0
+<U5B7A> \x63\xD1 |0
+<U5B7B> \x86\xE2 |0
+<U5B7D> \x66\xE8 |0
+<U5B7F> \x67\xDB |0
+<U5B80> \x48\x67 |0
+<U5B81> \x69\x73 |0
+<U5B83> \x4D\x66 |0
+<U5B84> \x69\x74 |0
+<U5B85> \x4D\xF6 |0
+<U5B87> \x4D\xF4 |0
+<U5B88> \x4D\xF5 |0
+<U5B89> \x4D\xF7 |0
+<U5B8B> \x4E\xF9 |0
+<U5B8C> \x4E\xF8 |0
+<U5B8E> \x6A\x7C |0
+<U5B8F> \x4E\xFA |0
+<U5B92> \x6A\x7D |0
+<U5B93> \x6B\xB8 |0
+<U5B95> \x6B\xB9 |0
+<U5B97> \x50\x99 |0
+<U5B98> \x50\x9B |0
+<U5B99> \x50\x9D |0
+<U5B9A> \x50\x9A |0
+<U5B9B> \x50\x9E |0
+<U5B9C> \x50\x9C |0
+<U5BA2> \x52\x8B |0
+<U5BA3> \x52\x88 |0
+<U5BA4> \x52\x8A |0
+<U5BA5> \x52\x8C |0
+<U5BA6> \x52\x89 |0
+<U5BA7> \x6F\xE8 |0
+<U5BA8> \x6D\x9A |0
+<U5BAC> \x6F\xEA |0
+<U5BAD> \x6F\xE9 |0
+<U5BAE> \x54\xA7 |0
+<U5BB0> \x54\xA3 |0
+<U5BB3> \x54\xA4 |0
+<U5BB4> \x54\xA6 |0
+<U5BB5> \x54\xA8 |0
+<U5BB6> \x54\xA5 |0
+<U5BB8> \x54\xAA |0
+<U5BB9> \x54\xA9 |0
+<U5BBF> \x56\xED |0
+<U5BC0> \x72\xF5 |0
+<U5BC1> \x72\xF4 |0
+<U5BC2> \x56\xEC |0
+<U5BC4> \x56\xEB |0
+<U5BC5> \x56\xEA |0
+<U5BC6> \x56\xEE |0
+<U5BC7> \x56\xE9 |0
+<U5BCA> \x76\x5B |0
+<U5BCB> \x76\x58 |0
+<U5BCC> \x59\x8F |0
+<U5BCD> \x76\x57 |0
+<U5BCE> \x76\x5C |0
+<U5BD0> \x59\x91 |0
+<U5BD1> \x76\x5A |0
+<U5BD2> \x59\x8E |0
+<U5BD3> \x59\x90 |0
+<U5BD4> \x76\x59 |0
+<U5BD6> \x79\xCE |0
+<U5BD8> \x79\xCF |0
+<U5BD9> \x79\xD0 |0
+<U5BDE> \x5E\x6E |0
+<U5BDF> \x5E\x76 |0
+<U5BE0> \x7D\x88 |0
+<U5BE1> \x5E\x70 |0
+<U5BE2> \x5E\x74 |0
+<U5BE3> \x7D\x89 |0
+<U5BE4> \x5E\x75 |0
+<U5BE5> \x5E\x71 |0
+<U5BE6> \x5E\x72 |0
+<U5BE7> \x5E\x6F |0
+<U5BE8> \x5E\x73 |0
+<U5BE9> \x60\x6F |0
+<U5BEA> \x76\x56 |0
+<U5BEB> \x60\x70 |0
+<U5BEC> \x60\x6E |0
+<U5BEE> \x60\x6D |0
+<U5BEF> \x83\xE7 |0
+<U5BF0> \x62\x71 |0
+<U5BF1> \x86\xE3 |0
+<U5BF2> \x86\xE4 |0
+<U5BF5> \x66\x50 |0
+<U5BF6> \x66\xE9 |0
+<U5BF8> \x48\x68 |3
+<U5BF8> \x4C\x70 |0
+<U5BFA> \x4D\xF8 |0
+<U5C01> \x52\x8D |0
+<U5C03> \x6F\xEB |0
+<U5C04> \x54\xAB |0
+<U5C07> \x56\xF1 |0
+<U5C08> \x56\xF0 |0
+<U5C09> \x56\xEF |0
+<U5C0A> \x59\x92 |0
+<U5C0B> \x59\x93 |0
+<U5C0C> \x76\x5D |0
+<U5C0D> \x5E\x77 |0
+<U5C0E> \x62\x72 |0
+<U5C0F> \x48\x69 |3
+<U5C0F> \x4C\x71 |0
+<U5C10> \x69\x5D |0
+<U5C11> \x4C\xB6 |0
+<U5C12> \x69\x75 |0
+<U5C15> \x69\xB4 |0
+<U5C16> \x4D\xF9 |0
+<U5C1A> \x50\x9F |0
+<U5C1F> \x79\xD1 |0
+<U5C22> \x48\x6A |3
+<U5C22> \x4C\x72 |0
+<U5C24> \x4C\xB7 |0
+<U5C25> \x69\xB5 |0
+<U5C28> \x6A\x7E |0
+<U5C2A> \x6A\x7F |0
+<U5C2C> \x4E\xFB |0
+<U5C30> \x76\x5E |0
+<U5C31> \x59\x94 |0
+<U5C33> \x79\xD2 |0
+<U5C37> \x63\xD2 |0
+<U5C38> \x48\x6B |3
+<U5C38> \x4C\x73 |0
+<U5C39> \x4C\x88 |0
+<U5C3A> \x4C\xB8 |0
+<U5C3B> \x69\x76 |0
+<U5C3C> \x4D\x67 |0
+<U5C3E> \x4F\x42 |0
+<U5C3F> \x4F\x41 |0
+<U5C40> \x4E\xFC |0
+<U5C41> \x4E\xFD |0
+<U5C44> \x6B\xBA |0
+<U5C45> \x50\xA1 |0
+<U5C46> \x50\xA2 |0
+<U5C47> \x6B\xBB |0
+<U5C48> \x50\xA0 |0
+<U5C4B> \x52\x91 |0
+<U5C4C> \x6D\x9B |0
+<U5C4D> \x52\x90 |0
+<U5C4E> \x52\x8E |0
+<U5C4F> \x52\x8F |0
+<U5C50> \x54\xAE |0
+<U5C51> \x54\xAC |0
+<U5C54> \x6F\xED |0
+<U5C55> \x54\xAD |0
+<U5C56> \x6F\xEC |0
+<U5C58> \x54\xA2 |0
+<U5C59> \x72\xF6 |0
+<U5C5C> \x56\xF3 |0
+<U5C5D> \x56\xF4 |0
+<U5C60> \x56\xF2 |0
+<U5C62> \x5E\x78 |0
+<U5C63> \x7D\x8A |0
+<U5C64> \x60\x71 |0
+<U5C65> \x60\x72 |0
+<U5C67> \x80\xAB |0
+<U5C68> \x63\xD3 |0
+<U5C69> \x89\x6F |0
+<U5C6A> \x89\x70 |0
+<U5C6C> \x67\x89 |0
+<U5C6D> \x90\xB7 |0
+<U5C6E> \x48\x6C |3
+<U5C6E> \x69\x4C |0
+<U5C6F> \x4C\xB9 |0
+<U5C71> \x48\x6D |3
+<U5C71> \x4C\x74 |0
+<U5C73> \x69\x78 |0
+<U5C74> \x69\x77 |0
+<U5C79> \x4D\xFA |0
+<U5C7A> \x69\xB7 |0
+<U5C7B> \x69\xB8 |0
+<U5C7C> \x69\xB6 |0
+<U5C7E> \x69\xB9 |0
+<U5C86> \x6A\x88 |0
+<U5C88> \x6A\x83 |0
+<U5C89> \x6A\x85 |0
+<U5C8A> \x6A\x87 |0
+<U5C8B> \x6A\x84 |0
+<U5C8C> \x4F\x46 |0
+<U5C8D> \x6A\x81 |0
+<U5C8F> \x6A\x82 |0
+<U5C90> \x4F\x43 |0
+<U5C91> \x4F\x44 |0
+<U5C92> \x6A\x86 |0
+<U5C93> \x6A\x89 |0
+<U5C94> \x4F\x45 |0
+<U5C95> \x6A\x8A |0
+<U5C9D> \x6B\xC9 |0
+<U5C9F> \x6B\xC3 |0
+<U5CA0> \x6B\xBE |0
+<U5CA1> \x50\xA4 |0
+<U5CA2> \x6B\xC6 |0
+<U5CA3> \x6B\xC4 |0
+<U5CA4> \x6B\xBD |0
+<U5CA5> \x6B\xCA |0
+<U5CA6> \x6B\xCD |0
+<U5CA7> \x6B\xC8 |0
+<U5CA8> \x6B\xC1 |0
+<U5CA9> \x50\xA6 |0
+<U5CAA> \x6B\xC7 |0
+<U5CAB> \x50\xA7 |0
+<U5CAC> \x6B\xC2 |0
+<U5CAD> \x6B\xC5 |0
+<U5CAE> \x6B\xBC |0
+<U5CAF> \x6B\xC0 |0
+<U5CB0> \x6B\xCC |0
+<U5CB1> \x50\xA8 |0
+<U5CB3> \x50\xA9 |0
+<U5CB5> \x6B\xBF |0
+<U5CB6> \x6B\xCB |0
+<U5CB7> \x50\xA3 |0
+<U5CB8> \x50\xA5 |0
+<U5CC6> \x6D\xAC |0
+<U5CC7> \x6D\xA5 |0
+<U5CC8> \x6D\xAB |0
+<U5CC9> \x6D\xA4 |0
+<U5CCA> \x6D\xA6 |0
+<U5CCB> \x6D\xA0 |0
+<U5CCC> \x6D\x9E |0
+<U5CCE> \x6D\xAD |0
+<U5CCF> \x6D\xAA |0
+<U5CD0> \x6D\x9C |0
+<U5CD2> \x52\x93 |0
+<U5CD3> \x6D\xA8 |0
+<U5CD4> \x6D\xA9 |0
+<U5CD6> \x6D\xA7 |0
+<U5CD7> \x6D\x9F |0
+<U5CD8> \x6D\x9D |0
+<U5CD9> \x52\x92 |0
+<U5CDA> \x6D\xA3 |0
+<U5CDB> \x6D\xA1 |0
+<U5CDE> \x6D\xA2 |0
+<U5CDF> \x6D\xAE |0
+<U5CE8> \x54\xB3 |0
+<U5CEA> \x54\xB2 |0
+<U5CEC> \x6F\xEE |0
+<U5CED> \x54\xAF |0
+<U5CEE> \x6F\xF0 |0
+<U5CF0> \x54\xB4 |0
+<U5CF1> \x6F\xF1 |0
+<U5CF4> \x54\xB7 |0
+<U5CF6> \x54\xB5 |0
+<U5CF7> \x6F\xF2 |0
+<U5CF8> \x6D\xAF |0
+<U5CF9> \x6F\xF4 |0
+<U5CFB> \x54\xB1 |0
+<U5CFD> \x54\xB0 |0
+<U5CFF> \x6F\xEF |0
+<U5D00> \x6F\xF3 |0
+<U5D01> \x54\xB6 |0
+<U5D06> \x56\xF6 |0
+<U5D07> \x56\xF5 |0
+<U5D0B> \x72\xF8 |0
+<U5D0C> \x72\xFC |0
+<U5D0D> \x73\x41 |0
+<U5D0E> \x56\xF7 |0
+<U5D0F> \x73\x44 |0
+<U5D11> \x56\xFB |0
+<U5D12> \x73\x46 |0
+<U5D14> \x56\xFD |0
+<U5D16> \x56\xF9 |0
+<U5D17> \x57\x44 |0
+<U5D19> \x57\x41 |0
+<U5D1A> \x72\xFA |0
+<U5D1B> \x56\xF8 |0
+<U5D1D> \x72\xF9 |0
+<U5D1E> \x72\xF7 |0
+<U5D1F> \x73\x48 |0
+<U5D20> \x72\xFB |0
+<U5D22> \x56\xFA |0
+<U5D23> \x73\x47 |0
+<U5D24> \x57\x42 |0
+<U5D25> \x73\x43 |0
+<U5D26> \x73\x42 |0
+<U5D27> \x57\x43 |0
+<U5D28> \x72\xFD |0
+<U5D29> \x56\xFC |0
+<U5D2E> \x73\x49 |0
+<U5D30> \x73\x45 |0
+<U5D31> \x76\x6D |0
+<U5D32> \x76\x74 |0
+<U5D33> \x76\x69 |0
+<U5D34> \x59\x97 |0
+<U5D35> \x76\x65 |0
+<U5D36> \x76\x75 |0
+<U5D37> \x76\x5F |0
+<U5D38> \x76\x72 |0
+<U5D39> \x76\x70 |0
+<U5D3A> \x76\x6A |0
+<U5D3C> \x76\x73 |0
+<U5D3D> \x76\x6C |0
+<U5D3F> \x76\x64 |0
+<U5D40> \x76\x76 |0
+<U5D41> \x76\x62 |0
+<U5D42> \x76\x6F |0
+<U5D43> \x76\x60 |0
+<U5D45> \x76\x77 |0
+<U5D47> \x59\x98 |0
+<U5D49> \x76\x71 |0
+<U5D4A> \x79\xD5 |0
+<U5D4B> \x76\x63 |0
+<U5D4C> \x59\x95 |0
+<U5D4E> \x76\x67 |0
+<U5D50> \x59\x96 |0
+<U5D51> \x76\x66 |0
+<U5D52> \x76\x6B |0
+<U5D55> \x76\x68 |0
+<U5D59> \x76\x6E |0
+<U5D5E> \x79\xD9 |0
+<U5D62> \x79\xDC |0
+<U5D63> \x79\xD4 |0
+<U5D65> \x79\xD6 |0
+<U5D67> \x79\xDB |0
+<U5D68> \x79\xDA |0
+<U5D69> \x5B\xE8 |0
+<U5D6B> \x76\x61 |0
+<U5D6C> \x79\xD8 |0
+<U5D6F> \x5B\xE9 |0
+<U5D71> \x79\xD3 |0
+<U5D72> \x79\xD7 |0
+<U5D77> \x7D\x91 |0
+<U5D79> \x7D\x98 |0
+<U5D7A> \x7D\x8F |0
+<U5D7C> \x7D\x96 |0
+<U5D7D> \x7D\x8D |0
+<U5D7E> \x7D\x95 |0
+<U5D7F> \x7D\x99 |0
+<U5D80> \x7D\x8C |0
+<U5D81> \x7D\x90 |0
+<U5D82> \x7D\x8B |0
+<U5D84> \x5E\x79 |0
+<U5D86> \x7D\x8E |0
+<U5D87> \x5E\x7A |0
+<U5D88> \x7D\x94 |0
+<U5D89> \x7D\x93 |0
+<U5D8A> \x7D\x92 |0
+<U5D8D> \x7D\x97 |0
+<U5D92> \x80\xAF |0
+<U5D93> \x80\xB1 |0
+<U5D94> \x60\x74 |0
+<U5D95> \x80\xB2 |0
+<U5D97> \x80\xAD |0
+<U5D99> \x80\xAC |0
+<U5D9A> \x80\xB6 |0
+<U5D9C> \x80\xB4 |0
+<U5D9D> \x60\x73 |0
+<U5D9E> \x80\xB7 |0
+<U5D9F> \x80\xAE |0
+<U5DA0> \x80\xB3 |0
+<U5DA1> \x80\xB5 |0
+<U5DA2> \x80\xB0 |0
+<U5DA7> \x83\xEB |0
+<U5DA8> \x83\xF0 |0
+<U5DA9> \x83\xEA |0
+<U5DAA> \x83\xEF |0
+<U5DAC> \x83\xE8 |0
+<U5DAD> \x83\xF2 |0
+<U5DAE> \x83\xEE |0
+<U5DAF> \x83\xF3 |0
+<U5DB0> \x83\xED |0
+<U5DB1> \x83\xE9 |0
+<U5DB2> \x83\xF1 |0
+<U5DB4> \x83\xF4 |0
+<U5DB5> \x83\xEC |0
+<U5DB7> \x86\xE5 |0
+<U5DB8> \x63\xD7 |0
+<U5DBA> \x63\xD5 |0
+<U5DBC> \x63\xD4 |0
+<U5DBD> \x63\xD6 |0
+<U5DC0> \x89\x71 |0
+<U5DC2> \x8A\xC0 |0
+<U5DC3> \x8B\x6C |0
+<U5DC6> \x8C\xF1 |0
+<U5DC7> \x8C\xF2 |0
+<U5DC9> \x66\xEA |0
+<U5DCB> \x8E\x78 |0
+<U5DCD> \x67\x8A |0
+<U5DCF> \x8E\x79 |0
+<U5DD1> \x8F\x6E |0
+<U5DD2> \x67\xDD |0
+<U5DD4> \x67\xDC |0
+<U5DD5> \x8F\x6D |0
+<U5DD6> \x68\x55 |0
+<U5DD8> \x90\x47 |0
+<U5DDB> \x48\x6E |0
+<U5DDD> \x4C\x75 |0
+<U5DDE> \x4D\xFB |0
+<U5DDF> \x69\xBA |0
+<U5DE0> \x6A\x8B |0
+<U5DE1> \x4F\xD5 |0
+<U5DE2> \x57\x45 |0
+<U5DE5> \x48\x6F |3
+<U5DE5> \x4C\x76 |0
+<U5DE6> \x4D\x6A |0
+<U5DE7> \x4D\x69 |0
+<U5DE8> \x4D\x68 |0
+<U5DEB> \x4F\x47 |0
+<U5DEE> \x54\xB8 |0
+<U5DF0> \x79\xDD |0
+<U5DF1> \x48\x70 |3
+<U5DF1> \x4C\x77 |0
+<U5DF2> \x4C\x78 |0
+<U5DF3> \x4C\x79 |0
+<U5DF4> \x4C\xBA |0
+<U5DF7> \x52\x94 |0
+<U5DF9> \x6D\xB0 |0
+<U5DFD> \x59\x99 |0
+<U5DFE> \x48\x71 |3
+<U5DFE> \x4C\x7A |0
+<U5DFF> \x69\x5E |0
+<U5E02> \x4D\x6B |0
+<U5E03> \x4D\x6C |0
+<U5E04> \x69\x79 |0
+<U5E06> \x4D\xFC |0
+<U5E0A> \x6A\x8C |0
+<U5E0C> \x4F\x48 |0
+<U5E0E> \x6A\x8D |0
+<U5E11> \x50\xAF |0
+<U5E14> \x6B\xCF |0
+<U5E15> \x50\xAD |0
+<U5E16> \x50\xAC |0
+<U5E17> \x6B\xCE |0
+<U5E18> \x50\xAA |0
+<U5E19> \x6B\xD0 |0
+<U5E1A> \x50\xAB |0
+<U5E1B> \x50\xAE |0
+<U5E1D> \x52\x95 |0
+<U5E1F> \x52\x97 |0
+<U5E20> \x6D\xB4 |0
+<U5E21> \x6D\xB1 |0
+<U5E22> \x6D\xB2 |0
+<U5E23> \x6D\xB3 |0
+<U5E24> \x6D\xB5 |0
+<U5E25> \x52\x96 |0
+<U5E28> \x6F\xF6 |0
+<U5E29> \x6F\xF5 |0
+<U5E2B> \x54\xBA |0
+<U5E2D> \x54\xB9 |0
+<U5E33> \x57\x48 |0
+<U5E34> \x73\x4B |0
+<U5E36> \x57\x47 |0
+<U5E37> \x57\x49 |0
+<U5E38> \x57\x46 |0
+<U5E3D> \x59\x9B |0
+<U5E3E> \x73\x4A |0
+<U5E40> \x59\x9C |0
+<U5E41> \x76\x79 |0
+<U5E43> \x59\x9D |0
+<U5E44> \x76\x78 |0
+<U5E45> \x59\x9A |0
+<U5E4A> \x79\xE0 |0
+<U5E4B> \x79\xE2 |0
+<U5E4C> \x5B\xEA |0
+<U5E4D> \x79\xE1 |0
+<U5E4E> \x79\xDF |0
+<U5E4F> \x79\xDE |0
+<U5E53> \x7D\x9C |0
+<U5E54> \x5E\x7F |0
+<U5E55> \x5E\x7D |0
+<U5E57> \x5E\x7E |0
+<U5E58> \x7D\x9A |0
+<U5E59> \x7D\x9B |0
+<U5E5B> \x5E\x7B |0
+<U5E5C> \x80\xBB |0
+<U5E5D> \x80\xB9 |0
+<U5E5F> \x60\x76 |0
+<U5E60> \x80\xBA |0
+<U5E61> \x60\x77 |0
+<U5E62> \x60\x75 |0
+<U5E63> \x5E\x7C |0
+<U5E66> \x83\xF7 |0
+<U5E67> \x83\xF5 |0
+<U5E68> \x83\xF6 |0
+<U5E69> \x80\xB8 |0
+<U5E6A> \x86\xE7 |0
+<U5E6B> \x63\xD8 |0
+<U5E6C> \x86\xE6 |0
+<U5E6D> \x89\x72 |0
+<U5E6E> \x89\x73 |0
+<U5E6F> \x83\xF8 |0
+<U5E70> \x8B\x6D |0
+<U5E72> \x48\x72 |3
+<U5E72> \x4C\x7B |0
+<U5E73> \x4D\x6D |0
+<U5E74> \x4E\x41 |0
+<U5E75> \x69\xBB |0
+<U5E76> \x4D\xFD |0
+<U5E78> \x50\xB0 |0
+<U5E79> \x5B\xEB |0
+<U5E7A> \x48\x73 |0
+<U5E7B> \x4C\xBB |0
+<U5E7C> \x4D\x6E |0
+<U5E7D> \x52\x98 |0
+<U5E7E> \x59\x9E |0
+<U5E7F> \x48\x74 |0
+<U5E80> \x69\x7A |0
+<U5E82> \x69\x7B |0
+<U5E84> \x69\xBC |0
+<U5E87> \x4F\x4A |0
+<U5E88> \x6A\x91 |0
+<U5E89> \x6A\x8F |0
+<U5E8A> \x4F\x4B |0
+<U5E8B> \x6A\x8E |0
+<U5E8C> \x6A\x90 |0
+<U5E8D> \x6A\x92 |0
+<U5E8F> \x4F\x49 |0
+<U5E95> \x50\xB4 |0
+<U5E96> \x50\xB5 |0
+<U5E97> \x50\xB2 |0
+<U5E9A> \x50\xB1 |0
+<U5E9B> \x6D\xB9 |0
+<U5E9C> \x50\xB3 |0
+<U5EA0> \x52\x99 |0
+<U5EA2> \x6D\xB8 |0
+<U5EA3> \x6D\xBA |0
+<U5EA4> \x6D\xB7 |0
+<U5EA5> \x6D\xBB |0
+<U5EA6> \x52\x9A |0
+<U5EA7> \x54\xBD |0
+<U5EA8> \x6F\xF7 |0
+<U5EAA> \x6F\xF9 |0
+<U5EAB> \x54\xBB |0
+<U5EAC> \x6F\xFA |0
+<U5EAD> \x54\xBC |0
+<U5EAE> \x6F\xF8 |0
+<U5EB0> \x6D\xB6 |0
+<U5EB1> \x73\x4C |0
+<U5EB2> \x73\x4F |0
+<U5EB3> \x73\x50 |0
+<U5EB4> \x73\x4D |0
+<U5EB5> \x57\x4D |0
+<U5EB6> \x57\x4C |0
+<U5EB7> \x57\x4A |0
+<U5EB8> \x57\x4B |0
+<U5EB9> \x73\x4E |0
+<U5EBE> \x57\x4E |0
+<U5EC1> \x59\xA0 |0
+<U5EC2> \x59\xA1 |0
+<U5EC4> \x59\xA2 |0
+<U5EC5> \x79\xE3 |0
+<U5EC6> \x79\xE5 |0
+<U5EC7> \x79\xE7 |0
+<U5EC8> \x5B\xED |0
+<U5EC9> \x5B\xEC |0
+<U5ECA> \x59\x9F |0
+<U5ECB> \x79\xE6 |0
+<U5ECC> \x79\xE4 |0
+<U5ECE> \x7D\xA0 |0
+<U5ED1> \x7D\x9E |0
+<U5ED2> \x7D\xA4 |0
+<U5ED3> \x5E\x81 |0
+<U5ED4> \x7D\xA5 |0
+<U5ED5> \x7D\xA2 |0
+<U5ED6> \x5E\x82 |0
+<U5ED7> \x7D\x9F |0
+<U5ED8> \x7D\x9D |0
+<U5ED9> \x7D\xA3 |0
+<U5EDA> \x60\x79 |0
+<U5EDB> \x80\xBD |0
+<U5EDC> \x7D\xA1 |0
+<U5EDD> \x60\x7B |0
+<U5EDE> \x80\xBE |0
+<U5EDF> \x60\x7A |0
+<U5EE0> \x60\x7D |0
+<U5EE1> \x80\xBF |0
+<U5EE2> \x60\x78 |0
+<U5EE3> \x60\x7C |0
+<U5EE5> \x83\xFD |0
+<U5EE6> \x83\xFB |0
+<U5EE7> \x83\xFA |0
+<U5EE8> \x83\xFC |0
+<U5EE9> \x83\xF9 |0
+<U5EEC> \x66\x52 |0
+<U5EEE> \x8C\xF3 |0
+<U5EEF> \x8C\xF4 |0
+<U5EF1> \x8E\x7A |0
+<U5EF2> \x8F\x6F |0
+<U5EF3> \x68\xA1 |0
+<U5EF4> \x48\x75 |0
+<U5EF6> \x50\xB6 |0
+<U5EF7> \x4F\x4C |0
+<U5EFA> \x52\x9B |0
+<U5EFE> \x48\x76 |3
+<U5EFE> \x4C\x7C |0
+<U5EFF> \x4C\xBC |0
+<U5F01> \x4D\x6F |0
+<U5F02> \x69\xBD |0
+<U5F04> \x4F\x4D |0
+<U5F05> \x6A\x93 |0
+<U5F07> \x6D\xBC |0
+<U5F08> \x52\x9C |0
+<U5F0A> \x5E\x83 |0
+<U5F0B> \x48\x77 |3
+<U5F0B> \x4C\x7D |0
+<U5F0F> \x4E\x42 |0
+<U5F12> \x5B\xEE |0
+<U5F13> \x48\x78 |3
+<U5F13> \x4C\x7E |0
+<U5F14> \x4C\xBD |0
+<U5F15> \x4C\xBE |0
+<U5F17> \x4D\x71 |0
+<U5F18> \x4D\x70 |0
+<U5F1A> \x69\xBE |0
+<U5F1B> \x4E\x43 |0
+<U5F1D> \x6A\x94 |0
+<U5F1F> \x4F\x4E |0
+<U5F22> \x6B\xD2 |0
+<U5F23> \x6B\xD3 |0
+<U5F24> \x6B\xD4 |0
+<U5F26> \x50\xB7 |0
+<U5F27> \x50\xB8 |0
+<U5F28> \x6B\xD1 |0
+<U5F29> \x50\xB9 |0
+<U5F2D> \x52\x9D |0
+<U5F2E> \x6D\xBD |0
+<U5F30> \x6F\xFC |0
+<U5F31> \x54\xBE |0
+<U5F33> \x6F\xFB |0
+<U5F35> \x57\x4F |0
+<U5F36> \x73\x51 |0
+<U5F37> \x57\x50 |0
+<U5F38> \x73\x52 |0
+<U5F3C> \x59\xA3 |0
+<U5F40> \x79\xE8 |0
+<U5F43> \x7D\xA7 |0
+<U5F44> \x7D\xA6 |0
+<U5F46> \x5E\x84 |0
+<U5F48> \x60\x7E |0
+<U5F49> \x80\xC0 |0
+<U5F4A> \x62\x73 |0
+<U5F4B> \x84\x41 |0
+<U5F4C> \x63\xD9 |0
+<U5F4E> \x67\xDE |0
+<U5F4F> \x90\x49 |0
+<U5F50> \x48\x79 |0
+<U5F54> \x6B\xD5 |0
+<U5F56> \x6D\xBE |0
+<U5F57> \x57\x51 |0
+<U5F58> \x76\x7A |0
+<U5F59> \x5B\xEF |0
+<U5F5D> \x65\x60 |1
+<U5F5E> \x65\x60 |0
+<U5F61> \x48\x7A |0
+<U5F62> \x4F\x50 |0
+<U5F64> \x4F\x4F |0
+<U5F65> \x52\x9E |0
+<U5F67> \x6F\xFD |0
+<U5F69> \x57\x53 |0
+<U5F6A> \x58\xA8 |0
+<U5F6B> \x57\x54 |0
+<U5F6C> \x57\x52 |0
+<U5F6D> \x59\xA4 |0
+<U5F6F> \x7D\xA8 |0
+<U5F70> \x5E\x85 |0
+<U5F71> \x60\x7F |0
+<U5F73> \x48\x7B |3
+<U5F73> \x69\x4D |0
+<U5F74> \x69\xBF |0
+<U5F76> \x6A\x96 |0
+<U5F77> \x4F\x51 |0
+<U5F78> \x6A\x95 |0
+<U5F79> \x4F\x52 |0
+<U5F7C> \x50\xBD |0
+<U5F7D> \x6B\xD8 |0
+<U5F7E> \x6B\xD7 |0
+<U5F7F> \x50\xBC |0
+<U5F80> \x50\xBA |0
+<U5F81> \x50\xBB |0
+<U5F82> \x6B\xD6 |0
+<U5F85> \x52\xA0 |0
+<U5F86> \x6D\xBF |0
+<U5F87> \x52\xA3 |0
+<U5F88> \x52\x9F |0
+<U5F89> \x52\xA5 |0
+<U5F8A> \x52\xA1 |0
+<U5F8B> \x52\xA2 |0
+<U5F8C> \x52\xA4 |0
+<U5F90> \x54\xC1 |0
+<U5F91> \x54\xC0 |0
+<U5F92> \x54\xBF |0
+<U5F96> \x73\x54 |0
+<U5F97> \x57\x55 |0
+<U5F98> \x57\x58 |0
+<U5F99> \x57\x56 |0
+<U5F9B> \x73\x53 |0
+<U5F9C> \x57\x5B |0
+<U5F9E> \x57\x57 |0
+<U5F9F> \x73\x55 |0
+<U5FA0> \x57\x5A |0
+<U5FA1> \x57\x59 |0
+<U5FA5> \x76\x7C |0
+<U5FA6> \x76\x7B |0
+<U5FA8> \x59\xA7 |0
+<U5FA9> \x59\xA5 |0
+<U5FAA> \x59\xA6 |0
+<U5FAB> \x76\x7D |0
+<U5FAC> \x5B\xF0 |0
+<U5FAD> \x79\xEA |0
+<U5FAE> \x5B\xF1 |0
+<U5FAF> \x79\xE9 |0
+<U5FB2> \x80\xC1 |0
+<U5FB5> \x60\x82 |0
+<U5FB6> \x7D\xA9 |0
+<U5FB7> \x60\x81 |0
+<U5FB9> \x5E\x86 |0
+<U5FBB> \x86\xE9 |0
+<U5FBC> \x84\x42 |0
+<U5FBD> \x63\xDA |0
+<U5FBE> \x86\xE8 |0
+<U5FBF> \x8B\x6E |0
+<U5FC0> \x8C\xF5 |0
+<U5FC1> \x8C\xF6 |0
+<U5FC3> \x48\x7C |3
+<U5FC3> \x4C\xBF |0
+<U5FC5> \x4D\x72 |0
+<U5FC9> \x69\x7C |0
+<U5FCC> \x4F\x54 |0
+<U5FCD> \x4F\x56 |0
+<U5FCF> \x69\xC2 |0
+<U5FD0> \x6A\x99 |0
+<U5FD1> \x6A\x98 |0
+<U5FD2> \x6A\x97 |0
+<U5FD4> \x69\xC1 |0
+<U5FD5> \x69\xC0 |0
+<U5FD6> \x4E\x45 |0
+<U5FD7> \x4F\x55 |0
+<U5FD8> \x4F\x53 |0
+<U5FD9> \x4E\x44 |0
+<U5FDD> \x50\xBE |0
+<U5FDE> \x6B\xD9 |0
+<U5FE0> \x50\xBF |0
+<U5FE1> \x6A\x9E |0
+<U5FE3> \x6A\xA0 |0
+<U5FE4> \x6A\x9F |0
+<U5FE5> \x6B\xDA |0
+<U5FE8> \x6A\x9B |0
+<U5FEA> \x4F\x5A |0
+<U5FEB> \x4F\x58 |0
+<U5FED> \x6A\x9A |0
+<U5FEE> \x6A\x9C |0
+<U5FEF> \x6A\xA2 |0
+<U5FF1> \x4F\x57 |0
+<U5FF3> \x6A\x9D |0
+<U5FF4> \x6A\xA6 |0
+<U5FF5> \x50\xC1 |0
+<U5FF7> \x6A\xA3 |0
+<U5FF8> \x4F\x59 |0
+<U5FFA> \x6A\xA1 |0
+<U5FFB> \x6A\xA4 |0
+<U5FFD> \x50\xC0 |0
+<U5FFF> \x50\xC2 |0
+<U6000> \x6A\xA5 |0
+<U6009> \x6B\xEE |0
+<U600A> \x6B\xE1 |0
+<U600B> \x6B\xDF |0
+<U600C> \x6B\xED |0
+<U600D> \x6B\xE8 |0
+<U600E> \x52\xAA |0
+<U600F> \x50\xC3 |0
+<U6010> \x6B\xE9 |0
+<U6011> \x6B\xEC |0
+<U6012> \x52\xA6 |0
+<U6013> \x6B\xEB |0
+<U6014> \x50\xC4 |0
+<U6015> \x50\xC9 |0
+<U6016> \x50\xC7 |0
+<U6017> \x6B\xE2 |0
+<U6019> \x6B\xDD |0
+<U601A> \x6B\xE4 |0
+<U601B> \x50\xCE |0
+<U601C> \x6B\xEF |0
+<U601D> \x52\xA7 |0
+<U601E> \x6B\xE5 |0
+<U6020> \x52\xA8 |0
+<U6021> \x50\xCA |0
+<U6022> \x6B\xE7 |0
+<U6024> \x6D\xCE |0
+<U6025> \x52\xA9 |0
+<U6026> \x6B\xDC |0
+<U6027> \x50\xCB |0
+<U6028> \x52\xAB |0
+<U6029> \x50\xCC |0
+<U602A> \x50\xC8 |0
+<U602B> \x50\xCD |0
+<U602C> \x6B\xE6 |0
+<U602D> \x6B\xDB |0
+<U602E> \x6B\xEA |0
+<U602F> \x50\xC5 |0
+<U6032> \x6B\xDE |0
+<U6033> \x6B\xE3 |0
+<U6034> \x6B\xE0 |0
+<U6035> \x50\xC6 |0
+<U6037> \x6D\xC0 |0
+<U6039> \x6D\xC1 |0
+<U6040> \x6D\xCB |0
+<U6041> \x70\x44 |0
+<U6042> \x6D\xCC |0
+<U6043> \x52\xB1 |0
+<U6044> \x6D\xCF |0
+<U6045> \x6D\xC5 |0
+<U6046> \x52\xB0 |0
+<U6047> \x6D\xC7 |0
+<U6049> \x6D\xC8 |0
+<U604C> \x6D\xCA |0
+<U604D> \x52\xAC |0
+<U6050> \x54\xC5 |0
+<U6053> \x6D\xC6 |0
+<U6054> \x6D\xC2 |0
+<U6055> \x54\xC6 |0
+<U6058> \x6D\xD0 |0
+<U6059> \x54\xC2 |0
+<U605A> \x70\x42 |0
+<U605B> \x6D\xC9 |0
+<U605D> \x70\x41 |0
+<U605E> \x6D\xC4 |0
+<U605F> \x6D\xCD |0
+<U6062> \x52\xAF |0
+<U6063> \x54\xC3 |0
+<U6064> \x52\xB5 |0
+<U6065> \x54\xC4 |0
+<U6066> \x6D\xD1 |0
+<U6067> \x70\x43 |0
+<U6068> \x52\xAE |0
+<U6069> \x54\xC8 |0
+<U606A> \x52\xB4 |0
+<U606B> \x52\xB3 |0
+<U606C> \x52\xB2 |0
+<U606D> \x54\xC7 |0
+<U606E> \x6D\xD2 |0
+<U606F> \x54\xC9 |0
+<U6070> \x52\xAD |0
+<U6072> \x6D\xC3 |0
+<U607F> \x57\x5C |0
+<U6080> \x70\x47 |0
+<U6081> \x70\x49 |0
+<U6083> \x70\x4B |0
+<U6084> \x54\xCA |0
+<U6085> \x54\xD0 |0
+<U6086> \x73\x58 |0
+<U6087> \x70\x4F |0
+<U6088> \x70\x46 |0
+<U6089> \x57\x5E |0
+<U608A> \x73\x56 |0
+<U608C> \x54\xCF |0
+<U608D> \x54\xCD |0
+<U608E> \x70\x51 |0
+<U6090> \x73\x57 |0
+<U6092> \x70\x48 |0
+<U6094> \x54\xCE |0
+<U6095> \x70\x4C |0
+<U6096> \x54\xD1 |0
+<U6097> \x70\x4E |0
+<U609A> \x54\xCC |0
+<U609B> \x70\x4D |0
+<U609C> \x70\x50 |0
+<U609D> \x70\x4A |0
+<U609F> \x54\xCB |0
+<U60A0> \x57\x5F |0
+<U60A2> \x70\x45 |0
+<U60A3> \x57\x5D |0
+<U60A8> \x57\x60 |0
+<U60B0> \x73\x5A |0
+<U60B1> \x73\x63 |0
+<U60B2> \x59\xAA |0
+<U60B4> \x57\x62 |0
+<U60B5> \x57\x67 |0
+<U60B6> \x59\xAB |0
+<U60B7> \x73\x65 |0
+<U60B8> \x57\x6E |0
+<U60B9> \x76\x7F |0
+<U60BA> \x73\x5B |0
+<U60BB> \x57\x66 |0
+<U60BC> \x57\x69 |0
+<U60BD> \x57\x64 |0
+<U60BE> \x73\x59 |0
+<U60BF> \x73\x67 |0
+<U60C0> \x73\x6A |0
+<U60C1> \x76\x8F |0
+<U60C3> \x73\x68 |0
+<U60C4> \x76\x84 |0
+<U60C5> \x57\x65 |0
+<U60C6> \x57\x6C |0
+<U60C7> \x57\x70 |0
+<U60C8> \x73\x62 |0
+<U60C9> \x76\x7E |0
+<U60CA> \x73\x66 |0
+<U60CB> \x57\x61 |0
+<U60CC> \x76\x81 |0
+<U60CD> \x73\x69 |0
+<U60CE> \x76\x83 |0
+<U60CF> \x73\x5E |0
+<U60D1> \x59\xA8 |0
+<U60D3> \x73\x5C |0
+<U60D4> \x73\x5D |0
+<U60D5> \x57\x6B |0
+<U60D8> \x57\x6A |0
+<U60D9> \x73\x60 |0
+<U60DA> \x57\x6F |0
+<U60DB> \x73\x64 |0
+<U60DC> \x57\x68 |0
+<U60DD> \x73\x61 |0
+<U60DF> \x57\x6D |0
+<U60E0> \x59\xAC |0
+<U60E1> \x59\xA9 |0
+<U60E2> \x76\x82 |0
+<U60E4> \x73\x5F |0
+<U60E6> \x57\x63 |0
+<U60F0> \x59\xB1 |0
+<U60F1> \x59\xB5 |0
+<U60F2> \x76\x86 |0
+<U60F3> \x5B\xF6 |0
+<U60F4> \x59\xB3 |0
+<U60F5> \x76\x8A |0
+<U60F6> \x59\xB7 |0
+<U60F7> \x79\xEB |0
+<U60F8> \x76\x8C |0
+<U60F9> \x5B\xF8 |0
+<U60FA> \x59\xAF |0
+<U60FB> \x59\xB2 |0
+<U60FC> \x76\x8D |0
+<U60FE> \x76\x8E |0
+<U60FF> \x76\x94 |0
+<U6100> \x59\xB9 |0
+<U6101> \x5B\xF9 |0
+<U6103> \x76\x90 |0
+<U6104> \x76\x95 |0
+<U6105> \x76\x89 |0
+<U6106> \x5C\x46 |0
+<U6108> \x5B\xFA |0
+<U6109> \x59\xB8 |0
+<U610A> \x76\x87 |0
+<U610B> \x76\x96 |0
+<U610D> \x5C\x45 |0
+<U610E> \x59\xB6 |0
+<U610F> \x5B\xF3 |0
+<U6110> \x76\x93 |0
+<U6112> \x59\xBA |0
+<U6113> \x76\x8B |0
+<U6114> \x76\x85 |0
+<U6115> \x59\xB0 |0
+<U6116> \x76\x88 |0
+<U6118> \x76\x91 |0
+<U611A> \x5B\xF2 |0
+<U611B> \x5B\xF7 |0
+<U611C> \x59\xAD |0
+<U611D> \x76\x92 |0
+<U611F> \x5B\xF5 |0
+<U6123> \x59\xAE |0
+<U6127> \x5C\x44 |0
+<U6128> \x7D\xAB |0
+<U6129> \x79\xF6 |0
+<U612B> \x79\xEE |0
+<U612C> \x7D\xAA |0
+<U612E> \x79\xF2 |0
+<U612F> \x79\xF4 |0
+<U6132> \x79\xF1 |0
+<U6134> \x5C\x43 |0
+<U6136> \x79\xF0 |0
+<U6137> \x5C\x47 |0
+<U613B> \x7D\xBA |0
+<U613E> \x5C\x42 |0
+<U613F> \x5E\x88 |0
+<U6140> \x79\xF7 |0
+<U6141> \x7D\xAC |0
+<U6144> \x5B\xFD |0
+<U6145> \x79\xEF |0
+<U6146> \x79\xF3 |0
+<U6147> \x5E\x87 |0
+<U6148> \x5B\xF4 |0
+<U6149> \x79\xEC |0
+<U614A> \x79\xED |0
+<U614B> \x5E\x89 |0
+<U614C> \x5B\xFC |0
+<U614D> \x5C\x41 |0
+<U614E> \x5B\xFB |0
+<U614F> \x79\xF5 |0
+<U6152> \x7D\xB0 |0
+<U6153> \x7D\xB1 |0
+<U6154> \x7D\xB6 |0
+<U6155> \x60\x87 |0
+<U6156> \x7D\xBD |0
+<U6158> \x5E\x8F |0
+<U615A> \x5E\x8E |0
+<U615B> \x7D\xB8 |0
+<U615D> \x60\x86 |0
+<U615E> \x7D\xAD |0
+<U615F> \x5E\x8D |0
+<U6161> \x7D\xBC |0
+<U6162> \x5E\x8B |0
+<U6163> \x5E\x8C |0
+<U6165> \x7D\xB9 |0
+<U6166> \x80\xD2 |0
+<U6167> \x60\x84 |0
+<U6168> \x59\xB4 |0
+<U616A> \x7D\xBB |0
+<U616B> \x60\x8B |0
+<U616C> \x7D\xB3 |0
+<U616E> \x60\x85 |0
+<U6170> \x60\x8A |0
+<U6171> \x7D\xAE |0
+<U6172> \x7D\xB2 |0
+<U6173> \x7D\xAF |0
+<U6174> \x7D\xB5 |0
+<U6175> \x5E\x90 |0
+<U6176> \x60\x83 |0
+<U6177> \x5E\x8A |0
+<U6179> \x80\xC4 |0
+<U617A> \x7D\xB7 |0
+<U617C> \x60\x89 |0
+<U617E> \x60\x8C |0
+<U6180> \x7D\xB4 |0
+<U6182> \x60\x88 |0
+<U6183> \x80\xC3 |0
+<U6189> \x80\xC8 |0
+<U618A> \x62\x77 |0
+<U618B> \x80\xC2 |0
+<U618C> \x84\x4E |0
+<U618D> \x80\xD1 |0
+<U618E> \x60\x90 |0
+<U6190> \x60\x8E |0
+<U6191> \x62\x75 |0
+<U6192> \x80\xCE |0
+<U6193> \x80\xCA |0
+<U6194> \x60\x94 |0
+<U6196> \x84\x45 |0
+<U619A> \x60\x92 |0
+<U619B> \x80\xC9 |0
+<U619D> \x84\x43 |0
+<U619F> \x80\xCD |0
+<U61A1> \x80\xD0 |0
+<U61A2> \x80\xC7 |0
+<U61A4> \x60\x93 |0
+<U61A7> \x60\x8D |0
+<U61A8> \x84\x44 |0
+<U61A9> \x62\x76 |0
+<U61AA> \x80\xCF |0
+<U61AB> \x60\x8F |0
+<U61AC> \x60\x91 |0
+<U61AD> \x80\xCC |0
+<U61AE> \x60\x95 |0
+<U61AF> \x80\xCB |0
+<U61B0> \x80\xC6 |0
+<U61B1> \x80\xC5 |0
+<U61B2> \x62\x74 |0
+<U61B3> \x80\xD3 |0
+<U61B4> \x84\x47 |0
+<U61B5> \x86\xEB |0
+<U61B6> \x62\x79 |0
+<U61B8> \x84\x4D |0
+<U61BA> \x84\x4B |0
+<U61BC> \x86\xEC |0
+<U61BE> \x62\x7A |0
+<U61BF> \x84\x4C |0
+<U61C1> \x84\x49 |0
+<U61C2> \x63\xDC |0
+<U61C3> \x86\xEA |0
+<U61C5> \x84\x46 |0
+<U61C6> \x84\x48 |0
+<U61C7> \x63\xDD |0
+<U61C8> \x62\x7C |0
+<U61C9> \x63\xDB |0
+<U61CA> \x62\x7B |0
+<U61CB> \x63\xDF |0
+<U61CC> \x84\x4A |0
+<U61CD> \x62\x78 |0
+<U61D6> \x89\x7C |0
+<U61D8> \x89\x74 |0
+<U61DE> \x86\xF2 |0
+<U61DF> \x89\x75 |0
+<U61E0> \x86\xEE |0
+<U61E3> \x65\x61 |0
+<U61E4> \x86\xF0 |0
+<U61E5> \x86\xEF |0
+<U61E6> \x63\xDE |0
+<U61E7> \x86\xED |0
+<U61E8> \x86\xF1 |0
+<U61E9> \x89\x7D |0
+<U61EA> \x89\x79 |0
+<U61EB> \x89\x7B |0
+<U61ED> \x89\x76 |0
+<U61EE> \x89\x77 |0
+<U61F0> \x89\x7A |0
+<U61F1> \x89\x78 |0
+<U61F2> \x66\x53 |0
+<U61F5> \x66\x56 |0
+<U61F6> \x66\x55 |0
+<U61F7> \x66\x54 |0
+<U61F8> \x66\xEB |0
+<U61F9> \x8C\xF7 |0
+<U61FA> \x66\xEC |0
+<U61FB> \x8B\x6F |0
+<U61FC> \x67\x8B |0
+<U61FD> \x8E\x7B |0
+<U61FE> \x67\x8C |0
+<U61FF> \x67\xDF |0
+<U6200> \x68\x56 |0
+<U6201> \x90\x4A |0
+<U6203> \x90\x4B |0
+<U6204> \x90\x4C |0
+<U6207> \x91\xAA |0
+<U6208> \x48\x7D |3
+<U6208> \x4C\xC0 |0
+<U6209> \x69\x7D |0
+<U620A> \x4D\x73 |0
+<U620C> \x4E\x47 |0
+<U620D> \x4E\x48 |0
+<U620E> \x4E\x46 |0
+<U6210> \x4E\x49 |0
+<U6211> \x4F\x5C |0
+<U6212> \x4F\x5B |0
+<U6214> \x6B\xF0 |0
+<U6215> \x50\xD0 |0
+<U6216> \x50\xCF |0
+<U6219> \x70\x52 |0
+<U621A> \x57\x71 |0
+<U621B> \x57\x72 |0
+<U621F> \x59\xBB |0
+<U6220> \x79\xF8 |0
+<U6221> \x5C\x48 |0
+<U6222> \x5C\x49 |0
+<U6223> \x79\xFA |0
+<U6224> \x79\xFC |0
+<U6225> \x79\xFB |0
+<U6227> \x7D\xBF |0
+<U6229> \x7D\xBE |0
+<U622A> \x5E\x91 |0
+<U622B> \x7D\xC0 |0
+<U622D> \x80\xD4 |0
+<U622E> \x60\x96 |0
+<U6230> \x62\x7D |0
+<U6232> \x63\xE0 |0
+<U6233> \x65\x62 |0
+<U6234> \x63\xE1 |0
+<U6236> \x48\x7E |3
+<U6236> \x4C\xC1 |0
+<U623A> \x6A\xA7 |0
+<U623D> \x6B\xF1 |0
+<U623E> \x50\xD2 |0
+<U623F> \x50\xD1 |0
+<U6240> \x50\xD3 |0
+<U6241> \x52\xB6 |0
+<U6242> \x6D\xD3 |0
+<U6243> \x6D\xD4 |0
+<U6246> \x70\x53 |0
+<U6247> \x54\xD2 |0
+<U6248> \x57\x73 |0
+<U6249> \x59\xBC |0
+<U624A> \x76\x97 |0
+<U624B> \x48\x7F |3
+<U624B> \x4C\xC2 |0
+<U624D> \x4C\x7F |0
+<U624E> \x4C\xC3 |0
+<U6250> \x69\x7E |0
+<U6251> \x4D\x77 |0
+<U6252> \x4D\x76 |0
+<U6253> \x4D\x74 |0
+<U6254> \x4D\x75 |0
+<U6258> \x4E\x4C |0
+<U6259> \x69\xCA |0
+<U625A> \x69\xCC |0
+<U625B> \x4E\x4B |0
+<U625C> \x69\xC4 |0
+<U625E> \x69\xC5 |0
+<U6260> \x69\xCB |0
+<U6261> \x69\xC7 |0
+<U6262> \x69\xC9 |0
+<U6263> \x4E\x4A |0
+<U6264> \x69\xC6 |0
+<U6265> \x69\xC3 |0
+<U6266> \x69\xC8 |0
+<U626D> \x4F\x63 |0
+<U626E> \x4F\x6C |0
+<U626F> \x4F\x6A |0
+<U6270> \x6A\xB1 |0
+<U6271> \x6A\xAE |0
+<U6272> \x6A\xB6 |0
+<U6273> \x4F\x68 |0
+<U6274> \x6A\xB7 |0
+<U6276> \x4F\x61 |0
+<U6277> \x6A\xB4 |0
+<U6279> \x4F\x67 |0
+<U627A> \x6A\xB0 |0
+<U627B> \x6A\xAF |0
+<U627C> \x4F\x65 |0
+<U627D> \x6A\xB5 |0
+<U627E> \x4F\x66 |0
+<U627F> \x50\xD4 |0
+<U6280> \x4F\x60 |0
+<U6281> \x6A\xB2 |0
+<U6283> \x6A\xA8 |0
+<U6284> \x4F\x5D |0
+<U6286> \x4F\x70 |0
+<U6287> \x6A\xAD |0
+<U6288> \x6A\xB3 |0
+<U6289> \x4F\x62 |0
+<U628A> \x4F\x64 |0
+<U628C> \x6A\xA9 |0
+<U628E> \x6A\xAA |0
+<U628F> \x6A\xAB |0
+<U6291> \x4F\x6F |0
+<U6292> \x4F\x69 |0
+<U6293> \x4F\x6E |0
+<U6294> \x6A\xAC |0
+<U6295> \x4F\x6D |0
+<U6296> \x4F\x5F |0
+<U6297> \x4F\x5E |0
+<U6298> \x4F\x6B |0
+<U62A8> \x50\xE2 |0
+<U62A9> \x6B\xFD |0
+<U62AA> \x6B\xF6 |0
+<U62AB> \x50\xDD |0
+<U62AC> \x50\xF0 |0
+<U62AD> \x6B\xF2 |0
+<U62AE> \x6B\xF9 |0
+<U62AF> \x6B\xFB |0
+<U62B0> \x6C\x41 |0
+<U62B1> \x50\xEB |0
+<U62B3> \x6B\xFA |0
+<U62B4> \x6B\xF3 |0
+<U62B5> \x50\xE9 |0
+<U62B6> \x6B\xF7 |0
+<U62B8> \x6C\x42 |0
+<U62B9> \x50\xDA |0
+<U62BB> \x6B\xFC |0
+<U62BC> \x50\xE4 |0
+<U62BD> \x50\xE3 |0
+<U62BE> \x6B\xF5 |0
+<U62BF> \x50\xD8 |0
+<U62C2> \x50\xD9 |0
+<U62C4> \x50\xD7 |0
+<U62C6> \x50\xEF |0
+<U62C7> \x50\xE7 |0
+<U62C8> \x50\xE1 |0
+<U62C9> \x50\xD5 |0
+<U62CA> \x6B\xF8 |0
+<U62CB> \x50\xE0 |0
+<U62CC> \x50\xD6 |0
+<U62CD> \x50\xE8 |0
+<U62CE> \x50\xF1 |0
+<U62CF> \x6D\xD5 |0
+<U62D0> \x50\xE5 |0
+<U62D1> \x6B\xF4 |0
+<U62D2> \x50\xDB |0
+<U62D3> \x50\xDE |0
+<U62D4> \x50\xDF |0
+<U62D6> \x50\xED |0
+<U62D7> \x50\xEE |0
+<U62D8> \x50\xEC |0
+<U62D9> \x50\xE6 |0
+<U62DA> \x50\xEA |0
+<U62DB> \x50\xDC |0
+<U62DC> \x52\xB7 |0
+<U62EB> \x6D\xDB |0
+<U62EC> \x52\xC3 |0
+<U62ED> \x52\xBB |0
+<U62EE> \x52\xBD |0
+<U62EF> \x52\xC2 |0
+<U62F0> \x6D\xE7 |0
+<U62F1> \x52\xC0 |0
+<U62F2> \x70\x54 |0
+<U62F3> \x54\xD3 |0
+<U62F4> \x52\xC5 |0
+<U62F5> \x6D\xD8 |0
+<U62F6> \x6D\xE0 |0
+<U62F7> \x52\xC1 |0
+<U62F8> \x6D\xDF |0
+<U62F9> \x6D\xDC |0
+<U62FA> \x6D\xE4 |0
+<U62FB> \x6D\xE6 |0
+<U62FC> \x52\xBA |0
+<U62FD> \x52\xBE |0
+<U62FE> \x52\xC4 |0
+<U62FF> \x54\xD5 |0
+<U6300> \x6D\xE1 |0
+<U6301> \x52\xBC |0
+<U6302> \x52\xC7 |0
+<U6303> \x6D\xDA |0
+<U6307> \x52\xBF |0
+<U6308> \x54\xD4 |0
+<U6309> \x52\xB9 |0
+<U630B> \x6D\xD7 |0
+<U630C> \x6D\xDE |0
+<U630D> \x6D\xD6 |0
+<U630E> \x6D\xD9 |0
+<U630F> \x6D\xDD |0
+<U6310> \x70\x55 |0
+<U6311> \x52\xC6 |0
+<U6313> \x6D\xE2 |0
+<U6314> \x6D\xE3 |0
+<U6315> \x6D\xE5 |0
+<U6316> \x52\xB8 |0
+<U6328> \x54\xE3 |0
+<U6329> \x70\x61 |0
+<U632A> \x54\xE1 |0
+<U632B> \x54\xE2 |0
+<U632C> \x70\x57 |0
+<U632D> \x70\x67 |0
+<U632F> \x54\xD8 |0
+<U6332> \x73\x6B |0
+<U6333> \x70\x69 |0
+<U6334> \x70\x63 |0
+<U6336> \x70\x5A |0
+<U6338> \x70\x6C |0
+<U6339> \x70\x5D |0
+<U633A> \x54\xDE |0
+<U633B> \x73\x83 |0
+<U633C> \x70\x60 |0
+<U633D> \x54\xE0 |0
+<U633E> \x54\xD7 |0
+<U6340> \x70\x6E |0
+<U6341> \x70\x62 |0
+<U6342> \x54\xDA |0
+<U6343> \x70\x5B |0
+<U6344> \x70\x58 |0
+<U6345> \x70\x59 |0
+<U6346> \x54\xDB |0
+<U6347> \x70\x68 |0
+<U6348> \x70\x6F |0
+<U6349> \x54\xDD |0
+<U634A> \x70\x5F |0
+<U634B> \x70\x5E |0
+<U634C> \x54\xE5 |0
+<U634D> \x54\xE4 |0
+<U634E> \x54\xD6 |0
+<U634F> \x54\xDC |0
+<U6350> \x54\xDF |0
+<U6351> \x70\x6B |0
+<U6354> \x70\x65 |0
+<U6355> \x54\xD9 |0
+<U6356> \x70\x56 |0
+<U6357> \x70\x6D |0
+<U6358> \x70\x64 |0
+<U6359> \x70\x66 |0
+<U635A> \x70\x6A |0
+<U6365> \x73\x6C |0
+<U6367> \x57\x7B |0
+<U6368> \x57\x90 |0
+<U6369> \x57\x8F |0
+<U636B> \x57\x84 |0
+<U636D> \x73\x7E |0
+<U636E> \x73\x7A |0
+<U636F> \x73\x77 |0
+<U6370> \x73\x8A |0
+<U6371> \x57\x7E |0
+<U6372> \x57\x76 |0
+<U6375> \x73\x7C |0
+<U6376> \x59\xCC |0
+<U6377> \x57\x7A |0
+<U6378> \x73\x85 |0
+<U637A> \x57\x91 |0
+<U637B> \x57\x8E |0
+<U637C> \x73\x81 |0
+<U637D> \x73\x6F |0
+<U6380> \x57\x8D |0
+<U6381> \x73\x87 |0
+<U6382> \x73\x6E |0
+<U6383> \x57\x82 |0
+<U6384> \x57\x86 |0
+<U6385> \x73\x86 |0
+<U6387> \x73\x78 |0
+<U6388> \x57\x87 |0
+<U6389> \x57\x81 |0
+<U638A> \x73\x6D |0
+<U638C> \x59\xBE |0
+<U638D> \x73\x89 |0
+<U638E> \x73\x76 |0
+<U638F> \x57\x8C |0
+<U6390> \x73\x79 |0
+<U6391> \x73\x88 |0
+<U6392> \x57\x8B |0
+<U6394> \x76\x98 |0
+<U6396> \x57\x77 |0
+<U6397> \x73\x74 |0
+<U6398> \x57\x7C |0
+<U6399> \x57\x88 |0
+<U639B> \x57\x83 |0
+<U639C> \x73\x7D |0
+<U639D> \x73\x73 |0
+<U639E> \x73\x71 |0
+<U639F> \x73\x84 |0
+<U63A0> \x57\x74 |0
+<U63A1> \x57\x89 |0
+<U63A2> \x57\x78 |0
+<U63A3> \x59\xBD |0
+<U63A4> \x73\x82 |0
+<U63A5> \x57\x79 |0
+<U63A7> \x57\x75 |0
+<U63A8> \x57\x85 |0
+<U63A9> \x57\x7F |0
+<U63AA> \x57\x7D |0
+<U63AB> \x73\x75 |0
+<U63AC> \x57\x8A |0
+<U63AD> \x73\x72 |0
+<U63AE> \x73\x7F |0
+<U63AF> \x73\x7B |0
+<U63B0> \x76\x9A |0
+<U63B1> \x76\x99 |0
+<U63BD> \x73\x70 |0
+<U63BE> \x76\xAA |0
+<U63C0> \x59\xC0 |0
+<U63C2> \x76\xB0 |0
+<U63C3> \x76\x9F |0
+<U63C4> \x76\xAD |0
+<U63C5> \x79\xFD |0
+<U63C6> \x59\xC3 |0
+<U63C7> \x76\xB1 |0
+<U63C8> \x76\xB4 |0
+<U63C9> \x59\xC2 |0
+<U63CA> \x76\xA2 |0
+<U63CB> \x76\xB3 |0
+<U63CC> \x76\xB2 |0
+<U63CD> \x59\xC4 |0
+<U63CE> \x76\x9B |0
+<U63CF> \x59\xBF |0
+<U63D0> \x59\xC7 |0
+<U63D2> \x59\xC5 |0
+<U63D3> \x76\xAF |0
+<U63D5> \x76\xA5 |0
+<U63D6> \x59\xC9 |0
+<U63D7> \x76\xB6 |0
+<U63D8> \x76\xAE |0
+<U63D9> \x76\xB7 |0
+<U63DA> \x59\xD1 |0
+<U63DB> \x59\xCF |0
+<U63DC> \x76\xAC |0
+<U63DD> \x76\xAB |0
+<U63DF> \x76\xA9 |0
+<U63E0> \x76\xA3 |0
+<U63E1> \x59\xC8 |0
+<U63E3> \x59\xC6 |0
+<U63E4> \x70\x5C |0
+<U63E5> \x76\x9C |0
+<U63E7> \x7A\x5E |0
+<U63E8> \x76\x9D |0
+<U63E9> \x59\xC1 |0
+<U63EA> \x59\xCE |0
+<U63EB> \x7A\x42 |0
+<U63ED> \x59\xCA |0
+<U63EE> \x59\xCB |0
+<U63EF> \x76\x9E |0
+<U63F0> \x76\xB5 |0
+<U63F1> \x7A\x41 |0
+<U63F2> \x76\xA6 |0
+<U63F3> \x76\xA1 |0
+<U63F4> \x59\xCD |0
+<U63F5> \x76\xA7 |0
+<U63F6> \x76\xA4 |0
+<U63F9> \x59\xD2 |0
+<U6406> \x5C\x58 |0
+<U6409> \x7A\x45 |0
+<U640A> \x7A\x58 |0
+<U640B> \x7A\x5D |0
+<U640C> \x7A\x51 |0
+<U640D> \x5C\x54 |0
+<U640E> \x7A\x62 |0
+<U640F> \x5C\x51 |0
+<U6410> \x7A\x43 |0
+<U6412> \x7A\x44 |0
+<U6413> \x5C\x4A |0
+<U6414> \x5C\x53 |0
+<U6415> \x7A\x4B |0
+<U6416> \x5C\x56 |0
+<U6417> \x5C\x57 |0
+<U6418> \x7A\x4C |0
+<U641A> \x7A\x59 |0
+<U641B> \x7A\x5F |0
+<U641C> \x5C\x52 |0
+<U641E> \x5C\x4C |0
+<U641F> \x7A\x4A |0
+<U6420> \x7A\x46 |0
+<U6421> \x7A\x61 |0
+<U6422> \x7A\x4F |0
+<U6423> \x7A\x50 |0
+<U6424> \x7A\x47 |0
+<U6425> \x7A\x5B |0
+<U6426> \x7A\x52 |0
+<U6427> \x7A\x5C |0
+<U6428> \x7A\x54 |0
+<U642A> \x5C\x4D |0
+<U642B> \x7D\xC1 |0
+<U642C> \x5C\x50 |0
+<U642D> \x5C\x4E |0
+<U642E> \x7A\x60 |0
+<U642F> \x7A\x57 |0
+<U6430> \x7A\x53 |0
+<U6433> \x7A\x48 |0
+<U6434> \x5E\x9B |0
+<U6435> \x7A\x56 |0
+<U6436> \x5C\x55 |0
+<U6437> \x7A\x4E |0
+<U6439> \x7A\x4D |0
+<U643D> \x5C\x4F |0
+<U643E> \x5C\x4B |0
+<U643F> \x7D\xD6 |0
+<U6440> \x7A\x5A |0
+<U6441> \x7A\x55 |0
+<U6443> \x7A\x49 |0
+<U644B> \x7D\xD1 |0
+<U644D> \x7D\xC2 |0
+<U644E> \x7D\xCD |0
+<U6450> \x7D\xD4 |0
+<U6451> \x5E\x99 |0
+<U6452> \x59\xD0 |0
+<U6453> \x7D\xD2 |0
+<U6454> \x5E\x94 |0
+<U6458> \x5E\x93 |0
+<U6459> \x7D\xD9 |0
+<U645B> \x7D\xC3 |0
+<U645C> \x7D\xD0 |0
+<U645D> \x7D\xC4 |0
+<U645E> \x7D\xCF |0
+<U645F> \x5E\x97 |0
+<U6460> \x7D\xD3 |0
+<U6461> \x76\xA8 |0
+<U6465> \x7D\xDA |0
+<U6466> \x7D\xCB |0
+<U6467> \x5E\x9A |0
+<U6468> \x80\xE2 |0
+<U6469> \x60\x97 |0
+<U646B> \x7D\xD8 |0
+<U646C> \x7D\xD7 |0
+<U646D> \x5E\x9C |0
+<U646E> \x80\xD5 |0
+<U646F> \x60\x98 |0
+<U6470> \x80\xD6 |0
+<U6472> \x7D\xC7 |0
+<U6473> \x7D\xC8 |0
+<U6474> \x7D\xC5 |0
+<U6475> \x7D\xCA |0
+<U6476> \x7D\xC6 |0
+<U6477> \x7D\xDB |0
+<U6478> \x5E\x96 |0
+<U6479> \x60\x99 |0
+<U647A> \x5E\x98 |0
+<U647B> \x5E\x9D |0
+<U647D> \x7D\xC9 |0
+<U647F> \x7D\xD5 |0
+<U6482> \x7D\xCE |0
+<U6485> \x80\xD9 |0
+<U6487> \x5E\x92 |0
+<U6488> \x60\x9C |0
+<U6489> \x84\x55 |0
+<U648A> \x80\xDE |0
+<U648B> \x80\xDD |0
+<U648C> \x80\xDF |0
+<U648F> \x80\xDC |0
+<U6490> \x60\x9D |0
+<U6491> \x68\xCB |0
+<U6492> \x60\xA3 |0
+<U6493> \x60\xA0 |0
+<U6495> \x60\xA1 |0
+<U6496> \x80\xD7 |0
+<U6497> \x80\xDA |0
+<U6498> \x80\xE4 |0
+<U6499> \x60\xA9 |0
+<U649A> \x60\xA7 |0
+<U649C> \x80\xDB |0
+<U649D> \x76\xA0 |0
+<U649E> \x60\x9A |0
+<U649F> \x80\xE1 |0
+<U64A0> \x80\xD8 |0
+<U64A2> \x60\xAA |0
+<U64A3> \x80\xE0 |0
+<U64A4> \x5E\x95 |0
+<U64A5> \x60\x9F |0
+<U64A6> \x7D\xCC |0
+<U64A9> \x60\xA2 |0
+<U64AB> \x60\xA6 |0
+<U64AC> \x60\xA8 |0
+<U64AD> \x60\xA5 |0
+<U64AE> \x60\xA4 |0
+<U64B0> \x60\x9E |0
+<U64B1> \x80\xE3 |0
+<U64B2> \x60\x9B |0
+<U64B3> \x60\xAB |0
+<U64BB> \x62\x82 |0
+<U64BC> \x62\x83 |0
+<U64BD> \x84\x54 |0
+<U64BE> \x62\x8C |0
+<U64BF> \x62\x89 |0
+<U64C1> \x62\x7F |0
+<U64C2> \x62\x87 |0
+<U64C3> \x84\x56 |0
+<U64C4> \x62\x85 |0
+<U64C5> \x62\x7E |0
+<U64C7> \x62\x86 |0
+<U64C9> \x84\x53 |0
+<U64CA> \x63\xE3 |0
+<U64CB> \x62\x81 |0
+<U64CD> \x62\x88 |0
+<U64CE> \x63\xE2 |0
+<U64CF> \x84\x52 |0
+<U64D0> \x84\x51 |0
+<U64D2> \x62\x8A |0
+<U64D4> \x62\x8B |0
+<U64D6> \x84\x50 |0
+<U64D7> \x84\x4F |0
+<U64D8> \x63\xE4 |0
+<U64D9> \x84\x59 |0
+<U64DA> \x62\x84 |0
+<U64DB> \x84\x57 |0
+<U64E0> \x63\xE5 |0
+<U64E2> \x63\xEA |0
+<U64E3> \x86\xF5 |0
+<U64E4> \x86\xF7 |0
+<U64E6> \x63\xE7 |0
+<U64E8> \x86\xF8 |0
+<U64E9> \x86\xF4 |0
+<U64EB> \x86\xF6 |0
+<U64EC> \x63\xE8 |0
+<U64ED> \x63\xEB |0
+<U64EF> \x86\xF3 |0
+<U64F0> \x63\xE6 |0
+<U64F1> \x63\xE9 |0
+<U64F2> \x65\x64 |0
+<U64F3> \x84\x58 |0
+<U64F4> \x65\x63 |0
+<U64F7> \x65\x69 |0
+<U64F8> \x89\x82 |0
+<U64FA> \x65\x67 |0
+<U64FB> \x65\x68 |0
+<U64FC> \x89\x85 |0
+<U64FD> \x89\x81 |0
+<U64FE> \x65\x65 |0
+<U64FF> \x89\x7E |0
+<U6500> \x66\x57 |0
+<U6501> \x89\x83 |0
+<U6503> \x89\x84 |0
+<U6504> \x89\x7F |0
+<U6506> \x65\x66 |0
+<U6507> \x8B\x70 |0
+<U6509> \x8B\x73 |0
+<U650C> \x8B\x74 |0
+<U650D> \x8B\x72 |0
+<U650E> \x8B\x75 |0
+<U650F> \x66\x58 |0
+<U6510> \x8B\x71 |0
+<U6513> \x8C\xFB |0
+<U6514> \x66\xEE |0
+<U6515> \x8C\xFA |0
+<U6516> \x8C\xF9 |0
+<U6517> \x8C\xF8 |0
+<U6518> \x66\xED |0
+<U6519> \x66\xEF |0
+<U651B> \x8E\x7C |0
+<U651C> \x67\x8E |0
+<U651D> \x67\x8D |0
+<U6520> \x8F\x71 |0
+<U6521> \x8F\x70 |0
+<U6522> \x8F\x73 |0
+<U6523> \x68\x57 |0
+<U6524> \x67\xE0 |0
+<U6525> \x90\x4E |0
+<U6526> \x8F\x72 |0
+<U6529> \x90\x4D |0
+<U652A> \x68\x59 |0
+<U652B> \x68\x58 |0
+<U652C> \x68\x7F |0
+<U652D> \x90\xB8 |0
+<U652E> \x91\x41 |0
+<U652F> \x48\x81 |3
+<U652F> \x4C\xC4 |0
+<U6532> \x76\xB8 |0
+<U6533> \x84\x5A |0
+<U6534> \x48\x82 |0
+<U6536> \x4E\x4D |0
+<U6537> \x6A\xB8 |0
+<U6538> \x4F\x73 |0
+<U6539> \x4F\x71 |0
+<U653B> \x4F\x72 |0
+<U653D> \x6C\x43 |0
+<U653E> \x50\xF2 |0
+<U653F> \x52\xC8 |0
+<U6541> \x6D\xE8 |0
+<U6543> \x6D\xE9 |0
+<U6545> \x52\xC9 |0
+<U6546> \x70\x71 |0
+<U6548> \x54\xE6 |0
+<U6549> \x54\xE7 |0
+<U654A> \x70\x70 |0
+<U654F> \x57\x98 |0
+<U6551> \x57\x94 |0
+<U6553> \x73\x8B |0
+<U6554> \x57\x9B |0
+<U6555> \x57\x9A |0
+<U6556> \x57\x93 |0
+<U6557> \x57\x96 |0
+<U6558> \x57\x99 |0
+<U6559> \x57\x95 |0
+<U655C> \x76\xBC |0
+<U655D> \x57\x92 |0
+<U655E> \x59\xD3 |0
+<U6562> \x59\xD5 |0
+<U6563> \x59\xD6 |0
+<U6564> \x76\xBB |0
+<U6565> \x76\xBE |0
+<U6566> \x59\xD4 |0
+<U6567> \x76\xB9 |0
+<U6568> \x76\xBD |0
+<U656A> \x76\xBA |0
+<U656C> \x5C\x59 |0
+<U656F> \x7A\x63 |0
+<U6572> \x5E\x9E |0
+<U6573> \x7D\xDC |0
+<U6574> \x62\x8D |0
+<U6575> \x60\xAC |0
+<U6576> \x80\xE5 |0
+<U6577> \x60\xAD |0
+<U6578> \x60\xAE |0
+<U6579> \x80\xE7 |0
+<U657A> \x80\xE6 |0
+<U657B> \x80\xE8 |0
+<U657C> \x84\x5C |0
+<U657F> \x84\x5B |0
+<U6580> \x86\xFA |0
+<U6581> \x86\xF9 |0
+<U6582> \x63\xEC |0
+<U6583> \x63\xED |0
+<U6584> \x8B\x76 |0
+<U6587> \x48\x83 |3
+<U6587> \x4C\xC5 |0
+<U658C> \x76\xBF |0
+<U6590> \x59\xD8 |0
+<U6591> \x59\xD7 |0
+<U6592> \x7A\x64 |0
+<U6594> \x89\x86 |0
+<U6595> \x67\x8F |0
+<U6596> \x90\x4F |0
+<U6597> \x48\x84 |3
+<U6597> \x4C\xC6 |0
+<U6599> \x54\xE8 |0
+<U659B> \x57\x9D |0
+<U659C> \x57\x9C |0
+<U659D> \x76\xC0 |0
+<U659E> \x76\xC1 |0
+<U659F> \x5C\x5A |0
+<U65A0> \x7D\xDD |0
+<U65A1> \x5E\x9F |0
+<U65A2> \x84\x5D |0
+<U65A4> \x48\x85 |3
+<U65A4> \x4C\xC7 |0
+<U65A5> \x4D\x78 |0
+<U65A7> \x50\xF3 |0
+<U65A8> \x6C\x44 |0
+<U65AA> \x6D\xEA |0
+<U65AB> \x52\xCA |0
+<U65AC> \x57\x9E |0
+<U65AE> \x76\xC2 |0
+<U65AF> \x59\xD9 |0
+<U65B0> \x5C\x5B |0
+<U65B2> \x80\xE9 |0
+<U65B3> \x80\xEA |0
+<U65B6> \x86\xFB |0
+<U65B7> \x65\x6A |0
+<U65B8> \x91\x42 |0
+<U65B9> \x48\x86 |3
+<U65B9> \x4C\xC8 |0
+<U65BB> \x6C\x45 |0
+<U65BC> \x50\xF4 |0
+<U65BD> \x52\xCB |0
+<U65BF> \x6D\xEB |0
+<U65C1> \x54\xE9 |0
+<U65C2> \x70\x75 |0
+<U65C3> \x70\x73 |0
+<U65C4> \x70\x74 |0
+<U65C5> \x54\xEA |0
+<U65C6> \x70\x72 |0
+<U65CB> \x57\xA0 |0
+<U65CC> \x57\xA1 |0
+<U65CD> \x73\x8C |0
+<U65CE> \x57\xA2 |0
+<U65CF> \x57\x9F |0
+<U65D0> \x76\xC3 |0
+<U65D2> \x76\xC4 |0
+<U65D3> \x7A\x65 |0
+<U65D6> \x5E\xA1 |0
+<U65D7> \x5E\xA0 |0
+<U65DA> \x86\xFC |0
+<U65DB> \x89\x87 |0
+<U65DD> \x8B\x78 |0
+<U65DE> \x8B\x77 |0
+<U65DF> \x8C\xFC |0
+<U65E0> \x48\x87 |0
+<U65E1> \x69\x5F |0
+<U65E2> \x52\xCC |0
+<U65E5> \x48\x88 |3
+<U65E5> \x4C\xC9 |0
+<U65E6> \x4D\x79 |0
+<U65E8> \x4E\x4F |0
+<U65E9> \x4E\x4E |0
+<U65EC> \x4E\x50 |0
+<U65ED> \x4E\x51 |0
+<U65EE> \x69\xCE |0
+<U65EF> \x69\xCD |0
+<U65F0> \x6A\xB9 |0
+<U65F1> \x4F\x74 |0
+<U65F2> \x6A\xBC |0
+<U65F3> \x6A\xBB |0
+<U65F4> \x6A\xBA |0
+<U65F5> \x6A\xBD |0
+<U65FA> \x50\xF5 |0
+<U65FB> \x6C\x4B |0
+<U65FC> \x6C\x47 |0
+<U65FD> \x6C\x50 |0
+<U6600> \x50\xFC |0
+<U6602> \x50\xFA |0
+<U6603> \x6C\x4C |0
+<U6604> \x6C\x48 |0
+<U6605> \x6C\x4F |0
+<U6606> \x50\xF9 |0
+<U6607> \x51\x43 |0
+<U6608> \x6C\x4A |0
+<U6609> \x6C\x46 |0
+<U660A> \x51\x42 |0
+<U660B> \x6C\x4D |0
+<U660C> \x50\xF8 |0
+<U660D> \x6C\x4E |0
+<U660E> \x50\xFB |0
+<U660F> \x50\xFD |0
+<U6610> \x6C\x52 |0
+<U6611> \x6C\x51 |0
+<U6612> \x6C\x49 |0
+<U6613> \x50\xF7 |0
+<U6614> \x50\xF6 |0
+<U6615> \x51\x41 |0
+<U661C> \x6D\xF0 |0
+<U661D> \x6D\xF6 |0
+<U661F> \x52\xD2 |0
+<U6620> \x52\xCF |0
+<U6621> \x6D\xED |0
+<U6622> \x6D\xF2 |0
+<U6624> \x52\xD5 |0
+<U6625> \x52\xCD |0
+<U6626> \x6D\xF1 |0
+<U6627> \x52\xD0 |0
+<U6628> \x52\xD3 |0
+<U662B> \x6D\xF4 |0
+<U662D> \x52\xCE |0
+<U662E> \x6D\xF9 |0
+<U662F> \x52\xD1 |0
+<U6631> \x52\xD4 |0
+<U6632> \x6D\xEE |0
+<U6633> \x6D\xF3 |0
+<U6634> \x6D\xF7 |0
+<U6635> \x6D\xEF |0
+<U6636> \x6D\xEC |0
+<U6639> \x6D\xF8 |0
+<U663A> \x6D\xF5 |0
+<U6641> \x54\xF2 |0
+<U6642> \x54\xEB |0
+<U6643> \x54\xEE |0
+<U6645> \x54\xF1 |0
+<U6647> \x70\x78 |0
+<U6649> \x54\xEC |0
+<U664A> \x70\x76 |0
+<U664C> \x54\xF0 |0
+<U664F> \x54\xED |0
+<U6651> \x70\x79 |0
+<U6652> \x54\xEF |0
+<U6659> \x73\x90 |0
+<U665A> \x57\xA4 |0
+<U665B> \x73\x8F |0
+<U665C> \x73\x91 |0
+<U665D> \x57\xA3 |0
+<U665E> \x57\xA8 |0
+<U665F> \x70\x77 |0
+<U6661> \x73\x8E |0
+<U6662> \x73\x92 |0
+<U6664> \x57\xA5 |0
+<U6665> \x73\x8D |0
+<U6666> \x57\xA7 |0
+<U6668> \x57\xA6 |0
+<U666A> \x76\xCB |0
+<U666C> \x76\xC6 |0
+<U666E> \x59\xDA |0
+<U666F> \x59\xDE |0
+<U6670> \x59\xDB |0
+<U6671> \x76\xC9 |0
+<U6672> \x76\xCC |0
+<U6674> \x59\xDC |0
+<U6676> \x59\xDD |0
+<U6677> \x59\xE2 |0
+<U6678> \x7A\x6E |0
+<U6679> \x76\xCA |0
+<U667A> \x59\xE0 |0
+<U667B> \x76\xC7 |0
+<U667C> \x76\xC5 |0
+<U667E> \x59\xE1 |0
+<U6680> \x76\xC8 |0
+<U6684> \x5C\x61 |0
+<U6686> \x7A\x66 |0
+<U6687> \x5C\x5E |0
+<U6688> \x5C\x5F |0
+<U6689> \x5C\x5D |0
+<U668A> \x7A\x6B |0
+<U668B> \x7A\x6A |0
+<U668C> \x7A\x67 |0
+<U668D> \x5C\x63 |0
+<U6690> \x7A\x69 |0
+<U6691> \x59\xDF |0
+<U6694> \x7A\x6D |0
+<U6695> \x7A\x68 |0
+<U6696> \x5C\x60 |0
+<U6697> \x5C\x5C |0
+<U6698> \x5C\x62 |0
+<U6699> \x7A\x6C |0
+<U669D> \x5E\xA4 |0
+<U669F> \x7D\xE0 |0
+<U66A0> \x7D\xDF |0
+<U66A1> \x7D\xDE |0
+<U66A2> \x5E\xA2 |0
+<U66A8> \x5E\xA3 |0
+<U66A9> \x80\xED |0
+<U66AA> \x80\xF0 |0
+<U66AB> \x60\xB0 |0
+<U66AE> \x60\xAF |0
+<U66AF> \x80\xF1 |0
+<U66B0> \x80\xEC |0
+<U66B1> \x60\xB2 |0
+<U66B2> \x80\xEE |0
+<U66B4> \x60\xB1 |0
+<U66B5> \x80\xEB |0
+<U66B7> \x80\xEF |0
+<U66B8> \x62\x93 |0
+<U66B9> \x62\x90 |0
+<U66BA> \x84\x66 |0
+<U66BB> \x84\x65 |0
+<U66BD> \x84\x64 |0
+<U66BE> \x84\x5F |0
+<U66C0> \x84\x60 |0
+<U66C4> \x62\x91 |0
+<U66C6> \x62\x8E |0
+<U66C7> \x62\x92 |0
+<U66C8> \x84\x5E |0
+<U66C9> \x62\x8F |0
+<U66CA> \x84\x61 |0
+<U66CB> \x84\x62 |0
+<U66CC> \x84\x67 |0
+<U66CF> \x84\x63 |0
+<U66D2> \x86\xFD |0
+<U66D6> \x63\xEF |0
+<U66D8> \x89\x8A |0
+<U66D9> \x63\xEE |0
+<U66DA> \x89\x88 |0
+<U66DB> \x89\x89 |0
+<U66DC> \x65\x6B |0
+<U66DD> \x66\x5A |0
+<U66DE> \x8B\x79 |0
+<U66E0> \x66\x59 |0
+<U66E3> \x8D\x41 |0
+<U66E4> \x8D\x42 |0
+<U66E6> \x66\xF0 |0
+<U66E8> \x8C\xFD |0
+<U66E9> \x67\x90 |0
+<U66EB> \x90\x50 |0
+<U66EC> \x68\x5A |0
+<U66ED> \x90\xB9 |0
+<U66EE> \x90\xBA |0
+<U66F0> \x48\x89 |3
+<U66F0> \x4C\xCA |0
+<U66F2> \x4E\x52 |0
+<U66F3> \x4E\x53 |0
+<U66F4> \x4F\x75 |0
+<U66F6> \x6C\x53 |0
+<U66F7> \x52\xD6 |0
+<U66F8> \x54\xF3 |0
+<U66F9> \x57\xA9 |0
+<U66FC> \x56\xB6 |0
+<U66FE> \x59\xE3 |0
+<U66FF> \x59\xE4 |0
+<U6700> \x59\x52 |0
+<U6701> \x76\xCD |0
+<U6703> \x5C\x64 |0
+<U6704> \x7D\xE2 |0
+<U6705> \x7D\xE1 |0
+<U6708> \x48\x8A |3
+<U6708> \x4C\xCB |0
+<U6709> \x4E\x54 |0
+<U670A> \x6C\x54 |0
+<U670B> \x51\x45 |0
+<U670D> \x51\x44 |0
+<U670F> \x6D\xFA |0
+<U6710> \x6D\xFB |0
+<U6712> \x70\x7A |0
+<U6713> \x70\x7B |0
+<U6714> \x54\xF4 |0
+<U6715> \x54\xF5 |0
+<U6717> \x54\xF6 |0
+<U6718> \x73\x93 |0
+<U671B> \x57\xAB |0
+<U671D> \x59\xE6 |0
+<U671F> \x59\xE5 |0
+<U6720> \x7A\x6F |0
+<U6721> \x7B\xC2 |0
+<U6722> \x7D\xE3 |0
+<U6723> \x84\x68 |0
+<U6726> \x65\x6C |0
+<U6727> \x66\xF1 |0
+<U6728> \x48\x8B |3
+<U6728> \x4C\xCC |0
+<U672A> \x4D\x7C |0
+<U672B> \x4D\x7D |0
+<U672C> \x4D\x7B |0
+<U672D> \x4D\x7E |0
+<U672E> \x4D\x7A |0
+<U6731> \x4E\x57 |0
+<U6733> \x69\xD6 |0
+<U6734> \x4E\x56 |0
+<U6735> \x4E\x58 |0
+<U6738> \x69\xD1 |0
+<U6739> \x69\xD0 |0
+<U673A> \x69\xD3 |0
+<U673B> \x69\xD2 |0
+<U673C> \x69\xD5 |0
+<U673D> \x4E\x55 |0
+<U673E> \x69\xCF |0
+<U673F> \x69\xD4 |0
+<U6745> \x6A\xBE |0
+<U6746> \x4F\x7F |0
+<U6747> \x6A\xBF |0
+<U6748> \x6A\xC3 |0
+<U6749> \x4F\x7E |0
+<U674B> \x6A\xC7 |0
+<U674C> \x6A\xC2 |0
+<U674D> \x6A\xC5 |0
+<U674E> \x4F\x77 |0
+<U674F> \x4F\x78 |0
+<U6750> \x4F\x79 |0
+<U6751> \x4F\x7A |0
+<U6753> \x4F\x82 |0
+<U6755> \x6A\xC1 |0
+<U6756> \x4F\x7C |0
+<U6757> \x4F\x83 |0
+<U6759> \x6A\xC0 |0
+<U675A> \x6A\xC6 |0
+<U675C> \x4F\x7B |0
+<U675D> \x6A\xC4 |0
+<U675E> \x4F\x7D |0
+<U675F> \x4F\x76 |0
+<U6760> \x4F\x81 |0
+<U676A> \x51\x5A |0
+<U676C> \x6C\x56 |0
+<U676D> \x51\x46 |0
+<U676F> \x51\x50 |0
+<U6770> \x51\x51 |0
+<U6771> \x51\x49 |0
+<U6772> \x51\x5B |0
+<U6773> \x51\x4B |0
+<U6774> \x6C\x5E |0
+<U6775> \x51\x56 |0
+<U6776> \x6C\x59 |0
+<U6777> \x51\x4C |0
+<U6778> \x6C\x68 |0
+<U6779> \x6C\x69 |0
+<U677A> \x6C\x61 |0
+<U677B> \x6C\x5A |0
+<U677C> \x51\x59 |0
+<U677D> \x6C\x66 |0
+<U677E> \x51\x54 |0
+<U677F> \x51\x52 |0
+<U6781> \x6C\x67 |0
+<U6783> \x6C\x65 |0
+<U6784> \x6C\x5D |0
+<U6785> \x6C\x55 |0
+<U6786> \x6C\x5C |0
+<U6787> \x51\x4D |0
+<U6789> \x51\x53 |0
+<U678B> \x51\x47 |0
+<U678C> \x6C\x60 |0
+<U678D> \x6C\x5F |0
+<U678E> \x6C\x57 |0
+<U6790> \x51\x55 |0
+<U6791> \x6C\x63 |0
+<U6792> \x6C\x58 |0
+<U6793> \x51\x58 |0
+<U6794> \x6C\x6A |0
+<U6795> \x51\x48 |0
+<U6797> \x51\x4F |0
+<U6798> \x6C\x5B |0
+<U6799> \x6C\x64 |0
+<U679A> \x51\x57 |0
+<U679C> \x51\x4A |0
+<U679D> \x51\x4E |0
+<U679F> \x6C\x62 |0
+<U67AE> \x6E\x5E |0
+<U67AF> \x52\xDE |0
+<U67B0> \x52\xEB |0
+<U67B2> \x6E\x59 |0
+<U67B3> \x6E\x4F |0
+<U67B4> \x52\xE4 |0
+<U67B5> \x6E\x4D |0
+<U67B6> \x52\xDD |0
+<U67B7> \x6E\x48 |0
+<U67B8> \x52\xE7 |0
+<U67B9> \x6E\x55 |0
+<U67BA> \x6E\x42 |0
+<U67BB> \x6E\x44 |0
+<U67C0> \x6E\x47 |0
+<U67C1> \x6D\xFC |0
+<U67C2> \x6E\x54 |0
+<U67C3> \x6E\x64 |0
+<U67C4> \x52\xE2 |0
+<U67C5> \x6E\x49 |0
+<U67C6> \x6E\x5B |0
+<U67C8> \x6E\x41 |0
+<U67C9> \x6E\x62 |0
+<U67CA> \x6E\x63 |0
+<U67CB> \x6E\x66 |0
+<U67CC> \x6E\x5D |0
+<U67CD> \x6E\x4E |0
+<U67CE> \x6E\x56 |0
+<U67CF> \x52\xE8 |0
+<U67D0> \x52\xDB |0
+<U67D1> \x52\xE3 |0
+<U67D2> \x52\xEF |0
+<U67D3> \x52\xD8 |0
+<U67D4> \x52\xDA |0
+<U67D8> \x6E\x46 |0
+<U67D9> \x52\xEC |0
+<U67DA> \x52\xE5 |0
+<U67DB> \x6E\x60 |0
+<U67DC> \x6E\x43 |0
+<U67DD> \x52\xEE |0
+<U67DE> \x52\xE9 |0
+<U67DF> \x6E\x4C |0
+<U67E2> \x52\xED |0
+<U67E3> \x6E\x53 |0
+<U67E4> \x6E\x4B |0
+<U67E5> \x52\xE6 |0
+<U67E6> \x6E\x5F |0
+<U67E7> \x6E\x57 |0
+<U67E9> \x52\xE0 |0
+<U67EA> \x6E\x65 |0
+<U67EB> \x6E\x4A |0
+<U67EC> \x52\xDC |0
+<U67ED> \x6E\x5C |0
+<U67EE> \x6E\x52 |0
+<U67EF> \x52\xE1 |0
+<U67F0> \x6E\x58 |0
+<U67F1> \x52\xD9 |0
+<U67F2> \x6D\xFD |0
+<U67F3> \x52\xEA |0
+<U67F4> \x55\x48 |0
+<U67F5> \x52\xDF |0
+<U67F6> \x6E\x51 |0
+<U67F7> \x6E\x50 |0
+<U67F8> \x6E\x45 |0
+<U67FA> \x6E\x61 |0
+<U67FC> \x6E\x5A |0
+<U67FF> \x52\xD7 |0
+<U6812> \x70\x90 |0
+<U6813> \x55\x4F |0
+<U6814> \x70\x91 |0
+<U6816> \x70\x85 |0
+<U6817> \x55\x44 |0
+<U6818> \x55\x50 |0
+<U681A> \x70\x7D |0
+<U681C> \x70\x87 |0
+<U681D> \x70\x8F |0
+<U681F> \x70\x7C |0
+<U6820> \x70\x98 |0
+<U6821> \x54\xF7 |0
+<U6825> \x70\x97 |0
+<U6826> \x70\x92 |0
+<U6828> \x70\x93 |0
+<U6829> \x55\x42 |0
+<U682A> \x55\x4D |0
+<U682B> \x70\x89 |0
+<U682D> \x70\x8A |0
+<U682E> \x70\x94 |0
+<U682F> \x70\x8B |0
+<U6831> \x70\x86 |0
+<U6832> \x70\x7F |0
+<U6833> \x70\x81 |0
+<U6834> \x70\x8E |0
+<U6835> \x70\x88 |0
+<U6838> \x54\xF8 |0
+<U6839> \x54\xFC |0
+<U683A> \x70\x96 |0
+<U683B> \x70\x82 |0
+<U683C> \x55\x4B |0
+<U683D> \x55\x47 |0
+<U6840> \x55\x4A |0
+<U6841> \x55\x51 |0
+<U6842> \x54\xFD |0
+<U6843> \x55\x4C |0
+<U6844> \x70\x8D |0
+<U6845> \x55\x4E |0
+<U6846> \x54\xFA |0
+<U6848> \x54\xF9 |0
+<U6849> \x70\x7E |0
+<U684B> \x70\x83 |0
+<U684C> \x55\x45 |0
+<U684D> \x70\x95 |0
+<U684E> \x70\x8C |0
+<U684F> \x70\x84 |0
+<U6850> \x55\x49 |0
+<U6851> \x55\x46 |0
+<U6853> \x54\xFB |0
+<U6854> \x55\x41 |0
+<U686B> \x73\xA8 |0
+<U686D> \x73\x98 |0
+<U686E> \x73\x99 |0
+<U686F> \x73\x9D |0
+<U6871> \x73\xAC |0
+<U6872> \x73\xA9 |0
+<U6874> \x73\xA2 |0
+<U6875> \x73\xA1 |0
+<U6876> \x57\xB2 |0
+<U6877> \x73\xA5 |0
+<U6878> \x73\xB4 |0
+<U6879> \x73\x94 |0
+<U687B> \x73\xB5 |0
+<U687C> \x73\xA7 |0
+<U687D> \x73\xB9 |0
+<U687E> \x73\xAD |0
+<U687F> \x57\xB1 |0
+<U6880> \x73\xAB |0
+<U6881> \x57\xAC |0
+<U6882> \x57\xC1 |0
+<U6883> \x57\xB7 |0
+<U6885> \x57\xBB |0
+<U6886> \x57\xBA |0
+<U6887> \x73\x95 |0
+<U6889> \x73\xB2 |0
+<U688A> \x73\xB8 |0
+<U688B> \x73\xB0 |0
+<U688C> \x73\xB7 |0
+<U688F> \x73\xA4 |0
+<U6890> \x73\x96 |0
+<U6891> \x73\xB6 |0
+<U6892> \x73\xA6 |0
+<U6893> \x57\xAF |0
+<U6894> \x57\xBC |0
+<U6896> \x73\xAF |0
+<U6897> \x57\xB5 |0
+<U689B> \x73\xAE |0
+<U689C> \x73\x97 |0
+<U689D> \x57\xBD |0
+<U689F> \x57\xBF |0
+<U68A0> \x73\xB1 |0
+<U68A1> \x57\xC0 |0
+<U68A2> \x57\xAE |0
+<U68A3> \x73\x9E |0
+<U68A4> \x73\xB3 |0
+<U68A7> \x57\xB4 |0
+<U68A8> \x57\xBE |0
+<U68A9> \x73\xA0 |0
+<U68AA> \x73\xAA |0
+<U68AB> \x73\x9B |0
+<U68AC> \x73\x9F |0
+<U68AD> \x57\xB9 |0
+<U68AE> \x73\x9A |0
+<U68AF> \x57\xAD |0
+<U68B0> \x57\xB6 |0
+<U68B1> \x57\xB3 |0
+<U68B2> \x73\xA3 |0
+<U68B3> \x55\x43 |0
+<U68B4> \x76\xE4 |0
+<U68B5> \x57\xB0 |0
+<U68C4> \x57\xB8 |0
+<U68C6> \x76\xE7 |0
+<U68C7> \x76\xFD |0
+<U68C8> \x76\xF2 |0
+<U68C9> \x59\xFA |0
+<U68CB> \x59\xF5 |0
+<U68CC> \x76\xE1 |0
+<U68CD> \x59\xF6 |0
+<U68CE> \x76\xF1 |0
+<U68D0> \x76\xEA |0
+<U68D1> \x76\xF7 |0
+<U68D2> \x59\xF2 |0
+<U68D3> \x76\xCF |0
+<U68D4> \x76\xF9 |0
+<U68D5> \x59\xE8 |0
+<U68D6> \x76\xD7 |0
+<U68D7> \x59\xEB |0
+<U68D8> \x59\xEA |0
+<U68DA> \x59\xFB |0
+<U68DC> \x76\xD1 |0
+<U68DD> \x76\xF3 |0
+<U68DE> \x76\xF4 |0
+<U68DF> \x59\xED |0
+<U68E0> \x59\xE9 |0
+<U68E1> \x76\xDF |0
+<U68E3> \x59\xF4 |0
+<U68E4> \x76\xDA |0
+<U68E6> \x76\xF5 |0
+<U68E7> \x59\xF0 |0
+<U68E8> \x76\xED |0
+<U68E9> \x76\xFA |0
+<U68EA> \x76\xD4 |0
+<U68EB> \x76\xD9 |0
+<U68EC> \x76\xD3 |0
+<U68EE> \x59\xEF |0
+<U68EF> \x76\xE6 |0
+<U68F0> \x7A\x86 |0
+<U68F1> \x76\xD5 |0
+<U68F2> \x59\xF3 |0
+<U68F3> \x76\xDE |0
+<U68F4> \x76\xF6 |0
+<U68F5> \x59\xEE |0
+<U68F6> \x76\xDB |0
+<U68F7> \x76\xD8 |0
+<U68F8> \x76\xE9 |0
+<U68F9> \x59\xF1 |0
+<U68FA> \x59\xE7 |0
+<U68FB> \x59\xFD |0
+<U68FC> \x76\xEC |0
+<U68FD> \x76\xEB |0
+<U6904> \x76\xD0 |0
+<U6905> \x59\xEC |0
+<U6906> \x76\xF8 |0
+<U6907> \x76\xE0 |0
+<U6908> \x76\xE2 |0
+<U690A> \x76\xEF |0
+<U690B> \x76\xEE |0
+<U690C> \x76\xCE |0
+<U690D> \x59\xF7 |0
+<U690E> \x59\xF9 |0
+<U690F> \x76\xD6 |0
+<U6910> \x76\xDD |0
+<U6911> \x76\xE5 |0
+<U6912> \x59\xF8 |0
+<U6913> \x76\xDC |0
+<U6914> \x76\xE8 |0
+<U6915> \x76\xFB |0
+<U6917> \x76\xF0 |0
+<U691E> \x91\xC6 |0
+<U6925> \x76\xFC |0
+<U692A> \x76\xD2 |0
+<U692F> \x7A\x9A |0
+<U6930> \x5C\x6C |0
+<U6932> \x7A\x98 |0
+<U6933> \x7A\x83 |0
+<U6934> \x7A\x88 |0
+<U6935> \x7A\x81 |0
+<U6937> \x7A\x94 |0
+<U6938> \x7A\x72 |0
+<U6939> \x7A\x79 |0
+<U693B> \x7A\x92 |0
+<U693C> \x7A\x9C |0
+<U693D> \x7A\x84 |0
+<U693F> \x7A\x76 |0
+<U6940> \x7A\x8A |0
+<U6941> \x7A\x8F |0
+<U6942> \x7A\x7A |0
+<U6944> \x7A\x8C |0
+<U6945> \x7A\x77 |0
+<U6948> \x7A\x7E |0
+<U6949> \x7A\x7F |0
+<U694A> \x5C\x6E |0
+<U694B> \x7A\x93 |0
+<U694C> \x7A\x91 |0
+<U694E> \x7A\x73 |0
+<U694F> \x7A\x96 |0
+<U6951> \x7A\x97 |0
+<U6952> \x7A\x99 |0
+<U6953> \x5C\x72 |0
+<U6954> \x5C\x6A |0
+<U6956> \x73\x9C |0
+<U6957> \x7A\x7B |0
+<U6958> \x7A\x8E |0
+<U6959> \x7A\x7C |0
+<U695A> \x5C\x67 |0
+<U695B> \x5C\x77 |0
+<U695C> \x7A\x95 |0
+<U695D> \x5C\x75 |0
+<U695E> \x5C\x71 |0
+<U695F> \x7A\x71 |0
+<U6960> \x5C\x69 |0
+<U6962> \x7A\x74 |0
+<U6963> \x5C\x76 |0
+<U6965> \x7A\x85 |0
+<U6966> \x7A\x70 |0
+<U6968> \x5C\x6F |0
+<U6969> \x7A\x89 |0
+<U696A> \x7A\x78 |0
+<U696B> \x5C\x70 |0
+<U696C> \x7A\x82 |0
+<U696D> \x5C\x66 |0
+<U696E> \x59\xFC |0
+<U696F> \x7A\x8B |0
+<U6970> \x76\xE3 |0
+<U6971> \x7A\x75 |0
+<U6974> \x7A\x90 |0
+<U6975> \x5C\x6B |0
+<U6976> \x7A\x8D |0
+<U6977> \x5C\x68 |0
+<U6978> \x7A\x87 |0
+<U6979> \x5C\x73 |0
+<U697A> \x7A\x7D |0
+<U697B> \x7A\x9B |0
+<U6982> \x5C\x6D |0
+<U6983> \x7B\x4E |0
+<U6986> \x5C\x74 |0
+<U698D> \x7D\xF1 |0
+<U698E> \x7D\xEF |0
+<U6990> \x7E\x48 |0
+<U6991> \x7D\xED |0
+<U6993> \x7E\x42 |0
+<U6994> \x5C\x65 |0
+<U6995> \x5E\xA7 |0
+<U6996> \x7D\xE9 |0
+<U6997> \x7E\x47 |0
+<U6999> \x7D\xEE |0
+<U699A> \x7D\xFC |0
+<U699B> \x5E\xAC |0
+<U699C> \x5E\xA5 |0
+<U699E> \x7E\x45 |0
+<U69A0> \x7D\xE7 |0
+<U69A1> \x7E\x44 |0
+<U69A3> \x5E\xB7 |0
+<U69A4> \x7D\xF8 |0
+<U69A5> \x7E\x4B |0
+<U69A6> \x5E\xB5 |0
+<U69A7> \x7D\xF0 |0
+<U69A8> \x5E\xA6 |0
+<U69A9> \x7D\xF2 |0
+<U69AA> \x7E\x43 |0
+<U69AB> \x5E\xAF |0
+<U69AC> \x7D\xEB |0
+<U69AD> \x5E\xB3 |0
+<U69AE> \x5E\xA9 |0
+<U69AF> \x7D\xF4 |0
+<U69B0> \x7D\xEA |0
+<U69B1> \x7D\xE4 |0
+<U69B3> \x7E\x41 |0
+<U69B4> \x5E\xB0 |0
+<U69B5> \x7E\x4A |0
+<U69B6> \x7D\xE5 |0
+<U69B7> \x5E\xAD |0
+<U69B9> \x7D\xFA |0
+<U69BB> \x5E\xAE |0
+<U69BC> \x7D\xEC |0
+<U69BD> \x7D\xF7 |0
+<U69BE> \x7D\xF3 |0
+<U69BF> \x7D\xF5 |0
+<U69C1> \x5E\xA8 |0
+<U69C2> \x7E\x49 |0
+<U69C3> \x5E\xB6 |0
+<U69C4> \x7D\xF6 |0
+<U69C6> \x7E\x4C |0
+<U69C9> \x7D\xE6 |0
+<U69CA> \x7D\xFB |0
+<U69CB> \x5E\xAB |0
+<U69CC> \x5E\xB4 |0
+<U69CD> \x5E\xB2 |0
+<U69CE> \x7D\xE8 |0
+<U69CF> \x7D\xFD |0
+<U69D0> \x5E\xB1 |0
+<U69D3> \x5E\xAA |0
+<U69D4> \x7D\xF9 |0
+<U69D9> \x7E\x46 |0
+<U69E2> \x80\xFD |0
+<U69E4> \x80\xF9 |0
+<U69E5> \x80\xF5 |0
+<U69E6> \x81\x4C |0
+<U69E7> \x81\x49 |0
+<U69E8> \x60\xB5 |0
+<U69EB> \x81\x50 |0
+<U69EC> \x80\xFC |0
+<U69ED> \x60\xC0 |0
+<U69EE> \x81\x46 |0
+<U69F1> \x80\xF8 |0
+<U69F2> \x81\x45 |0
+<U69F3> \x60\xBD |0
+<U69F4> \x81\x59 |0
+<U69F6> \x81\x56 |0
+<U69F7> \x81\x48 |0
+<U69F8> \x80\xF6 |0
+<U69FB> \x81\x4D |0
+<U69FC> \x81\x4F |0
+<U69FD> \x60\xB9 |0
+<U69FE> \x81\x43 |0
+<U69FF> \x80\xFB |0
+<U6A00> \x80\xF2 |0
+<U6A01> \x60\xB6 |0
+<U6A02> \x60\xBE |0
+<U6A04> \x81\x52 |0
+<U6A05> \x60\xBF |0
+<U6A06> \x80\xF3 |0
+<U6A07> \x81\x58 |0
+<U6A08> \x81\x4B |0
+<U6A09> \x81\x51 |0
+<U6A0A> \x60\xBC |0
+<U6A0D> \x81\x4E |0
+<U6A0F> \x81\x55 |0
+<U6A11> \x60\xC1 |0
+<U6A13> \x60\xBB |0
+<U6A14> \x81\x47 |0
+<U6A15> \x80\xF7 |0
+<U6A16> \x81\x5A |0
+<U6A17> \x80\xF4 |0
+<U6A18> \x81\x53 |0
+<U6A19> \x60\xB8 |0
+<U6A1B> \x81\x41 |0
+<U6A1D> \x81\x42 |0
+<U6A1E> \x60\xB7 |0
+<U6A1F> \x60\xB4 |0
+<U6A20> \x80\xFA |0
+<U6A21> \x60\xBA |0
+<U6A23> \x60\xB3 |0
+<U6A25> \x81\x54 |0
+<U6A26> \x81\x57 |0
+<U6A27> \x81\x44 |0
+<U6A28> \x84\x75 |0
+<U6A32> \x84\x6D |0
+<U6A34> \x84\x69 |0
+<U6A35> \x62\xA0 |0
+<U6A38> \x62\x95 |0
+<U6A39> \x62\x9A |0
+<U6A3A> \x62\x96 |0
+<U6A3B> \x84\x77 |0
+<U6A3C> \x84\x83 |0
+<U6A3D> \x62\x94 |0
+<U6A3E> \x84\x6F |0
+<U6A3F> \x84\x78 |0
+<U6A40> \x81\x4A |0
+<U6A41> \x84\x79 |0
+<U6A44> \x62\x9B |0
+<U6A46> \x84\x89 |0
+<U6A47> \x62\x9F |0
+<U6A48> \x62\xA2 |0
+<U6A49> \x84\x6B |0
+<U6A4B> \x62\x9E |0
+<U6A4D> \x84\x87 |0
+<U6A4E> \x84\x88 |0
+<U6A4F> \x84\x7D |0
+<U6A50> \x84\x7C |0
+<U6A51> \x84\x74 |0
+<U6A54> \x84\x7E |0
+<U6A55> \x84\x86 |0
+<U6A56> \x84\x85 |0
+<U6A58> \x62\x99 |0
+<U6A59> \x62\x97 |0
+<U6A5A> \x84\x76 |0
+<U6A5B> \x84\x73 |0
+<U6A5D> \x84\x70 |0
+<U6A5E> \x84\x84 |0
+<U6A5F> \x62\xA1 |0
+<U6A60> \x84\x82 |0
+<U6A61> \x62\x9D |0
+<U6A62> \x62\x9C |0
+<U6A64> \x84\x7B |0
+<U6A66> \x84\x6A |0
+<U6A67> \x84\x6C |0
+<U6A68> \x84\x6E |0
+<U6A69> \x84\x81 |0
+<U6A6A> \x84\x7A |0
+<U6A6B> \x62\x98 |0
+<U6A6D> \x84\x71 |0
+<U6A6F> \x84\x7F |0
+<U6A76> \x84\x72 |0
+<U6A7E> \x63\xF7 |0
+<U6A7F> \x87\x52 |0
+<U6A80> \x63\xF0 |0
+<U6A81> \x87\x43 |0
+<U6A83> \x87\x4E |0
+<U6A84> \x63\xF2 |0
+<U6A85> \x87\x55 |0
+<U6A87> \x87\x4A |0
+<U6A89> \x87\x45 |0
+<U6A8C> \x87\x56 |0
+<U6A8D> \x87\x41 |0
+<U6A8E> \x87\x4C |0
+<U6A90> \x63\xF9 |0
+<U6A91> \x87\x51 |0
+<U6A92> \x87\x57 |0
+<U6A93> \x87\x4B |0
+<U6A94> \x63\xF1 |0
+<U6A95> \x87\x4D |0
+<U6A96> \x87\x42 |0
+<U6A97> \x63\xF8 |0
+<U6A9A> \x87\x54 |0
+<U6A9B> \x87\x47 |0
+<U6A9C> \x63\xF4 |0
+<U6A9E> \x87\x49 |0
+<U6A9F> \x87\x46 |0
+<U6AA0> \x63\xFA |0
+<U6AA1> \x87\x48 |0
+<U6AA2> \x63\xF3 |0
+<U6AA3> \x63\xF6 |0
+<U6AA4> \x87\x50 |0
+<U6AA5> \x87\x44 |0
+<U6AA6> \x87\x53 |0
+<U6AA8> \x87\x4F |0
+<U6AAC> \x65\x6E |0
+<U6AAD> \x89\x95 |0
+<U6AAE> \x65\x73 |0
+<U6AAF> \x65\x74 |0
+<U6AB3> \x65\x6D |0
+<U6AB4> \x89\x94 |0
+<U6AB6> \x89\x91 |0
+<U6AB7> \x89\x92 |0
+<U6AB8> \x65\x71 |0
+<U6AB9> \x89\x8C |0
+<U6ABA> \x89\x90 |0
+<U6ABB> \x65\x70 |0
+<U6ABD> \x89\x8D |0
+<U6AC2> \x65\x72 |0
+<U6AC3> \x65\x6F |0
+<U6AC5> \x89\x8B |0
+<U6AC6> \x89\x8F |0
+<U6AC7> \x89\x93 |0
+<U6ACB> \x8B\x7F |0
+<U6ACC> \x8B\x7C |0
+<U6ACD> \x8B\x86 |0
+<U6ACF> \x8B\x85 |0
+<U6AD0> \x8B\x83 |0
+<U6AD1> \x8B\x7D |0
+<U6AD3> \x66\x5E |0
+<U6AD9> \x8B\x7E |0
+<U6ADA> \x66\x5D |0
+<U6ADB> \x63\xF5 |0
+<U6ADC> \x8B\x82 |0
+<U6ADD> \x66\x5C |0
+<U6ADE> \x8B\x87 |0
+<U6ADF> \x8B\x81 |0
+<U6AE0> \x8B\x7B |0
+<U6AE1> \x89\x8E |0
+<U6AE5> \x66\x5B |0
+<U6AE7> \x8B\x7A |0
+<U6AE8> \x8D\x46 |0
+<U6AEA> \x8D\x45 |0
+<U6AEB> \x8B\x84 |0
+<U6AEC> \x66\xF2 |0
+<U6AEE> \x8D\x49 |0
+<U6AEF> \x8D\x4A |0
+<U6AF0> \x8D\x44 |0
+<U6AF1> \x8D\x48 |0
+<U6AF3> \x8D\x43 |0
+<U6AF8> \x8E\x81 |0
+<U6AF9> \x8D\x47 |0
+<U6AFA> \x67\x93 |0
+<U6AFB> \x67\x91 |0
+<U6AFC> \x8E\x7E |0
+<U6B00> \x8E\x82 |0
+<U6B02> \x8E\x7D |0
+<U6B03> \x8E\x7F |0
+<U6B04> \x67\x92 |0
+<U6B08> \x8F\x75 |0
+<U6B09> \x8F\x76 |0
+<U6B0A> \x67\xE1 |0
+<U6B0B> \x8F\x74 |0
+<U6B0F> \x90\x53 |0
+<U6B10> \x68\x5B |0
+<U6B11> \x90\x51 |0
+<U6B12> \x90\x52 |0
+<U6B13> \x90\xBB |0
+<U6B16> \x68\xA2 |0
+<U6B17> \x91\x45 |0
+<U6B18> \x91\x43 |0
+<U6B19> \x91\x44 |0
+<U6B1A> \x91\x46 |0
+<U6B1E> \x91\xAB |0
+<U6B20> \x48\x8C |3
+<U6B20> \x4C\xCD |0
+<U6B21> \x4E\x59 |0
+<U6B23> \x51\x5C |0
+<U6B25> \x6C\x6B |0
+<U6B28> \x6E\x67 |0
+<U6B2C> \x70\x99 |0
+<U6B2D> \x70\x9B |0
+<U6B2F> \x70\x9A |0
+<U6B31> \x70\x9C |0
+<U6B32> \x57\xC2 |0
+<U6B33> \x73\xBB |0
+<U6B34> \x70\x9D |0
+<U6B36> \x73\xBA |0
+<U6B37> \x73\xBC |0
+<U6B38> \x73\xBD |0
+<U6B39> \x77\x41 |0
+<U6B3A> \x5A\x42 |0
+<U6B3B> \x77\x42 |0
+<U6B3C> \x77\x44 |0
+<U6B3D> \x5A\x43 |0
+<U6B3E> \x5A\x41 |0
+<U6B3F> \x77\x43 |0
+<U6B41> \x7A\xA2 |0
+<U6B42> \x7A\xA0 |0
+<U6B43> \x7A\x9F |0
+<U6B45> \x7A\x9E |0
+<U6B46> \x7A\x9D |0
+<U6B47> \x5C\x78 |0
+<U6B48> \x7A\xA1 |0
+<U6B49> \x5E\xB8 |0
+<U6B4A> \x7E\x4D |0
+<U6B4B> \x7E\x4F |0
+<U6B4C> \x5E\xB9 |0
+<U6B4D> \x7E\x4E |0
+<U6B4E> \x60\xC3 |0
+<U6B50> \x60\xC2 |0
+<U6B51> \x81\x5B |0
+<U6B54> \x84\x8B |0
+<U6B55> \x84\x8A |0
+<U6B56> \x84\x8C |0
+<U6B59> \x62\xA3 |0
+<U6B5B> \x87\x58 |0
+<U6B5C> \x63\xFB |0
+<U6B5E> \x89\x96 |0
+<U6B5F> \x65\x75 |0
+<U6B60> \x8B\x88 |0
+<U6B61> \x67\xE2 |0
+<U6B62> \x48\x8D |3
+<U6B62> \x4C\xCE |0
+<U6B63> \x4D\x7F |0
+<U6B64> \x4E\x5A |0
+<U6B65> \x4F\x84 |0
+<U6B66> \x51\x5D |0
+<U6B67> \x51\x5E |0
+<U6B6A> \x52\xF0 |0
+<U6B6D> \x70\x9E |0
+<U6B72> \x5C\x79 |0
+<U6B76> \x81\xDA |0
+<U6B77> \x62\xA4 |0
+<U6B78> \x65\x76 |0
+<U6B79> \x48\x8E |3
+<U6B79> \x4C\xCF |0
+<U6B7B> \x4E\x5B |0
+<U6B7E> \x6C\x6D |0
+<U6B7F> \x51\x5F |0
+<U6B80> \x6C\x6C |0
+<U6B82> \x6E\x68 |0
+<U6B83> \x52\xF1 |0
+<U6B84> \x6E\x69 |0
+<U6B86> \x52\xF2 |0
+<U6B88> \x70\xA0 |0
+<U6B89> \x55\x53 |0
+<U6B8A> \x55\x52 |0
+<U6B8C> \x73\xC2 |0
+<U6B8D> \x73\xC0 |0
+<U6B8E> \x73\xC1 |0
+<U6B8F> \x73\xBF |0
+<U6B91> \x73\xBE |0
+<U6B94> \x77\x45 |0
+<U6B95> \x77\x48 |0
+<U6B96> \x5A\x45 |0
+<U6B97> \x77\x46 |0
+<U6B98> \x5A\x44 |0
+<U6B99> \x77\x47 |0
+<U6B9B> \x7A\xA3 |0
+<U6B9E> \x7E\x50 |0
+<U6B9F> \x7E\x51 |0
+<U6BA0> \x7E\x52 |0
+<U6BA2> \x81\x5E |0
+<U6BA3> \x81\x5D |0
+<U6BA4> \x60\xC4 |0
+<U6BA5> \x81\x5C |0
+<U6BA6> \x81\x5F |0
+<U6BA7> \x84\x8D |0
+<U6BAA> \x84\x8E |0
+<U6BAB> \x84\x8F |0
+<U6BAD> \x87\x59 |0
+<U6BAE> \x63\xFC |0
+<U6BAF> \x65\x77 |0
+<U6BB0> \x8B\x89 |0
+<U6BB2> \x67\x94 |0
+<U6BB3> \x48\x8F |3
+<U6BB3> \x69\x60 |0
+<U6BB5> \x52\xF3 |0
+<U6BB6> \x6E\x6A |0
+<U6BB7> \x55\x54 |0
+<U6BBA> \x57\xC3 |0
+<U6BBC> \x5A\x46 |0
+<U6BBD> \x77\x49 |0
+<U6BBF> \x5C\x7B |0
+<U6BC0> \x5C\x7A |0
+<U6BC3> \x7E\x53 |0
+<U6BC4> \x7E\x54 |0
+<U6BC5> \x60\xC5 |0
+<U6BC6> \x60\xC6 |0
+<U6BC7> \x84\x91 |0
+<U6BC8> \x84\x90 |0
+<U6BC9> \x89\x97 |0
+<U6BCA> \x90\x54 |0
+<U6BCB> \x48\x90 |3
+<U6BCB> \x4C\xD0 |0
+<U6BCC> \x69\x61 |0
+<U6BCD> \x4D\x81 |0
+<U6BCF> \x4F\x85 |0
+<U6BD0> \x6A\xC8 |0
+<U6BD2> \x52\xF4 |0
+<U6BD3> \x5C\x7C |0
+<U6BD4> \x48\x91 |3
+<U6BD4> \x4C\xD1 |0
+<U6BD6> \x6E\x6B |0
+<U6BD7> \x52\xF5 |0
+<U6BD8> \x6E\x6C |0
+<U6BDA> \x63\xFD |0
+<U6BDB> \x48\x92 |3
+<U6BDB> \x4C\xD2 |0
+<U6BDE> \x6C\x6E |0
+<U6BE0> \x6E\x6D |0
+<U6BE2> \x70\xA5 |0
+<U6BE3> \x70\xA4 |0
+<U6BE4> \x70\xA2 |0
+<U6BE6> \x70\xA1 |0
+<U6BE7> \x70\xA6 |0
+<U6BE8> \x70\xA3 |0
+<U6BEB> \x57\xC4 |0
+<U6BEC> \x57\xC5 |0
+<U6BEF> \x5A\x47 |0
+<U6BF0> \x77\x4A |0
+<U6BF2> \x77\x4B |0
+<U6BF3> \x77\x4C |0
+<U6BF7> \x7A\xA8 |0
+<U6BF8> \x7A\xA9 |0
+<U6BF9> \x7A\xA7 |0
+<U6BFB> \x7A\xA5 |0
+<U6BFC> \x7A\xA6 |0
+<U6BFD> \x5C\x7D |0
+<U6BFE> \x7E\x55 |0
+<U6BFF> \x81\x62 |0
+<U6C00> \x81\x61 |0
+<U6C01> \x81\x60 |0
+<U6C02> \x81\x63 |0
+<U6C03> \x84\x93 |0
+<U6C04> \x84\x92 |0
+<U6C05> \x62\xA5 |0
+<U6C06> \x84\x94 |0
+<U6C08> \x64\x41 |0
+<U6C09> \x87\x5A |0
+<U6C0B> \x89\x98 |0
+<U6C0C> \x8B\x8A |0
+<U6C0D> \x8F\x77 |0
+<U6C0F> \x48\x93 |3
+<U6C0F> \x4C\xD3 |0
+<U6C10> \x4D\x83 |0
+<U6C11> \x4D\x82 |0
+<U6C13> \x51\x60 |0
+<U6C14> \x48\x94 |3
+<U6C14> \x69\x62 |0
+<U6C15> \x69\x7F |0
+<U6C16> \x4E\x5C |0
+<U6C18> \x69\xD7 |0
+<U6C19> \x6A\xC9 |0
+<U6C1A> \x6A\xCA |0
+<U6C1B> \x51\x61 |0
+<U6C1D> \x6C\x6F |0
+<U6C1F> \x52\xF6 |0
+<U6C20> \x6E\x6E |0
+<U6C21> \x6E\x6F |0
+<U6C23> \x55\x55 |0
+<U6C24> \x55\x59 |0
+<U6C25> \x70\xA7 |0
+<U6C26> \x55\x58 |0
+<U6C27> \x55\x56 |0
+<U6C28> \x55\x57 |0
+<U6C2A> \x73\xC3 |0
+<U6C2B> \x57\xC6 |0
+<U6C2C> \x5A\x4A |0
+<U6C2E> \x5A\x48 |0
+<U6C2F> \x5A\x49 |0
+<U6C30> \x77\x4D |0
+<U6C33> \x5E\xBA |0
+<U6C34> \x48\x95 |3
+<U6C34> \x4C\xD4 |0
+<U6C36> \x69\x81 |0
+<U6C38> \x4D\x84 |0
+<U6C3B> \x69\x84 |0
+<U6C3E> \x4D\x87 |0
+<U6C3F> \x69\x83 |0
+<U6C40> \x4D\x86 |0
+<U6C41> \x4D\x85 |0
+<U6C42> \x4F\x86 |0
+<U6C43> \x69\x82 |0
+<U6C46> \x69\xD8 |0
+<U6C4A> \x69\xDC |0
+<U6C4B> \x69\xDE |0
+<U6C4C> \x69\xDF |0
+<U6C4D> \x4E\x66 |0
+<U6C4E> \x4E\x67 |0
+<U6C4F> \x69\xDB |0
+<U6C50> \x4E\x62 |0
+<U6C52> \x69\xD9 |0
+<U6C54> \x69\xDD |0
+<U6C55> \x4E\x63 |0
+<U6C57> \x4E\x5E |0
+<U6C59> \x4E\x5F |0
+<U6C5B> \x4E\x65 |0
+<U6C5C> \x69\xDA |0
+<U6C5D> \x4E\x5D |0
+<U6C5E> \x4F\x87 |0
+<U6C5F> \x4E\x60 |0
+<U6C60> \x4E\x61 |0
+<U6C61> \x4E\x64 |0
+<U6C65> \x6A\xDB |0
+<U6C66> \x6A\xD9 |0
+<U6C67> \x6A\xCC |0
+<U6C68> \x4F\x93 |0
+<U6C69> \x6A\xD3 |0
+<U6C6A> \x4F\x8E |0
+<U6C6B> \x6A\xCD |0
+<U6C6D> \x6A\xD5 |0
+<U6C6F> \x6A\xD2 |0
+<U6C70> \x4F\x91 |0
+<U6C71> \x6A\xD1 |0
+<U6C72> \x4F\x98 |0
+<U6C73> \x6A\xDA |0
+<U6C74> \x4F\x9A |0
+<U6C76> \x4F\x9C |0
+<U6C78> \x6A\xCB |0
+<U6C7A> \x4F\x8F |0
+<U6C7B> \x6A\xDC |0
+<U6C7D> \x4F\x96 |0
+<U6C7E> \x4F\x99 |0
+<U6C80> \x6C\x87 |0
+<U6C81> \x4F\x89 |0
+<U6C82> \x4F\xA0 |0
+<U6C83> \x4F\x97 |0
+<U6C84> \x6A\xCE |0
+<U6C85> \x4F\x8C |0
+<U6C86> \x4F\x9B |0
+<U6C87> \x6A\xD6 |0
+<U6C88> \x4F\x8A |0
+<U6C89> \x4F\x8B |0
+<U6C8A> \x6C\x85 |0
+<U6C8B> \x6A\xCF |0
+<U6C8C> \x4F\x92 |0
+<U6C8D> \x4F\x9D |0
+<U6C8E> \x6A\xDD |0
+<U6C8F> \x6A\xD0 |0
+<U6C90> \x4F\x90 |0
+<U6C92> \x4F\x95 |0
+<U6C93> \x6C\x70 |0
+<U6C94> \x4F\x9E |0
+<U6C95> \x6A\xD7 |0
+<U6C96> \x4F\x94 |0
+<U6C98> \x4F\x9F |0
+<U6C99> \x4F\x88 |0
+<U6C9A> \x6A\xD4 |0
+<U6C9B> \x4F\x8D |0
+<U6C9C> \x6A\xD8 |0
+<U6C9D> \x6C\x86 |0
+<U6CAB> \x51\x6D |0
+<U6CAC> \x51\x7D |0
+<U6CAD> \x6C\x77 |0
+<U6CAE> \x51\x74 |0
+<U6CB0> \x6C\x8D |0
+<U6CB1> \x51\x65 |0
+<U6CB3> \x51\x68 |0
+<U6CB4> \x6C\x84 |0
+<U6CB6> \x6C\x75 |0
+<U6CB7> \x6C\x79 |0
+<U6CB8> \x51\x70 |0
+<U6CB9> \x51\x72 |0
+<U6CBA> \x6C\x7C |0
+<U6CBB> \x51\x79 |0
+<U6CBC> \x51\x6B |0
+<U6CBD> \x51\x69 |0
+<U6CBE> \x51\x6A |0
+<U6CBF> \x51\x78 |0
+<U6CC0> \x6C\x89 |0
+<U6CC1> \x51\x73 |0
+<U6CC2> \x6C\x7B |0
+<U6CC3> \x6C\x7D |0
+<U6CC4> \x51\x71 |0
+<U6CC5> \x51\x76 |0
+<U6CC6> \x6C\x7E |0
+<U6CC7> \x6C\x8C |0
+<U6CC9> \x52\xF7 |0
+<U6CCA> \x51\x7C |0
+<U6CCC> \x51\x66 |0
+<U6CCD> \x6C\x8B |0
+<U6CCF> \x6C\x8F |0
+<U6CD0> \x6C\x7A |0
+<U6CD1> \x6C\x91 |0
+<U6CD2> \x6C\x82 |0
+<U6CD3> \x51\x6F |0
+<U6CD4> \x6C\x76 |0
+<U6CD5> \x51\x6E |0
+<U6CD6> \x51\x81 |0
+<U6CD7> \x51\x75 |0
+<U6CD9> \x6C\x74 |0
+<U6CDA> \x6E\x78 |0
+<U6CDB> \x51\x7B |0
+<U6CDC> \x51\x7F |0
+<U6CDD> \x6C\x83 |0
+<U6CDE> \x6C\x88 |0
+<U6CE0> \x51\x82 |0
+<U6CE1> \x51\x7A |0
+<U6CE2> \x51\x6C |0
+<U6CE3> \x51\x62 |0
+<U6CE5> \x51\x67 |0
+<U6CE7> \x6C\x78 |0
+<U6CE8> \x51\x63 |0
+<U6CE9> \x6C\x90 |0
+<U6CEB> \x6C\x72 |0
+<U6CEC> \x6C\x71 |0
+<U6CED> \x6C\x7F |0
+<U6CEE> \x6C\x73 |0
+<U6CEF> \x51\x7E |0
+<U6CF0> \x55\x5A |0
+<U6CF1> \x51\x77 |0
+<U6CF2> \x6C\x81 |0
+<U6CF3> \x51\x64 |0
+<U6CF5> \x53\x49 |0
+<U6CF9> \x6C\x8E |0
+<U6D00> \x6E\x7F |0
+<U6D01> \x6E\x83 |0
+<U6D03> \x6E\x86 |0
+<U6D04> \x6E\x7A |0
+<U6D07> \x6E\x89 |0
+<U6D08> \x6E\x8C |0
+<U6D09> \x6E\x8E |0
+<U6D0A> \x6E\x77 |0
+<U6D0B> \x52\xF8 |0
+<U6D0C> \x52\xFD |0
+<U6D0D> \x70\xAC |0
+<U6D0E> \x53\x50 |0
+<U6D0F> \x6E\x87 |0
+<U6D10> \x6E\x8F |0
+<U6D11> \x6E\x7E |0
+<U6D12> \x6E\x76 |0
+<U6D16> \x70\xC7 |0
+<U6D17> \x53\x43 |0
+<U6D18> \x6E\x84 |0
+<U6D19> \x6E\x7B |0
+<U6D1A> \x6E\x7D |0
+<U6D1B> \x53\x48 |0
+<U6D1D> \x6E\x81 |0
+<U6D1E> \x53\x42 |0
+<U6D1F> \x6E\x73 |0
+<U6D20> \x6E\x8A |0
+<U6D22> \x6E\x8D |0
+<U6D25> \x52\xFC |0
+<U6D27> \x53\x4B |0
+<U6D28> \x6E\x70 |0
+<U6D29> \x53\x4D |0
+<U6D2A> \x52\xFA |0
+<U6D2B> \x53\x51 |0
+<U6D2C> \x6E\x8B |0
+<U6D2D> \x6E\x72 |0
+<U6D2E> \x53\x4E |0
+<U6D2F> \x70\xC1 |0
+<U6D30> \x6C\x8A |0
+<U6D31> \x53\x41 |0
+<U6D32> \x52\xF9 |0
+<U6D33> \x6E\x79 |0
+<U6D34> \x6E\x71 |0
+<U6D35> \x53\x4F |0
+<U6D36> \x53\x47 |0
+<U6D37> \x6E\x85 |0
+<U6D38> \x53\x4C |0
+<U6D39> \x53\x4A |0
+<U6D3A> \x6E\x7C |0
+<U6D3B> \x53\x44 |0
+<U6D3C> \x6E\x74 |0
+<U6D3D> \x53\x45 |0
+<U6D3E> \x53\x46 |0
+<U6D3F> \x6E\x75 |0
+<U6D40> \x6E\x88 |0
+<U6D41> \x52\xFB |0
+<U6D42> \x6E\x82 |0
+<U6D58> \x70\xAF |0
+<U6D59> \x55\x62 |0
+<U6D5A> \x55\x67 |0
+<U6D5E> \x70\xB8 |0
+<U6D5F> \x70\xBE |0
+<U6D60> \x70\xBA |0
+<U6D61> \x70\xAD |0
+<U6D62> \x70\xB0 |0
+<U6D63> \x70\xA9 |0
+<U6D64> \x70\xAA |0
+<U6D65> \x55\x6E |0
+<U6D66> \x55\x5F |0
+<U6D67> \x70\xB9 |0
+<U6D68> \x70\xC2 |0
+<U6D69> \x55\x69 |0
+<U6D6A> \x55\x5B |0
+<U6D6C> \x55\x64 |0
+<U6D6D> \x70\xB1 |0
+<U6D6E> \x55\x66 |0
+<U6D6F> \x70\xB2 |0
+<U6D70> \x70\xBC |0
+<U6D74> \x55\x68 |0
+<U6D75> \x70\xCB |0
+<U6D76> \x70\xAB |0
+<U6D77> \x55\x61 |0
+<U6D78> \x55\x60 |0
+<U6D79> \x55\x6C |0
+<U6D7A> \x70\xA8 |0
+<U6D7B> \x70\xC9 |0
+<U6D7C> \x70\xBD |0
+<U6D7D> \x70\xCA |0
+<U6D7E> \x70\xC4 |0
+<U6D7F> \x70\xB6 |0
+<U6D80> \x70\xC5 |0
+<U6D82> \x70\xBF |0
+<U6D83> \x70\xC8 |0
+<U6D84> \x70\xC6 |0
+<U6D85> \x55\x6D |0
+<U6D86> \x70\xB7 |0
+<U6D87> \x55\x5E |0
+<U6D88> \x55\x5D |0
+<U6D89> \x55\x65 |0
+<U6D8A> \x55\x6B |0
+<U6D8B> \x70\xC3 |0
+<U6D8C> \x55\x6A |0
+<U6D8D> \x70\xB4 |0
+<U6D8E> \x57\xC7 |0
+<U6D90> \x70\xCC |0
+<U6D91> \x70\xB3 |0
+<U6D92> \x70\xAE |0
+<U6D93> \x55\x63 |0
+<U6D94> \x55\x6F |0
+<U6D95> \x55\x5C |0
+<U6D97> \x70\xBB |0
+<U6D98> \x70\xC0 |0
+<U6DAA> \x57\xE9 |0
+<U6DAB> \x73\xC5 |0
+<U6DAC> \x73\xC9 |0
+<U6DAE> \x57\xD6 |0
+<U6DAF> \x57\xD4 |0
+<U6DB2> \x57\xCB |0
+<U6DB3> \x73\xC7 |0
+<U6DB4> \x73\xC6 |0
+<U6DB5> \x57\xDF |0
+<U6DB7> \x73\xCC |0
+<U6DB8> \x57\xD9 |0
+<U6DBA> \x73\xDE |0
+<U6DBB> \x73\xEA |0
+<U6DBC> \x57\xC8 |0
+<U6DBD> \x73\xDB |0
+<U6DBE> \x73\xD4 |0
+<U6DBF> \x57\xEB |0
+<U6DC0> \x73\xC4 |0
+<U6DC2> \x73\xE0 |0
+<U6DC4> \x57\xE8 |0
+<U6DC5> \x57\xDC |0
+<U6DC6> \x57\xE7 |0
+<U6DC7> \x57\xD2 |0
+<U6DC8> \x73\xD0 |0
+<U6DC9> \x73\xE2 |0
+<U6DCA> \x73\xDA |0
+<U6DCB> \x57\xD3 |0
+<U6DCC> \x57\xCD |0
+<U6DCD> \x73\xE8 |0
+<U6DCF> \x73\xE1 |0
+<U6DD0> \x73\xE3 |0
+<U6DD1> \x57\xD5 |0
+<U6DD2> \x57\xDD |0
+<U6DD3> \x73\xE5 |0
+<U6DD4> \x73\xCE |0
+<U6DD5> \x73\xDF |0
+<U6DD6> \x73\xD3 |0
+<U6DD7> \x73\xE7 |0
+<U6DD8> \x57\xE2 |0
+<U6DD9> \x57\xCA |0
+<U6DDA> \x57\xE0 |0
+<U6DDB> \x73\xD8 |0
+<U6DDC> \x73\xD6 |0
+<U6DDD> \x73\xD7 |0
+<U6DDE> \x57\xD7 |0
+<U6DDF> \x73\xD2 |0
+<U6DE0> \x73\xD1 |0
+<U6DE1> \x57\xCC |0
+<U6DE2> \x73\xCB |0
+<U6DE3> \x73\xE9 |0
+<U6DE4> \x57\xCE |0
+<U6DE5> \x73\xD5 |0
+<U6DE6> \x57\xEC |0
+<U6DE8> \x57\xE6 |0
+<U6DE9> \x73\xCA |0
+<U6DEA> \x57\xE3 |0
+<U6DEB> \x57\xE1 |0
+<U6DEC> \x57\xEA |0
+<U6DED> \x73\xDC |0
+<U6DEE> \x57\xE5 |0
+<U6DEF> \x70\xB5 |0
+<U6DF0> \x73\xDD |0
+<U6DF1> \x57\xE4 |0
+<U6DF2> \x73\xE4 |0
+<U6DF3> \x57\xC9 |0
+<U6DF4> \x73\xD9 |0
+<U6DF5> \x57\xDB |0
+<U6DF6> \x73\xCD |0
+<U6DF7> \x57\xDA |0
+<U6DF9> \x57\xD8 |0
+<U6DFA> \x57\xD0 |0
+<U6DFB> \x57\xCF |0
+<U6DFC> \x77\x4E |0
+<U6DFD> \x73\xE6 |0
+<U6E00> \x73\xCF |0
+<U6E03> \x77\x63 |0
+<U6E05> \x57\xD1 |0
+<U6E19> \x5A\x67 |0
+<U6E1A> \x57\xDE |0
+<U6E1B> \x5A\x55 |0
+<U6E1C> \x77\x5D |0
+<U6E1D> \x5A\x63 |0
+<U6E1F> \x77\x51 |0
+<U6E20> \x5A\x52 |0
+<U6E21> \x5A\x4E |0
+<U6E22> \x77\x6F |0
+<U6E23> \x5A\x54 |0
+<U6E24> \x5A\x58 |0
+<U6E25> \x5A\x53 |0
+<U6E26> \x5A\x5C |0
+<U6E27> \x77\x73 |0
+<U6E28> \x77\x6A |0
+<U6E2B> \x77\x58 |0
+<U6E2C> \x5A\x61 |0
+<U6E2D> \x5A\x5B |0
+<U6E2E> \x77\x64 |0
+<U6E2F> \x5A\x4B |0
+<U6E30> \x77\x70 |0
+<U6E31> \x77\x69 |0
+<U6E32> \x5A\x4F |0
+<U6E33> \x77\x5E |0
+<U6E34> \x5A\x5E |0
+<U6E35> \x77\x7B |0
+<U6E36> \x77\x7C |0
+<U6E38> \x5A\x4C |0
+<U6E39> \x77\x6E |0
+<U6E3A> \x5A\x60 |0
+<U6E3B> \x77\x62 |0
+<U6E3C> \x77\x54 |0
+<U6E3D> \x77\x55 |0
+<U6E3E> \x5A\x64 |0
+<U6E3F> \x77\x59 |0
+<U6E40> \x77\x60 |0
+<U6E41> \x77\x5A |0
+<U6E43> \x5A\x62 |0
+<U6E44> \x5A\x6A |0
+<U6E45> \x77\x56 |0
+<U6E46> \x77\x4F |0
+<U6E47> \x77\x50 |0
+<U6E49> \x77\x52 |0
+<U6E4A> \x5A\x51 |0
+<U6E4B> \x77\x5F |0
+<U6E4D> \x5A\x5F |0
+<U6E4E> \x5A\x68 |0
+<U6E51> \x77\x61 |0
+<U6E52> \x77\x79 |0
+<U6E53> \x77\x71 |0
+<U6E54> \x5A\x4D |0
+<U6E55> \x77\x77 |0
+<U6E56> \x5A\x59 |0
+<U6E58> \x5A\x57 |0
+<U6E5A> \x77\x7D |0
+<U6E5B> \x5A\x56 |0
+<U6E5C> \x77\x67 |0
+<U6E5D> \x77\x5B |0
+<U6E5E> \x77\x65 |0
+<U6E5F> \x5A\x6D |0
+<U6E60> \x77\x6B |0
+<U6E61> \x77\x68 |0
+<U6E62> \x77\x57 |0
+<U6E63> \x5A\x69 |0
+<U6E64> \x77\x75 |0
+<U6E65> \x77\x72 |0
+<U6E66> \x77\x7A |0
+<U6E67> \x5A\x50 |0
+<U6E68> \x77\x66 |0
+<U6E69> \x5A\x6C |0
+<U6E6B> \x77\x6D |0
+<U6E6E> \x5A\x5A |0
+<U6E6F> \x5A\x5D |0
+<U6E71> \x77\x6C |0
+<U6E72> \x5A\x6B |0
+<U6E73> \x77\x5C |0
+<U6E74> \x73\xC8 |0
+<U6E77> \x77\x76 |0
+<U6E78> \x77\x74 |0
+<U6E79> \x77\x78 |0
+<U6E88> \x77\x53 |0
+<U6E89> \x5A\x66 |0
+<U6E8D> \x7A\xC8 |0
+<U6E8E> \x7A\xC7 |0
+<U6E8F> \x7A\xAD |0
+<U6E90> \x5C\x84 |0
+<U6E92> \x7A\xC6 |0
+<U6E93> \x7A\xB0 |0
+<U6E94> \x7A\xB1 |0
+<U6E96> \x5C\x8E |0
+<U6E97> \x7A\xCF |0
+<U6E98> \x5C\x89 |0
+<U6E99> \x7A\xC5 |0
+<U6E9B> \x7A\xAA |0
+<U6E9C> \x5C\x8F |0
+<U6E9D> \x5C\x85 |0
+<U6E9E> \x7A\xB9 |0
+<U6E9F> \x7A\xAF |0
+<U6EA0> \x7A\xB2 |0
+<U6EA1> \x7A\xCA |0
+<U6EA2> \x5C\x7E |0
+<U6EA3> \x7A\xD1 |0
+<U6EA4> \x7A\xC9 |0
+<U6EA5> \x5C\x88 |0
+<U6EA6> \x7A\xBE |0
+<U6EA7> \x5C\x93 |0
+<U6EAA> \x5C\x92 |0
+<U6EAB> \x5C\x8C |0
+<U6EAE> \x7A\xD0 |0
+<U6EAF> \x5C\x7F |0
+<U6EB0> \x7A\xBC |0
+<U6EB1> \x7A\xB3 |0
+<U6EB2> \x7A\xC0 |0
+<U6EB3> \x7A\xCC |0
+<U6EB4> \x5C\x94 |0
+<U6EB6> \x5C\x82 |0
+<U6EB7> \x7A\xBB |0
+<U6EB8> \x91\xC7 |0
+<U6EB9> \x7A\xB4 |0
+<U6EBA> \x5C\x8B |0
+<U6EBC> \x5C\x8A |0
+<U6EBD> \x7A\xB7 |0
+<U6EBE> \x7A\xC1 |0
+<U6EBF> \x7A\xCB |0
+<U6EC0> \x7A\xAE |0
+<U6EC1> \x7A\xB8 |0
+<U6EC2> \x5C\x83 |0
+<U6EC3> \x7A\xC2 |0
+<U6EC4> \x5C\x90 |0
+<U6EC5> \x5C\x87 |0
+<U6EC6> \x7A\xB5 |0
+<U6EC7> \x5C\x86 |0
+<U6EC8> \x7A\xAC |0
+<U6EC9> \x7A\xBA |0
+<U6ECA> \x7A\xCE |0
+<U6ECB> \x5A\x65 |0
+<U6ECC> \x5E\xD6 |0
+<U6ECD> \x7A\xBD |0
+<U6ECE> \x7E\x56 |0
+<U6ECF> \x7A\xBF |0
+<U6ED0> \x7A\xCD |0
+<U6ED1> \x5C\x8D |0
+<U6ED2> \x7A\xB6 |0
+<U6ED3> \x5C\x81 |0
+<U6ED4> \x5C\x91 |0
+<U6ED5> \x60\xD8 |0
+<U6ED6> \x7A\xAB |0
+<U6ED8> \x7A\xC4 |0
+<U6EDC> \x7A\xC3 |0
+<U6EEB> \x7E\x72 |0
+<U6EEC> \x5E\xD3 |0
+<U6EED> \x7E\x67 |0
+<U6EEE> \x7E\x6C |0
+<U6EEF> \x5E\xC8 |0
+<U6EF1> \x7E\x58 |0
+<U6EF2> \x5E\xD5 |0
+<U6EF4> \x5E\xBF |0
+<U6EF5> \x7E\x57 |0
+<U6EF6> \x7E\x78 |0
+<U6EF7> \x5E\xD7 |0
+<U6EF8> \x7E\x5B |0
+<U6EF9> \x7E\x6B |0
+<U6EFB> \x7E\x5D |0
+<U6EFC> \x7E\x7B |0
+<U6EFD> \x7E\x77 |0
+<U6EFE> \x5E\xBD |0
+<U6EFF> \x5E\xC7 |0
+<U6F00> \x81\x7D |0
+<U6F01> \x5E\xD4 |0
+<U6F02> \x5E\xC5 |0
+<U6F03> \x7E\x59 |0
+<U6F05> \x7E\x76 |0
+<U6F06> \x5E\xC9 |0
+<U6F07> \x7E\x73 |0
+<U6F08> \x7E\x81 |0
+<U6F09> \x7E\x5F |0
+<U6F0A> \x7E\x68 |0
+<U6F0D> \x7E\x7E |0
+<U6F0E> \x7E\x74 |0
+<U6F0F> \x5E\xC4 |0
+<U6F12> \x7E\x66 |0
+<U6F13> \x5E\xBE |0
+<U6F14> \x5E\xBC |0
+<U6F15> \x5E\xCE |0
+<U6F18> \x7E\x64 |0
+<U6F19> \x7E\x61 |0
+<U6F1A> \x7E\x62 |0
+<U6F1C> \x7E\x7A |0
+<U6F1E> \x7E\x7F |0
+<U6F1F> \x7E\x7D |0
+<U6F20> \x5E\xC2 |0
+<U6F21> \x7E\x82 |0
+<U6F22> \x5E\xC6 |0
+<U6F23> \x5E\xCD |0
+<U6F25> \x7E\x5A |0
+<U6F26> \x81\x65 |0
+<U6F27> \x7E\x63 |0
+<U6F29> \x5E\xC0 |0
+<U6F2A> \x5E\xD2 |0
+<U6F2B> \x5E\xCF |0
+<U6F2C> \x5E\xC3 |0
+<U6F2D> \x7E\x6D |0
+<U6F2E> \x7E\x5E |0
+<U6F2F> \x5E\xD0 |0
+<U6F30> \x7E\x6F |0
+<U6F31> \x5E\xCA |0
+<U6F32> \x5E\xCC |0
+<U6F33> \x5E\xBB |0
+<U6F35> \x7E\x71 |0
+<U6F36> \x7E\x69 |0
+<U6F37> \x7E\x5C |0
+<U6F38> \x5E\xCB |0
+<U6F39> \x7E\x79 |0
+<U6F3A> \x7E\x7C |0
+<U6F3B> \x7E\x65 |0
+<U6F3C> \x7E\x70 |0
+<U6F3E> \x5E\xC1 |0
+<U6F3F> \x60\xC7 |0
+<U6F40> \x7E\x6E |0
+<U6F41> \x81\x64 |0
+<U6F43> \x7E\x75 |0
+<U6F4E> \x7E\x60 |0
+<U6F4F> \x81\x6E |0
+<U6F50> \x81\x78 |0
+<U6F51> \x60\xCA |0
+<U6F52> \x81\x77 |0
+<U6F53> \x81\x84 |0
+<U6F54> \x60\xCC |0
+<U6F55> \x81\x75 |0
+<U6F57> \x81\x79 |0
+<U6F58> \x60\xD7 |0
+<U6F5A> \x81\x70 |0
+<U6F5B> \x60\xCF |0
+<U6F5D> \x81\x7C |0
+<U6F5E> \x84\x9C |0
+<U6F5F> \x60\xDB |0
+<U6F60> \x60\xDA |0
+<U6F61> \x81\x7E |0
+<U6F62> \x81\x6D |0
+<U6F63> \x81\x89 |0
+<U6F64> \x60\xD5 |0
+<U6F66> \x60\xCB |0
+<U6F67> \x81\x82 |0
+<U6F69> \x81\x86 |0
+<U6F6A> \x81\x8B |0
+<U6F6B> \x81\x7F |0
+<U6F6C> \x81\x73 |0
+<U6F6D> \x60\xCE |0
+<U6F6E> \x60\xD1 |0
+<U6F6F> \x60\xD9 |0
+<U6F70> \x60\xD4 |0
+<U6F72> \x81\x76 |0
+<U6F73> \x7E\x6A |0
+<U6F76> \x81\x72 |0
+<U6F77> \x81\x8A |0
+<U6F78> \x60\xD0 |0
+<U6F7A> \x60\xD3 |0
+<U6F7B> \x81\x8C |0
+<U6F7C> \x60\xC8 |0
+<U6F7D> \x81\x81 |0
+<U6F7E> \x81\x66 |0
+<U6F7F> \x81\x87 |0
+<U6F80> \x64\x4A |0
+<U6F82> \x81\x74 |0
+<U6F84> \x60\xC9 |0
+<U6F85> \x81\x6F |0
+<U6F86> \x60\xCD |0
+<U6F87> \x81\x67 |0
+<U6F88> \x5E\xD1 |0
+<U6F89> \x81\x6B |0
+<U6F8B> \x81\x85 |0
+<U6F8C> \x81\x6C |0
+<U6F8D> \x81\x6A |0
+<U6F8E> \x60\xD2 |0
+<U6F90> \x81\x83 |0
+<U6F92> \x81\x69 |0
+<U6F93> \x81\x7B |0
+<U6F94> \x81\x7A |0
+<U6F95> \x81\x88 |0
+<U6F96> \x81\x71 |0
+<U6F97> \x60\xD6 |0
+<U6F9E> \x84\x9F |0
+<U6FA0> \x62\xB2 |0
+<U6FA1> \x62\xA8 |0
+<U6FA2> \x84\xAB |0
+<U6FA3> \x84\x97 |0
+<U6FA4> \x62\xAA |0
+<U6FA5> \x84\xA3 |0
+<U6FA6> \x62\xB1 |0
+<U6FA7> \x62\xAC |0
+<U6FA8> \x84\xA1 |0
+<U6FA9> \x87\x5C |0
+<U6FAA> \x84\xA7 |0
+<U6FAB> \x84\xAD |0
+<U6FAC> \x84\xA6 |0
+<U6FAD> \x84\x95 |0
+<U6FAE> \x84\xA4 |0
+<U6FAF> \x84\xAF |0
+<U6FB0> \x84\xB1 |0
+<U6FB1> \x62\xA7 |0
+<U6FB2> \x84\xB0 |0
+<U6FB3> \x62\xAD |0
+<U6FB4> \x62\xB3 |0
+<U6FB6> \x62\xB0 |0
+<U6FB8> \x84\xAA |0
+<U6FB9> \x62\xAF |0
+<U6FBA> \x84\xA5 |0
+<U6FBC> \x84\x99 |0
+<U6FBD> \x84\x9E |0
+<U6FBF> \x84\xA9 |0
+<U6FC0> \x62\xAE |0
+<U6FC1> \x62\xAB |0
+<U6FC2> \x62\xA6 |0
+<U6FC3> \x62\xA9 |0
+<U6FC4> \x84\x9D |0
+<U6FC6> \x81\x68 |0
+<U6FC7> \x84\x98 |0
+<U6FC8> \x84\x9B |0
+<U6FC9> \x84\xAC |0
+<U6FCA> \x84\xA0 |0
+<U6FCB> \x84\x96 |0
+<U6FCC> \x87\x5B |0
+<U6FCD> \x84\xAE |0
+<U6FCE> \x84\x9A |0
+<U6FCF> \x84\xA8 |0
+<U6FD4> \x87\x5E |0
+<U6FD5> \x64\x4E |0
+<U6FD8> \x64\x42 |0
+<U6FDB> \x64\x46 |0
+<U6FDC> \x87\x60 |0
+<U6FDD> \x87\x66 |0
+<U6FDE> \x87\x64 |0
+<U6FDF> \x64\x44 |0
+<U6FE0> \x64\x45 |0
+<U6FE1> \x64\x4C |0
+<U6FE2> \x87\x67 |0
+<U6FE3> \x87\x5F |0
+<U6FE4> \x64\x47 |0
+<U6FE6> \x87\x63 |0
+<U6FE7> \x87\x62 |0
+<U6FE8> \x87\x68 |0
+<U6FE9> \x64\x4D |0
+<U6FEB> \x64\x48 |0
+<U6FEC> \x64\x4B |0
+<U6FED> \x87\x61 |0
+<U6FEE> \x64\x4F |0
+<U6FEF> \x64\x49 |0
+<U6FF0> \x64\x50 |0
+<U6FF1> \x64\x43 |0
+<U6FF2> \x87\x65 |0
+<U6FF4> \x87\x5D |0
+<U6FF7> \x89\xA5 |0
+<U6FFA> \x65\x7C |0
+<U6FFB> \x89\xA2 |0
+<U6FFC> \x89\xA4 |0
+<U6FFE> \x65\x7A |0
+<U6FFF> \x89\xA0 |0
+<U7000> \x89\xA1 |0
+<U7001> \x89\x9C |0
+<U7004> \x84\xA2 |0
+<U7005> \x89\x9D |0
+<U7006> \x65\x7B |0
+<U7007> \x89\x99 |0
+<U7009> \x65\x78 |0
+<U700A> \x89\xA6 |0
+<U700B> \x65\x79 |0
+<U700C> \x89\x9A |0
+<U700D> \x89\x9B |0
+<U700E> \x89\x9F |0
+<U700F> \x65\x7E |0
+<U7011> \x65\x7D |0
+<U7014> \x89\x9E |0
+<U7015> \x66\x64 |0
+<U7016> \x8B\x8E |0
+<U7017> \x8B\x94 |0
+<U7018> \x66\x65 |0
+<U7019> \x8B\x8B |0
+<U701A> \x66\x62 |0
+<U701B> \x66\x5F |0
+<U701C> \x8B\x96 |0
+<U701D> \x66\x63 |0
+<U701F> \x66\x60 |0
+<U7020> \x8B\x8D |0
+<U7021> \x8B\x90 |0
+<U7022> \x8B\x91 |0
+<U7023> \x8B\x92 |0
+<U7024> \x8B\x95 |0
+<U7026> \x89\xA3 |0
+<U7027> \x8B\x8C |0
+<U7028> \x66\x61 |0
+<U7029> \x8B\x93 |0
+<U702A> \x8B\x97 |0
+<U702B> \x8B\x8F |0
+<U702F> \x8D\x4D |0
+<U7030> \x66\xF4 |0
+<U7031> \x8D\x50 |0
+<U7032> \x66\xF5 |0
+<U7033> \x8D\x58 |0
+<U7034> \x8D\x4F |0
+<U7035> \x8D\x4C |0
+<U7037> \x8D\x4E |0
+<U7038> \x8D\x52 |0
+<U7039> \x8D\x55 |0
+<U703A> \x8D\x54 |0
+<U703B> \x8D\x57 |0
+<U703C> \x8D\x4B |0
+<U703E> \x66\xF3 |0
+<U703F> \x8D\x53 |0
+<U7040> \x8D\x56 |0
+<U7041> \x8D\x59 |0
+<U7042> \x8D\x51 |0
+<U7043> \x8E\x83 |0
+<U7044> \x8E\x84 |0
+<U7045> \x8E\x88 |0
+<U7046> \x8E\x89 |0
+<U7048> \x8E\x86 |0
+<U7049> \x8E\x87 |0
+<U704A> \x8E\x85 |0
+<U704C> \x67\x95 |0
+<U7051> \x67\xE3 |0
+<U7052> \x8F\x7B |0
+<U7055> \x8F\x78 |0
+<U7056> \x8F\x79 |0
+<U7057> \x8F\x7A |0
+<U7058> \x67\xE4 |0
+<U705A> \x90\x56 |0
+<U705B> \x90\x55 |0
+<U705D> \x90\xBE |0
+<U705E> \x68\x81 |0
+<U705F> \x90\xBC |0
+<U7060> \x90\xBF |0
+<U7061> \x90\xBD |0
+<U7062> \x91\x47 |0
+<U7063> \x68\xA3 |0
+<U7064> \x68\xB1 |0
+<U7065> \x91\x93 |0
+<U7066> \x91\x7D |0
+<U7068> \x91\x92 |0
+<U7069> \x91\xC0 |0
+<U706A> \x91\xC1 |0
+<U706B> \x48\x96 |3
+<U706B> \x4C\xD5 |0
+<U7070> \x4E\x68 |0
+<U7071> \x69\xE0 |0
+<U7074> \x6A\xDE |0
+<U7076> \x4F\xA1 |0
+<U7078> \x4F\xA4 |0
+<U707A> \x6A\xDF |0
+<U707C> \x4F\xA2 |0
+<U707D> \x4F\xA3 |0
+<U7082> \x6C\x9A |0
+<U7083> \x6C\x9C |0
+<U7084> \x6C\x97 |0
+<U7085> \x6C\x94 |0
+<U7086> \x6C\x96 |0
+<U708A> \x51\x86 |0
+<U708E> \x51\x84 |0
+<U7091> \x6C\x98 |0
+<U7092> \x51\x85 |0
+<U7093> \x6C\x95 |0
+<U7094> \x6C\x92 |0
+<U7095> \x51\x83 |0
+<U7096> \x6C\x99 |0
+<U7098> \x6C\x93 |0
+<U7099> \x51\x87 |0
+<U709A> \x6C\x9B |0
+<U709F> \x6E\x91 |0
+<U70A1> \x6E\x95 |0
+<U70A4> \x53\x5A |0
+<U70A9> \x6E\x98 |0
+<U70AB> \x53\x52 |0
+<U70AC> \x53\x55 |0
+<U70AD> \x53\x57 |0
+<U70AE> \x53\x59 |0
+<U70AF> \x53\x56 |0
+<U70B0> \x6E\x94 |0
+<U70B1> \x6E\x93 |0
+<U70B3> \x53\x54 |0
+<U70B4> \x6E\x96 |0
+<U70B5> \x6E\x97 |0
+<U70B7> \x6E\x90 |0
+<U70B8> \x53\x58 |0
+<U70BA> \x53\x53 |0
+<U70BE> \x6E\x92 |0
+<U70C5> \x70\xDA |0
+<U70C6> \x70\xDB |0
+<U70C7> \x70\xDC |0
+<U70C8> \x55\x74 |0
+<U70CA> \x55\x70 |0
+<U70CB> \x70\xD1 |0
+<U70CD> \x70\xD9 |0
+<U70CE> \x70\xDE |0
+<U70CF> \x55\x75 |0
+<U70D1> \x70\xCF |0
+<U70D2> \x70\xD5 |0
+<U70D3> \x70\xCE |0
+<U70D4> \x70\xD8 |0
+<U70D7> \x70\xD4 |0
+<U70D8> \x55\x71 |0
+<U70D9> \x55\x73 |0
+<U70DA> \x70\xDD |0
+<U70DC> \x70\xCD |0
+<U70DD> \x70\xD0 |0
+<U70DE> \x70\xD6 |0
+<U70E0> \x70\xD7 |0
+<U70E1> \x70\xDF |0
+<U70E2> \x70\xD3 |0
+<U70E4> \x55\x72 |0
+<U70EF> \x57\xF1 |0
+<U70F0> \x73\xF1 |0
+<U70F3> \x73\xF3 |0
+<U70F4> \x73\xEF |0
+<U70F6> \x73\xFB |0
+<U70F7> \x73\xED |0
+<U70F8> \x73\xFA |0
+<U70F9> \x57\xED |0
+<U70FA> \x73\xEB |0
+<U70FB> \x77\x82 |0
+<U70FC> \x73\xF5 |0
+<U70FD> \x57\xF0 |0
+<U70FF> \x73\xF6 |0
+<U7100> \x73\xF9 |0
+<U7102> \x73\xFD |0
+<U7104> \x73\xF2 |0
+<U7106> \x73\xF7 |0
+<U7109> \x57\xEE |0
+<U710A> \x57\xEF |0
+<U710B> \x73\xFC |0
+<U710C> \x73\xF0 |0
+<U710D> \x73\xEC |0
+<U710E> \x74\x41 |0
+<U7110> \x73\xF4 |0
+<U7113> \x73\xF8 |0
+<U7117> \x73\xEE |0
+<U7119> \x5A\x6E |0
+<U711A> \x5A\x6F |0
+<U711B> \x77\x8C |0
+<U711C> \x5A\x75 |0
+<U711E> \x77\x7F |0
+<U711F> \x77\x89 |0
+<U7120> \x77\x7E |0
+<U7121> \x5A\x72 |0
+<U7122> \x77\x87 |0
+<U7123> \x77\x85 |0
+<U7125> \x77\x86 |0
+<U7126> \x5A\x70 |0
+<U7128> \x77\x8A |0
+<U712E> \x77\x83 |0
+<U712F> \x77\x81 |0
+<U7130> \x5A\x71 |0
+<U7131> \x77\x84 |0
+<U7132> \x77\x88 |0
+<U7136> \x5A\x73 |0
+<U713A> \x77\x8B |0
+<U7141> \x7A\xD7 |0
+<U7142> \x7A\xDE |0
+<U7143> \x7A\xE0 |0
+<U7144> \x7A\xE6 |0
+<U7146> \x5C\xA1 |0
+<U7147> \x7A\xD2 |0
+<U7149> \x5C\x99 |0
+<U714B> \x7A\xE1 |0
+<U714C> \x5C\x9E |0
+<U714D> \x7A\xE7 |0
+<U714E> \x5C\x95 |0
+<U7150> \x7A\xE4 |0
+<U7152> \x7A\xD4 |0
+<U7153> \x7A\xE5 |0
+<U7154> \x7A\xD3 |0
+<U7156> \x5C\xA3 |0
+<U7158> \x7A\xDF |0
+<U7159> \x5C\x96 |0
+<U715A> \x7A\xE8 |0
+<U715C> \x5C\x9B |0
+<U715D> \x7A\xD8 |0
+<U715E> \x5C\xA0 |0
+<U715F> \x7A\xE3 |0
+<U7160> \x7A\xD6 |0
+<U7161> \x7A\xDD |0
+<U7162> \x7A\xD9 |0
+<U7163> \x7A\xD5 |0
+<U7164> \x5C\x98 |0
+<U7165> \x5C\x9F |0
+<U7166> \x5C\x9D |0
+<U7167> \x5C\x9A |0
+<U7168> \x5C\xA2 |0
+<U7169> \x5C\x97 |0
+<U716A> \x7A\xDC |0
+<U716C> \x5C\x9C |0
+<U716E> \x5A\x74 |0
+<U7170> \x7A\xE2 |0
+<U7172> \x7A\xDA |0
+<U7178> \x7A\xDB |0
+<U717B> \x7E\x8A |0
+<U717D> \x5E\xDA |0
+<U7180> \x7E\x86 |0
+<U7181> \x7E\x8C |0
+<U7182> \x7E\x88 |0
+<U7184> \x5E\xDC |0
+<U7185> \x7E\x87 |0
+<U7186> \x7E\x8B |0
+<U7187> \x7E\x83 |0
+<U7189> \x7E\x85 |0
+<U718A> \x5E\xDB |0
+<U718F> \x7E\x89 |0
+<U7190> \x7E\x84 |0
+<U7192> \x5E\xDD |0
+<U7194> \x5E\xD8 |0
+<U7197> \x7E\x8D |0
+<U7199> \x5E\xD9 |0
+<U719A> \x81\x92 |0
+<U719B> \x81\x8F |0
+<U719C> \x81\x9B |0
+<U719D> \x81\x95 |0
+<U719E> \x81\x97 |0
+<U719F> \x60\xDC |0
+<U71A0> \x81\x91 |0
+<U71A1> \x81\x99 |0
+<U71A4> \x81\x98 |0
+<U71A5> \x81\x96 |0
+<U71A7> \x81\x9C |0
+<U71A8> \x60\xDF |0
+<U71A9> \x81\x93 |0
+<U71AA> \x81\x9A |0
+<U71AC> \x60\xDD |0
+<U71AF> \x81\x8E |0
+<U71B0> \x81\x90 |0
+<U71B1> \x60\xDE |0
+<U71B2> \x81\x8D |0
+<U71B3> \x81\x9D |0
+<U71B5> \x81\x94 |0
+<U71B8> \x84\xB5 |0
+<U71B9> \x62\xBA |0
+<U71BC> \x84\xC0 |0
+<U71BD> \x84\xBE |0
+<U71BE> \x62\xB4 |0
+<U71BF> \x84\xB4 |0
+<U71C0> \x84\xB7 |0
+<U71C1> \x84\xB8 |0
+<U71C2> \x84\xB3 |0
+<U71C3> \x62\xBE |0
+<U71C4> \x62\xBF |0
+<U71C5> \x84\xB2 |0
+<U71C6> \x84\xC1 |0
+<U71C7> \x84\xBC |0
+<U71C8> \x62\xB8 |0
+<U71C9> \x62\xB5 |0
+<U71CA> \x84\xBB |0
+<U71CB> \x84\xB9 |0
+<U71CE> \x62\xBB |0
+<U71CF> \x84\xBD |0
+<U71D0> \x62\xB6 |0
+<U71D2> \x62\xB7 |0
+<U71D4> \x84\xBA |0
+<U71D5> \x62\xB9 |0
+<U71D6> \x84\xB6 |0
+<U71D8> \x84\xBF |0
+<U71D9> \x62\xBC |0
+<U71DA> \x84\xC2 |0
+<U71DB> \x84\xC3 |0
+<U71DC> \x62\xBD |0
+<U71DF> \x64\x52 |0
+<U71E0> \x64\x59 |0
+<U71E1> \x87\x69 |0
+<U71E2> \x87\x6F |0
+<U71E4> \x87\x6D |0
+<U71E5> \x64\x55 |0
+<U71E6> \x64\x54 |0
+<U71E7> \x64\x51 |0
+<U71E8> \x87\x6B |0
+<U71EC> \x64\x57 |0
+<U71ED> \x64\x56 |0
+<U71EE> \x64\x53 |0
+<U71F0> \x87\x6E |0
+<U71F1> \x87\x6A |0
+<U71F2> \x87\x6C |0
+<U71F4> \x64\x58 |0
+<U71F8> \x65\x83 |0
+<U71F9> \x89\xA9 |0
+<U71FB> \x65\x7F |0
+<U71FC> \x65\x81 |0
+<U71FD> \x89\xAB |0
+<U71FE> \x65\x82 |0
+<U71FF> \x89\xA8 |0
+<U7201> \x89\xA7 |0
+<U7202> \x8B\x9B |0
+<U7203> \x89\xAA |0
+<U7205> \x8B\x9C |0
+<U7206> \x66\x66 |0
+<U7207> \x8B\x9A |0
+<U720A> \x8B\x99 |0
+<U720C> \x8B\x98 |0
+<U720D> \x66\x67 |0
+<U7210> \x66\xF6 |0
+<U7213> \x8D\x5A |0
+<U7214> \x8D\x5B |0
+<U7219> \x8E\x8C |0
+<U721A> \x8E\x8B |0
+<U721B> \x67\x96 |0
+<U721D> \x8E\x8A |0
+<U721E> \x8F\x7C |0
+<U721F> \x8F\x7D |0
+<U7222> \x90\x57 |0
+<U7223> \x90\xC0 |0
+<U7226> \x91\x48 |0
+<U7227> \x91\xAC |0
+<U7228> \x68\xC5 |0
+<U7229> \x91\xB6 |0
+<U722A> \x48\x97 |3
+<U722A> \x4C\xD6 |0
+<U722C> \x51\x88 |0
+<U722D> \x51\x89 |0
+<U7230> \x53\x5B |0
+<U7235> \x64\x5A |0
+<U7236> \x48\x98 |3
+<U7236> \x4C\xD7 |0
+<U7238> \x51\x8A |0
+<U7239> \x55\x76 |0
+<U723A> \x5C\xA4 |0
+<U723B> \x48\x99 |3
+<U723B> \x4C\xD8 |0
+<U723D> \x57\xF2 |0
+<U723E> \x5E\xDE |0
+<U723F> \x48\x9A |3
+<U723F> \x69\x63 |0
+<U7241> \x6E\x99 |0
+<U7242> \x70\xE0 |0
+<U7244> \x7E\x8E |0
+<U7246> \x64\x5B |0
+<U7247> \x48\x9B |3
+<U7247> \x4C\xD9 |0
+<U7248> \x51\x8B |0
+<U7249> \x6E\x9A |0
+<U724A> \x6E\x9B |0
+<U724B> \x77\x8D |0
+<U724C> \x5A\x76 |0
+<U724F> \x7A\xE9 |0
+<U7252> \x5C\xA5 |0
+<U7253> \x7E\x8F |0
+<U7256> \x60\xE0 |0
+<U7258> \x66\x68 |0
+<U7259> \x48\x9C |3
+<U7259> \x4C\xDA |0
+<U725A> \x77\x8E |0
+<U725B> \x48\x9D |3
+<U725B> \x4C\xDB |0
+<U725D> \x4E\x6A |0
+<U725E> \x69\xE1 |0
+<U725F> \x4E\x69 |0
+<U7260> \x4F\xA7 |0
+<U7261> \x4F\xA6 |0
+<U7262> \x4F\xA5 |0
+<U7263> \x6A\xE0 |0
+<U7267> \x51\x8C |0
+<U7269> \x51\x8D |0
+<U726A> \x6C\x9D |0
+<U726C> \x6E\x9C |0
+<U726E> \x6E\x9F |0
+<U726F> \x53\x5D |0
+<U7270> \x6E\x9D |0
+<U7272> \x53\x5C |0
+<U7273> \x6E\x9E |0
+<U7274> \x53\x5E |0
+<U7276> \x70\xE3 |0
+<U7277> \x70\xE2 |0
+<U7278> \x70\xE1 |0
+<U7279> \x55\x77 |0
+<U727B> \x74\x43 |0
+<U727C> \x74\x44 |0
+<U727D> \x57\xF3 |0
+<U727E> \x74\x42 |0
+<U727F> \x74\x45 |0
+<U7280> \x5A\x78 |0
+<U7281> \x57\xF4 |0
+<U7284> \x5A\x77 |0
+<U7285> \x77\x92 |0
+<U7286> \x77\x91 |0
+<U7288> \x77\x8F |0
+<U7289> \x77\x90 |0
+<U728B> \x77\x93 |0
+<U728C> \x7A\xEB |0
+<U728D> \x7A\xEA |0
+<U728E> \x7A\xEE |0
+<U7290> \x7A\xED |0
+<U7291> \x7A\xEC |0
+<U7292> \x5E\xDF |0
+<U7293> \x7E\x92 |0
+<U7295> \x7E\x91 |0
+<U7296> \x5E\xE0 |0
+<U7297> \x7E\x90 |0
+<U7298> \x81\x9E |0
+<U729A> \x81\x9F |0
+<U729B> \x60\xE1 |0
+<U729D> \x84\xC4 |0
+<U729E> \x84\xC5 |0
+<U72A1> \x8B\xA1 |0
+<U72A2> \x66\x69 |0
+<U72A3> \x8B\xA0 |0
+<U72A4> \x8B\x9F |0
+<U72A5> \x8B\x9D |0
+<U72A6> \x8B\x9E |0
+<U72A7> \x67\x97 |0
+<U72A8> \x8D\x5C |0
+<U72A9> \x8F\x7E |0
+<U72AA> \x91\x49 |0
+<U72AC> \x48\x9E |3
+<U72AC> \x4C\xDC |0
+<U72AE> \x69\x85 |0
+<U72AF> \x4D\x88 |0
+<U72B0> \x69\x86 |0
+<U72B4> \x69\xE2 |0
+<U72B5> \x69\xE3 |0
+<U72BA> \x6A\xE6 |0
+<U72BD> \x6A\xE2 |0
+<U72BF> \x6A\xE1 |0
+<U72C0> \x51\x8E |0
+<U72C1> \x6A\xE5 |0
+<U72C2> \x4F\xA9 |0
+<U72C3> \x6A\xE3 |0
+<U72C4> \x4F\xA8 |0
+<U72C5> \x6A\xE7 |0
+<U72C6> \x6A\xE4 |0
+<U72C9> \x6C\xA1 |0
+<U72CA> \x6E\xA0 |0
+<U72CB> \x6C\x9F |0
+<U72CC> \x6C\xA6 |0
+<U72CE> \x51\x8F |0
+<U72D0> \x51\x92 |0
+<U72D1> \x6C\xA7 |0
+<U72D2> \x6C\xA3 |0
+<U72D4> \x6C\xA4 |0
+<U72D6> \x6C\x9E |0
+<U72D7> \x51\x91 |0
+<U72D8> \x6C\xA0 |0
+<U72D9> \x51\x90 |0
+<U72DA> \x6C\xA5 |0
+<U72DC> \x6C\xA2 |0
+<U72DF> \x6E\xA4 |0
+<U72E0> \x53\x60 |0
+<U72E1> \x53\x61 |0
+<U72E3> \x6E\xA7 |0
+<U72E4> \x6E\xA1 |0
+<U72E6> \x6E\xA6 |0
+<U72E8> \x6E\xA2 |0
+<U72E9> \x53\x5F |0
+<U72EA> \x6E\xA5 |0
+<U72EB> \x6E\xA3 |0
+<U72F3> \x70\xE9 |0
+<U72F4> \x70\xE6 |0
+<U72F6> \x70\xE8 |0
+<U72F7> \x55\x7C |0
+<U72F8> \x55\x7B |0
+<U72F9> \x55\x79 |0
+<U72FA> \x70\xE5 |0
+<U72FB> \x70\xEA |0
+<U72FC> \x55\x78 |0
+<U72FD> \x55\x7A |0
+<U72FE> \x70\xE7 |0
+<U72FF> \x74\x4D |0
+<U7300> \x70\xE4 |0
+<U7301> \x70\xEB |0
+<U7307> \x74\x48 |0
+<U7308> \x74\x4C |0
+<U730A> \x74\x4B |0
+<U730B> \x77\x95 |0
+<U730C> \x77\xA0 |0
+<U730F> \x74\x4E |0
+<U7311> \x74\x49 |0
+<U7312> \x77\x94 |0
+<U7313> \x57\xF8 |0
+<U7316> \x57\xF7 |0
+<U7317> \x74\x47 |0
+<U7318> \x74\x4A |0
+<U7319> \x57\xF9 |0
+<U731B> \x57\xF6 |0
+<U731C> \x57\xF5 |0
+<U731D> \x74\x46 |0
+<U731E> \x74\x4F |0
+<U7322> \x77\x97 |0
+<U7323> \x77\x9E |0
+<U7325> \x5A\x7A |0
+<U7326> \x77\x9D |0
+<U7327> \x77\x9A |0
+<U7329> \x5A\x7C |0
+<U732D> \x77\x9C |0
+<U7330> \x77\x96 |0
+<U7331> \x77\x98 |0
+<U7332> \x77\x9B |0
+<U7333> \x77\x99 |0
+<U7334> \x5A\x7B |0
+<U7335> \x77\x9F |0
+<U7336> \x5A\x79 |0
+<U7337> \x5C\xA6 |0
+<U733A> \x7A\xF2 |0
+<U733B> \x7A\xF1 |0
+<U733C> \x7A\xEF |0
+<U733E> \x5C\xA9 |0
+<U733F> \x5C\xA8 |0
+<U7340> \x7A\xF3 |0
+<U7342> \x7A\xF0 |0
+<U7343> \x7E\x93 |0
+<U7344> \x5E\xE1 |0
+<U7345> \x5C\xA7 |0
+<U7349> \x7A\xF5 |0
+<U734A> \x7A\xF4 |0
+<U734C> \x7E\x96 |0
+<U734D> \x7E\x94 |0
+<U734E> \x60\xE2 |0
+<U7350> \x5E\xE2 |0
+<U7351> \x7E\x95 |0
+<U7352> \x81\xA1 |0
+<U7357> \x60\xE3 |0
+<U7358> \x81\xA0 |0
+<U7359> \x81\xA9 |0
+<U735A> \x81\xA8 |0
+<U735B> \x81\xA6 |0
+<U735D> \x81\xA5 |0
+<U735E> \x81\xA2 |0
+<U735F> \x81\xA3 |0
+<U7360> \x81\xA4 |0
+<U7361> \x81\xA7 |0
+<U7362> \x81\xAA |0
+<U7365> \x84\xCA |0
+<U7366> \x84\xC7 |0
+<U7367> \x84\xC8 |0
+<U7368> \x62\xC0 |0
+<U7369> \x84\xC6 |0
+<U736A> \x84\xCC |0
+<U736B> \x84\xCB |0
+<U736C> \x84\xC9 |0
+<U736E> \x87\x71 |0
+<U736F> \x87\x72 |0
+<U7370> \x64\x5C |0
+<U7372> \x64\x5D |0
+<U7373> \x87\x70 |0
+<U7375> \x65\x85 |0
+<U7376> \x89\xAC |0
+<U7377> \x65\x84 |0
+<U7378> \x66\x6A |0
+<U737A> \x66\x6B |0
+<U737B> \x66\xF7 |0
+<U737C> \x8D\x5E |0
+<U737D> \x8D\x5D |0
+<U737E> \x8E\x8D |0
+<U737F> \x8F\x7F |0
+<U7380> \x67\xE5 |0
+<U7381> \x90\x59 |0
+<U7382> \x90\x58 |0
+<U7383> \x90\x5A |0
+<U7384> \x48\x9F |3
+<U7384> \x4D\x89 |0
+<U7385> \x6E\xA8 |0
+<U7386> \x55\x7D |0
+<U7387> \x57\xFA |0
+<U7388> \x74\x50 |0
+<U7389> \x48\xA0 |3
+<U7389> \x4D\x8A |0
+<U738A> \x69\x87 |0
+<U738B> \x4C\xDD |0
+<U738E> \x69\xE4 |0
+<U7392> \x6A\xEC |0
+<U7393> \x6A\xEA |0
+<U7394> \x6A\xEB |0
+<U7395> \x6A\xE8 |0
+<U7396> \x4F\xAA |0
+<U7397> \x6A\xE9 |0
+<U739D> \x6C\xAF |0
+<U739F> \x51\x95 |0
+<U73A0> \x6C\xAD |0
+<U73A1> \x6C\xA9 |0
+<U73A2> \x6C\xAC |0
+<U73A4> \x6C\xA8 |0
+<U73A5> \x51\x97 |0
+<U73A6> \x6C\xAB |0
+<U73A8> \x51\x94 |0
+<U73A9> \x51\x93 |0
+<U73AB> \x51\x96 |0
+<U73AC> \x6C\xAE |0
+<U73AD> \x6C\xAA |0
+<U73B2> \x53\x65 |0
+<U73B3> \x53\x68 |0
+<U73B4> \x6E\xB0 |0
+<U73B5> \x6E\xAF |0
+<U73B6> \x6E\xAE |0
+<U73B7> \x53\x62 |0
+<U73B8> \x6E\xB7 |0
+<U73B9> \x6E\xAD |0
+<U73BB> \x53\x64 |0
+<U73BC> \x70\xF0 |0
+<U73BE> \x6E\xB4 |0
+<U73BF> \x6E\xB2 |0
+<U73C0> \x53\x67 |0
+<U73C2> \x6E\xAA |0
+<U73C3> \x6E\xB5 |0
+<U73C5> \x6E\xAC |0
+<U73C6> \x6E\xB6 |0
+<U73C7> \x6E\xB3 |0
+<U73C8> \x6E\xAB |0
+<U73CA> \x53\x63 |0
+<U73CB> \x6E\xB8 |0
+<U73CC> \x6E\xA9 |0
+<U73CD> \x53\x66 |0
+<U73D2> \x70\xF5 |0
+<U73D3> \x70\xEC |0
+<U73D4> \x70\xF7 |0
+<U73D6> \x70\xEF |0
+<U73D7> \x70\xFA |0
+<U73D8> \x70\xFB |0
+<U73D9> \x70\xED |0
+<U73DA> \x70\xF9 |0
+<U73DB> \x70\xF6 |0
+<U73DC> \x70\xF4 |0
+<U73DD> \x70\xF8 |0
+<U73DE> \x55\x84 |0
+<U73E0> \x55\x82 |0
+<U73E3> \x70\xF2 |0
+<U73E5> \x70\xEE |0
+<U73E7> \x70\xF1 |0
+<U73E8> \x70\xFC |0
+<U73E9> \x70\xF3 |0
+<U73EA> \x55\x83 |0
+<U73EB> \x6E\xB1 |0
+<U73ED> \x55\x7E |0
+<U73EE> \x55\x81 |0
+<U73F4> \x74\x5E |0
+<U73F5> \x74\x53 |0
+<U73F6> \x74\x51 |0
+<U73F8> \x74\x52 |0
+<U73FA> \x74\x59 |0
+<U73FC> \x74\x5A |0
+<U73FD> \x74\x56 |0
+<U73FE> \x58\x42 |0
+<U73FF> \x74\x5B |0
+<U7400> \x74\x58 |0
+<U7401> \x74\x55 |0
+<U7403> \x57\xFD |0
+<U7404> \x74\x54 |0
+<U7405> \x57\xFB |0
+<U7406> \x58\x41 |0
+<U7407> \x74\x57 |0
+<U7408> \x74\x5F |0
+<U7409> \x55\x7F |0
+<U740A> \x57\xFC |0
+<U740B> \x74\x5D |0
+<U740C> \x74\x5C |0
+<U740D> \x58\x43 |0
+<U7416> \x77\xA5 |0
+<U741A> \x77\xA6 |0
+<U741B> \x5A\x87 |0
+<U741D> \x77\xAC |0
+<U7420> \x77\xAE |0
+<U7421> \x77\xA7 |0
+<U7422> \x5A\x81 |0
+<U7423> \x77\xAB |0
+<U7424> \x77\xAA |0
+<U7425> \x5A\x82 |0
+<U7426> \x5A\x88 |0
+<U7428> \x5A\x89 |0
+<U7429> \x77\xAD |0
+<U742A> \x5A\x7E |0
+<U742B> \x77\xA4 |0
+<U742C> \x77\xA2 |0
+<U742D> \x77\xA8 |0
+<U742E> \x77\xA1 |0
+<U742F> \x5A\x86 |0
+<U7430> \x77\xA3 |0
+<U7431> \x77\xA9 |0
+<U7432> \x77\xAF |0
+<U7433> \x5A\x7F |0
+<U7434> \x5A\x85 |0
+<U7435> \x5A\x83 |0
+<U7436> \x5A\x84 |0
+<U743A> \x5A\x7D |0
+<U743F> \x5C\xB0 |0
+<U7440> \x7A\xFC |0
+<U7441> \x5C\xAF |0
+<U7442> \x7B\x43 |0
+<U7444> \x7A\xF6 |0
+<U7446> \x7B\x44 |0
+<U744A> \x7A\xF7 |0
+<U744B> \x7A\xF8 |0
+<U744D> \x7B\x45 |0
+<U744E> \x7B\x42 |0
+<U744F> \x7A\xFD |0
+<U7450> \x7B\x41 |0
+<U7451> \x7A\xFA |0
+<U7452> \x7A\xF9 |0
+<U7454> \x7B\x46 |0
+<U7455> \x5C\xAC |0
+<U7457> \x7A\xFB |0
+<U7459> \x5C\xB1 |0
+<U745A> \x5C\xAB |0
+<U745B> \x5C\xB2 |0
+<U745C> \x5C\xB3 |0
+<U745E> \x5C\xAE |0
+<U745F> \x5C\xAD |0
+<U7462> \x7E\x97 |0
+<U7463> \x5E\xE4 |0
+<U7464> \x5E\xE3 |0
+<U7467> \x7E\x9C |0
+<U7469> \x60\xE4 |0
+<U746A> \x5E\xE5 |0
+<U746D> \x5E\xE7 |0
+<U746E> \x7E\x9D |0
+<U746F> \x5C\xAA |0
+<U7470> \x5E\xE6 |0
+<U7471> \x7E\x99 |0
+<U7472> \x7E\x9B |0
+<U7473> \x7E\x98 |0
+<U7475> \x7E\x9A |0
+<U7479> \x81\xB4 |0
+<U747C> \x81\xB3 |0
+<U747D> \x81\xB0 |0
+<U747E> \x60\xE7 |0
+<U747F> \x84\xCD |0
+<U7480> \x60\xE8 |0
+<U7481> \x81\xAF |0
+<U7483> \x60\xE6 |0
+<U7485> \x81\xB1 |0
+<U7486> \x81\xAE |0
+<U7487> \x81\xAB |0
+<U7488> \x81\xB2 |0
+<U7489> \x81\xAC |0
+<U748A> \x81\xAD |0
+<U748B> \x60\xE5 |0
+<U7490> \x87\x76 |0
+<U7492> \x84\xD1 |0
+<U7494> \x84\xD0 |0
+<U7495> \x84\xD2 |0
+<U7497> \x87\x73 |0
+<U7498> \x62\xC3 |0
+<U749A> \x84\xCE |0
+<U749C> \x62\xC1 |0
+<U749E> \x62\xC5 |0
+<U749F> \x62\xC4 |0
+<U74A0> \x84\xCF |0
+<U74A1> \x84\xD3 |0
+<U74A3> \x62\xC2 |0
+<U74A5> \x87\x7A |0
+<U74A6> \x64\x60 |0
+<U74A7> \x65\x86 |0
+<U74A8> \x64\x61 |0
+<U74A9> \x64\x5E |0
+<U74AA> \x87\x77 |0
+<U74AB> \x87\x75 |0
+<U74AD> \x87\x78 |0
+<U74AF> \x87\x7B |0
+<U74B0> \x64\x5F |0
+<U74B1> \x87\x79 |0
+<U74B2> \x87\x74 |0
+<U74B5> \x89\xAF |0
+<U74B6> \x89\xB2 |0
+<U74B7> \x8B\xA4 |0
+<U74B8> \x89\xAD |0
+<U74BA> \x8D\x5F |0
+<U74BB> \x89\xB3 |0
+<U74BD> \x66\x6C |0
+<U74BE> \x89\xB1 |0
+<U74BF> \x65\x87 |0
+<U74C0> \x89\xAE |0
+<U74C1> \x89\xB0 |0
+<U74C2> \x89\xB4 |0
+<U74C3> \x8B\xA5 |0
+<U74C5> \x8B\xA3 |0
+<U74CA> \x66\x6D |0
+<U74CB> \x8B\xA2 |0
+<U74CF> \x66\xF8 |0
+<U74D4> \x67\x99 |0
+<U74D5> \x8F\x82 |0
+<U74D6> \x67\x98 |0
+<U74D7> \x8F\x84 |0
+<U74D8> \x8F\x81 |0
+<U74D9> \x8F\x83 |0
+<U74DA> \x68\x5C |0
+<U74DB> \x90\xC1 |0
+<U74DC> \x48\xA1 |3
+<U74DC> \x4D\x8B |0
+<U74DD> \x6C\xB0 |0
+<U74DE> \x70\xFD |0
+<U74DF> \x71\x41 |0
+<U74E0> \x58\x44 |0
+<U74E1> \x7B\x47 |0
+<U74E2> \x62\xC6 |0
+<U74E3> \x66\x6E |0
+<U74E4> \x67\xE6 |0
+<U74E5> \x90\xC2 |0
+<U74E6> \x48\xA2 |3
+<U74E6> \x4D\x8C |0
+<U74E8> \x6C\xB1 |0
+<U74E9> \x46\xF8 |0
+<U74EC> \x6E\xB9 |0
+<U74EE> \x6E\xBA |0
+<U74F4> \x71\x42 |0
+<U74F5> \x71\x43 |0
+<U74F6> \x58\x45 |0
+<U74F7> \x58\x46 |0
+<U74FB> \x77\xB0 |0
+<U74FD> \x7B\x4A |0
+<U74FE> \x7B\x49 |0
+<U74FF> \x7B\x48 |0
+<U7500> \x7E\x9E |0
+<U7502> \x7E\x9F |0
+<U7503> \x7E\xA0 |0
+<U7504> \x5E\xE8 |0
+<U7507> \x81\xB6 |0
+<U7508> \x81\xB5 |0
+<U750B> \x84\xD4 |0
+<U750C> \x62\xC7 |0
+<U750D> \x62\xC8 |0
+<U750F> \x87\x7F |0
+<U7510> \x87\x7C |0
+<U7511> \x87\x7D |0
+<U7512> \x87\x7E |0
+<U7513> \x89\xB6 |0
+<U7514> \x89\xB5 |0
+<U7515> \x65\x88 |0
+<U7516> \x8B\xA6 |0
+<U7517> \x8E\x8E |0
+<U7518> \x48\xA3 |3
+<U7518> \x4D\x8D |0
+<U751A> \x53\x69 |0
+<U751C> \x58\x47 |0
+<U751D> \x7B\x4B |0
+<U751F> \x48\xA4 |3
+<U751F> \x4D\x8E |0
+<U7521> \x71\x44 |0
+<U7522> \x58\x48 |0
+<U7525> \x5A\x8A |0
+<U7526> \x5A\x8B |0
+<U7528> \x48\xA5 |3
+<U7528> \x4D\x8F |0
+<U7529> \x4D\x90 |0
+<U752A> \x69\xE5 |0
+<U752B> \x4F\xAC |0
+<U752C> \x4F\xAB |0
+<U752D> \x53\x6A |0
+<U752E> \x6E\xBB |0
+<U752F> \x77\xB1 |0
+<U7530> \x48\xA6 |3
+<U7530> \x4D\x91 |0
+<U7531> \x4D\x92 |0
+<U7532> \x4D\x93 |0
+<U7533> \x4D\x94 |0
+<U7537> \x4F\xAD |0
+<U7538> \x4F\xAE |0
+<U7539> \x6A\xEE |0
+<U753A> \x6A\xED |0
+<U753D> \x51\x98 |0
+<U753E> \x6C\xB4 |0
+<U753F> \x6C\xB2 |0
+<U7540> \x6C\xB3 |0
+<U7547> \x6E\xBC |0
+<U7548> \x6E\xBD |0
+<U754B> \x53\x6E |0
+<U754C> \x53\x6C |0
+<U754E> \x53\x6D |0
+<U754F> \x53\x6B |0
+<U7554> \x55\x85 |0
+<U7559> \x55\x89 |0
+<U755A> \x55\x88 |0
+<U755B> \x71\x45 |0
+<U755C> \x55\x87 |0
+<U755D> \x55\x86 |0
+<U755F> \x71\x46 |0
+<U7562> \x58\x4B |0
+<U7563> \x74\x61 |0
+<U7564> \x74\x60 |0
+<U7565> \x58\x49 |0
+<U7566> \x58\x4A |0
+<U756A> \x5A\x8D |0
+<U756B> \x5A\x8C |0
+<U756C> \x77\xB3 |0
+<U756F> \x77\xB2 |0
+<U7570> \x58\x4C |0
+<U7576> \x5C\xB4 |0
+<U7577> \x7B\x4D |0
+<U7578> \x5C\xB5 |0
+<U7579> \x7B\x4C |0
+<U757D> \x7E\xA1 |0
+<U757E> \x81\xB7 |0
+<U757F> \x60\xE9 |0
+<U7580> \x84\xD5 |0
+<U7584> \x87\x81 |0
+<U7586> \x66\x70 |0
+<U7587> \x66\x6F |0
+<U758A> \x67\xE7 |0
+<U758B> \x48\xA7 |3
+<U758B> \x4D\x95 |0
+<U758C> \x6C\xB5 |0
+<U758F> \x58\x4D |0
+<U7590> \x7E\xA2 |0
+<U7591> \x5E\xE9 |0
+<U7592> \x48\xA8 |0
+<U7594> \x6A\xEF |0
+<U7595> \x6A\xF0 |0
+<U7598> \x6C\xB6 |0
+<U7599> \x51\x9A |0
+<U759A> \x51\x9B |0
+<U759D> \x51\x99 |0
+<U75A2> \x53\x72 |0
+<U75A3> \x53\x73 |0
+<U75A4> \x53\x70 |0
+<U75A5> \x53\x71 |0
+<U75A7> \x6E\xBE |0
+<U75AA> \x6E\xBF |0
+<U75AB> \x53\x6F |0
+<U75B0> \x71\x47 |0
+<U75B2> \x55\x8D |0
+<U75B3> \x55\x8E |0
+<U75B5> \x58\x50 |0
+<U75B6> \x71\x4D |0
+<U75B8> \x55\x93 |0
+<U75B9> \x55\x91 |0
+<U75BA> \x71\x4E |0
+<U75BB> \x71\x49 |0
+<U75BC> \x55\x90 |0
+<U75BD> \x55\x8F |0
+<U75BE> \x55\x8A |0
+<U75BF> \x71\x4C |0
+<U75C0> \x71\x4B |0
+<U75C1> \x71\x48 |0
+<U75C2> \x55\x92 |0
+<U75C4> \x71\x4A |0
+<U75C5> \x55\x8B |0
+<U75C7> \x55\x8C |0
+<U75CA> \x58\x51 |0
+<U75CB> \x74\x65 |0
+<U75CC> \x74\x66 |0
+<U75CD> \x58\x52 |0
+<U75CE> \x74\x62 |0
+<U75CF> \x74\x64 |0
+<U75D0> \x74\x68 |0
+<U75D1> \x74\x67 |0
+<U75D2> \x74\x63 |0
+<U75D4> \x58\x4E |0
+<U75D5> \x58\x4F |0
+<U75D7> \x77\xBB |0
+<U75D8> \x5A\x92 |0
+<U75D9> \x5A\x91 |0
+<U75DA> \x77\xB5 |0
+<U75DB> \x5A\x8F |0
+<U75DD> \x77\xB8 |0
+<U75DE> \x5A\x93 |0
+<U75DF> \x77\xB9 |0
+<U75E0> \x5A\x94 |0
+<U75E1> \x77\xB6 |0
+<U75E2> \x5A\x8E |0
+<U75E3> \x5A\x90 |0
+<U75E4> \x77\xBA |0
+<U75E6> \x77\xB7 |0
+<U75E7> \x77\xB4 |0
+<U75ED> \x7B\x5A |0
+<U75EF> \x7B\x4F |0
+<U75F0> \x5C\xB7 |0
+<U75F1> \x5C\xBA |0
+<U75F2> \x5C\xB9 |0
+<U75F3> \x5C\xBE |0
+<U75F4> \x5C\xBD |0
+<U75F5> \x7B\x5B |0
+<U75F6> \x7B\x59 |0
+<U75F7> \x7B\x52 |0
+<U75F8> \x7B\x56 |0
+<U75F9> \x7B\x55 |0
+<U75FA> \x5C\xBB |0
+<U75FB> \x7B\x58 |0
+<U75FC> \x7B\x54 |0
+<U75FD> \x7B\x5C |0
+<U75FE> \x7B\x53 |0
+<U75FF> \x5C\xBC |0
+<U7600> \x5C\xB6 |0
+<U7601> \x5C\xB8 |0
+<U7603> \x7B\x51 |0
+<U7608> \x7E\xA4 |0
+<U7609> \x5E\xED |0
+<U760A> \x7E\xA8 |0
+<U760B> \x5E\xEC |0
+<U760C> \x7E\xA5 |0
+<U760D> \x5E\xEB |0
+<U760F> \x7B\x50 |0
+<U7610> \x7B\x57 |0
+<U7611> \x7E\xA7 |0
+<U7613> \x5E\xEE |0
+<U7614> \x7E\xA9 |0
+<U7615> \x7E\xA6 |0
+<U7616> \x7E\xA3 |0
+<U7619> \x81\xBA |0
+<U761A> \x81\xBE |0
+<U761B> \x81\xC0 |0
+<U761C> \x81\xBC |0
+<U761D> \x81\xBB |0
+<U761E> \x81\xB9 |0
+<U761F> \x60\xEC |0
+<U7620> \x60\xEA |0
+<U7621> \x60\xEF |0
+<U7622> \x60\xF0 |0
+<U7623> \x81\xBD |0
+<U7624> \x60\xED |0
+<U7625> \x81\xB8 |0
+<U7626> \x60\xEE |0
+<U7627> \x5E\xEA |0
+<U7628> \x81\xBF |0
+<U7629> \x60\xEB |0
+<U762D> \x84\xD7 |0
+<U762F> \x84\xD6 |0
+<U7630> \x84\xDE |0
+<U7631> \x84\xD8 |0
+<U7632> \x84\xDD |0
+<U7633> \x84\xDA |0
+<U7634> \x62\xC9 |0
+<U7635> \x84\xDC |0
+<U7638> \x62\xCA |0
+<U763A> \x62\xCB |0
+<U763C> \x84\xDB |0
+<U763D> \x84\xD9 |0
+<U7642> \x64\x63 |0
+<U7643> \x87\x82 |0
+<U7646> \x64\x62 |0
+<U7647> \x87\x85 |0
+<U7648> \x87\x83 |0
+<U7649> \x87\x84 |0
+<U764C> \x64\x64 |0
+<U7650> \x89\xBA |0
+<U7652> \x65\x8B |0
+<U7653> \x89\xBB |0
+<U7656> \x65\x89 |0
+<U7657> \x89\xBC |0
+<U7658> \x65\x8A |0
+<U7659> \x89\xB9 |0
+<U765A> \x89\xBD |0
+<U765C> \x89\xB7 |0
+<U765F> \x66\x71 |0
+<U7660> \x8B\xA7 |0
+<U7661> \x66\x72 |0
+<U7662> \x66\xF9 |0
+<U7664> \x89\xB8 |0
+<U7665> \x66\xFA |0
+<U7669> \x67\x9A |0
+<U766A> \x8E\x8F |0
+<U766C> \x67\xE9 |0
+<U766D> \x8F\x85 |0
+<U766E> \x67\xE8 |0
+<U7670> \x90\x5B |0
+<U7671> \x68\x82 |0
+<U7672> \x68\x83 |0
+<U7675> \x91\xBC |0
+<U7676> \x48\xA9 |0
+<U7678> \x53\x74 |0
+<U7679> \x6E\xC0 |0
+<U767B> \x5A\x95 |0
+<U767C> \x5A\x96 |0
+<U767D> \x48\xAA |3
+<U767D> \x4D\x96 |0
+<U767E> \x4E\x6B |0
+<U767F> \x69\xE6 |0
+<U7681> \x6A\xF1 |0
+<U7682> \x4F\xAF |0
+<U7684> \x51\x9C |0
+<U7686> \x53\x75 |0
+<U7687> \x53\x76 |0
+<U7688> \x53\x77 |0
+<U7689> \x74\x6A |0
+<U768A> \x71\x4F |0
+<U768B> \x55\x94 |0
+<U768E> \x58\x53 |0
+<U768F> \x74\x69 |0
+<U7692> \x77\xBD |0
+<U7693> \x5A\x98 |0
+<U7695> \x77\xBC |0
+<U7696> \x5A\x97 |0
+<U7699> \x7B\x5D |0
+<U769A> \x60\xF1 |0
+<U769B> \x81\xC4 |0
+<U769C> \x81\xC1 |0
+<U769D> \x81\xC2 |0
+<U769E> \x81\xC3 |0
+<U76A4> \x87\x86 |0
+<U76A6> \x89\xBE |0
+<U76AA> \x8D\x61 |0
+<U76AB> \x8D\x60 |0
+<U76AD> \x8F\x86 |0
+<U76AE> \x48\xAB |3
+<U76AE> \x4D\x97 |0
+<U76AF> \x6C\xB7 |0
+<U76B0> \x55\x95 |0
+<U76B4> \x5A\x99 |0
+<U76B5> \x7B\x5E |0
+<U76B8> \x7E\xAA |0
+<U76BA> \x60\xF2 |0
+<U76BB> \x84\xDF |0
+<U76BD> \x89\xBF |0
+<U76BE> \x8D\x62 |0
+<U76BF> \x48\xAC |3
+<U76BF> \x4D\x98 |0
+<U76C2> \x51\x9D |0
+<U76C3> \x53\x7A |0
+<U76C4> \x6E\xC1 |0
+<U76C5> \x53\x7B |0
+<U76C6> \x53\x79 |0
+<U76C8> \x53\x78 |0
+<U76C9> \x71\x50 |0
+<U76CA> \x55\x96 |0
+<U76CD> \x55\x97 |0
+<U76CE> \x55\x98 |0
+<U76D2> \x58\x55 |0
+<U76D3> \x74\x6B |0
+<U76D4> \x58\x54 |0
+<U76DA> \x77\xBE |0
+<U76DB> \x58\x56 |0
+<U76DC> \x5A\x9A |0
+<U76DD> \x7B\x5F |0
+<U76DE> \x5C\xBF |0
+<U76DF> \x5C\xC0 |0
+<U76E1> \x5E\xEF |0
+<U76E3> \x5E\xF0 |0
+<U76E4> \x60\xF3 |0
+<U76E5> \x62\xCD |0
+<U76E6> \x84\xE0 |0
+<U76E7> \x62\xCC |0
+<U76E9> \x87\x87 |0
+<U76EA> \x64\x65 |0
+<U76EC> \x89\xC0 |0
+<U76ED> \x8D\x63 |0
+<U76EE> \x48\xAD |3
+<U76EE> \x4D\x99 |0
+<U76EF> \x4F\xB0 |0
+<U76F0> \x6C\xBA |0
+<U76F1> \x6C\xB9 |0
+<U76F2> \x51\x9E |0
+<U76F3> \x6C\xB8 |0
+<U76F4> \x51\x9F |0
+<U76F5> \x6C\xBB |0
+<U76F7> \x6E\xC7 |0
+<U76F8> \x53\x7E |0
+<U76F9> \x53\x7D |0
+<U76FA> \x6E\xC9 |0
+<U76FB> \x6E\xC8 |0
+<U76FC> \x53\x83 |0
+<U76FE> \x53\x82 |0
+<U7701> \x53\x7C |0
+<U7703> \x6E\xC3 |0
+<U7704> \x6E\xC4 |0
+<U7705> \x6E\xC5 |0
+<U7707> \x53\x84 |0
+<U7708> \x6E\xC2 |0
+<U7709> \x53\x7F |0
+<U770A> \x6E\xC6 |0
+<U770B> \x53\x81 |0
+<U7710> \x71\x53 |0
+<U7711> \x71\x57 |0
+<U7712> \x71\x55 |0
+<U7713> \x71\x54 |0
+<U7715> \x71\x58 |0
+<U7719> \x71\x59 |0
+<U771A> \x71\x5A |0
+<U771B> \x71\x52 |0
+<U771D> \x71\x51 |0
+<U771F> \x55\x9A |0
+<U7720> \x55\x9B |0
+<U7722> \x71\x5B |0
+<U7723> \x71\x56 |0
+<U7725> \x74\x74 |0
+<U7727> \x71\x5C |0
+<U7728> \x55\x9C |0
+<U7729> \x55\x99 |0
+<U772D> \x74\x6E |0
+<U772F> \x74\x6D |0
+<U7731> \x74\x6F |0
+<U7732> \x74\x70 |0
+<U7733> \x74\x72 |0
+<U7734> \x74\x71 |0
+<U7735> \x74\x76 |0
+<U7736> \x58\x5A |0
+<U7737> \x58\x57 |0
+<U7738> \x58\x5B |0
+<U7739> \x74\x6C |0
+<U773A> \x58\x5C |0
+<U773B> \x74\x75 |0
+<U773C> \x58\x59 |0
+<U773D> \x74\x73 |0
+<U773E> \x58\x58 |0
+<U7744> \x77\xC1 |0
+<U7745> \x77\xC3 |0
+<U7746> \x77\xBF |0
+<U7747> \x77\xC0 |0
+<U774A> \x77\xC4 |0
+<U774B> \x77\xC6 |0
+<U774C> \x77\xC7 |0
+<U774D> \x77\xC2 |0
+<U774E> \x77\xC5 |0
+<U774F> \x5A\x9B |0
+<U7752> \x7B\x63 |0
+<U7754> \x7B\x68 |0
+<U7755> \x7B\x60 |0
+<U7756> \x7B\x64 |0
+<U7759> \x7B\x69 |0
+<U775A> \x7B\x65 |0
+<U775B> \x5C\xC1 |0
+<U775C> \x5C\xC9 |0
+<U775E> \x5C\xC4 |0
+<U775F> \x7B\x61 |0
+<U7760> \x7B\x62 |0
+<U7761> \x5E\xF4 |0
+<U7762> \x5C\xCC |0
+<U7763> \x5C\xC5 |0
+<U7765> \x5C\xCA |0
+<U7766> \x5C\xC3 |0
+<U7767> \x7B\x67 |0
+<U7768> \x5C\xCB |0
+<U7769> \x7B\x66 |0
+<U776A> \x5C\xC7 |0
+<U776B> \x5C\xC2 |0
+<U776C> \x5C\xC8 |0
+<U776D> \x7B\x6A |0
+<U776E> \x7E\xAF |0
+<U776F> \x7E\xB1 |0
+<U7779> \x5C\xC6 |0
+<U777C> \x7E\xAC |0
+<U777D> \x5E\xF2 |0
+<U777E> \x7E\xB2 |0
+<U777F> \x5E\xF3 |0
+<U7780> \x7E\xB0 |0
+<U7781> \x7E\xAB |0
+<U7782> \x7E\xAE |0
+<U7783> \x7E\xB3 |0
+<U7784> \x5E\xF1 |0
+<U7785> \x7E\xAD |0
+<U7787> \x60\xF5 |0
+<U7788> \x81\xC8 |0
+<U7789> \x81\xC7 |0
+<U778B> \x60\xF8 |0
+<U778C> \x60\xF6 |0
+<U778D> \x81\xC5 |0
+<U778E> \x60\xF4 |0
+<U778F> \x81\xC6 |0
+<U7791> \x60\xF7 |0
+<U7795> \x84\xE8 |0
+<U7797> \x84\xEA |0
+<U7799> \x84\xE9 |0
+<U779A> \x84\xE1 |0
+<U779B> \x84\xE5 |0
+<U779C> \x84\xE4 |0
+<U779D> \x84\xE2 |0
+<U779E> \x62\xCF |0
+<U779F> \x62\xD0 |0
+<U77A0> \x62\xCE |0
+<U77A1> \x84\xE3 |0
+<U77A2> \x84\xE6 |0
+<U77A3> \x84\xE7 |0
+<U77A5> \x62\xD1 |0
+<U77A7> \x64\x6A |0
+<U77A8> \x87\x8F |0
+<U77AA> \x64\x67 |0
+<U77AB> \x87\x89 |0
+<U77AC> \x64\x69 |0
+<U77AD> \x64\x6B |0
+<U77B0> \x64\x68 |0
+<U77B1> \x87\x8E |0
+<U77B2> \x87\x8A |0
+<U77B3> \x64\x66 |0
+<U77B4> \x87\x8D |0
+<U77B5> \x87\x88 |0
+<U77B6> \x87\x8C |0
+<U77B7> \x87\x8B |0
+<U77BA> \x89\xC2 |0
+<U77BB> \x65\x8E |0
+<U77BC> \x65\x8F |0
+<U77BD> \x65\x8C |0
+<U77BF> \x65\x8D |0
+<U77C2> \x89\xC1 |0
+<U77C4> \x8B\xAA |0
+<U77C7> \x66\x73 |0
+<U77C9> \x8B\xA8 |0
+<U77CA> \x8B\xA9 |0
+<U77CC> \x8D\x64 |0
+<U77CD> \x8D\x67 |0
+<U77CE> \x8D\x65 |0
+<U77CF> \x8D\x66 |0
+<U77D0> \x8E\x90 |0
+<U77D3> \x67\x9B |0
+<U77D4> \x90\x5C |0
+<U77D5> \x90\xC3 |0
+<U77D7> \x68\x84 |0
+<U77D8> \x91\x4A |0
+<U77D9> \x91\x4B |0
+<U77DA> \x68\xB2 |0
+<U77DB> \x48\xAE |3
+<U77DB> \x4D\x9A |0
+<U77DC> \x53\x85 |0
+<U77DE> \x77\xC8 |0
+<U77E0> \x7B\x6B |0
+<U77E2> \x48\xAF |3
+<U77E2> \x4D\x9B |0
+<U77E3> \x4F\xB1 |0
+<U77E5> \x51\xA0 |0
+<U77E7> \x6E\xCA |0
+<U77E8> \x6E\xCB |0
+<U77E9> \x55\x9D |0
+<U77EC> \x77\xC9 |0
+<U77ED> \x5A\x9C |0
+<U77EE> \x5C\xCD |0
+<U77EF> \x64\x6C |0
+<U77F0> \x87\x90 |0
+<U77F1> \x8B\xAB |0
+<U77F2> \x8D\x68 |0
+<U77F3> \x48\xB0 |3
+<U77F3> \x4D\x9C |0
+<U77F7> \x6C\xC1 |0
+<U77F8> \x6C\xBC |0
+<U77F9> \x6C\xBE |0
+<U77FA> \x6C\xC0 |0
+<U77FB> \x6C\xBF |0
+<U77FC> \x6C\xBD |0
+<U77FD> \x51\xA1 |0
+<U7802> \x53\x86 |0
+<U7803> \x6E\xD4 |0
+<U7805> \x6E\xCF |0
+<U7806> \x6E\xCC |0
+<U7809> \x6E\xD3 |0
+<U780C> \x53\x88 |0
+<U780D> \x53\x89 |0
+<U780E> \x6E\xD2 |0
+<U780F> \x6E\xD1 |0
+<U7810> \x6E\xD0 |0
+<U7811> \x6E\xCD |0
+<U7812> \x6E\xCE |0
+<U7813> \x6E\xD5 |0
+<U7814> \x53\x87 |0
+<U781D> \x55\xA1 |0
+<U781F> \x55\xA7 |0
+<U7820> \x55\xA6 |0
+<U7821> \x71\x65 |0
+<U7822> \x71\x5F |0
+<U7823> \x71\x5D |0
+<U7825> \x55\xA4 |0
+<U7826> \x74\x7D |0
+<U7827> \x55\x9F |0
+<U7828> \x71\x62 |0
+<U7829> \x71\x66 |0
+<U782A> \x71\x68 |0
+<U782B> \x71\x64 |0
+<U782C> \x71\x5E |0
+<U782D> \x55\xA5 |0
+<U782E> \x71\x63 |0
+<U782F> \x71\x61 |0
+<U7830> \x55\x9E |0
+<U7831> \x71\x69 |0
+<U7832> \x55\xA8 |0
+<U7833> \x71\x67 |0
+<U7834> \x55\xA2 |0
+<U7835> \x71\x60 |0
+<U7837> \x55\xA3 |0
+<U7838> \x55\xA0 |0
+<U7843> \x58\x5E |0
+<U7845> \x74\x7E |0
+<U7848> \x74\x77 |0
+<U7849> \x74\x79 |0
+<U784A> \x74\x7B |0
+<U784C> \x74\x7C |0
+<U784D> \x74\x7A |0
+<U784E> \x58\x5F |0
+<U7850> \x74\x7F |0
+<U7852> \x74\x78 |0
+<U785C> \x77\xCD |0
+<U785D> \x5A\x9D |0
+<U785E> \x77\xD5 |0
+<U7860> \x77\xCA |0
+<U7862> \x77\xD6 |0
+<U7864> \x77\xCB |0
+<U7865> \x77\xCC |0
+<U7868> \x77\xD4 |0
+<U7869> \x77\xD3 |0
+<U786A> \x77\xD0 |0
+<U786B> \x58\x5D |0
+<U786C> \x5A\x9E |0
+<U786D> \x77\xCE |0
+<U786E> \x77\xD1 |0
+<U786F> \x5A\x9F |0
+<U7870> \x77\xD2 |0
+<U7871> \x77\xCF |0
+<U7879> \x7B\x76 |0
+<U787B> \x7B\x7A |0
+<U787C> \x5C\xD4 |0
+<U787E> \x7E\xB9 |0
+<U787F> \x5C\xD7 |0
+<U7880> \x7B\x78 |0
+<U7883> \x7B\x75 |0
+<U7884> \x7B\x70 |0
+<U7885> \x7B\x72 |0
+<U7886> \x7B\x73 |0
+<U7887> \x7B\x6C |0
+<U7889> \x5C\xD3 |0
+<U788C> \x5C\xD2 |0
+<U788E> \x5C\xCE |0
+<U788F> \x7B\x6F |0
+<U7891> \x5C\xD5 |0
+<U7893> \x5C\xD6 |0
+<U7894> \x7B\x6E |0
+<U7895> \x7B\x71 |0
+<U7896> \x7B\x79 |0
+<U7897> \x5C\xD0 |0
+<U7898> \x5C\xD1 |0
+<U7899> \x7B\x77 |0
+<U789A> \x7B\x6D |0
+<U789E> \x7E\xBB |0
+<U789F> \x5E\xF6 |0
+<U78A0> \x7E\xBD |0
+<U78A1> \x7B\x74 |0
+<U78A2> \x7E\xBF |0
+<U78A3> \x5E\xFA |0
+<U78A4> \x7E\xC0 |0
+<U78A5> \x7E\xBC |0
+<U78A7> \x5E\xF7 |0
+<U78A8> \x7E\xB8 |0
+<U78A9> \x5E\xF9 |0
+<U78AA> \x7E\xB5 |0
+<U78AB> \x7E\xBA |0
+<U78AC> \x7E\xBE |0
+<U78AD> \x7E\xB7 |0
+<U78B0> \x5C\xCF |0
+<U78B2> \x7E\xB4 |0
+<U78B3> \x5E\xF8 |0
+<U78B4> \x7E\xB6 |0
+<U78BA> \x60\xFB |0
+<U78BB> \x81\xCA |0
+<U78BC> \x61\x42 |0
+<U78BE> \x60\xFD |0
+<U78C1> \x5E\xF5 |0
+<U78C3> \x81\xD1 |0
+<U78C4> \x81\xD2 |0
+<U78C5> \x60\xFA |0
+<U78C8> \x81\xD0 |0
+<U78C9> \x81\xD3 |0
+<U78CA> \x60\xFC |0
+<U78CB> \x60\xF9 |0
+<U78CC> \x81\xCC |0
+<U78CD> \x81\xC9 |0
+<U78CE> \x81\xCE |0
+<U78CF> \x81\xCB |0
+<U78D0> \x61\x43 |0
+<U78D1> \x81\xCD |0
+<U78D4> \x81\xCF |0
+<U78D5> \x61\x41 |0
+<U78DA> \x62\xD3 |0
+<U78DB> \x84\xF1 |0
+<U78DD> \x84\xEB |0
+<U78DE> \x84\xEF |0
+<U78DF> \x84\xF5 |0
+<U78E0> \x84\xF6 |0
+<U78E1> \x84\xF2 |0
+<U78E2> \x84\xF3 |0
+<U78E3> \x84\xF0 |0
+<U78E5> \x84\xED |0
+<U78E7> \x62\xD5 |0
+<U78E8> \x62\xD2 |0
+<U78E9> \x84\xEC |0
+<U78EA> \x84\xEE |0
+<U78EC> \x62\xD4 |0
+<U78ED> \x84\xF4 |0
+<U78EF> \x64\x70 |0
+<U78F2> \x87\x96 |0
+<U78F3> \x87\x91 |0
+<U78F4> \x64\x6F |0
+<U78F7> \x64\x6D |0
+<U78F9> \x87\x98 |0
+<U78FA> \x64\x6E |0
+<U78FB> \x87\x94 |0
+<U78FC> \x87\x95 |0
+<U78FD> \x87\x92 |0
+<U78FE> \x87\x99 |0
+<U78FF> \x89\xC3 |0
+<U7901> \x64\x71 |0
+<U7902> \x87\x93 |0
+<U7904> \x87\x9A |0
+<U7905> \x87\x97 |0
+<U7909> \x89\xC7 |0
+<U790C> \x89\xC4 |0
+<U790E> \x65\x90 |0
+<U7910> \x89\xC8 |0
+<U7911> \x89\xCA |0
+<U7912> \x89\xC9 |0
+<U7913> \x89\xC5 |0
+<U7914> \x89\xC6 |0
+<U7917> \x8B\xB0 |0
+<U7919> \x66\x74 |0
+<U791B> \x8B\xAD |0
+<U791C> \x8B\xAF |0
+<U791D> \x8B\xAC |0
+<U791E> \x8B\xB1 |0
+<U7921> \x8B\xAE |0
+<U7923> \x8D\x6A |0
+<U7924> \x8D\x6D |0
+<U7925> \x8D\x69 |0
+<U7926> \x66\xFB |0
+<U7927> \x8D\x6B |0
+<U7928> \x8D\x6C |0
+<U7929> \x8D\x6E |0
+<U792A> \x66\xFC |0
+<U792B> \x67\x41 |0
+<U792C> \x66\xFD |0
+<U792D> \x8E\x91 |0
+<U792F> \x8E\x93 |0
+<U7931> \x8E\x92 |0
+<U7935> \x8F\x87 |0
+<U7938> \x90\xC4 |0
+<U7939> \x91\x4C |0
+<U793A> \x48\xB1 |3
+<U793A> \x4D\x9D |0
+<U793D> \x6A\xF2 |0
+<U793E> \x51\xA2 |0
+<U793F> \x6C\xC3 |0
+<U7940> \x51\xA3 |0
+<U7941> \x51\xA4 |0
+<U7942> \x6C\xC2 |0
+<U7944> \x6E\xDA |0
+<U7945> \x6E\xD9 |0
+<U7946> \x53\x8A |0
+<U7947> \x53\x8D |0
+<U7948> \x53\x8C |0
+<U7949> \x53\x8B |0
+<U794A> \x6E\xD6 |0
+<U794B> \x6E\xD8 |0
+<U794C> \x6E\xD7 |0
+<U794F> \x71\x6C |0
+<U7950> \x55\xAA |0
+<U7951> \x71\x70 |0
+<U7952> \x71\x6F |0
+<U7953> \x71\x6E |0
+<U7954> \x71\x6A |0
+<U7955> \x55\xA9 |0
+<U7956> \x55\xAD |0
+<U7957> \x55\xB0 |0
+<U795A> \x55\xB1 |0
+<U795B> \x71\x6B |0
+<U795C> \x71\x6D |0
+<U795D> \x55\xAF |0
+<U795E> \x55\xAE |0
+<U795F> \x55\xAC |0
+<U7960> \x55\xAB |0
+<U7961> \x74\x87 |0
+<U7963> \x74\x85 |0
+<U7964> \x74\x81 |0
+<U7965> \x58\x60 |0
+<U7967> \x74\x82 |0
+<U7968> \x58\x61 |0
+<U7969> \x74\x83 |0
+<U796A> \x74\x84 |0
+<U796B> \x74\x86 |0
+<U796D> \x58\x62 |0
+<U7970> \x77\xDA |0
+<U7972> \x77\xD9 |0
+<U7973> \x77\xD8 |0
+<U7974> \x77\xD7 |0
+<U7979> \x7B\x7E |0
+<U797A> \x5C\xD8 |0
+<U797C> \x7B\x7B |0
+<U797D> \x7B\x7D |0
+<U797F> \x5C\xD9 |0
+<U7981> \x5C\xDA |0
+<U7982> \x7B\x7C |0
+<U7988> \x7E\xC9 |0
+<U798A> \x7E\xC2 |0
+<U798B> \x7E\xC3 |0
+<U798D> \x5E\xFD |0
+<U798E> \x5E\xFB |0
+<U798F> \x5E\xFC |0
+<U7990> \x7E\xCB |0
+<U7992> \x7E\xCA |0
+<U7993> \x7E\xC7 |0
+<U7994> \x7E\xC6 |0
+<U7995> \x7E\xC5 |0
+<U7996> \x7E\xC4 |0
+<U7997> \x7E\xC8 |0
+<U7998> \x7E\xC1 |0
+<U799A> \x81\xD4 |0
+<U799B> \x81\xD9 |0
+<U799C> \x81\xD7 |0
+<U79A0> \x81\xD6 |0
+<U79A1> \x81\xD5 |0
+<U79A2> \x81\xD8 |0
+<U79A4> \x84\xF7 |0
+<U79A6> \x62\xD6 |0
+<U79A7> \x64\x72 |0
+<U79A8> \x87\x9C |0
+<U79AA> \x64\x73 |0
+<U79AB> \x87\x9B |0
+<U79AC> \x89\xCC |0
+<U79AD> \x89\xCB |0
+<U79AE> \x65\x91 |0
+<U79B0> \x8B\xB2 |0
+<U79B1> \x66\x75 |0
+<U79B2> \x8D\x6F |0
+<U79B3> \x67\xEA |0
+<U79B4> \x8F\x88 |0
+<U79B6> \x90\xC6 |0
+<U79B7> \x90\xC5 |0
+<U79B8> \x48\xB2 |3
+<U79B8> \x69\x88 |0
+<U79B9> \x53\x8E |0
+<U79BA> \x53\x8F |0
+<U79BB> \x74\x88 |0
+<U79BD> \x5C\xDC |0
+<U79BE> \x48\xB3 |3
+<U79BE> \x4D\x9E |0
+<U79BF> \x4F\xB4 |0
+<U79C0> \x4F\xB3 |0
+<U79C1> \x4F\xB2 |0
+<U79C5> \x6C\xC4 |0
+<U79C8> \x51\xA6 |0
+<U79C9> \x51\xA5 |0
+<U79CB> \x53\x92 |0
+<U79CD> \x6E\xDC |0
+<U79CE> \x6E\xDF |0
+<U79CF> \x6E\xDD |0
+<U79D1> \x53\x90 |0
+<U79D2> \x53\x91 |0
+<U79D5> \x6E\xDB |0
+<U79D6> \x6E\xDE |0
+<U79D8> \x55\xB8 |0
+<U79DC> \x71\x77 |0
+<U79DD> \x71\x79 |0
+<U79DE> \x71\x78 |0
+<U79DF> \x55\xB5 |0
+<U79E0> \x71\x73 |0
+<U79E3> \x55\xB3 |0
+<U79E4> \x55\xB2 |0
+<U79E6> \x55\xB6 |0
+<U79E7> \x55\xB4 |0
+<U79E9> \x55\xB7 |0
+<U79EA> \x71\x76 |0
+<U79EB> \x71\x71 |0
+<U79EC> \x71\x72 |0
+<U79ED> \x71\x75 |0
+<U79EE> \x71\x74 |0
+<U79F6> \x74\x8B |0
+<U79F7> \x74\x8C |0
+<U79F8> \x74\x8A |0
+<U79FA> \x74\x89 |0
+<U79FB> \x58\x63 |0
+<U7A00> \x5A\xA4 |0
+<U7A02> \x77\xDB |0
+<U7A03> \x77\xDD |0
+<U7A04> \x77\xDF |0
+<U7A05> \x5A\xA3 |0
+<U7A08> \x5A\xA1 |0
+<U7A0A> \x77\xDC |0
+<U7A0B> \x5A\xA2 |0
+<U7A0C> \x77\xDE |0
+<U7A0D> \x5A\xA0 |0
+<U7A10> \x7B\x89 |0
+<U7A11> \x7B\x7F |0
+<U7A12> \x7B\x83 |0
+<U7A13> \x7B\x87 |0
+<U7A14> \x5C\xE0 |0
+<U7A15> \x7B\x85 |0
+<U7A17> \x7B\x84 |0
+<U7A18> \x7B\x81 |0
+<U7A19> \x7B\x82 |0
+<U7A1A> \x5C\xDE |0
+<U7A1B> \x7B\x88 |0
+<U7A1C> \x5C\xDD |0
+<U7A1E> \x5C\xE2 |0
+<U7A1F> \x5C\xE1 |0
+<U7A20> \x5C\xDF |0
+<U7A22> \x7B\x86 |0
+<U7A26> \x7E\xD1 |0
+<U7A28> \x7E\xD0 |0
+<U7A2B> \x7E\xCC |0
+<U7A2E> \x5F\x41 |0
+<U7A2F> \x7E\xCF |0
+<U7A30> \x7E\xCE |0
+<U7A31> \x5F\x42 |0
+<U7A37> \x61\x48 |0
+<U7A39> \x81\xDB |0
+<U7A3B> \x61\x49 |0
+<U7A3C> \x61\x45 |0
+<U7A3D> \x61\x47 |0
+<U7A3F> \x61\x44 |0
+<U7A40> \x61\x46 |0
+<U7A44> \x84\xF8 |0
+<U7A46> \x62\xD9 |0
+<U7A47> \x84\xFA |0
+<U7A48> \x84\xF9 |0
+<U7A4A> \x7E\xCD |0
+<U7A4B> \x62\xDB |0
+<U7A4C> \x62\xDA |0
+<U7A4D> \x62\xD7 |0
+<U7A4E> \x62\xD8 |0
+<U7A54> \x87\xA1 |0
+<U7A56> \x87\x9F |0
+<U7A57> \x64\x74 |0
+<U7A58> \x87\xA0 |0
+<U7A5A> \x87\xA2 |0
+<U7A5B> \x87\x9E |0
+<U7A5C> \x87\x9D |0
+<U7A5F> \x89\xCD |0
+<U7A60> \x65\x94 |0
+<U7A61> \x65\x92 |0
+<U7A62> \x65\x93 |0
+<U7A67> \x8B\xB3 |0
+<U7A68> \x8B\xB4 |0
+<U7A69> \x66\x77 |0
+<U7A6B> \x66\x76 |0
+<U7A6C> \x8D\x71 |0
+<U7A6D> \x8D\x72 |0
+<U7A6E> \x8D\x70 |0
+<U7A70> \x8F\x89 |0
+<U7A71> \x8F\x8A |0
+<U7A74> \x48\xB4 |3
+<U7A74> \x4D\x9F |0
+<U7A75> \x69\xE7 |0
+<U7A76> \x4F\xB5 |0
+<U7A78> \x6C\xC5 |0
+<U7A79> \x51\xA8 |0
+<U7A7A> \x51\xA7 |0
+<U7A7B> \x6C\xC6 |0
+<U7A7E> \x6E\xE1 |0
+<U7A7F> \x53\x93 |0
+<U7A80> \x6E\xE0 |0
+<U7A81> \x53\x94 |0
+<U7A84> \x55\xB9 |0
+<U7A85> \x71\x7C |0
+<U7A86> \x71\x7A |0
+<U7A87> \x71\x81 |0
+<U7A88> \x55\xBA |0
+<U7A89> \x71\x7B |0
+<U7A8A> \x71\x7F |0
+<U7A8B> \x71\x7D |0
+<U7A8C> \x71\x7E |0
+<U7A8F> \x74\x8D |0
+<U7A90> \x74\x8F |0
+<U7A92> \x58\x64 |0
+<U7A94> \x74\x8E |0
+<U7A95> \x58\x65 |0
+<U7A96> \x5A\xA7 |0
+<U7A97> \x5A\xA6 |0
+<U7A98> \x5A\xA5 |0
+<U7A99> \x77\xE0 |0
+<U7A9E> \x7B\x8C |0
+<U7A9F> \x5C\xE3 |0
+<U7AA0> \x5C\xE4 |0
+<U7AA2> \x7B\x8B |0
+<U7AA3> \x7B\x8A |0
+<U7AA8> \x7E\xD2 |0
+<U7AA9> \x5F\x44 |0
+<U7AAA> \x5F\x43 |0
+<U7AAB> \x7E\xD3 |0
+<U7AAC> \x7E\xD4 |0
+<U7AAE> \x61\x4B |0
+<U7AAF> \x61\x4A |0
+<U7AB1> \x85\x41 |0
+<U7AB2> \x81\xDC |0
+<U7AB3> \x81\xDE |0
+<U7AB4> \x81\xDD |0
+<U7AB5> \x84\xFD |0
+<U7AB6> \x84\xFB |0
+<U7AB7> \x85\x42 |0
+<U7AB8> \x84\xFC |0
+<U7ABA> \x62\xDC |0
+<U7ABE> \x87\xA3 |0
+<U7ABF> \x64\x75 |0
+<U7AC0> \x87\xA4 |0
+<U7AC1> \x87\xA5 |0
+<U7AC4> \x65\x95 |0
+<U7AC5> \x65\x96 |0
+<U7AC7> \x67\x42 |0
+<U7ACA> \x68\x5D |0
+<U7ACB> \x48\xB5 |3
+<U7ACB> \x4D\xA0 |0
+<U7AD1> \x6E\xE2 |0
+<U7AD8> \x71\x82 |0
+<U7AD9> \x55\xBB |0
+<U7ADF> \x58\xFD |0
+<U7AE0> \x58\xFC |0
+<U7AE3> \x5A\xA9 |0
+<U7AE4> \x77\xE2 |0
+<U7AE5> \x5A\xA8 |0
+<U7AE6> \x77\xE1 |0
+<U7AEB> \x7B\x8D |0
+<U7AED> \x5F\x45 |0
+<U7AEE> \x7E\xD5 |0
+<U7AEF> \x5F\x46 |0
+<U7AF6> \x67\x43 |0
+<U7AF7> \x8D\x73 |0
+<U7AF9> \x48\xB6 |3
+<U7AF9> \x4E\x6C |0
+<U7AFA> \x51\xA9 |0
+<U7AFB> \x6C\xC7 |0
+<U7AFD> \x53\x96 |0
+<U7AFF> \x53\x95 |0
+<U7B00> \x6E\xE3 |0
+<U7B01> \x6E\xE4 |0
+<U7B04> \x71\x84 |0
+<U7B05> \x71\x86 |0
+<U7B06> \x55\xBC |0
+<U7B08> \x71\x88 |0
+<U7B09> \x71\x8B |0
+<U7B0A> \x71\x89 |0
+<U7B0E> \x71\x8A |0
+<U7B0F> \x71\x87 |0
+<U7B10> \x71\x83 |0
+<U7B11> \x55\xBD |0
+<U7B12> \x71\x8C |0
+<U7B13> \x71\x85 |0
+<U7B18> \x74\x98 |0
+<U7B19> \x58\x6B |0
+<U7B1A> \x74\xA1 |0
+<U7B1B> \x58\x68 |0
+<U7B1D> \x74\x9A |0
+<U7B1E> \x58\x6C |0
+<U7B20> \x58\x66 |0
+<U7B22> \x74\x95 |0
+<U7B23> \x74\xA2 |0
+<U7B24> \x74\x96 |0
+<U7B25> \x74\x93 |0
+<U7B26> \x58\x6A |0
+<U7B28> \x58\x67 |0
+<U7B2A> \x74\x99 |0
+<U7B2B> \x74\x9C |0
+<U7B2C> \x58\x69 |0
+<U7B2D> \x74\x9D |0
+<U7B2E> \x58\x6D |0
+<U7B2F> \x74\x9E |0
+<U7B30> \x74\x94 |0
+<U7B31> \x74\x9B |0
+<U7B32> \x74\x9F |0
+<U7B33> \x74\x97 |0
+<U7B34> \x74\x92 |0
+<U7B35> \x74\x90 |0
+<U7B38> \x74\xA0 |0
+<U7B3B> \x77\xE4 |0
+<U7B40> \x77\xE9 |0
+<U7B44> \x77\xE5 |0
+<U7B45> \x77\xEB |0
+<U7B46> \x5A\xAC |0
+<U7B47> \x74\x91 |0
+<U7B48> \x77\xE6 |0
+<U7B49> \x5A\xAA |0
+<U7B4A> \x77\xE3 |0
+<U7B4B> \x5A\xB1 |0
+<U7B4C> \x77\xE7 |0
+<U7B4D> \x5A\xB0 |0
+<U7B4E> \x77\xE8 |0
+<U7B4F> \x5A\xB2 |0
+<U7B50> \x5A\xAD |0
+<U7B51> \x5A\xB3 |0
+<U7B52> \x5A\xAE |0
+<U7B54> \x5A\xAF |0
+<U7B56> \x5A\xAB |0
+<U7B58> \x77\xEA |0
+<U7B60> \x5C\xE7 |0
+<U7B61> \x7B\x98 |0
+<U7B63> \x7B\x9B |0
+<U7B64> \x7B\x8F |0
+<U7B65> \x7B\x94 |0
+<U7B66> \x7B\x8E |0
+<U7B67> \x5C\xE9 |0
+<U7B69> \x7B\x92 |0
+<U7B6D> \x7B\x90 |0
+<U7B6E> \x5C\xE8 |0
+<U7B70> \x7B\x97 |0
+<U7B71> \x7B\x96 |0
+<U7B72> \x7B\x93 |0
+<U7B73> \x7B\x95 |0
+<U7B74> \x7B\x91 |0
+<U7B75> \x5F\x4A |0
+<U7B76> \x7B\x9A |0
+<U7B77> \x5C\xE5 |0
+<U7B78> \x7B\x99 |0
+<U7B82> \x7E\xE5 |0
+<U7B84> \x5F\x51 |0
+<U7B85> \x7E\xE0 |0
+<U7B87> \x5F\x50 |0
+<U7B88> \x7E\xD6 |0
+<U7B8A> \x7E\xD8 |0
+<U7B8B> \x5F\x49 |0
+<U7B8C> \x7E\xDD |0
+<U7B8D> \x7E\xDC |0
+<U7B8E> \x7E\xDF |0
+<U7B8F> \x5F\x4E |0
+<U7B90> \x7E\xDA |0
+<U7B91> \x7E\xD9 |0
+<U7B94> \x5F\x4D |0
+<U7B95> \x5F\x48 |0
+<U7B96> \x7E\xDB |0
+<U7B97> \x5F\x4B |0
+<U7B98> \x7E\xE1 |0
+<U7B99> \x7E\xE3 |0
+<U7B9B> \x7E\xDE |0
+<U7B9C> \x7E\xD7 |0
+<U7B9D> \x5F\x4C |0
+<U7BA0> \x61\x53 |0
+<U7BA1> \x5F\x47 |0
+<U7BA4> \x7E\xE4 |0
+<U7BAC> \x81\xE2 |0
+<U7BAD> \x61\x4C |0
+<U7BAF> \x81\xE4 |0
+<U7BB1> \x61\x4D |0
+<U7BB4> \x61\x4F |0
+<U7BB5> \x81\xE7 |0
+<U7BB7> \x81\xDF |0
+<U7BB8> \x5F\x4F |0
+<U7BB9> \x81\xE5 |0
+<U7BBE> \x81\xE1 |0
+<U7BC0> \x5C\xE6 |0
+<U7BC1> \x61\x52 |0
+<U7BC4> \x61\x4E |0
+<U7BC6> \x61\x50 |0
+<U7BC7> \x61\x51 |0
+<U7BC9> \x62\xDF |0
+<U7BCA> \x81\xE6 |0
+<U7BCB> \x81\xE0 |0
+<U7BCC> \x61\x54 |0
+<U7BCE> \x81\xE3 |0
+<U7BD4> \x85\x4C |0
+<U7BD5> \x85\x47 |0
+<U7BD8> \x85\x51 |0
+<U7BD9> \x62\xDD |0
+<U7BDA> \x85\x49 |0
+<U7BDB> \x62\xE1 |0
+<U7BDC> \x85\x4F |0
+<U7BDD> \x85\x46 |0
+<U7BDE> \x85\x43 |0
+<U7BDF> \x85\x52 |0
+<U7BE0> \x64\x7B |0
+<U7BE1> \x62\xE2 |0
+<U7BE2> \x85\x4E |0
+<U7BE3> \x85\x44 |0
+<U7BE4> \x62\xE0 |0
+<U7BE5> \x85\x48 |0
+<U7BE6> \x62\xE4 |0
+<U7BE7> \x85\x45 |0
+<U7BE8> \x85\x4A |0
+<U7BE9> \x62\xE3 |0
+<U7BEA> \x85\x4D |0
+<U7BEB> \x85\x50 |0
+<U7BF0> \x87\xB7 |0
+<U7BF1> \x87\xB8 |0
+<U7BF2> \x87\xA8 |0
+<U7BF3> \x87\xAF |0
+<U7BF4> \x87\xAD |0
+<U7BF7> \x64\x79 |0
+<U7BF8> \x87\xB4 |0
+<U7BF9> \x85\x4B |0
+<U7BFB> \x87\xAB |0
+<U7BFD> \x87\xB5 |0
+<U7BFE> \x64\x78 |0
+<U7BFF> \x87\xAA |0
+<U7C00> \x87\xA9 |0
+<U7C01> \x87\xB3 |0
+<U7C02> \x87\xB0 |0
+<U7C03> \x87\xB2 |0
+<U7C05> \x87\xA6 |0
+<U7C06> \x87\xB6 |0
+<U7C07> \x64\x76 |0
+<U7C09> \x87\xB1 |0
+<U7C0A> \x87\xBA |0
+<U7C0B> \x87\xAE |0
+<U7C0C> \x64\x7A |0
+<U7C0D> \x64\x77 |0
+<U7C0E> \x87\xAC |0
+<U7C0F> \x87\xA7 |0
+<U7C10> \x87\xB9 |0
+<U7C11> \x62\xDE |0
+<U7C19> \x89\xD0 |0
+<U7C1C> \x89\xCE |0
+<U7C1D> \x89\xD4 |0
+<U7C1E> \x65\x9A |0
+<U7C1F> \x89\xD2 |0
+<U7C20> \x89\xD1 |0
+<U7C21> \x65\x9C |0
+<U7C22> \x89\xD7 |0
+<U7C23> \x65\x9B |0
+<U7C25> \x89\xD8 |0
+<U7C26> \x89\xD5 |0
+<U7C27> \x65\x98 |0
+<U7C28> \x89\xD6 |0
+<U7C29> \x89\xCF |0
+<U7C2A> \x65\x99 |0
+<U7C2B> \x65\x97 |0
+<U7C2C> \x8B\xB8 |0
+<U7C2D> \x89\xD3 |0
+<U7C30> \x89\xD9 |0
+<U7C33> \x8B\xB5 |0
+<U7C37> \x66\x7C |0
+<U7C38> \x66\x7A |0
+<U7C39> \x8B\xB7 |0
+<U7C3B> \x8B\xB9 |0
+<U7C3C> \x8B\xB6 |0
+<U7C3D> \x66\x7B |0
+<U7C3E> \x66\x78 |0
+<U7C3F> \x66\x79 |0
+<U7C40> \x66\x7D |0
+<U7C43> \x67\x45 |0
+<U7C45> \x8D\x78 |0
+<U7C47> \x8D\x77 |0
+<U7C48> \x8D\x75 |0
+<U7C49> \x8D\x74 |0
+<U7C4A> \x8D\x76 |0
+<U7C4C> \x67\x44 |0
+<U7C4D> \x67\x46 |0
+<U7C50> \x67\x9C |0
+<U7C53> \x8E\x95 |0
+<U7C54> \x8E\x94 |0
+<U7C57> \x8F\x8B |0
+<U7C59> \x8F\x8D |0
+<U7C5A> \x8F\x8F |0
+<U7C5B> \x8F\x8E |0
+<U7C5C> \x8F\x8C |0
+<U7C5F> \x67\xEC |0
+<U7C60> \x67\xEB |0
+<U7C63> \x68\x5F |0
+<U7C64> \x68\x5E |0
+<U7C65> \x68\x60 |0
+<U7C66> \x90\x5E |0
+<U7C67> \x90\x5D |0
+<U7C69> \x91\x4D |0
+<U7C6A> \x90\xC7 |0
+<U7C6B> \x91\x4E |0
+<U7C6C> \x68\xA4 |0
+<U7C6E> \x68\xA5 |0
+<U7C6F> \x91\x7E |0
+<U7C72> \x68\xCA |0
+<U7C73> \x48\xB7 |3
+<U7C73> \x4E\x6D |0
+<U7C75> \x6C\xC8 |0
+<U7C78> \x6E\xE6 |0
+<U7C79> \x6E\xE7 |0
+<U7C7A> \x6E\xE5 |0
+<U7C7D> \x53\x97 |0
+<U7C7F> \x6E\xE8 |0
+<U7C80> \x6E\xE9 |0
+<U7C81> \x6E\xEA |0
+<U7C84> \x71\x8D |0
+<U7C85> \x71\x93 |0
+<U7C88> \x71\x91 |0
+<U7C89> \x55\xBE |0
+<U7C8A> \x71\x8F |0
+<U7C8C> \x71\x90 |0
+<U7C8D> \x71\x92 |0
+<U7C91> \x71\x8E |0
+<U7C92> \x58\x6E |0
+<U7C94> \x74\xA3 |0
+<U7C95> \x58\x70 |0
+<U7C96> \x74\xA5 |0
+<U7C97> \x58\x6F |0
+<U7C98> \x74\xA4 |0
+<U7C9E> \x77\xED |0
+<U7C9F> \x5A\xB4 |0
+<U7CA1> \x77\xEF |0
+<U7CA2> \x77\xEC |0
+<U7CA3> \x74\xA6 |0
+<U7CA5> \x5A\xB5 |0
+<U7CA8> \x77\xEE |0
+<U7CAF> \x7B\x9E |0
+<U7CB1> \x5C\xEA |0
+<U7CB2> \x7B\x9C |0
+<U7CB3> \x5C\xEB |0
+<U7CB4> \x7B\x9D |0
+<U7CB5> \x5C\xEC |0
+<U7CB9> \x5F\x52 |0
+<U7CBA> \x7E\xE9 |0
+<U7CBB> \x7E\xE6 |0
+<U7CBC> \x7E\xE8 |0
+<U7CBD> \x5F\x53 |0
+<U7CBE> \x5F\x54 |0
+<U7CBF> \x7E\xE7 |0
+<U7CC5> \x81\xE8 |0
+<U7CC8> \x81\xE9 |0
+<U7CCA> \x61\x55 |0
+<U7CCB> \x81\xEB |0
+<U7CCC> \x81\xEA |0
+<U7CCE> \x46\xF9 |0
+<U7CD0> \x85\x56 |0
+<U7CD1> \x85\x57 |0
+<U7CD2> \x85\x53 |0
+<U7CD4> \x85\x54 |0
+<U7CD5> \x62\xE5 |0
+<U7CD6> \x62\xE6 |0
+<U7CD7> \x85\x55 |0
+<U7CD9> \x64\x82 |0
+<U7CDC> \x64\x7D |0
+<U7CDD> \x64\x83 |0
+<U7CDE> \x64\x7E |0
+<U7CDF> \x64\x81 |0
+<U7CE0> \x64\x7C |0
+<U7CE2> \x64\x7F |0
+<U7CE7> \x65\x9D |0
+<U7CE8> \x87\xBB |0
+<U7CEA> \x8B\xBB |0
+<U7CEC> \x8B\xBA |0
+<U7CEE> \x8D\x79 |0
+<U7CEF> \x67\x47 |0
+<U7CF0> \x67\x48 |0
+<U7CF1> \x8F\x91 |0
+<U7CF2> \x8E\x96 |0
+<U7CF4> \x8F\x90 |0
+<U7CF6> \x91\x4F |0
+<U7CF7> \x91\x94 |0
+<U7CF8> \x48\xB8 |3
+<U7CF8> \x4E\x6E |0
+<U7CFB> \x4F\xB6 |0
+<U7CFD> \x6C\xC9 |0
+<U7CFE> \x51\xAA |0
+<U7D00> \x53\x9A |0
+<U7D01> \x6E\xED |0
+<U7D02> \x53\x98 |0
+<U7D03> \x6E\xEB |0
+<U7D04> \x53\x9D |0
+<U7D05> \x53\x99 |0
+<U7D06> \x53\x9E |0
+<U7D07> \x53\x9C |0
+<U7D08> \x6E\xEC |0
+<U7D09> \x53\x9B |0
+<U7D0A> \x55\xC2 |0
+<U7D0B> \x55\xC1 |0
+<U7D0C> \x71\x9E |0
+<U7D0D> \x55\xCA |0
+<U7D0E> \x71\x97 |0
+<U7D0F> \x71\x9D |0
+<U7D10> \x55\xC6 |0
+<U7D11> \x71\x96 |0
+<U7D12> \x71\x9C |0
+<U7D13> \x71\x9A |0
+<U7D14> \x55\xC5 |0
+<U7D15> \x55\xC7 |0
+<U7D16> \x71\x99 |0
+<U7D17> \x55\xC0 |0
+<U7D18> \x71\x98 |0
+<U7D19> \x55\xCB |0
+<U7D1A> \x55\xC8 |0
+<U7D1B> \x55\xCC |0
+<U7D1C> \x55\xC9 |0
+<U7D1D> \x71\x95 |0
+<U7D1E> \x71\x94 |0
+<U7D1F> \x71\x9B |0
+<U7D20> \x55\xC3 |0
+<U7D21> \x55\xBF |0
+<U7D22> \x55\xC4 |0
+<U7D28> \x74\xB5 |0
+<U7D29> \x74\xAE |0
+<U7D2B> \x5A\xBA |0
+<U7D2C> \x74\xAD |0
+<U7D2E> \x58\x74 |0
+<U7D2F> \x58\x7B |0
+<U7D30> \x58\x78 |0
+<U7D31> \x58\x7E |0
+<U7D32> \x58\x7D |0
+<U7D33> \x58\x79 |0
+<U7D35> \x74\xA7 |0
+<U7D36> \x74\xAA |0
+<U7D38> \x74\xA9 |0
+<U7D39> \x58\x75 |0
+<U7D3A> \x74\xAB |0
+<U7D3B> \x74\xB4 |0
+<U7D3C> \x58\x76 |0
+<U7D3D> \x74\xA8 |0
+<U7D3E> \x74\xB1 |0
+<U7D3F> \x74\xB2 |0
+<U7D40> \x58\x77 |0
+<U7D41> \x74\xAF |0
+<U7D42> \x58\x7C |0
+<U7D43> \x58\x72 |0
+<U7D44> \x58\x7A |0
+<U7D45> \x74\xAC |0
+<U7D46> \x58\x71 |0
+<U7D47> \x74\xB0 |0
+<U7D4A> \x74\xB3 |0
+<U7D4E> \x78\x43 |0
+<U7D4F> \x77\xF7 |0
+<U7D50> \x5A\xB7 |0
+<U7D51> \x78\x41 |0
+<U7D52> \x77\xFB |0
+<U7D53> \x77\xF3 |0
+<U7D54> \x77\xFC |0
+<U7D55> \x5A\xB9 |0
+<U7D56> \x77\xF4 |0
+<U7D58> \x77\xF0 |0
+<U7D5B> \x5C\xF2 |0
+<U7D5C> \x77\xF9 |0
+<U7D5E> \x5A\xB6 |0
+<U7D5F> \x78\x42 |0
+<U7D61> \x5A\xBD |0
+<U7D62> \x5A\xBF |0
+<U7D63> \x77\xF2 |0
+<U7D66> \x5A\xBE |0
+<U7D67> \x77\xF5 |0
+<U7D68> \x5A\xB8 |0
+<U7D69> \x77\xFD |0
+<U7D6A> \x77\xF6 |0
+<U7D6B> \x77\xFA |0
+<U7D6D> \x77\xF8 |0
+<U7D6E> \x5A\xBB |0
+<U7D6F> \x77\xF1 |0
+<U7D70> \x5A\xC0 |0
+<U7D71> \x58\x73 |0
+<U7D72> \x5A\xBC |0
+<U7D73> \x5A\xC1 |0
+<U7D79> \x5C\xEE |0
+<U7D7A> \x7B\xA5 |0
+<U7D7B> \x7B\xA7 |0
+<U7D7C> \x7B\xA9 |0
+<U7D7D> \x7B\xAD |0
+<U7D7F> \x7B\xA3 |0
+<U7D80> \x7B\xA1 |0
+<U7D81> \x5C\xF0 |0
+<U7D83> \x7B\xA8 |0
+<U7D84> \x7B\xAC |0
+<U7D85> \x7B\xA4 |0
+<U7D86> \x7B\xA0 |0
+<U7D88> \x7B\x9F |0
+<U7D8C> \x7B\xAA |0
+<U7D8D> \x7B\xA2 |0
+<U7D8E> \x7B\xA6 |0
+<U7D8F> \x5C\xF1 |0
+<U7D91> \x5C\xEF |0
+<U7D92> \x7B\xAE |0
+<U7D93> \x5C\xED |0
+<U7D94> \x7B\xAB |0
+<U7D96> \x7E\xFA |0
+<U7D9C> \x5F\x57 |0
+<U7D9D> \x7E\xF2 |0
+<U7D9E> \x61\x62 |0
+<U7D9F> \x7E\xFC |0
+<U7DA0> \x5F\x5A |0
+<U7DA1> \x7F\x43 |0
+<U7DA2> \x5F\x60 |0
+<U7DA3> \x7E\xED |0
+<U7DA6> \x7E\xFD |0
+<U7DA7> \x7E\xEA |0
+<U7DA9> \x7F\x42 |0
+<U7DAA> \x7E\xEE |0
+<U7DAC> \x5F\x67 |0
+<U7DAD> \x5F\x64 |0
+<U7DAE> \x7F\x41 |0
+<U7DAF> \x7E\xF8 |0
+<U7DB0> \x5F\x56 |0
+<U7DB1> \x5F\x5E |0
+<U7DB2> \x5F\x5D |0
+<U7DB4> \x5F\x5C |0
+<U7DB5> \x5F\x62 |0
+<U7DB7> \x7E\xEB |0
+<U7DB8> \x5F\x63 |0
+<U7DB9> \x7E\xF9 |0
+<U7DBA> \x5F\x5F |0
+<U7DBB> \x5F\x55 |0
+<U7DBC> \x7E\xFB |0
+<U7DBD> \x5F\x58 |0
+<U7DBE> \x5F\x59 |0
+<U7DBF> \x5F\x61 |0
+<U7DC0> \x7E\xF0 |0
+<U7DC1> \x7E\xEF |0
+<U7DC2> \x7E\xEC |0
+<U7DC4> \x7E\xF4 |0
+<U7DC5> \x7E\xF1 |0
+<U7DC6> \x7E\xF5 |0
+<U7DC7> \x5F\x66 |0
+<U7DC9> \x7F\x44 |0
+<U7DCA> \x5F\x5B |0
+<U7DCB> \x7E\xF6 |0
+<U7DCC> \x7E\xF7 |0
+<U7DCE> \x7E\xF3 |0
+<U7DD2> \x5F\x65 |0
+<U7DD7> \x81\xF0 |0
+<U7DD8> \x61\x5A |0
+<U7DD9> \x61\x63 |0
+<U7DDA> \x61\x5F |0
+<U7DDB> \x81\xED |0
+<U7DDD> \x61\x5C |0
+<U7DDE> \x61\x60 |0
+<U7DDF> \x81\xF9 |0
+<U7DE0> \x61\x56 |0
+<U7DE1> \x81\xF1 |0
+<U7DE3> \x61\x5E |0
+<U7DE6> \x81\xF4 |0
+<U7DE7> \x81\xEF |0
+<U7DE8> \x61\x5D |0
+<U7DE9> \x61\x61 |0
+<U7DEA> \x81\xEE |0
+<U7DEC> \x61\x5B |0
+<U7DEE> \x81\xF8 |0
+<U7DEF> \x61\x58 |0
+<U7DF0> \x81\xF7 |0
+<U7DF1> \x81\xF6 |0
+<U7DF2> \x61\x64 |0
+<U7DF3> \x80\xBC |0
+<U7DF4> \x61\x57 |0
+<U7DF6> \x81\xF5 |0
+<U7DF7> \x81\xEC |0
+<U7DF9> \x61\x65 |0
+<U7DFA> \x81\xF3 |0
+<U7DFB> \x61\x59 |0
+<U7E03> \x81\xF2 |0
+<U7E08> \x62\xE9 |0
+<U7E09> \x62\xEE |0
+<U7E0A> \x62\xE7 |0
+<U7E0B> \x85\x64 |0
+<U7E0C> \x85\x5B |0
+<U7E0D> \x85\x67 |0
+<U7E0E> \x85\x5F |0
+<U7E0F> \x85\x65 |0
+<U7E10> \x62\xEF |0
+<U7E11> \x62\xE8 |0
+<U7E12> \x85\x58 |0
+<U7E13> \x85\x5E |0
+<U7E14> \x85\x68 |0
+<U7E15> \x85\x61 |0
+<U7E16> \x85\x66 |0
+<U7E17> \x85\x5A |0
+<U7E1A> \x85\x62 |0
+<U7E1B> \x62\xEA |0
+<U7E1C> \x85\x60 |0
+<U7E1D> \x62\xED |0
+<U7E1E> \x62\xEC |0
+<U7E1F> \x85\x5C |0
+<U7E20> \x85\x5D |0
+<U7E21> \x85\x59 |0
+<U7E22> \x85\x63 |0
+<U7E23> \x62\xEB |0
+<U7E24> \x85\x6A |0
+<U7E25> \x85\x69 |0
+<U7E29> \x87\xC6 |0
+<U7E2A> \x87\xC2 |0
+<U7E2B> \x64\x8A |0
+<U7E2D> \x87\xBC |0
+<U7E2E> \x64\x84 |0
+<U7E2F> \x64\x94 |0
+<U7E30> \x87\xC8 |0
+<U7E31> \x64\x8C |0
+<U7E32> \x64\x88 |0
+<U7E33> \x87\xBF |0
+<U7E34> \x64\x8F |0
+<U7E35> \x64\x92 |0
+<U7E36> \x87\xCA |0
+<U7E37> \x64\x87 |0
+<U7E38> \x87\xC1 |0
+<U7E39> \x64\x90 |0
+<U7E3A> \x87\xCC |0
+<U7E3B> \x87\xC9 |0
+<U7E3C> \x87\xBD |0
+<U7E3D> \x64\x8B |0
+<U7E3E> \x64\x85 |0
+<U7E3F> \x64\x93 |0
+<U7E40> \x87\xC4 |0
+<U7E41> \x64\x8E |0
+<U7E42> \x87\xBE |0
+<U7E43> \x64\x89 |0
+<U7E44> \x87\xCB |0
+<U7E45> \x64\x8D |0
+<U7E46> \x64\x86 |0
+<U7E47> \x87\xC5 |0
+<U7E48> \x64\x91 |0
+<U7E49> \x87\xC3 |0
+<U7E4C> \x87\xC7 |0
+<U7E50> \x89\xDB |0
+<U7E51> \x89\xE1 |0
+<U7E52> \x65\xA3 |0
+<U7E53> \x89\xE4 |0
+<U7E54> \x65\x9E |0
+<U7E55> \x65\x9F |0
+<U7E56> \x89\xDC |0
+<U7E57> \x89\xE3 |0
+<U7E58> \x89\xDE |0
+<U7E59> \x65\xA4 |0
+<U7E5A> \x65\xA1 |0
+<U7E5C> \x89\xDA |0
+<U7E5E> \x65\xA0 |0
+<U7E5F> \x89\xE0 |0
+<U7E60> \x89\xE2 |0
+<U7E61> \x65\xA2 |0
+<U7E62> \x89\xDF |0
+<U7E63> \x89\xDD |0
+<U7E68> \x8B\xC5 |0
+<U7E69> \x66\x82 |0
+<U7E6A> \x66\x83 |0
+<U7E6B> \x66\x7E |0
+<U7E6D> \x66\x7F |0
+<U7E6F> \x8B\xC1 |0
+<U7E70> \x8B\xBF |0
+<U7E72> \x8B\xC3 |0
+<U7E73> \x66\x85 |0
+<U7E74> \x8B\xC4 |0
+<U7E75> \x8B\xBD |0
+<U7E76> \x8B\xBC |0
+<U7E77> \x8B\xC0 |0
+<U7E78> \x8B\xBE |0
+<U7E79> \x66\x81 |0
+<U7E7A> \x8B\xC2 |0
+<U7E7B> \x8D\x7A |0
+<U7E7C> \x67\x4B |0
+<U7E7D> \x67\x4A |0
+<U7E7E> \x8D\x7B |0
+<U7E80> \x8D\x7D |0
+<U7E81> \x8D\x7C |0
+<U7E82> \x67\x4C |0
+<U7E86> \x8E\x9B |0
+<U7E87> \x8E\x98 |0
+<U7E88> \x8E\x99 |0
+<U7E8A> \x8E\x97 |0
+<U7E8B> \x8E\x9A |0
+<U7E8C> \x67\x9E |0
+<U7E8D> \x8E\x9C |0
+<U7E8F> \x67\x9D |0
+<U7E91> \x8F\x92 |0
+<U7E93> \x68\x61 |0
+<U7E94> \x68\x63 |0
+<U7E95> \x90\x5F |0
+<U7E96> \x68\x62 |0
+<U7E97> \x90\xC8 |0
+<U7E98> \x91\x51 |0
+<U7E99> \x91\x53 |0
+<U7E9A> \x91\x50 |0
+<U7E9B> \x91\x52 |0
+<U7E9C> \x68\xB8 |0
+<U7F36> \x48\xB9 |3
+<U7F36> \x4E\x6F |0
+<U7F38> \x53\x9F |0
+<U7F39> \x70\xD2 |0
+<U7F3A> \x55\xCD |0
+<U7F3D> \x58\x7F |0
+<U7F3E> \x78\x44 |0
+<U7F3F> \x78\x45 |0
+<U7F43> \x85\x6B |0
+<U7F44> \x64\x95 |0
+<U7F45> \x87\xCD |0
+<U7F48> \x65\xA5 |0
+<U7F4A> \x8B\xC7 |0
+<U7F4B> \x8B\xC6 |0
+<U7F4C> \x67\x4D |0
+<U7F4D> \x8E\x9D |0
+<U7F4F> \x8F\x93 |0
+<U7F50> \x68\x85 |0
+<U7F51> \x48\xBA |3
+<U7F51> \x69\xE8 |0
+<U7F54> \x51\xAB |0
+<U7F55> \x4F\xB7 |0
+<U7F58> \x6E\xEE |0
+<U7F5B> \x71\xA4 |0
+<U7F5C> \x71\x9F |0
+<U7F5D> \x71\xA3 |0
+<U7F5E> \x71\xA1 |0
+<U7F5F> \x55\xCE |0
+<U7F60> \x71\xA2 |0
+<U7F61> \x71\xA0 |0
+<U7F63> \x74\xB6 |0
+<U7F65> \x78\x46 |0
+<U7F66> \x78\x47 |0
+<U7F67> \x7B\xB1 |0
+<U7F68> \x7B\xB2 |0
+<U7F69> \x5C\xF4 |0
+<U7F6A> \x5C\xF5 |0
+<U7F6B> \x7B\xB0 |0
+<U7F6C> \x7B\xB3 |0
+<U7F6D> \x7B\xAF |0
+<U7F6E> \x5C\xF3 |0
+<U7F70> \x5F\x68 |0
+<U7F72> \x5C\xF6 |0
+<U7F73> \x7F\x45 |0
+<U7F75> \x61\x66 |0
+<U7F76> \x81\xFA |0
+<U7F77> \x61\x67 |0
+<U7F79> \x62\xF0 |0
+<U7F7A> \x85\x6E |0
+<U7F7B> \x85\x6C |0
+<U7F7C> \x85\x6D |0
+<U7F7D> \x87\xD0 |0
+<U7F7E> \x87\xCF |0
+<U7F7F> \x87\xCE |0
+<U7F83> \x8B\xC8 |0
+<U7F85> \x66\x84 |0
+<U7F86> \x8B\xC9 |0
+<U7F87> \x8F\x94 |0
+<U7F88> \x68\x86 |0
+<U7F89> \x90\xC9 |0
+<U7F8A> \x48\xBB |3
+<U7F8A> \x4E\x70 |0
+<U7F8B> \x51\xAD |0
+<U7F8C> \x51\xAC |0
+<U7F8D> \x6E\xF0 |0
+<U7F8E> \x53\xA0 |0
+<U7F91> \x6E\xEF |0
+<U7F92> \x71\xA6 |0
+<U7F94> \x55\xCF |0
+<U7F95> \x74\xB7 |0
+<U7F96> \x71\xA5 |0
+<U7F9A> \x58\x82 |0
+<U7F9B> \x74\xBA |0
+<U7F9C> \x74\xB8 |0
+<U7F9D> \x74\xB9 |0
+<U7F9E> \x58\x81 |0
+<U7FA0> \x78\x49 |0
+<U7FA1> \x78\x4A |0
+<U7FA2> \x78\x48 |0
+<U7FA4> \x5C\xF9 |0
+<U7FA5> \x7B\xB5 |0
+<U7FA6> \x7B\xB4 |0
+<U7FA7> \x7B\xB6 |0
+<U7FA8> \x5C\xF8 |0
+<U7FA9> \x5C\xF7 |0
+<U7FAC> \x81\xFB |0
+<U7FAD> \x81\xFD |0
+<U7FAF> \x61\x68 |0
+<U7FB0> \x81\xFC |0
+<U7FB1> \x85\x6F |0
+<U7FB2> \x62\xF1 |0
+<U7FB3> \x89\xE6 |0
+<U7FB5> \x89\xE5 |0
+<U7FB6> \x66\x86 |0
+<U7FB7> \x8B\xCA |0
+<U7FB8> \x66\x88 |0
+<U7FB9> \x66\x87 |0
+<U7FBA> \x8D\x7E |0
+<U7FBB> \x8E\x9E |0
+<U7FBC> \x67\x9F |0
+<U7FBD> \x48\xBC |3
+<U7FBD> \x4E\x71 |0
+<U7FBE> \x6E\xF1 |0
+<U7FBF> \x53\xA1 |0
+<U7FC0> \x71\xA9 |0
+<U7FC1> \x55\xD1 |0
+<U7FC2> \x71\xA8 |0
+<U7FC3> \x71\xA7 |0
+<U7FC5> \x55\xD0 |0
+<U7FC7> \x74\xC0 |0
+<U7FC9> \x74\xC2 |0
+<U7FCA> \x74\xBB |0
+<U7FCB> \x74\xBC |0
+<U7FCC> \x58\x83 |0
+<U7FCD> \x74\xBD |0
+<U7FCE> \x58\x84 |0
+<U7FCF> \x74\xC1 |0
+<U7FD0> \x74\xBE |0
+<U7FD1> \x74\xBF |0
+<U7FD2> \x58\x85 |0
+<U7FD4> \x5A\xC3 |0
+<U7FD5> \x5A\xC4 |0
+<U7FD7> \x78\x4B |0
+<U7FDB> \x7B\xB7 |0
+<U7FDC> \x7B\xB8 |0
+<U7FDE> \x7F\x49 |0
+<U7FDF> \x5F\x6B |0
+<U7FE0> \x5F\x69 |0
+<U7FE1> \x5F\x6A |0
+<U7FE2> \x7F\x46 |0
+<U7FE3> \x7F\x47 |0
+<U7FE5> \x7F\x48 |0
+<U7FE6> \x82\x45 |0
+<U7FE8> \x82\x46 |0
+<U7FE9> \x61\x69 |0
+<U7FEA> \x82\x43 |0
+<U7FEB> \x82\x42 |0
+<U7FEC> \x82\x44 |0
+<U7FED> \x82\x41 |0
+<U7FEE> \x62\xF4 |0
+<U7FEF> \x85\x70 |0
+<U7FF0> \x62\xF2 |0
+<U7FF1> \x62\xF3 |0
+<U7FF2> \x87\xD2 |0
+<U7FF3> \x64\x96 |0
+<U7FF4> \x87\xD1 |0
+<U7FF5> \x89\x55 |0
+<U7FF7> \x89\xE7 |0
+<U7FF8> \x89\xE8 |0
+<U7FF9> \x65\xA6 |0
+<U7FFB> \x65\xA7 |0
+<U7FFC> \x64\x97 |0
+<U7FFD> \x8B\xCB |0
+<U7FFE> \x8B\xCC |0
+<U7FFF> \x8D\x7F |0
+<U8000> \x67\x4E |0
+<U8001> \x48\xBD |3
+<U8001> \x4E\x72 |0
+<U8003> \x4E\x73 |0
+<U8004> \x53\xA2 |0
+<U8005> \x51\xAE |0
+<U8006> \x55\xD2 |0
+<U8007> \x6E\xF2 |0
+<U800B> \x5A\xC5 |0
+<U800C> \x48\xBE |3
+<U800C> \x4E\x74 |0
+<U800D> \x53\xA4 |0
+<U800E> \x6E\xF3 |0
+<U800F> \x6E\xF4 |0
+<U8010> \x53\xA3 |0
+<U8011> \x53\xA5 |0
+<U8012> \x48\xBF |3
+<U8012> \x4E\x75 |0
+<U8014> \x6E\xF5 |0
+<U8015> \x55\xD4 |0
+<U8016> \x71\xAA |0
+<U8017> \x55\xD6 |0
+<U8018> \x55\xD3 |0
+<U8019> \x55\xD5 |0
+<U801B> \x74\xC5 |0
+<U801C> \x58\x86 |0
+<U801E> \x74\xC4 |0
+<U801F> \x74\xC3 |0
+<U8021> \x7B\xB9 |0
+<U8024> \x7F\x4A |0
+<U8026> \x61\x6A |0
+<U8028> \x62\xF5 |0
+<U8029> \x85\x72 |0
+<U802A> \x85\x71 |0
+<U802C> \x87\xD3 |0
+<U8030> \x8E\x9F |0
+<U8033> \x48\xC0 |3
+<U8033> \x4E\x76 |0
+<U8034> \x6A\xF3 |0
+<U8035> \x6C\xCA |0
+<U8036> \x53\xA6 |0
+<U8037> \x6E\xF6 |0
+<U8039> \x71\xAC |0
+<U803D> \x55\xD7 |0
+<U803E> \x71\xAB |0
+<U803F> \x55\xD8 |0
+<U8043> \x74\xC7 |0
+<U8046> \x58\x88 |0
+<U8047> \x74\xC6 |0
+<U8048> \x74\xC8 |0
+<U804A> \x58\x87 |0
+<U804F> \x78\x4D |0
+<U8050> \x78\x4E |0
+<U8051> \x78\x4C |0
+<U8052> \x5A\xC6 |0
+<U8056> \x5C\xFA |0
+<U8058> \x5C\xFB |0
+<U805A> \x5F\x6D |0
+<U805C> \x7F\x4C |0
+<U805D> \x7F\x4B |0
+<U805E> \x5F\x6C |0
+<U8064> \x82\x47 |0
+<U8067> \x82\x48 |0
+<U806C> \x85\x73 |0
+<U806F> \x64\x9B |0
+<U8070> \x64\x9A |0
+<U8071> \x64\x98 |0
+<U8072> \x64\x99 |0
+<U8073> \x64\x9C |0
+<U8075> \x89\xE9 |0
+<U8076> \x65\xA9 |0
+<U8077> \x65\xA8 |0
+<U8078> \x8B\xCD |0
+<U8079> \x8D\x81 |0
+<U807D> \x67\xEE |0
+<U807E> \x67\xED |0
+<U807F> \x48\xC1 |3
+<U807F> \x4E\x77 |0
+<U8082> \x70\x9F |0
+<U8084> \x5C\xFD |0
+<U8085> \x5A\xC7 |0
+<U8086> \x5C\xFC |0
+<U8087> \x5F\x6E |0
+<U8089> \x48\xC2 |3
+<U8089> \x4E\x78 |0
+<U808A> \x69\x89 |0
+<U808B> \x4E\x79 |0
+<U808C> \x4E\x7A |0
+<U808F> \x6C\xCB |0
+<U8090> \x6A\xF6 |0
+<U8092> \x6A\xF7 |0
+<U8093> \x4F\xB9 |0
+<U8095> \x6A\xF4 |0
+<U8096> \x4F\xB8 |0
+<U8098> \x4F\xBB |0
+<U8099> \x6A\xF5 |0
+<U809A> \x4F\xBD |0
+<U809B> \x4F\xBC |0
+<U809C> \x6A\xF8 |0
+<U809D> \x4F\xBA |0
+<U80A1> \x51\xB3 |0
+<U80A2> \x51\xB1 |0
+<U80A3> \x6C\xCD |0
+<U80A5> \x51\xB0 |0
+<U80A9> \x51\xB5 |0
+<U80AA> \x51\xB7 |0
+<U80AB> \x51\xB4 |0
+<U80AD> \x6C\xD0 |0
+<U80AE> \x6C\xCC |0
+<U80AF> \x51\xB8 |0
+<U80B1> \x51\xB2 |0
+<U80B2> \x4F\xBE |0
+<U80B4> \x51\xB6 |0
+<U80B5> \x6C\xCF |0
+<U80B8> \x6C\xCE |0
+<U80BA> \x51\xAF |0
+<U80C2> \x6E\xFC |0
+<U80C3> \x53\xAA |0
+<U80C4> \x53\xAB |0
+<U80C5> \x6F\x41 |0
+<U80C7> \x6E\xF8 |0
+<U80C8> \x6E\xFB |0
+<U80C9> \x6F\x47 |0
+<U80CA> \x6F\x45 |0
+<U80CC> \x53\xAC |0
+<U80CD> \x6F\x4B |0
+<U80CE> \x53\xAF |0
+<U80CF> \x6F\x48 |0
+<U80D0> \x6E\xFD |0
+<U80D1> \x6E\xFA |0
+<U80D4> \x78\x50 |0
+<U80D5> \x6F\x46 |0
+<U80D6> \x53\xA7 |0
+<U80D7> \x6F\x49 |0
+<U80D8> \x6E\xF7 |0
+<U80D9> \x6F\x43 |0
+<U80DA> \x53\xA9 |0
+<U80DB> \x53\xAE |0
+<U80DC> \x6F\x44 |0
+<U80DD> \x53\xB2 |0
+<U80DE> \x53\xB0 |0
+<U80E0> \x6E\xF9 |0
+<U80E1> \x53\xAD |0
+<U80E3> \x6F\x42 |0
+<U80E4> \x53\xB1 |0
+<U80E5> \x53\xA8 |0
+<U80E6> \x6F\x4A |0
+<U80ED> \x55\xDD |0
+<U80EF> \x55\xE6 |0
+<U80F0> \x55\xDB |0
+<U80F1> \x55\xD9 |0
+<U80F2> \x71\xAE |0
+<U80F3> \x55\xE1 |0
+<U80F4> \x55\xDE |0
+<U80F5> \x71\xB0 |0
+<U80F8> \x55\xE0 |0
+<U80F9> \x71\xAF |0
+<U80FA> \x71\xAD |0
+<U80FB> \x71\xB2 |0
+<U80FC> \x55\xE5 |0
+<U80FD> \x55\xE3 |0
+<U80FE> \x78\x4F |0
+<U8100> \x71\xB3 |0
+<U8101> \x71\xB1 |0
+<U8102> \x55\xDA |0
+<U8105> \x55\xDC |0
+<U8106> \x55\xDF |0
+<U8108> \x55\xE2 |0
+<U810A> \x55\xE4 |0
+<U8115> \x74\xD2 |0
+<U8116> \x58\x8A |0
+<U8118> \x74\xC9 |0
+<U8119> \x74\xCB |0
+<U811B> \x74\xCC |0
+<U811D> \x74\xD4 |0
+<U811E> \x74\xD0 |0
+<U811F> \x74\xCE |0
+<U8121> \x74\xD1 |0
+<U8122> \x74\xD5 |0
+<U8123> \x58\x8B |0
+<U8124> \x58\x8F |0
+<U8125> \x74\xCA |0
+<U8127> \x74\xD3 |0
+<U8129> \x58\x8D |0
+<U812B> \x58\x8C |0
+<U812C> \x74\xCF |0
+<U812D> \x74\xCD |0
+<U812F> \x58\x89 |0
+<U8130> \x58\x8E |0
+<U8139> \x5A\xCD |0
+<U813A> \x78\x58 |0
+<U813D> \x78\x56 |0
+<U813E> \x5A\xCF |0
+<U8143> \x78\x51 |0
+<U8144> \x7B\xC7 |0
+<U8146> \x5A\xCE |0
+<U8147> \x78\x55 |0
+<U814A> \x78\x52 |0
+<U814B> \x5A\xCA |0
+<U814C> \x5A\xD0 |0
+<U814D> \x78\x57 |0
+<U814E> \x5A\xCC |0
+<U814F> \x78\x54 |0
+<U8150> \x5F\x6F |0
+<U8151> \x5A\xCB |0
+<U8152> \x78\x53 |0
+<U8153> \x5A\xD1 |0
+<U8154> \x5A\xC9 |0
+<U8155> \x5A\xC8 |0
+<U815B> \x7B\xBF |0
+<U815C> \x7B\xBD |0
+<U815E> \x7B\xC3 |0
+<U8160> \x7B\xBB |0
+<U8161> \x7B\xC8 |0
+<U8162> \x7B\xC0 |0
+<U8164> \x7B\xBA |0
+<U8165> \x5D\x44 |0
+<U8166> \x5D\x4A |0
+<U8167> \x7B\xC5 |0
+<U8169> \x7B\xBE |0
+<U816B> \x5D\x47 |0
+<U816E> \x5D\x45 |0
+<U816F> \x7B\xC6 |0
+<U8170> \x5D\x42 |0
+<U8171> \x5D\x41 |0
+<U8172> \x7B\xC1 |0
+<U8173> \x5D\x46 |0
+<U8174> \x5A\xD2 |0
+<U8176> \x7B\xC4 |0
+<U8177> \x7B\xBC |0
+<U8178> \x5D\x43 |0
+<U8179> \x5D\x48 |0
+<U817A> \x5D\x49 |0
+<U817F> \x5F\x74 |0
+<U8180> \x5F\x70 |0
+<U8182> \x5F\x75 |0
+<U8183> \x7F\x4F |0
+<U8186> \x7F\x4E |0
+<U8187> \x7F\x50 |0
+<U8188> \x5F\x72 |0
+<U8189> \x7F\x4D |0
+<U818A> \x5F\x73 |0
+<U818B> \x7F\x53 |0
+<U818C> \x7F\x52 |0
+<U818D> \x7F\x51 |0
+<U818F> \x5F\x71 |0
+<U8195> \x82\x4C |0
+<U8197> \x82\x4F |0
+<U8198> \x61\x70 |0
+<U8199> \x82\x4E |0
+<U819A> \x61\x6F |0
+<U819B> \x61\x6B |0
+<U819C> \x61\x6C |0
+<U819D> \x61\x6D |0
+<U819E> \x82\x4B |0
+<U819F> \x82\x4A |0
+<U81A0> \x61\x6E |0
+<U81A2> \x82\x4D |0
+<U81A3> \x82\x49 |0
+<U81A6> \x85\x75 |0
+<U81A7> \x85\x7F |0
+<U81A8> \x62\xF8 |0
+<U81A9> \x62\xF7 |0
+<U81AB> \x85\x79 |0
+<U81AC> \x85\x7B |0
+<U81AE> \x85\x76 |0
+<U81B0> \x85\x7A |0
+<U81B1> \x85\x74 |0
+<U81B2> \x85\x7D |0
+<U81B3> \x62\xF6 |0
+<U81B4> \x85\x7C |0
+<U81B5> \x85\x78 |0
+<U81B7> \x85\x7E |0
+<U81B9> \x85\x77 |0
+<U81BA> \x64\x9F |0
+<U81BB> \x87\xD4 |0
+<U81BC> \x87\xDA |0
+<U81BD> \x64\xA3 |0
+<U81BE> \x64\xA5 |0
+<U81BF> \x64\xA2 |0
+<U81C0> \x64\xA1 |0
+<U81C2> \x64\xA0 |0
+<U81C3> \x64\x9E |0
+<U81C4> \x87\xD5 |0
+<U81C5> \x87\xD8 |0
+<U81C6> \x64\x9D |0
+<U81C7> \x87\xD9 |0
+<U81C9> \x64\xA4 |0
+<U81CA> \x87\xD7 |0
+<U81CC> \x87\xD6 |0
+<U81CD> \x65\xAA |0
+<U81CF> \x65\xAB |0
+<U81D0> \x89\xEC |0
+<U81D1> \x89\xEA |0
+<U81D2> \x89\xEB |0
+<U81D5> \x8B\xCF |0
+<U81D7> \x8B\xCE |0
+<U81D8> \x66\x89 |0
+<U81D9> \x8D\x83 |0
+<U81DA> \x67\x4F |0
+<U81DB> \x8D\x82 |0
+<U81DD> \x8E\xA0 |0
+<U81DE> \x8F\x95 |0
+<U81DF> \x67\xEF |0
+<U81E0> \x91\x54 |0
+<U81E1> \x91\x55 |0
+<U81E2> \x68\x64 |0
+<U81E3> \x48\xC3 |3
+<U81E3> \x4E\x7B |0
+<U81E5> \x51\xB9 |0
+<U81E6> \x78\x59 |0
+<U81E7> \x5F\x76 |0
+<U81E8> \x64\xA6 |0
+<U81E9> \x87\xDB |0
+<U81EA> \x48\xC4 |3
+<U81EA> \x4E\x7C |0
+<U81EC> \x55\xE8 |0
+<U81ED> \x55\xE7 |0
+<U81EE> \x78\x5A |0
+<U81F2> \x85\x81 |0
+<U81F3> \x48\xC5 |3
+<U81F3> \x4E\x7D |0
+<U81F4> \x53\xB3 |0
+<U81F7> \x78\x5B |0
+<U81F8> \x78\x5C |0
+<U81F9> \x78\x5D |0
+<U81FA> \x5F\x77 |0
+<U81FB> \x62\xF9 |0
+<U81FC> \x48\xC6 |3
+<U81FC> \x4E\x7E |0
+<U81FE> \x51\xBA |0
+<U81FF> \x6F\x4C |0
+<U8200> \x55\xE9 |0
+<U8201> \x71\xB4 |0
+<U8202> \x58\x90 |0
+<U8204> \x78\x5E |0
+<U8205> \x5D\x4B |0
+<U8207> \x5F\x78 |0
+<U8208> \x62\xFA |0
+<U8209> \x64\xA7 |0
+<U820A> \x65\xAC |0
+<U820B> \x8D\x84 |0
+<U820C> \x48\xC7 |3
+<U820C> \x4E\x7F |0
+<U820D> \x51\xBB |0
+<U8210> \x55\xEA |0
+<U8211> \x74\xD6 |0
+<U8212> \x5A\xD3 |0
+<U8214> \x5F\x79 |0
+<U8215> \x7F\x54 |0
+<U8216> \x82\x50 |0
+<U821B> \x48\xC8 |3
+<U821B> \x4E\x81 |0
+<U821C> \x5A\xD4 |0
+<U821D> \x7B\xC9 |0
+<U821E> \x5F\x7A |0
+<U821F> \x48\xC9 |3
+<U821F> \x4E\x82 |0
+<U8220> \x6C\xD1 |0
+<U8221> \x6F\x4D |0
+<U8222> \x53\xB4 |0
+<U8225> \x71\xB6 |0
+<U8228> \x55\xED |0
+<U822A> \x55\xEB |0
+<U822B> \x55\xEC |0
+<U822C> \x55\xEE |0
+<U822F> \x71\xB5 |0
+<U8232> \x74\xDB |0
+<U8233> \x74\xD8 |0
+<U8234> \x74\xDA |0
+<U8235> \x58\x91 |0
+<U8236> \x58\x93 |0
+<U8237> \x58\x92 |0
+<U8238> \x74\xD7 |0
+<U8239> \x58\x94 |0
+<U823A> \x74\xD9 |0
+<U823C> \x78\x5F |0
+<U823D> \x78\x60 |0
+<U823F> \x78\x61 |0
+<U8240> \x7B\xCC |0
+<U8242> \x7B\xCD |0
+<U8244> \x7B\xCB |0
+<U8245> \x7B\xCE |0
+<U8247> \x5D\x4C |0
+<U8249> \x7B\xCA |0
+<U824B> \x5F\x7B |0
+<U824E> \x82\x55 |0
+<U824F> \x82\x51 |0
+<U8250> \x82\x54 |0
+<U8251> \x82\x56 |0
+<U8252> \x82\x53 |0
+<U8253> \x82\x52 |0
+<U8255> \x85\x82 |0
+<U8256> \x85\x83 |0
+<U8257> \x85\x84 |0
+<U8258> \x62\xFB |0
+<U8259> \x62\xFC |0
+<U825A> \x87\xDD |0
+<U825B> \x87\xDC |0
+<U825C> \x87\xDE |0
+<U825E> \x89\xEE |0
+<U825F> \x89\xED |0
+<U8261> \x8B\xD1 |0
+<U8263> \x8B\xD2 |0
+<U8264> \x8B\xD0 |0
+<U8266> \x67\x50 |0
+<U8268> \x8D\x85 |0
+<U8269> \x8D\x86 |0
+<U826B> \x8F\x96 |0
+<U826C> \x90\x60 |0
+<U826D> \x90\xCA |0
+<U826E> \x48\xCA |3
+<U826E> \x4E\x83 |0
+<U826F> \x4F\xBF |0
+<U8271> \x64\xA8 |0
+<U8272> \x48\xCB |3
+<U8272> \x4E\x84 |0
+<U8274> \x74\xDC |0
+<U8275> \x78\x62 |0
+<U8277> \x68\x8D |0
+<U8278> \x48\xCC |3
+<U8278> \x69\xE9 |0
+<U827C> \x69\xEA |0
+<U827D> \x69\xEC |0
+<U827E> \x4E\x85 |0
+<U827F> \x69\xED |0
+<U8280> \x69\xEB |0
+<U8283> \x6B\x43 |0
+<U8284> \x6B\x44 |0
+<U8285> \x6A\xFB |0
+<U828A> \x6B\x42 |0
+<U828B> \x4F\xC1 |0
+<U828D> \x4F\xC2 |0
+<U828E> \x6A\xFC |0
+<U828F> \x6A\xFA |0
+<U8290> \x6A\xF9 |0
+<U8291> \x6A\xFD |0
+<U8292> \x4F\xC0 |0
+<U8293> \x6B\x41 |0
+<U8294> \x6F\x4E |0
+<U8298> \x6C\xD6 |0
+<U8299> \x51\xBE |0
+<U829A> \x6C\xD5 |0
+<U829B> \x6C\xD7 |0
+<U829D> \x51\xBD |0
+<U829E> \x6C\xDC |0
+<U829F> \x51\xC1 |0
+<U82A0> \x6C\xD2 |0
+<U82A1> \x6C\xE0 |0
+<U82A2> \x6C\xE6 |0
+<U82A3> \x51\xC8 |0
+<U82A4> \x6C\xE3 |0
+<U82A5> \x51\xC5 |0
+<U82A7> \x6C\xD9 |0
+<U82A8> \x6C\xDF |0
+<U82A9> \x6C\xE1 |0
+<U82AB> \x6C\xD4 |0
+<U82AC> \x51\xC4 |0
+<U82AD> \x51\xBF |0
+<U82AE> \x6C\xDA |0
+<U82AF> \x51\xC6 |0
+<U82B0> \x51\xC9 |0
+<U82B1> \x51\xC3 |0
+<U82B3> \x51\xBC |0
+<U82B4> \x6C\xDE |0
+<U82B5> \x6C\xD8 |0
+<U82B6> \x6C\xE5 |0
+<U82B7> \x51\xCB |0
+<U82B8> \x51\xC7 |0
+<U82B9> \x51\xC2 |0
+<U82BA> \x6C\xDD |0
+<U82BB> \x55\xEF |0
+<U82BC> \x6C\xDB |0
+<U82BD> \x51\xC0 |0
+<U82BE> \x51\xCA |0
+<U82C0> \x6C\xD3 |0
+<U82C2> \x6C\xE2 |0
+<U82C3> \x6C\xE4 |0
+<U82D1> \x53\xC5 |0
+<U82D2> \x53\xBF |0
+<U82D3> \x53\xC7 |0
+<U82D4> \x53\xC4 |0
+<U82D5> \x6F\x55 |0
+<U82D6> \x6F\x58 |0
+<U82D7> \x53\xC0 |0
+<U82D9> \x6F\x4F |0
+<U82DB> \x53\xB9 |0
+<U82DC> \x53\xC3 |0
+<U82DE> \x53\xC6 |0
+<U82DF> \x53\xC8 |0
+<U82E0> \x6F\x64 |0
+<U82E1> \x6F\x5B |0
+<U82E3> \x53\xB8 |0
+<U82E4> \x6F\x63 |0
+<U82E5> \x53\xBC |0
+<U82E6> \x53\xBA |0
+<U82E7> \x53\xB5 |0
+<U82E8> \x6F\x53 |0
+<U82EA> \x6F\x62 |0
+<U82EB> \x6F\x57 |0
+<U82EC> \x6F\x5A |0
+<U82ED> \x6F\x67 |0
+<U82EF> \x53\xC9 |0
+<U82F0> \x6F\x61 |0
+<U82F1> \x53\xC1 |0
+<U82F2> \x6F\x5C |0
+<U82F3> \x6F\x66 |0
+<U82F4> \x6F\x59 |0
+<U82F5> \x6F\x5D |0
+<U82F6> \x6F\x60 |0
+<U82F9> \x6F\x51 |0
+<U82FA> \x6F\x65 |0
+<U82FB> \x6F\x5F |0
+<U82FE> \x6F\x50 |0
+<U8300> \x6F\x54 |0
+<U8301> \x53\xC2 |0
+<U8302> \x53\xBD |0
+<U8303> \x53\xB6 |0
+<U8304> \x53\xBB |0
+<U8305> \x53\xB7 |0
+<U8306> \x53\xCA |0
+<U8307> \x6F\x52 |0
+<U8308> \x71\xC7 |0
+<U8309> \x53\xBE |0
+<U830C> \x6F\x5E |0
+<U830D> \x6D\x63 |0
+<U8316> \x71\xCA |0
+<U8317> \x55\xFD |0
+<U8319> \x71\xBA |0
+<U831B> \x71\xC5 |0
+<U831C> \x71\xC1 |0
+<U831E> \x71\xD4 |0
+<U8320> \x71\xCC |0
+<U8322> \x71\xC2 |0
+<U8324> \x71\xCB |0
+<U8325> \x71\xBC |0
+<U8326> \x71\xC0 |0
+<U8327> \x71\xD7 |0
+<U8328> \x56\x43 |0
+<U8329> \x71\xCF |0
+<U832A> \x71\xC6 |0
+<U832B> \x55\xF0 |0
+<U832C> \x71\xD5 |0
+<U832D> \x71\xB8 |0
+<U832F> \x71\xCE |0
+<U8331> \x56\x42 |0
+<U8332> \x55\xFA |0
+<U8333> \x71\xB7 |0
+<U8334> \x55\xF8 |0
+<U8335> \x55\xF7 |0
+<U8336> \x55\xFC |0
+<U8337> \x71\xCD |0
+<U8338> \x55\xF4 |0
+<U8339> \x55\xFB |0
+<U833A> \x6F\x56 |0
+<U833B> \x78\x63 |0
+<U833C> \x71\xC8 |0
+<U833F> \x71\xBE |0
+<U8340> \x56\x41 |0
+<U8341> \x71\xBF |0
+<U8342> \x71\xC3 |0
+<U8343> \x56\x44 |0
+<U8344> \x71\xB9 |0
+<U8345> \x71\xD1 |0
+<U8347> \x71\xD0 |0
+<U8348> \x71\xD8 |0
+<U8349> \x55\xF6 |0
+<U834A> \x55\xF3 |0
+<U834B> \x71\xD6 |0
+<U834C> \x71\xD2 |0
+<U834D> \x71\xC9 |0
+<U834E> \x71\xC4 |0
+<U834F> \x55\xF9 |0
+<U8350> \x55\xF5 |0
+<U8351> \x71\xBB |0
+<U8352> \x55\xF1 |0
+<U8353> \x71\xD3 |0
+<U8354> \x55\xF2 |0
+<U8356> \x71\xBD |0
+<U8373> \x74\xE2 |0
+<U8374> \x74\xE4 |0
+<U8375> \x74\xE9 |0
+<U8376> \x74\xFD |0
+<U8377> \x58\xA2 |0
+<U8378> \x58\x98 |0
+<U837A> \x74\xE1 |0
+<U837B> \x58\xA3 |0
+<U837C> \x58\xA4 |0
+<U837D> \x74\xEC |0
+<U837E> \x74\xF3 |0
+<U837F> \x74\xF9 |0
+<U8381> \x74\xE6 |0
+<U8383> \x74\xED |0
+<U8386> \x58\xA5 |0
+<U8387> \x74\xFB |0
+<U8388> \x74\xF6 |0
+<U8389> \x58\xA0 |0
+<U838A> \x58\x9E |0
+<U838B> \x74\xF2 |0
+<U838C> \x74\xEE |0
+<U838D> \x74\xE0 |0
+<U838E> \x58\x95 |0
+<U838F> \x74\xE5 |0
+<U8390> \x74\xDD |0
+<U8392> \x58\x9D |0
+<U8393> \x58\x9F |0
+<U8394> \x74\xEA |0
+<U8395> \x74\xE7 |0
+<U8396> \x58\x9A |0
+<U8397> \x74\xF7 |0
+<U8398> \x58\x97 |0
+<U8399> \x74\xE8 |0
+<U839A> \x75\x41 |0
+<U839B> \x74\xF0 |0
+<U839D> \x74\xEF |0
+<U839E> \x58\x96 |0
+<U83A0> \x58\xA1 |0
+<U83A2> \x58\x99 |0
+<U83A3> \x74\xDE |0
+<U83A4> \x74\xE3 |0
+<U83A5> \x74\xF4 |0
+<U83A6> \x74\xFA |0
+<U83A7> \x58\xA6 |0
+<U83A8> \x74\xDF |0
+<U83A9> \x74\xEB |0
+<U83AA> \x74\xF1 |0
+<U83AB> \x58\x9C |0
+<U83AE> \x74\xFC |0
+<U83AF> \x74\xF5 |0
+<U83B0> \x74\xF8 |0
+<U83BD> \x58\x9B |0
+<U83BF> \x78\x73 |0
+<U83C0> \x78\x67 |0
+<U83C1> \x5A\xDC |0
+<U83C2> \x78\x85 |0
+<U83C3> \x78\x8D |0
+<U83C4> \x78\x90 |0
+<U83C5> \x5A\xDA |0
+<U83C6> \x78\x6F |0
+<U83C7> \x78\x89 |0
+<U83C8> \x78\x70 |0
+<U83C9> \x78\x7E |0
+<U83CA> \x5A\xE7 |0
+<U83CB> \x78\x7A |0
+<U83CC> \x5A\xE4 |0
+<U83CE> \x78\x7B |0
+<U83CF> \x78\x64 |0
+<U83D1> \x78\x8A |0
+<U83D4> \x5A\xED |0
+<U83D5> \x78\x87 |0
+<U83D6> \x78\x7C |0
+<U83D7> \x78\x92 |0
+<U83D8> \x78\x77 |0
+<U83D9> \x7B\xEE |0
+<U83DB> \x78\x95 |0
+<U83DC> \x5A\xEB |0
+<U83DD> \x78\x75 |0
+<U83DE> \x78\x82 |0
+<U83DF> \x5A\xEE |0
+<U83E0> \x5A\xD9 |0
+<U83E1> \x78\x79 |0
+<U83E2> \x78\x93 |0
+<U83E3> \x78\x72 |0
+<U83E4> \x78\x6B |0
+<U83E5> \x78\x76 |0
+<U83E7> \x78\x6A |0
+<U83E8> \x78\x68 |0
+<U83E9> \x5A\xD5 |0
+<U83EA> \x78\x8B |0
+<U83EB> \x78\x71 |0
+<U83EC> \x78\x8E |0
+<U83EE> \x78\x8F |0
+<U83EF> \x5A\xDD |0
+<U83F0> \x5A\xE2 |0
+<U83F1> \x5A\xDE |0
+<U83F2> \x5A\xE6 |0
+<U83F3> \x78\x86 |0
+<U83F4> \x5A\xDF |0
+<U83F5> \x78\x7D |0
+<U83F6> \x78\x6D |0
+<U83F8> \x5A\xD7 |0
+<U83F9> \x78\x65 |0
+<U83FA> \x78\x88 |0
+<U83FB> \x78\x91 |0
+<U83FC> \x78\x6C |0
+<U83FD> \x5A\xE5 |0
+<U83FE> \x78\x96 |0
+<U83FF> \x78\x78 |0
+<U8401> \x78\x74 |0
+<U8403> \x5A\xD6 |0
+<U8404> \x5A\xEA |0
+<U8406> \x78\x84 |0
+<U8407> \x5A\xEC |0
+<U8409> \x78\x7F |0
+<U840A> \x5A\xE1 |0
+<U840B> \x5A\xDB |0
+<U840C> \x5A\xE3 |0
+<U840D> \x5A\xD8 |0
+<U840E> \x5A\xE9 |0
+<U840F> \x78\x81 |0
+<U8410> \x78\x6E |0
+<U8411> \x78\x83 |0
+<U8412> \x78\x69 |0
+<U8413> \x78\x8C |0
+<U841B> \x78\x94 |0
+<U8423> \x78\x66 |0
+<U8429> \x7B\xED |0
+<U842B> \x7C\x46 |0
+<U842C> \x5C\xDB |0
+<U842D> \x7B\xF2 |0
+<U842F> \x7B\xF0 |0
+<U8430> \x7B\xDB |0
+<U8431> \x5D\x50 |0
+<U8432> \x7B\xEB |0
+<U8433> \x7C\x42 |0
+<U8434> \x7B\xE7 |0
+<U8435> \x5D\x58 |0
+<U8436> \x7C\x41 |0
+<U8437> \x7B\xE5 |0
+<U8438> \x5A\xE8 |0
+<U8439> \x7B\xF5 |0
+<U843A> \x7B\xE6 |0
+<U843B> \x7B\xFC |0
+<U843C> \x5D\x57 |0
+<U843D> \x5D\x4F |0
+<U843F> \x7B\xD0 |0
+<U8440> \x7B\xD8 |0
+<U8442> \x7B\xF1 |0
+<U8443> \x7B\xE9 |0
+<U8444> \x7C\x45 |0
+<U8445> \x7B\xEC |0
+<U8446> \x5D\x5D |0
+<U8447> \x7B\xFD |0
+<U8449> \x5D\x54 |0
+<U844B> \x7B\xEF |0
+<U844C> \x7B\xF7 |0
+<U844D> \x7B\xDC |0
+<U844E> \x7B\xF6 |0
+<U8450> \x7C\x4A |0
+<U8451> \x7B\xD7 |0
+<U8452> \x7B\xF8 |0
+<U8454> \x7C\x48 |0
+<U8456> \x7B\xD1 |0
+<U8457> \x5A\xE0 |0
+<U8459> \x7B\xDF |0
+<U845A> \x7B\xDE |0
+<U845B> \x5D\x56 |0
+<U845D> \x7B\xE2 |0
+<U845E> \x7B\xE4 |0
+<U845F> \x7B\xF3 |0
+<U8460> \x7C\x47 |0
+<U8461> \x5D\x59 |0
+<U8463> \x5D\x5A |0
+<U8465> \x7B\xD6 |0
+<U8466> \x5D\x52 |0
+<U8467> \x7B\xDA |0
+<U8468> \x7C\x43 |0
+<U8469> \x5D\x5B |0
+<U846B> \x5D\x53 |0
+<U846C> \x5D\x55 |0
+<U846D> \x5D\x5C |0
+<U846E> \x7C\x49 |0
+<U846F> \x7B\xF9 |0
+<U8470> \x7B\xF4 |0
+<U8473> \x7B\xE1 |0
+<U8474> \x7B\xE0 |0
+<U8475> \x5D\x51 |0
+<U8476> \x7B\xD2 |0
+<U8477> \x5D\x4E |0
+<U8478> \x7B\xEA |0
+<U8479> \x7B\xD3 |0
+<U847A> \x7B\xE8 |0
+<U847D> \x7B\xDD |0
+<U847E> \x7C\x44 |0
+<U8482> \x5D\x4D |0
+<U8486> \x7B\xD9 |0
+<U848D> \x7B\xD5 |0
+<U848E> \x7B\xFB |0
+<U848F> \x7B\xD4 |0
+<U8490> \x5F\x89 |0
+<U8491> \x7F\x7C |0
+<U8494> \x7F\x6B |0
+<U8497> \x7F\x55 |0
+<U8498> \x7F\x73 |0
+<U8499> \x5F\x81 |0
+<U849A> \x7F\x64 |0
+<U849B> \x7F\x6E |0
+<U849C> \x5F\x84 |0
+<U849D> \x7F\x67 |0
+<U849E> \x5F\x82 |0
+<U849F> \x7F\x58 |0
+<U84A0> \x7F\x76 |0
+<U84A1> \x7F\x57 |0
+<U84A2> \x7F\x6A |0
+<U84A4> \x7F\x56 |0
+<U84A7> \x7F\x68 |0
+<U84A8> \x7F\x71 |0
+<U84A9> \x7F\x6F |0
+<U84AA> \x7F\x63 |0
+<U84AB> \x7F\x5E |0
+<U84AC> \x7F\x5C |0
+<U84AE> \x7F\x5D |0
+<U84AF> \x7F\x70 |0
+<U84B0> \x7F\x7B |0
+<U84B1> \x7F\x65 |0
+<U84B2> \x5F\x83 |0
+<U84B4> \x7F\x60 |0
+<U84B6> \x7F\x74 |0
+<U84B8> \x5F\x86 |0
+<U84B9> \x7F\x5F |0
+<U84BA> \x7F\x59 |0
+<U84BB> \x7F\x69 |0
+<U84BC> \x5F\x8A |0
+<U84BF> \x5F\x7D |0
+<U84C0> \x5F\x87 |0
+<U84C1> \x7F\x61 |0
+<U84C2> \x7F\x5B |0
+<U84C4> \x5F\x7F |0
+<U84C5> \x7B\xFA |0
+<U84C6> \x5F\x7E |0
+<U84C7> \x7F\x6C |0
+<U84C9> \x5F\x7C |0
+<U84CA> \x5F\x8C |0
+<U84CB> \x5F\x85 |0
+<U84CC> \x7F\x6D |0
+<U84CD> \x7F\x62 |0
+<U84CE> \x7F\x5A |0
+<U84CF> \x7F\x75 |0
+<U84D0> \x7F\x66 |0
+<U84D1> \x5F\x8B |0
+<U84D2> \x7F\x79 |0
+<U84D3> \x5F\x88 |0
+<U84D4> \x7F\x78 |0
+<U84D6> \x7F\x72 |0
+<U84D7> \x7F\x77 |0
+<U84DB> \x7F\x7A |0
+<U84E7> \x82\x7E |0
+<U84E8> \x82\x7F |0
+<U84E9> \x82\x72 |0
+<U84EA> \x82\x71 |0
+<U84EB> \x82\x6D |0
+<U84EC> \x61\x7C |0
+<U84EE> \x61\x74 |0
+<U84EF> \x82\x82 |0
+<U84F0> \x82\x81 |0
+<U84F1> \x7B\xCF |0
+<U84F2> \x82\x6A |0
+<U84F3> \x82\x6E |0
+<U84F4> \x82\x68 |0
+<U84F6> \x82\x7B |0
+<U84F7> \x82\x6C |0
+<U84F9> \x82\x83 |0
+<U84FA> \x82\x65 |0
+<U84FB> \x82\x63 |0
+<U84FC> \x82\x6F |0
+<U84FD> \x82\x79 |0
+<U84FE> \x82\x74 |0
+<U84FF> \x61\x7E |0
+<U8500> \x82\x5A |0
+<U8502> \x82\x78 |0
+<U8506> \x61\x7F |0
+<U8507> \x7B\xE3 |0
+<U8508> \x82\x66 |0
+<U8509> \x82\x5D |0
+<U850A> \x82\x60 |0
+<U850B> \x82\x87 |0
+<U850C> \x82\x67 |0
+<U850D> \x82\x5E |0
+<U850E> \x82\x5C |0
+<U850F> \x82\x59 |0
+<U8511> \x61\x78 |0
+<U8512> \x82\x70 |0
+<U8513> \x61\x77 |0
+<U8514> \x61\x7B |0
+<U8515> \x82\x6B |0
+<U8516> \x82\x73 |0
+<U8517> \x61\x71 |0
+<U8518> \x82\x84 |0
+<U8519> \x82\x88 |0
+<U851A> \x61\x73 |0
+<U851C> \x82\x62 |0
+<U851D> \x82\x76 |0
+<U851E> \x82\x7A |0
+<U851F> \x82\x5F |0
+<U8520> \x82\x85 |0
+<U8521> \x61\x7A |0
+<U8523> \x61\x79 |0
+<U8524> \x82\x57 |0
+<U8525> \x61\x7D |0
+<U8526> \x82\x7D |0
+<U8527> \x82\x61 |0
+<U8528> \x82\x75 |0
+<U8529> \x82\x5B |0
+<U852A> \x82\x69 |0
+<U852B> \x82\x64 |0
+<U852C> \x61\x75 |0
+<U852D> \x61\x76 |0
+<U852E> \x82\x77 |0
+<U852F> \x82\x89 |0
+<U8530> \x82\x86 |0
+<U8531> \x82\x7C |0
+<U853B> \x82\x58 |0
+<U853D> \x61\x72 |0
+<U853E> \x85\x95 |0
+<U8540> \x85\x8C |0
+<U8541> \x85\x8F |0
+<U8543> \x63\x45 |0
+<U8544> \x85\x91 |0
+<U8545> \x85\x86 |0
+<U8546> \x85\x8D |0
+<U8547> \x85\x93 |0
+<U8548> \x63\x42 |0
+<U8549> \x63\x46 |0
+<U854A> \x62\xFD |0
+<U854D> \x85\x88 |0
+<U854E> \x85\x98 |0
+<U8551> \x85\x92 |0
+<U8553> \x85\x89 |0
+<U8554> \x85\xA1 |0
+<U8555> \x85\x9B |0
+<U8556> \x85\x85 |0
+<U8557> \x87\xF1 |0
+<U8558> \x85\x8B |0
+<U8559> \x63\x41 |0
+<U855B> \x85\x96 |0
+<U855D> \x85\xA0 |0
+<U855E> \x63\x49 |0
+<U8560> \x85\x9D |0
+<U8561> \x85\x8A |0
+<U8562> \x85\x90 |0
+<U8563> \x85\x94 |0
+<U8564> \x85\x8E |0
+<U8565> \x85\xA2 |0
+<U8566> \x85\x9F |0
+<U8567> \x85\x9C |0
+<U8568> \x63\x43 |0
+<U8569> \x63\x44 |0
+<U856A> \x63\x48 |0
+<U856B> \x85\x87 |0
+<U856C> \x85\xA3 |0
+<U856D> \x63\x47 |0
+<U856E> \x85\x99 |0
+<U8571> \x85\x97 |0
+<U8575> \x85\x9A |0
+<U8576> \x88\x41 |0
+<U8577> \x87\xEB |0
+<U8578> \x87\xF0 |0
+<U8579> \x87\xFD |0
+<U857A> \x87\xEF |0
+<U857B> \x87\xE7 |0
+<U857C> \x87\xEC |0
+<U857E> \x64\xAB |0
+<U8580> \x87\xE0 |0
+<U8581> \x87\xF8 |0
+<U8582> \x87\xFA |0
+<U8583> \x87\xDF |0
+<U8584> \x64\xAA |0
+<U8585> \x87\xFC |0
+<U8586> \x87\xF4 |0
+<U8587> \x64\xB1 |0
+<U8588> \x87\xFB |0
+<U8589> \x87\xED |0
+<U858A> \x64\xB3 |0
+<U858B> \x87\xE5 |0
+<U858C> \x85\x9E |0
+<U858D> \x87\xF5 |0
+<U858E> \x87\xF2 |0
+<U858F> \x87\xE1 |0
+<U8590> \x88\x43 |0
+<U8591> \x64\xAD |0
+<U8594> \x64\xAE |0
+<U8595> \x87\xE3 |0
+<U8596> \x87\xF3 |0
+<U8598> \x88\x42 |0
+<U8599> \x87\xF6 |0
+<U859A> \x87\xE9 |0
+<U859B> \x64\xB0 |0
+<U859C> \x64\xAC |0
+<U859D> \x87\xF7 |0
+<U859E> \x87\xEA |0
+<U859F> \x88\x44 |0
+<U85A0> \x87\xE4 |0
+<U85A1> \x87\xEE |0
+<U85A2> \x87\xF9 |0
+<U85A3> \x87\xE6 |0
+<U85A4> \x87\xE8 |0
+<U85A6> \x65\xB5 |0
+<U85A7> \x87\xE2 |0
+<U85A8> \x64\xB2 |0
+<U85A9> \x65\xAE |0
+<U85AA> \x64\xA9 |0
+<U85AF> \x64\xAF |0
+<U85B0> \x65\xB2 |0
+<U85B1> \x8A\x41 |0
+<U85B3> \x89\xF4 |0
+<U85B4> \x89\xEF |0
+<U85B5> \x89\xF5 |0
+<U85B6> \x8A\x42 |0
+<U85B7> \x8A\x46 |0
+<U85B8> \x8A\x45 |0
+<U85B9> \x65\xB4 |0
+<U85BA> \x65\xB3 |0
+<U85BD> \x89\xF6 |0
+<U85BE> \x8A\x47 |0
+<U85BF> \x89\xF9 |0
+<U85C0> \x89\xF1 |0
+<U85C2> \x89\xF3 |0
+<U85C3> \x89\xF2 |0
+<U85C4> \x89\xF8 |0
+<U85C5> \x89\xFD |0
+<U85C6> \x89\xF0 |0
+<U85C7> \x89\xF7 |0
+<U85C8> \x89\xFC |0
+<U85C9> \x65\xB1 |0
+<U85CB> \x89\xFA |0
+<U85CD> \x65\xAF |0
+<U85CE> \x89\xFB |0
+<U85CF> \x65\xAD |0
+<U85D0> \x65\xB0 |0
+<U85D1> \x8B\xE2 |0
+<U85D2> \x8A\x43 |0
+<U85D5> \x66\x8D |0
+<U85D7> \x8B\xDA |0
+<U85D8> \x8B\xDE |0
+<U85D9> \x8B\xD6 |0
+<U85DA> \x8B\xD9 |0
+<U85DC> \x8B\xE1 |0
+<U85DD> \x66\x8B |0
+<U85DE> \x8B\xE6 |0
+<U85DF> \x8B\xDF |0
+<U85E1> \x8B\xD7 |0
+<U85E2> \x8B\xE7 |0
+<U85E3> \x8B\xE0 |0
+<U85E4> \x66\x8E |0
+<U85E5> \x66\x8F |0
+<U85E6> \x8B\xE4 |0
+<U85E8> \x8B\xD8 |0
+<U85E9> \x66\x8A |0
+<U85EA> \x66\x8C |0
+<U85EB> \x8B\xD3 |0
+<U85EC> \x8B\xDB |0
+<U85ED> \x8B\xD5 |0
+<U85EF> \x8B\xE5 |0
+<U85F0> \x8B\xE3 |0
+<U85F1> \x8B\xD4 |0
+<U85F2> \x8B\xDC |0
+<U85F6> \x8D\x8D |0
+<U85F7> \x66\x90 |0
+<U85F8> \x8B\xDD |0
+<U85F9> \x67\x52 |0
+<U85FA> \x67\x54 |0
+<U85FB> \x67\x51 |0
+<U85FD> \x8D\x92 |0
+<U85FE> \x8D\x8A |0
+<U85FF> \x8D\x88 |0
+<U8600> \x8D\x8C |0
+<U8601> \x8D\x89 |0
+<U8604> \x8D\x8E |0
+<U8605> \x8D\x90 |0
+<U8606> \x67\x55 |0
+<U8607> \x67\x57 |0
+<U8609> \x8D\x8F |0
+<U860A> \x67\x58 |0
+<U860B> \x67\x56 |0
+<U860C> \x8D\x91 |0
+<U8611> \x67\x53 |0
+<U8617> \x67\xA0 |0
+<U8618> \x8E\xA1 |0
+<U8619> \x8E\xA7 |0
+<U861A> \x67\xA2 |0
+<U861B> \x8D\x8B |0
+<U861C> \x8E\xA6 |0
+<U861E> \x8E\xAD |0
+<U861F> \x8E\xA4 |0
+<U8620> \x8E\xAB |0
+<U8621> \x8E\xAA |0
+<U8622> \x8D\x87 |0
+<U8623> \x8E\xA5 |0
+<U8624> \x8A\x44 |0
+<U8625> \x8E\xAE |0
+<U8626> \x8E\xA3 |0
+<U8627> \x8E\xA8 |0
+<U8629> \x8E\xAC |0
+<U862A> \x8E\xA2 |0
+<U862C> \x8F\x9A |0
+<U862D> \x67\xA1 |0
+<U862E> \x8E\xA9 |0
+<U8631> \x90\x65 |0
+<U8632> \x8F\x9B |0
+<U8633> \x8F\x99 |0
+<U8634> \x8F\x97 |0
+<U8635> \x8F\x98 |0
+<U8636> \x8F\x9C |0
+<U8638> \x68\x65 |0
+<U8639> \x90\x63 |0
+<U863A> \x90\x61 |0
+<U863B> \x90\x66 |0
+<U863C> \x90\x64 |0
+<U863E> \x90\x67 |0
+<U863F> \x68\x66 |0
+<U8640> \x90\x62 |0
+<U8643> \x90\xCB |0
+<U8646> \x91\x56 |0
+<U8647> \x91\x57 |0
+<U8648> \x91\x58 |0
+<U864B> \x91\xB7 |0
+<U864C> \x91\xAD |0
+<U864D> \x48\xCD |3
+<U864D> \x69\xEE |0
+<U864E> \x51\xCC |0
+<U8650> \x53\xCB |0
+<U8652> \x71\xDA |0
+<U8653> \x71\xD9 |0
+<U8654> \x56\x45 |0
+<U8655> \x58\xA7 |0
+<U8656> \x75\x43 |0
+<U8659> \x75\x42 |0
+<U865B> \x5A\xEF |0
+<U865C> \x5D\x5F |0
+<U865E> \x5D\x5E |0
+<U865F> \x5D\x60 |0
+<U8661> \x7F\x7D |0
+<U8662> \x82\x8A |0
+<U8663> \x85\xA4 |0
+<U8664> \x85\xA6 |0
+<U8665> \x85\xA5 |0
+<U8667> \x64\xB4 |0
+<U8668> \x88\x45 |0
+<U8669> \x8A\x48 |0
+<U866A> \x91\x95 |0
+<U866B> \x48\xCE |3
+<U866B> \x4E\x86 |0
+<U866D> \x6C\xE9 |0
+<U866E> \x6C\xEA |0
+<U866F> \x6C\xE8 |0
+<U8670> \x6C\xE7 |0
+<U8671> \x51\xCD |0
+<U8673> \x6F\x6B |0
+<U8674> \x6F\x69 |0
+<U8677> \x6F\x68 |0
+<U8679> \x53\xCC |0
+<U867A> \x53\xCE |0
+<U867B> \x53\xCD |0
+<U867C> \x6F\x6A |0
+<U8685> \x71\xE6 |0
+<U8686> \x71\xE3 |0
+<U8687> \x71\xE1 |0
+<U868A> \x56\x46 |0
+<U868B> \x71\xE4 |0
+<U868C> \x56\x4B |0
+<U868D> \x71\xDE |0
+<U868E> \x71\xED |0
+<U8690> \x71\xEF |0
+<U8691> \x71\xDF |0
+<U8693> \x56\x48 |0
+<U8694> \x71\xF0 |0
+<U8695> \x71\xEB |0
+<U8696> \x71\xDD |0
+<U8697> \x71\xE2 |0
+<U8698> \x71\xEC |0
+<U8699> \x71\xE8 |0
+<U869A> \x71\xE5 |0
+<U869C> \x56\x4D |0
+<U869D> \x71\xEE |0
+<U869E> \x71\xE0 |0
+<U86A1> \x71\xE9 |0
+<U86A2> \x71\xDB |0
+<U86A3> \x56\x4C |0
+<U86A4> \x56\x49 |0
+<U86A5> \x71\xE7 |0
+<U86A7> \x71\xEA |0
+<U86A8> \x71\xDC |0
+<U86A9> \x56\x4A |0
+<U86AA> \x56\x47 |0
+<U86AF> \x58\xB1 |0
+<U86B0> \x75\x4A |0
+<U86B1> \x58\xB0 |0
+<U86B3> \x75\x4D |0
+<U86B4> \x75\x50 |0
+<U86B5> \x58\xAD |0
+<U86B6> \x58\xAB |0
+<U86B7> \x75\x45 |0
+<U86B8> \x75\x4E |0
+<U86B9> \x75\x4C |0
+<U86BA> \x75\x49 |0
+<U86BB> \x75\x51 |0
+<U86BC> \x75\x52 |0
+<U86BD> \x75\x54 |0
+<U86BE> \x75\x55 |0
+<U86BF> \x75\x44 |0
+<U86C0> \x58\xAA |0
+<U86C1> \x75\x47 |0
+<U86C2> \x75\x46 |0
+<U86C3> \x75\x53 |0
+<U86C4> \x58\xAC |0
+<U86C5> \x75\x48 |0
+<U86C6> \x58\xAE |0
+<U86C7> \x58\xA9 |0
+<U86C8> \x75\x4B |0
+<U86C9> \x58\xB2 |0
+<U86CB> \x58\xAF |0
+<U86CC> \x75\x4F |0
+<U86D0> \x5A\xF6 |0
+<U86D1> \x78\xA5 |0
+<U86D3> \x78\x9A |0
+<U86D4> \x5A\xF3 |0
+<U86D6> \x7C\x50 |0
+<U86D7> \x78\xA3 |0
+<U86D8> \x78\x97 |0
+<U86D9> \x5A\xF1 |0
+<U86DA> \x78\x9C |0
+<U86DB> \x5A\xF4 |0
+<U86DC> \x78\xA0 |0
+<U86DD> \x78\x9E |0
+<U86DE> \x5A\xF7 |0
+<U86DF> \x5A\xF0 |0
+<U86E2> \x78\x98 |0
+<U86E3> \x78\x9B |0
+<U86E4> \x5A\xF5 |0
+<U86E6> \x78\x99 |0
+<U86E8> \x78\xA4 |0
+<U86E9> \x78\xA2 |0
+<U86EA> \x78\x9D |0
+<U86EB> \x78\x9F |0
+<U86EC> \x78\xA1 |0
+<U86ED> \x5A\xF2 |0
+<U86F5> \x7C\x51 |0
+<U86F6> \x7C\x57 |0
+<U86F7> \x7C\x4D |0
+<U86F8> \x7C\x53 |0
+<U86F9> \x5D\x61 |0
+<U86FA> \x7C\x4F |0
+<U86FB> \x5D\x67 |0
+<U86FE> \x5D\x66 |0
+<U8700> \x5D\x65 |0
+<U8701> \x7C\x56 |0
+<U8702> \x5D\x68 |0
+<U8703> \x5D\x69 |0
+<U8704> \x7C\x4C |0
+<U8705> \x7C\x59 |0
+<U8706> \x5D\x6A |0
+<U8707> \x5D\x64 |0
+<U8708> \x5D\x63 |0
+<U8709> \x7C\x55 |0
+<U870A> \x5D\x6B |0
+<U870B> \x7C\x4B |0
+<U870C> \x7C\x4E |0
+<U870D> \x7C\x58 |0
+<U870E> \x7C\x54 |0
+<U8711> \x7F\x9E |0
+<U8712> \x7F\x93 |0
+<U8713> \x5D\x62 |0
+<U8718> \x5F\x93 |0
+<U8719> \x7F\x87 |0
+<U871A> \x7F\x9C |0
+<U871B> \x7F\x88 |0
+<U871C> \x5F\x8E |0
+<U871E> \x7F\x85 |0
+<U8720> \x7F\x8E |0
+<U8721> \x7F\x86 |0
+<U8722> \x5F\x90 |0
+<U8723> \x7F\x7F |0
+<U8724> \x7F\x9B |0
+<U8725> \x5F\x91 |0
+<U8726> \x7F\x98 |0
+<U8727> \x7F\x99 |0
+<U8728> \x7F\x81 |0
+<U8729> \x5F\x96 |0
+<U872A> \x7F\x90 |0
+<U872C> \x7F\x8A |0
+<U872D> \x7F\x91 |0
+<U872E> \x7F\x84 |0
+<U8730> \x7F\x9D |0
+<U8731> \x7F\x95 |0
+<U8732> \x7F\x8F |0
+<U8733> \x7F\x7E |0
+<U8734> \x5F\x92 |0
+<U8735> \x7F\x96 |0
+<U8737> \x5F\x95 |0
+<U8738> \x7F\x9A |0
+<U873A> \x7F\x94 |0
+<U873B> \x5F\x8F |0
+<U873C> \x7F\x92 |0
+<U873E> \x7F\x8C |0
+<U873F> \x5F\x8D |0
+<U8740> \x7F\x83 |0
+<U8741> \x7F\x8B |0
+<U8742> \x7F\x97 |0
+<U8743> \x7F\x89 |0
+<U8746> \x7F\x8D |0
+<U874C> \x61\x8A |0
+<U874D> \x7C\x52 |0
+<U874E> \x82\x9C |0
+<U874F> \x82\xA5 |0
+<U8750> \x82\x9B |0
+<U8751> \x82\x97 |0
+<U8752> \x82\x94 |0
+<U8753> \x61\x8B |0
+<U8754> \x82\x92 |0
+<U8755> \x5F\x94 |0
+<U8756> \x82\x8B |0
+<U8757> \x61\x89 |0
+<U8758> \x82\x91 |0
+<U8759> \x61\x88 |0
+<U875A> \x82\x96 |0
+<U875B> \x82\x93 |0
+<U875C> \x82\xA3 |0
+<U875D> \x82\x9E |0
+<U875E> \x82\x98 |0
+<U875F> \x82\x9D |0
+<U8760> \x61\x84 |0
+<U8761> \x82\x95 |0
+<U8762> \x82\xA8 |0
+<U8763> \x82\x8C |0
+<U8764> \x82\x8D |0
+<U8765> \x82\xA4 |0
+<U8766> \x61\x85 |0
+<U8767> \x82\xA9 |0
+<U8768> \x61\x87 |0
+<U8769> \x82\xAA |0
+<U876A> \x82\x9A |0
+<U876B> \x7F\x82 |0
+<U876C> \x82\xA0 |0
+<U876D> \x82\x99 |0
+<U876E> \x82\xA2 |0
+<U876F> \x82\x9F |0
+<U8773> \x82\x90 |0
+<U8774> \x61\x82 |0
+<U8775> \x82\xA7 |0
+<U8776> \x61\x83 |0
+<U8777> \x82\x8E |0
+<U8778> \x61\x86 |0
+<U8779> \x85\xB0 |0
+<U877A> \x82\xA1 |0
+<U877B> \x82\xA6 |0
+<U8781> \x85\xAD |0
+<U8782> \x61\x81 |0
+<U8783> \x63\x4A |0
+<U8784> \x85\xB7 |0
+<U8785> \x85\xB3 |0
+<U8787> \x85\xB1 |0
+<U8788> \x85\xAC |0
+<U8789> \x85\xBB |0
+<U878D> \x63\x4E |0
+<U878F> \x85\xA8 |0
+<U8790> \x85\xB4 |0
+<U8791> \x85\xB5 |0
+<U8792> \x85\xAB |0
+<U8793> \x85\xAA |0
+<U8794> \x85\xB8 |0
+<U8796> \x85\xAE |0
+<U8797> \x85\xA9 |0
+<U8798> \x85\xAF |0
+<U879A> \x85\xBA |0
+<U879B> \x85\xA7 |0
+<U879C> \x85\xB9 |0
+<U879D> \x85\xB6 |0
+<U879E> \x63\x4C |0
+<U879F> \x63\x4B |0
+<U87A2> \x63\x4D |0
+<U87A3> \x85\xB2 |0
+<U87A4> \x8A\x59 |0
+<U87AA> \x88\x47 |0
+<U87AB> \x64\xBA |0
+<U87AC> \x88\x4B |0
+<U87AD> \x88\x48 |0
+<U87AE> \x88\x4F |0
+<U87AF> \x88\x55 |0
+<U87B0> \x88\x4A |0
+<U87B2> \x88\x5E |0
+<U87B3> \x64\xB7 |0
+<U87B4> \x88\x58 |0
+<U87B5> \x88\x4D |0
+<U87B6> \x88\x59 |0
+<U87B7> \x88\x54 |0
+<U87B8> \x88\x5B |0
+<U87B9> \x88\x4C |0
+<U87BA> \x64\xBC |0
+<U87BB> \x64\xBB |0
+<U87BC> \x88\x4E |0
+<U87BD> \x88\x5C |0
+<U87BE> \x88\x46 |0
+<U87BF> \x88\x5A |0
+<U87C0> \x64\xB5 |0
+<U87C2> \x88\x52 |0
+<U87C3> \x88\x51 |0
+<U87C4> \x88\x56 |0
+<U87C5> \x88\x49 |0
+<U87C6> \x64\xB9 |0
+<U87C8> \x64\xBD |0
+<U87C9> \x88\x50 |0
+<U87CA> \x88\x57 |0
+<U87CB> \x64\xBE |0
+<U87CC> \x88\x53 |0
+<U87D1> \x64\xB6 |0
+<U87D2> \x64\xB8 |0
+<U87D3> \x8A\x55 |0
+<U87D4> \x8A\x53 |0
+<U87D7> \x8A\x5A |0
+<U87D8> \x8A\x57 |0
+<U87D9> \x8A\x5B |0
+<U87DB> \x8A\x4C |0
+<U87DC> \x8A\x54 |0
+<U87DD> \x8A\x5F |0
+<U87DE> \x88\x5D |0
+<U87DF> \x8A\x50 |0
+<U87E0> \x65\xB9 |0
+<U87E1> \x82\x8F |0
+<U87E2> \x8A\x4B |0
+<U87E3> \x8A\x58 |0
+<U87E4> \x8A\x52 |0
+<U87E5> \x8A\x4F |0
+<U87E6> \x8A\x4A |0
+<U87E7> \x8A\x49 |0
+<U87E8> \x8A\x5E |0
+<U87EA> \x8A\x4E |0
+<U87EB> \x8A\x4D |0
+<U87EC> \x65\xB7 |0
+<U87ED> \x8A\x56 |0
+<U87EF> \x65\xB6 |0
+<U87F2> \x65\xB8 |0
+<U87F3> \x8A\x51 |0
+<U87F4> \x8A\x5D |0
+<U87F6> \x8B\xEB |0
+<U87F7> \x8B\xEC |0
+<U87F9> \x66\x94 |0
+<U87FA> \x8B\xE9 |0
+<U87FB> \x66\x91 |0
+<U87FC> \x8B\xF1 |0
+<U87FE> \x66\x95 |0
+<U87FF> \x8B\xF3 |0
+<U8800> \x8B\xE8 |0
+<U8801> \x8A\x5C |0
+<U8802> \x8B\xF5 |0
+<U8803> \x8B\xEA |0
+<U8805> \x66\x92 |0
+<U8806> \x8B\xF0 |0
+<U8808> \x8B\xF2 |0
+<U8809> \x8B\xED |0
+<U880A> \x8B\xF4 |0
+<U880B> \x8B\xEF |0
+<U880C> \x8B\xEE |0
+<U880D> \x66\x93 |0
+<U8810> \x8D\x94 |0
+<U8811> \x8D\x95 |0
+<U8813> \x8D\x97 |0
+<U8814> \x67\x59 |0
+<U8815> \x67\x5A |0
+<U8816> \x8D\x98 |0
+<U8817> \x8D\x96 |0
+<U8819> \x8D\x93 |0
+<U881B> \x8E\xB1 |0
+<U881C> \x8E\xB4 |0
+<U881D> \x8E\xB0 |0
+<U881F> \x67\xA6 |0
+<U8820> \x8E\xB2 |0
+<U8821> \x67\xA5 |0
+<U8822> \x67\xA4 |0
+<U8823> \x67\xA3 |0
+<U8824> \x8E\xB3 |0
+<U8825> \x8F\xA1 |0
+<U8826> \x8F\x9F |0
+<U8828> \x8F\x9E |0
+<U8829> \x8E\xAF |0
+<U882A> \x8F\xA0 |0
+<U882B> \x8E\xB5 |0
+<U882C> \x8F\x9D |0
+<U882E> \x90\x6A |0
+<U882F> \x90\x48 |0
+<U8830> \x90\x68 |0
+<U8831> \x68\x67 |0
+<U8832> \x90\x69 |0
+<U8833> \x90\x6B |0
+<U8835> \x90\xCE |0
+<U8836> \x68\x87 |0
+<U8837> \x90\xCD |0
+<U8838> \x90\xCC |0
+<U8839> \x68\x88 |0
+<U883B> \x68\xA6 |0
+<U883C> \x91\x7F |0
+<U883D> \x91\x97 |0
+<U883E> \x91\x96 |0
+<U883F> \x91\x98 |0
+<U8840> \x48\xCF |3
+<U8840> \x4E\x87 |0
+<U8841> \x6F\x6C |0
+<U8843> \x71\xF1 |0
+<U8844> \x71\xF2 |0
+<U8848> \x78\xA6 |0
+<U884A> \x8E\xB6 |0
+<U884B> \x90\xCF |0
+<U884C> \x48\xD0 |3
+<U884C> \x4E\x88 |0
+<U884D> \x53\xCF |0
+<U884E> \x6F\x6D |0
+<U8852> \x75\x56 |0
+<U8853> \x58\xB3 |0
+<U8855> \x78\xA8 |0
+<U8856> \x78\xA7 |0
+<U8857> \x5A\xF8 |0
+<U8859> \x5D\x6C |0
+<U885A> \x82\xAB |0
+<U885B> \x61\x8C |0
+<U885D> \x61\x8D |0
+<U8861> \x63\x4F |0
+<U8862> \x68\x89 |0
+<U8863> \x48\xD1 |3
+<U8863> \x4E\x89 |0
+<U8867> \x6F\x6E |0
+<U8868> \x51\xCF |0
+<U8869> \x6F\x70 |0
+<U886A> \x6F\x6F |0
+<U886B> \x53\xD0 |0
+<U886D> \x71\xF3 |0
+<U886F> \x71\xFA |0
+<U8870> \x56\x4E |0
+<U8871> \x71\xF8 |0
+<U8872> \x71\xF6 |0
+<U8874> \x71\xFD |0
+<U8875> \x71\xF4 |0
+<U8876> \x71\xF5 |0
+<U8877> \x56\x4F |0
+<U8879> \x56\x53 |0
+<U887C> \x72\x41 |0
+<U887D> \x56\x52 |0
+<U887E> \x71\xFC |0
+<U887F> \x71\xF9 |0
+<U8880> \x71\xF7 |0
+<U8881> \x56\x50 |0
+<U8882> \x56\x51 |0
+<U8883> \x71\xFB |0
+<U8888> \x58\xB5 |0
+<U8889> \x75\x57 |0
+<U888B> \x58\xBA |0
+<U888C> \x75\x67 |0
+<U888D> \x58\xB9 |0
+<U888E> \x75\x69 |0
+<U8891> \x75\x5D |0
+<U8892> \x58\xB7 |0
+<U8893> \x75\x68 |0
+<U8895> \x75\x58 |0
+<U8896> \x58\xB8 |0
+<U8897> \x75\x64 |0
+<U8898> \x75\x60 |0
+<U8899> \x75\x62 |0
+<U889A> \x75\x5C |0
+<U889B> \x75\x63 |0
+<U889E> \x58\xB4 |0
+<U889F> \x75\x5F |0
+<U88A1> \x75\x5E |0
+<U88A2> \x75\x5A |0
+<U88A4> \x75\x65 |0
+<U88A7> \x75\x61 |0
+<U88A8> \x75\x59 |0
+<U88AA> \x75\x5B |0
+<U88AB> \x58\xB6 |0
+<U88AC> \x75\x66 |0
+<U88B1> \x5A\xFB |0
+<U88B2> \x78\xB3 |0
+<U88B6> \x78\xAF |0
+<U88B7> \x78\xB1 |0
+<U88B8> \x78\xAC |0
+<U88B9> \x78\xAB |0
+<U88BA> \x78\xA9 |0
+<U88BC> \x78\xB0 |0
+<U88BD> \x78\xB2 |0
+<U88BE> \x78\xAE |0
+<U88C0> \x78\xAD |0
+<U88C1> \x5A\xF9 |0
+<U88C2> \x5A\xFA |0
+<U88C9> \x78\xB5 |0
+<U88CA> \x5D\x74 |0
+<U88CB> \x7C\x5B |0
+<U88CC> \x7C\x61 |0
+<U88CD> \x7C\x5C |0
+<U88CE> \x7C\x5D |0
+<U88D0> \x7C\x62 |0
+<U88D2> \x5D\x76 |0
+<U88D4> \x5D\x6E |0
+<U88D5> \x5D\x75 |0
+<U88D6> \x7C\x5A |0
+<U88D7> \x78\xAA |0
+<U88D8> \x5D\x71 |0
+<U88D9> \x5D\x6F |0
+<U88DA> \x7C\x60 |0
+<U88DB> \x7C\x5F |0
+<U88DC> \x5D\x70 |0
+<U88DD> \x5D\x72 |0
+<U88DE> \x7C\x5E |0
+<U88DF> \x5D\x6D |0
+<U88E1> \x5D\x73 |0
+<U88E7> \x7F\xA0 |0
+<U88E8> \x5F\x9D |0
+<U88EB> \x7F\xAB |0
+<U88EC> \x7F\xAA |0
+<U88EE> \x7F\xA5 |0
+<U88EF> \x5F\x9F |0
+<U88F0> \x7F\xA9 |0
+<U88F1> \x7F\xA1 |0
+<U88F2> \x7F\xA2 |0
+<U88F3> \x5F\x97 |0
+<U88F4> \x5F\x99 |0
+<U88F6> \x7F\xA7 |0
+<U88F7> \x7F\x9F |0
+<U88F8> \x5F\x9B |0
+<U88F9> \x5F\x9A |0
+<U88FA> \x7F\xA3 |0
+<U88FB> \x7F\xA8 |0
+<U88FC> \x7F\xA6 |0
+<U88FD> \x5F\x9C |0
+<U88FE> \x7F\xA4 |0
+<U8901> \x78\xB4 |0
+<U8902> \x5F\x98 |0
+<U8905> \x82\xAC |0
+<U8906> \x82\xB3 |0
+<U8907> \x61\x8F |0
+<U8909> \x82\xB7 |0
+<U890A> \x61\x93 |0
+<U890B> \x82\xAF |0
+<U890C> \x82\xAD |0
+<U890E> \x82\xB6 |0
+<U8910> \x61\x8E |0
+<U8911> \x82\xB5 |0
+<U8912> \x61\x90 |0
+<U8913> \x61\x91 |0
+<U8914> \x82\xAE |0
+<U8915> \x61\x92 |0
+<U8916> \x82\xB4 |0
+<U8917> \x82\xB0 |0
+<U8918> \x82\xB1 |0
+<U8919> \x82\xB2 |0
+<U891A> \x5F\x9E |0
+<U891E> \x85\xBC |0
+<U891F> \x85\xC8 |0
+<U8921> \x63\x54 |0
+<U8922> \x85\xC3 |0
+<U8923> \x85\xC5 |0
+<U8925> \x63\x52 |0
+<U8926> \x85\xBD |0
+<U8927> \x85\xC1 |0
+<U8929> \x85\xC4 |0
+<U892A> \x63\x50 |0
+<U892B> \x63\x53 |0
+<U892C> \x85\xC7 |0
+<U892D> \x85\xBF |0
+<U892E> \x85\xC0 |0
+<U892F> \x85\xC6 |0
+<U8930> \x85\xBE |0
+<U8931> \x85\xC2 |0
+<U8932> \x63\x51 |0
+<U8933> \x88\x60 |0
+<U8935> \x88\x5F |0
+<U8936> \x64\xC0 |0
+<U8937> \x88\x65 |0
+<U8938> \x64\xC2 |0
+<U893B> \x64\xBF |0
+<U893C> \x88\x61 |0
+<U893D> \x64\xC3 |0
+<U893E> \x88\x62 |0
+<U8941> \x88\x63 |0
+<U8942> \x88\x66 |0
+<U8944> \x64\xC1 |0
+<U8946> \x8A\x64 |0
+<U8949> \x8A\x67 |0
+<U894B> \x8A\x61 |0
+<U894C> \x8A\x63 |0
+<U894F> \x8A\x62 |0
+<U8950> \x8A\x65 |0
+<U8951> \x8A\x66 |0
+<U8952> \x88\x64 |0
+<U8953> \x8A\x60 |0
+<U8956> \x66\x98 |0
+<U8957> \x8B\xF9 |0
+<U8958> \x8B\xFC |0
+<U8959> \x8C\x41 |0
+<U895A> \x8B\xF7 |0
+<U895B> \x8B\xF8 |0
+<U895C> \x8B\xFB |0
+<U895D> \x8B\xFD |0
+<U895E> \x66\x99 |0
+<U895F> \x66\x97 |0
+<U8960> \x66\x96 |0
+<U8961> \x8B\xFA |0
+<U8962> \x8B\xF6 |0
+<U8963> \x8D\x99 |0
+<U8964> \x67\x5B |0
+<U8966> \x8D\x9A |0
+<U8969> \x8E\xB8 |0
+<U896A> \x67\xA7 |0
+<U896B> \x8E\xBA |0
+<U896C> \x67\xA8 |0
+<U896D> \x8E\xB7 |0
+<U896E> \x8E\xB9 |0
+<U896F> \x67\xF1 |0
+<U8971> \x8F\xA2 |0
+<U8972> \x67\xF0 |0
+<U8973> \x90\x6E |0
+<U8974> \x90\x6D |0
+<U8976> \x90\x6C |0
+<U8979> \x91\x59 |0
+<U897A> \x91\x5A |0
+<U897B> \x91\x5C |0
+<U897C> \x91\x5B |0
+<U897E> \x48\xD2 |3
+<U897E> \x69\xEF |0
+<U897F> \x4E\x8A |0
+<U8981> \x53\xD1 |0
+<U8982> \x75\x6A |0
+<U8983> \x5A\xFC |0
+<U8985> \x7C\x63 |0
+<U8986> \x65\xBA |0
+<U8988> \x8C\x42 |0
+<U898B> \x48\xD3 |3
+<U898B> \x4F\xC3 |0
+<U898F> \x58\xBC |0
+<U8993> \x58\xBB |0
+<U8995> \x78\xB6 |0
+<U8996> \x5A\xFD |0
+<U8997> \x78\xB8 |0
+<U8998> \x78\xB7 |0
+<U899B> \x7C\x64 |0
+<U899C> \x5D\x77 |0
+<U899D> \x7F\xAC |0
+<U899E> \x7F\xAF |0
+<U899F> \x7F\xAE |0
+<U89A1> \x7F\xAD |0
+<U89A2> \x82\xB8 |0
+<U89A3> \x82\xBA |0
+<U89A4> \x82\xB9 |0
+<U89A6> \x63\x56 |0
+<U89AA> \x63\x55 |0
+<U89AC> \x64\xC4 |0
+<U89AD> \x88\x67 |0
+<U89AE> \x88\x69 |0
+<U89AF> \x88\x68 |0
+<U89B2> \x65\xBB |0
+<U89B6> \x8C\x44 |0
+<U89B7> \x8C\x43 |0
+<U89B9> \x8D\x9B |0
+<U89BA> \x67\x5C |0
+<U89BD> \x67\xA9 |0
+<U89BE> \x8F\xA4 |0
+<U89BF> \x8F\xA3 |0
+<U89C0> \x68\xA7 |0
+<U89D2> \x48\xD4 |3
+<U89D2> \x4F\xC4 |0
+<U89D3> \x6F\x71 |0
+<U89D4> \x53\xD2 |0
+<U89D5> \x75\x6D |0
+<U89D6> \x75\x6B |0
+<U89D9> \x75\x6C |0
+<U89DA> \x78\xBA |0
+<U89DB> \x78\xBB |0
+<U89DC> \x7C\x6B |0
+<U89DD> \x78\xB9 |0
+<U89DF> \x7C\x65 |0
+<U89E0> \x7C\x69 |0
+<U89E1> \x7C\x68 |0
+<U89E2> \x7C\x6A |0
+<U89E3> \x5D\x78 |0
+<U89E4> \x7C\x67 |0
+<U89E5> \x7C\x66 |0
+<U89E6> \x7C\x6C |0
+<U89E8> \x7F\xB2 |0
+<U89E9> \x7F\xB0 |0
+<U89EB> \x7F\xB1 |0
+<U89EC> \x82\xBD |0
+<U89ED> \x82\xBB |0
+<U89F0> \x82\xBC |0
+<U89F1> \x85\xC9 |0
+<U89F2> \x88\x6A |0
+<U89F3> \x88\x6B |0
+<U89F4> \x65\xBC |0
+<U89F6> \x8C\x45 |0
+<U89F7> \x8D\x9C |0
+<U89F8> \x67\x5D |0
+<U89FA> \x8E\xBB |0
+<U89FB> \x8F\xA5 |0
+<U89FC> \x67\xF2 |0
+<U89FE> \x90\x6F |0
+<U89FF> \x91\x5D |0
+<U8A00> \x48\xD5 |3
+<U8A00> \x4F\xC5 |0
+<U8A02> \x53\xD4 |0
+<U8A03> \x53\xD5 |0
+<U8A04> \x6F\x72 |0
+<U8A07> \x6F\x73 |0
+<U8A08> \x53\xD3 |0
+<U8A0A> \x56\x59 |0
+<U8A0C> \x56\x57 |0
+<U8A0E> \x56\x56 |0
+<U8A0F> \x56\x5D |0
+<U8A10> \x56\x55 |0
+<U8A11> \x56\x5E |0
+<U8A12> \x72\x42 |0
+<U8A13> \x56\x5B |0
+<U8A15> \x56\x58 |0
+<U8A16> \x56\x5C |0
+<U8A17> \x56\x5A |0
+<U8A18> \x56\x54 |0
+<U8A1B> \x58\xC4 |0
+<U8A1D> \x58\xBE |0
+<U8A1E> \x75\x71 |0
+<U8A1F> \x58\xC3 |0
+<U8A22> \x58\xC5 |0
+<U8A23> \x58\xBF |0
+<U8A25> \x58\xC0 |0
+<U8A27> \x75\x6F |0
+<U8A2A> \x58\xBD |0
+<U8A2C> \x75\x70 |0
+<U8A2D> \x58\xC2 |0
+<U8A30> \x75\x6E |0
+<U8A31> \x58\xC1 |0
+<U8A34> \x5B\x4B |0
+<U8A36> \x5B\x4D |0
+<U8A39> \x78\xBE |0
+<U8A3A> \x5B\x4C |0
+<U8A3B> \x5B\x41 |0
+<U8A3C> \x5B\x45 |0
+<U8A3E> \x5D\x8C |0
+<U8A3F> \x7C\x71 |0
+<U8A40> \x78\xC0 |0
+<U8A41> \x5B\x46 |0
+<U8A44> \x78\xC3 |0
+<U8A45> \x78\xC4 |0
+<U8A46> \x5B\x4A |0
+<U8A48> \x78\xC6 |0
+<U8A4A> \x78\xC8 |0
+<U8A4C> \x78\xC9 |0
+<U8A4D> \x78\xBD |0
+<U8A4E> \x78\xBC |0
+<U8A4F> \x78\xCA |0
+<U8A50> \x5B\x49 |0
+<U8A51> \x78\xC7 |0
+<U8A52> \x78\xC5 |0
+<U8A54> \x5B\x47 |0
+<U8A55> \x5B\x43 |0
+<U8A56> \x5B\x4E |0
+<U8A57> \x78\xC1 |0
+<U8A58> \x78\xC2 |0
+<U8A59> \x78\xBF |0
+<U8A5B> \x5B\x48 |0
+<U8A5E> \x5B\x44 |0
+<U8A60> \x5B\x42 |0
+<U8A61> \x7C\x70 |0
+<U8A62> \x5D\x87 |0
+<U8A63> \x5D\x82 |0
+<U8A66> \x5D\x7C |0
+<U8A68> \x5D\x8D |0
+<U8A69> \x5D\x7D |0
+<U8A6B> \x5D\x79 |0
+<U8A6C> \x5D\x89 |0
+<U8A6D> \x5D\x86 |0
+<U8A6E> \x5D\x88 |0
+<U8A70> \x5D\x7E |0
+<U8A71> \x5D\x84 |0
+<U8A72> \x5D\x7A |0
+<U8A73> \x5D\x7B |0
+<U8A74> \x7C\x78 |0
+<U8A75> \x7C\x75 |0
+<U8A76> \x7C\x6D |0
+<U8A77> \x7C\x72 |0
+<U8A79> \x5D\x8A |0
+<U8A7A> \x7C\x79 |0
+<U8A7B> \x5D\x8B |0
+<U8A7C> \x5D\x81 |0
+<U8A7F> \x7C\x6F |0
+<U8A81> \x7C\x77 |0
+<U8A82> \x7C\x73 |0
+<U8A83> \x7C\x76 |0
+<U8A84> \x7C\x74 |0
+<U8A85> \x5D\x85 |0
+<U8A86> \x7C\x6E |0
+<U8A87> \x5D\x7F |0
+<U8A8B> \x7F\xB5 |0
+<U8A8C> \x5F\xA1 |0
+<U8A8D> \x5F\xA4 |0
+<U8A8F> \x7F\xB7 |0
+<U8A91> \x5F\xAC |0
+<U8A92> \x7F\xB6 |0
+<U8A93> \x5F\xA6 |0
+<U8A95> \x61\x98 |0
+<U8A96> \x7F\xB8 |0
+<U8A98> \x5F\xAB |0
+<U8A99> \x7F\xB4 |0
+<U8A9A> \x5F\xAD |0
+<U8A9E> \x5F\xA2 |0
+<U8AA0> \x5D\x83 |0
+<U8AA1> \x5F\xA5 |0
+<U8AA3> \x5F\xA3 |0
+<U8AA4> \x5F\xA7 |0
+<U8AA5> \x5F\xA9 |0
+<U8AA6> \x5F\xA0 |0
+<U8AA7> \x5F\xAE |0
+<U8AA8> \x5F\xAA |0
+<U8AAA> \x5F\xA8 |0
+<U8AAB> \x7F\xB3 |0
+<U8AB0> \x61\x9F |0
+<U8AB2> \x61\x9B |0
+<U8AB6> \x61\xA2 |0
+<U8AB8> \x82\xC0 |0
+<U8AB9> \x61\xA3 |0
+<U8ABA> \x82\xCC |0
+<U8ABB> \x82\xC5 |0
+<U8ABC> \x61\x94 |0
+<U8ABD> \x82\xCD |0
+<U8ABE> \x82\xC7 |0
+<U8ABF> \x61\x9E |0
+<U8AC0> \x82\xC8 |0
+<U8AC2> \x61\x9D |0
+<U8AC3> \x82\xCB |0
+<U8AC4> \x61\x97 |0
+<U8AC5> \x82\xC9 |0
+<U8AC6> \x82\xBF |0
+<U8AC7> \x61\x96 |0
+<U8AC8> \x85\xD4 |0
+<U8AC9> \x61\x9C |0
+<U8ACB> \x61\x99 |0
+<U8ACD> \x61\xA1 |0
+<U8ACF> \x82\xBE |0
+<U8AD1> \x82\xC2 |0
+<U8AD2> \x61\x95 |0
+<U8AD3> \x82\xC1 |0
+<U8AD4> \x82\xC3 |0
+<U8AD5> \x82\xC4 |0
+<U8AD6> \x61\xA0 |0
+<U8AD7> \x82\xC6 |0
+<U8AD8> \x82\xCA |0
+<U8AD9> \x82\xCE |0
+<U8ADB> \x61\xA4 |0
+<U8ADC> \x63\x5C |0
+<U8ADD> \x85\xCF |0
+<U8ADE> \x85\xD5 |0
+<U8ADF> \x85\xD2 |0
+<U8AE0> \x85\xCA |0
+<U8AE1> \x85\xD6 |0
+<U8AE2> \x85\xCB |0
+<U8AE4> \x85\xD1 |0
+<U8AE6> \x63\x57 |0
+<U8AE7> \x63\x5D |0
+<U8AE8> \x85\xD7 |0
+<U8AEB> \x63\x59 |0
+<U8AED> \x63\x63 |0
+<U8AEE> \x63\x5E |0
+<U8AEF> \x85\xD9 |0
+<U8AF0> \x85\xD3 |0
+<U8AF1> \x63\x5A |0
+<U8AF2> \x85\xCC |0
+<U8AF3> \x63\x64 |0
+<U8AF4> \x85\xCD |0
+<U8AF5> \x85\xCE |0
+<U8AF6> \x63\x65 |0
+<U8AF7> \x63\x62 |0
+<U8AF8> \x61\x9A |0
+<U8AFA> \x63\x58 |0
+<U8AFB> \x85\xDA |0
+<U8AFC> \x63\x66 |0
+<U8AFE> \x63\x5F |0
+<U8AFF> \x85\xD8 |0
+<U8B00> \x63\x5B |0
+<U8B01> \x63\x60 |0
+<U8B02> \x63\x61 |0
+<U8B04> \x64\xCC |0
+<U8B05> \x88\x70 |0
+<U8B06> \x88\x79 |0
+<U8B07> \x88\x76 |0
+<U8B08> \x88\x78 |0
+<U8B0A> \x64\xC9 |0
+<U8B0B> \x88\x71 |0
+<U8B0D> \x88\x77 |0
+<U8B0E> \x64\xC5 |0
+<U8B0F> \x88\x73 |0
+<U8B10> \x64\xCD |0
+<U8B11> \x88\x6F |0
+<U8B12> \x88\x74 |0
+<U8B13> \x88\x7B |0
+<U8B14> \x85\xD0 |0
+<U8B15> \x88\x75 |0
+<U8B16> \x88\x6E |0
+<U8B17> \x64\xC6 |0
+<U8B18> \x88\x6D |0
+<U8B19> \x64\xC7 |0
+<U8B1A> \x88\x7C |0
+<U8B1B> \x64\xC8 |0
+<U8B1C> \x88\x7A |0
+<U8B1D> \x64\xCB |0
+<U8B1E> \x88\x6C |0
+<U8B20> \x64\xCA |0
+<U8B22> \x88\x72 |0
+<U8B23> \x8A\x6A |0
+<U8B24> \x8A\x78 |0
+<U8B25> \x8A\x73 |0
+<U8B26> \x8A\x75 |0
+<U8B27> \x8A\x69 |0
+<U8B28> \x65\xBD |0
+<U8B2A> \x8A\x68 |0
+<U8B2B> \x65\xC0 |0
+<U8B2C> \x65\xBF |0
+<U8B2E> \x8A\x77 |0
+<U8B2F> \x8A\x6F |0
+<U8B30> \x8A\x6C |0
+<U8B31> \x8A\x72 |0
+<U8B33> \x8A\x6B |0
+<U8B35> \x8A\x6D |0
+<U8B36> \x8A\x76 |0
+<U8B37> \x8A\x74 |0
+<U8B39> \x65\xBE |0
+<U8B3A> \x8A\x7B |0
+<U8B3B> \x8A\x79 |0
+<U8B3C> \x8A\x70 |0
+<U8B3D> \x8A\x7A |0
+<U8B3E> \x8A\x71 |0
+<U8B40> \x8C\x49 |0
+<U8B41> \x66\x9A |0
+<U8B42> \x8C\x50 |0
+<U8B45> \x8E\xBE |0
+<U8B46> \x66\xA1 |0
+<U8B47> \x8A\x6E |0
+<U8B48> \x8C\x47 |0
+<U8B49> \x66\x9D |0
+<U8B4A> \x8C\x48 |0
+<U8B4B> \x8C\x4D |0
+<U8B4E> \x66\x9F |0
+<U8B4F> \x66\xA0 |0
+<U8B50> \x8C\x46 |0
+<U8B51> \x8C\x4F |0
+<U8B52> \x8C\x51 |0
+<U8B53> \x8C\x4A |0
+<U8B54> \x8C\x4C |0
+<U8B55> \x8C\x4E |0
+<U8B56> \x8C\x4B |0
+<U8B57> \x8C\x52 |0
+<U8B58> \x66\x9C |0
+<U8B59> \x66\xA2 |0
+<U8B5A> \x66\x9E |0
+<U8B5C> \x66\x9B |0
+<U8B5D> \x8D\x9F |0
+<U8B5F> \x67\x62 |0
+<U8B60> \x8D\x9D |0
+<U8B63> \x8D\xA1 |0
+<U8B65> \x8D\xA2 |0
+<U8B66> \x67\x60 |0
+<U8B67> \x8D\xA3 |0
+<U8B68> \x8D\xA0 |0
+<U8B6A> \x8D\x9E |0
+<U8B6B> \x67\x63 |0
+<U8B6C> \x67\x5F |0
+<U8B6D> \x8D\xA4 |0
+<U8B6F> \x67\x61 |0
+<U8B70> \x67\x5E |0
+<U8B74> \x67\xAA |0
+<U8B77> \x67\xAB |0
+<U8B78> \x8E\xBD |0
+<U8B79> \x8E\xBC |0
+<U8B7A> \x8E\xBF |0
+<U8B7B> \x8E\xC0 |0
+<U8B7D> \x67\xAC |0
+<U8B7E> \x8F\xA6 |0
+<U8B7F> \x8F\xAB |0
+<U8B80> \x67\xF3 |0
+<U8B82> \x8F\xA8 |0
+<U8B84> \x8F\xA7 |0
+<U8B85> \x8F\xAA |0
+<U8B86> \x8F\xA9 |0
+<U8B88> \x90\x73 |0
+<U8B8A> \x68\x68 |0
+<U8B8B> \x90\x72 |0
+<U8B8C> \x90\x70 |0
+<U8B8E> \x90\x71 |0
+<U8B92> \x68\x8B |0
+<U8B93> \x68\x8A |0
+<U8B94> \x90\xD0 |0
+<U8B95> \x90\xD1 |0
+<U8B96> \x68\x8C |0
+<U8B98> \x91\x5E |0
+<U8B99> \x91\x5F |0
+<U8B9A> \x68\xB3 |0
+<U8B9C> \x68\xB9 |0
+<U8B9E> \x91\x99 |0
+<U8B9F> \x91\xB8 |0
+<U8C37> \x48\xD6 |3
+<U8C37> \x4F\xC6 |0
+<U8C39> \x75\x72 |0
+<U8C3B> \x75\x73 |0
+<U8C3C> \x7C\x7A |0
+<U8C3D> \x7F\xB9 |0
+<U8C3E> \x82\xCF |0
+<U8C3F> \x64\xCF |0
+<U8C41> \x64\xCE |0
+<U8C42> \x8A\x7C |0
+<U8C43> \x8C\x53 |0
+<U8C45> \x90\x74 |0
+<U8C46> \x48\xD7 |3
+<U8C46> \x4F\xC7 |0
+<U8C47> \x72\x43 |0
+<U8C48> \x56\x5F |0
+<U8C49> \x58\xC6 |0
+<U8C4A> \x7C\x7C |0
+<U8C4B> \x7C\x7B |0
+<U8C4C> \x61\xA5 |0
+<U8C4D> \x82\xD0 |0
+<U8C4E> \x61\xA6 |0
+<U8C4F> \x88\x7D |0
+<U8C50> \x65\xC1 |0
+<U8C54> \x68\xC2 |0
+<U8C55> \x48\xD8 |3
+<U8C55> \x4F\xC8 |0
+<U8C56> \x6C\xEB |0
+<U8C57> \x72\x44 |0
+<U8C5A> \x58\xC7 |0
+<U8C5C> \x75\x74 |0
+<U8C5D> \x75\x75 |0
+<U8C5F> \x78\xCB |0
+<U8C61> \x5B\x4F |0
+<U8C62> \x5D\x8E |0
+<U8C64> \x7C\x7E |0
+<U8C65> \x7C\x7D |0
+<U8C66> \x7C\x7F |0
+<U8C68> \x7F\xBA |0
+<U8C69> \x7F\xBB |0
+<U8C6A> \x5F\xAF |0
+<U8C6B> \x63\x67 |0
+<U8C6C> \x61\xA7 |0
+<U8C6D> \x63\x68 |0
+<U8C6F> \x88\x82 |0
+<U8C70> \x88\x7E |0
+<U8C71> \x88\x81 |0
+<U8C72> \x88\x7F |0
+<U8C73> \x64\xD0 |0
+<U8C75> \x8A\x7D |0
+<U8C76> \x8C\x55 |0
+<U8C77> \x8C\x54 |0
+<U8C78> \x48\xD9 |3
+<U8C78> \x6B\x45 |0
+<U8C79> \x56\x61 |0
+<U8C7A> \x56\x60 |0
+<U8C7B> \x72\x45 |0
+<U8C7D> \x75\x76 |0
+<U8C80> \x78\xCD |0
+<U8C81> \x78\xCC |0
+<U8C82> \x5B\x50 |0
+<U8C84> \x7C\x82 |0
+<U8C85> \x7C\x83 |0
+<U8C86> \x7C\x81 |0
+<U8C89> \x5D\x90 |0
+<U8C8A> \x5D\x8F |0
+<U8C8C> \x5F\xB1 |0
+<U8C8D> \x5F\xB0 |0
+<U8C8F> \x82\xD1 |0
+<U8C90> \x85\xDD |0
+<U8C91> \x85\xDB |0
+<U8C92> \x85\xDC |0
+<U8C93> \x63\x69 |0
+<U8C94> \x88\x84 |0
+<U8C95> \x88\x83 |0
+<U8C97> \x8A\x81 |0
+<U8C98> \x8A\x7F |0
+<U8C99> \x8A\x7E |0
+<U8C9A> \x8C\x56 |0
+<U8C9C> \x91\x9A |0
+<U8C9D> \x48\xDA |3
+<U8C9D> \x4F\xC9 |0
+<U8C9E> \x53\xD6 |0
+<U8CA0> \x53\xD7 |0
+<U8CA1> \x56\x62 |0
+<U8CA2> \x56\x63 |0
+<U8CA3> \x72\x47 |0
+<U8CA4> \x72\x46 |0
+<U8CA5> \x75\x77 |0
+<U8CA7> \x58\xCD |0
+<U8CA8> \x58\xCB |0
+<U8CA9> \x58\xC8 |0
+<U8CAA> \x58\xCC |0
+<U8CAB> \x58\xCA |0
+<U8CAC> \x58\xC9 |0
+<U8CAF> \x5B\x51 |0
+<U8CB0> \x78\xD0 |0
+<U8CB2> \x5D\x95 |0
+<U8CB3> \x5B\x53 |0
+<U8CB4> \x5B\x58 |0
+<U8CB5> \x78\xD2 |0
+<U8CB6> \x5B\x5A |0
+<U8CB7> \x5B\x59 |0
+<U8CB8> \x5B\x5C |0
+<U8CB9> \x78\xD1 |0
+<U8CBA> \x78\xCE |0
+<U8CBB> \x5B\x56 |0
+<U8CBC> \x5B\x52 |0
+<U8CBD> \x5B\x54 |0
+<U8CBE> \x78\xCF |0
+<U8CBF> \x5B\x5B |0
+<U8CC0> \x5B\x57 |0
+<U8CC1> \x5B\x55 |0
+<U8CC2> \x5D\x97 |0
+<U8CC3> \x5D\x96 |0
+<U8CC4> \x5D\x94 |0
+<U8CC5> \x5D\x98 |0
+<U8CC7> \x5D\x92 |0
+<U8CC8> \x5D\x93 |0
+<U8CCA> \x5D\x91 |0
+<U8CCC> \x7C\x84 |0
+<U8CCF> \x7F\xBD |0
+<U8CD1> \x5F\xB3 |0
+<U8CD2> \x5F\xB4 |0
+<U8CD3> \x5F\xB2 |0
+<U8CD5> \x7F\xBC |0
+<U8CD7> \x7F\xBE |0
+<U8CD9> \x82\xD4 |0
+<U8CDA> \x82\xD6 |0
+<U8CDC> \x61\xB0 |0
+<U8CDD> \x82\xD7 |0
+<U8CDE> \x61\xA9 |0
+<U8CDF> \x82\xD3 |0
+<U8CE0> \x61\xA8 |0
+<U8CE1> \x61\xB2 |0
+<U8CE2> \x61\xAE |0
+<U8CE3> \x61\xAF |0
+<U8CE4> \x61\xAB |0
+<U8CE5> \x82\xD2 |0
+<U8CE6> \x61\xAA |0
+<U8CE7> \x82\xD8 |0
+<U8CE8> \x82\xD5 |0
+<U8CEA> \x61\xB1 |0
+<U8CEC> \x61\xAC |0
+<U8CED> \x61\xAD |0
+<U8CEE> \x85\xDF |0
+<U8CF0> \x85\xE1 |0
+<U8CF1> \x85\xE0 |0
+<U8CF3> \x85\xE2 |0
+<U8CF4> \x63\x6A |0
+<U8CF5> \x85\xDE |0
+<U8CF8> \x64\xD4 |0
+<U8CF9> \x88\x85 |0
+<U8CFA> \x64\xD1 |0
+<U8CFB> \x64\xD5 |0
+<U8CFC> \x64\xD3 |0
+<U8CFD> \x64\xD2 |0
+<U8CFE> \x8A\x82 |0
+<U8D00> \x8A\x85 |0
+<U8D02> \x8A\x84 |0
+<U8D04> \x8A\x83 |0
+<U8D05> \x65\xC2 |0
+<U8D06> \x8C\x57 |0
+<U8D07> \x8C\x58 |0
+<U8D08> \x66\xA3 |0
+<U8D09> \x8C\x59 |0
+<U8D0A> \x66\xA4 |0
+<U8D0D> \x67\x65 |0
+<U8D0F> \x67\x64 |0
+<U8D10> \x8E\xC1 |0
+<U8D13> \x67\xAD |0
+<U8D14> \x8E\xC2 |0
+<U8D15> \x8F\xAC |0
+<U8D16> \x67\xF4 |0
+<U8D17> \x67\xF5 |0
+<U8D19> \x90\x75 |0
+<U8D1B> \x68\x8E |0
+<U8D64> \x48\xDB |3
+<U8D64> \x4F\xCA |0
+<U8D66> \x58\xCF |0
+<U8D67> \x58\xCE |0
+<U8D68> \x7C\x85 |0
+<U8D69> \x7C\x86 |0
+<U8D6B> \x5F\xB5 |0
+<U8D6C> \x85\xE3 |0
+<U8D6D> \x61\xB3 |0
+<U8D6E> \x85\xE4 |0
+<U8D6F> \x88\x86 |0
+<U8D70> \x48\xDC |3
+<U8D70> \x4F\xCB |0
+<U8D72> \x6F\x74 |0
+<U8D73> \x53\xD9 |0
+<U8D74> \x53\xD8 |0
+<U8D76> \x72\x48 |0
+<U8D77> \x56\x64 |0
+<U8D78> \x72\x49 |0
+<U8D79> \x75\x7A |0
+<U8D7B> \x75\x79 |0
+<U8D7D> \x75\x78 |0
+<U8D80> \x78\xD4 |0
+<U8D81> \x5B\x5F |0
+<U8D84> \x78\xD3 |0
+<U8D85> \x5B\x5E |0
+<U8D89> \x78\xD5 |0
+<U8D8A> \x5B\x5D |0
+<U8D8C> \x7C\x88 |0
+<U8D8D> \x7C\x8B |0
+<U8D8E> \x7C\x89 |0
+<U8D8F> \x7C\x8A |0
+<U8D90> \x7C\x8E |0
+<U8D91> \x7C\x87 |0
+<U8D92> \x7C\x8F |0
+<U8D93> \x7C\x8C |0
+<U8D94> \x7C\x8D |0
+<U8D95> \x5F\xB7 |0
+<U8D96> \x7F\xBF |0
+<U8D99> \x5F\xB6 |0
+<U8D9B> \x82\xDC |0
+<U8D9C> \x82\xDA |0
+<U8D9F> \x61\xB4 |0
+<U8DA0> \x82\xD9 |0
+<U8DA1> \x82\xDB |0
+<U8DA3> \x61\xB5 |0
+<U8DA5> \x85\xE5 |0
+<U8DA7> \x85\xE6 |0
+<U8DA8> \x64\xD6 |0
+<U8DAA> \x8C\x5B |0
+<U8DAB> \x8C\x5D |0
+<U8DAC> \x8C\x5A |0
+<U8DAD> \x8C\x5C |0
+<U8DAE> \x8D\xA5 |0
+<U8DAF> \x8E\xC3 |0
+<U8DB2> \x91\x81 |0
+<U8DB3> \x48\xDD |3
+<U8DB3> \x4F\xCC |0
+<U8DB4> \x53\xDA |0
+<U8DB5> \x72\x4A |0
+<U8DB6> \x72\x4C |0
+<U8DB7> \x72\x4B |0
+<U8DB9> \x75\x7D |0
+<U8DBA> \x58\xD1 |0
+<U8DBC> \x75\x7B |0
+<U8DBE> \x58\xD0 |0
+<U8DBF> \x75\x7E |0
+<U8DC1> \x75\x7F |0
+<U8DC2> \x75\x7C |0
+<U8DC5> \x78\xE1 |0
+<U8DC6> \x5B\x67 |0
+<U8DC7> \x78\xD9 |0
+<U8DC8> \x78\xDF |0
+<U8DCB> \x5B\x62 |0
+<U8DCC> \x5B\x65 |0
+<U8DCD> \x78\xD8 |0
+<U8DCE> \x5B\x60 |0
+<U8DCF> \x78\xDC |0
+<U8DD0> \x7C\x95 |0
+<U8DD1> \x5B\x64 |0
+<U8DD3> \x78\xD7 |0
+<U8DD5> \x78\xDD |0
+<U8DD6> \x78\xDA |0
+<U8DD7> \x78\xE0 |0
+<U8DD8> \x78\xD6 |0
+<U8DD9> \x78\xDE |0
+<U8DDA> \x5B\x63 |0
+<U8DDB> \x5B\x66 |0
+<U8DDC> \x78\xDB |0
+<U8DDD> \x5B\x61 |0
+<U8DDF> \x5D\x9A |0
+<U8DE0> \x7C\x91 |0
+<U8DE1> \x5D\x99 |0
+<U8DE2> \x7C\x98 |0
+<U8DE3> \x7C\x97 |0
+<U8DE4> \x5D\xA0 |0
+<U8DE6> \x5D\xA1 |0
+<U8DE7> \x7C\x99 |0
+<U8DE8> \x5D\x9B |0
+<U8DE9> \x7C\x96 |0
+<U8DEA> \x5D\x9F |0
+<U8DEB> \x7C\x9B |0
+<U8DEC> \x7C\x92 |0
+<U8DEE> \x7C\x94 |0
+<U8DEF> \x5D\x9C |0
+<U8DF0> \x7C\x90 |0
+<U8DF1> \x7C\x93 |0
+<U8DF2> \x7C\x9A |0
+<U8DF3> \x5D\x9D |0
+<U8DF4> \x7C\x9C |0
+<U8DFA> \x5D\x9E |0
+<U8DFC> \x5F\xB8 |0
+<U8DFD> \x7F\xC4 |0
+<U8DFE> \x7F\xCA |0
+<U8DFF> \x7F\xC2 |0
+<U8E00> \x7F\xCB |0
+<U8E02> \x7F\xC1 |0
+<U8E03> \x7F\xC6 |0
+<U8E04> \x7F\xCC |0
+<U8E05> \x7F\xC9 |0
+<U8E06> \x7F\xC8 |0
+<U8E07> \x7F\xC7 |0
+<U8E09> \x7F\xC0 |0
+<U8E0A> \x7F\xC5 |0
+<U8E0D> \x7F\xC3 |0
+<U8E0F> \x61\xBA |0
+<U8E10> \x61\xB7 |0
+<U8E11> \x82\xE5 |0
+<U8E12> \x82\xEA |0
+<U8E13> \x82\xEC |0
+<U8E14> \x82\xE9 |0
+<U8E15> \x82\xE2 |0
+<U8E16> \x82\xE4 |0
+<U8E17> \x82\xEE |0
+<U8E18> \x82\xEB |0
+<U8E19> \x82\xE6 |0
+<U8E1A> \x82\xEF |0
+<U8E1B> \x82\xE3 |0
+<U8E1C> \x82\xED |0
+<U8E1D> \x61\xB8 |0
+<U8E1E> \x61\xBE |0
+<U8E1F> \x61\xBC |0
+<U8E20> \x82\xDD |0
+<U8E21> \x61\xBD |0
+<U8E22> \x61\xB9 |0
+<U8E23> \x82\xDE |0
+<U8E24> \x82\xE0 |0
+<U8E25> \x82\xDF |0
+<U8E26> \x82\xE7 |0
+<U8E27> \x82\xE8 |0
+<U8E29> \x61\xBB |0
+<U8E2B> \x61\xB6 |0
+<U8E2E> \x82\xE1 |0
+<U8E30> \x85\xF0 |0
+<U8E31> \x63\x6C |0
+<U8E33> \x85\xE7 |0
+<U8E34> \x63\x6D |0
+<U8E35> \x63\x70 |0
+<U8E36> \x85\xEC |0
+<U8E38> \x85\xE9 |0
+<U8E39> \x63\x6F |0
+<U8E3C> \x85\xED |0
+<U8E3D> \x85\xEE |0
+<U8E3E> \x85\xE8 |0
+<U8E3F> \x85\xF1 |0
+<U8E40> \x85\xEA |0
+<U8E41> \x85\xEF |0
+<U8E42> \x63\x6E |0
+<U8E44> \x63\x6B |0
+<U8E45> \x85\xEB |0
+<U8E47> \x88\x8C |0
+<U8E48> \x64\xD9 |0
+<U8E49> \x64\xD7 |0
+<U8E4A> \x64\xDA |0
+<U8E4B> \x64\xD8 |0
+<U8E4C> \x88\x8B |0
+<U8E4D> \x88\x88 |0
+<U8E4E> \x88\x87 |0
+<U8E50> \x88\x8A |0
+<U8E53> \x88\x89 |0
+<U8E54> \x8A\x93 |0
+<U8E55> \x65\xC8 |0
+<U8E56> \x8A\x8A |0
+<U8E57> \x8A\x89 |0
+<U8E59> \x65\xC3 |0
+<U8E5A> \x8A\x8F |0
+<U8E5B> \x8A\x8E |0
+<U8E5C> \x8A\x86 |0
+<U8E5D> \x8A\x91 |0
+<U8E5E> \x8A\x8B |0
+<U8E5F> \x65\xC7 |0
+<U8E60> \x8A\x88 |0
+<U8E61> \x8A\x90 |0
+<U8E62> \x8A\x87 |0
+<U8E63> \x65\xC4 |0
+<U8E64> \x65\xC6 |0
+<U8E65> \x8A\x8C |0
+<U8E66> \x65\xC5 |0
+<U8E67> \x8A\x8D |0
+<U8E69> \x8A\x92 |0
+<U8E6A> \x8C\x61 |0
+<U8E6C> \x66\xA9 |0
+<U8E6D> \x8C\x5E |0
+<U8E6F> \x8C\x62 |0
+<U8E72> \x66\xA6 |0
+<U8E73> \x8C\x60 |0
+<U8E74> \x66\xAB |0
+<U8E76> \x66\xA8 |0
+<U8E78> \x8C\x5F |0
+<U8E7A> \x66\xAA |0
+<U8E7B> \x8C\x63 |0
+<U8E7C> \x66\xA5 |0
+<U8E81> \x67\x67 |0
+<U8E82> \x67\x69 |0
+<U8E84> \x8D\xA8 |0
+<U8E85> \x67\x68 |0
+<U8E86> \x8D\xA6 |0
+<U8E87> \x66\xA7 |0
+<U8E88> \x8D\xA7 |0
+<U8E89> \x67\x66 |0
+<U8E8A> \x67\xAE |0
+<U8E8B> \x67\xB0 |0
+<U8E8C> \x8E\xC5 |0
+<U8E8D> \x67\xAF |0
+<U8E8E> \x8E\xC4 |0
+<U8E90> \x8F\xB1 |0
+<U8E91> \x67\xF6 |0
+<U8E92> \x8F\xB0 |0
+<U8E93> \x67\xF7 |0
+<U8E94> \x8F\xAE |0
+<U8E95> \x8F\xAD |0
+<U8E96> \x8F\xB2 |0
+<U8E97> \x8F\xB3 |0
+<U8E98> \x90\x76 |0
+<U8E9A> \x8F\xAF |0
+<U8E9D> \x90\xD5 |0
+<U8E9E> \x90\xD2 |0
+<U8E9F> \x90\xD3 |0
+<U8EA0> \x90\xD4 |0
+<U8EA1> \x68\xA8 |0
+<U8EA3> \x91\x62 |0
+<U8EA4> \x91\x61 |0
+<U8EA5> \x91\x60 |0
+<U8EA6> \x91\x82 |0
+<U8EA8> \x91\xAE |0
+<U8EA9> \x91\x9B |0
+<U8EAA> \x68\xBA |0
+<U8EAB> \x48\xDE |3
+<U8EAB> \x4F\xCD |0
+<U8EAC> \x56\x65 |0
+<U8EB2> \x5D\xA2 |0
+<U8EBA> \x61\xBF |0
+<U8EBD> \x85\xF2 |0
+<U8EC0> \x65\xC9 |0
+<U8EC2> \x8C\x64 |0
+<U8EC9> \x91\x9C |0
+<U8ECA> \x48\xDF |3
+<U8ECA> \x4F\xCE |0
+<U8ECB> \x51\xD0 |0
+<U8ECC> \x53\xDC |0
+<U8ECD> \x53\xDB |0
+<U8ECF> \x56\x68 |0
+<U8ED1> \x72\x4D |0
+<U8ED2> \x56\x66 |0
+<U8ED3> \x72\x4E |0
+<U8ED4> \x56\x67 |0
+<U8ED7> \x75\x85 |0
+<U8ED8> \x75\x81 |0
+<U8EDB> \x58\xD2 |0
+<U8EDC> \x75\x84 |0
+<U8EDD> \x75\x83 |0
+<U8EDE> \x75\x82 |0
+<U8EDF> \x58\xD3 |0
+<U8EE0> \x75\x86 |0
+<U8EE1> \x75\x87 |0
+<U8EE5> \x78\xE8 |0
+<U8EE6> \x78\xE6 |0
+<U8EE7> \x78\xEA |0
+<U8EE8> \x78\xEB |0
+<U8EE9> \x78\xF1 |0
+<U8EEB> \x78\xED |0
+<U8EEC> \x78\xEF |0
+<U8EEE> \x78\xE7 |0
+<U8EEF> \x78\xE2 |0
+<U8EF1> \x78\xEE |0
+<U8EF4> \x78\xF0 |0
+<U8EF5> \x78\xE9 |0
+<U8EF6> \x78\xEC |0
+<U8EF7> \x78\xE3 |0
+<U8EF8> \x5B\x69 |0
+<U8EF9> \x78\xE5 |0
+<U8EFA> \x78\xE4 |0
+<U8EFB> \x5B\x68 |0
+<U8EFC> \x5B\x6A |0
+<U8EFE> \x5D\xA5 |0
+<U8EFF> \x7C\x9E |0
+<U8F00> \x7C\xA0 |0
+<U8F01> \x7C\x9F |0
+<U8F02> \x7C\xA4 |0
+<U8F03> \x5D\xA3 |0
+<U8F05> \x7C\xA1 |0
+<U8F06> \x7C\x9D |0
+<U8F07> \x7C\xA2 |0
+<U8F08> \x7C\xA3 |0
+<U8F09> \x5D\xA4 |0
+<U8F0A> \x5D\xA6 |0
+<U8F0B> \x7C\xA5 |0
+<U8F0D> \x7F\xD0 |0
+<U8F0E> \x7F\xCF |0
+<U8F10> \x7F\xCD |0
+<U8F11> \x7F\xCE |0
+<U8F12> \x5F\xBA |0
+<U8F13> \x5F\xBC |0
+<U8F14> \x5F\xB9 |0
+<U8F15> \x5F\xBB |0
+<U8F16> \x82\xF6 |0
+<U8F17> \x82\xF7 |0
+<U8F18> \x82\xF2 |0
+<U8F1A> \x82\xF3 |0
+<U8F1B> \x61\xC1 |0
+<U8F1C> \x61\xC6 |0
+<U8F1D> \x61\xC0 |0
+<U8F1E> \x61\xC7 |0
+<U8F1F> \x61\xC2 |0
+<U8F20> \x82\xF4 |0
+<U8F23> \x82\xF5 |0
+<U8F24> \x82\xF1 |0
+<U8F25> \x61\xC8 |0
+<U8F26> \x61\xC4 |0
+<U8F29> \x61\xC3 |0
+<U8F2A> \x61\xC5 |0
+<U8F2C> \x82\xF0 |0
+<U8F2E> \x85\xF4 |0
+<U8F2F> \x63\x72 |0
+<U8F32> \x85\xF6 |0
+<U8F33> \x63\x74 |0
+<U8F34> \x85\xF9 |0
+<U8F35> \x85\xF5 |0
+<U8F36> \x85\xF3 |0
+<U8F37> \x85\xF8 |0
+<U8F38> \x63\x73 |0
+<U8F39> \x85\xF7 |0
+<U8F3B> \x63\x71 |0
+<U8F3E> \x64\xDC |0
+<U8F3F> \x64\xDF |0
+<U8F40> \x88\x8E |0
+<U8F42> \x64\xDD |0
+<U8F43> \x88\x8D |0
+<U8F44> \x64\xDB |0
+<U8F45> \x64\xDE |0
+<U8F46> \x8A\x94 |0
+<U8F47> \x8A\x95 |0
+<U8F48> \x8A\x96 |0
+<U8F49> \x65\xCA |0
+<U8F4B> \x8A\x97 |0
+<U8F4D> \x65\xCB |0
+<U8F4E> \x66\xAD |0
+<U8F4F> \x8C\x67 |0
+<U8F50> \x8C\x68 |0
+<U8F51> \x8C\x66 |0
+<U8F52> \x8C\x65 |0
+<U8F53> \x8C\x69 |0
+<U8F54> \x66\xAC |0
+<U8F55> \x8D\xAC |0
+<U8F56> \x8D\xAA |0
+<U8F57> \x8D\xAB |0
+<U8F58> \x8D\xAD |0
+<U8F59> \x8D\xA9 |0
+<U8F5A> \x8D\xAE |0
+<U8F5B> \x8E\xC7 |0
+<U8F5D> \x8E\xC8 |0
+<U8F5E> \x8E\xC6 |0
+<U8F5F> \x67\xB1 |0
+<U8F60> \x8F\xB4 |0
+<U8F61> \x67\xF8 |0
+<U8F62> \x8F\xB5 |0
+<U8F63> \x90\x78 |0
+<U8F64> \x90\x77 |0
+<U8F9B> \x48\xE0 |3
+<U8F9B> \x4F\xCF |0
+<U8F9C> \x5B\x6B |0
+<U8F9F> \x5D\xA7 |0
+<U8FA3> \x5F\xBD |0
+<U8FA6> \x63\x76 |0
+<U8FA8> \x63\x75 |0
+<U8FAD> \x66\xAE |0
+<U8FAE> \x67\x49 |0
+<U8FAF> \x67\xB2 |0
+<U8FB0> \x48\xE1 |3
+<U8FB0> \x4F\xD0 |0
+<U8FB1> \x56\x69 |0
+<U8FB2> \x5D\xA8 |0
+<U8FB4> \x8C\x6A |0
+<U8FB5> \x48\xE2 |0
+<U8FBF> \x6B\x47 |0
+<U8FC2> \x4F\xD1 |0
+<U8FC4> \x4F\xD4 |0
+<U8FC5> \x4F\xD3 |0
+<U8FC6> \x4F\xD2 |0
+<U8FC9> \x6B\x46 |0
+<U8FCB> \x6C\xED |0
+<U8FCD> \x6C\xEF |0
+<U8FCE> \x51\xD1 |0
+<U8FD1> \x51\xD3 |0
+<U8FD2> \x6C\xEC |0
+<U8FD3> \x6C\xEE |0
+<U8FD4> \x51\xD2 |0
+<U8FD5> \x6C\xF1 |0
+<U8FD6> \x6C\xF0 |0
+<U8FD7> \x6C\xF2 |0
+<U8FE0> \x6F\x78 |0
+<U8FE1> \x6F\x76 |0
+<U8FE2> \x53\xDF |0
+<U8FE3> \x6F\x75 |0
+<U8FE4> \x53\xE4 |0
+<U8FE5> \x53\xE1 |0
+<U8FE6> \x53\xDE |0
+<U8FE8> \x53\xE5 |0
+<U8FEA> \x53\xE0 |0
+<U8FEB> \x53\xE3 |0
+<U8FED> \x53\xE2 |0
+<U8FEE> \x6F\x77 |0
+<U8FF0> \x53\xDD |0
+<U8FF4> \x56\x6F |0
+<U8FF5> \x72\x50 |0
+<U8FF6> \x72\x56 |0
+<U8FF7> \x56\x6C |0
+<U8FF8> \x56\x73 |0
+<U8FFA> \x56\x6E |0
+<U8FFB> \x72\x53 |0
+<U8FFC> \x72\x55 |0
+<U8FFD> \x56\x71 |0
+<U8FFE> \x72\x4F |0
+<U8FFF> \x72\x52 |0
+<U9000> \x56\x6D |0
+<U9001> \x56\x6A |0
+<U9002> \x72\x51 |0
+<U9003> \x56\x70 |0
+<U9004> \x72\x54 |0
+<U9005> \x56\x72 |0
+<U9006> \x56\x6B |0
+<U900B> \x75\x89 |0
+<U900C> \x75\x8C |0
+<U900D> \x58\xD5 |0
+<U900F> \x58\xDF |0
+<U9010> \x58\xDB |0
+<U9011> \x75\x8A |0
+<U9014> \x58\xE3 |0
+<U9015> \x58\xDC |0
+<U9016> \x58\xE1 |0
+<U9017> \x58\xD7 |0
+<U9019> \x58\xD4 |0
+<U901A> \x58\xD6 |0
+<U901B> \x58\xE2 |0
+<U901C> \x75\x8B |0
+<U901D> \x58\xDA |0
+<U901E> \x58\xDD |0
+<U901F> \x58\xD9 |0
+<U9020> \x58\xDE |0
+<U9021> \x75\x8D |0
+<U9022> \x58\xE0 |0
+<U9023> \x58\xD8 |0
+<U9024> \x75\x88 |0
+<U902D> \x78\xF2 |0
+<U902E> \x5B\x6C |0
+<U902F> \x78\xF4 |0
+<U9031> \x5B\x6E |0
+<U9032> \x5B\x70 |0
+<U9034> \x78\xF3 |0
+<U9035> \x5B\x6D |0
+<U9036> \x5B\x71 |0
+<U9038> \x5B\x6F |0
+<U903C> \x5D\xAE |0
+<U903D> \x7C\xAA |0
+<U903E> \x5D\xB6 |0
+<U903F> \x7C\xA7 |0
+<U9041> \x5D\xB7 |0
+<U9042> \x5D\xAC |0
+<U9044> \x7C\xA8 |0
+<U9047> \x5D\xB1 |0
+<U9049> \x7C\xA9 |0
+<U904A> \x5D\xAA |0
+<U904B> \x5D\xA9 |0
+<U904D> \x5D\xB4 |0
+<U904E> \x5D\xB3 |0
+<U904F> \x5D\xB2 |0
+<U9050> \x5D\xB0 |0
+<U9051> \x5D\xB5 |0
+<U9052> \x7C\xA6 |0
+<U9053> \x5D\xAB |0
+<U9054> \x5D\xAD |0
+<U9055> \x5D\xAF |0
+<U9058> \x5F\xBF |0
+<U9059> \x5F\xC2 |0
+<U905B> \x5F\xC6 |0
+<U905C> \x5F\xC0 |0
+<U905D> \x5F\xC5 |0
+<U905E> \x5F\xC3 |0
+<U9060> \x5F\xBE |0
+<U9062> \x5F\xC4 |0
+<U9063> \x5F\xC1 |0
+<U9067> \x82\xFB |0
+<U9068> \x61\xCB |0
+<U9069> \x61\xC9 |0
+<U906B> \x82\xFC |0
+<U906D> \x61\xCC |0
+<U906E> \x61\xCA |0
+<U906F> \x82\xFA |0
+<U9070> \x82\xF9 |0
+<U9072> \x63\x7A |0
+<U9073> \x82\xF8 |0
+<U9074> \x63\x78 |0
+<U9075> \x63\x77 |0
+<U9076> \x85\xFA |0
+<U9077> \x61\xCD |0
+<U9078> \x63\x79 |0
+<U9079> \x85\xFB |0
+<U907A> \x63\x7C |0
+<U907B> \x85\xFC |0
+<U907C> \x63\x7B |0
+<U907D> \x64\xE1 |0
+<U907E> \x88\x90 |0
+<U907F> \x64\xE0 |0
+<U9080> \x64\xE5 |0
+<U9081> \x64\xE3 |0
+<U9082> \x64\xE4 |0
+<U9083> \x65\xCD |0
+<U9084> \x64\xE2 |0
+<U9085> \x88\x8F |0
+<U9086> \x85\xFD |0
+<U9087> \x65\xCC |0
+<U9088> \x65\xCE |0
+<U908A> \x66\xAF |0
+<U908B> \x66\xB0 |0
+<U908D> \x8D\xAF |0
+<U908F> \x68\x6A |0
+<U9090> \x68\x69 |0
+<U9091> \x48\xE3 |3
+<U9091> \x4F\xD6 |0
+<U9094> \x69\xF4 |0
+<U9095> \x56\x74 |0
+<U9097> \x69\xF1 |0
+<U9098> \x69\xF2 |0
+<U9099> \x69\xF0 |0
+<U909B> \x69\xF3 |0
+<U909E> \x6B\x4B |0
+<U909F> \x6B\x48 |0
+<U90A0> \x6B\x4D |0
+<U90A1> \x6B\x49 |0
+<U90A2> \x4F\xD7 |0
+<U90A3> \x4F\xDA |0
+<U90A5> \x6B\x4A |0
+<U90A6> \x4F\xD9 |0
+<U90A7> \x6B\x4C |0
+<U90AA> \x4F\xD8 |0
+<U90AF> \x6C\xF5 |0
+<U90B0> \x6C\xF7 |0
+<U90B1> \x51\xD6 |0
+<U90B2> \x6C\xF3 |0
+<U90B3> \x6C\xF6 |0
+<U90B4> \x6C\xF4 |0
+<U90B5> \x51\xD4 |0
+<U90B6> \x51\xD7 |0
+<U90B8> \x51\xD5 |0
+<U90BD> \x6F\x7A |0
+<U90BE> \x6F\x7E |0
+<U90BF> \x6F\x7B |0
+<U90C1> \x53\xE8 |0
+<U90C3> \x53\xE9 |0
+<U90C5> \x6F\x7D |0
+<U90C7> \x6F\x7F |0
+<U90C8> \x6F\x82 |0
+<U90CA> \x53\xE6 |0
+<U90CB> \x6F\x81 |0
+<U90CE> \x53\xE7 |0
+<U90D4> \x75\x94 |0
+<U90D5> \x6F\x7C |0
+<U90D6> \x72\x57 |0
+<U90D7> \x72\x60 |0
+<U90D8> \x72\x5E |0
+<U90D9> \x72\x59 |0
+<U90DA> \x72\x5A |0
+<U90DB> \x72\x5F |0
+<U90DC> \x72\x61 |0
+<U90DD> \x56\x76 |0
+<U90DF> \x72\x5C |0
+<U90E0> \x72\x58 |0
+<U90E1> \x56\x75 |0
+<U90E2> \x56\x77 |0
+<U90E3> \x72\x5B |0
+<U90E4> \x72\x62 |0
+<U90E5> \x72\x5D |0
+<U90E8> \x58\xE4 |0
+<U90E9> \x75\x97 |0
+<U90EA> \x75\x8F |0
+<U90EB> \x75\x95 |0
+<U90EC> \x75\x96 |0
+<U90ED> \x58\xE5 |0
+<U90EF> \x75\x8E |0
+<U90F0> \x75\x90 |0
+<U90F1> \x6F\x79 |0
+<U90F2> \x75\x92 |0
+<U90F3> \x75\x93 |0
+<U90F4> \x75\x91 |0
+<U90F5> \x5B\x73 |0
+<U90F9> \x78\xFB |0
+<U90FA> \x86\x41 |0
+<U90FB> \x78\xFC |0
+<U90FC> \x78\xF9 |0
+<U90FD> \x58\xE6 |0
+<U90FE> \x5B\x75 |0
+<U90FF> \x78\xF8 |0
+<U9100> \x79\x41 |0
+<U9101> \x78\xFD |0
+<U9102> \x5B\x72 |0
+<U9103> \x79\x44 |0
+<U9104> \x78\xF7 |0
+<U9105> \x79\x43 |0
+<U9106> \x78\xF5 |0
+<U9107> \x79\x42 |0
+<U9108> \x78\xFA |0
+<U9109> \x5B\x74 |0
+<U910B> \x7C\xB1 |0
+<U910D> \x7C\xAC |0
+<U910E> \x7C\xB2 |0
+<U910F> \x7C\xAD |0
+<U9110> \x7C\xAB |0
+<U9111> \x7C\xAE |0
+<U9112> \x5D\xB8 |0
+<U9114> \x7C\xB0 |0
+<U9116> \x7C\xAF |0
+<U9117> \x5D\xB9 |0
+<U9118> \x5F\xC8 |0
+<U9119> \x5F\xC7 |0
+<U911A> \x7F\xD7 |0
+<U911B> \x7F\xDA |0
+<U911C> \x7F\xD2 |0
+<U911D> \x7F\xD6 |0
+<U911E> \x5F\xC9 |0
+<U911F> \x7F\xD5 |0
+<U9120> \x7F\xD3 |0
+<U9121> \x7F\xD9 |0
+<U9122> \x7F\xD4 |0
+<U9123> \x7F\xD1 |0
+<U9124> \x7F\xD8 |0
+<U9126> \x83\x45 |0
+<U9127> \x61\xD0 |0
+<U9128> \x8A\x98 |0
+<U9129> \x83\x42 |0
+<U912A> \x83\x43 |0
+<U912B> \x83\x41 |0
+<U912C> \x78\xF6 |0
+<U912D> \x61\xCF |0
+<U912E> \x83\x46 |0
+<U912F> \x82\xFD |0
+<U9130> \x61\xCE |0
+<U9131> \x61\xD1 |0
+<U9132> \x83\x44 |0
+<U9133> \x86\x42 |0
+<U9134> \x63\x7D |0
+<U9135> \x86\x43 |0
+<U9136> \x86\x44 |0
+<U9138> \x88\x91 |0
+<U9139> \x64\xE6 |0
+<U913A> \x8A\x99 |0
+<U913B> \x8A\x9A |0
+<U913E> \x8A\x9B |0
+<U913F> \x8C\x6C |0
+<U9140> \x8C\x6B |0
+<U9141> \x8D\xB1 |0
+<U9143> \x8D\xB0 |0
+<U9144> \x8E\xCA |0
+<U9145> \x8E\xCB |0
+<U9146> \x8E\xC9 |0
+<U9147> \x8F\xB6 |0
+<U9148> \x67\xF9 |0
+<U9149> \x48\xE4 |3
+<U9149> \x4F\xDB |0
+<U914A> \x53\xEB |0
+<U914B> \x53\xEA |0
+<U914C> \x56\x7A |0
+<U914D> \x56\x79 |0
+<U914E> \x72\x64 |0
+<U914F> \x72\x65 |0
+<U9150> \x72\x63 |0
+<U9152> \x56\x78 |0
+<U9153> \x75\x9B |0
+<U9155> \x75\x9C |0
+<U9156> \x75\x98 |0
+<U9157> \x58\xE7 |0
+<U9158> \x75\x99 |0
+<U915A> \x75\x9A |0
+<U915F> \x79\x47 |0
+<U9160> \x79\x49 |0
+<U9161> \x79\x45 |0
+<U9162> \x79\x48 |0
+<U9163> \x5B\x76 |0
+<U9164> \x79\x46 |0
+<U9165> \x5B\x77 |0
+<U9168> \x79\xF9 |0
+<U9169> \x5D\xBC |0
+<U916A> \x5D\xBB |0
+<U916C> \x5D\xBA |0
+<U916E> \x7C\xB3 |0
+<U916F> \x7C\xB4 |0
+<U9172> \x7F\xDC |0
+<U9173> \x7F\xDE |0
+<U9174> \x5F\xCD |0
+<U9175> \x5F\xCA |0
+<U9177> \x5F\xCC |0
+<U9178> \x5F\xCB |0
+<U9179> \x7F\xDD |0
+<U917A> \x7F\xDB |0
+<U9180> \x83\x4D |0
+<U9181> \x83\x4A |0
+<U9182> \x83\x4B |0
+<U9183> \x61\xD5 |0
+<U9184> \x83\x4C |0
+<U9185> \x83\x47 |0
+<U9186> \x83\x48 |0
+<U9187> \x61\xD2 |0
+<U9189> \x61\xD3 |0
+<U918A> \x83\x49 |0
+<U918B> \x61\xD4 |0
+<U918D> \x86\x48 |0
+<U918F> \x86\x49 |0
+<U9190> \x86\x46 |0
+<U9191> \x86\x47 |0
+<U9192> \x63\x7E |0
+<U9193> \x86\x45 |0
+<U9199> \x88\x95 |0
+<U919A> \x88\x92 |0
+<U919B> \x88\x94 |0
+<U919C> \x64\xE9 |0
+<U919D> \x88\x98 |0
+<U919E> \x64\xE8 |0
+<U919F> \x88\x96 |0
+<U91A0> \x88\x99 |0
+<U91A1> \x88\x97 |0
+<U91A2> \x88\x93 |0
+<U91A3> \x64\xE7 |0
+<U91A5> \x8A\x9D |0
+<U91A7> \x8A\x9E |0
+<U91A8> \x8A\x9C |0
+<U91AA> \x8A\xA0 |0
+<U91AB> \x65\xCF |0
+<U91AC> \x65\xD0 |0
+<U91AD> \x8C\x6E |0
+<U91AE> \x66\xB2 |0
+<U91AF> \x8A\x9F |0
+<U91B0> \x8C\x6D |0
+<U91B1> \x66\xB1 |0
+<U91B2> \x8D\xB4 |0
+<U91B3> \x8D\xB5 |0
+<U91B4> \x67\x6A |0
+<U91B5> \x8D\xB3 |0
+<U91B7> \x8D\xB2 |0
+<U91B9> \x8E\xCC |0
+<U91BA> \x67\xB3 |0
+<U91BC> \x90\x79 |0
+<U91BD> \x90\xD7 |0
+<U91BE> \x90\xD6 |0
+<U91C0> \x68\x8F |0
+<U91C1> \x68\xA9 |0
+<U91C2> \x90\xD8 |0
+<U91C3> \x91\x83 |0
+<U91C5> \x68\xBB |0
+<U91C6> \x48\xE5 |3
+<U91C6> \x4F\xDC |0
+<U91C7> \x51\xD8 |0
+<U91C9> \x5D\xBD |0
+<U91CB> \x67\x6B |0
+<U91CC> \x48\xE6 |3
+<U91CC> \x4F\xDD |0
+<U91CD> \x53\xEC |0
+<U91CE> \x58\xE8 |0
+<U91CF> \x5B\x78 |0
+<U91D0> \x65\xD1 |0
+<U91D1> \x48\xE7 |3
+<U91D1> \x51\xD9 |0
+<U91D3> \x6F\x84 |0
+<U91D4> \x6F\x83 |0
+<U91D5> \x72\x66 |0
+<U91D7> \x56\x7D |0
+<U91D8> \x56\x7B |0
+<U91D9> \x56\x7F |0
+<U91DA> \x72\x68 |0
+<U91DC> \x56\x7E |0
+<U91DD> \x56\x7C |0
+<U91E2> \x72\x67 |0
+<U91E3> \x58\xEB |0
+<U91E4> \x75\xA2 |0
+<U91E6> \x58\xEA |0
+<U91E7> \x58\xEC |0
+<U91E8> \x75\xA7 |0
+<U91E9> \x58\xEE |0
+<U91EA> \x75\xA4 |0
+<U91EB> \x75\xA5 |0
+<U91EC> \x75\x9D |0
+<U91ED> \x58\xED |0
+<U91EE> \x75\xA8 |0
+<U91F1> \x75\x9F |0
+<U91F3> \x75\xA0 |0
+<U91F4> \x75\x9E |0
+<U91F5> \x58\xE9 |0
+<U91F7> \x75\xA6 |0
+<U91F8> \x75\xA1 |0
+<U91F9> \x75\xA3 |0
+<U91FD> \x79\x55 |0
+<U91FF> \x79\x54 |0
+<U9200> \x79\x52 |0
+<U9201> \x79\x4A |0
+<U9202> \x79\x59 |0
+<U9203> \x79\x4D |0
+<U9204> \x79\x57 |0
+<U9205> \x79\x5E |0
+<U9206> \x79\x56 |0
+<U9207> \x5B\x81 |0
+<U9209> \x5B\x7C |0
+<U920A> \x79\x4B |0
+<U920C> \x79\x51 |0
+<U920D> \x5B\x7E |0
+<U920F> \x79\x50 |0
+<U9210> \x5B\x7F |0
+<U9211> \x5B\x82 |0
+<U9212> \x79\x53 |0
+<U9214> \x5B\x79 |0
+<U9215> \x5B\x7A |0
+<U9216> \x79\x5F |0
+<U9217> \x79\x5D |0
+<U9219> \x79\x5C |0
+<U921A> \x79\x4E |0
+<U921C> \x79\x5A |0
+<U921E> \x5B\x7D |0
+<U9223> \x5B\x7B |0
+<U9224> \x79\x5B |0
+<U9225> \x79\x4C |0
+<U9226> \x79\x4F |0
+<U9227> \x79\x58 |0
+<U922D> \x80\x44 |0
+<U922E> \x7C\xBE |0
+<U9230> \x7C\xB7 |0
+<U9231> \x7C\xCA |0
+<U9232> \x7C\xD3 |0
+<U9233> \x7C\xBA |0
+<U9234> \x5D\xC8 |0
+<U9236> \x7C\xC7 |0
+<U9237> \x5D\xBE |0
+<U9238> \x5D\xC0 |0
+<U9239> \x5D\xCC |0
+<U923A> \x7C\xB8 |0
+<U923D> \x5D\xC1 |0
+<U923E> \x5D\xC3 |0
+<U923F> \x5D\xCD |0
+<U9240> \x5D\xC2 |0
+<U9245> \x5D\xCB |0
+<U9246> \x7C\xC0 |0
+<U9248> \x7C\xB5 |0
+<U9249> \x5D\xC9 |0
+<U924A> \x7C\xBF |0
+<U924B> \x5D\xC5 |0
+<U924C> \x7C\xD1 |0
+<U924D> \x5D\xCA |0
+<U924E> \x7C\xCF |0
+<U924F> \x7C\xC3 |0
+<U9250> \x7C\xCD |0
+<U9251> \x5D\xC7 |0
+<U9252> \x7C\xB6 |0
+<U9253> \x7C\xD0 |0
+<U9254> \x7C\xCB |0
+<U9256> \x7C\xD2 |0
+<U9257> \x5D\xBF |0
+<U925A> \x5D\xCE |0
+<U925B> \x5D\xC4 |0
+<U925E> \x7C\xBC |0
+<U9260> \x7C\xC4 |0
+<U9261> \x7C\xC8 |0
+<U9263> \x7C\xCC |0
+<U9264> \x5D\xC6 |0
+<U9265> \x7C\xBB |0
+<U9266> \x7C\xB9 |0
+<U9267> \x7C\xC5 |0
+<U926C> \x7C\xC2 |0
+<U926D> \x7C\xC1 |0
+<U926F> \x7C\xC6 |0
+<U9270> \x7C\xC9 |0
+<U9272> \x7C\xCE |0
+<U9276> \x7F\xE1 |0
+<U9278> \x5F\xCE |0
+<U9279> \x7F\xEB |0
+<U927A> \x7F\xE3 |0
+<U927B> \x5F\xD3 |0
+<U927C> \x5F\xD7 |0
+<U927D> \x7F\xF4 |0
+<U927E> \x7F\xFC |0
+<U927F> \x7F\xED |0
+<U9280> \x5F\xCF |0
+<U9282> \x7F\xF1 |0
+<U9283> \x7C\xBD |0
+<U9285> \x5F\xD0 |0
+<U9286> \x7F\xF8 |0
+<U9287> \x7F\xFD |0
+<U9288> \x7F\xF5 |0
+<U928A> \x7F\xF7 |0
+<U928B> \x80\x43 |0
+<U928C> \x7F\xF9 |0
+<U928D> \x7F\xE7 |0
+<U928E> \x7F\xF0 |0
+<U9291> \x5F\xD8 |0
+<U9293> \x5F\xD4 |0
+<U9294> \x7F\xE5 |0
+<U9295> \x7F\xF2 |0
+<U9296> \x5F\xD2 |0
+<U9297> \x7F\xEC |0
+<U9298> \x5F\xD1 |0
+<U9299> \x7F\xFA |0
+<U929A> \x7F\xE9 |0
+<U929B> \x7F\xE2 |0
+<U929C> \x5F\xD5 |0
+<U929D> \x80\x42 |0
+<U92A0> \x7F\xE4 |0
+<U92A1> \x7F\xF6 |0
+<U92A2> \x7F\xF3 |0
+<U92A3> \x7F\xEE |0
+<U92A4> \x7F\xE0 |0
+<U92A5> \x7F\xDF |0
+<U92A6> \x7F\xE8 |0
+<U92A7> \x7F\xFB |0
+<U92A8> \x5F\xD6 |0
+<U92A9> \x80\x41 |0
+<U92AA> \x7F\xE6 |0
+<U92AB> \x7F\xEA |0
+<U92AC> \x61\xDA |0
+<U92B2> \x61\xE2 |0
+<U92B3> \x61\xDD |0
+<U92B4> \x83\x6E |0
+<U92B5> \x83\x6B |0
+<U92B6> \x83\x53 |0
+<U92B7> \x61\xD8 |0
+<U92BB> \x61\xD7 |0
+<U92BC> \x61\xDE |0
+<U92C0> \x83\x51 |0
+<U92C1> \x61\xDC |0
+<U92C2> \x83\x5D |0
+<U92C3> \x83\x4F |0
+<U92C4> \x83\x50 |0
+<U92C5> \x61\xD6 |0
+<U92C6> \x83\x6D |0
+<U92C7> \x61\xE0 |0
+<U92C8> \x83\x60 |0
+<U92C9> \x83\x65 |0
+<U92CA> \x83\x5F |0
+<U92CB> \x86\x5B |0
+<U92CC> \x83\x5B |0
+<U92CD> \x83\x63 |0
+<U92CE> \x83\x61 |0
+<U92CF> \x83\x54 |0
+<U92D0> \x83\x4E |0
+<U92D1> \x83\x69 |0
+<U92D2> \x61\xDF |0
+<U92D3> \x83\x6A |0
+<U92D5> \x83\x64 |0
+<U92D7> \x83\x59 |0
+<U92D8> \x83\x57 |0
+<U92D9> \x83\x52 |0
+<U92DD> \x83\x5A |0
+<U92DE> \x83\x67 |0
+<U92DF> \x83\x56 |0
+<U92E0> \x83\x66 |0
+<U92E1> \x83\x6C |0
+<U92E4> \x61\xDB |0
+<U92E6> \x83\x62 |0
+<U92E7> \x83\x68 |0
+<U92E8> \x83\x5E |0
+<U92E9> \x83\x58 |0
+<U92EA> \x61\xD9 |0
+<U92EE> \x7F\xEF |0
+<U92EF> \x83\x5C |0
+<U92F0> \x61\xE1 |0
+<U92F1> \x83\x55 |0
+<U92F7> \x86\x61 |0
+<U92F8> \x63\x82 |0
+<U92F9> \x86\x60 |0
+<U92FA> \x86\x5D |0
+<U92FB> \x86\x70 |0
+<U92FC> \x63\x86 |0
+<U92FE> \x86\x6D |0
+<U92FF> \x86\x65 |0
+<U9300> \x86\x6F |0
+<U9301> \x86\x56 |0
+<U9302> \x86\x63 |0
+<U9304> \x63\x88 |0
+<U9306> \x86\x4E |0
+<U9308> \x86\x4C |0
+<U9309> \x86\x6E |0
+<U930B> \x86\x6C |0
+<U930C> \x86\x6B |0
+<U930D> \x86\x5A |0
+<U930E> \x86\x59 |0
+<U930F> \x86\x4F |0
+<U9310> \x63\x8A |0
+<U9312> \x86\x55 |0
+<U9313> \x86\x5F |0
+<U9314> \x86\x6A |0
+<U9315> \x63\x8D |0
+<U9316> \x86\x71 |0
+<U9318> \x64\xF1 |0
+<U9319> \x63\x8F |0
+<U931A> \x63\x89 |0
+<U931B> \x86\x53 |0
+<U931D> \x86\x5C |0
+<U931E> \x86\x4B |0
+<U931F> \x86\x4D |0
+<U9320> \x63\x7F |0
+<U9321> \x63\x8C |0
+<U9322> \x63\x85 |0
+<U9323> \x86\x54 |0
+<U9324> \x86\x64 |0
+<U9325> \x86\x5E |0
+<U9326> \x63\x8B |0
+<U9327> \x86\x4A |0
+<U9328> \x64\xEC |0
+<U9329> \x86\x66 |0
+<U932A> \x86\x69 |0
+<U932B> \x63\x87 |0
+<U932D> \x86\x58 |0
+<U932E> \x63\x8E |0
+<U932F> \x63\x84 |0
+<U9333> \x63\x83 |0
+<U9334> \x86\x62 |0
+<U9335> \x86\x68 |0
+<U9336> \x63\x81 |0
+<U9338> \x86\x51 |0
+<U9339> \x86\x67 |0
+<U933C> \x86\x52 |0
+<U9346> \x86\x57 |0
+<U9347> \x88\x9F |0
+<U9349> \x88\xA4 |0
+<U934A> \x64\xEE |0
+<U934B> \x64\xF0 |0
+<U934C> \x88\xAA |0
+<U934D> \x64\xEA |0
+<U934E> \x88\xB9 |0
+<U934F> \x88\xB0 |0
+<U9350> \x88\xA5 |0
+<U9351> \x88\xA6 |0
+<U9352> \x88\xAF |0
+<U9354> \x64\xF7 |0
+<U9355> \x88\xAE |0
+<U9356> \x88\x9E |0
+<U9357> \x88\xAD |0
+<U9358> \x88\xA1 |0
+<U9359> \x88\xBA |0
+<U935A> \x64\xF6 |0
+<U935B> \x64\xF4 |0
+<U935C> \x88\xA2 |0
+<U935E> \x88\xB5 |0
+<U9360> \x88\xA7 |0
+<U9361> \x88\xB4 |0
+<U9363> \x88\xB6 |0
+<U9364> \x88\x9D |0
+<U9365> \x64\xEF |0
+<U9367> \x88\xB7 |0
+<U936A> \x88\xAB |0
+<U936C> \x64\xF3 |0
+<U936D> \x88\xA8 |0
+<U9370> \x64\xF5 |0
+<U9371> \x88\xB1 |0
+<U9375> \x64\xED |0
+<U9376> \x88\xA3 |0
+<U9377> \x88\xB2 |0
+<U9379> \x88\xAC |0
+<U937A> \x86\x50 |0
+<U937B> \x88\xB3 |0
+<U937C> \x88\xA0 |0
+<U937E> \x64\xF2 |0
+<U9380> \x88\xB8 |0
+<U9382> \x64\xEB |0
+<U9383> \x88\x9B |0
+<U9388> \x8A\xAE |0
+<U9389> \x8A\xA7 |0
+<U938A> \x65\xD3 |0
+<U938C> \x8A\xA2 |0
+<U938D> \x8A\xB1 |0
+<U938E> \x8A\xA9 |0
+<U938F> \x88\xA9 |0
+<U9391> \x8A\xB3 |0
+<U9392> \x8A\xA3 |0
+<U9394> \x65\xD2 |0
+<U9395> \x8A\xAD |0
+<U9396> \x65\xD4 |0
+<U9397> \x65\xDC |0
+<U9398> \x65\xDA |0
+<U9399> \x8A\xAF |0
+<U939A> \x65\xDB |0
+<U939B> \x8A\xA5 |0
+<U939D> \x8A\xA6 |0
+<U939E> \x8A\xAB |0
+<U939F> \x8A\xB0 |0
+<U93A1> \x88\x9A |0
+<U93A2> \x65\xD5 |0
+<U93A3> \x8A\xB8 |0
+<U93A4> \x8A\xB5 |0
+<U93A5> \x8A\xB9 |0
+<U93A6> \x8A\xAC |0
+<U93A7> \x8A\xA8 |0
+<U93A8> \x8A\xB6 |0
+<U93A9> \x8C\x79 |0
+<U93AA> \x8A\xAA |0
+<U93AC> \x65\xD8 |0
+<U93AE> \x65\xD7 |0
+<U93AF> \x88\x9C |0
+<U93B0> \x65\xD9 |0
+<U93B1> \x8A\xB2 |0
+<U93B2> \x8A\xB4 |0
+<U93B3> \x65\xD6 |0
+<U93B4> \x8A\xB7 |0
+<U93B5> \x8A\xA1 |0
+<U93B7> \x8A\xA4 |0
+<U93C0> \x8C\x83 |0
+<U93C2> \x8C\x72 |0
+<U93C3> \x66\xB6 |0
+<U93C4> \x8C\x81 |0
+<U93C7> \x8C\x70 |0
+<U93C8> \x66\xB7 |0
+<U93CA> \x8C\x7B |0
+<U93CC> \x8C\x77 |0
+<U93CD> \x66\xBC |0
+<U93CE> \x8C\x82 |0
+<U93CF> \x8C\x71 |0
+<U93D0> \x8C\x74 |0
+<U93D1> \x66\xB4 |0
+<U93D2> \x8C\x84 |0
+<U93D4> \x8C\x7C |0
+<U93D5> \x8C\x7F |0
+<U93D6> \x66\xBA |0
+<U93D7> \x66\xBF |0
+<U93D8> \x66\xBD |0
+<U93D9> \x8C\x78 |0
+<U93DA> \x8C\x73 |0
+<U93DC> \x66\xB8 |0
+<U93DD> \x66\xB9 |0
+<U93DE> \x8C\x6F |0
+<U93DF> \x66\xB5 |0
+<U93E1> \x66\xB3 |0
+<U93E2> \x66\xBB |0
+<U93E3> \x8C\x7E |0
+<U93E4> \x66\xBE |0
+<U93E6> \x8C\x7A |0
+<U93E7> \x8C\x85 |0
+<U93E8> \x66\xC0 |0
+<U93EC> \x8C\x76 |0
+<U93EE> \x8C\x7D |0
+<U93F5> \x8D\xC2 |0
+<U93F6> \x8D\xD0 |0
+<U93F7> \x8D\xC4 |0
+<U93F8> \x8D\xCB |0
+<U93F9> \x8C\x75 |0
+<U93FA> \x8D\xC9 |0
+<U93FB> \x8D\xB8 |0
+<U93FC> \x8D\xCE |0
+<U93FD> \x67\x6E |0
+<U93FE> \x8D\xBC |0
+<U93FF> \x8D\xCD |0
+<U9400> \x8D\xC3 |0
+<U9403> \x67\x6D |0
+<U9406> \x8D\xD2 |0
+<U9407> \x8D\xC5 |0
+<U9409> \x8D\xCA |0
+<U940A> \x8D\xCC |0
+<U940B> \x8D\xB6 |0
+<U940C> \x8D\xCF |0
+<U940D> \x8D\xC1 |0
+<U940E> \x8D\xC6 |0
+<U940F> \x8D\xBA |0
+<U9410> \x8D\xBE |0
+<U9411> \x8D\xD1 |0
+<U9412> \x8D\xC8 |0
+<U9413> \x8D\xB7 |0
+<U9414> \x8D\xBB |0
+<U9415> \x8D\xBD |0
+<U9416> \x8D\xC7 |0
+<U9418> \x67\x6C |0
+<U9419> \x8D\xC0 |0
+<U9420> \x8D\xB9 |0
+<U9428> \x8D\xBF |0
+<U9429> \x8E\xD0 |0
+<U942A> \x8E\xD5 |0
+<U942B> \x67\xBA |0
+<U942C> \x8E\xD7 |0
+<U942E> \x67\xB4 |0
+<U9430> \x8E\xD3 |0
+<U9431> \x8E\xD9 |0
+<U9432> \x67\xB9 |0
+<U9433> \x67\xB5 |0
+<U9435> \x67\xB6 |0
+<U9436> \x8E\xCF |0
+<U9437> \x8E\xD6 |0
+<U9438> \x67\xB8 |0
+<U9439> \x8E\xD4 |0
+<U943A> \x67\xB7 |0
+<U943B> \x8E\xCE |0
+<U943C> \x8E\xD2 |0
+<U943D> \x8E\xD1 |0
+<U943F> \x8E\xCD |0
+<U9440> \x8E\xD8 |0
+<U9444> \x67\xFA |0
+<U9445> \x8F\xBD |0
+<U9446> \x8F\xC0 |0
+<U9447> \x8F\xBC |0
+<U9448> \x8F\xBE |0
+<U9449> \x8F\xBF |0
+<U944A> \x8F\xB9 |0
+<U944B> \x8F\xBA |0
+<U944C> \x8F\xB7 |0
+<U944F> \x8F\xBB |0
+<U9450> \x8F\xB8 |0
+<U9451> \x67\xFB |0
+<U9452> \x67\xFC |0
+<U9455> \x90\x7B |0
+<U9457> \x90\x7D |0
+<U945D> \x90\x7C |0
+<U945E> \x90\x7E |0
+<U9460> \x68\x6C |0
+<U9462> \x90\x7A |0
+<U9463> \x68\x6B |0
+<U9464> \x68\x6D |0
+<U9468> \x90\xDA |0
+<U9469> \x90\xDB |0
+<U946A> \x68\x90 |0
+<U946B> \x90\xD9 |0
+<U946D> \x91\x64 |0
+<U946E> \x91\x63 |0
+<U946F> \x91\x65 |0
+<U9470> \x68\xAB |0
+<U9471> \x91\x66 |0
+<U9472> \x68\xAA |0
+<U9473> \x91\x67 |0
+<U9474> \x91\x84 |0
+<U9475> \x91\x87 |0
+<U9476> \x91\x86 |0
+<U9477> \x68\xB4 |0
+<U9478> \x91\x85 |0
+<U947C> \x68\xBE |0
+<U947D> \x68\xBC |0
+<U947E> \x68\xBD |0
+<U947F> \x68\xC3 |0
+<U9480> \x91\xB0 |0
+<U9481> \x91\xB1 |0
+<U9482> \x91\xAF |0
+<U9483> \x91\xB9 |0
+<U9577> \x48\xE8 |3
+<U9577> \x51\xDA |0
+<U957A> \x75\xA9 |0
+<U957B> \x79\x60 |0
+<U957C> \x83\x6F |0
+<U957D> \x8C\x86 |0
+<U9580> \x48\xE9 |3
+<U9580> \x51\xDB |0
+<U9582> \x53\xED |0
+<U9583> \x56\x81 |0
+<U9586> \x75\xAA |0
+<U9588> \x75\xAB |0
+<U9589> \x58\xEF |0
+<U958B> \x5B\x85 |0
+<U958C> \x79\x62 |0
+<U958D> \x79\x61 |0
+<U958E> \x5B\x89 |0
+<U958F> \x5B\x84 |0
+<U9590> \x79\x63 |0
+<U9591> \x5B\x86 |0
+<U9592> \x5B\x88 |0
+<U9593> \x5B\x87 |0
+<U9594> \x5B\x83 |0
+<U9598> \x5D\xCF |0
+<U959B> \x7C\xD7 |0
+<U959C> \x7C\xD5 |0
+<U959E> \x7C\xD6 |0
+<U959F> \x7C\xD4 |0
+<U95A1> \x5F\xD9 |0
+<U95A3> \x5F\xDC |0
+<U95A4> \x5F\xDE |0
+<U95A5> \x5F\xDD |0
+<U95A8> \x5F\xDA |0
+<U95A9> \x5F\xDB |0
+<U95AB> \x83\x71 |0
+<U95AC> \x83\x70 |0
+<U95AD> \x61\xE3 |0
+<U95AE> \x83\x72 |0
+<U95B0> \x83\x73 |0
+<U95B1> \x61\xE4 |0
+<U95B5> \x86\x79 |0
+<U95B6> \x86\x77 |0
+<U95B7> \x88\xC0 |0
+<U95B9> \x86\x75 |0
+<U95BA> \x86\x76 |0
+<U95BB> \x63\x90 |0
+<U95BC> \x86\x72 |0
+<U95BD> \x86\x7A |0
+<U95BE> \x86\x74 |0
+<U95BF> \x86\x78 |0
+<U95C0> \x88\xBC |0
+<U95C3> \x88\xBE |0
+<U95C5> \x88\xBF |0
+<U95C6> \x64\xFC |0
+<U95C7> \x88\xBB |0
+<U95C8> \x64\xFB |0
+<U95C9> \x88\xBD |0
+<U95CA> \x64\xF8 |0
+<U95CB> \x64\xF9 |0
+<U95CC> \x64\xFA |0
+<U95CD> \x86\x73 |0
+<U95D0> \x65\xDF |0
+<U95D1> \x8A\xBC |0
+<U95D2> \x8A\xBA |0
+<U95D3> \x8A\xBB |0
+<U95D4> \x65\xDD |0
+<U95D5> \x65\xE0 |0
+<U95D6> \x65\xDE |0
+<U95DA> \x8C\x87 |0
+<U95DB> \x8C\x88 |0
+<U95DC> \x66\xC1 |0
+<U95DE> \x8D\xD3 |0
+<U95DF> \x8D\xD5 |0
+<U95E0> \x8D\xD4 |0
+<U95E1> \x67\x6F |0
+<U95E2> \x67\xBB |0
+<U95E3> \x8E\xDC |0
+<U95E4> \x8E\xDB |0
+<U95E5> \x8E\xDA |0
+<U961C> \x48\xEA |3
+<U961C> \x51\xDC |0
+<U961E> \x69\x8A |0
+<U9620> \x69\xF7 |0
+<U9621> \x4E\x8B |0
+<U9622> \x69\xF5 |0
+<U9623> \x69\xF8 |0
+<U9624> \x69\xF6 |0
+<U9628> \x6B\x4F |0
+<U962A> \x4F\xE1 |0
+<U962C> \x4F\xE2 |0
+<U962D> \x6B\x51 |0
+<U962E> \x4F\xDF |0
+<U962F> \x6B\x50 |0
+<U9630> \x6B\x4E |0
+<U9631> \x4F\xE0 |0
+<U9632> \x4F\xDE |0
+<U9639> \x6C\xF8 |0
+<U963A> \x6C\xFB |0
+<U963B> \x51\xDF |0
+<U963C> \x6C\xFA |0
+<U963D> \x6C\xF9 |0
+<U963F> \x51\xDE |0
+<U9640> \x51\xDD |0
+<U9642> \x51\xE1 |0
+<U9643> \x6C\xFC |0
+<U9644> \x51\xE0 |0
+<U964A> \x6F\x89 |0
+<U964B> \x53\xEF |0
+<U964C> \x53\xF0 |0
+<U964D> \x53\xF1 |0
+<U964E> \x6F\x8A |0
+<U964F> \x6F\x86 |0
+<U9650> \x53\xEE |0
+<U9651> \x6F\x87 |0
+<U9653> \x6F\x88 |0
+<U9654> \x6F\x85 |0
+<U9658> \x56\x88 |0
+<U965B> \x56\x85 |0
+<U965C> \x72\x69 |0
+<U965D> \x56\x86 |0
+<U965E> \x56\x89 |0
+<U965F> \x72\x6A |0
+<U9661> \x56\x84 |0
+<U9662> \x56\x82 |0
+<U9663> \x56\x83 |0
+<U9664> \x56\x87 |0
+<U966A> \x58\xF0 |0
+<U966B> \x75\xAE |0
+<U966C> \x58\xF8 |0
+<U966D> \x75\xAD |0
+<U966F> \x75\xB0 |0
+<U9670> \x58\xF4 |0
+<U9671> \x75\xAF |0
+<U9672> \x5B\x91 |0
+<U9673> \x58\xF2 |0
+<U9674> \x58\xF5 |0
+<U9675> \x58\xF1 |0
+<U9676> \x58\xF6 |0
+<U9677> \x58\xF7 |0
+<U9678> \x58\xF3 |0
+<U967C> \x75\xAC |0
+<U967D> \x5B\x8D |0
+<U967E> \x79\x65 |0
+<U9680> \x79\x69 |0
+<U9683> \x79\x68 |0
+<U9684> \x5B\x92 |0
+<U9685> \x5B\x8E |0
+<U9686> \x5B\x8F |0
+<U9687> \x79\x64 |0
+<U9688> \x79\x66 |0
+<U9689> \x79\x67 |0
+<U968A> \x5B\x8A |0
+<U968B> \x5B\x8C |0
+<U968D> \x5B\x90 |0
+<U968E> \x5B\x8B |0
+<U9691> \x7C\xDA |0
+<U9692> \x7C\xD8 |0
+<U9693> \x7C\xD9 |0
+<U9694> \x5D\xD1 |0
+<U9695> \x5D\xD2 |0
+<U9697> \x7C\xDB |0
+<U9698> \x5D\xD0 |0
+<U9699> \x5F\xDF |0
+<U969B> \x5F\xE1 |0
+<U969C> \x5F\xE0 |0
+<U969E> \x80\x45 |0
+<U96A1> \x80\x46 |0
+<U96A2> \x83\x75 |0
+<U96A4> \x83\x74 |0
+<U96A7> \x63\x91 |0
+<U96A8> \x63\x92 |0
+<U96A9> \x86\x7B |0
+<U96AA> \x63\x93 |0
+<U96AC> \x88\xC3 |0
+<U96AE> \x88\xC1 |0
+<U96B0> \x88\xC2 |0
+<U96B1> \x64\xFD |0
+<U96B3> \x8A\xBD |0
+<U96B4> \x66\xC2 |0
+<U96B6> \x48\xEB |0
+<U96B8> \x65\x41 |0
+<U96B9> \x48\xEC |3
+<U96B9> \x51\xE2 |0
+<U96BB> \x56\x8A |0
+<U96BC> \x72\x6B |0
+<U96BF> \x75\xB1 |0
+<U96C0> \x58\xF9 |0
+<U96C1> \x5B\x93 |0
+<U96C2> \x79\x6A |0
+<U96C3> \x79\x6C |0
+<U96C4> \x5B\x95 |0
+<U96C5> \x5B\x94 |0
+<U96C6> \x5B\x96 |0
+<U96C7> \x5B\x97 |0
+<U96C8> \x79\x6B |0
+<U96C9> \x5D\xD5 |0
+<U96CA> \x5D\xD6 |0
+<U96CB> \x5D\xD4 |0
+<U96CC> \x5F\xE2 |0
+<U96CD> \x5D\xD3 |0
+<U96CE> \x7C\xDC |0
+<U96D2> \x5F\xE3 |0
+<U96D3> \x83\x76 |0
+<U96D4> \x86\x7C |0
+<U96D5> \x63\x94 |0
+<U96D6> \x65\x42 |0
+<U96D7> \x8A\xBE |0
+<U96D8> \x8A\xC2 |0
+<U96D9> \x65\xE3 |0
+<U96DA> \x8A\xBF |0
+<U96DB> \x65\xE4 |0
+<U96DC> \x65\xE2 |0
+<U96DD> \x8A\xC3 |0
+<U96DE> \x65\xE5 |0
+<U96DF> \x8A\xC1 |0
+<U96E1> \x8C\x89 |0
+<U96E2> \x65\xE1 |0
+<U96E3> \x66\xC3 |0
+<U96E5> \x90\xDC |0
+<U96E8> \x48\xED |3
+<U96E8> \x51\xE3 |0
+<U96E9> \x58\xFB |0
+<U96EA> \x58\xFA |0
+<U96EF> \x5B\x98 |0
+<U96F0> \x79\x6E |0
+<U96F1> \x79\x6D |0
+<U96F2> \x5B\x99 |0
+<U96F5> \x7C\xE0 |0
+<U96F6> \x5D\xDA |0
+<U96F7> \x5D\xD7 |0
+<U96F8> \x7C\xDF |0
+<U96F9> \x5D\xD9 |0
+<U96FA> \x7C\xDD |0
+<U96FB> \x5D\xD8 |0
+<U96FD> \x7C\xDE |0
+<U96FF> \x80\x47 |0
+<U9700> \x5F\xE4 |0
+<U9702> \x83\x79 |0
+<U9704> \x61\xE5 |0
+<U9705> \x83\x77 |0
+<U9706> \x61\xE6 |0
+<U9707> \x61\xE7 |0
+<U9708> \x83\x78 |0
+<U9709> \x61\xE8 |0
+<U970B> \x86\x7D |0
+<U970D> \x63\x98 |0
+<U970E> \x63\x95 |0
+<U970F> \x63\x9A |0
+<U9710> \x86\x7F |0
+<U9711> \x63\x96 |0
+<U9712> \x86\x7E |0
+<U9713> \x63\x99 |0
+<U9716> \x63\x97 |0
+<U9718> \x88\xC6 |0
+<U9719> \x88\xC8 |0
+<U971C> \x65\x43 |0
+<U971D> \x88\xC7 |0
+<U971E> \x65\x44 |0
+<U971F> \x88\xC5 |0
+<U9720> \x88\xC4 |0
+<U9722> \x8A\xC5 |0
+<U9723> \x8A\xC4 |0
+<U9724> \x65\xE6 |0
+<U9725> \x8A\xC6 |0
+<U9726> \x8C\x8E |0
+<U9727> \x66\xC5 |0
+<U9728> \x8C\x8D |0
+<U9729> \x8C\x8A |0
+<U972A> \x66\xC4 |0
+<U972B> \x8C\x8B |0
+<U972C> \x8C\x8C |0
+<U972E> \x8D\xD6 |0
+<U972F> \x8D\xD7 |0
+<U9730> \x67\x70 |0
+<U9732> \x67\xBE |0
+<U9735> \x8E\xDD |0
+<U9738> \x67\xBC |0
+<U9739> \x67\xBD |0
+<U973A> \x8E\xDE |0
+<U973D> \x67\xFD |0
+<U973E> \x68\x41 |0
+<U973F> \x8F\xC1 |0
+<U9742> \x68\x91 |0
+<U9743> \x90\xDE |0
+<U9744> \x68\x93 |0
+<U9746> \x90\xDD |0
+<U9747> \x90\xDF |0
+<U9748> \x68\x92 |0
+<U9749> \x91\x68 |0
+<U974B> \x91\x9D |0
+<U9752> \x48\xEE |3
+<U9752> \x51\xE4 |0
+<U9756> \x5D\xDB |0
+<U9758> \x80\x48 |0
+<U975A> \x83\x7A |0
+<U975B> \x63\x9B |0
+<U975C> \x63\x9C |0
+<U975E> \x48\xEF |3
+<U975E> \x51\xE5 |0
+<U9760> \x61\xE9 |0
+<U9761> \x66\xC6 |0
+<U9762> \x48\xF0 |3
+<U9762> \x53\xF2 |0
+<U9766> \x63\x9D |0
+<U9768> \x68\x6E |0
+<U9769> \x48\xF1 |3
+<U9769> \x53\xF3 |0
+<U976A> \x75\xB2 |0
+<U976C> \x79\x6F |0
+<U976E> \x79\x71 |0
+<U9770> \x79\x70 |0
+<U9772> \x7C\xE4 |0
+<U9773> \x7C\xE1 |0
+<U9774> \x5D\xDC |0
+<U9776> \x5D\xDD |0
+<U9777> \x7C\xE2 |0
+<U9778> \x7C\xE3 |0
+<U977A> \x80\x4A |0
+<U977B> \x80\x4F |0
+<U977C> \x5F\xE5 |0
+<U977D> \x80\x49 |0
+<U977E> \x80\x4B |0
+<U977F> \x80\x52 |0
+<U9780> \x80\x4D |0
+<U9781> \x80\x51 |0
+<U9782> \x80\x4E |0
+<U9783> \x80\x4C |0
+<U9784> \x80\x50 |0
+<U9785> \x5F\xE6 |0
+<U9788> \x83\x7D |0
+<U978A> \x83\x7B |0
+<U978B> \x61\xEB |0
+<U978D> \x61\xEA |0
+<U978E> \x83\x7C |0
+<U978F> \x61\xEC |0
+<U9794> \x86\x83 |0
+<U9797> \x86\x82 |0
+<U9798> \x63\x9E |0
+<U9799> \x86\x81 |0
+<U979A> \x88\xC9 |0
+<U979C> \x88\xCB |0
+<U979D> \x88\xCD |0
+<U979E> \x88\xCC |0
+<U97A0> \x65\x45 |0
+<U97A1> \x88\xCA |0
+<U97A2> \x8A\xCD |0
+<U97A3> \x65\xE7 |0
+<U97A4> \x8A\xCB |0
+<U97A5> \x8A\xCE |0
+<U97A6> \x65\xE8 |0
+<U97A8> \x8A\xC9 |0
+<U97AA> \x8A\xCC |0
+<U97AB> \x8A\xCA |0
+<U97AC> \x8A\xC7 |0
+<U97AD> \x65\xE9 |0
+<U97AE> \x8A\xC8 |0
+<U97B3> \x8C\x8F |0
+<U97B6> \x8C\x91 |0
+<U97B7> \x8C\x90 |0
+<U97B9> \x8D\xD8 |0
+<U97BB> \x8D\xD9 |0
+<U97BF> \x8E\xDF |0
+<U97C1> \x68\x43 |0
+<U97C3> \x68\x42 |0
+<U97C4> \x90\x7F |0
+<U97C5> \x90\x81 |0
+<U97C6> \x68\x94 |0
+<U97C7> \x90\xE0 |0
+<U97C9> \x68\xB5 |0
+<U97CB> \x48\xF2 |3
+<U97CB> \x53\xF4 |0
+<U97CC> \x5B\x9A |0
+<U97CD> \x80\x54 |0
+<U97CE> \x80\x53 |0
+<U97CF> \x83\x7F |0
+<U97D0> \x83\x7E |0
+<U97D3> \x65\x46 |0
+<U97D4> \x88\xCF |0
+<U97D5> \x88\xCE |0
+<U97D6> \x8A\xD1 |0
+<U97D7> \x8A\xCF |0
+<U97D8> \x8A\xD2 |0
+<U97D9> \x8A\xD0 |0
+<U97DC> \x66\xC7 |0
+<U97DD> \x8C\x92 |0
+<U97DE> \x8C\x93 |0
+<U97DF> \x8C\x94 |0
+<U97E1> \x8E\xE0 |0
+<U97E3> \x8F\xC2 |0
+<U97E5> \x90\xE1 |0
+<U97ED> \x48\xF3 |3
+<U97ED> \x53\xF5 |0
+<U97F0> \x86\x84 |0
+<U97F1> \x88\xD0 |0
+<U97F3> \x48\xF4 |3
+<U97F3> \x53\xF6 |0
+<U97F6> \x5F\xE7 |0
+<U97F8> \x86\x85 |0
+<U97F9> \x65\xEA |0
+<U97FA> \x8A\xD3 |0
+<U97FB> \x66\xC8 |0
+<U97FD> \x8D\xDA |0
+<U97FE> \x8D\xDB |0
+<U97FF> \x67\xBF |0
+<U9800> \x90\x82 |0
+<U9801> \x48\xF5 |3
+<U9801> \x53\xF7 |0
+<U9802> \x59\x41 |0
+<U9803> \x59\x42 |0
+<U9804> \x75\xB3 |0
+<U9805> \x5B\x9B |0
+<U9806> \x5B\x9C |0
+<U9807> \x79\x72 |0
+<U9808> \x5B\x9D |0
+<U980A> \x5D\xE1 |0
+<U980C> \x5D\xE3 |0
+<U980D> \x7C\xE6 |0
+<U980E> \x7C\xE7 |0
+<U980F> \x7C\xE5 |0
+<U9810> \x5D\xDE |0
+<U9811> \x5D\xDF |0
+<U9812> \x5D\xE2 |0
+<U9813> \x5D\xE0 |0
+<U9816> \x80\x55 |0
+<U9817> \x5F\xE8 |0
+<U9818> \x5F\xE9 |0
+<U981B> \x83\x87 |0
+<U981C> \x61\xEF |0
+<U981D> \x83\x82 |0
+<U981E> \x83\x81 |0
+<U9820> \x83\x86 |0
+<U9821> \x61\xED |0
+<U9824> \x63\xA5 |0
+<U9826> \x83\x83 |0
+<U9827> \x83\x88 |0
+<U9828> \x83\x85 |0
+<U9829> \x83\x84 |0
+<U982B> \x61\xEE |0
+<U982D> \x63\xA3 |0
+<U982F> \x86\x87 |0
+<U9830> \x63\x9F |0
+<U9832> \x86\x88 |0
+<U9835> \x86\x86 |0
+<U9837> \x63\xA2 |0
+<U9838> \x63\xA0 |0
+<U9839> \x63\xA4 |0
+<U983B> \x63\xA1 |0
+<U9841> \x88\xD1 |0
+<U9843> \x88\xD6 |0
+<U9844> \x88\xD2 |0
+<U9845> \x88\xD5 |0
+<U9846> \x65\x47 |0
+<U9848> \x87\xC0 |0
+<U9849> \x88\xD4 |0
+<U984A> \x88\xD3 |0
+<U984C> \x65\xED |0
+<U984D> \x65\xEB |0
+<U984E> \x65\xEE |0
+<U984F> \x65\xEC |0
+<U9850> \x8A\xD4 |0
+<U9851> \x8A\xD5 |0
+<U9852> \x8A\xD6 |0
+<U9853> \x65\xEF |0
+<U9857> \x8C\x98 |0
+<U9858> \x66\xCA |0
+<U9859> \x8C\x96 |0
+<U985B> \x66\xCB |0
+<U985C> \x8C\x95 |0
+<U985D> \x8C\x97 |0
+<U985E> \x66\xC9 |0
+<U985F> \x8D\xDF |0
+<U9860> \x8D\xDC |0
+<U9862> \x8D\xDD |0
+<U9863> \x8D\xDE |0
+<U9864> \x8E\xE1 |0
+<U9865> \x67\xC1 |0
+<U9867> \x67\xC0 |0
+<U9869> \x8F\xC4 |0
+<U986A> \x8F\xC3 |0
+<U986B> \x68\x44 |0
+<U986F> \x68\x6F |0
+<U9870> \x68\x95 |0
+<U9871> \x68\xAC |0
+<U9872> \x91\x69 |0
+<U9873> \x91\x9E |0
+<U9874> \x91\x9F |0
+<U98A8> \x48\xF6 |3
+<U98A8> \x53\xF8 |0
+<U98A9> \x79\x73 |0
+<U98AC> \x7C\xE8 |0
+<U98AD> \x80\x56 |0
+<U98AE> \x80\x57 |0
+<U98AF> \x5F\xEA |0
+<U98B1> \x5F\xEB |0
+<U98B2> \x83\x89 |0
+<U98B3> \x61\xF0 |0
+<U98B6> \x65\x48 |0
+<U98B8> \x8A\xD7 |0
+<U98BA> \x65\xF0 |0
+<U98BB> \x8C\x9B |0
+<U98BC> \x66\xCC |0
+<U98BD> \x8C\x9A |0
+<U98BE> \x8C\x9C |0
+<U98BF> \x8C\x99 |0
+<U98C0> \x8E\xE4 |0
+<U98C1> \x8D\xE0 |0
+<U98C2> \x8D\xE1 |0
+<U98C4> \x67\x71 |0
+<U98C6> \x8E\xE3 |0
+<U98C9> \x8E\xE2 |0
+<U98CB> \x8F\xC5 |0
+<U98CC> \x91\xA0 |0
+<U98DB> \x48\xF7 |3
+<U98DB> \x53\xF9 |0
+<U98DF> \x48\xF8 |3
+<U98DF> \x53\xFA |0
+<U98E2> \x56\x8B |0
+<U98E3> \x72\x6C |0
+<U98E5> \x75\xB4 |0
+<U98E7> \x5B\x9E |0
+<U98E9> \x5B\xA1 |0
+<U98EA> \x5B\x9F |0
+<U98EB> \x79\x74 |0
+<U98ED> \x5B\xA3 |0
+<U98EF> \x5B\xA0 |0
+<U98F2> \x5B\xA2 |0
+<U98F4> \x5D\xE5 |0
+<U98F6> \x7C\xE9 |0
+<U98F9> \x7C\xEA |0
+<U98FA> \x83\x8B |0
+<U98FC> \x5D\xE4 |0
+<U98FD> \x5D\xE6 |0
+<U98FE> \x5D\xE7 |0
+<U9900> \x80\x59 |0
+<U9902> \x80\x58 |0
+<U9903> \x5F\xEC |0
+<U9905> \x5F\xED |0
+<U9907> \x80\x5A |0
+<U9908> \x83\x8A |0
+<U9909> \x5F\xEF |0
+<U990A> \x61\xF1 |0
+<U990C> \x5F\xEE |0
+<U9910> \x63\xA6 |0
+<U9911> \x83\x8C |0
+<U9912> \x61\xF3 |0
+<U9913> \x61\xF2 |0
+<U9914> \x83\x8D |0
+<U9915> \x83\x90 |0
+<U9916> \x83\x8E |0
+<U9917> \x83\x8F |0
+<U9918> \x61\xF4 |0
+<U991A> \x63\xAB |0
+<U991B> \x63\xA9 |0
+<U991E> \x63\xA8 |0
+<U991F> \x86\x8A |0
+<U9921> \x63\xAA |0
+<U9924> \x86\x89 |0
+<U9925> \x88\xD7 |0
+<U9927> \x86\x8B |0
+<U9928> \x63\xA7 |0
+<U9929> \x86\x8C |0
+<U992A> \x88\xDA |0
+<U992B> \x88\xD8 |0
+<U992C> \x88\xD9 |0
+<U992D> \x88\xDE |0
+<U992E> \x65\xF4 |0
+<U992F> \x88\xDD |0
+<U9930> \x88\xE0 |0
+<U9931> \x88\xDF |0
+<U9932> \x88\xDC |0
+<U9933> \x88\xDB |0
+<U9935> \x65\x49 |0
+<U993A> \x8A\xDA |0
+<U993C> \x8A\xD9 |0
+<U993D> \x65\xF3 |0
+<U993E> \x65\xF1 |0
+<U993F> \x65\xF2 |0
+<U9941> \x8A\xD8 |0
+<U9943> \x8C\x9F |0
+<U9945> \x66\xCD |0
+<U9947> \x8C\x9E |0
+<U9948> \x8C\x9D |0
+<U9949> \x66\xCE |0
+<U994B> \x8D\xE6 |0
+<U994C> \x8D\xE5 |0
+<U994E> \x8D\xE3 |0
+<U9950> \x8D\xE2 |0
+<U9951> \x67\x73 |0
+<U9952> \x67\x72 |0
+<U9953> \x8D\xE7 |0
+<U9954> \x8F\xC6 |0
+<U9955> \x68\x45 |0
+<U9956> \x8E\xE6 |0
+<U9957> \x67\xC2 |0
+<U9958> \x8E\xE5 |0
+<U9959> \x8D\xE4 |0
+<U995B> \x8F\xC7 |0
+<U995C> \x68\x70 |0
+<U995E> \x68\xAD |0
+<U995F> \x91\x6A |0
+<U9961> \x91\xA1 |0
+<U9996> \x48\xF9 |3
+<U9996> \x53\xFB |0
+<U9997> \x75\xB5 |0
+<U9998> \x88\xE1 |0
+<U9999> \x48\xFA |3
+<U9999> \x53\xFC |0
+<U999C> \x80\x5C |0
+<U999D> \x80\x5B |0
+<U999E> \x86\x8D |0
+<U99A1> \x88\xE3 |0
+<U99A3> \x88\xE2 |0
+<U99A5> \x65\xF5 |0
+<U99A6> \x8C\xA0 |0
+<U99A7> \x8C\xA1 |0
+<U99A8> \x67\x74 |0
+<U99AB> \x91\xA2 |0
+<U99AC> \x48\xFB |3
+<U99AC> \x56\x8C |0
+<U99AD> \x5B\xA5 |0
+<U99AE> \x5B\xA4 |0
+<U99AF> \x7C\xEB |0
+<U99B0> \x7C\xED |0
+<U99B1> \x5D\xE9 |0
+<U99B2> \x7C\xEC |0
+<U99B3> \x5D\xE8 |0
+<U99B4> \x5D\xEA |0
+<U99B5> \x7C\xEE |0
+<U99B9> \x80\x5E |0
+<U99BA> \x80\x60 |0
+<U99BB> \x80\x5F |0
+<U99BD> \x80\x62 |0
+<U99C1> \x5F\xF0 |0
+<U99C2> \x80\x61 |0
+<U99C3> \x80\x5D |0
+<U99C7> \x80\x63 |0
+<U99C9> \x83\x97 |0
+<U99CB> \x83\x9A |0
+<U99CC> \x83\x9C |0
+<U99CD> \x83\x92 |0
+<U99CE> \x83\x96 |0
+<U99CF> \x83\x93 |0
+<U99D0> \x61\xF6 |0
+<U99D1> \x61\xF9 |0
+<U99D2> \x61\xFB |0
+<U99D3> \x83\x94 |0
+<U99D4> \x83\x95 |0
+<U99D5> \x61\xFA |0
+<U99D6> \x83\x98 |0
+<U99D7> \x83\x9B |0
+<U99D8> \x83\x99 |0
+<U99D9> \x61\xFC |0
+<U99DB> \x61\xF8 |0
+<U99DC> \x83\x91 |0
+<U99DD> \x61\xF5 |0
+<U99DF> \x61\xF7 |0
+<U99E2> \x63\xAD |0
+<U99E3> \x86\x93 |0
+<U99E4> \x86\x91 |0
+<U99E5> \x86\x90 |0
+<U99E7> \x86\x96 |0
+<U99E9> \x86\x95 |0
+<U99EA> \x86\x94 |0
+<U99EC> \x86\x8F |0
+<U99ED> \x63\xAC |0
+<U99EE> \x86\x8E |0
+<U99F0> \x86\x92 |0
+<U99F1> \x63\xAE |0
+<U99F4> \x88\xE6 |0
+<U99F6> \x88\xEA |0
+<U99F7> \x88\xE7 |0
+<U99F8> \x88\xE9 |0
+<U99F9> \x88\xE8 |0
+<U99FA> \x88\xE5 |0
+<U99FB> \x88\xEB |0
+<U99FC> \x88\xEE |0
+<U99FD> \x88\xEC |0
+<U99FE> \x88\xED |0
+<U99FF> \x65\x4B |0
+<U9A01> \x65\x4A |0
+<U9A02> \x88\xE4 |0
+<U9A03> \x88\xEF |0
+<U9A04> \x8A\xDF |0
+<U9A05> \x8A\xE2 |0
+<U9A06> \x8A\xE4 |0
+<U9A07> \x8A\xE3 |0
+<U9A09> \x8A\xDD |0
+<U9A0A> \x8A\xE1 |0
+<U9A0B> \x8A\xDC |0
+<U9A0D> \x8A\xDE |0
+<U9A0E> \x65\xF6 |0
+<U9A0F> \x8A\xDB |0
+<U9A11> \x8A\xE0 |0
+<U9A14> \x8C\xAE |0
+<U9A15> \x8C\xA3 |0
+<U9A16> \x66\xCF |0
+<U9A19> \x66\xD0 |0
+<U9A1A> \x8C\xA2 |0
+<U9A1B> \x8C\xA7 |0
+<U9A1C> \x8C\xAD |0
+<U9A1D> \x8C\xA5 |0
+<U9A1E> \x8C\xAC |0
+<U9A20> \x8C\xA9 |0
+<U9A22> \x8C\xA8 |0
+<U9A23> \x8C\xAB |0
+<U9A24> \x8C\xA6 |0
+<U9A25> \x8C\xA4 |0
+<U9A27> \x8C\xAA |0
+<U9A29> \x8D\xEE |0
+<U9A2A> \x8D\xEC |0
+<U9A2B> \x67\x75 |0
+<U9A2C> \x8D\xEB |0
+<U9A2D> \x8D\xF1 |0
+<U9A2E> \x8D\xEF |0
+<U9A30> \x67\x76 |0
+<U9A31> \x8D\xEA |0
+<U9A32> \x8D\xE8 |0
+<U9A34> \x8D\xE9 |0
+<U9A35> \x67\x78 |0
+<U9A36> \x8D\xED |0
+<U9A37> \x67\x77 |0
+<U9A38> \x8D\xF0 |0
+<U9A39> \x8E\xE7 |0
+<U9A3A> \x8E\xED |0
+<U9A3D> \x8E\xE8 |0
+<U9A3E> \x67\xC6 |0
+<U9A3F> \x8E\xEE |0
+<U9A40> \x67\xC5 |0
+<U9A41> \x8E\xEC |0
+<U9A42> \x8E\xEB |0
+<U9A43> \x67\xC4 |0
+<U9A44> \x8E\xEA |0
+<U9A45> \x67\xC3 |0
+<U9A46> \x8E\xE9 |0
+<U9A48> \x8F\xCD |0
+<U9A49> \x8F\xCF |0
+<U9A4A> \x8F\xCE |0
+<U9A4C> \x8F\xCB |0
+<U9A4D> \x68\x47 |0
+<U9A4E> \x8F\xC8 |0
+<U9A4F> \x8F\xCC |0
+<U9A50> \x8F\xD1 |0
+<U9A52> \x8F\xD0 |0
+<U9A53> \x8F\xC9 |0
+<U9A54> \x8F\xCA |0
+<U9A55> \x68\x46 |0
+<U9A56> \x90\x83 |0
+<U9A57> \x68\x73 |0
+<U9A59> \x90\x84 |0
+<U9A5A> \x68\x71 |0
+<U9A5B> \x68\x72 |0
+<U9A5E> \x90\xE2 |0
+<U9A5F> \x68\x96 |0
+<U9A60> \x91\x88 |0
+<U9A62> \x68\xB6 |0
+<U9A64> \x91\xA3 |0
+<U9A65> \x68\xB7 |0
+<U9A66> \x91\xA4 |0
+<U9A67> \x91\xA5 |0
+<U9A68> \x91\xB3 |0
+<U9A69> \x91\xB2 |0
+<U9A6A> \x68\xC6 |0
+<U9A6B> \x91\xBD |0
+<U9AA8> \x48\xFC |3
+<U9AA8> \x56\x8D |0
+<U9AAB> \x7C\xF0 |0
+<U9AAD> \x7C\xEF |0
+<U9AAF> \x5F\xF1 |0
+<U9AB0> \x5F\xF2 |0
+<U9AB1> \x80\x64 |0
+<U9AB3> \x83\x9D |0
+<U9AB4> \x86\x99 |0
+<U9AB7> \x61\xFD |0
+<U9AB8> \x63\xAF |0
+<U9AB9> \x86\x97 |0
+<U9ABB> \x86\x9A |0
+<U9ABC> \x63\xB0 |0
+<U9ABE> \x88\xF0 |0
+<U9ABF> \x86\x98 |0
+<U9AC0> \x8A\xE5 |0
+<U9AC1> \x65\xF7 |0
+<U9AC2> \x8C\xAF |0
+<U9AC6> \x8D\xF4 |0
+<U9AC7> \x8D\xF2 |0
+<U9ACA> \x8D\xF3 |0
+<U9ACD> \x8E\xEF |0
+<U9ACF> \x67\xC7 |0
+<U9AD0> \x8F\xD2 |0
+<U9AD1> \x68\x76 |0
+<U9AD2> \x68\x48 |0
+<U9AD3> \x68\x74 |0
+<U9AD4> \x68\x75 |0
+<U9AD5> \x90\xE3 |0
+<U9AD6> \x68\xAE |0
+<U9AD8> \x48\xFD |3
+<U9AD8> \x56\x8E |0
+<U9ADC> \x8A\xE6 |0
+<U9ADF> \x49\x41 |3
+<U9ADF> \x72\x6D |0
+<U9AE1> \x5D\xEB |0
+<U9AE3> \x80\x65 |0
+<U9AE6> \x5F\xF3 |0
+<U9AE7> \x80\x66 |0
+<U9AEB> \x83\x9F |0
+<U9AEC> \x83\x9E |0
+<U9AED> \x63\xB2 |0
+<U9AEE> \x62\x41 |0
+<U9AEF> \x62\x42 |0
+<U9AF1> \x83\xA2 |0
+<U9AF2> \x83\xA1 |0
+<U9AF3> \x83\xA0 |0
+<U9AF6> \x86\x9B |0
+<U9AF7> \x86\x9E |0
+<U9AF9> \x86\x9D |0
+<U9AFA> \x86\x9C |0
+<U9AFB> \x63\xB1 |0
+<U9AFC> \x88\xF4 |0
+<U9AFD> \x88\xF2 |0
+<U9AFE> \x88\xF1 |0
+<U9B01> \x88\xF3 |0
+<U9B03> \x65\xF8 |0
+<U9B04> \x8A\xE8 |0
+<U9B05> \x8A\xE9 |0
+<U9B06> \x65\xF9 |0
+<U9B08> \x8A\xE7 |0
+<U9B0A> \x8C\xB1 |0
+<U9B0B> \x8C\xB0 |0
+<U9B0C> \x8C\xB3 |0
+<U9B0D> \x66\xD1 |0
+<U9B0E> \x8C\xB2 |0
+<U9B10> \x8D\xF5 |0
+<U9B11> \x8D\xF7 |0
+<U9B12> \x8D\xF6 |0
+<U9B15> \x8E\xF0 |0
+<U9B16> \x8E\xF3 |0
+<U9B17> \x8E\xF1 |0
+<U9B18> \x8E\xF2 |0
+<U9B19> \x8F\xD3 |0
+<U9B1A> \x68\x49 |0
+<U9B1E> \x90\x85 |0
+<U9B1F> \x90\x86 |0
+<U9B20> \x90\x87 |0
+<U9B22> \x68\x97 |0
+<U9B23> \x68\xAF |0
+<U9B24> \x91\xA6 |0
+<U9B25> \x49\x42 |3
+<U9B25> \x56\x8F |0
+<U9B27> \x62\x43 |0
+<U9B28> \x63\xB3 |0
+<U9B29> \x8A\xEA |0
+<U9B2B> \x8F\xD4 |0
+<U9B2E> \x91\xB4 |0
+<U9B2F> \x49\x43 |3
+<U9B2F> \x72\x6E |0
+<U9B31> \x68\xC7 |0
+<U9B32> \x49\x44 |3
+<U9B32> \x56\x90 |0
+<U9B33> \x86\x9F |0
+<U9B35> \x8A\xEB |0
+<U9B37> \x8C\xB4 |0
+<U9B3A> \x8E\xF4 |0
+<U9B3B> \x8F\xD5 |0
+<U9B3C> \x49\x45 |3
+<U9B3C> \x56\x91 |0
+<U9B3E> \x80\x67 |0
+<U9B3F> \x80\x68 |0
+<U9B41> \x5F\xF4 |0
+<U9B42> \x5F\xF5 |0
+<U9B43> \x83\xA4 |0
+<U9B44> \x62\x45 |0
+<U9B45> \x62\x44 |0
+<U9B46> \x83\xA3 |0
+<U9B48> \x88\xF5 |0
+<U9B4A> \x8A\xEC |0
+<U9B4B> \x8A\xEE |0
+<U9B4C> \x8A\xED |0
+<U9B4D> \x65\xFC |0
+<U9B4E> \x65\xFB |0
+<U9B4F> \x65\xFA |0
+<U9B51> \x67\xC9 |0
+<U9B52> \x8E\xF5 |0
+<U9B54> \x67\xC8 |0
+<U9B55> \x8F\xD7 |0
+<U9B56> \x8F\xD6 |0
+<U9B58> \x68\x98 |0
+<U9B59> \x90\xE4 |0
+<U9B5A> \x49\x46 |3
+<U9B5A> \x59\x43 |0
+<U9B5B> \x7C\xF1 |0
+<U9B5F> \x80\x6B |0
+<U9B60> \x80\x69 |0
+<U9B61> \x80\x6A |0
+<U9B64> \x83\xAD |0
+<U9B66> \x83\xA8 |0
+<U9B67> \x83\xA5 |0
+<U9B68> \x83\xAC |0
+<U9B6C> \x83\xAE |0
+<U9B6F> \x62\x47 |0
+<U9B70> \x83\xAB |0
+<U9B71> \x83\xA7 |0
+<U9B74> \x83\xA6 |0
+<U9B75> \x83\xAA |0
+<U9B76> \x83\xA9 |0
+<U9B77> \x62\x46 |0
+<U9B7A> \x86\xAA |0
+<U9B7B> \x86\xA5 |0
+<U9B7C> \x86\xA3 |0
+<U9B7D> \x86\xAC |0
+<U9B7E> \x86\xA4 |0
+<U9B80> \x86\xA0 |0
+<U9B82> \x86\xA6 |0
+<U9B85> \x86\xA1 |0
+<U9B86> \x89\x41 |0
+<U9B87> \x86\xA2 |0
+<U9B88> \x86\xAD |0
+<U9B90> \x86\xA9 |0
+<U9B91> \x63\xB4 |0
+<U9B92> \x86\xA8 |0
+<U9B93> \x86\xA7 |0
+<U9B95> \x86\xAB |0
+<U9B9A> \x88\xF6 |0
+<U9B9B> \x88\xF9 |0
+<U9B9E> \x88\xF8 |0
+<U9BA0> \x89\x43 |0
+<U9BA1> \x88\xFB |0
+<U9BA2> \x89\x42 |0
+<U9BA4> \x88\xFD |0
+<U9BA5> \x88\xFC |0
+<U9BA6> \x88\xFA |0
+<U9BA8> \x88\xF7 |0
+<U9BAA> \x65\x4E |0
+<U9BAB> \x65\x4D |0
+<U9BAD> \x65\x4F |0
+<U9BAE> \x65\x4C |0
+<U9BAF> \x89\x44 |0
+<U9BB5> \x8A\xF4 |0
+<U9BB6> \x8A\xF7 |0
+<U9BB8> \x8A\xF5 |0
+<U9BB9> \x8A\xF9 |0
+<U9BBD> \x8A\xFA |0
+<U9BBF> \x8A\xF2 |0
+<U9BC0> \x66\x44 |0
+<U9BC1> \x8A\xF3 |0
+<U9BC3> \x8A\xF1 |0
+<U9BC4> \x8A\xF8 |0
+<U9BC6> \x8A\xF0 |0
+<U9BC7> \x8A\xEF |0
+<U9BC8> \x66\x43 |0
+<U9BC9> \x66\x41 |0
+<U9BCA> \x65\xFD |0
+<U9BD3> \x8A\xF6 |0
+<U9BD4> \x8C\xBD |0
+<U9BD5> \x8C\xC3 |0
+<U9BD6> \x66\xD4 |0
+<U9BD7> \x8C\xBE |0
+<U9BD9> \x8C\xC1 |0
+<U9BDA> \x8C\xC5 |0
+<U9BDB> \x66\xD5 |0
+<U9BDC> \x8C\xC0 |0
+<U9BDE> \x8C\xB8 |0
+<U9BE0> \x8C\xB7 |0
+<U9BE1> \x8C\xC4 |0
+<U9BE2> \x8C\xBB |0
+<U9BE4> \x8C\xB9 |0
+<U9BE5> \x8C\xC2 |0
+<U9BE6> \x8C\xBA |0
+<U9BE7> \x66\xD3 |0
+<U9BE8> \x66\xD2 |0
+<U9BEA> \x8C\xB5 |0
+<U9BEB> \x8C\xB6 |0
+<U9BEC> \x8C\xBF |0
+<U9BF0> \x8C\xBC |0
+<U9BF7> \x8D\xFA |0
+<U9BF8> \x8D\xFD |0
+<U9BFD> \x66\x42 |0
+<U9C05> \x8D\xFB |0
+<U9C06> \x8E\x44 |0
+<U9C07> \x8E\x42 |0
+<U9C08> \x8D\xF9 |0
+<U9C09> \x8E\x47 |0
+<U9C0B> \x8D\xF8 |0
+<U9C0D> \x67\x7A |0
+<U9C0E> \x8E\x43 |0
+<U9C12> \x8D\xFC |0
+<U9C13> \x67\x79 |0
+<U9C14> \x8E\x46 |0
+<U9C17> \x8E\x45 |0
+<U9C1C> \x8E\xF8 |0
+<U9C1D> \x8E\xF7 |0
+<U9C21> \x8F\x41 |0
+<U9C23> \x8E\xFA |0
+<U9C24> \x8E\xFD |0
+<U9C25> \x67\xCB |0
+<U9C28> \x8E\xFB |0
+<U9C29> \x8E\xFC |0
+<U9C2B> \x8E\xF6 |0
+<U9C2C> \x8E\xF9 |0
+<U9C2D> \x67\xCA |0
+<U9C31> \x68\x4B |0
+<U9C32> \x8F\xE2 |0
+<U9C33> \x8F\xDD |0
+<U9C34> \x8F\xE1 |0
+<U9C36> \x8F\xE4 |0
+<U9C37> \x8F\xE0 |0
+<U9C39> \x8F\xDC |0
+<U9C3B> \x68\x4D |0
+<U9C3C> \x8F\xDF |0
+<U9C3D> \x8F\xE3 |0
+<U9C3E> \x68\x4C |0
+<U9C3F> \x8F\xDA |0
+<U9C40> \x8E\x41 |0
+<U9C41> \x8F\xDE |0
+<U9C44> \x8F\xDB |0
+<U9C46> \x8F\xD8 |0
+<U9C48> \x8F\xD9 |0
+<U9C49> \x68\x4A |0
+<U9C4A> \x90\x8B |0
+<U9C4B> \x90\x8D |0
+<U9C4C> \x90\x90 |0
+<U9C4D> \x90\x8C |0
+<U9C4E> \x90\x91 |0
+<U9C50> \x90\x8A |0
+<U9C52> \x90\x88 |0
+<U9C54> \x68\x77 |0
+<U9C55> \x90\x8E |0
+<U9C56> \x68\x79 |0
+<U9C57> \x68\x78 |0
+<U9C58> \x90\x89 |0
+<U9C59> \x90\x8F |0
+<U9C5E> \x90\xE9 |0
+<U9C5F> \x68\x99 |0
+<U9C60> \x90\xEA |0
+<U9C62> \x90\xE8 |0
+<U9C63> \x90\xE5 |0
+<U9C66> \x90\xE7 |0
+<U9C67> \x90\xE6 |0
+<U9C68> \x91\x6B |0
+<U9C6D> \x91\x6D |0
+<U9C6E> \x91\x6C |0
+<U9C71> \x91\x8B |0
+<U9C73> \x91\x8A |0
+<U9C74> \x91\x89 |0
+<U9C75> \x91\x8C |0
+<U9C77> \x68\xBF |0
+<U9C78> \x68\xC0 |0
+<U9C79> \x91\xBA |0
+<U9C7A> \x91\xBE |0
+<U9CE5> \x49\x47 |3
+<U9CE5> \x59\x44 |0
+<U9CE6> \x79\x75 |0
+<U9CE7> \x7C\xF4 |0
+<U9CE9> \x5D\xEC |0
+<U9CEA> \x7C\xF2 |0
+<U9CED> \x7C\xF3 |0
+<U9CF1> \x80\x6C |0
+<U9CF2> \x80\x6D |0
+<U9CF3> \x5F\xF8 |0
+<U9CF4> \x5F\xF6 |0
+<U9CF5> \x80\x6E |0
+<U9CF6> \x5F\xF7 |0
+<U9CF7> \x83\xB3 |0
+<U9CF9> \x83\xB6 |0
+<U9CFA> \x83\xB0 |0
+<U9CFB> \x83\xB7 |0
+<U9CFC> \x83\xAF |0
+<U9CFD> \x83\xB1 |0
+<U9CFF> \x83\xB2 |0
+<U9D00> \x83\xB5 |0
+<U9D03> \x62\x4A |0
+<U9D04> \x83\xBA |0
+<U9D05> \x83\xB9 |0
+<U9D06> \x62\x48 |0
+<U9D07> \x83\xB4 |0
+<U9D08> \x83\xB8 |0
+<U9D09> \x62\x49 |0
+<U9D10> \x86\xB7 |0
+<U9D12> \x63\xB9 |0
+<U9D14> \x86\xB2 |0
+<U9D15> \x63\xB5 |0
+<U9D17> \x86\xAF |0
+<U9D18> \x86\xB5 |0
+<U9D19> \x86\xB8 |0
+<U9D1B> \x63\xBA |0
+<U9D1D> \x86\xB4 |0
+<U9D1E> \x86\xB1 |0
+<U9D1F> \x86\xB9 |0
+<U9D20> \x86\xB0 |0
+<U9D22> \x86\xB6 |0
+<U9D23> \x63\xB6 |0
+<U9D25> \x86\xAE |0
+<U9D26> \x63\xB7 |0
+<U9D28> \x63\xB8 |0
+<U9D29> \x86\xB3 |0
+<U9D2D> \x89\x56 |0
+<U9D2E> \x89\x49 |0
+<U9D2F> \x89\x4A |0
+<U9D30> \x89\x4D |0
+<U9D31> \x89\x4B |0
+<U9D33> \x89\x45 |0
+<U9D36> \x89\x48 |0
+<U9D37> \x89\x52 |0
+<U9D38> \x89\x4C |0
+<U9D3B> \x65\x50 |0
+<U9D3D> \x89\x54 |0
+<U9D3E> \x89\x51 |0
+<U9D3F> \x65\x51 |0
+<U9D40> \x89\x53 |0
+<U9D41> \x89\x46 |0
+<U9D42> \x89\x4F |0
+<U9D43> \x89\x50 |0
+<U9D45> \x89\x4E |0
+<U9D4A> \x8B\x41 |0
+<U9D4B> \x8B\x43 |0
+<U9D4C> \x8B\x46 |0
+<U9D4F> \x8A\xFD |0
+<U9D51> \x66\x45 |0
+<U9D52> \x8B\x48 |0
+<U9D53> \x8A\xFC |0
+<U9D54> \x8B\x49 |0
+<U9D56> \x8B\x45 |0
+<U9D57> \x8B\x47 |0
+<U9D58> \x8B\x4B |0
+<U9D59> \x8B\x44 |0
+<U9D5A> \x8B\x4C |0
+<U9D5B> \x8B\x42 |0
+<U9D5C> \x8A\xFB |0
+<U9D5D> \x66\x46 |0
+<U9D5F> \x8B\x4A |0
+<U9D60> \x66\x47 |0
+<U9D61> \x66\xD7 |0
+<U9D67> \x89\x47 |0
+<U9D68> \x8C\xDF |0
+<U9D69> \x8C\xD6 |0
+<U9D6A> \x66\xD9 |0
+<U9D6B> \x8C\xD2 |0
+<U9D6C> \x66\xDA |0
+<U9D6F> \x8C\xDB |0
+<U9D70> \x8C\xD5 |0
+<U9D71> \x8C\xCB |0
+<U9D72> \x66\xD8 |0
+<U9D73> \x8C\xD8 |0
+<U9D74> \x8C\xD3 |0
+<U9D75> \x8C\xD4 |0
+<U9D77> \x8C\xC6 |0
+<U9D78> \x8C\xCD |0
+<U9D79> \x8C\xDC |0
+<U9D7B> \x8C\xD9 |0
+<U9D7D> \x8C\xD1 |0
+<U9D7F> \x8C\xDD |0
+<U9D80> \x8C\xCC |0
+<U9D81> \x8C\xC7 |0
+<U9D82> \x8C\xDA |0
+<U9D84> \x8C\xC9 |0
+<U9D85> \x8C\xD7 |0
+<U9D86> \x8C\xCE |0
+<U9D87> \x8C\xDE |0
+<U9D88> \x8C\xCA |0
+<U9D89> \x66\xD6 |0
+<U9D8A> \x8C\xC8 |0
+<U9D8B> \x8C\xCF |0
+<U9D8C> \x8C\xD0 |0
+<U9D90> \x8E\x4E |0
+<U9D92> \x8E\x4C |0
+<U9D94> \x8E\x51 |0
+<U9D96> \x8E\x5D |0
+<U9D97> \x8E\x54 |0
+<U9D98> \x8E\x4D |0
+<U9D99> \x8E\x49 |0
+<U9D9A> \x8E\x56 |0
+<U9D9B> \x8E\x4F |0
+<U9D9C> \x8E\x52 |0
+<U9D9D> \x8E\x4B |0
+<U9D9E> \x8E\x59 |0
+<U9D9F> \x8E\x48 |0
+<U9DA0> \x8E\x50 |0
+<U9DA1> \x8E\x55 |0
+<U9DA2> \x8E\x57 |0
+<U9DA3> \x8E\x5A |0
+<U9DA4> \x8E\x4A |0
+<U9DA6> \x8E\x5E |0
+<U9DA7> \x8E\x5F |0
+<U9DA8> \x8E\x58 |0
+<U9DA9> \x8E\x5C |0
+<U9DAA> \x8E\x53 |0
+<U9DAC> \x8F\x51 |0
+<U9DAD> \x8F\x54 |0
+<U9DAF> \x67\xCC |0
+<U9DB1> \x8F\x53 |0
+<U9DB2> \x8F\x58 |0
+<U9DB3> \x8F\x56 |0
+<U9DB4> \x67\xCD |0
+<U9DB5> \x8F\x4D |0
+<U9DB6> \x8F\x43 |0
+<U9DB7> \x8F\x42 |0
+<U9DB8> \x67\xCF |0
+<U9DB9> \x8F\x4F |0
+<U9DBA> \x8F\x50 |0
+<U9DBB> \x8F\x4C |0
+<U9DBC> \x8F\x44 |0
+<U9DBE> \x8F\x49 |0
+<U9DBF> \x8E\x5B |0
+<U9DC1> \x8F\x45 |0
+<U9DC2> \x67\xCE |0
+<U9DC3> \x8F\x4B |0
+<U9DC5> \x8F\x4A |0
+<U9DC7> \x8F\x46 |0
+<U9DC8> \x8F\x52 |0
+<U9DCA> \x8F\x47 |0
+<U9DCB> \x8F\xE9 |0
+<U9DCC> \x8F\x55 |0
+<U9DCD> \x8F\x57 |0
+<U9DCE> \x8F\x4E |0
+<U9DCF> \x8F\x48 |0
+<U9DD0> \x8F\xEA |0
+<U9DD1> \x8F\xEC |0
+<U9DD2> \x8F\xE6 |0
+<U9DD3> \x68\x4E |0
+<U9DD5> \x8F\xF3 |0
+<U9DD6> \x8F\xF1 |0
+<U9DD7> \x68\x4F |0
+<U9DD8> \x8F\xF0 |0
+<U9DD9> \x8F\xEF |0
+<U9DDA> \x8F\xE8 |0
+<U9DDB> \x8F\xE5 |0
+<U9DDC> \x8F\xEB |0
+<U9DDD> \x8F\xF4 |0
+<U9DDE> \x8F\xE7 |0
+<U9DDF> \x8F\xED |0
+<U9DE1> \x90\x9A |0
+<U9DE2> \x90\x9F |0
+<U9DE3> \x90\x95 |0
+<U9DE4> \x90\x98 |0
+<U9DE5> \x68\x7A |0
+<U9DE6> \x90\x9C |0
+<U9DE8> \x90\xA3 |0
+<U9DE9> \x8F\xEE |0
+<U9DEB> \x90\x96 |0
+<U9DEC> \x90\xA0 |0
+<U9DED> \x90\xA4 |0
+<U9DEE> \x90\x9B |0
+<U9DEF> \x90\x94 |0
+<U9DF0> \x90\x9E |0
+<U9DF2> \x90\x9D |0
+<U9DF3> \x90\xA2 |0
+<U9DF4> \x90\xA1 |0
+<U9DF5> \x8F\xF2 |0
+<U9DF6> \x90\x99 |0
+<U9DF7> \x90\x93 |0
+<U9DF8> \x90\x97 |0
+<U9DF9> \x68\x9A |0
+<U9DFA> \x68\x9B |0
+<U9DFB> \x90\x92 |0
+<U9DFD> \x90\xF5 |0
+<U9DFE> \x90\xEC |0
+<U9DFF> \x90\xF4 |0
+<U9E00> \x90\xF1 |0
+<U9E01> \x90\xF2 |0
+<U9E02> \x90\xEB |0
+<U9E03> \x90\xEE |0
+<U9E04> \x90\xF6 |0
+<U9E05> \x90\xF0 |0
+<U9E06> \x90\xEF |0
+<U9E07> \x90\xED |0
+<U9E09> \x90\xF3 |0
+<U9E0B> \x91\x6E |0
+<U9E0D> \x91\x6F |0
+<U9E0F> \x91\x71 |0
+<U9E10> \x91\x70 |0
+<U9E11> \x91\x73 |0
+<U9E12> \x91\x72 |0
+<U9E13> \x91\x8E |0
+<U9E14> \x91\x8D |0
+<U9E15> \x91\xA7 |0
+<U9E17> \x91\xA8 |0
+<U9E19> \x91\xB5 |0
+<U9E1A> \x68\xC4 |0
+<U9E1B> \x68\xC8 |0
+<U9E1D> \x91\xBF |0
+<U9E1E> \x68\xC9 |0
+<U9E75> \x49\x48 |3
+<U9E75> \x59\x45 |0
+<U9E79> \x67\x7B |0
+<U9E7A> \x8F\x59 |0
+<U9E7C> \x68\x9C |0
+<U9E7D> \x68\x9D |0
+<U9E7F> \x49\x49 |3
+<U9E7F> \x59\x46 |0
+<U9E80> \x7C\xF5 |0
+<U9E82> \x5D\xED |0
+<U9E83> \x83\xBB |0
+<U9E86> \x86\xBB |0
+<U9E87> \x86\xBC |0
+<U9E88> \x86\xBA |0
+<U9E89> \x89\x58 |0
+<U9E8A> \x89\x57 |0
+<U9E8B> \x65\x52 |0
+<U9E8C> \x8B\x4E |0
+<U9E8D> \x89\x59 |0
+<U9E8E> \x8B\x4D |0
+<U9E91> \x8C\xE1 |0
+<U9E92> \x66\xDB |0
+<U9E93> \x66\xDD |0
+<U9E94> \x8C\xE0 |0
+<U9E97> \x66\xDC |0
+<U9E99> \x8E\x60 |0
+<U9E9A> \x8E\x62 |0
+<U9E9B> \x8E\x61 |0
+<U9E9C> \x8F\x5A |0
+<U9E9D> \x67\xD0 |0
+<U9E9F> \x68\x7B |0
+<U9EA0> \x90\xF7 |0
+<U9EA1> \x91\x74 |0
+<U9EA4> \x91\xC2 |0
+<U9EA5> \x49\x4A |3
+<U9EA5> \x59\x47 |0
+<U9EA7> \x80\x6F |0
+<U9EA9> \x62\x4B |0
+<U9EAD> \x86\xBE |0
+<U9EAE> \x86\xBD |0
+<U9EB0> \x89\x5A |0
+<U9EB4> \x66\xDE |0
+<U9EB5> \x67\x7C |0
+<U9EB6> \x8F\xF5 |0
+<U9EB7> \x91\xBB |0
+<U9EBB> \x49\x4B |3
+<U9EBB> \x59\x48 |0
+<U9EBC> \x5F\xF9 |0
+<U9EBE> \x62\x4C |0
+<U9EC0> \x8C\xE2 |0
+<U9EC2> \x90\xA5 |0
+<U9EC3> \x49\x4C |3
+<U9EC3> \x5B\xA6 |0
+<U9EC8> \x89\x5B |0
+<U9ECC> \x68\xB0 |0
+<U9ECD> \x49\x4D |3
+<U9ECD> \x5B\xA7 |0
+<U9ECE> \x62\x4D |0
+<U9ECF> \x65\x53 |0
+<U9ED0> \x90\xA6 |0
+<U9ED1> \x49\x4E |3
+<U9ED1> \x5B\xA8 |0
+<U9ED3> \x83\xBC |0
+<U9ED4> \x63\xBC |0
+<U9ED5> \x86\xBF |0
+<U9ED6> \x86\xC0 |0
+<U9ED8> \x63\xBB |0
+<U9EDA> \x89\x5C |0
+<U9EDB> \x65\x57 |0
+<U9EDC> \x65\x55 |0
+<U9EDD> \x65\x56 |0
+<U9EDE> \x65\x54 |0
+<U9EDF> \x8B\x4F |0
+<U9EE0> \x66\x48 |0
+<U9EE4> \x8E\x64 |0
+<U9EE5> \x8E\x63 |0
+<U9EE6> \x8E\x66 |0
+<U9EE7> \x8E\x65 |0
+<U9EE8> \x67\x7D |0
+<U9EEB> \x8F\x5B |0
+<U9EED> \x8F\x5D |0
+<U9EEE> \x8F\x5C |0
+<U9EEF> \x67\xD1 |0
+<U9EF0> \x8F\xF6 |0
+<U9EF2> \x90\xA7 |0
+<U9EF3> \x90\xA8 |0
+<U9EF4> \x68\x7C |0
+<U9EF5> \x91\x75 |0
+<U9EF6> \x91\x8F |0
+<U9EF7> \x68\xC1 |0
+<U9EF9> \x49\x4F |3
+<U9EF9> \x79\x76 |0
+<U9EFA> \x86\xC1 |0
+<U9EFB> \x89\x5D |0
+<U9EFC> \x8C\xE3 |0
+<U9EFD> \x49\x50 |3
+<U9EFD> \x7C\xF6 |0
+<U9EFF> \x89\x5E |0
+<U9F00> \x8B\x51 |0
+<U9F01> \x8B\x50 |0
+<U9F06> \x90\xA9 |0
+<U9F07> \x68\x9E |0
+<U9F09> \x91\x76 |0
+<U9F0A> \x91\x90 |0
+<U9F0E> \x49\x51 |3
+<U9F0E> \x5D\xEE |0
+<U9F0F> \x83\xBD |0
+<U9F10> \x83\xBE |0
+<U9F12> \x86\xC2 |0
+<U9F13> \x49\x52 |3
+<U9F13> \x5D\xEF |0
+<U9F15> \x66\x49 |0
+<U9F16> \x8B\x52 |0
+<U9F18> \x8F\x5F |0
+<U9F19> \x67\xD2 |0
+<U9F1A> \x8F\x60 |0
+<U9F1B> \x8F\x5E |0
+<U9F1C> \x90\xAA |0
+<U9F1E> \x90\xF8 |0
+<U9F20> \x49\x53 |3
+<U9F20> \x5D\xF0 |0
+<U9F22> \x89\x61 |0
+<U9F23> \x89\x60 |0
+<U9F24> \x89\x5F |0
+<U9F25> \x8B\x53 |0
+<U9F28> \x8B\x57 |0
+<U9F29> \x8B\x56 |0
+<U9F2A> \x8B\x55 |0
+<U9F2B> \x8B\x54 |0
+<U9F2C> \x66\x4A |0
+<U9F2D> \x8C\xE4 |0
+<U9F2E> \x8E\x68 |0
+<U9F2F> \x67\x7E |0
+<U9F30> \x8E\x67 |0
+<U9F31> \x8F\x61 |0
+<U9F32> \x8F\xF9 |0
+<U9F33> \x8F\xF8 |0
+<U9F34> \x68\x50 |0
+<U9F35> \x8F\xF7 |0
+<U9F36> \x90\xAD |0
+<U9F37> \x90\xAC |0
+<U9F38> \x90\xAB |0
+<U9F3B> \x49\x54 |3
+<U9F3B> \x5F\xFA |0
+<U9F3D> \x86\xC3 |0
+<U9F3E> \x65\x58 |0
+<U9F40> \x8C\xE5 |0
+<U9F41> \x8C\xE6 |0
+<U9F42> \x8F\xFA |0
+<U9F43> \x90\xAE |0
+<U9F46> \x90\xF9 |0
+<U9F47> \x91\x77 |0
+<U9F48> \x91\xA9 |0
+<U9F49> \x91\xC4 |0
+<U9F4A> \x49\x55 |3
+<U9F4A> \x5F\xFB |0
+<U9F4B> \x65\x59 |0
+<U9F4C> \x8B\x58 |0
+<U9F4D> \x8C\xE7 |0
+<U9F4E> \x8F\x62 |0
+<U9F4F> \x90\xAF |0
+<U9F52> \x49\x56 |3
+<U9F52> \x62\x4F |0
+<U9F54> \x89\x62 |0
+<U9F55> \x8B\x59 |0
+<U9F56> \x8C\xE8 |0
+<U9F57> \x8C\xE9 |0
+<U9F58> \x8C\xEA |0
+<U9F59> \x8E\x6D |0
+<U9F5B> \x8E\x69 |0
+<U9F5C> \x67\xD3 |0
+<U9F5D> \x8E\x6C |0
+<U9F5E> \x8E\x6B |0
+<U9F5F> \x67\x7F |0
+<U9F60> \x8E\x6A |0
+<U9F61> \x67\x82 |0
+<U9F63> \x67\x81 |0
+<U9F64> \x8F\x64 |0
+<U9F65> \x8F\x63 |0
+<U9F66> \x67\xD4 |0
+<U9F67> \x67\xD5 |0
+<U9F6A> \x68\x52 |0
+<U9F6B> \x8F\xFB |0
+<U9F6C> \x68\x51 |0
+<U9F6E> \x90\xB2 |0
+<U9F6F> \x90\xB3 |0
+<U9F70> \x90\xB1 |0
+<U9F71> \x90\xB0 |0
+<U9F72> \x68\xA0 |0
+<U9F74> \x90\xFA |0
+<U9F75> \x90\xFB |0
+<U9F76> \x90\xFC |0
+<U9F77> \x68\x9F |0
+<U9F78> \x91\x78 |0
+<U9F79> \x91\x7B |0
+<U9F7A> \x91\x7A |0
+<U9F7B> \x91\x79 |0
+<U9F7E> \x91\xC3 |0
+<U9F8D> \x49\x57 |3
+<U9F8D> \x63\xBD |0
+<U9F90> \x66\x51 |0
+<U9F91> \x8E\x6E |0
+<U9F92> \x8F\x65 |0
+<U9F94> \x68\x53 |0
+<U9F95> \x8F\xFC |0
+<U9F98> \x91\xC5 |0
+<U9F9C> \x49\x58 |3
+<U9F9C> \x63\xBE |0
+<U9FA0> \x49\x59 |3
+<U9FA0> \x89\x63 |0
+<U9FA2> \x8F\xFD |0
+<U9FA4> \x91\x91 |0
+<UE000> \xC2\x41 |0
+<UE001> \xC2\x42 |0
+<UE002> \xC2\x43 |0
+<UE003> \xC2\x44 |0
+<UE004> \xC2\x45 |0
+<UE005> \xC2\x46 |0
+<UE006> \xC2\x47 |0
+<UE007> \xC2\x48 |0
+<UE008> \xC2\x49 |0
+<UE009> \xC2\x4A |0
+<UE00A> \xC2\x4B |0
+<UE00B> \xC2\x4C |0
+<UE00C> \xC2\x4D |0
+<UE00D> \xC2\x4E |0
+<UE00E> \xC2\x4F |0
+<UE00F> \xC2\x50 |0
+<UE010> \xC2\x51 |0
+<UE011> \xC2\x52 |0
+<UE012> \xC2\x53 |0
+<UE013> \xC2\x54 |0
+<UE014> \xC2\x55 |0
+<UE015> \xC2\x56 |0
+<UE016> \xC2\x57 |0
+<UE017> \xC2\x58 |0
+<UE018> \xC2\x59 |0
+<UE019> \xC2\x5A |0
+<UE01A> \xC2\x5B |0
+<UE01B> \xC2\x5C |0
+<UE01C> \xC2\x5D |0
+<UE01D> \xC2\x5E |0
+<UE01E> \xC2\x5F |0
+<UE01F> \xC2\x60 |0
+<UE020> \xC2\x61 |0
+<UE021> \xC2\x62 |0
+<UE022> \xC2\x63 |0
+<UE023> \xC2\x64 |0
+<UE024> \xC2\x65 |0
+<UE025> \xC2\x66 |0
+<UE026> \xC2\x67 |0
+<UE027> \xC2\x68 |0
+<UE028> \xC2\x69 |0
+<UE029> \xC2\x6A |0
+<UE02A> \xC2\x6B |0
+<UE02B> \xC2\x6C |0
+<UE02C> \xC2\x6D |0
+<UE02D> \xC2\x6E |0
+<UE02E> \xC2\x6F |0
+<UE02F> \xC2\x70 |0
+<UE030> \xC2\x71 |0
+<UE031> \xC2\x72 |0
+<UE032> \xC2\x73 |0
+<UE033> \xC2\x74 |0
+<UE034> \xC2\x75 |0
+<UE035> \xC2\x76 |0
+<UE036> \xC2\x77 |0
+<UE037> \xC2\x78 |0
+<UE038> \xC2\x79 |0
+<UE039> \xC2\x7A |0
+<UE03A> \xC2\x7B |0
+<UE03B> \xC2\x7C |0
+<UE03C> \xC2\x7D |0
+<UE03D> \xC2\x7E |0
+<UE03E> \xC2\x7F |0
+<UE03F> \xC2\x81 |0
+<UE040> \xC2\x82 |0
+<UE041> \xC2\x83 |0
+<UE042> \xC2\x84 |0
+<UE043> \xC2\x85 |0
+<UE044> \xC2\x86 |0
+<UE045> \xC2\x87 |0
+<UE046> \xC2\x88 |0
+<UE047> \xC2\x89 |0
+<UE048> \xC2\x8A |0
+<UE049> \xC2\x8B |0
+<UE04A> \xC2\x8C |0
+<UE04B> \xC2\x8D |0
+<UE04C> \xC2\x8E |0
+<UE04D> \xC2\x8F |0
+<UE04E> \xC2\x90 |0
+<UE04F> \xC2\x91 |0
+<UE050> \xC2\x92 |0
+<UE051> \xC2\x93 |0
+<UE052> \xC2\x94 |0
+<UE053> \xC2\x95 |0
+<UE054> \xC2\x96 |0
+<UE055> \xC2\x97 |0
+<UE056> \xC2\x98 |0
+<UE057> \xC2\x99 |0
+<UE058> \xC2\x9A |0
+<UE059> \xC2\x9B |0
+<UE05A> \xC2\x9C |0
+<UE05B> \xC2\x9D |0
+<UE05C> \xC2\x9E |0
+<UE05D> \xC2\x9F |0
+<UE05E> \xC2\xA0 |0
+<UE05F> \xC2\xA1 |0
+<UE060> \xC2\xA2 |0
+<UE061> \xC2\xA3 |0
+<UE062> \xC2\xA4 |0
+<UE063> \xC2\xA5 |0
+<UE064> \xC2\xA6 |0
+<UE065> \xC2\xA7 |0
+<UE066> \xC2\xA8 |0
+<UE067> \xC2\xA9 |0
+<UE068> \xC2\xAA |0
+<UE069> \xC2\xAB |0
+<UE06A> \xC2\xAC |0
+<UE06B> \xC2\xAD |0
+<UE06C> \xC2\xAE |0
+<UE06D> \xC2\xAF |0
+<UE06E> \xC2\xB0 |0
+<UE06F> \xC2\xB1 |0
+<UE070> \xC2\xB2 |0
+<UE071> \xC2\xB3 |0
+<UE072> \xC2\xB4 |0
+<UE073> \xC2\xB5 |0
+<UE074> \xC2\xB6 |0
+<UE075> \xC2\xB7 |0
+<UE076> \xC2\xB8 |0
+<UE077> \xC2\xB9 |0
+<UE078> \xC2\xBA |0
+<UE079> \xC2\xBB |0
+<UE07A> \xC2\xBC |0
+<UE07B> \xC2\xBD |0
+<UE07C> \xC2\xBE |0
+<UE07D> \xC2\xBF |0
+<UE07E> \xC2\xC0 |0
+<UE07F> \xC2\xC1 |0
+<UE080> \xC2\xC2 |0
+<UE081> \xC2\xC3 |0
+<UE082> \xC2\xC4 |0
+<UE083> \xC2\xC5 |0
+<UE084> \xC2\xC6 |0
+<UE085> \xC2\xC7 |0
+<UE086> \xC2\xC8 |0
+<UE087> \xC2\xC9 |0
+<UE088> \xC2\xCA |0
+<UE089> \xC2\xCB |0
+<UE08A> \xC2\xCC |0
+<UE08B> \xC2\xCD |0
+<UE08C> \xC2\xCE |0
+<UE08D> \xC2\xCF |0
+<UE08E> \xC2\xD0 |0
+<UE08F> \xC2\xD1 |0
+<UE090> \xC2\xD2 |0
+<UE091> \xC2\xD3 |0
+<UE092> \xC2\xD4 |0
+<UE093> \xC2\xD5 |0
+<UE094> \xC2\xD6 |0
+<UE095> \xC2\xD7 |0
+<UE096> \xC2\xD8 |0
+<UE097> \xC2\xD9 |0
+<UE098> \xC2\xDA |0
+<UE099> \xC2\xDB |0
+<UE09A> \xC2\xDC |0
+<UE09B> \xC2\xDD |0
+<UE09C> \xC2\xDE |0
+<UE09D> \xC2\xDF |0
+<UE09E> \xC2\xE0 |0
+<UE09F> \xC2\xE1 |0
+<UE0A0> \xC2\xE2 |0
+<UE0A1> \xC2\xE3 |0
+<UE0A2> \xC2\xE4 |0
+<UE0A3> \xC2\xE5 |0
+<UE0A4> \xC2\xE6 |0
+<UE0A5> \xC2\xE7 |0
+<UE0A6> \xC2\xE8 |0
+<UE0A7> \xC2\xE9 |0
+<UE0A8> \xC2\xEA |0
+<UE0A9> \xC2\xEB |0
+<UE0AA> \xC2\xEC |0
+<UE0AB> \xC2\xED |0
+<UE0AC> \xC2\xEE |0
+<UE0AD> \xC2\xEF |0
+<UE0AE> \xC2\xF0 |0
+<UE0AF> \xC2\xF1 |0
+<UE0B0> \xC2\xF2 |0
+<UE0B1> \xC2\xF3 |0
+<UE0B2> \xC2\xF4 |0
+<UE0B3> \xC2\xF5 |0
+<UE0B4> \xC2\xF6 |0
+<UE0B5> \xC2\xF7 |0
+<UE0B6> \xC2\xF8 |0
+<UE0B7> \xC2\xF9 |0
+<UE0B8> \xC2\xFA |0
+<UE0B9> \xC2\xFB |0
+<UE0BA> \xC2\xFC |0
+<UE0BB> \xC2\xFD |0
+<UE0BC> \xC3\x41 |0
+<UE0BD> \xC3\x42 |0
+<UE0BE> \xC3\x43 |0
+<UE0BF> \xC3\x44 |0
+<UE0C0> \xC3\x45 |0
+<UE0C1> \xC3\x46 |0
+<UE0C2> \xC3\x47 |0
+<UE0C3> \xC3\x48 |0
+<UE0C4> \xC3\x49 |0
+<UE0C5> \xC3\x4A |0
+<UE0C6> \xC3\x4B |0
+<UE0C7> \xC3\x4C |0
+<UE0C8> \xC3\x4D |0
+<UE0C9> \xC3\x4E |0
+<UE0CA> \xC3\x4F |0
+<UE0CB> \xC3\x50 |0
+<UE0CC> \xC3\x51 |0
+<UE0CD> \xC3\x52 |0
+<UE0CE> \xC3\x53 |0
+<UE0CF> \xC3\x54 |0
+<UE0D0> \xC3\x55 |0
+<UE0D1> \xC3\x56 |0
+<UE0D2> \xC3\x57 |0
+<UE0D3> \xC3\x58 |0
+<UE0D4> \xC3\x59 |0
+<UE0D5> \xC3\x5A |0
+<UE0D6> \xC3\x5B |0
+<UE0D7> \xC3\x5C |0
+<UE0D8> \xC3\x5D |0
+<UE0D9> \xC3\x5E |0
+<UE0DA> \xC3\x5F |0
+<UE0DB> \xC3\x60 |0
+<UE0DC> \xC3\x61 |0
+<UE0DD> \xC3\x62 |0
+<UE0DE> \xC3\x63 |0
+<UE0DF> \xC3\x64 |0
+<UE0E0> \xC3\x65 |0
+<UE0E1> \xC3\x66 |0
+<UE0E2> \xC3\x67 |0
+<UE0E3> \xC3\x68 |0
+<UE0E4> \xC3\x69 |0
+<UE0E5> \xC3\x6A |0
+<UE0E6> \xC3\x6B |0
+<UE0E7> \xC3\x6C |0
+<UE0E8> \xC3\x6D |0
+<UE0E9> \xC3\x6E |0
+<UE0EA> \xC3\x6F |0
+<UE0EB> \xC3\x70 |0
+<UE0EC> \xC3\x71 |0
+<UE0ED> \xC3\x72 |0
+<UE0EE> \xC3\x73 |0
+<UE0EF> \xC3\x74 |0
+<UE0F0> \xC3\x75 |0
+<UE0F1> \xC3\x76 |0
+<UE0F2> \xC3\x77 |0
+<UE0F3> \xC3\x78 |0
+<UE0F4> \xC3\x79 |0
+<UE0F5> \xC3\x7A |0
+<UE0F6> \xC3\x7B |0
+<UE0F7> \xC3\x7C |0
+<UE0F8> \xC3\x7D |0
+<UE0F9> \xC3\x7E |0
+<UE0FA> \xC3\x7F |0
+<UE0FB> \xC3\x81 |0
+<UE0FC> \xC3\x82 |0
+<UE0FD> \xC3\x83 |0
+<UE0FE> \xC3\x84 |0
+<UE0FF> \xC3\x85 |0
+<UE100> \xC3\x86 |0
+<UE101> \xC3\x87 |0
+<UE102> \xC3\x88 |0
+<UE103> \xC3\x89 |0
+<UE104> \xC3\x8A |0
+<UE105> \xC3\x8B |0
+<UE106> \xC3\x8C |0
+<UE107> \xC3\x8D |0
+<UE108> \xC3\x8E |0
+<UE109> \xC3\x8F |0
+<UE10A> \xC3\x90 |0
+<UE10B> \xC3\x91 |0
+<UE10C> \xC3\x92 |0
+<UE10D> \xC3\x93 |0
+<UE10E> \xC3\x94 |0
+<UE10F> \xC3\x95 |0
+<UE110> \xC3\x96 |0
+<UE111> \xC3\x97 |0
+<UE112> \xC3\x98 |0
+<UE113> \xC3\x99 |0
+<UE114> \xC3\x9A |0
+<UE115> \xC3\x9B |0
+<UE116> \xC3\x9C |0
+<UE117> \xC3\x9D |0
+<UE118> \xC3\x9E |0
+<UE119> \xC3\x9F |0
+<UE11A> \xC3\xA0 |0
+<UE11B> \xC3\xA1 |0
+<UE11C> \xC3\xA2 |0
+<UE11D> \xC3\xA3 |0
+<UE11E> \xC3\xA4 |0
+<UE11F> \xC3\xA5 |0
+<UE120> \xC3\xA6 |0
+<UE121> \xC3\xA7 |0
+<UE122> \xC3\xA8 |0
+<UE123> \xC3\xA9 |0
+<UE124> \xC3\xAA |0
+<UE125> \xC3\xAB |0
+<UE126> \xC3\xAC |0
+<UE127> \xC3\xAD |0
+<UE128> \xC3\xAE |0
+<UE129> \xC3\xAF |0
+<UE12A> \xC3\xB0 |0
+<UE12B> \xC3\xB1 |0
+<UE12C> \xC3\xB2 |0
+<UE12D> \xC3\xB3 |0
+<UE12E> \xC3\xB4 |0
+<UE12F> \xC3\xB5 |0
+<UE130> \xC3\xB6 |0
+<UE131> \xC3\xB7 |0
+<UE132> \xC3\xB8 |0
+<UE133> \xC3\xB9 |0
+<UE134> \xC3\xBA |0
+<UE135> \xC3\xBB |0
+<UE136> \xC3\xBC |0
+<UE137> \xC3\xBD |0
+<UE138> \xC3\xBE |0
+<UE139> \xC3\xBF |0
+<UE13A> \xC3\xC0 |0
+<UE13B> \xC3\xC1 |0
+<UE13C> \xC3\xC2 |0
+<UE13D> \xC3\xC3 |0
+<UE13E> \xC3\xC4 |0
+<UE13F> \xC3\xC5 |0
+<UE140> \xC3\xC6 |0
+<UE141> \xC3\xC7 |0
+<UE142> \xC3\xC8 |0
+<UE143> \xC3\xC9 |0
+<UE144> \xC3\xCA |0
+<UE145> \xC3\xCB |0
+<UE146> \xC3\xCC |0
+<UE147> \xC3\xCD |0
+<UE148> \xC3\xCE |0
+<UE149> \xC3\xCF |0
+<UE14A> \xC3\xD0 |0
+<UE14B> \xC3\xD1 |0
+<UE14C> \xC3\xD2 |0
+<UE14D> \xC3\xD3 |0
+<UE14E> \xC3\xD4 |0
+<UE14F> \xC3\xD5 |0
+<UE150> \xC3\xD6 |0
+<UE151> \xC3\xD7 |0
+<UE152> \xC3\xD8 |0
+<UE153> \xC3\xD9 |0
+<UE154> \xC3\xDA |0
+<UE155> \xC3\xDB |0
+<UE156> \xC3\xDC |0
+<UE157> \xC3\xDD |0
+<UE158> \xC3\xDE |0
+<UE159> \xC3\xDF |0
+<UE15A> \xC3\xE0 |0
+<UE15B> \xC3\xE1 |0
+<UE15C> \xC3\xE2 |0
+<UE15D> \xC3\xE3 |0
+<UE15E> \xC3\xE4 |0
+<UE15F> \xC3\xE5 |0
+<UE160> \xC3\xE6 |0
+<UE161> \xC3\xE7 |0
+<UE162> \xC3\xE8 |0
+<UE163> \xC3\xE9 |0
+<UE164> \xC3\xEA |0
+<UE165> \xC3\xEB |0
+<UE166> \xC3\xEC |0
+<UE167> \xC3\xED |0
+<UE168> \xC3\xEE |0
+<UE169> \xC3\xEF |0
+<UE16A> \xC3\xF0 |0
+<UE16B> \xC3\xF1 |0
+<UE16C> \xC3\xF2 |0
+<UE16D> \xC3\xF3 |0
+<UE16E> \xC3\xF4 |0
+<UE16F> \xC3\xF5 |0
+<UE170> \xC3\xF6 |0
+<UE171> \xC3\xF7 |0
+<UE172> \xC3\xF8 |0
+<UE173> \xC3\xF9 |0
+<UE174> \xC3\xFA |0
+<UE175> \xC3\xFB |0
+<UE176> \xC3\xFC |0
+<UE177> \xC3\xFD |0
+<UE178> \xC4\x41 |0
+<UE179> \xC4\x42 |0
+<UE17A> \xC4\x43 |0
+<UE17B> \xC4\x44 |0
+<UE17C> \xC4\x45 |0
+<UE17D> \xC4\x46 |0
+<UE17E> \xC4\x47 |0
+<UE17F> \xC4\x48 |0
+<UE180> \xC4\x49 |0
+<UE181> \xC4\x4A |0
+<UE182> \xC4\x4B |0
+<UE183> \xC4\x4C |0
+<UE184> \xC4\x4D |0
+<UE185> \xC4\x4E |0
+<UE186> \xC4\x4F |0
+<UE187> \xC4\x50 |0
+<UE188> \xC4\x51 |0
+<UE189> \xC4\x52 |0
+<UE18A> \xC4\x53 |0
+<UE18B> \xC4\x54 |0
+<UE18C> \xC4\x55 |0
+<UE18D> \xC4\x56 |0
+<UE18E> \xC4\x57 |0
+<UE18F> \xC4\x58 |0
+<UE190> \xC4\x59 |0
+<UE191> \xC4\x5A |0
+<UE192> \xC4\x5B |0
+<UE193> \xC4\x5C |0
+<UE194> \xC4\x5D |0
+<UE195> \xC4\x5E |0
+<UE196> \xC4\x5F |0
+<UE197> \xC4\x60 |0
+<UE198> \xC4\x61 |0
+<UE199> \xC4\x62 |0
+<UE19A> \xC4\x63 |0
+<UE19B> \xC4\x64 |0
+<UE19C> \xC4\x65 |0
+<UE19D> \xC4\x66 |0
+<UE19E> \xC4\x67 |0
+<UE19F> \xC4\x68 |0
+<UE1A0> \xC4\x69 |0
+<UE1A1> \xC4\x6A |0
+<UE1A2> \xC4\x6B |0
+<UE1A3> \xC4\x6C |0
+<UE1A4> \xC4\x6D |0
+<UE1A5> \xC4\x6E |0
+<UE1A6> \xC4\x6F |0
+<UE1A7> \xC4\x70 |0
+<UE1A8> \xC4\x71 |0
+<UE1A9> \xC4\x72 |0
+<UE1AA> \xC4\x73 |0
+<UE1AB> \xC4\x74 |0
+<UE1AC> \xC4\x75 |0
+<UE1AD> \xC4\x76 |0
+<UE1AE> \xC4\x77 |0
+<UE1AF> \xC4\x78 |0
+<UE1B0> \xC4\x79 |0
+<UE1B1> \xC4\x7A |0
+<UE1B2> \xC4\x7B |0
+<UE1B3> \xC4\x7C |0
+<UE1B4> \xC4\x7D |0
+<UE1B5> \xC4\x7E |0
+<UE1B6> \xC4\x7F |0
+<UE1B7> \xC4\x81 |0
+<UE1B8> \xC4\x82 |0
+<UE1B9> \xC4\x83 |0
+<UE1BA> \xC4\x84 |0
+<UE1BB> \xC4\x85 |0
+<UE1BC> \xC4\x86 |0
+<UE1BD> \xC4\x87 |0
+<UE1BE> \xC4\x88 |0
+<UE1BF> \xC4\x89 |0
+<UE1C0> \xC4\x8A |0
+<UE1C1> \xC4\x8B |0
+<UE1C2> \xC4\x8C |0
+<UE1C3> \xC4\x8D |0
+<UE1C4> \xC4\x8E |0
+<UE1C5> \xC4\x8F |0
+<UE1C6> \xC4\x90 |0
+<UE1C7> \xC4\x91 |0
+<UE1C8> \xC4\x92 |0
+<UE1C9> \xC4\x93 |0
+<UE1CA> \xC4\x94 |0
+<UE1CB> \xC4\x95 |0
+<UE1CC> \xC4\x96 |0
+<UE1CD> \xC4\x97 |0
+<UE1CE> \xC4\x98 |0
+<UE1CF> \xC4\x99 |0
+<UE1D0> \xC4\x9A |0
+<UE1D1> \xC4\x9B |0
+<UE1D2> \xC4\x9C |0
+<UE1D3> \xC4\x9D |0
+<UE1D4> \xC4\x9E |0
+<UE1D5> \xC4\x9F |0
+<UE1D6> \xC4\xA0 |0
+<UE1D7> \xC4\xA1 |0
+<UE1D8> \xC4\xA2 |0
+<UE1D9> \xC4\xA3 |0
+<UE1DA> \xC4\xA4 |0
+<UE1DB> \xC4\xA5 |0
+<UE1DC> \xC4\xA6 |0
+<UE1DD> \xC4\xA7 |0
+<UE1DE> \xC4\xA8 |0
+<UE1DF> \xC4\xA9 |0
+<UE1E0> \xC4\xAA |0
+<UE1E1> \xC4\xAB |0
+<UE1E2> \xC4\xAC |0
+<UE1E3> \xC4\xAD |0
+<UE1E4> \xC4\xAE |0
+<UE1E5> \xC4\xAF |0
+<UE1E6> \xC4\xB0 |0
+<UE1E7> \xC4\xB1 |0
+<UE1E8> \xC4\xB2 |0
+<UE1E9> \xC4\xB3 |0
+<UE1EA> \xC4\xB4 |0
+<UE1EB> \xC4\xB5 |0
+<UE1EC> \xC4\xB6 |0
+<UE1ED> \xC4\xB7 |0
+<UE1EE> \xC4\xB8 |0
+<UE1EF> \xC4\xB9 |0
+<UE1F0> \xC4\xBA |0
+<UE1F1> \xC4\xBB |0
+<UE1F2> \xC4\xBC |0
+<UE1F3> \xC4\xBD |0
+<UE1F4> \xC4\xBE |0
+<UE1F5> \xC4\xBF |0
+<UE1F6> \xC4\xC0 |0
+<UE1F7> \xC4\xC1 |0
+<UE1F8> \xC4\xC2 |0
+<UE1F9> \xC4\xC3 |0
+<UE1FA> \xC4\xC4 |0
+<UE1FB> \xC4\xC5 |0
+<UE1FC> \xC4\xC6 |0
+<UE1FD> \xC4\xC7 |0
+<UE1FE> \xC4\xC8 |0
+<UE1FF> \xC4\xC9 |0
+<UE200> \xC4\xCA |0
+<UE201> \xC4\xCB |0
+<UE202> \xC4\xCC |0
+<UE203> \xC4\xCD |0
+<UE204> \xC4\xCE |0
+<UE205> \xC4\xCF |0
+<UE206> \xC4\xD0 |0
+<UE207> \xC4\xD1 |0
+<UE208> \xC4\xD2 |0
+<UE209> \xC4\xD3 |0
+<UE20A> \xC4\xD4 |0
+<UE20B> \xC4\xD5 |0
+<UE20C> \xC4\xD6 |0
+<UE20D> \xC4\xD7 |0
+<UE20E> \xC4\xD8 |0
+<UE20F> \xC4\xD9 |0
+<UE210> \xC4\xDA |0
+<UE211> \xC4\xDB |0
+<UE212> \xC4\xDC |0
+<UE213> \xC4\xDD |0
+<UE214> \xC4\xDE |0
+<UE215> \xC4\xDF |0
+<UE216> \xC4\xE0 |0
+<UE217> \xC4\xE1 |0
+<UE218> \xC4\xE2 |0
+<UE219> \xC4\xE3 |0
+<UE21A> \xC4\xE4 |0
+<UE21B> \xC4\xE5 |0
+<UE21C> \xC4\xE6 |0
+<UE21D> \xC4\xE7 |0
+<UE21E> \xC4\xE8 |0
+<UE21F> \xC4\xE9 |0
+<UE220> \xC4\xEA |0
+<UE221> \xC4\xEB |0
+<UE222> \xC4\xEC |0
+<UE223> \xC4\xED |0
+<UE224> \xC4\xEE |0
+<UE225> \xC4\xEF |0
+<UE226> \xC4\xF0 |0
+<UE227> \xC4\xF1 |0
+<UE228> \xC4\xF2 |0
+<UE229> \xC4\xF3 |0
+<UE22A> \xC4\xF4 |0
+<UE22B> \xC4\xF5 |0
+<UE22C> \xC4\xF6 |0
+<UE22D> \xC4\xF7 |0
+<UE22E> \xC4\xF8 |0
+<UE22F> \xC4\xF9 |0
+<UE230> \xC4\xFA |0
+<UE231> \xC4\xFB |0
+<UE232> \xC4\xFC |0
+<UE233> \xC4\xFD |0
+<UE234> \xC5\x41 |0
+<UE235> \xC5\x42 |0
+<UE236> \xC5\x43 |0
+<UE237> \xC5\x44 |0
+<UE238> \xC5\x45 |0
+<UE239> \xC5\x46 |0
+<UE23A> \xC5\x47 |0
+<UE23B> \xC5\x48 |0
+<UE23C> \xC5\x49 |0
+<UE23D> \xC5\x4A |0
+<UE23E> \xC5\x4B |0
+<UE23F> \xC5\x4C |0
+<UE240> \xC5\x4D |0
+<UE241> \xC5\x4E |0
+<UE242> \xC5\x4F |0
+<UE243> \xC5\x50 |0
+<UE244> \xC5\x51 |0
+<UE245> \xC5\x52 |0
+<UE246> \xC5\x53 |0
+<UE247> \xC5\x54 |0
+<UE248> \xC5\x55 |0
+<UE249> \xC5\x56 |0
+<UE24A> \xC5\x57 |0
+<UE24B> \xC5\x58 |0
+<UE24C> \xC5\x59 |0
+<UE24D> \xC5\x5A |0
+<UE24E> \xC5\x5B |0
+<UE24F> \xC5\x5C |0
+<UE250> \xC5\x5D |0
+<UE251> \xC5\x5E |0
+<UE252> \xC5\x5F |0
+<UE253> \xC5\x60 |0
+<UE254> \xC5\x61 |0
+<UE255> \xC5\x62 |0
+<UE256> \xC5\x63 |0
+<UE257> \xC5\x64 |0
+<UE258> \xC5\x65 |0
+<UE259> \xC5\x66 |0
+<UE25A> \xC5\x67 |0
+<UE25B> \xC5\x68 |0
+<UE25C> \xC5\x69 |0
+<UE25D> \xC5\x6A |0
+<UE25E> \xC5\x6B |0
+<UE25F> \xC5\x6C |0
+<UE260> \xC5\x6D |0
+<UE261> \xC5\x6E |0
+<UE262> \xC5\x6F |0
+<UE263> \xC5\x70 |0
+<UE264> \xC5\x71 |0
+<UE265> \xC5\x72 |0
+<UE266> \xC5\x73 |0
+<UE267> \xC5\x74 |0
+<UE268> \xC5\x75 |0
+<UE269> \xC5\x76 |0
+<UE26A> \xC5\x77 |0
+<UE26B> \xC5\x78 |0
+<UE26C> \xC5\x79 |0
+<UE26D> \xC5\x7A |0
+<UE26E> \xC5\x7B |0
+<UE26F> \xC5\x7C |0
+<UE270> \xC5\x7D |0
+<UE271> \xC5\x7E |0
+<UE272> \xC5\x7F |0
+<UE273> \xC5\x81 |0
+<UE274> \xC5\x82 |0
+<UE275> \xC5\x83 |0
+<UE276> \xC5\x84 |0
+<UE277> \xC5\x85 |0
+<UE278> \xC5\x86 |0
+<UE279> \xC5\x87 |0
+<UE27A> \xC5\x88 |0
+<UE27B> \xC5\x89 |0
+<UE27C> \xC5\x8A |0
+<UE27D> \xC5\x8B |0
+<UE27E> \xC5\x8C |0
+<UE27F> \xC5\x8D |0
+<UE280> \xC5\x8E |0
+<UE281> \xC5\x8F |0
+<UE282> \xC5\x90 |0
+<UE283> \xC5\x91 |0
+<UE284> \xC5\x92 |0
+<UE285> \xC5\x93 |0
+<UE286> \xC5\x94 |0
+<UE287> \xC5\x95 |0
+<UE288> \xC5\x96 |0
+<UE289> \xC5\x97 |0
+<UE28A> \xC5\x98 |0
+<UE28B> \xC5\x99 |0
+<UE28C> \xC5\x9A |0
+<UE28D> \xC5\x9B |0
+<UE28E> \xC5\x9C |0
+<UE28F> \xC5\x9D |0
+<UE290> \xC5\x9E |0
+<UE291> \xC5\x9F |0
+<UE292> \xC5\xA0 |0
+<UE293> \xC5\xA1 |0
+<UE294> \xC5\xA2 |0
+<UE295> \xC5\xA3 |0
+<UE296> \xC5\xA4 |0
+<UE297> \xC5\xA5 |0
+<UE298> \xC5\xA6 |0
+<UE299> \xC5\xA7 |0
+<UE29A> \xC5\xA8 |0
+<UE29B> \xC5\xA9 |0
+<UE29C> \xC5\xAA |0
+<UE29D> \xC5\xAB |0
+<UE29E> \xC5\xAC |0
+<UE29F> \xC5\xAD |0
+<UE2A0> \xC5\xAE |0
+<UE2A1> \xC5\xAF |0
+<UE2A2> \xC5\xB0 |0
+<UE2A3> \xC5\xB1 |0
+<UE2A4> \xC5\xB2 |0
+<UE2A5> \xC5\xB3 |0
+<UE2A6> \xC5\xB4 |0
+<UE2A7> \xC5\xB5 |0
+<UE2A8> \xC5\xB6 |0
+<UE2A9> \xC5\xB7 |0
+<UE2AA> \xC5\xB8 |0
+<UE2AB> \xC5\xB9 |0
+<UE2AC> \xC5\xBA |0
+<UE2AD> \xC5\xBB |0
+<UE2AE> \xC5\xBC |0
+<UE2AF> \xC5\xBD |0
+<UE2B0> \xC5\xBE |0
+<UE2B1> \xC5\xBF |0
+<UE2B2> \xC5\xC0 |0
+<UE2B3> \xC5\xC1 |0
+<UE2B4> \xC5\xC2 |0
+<UE2B5> \xC5\xC3 |0
+<UE2B6> \xC5\xC4 |0
+<UE2B7> \xC5\xC5 |0
+<UE2B8> \xC5\xC6 |0
+<UE2B9> \xC5\xC7 |0
+<UE2BA> \xC5\xC8 |0
+<UE2BB> \xC5\xC9 |0
+<UE2BC> \xC5\xCA |0
+<UE2BD> \xC5\xCB |0
+<UE2BE> \xC5\xCC |0
+<UE2BF> \xC5\xCD |0
+<UE2C0> \xC5\xCE |0
+<UE2C1> \xC5\xCF |0
+<UE2C2> \xC5\xD0 |0
+<UE2C3> \xC5\xD1 |0
+<UE2C4> \xC5\xD2 |0
+<UE2C5> \xC5\xD3 |0
+<UE2C6> \xC5\xD4 |0
+<UE2C7> \xC5\xD5 |0
+<UE2C8> \xC5\xD6 |0
+<UE2C9> \xC5\xD7 |0
+<UE2CA> \xC5\xD8 |0
+<UE2CB> \xC5\xD9 |0
+<UE2CC> \xC5\xDA |0
+<UE2CD> \xC5\xDB |0
+<UE2CE> \xC5\xDC |0
+<UE2CF> \xC5\xDD |0
+<UE2D0> \xC5\xDE |0
+<UE2D1> \xC5\xDF |0
+<UE2D2> \xC5\xE0 |0
+<UE2D3> \xC5\xE1 |0
+<UE2D4> \xC5\xE2 |0
+<UE2D5> \xC5\xE3 |0
+<UE2D6> \xC5\xE4 |0
+<UE2D7> \xC5\xE5 |0
+<UE2D8> \xC5\xE6 |0
+<UE2D9> \xC5\xE7 |0
+<UE2DA> \xC5\xE8 |0
+<UE2DB> \xC5\xE9 |0
+<UE2DC> \xC5\xEA |0
+<UE2DD> \xC5\xEB |0
+<UE2DE> \xC5\xEC |0
+<UE2DF> \xC5\xED |0
+<UE2E0> \xC5\xEE |0
+<UE2E1> \xC5\xEF |0
+<UE2E2> \xC5\xF0 |0
+<UE2E3> \xC5\xF1 |0
+<UE2E4> \xC5\xF2 |0
+<UE2E5> \xC5\xF3 |0
+<UE2E6> \xC5\xF4 |0
+<UE2E7> \xC5\xF5 |0
+<UE2E8> \xC5\xF6 |0
+<UE2E9> \xC5\xF7 |0
+<UE2EA> \xC5\xF8 |0
+<UE2EB> \xC5\xF9 |0
+<UE2EC> \xC5\xFA |0
+<UE2ED> \xC5\xFB |0
+<UE2EE> \xC5\xFC |0
+<UE2EF> \xC5\xFD |0
+<UE2F0> \xC6\x41 |0
+<UE2F1> \xC6\x42 |0
+<UE2F2> \xC6\x43 |0
+<UE2F3> \xC6\x44 |0
+<UE2F4> \xC6\x45 |0
+<UE2F5> \xC6\x46 |0
+<UE2F6> \xC6\x47 |0
+<UE2F7> \xC6\x48 |0
+<UE2F8> \xC6\x49 |0
+<UE2F9> \xC6\x4A |0
+<UE2FA> \xC6\x4B |0
+<UE2FB> \xC6\x4C |0
+<UE2FC> \xC6\x4D |0
+<UE2FD> \xC6\x4E |0
+<UE2FE> \xC6\x4F |0
+<UE2FF> \xC6\x50 |0
+<UE300> \xC6\x51 |0
+<UE301> \xC6\x52 |0
+<UE302> \xC6\x53 |0
+<UE303> \xC6\x54 |0
+<UE304> \xC6\x55 |0
+<UE305> \xC6\x56 |0
+<UE306> \xC6\x57 |0
+<UE307> \xC6\x58 |0
+<UE308> \xC6\x59 |0
+<UE309> \xC6\x5A |0
+<UE30A> \xC6\x5B |0
+<UE30B> \xC6\x5C |0
+<UE30C> \xC6\x5D |0
+<UE30D> \xC6\x5E |0
+<UE30E> \xC6\x5F |0
+<UE30F> \xC6\x60 |0
+<UE310> \xC6\x61 |0
+<UE311> \xC6\x62 |0
+<UE312> \xC6\x63 |0
+<UE313> \xC6\x64 |0
+<UE314> \xC6\x65 |0
+<UE315> \xC6\x66 |0
+<UE316> \xC6\x67 |0
+<UE317> \xC6\x68 |0
+<UE318> \xC6\x69 |0
+<UE319> \xC6\x6A |0
+<UE31A> \xC6\x6B |0
+<UE31B> \xC6\x6C |0
+<UE31C> \xC6\x6D |0
+<UE31D> \xC6\x6E |0
+<UE31E> \xC6\x6F |0
+<UE31F> \xC6\x70 |0
+<UE320> \xC6\x71 |0
+<UE321> \xC6\x72 |0
+<UE322> \xC6\x73 |0
+<UE323> \xC6\x74 |0
+<UE324> \xC6\x75 |0
+<UE325> \xC6\x76 |0
+<UE326> \xC6\x77 |0
+<UE327> \xC6\x78 |0
+<UE328> \xC6\x79 |0
+<UE329> \xC6\x7A |0
+<UE32A> \xC6\x7B |0
+<UE32B> \xC6\x7C |0
+<UE32C> \xC6\x7D |0
+<UE32D> \xC6\x7E |0
+<UE32E> \xC6\x7F |0
+<UE32F> \xC6\x81 |0
+<UE330> \xC6\x82 |0
+<UE331> \xC6\x83 |0
+<UE332> \xC6\x84 |0
+<UE333> \xC6\x85 |0
+<UE334> \xC6\x86 |0
+<UE335> \xC6\x87 |0
+<UE336> \xC6\x88 |0
+<UE337> \xC6\x89 |0
+<UE338> \xC6\x8A |0
+<UE339> \xC6\x8B |0
+<UE33A> \xC6\x8C |0
+<UE33B> \xC6\x8D |0
+<UE33C> \xC6\x8E |0
+<UE33D> \xC6\x8F |0
+<UE33E> \xC6\x90 |0
+<UE33F> \xC6\x91 |0
+<UE340> \xC6\x92 |0
+<UE341> \xC6\x93 |0
+<UE342> \xC6\x94 |0
+<UE343> \xC6\x95 |0
+<UE344> \xC6\x96 |0
+<UE345> \xC6\x97 |0
+<UE346> \xC6\x98 |0
+<UE347> \xC6\x99 |0
+<UE348> \xC6\x9A |0
+<UE349> \xC6\x9B |0
+<UE34A> \xC6\x9C |0
+<UE34B> \xC6\x9D |0
+<UE34C> \xC6\x9E |0
+<UE34D> \xC6\x9F |0
+<UE34E> \xC6\xA0 |0
+<UE34F> \xC6\xA1 |0
+<UE350> \xC6\xA2 |0
+<UE351> \xC6\xA3 |0
+<UE352> \xC6\xA4 |0
+<UE353> \xC6\xA5 |0
+<UE354> \xC6\xA6 |0
+<UE355> \xC6\xA7 |0
+<UE356> \xC6\xA8 |0
+<UE357> \xC6\xA9 |0
+<UE358> \xC6\xAA |0
+<UE359> \xC6\xAB |0
+<UE35A> \xC6\xAC |0
+<UE35B> \xC6\xAD |0
+<UE35C> \xC6\xAE |0
+<UE35D> \xC6\xAF |0
+<UE35E> \xC6\xB0 |0
+<UE35F> \xC6\xB1 |0
+<UE360> \xC6\xB2 |0
+<UE361> \xC6\xB3 |0
+<UE362> \xC6\xB4 |0
+<UE363> \xC6\xB5 |0
+<UE364> \xC6\xB6 |0
+<UE365> \xC6\xB7 |0
+<UE366> \xC6\xB8 |0
+<UE367> \xC6\xB9 |0
+<UE368> \xC6\xBA |0
+<UE369> \xC6\xBB |0
+<UE36A> \xC6\xBC |0
+<UE36B> \xC6\xBD |0
+<UE36C> \xC6\xBE |0
+<UE36D> \xC6\xBF |0
+<UE36E> \xC6\xC0 |0
+<UE36F> \xC6\xC1 |0
+<UE370> \xC6\xC2 |0
+<UE371> \xC6\xC3 |0
+<UE372> \xC6\xC4 |0
+<UE373> \xC6\xC5 |0
+<UE374> \xC6\xC6 |0
+<UE375> \xC6\xC7 |0
+<UE376> \xC6\xC8 |0
+<UE377> \xC6\xC9 |0
+<UE378> \xC6\xCA |0
+<UE379> \xC6\xCB |0
+<UE37A> \xC6\xCC |0
+<UE37B> \xC6\xCD |0
+<UE37C> \xC6\xCE |0
+<UE37D> \xC6\xCF |0
+<UE37E> \xC6\xD0 |0
+<UE37F> \xC6\xD1 |0
+<UE380> \xC6\xD2 |0
+<UE381> \xC6\xD3 |0
+<UE382> \xC6\xD4 |0
+<UE383> \xC6\xD5 |0
+<UE384> \xC6\xD6 |0
+<UE385> \xC6\xD7 |0
+<UE386> \xC6\xD8 |0
+<UE387> \xC6\xD9 |0
+<UE388> \xC6\xDA |0
+<UE389> \xC6\xDB |0
+<UE38A> \xC6\xDC |0
+<UE38B> \xC6\xDD |0
+<UE38C> \xC6\xDE |0
+<UE38D> \xC6\xDF |0
+<UE38E> \xC6\xE0 |0
+<UE38F> \xC6\xE1 |0
+<UE390> \xC6\xE2 |0
+<UE391> \xC6\xE3 |0
+<UE392> \xC6\xE4 |0
+<UE393> \xC6\xE5 |0
+<UE394> \xC6\xE6 |0
+<UE395> \xC6\xE7 |0
+<UE396> \xC6\xE8 |0
+<UE397> \xC6\xE9 |0
+<UE398> \xC6\xEA |0
+<UE399> \xC6\xEB |0
+<UE39A> \xC6\xEC |0
+<UE39B> \xC6\xED |0
+<UE39C> \xC6\xEE |0
+<UE39D> \xC6\xEF |0
+<UE39E> \xC6\xF0 |0
+<UE39F> \xC6\xF1 |0
+<UE3A0> \xC6\xF2 |0
+<UE3A1> \xC6\xF3 |0
+<UE3A2> \xC6\xF4 |0
+<UE3A3> \xC6\xF5 |0
+<UE3A4> \xC6\xF6 |0
+<UE3A5> \xC6\xF7 |0
+<UE3A6> \xC6\xF8 |0
+<UE3A7> \xC6\xF9 |0
+<UE3A8> \xC6\xFA |0
+<UE3A9> \xC6\xFB |0
+<UE3AA> \xC6\xFC |0
+<UE3AB> \xC6\xFD |0
+<UE3AC> \xC7\x41 |0
+<UE3AD> \xC7\x42 |0
+<UE3AE> \xC7\x43 |0
+<UE3AF> \xC7\x44 |0
+<UE3B0> \xC7\x45 |0
+<UE3B1> \xC7\x46 |0
+<UE3B2> \xC7\x47 |0
+<UE3B3> \xC7\x48 |0
+<UE3B4> \xC7\x49 |0
+<UE3B5> \xC7\x4A |0
+<UE3B6> \xC7\x4B |0
+<UE3B7> \xC7\x4C |0
+<UE3B8> \xC7\x4D |0
+<UE3B9> \xC7\x4E |0
+<UE3BA> \xC7\x4F |0
+<UE3BB> \xC7\x50 |0
+<UE3BC> \xC7\x51 |0
+<UE3BD> \xC7\x52 |0
+<UE3BE> \xC7\x53 |0
+<UE3BF> \xC7\x54 |0
+<UE3C0> \xC7\x55 |0
+<UE3C1> \xC7\x56 |0
+<UE3C2> \xC7\x57 |0
+<UE3C3> \xC7\x58 |0
+<UE3C4> \xC7\x59 |0
+<UE3C5> \xC7\x5A |0
+<UE3C6> \xC7\x5B |0
+<UE3C7> \xC7\x5C |0
+<UE3C8> \xC7\x5D |0
+<UE3C9> \xC7\x5E |0
+<UE3CA> \xC7\x5F |0
+<UE3CB> \xC7\x60 |0
+<UE3CC> \xC7\x61 |0
+<UE3CD> \xC7\x62 |0
+<UE3CE> \xC7\x63 |0
+<UE3CF> \xC7\x64 |0
+<UE3D0> \xC7\x65 |0
+<UE3D1> \xC7\x66 |0
+<UE3D2> \xC7\x67 |0
+<UE3D3> \xC7\x68 |0
+<UE3D4> \xC7\x69 |0
+<UE3D5> \xC7\x6A |0
+<UE3D6> \xC7\x6B |0
+<UE3D7> \xC7\x6C |0
+<UE3D8> \xC7\x6D |0
+<UE3D9> \xC7\x6E |0
+<UE3DA> \xC7\x6F |0
+<UE3DB> \xC7\x70 |0
+<UE3DC> \xC7\x71 |0
+<UE3DD> \xC7\x72 |0
+<UE3DE> \xC7\x73 |0
+<UE3DF> \xC7\x74 |0
+<UE3E0> \xC7\x75 |0
+<UE3E1> \xC7\x76 |0
+<UE3E2> \xC7\x77 |0
+<UE3E3> \xC7\x78 |0
+<UE3E4> \xC7\x79 |0
+<UE3E5> \xC7\x7A |0
+<UE3E6> \xC7\x7B |0
+<UE3E7> \xC7\x7C |0
+<UE3E8> \xC7\x7D |0
+<UE3E9> \xC7\x7E |0
+<UE3EA> \xC7\x7F |0
+<UE3EB> \xC7\x81 |0
+<UE3EC> \xC7\x82 |0
+<UE3ED> \xC7\x83 |0
+<UE3EE> \xC7\x84 |0
+<UE3EF> \xC7\x85 |0
+<UE3F0> \xC7\x86 |0
+<UE3F1> \xC7\x87 |0
+<UE3F2> \xC7\x88 |0
+<UE3F3> \xC7\x89 |0
+<UE3F4> \xC7\x8A |0
+<UE3F5> \xC7\x8B |0
+<UE3F6> \xC7\x8C |0
+<UE3F7> \xC7\x8D |0
+<UE3F8> \xC7\x8E |0
+<UE3F9> \xC7\x8F |0
+<UE3FA> \xC7\x90 |0
+<UE3FB> \xC7\x91 |0
+<UE3FC> \xC7\x92 |0
+<UE3FD> \xC7\x93 |0
+<UE3FE> \xC7\x94 |0
+<UE3FF> \xC7\x95 |0
+<UE400> \xC7\x96 |0
+<UE401> \xC7\x97 |0
+<UE402> \xC7\x98 |0
+<UE403> \xC7\x99 |0
+<UE404> \xC7\x9A |0
+<UE405> \xC7\x9B |0
+<UE406> \xC7\x9C |0
+<UE407> \xC7\x9D |0
+<UE408> \xC7\x9E |0
+<UE409> \xC7\x9F |0
+<UE40A> \xC7\xA0 |0
+<UE40B> \xC7\xA1 |0
+<UE40C> \xC7\xA2 |0
+<UE40D> \xC7\xA3 |0
+<UE40E> \xC7\xA4 |0
+<UE40F> \xC7\xA5 |0
+<UE410> \xC7\xA6 |0
+<UE411> \xC7\xA7 |0
+<UE412> \xC7\xA8 |0
+<UE413> \xC7\xA9 |0
+<UE414> \xC7\xAA |0
+<UE415> \xC7\xAB |0
+<UE416> \xC7\xAC |0
+<UE417> \xC7\xAD |0
+<UE418> \xC7\xAE |0
+<UE419> \xC7\xAF |0
+<UE41A> \xC7\xB0 |0
+<UE41B> \xC7\xB1 |0
+<UE41C> \xC7\xB2 |0
+<UE41D> \xC7\xB3 |0
+<UE41E> \xC7\xB4 |0
+<UE41F> \xC7\xB5 |0
+<UE420> \xC7\xB6 |0
+<UE421> \xC7\xB7 |0
+<UE422> \xC7\xB8 |0
+<UE423> \xC7\xB9 |0
+<UE424> \xC7\xBA |0
+<UE425> \xC7\xBB |0
+<UE426> \xC7\xBC |0
+<UE427> \xC7\xBD |0
+<UE428> \xC7\xBE |0
+<UE429> \xC7\xBF |0
+<UE42A> \xC7\xC0 |0
+<UE42B> \xC7\xC1 |0
+<UE42C> \xC7\xC2 |0
+<UE42D> \xC7\xC3 |0
+<UE42E> \xC7\xC4 |0
+<UE42F> \xC7\xC5 |0
+<UE430> \xC7\xC6 |0
+<UE431> \xC7\xC7 |0
+<UE432> \xC7\xC8 |0
+<UE433> \xC7\xC9 |0
+<UE434> \xC7\xCA |0
+<UE435> \xC7\xCB |0
+<UE436> \xC7\xCC |0
+<UE437> \xC7\xCD |0
+<UE438> \xC7\xCE |0
+<UE439> \xC7\xCF |0
+<UE43A> \xC7\xD0 |0
+<UE43B> \xC7\xD1 |0
+<UE43C> \xC7\xD2 |0
+<UE43D> \xC7\xD3 |0
+<UE43E> \xC7\xD4 |0
+<UE43F> \xC7\xD5 |0
+<UE440> \xC7\xD6 |0
+<UE441> \xC7\xD7 |0
+<UE442> \xC7\xD8 |0
+<UE443> \xC7\xD9 |0
+<UE444> \xC7\xDA |0
+<UE445> \xC7\xDB |0
+<UE446> \xC7\xDC |0
+<UE447> \xC7\xDD |0
+<UE448> \xC7\xDE |0
+<UE449> \xC7\xDF |0
+<UE44A> \xC7\xE0 |0
+<UE44B> \xC7\xE1 |0
+<UE44C> \xC7\xE2 |0
+<UE44D> \xC7\xE3 |0
+<UE44E> \xC7\xE4 |0
+<UE44F> \xC7\xE5 |0
+<UE450> \xC7\xE6 |0
+<UE451> \xC7\xE7 |0
+<UE452> \xC7\xE8 |0
+<UE453> \xC7\xE9 |0
+<UE454> \xC7\xEA |0
+<UE455> \xC7\xEB |0
+<UE456> \xC7\xEC |0
+<UE457> \xC7\xED |0
+<UE458> \xC7\xEE |0
+<UE459> \xC7\xEF |0
+<UE45A> \xC7\xF0 |0
+<UE45B> \xC7\xF1 |0
+<UE45C> \xC7\xF2 |0
+<UE45D> \xC7\xF3 |0
+<UE45E> \xC7\xF4 |0
+<UE45F> \xC7\xF5 |0
+<UE460> \xC7\xF6 |0
+<UE461> \xC7\xF7 |0
+<UE462> \xC7\xF8 |0
+<UE463> \xC7\xF9 |0
+<UE464> \xC7\xFA |0
+<UE465> \xC7\xFB |0
+<UE466> \xC7\xFC |0
+<UE467> \xC7\xFD |0
+<UE468> \xC8\x41 |0
+<UE469> \xC8\x42 |0
+<UE46A> \xC8\x43 |0
+<UE46B> \xC8\x44 |0
+<UE46C> \xC8\x45 |0
+<UE46D> \xC8\x46 |0
+<UE46E> \xC8\x47 |0
+<UE46F> \xC8\x48 |0
+<UE470> \xC8\x49 |0
+<UE471> \xC8\x4A |0
+<UE472> \xC8\x4B |0
+<UE473> \xC8\x4C |0
+<UE474> \xC8\x4D |0
+<UE475> \xC8\x4E |0
+<UE476> \xC8\x4F |0
+<UE477> \xC8\x50 |0
+<UE478> \xC8\x51 |0
+<UE479> \xC8\x52 |0
+<UE47A> \xC8\x53 |0
+<UE47B> \xC8\x54 |0
+<UE47C> \xC8\x55 |0
+<UE47D> \xC8\x56 |0
+<UE47E> \xC8\x57 |0
+<UE47F> \xC8\x58 |0
+<UE480> \xC8\x59 |0
+<UE481> \xC8\x5A |0
+<UE482> \xC8\x5B |0
+<UE483> \xC8\x5C |0
+<UE484> \xC8\x5D |0
+<UE485> \xC8\x5E |0
+<UE486> \xC8\x5F |0
+<UE487> \xC8\x60 |0
+<UE488> \xC8\x61 |0
+<UE489> \xC8\x62 |0
+<UE48A> \xC8\x63 |0
+<UE48B> \xC8\x64 |0
+<UE48C> \xC8\x65 |0
+<UE48D> \xC8\x66 |0
+<UE48E> \xC8\x67 |0
+<UE48F> \xC8\x68 |0
+<UE490> \xC8\x69 |0
+<UE491> \xC8\x6A |0
+<UE492> \xC8\x6B |0
+<UE493> \xC8\x6C |0
+<UE494> \xC8\x6D |0
+<UE495> \xC8\x6E |0
+<UE496> \xC8\x6F |0
+<UE497> \xC8\x70 |0
+<UE498> \xC8\x71 |0
+<UE499> \xC8\x72 |0
+<UE49A> \xC8\x73 |0
+<UE49B> \xC8\x74 |0
+<UE49C> \xC8\x75 |0
+<UE49D> \xC8\x76 |0
+<UE49E> \xC8\x77 |0
+<UE49F> \xC8\x78 |0
+<UE4A0> \xC8\x79 |0
+<UE4A1> \xC8\x7A |0
+<UE4A2> \xC8\x7B |0
+<UE4A3> \xC8\x7C |0
+<UE4A4> \xC8\x7D |0
+<UE4A5> \xC8\x7E |0
+<UE4A6> \xC8\x7F |0
+<UE4A7> \xC8\x81 |0
+<UE4A8> \xC8\x82 |0
+<UE4A9> \xC8\x83 |0
+<UE4AA> \xC8\x84 |0
+<UE4AB> \xC8\x85 |0
+<UE4AC> \xC8\x86 |0
+<UE4AD> \xC8\x87 |0
+<UE4AE> \xC8\x88 |0
+<UE4AF> \xC8\x89 |0
+<UE4B0> \xC8\x8A |0
+<UE4B1> \xC8\x8B |0
+<UE4B2> \xC8\x8C |0
+<UE4B3> \xC8\x8D |0
+<UE4B4> \xC8\x8E |0
+<UE4B5> \xC8\x8F |0
+<UE4B6> \xC8\x90 |0
+<UE4B7> \xC8\x91 |0
+<UE4B8> \xC8\x92 |0
+<UE4B9> \xC8\x93 |0
+<UE4BA> \xC8\x94 |0
+<UE4BB> \xC8\x95 |0
+<UE4BC> \xC8\x96 |0
+<UE4BD> \xC8\x97 |0
+<UE4BE> \xC8\x98 |0
+<UE4BF> \xC8\x99 |0
+<UE4C0> \xC8\x9A |0
+<UE4C1> \xC8\x9B |0
+<UE4C2> \xC8\x9C |0
+<UE4C3> \xC8\x9D |0
+<UE4C4> \xC8\x9E |0
+<UE4C5> \xC8\x9F |0
+<UE4C6> \xC8\xA0 |0
+<UE4C7> \xC8\xA1 |0
+<UE4C8> \xC8\xA2 |0
+<UE4C9> \xC8\xA3 |0
+<UE4CA> \xC8\xA4 |0
+<UE4CB> \xC8\xA5 |0
+<UE4CC> \xC8\xA6 |0
+<UE4CD> \xC8\xA7 |0
+<UE4CE> \xC8\xA8 |0
+<UE4CF> \xC8\xA9 |0
+<UE4D0> \xC8\xAA |0
+<UE4D1> \xC8\xAB |0
+<UE4D2> \xC8\xAC |0
+<UE4D3> \xC8\xAD |0
+<UE4D4> \xC8\xAE |0
+<UE4D5> \xC8\xAF |0
+<UE4D6> \xC8\xB0 |0
+<UE4D7> \xC8\xB1 |0
+<UE4D8> \xC8\xB2 |0
+<UE4D9> \xC8\xB3 |0
+<UE4DA> \xC8\xB4 |0
+<UE4DB> \xC8\xB5 |0
+<UE4DC> \xC8\xB6 |0
+<UE4DD> \xC8\xB7 |0
+<UE4DE> \xC8\xB8 |0
+<UE4DF> \xC8\xB9 |0
+<UE4E0> \xC8\xBA |0
+<UE4E1> \xC8\xBB |0
+<UE4E2> \xC8\xBC |0
+<UE4E3> \xC8\xBD |0
+<UE4E4> \xC8\xBE |0
+<UE4E5> \xC8\xBF |0
+<UE4E6> \xC8\xC0 |0
+<UE4E7> \xC8\xC1 |0
+<UE4E8> \xC8\xC2 |0
+<UE4E9> \xC8\xC3 |0
+<UE4EA> \xC8\xC4 |0
+<UE4EB> \xC8\xC5 |0
+<UE4EC> \xC8\xC6 |0
+<UE4ED> \xC8\xC7 |0
+<UE4EE> \xC8\xC8 |0
+<UE4EF> \xC8\xC9 |0
+<UE4F0> \xC8\xCA |0
+<UE4F1> \xC8\xCB |0
+<UE4F2> \xC8\xCC |0
+<UE4F3> \xC8\xCD |0
+<UE4F4> \xC8\xCE |0
+<UE4F5> \xC8\xCF |0
+<UE4F6> \xC8\xD0 |0
+<UE4F7> \xC8\xD1 |0
+<UE4F8> \xC8\xD2 |0
+<UE4F9> \xC8\xD3 |0
+<UE4FA> \xC8\xD4 |0
+<UE4FB> \xC8\xD5 |0
+<UE4FC> \xC8\xD6 |0
+<UE4FD> \xC8\xD7 |0
+<UE4FE> \xC8\xD8 |0
+<UE4FF> \xC8\xD9 |0
+<UE500> \xC8\xDA |0
+<UE501> \xC8\xDB |0
+<UE502> \xC8\xDC |0
+<UE503> \xC8\xDD |0
+<UE504> \xC8\xDE |0
+<UE505> \xC8\xDF |0
+<UE506> \xC8\xE0 |0
+<UE507> \xC8\xE1 |0
+<UE508> \xC8\xE2 |0
+<UE509> \xC8\xE3 |0
+<UE50A> \xC8\xE4 |0
+<UE50B> \xC8\xE5 |0
+<UE50C> \xC8\xE6 |0
+<UE50D> \xC8\xE7 |0
+<UE50E> \xC8\xE8 |0
+<UE50F> \xC8\xE9 |0
+<UE510> \xC8\xEA |0
+<UE511> \xC8\xEB |0
+<UE512> \xC8\xEC |0
+<UE513> \xC8\xED |0
+<UE514> \xC8\xEE |0
+<UE515> \xC8\xEF |0
+<UE516> \xC8\xF0 |0
+<UE517> \xC8\xF1 |0
+<UE518> \xC8\xF2 |0
+<UE519> \xC8\xF3 |0
+<UE51A> \xC8\xF4 |0
+<UE51B> \xC8\xF5 |0
+<UE51C> \xC8\xF6 |0
+<UE51D> \xC8\xF7 |0
+<UE51E> \xC8\xF8 |0
+<UE51F> \xC8\xF9 |0
+<UE520> \xC8\xFA |0
+<UE521> \xC8\xFB |0
+<UE522> \xC8\xFC |0
+<UE523> \xC8\xFD |0
+<UE524> \xC9\x41 |0
+<UE525> \xC9\x42 |0
+<UE526> \xC9\x43 |0
+<UE527> \xC9\x44 |0
+<UE528> \xC9\x45 |0
+<UE529> \xC9\x46 |0
+<UE52A> \xC9\x47 |0
+<UE52B> \xC9\x48 |0
+<UE52C> \xC9\x49 |0
+<UE52D> \xC9\x4A |0
+<UE52E> \xC9\x4B |0
+<UE52F> \xC9\x4C |0
+<UE530> \xC9\x4D |0
+<UE531> \xC9\x4E |0
+<UE532> \xC9\x4F |0
+<UE533> \xC9\x50 |0
+<UE534> \xC9\x51 |0
+<UE535> \xC9\x52 |0
+<UE536> \xC9\x53 |0
+<UE537> \xC9\x54 |0
+<UE538> \xC9\x55 |0
+<UE539> \xC9\x56 |0
+<UE53A> \xC9\x57 |0
+<UE53B> \xC9\x58 |0
+<UE53C> \xC9\x59 |0
+<UE53D> \xC9\x5A |0
+<UE53E> \xC9\x5B |0
+<UE53F> \xC9\x5C |0
+<UE540> \xC9\x5D |0
+<UE541> \xC9\x5E |0
+<UE542> \xC9\x5F |0
+<UE543> \xC9\x60 |0
+<UE544> \xC9\x61 |0
+<UE545> \xC9\x62 |0
+<UE546> \xC9\x63 |0
+<UE547> \xC9\x64 |0
+<UE548> \xC9\x65 |0
+<UE549> \xC9\x66 |0
+<UE54A> \xC9\x67 |0
+<UE54B> \xC9\x68 |0
+<UE54C> \xC9\x69 |0
+<UE54D> \xC9\x6A |0
+<UE54E> \xC9\x6B |0
+<UE54F> \xC9\x6C |0
+<UE550> \xC9\x6D |0
+<UE551> \xC9\x6E |0
+<UE552> \xC9\x6F |0
+<UE553> \xC9\x70 |0
+<UE554> \xC9\x71 |0
+<UE555> \xC9\x72 |0
+<UE556> \xC9\x73 |0
+<UE557> \xC9\x74 |0
+<UE558> \xC9\x75 |0
+<UE559> \xC9\x76 |0
+<UE55A> \xC9\x77 |0
+<UE55B> \xC9\x78 |0
+<UE55C> \xC9\x79 |0
+<UE55D> \xC9\x7A |0
+<UE55E> \xC9\x7B |0
+<UE55F> \xC9\x7C |0
+<UE560> \xC9\x7D |0
+<UE561> \xC9\x7E |0
+<UE562> \xC9\x7F |0
+<UE563> \xC9\x81 |0
+<UE564> \xC9\x82 |0
+<UE565> \xC9\x83 |0
+<UE566> \xC9\x84 |0
+<UE567> \xC9\x85 |0
+<UE568> \xC9\x86 |0
+<UE569> \xC9\x87 |0
+<UE56A> \xC9\x88 |0
+<UE56B> \xC9\x89 |0
+<UE56C> \xC9\x8A |0
+<UE56D> \xC9\x8B |0
+<UE56E> \xC9\x8C |0
+<UE56F> \xC9\x8D |0
+<UE570> \xC9\x8E |0
+<UE571> \xC9\x8F |0
+<UE572> \xC9\x90 |0
+<UE573> \xC9\x91 |0
+<UE574> \xC9\x92 |0
+<UE575> \xC9\x93 |0
+<UE576> \xC9\x94 |0
+<UE577> \xC9\x95 |0
+<UE578> \xC9\x96 |0
+<UE579> \xC9\x97 |0
+<UE57A> \xC9\x98 |0
+<UE57B> \xC9\x99 |0
+<UE57C> \xC9\x9A |0
+<UE57D> \xC9\x9B |0
+<UE57E> \xC9\x9C |0
+<UE57F> \xC9\x9D |0
+<UE580> \xC9\x9E |0
+<UE581> \xC9\x9F |0
+<UE582> \xC9\xA0 |0
+<UE583> \xC9\xA1 |0
+<UE584> \xC9\xA2 |0
+<UE585> \xC9\xA3 |0
+<UE586> \xC9\xA4 |0
+<UE587> \xC9\xA5 |0
+<UE588> \xC9\xA6 |0
+<UE589> \xC9\xA7 |0
+<UE58A> \xC9\xA8 |0
+<UE58B> \xC9\xA9 |0
+<UE58C> \xC9\xAA |0
+<UE58D> \xC9\xAB |0
+<UE58E> \xC9\xAC |0
+<UE58F> \xC9\xAD |0
+<UE590> \xC9\xAE |0
+<UE591> \xC9\xAF |0
+<UE592> \xC9\xB0 |0
+<UE593> \xC9\xB1 |0
+<UE594> \xC9\xB2 |0
+<UE595> \xC9\xB3 |0
+<UE596> \xC9\xB4 |0
+<UE597> \xC9\xB5 |0
+<UE598> \xC9\xB6 |0
+<UE599> \xC9\xB7 |0
+<UE59A> \xC9\xB8 |0
+<UE59B> \xC9\xB9 |0
+<UE59C> \xC9\xBA |0
+<UE59D> \xC9\xBB |0
+<UE59E> \xC9\xBC |0
+<UE59F> \xC9\xBD |0
+<UE5A0> \xC9\xBE |0
+<UE5A1> \xC9\xBF |0
+<UE5A2> \xC9\xC0 |0
+<UE5A3> \xC9\xC1 |0
+<UE5A4> \xC9\xC2 |0
+<UE5A5> \xC9\xC3 |0
+<UE5A6> \xC9\xC4 |0
+<UE5A7> \xC9\xC5 |0
+<UE5A8> \xC9\xC6 |0
+<UE5A9> \xC9\xC7 |0
+<UE5AA> \xC9\xC8 |0
+<UE5AB> \xC9\xC9 |0
+<UE5AC> \xC9\xCA |0
+<UE5AD> \xC9\xCB |0
+<UE5AE> \xC9\xCC |0
+<UE5AF> \xC9\xCD |0
+<UE5B0> \xC9\xCE |0
+<UE5B1> \xC9\xCF |0
+<UE5B2> \xC9\xD0 |0
+<UE5B3> \xC9\xD1 |0
+<UE5B4> \xC9\xD2 |0
+<UE5B5> \xC9\xD3 |0
+<UE5B6> \xC9\xD4 |0
+<UE5B7> \xC9\xD5 |0
+<UE5B8> \xC9\xD6 |0
+<UE5B9> \xC9\xD7 |0
+<UE5BA> \xC9\xD8 |0
+<UE5BB> \xC9\xD9 |0
+<UE5BC> \xC9\xDA |0
+<UE5BD> \xC9\xDB |0
+<UE5BE> \xC9\xDC |0
+<UE5BF> \xC9\xDD |0
+<UE5C0> \xC9\xDE |0
+<UE5C1> \xC9\xDF |0
+<UE5C2> \xC9\xE0 |0
+<UE5C3> \xC9\xE1 |0
+<UE5C4> \xC9\xE2 |0
+<UE5C5> \xC9\xE3 |0
+<UE5C6> \xC9\xE4 |0
+<UE5C7> \xC9\xE5 |0
+<UE5C8> \xC9\xE6 |0
+<UE5C9> \xC9\xE7 |0
+<UE5CA> \xC9\xE8 |0
+<UE5CB> \xC9\xE9 |0
+<UE5CC> \xC9\xEA |0
+<UE5CD> \xC9\xEB |0
+<UE5CE> \xC9\xEC |0
+<UE5CF> \xC9\xED |0
+<UE5D0> \xC9\xEE |0
+<UE5D1> \xC9\xEF |0
+<UE5D2> \xC9\xF0 |0
+<UE5D3> \xC9\xF1 |0
+<UE5D4> \xC9\xF2 |0
+<UE5D5> \xC9\xF3 |0
+<UE5D6> \xC9\xF4 |0
+<UE5D7> \xC9\xF5 |0
+<UE5D8> \xC9\xF6 |0
+<UE5D9> \xC9\xF7 |0
+<UE5DA> \xC9\xF8 |0
+<UE5DB> \xC9\xF9 |0
+<UE5DC> \xC9\xFA |0
+<UE5DD> \xC9\xFB |0
+<UE5DE> \xC9\xFC |0
+<UE5DF> \xC9\xFD |0
+<UE5E0> \xCA\x41 |0
+<UE5E1> \xCA\x42 |0
+<UE5E2> \xCA\x43 |0
+<UE5E3> \xCA\x44 |0
+<UE5E4> \xCA\x45 |0
+<UE5E5> \xCA\x46 |0
+<UE5E6> \xCA\x47 |0
+<UE5E7> \xCA\x48 |0
+<UE5E8> \xCA\x49 |0
+<UE5E9> \xCA\x4A |0
+<UE5EA> \xCA\x4B |0
+<UE5EB> \xCA\x4C |0
+<UE5EC> \xCA\x4D |0
+<UE5ED> \xCA\x4E |0
+<UE5EE> \xCA\x4F |0
+<UE5EF> \xCA\x50 |0
+<UE5F0> \xCA\x51 |0
+<UE5F1> \xCA\x52 |0
+<UE5F2> \xCA\x53 |0
+<UE5F3> \xCA\x54 |0
+<UE5F4> \xCA\x55 |0
+<UE5F5> \xCA\x56 |0
+<UE5F6> \xCA\x57 |0
+<UE5F7> \xCA\x58 |0
+<UE5F8> \xCA\x59 |0
+<UE5F9> \xCA\x5A |0
+<UE5FA> \xCA\x5B |0
+<UE5FB> \xCA\x5C |0
+<UE5FC> \xCA\x5D |0
+<UE5FD> \xCA\x5E |0
+<UE5FE> \xCA\x5F |0
+<UE5FF> \xCA\x60 |0
+<UE600> \xCA\x61 |0
+<UE601> \xCA\x62 |0
+<UE602> \xCA\x63 |0
+<UE603> \xCA\x64 |0
+<UE604> \xCA\x65 |0
+<UE605> \xCA\x66 |0
+<UE606> \xCA\x67 |0
+<UE607> \xCA\x68 |0
+<UE608> \xCA\x69 |0
+<UE609> \xCA\x6A |0
+<UE60A> \xCA\x6B |0
+<UE60B> \xCA\x6C |0
+<UE60C> \xCA\x6D |0
+<UE60D> \xCA\x6E |0
+<UE60E> \xCA\x6F |0
+<UE60F> \xCA\x70 |0
+<UE610> \xCA\x71 |0
+<UE611> \xCA\x72 |0
+<UE612> \xCA\x73 |0
+<UE613> \xCA\x74 |0
+<UE614> \xCA\x75 |0
+<UE615> \xCA\x76 |0
+<UE616> \xCA\x77 |0
+<UE617> \xCA\x78 |0
+<UE618> \xCA\x79 |0
+<UE619> \xCA\x7A |0
+<UE61A> \xCA\x7B |0
+<UE61B> \xCA\x7C |0
+<UE61C> \xCA\x7D |0
+<UE61D> \xCA\x7E |0
+<UE61E> \xCA\x7F |0
+<UE61F> \xCA\x81 |0
+<UE620> \xCA\x82 |0
+<UE621> \xCA\x83 |0
+<UE622> \xCA\x84 |0
+<UE623> \xCA\x85 |0
+<UE624> \xCA\x86 |0
+<UE625> \xCA\x87 |0
+<UE626> \xCA\x88 |0
+<UE627> \xCA\x89 |0
+<UE628> \xCA\x8A |0
+<UE629> \xCA\x8B |0
+<UE62A> \xCA\x8C |0
+<UE62B> \xCA\x8D |0
+<UE62C> \xCA\x8E |0
+<UE62D> \xCA\x8F |0
+<UE62E> \xCA\x90 |0
+<UE62F> \xCA\x91 |0
+<UE630> \xCA\x92 |0
+<UE631> \xCA\x93 |0
+<UE632> \xCA\x94 |0
+<UE633> \xCA\x95 |0
+<UE634> \xCA\x96 |0
+<UE635> \xCA\x97 |0
+<UE636> \xCA\x98 |0
+<UE637> \xCA\x99 |0
+<UE638> \xCA\x9A |0
+<UE639> \xCA\x9B |0
+<UE63A> \xCA\x9C |0
+<UE63B> \xCA\x9D |0
+<UE63C> \xCA\x9E |0
+<UE63D> \xCA\x9F |0
+<UE63E> \xCA\xA0 |0
+<UE63F> \xCA\xA1 |0
+<UE640> \xCA\xA2 |0
+<UE641> \xCA\xA3 |0
+<UE642> \xCA\xA4 |0
+<UE643> \xCA\xA5 |0
+<UE644> \xCA\xA6 |0
+<UE645> \xCA\xA7 |0
+<UE646> \xCA\xA8 |0
+<UE647> \xCA\xA9 |0
+<UE648> \xCA\xAA |0
+<UE649> \xCA\xAB |0
+<UE64A> \xCA\xAC |0
+<UE64B> \xCA\xAD |0
+<UE64C> \xCA\xAE |0
+<UE64D> \xCA\xAF |0
+<UE64E> \xCA\xB0 |0
+<UE64F> \xCA\xB1 |0
+<UE650> \xCA\xB2 |0
+<UE651> \xCA\xB3 |0
+<UE652> \xCA\xB4 |0
+<UE653> \xCA\xB5 |0
+<UE654> \xCA\xB6 |0
+<UE655> \xCA\xB7 |0
+<UE656> \xCA\xB8 |0
+<UE657> \xCA\xB9 |0
+<UE658> \xCA\xBA |0
+<UE659> \xCA\xBB |0
+<UE65A> \xCA\xBC |0
+<UE65B> \xCA\xBD |0
+<UE65C> \xCA\xBE |0
+<UE65D> \xCA\xBF |0
+<UE65E> \xCA\xC0 |0
+<UE65F> \xCA\xC1 |0
+<UE660> \xCA\xC2 |0
+<UE661> \xCA\xC3 |0
+<UE662> \xCA\xC4 |0
+<UE663> \xCA\xC5 |0
+<UE664> \xCA\xC6 |0
+<UE665> \xCA\xC7 |0
+<UE666> \xCA\xC8 |0
+<UE667> \xCA\xC9 |0
+<UE668> \xCA\xCA |0
+<UE669> \xCA\xCB |0
+<UE66A> \xCA\xCC |0
+<UE66B> \xCA\xCD |0
+<UE66C> \xCA\xCE |0
+<UE66D> \xCA\xCF |0
+<UE66E> \xCA\xD0 |0
+<UE66F> \xCA\xD1 |0
+<UE670> \xCA\xD2 |0
+<UE671> \xCA\xD3 |0
+<UE672> \xCA\xD4 |0
+<UE673> \xCA\xD5 |0
+<UE674> \xCA\xD6 |0
+<UE675> \xCA\xD7 |0
+<UE676> \xCA\xD8 |0
+<UE677> \xCA\xD9 |0
+<UE678> \xCA\xDA |0
+<UE679> \xCA\xDB |0
+<UE67A> \xCA\xDC |0
+<UE67B> \xCA\xDD |0
+<UE67C> \xCA\xDE |0
+<UE67D> \xCA\xDF |0
+<UE67E> \xCA\xE0 |0
+<UE67F> \xCA\xE1 |0
+<UE680> \xCA\xE2 |0
+<UE681> \xCA\xE3 |0
+<UE682> \xCA\xE4 |0
+<UE683> \xCA\xE5 |0
+<UE684> \xCA\xE6 |0
+<UE685> \xCA\xE7 |0
+<UE686> \xCA\xE8 |0
+<UE687> \xCA\xE9 |0
+<UE688> \xCA\xEA |0
+<UE689> \xCA\xEB |0
+<UE68A> \xCA\xEC |0
+<UE68B> \xCA\xED |0
+<UE68C> \xCA\xEE |0
+<UE68D> \xCA\xEF |0
+<UE68E> \xCA\xF0 |0
+<UE68F> \xCA\xF1 |0
+<UE690> \xCA\xF2 |0
+<UE691> \xCA\xF3 |0
+<UE692> \xCA\xF4 |0
+<UE693> \xCA\xF5 |0
+<UE694> \xCA\xF6 |0
+<UE695> \xCA\xF7 |0
+<UE696> \xCA\xF8 |0
+<UE697> \xCA\xF9 |0
+<UE698> \xCA\xFA |0
+<UE699> \xCA\xFB |0
+<UE69A> \xCA\xFC |0
+<UE69B> \xCA\xFD |0
+<UE69C> \xCB\x41 |0
+<UE69D> \xCB\x42 |0
+<UE69E> \xCB\x43 |0
+<UE69F> \xCB\x44 |0
+<UE6A0> \xCB\x45 |0
+<UE6A1> \xCB\x46 |0
+<UE6A2> \xCB\x47 |0
+<UE6A3> \xCB\x48 |0
+<UE6A4> \xCB\x49 |0
+<UE6A5> \xCB\x4A |0
+<UE6A6> \xCB\x4B |0
+<UE6A7> \xCB\x4C |0
+<UE6A8> \xCB\x4D |0
+<UE6A9> \xCB\x4E |0
+<UE6AA> \xCB\x4F |0
+<UE6AB> \xCB\x50 |0
+<UE6AC> \xCB\x51 |0
+<UE6AD> \xCB\x52 |0
+<UE6AE> \xCB\x53 |0
+<UE6AF> \xCB\x54 |0
+<UE6B0> \xCB\x55 |0
+<UE6B1> \xCB\x56 |0
+<UE6B2> \xCB\x57 |0
+<UE6B3> \xCB\x58 |0
+<UE6B4> \xCB\x59 |0
+<UE6B5> \xCB\x5A |0
+<UE6B6> \xCB\x5B |0
+<UE6B7> \xCB\x5C |0
+<UE6B8> \xCB\x5D |0
+<UE6B9> \xCB\x5E |0
+<UE6BA> \xCB\x5F |0
+<UE6BB> \xCB\x60 |0
+<UE6BC> \xCB\x61 |0
+<UE6BD> \xCB\x62 |0
+<UE6BE> \xCB\x63 |0
+<UE6BF> \xCB\x64 |0
+<UE6C0> \xCB\x65 |0
+<UE6C1> \xCB\x66 |0
+<UE6C2> \xCB\x67 |0
+<UE6C3> \xCB\x68 |0
+<UE6C4> \xCB\x69 |0
+<UE6C5> \xCB\x6A |0
+<UE6C6> \xCB\x6B |0
+<UE6C7> \xCB\x6C |0
+<UE6C8> \xCB\x6D |0
+<UE6C9> \xCB\x6E |0
+<UE6CA> \xCB\x6F |0
+<UE6CB> \xCB\x70 |0
+<UE6CC> \xCB\x71 |0
+<UE6CD> \xCB\x72 |0
+<UE6CE> \xCB\x73 |0
+<UE6CF> \xCB\x74 |0
+<UE6D0> \xCB\x75 |0
+<UE6D1> \xCB\x76 |0
+<UE6D2> \xCB\x77 |0
+<UE6D3> \xCB\x78 |0
+<UE6D4> \xCB\x79 |0
+<UE6D5> \xCB\x7A |0
+<UE6D6> \xCB\x7B |0
+<UE6D7> \xCB\x7C |0
+<UE6D8> \xCB\x7D |0
+<UE6D9> \xCB\x7E |0
+<UE6DA> \xCB\x7F |0
+<UE6DB> \xCB\x81 |0
+<UE6DC> \xCB\x82 |0
+<UE6DD> \xCB\x83 |0
+<UE6DE> \xCB\x84 |0
+<UE6DF> \xCB\x85 |0
+<UE6E0> \xCB\x86 |0
+<UE6E1> \xCB\x87 |0
+<UE6E2> \xCB\x88 |0
+<UE6E3> \xCB\x89 |0
+<UE6E4> \xCB\x8A |0
+<UE6E5> \xCB\x8B |0
+<UE6E6> \xCB\x8C |0
+<UE6E7> \xCB\x8D |0
+<UE6E8> \xCB\x8E |0
+<UE6E9> \xCB\x8F |0
+<UE6EA> \xCB\x90 |0
+<UE6EB> \xCB\x91 |0
+<UE6EC> \xCB\x92 |0
+<UE6ED> \xCB\x93 |0
+<UE6EE> \xCB\x94 |0
+<UE6EF> \xCB\x95 |0
+<UE6F0> \xCB\x96 |0
+<UE6F1> \xCB\x97 |0
+<UE6F2> \xCB\x98 |0
+<UE6F3> \xCB\x99 |0
+<UE6F4> \xCB\x9A |0
+<UE6F5> \xCB\x9B |0
+<UE6F6> \xCB\x9C |0
+<UE6F7> \xCB\x9D |0
+<UE6F8> \xCB\x9E |0
+<UE6F9> \xCB\x9F |0
+<UE6FA> \xCB\xA0 |0
+<UE6FB> \xCB\xA1 |0
+<UE6FC> \xCB\xA2 |0
+<UE6FD> \xCB\xA3 |0
+<UE6FE> \xCB\xA4 |0
+<UE6FF> \xCB\xA5 |0
+<UE700> \xCB\xA6 |0
+<UE701> \xCB\xA7 |0
+<UE702> \xCB\xA8 |0
+<UE703> \xCB\xA9 |0
+<UE704> \xCB\xAA |0
+<UE705> \xCB\xAB |0
+<UE706> \xCB\xAC |0
+<UE707> \xCB\xAD |0
+<UE708> \xCB\xAE |0
+<UE709> \xCB\xAF |0
+<UE70A> \xCB\xB0 |0
+<UE70B> \xCB\xB1 |0
+<UE70C> \xCB\xB2 |0
+<UE70D> \xCB\xB3 |0
+<UE70E> \xCB\xB4 |0
+<UE70F> \xCB\xB5 |0
+<UE710> \xCB\xB6 |0
+<UE711> \xCB\xB7 |0
+<UE712> \xCB\xB8 |0
+<UE713> \xCB\xB9 |0
+<UE714> \xCB\xBA |0
+<UE715> \xCB\xBB |0
+<UE716> \xCB\xBC |0
+<UE717> \xCB\xBD |0
+<UE718> \xCB\xBE |0
+<UE719> \xCB\xBF |0
+<UE71A> \xCB\xC0 |0
+<UE71B> \xCB\xC1 |0
+<UE71C> \xCB\xC2 |0
+<UE71D> \xCB\xC3 |0
+<UE71E> \xCB\xC4 |0
+<UE71F> \xCB\xC5 |0
+<UE720> \xCB\xC6 |0
+<UE721> \xCB\xC7 |0
+<UE722> \xCB\xC8 |0
+<UE723> \xCB\xC9 |0
+<UE724> \xCB\xCA |0
+<UE725> \xCB\xCB |0
+<UE726> \xCB\xCC |0
+<UE727> \xCB\xCD |0
+<UE728> \xCB\xCE |0
+<UE729> \xCB\xCF |0
+<UE72A> \xCB\xD0 |0
+<UE72B> \xCB\xD1 |0
+<UE72C> \xCB\xD2 |0
+<UE72D> \xCB\xD3 |0
+<UE72E> \xCB\xD4 |0
+<UE72F> \xCB\xD5 |0
+<UE730> \xCB\xD6 |0
+<UE731> \xCB\xD7 |0
+<UE732> \xCB\xD8 |0
+<UE733> \xCB\xD9 |0
+<UE734> \xCB\xDA |0
+<UE735> \xCB\xDB |0
+<UE736> \xCB\xDC |0
+<UE737> \xCB\xDD |0
+<UE738> \xCB\xDE |0
+<UE739> \xCB\xDF |0
+<UE73A> \xCB\xE0 |0
+<UE73B> \xCB\xE1 |0
+<UE73C> \xCB\xE2 |0
+<UE73D> \xCB\xE3 |0
+<UE73E> \xCB\xE4 |0
+<UE73F> \xCB\xE5 |0
+<UE740> \xCB\xE6 |0
+<UE741> \xCB\xE7 |0
+<UE742> \xCB\xE8 |0
+<UE743> \xCB\xE9 |0
+<UE744> \xCB\xEA |0
+<UE745> \xCB\xEB |0
+<UE746> \xCB\xEC |0
+<UE747> \xCB\xED |0
+<UE748> \xCB\xEE |0
+<UE749> \xCB\xEF |0
+<UE74A> \xCB\xF0 |0
+<UE74B> \xCB\xF1 |0
+<UE74C> \xCB\xF2 |0
+<UE74D> \xCB\xF3 |0
+<UE74E> \xCB\xF4 |0
+<UE74F> \xCB\xF5 |0
+<UE750> \xCB\xF6 |0
+<UE751> \xCB\xF7 |0
+<UE752> \xCB\xF8 |0
+<UE753> \xCB\xF9 |0
+<UE754> \xCB\xFA |0
+<UE755> \xCB\xFB |0
+<UE756> \xCB\xFC |0
+<UE757> \xCB\xFD |0
+<UE758> \xCC\x41 |0
+<UE759> \xCC\x42 |0
+<UE75A> \xCC\x43 |0
+<UE75B> \xCC\x44 |0
+<UE75C> \xCC\x45 |0
+<UE75D> \xCC\x46 |0
+<UE75E> \xCC\x47 |0
+<UE75F> \xCC\x48 |0
+<UE760> \xCC\x49 |0
+<UE761> \xCC\x4A |0
+<UE762> \xCC\x4B |0
+<UE763> \xCC\x4C |0
+<UE764> \xCC\x4D |0
+<UE765> \xCC\x4E |0
+<UE766> \xCC\x4F |0
+<UE767> \xCC\x50 |0
+<UE768> \xCC\x51 |0
+<UE769> \xCC\x52 |0
+<UE76A> \xCC\x53 |0
+<UE76B> \xCC\x54 |0
+<UE76C> \xCC\x55 |0
+<UE76D> \xCC\x56 |0
+<UE76E> \xCC\x57 |0
+<UE76F> \xCC\x58 |0
+<UE770> \xCC\x59 |0
+<UE771> \xCC\x5A |0
+<UE772> \xCC\x5B |0
+<UE773> \xCC\x5C |0
+<UE774> \xCC\x5D |0
+<UE775> \xCC\x5E |0
+<UE776> \xCC\x5F |0
+<UE777> \xCC\x60 |0
+<UE778> \xCC\x61 |0
+<UE779> \xCC\x62 |0
+<UE77A> \xCC\x63 |0
+<UE77B> \xCC\x64 |0
+<UE77C> \xCC\x65 |0
+<UE77D> \xCC\x66 |0
+<UE77E> \xCC\x67 |0
+<UE77F> \xCC\x68 |0
+<UE780> \xCC\x69 |0
+<UE781> \xCC\x6A |0
+<UE782> \xCC\x6B |0
+<UE783> \xCC\x6C |0
+<UE784> \xCC\x6D |0
+<UE785> \xCC\x6E |0
+<UE786> \xCC\x6F |0
+<UE787> \xCC\x70 |0
+<UE788> \xCC\x71 |0
+<UE789> \xCC\x72 |0
+<UE78A> \xCC\x73 |0
+<UE78B> \xCC\x74 |0
+<UE78C> \xCC\x75 |0
+<UE78D> \xCC\x76 |0
+<UE78E> \xCC\x77 |0
+<UE78F> \xCC\x78 |0
+<UE790> \xCC\x79 |0
+<UE791> \xCC\x7A |0
+<UE792> \xCC\x7B |0
+<UE793> \xCC\x7C |0
+<UE794> \xCC\x7D |0
+<UE795> \xCC\x7E |0
+<UE796> \xCC\x7F |0
+<UE797> \xCC\x81 |0
+<UE798> \xCC\x82 |0
+<UE799> \xCC\x83 |0
+<UE79A> \xCC\x84 |0
+<UE79B> \xCC\x85 |0
+<UE79C> \xCC\x86 |0
+<UE79D> \xCC\x87 |0
+<UE79E> \xCC\x88 |0
+<UE79F> \xCC\x89 |0
+<UE7A0> \xCC\x8A |0
+<UE7A1> \xCC\x8B |0
+<UE7A2> \xCC\x8C |0
+<UE7A3> \xCC\x8D |0
+<UE7A4> \xCC\x8E |0
+<UE7A5> \xCC\x8F |0
+<UE7A6> \xCC\x90 |0
+<UE7A7> \xCC\x91 |0
+<UE7A8> \xCC\x92 |0
+<UE7A9> \xCC\x93 |0
+<UE7AA> \xCC\x94 |0
+<UE7AB> \xCC\x95 |0
+<UE7AC> \xCC\x96 |0
+<UE7AD> \xCC\x97 |0
+<UE7AE> \xCC\x98 |0
+<UE7AF> \xCC\x99 |0
+<UE7B0> \xCC\x9A |0
+<UE7B1> \xCC\x9B |0
+<UE7B2> \xCC\x9C |0
+<UE7B3> \xCC\x9D |0
+<UE7B4> \xCC\x9E |0
+<UE7B5> \xCC\x9F |0
+<UE7B6> \xCC\xA0 |0
+<UE7B7> \xCC\xA1 |0
+<UE7B8> \xCC\xA2 |0
+<UE7B9> \xCC\xA3 |0
+<UE7BA> \xCC\xA4 |0
+<UE7BB> \xCC\xA5 |0
+<UE7BC> \xCC\xA6 |0
+<UE7BD> \xCC\xA7 |0
+<UE7BE> \xCC\xA8 |0
+<UE7BF> \xCC\xA9 |0
+<UE7C0> \xCC\xAA |0
+<UE7C1> \xCC\xAB |0
+<UE7C2> \xCC\xAC |0
+<UE7C3> \xCC\xAD |0
+<UE7C4> \xCC\xAE |0
+<UE7C5> \xCC\xAF |0
+<UE7C6> \xCC\xB0 |0
+<UE7C7> \xCC\xB1 |0
+<UE7C8> \xCC\xB2 |0
+<UE7C9> \xCC\xB3 |0
+<UE7CA> \xCC\xB4 |0
+<UE7CB> \xCC\xB5 |0
+<UE7CC> \xCC\xB6 |0
+<UE7CD> \xCC\xB7 |0
+<UE7CE> \xCC\xB8 |0
+<UE7CF> \xCC\xB9 |0
+<UE7D0> \xCC\xBA |0
+<UE7D1> \xCC\xBB |0
+<UE7D2> \xCC\xBC |0
+<UE7D3> \xCC\xBD |0
+<UE7D4> \xCC\xBE |0
+<UE7D5> \xCC\xBF |0
+<UE7D6> \xCC\xC0 |0
+<UE7D7> \xCC\xC1 |0
+<UE7D8> \xCC\xC2 |0
+<UE7D9> \xCC\xC3 |0
+<UE7DA> \xCC\xC4 |0
+<UE7DB> \xCC\xC5 |0
+<UE7DC> \xCC\xC6 |0
+<UE7DD> \xCC\xC7 |0
+<UE7DE> \xCC\xC8 |0
+<UE7DF> \xCC\xC9 |0
+<UE7E0> \xCC\xCA |0
+<UE7E1> \xCC\xCB |0
+<UE7E2> \xCC\xCC |0
+<UE7E3> \xCC\xCD |0
+<UE7E4> \xCC\xCE |0
+<UE7E5> \xCC\xCF |0
+<UE7E6> \xCC\xD0 |0
+<UE7E7> \xCC\xD1 |0
+<UE7E8> \xCC\xD2 |0
+<UE7E9> \xCC\xD3 |0
+<UE7EA> \xCC\xD4 |0
+<UE7EB> \xCC\xD5 |0
+<UE7EC> \xCC\xD6 |0
+<UE7ED> \xCC\xD7 |0
+<UE7EE> \xCC\xD8 |0
+<UE7EF> \xCC\xD9 |0
+<UE7F0> \xCC\xDA |0
+<UE7F1> \xCC\xDB |0
+<UE7F2> \xCC\xDC |0
+<UE7F3> \xCC\xDD |0
+<UE7F4> \xCC\xDE |0
+<UE7F5> \xCC\xDF |0
+<UE7F6> \xCC\xE0 |0
+<UE7F7> \xCC\xE1 |0
+<UE7F8> \xCC\xE2 |0
+<UE7F9> \xCC\xE3 |0
+<UE7FA> \xCC\xE4 |0
+<UE7FB> \xCC\xE5 |0
+<UE7FC> \xCC\xE6 |0
+<UE7FD> \xCC\xE7 |0
+<UE7FE> \xCC\xE8 |0
+<UE7FF> \xCC\xE9 |0
+<UE800> \xCC\xEA |0
+<UE801> \xCC\xEB |0
+<UE802> \xCC\xEC |0
+<UE803> \xCC\xED |0
+<UE804> \xCC\xEE |0
+<UE805> \xCC\xEF |0
+<UE806> \xCC\xF0 |0
+<UE807> \xCC\xF1 |0
+<UE808> \xCC\xF2 |0
+<UE809> \xCC\xF3 |0
+<UE80A> \xCC\xF4 |0
+<UE80B> \xCC\xF5 |0
+<UE80C> \xCC\xF6 |0
+<UE80D> \xCC\xF7 |0
+<UE80E> \xCC\xF8 |0
+<UE80F> \xCC\xF9 |0
+<UE810> \xCC\xFA |0
+<UE811> \xCC\xFB |0
+<UE812> \xCC\xFC |0
+<UE813> \xCC\xFD |0
+<UE814> \xCD\x41 |0
+<UE815> \xCD\x42 |0
+<UE816> \xCD\x43 |0
+<UE817> \xCD\x44 |0
+<UE818> \xCD\x45 |0
+<UE819> \xCD\x46 |0
+<UE81A> \xCD\x47 |0
+<UE81B> \xCD\x48 |0
+<UE81C> \xCD\x49 |0
+<UE81D> \xCD\x4A |0
+<UE81E> \xCD\x4B |0
+<UE81F> \xCD\x4C |0
+<UE820> \xCD\x4D |0
+<UE821> \xCD\x4E |0
+<UE822> \xCD\x4F |0
+<UE823> \xCD\x50 |0
+<UE824> \xCD\x51 |0
+<UE825> \xCD\x52 |0
+<UE826> \xCD\x53 |0
+<UE827> \xCD\x54 |0
+<UE828> \xCD\x55 |0
+<UE829> \xCD\x56 |0
+<UE82A> \xCD\x57 |0
+<UE82B> \xCD\x58 |0
+<UE82C> \xCD\x59 |0
+<UE82D> \xCD\x5A |0
+<UE82E> \xCD\x5B |0
+<UE82F> \xCD\x5C |0
+<UE830> \xCD\x5D |0
+<UE831> \xCD\x5E |0
+<UE832> \xCD\x5F |0
+<UE833> \xCD\x60 |0
+<UE834> \xCD\x61 |0
+<UE835> \xCD\x62 |0
+<UE836> \xCD\x63 |0
+<UE837> \xCD\x64 |0
+<UE838> \xCD\x65 |0
+<UE839> \xCD\x66 |0
+<UE83A> \xCD\x67 |0
+<UE83B> \xCD\x68 |0
+<UE83C> \xCD\x69 |0
+<UE83D> \xCD\x6A |0
+<UE83E> \xCD\x6B |0
+<UE83F> \xCD\x6C |0
+<UE840> \xCD\x6D |0
+<UE841> \xCD\x6E |0
+<UE842> \xCD\x6F |0
+<UE843> \xCD\x70 |0
+<UE844> \xCD\x71 |0
+<UE845> \xCD\x72 |0
+<UE846> \xCD\x73 |0
+<UE847> \xCD\x74 |0
+<UE848> \xCD\x75 |0
+<UE849> \xCD\x76 |0
+<UE84A> \xCD\x77 |0
+<UE84B> \xCD\x78 |0
+<UE84C> \xCD\x79 |0
+<UE84D> \xCD\x7A |0
+<UE84E> \xCD\x7B |0
+<UE84F> \xCD\x7C |0
+<UE850> \xCD\x7D |0
+<UE851> \xCD\x7E |0
+<UE852> \xCD\x7F |0
+<UE853> \xCD\x81 |0
+<UE854> \xCD\x82 |0
+<UE855> \xCD\x83 |0
+<UE856> \xCD\x84 |0
+<UE857> \xCD\x85 |0
+<UE858> \xCD\x86 |0
+<UE859> \xCD\x87 |0
+<UE85A> \xCD\x88 |0
+<UE85B> \xCD\x89 |0
+<UE85C> \xCD\x8A |0
+<UE85D> \xCD\x8B |0
+<UE85E> \xCD\x8C |0
+<UE85F> \xCD\x8D |0
+<UE860> \xCD\x8E |0
+<UE861> \xCD\x8F |0
+<UE862> \xCD\x90 |0
+<UE863> \xCD\x91 |0
+<UE864> \xCD\x92 |0
+<UE865> \xCD\x93 |0
+<UE866> \xCD\x94 |0
+<UE867> \xCD\x95 |0
+<UE868> \xCD\x96 |0
+<UE869> \xCD\x97 |0
+<UE86A> \xCD\x98 |0
+<UE86B> \xCD\x99 |0
+<UE86C> \xCD\x9A |0
+<UE86D> \xCD\x9B |0
+<UE86E> \xCD\x9C |0
+<UE86F> \xCD\x9D |0
+<UE870> \xCD\x9E |0
+<UE871> \xCD\x9F |0
+<UE872> \xCD\xA0 |0
+<UE873> \xCD\xA1 |0
+<UE874> \xCD\xA2 |0
+<UE875> \xCD\xA3 |0
+<UE876> \xCD\xA4 |0
+<UE877> \xCD\xA5 |0
+<UE878> \xCD\xA6 |0
+<UE879> \xCD\xA7 |0
+<UE87A> \xCD\xA8 |0
+<UE87B> \xCD\xA9 |0
+<UE87C> \xCD\xAA |0
+<UE87D> \xCD\xAB |0
+<UE87E> \xCD\xAC |0
+<UE87F> \xCD\xAD |0
+<UE880> \xCD\xAE |0
+<UE881> \xCD\xAF |0
+<UE882> \xCD\xB0 |0
+<UE883> \xCD\xB1 |0
+<UE884> \xCD\xB2 |0
+<UE885> \xCD\xB3 |0
+<UE886> \xCD\xB4 |0
+<UE887> \xCD\xB5 |0
+<UE888> \xCD\xB6 |0
+<UE889> \xCD\xB7 |0
+<UE88A> \xCD\xB8 |0
+<UE88B> \xCD\xB9 |0
+<UE88C> \xCD\xBA |0
+<UE88D> \xCD\xBB |0
+<UE88E> \xCD\xBC |0
+<UE88F> \xCD\xBD |0
+<UE890> \xCD\xBE |0
+<UE891> \xCD\xBF |0
+<UE892> \xCD\xC0 |0
+<UE893> \xCD\xC1 |0
+<UE894> \xCD\xC2 |0
+<UE895> \xCD\xC3 |0
+<UE896> \xCD\xC4 |0
+<UE897> \xCD\xC5 |0
+<UE898> \xCD\xC6 |0
+<UE899> \xCD\xC7 |0
+<UE89A> \xCD\xC8 |0
+<UE89B> \xCD\xC9 |0
+<UE89C> \xCD\xCA |0
+<UE89D> \xCD\xCB |0
+<UE89E> \xCD\xCC |0
+<UE89F> \xCD\xCD |0
+<UE8A0> \xCD\xCE |0
+<UE8A1> \xCD\xCF |0
+<UE8A2> \xCD\xD0 |0
+<UE8A3> \xCD\xD1 |0
+<UE8A4> \xCD\xD2 |0
+<UE8A5> \xCD\xD3 |0
+<UE8A6> \xCD\xD4 |0
+<UE8A7> \xCD\xD5 |0
+<UE8A8> \xCD\xD6 |0
+<UE8A9> \xCD\xD7 |0
+<UE8AA> \xCD\xD8 |0
+<UE8AB> \xCD\xD9 |0
+<UE8AC> \xCD\xDA |0
+<UE8AD> \xCD\xDB |0
+<UE8AE> \xCD\xDC |0
+<UE8AF> \xCD\xDD |0
+<UE8B0> \xCD\xDE |0
+<UE8B1> \xCD\xDF |0
+<UE8B2> \xCD\xE0 |0
+<UE8B3> \xCD\xE1 |0
+<UE8B4> \xCD\xE2 |0
+<UE8B5> \xCD\xE3 |0
+<UE8B6> \xCD\xE4 |0
+<UE8B7> \xCD\xE5 |0
+<UE8B8> \xCD\xE6 |0
+<UE8B9> \xCD\xE7 |0
+<UE8BA> \xCD\xE8 |0
+<UE8BB> \xCD\xE9 |0
+<UE8BC> \xCD\xEA |0
+<UE8BD> \xCD\xEB |0
+<UE8BE> \xCD\xEC |0
+<UE8BF> \xCD\xED |0
+<UE8C0> \xCD\xEE |0
+<UE8C1> \xCD\xEF |0
+<UE8C2> \xCD\xF0 |0
+<UE8C3> \xCD\xF1 |0
+<UE8C4> \xCD\xF2 |0
+<UE8C5> \xCD\xF3 |0
+<UE8C6> \xCD\xF4 |0
+<UE8C7> \xCD\xF5 |0
+<UE8C8> \xCD\xF6 |0
+<UE8C9> \xCD\xF7 |0
+<UE8CA> \xCD\xF8 |0
+<UE8CB> \xCD\xF9 |0
+<UE8CC> \xCD\xFA |0
+<UE8CD> \xCD\xFB |0
+<UE8CE> \xCD\xFC |0
+<UE8CF> \xCD\xFD |0
+<UE8D0> \xCE\x41 |0
+<UE8D1> \xCE\x42 |0
+<UE8D2> \xCE\x43 |0
+<UE8D3> \xCE\x44 |0
+<UE8D4> \xCE\x45 |0
+<UE8D5> \xCE\x46 |0
+<UE8D6> \xCE\x47 |0
+<UE8D7> \xCE\x48 |0
+<UE8D8> \xCE\x49 |0
+<UE8D9> \xCE\x4A |0
+<UE8DA> \xCE\x4B |0
+<UE8DB> \xCE\x4C |0
+<UE8DC> \xCE\x4D |0
+<UE8DD> \xCE\x4E |0
+<UE8DE> \xCE\x4F |0
+<UE8DF> \xCE\x50 |0
+<UE8E0> \xCE\x51 |0
+<UE8E1> \xCE\x52 |0
+<UE8E2> \xCE\x53 |0
+<UE8E3> \xCE\x54 |0
+<UE8E4> \xCE\x55 |0
+<UE8E5> \xCE\x56 |0
+<UE8E6> \xCE\x57 |0
+<UE8E7> \xCE\x58 |0
+<UE8E8> \xCE\x59 |0
+<UE8E9> \xCE\x5A |0
+<UE8EA> \xCE\x5B |0
+<UE8EB> \xCE\x5C |0
+<UE8EC> \xCE\x5D |0
+<UE8ED> \xCE\x5E |0
+<UE8EE> \xCE\x5F |0
+<UE8EF> \xCE\x60 |0
+<UE8F0> \xCE\x61 |0
+<UE8F1> \xCE\x62 |0
+<UE8F2> \xCE\x63 |0
+<UE8F3> \xCE\x64 |0
+<UE8F4> \xCE\x65 |0
+<UE8F5> \xCE\x66 |0
+<UE8F6> \xCE\x67 |0
+<UE8F7> \xCE\x68 |0
+<UE8F8> \xCE\x69 |0
+<UE8F9> \xCE\x6A |0
+<UE8FA> \xCE\x6B |0
+<UE8FB> \xCE\x6C |0
+<UE8FC> \xCE\x6D |0
+<UE8FD> \xCE\x6E |0
+<UE8FE> \xCE\x6F |0
+<UE8FF> \xCE\x70 |0
+<UE900> \xCE\x71 |0
+<UE901> \xCE\x72 |0
+<UE902> \xCE\x73 |0
+<UE903> \xCE\x74 |0
+<UE904> \xCE\x75 |0
+<UE905> \xCE\x76 |0
+<UE906> \xCE\x77 |0
+<UE907> \xCE\x78 |0
+<UE908> \xCE\x79 |0
+<UE909> \xCE\x7A |0
+<UE90A> \xCE\x7B |0
+<UE90B> \xCE\x7C |0
+<UE90C> \xCE\x7D |0
+<UE90D> \xCE\x7E |0
+<UE90E> \xCE\x7F |0
+<UE90F> \xCE\x81 |0
+<UE910> \xCE\x82 |0
+<UE911> \xCE\x83 |0
+<UE912> \xCE\x84 |0
+<UE913> \xCE\x85 |0
+<UE914> \xCE\x86 |0
+<UE915> \xCE\x87 |0
+<UE916> \xCE\x88 |0
+<UE917> \xCE\x89 |0
+<UE918> \xCE\x8A |0
+<UE919> \xCE\x8B |0
+<UE91A> \xCE\x8C |0
+<UE91B> \xCE\x8D |0
+<UE91C> \xCE\x8E |0
+<UE91D> \xCE\x8F |0
+<UE91E> \xCE\x90 |0
+<UE91F> \xCE\x91 |0
+<UE920> \xCE\x92 |0
+<UE921> \xCE\x93 |0
+<UE922> \xCE\x94 |0
+<UE923> \xCE\x95 |0
+<UE924> \xCE\x96 |0
+<UE925> \xCE\x97 |0
+<UE926> \xCE\x98 |0
+<UE927> \xCE\x99 |0
+<UE928> \xCE\x9A |0
+<UE929> \xCE\x9B |0
+<UE92A> \xCE\x9C |0
+<UE92B> \xCE\x9D |0
+<UE92C> \xCE\x9E |0
+<UE92D> \xCE\x9F |0
+<UE92E> \xCE\xA0 |0
+<UE92F> \xCE\xA1 |0
+<UE930> \xCE\xA2 |0
+<UE931> \xCE\xA3 |0
+<UE932> \xCE\xA4 |0
+<UE933> \xCE\xA5 |0
+<UE934> \xCE\xA6 |0
+<UE935> \xCE\xA7 |0
+<UE936> \xCE\xA8 |0
+<UE937> \xCE\xA9 |0
+<UE938> \xCE\xAA |0
+<UE939> \xCE\xAB |0
+<UE93A> \xCE\xAC |0
+<UE93B> \xCE\xAD |0
+<UE93C> \xCE\xAE |0
+<UE93D> \xCE\xAF |0
+<UE93E> \xCE\xB0 |0
+<UE93F> \xCE\xB1 |0
+<UE940> \xCE\xB2 |0
+<UE941> \xCE\xB3 |0
+<UE942> \xCE\xB4 |0
+<UE943> \xCE\xB5 |0
+<UE944> \xCE\xB6 |0
+<UE945> \xCE\xB7 |0
+<UE946> \xCE\xB8 |0
+<UE947> \xCE\xB9 |0
+<UE948> \xCE\xBA |0
+<UE949> \xCE\xBB |0
+<UE94A> \xCE\xBC |0
+<UE94B> \xCE\xBD |0
+<UE94C> \xCE\xBE |0
+<UE94D> \xCE\xBF |0
+<UE94E> \xCE\xC0 |0
+<UE94F> \xCE\xC1 |0
+<UE950> \xCE\xC2 |0
+<UE951> \xCE\xC3 |0
+<UE952> \xCE\xC4 |0
+<UE953> \xCE\xC5 |0
+<UE954> \xCE\xC6 |0
+<UE955> \xCE\xC7 |0
+<UE956> \xCE\xC8 |0
+<UE957> \xCE\xC9 |0
+<UE958> \xCE\xCA |0
+<UE959> \xCE\xCB |0
+<UE95A> \xCE\xCC |0
+<UE95B> \xCE\xCD |0
+<UE95C> \xCE\xCE |0
+<UE95D> \xCE\xCF |0
+<UE95E> \xCE\xD0 |0
+<UE95F> \xCE\xD1 |0
+<UE960> \xCE\xD2 |0
+<UE961> \xCE\xD3 |0
+<UE962> \xCE\xD4 |0
+<UE963> \xCE\xD5 |0
+<UE964> \xCE\xD6 |0
+<UE965> \xCE\xD7 |0
+<UE966> \xCE\xD8 |0
+<UE967> \xCE\xD9 |0
+<UE968> \xCE\xDA |0
+<UE969> \xCE\xDB |0
+<UE96A> \xCE\xDC |0
+<UE96B> \xCE\xDD |0
+<UE96C> \xCE\xDE |0
+<UE96D> \xCE\xDF |0
+<UE96E> \xCE\xE0 |0
+<UE96F> \xCE\xE1 |0
+<UE970> \xCE\xE2 |0
+<UE971> \xCE\xE3 |0
+<UE972> \xCE\xE4 |0
+<UE973> \xCE\xE5 |0
+<UE974> \xCE\xE6 |0
+<UE975> \xCE\xE7 |0
+<UE976> \xCE\xE8 |0
+<UE977> \xCE\xE9 |0
+<UE978> \xCE\xEA |0
+<UE979> \xCE\xEB |0
+<UE97A> \xCE\xEC |0
+<UE97B> \xCE\xED |0
+<UE97C> \xCE\xEE |0
+<UE97D> \xCE\xEF |0
+<UE97E> \xCE\xF0 |0
+<UE97F> \xCE\xF1 |0
+<UE980> \xCE\xF2 |0
+<UE981> \xCE\xF3 |0
+<UE982> \xCE\xF4 |0
+<UE983> \xCE\xF5 |0
+<UE984> \xCE\xF6 |0
+<UE985> \xCE\xF7 |0
+<UE986> \xCE\xF8 |0
+<UE987> \xCE\xF9 |0
+<UE988> \xCE\xFA |0
+<UE989> \xCE\xFB |0
+<UE98A> \xCE\xFC |0
+<UE98B> \xCE\xFD |0
+<UE98C> \xCF\x41 |0
+<UE98D> \xCF\x42 |0
+<UE98E> \xCF\x43 |0
+<UE98F> \xCF\x44 |0
+<UE990> \xCF\x45 |0
+<UE991> \xCF\x46 |0
+<UE992> \xCF\x47 |0
+<UE993> \xCF\x48 |0
+<UE994> \xCF\x49 |0
+<UE995> \xCF\x4A |0
+<UE996> \xCF\x4B |0
+<UE997> \xCF\x4C |0
+<UE998> \xCF\x4D |0
+<UE999> \xCF\x4E |0
+<UE99A> \xCF\x4F |0
+<UE99B> \xCF\x50 |0
+<UE99C> \xCF\x51 |0
+<UE99D> \xCF\x52 |0
+<UE99E> \xCF\x53 |0
+<UE99F> \xCF\x54 |0
+<UE9A0> \xCF\x55 |0
+<UE9A1> \xCF\x56 |0
+<UE9A2> \xCF\x57 |0
+<UE9A3> \xCF\x58 |0
+<UE9A4> \xCF\x59 |0
+<UE9A5> \xCF\x5A |0
+<UE9A6> \xCF\x5B |0
+<UE9A7> \xCF\x5C |0
+<UE9A8> \xCF\x5D |0
+<UE9A9> \xCF\x5E |0
+<UE9AA> \xCF\x5F |0
+<UE9AB> \xCF\x60 |0
+<UE9AC> \xCF\x61 |0
+<UE9AD> \xCF\x62 |0
+<UE9AE> \xCF\x63 |0
+<UE9AF> \xCF\x64 |0
+<UE9B0> \xCF\x65 |0
+<UE9B1> \xCF\x66 |0
+<UE9B2> \xCF\x67 |0
+<UE9B3> \xCF\x68 |0
+<UE9B4> \xCF\x69 |0
+<UE9B5> \xCF\x6A |0
+<UE9B6> \xCF\x6B |0
+<UE9B7> \xCF\x6C |0
+<UE9B8> \xCF\x6D |0
+<UE9B9> \xCF\x6E |0
+<UE9BA> \xCF\x6F |0
+<UE9BB> \xCF\x70 |0
+<UE9BC> \xCF\x71 |0
+<UE9BD> \xCF\x72 |0
+<UE9BE> \xCF\x73 |0
+<UE9BF> \xCF\x74 |0
+<UE9C0> \xCF\x75 |0
+<UE9C1> \xCF\x76 |0
+<UE9C2> \xCF\x77 |0
+<UE9C3> \xCF\x78 |0
+<UE9C4> \xCF\x79 |0
+<UE9C5> \xCF\x7A |0
+<UE9C6> \xCF\x7B |0
+<UE9C7> \xCF\x7C |0
+<UE9C8> \xCF\x7D |0
+<UE9C9> \xCF\x7E |0
+<UE9CA> \xCF\x7F |0
+<UE9CB> \xCF\x81 |0
+<UE9CC> \xCF\x82 |0
+<UE9CD> \xCF\x83 |0
+<UE9CE> \xCF\x84 |0
+<UE9CF> \xCF\x85 |0
+<UE9D0> \xCF\x86 |0
+<UE9D1> \xCF\x87 |0
+<UE9D2> \xCF\x88 |0
+<UE9D3> \xCF\x89 |0
+<UE9D4> \xCF\x8A |0
+<UE9D5> \xCF\x8B |0
+<UE9D6> \xCF\x8C |0
+<UE9D7> \xCF\x8D |0
+<UE9D8> \xCF\x8E |0
+<UE9D9> \xCF\x8F |0
+<UE9DA> \xCF\x90 |0
+<UE9DB> \xCF\x91 |0
+<UE9DC> \xCF\x92 |0
+<UE9DD> \xCF\x93 |0
+<UE9DE> \xCF\x94 |0
+<UE9DF> \xCF\x95 |0
+<UE9E0> \xCF\x96 |0
+<UE9E1> \xCF\x97 |0
+<UE9E2> \xCF\x98 |0
+<UE9E3> \xCF\x99 |0
+<UE9E4> \xCF\x9A |0
+<UE9E5> \xCF\x9B |0
+<UE9E6> \xCF\x9C |0
+<UE9E7> \xCF\x9D |0
+<UE9E8> \xCF\x9E |0
+<UE9E9> \xCF\x9F |0
+<UE9EA> \xCF\xA0 |0
+<UE9EB> \xCF\xA1 |0
+<UE9EC> \xCF\xA2 |0
+<UE9ED> \xCF\xA3 |0
+<UE9EE> \xCF\xA4 |0
+<UE9EF> \xCF\xA5 |0
+<UE9F0> \xCF\xA6 |0
+<UE9F1> \xCF\xA7 |0
+<UE9F2> \xCF\xA8 |0
+<UE9F3> \xCF\xA9 |0
+<UE9F4> \xCF\xAA |0
+<UE9F5> \xCF\xAB |0
+<UE9F6> \xCF\xAC |0
+<UE9F7> \xCF\xAD |0
+<UE9F8> \xCF\xAE |0
+<UE9F9> \xCF\xAF |0
+<UE9FA> \xCF\xB0 |0
+<UE9FB> \xCF\xB1 |0
+<UE9FC> \xCF\xB2 |0
+<UE9FD> \xCF\xB3 |0
+<UE9FE> \xCF\xB4 |0
+<UE9FF> \xCF\xB5 |0
+<UEA00> \xCF\xB6 |0
+<UEA01> \xCF\xB7 |0
+<UEA02> \xCF\xB8 |0
+<UEA03> \xCF\xB9 |0
+<UEA04> \xCF\xBA |0
+<UEA05> \xCF\xBB |0
+<UEA06> \xCF\xBC |0
+<UEA07> \xCF\xBD |0
+<UEA08> \xCF\xBE |0
+<UEA09> \xCF\xBF |0
+<UEA0A> \xCF\xC0 |0
+<UEA0B> \xCF\xC1 |0
+<UEA0C> \xCF\xC2 |0
+<UEA0D> \xCF\xC3 |0
+<UEA0E> \xCF\xC4 |0
+<UEA0F> \xCF\xC5 |0
+<UEA10> \xCF\xC6 |0
+<UEA11> \xCF\xC7 |0
+<UEA12> \xCF\xC8 |0
+<UEA13> \xCF\xC9 |0
+<UEA14> \xCF\xCA |0
+<UEA15> \xCF\xCB |0
+<UEA16> \xCF\xCC |0
+<UEA17> \xCF\xCD |0
+<UEA18> \xCF\xCE |0
+<UEA19> \xCF\xCF |0
+<UEA1A> \xCF\xD0 |0
+<UEA1B> \xCF\xD1 |0
+<UEA1C> \xCF\xD2 |0
+<UEA1D> \xCF\xD3 |0
+<UEA1E> \xCF\xD4 |0
+<UEA1F> \xCF\xD5 |0
+<UEA20> \xCF\xD6 |0
+<UEA21> \xCF\xD7 |0
+<UEA22> \xCF\xD8 |0
+<UEA23> \xCF\xD9 |0
+<UEA24> \xCF\xDA |0
+<UEA25> \xCF\xDB |0
+<UEA26> \xCF\xDC |0
+<UEA27> \xCF\xDD |0
+<UEA28> \xCF\xDE |0
+<UEA29> \xCF\xDF |0
+<UEA2A> \xCF\xE0 |0
+<UEA2B> \xCF\xE1 |0
+<UEA2C> \xCF\xE2 |0
+<UEA2D> \xCF\xE3 |0
+<UEA2E> \xCF\xE4 |0
+<UEA2F> \xCF\xE5 |0
+<UEA30> \xCF\xE6 |0
+<UEA31> \xCF\xE7 |0
+<UEA32> \xCF\xE8 |0
+<UEA33> \xCF\xE9 |0
+<UEA34> \xCF\xEA |0
+<UEA35> \xCF\xEB |0
+<UEA36> \xCF\xEC |0
+<UEA37> \xCF\xED |0
+<UEA38> \xCF\xEE |0
+<UEA39> \xCF\xEF |0
+<UEA3A> \xCF\xF0 |0
+<UEA3B> \xCF\xF1 |0
+<UEA3C> \xCF\xF2 |0
+<UEA3D> \xCF\xF3 |0
+<UEA3E> \xCF\xF4 |0
+<UEA3F> \xCF\xF5 |0
+<UEA40> \xCF\xF6 |0
+<UEA41> \xCF\xF7 |0
+<UEA42> \xCF\xF8 |0
+<UEA43> \xCF\xF9 |0
+<UEA44> \xCF\xFA |0
+<UEA45> \xCF\xFB |0
+<UEA46> \xCF\xFC |0
+<UEA47> \xCF\xFD |0
+<UEA48> \xD0\x41 |0
+<UEA49> \xD0\x42 |0
+<UEA4A> \xD0\x43 |0
+<UEA4B> \xD0\x44 |0
+<UEA4C> \xD0\x45 |0
+<UEA4D> \xD0\x46 |0
+<UEA4E> \xD0\x47 |0
+<UEA4F> \xD0\x48 |0
+<UEA50> \xD0\x49 |0
+<UEA51> \xD0\x4A |0
+<UEA52> \xD0\x4B |0
+<UEA53> \xD0\x4C |0
+<UEA54> \xD0\x4D |0
+<UEA55> \xD0\x4E |0
+<UEA56> \xD0\x4F |0
+<UEA57> \xD0\x50 |0
+<UEA58> \xD0\x51 |0
+<UEA59> \xD0\x52 |0
+<UEA5A> \xD0\x53 |0
+<UEA5B> \xD0\x54 |0
+<UEA5C> \xD0\x55 |0
+<UEA5D> \xD0\x56 |0
+<UEA5E> \xD0\x57 |0
+<UEA5F> \xD0\x58 |0
+<UEA60> \xD0\x59 |0
+<UEA61> \xD0\x5A |0
+<UEA62> \xD0\x5B |0
+<UEA63> \xD0\x5C |0
+<UEA64> \xD0\x5D |0
+<UEA65> \xD0\x5E |0
+<UEA66> \xD0\x5F |0
+<UEA67> \xD0\x60 |0
+<UEA68> \xD0\x61 |0
+<UEA69> \xD0\x62 |0
+<UEA6A> \xD0\x63 |0
+<UEA6B> \xD0\x64 |0
+<UEA6C> \xD0\x65 |0
+<UEA6D> \xD0\x66 |0
+<UEA6E> \xD0\x67 |0
+<UEA6F> \xD0\x68 |0
+<UEA70> \xD0\x69 |0
+<UEA71> \xD0\x6A |0
+<UEA72> \xD0\x6B |0
+<UEA73> \xD0\x6C |0
+<UEA74> \xD0\x6D |0
+<UEA75> \xD0\x6E |0
+<UEA76> \xD0\x6F |0
+<UEA77> \xD0\x70 |0
+<UEA78> \xD0\x71 |0
+<UEA79> \xD0\x72 |0
+<UEA7A> \xD0\x73 |0
+<UEA7B> \xD0\x74 |0
+<UEA7C> \xD0\x75 |0
+<UEA7D> \xD0\x76 |0
+<UEA7E> \xD0\x77 |0
+<UEA7F> \xD0\x78 |0
+<UEA80> \xD0\x79 |0
+<UEA81> \xD0\x7A |0
+<UEA82> \xD0\x7B |0
+<UEA83> \xD0\x7C |0
+<UEA84> \xD0\x7D |0
+<UEA85> \xD0\x7E |0
+<UEA86> \xD0\x7F |0
+<UEA87> \xD0\x81 |0
+<UEA88> \xD0\x82 |0
+<UEA89> \xD0\x83 |0
+<UEA8A> \xD0\x84 |0
+<UEA8B> \xD0\x85 |0
+<UEA8C> \xD0\x86 |0
+<UEA8D> \xD0\x87 |0
+<UEA8E> \xD0\x88 |0
+<UEA8F> \xD0\x89 |0
+<UEA90> \xD0\x8A |0
+<UEA91> \xD0\x8B |0
+<UEA92> \xD0\x8C |0
+<UEA93> \xD0\x8D |0
+<UEA94> \xD0\x8E |0
+<UEA95> \xD0\x8F |0
+<UEA96> \xD0\x90 |0
+<UEA97> \xD0\x91 |0
+<UEA98> \xD0\x92 |0
+<UEA99> \xD0\x93 |0
+<UEA9A> \xD0\x94 |0
+<UEA9B> \xD0\x95 |0
+<UEA9C> \xD0\x96 |0
+<UEA9D> \xD0\x97 |0
+<UEA9E> \xD0\x98 |0
+<UEA9F> \xD0\x99 |0
+<UEAA0> \xD0\x9A |0
+<UEAA1> \xD0\x9B |0
+<UEAA2> \xD0\x9C |0
+<UEAA3> \xD0\x9D |0
+<UEAA4> \xD0\x9E |0
+<UEAA5> \xD0\x9F |0
+<UEAA6> \xD0\xA0 |0
+<UEAA7> \xD0\xA1 |0
+<UEAA8> \xD0\xA2 |0
+<UEAA9> \xD0\xA3 |0
+<UEAAA> \xD0\xA4 |0
+<UEAAB> \xD0\xA5 |0
+<UEAAC> \xD0\xA6 |0
+<UEAAD> \xD0\xA7 |0
+<UEAAE> \xD0\xA8 |0
+<UEAAF> \xD0\xA9 |0
+<UEAB0> \xD0\xAA |0
+<UEAB1> \xD0\xAB |0
+<UEAB2> \xD0\xAC |0
+<UEAB3> \xD0\xAD |0
+<UEAB4> \xD0\xAE |0
+<UEAB5> \xD0\xAF |0
+<UEAB6> \xD0\xB0 |0
+<UEAB7> \xD0\xB1 |0
+<UEAB8> \xD0\xB2 |0
+<UEAB9> \xD0\xB3 |0
+<UEABA> \xD0\xB4 |0
+<UEABB> \xD0\xB5 |0
+<UEABC> \xD0\xB6 |0
+<UEABD> \xD0\xB7 |0
+<UEABE> \xD0\xB8 |0
+<UEABF> \xD0\xB9 |0
+<UEAC0> \xD0\xBA |0
+<UEAC1> \xD0\xBB |0
+<UEAC2> \xD0\xBC |0
+<UEAC3> \xD0\xBD |0
+<UEAC4> \xD0\xBE |0
+<UEAC5> \xD0\xBF |0
+<UEAC6> \xD0\xC0 |0
+<UEAC7> \xD0\xC1 |0
+<UEAC8> \xD0\xC2 |0
+<UEAC9> \xD0\xC3 |0
+<UEACA> \xD0\xC4 |0
+<UEACB> \xD0\xC5 |0
+<UEACC> \xD0\xC6 |0
+<UEACD> \xD0\xC7 |0
+<UEACE> \xD0\xC8 |0
+<UEACF> \xD0\xC9 |0
+<UEAD0> \xD0\xCA |0
+<UEAD1> \xD0\xCB |0
+<UEAD2> \xD0\xCC |0
+<UEAD3> \xD0\xCD |0
+<UEAD4> \xD0\xCE |0
+<UEAD5> \xD0\xCF |0
+<UEAD6> \xD0\xD0 |0
+<UEAD7> \xD0\xD1 |0
+<UEAD8> \xD0\xD2 |0
+<UEAD9> \xD0\xD3 |0
+<UEADA> \xD0\xD4 |0
+<UEADB> \xD0\xD5 |0
+<UEADC> \xD0\xD6 |0
+<UEADD> \xD0\xD7 |0
+<UEADE> \xD0\xD8 |0
+<UEADF> \xD0\xD9 |0
+<UEAE0> \xD0\xDA |0
+<UEAE1> \xD0\xDB |0
+<UEAE2> \xD0\xDC |0
+<UEAE3> \xD0\xDD |0
+<UEAE4> \xD0\xDE |0
+<UEAE5> \xD0\xDF |0
+<UEAE6> \xD0\xE0 |0
+<UEAE7> \xD0\xE1 |0
+<UEAE8> \xD0\xE2 |0
+<UEAE9> \xD0\xE3 |0
+<UEAEA> \xD0\xE4 |0
+<UEAEB> \xD0\xE5 |0
+<UEAEC> \xD0\xE6 |0
+<UEAED> \xD0\xE7 |0
+<UEAEE> \xD0\xE8 |0
+<UEAEF> \xD0\xE9 |0
+<UEAF0> \xD0\xEA |0
+<UEAF1> \xD0\xEB |0
+<UEAF2> \xD0\xEC |0
+<UEAF3> \xD0\xED |0
+<UEAF4> \xD0\xEE |0
+<UEAF5> \xD0\xEF |0
+<UEAF6> \xD0\xF0 |0
+<UEAF7> \xD0\xF1 |0
+<UEAF8> \xD0\xF2 |0
+<UEAF9> \xD0\xF3 |0
+<UEAFA> \xD0\xF4 |0
+<UEAFB> \xD0\xF5 |0
+<UEAFC> \xD0\xF6 |0
+<UEAFD> \xD0\xF7 |0
+<UEAFE> \xD0\xF8 |0
+<UEAFF> \xD0\xF9 |0
+<UEB00> \xD0\xFA |0
+<UEB01> \xD0\xFB |0
+<UEB02> \xD0\xFC |0
+<UEB03> \xD0\xFD |0
+<UEB04> \xD1\x41 |0
+<UEB05> \xD1\x42 |0
+<UEB06> \xD1\x43 |0
+<UEB07> \xD1\x44 |0
+<UEB08> \xD1\x45 |0
+<UEB09> \xD1\x46 |0
+<UEB0A> \xD1\x47 |0
+<UEB0B> \xD1\x48 |0
+<UEB0C> \xD1\x49 |0
+<UEB0D> \xD1\x4A |0
+<UEB0E> \xD1\x4B |0
+<UEB0F> \xD1\x4C |0
+<UEB10> \xD1\x4D |0
+<UEB11> \xD1\x4E |0
+<UEB12> \xD1\x4F |0
+<UEB13> \xD1\x50 |0
+<UEB14> \xD1\x51 |0
+<UEB15> \xD1\x52 |0
+<UEB16> \xD1\x53 |0
+<UEB17> \xD1\x54 |0
+<UEB18> \xD1\x55 |0
+<UEB19> \xD1\x56 |0
+<UEB1A> \xD1\x57 |0
+<UEB1B> \xD1\x58 |0
+<UEB1C> \xD1\x59 |0
+<UEB1D> \xD1\x5A |0
+<UEB1E> \xD1\x5B |0
+<UEB1F> \xD1\x5C |0
+<UEB20> \xD1\x5D |0
+<UEB21> \xD1\x5E |0
+<UEB22> \xD1\x5F |0
+<UEB23> \xD1\x60 |0
+<UEB24> \xD1\x61 |0
+<UEB25> \xD1\x62 |0
+<UEB26> \xD1\x63 |0
+<UEB27> \xD1\x64 |0
+<UEB28> \xD1\x65 |0
+<UEB29> \xD1\x66 |0
+<UEB2A> \xD1\x67 |0
+<UEB2B> \xD1\x68 |0
+<UEB2C> \xD1\x69 |0
+<UEB2D> \xD1\x6A |0
+<UEB2E> \xD1\x6B |0
+<UEB2F> \xD1\x6C |0
+<UEB30> \xD1\x6D |0
+<UEB31> \xD1\x6E |0
+<UEB32> \xD1\x6F |0
+<UEB33> \xD1\x70 |0
+<UEB34> \xD1\x71 |0
+<UEB35> \xD1\x72 |0
+<UEB36> \xD1\x73 |0
+<UEB37> \xD1\x74 |0
+<UEB38> \xD1\x75 |0
+<UEB39> \xD1\x76 |0
+<UEB3A> \xD1\x77 |0
+<UEB3B> \xD1\x78 |0
+<UEB3C> \xD1\x79 |0
+<UEB3D> \xD1\x7A |0
+<UEB3E> \xD1\x7B |0
+<UEB3F> \xD1\x7C |0
+<UEB40> \xD1\x7D |0
+<UEB41> \xD1\x7E |0
+<UEB42> \xD1\x7F |0
+<UEB43> \xD1\x81 |0
+<UEB44> \xD1\x82 |0
+<UEB45> \xD1\x83 |0
+<UEB46> \xD1\x84 |0
+<UEB47> \xD1\x85 |0
+<UEB48> \xD1\x86 |0
+<UEB49> \xD1\x87 |0
+<UEB4A> \xD1\x88 |0
+<UEB4B> \xD1\x89 |0
+<UEB4C> \xD1\x8A |0
+<UEB4D> \xD1\x8B |0
+<UEB4E> \xD1\x8C |0
+<UEB4F> \xD1\x8D |0
+<UEB50> \xD1\x8E |0
+<UEB51> \xD1\x8F |0
+<UEB52> \xD1\x90 |0
+<UEB53> \xD1\x91 |0
+<UEB54> \xD1\x92 |0
+<UEB55> \xD1\x93 |0
+<UEB56> \xD1\x94 |0
+<UEB57> \xD1\x95 |0
+<UEB58> \xD1\x96 |0
+<UEB59> \xD1\x97 |0
+<UEB5A> \xD1\x98 |0
+<UEB5B> \xD1\x99 |0
+<UEB5C> \xD1\x9A |0
+<UEB5D> \xD1\x9B |0
+<UEB5E> \xD1\x9C |0
+<UEB5F> \xD1\x9D |0
+<UEB60> \xD1\x9E |0
+<UEB61> \xD1\x9F |0
+<UEB62> \xD1\xA0 |0
+<UEB63> \xD1\xA1 |0
+<UEB64> \xD1\xA2 |0
+<UEB65> \xD1\xA3 |0
+<UEB66> \xD1\xA4 |0
+<UEB67> \xD1\xA5 |0
+<UEB68> \xD1\xA6 |0
+<UEB69> \xD1\xA7 |0
+<UEB6A> \xD1\xA8 |0
+<UEB6B> \xD1\xA9 |0
+<UEB6C> \xD1\xAA |0
+<UEB6D> \xD1\xAB |0
+<UEB6E> \xD1\xAC |0
+<UEB6F> \xD1\xAD |0
+<UEB70> \xD1\xAE |0
+<UEB71> \xD1\xAF |0
+<UEB72> \xD1\xB0 |0
+<UEB73> \xD1\xB1 |0
+<UEB74> \xD1\xB2 |0
+<UEB75> \xD1\xB3 |0
+<UEB76> \xD1\xB4 |0
+<UEB77> \xD1\xB5 |0
+<UEB78> \xD1\xB6 |0
+<UEB79> \xD1\xB7 |0
+<UEB7A> \xD1\xB8 |0
+<UEB7B> \xD1\xB9 |0
+<UEB7C> \xD1\xBA |0
+<UEB7D> \xD1\xBB |0
+<UEB7E> \xD1\xBC |0
+<UEB7F> \xD1\xBD |0
+<UEB80> \xD1\xBE |0
+<UEB81> \xD1\xBF |0
+<UEB82> \xD1\xC0 |0
+<UEB83> \xD1\xC1 |0
+<UEB84> \xD1\xC2 |0
+<UEB85> \xD1\xC3 |0
+<UEB86> \xD1\xC4 |0
+<UEB87> \xD1\xC5 |0
+<UEB88> \xD1\xC6 |0
+<UEB89> \xD1\xC7 |0
+<UEB8A> \xD1\xC8 |0
+<UEB8B> \xD1\xC9 |0
+<UEB8C> \xD1\xCA |0
+<UEB8D> \xD1\xCB |0
+<UEB8E> \xD1\xCC |0
+<UEB8F> \xD1\xCD |0
+<UEB90> \xD1\xCE |0
+<UEB91> \xD1\xCF |0
+<UEB92> \xD1\xD0 |0
+<UEB93> \xD1\xD1 |0
+<UEB94> \xD1\xD2 |0
+<UEB95> \xD1\xD3 |0
+<UEB96> \xD1\xD4 |0
+<UEB97> \xD1\xD5 |0
+<UEB98> \xD1\xD6 |0
+<UEB99> \xD1\xD7 |0
+<UEB9A> \xD1\xD8 |0
+<UEB9B> \xD1\xD9 |0
+<UEB9C> \xD1\xDA |0
+<UEB9D> \xD1\xDB |0
+<UEB9E> \xD1\xDC |0
+<UEB9F> \xD1\xDD |0
+<UEBA0> \xD1\xDE |0
+<UEBA1> \xD1\xDF |0
+<UEBA2> \xD1\xE0 |0
+<UEBA3> \xD1\xE1 |0
+<UEBA4> \xD1\xE2 |0
+<UEBA5> \xD1\xE3 |0
+<UEBA6> \xD1\xE4 |0
+<UEBA7> \xD1\xE5 |0
+<UEBA8> \xD1\xE6 |0
+<UEBA9> \xD1\xE7 |0
+<UEBAA> \xD1\xE8 |0
+<UEBAB> \xD1\xE9 |0
+<UEBAC> \xD1\xEA |0
+<UEBAD> \xD1\xEB |0
+<UEBAE> \xD1\xEC |0
+<UEBAF> \xD1\xED |0
+<UEBB0> \xD1\xEE |0
+<UEBB1> \xD1\xEF |0
+<UEBB2> \xD1\xF0 |0
+<UEBB3> \xD1\xF1 |0
+<UEBB4> \xD1\xF2 |0
+<UEBB5> \xD1\xF3 |0
+<UEBB6> \xD1\xF4 |0
+<UEBB7> \xD1\xF5 |0
+<UEBB8> \xD1\xF6 |0
+<UEBB9> \xD1\xF7 |0
+<UEBBA> \xD1\xF8 |0
+<UEBBB> \xD1\xF9 |0
+<UEBBC> \xD1\xFA |0
+<UEBBD> \xD1\xFB |0
+<UEBBE> \xD1\xFC |0
+<UEBBF> \xD1\xFD |0
+<UEBC0> \xD2\x41 |0
+<UEBC1> \xD2\x42 |0
+<UEBC2> \xD2\x43 |0
+<UEBC3> \xD2\x44 |0
+<UEBC4> \xD2\x45 |0
+<UEBC5> \xD2\x46 |0
+<UEBC6> \xD2\x47 |0
+<UEBC7> \xD2\x48 |0
+<UEBC8> \xD2\x49 |0
+<UEBC9> \xD2\x4A |0
+<UEBCA> \xD2\x4B |0
+<UEBCB> \xD2\x4C |0
+<UEBCC> \xD2\x4D |0
+<UEBCD> \xD2\x4E |0
+<UEBCE> \xD2\x4F |0
+<UEBCF> \xD2\x50 |0
+<UEBD0> \xD2\x51 |0
+<UEBD1> \xD2\x52 |0
+<UEBD2> \xD2\x53 |0
+<UEBD3> \xD2\x54 |0
+<UEBD4> \xD2\x55 |0
+<UEBD5> \xD2\x56 |0
+<UEBD6> \xD2\x57 |0
+<UEBD7> \xD2\x58 |0
+<UEBD8> \xD2\x59 |0
+<UEBD9> \xD2\x5A |0
+<UEBDA> \xD2\x5B |0
+<UEBDB> \xD2\x5C |0
+<UEBDC> \xD2\x5D |0
+<UEBDD> \xD2\x5E |0
+<UEBDE> \xD2\x5F |0
+<UEBDF> \xD2\x60 |0
+<UEBE0> \xD2\x61 |0
+<UEBE1> \xD2\x62 |0
+<UEBE2> \xD2\x63 |0
+<UEBE3> \xD2\x64 |0
+<UEBE4> \xD2\x65 |0
+<UEBE5> \xD2\x66 |0
+<UEBE6> \xD2\x67 |0
+<UEBE7> \xD2\x68 |0
+<UEBE8> \xD2\x69 |0
+<UEBE9> \xD2\x6A |0
+<UEBEA> \xD2\x6B |0
+<UEBEB> \xD2\x6C |0
+<UEBEC> \xD2\x6D |0
+<UEBED> \xD2\x6E |0
+<UEBEE> \xD2\x6F |0
+<UEBEF> \xD2\x70 |0
+<UEBF0> \xD2\x71 |0
+<UEBF1> \xD2\x72 |0
+<UEBF2> \xD2\x73 |0
+<UEBF3> \xD2\x74 |0
+<UEBF4> \xD2\x75 |0
+<UEBF5> \xD2\x76 |0
+<UEBF6> \xD2\x77 |0
+<UEBF7> \xD2\x78 |0
+<UEBF8> \xD2\x79 |0
+<UEBF9> \xD2\x7A |0
+<UEBFA> \xD2\x7B |0
+<UEBFB> \xD2\x7C |0
+<UEBFC> \xD2\x7D |0
+<UEBFD> \xD2\x7E |0
+<UEBFE> \xD2\x7F |0
+<UEBFF> \xD2\x81 |0
+<UEC00> \xD2\x82 |0
+<UEC01> \xD2\x83 |0
+<UEC02> \xD2\x84 |0
+<UEC03> \xD2\x85 |0
+<UEC04> \xD2\x86 |0
+<UEC05> \xD2\x87 |0
+<UEC06> \xD2\x88 |0
+<UEC07> \xD2\x89 |0
+<UEC08> \xD2\x8A |0
+<UEC09> \xD2\x8B |0
+<UEC0A> \xD2\x8C |0
+<UEC0B> \xD2\x8D |0
+<UEC0C> \xD2\x8E |0
+<UEC0D> \xD2\x8F |0
+<UEC0E> \xD2\x90 |0
+<UEC0F> \xD2\x91 |0
+<UEC10> \xD2\x92 |0
+<UEC11> \xD2\x93 |0
+<UEC12> \xD2\x94 |0
+<UEC13> \xD2\x95 |0
+<UEC14> \xD2\x96 |0
+<UEC15> \xD2\x97 |0
+<UEC16> \xD2\x98 |0
+<UEC17> \xD2\x99 |0
+<UEC18> \xD2\x9A |0
+<UEC19> \xD2\x9B |0
+<UEC1A> \xD2\x9C |0
+<UEC1B> \xD2\x9D |0
+<UEC1C> \xD2\x9E |0
+<UEC1D> \xD2\x9F |0
+<UEC1E> \xD2\xA0 |0
+<UEC1F> \xD2\xA1 |0
+<UEC20> \xD2\xA2 |0
+<UEC21> \xD2\xA3 |0
+<UEC22> \xD2\xA4 |0
+<UEC23> \xD2\xA5 |0
+<UEC24> \xD2\xA6 |0
+<UEC25> \xD2\xA7 |0
+<UEC26> \xD2\xA8 |0
+<UEC27> \xD2\xA9 |0
+<UEC28> \xD2\xAA |0
+<UEC29> \xD2\xAB |0
+<UEC2A> \xD2\xAC |0
+<UEC2B> \xD2\xAD |0
+<UEC2C> \xD2\xAE |0
+<UEC2D> \xD2\xAF |0
+<UEC2E> \xD2\xB0 |0
+<UEC2F> \xD2\xB1 |0
+<UEC30> \xD2\xB2 |0
+<UEC31> \xD2\xB3 |0
+<UEC32> \xD2\xB4 |0
+<UEC33> \xD2\xB5 |0
+<UEC34> \xD2\xB6 |0
+<UEC35> \xD2\xB7 |0
+<UEC36> \xD2\xB8 |0
+<UEC37> \xD2\xB9 |0
+<UEC38> \xD2\xBA |0
+<UEC39> \xD2\xBB |0
+<UEC3A> \xD2\xBC |0
+<UEC3B> \xD2\xBD |0
+<UEC3C> \xD2\xBE |0
+<UEC3D> \xD2\xBF |0
+<UEC3E> \xD2\xC0 |0
+<UEC3F> \xD2\xC1 |0
+<UEC40> \xD2\xC2 |0
+<UEC41> \xD2\xC3 |0
+<UEC42> \xD2\xC4 |0
+<UEC43> \xD2\xC5 |0
+<UEC44> \xD2\xC6 |0
+<UEC45> \xD2\xC7 |0
+<UEC46> \xD2\xC8 |0
+<UEC47> \xD2\xC9 |0
+<UEC48> \xD2\xCA |0
+<UEC49> \xD2\xCB |0
+<UEC4A> \xD2\xCC |0
+<UEC4B> \xD2\xCD |0
+<UEC4C> \xD2\xCE |0
+<UEC4D> \xD2\xCF |0
+<UEC4E> \xD2\xD0 |0
+<UEC4F> \xD2\xD1 |0
+<UEC50> \xD2\xD2 |0
+<UEC51> \xD2\xD3 |0
+<UEC52> \xD2\xD4 |0
+<UEC53> \xD2\xD5 |0
+<UEC54> \xD2\xD6 |0
+<UEC55> \xD2\xD7 |0
+<UEC56> \xD2\xD8 |0
+<UEC57> \xD2\xD9 |0
+<UEC58> \xD2\xDA |0
+<UEC59> \xD2\xDB |0
+<UEC5A> \xD2\xDC |0
+<UEC5B> \xD2\xDD |0
+<UEC5C> \xD2\xDE |0
+<UEC5D> \xD2\xDF |0
+<UEC5E> \xD2\xE0 |0
+<UEC5F> \xD2\xE1 |0
+<UEC60> \xD2\xE2 |0
+<UEC61> \xD2\xE3 |0
+<UEC62> \xD2\xE4 |0
+<UEC63> \xD2\xE5 |0
+<UEC64> \xD2\xE6 |0
+<UEC65> \xD2\xE7 |0
+<UEC66> \xD2\xE8 |0
+<UEC67> \xD2\xE9 |0
+<UEC68> \xD2\xEA |0
+<UEC69> \xD2\xEB |0
+<UEC6A> \xD2\xEC |0
+<UEC6B> \xD2\xED |0
+<UEC6C> \xD2\xEE |0
+<UEC6D> \xD2\xEF |0
+<UEC6E> \xD2\xF0 |0
+<UEC6F> \xD2\xF1 |0
+<UEC70> \xD2\xF2 |0
+<UEC71> \xD2\xF3 |0
+<UEC72> \xD2\xF4 |0
+<UEC73> \xD2\xF5 |0
+<UEC74> \xD2\xF6 |0
+<UEC75> \xD2\xF7 |0
+<UEC76> \xD2\xF8 |0
+<UEC77> \xD2\xF9 |0
+<UEC78> \xD2\xFA |0
+<UEC79> \xD2\xFB |0
+<UEC7A> \xD2\xFC |0
+<UEC7B> \xD2\xFD |0
+<UEC7C> \xD3\x41 |0
+<UEC7D> \xD3\x42 |0
+<UEC7E> \xD3\x43 |0
+<UEC7F> \xD3\x44 |0
+<UEC80> \xD3\x45 |0
+<UEC81> \xD3\x46 |0
+<UEC82> \xD3\x47 |0
+<UEC83> \xD3\x48 |0
+<UEC84> \xD3\x49 |0
+<UEC85> \xD3\x4A |0
+<UEC86> \xD3\x4B |0
+<UEC87> \xD3\x4C |0
+<UEC88> \xD3\x4D |0
+<UEC89> \xD3\x4E |0
+<UEC8A> \xD3\x4F |0
+<UEC8B> \xD3\x50 |0
+<UEC8C> \xD3\x51 |0
+<UEC8D> \xD3\x52 |0
+<UEC8E> \xD3\x53 |0
+<UEC8F> \xD3\x54 |0
+<UEC90> \xD3\x55 |0
+<UEC91> \xD3\x56 |0
+<UEC92> \xD3\x57 |0
+<UEC93> \xD3\x58 |0
+<UEC94> \xD3\x59 |0
+<UEC95> \xD3\x5A |0
+<UEC96> \xD3\x5B |0
+<UEC97> \xD3\x5C |0
+<UEC98> \xD3\x5D |0
+<UEC99> \xD3\x5E |0
+<UEC9A> \xD3\x5F |0
+<UEC9B> \xD3\x60 |0
+<UEC9C> \xD3\x61 |0
+<UEC9D> \xD3\x62 |0
+<UEC9E> \xD3\x63 |0
+<UEC9F> \xD3\x64 |0
+<UECA0> \xD3\x65 |0
+<UECA1> \xD3\x66 |0
+<UECA2> \xD3\x67 |0
+<UECA3> \xD3\x68 |0
+<UECA4> \xD3\x69 |0
+<UECA5> \xD3\x6A |0
+<UECA6> \xD3\x6B |0
+<UECA7> \xD3\x6C |0
+<UECA8> \xD3\x6D |0
+<UECA9> \xD3\x6E |0
+<UECAA> \xD3\x6F |0
+<UECAB> \xD3\x70 |0
+<UECAC> \xD3\x71 |0
+<UECAD> \xD3\x72 |0
+<UECAE> \xD3\x73 |0
+<UECAF> \xD3\x74 |0
+<UECB0> \xD3\x75 |0
+<UECB1> \xD3\x76 |0
+<UECB2> \xD3\x77 |0
+<UECB3> \xD3\x78 |0
+<UECB4> \xD3\x79 |0
+<UECB5> \xD3\x7A |0
+<UECB6> \xD3\x7B |0
+<UECB7> \xD3\x7C |0
+<UECB8> \xD3\x7D |0
+<UECB9> \xD3\x7E |0
+<UECBA> \xD3\x7F |0
+<UECBB> \xD3\x81 |0
+<UECBC> \xD3\x82 |0
+<UECBD> \xD3\x83 |0
+<UECBE> \xD3\x84 |0
+<UECBF> \xD3\x85 |0
+<UECC0> \xD3\x86 |0
+<UECC1> \xD3\x87 |0
+<UECC2> \xD3\x88 |0
+<UECC3> \xD3\x89 |0
+<UECC4> \xD3\x8A |0
+<UECC5> \xD3\x8B |0
+<UECC6> \xD3\x8C |0
+<UECC7> \xD3\x8D |0
+<UECC8> \xD3\x8E |0
+<UECC9> \xD3\x8F |0
+<UECCA> \xD3\x90 |0
+<UECCB> \xD3\x91 |0
+<UECCC> \xD3\x92 |0
+<UECCD> \xD3\x93 |0
+<UECCE> \xD3\x94 |0
+<UECCF> \xD3\x95 |0
+<UECD0> \xD3\x96 |0
+<UECD1> \xD3\x97 |0
+<UECD2> \xD3\x98 |0
+<UECD3> \xD3\x99 |0
+<UECD4> \xD3\x9A |0
+<UECD5> \xD3\x9B |0
+<UECD6> \xD3\x9C |0
+<UECD7> \xD3\x9D |0
+<UECD8> \xD3\x9E |0
+<UECD9> \xD3\x9F |0
+<UECDA> \xD3\xA0 |0
+<UECDB> \xD3\xA1 |0
+<UECDC> \xD3\xA2 |0
+<UECDD> \xD3\xA3 |0
+<UECDE> \xD3\xA4 |0
+<UECDF> \xD3\xA5 |0
+<UECE0> \xD3\xA6 |0
+<UECE1> \xD3\xA7 |0
+<UECE2> \xD3\xA8 |0
+<UECE3> \xD3\xA9 |0
+<UECE4> \xD3\xAA |0
+<UECE5> \xD3\xAB |0
+<UECE6> \xD3\xAC |0
+<UECE7> \xD3\xAD |0
+<UECE8> \xD3\xAE |0
+<UECE9> \xD3\xAF |0
+<UECEA> \xD3\xB0 |0
+<UECEB> \xD3\xB1 |0
+<UECEC> \xD3\xB2 |0
+<UECED> \xD3\xB3 |0
+<UECEE> \xD3\xB4 |0
+<UECEF> \xD3\xB5 |0
+<UECF0> \xD3\xB6 |0
+<UECF1> \xD3\xB7 |0
+<UECF2> \xD3\xB8 |0
+<UECF3> \xD3\xB9 |0
+<UECF4> \xD3\xBA |0
+<UECF5> \xD3\xBB |0
+<UECF6> \xD3\xBC |0
+<UECF7> \xD3\xBD |0
+<UECF8> \xD3\xBE |0
+<UECF9> \xD3\xBF |0
+<UECFA> \xD3\xC0 |0
+<UECFB> \xD3\xC1 |0
+<UECFC> \xD3\xC2 |0
+<UECFD> \xD3\xC3 |0
+<UECFE> \xD3\xC4 |0
+<UECFF> \xD3\xC5 |0
+<UED00> \xD3\xC6 |0
+<UED01> \xD3\xC7 |0
+<UED02> \xD3\xC8 |0
+<UED03> \xD3\xC9 |0
+<UED04> \xD3\xCA |0
+<UED05> \xD3\xCB |0
+<UED06> \xD3\xCC |0
+<UED07> \xD3\xCD |0
+<UED08> \xD3\xCE |0
+<UED09> \xD3\xCF |0
+<UED0A> \xD3\xD0 |0
+<UED0B> \xD3\xD1 |0
+<UED0C> \xD3\xD2 |0
+<UED0D> \xD3\xD3 |0
+<UED0E> \xD3\xD4 |0
+<UED0F> \xD3\xD5 |0
+<UED10> \xD3\xD6 |0
+<UED11> \xD3\xD7 |0
+<UED12> \xD3\xD8 |0
+<UED13> \xD3\xD9 |0
+<UED14> \xD3\xDA |0
+<UED15> \xD3\xDB |0
+<UED16> \xD3\xDC |0
+<UED17> \xD3\xDD |0
+<UED18> \xD3\xDE |0
+<UED19> \xD3\xDF |0
+<UED1A> \xD3\xE0 |0
+<UED1B> \xD3\xE1 |0
+<UED1C> \xD3\xE2 |0
+<UED1D> \xD3\xE3 |0
+<UED1E> \xD3\xE4 |0
+<UED1F> \xD3\xE5 |0
+<UED20> \xD3\xE6 |0
+<UED21> \xD3\xE7 |0
+<UED22> \xD3\xE8 |0
+<UED23> \xD3\xE9 |0
+<UED24> \xD3\xEA |0
+<UED25> \xD3\xEB |0
+<UED26> \xD3\xEC |0
+<UED27> \xD3\xED |0
+<UED28> \xD3\xEE |0
+<UED29> \xD3\xEF |0
+<UED2A> \xD3\xF0 |0
+<UED2B> \xD3\xF1 |0
+<UED2C> \xD3\xF2 |0
+<UED2D> \xD3\xF3 |0
+<UED2E> \xD3\xF4 |0
+<UED2F> \xD3\xF5 |0
+<UED30> \xD3\xF6 |0
+<UED31> \xD3\xF7 |0
+<UED32> \xD3\xF8 |0
+<UED33> \xD3\xF9 |0
+<UED34> \xD3\xFA |0
+<UED35> \xD3\xFB |0
+<UED36> \xD3\xFC |0
+<UED37> \xD3\xFD |0
+<UED38> \xD4\x41 |0
+<UED39> \xD4\x42 |0
+<UED3A> \xD4\x43 |0
+<UED3B> \xD4\x44 |0
+<UED3C> \xD4\x45 |0
+<UED3D> \xD4\x46 |0
+<UED3E> \xD4\x47 |0
+<UED3F> \xD4\x48 |0
+<UED40> \xD4\x49 |0
+<UED41> \xD4\x4A |0
+<UED42> \xD4\x4B |0
+<UED43> \xD4\x4C |0
+<UED44> \xD4\x4D |0
+<UED45> \xD4\x4E |0
+<UED46> \xD4\x4F |0
+<UED47> \xD4\x50 |0
+<UED48> \xD4\x51 |0
+<UED49> \xD4\x52 |0
+<UED4A> \xD4\x53 |0
+<UED4B> \xD4\x54 |0
+<UED4C> \xD4\x55 |0
+<UED4D> \xD4\x56 |0
+<UED4E> \xD4\x57 |0
+<UED4F> \xD4\x58 |0
+<UED50> \xD4\x59 |0
+<UED51> \xD4\x5A |0
+<UED52> \xD4\x5B |0
+<UED53> \xD4\x5C |0
+<UED54> \xD4\x5D |0
+<UED55> \xD4\x5E |0
+<UED56> \xD4\x5F |0
+<UED57> \xD4\x60 |0
+<UED58> \xD4\x61 |0
+<UED59> \xD4\x62 |0
+<UED5A> \xD4\x63 |0
+<UED5B> \xD4\x64 |0
+<UED5C> \xD4\x65 |0
+<UED5D> \xD4\x66 |0
+<UED5E> \xD4\x67 |0
+<UED5F> \xD4\x68 |0
+<UED60> \xD4\x69 |0
+<UED61> \xD4\x6A |0
+<UED62> \xD4\x6B |0
+<UED63> \xD4\x6C |0
+<UED64> \xD4\x6D |0
+<UED65> \xD4\x6E |0
+<UED66> \xD4\x6F |0
+<UED67> \xD4\x70 |0
+<UED68> \xD4\x71 |0
+<UED69> \xD4\x72 |0
+<UED6A> \xD4\x73 |0
+<UED6B> \xD4\x74 |0
+<UED6C> \xD4\x75 |0
+<UED6D> \xD4\x76 |0
+<UED6E> \xD4\x77 |0
+<UED6F> \xD4\x78 |0
+<UED70> \xD4\x79 |0
+<UED71> \xD4\x7A |0
+<UED72> \xD4\x7B |0
+<UED73> \xD4\x7C |0
+<UED74> \xD4\x7D |0
+<UED75> \xD4\x7E |0
+<UED76> \xD4\x7F |0
+<UED77> \xD4\x81 |0
+<UED78> \xD4\x82 |0
+<UED79> \xD4\x83 |0
+<UED7A> \xD4\x84 |0
+<UED7B> \xD4\x85 |0
+<UED7C> \xD4\x86 |0
+<UED7D> \xD4\x87 |0
+<UED7E> \xD4\x88 |0
+<UED7F> \xD4\x89 |0
+<UED80> \xD4\x8A |0
+<UED81> \xD4\x8B |0
+<UED82> \xD4\x8C |0
+<UED83> \xD4\x8D |0
+<UED84> \xD4\x8E |0
+<UED85> \xD4\x8F |0
+<UED86> \xD4\x90 |0
+<UED87> \xD4\x91 |0
+<UED88> \xD4\x92 |0
+<UED89> \xD4\x93 |0
+<UED8A> \xD4\x94 |0
+<UED8B> \xD4\x95 |0
+<UED8C> \xD4\x96 |0
+<UED8D> \xD4\x97 |0
+<UED8E> \xD4\x98 |0
+<UED8F> \xD4\x99 |0
+<UED90> \xD4\x9A |0
+<UED91> \xD4\x9B |0
+<UED92> \xD4\x9C |0
+<UED93> \xD4\x9D |0
+<UED94> \xD4\x9E |0
+<UED95> \xD4\x9F |0
+<UED96> \xD4\xA0 |0
+<UED97> \xD4\xA1 |0
+<UED98> \xD4\xA2 |0
+<UED99> \xD4\xA3 |0
+<UED9A> \xD4\xA4 |0
+<UED9B> \xD4\xA5 |0
+<UED9C> \xD4\xA6 |0
+<UED9D> \xD4\xA7 |0
+<UED9E> \xD4\xA8 |0
+<UED9F> \xD4\xA9 |0
+<UEDA0> \xD4\xAA |0
+<UEDA1> \xD4\xAB |0
+<UEDA2> \xD4\xAC |0
+<UEDA3> \xD4\xAD |0
+<UEDA4> \xD4\xAE |0
+<UEDA5> \xD4\xAF |0
+<UEDA6> \xD4\xB0 |0
+<UEDA7> \xD4\xB1 |0
+<UEDA8> \xD4\xB2 |0
+<UEDA9> \xD4\xB3 |0
+<UEDAA> \xD4\xB4 |0
+<UEDAB> \xD4\xB5 |0
+<UEDAC> \xD4\xB6 |0
+<UEDAD> \xD4\xB7 |0
+<UEDAE> \xD4\xB8 |0
+<UEDAF> \xD4\xB9 |0
+<UEDB0> \xD4\xBA |0
+<UEDB1> \xD4\xBB |0
+<UEDB2> \xD4\xBC |0
+<UEDB3> \xD4\xBD |0
+<UEDB4> \xD4\xBE |0
+<UEDB5> \xD4\xBF |0
+<UEDB6> \xD4\xC0 |0
+<UEDB7> \xD4\xC1 |0
+<UEDB8> \xD4\xC2 |0
+<UEDB9> \xD4\xC3 |0
+<UEDBA> \xD4\xC4 |0
+<UEDBB> \xD4\xC5 |0
+<UEDBC> \xD4\xC6 |0
+<UEDBD> \xD4\xC7 |0
+<UEDBE> \xD4\xC8 |0
+<UEDBF> \xD4\xC9 |0
+<UEDC0> \xD4\xCA |0
+<UEDC1> \xD4\xCB |0
+<UEDC2> \xD4\xCC |0
+<UEDC3> \xD4\xCD |0
+<UEDC4> \xD4\xCE |0
+<UEDC5> \xD4\xCF |0
+<UEDC6> \xD4\xD0 |0
+<UEDC7> \xD4\xD1 |0
+<UEDC8> \xD4\xD2 |0
+<UEDC9> \xD4\xD3 |0
+<UEDCA> \xD4\xD4 |0
+<UEDCB> \xD4\xD5 |0
+<UEDCC> \xD4\xD6 |0
+<UEDCD> \xD4\xD7 |0
+<UEDCE> \xD4\xD8 |0
+<UEDCF> \xD4\xD9 |0
+<UEDD0> \xD4\xDA |0
+<UEDD1> \xD4\xDB |0
+<UEDD2> \xD4\xDC |0
+<UEDD3> \xD4\xDD |0
+<UEDD4> \xD4\xDE |0
+<UEDD5> \xD4\xDF |0
+<UEDD6> \xD4\xE0 |0
+<UEDD7> \xD4\xE1 |0
+<UEDD8> \xD4\xE2 |0
+<UEDD9> \xD4\xE3 |0
+<UEDDA> \xD4\xE4 |0
+<UEDDB> \xD4\xE5 |0
+<UEDDC> \xD4\xE6 |0
+<UEDDD> \xD4\xE7 |0
+<UEDDE> \xD4\xE8 |0
+<UEDDF> \xD4\xE9 |0
+<UEDE0> \xD4\xEA |0
+<UEDE1> \xD4\xEB |0
+<UEDE2> \xD4\xEC |0
+<UEDE3> \xD4\xED |0
+<UEDE4> \xD4\xEE |0
+<UEDE5> \xD4\xEF |0
+<UEDE6> \xD4\xF0 |0
+<UEDE7> \xD4\xF1 |0
+<UEDE8> \xD4\xF2 |0
+<UEDE9> \xD4\xF3 |0
+<UEDEA> \xD4\xF4 |0
+<UEDEB> \xD4\xF5 |0
+<UEDEC> \xD4\xF6 |0
+<UEDED> \xD4\xF7 |0
+<UEDEE> \xD4\xF8 |0
+<UEDEF> \xD4\xF9 |0
+<UEDF0> \xD4\xFA |0
+<UEDF1> \xD4\xFB |0
+<UEDF2> \xD4\xFC |0
+<UEDF3> \xD4\xFD |0
+<UEDF4> \xD5\x41 |0
+<UEDF5> \xD5\x42 |0
+<UEDF6> \xD5\x43 |0
+<UEDF7> \xD5\x44 |0
+<UEDF8> \xD5\x45 |0
+<UEDF9> \xD5\x46 |0
+<UEDFA> \xD5\x47 |0
+<UEDFB> \xD5\x48 |0
+<UEDFC> \xD5\x49 |0
+<UEDFD> \xD5\x4A |0
+<UEDFE> \xD5\x4B |0
+<UEDFF> \xD5\x4C |0
+<UEE00> \xD5\x4D |0
+<UEE01> \xD5\x4E |0
+<UEE02> \xD5\x4F |0
+<UEE03> \xD5\x50 |0
+<UEE04> \xD5\x51 |0
+<UEE05> \xD5\x52 |0
+<UEE06> \xD5\x53 |0
+<UEE07> \xD5\x54 |0
+<UEE08> \xD5\x55 |0
+<UEE09> \xD5\x56 |0
+<UEE0A> \xD5\x57 |0
+<UEE0B> \xD5\x58 |0
+<UEE0C> \xD5\x59 |0
+<UEE0D> \xD5\x5A |0
+<UEE0E> \xD5\x5B |0
+<UEE0F> \xD5\x5C |0
+<UEE10> \xD5\x5D |0
+<UEE11> \xD5\x5E |0
+<UEE12> \xD5\x5F |0
+<UEE13> \xD5\x60 |0
+<UEE14> \xD5\x61 |0
+<UEE15> \xD5\x62 |0
+<UEE16> \xD5\x63 |0
+<UEE17> \xD5\x64 |0
+<UEE18> \xD5\x65 |0
+<UEE19> \xD5\x66 |0
+<UEE1A> \xD5\x67 |0
+<UEE1B> \xD5\x68 |0
+<UEE1C> \xD5\x69 |0
+<UEE1D> \xD5\x6A |0
+<UEE1E> \xD5\x6B |0
+<UEE1F> \xD5\x6C |0
+<UEE20> \xD5\x6D |0
+<UEE21> \xD5\x6E |0
+<UEE22> \xD5\x6F |0
+<UEE23> \xD5\x70 |0
+<UEE24> \xD5\x71 |0
+<UEE25> \xD5\x72 |0
+<UEE26> \xD5\x73 |0
+<UEE27> \xD5\x74 |0
+<UEE28> \xD5\x75 |0
+<UEE29> \xD5\x76 |0
+<UEE2A> \xD5\x77 |0
+<UEE2B> \xD5\x78 |0
+<UEE2C> \xD5\x79 |0
+<UEE2D> \xD5\x7A |0
+<UEE2E> \xD5\x7B |0
+<UEE2F> \xD5\x7C |0
+<UEE30> \xD5\x7D |0
+<UEE31> \xD5\x7E |0
+<UEE32> \xD5\x7F |0
+<UEE33> \xD5\x81 |0
+<UEE34> \xD5\x82 |0
+<UEE35> \xD5\x83 |0
+<UEE36> \xD5\x84 |0
+<UEE37> \xD5\x85 |0
+<UEE38> \xD5\x86 |0
+<UEE39> \xD5\x87 |0
+<UEE3A> \xD5\x88 |0
+<UEE3B> \xD5\x89 |0
+<UEE3C> \xD5\x8A |0
+<UEE3D> \xD5\x8B |0
+<UEE3E> \xD5\x8C |0
+<UEE3F> \xD5\x8D |0
+<UEE40> \xD5\x8E |0
+<UEE41> \xD5\x8F |0
+<UEE42> \xD5\x90 |0
+<UEE43> \xD5\x91 |0
+<UEE44> \xD5\x92 |0
+<UEE45> \xD5\x93 |0
+<UEE46> \xD5\x94 |0
+<UEE47> \xD5\x95 |0
+<UEE48> \xD5\x96 |0
+<UEE49> \xD5\x97 |0
+<UEE4A> \xD5\x98 |0
+<UEE4B> \xD5\x99 |0
+<UEE4C> \xD5\x9A |0
+<UEE4D> \xD5\x9B |0
+<UEE4E> \xD5\x9C |0
+<UEE4F> \xD5\x9D |0
+<UEE50> \xD5\x9E |0
+<UEE51> \xD5\x9F |0
+<UEE52> \xD5\xA0 |0
+<UEE53> \xD5\xA1 |0
+<UEE54> \xD5\xA2 |0
+<UEE55> \xD5\xA3 |0
+<UEE56> \xD5\xA4 |0
+<UEE57> \xD5\xA5 |0
+<UEE58> \xD5\xA6 |0
+<UEE59> \xD5\xA7 |0
+<UEE5A> \xD5\xA8 |0
+<UEE5B> \xD5\xA9 |0
+<UEE5C> \xD5\xAA |0
+<UEE5D> \xD5\xAB |0
+<UEE5E> \xD5\xAC |0
+<UEE5F> \xD5\xAD |0
+<UEE60> \xD5\xAE |0
+<UEE61> \xD5\xAF |0
+<UEE62> \xD5\xB0 |0
+<UEE63> \xD5\xB1 |0
+<UEE64> \xD5\xB2 |0
+<UEE65> \xD5\xB3 |0
+<UEE66> \xD5\xB4 |0
+<UEE67> \xD5\xB5 |0
+<UEE68> \xD5\xB6 |0
+<UEE69> \xD5\xB7 |0
+<UEE6A> \xD5\xB8 |0
+<UEE6B> \xD5\xB9 |0
+<UEE6C> \xD5\xBA |0
+<UEE6D> \xD5\xBB |0
+<UEE6E> \xD5\xBC |0
+<UEE6F> \xD5\xBD |0
+<UEE70> \xD5\xBE |0
+<UEE71> \xD5\xBF |0
+<UEE72> \xD5\xC0 |0
+<UEE73> \xD5\xC1 |0
+<UEE74> \xD5\xC2 |0
+<UEE75> \xD5\xC3 |0
+<UEE76> \xD5\xC4 |0
+<UEE77> \xD5\xC5 |0
+<UEE78> \xD5\xC6 |0
+<UEE79> \xD5\xC7 |0
+<UEE7A> \xD5\xC8 |0
+<UEE7B> \xD5\xC9 |0
+<UEE7C> \xD5\xCA |0
+<UEE7D> \xD5\xCB |0
+<UEE7E> \xD5\xCC |0
+<UEE7F> \xD5\xCD |0
+<UEE80> \xD5\xCE |0
+<UEE81> \xD5\xCF |0
+<UEE82> \xD5\xD0 |0
+<UEE83> \xD5\xD1 |0
+<UEE84> \xD5\xD2 |0
+<UEE85> \xD5\xD3 |0
+<UEE86> \xD5\xD4 |0
+<UEE87> \xD5\xD5 |0
+<UEE88> \xD5\xD6 |0
+<UEE89> \xD5\xD7 |0
+<UEE8A> \xD5\xD8 |0
+<UEE8B> \xD5\xD9 |0
+<UEE8C> \xD5\xDA |0
+<UEE8D> \xD5\xDB |0
+<UEE8E> \xD5\xDC |0
+<UEE8F> \xD5\xDD |0
+<UEE90> \xD5\xDE |0
+<UEE91> \xD5\xDF |0
+<UEE92> \xD5\xE0 |0
+<UEE93> \xD5\xE1 |0
+<UEE94> \xD5\xE2 |0
+<UEE95> \xD5\xE3 |0
+<UEE96> \xD5\xE4 |0
+<UEE97> \xD5\xE5 |0
+<UEE98> \xD5\xE6 |0
+<UEE99> \xD5\xE7 |0
+<UEE9A> \xD5\xE8 |0
+<UEE9B> \xD5\xE9 |0
+<UEE9C> \xD5\xEA |0
+<UEE9D> \xD5\xEB |0
+<UEE9E> \xD5\xEC |0
+<UEE9F> \xD5\xED |0
+<UEEA0> \xD5\xEE |0
+<UEEA1> \xD5\xEF |0
+<UEEA2> \xD5\xF0 |0
+<UEEA3> \xD5\xF1 |0
+<UEEA4> \xD5\xF2 |0
+<UEEA5> \xD5\xF3 |0
+<UEEA6> \xD5\xF4 |0
+<UEEA7> \xD5\xF5 |0
+<UEEA8> \xD5\xF6 |0
+<UEEA9> \xD5\xF7 |0
+<UEEAA> \xD5\xF8 |0
+<UEEAB> \xD5\xF9 |0
+<UEEAC> \xD5\xFA |0
+<UEEAD> \xD5\xFB |0
+<UEEAE> \xD5\xFC |0
+<UEEAF> \xD5\xFD |0
+<UEEB0> \xD6\x41 |0
+<UEEB1> \xD6\x42 |0
+<UEEB2> \xD6\x43 |0
+<UEEB3> \xD6\x44 |0
+<UEEB4> \xD6\x45 |0
+<UEEB5> \xD6\x46 |0
+<UEEB6> \xD6\x47 |0
+<UEEB7> \xD6\x48 |0
+<UEEB8> \xD6\x49 |0
+<UEEB9> \xD6\x4A |0
+<UEEBA> \xD6\x4B |0
+<UEEBB> \xD6\x4C |0
+<UEEBC> \xD6\x4D |0
+<UEEBD> \xD6\x4E |0
+<UEEBE> \xD6\x4F |0
+<UEEBF> \xD6\x50 |0
+<UEEC0> \xD6\x51 |0
+<UEEC1> \xD6\x52 |0
+<UEEC2> \xD6\x53 |0
+<UEEC3> \xD6\x54 |0
+<UEEC4> \xD6\x55 |0
+<UEEC5> \xD6\x56 |0
+<UEEC6> \xD6\x57 |0
+<UEEC7> \xD6\x58 |0
+<UEEC8> \xD6\x59 |0
+<UEEC9> \xD6\x5A |0
+<UEECA> \xD6\x5B |0
+<UEECB> \xD6\x5C |0
+<UEECC> \xD6\x5D |0
+<UEECD> \xD6\x5E |0
+<UEECE> \xD6\x5F |0
+<UEECF> \xD6\x60 |0
+<UEED0> \xD6\x61 |0
+<UEED1> \xD6\x62 |0
+<UEED2> \xD6\x63 |0
+<UEED3> \xD6\x64 |0
+<UEED4> \xD6\x65 |0
+<UEED5> \xD6\x66 |0
+<UEED6> \xD6\x67 |0
+<UEED7> \xD6\x68 |0
+<UEED8> \xD6\x69 |0
+<UEED9> \xD6\x6A |0
+<UEEDA> \xD6\x6B |0
+<UEEDB> \xD6\x6C |0
+<UEEDC> \xD6\x6D |0
+<UEEDD> \xD6\x6E |0
+<UEEDE> \xD6\x6F |0
+<UEEDF> \xD6\x70 |0
+<UEEE0> \xD6\x71 |0
+<UEEE1> \xD6\x72 |0
+<UEEE2> \xD6\x73 |0
+<UEEE3> \xD6\x74 |0
+<UEEE4> \xD6\x75 |0
+<UEEE5> \xD6\x76 |0
+<UEEE6> \xD6\x77 |0
+<UEEE7> \xD6\x78 |0
+<UEEE8> \xD6\x79 |0
+<UEEE9> \xD6\x7A |0
+<UEEEA> \xD6\x7B |0
+<UEEEB> \xD6\x7C |0
+<UEEEC> \xD6\x7D |0
+<UEEED> \xD6\x7E |0
+<UEEEE> \xD6\x7F |0
+<UEEEF> \xD6\x81 |0
+<UEEF0> \xD6\x82 |0
+<UEEF1> \xD6\x83 |0
+<UEEF2> \xD6\x84 |0
+<UEEF3> \xD6\x85 |0
+<UEEF4> \xD6\x86 |0
+<UEEF5> \xD6\x87 |0
+<UEEF6> \xD6\x88 |0
+<UEEF7> \xD6\x89 |0
+<UEEF8> \xD6\x8A |0
+<UEEF9> \xD6\x8B |0
+<UEEFA> \xD6\x8C |0
+<UEEFB> \xD6\x8D |0
+<UEEFC> \xD6\x8E |0
+<UEEFD> \xD6\x8F |0
+<UEEFE> \xD6\x90 |0
+<UEEFF> \xD6\x91 |0
+<UEF00> \xD6\x92 |0
+<UEF01> \xD6\x93 |0
+<UEF02> \xD6\x94 |0
+<UEF03> \xD6\x95 |0
+<UEF04> \xD6\x96 |0
+<UEF05> \xD6\x97 |0
+<UEF06> \xD6\x98 |0
+<UEF07> \xD6\x99 |0
+<UEF08> \xD6\x9A |0
+<UEF09> \xD6\x9B |0
+<UEF0A> \xD6\x9C |0
+<UEF0B> \xD6\x9D |0
+<UEF0C> \xD6\x9E |0
+<UEF0D> \xD6\x9F |0
+<UEF0E> \xD6\xA0 |0
+<UEF0F> \xD6\xA1 |0
+<UEF10> \xD6\xA2 |0
+<UEF11> \xD6\xA3 |0
+<UEF12> \xD6\xA4 |0
+<UEF13> \xD6\xA5 |0
+<UEF14> \xD6\xA6 |0
+<UEF15> \xD6\xA7 |0
+<UEF16> \xD6\xA8 |0
+<UEF17> \xD6\xA9 |0
+<UEF18> \xD6\xAA |0
+<UEF19> \xD6\xAB |0
+<UEF1A> \xD6\xAC |0
+<UEF1B> \xD6\xAD |0
+<UEF1C> \xD6\xAE |0
+<UEF1D> \xD6\xAF |0
+<UEF1E> \xD6\xB0 |0
+<UEF1F> \xD6\xB1 |0
+<UEF20> \xD6\xB2 |0
+<UEF21> \xD6\xB3 |0
+<UEF22> \xD6\xB4 |0
+<UEF23> \xD6\xB5 |0
+<UEF24> \xD6\xB6 |0
+<UEF25> \xD6\xB7 |0
+<UEF26> \xD6\xB8 |0
+<UEF27> \xD6\xB9 |0
+<UEF28> \xD6\xBA |0
+<UEF29> \xD6\xBB |0
+<UEF2A> \xD6\xBC |0
+<UEF2B> \xD6\xBD |0
+<UEF2C> \xD6\xBE |0
+<UEF2D> \xD6\xBF |0
+<UEF2E> \xD6\xC0 |0
+<UEF2F> \xD6\xC1 |0
+<UEF30> \xD6\xC2 |0
+<UEF31> \xD6\xC3 |0
+<UEF32> \xD6\xC4 |0
+<UEF33> \xD6\xC5 |0
+<UEF34> \xD6\xC6 |0
+<UEF35> \xD6\xC7 |0
+<UEF36> \xD6\xC8 |0
+<UEF37> \xD6\xC9 |0
+<UEF38> \xD6\xCA |0
+<UEF39> \xD6\xCB |0
+<UEF3A> \xD6\xCC |0
+<UEF3B> \xD6\xCD |0
+<UEF3C> \xD6\xCE |0
+<UEF3D> \xD6\xCF |0
+<UEF3E> \xD6\xD0 |0
+<UEF3F> \xD6\xD1 |0
+<UEF40> \xD6\xD2 |0
+<UEF41> \xD6\xD3 |0
+<UEF42> \xD6\xD4 |0
+<UEF43> \xD6\xD5 |0
+<UEF44> \xD6\xD6 |0
+<UEF45> \xD6\xD7 |0
+<UEF46> \xD6\xD8 |0
+<UEF47> \xD6\xD9 |0
+<UEF48> \xD6\xDA |0
+<UEF49> \xD6\xDB |0
+<UEF4A> \xD6\xDC |0
+<UEF4B> \xD6\xDD |0
+<UEF4C> \xD6\xDE |0
+<UEF4D> \xD6\xDF |0
+<UEF4E> \xD6\xE0 |0
+<UEF4F> \xD6\xE1 |0
+<UEF50> \xD6\xE2 |0
+<UEF51> \xD6\xE3 |0
+<UEF52> \xD6\xE4 |0
+<UEF53> \xD6\xE5 |0
+<UEF54> \xD6\xE6 |0
+<UEF55> \xD6\xE7 |0
+<UEF56> \xD6\xE8 |0
+<UEF57> \xD6\xE9 |0
+<UEF58> \xD6\xEA |0
+<UEF59> \xD6\xEB |0
+<UEF5A> \xD6\xEC |0
+<UEF5B> \xD6\xED |0
+<UEF5C> \xD6\xEE |0
+<UEF5D> \xD6\xEF |0
+<UEF5E> \xD6\xF0 |0
+<UEF5F> \xD6\xF1 |0
+<UEF60> \xD6\xF2 |0
+<UEF61> \xD6\xF3 |0
+<UEF62> \xD6\xF4 |0
+<UEF63> \xD6\xF5 |0
+<UEF64> \xD6\xF6 |0
+<UEF65> \xD6\xF7 |0
+<UEF66> \xD6\xF8 |0
+<UEF67> \xD6\xF9 |0
+<UEF68> \xD6\xFA |0
+<UEF69> \xD6\xFB |0
+<UEF6A> \xD6\xFC |0
+<UEF6B> \xD6\xFD |0
+<UEF6C> \xD7\x41 |0
+<UEF6D> \xD7\x42 |0
+<UEF6E> \xD7\x43 |0
+<UEF6F> \xD7\x44 |0
+<UEF70> \xD7\x45 |0
+<UEF71> \xD7\x46 |0
+<UEF72> \xD7\x47 |0
+<UEF73> \xD7\x48 |0
+<UEF74> \xD7\x49 |0
+<UEF75> \xD7\x4A |0
+<UEF76> \xD7\x4B |0
+<UEF77> \xD7\x4C |0
+<UEF78> \xD7\x4D |0
+<UEF79> \xD7\x4E |0
+<UEF7A> \xD7\x4F |0
+<UEF7B> \xD7\x50 |0
+<UEF7C> \xD7\x51 |0
+<UEF7D> \xD7\x52 |0
+<UEF7E> \xD7\x53 |0
+<UEF7F> \xD7\x54 |0
+<UEF80> \xD7\x55 |0
+<UEF81> \xD7\x56 |0
+<UEF82> \xD7\x57 |0
+<UEF83> \xD7\x58 |0
+<UEF84> \xD7\x59 |0
+<UEF85> \xD7\x5A |0
+<UEF86> \xD7\x5B |0
+<UEF87> \xD7\x5C |0
+<UEF88> \xD7\x5D |0
+<UEF89> \xD7\x5E |0
+<UEF8A> \xD7\x5F |0
+<UEF8B> \xD7\x60 |0
+<UEF8C> \xD7\x61 |0
+<UEF8D> \xD7\x62 |0
+<UEF8E> \xD7\x63 |0
+<UEF8F> \xD7\x64 |0
+<UEF90> \xD7\x65 |0
+<UEF91> \xD7\x66 |0
+<UEF92> \xD7\x67 |0
+<UEF93> \xD7\x68 |0
+<UEF94> \xD7\x69 |0
+<UEF95> \xD7\x6A |0
+<UEF96> \xD7\x6B |0
+<UEF97> \xD7\x6C |0
+<UEF98> \xD7\x6D |0
+<UEF99> \xD7\x6E |0
+<UEF9A> \xD7\x6F |0
+<UEF9B> \xD7\x70 |0
+<UEF9C> \xD7\x71 |0
+<UEF9D> \xD7\x72 |0
+<UEF9E> \xD7\x73 |0
+<UEF9F> \xD7\x74 |0
+<UEFA0> \xD7\x75 |0
+<UEFA1> \xD7\x76 |0
+<UEFA2> \xD7\x77 |0
+<UEFA3> \xD7\x78 |0
+<UEFA4> \xD7\x79 |0
+<UEFA5> \xD7\x7A |0
+<UEFA6> \xD7\x7B |0
+<UEFA7> \xD7\x7C |0
+<UEFA8> \xD7\x7D |0
+<UEFA9> \xD7\x7E |0
+<UEFAA> \xD7\x7F |0
+<UEFAB> \xD7\x81 |0
+<UEFAC> \xD7\x82 |0
+<UEFAD> \xD7\x83 |0
+<UEFAE> \xD7\x84 |0
+<UEFAF> \xD7\x85 |0
+<UEFB0> \xD7\x86 |0
+<UEFB1> \xD7\x87 |0
+<UEFB2> \xD7\x88 |0
+<UEFB3> \xD7\x89 |0
+<UEFB4> \xD7\x8A |0
+<UEFB5> \xD7\x8B |0
+<UEFB6> \xD7\x8C |0
+<UEFB7> \xD7\x8D |0
+<UEFB8> \xD7\x8E |0
+<UEFB9> \xD7\x8F |0
+<UEFBA> \xD7\x90 |0
+<UEFBB> \xD7\x91 |0
+<UEFBC> \xD7\x92 |0
+<UEFBD> \xD7\x93 |0
+<UEFBE> \xD7\x94 |0
+<UEFBF> \xD7\x95 |0
+<UEFC0> \xD7\x96 |0
+<UEFC1> \xD7\x97 |0
+<UEFC2> \xD7\x98 |0
+<UEFC3> \xD7\x99 |0
+<UEFC4> \xD7\x9A |0
+<UEFC5> \xD7\x9B |0
+<UEFC6> \xD7\x9C |0
+<UEFC7> \xD7\x9D |0
+<UEFC8> \xD7\x9E |0
+<UEFC9> \xD7\x9F |0
+<UEFCA> \xD7\xA0 |0
+<UEFCB> \xD7\xA1 |0
+<UEFCC> \xD7\xA2 |0
+<UEFCD> \xD7\xA3 |0
+<UEFCE> \xD7\xA4 |0
+<UEFCF> \xD7\xA5 |0
+<UEFD0> \xD7\xA6 |0
+<UEFD1> \xD7\xA7 |0
+<UEFD2> \xD7\xA8 |0
+<UEFD3> \xD7\xA9 |0
+<UEFD4> \xD7\xAA |0
+<UEFD5> \xD7\xAB |0
+<UEFD6> \xD7\xAC |0
+<UEFD7> \xD7\xAD |0
+<UEFD8> \xD7\xAE |0
+<UEFD9> \xD7\xAF |0
+<UEFDA> \xD7\xB0 |0
+<UEFDB> \xD7\xB1 |0
+<UEFDC> \xD7\xB2 |0
+<UEFDD> \xD7\xB3 |0
+<UEFDE> \xD7\xB4 |0
+<UEFDF> \xD7\xB5 |0
+<UEFE0> \xD7\xB6 |0
+<UEFE1> \xD7\xB7 |0
+<UEFE2> \xD7\xB8 |0
+<UEFE3> \xD7\xB9 |0
+<UEFE4> \xD7\xBA |0
+<UEFE5> \xD7\xBB |0
+<UEFE6> \xD7\xBC |0
+<UEFE7> \xD7\xBD |0
+<UEFE8> \xD7\xBE |0
+<UEFE9> \xD7\xBF |0
+<UEFEA> \xD7\xC0 |0
+<UEFEB> \xD7\xC1 |0
+<UEFEC> \xD7\xC2 |0
+<UEFED> \xD7\xC3 |0
+<UEFEE> \xD7\xC4 |0
+<UEFEF> \xD7\xC5 |0
+<UEFF0> \xD7\xC6 |0
+<UEFF1> \xD7\xC7 |0
+<UEFF2> \xD7\xC8 |0
+<UEFF3> \xD7\xC9 |0
+<UEFF4> \xD7\xCA |0
+<UEFF5> \xD7\xCB |0
+<UEFF6> \xD7\xCC |0
+<UEFF7> \xD7\xCD |0
+<UEFF8> \xD7\xCE |0
+<UEFF9> \xD7\xCF |0
+<UEFFA> \xD7\xD0 |0
+<UEFFB> \xD7\xD1 |0
+<UEFFC> \xD7\xD2 |0
+<UEFFD> \xD7\xD3 |0
+<UEFFE> \xD7\xD4 |0
+<UEFFF> \xD7\xD5 |0
+<UF000> \xD7\xD6 |0
+<UF001> \xD7\xD7 |0
+<UF002> \xD7\xD8 |0
+<UF003> \xD7\xD9 |0
+<UF004> \xD7\xDA |0
+<UF005> \xD7\xDB |0
+<UF006> \xD7\xDC |0
+<UF007> \xD7\xDD |0
+<UF008> \xD7\xDE |0
+<UF009> \xD7\xDF |0
+<UF00A> \xD7\xE0 |0
+<UF00B> \xD7\xE1 |0
+<UF00C> \xD7\xE2 |0
+<UF00D> \xD7\xE3 |0
+<UF00E> \xD7\xE4 |0
+<UF00F> \xD7\xE5 |0
+<UF010> \xD7\xE6 |0
+<UF011> \xD7\xE7 |0
+<UF012> \xD7\xE8 |0
+<UF013> \xD7\xE9 |0
+<UF014> \xD7\xEA |0
+<UF015> \xD7\xEB |0
+<UF016> \xD7\xEC |0
+<UF017> \xD7\xED |0
+<UF018> \xD7\xEE |0
+<UF019> \xD7\xEF |0
+<UF01A> \xD7\xF0 |0
+<UF01B> \xD7\xF1 |0
+<UF01C> \xD7\xF2 |0
+<UF01D> \xD7\xF3 |0
+<UF01E> \xD7\xF4 |0
+<UF01F> \xD7\xF5 |0
+<UF020> \xD7\xF6 |0
+<UF021> \xD7\xF7 |0
+<UF022> \xD7\xF8 |0
+<UF023> \xD7\xF9 |0
+<UF024> \xD7\xFA |0
+<UF025> \xD7\xFB |0
+<UF026> \xD7\xFC |0
+<UF027> \xD7\xFD |0
+<UF028> \xD8\x41 |0
+<UF029> \xD8\x42 |0
+<UF02A> \xD8\x43 |0
+<UF02B> \xD8\x44 |0
+<UF02C> \xD8\x45 |0
+<UF02D> \xD8\x46 |0
+<UF02E> \xD8\x47 |0
+<UF02F> \xD8\x48 |0
+<UF030> \xD8\x49 |0
+<UF031> \xD8\x4A |0
+<UF032> \xD8\x4B |0
+<UF033> \xD8\x4C |0
+<UF034> \xD8\x4D |0
+<UF035> \xD8\x4E |0
+<UF036> \xD8\x4F |0
+<UF037> \xD8\x50 |0
+<UF038> \xD8\x51 |0
+<UF039> \xD8\x52 |0
+<UF03A> \xD8\x53 |0
+<UF03B> \xD8\x54 |0
+<UF03C> \xD8\x55 |0
+<UF03D> \xD8\x56 |0
+<UF03E> \xD8\x57 |0
+<UF03F> \xD8\x58 |0
+<UF040> \xD8\x59 |0
+<UF041> \xD8\x5A |0
+<UF042> \xD8\x5B |0
+<UF043> \xD8\x5C |0
+<UF044> \xD8\x5D |0
+<UF045> \xD8\x5E |0
+<UF046> \xD8\x5F |0
+<UF047> \xD8\x60 |0
+<UF048> \xD8\x61 |0
+<UF049> \xD8\x62 |0
+<UF04A> \xD8\x63 |0
+<UF04B> \xD8\x64 |0
+<UF04C> \xD8\x65 |0
+<UF04D> \xD8\x66 |0
+<UF04E> \xD8\x67 |0
+<UF04F> \xD8\x68 |0
+<UF050> \xD8\x69 |0
+<UF051> \xD8\x6A |0
+<UF052> \xD8\x6B |0
+<UF053> \xD8\x6C |0
+<UF054> \xD8\x6D |0
+<UF055> \xD8\x6E |0
+<UF056> \xD8\x6F |0
+<UF057> \xD8\x70 |0
+<UF058> \xD8\x71 |0
+<UF059> \xD8\x72 |0
+<UF05A> \xD8\x73 |0
+<UF05B> \xD8\x74 |0
+<UF05C> \xD8\x75 |0
+<UF05D> \xD8\x76 |0
+<UF05E> \xD8\x77 |0
+<UF05F> \xD8\x78 |0
+<UF060> \xD8\x79 |0
+<UF061> \xD8\x7A |0
+<UF062> \xD8\x7B |0
+<UF063> \xD8\x7C |0
+<UF064> \xD8\x7D |0
+<UF065> \xD8\x7E |0
+<UF066> \xD8\x7F |0
+<UF067> \xD8\x81 |0
+<UF068> \xD8\x82 |0
+<UF069> \xD8\x83 |0
+<UF06A> \xD8\x84 |0
+<UF06B> \xD8\x85 |0
+<UF06C> \xD8\x86 |0
+<UF06D> \xD8\x87 |0
+<UF06E> \xD8\x88 |0
+<UF06F> \xD8\x89 |0
+<UF070> \xD8\x8A |0
+<UF071> \xD8\x8B |0
+<UF072> \xD8\x8C |0
+<UF073> \xD8\x8D |0
+<UF074> \xD8\x8E |0
+<UF075> \xD8\x8F |0
+<UF076> \xD8\x90 |0
+<UF077> \xD8\x91 |0
+<UF078> \xD8\x92 |0
+<UF079> \xD8\x93 |0
+<UF07A> \xD8\x94 |0
+<UF07B> \xD8\x95 |0
+<UF07C> \xD8\x96 |0
+<UF07D> \xD8\x97 |0
+<UF07E> \xD8\x98 |0
+<UF07F> \xD8\x99 |0
+<UF080> \xD8\x9A |0
+<UF081> \xD8\x9B |0
+<UF082> \xD8\x9C |0
+<UF083> \xD8\x9D |0
+<UF084> \xD8\x9E |0
+<UF085> \xD8\x9F |0
+<UF086> \xD8\xA0 |0
+<UF087> \xD8\xA1 |0
+<UF088> \xD8\xA2 |0
+<UF089> \xD8\xA3 |0
+<UF08A> \xD8\xA4 |0
+<UF08B> \xD8\xA5 |0
+<UF08C> \xD8\xA6 |0
+<UF08D> \xD8\xA7 |0
+<UF08E> \xD8\xA8 |0
+<UF08F> \xD8\xA9 |0
+<UF090> \xD8\xAA |0
+<UF091> \xD8\xAB |0
+<UF092> \xD8\xAC |0
+<UF093> \xD8\xAD |0
+<UF094> \xD8\xAE |0
+<UF095> \xD8\xAF |0
+<UF096> \xD8\xB0 |0
+<UF097> \xD8\xB1 |0
+<UF098> \xD8\xB2 |0
+<UF099> \xD8\xB3 |0
+<UF09A> \xD8\xB4 |0
+<UF09B> \xD8\xB5 |0
+<UF09C> \xD8\xB6 |0
+<UF09D> \xD8\xB7 |0
+<UF09E> \xD8\xB8 |0
+<UF09F> \xD8\xB9 |0
+<UF0A0> \xD8\xBA |0
+<UF0A1> \xD8\xBB |0
+<UF0A2> \xD8\xBC |0
+<UF0A3> \xD8\xBD |0
+<UF0A4> \xD8\xBE |0
+<UF0A5> \xD8\xBF |0
+<UF0A6> \xD8\xC0 |0
+<UF0A7> \xD8\xC1 |0
+<UF0A8> \xD8\xC2 |0
+<UF0A9> \xD8\xC3 |0
+<UF0AA> \xD8\xC4 |0
+<UF0AB> \xD8\xC5 |0
+<UF0AC> \xD8\xC6 |0
+<UF0AD> \xD8\xC7 |0
+<UF0AE> \xD8\xC8 |0
+<UF0AF> \xD8\xC9 |0
+<UF0B0> \xD8\xCA |0
+<UF0B1> \xD8\xCB |0
+<UF0B2> \xD8\xCC |0
+<UF0B3> \xD8\xCD |0
+<UF0B4> \xD8\xCE |0
+<UF0B5> \xD8\xCF |0
+<UF0B6> \xD8\xD0 |0
+<UF0B7> \xD8\xD1 |0
+<UF0B8> \xD8\xD2 |0
+<UF0B9> \xD8\xD3 |0
+<UF0BA> \xD8\xD4 |0
+<UF0BB> \xD8\xD5 |0
+<UF0BC> \xD8\xD6 |0
+<UF0BD> \xD8\xD7 |0
+<UF0BE> \xD8\xD8 |0
+<UF0BF> \xD8\xD9 |0
+<UF0C0> \xD8\xDA |0
+<UF0C1> \xD8\xDB |0
+<UF0C2> \xD8\xDC |0
+<UF0C3> \xD8\xDD |0
+<UF0C4> \xD8\xDE |0
+<UF0C5> \xD8\xDF |0
+<UF0C6> \xD8\xE0 |0
+<UF0C7> \xD8\xE1 |0
+<UF0C8> \xD8\xE2 |0
+<UF0C9> \xD8\xE3 |0
+<UF0CA> \xD8\xE4 |0
+<UF0CB> \xD8\xE5 |0
+<UF0CC> \xD8\xE6 |0
+<UF0CD> \xD8\xE7 |0
+<UF0CE> \xD8\xE8 |0
+<UF0CF> \xD8\xE9 |0
+<UF0D0> \xD8\xEA |0
+<UF0D1> \xD8\xEB |0
+<UF0D2> \xD8\xEC |0
+<UF0D3> \xD8\xED |0
+<UF0D4> \xD8\xEE |0
+<UF0D5> \xD8\xEF |0
+<UF0D6> \xD8\xF0 |0
+<UF0D7> \xD8\xF1 |0
+<UF0D8> \xD8\xF2 |0
+<UF0D9> \xD8\xF3 |0
+<UF0DA> \xD8\xF4 |0
+<UF0DB> \xD8\xF5 |0
+<UF0DC> \xD8\xF6 |0
+<UF0DD> \xD8\xF7 |0
+<UF0DE> \xD8\xF8 |0
+<UF0DF> \xD8\xF9 |0
+<UF0E0> \xD8\xFA |0
+<UF0E1> \xD8\xFB |0
+<UF0E2> \xD8\xFC |0
+<UF0E3> \xD8\xFD |0
+<UF0E4> \xD9\x41 |0
+<UF0E5> \xD9\x42 |0
+<UF0E6> \xD9\x43 |0
+<UF0E7> \xD9\x44 |0
+<UF0E8> \xD9\x45 |0
+<UF0E9> \xD9\x46 |0
+<UF0EA> \xD9\x47 |0
+<UF0EB> \xD9\x48 |0
+<UF0EC> \xD9\x49 |0
+<UF0ED> \xD9\x4A |0
+<UF0EE> \xD9\x4B |0
+<UF0EF> \xD9\x4C |0
+<UF0F0> \xD9\x4D |0
+<UF0F1> \xD9\x4E |0
+<UF0F2> \xD9\x4F |0
+<UF0F3> \xD9\x50 |0
+<UF0F4> \xD9\x51 |0
+<UF0F5> \xD9\x52 |0
+<UF0F6> \xD9\x53 |0
+<UF0F7> \xD9\x54 |0
+<UF0F8> \xD9\x55 |0
+<UF0F9> \xD9\x56 |0
+<UF0FA> \xD9\x57 |0
+<UF0FB> \xD9\x58 |0
+<UF0FC> \xD9\x59 |0
+<UF0FD> \xD9\x5A |0
+<UF0FE> \xD9\x5B |0
+<UF0FF> \xD9\x5C |0
+<UF100> \xD9\x5D |0
+<UF101> \xD9\x5E |0
+<UF102> \xD9\x5F |0
+<UF103> \xD9\x60 |0
+<UF104> \xD9\x61 |0
+<UF105> \xD9\x62 |0
+<UF106> \xD9\x63 |0
+<UF107> \xD9\x64 |0
+<UF108> \xD9\x65 |0
+<UF109> \xD9\x66 |0
+<UF10A> \xD9\x67 |0
+<UF10B> \xD9\x68 |0
+<UF10C> \xD9\x69 |0
+<UF10D> \xD9\x6A |0
+<UF10E> \xD9\x6B |0
+<UF10F> \xD9\x6C |0
+<UF110> \xD9\x6D |0
+<UF111> \xD9\x6E |0
+<UF112> \xD9\x6F |0
+<UF113> \xD9\x70 |0
+<UF114> \xD9\x71 |0
+<UF115> \xD9\x72 |0
+<UF116> \xD9\x73 |0
+<UF117> \xD9\x74 |0
+<UF118> \xD9\x75 |0
+<UF119> \xD9\x76 |0
+<UF11A> \xD9\x77 |0
+<UF11B> \xD9\x78 |0
+<UF11C> \xD9\x79 |0
+<UF11D> \xD9\x7A |0
+<UF11E> \xD9\x7B |0
+<UF11F> \xD9\x7C |0
+<UF120> \xD9\x7D |0
+<UF121> \xD9\x7E |0
+<UF122> \xD9\x7F |0
+<UF123> \xD9\x81 |0
+<UF124> \xD9\x82 |0
+<UF125> \xD9\x83 |0
+<UF126> \xD9\x84 |0
+<UF127> \xD9\x85 |0
+<UF128> \xD9\x86 |0
+<UF129> \xD9\x87 |0
+<UF12A> \xD9\x88 |0
+<UF12B> \xD9\x89 |0
+<UF12C> \xD9\x8A |0
+<UF12D> \xD9\x8B |0
+<UF12E> \xD9\x8C |0
+<UF12F> \xD9\x8D |0
+<UF130> \xD9\x8E |0
+<UF131> \xD9\x8F |0
+<UF132> \xD9\x90 |0
+<UF133> \xD9\x91 |0
+<UF134> \xD9\x92 |0
+<UF135> \xD9\x93 |0
+<UF136> \xD9\x94 |0
+<UF137> \xD9\x95 |0
+<UF138> \xD9\x96 |0
+<UF139> \xD9\x97 |0
+<UF13A> \xD9\x98 |0
+<UF13B> \xD9\x99 |0
+<UF13C> \xD9\x9A |0
+<UF13D> \xD9\x9B |0
+<UF13E> \xD9\x9C |0
+<UF13F> \xD9\x9D |0
+<UF140> \xD9\x9E |0
+<UF141> \xD9\x9F |0
+<UF142> \xD9\xA0 |0
+<UF143> \xD9\xA1 |0
+<UF144> \xD9\xA2 |0
+<UF145> \xD9\xA3 |0
+<UF146> \xD9\xA4 |0
+<UF147> \xD9\xA5 |0
+<UF148> \xD9\xA6 |0
+<UF149> \xD9\xA7 |0
+<UF14A> \xD9\xA8 |0
+<UF14B> \xD9\xA9 |0
+<UF14C> \xD9\xAA |0
+<UF14D> \xD9\xAB |0
+<UF14E> \xD9\xAC |0
+<UF14F> \xD9\xAD |0
+<UF150> \xD9\xAE |0
+<UF151> \xD9\xAF |0
+<UF152> \xD9\xB0 |0
+<UF153> \xD9\xB1 |0
+<UF154> \xD9\xB2 |0
+<UF155> \xD9\xB3 |0
+<UF156> \xD9\xB4 |0
+<UF157> \xD9\xB5 |0
+<UF158> \xD9\xB6 |0
+<UF159> \xD9\xB7 |0
+<UF15A> \xD9\xB8 |0
+<UF15B> \xD9\xB9 |0
+<UF15C> \xD9\xBA |0
+<UF15D> \xD9\xBB |0
+<UF15E> \xD9\xBC |0
+<UF15F> \xD9\xBD |0
+<UF160> \xD9\xBE |0
+<UF161> \xD9\xBF |0
+<UF162> \xD9\xC0 |0
+<UF163> \xD9\xC1 |0
+<UF164> \xD9\xC2 |0
+<UF165> \xD9\xC3 |0
+<UF166> \xD9\xC4 |0
+<UF167> \xD9\xC5 |0
+<UF168> \xD9\xC6 |0
+<UF169> \xD9\xC7 |0
+<UF16A> \xD9\xC8 |0
+<UF16B> \xD9\xC9 |0
+<UF16C> \xD9\xCA |0
+<UF16D> \xD9\xCB |0
+<UF16E> \xD9\xCC |0
+<UF16F> \xD9\xCD |0
+<UF170> \xD9\xCE |0
+<UF171> \xD9\xCF |0
+<UF172> \xD9\xD0 |0
+<UF173> \xD9\xD1 |0
+<UF174> \xD9\xD2 |0
+<UF175> \xD9\xD3 |0
+<UF176> \xD9\xD4 |0
+<UF177> \xD9\xD5 |0
+<UF178> \xD9\xD6 |0
+<UF179> \xD9\xD7 |0
+<UF17A> \xD9\xD8 |0
+<UF17B> \xD9\xD9 |0
+<UF17C> \xD9\xDA |0
+<UF17D> \xD9\xDB |0
+<UF17E> \xD9\xDC |0
+<UF17F> \xD9\xDD |0
+<UF180> \xD9\xDE |0
+<UF181> \xD9\xDF |0
+<UF182> \xD9\xE0 |0
+<UF183> \xD9\xE1 |0
+<UF184> \xD9\xE2 |0
+<UF185> \xD9\xE3 |0
+<UF186> \xD9\xE4 |0
+<UF187> \xD9\xE5 |0
+<UF188> \xD9\xE6 |0
+<UF189> \xD9\xE7 |0
+<UF18A> \xD9\xE8 |0
+<UF18B> \xD9\xE9 |0
+<UF18C> \xD9\xEA |0
+<UF18D> \xD9\xEB |0
+<UF18E> \xD9\xEC |0
+<UF18F> \xD9\xED |0
+<UF190> \xD9\xEE |0
+<UF191> \xD9\xEF |0
+<UF192> \xD9\xF0 |0
+<UF193> \xD9\xF1 |0
+<UF194> \xD9\xF2 |0
+<UF195> \xD9\xF3 |0
+<UF196> \xD9\xF4 |0
+<UF197> \xD9\xF5 |0
+<UF198> \xD9\xF6 |0
+<UF199> \xD9\xF7 |0
+<UF19A> \xD9\xF8 |0
+<UF19B> \xD9\xF9 |0
+<UF19C> \xD9\xFA |0
+<UF19D> \xD9\xFB |0
+<UF19E> \xD9\xFC |0
+<UF19F> \xD9\xFD |0
+<UF1A0> \xDA\x41 |0
+<UF1A1> \xDA\x42 |0
+<UF1A2> \xDA\x43 |0
+<UF1A3> \xDA\x44 |0
+<UF1A4> \xDA\x45 |0
+<UF1A5> \xDA\x46 |0
+<UF1A6> \xDA\x47 |0
+<UF1A7> \xDA\x48 |0
+<UF1A8> \xDA\x49 |0
+<UF1A9> \xDA\x4A |0
+<UF1AA> \xDA\x4B |0
+<UF1AB> \xDA\x4C |0
+<UF1AC> \xDA\x4D |0
+<UF1AD> \xDA\x4E |0
+<UF1AE> \xDA\x4F |0
+<UF1AF> \xDA\x50 |0
+<UF1B0> \xDA\x51 |0
+<UF1B1> \xDA\x52 |0
+<UF1B2> \xDA\x53 |0
+<UF1B3> \xDA\x54 |0
+<UF1B4> \xDA\x55 |0
+<UF1B5> \xDA\x56 |0
+<UF1B6> \xDA\x57 |0
+<UF1B7> \xDA\x58 |0
+<UF1B8> \xDA\x59 |0
+<UF1B9> \xDA\x5A |0
+<UF1BA> \xDA\x5B |0
+<UF1BB> \xDA\x5C |0
+<UF1BC> \xDA\x5D |0
+<UF1BD> \xDA\x5E |0
+<UF1BE> \xDA\x5F |0
+<UF1BF> \xDA\x60 |0
+<UF1C0> \xDA\x61 |0
+<UF1C1> \xDA\x62 |0
+<UF1C2> \xDA\x63 |0
+<UF1C3> \xDA\x64 |0
+<UF1C4> \xDA\x65 |0
+<UF1C5> \xDA\x66 |0
+<UF1C6> \xDA\x67 |0
+<UF1C7> \xDA\x68 |0
+<UF1C8> \xDA\x69 |0
+<UF1C9> \xDA\x6A |0
+<UF1CA> \xDA\x6B |0
+<UF1CB> \xDA\x6C |0
+<UF1CC> \xDA\x6D |0
+<UF1CD> \xDA\x6E |0
+<UF1CE> \xDA\x6F |0
+<UF1CF> \xDA\x70 |0
+<UF1D0> \xDA\x71 |0
+<UF1D1> \xDA\x72 |0
+<UF1D2> \xDA\x73 |0
+<UF1D3> \xDA\x74 |0
+<UF1D4> \xDA\x75 |0
+<UF1D5> \xDA\x76 |0
+<UF1D6> \xDA\x77 |0
+<UF1D7> \xDA\x78 |0
+<UF1D8> \xDA\x79 |0
+<UF1D9> \xDA\x7A |0
+<UF1DA> \xDA\x7B |0
+<UF1DB> \xDA\x7C |0
+<UF1DC> \xDA\x7D |0
+<UF1DD> \xDA\x7E |0
+<UF1DE> \xDA\x7F |0
+<UF1DF> \xDA\x81 |0
+<UF1E0> \xDA\x82 |0
+<UF1E1> \xDA\x83 |0
+<UF1E2> \xDA\x84 |0
+<UF1E3> \xDA\x85 |0
+<UF1E4> \xDA\x86 |0
+<UF1E5> \xDA\x87 |0
+<UF1E6> \xDA\x88 |0
+<UF1E7> \xDA\x89 |0
+<UF1E8> \xDA\x8A |0
+<UF1E9> \xDA\x8B |0
+<UF1EA> \xDA\x8C |0
+<UF1EB> \xDA\x8D |0
+<UF1EC> \xDA\x8E |0
+<UF1ED> \xDA\x8F |0
+<UF1EE> \xDA\x90 |0
+<UF1EF> \xDA\x91 |0
+<UF1F0> \xDA\x92 |0
+<UF1F1> \xDA\x93 |0
+<UF1F2> \xDA\x94 |0
+<UF1F3> \xDA\x95 |0
+<UF1F4> \xDA\x96 |0
+<UF1F5> \xDA\x97 |0
+<UF1F6> \xDA\x98 |0
+<UF1F7> \xDA\x99 |0
+<UF1F8> \xDA\x9A |0
+<UF1F9> \xDA\x9B |0
+<UF1FA> \xDA\x9C |0
+<UF1FB> \xDA\x9D |0
+<UF1FC> \xDA\x9E |0
+<UF1FD> \xDA\x9F |0
+<UF1FE> \xDA\xA0 |0
+<UF1FF> \xDA\xA1 |0
+<UF200> \xDA\xA2 |0
+<UF201> \xDA\xA3 |0
+<UF202> \xDA\xA4 |0
+<UF203> \xDA\xA5 |0
+<UF204> \xDA\xA6 |0
+<UF205> \xDA\xA7 |0
+<UF206> \xDA\xA8 |0
+<UF207> \xDA\xA9 |0
+<UF208> \xDA\xAA |0
+<UF209> \xDA\xAB |0
+<UF20A> \xDA\xAC |0
+<UF20B> \xDA\xAD |0
+<UF20C> \xDA\xAE |0
+<UF20D> \xDA\xAF |0
+<UF20E> \xDA\xB0 |0
+<UF20F> \xDA\xB1 |0
+<UF210> \xDA\xB2 |0
+<UF211> \xDA\xB3 |0
+<UF212> \xDA\xB4 |0
+<UF213> \xDA\xB5 |0
+<UF214> \xDA\xB6 |0
+<UF215> \xDA\xB7 |0
+<UF216> \xDA\xB8 |0
+<UF217> \xDA\xB9 |0
+<UF218> \xDA\xBA |0
+<UF219> \xDA\xBB |0
+<UF21A> \xDA\xBC |0
+<UF21B> \xDA\xBD |0
+<UF21C> \xDA\xBE |0
+<UF21D> \xDA\xBF |0
+<UF21E> \xDA\xC0 |0
+<UF21F> \xDA\xC1 |0
+<UF220> \xDA\xC2 |0
+<UF221> \xDA\xC3 |0
+<UF222> \xDA\xC4 |0
+<UF223> \xDA\xC5 |0
+<UF224> \xDA\xC6 |0
+<UF225> \xDA\xC7 |0
+<UF226> \xDA\xC8 |0
+<UF227> \xDA\xC9 |0
+<UF228> \xDA\xCA |0
+<UF229> \xDA\xCB |0
+<UF22A> \xDA\xCC |0
+<UF22B> \xDA\xCD |0
+<UF22C> \xDA\xCE |0
+<UF22D> \xDA\xCF |0
+<UF22E> \xDA\xD0 |0
+<UF22F> \xDA\xD1 |0
+<UF230> \xDA\xD2 |0
+<UF231> \xDA\xD3 |0
+<UF232> \xDA\xD4 |0
+<UF233> \xDA\xD5 |0
+<UF234> \xDA\xD6 |0
+<UF235> \xDA\xD7 |0
+<UF236> \xDA\xD8 |0
+<UF237> \xDA\xD9 |0
+<UF238> \xDA\xDA |0
+<UF239> \xDA\xDB |0
+<UF23A> \xDA\xDC |0
+<UF23B> \xDA\xDD |0
+<UF23C> \xDA\xDE |0
+<UF23D> \xDA\xDF |0
+<UF23E> \xDA\xE0 |0
+<UF23F> \xDA\xE1 |0
+<UF240> \xDA\xE2 |0
+<UF241> \xDA\xE3 |0
+<UF242> \xDA\xE4 |0
+<UF243> \xDA\xE5 |0
+<UF244> \xDA\xE6 |0
+<UF245> \xDA\xE7 |0
+<UF246> \xDA\xE8 |0
+<UF247> \xDA\xE9 |0
+<UF248> \xDA\xEA |0
+<UF249> \xDA\xEB |0
+<UF24A> \xDA\xEC |0
+<UF24B> \xDA\xED |0
+<UF24C> \xDA\xEE |0
+<UF24D> \xDA\xEF |0
+<UF24E> \xDA\xF0 |0
+<UF24F> \xDA\xF1 |0
+<UF250> \xDA\xF2 |0
+<UF251> \xDA\xF3 |0
+<UF252> \xDA\xF4 |0
+<UF253> \xDA\xF5 |0
+<UF254> \xDA\xF6 |0
+<UF255> \xDA\xF7 |0
+<UF256> \xDA\xF8 |0
+<UF257> \xDA\xF9 |0
+<UF258> \xDA\xFA |0
+<UF259> \xDA\xFB |0
+<UF25A> \xDA\xFC |0
+<UF25B> \xDA\xFD |0
+<UF25C> \xDB\x41 |0
+<UF25D> \xDB\x42 |0
+<UF25E> \xDB\x43 |0
+<UF25F> \xDB\x44 |0
+<UF260> \xDB\x45 |0
+<UF261> \xDB\x46 |0
+<UF262> \xDB\x47 |0
+<UF263> \xDB\x48 |0
+<UF264> \xDB\x49 |0
+<UF265> \xDB\x4A |0
+<UF266> \xDB\x4B |0
+<UF267> \xDB\x4C |0
+<UF268> \xDB\x4D |0
+<UF269> \xDB\x4E |0
+<UF26A> \xDB\x4F |0
+<UF26B> \xDB\x50 |0
+<UF26C> \xDB\x51 |0
+<UF26D> \xDB\x52 |0
+<UF26E> \xDB\x53 |0
+<UF26F> \xDB\x54 |0
+<UF270> \xDB\x55 |0
+<UF271> \xDB\x56 |0
+<UF272> \xDB\x57 |0
+<UF273> \xDB\x58 |0
+<UF274> \xDB\x59 |0
+<UF275> \xDB\x5A |0
+<UF276> \xDB\x5B |0
+<UF277> \xDB\x5C |0
+<UF278> \xDB\x5D |0
+<UF279> \xDB\x5E |0
+<UF27A> \xDB\x5F |0
+<UF27B> \xDB\x60 |0
+<UF27C> \xDB\x61 |0
+<UF27D> \xDB\x62 |0
+<UF27E> \xDB\x63 |0
+<UF27F> \xDB\x64 |0
+<UF280> \xDB\x65 |0
+<UF281> \xDB\x66 |0
+<UF282> \xDB\x67 |0
+<UF283> \xDB\x68 |0
+<UF284> \xDB\x69 |0
+<UF285> \xDB\x6A |0
+<UF286> \xDB\x6B |0
+<UF287> \xDB\x6C |0
+<UF288> \xDB\x6D |0
+<UF289> \xDB\x6E |0
+<UF28A> \xDB\x6F |0
+<UF28B> \xDB\x70 |0
+<UF28C> \xDB\x71 |0
+<UF28D> \xDB\x72 |0
+<UF28E> \xDB\x73 |0
+<UF28F> \xDB\x74 |0
+<UF290> \xDB\x75 |0
+<UF291> \xDB\x76 |0
+<UF292> \xDB\x77 |0
+<UF293> \xDB\x78 |0
+<UF294> \xDB\x79 |0
+<UF295> \xDB\x7A |0
+<UF296> \xDB\x7B |0
+<UF297> \xDB\x7C |0
+<UF298> \xDB\x7D |0
+<UF299> \xDB\x7E |0
+<UF29A> \xDB\x7F |0
+<UF29B> \xDB\x81 |0
+<UF29C> \xDB\x82 |0
+<UF29D> \xDB\x83 |0
+<UF29E> \xDB\x84 |0
+<UF29F> \xDB\x85 |0
+<UF2A0> \xDB\x86 |0
+<UF2A1> \xDB\x87 |0
+<UF2A2> \xDB\x88 |0
+<UF2A3> \xDB\x89 |0
+<UF2A4> \xDB\x8A |0
+<UF2A5> \xDB\x8B |0
+<UF2A6> \xDB\x8C |0
+<UF2A7> \xDB\x8D |0
+<UF2A8> \xDB\x8E |0
+<UF2A9> \xDB\x8F |0
+<UF2AA> \xDB\x90 |0
+<UF2AB> \xDB\x91 |0
+<UF2AC> \xDB\x92 |0
+<UF2AD> \xDB\x93 |0
+<UF2AE> \xDB\x94 |0
+<UF2AF> \xDB\x95 |0
+<UF2B0> \xDB\x96 |0
+<UF2B1> \xDB\x97 |0
+<UF2B2> \xDB\x98 |0
+<UF2B3> \xDB\x99 |0
+<UF2B4> \xDB\x9A |0
+<UF2B5> \xDB\x9B |0
+<UF2B6> \xDB\x9C |0
+<UF2B7> \xDB\x9D |0
+<UF2B8> \xDB\x9E |0
+<UF2B9> \xDB\x9F |0
+<UF2BA> \xDB\xA0 |0
+<UF2BB> \xDB\xA1 |0
+<UF2BC> \xDB\xA2 |0
+<UF2BD> \xDB\xA3 |0
+<UF2BE> \xDB\xA4 |0
+<UF2BF> \xDB\xA5 |0
+<UF2C0> \xDB\xA6 |0
+<UF2C1> \xDB\xA7 |0
+<UF2C2> \xDB\xA8 |0
+<UF2C3> \xDB\xA9 |0
+<UF2C4> \xDB\xAA |0
+<UF2C5> \xDB\xAB |0
+<UF2C6> \xDB\xAC |0
+<UF2C7> \xDB\xAD |0
+<UF2C8> \xDB\xAE |0
+<UF2C9> \xDB\xAF |0
+<UF2CA> \xDB\xB0 |0
+<UF2CB> \xDB\xB1 |0
+<UF2CC> \xDB\xB2 |0
+<UF2CD> \xDB\xB3 |0
+<UF2CE> \xDB\xB4 |0
+<UF2CF> \xDB\xB5 |0
+<UF2D0> \xDB\xB6 |0
+<UF2D1> \xDB\xB7 |0
+<UF2D2> \xDB\xB8 |0
+<UF2D3> \xDB\xB9 |0
+<UF2D4> \xDB\xBA |0
+<UF2D5> \xDB\xBB |0
+<UF2D6> \xDB\xBC |0
+<UF2D7> \xDB\xBD |0
+<UF2D8> \xDB\xBE |0
+<UF2D9> \xDB\xBF |0
+<UF2DA> \xDB\xC0 |0
+<UF2DB> \xDB\xC1 |0
+<UF2DC> \xDB\xC2 |0
+<UF2DD> \xDB\xC3 |0
+<UF2DE> \xDB\xC4 |0
+<UF2DF> \xDB\xC5 |0
+<UF2E0> \xDB\xC6 |0
+<UF2E1> \xDB\xC7 |0
+<UF2E2> \xDB\xC8 |0
+<UF2E3> \xDB\xC9 |0
+<UF2E4> \xDB\xCA |0
+<UF2E5> \xDB\xCB |0
+<UF2E6> \xDB\xCC |0
+<UF2E7> \xDB\xCD |0
+<UF2E8> \xDB\xCE |0
+<UF2E9> \xDB\xCF |0
+<UF2EA> \xDB\xD0 |0
+<UF2EB> \xDB\xD1 |0
+<UF2EC> \xDB\xD2 |0
+<UF2ED> \xDB\xD3 |0
+<UF2EE> \xDB\xD4 |0
+<UF2EF> \xDB\xD5 |0
+<UF2F0> \xDB\xD6 |0
+<UF2F1> \xDB\xD7 |0
+<UF2F2> \xDB\xD8 |0
+<UF2F3> \xDB\xD9 |0
+<UF2F4> \xDB\xDA |0
+<UF2F5> \xDB\xDB |0
+<UF2F6> \xDB\xDC |0
+<UF2F7> \xDB\xDD |0
+<UF2F8> \xDB\xDE |0
+<UF2F9> \xDB\xDF |0
+<UF2FA> \xDB\xE0 |0
+<UF2FB> \xDB\xE1 |0
+<UF2FC> \xDB\xE2 |0
+<UF2FD> \xDB\xE3 |0
+<UF2FE> \xDB\xE4 |0
+<UF2FF> \xDB\xE5 |0
+<UF300> \xDB\xE6 |0
+<UF301> \xDB\xE7 |0
+<UF302> \xDB\xE8 |0
+<UF303> \xDB\xE9 |0
+<UF304> \xDB\xEA |0
+<UF305> \xDB\xEB |0
+<UF306> \xDB\xEC |0
+<UF307> \xDB\xED |0
+<UF308> \xDB\xEE |0
+<UF309> \xDB\xEF |0
+<UF30A> \xDB\xF0 |0
+<UF30B> \xDB\xF1 |0
+<UF30C> \xDB\xF2 |0
+<UF30D> \xDB\xF3 |0
+<UF30E> \xDB\xF4 |0
+<UF30F> \xDB\xF5 |0
+<UF310> \xDB\xF6 |0
+<UF311> \xDB\xF7 |0
+<UF312> \xDB\xF8 |0
+<UF313> \xDB\xF9 |0
+<UF314> \xDB\xFA |0
+<UF315> \xDB\xFB |0
+<UF316> \xDB\xFC |0
+<UF317> \xDB\xFD |0
+<UF318> \xDC\x41 |0
+<UF319> \xDC\x42 |0
+<UF31A> \xDC\x43 |0
+<UF31B> \xDC\x44 |0
+<UF31C> \xDC\x45 |0
+<UF31D> \xDC\x46 |0
+<UF31E> \xDC\x47 |0
+<UF31F> \xDC\x48 |0
+<UF320> \xDC\x49 |0
+<UF321> \xDC\x4A |0
+<UF322> \xDC\x4B |0
+<UF323> \xDC\x4C |0
+<UF324> \xDC\x4D |0
+<UF325> \xDC\x4E |0
+<UF326> \xDC\x4F |0
+<UF327> \xDC\x50 |0
+<UF328> \xDC\x51 |0
+<UF329> \xDC\x52 |0
+<UF32A> \xDC\x53 |0
+<UF32B> \xDC\x54 |0
+<UF32C> \xDC\x55 |0
+<UF32D> \xDC\x56 |0
+<UF32E> \xDC\x57 |0
+<UF32F> \xDC\x58 |0
+<UF330> \xDC\x59 |0
+<UF331> \xDC\x5A |0
+<UF332> \xDC\x5B |0
+<UF333> \xDC\x5C |0
+<UF334> \xDC\x5D |0
+<UF335> \xDC\x5E |0
+<UF336> \xDC\x5F |0
+<UF337> \xDC\x60 |0
+<UF338> \xDC\x61 |0
+<UF339> \xDC\x62 |0
+<UF33A> \xDC\x63 |0
+<UF33B> \xDC\x64 |0
+<UF33C> \xDC\x65 |0
+<UF33D> \xDC\x66 |0
+<UF33E> \xDC\x67 |0
+<UF33F> \xDC\x68 |0
+<UF340> \xDC\x69 |0
+<UF341> \xDC\x6A |0
+<UF342> \xDC\x6B |0
+<UF343> \xDC\x6C |0
+<UF344> \xDC\x6D |0
+<UF345> \xDC\x6E |0
+<UF346> \xDC\x6F |0
+<UF347> \xDC\x70 |0
+<UF348> \xDC\x71 |0
+<UF349> \xDC\x72 |0
+<UF34A> \xDC\x73 |0
+<UF34B> \xDC\x74 |0
+<UF34C> \xDC\x75 |0
+<UF34D> \xDC\x76 |0
+<UF34E> \xDC\x77 |0
+<UF34F> \xDC\x78 |0
+<UF350> \xDC\x79 |0
+<UF351> \xDC\x7A |0
+<UF352> \xDC\x7B |0
+<UF353> \xDC\x7C |0
+<UF354> \xDC\x7D |0
+<UF355> \xDC\x7E |0
+<UF356> \xDC\x7F |0
+<UF357> \xDC\x81 |0
+<UF358> \xDC\x82 |0
+<UF359> \xDC\x83 |0
+<UF35A> \xDC\x84 |0
+<UF35B> \xDC\x85 |0
+<UF35C> \xDC\x86 |0
+<UF35D> \xDC\x87 |0
+<UF35E> \xDC\x88 |0
+<UF35F> \xDC\x89 |0
+<UF360> \xDC\x8A |0
+<UF361> \xDC\x8B |0
+<UF362> \xDC\x8C |0
+<UF363> \xDC\x8D |0
+<UF364> \xDC\x8E |0
+<UF365> \xDC\x8F |0
+<UF366> \xDC\x90 |0
+<UF367> \xDC\x91 |0
+<UF368> \xDC\x92 |0
+<UF369> \xDC\x93 |0
+<UF36A> \xDC\x94 |0
+<UF36B> \xDC\x95 |0
+<UF36C> \xDC\x96 |0
+<UF36D> \xDC\x97 |0
+<UF36E> \xDC\x98 |0
+<UF36F> \xDC\x99 |0
+<UF370> \xDC\x9A |0
+<UF371> \xDC\x9B |0
+<UF372> \xDC\x9C |0
+<UF373> \xDC\x9D |0
+<UF374> \xDC\x9E |0
+<UF375> \xDC\x9F |0
+<UF376> \xDC\xA0 |0
+<UF377> \xDC\xA1 |0
+<UF378> \xDC\xA2 |0
+<UF379> \xDC\xA3 |0
+<UF37A> \xDC\xA4 |0
+<UF37B> \xDC\xA5 |0
+<UF37C> \xDC\xA6 |0
+<UF37D> \xDC\xA7 |0
+<UF37E> \xDC\xA8 |0
+<UF37F> \xDC\xA9 |0
+<UF380> \xDC\xAA |0
+<UF381> \xDC\xAB |0
+<UF382> \xDC\xAC |0
+<UF383> \xDC\xAD |0
+<UF384> \xDC\xAE |0
+<UF385> \xDC\xAF |0
+<UF386> \xDC\xB0 |0
+<UF387> \xDC\xB1 |0
+<UF388> \xDC\xB2 |0
+<UF389> \xDC\xB3 |0
+<UF38A> \xDC\xB4 |0
+<UF38B> \xDC\xB5 |0
+<UF38C> \xDC\xB6 |0
+<UF38D> \xDC\xB7 |0
+<UF38E> \xDC\xB8 |0
+<UF38F> \xDC\xB9 |0
+<UF390> \xDC\xBA |0
+<UF391> \xDC\xBB |0
+<UF392> \xDC\xBC |0
+<UF393> \xDC\xBD |0
+<UF394> \xDC\xBE |0
+<UF395> \xDC\xBF |0
+<UF396> \xDC\xC0 |0
+<UF397> \xDC\xC1 |0
+<UF398> \xDC\xC2 |0
+<UF399> \xDC\xC3 |0
+<UF39A> \xDC\xC4 |0
+<UF39B> \xDC\xC5 |0
+<UF39C> \xDC\xC6 |0
+<UF39D> \xDC\xC7 |0
+<UF39E> \xDC\xC8 |0
+<UF39F> \xDC\xC9 |0
+<UF3A0> \xDC\xCA |0
+<UF3A1> \xDC\xCB |0
+<UF3A2> \xDC\xCC |0
+<UF3A3> \xDC\xCD |0
+<UF3A4> \xDC\xCE |0
+<UF3A5> \xDC\xCF |0
+<UF3A6> \xDC\xD0 |0
+<UF3A7> \xDC\xD1 |0
+<UF3A8> \xDC\xD2 |0
+<UF3A9> \xDC\xD3 |0
+<UF3AA> \xDC\xD4 |0
+<UF3AB> \xDC\xD5 |0
+<UF3AC> \xDC\xD6 |0
+<UF3AD> \xDC\xD7 |0
+<UF3AE> \xDC\xD8 |0
+<UF3AF> \xDC\xD9 |0
+<UF3B0> \xDC\xDA |0
+<UF3B1> \xDC\xDB |0
+<UF3B2> \xDC\xDC |0
+<UF3B3> \xDC\xDD |0
+<UF3B4> \xDC\xDE |0
+<UF3B5> \xDC\xDF |0
+<UF3B6> \xDC\xE0 |0
+<UF3B7> \xDC\xE1 |0
+<UF3B8> \xDC\xE2 |0
+<UF3B9> \xDC\xE3 |0
+<UF3BA> \xDC\xE4 |0
+<UF3BB> \xDC\xE5 |0
+<UF3BC> \xDC\xE6 |0
+<UF3BD> \xDC\xE7 |0
+<UF3BE> \xDC\xE8 |0
+<UF3BF> \xDC\xE9 |0
+<UF3C0> \xDC\xEA |0
+<UF3C1> \xDC\xEB |0
+<UF3C2> \xDC\xEC |0
+<UF3C3> \xDC\xED |0
+<UF3C4> \xDC\xEE |0
+<UF3C5> \xDC\xEF |0
+<UF3C6> \xDC\xF0 |0
+<UF3C7> \xDC\xF1 |0
+<UF3C8> \xDC\xF2 |0
+<UF3C9> \xDC\xF3 |0
+<UF3CA> \xDC\xF4 |0
+<UF3CB> \xDC\xF5 |0
+<UF3CC> \xDC\xF6 |0
+<UF3CD> \xDC\xF7 |0
+<UF3CE> \xDC\xF8 |0
+<UF3CF> \xDC\xF9 |0
+<UF3D0> \xDC\xFA |0
+<UF3D1> \xDC\xFB |0
+<UF3D2> \xDC\xFC |0
+<UF3D3> \xDC\xFD |0
+<UF3D4> \xDD\x41 |0
+<UF3D5> \xDD\x42 |0
+<UF3D6> \xDD\x43 |0
+<UF3D7> \xDD\x44 |0
+<UF3D8> \xDD\x45 |0
+<UF3D9> \xDD\x46 |0
+<UF3DA> \xDD\x47 |0
+<UF3DB> \xDD\x48 |0
+<UF3DC> \xDD\x49 |0
+<UF3DD> \xDD\x4A |0
+<UF3DE> \xDD\x4B |0
+<UF3DF> \xDD\x4C |0
+<UF3E0> \xDD\x4D |0
+<UF3E1> \xDD\x4E |0
+<UF3E2> \xDD\x4F |0
+<UF3E3> \xDD\x50 |0
+<UF3E4> \xDD\x51 |0
+<UF3E5> \xDD\x52 |0
+<UF3E6> \xDD\x53 |0
+<UF3E7> \xDD\x54 |0
+<UF3E8> \xDD\x55 |0
+<UF3E9> \xDD\x56 |0
+<UF3EA> \xDD\x57 |0
+<UF3EB> \xDD\x58 |0
+<UF3EC> \xDD\x59 |0
+<UF3ED> \xDD\x5A |0
+<UF3EE> \xDD\x5B |0
+<UF3EF> \xDD\x5C |0
+<UF3F0> \xDD\x5D |0
+<UF3F1> \xDD\x5E |0
+<UF3F2> \xDD\x5F |0
+<UF3F3> \xDD\x60 |0
+<UF3F4> \xDD\x61 |0
+<UF3F5> \xDD\x62 |0
+<UF3F6> \xDD\x63 |0
+<UF3F7> \xDD\x64 |0
+<UF3F8> \xDD\x65 |0
+<UF3F9> \xDD\x66 |0
+<UF3FA> \xDD\x67 |0
+<UF3FB> \xDD\x68 |0
+<UF3FC> \xDD\x69 |0
+<UF3FD> \xDD\x6A |0
+<UF3FE> \xDD\x6B |0
+<UF3FF> \xDD\x6C |0
+<UF400> \xDD\x6D |0
+<UF401> \xDD\x6E |0
+<UF402> \xDD\x6F |0
+<UF403> \xDD\x70 |0
+<UF404> \xDD\x71 |0
+<UF405> \xDD\x72 |0
+<UF406> \xDD\x73 |0
+<UF407> \xDD\x74 |0
+<UF408> \xDD\x75 |0
+<UF409> \xDD\x76 |0
+<UF40A> \xDD\x77 |0
+<UF40B> \xDD\x78 |0
+<UF40C> \xDD\x79 |0
+<UF40D> \xDD\x7A |0
+<UF40E> \xDD\x7B |0
+<UF40F> \xDD\x7C |0
+<UF410> \xDD\x7D |0
+<UF411> \xDD\x7E |0
+<UF412> \xDD\x7F |0
+<UF413> \xDD\x81 |0
+<UF414> \xDD\x82 |0
+<UF415> \xDD\x83 |0
+<UF416> \xDD\x84 |0
+<UF417> \xDD\x85 |0
+<UF418> \xDD\x86 |0
+<UF419> \xDD\x87 |0
+<UF41A> \xDD\x88 |0
+<UF41B> \xDD\x89 |0
+<UF41C> \xDD\x8A |0
+<UF41D> \xDD\x8B |0
+<UF41E> \xDD\x8C |0
+<UF41F> \xDD\x8D |0
+<UF420> \xDD\x8E |0
+<UF421> \xDD\x8F |0
+<UF422> \xDD\x90 |0
+<UF423> \xDD\x91 |0
+<UF424> \xDD\x92 |0
+<UF425> \xDD\x93 |0
+<UF426> \xDD\x94 |0
+<UF427> \xDD\x95 |0
+<UF428> \xDD\x96 |0
+<UF429> \xDD\x97 |0
+<UF42A> \xDD\x98 |0
+<UF42B> \xDD\x99 |0
+<UF42C> \xDD\x9A |0
+<UF42D> \xDD\x9B |0
+<UF42E> \xDD\x9C |0
+<UF42F> \xDD\x9D |0
+<UF430> \xDD\x9E |0
+<UF431> \xDD\x9F |0
+<UF432> \xDD\xA0 |0
+<UF433> \xDD\xA1 |0
+<UF434> \xDD\xA2 |0
+<UF435> \xDD\xA3 |0
+<UF436> \xDD\xA4 |0
+<UF437> \xDD\xA5 |0
+<UF438> \xDD\xA6 |0
+<UF439> \xDD\xA7 |0
+<UF43A> \xDD\xA8 |0
+<UF43B> \xDD\xA9 |0
+<UF43C> \xDD\xAA |0
+<UF43D> \xDD\xAB |0
+<UF43E> \xDD\xAC |0
+<UF43F> \xDD\xAD |0
+<UF440> \xDD\xAE |0
+<UF441> \xDD\xAF |0
+<UF442> \xDD\xB0 |0
+<UF443> \xDD\xB1 |0
+<UF444> \xDD\xB2 |0
+<UF445> \xDD\xB3 |0
+<UF446> \xDD\xB4 |0
+<UF447> \xDD\xB5 |0
+<UF448> \xDD\xB6 |0
+<UF449> \xDD\xB7 |0
+<UF44A> \xDD\xB8 |0
+<UF44B> \xDD\xB9 |0
+<UF44C> \xDD\xBA |0
+<UF44D> \xDD\xBB |0
+<UF44E> \xDD\xBC |0
+<UF44F> \xDD\xBD |0
+<UF450> \xDD\xBE |0
+<UF451> \xDD\xBF |0
+<UF452> \xDD\xC0 |0
+<UF453> \xDD\xC1 |0
+<UF454> \xDD\xC2 |0
+<UF455> \xDD\xC3 |0
+<UF456> \xDD\xC4 |0
+<UF457> \xDD\xC5 |0
+<UF458> \xDD\xC6 |0
+<UF459> \xDD\xC7 |0
+<UF45A> \xDD\xC8 |0
+<UF45B> \xDD\xC9 |0
+<UF45C> \xDD\xCA |0
+<UF45D> \xDD\xCB |0
+<UF45E> \xDD\xCC |0
+<UF45F> \xDD\xCD |0
+<UF460> \xDD\xCE |0
+<UF461> \xDD\xCF |0
+<UF462> \xDD\xD0 |0
+<UF463> \xDD\xD1 |0
+<UF464> \xDD\xD2 |0
+<UF465> \xDD\xD3 |0
+<UF466> \xDD\xD4 |0
+<UF467> \xDD\xD5 |0
+<UF468> \xDD\xD6 |0
+<UF469> \xDD\xD7 |0
+<UF46A> \xDD\xD8 |0
+<UF46B> \xDD\xD9 |0
+<UF46C> \xDD\xDA |0
+<UF46D> \xDD\xDB |0
+<UF46E> \xDD\xDC |0
+<UF46F> \xDD\xDD |0
+<UF470> \xDD\xDE |0
+<UF471> \xDD\xDF |0
+<UF472> \xDD\xE0 |0
+<UF473> \xDD\xE1 |0
+<UF474> \xDD\xE2 |0
+<UF475> \xDD\xE3 |0
+<UF476> \xDD\xE4 |0
+<UF477> \xDD\xE5 |0
+<UF478> \xDD\xE6 |0
+<UF479> \xDD\xE7 |0
+<UF47A> \xDD\xE8 |0
+<UF47B> \xDD\xE9 |0
+<UF47C> \xDD\xEA |0
+<UF47D> \xDD\xEB |0
+<UF47E> \xDD\xEC |0
+<UF47F> \xDD\xED |0
+<UF480> \xDD\xEE |0
+<UF481> \xDD\xEF |0
+<UF482> \xDD\xF0 |0
+<UF483> \xDD\xF1 |0
+<UF484> \xDD\xF2 |0
+<UF485> \xDD\xF3 |0
+<UF486> \xDD\xF4 |0
+<UF487> \xDD\xF5 |0
+<UF488> \xDD\xF6 |0
+<UF489> \xDD\xF7 |0
+<UF48A> \xDD\xF8 |0
+<UF48B> \xDD\xF9 |0
+<UF48C> \xDD\xFA |0
+<UF48D> \xDD\xFB |0
+<UF48E> \xDD\xFC |0
+<UF48F> \xDD\xFD |0
+<UF490> \xDE\x41 |0
+<UF491> \xDE\x42 |0
+<UF492> \xDE\x43 |0
+<UF493> \xDE\x44 |0
+<UF494> \xDE\x45 |0
+<UF495> \xDE\x46 |0
+<UF496> \xDE\x47 |0
+<UF497> \xDE\x48 |0
+<UF498> \xDE\x49 |0
+<UF499> \xDE\x4A |0
+<UF49A> \xDE\x4B |0
+<UF49B> \xDE\x4C |0
+<UF49C> \xDE\x4D |0
+<UF49D> \xDE\x4E |0
+<UF49E> \xDE\x4F |0
+<UF49F> \xDE\x50 |0
+<UF4A0> \xDE\x51 |0
+<UF4A1> \xDE\x52 |0
+<UF4A2> \xDE\x53 |0
+<UF4A3> \xDE\x54 |0
+<UF4A4> \xDE\x55 |0
+<UF4A5> \xDE\x56 |0
+<UF4A6> \xDE\x57 |0
+<UF4A7> \xDE\x58 |0
+<UF4A8> \xDE\x59 |0
+<UF4A9> \xDE\x5A |0
+<UF4AA> \xDE\x5B |0
+<UF4AB> \xDE\x5C |0
+<UF4AC> \xDE\x5D |0
+<UF4AD> \xDE\x5E |0
+<UF4AE> \xDE\x5F |0
+<UF4AF> \xDE\x60 |0
+<UF4B0> \xDE\x61 |0
+<UF4B1> \xDE\x62 |0
+<UF4B2> \xDE\x63 |0
+<UF4B3> \xDE\x64 |0
+<UF4B4> \xDE\x65 |0
+<UF4B5> \xDE\x66 |0
+<UF4B6> \xDE\x67 |0
+<UF4B7> \xDE\x68 |0
+<UF4B8> \xDE\x69 |0
+<UF4B9> \xDE\x6A |0
+<UF4BA> \xDE\x6B |0
+<UF4BB> \xDE\x6C |0
+<UF4BC> \xDE\x6D |0
+<UF4BD> \xDE\x6E |0
+<UF4BE> \xDE\x6F |0
+<UF4BF> \xDE\x70 |0
+<UF4C0> \xDE\x71 |0
+<UF4C1> \xDE\x72 |0
+<UF4C2> \xDE\x73 |0
+<UF4C3> \xDE\x74 |0
+<UF4C4> \xDE\x75 |0
+<UF4C5> \xDE\x76 |0
+<UF4C6> \xDE\x77 |0
+<UF4C7> \xDE\x78 |0
+<UF4C8> \xDE\x79 |0
+<UF4C9> \xDE\x7A |0
+<UF4CA> \xDE\x7B |0
+<UF4CB> \xDE\x7C |0
+<UF4CC> \xDE\x7D |0
+<UF4CD> \xDE\x7E |0
+<UF4CE> \xDE\x7F |0
+<UF4CF> \xDE\x81 |0
+<UF4D0> \xDE\x82 |0
+<UF4D1> \xDE\x83 |0
+<UF4D2> \xDE\x84 |0
+<UF4D3> \xDE\x85 |0
+<UF4D4> \xDE\x86 |0
+<UF4D5> \xDE\x87 |0
+<UF4D6> \xDE\x88 |0
+<UF4D7> \xDE\x89 |0
+<UF4D8> \xDE\x8A |0
+<UF4D9> \xDE\x8B |0
+<UF4DA> \xDE\x8C |0
+<UF4DB> \xDE\x8D |0
+<UF4DC> \xDE\x8E |0
+<UF4DD> \xDE\x8F |0
+<UF4DE> \xDE\x90 |0
+<UF4DF> \xDE\x91 |0
+<UF4E0> \xDE\x92 |0
+<UF4E1> \xDE\x93 |0
+<UF4E2> \xDE\x94 |0
+<UF4E3> \xDE\x95 |0
+<UF4E4> \xDE\x96 |0
+<UF4E5> \xDE\x97 |0
+<UF4E6> \xDE\x98 |0
+<UF4E7> \xDE\x99 |0
+<UF4E8> \xDE\x9A |0
+<UF4E9> \xDE\x9B |0
+<UF4EA> \xDE\x9C |0
+<UF4EB> \xDE\x9D |0
+<UF4EC> \xDE\x9E |0
+<UF4ED> \xDE\x9F |0
+<UF4EE> \xDE\xA0 |0
+<UF4EF> \xDE\xA1 |0
+<UF4F0> \xDE\xA2 |0
+<UF4F1> \xDE\xA3 |0
+<UF4F2> \xDE\xA4 |0
+<UF4F3> \xDE\xA5 |0
+<UF4F4> \xDE\xA6 |0
+<UF4F5> \xDE\xA7 |0
+<UF4F6> \xDE\xA8 |0
+<UF4F7> \xDE\xA9 |0
+<UF4F8> \xDE\xAA |0
+<UF4F9> \xDE\xAB |0
+<UF4FA> \xDE\xAC |0
+<UF4FB> \xDE\xAD |0
+<UF4FC> \xDE\xAE |0
+<UF4FD> \xDE\xAF |0
+<UF4FE> \xDE\xB0 |0
+<UF4FF> \xDE\xB1 |0
+<UF500> \xDE\xB2 |0
+<UF501> \xDE\xB3 |0
+<UF502> \xDE\xB4 |0
+<UF503> \xDE\xB5 |0
+<UF504> \xDE\xB6 |0
+<UF505> \xDE\xB7 |0
+<UF506> \xDE\xB8 |0
+<UF507> \xDE\xB9 |0
+<UF508> \xDE\xBA |0
+<UF509> \xDE\xBB |0
+<UF50A> \xDE\xBC |0
+<UF50B> \xDE\xBD |0
+<UF50C> \xDE\xBE |0
+<UF50D> \xDE\xBF |0
+<UF50E> \xDE\xC0 |0
+<UF50F> \xDE\xC1 |0
+<UF510> \xDE\xC2 |0
+<UF511> \xDE\xC3 |0
+<UF512> \xDE\xC4 |0
+<UF513> \xDE\xC5 |0
+<UF514> \xDE\xC6 |0
+<UF515> \xDE\xC7 |0
+<UF516> \xDE\xC8 |0
+<UF517> \xDE\xC9 |0
+<UF518> \xDE\xCA |0
+<UF519> \xDE\xCB |0
+<UF51A> \xDE\xCC |0
+<UF51B> \xDE\xCD |0
+<UF51C> \xDE\xCE |0
+<UF51D> \xDE\xCF |0
+<UF51E> \xDE\xD0 |0
+<UF51F> \xDE\xD1 |0
+<UF520> \xDE\xD2 |0
+<UF521> \xDE\xD3 |0
+<UF522> \xDE\xD4 |0
+<UF523> \xDE\xD5 |0
+<UF524> \xDE\xD6 |0
+<UF525> \xDE\xD7 |0
+<UF526> \xDE\xD8 |0
+<UF527> \xDE\xD9 |0
+<UF528> \xDE\xDA |0
+<UF529> \xDE\xDB |0
+<UF52A> \xDE\xDC |0
+<UF52B> \xDE\xDD |0
+<UF52C> \xDE\xDE |0
+<UF52D> \xDE\xDF |0
+<UF52E> \xDE\xE0 |0
+<UF52F> \xDE\xE1 |0
+<UF530> \xDE\xE2 |0
+<UF531> \xDE\xE3 |0
+<UF532> \xDE\xE4 |0
+<UF533> \xDE\xE5 |0
+<UF534> \xDE\xE6 |0
+<UF535> \xDE\xE7 |0
+<UF536> \xDE\xE8 |0
+<UF537> \xDE\xE9 |0
+<UF538> \xDE\xEA |0
+<UF539> \xDE\xEB |0
+<UF53A> \xDE\xEC |0
+<UF53B> \xDE\xED |0
+<UF53C> \xDE\xEE |0
+<UF53D> \xDE\xEF |0
+<UF53E> \xDE\xF0 |0
+<UF53F> \xDE\xF1 |0
+<UF540> \xDE\xF2 |0
+<UF541> \xDE\xF3 |0
+<UF542> \xDE\xF4 |0
+<UF543> \xDE\xF5 |0
+<UF544> \xDE\xF6 |0
+<UF545> \xDE\xF7 |0
+<UF546> \xDE\xF8 |0
+<UF547> \xDE\xF9 |0
+<UF548> \xDE\xFA |0
+<UF549> \xDE\xFB |0
+<UF54A> \xDE\xFC |0
+<UF54B> \xDE\xFD |0
+<UF54C> \xDF\x41 |0
+<UF54D> \xDF\x42 |0
+<UF54E> \xDF\x43 |0
+<UF54F> \xDF\x44 |0
+<UF550> \xDF\x45 |0
+<UF551> \xDF\x46 |0
+<UF552> \xDF\x47 |0
+<UF553> \xDF\x48 |0
+<UF554> \xDF\x49 |0
+<UF555> \xDF\x4A |0
+<UF556> \xDF\x4B |0
+<UF557> \xDF\x4C |0
+<UF558> \xDF\x4D |0
+<UF559> \xDF\x4E |0
+<UF55A> \xDF\x4F |0
+<UF55B> \xDF\x50 |0
+<UF55C> \xDF\x51 |0
+<UF55D> \xDF\x52 |0
+<UF55E> \xDF\x53 |0
+<UF55F> \xDF\x54 |0
+<UF560> \xDF\x55 |0
+<UF561> \xDF\x56 |0
+<UF562> \xDF\x57 |0
+<UF563> \xDF\x58 |0
+<UF564> \xDF\x59 |0
+<UF565> \xDF\x5A |0
+<UF566> \xDF\x5B |0
+<UF567> \xDF\x5C |0
+<UF568> \xDF\x5D |0
+<UF569> \xDF\x5E |0
+<UF56A> \xDF\x5F |0
+<UF56B> \xDF\x60 |0
+<UF56C> \xDF\x61 |0
+<UF56D> \xDF\x62 |0
+<UF56E> \xDF\x63 |0
+<UF56F> \xDF\x64 |0
+<UF570> \xDF\x65 |0
+<UF571> \xDF\x66 |0
+<UF572> \xDF\x67 |0
+<UF573> \xDF\x68 |0
+<UF574> \xDF\x69 |0
+<UF575> \xDF\x6A |0
+<UF576> \xDF\x6B |0
+<UF577> \xDF\x6C |0
+<UF578> \xDF\x6D |0
+<UF579> \xDF\x6E |0
+<UF57A> \xDF\x6F |0
+<UF57B> \xDF\x70 |0
+<UF57C> \xDF\x71 |0
+<UF57D> \xDF\x72 |0
+<UF57E> \xDF\x73 |0
+<UF57F> \xDF\x74 |0
+<UF580> \xDF\x75 |0
+<UF581> \xDF\x76 |0
+<UF582> \xDF\x77 |0
+<UF583> \xDF\x78 |0
+<UF584> \xDF\x79 |0
+<UF585> \xDF\x7A |0
+<UF586> \xDF\x7B |0
+<UF587> \xDF\x7C |0
+<UF588> \xDF\x7D |0
+<UF589> \xDF\x7E |0
+<UF58A> \xDF\x7F |0
+<UF58B> \xDF\x81 |0
+<UF58C> \xDF\x82 |0
+<UF58D> \xDF\x83 |0
+<UF58E> \xDF\x84 |0
+<UF58F> \xDF\x85 |0
+<UF590> \xDF\x86 |0
+<UF591> \xDF\x87 |0
+<UF592> \xDF\x88 |0
+<UF593> \xDF\x89 |0
+<UF594> \xDF\x8A |0
+<UF595> \xDF\x8B |0
+<UF596> \xDF\x8C |0
+<UF597> \xDF\x8D |0
+<UF598> \xDF\x8E |0
+<UF599> \xDF\x8F |0
+<UF59A> \xDF\x90 |0
+<UF59B> \xDF\x91 |0
+<UF59C> \xDF\x92 |0
+<UF59D> \xDF\x93 |0
+<UF59E> \xDF\x94 |0
+<UF59F> \xDF\x95 |0
+<UF5A0> \xDF\x96 |0
+<UF5A1> \xDF\x97 |0
+<UF5A2> \xDF\x98 |0
+<UF5A3> \xDF\x99 |0
+<UF5A4> \xDF\x9A |0
+<UF5A5> \xDF\x9B |0
+<UF5A6> \xDF\x9C |0
+<UF5A7> \xDF\x9D |0
+<UF5A8> \xDF\x9E |0
+<UF5A9> \xDF\x9F |0
+<UF5AA> \xDF\xA0 |0
+<UF5AB> \xDF\xA1 |0
+<UF5AC> \xDF\xA2 |0
+<UF5AD> \xDF\xA3 |0
+<UF5AE> \xDF\xA4 |0
+<UF5AF> \xDF\xA5 |0
+<UF5B0> \xDF\xA6 |0
+<UF5B1> \xDF\xA7 |0
+<UF5B2> \xDF\xA8 |0
+<UF5B3> \xDF\xA9 |0
+<UF5B4> \xDF\xAA |0
+<UF5B5> \xDF\xAB |0
+<UF5B6> \xDF\xAC |0
+<UF5B7> \xDF\xAD |0
+<UF5B8> \xDF\xAE |0
+<UF5B9> \xDF\xAF |0
+<UF5BA> \xDF\xB0 |0
+<UF5BB> \xDF\xB1 |0
+<UF5BC> \xDF\xB2 |0
+<UF5BD> \xDF\xB3 |0
+<UF5BE> \xDF\xB4 |0
+<UF5BF> \xDF\xB5 |0
+<UF5C0> \xDF\xB6 |0
+<UF5C1> \xDF\xB7 |0
+<UF5C2> \xDF\xB8 |0
+<UF5C3> \xDF\xB9 |0
+<UF5C4> \xDF\xBA |0
+<UF5C5> \xDF\xBB |0
+<UF5C6> \xDF\xBC |0
+<UF5C7> \xDF\xBD |0
+<UF5C8> \xDF\xBE |0
+<UF5C9> \xDF\xBF |0
+<UF5CA> \xDF\xC0 |0
+<UF5CB> \xDF\xC1 |0
+<UF5CC> \xDF\xC2 |0
+<UF5CD> \xDF\xC3 |0
+<UF5CE> \xDF\xC4 |0
+<UF5CF> \xDF\xC5 |0
+<UF5D0> \xDF\xC6 |0
+<UF5D1> \xDF\xC7 |0
+<UF5D2> \xDF\xC8 |0
+<UF5D3> \xDF\xC9 |0
+<UF5D4> \xDF\xCA |0
+<UF5D5> \xDF\xCB |0
+<UF5D6> \xDF\xCC |0
+<UF5D7> \xDF\xCD |0
+<UF5D8> \xDF\xCE |0
+<UF5D9> \xDF\xCF |0
+<UF5DA> \xDF\xD0 |0
+<UF5DB> \xDF\xD1 |0
+<UF5DC> \xDF\xD2 |0
+<UF5DD> \xDF\xD3 |0
+<UF5DE> \xDF\xD4 |0
+<UF5DF> \xDF\xD5 |0
+<UF5E0> \xDF\xD6 |0
+<UF5E1> \xDF\xD7 |0
+<UF5E2> \xDF\xD8 |0
+<UF5E3> \xDF\xD9 |0
+<UF5E4> \xDF\xDA |0
+<UF5E5> \xDF\xDB |0
+<UF5E6> \xDF\xDC |0
+<UF5E7> \xDF\xDD |0
+<UF5E8> \xDF\xDE |0
+<UF5E9> \xDF\xDF |0
+<UF5EA> \xDF\xE0 |0
+<UF5EB> \xDF\xE1 |0
+<UF5EC> \xDF\xE2 |0
+<UF5ED> \xDF\xE3 |0
+<UF5EE> \xDF\xE4 |0
+<UF5EF> \xDF\xE5 |0
+<UF5F0> \xDF\xE6 |0
+<UF5F1> \xDF\xE7 |0
+<UF5F2> \xDF\xE8 |0
+<UF5F3> \xDF\xE9 |0
+<UF5F4> \xDF\xEA |0
+<UF5F5> \xDF\xEB |0
+<UF5F6> \xDF\xEC |0
+<UF5F7> \xDF\xED |0
+<UF5F8> \xDF\xEE |0
+<UF5F9> \xDF\xEF |0
+<UF5FA> \xDF\xF0 |0
+<UF5FB> \xDF\xF1 |0
+<UF5FC> \xDF\xF2 |0
+<UF5FD> \xDF\xF3 |0
+<UF5FE> \xDF\xF4 |0
+<UF5FF> \xDF\xF5 |0
+<UF600> \xDF\xF6 |0
+<UF601> \xDF\xF7 |0
+<UF602> \xDF\xF8 |0
+<UF603> \xDF\xF9 |0
+<UF604> \xDF\xFA |0
+<UF605> \xDF\xFB |0
+<UF606> \xDF\xFC |0
+<UF607> \xDF\xFD |0
+<UF608> \xE0\x41 |0
+<UF609> \xE0\x42 |0
+<UF60A> \xE0\x43 |0
+<UF60B> \xE0\x44 |0
+<UF60C> \xE0\x45 |0
+<UF60D> \xE0\x46 |0
+<UF60E> \xE0\x47 |0
+<UF60F> \xE0\x48 |0
+<UF610> \xE0\x49 |0
+<UF611> \xE0\x4A |0
+<UF612> \xE0\x4B |0
+<UF613> \xE0\x4C |0
+<UF614> \xE0\x4D |0
+<UF615> \xE0\x4E |0
+<UF616> \xE0\x4F |0
+<UF617> \xE0\x50 |0
+<UF618> \xE0\x51 |0
+<UF619> \xE0\x52 |0
+<UF61A> \xE0\x53 |0
+<UF61B> \xE0\x54 |0
+<UF61C> \xE0\x55 |0
+<UF61D> \xE0\x56 |0
+<UF61E> \xE0\x57 |0
+<UF61F> \xE0\x58 |0
+<UF620> \xE0\x59 |0
+<UF621> \xE0\x5A |0
+<UF622> \xE0\x5B |0
+<UF623> \xE0\x5C |0
+<UF624> \xE0\x5D |0
+<UF625> \xE0\x5E |0
+<UF626> \xE0\x5F |0
+<UF627> \xE0\x60 |0
+<UF628> \xE0\x61 |0
+<UF629> \xE0\x62 |0
+<UF62A> \xE0\x63 |0
+<UF62B> \xE0\x64 |0
+<UF62C> \xE0\x65 |0
+<UF62D> \xE0\x66 |0
+<UF62E> \xE0\x67 |0
+<UF62F> \xE0\x68 |0
+<UF630> \xE0\x69 |0
+<UF631> \xE0\x6A |0
+<UF632> \xE0\x6B |0
+<UF633> \xE0\x6C |0
+<UF634> \xE0\x6D |0
+<UF635> \xE0\x6E |0
+<UF636> \xE0\x6F |0
+<UF637> \xE0\x70 |0
+<UF638> \xE0\x71 |0
+<UF639> \xE0\x72 |0
+<UF63A> \xE0\x73 |0
+<UF63B> \xE0\x74 |0
+<UF63C> \xE0\x75 |0
+<UF63D> \xE0\x76 |0
+<UF63E> \xE0\x77 |0
+<UF63F> \xE0\x78 |0
+<UF640> \xE0\x79 |0
+<UF641> \xE0\x7A |0
+<UF642> \xE0\x7B |0
+<UF643> \xE0\x7C |0
+<UF644> \xE0\x7D |0
+<UF645> \xE0\x7E |0
+<UF646> \xE0\x7F |0
+<UF647> \xE0\x81 |0
+<UF648> \xE0\x82 |0
+<UF649> \xE0\x83 |0
+<UF64A> \xE0\x84 |0
+<UF64B> \xE0\x85 |0
+<UF64C> \xE0\x86 |0
+<UF64D> \xE0\x87 |0
+<UF64E> \xE0\x88 |0
+<UF64F> \xE0\x89 |0
+<UF650> \xE0\x8A |0
+<UF651> \xE0\x8B |0
+<UF652> \xE0\x8C |0
+<UF653> \xE0\x8D |0
+<UF654> \xE0\x8E |0
+<UF655> \xE0\x8F |0
+<UF656> \xE0\x90 |0
+<UF657> \xE0\x91 |0
+<UF658> \xE0\x92 |0
+<UF659> \xE0\x93 |0
+<UF65A> \xE0\x94 |0
+<UF65B> \xE0\x95 |0
+<UF65C> \xE0\x96 |0
+<UF65D> \xE0\x97 |0
+<UF65E> \xE0\x98 |0
+<UF65F> \xE0\x99 |0
+<UF660> \xE0\x9A |0
+<UF661> \xE0\x9B |0
+<UF662> \xE0\x9C |0
+<UF663> \xE0\x9D |0
+<UF664> \xE0\x9E |0
+<UF665> \xE0\x9F |0
+<UF666> \xE0\xA0 |0
+<UF667> \xE0\xA1 |0
+<UF668> \xE0\xA2 |0
+<UF669> \xE0\xA3 |0
+<UF66A> \xE0\xA4 |0
+<UF66B> \xE0\xA5 |0
+<UF66C> \xE0\xA6 |0
+<UF66D> \xE0\xA7 |0
+<UF66E> \xE0\xA8 |0
+<UF66F> \xE0\xA9 |0
+<UF670> \xE0\xAA |0
+<UF671> \xE0\xAB |0
+<UF672> \xE0\xAC |0
+<UF673> \xE0\xAD |0
+<UF674> \xE0\xAE |0
+<UF675> \xE0\xAF |0
+<UF676> \xE0\xB0 |0
+<UF677> \xE0\xB1 |0
+<UF678> \xE0\xB2 |0
+<UF679> \xE0\xB3 |0
+<UF67A> \xE0\xB4 |0
+<UF67B> \xE0\xB5 |0
+<UF67C> \xE0\xB6 |0
+<UF67D> \xE0\xB7 |0
+<UF67E> \xE0\xB8 |0
+<UF67F> \xE0\xB9 |0
+<UF680> \xE0\xBA |0
+<UF681> \xE0\xBB |0
+<UF682> \xE0\xBC |0
+<UF683> \xE0\xBD |0
+<UF684> \xE0\xBE |0
+<UF685> \xE0\xBF |0
+<UF686> \xE0\xC0 |0
+<UF687> \xE0\xC1 |0
+<UF688> \xE0\xC2 |0
+<UF689> \xE0\xC3 |0
+<UF68A> \xE0\xC4 |0
+<UF68B> \xE0\xC5 |0
+<UF68C> \xE0\xC6 |0
+<UF68D> \xE0\xC7 |0
+<UF68E> \xE0\xC8 |0
+<UF68F> \xE0\xC9 |0
+<UF690> \xE0\xCA |0
+<UF691> \xE0\xCB |0
+<UF692> \xE0\xCC |0
+<UF693> \xE0\xCD |0
+<UF694> \xE0\xCE |0
+<UF695> \xE0\xCF |0
+<UF696> \xE0\xD0 |0
+<UF697> \xE0\xD1 |0
+<UF698> \xE0\xD2 |0
+<UF699> \xE0\xD3 |0
+<UF69A> \xE0\xD4 |0
+<UF69B> \xE0\xD5 |0
+<UF69C> \xE0\xD6 |0
+<UF69D> \xE0\xD7 |0
+<UF69E> \xE0\xD8 |0
+<UF69F> \xE0\xD9 |0
+<UF6A0> \xE0\xDA |0
+<UF6A1> \xE0\xDB |0
+<UF6A2> \xE0\xDC |0
+<UF6A3> \xE0\xDD |0
+<UF6A4> \xE0\xDE |0
+<UF6A5> \xE0\xDF |0
+<UF6A6> \xE0\xE0 |0
+<UF6A7> \xE0\xE1 |0
+<UF6A8> \xE0\xE2 |0
+<UF6A9> \xE0\xE3 |0
+<UF6AA> \xE0\xE4 |0
+<UF6AB> \xE0\xE5 |0
+<UF6AC> \xE0\xE6 |0
+<UF6AD> \xE0\xE7 |0
+<UF6AE> \xE0\xE8 |0
+<UF6AF> \xE0\xE9 |0
+<UF6B0> \xE0\xEA |0
+<UF6B1> \xE0\xEB |0
+<UF6B2> \xE0\xEC |0
+<UF6B3> \xE0\xED |0
+<UF6B4> \xE0\xEE |0
+<UF6B5> \xE0\xEF |0
+<UF6B6> \xE0\xF0 |0
+<UF6B7> \xE0\xF1 |0
+<UF6B8> \xE0\xF2 |0
+<UF6B9> \xE0\xF3 |0
+<UF6BA> \xE0\xF4 |0
+<UF6BB> \xE0\xF5 |0
+<UF6BC> \xE0\xF6 |0
+<UF6BD> \xE0\xF7 |0
+<UF6BE> \xE0\xF8 |0
+<UF6BF> \xE0\xF9 |0
+<UF6C0> \xE0\xFA |0
+<UF6C1> \xE0\xFB |0
+<UF6C2> \xE0\xFC |0
+<UF6C3> \xE0\xFD |0
+<UF6C4> \xE1\x41 |0
+<UF6C5> \xE1\x42 |0
+<UF6C6> \xE1\x43 |0
+<UF6C7> \xE1\x44 |0
+<UF6C8> \xE1\x45 |0
+<UF6C9> \xE1\x46 |0
+<UF6CA> \xE1\x47 |0
+<UF6CB> \xE1\x48 |0
+<UF6CC> \xE1\x49 |0
+<UF6CD> \xE1\x4A |0
+<UF6CE> \xE1\x4B |0
+<UF6CF> \xE1\x4C |0
+<UF6D0> \xE1\x4D |0
+<UF6D1> \xE1\x4E |0
+<UF6D2> \xE1\x4F |0
+<UF6D3> \xE1\x50 |0
+<UF6D4> \xE1\x51 |0
+<UF6D5> \xE1\x52 |0
+<UF6D6> \xE1\x53 |0
+<UF6D7> \xE1\x54 |0
+<UF6D8> \xE1\x55 |0
+<UF6D9> \xE1\x56 |0
+<UF6DA> \xE1\x57 |0
+<UF6DB> \xE1\x58 |0
+<UF6DC> \xE1\x59 |0
+<UF6DD> \xE1\x5A |0
+<UF6DE> \xE1\x5B |0
+<UF6DF> \xE1\x5C |0
+<UF6E0> \xE1\x5D |0
+<UF6E1> \xE1\x5E |0
+<UF6E2> \xE1\x5F |0
+<UF6E3> \xE1\x60 |0
+<UF6E4> \xE1\x61 |0
+<UF6E5> \xE1\x62 |0
+<UF6E6> \xE1\x63 |0
+<UF6E7> \xE1\x64 |0
+<UF6E8> \xE1\x65 |0
+<UF6E9> \xE1\x66 |0
+<UF6EA> \xE1\x67 |0
+<UF6EB> \xE1\x68 |0
+<UF6EC> \xE1\x69 |0
+<UF6ED> \xE1\x6A |0
+<UF6EE> \xE1\x6B |0
+<UF6EF> \xE1\x6C |0
+<UF6F0> \xE1\x6D |0
+<UF6F1> \xE1\x6E |0
+<UF6F2> \xE1\x6F |0
+<UF6F3> \xE1\x70 |0
+<UF6F4> \xE1\x71 |0
+<UF6F5> \xE1\x72 |0
+<UF6F6> \xE1\x73 |0
+<UF6F7> \xE1\x74 |0
+<UF6F8> \xE1\x75 |0
+<UF6F9> \xE1\x76 |0
+<UF6FA> \xE1\x77 |0
+<UF6FB> \xE1\x78 |0
+<UF6FC> \xE1\x79 |0
+<UF6FD> \xE1\x7A |0
+<UF6FE> \xE1\x7B |0
+<UF6FF> \xE1\x7C |0
+<UF700> \xE1\x7D |0
+<UF701> \xE1\x7E |0
+<UF702> \xE1\x7F |0
+<UF703> \xE1\x81 |0
+<UF704> \xE1\x82 |0
+<UF705> \xE1\x83 |0
+<UF706> \xE1\x84 |0
+<UF707> \xE1\x85 |0
+<UF708> \xE1\x86 |0
+<UF709> \xE1\x87 |0
+<UF70A> \xE1\x88 |0
+<UF70B> \xE1\x89 |0
+<UF70C> \xE1\x8A |0
+<UF70D> \xE1\x8B |0
+<UF70E> \xE1\x8C |0
+<UF70F> \xE1\x8D |0
+<UF710> \xE1\x8E |0
+<UF711> \xE1\x8F |0
+<UF712> \xE1\x90 |0
+<UF713> \xE1\x91 |0
+<UF714> \xE1\x92 |0
+<UF715> \xE1\x93 |0
+<UF716> \xE1\x94 |0
+<UF717> \xE1\x95 |0
+<UF718> \xE1\x96 |0
+<UF719> \xE1\x97 |0
+<UF71A> \xE1\x98 |0
+<UF71B> \xE1\x99 |0
+<UF71C> \xE1\x9A |0
+<UF71D> \xE1\x9B |0
+<UF71E> \xE1\x9C |0
+<UF71F> \xE1\x9D |0
+<UF720> \xE1\x9E |0
+<UF721> \xE1\x9F |0
+<UF722> \xE1\xA0 |0
+<UF723> \xE1\xA1 |0
+<UF724> \xE1\xA2 |0
+<UF725> \xE1\xA3 |0
+<UF726> \xE1\xA4 |0
+<UF727> \xE1\xA5 |0
+<UF728> \xE1\xA6 |0
+<UF729> \xE1\xA7 |0
+<UF72A> \xE1\xA8 |0
+<UF72B> \xE1\xA9 |0
+<UF72C> \xE1\xAA |0
+<UF72D> \xE1\xAB |0
+<UF72E> \xE1\xAC |0
+<UF72F> \xE1\xAD |0
+<UF730> \xE1\xAE |0
+<UF731> \xE1\xAF |0
+<UF732> \xE1\xB0 |0
+<UF733> \xE1\xB1 |0
+<UF734> \xE1\xB2 |0
+<UF735> \xE1\xB3 |0
+<UF736> \xE1\xB4 |0
+<UF737> \xE1\xB5 |0
+<UF738> \xE1\xB6 |0
+<UF739> \xE1\xB7 |0
+<UF73A> \xE1\xB8 |0
+<UF73B> \xE1\xB9 |0
+<UF73C> \xE1\xBA |0
+<UF73D> \xE1\xBB |0
+<UF73E> \xE1\xBC |0
+<UF73F> \xE1\xBD |0
+<UF740> \xE1\xBE |0
+<UF741> \xE1\xBF |0
+<UF742> \xE1\xC0 |0
+<UF743> \xE1\xC1 |0
+<UF744> \xE1\xC2 |0
+<UF745> \xE1\xC3 |0
+<UF746> \xE1\xC4 |0
+<UF747> \xE1\xC5 |0
+<UF748> \xE1\xC6 |0
+<UF749> \xE1\xC7 |0
+<UF74A> \xE1\xC8 |0
+<UF74B> \xE1\xC9 |0
+<UF74C> \xE1\xCA |0
+<UF74D> \xE1\xCB |0
+<UF74E> \xE1\xCC |0
+<UF74F> \xE1\xCD |0
+<UF750> \xE1\xCE |0
+<UF751> \xE1\xCF |0
+<UF752> \xE1\xD0 |0
+<UF753> \xE1\xD1 |0
+<UF754> \xE1\xD2 |0
+<UF755> \xE1\xD3 |0
+<UF756> \xE1\xD4 |0
+<UF757> \xE1\xD5 |0
+<UF758> \xE1\xD6 |0
+<UF759> \xE1\xD7 |0
+<UF75A> \xE1\xD8 |0
+<UF75B> \xE1\xD9 |0
+<UF75C> \xE1\xDA |0
+<UF75D> \xE1\xDB |0
+<UF75E> \xE1\xDC |0
+<UF75F> \xE1\xDD |0
+<UF760> \xE1\xDE |0
+<UF761> \xE1\xDF |0
+<UF762> \xE1\xE0 |0
+<UF763> \xE1\xE1 |0
+<UF764> \xE1\xE2 |0
+<UF765> \xE1\xE3 |0
+<UF766> \xE1\xE4 |0
+<UF767> \xE1\xE5 |0
+<UF768> \xE1\xE6 |0
+<UF769> \xE1\xE7 |0
+<UF76A> \xE1\xE8 |0
+<UF76B> \xE1\xE9 |0
+<UF76C> \xE1\xEA |0
+<UF76D> \xE1\xEB |0
+<UF76E> \xE1\xEC |0
+<UF76F> \xE1\xED |0
+<UF770> \xE1\xEE |0
+<UF771> \xE1\xEF |0
+<UF772> \xE1\xF0 |0
+<UF773> \xE1\xF1 |0
+<UF774> \xE1\xF2 |0
+<UF775> \xE1\xF3 |0
+<UF776> \xE1\xF4 |0
+<UF777> \xE1\xF5 |0
+<UF778> \xE1\xF6 |0
+<UF779> \xE1\xF7 |0
+<UF77A> \xE1\xF8 |0
+<UF77B> \xE1\xF9 |0
+<UF77C> \xE1\xFA |0
+<UF77D> \xE1\xFB |0
+<UF77E> \xE1\xFC |0
+<UF77F> \xE1\xFD |0
+<UF780> \xE2\x41 |0
+<UF781> \xE2\x42 |0
+<UF782> \xE2\x43 |0
+<UF783> \xE2\x44 |0
+<UF784> \xE2\x45 |0
+<UF785> \xE2\x46 |0
+<UF786> \xE2\x47 |0
+<UF787> \xE2\x48 |0
+<UF788> \xE2\x49 |0
+<UF789> \xE2\x4A |0
+<UF78A> \xE2\x4B |0
+<UF78B> \xE2\x4C |0
+<UF78C> \xE2\x4D |0
+<UF78D> \xE2\x4E |0
+<UF78E> \xE2\x4F |0
+<UF78F> \xE2\x50 |0
+<UF790> \xE2\x51 |0
+<UF791> \xE2\x52 |0
+<UF792> \xE2\x53 |0
+<UF793> \xE2\x54 |0
+<UF794> \xE2\x55 |0
+<UF795> \xE2\x56 |0
+<UF796> \xE2\x57 |0
+<UF797> \xE2\x58 |0
+<UF798> \xE2\x59 |0
+<UF799> \xE2\x5A |0
+<UF79A> \xE2\x5B |0
+<UF79B> \xE2\x5C |0
+<UF79C> \xE2\x5D |0
+<UF79D> \xE2\x5E |0
+<UF79E> \xE2\x5F |0
+<UF79F> \xE2\x60 |0
+<UF7A0> \xE2\x61 |0
+<UF7A1> \xE2\x62 |0
+<UF7A2> \xE2\x63 |0
+<UF7A3> \xE2\x64 |0
+<UF7A4> \xE2\x65 |0
+<UF7A5> \xE2\x66 |0
+<UF7A6> \xE2\x67 |0
+<UF7A7> \xE2\x68 |0
+<UF7A8> \xE2\x69 |0
+<UF7A9> \xE2\x6A |0
+<UF7AA> \xE2\x6B |0
+<UF7AB> \xE2\x6C |0
+<UF7AC> \xE2\x6D |0
+<UF7AD> \xE2\x6E |0
+<UF7AE> \xE2\x6F |0
+<UF7AF> \xE2\x70 |0
+<UF7B0> \xE2\x71 |0
+<UF7B1> \xE2\x72 |0
+<UF7B2> \xE2\x73 |0
+<UF7B3> \xE2\x74 |0
+<UF7B4> \xE2\x75 |0
+<UF7B5> \xE2\x76 |0
+<UF7B6> \xE2\x77 |0
+<UF7B7> \xE2\x78 |0
+<UF7B8> \xE2\x79 |0
+<UF7B9> \xE2\x7A |0
+<UF7BA> \xE2\x7B |0
+<UF7BB> \xE2\x7C |0
+<UF7BC> \xE2\x7D |0
+<UF7BD> \xE2\x7E |0
+<UF7BE> \xE2\x7F |0
+<UF7BF> \xE2\x81 |0
+<UF7C0> \xE2\x82 |0
+<UF7C1> \xE2\x83 |0
+<UF7C2> \xE2\x84 |0
+<UF7C3> \xE2\x85 |0
+<UF7C4> \xE2\x86 |0
+<UF7C5> \xE2\x87 |0
+<UF7C6> \xE2\x88 |0
+<UF7C7> \xE2\x89 |0
+<UF7C8> \xE2\x8A |0
+<UF7C9> \xE2\x8B |0
+<UF7CA> \xE2\x8C |0
+<UF7CB> \xE2\x8D |0
+<UF7CC> \xE2\x8E |0
+<UF7CD> \xE2\x8F |0
+<UF7CE> \xE2\x90 |0
+<UF7CF> \xE2\x91 |0
+<UF7D0> \xE2\x92 |0
+<UF7D1> \xE2\x93 |0
+<UF7D2> \xE2\x94 |0
+<UF7D3> \xE2\x95 |0
+<UF7D4> \xE2\x96 |0
+<UF7D5> \xE2\x97 |0
+<UF7D6> \xE2\x98 |0
+<UF7D7> \xE2\x99 |0
+<UF7D8> \xE2\x9A |0
+<UF7D9> \xE2\x9B |0
+<UF7DA> \xE2\x9C |0
+<UF7DB> \xE2\x9D |0
+<UF7DC> \xE2\x9E |0
+<UF7DD> \xE2\x9F |0
+<UF7DE> \xE2\xA0 |0
+<UF7DF> \xE2\xA1 |0
+<UF7E0> \xE2\xA2 |0
+<UF7E1> \xE2\xA3 |0
+<UF7E2> \xE2\xA4 |0
+<UF7E3> \xE2\xA5 |0
+<UF7E4> \xE2\xA6 |0
+<UF7E5> \xE2\xA7 |0
+<UF7E6> \xE2\xA8 |0
+<UF7E7> \xE2\xA9 |0
+<UF7E8> \xE2\xAA |0
+<UF7E9> \xE2\xAB |0
+<UF7EA> \xE2\xAC |0
+<UF7EB> \xE2\xAD |0
+<UF7EC> \xE2\xAE |0
+<UF7ED> \xE2\xAF |0
+<UF7EE> \xE2\xB0 |0
+<UF7EF> \xE2\xB1 |0
+<UF7F0> \xE2\xB2 |0
+<UF7F1> \xE2\xB3 |0
+<UF7F2> \xE2\xB4 |0
+<UF7F3> \xE2\xB5 |0
+<UF7F4> \xE2\xB6 |0
+<UF7F5> \xE2\xB7 |0
+<UF7F6> \xE2\xB8 |0
+<UF7F7> \xE2\xB9 |0
+<UF7F8> \xE2\xBA |0
+<UF7F9> \xE2\xBB |0
+<UF7FA> \xE2\xBC |0
+<UF7FB> \xE2\xBD |0
+<UF7FC> \xE2\xBE |0
+<UF7FD> \xE2\xBF |0
+<UF7FE> \xE2\xC0 |0
+<UF7FF> \xE2\xC1 |0
+<UF800> \xE2\xC2 |0
+<UF801> \xE2\xC3 |0
+<UF802> \xE2\xC4 |0
+<UF803> \xE2\xC5 |0
+<UF804> \xE2\xC6 |0
+<UF805> \xE2\xC7 |0
+<UF806> \xE2\xC8 |0
+<UF807> \xE2\xC9 |0
+<UF808> \xE2\xCA |0
+<UF809> \xE2\xCB |0
+<UF80A> \xE2\xCC |0
+<UF80B> \xE2\xCD |0
+<UF80C> \xE2\xCE |0
+<UF80D> \xE2\xCF |0
+<UF80E> \xE2\xD0 |0
+<UF80F> \xE2\xD1 |0
+<UF810> \xE2\xD2 |0
+<UF811> \xE2\xD3 |0
+<UF812> \xE2\xD4 |0
+<UF813> \xE2\xD5 |0
+<UF814> \xE2\xD6 |0
+<UF815> \xE2\xD7 |0
+<UF816> \xE2\xD8 |0
+<UF817> \xE2\xD9 |0
+<UF818> \xE2\xDA |0
+<UF819> \xE2\xDB |0
+<UF81A> \xE2\xDC |0
+<UF81B> \xE2\xDD |0
+<UF81C> \xE2\xDE |0
+<UF81D> \xE2\xDF |0
+<UF81E> \xE2\xE0 |0
+<UF81F> \xE2\xE1 |0
+<UF820> \xE2\xE2 |0
+<UF821> \xE2\xE3 |0
+<UF822> \xE2\xE4 |0
+<UF823> \xE2\xE5 |0
+<UF824> \xE2\xE6 |0
+<UF825> \xE2\xE7 |0
+<UF826> \xE2\xE8 |0
+<UF827> \xE2\xE9 |0
+<UF828> \xE2\xEA |0
+<UF829> \xE2\xEB |0
+<UF82A> \xE2\xEC |0
+<UF82B> \xE2\xED |0
+<UF82C> \xE2\xEE |0
+<UF82D> \xE2\xEF |0
+<UF82E> \xE2\xF0 |0
+<UF82F> \xE2\xF1 |0
+<UF830> \xE2\xF2 |0
+<UF831> \xE2\xF3 |0
+<UF832> \xE2\xF4 |0
+<UF833> \xE2\xF5 |0
+<UF834> \xE2\xF6 |0
+<UF835> \xE2\xF7 |0
+<UF836> \xE2\xF8 |0
+<UF837> \xE2\xF9 |0
+<UF838> \xE2\xFA |0
+<UF839> \xE2\xFB |0
+<UF83A> \xE2\xFC |0
+<UF83B> \xE2\xFD |0
+<UF83E> \x44\x5C |0
+<UF83F> \x46\xA8 |0
+<UF840> \x46\xA9 |0
+<UF841> \x46\xAA |0
+<UF842> \x46\xAB |0
+<UFA0C> \x69\x4B |0
+<UFA0D> \x7A\xA4 |0
+<UFE30> \x47\x41 |0
+<UFE31> \x46\xA7 |0
+<UFE32> \x47\x49 |0
+<UFE33> \x46\xB6 |0
+<UFE34> \x46\xBC |0
+<UFE35> \x46\xAC |0
+<UFE36> \x46\xAD |0
+<UFE37> \x46\xAE |0
+<UFE38> \x46\xAF |0
+<UFE39> \x46\xB0 |0
+<UFE3A> \x46\xB1 |0
+<UFE3B> \x46\xA4 |0
+<UFE3C> \x46\xA5 |0
+<UFE3D> \x46\xB2 |0
+<UFE3E> \x46\xB3 |0
+<UFE3F> \x46\xB4 |0
+<UFE40> \x46\xB5 |0
+<UFE41> \x46\xA0 |0
+<UFE42> \x46\xA1 |0
+<UFE43> \x46\xA2 |0
+<UFE44> \x46\xA3 |0
+<UFE49> \x46\xBE |0
+<UFE4A> \x46\xBF |0
+<UFE4B> \x46\xC2 |0
+<UFE4C> \x46\xC3 |0
+<UFE4D> \x46\xC0 |0
+<UFE4E> \x46\xC1 |0
+<UFE4F> \x46\xBD |0
+<UFE50> \x47\x42 |0
+<UFE51> \x47\x43 |0
+<UFE52> \x47\x44 |0
+<UFE54> \x47\x45 |0
+<UFE55> \x47\x46 |0
+<UFE56> \x47\x47 |0
+<UFE57> \x47\x48 |0
+<UFE58> \x47\x4A |0
+<UFE59> \x47\x4B |0
+<UFE5A> \x47\x4C |0
+<UFE5B> \x47\x4D |0
+<UFE5C> \x47\x4E |0
+<UFE5D> \x47\x4F |0
+<UFE5E> \x47\x50 |0
+<UFE5F> \x47\x53 |0
+<UFE60> \x47\x54 |0
+<UFE61> \x46\xC4 |0
+<UFE62> \x47\x55 |0
+<UFE63> \x47\x56 |0
+<UFE64> \x47\x57 |0
+<UFE65> \x47\x58 |0
+<UFE66> \x47\x59 |0
+<UFE68> \x47\x5A |0
+<UFE69> \x47\x5B |0
+<UFE6A> \x47\x5C |0
+<UFE6B> \x47\x5D |0
+<UFF01> \x42\x5A |0
+<UFF02> \x42\x7F |0
+<UFF03> \x42\x7B |0
+<UFF04> \x42\xE0 |0
+<UFF05> \x42\x6C |0
+<UFF06> \x42\x50 |0
+<UFF07> \x42\x7D |0
+<UFF08> \x42\x4D |0
+<UFF09> \x42\x5D |0
+<UFF0A> \x46\xB8 |0
+<UFF0B> \x42\x4E |0
+<UFF0C> \x42\x6B |0
+<UFF0D> \x42\x60 |0
+<UFF0E> \x42\x4B |0
+<UFF0F> \x42\x61 |0
+<UFF10> \x42\xF0 |0
+<UFF11> \x42\xF1 |0
+<UFF12> \x42\xF2 |0
+<UFF13> \x42\xF3 |0
+<UFF14> \x42\xF4 |0
+<UFF15> \x42\xF5 |0
+<UFF16> \x42\xF6 |0
+<UFF17> \x42\xF7 |0
+<UFF18> \x42\xF8 |0
+<UFF19> \x42\xF9 |0
+<UFF1A> \x42\x7A |0
+<UFF1B> \x42\x5E |0
+<UFF1C> \x42\x4C |0
+<UFF1D> \x42\x7E |0
+<UFF1E> \x42\x6E |0
+<UFF1F> \x42\x6F |0
+<UFF20> \x42\x7C |0
+<UFF21> \x42\xC1 |0
+<UFF22> \x42\xC2 |0
+<UFF23> \x42\xC3 |0
+<UFF24> \x42\xC4 |0
+<UFF25> \x42\xC5 |0
+<UFF26> \x42\xC6 |0
+<UFF27> \x42\xC7 |0
+<UFF28> \x42\xC8 |0
+<UFF29> \x42\xC9 |0
+<UFF2A> \x42\xD1 |0
+<UFF2B> \x42\xD2 |0
+<UFF2C> \x42\xD3 |0
+<UFF2D> \x42\xD4 |0
+<UFF2E> \x42\xD5 |0
+<UFF2F> \x42\xD6 |0
+<UFF30> \x42\xD7 |0
+<UFF31> \x42\xD8 |0
+<UFF32> \x42\xD9 |0
+<UFF33> \x42\xE2 |0
+<UFF34> \x42\xE3 |0
+<UFF35> \x42\xE4 |0
+<UFF36> \x42\xE5 |0
+<UFF37> \x42\xE6 |0
+<UFF38> \x42\xE7 |0
+<UFF39> \x42\xE8 |0
+<UFF3A> \x42\xE9 |0
+<UFF3B> \x44\x44 |0
+<UFF3C> \x43\xE0 |0
+<UFF3D> \x44\x45 |0
+<UFF3E> \x44\x70 |0
+<UFF3F> \x42\x6D |0
+<UFF41> \x42\x81 |0
+<UFF42> \x42\x82 |0
+<UFF43> \x42\x83 |0
+<UFF44> \x42\x84 |0
+<UFF45> \x42\x85 |0
+<UFF46> \x42\x86 |0
+<UFF47> \x42\x87 |0
+<UFF48> \x42\x88 |0
+<UFF49> \x42\x89 |0
+<UFF4A> \x42\x91 |0
+<UFF4B> \x42\x92 |0
+<UFF4C> \x42\x93 |0
+<UFF4D> \x42\x94 |0
+<UFF4E> \x42\x95 |0
+<UFF4F> \x42\x96 |0
+<UFF50> \x42\x97 |0
+<UFF51> \x42\x98 |0
+<UFF52> \x42\x99 |0
+<UFF53> \x42\xA2 |0
+<UFF54> \x42\xA3 |0
+<UFF55> \x42\xA4 |0
+<UFF56> \x42\xA5 |0
+<UFF57> \x42\xA6 |0
+<UFF58> \x42\xA7 |0
+<UFF59> \x42\xA8 |0
+<UFF5A> \x42\xA9 |0
+<UFF5B> \x42\xC0 |0
+<UFF5C> \x42\x4F |0
+<UFF5D> \x42\xD0 |0
+<UFF5E> \x43\xA1 |1
+<UFFE0> \x43\x4A |0
+<UFFE1> \x42\x4A |0
+<UFFE2> \x42\x5F |0
+<UFFE3> \x47\x51 |0
+<UFFE4> \x42\x6A |0
+<UFFE5> \x42\x5B |0
+END CHARMAP
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/icu26_testtypes.res b/Build/source/libs/icu/icu-xetex/test/testdata/icu26_testtypes.res
new file mode 100644
index 00000000000..d7747ce691c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/icu26_testtypes.res
Binary files differ
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/icu26e_testtypes.res b/Build/source/libs/icu/icu-xetex/test/testdata/icu26e_testtypes.res
new file mode 100644
index 00000000000..89acde07914
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/icu26e_testtypes.res
Binary files differ
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/icuio.txt b/Build/source/libs/icu/icu-xetex/test/testdata/icuio.txt
new file mode 100644
index 00000000000..3f5fbb88e65
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/icuio.txt
@@ -0,0 +1,178 @@
+//*****************************************************************************
+//
+// Copyright (C) 2004-2006, International Business Machines
+// Corporation and others. All Rights Reserved.
+//
+// file name: icuio.txt
+// encoding: US-ASCII
+// tab size: 4 (not used)
+// indentation:4
+//
+// created on: 2004Apr06
+// created by: George Rhoten
+//
+// ICU resource bundle source file with test data for data-driven ICU I/O tests.
+//
+//*****************************************************************************
+
+icuio:table(nofallback) {
+ Info {
+ Description { "Test data for ICU I/O" }
+ LongDescription {
+ "Test data for data-driven conversion tests in icu/source/test/iotest/iotest.cpp\n"
+ "Run iotest printf\n"
+
+ "argumentType:\n"
+ "\td: double\n"
+ "\tf: float\n"
+ "\t1: int8_t (hexadecimal)\n"
+ "\t2: int16_t (hexadecimal)\n"
+ "\t4: int32_t (hexadecimal)\n"
+ "\t8: int64_t (hexadecimal)\n"
+ "\ts: char * string\n"
+ "\tS: UChar * string\n"
+ }
+ }
+ TestData {
+ printf {
+ Headers { "format", "result", "argumentType", "argument" }
+ Cases {
+ { "%5.3S", " abc", "S", "abcde" }
+ { "%-5.3S", "abc ", "S", "abcde" }
+ { "%5.3S", " abc", "S", "abcdef" }
+ { "%-5.3S", "abc ", "S", "abcdef" }
+ { "%5.3S", " a", "S", "a" }
+ { "%-5.3S", "a ", "S", "a" }
+ { "%5.3s", " abc", "s", "abcde" }
+ { "%-5.3s", "abc ", "s", "abcde" }
+ { "%5.3s", " abc", "s", "abcdef" }
+ { "%-5.3s", "abc ", "s", "abcdef" }
+ { "%5.3s", " a", "s", "a" }
+ { "%-5.3s", "a ", "s", "a" }
+ { "%5.3C", " a", "2", "61" }
+ { "%-5.3C", "a ", "2", "61" }
+ { "%-5.0C", "a ", "2", "61" } // Make sure that the precision is ignored.
+ { "%.3P", "120.000%", "d", "1.2" }
+ { "%.0P", "120%", "d", "1.2" }
+ { "%.3P", "1.200%", "d", "0.012" }
+ { "%.0P", "1%", "d", "0.012" }
+ { "%04.0P", "001%", "d", "0.012" }
+ { "%+4.0P", " +1%", "d", "0.012" }
+ { "%e", "1.200000e+000", "d", "1.2" }
+ { "%e", "1.234568e+006", "d", "1234567.89" }
+ { "%E", "1.234568E+006", "d", "1234567.89" }
+ { "%10e", "1.234568e+000", "d", "1.23456789" }
+ { "%10.4e", "1.2346e+000", "d", "1.23456789" }
+ { "%-10e", "1.234568e+000", "d", "1.23456789" }
+ { "%10e", "1.234568e+002", "d", "123.456789" }
+ { "%-10e", "1.234568e+002", "d", "123.456789" }
+ { "%-+12.1e", "+1.2e+000 ", "d", "1.234" }
+ { "%-+12.1e", "-1.2e+000 ", "d", "-1.234" }
+ { "%- 12.10e", " 1.2340000000e+000", "d", "1.234" }
+ { "%- 12.1e", "-1.2e+000 ", "d", "-1.234" }
+ { "%+12.1e", " +1.2e+000", "d", "1.234" }
+ { "%+12.1e", " -1.2e+000", "d", "-1.234" }
+ { "% 12.1e", " 1.2e+000", "d", "1.234" }
+ { "% 12.1e", " -1.2e+000", "d", "-1.234" }
+ { "%12.1e", " 1.2e+000", "d", "1.234" }
+ { "%12.1e", " -1.2e+000", "d", "-1.234" }
+ { "%.2e", "1.23e+000", "d", "1.234" }
+ { "%.2e", "-1.23e+000", "d", "-1.234" }
+ { "%3e", "1.234000e+000", "d", "1.234" }
+ { "%3e", "-1.234000e+000", "d", "-1.234" }
+ { "%g", "12345.7", "d", "12345.6789" }
+ { "%g", "123457", "d", "123456.789" }
+ { "%g", "1.23457e+006", "d", "1234567.89" }
+ { "%G", "12345.7", "d", "12345.6789" }
+ { "%G", "123457", "d", "123456.789" }
+ { "%G", "1.23457E+006", "d", "1234567.89" }
+ { "%.14G", "1.7E+064", "d", "1.7E+64" }
+ { "%.0f", "-12", "d", "-12.34" }
+ { "%.0e", "-1e+001", "d", "-12.34" }
+ { "%.0g", "-1e+001", "d", "-12.34" }
+ { "%hd", "-30002", "2", "8ace" }
+ { "%hu", "35534", "2", "8ace" }
+ { "%ho", "105316", "2", "8ace" }
+ { "%hx", "8ace", "2", "8ace" }
+ { "%lx", "8ace1234", "4", "8ace1234" }
+ { "%llx", "123456789abcdef0", "8", "123456789abcdef0" }
+ { "%lu", "2328760884", "4", "8ace1234" }
+ // %llu doesn't work yet.
+ { "%ld", "-1966206412", "4", "8ace1234" }
+ { "%lld", "1311768467463790320", "8", "123456789abcdef0" }
+ { "%+u", "2328760884", "4", "8ace1234" } // Ignore the + sign argument
+ }
+ }
+ printfPrecision {
+ Headers { "format", "result", "argumentType", "argument", "precision" }
+ Cases {
+ { "%+1.*e", "+1.2346e+000", "d", "1.2345678", :int{4} }
+ { "%+2.*e", "+1.234568e+000", "d", "1.2345678", :int{6} }
+ { "%*d", "12345678", "4", "BC614E", :int{7} }
+ { "%*d", "12345678", "4", "BC614E", :int{8} }
+ { "%*d", " 12345678", "4", "BC614E", :int{9} }
+ { "%*d", "12345678 ", "4", "BC614E", :int{-9} }
+ { "%*d", "1", "4", "1", :int{-1} }
+ { "%*d", "1 ", "4", "1", :int{-2} }
+ }
+ }
+ scanf {
+ Headers { "format", "argument", "argumentType", "result" }
+ Cases {
+ { "%e", "1.200000e+000", "f", "1.2" }
+ { "%*e%e", "1.200000e+000 4.825000e+000", "f", "4.825" }
+ { "%C", "1234", "2", "31" }
+ { "%*C%C", "1234", "2", "32" }
+ { "%S", "1234 5678", "S", "1234" }
+ { "%*S%S", "1234 5678", "S", "5678" }
+ { "%hd", "1234 5678", "2", "4D2" }
+ { "%*hd%hd", "1234 5678", "2", "162E" }
+ { "%d", "1234 5678", "4", "4D2" }
+ { "%ld", "1234 5678", "4", "4D2" }
+ { "%lld", "1311768467463790320", "8", "123456789abcdef0" }
+ { "%3d", "1234 5678", "4", "7B" }
+ { "%4d", "123", "4", "7B" }
+ { "%2d", "123", "4", "C" }
+ { "%40d", "123", "4", "7B" }
+ { "%2e", "1.25", "f", "1" }
+ { "%2f", "1.25", "f", "1" }
+ { "%2g", "1.25", "f", "1" }
+ { "%2le", "1.25", "d", "1" }
+ { "%2lf", "1.25", "d", "1" }
+ { "%2lg", "1.25", "d", "1" }
+ { "%*2e%2e", "1.25", "f", "25" }
+ { "%*2f%2f", "1.25", "f", "25" }
+ { "%*2g%2g", "1.25", "f", "25" }
+ { "%*d%d", "1234 5678", "4", "162E" }
+ { "%x", "abcd ef01", "4", "abcd" }
+ { "%3x", "abcd ef01", "4", "abc" }
+ { "%*hx%hx", "abcd ef01", "2", "ef01" }
+ { "%ho", "1046539", "2", "89AB" } // Extra 9 on the end
+ { "%3ho", "7700", "2", "1F8" } // Don't read the 0 at the end
+ { "%llo", "1777777777777777777777", "8", "FFFFFFFFFFFFFFFF" }
+ { "%lx", "abcdef01", "4", "abcdef01" }
+ { "%x", "0x7abcdef0", "4", "7abcdef0" }
+ { "%llx", "123456789abcdef0", "8", "123456789abcdef0" }
+ { "%S", "a\U00010000b", "S", "a\U00010000b" }
+ { "%[abce]", "abcd ef01", "S", "abc" }
+ { "%*[abce]%[de\\ ]", "abcd ef01", "S", "d e" }
+ { "%[a\U00010000]", "a\U00010000\U00010001b", "S", "a\U00010000" }
+ { "%[a-f]", "abccdefg", "S", "abccdef" }
+ { "%[a-c]", "abccdefg", "S", "abcc" }
+ { "%[^e-f]", "abccdefg", "S", "abccd" }
+ { "%3[^e-f]", "abccdefg", "S", "abc" }
+ { "%*3[abc]%[cde]", "abccdefg", "S", "cde" }
+ { "%*3S%S", "a bc efg", "S", "bc" }
+ { "%*3S%S", "abcd efg", "S", "d" }
+ { "%*3s%s", "abcd efg", "s", "d" }
+ { "%*3d%d", "1234", "4", "4" }
+ { "%d", " 1234", "4", "4D2" }
+ { "%e", " 1234", "f", "1234" }
+ { "%f", " 1234", "f", "1234" }
+ { "%d", "+1234", "4", "4D2" }
+ { "%e", "+1234", "f", "1234" }
+ { "%f", "+1234", "f", "1234" }
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/idna_conf.txt b/Build/source/libs/icu/icu-xetex/test/testdata/idna_conf.txt
new file mode 100644
index 00000000000..8f2650dc94d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/idna_conf.txt
@@ -0,0 +1,1267 @@
+=====
+desc: Copyright 2003-2005 http://idnconnect.jdna.jp/testbed.html
+namebase: <00ED>dn
+nameutf8: ídn
+namezone: xn--dn-mja
+failzone1:
+failzone2:
+token: 25029153
+passfail: pass
+type: toascii
+
+=====
+desc: 1-1-1 Has one IDN
+namebase: <00ED>dn
+nameutf8: ídn
+namezone: xn--dn-mja
+failzone1:
+failzone2:
+token: 25029153
+passfail: pass
+type: toascii
+
+=====
+desc: 1-1-2 Has two IDNs
+namebase: <00EB>x.<00ED>dn
+nameutf8: ëx.ídn
+namezone: xn--x-ega.xn--dn-mja
+failzone1:
+failzone2:
+token: 02721141
+passfail: pass
+type: toascii
+
+=====
+desc: 1-2-1 Latin-1
+namebase: <00E5><00FE><00E7>
+nameutf8: åþç
+namezone: xn--5cae2e
+failzone1:
+failzone2:
+token: 41542620
+passfail: pass
+type: toascii
+
+=====
+desc: 1-2-2 Latin Extended A
+namebase: <0103>b<0109>
+nameutf8: ăbĉ
+namezone: xn--b-rhat
+failzone1:
+failzone2:
+token: 72238617
+passfail: pass
+type: toascii
+
+=====
+desc: 1-2-3 Latin Extended B
+namebase: <0227><0180><0188>
+nameutf8: ȧƀƈ
+namezone: xn--lhaq98b
+failzone1:
+failzone2:
+token: 48464361
+passfail: pass
+type: toascii
+
+=====
+desc: 1-2-4 Latin Extended Additional
+namebase: <1E01><1E03><1E09>
+nameutf8: á¸á¸ƒá¸‰
+namezone: xn--2fges
+failzone1:
+failzone2:
+token: 49301230
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-1 Han
+namebase: <4E3F><4EBA><5C38>
+nameutf8: 丿人尸
+namezone: xn--xiqplj17a
+failzone1:
+failzone2:
+token: 58367113
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-2 Hiragana
+namebase: <304B><304C><304D>
+nameutf8: ã‹ãŒã
+namezone: xn--u8jcd
+failzone1:
+failzone2:
+token: 57006197
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-3 Katakana
+namebase: <30AB><30AC><30AD>
+nameutf8: カガキ
+namezone: xn--lckcd
+failzone1:
+failzone2:
+token: 81826992
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-4 Hangul Jamo
+namebase: <1100><1161><11A8>
+nameutf8: 각
+namezone: xn--p39a
+failzone1: xn--ypd8qrh
+failzone2:
+token: 44228346
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-5 Hangul
+namebase: <AC69><B4C6><C03A>
+nameutf8: 걩듆쀺
+namezone: xn--o69aq2nl0j
+failzone1:
+failzone2:
+token: 79235608
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-6 Yi
+namebase: <A00A><A020><A2B8>
+nameutf8: ꀊꀠꊸ
+namezone: xn--6l7arby7j
+failzone1:
+failzone2:
+token: 99549720
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-7 Greek
+namebase: <03B1><03B2><03B3>
+nameutf8: αβγ
+namezone: xn--mxacd
+failzone1:
+failzone2:
+token: 83859912
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-8 Greek Extended
+namebase: <1F02><1F26><1F55>
+nameutf8: ἂἦὕ
+namezone: xn--fng7dpg
+failzone1:
+failzone2:
+token: 22501339
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-9 Cyrillic
+namebase: <0430><0431><0432>
+nameutf8: абв
+namezone: xn--80acd
+failzone1:
+failzone2:
+token: 98871751
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-10 Armeian
+namebase: <0561><0562><0563>
+nameutf8: Õ¡Õ¢Õ£
+namezone: xn--y9acd
+failzone1:
+failzone2:
+token: 23687015
+passfail: pass
+type: toascii
+
+=====
+desc: 1-3-11 Georgian
+namebase: <10D0><10D1><10D2>
+nameutf8: áƒáƒ‘გ
+namezone: xn--lodcd
+failzone1:
+failzone2:
+token: 70499589
+passfail: pass
+type: toascii
+
+=====
+desc: 1-4-1 Symbols
+namebase: <2221><21BA><2282>
+nameutf8: ∡↺⊂
+namezone: xn--b7gxomk
+failzone1:
+failzone2:
+token: 24617638
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-1 Devanagari
+namebase: <0915><0916><0917>
+nameutf8: कखग
+namezone: xn--11bcd
+failzone1:
+failzone2:
+token: 18477223
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-2 Bengali
+namebase: <0995><0996><0997>
+nameutf8: কখগ
+namezone: xn--p5bcd
+failzone1:
+failzone2:
+token: 11477904
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-3 Gurmukhi
+namebase: <0A15><0A16><0A17>
+nameutf8: ਕਖਗ
+namezone: xn--d9bcd
+failzone1:
+failzone2:
+token: 71543506
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-4 Gujarati
+namebase: <0A95><0A96><0A97>
+nameutf8: કખગ
+namezone: xn--0dccd
+failzone1:
+failzone2:
+token: 75268760
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-5 Oriya
+namebase: <0B15><0B16><0B17>
+nameutf8: କଖଗ
+namezone: xn--ohccd
+failzone1:
+failzone2:
+token: 36079747
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-6 Tamil
+namebase: <0B95><0B99><0B9A>
+nameutf8: கஙச
+namezone: xn--clcid
+failzone1:
+failzone2:
+token: 39841446
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-7 Telugu
+namebase: <0C15><0C16><0C17>
+nameutf8: à°•à°–à°—
+namezone: xn--zoccd
+failzone1:
+failzone2:
+token: 34438808
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-8 Kannada
+namebase: <0C95><0C96><0C97>
+nameutf8: ಕಖಗ
+namezone: xn--nsccd
+failzone1:
+failzone2:
+token: 42303465
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-9 Malayalam
+namebase: <0D15><0D16><0D17>
+nameutf8: à´•à´–à´—
+namezone: xn--bwccd
+failzone1:
+failzone2:
+token: 11813559
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-10 Sinhala
+namebase: <0D9A><0D9B><0D9C>
+nameutf8: කඛග
+namezone: xn--3zccd
+failzone1:
+failzone2:
+token: 89823209
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-11 Thai
+namebase: <0E01><0E02><0E03>
+nameutf8: à¸à¸‚ฃ
+namezone: xn--12ccd
+failzone1:
+failzone2:
+token: 94992842
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-12 Lao
+namebase: <0E81><0E82><0E84>
+nameutf8: àºàº‚ຄ
+namezone: xn--p6ccg
+failzone1:
+failzone2:
+token: 42424338
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-13 Tibetan
+namebase: <0F40><0F41><0F42>
+nameutf8: ཀà½à½‚
+namezone: xn--5cdcd
+failzone1:
+failzone2:
+token: 26962778
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-14 Myanmar
+namebase: <1000><1001><1002>
+nameutf8: ကá€á€‚
+namezone: xn--nidcd
+failzone1:
+failzone2:
+token: 09824611
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-15 Khmer
+namebase: <1780><1781><1782>
+nameutf8: កážáž‚
+namezone: xn--i2ecd
+failzone1:
+failzone2:
+token: 48071156
+passfail: pass
+type: toascii
+
+=====
+desc: 1-5-16 Mongolian
+namebase: <1820><1821><1822>
+nameutf8: á  á ¡á ¢
+namezone: xn--26ecd
+failzone1:
+failzone2:
+token: 40131572
+passfail: pass
+type: toascii
+
+=====
+desc: 1-6-1 Arabic
+namebase: <0627><0628><0629>
+nameutf8: ابة
+namezone: xn--mgbcd
+failzone1:
+failzone2:
+token: 06414817
+passfail: pass
+type: toascii
+
+=====
+desc: 1-6-2 Hebrew
+namebase: <05D0><05D1><05D2>
+nameutf8: ×בג
+namezone: xn--4dbcd
+failzone1:
+failzone2:
+token: 41996705
+passfail: pass
+type: toascii
+
+=====
+desc: 1-6-3 Syriac
+namebase: <0710><0711><0712>
+nameutf8: ÜÜ‘Ü’
+namezone: xn--9mbcd
+failzone1:
+failzone2:
+token: 77925080
+passfail: pass
+type: toascii
+
+=====
+desc: 1-7-1 ASCII and non-Latin
+namebase: abc<30AB><30AC><30AD>
+nameutf8: abcカガキ
+namezone: xn--abc-mj4bfg
+failzone1:
+failzone2:
+token: 14333380
+passfail: pass
+type: toascii
+
+=====
+desc: 1-7-2 Latin (non-ASCII) and non-Latin
+namebase: <00E5><00FE><00E7><30AB><30AC><30AD>
+nameutf8: åþçカガキ
+namezone: xn--5cae2e328wfag
+failzone1:
+failzone2:
+token: 00848299
+passfail: pass
+type: toascii
+
+=====
+desc: 2-3-1-1 If UseSTD3ASCIIRules: Includes ! before Nameprep
+namebase: <00ED><0021>dn
+nameutf8: í!dn
+namezone:
+failzone1: xn--!dn-qma
+failzone2:
+token: 89571181
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-1-2 If UseSTD3ASCIIRules: Includes $ before Nameprep
+namebase: <00ED><0024>dn
+nameutf8: í$dn
+namezone:
+failzone1: xn--$dn-qma
+failzone2:
+token: 06965937
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-1-3 If UseSTD3ASCIIRules: Includes + before Nameprep
+namebase: <00ED><002B>dn
+nameutf8: í+dn
+namezone:
+failzone1: xn--+dn-qma
+failzone2:
+token: 98967951
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-2-1 If UseSTD3ASCIIRules: Leading hyphen before Nameprep
+namebase: <002D><00ED>1dn
+nameutf8: -í1dn
+namezone:
+failzone1: xn---1dn-vpa
+failzone2:
+token: 65457100
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-2-2 If UseSTD3ASCIIRules: Trailing hyphen before Nameprep
+namebase: <00ED>1dn<002D>
+nameutf8: í1dn-
+namezone:
+failzone1: xn--1dn--upa
+failzone2:
+token: 85629714
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-3-1 If UseSTD3ASCIIRules: Gets a + after Nameprep
+namebase: <00ED><FF0B>dn
+nameutf8: í+dn
+namezone:
+failzone1: xn--dn-mja0331x
+failzone2:
+token: 95236620
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-3-2 If UseSTD3ASCIIRules: Gets a = after Nameprep
+namebase: <00ED><207C>dn
+nameutf8: íâ¼dn
+namezone:
+failzone1: xn--dn-mja0343a
+failzone2:
+token: 04960664
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-4-1 If UseSTD3ASCIIRules: Leading hyphen after Nameprep
+namebase: <FE63><00ED>2dn
+nameutf8: ﹣í2dn
+namezone:
+failzone1: xn--2dn-qma32863a
+failzone2: xn---2dn-vpa
+token: 53512069
+passfail: fail
+type: toascii
+
+=====
+desc: 2-3-4-2 If UseSTD3ASCIIRules: Trailing hyphen after Nameprep
+namebase: <00ED>2dn<FF0D>
+nameutf8: í2dnï¼
+namezone:
+failzone1: xn--2dn-qma79363a
+failzone2: xn--2dn--upa
+token: 39938653
+passfail: fail
+type: toascii
+
+=====
+desc: 2-4-1 All-ASCII check, Latin
+namebase: <00B9>1
+nameutf8: ¹1
+namezone: 11
+failzone1:
+failzone2:
+token: 43611374
+passfail: pass
+type: toascii
+
+=====
+desc: 2-4-2 All-ASCII check, symbol
+namebase: <2165>vi
+nameutf8: â…¥vi
+namezone: vivi
+failzone1:
+failzone2:
+token: 79939993
+passfail: pass
+type: toascii
+
+=====
+desc: 2-4-3 All-ASCII check, sharp S
+namebase: <00DF>ss
+nameutf8: ßss
+namezone: ssss
+failzone1:
+failzone2:
+token: 71292530
+passfail: pass
+type: toascii
+
+=====
+desc: 2-5-1 ACE prefix exists before Nameprep
+namebase: xn--<00EF>dn
+nameutf8: xn--ïdn
+namezone:
+failzone1: xn--xn--dn-sja
+failzone2: xn--dn-sja
+token: 32841515
+passfail: fail
+type: toascii
+
+=====
+desc: 2-5-2 ACE prefix appears after Nameprep
+namebase: <2179>n--<00E4>dn
+nameutf8: ⅹn--ädn
+namezone:
+failzone1: xn--xn--dn-uia
+failzone2: xn--dn-uia
+token: 52994631
+passfail: fail
+type: toascii
+
+=====
+desc: 2-8-1 Zero-length label after Nameprep
+namebase: <00AD>
+nameutf8:
+namezone:
+failzone1: xn--kba
+failzone2: xn--
+token: 18420037
+passfail: fail
+type: toascii
+
+=====
+desc: 2-9-1 U+3002 acts as a label separator
+namebase: 3002-test<3002><00ED>dn
+nameutf8: 3002-test。ídn
+namezone: 3002-test.xn--dn-mja
+failzone1: xn--3002-testdn-wcb2087m
+failzone2:
+token: 14217422
+passfail: pass
+type: toascii
+
+=====
+desc: 2-9-2 U+FF0E acts as a label separator
+namebase: ff0e-test<FF0E><00ED>dn
+nameutf8: ff0e-test.ídn
+namezone: ff0e-test.xn--dn-mja
+failzone1: xn--ff0e-testdn-wcb45865f
+failzone2:
+token: 94579179
+passfail: pass
+type: toascii
+
+=====
+desc: 2-9-3 U+FF61 acts as a label separator
+namebase: ff61-test<FF61><00ED>dn
+nameutf8: ff61-test。ídn
+namezone: ff61-test.xn--dn-mja
+failzone1: xn--ff61-testdn-wcb33975f
+failzone2:
+token: 27084042
+passfail: pass
+type: toascii
+
+=====
+desc: 3-2-1 Sharp S conversion; should display as m<00EB>ss
+namebase: xn--m<00DF>-jma
+nameutf8: xn--mß-jma
+namezone: m<00EB>ss
+failzone1:
+failzone2:
+token: 85142449
+passfail: pass
+type: tounicode
+
+=====
+desc: 3-3-1 Old prefix; should not display as Unicode;<icu> ICU will treat this as ASCII. This sequence is not explicitly prohibited by the RFC.</icu>
+namebase: iesg--dn-mja
+nameutf8: iesg--dn-mja
+namezone:
+failzone1:
+failzone2:
+token: 35996358
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-3-2 Old prefix; should not display as Unicode;<icu> ICU will treat this as ASCII. This sequence is not explicitly prohibited by the RFC.</icu>
+namebase: iesgdn-mja
+nameutf8: iesgdn-mja
+namezone:
+failzone1:
+failzone2:
+token: 13693467
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-3-3 Old prefix; should not display as Unicode;<icu> ICU will treat this as ASCII. This sequence is not explicitly prohibited by the RFC.</icu>
+namebase: bq--dn-mja
+nameutf8: bq--dn-mja
+namezone:
+failzone1:
+failzone2:
+token: 77049719
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-5-1 Non-ASCII code point before the last hyphen;\
+ should not display as Unicode
+namebase: xn--d<00F1>-mja
+nameutf8: xn--dñ-mja
+namezone:
+failzone1:
+failzone2:
+token: 53043171
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-5-2 Non-alphanumeric code point after the last hyphen;\
+ should not display as Unicode
+namebase: xn--dn-mj+
+nameutf8: xn--dn-mj+
+namezone:
+failzone1:
+failzone2:
+token: 24626494
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-5-3 Ends in the middle of an encoded delta value;\
+ should not display as Unicode
+namebase: xn--dn-mj
+nameutf8: xn--dn-mj
+namezone:
+failzone1:
+failzone2:
+token: 30921132
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-6-1 Nameprep -- prohibited character U+E000;\
+ should not display as Unicode
+namebase: xn--e000dn-l704a
+nameutf8: xn--e000dn-l704a
+namezone:
+failzone1:
+failzone2:
+token: 02359753
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-6-2 If using UseSTD3ASCIIRules, Step 3a -- leading hyphen; should not display as Unicode
+namebase: xn---3dn-vpa
+nameutf8: xn---3dn-vpa
+namezone:
+failzone1:
+failzone2:
+token: 99795165
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-6-3 If using UseSTD3ASCIIRules, Step 3b -- trailing hyphen; should not display as Unicode
+namebase: xn--3dn--upa
+nameutf8: xn--3dn--upa
+namezone:
+failzone1:
+failzone2:
+token: 86051717
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-6-4 Step 5 -- prefix exists; should not display as Unicode
+namebase: xn--xn--dn-6va
+nameutf8: xn--xn--dn-6va
+namezone:
+failzone1:
+failzone2:
+token: 02506789
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-7-1 Punycode was not necessary; should not display as Unicode
+namebase: xn--idn-
+nameutf8: xn--idn-
+namezone:
+failzone1:
+failzone2:
+token: 21675918
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-7-2 String did not go through Nameprep;\
+ should not display as Unicode
+namebase: xn--dn-vga
+nameutf8: xn--dn-vga
+namezone:
+failzone1:
+failzone2:
+token: 18832454
+passfail: fail
+type: tounicode
+
+=====
+desc: 3-8-1 Should show the Unicode <00E3>4dn
+namebase: xn--4dn-lla
+nameutf8: xn--4dn-lla
+namezone: <00E3>4dn
+failzone1:
+failzone2:
+token: 23377435
+passfail: pass
+type: tounicode
+
+=====
+desc: 4-1-1-1 00adout<00AD><00ED>dn ->\
+ 00adout<00ED>dn
+namebase: 00adout<00AD><00ED>dn
+nameutf8: 00adout­ídn
+namezone: xn--00adoutdn-m5a
+failzone1: xn--00adoutdn-cna81e
+failzone2:
+token: 04299950
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-1-2 200dout<200D><00ED>dn ->\
+ 200dout<00ED>dn
+namebase: 200dout<200D><00ED>dn
+nameutf8: 200doutâ€Ã­dn
+namezone: xn--200doutdn-m5a
+failzone1: xn--200doutdn-m5a1678f
+failzone2:
+token: 00643243
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-1 simplecap<0044><00ED>dn ->\
+ simplecap<0064><00ED>dn
+namebase: simplecap<0044><00ED>dn
+nameutf8: simplecapDídn
+namezone: xn--simplecapddn-1fb
+failzone1:
+failzone2:
+token: 36249795
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-2 latintogreek<00B5><00ED>dn ->\
+ latintogreek<03BC><00ED>dn
+namebase: latintogreek<00B5><00ED>dn
+nameutf8: latintogreekµídn
+namezone: xn--latintogreekdn-cmb716i
+failzone1: xn--latintogreekdn-cxa01g
+failzone2:
+token: 03117407
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-3 latinext<00C7><00ED>dn ->\
+ latinext<00E7><00ED>dn
+namebase: latinext<00C7><00ED>dn
+nameutf8: latinextÇídn
+namezone: xn--latinextdn-v6a6e
+failzone1: xn--latinextdn-twa07b
+failzone2:
+token: 10243505
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-4 sharps<00DF><00ED>dn ->\
+ sharpsss<00ED>dn
+namebase: sharps<00DF><00ED>dn
+nameutf8: sharpsßídn
+namezone: xn--sharpsssdn-r8a
+failzone1: xn--sharpsdn-vya4l
+failzone2:
+token: 84921656
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-5 turkishi<0130><00ED>dn ->\
+ turkishi<0069><0307><00ED>dn
+namebase: turkishi<0130><00ED>dn
+nameutf8: turkishiİídn
+namezone: xn--turkishiidn-wcb701e
+failzone1: xn--turkishidn-r8a71f
+failzone2:
+token: 02381730
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-6 exptwo<0149><00ED>dn ->\
+ exptwo<02BC><006E><00ED>dn
+namebase: exptwo<0149><00ED>dn
+nameutf8: exptwoʼnídn
+namezone: xn--exptwondn-m5a502c
+failzone1: xn--exptwodn-h2a33g
+failzone2:
+token: 10575203
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-7 addfold<03D2><00ED>dn ->\
+ addfold<03C5><00ED>dn
+namebase: addfold<03D2><00ED>dn
+nameutf8: addfoldϒídn
+namezone: xn--addfolddn-m5a121f
+failzone1: xn--addfolddn-m5a462f
+failzone2:
+token: 31493044
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-8 expthree<1F52><00ED>dn ->\
+ expthree<03C5><0313><0300><00ED>dn
+namebase: expthree<1F52><00ED>dn
+nameutf8: expthreeὒídn
+namezone: xn--expthreedn-r8a5844g
+failzone1:
+failzone2:
+token: 68144622
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-9 nonbmp<10400><00ED>dn ->\
+ nonbmp<10428><00ED>dn
+namebase: nonbmp<10400><00ED>dn
+nameutf8: nonbmpí í°€Ã­dn
+namezone: xn--nonbmpdn-h2a34747d
+failzone1: xn--nonbmpdn-h2a37046d
+failzone2:
+token: 35393212
+passfail: pass
+type: toascii
+
+=====
+desc: 4-1-2-10 nonbmptoascii<1D400><00ED>dn ->\
+ nonbmptoasciia<00ED>dn
+namebase: nonbmptoascii<1D400><00ED>dn
+nameutf8: nonbmptoascii𝐀ídn
+namezone: xn--nonbmptoasciiadn-msb
+failzone1: xn--nonbmptoasciidn-hpb54112i
+failzone2:
+token: 78182502
+passfail: pass
+type: toascii
+
+=====
+desc: 4-2-1-1 regcomb<0065><0301><00ED>dn ->\
+ regcomb<00E9><00ED>dn
+namebase: regcomb<0065><0301><00ED>dn
+nameutf8: regcombeÌídn
+namezone: xn--regcombdn-h4a8b
+failzone1: xn--regcombedn-r8a794d
+failzone2:
+token: 87647045
+passfail: pass
+type: toascii
+
+=====
+desc: 4-2-1-2 combandcase<0045><0301><00ED>dn ->\
+ combandcase<00E9><00ED>dn
+namebase: combandcase<0045><0301><00ED>dn
+nameutf8: combandcaseEÌídn
+namezone: xn--combandcasedn-lhb4d
+failzone1: xn--combandcaseedn-cmb526f
+failzone2:
+token: 61741185
+passfail: pass
+type: toascii
+
+=====
+desc: 4-2-1-3 adjcomb<00BA><0301><00ED>dn ->\
+ adjcomb<00F3><00ED>dn
+namebase: adjcomb<00BA><0301><00ED>dn
+nameutf8: adjcombºÌídn
+namezone: xn--adjcombdn-m5a9d
+failzone1: xn--adjcombdn-1qa57cp3r
+failzone2:
+token: 14828402
+passfail: pass
+type: toascii
+
+=====
+desc: 4-2-1-4 extcombo<0063><0301><00ED>dn ->\
+ extcombo<0107><00ED>dn
+namebase: extcombo<0063><0301><00ED>dn
+nameutf8: extcombocÌídn
+namezone: xn--extcombodn-r8a52a
+failzone1: xn--extcombocdn-wcb920e
+failzone2:
+token: 26651277
+passfail: pass
+type: toascii
+
+=====
+desc: 4-2-1-5 doublediac1<0075><0308><0301><00ED>dn ->\
+ doublediac2<01D8><00ED>dn
+namebase: doublediac1<0075><0308><0301><00ED>dn
+nameutf8: doublediac1üÌídn
+namezone: xn--doublediac1dn-6ib836a
+failzone1: xn--doublediac1udn-cmb526fnd
+failzone2:
+token: 30175595
+passfail: pass
+type: toascii
+
+=====
+desc: 4-2-1-6 doublediac2<0075><0301><0308><00ED>dn ->\
+ doublediac2<01D8><00ED>dn
+namebase: doublediac2<0075><0301><0308><00ED>dn
+nameutf8: doublediac2uÌ̈ídn
+namezone: xn--doublediac2dn-6ib8qs73a
+failzone1: xn--doublediac2udn-cmb526fod
+failzone2:
+token: 35606109
+passfail: pass
+type: toascii
+
+=====
+desc: 4-2-2-1 newnorm<2F874><00ED>dn ->\
+ newnorm<5F33><00ED>dn should not become <5F53>
+namebase: newnorm<2F874><00ED>dn
+nameutf8: newnorm当ídn
+namezone: xn--newnormdn-m5a7856x
+failzone1: xn--newnormdn-m5a9396x
+failzone2: xn--newnormdn-m5a9968x
+token: 61901810
+passfail: pass
+type: toascii
+
+=====
+desc: 4-3-1 If UseSTD3ASCIIRules: Spacing; <icu> \u0020 is prohibited from the output only when UseSTD3ASCIIRules is set </icu>
+namebase: <2000><00ED>dn
+nameutf8:  ídn
+namezone:
+failzone1: xn--dn-mja3392a
+failzone2:
+token: 13226878
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-2 Control
+namebase: <06DD><00ED>dn-2
+nameutf8: Ûídn-2
+namezone:
+failzone1: xn--dn-2-upa332g
+failzone2:
+token: 09873312
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-3 Private use
+namebase: <E005><00ED>dn
+nameutf8: ídn
+namezone:
+failzone1: xn--dn-mja1659t
+failzone2:
+token: 03937183
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-4 Private use, non-BMP
+namebase: <F0005><00ED>dn
+nameutf8: 󰀅ídn
+namezone:
+failzone1: xn--dn-mja7922x
+failzone2:
+token: 78707823
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-5 Non-character
+namebase: <FDDD><00ED>dn
+nameutf8: ï·Ã­dn
+namezone:
+failzone1: xn--dn-mja1210x
+failzone2:
+token: 44432178
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-6 Non-character, non-BMP
+namebase: <1FFFE><00ED>dn
+nameutf8: 🿾ídn
+namezone:
+failzone1: xn--dn-mja7922x
+failzone2:
+token: 69142686
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-7 Surrogate points
+namebase: <D805><00ED>dn
+nameutf8: �ídn
+namezone:
+failzone1: xn--dn-mja7922x
+failzone2:
+token: 05424571
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-8 Inappropriate for plain
+namebase: <FFFA><00ED>dn
+nameutf8: ídn
+namezone:
+failzone1: xn--dn-mja5822x
+failzone2:
+token: 44825824
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-9 Inappropriate for canonical
+namebase: <2FF5><00ED>dn
+nameutf8: ⿵ídn
+namezone:
+failzone1: xn--dn-mja3729b
+failzone2:
+token: 50926136
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-10 Change display simple
+namebase: <206A><00ED>dn
+nameutf8: âªÃ­dn
+namezone:
+failzone1: xn--dn-mja7533a
+failzone2:
+token: 57953313
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-11 Change display RTL
+namebase: <200F><00ED>dn
+nameutf8: â€Ã­dn
+namezone:
+failzone1: xn--dn-mja3992a
+failzone2:
+token: 30705279
+passfail: fail
+type: toascii
+
+=====
+desc: 4-3-12 Language tags
+namebase: <E0001><E0045><E004E><0068><0069>idn
+nameutf8: í­€í°í­€í±…󠁎hiidn
+namezone:
+failzone1: xn--hiidn-km43aaa
+failzone2:
+token: 44598039
+passfail: fail
+type: toascii
+
+=====
+desc: 4-4-1 Arabic RandALCat-LCat-RandALCat
+namebase: <0628><006F><0638>
+nameutf8: بoظ
+namezone:
+failzone1: xn--o-0mc3c
+failzone2:
+token: 78233053
+passfail: fail
+type: toascii
+
+=====
+desc: 4-4-2 Arabic RandALCat-RandALCat-other
+namebase: <0628><0638><006F>
+nameutf8: بظo
+namezone:
+failzone1: xn--o-0mc2c
+failzone2:
+token: 95299621
+passfail: fail
+type: toascii
+
+=====
+desc: 4-4-3 Arabic other-RandALCat-RandALCat
+namebase: <006F><0628><0638>
+nameutf8: oبظ
+namezone:
+failzone1: xn--o-1mc2c
+failzone2:
+token: 79807176
+passfail: fail
+type: toascii
+
+=====
+desc: 4-4-4 Hebrew RandALCat-LCat-RandALCat
+namebase: <05D1><006F><05E1>
+nameutf8: בoס
+namezone:
+failzone1: xn--o-1hc3c
+failzone2:
+token: 32229450
+passfail: fail
+type: toascii
+
+=====
+desc: 4-4-5 Hebrew RandALCat-RandALCat-other
+namebase: <05D1><05E1><006F>
+nameutf8: בסo
+namezone:
+failzone1: xn--o-1hc2c
+failzone2:
+token: 53213348
+passfail: fail
+type: toascii
+
+=====
+desc: 4-4-6 Hebrew other-RandALCat-RandALCat
+namebase: <006F><05D1><05E1>
+nameutf8: oבס
+namezone:
+failzone1: xn--o-2hc2c
+failzone2:
+token: 90835860
+passfail: fail
+type: toascii
+
+=====
+desc: 5-1-1 Unassigned in BMP; zone editors should reject
+namebase: <0237><00ED>dn
+nameutf8: ȷídn
+namezone: xn--dn-mja33k
+failzone1:
+failzone2:
+token: 83079602
+passfail: pass
+type: toascii
+
+=====
+desc: 5-1-2 Unassinged outside BMP; zone editors should reject
+namebase: <10205><00ED>dn
+nameutf8: 𐈅ídn
+namezone: xn--dn-mja7734x
+failzone1: xn--dn-mja7922x
+failzone2:
+token: 03682900
+passfail: pass
+type: toascii
+
+=====
+desc: 5-2-1 Newly assigned in BMP; zone editors should reject
+namebase: <0234><00ED>dn
+nameutf8: ȴídn
+namezone: xn--dn-mja12k
+failzone1:
+failzone2:
+token: 96637501
+passfail: pass
+type: toascii
+
+=====
+desc: 5-2-2 Newly assigned outside of BMP; zone editors should reject
+namebase: <10005><00ED>dn
+nameutf8: 𐀅ídn
+namezone: xn--dn-mja9232x
+failzone1: xn--dn-mja7922x
+failzone2:
+token: 95537699
+passfail: pass
+type: toascii
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/idna_rules.txt b/Build/source/libs/icu/icu-xetex/test/testdata/idna_rules.txt
new file mode 100644
index 00000000000..7ef6404e951
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/idna_rules.txt
@@ -0,0 +1,1500 @@
+// Copyright (C) 2003-2005, International Business Machines
+
+// WARNING: This file is machine generated by debug\genidn tool. Please DO NOT edit.
+
+idna_rules:table(nofallback){
+
+ UnassignedSet{"[ \\u0221 \\u0234-\\u024F \\u02AE-\\u02AF \\u02EF-\\u02FF \\u0350-\\u035F \\u0370-\\u0373 "
+ "\\u0376-\\u0379 \\u037B-\\u037D \\u037F-\\u0383 \\u038B \\u038D \\u03A2 \\u03CF "
+ "\\u03F7-\\u03FF \\u0487 \\u04CF \\u04F6-\\u04F7 \\u04FA-\\u04FF \\u0510-\\u0530 "
+ "\\u0557-\\u0558 \\u0560 \\u0588 \\u058B-\\u0590 \\u05A2 \\u05BA \\u05C5-\\u05CF "
+ "\\u05EB-\\u05EF \\u05F5-\\u060B \\u060D-\\u061A \\u061C-\\u061E \\u0620 \\u063B-\\u063F "
+ "\\u0656-\\u065F \\u06EE-\\u06EF \\u06FF \\u070E \\u072D-\\u072F \\u074B-\\u077F "
+ "\\u07B2-\\u0900 \\u0904 \\u093A-\\u093B \\u094E-\\u094F \\u0955-\\u0957 \\u0971-\\u0980 "
+ "\\u0984 \\u098D-\\u098E \\u0991-\\u0992 \\u09A9 \\u09B1 \\u09B3-\\u09B5 \\u09BA-\\u09BB "
+ "\\u09BD \\u09C5-\\u09C6 \\u09C9-\\u09CA \\u09CE-\\u09D6 \\u09D8-\\u09DB \\u09DE "
+ "\\u09E4-\\u09E5 \\u09FB-\\u0A01 \\u0A03-\\u0A04 \\u0A0B-\\u0A0E \\u0A11-\\u0A12 "
+ "\\u0A29 \\u0A31 \\u0A34 \\u0A37 \\u0A3A-\\u0A3B \\u0A3D \\u0A43-\\u0A46 \\u0A49-\\u0A4A "
+ "\\u0A4E-\\u0A58 \\u0A5D \\u0A5F-\\u0A65 \\u0A75-\\u0A80 \\u0A84 \\u0A8C \\u0A8E "
+ "\\u0A92 \\u0AA9 \\u0AB1 \\u0AB4 \\u0ABA-\\u0ABB \\u0AC6 \\u0ACA \\u0ACE-\\u0ACF "
+ "\\u0AD1-\\u0ADF \\u0AE1-\\u0AE5 \\u0AF0-\\u0B00 \\u0B04 \\u0B0D-\\u0B0E \\u0B11-\\u0B12 "
+ "\\u0B29 \\u0B31 \\u0B34-\\u0B35 \\u0B3A-\\u0B3B \\u0B44-\\u0B46 \\u0B49-\\u0B4A "
+ "\\u0B4E-\\u0B55 \\u0B58-\\u0B5B \\u0B5E \\u0B62-\\u0B65 \\u0B71-\\u0B81 \\u0B84 "
+ "\\u0B8B-\\u0B8D \\u0B91 \\u0B96-\\u0B98 \\u0B9B \\u0B9D \\u0BA0-\\u0BA2 \\u0BA5-\\u0BA7 "
+ "\\u0BAB-\\u0BAD \\u0BB6 \\u0BBA-\\u0BBD \\u0BC3-\\u0BC5 \\u0BC9 \\u0BCE-\\u0BD6 "
+ "\\u0BD8-\\u0BE6 \\u0BF3-\\u0C00 \\u0C04 \\u0C0D \\u0C11 \\u0C29 \\u0C34 \\u0C3A-\\u0C3D "
+ "\\u0C45 \\u0C49 \\u0C4E-\\u0C54 \\u0C57-\\u0C5F \\u0C62-\\u0C65 \\u0C70-\\u0C81 "
+ "\\u0C84 \\u0C8D \\u0C91 \\u0CA9 \\u0CB4 \\u0CBA-\\u0CBD \\u0CC5 \\u0CC9 \\u0CCE-\\u0CD4 "
+ "\\u0CD7-\\u0CDD \\u0CDF \\u0CE2-\\u0CE5 \\u0CF0-\\u0D01 \\u0D04 \\u0D0D \\u0D11 "
+ "\\u0D29 \\u0D3A-\\u0D3D \\u0D44-\\u0D45 \\u0D49 \\u0D4E-\\u0D56 \\u0D58-\\u0D5F "
+ "\\u0D62-\\u0D65 \\u0D70-\\u0D81 \\u0D84 \\u0D97-\\u0D99 \\u0DB2 \\u0DBC \\u0DBE-\\u0DBF "
+ "\\u0DC7-\\u0DC9 \\u0DCB-\\u0DCE \\u0DD5 \\u0DD7 \\u0DE0-\\u0DF1 \\u0DF5-\\u0E00 "
+ "\\u0E3B-\\u0E3E \\u0E5C-\\u0E80 \\u0E83 \\u0E85-\\u0E86 \\u0E89 \\u0E8B-\\u0E8C "
+ "\\u0E8E-\\u0E93 \\u0E98 \\u0EA0 \\u0EA4 \\u0EA6 \\u0EA8-\\u0EA9 \\u0EAC \\u0EBA "
+ "\\u0EBE-\\u0EBF \\u0EC5 \\u0EC7 \\u0ECE-\\u0ECF \\u0EDA-\\u0EDB \\u0EDE-\\u0EFF "
+ "\\u0F48 \\u0F6B-\\u0F70 \\u0F8C-\\u0F8F \\u0F98 \\u0FBD \\u0FCD-\\u0FCE \\u0FD0-\\u0FFF "
+ "\\u1022 \\u1028 \\u102B \\u1033-\\u1035 \\u103A-\\u103F \\u105A-\\u109F \\u10C6-\\u10CF "
+ "\\u10F9-\\u10FA \\u10FC-\\u10FF \\u115A-\\u115E \\u11A3-\\u11A7 \\u11FA-\\u11FF "
+ "\\u1207 \\u1247 \\u1249 \\u124E-\\u124F \\u1257 \\u1259 \\u125E-\\u125F \\u1287 "
+ "\\u1289 \\u128E-\\u128F \\u12AF \\u12B1 \\u12B6-\\u12B7 \\u12BF \\u12C1 \\u12C6-\\u12C7 "
+ "\\u12CF \\u12D7 \\u12EF \\u130F \\u1311 \\u1316-\\u1317 \\u131F \\u1347 \\u135B-\\u1360 "
+ "\\u137D-\\u139F \\u13F5-\\u1400 \\u1677-\\u167F \\u169D-\\u169F \\u16F1-\\u16FF "
+ "\\u170D \\u1715-\\u171F \\u1737-\\u173F \\u1754-\\u175F \\u176D \\u1771 \\u1774-\\u177F "
+ "\\u17DD-\\u17DF \\u17EA-\\u17FF \\u180F \\u181A-\\u181F \\u1878-\\u187F \\u18AA-\\u1DFF "
+ "\\u1E9C-\\u1E9F \\u1EFA-\\u1EFF \\u1F16-\\u1F17 \\u1F1E-\\u1F1F \\u1F46-\\u1F47 "
+ "\\u1F4E-\\u1F4F \\u1F58 \\u1F5A \\u1F5C \\u1F5E \\u1F7E-\\u1F7F \\u1FB5 \\u1FC5 "
+ "\\u1FD4-\\u1FD5 \\u1FDC \\u1FF0-\\u1FF1 \\u1FF5 \\u1FFF \\u2053-\\u2056 \\u2058-\\u205E "
+ "\\u2064-\\u2069 \\u2072-\\u2073 \\u208F-\\u209F \\u20B2-\\u20CF \\u20EB-\\u20FF "
+ "\\u213B-\\u213C \\u214C-\\u2152 \\u2184-\\u218F \\u23CF-\\u23FF \\u2427-\\u243F "
+ "\\u244B-\\u245F \\u24FF \\u2614-\\u2615 \\u2618 \\u267E-\\u267F \\u268A-\\u2700 "
+ "\\u2705 \\u270A-\\u270B \\u2728 \\u274C \\u274E \\u2753-\\u2755 \\u2757 \\u275F-\\u2760 "
+ "\\u2795-\\u2797 \\u27B0 \\u27BF-\\u27CF \\u27EC-\\u27EF \\u2B00-\\u2E7F \\u2E9A "
+ "\\u2EF4-\\u2EFF \\u2FD6-\\u2FEF \\u2FFC-\\u2FFF \\u3040 \\u3097-\\u3098 \\u3100-\\u3104 "
+ "\\u312D-\\u3130 \\u318F \\u31B8-\\u31EF \\u321D-\\u321F \\u3244-\\u3250 \\u327C-\\u327E "
+ "\\u32CC-\\u32CF \\u32FF \\u3377-\\u337A \\u33DE-\\u33DF \\u33FF \\u4DB6-\\u4DFF "
+ "\\u9FA6-\\u9FFF \\uA48D-\\uA48F \\uA4C7-\\uABFF \\uD7A4-\\uD7FF \\uFA2E-\\uFA2F "
+ "\\uFA6B-\\uFAFF \\uFB07-\\uFB12 \\uFB18-\\uFB1C \\uFB37 \\uFB3D \\uFB3F \\uFB42 "
+ "\\uFB45 \\uFBB2-\\uFBD2 \\uFD40-\\uFD4F \\uFD90-\\uFD91 \\uFDC8-\\uFDCF \\uFDFD-\\uFDFF "
+ "\\uFE10-\\uFE1F \\uFE24-\\uFE2F \\uFE47-\\uFE48 \\uFE53 \\uFE67 \\uFE6C-\\uFE6F "
+ "\\uFE75 \\uFEFD-\\uFEFE \\uFF00 \\uFFBF-\\uFFC1 \\uFFC8-\\uFFC9 \\uFFD0-\\uFFD1 "
+ "\\uFFD8-\\uFFD9 \\uFFDD-\\uFFDF \\uFFE7 \\uFFEF-\\uFFF8 \\U00010000-\\U000102FF "
+ "\\U0001031F \\U00010324-\\U0001032F \\U0001034B-\\U000103FF \\U00010426-\\U00010427 "
+ "\\U0001044E-\\U0001CFFF \\U0001D0F6-\\U0001D0FF \\U0001D127-\\U0001D129 \\U0001D1DE-\\U0001D3FF "
+ "\\U0001D455 \\U0001D49D \\U0001D4A0-\\U0001D4A1 \\U0001D4A3-\\U0001D4A4 \\U0001D4A7-\\U0001D4A8 "
+ "\\U0001D4AD \\U0001D4BA \\U0001D4BC \\U0001D4C1 \\U0001D4C4 \\U0001D506 \\U0001D50B-\\U0001D50C "
+ "\\U0001D515 \\U0001D51D \\U0001D53A \\U0001D53F \\U0001D545 \\U0001D547-\\U0001D549 "
+ "\\U0001D551 \\U0001D6A4-\\U0001D6A7 \\U0001D7CA-\\U0001D7CD \\U0001D800-\\U0001FFFD "
+ "\\U0002A6D7-\\U0002F7FF \\U0002FA1E-\\U0002FFFD \\U00030000-\\U0003FFFD \\U00040000-\\U0004FFFD "
+ "\\U00050000-\\U0005FFFD \\U00060000-\\U0006FFFD \\U00070000-\\U0007FFFD \\U00080000-\\U0008FFFD "
+ "\\U00090000-\\U0009FFFD \\U000A0000-\\U000AFFFD \\U000B0000-\\U000BFFFD \\U000C0000-\\U000CFFFD "
+ "\\U000D0000-\\U000DFFFD \\U000E0000 \\U000E0002-\\U000E001F \\U000E0080-\\U000EFFFD "
+ "]"}
+
+ ProhibitedSet{"[ \\u0020 \\u00A0 \\u1680 \\u2000 \\u2001 \\u2002 \\u2003 \\u2004 \\u2005 \\u2006 \\u2007 "
+ "\\u2008 \\u2009 \\u200A \\u200B \\u202F \\u205F \\u3000 "
+ "\\u0080-\\u009F \\u06DD \\u070F \\u180E \\u200C \\u200D \\u2028 \\u2029 \\u2060 "
+ "\\u2061 \\u2062 \\u2063 \\u206A-\\u206F \\uFEFF \\uFFF9-\\uFFFC \\U0001D173-\\U0001D17A "
+ "\\uE000-\\uF8FF \\U000F0000-\\U000FFFFD \\U00100000-\\U0010FFFD \\uFDD0-\\uFDEF "
+ "\\uFFFE-\\uFFFF \\U0001FFFE-\\U0001FFFF \\U0002FFFE-\\U0002FFFF \\U0003FFFE-\\U0003FFFF "
+ "\\U0004FFFE-\\U0004FFFF \\U0005FFFE-\\U0005FFFF \\U0006FFFE-\\U0006FFFF \\U0007FFFE-\\U0007FFFF "
+ "\\U0008FFFE-\\U0008FFFF \\U0009FFFE-\\U0009FFFF \\U000AFFFE-\\U000AFFFF \\U000BFFFE-\\U000BFFFF "
+ "\\U000CFFFE-\\U000CFFFF \\U000DFFFE-\\U000DFFFF \\U000EFFFE-\\U000EFFFF \\U000FFFFE-\\U000FFFFF "
+ "\\U0010FFFE-\\U0010FFFF \\uD800-\\uDFFF \\uFFF9 \\uFFFA \\uFFFB \\uFFFC \\uFFFD "
+ "\\u2FF0-\\u2FFB \\u0340 \\u0341 \\u200E \\u200F \\u202A \\u202B \\u202C \\u202D "
+ "\\u202E \\u206A \\u206B \\u206C \\u206D \\u206E \\u206F \\U000E0001 \\U000E0020-\\U000E007F "
+ "]"}
+ LabelSeparatorSet{"[ \\.\\u3002\\uFF0E\\uFF61 ]"}
+
+
+ MapNoNormalization{
+ "\\u00AD > ;"
+ "\\u034F > ;"
+ "\\u1806 > ;"
+ "\\u180B > ;"
+ "\\u180C > ;"
+ "\\u180D > ;"
+ "\\u200B > ;"
+ "\\u200C > ;"
+ "\\u200D > ;"
+ "\\u2060 > ;"
+ "\\uFE00 > ;"
+ "\\uFE01 > ;"
+ "\\uFE02 > ;"
+ "\\uFE03 > ;"
+ "\\uFE04 > ;"
+ "\\uFE05 > ;"
+ "\\uFE06 > ;"
+ "\\uFE07 > ;"
+ "\\uFE08 > ;"
+ "\\uFE09 > ;"
+ "\\uFE0A > ;"
+ "\\uFE0B > ;"
+ "\\uFE0C > ;"
+ "\\uFE0D > ;"
+ "\\uFE0E > ;"
+ "\\uFE0F > ;"
+ "\\uFEFF > ;"
+
+ }
+
+ MapNFKC{
+ "A > a;"
+ "B > b;"
+ "C > c;"
+ "D > d;"
+ "E > e;"
+ "F > f;"
+ "G > g;"
+ "H > h;"
+ "I > i;"
+ "J > j;"
+ "K > k;"
+ "L > l;"
+ "M > m;"
+ "N > n;"
+ "O > o;"
+ "P > p;"
+ "Q > q;"
+ "R > r;"
+ "S > s;"
+ "T > t;"
+ "U > u;"
+ "V > v;"
+ "W > w;"
+ "X > x;"
+ "Y > y;"
+ "Z > z;"
+ "\\u00B5 > \\u03BC;"
+ "\\u00C0 > \\u00E0;"
+ "\\u00C1 > \\u00E1;"
+ "\\u00C2 > \\u00E2;"
+ "\\u00C3 > \\u00E3;"
+ "\\u00C4 > \\u00E4;"
+ "\\u00C5 > \\u00E5;"
+ "\\u00C6 > \\u00E6;"
+ "\\u00C7 > \\u00E7;"
+ "\\u00C8 > \\u00E8;"
+ "\\u00C9 > \\u00E9;"
+ "\\u00CA > \\u00EA;"
+ "\\u00CB > \\u00EB;"
+ "\\u00CC > \\u00EC;"
+ "\\u00CD > \\u00ED;"
+ "\\u00CE > \\u00EE;"
+ "\\u00CF > \\u00EF;"
+ "\\u00D0 > \\u00F0;"
+ "\\u00D1 > \\u00F1;"
+ "\\u00D2 > \\u00F2;"
+ "\\u00D3 > \\u00F3;"
+ "\\u00D4 > \\u00F4;"
+ "\\u00D5 > \\u00F5;"
+ "\\u00D6 > \\u00F6;"
+ "\\u00D8 > \\u00F8;"
+ "\\u00D9 > \\u00F9;"
+ "\\u00DA > \\u00FA;"
+ "\\u00DB > \\u00FB;"
+ "\\u00DC > \\u00FC;"
+ "\\u00DD > \\u00FD;"
+ "\\u00DE > \\u00FE;"
+ "\\u00DF > ss;"
+ "\\u0100 > \\u0101;"
+ "\\u0102 > \\u0103;"
+ "\\u0104 > \\u0105;"
+ "\\u0106 > \\u0107;"
+ "\\u0108 > \\u0109;"
+ "\\u010A > \\u010B;"
+ "\\u010C > \\u010D;"
+ "\\u010E > \\u010F;"
+ "\\u0110 > \\u0111;"
+ "\\u0112 > \\u0113;"
+ "\\u0114 > \\u0115;"
+ "\\u0116 > \\u0117;"
+ "\\u0118 > \\u0119;"
+ "\\u011A > \\u011B;"
+ "\\u011C > \\u011D;"
+ "\\u011E > \\u011F;"
+ "\\u0120 > \\u0121;"
+ "\\u0122 > \\u0123;"
+ "\\u0124 > \\u0125;"
+ "\\u0126 > \\u0127;"
+ "\\u0128 > \\u0129;"
+ "\\u012A > \\u012B;"
+ "\\u012C > \\u012D;"
+ "\\u012E > \\u012F;"
+ "\\u0130 > i\\u0307;"
+ "\\u0132 > \\u0133;"
+ "\\u0134 > \\u0135;"
+ "\\u0136 > \\u0137;"
+ "\\u0139 > \\u013A;"
+ "\\u013B > \\u013C;"
+ "\\u013D > \\u013E;"
+ "\\u013F > \\u0140;"
+ "\\u0141 > \\u0142;"
+ "\\u0143 > \\u0144;"
+ "\\u0145 > \\u0146;"
+ "\\u0147 > \\u0148;"
+ "\\u0149 > \\u02BCn;"
+ "\\u014A > \\u014B;"
+ "\\u014C > \\u014D;"
+ "\\u014E > \\u014F;"
+ "\\u0150 > \\u0151;"
+ "\\u0152 > \\u0153;"
+ "\\u0154 > \\u0155;"
+ "\\u0156 > \\u0157;"
+ "\\u0158 > \\u0159;"
+ "\\u015A > \\u015B;"
+ "\\u015C > \\u015D;"
+ "\\u015E > \\u015F;"
+ "\\u0160 > \\u0161;"
+ "\\u0162 > \\u0163;"
+ "\\u0164 > \\u0165;"
+ "\\u0166 > \\u0167;"
+ "\\u0168 > \\u0169;"
+ "\\u016A > \\u016B;"
+ "\\u016C > \\u016D;"
+ "\\u016E > \\u016F;"
+ "\\u0170 > \\u0171;"
+ "\\u0172 > \\u0173;"
+ "\\u0174 > \\u0175;"
+ "\\u0176 > \\u0177;"
+ "\\u0178 > \\u00FF;"
+ "\\u0179 > \\u017A;"
+ "\\u017B > \\u017C;"
+ "\\u017D > \\u017E;"
+ "\\u017F > s;"
+ "\\u0181 > \\u0253;"
+ "\\u0182 > \\u0183;"
+ "\\u0184 > \\u0185;"
+ "\\u0186 > \\u0254;"
+ "\\u0187 > \\u0188;"
+ "\\u0189 > \\u0256;"
+ "\\u018A > \\u0257;"
+ "\\u018B > \\u018C;"
+ "\\u018E > \\u01DD;"
+ "\\u018F > \\u0259;"
+ "\\u0190 > \\u025B;"
+ "\\u0191 > \\u0192;"
+ "\\u0193 > \\u0260;"
+ "\\u0194 > \\u0263;"
+ "\\u0196 > \\u0269;"
+ "\\u0197 > \\u0268;"
+ "\\u0198 > \\u0199;"
+ "\\u019C > \\u026F;"
+ "\\u019D > \\u0272;"
+ "\\u019F > \\u0275;"
+ "\\u01A0 > \\u01A1;"
+ "\\u01A2 > \\u01A3;"
+ "\\u01A4 > \\u01A5;"
+ "\\u01A6 > \\u0280;"
+ "\\u01A7 > \\u01A8;"
+ "\\u01A9 > \\u0283;"
+ "\\u01AC > \\u01AD;"
+ "\\u01AE > \\u0288;"
+ "\\u01AF > \\u01B0;"
+ "\\u01B1 > \\u028A;"
+ "\\u01B2 > \\u028B;"
+ "\\u01B3 > \\u01B4;"
+ "\\u01B5 > \\u01B6;"
+ "\\u01B7 > \\u0292;"
+ "\\u01B8 > \\u01B9;"
+ "\\u01BC > \\u01BD;"
+ "\\u01C4 > \\u01C6;"
+ "\\u01C5 > \\u01C6;"
+ "\\u01C7 > \\u01C9;"
+ "\\u01C8 > \\u01C9;"
+ "\\u01CA > \\u01CC;"
+ "\\u01CB > \\u01CC;"
+ "\\u01CD > \\u01CE;"
+ "\\u01CF > \\u01D0;"
+ "\\u01D1 > \\u01D2;"
+ "\\u01D3 > \\u01D4;"
+ "\\u01D5 > \\u01D6;"
+ "\\u01D7 > \\u01D8;"
+ "\\u01D9 > \\u01DA;"
+ "\\u01DB > \\u01DC;"
+ "\\u01DE > \\u01DF;"
+ "\\u01E0 > \\u01E1;"
+ "\\u01E2 > \\u01E3;"
+ "\\u01E4 > \\u01E5;"
+ "\\u01E6 > \\u01E7;"
+ "\\u01E8 > \\u01E9;"
+ "\\u01EA > \\u01EB;"
+ "\\u01EC > \\u01ED;"
+ "\\u01EE > \\u01EF;"
+ "\\u01F0 > j\\u030C;"
+ "\\u01F1 > \\u01F3;"
+ "\\u01F2 > \\u01F3;"
+ "\\u01F4 > \\u01F5;"
+ "\\u01F6 > \\u0195;"
+ "\\u01F7 > \\u01BF;"
+ "\\u01F8 > \\u01F9;"
+ "\\u01FA > \\u01FB;"
+ "\\u01FC > \\u01FD;"
+ "\\u01FE > \\u01FF;"
+ "\\u0200 > \\u0201;"
+ "\\u0202 > \\u0203;"
+ "\\u0204 > \\u0205;"
+ "\\u0206 > \\u0207;"
+ "\\u0208 > \\u0209;"
+ "\\u020A > \\u020B;"
+ "\\u020C > \\u020D;"
+ "\\u020E > \\u020F;"
+ "\\u0210 > \\u0211;"
+ "\\u0212 > \\u0213;"
+ "\\u0214 > \\u0215;"
+ "\\u0216 > \\u0217;"
+ "\\u0218 > \\u0219;"
+ "\\u021A > \\u021B;"
+ "\\u021C > \\u021D;"
+ "\\u021E > \\u021F;"
+ "\\u0220 > \\u019E;"
+ "\\u0222 > \\u0223;"
+ "\\u0224 > \\u0225;"
+ "\\u0226 > \\u0227;"
+ "\\u0228 > \\u0229;"
+ "\\u022A > \\u022B;"
+ "\\u022C > \\u022D;"
+ "\\u022E > \\u022F;"
+ "\\u0230 > \\u0231;"
+ "\\u0232 > \\u0233;"
+ "\\u0345 > \\u03B9;"
+ "\\u037A > \\u0020\\u03B9;"
+ "\\u0386 > \\u03AC;"
+ "\\u0388 > \\u03AD;"
+ "\\u0389 > \\u03AE;"
+ "\\u038A > \\u03AF;"
+ "\\u038C > \\u03CC;"
+ "\\u038E > \\u03CD;"
+ "\\u038F > \\u03CE;"
+ "\\u0390 > \\u03B9\\u0308\\u0301;"
+ "\\u0391 > \\u03B1;"
+ "\\u0392 > \\u03B2;"
+ "\\u0393 > \\u03B3;"
+ "\\u0394 > \\u03B4;"
+ "\\u0395 > \\u03B5;"
+ "\\u0396 > \\u03B6;"
+ "\\u0397 > \\u03B7;"
+ "\\u0398 > \\u03B8;"
+ "\\u0399 > \\u03B9;"
+ "\\u039A > \\u03BA;"
+ "\\u039B > \\u03BB;"
+ "\\u039C > \\u03BC;"
+ "\\u039D > \\u03BD;"
+ "\\u039E > \\u03BE;"
+ "\\u039F > \\u03BF;"
+ "\\u03A0 > \\u03C0;"
+ "\\u03A1 > \\u03C1;"
+ "\\u03A3 > \\u03C3;"
+ "\\u03A4 > \\u03C4;"
+ "\\u03A5 > \\u03C5;"
+ "\\u03A6 > \\u03C6;"
+ "\\u03A7 > \\u03C7;"
+ "\\u03A8 > \\u03C8;"
+ "\\u03A9 > \\u03C9;"
+ "\\u03AA > \\u03CA;"
+ "\\u03AB > \\u03CB;"
+ "\\u03B0 > \\u03C5\\u0308\\u0301;"
+ "\\u03C2 > \\u03C3;"
+ "\\u03D0 > \\u03B2;"
+ "\\u03D1 > \\u03B8;"
+ "\\u03D2 > \\u03C5;"
+ "\\u03D3 > \\u03CD;"
+ "\\u03D4 > \\u03CB;"
+ "\\u03D5 > \\u03C6;"
+ "\\u03D6 > \\u03C0;"
+ "\\u03D8 > \\u03D9;"
+ "\\u03DA > \\u03DB;"
+ "\\u03DC > \\u03DD;"
+ "\\u03DE > \\u03DF;"
+ "\\u03E0 > \\u03E1;"
+ "\\u03E2 > \\u03E3;"
+ "\\u03E4 > \\u03E5;"
+ "\\u03E6 > \\u03E7;"
+ "\\u03E8 > \\u03E9;"
+ "\\u03EA > \\u03EB;"
+ "\\u03EC > \\u03ED;"
+ "\\u03EE > \\u03EF;"
+ "\\u03F0 > \\u03BA;"
+ "\\u03F1 > \\u03C1;"
+ "\\u03F2 > \\u03C3;"
+ "\\u03F4 > \\u03B8;"
+ "\\u03F5 > \\u03B5;"
+ "\\u0400 > \\u0450;"
+ "\\u0401 > \\u0451;"
+ "\\u0402 > \\u0452;"
+ "\\u0403 > \\u0453;"
+ "\\u0404 > \\u0454;"
+ "\\u0405 > \\u0455;"
+ "\\u0406 > \\u0456;"
+ "\\u0407 > \\u0457;"
+ "\\u0408 > \\u0458;"
+ "\\u0409 > \\u0459;"
+ "\\u040A > \\u045A;"
+ "\\u040B > \\u045B;"
+ "\\u040C > \\u045C;"
+ "\\u040D > \\u045D;"
+ "\\u040E > \\u045E;"
+ "\\u040F > \\u045F;"
+ "\\u0410 > \\u0430;"
+ "\\u0411 > \\u0431;"
+ "\\u0412 > \\u0432;"
+ "\\u0413 > \\u0433;"
+ "\\u0414 > \\u0434;"
+ "\\u0415 > \\u0435;"
+ "\\u0416 > \\u0436;"
+ "\\u0417 > \\u0437;"
+ "\\u0418 > \\u0438;"
+ "\\u0419 > \\u0439;"
+ "\\u041A > \\u043A;"
+ "\\u041B > \\u043B;"
+ "\\u041C > \\u043C;"
+ "\\u041D > \\u043D;"
+ "\\u041E > \\u043E;"
+ "\\u041F > \\u043F;"
+ "\\u0420 > \\u0440;"
+ "\\u0421 > \\u0441;"
+ "\\u0422 > \\u0442;"
+ "\\u0423 > \\u0443;"
+ "\\u0424 > \\u0444;"
+ "\\u0425 > \\u0445;"
+ "\\u0426 > \\u0446;"
+ "\\u0427 > \\u0447;"
+ "\\u0428 > \\u0448;"
+ "\\u0429 > \\u0449;"
+ "\\u042A > \\u044A;"
+ "\\u042B > \\u044B;"
+ "\\u042C > \\u044C;"
+ "\\u042D > \\u044D;"
+ "\\u042E > \\u044E;"
+ "\\u042F > \\u044F;"
+ "\\u0460 > \\u0461;"
+ "\\u0462 > \\u0463;"
+ "\\u0464 > \\u0465;"
+ "\\u0466 > \\u0467;"
+ "\\u0468 > \\u0469;"
+ "\\u046A > \\u046B;"
+ "\\u046C > \\u046D;"
+ "\\u046E > \\u046F;"
+ "\\u0470 > \\u0471;"
+ "\\u0472 > \\u0473;"
+ "\\u0474 > \\u0475;"
+ "\\u0476 > \\u0477;"
+ "\\u0478 > \\u0479;"
+ "\\u047A > \\u047B;"
+ "\\u047C > \\u047D;"
+ "\\u047E > \\u047F;"
+ "\\u0480 > \\u0481;"
+ "\\u048A > \\u048B;"
+ "\\u048C > \\u048D;"
+ "\\u048E > \\u048F;"
+ "\\u0490 > \\u0491;"
+ "\\u0492 > \\u0493;"
+ "\\u0494 > \\u0495;"
+ "\\u0496 > \\u0497;"
+ "\\u0498 > \\u0499;"
+ "\\u049A > \\u049B;"
+ "\\u049C > \\u049D;"
+ "\\u049E > \\u049F;"
+ "\\u04A0 > \\u04A1;"
+ "\\u04A2 > \\u04A3;"
+ "\\u04A4 > \\u04A5;"
+ "\\u04A6 > \\u04A7;"
+ "\\u04A8 > \\u04A9;"
+ "\\u04AA > \\u04AB;"
+ "\\u04AC > \\u04AD;"
+ "\\u04AE > \\u04AF;"
+ "\\u04B0 > \\u04B1;"
+ "\\u04B2 > \\u04B3;"
+ "\\u04B4 > \\u04B5;"
+ "\\u04B6 > \\u04B7;"
+ "\\u04B8 > \\u04B9;"
+ "\\u04BA > \\u04BB;"
+ "\\u04BC > \\u04BD;"
+ "\\u04BE > \\u04BF;"
+ "\\u04C1 > \\u04C2;"
+ "\\u04C3 > \\u04C4;"
+ "\\u04C5 > \\u04C6;"
+ "\\u04C7 > \\u04C8;"
+ "\\u04C9 > \\u04CA;"
+ "\\u04CB > \\u04CC;"
+ "\\u04CD > \\u04CE;"
+ "\\u04D0 > \\u04D1;"
+ "\\u04D2 > \\u04D3;"
+ "\\u04D4 > \\u04D5;"
+ "\\u04D6 > \\u04D7;"
+ "\\u04D8 > \\u04D9;"
+ "\\u04DA > \\u04DB;"
+ "\\u04DC > \\u04DD;"
+ "\\u04DE > \\u04DF;"
+ "\\u04E0 > \\u04E1;"
+ "\\u04E2 > \\u04E3;"
+ "\\u04E4 > \\u04E5;"
+ "\\u04E6 > \\u04E7;"
+ "\\u04E8 > \\u04E9;"
+ "\\u04EA > \\u04EB;"
+ "\\u04EC > \\u04ED;"
+ "\\u04EE > \\u04EF;"
+ "\\u04F0 > \\u04F1;"
+ "\\u04F2 > \\u04F3;"
+ "\\u04F4 > \\u04F5;"
+ "\\u04F8 > \\u04F9;"
+ "\\u0500 > \\u0501;"
+ "\\u0502 > \\u0503;"
+ "\\u0504 > \\u0505;"
+ "\\u0506 > \\u0507;"
+ "\\u0508 > \\u0509;"
+ "\\u050A > \\u050B;"
+ "\\u050C > \\u050D;"
+ "\\u050E > \\u050F;"
+ "\\u0531 > \\u0561;"
+ "\\u0532 > \\u0562;"
+ "\\u0533 > \\u0563;"
+ "\\u0534 > \\u0564;"
+ "\\u0535 > \\u0565;"
+ "\\u0536 > \\u0566;"
+ "\\u0537 > \\u0567;"
+ "\\u0538 > \\u0568;"
+ "\\u0539 > \\u0569;"
+ "\\u053A > \\u056A;"
+ "\\u053B > \\u056B;"
+ "\\u053C > \\u056C;"
+ "\\u053D > \\u056D;"
+ "\\u053E > \\u056E;"
+ "\\u053F > \\u056F;"
+ "\\u0540 > \\u0570;"
+ "\\u0541 > \\u0571;"
+ "\\u0542 > \\u0572;"
+ "\\u0543 > \\u0573;"
+ "\\u0544 > \\u0574;"
+ "\\u0545 > \\u0575;"
+ "\\u0546 > \\u0576;"
+ "\\u0547 > \\u0577;"
+ "\\u0548 > \\u0578;"
+ "\\u0549 > \\u0579;"
+ "\\u054A > \\u057A;"
+ "\\u054B > \\u057B;"
+ "\\u054C > \\u057C;"
+ "\\u054D > \\u057D;"
+ "\\u054E > \\u057E;"
+ "\\u054F > \\u057F;"
+ "\\u0550 > \\u0580;"
+ "\\u0551 > \\u0581;"
+ "\\u0552 > \\u0582;"
+ "\\u0553 > \\u0583;"
+ "\\u0554 > \\u0584;"
+ "\\u0555 > \\u0585;"
+ "\\u0556 > \\u0586;"
+ "\\u0587 > \\u0565\\u0582;"
+ "\\u1E00 > \\u1E01;"
+ "\\u1E02 > \\u1E03;"
+ "\\u1E04 > \\u1E05;"
+ "\\u1E06 > \\u1E07;"
+ "\\u1E08 > \\u1E09;"
+ "\\u1E0A > \\u1E0B;"
+ "\\u1E0C > \\u1E0D;"
+ "\\u1E0E > \\u1E0F;"
+ "\\u1E10 > \\u1E11;"
+ "\\u1E12 > \\u1E13;"
+ "\\u1E14 > \\u1E15;"
+ "\\u1E16 > \\u1E17;"
+ "\\u1E18 > \\u1E19;"
+ "\\u1E1A > \\u1E1B;"
+ "\\u1E1C > \\u1E1D;"
+ "\\u1E1E > \\u1E1F;"
+ "\\u1E20 > \\u1E21;"
+ "\\u1E22 > \\u1E23;"
+ "\\u1E24 > \\u1E25;"
+ "\\u1E26 > \\u1E27;"
+ "\\u1E28 > \\u1E29;"
+ "\\u1E2A > \\u1E2B;"
+ "\\u1E2C > \\u1E2D;"
+ "\\u1E2E > \\u1E2F;"
+ "\\u1E30 > \\u1E31;"
+ "\\u1E32 > \\u1E33;"
+ "\\u1E34 > \\u1E35;"
+ "\\u1E36 > \\u1E37;"
+ "\\u1E38 > \\u1E39;"
+ "\\u1E3A > \\u1E3B;"
+ "\\u1E3C > \\u1E3D;"
+ "\\u1E3E > \\u1E3F;"
+ "\\u1E40 > \\u1E41;"
+ "\\u1E42 > \\u1E43;"
+ "\\u1E44 > \\u1E45;"
+ "\\u1E46 > \\u1E47;"
+ "\\u1E48 > \\u1E49;"
+ "\\u1E4A > \\u1E4B;"
+ "\\u1E4C > \\u1E4D;"
+ "\\u1E4E > \\u1E4F;"
+ "\\u1E50 > \\u1E51;"
+ "\\u1E52 > \\u1E53;"
+ "\\u1E54 > \\u1E55;"
+ "\\u1E56 > \\u1E57;"
+ "\\u1E58 > \\u1E59;"
+ "\\u1E5A > \\u1E5B;"
+ "\\u1E5C > \\u1E5D;"
+ "\\u1E5E > \\u1E5F;"
+ "\\u1E60 > \\u1E61;"
+ "\\u1E62 > \\u1E63;"
+ "\\u1E64 > \\u1E65;"
+ "\\u1E66 > \\u1E67;"
+ "\\u1E68 > \\u1E69;"
+ "\\u1E6A > \\u1E6B;"
+ "\\u1E6C > \\u1E6D;"
+ "\\u1E6E > \\u1E6F;"
+ "\\u1E70 > \\u1E71;"
+ "\\u1E72 > \\u1E73;"
+ "\\u1E74 > \\u1E75;"
+ "\\u1E76 > \\u1E77;"
+ "\\u1E78 > \\u1E79;"
+ "\\u1E7A > \\u1E7B;"
+ "\\u1E7C > \\u1E7D;"
+ "\\u1E7E > \\u1E7F;"
+ "\\u1E80 > \\u1E81;"
+ "\\u1E82 > \\u1E83;"
+ "\\u1E84 > \\u1E85;"
+ "\\u1E86 > \\u1E87;"
+ "\\u1E88 > \\u1E89;"
+ "\\u1E8A > \\u1E8B;"
+ "\\u1E8C > \\u1E8D;"
+ "\\u1E8E > \\u1E8F;"
+ "\\u1E90 > \\u1E91;"
+ "\\u1E92 > \\u1E93;"
+ "\\u1E94 > \\u1E95;"
+ "\\u1E96 > h\\u0331;"
+ "\\u1E97 > t\\u0308;"
+ "\\u1E98 > w\\u030A;"
+ "\\u1E99 > y\\u030A;"
+ "\\u1E9A > a\\u02BE;"
+ "\\u1E9B > \\u1E61;"
+ "\\u1EA0 > \\u1EA1;"
+ "\\u1EA2 > \\u1EA3;"
+ "\\u1EA4 > \\u1EA5;"
+ "\\u1EA6 > \\u1EA7;"
+ "\\u1EA8 > \\u1EA9;"
+ "\\u1EAA > \\u1EAB;"
+ "\\u1EAC > \\u1EAD;"
+ "\\u1EAE > \\u1EAF;"
+ "\\u1EB0 > \\u1EB1;"
+ "\\u1EB2 > \\u1EB3;"
+ "\\u1EB4 > \\u1EB5;"
+ "\\u1EB6 > \\u1EB7;"
+ "\\u1EB8 > \\u1EB9;"
+ "\\u1EBA > \\u1EBB;"
+ "\\u1EBC > \\u1EBD;"
+ "\\u1EBE > \\u1EBF;"
+ "\\u1EC0 > \\u1EC1;"
+ "\\u1EC2 > \\u1EC3;"
+ "\\u1EC4 > \\u1EC5;"
+ "\\u1EC6 > \\u1EC7;"
+ "\\u1EC8 > \\u1EC9;"
+ "\\u1ECA > \\u1ECB;"
+ "\\u1ECC > \\u1ECD;"
+ "\\u1ECE > \\u1ECF;"
+ "\\u1ED0 > \\u1ED1;"
+ "\\u1ED2 > \\u1ED3;"
+ "\\u1ED4 > \\u1ED5;"
+ "\\u1ED6 > \\u1ED7;"
+ "\\u1ED8 > \\u1ED9;"
+ "\\u1EDA > \\u1EDB;"
+ "\\u1EDC > \\u1EDD;"
+ "\\u1EDE > \\u1EDF;"
+ "\\u1EE0 > \\u1EE1;"
+ "\\u1EE2 > \\u1EE3;"
+ "\\u1EE4 > \\u1EE5;"
+ "\\u1EE6 > \\u1EE7;"
+ "\\u1EE8 > \\u1EE9;"
+ "\\u1EEA > \\u1EEB;"
+ "\\u1EEC > \\u1EED;"
+ "\\u1EEE > \\u1EEF;"
+ "\\u1EF0 > \\u1EF1;"
+ "\\u1EF2 > \\u1EF3;"
+ "\\u1EF4 > \\u1EF5;"
+ "\\u1EF6 > \\u1EF7;"
+ "\\u1EF8 > \\u1EF9;"
+ "\\u1F08 > \\u1F00;"
+ "\\u1F09 > \\u1F01;"
+ "\\u1F0A > \\u1F02;"
+ "\\u1F0B > \\u1F03;"
+ "\\u1F0C > \\u1F04;"
+ "\\u1F0D > \\u1F05;"
+ "\\u1F0E > \\u1F06;"
+ "\\u1F0F > \\u1F07;"
+ "\\u1F18 > \\u1F10;"
+ "\\u1F19 > \\u1F11;"
+ "\\u1F1A > \\u1F12;"
+ "\\u1F1B > \\u1F13;"
+ "\\u1F1C > \\u1F14;"
+ "\\u1F1D > \\u1F15;"
+ "\\u1F28 > \\u1F20;"
+ "\\u1F29 > \\u1F21;"
+ "\\u1F2A > \\u1F22;"
+ "\\u1F2B > \\u1F23;"
+ "\\u1F2C > \\u1F24;"
+ "\\u1F2D > \\u1F25;"
+ "\\u1F2E > \\u1F26;"
+ "\\u1F2F > \\u1F27;"
+ "\\u1F38 > \\u1F30;"
+ "\\u1F39 > \\u1F31;"
+ "\\u1F3A > \\u1F32;"
+ "\\u1F3B > \\u1F33;"
+ "\\u1F3C > \\u1F34;"
+ "\\u1F3D > \\u1F35;"
+ "\\u1F3E > \\u1F36;"
+ "\\u1F3F > \\u1F37;"
+ "\\u1F48 > \\u1F40;"
+ "\\u1F49 > \\u1F41;"
+ "\\u1F4A > \\u1F42;"
+ "\\u1F4B > \\u1F43;"
+ "\\u1F4C > \\u1F44;"
+ "\\u1F4D > \\u1F45;"
+ "\\u1F50 > \\u03C5\\u0313;"
+ "\\u1F52 > \\u03C5\\u0313\\u0300;"
+ "\\u1F54 > \\u03C5\\u0313\\u0301;"
+ "\\u1F56 > \\u03C5\\u0313\\u0342;"
+ "\\u1F59 > \\u1F51;"
+ "\\u1F5B > \\u1F53;"
+ "\\u1F5D > \\u1F55;"
+ "\\u1F5F > \\u1F57;"
+ "\\u1F68 > \\u1F60;"
+ "\\u1F69 > \\u1F61;"
+ "\\u1F6A > \\u1F62;"
+ "\\u1F6B > \\u1F63;"
+ "\\u1F6C > \\u1F64;"
+ "\\u1F6D > \\u1F65;"
+ "\\u1F6E > \\u1F66;"
+ "\\u1F6F > \\u1F67;"
+ "\\u1F80 > \\u1F00\\u03B9;"
+ "\\u1F81 > \\u1F01\\u03B9;"
+ "\\u1F82 > \\u1F02\\u03B9;"
+ "\\u1F83 > \\u1F03\\u03B9;"
+ "\\u1F84 > \\u1F04\\u03B9;"
+ "\\u1F85 > \\u1F05\\u03B9;"
+ "\\u1F86 > \\u1F06\\u03B9;"
+ "\\u1F87 > \\u1F07\\u03B9;"
+ "\\u1F88 > \\u1F00\\u03B9;"
+ "\\u1F89 > \\u1F01\\u03B9;"
+ "\\u1F8A > \\u1F02\\u03B9;"
+ "\\u1F8B > \\u1F03\\u03B9;"
+ "\\u1F8C > \\u1F04\\u03B9;"
+ "\\u1F8D > \\u1F05\\u03B9;"
+ "\\u1F8E > \\u1F06\\u03B9;"
+ "\\u1F8F > \\u1F07\\u03B9;"
+ "\\u1F90 > \\u1F20\\u03B9;"
+ "\\u1F91 > \\u1F21\\u03B9;"
+ "\\u1F92 > \\u1F22\\u03B9;"
+ "\\u1F93 > \\u1F23\\u03B9;"
+ "\\u1F94 > \\u1F24\\u03B9;"
+ "\\u1F95 > \\u1F25\\u03B9;"
+ "\\u1F96 > \\u1F26\\u03B9;"
+ "\\u1F97 > \\u1F27\\u03B9;"
+ "\\u1F98 > \\u1F20\\u03B9;"
+ "\\u1F99 > \\u1F21\\u03B9;"
+ "\\u1F9A > \\u1F22\\u03B9;"
+ "\\u1F9B > \\u1F23\\u03B9;"
+ "\\u1F9C > \\u1F24\\u03B9;"
+ "\\u1F9D > \\u1F25\\u03B9;"
+ "\\u1F9E > \\u1F26\\u03B9;"
+ "\\u1F9F > \\u1F27\\u03B9;"
+ "\\u1FA0 > \\u1F60\\u03B9;"
+ "\\u1FA1 > \\u1F61\\u03B9;"
+ "\\u1FA2 > \\u1F62\\u03B9;"
+ "\\u1FA3 > \\u1F63\\u03B9;"
+ "\\u1FA4 > \\u1F64\\u03B9;"
+ "\\u1FA5 > \\u1F65\\u03B9;"
+ "\\u1FA6 > \\u1F66\\u03B9;"
+ "\\u1FA7 > \\u1F67\\u03B9;"
+ "\\u1FA8 > \\u1F60\\u03B9;"
+ "\\u1FA9 > \\u1F61\\u03B9;"
+ "\\u1FAA > \\u1F62\\u03B9;"
+ "\\u1FAB > \\u1F63\\u03B9;"
+ "\\u1FAC > \\u1F64\\u03B9;"
+ "\\u1FAD > \\u1F65\\u03B9;"
+ "\\u1FAE > \\u1F66\\u03B9;"
+ "\\u1FAF > \\u1F67\\u03B9;"
+ "\\u1FB2 > \\u1F70\\u03B9;"
+ "\\u1FB3 > \\u03B1\\u03B9;"
+ "\\u1FB4 > \\u03AC\\u03B9;"
+ "\\u1FB6 > \\u03B1\\u0342;"
+ "\\u1FB7 > \\u03B1\\u0342\\u03B9;"
+ "\\u1FB8 > \\u1FB0;"
+ "\\u1FB9 > \\u1FB1;"
+ "\\u1FBA > \\u1F70;"
+ "\\u1FBB > \\u1F71;"
+ "\\u1FBC > \\u03B1\\u03B9;"
+ "\\u1FBE > \\u03B9;"
+ "\\u1FC2 > \\u1F74\\u03B9;"
+ "\\u1FC3 > \\u03B7\\u03B9;"
+ "\\u1FC4 > \\u03AE\\u03B9;"
+ "\\u1FC6 > \\u03B7\\u0342;"
+ "\\u1FC7 > \\u03B7\\u0342\\u03B9;"
+ "\\u1FC8 > \\u1F72;"
+ "\\u1FC9 > \\u1F73;"
+ "\\u1FCA > \\u1F74;"
+ "\\u1FCB > \\u1F75;"
+ "\\u1FCC > \\u03B7\\u03B9;"
+ "\\u1FD2 > \\u03B9\\u0308\\u0300;"
+ "\\u1FD3 > \\u03B9\\u0308\\u0301;"
+ "\\u1FD6 > \\u03B9\\u0342;"
+ "\\u1FD7 > \\u03B9\\u0308\\u0342;"
+ "\\u1FD8 > \\u1FD0;"
+ "\\u1FD9 > \\u1FD1;"
+ "\\u1FDA > \\u1F76;"
+ "\\u1FDB > \\u1F77;"
+ "\\u1FE2 > \\u03C5\\u0308\\u0300;"
+ "\\u1FE3 > \\u03C5\\u0308\\u0301;"
+ "\\u1FE4 > \\u03C1\\u0313;"
+ "\\u1FE6 > \\u03C5\\u0342;"
+ "\\u1FE7 > \\u03C5\\u0308\\u0342;"
+ "\\u1FE8 > \\u1FE0;"
+ "\\u1FE9 > \\u1FE1;"
+ "\\u1FEA > \\u1F7A;"
+ "\\u1FEB > \\u1F7B;"
+ "\\u1FEC > \\u1FE5;"
+ "\\u1FF2 > \\u1F7C\\u03B9;"
+ "\\u1FF3 > \\u03C9\\u03B9;"
+ "\\u1FF4 > \\u03CE\\u03B9;"
+ "\\u1FF6 > \\u03C9\\u0342;"
+ "\\u1FF7 > \\u03C9\\u0342\\u03B9;"
+ "\\u1FF8 > \\u1F78;"
+ "\\u1FF9 > \\u1F79;"
+ "\\u1FFA > \\u1F7C;"
+ "\\u1FFB > \\u1F7D;"
+ "\\u1FFC > \\u03C9\\u03B9;"
+ "\\u20A8 > rs;"
+ "\\u2102 > c;"
+ "\\u2103 > \\u00B0c;"
+ "\\u2107 > \\u025B;"
+ "\\u2109 > \\u00B0f;"
+ "\\u210B > h;"
+ "\\u210C > h;"
+ "\\u210D > h;"
+ "\\u2110 > i;"
+ "\\u2111 > i;"
+ "\\u2112 > l;"
+ "\\u2115 > n;"
+ "\\u2116 > no;"
+ "\\u2119 > p;"
+ "\\u211A > q;"
+ "\\u211B > r;"
+ "\\u211C > r;"
+ "\\u211D > r;"
+ "\\u2120 > sm;"
+ "\\u2121 > tel;"
+ "\\u2122 > tm;"
+ "\\u2124 > z;"
+ "\\u2126 > \\u03C9;"
+ "\\u2128 > z;"
+ "\\u212A > k;"
+ "\\u212B > \\u00E5;"
+ "\\u212C > b;"
+ "\\u212D > c;"
+ "\\u2130 > e;"
+ "\\u2131 > f;"
+ "\\u2133 > m;"
+ "\\u213E > \\u03B3;"
+ "\\u213F > \\u03C0;"
+ "\\u2145 > d;"
+ "\\u2160 > \\u2170;"
+ "\\u2161 > \\u2171;"
+ "\\u2162 > \\u2172;"
+ "\\u2163 > \\u2173;"
+ "\\u2164 > \\u2174;"
+ "\\u2165 > \\u2175;"
+ "\\u2166 > \\u2176;"
+ "\\u2167 > \\u2177;"
+ "\\u2168 > \\u2178;"
+ "\\u2169 > \\u2179;"
+ "\\u216A > \\u217A;"
+ "\\u216B > \\u217B;"
+ "\\u216C > \\u217C;"
+ "\\u216D > \\u217D;"
+ "\\u216E > \\u217E;"
+ "\\u216F > \\u217F;"
+ "\\u24B6 > \\u24D0;"
+ "\\u24B7 > \\u24D1;"
+ "\\u24B8 > \\u24D2;"
+ "\\u24B9 > \\u24D3;"
+ "\\u24BA > \\u24D4;"
+ "\\u24BB > \\u24D5;"
+ "\\u24BC > \\u24D6;"
+ "\\u24BD > \\u24D7;"
+ "\\u24BE > \\u24D8;"
+ "\\u24BF > \\u24D9;"
+ "\\u24C0 > \\u24DA;"
+ "\\u24C1 > \\u24DB;"
+ "\\u24C2 > \\u24DC;"
+ "\\u24C3 > \\u24DD;"
+ "\\u24C4 > \\u24DE;"
+ "\\u24C5 > \\u24DF;"
+ "\\u24C6 > \\u24E0;"
+ "\\u24C7 > \\u24E1;"
+ "\\u24C8 > \\u24E2;"
+ "\\u24C9 > \\u24E3;"
+ "\\u24CA > \\u24E4;"
+ "\\u24CB > \\u24E5;"
+ "\\u24CC > \\u24E6;"
+ "\\u24CD > \\u24E7;"
+ "\\u24CE > \\u24E8;"
+ "\\u24CF > \\u24E9;"
+ "\\u3371 > hpa;"
+ "\\u3373 > au;"
+ "\\u3375 > ov;"
+ "\\u3380 > pa;"
+ "\\u3381 > na;"
+ "\\u3382 > \\u03BCa;"
+ "\\u3383 > ma;"
+ "\\u3384 > ka;"
+ "\\u3385 > kb;"
+ "\\u3386 > mb;"
+ "\\u3387 > gb;"
+ "\\u338A > pf;"
+ "\\u338B > nf;"
+ "\\u338C > \\u03BCf;"
+ "\\u3390 > hz;"
+ "\\u3391 > khz;"
+ "\\u3392 > mhz;"
+ "\\u3393 > ghz;"
+ "\\u3394 > thz;"
+ "\\u33A9 > pa;"
+ "\\u33AA > kpa;"
+ "\\u33AB > mpa;"
+ "\\u33AC > gpa;"
+ "\\u33B4 > pv;"
+ "\\u33B5 > nv;"
+ "\\u33B6 > \\u03BCv;"
+ "\\u33B7 > mv;"
+ "\\u33B8 > kv;"
+ "\\u33B9 > mv;"
+ "\\u33BA > pw;"
+ "\\u33BB > nw;"
+ "\\u33BC > \\u03BCw;"
+ "\\u33BD > mw;"
+ "\\u33BE > kw;"
+ "\\u33BF > mw;"
+ "\\u33C0 > k\\u03C9;"
+ "\\u33C1 > m\\u03C9;"
+ "\\u33C3 > bq;"
+ "\\u33C6 > c\\u2215kg;"
+ "\\u33C7 > co\\.;"
+ "\\u33C8 > db;"
+ "\\u33C9 > gy;"
+ "\\u33CB > hp;"
+ "\\u33CD > kk;"
+ "\\u33CE > km;"
+ "\\u33D7 > ph;"
+ "\\u33D9 > ppm;"
+ "\\u33DA > pr;"
+ "\\u33DC > sv;"
+ "\\u33DD > wb;"
+ "\\uFB00 > ff;"
+ "\\uFB01 > fi;"
+ "\\uFB02 > fl;"
+ "\\uFB03 > ffi;"
+ "\\uFB04 > ffl;"
+ "\\uFB05 > st;"
+ "\\uFB06 > st;"
+ "\\uFB13 > \\u0574\\u0576;"
+ "\\uFB14 > \\u0574\\u0565;"
+ "\\uFB15 > \\u0574\\u056B;"
+ "\\uFB16 > \\u057E\\u0576;"
+ "\\uFB17 > \\u0574\\u056D;"
+ "\\uFF21 > \\uFF41;"
+ "\\uFF22 > \\uFF42;"
+ "\\uFF23 > \\uFF43;"
+ "\\uFF24 > \\uFF44;"
+ "\\uFF25 > \\uFF45;"
+ "\\uFF26 > \\uFF46;"
+ "\\uFF27 > \\uFF47;"
+ "\\uFF28 > \\uFF48;"
+ "\\uFF29 > \\uFF49;"
+ "\\uFF2A > \\uFF4A;"
+ "\\uFF2B > \\uFF4B;"
+ "\\uFF2C > \\uFF4C;"
+ "\\uFF2D > \\uFF4D;"
+ "\\uFF2E > \\uFF4E;"
+ "\\uFF2F > \\uFF4F;"
+ "\\uFF30 > \\uFF50;"
+ "\\uFF31 > \\uFF51;"
+ "\\uFF32 > \\uFF52;"
+ "\\uFF33 > \\uFF53;"
+ "\\uFF34 > \\uFF54;"
+ "\\uFF35 > \\uFF55;"
+ "\\uFF36 > \\uFF56;"
+ "\\uFF37 > \\uFF57;"
+ "\\uFF38 > \\uFF58;"
+ "\\uFF39 > \\uFF59;"
+ "\\uFF3A > \\uFF5A;"
+ "\\U00010400 > \\U00010428;"
+ "\\U00010401 > \\U00010429;"
+ "\\U00010402 > \\U0001042A;"
+ "\\U00010403 > \\U0001042B;"
+ "\\U00010404 > \\U0001042C;"
+ "\\U00010405 > \\U0001042D;"
+ "\\U00010406 > \\U0001042E;"
+ "\\U00010407 > \\U0001042F;"
+ "\\U00010408 > \\U00010430;"
+ "\\U00010409 > \\U00010431;"
+ "\\U0001040A > \\U00010432;"
+ "\\U0001040B > \\U00010433;"
+ "\\U0001040C > \\U00010434;"
+ "\\U0001040D > \\U00010435;"
+ "\\U0001040E > \\U00010436;"
+ "\\U0001040F > \\U00010437;"
+ "\\U00010410 > \\U00010438;"
+ "\\U00010411 > \\U00010439;"
+ "\\U00010412 > \\U0001043A;"
+ "\\U00010413 > \\U0001043B;"
+ "\\U00010414 > \\U0001043C;"
+ "\\U00010415 > \\U0001043D;"
+ "\\U00010416 > \\U0001043E;"
+ "\\U00010417 > \\U0001043F;"
+ "\\U00010418 > \\U00010440;"
+ "\\U00010419 > \\U00010441;"
+ "\\U0001041A > \\U00010442;"
+ "\\U0001041B > \\U00010443;"
+ "\\U0001041C > \\U00010444;"
+ "\\U0001041D > \\U00010445;"
+ "\\U0001041E > \\U00010446;"
+ "\\U0001041F > \\U00010447;"
+ "\\U00010420 > \\U00010448;"
+ "\\U00010421 > \\U00010449;"
+ "\\U00010422 > \\U0001044A;"
+ "\\U00010423 > \\U0001044B;"
+ "\\U00010424 > \\U0001044C;"
+ "\\U00010425 > \\U0001044D;"
+ "\\U0001D400 > a;"
+ "\\U0001D401 > b;"
+ "\\U0001D402 > c;"
+ "\\U0001D403 > d;"
+ "\\U0001D404 > e;"
+ "\\U0001D405 > f;"
+ "\\U0001D406 > g;"
+ "\\U0001D407 > h;"
+ "\\U0001D408 > i;"
+ "\\U0001D409 > j;"
+ "\\U0001D40A > k;"
+ "\\U0001D40B > l;"
+ "\\U0001D40C > m;"
+ "\\U0001D40D > n;"
+ "\\U0001D40E > o;"
+ "\\U0001D40F > p;"
+ "\\U0001D410 > q;"
+ "\\U0001D411 > r;"
+ "\\U0001D412 > s;"
+ "\\U0001D413 > t;"
+ "\\U0001D414 > u;"
+ "\\U0001D415 > v;"
+ "\\U0001D416 > w;"
+ "\\U0001D417 > x;"
+ "\\U0001D418 > y;"
+ "\\U0001D419 > z;"
+ "\\U0001D434 > a;"
+ "\\U0001D435 > b;"
+ "\\U0001D436 > c;"
+ "\\U0001D437 > d;"
+ "\\U0001D438 > e;"
+ "\\U0001D439 > f;"
+ "\\U0001D43A > g;"
+ "\\U0001D43B > h;"
+ "\\U0001D43C > i;"
+ "\\U0001D43D > j;"
+ "\\U0001D43E > k;"
+ "\\U0001D43F > l;"
+ "\\U0001D440 > m;"
+ "\\U0001D441 > n;"
+ "\\U0001D442 > o;"
+ "\\U0001D443 > p;"
+ "\\U0001D444 > q;"
+ "\\U0001D445 > r;"
+ "\\U0001D446 > s;"
+ "\\U0001D447 > t;"
+ "\\U0001D448 > u;"
+ "\\U0001D449 > v;"
+ "\\U0001D44A > w;"
+ "\\U0001D44B > x;"
+ "\\U0001D44C > y;"
+ "\\U0001D44D > z;"
+ "\\U0001D468 > a;"
+ "\\U0001D469 > b;"
+ "\\U0001D46A > c;"
+ "\\U0001D46B > d;"
+ "\\U0001D46C > e;"
+ "\\U0001D46D > f;"
+ "\\U0001D46E > g;"
+ "\\U0001D46F > h;"
+ "\\U0001D470 > i;"
+ "\\U0001D471 > j;"
+ "\\U0001D472 > k;"
+ "\\U0001D473 > l;"
+ "\\U0001D474 > m;"
+ "\\U0001D475 > n;"
+ "\\U0001D476 > o;"
+ "\\U0001D477 > p;"
+ "\\U0001D478 > q;"
+ "\\U0001D479 > r;"
+ "\\U0001D47A > s;"
+ "\\U0001D47B > t;"
+ "\\U0001D47C > u;"
+ "\\U0001D47D > v;"
+ "\\U0001D47E > w;"
+ "\\U0001D47F > x;"
+ "\\U0001D480 > y;"
+ "\\U0001D481 > z;"
+ "\\U0001D49C > a;"
+ "\\U0001D49E > c;"
+ "\\U0001D49F > d;"
+ "\\U0001D4A2 > g;"
+ "\\U0001D4A5 > j;"
+ "\\U0001D4A6 > k;"
+ "\\U0001D4A9 > n;"
+ "\\U0001D4AA > o;"
+ "\\U0001D4AB > p;"
+ "\\U0001D4AC > q;"
+ "\\U0001D4AE > s;"
+ "\\U0001D4AF > t;"
+ "\\U0001D4B0 > u;"
+ "\\U0001D4B1 > v;"
+ "\\U0001D4B2 > w;"
+ "\\U0001D4B3 > x;"
+ "\\U0001D4B4 > y;"
+ "\\U0001D4B5 > z;"
+ "\\U0001D4D0 > a;"
+ "\\U0001D4D1 > b;"
+ "\\U0001D4D2 > c;"
+ "\\U0001D4D3 > d;"
+ "\\U0001D4D4 > e;"
+ "\\U0001D4D5 > f;"
+ "\\U0001D4D6 > g;"
+ "\\U0001D4D7 > h;"
+ "\\U0001D4D8 > i;"
+ "\\U0001D4D9 > j;"
+ "\\U0001D4DA > k;"
+ "\\U0001D4DB > l;"
+ "\\U0001D4DC > m;"
+ "\\U0001D4DD > n;"
+ "\\U0001D4DE > o;"
+ "\\U0001D4DF > p;"
+ "\\U0001D4E0 > q;"
+ "\\U0001D4E1 > r;"
+ "\\U0001D4E2 > s;"
+ "\\U0001D4E3 > t;"
+ "\\U0001D4E4 > u;"
+ "\\U0001D4E5 > v;"
+ "\\U0001D4E6 > w;"
+ "\\U0001D4E7 > x;"
+ "\\U0001D4E8 > y;"
+ "\\U0001D4E9 > z;"
+ "\\U0001D504 > a;"
+ "\\U0001D505 > b;"
+ "\\U0001D507 > d;"
+ "\\U0001D508 > e;"
+ "\\U0001D509 > f;"
+ "\\U0001D50A > g;"
+ "\\U0001D50D > j;"
+ "\\U0001D50E > k;"
+ "\\U0001D50F > l;"
+ "\\U0001D510 > m;"
+ "\\U0001D511 > n;"
+ "\\U0001D512 > o;"
+ "\\U0001D513 > p;"
+ "\\U0001D514 > q;"
+ "\\U0001D516 > s;"
+ "\\U0001D517 > t;"
+ "\\U0001D518 > u;"
+ "\\U0001D519 > v;"
+ "\\U0001D51A > w;"
+ "\\U0001D51B > x;"
+ "\\U0001D51C > y;"
+ "\\U0001D538 > a;"
+ "\\U0001D539 > b;"
+ "\\U0001D53B > d;"
+ "\\U0001D53C > e;"
+ "\\U0001D53D > f;"
+ "\\U0001D53E > g;"
+ "\\U0001D540 > i;"
+ "\\U0001D541 > j;"
+ "\\U0001D542 > k;"
+ "\\U0001D543 > l;"
+ "\\U0001D544 > m;"
+ "\\U0001D546 > o;"
+ "\\U0001D54A > s;"
+ "\\U0001D54B > t;"
+ "\\U0001D54C > u;"
+ "\\U0001D54D > v;"
+ "\\U0001D54E > w;"
+ "\\U0001D54F > x;"
+ "\\U0001D550 > y;"
+ "\\U0001D56C > a;"
+ "\\U0001D56D > b;"
+ "\\U0001D56E > c;"
+ "\\U0001D56F > d;"
+ "\\U0001D570 > e;"
+ "\\U0001D571 > f;"
+ "\\U0001D572 > g;"
+ "\\U0001D573 > h;"
+ "\\U0001D574 > i;"
+ "\\U0001D575 > j;"
+ "\\U0001D576 > k;"
+ "\\U0001D577 > l;"
+ "\\U0001D578 > m;"
+ "\\U0001D579 > n;"
+ "\\U0001D57A > o;"
+ "\\U0001D57B > p;"
+ "\\U0001D57C > q;"
+ "\\U0001D57D > r;"
+ "\\U0001D57E > s;"
+ "\\U0001D57F > t;"
+ "\\U0001D580 > u;"
+ "\\U0001D581 > v;"
+ "\\U0001D582 > w;"
+ "\\U0001D583 > x;"
+ "\\U0001D584 > y;"
+ "\\U0001D585 > z;"
+ "\\U0001D5A0 > a;"
+ "\\U0001D5A1 > b;"
+ "\\U0001D5A2 > c;"
+ "\\U0001D5A3 > d;"
+ "\\U0001D5A4 > e;"
+ "\\U0001D5A5 > f;"
+ "\\U0001D5A6 > g;"
+ "\\U0001D5A7 > h;"
+ "\\U0001D5A8 > i;"
+ "\\U0001D5A9 > j;"
+ "\\U0001D5AA > k;"
+ "\\U0001D5AB > l;"
+ "\\U0001D5AC > m;"
+ "\\U0001D5AD > n;"
+ "\\U0001D5AE > o;"
+ "\\U0001D5AF > p;"
+ "\\U0001D5B0 > q;"
+ "\\U0001D5B1 > r;"
+ "\\U0001D5B2 > s;"
+ "\\U0001D5B3 > t;"
+ "\\U0001D5B4 > u;"
+ "\\U0001D5B5 > v;"
+ "\\U0001D5B6 > w;"
+ "\\U0001D5B7 > x;"
+ "\\U0001D5B8 > y;"
+ "\\U0001D5B9 > z;"
+ "\\U0001D5D4 > a;"
+ "\\U0001D5D5 > b;"
+ "\\U0001D5D6 > c;"
+ "\\U0001D5D7 > d;"
+ "\\U0001D5D8 > e;"
+ "\\U0001D5D9 > f;"
+ "\\U0001D5DA > g;"
+ "\\U0001D5DB > h;"
+ "\\U0001D5DC > i;"
+ "\\U0001D5DD > j;"
+ "\\U0001D5DE > k;"
+ "\\U0001D5DF > l;"
+ "\\U0001D5E0 > m;"
+ "\\U0001D5E1 > n;"
+ "\\U0001D5E2 > o;"
+ "\\U0001D5E3 > p;"
+ "\\U0001D5E4 > q;"
+ "\\U0001D5E5 > r;"
+ "\\U0001D5E6 > s;"
+ "\\U0001D5E7 > t;"
+ "\\U0001D5E8 > u;"
+ "\\U0001D5E9 > v;"
+ "\\U0001D5EA > w;"
+ "\\U0001D5EB > x;"
+ "\\U0001D5EC > y;"
+ "\\U0001D5ED > z;"
+ "\\U0001D608 > a;"
+ "\\U0001D609 > b;"
+ "\\U0001D60A > c;"
+ "\\U0001D60B > d;"
+ "\\U0001D60C > e;"
+ "\\U0001D60D > f;"
+ "\\U0001D60E > g;"
+ "\\U0001D60F > h;"
+ "\\U0001D610 > i;"
+ "\\U0001D611 > j;"
+ "\\U0001D612 > k;"
+ "\\U0001D613 > l;"
+ "\\U0001D614 > m;"
+ "\\U0001D615 > n;"
+ "\\U0001D616 > o;"
+ "\\U0001D617 > p;"
+ "\\U0001D618 > q;"
+ "\\U0001D619 > r;"
+ "\\U0001D61A > s;"
+ "\\U0001D61B > t;"
+ "\\U0001D61C > u;"
+ "\\U0001D61D > v;"
+ "\\U0001D61E > w;"
+ "\\U0001D61F > x;"
+ "\\U0001D620 > y;"
+ "\\U0001D621 > z;"
+ "\\U0001D63C > a;"
+ "\\U0001D63D > b;"
+ "\\U0001D63E > c;"
+ "\\U0001D63F > d;"
+ "\\U0001D640 > e;"
+ "\\U0001D641 > f;"
+ "\\U0001D642 > g;"
+ "\\U0001D643 > h;"
+ "\\U0001D644 > i;"
+ "\\U0001D645 > j;"
+ "\\U0001D646 > k;"
+ "\\U0001D647 > l;"
+ "\\U0001D648 > m;"
+ "\\U0001D649 > n;"
+ "\\U0001D64A > o;"
+ "\\U0001D64B > p;"
+ "\\U0001D64C > q;"
+ "\\U0001D64D > r;"
+ "\\U0001D64E > s;"
+ "\\U0001D64F > t;"
+ "\\U0001D650 > u;"
+ "\\U0001D651 > v;"
+ "\\U0001D652 > w;"
+ "\\U0001D653 > x;"
+ "\\U0001D654 > y;"
+ "\\U0001D655 > z;"
+ "\\U0001D670 > a;"
+ "\\U0001D671 > b;"
+ "\\U0001D672 > c;"
+ "\\U0001D673 > d;"
+ "\\U0001D674 > e;"
+ "\\U0001D675 > f;"
+ "\\U0001D676 > g;"
+ "\\U0001D677 > h;"
+ "\\U0001D678 > i;"
+ "\\U0001D679 > j;"
+ "\\U0001D67A > k;"
+ "\\U0001D67B > l;"
+ "\\U0001D67C > m;"
+ "\\U0001D67D > n;"
+ "\\U0001D67E > o;"
+ "\\U0001D67F > p;"
+ "\\U0001D680 > q;"
+ "\\U0001D681 > r;"
+ "\\U0001D682 > s;"
+ "\\U0001D683 > t;"
+ "\\U0001D684 > u;"
+ "\\U0001D685 > v;"
+ "\\U0001D686 > w;"
+ "\\U0001D687 > x;"
+ "\\U0001D688 > y;"
+ "\\U0001D689 > z;"
+ "\\U0001D6A8 > \\u03B1;"
+ "\\U0001D6A9 > \\u03B2;"
+ "\\U0001D6AA > \\u03B3;"
+ "\\U0001D6AB > \\u03B4;"
+ "\\U0001D6AC > \\u03B5;"
+ "\\U0001D6AD > \\u03B6;"
+ "\\U0001D6AE > \\u03B7;"
+ "\\U0001D6AF > \\u03B8;"
+ "\\U0001D6B0 > \\u03B9;"
+ "\\U0001D6B1 > \\u03BA;"
+ "\\U0001D6B2 > \\u03BB;"
+ "\\U0001D6B3 > \\u03BC;"
+ "\\U0001D6B4 > \\u03BD;"
+ "\\U0001D6B5 > \\u03BE;"
+ "\\U0001D6B6 > \\u03BF;"
+ "\\U0001D6B7 > \\u03C0;"
+ "\\U0001D6B8 > \\u03C1;"
+ "\\U0001D6B9 > \\u03B8;"
+ "\\U0001D6BA > \\u03C3;"
+ "\\U0001D6BB > \\u03C4;"
+ "\\U0001D6BC > \\u03C5;"
+ "\\U0001D6BD > \\u03C6;"
+ "\\U0001D6BE > \\u03C7;"
+ "\\U0001D6BF > \\u03C8;"
+ "\\U0001D6C0 > \\u03C9;"
+ "\\U0001D6D3 > \\u03C3;"
+ "\\U0001D6E2 > \\u03B1;"
+ "\\U0001D6E3 > \\u03B2;"
+ "\\U0001D6E4 > \\u03B3;"
+ "\\U0001D6E5 > \\u03B4;"
+ "\\U0001D6E6 > \\u03B5;"
+ "\\U0001D6E7 > \\u03B6;"
+ "\\U0001D6E8 > \\u03B7;"
+ "\\U0001D6E9 > \\u03B8;"
+ "\\U0001D6EA > \\u03B9;"
+ "\\U0001D6EB > \\u03BA;"
+ "\\U0001D6EC > \\u03BB;"
+ "\\U0001D6ED > \\u03BC;"
+ "\\U0001D6EE > \\u03BD;"
+ "\\U0001D6EF > \\u03BE;"
+ "\\U0001D6F0 > \\u03BF;"
+ "\\U0001D6F1 > \\u03C0;"
+ "\\U0001D6F2 > \\u03C1;"
+ "\\U0001D6F3 > \\u03B8;"
+ "\\U0001D6F4 > \\u03C3;"
+ "\\U0001D6F5 > \\u03C4;"
+ "\\U0001D6F6 > \\u03C5;"
+ "\\U0001D6F7 > \\u03C6;"
+ "\\U0001D6F8 > \\u03C7;"
+ "\\U0001D6F9 > \\u03C8;"
+ "\\U0001D6FA > \\u03C9;"
+ "\\U0001D70D > \\u03C3;"
+ "\\U0001D71C > \\u03B1;"
+ "\\U0001D71D > \\u03B2;"
+ "\\U0001D71E > \\u03B3;"
+ "\\U0001D71F > \\u03B4;"
+ "\\U0001D720 > \\u03B5;"
+ "\\U0001D721 > \\u03B6;"
+ "\\U0001D722 > \\u03B7;"
+ "\\U0001D723 > \\u03B8;"
+ "\\U0001D724 > \\u03B9;"
+ "\\U0001D725 > \\u03BA;"
+ "\\U0001D726 > \\u03BB;"
+ "\\U0001D727 > \\u03BC;"
+ "\\U0001D728 > \\u03BD;"
+ "\\U0001D729 > \\u03BE;"
+ "\\U0001D72A > \\u03BF;"
+ "\\U0001D72B > \\u03C0;"
+ "\\U0001D72C > \\u03C1;"
+ "\\U0001D72D > \\u03B8;"
+ "\\U0001D72E > \\u03C3;"
+ "\\U0001D72F > \\u03C4;"
+ "\\U0001D730 > \\u03C5;"
+ "\\U0001D731 > \\u03C6;"
+ "\\U0001D732 > \\u03C7;"
+ "\\U0001D733 > \\u03C8;"
+ "\\U0001D734 > \\u03C9;"
+ "\\U0001D747 > \\u03C3;"
+ "\\U0001D756 > \\u03B1;"
+ "\\U0001D757 > \\u03B2;"
+ "\\U0001D758 > \\u03B3;"
+ "\\U0001D759 > \\u03B4;"
+ "\\U0001D75A > \\u03B5;"
+ "\\U0001D75B > \\u03B6;"
+ "\\U0001D75C > \\u03B7;"
+ "\\U0001D75D > \\u03B8;"
+ "\\U0001D75E > \\u03B9;"
+ "\\U0001D75F > \\u03BA;"
+ "\\U0001D760 > \\u03BB;"
+ "\\U0001D761 > \\u03BC;"
+ "\\U0001D762 > \\u03BD;"
+ "\\U0001D763 > \\u03BE;"
+ "\\U0001D764 > \\u03BF;"
+ "\\U0001D765 > \\u03C0;"
+ "\\U0001D766 > \\u03C1;"
+ "\\U0001D767 > \\u03B8;"
+ "\\U0001D768 > \\u03C3;"
+ "\\U0001D769 > \\u03C4;"
+ "\\U0001D76A > \\u03C5;"
+ "\\U0001D76B > \\u03C6;"
+ "\\U0001D76C > \\u03C7;"
+ "\\U0001D76D > \\u03C8;"
+ "\\U0001D76E > \\u03C9;"
+ "\\U0001D781 > \\u03C3;"
+ "\\U0001D790 > \\u03B1;"
+ "\\U0001D791 > \\u03B2;"
+ "\\U0001D792 > \\u03B3;"
+ "\\U0001D793 > \\u03B4;"
+ "\\U0001D794 > \\u03B5;"
+ "\\U0001D795 > \\u03B6;"
+ "\\U0001D796 > \\u03B7;"
+ "\\U0001D797 > \\u03B8;"
+ "\\U0001D798 > \\u03B9;"
+ "\\U0001D799 > \\u03BA;"
+ "\\U0001D79A > \\u03BB;"
+ "\\U0001D79B > \\u03BC;"
+ "\\U0001D79C > \\u03BD;"
+ "\\U0001D79D > \\u03BE;"
+ "\\U0001D79E > \\u03BF;"
+ "\\U0001D79F > \\u03C0;"
+ "\\U0001D7A0 > \\u03C1;"
+ "\\U0001D7A1 > \\u03B8;"
+ "\\U0001D7A2 > \\u03C3;"
+ "\\U0001D7A3 > \\u03C4;"
+ "\\U0001D7A4 > \\u03C5;"
+ "\\U0001D7A5 > \\u03C6;"
+ "\\U0001D7A6 > \\u03C7;"
+ "\\U0001D7A7 > \\u03C8;"
+ "\\U0001D7A8 > \\u03C9;"
+ "\\U0001D7BB > \\u03C3;"
+ "\\U0002F868 > \\U0002136A;"
+ "\\U0002F874 > \\u5F33;"
+ "\\U0002F91F > \\u43AB;"
+ "\\U0002F95F > \\u7AAE;"
+ "\\U0002F9BF > \\u4D57;"
+ // generate the characters that are unaffected
+ "::[:AGE=3.2:]NFKC;"
+ }
+} \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/importtest.bin b/Build/source/libs/icu/icu-xetex/test/testdata/importtest.bin
new file mode 100644
index 00000000000..8fa2b2144d8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/importtest.bin
Binary files differ
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/iscii.bin b/Build/source/libs/icu/icu-xetex/test/testdata/iscii.bin
new file mode 100644
index 00000000000..88051f09455
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/iscii.bin
@@ -0,0 +1,19 @@
+//*******************************************************************************
+//*
+//*Copyright (C)1998-2006 International Business Machines
+//*Corporation and others.All Rights Reserved.
+//*
+//*******************************************************************************
+iscii:table(nofallback){
+ str{
+ " ï4ï3ÍÝï4ï3Æá×è³å .³á .¬³ .¤ÅèÍÍÆ .³á ¤ÆÝ×ÚÏ 1990 ³ ³¢ÈèÍÞ½Ï-ÈèÏÊ¢ÅÛ ×Þ¸ÆÚ"
+ "ÈèÏÁÚÑÜ .³á .ÍåµÄÚÆ .³á .ÉÑ×èÔÏÞÈ .ÔÛÕèÔ .Ìᢠ.×ÚÑÚÆÚ .2200 ¤ÏÊ ÏÝÈÍá ÌÞÑèÍ"
+ "³Ü .4Ô×èÂÝ°¢ .4³Ú .4¨ÂèÈÚÄÆ .4ØåµÚ, .3ºÊ³Û .3³¢ÈèÍÞ½Ï .3³Ú .3³ÝÑ .3ÍåµÄÚÆ .3¦××á"
+ "³ØÛ ./ºèÍÚÄÚ ./ØåµÚê ./¤ÆÝ×¢ÅÚÆ ./³Ü ./¸ÏÌ ×ÜÌÚ°¢ ÈÏ ÈØÝ¢¸Æá ³á ÑÛ¬ ³¢ÈèÍÞ½Ï"
+ "¬³ ./¥Ì ./ºÏÞÏ ./ºâ×Ú ÊÆ µÍÚ Øâê ËÚÏ ÌᢠËÜ, ´Ú×³Ï ÌæºÞÄÚ ×ϳÚÏ"
+ "Æá, ³¢ÈèÍÞ½Ï ³á ÈèÏÍåµ ÈÏ ºÊÏÄ×è ¬¿é ѵÚÍÜ Øâ, ³Û¢ÂÝ ¦×³á ×ÏȽ Äæ¿é"
+ "ѵÚÆá .2³á .2ÑÛ¬ .2³èÍÚ .2×ÈÚ½ .2ÏÚ×èÂÚ .2¨ÈÑÊèÅ .Øâ, .¤ÃÔÚ .ÔÛÕèÔ .Ìᢠ.³¢ÈèÍÞ½Ï .³Ü"
+ "×ÉÑÂÚ .3Ô .3ÔÛÉÑÂÚ .3×á .3×ʳ .3Ñá .3³Ï .3³èÍÚ .3ØÌ .3¦×³Ú .3ÍݳèÂÛÈÞÏèÁ .2ÔÛ×èÂÚÏ "
+ "¤Èá³èÖÛ ³Ï ׳ᢵá ? "
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/letest.xml b/Build/source/libs/icu/icu-xetex/test/testdata/letest.xml
new file mode 100644
index 00000000000..9df3918dc65
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/letest.xml
@@ -0,0 +1,1302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright (c) 1999-2008 International Business Machines
+ Corporation and others. All rights reserved.
+
+ WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT
+ UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
+
+ file name: letest.xml
+ generated on: 05/27/2008 12:57:14 PM Hawaiian Standard Time
+ generated by: gendata.cpp
+-->
+
+<layout-tests>
+ <test-case id="Ghita" script="deva">
+ <test-font name="raghu.ttf" version="Version 0.99" checksum="0x541C94C7"/>
+
+ <test-text>शà¥à¤°à¥€à¤®à¤¦à¥ भगवदà¥à¤—ीता अधà¥à¤¯à¤¾à¤¯ अरà¥à¤œà¥à¤¨ विषाद योग धृतराषà¥à¤Ÿà¥à¤° उवाचृ धरà¥à¤®à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ कà¥à¤°à¥à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ समवेता यà¥à¤¯à¥à¤¤à¥à¤¸à¤µà¤ƒ मामकाः पाणà¥à¤¡à¤µà¤¾à¤¶à¥à¤šà¥ˆà¤µ किमकà¥à¤°à¥à¤µà¤¤ संजव</test-text>
+
+ <result-glyphs>
+ 0x0000012E, 0x0000FFFF, 0x0000FFFF, 0x00000222, 0x00000098, 0x0000026E, 0x0000FFFF, 0x00000003,
+ 0x00000097, 0x00000082, 0x0000009D, 0x000001A5, 0x0000FFFF, 0x0000FFFF, 0x00000222, 0x0000008F,
+ 0x00000221, 0x00000003, 0x0000005C, 0x000000DA, 0x0000FFFF, 0x00000099, 0x00000221, 0x00000099,
+ 0x00000003, 0x0000005C, 0x00000087, 0x000001D5, 0x0000005B, 0x0000FFFF, 0x00000093, 0x00000003,
+ 0x000001D2, 0x0000009D, 0x0000009F, 0x00000221, 0x00000091, 0x00000003, 0x00000099, 0x0000022A,
+ 0x00000082, 0x00000003, 0x00000092, 0x000001D9, 0x0000008F, 0x0000009A, 0x00000221, 0x000001B6,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000060, 0x0000009D, 0x00000221,
+ 0x00000085, 0x000001D9, 0x00000003, 0x00000092, 0x00000098, 0x0000005B, 0x0000FFFF, 0x000000A2,
+ 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x0000011F, 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x00000003,
+ 0x00000080, 0x000001D5, 0x0000009A, 0x000001FD, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x0000022F,
+ 0x0000011F, 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x00000003, 0x000000A0, 0x00000098, 0x0000009D,
+ 0x0000022F, 0x0000008F, 0x00000221, 0x00000003, 0x00000099, 0x000001D5, 0x00000099, 0x000001D5,
+ 0x000000D7, 0x0000FFFF, 0x000000A0, 0x0000009D, 0x0000022C, 0x00000003, 0x00000098, 0x00000221,
+ 0x00000098, 0x00000080, 0x00000221, 0x0000022C, 0x00000003, 0x00000094, 0x00000221, 0x000000D6,
+ 0x0000FFFF, 0x0000008C, 0x0000009D, 0x00000221, 0x000001B1, 0x0000FFFF, 0x0000FFFF, 0x00000230,
+ 0x0000009D, 0x00000003, 0x000001D1, 0x00000080, 0x00000098, 0x00000080, 0x000001D5, 0x0000009D,
+ 0x0000005B, 0x0000FFFF, 0x0000008F, 0x00000003, 0x000000A0, 0x00000232, 0x00000087, 0x0000009D
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000002, 0x00000001, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017,
+ 0x00000018, 0x00000019, 0x0000001C, 0x0000001D, 0x0000001A, 0x0000001B, 0x0000001E, 0x0000001F,
+ 0x00000021, 0x00000020, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027,
+ 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F,
+ 0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037,
+ 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003E, 0x0000003C, 0x0000003D, 0x0000003F,
+ 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000045, 0x00000044, 0x00000046, 0x00000047,
+ 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F,
+ 0x00000050, 0x00000052, 0x00000051, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057,
+ 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F,
+ 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067,
+ 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F,
+ 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077,
+ 0x00000078, 0x00000079, 0x0000007B, 0x0000007A, 0x0000007C, 0x0000007D, 0x0000007E, 0x00000081,
+ 0x0000007F, 0x00000080, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 9.468750, 0.000000, 9.468750, 0.000000, 9.468750, 0.000000,
+ 13.125000, 0.000000, 22.593750, 0.000000, 30.562500, 0.000000, 30.562500, 0.000000,
+ 36.562500, 0.000000, 46.031250, 0.000000, 55.500000, 0.000000, 63.468750, 0.000000,
+ 71.437500, 0.000000, 71.437500, 0.000000, 71.437500, 0.000000, 75.093750, 0.000000,
+ 83.062500, 0.000000, 86.718750, 0.000000, 92.718750, 0.000000, 102.656250, 0.000000,
+ 109.921875, 0.000000, 109.921875, 0.000000, 119.390625, 0.000000, 123.046875, 0.000000,
+ 132.515625, 0.000000, 138.515625, 0.000000, 148.453125, 0.000000, 158.203125, -0.011719,
+ 158.203125, 0.263672, 157.921875, 0.000000, 157.921875, 0.000000, 167.390625, 0.000000,
+ 173.390625, 0.000000, 177.750000, 0.000000, 185.718750, 0.000000, 193.687500, 0.000000,
+ 197.343750, 0.000000, 205.312500, 0.000000, 211.312500, 0.000000, 220.781250, 0.000000,
+ 224.859375, 0.000000, 234.328125, 0.000000, 240.328125, 0.000000, 250.224609, -0.011719,
+ 249.796875, 0.000000, 257.765625, 0.000000, 264.281250, 0.000000, 267.937500, 0.000000,
+ 276.281250, 0.000000, 276.281250, 0.000000, 276.281250, 0.000000, 276.281250, 0.000000,
+ 276.281250, 0.000000, 282.281250, 0.000000, 290.250000, 0.000000, 298.218750, 0.000000,
+ 301.875000, 0.000000, 311.859375, -0.011719, 311.343750, 0.000000, 317.343750, 0.000000,
+ 326.812500, 0.000000, 336.644531, 0.263672, 336.281250, 0.000000, 336.281250, 0.000000,
+ 347.156250, 0.000000, 347.156250, 0.000000, 346.353516, 0.275391, 347.156250, 0.000000,
+ 355.125000, 0.000000, 355.125000, 0.000000, 355.263672, 0.263672, 355.125000, 0.000000,
+ 361.125000, 0.000000, 368.824219, -0.011719, 372.000000, 0.000000, 378.515625, 0.000000,
+ 379.875000, 0.000000, 390.750000, 0.000000, 390.750000, 0.000000, 389.947266, 0.275391,
+ 390.750000, 0.000000, 398.718750, 0.000000, 398.718750, 0.000000, 398.857422, 0.263672,
+ 398.718750, 0.000000, 404.718750, 0.000000, 414.187500, 0.000000, 423.656250, 0.000000,
+ 430.769531, 0.263672, 431.625000, 0.000000, 439.593750, 0.000000, 443.250000, 0.000000,
+ 449.250000, 0.000000, 458.859375, -0.011719, 458.718750, 0.000000, 468.328125, -0.011719,
+ 468.187500, 0.000000, 474.117188, 0.000000, 474.117188, 0.000000, 483.585938, 0.000000,
+ 491.554688, 0.000000, 495.914063, 0.000000, 501.914063, 0.000000, 511.382813, 0.000000,
+ 515.039063, 0.000000, 524.507813, 0.000000, 535.382813, 0.000000, 539.039063, 0.000000,
+ 543.398438, 0.000000, 549.398438, 0.000000, 557.367188, 0.000000, 561.023438, 0.000000,
+ 568.289063, 0.000000, 568.289063, 0.000000, 576.257813, 0.000000, 584.226563, 0.000000,
+ 587.882813, 0.000000, 598.757813, 0.000000, 598.757813, 0.000000, 598.628906, 0.263672,
+ 598.757813, 0.000000, 606.726563, 0.000000, 612.726563, 0.000000, 617.085938, 0.000000,
+ 627.960938, 0.000000, 637.429688, 0.000000, 645.128906, -0.011719, 648.304688, 0.000000,
+ 656.566406, 0.263672, 656.273438, 0.000000, 656.273438, 0.000000, 664.242188, 0.000000,
+ 670.242188, 0.000000, 679.429688, 0.966797, 679.710938, 0.000000, 689.179688, 0.000000,
+ 697.148438, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Arabic" script="arab">
+ <test-font name="CODE2000.TTF" version="Version 1.16" checksum="0xBF2E2577"/>
+
+ <test-text>أساسًا، تتعامل الحواسيب Ùقط مع الأرقام، وتقوم بتخزين الأحر٠والمحار٠الأخرى بعد أن تÙعطي رقما معينا لكل واحد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمحارÙØŒ ولم يوجد نظام تشÙير واحد يحتوي على جميع المحار٠الضرورية</test-text>
+
+ <result-glyphs>
+ 0x0000C741, 0x0000C7A0, 0x0000C75A, 0x0000C79A, 0x0000C75B, 0x0000C76D, 0x0000C78C, 0x0000C73A,
+ 0x00000003, 0x0000C77E, 0x0000C75A, 0x0000C73B, 0x0000C751, 0x0000C791, 0x0000C78C, 0x0000C73A,
+ 0x00000003, 0x0000C777, 0x0000C7A1, 0x0000C791, 0x0000C74C, 0x00000003, 0x0000C79D, 0x0000C78D,
+ 0x0000C778, 0x00000003, 0x0000C79E, 0x0000C79B, 0x0000C745, 0x0000C751, 0x0000C7A0, 0x00000003,
+ 0x0000C757, 0x0000C750, 0x0000C73A, 0x0000C79A, 0x00000003, 0x0000C75B, 0x0000C7A1, 0x0000C781,
+ 0x0000C765, 0x0000C744, 0x00000003, 0x0000C78E, 0x0000C73B, 0x0000C775, 0x0000C794, 0x00000003,
+ 0x0000C757, 0x0000C74C, 0x0000C79B, 0x0000C7A0, 0x00000003, 0x0000C78F, 0x0000C78C, 0x0000C79A,
+ 0x00000003, 0x00000570, 0x0000C77E, 0x0000C75A, 0x0000C73B, 0x0000C751, 0x0000C791, 0x0000C78D,
+ 0x0000C78C, 0x00000003, 0x0000C78E, 0x0000C73B, 0x0000C784, 0x0000C75A, 0x0000FFFE, 0x0000C7A4,
+ 0x0000C73A, 0x00000003, 0x0000C796, 0x0000C759, 0x0000C798, 0x00000003, 0x0000C767, 0x0000C7A1,
+ 0x0000C769, 0x0000C755, 0x0000C744, 0x0000C79A, 0x00000003, 0x0000C75B, 0x0000C7A1, 0x0000C781,
+ 0x0000C765, 0x0000C745, 0x0000C78D, 0x0000C78C, 0x00000003, 0x0000C741, 0x0000C791, 0x0000C775,
+ 0x0000C794, 0x0000FFFE, 0x0000C7A4, 0x0000C73A, 0x00000003, 0x0000C742, 0x0000C73B, 0x00000578,
+ 0x0000C790, 0x00000003, 0x0000C786, 0x0000C73B, 0x0000C795, 0x0000C798, 0x00000003, 0x0000C792,
+ 0x0000C73B, 0x0000C788, 0x00000003, 0x00000570, 0x00000005, 0x0000C756, 0x0000C79B, 0x0000C789,
+ 0x0000059D, 0x0000C794, 0x0000C79B, 0x0000C7A0, 0x00000005, 0x00000003, 0x0000C776, 0x0000C73A,
+ 0x0000C75B, 0x0000C745, 0x0000C754, 0x0000C73A, 0x00000003, 0x0000C78B, 0x0000C73F, 0x0000C784,
+ 0x0000C79A, 0x00000003, 0x00000011, 0x0000C73B, 0x0000C799, 0x0000C795, 0x0000C790, 0x00000003,
+ 0x0000C757, 0x0000C750, 0x0000C73A, 0x0000C79A, 0x00000003, 0x0000C78B, 0x0000C789, 0x0000C78C,
+ 0x00000003, 0x0000C73B, 0x0000C795, 0x0000C7A1, 0x0000C779, 0x0000C790, 0x00000003, 0x0000C73B,
+ 0x0000C791, 0x0000C784, 0x0000C75A, 0x00000003, 0x0000C79F, 0x0000C771, 0x0000C779, 0x0000059C,
+ 0x0000C744, 0x00000003, 0x0000C792, 0x0000C730, 0x00000003, 0x0000C757, 0x0000C779, 0x0000C73E,
+ 0x00000003, 0x0000C79C, 0x0000C75B, 0x0000C754, 0x0000FFFE, 0x0000C7A4, 0x0000C73A, 0x00000003,
+ 0x0000C77E, 0x0000C75A, 0x0000C73B, 0x0000C751, 0x0000C791, 0x0000C78C, 0x0000C73A, 0x0000C79A,
+ 0x00000003, 0x0000C77E, 0x0000C75B, 0x0000C750, 0x0000FFFE, 0x0000C7A4, 0x0000C73A, 0x00000003,
+ 0x0000C793, 0x0000C7A0, 0x0000C75D, 0x0000C755, 0x0000C745, 0x0000C73E, 0x00000003, 0x0000C78E,
+ 0x0000C79B, 0x0000C785, 0x0000C744, 0x0000C79A, 0x00000003, 0x00000570, 0x0000C78E, 0x0000C73B,
+ 0x0000C784, 0x0000C75A, 0x0000FFFE, 0x0000C7A4, 0x0000C73A, 0x00000003, 0x0000C777, 0x0000C790,
+ 0x00000003, 0x0000C76F, 0x0000C785, 0x0000C780, 0x00000003, 0x0000C73D, 0x0000C7A1, 0x0000C760,
+ 0x0000C73A, 0x0000C79B, 0x0000C751, 0x0000C78C, 0x0000C73A, 0x00000003, 0x0000C78B, 0x0000C790,
+ 0x0000C73B, 0x0000C779, 0x0000C745, 0x0000C744, 0x00000003, 0x00000570, 0x0000C73B, 0x00000598,
+ 0x0000C760, 0x0000C73B, 0x0000C760, 0x0000C730
+ </result-glyphs>
+
+ <result-indices>
+ 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4,
+ 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC,
+ 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4,
+ 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC,
+ 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4,
+ 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC,
+ 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4,
+ 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC,
+ 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4,
+ 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC,
+ 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4,
+ 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C,
+ 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094,
+ 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C,
+ 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084,
+ 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C,
+ 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074,
+ 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C,
+ 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064,
+ 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C,
+ 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054,
+ 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C,
+ 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044,
+ 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C,
+ 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034,
+ 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C,
+ 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024,
+ 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C,
+ 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014,
+ 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C,
+ 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004,
+ 0x00000003, 0x00000002, 0x00000001, 0x00000000
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 4.007813, 0.000000, 8.226563, 0.000000, 12.679688, 0.000000,
+ 18.679688, 0.000000, 23.132813, 0.000000, 31.289063, 0.000000, 34.312500, 0.000000,
+ 36.375000, 0.000000, 41.062500, 0.000000, 50.296875, 0.000000, 54.750000, 0.000000,
+ 56.859375, 0.000000, 62.367188, 0.000000, 66.632813, 0.000000, 69.656250, 0.000000,
+ 71.718750, 0.000000, 76.406250, 0.000000, 81.421875, 0.000000, 85.664063, 0.000000,
+ 89.929688, 0.000000, 95.742188, 0.000000, 100.429688, 0.000000, 108.796875, 0.000000,
+ 112.171875, 0.000000, 115.734375, 0.000000, 120.421875, 0.000000, 128.765625, 0.000000,
+ 134.765625, 0.000000, 139.007813, 0.000000, 144.515625, 0.000000, 148.734375, 0.000000,
+ 153.421875, 0.000000, 157.359375, 0.000000, 163.171875, 0.000000, 165.234375, 0.000000,
+ 171.234375, 0.000000, 175.921875, 0.000000, 180.375000, 0.000000, 184.617188, 0.000000,
+ 188.085938, 0.000000, 195.117188, 0.000000, 199.312500, 0.000000, 204.000000, 0.000000,
+ 208.007813, 0.000000, 210.117188, 0.000000, 217.054688, 0.000000, 220.429688, 0.000000,
+ 225.117188, 0.000000, 229.054688, 0.000000, 234.867188, 0.000000, 240.867188, 0.000000,
+ 245.085938, 0.000000, 249.773438, 0.000000, 253.781250, 0.000000, 256.804688, 0.000000,
+ 262.804688, 0.000000, 267.492188, 0.000000, 271.007813, 0.000000, 280.242188, 0.000000,
+ 284.695313, 0.000000, 286.804688, 0.000000, 292.312500, 0.000000, 296.578125, 0.000000,
+ 299.953125, 0.000000, 302.976563, 0.000000, 307.664063, 0.000000, 311.671875, 0.000000,
+ 313.781250, 0.000000, 317.882813, 0.000000, 322.335938, 0.000000, 322.335938, 0.000000,
+ 328.500000, 0.000000, 330.562500, 0.000000, 335.250000, 0.000000, 339.140625, 0.000000,
+ 343.078125, 0.000000, 348.984375, 0.000000, 353.671875, 0.000000, 366.445313, 0.000000,
+ 370.687500, 0.000000, 378.843750, 0.000000, 384.351563, 0.000000, 388.546875, 0.000000,
+ 394.546875, 0.000000, 399.234375, 0.000000, 403.687500, 0.000000, 407.929688, 0.000000,
+ 411.398438, 0.000000, 418.429688, 0.000000, 422.671875, 0.000000, 426.046875, 0.000000,
+ 429.070313, 0.000000, 433.757813, 0.000000, 437.765625, 0.000000, 442.031250, 0.000000,
+ 448.968750, 0.000000, 452.343750, 0.000000, 452.343750, 0.000000, 458.507813, 0.000000,
+ 460.570313, 0.000000, 465.257813, 0.000000, 474.492188, 0.000000, 476.601563, 0.000000,
+ 484.968750, 0.000000, 489.234375, 0.000000, 493.921875, 0.000000, 501.562500, 0.000000,
+ 503.671875, 0.000000, 507.890625, 0.000000, 513.796875, 0.000000, 518.484375, 0.000000,
+ 525.796875, 0.000000, 527.906250, 0.000000, 533.578125, 0.000000, 538.265625, 0.000000,
+ 541.781250, 0.000000, 547.171875, 0.000000, 550.710938, 0.000000, 556.710938, 0.000000,
+ 564.492188, 0.000000, 564.492188, 0.000000, 567.867188, 0.000000, 573.867188, 0.000000,
+ 578.085938, 0.000000, 583.476563, 0.000000, 588.164063, 0.000000, 593.976563, 0.000000,
+ 596.039063, 0.000000, 600.492188, 0.000000, 604.734375, 0.000000, 610.546875, 0.000000,
+ 612.609375, 0.000000, 617.296875, 0.000000, 623.695313, 0.000000, 627.937500, 0.000000,
+ 632.039063, 0.000000, 638.039063, 0.000000, 642.726563, 0.000000, 646.054688, 0.000000,
+ 648.164063, 0.000000, 651.914063, 0.000000, 656.132813, 0.000000, 660.398438, 0.000000,
+ 665.085938, 0.000000, 669.023438, 0.000000, 674.835938, 0.000000, 676.898438, 0.000000,
+ 682.898438, 0.000000, 687.585938, 0.000000, 693.984375, 0.000000, 701.765625, 0.000000,
+ 704.789063, 0.000000, 709.476563, 0.000000, 711.585938, 0.000000, 715.804688, 0.000000,
+ 720.046875, 0.000000, 723.515625, 0.000000, 727.781250, 0.000000, 732.468750, 0.000000,
+ 734.578125, 0.000000, 738.843750, 0.000000, 742.945313, 0.000000, 747.398438, 0.000000,
+ 752.085938, 0.000000, 760.453125, 0.000000, 767.390625, 0.000000, 770.859375, 0.000000,
+ 770.859375, 0.000000, 775.054688, 0.000000, 779.742188, 0.000000, 787.054688, 0.000000,
+ 789.398438, 0.000000, 794.085938, 0.000000, 798.023438, 0.000000, 801.492188, 0.000000,
+ 804.937500, 0.000000, 809.625000, 0.000000, 817.968750, 0.000000, 822.421875, 0.000000,
+ 828.234375, 0.000000, 828.234375, 0.000000, 834.398438, 0.000000, 836.460938, 0.000000,
+ 841.148438, 0.000000, 850.382813, 0.000000, 854.835938, 0.000000, 856.945313, 0.000000,
+ 862.453125, 0.000000, 866.718750, 0.000000, 869.742188, 0.000000, 871.804688, 0.000000,
+ 877.804688, 0.000000, 882.492188, 0.000000, 891.726563, 0.000000, 896.179688, 0.000000,
+ 901.992188, 0.000000, 901.992188, 0.000000, 908.156250, 0.000000, 910.218750, 0.000000,
+ 914.906250, 0.000000, 922.382813, 0.000000, 926.601563, 0.000000, 931.054688, 0.000000,
+ 936.562500, 0.000000, 940.804688, 0.000000, 944.250000, 0.000000, 948.937500, 0.000000,
+ 952.945313, 0.000000, 958.945313, 0.000000, 962.414063, 0.000000, 966.609375, 0.000000,
+ 972.609375, 0.000000, 977.296875, 0.000000, 980.812500, 0.000000, 984.820313, 0.000000,
+ 986.929688, 0.000000, 991.031250, 0.000000, 995.484375, 0.000000, 995.484375, 0.000000,
+ 1001.648438, 0.000000, 1003.710938, 0.000000, 1008.398438, 0.000000, 1013.414063, 0.000000,
+ 1017.679688, 0.000000, 1022.367188, 0.000000, 1030.312500, 0.000000, 1033.781250, 0.000000,
+ 1037.882813, 0.000000, 1042.570313, 0.000000, 1051.921875, 0.000000, 1056.164063, 0.000000,
+ 1062.984375, 0.000000, 1065.046875, 0.000000, 1071.046875, 0.000000, 1076.554688, 0.000000,
+ 1079.578125, 0.000000, 1081.640625, 0.000000, 1086.328125, 0.000000, 1092.726563, 0.000000,
+ 1096.992188, 0.000000, 1099.101563, 0.000000, 1102.570313, 0.000000, 1106.812500, 0.000000,
+ 1111.007813, 0.000000, 1115.695313, 0.000000, 1119.210938, 0.000000, 1121.320313, 0.000000,
+ 1121.320313, 0.000000, 1128.140625, 0.000000, 1130.250000, 0.000000, 1137.070313, 0.000000,
+ 1139.414063, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Unicode Arabic" script="arab">
+ <test-font name="LucidaSansRegular.ttf" version="Version 1.20 - October 2000" checksum="0xF5D9BA6D"/>
+
+ <test-text>أساسًا، تتعامل الحواسيب Ùقط مع الأرقام، وتقوم بتخزين الأحر٠والمحار٠الأخرى بعد أن تÙعطي رقما معينا لكل واحد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمحارÙØŒ ولم يوجد نظام تشÙير واحد يحتوي على جميع المحار٠الضرورية</test-text>
+
+ <result-glyphs>
+ 0x00000872, 0x000008D1, 0x000003F9, 0x0000040B, 0x0000088C, 0x0000089E, 0x000008BD, 0x000003EF,
+ 0x00000003, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF,
+ 0x00000003, 0x000008A8, 0x000008D2, 0x000008C2, 0x0000087D, 0x00000003, 0x000008CE, 0x000008BE,
+ 0x000008A9, 0x00000003, 0x0000040D, 0x000008CC, 0x00000876, 0x00000882, 0x000008D1, 0x00000003,
+ 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2,
+ 0x00000896, 0x00000875, 0x00000003, 0x00000408, 0x0000086C, 0x000008A6, 0x000008C5, 0x00000003,
+ 0x00000888, 0x0000087D, 0x000008CC, 0x000008D1, 0x00000003, 0x000008C0, 0x000008BD, 0x0000040B,
+ 0x00000003, 0x000003E6, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BE,
+ 0x000008BD, 0x00000003, 0x00000408, 0x0000086C, 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5,
+ 0x000003EF, 0x00000003, 0x0000040A, 0x0000088A, 0x000008C9, 0x00000003, 0x00000898, 0x000008D2,
+ 0x0000089A, 0x00000886, 0x00000875, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2,
+ 0x00000896, 0x00000876, 0x000008BE, 0x000008BD, 0x00000003, 0x00000872, 0x000008C2, 0x000008A6,
+ 0x000008C5, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000003F2, 0x0000086C, 0x0000086A,
+ 0x000008C1, 0x00000003, 0x00000406, 0x0000086C, 0x000008C6, 0x000008C9, 0x00000003, 0x00000409,
+ 0x0000086C, 0x000008B9, 0x00000003, 0x000003E6, 0x00000005, 0x000003F7, 0x000008CC, 0x000008BA,
+ 0x00000413, 0x000008C5, 0x000008CC, 0x000008D1, 0x00000005, 0x00000003, 0x00000401, 0x000003EF,
+ 0x0000088C, 0x00000876, 0x00000885, 0x000003EF, 0x00000003, 0x000008BC, 0x00000870, 0x000008B5,
+ 0x0000040B, 0x00000003, 0x00000011, 0x0000086C, 0x000008CA, 0x000008C6, 0x000008C1, 0x00000003,
+ 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x000008BC, 0x000008BA, 0x000008BD,
+ 0x00000003, 0x0000086C, 0x000008C6, 0x000008D2, 0x000008AA, 0x000008C1, 0x00000003, 0x0000086C,
+ 0x000008C2, 0x000008B5, 0x000003F9, 0x00000003, 0x000008D0, 0x000008A2, 0x000008AA, 0x00000412,
+ 0x00000875, 0x00000003, 0x00000409, 0x000003EB, 0x00000003, 0x00000888, 0x000008AA, 0x0000086F,
+ 0x00000003, 0x0000040C, 0x0000088C, 0x00000885, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003,
+ 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, 0x0000040B,
+ 0x00000003, 0x00000404, 0x0000088C, 0x00000881, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003,
+ 0x000008C4, 0x000008D1, 0x0000088E, 0x00000886, 0x00000876, 0x0000086F, 0x00000003, 0x00000408,
+ 0x000008CC, 0x000008B6, 0x00000875, 0x0000040B, 0x00000003, 0x000003E6, 0x00000408, 0x0000086C,
+ 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000008A8, 0x000008C1,
+ 0x00000003, 0x000008A0, 0x000008B6, 0x000008B1, 0x00000003, 0x0000086E, 0x000008D2, 0x00000891,
+ 0x000003EF, 0x000008CC, 0x00000882, 0x000008BD, 0x000003EF, 0x00000003, 0x000008BC, 0x000008C1,
+ 0x0000086C, 0x000008AA, 0x00000876, 0x00000875, 0x00000003, 0x000003E6, 0x0000086C, 0x0000040E,
+ 0x00000891, 0x0000086C, 0x00000891, 0x000003EB
+ </result-glyphs>
+
+ <result-indices>
+ 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4,
+ 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC,
+ 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4,
+ 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC,
+ 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4,
+ 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC,
+ 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4,
+ 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC,
+ 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4,
+ 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC,
+ 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4,
+ 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C,
+ 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094,
+ 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C,
+ 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084,
+ 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C,
+ 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074,
+ 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C,
+ 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064,
+ 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C,
+ 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054,
+ 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C,
+ 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044,
+ 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C,
+ 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034,
+ 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C,
+ 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024,
+ 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C,
+ 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014,
+ 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C,
+ 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004,
+ 0x00000003, 0x00000002, 0x00000001, 0x00000000
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 6.316406, 0.000000, 10.382813, 0.000000, 15.492188, 0.000000,
+ 21.035156, 0.000000, 27.058594, 0.000000, 39.527344, 0.000000, 43.792969, 0.000000,
+ 47.408203, 0.000000, 51.205078, 0.000000, 66.216797, 0.000000, 71.326172, 0.000000,
+ 74.695313, 0.000000, 83.367188, 0.000000, 90.826172, 0.000000, 95.091797, 0.000000,
+ 98.707031, 0.000000, 102.503906, 0.000000, 109.962891, 0.000000, 114.949219, 0.000000,
+ 122.408203, 0.000000, 130.687500, 0.000000, 134.484375, 0.000000, 145.787109, 0.000000,
+ 150.773438, 0.000000, 156.884766, 0.000000, 160.681641, 0.000000, 172.277344, 0.000000,
+ 177.919922, 0.000000, 182.906250, 0.000000, 191.578125, 0.000000, 195.644531, 0.000000,
+ 199.441406, 0.000000, 206.507813, 0.000000, 214.787109, 0.000000, 218.402344, 0.000000,
+ 223.945313, 0.000000, 227.742188, 0.000000, 233.765625, 0.000000, 238.751953, 0.000000,
+ 245.185547, 0.000000, 257.982422, 0.000000, 262.048828, 0.000000, 265.845703, 0.000000,
+ 272.654297, 0.000000, 276.023438, 0.000000, 285.240234, 0.000000, 289.306641, 0.000000,
+ 293.103516, 0.000000, 300.169922, 0.000000, 308.449219, 0.000000, 314.091797, 0.000000,
+ 318.158203, 0.000000, 321.955078, 0.000000, 329.572266, 0.000000, 333.837891, 0.000000,
+ 339.380859, 0.000000, 343.177734, 0.000000, 346.974609, 0.000000, 361.986328, 0.000000,
+ 367.095703, 0.000000, 370.464844, 0.000000, 379.136719, 0.000000, 386.595703, 0.000000,
+ 391.582031, 0.000000, 395.847656, 0.000000, 399.644531, 0.000000, 406.453125, 0.000000,
+ 409.822266, 0.000000, 415.523438, 0.000000, 420.632813, 0.000000, 420.632813, 0.000000,
+ 427.441406, 0.000000, 431.056641, 0.000000, 434.853516, 0.000000, 441.357422, 0.000000,
+ 448.423828, 0.000000, 455.912109, 0.000000, 459.708984, 0.000000, 479.255859, 0.000000,
+ 484.242188, 0.000000, 496.710938, 0.000000, 505.382813, 0.000000, 509.449219, 0.000000,
+ 514.992188, 0.000000, 518.789063, 0.000000, 524.812500, 0.000000, 529.798828, 0.000000,
+ 536.232422, 0.000000, 549.029297, 0.000000, 554.015625, 0.000000, 559.001953, 0.000000,
+ 563.267578, 0.000000, 567.064453, 0.000000, 573.380859, 0.000000, 580.839844, 0.000000,
+ 590.056641, 0.000000, 594.123047, 0.000000, 594.123047, 0.000000, 600.931641, 0.000000,
+ 604.546875, 0.000000, 608.343750, 0.000000, 620.636719, 0.000000, 624.005859, 0.000000,
+ 628.992188, 0.000000, 635.830078, 0.000000, 639.626953, 0.000000, 653.361328, 0.000000,
+ 656.730469, 0.000000, 661.716797, 0.000000, 669.205078, 0.000000, 673.001953, 0.000000,
+ 683.777344, 0.000000, 687.146484, 0.000000, 692.660156, 0.000000, 696.457031, 0.000000,
+ 700.253906, 0.000000, 704.736328, 0.000000, 711.105469, 0.000000, 716.748047, 0.000000,
+ 722.994141, 0.000000, 722.994141, 0.000000, 727.060547, 0.000000, 732.703125, 0.000000,
+ 736.769531, 0.000000, 741.251953, 0.000000, 745.048828, 0.000000, 752.507813, 0.000000,
+ 756.123047, 0.000000, 762.146484, 0.000000, 767.132813, 0.000000, 775.412109, 0.000000,
+ 779.027344, 0.000000, 782.824219, 0.000000, 794.203125, 0.000000, 799.189453, 0.000000,
+ 804.890625, 0.000000, 810.433594, 0.000000, 814.230469, 0.000000, 818.027344, 0.000000,
+ 821.396484, 0.000000, 828.128906, 0.000000, 833.115234, 0.000000, 839.953125, 0.000000,
+ 843.750000, 0.000000, 850.816406, 0.000000, 859.095703, 0.000000, 862.710938, 0.000000,
+ 868.253906, 0.000000, 872.050781, 0.000000, 883.429688, 0.000000, 889.675781, 0.000000,
+ 893.941406, 0.000000, 897.738281, 0.000000, 901.107422, 0.000000, 906.093750, 0.000000,
+ 911.080078, 0.000000, 917.800781, 0.000000, 924.638672, 0.000000, 928.435547, 0.000000,
+ 931.804688, 0.000000, 939.263672, 0.000000, 944.964844, 0.000000, 950.074219, 0.000000,
+ 953.871094, 0.000000, 965.173828, 0.000000, 974.390625, 0.000000, 981.111328, 0.000000,
+ 981.111328, 0.000000, 985.177734, 0.000000, 988.974609, 0.000000, 999.750000, 0.000000,
+ 1003.365234, 0.000000, 1007.162109, 0.000000, 1014.228516, 0.000000, 1020.949219, 0.000000,
+ 1025.015625, 0.000000, 1028.812500, 0.000000, 1040.408203, 0.000000, 1046.431641, 0.000000,
+ 1054.710938, 0.000000, 1054.710938, 0.000000, 1061.519531, 0.000000, 1065.134766, 0.000000,
+ 1068.931641, 0.000000, 1083.943359, 0.000000, 1089.052734, 0.000000, 1092.421875, 0.000000,
+ 1101.093750, 0.000000, 1108.552734, 0.000000, 1112.818359, 0.000000, 1116.433594, 0.000000,
+ 1121.976563, 0.000000, 1125.773438, 0.000000, 1140.785156, 0.000000, 1146.808594, 0.000000,
+ 1155.087891, 0.000000, 1155.087891, 0.000000, 1161.896484, 0.000000, 1165.511719, 0.000000,
+ 1169.308594, 0.000000, 1180.541016, 0.000000, 1184.607422, 0.000000, 1190.630859, 0.000000,
+ 1199.302734, 0.000000, 1204.289063, 0.000000, 1208.355469, 0.000000, 1212.152344, 0.000000,
+ 1218.960938, 0.000000, 1224.603516, 0.000000, 1231.037109, 0.000000, 1235.103516, 0.000000,
+ 1240.646484, 0.000000, 1244.443359, 0.000000, 1248.240234, 0.000000, 1255.048828, 0.000000,
+ 1258.417969, 0.000000, 1264.119141, 0.000000, 1269.228516, 0.000000, 1269.228516, 0.000000,
+ 1276.037109, 0.000000, 1279.652344, 0.000000, 1283.449219, 0.000000, 1290.908203, 0.000000,
+ 1297.746094, 0.000000, 1301.542969, 0.000000, 1311.427734, 0.000000, 1317.861328, 0.000000,
+ 1323.562500, 0.000000, 1327.359375, 0.000000, 1341.492188, 0.000000, 1346.478516, 0.000000,
+ 1357.904297, 0.000000, 1361.519531, 0.000000, 1367.162109, 0.000000, 1375.833984, 0.000000,
+ 1380.099609, 0.000000, 1383.714844, 0.000000, 1387.511719, 0.000000, 1398.890625, 0.000000,
+ 1405.728516, 0.000000, 1409.097656, 0.000000, 1415.818359, 0.000000, 1420.804688, 0.000000,
+ 1424.871094, 0.000000, 1428.667969, 0.000000, 1432.464844, 0.000000, 1435.833984, 0.000000,
+ 1435.833984, 0.000000, 1447.259766, 0.000000, 1450.628906, 0.000000, 1462.054688, 0.000000,
+ 1465.669922, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Thai" script="thai">
+ <test-font name="angsd___.ttf" version="Version 2.1 - July 1995" checksum="0x49B67200"/>
+
+ <test-text>บทที่๑พายุไซโคลนโดโรธีอาศัยอยู่ท่ามà¸à¸¥à¸²à¸‡à¸—ุ่งใหà¸à¹ˆà¹ƒà¸™à¹à¸„นซัสà¸à¸±à¸šà¸¥à¸¸à¸‡à¹€à¸®à¸™à¸£à¸µà¸Šà¸²à¸§à¹„ร่à¹à¸¥à¸°à¸›à¹‰à¸²à¹€à¸­à¹‡à¸¡à¸ à¸£à¸£à¸¢à¸²à¸Šà¸²à¸§à¹„ร่บ้านของพวà¸à¹€à¸‚าหลังเล็à¸à¹€à¸žà¸£à¸²à¸°à¹„ม้สร้างบ้านต้องขนมาด้วยเà¸à¸§à¸µà¸¢à¸™à¹€à¸›à¹‡à¸™à¸£à¸°à¸¢à¸°à¸—างหลายไมล์</test-text>
+
+ <result-glyphs>
+ 0x000000F3, 0x000000F0, 0x000000F0, 0x0000010E, 0x0000011D, 0x00000126, 0x000000F7, 0x0000010B,
+ 0x000000FB, 0x00000111, 0x00000119, 0x000000E4, 0x00000117, 0x000000DD, 0x000000FE, 0x000000F2,
+ 0x00000117, 0x000000ED, 0x00000117, 0x000000FC, 0x000000F1, 0x0000010E, 0x00000106, 0x0000010B,
+ 0x00000101, 0x0000010A, 0x000000FB, 0x00000106, 0x000000FB, 0x00000112, 0x0000013B, 0x000000F0,
+ 0x0000013B, 0x0000010B, 0x000000FA, 0x000000DA, 0x000000FE, 0x0000010B, 0x000000E0, 0x000000F0,
+ 0x00000111, 0x0000013B, 0x000000E0, 0x00000118, 0x00000104, 0x000000E6, 0x0000013B, 0x00000118,
+ 0x000000F2, 0x00000116, 0x000000DD, 0x000000F2, 0x000000E4, 0x0000010A, 0x00000103, 0x000000DA,
+ 0x0000010A, 0x000000F3, 0x000000FE, 0x00000111, 0x000000E0, 0x00000115, 0x00000107, 0x000000F2,
+ 0x000000FC, 0x0000010E, 0x000000E3, 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B,
+ 0x00000116, 0x000000FE, 0x00000109, 0x000000F4, 0x00000137, 0x0000010B, 0x00000115, 0x00000106,
+ 0x0000011C, 0x000000FA, 0x000000F9, 0x000000FC, 0x000000FC, 0x000000FB, 0x0000010B, 0x000000E3,
+ 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B, 0x000000F3, 0x0000013C, 0x0000010B,
+ 0x000000F2, 0x000000DB, 0x00000106, 0x000000E0, 0x000000F7, 0x00000100, 0x000000DA, 0x00000115,
+ 0x000000DB, 0x0000010B, 0x00000104, 0x000000FE, 0x0000010A, 0x000000E0, 0x00000115, 0x000000FE,
+ 0x0000011C, 0x000000DA, 0x00000115, 0x000000F7, 0x000000FC, 0x0000010B, 0x00000109, 0x00000119,
+ 0x000000FA, 0x0000013C, 0x00000103, 0x000000FC, 0x0000013C, 0x0000010B, 0x000000E0, 0x000000F3,
+ 0x0000013C, 0x0000010B, 0x000000F2, 0x000000EE, 0x0000013C, 0x00000106, 0x000000E0, 0x000000DB,
+ 0x000000F2, 0x000000FA, 0x0000010B, 0x000000ED, 0x0000013C, 0x00000100, 0x000000FB, 0x00000115,
+ 0x000000DA, 0x00000100, 0x0000010E, 0x000000FB, 0x000000F2, 0x00000115, 0x000000F4, 0x00000143,
+ 0x000000F2, 0x000000FC, 0x00000109, 0x000000FB, 0x00000109, 0x000000F0, 0x0000010B, 0x000000E0,
+ 0x00000104, 0x000000FE, 0x0000010B, 0x000000FB, 0x00000119, 0x000000FA, 0x000000FE, 0x0000013F
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017,
+ 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F,
+ 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027,
+ 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F,
+ 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037,
+ 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F,
+ 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047,
+ 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F,
+ 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057,
+ 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F,
+ 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067,
+ 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F,
+ 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077,
+ 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F,
+ 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087,
+ 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F,
+ 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097,
+ 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F,
+ 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 5.399414, 0.000000, 10.798828, 0.000000, 16.198242, 0.000000,
+ 16.198242, 0.000000, 16.198242, 0.000000, 21.046875, 0.000000, 26.616211, 0.000000,
+ 30.035156, 0.000000, 34.151367, 0.000000, 34.151367, 0.000000, 38.279297, 0.000000,
+ 43.558594, 0.000000, 47.663086, 0.000000, 52.438477, 0.000000, 57.178711, 0.000000,
+ 62.698242, 0.000000, 66.802734, 0.000000, 71.601563, 0.000000, 75.706055, 0.000000,
+ 79.810547, 0.000000, 84.369141, 0.000000, 84.369141, 0.000000, 89.097656, 0.000000,
+ 92.516602, 0.000000, 97.195313, 0.000000, 97.195313, 0.000000, 101.311523, 0.000000,
+ 106.040039, 0.000000, 110.156250, 0.000000, 110.156250, 0.000000, 110.156250, 0.000000,
+ 115.555664, 0.000000, 115.555664, 0.000000, 118.974609, 0.000000, 124.013672, 0.000000,
+ 128.765625, 0.000000, 133.505859, 0.000000, 136.924805, 0.000000, 140.704102, 0.000000,
+ 146.103516, 0.000000, 146.103516, 0.000000, 146.103516, 0.000000, 149.882813, 0.000000,
+ 153.553711, 0.000000, 159.158203, 0.000000, 165.421875, 0.000000, 165.421875, 0.000000,
+ 169.092773, 0.000000, 174.612305, 0.000000, 179.135742, 0.000000, 183.911133, 0.000000,
+ 189.430664, 0.000000, 194.709961, 0.000000, 194.709961, 0.000000, 199.989258, 0.000000,
+ 204.741211, 0.000000, 204.741211, 0.000000, 210.140625, 0.000000, 214.880859, 0.000000,
+ 214.880859, 0.000000, 218.660156, 0.000000, 220.675781, 0.000000, 225.128906, 0.000000,
+ 230.648438, 0.000000, 234.752930, 0.000000, 234.752930, 0.000000, 239.613281, 0.000000,
+ 243.032227, 0.000000, 247.280273, 0.000000, 251.408203, 0.000000, 255.512695, 0.000000,
+ 255.512695, 0.000000, 260.036133, 0.000000, 264.776367, 0.000000, 269.071289, 0.000000,
+ 274.470703, 0.000000, 274.470703, 0.000000, 277.889648, 0.000000, 279.905273, 0.000000,
+ 284.633789, 0.000000, 284.633789, 0.000000, 289.672852, 0.000000, 294.641602, 0.000000,
+ 298.746094, 0.000000, 302.850586, 0.000000, 306.966797, 0.000000, 310.385742, 0.000000,
+ 315.246094, 0.000000, 318.665039, 0.000000, 322.913086, 0.000000, 327.041016, 0.000000,
+ 331.145508, 0.000000, 331.145508, 0.000000, 336.544922, 0.000000, 336.544922, 0.000000,
+ 339.963867, 0.000000, 345.483398, 0.000000, 350.258789, 0.000000, 354.987305, 0.000000,
+ 358.766602, 0.000000, 364.335938, 0.000000, 368.583984, 0.000000, 373.335938, 0.000000,
+ 375.351563, 0.000000, 380.126953, 0.000000, 383.545898, 0.000000, 389.150391, 0.000000,
+ 393.890625, 0.000000, 393.890625, 0.000000, 397.669922, 0.000000, 399.685547, 0.000000,
+ 404.425781, 0.000000, 404.425781, 0.000000, 409.177734, 0.000000, 411.193359, 0.000000,
+ 416.762695, 0.000000, 420.867188, 0.000000, 424.286133, 0.000000, 428.581055, 0.000000,
+ 432.708984, 0.000000, 437.748047, 0.000000, 437.748047, 0.000000, 443.027344, 0.000000,
+ 447.131836, 0.000000, 447.131836, 0.000000, 450.550781, 0.000000, 454.330078, 0.000000,
+ 459.729492, 0.000000, 459.729492, 0.000000, 463.148438, 0.000000, 468.667969, 0.000000,
+ 473.478516, 0.000000, 473.478516, 0.000000, 478.207031, 0.000000, 481.986328, 0.000000,
+ 486.761719, 0.000000, 492.281250, 0.000000, 497.320313, 0.000000, 500.739258, 0.000000,
+ 505.538086, 0.000000, 505.538086, 0.000000, 509.786133, 0.000000, 513.902344, 0.000000,
+ 515.917969, 0.000000, 520.669922, 0.000000, 524.917969, 0.000000, 524.917969, 0.000000,
+ 529.034180, 0.000000, 534.553711, 0.000000, 536.569336, 0.000000, 541.968750, 0.000000,
+ 541.968750, 0.000000, 547.488281, 0.000000, 551.592773, 0.000000, 555.887695, 0.000000,
+ 560.003906, 0.000000, 564.298828, 0.000000, 569.698242, 0.000000, 573.117188, 0.000000,
+ 576.896484, 0.000000, 582.500977, 0.000000, 587.241211, 0.000000, 590.660156, 0.000000,
+ 594.776367, 0.000000, 598.904297, 0.000000, 603.943359, 0.000000, 608.683594, 0.000000,
+ 608.683594, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Arabic Simple" script="arab">
+ <test-text>أساسًا، تتعامل الحواسيب Ùقط مع الأرقام، وتقوم بتخزين الأحر٠والمحار٠الأخرى بعد أن تÙعطي رقما معينا لكل واحد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمحارÙØŒ ولم يوجد نظام تشÙير واحد يحتوي على جميع المحار٠الضرورية</test-text>
+
+ <result-glyphs>
+ 0x0000FE94, 0x0000FEF3, 0x00000631, 0x00000648, 0x0000FFFE, 0x0000FD2C, 0x0000FEDF, 0x00000627,
+ 0x00000020, 0x00000641, 0x00000631, 0x0000FE8E, 0x0000FFFE, 0x0000FFFE, 0x0000FD88, 0x00000627,
+ 0x00000020, 0x0000FECA, 0x0000FEF4, 0x0000FFFE, 0x0000FCA8, 0x00000020, 0x0000FFFE, 0x0000FC86,
+ 0x0000FECB, 0x00000020, 0x0000064A, 0x0000FEEE, 0x0000FE98, 0x0000FFFE, 0x0000FCDB, 0x00000020,
+ 0x0000FEAA, 0x0000FEA3, 0x00000627, 0x00000648, 0x00000020, 0x0000FFFE, 0x0000FC91, 0x0000FED4,
+ 0x0000FEB8, 0x0000FE97, 0x00000020, 0x00000645, 0x0000FE8E, 0x0000FEC8, 0x0000FEE7, 0x00000020,
+ 0x0000FEAA, 0x0000FE9F, 0x0000FEEE, 0x0000FEF3, 0x00000020, 0x0000FFFE, 0x0000FC42, 0x00000648,
+ 0x00000020, 0x0000060C, 0x00000641, 0x00000631, 0x0000FE8E, 0x0000FEA4, 0x0000FFFE, 0x0000FCED,
+ 0x0000FEDF, 0x00000020, 0x00000645, 0x0000FE8E, 0x0000FED7, 0x00000631, 0x0000FFFE, 0x0000FEF7,
+ 0x00000627, 0x00000020, 0x00000647, 0x0000FEAC, 0x0000FEEB, 0x00000020, 0x0000FEBA, 0x0000FEF4,
+ 0x0000FEBC, 0x0000FFFE, 0x0000FCA3, 0x00000648, 0x00000020, 0x0000FFFE, 0x0000FC91, 0x0000FED4,
+ 0x0000FEB8, 0x0000FE98, 0x0000FEE0, 0x0000FEDF, 0x00000020, 0x0000FE94, 0x0000FFFE, 0x0000FD3B,
+ 0x0000FEE7, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020, 0x0000062A, 0x0000FFFE, 0x0000FBEB,
+ 0x0000FEE3, 0x00000020, 0x00000643, 0x0000FE8E, 0x0000FEE8, 0x0000FEEB, 0x00000020, 0x00000646,
+ 0x0000FFFE, 0x0000FC37, 0x00000020, 0x0000060C, 0x00000022, 0x0000062F, 0x0000FEEE, 0x0000FEDC,
+ 0x00000650, 0x0000FEE7, 0x0000FEEE, 0x0000FEF3, 0x00000022, 0x00000020, 0x00000639, 0x00000627,
+ 0x0000FFFE, 0x0000FC70, 0x0000FEA7, 0x00000627, 0x00000020, 0x0000FEDE, 0x0000FE92, 0x0000FED7,
+ 0x00000648, 0x00000020, 0x0000002E, 0x0000FE8E, 0x0000FFFE, 0x0000FCEF, 0x0000FEE3, 0x00000020,
+ 0x0000FEAA, 0x0000FEA3, 0x00000627, 0x00000648, 0x00000020, 0x0000FFFE, 0x0000FC81, 0x0000FEDF,
+ 0x00000020, 0x0000FE8E, 0x0000FEE8, 0x0000FEF4, 0x0000FECC, 0x0000FEE3, 0x00000020, 0x0000FE8E,
+ 0x0000FFFE, 0x0000FCC3, 0x00000631, 0x00000020, 0x0000FFFE, 0x0000FD12, 0x0000FECC, 0x0000064F,
+ 0x0000FE97, 0x00000020, 0x00000646, 0x00000623, 0x00000020, 0x0000FEAA, 0x0000FECC, 0x0000FE91,
+ 0x00000020, 0x00000649, 0x0000FEAE, 0x0000FEA7, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020,
+ 0x00000641, 0x00000631, 0x0000FE8E, 0x0000FFFE, 0x0000FFFE, 0x0000FD88, 0x00000627, 0x00000648,
+ 0x00000020, 0x00000641, 0x0000FEAE, 0x0000FEA3, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020,
+ 0x0000FEE6, 0x0000FEF3, 0x0000FEB0, 0x0000FEA8, 0x0000FE98, 0x0000FE91, 0x00000020, 0x00000645,
+ 0x0000FEEE, 0x0000FED8, 0x0000FE97, 0x00000648, 0x00000020, 0x0000060C, 0x00000645, 0x0000FE8E,
+ 0x0000FED7, 0x00000631, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020, 0x0000FECA, 0x0000FEE3,
+ 0x00000020, 0x0000FEC2, 0x0000FED8, 0x0000FED3, 0x00000020, 0x0000FE90, 0x0000FEF4, 0x0000FEB3,
+ 0x00000627, 0x0000FEEE, 0x0000FFFE, 0x0000FCCA, 0x00000627, 0x00000020, 0x0000FEDE, 0x0000FEE3,
+ 0x0000FE8E, 0x0000FECC, 0x0000FE98, 0x0000FE97, 0x00000020, 0x0000060C, 0x0000FE8E, 0x0000064B,
+ 0x0000FEB3, 0x0000FE8E, 0x0000FEB3, 0x00000623
+ </result-glyphs>
+
+ <result-indices>
+ 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4,
+ 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC,
+ 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4,
+ 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC,
+ 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4,
+ 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC,
+ 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4,
+ 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC,
+ 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4,
+ 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC,
+ 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4,
+ 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C,
+ 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094,
+ 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C,
+ 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084,
+ 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C,
+ 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074,
+ 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C,
+ 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064,
+ 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C,
+ 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054,
+ 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C,
+ 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044,
+ 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C,
+ 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034,
+ 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C,
+ 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024,
+ 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C,
+ 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014,
+ 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C,
+ 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004,
+ 0x00000003, 0x00000002, 0x00000001, 0x00000000
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000,
+ 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000,
+ 96.000000, 0.000000, 108.000000, 0.000000, 120.000000, 0.000000, 132.000000, 0.000000,
+ 144.000000, 0.000000, 156.000000, 0.000000, 168.000000, 0.000000, 180.000000, 0.000000,
+ 192.000000, 0.000000, 204.000000, 0.000000, 216.000000, 0.000000, 228.000000, 0.000000,
+ 240.000000, 0.000000, 252.000000, 0.000000, 264.000000, 0.000000, 276.000000, 0.000000,
+ 288.000000, 0.000000, 300.000000, 0.000000, 312.000000, 0.000000, 324.000000, 0.000000,
+ 336.000000, 0.000000, 348.000000, 0.000000, 360.000000, 0.000000, 372.000000, 0.000000,
+ 384.000000, 0.000000, 396.000000, 0.000000, 408.000000, 0.000000, 420.000000, 0.000000,
+ 432.000000, 0.000000, 444.000000, 0.000000, 456.000000, 0.000000, 468.000000, 0.000000,
+ 480.000000, 0.000000, 492.000000, 0.000000, 504.000000, 0.000000, 516.000000, 0.000000,
+ 528.000000, 0.000000, 540.000000, 0.000000, 552.000000, 0.000000, 564.000000, 0.000000,
+ 576.000000, 0.000000, 588.000000, 0.000000, 600.000000, 0.000000, 612.000000, 0.000000,
+ 624.000000, 0.000000, 636.000000, 0.000000, 648.000000, 0.000000, 660.000000, 0.000000,
+ 672.000000, 0.000000, 684.000000, 0.000000, 696.000000, 0.000000, 708.000000, 0.000000,
+ 720.000000, 0.000000, 732.000000, 0.000000, 744.000000, 0.000000, 756.000000, 0.000000,
+ 768.000000, 0.000000, 780.000000, 0.000000, 792.000000, 0.000000, 804.000000, 0.000000,
+ 816.000000, 0.000000, 828.000000, 0.000000, 840.000000, 0.000000, 852.000000, 0.000000,
+ 864.000000, 0.000000, 876.000000, 0.000000, 888.000000, 0.000000, 900.000000, 0.000000,
+ 912.000000, 0.000000, 924.000000, 0.000000, 936.000000, 0.000000, 948.000000, 0.000000,
+ 960.000000, 0.000000, 972.000000, 0.000000, 984.000000, 0.000000, 996.000000, 0.000000,
+ 1008.000000, 0.000000, 1020.000000, 0.000000, 1032.000000, 0.000000, 1044.000000, 0.000000,
+ 1056.000000, 0.000000, 1068.000000, 0.000000, 1080.000000, 0.000000, 1092.000000, 0.000000,
+ 1104.000000, 0.000000, 1116.000000, 0.000000, 1128.000000, 0.000000, 1140.000000, 0.000000,
+ 1152.000000, 0.000000, 1164.000000, 0.000000, 1176.000000, 0.000000, 1188.000000, 0.000000,
+ 1200.000000, 0.000000, 1212.000000, 0.000000, 1224.000000, 0.000000, 1236.000000, 0.000000,
+ 1248.000000, 0.000000, 1260.000000, 0.000000, 1272.000000, 0.000000, 1284.000000, 0.000000,
+ 1296.000000, 0.000000, 1308.000000, 0.000000, 1320.000000, 0.000000, 1332.000000, 0.000000,
+ 1344.000000, 0.000000, 1356.000000, 0.000000, 1368.000000, 0.000000, 1380.000000, 0.000000,
+ 1392.000000, 0.000000, 1404.000000, 0.000000, 1416.000000, 0.000000, 1428.000000, 0.000000,
+ 1440.000000, 0.000000, 1440.000000, 0.000000, 1452.000000, 0.000000, 1464.000000, 0.000000,
+ 1476.000000, 0.000000, 1488.000000, 0.000000, 1500.000000, 0.000000, 1512.000000, 0.000000,
+ 1524.000000, 0.000000, 1536.000000, 0.000000, 1548.000000, 0.000000, 1560.000000, 0.000000,
+ 1572.000000, 0.000000, 1584.000000, 0.000000, 1596.000000, 0.000000, 1608.000000, 0.000000,
+ 1620.000000, 0.000000, 1632.000000, 0.000000, 1644.000000, 0.000000, 1656.000000, 0.000000,
+ 1668.000000, 0.000000, 1680.000000, 0.000000, 1692.000000, 0.000000, 1704.000000, 0.000000,
+ 1716.000000, 0.000000, 1728.000000, 0.000000, 1740.000000, 0.000000, 1752.000000, 0.000000,
+ 1764.000000, 0.000000, 1776.000000, 0.000000, 1788.000000, 0.000000, 1800.000000, 0.000000,
+ 1812.000000, 0.000000, 1824.000000, 0.000000, 1836.000000, 0.000000, 1848.000000, 0.000000,
+ 1860.000000, 0.000000, 1872.000000, 0.000000, 1884.000000, 0.000000, 1896.000000, 0.000000,
+ 1908.000000, 0.000000, 1920.000000, 0.000000, 1932.000000, 0.000000, 1944.000000, 0.000000,
+ 1956.000000, 0.000000, 1968.000000, 0.000000, 1980.000000, 0.000000, 1992.000000, 0.000000,
+ 1992.000000, 0.000000, 2004.000000, 0.000000, 2016.000000, 0.000000, 2028.000000, 0.000000,
+ 2040.000000, 0.000000, 2052.000000, 0.000000, 2064.000000, 0.000000, 2076.000000, 0.000000,
+ 2088.000000, 0.000000, 2100.000000, 0.000000, 2112.000000, 0.000000, 2124.000000, 0.000000,
+ 2136.000000, 0.000000, 2148.000000, 0.000000, 2160.000000, 0.000000, 2172.000000, 0.000000,
+ 2184.000000, 0.000000, 2196.000000, 0.000000, 2208.000000, 0.000000, 2220.000000, 0.000000,
+ 2232.000000, 0.000000, 2244.000000, 0.000000, 2256.000000, 0.000000, 2268.000000, 0.000000,
+ 2280.000000, 0.000000, 2292.000000, 0.000000, 2304.000000, 0.000000, 2316.000000, 0.000000,
+ 2328.000000, 0.000000, 2340.000000, 0.000000, 2352.000000, 0.000000, 2364.000000, 0.000000,
+ 2376.000000, 0.000000, 2388.000000, 0.000000, 2400.000000, 0.000000, 2412.000000, 0.000000,
+ 2424.000000, 0.000000, 2436.000000, 0.000000, 2448.000000, 0.000000, 2460.000000, 0.000000,
+ 2472.000000, 0.000000, 2484.000000, 0.000000, 2496.000000, 0.000000, 2508.000000, 0.000000,
+ 2520.000000, 0.000000, 2532.000000, 0.000000, 2544.000000, 0.000000, 2556.000000, 0.000000,
+ 2568.000000, 0.000000, 2580.000000, 0.000000, 2592.000000, 0.000000, 2604.000000, 0.000000,
+ 2616.000000, 0.000000, 2628.000000, 0.000000, 2640.000000, 0.000000, 2652.000000, 0.000000,
+ 2664.000000, 0.000000, 2676.000000, 0.000000, 2688.000000, 0.000000, 2700.000000, 0.000000,
+ 2712.000000, 0.000000, 2724.000000, 0.000000, 2736.000000, 0.000000, 2748.000000, 0.000000,
+ 2760.000000, 0.000000, 2772.000000, 0.000000, 2784.000000, 0.000000, 2796.000000, 0.000000,
+ 2808.000000, 0.000000, 2820.000000, 0.000000, 2832.000000, 0.000000, 2844.000000, 0.000000,
+ 2856.000000, 0.000000, 2868.000000, 0.000000, 2880.000000, 0.000000, 2892.000000, 0.000000,
+ 2904.000000, 0.000000, 2916.000000, 0.000000, 2928.000000, 0.000000, 2940.000000, 0.000000,
+ 2940.000000, 0.000000, 2952.000000, 0.000000, 2964.000000, 0.000000, 2976.000000, 0.000000,
+ 2988.000000, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Matra Test" script="deva">
+ <test-font name="Devamt.ttf" version="Version 1.02" checksum="0x2AB199ED"/>
+
+ <test-text>à¥à¤‚ ं॑</test-text>
+
+ <result-glyphs>
+ 0x00000130, 0x00000105, 0x000000C9, 0x00000003, 0x00000130, 0x000000C9, 0x00000328
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000003, 0x00000004
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 6.046875, 0.000000, 6.046875, 0.000000, 7.201172, 0.000000,
+ 10.201172, 0.000000, 16.248047, 0.000000, 16.248047, 0.000000, 17.402344, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Deva Stress Test" script="deva">
+ <test-font name="Devamt.ttf" version="Version 1.02" checksum="0x2AB199ED"/>
+
+ <test-text>कठकं कः क॑ क॒ कà¤à¥‘ कं॒ कà¤à¤‚ः क॒॑</test-text>
+
+ <result-glyphs>
+ 0x000000DB, 0x000000C8, 0x00000003, 0x000000DB, 0x000000C9, 0x00000003, 0x000000DB, 0x000000CA,
+ 0x00000003, 0x000000DB, 0x00000113, 0x00000003, 0x000000DB, 0x00000114, 0x00000003, 0x000000DB,
+ 0x000000C8, 0x00000328, 0x00000003, 0x000000DB, 0x00000114, 0x000000C9, 0x00000003, 0x000000DB,
+ 0x000000C8, 0x00000130, 0x000000C9, 0x00000130, 0x000000CA, 0x00000003, 0x000000DB, 0x00000113,
+ 0x00000130, 0x00000114
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000015, 0x00000014, 0x00000016, 0x00000017,
+ 0x00000018, 0x00000019, 0x00000019, 0x0000001A, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D,
+ 0x0000001E, 0x0000001E
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 6.052734, 0.000000, 8.003906, 0.000000, 11.003906, 0.000000,
+ 17.056641, 0.000000, 19.007813, 0.000000, 22.007813, 0.000000, 30.011719, 0.000000,
+ 33.539063, 0.000000, 36.539063, 0.000000, 42.591797, 0.000000, 44.542969, 0.000000,
+ 47.542969, 0.000000, 55.546875, 0.000000, 55.546875, 0.000000, 58.546875, 0.000000,
+ 64.599609, 0.000000, 64.599609, 0.000000, 66.550781, 0.000000, 69.550781, 0.000000,
+ 77.554688, 0.000000, 75.603516, 0.000000, 77.554688, 0.000000, 80.554688, 0.000000,
+ 86.607422, 0.000000, 88.558594, 0.000000, 94.605469, 0.000000, 95.759766, 0.000000,
+ 102.960938, 0.000000, 106.488281, 0.000000, 109.488281, 0.000000, 115.541016, 0.000000,
+ 117.492188, 0.000000, 124.693359, 0.000000, 124.693359, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Deva Test" script="deva">
+ <test-font name="Devamt.ttf" version="Version 1.02" checksum="0x2AB199ED"/>
+
+ <test-text>रू क़ॠकà¥à¤· कà¥à¤•à¤¿ कà¥à¤°à¤¿ टà¥à¤°à¤¿ हिनà¥à¤¦à¥€ रà¥à¤•à¥à¤°à¤¿à¤‚ कà¥à¤·à¤¤à¥à¤°à¤œà¥à¤žà¤¤à¥à¤°à¤•à¥à¤· शà¥à¤° थà¥à¤° शà¥à¤° कके रà¥à¤•à¥‡à¤‚ केूकूेकेृ रà¥à¤•à¥‚ क़ क कॠकà¥à¤· कà¥à¤·à¥ कà¥à¤·à¥à¤• ज़ ज जॠजà¥à¤ž जà¥à¤žà¥ जà¥à¤žà¥à¤• रà¥à¤• रà¥à¤•à¥à¤• डà¥à¤° कà¥à¤• क़à¥à¤• क़à¥à¤• क़ॠकà¥à¤·à¥à¤• कà¥à¤·à¥ तà¥à¤°à¥à¤• दà¥à¤¦ कि हि रू रॠरà¥à¤•à¥‡ रà¥à¤•à¤‚ कॠकॠके दà¥à¤¦à¥à¤¦ क़à¥à¤· कà¥à¤· रà¥à¤•à¥à¤·à¥‡ दà¥à¤¦à¤¤à¥à¤°à¥à¤• जà¥à¤ž कà¥à¤¤à¥à¤µ जà¥à¤žà¥à¤• रà¥à¤•à¤ रà¥à¤•à¤¿à¤ रà¥à¤•à¥‡à¤ रà¥à¤•à¥à¤°à¤¿à¤ हिंदी हà¥à¤®à¤¿à¤¹à¥à¤¯à¤¿à¤–ि ङà¥à¤• ङà¥à¤® ङà¥à¤•à¥à¤¤ ङà¥à¤– ङà¥à¤— ङà¥à¤˜ ङà¥à¤•à¥à¤· ङà¥à¤•à¥à¤·à¥à¤µ ङà¥à¤•à¥à¤·à¥à¤¯ रà¥à¤•à¥à¤¤à¥à¤µà¤¿ रà¥à¤°à¥à¤°à¥à¤° कै के कॠकू कृ कॅ कॆ हॠहू हॆ है हे</test-text>
+
+ <result-glyphs>
+ 0x00000238, 0x0000FFFF, 0x00000003, 0x00000117, 0x00000111, 0x00000003, 0x00000156, 0x0000FFFF,
+ 0x0000FFFF, 0x00000003, 0x000002CF, 0x00000269, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002CF,
+ 0x000001A3, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002CE, 0x000001AD, 0x0000FFFF, 0x0000FFFF,
+ 0x00000003, 0x000002D0, 0x000000FF, 0x00000170, 0x0000FFFF, 0x000000EC, 0x00000104, 0x00000003,
+ 0x00000308, 0x000001A3, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x000001B2, 0x0000FFFF, 0x0000FFFF, 0x00000157, 0x0000FFFF,
+ 0x0000FFFF, 0x000001B2, 0x0000FFFF, 0x0000FFFF, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x000001C1, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000001B3, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x000001C1, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000DB, 0x000000DB, 0x00000340, 0x00000003,
+ 0x000000DB, 0x00000343, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000DB, 0x00000340,
+ 0x00000130, 0x00000106, 0x000000DB, 0x00000106, 0x00000130, 0x0000010B, 0x000000DB, 0x00000340,
+ 0x00000130, 0x00000107, 0x00000003, 0x000000DB, 0x00000106, 0x00000158, 0x0000FFFF, 0x00000003,
+ 0x00000117, 0x00000003, 0x000000DB, 0x00000003, 0x000000DB, 0x00000111, 0x00000003, 0x00000156,
+ 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000111, 0x00000003,
+ 0x0000017F, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x00000003, 0x0000011A,
+ 0x0000FFFF, 0x00000003, 0x000000E2, 0x00000003, 0x000000E2, 0x00000111, 0x00000003, 0x00000157,
+ 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000157, 0x0000FFFF, 0x0000FFFF, 0x00000111, 0x00000003,
+ 0x00000180, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x000000DB, 0x00000158,
+ 0x0000FFFF, 0x00000003, 0x00000269, 0x0000FFFF, 0x0000FFFF, 0x00000158, 0x0000FFFF, 0x00000003,
+ 0x000001AF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000269, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x00000181, 0x0000FFFF, 0x000000DB, 0x00000003, 0x00000181, 0x0000FFFF, 0x000000DB, 0x00000003,
+ 0x00000117, 0x00000111, 0x00000003, 0x0000017F, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB,
+ 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000111, 0x00000003, 0x000001F8, 0x0000FFFF,
+ 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x000002A4, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x000002CF, 0x000000DB, 0x00000003, 0x000002D0, 0x000000FF, 0x00000003, 0x00000238, 0x0000FFFF,
+ 0x00000003, 0x00000237, 0x0000FFFF, 0x00000003, 0x000000DB, 0x00000342, 0x0000FFFF, 0x0000FFFF,
+ 0x00000003, 0x000000DB, 0x00000256, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000DB, 0x00000111,
+ 0x00000003, 0x000000DB, 0x00000105, 0x00000003, 0x000000DB, 0x00000340, 0x00000003, 0x0000016E,
+ 0x0000FFFF, 0x000002A4, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000181, 0x0000FFFF, 0x000000FD,
+ 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF,
+ 0x00000245, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002A4, 0x0000FFFF, 0x0000FFFF, 0x000001F8,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x00000157, 0x0000FFFF, 0x0000FFFF,
+ 0x00000003, 0x0000015D, 0x0000FFFF, 0x0000016C, 0x0000FFFF, 0x000000FB, 0x00000003, 0x00000180,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x000000DB, 0x00000256, 0x0000FFFF,
+ 0x0000FFFF, 0x00000003, 0x00000308, 0x000000DB, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x000000DB, 0x00000343, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000308, 0x000001A3,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002E3, 0x000000FF,
+ 0x0000FFFF, 0x000000EC, 0x00000104, 0x00000003, 0x000002D7, 0x000002C6, 0x0000FFFF, 0x0000FFFF,
+ 0x000002D7, 0x000002C7, 0x0000FFFF, 0x0000FFFF, 0x000002D4, 0x000000DC, 0x00000003, 0x0000026E,
+ 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000272, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000273,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x0000026F, 0x0000FFFF, 0x0000FFFF,
+ 0x00000003, 0x00000270, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000271, 0x0000FFFF, 0x0000FFFF,
+ 0x00000003, 0x00000274, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000275,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000276,
+ 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000304,
+ 0x0000015D, 0x0000FFFF, 0x0000016C, 0x0000FFFF, 0x000000FB, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x000000F6, 0x00000111, 0x000001BD, 0x0000FFFF, 0x0000FFFF, 0x00000158, 0x0000FFFF, 0x00000003,
+ 0x000000DB, 0x0000010C, 0x00000003, 0x000000DB, 0x00000340, 0x00000003, 0x000000DB, 0x00000105,
+ 0x00000003, 0x000000DB, 0x00000106, 0x00000003, 0x000000DB, 0x00000107, 0x00000003, 0x000000DB,
+ 0x00000109, 0x00000003, 0x000000DB, 0x0000033C, 0x00000003, 0x0000022F, 0x0000FFFF, 0x00000003,
+ 0x00000230, 0x0000FFFF, 0x00000003, 0x000000FF, 0x0000010A, 0x00000003, 0x000000FF, 0x0000010C,
+ 0x00000003, 0x000000FF, 0x0000010B
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000D, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000E, 0x00000012,
+ 0x0000000F, 0x00000011, 0x00000010, 0x00000013, 0x00000017, 0x00000014, 0x00000016, 0x00000015,
+ 0x00000018, 0x0000001A, 0x00000019, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F,
+ 0x00000025, 0x00000022, 0x00000024, 0x00000023, 0x00000020, 0x00000021, 0x00000026, 0x00000027,
+ 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002D, 0x0000002C, 0x0000002E, 0x0000002F,
+ 0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037,
+ 0x00000038, 0x0000003A, 0x00000039, 0x0000003B, 0x0000003C, 0x0000003E, 0x0000003D, 0x0000003F,
+ 0x00000040, 0x00000042, 0x00000041, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047,
+ 0x0000004A, 0x0000004B, 0x00000048, 0x00000049, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F,
+ 0x00000050, 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000053, 0x00000054, 0x00000055,
+ 0x00000056, 0x00000056, 0x00000057, 0x0000005A, 0x0000005B, 0x00000058, 0x00000059, 0x0000005C,
+ 0x0000005D, 0x0000005E, 0x0000005F, 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064,
+ 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C,
+ 0x0000006D, 0x0000006E, 0x0000006F, 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074,
+ 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C,
+ 0x0000007D, 0x0000007E, 0x0000007F, 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084,
+ 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008D, 0x0000008B,
+ 0x0000008C, 0x0000008E, 0x00000091, 0x00000092, 0x00000093, 0x0000008F, 0x00000090, 0x00000094,
+ 0x00000095, 0x00000097, 0x00000096, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C,
+ 0x0000009D, 0x0000009E, 0x0000009F, 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4,
+ 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC,
+ 0x000000AD, 0x000000AE, 0x000000AF, 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4,
+ 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000BA, 0x000000BB, 0x000000BC,
+ 0x000000BE, 0x000000BD, 0x000000BF, 0x000000C1, 0x000000C0, 0x000000C2, 0x000000C3, 0x000000C4,
+ 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000CB, 0x000000CC, 0x000000C9, 0x000000CA,
+ 0x000000CD, 0x000000D0, 0x000000CE, 0x000000CF, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4,
+ 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC,
+ 0x000000DD, 0x000000DE, 0x000000DF, 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4,
+ 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EC, 0x000000ED, 0x000000EE,
+ 0x000000EF, 0x000000EA, 0x000000EB, 0x000000F0, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4,
+ 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC,
+ 0x000000FD, 0x000000FE, 0x000000FF, 0x00000100, 0x00000101, 0x00000102, 0x00000103, 0x00000104,
+ 0x00000105, 0x00000106, 0x00000107, 0x00000108, 0x00000109, 0x0000010C, 0x0000010A, 0x0000010B,
+ 0x0000010D, 0x0000010E, 0x00000112, 0x00000111, 0x0000010F, 0x00000110, 0x00000113, 0x00000114,
+ 0x00000117, 0x00000118, 0x00000115, 0x00000116, 0x00000119, 0x0000011A, 0x00000120, 0x0000011D,
+ 0x0000011F, 0x0000011E, 0x0000011B, 0x0000011C, 0x00000121, 0x00000122, 0x00000124, 0x00000123,
+ 0x00000125, 0x00000126, 0x00000127, 0x00000128, 0x0000012C, 0x00000129, 0x0000012A, 0x0000012B,
+ 0x00000130, 0x0000012D, 0x0000012E, 0x0000012F, 0x00000132, 0x00000131, 0x00000133, 0x00000134,
+ 0x00000135, 0x00000136, 0x00000137, 0x00000138, 0x00000139, 0x0000013A, 0x0000013B, 0x0000013C,
+ 0x0000013D, 0x0000013E, 0x0000013F, 0x00000140, 0x00000141, 0x00000142, 0x00000143, 0x00000144,
+ 0x00000145, 0x00000146, 0x00000147, 0x00000148, 0x00000149, 0x0000014A, 0x0000014B, 0x0000014C,
+ 0x0000014D, 0x0000014E, 0x0000014F, 0x00000150, 0x00000151, 0x00000152, 0x00000153, 0x00000154,
+ 0x00000155, 0x00000156, 0x00000157, 0x00000158, 0x00000159, 0x0000015A, 0x0000015B, 0x0000015C,
+ 0x0000015D, 0x0000015E, 0x0000015F, 0x00000160, 0x00000161, 0x00000162, 0x00000163, 0x0000016B,
+ 0x00000166, 0x00000167, 0x00000168, 0x00000169, 0x0000016A, 0x00000164, 0x00000165, 0x0000016C,
+ 0x0000016F, 0x00000170, 0x00000171, 0x00000173, 0x00000172, 0x0000016D, 0x0000016E, 0x00000174,
+ 0x00000175, 0x00000176, 0x00000177, 0x00000178, 0x00000179, 0x0000017A, 0x0000017B, 0x0000017C,
+ 0x0000017D, 0x0000017E, 0x0000017F, 0x00000180, 0x00000181, 0x00000182, 0x00000183, 0x00000184,
+ 0x00000185, 0x00000186, 0x00000187, 0x00000188, 0x00000189, 0x0000018A, 0x0000018B, 0x0000018C,
+ 0x0000018D, 0x0000018E, 0x0000018F, 0x00000190, 0x00000191, 0x00000192, 0x00000193, 0x00000194,
+ 0x00000195, 0x00000196, 0x00000197
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 8.707031, 0.000000, 8.707031, 0.000000, 11.707031, 0.000000,
+ 17.759766, 0.000000, 19.710938, 0.000000, 22.710938, 0.000000, 30.955078, 0.000000,
+ 30.955078, 0.000000, 30.955078, 0.000000, 33.955078, 0.000000, 37.318359, 0.000000,
+ 45.322266, 0.000000, 45.322266, 0.000000, 45.322266, 0.000000, 48.322266, 0.000000,
+ 51.685547, 0.000000, 59.689453, 0.000000, 59.689453, 0.000000, 59.689453, 0.000000,
+ 62.689453, 0.000000, 66.052734, 0.000000, 72.082031, 0.000000, 72.082031, 0.000000,
+ 72.082031, 0.000000, 75.082031, 0.000000, 78.445313, 0.000000, 84.996094, 0.000000,
+ 89.015625, 0.000000, 89.015625, 0.000000, 95.408203, 0.000000, 98.771484, 0.000000,
+ 101.771484, 0.000000, 105.134766, 0.000000, 113.138672, 0.000000, 113.138672, 0.000000,
+ 113.138672, 0.000000, 113.138672, 0.000000, 113.138672, 0.000000, 113.138672, 0.000000,
+ 116.138672, 0.000000, 124.382813, 0.000000, 124.382813, 0.000000, 124.382813, 0.000000,
+ 131.507813, 0.000000, 131.507813, 0.000000, 131.507813, 0.000000, 139.095703, 0.000000,
+ 139.095703, 0.000000, 139.095703, 0.000000, 146.220703, 0.000000, 146.220703, 0.000000,
+ 146.220703, 0.000000, 154.464844, 0.000000, 154.464844, 0.000000, 154.464844, 0.000000,
+ 157.464844, 0.000000, 165.433594, 0.000000, 165.433594, 0.000000, 165.433594, 0.000000,
+ 168.433594, 0.000000, 175.851563, 0.000000, 175.851563, 0.000000, 175.851563, 0.000000,
+ 178.851563, 0.000000, 186.820313, 0.000000, 186.820313, 0.000000, 186.820313, 0.000000,
+ 189.820313, 0.000000, 197.824219, 0.000000, 203.876953, 0.000000, 205.828125, 0.000000,
+ 208.828125, 0.000000, 214.880859, 0.000000, 216.832031, 0.000000, 216.832031, 0.000000,
+ 216.832031, 0.000000, 216.832031, 0.000000, 219.832031, 0.000000, 225.884766, 0.000000,
+ 227.835938, 0.000000, 233.882813, 0.000000, 235.037109, 0.000000, 241.089844, 0.000000,
+ 243.041016, 0.000000, 249.087891, 0.000000, 250.242188, 0.000000, 256.294922, 0.000000,
+ 258.246094, 0.000000, 264.292969, 0.000000, 265.447266, 0.000000, 268.447266, 0.000000,
+ 274.500000, 0.000000, 274.505859, 0.000000, 276.451172, 0.000000, 276.451172, 0.000000,
+ 279.451172, 0.000000, 287.455078, 0.000000, 290.455078, 0.000000, 298.458984, 0.000000,
+ 301.458984, 0.000000, 307.511719, 0.000000, 309.462891, 0.000000, 312.462891, 0.000000,
+ 320.707031, 0.000000, 320.707031, 0.000000, 320.707031, 0.000000, 323.707031, 0.000000,
+ 331.951172, 0.000000, 331.951172, 0.000000, 331.951172, 0.000000, 331.951172, 0.000000,
+ 334.951172, 0.000000, 340.705078, 0.000000, 340.705078, 0.000000, 340.705078, 0.000000,
+ 340.705078, 0.000000, 348.708984, 0.000000, 351.708984, 0.000000, 354.708984, 0.000000,
+ 362.724609, 0.000000, 362.724609, 0.000000, 365.724609, 0.000000, 373.740234, 0.000000,
+ 376.740234, 0.000000, 384.755859, 0.000000, 384.755859, 0.000000, 387.755859, 0.000000,
+ 395.343750, 0.000000, 395.343750, 0.000000, 395.343750, 0.000000, 398.343750, 0.000000,
+ 405.931641, 0.000000, 405.931641, 0.000000, 405.931641, 0.000000, 405.931641, 0.000000,
+ 408.931641, 0.000000, 414.052734, 0.000000, 414.052734, 0.000000, 414.052734, 0.000000,
+ 414.052734, 0.000000, 422.056641, 0.000000, 425.056641, 0.000000, 431.115234, 0.000000,
+ 433.060547, 0.000000, 433.060547, 0.000000, 436.060547, 0.000000, 444.064453, 0.000000,
+ 444.064453, 0.000000, 442.119141, 0.000000, 444.064453, 0.000000, 444.064453, 0.000000,
+ 447.064453, 0.000000, 454.060547, 0.000000, 454.060547, 0.000000, 454.060547, 0.000000,
+ 457.060547, 0.000000, 465.064453, 0.000000, 465.064453, 0.000000, 465.064453, 0.000000,
+ 468.064453, 0.000000, 474.339844, 0.000000, 474.339844, 0.000000, 482.343750, 0.000000,
+ 485.343750, 0.000000, 491.619141, 0.000000, 491.619141, 0.000000, 499.623047, 0.000000,
+ 502.623047, 0.000000, 508.675781, 0.000000, 510.626953, 0.000000, 513.626953, 0.000000,
+ 519.380859, 0.000000, 519.380859, 0.000000, 519.380859, 0.000000, 519.380859, 0.000000,
+ 527.384766, 0.000000, 530.384766, 0.000000, 538.628906, 0.000000, 538.628906, 0.000000,
+ 538.628906, 0.000000, 538.628906, 0.000000, 541.628906, 0.000000, 546.427734, 0.000000,
+ 546.427734, 0.000000, 546.427734, 0.000000, 546.427734, 0.000000, 554.431641, 0.000000,
+ 557.431641, 0.000000, 564.064453, 0.000000, 564.064453, 0.000000, 564.064453, 0.000000,
+ 567.064453, 0.000000, 570.427734, 0.000000, 578.431641, 0.000000, 581.431641, 0.000000,
+ 584.794922, 0.000000, 591.345703, 0.000000, 594.345703, 0.000000, 603.052734, 0.000000,
+ 603.052734, 0.000000, 606.052734, 0.000000, 612.667969, 0.000000, 612.667969, 0.000000,
+ 615.667969, 0.000000, 621.720703, 0.000000, 623.671875, 0.000000, 623.671875, 0.000000,
+ 623.671875, 0.000000, 626.671875, 0.000000, 632.736328, 0.000000, 634.675781, 0.000000,
+ 634.675781, 0.000000, 634.675781, 0.000000, 637.675781, 0.000000, 643.728516, 0.000000,
+ 645.679688, 0.000000, 648.679688, 0.000000, 654.732422, 0.000000, 656.683594, 0.000000,
+ 659.683594, 0.000000, 665.736328, 0.000000, 667.687500, 0.000000, 670.687500, 0.000000,
+ 677.080078, 0.000000, 677.080078, 0.000000, 683.712891, 0.000000, 683.712891, 0.000000,
+ 683.712891, 0.000000, 686.712891, 0.000000, 692.988281, 0.000000, 692.988281, 0.000000,
+ 700.054688, 0.000000, 703.054688, 0.000000, 711.298828, 0.000000, 711.298828, 0.000000,
+ 711.298828, 0.000000, 714.298828, 0.000000, 722.542969, 0.000000, 722.542969, 0.000000,
+ 722.542969, 0.000000, 722.542969, 0.000000, 722.542969, 0.000000, 722.542969, 0.000000,
+ 725.542969, 0.000000, 732.175781, 0.000000, 732.175781, 0.000000, 732.175781, 0.000000,
+ 736.974609, 0.000000, 736.974609, 0.000000, 736.974609, 0.000000, 736.974609, 0.000000,
+ 744.978516, 0.000000, 747.978516, 0.000000, 755.566406, 0.000000, 755.566406, 0.000000,
+ 755.566406, 0.000000, 758.566406, 0.000000, 764.841797, 0.000000, 764.841797, 0.000000,
+ 768.673828, 0.000000, 768.673828, 0.000000, 775.541016, 0.000000, 778.541016, 0.000000,
+ 783.662109, 0.000000, 783.662109, 0.000000, 783.662109, 0.000000, 783.662109, 0.000000,
+ 791.666016, 0.000000, 794.666016, 0.000000, 800.730469, 0.000000, 802.669922, 0.000000,
+ 802.669922, 0.000000, 802.669922, 0.000000, 805.669922, 0.000000, 809.033203, 0.000000,
+ 817.037109, 0.000000, 817.037109, 0.000000, 817.037109, 0.000000, 817.037109, 0.000000,
+ 820.037109, 0.000000, 826.089844, 0.000000, 828.041016, 0.000000, 828.041016, 0.000000,
+ 828.041016, 0.000000, 828.041016, 0.000000, 831.041016, 0.000000, 834.404297, 0.000000,
+ 842.408203, 0.000000, 842.408203, 0.000000, 842.408203, 0.000000, 842.408203, 0.000000,
+ 842.408203, 0.000000, 842.408203, 0.000000, 845.408203, 0.000000, 848.771484, 0.000000,
+ 855.322266, 0.000000, 855.322266, 0.000000, 861.714844, 0.000000, 865.078125, 0.000000,
+ 868.078125, 0.000000, 871.441406, 0.000000, 881.167969, 0.000000, 881.167969, 0.000000,
+ 881.167969, 0.000000, 884.531250, 0.000000, 894.257813, 0.000000, 894.257813, 0.000000,
+ 894.257813, 0.000000, 897.621094, 0.000000, 906.175781, 0.000000, 909.175781, 0.000000,
+ 919.007813, 0.000000, 919.007813, 0.000000, 919.007813, 0.000000, 922.007813, 0.000000,
+ 932.349609, 0.000000, 932.349609, 0.000000, 932.349609, 0.000000, 935.349609, 0.000000,
+ 945.181641, 0.000000, 945.181641, 0.000000, 945.181641, 0.000000, 945.181641, 0.000000,
+ 945.181641, 0.000000, 948.181641, 0.000000, 958.330078, 0.000000, 958.330078, 0.000000,
+ 958.330078, 0.000000, 961.330078, 0.000000, 970.892578, 0.000000, 970.892578, 0.000000,
+ 970.892578, 0.000000, 973.892578, 0.000000, 983.455078, 0.000000, 983.455078, 0.000000,
+ 983.455078, 0.000000, 986.455078, 0.000000, 996.017578, 0.000000, 996.017578, 0.000000,
+ 996.017578, 0.000000, 996.017578, 0.000000, 996.017578, 0.000000, 999.017578, 0.000000,
+ 1009.347656, 0.000000, 1009.347656, 0.000000, 1009.347656, 0.000000, 1009.347656, 0.000000,
+ 1009.347656, 0.000000, 1009.347656, 0.000000, 1009.347656, 0.000000, 1012.347656, 0.000000,
+ 1022.027344, 0.000000, 1022.027344, 0.000000, 1022.027344, 0.000000, 1022.027344, 0.000000,
+ 1022.027344, 0.000000, 1022.027344, 0.000000, 1022.027344, 0.000000, 1025.027344, 0.000000,
+ 1028.390625, 0.000000, 1034.666016, 0.000000, 1034.666016, 0.000000, 1038.498047, 0.000000,
+ 1038.498047, 0.000000, 1045.365234, 0.000000, 1045.365234, 0.000000, 1045.365234, 0.000000,
+ 1048.365234, 0.000000, 1053.697266, 0.000000, 1054.195313, 0.000000, 1060.025391, 0.000000,
+ 1060.025391, 0.000000, 1059.322266, 0.000000, 1060.025391, 0.000000, 1060.025391, 0.000000,
+ 1063.025391, 0.000000, 1069.078125, 0.000000, 1071.029297, 0.000000, 1074.029297, 0.000000,
+ 1080.082031, 0.000000, 1082.033203, 0.000000, 1085.033203, 0.000000, 1091.085938, 0.000000,
+ 1093.037109, 0.000000, 1096.037109, 0.000000, 1102.089844, 0.000000, 1104.041016, 0.000000,
+ 1107.041016, 0.000000, 1113.093750, 0.000000, 1115.044922, 0.000000, 1118.044922, 0.000000,
+ 1124.097656, 0.000000, 1126.048828, 0.000000, 1129.048828, 0.000000, 1135.101563, 0.000000,
+ 1137.052734, 0.000000, 1140.052734, 0.000000, 1146.603516, 0.000000, 1146.603516, 0.000000,
+ 1149.603516, 0.000000, 1156.154297, 0.000000, 1156.154297, 0.000000, 1159.154297, 0.000000,
+ 1165.623047, 0.000000, 1165.705078, 0.000000, 1168.705078, 0.000000, 1175.173828, 0.000000,
+ 1175.255859, 0.000000, 1178.255859, 0.000000, 1184.724609, 0.000000, 1184.806641, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Japanese Han" script="hani" lang="JAN">
+ <test-font name="ARIALUNI.TTF" version="Version 1.01" checksum="0x7E2F7B2D"/>
+
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+
+ <result-glyphs>
+ 0x000020BC, 0x000025DD, 0x00002149, 0x00003EA0, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003,
+ 0x0000267F, 0x0000410D, 0x00000003, 0x000020BC, 0x0000567E, 0x00002149, 0x00003EA0, 0x00002400,
+ 0x0000271B, 0x0000299A, 0x00000003, 0x00005489, 0x000042F2
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000,
+ 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000,
+ 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000,
+ 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000,
+ 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000,
+ 214.001953, 0.000000, 226.001953, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Korean Han" script="hani" lang="KOR">
+ <test-font name="ARIALUNI.TTF" version="Version 1.01" checksum="0x7E2F7B2D"/>
+
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+
+ <result-glyphs>
+ 0x000020BC, 0x000025DD, 0x00002149, 0x00003EA0, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003,
+ 0x0000267F, 0x0000410D, 0x00000003, 0x000020BC, 0x00007492, 0x00002149, 0x00003EA0, 0x00002400,
+ 0x0000271B, 0x0000299A, 0x00000003, 0x00005489, 0x000042F2
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000,
+ 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000,
+ 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000,
+ 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000,
+ 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000,
+ 214.001953, 0.000000, 226.001953, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Traditional Han" script="hani" lang="ZHT">
+ <test-font name="ARIALUNI.TTF" version="Version 1.01" checksum="0x7E2F7B2D"/>
+
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+
+ <result-glyphs>
+ 0x000020BC, 0x000025DD, 0x00002149, 0x000079EB, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003,
+ 0x00007677, 0x0000410D, 0x00000003, 0x000020BC, 0x00007E26, 0x00002149, 0x000079EB, 0x00002400,
+ 0x0000271B, 0x0000299A, 0x00000003, 0x00007D8F, 0x00007A97
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000,
+ 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000,
+ 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000,
+ 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000,
+ 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000,
+ 214.001953, 0.000000, 226.001953, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Simplified Han" script="hani" lang="ZHS">
+ <test-font name="ARIALUNI.TTF" version="Version 1.01" checksum="0x7E2F7B2D"/>
+
+ <test-text>中åŽäººæ°‘共和国 å°æ¹¾ 中è¯äººæ°‘共和國 臺ç£</test-text>
+
+ <result-glyphs>
+ 0x000020BC, 0x000025DD, 0x00002149, 0x000079EB, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003,
+ 0x00007677, 0x00008886, 0x00000003, 0x000020BC, 0x0000567E, 0x00002149, 0x000079EB, 0x00002400,
+ 0x0000271B, 0x0000299A, 0x00000003, 0x00007D8F, 0x00007A97
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000,
+ 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000,
+ 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000,
+ 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000,
+ 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000,
+ 214.001953, 0.000000, 226.001953, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Deva locl Hindi" script="deva" lang="HIN">
+ <test-font name="TestFont1.otf" version="Version 001.000 " checksum="0x75B4A535"/>
+
+ <test-text>शङ़à¥</test-text>
+
+ <result-glyphs>
+ 0x00000002, 0x00000001, 0x00000006, 0x0000FFFF
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 7.572000, 0.000000, 15.108000, 0.000000, 15.108000, 0.000000,
+ 15.108000, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Deva locl Marathi" script="deva" lang="MAR">
+ <test-font name="TestFont1.otf" version="Version 001.000 " checksum="0x75B4A535"/>
+
+ <test-text>शङ़à¥</test-text>
+
+ <result-glyphs>
+ 0x00000005, 0x00000001, 0x00000006, 0x0000FFFF
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 7.392000, 0.000000, 14.927999, 0.000000, 14.927999, 0.000000,
+ 14.927999, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Deva ZWJ" script="deva">
+ <test-font name="raghu.ttf" version="Version 0.99" checksum="0x541C94C7"/>
+
+ <test-text>कà¥à¤· रà¥à¤• कà¥â€à¤· रà¥â€à¤•</test-text>
+
+ <result-glyphs>
+ 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000080, 0x0000005B, 0x0000FFFF, 0x00000003,
+ 0x000000C8, 0x0000FFFF, 0x00000001, 0x0000009F, 0x00000003, 0x000000E2, 0x0000FFFF, 0x00000001,
+ 0x00000080
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000006, 0x00000004, 0x00000005, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
+ 0x00000010
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 10.875000, 0.000000, 10.875000, 0.000000, 10.875000, 0.000000,
+ 16.875000, 0.000000, 24.779297, 0.263672, 27.750000, 0.000000, 27.750000, 0.000000,
+ 33.750000, 0.000000, 42.468750, 0.000000, 42.468750, 0.000000, 42.468750, 0.000000,
+ 50.437500, 0.000000, 56.437500, 0.000000, 60.187500, 0.000000, 60.187500, 0.000000,
+ 60.187500, 0.000000, 71.062500, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Hangul" script="hang">
+ <test-text>마만만</test-text>
+
+ <result-glyphs>
+ 0x0000B9C8, 0x0000FFFF, 0x0000B9CC, 0x0000FFFF, 0x0000FFFF, 0x0000B9CC, 0x0000FFFF
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000,
+ 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Not Language Specific" script="latn">
+ <test-font name="fp9r8a.otf" version="Version 0.9.5 " checksum="0x40F43E0D"/>
+
+ <test-text>Ţhiş iş a ţeşţ.</test-text>
+
+ <result-glyphs>
+ 0x00000107, 0x00000049, 0x0000004A, 0x00000104, 0x00000001, 0x0000004A, 0x00000104, 0x00000001,
+ 0x00000042, 0x00000001, 0x00000108, 0x00000046, 0x00000104, 0x00000108, 0x0000000F
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 7.356000, 0.000000, 14.340000, 0.000000, 17.832001, 0.000000,
+ 22.920000, 0.000000, 25.920000, 0.000000, 29.412001, 0.000000, 34.500000, 0.000000,
+ 37.500000, 0.000000, 43.500000, 0.000000, 46.500000, 0.000000, 50.411999, 0.000000,
+ 56.160000, 0.000000, 61.248001, 0.000000, 65.160004, 0.000000, 68.160004, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Romaanian Language Specific" script="latn" lang="ROM">
+ <test-font name="fp9r8a.otf" version="Version 0.9.5 " checksum="0x40F43E0D"/>
+
+ <test-text>Ţhiş iş a ţeşţ.</test-text>
+
+ <result-glyphs>
+ 0x00000121, 0x00000049, 0x0000004A, 0x00000120, 0x00000001, 0x0000004A, 0x00000120, 0x00000001,
+ 0x00000042, 0x00000001, 0x00000122, 0x00000046, 0x00000120, 0x00000122, 0x0000000F
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 7.356000, 0.000000, 14.340000, 0.000000, 17.832001, 0.000000,
+ 22.920000, 0.000000, 25.920000, 0.000000, 29.412001, 0.000000, 34.500000, 0.000000,
+ 37.500000, 0.000000, 43.500000, 0.000000, 46.500000, 0.000000, 50.411999, 0.000000,
+ 56.160000, 0.000000, 61.248001, 0.000000, 65.160004, 0.000000, 68.160004, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Hebrew Mark Test" script="hebr">
+ <test-font name="SBL_Hbrw.ttf" version="Version 1.51 Build 001" checksum="0x5126B325"/>
+
+ <test-text>מָש×Ö°×›Öµ× Ö´×™×ַחֲרֶיךָנָּרוּצָההֱבִי×ַנִיהַמֶּלֶךְחֲדָרָיונָגִילָהוְנִשְׂמְחָהבָּךְנַזְכִּירָהדֹדֶיךָמִיַּיִןמֵיש×ָרִי××ֲהֵבוּךָ</test-text>
+
+ <result-glyphs>
+ 0x0000FFFF, 0x00000055, 0x0000FFFF, 0x0000004B, 0x0000001D, 0x00000097, 0x00000021, 0x00000094,
+ 0x0000001B, 0x0000002D, 0x00000027, 0x00000096, 0x0000003A, 0x0000009A, 0x0000FFFF, 0x00000066,
+ 0x00000027, 0x00000097, 0x0000002F, 0x00000030, 0x00000096, 0x00000027, 0x00000099, 0x0000FFFF,
+ 0x00000051, 0x00000096, 0x0000002F, 0x0000FFFF, 0x00000055, 0x00000027, 0x00000098, 0x0000001F,
+ 0x0000009C, 0x0000001F, 0x00000021, 0x0000009A, 0x0000003A, 0x00000027, 0x00000096, 0x0000FFFF,
+ 0x00000056, 0x00000092, 0x00000024, 0x00000099, 0x00000031, 0x0000FFFF, 0x00000054, 0x0000009A,
+ 0x0000FFFF, 0x00000043, 0x00000021, 0x0000009A, 0x00000025, 0x00000092, 0x0000002F, 0x00000092,
+ 0x0000FFFF, 0x00000067, 0x00000096, 0x00000031, 0x00000092, 0x00000023, 0x00000021, 0x0000009A,
+ 0x0000002B, 0x00000027, 0x00000096, 0x0000001E, 0x0000009A, 0x00000031, 0x00000023, 0x00000027,
+ 0x0000009A, 0x0000003A, 0x0000009A, 0x0000001F, 0x00000094, 0x00000025, 0x0000FFFF, 0x00000054,
+ 0x00000098, 0x0000002B, 0x00000098, 0x0000FFFF, 0x0000005D, 0x00000099, 0x00000021, 0x00000027,
+ 0x00000096, 0x00000031, 0x00000099, 0x0000001B, 0x00000027, 0x00000096, 0x0000001D, 0x00000093,
+ 0x00000021, 0x00000021, 0x0000009A, 0x00000038, 0x0000FFFF, 0x0000004B, 0x0000003A, 0x0000009A,
+ 0x0000FFFF, 0x0000005E, 0x0000FFFF, 0x00000055, 0x00000027, 0x00000098, 0x0000003A, 0x00000094,
+ 0x00000025, 0x00000099, 0x0000001B, 0x00000027, 0x00000096, 0x00000031, 0x00000097, 0x00000029,
+ 0x00000092, 0x0000FFFF, 0x00000066, 0x0000009A, 0x0000002F
+ </result-glyphs>
+
+ <result-indices>
+ 0x0000007C, 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075,
+ 0x00000074, 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D,
+ 0x0000006C, 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065,
+ 0x00000064, 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D,
+ 0x0000005C, 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055,
+ 0x00000054, 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D,
+ 0x0000004C, 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045,
+ 0x00000044, 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D,
+ 0x0000003C, 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035,
+ 0x00000034, 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D,
+ 0x0000002C, 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025,
+ 0x00000024, 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D,
+ 0x0000001C, 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015,
+ 0x00000014, 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D,
+ 0x0000000C, 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005,
+ 0x00000004, 0x00000003, 0x00000002, 0x00000001, 0x00000000
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 0.000000, 0.000000, 5.806641, 0.000000, 5.806641, 0.000000,
+ 9.087891, 0.000000, 18.679688, 0.000000, 15.251953, 0.000000, 25.365234, 0.000000,
+ 21.878906, 0.000000, 28.787109, 0.000000, 35.191406, 0.000000, 42.966797, 0.000000,
+ 38.279297, 0.000000, 47.982422, 0.000000, 44.085938, 0.000000, 44.085938, 0.000000,
+ 52.347656, 0.000000, 58.453125, 0.000000, 55.113281, 0.000000, 62.021484, 0.000000,
+ 66.292969, 0.000000, 64.886719, 0.000000, 69.292969, 0.000000, 67.886719, 0.000000,
+ 67.886719, 0.000000, 74.050781, 0.000000, 70.710938, 0.000000, 77.619141, 0.000000,
+ 77.619141, 0.000000, 83.425781, 0.000000, 90.527344, 0.000000, 86.513672, 0.000000,
+ 91.804688, 0.000000, 92.390625, 0.000000, 98.267578, 0.000000, 109.347656, 0.000000,
+ 104.894531, 0.000000, 110.701172, 0.000000, 116.250000, 0.000000, 113.701172, 0.000000,
+ 113.554688, 0.000000, 121.242188, 0.000000, 119.484375, 0.000000, 124.552734, 0.000000,
+ 122.677734, 0.000000, 126.679688, 0.000000, 126.679688, 0.000000, 135.210938, 0.000000,
+ 132.486328, 0.000000, 132.251953, 0.000000, 138.416016, 0.000000, 148.734375, 0.000000,
+ 145.042969, 0.000000, 155.308594, 0.000000, 151.968750, 0.000000, 162.773438, 0.000000,
+ 158.876953, 0.000000, 158.876953, 0.000000, 168.398438, 0.000000, 166.523438, 0.000000,
+ 172.546875, 0.000000, 170.525391, 0.000000, 173.689453, 0.000000, 182.718750, 0.000000,
+ 180.199219, 0.000000, 185.583984, 0.000000, 190.107422, 0.000000, 187.998047, 0.000000,
+ 194.132813, 0.000000, 192.257813, 0.000000, 196.259766, 0.000000, 199.423828, 0.000000,
+ 206.964844, 0.000000, 202.511719, 0.000000, 212.332031, 0.000000, 208.318359, 0.000000,
+ 217.886719, 0.000000, 214.195313, 0.000000, 221.121094, 0.000000, 221.121094, 0.000000,
+ 229.447266, 0.000000, 226.927734, 0.000000, 235.652344, 0.000000, 232.312500, 0.000000,
+ 232.312500, 0.000000, 242.648438, 0.000000, 239.220703, 0.000000, 245.847656, 0.000000,
+ 250.195313, 0.000000, 248.320313, 0.000000, 255.808594, 0.000000, 252.322266, 0.000000,
+ 259.230469, 0.000000, 265.042969, 0.000000, 262.083984, 0.000000, 271.675781, 0.000000,
+ 268.248047, 0.000000, 274.875000, 0.000000, 284.197266, 0.000000, 281.501953, 0.000000,
+ 287.250000, 0.000000, 287.250000, 0.000000, 290.531250, 0.000000, 298.212891, 0.000000,
+ 296.337891, 0.000000, 296.337891, 0.000000, 300.339844, 0.000000, 300.339844, 0.000000,
+ 306.146484, 0.000000, 313.687500, 0.000000, 309.234375, 0.000000, 318.732422, 0.000000,
+ 315.041016, 0.000000, 325.453125, 0.000000, 321.966797, 0.000000, 328.875000, 0.000000,
+ 333.222656, 0.000000, 331.347656, 0.000000, 338.044922, 0.000000, 335.349609, 0.000000,
+ 345.175781, 0.000000, 341.279297, 0.000000, 341.279297, 0.000000, 352.558594, 0.000000,
+ 349.218750, 0.000000, 356.126953, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Broken Font Test" script="hani" lang="ZHT">
+ <test-font name="BMIN00M.TTF" version="Version 2.00" checksum="0xF16BE0C6"/>
+
+ <test-text>中è¯äººæ°‘共和國 臺ç£</test-text>
+
+ <result-glyphs>
+ 0x00000292, 0x000024E8, 0x000002D1, 0x00001582, 0x000004A1, 0x00000650, 0x000007E2, 0x00000021,
+ 0x00002395, 0x00001896
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
+ 0x00000008, 0x00000009
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000,
+ 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000,
+ 90.000000, 0.000000, 102.000000, 0.000000, 114.000000, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Malayalam Samvruthokaram Test" script="mlym">
+ <test-font name="lohit_ml.ttf" version="Version 1.00" checksum="0xDBFE176D"/>
+
+ <test-text>à´£àµàµ</test-text>
+
+ <result-glyphs>
+ 0x00000023, 0x0000003C, 0x00000045
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000000, 0x00000001, 0x00000002
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 15.117188, 0.000000, 18.503906, 0.000000, 18.503906, 0.000000
+ </result-positions>
+ </test-case>
+
+ <test-case id="Sinhala Al-Lakuna Test" script="sinh">
+ <test-font name="lklug.hj.ttf" version="Version 0.3 " checksum="0x2A8B3DA2"/>
+
+ <test-text>ක්â€à¶»à·™ ක්â€à¶ºà·™ ක්â€à·‚à·™ ක්â€à·‚à·Šâ€à¶ºà·™ ක්ෂෙ කර්â€à¶¸à·™ ස්ට්â€à¶»à·š à·ƒâ€à·Šà·ƒà·™ ස්ස</test-text>
+
+ <result-glyphs>
+ 0x0000004A, 0x000001D3, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x0000004A, 0x00000018,
+ 0x00000089, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x0000004A, 0x00000088, 0x0000FFFF, 0x0000FFFF,
+ 0x0000FFFF, 0x00000003, 0x0000004A, 0x00000088, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000089,
+ 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000001D4, 0x0000FFFF, 0x0000004A, 0x0000003C, 0x00000003,
+ 0x00000018, 0x0000004A, 0x000001F6, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000A7,
+ 0x0000FFFF, 0x0000004A, 0x00000078, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003,
+ 0x0000004A, 0x00000201, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000A7, 0x0000FFFF,
+ 0x0000003D
+ </result-glyphs>
+
+ <result-indices>
+ 0x00000004, 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000005, 0x0000000A, 0x00000006,
+ 0x00000007, 0x00000008, 0x00000009, 0x0000000B, 0x00000010, 0x0000000C, 0x0000000D, 0x0000000E,
+ 0x0000000F, 0x00000011, 0x00000019, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016,
+ 0x00000017, 0x00000018, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001E, 0x0000001D, 0x0000001F,
+ 0x00000020, 0x00000025, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000026, 0x00000027,
+ 0x00000028, 0x0000002D, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E,
+ 0x00000033, 0x0000002F, 0x00000030, 0x00000031, 0x00000032, 0x00000034, 0x00000035, 0x00000036,
+ 0x00000037
+ </result-indices>
+
+ <result-positions>
+ 0.000000, 0.000000, 8.520000, 0.000000, 19.224001, 0.000000, 19.224001, 0.000000,
+ 19.224001, 0.000000, 19.224001, 0.000000, 26.640001, 0.000000, 35.160004, 0.000000,
+ 45.864006, 0.000000, 51.936005, 0.000000, 51.936005, 0.000000, 51.936005, 0.000000,
+ 59.352005, 0.000000, 67.872009, 0.000000, 82.704010, 0.000000, 82.704010, 0.000000,
+ 82.704010, 0.000000, 82.704010, 0.000000, 90.120010, 0.000000, 98.640015, 0.000000,
+ 113.472015, 0.000000, 113.472015, 0.000000, 113.472015, 0.000000, 113.472015, 0.000000,
+ 119.544014, 0.000000, 119.544014, 0.000000, 119.544014, 0.000000, 126.960014, 0.000000,
+ 137.664017, 0.000000, 137.664017, 0.000000, 146.184021, 0.000000, 154.296021, 0.000000,
+ 161.712021, 0.000000, 172.416016, 0.000000, 180.936020, 0.000000, 189.552017, 0.000000,
+ 189.552017, 0.000000, 189.552017, 0.000000, 189.552017, 0.000000, 196.968018, 0.000000,
+ 205.584015, 0.000000, 205.584015, 0.000000, 214.104019, 0.000000, 222.720016, 0.000000,
+ 222.720016, 0.000000, 222.720016, 0.000000, 222.720016, 0.000000, 222.720016, 0.000000,
+ 230.136017, 0.000000, 238.656021, 0.000000, 254.784027, 0.000000, 254.784027, 0.000000,
+ 254.784027, 0.000000, 254.784027, 0.000000, 262.200012, 0.000000, 270.816010, 0.000000,
+ 270.816010, 0.000000, 279.432007, 0.000000
+ </result-positions>
+ </test-case>
+
+</layout-tests>
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/mc.txt b/Build/source/libs/icu/icu-xetex/test/testdata/mc.txt
new file mode 100644
index 00000000000..dd27145ba85
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/mc.txt
@@ -0,0 +1,25 @@
+//--------------------------------------------------------------------
+// Copyright (c) 2003, International Business Machines
+// Corporation and others. All Rights Reserved.
+//--------------------------------------------------------------------
+// Author: Alan Liu
+// Created: March 20 2003
+// Since: ICU 2.6
+//--------------------------------------------------------------------
+
+// Test locale file for the fake locale 'mc', used to test the
+// ucat.h message catalog API.
+
+mc
+{
+ 1%4 { "Good morning." }
+ 1%5 { "Good afternoon." }
+ 1%7 { "Good evening." }
+ 1%8 { "Good night." }
+
+ 4%14 { "Please " }
+ 4%19 { "Thank you." }
+ 4%20 { "Sincerely," }
+}
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cis_prep.txt b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cis_prep.txt
new file mode 100644
index 00000000000..0ed83d5d35a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cis_prep.txt
@@ -0,0 +1,1945 @@
+###################
+# Copyright (C) 2003, International Business Machines
+# Corporation and others. All Rights Reserved.
+###################
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table A.1 from RFC 3454
+
+0221; ; UNASSIGNED
+0234..024F; ; UNASSIGNED
+02AE..02AF; ; UNASSIGNED
+02EF..02FF; ; UNASSIGNED
+0350..035F; ; UNASSIGNED
+0370..0373; ; UNASSIGNED
+0376..0379; ; UNASSIGNED
+037B..037D; ; UNASSIGNED
+037F..0383; ; UNASSIGNED
+038B; ; UNASSIGNED
+038D; ; UNASSIGNED
+03A2; ; UNASSIGNED
+03CF; ; UNASSIGNED
+03F7..03FF; ; UNASSIGNED
+0487; ; UNASSIGNED
+04CF; ; UNASSIGNED
+04F6..04F7; ; UNASSIGNED
+04FA..04FF; ; UNASSIGNED
+0510..0530; ; UNASSIGNED
+0557..0558; ; UNASSIGNED
+0560; ; UNASSIGNED
+0588; ; UNASSIGNED
+058B..0590; ; UNASSIGNED
+05A2; ; UNASSIGNED
+05BA; ; UNASSIGNED
+05C5..05CF; ; UNASSIGNED
+05EB..05EF; ; UNASSIGNED
+05F5..060B; ; UNASSIGNED
+060D..061A; ; UNASSIGNED
+061C..061E; ; UNASSIGNED
+0620; ; UNASSIGNED
+063B..063F; ; UNASSIGNED
+0656..065F; ; UNASSIGNED
+06EE..06EF; ; UNASSIGNED
+06FF; ; UNASSIGNED
+070E; ; UNASSIGNED
+072D..072F; ; UNASSIGNED
+074B..077F; ; UNASSIGNED
+07B2..0900; ; UNASSIGNED
+0904; ; UNASSIGNED
+093A..093B; ; UNASSIGNED
+094E..094F; ; UNASSIGNED
+0955..0957; ; UNASSIGNED
+0971..0980; ; UNASSIGNED
+0984; ; UNASSIGNED
+098D..098E; ; UNASSIGNED
+0991..0992; ; UNASSIGNED
+09A9; ; UNASSIGNED
+09B1; ; UNASSIGNED
+09B3..09B5; ; UNASSIGNED
+09BA..09BB; ; UNASSIGNED
+09BD; ; UNASSIGNED
+09C5..09C6; ; UNASSIGNED
+09C9..09CA; ; UNASSIGNED
+09CE..09D6; ; UNASSIGNED
+09D8..09DB; ; UNASSIGNED
+09DE; ; UNASSIGNED
+09E4..09E5; ; UNASSIGNED
+09FB..0A01; ; UNASSIGNED
+0A03..0A04; ; UNASSIGNED
+0A0B..0A0E; ; UNASSIGNED
+0A11..0A12; ; UNASSIGNED
+0A29; ; UNASSIGNED
+0A31; ; UNASSIGNED
+0A34; ; UNASSIGNED
+0A37; ; UNASSIGNED
+0A3A..0A3B; ; UNASSIGNED
+0A3D; ; UNASSIGNED
+0A43..0A46; ; UNASSIGNED
+0A49..0A4A; ; UNASSIGNED
+0A4E..0A58; ; UNASSIGNED
+0A5D; ; UNASSIGNED
+0A5F..0A65; ; UNASSIGNED
+0A75..0A80; ; UNASSIGNED
+0A84; ; UNASSIGNED
+0A8C; ; UNASSIGNED
+0A8E; ; UNASSIGNED
+0A92; ; UNASSIGNED
+0AA9; ; UNASSIGNED
+0AB1; ; UNASSIGNED
+0AB4; ; UNASSIGNED
+0ABA..0ABB; ; UNASSIGNED
+0AC6; ; UNASSIGNED
+0ACA; ; UNASSIGNED
+0ACE..0ACF; ; UNASSIGNED
+0AD1..0ADF; ; UNASSIGNED
+0AE1..0AE5; ; UNASSIGNED
+0AF0..0B00; ; UNASSIGNED
+0B04; ; UNASSIGNED
+0B0D..0B0E; ; UNASSIGNED
+0B11..0B12; ; UNASSIGNED
+0B29; ; UNASSIGNED
+0B31; ; UNASSIGNED
+0B34..0B35; ; UNASSIGNED
+0B3A..0B3B; ; UNASSIGNED
+0B44..0B46; ; UNASSIGNED
+0B49..0B4A; ; UNASSIGNED
+0B4E..0B55; ; UNASSIGNED
+0B58..0B5B; ; UNASSIGNED
+0B5E; ; UNASSIGNED
+0B62..0B65; ; UNASSIGNED
+0B71..0B81; ; UNASSIGNED
+0B84; ; UNASSIGNED
+0B8B..0B8D; ; UNASSIGNED
+0B91; ; UNASSIGNED
+0B96..0B98; ; UNASSIGNED
+0B9B; ; UNASSIGNED
+0B9D; ; UNASSIGNED
+0BA0..0BA2; ; UNASSIGNED
+0BA5..0BA7; ; UNASSIGNED
+0BAB..0BAD; ; UNASSIGNED
+0BB6; ; UNASSIGNED
+0BBA..0BBD; ; UNASSIGNED
+0BC3..0BC5; ; UNASSIGNED
+0BC9; ; UNASSIGNED
+0BCE..0BD6; ; UNASSIGNED
+0BD8..0BE6; ; UNASSIGNED
+0BF3..0C00; ; UNASSIGNED
+0C04; ; UNASSIGNED
+0C0D; ; UNASSIGNED
+0C11; ; UNASSIGNED
+0C29; ; UNASSIGNED
+0C34; ; UNASSIGNED
+0C3A..0C3D; ; UNASSIGNED
+0C45; ; UNASSIGNED
+0C49; ; UNASSIGNED
+0C4E..0C54; ; UNASSIGNED
+0C57..0C5F; ; UNASSIGNED
+0C62..0C65; ; UNASSIGNED
+0C70..0C81; ; UNASSIGNED
+0C84; ; UNASSIGNED
+0C8D; ; UNASSIGNED
+0C91; ; UNASSIGNED
+0CA9; ; UNASSIGNED
+0CB4; ; UNASSIGNED
+0CBA..0CBD; ; UNASSIGNED
+0CC5; ; UNASSIGNED
+0CC9; ; UNASSIGNED
+0CCE..0CD4; ; UNASSIGNED
+0CD7..0CDD; ; UNASSIGNED
+0CDF; ; UNASSIGNED
+0CE2..0CE5; ; UNASSIGNED
+0CF0..0D01; ; UNASSIGNED
+0D04; ; UNASSIGNED
+0D0D; ; UNASSIGNED
+0D11; ; UNASSIGNED
+0D29; ; UNASSIGNED
+0D3A..0D3D; ; UNASSIGNED
+0D44..0D45; ; UNASSIGNED
+0D49; ; UNASSIGNED
+0D4E..0D56; ; UNASSIGNED
+0D58..0D5F; ; UNASSIGNED
+0D62..0D65; ; UNASSIGNED
+0D70..0D81; ; UNASSIGNED
+0D84; ; UNASSIGNED
+0D97..0D99; ; UNASSIGNED
+0DB2; ; UNASSIGNED
+0DBC; ; UNASSIGNED
+0DBE..0DBF; ; UNASSIGNED
+0DC7..0DC9; ; UNASSIGNED
+0DCB..0DCE; ; UNASSIGNED
+0DD5; ; UNASSIGNED
+0DD7; ; UNASSIGNED
+0DE0..0DF1; ; UNASSIGNED
+0DF5..0E00; ; UNASSIGNED
+0E3B..0E3E; ; UNASSIGNED
+0E5C..0E80; ; UNASSIGNED
+0E83; ; UNASSIGNED
+0E85..0E86; ; UNASSIGNED
+0E89; ; UNASSIGNED
+0E8B..0E8C; ; UNASSIGNED
+0E8E..0E93; ; UNASSIGNED
+0E98; ; UNASSIGNED
+0EA0; ; UNASSIGNED
+0EA4; ; UNASSIGNED
+0EA6; ; UNASSIGNED
+0EA8..0EA9; ; UNASSIGNED
+0EAC; ; UNASSIGNED
+0EBA; ; UNASSIGNED
+0EBE..0EBF; ; UNASSIGNED
+0EC5; ; UNASSIGNED
+0EC7; ; UNASSIGNED
+0ECE..0ECF; ; UNASSIGNED
+0EDA..0EDB; ; UNASSIGNED
+0EDE..0EFF; ; UNASSIGNED
+0F48; ; UNASSIGNED
+0F6B..0F70; ; UNASSIGNED
+0F8C..0F8F; ; UNASSIGNED
+0F98; ; UNASSIGNED
+0FBD; ; UNASSIGNED
+0FCD..0FCE; ; UNASSIGNED
+0FD0..0FFF; ; UNASSIGNED
+1022; ; UNASSIGNED
+1028; ; UNASSIGNED
+102B; ; UNASSIGNED
+1033..1035; ; UNASSIGNED
+103A..103F; ; UNASSIGNED
+105A..109F; ; UNASSIGNED
+10C6..10CF; ; UNASSIGNED
+10F9..10FA; ; UNASSIGNED
+10FC..10FF; ; UNASSIGNED
+115A..115E; ; UNASSIGNED
+11A3..11A7; ; UNASSIGNED
+11FA..11FF; ; UNASSIGNED
+1207; ; UNASSIGNED
+1247; ; UNASSIGNED
+1249; ; UNASSIGNED
+124E..124F; ; UNASSIGNED
+1257; ; UNASSIGNED
+1259; ; UNASSIGNED
+125E..125F; ; UNASSIGNED
+1287; ; UNASSIGNED
+1289; ; UNASSIGNED
+128E..128F; ; UNASSIGNED
+12AF; ; UNASSIGNED
+12B1; ; UNASSIGNED
+12B6..12B7; ; UNASSIGNED
+12BF; ; UNASSIGNED
+12C1; ; UNASSIGNED
+12C6..12C7; ; UNASSIGNED
+12CF; ; UNASSIGNED
+12D7; ; UNASSIGNED
+12EF; ; UNASSIGNED
+130F; ; UNASSIGNED
+1311; ; UNASSIGNED
+1316..1317; ; UNASSIGNED
+131F; ; UNASSIGNED
+1347; ; UNASSIGNED
+135B..1360; ; UNASSIGNED
+137D..139F; ; UNASSIGNED
+13F5..1400; ; UNASSIGNED
+1677..167F; ; UNASSIGNED
+169D..169F; ; UNASSIGNED
+16F1..16FF; ; UNASSIGNED
+170D; ; UNASSIGNED
+1715..171F; ; UNASSIGNED
+1737..173F; ; UNASSIGNED
+1754..175F; ; UNASSIGNED
+176D; ; UNASSIGNED
+1771; ; UNASSIGNED
+1774..177F; ; UNASSIGNED
+17DD..17DF; ; UNASSIGNED
+17EA..17FF; ; UNASSIGNED
+180F; ; UNASSIGNED
+181A..181F; ; UNASSIGNED
+1878..187F; ; UNASSIGNED
+18AA..1DFF; ; UNASSIGNED
+1E9C..1E9F; ; UNASSIGNED
+1EFA..1EFF; ; UNASSIGNED
+1F16..1F17; ; UNASSIGNED
+1F1E..1F1F; ; UNASSIGNED
+1F46..1F47; ; UNASSIGNED
+1F4E..1F4F; ; UNASSIGNED
+1F58; ; UNASSIGNED
+1F5A; ; UNASSIGNED
+1F5C; ; UNASSIGNED
+1F5E; ; UNASSIGNED
+1F7E..1F7F; ; UNASSIGNED
+1FB5; ; UNASSIGNED
+1FC5; ; UNASSIGNED
+1FD4..1FD5; ; UNASSIGNED
+1FDC; ; UNASSIGNED
+1FF0..1FF1; ; UNASSIGNED
+1FF5; ; UNASSIGNED
+1FFF; ; UNASSIGNED
+2053..2056; ; UNASSIGNED
+2058..205E; ; UNASSIGNED
+2064..2069; ; UNASSIGNED
+2072..2073; ; UNASSIGNED
+208F..209F; ; UNASSIGNED
+20B2..20CF; ; UNASSIGNED
+20EB..20FF; ; UNASSIGNED
+213B..213C; ; UNASSIGNED
+214C..2152; ; UNASSIGNED
+2184..218F; ; UNASSIGNED
+23CF..23FF; ; UNASSIGNED
+2427..243F; ; UNASSIGNED
+244B..245F; ; UNASSIGNED
+24FF; ; UNASSIGNED
+2614..2615; ; UNASSIGNED
+2618; ; UNASSIGNED
+267E..267F; ; UNASSIGNED
+268A..2700; ; UNASSIGNED
+2705; ; UNASSIGNED
+270A..270B; ; UNASSIGNED
+2728; ; UNASSIGNED
+274C; ; UNASSIGNED
+274E; ; UNASSIGNED
+2753..2755; ; UNASSIGNED
+2757; ; UNASSIGNED
+275F..2760; ; UNASSIGNED
+2795..2797; ; UNASSIGNED
+27B0; ; UNASSIGNED
+27BF..27CF; ; UNASSIGNED
+27EC..27EF; ; UNASSIGNED
+2B00..2E7F; ; UNASSIGNED
+2E9A; ; UNASSIGNED
+2EF4..2EFF; ; UNASSIGNED
+2FD6..2FEF; ; UNASSIGNED
+2FFC..2FFF; ; UNASSIGNED
+3040; ; UNASSIGNED
+3097..3098; ; UNASSIGNED
+3100..3104; ; UNASSIGNED
+312D..3130; ; UNASSIGNED
+318F; ; UNASSIGNED
+31B8..31EF; ; UNASSIGNED
+321D..321F; ; UNASSIGNED
+3244..3250; ; UNASSIGNED
+327C..327E; ; UNASSIGNED
+32CC..32CF; ; UNASSIGNED
+32FF; ; UNASSIGNED
+3377..337A; ; UNASSIGNED
+33DE..33DF; ; UNASSIGNED
+33FF; ; UNASSIGNED
+4DB6..4DFF; ; UNASSIGNED
+9FA6..9FFF; ; UNASSIGNED
+A48D..A48F; ; UNASSIGNED
+A4C7..ABFF; ; UNASSIGNED
+D7A4..D7FF; ; UNASSIGNED
+FA2E..FA2F; ; UNASSIGNED
+FA6B..FAFF; ; UNASSIGNED
+FB07..FB12; ; UNASSIGNED
+FB18..FB1C; ; UNASSIGNED
+FB37; ; UNASSIGNED
+FB3D; ; UNASSIGNED
+FB3F; ; UNASSIGNED
+FB42; ; UNASSIGNED
+FB45; ; UNASSIGNED
+FBB2..FBD2; ; UNASSIGNED
+FD40..FD4F; ; UNASSIGNED
+FD90..FD91; ; UNASSIGNED
+FDC8..FDCF; ; UNASSIGNED
+FDFD..FDFF; ; UNASSIGNED
+FE10..FE1F; ; UNASSIGNED
+FE24..FE2F; ; UNASSIGNED
+FE47..FE48; ; UNASSIGNED
+FE53; ; UNASSIGNED
+FE67; ; UNASSIGNED
+FE6C..FE6F; ; UNASSIGNED
+FE75; ; UNASSIGNED
+FEFD..FEFE; ; UNASSIGNED
+FF00; ; UNASSIGNED
+FFBF..FFC1; ; UNASSIGNED
+FFC8..FFC9; ; UNASSIGNED
+FFD0..FFD1; ; UNASSIGNED
+FFD8..FFD9; ; UNASSIGNED
+FFDD..FFDF; ; UNASSIGNED
+FFE7; ; UNASSIGNED
+FFEF..FFF8; ; UNASSIGNED
+10000..102FF; ; UNASSIGNED
+1031F; ; UNASSIGNED
+10324..1032F; ; UNASSIGNED
+1034B..103FF; ; UNASSIGNED
+10426..10427; ; UNASSIGNED
+1044E..1CFFF; ; UNASSIGNED
+1D0F6..1D0FF; ; UNASSIGNED
+1D127..1D129; ; UNASSIGNED
+1D1DE..1D3FF; ; UNASSIGNED
+1D455; ; UNASSIGNED
+1D49D; ; UNASSIGNED
+1D4A0..1D4A1; ; UNASSIGNED
+1D4A3..1D4A4; ; UNASSIGNED
+1D4A7..1D4A8; ; UNASSIGNED
+1D4AD; ; UNASSIGNED
+1D4BA; ; UNASSIGNED
+1D4BC; ; UNASSIGNED
+1D4C1; ; UNASSIGNED
+1D4C4; ; UNASSIGNED
+1D506; ; UNASSIGNED
+1D50B..1D50C; ; UNASSIGNED
+1D515; ; UNASSIGNED
+1D51D; ; UNASSIGNED
+1D53A; ; UNASSIGNED
+1D53F; ; UNASSIGNED
+1D545; ; UNASSIGNED
+1D547..1D549; ; UNASSIGNED
+1D551; ; UNASSIGNED
+1D6A4..1D6A7; ; UNASSIGNED
+1D7CA..1D7CD; ; UNASSIGNED
+1D800..1FFFD; ; UNASSIGNED
+2A6D7..2F7FF; ; UNASSIGNED
+2FA1E..2FFFD; ; UNASSIGNED
+30000..3FFFD; ; UNASSIGNED
+40000..4FFFD; ; UNASSIGNED
+50000..5FFFD; ; UNASSIGNED
+60000..6FFFD; ; UNASSIGNED
+70000..7FFFD; ; UNASSIGNED
+80000..8FFFD; ; UNASSIGNED
+90000..9FFFD; ; UNASSIGNED
+A0000..AFFFD; ; UNASSIGNED
+B0000..BFFFD; ; UNASSIGNED
+C0000..CFFFD; ; UNASSIGNED
+D0000..DFFFD; ; UNASSIGNED
+E0000; ; UNASSIGNED
+E0002..E001F; ; UNASSIGNED
+E0080..EFFFD; ; UNASSIGNED
+
+# Total code points 3653
+
+# This table contains code points from Table B.1 from RFC 3454
+
+00AD; ; MAP
+034F; ; MAP
+1806; ; MAP
+180B; ; MAP
+180C; ; MAP
+180D; ; MAP
+200B; ; MAP
+200C; ; MAP
+200D; ; MAP
+2060; ; MAP
+FE00; ; MAP
+FE01; ; MAP
+FE02; ; MAP
+FE03; ; MAP
+FE04; ; MAP
+FE05; ; MAP
+FE06; ; MAP
+FE07; ; MAP
+FE08; ; MAP
+FE09; ; MAP
+FE0A; ; MAP
+FE0B; ; MAP
+FE0C; ; MAP
+FE0D; ; MAP
+FE0E; ; MAP
+FE0F; ; MAP
+FEFF; ; MAP
+
+# Total code points 27
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table B.2 from RFC 3454
+
+0041; 0061; MAP
+0042; 0062; MAP
+0043; 0063; MAP
+0044; 0064; MAP
+0045; 0065; MAP
+0046; 0066; MAP
+0047; 0067; MAP
+0048; 0068; MAP
+0049; 0069; MAP
+004A; 006A; MAP
+004B; 006B; MAP
+004C; 006C; MAP
+004D; 006D; MAP
+004E; 006E; MAP
+004F; 006F; MAP
+0050; 0070; MAP
+0051; 0071; MAP
+0052; 0072; MAP
+0053; 0073; MAP
+0054; 0074; MAP
+0055; 0075; MAP
+0056; 0076; MAP
+0057; 0077; MAP
+0058; 0078; MAP
+0059; 0079; MAP
+005A; 007A; MAP
+00B5; 03BC; MAP
+00C0; 00E0; MAP
+00C1; 00E1; MAP
+00C2; 00E2; MAP
+00C3; 00E3; MAP
+00C4; 00E4; MAP
+00C5; 00E5; MAP
+00C6; 00E6; MAP
+00C7; 00E7; MAP
+00C8; 00E8; MAP
+00C9; 00E9; MAP
+00CA; 00EA; MAP
+00CB; 00EB; MAP
+00CC; 00EC; MAP
+00CD; 00ED; MAP
+00CE; 00EE; MAP
+00CF; 00EF; MAP
+00D0; 00F0; MAP
+00D1; 00F1; MAP
+00D2; 00F2; MAP
+00D3; 00F3; MAP
+00D4; 00F4; MAP
+00D5; 00F5; MAP
+00D6; 00F6; MAP
+00D8; 00F8; MAP
+00D9; 00F9; MAP
+00DA; 00FA; MAP
+00DB; 00FB; MAP
+00DC; 00FC; MAP
+00DD; 00FD; MAP
+00DE; 00FE; MAP
+00DF; 0073 0073; MAP
+0100; 0101; MAP
+0102; 0103; MAP
+0104; 0105; MAP
+0106; 0107; MAP
+0108; 0109; MAP
+010A; 010B; MAP
+010C; 010D; MAP
+010E; 010F; MAP
+0110; 0111; MAP
+0112; 0113; MAP
+0114; 0115; MAP
+0116; 0117; MAP
+0118; 0119; MAP
+011A; 011B; MAP
+011C; 011D; MAP
+011E; 011F; MAP
+0120; 0121; MAP
+0122; 0123; MAP
+0124; 0125; MAP
+0126; 0127; MAP
+0128; 0129; MAP
+012A; 012B; MAP
+012C; 012D; MAP
+012E; 012F; MAP
+0130; 0069 0307; MAP
+0132; 0133; MAP
+0134; 0135; MAP
+0136; 0137; MAP
+0139; 013A; MAP
+013B; 013C; MAP
+013D; 013E; MAP
+013F; 0140; MAP
+0141; 0142; MAP
+0143; 0144; MAP
+0145; 0146; MAP
+0147; 0148; MAP
+0149; 02BC 006E; MAP
+014A; 014B; MAP
+014C; 014D; MAP
+014E; 014F; MAP
+0150; 0151; MAP
+0152; 0153; MAP
+0154; 0155; MAP
+0156; 0157; MAP
+0158; 0159; MAP
+015A; 015B; MAP
+015C; 015D; MAP
+015E; 015F; MAP
+0160; 0161; MAP
+0162; 0163; MAP
+0164; 0165; MAP
+0166; 0167; MAP
+0168; 0169; MAP
+016A; 016B; MAP
+016C; 016D; MAP
+016E; 016F; MAP
+0170; 0171; MAP
+0172; 0173; MAP
+0174; 0175; MAP
+0176; 0177; MAP
+0178; 00FF; MAP
+0179; 017A; MAP
+017B; 017C; MAP
+017D; 017E; MAP
+017F; 0073; MAP
+0181; 0253; MAP
+0182; 0183; MAP
+0184; 0185; MAP
+0186; 0254; MAP
+0187; 0188; MAP
+0189; 0256; MAP
+018A; 0257; MAP
+018B; 018C; MAP
+018E; 01DD; MAP
+018F; 0259; MAP
+0190; 025B; MAP
+0191; 0192; MAP
+0193; 0260; MAP
+0194; 0263; MAP
+0196; 0269; MAP
+0197; 0268; MAP
+0198; 0199; MAP
+019C; 026F; MAP
+019D; 0272; MAP
+019F; 0275; MAP
+01A0; 01A1; MAP
+01A2; 01A3; MAP
+01A4; 01A5; MAP
+01A6; 0280; MAP
+01A7; 01A8; MAP
+01A9; 0283; MAP
+01AC; 01AD; MAP
+01AE; 0288; MAP
+01AF; 01B0; MAP
+01B1; 028A; MAP
+01B2; 028B; MAP
+01B3; 01B4; MAP
+01B5; 01B6; MAP
+01B7; 0292; MAP
+01B8; 01B9; MAP
+01BC; 01BD; MAP
+01C4; 01C6; MAP
+01C5; 01C6; MAP
+01C7; 01C9; MAP
+01C8; 01C9; MAP
+01CA; 01CC; MAP
+01CB; 01CC; MAP
+01CD; 01CE; MAP
+01CF; 01D0; MAP
+01D1; 01D2; MAP
+01D3; 01D4; MAP
+01D5; 01D6; MAP
+01D7; 01D8; MAP
+01D9; 01DA; MAP
+01DB; 01DC; MAP
+01DE; 01DF; MAP
+01E0; 01E1; MAP
+01E2; 01E3; MAP
+01E4; 01E5; MAP
+01E6; 01E7; MAP
+01E8; 01E9; MAP
+01EA; 01EB; MAP
+01EC; 01ED; MAP
+01EE; 01EF; MAP
+01F0; 006A 030C; MAP
+01F1; 01F3; MAP
+01F2; 01F3; MAP
+01F4; 01F5; MAP
+01F6; 0195; MAP
+01F7; 01BF; MAP
+01F8; 01F9; MAP
+01FA; 01FB; MAP
+01FC; 01FD; MAP
+01FE; 01FF; MAP
+0200; 0201; MAP
+0202; 0203; MAP
+0204; 0205; MAP
+0206; 0207; MAP
+0208; 0209; MAP
+020A; 020B; MAP
+020C; 020D; MAP
+020E; 020F; MAP
+0210; 0211; MAP
+0212; 0213; MAP
+0214; 0215; MAP
+0216; 0217; MAP
+0218; 0219; MAP
+021A; 021B; MAP
+021C; 021D; MAP
+021E; 021F; MAP
+0220; 019E; MAP
+0222; 0223; MAP
+0224; 0225; MAP
+0226; 0227; MAP
+0228; 0229; MAP
+022A; 022B; MAP
+022C; 022D; MAP
+022E; 022F; MAP
+0230; 0231; MAP
+0232; 0233; MAP
+0345; 03B9; MAP
+037A; 0020 03B9; MAP
+0386; 03AC; MAP
+0388; 03AD; MAP
+0389; 03AE; MAP
+038A; 03AF; MAP
+038C; 03CC; MAP
+038E; 03CD; MAP
+038F; 03CE; MAP
+0390; 03B9 0308 0301; MAP
+0391; 03B1; MAP
+0392; 03B2; MAP
+0393; 03B3; MAP
+0394; 03B4; MAP
+0395; 03B5; MAP
+0396; 03B6; MAP
+0397; 03B7; MAP
+0398; 03B8; MAP
+0399; 03B9; MAP
+039A; 03BA; MAP
+039B; 03BB; MAP
+039C; 03BC; MAP
+039D; 03BD; MAP
+039E; 03BE; MAP
+039F; 03BF; MAP
+03A0; 03C0; MAP
+03A1; 03C1; MAP
+03A3; 03C3; MAP
+03A4; 03C4; MAP
+03A5; 03C5; MAP
+03A6; 03C6; MAP
+03A7; 03C7; MAP
+03A8; 03C8; MAP
+03A9; 03C9; MAP
+03AA; 03CA; MAP
+03AB; 03CB; MAP
+03B0; 03C5 0308 0301; MAP
+03C2; 03C3; MAP
+03D0; 03B2; MAP
+03D1; 03B8; MAP
+03D2; 03C5; MAP
+03D3; 03CD; MAP
+03D4; 03CB; MAP
+03D5; 03C6; MAP
+03D6; 03C0; MAP
+03D8; 03D9; MAP
+03DA; 03DB; MAP
+03DC; 03DD; MAP
+03DE; 03DF; MAP
+03E0; 03E1; MAP
+03E2; 03E3; MAP
+03E4; 03E5; MAP
+03E6; 03E7; MAP
+03E8; 03E9; MAP
+03EA; 03EB; MAP
+03EC; 03ED; MAP
+03EE; 03EF; MAP
+03F0; 03BA; MAP
+03F1; 03C1; MAP
+03F2; 03C3; MAP
+03F4; 03B8; MAP
+03F5; 03B5; MAP
+0400; 0450; MAP
+0401; 0451; MAP
+0402; 0452; MAP
+0403; 0453; MAP
+0404; 0454; MAP
+0405; 0455; MAP
+0406; 0456; MAP
+0407; 0457; MAP
+0408; 0458; MAP
+0409; 0459; MAP
+040A; 045A; MAP
+040B; 045B; MAP
+040C; 045C; MAP
+040D; 045D; MAP
+040E; 045E; MAP
+040F; 045F; MAP
+0410; 0430; MAP
+0411; 0431; MAP
+0412; 0432; MAP
+0413; 0433; MAP
+0414; 0434; MAP
+0415; 0435; MAP
+0416; 0436; MAP
+0417; 0437; MAP
+0418; 0438; MAP
+0419; 0439; MAP
+041A; 043A; MAP
+041B; 043B; MAP
+041C; 043C; MAP
+041D; 043D; MAP
+041E; 043E; MAP
+041F; 043F; MAP
+0420; 0440; MAP
+0421; 0441; MAP
+0422; 0442; MAP
+0423; 0443; MAP
+0424; 0444; MAP
+0425; 0445; MAP
+0426; 0446; MAP
+0427; 0447; MAP
+0428; 0448; MAP
+0429; 0449; MAP
+042A; 044A; MAP
+042B; 044B; MAP
+042C; 044C; MAP
+042D; 044D; MAP
+042E; 044E; MAP
+042F; 044F; MAP
+0460; 0461; MAP
+0462; 0463; MAP
+0464; 0465; MAP
+0466; 0467; MAP
+0468; 0469; MAP
+046A; 046B; MAP
+046C; 046D; MAP
+046E; 046F; MAP
+0470; 0471; MAP
+0472; 0473; MAP
+0474; 0475; MAP
+0476; 0477; MAP
+0478; 0479; MAP
+047A; 047B; MAP
+047C; 047D; MAP
+047E; 047F; MAP
+0480; 0481; MAP
+048A; 048B; MAP
+048C; 048D; MAP
+048E; 048F; MAP
+0490; 0491; MAP
+0492; 0493; MAP
+0494; 0495; MAP
+0496; 0497; MAP
+0498; 0499; MAP
+049A; 049B; MAP
+049C; 049D; MAP
+049E; 049F; MAP
+04A0; 04A1; MAP
+04A2; 04A3; MAP
+04A4; 04A5; MAP
+04A6; 04A7; MAP
+04A8; 04A9; MAP
+04AA; 04AB; MAP
+04AC; 04AD; MAP
+04AE; 04AF; MAP
+04B0; 04B1; MAP
+04B2; 04B3; MAP
+04B4; 04B5; MAP
+04B6; 04B7; MAP
+04B8; 04B9; MAP
+04BA; 04BB; MAP
+04BC; 04BD; MAP
+04BE; 04BF; MAP
+04C1; 04C2; MAP
+04C3; 04C4; MAP
+04C5; 04C6; MAP
+04C7; 04C8; MAP
+04C9; 04CA; MAP
+04CB; 04CC; MAP
+04CD; 04CE; MAP
+04D0; 04D1; MAP
+04D2; 04D3; MAP
+04D4; 04D5; MAP
+04D6; 04D7; MAP
+04D8; 04D9; MAP
+04DA; 04DB; MAP
+04DC; 04DD; MAP
+04DE; 04DF; MAP
+04E0; 04E1; MAP
+04E2; 04E3; MAP
+04E4; 04E5; MAP
+04E6; 04E7; MAP
+04E8; 04E9; MAP
+04EA; 04EB; MAP
+04EC; 04ED; MAP
+04EE; 04EF; MAP
+04F0; 04F1; MAP
+04F2; 04F3; MAP
+04F4; 04F5; MAP
+04F8; 04F9; MAP
+0500; 0501; MAP
+0502; 0503; MAP
+0504; 0505; MAP
+0506; 0507; MAP
+0508; 0509; MAP
+050A; 050B; MAP
+050C; 050D; MAP
+050E; 050F; MAP
+0531; 0561; MAP
+0532; 0562; MAP
+0533; 0563; MAP
+0534; 0564; MAP
+0535; 0565; MAP
+0536; 0566; MAP
+0537; 0567; MAP
+0538; 0568; MAP
+0539; 0569; MAP
+053A; 056A; MAP
+053B; 056B; MAP
+053C; 056C; MAP
+053D; 056D; MAP
+053E; 056E; MAP
+053F; 056F; MAP
+0540; 0570; MAP
+0541; 0571; MAP
+0542; 0572; MAP
+0543; 0573; MAP
+0544; 0574; MAP
+0545; 0575; MAP
+0546; 0576; MAP
+0547; 0577; MAP
+0548; 0578; MAP
+0549; 0579; MAP
+054A; 057A; MAP
+054B; 057B; MAP
+054C; 057C; MAP
+054D; 057D; MAP
+054E; 057E; MAP
+054F; 057F; MAP
+0550; 0580; MAP
+0551; 0581; MAP
+0552; 0582; MAP
+0553; 0583; MAP
+0554; 0584; MAP
+0555; 0585; MAP
+0556; 0586; MAP
+0587; 0565 0582; MAP
+1E00; 1E01; MAP
+1E02; 1E03; MAP
+1E04; 1E05; MAP
+1E06; 1E07; MAP
+1E08; 1E09; MAP
+1E0A; 1E0B; MAP
+1E0C; 1E0D; MAP
+1E0E; 1E0F; MAP
+1E10; 1E11; MAP
+1E12; 1E13; MAP
+1E14; 1E15; MAP
+1E16; 1E17; MAP
+1E18; 1E19; MAP
+1E1A; 1E1B; MAP
+1E1C; 1E1D; MAP
+1E1E; 1E1F; MAP
+1E20; 1E21; MAP
+1E22; 1E23; MAP
+1E24; 1E25; MAP
+1E26; 1E27; MAP
+1E28; 1E29; MAP
+1E2A; 1E2B; MAP
+1E2C; 1E2D; MAP
+1E2E; 1E2F; MAP
+1E30; 1E31; MAP
+1E32; 1E33; MAP
+1E34; 1E35; MAP
+1E36; 1E37; MAP
+1E38; 1E39; MAP
+1E3A; 1E3B; MAP
+1E3C; 1E3D; MAP
+1E3E; 1E3F; MAP
+1E40; 1E41; MAP
+1E42; 1E43; MAP
+1E44; 1E45; MAP
+1E46; 1E47; MAP
+1E48; 1E49; MAP
+1E4A; 1E4B; MAP
+1E4C; 1E4D; MAP
+1E4E; 1E4F; MAP
+1E50; 1E51; MAP
+1E52; 1E53; MAP
+1E54; 1E55; MAP
+1E56; 1E57; MAP
+1E58; 1E59; MAP
+1E5A; 1E5B; MAP
+1E5C; 1E5D; MAP
+1E5E; 1E5F; MAP
+1E60; 1E61; MAP
+1E62; 1E63; MAP
+1E64; 1E65; MAP
+1E66; 1E67; MAP
+1E68; 1E69; MAP
+1E6A; 1E6B; MAP
+1E6C; 1E6D; MAP
+1E6E; 1E6F; MAP
+1E70; 1E71; MAP
+1E72; 1E73; MAP
+1E74; 1E75; MAP
+1E76; 1E77; MAP
+1E78; 1E79; MAP
+1E7A; 1E7B; MAP
+1E7C; 1E7D; MAP
+1E7E; 1E7F; MAP
+1E80; 1E81; MAP
+1E82; 1E83; MAP
+1E84; 1E85; MAP
+1E86; 1E87; MAP
+1E88; 1E89; MAP
+1E8A; 1E8B; MAP
+1E8C; 1E8D; MAP
+1E8E; 1E8F; MAP
+1E90; 1E91; MAP
+1E92; 1E93; MAP
+1E94; 1E95; MAP
+1E96; 0068 0331; MAP
+1E97; 0074 0308; MAP
+1E98; 0077 030A; MAP
+1E99; 0079 030A; MAP
+1E9A; 0061 02BE; MAP
+1E9B; 1E61; MAP
+1EA0; 1EA1; MAP
+1EA2; 1EA3; MAP
+1EA4; 1EA5; MAP
+1EA6; 1EA7; MAP
+1EA8; 1EA9; MAP
+1EAA; 1EAB; MAP
+1EAC; 1EAD; MAP
+1EAE; 1EAF; MAP
+1EB0; 1EB1; MAP
+1EB2; 1EB3; MAP
+1EB4; 1EB5; MAP
+1EB6; 1EB7; MAP
+1EB8; 1EB9; MAP
+1EBA; 1EBB; MAP
+1EBC; 1EBD; MAP
+1EBE; 1EBF; MAP
+1EC0; 1EC1; MAP
+1EC2; 1EC3; MAP
+1EC4; 1EC5; MAP
+1EC6; 1EC7; MAP
+1EC8; 1EC9; MAP
+1ECA; 1ECB; MAP
+1ECC; 1ECD; MAP
+1ECE; 1ECF; MAP
+1ED0; 1ED1; MAP
+1ED2; 1ED3; MAP
+1ED4; 1ED5; MAP
+1ED6; 1ED7; MAP
+1ED8; 1ED9; MAP
+1EDA; 1EDB; MAP
+1EDC; 1EDD; MAP
+1EDE; 1EDF; MAP
+1EE0; 1EE1; MAP
+1EE2; 1EE3; MAP
+1EE4; 1EE5; MAP
+1EE6; 1EE7; MAP
+1EE8; 1EE9; MAP
+1EEA; 1EEB; MAP
+1EEC; 1EED; MAP
+1EEE; 1EEF; MAP
+1EF0; 1EF1; MAP
+1EF2; 1EF3; MAP
+1EF4; 1EF5; MAP
+1EF6; 1EF7; MAP
+1EF8; 1EF9; MAP
+1F08; 1F00; MAP
+1F09; 1F01; MAP
+1F0A; 1F02; MAP
+1F0B; 1F03; MAP
+1F0C; 1F04; MAP
+1F0D; 1F05; MAP
+1F0E; 1F06; MAP
+1F0F; 1F07; MAP
+1F18; 1F10; MAP
+1F19; 1F11; MAP
+1F1A; 1F12; MAP
+1F1B; 1F13; MAP
+1F1C; 1F14; MAP
+1F1D; 1F15; MAP
+1F28; 1F20; MAP
+1F29; 1F21; MAP
+1F2A; 1F22; MAP
+1F2B; 1F23; MAP
+1F2C; 1F24; MAP
+1F2D; 1F25; MAP
+1F2E; 1F26; MAP
+1F2F; 1F27; MAP
+1F38; 1F30; MAP
+1F39; 1F31; MAP
+1F3A; 1F32; MAP
+1F3B; 1F33; MAP
+1F3C; 1F34; MAP
+1F3D; 1F35; MAP
+1F3E; 1F36; MAP
+1F3F; 1F37; MAP
+1F48; 1F40; MAP
+1F49; 1F41; MAP
+1F4A; 1F42; MAP
+1F4B; 1F43; MAP
+1F4C; 1F44; MAP
+1F4D; 1F45; MAP
+1F50; 03C5 0313; MAP
+1F52; 03C5 0313 0300; MAP
+1F54; 03C5 0313 0301; MAP
+1F56; 03C5 0313 0342; MAP
+1F59; 1F51; MAP
+1F5B; 1F53; MAP
+1F5D; 1F55; MAP
+1F5F; 1F57; MAP
+1F68; 1F60; MAP
+1F69; 1F61; MAP
+1F6A; 1F62; MAP
+1F6B; 1F63; MAP
+1F6C; 1F64; MAP
+1F6D; 1F65; MAP
+1F6E; 1F66; MAP
+1F6F; 1F67; MAP
+1F80; 1F00 03B9; MAP
+1F81; 1F01 03B9; MAP
+1F82; 1F02 03B9; MAP
+1F83; 1F03 03B9; MAP
+1F84; 1F04 03B9; MAP
+1F85; 1F05 03B9; MAP
+1F86; 1F06 03B9; MAP
+1F87; 1F07 03B9; MAP
+1F88; 1F00 03B9; MAP
+1F89; 1F01 03B9; MAP
+1F8A; 1F02 03B9; MAP
+1F8B; 1F03 03B9; MAP
+1F8C; 1F04 03B9; MAP
+1F8D; 1F05 03B9; MAP
+1F8E; 1F06 03B9; MAP
+1F8F; 1F07 03B9; MAP
+1F90; 1F20 03B9; MAP
+1F91; 1F21 03B9; MAP
+1F92; 1F22 03B9; MAP
+1F93; 1F23 03B9; MAP
+1F94; 1F24 03B9; MAP
+1F95; 1F25 03B9; MAP
+1F96; 1F26 03B9; MAP
+1F97; 1F27 03B9; MAP
+1F98; 1F20 03B9; MAP
+1F99; 1F21 03B9; MAP
+1F9A; 1F22 03B9; MAP
+1F9B; 1F23 03B9; MAP
+1F9C; 1F24 03B9; MAP
+1F9D; 1F25 03B9; MAP
+1F9E; 1F26 03B9; MAP
+1F9F; 1F27 03B9; MAP
+1FA0; 1F60 03B9; MAP
+1FA1; 1F61 03B9; MAP
+1FA2; 1F62 03B9; MAP
+1FA3; 1F63 03B9; MAP
+1FA4; 1F64 03B9; MAP
+1FA5; 1F65 03B9; MAP
+1FA6; 1F66 03B9; MAP
+1FA7; 1F67 03B9; MAP
+1FA8; 1F60 03B9; MAP
+1FA9; 1F61 03B9; MAP
+1FAA; 1F62 03B9; MAP
+1FAB; 1F63 03B9; MAP
+1FAC; 1F64 03B9; MAP
+1FAD; 1F65 03B9; MAP
+1FAE; 1F66 03B9; MAP
+1FAF; 1F67 03B9; MAP
+1FB2; 1F70 03B9; MAP
+1FB3; 03B1 03B9; MAP
+1FB4; 03AC 03B9; MAP
+1FB6; 03B1 0342; MAP
+1FB7; 03B1 0342 03B9; MAP
+1FB8; 1FB0; MAP
+1FB9; 1FB1; MAP
+1FBA; 1F70; MAP
+1FBB; 1F71; MAP
+1FBC; 03B1 03B9; MAP
+1FBE; 03B9; MAP
+1FC2; 1F74 03B9; MAP
+1FC3; 03B7 03B9; MAP
+1FC4; 03AE 03B9; MAP
+1FC6; 03B7 0342; MAP
+1FC7; 03B7 0342 03B9; MAP
+1FC8; 1F72; MAP
+1FC9; 1F73; MAP
+1FCA; 1F74; MAP
+1FCB; 1F75; MAP
+1FCC; 03B7 03B9; MAP
+1FD2; 03B9 0308 0300; MAP
+1FD3; 03B9 0308 0301; MAP
+1FD6; 03B9 0342; MAP
+1FD7; 03B9 0308 0342; MAP
+1FD8; 1FD0; MAP
+1FD9; 1FD1; MAP
+1FDA; 1F76; MAP
+1FDB; 1F77; MAP
+1FE2; 03C5 0308 0300; MAP
+1FE3; 03C5 0308 0301; MAP
+1FE4; 03C1 0313; MAP
+1FE6; 03C5 0342; MAP
+1FE7; 03C5 0308 0342; MAP
+1FE8; 1FE0; MAP
+1FE9; 1FE1; MAP
+1FEA; 1F7A; MAP
+1FEB; 1F7B; MAP
+1FEC; 1FE5; MAP
+1FF2; 1F7C 03B9; MAP
+1FF3; 03C9 03B9; MAP
+1FF4; 03CE 03B9; MAP
+1FF6; 03C9 0342; MAP
+1FF7; 03C9 0342 03B9; MAP
+1FF8; 1F78; MAP
+1FF9; 1F79; MAP
+1FFA; 1F7C; MAP
+1FFB; 1F7D; MAP
+1FFC; 03C9 03B9; MAP
+20A8; 0072 0073; MAP
+2102; 0063; MAP
+2103; 00B0 0063; MAP
+2107; 025B; MAP
+2109; 00B0 0066; MAP
+210B; 0068; MAP
+210C; 0068; MAP
+210D; 0068; MAP
+2110; 0069; MAP
+2111; 0069; MAP
+2112; 006C; MAP
+2115; 006E; MAP
+2116; 006E 006F; MAP
+2119; 0070; MAP
+211A; 0071; MAP
+211B; 0072; MAP
+211C; 0072; MAP
+211D; 0072; MAP
+2120; 0073 006D; MAP
+2121; 0074 0065 006C; MAP
+2122; 0074 006D; MAP
+2124; 007A; MAP
+2126; 03C9; MAP
+2128; 007A; MAP
+212A; 006B; MAP
+212B; 00E5; MAP
+212C; 0062; MAP
+212D; 0063; MAP
+2130; 0065; MAP
+2131; 0066; MAP
+2133; 006D; MAP
+213E; 03B3; MAP
+213F; 03C0; MAP
+2145; 0064; MAP
+2160; 2170; MAP
+2161; 2171; MAP
+2162; 2172; MAP
+2163; 2173; MAP
+2164; 2174; MAP
+2165; 2175; MAP
+2166; 2176; MAP
+2167; 2177; MAP
+2168; 2178; MAP
+2169; 2179; MAP
+216A; 217A; MAP
+216B; 217B; MAP
+216C; 217C; MAP
+216D; 217D; MAP
+216E; 217E; MAP
+216F; 217F; MAP
+24B6; 24D0; MAP
+24B7; 24D1; MAP
+24B8; 24D2; MAP
+24B9; 24D3; MAP
+24BA; 24D4; MAP
+24BB; 24D5; MAP
+24BC; 24D6; MAP
+24BD; 24D7; MAP
+24BE; 24D8; MAP
+24BF; 24D9; MAP
+24C0; 24DA; MAP
+24C1; 24DB; MAP
+24C2; 24DC; MAP
+24C3; 24DD; MAP
+24C4; 24DE; MAP
+24C5; 24DF; MAP
+24C6; 24E0; MAP
+24C7; 24E1; MAP
+24C8; 24E2; MAP
+24C9; 24E3; MAP
+24CA; 24E4; MAP
+24CB; 24E5; MAP
+24CC; 24E6; MAP
+24CD; 24E7; MAP
+24CE; 24E8; MAP
+24CF; 24E9; MAP
+3371; 0068 0070 0061; MAP
+3373; 0061 0075; MAP
+3375; 006F 0076; MAP
+3380; 0070 0061; MAP
+3381; 006E 0061; MAP
+3382; 03BC 0061; MAP
+3383; 006D 0061; MAP
+3384; 006B 0061; MAP
+3385; 006B 0062; MAP
+3386; 006D 0062; MAP
+3387; 0067 0062; MAP
+338A; 0070 0066; MAP
+338B; 006E 0066; MAP
+338C; 03BC 0066; MAP
+3390; 0068 007A; MAP
+3391; 006B 0068 007A; MAP
+3392; 006D 0068 007A; MAP
+3393; 0067 0068 007A; MAP
+3394; 0074 0068 007A; MAP
+33A9; 0070 0061; MAP
+33AA; 006B 0070 0061; MAP
+33AB; 006D 0070 0061; MAP
+33AC; 0067 0070 0061; MAP
+33B4; 0070 0076; MAP
+33B5; 006E 0076; MAP
+33B6; 03BC 0076; MAP
+33B7; 006D 0076; MAP
+33B8; 006B 0076; MAP
+33B9; 006D 0076; MAP
+33BA; 0070 0077; MAP
+33BB; 006E 0077; MAP
+33BC; 03BC 0077; MAP
+33BD; 006D 0077; MAP
+33BE; 006B 0077; MAP
+33BF; 006D 0077; MAP
+33C0; 006B 03C9; MAP
+33C1; 006D 03C9; MAP
+33C3; 0062 0071; MAP
+33C6; 0063 2215 006B 0067; MAP
+33C7; 0063 006F 002E; MAP
+33C8; 0064 0062; MAP
+33C9; 0067 0079; MAP
+33CB; 0068 0070; MAP
+33CD; 006B 006B; MAP
+33CE; 006B 006D; MAP
+33D7; 0070 0068; MAP
+33D9; 0070 0070 006D; MAP
+33DA; 0070 0072; MAP
+33DC; 0073 0076; MAP
+33DD; 0077 0062; MAP
+FB00; 0066 0066; MAP
+FB01; 0066 0069; MAP
+FB02; 0066 006C; MAP
+FB03; 0066 0066 0069; MAP
+FB04; 0066 0066 006C; MAP
+FB05; 0073 0074; MAP
+FB06; 0073 0074; MAP
+FB13; 0574 0576; MAP
+FB14; 0574 0565; MAP
+FB15; 0574 056B; MAP
+FB16; 057E 0576; MAP
+FB17; 0574 056D; MAP
+FF21; FF41; MAP
+FF22; FF42; MAP
+FF23; FF43; MAP
+FF24; FF44; MAP
+FF25; FF45; MAP
+FF26; FF46; MAP
+FF27; FF47; MAP
+FF28; FF48; MAP
+FF29; FF49; MAP
+FF2A; FF4A; MAP
+FF2B; FF4B; MAP
+FF2C; FF4C; MAP
+FF2D; FF4D; MAP
+FF2E; FF4E; MAP
+FF2F; FF4F; MAP
+FF30; FF50; MAP
+FF31; FF51; MAP
+FF32; FF52; MAP
+FF33; FF53; MAP
+FF34; FF54; MAP
+FF35; FF55; MAP
+FF36; FF56; MAP
+FF37; FF57; MAP
+FF38; FF58; MAP
+FF39; FF59; MAP
+FF3A; FF5A; MAP
+10400; 10428; MAP
+10401; 10429; MAP
+10402; 1042A; MAP
+10403; 1042B; MAP
+10404; 1042C; MAP
+10405; 1042D; MAP
+10406; 1042E; MAP
+10407; 1042F; MAP
+10408; 10430; MAP
+10409; 10431; MAP
+1040A; 10432; MAP
+1040B; 10433; MAP
+1040C; 10434; MAP
+1040D; 10435; MAP
+1040E; 10436; MAP
+1040F; 10437; MAP
+10410; 10438; MAP
+10411; 10439; MAP
+10412; 1043A; MAP
+10413; 1043B; MAP
+10414; 1043C; MAP
+10415; 1043D; MAP
+10416; 1043E; MAP
+10417; 1043F; MAP
+10418; 10440; MAP
+10419; 10441; MAP
+1041A; 10442; MAP
+1041B; 10443; MAP
+1041C; 10444; MAP
+1041D; 10445; MAP
+1041E; 10446; MAP
+1041F; 10447; MAP
+10420; 10448; MAP
+10421; 10449; MAP
+10422; 1044A; MAP
+10423; 1044B; MAP
+10424; 1044C; MAP
+10425; 1044D; MAP
+1D400; 0061; MAP
+1D401; 0062; MAP
+1D402; 0063; MAP
+1D403; 0064; MAP
+1D404; 0065; MAP
+1D405; 0066; MAP
+1D406; 0067; MAP
+1D407; 0068; MAP
+1D408; 0069; MAP
+1D409; 006A; MAP
+1D40A; 006B; MAP
+1D40B; 006C; MAP
+1D40C; 006D; MAP
+1D40D; 006E; MAP
+1D40E; 006F; MAP
+1D40F; 0070; MAP
+1D410; 0071; MAP
+1D411; 0072; MAP
+1D412; 0073; MAP
+1D413; 0074; MAP
+1D414; 0075; MAP
+1D415; 0076; MAP
+1D416; 0077; MAP
+1D417; 0078; MAP
+1D418; 0079; MAP
+1D419; 007A; MAP
+1D434; 0061; MAP
+1D435; 0062; MAP
+1D436; 0063; MAP
+1D437; 0064; MAP
+1D438; 0065; MAP
+1D439; 0066; MAP
+1D43A; 0067; MAP
+1D43B; 0068; MAP
+1D43C; 0069; MAP
+1D43D; 006A; MAP
+1D43E; 006B; MAP
+1D43F; 006C; MAP
+1D440; 006D; MAP
+1D441; 006E; MAP
+1D442; 006F; MAP
+1D443; 0070; MAP
+1D444; 0071; MAP
+1D445; 0072; MAP
+1D446; 0073; MAP
+1D447; 0074; MAP
+1D448; 0075; MAP
+1D449; 0076; MAP
+1D44A; 0077; MAP
+1D44B; 0078; MAP
+1D44C; 0079; MAP
+1D44D; 007A; MAP
+1D468; 0061; MAP
+1D469; 0062; MAP
+1D46A; 0063; MAP
+1D46B; 0064; MAP
+1D46C; 0065; MAP
+1D46D; 0066; MAP
+1D46E; 0067; MAP
+1D46F; 0068; MAP
+1D470; 0069; MAP
+1D471; 006A; MAP
+1D472; 006B; MAP
+1D473; 006C; MAP
+1D474; 006D; MAP
+1D475; 006E; MAP
+1D476; 006F; MAP
+1D477; 0070; MAP
+1D478; 0071; MAP
+1D479; 0072; MAP
+1D47A; 0073; MAP
+1D47B; 0074; MAP
+1D47C; 0075; MAP
+1D47D; 0076; MAP
+1D47E; 0077; MAP
+1D47F; 0078; MAP
+1D480; 0079; MAP
+1D481; 007A; MAP
+1D49C; 0061; MAP
+1D49E; 0063; MAP
+1D49F; 0064; MAP
+1D4A2; 0067; MAP
+1D4A5; 006A; MAP
+1D4A6; 006B; MAP
+1D4A9; 006E; MAP
+1D4AA; 006F; MAP
+1D4AB; 0070; MAP
+1D4AC; 0071; MAP
+1D4AE; 0073; MAP
+1D4AF; 0074; MAP
+1D4B0; 0075; MAP
+1D4B1; 0076; MAP
+1D4B2; 0077; MAP
+1D4B3; 0078; MAP
+1D4B4; 0079; MAP
+1D4B5; 007A; MAP
+1D4D0; 0061; MAP
+1D4D1; 0062; MAP
+1D4D2; 0063; MAP
+1D4D3; 0064; MAP
+1D4D4; 0065; MAP
+1D4D5; 0066; MAP
+1D4D6; 0067; MAP
+1D4D7; 0068; MAP
+1D4D8; 0069; MAP
+1D4D9; 006A; MAP
+1D4DA; 006B; MAP
+1D4DB; 006C; MAP
+1D4DC; 006D; MAP
+1D4DD; 006E; MAP
+1D4DE; 006F; MAP
+1D4DF; 0070; MAP
+1D4E0; 0071; MAP
+1D4E1; 0072; MAP
+1D4E2; 0073; MAP
+1D4E3; 0074; MAP
+1D4E4; 0075; MAP
+1D4E5; 0076; MAP
+1D4E6; 0077; MAP
+1D4E7; 0078; MAP
+1D4E8; 0079; MAP
+1D4E9; 007A; MAP
+1D504; 0061; MAP
+1D505; 0062; MAP
+1D507; 0064; MAP
+1D508; 0065; MAP
+1D509; 0066; MAP
+1D50A; 0067; MAP
+1D50D; 006A; MAP
+1D50E; 006B; MAP
+1D50F; 006C; MAP
+1D510; 006D; MAP
+1D511; 006E; MAP
+1D512; 006F; MAP
+1D513; 0070; MAP
+1D514; 0071; MAP
+1D516; 0073; MAP
+1D517; 0074; MAP
+1D518; 0075; MAP
+1D519; 0076; MAP
+1D51A; 0077; MAP
+1D51B; 0078; MAP
+1D51C; 0079; MAP
+1D538; 0061; MAP
+1D539; 0062; MAP
+1D53B; 0064; MAP
+1D53C; 0065; MAP
+1D53D; 0066; MAP
+1D53E; 0067; MAP
+1D540; 0069; MAP
+1D541; 006A; MAP
+1D542; 006B; MAP
+1D543; 006C; MAP
+1D544; 006D; MAP
+1D546; 006F; MAP
+1D54A; 0073; MAP
+1D54B; 0074; MAP
+1D54C; 0075; MAP
+1D54D; 0076; MAP
+1D54E; 0077; MAP
+1D54F; 0078; MAP
+1D550; 0079; MAP
+1D56C; 0061; MAP
+1D56D; 0062; MAP
+1D56E; 0063; MAP
+1D56F; 0064; MAP
+1D570; 0065; MAP
+1D571; 0066; MAP
+1D572; 0067; MAP
+1D573; 0068; MAP
+1D574; 0069; MAP
+1D575; 006A; MAP
+1D576; 006B; MAP
+1D577; 006C; MAP
+1D578; 006D; MAP
+1D579; 006E; MAP
+1D57A; 006F; MAP
+1D57B; 0070; MAP
+1D57C; 0071; MAP
+1D57D; 0072; MAP
+1D57E; 0073; MAP
+1D57F; 0074; MAP
+1D580; 0075; MAP
+1D581; 0076; MAP
+1D582; 0077; MAP
+1D583; 0078; MAP
+1D584; 0079; MAP
+1D585; 007A; MAP
+1D5A0; 0061; MAP
+1D5A1; 0062; MAP
+1D5A2; 0063; MAP
+1D5A3; 0064; MAP
+1D5A4; 0065; MAP
+1D5A5; 0066; MAP
+1D5A6; 0067; MAP
+1D5A7; 0068; MAP
+1D5A8; 0069; MAP
+1D5A9; 006A; MAP
+1D5AA; 006B; MAP
+1D5AB; 006C; MAP
+1D5AC; 006D; MAP
+1D5AD; 006E; MAP
+1D5AE; 006F; MAP
+1D5AF; 0070; MAP
+1D5B0; 0071; MAP
+1D5B1; 0072; MAP
+1D5B2; 0073; MAP
+1D5B3; 0074; MAP
+1D5B4; 0075; MAP
+1D5B5; 0076; MAP
+1D5B6; 0077; MAP
+1D5B7; 0078; MAP
+1D5B8; 0079; MAP
+1D5B9; 007A; MAP
+1D5D4; 0061; MAP
+1D5D5; 0062; MAP
+1D5D6; 0063; MAP
+1D5D7; 0064; MAP
+1D5D8; 0065; MAP
+1D5D9; 0066; MAP
+1D5DA; 0067; MAP
+1D5DB; 0068; MAP
+1D5DC; 0069; MAP
+1D5DD; 006A; MAP
+1D5DE; 006B; MAP
+1D5DF; 006C; MAP
+1D5E0; 006D; MAP
+1D5E1; 006E; MAP
+1D5E2; 006F; MAP
+1D5E3; 0070; MAP
+1D5E4; 0071; MAP
+1D5E5; 0072; MAP
+1D5E6; 0073; MAP
+1D5E7; 0074; MAP
+1D5E8; 0075; MAP
+1D5E9; 0076; MAP
+1D5EA; 0077; MAP
+1D5EB; 0078; MAP
+1D5EC; 0079; MAP
+1D5ED; 007A; MAP
+1D608; 0061; MAP
+1D609; 0062; MAP
+1D60A; 0063; MAP
+1D60B; 0064; MAP
+1D60C; 0065; MAP
+1D60D; 0066; MAP
+1D60E; 0067; MAP
+1D60F; 0068; MAP
+1D610; 0069; MAP
+1D611; 006A; MAP
+1D612; 006B; MAP
+1D613; 006C; MAP
+1D614; 006D; MAP
+1D615; 006E; MAP
+1D616; 006F; MAP
+1D617; 0070; MAP
+1D618; 0071; MAP
+1D619; 0072; MAP
+1D61A; 0073; MAP
+1D61B; 0074; MAP
+1D61C; 0075; MAP
+1D61D; 0076; MAP
+1D61E; 0077; MAP
+1D61F; 0078; MAP
+1D620; 0079; MAP
+1D621; 007A; MAP
+1D63C; 0061; MAP
+1D63D; 0062; MAP
+1D63E; 0063; MAP
+1D63F; 0064; MAP
+1D640; 0065; MAP
+1D641; 0066; MAP
+1D642; 0067; MAP
+1D643; 0068; MAP
+1D644; 0069; MAP
+1D645; 006A; MAP
+1D646; 006B; MAP
+1D647; 006C; MAP
+1D648; 006D; MAP
+1D649; 006E; MAP
+1D64A; 006F; MAP
+1D64B; 0070; MAP
+1D64C; 0071; MAP
+1D64D; 0072; MAP
+1D64E; 0073; MAP
+1D64F; 0074; MAP
+1D650; 0075; MAP
+1D651; 0076; MAP
+1D652; 0077; MAP
+1D653; 0078; MAP
+1D654; 0079; MAP
+1D655; 007A; MAP
+1D670; 0061; MAP
+1D671; 0062; MAP
+1D672; 0063; MAP
+1D673; 0064; MAP
+1D674; 0065; MAP
+1D675; 0066; MAP
+1D676; 0067; MAP
+1D677; 0068; MAP
+1D678; 0069; MAP
+1D679; 006A; MAP
+1D67A; 006B; MAP
+1D67B; 006C; MAP
+1D67C; 006D; MAP
+1D67D; 006E; MAP
+1D67E; 006F; MAP
+1D67F; 0070; MAP
+1D680; 0071; MAP
+1D681; 0072; MAP
+1D682; 0073; MAP
+1D683; 0074; MAP
+1D684; 0075; MAP
+1D685; 0076; MAP
+1D686; 0077; MAP
+1D687; 0078; MAP
+1D688; 0079; MAP
+1D689; 007A; MAP
+1D6A8; 03B1; MAP
+1D6A9; 03B2; MAP
+1D6AA; 03B3; MAP
+1D6AB; 03B4; MAP
+1D6AC; 03B5; MAP
+1D6AD; 03B6; MAP
+1D6AE; 03B7; MAP
+1D6AF; 03B8; MAP
+1D6B0; 03B9; MAP
+1D6B1; 03BA; MAP
+1D6B2; 03BB; MAP
+1D6B3; 03BC; MAP
+1D6B4; 03BD; MAP
+1D6B5; 03BE; MAP
+1D6B6; 03BF; MAP
+1D6B7; 03C0; MAP
+1D6B8; 03C1; MAP
+1D6B9; 03B8; MAP
+1D6BA; 03C3; MAP
+1D6BB; 03C4; MAP
+1D6BC; 03C5; MAP
+1D6BD; 03C6; MAP
+1D6BE; 03C7; MAP
+1D6BF; 03C8; MAP
+1D6C0; 03C9; MAP
+1D6D3; 03C3; MAP
+1D6E2; 03B1; MAP
+1D6E3; 03B2; MAP
+1D6E4; 03B3; MAP
+1D6E5; 03B4; MAP
+1D6E6; 03B5; MAP
+1D6E7; 03B6; MAP
+1D6E8; 03B7; MAP
+1D6E9; 03B8; MAP
+1D6EA; 03B9; MAP
+1D6EB; 03BA; MAP
+1D6EC; 03BB; MAP
+1D6ED; 03BC; MAP
+1D6EE; 03BD; MAP
+1D6EF; 03BE; MAP
+1D6F0; 03BF; MAP
+1D6F1; 03C0; MAP
+1D6F2; 03C1; MAP
+1D6F3; 03B8; MAP
+1D6F4; 03C3; MAP
+1D6F5; 03C4; MAP
+1D6F6; 03C5; MAP
+1D6F7; 03C6; MAP
+1D6F8; 03C7; MAP
+1D6F9; 03C8; MAP
+1D6FA; 03C9; MAP
+1D70D; 03C3; MAP
+1D71C; 03B1; MAP
+1D71D; 03B2; MAP
+1D71E; 03B3; MAP
+1D71F; 03B4; MAP
+1D720; 03B5; MAP
+1D721; 03B6; MAP
+1D722; 03B7; MAP
+1D723; 03B8; MAP
+1D724; 03B9; MAP
+1D725; 03BA; MAP
+1D726; 03BB; MAP
+1D727; 03BC; MAP
+1D728; 03BD; MAP
+1D729; 03BE; MAP
+1D72A; 03BF; MAP
+1D72B; 03C0; MAP
+1D72C; 03C1; MAP
+1D72D; 03B8; MAP
+1D72E; 03C3; MAP
+1D72F; 03C4; MAP
+1D730; 03C5; MAP
+1D731; 03C6; MAP
+1D732; 03C7; MAP
+1D733; 03C8; MAP
+1D734; 03C9; MAP
+1D747; 03C3; MAP
+1D756; 03B1; MAP
+1D757; 03B2; MAP
+1D758; 03B3; MAP
+1D759; 03B4; MAP
+1D75A; 03B5; MAP
+1D75B; 03B6; MAP
+1D75C; 03B7; MAP
+1D75D; 03B8; MAP
+1D75E; 03B9; MAP
+1D75F; 03BA; MAP
+1D760; 03BB; MAP
+1D761; 03BC; MAP
+1D762; 03BD; MAP
+1D763; 03BE; MAP
+1D764; 03BF; MAP
+1D765; 03C0; MAP
+1D766; 03C1; MAP
+1D767; 03B8; MAP
+1D768; 03C3; MAP
+1D769; 03C4; MAP
+1D76A; 03C5; MAP
+1D76B; 03C6; MAP
+1D76C; 03C7; MAP
+1D76D; 03C8; MAP
+1D76E; 03C9; MAP
+1D781; 03C3; MAP
+1D790; 03B1; MAP
+1D791; 03B2; MAP
+1D792; 03B3; MAP
+1D793; 03B4; MAP
+1D794; 03B5; MAP
+1D795; 03B6; MAP
+1D796; 03B7; MAP
+1D797; 03B8; MAP
+1D798; 03B9; MAP
+1D799; 03BA; MAP
+1D79A; 03BB; MAP
+1D79B; 03BC; MAP
+1D79C; 03BD; MAP
+1D79D; 03BE; MAP
+1D79E; 03BF; MAP
+1D79F; 03C0; MAP
+1D7A0; 03C1; MAP
+1D7A1; 03B8; MAP
+1D7A2; 03C3; MAP
+1D7A3; 03C4; MAP
+1D7A4; 03C5; MAP
+1D7A5; 03C6; MAP
+1D7A6; 03C7; MAP
+1D7A7; 03C8; MAP
+1D7A8; 03C9; MAP
+1D7BB; 03C3; MAP
+
+# Total code points 1371
+
+# code points from Table C.1.2
+
+00A0; ; PROHIBITED
+1680; ; PROHIBITED
+2000; ; PROHIBITED
+2001; ; PROHIBITED
+2002; ; PROHIBITED
+2003; ; PROHIBITED
+2004; ; PROHIBITED
+2005; ; PROHIBITED
+2006; ; PROHIBITED
+2007; ; PROHIBITED
+2008; ; PROHIBITED
+2009; ; PROHIBITED
+200A; ; PROHIBITED
+200B; ; PROHIBITED
+202F; ; PROHIBITED
+205F; ; PROHIBITED
+3000; ; PROHIBITED
+
+# Total code points 17
+
+# code points from Table C.2.2
+
+0080..009F; ; PROHIBITED
+06DD; ; PROHIBITED
+070F; ; PROHIBITED
+180E; ; PROHIBITED
+200C; ; PROHIBITED
+200D; ; PROHIBITED
+2028; ; PROHIBITED
+2029; ; PROHIBITED
+2060; ; PROHIBITED
+2061; ; PROHIBITED
+2062; ; PROHIBITED
+2063; ; PROHIBITED
+206A..206F; ; PROHIBITED
+FEFF; ; PROHIBITED
+FFF9..FFFC; ; PROHIBITED
+1D173..1D17A; ; PROHIBITED
+
+# Total code points 30
+
+# code points from Table C.3
+
+E000..F8FF; ; PROHIBITED
+F0000..FFFFD; ; PROHIBITED
+100000..10FFFD; ; PROHIBITED
+
+# Total code points 2051
+
+# code points from Table C.4
+
+FDD0..FDEF; ; PROHIBITED
+FFFE..FFFF; ; PROHIBITED
+1FFFE..1FFFF; ; PROHIBITED
+2FFFE..2FFFF; ; PROHIBITED
+3FFFE..3FFFF; ; PROHIBITED
+4FFFE..4FFFF; ; PROHIBITED
+5FFFE..5FFFF; ; PROHIBITED
+6FFFE..6FFFF; ; PROHIBITED
+7FFFE..7FFFF; ; PROHIBITED
+8FFFE..8FFFF; ; PROHIBITED
+9FFFE..9FFFF; ; PROHIBITED
+AFFFE..AFFFF; ; PROHIBITED
+BFFFE..BFFFF; ; PROHIBITED
+CFFFE..CFFFF; ; PROHIBITED
+DFFFE..DFFFF; ; PROHIBITED
+EFFFE..EFFFF; ; PROHIBITED
+FFFFE..FFFFF; ; PROHIBITED
+10FFFE..10FFFF; ; PROHIBITED
+
+# Total code points 18
+
+# code points from Table C.5
+
+D800..DFFF; ; PROHIBITED
+
+# Total code points 0
+
+# code points from Table C.6
+
+FFF9; ; PROHIBITED
+FFFA; ; PROHIBITED
+FFFB; ; PROHIBITED
+FFFC; ; PROHIBITED
+FFFD; ; PROHIBITED
+
+# Total code points 5
+
+# code points from Table C.7
+
+2FF0..2FFB; ; PROHIBITED
+
+# Total code points 1
+
+# code points from Table C.8
+
+0340; ; PROHIBITED
+0341; ; PROHIBITED
+200E; ; PROHIBITED
+200F; ; PROHIBITED
+202A; ; PROHIBITED
+202B; ; PROHIBITED
+202C; ; PROHIBITED
+202D; ; PROHIBITED
+202E; ; PROHIBITED
+206A; ; PROHIBITED
+206B; ; PROHIBITED
+206C; ; PROHIBITED
+206D; ; PROHIBITED
+206E; ; PROHIBITED
+206F; ; PROHIBITED
+
+# Total code points 15
+
+# code points from Table C.9
+
+E0001; ; PROHIBITED
+E0020..E007F; ; PROHIBITED
+
+# Total code points 82
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_ci.txt b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_ci.txt
new file mode 100644
index 00000000000..a47b66eb490
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_ci.txt
@@ -0,0 +1,1902 @@
+###################
+# Copyright (C) 2003, International Business Machines
+# Corporation and others. All Rights Reserved.
+###################
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table A.1 from RFC 3454
+
+0221; ; UNASSIGNED
+0234..024F; ; UNASSIGNED
+02AE..02AF; ; UNASSIGNED
+02EF..02FF; ; UNASSIGNED
+0350..035F; ; UNASSIGNED
+0370..0373; ; UNASSIGNED
+0376..0379; ; UNASSIGNED
+037B..037D; ; UNASSIGNED
+037F..0383; ; UNASSIGNED
+038B; ; UNASSIGNED
+038D; ; UNASSIGNED
+03A2; ; UNASSIGNED
+03CF; ; UNASSIGNED
+03F7..03FF; ; UNASSIGNED
+0487; ; UNASSIGNED
+04CF; ; UNASSIGNED
+04F6..04F7; ; UNASSIGNED
+04FA..04FF; ; UNASSIGNED
+0510..0530; ; UNASSIGNED
+0557..0558; ; UNASSIGNED
+0560; ; UNASSIGNED
+0588; ; UNASSIGNED
+058B..0590; ; UNASSIGNED
+05A2; ; UNASSIGNED
+05BA; ; UNASSIGNED
+05C5..05CF; ; UNASSIGNED
+05EB..05EF; ; UNASSIGNED
+05F5..060B; ; UNASSIGNED
+060D..061A; ; UNASSIGNED
+061C..061E; ; UNASSIGNED
+0620; ; UNASSIGNED
+063B..063F; ; UNASSIGNED
+0656..065F; ; UNASSIGNED
+06EE..06EF; ; UNASSIGNED
+06FF; ; UNASSIGNED
+070E; ; UNASSIGNED
+072D..072F; ; UNASSIGNED
+074B..077F; ; UNASSIGNED
+07B2..0900; ; UNASSIGNED
+0904; ; UNASSIGNED
+093A..093B; ; UNASSIGNED
+094E..094F; ; UNASSIGNED
+0955..0957; ; UNASSIGNED
+0971..0980; ; UNASSIGNED
+0984; ; UNASSIGNED
+098D..098E; ; UNASSIGNED
+0991..0992; ; UNASSIGNED
+09A9; ; UNASSIGNED
+09B1; ; UNASSIGNED
+09B3..09B5; ; UNASSIGNED
+09BA..09BB; ; UNASSIGNED
+09BD; ; UNASSIGNED
+09C5..09C6; ; UNASSIGNED
+09C9..09CA; ; UNASSIGNED
+09CE..09D6; ; UNASSIGNED
+09D8..09DB; ; UNASSIGNED
+09DE; ; UNASSIGNED
+09E4..09E5; ; UNASSIGNED
+09FB..0A01; ; UNASSIGNED
+0A03..0A04; ; UNASSIGNED
+0A0B..0A0E; ; UNASSIGNED
+0A11..0A12; ; UNASSIGNED
+0A29; ; UNASSIGNED
+0A31; ; UNASSIGNED
+0A34; ; UNASSIGNED
+0A37; ; UNASSIGNED
+0A3A..0A3B; ; UNASSIGNED
+0A3D; ; UNASSIGNED
+0A43..0A46; ; UNASSIGNED
+0A49..0A4A; ; UNASSIGNED
+0A4E..0A58; ; UNASSIGNED
+0A5D; ; UNASSIGNED
+0A5F..0A65; ; UNASSIGNED
+0A75..0A80; ; UNASSIGNED
+0A84; ; UNASSIGNED
+0A8C; ; UNASSIGNED
+0A8E; ; UNASSIGNED
+0A92; ; UNASSIGNED
+0AA9; ; UNASSIGNED
+0AB1; ; UNASSIGNED
+0AB4; ; UNASSIGNED
+0ABA..0ABB; ; UNASSIGNED
+0AC6; ; UNASSIGNED
+0ACA; ; UNASSIGNED
+0ACE..0ACF; ; UNASSIGNED
+0AD1..0ADF; ; UNASSIGNED
+0AE1..0AE5; ; UNASSIGNED
+0AF0..0B00; ; UNASSIGNED
+0B04; ; UNASSIGNED
+0B0D..0B0E; ; UNASSIGNED
+0B11..0B12; ; UNASSIGNED
+0B29; ; UNASSIGNED
+0B31; ; UNASSIGNED
+0B34..0B35; ; UNASSIGNED
+0B3A..0B3B; ; UNASSIGNED
+0B44..0B46; ; UNASSIGNED
+0B49..0B4A; ; UNASSIGNED
+0B4E..0B55; ; UNASSIGNED
+0B58..0B5B; ; UNASSIGNED
+0B5E; ; UNASSIGNED
+0B62..0B65; ; UNASSIGNED
+0B71..0B81; ; UNASSIGNED
+0B84; ; UNASSIGNED
+0B8B..0B8D; ; UNASSIGNED
+0B91; ; UNASSIGNED
+0B96..0B98; ; UNASSIGNED
+0B9B; ; UNASSIGNED
+0B9D; ; UNASSIGNED
+0BA0..0BA2; ; UNASSIGNED
+0BA5..0BA7; ; UNASSIGNED
+0BAB..0BAD; ; UNASSIGNED
+0BB6; ; UNASSIGNED
+0BBA..0BBD; ; UNASSIGNED
+0BC3..0BC5; ; UNASSIGNED
+0BC9; ; UNASSIGNED
+0BCE..0BD6; ; UNASSIGNED
+0BD8..0BE6; ; UNASSIGNED
+0BF3..0C00; ; UNASSIGNED
+0C04; ; UNASSIGNED
+0C0D; ; UNASSIGNED
+0C11; ; UNASSIGNED
+0C29; ; UNASSIGNED
+0C34; ; UNASSIGNED
+0C3A..0C3D; ; UNASSIGNED
+0C45; ; UNASSIGNED
+0C49; ; UNASSIGNED
+0C4E..0C54; ; UNASSIGNED
+0C57..0C5F; ; UNASSIGNED
+0C62..0C65; ; UNASSIGNED
+0C70..0C81; ; UNASSIGNED
+0C84; ; UNASSIGNED
+0C8D; ; UNASSIGNED
+0C91; ; UNASSIGNED
+0CA9; ; UNASSIGNED
+0CB4; ; UNASSIGNED
+0CBA..0CBD; ; UNASSIGNED
+0CC5; ; UNASSIGNED
+0CC9; ; UNASSIGNED
+0CCE..0CD4; ; UNASSIGNED
+0CD7..0CDD; ; UNASSIGNED
+0CDF; ; UNASSIGNED
+0CE2..0CE5; ; UNASSIGNED
+0CF0..0D01; ; UNASSIGNED
+0D04; ; UNASSIGNED
+0D0D; ; UNASSIGNED
+0D11; ; UNASSIGNED
+0D29; ; UNASSIGNED
+0D3A..0D3D; ; UNASSIGNED
+0D44..0D45; ; UNASSIGNED
+0D49; ; UNASSIGNED
+0D4E..0D56; ; UNASSIGNED
+0D58..0D5F; ; UNASSIGNED
+0D62..0D65; ; UNASSIGNED
+0D70..0D81; ; UNASSIGNED
+0D84; ; UNASSIGNED
+0D97..0D99; ; UNASSIGNED
+0DB2; ; UNASSIGNED
+0DBC; ; UNASSIGNED
+0DBE..0DBF; ; UNASSIGNED
+0DC7..0DC9; ; UNASSIGNED
+0DCB..0DCE; ; UNASSIGNED
+0DD5; ; UNASSIGNED
+0DD7; ; UNASSIGNED
+0DE0..0DF1; ; UNASSIGNED
+0DF5..0E00; ; UNASSIGNED
+0E3B..0E3E; ; UNASSIGNED
+0E5C..0E80; ; UNASSIGNED
+0E83; ; UNASSIGNED
+0E85..0E86; ; UNASSIGNED
+0E89; ; UNASSIGNED
+0E8B..0E8C; ; UNASSIGNED
+0E8E..0E93; ; UNASSIGNED
+0E98; ; UNASSIGNED
+0EA0; ; UNASSIGNED
+0EA4; ; UNASSIGNED
+0EA6; ; UNASSIGNED
+0EA8..0EA9; ; UNASSIGNED
+0EAC; ; UNASSIGNED
+0EBA; ; UNASSIGNED
+0EBE..0EBF; ; UNASSIGNED
+0EC5; ; UNASSIGNED
+0EC7; ; UNASSIGNED
+0ECE..0ECF; ; UNASSIGNED
+0EDA..0EDB; ; UNASSIGNED
+0EDE..0EFF; ; UNASSIGNED
+0F48; ; UNASSIGNED
+0F6B..0F70; ; UNASSIGNED
+0F8C..0F8F; ; UNASSIGNED
+0F98; ; UNASSIGNED
+0FBD; ; UNASSIGNED
+0FCD..0FCE; ; UNASSIGNED
+0FD0..0FFF; ; UNASSIGNED
+1022; ; UNASSIGNED
+1028; ; UNASSIGNED
+102B; ; UNASSIGNED
+1033..1035; ; UNASSIGNED
+103A..103F; ; UNASSIGNED
+105A..109F; ; UNASSIGNED
+10C6..10CF; ; UNASSIGNED
+10F9..10FA; ; UNASSIGNED
+10FC..10FF; ; UNASSIGNED
+115A..115E; ; UNASSIGNED
+11A3..11A7; ; UNASSIGNED
+11FA..11FF; ; UNASSIGNED
+1207; ; UNASSIGNED
+1247; ; UNASSIGNED
+1249; ; UNASSIGNED
+124E..124F; ; UNASSIGNED
+1257; ; UNASSIGNED
+1259; ; UNASSIGNED
+125E..125F; ; UNASSIGNED
+1287; ; UNASSIGNED
+1289; ; UNASSIGNED
+128E..128F; ; UNASSIGNED
+12AF; ; UNASSIGNED
+12B1; ; UNASSIGNED
+12B6..12B7; ; UNASSIGNED
+12BF; ; UNASSIGNED
+12C1; ; UNASSIGNED
+12C6..12C7; ; UNASSIGNED
+12CF; ; UNASSIGNED
+12D7; ; UNASSIGNED
+12EF; ; UNASSIGNED
+130F; ; UNASSIGNED
+1311; ; UNASSIGNED
+1316..1317; ; UNASSIGNED
+131F; ; UNASSIGNED
+1347; ; UNASSIGNED
+135B..1360; ; UNASSIGNED
+137D..139F; ; UNASSIGNED
+13F5..1400; ; UNASSIGNED
+1677..167F; ; UNASSIGNED
+169D..169F; ; UNASSIGNED
+16F1..16FF; ; UNASSIGNED
+170D; ; UNASSIGNED
+1715..171F; ; UNASSIGNED
+1737..173F; ; UNASSIGNED
+1754..175F; ; UNASSIGNED
+176D; ; UNASSIGNED
+1771; ; UNASSIGNED
+1774..177F; ; UNASSIGNED
+17DD..17DF; ; UNASSIGNED
+17EA..17FF; ; UNASSIGNED
+180F; ; UNASSIGNED
+181A..181F; ; UNASSIGNED
+1878..187F; ; UNASSIGNED
+18AA..1DFF; ; UNASSIGNED
+1E9C..1E9F; ; UNASSIGNED
+1EFA..1EFF; ; UNASSIGNED
+1F16..1F17; ; UNASSIGNED
+1F1E..1F1F; ; UNASSIGNED
+1F46..1F47; ; UNASSIGNED
+1F4E..1F4F; ; UNASSIGNED
+1F58; ; UNASSIGNED
+1F5A; ; UNASSIGNED
+1F5C; ; UNASSIGNED
+1F5E; ; UNASSIGNED
+1F7E..1F7F; ; UNASSIGNED
+1FB5; ; UNASSIGNED
+1FC5; ; UNASSIGNED
+1FD4..1FD5; ; UNASSIGNED
+1FDC; ; UNASSIGNED
+1FF0..1FF1; ; UNASSIGNED
+1FF5; ; UNASSIGNED
+1FFF; ; UNASSIGNED
+2053..2056; ; UNASSIGNED
+2058..205E; ; UNASSIGNED
+2064..2069; ; UNASSIGNED
+2072..2073; ; UNASSIGNED
+208F..209F; ; UNASSIGNED
+20B2..20CF; ; UNASSIGNED
+20EB..20FF; ; UNASSIGNED
+213B..213C; ; UNASSIGNED
+214C..2152; ; UNASSIGNED
+2184..218F; ; UNASSIGNED
+23CF..23FF; ; UNASSIGNED
+2427..243F; ; UNASSIGNED
+244B..245F; ; UNASSIGNED
+24FF; ; UNASSIGNED
+2614..2615; ; UNASSIGNED
+2618; ; UNASSIGNED
+267E..267F; ; UNASSIGNED
+268A..2700; ; UNASSIGNED
+2705; ; UNASSIGNED
+270A..270B; ; UNASSIGNED
+2728; ; UNASSIGNED
+274C; ; UNASSIGNED
+274E; ; UNASSIGNED
+2753..2755; ; UNASSIGNED
+2757; ; UNASSIGNED
+275F..2760; ; UNASSIGNED
+2795..2797; ; UNASSIGNED
+27B0; ; UNASSIGNED
+27BF..27CF; ; UNASSIGNED
+27EC..27EF; ; UNASSIGNED
+2B00..2E7F; ; UNASSIGNED
+2E9A; ; UNASSIGNED
+2EF4..2EFF; ; UNASSIGNED
+2FD6..2FEF; ; UNASSIGNED
+2FFC..2FFF; ; UNASSIGNED
+3040; ; UNASSIGNED
+3097..3098; ; UNASSIGNED
+3100..3104; ; UNASSIGNED
+312D..3130; ; UNASSIGNED
+318F; ; UNASSIGNED
+31B8..31EF; ; UNASSIGNED
+321D..321F; ; UNASSIGNED
+3244..3250; ; UNASSIGNED
+327C..327E; ; UNASSIGNED
+32CC..32CF; ; UNASSIGNED
+32FF; ; UNASSIGNED
+3377..337A; ; UNASSIGNED
+33DE..33DF; ; UNASSIGNED
+33FF; ; UNASSIGNED
+4DB6..4DFF; ; UNASSIGNED
+9FA6..9FFF; ; UNASSIGNED
+A48D..A48F; ; UNASSIGNED
+A4C7..ABFF; ; UNASSIGNED
+D7A4..D7FF; ; UNASSIGNED
+FA2E..FA2F; ; UNASSIGNED
+FA6B..FAFF; ; UNASSIGNED
+FB07..FB12; ; UNASSIGNED
+FB18..FB1C; ; UNASSIGNED
+FB37; ; UNASSIGNED
+FB3D; ; UNASSIGNED
+FB3F; ; UNASSIGNED
+FB42; ; UNASSIGNED
+FB45; ; UNASSIGNED
+FBB2..FBD2; ; UNASSIGNED
+FD40..FD4F; ; UNASSIGNED
+FD90..FD91; ; UNASSIGNED
+FDC8..FDCF; ; UNASSIGNED
+FDFD..FDFF; ; UNASSIGNED
+FE10..FE1F; ; UNASSIGNED
+FE24..FE2F; ; UNASSIGNED
+FE47..FE48; ; UNASSIGNED
+FE53; ; UNASSIGNED
+FE67; ; UNASSIGNED
+FE6C..FE6F; ; UNASSIGNED
+FE75; ; UNASSIGNED
+FEFD..FEFE; ; UNASSIGNED
+FF00; ; UNASSIGNED
+FFBF..FFC1; ; UNASSIGNED
+FFC8..FFC9; ; UNASSIGNED
+FFD0..FFD1; ; UNASSIGNED
+FFD8..FFD9; ; UNASSIGNED
+FFDD..FFDF; ; UNASSIGNED
+FFE7; ; UNASSIGNED
+FFEF..FFF8; ; UNASSIGNED
+10000..102FF; ; UNASSIGNED
+1031F; ; UNASSIGNED
+10324..1032F; ; UNASSIGNED
+1034B..103FF; ; UNASSIGNED
+10426..10427; ; UNASSIGNED
+1044E..1CFFF; ; UNASSIGNED
+1D0F6..1D0FF; ; UNASSIGNED
+1D127..1D129; ; UNASSIGNED
+1D1DE..1D3FF; ; UNASSIGNED
+1D455; ; UNASSIGNED
+1D49D; ; UNASSIGNED
+1D4A0..1D4A1; ; UNASSIGNED
+1D4A3..1D4A4; ; UNASSIGNED
+1D4A7..1D4A8; ; UNASSIGNED
+1D4AD; ; UNASSIGNED
+1D4BA; ; UNASSIGNED
+1D4BC; ; UNASSIGNED
+1D4C1; ; UNASSIGNED
+1D4C4; ; UNASSIGNED
+1D506; ; UNASSIGNED
+1D50B..1D50C; ; UNASSIGNED
+1D515; ; UNASSIGNED
+1D51D; ; UNASSIGNED
+1D53A; ; UNASSIGNED
+1D53F; ; UNASSIGNED
+1D545; ; UNASSIGNED
+1D547..1D549; ; UNASSIGNED
+1D551; ; UNASSIGNED
+1D6A4..1D6A7; ; UNASSIGNED
+1D7CA..1D7CD; ; UNASSIGNED
+1D800..1FFFD; ; UNASSIGNED
+2A6D7..2F7FF; ; UNASSIGNED
+2FA1E..2FFFD; ; UNASSIGNED
+30000..3FFFD; ; UNASSIGNED
+40000..4FFFD; ; UNASSIGNED
+50000..5FFFD; ; UNASSIGNED
+60000..6FFFD; ; UNASSIGNED
+70000..7FFFD; ; UNASSIGNED
+80000..8FFFD; ; UNASSIGNED
+90000..9FFFD; ; UNASSIGNED
+A0000..AFFFD; ; UNASSIGNED
+B0000..BFFFD; ; UNASSIGNED
+C0000..CFFFD; ; UNASSIGNED
+D0000..DFFFD; ; UNASSIGNED
+E0000; ; UNASSIGNED
+E0002..E001F; ; UNASSIGNED
+E0080..EFFFD; ; UNASSIGNED
+
+# Total code points 3653
+
+# This table contains code points from Table B.1 from RFC 3454
+
+00AD; ; MAP
+034F; ; MAP
+1806; ; MAP
+180B; ; MAP
+180C; ; MAP
+180D; ; MAP
+200B; ; MAP
+200C; ; MAP
+200D; ; MAP
+2060; ; MAP
+FE00; ; MAP
+FE01; ; MAP
+FE02; ; MAP
+FE03; ; MAP
+FE04; ; MAP
+FE05; ; MAP
+FE06; ; MAP
+FE07; ; MAP
+FE08; ; MAP
+FE09; ; MAP
+FE0A; ; MAP
+FE0B; ; MAP
+FE0C; ; MAP
+FE0D; ; MAP
+FE0E; ; MAP
+FE0F; ; MAP
+FEFF; ; MAP
+
+# Total code points 27
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table B.2 from RFC 3454
+
+0041; 0061; MAP
+0042; 0062; MAP
+0043; 0063; MAP
+0044; 0064; MAP
+0045; 0065; MAP
+0046; 0066; MAP
+0047; 0067; MAP
+0048; 0068; MAP
+0049; 0069; MAP
+004A; 006A; MAP
+004B; 006B; MAP
+004C; 006C; MAP
+004D; 006D; MAP
+004E; 006E; MAP
+004F; 006F; MAP
+0050; 0070; MAP
+0051; 0071; MAP
+0052; 0072; MAP
+0053; 0073; MAP
+0054; 0074; MAP
+0055; 0075; MAP
+0056; 0076; MAP
+0057; 0077; MAP
+0058; 0078; MAP
+0059; 0079; MAP
+005A; 007A; MAP
+00B5; 03BC; MAP
+00C0; 00E0; MAP
+00C1; 00E1; MAP
+00C2; 00E2; MAP
+00C3; 00E3; MAP
+00C4; 00E4; MAP
+00C5; 00E5; MAP
+00C6; 00E6; MAP
+00C7; 00E7; MAP
+00C8; 00E8; MAP
+00C9; 00E9; MAP
+00CA; 00EA; MAP
+00CB; 00EB; MAP
+00CC; 00EC; MAP
+00CD; 00ED; MAP
+00CE; 00EE; MAP
+00CF; 00EF; MAP
+00D0; 00F0; MAP
+00D1; 00F1; MAP
+00D2; 00F2; MAP
+00D3; 00F3; MAP
+00D4; 00F4; MAP
+00D5; 00F5; MAP
+00D6; 00F6; MAP
+00D8; 00F8; MAP
+00D9; 00F9; MAP
+00DA; 00FA; MAP
+00DB; 00FB; MAP
+00DC; 00FC; MAP
+00DD; 00FD; MAP
+00DE; 00FE; MAP
+00DF; 0073 0073; MAP
+0100; 0101; MAP
+0102; 0103; MAP
+0104; 0105; MAP
+0106; 0107; MAP
+0108; 0109; MAP
+010A; 010B; MAP
+010C; 010D; MAP
+010E; 010F; MAP
+0110; 0111; MAP
+0112; 0113; MAP
+0114; 0115; MAP
+0116; 0117; MAP
+0118; 0119; MAP
+011A; 011B; MAP
+011C; 011D; MAP
+011E; 011F; MAP
+0120; 0121; MAP
+0122; 0123; MAP
+0124; 0125; MAP
+0126; 0127; MAP
+0128; 0129; MAP
+012A; 012B; MAP
+012C; 012D; MAP
+012E; 012F; MAP
+0130; 0069 0307; MAP
+0132; 0133; MAP
+0134; 0135; MAP
+0136; 0137; MAP
+0139; 013A; MAP
+013B; 013C; MAP
+013D; 013E; MAP
+013F; 0140; MAP
+0141; 0142; MAP
+0143; 0144; MAP
+0145; 0146; MAP
+0147; 0148; MAP
+0149; 02BC 006E; MAP
+014A; 014B; MAP
+014C; 014D; MAP
+014E; 014F; MAP
+0150; 0151; MAP
+0152; 0153; MAP
+0154; 0155; MAP
+0156; 0157; MAP
+0158; 0159; MAP
+015A; 015B; MAP
+015C; 015D; MAP
+015E; 015F; MAP
+0160; 0161; MAP
+0162; 0163; MAP
+0164; 0165; MAP
+0166; 0167; MAP
+0168; 0169; MAP
+016A; 016B; MAP
+016C; 016D; MAP
+016E; 016F; MAP
+0170; 0171; MAP
+0172; 0173; MAP
+0174; 0175; MAP
+0176; 0177; MAP
+0178; 00FF; MAP
+0179; 017A; MAP
+017B; 017C; MAP
+017D; 017E; MAP
+017F; 0073; MAP
+0181; 0253; MAP
+0182; 0183; MAP
+0184; 0185; MAP
+0186; 0254; MAP
+0187; 0188; MAP
+0189; 0256; MAP
+018A; 0257; MAP
+018B; 018C; MAP
+018E; 01DD; MAP
+018F; 0259; MAP
+0190; 025B; MAP
+0191; 0192; MAP
+0193; 0260; MAP
+0194; 0263; MAP
+0196; 0269; MAP
+0197; 0268; MAP
+0198; 0199; MAP
+019C; 026F; MAP
+019D; 0272; MAP
+019F; 0275; MAP
+01A0; 01A1; MAP
+01A2; 01A3; MAP
+01A4; 01A5; MAP
+01A6; 0280; MAP
+01A7; 01A8; MAP
+01A9; 0283; MAP
+01AC; 01AD; MAP
+01AE; 0288; MAP
+01AF; 01B0; MAP
+01B1; 028A; MAP
+01B2; 028B; MAP
+01B3; 01B4; MAP
+01B5; 01B6; MAP
+01B7; 0292; MAP
+01B8; 01B9; MAP
+01BC; 01BD; MAP
+01C4; 01C6; MAP
+01C5; 01C6; MAP
+01C7; 01C9; MAP
+01C8; 01C9; MAP
+01CA; 01CC; MAP
+01CB; 01CC; MAP
+01CD; 01CE; MAP
+01CF; 01D0; MAP
+01D1; 01D2; MAP
+01D3; 01D4; MAP
+01D5; 01D6; MAP
+01D7; 01D8; MAP
+01D9; 01DA; MAP
+01DB; 01DC; MAP
+01DE; 01DF; MAP
+01E0; 01E1; MAP
+01E2; 01E3; MAP
+01E4; 01E5; MAP
+01E6; 01E7; MAP
+01E8; 01E9; MAP
+01EA; 01EB; MAP
+01EC; 01ED; MAP
+01EE; 01EF; MAP
+01F0; 006A 030C; MAP
+01F1; 01F3; MAP
+01F2; 01F3; MAP
+01F4; 01F5; MAP
+01F6; 0195; MAP
+01F7; 01BF; MAP
+01F8; 01F9; MAP
+01FA; 01FB; MAP
+01FC; 01FD; MAP
+01FE; 01FF; MAP
+0200; 0201; MAP
+0202; 0203; MAP
+0204; 0205; MAP
+0206; 0207; MAP
+0208; 0209; MAP
+020A; 020B; MAP
+020C; 020D; MAP
+020E; 020F; MAP
+0210; 0211; MAP
+0212; 0213; MAP
+0214; 0215; MAP
+0216; 0217; MAP
+0218; 0219; MAP
+021A; 021B; MAP
+021C; 021D; MAP
+021E; 021F; MAP
+0220; 019E; MAP
+0222; 0223; MAP
+0224; 0225; MAP
+0226; 0227; MAP
+0228; 0229; MAP
+022A; 022B; MAP
+022C; 022D; MAP
+022E; 022F; MAP
+0230; 0231; MAP
+0232; 0233; MAP
+0345; 03B9; MAP
+037A; 0020 03B9; MAP
+0386; 03AC; MAP
+0388; 03AD; MAP
+0389; 03AE; MAP
+038A; 03AF; MAP
+038C; 03CC; MAP
+038E; 03CD; MAP
+038F; 03CE; MAP
+0390; 03B9 0308 0301; MAP
+0391; 03B1; MAP
+0392; 03B2; MAP
+0393; 03B3; MAP
+0394; 03B4; MAP
+0395; 03B5; MAP
+0396; 03B6; MAP
+0397; 03B7; MAP
+0398; 03B8; MAP
+0399; 03B9; MAP
+039A; 03BA; MAP
+039B; 03BB; MAP
+039C; 03BC; MAP
+039D; 03BD; MAP
+039E; 03BE; MAP
+039F; 03BF; MAP
+03A0; 03C0; MAP
+03A1; 03C1; MAP
+03A3; 03C3; MAP
+03A4; 03C4; MAP
+03A5; 03C5; MAP
+03A6; 03C6; MAP
+03A7; 03C7; MAP
+03A8; 03C8; MAP
+03A9; 03C9; MAP
+03AA; 03CA; MAP
+03AB; 03CB; MAP
+03B0; 03C5 0308 0301; MAP
+03C2; 03C3; MAP
+03D0; 03B2; MAP
+03D1; 03B8; MAP
+03D2; 03C5; MAP
+03D3; 03CD; MAP
+03D4; 03CB; MAP
+03D5; 03C6; MAP
+03D6; 03C0; MAP
+03D8; 03D9; MAP
+03DA; 03DB; MAP
+03DC; 03DD; MAP
+03DE; 03DF; MAP
+03E0; 03E1; MAP
+03E2; 03E3; MAP
+03E4; 03E5; MAP
+03E6; 03E7; MAP
+03E8; 03E9; MAP
+03EA; 03EB; MAP
+03EC; 03ED; MAP
+03EE; 03EF; MAP
+03F0; 03BA; MAP
+03F1; 03C1; MAP
+03F2; 03C3; MAP
+03F4; 03B8; MAP
+03F5; 03B5; MAP
+0400; 0450; MAP
+0401; 0451; MAP
+0402; 0452; MAP
+0403; 0453; MAP
+0404; 0454; MAP
+0405; 0455; MAP
+0406; 0456; MAP
+0407; 0457; MAP
+0408; 0458; MAP
+0409; 0459; MAP
+040A; 045A; MAP
+040B; 045B; MAP
+040C; 045C; MAP
+040D; 045D; MAP
+040E; 045E; MAP
+040F; 045F; MAP
+0410; 0430; MAP
+0411; 0431; MAP
+0412; 0432; MAP
+0413; 0433; MAP
+0414; 0434; MAP
+0415; 0435; MAP
+0416; 0436; MAP
+0417; 0437; MAP
+0418; 0438; MAP
+0419; 0439; MAP
+041A; 043A; MAP
+041B; 043B; MAP
+041C; 043C; MAP
+041D; 043D; MAP
+041E; 043E; MAP
+041F; 043F; MAP
+0420; 0440; MAP
+0421; 0441; MAP
+0422; 0442; MAP
+0423; 0443; MAP
+0424; 0444; MAP
+0425; 0445; MAP
+0426; 0446; MAP
+0427; 0447; MAP
+0428; 0448; MAP
+0429; 0449; MAP
+042A; 044A; MAP
+042B; 044B; MAP
+042C; 044C; MAP
+042D; 044D; MAP
+042E; 044E; MAP
+042F; 044F; MAP
+0460; 0461; MAP
+0462; 0463; MAP
+0464; 0465; MAP
+0466; 0467; MAP
+0468; 0469; MAP
+046A; 046B; MAP
+046C; 046D; MAP
+046E; 046F; MAP
+0470; 0471; MAP
+0472; 0473; MAP
+0474; 0475; MAP
+0476; 0477; MAP
+0478; 0479; MAP
+047A; 047B; MAP
+047C; 047D; MAP
+047E; 047F; MAP
+0480; 0481; MAP
+048A; 048B; MAP
+048C; 048D; MAP
+048E; 048F; MAP
+0490; 0491; MAP
+0492; 0493; MAP
+0494; 0495; MAP
+0496; 0497; MAP
+0498; 0499; MAP
+049A; 049B; MAP
+049C; 049D; MAP
+049E; 049F; MAP
+04A0; 04A1; MAP
+04A2; 04A3; MAP
+04A4; 04A5; MAP
+04A6; 04A7; MAP
+04A8; 04A9; MAP
+04AA; 04AB; MAP
+04AC; 04AD; MAP
+04AE; 04AF; MAP
+04B0; 04B1; MAP
+04B2; 04B3; MAP
+04B4; 04B5; MAP
+04B6; 04B7; MAP
+04B8; 04B9; MAP
+04BA; 04BB; MAP
+04BC; 04BD; MAP
+04BE; 04BF; MAP
+04C1; 04C2; MAP
+04C3; 04C4; MAP
+04C5; 04C6; MAP
+04C7; 04C8; MAP
+04C9; 04CA; MAP
+04CB; 04CC; MAP
+04CD; 04CE; MAP
+04D0; 04D1; MAP
+04D2; 04D3; MAP
+04D4; 04D5; MAP
+04D6; 04D7; MAP
+04D8; 04D9; MAP
+04DA; 04DB; MAP
+04DC; 04DD; MAP
+04DE; 04DF; MAP
+04E0; 04E1; MAP
+04E2; 04E3; MAP
+04E4; 04E5; MAP
+04E6; 04E7; MAP
+04E8; 04E9; MAP
+04EA; 04EB; MAP
+04EC; 04ED; MAP
+04EE; 04EF; MAP
+04F0; 04F1; MAP
+04F2; 04F3; MAP
+04F4; 04F5; MAP
+04F8; 04F9; MAP
+0500; 0501; MAP
+0502; 0503; MAP
+0504; 0505; MAP
+0506; 0507; MAP
+0508; 0509; MAP
+050A; 050B; MAP
+050C; 050D; MAP
+050E; 050F; MAP
+0531; 0561; MAP
+0532; 0562; MAP
+0533; 0563; MAP
+0534; 0564; MAP
+0535; 0565; MAP
+0536; 0566; MAP
+0537; 0567; MAP
+0538; 0568; MAP
+0539; 0569; MAP
+053A; 056A; MAP
+053B; 056B; MAP
+053C; 056C; MAP
+053D; 056D; MAP
+053E; 056E; MAP
+053F; 056F; MAP
+0540; 0570; MAP
+0541; 0571; MAP
+0542; 0572; MAP
+0543; 0573; MAP
+0544; 0574; MAP
+0545; 0575; MAP
+0546; 0576; MAP
+0547; 0577; MAP
+0548; 0578; MAP
+0549; 0579; MAP
+054A; 057A; MAP
+054B; 057B; MAP
+054C; 057C; MAP
+054D; 057D; MAP
+054E; 057E; MAP
+054F; 057F; MAP
+0550; 0580; MAP
+0551; 0581; MAP
+0552; 0582; MAP
+0553; 0583; MAP
+0554; 0584; MAP
+0555; 0585; MAP
+0556; 0586; MAP
+0587; 0565 0582; MAP
+1E00; 1E01; MAP
+1E02; 1E03; MAP
+1E04; 1E05; MAP
+1E06; 1E07; MAP
+1E08; 1E09; MAP
+1E0A; 1E0B; MAP
+1E0C; 1E0D; MAP
+1E0E; 1E0F; MAP
+1E10; 1E11; MAP
+1E12; 1E13; MAP
+1E14; 1E15; MAP
+1E16; 1E17; MAP
+1E18; 1E19; MAP
+1E1A; 1E1B; MAP
+1E1C; 1E1D; MAP
+1E1E; 1E1F; MAP
+1E20; 1E21; MAP
+1E22; 1E23; MAP
+1E24; 1E25; MAP
+1E26; 1E27; MAP
+1E28; 1E29; MAP
+1E2A; 1E2B; MAP
+1E2C; 1E2D; MAP
+1E2E; 1E2F; MAP
+1E30; 1E31; MAP
+1E32; 1E33; MAP
+1E34; 1E35; MAP
+1E36; 1E37; MAP
+1E38; 1E39; MAP
+1E3A; 1E3B; MAP
+1E3C; 1E3D; MAP
+1E3E; 1E3F; MAP
+1E40; 1E41; MAP
+1E42; 1E43; MAP
+1E44; 1E45; MAP
+1E46; 1E47; MAP
+1E48; 1E49; MAP
+1E4A; 1E4B; MAP
+1E4C; 1E4D; MAP
+1E4E; 1E4F; MAP
+1E50; 1E51; MAP
+1E52; 1E53; MAP
+1E54; 1E55; MAP
+1E56; 1E57; MAP
+1E58; 1E59; MAP
+1E5A; 1E5B; MAP
+1E5C; 1E5D; MAP
+1E5E; 1E5F; MAP
+1E60; 1E61; MAP
+1E62; 1E63; MAP
+1E64; 1E65; MAP
+1E66; 1E67; MAP
+1E68; 1E69; MAP
+1E6A; 1E6B; MAP
+1E6C; 1E6D; MAP
+1E6E; 1E6F; MAP
+1E70; 1E71; MAP
+1E72; 1E73; MAP
+1E74; 1E75; MAP
+1E76; 1E77; MAP
+1E78; 1E79; MAP
+1E7A; 1E7B; MAP
+1E7C; 1E7D; MAP
+1E7E; 1E7F; MAP
+1E80; 1E81; MAP
+1E82; 1E83; MAP
+1E84; 1E85; MAP
+1E86; 1E87; MAP
+1E88; 1E89; MAP
+1E8A; 1E8B; MAP
+1E8C; 1E8D; MAP
+1E8E; 1E8F; MAP
+1E90; 1E91; MAP
+1E92; 1E93; MAP
+1E94; 1E95; MAP
+1E96; 0068 0331; MAP
+1E97; 0074 0308; MAP
+1E98; 0077 030A; MAP
+1E99; 0079 030A; MAP
+1E9A; 0061 02BE; MAP
+1E9B; 1E61; MAP
+1EA0; 1EA1; MAP
+1EA2; 1EA3; MAP
+1EA4; 1EA5; MAP
+1EA6; 1EA7; MAP
+1EA8; 1EA9; MAP
+1EAA; 1EAB; MAP
+1EAC; 1EAD; MAP
+1EAE; 1EAF; MAP
+1EB0; 1EB1; MAP
+1EB2; 1EB3; MAP
+1EB4; 1EB5; MAP
+1EB6; 1EB7; MAP
+1EB8; 1EB9; MAP
+1EBA; 1EBB; MAP
+1EBC; 1EBD; MAP
+1EBE; 1EBF; MAP
+1EC0; 1EC1; MAP
+1EC2; 1EC3; MAP
+1EC4; 1EC5; MAP
+1EC6; 1EC7; MAP
+1EC8; 1EC9; MAP
+1ECA; 1ECB; MAP
+1ECC; 1ECD; MAP
+1ECE; 1ECF; MAP
+1ED0; 1ED1; MAP
+1ED2; 1ED3; MAP
+1ED4; 1ED5; MAP
+1ED6; 1ED7; MAP
+1ED8; 1ED9; MAP
+1EDA; 1EDB; MAP
+1EDC; 1EDD; MAP
+1EDE; 1EDF; MAP
+1EE0; 1EE1; MAP
+1EE2; 1EE3; MAP
+1EE4; 1EE5; MAP
+1EE6; 1EE7; MAP
+1EE8; 1EE9; MAP
+1EEA; 1EEB; MAP
+1EEC; 1EED; MAP
+1EEE; 1EEF; MAP
+1EF0; 1EF1; MAP
+1EF2; 1EF3; MAP
+1EF4; 1EF5; MAP
+1EF6; 1EF7; MAP
+1EF8; 1EF9; MAP
+1F08; 1F00; MAP
+1F09; 1F01; MAP
+1F0A; 1F02; MAP
+1F0B; 1F03; MAP
+1F0C; 1F04; MAP
+1F0D; 1F05; MAP
+1F0E; 1F06; MAP
+1F0F; 1F07; MAP
+1F18; 1F10; MAP
+1F19; 1F11; MAP
+1F1A; 1F12; MAP
+1F1B; 1F13; MAP
+1F1C; 1F14; MAP
+1F1D; 1F15; MAP
+1F28; 1F20; MAP
+1F29; 1F21; MAP
+1F2A; 1F22; MAP
+1F2B; 1F23; MAP
+1F2C; 1F24; MAP
+1F2D; 1F25; MAP
+1F2E; 1F26; MAP
+1F2F; 1F27; MAP
+1F38; 1F30; MAP
+1F39; 1F31; MAP
+1F3A; 1F32; MAP
+1F3B; 1F33; MAP
+1F3C; 1F34; MAP
+1F3D; 1F35; MAP
+1F3E; 1F36; MAP
+1F3F; 1F37; MAP
+1F48; 1F40; MAP
+1F49; 1F41; MAP
+1F4A; 1F42; MAP
+1F4B; 1F43; MAP
+1F4C; 1F44; MAP
+1F4D; 1F45; MAP
+1F50; 03C5 0313; MAP
+1F52; 03C5 0313 0300; MAP
+1F54; 03C5 0313 0301; MAP
+1F56; 03C5 0313 0342; MAP
+1F59; 1F51; MAP
+1F5B; 1F53; MAP
+1F5D; 1F55; MAP
+1F5F; 1F57; MAP
+1F68; 1F60; MAP
+1F69; 1F61; MAP
+1F6A; 1F62; MAP
+1F6B; 1F63; MAP
+1F6C; 1F64; MAP
+1F6D; 1F65; MAP
+1F6E; 1F66; MAP
+1F6F; 1F67; MAP
+1F80; 1F00 03B9; MAP
+1F81; 1F01 03B9; MAP
+1F82; 1F02 03B9; MAP
+1F83; 1F03 03B9; MAP
+1F84; 1F04 03B9; MAP
+1F85; 1F05 03B9; MAP
+1F86; 1F06 03B9; MAP
+1F87; 1F07 03B9; MAP
+1F88; 1F00 03B9; MAP
+1F89; 1F01 03B9; MAP
+1F8A; 1F02 03B9; MAP
+1F8B; 1F03 03B9; MAP
+1F8C; 1F04 03B9; MAP
+1F8D; 1F05 03B9; MAP
+1F8E; 1F06 03B9; MAP
+1F8F; 1F07 03B9; MAP
+1F90; 1F20 03B9; MAP
+1F91; 1F21 03B9; MAP
+1F92; 1F22 03B9; MAP
+1F93; 1F23 03B9; MAP
+1F94; 1F24 03B9; MAP
+1F95; 1F25 03B9; MAP
+1F96; 1F26 03B9; MAP
+1F97; 1F27 03B9; MAP
+1F98; 1F20 03B9; MAP
+1F99; 1F21 03B9; MAP
+1F9A; 1F22 03B9; MAP
+1F9B; 1F23 03B9; MAP
+1F9C; 1F24 03B9; MAP
+1F9D; 1F25 03B9; MAP
+1F9E; 1F26 03B9; MAP
+1F9F; 1F27 03B9; MAP
+1FA0; 1F60 03B9; MAP
+1FA1; 1F61 03B9; MAP
+1FA2; 1F62 03B9; MAP
+1FA3; 1F63 03B9; MAP
+1FA4; 1F64 03B9; MAP
+1FA5; 1F65 03B9; MAP
+1FA6; 1F66 03B9; MAP
+1FA7; 1F67 03B9; MAP
+1FA8; 1F60 03B9; MAP
+1FA9; 1F61 03B9; MAP
+1FAA; 1F62 03B9; MAP
+1FAB; 1F63 03B9; MAP
+1FAC; 1F64 03B9; MAP
+1FAD; 1F65 03B9; MAP
+1FAE; 1F66 03B9; MAP
+1FAF; 1F67 03B9; MAP
+1FB2; 1F70 03B9; MAP
+1FB3; 03B1 03B9; MAP
+1FB4; 03AC 03B9; MAP
+1FB6; 03B1 0342; MAP
+1FB7; 03B1 0342 03B9; MAP
+1FB8; 1FB0; MAP
+1FB9; 1FB1; MAP
+1FBA; 1F70; MAP
+1FBB; 1F71; MAP
+1FBC; 03B1 03B9; MAP
+1FBE; 03B9; MAP
+1FC2; 1F74 03B9; MAP
+1FC3; 03B7 03B9; MAP
+1FC4; 03AE 03B9; MAP
+1FC6; 03B7 0342; MAP
+1FC7; 03B7 0342 03B9; MAP
+1FC8; 1F72; MAP
+1FC9; 1F73; MAP
+1FCA; 1F74; MAP
+1FCB; 1F75; MAP
+1FCC; 03B7 03B9; MAP
+1FD2; 03B9 0308 0300; MAP
+1FD3; 03B9 0308 0301; MAP
+1FD6; 03B9 0342; MAP
+1FD7; 03B9 0308 0342; MAP
+1FD8; 1FD0; MAP
+1FD9; 1FD1; MAP
+1FDA; 1F76; MAP
+1FDB; 1F77; MAP
+1FE2; 03C5 0308 0300; MAP
+1FE3; 03C5 0308 0301; MAP
+1FE4; 03C1 0313; MAP
+1FE6; 03C5 0342; MAP
+1FE7; 03C5 0308 0342; MAP
+1FE8; 1FE0; MAP
+1FE9; 1FE1; MAP
+1FEA; 1F7A; MAP
+1FEB; 1F7B; MAP
+1FEC; 1FE5; MAP
+1FF2; 1F7C 03B9; MAP
+1FF3; 03C9 03B9; MAP
+1FF4; 03CE 03B9; MAP
+1FF6; 03C9 0342; MAP
+1FF7; 03C9 0342 03B9; MAP
+1FF8; 1F78; MAP
+1FF9; 1F79; MAP
+1FFA; 1F7C; MAP
+1FFB; 1F7D; MAP
+1FFC; 03C9 03B9; MAP
+20A8; 0072 0073; MAP
+2102; 0063; MAP
+2103; 00B0 0063; MAP
+2107; 025B; MAP
+2109; 00B0 0066; MAP
+210B; 0068; MAP
+210C; 0068; MAP
+210D; 0068; MAP
+2110; 0069; MAP
+2111; 0069; MAP
+2112; 006C; MAP
+2115; 006E; MAP
+2116; 006E 006F; MAP
+2119; 0070; MAP
+211A; 0071; MAP
+211B; 0072; MAP
+211C; 0072; MAP
+211D; 0072; MAP
+2120; 0073 006D; MAP
+2121; 0074 0065 006C; MAP
+2122; 0074 006D; MAP
+2124; 007A; MAP
+2126; 03C9; MAP
+2128; 007A; MAP
+212A; 006B; MAP
+212B; 00E5; MAP
+212C; 0062; MAP
+212D; 0063; MAP
+2130; 0065; MAP
+2131; 0066; MAP
+2133; 006D; MAP
+213E; 03B3; MAP
+213F; 03C0; MAP
+2145; 0064; MAP
+2160; 2170; MAP
+2161; 2171; MAP
+2162; 2172; MAP
+2163; 2173; MAP
+2164; 2174; MAP
+2165; 2175; MAP
+2166; 2176; MAP
+2167; 2177; MAP
+2168; 2178; MAP
+2169; 2179; MAP
+216A; 217A; MAP
+216B; 217B; MAP
+216C; 217C; MAP
+216D; 217D; MAP
+216E; 217E; MAP
+216F; 217F; MAP
+24B6; 24D0; MAP
+24B7; 24D1; MAP
+24B8; 24D2; MAP
+24B9; 24D3; MAP
+24BA; 24D4; MAP
+24BB; 24D5; MAP
+24BC; 24D6; MAP
+24BD; 24D7; MAP
+24BE; 24D8; MAP
+24BF; 24D9; MAP
+24C0; 24DA; MAP
+24C1; 24DB; MAP
+24C2; 24DC; MAP
+24C3; 24DD; MAP
+24C4; 24DE; MAP
+24C5; 24DF; MAP
+24C6; 24E0; MAP
+24C7; 24E1; MAP
+24C8; 24E2; MAP
+24C9; 24E3; MAP
+24CA; 24E4; MAP
+24CB; 24E5; MAP
+24CC; 24E6; MAP
+24CD; 24E7; MAP
+24CE; 24E8; MAP
+24CF; 24E9; MAP
+3371; 0068 0070 0061; MAP
+3373; 0061 0075; MAP
+3375; 006F 0076; MAP
+3380; 0070 0061; MAP
+3381; 006E 0061; MAP
+3382; 03BC 0061; MAP
+3383; 006D 0061; MAP
+3384; 006B 0061; MAP
+3385; 006B 0062; MAP
+3386; 006D 0062; MAP
+3387; 0067 0062; MAP
+338A; 0070 0066; MAP
+338B; 006E 0066; MAP
+338C; 03BC 0066; MAP
+3390; 0068 007A; MAP
+3391; 006B 0068 007A; MAP
+3392; 006D 0068 007A; MAP
+3393; 0067 0068 007A; MAP
+3394; 0074 0068 007A; MAP
+33A9; 0070 0061; MAP
+33AA; 006B 0070 0061; MAP
+33AB; 006D 0070 0061; MAP
+33AC; 0067 0070 0061; MAP
+33B4; 0070 0076; MAP
+33B5; 006E 0076; MAP
+33B6; 03BC 0076; MAP
+33B7; 006D 0076; MAP
+33B8; 006B 0076; MAP
+33B9; 006D 0076; MAP
+33BA; 0070 0077; MAP
+33BB; 006E 0077; MAP
+33BC; 03BC 0077; MAP
+33BD; 006D 0077; MAP
+33BE; 006B 0077; MAP
+33BF; 006D 0077; MAP
+33C0; 006B 03C9; MAP
+33C1; 006D 03C9; MAP
+33C3; 0062 0071; MAP
+33C6; 0063 2215 006B 0067; MAP
+33C7; 0063 006F 002E; MAP
+33C8; 0064 0062; MAP
+33C9; 0067 0079; MAP
+33CB; 0068 0070; MAP
+33CD; 006B 006B; MAP
+33CE; 006B 006D; MAP
+33D7; 0070 0068; MAP
+33D9; 0070 0070 006D; MAP
+33DA; 0070 0072; MAP
+33DC; 0073 0076; MAP
+33DD; 0077 0062; MAP
+FB00; 0066 0066; MAP
+FB01; 0066 0069; MAP
+FB02; 0066 006C; MAP
+FB03; 0066 0066 0069; MAP
+FB04; 0066 0066 006C; MAP
+FB05; 0073 0074; MAP
+FB06; 0073 0074; MAP
+FB13; 0574 0576; MAP
+FB14; 0574 0565; MAP
+FB15; 0574 056B; MAP
+FB16; 057E 0576; MAP
+FB17; 0574 056D; MAP
+FF21; FF41; MAP
+FF22; FF42; MAP
+FF23; FF43; MAP
+FF24; FF44; MAP
+FF25; FF45; MAP
+FF26; FF46; MAP
+FF27; FF47; MAP
+FF28; FF48; MAP
+FF29; FF49; MAP
+FF2A; FF4A; MAP
+FF2B; FF4B; MAP
+FF2C; FF4C; MAP
+FF2D; FF4D; MAP
+FF2E; FF4E; MAP
+FF2F; FF4F; MAP
+FF30; FF50; MAP
+FF31; FF51; MAP
+FF32; FF52; MAP
+FF33; FF53; MAP
+FF34; FF54; MAP
+FF35; FF55; MAP
+FF36; FF56; MAP
+FF37; FF57; MAP
+FF38; FF58; MAP
+FF39; FF59; MAP
+FF3A; FF5A; MAP
+10400; 10428; MAP
+10401; 10429; MAP
+10402; 1042A; MAP
+10403; 1042B; MAP
+10404; 1042C; MAP
+10405; 1042D; MAP
+10406; 1042E; MAP
+10407; 1042F; MAP
+10408; 10430; MAP
+10409; 10431; MAP
+1040A; 10432; MAP
+1040B; 10433; MAP
+1040C; 10434; MAP
+1040D; 10435; MAP
+1040E; 10436; MAP
+1040F; 10437; MAP
+10410; 10438; MAP
+10411; 10439; MAP
+10412; 1043A; MAP
+10413; 1043B; MAP
+10414; 1043C; MAP
+10415; 1043D; MAP
+10416; 1043E; MAP
+10417; 1043F; MAP
+10418; 10440; MAP
+10419; 10441; MAP
+1041A; 10442; MAP
+1041B; 10443; MAP
+1041C; 10444; MAP
+1041D; 10445; MAP
+1041E; 10446; MAP
+1041F; 10447; MAP
+10420; 10448; MAP
+10421; 10449; MAP
+10422; 1044A; MAP
+10423; 1044B; MAP
+10424; 1044C; MAP
+10425; 1044D; MAP
+1D400; 0061; MAP
+1D401; 0062; MAP
+1D402; 0063; MAP
+1D403; 0064; MAP
+1D404; 0065; MAP
+1D405; 0066; MAP
+1D406; 0067; MAP
+1D407; 0068; MAP
+1D408; 0069; MAP
+1D409; 006A; MAP
+1D40A; 006B; MAP
+1D40B; 006C; MAP
+1D40C; 006D; MAP
+1D40D; 006E; MAP
+1D40E; 006F; MAP
+1D40F; 0070; MAP
+1D410; 0071; MAP
+1D411; 0072; MAP
+1D412; 0073; MAP
+1D413; 0074; MAP
+1D414; 0075; MAP
+1D415; 0076; MAP
+1D416; 0077; MAP
+1D417; 0078; MAP
+1D418; 0079; MAP
+1D419; 007A; MAP
+1D434; 0061; MAP
+1D435; 0062; MAP
+1D436; 0063; MAP
+1D437; 0064; MAP
+1D438; 0065; MAP
+1D439; 0066; MAP
+1D43A; 0067; MAP
+1D43B; 0068; MAP
+1D43C; 0069; MAP
+1D43D; 006A; MAP
+1D43E; 006B; MAP
+1D43F; 006C; MAP
+1D440; 006D; MAP
+1D441; 006E; MAP
+1D442; 006F; MAP
+1D443; 0070; MAP
+1D444; 0071; MAP
+1D445; 0072; MAP
+1D446; 0073; MAP
+1D447; 0074; MAP
+1D448; 0075; MAP
+1D449; 0076; MAP
+1D44A; 0077; MAP
+1D44B; 0078; MAP
+1D44C; 0079; MAP
+1D44D; 007A; MAP
+1D468; 0061; MAP
+1D469; 0062; MAP
+1D46A; 0063; MAP
+1D46B; 0064; MAP
+1D46C; 0065; MAP
+1D46D; 0066; MAP
+1D46E; 0067; MAP
+1D46F; 0068; MAP
+1D470; 0069; MAP
+1D471; 006A; MAP
+1D472; 006B; MAP
+1D473; 006C; MAP
+1D474; 006D; MAP
+1D475; 006E; MAP
+1D476; 006F; MAP
+1D477; 0070; MAP
+1D478; 0071; MAP
+1D479; 0072; MAP
+1D47A; 0073; MAP
+1D47B; 0074; MAP
+1D47C; 0075; MAP
+1D47D; 0076; MAP
+1D47E; 0077; MAP
+1D47F; 0078; MAP
+1D480; 0079; MAP
+1D481; 007A; MAP
+1D49C; 0061; MAP
+1D49E; 0063; MAP
+1D49F; 0064; MAP
+1D4A2; 0067; MAP
+1D4A5; 006A; MAP
+1D4A6; 006B; MAP
+1D4A9; 006E; MAP
+1D4AA; 006F; MAP
+1D4AB; 0070; MAP
+1D4AC; 0071; MAP
+1D4AE; 0073; MAP
+1D4AF; 0074; MAP
+1D4B0; 0075; MAP
+1D4B1; 0076; MAP
+1D4B2; 0077; MAP
+1D4B3; 0078; MAP
+1D4B4; 0079; MAP
+1D4B5; 007A; MAP
+1D4D0; 0061; MAP
+1D4D1; 0062; MAP
+1D4D2; 0063; MAP
+1D4D3; 0064; MAP
+1D4D4; 0065; MAP
+1D4D5; 0066; MAP
+1D4D6; 0067; MAP
+1D4D7; 0068; MAP
+1D4D8; 0069; MAP
+1D4D9; 006A; MAP
+1D4DA; 006B; MAP
+1D4DB; 006C; MAP
+1D4DC; 006D; MAP
+1D4DD; 006E; MAP
+1D4DE; 006F; MAP
+1D4DF; 0070; MAP
+1D4E0; 0071; MAP
+1D4E1; 0072; MAP
+1D4E2; 0073; MAP
+1D4E3; 0074; MAP
+1D4E4; 0075; MAP
+1D4E5; 0076; MAP
+1D4E6; 0077; MAP
+1D4E7; 0078; MAP
+1D4E8; 0079; MAP
+1D4E9; 007A; MAP
+1D504; 0061; MAP
+1D505; 0062; MAP
+1D507; 0064; MAP
+1D508; 0065; MAP
+1D509; 0066; MAP
+1D50A; 0067; MAP
+1D50D; 006A; MAP
+1D50E; 006B; MAP
+1D50F; 006C; MAP
+1D510; 006D; MAP
+1D511; 006E; MAP
+1D512; 006F; MAP
+1D513; 0070; MAP
+1D514; 0071; MAP
+1D516; 0073; MAP
+1D517; 0074; MAP
+1D518; 0075; MAP
+1D519; 0076; MAP
+1D51A; 0077; MAP
+1D51B; 0078; MAP
+1D51C; 0079; MAP
+1D538; 0061; MAP
+1D539; 0062; MAP
+1D53B; 0064; MAP
+1D53C; 0065; MAP
+1D53D; 0066; MAP
+1D53E; 0067; MAP
+1D540; 0069; MAP
+1D541; 006A; MAP
+1D542; 006B; MAP
+1D543; 006C; MAP
+1D544; 006D; MAP
+1D546; 006F; MAP
+1D54A; 0073; MAP
+1D54B; 0074; MAP
+1D54C; 0075; MAP
+1D54D; 0076; MAP
+1D54E; 0077; MAP
+1D54F; 0078; MAP
+1D550; 0079; MAP
+1D56C; 0061; MAP
+1D56D; 0062; MAP
+1D56E; 0063; MAP
+1D56F; 0064; MAP
+1D570; 0065; MAP
+1D571; 0066; MAP
+1D572; 0067; MAP
+1D573; 0068; MAP
+1D574; 0069; MAP
+1D575; 006A; MAP
+1D576; 006B; MAP
+1D577; 006C; MAP
+1D578; 006D; MAP
+1D579; 006E; MAP
+1D57A; 006F; MAP
+1D57B; 0070; MAP
+1D57C; 0071; MAP
+1D57D; 0072; MAP
+1D57E; 0073; MAP
+1D57F; 0074; MAP
+1D580; 0075; MAP
+1D581; 0076; MAP
+1D582; 0077; MAP
+1D583; 0078; MAP
+1D584; 0079; MAP
+1D585; 007A; MAP
+1D5A0; 0061; MAP
+1D5A1; 0062; MAP
+1D5A2; 0063; MAP
+1D5A3; 0064; MAP
+1D5A4; 0065; MAP
+1D5A5; 0066; MAP
+1D5A6; 0067; MAP
+1D5A7; 0068; MAP
+1D5A8; 0069; MAP
+1D5A9; 006A; MAP
+1D5AA; 006B; MAP
+1D5AB; 006C; MAP
+1D5AC; 006D; MAP
+1D5AD; 006E; MAP
+1D5AE; 006F; MAP
+1D5AF; 0070; MAP
+1D5B0; 0071; MAP
+1D5B1; 0072; MAP
+1D5B2; 0073; MAP
+1D5B3; 0074; MAP
+1D5B4; 0075; MAP
+1D5B5; 0076; MAP
+1D5B6; 0077; MAP
+1D5B7; 0078; MAP
+1D5B8; 0079; MAP
+1D5B9; 007A; MAP
+1D5D4; 0061; MAP
+1D5D5; 0062; MAP
+1D5D6; 0063; MAP
+1D5D7; 0064; MAP
+1D5D8; 0065; MAP
+1D5D9; 0066; MAP
+1D5DA; 0067; MAP
+1D5DB; 0068; MAP
+1D5DC; 0069; MAP
+1D5DD; 006A; MAP
+1D5DE; 006B; MAP
+1D5DF; 006C; MAP
+1D5E0; 006D; MAP
+1D5E1; 006E; MAP
+1D5E2; 006F; MAP
+1D5E3; 0070; MAP
+1D5E4; 0071; MAP
+1D5E5; 0072; MAP
+1D5E6; 0073; MAP
+1D5E7; 0074; MAP
+1D5E8; 0075; MAP
+1D5E9; 0076; MAP
+1D5EA; 0077; MAP
+1D5EB; 0078; MAP
+1D5EC; 0079; MAP
+1D5ED; 007A; MAP
+1D608; 0061; MAP
+1D609; 0062; MAP
+1D60A; 0063; MAP
+1D60B; 0064; MAP
+1D60C; 0065; MAP
+1D60D; 0066; MAP
+1D60E; 0067; MAP
+1D60F; 0068; MAP
+1D610; 0069; MAP
+1D611; 006A; MAP
+1D612; 006B; MAP
+1D613; 006C; MAP
+1D614; 006D; MAP
+1D615; 006E; MAP
+1D616; 006F; MAP
+1D617; 0070; MAP
+1D618; 0071; MAP
+1D619; 0072; MAP
+1D61A; 0073; MAP
+1D61B; 0074; MAP
+1D61C; 0075; MAP
+1D61D; 0076; MAP
+1D61E; 0077; MAP
+1D61F; 0078; MAP
+1D620; 0079; MAP
+1D621; 007A; MAP
+1D63C; 0061; MAP
+1D63D; 0062; MAP
+1D63E; 0063; MAP
+1D63F; 0064; MAP
+1D640; 0065; MAP
+1D641; 0066; MAP
+1D642; 0067; MAP
+1D643; 0068; MAP
+1D644; 0069; MAP
+1D645; 006A; MAP
+1D646; 006B; MAP
+1D647; 006C; MAP
+1D648; 006D; MAP
+1D649; 006E; MAP
+1D64A; 006F; MAP
+1D64B; 0070; MAP
+1D64C; 0071; MAP
+1D64D; 0072; MAP
+1D64E; 0073; MAP
+1D64F; 0074; MAP
+1D650; 0075; MAP
+1D651; 0076; MAP
+1D652; 0077; MAP
+1D653; 0078; MAP
+1D654; 0079; MAP
+1D655; 007A; MAP
+1D670; 0061; MAP
+1D671; 0062; MAP
+1D672; 0063; MAP
+1D673; 0064; MAP
+1D674; 0065; MAP
+1D675; 0066; MAP
+1D676; 0067; MAP
+1D677; 0068; MAP
+1D678; 0069; MAP
+1D679; 006A; MAP
+1D67A; 006B; MAP
+1D67B; 006C; MAP
+1D67C; 006D; MAP
+1D67D; 006E; MAP
+1D67E; 006F; MAP
+1D67F; 0070; MAP
+1D680; 0071; MAP
+1D681; 0072; MAP
+1D682; 0073; MAP
+1D683; 0074; MAP
+1D684; 0075; MAP
+1D685; 0076; MAP
+1D686; 0077; MAP
+1D687; 0078; MAP
+1D688; 0079; MAP
+1D689; 007A; MAP
+1D6A8; 03B1; MAP
+1D6A9; 03B2; MAP
+1D6AA; 03B3; MAP
+1D6AB; 03B4; MAP
+1D6AC; 03B5; MAP
+1D6AD; 03B6; MAP
+1D6AE; 03B7; MAP
+1D6AF; 03B8; MAP
+1D6B0; 03B9; MAP
+1D6B1; 03BA; MAP
+1D6B2; 03BB; MAP
+1D6B3; 03BC; MAP
+1D6B4; 03BD; MAP
+1D6B5; 03BE; MAP
+1D6B6; 03BF; MAP
+1D6B7; 03C0; MAP
+1D6B8; 03C1; MAP
+1D6B9; 03B8; MAP
+1D6BA; 03C3; MAP
+1D6BB; 03C4; MAP
+1D6BC; 03C5; MAP
+1D6BD; 03C6; MAP
+1D6BE; 03C7; MAP
+1D6BF; 03C8; MAP
+1D6C0; 03C9; MAP
+1D6D3; 03C3; MAP
+1D6E2; 03B1; MAP
+1D6E3; 03B2; MAP
+1D6E4; 03B3; MAP
+1D6E5; 03B4; MAP
+1D6E6; 03B5; MAP
+1D6E7; 03B6; MAP
+1D6E8; 03B7; MAP
+1D6E9; 03B8; MAP
+1D6EA; 03B9; MAP
+1D6EB; 03BA; MAP
+1D6EC; 03BB; MAP
+1D6ED; 03BC; MAP
+1D6EE; 03BD; MAP
+1D6EF; 03BE; MAP
+1D6F0; 03BF; MAP
+1D6F1; 03C0; MAP
+1D6F2; 03C1; MAP
+1D6F3; 03B8; MAP
+1D6F4; 03C3; MAP
+1D6F5; 03C4; MAP
+1D6F6; 03C5; MAP
+1D6F7; 03C6; MAP
+1D6F8; 03C7; MAP
+1D6F9; 03C8; MAP
+1D6FA; 03C9; MAP
+1D70D; 03C3; MAP
+1D71C; 03B1; MAP
+1D71D; 03B2; MAP
+1D71E; 03B3; MAP
+1D71F; 03B4; MAP
+1D720; 03B5; MAP
+1D721; 03B6; MAP
+1D722; 03B7; MAP
+1D723; 03B8; MAP
+1D724; 03B9; MAP
+1D725; 03BA; MAP
+1D726; 03BB; MAP
+1D727; 03BC; MAP
+1D728; 03BD; MAP
+1D729; 03BE; MAP
+1D72A; 03BF; MAP
+1D72B; 03C0; MAP
+1D72C; 03C1; MAP
+1D72D; 03B8; MAP
+1D72E; 03C3; MAP
+1D72F; 03C4; MAP
+1D730; 03C5; MAP
+1D731; 03C6; MAP
+1D732; 03C7; MAP
+1D733; 03C8; MAP
+1D734; 03C9; MAP
+1D747; 03C3; MAP
+1D756; 03B1; MAP
+1D757; 03B2; MAP
+1D758; 03B3; MAP
+1D759; 03B4; MAP
+1D75A; 03B5; MAP
+1D75B; 03B6; MAP
+1D75C; 03B7; MAP
+1D75D; 03B8; MAP
+1D75E; 03B9; MAP
+1D75F; 03BA; MAP
+1D760; 03BB; MAP
+1D761; 03BC; MAP
+1D762; 03BD; MAP
+1D763; 03BE; MAP
+1D764; 03BF; MAP
+1D765; 03C0; MAP
+1D766; 03C1; MAP
+1D767; 03B8; MAP
+1D768; 03C3; MAP
+1D769; 03C4; MAP
+1D76A; 03C5; MAP
+1D76B; 03C6; MAP
+1D76C; 03C7; MAP
+1D76D; 03C8; MAP
+1D76E; 03C9; MAP
+1D781; 03C3; MAP
+1D790; 03B1; MAP
+1D791; 03B2; MAP
+1D792; 03B3; MAP
+1D793; 03B4; MAP
+1D794; 03B5; MAP
+1D795; 03B6; MAP
+1D796; 03B7; MAP
+1D797; 03B8; MAP
+1D798; 03B9; MAP
+1D799; 03BA; MAP
+1D79A; 03BB; MAP
+1D79B; 03BC; MAP
+1D79C; 03BD; MAP
+1D79D; 03BE; MAP
+1D79E; 03BF; MAP
+1D79F; 03C0; MAP
+1D7A0; 03C1; MAP
+1D7A1; 03B8; MAP
+1D7A2; 03C3; MAP
+1D7A3; 03C4; MAP
+1D7A4; 03C5; MAP
+1D7A5; 03C6; MAP
+1D7A6; 03C7; MAP
+1D7A7; 03C8; MAP
+1D7A8; 03C9; MAP
+1D7BB; 03C3; MAP
+
+# Total code points 1371
+
+# code points from Table C.3
+
+E000..F8FF; ; PROHIBITED
+F0000..FFFFD; ; PROHIBITED
+100000..10FFFD; ; PROHIBITED
+
+# Total code points 2051
+
+# code points from Table C.4
+
+FDD0..FDEF; ; PROHIBITED
+FFFE..FFFF; ; PROHIBITED
+1FFFE..1FFFF; ; PROHIBITED
+2FFFE..2FFFF; ; PROHIBITED
+3FFFE..3FFFF; ; PROHIBITED
+4FFFE..4FFFF; ; PROHIBITED
+5FFFE..5FFFF; ; PROHIBITED
+6FFFE..6FFFF; ; PROHIBITED
+7FFFE..7FFFF; ; PROHIBITED
+8FFFE..8FFFF; ; PROHIBITED
+9FFFE..9FFFF; ; PROHIBITED
+AFFFE..AFFFF; ; PROHIBITED
+BFFFE..BFFFF; ; PROHIBITED
+CFFFE..CFFFF; ; PROHIBITED
+DFFFE..DFFFF; ; PROHIBITED
+EFFFE..EFFFF; ; PROHIBITED
+FFFFE..FFFFF; ; PROHIBITED
+10FFFE..10FFFF; ; PROHIBITED
+
+# Total code points 18
+
+# code points from Table C.5
+
+D800..DFFF; ; PROHIBITED
+
+# Total code points 0
+
+# code points from Table C.6
+
+FFF9; ; PROHIBITED
+FFFA; ; PROHIBITED
+FFFB; ; PROHIBITED
+FFFC; ; PROHIBITED
+FFFD; ; PROHIBITED
+
+# Total code points 5
+
+# code points from Table C.7
+
+2FF0..2FFB; ; PROHIBITED
+
+# Total code points 1
+
+# code points from Table C.8
+
+0340; ; PROHIBITED
+0341; ; PROHIBITED
+200E; ; PROHIBITED
+200F; ; PROHIBITED
+202A; ; PROHIBITED
+202B; ; PROHIBITED
+202C; ; PROHIBITED
+202D; ; PROHIBITED
+202E; ; PROHIBITED
+206A; ; PROHIBITED
+206B; ; PROHIBITED
+206C; ; PROHIBITED
+206D; ; PROHIBITED
+206E; ; PROHIBITED
+206F; ; PROHIBITED
+
+# Total code points 15
+
+# code points from Table C.9
+
+E0001; ; PROHIBITED
+E0020..E007F; ; PROHIBITED
+
+# Total code points 82
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_cs.txt b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_cs.txt
new file mode 100644
index 00000000000..8d2e73b4a2e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_cs_prep_cs.txt
@@ -0,0 +1,522 @@
+###################
+# Copyright (C) 2003, International Business Machines
+# Corporation and others. All Rights Reserved.
+###################
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table A.1 from RFC 3454
+
+0221; ; UNASSIGNED
+0234..024F; ; UNASSIGNED
+02AE..02AF; ; UNASSIGNED
+02EF..02FF; ; UNASSIGNED
+0350..035F; ; UNASSIGNED
+0370..0373; ; UNASSIGNED
+0376..0379; ; UNASSIGNED
+037B..037D; ; UNASSIGNED
+037F..0383; ; UNASSIGNED
+038B; ; UNASSIGNED
+038D; ; UNASSIGNED
+03A2; ; UNASSIGNED
+03CF; ; UNASSIGNED
+03F7..03FF; ; UNASSIGNED
+0487; ; UNASSIGNED
+04CF; ; UNASSIGNED
+04F6..04F7; ; UNASSIGNED
+04FA..04FF; ; UNASSIGNED
+0510..0530; ; UNASSIGNED
+0557..0558; ; UNASSIGNED
+0560; ; UNASSIGNED
+0588; ; UNASSIGNED
+058B..0590; ; UNASSIGNED
+05A2; ; UNASSIGNED
+05BA; ; UNASSIGNED
+05C5..05CF; ; UNASSIGNED
+05EB..05EF; ; UNASSIGNED
+05F5..060B; ; UNASSIGNED
+060D..061A; ; UNASSIGNED
+061C..061E; ; UNASSIGNED
+0620; ; UNASSIGNED
+063B..063F; ; UNASSIGNED
+0656..065F; ; UNASSIGNED
+06EE..06EF; ; UNASSIGNED
+06FF; ; UNASSIGNED
+070E; ; UNASSIGNED
+072D..072F; ; UNASSIGNED
+074B..077F; ; UNASSIGNED
+07B2..0900; ; UNASSIGNED
+0904; ; UNASSIGNED
+093A..093B; ; UNASSIGNED
+094E..094F; ; UNASSIGNED
+0955..0957; ; UNASSIGNED
+0971..0980; ; UNASSIGNED
+0984; ; UNASSIGNED
+098D..098E; ; UNASSIGNED
+0991..0992; ; UNASSIGNED
+09A9; ; UNASSIGNED
+09B1; ; UNASSIGNED
+09B3..09B5; ; UNASSIGNED
+09BA..09BB; ; UNASSIGNED
+09BD; ; UNASSIGNED
+09C5..09C6; ; UNASSIGNED
+09C9..09CA; ; UNASSIGNED
+09CE..09D6; ; UNASSIGNED
+09D8..09DB; ; UNASSIGNED
+09DE; ; UNASSIGNED
+09E4..09E5; ; UNASSIGNED
+09FB..0A01; ; UNASSIGNED
+0A03..0A04; ; UNASSIGNED
+0A0B..0A0E; ; UNASSIGNED
+0A11..0A12; ; UNASSIGNED
+0A29; ; UNASSIGNED
+0A31; ; UNASSIGNED
+0A34; ; UNASSIGNED
+0A37; ; UNASSIGNED
+0A3A..0A3B; ; UNASSIGNED
+0A3D; ; UNASSIGNED
+0A43..0A46; ; UNASSIGNED
+0A49..0A4A; ; UNASSIGNED
+0A4E..0A58; ; UNASSIGNED
+0A5D; ; UNASSIGNED
+0A5F..0A65; ; UNASSIGNED
+0A75..0A80; ; UNASSIGNED
+0A84; ; UNASSIGNED
+0A8C; ; UNASSIGNED
+0A8E; ; UNASSIGNED
+0A92; ; UNASSIGNED
+0AA9; ; UNASSIGNED
+0AB1; ; UNASSIGNED
+0AB4; ; UNASSIGNED
+0ABA..0ABB; ; UNASSIGNED
+0AC6; ; UNASSIGNED
+0ACA; ; UNASSIGNED
+0ACE..0ACF; ; UNASSIGNED
+0AD1..0ADF; ; UNASSIGNED
+0AE1..0AE5; ; UNASSIGNED
+0AF0..0B00; ; UNASSIGNED
+0B04; ; UNASSIGNED
+0B0D..0B0E; ; UNASSIGNED
+0B11..0B12; ; UNASSIGNED
+0B29; ; UNASSIGNED
+0B31; ; UNASSIGNED
+0B34..0B35; ; UNASSIGNED
+0B3A..0B3B; ; UNASSIGNED
+0B44..0B46; ; UNASSIGNED
+0B49..0B4A; ; UNASSIGNED
+0B4E..0B55; ; UNASSIGNED
+0B58..0B5B; ; UNASSIGNED
+0B5E; ; UNASSIGNED
+0B62..0B65; ; UNASSIGNED
+0B71..0B81; ; UNASSIGNED
+0B84; ; UNASSIGNED
+0B8B..0B8D; ; UNASSIGNED
+0B91; ; UNASSIGNED
+0B96..0B98; ; UNASSIGNED
+0B9B; ; UNASSIGNED
+0B9D; ; UNASSIGNED
+0BA0..0BA2; ; UNASSIGNED
+0BA5..0BA7; ; UNASSIGNED
+0BAB..0BAD; ; UNASSIGNED
+0BB6; ; UNASSIGNED
+0BBA..0BBD; ; UNASSIGNED
+0BC3..0BC5; ; UNASSIGNED
+0BC9; ; UNASSIGNED
+0BCE..0BD6; ; UNASSIGNED
+0BD8..0BE6; ; UNASSIGNED
+0BF3..0C00; ; UNASSIGNED
+0C04; ; UNASSIGNED
+0C0D; ; UNASSIGNED
+0C11; ; UNASSIGNED
+0C29; ; UNASSIGNED
+0C34; ; UNASSIGNED
+0C3A..0C3D; ; UNASSIGNED
+0C45; ; UNASSIGNED
+0C49; ; UNASSIGNED
+0C4E..0C54; ; UNASSIGNED
+0C57..0C5F; ; UNASSIGNED
+0C62..0C65; ; UNASSIGNED
+0C70..0C81; ; UNASSIGNED
+0C84; ; UNASSIGNED
+0C8D; ; UNASSIGNED
+0C91; ; UNASSIGNED
+0CA9; ; UNASSIGNED
+0CB4; ; UNASSIGNED
+0CBA..0CBD; ; UNASSIGNED
+0CC5; ; UNASSIGNED
+0CC9; ; UNASSIGNED
+0CCE..0CD4; ; UNASSIGNED
+0CD7..0CDD; ; UNASSIGNED
+0CDF; ; UNASSIGNED
+0CE2..0CE5; ; UNASSIGNED
+0CF0..0D01; ; UNASSIGNED
+0D04; ; UNASSIGNED
+0D0D; ; UNASSIGNED
+0D11; ; UNASSIGNED
+0D29; ; UNASSIGNED
+0D3A..0D3D; ; UNASSIGNED
+0D44..0D45; ; UNASSIGNED
+0D49; ; UNASSIGNED
+0D4E..0D56; ; UNASSIGNED
+0D58..0D5F; ; UNASSIGNED
+0D62..0D65; ; UNASSIGNED
+0D70..0D81; ; UNASSIGNED
+0D84; ; UNASSIGNED
+0D97..0D99; ; UNASSIGNED
+0DB2; ; UNASSIGNED
+0DBC; ; UNASSIGNED
+0DBE..0DBF; ; UNASSIGNED
+0DC7..0DC9; ; UNASSIGNED
+0DCB..0DCE; ; UNASSIGNED
+0DD5; ; UNASSIGNED
+0DD7; ; UNASSIGNED
+0DE0..0DF1; ; UNASSIGNED
+0DF5..0E00; ; UNASSIGNED
+0E3B..0E3E; ; UNASSIGNED
+0E5C..0E80; ; UNASSIGNED
+0E83; ; UNASSIGNED
+0E85..0E86; ; UNASSIGNED
+0E89; ; UNASSIGNED
+0E8B..0E8C; ; UNASSIGNED
+0E8E..0E93; ; UNASSIGNED
+0E98; ; UNASSIGNED
+0EA0; ; UNASSIGNED
+0EA4; ; UNASSIGNED
+0EA6; ; UNASSIGNED
+0EA8..0EA9; ; UNASSIGNED
+0EAC; ; UNASSIGNED
+0EBA; ; UNASSIGNED
+0EBE..0EBF; ; UNASSIGNED
+0EC5; ; UNASSIGNED
+0EC7; ; UNASSIGNED
+0ECE..0ECF; ; UNASSIGNED
+0EDA..0EDB; ; UNASSIGNED
+0EDE..0EFF; ; UNASSIGNED
+0F48; ; UNASSIGNED
+0F6B..0F70; ; UNASSIGNED
+0F8C..0F8F; ; UNASSIGNED
+0F98; ; UNASSIGNED
+0FBD; ; UNASSIGNED
+0FCD..0FCE; ; UNASSIGNED
+0FD0..0FFF; ; UNASSIGNED
+1022; ; UNASSIGNED
+1028; ; UNASSIGNED
+102B; ; UNASSIGNED
+1033..1035; ; UNASSIGNED
+103A..103F; ; UNASSIGNED
+105A..109F; ; UNASSIGNED
+10C6..10CF; ; UNASSIGNED
+10F9..10FA; ; UNASSIGNED
+10FC..10FF; ; UNASSIGNED
+115A..115E; ; UNASSIGNED
+11A3..11A7; ; UNASSIGNED
+11FA..11FF; ; UNASSIGNED
+1207; ; UNASSIGNED
+1247; ; UNASSIGNED
+1249; ; UNASSIGNED
+124E..124F; ; UNASSIGNED
+1257; ; UNASSIGNED
+1259; ; UNASSIGNED
+125E..125F; ; UNASSIGNED
+1287; ; UNASSIGNED
+1289; ; UNASSIGNED
+128E..128F; ; UNASSIGNED
+12AF; ; UNASSIGNED
+12B1; ; UNASSIGNED
+12B6..12B7; ; UNASSIGNED
+12BF; ; UNASSIGNED
+12C1; ; UNASSIGNED
+12C6..12C7; ; UNASSIGNED
+12CF; ; UNASSIGNED
+12D7; ; UNASSIGNED
+12EF; ; UNASSIGNED
+130F; ; UNASSIGNED
+1311; ; UNASSIGNED
+1316..1317; ; UNASSIGNED
+131F; ; UNASSIGNED
+1347; ; UNASSIGNED
+135B..1360; ; UNASSIGNED
+137D..139F; ; UNASSIGNED
+13F5..1400; ; UNASSIGNED
+1677..167F; ; UNASSIGNED
+169D..169F; ; UNASSIGNED
+16F1..16FF; ; UNASSIGNED
+170D; ; UNASSIGNED
+1715..171F; ; UNASSIGNED
+1737..173F; ; UNASSIGNED
+1754..175F; ; UNASSIGNED
+176D; ; UNASSIGNED
+1771; ; UNASSIGNED
+1774..177F; ; UNASSIGNED
+17DD..17DF; ; UNASSIGNED
+17EA..17FF; ; UNASSIGNED
+180F; ; UNASSIGNED
+181A..181F; ; UNASSIGNED
+1878..187F; ; UNASSIGNED
+18AA..1DFF; ; UNASSIGNED
+1E9C..1E9F; ; UNASSIGNED
+1EFA..1EFF; ; UNASSIGNED
+1F16..1F17; ; UNASSIGNED
+1F1E..1F1F; ; UNASSIGNED
+1F46..1F47; ; UNASSIGNED
+1F4E..1F4F; ; UNASSIGNED
+1F58; ; UNASSIGNED
+1F5A; ; UNASSIGNED
+1F5C; ; UNASSIGNED
+1F5E; ; UNASSIGNED
+1F7E..1F7F; ; UNASSIGNED
+1FB5; ; UNASSIGNED
+1FC5; ; UNASSIGNED
+1FD4..1FD5; ; UNASSIGNED
+1FDC; ; UNASSIGNED
+1FF0..1FF1; ; UNASSIGNED
+1FF5; ; UNASSIGNED
+1FFF; ; UNASSIGNED
+2053..2056; ; UNASSIGNED
+2058..205E; ; UNASSIGNED
+2064..2069; ; UNASSIGNED
+2072..2073; ; UNASSIGNED
+208F..209F; ; UNASSIGNED
+20B2..20CF; ; UNASSIGNED
+20EB..20FF; ; UNASSIGNED
+213B..213C; ; UNASSIGNED
+214C..2152; ; UNASSIGNED
+2184..218F; ; UNASSIGNED
+23CF..23FF; ; UNASSIGNED
+2427..243F; ; UNASSIGNED
+244B..245F; ; UNASSIGNED
+24FF; ; UNASSIGNED
+2614..2615; ; UNASSIGNED
+2618; ; UNASSIGNED
+267E..267F; ; UNASSIGNED
+268A..2700; ; UNASSIGNED
+2705; ; UNASSIGNED
+270A..270B; ; UNASSIGNED
+2728; ; UNASSIGNED
+274C; ; UNASSIGNED
+274E; ; UNASSIGNED
+2753..2755; ; UNASSIGNED
+2757; ; UNASSIGNED
+275F..2760; ; UNASSIGNED
+2795..2797; ; UNASSIGNED
+27B0; ; UNASSIGNED
+27BF..27CF; ; UNASSIGNED
+27EC..27EF; ; UNASSIGNED
+2B00..2E7F; ; UNASSIGNED
+2E9A; ; UNASSIGNED
+2EF4..2EFF; ; UNASSIGNED
+2FD6..2FEF; ; UNASSIGNED
+2FFC..2FFF; ; UNASSIGNED
+3040; ; UNASSIGNED
+3097..3098; ; UNASSIGNED
+3100..3104; ; UNASSIGNED
+312D..3130; ; UNASSIGNED
+318F; ; UNASSIGNED
+31B8..31EF; ; UNASSIGNED
+321D..321F; ; UNASSIGNED
+3244..3250; ; UNASSIGNED
+327C..327E; ; UNASSIGNED
+32CC..32CF; ; UNASSIGNED
+32FF; ; UNASSIGNED
+3377..337A; ; UNASSIGNED
+33DE..33DF; ; UNASSIGNED
+33FF; ; UNASSIGNED
+4DB6..4DFF; ; UNASSIGNED
+9FA6..9FFF; ; UNASSIGNED
+A48D..A48F; ; UNASSIGNED
+A4C7..ABFF; ; UNASSIGNED
+D7A4..D7FF; ; UNASSIGNED
+FA2E..FA2F; ; UNASSIGNED
+FA6B..FAFF; ; UNASSIGNED
+FB07..FB12; ; UNASSIGNED
+FB18..FB1C; ; UNASSIGNED
+FB37; ; UNASSIGNED
+FB3D; ; UNASSIGNED
+FB3F; ; UNASSIGNED
+FB42; ; UNASSIGNED
+FB45; ; UNASSIGNED
+FBB2..FBD2; ; UNASSIGNED
+FD40..FD4F; ; UNASSIGNED
+FD90..FD91; ; UNASSIGNED
+FDC8..FDCF; ; UNASSIGNED
+FDFD..FDFF; ; UNASSIGNED
+FE10..FE1F; ; UNASSIGNED
+FE24..FE2F; ; UNASSIGNED
+FE47..FE48; ; UNASSIGNED
+FE53; ; UNASSIGNED
+FE67; ; UNASSIGNED
+FE6C..FE6F; ; UNASSIGNED
+FE75; ; UNASSIGNED
+FEFD..FEFE; ; UNASSIGNED
+FF00; ; UNASSIGNED
+FFBF..FFC1; ; UNASSIGNED
+FFC8..FFC9; ; UNASSIGNED
+FFD0..FFD1; ; UNASSIGNED
+FFD8..FFD9; ; UNASSIGNED
+FFDD..FFDF; ; UNASSIGNED
+FFE7; ; UNASSIGNED
+FFEF..FFF8; ; UNASSIGNED
+10000..102FF; ; UNASSIGNED
+1031F; ; UNASSIGNED
+10324..1032F; ; UNASSIGNED
+1034B..103FF; ; UNASSIGNED
+10426..10427; ; UNASSIGNED
+1044E..1CFFF; ; UNASSIGNED
+1D0F6..1D0FF; ; UNASSIGNED
+1D127..1D129; ; UNASSIGNED
+1D1DE..1D3FF; ; UNASSIGNED
+1D455; ; UNASSIGNED
+1D49D; ; UNASSIGNED
+1D4A0..1D4A1; ; UNASSIGNED
+1D4A3..1D4A4; ; UNASSIGNED
+1D4A7..1D4A8; ; UNASSIGNED
+1D4AD; ; UNASSIGNED
+1D4BA; ; UNASSIGNED
+1D4BC; ; UNASSIGNED
+1D4C1; ; UNASSIGNED
+1D4C4; ; UNASSIGNED
+1D506; ; UNASSIGNED
+1D50B..1D50C; ; UNASSIGNED
+1D515; ; UNASSIGNED
+1D51D; ; UNASSIGNED
+1D53A; ; UNASSIGNED
+1D53F; ; UNASSIGNED
+1D545; ; UNASSIGNED
+1D547..1D549; ; UNASSIGNED
+1D551; ; UNASSIGNED
+1D6A4..1D6A7; ; UNASSIGNED
+1D7CA..1D7CD; ; UNASSIGNED
+1D800..1FFFD; ; UNASSIGNED
+2A6D7..2F7FF; ; UNASSIGNED
+2FA1E..2FFFD; ; UNASSIGNED
+30000..3FFFD; ; UNASSIGNED
+40000..4FFFD; ; UNASSIGNED
+50000..5FFFD; ; UNASSIGNED
+60000..6FFFD; ; UNASSIGNED
+70000..7FFFD; ; UNASSIGNED
+80000..8FFFD; ; UNASSIGNED
+90000..9FFFD; ; UNASSIGNED
+A0000..AFFFD; ; UNASSIGNED
+B0000..BFFFD; ; UNASSIGNED
+C0000..CFFFD; ; UNASSIGNED
+D0000..DFFFD; ; UNASSIGNED
+E0000; ; UNASSIGNED
+E0002..E001F; ; UNASSIGNED
+E0080..EFFFD; ; UNASSIGNED
+
+# Total code points 3653
+
+# This table contains code points from Table B.1 from RFC 3454
+
+00AD; ; MAP
+034F; ; MAP
+1806; ; MAP
+180B; ; MAP
+180C; ; MAP
+180D; ; MAP
+200B; ; MAP
+200C; ; MAP
+200D; ; MAP
+2060; ; MAP
+FE00; ; MAP
+FE01; ; MAP
+FE02; ; MAP
+FE03; ; MAP
+FE04; ; MAP
+FE05; ; MAP
+FE06; ; MAP
+FE07; ; MAP
+FE08; ; MAP
+FE09; ; MAP
+FE0A; ; MAP
+FE0B; ; MAP
+FE0C; ; MAP
+FE0D; ; MAP
+FE0E; ; MAP
+FE0F; ; MAP
+FEFF; ; MAP
+
+# Total code points 27
+
+# code points from Table C.3
+
+E000..F8FF; ; PROHIBITED
+F0000..FFFFD; ; PROHIBITED
+100000..10FFFD; ; PROHIBITED
+
+# Total code points 2051
+
+# code points from Table C.4
+
+FDD0..FDEF; ; PROHIBITED
+FFFE..FFFF; ; PROHIBITED
+1FFFE..1FFFF; ; PROHIBITED
+2FFFE..2FFFF; ; PROHIBITED
+3FFFE..3FFFF; ; PROHIBITED
+4FFFE..4FFFF; ; PROHIBITED
+5FFFE..5FFFF; ; PROHIBITED
+6FFFE..6FFFF; ; PROHIBITED
+7FFFE..7FFFF; ; PROHIBITED
+8FFFE..8FFFF; ; PROHIBITED
+9FFFE..9FFFF; ; PROHIBITED
+AFFFE..AFFFF; ; PROHIBITED
+BFFFE..BFFFF; ; PROHIBITED
+CFFFE..CFFFF; ; PROHIBITED
+DFFFE..DFFFF; ; PROHIBITED
+EFFFE..EFFFF; ; PROHIBITED
+FFFFE..FFFFF; ; PROHIBITED
+10FFFE..10FFFF; ; PROHIBITED
+
+# Total code points 18
+
+# code points from Table C.5
+
+D800..DFFF; ; PROHIBITED
+
+# Total code points 0
+
+# code points from Table C.6
+
+FFF9; ; PROHIBITED
+FFFA; ; PROHIBITED
+FFFB; ; PROHIBITED
+FFFC; ; PROHIBITED
+FFFD; ; PROHIBITED
+
+# Total code points 5
+
+# code points from Table C.7
+
+2FF0..2FFB; ; PROHIBITED
+
+# Total code points 1
+
+# code points from Table C.8
+
+0340; ; PROHIBITED
+0341; ; PROHIBITED
+200E; ; PROHIBITED
+200F; ; PROHIBITED
+202A; ; PROHIBITED
+202B; ; PROHIBITED
+202C; ; PROHIBITED
+202D; ; PROHIBITED
+202E; ; PROHIBITED
+206A; ; PROHIBITED
+206B; ; PROHIBITED
+206C; ; PROHIBITED
+206D; ; PROHIBITED
+206E; ; PROHIBITED
+206F; ; PROHIBITED
+
+# Total code points 15
+
+# code points from Table C.9
+
+E0001; ; PROHIBITED
+E0020..E007F; ; PROHIBITED
+
+# Total code points 82
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_p.txt b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_p.txt
new file mode 100644
index 00000000000..5fdeb5952c7
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_p.txt
@@ -0,0 +1,565 @@
+###################
+# Copyright (C) 2003, International Business Machines
+# Corporation and others. All Rights Reserved.
+###################
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table A.1 from RFC 3454
+
+0221; ; UNASSIGNED
+0234..024F; ; UNASSIGNED
+02AE..02AF; ; UNASSIGNED
+02EF..02FF; ; UNASSIGNED
+0350..035F; ; UNASSIGNED
+0370..0373; ; UNASSIGNED
+0376..0379; ; UNASSIGNED
+037B..037D; ; UNASSIGNED
+037F..0383; ; UNASSIGNED
+038B; ; UNASSIGNED
+038D; ; UNASSIGNED
+03A2; ; UNASSIGNED
+03CF; ; UNASSIGNED
+03F7..03FF; ; UNASSIGNED
+0487; ; UNASSIGNED
+04CF; ; UNASSIGNED
+04F6..04F7; ; UNASSIGNED
+04FA..04FF; ; UNASSIGNED
+0510..0530; ; UNASSIGNED
+0557..0558; ; UNASSIGNED
+0560; ; UNASSIGNED
+0588; ; UNASSIGNED
+058B..0590; ; UNASSIGNED
+05A2; ; UNASSIGNED
+05BA; ; UNASSIGNED
+05C5..05CF; ; UNASSIGNED
+05EB..05EF; ; UNASSIGNED
+05F5..060B; ; UNASSIGNED
+060D..061A; ; UNASSIGNED
+061C..061E; ; UNASSIGNED
+0620; ; UNASSIGNED
+063B..063F; ; UNASSIGNED
+0656..065F; ; UNASSIGNED
+06EE..06EF; ; UNASSIGNED
+06FF; ; UNASSIGNED
+070E; ; UNASSIGNED
+072D..072F; ; UNASSIGNED
+074B..077F; ; UNASSIGNED
+07B2..0900; ; UNASSIGNED
+0904; ; UNASSIGNED
+093A..093B; ; UNASSIGNED
+094E..094F; ; UNASSIGNED
+0955..0957; ; UNASSIGNED
+0971..0980; ; UNASSIGNED
+0984; ; UNASSIGNED
+098D..098E; ; UNASSIGNED
+0991..0992; ; UNASSIGNED
+09A9; ; UNASSIGNED
+09B1; ; UNASSIGNED
+09B3..09B5; ; UNASSIGNED
+09BA..09BB; ; UNASSIGNED
+09BD; ; UNASSIGNED
+09C5..09C6; ; UNASSIGNED
+09C9..09CA; ; UNASSIGNED
+09CE..09D6; ; UNASSIGNED
+09D8..09DB; ; UNASSIGNED
+09DE; ; UNASSIGNED
+09E4..09E5; ; UNASSIGNED
+09FB..0A01; ; UNASSIGNED
+0A03..0A04; ; UNASSIGNED
+0A0B..0A0E; ; UNASSIGNED
+0A11..0A12; ; UNASSIGNED
+0A29; ; UNASSIGNED
+0A31; ; UNASSIGNED
+0A34; ; UNASSIGNED
+0A37; ; UNASSIGNED
+0A3A..0A3B; ; UNASSIGNED
+0A3D; ; UNASSIGNED
+0A43..0A46; ; UNASSIGNED
+0A49..0A4A; ; UNASSIGNED
+0A4E..0A58; ; UNASSIGNED
+0A5D; ; UNASSIGNED
+0A5F..0A65; ; UNASSIGNED
+0A75..0A80; ; UNASSIGNED
+0A84; ; UNASSIGNED
+0A8C; ; UNASSIGNED
+0A8E; ; UNASSIGNED
+0A92; ; UNASSIGNED
+0AA9; ; UNASSIGNED
+0AB1; ; UNASSIGNED
+0AB4; ; UNASSIGNED
+0ABA..0ABB; ; UNASSIGNED
+0AC6; ; UNASSIGNED
+0ACA; ; UNASSIGNED
+0ACE..0ACF; ; UNASSIGNED
+0AD1..0ADF; ; UNASSIGNED
+0AE1..0AE5; ; UNASSIGNED
+0AF0..0B00; ; UNASSIGNED
+0B04; ; UNASSIGNED
+0B0D..0B0E; ; UNASSIGNED
+0B11..0B12; ; UNASSIGNED
+0B29; ; UNASSIGNED
+0B31; ; UNASSIGNED
+0B34..0B35; ; UNASSIGNED
+0B3A..0B3B; ; UNASSIGNED
+0B44..0B46; ; UNASSIGNED
+0B49..0B4A; ; UNASSIGNED
+0B4E..0B55; ; UNASSIGNED
+0B58..0B5B; ; UNASSIGNED
+0B5E; ; UNASSIGNED
+0B62..0B65; ; UNASSIGNED
+0B71..0B81; ; UNASSIGNED
+0B84; ; UNASSIGNED
+0B8B..0B8D; ; UNASSIGNED
+0B91; ; UNASSIGNED
+0B96..0B98; ; UNASSIGNED
+0B9B; ; UNASSIGNED
+0B9D; ; UNASSIGNED
+0BA0..0BA2; ; UNASSIGNED
+0BA5..0BA7; ; UNASSIGNED
+0BAB..0BAD; ; UNASSIGNED
+0BB6; ; UNASSIGNED
+0BBA..0BBD; ; UNASSIGNED
+0BC3..0BC5; ; UNASSIGNED
+0BC9; ; UNASSIGNED
+0BCE..0BD6; ; UNASSIGNED
+0BD8..0BE6; ; UNASSIGNED
+0BF3..0C00; ; UNASSIGNED
+0C04; ; UNASSIGNED
+0C0D; ; UNASSIGNED
+0C11; ; UNASSIGNED
+0C29; ; UNASSIGNED
+0C34; ; UNASSIGNED
+0C3A..0C3D; ; UNASSIGNED
+0C45; ; UNASSIGNED
+0C49; ; UNASSIGNED
+0C4E..0C54; ; UNASSIGNED
+0C57..0C5F; ; UNASSIGNED
+0C62..0C65; ; UNASSIGNED
+0C70..0C81; ; UNASSIGNED
+0C84; ; UNASSIGNED
+0C8D; ; UNASSIGNED
+0C91; ; UNASSIGNED
+0CA9; ; UNASSIGNED
+0CB4; ; UNASSIGNED
+0CBA..0CBD; ; UNASSIGNED
+0CC5; ; UNASSIGNED
+0CC9; ; UNASSIGNED
+0CCE..0CD4; ; UNASSIGNED
+0CD7..0CDD; ; UNASSIGNED
+0CDF; ; UNASSIGNED
+0CE2..0CE5; ; UNASSIGNED
+0CF0..0D01; ; UNASSIGNED
+0D04; ; UNASSIGNED
+0D0D; ; UNASSIGNED
+0D11; ; UNASSIGNED
+0D29; ; UNASSIGNED
+0D3A..0D3D; ; UNASSIGNED
+0D44..0D45; ; UNASSIGNED
+0D49; ; UNASSIGNED
+0D4E..0D56; ; UNASSIGNED
+0D58..0D5F; ; UNASSIGNED
+0D62..0D65; ; UNASSIGNED
+0D70..0D81; ; UNASSIGNED
+0D84; ; UNASSIGNED
+0D97..0D99; ; UNASSIGNED
+0DB2; ; UNASSIGNED
+0DBC; ; UNASSIGNED
+0DBE..0DBF; ; UNASSIGNED
+0DC7..0DC9; ; UNASSIGNED
+0DCB..0DCE; ; UNASSIGNED
+0DD5; ; UNASSIGNED
+0DD7; ; UNASSIGNED
+0DE0..0DF1; ; UNASSIGNED
+0DF5..0E00; ; UNASSIGNED
+0E3B..0E3E; ; UNASSIGNED
+0E5C..0E80; ; UNASSIGNED
+0E83; ; UNASSIGNED
+0E85..0E86; ; UNASSIGNED
+0E89; ; UNASSIGNED
+0E8B..0E8C; ; UNASSIGNED
+0E8E..0E93; ; UNASSIGNED
+0E98; ; UNASSIGNED
+0EA0; ; UNASSIGNED
+0EA4; ; UNASSIGNED
+0EA6; ; UNASSIGNED
+0EA8..0EA9; ; UNASSIGNED
+0EAC; ; UNASSIGNED
+0EBA; ; UNASSIGNED
+0EBE..0EBF; ; UNASSIGNED
+0EC5; ; UNASSIGNED
+0EC7; ; UNASSIGNED
+0ECE..0ECF; ; UNASSIGNED
+0EDA..0EDB; ; UNASSIGNED
+0EDE..0EFF; ; UNASSIGNED
+0F48; ; UNASSIGNED
+0F6B..0F70; ; UNASSIGNED
+0F8C..0F8F; ; UNASSIGNED
+0F98; ; UNASSIGNED
+0FBD; ; UNASSIGNED
+0FCD..0FCE; ; UNASSIGNED
+0FD0..0FFF; ; UNASSIGNED
+1022; ; UNASSIGNED
+1028; ; UNASSIGNED
+102B; ; UNASSIGNED
+1033..1035; ; UNASSIGNED
+103A..103F; ; UNASSIGNED
+105A..109F; ; UNASSIGNED
+10C6..10CF; ; UNASSIGNED
+10F9..10FA; ; UNASSIGNED
+10FC..10FF; ; UNASSIGNED
+115A..115E; ; UNASSIGNED
+11A3..11A7; ; UNASSIGNED
+11FA..11FF; ; UNASSIGNED
+1207; ; UNASSIGNED
+1247; ; UNASSIGNED
+1249; ; UNASSIGNED
+124E..124F; ; UNASSIGNED
+1257; ; UNASSIGNED
+1259; ; UNASSIGNED
+125E..125F; ; UNASSIGNED
+1287; ; UNASSIGNED
+1289; ; UNASSIGNED
+128E..128F; ; UNASSIGNED
+12AF; ; UNASSIGNED
+12B1; ; UNASSIGNED
+12B6..12B7; ; UNASSIGNED
+12BF; ; UNASSIGNED
+12C1; ; UNASSIGNED
+12C6..12C7; ; UNASSIGNED
+12CF; ; UNASSIGNED
+12D7; ; UNASSIGNED
+12EF; ; UNASSIGNED
+130F; ; UNASSIGNED
+1311; ; UNASSIGNED
+1316..1317; ; UNASSIGNED
+131F; ; UNASSIGNED
+1347; ; UNASSIGNED
+135B..1360; ; UNASSIGNED
+137D..139F; ; UNASSIGNED
+13F5..1400; ; UNASSIGNED
+1677..167F; ; UNASSIGNED
+169D..169F; ; UNASSIGNED
+16F1..16FF; ; UNASSIGNED
+170D; ; UNASSIGNED
+1715..171F; ; UNASSIGNED
+1737..173F; ; UNASSIGNED
+1754..175F; ; UNASSIGNED
+176D; ; UNASSIGNED
+1771; ; UNASSIGNED
+1774..177F; ; UNASSIGNED
+17DD..17DF; ; UNASSIGNED
+17EA..17FF; ; UNASSIGNED
+180F; ; UNASSIGNED
+181A..181F; ; UNASSIGNED
+1878..187F; ; UNASSIGNED
+18AA..1DFF; ; UNASSIGNED
+1E9C..1E9F; ; UNASSIGNED
+1EFA..1EFF; ; UNASSIGNED
+1F16..1F17; ; UNASSIGNED
+1F1E..1F1F; ; UNASSIGNED
+1F46..1F47; ; UNASSIGNED
+1F4E..1F4F; ; UNASSIGNED
+1F58; ; UNASSIGNED
+1F5A; ; UNASSIGNED
+1F5C; ; UNASSIGNED
+1F5E; ; UNASSIGNED
+1F7E..1F7F; ; UNASSIGNED
+1FB5; ; UNASSIGNED
+1FC5; ; UNASSIGNED
+1FD4..1FD5; ; UNASSIGNED
+1FDC; ; UNASSIGNED
+1FF0..1FF1; ; UNASSIGNED
+1FF5; ; UNASSIGNED
+1FFF; ; UNASSIGNED
+2053..2056; ; UNASSIGNED
+2058..205E; ; UNASSIGNED
+2064..2069; ; UNASSIGNED
+2072..2073; ; UNASSIGNED
+208F..209F; ; UNASSIGNED
+20B2..20CF; ; UNASSIGNED
+20EB..20FF; ; UNASSIGNED
+213B..213C; ; UNASSIGNED
+214C..2152; ; UNASSIGNED
+2184..218F; ; UNASSIGNED
+23CF..23FF; ; UNASSIGNED
+2427..243F; ; UNASSIGNED
+244B..245F; ; UNASSIGNED
+24FF; ; UNASSIGNED
+2614..2615; ; UNASSIGNED
+2618; ; UNASSIGNED
+267E..267F; ; UNASSIGNED
+268A..2700; ; UNASSIGNED
+2705; ; UNASSIGNED
+270A..270B; ; UNASSIGNED
+2728; ; UNASSIGNED
+274C; ; UNASSIGNED
+274E; ; UNASSIGNED
+2753..2755; ; UNASSIGNED
+2757; ; UNASSIGNED
+275F..2760; ; UNASSIGNED
+2795..2797; ; UNASSIGNED
+27B0; ; UNASSIGNED
+27BF..27CF; ; UNASSIGNED
+27EC..27EF; ; UNASSIGNED
+2B00..2E7F; ; UNASSIGNED
+2E9A; ; UNASSIGNED
+2EF4..2EFF; ; UNASSIGNED
+2FD6..2FEF; ; UNASSIGNED
+2FFC..2FFF; ; UNASSIGNED
+3040; ; UNASSIGNED
+3097..3098; ; UNASSIGNED
+3100..3104; ; UNASSIGNED
+312D..3130; ; UNASSIGNED
+318F; ; UNASSIGNED
+31B8..31EF; ; UNASSIGNED
+321D..321F; ; UNASSIGNED
+3244..3250; ; UNASSIGNED
+327C..327E; ; UNASSIGNED
+32CC..32CF; ; UNASSIGNED
+32FF; ; UNASSIGNED
+3377..337A; ; UNASSIGNED
+33DE..33DF; ; UNASSIGNED
+33FF; ; UNASSIGNED
+4DB6..4DFF; ; UNASSIGNED
+9FA6..9FFF; ; UNASSIGNED
+A48D..A48F; ; UNASSIGNED
+A4C7..ABFF; ; UNASSIGNED
+D7A4..D7FF; ; UNASSIGNED
+FA2E..FA2F; ; UNASSIGNED
+FA6B..FAFF; ; UNASSIGNED
+FB07..FB12; ; UNASSIGNED
+FB18..FB1C; ; UNASSIGNED
+FB37; ; UNASSIGNED
+FB3D; ; UNASSIGNED
+FB3F; ; UNASSIGNED
+FB42; ; UNASSIGNED
+FB45; ; UNASSIGNED
+FBB2..FBD2; ; UNASSIGNED
+FD40..FD4F; ; UNASSIGNED
+FD90..FD91; ; UNASSIGNED
+FDC8..FDCF; ; UNASSIGNED
+FDFD..FDFF; ; UNASSIGNED
+FE10..FE1F; ; UNASSIGNED
+FE24..FE2F; ; UNASSIGNED
+FE47..FE48; ; UNASSIGNED
+FE53; ; UNASSIGNED
+FE67; ; UNASSIGNED
+FE6C..FE6F; ; UNASSIGNED
+FE75; ; UNASSIGNED
+FEFD..FEFE; ; UNASSIGNED
+FF00; ; UNASSIGNED
+FFBF..FFC1; ; UNASSIGNED
+FFC8..FFC9; ; UNASSIGNED
+FFD0..FFD1; ; UNASSIGNED
+FFD8..FFD9; ; UNASSIGNED
+FFDD..FFDF; ; UNASSIGNED
+FFE7; ; UNASSIGNED
+FFEF..FFF8; ; UNASSIGNED
+10000..102FF; ; UNASSIGNED
+1031F; ; UNASSIGNED
+10324..1032F; ; UNASSIGNED
+1034B..103FF; ; UNASSIGNED
+10426..10427; ; UNASSIGNED
+1044E..1CFFF; ; UNASSIGNED
+1D0F6..1D0FF; ; UNASSIGNED
+1D127..1D129; ; UNASSIGNED
+1D1DE..1D3FF; ; UNASSIGNED
+1D455; ; UNASSIGNED
+1D49D; ; UNASSIGNED
+1D4A0..1D4A1; ; UNASSIGNED
+1D4A3..1D4A4; ; UNASSIGNED
+1D4A7..1D4A8; ; UNASSIGNED
+1D4AD; ; UNASSIGNED
+1D4BA; ; UNASSIGNED
+1D4BC; ; UNASSIGNED
+1D4C1; ; UNASSIGNED
+1D4C4; ; UNASSIGNED
+1D506; ; UNASSIGNED
+1D50B..1D50C; ; UNASSIGNED
+1D515; ; UNASSIGNED
+1D51D; ; UNASSIGNED
+1D53A; ; UNASSIGNED
+1D53F; ; UNASSIGNED
+1D545; ; UNASSIGNED
+1D547..1D549; ; UNASSIGNED
+1D551; ; UNASSIGNED
+1D6A4..1D6A7; ; UNASSIGNED
+1D7CA..1D7CD; ; UNASSIGNED
+1D800..1FFFD; ; UNASSIGNED
+2A6D7..2F7FF; ; UNASSIGNED
+2FA1E..2FFFD; ; UNASSIGNED
+30000..3FFFD; ; UNASSIGNED
+40000..4FFFD; ; UNASSIGNED
+50000..5FFFD; ; UNASSIGNED
+60000..6FFFD; ; UNASSIGNED
+70000..7FFFD; ; UNASSIGNED
+80000..8FFFD; ; UNASSIGNED
+90000..9FFFD; ; UNASSIGNED
+A0000..AFFFD; ; UNASSIGNED
+B0000..BFFFD; ; UNASSIGNED
+C0000..CFFFD; ; UNASSIGNED
+D0000..DFFFD; ; UNASSIGNED
+E0000; ; UNASSIGNED
+E0002..E001F; ; UNASSIGNED
+E0080..EFFFD; ; UNASSIGNED
+
+# Total code points 3653
+
+# This table contains code points from Table B.1 from RFC 3454
+
+00AD; ; MAP
+034F; ; MAP
+1806; ; MAP
+180B; ; MAP
+180C; ; MAP
+180D; ; MAP
+200B; ; MAP
+200C; ; MAP
+200D; ; MAP
+2060; ; MAP
+FE00; ; MAP
+FE01; ; MAP
+FE02; ; MAP
+FE03; ; MAP
+FE04; ; MAP
+FE05; ; MAP
+FE06; ; MAP
+FE07; ; MAP
+FE08; ; MAP
+FE09; ; MAP
+FE0A; ; MAP
+FE0B; ; MAP
+FE0C; ; MAP
+FE0D; ; MAP
+FE0E; ; MAP
+FE0F; ; MAP
+FEFF; ; MAP
+
+# Total code points 27
+
+# code points from Table C.1.2
+
+00A0; ; PROHIBITED
+1680; ; PROHIBITED
+2000; ; PROHIBITED
+2001; ; PROHIBITED
+2002; ; PROHIBITED
+2003; ; PROHIBITED
+2004; ; PROHIBITED
+2005; ; PROHIBITED
+2006; ; PROHIBITED
+2007; ; PROHIBITED
+2008; ; PROHIBITED
+2009; ; PROHIBITED
+200A; ; PROHIBITED
+200B; ; PROHIBITED
+202F; ; PROHIBITED
+205F; ; PROHIBITED
+3000; ; PROHIBITED
+
+# Total code points 17
+
+# code points from Table C.2.2
+
+0080..009F; ; PROHIBITED
+06DD; ; PROHIBITED
+070F; ; PROHIBITED
+180E; ; PROHIBITED
+200C; ; PROHIBITED
+200D; ; PROHIBITED
+2028; ; PROHIBITED
+2029; ; PROHIBITED
+2060; ; PROHIBITED
+2061; ; PROHIBITED
+2062; ; PROHIBITED
+2063; ; PROHIBITED
+206A..206F; ; PROHIBITED
+FEFF; ; PROHIBITED
+FFF9..FFFC; ; PROHIBITED
+1D173..1D17A; ; PROHIBITED
+
+# Total code points 30
+
+# code points from Table C.3
+
+E000..F8FF; ; PROHIBITED
+F0000..FFFFD; ; PROHIBITED
+100000..10FFFD; ; PROHIBITED
+
+# Total code points 2051
+
+# code points from Table C.4
+
+FDD0..FDEF; ; PROHIBITED
+FFFE..FFFF; ; PROHIBITED
+1FFFE..1FFFF; ; PROHIBITED
+2FFFE..2FFFF; ; PROHIBITED
+3FFFE..3FFFF; ; PROHIBITED
+4FFFE..4FFFF; ; PROHIBITED
+5FFFE..5FFFF; ; PROHIBITED
+6FFFE..6FFFF; ; PROHIBITED
+7FFFE..7FFFF; ; PROHIBITED
+8FFFE..8FFFF; ; PROHIBITED
+9FFFE..9FFFF; ; PROHIBITED
+AFFFE..AFFFF; ; PROHIBITED
+BFFFE..BFFFF; ; PROHIBITED
+CFFFE..CFFFF; ; PROHIBITED
+DFFFE..DFFFF; ; PROHIBITED
+EFFFE..EFFFF; ; PROHIBITED
+FFFFE..FFFFF; ; PROHIBITED
+10FFFE..10FFFF; ; PROHIBITED
+
+# Total code points 18
+
+# code points from Table C.5
+
+D800..DFFF; ; PROHIBITED
+
+# Total code points 0
+
+# code points from Table C.6
+
+FFF9; ; PROHIBITED
+FFFA; ; PROHIBITED
+FFFB; ; PROHIBITED
+FFFC; ; PROHIBITED
+FFFD; ; PROHIBITED
+
+# Total code points 5
+
+# code points from Table C.7
+
+2FF0..2FFB; ; PROHIBITED
+
+# Total code points 1
+
+# code points from Table C.8
+
+0340; ; PROHIBITED
+0341; ; PROHIBITED
+200E; ; PROHIBITED
+200F; ; PROHIBITED
+202A; ; PROHIBITED
+202B; ; PROHIBITED
+202C; ; PROHIBITED
+202D; ; PROHIBITED
+202E; ; PROHIBITED
+206A; ; PROHIBITED
+206B; ; PROHIBITED
+206C; ; PROHIBITED
+206D; ; PROHIBITED
+206E; ; PROHIBITED
+206F; ; PROHIBITED
+
+# Total code points 15
+
+# code points from Table C.9
+
+E0001; ; PROHIBITED
+E0020..E007F; ; PROHIBITED
+
+# Total code points 82
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_s.txt b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_s.txt
new file mode 100644
index 00000000000..0ed83d5d35a
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/nfs4_mixed_prep_s.txt
@@ -0,0 +1,1945 @@
+###################
+# Copyright (C) 2003, International Business Machines
+# Corporation and others. All Rights Reserved.
+###################
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table A.1 from RFC 3454
+
+0221; ; UNASSIGNED
+0234..024F; ; UNASSIGNED
+02AE..02AF; ; UNASSIGNED
+02EF..02FF; ; UNASSIGNED
+0350..035F; ; UNASSIGNED
+0370..0373; ; UNASSIGNED
+0376..0379; ; UNASSIGNED
+037B..037D; ; UNASSIGNED
+037F..0383; ; UNASSIGNED
+038B; ; UNASSIGNED
+038D; ; UNASSIGNED
+03A2; ; UNASSIGNED
+03CF; ; UNASSIGNED
+03F7..03FF; ; UNASSIGNED
+0487; ; UNASSIGNED
+04CF; ; UNASSIGNED
+04F6..04F7; ; UNASSIGNED
+04FA..04FF; ; UNASSIGNED
+0510..0530; ; UNASSIGNED
+0557..0558; ; UNASSIGNED
+0560; ; UNASSIGNED
+0588; ; UNASSIGNED
+058B..0590; ; UNASSIGNED
+05A2; ; UNASSIGNED
+05BA; ; UNASSIGNED
+05C5..05CF; ; UNASSIGNED
+05EB..05EF; ; UNASSIGNED
+05F5..060B; ; UNASSIGNED
+060D..061A; ; UNASSIGNED
+061C..061E; ; UNASSIGNED
+0620; ; UNASSIGNED
+063B..063F; ; UNASSIGNED
+0656..065F; ; UNASSIGNED
+06EE..06EF; ; UNASSIGNED
+06FF; ; UNASSIGNED
+070E; ; UNASSIGNED
+072D..072F; ; UNASSIGNED
+074B..077F; ; UNASSIGNED
+07B2..0900; ; UNASSIGNED
+0904; ; UNASSIGNED
+093A..093B; ; UNASSIGNED
+094E..094F; ; UNASSIGNED
+0955..0957; ; UNASSIGNED
+0971..0980; ; UNASSIGNED
+0984; ; UNASSIGNED
+098D..098E; ; UNASSIGNED
+0991..0992; ; UNASSIGNED
+09A9; ; UNASSIGNED
+09B1; ; UNASSIGNED
+09B3..09B5; ; UNASSIGNED
+09BA..09BB; ; UNASSIGNED
+09BD; ; UNASSIGNED
+09C5..09C6; ; UNASSIGNED
+09C9..09CA; ; UNASSIGNED
+09CE..09D6; ; UNASSIGNED
+09D8..09DB; ; UNASSIGNED
+09DE; ; UNASSIGNED
+09E4..09E5; ; UNASSIGNED
+09FB..0A01; ; UNASSIGNED
+0A03..0A04; ; UNASSIGNED
+0A0B..0A0E; ; UNASSIGNED
+0A11..0A12; ; UNASSIGNED
+0A29; ; UNASSIGNED
+0A31; ; UNASSIGNED
+0A34; ; UNASSIGNED
+0A37; ; UNASSIGNED
+0A3A..0A3B; ; UNASSIGNED
+0A3D; ; UNASSIGNED
+0A43..0A46; ; UNASSIGNED
+0A49..0A4A; ; UNASSIGNED
+0A4E..0A58; ; UNASSIGNED
+0A5D; ; UNASSIGNED
+0A5F..0A65; ; UNASSIGNED
+0A75..0A80; ; UNASSIGNED
+0A84; ; UNASSIGNED
+0A8C; ; UNASSIGNED
+0A8E; ; UNASSIGNED
+0A92; ; UNASSIGNED
+0AA9; ; UNASSIGNED
+0AB1; ; UNASSIGNED
+0AB4; ; UNASSIGNED
+0ABA..0ABB; ; UNASSIGNED
+0AC6; ; UNASSIGNED
+0ACA; ; UNASSIGNED
+0ACE..0ACF; ; UNASSIGNED
+0AD1..0ADF; ; UNASSIGNED
+0AE1..0AE5; ; UNASSIGNED
+0AF0..0B00; ; UNASSIGNED
+0B04; ; UNASSIGNED
+0B0D..0B0E; ; UNASSIGNED
+0B11..0B12; ; UNASSIGNED
+0B29; ; UNASSIGNED
+0B31; ; UNASSIGNED
+0B34..0B35; ; UNASSIGNED
+0B3A..0B3B; ; UNASSIGNED
+0B44..0B46; ; UNASSIGNED
+0B49..0B4A; ; UNASSIGNED
+0B4E..0B55; ; UNASSIGNED
+0B58..0B5B; ; UNASSIGNED
+0B5E; ; UNASSIGNED
+0B62..0B65; ; UNASSIGNED
+0B71..0B81; ; UNASSIGNED
+0B84; ; UNASSIGNED
+0B8B..0B8D; ; UNASSIGNED
+0B91; ; UNASSIGNED
+0B96..0B98; ; UNASSIGNED
+0B9B; ; UNASSIGNED
+0B9D; ; UNASSIGNED
+0BA0..0BA2; ; UNASSIGNED
+0BA5..0BA7; ; UNASSIGNED
+0BAB..0BAD; ; UNASSIGNED
+0BB6; ; UNASSIGNED
+0BBA..0BBD; ; UNASSIGNED
+0BC3..0BC5; ; UNASSIGNED
+0BC9; ; UNASSIGNED
+0BCE..0BD6; ; UNASSIGNED
+0BD8..0BE6; ; UNASSIGNED
+0BF3..0C00; ; UNASSIGNED
+0C04; ; UNASSIGNED
+0C0D; ; UNASSIGNED
+0C11; ; UNASSIGNED
+0C29; ; UNASSIGNED
+0C34; ; UNASSIGNED
+0C3A..0C3D; ; UNASSIGNED
+0C45; ; UNASSIGNED
+0C49; ; UNASSIGNED
+0C4E..0C54; ; UNASSIGNED
+0C57..0C5F; ; UNASSIGNED
+0C62..0C65; ; UNASSIGNED
+0C70..0C81; ; UNASSIGNED
+0C84; ; UNASSIGNED
+0C8D; ; UNASSIGNED
+0C91; ; UNASSIGNED
+0CA9; ; UNASSIGNED
+0CB4; ; UNASSIGNED
+0CBA..0CBD; ; UNASSIGNED
+0CC5; ; UNASSIGNED
+0CC9; ; UNASSIGNED
+0CCE..0CD4; ; UNASSIGNED
+0CD7..0CDD; ; UNASSIGNED
+0CDF; ; UNASSIGNED
+0CE2..0CE5; ; UNASSIGNED
+0CF0..0D01; ; UNASSIGNED
+0D04; ; UNASSIGNED
+0D0D; ; UNASSIGNED
+0D11; ; UNASSIGNED
+0D29; ; UNASSIGNED
+0D3A..0D3D; ; UNASSIGNED
+0D44..0D45; ; UNASSIGNED
+0D49; ; UNASSIGNED
+0D4E..0D56; ; UNASSIGNED
+0D58..0D5F; ; UNASSIGNED
+0D62..0D65; ; UNASSIGNED
+0D70..0D81; ; UNASSIGNED
+0D84; ; UNASSIGNED
+0D97..0D99; ; UNASSIGNED
+0DB2; ; UNASSIGNED
+0DBC; ; UNASSIGNED
+0DBE..0DBF; ; UNASSIGNED
+0DC7..0DC9; ; UNASSIGNED
+0DCB..0DCE; ; UNASSIGNED
+0DD5; ; UNASSIGNED
+0DD7; ; UNASSIGNED
+0DE0..0DF1; ; UNASSIGNED
+0DF5..0E00; ; UNASSIGNED
+0E3B..0E3E; ; UNASSIGNED
+0E5C..0E80; ; UNASSIGNED
+0E83; ; UNASSIGNED
+0E85..0E86; ; UNASSIGNED
+0E89; ; UNASSIGNED
+0E8B..0E8C; ; UNASSIGNED
+0E8E..0E93; ; UNASSIGNED
+0E98; ; UNASSIGNED
+0EA0; ; UNASSIGNED
+0EA4; ; UNASSIGNED
+0EA6; ; UNASSIGNED
+0EA8..0EA9; ; UNASSIGNED
+0EAC; ; UNASSIGNED
+0EBA; ; UNASSIGNED
+0EBE..0EBF; ; UNASSIGNED
+0EC5; ; UNASSIGNED
+0EC7; ; UNASSIGNED
+0ECE..0ECF; ; UNASSIGNED
+0EDA..0EDB; ; UNASSIGNED
+0EDE..0EFF; ; UNASSIGNED
+0F48; ; UNASSIGNED
+0F6B..0F70; ; UNASSIGNED
+0F8C..0F8F; ; UNASSIGNED
+0F98; ; UNASSIGNED
+0FBD; ; UNASSIGNED
+0FCD..0FCE; ; UNASSIGNED
+0FD0..0FFF; ; UNASSIGNED
+1022; ; UNASSIGNED
+1028; ; UNASSIGNED
+102B; ; UNASSIGNED
+1033..1035; ; UNASSIGNED
+103A..103F; ; UNASSIGNED
+105A..109F; ; UNASSIGNED
+10C6..10CF; ; UNASSIGNED
+10F9..10FA; ; UNASSIGNED
+10FC..10FF; ; UNASSIGNED
+115A..115E; ; UNASSIGNED
+11A3..11A7; ; UNASSIGNED
+11FA..11FF; ; UNASSIGNED
+1207; ; UNASSIGNED
+1247; ; UNASSIGNED
+1249; ; UNASSIGNED
+124E..124F; ; UNASSIGNED
+1257; ; UNASSIGNED
+1259; ; UNASSIGNED
+125E..125F; ; UNASSIGNED
+1287; ; UNASSIGNED
+1289; ; UNASSIGNED
+128E..128F; ; UNASSIGNED
+12AF; ; UNASSIGNED
+12B1; ; UNASSIGNED
+12B6..12B7; ; UNASSIGNED
+12BF; ; UNASSIGNED
+12C1; ; UNASSIGNED
+12C6..12C7; ; UNASSIGNED
+12CF; ; UNASSIGNED
+12D7; ; UNASSIGNED
+12EF; ; UNASSIGNED
+130F; ; UNASSIGNED
+1311; ; UNASSIGNED
+1316..1317; ; UNASSIGNED
+131F; ; UNASSIGNED
+1347; ; UNASSIGNED
+135B..1360; ; UNASSIGNED
+137D..139F; ; UNASSIGNED
+13F5..1400; ; UNASSIGNED
+1677..167F; ; UNASSIGNED
+169D..169F; ; UNASSIGNED
+16F1..16FF; ; UNASSIGNED
+170D; ; UNASSIGNED
+1715..171F; ; UNASSIGNED
+1737..173F; ; UNASSIGNED
+1754..175F; ; UNASSIGNED
+176D; ; UNASSIGNED
+1771; ; UNASSIGNED
+1774..177F; ; UNASSIGNED
+17DD..17DF; ; UNASSIGNED
+17EA..17FF; ; UNASSIGNED
+180F; ; UNASSIGNED
+181A..181F; ; UNASSIGNED
+1878..187F; ; UNASSIGNED
+18AA..1DFF; ; UNASSIGNED
+1E9C..1E9F; ; UNASSIGNED
+1EFA..1EFF; ; UNASSIGNED
+1F16..1F17; ; UNASSIGNED
+1F1E..1F1F; ; UNASSIGNED
+1F46..1F47; ; UNASSIGNED
+1F4E..1F4F; ; UNASSIGNED
+1F58; ; UNASSIGNED
+1F5A; ; UNASSIGNED
+1F5C; ; UNASSIGNED
+1F5E; ; UNASSIGNED
+1F7E..1F7F; ; UNASSIGNED
+1FB5; ; UNASSIGNED
+1FC5; ; UNASSIGNED
+1FD4..1FD5; ; UNASSIGNED
+1FDC; ; UNASSIGNED
+1FF0..1FF1; ; UNASSIGNED
+1FF5; ; UNASSIGNED
+1FFF; ; UNASSIGNED
+2053..2056; ; UNASSIGNED
+2058..205E; ; UNASSIGNED
+2064..2069; ; UNASSIGNED
+2072..2073; ; UNASSIGNED
+208F..209F; ; UNASSIGNED
+20B2..20CF; ; UNASSIGNED
+20EB..20FF; ; UNASSIGNED
+213B..213C; ; UNASSIGNED
+214C..2152; ; UNASSIGNED
+2184..218F; ; UNASSIGNED
+23CF..23FF; ; UNASSIGNED
+2427..243F; ; UNASSIGNED
+244B..245F; ; UNASSIGNED
+24FF; ; UNASSIGNED
+2614..2615; ; UNASSIGNED
+2618; ; UNASSIGNED
+267E..267F; ; UNASSIGNED
+268A..2700; ; UNASSIGNED
+2705; ; UNASSIGNED
+270A..270B; ; UNASSIGNED
+2728; ; UNASSIGNED
+274C; ; UNASSIGNED
+274E; ; UNASSIGNED
+2753..2755; ; UNASSIGNED
+2757; ; UNASSIGNED
+275F..2760; ; UNASSIGNED
+2795..2797; ; UNASSIGNED
+27B0; ; UNASSIGNED
+27BF..27CF; ; UNASSIGNED
+27EC..27EF; ; UNASSIGNED
+2B00..2E7F; ; UNASSIGNED
+2E9A; ; UNASSIGNED
+2EF4..2EFF; ; UNASSIGNED
+2FD6..2FEF; ; UNASSIGNED
+2FFC..2FFF; ; UNASSIGNED
+3040; ; UNASSIGNED
+3097..3098; ; UNASSIGNED
+3100..3104; ; UNASSIGNED
+312D..3130; ; UNASSIGNED
+318F; ; UNASSIGNED
+31B8..31EF; ; UNASSIGNED
+321D..321F; ; UNASSIGNED
+3244..3250; ; UNASSIGNED
+327C..327E; ; UNASSIGNED
+32CC..32CF; ; UNASSIGNED
+32FF; ; UNASSIGNED
+3377..337A; ; UNASSIGNED
+33DE..33DF; ; UNASSIGNED
+33FF; ; UNASSIGNED
+4DB6..4DFF; ; UNASSIGNED
+9FA6..9FFF; ; UNASSIGNED
+A48D..A48F; ; UNASSIGNED
+A4C7..ABFF; ; UNASSIGNED
+D7A4..D7FF; ; UNASSIGNED
+FA2E..FA2F; ; UNASSIGNED
+FA6B..FAFF; ; UNASSIGNED
+FB07..FB12; ; UNASSIGNED
+FB18..FB1C; ; UNASSIGNED
+FB37; ; UNASSIGNED
+FB3D; ; UNASSIGNED
+FB3F; ; UNASSIGNED
+FB42; ; UNASSIGNED
+FB45; ; UNASSIGNED
+FBB2..FBD2; ; UNASSIGNED
+FD40..FD4F; ; UNASSIGNED
+FD90..FD91; ; UNASSIGNED
+FDC8..FDCF; ; UNASSIGNED
+FDFD..FDFF; ; UNASSIGNED
+FE10..FE1F; ; UNASSIGNED
+FE24..FE2F; ; UNASSIGNED
+FE47..FE48; ; UNASSIGNED
+FE53; ; UNASSIGNED
+FE67; ; UNASSIGNED
+FE6C..FE6F; ; UNASSIGNED
+FE75; ; UNASSIGNED
+FEFD..FEFE; ; UNASSIGNED
+FF00; ; UNASSIGNED
+FFBF..FFC1; ; UNASSIGNED
+FFC8..FFC9; ; UNASSIGNED
+FFD0..FFD1; ; UNASSIGNED
+FFD8..FFD9; ; UNASSIGNED
+FFDD..FFDF; ; UNASSIGNED
+FFE7; ; UNASSIGNED
+FFEF..FFF8; ; UNASSIGNED
+10000..102FF; ; UNASSIGNED
+1031F; ; UNASSIGNED
+10324..1032F; ; UNASSIGNED
+1034B..103FF; ; UNASSIGNED
+10426..10427; ; UNASSIGNED
+1044E..1CFFF; ; UNASSIGNED
+1D0F6..1D0FF; ; UNASSIGNED
+1D127..1D129; ; UNASSIGNED
+1D1DE..1D3FF; ; UNASSIGNED
+1D455; ; UNASSIGNED
+1D49D; ; UNASSIGNED
+1D4A0..1D4A1; ; UNASSIGNED
+1D4A3..1D4A4; ; UNASSIGNED
+1D4A7..1D4A8; ; UNASSIGNED
+1D4AD; ; UNASSIGNED
+1D4BA; ; UNASSIGNED
+1D4BC; ; UNASSIGNED
+1D4C1; ; UNASSIGNED
+1D4C4; ; UNASSIGNED
+1D506; ; UNASSIGNED
+1D50B..1D50C; ; UNASSIGNED
+1D515; ; UNASSIGNED
+1D51D; ; UNASSIGNED
+1D53A; ; UNASSIGNED
+1D53F; ; UNASSIGNED
+1D545; ; UNASSIGNED
+1D547..1D549; ; UNASSIGNED
+1D551; ; UNASSIGNED
+1D6A4..1D6A7; ; UNASSIGNED
+1D7CA..1D7CD; ; UNASSIGNED
+1D800..1FFFD; ; UNASSIGNED
+2A6D7..2F7FF; ; UNASSIGNED
+2FA1E..2FFFD; ; UNASSIGNED
+30000..3FFFD; ; UNASSIGNED
+40000..4FFFD; ; UNASSIGNED
+50000..5FFFD; ; UNASSIGNED
+60000..6FFFD; ; UNASSIGNED
+70000..7FFFD; ; UNASSIGNED
+80000..8FFFD; ; UNASSIGNED
+90000..9FFFD; ; UNASSIGNED
+A0000..AFFFD; ; UNASSIGNED
+B0000..BFFFD; ; UNASSIGNED
+C0000..CFFFD; ; UNASSIGNED
+D0000..DFFFD; ; UNASSIGNED
+E0000; ; UNASSIGNED
+E0002..E001F; ; UNASSIGNED
+E0080..EFFFD; ; UNASSIGNED
+
+# Total code points 3653
+
+# This table contains code points from Table B.1 from RFC 3454
+
+00AD; ; MAP
+034F; ; MAP
+1806; ; MAP
+180B; ; MAP
+180C; ; MAP
+180D; ; MAP
+200B; ; MAP
+200C; ; MAP
+200D; ; MAP
+2060; ; MAP
+FE00; ; MAP
+FE01; ; MAP
+FE02; ; MAP
+FE03; ; MAP
+FE04; ; MAP
+FE05; ; MAP
+FE06; ; MAP
+FE07; ; MAP
+FE08; ; MAP
+FE09; ; MAP
+FE0A; ; MAP
+FE0B; ; MAP
+FE0C; ; MAP
+FE0D; ; MAP
+FE0E; ; MAP
+FE0F; ; MAP
+FEFF; ; MAP
+
+# Total code points 27
+
+###################
+# WARNING: This table is generated by filterRFC3454.pl tool. DO NOT EDIT
+###################
+
+# This table contains code points from Table B.2 from RFC 3454
+
+0041; 0061; MAP
+0042; 0062; MAP
+0043; 0063; MAP
+0044; 0064; MAP
+0045; 0065; MAP
+0046; 0066; MAP
+0047; 0067; MAP
+0048; 0068; MAP
+0049; 0069; MAP
+004A; 006A; MAP
+004B; 006B; MAP
+004C; 006C; MAP
+004D; 006D; MAP
+004E; 006E; MAP
+004F; 006F; MAP
+0050; 0070; MAP
+0051; 0071; MAP
+0052; 0072; MAP
+0053; 0073; MAP
+0054; 0074; MAP
+0055; 0075; MAP
+0056; 0076; MAP
+0057; 0077; MAP
+0058; 0078; MAP
+0059; 0079; MAP
+005A; 007A; MAP
+00B5; 03BC; MAP
+00C0; 00E0; MAP
+00C1; 00E1; MAP
+00C2; 00E2; MAP
+00C3; 00E3; MAP
+00C4; 00E4; MAP
+00C5; 00E5; MAP
+00C6; 00E6; MAP
+00C7; 00E7; MAP
+00C8; 00E8; MAP
+00C9; 00E9; MAP
+00CA; 00EA; MAP
+00CB; 00EB; MAP
+00CC; 00EC; MAP
+00CD; 00ED; MAP
+00CE; 00EE; MAP
+00CF; 00EF; MAP
+00D0; 00F0; MAP
+00D1; 00F1; MAP
+00D2; 00F2; MAP
+00D3; 00F3; MAP
+00D4; 00F4; MAP
+00D5; 00F5; MAP
+00D6; 00F6; MAP
+00D8; 00F8; MAP
+00D9; 00F9; MAP
+00DA; 00FA; MAP
+00DB; 00FB; MAP
+00DC; 00FC; MAP
+00DD; 00FD; MAP
+00DE; 00FE; MAP
+00DF; 0073 0073; MAP
+0100; 0101; MAP
+0102; 0103; MAP
+0104; 0105; MAP
+0106; 0107; MAP
+0108; 0109; MAP
+010A; 010B; MAP
+010C; 010D; MAP
+010E; 010F; MAP
+0110; 0111; MAP
+0112; 0113; MAP
+0114; 0115; MAP
+0116; 0117; MAP
+0118; 0119; MAP
+011A; 011B; MAP
+011C; 011D; MAP
+011E; 011F; MAP
+0120; 0121; MAP
+0122; 0123; MAP
+0124; 0125; MAP
+0126; 0127; MAP
+0128; 0129; MAP
+012A; 012B; MAP
+012C; 012D; MAP
+012E; 012F; MAP
+0130; 0069 0307; MAP
+0132; 0133; MAP
+0134; 0135; MAP
+0136; 0137; MAP
+0139; 013A; MAP
+013B; 013C; MAP
+013D; 013E; MAP
+013F; 0140; MAP
+0141; 0142; MAP
+0143; 0144; MAP
+0145; 0146; MAP
+0147; 0148; MAP
+0149; 02BC 006E; MAP
+014A; 014B; MAP
+014C; 014D; MAP
+014E; 014F; MAP
+0150; 0151; MAP
+0152; 0153; MAP
+0154; 0155; MAP
+0156; 0157; MAP
+0158; 0159; MAP
+015A; 015B; MAP
+015C; 015D; MAP
+015E; 015F; MAP
+0160; 0161; MAP
+0162; 0163; MAP
+0164; 0165; MAP
+0166; 0167; MAP
+0168; 0169; MAP
+016A; 016B; MAP
+016C; 016D; MAP
+016E; 016F; MAP
+0170; 0171; MAP
+0172; 0173; MAP
+0174; 0175; MAP
+0176; 0177; MAP
+0178; 00FF; MAP
+0179; 017A; MAP
+017B; 017C; MAP
+017D; 017E; MAP
+017F; 0073; MAP
+0181; 0253; MAP
+0182; 0183; MAP
+0184; 0185; MAP
+0186; 0254; MAP
+0187; 0188; MAP
+0189; 0256; MAP
+018A; 0257; MAP
+018B; 018C; MAP
+018E; 01DD; MAP
+018F; 0259; MAP
+0190; 025B; MAP
+0191; 0192; MAP
+0193; 0260; MAP
+0194; 0263; MAP
+0196; 0269; MAP
+0197; 0268; MAP
+0198; 0199; MAP
+019C; 026F; MAP
+019D; 0272; MAP
+019F; 0275; MAP
+01A0; 01A1; MAP
+01A2; 01A3; MAP
+01A4; 01A5; MAP
+01A6; 0280; MAP
+01A7; 01A8; MAP
+01A9; 0283; MAP
+01AC; 01AD; MAP
+01AE; 0288; MAP
+01AF; 01B0; MAP
+01B1; 028A; MAP
+01B2; 028B; MAP
+01B3; 01B4; MAP
+01B5; 01B6; MAP
+01B7; 0292; MAP
+01B8; 01B9; MAP
+01BC; 01BD; MAP
+01C4; 01C6; MAP
+01C5; 01C6; MAP
+01C7; 01C9; MAP
+01C8; 01C9; MAP
+01CA; 01CC; MAP
+01CB; 01CC; MAP
+01CD; 01CE; MAP
+01CF; 01D0; MAP
+01D1; 01D2; MAP
+01D3; 01D4; MAP
+01D5; 01D6; MAP
+01D7; 01D8; MAP
+01D9; 01DA; MAP
+01DB; 01DC; MAP
+01DE; 01DF; MAP
+01E0; 01E1; MAP
+01E2; 01E3; MAP
+01E4; 01E5; MAP
+01E6; 01E7; MAP
+01E8; 01E9; MAP
+01EA; 01EB; MAP
+01EC; 01ED; MAP
+01EE; 01EF; MAP
+01F0; 006A 030C; MAP
+01F1; 01F3; MAP
+01F2; 01F3; MAP
+01F4; 01F5; MAP
+01F6; 0195; MAP
+01F7; 01BF; MAP
+01F8; 01F9; MAP
+01FA; 01FB; MAP
+01FC; 01FD; MAP
+01FE; 01FF; MAP
+0200; 0201; MAP
+0202; 0203; MAP
+0204; 0205; MAP
+0206; 0207; MAP
+0208; 0209; MAP
+020A; 020B; MAP
+020C; 020D; MAP
+020E; 020F; MAP
+0210; 0211; MAP
+0212; 0213; MAP
+0214; 0215; MAP
+0216; 0217; MAP
+0218; 0219; MAP
+021A; 021B; MAP
+021C; 021D; MAP
+021E; 021F; MAP
+0220; 019E; MAP
+0222; 0223; MAP
+0224; 0225; MAP
+0226; 0227; MAP
+0228; 0229; MAP
+022A; 022B; MAP
+022C; 022D; MAP
+022E; 022F; MAP
+0230; 0231; MAP
+0232; 0233; MAP
+0345; 03B9; MAP
+037A; 0020 03B9; MAP
+0386; 03AC; MAP
+0388; 03AD; MAP
+0389; 03AE; MAP
+038A; 03AF; MAP
+038C; 03CC; MAP
+038E; 03CD; MAP
+038F; 03CE; MAP
+0390; 03B9 0308 0301; MAP
+0391; 03B1; MAP
+0392; 03B2; MAP
+0393; 03B3; MAP
+0394; 03B4; MAP
+0395; 03B5; MAP
+0396; 03B6; MAP
+0397; 03B7; MAP
+0398; 03B8; MAP
+0399; 03B9; MAP
+039A; 03BA; MAP
+039B; 03BB; MAP
+039C; 03BC; MAP
+039D; 03BD; MAP
+039E; 03BE; MAP
+039F; 03BF; MAP
+03A0; 03C0; MAP
+03A1; 03C1; MAP
+03A3; 03C3; MAP
+03A4; 03C4; MAP
+03A5; 03C5; MAP
+03A6; 03C6; MAP
+03A7; 03C7; MAP
+03A8; 03C8; MAP
+03A9; 03C9; MAP
+03AA; 03CA; MAP
+03AB; 03CB; MAP
+03B0; 03C5 0308 0301; MAP
+03C2; 03C3; MAP
+03D0; 03B2; MAP
+03D1; 03B8; MAP
+03D2; 03C5; MAP
+03D3; 03CD; MAP
+03D4; 03CB; MAP
+03D5; 03C6; MAP
+03D6; 03C0; MAP
+03D8; 03D9; MAP
+03DA; 03DB; MAP
+03DC; 03DD; MAP
+03DE; 03DF; MAP
+03E0; 03E1; MAP
+03E2; 03E3; MAP
+03E4; 03E5; MAP
+03E6; 03E7; MAP
+03E8; 03E9; MAP
+03EA; 03EB; MAP
+03EC; 03ED; MAP
+03EE; 03EF; MAP
+03F0; 03BA; MAP
+03F1; 03C1; MAP
+03F2; 03C3; MAP
+03F4; 03B8; MAP
+03F5; 03B5; MAP
+0400; 0450; MAP
+0401; 0451; MAP
+0402; 0452; MAP
+0403; 0453; MAP
+0404; 0454; MAP
+0405; 0455; MAP
+0406; 0456; MAP
+0407; 0457; MAP
+0408; 0458; MAP
+0409; 0459; MAP
+040A; 045A; MAP
+040B; 045B; MAP
+040C; 045C; MAP
+040D; 045D; MAP
+040E; 045E; MAP
+040F; 045F; MAP
+0410; 0430; MAP
+0411; 0431; MAP
+0412; 0432; MAP
+0413; 0433; MAP
+0414; 0434; MAP
+0415; 0435; MAP
+0416; 0436; MAP
+0417; 0437; MAP
+0418; 0438; MAP
+0419; 0439; MAP
+041A; 043A; MAP
+041B; 043B; MAP
+041C; 043C; MAP
+041D; 043D; MAP
+041E; 043E; MAP
+041F; 043F; MAP
+0420; 0440; MAP
+0421; 0441; MAP
+0422; 0442; MAP
+0423; 0443; MAP
+0424; 0444; MAP
+0425; 0445; MAP
+0426; 0446; MAP
+0427; 0447; MAP
+0428; 0448; MAP
+0429; 0449; MAP
+042A; 044A; MAP
+042B; 044B; MAP
+042C; 044C; MAP
+042D; 044D; MAP
+042E; 044E; MAP
+042F; 044F; MAP
+0460; 0461; MAP
+0462; 0463; MAP
+0464; 0465; MAP
+0466; 0467; MAP
+0468; 0469; MAP
+046A; 046B; MAP
+046C; 046D; MAP
+046E; 046F; MAP
+0470; 0471; MAP
+0472; 0473; MAP
+0474; 0475; MAP
+0476; 0477; MAP
+0478; 0479; MAP
+047A; 047B; MAP
+047C; 047D; MAP
+047E; 047F; MAP
+0480; 0481; MAP
+048A; 048B; MAP
+048C; 048D; MAP
+048E; 048F; MAP
+0490; 0491; MAP
+0492; 0493; MAP
+0494; 0495; MAP
+0496; 0497; MAP
+0498; 0499; MAP
+049A; 049B; MAP
+049C; 049D; MAP
+049E; 049F; MAP
+04A0; 04A1; MAP
+04A2; 04A3; MAP
+04A4; 04A5; MAP
+04A6; 04A7; MAP
+04A8; 04A9; MAP
+04AA; 04AB; MAP
+04AC; 04AD; MAP
+04AE; 04AF; MAP
+04B0; 04B1; MAP
+04B2; 04B3; MAP
+04B4; 04B5; MAP
+04B6; 04B7; MAP
+04B8; 04B9; MAP
+04BA; 04BB; MAP
+04BC; 04BD; MAP
+04BE; 04BF; MAP
+04C1; 04C2; MAP
+04C3; 04C4; MAP
+04C5; 04C6; MAP
+04C7; 04C8; MAP
+04C9; 04CA; MAP
+04CB; 04CC; MAP
+04CD; 04CE; MAP
+04D0; 04D1; MAP
+04D2; 04D3; MAP
+04D4; 04D5; MAP
+04D6; 04D7; MAP
+04D8; 04D9; MAP
+04DA; 04DB; MAP
+04DC; 04DD; MAP
+04DE; 04DF; MAP
+04E0; 04E1; MAP
+04E2; 04E3; MAP
+04E4; 04E5; MAP
+04E6; 04E7; MAP
+04E8; 04E9; MAP
+04EA; 04EB; MAP
+04EC; 04ED; MAP
+04EE; 04EF; MAP
+04F0; 04F1; MAP
+04F2; 04F3; MAP
+04F4; 04F5; MAP
+04F8; 04F9; MAP
+0500; 0501; MAP
+0502; 0503; MAP
+0504; 0505; MAP
+0506; 0507; MAP
+0508; 0509; MAP
+050A; 050B; MAP
+050C; 050D; MAP
+050E; 050F; MAP
+0531; 0561; MAP
+0532; 0562; MAP
+0533; 0563; MAP
+0534; 0564; MAP
+0535; 0565; MAP
+0536; 0566; MAP
+0537; 0567; MAP
+0538; 0568; MAP
+0539; 0569; MAP
+053A; 056A; MAP
+053B; 056B; MAP
+053C; 056C; MAP
+053D; 056D; MAP
+053E; 056E; MAP
+053F; 056F; MAP
+0540; 0570; MAP
+0541; 0571; MAP
+0542; 0572; MAP
+0543; 0573; MAP
+0544; 0574; MAP
+0545; 0575; MAP
+0546; 0576; MAP
+0547; 0577; MAP
+0548; 0578; MAP
+0549; 0579; MAP
+054A; 057A; MAP
+054B; 057B; MAP
+054C; 057C; MAP
+054D; 057D; MAP
+054E; 057E; MAP
+054F; 057F; MAP
+0550; 0580; MAP
+0551; 0581; MAP
+0552; 0582; MAP
+0553; 0583; MAP
+0554; 0584; MAP
+0555; 0585; MAP
+0556; 0586; MAP
+0587; 0565 0582; MAP
+1E00; 1E01; MAP
+1E02; 1E03; MAP
+1E04; 1E05; MAP
+1E06; 1E07; MAP
+1E08; 1E09; MAP
+1E0A; 1E0B; MAP
+1E0C; 1E0D; MAP
+1E0E; 1E0F; MAP
+1E10; 1E11; MAP
+1E12; 1E13; MAP
+1E14; 1E15; MAP
+1E16; 1E17; MAP
+1E18; 1E19; MAP
+1E1A; 1E1B; MAP
+1E1C; 1E1D; MAP
+1E1E; 1E1F; MAP
+1E20; 1E21; MAP
+1E22; 1E23; MAP
+1E24; 1E25; MAP
+1E26; 1E27; MAP
+1E28; 1E29; MAP
+1E2A; 1E2B; MAP
+1E2C; 1E2D; MAP
+1E2E; 1E2F; MAP
+1E30; 1E31; MAP
+1E32; 1E33; MAP
+1E34; 1E35; MAP
+1E36; 1E37; MAP
+1E38; 1E39; MAP
+1E3A; 1E3B; MAP
+1E3C; 1E3D; MAP
+1E3E; 1E3F; MAP
+1E40; 1E41; MAP
+1E42; 1E43; MAP
+1E44; 1E45; MAP
+1E46; 1E47; MAP
+1E48; 1E49; MAP
+1E4A; 1E4B; MAP
+1E4C; 1E4D; MAP
+1E4E; 1E4F; MAP
+1E50; 1E51; MAP
+1E52; 1E53; MAP
+1E54; 1E55; MAP
+1E56; 1E57; MAP
+1E58; 1E59; MAP
+1E5A; 1E5B; MAP
+1E5C; 1E5D; MAP
+1E5E; 1E5F; MAP
+1E60; 1E61; MAP
+1E62; 1E63; MAP
+1E64; 1E65; MAP
+1E66; 1E67; MAP
+1E68; 1E69; MAP
+1E6A; 1E6B; MAP
+1E6C; 1E6D; MAP
+1E6E; 1E6F; MAP
+1E70; 1E71; MAP
+1E72; 1E73; MAP
+1E74; 1E75; MAP
+1E76; 1E77; MAP
+1E78; 1E79; MAP
+1E7A; 1E7B; MAP
+1E7C; 1E7D; MAP
+1E7E; 1E7F; MAP
+1E80; 1E81; MAP
+1E82; 1E83; MAP
+1E84; 1E85; MAP
+1E86; 1E87; MAP
+1E88; 1E89; MAP
+1E8A; 1E8B; MAP
+1E8C; 1E8D; MAP
+1E8E; 1E8F; MAP
+1E90; 1E91; MAP
+1E92; 1E93; MAP
+1E94; 1E95; MAP
+1E96; 0068 0331; MAP
+1E97; 0074 0308; MAP
+1E98; 0077 030A; MAP
+1E99; 0079 030A; MAP
+1E9A; 0061 02BE; MAP
+1E9B; 1E61; MAP
+1EA0; 1EA1; MAP
+1EA2; 1EA3; MAP
+1EA4; 1EA5; MAP
+1EA6; 1EA7; MAP
+1EA8; 1EA9; MAP
+1EAA; 1EAB; MAP
+1EAC; 1EAD; MAP
+1EAE; 1EAF; MAP
+1EB0; 1EB1; MAP
+1EB2; 1EB3; MAP
+1EB4; 1EB5; MAP
+1EB6; 1EB7; MAP
+1EB8; 1EB9; MAP
+1EBA; 1EBB; MAP
+1EBC; 1EBD; MAP
+1EBE; 1EBF; MAP
+1EC0; 1EC1; MAP
+1EC2; 1EC3; MAP
+1EC4; 1EC5; MAP
+1EC6; 1EC7; MAP
+1EC8; 1EC9; MAP
+1ECA; 1ECB; MAP
+1ECC; 1ECD; MAP
+1ECE; 1ECF; MAP
+1ED0; 1ED1; MAP
+1ED2; 1ED3; MAP
+1ED4; 1ED5; MAP
+1ED6; 1ED7; MAP
+1ED8; 1ED9; MAP
+1EDA; 1EDB; MAP
+1EDC; 1EDD; MAP
+1EDE; 1EDF; MAP
+1EE0; 1EE1; MAP
+1EE2; 1EE3; MAP
+1EE4; 1EE5; MAP
+1EE6; 1EE7; MAP
+1EE8; 1EE9; MAP
+1EEA; 1EEB; MAP
+1EEC; 1EED; MAP
+1EEE; 1EEF; MAP
+1EF0; 1EF1; MAP
+1EF2; 1EF3; MAP
+1EF4; 1EF5; MAP
+1EF6; 1EF7; MAP
+1EF8; 1EF9; MAP
+1F08; 1F00; MAP
+1F09; 1F01; MAP
+1F0A; 1F02; MAP
+1F0B; 1F03; MAP
+1F0C; 1F04; MAP
+1F0D; 1F05; MAP
+1F0E; 1F06; MAP
+1F0F; 1F07; MAP
+1F18; 1F10; MAP
+1F19; 1F11; MAP
+1F1A; 1F12; MAP
+1F1B; 1F13; MAP
+1F1C; 1F14; MAP
+1F1D; 1F15; MAP
+1F28; 1F20; MAP
+1F29; 1F21; MAP
+1F2A; 1F22; MAP
+1F2B; 1F23; MAP
+1F2C; 1F24; MAP
+1F2D; 1F25; MAP
+1F2E; 1F26; MAP
+1F2F; 1F27; MAP
+1F38; 1F30; MAP
+1F39; 1F31; MAP
+1F3A; 1F32; MAP
+1F3B; 1F33; MAP
+1F3C; 1F34; MAP
+1F3D; 1F35; MAP
+1F3E; 1F36; MAP
+1F3F; 1F37; MAP
+1F48; 1F40; MAP
+1F49; 1F41; MAP
+1F4A; 1F42; MAP
+1F4B; 1F43; MAP
+1F4C; 1F44; MAP
+1F4D; 1F45; MAP
+1F50; 03C5 0313; MAP
+1F52; 03C5 0313 0300; MAP
+1F54; 03C5 0313 0301; MAP
+1F56; 03C5 0313 0342; MAP
+1F59; 1F51; MAP
+1F5B; 1F53; MAP
+1F5D; 1F55; MAP
+1F5F; 1F57; MAP
+1F68; 1F60; MAP
+1F69; 1F61; MAP
+1F6A; 1F62; MAP
+1F6B; 1F63; MAP
+1F6C; 1F64; MAP
+1F6D; 1F65; MAP
+1F6E; 1F66; MAP
+1F6F; 1F67; MAP
+1F80; 1F00 03B9; MAP
+1F81; 1F01 03B9; MAP
+1F82; 1F02 03B9; MAP
+1F83; 1F03 03B9; MAP
+1F84; 1F04 03B9; MAP
+1F85; 1F05 03B9; MAP
+1F86; 1F06 03B9; MAP
+1F87; 1F07 03B9; MAP
+1F88; 1F00 03B9; MAP
+1F89; 1F01 03B9; MAP
+1F8A; 1F02 03B9; MAP
+1F8B; 1F03 03B9; MAP
+1F8C; 1F04 03B9; MAP
+1F8D; 1F05 03B9; MAP
+1F8E; 1F06 03B9; MAP
+1F8F; 1F07 03B9; MAP
+1F90; 1F20 03B9; MAP
+1F91; 1F21 03B9; MAP
+1F92; 1F22 03B9; MAP
+1F93; 1F23 03B9; MAP
+1F94; 1F24 03B9; MAP
+1F95; 1F25 03B9; MAP
+1F96; 1F26 03B9; MAP
+1F97; 1F27 03B9; MAP
+1F98; 1F20 03B9; MAP
+1F99; 1F21 03B9; MAP
+1F9A; 1F22 03B9; MAP
+1F9B; 1F23 03B9; MAP
+1F9C; 1F24 03B9; MAP
+1F9D; 1F25 03B9; MAP
+1F9E; 1F26 03B9; MAP
+1F9F; 1F27 03B9; MAP
+1FA0; 1F60 03B9; MAP
+1FA1; 1F61 03B9; MAP
+1FA2; 1F62 03B9; MAP
+1FA3; 1F63 03B9; MAP
+1FA4; 1F64 03B9; MAP
+1FA5; 1F65 03B9; MAP
+1FA6; 1F66 03B9; MAP
+1FA7; 1F67 03B9; MAP
+1FA8; 1F60 03B9; MAP
+1FA9; 1F61 03B9; MAP
+1FAA; 1F62 03B9; MAP
+1FAB; 1F63 03B9; MAP
+1FAC; 1F64 03B9; MAP
+1FAD; 1F65 03B9; MAP
+1FAE; 1F66 03B9; MAP
+1FAF; 1F67 03B9; MAP
+1FB2; 1F70 03B9; MAP
+1FB3; 03B1 03B9; MAP
+1FB4; 03AC 03B9; MAP
+1FB6; 03B1 0342; MAP
+1FB7; 03B1 0342 03B9; MAP
+1FB8; 1FB0; MAP
+1FB9; 1FB1; MAP
+1FBA; 1F70; MAP
+1FBB; 1F71; MAP
+1FBC; 03B1 03B9; MAP
+1FBE; 03B9; MAP
+1FC2; 1F74 03B9; MAP
+1FC3; 03B7 03B9; MAP
+1FC4; 03AE 03B9; MAP
+1FC6; 03B7 0342; MAP
+1FC7; 03B7 0342 03B9; MAP
+1FC8; 1F72; MAP
+1FC9; 1F73; MAP
+1FCA; 1F74; MAP
+1FCB; 1F75; MAP
+1FCC; 03B7 03B9; MAP
+1FD2; 03B9 0308 0300; MAP
+1FD3; 03B9 0308 0301; MAP
+1FD6; 03B9 0342; MAP
+1FD7; 03B9 0308 0342; MAP
+1FD8; 1FD0; MAP
+1FD9; 1FD1; MAP
+1FDA; 1F76; MAP
+1FDB; 1F77; MAP
+1FE2; 03C5 0308 0300; MAP
+1FE3; 03C5 0308 0301; MAP
+1FE4; 03C1 0313; MAP
+1FE6; 03C5 0342; MAP
+1FE7; 03C5 0308 0342; MAP
+1FE8; 1FE0; MAP
+1FE9; 1FE1; MAP
+1FEA; 1F7A; MAP
+1FEB; 1F7B; MAP
+1FEC; 1FE5; MAP
+1FF2; 1F7C 03B9; MAP
+1FF3; 03C9 03B9; MAP
+1FF4; 03CE 03B9; MAP
+1FF6; 03C9 0342; MAP
+1FF7; 03C9 0342 03B9; MAP
+1FF8; 1F78; MAP
+1FF9; 1F79; MAP
+1FFA; 1F7C; MAP
+1FFB; 1F7D; MAP
+1FFC; 03C9 03B9; MAP
+20A8; 0072 0073; MAP
+2102; 0063; MAP
+2103; 00B0 0063; MAP
+2107; 025B; MAP
+2109; 00B0 0066; MAP
+210B; 0068; MAP
+210C; 0068; MAP
+210D; 0068; MAP
+2110; 0069; MAP
+2111; 0069; MAP
+2112; 006C; MAP
+2115; 006E; MAP
+2116; 006E 006F; MAP
+2119; 0070; MAP
+211A; 0071; MAP
+211B; 0072; MAP
+211C; 0072; MAP
+211D; 0072; MAP
+2120; 0073 006D; MAP
+2121; 0074 0065 006C; MAP
+2122; 0074 006D; MAP
+2124; 007A; MAP
+2126; 03C9; MAP
+2128; 007A; MAP
+212A; 006B; MAP
+212B; 00E5; MAP
+212C; 0062; MAP
+212D; 0063; MAP
+2130; 0065; MAP
+2131; 0066; MAP
+2133; 006D; MAP
+213E; 03B3; MAP
+213F; 03C0; MAP
+2145; 0064; MAP
+2160; 2170; MAP
+2161; 2171; MAP
+2162; 2172; MAP
+2163; 2173; MAP
+2164; 2174; MAP
+2165; 2175; MAP
+2166; 2176; MAP
+2167; 2177; MAP
+2168; 2178; MAP
+2169; 2179; MAP
+216A; 217A; MAP
+216B; 217B; MAP
+216C; 217C; MAP
+216D; 217D; MAP
+216E; 217E; MAP
+216F; 217F; MAP
+24B6; 24D0; MAP
+24B7; 24D1; MAP
+24B8; 24D2; MAP
+24B9; 24D3; MAP
+24BA; 24D4; MAP
+24BB; 24D5; MAP
+24BC; 24D6; MAP
+24BD; 24D7; MAP
+24BE; 24D8; MAP
+24BF; 24D9; MAP
+24C0; 24DA; MAP
+24C1; 24DB; MAP
+24C2; 24DC; MAP
+24C3; 24DD; MAP
+24C4; 24DE; MAP
+24C5; 24DF; MAP
+24C6; 24E0; MAP
+24C7; 24E1; MAP
+24C8; 24E2; MAP
+24C9; 24E3; MAP
+24CA; 24E4; MAP
+24CB; 24E5; MAP
+24CC; 24E6; MAP
+24CD; 24E7; MAP
+24CE; 24E8; MAP
+24CF; 24E9; MAP
+3371; 0068 0070 0061; MAP
+3373; 0061 0075; MAP
+3375; 006F 0076; MAP
+3380; 0070 0061; MAP
+3381; 006E 0061; MAP
+3382; 03BC 0061; MAP
+3383; 006D 0061; MAP
+3384; 006B 0061; MAP
+3385; 006B 0062; MAP
+3386; 006D 0062; MAP
+3387; 0067 0062; MAP
+338A; 0070 0066; MAP
+338B; 006E 0066; MAP
+338C; 03BC 0066; MAP
+3390; 0068 007A; MAP
+3391; 006B 0068 007A; MAP
+3392; 006D 0068 007A; MAP
+3393; 0067 0068 007A; MAP
+3394; 0074 0068 007A; MAP
+33A9; 0070 0061; MAP
+33AA; 006B 0070 0061; MAP
+33AB; 006D 0070 0061; MAP
+33AC; 0067 0070 0061; MAP
+33B4; 0070 0076; MAP
+33B5; 006E 0076; MAP
+33B6; 03BC 0076; MAP
+33B7; 006D 0076; MAP
+33B8; 006B 0076; MAP
+33B9; 006D 0076; MAP
+33BA; 0070 0077; MAP
+33BB; 006E 0077; MAP
+33BC; 03BC 0077; MAP
+33BD; 006D 0077; MAP
+33BE; 006B 0077; MAP
+33BF; 006D 0077; MAP
+33C0; 006B 03C9; MAP
+33C1; 006D 03C9; MAP
+33C3; 0062 0071; MAP
+33C6; 0063 2215 006B 0067; MAP
+33C7; 0063 006F 002E; MAP
+33C8; 0064 0062; MAP
+33C9; 0067 0079; MAP
+33CB; 0068 0070; MAP
+33CD; 006B 006B; MAP
+33CE; 006B 006D; MAP
+33D7; 0070 0068; MAP
+33D9; 0070 0070 006D; MAP
+33DA; 0070 0072; MAP
+33DC; 0073 0076; MAP
+33DD; 0077 0062; MAP
+FB00; 0066 0066; MAP
+FB01; 0066 0069; MAP
+FB02; 0066 006C; MAP
+FB03; 0066 0066 0069; MAP
+FB04; 0066 0066 006C; MAP
+FB05; 0073 0074; MAP
+FB06; 0073 0074; MAP
+FB13; 0574 0576; MAP
+FB14; 0574 0565; MAP
+FB15; 0574 056B; MAP
+FB16; 057E 0576; MAP
+FB17; 0574 056D; MAP
+FF21; FF41; MAP
+FF22; FF42; MAP
+FF23; FF43; MAP
+FF24; FF44; MAP
+FF25; FF45; MAP
+FF26; FF46; MAP
+FF27; FF47; MAP
+FF28; FF48; MAP
+FF29; FF49; MAP
+FF2A; FF4A; MAP
+FF2B; FF4B; MAP
+FF2C; FF4C; MAP
+FF2D; FF4D; MAP
+FF2E; FF4E; MAP
+FF2F; FF4F; MAP
+FF30; FF50; MAP
+FF31; FF51; MAP
+FF32; FF52; MAP
+FF33; FF53; MAP
+FF34; FF54; MAP
+FF35; FF55; MAP
+FF36; FF56; MAP
+FF37; FF57; MAP
+FF38; FF58; MAP
+FF39; FF59; MAP
+FF3A; FF5A; MAP
+10400; 10428; MAP
+10401; 10429; MAP
+10402; 1042A; MAP
+10403; 1042B; MAP
+10404; 1042C; MAP
+10405; 1042D; MAP
+10406; 1042E; MAP
+10407; 1042F; MAP
+10408; 10430; MAP
+10409; 10431; MAP
+1040A; 10432; MAP
+1040B; 10433; MAP
+1040C; 10434; MAP
+1040D; 10435; MAP
+1040E; 10436; MAP
+1040F; 10437; MAP
+10410; 10438; MAP
+10411; 10439; MAP
+10412; 1043A; MAP
+10413; 1043B; MAP
+10414; 1043C; MAP
+10415; 1043D; MAP
+10416; 1043E; MAP
+10417; 1043F; MAP
+10418; 10440; MAP
+10419; 10441; MAP
+1041A; 10442; MAP
+1041B; 10443; MAP
+1041C; 10444; MAP
+1041D; 10445; MAP
+1041E; 10446; MAP
+1041F; 10447; MAP
+10420; 10448; MAP
+10421; 10449; MAP
+10422; 1044A; MAP
+10423; 1044B; MAP
+10424; 1044C; MAP
+10425; 1044D; MAP
+1D400; 0061; MAP
+1D401; 0062; MAP
+1D402; 0063; MAP
+1D403; 0064; MAP
+1D404; 0065; MAP
+1D405; 0066; MAP
+1D406; 0067; MAP
+1D407; 0068; MAP
+1D408; 0069; MAP
+1D409; 006A; MAP
+1D40A; 006B; MAP
+1D40B; 006C; MAP
+1D40C; 006D; MAP
+1D40D; 006E; MAP
+1D40E; 006F; MAP
+1D40F; 0070; MAP
+1D410; 0071; MAP
+1D411; 0072; MAP
+1D412; 0073; MAP
+1D413; 0074; MAP
+1D414; 0075; MAP
+1D415; 0076; MAP
+1D416; 0077; MAP
+1D417; 0078; MAP
+1D418; 0079; MAP
+1D419; 007A; MAP
+1D434; 0061; MAP
+1D435; 0062; MAP
+1D436; 0063; MAP
+1D437; 0064; MAP
+1D438; 0065; MAP
+1D439; 0066; MAP
+1D43A; 0067; MAP
+1D43B; 0068; MAP
+1D43C; 0069; MAP
+1D43D; 006A; MAP
+1D43E; 006B; MAP
+1D43F; 006C; MAP
+1D440; 006D; MAP
+1D441; 006E; MAP
+1D442; 006F; MAP
+1D443; 0070; MAP
+1D444; 0071; MAP
+1D445; 0072; MAP
+1D446; 0073; MAP
+1D447; 0074; MAP
+1D448; 0075; MAP
+1D449; 0076; MAP
+1D44A; 0077; MAP
+1D44B; 0078; MAP
+1D44C; 0079; MAP
+1D44D; 007A; MAP
+1D468; 0061; MAP
+1D469; 0062; MAP
+1D46A; 0063; MAP
+1D46B; 0064; MAP
+1D46C; 0065; MAP
+1D46D; 0066; MAP
+1D46E; 0067; MAP
+1D46F; 0068; MAP
+1D470; 0069; MAP
+1D471; 006A; MAP
+1D472; 006B; MAP
+1D473; 006C; MAP
+1D474; 006D; MAP
+1D475; 006E; MAP
+1D476; 006F; MAP
+1D477; 0070; MAP
+1D478; 0071; MAP
+1D479; 0072; MAP
+1D47A; 0073; MAP
+1D47B; 0074; MAP
+1D47C; 0075; MAP
+1D47D; 0076; MAP
+1D47E; 0077; MAP
+1D47F; 0078; MAP
+1D480; 0079; MAP
+1D481; 007A; MAP
+1D49C; 0061; MAP
+1D49E; 0063; MAP
+1D49F; 0064; MAP
+1D4A2; 0067; MAP
+1D4A5; 006A; MAP
+1D4A6; 006B; MAP
+1D4A9; 006E; MAP
+1D4AA; 006F; MAP
+1D4AB; 0070; MAP
+1D4AC; 0071; MAP
+1D4AE; 0073; MAP
+1D4AF; 0074; MAP
+1D4B0; 0075; MAP
+1D4B1; 0076; MAP
+1D4B2; 0077; MAP
+1D4B3; 0078; MAP
+1D4B4; 0079; MAP
+1D4B5; 007A; MAP
+1D4D0; 0061; MAP
+1D4D1; 0062; MAP
+1D4D2; 0063; MAP
+1D4D3; 0064; MAP
+1D4D4; 0065; MAP
+1D4D5; 0066; MAP
+1D4D6; 0067; MAP
+1D4D7; 0068; MAP
+1D4D8; 0069; MAP
+1D4D9; 006A; MAP
+1D4DA; 006B; MAP
+1D4DB; 006C; MAP
+1D4DC; 006D; MAP
+1D4DD; 006E; MAP
+1D4DE; 006F; MAP
+1D4DF; 0070; MAP
+1D4E0; 0071; MAP
+1D4E1; 0072; MAP
+1D4E2; 0073; MAP
+1D4E3; 0074; MAP
+1D4E4; 0075; MAP
+1D4E5; 0076; MAP
+1D4E6; 0077; MAP
+1D4E7; 0078; MAP
+1D4E8; 0079; MAP
+1D4E9; 007A; MAP
+1D504; 0061; MAP
+1D505; 0062; MAP
+1D507; 0064; MAP
+1D508; 0065; MAP
+1D509; 0066; MAP
+1D50A; 0067; MAP
+1D50D; 006A; MAP
+1D50E; 006B; MAP
+1D50F; 006C; MAP
+1D510; 006D; MAP
+1D511; 006E; MAP
+1D512; 006F; MAP
+1D513; 0070; MAP
+1D514; 0071; MAP
+1D516; 0073; MAP
+1D517; 0074; MAP
+1D518; 0075; MAP
+1D519; 0076; MAP
+1D51A; 0077; MAP
+1D51B; 0078; MAP
+1D51C; 0079; MAP
+1D538; 0061; MAP
+1D539; 0062; MAP
+1D53B; 0064; MAP
+1D53C; 0065; MAP
+1D53D; 0066; MAP
+1D53E; 0067; MAP
+1D540; 0069; MAP
+1D541; 006A; MAP
+1D542; 006B; MAP
+1D543; 006C; MAP
+1D544; 006D; MAP
+1D546; 006F; MAP
+1D54A; 0073; MAP
+1D54B; 0074; MAP
+1D54C; 0075; MAP
+1D54D; 0076; MAP
+1D54E; 0077; MAP
+1D54F; 0078; MAP
+1D550; 0079; MAP
+1D56C; 0061; MAP
+1D56D; 0062; MAP
+1D56E; 0063; MAP
+1D56F; 0064; MAP
+1D570; 0065; MAP
+1D571; 0066; MAP
+1D572; 0067; MAP
+1D573; 0068; MAP
+1D574; 0069; MAP
+1D575; 006A; MAP
+1D576; 006B; MAP
+1D577; 006C; MAP
+1D578; 006D; MAP
+1D579; 006E; MAP
+1D57A; 006F; MAP
+1D57B; 0070; MAP
+1D57C; 0071; MAP
+1D57D; 0072; MAP
+1D57E; 0073; MAP
+1D57F; 0074; MAP
+1D580; 0075; MAP
+1D581; 0076; MAP
+1D582; 0077; MAP
+1D583; 0078; MAP
+1D584; 0079; MAP
+1D585; 007A; MAP
+1D5A0; 0061; MAP
+1D5A1; 0062; MAP
+1D5A2; 0063; MAP
+1D5A3; 0064; MAP
+1D5A4; 0065; MAP
+1D5A5; 0066; MAP
+1D5A6; 0067; MAP
+1D5A7; 0068; MAP
+1D5A8; 0069; MAP
+1D5A9; 006A; MAP
+1D5AA; 006B; MAP
+1D5AB; 006C; MAP
+1D5AC; 006D; MAP
+1D5AD; 006E; MAP
+1D5AE; 006F; MAP
+1D5AF; 0070; MAP
+1D5B0; 0071; MAP
+1D5B1; 0072; MAP
+1D5B2; 0073; MAP
+1D5B3; 0074; MAP
+1D5B4; 0075; MAP
+1D5B5; 0076; MAP
+1D5B6; 0077; MAP
+1D5B7; 0078; MAP
+1D5B8; 0079; MAP
+1D5B9; 007A; MAP
+1D5D4; 0061; MAP
+1D5D5; 0062; MAP
+1D5D6; 0063; MAP
+1D5D7; 0064; MAP
+1D5D8; 0065; MAP
+1D5D9; 0066; MAP
+1D5DA; 0067; MAP
+1D5DB; 0068; MAP
+1D5DC; 0069; MAP
+1D5DD; 006A; MAP
+1D5DE; 006B; MAP
+1D5DF; 006C; MAP
+1D5E0; 006D; MAP
+1D5E1; 006E; MAP
+1D5E2; 006F; MAP
+1D5E3; 0070; MAP
+1D5E4; 0071; MAP
+1D5E5; 0072; MAP
+1D5E6; 0073; MAP
+1D5E7; 0074; MAP
+1D5E8; 0075; MAP
+1D5E9; 0076; MAP
+1D5EA; 0077; MAP
+1D5EB; 0078; MAP
+1D5EC; 0079; MAP
+1D5ED; 007A; MAP
+1D608; 0061; MAP
+1D609; 0062; MAP
+1D60A; 0063; MAP
+1D60B; 0064; MAP
+1D60C; 0065; MAP
+1D60D; 0066; MAP
+1D60E; 0067; MAP
+1D60F; 0068; MAP
+1D610; 0069; MAP
+1D611; 006A; MAP
+1D612; 006B; MAP
+1D613; 006C; MAP
+1D614; 006D; MAP
+1D615; 006E; MAP
+1D616; 006F; MAP
+1D617; 0070; MAP
+1D618; 0071; MAP
+1D619; 0072; MAP
+1D61A; 0073; MAP
+1D61B; 0074; MAP
+1D61C; 0075; MAP
+1D61D; 0076; MAP
+1D61E; 0077; MAP
+1D61F; 0078; MAP
+1D620; 0079; MAP
+1D621; 007A; MAP
+1D63C; 0061; MAP
+1D63D; 0062; MAP
+1D63E; 0063; MAP
+1D63F; 0064; MAP
+1D640; 0065; MAP
+1D641; 0066; MAP
+1D642; 0067; MAP
+1D643; 0068; MAP
+1D644; 0069; MAP
+1D645; 006A; MAP
+1D646; 006B; MAP
+1D647; 006C; MAP
+1D648; 006D; MAP
+1D649; 006E; MAP
+1D64A; 006F; MAP
+1D64B; 0070; MAP
+1D64C; 0071; MAP
+1D64D; 0072; MAP
+1D64E; 0073; MAP
+1D64F; 0074; MAP
+1D650; 0075; MAP
+1D651; 0076; MAP
+1D652; 0077; MAP
+1D653; 0078; MAP
+1D654; 0079; MAP
+1D655; 007A; MAP
+1D670; 0061; MAP
+1D671; 0062; MAP
+1D672; 0063; MAP
+1D673; 0064; MAP
+1D674; 0065; MAP
+1D675; 0066; MAP
+1D676; 0067; MAP
+1D677; 0068; MAP
+1D678; 0069; MAP
+1D679; 006A; MAP
+1D67A; 006B; MAP
+1D67B; 006C; MAP
+1D67C; 006D; MAP
+1D67D; 006E; MAP
+1D67E; 006F; MAP
+1D67F; 0070; MAP
+1D680; 0071; MAP
+1D681; 0072; MAP
+1D682; 0073; MAP
+1D683; 0074; MAP
+1D684; 0075; MAP
+1D685; 0076; MAP
+1D686; 0077; MAP
+1D687; 0078; MAP
+1D688; 0079; MAP
+1D689; 007A; MAP
+1D6A8; 03B1; MAP
+1D6A9; 03B2; MAP
+1D6AA; 03B3; MAP
+1D6AB; 03B4; MAP
+1D6AC; 03B5; MAP
+1D6AD; 03B6; MAP
+1D6AE; 03B7; MAP
+1D6AF; 03B8; MAP
+1D6B0; 03B9; MAP
+1D6B1; 03BA; MAP
+1D6B2; 03BB; MAP
+1D6B3; 03BC; MAP
+1D6B4; 03BD; MAP
+1D6B5; 03BE; MAP
+1D6B6; 03BF; MAP
+1D6B7; 03C0; MAP
+1D6B8; 03C1; MAP
+1D6B9; 03B8; MAP
+1D6BA; 03C3; MAP
+1D6BB; 03C4; MAP
+1D6BC; 03C5; MAP
+1D6BD; 03C6; MAP
+1D6BE; 03C7; MAP
+1D6BF; 03C8; MAP
+1D6C0; 03C9; MAP
+1D6D3; 03C3; MAP
+1D6E2; 03B1; MAP
+1D6E3; 03B2; MAP
+1D6E4; 03B3; MAP
+1D6E5; 03B4; MAP
+1D6E6; 03B5; MAP
+1D6E7; 03B6; MAP
+1D6E8; 03B7; MAP
+1D6E9; 03B8; MAP
+1D6EA; 03B9; MAP
+1D6EB; 03BA; MAP
+1D6EC; 03BB; MAP
+1D6ED; 03BC; MAP
+1D6EE; 03BD; MAP
+1D6EF; 03BE; MAP
+1D6F0; 03BF; MAP
+1D6F1; 03C0; MAP
+1D6F2; 03C1; MAP
+1D6F3; 03B8; MAP
+1D6F4; 03C3; MAP
+1D6F5; 03C4; MAP
+1D6F6; 03C5; MAP
+1D6F7; 03C6; MAP
+1D6F8; 03C7; MAP
+1D6F9; 03C8; MAP
+1D6FA; 03C9; MAP
+1D70D; 03C3; MAP
+1D71C; 03B1; MAP
+1D71D; 03B2; MAP
+1D71E; 03B3; MAP
+1D71F; 03B4; MAP
+1D720; 03B5; MAP
+1D721; 03B6; MAP
+1D722; 03B7; MAP
+1D723; 03B8; MAP
+1D724; 03B9; MAP
+1D725; 03BA; MAP
+1D726; 03BB; MAP
+1D727; 03BC; MAP
+1D728; 03BD; MAP
+1D729; 03BE; MAP
+1D72A; 03BF; MAP
+1D72B; 03C0; MAP
+1D72C; 03C1; MAP
+1D72D; 03B8; MAP
+1D72E; 03C3; MAP
+1D72F; 03C4; MAP
+1D730; 03C5; MAP
+1D731; 03C6; MAP
+1D732; 03C7; MAP
+1D733; 03C8; MAP
+1D734; 03C9; MAP
+1D747; 03C3; MAP
+1D756; 03B1; MAP
+1D757; 03B2; MAP
+1D758; 03B3; MAP
+1D759; 03B4; MAP
+1D75A; 03B5; MAP
+1D75B; 03B6; MAP
+1D75C; 03B7; MAP
+1D75D; 03B8; MAP
+1D75E; 03B9; MAP
+1D75F; 03BA; MAP
+1D760; 03BB; MAP
+1D761; 03BC; MAP
+1D762; 03BD; MAP
+1D763; 03BE; MAP
+1D764; 03BF; MAP
+1D765; 03C0; MAP
+1D766; 03C1; MAP
+1D767; 03B8; MAP
+1D768; 03C3; MAP
+1D769; 03C4; MAP
+1D76A; 03C5; MAP
+1D76B; 03C6; MAP
+1D76C; 03C7; MAP
+1D76D; 03C8; MAP
+1D76E; 03C9; MAP
+1D781; 03C3; MAP
+1D790; 03B1; MAP
+1D791; 03B2; MAP
+1D792; 03B3; MAP
+1D793; 03B4; MAP
+1D794; 03B5; MAP
+1D795; 03B6; MAP
+1D796; 03B7; MAP
+1D797; 03B8; MAP
+1D798; 03B9; MAP
+1D799; 03BA; MAP
+1D79A; 03BB; MAP
+1D79B; 03BC; MAP
+1D79C; 03BD; MAP
+1D79D; 03BE; MAP
+1D79E; 03BF; MAP
+1D79F; 03C0; MAP
+1D7A0; 03C1; MAP
+1D7A1; 03B8; MAP
+1D7A2; 03C3; MAP
+1D7A3; 03C4; MAP
+1D7A4; 03C5; MAP
+1D7A5; 03C6; MAP
+1D7A6; 03C7; MAP
+1D7A7; 03C8; MAP
+1D7A8; 03C9; MAP
+1D7BB; 03C3; MAP
+
+# Total code points 1371
+
+# code points from Table C.1.2
+
+00A0; ; PROHIBITED
+1680; ; PROHIBITED
+2000; ; PROHIBITED
+2001; ; PROHIBITED
+2002; ; PROHIBITED
+2003; ; PROHIBITED
+2004; ; PROHIBITED
+2005; ; PROHIBITED
+2006; ; PROHIBITED
+2007; ; PROHIBITED
+2008; ; PROHIBITED
+2009; ; PROHIBITED
+200A; ; PROHIBITED
+200B; ; PROHIBITED
+202F; ; PROHIBITED
+205F; ; PROHIBITED
+3000; ; PROHIBITED
+
+# Total code points 17
+
+# code points from Table C.2.2
+
+0080..009F; ; PROHIBITED
+06DD; ; PROHIBITED
+070F; ; PROHIBITED
+180E; ; PROHIBITED
+200C; ; PROHIBITED
+200D; ; PROHIBITED
+2028; ; PROHIBITED
+2029; ; PROHIBITED
+2060; ; PROHIBITED
+2061; ; PROHIBITED
+2062; ; PROHIBITED
+2063; ; PROHIBITED
+206A..206F; ; PROHIBITED
+FEFF; ; PROHIBITED
+FFF9..FFFC; ; PROHIBITED
+1D173..1D17A; ; PROHIBITED
+
+# Total code points 30
+
+# code points from Table C.3
+
+E000..F8FF; ; PROHIBITED
+F0000..FFFFD; ; PROHIBITED
+100000..10FFFD; ; PROHIBITED
+
+# Total code points 2051
+
+# code points from Table C.4
+
+FDD0..FDEF; ; PROHIBITED
+FFFE..FFFF; ; PROHIBITED
+1FFFE..1FFFF; ; PROHIBITED
+2FFFE..2FFFF; ; PROHIBITED
+3FFFE..3FFFF; ; PROHIBITED
+4FFFE..4FFFF; ; PROHIBITED
+5FFFE..5FFFF; ; PROHIBITED
+6FFFE..6FFFF; ; PROHIBITED
+7FFFE..7FFFF; ; PROHIBITED
+8FFFE..8FFFF; ; PROHIBITED
+9FFFE..9FFFF; ; PROHIBITED
+AFFFE..AFFFF; ; PROHIBITED
+BFFFE..BFFFF; ; PROHIBITED
+CFFFE..CFFFF; ; PROHIBITED
+DFFFE..DFFFF; ; PROHIBITED
+EFFFE..EFFFF; ; PROHIBITED
+FFFFE..FFFFF; ; PROHIBITED
+10FFFE..10FFFF; ; PROHIBITED
+
+# Total code points 18
+
+# code points from Table C.5
+
+D800..DFFF; ; PROHIBITED
+
+# Total code points 0
+
+# code points from Table C.6
+
+FFF9; ; PROHIBITED
+FFFA; ; PROHIBITED
+FFFB; ; PROHIBITED
+FFFC; ; PROHIBITED
+FFFD; ; PROHIBITED
+
+# Total code points 5
+
+# code points from Table C.7
+
+2FF0..2FFB; ; PROHIBITED
+
+# Total code points 1
+
+# code points from Table C.8
+
+0340; ; PROHIBITED
+0341; ; PROHIBITED
+200E; ; PROHIBITED
+200F; ; PROHIBITED
+202A; ; PROHIBITED
+202B; ; PROHIBITED
+202C; ; PROHIBITED
+202D; ; PROHIBITED
+202E; ; PROHIBITED
+206A; ; PROHIBITED
+206B; ; PROHIBITED
+206C; ; PROHIBITED
+206D; ; PROHIBITED
+206E; ; PROHIBITED
+206F; ; PROHIBITED
+
+# Total code points 15
+
+# code points from Table C.9
+
+E0001; ; PROHIBITED
+E0020..E007F; ; PROHIBITED
+
+# Total code points 82
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/pkgdata.inc.in b/Build/source/libs/icu/icu-xetex/test/testdata/pkgdata.inc.in
new file mode 100644
index 00000000000..40cc60fcf23
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/pkgdata.inc.in
@@ -0,0 +1,20 @@
+#******************************************************************************
+#
+# Copyright (C) 2000-2006, International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+#******************************************************************************
+# This Makefile is used to build the ICU's data.
+# It is included with the -O option to pkgdata.
+
+top_srcdir=@top_srcdir@
+srcdir=@srcdir@
+top_builddir=../..
+
+include $(top_builddir)/icudefs.mk
+
+##### Add the following to source/config/Makefile.in
+
+GENCCODE=$(BINDIR)/genccode
+ICUPKG=$(BINDIR)/icupkg
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/ra.txt b/Build/source/libs/icu/icu-xetex/test/testdata/ra.txt
new file mode 100644
index 00000000000..a94e0b3c21d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/ra.txt
@@ -0,0 +1,125 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 2003, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+/**
+ * These are top level comments for the bundle. Tag name: ra
+ * @translate yes
+ * @note Comments for tag named ra
+ */
+ra{
+ /**
+ * Top level comments for the string.Tag name: test1
+ * @translate yes
+ * @note {0} represents the position of OSNAME and {1} represents the position of job name
+ * e.g: The OS/400 job named SYSLOG
+ */
+ test1{"The {0} job named {1}"}
+ /**
+ * Tag name: test2
+ * @note This resource is for test2
+ * @translate yes
+ */
+ test2{"some translatable stuff"}
+
+ /**
+ * Top level comments for TestTable. Tag name: TestTable
+ * @translate yes
+ * @note This resource is for TestTable
+ */
+ TestTable{
+ /**
+ * Tag name: test3
+ * @translate yes
+ * @note This resource is for test3
+ */
+ test3{"jasldjfa"}
+ /**
+ * Tag name: test4
+ * @translate yes
+ * @note This resource is for test4
+ */
+ test4{"asdfasdf"}
+ /**
+ * Tag name: test5
+ * @translate yes
+ * @note This resource is for test5
+ */
+ test5:int{1}
+ /**
+ * Tag name: test6
+ * @translate yes
+ * @note This resource is for test6
+ */
+ test6:bin{"0102"}
+ }
+ /**
+ * Top level comments for Tag name: TestArray
+ * @translate yes
+ * @note This resource is for Tag name: Array
+ */
+ TestArray{
+ /**
+ * comments for un-named string
+ * @translate yes
+ * @note This resource is un-named string
+ */
+ :string{"abcde"},
+ /**
+ * comments for un-named int
+ * @translate yes
+ * @note This resource is un-named int
+ */
+ :int{1},
+ /**
+ * comments for un-named binary
+ * @translate yes
+ * @note This resource is for un-named binary
+ */
+ :bin{"12312312"}
+ }
+
+ /**
+ * comments for TestInclude
+ * @translate yes
+ * @note This resource is for TestInclude
+ */
+ TestInclude:include{"translit_rules.txt"}
+
+ /**
+ * comments for TestImport
+ * @translate yes
+ * @note This resource is for TestImport
+ */
+ TestImpport:import{"importtest.bin"}
+
+ /**
+ * comments for TestIntVector
+ * @translate yes
+ * @note This resource is for TestIntVector
+ */
+ TestIntVector{
+ /**
+ * comments for element 1
+ * @translate yes
+ * @note This resource is for element 1
+ */
+ 1,
+ /**
+ * comments for element 2
+ * @translate yes
+ * @note This resource is for element 2
+ */
+ 2,
+ /**
+ * comments for element 3
+ * @translate yes
+ * @note This resource is for element 3
+ */
+ 3
+ }
+
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/ra.xlf b/Build/source/libs/icu/icu-xetex/test/testdata/ra.xlf
new file mode 100644
index 00000000000..86a56080a31
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/ra.xlf
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xliff SYSTEM "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd">
+<xliff version = "1.0">
+ <file xml:space = "preserve" source-language = "en" datatype = "ICUResourceBundle" original = "ra.txt" tool = "genrb" date = "2006-01-17T20:58:58Z">
+ <header></header>
+ <body>
+ <group restype = "table" xml:space = "preserve" id = "ra" >
+ <!--These are top level comments for the bundle. Tag name: ra-->
+ <note> Comments for tag named ra</note>
+ <group restype = "array" xml:space = "preserve" id = "TestArray" resname="TestArray">
+ <!--Top level comments for Tag name: TestArray-->
+ <note> This resource is for Tag name: Array</note>
+ <trans-unit xml:space = "preserve" id = "TestArray_0" translate="yes">
+ <!--comments for un-named string-->
+ <source >abcde</source>
+ <note> This resource is un-named string</note>
+ </trans-unit>
+ <trans-unit restype = "int" xml:space = "preserve" id = "TestArray_1" translate="yes">
+ <!--comments for un-named int-->
+ <source>1</source>
+ <note> This resource is un-named int</note>
+ </trans-unit>
+ <bin-unit restype = "bin" id = "TestArray_2" mime-type = "application" translate="yes">
+ <!--comments for un-named binary-->
+ <bin-source>
+ <internal-file form = "application" crc = "-2140397846">12312312</internal-file>
+ </bin-source>
+ <note> This resource is for un-named binary</note>
+ </bin-unit>
+ </group>
+ <bin-unit restype = "import" id = "TestImpport" mime-type = "application" resname = "TestImpport" translate="yes">
+ <!--comments for TestImport-->
+ <bin-source>
+ <external-file href = "importtest.bin"/>
+ </bin-source>
+ <note> This resource is for TestImport</note>
+ </bin-unit>
+ <trans-unit xml:space = "preserve" id = "TestInclude" resname = "TestInclude" translate="yes">
+ <!--comments for TestInclude-->
+ <source >#--------------------------------------------------------------------
+# Copyright (c) 1999-2004, International Business Machines
+# Corporation and others. All Rights Reserved.
+#--------------------------------------------------------------------
+
+# InterIndic-Bengali
+#:: NFD (NFC) ;
+\uE001&gt;\u0981; # SIGN CANDRABINDU
+\uE002&gt;\u0982; # SIGN ANUSVARA
+\uE003&gt;\u0983; # SIGN VISARGA
+\uE005&gt;\u0985; # LETTER A
+\uE006&gt;\u0986; # LETTER AA
+\uE007&gt;\u0987; # LETTER I
+\uE008&gt;\u0988; # LETTER II
+\uE009&gt;\u0989; # LETTER U
+\uE00A&gt;\u098A; # LETTER UU
+\uE00B&gt;\u098B; # LETTER VOCALIC R
+\uE00C&gt;\u098C; # LETTER VOCALIC L
+\uE00D&gt;\u098F; # FALLBACK
+\uE00E&gt;\u098F; # FALLBACK
+\uE00F&gt;\u098F; # LETTER E
+\uE010&gt;\u0990; # LETTER AI
+\uE011&gt;\u0993; # FALLBACK
+\uE012&gt;\u0993; # FALLBACK
+\uE013&gt;\u0993; # LETTER O
+\uE014&gt;\u0994; # LETTER AU
+\uE015&gt;\u0995; # LETTER KA
+\uE016&gt;\u0996; # LETTER KHA
+\uE017&gt;\u0997; # LETTER GA
+\uE018&gt;\u0998; # LETTER GHA
+\uE019&gt;\u0999; # LETTER NGA
+\uE01A&gt;\u099A; # LETTER CA
+\uE01B&gt;\u099B; # LETTER CHA
+\uE01C&gt;\u099C; # LETTER JA
+\uE01D&gt;\u099D; # LETTER JHA
+\uE01E&gt;\u099E; # LETTER NYA
+\uE01F&gt;\u099F; # LETTER TTA
+\uE020&gt;\u09A0; # LETTER TTHA
+\uE021&gt;\u09A1; # LETTER DDA
+\uE022&gt;\u09A2; # LETTER DDHA
+\uE023&gt;\u09A3; # LETTER NNA
+\uE024&gt;\u09A4; # LETTER TA
+\uE025&gt;\u09A5; # LETTER THA
+\uE026&gt;\u09A6; # LETTER DA
+\uE027&gt;\u09A7; # LETTER DHA
+\uE028&gt;\u09A8; # LETTER NA
+\uE029&gt;\u09A8\u09BC; # REMAP (indicExceptions.txt): \u09a9&gt;\u09a8 = LETTER NNNA&gt;LETTER NA
+\uE02A&gt;\u09AA; # LETTER PA
+\uE02B&gt;\u09AB; # LETTER PHA
+\uE02C&gt;\u09AC; # LETTER BA
+\uE02D&gt;\u09AD; # LETTER BHA
+\uE02E&gt;\u09AE; # LETTER MA
+\uE02F&gt;\u09AF; # LETTER YA
+\uE030&gt;\u09B0; # LETTER RA
+\uE031&gt;\u09B0\u09BC; # FALLBACK to RA
+\uE032&gt;\u09B2; # LETTER LA
+\uE033&gt;\u09B2; # REMAP (indicExceptions.txt): \u09b3&gt;\u09b2 = LETTER LLA&gt;LETTER LA
+\uE034&gt;\u09B2; # REMAP (indicExceptions.txt): \u09b4&gt;\u09b2 = LETTER LLLA&gt;LETTER LA
+\uE035&gt;\u09AC; # REMAP (indicExceptions.txt): \u09b5&gt;\u09ac = LETTER VA&gt;LETTER BA
+\uE036&gt;\u09B6; # LETTER SHA
+\uE037&gt;\u09B7; # LETTER SSA
+\uE038&gt;\u09B8; # LETTER SA
+\uE039&gt;\u09B9; # LETTER HA
+\uE03C&gt;\u09BC; # SIGN NUKTA
+\uE03D&gt;; # FALLBACK BLOW AWAY AVAGRAHA
+\uE03E&gt;\u09BE; # VOWEL SIGN AA
+\uE03F&gt;\u09BF; # VOWEL SIGN I
+\uE040&gt;\u09C0; # VOWEL SIGN II
+\uE041&gt;\u09C1; # VOWEL SIGN U
+\uE042&gt;\u09C2; # VOWEL SIGN UU
+\uE043&gt;\u09C3; # VOWEL SIGN VOCALIC R
+\uE044&gt;\u09C4; # VOWEL SIGN VOCALIC RR
+\uE045&gt;\u09C7; # REMAP (indicExceptions.txt): \u09c5&gt;\u09c7 = VOWEL SIGN CANDRA E&gt;VOWEL SIGN E
+\uE046&gt;\u09C7; # FALLBACK
+\uE047&gt;\u09C7; # VOWEL SIGN E
+\uE048&gt;\u09C8; # VOWEL SIGN AI
+\uE049&gt;\u09C7\u09BE; # REMAP (indicExceptions.txt): \u09c9&gt;\u09cb = VOWEL SIGN CANDRA O&gt;VOWEL SIGN O
+\uE04A&gt;\u09C7\u09BE; # FALLBACK
+\uE04B&gt;\u09C7\u09BE; # VOWEL SIGN O
+\uE04C&gt;\u09C7\u09D7; # VOWEL SIGN AU
+\uE04D&gt;\u09CD; # SIGN VIRAMA
+\uE050&gt;\u0993\u0982; # InterIndic-Bengali: OM
+\ue051&gt;;
+\ue052&gt;;
+\ue053&gt;;
+\ue054&gt;;
+\uE055&gt;; # LENGTH MARK
+\uE056&gt;\u09C8; # REMAP (indicExceptions.txt): \u09d6&gt;\u09c8 = AI LENGTH MARK&gt;VOWEL SIGN AI
+\uE057&gt;\u09D7; # AU LENGTH MARK
+\uE058&gt;\u0995\u09BC; # FALLBACK
+\uE059&gt;\u0996\u09BC; # REMAP (indicExceptions.txt): \u09d9&gt;\u0996 = LETTER KHHA&gt;LETTER KHA
+\uE05A&gt;\u0997\u09BC; # REMAP (indicExceptions.txt): \u09da&gt;\u0997 = LETTER GHHA&gt;LETTER GA
+\uE05B&gt;\u099C\u09BC; # REMAP (indicExceptions.txt): \u09db&gt;\u099c = LETTER ZA&gt;LETTER JA
+\uE05C&gt;\u09A1\u09BC; # FALLBACK
+\uE05D&gt;\u09A2\u09BC; # LETTER RHA
+\uE05E&gt;\u09AB\u09BC; # REMAP (indicExceptions.txt): \u09de&gt;\u09ab = LETTER FA&gt;LETTER PHA
+\uE05F&gt;\u09AF\u09BC; # LETTER YYA
+\uE060&gt;\u09E0; # LETTER VOCALIC RR
+\uE061&gt;\u09E1; # LETTER VOCALIC LL
+\uE062&gt;\u09E2; # VOWEL SIGN VOCALIC L
+\uE063&gt;\u09E3; # VOWEL SIGN VOCALIC LL
+\uE064&gt;\u0964; # DANDA
+\uE065&gt;\u0965; # DOUBLE DANDA
+\uE066&gt;\u09E6; # DIGIT ZERO
+\uE067&gt;\u09E7; # DIGIT ONE
+\uE068&gt;\u09E8; # DIGIT TWO
+\uE069&gt;\u09E9; # DIGIT THREE
+\uE06A&gt;\u09EA; # DIGIT FOUR
+\uE06B&gt;\u09EB; # DIGIT FIVE
+\uE06C&gt;\u09EC; # DIGIT SIX
+\uE06D&gt;\u09ED; # DIGIT SEVEN
+\uE06E&gt;\u09EE; # DIGIT EIGHT
+\uE06F&gt;\u09EF; # DIGIT NINE
+\ue070&gt;; # ABBREVIATION SIGN
+\ue071&gt;\u09F0; # LETTER RA WITH MIDDLE DIAGONAL
+\ue072&gt;\u09F1; # LETTER RA WITH LOWER DIAGONAL
+\ue073&gt;\u09F2; # RUPEE MARK
+\ue074&gt;\u09F3; # RUPEE SIGN
+\ue075&gt;\u09F4; # CURRENCY NUMERATOR ONE
+\ue076&gt;\u09F5; # CURRENCY NUMERATOR TWO
+\ue077&gt;\u09F6; # CURRENCY NUMERATOR THREE
+\ue078&gt;\u09F7; # CURRENCY NUMERATOR FOUR
+\ue079&gt;\u09F8; # CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR
+\ue07A&gt;\u09F9; # CURRENCY DENOMINATOR SIXTEEN
+\ue07B&gt;\u09FA; # ISSHAR
+\uE07C&gt;; # TIPPI
+\uE07D&gt;; # ADDAK
+\uE07E&gt;; # IRI
+\uE07F&gt;; # URA
+\uE080&gt;; # EK ONKAR
+
+0 &gt; \u09E6; # FALLBACK FOR TAMIL
+1 &gt; \u09E7;
+
+
+
+
+
+
+
+
+
+
+
+# :: NFC (NFD) ;
+# eof
+</source>
+ <note> This resource is for TestInclude</note>
+ </trans-unit>
+ <group restype = "array" xml:space = "preserve" id = "TestIntVector" resname="TestIntVector">
+ <!--comments for TestIntVector-->
+ <note> This resource is for TestIntVector</note>
+ <trans-unit xml:space = "preserve" id = "TestIntVector_0" translate="yes">
+ <!--comments for element 1-->
+ <source >1</source>
+ <note> This resource is for element 1</note>
+ </trans-unit>
+ <trans-unit xml:space = "preserve" id = "TestIntVector_1" translate="yes">
+ <!--comments for element 2-->
+ <source >2</source>
+ <note> This resource is for element 2</note>
+ </trans-unit>
+ <trans-unit xml:space = "preserve" id = "TestIntVector_2" translate="yes">
+ <!--comments for element 3-->
+ <source >3</source>
+ <note> This resource is for element 3</note>
+ </trans-unit>
+ </group>
+ <group restype = "table" xml:space = "preserve" id = "TestTable" resname="TestTable" >
+ <!--Top level comments for TestTable. Tag name: TestTable-->
+ <note> This resource is for TestTable</note>
+ <trans-unit xml:space = "preserve" id = "TestTable_test3" resname = "test3" translate="yes">
+ <!--Tag name: test3-->
+ <source >jasldjfa</source>
+ <note> This resource is for test3</note>
+ </trans-unit>
+ <trans-unit xml:space = "preserve" id = "TestTable_test4" resname = "test4" translate="yes">
+ <!--Tag name: test4-->
+ <source >asdfasdf</source>
+ <note> This resource is for test4</note>
+ </trans-unit>
+ <trans-unit restype = "int" xml:space = "preserve" id = "TestTable_test5" resname = "test5" translate="yes">
+ <!--Tag name: test5-->
+ <source>1</source>
+ <note> This resource is for test5</note>
+ </trans-unit>
+ <bin-unit restype = "bin" id = "TestTable_test6" mime-type = "application" resname = "test6" translate="yes">
+ <!--Tag name: test6-->
+ <bin-source>
+ <internal-file form = "application" crc = "480784534">0102</internal-file>
+ </bin-source>
+ <note> This resource is for test6</note>
+ </bin-unit>
+ </group>
+ <trans-unit xml:space = "preserve" id = "test1" resname = "test1" translate="yes">
+ <!--Top level comments for the string.Tag name: test1-->
+ <source >The {0} job named {1}</source>
+ <note> {0} represents the position of OSNAME and {1} represents the position of job name e.g: The OS/400 job named SYSLOG</note>
+ </trans-unit>
+ <trans-unit xml:space = "preserve" id = "test2" resname = "test2" translate="yes">
+ <!--Tag name: test2-->
+ <source >some translatable stuff</source>
+ <note> This resource is for test2</note>
+ </trans-unit>
+ </group>
+ </body>
+ </file>
+</xliff>
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/rbbitst.txt b/Build/source/libs/icu/icu-xetex/test/testdata/rbbitst.txt
new file mode 100644
index 00000000000..9cb3147341c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/rbbitst.txt
@@ -0,0 +1,562 @@
+# Copyright (c) 2001-2007 International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+# RBBI Test Data
+#
+# File: rbbitst.txt
+#
+# The format of this file looks vaguely like some kind of xml-ish markup,
+# but it is NOT. The syntax is this..
+#
+# <word> any following data is for word break testing
+# <sent> any following data is for sentence break testing
+# <line> any following data is for line break testing
+# <char> any following data is for char break testing
+# <locale local_name> Switch to the named locale at the next occurence of <word>, <sent>, etc.
+# <data> ... </data> test data. May span multiple lines.
+# <> Break position, status == 0
+# • Break position, status == 0 (Bullet, \u2022)
+# <nnn> Break position, status == nnn
+# \ Escape. Normal ICU unescape applied.
+# \ at end of line -> Line Continuation. Remove both the backslash and the new line
+#
+#
+
+
+# Temp debugging tests
+<line>
+# to test for bug #4097920
+<data>•dog,cat,mouse •(one)•(two)\n<100></data>
+
+########################################################################################
+#
+#
+# G r a p h e m e C l u s t e r T e s t s
+#
+#
+##########################################################################################
+<char>
+
+<data>•a•b•c• •,•\u0666•</data> # Quick Test
+<data>•\r•\r•\r\n•\r\n•\n•\r•</data> # don't break CR/LF
+
+# Always break after controls. Combining chars don't combine with them.
+<data>•\u0003•\N{COMBINING GRAVE ACCENT}•\r•\N{COMBINING GRAVE ACCENT}•</data>
+<data>•\u0085•\N{COMBINING MACRON}•A\N{COMBINING MACRON}•</data>
+
+# Surrogates
+<data>•\U00011000•\U00010020•\U00010000\N{COMBINING MACRON}•</data>
+<data>•\ud800\udc00•\udbff\udfff•a•</data>
+
+# Extend (Combining chars) combine.
+<data>•A\N{COMBINING GRAVE ACCENT}•B•</data>
+<data>•\N{GREEK SMALL LETTER MU}\N{COMBINING LOW LINE}\N{COMBINING HORN}•</data>
+<data>•a\u0301•b\u0302•c\u0303•d\u0304•e\u0305•f\u0306•g\u0307•h\u0308•i\u0309•</data>
+
+<data>•a\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304•</data>
+
+# Don't break Hangul Syllables
+# L : \u1100
+# V : \u1161
+# T : \u11A8
+# LV : \uAC00
+# LVT : \uAC01
+
+<data>•\u1100\u1161\u11a8•\u1100\u1161\u11a8•</data> #LVT
+<data>•\u1100\u1161•\u1100\u1161•</data>
+<data>•\u1100\u1161\u11a8•\u1161•\u1100•\u11a8•\u1161\u1161\u1161\u11a8•</data>
+<data>•\u1100\u1100\uac01•\u1100\uac01•\u1100\uac01\u0301•\uac01•</data>
+<data>•\u1100\u0301•\u1161\u11a8\u0301•\u11a8•</data>
+
+
+
+# Hindi combining chars. (An old test)
+<data>•भ••ा•\u0930•\u0924• •\u0938\u0941\u0902•\u0926•\u0930•
+•\u0939•\u094c•\u0964•</data>
+<data>•\u0916\u0947•\u0938\u0941\u0902•\u0926•\u0930•\u0939•\u094c•\u0964•</data>
+
+
+# Bug 1587. Tamil. \u0baa\u0bc1 should be two separate characters, even though
+# Hyangmi would perfer that it be one.
+<data>•\u0baa•\u0bc1•\u0baa•\u0bc1•</data>
+
+# Regression test for bug 1889
+<data>•\u0f40\u0f7d•\u0000•\u0f7e•</data>
+
+
+# 0xffff is a legal character, and should not stop the break iterator early.
+# (Requires special casing in implementation, which is why it gets a test.)
+<data>•\uffff•\uffff• •a•</data>
+
+# Treat Japanese Half Width voicing marks as combining
+<data>•A\uff9e•B\uff9f\uff9e\uff9f•C•</data>
+
+########################################################################################
+#
+#
+# E x t e n d e d G r a p h e m e C l u s t e r T e s t s
+#
+#
+##########################################################################################
+#<xgc>
+
+# Plain Vanilla grapheme clusters
+#<data>•a•b•c•</data>
+#<data>•a\u0301\u0302• •b\u0303\u0304•</data>
+
+# Assorted Hindi combining marks
+#<data>•\u0904\u0903• •\u0937\u093E• •\u0904\u093F• •\u0937\u0940• •\u0937\u0949• •\u0937\u094A• •\u0937\u094B• •\u0937\u094C•</data>
+
+# Thai Clusters
+# $Prepend $Extend* $PrependBase $Extend*;
+#
+#<data>•\u0e40\u0e01•\u0e44\u0301\u0e23\u0302\u0303•\u0e40•\u0e40\u0e02•\u0e02• •</data>
+
+
+########################################################################################
+#
+#
+# W o r d B o u n d a r y T e s t s
+#
+#
+##########################################################################################
+
+<word>
+#
+# Quick sanity test
+#
+<data>•hello<200> •there<200> •goodbye<200></data>
+<data>•hello<200> •12345<100> •,•</data>
+
+
+#
+# Test data originally in RBBIAPITest::TestFirstNextFollowing() and TestLastPreviousPreceding()
+#
+
+<word>
+<data>•This<200> •is<200> •a<200> •word<200> •break<200>.• • •Isn't<200> •it<200>?• •2.25<100></data>
+
+
+
+#
+# Data originally from TestDefaultRuleBasedWordIteration()
+#
+<data>•Write<200> •wordrules<200>.• •123.456<100> •alpha\u00adbeta\u00adgamma<200> •\u092f\u0939<200> •</data>
+<data>• •\u0939\u093f\u0928\u094d\u200d\u0926\u0940<200> •\u0939\u0948<200> •\u0905\u093e\u092a<200> •\u0938\u093f\u0916\u094b\u0917\u0947<200>?•</data>
+
+#Hindi Numbers
+<data>• •\u0968\u0966.\u0969\u096f<100> •\u0967\u0966\u0966.\u0966\u0966<100> •\N{RUPEE SIGN}•\u0967,\u0967\u0966\u0966.\u0966\u0966<100> • •\u0905\u092e\u091c<200>\n•</data>
+
+<data>•\u0938\u094d\u200d\u0935\u0924\u0902deadTA\u0930<200>\r•It's<200> •$•30.10<100> •12,34<100>¢•£•¤•¥•alpha\u05f3beta\u05f4gamma<200> •</data>
+
+<data>•Badges<200>?• •BADGES<200>!•?•!• •We<200> •don't<200> •need<200> •no<200> •STINKING<200> •BADGES<200>!•!•1000,233,456.000<100> •1,23.322<100>%•123.1222<100>$•123,000.20<100> •179.01<100>%•X<200> •Now<200>\r•is<200>\n•the<200>\r\n•time<200> •</data>
+
+#Hangul
+<data>•\uc5f0\ud569<200> •\uc7a5\ub85c\uad50\ud68c<200> •\u1109\u1161\u11bc\u1112\u1161\u11bc<200> •\u1112\u1161\u11ab\u110b\u1175\u11ab<200> •Hello<200>,• •how<200> •are<200> •you<200> •</data>
+
+
+# Words containing non-BMP letters
+<data>•abc\U00010300<200> •abc\N{DESERET SMALL LETTER ENG}<200> •abc\N{MATHEMATICAL BOLD SMALL Z}<200> •abc\N{MATHEMATICAL SANS-SERIF BOLD ITALIC PI SYMBOL}<200> •</data>
+
+# Unassigned code points
+<data>•abc<200>\U0001D800•def<200>\U0001D3FF• •</data>
+
+# Hiragana & Katakana stay together, but separates from each other and Latin.
+<data>•abc<200>\N{HIRAGANA LETTER SMALL A}<300>\N{HIRAGANA LETTER VU}\N{COMBINING ACUTE ACCENT}<300>\N{HIRAGANA ITERATION MARK}<300>\N{KATAKANA LETTER SMALL A}\N{KATAKANA ITERATION MARK}\N{HALFWIDTH KATAKANA LETTER WO}\N{HALFWIDTH KATAKANA LETTER N}<300>def<200>#•</data>
+
+# Words with interior formatting characters
+<data>•def\N{COMBINING ACUTE ACCENT}\N{SYRIAC ABBREVIATION MARK}ghi<200> •</data>
+
+# to test for bug #4097779
+<data>•aa\N{COMBINING GRAVE ACCENT}a<200> •</data>
+
+
+# to test for bug #4098467
+# What follows is a string of Korean characters (I found it in the Yellow Pages
+# ad for the Korean Presbyterian Church of San Francisco, and I hope I transcribed
+# it correctly), first as precomposed syllables, and then as conjoining jamo.
+# Both sequences should be semantically identical and break the same way.
+# precomposed syllables...
+<data>•\uc0c1\ud56d<200> •\ud55c\uc778<200> •\uc5f0\ud569<200> •\uc7a5\ub85c\uad50\ud68c<200> •\u1109\u1161\u11bc\u1112\u1161\u11bc<200> •\u1112\u1161\u11ab\u110b\u1175\u11ab<200> •\u110b\u1167\u11ab\u1112\u1161\u11b8<200> •\u110c\u1161\u11bc\u1105\u1169\u1100\u116d\u1112\u116c<200> •</data>
+
+<data>•abc<200>\u4e01<400>\u4e02<400>\u3005<200>\u4e03<400>\u4e03<400>abc<200> •</data>
+
+<data>•\u06c9\uc799\ufffa<200></data>
+
+#
+# Try some words from other scripts.
+#
+
+# Try some words from other scripts.
+# Greek, Cyrillic, Hebrew, Arabic, Arabic, Georgian, Latin
+#
+<data>•ΑΒΓ<200> •БВГ<200> •×בג֓<200> •ابت<200> •١٢٣<100> •\u10A0\u10A1\u10A2<200> •ABC<200> •</data>
+
+<data>•\u0301•A<200></data>
+
+
+#
+# Hindi word break tests, imported from the old RBBI tests.
+# An historical note: a much earlier version of ICU break iterators had a number
+# of special case rules for Hindi, which were tested by an earlier version of
+# this test data. The current RBBI rules do not special case Hindi in
+# any way, making this test data much less signfificant.
+#
+<data>•\u0917\u092a\u00ad\u0936\u092a<200>!•\u092f\u0939<200> •\u0939\u093f\u0928\u094d\u200d\u0926\u0940<200> •\u0939\u0948<200> •\u0905\u093e\u092a<200> •\u0938\u093f\u0916\u094b\u0917\u0947<200>?•\n•:•\u092a\u094d\u0930\u093e\u092f\u0903<200>
+•\u0935\u0930\u094d\u0937\u093e<200>\r\n•\u092a\u094d\u0930\u0915\u093e\u0936<200>,•\u0924\u0941\u092e\u093e\u0930\u094b<200> •\u092e\u093f\u0924\u094d\u0930<200> •\u0915\u093e<200> •\u092a\u0924\u094d\u0930<200> •\u092a\u095d\u094b<200> •\u0938\u094d\u0924\u094d\u0930\u093f<200>.• •\u0968\u0966.\u0969\u096f<100> •\u0967\u0966\u0966.\u0966\u0966<100>\u20a8•\u0967,\u0967\u0966\u0966.\u0966\u0966<100> •\u0905\u092e\u091c<200>\n•\u0938\u094d\u200d\u0935\u0924\u0902\u0924\u094d\u0930<200>\r•</data>
+
+#
+# Failures from monkey tests
+#
+<data>•\u8527<400>\u02ba<200>\u0027\u0d42•\u00b7•\u09ea<100></data>
+
+#
+# Jitterbug 5276 - treat Japanese half width voicing marks as Grapheme Extend
+#
+<data>•A\uff9e\uff9fBC<200> •1\uff9e\uff9f23<100></data>
+
+########################################################################################
+#
+#
+# S e n t e n c e B o u n d a r y T e s t s
+#
+#
+##########################################################################################
+
+
+#
+# Test data originally from RBBI RBBITest::TestDefaultRuleBasedSentenceIteration()
+#
+<sent>
+
+
+<sent>
+<data>•This\n<100></data>
+<data>•Hello! •how are you? •I'am fine. •Thankyou. •How are you \
+doing? •This\n<100> costs $20,00,000. •</data>
+
+
+# Sentence ending in a quote.
+<data>•"Sentence ending with a quote." •Bye.•</data>
+
+# Sentence, and test data, ending without a period or other terminator.
+<data>•Here is a random sentence, no ending period<100></data>
+
+
+<data>• (This is it). •Testing the sentence iterator. •\
+"This isn't it." •Hi! \
+•This is a simple sample sentence. •(This is it.) •This is a simple sample sentence. •\
+"This isn't it." •\
+Hi! •This is a simple sample sentence. •It does not have to make any sense as you can see. •Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura. •Che la dritta via aveo smarrita. •He said, that I said, that you said!! •Don't rock the boat.\u2029•Because I am the daddy, that is why.
+•Not on my time (el timo.)! •</data>
+
+<data>•Hello. •So what!!\u2029•"But now," he said, \
+"I know!" •\
+Harris thumbed down several, including "Away We Go" (which became the huge success Oklahoma!). •One species, B. anthracis, is highly virulent.
+•Wolf said about Sounder:\
+"Beautifully thought-out and directed." •\
+Have you ever said, "This is where\tI shall live"? •He answered, \
+"You may not!" •Another popular saying is: "How do you do?". \n•\
+Yet another popular saying is: \
+'I'm fine thanks.' •\
+What is the proper use of the abbreviation pp.? •Yes, I am definatelly 12" tall!!\
+•Now\r<100>is\n<100>the\r\n<100>time\n<100>\r<100>for\r<100>\r<100></data>
+
+<data>•No breaks when . is surrounded by UPPER.Case letters. •</data>
+<data>•No breaks when . is followed by Numeric .4 a.4 C.4 3.1 .•</data>
+<data>•No breaks when . is followed by a lower, with possible intervening punct .,a .$a .)a. •</data>
+
+#
+# Sentence Breaks: no break at the boundary between CJK and other letters
+#
+<data>•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165:"JAVA\u821c\u8165\u7fc8\u51ce\u306d,\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46".\u2029•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e4JAVA\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u3002•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e4\u6470\u8790JAVA\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u2048•He said, "I can go there."\u2029•Bye, now.•</data>
+
+#
+# Treat fullwidth variants of .!? the same as their
+# normal counterparts
+#
+<data>•I know I'm right\uff0e •Right\uff1f •Right\uff01 •</data>
+
+
+#
+# Don't break sentences at boundary between CJK and digits
+#
+<data>•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e48888\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u3002•Bye, now<100></data>
+
+#
+# Breaks around '(' following a sentence TERM. (Rule 9)
+#
+<data>•How do you do?(•Fine). •</data>
+<data>•How do you do? •(Fine). •</data>
+<data>•How do you do?(•fine). •</data>
+<data>•How do you do? •(fine). •</data>
+
+#
+<data>•Hello.123<100></data> # Rule 6
+<data>•Hello?•123<100></data>
+
+<data>•HELLO.Bye<100></data> # Rule 7
+<data>•HELLO?•Bye<100></data>
+
+<data>•Hello.goodbye<100></data> #Rule 8
+<data>•Hello. •Goodbye<100></data>
+<data>•Hello. goodbye<100></data>
+
+
+
+#
+# test for bug #4158381: No breaks when there are no terminators around
+#
+<data>•\<P>Provides a set of &quot;lightweight&quot; (all-java\<FONT SIZE="-2">\<SUP>TM\</SUP>\</FONT> language) components that, to the maximum degree possible, work the same on all platforms. •</data>
+<data>•Another test.\u2029•</data>
+
+# test for bug #4143071: Make sure sentences that end with digits
+# work right
+#
+<data>•Today is the 27th of May, 1998. •</data>
+<data>•Tomorrow with be 28 May 1998. •</data>
+<data>•The day after will be the 30th.\u2029•</data>
+
+# test for bug #4152416: Make sure sentences ending with a capital
+# letter are treated correctly
+#
+<data>•The type of all primitive \<code>boolean\</code> values accessed in the target VM. •Calls to xxx will return an implementor of this interface. \u2029•</data>
+
+# test for bug #4152117: Make sure sentence breaking is handling
+# punctuation correctly [COULD NOT REPRODUCE THIS BUG, BUT TEST IS
+# HERE TO MAKE SURE IT DOESN'T CROP UP]
+#
+<data>•Constructs a randomly generated BigInteger, uniformly distributed over the range \<tt>0\</tt> to \<tt>(2\<sup>numBits\</sup> - 1\)\</tt>, inclusive. •The uniformity of the distribution assumes that a fair source of random bits is provided in \<tt>rnd\</tt>. •Note that this constructor always constructs a non-negative biginteger. \n•Ahh abc.
+•</data>
+
+# sentence breaks for hindi which used Devanagari script
+# make sure there is sentence break after ?,danda(hindi phrase separator),
+# fullstop followed by space. (VERY old test)
+#
+<data>•\u0928\u092e\u0938\u094d\u200d\u0924\u0947 \u0930\u092e\u0947\u0936\u0905\u093e\u092a\u0915\u0948\u0938\u0947 \u0939\u0948?•\u092e\u0948 \u0905\u091a\u094d\u200d \u091b\u093e \u0939\u0942\u0901\u0964 •\u0905\u093e\u092a\r\n<100>\
+\u0915\u0948\u0938\u0947 \u0939\u0948?•\u0935\u0939 \u0915\u094d\u200d\u092f\u093e\n\
+<100>\u0939\u0948?•\u092f\u0939 \u0905\u093e\u092e \u0939\u0948. •\u092f\u0939 means "this". •"\u092a\u095d\u093e\u0908" meaning "education" or "studies". •\u0905\u093e\u091c(\u0938\u094d\u200d\u0935\u0924\u0902\u0924\u094d\u0930 \u0926\u093f\u0935\u093e\u0938) \u0939\u0948\u0964 •Let's end here. •</data>
+
+# Regression test for bug #1984, Sentence break in Arabic text.
+
+<data>\
+•\u0623\u0633\u0627\u0633\u064b\u0627\u060c\u0020\u062a\u062a\u0639\u0627"\u0645\u0644\u0020\u0627\u0644\u062d\u0648\u0627\u0633\u064a\u0628\u0020"\u0641\u0642\u0637\u0020\u0645\u0639\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u060c\u0648\u062a\u0642\u0648\u0645\u0020\u0628\u062a\u062e\u0632\u064a\u0646\u0020\u0627\u0644\u0623\u062d\u0631\u0641\u0020\u0648\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0623\u062e\u0631\u0649\u0020\u0628\u0639\u062f\u0020\u0623\u0646\u062a\u064f\u0639\u0637\u064a\u0020\u0631\u0642\u0645\u0627\u0020\u0645\u0639\u064a\u0646\u0627\u0020\u0644\u0643\u0644\u0020\u0648\u0627\u062d\u062f\u0020\u0645\u0646\u0647\u0627\u002e\u0020•\u0648\u0642\u0628\u0644\u0020\u0627\u062e\u062a\u0631\u0627\u0639\u0022\u064a\u0648\u0646\u0650\u0643\u0648\u062f\u0022\u060c\u0020\u0643\u0627\u0646\u0020\u0647\u0646\u0627\u0643\u0020\u0645\u0626\u0627\u062a\u0020\u0627\u0644\u0623\u0646\u0638\u0645\u0629\u0020\u0644\u0644\u062a\u0634\u0641\u064a\u0631\u0648\u062a\u062e\u0635\u064a\u0635\u0020\u0647\u0630\u0647\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u0020\u0644\u0644\u0645\u062d\u0627\u0631\u0641\u060c\u0020\u0648\u0644\u0645\u0020\u064a\u0648\u062c\u062f\u0020\u0646\u0638\u0627\u0645\u062a\u0634\u0641\u064a\u0020\u0639\u0644\u0649\u0020\u062c\u0645\u064a\u0639\u0020\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0636\u0631\u0648\u0631\u064a\u0629. •</data>
+
+# Try a few more of the less common sentence endings.
+<data>•Hello, world\u3002 •Hello, world\u1803 •Hello, world\u2048 •Hello, world\u203c •Let's end here. •</data>
+
+
+
+
+################################################################
+#
+#
+# L I N E B R E A K
+#
+#
+################################################################
+
+<line>
+#
+# Test Character for each of the line break classes.
+#
+# 00A1;AI # INVERTED EXCLAMATION MARK ¡
+# 0041;AL # LATIN CAPITAL LETTER A
+# 0009;BA # <control>
+# 00B4;BB # ACUTE ACCENT
+# 000C;BK # <control>
+# 2014;B2 # EM DASH
+# FFFC;CB # OBJECT REPLACEMENT CHARACTER
+# 0029;CL # RIGHT PARENTHESIS
+# 0301;CM # COMBINING ACUTE ACCENT
+# 0021;EX # EXCLAMATION MARK
+# 00A0;GL # NO-BREAK SPACE
+# 002D;HY # HYPHEN-MINUS
+# 4E00;ID # <CJK Ideograph, First>
+# 2024;IN # ONE DOT LEADER
+# 002C;IS # COMMA
+# 000A;LF # <control>
+# 0E5A;NS # THAI CHARACTER ANGKHANKHU
+# 0032;NU # DIGIT TWO
+# 0028;OP # LEFT PARENTHESIS
+# 0025;PO # PERCENT SIGN
+# 0024;PR # DOLLAR SIGN
+# 0022;QU # QUOTATION MARK
+# 0E01;SA # THAI CHARACTER KO KAI
+# DB7F;SG # Surrogate
+# 0020;SP # SPACE
+# 002F;SY # SOLIDUS /
+# F8FF;XX # Private Use
+# 200B;ZW # ZERO WIDTH SPACE
+
+
+# 2b Always break at end of text
+
+<data>• •\u00A1•</data>
+<data>• •\u0041•</data>
+<data>• •\u0009•</data>
+<data>• •\u00B4•</data>
+<data>• \u000C<100></data> # LB3C × BK
+<data>• •\u2014•</data>
+<data>• •\uFFFC•</data>
+<data>• \u0029•</data> # LB 8 × CL
+# <data>• • \u0301•</data> # LB 7a Treat SP CM* as if it were ID #TODO: SP CM
+<data>• \u0021•</data> # LB 8 × EX
+#<data>• \u00A0•</data> # LB 11b × GL TODO: fix.
+<data>• •\u002D•</data>
+<data>• •\u4E00•</data>
+<data>• •\u2024•</data>
+<data>• \u002C•</data> # LB 8 × IS
+<data>• \u000A<100></data> # LB3C × ( BK | CR | LF | NL )
+<data>• •\u0E5A•</data>
+<data>• •\u0032•</data>
+<data>• •\u0028•</data>
+<data>• •\u0025•</data>
+<data>• •\u0024•</data>
+<data>• •\u0022•</data>
+<data>• •\u0E01•</data>
+<data>• •\uDB7F•</data>
+<data>• \u0020•</data> # LB4 - don't break before space.
+<data>• \u002F•</data> # LB 8 × SY
+<data>• •\uF8FF•</data>
+<data>• \u200B•</data> # LB4 - don't break before ZA
+
+
+# 3a Always break after hard line breaks.
+# 3c Never break before hard line breaks.
+
+<data>• •\u00A1\u2028<100>\u00A1•</data>
+<data>• •\u0041\u2028<100>\u0041•</data>
+<data>• •\u0009\u2028<100>\u0009•</data>
+<data>• •\u00B4\u2028<100>\u00B4•</data>
+<data>• \u000C<100>\u2028<100>\u000C<100></data>
+<data>• •\u2014\u2028<100>\u2014•</data>
+<data>• •\uFFFC\u2028<100>\uFFFC•</data>
+<data>• \u0029\u2028<100>\u0029•</data>
+#<data>• \u0301\u2028<100>\u0301•</data> # TODO: fix.
+<data>• \u0021\u2028<100>\u0021•</data>
+#<data>• \u00A0\u2028<100>\u00A0•</data> # TODO: fix
+<data>• •\u002D\u2028<100>\u002D•</data>
+<data>• •\u4E00\u2028<100>\u4E00•</data>
+<data>• •\u2024\u2028<100>\u2024•</data>
+<data>• \u002C\u2028<100>\u002C•</data>
+<data>• \u000A<100>\u2028<100>\u000A<100></data>
+<data>• •\u0E5A\u2028<100>\u0E5A•</data>
+<data>• •\u0032\u2028<100>\u0032•</data>
+<data>• •\u0028\u2028<100>\u0028•</data>
+<data>• •\u0025\u2028<100>\u0025•</data>
+<data>• •\u0024\u2028<100>\u0024•</data>
+<data>• •\u0022\u2028<100>\u0022•</data>
+<data>• •\u0E01\u2028<100>\u0E01•</data>
+<data>• •\uDB7F\u2028<100>\uDB7F•</data>
+<data>• \u0020\u2028<100>\u0020•</data>
+<data>• \u002F\u2028<100>\u002F•</data>
+<data>• •\uF8FF\u2028<100>\uF8FF•</data>
+<data>• \u200B\u2028<100>\u200B•</data>
+
+
+#
+# Old Line Break Test data. Orginally located in RBBITest::TestDefaultRuleBasedLineIteration()
+#
+
+<line>
+
+<data>•Multi-•Level •example •of •a •semi-•idiotic •non-•sensical •(non-•important) •sentence.
+<100>Hi •Hello •How\n<100>are\r<100>you\u2028<100>fine.\t•good. •Now\r<100>is\n<100>the\r\n<100>time\n<100>\r<100>for\r<100>\r<100>all•</data>
+
+<line>
+<data>•Hello! •how\r\n<100> •(are)\r<100> •you? •I'am •fine- •Thankyou. •foo\u00a0bar
+<100>How, •are, •you? •This, •costs •$20,00,000.•</data>
+
+# test for bug #4068133
+#
+<data>•\u96f6•\u4e00\u3002•\u4e8c\u3001•\u4e09\u3002\u3001•\u56db\u3001\u3002\u3001•\u4e94,•\u516d.•\u4e03.\u3001,\u3002•\u516b•</data>
+
+# to test for bug #4086052
+<data>•foo\u00a0bar•</data>
+
+# to test for bug #4097920
+<data>•dog,cat,mouse •(one)•(two)\n<100></data>
+
+# to test for bug #4035266
+<data>•The •balance •is •$-23,456.78, •not •-•$32,456.78!\n<100></data>
+
+
+# to test for bug #4098467
+# What follows is a string of Korean characters (I found it in the Yellow Pages
+# ad for the Korean Presbyterian Church of San Francisco, and I hope I transcribed
+# it correctly), first as precomposed syllables, and then as conjoining jamo.
+# Both sequences should be semantically identical and break the same way.
+# precomposed syllables... (I == Rich Gillam?)
+#
+<data>•\uc0c1•\ud56d •\ud55c•\uc778 •\uc5f0•\ud569 •\uc7a5•\ub85c•\uad50•\ud68c•</data>
+
+# conjoining jamo...
+# TODO: rules update needed
+#<data>•\u1109\u1161\u11bc•\u1112\u1161\u11bc •\u1112\u1161\u11ab•\u110b\u1175\u11ab #•\u110b\u1167\u11ab•\u1112\u1161\u11b8 •\u110c\u1161\u11bc•\u1105\u1169•\u1100\u116d•\u1112\u116c•</data>
+
+# to test for bug #4117554: Fullwidth .!? should be treated as postJwrd
+<data>•\u4e01\uff0e•\u4e02\uff01•\u4e03\uff1f•</data>
+
+# Surrogate line break tests.
+#
+<data>•\u4e01•\ud840\udc01•\u4e02•abc •\ue000 •\udb80\udc01•</data>
+
+# Regression for bug 836
+<data>•AAA(AAA •</data>
+
+# Try some words from other scripts.
+# Greek, Cyrillic, Hebrew, Arabic, Arabic, Georgian, Latin
+#
+<data>•ΑΒΓ •БВГ •×בג֓ •ابت •١٢٣ •\u10A0\u10A1\u10A2 •ABC •</data>
+
+
+########################################################################################
+#
+#
+# T i t l e B o u n d a r y T e s t s
+#
+#
+##########################################################################################
+<title>
+<data>•Here •is •a •short •sample •sentence. •And •another.•</data>
+<data>•HERE •IS •A •SHORT •SAMPLE •SENTENCE. •AND •ANOTHER.•</data>
+<data>• •Start •and •end •with •spaces •</data>
+<data>•Include 123 456 ^& •some 54332 •numbers 4445•abc123•abc •ending 1223 •</data>
+
+<data>•Combining\u0301 \u0301•ma\u0306rks •bye •</data>
+<data>•123 •Start •with •a •number.•</data>
+
+<data>•'•start •with •a •case-•ignorable •cha'r'a'cter•</data>
+
+
+##########################################################################################
+#
+# Thai Tests
+#
+##########################################################################################
+<locale th>
+<word>
+#
+# Test data originally from the test code source file
+# // @suwit -- Thai sample data from GVT Guideline
+#
+<data>•\u0E2B\u0E19\u0E36\u0E48\u0E07<200>\u0E04\u0E33<200>\u0E44\u0E17\u0E22<200>\
+\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16<200>\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A<200>\
+\u0E14\u0E49\u0E27\u0E22<200>\u0e2b\u0e25\u0e32\u0e22<200>\
+\u0e1e\u0e22\u0e32\u0e07\u0e04\u0e4c<200></data>
+
+#
+# Jitterbug 3671 Test Case
+#
+<data>•สวัสดี<200>ครับ<200>สบาย<200>ดี<200>ไหม<200> •ครับ<200></data>
+
+#
+# Trac ticket 5595 Test Case
+<data>•บท<200>ที่๑พายุ<200>ไซโคลน<200>โด<200>โรธี<200>อาศัย<200>อยู่<200>ท่ามà¸à¸¥à¸²à¸‡<200>\
+ทุ่งใหà¸à¹ˆ<200>ใน<200>à¹à¸„นซัส<200>à¸à¸±à¸š<200>ลุง<200>เฮ<200>นรี<200>ชาวไร่<200>à¹à¸¥à¸°<200>ป้า<200>เอ็ม<200>\
+ภรรยา<200>ชาวไร่<200>บ้าน<200>ของ<200>พวà¸<200>เขา<200>หลัง<200>เล็à¸<200>เพราะ<200>ไม้<200>\
+สร้าง<200>บ้าน<200>ต้อง<200>ขน<200>มา<200>ด้วย<200>เà¸à¸§à¸µà¸¢à¸™<200>เป็น<200>ระยะ<200>ทาง<200>หลาย<200>\
+ไมล์<200></data>
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/re_tests.txt b/Build/source/libs/icu/icu-xetex/test/testdata/re_tests.txt
new file mode 100644
index 00000000000..910ff3f2eff
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/re_tests.txt
@@ -0,0 +1,923 @@
+abc abc y $& abc
+abc abc y $-[0] 0
+abc abc y $+[0] 3
+abc xbc n - -
+abc axc n - -
+abc abx n - -
+abc xabcy y $& abc
+abc xabcy y $-[0] 1
+abc xabcy y $+[0] 4
+abc ababc y $& abc
+abc ababc y $-[0] 2
+abc ababc y $+[0] 5
+ab*c abc y $& abc
+ab*c abc y $-[0] 0
+ab*c abc y $+[0] 3
+ab*bc abc y $& abc
+ab*bc abc y $-[0] 0
+ab*bc abc y $+[0] 3
+ab*bc abbc y $& abbc
+ab*bc abbc y $-[0] 0
+ab*bc abbc y $+[0] 4
+ab*bc abbbbc y $& abbbbc
+ab*bc abbbbc y $-[0] 0
+ab*bc abbbbc y $+[0] 6
+.{1} abbbbc y $& a
+.{1} abbbbc y $-[0] 0
+.{1} abbbbc y $+[0] 1
+.{3,4} abbbbc y $& abbb
+.{3,4} abbbbc y $-[0] 0
+.{3,4} abbbbc y $+[0] 4
+ab{0,}bc abbbbc y $& abbbbc
+ab{0,}bc abbbbc y $-[0] 0
+ab{0,}bc abbbbc y $+[0] 6
+ab+bc abbc y $& abbc
+ab+bc abbc y $-[0] 0
+ab+bc abbc y $+[0] 4
+ab+bc abc n - -
+ab+bc abq n - -
+ab{1,}bc abq n - -
+ab+bc abbbbc y $& abbbbc
+ab+bc abbbbc y $-[0] 0
+ab+bc abbbbc y $+[0] 6
+ab{1,}bc abbbbc y $& abbbbc
+ab{1,}bc abbbbc y $-[0] 0
+ab{1,}bc abbbbc y $+[0] 6
+ab{1,3}bc abbbbc y $& abbbbc
+ab{1,3}bc abbbbc y $-[0] 0
+ab{1,3}bc abbbbc y $+[0] 6
+ab{3,4}bc abbbbc y $& abbbbc
+ab{3,4}bc abbbbc y $-[0] 0
+ab{3,4}bc abbbbc y $+[0] 6
+ab{4,5}bc abbbbc n - -
+ab?bc abbc y $& abbc
+ab?bc abc y $& abc
+ab{0,1}bc abc y $& abc
+ab?bc abbbbc n - -
+ab?c abc y $& abc
+ab{0,1}c abc y $& abc
+^abc$ abc y $& abc
+^abc$ abcc n - -
+^abc abcc y $& abc
+^abc$ aabc n - -
+abc$ aabc y $& abc
+abc$ aabcd n - -
+^ abc y $&
+$ abc y $&
+a.c abc y $& abc
+a.c axc y $& axc
+a.*c axyzc y $& axyzc
+a.*c axyzd n - -
+a[bc]d abc n - -
+a[bc]d abd y $& abd
+a[b-d]e abd n - -
+a[b-d]e ace y $& ace
+a[b-d] aac y $& ac
+a[-b] a- y $& a-
+a[b-] a- y $& a-
+a[b-a] - c - Invalid [] range "b-a"
+a[]b - ci - Unmatched [
+a[ - c - Unmatched [
+a] a] y $& a]
+a[]]b a]b yi $& a]b ICU makes [] into an empty set.
+a[^bc]d aed y $& aed
+a[^bc]d abd n - -
+a[^-b]c adc yi $& adc ICU [] set rules
+a[^-b]c a-c ni - - ICU [] set rules
+a[^]b]c a]c n - -
+a[^]b]c adc yi $& adc ICU [] set rules.
+\ba\b a- y - -
+\ba\b -a y - -
+\ba\b -a- y - -
+\by\b xy n - -
+\by\b yz n - -
+\by\b xyz n - -
+\Ba\B a- n - -
+\Ba\B -a n - -
+\Ba\B -a- n - -
+\By\b xy y - -
+\By\b xy y $-[0] 1
+\By\b xy y $+[0] 2
+\By\b xy y - -
+\by\B yz y - -
+\By\B xyz y - -
+\w a y - -
+\w - n - -
+\W a n - -
+\W - y - -
+a\sb a b y - -
+a\sb a-b n - -
+a\Sb a b n - -
+a\Sb a-b y - -
+\d 1 y - -
+\d - n - -
+\D 1 n - -
+\D - y - -
+[\w] a iy - -
+[\w] - in - -
+[\W] a in - -
+[\W] - iy - -
+a[\s]b a b iy - -
+a[\s]b a-b in - -
+a[\S]b a b in - -
+a[\S]b a-b iy - -
+[\d] 1 iy - -
+[\d] - in - -
+[\D] 1 in - -
+[\D] - iy - -
+ab|cd abc y $& ab
+ab|cd abcd y $& ab
+()ef def y $&-$1 ef-
+()ef def y $-[0] 1
+()ef def y $+[0] 3
+()ef def y $-[1] 1
+()ef def y $+[1] 1
+*a - c - Quantifier follows nothing
+(*)b - c - Quantifier follows nothing
+$b b n - -
+a\ - c - Search pattern not terminated
+a\(b a(b y $&-$1 a(b-
+a\(*b ab y $& ab
+a\(*b a((b y $& a((b
+a\\b a\b y $& a\b
+abc) - c - Unmatched )
+(abc - c - Unmatched (
+((a)) abc y $&-$1-$2 a-a-a
+((a)) abc y $-[0]-$-[1]-$-[2] 0-0-0
+((a)) abc y $+[0]-$+[1]-$+[2] 1-1-1
+((a)) abc by @- 0 0 0
+((a)) abc by @+ 1 1 1
+(a)b(c) abc y $&-$1-$2 abc-a-c
+(a)b(c) abc y $-[0]-$-[1]-$-[2] 0-0-2
+(a)b(c) abc y $+[0]-$+[1]-$+[2] 3-1-3
+a+b+c aabbabc y $& abc
+a{1,}b{1,}c aabbabc y $& abc
+a** - c - Nested quantifiers
+a.+?c abcabc y $& abc
+(a+|b)* ab y $&-$1 ab-b
+(a+|b)* ab y $-[0] 0
+(a+|b)* ab y $+[0] 2
+(a+|b)* ab y $-[1] 1
+(a+|b)* ab y $+[1] 2
+(a+|b){0,} ab y $&-$1 ab-b
+(a+|b)+ ab y $&-$1 ab-b
+(a+|b){1,} ab y $&-$1 ab-b
+(a+|b)? ab y $&-$1 a-a
+(a+|b){0,1} ab y $&-$1 a-a
+)( - c - Unmatched )
+[^ab]* cde y $& cde
+abc n - -
+a* y $&
+([abc])*d abbbcd y $&-$1 abbbcd-c
+([abc])*bcd abcd y $&-$1 abcd-a
+a|b|c|d|e e y $& e
+(a|b|c|d|e)f ef y $&-$1 ef-e
+(a|b|c|d|e)f ef y $-[0] 0
+(a|b|c|d|e)f ef y $+[0] 2
+(a|b|c|d|e)f ef y $-[1] 0
+(a|b|c|d|e)f ef y $+[1] 1
+abcd*efg abcdefg y $& abcdefg
+ab* xabyabbbz y $& ab
+ab* xayabbbz y $& a
+(ab|cd)e abcde y $&-$1 cde-cd
+[abhgefdc]ij hij y $& hij
+^(ab|cd)e abcde n x$1y xy
+(abc|)ef abcdef y $&-$1 ef-
+(a|b)c*d abcd y $&-$1 bcd-b
+(ab|ab*)bc abc y $&-$1 abc-a
+a([bc]*)c* abc y $&-$1 abc-bc
+a([bc]*)(c*d) abcd y $&-$1-$2 abcd-bc-d
+a([bc]*)(c*d) abcd y $-[0] 0
+a([bc]*)(c*d) abcd y $+[0] 4
+a([bc]*)(c*d) abcd y $-[1] 1
+a([bc]*)(c*d) abcd y $+[1] 3
+a([bc]*)(c*d) abcd y $-[2] 3
+a([bc]*)(c*d) abcd y $+[2] 4
+a([bc]+)(c*d) abcd y $&-$1-$2 abcd-bc-d
+a([bc]*)(c+d) abcd y $&-$1-$2 abcd-b-cd
+a([bc]*)(c+d) abcd y $-[0] 0
+a([bc]*)(c+d) abcd y $+[0] 4
+a([bc]*)(c+d) abcd y $-[1] 1
+a([bc]*)(c+d) abcd y $+[1] 2
+a([bc]*)(c+d) abcd y $-[2] 2
+a([bc]*)(c+d) abcd y $+[2] 4
+a[bcd]*dcdcde adcdcde y $& adcdcde
+a[bcd]+dcdcde adcdcde n - -
+(ab|a)b*c abc y $&-$1 abc-ab
+(ab|a)b*c abc y $-[0] 0
+(ab|a)b*c abc y $+[0] 3
+(ab|a)b*c abc y $-[1] 0
+(ab|a)b*c abc y $+[1] 2
+((a)(b)c)(d) abcd y $1-$2-$3-$4 abc-a-b-d
+((a)(b)c)(d) abcd y $-[0] 0
+((a)(b)c)(d) abcd y $+[0] 4
+((a)(b)c)(d) abcd y $-[1] 0
+((a)(b)c)(d) abcd y $+[1] 3
+((a)(b)c)(d) abcd y $-[2] 0
+((a)(b)c)(d) abcd y $+[2] 1
+((a)(b)c)(d) abcd y $-[3] 1
+((a)(b)c)(d) abcd y $+[3] 2
+((a)(b)c)(d) abcd y $-[4] 3
+((a)(b)c)(d) abcd y $+[4] 4
+[a-zA-Z_][a-zA-Z0-9_]* alpha y $& alpha
+^a(bc+|b[eh])g|.h$ abh y $&-$1 bh-
+(bc+d$|ef*g.|h?i(j|k)) effgz y $&-$1-$2 effgz-effgz-
+(bc+d$|ef*g.|h?i(j|k)) ij y $&-$1-$2 ij-ij-j
+(bc+d$|ef*g.|h?i(j|k)) effg n - -
+(bc+d$|ef*g.|h?i(j|k)) bcdd n - -
+(bc+d$|ef*g.|h?i(j|k)) reffgz y $&-$1-$2 effgz-effgz-
+((((((((((a)))))))))) a y $10 a
+((((((((((a)))))))))) a y $-[0] 0
+((((((((((a)))))))))) a y $+[0] 1
+((((((((((a)))))))))) a y $-[10] 0
+((((((((((a)))))))))) a y $+[10] 1
+((((((((((a))))))))))\10 aa y $& aa
+((((((((((a))))))))))${bang} aa n - -
+((((((((((a))))))))))${bang} a! y $& a!
+(((((((((a))))))))) a y $& a
+multiple words of text uh-uh n - -
+multiple words multiple words, yeah y $& multiple words
+(.*)c(.*) abcde y $&-$1-$2 abcde-ab-de
+\((.*), (.*)\) (a, b) y ($2, $1) (b, a)
+[k] ab n - -
+abcd abcd y $&-\$&-\\$& abcd-$&-\abcd
+a(bc)d abcd y $1-\$1-\\$1 bc-$1-\bc
+a[-]?c ac y $& ac
+(abc)\1 abcabc y $1 abc
+([a-c]*)\1 abcabc y $1 abc
+\1 - c - Reference to nonexistent group
+\2 - c - Reference to nonexistent group
+(a)|\1 a y - -
+(a)|\1 x n - -
+(a)|\2 - c - Reference to nonexistent group
+(([a-c])b*?\2)* ababbbcbc y $&-$1-$2 ababb-bb-b
+(([a-c])b*?\2){3} ababbbcbc y $&-$1-$2 ababbbcbc-cbc-c
+((\3|b)\2(a)x)+ aaxabxbaxbbx n - -
+((\3|b)\2(a)x)+ aaaxabaxbaaxbbax y $&-$1-$2-$3 bbax-bbax-b-a
+((\3|b)\2(a)){2,} bbaababbabaaaaabbaaaabba y $&-$1-$2-$3 bbaaaabba-bba-b-a
+(a)|(b) b y $-[0] 0
+(a)|(b) b y $+[0] 1
+(a)|(b) b y x$-[1] x
+(a)|(b) b y x$+[1] x
+(a)|(b) b y $-[2] 0
+(a)|(b) b y $+[2] 1
+'abc'i ABC y $& ABC
+'abc'i XBC n - -
+'abc'i AXC n - -
+'abc'i ABX n - -
+'abc'i XABCY y $& ABC
+'abc'i ABABC y $& ABC
+'ab*c'i ABC y $& ABC
+'ab*bc'i ABC y $& ABC
+'ab*bc'i ABBC y $& ABBC
+'ab*?bc'i ABBBBC y $& ABBBBC
+'ab{0,}?bc'i ABBBBC y $& ABBBBC
+'ab+?bc'i ABBC y $& ABBC
+'ab+bc'i ABC n - -
+'ab+bc'i ABQ n - -
+'ab{1,}bc'i ABQ n - -
+'ab+bc'i ABBBBC y $& ABBBBC
+'ab{1,}?bc'i ABBBBC y $& ABBBBC
+'ab{1,3}?bc'i ABBBBC y $& ABBBBC
+'ab{3,4}?bc'i ABBBBC y $& ABBBBC
+'ab{4,5}?bc'i ABBBBC n - -
+'ab??bc'i ABBC y $& ABBC
+'ab??bc'i ABC y $& ABC
+'ab{0,1}?bc'i ABC y $& ABC
+'ab??bc'i ABBBBC n - -
+'ab??c'i ABC y $& ABC
+'ab{0,1}?c'i ABC y $& ABC
+'^abc$'i ABC y $& ABC
+'^abc$'i ABCC n - -
+'^abc'i ABCC y $& ABC
+'^abc$'i AABC n - -
+'abc$'i AABC y $& ABC
+'^'i ABC y $&
+'$'i ABC y $&
+'a.c'i ABC y $& ABC
+'a.c'i AXC y $& AXC
+'a.*?c'i AXYZC y $& AXYZC
+'a.*c'i AXYZD n - -
+'a[bc]d'i ABC n - -
+'a[bc]d'i ABD y $& ABD
+'a[b-d]e'i ABD n - -
+'a[b-d]e'i ACE y $& ACE
+'a[b-d]'i AAC y $& AC
+'a[-b]'i A- y $& A-
+'a[b-]'i A- y $& A-
+'a[b-a]'i - c - Invalid [] range "b-a"
+'a[]b'i - ci - Unmatched [
+'a['i - c - Unmatched [
+'a]'i A] y $& A]
+'a[]]b'i A]B yi $& A]B
+'a[^bc]d'i AED y $& AED
+'a[^bc]d'i ABD n - -
+'a[^-b]c'i ADC yi $& ADC ICU [] set rules
+'a[^-b]c'i A-C ni - - ICU [] set rules
+'a[^]b]c'i A]C n - -
+'a[^]b]c'i ADC yi $& ADC
+'ab|cd'i ABC y $& AB
+'ab|cd'i ABCD y $& AB
+'()ef'i DEF y $&-$1 EF-
+'*a'i - c - Quantifier follows nothing
+'(*)b'i - c - Quantifier follows nothing
+'$b'i B n - -
+'a\'i - c - Search pattern not terminated
+'a\(b'i A(B y $&-$1 A(B-
+'a\(*b'i AB y $& AB
+'a\(*b'i A((B y $& A((B
+'a\\b'i A\B y $& A\B
+'abc)'i - c - Unmatched )
+'(abc'i - c - Unmatched (
+'((a))'i ABC y $&-$1-$2 A-A-A
+'(a)b(c)'i ABC y $&-$1-$2 ABC-A-C
+'a+b+c'i AABBABC y $& ABC
+'a{1,}b{1,}c'i AABBABC y $& ABC
+'a**'i - c - Nested quantifiers
+'a.+?c'i ABCABC y $& ABC
+'a.*?c'i ABCABC y $& ABC
+'a.{0,5}?c'i ABCABC y $& ABC
+'(a+|b)*'i AB y $&-$1 AB-B
+'(a+|b){0,}'i AB y $&-$1 AB-B
+'(a+|b)+'i AB y $&-$1 AB-B
+'(a+|b){1,}'i AB y $&-$1 AB-B
+'(a+|b)?'i AB y $&-$1 A-A
+'(a+|b){0,1}'i AB y $&-$1 A-A
+'(a+|b){0,1}?'i AB y $&-$1 -
+')('i - c - Unmatched )
+'[^ab]*'i CDE y $& CDE
+'abc'i n - -
+'a*'i y $&
+'([abc])*d'i ABBBCD y $&-$1 ABBBCD-C
+'([abc])*bcd'i ABCD y $&-$1 ABCD-A
+'a|b|c|d|e'i E y $& E
+'(a|b|c|d|e)f'i EF y $&-$1 EF-E
+'abcd*efg'i ABCDEFG y $& ABCDEFG
+'ab*'i XABYABBBZ y $& AB
+'ab*'i XAYABBBZ y $& A
+'(ab|cd)e'i ABCDE y $&-$1 CDE-CD
+'[abhgefdc]ij'i HIJ y $& HIJ
+'^(ab|cd)e'i ABCDE ni x$1y XY
+'(abc|)ef'i ABCDEF y $&-$1 EF-
+'(a|b)c*d'i ABCD y $&-$1 BCD-B
+'(ab|ab*)bc'i ABC y $&-$1 ABC-A
+'a([bc]*)c*'i ABC y $&-$1 ABC-BC
+'a([bc]*)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
+'a([bc]+)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
+'a([bc]*)(c+d)'i ABCD y $&-$1-$2 ABCD-B-CD
+'a[bcd]*dcdcde'i ADCDCDE y $& ADCDCDE
+'a[bcd]+dcdcde'i ADCDCDE n - -
+'(ab|a)b*c'i ABC y $&-$1 ABC-AB
+'((a)(b)c)(d)'i ABCD y $1-$2-$3-$4 ABC-A-B-D
+'[a-zA-Z_][a-zA-Z0-9_]*'i ALPHA y $& ALPHA
+'^a(bc+|b[eh])g|.h$'i ABH y $&-$1 BH-
+'(bc+d$|ef*g.|h?i(j|k))'i EFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
+'(bc+d$|ef*g.|h?i(j|k))'i IJ y $&-$1-$2 IJ-IJ-J
+'(bc+d$|ef*g.|h?i(j|k))'i EFFG n - -
+'(bc+d$|ef*g.|h?i(j|k))'i BCDD n - -
+'(bc+d$|ef*g.|h?i(j|k))'i REFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
+'((((((((((a))))))))))'i A y $10 A
+'((((((((((a))))))))))\10'i AA y $& AA
+'((((((((((a))))))))))${bang}'i AA n - -
+'((((((((((a))))))))))${bang}'i A! y $& A!
+'(((((((((a)))))))))'i A y $& A
+'(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))'i A y $1 A
+'(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))'i C y $1 C
+'multiple words of text'i UH-UH n - -
+'multiple words'i MULTIPLE WORDS, YEAH y $& MULTIPLE WORDS
+'(.*)c(.*)'i ABCDE y $&-$1-$2 ABCDE-AB-DE
+'\((.*), (.*)\)'i (A, B) y ($2, $1) (B, A)
+'[k]'i AB n - -
+'abcd'i ABCD y $&-\$&-\\$& ABCD-$&-\ABCD
+'a(bc)d'i ABCD y $1-\$1-\\$1 BC-$1-\BC
+'a[-]?c'i AC y $& AC
+'(abc)\1'i ABCABC y $1 ABC
+'([a-c]*)\1'i ABCABC y $1 ABC
+a(?!b). abad y $& ad
+a(?=d). abad y $& ad
+a(?=c|d). abad y $& ad
+a(?:b|c|d)(.) ace y $1 e
+a(?:b|c|d)*(.) ace y $1 e
+a(?:b|c|d)+?(.) ace y $1 e
+a(?:b|c|d)+?(.) acdbcdbe y $1 d
+a(?:b|c|d)+(.) acdbcdbe y $1 e
+a(?:b|c|d){2}(.) acdbcdbe y $1 b
+a(?:b|c|d){4,5}(.) acdbcdbe y $1 b
+a(?:b|c|d){4,5}?(.) acdbcdbe y $1 d
+((foo)|(bar))* foobar y $1-$2-$3 bar-foo-bar
+:(?: - c - Sequence (? incomplete
+a(?:b|c|d){6,7}(.) acdbcdbe y $1 e
+a(?:b|c|d){6,7}?(.) acdbcdbe y $1 e
+a(?:b|c|d){5,6}(.) acdbcdbe y $1 e
+a(?:b|c|d){5,6}?(.) acdbcdbe y $1 b
+a(?:b|c|d){5,7}(.) acdbcdbe y $1 e
+a(?:b|c|d){5,7}?(.) acdbcdbe y $1 b
+a(?:b|(c|e){1,2}?|d)+?(.) ace y $1$2 ce
+^(.+)?B AB y $1 A
+^([^a-z])|(\^)$ . y $1 .
+^[<>]& <&OUT y $& <&
+^(a\1?){4}$ aaaaaaaaaa y $1 aaaa
+^(a\1?){4}$ aaaaaaaaa n - -
+^(a\1?){4}$ aaaaaaaaaaa n - -
+^(a(?(1)\1)){4}$ aaaaaaaaaa y $1 aaaa
+^(a(?(1)\1)){4}$ aaaaaaaaa n - -
+^(a(?(1)\1)){4}$ aaaaaaaaaaa n - -
+((a{4})+) aaaaaaaaa y $1 aaaaaaaa
+(((aa){2})+) aaaaaaaaaa y $1 aaaaaaaa
+(((a{2}){2})+) aaaaaaaaaa y $1 aaaaaaaa
+(?:(f)(o)(o)|(b)(a)(r))* foobar y $1:$2:$3:$4:$5:$6 f:o:o:b:a:r
+(?<=a)b ab y $& b
+(?<=a)b cb n - -
+(?<=a)b b n - -
+(?<!c)b ab y $& b
+(?<!c)b cb n - -
+(?<!c)b b y - -
+(?<!c)b b y $& b
+(?<%)b - c - Sequence (?<%...) not recognized
+(?:..)*a aba y $& aba
+(?:..)*?a aba y $& a
+^(?:b|a(?=(.)))*\1 abc y $& ab
+^(){3,5} abc y a$1 a
+^(a+)*ax aax y $1 a
+^((a|b)+)*ax aax y $1 a
+^((a|bc)+)*ax aax y $1 a
+(a|x)*ab cab y y$1 y
+(a)*ab cab y y$1 y
+(?:(?i)a)b ab y $& ab
+((?i)a)b ab y $&:$1 ab:a
+(?:(?i)a)b Ab y $& Ab
+((?i)a)b Ab y $&:$1 Ab:A
+(?:(?i)a)b aB n - -
+((?i)a)b aB n - -
+(?i:a)b ab y $& ab
+((?i:a))b ab y $&:$1 ab:a
+(?i:a)b Ab y $& Ab
+((?i:a))b Ab y $&:$1 Ab:A
+(?i:a)b aB n - -
+((?i:a))b aB n - -
+'(?:(?-i)a)b'i ab y $& ab
+'((?-i)a)b'i ab y $&:$1 ab:a
+'(?:(?-i)a)b'i aB y $& aB
+'((?-i)a)b'i aB y $&:$1 aB:a
+'(?:(?-i)a)b'i Ab n - -
+'((?-i)a)b'i Ab n - -
+'(?:(?-i)a)b'i aB y $& aB
+'((?-i)a)b'i aB y $1 a
+'(?:(?-i)a)b'i AB n - -
+'((?-i)a)b'i AB n - -
+'(?-i:a)b'i ab y $& ab
+'((?-i:a))b'i ab y $&:$1 ab:a
+'(?-i:a)b'i aB y $& aB
+'((?-i:a))b'i aB y $&:$1 aB:a
+'(?-i:a)b'i Ab n - -
+'((?-i:a))b'i Ab n - -
+'(?-i:a)b'i aB y $& aB
+'((?-i:a))b'i aB y $1 a
+'(?-i:a)b'i AB n - -
+'((?-i:a))b'i AB n - -
+'((?-i:a.))b'i a\nB n - -
+'((?s-i:a.))b'i a\nB y $1 a\n
+'((?s-i:a.))b'i B\nB n - -
+(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b))) cabbbb y $& cabbbb
+(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb))) caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb y $& caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+'(ab)\d\1'i Ab4ab y $1 Ab
+'(ab)\d\1'i ab4Ab y $1 ab
+foo\w*\d{4}baz foobar1234baz y $& foobar1234baz
+a(?{})b cabd y $& ab
+a(?{)b - c - Sequence (?{...}) not terminated or not {}-balanced
+a(?{{})b - c - Sequence (?{...}) not terminated or not {}-balanced
+a(?{}})b - c -
+a(?{"{"})b - c - Sequence (?{...}) not terminated or not {}-balanced
+a(?{"\{"})b cabd y $& ab
+a(?{"{"}})b - c - Unmatched right curly bracket
+a(?{$bl="\{"}).b caxbd y $bl {
+x(~~)*(?:(?:F)?)? x~~ y - -
+^a(?#xxx){3}c aaac y $& aaac
+'^a (?#xxx) (?#yyy) {3}c'x aaac y $& aaac
+(?<![cd])b dbcb n - -
+(?<![cd])[ab] dbaacb y $& a
+(?<!(c|d))b dbcb n - -
+(?<!(c|d))[ab] dbaacb y $& a
+(?<!cd)[ab] cdaccb y $& b
+^(?:a?b?)*$ a-- n - -
+((?s)^a(.))((?m)^b$) a\nb\nc\n y $1;$2;$3 a\n;\n;b
+((?m)^b$) a\nb\nc\n y $1 b
+(?m)^b a\nb\n y $& b
+(?m)^(b) a\nb\n y $1 b
+((?m)^b) a\nb\n y $1 b
+\n((?m)^b) a\nb\n y $1 b
+((?s).)c(?!.) a\nb\nc\n y $1 \n
+((?s).)c(?!.) a\nb\nc\n y $1:$& \n:\nc
+((?s)b.)c(?!.) a\nb\nc\n y $1 b\n
+((?s)b.)c(?!.) a\nb\nc\n y $1:$& b\n:b\nc
+^b a\nb\nc\n n - -
+()^b a\nb\nc\n n - -
+((?m)^b) a\nb\nc\n y $1 b
+(?(1)a|b) a n - -
+(?(1)b|a) a y $& a
+(x)?(?(1)a|b) a n - -
+(x)?(?(1)b|a) a y $& a
+()?(?(1)b|a) a y $& a
+()(?(1)b|a) a n - -
+()?(?(1)a|b) a y $& a
+^(\()?blah(?(1)(\)))$ (blah) y $2 )
+^(\()?blah(?(1)(\)))$ blah y ($2) ()
+^(\()?blah(?(1)(\)))$ blah) n - -
+^(\()?blah(?(1)(\)))$ (blah n - -
+^(\(+)?blah(?(1)(\)))$ (blah) y $2 )
+^(\(+)?blah(?(1)(\)))$ blah y ($2) ()
+^(\(+)?blah(?(1)(\)))$ blah) n - -
+^(\(+)?blah(?(1)(\)))$ (blah n - -
+(?(1?)a|b) a c - Switch condition not recognized
+(?(1)a|b|c) a c - Switch (?(condition)... contains too many branches
+(?(?{0})a|b) a n - -
+(?(?{0})b|a) a y $& a
+(?(?{1})b|a) a n - -
+(?(?{1})a|b) a y $& a
+(?(?!a)a|b) a n - -
+(?(?!a)b|a) a y $& a
+(?(?=a)b|a) a n - -
+(?(?=a)a|b) a y $& a
+(?=(a+?))(\1ab) aaab y $2 aab
+^(?=(a+?))\1ab aaab n - -
+(\w+:)+ one: y $1 one:
+$(?<=^(a)) a y $1 a
+(?=(a+?))(\1ab) aaab y $2 aab
+^(?=(a+?))\1ab aaab n - -
+([\w:]+::)?(\w+)$ abcd: n - -
+([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
+([\w:]+::)?(\w+)$ xy:z:::abcd iy $1-$2 xy:z:::-abcd
+^[^bcd]*(c+) aexycd y $1 c
+(a*)b+ caab y $1 aa
+([\w:]+::)?(\w+)$ abcd: n - -
+([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
+([\w:]+::)?(\w+)$ xy:z:::abcd iy $1-$2 xy:z:::-abcd
+^[^bcd]*(c+) aexycd y $1 c
+(?{$a=2})a*aa(?{local$a=$a+1})k*c(?{$b=$a}) yaaxxaaaacd y $b 3
+(?{$a=2})(a(?{local$a=$a+1}))*aak*c(?{$b=$a}) yaaxxaaaacd y $b 4
+(>a+)ab aaab n - -
+(?>a+)b aaab y - -
+([[:]+) a:[b]: iy $1 :[
+([[=]+) a=[b]= iy $1 =[
+([[.]+) a.[b]. iy $1 .[
+[a[:xyz: - c - Unmatched [
+[a[:xyz:] - c - POSIX class [:xyz:] unknown
+[a[:]b[:c] abc iy $& abc
+([a[:xyz:]b]+) pbaq c - POSIX class [:xyz:] unknown
+[a[:]b[:c] abc iy $& abc
+([[:alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
+([[:alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy
+([[:ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__-- ${nulnul}
+([[:cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ${nulnul}
+([[:digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 01
+([[:graph:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
+([[:lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd
+([[:print:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
+([[:punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 __--
+([[:space:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1
+([[:word:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__
+([[:upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
+([[:xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01
+([[:^alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
+([[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 __-- ${nulnul}${ffff}
+([[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff}
+([[:^cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
+([[:^digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd
+([[:^lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
+([[:^print:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ${nulnul}${ffff}
+([[:^punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy
+([[:^space:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
+([[:^word:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 -- ${nulnul}${ffff}
+([[:^upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd01
+([[:^xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 Xy__-- ${nulnul}${ffff}
+[[:foo:]] - c - POSIX class [:foo:] unknown
+[[:^foo:]] - c - POSIX class [:^foo:] unknown
+((?>a+)b) aaab y $1 aaab
+(?>(a+))b aaab y $1 aaa
+((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x
+(?<=x+)y - c - Variable length lookbehind not implemented
+a{37,17} - c - Can't do {n,m} with n > m
+\Z a\nb\n y $-[0] 3
+\z a\nb\n y $-[0] 4
+$ a\nb\n y $-[0] 3
+\Z b\na\n y $-[0] 3
+\z b\na\n y $-[0] 4
+$ b\na\n y $-[0] 3
+\Z b\na y $-[0] 3
+\z b\na y $-[0] 3
+$ b\na y $-[0] 3
+'\Z'm a\nb\n y $-[0] 3
+'\z'm a\nb\n y $-[0] 4
+'$'m a\nb\n y $-[0] 1
+'\Z'm b\na\n y $-[0] 3
+'\z'm b\na\n y $-[0] 4
+'$'m b\na\n y $-[0] 1
+'\Z'm b\na y $-[0] 3
+'\z'm b\na y $-[0] 3
+'$'m b\na y $-[0] 1
+a\Z a\nb\n n - -
+a\z a\nb\n n - -
+a$ a\nb\n n - -
+a\Z b\na\n y $-[0] 2
+a\z b\na\n n - -
+a$ b\na\n y $-[0] 2
+a\Z b\na y $-[0] 2
+a\z b\na y $-[0] 2
+a$ b\na y $-[0] 2
+'a\Z'm a\nb\n n - -
+'a\z'm a\nb\n n - -
+'a$'m a\nb\n y $-[0] 0
+'a\Z'm b\na\n y $-[0] 2
+'a\z'm b\na\n n - -
+'a$'m b\na\n y $-[0] 2
+'a\Z'm b\na y $-[0] 2
+'a\z'm b\na y $-[0] 2
+'a$'m b\na y $-[0] 2
+aa\Z aa\nb\n n - -
+aa\z aa\nb\n n - -
+aa$ aa\nb\n n - -
+aa\Z b\naa\n y $-[0] 2
+aa\z b\naa\n n - -
+aa$ b\naa\n y $-[0] 2
+aa\Z b\naa y $-[0] 2
+aa\z b\naa y $-[0] 2
+aa$ b\naa y $-[0] 2
+'aa\Z'm aa\nb\n n - -
+'aa\z'm aa\nb\n n - -
+'aa$'m aa\nb\n y $-[0] 0
+'aa\Z'm b\naa\n y $-[0] 2
+'aa\z'm b\naa\n n - -
+'aa$'m b\naa\n y $-[0] 2
+'aa\Z'm b\naa y $-[0] 2
+'aa\z'm b\naa y $-[0] 2
+'aa$'m b\naa y $-[0] 2
+aa\Z ac\nb\n n - -
+aa\z ac\nb\n n - -
+aa$ ac\nb\n n - -
+aa\Z b\nac\n n - -
+aa\z b\nac\n n - -
+aa$ b\nac\n n - -
+aa\Z b\nac n - -
+aa\z b\nac n - -
+aa$ b\nac n - -
+'aa\Z'm ac\nb\n n - -
+'aa\z'm ac\nb\n n - -
+'aa$'m ac\nb\n n - -
+'aa\Z'm b\nac\n n - -
+'aa\z'm b\nac\n n - -
+'aa$'m b\nac\n n - -
+'aa\Z'm b\nac n - -
+'aa\z'm b\nac n - -
+'aa$'m b\nac n - -
+aa\Z ca\nb\n n - -
+aa\z ca\nb\n n - -
+aa$ ca\nb\n n - -
+aa\Z b\nca\n n - -
+aa\z b\nca\n n - -
+aa$ b\nca\n n - -
+aa\Z b\nca n - -
+aa\z b\nca n - -
+aa$ b\nca n - -
+'aa\Z'm ca\nb\n n - -
+'aa\z'm ca\nb\n n - -
+'aa$'m ca\nb\n n - -
+'aa\Z'm b\nca\n n - -
+'aa\z'm b\nca\n n - -
+'aa$'m b\nca\n n - -
+'aa\Z'm b\nca n - -
+'aa\z'm b\nca n - -
+'aa$'m b\nca n - -
+ab\Z ab\nb\n n - -
+ab\z ab\nb\n n - -
+ab$ ab\nb\n n - -
+ab\Z b\nab\n y $-[0] 2
+ab\z b\nab\n n - -
+ab$ b\nab\n y $-[0] 2
+ab\Z b\nab y $-[0] 2
+ab\z b\nab y $-[0] 2
+ab$ b\nab y $-[0] 2
+'ab\Z'm ab\nb\n n - -
+'ab\z'm ab\nb\n n - -
+'ab$'m ab\nb\n y $-[0] 0
+'ab\Z'm b\nab\n y $-[0] 2
+'ab\z'm b\nab\n n - -
+'ab$'m b\nab\n y $-[0] 2
+'ab\Z'm b\nab y $-[0] 2
+'ab\z'm b\nab y $-[0] 2
+'ab$'m b\nab y $-[0] 2
+ab\Z ac\nb\n n - -
+ab\z ac\nb\n n - -
+ab$ ac\nb\n n - -
+ab\Z b\nac\n n - -
+ab\z b\nac\n n - -
+ab$ b\nac\n n - -
+ab\Z b\nac n - -
+ab\z b\nac n - -
+ab$ b\nac n - -
+'ab\Z'm ac\nb\n n - -
+'ab\z'm ac\nb\n n - -
+'ab$'m ac\nb\n n - -
+'ab\Z'm b\nac\n n - -
+'ab\z'm b\nac\n n - -
+'ab$'m b\nac\n n - -
+'ab\Z'm b\nac n - -
+'ab\z'm b\nac n - -
+'ab$'m b\nac n - -
+ab\Z ca\nb\n n - -
+ab\z ca\nb\n n - -
+ab$ ca\nb\n n - -
+ab\Z b\nca\n n - -
+ab\z b\nca\n n - -
+ab$ b\nca\n n - -
+ab\Z b\nca n - -
+ab\z b\nca n - -
+ab$ b\nca n - -
+'ab\Z'm ca\nb\n n - -
+'ab\z'm ca\nb\n n - -
+'ab$'m ca\nb\n n - -
+'ab\Z'm b\nca\n n - -
+'ab\z'm b\nca\n n - -
+'ab$'m b\nca\n n - -
+'ab\Z'm b\nca n - -
+'ab\z'm b\nca n - -
+'ab$'m b\nca n - -
+abb\Z abb\nb\n n - -
+abb\z abb\nb\n n - -
+abb$ abb\nb\n n - -
+abb\Z b\nabb\n y $-[0] 2
+abb\z b\nabb\n n - -
+abb$ b\nabb\n y $-[0] 2
+abb\Z b\nabb y $-[0] 2
+abb\z b\nabb y $-[0] 2
+abb$ b\nabb y $-[0] 2
+'abb\Z'm abb\nb\n n - -
+'abb\z'm abb\nb\n n - -
+'abb$'m abb\nb\n y $-[0] 0
+'abb\Z'm b\nabb\n y $-[0] 2
+'abb\z'm b\nabb\n n - -
+'abb$'m b\nabb\n y $-[0] 2
+'abb\Z'm b\nabb y $-[0] 2
+'abb\z'm b\nabb y $-[0] 2
+'abb$'m b\nabb y $-[0] 2
+abb\Z ac\nb\n n - -
+abb\z ac\nb\n n - -
+abb$ ac\nb\n n - -
+abb\Z b\nac\n n - -
+abb\z b\nac\n n - -
+abb$ b\nac\n n - -
+abb\Z b\nac n - -
+abb\z b\nac n - -
+abb$ b\nac n - -
+'abb\Z'm ac\nb\n n - -
+'abb\z'm ac\nb\n n - -
+'abb$'m ac\nb\n n - -
+'abb\Z'm b\nac\n n - -
+'abb\z'm b\nac\n n - -
+'abb$'m b\nac\n n - -
+'abb\Z'm b\nac n - -
+'abb\z'm b\nac n - -
+'abb$'m b\nac n - -
+abb\Z ca\nb\n n - -
+abb\z ca\nb\n n - -
+abb$ ca\nb\n n - -
+abb\Z b\nca\n n - -
+abb\z b\nca\n n - -
+abb$ b\nca\n n - -
+abb\Z b\nca n - -
+abb\z b\nca n - -
+abb$ b\nca n - -
+'abb\Z'm ca\nb\n n - -
+'abb\z'm ca\nb\n n - -
+'abb$'m ca\nb\n n - -
+'abb\Z'm b\nca\n n - -
+'abb\z'm b\nca\n n - -
+'abb$'m b\nca\n n - -
+'abb\Z'm b\nca n - -
+'abb\z'm b\nca n - -
+'abb$'m b\nca n - -
+(^|x)(c) ca y $2 c
+a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz x n - -
+a(?{$a=2;$b=3;($b)=$a})b yabz y $b 2
+round\(((?>[^()]+))\) _I(round(xs * sz),1) y $1 xs * sz
+'((?x:.) )' x y $1- x -
+'((?-x:.) )'x x y $1- x-
+foo.bart foo.bart y - -
+'^d[x][x][x]'m abcd\ndxxx y - -
+.X(.+)+X bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - - # TODO: ICU doesn't optimize on trailing literals in pattern.
+.X(.+)+XX bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.XX(.+)+X bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.X(.+)+X bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.X(.+)+XX bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.XX(.+)+X bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.X(.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.X(.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.XX(.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.X(.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.X(.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.XX(.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.[X](.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.[X](.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.[X][X](.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
+.[X](.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.[X](.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+.[X][X](.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
+tt+$ xxxtt y - -
+([a-\d]+) za-9z yi $1 a-9
+([\d-z]+) a0-za yi $1 0-z
+([\d-\s]+) a0- z yi $1 0-
+([a-[:digit:]]+) za-9z iy $1 a-9
+([[:digit:]-z]+) =0-z= iy $1 0-z
+([[:digit:]-[:alpha:]]+) =0-z= iy $1 0-z
+\GX.*X aaaXbX n - -
+(\d+\.\d+) 3.1415926 y $1 3.1415926
+(\ba.{0,10}br) have a web browser y $1 a web br
+'\.c(pp|xx|c)?$'i Changes n - -
+'\.c(pp|xx|c)?$'i IO.c y - -
+'(\.c(pp|xx|c)?$)'i IO.c y $1 .c
+^([a-z]:) C:/ n - -
+'^\S\s+aa$'m \nx aa y - -
+(^|a)b ab y - -
+^([ab]*?)(b)?(c)$ abac y -$2- --
+(\w)?(abc)\1b abcab n - -
+^(?:.,){2}c a,b,c y - -
+^(.,){2}c a,b,c y $1 b,
+^(?:[^,]*,){2}c a,b,c y - -
+^([^,]*,){2}c a,b,c y $1 b,
+^([^,]*,){3}d aaa,b,c,d y $1 c,
+^([^,]*,){3,}d aaa,b,c,d y $1 c,
+^([^,]*,){0,3}d aaa,b,c,d y $1 c,
+^([^,]{1,3},){3}d aaa,b,c,d y $1 c,
+^([^,]{1,3},){3,}d aaa,b,c,d y $1 c,
+^([^,]{1,3},){0,3}d aaa,b,c,d y $1 c,
+^([^,]{1,},){3}d aaa,b,c,d y $1 c,
+^([^,]{1,},){3,}d aaa,b,c,d y $1 c,
+^([^,]{1,},){0,3}d aaa,b,c,d y $1 c,
+^([^,]{0,3},){3}d aaa,b,c,d y $1 c,
+^([^,]{0,3},){3,}d aaa,b,c,d y $1 c,
+^([^,]{0,3},){0,3}d aaa,b,c,d y $1 c,
+(?i) y - -
+'(?!\A)x'm a\nxb\n y - -
+^(a(b)?)+$ aba iy -$1-$2- -a--
+'^.{9}abc.*\n'm 123\nabcabcabcabc\n y - -
+^(a)?a$ a y -$1- --
+^(a)?(?(1)a|b)+$ a n - -
+^(a\1?)(a\1?)(a\2?)(a\3?)$ aaaaaa y $1,$2,$3,$4 a,aa,a,aa
+^(a\1?){4}$ aaaaaa y $1 aa
+^(0+)?(?:x(1))? x1 y - -
+^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))? 012cxx0190 y - -
+^(b+?|a){1,2}c bbbac y $1 a
+^(b+?|a){1,2}c bbbbac y $1 a
+\((\w\. \w+)\) cd. (A. Tw) y -$1- -A. Tw-
+((?:aaaa|bbbb)cccc)? aaaacccc y - -
+((?:aaaa|bbbb)cccc)? bbbbcccc y - -
+(a)?(a)+ a y $1:$2 :a -
+(ab)?(ab)+ ab y $1:$2 :ab -
+(abc)?(abc)+ abc y $1:$2 :abc -
+'b\s^'m a\nb\n n - -
+\ba a y - -
+^(a(??{"(?!)"})|(a)(?{1}))b ab yi $2 a # [ID 20010811.006]
+ab(?i)cd AbCd n - - # [ID 20010809.023]
+ab(?i)cd abCd y - -
+(A|B)*(?(1)(CD)|(CD)) CD y $2-$3 -CD
+(A|B)*(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
+(A|B)*?(?(1)(CD)|(CD)) CD y $2-$3 -CD # [ID 20010803.016]
+(A|B)*?(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
+'^(o)(?!.*\1)'i Oo n - -
+(.*)\d+\1 abc12bc y $1 bc
+(?m:(foo\s*$)) foo\n bar y $1 foo
+(.*)c abcd y $1 ab
+(.*)(?=c) abcd y $1 ab
+(.*)(?=c)c abcd yB $1 ab
+(.*)(?=b|c) abcd y $1 ab
+(.*)(?=b|c)c abcd y $1 ab
+(.*)(?=c|b) abcd y $1 ab
+(.*)(?=c|b)c abcd y $1 ab
+(.*)(?=[bc]) abcd y $1 ab
+(.*)(?=[bc])c abcd yB $1 ab
+(.*)(?<=b) abcd y $1 ab
+(.*)(?<=b)c abcd y $1 ab
+(.*)(?<=b|c) abcd y $1 abc
+(.*)(?<=b|c)c abcd y $1 ab
+(.*)(?<=c|b) abcd y $1 abc
+(.*)(?<=c|b)c abcd y $1 ab
+(.*)(?<=[bc]) abcd y $1 abc
+(.*)(?<=[bc])c abcd y $1 ab
+(.*?)c abcd y $1 ab
+(.*?)(?=c) abcd y $1 ab
+(.*?)(?=c)c abcd yB $1 ab
+(.*?)(?=b|c) abcd y $1 a
+(.*?)(?=b|c)c abcd y $1 ab
+(.*?)(?=c|b) abcd y $1 a
+(.*?)(?=c|b)c abcd y $1 ab
+(.*?)(?=[bc]) abcd y $1 a
+(.*?)(?=[bc])c abcd yB $1 ab
+(.*?)(?<=b) abcd y $1 ab
+(.*?)(?<=b)c abcd y $1 ab
+(.*?)(?<=b|c) abcd y $1 ab
+(.*?)(?<=b|c)c abcd y $1 ab
+(.*?)(?<=c|b) abcd y $1 ab
+(.*?)(?<=c|b)c abcd y $1 ab
+(.*?)(?<=[bc]) abcd y $1 ab
+(.*?)(?<=[bc])c abcd y $1 ab
+2(]*)?$\1 2 y $& 2
+(??{}) x yi - -
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/readme.txt b/Build/source/libs/icu/icu-xetex/test/testdata/readme.txt
new file mode 100644
index 00000000000..cb9bc2855a2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/readme.txt
@@ -0,0 +1,8 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 1998-2000, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+This directory contains data files used to test International Collectanea for Unicode.
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/regextst.txt b/Build/source/libs/icu/icu-xetex/test/testdata/regextst.txt
new file mode 100644
index 00000000000..afc274e84ef
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/regextst.txt
@@ -0,0 +1,1835 @@
+# Copyright (c) 2001-2007 International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+# file:
+#
+# ICU regular expression test cases.
+#
+# format: one test case per line,
+# <test case> = <pattern> <flags> <match string> [# comment]
+# <pattern> = "<regular expression pattern>"
+# <match string> = "<tagged string>"
+# the quotes on the pattern and match string can be " or ' or /
+# <tagged string> = text, with the start and end of each
+# capture group tagged with <n>...</n>. The overall match,
+# if any, is group 0, as in <0>matched text</0>
+# <flags> = any combination of
+# i case insensitive match
+# x free spacing and comments
+# s dot-matches-all mode
+# m multi-line mode. $ and ^ match at embedded new-lines
+# v If icu configured without break iteration, this
+# regex test pattern should not compile.
+# d dump the compiled pattern
+# t trace operation of match engine.
+# 2-9 a digit between 2 and 9, specifies the number of
+# times to execute find(). The expected results are
+# for the last find() in the sequence.
+# White space must be present between the flags and the match string.
+#
+
+
+# Capturing parens
+".(..)." "<0>a<1>bc</1>d</0>"
+ ".*\A( +hello)" "<0><1> hello</1></0>"
+"(hello)|(goodbye)" "<0><1>hello</1></0>"
+"(hello)|(goodbye)" "<0><2>goodbye</2></0>"
+"abc( +( inner(X?) +) xyz)" "leading cruft <0>abc<1> <2> inner<3></3> </2> xyz</1></0> cruft"
+"\s*([ixsmdt]*)([:letter:]*)" "<0> <1>d</1><2></2></0> "
+
+# Non-capturing parens (?: stuff). Groups, but does not capture.
+"(?:abc)*(tail)" "<0>abcabcabc<1>tail</1></0>"
+
+# Non-greedy *? quantifier
+".*?(abc)" "<0> abx <1>abc</1></0> abc abc abc"
+".*(abc)" "<0> abx abc abc abc <1>abc</1></0>"
+
+"((?:abc |xyz )*?)abc " "<0><1>xyz </1>abc </0>abc abc "
+"((?:abc |xyz )*)abc " "<0><1>xyz abc abc </1>abc </0>"
+
+# Non-greedy +? quantifier
+"(a+?)(a*)" "<0><1>a</1><2>aaaaaaaaaaaa</2></0>"
+"(a+)(a*)" "<0><1>aaaaaaaaaaaaa</1><2></2></0>"
+
+"((ab)+?)((ab)*)" "<0><1><2>ab</2></1><3>ababababab<4>ab</4></3></0>"
+"((ab)+)((ab)*)" "<0><1>abababababab<2>ab</2></1><3></3></0>"
+
+# Non-greedy ?? quantifier
+"(ab)(ab)??(ab)??(ab)??(ab)??c" "<0><1>ab</1><4>ab</4><5>ab</5>c</0>"
+
+# Unicode Properties as naked elements in a pattern
+"\p{Lu}+" "here we go ... <0>ABC</0> and no more."
+"(\p{L}+)(\P{L}*?) (\p{Zs}*)" "7999<0><1>letters</1><2>4949%^&*(</2> <3> </3></0>"
+
+# \w and \W
+"\w+" " $%^&*( <0>hello123</0>%^&*("
+"\W+" "<0> $%^&*( </0>hello123%^&*("
+
+# \A match at beginning of input only.
+ ".*\Ahello" "<0>hello</0> hello"
+ ".*hello" "<0>hello hello</0>"
+".*\Ahello" "stuff\nhello" # don't match after embedded new-line.
+
+# \b \B
+#
+".*?\b(.).*" "<0> $%^&*( <1>h</1>ello123%^&*()gxx</0>"
+"\ba\b" "-<0>a</0>"
+"\by\b" "xy"
+
+# Finds first chars of up to 5 words
+"(?:.*?\b(\w))?(?:.*?\b(\w))?(?:.*?\b(\w))?(?:.*?\b(\w))?(?:.*?\b(\w))?" "<0><1>T</1>the <2>q</2>ick <3>b</3>rown <4>f</4></0>ox"
+
+"H.*?((?:\B.)+)" "<0>H<1>ello</1></0> "
+".*?((?:\B.)+).*?((?:\B.)+).*?((?:\B.)+)" "<0>H<1>ello</1> <2> </2>g<3>oodbye</3></0> "
+
+"(?:.*?\b(.))?(?:.*?\b(.))?(?:.*?\b(.))?(?:.*?\b(.))?(?:.*?\b(.))?.*" "<0> \u0301 \u0301<1>A</1>\u0302BC\u0303\u0304<2> </2>\u0305 \u0306<3>X</3>\u0307Y\u0308</0>"
+
+
+#
+# Unicode word boundary mode
+#
+"(?w).*?\b" v "<0></0>hello, world"
+"(?w).*?(\b.+?\b).*" v "<0><1> </1> 123.45 </0>"
+"(?w).*?(\b\d.*?\b).*" v "<0> <1>123.45</1> </0>"
+".*?(\b.+?\b).*" "<0> <1>123</1>.45 </0>"
+"(?w:.*?(\b\d.*?\b).*)" v "<0> <1>123.45</1> </0>"
+"(?w:.*?(\b.+?\b).*)" v "<0><1>don't</1> </0>"
+"(?w:.+?(\b\S.+?\b).*)" v "<0> <1>don't</1> </0>"
+"(?w:(\b.+?)(\b.+?)(\b.+?)(\b.+?)(\b.+?)(\b.+?)(\b.+?).*)" v "<0><1>.</1><2> </2><3>,</3><4>:</4><5>$</5><6>37,000.50</6><7> </7> </0>"
+
+
+# . does not match new-lines
+"." "\u000a\u000d\u0085\u000c\u000b\u2028\u2029<0>X</0>\u000aY"
+"A." "A\u000a "# no match
+
+# \d for decimal digits
+"\d*" "<0>0123456789\u0660\u06F9\u0969\u0A66\u17E2\uFF10\U0001D7CE\U0001D7FF</0>non-digits"
+"\D+" "<0>non digits</0>"
+"\D*(\d*)(\D*)" "<0>non-digits<1>3456666</1><2>more non digits</2></0>"
+
+# \Q...\E quote mode
+"hel\Qlo, worl\Ed" "<0>hello, world</0>"
+"\Q$*^^(*)?\A\E(a*)" "<0>$*^^(*)?\\A<1>aaaaaaaaaaaaaaa</1></0>"
+
+# \S and \s space characters
+"\s+" "not_space<0> \t \r \n \u3000 \u2004 \u2028 \u2029</0>xyz"
+"(\S+).*?(\S+).*" "<0><1>Not-spaces</1> <2>more-non-spaces</2> </0>"
+
+# \X consume one Grapheme Cluster.
+"(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?" "<0><1>A</1><2>B</2><3> </3><4>\r\n</4></0>"
+"(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?" "<0><1>A\u0301</1><2>\n</2><3>\u0305</3><4>a\u0302\u0303\u0304</4></0>"
+"(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?" "<0><1>\u1100\u1161\u11a8</1><2>\u115f\u11a2\u11f9</2></0>"
+"(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?" "<0><1>\u1100\uac01</1><2>\uac02</2><3>\uac03\u11b0</3></0>"
+"(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?(\X)?" "<0><1>\u1100\u1101\uac02\u0301</1><2>\u1100</2></0>"
+
+# ^ matches only at beginning of line
+".*^(Hello)" "<0><1>Hello</1></0> Hello Hello Hello Goodbye"
+".*(Hello)" "<0>Hello Hello Hello <1>Hello</1></0> Goodbye"
+".*^(Hello)" " Hello Hello Hello Hello Goodbye"# No Match
+
+# $ matches only at end of line, or before a newline preceding the end of line
+".*?(Goodbye)$" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>"
+".*?(Goodbye)" "<0>Hello <1>Goodbye</1></0> Goodbye Goodbye"
+".*?(Goodbye)$" "Hello Goodbye> Goodbye Goodbye "# No Match
+
+".*?(Goodbye)$" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>\n"
+".*?(Goodbye)$" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>\n"
+".*?(Goodbye)$" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>\r\n"
+".*?(Goodbye)$" "Hello Goodbye Goodbye Goodbye\n\n"# No Match
+
+# \Z matches at end of input, like $ with default flags.
+".*?(Goodbye)\Z" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>"
+".*?(Goodbye)" "<0>Hello <1>Goodbye</1></0> Goodbye Goodbye"
+".*?(Goodbye)\Z" "Hello Goodbye> Goodbye Goodbye "# No Match
+"here$" "here\nthe end"# No Match
+
+".*?(Goodbye)\Z" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>\n"
+".*?(Goodbye)\Z" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>\n"
+".*?(Goodbye)\Z" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>\r\n"
+".*?(Goodbye)\Z" "Hello Goodbye Goodbye Goodbye\n\n"# No Match
+
+# \z matches only at the end of string.
+# no special treatment of new lines.
+# no dependencies on flag settings.
+".*?(Goodbye)\z" "<0>Hello Goodbye Goodbye <1>Goodbye</1></0>"
+".*?(Goodbye)\z" "Hello Goodbye Goodbye Goodbye "# No Match
+"here$" "here\nthe end"# No Match
+
+".*?(Goodbye)\z" "Hello Goodbye Goodbye Goodbye\n"# No Match
+".*?(Goodbye)\n\z" "<0>Hello Goodbye Goodbye <1>Goodbye</1>\n</0>"
+
+# (?# comment) doesn't muck up pattern
+"Hello (?# this is a comment) world" " <0>Hello world</0>..."
+
+# Check some implementation corner cases base on the way literal strings are compiled.
+"A" "<0>A</0>"
+"AB" "<0>AB</0>ABABAB"
+"AB+" "<0>ABBB</0>A"
+"AB+" "<0>AB</0>ABAB"
+"ABC+" "<0>ABC</0>ABC"
+"ABC+" "<0>ABCCCC</0>ABC"
+"(?:ABC)+" "<0>ABCABCABC</0>D"
+"(?:ABC)DEF+" "<0>ABCDEFFF</0>D"
+"AB\.C\eD\u0666E" "<0>AB.C\u001BD\u0666E</0>F"
+"ab\Bde" "<0>abde</0>"
+
+# loop breaking
+"(a?)*" "<0><1></1></0>xyz"
+"(a?)+" "<0><1></1></0>xyz"
+"^(?:a?b?)*$" "a--"
+"(x?)*xyz" "<0>xx<1></1>xyz</0>" # Sligthly wierd, but correct. The "last" time through (x?),
+ # it matches the empty string.
+
+# {min,max} iteration qualifier
+"A{3}BC" "<0>AAABC</0>"
+
+"(ABC){2,3}AB" "no matchAB"
+"(ABC){2,3}AB" "ABCAB"
+"(ABC){2,3}AB" "<0>ABC<1>ABC</1>AB</0>"
+"(ABC){2,3}AB" "<0>ABCABC<1>ABC</1>AB</0>"
+"(ABC){2,3}AB" "<0>ABCABC<1>ABC</1>AB</0>CAB"
+
+"(ABC){2}AB" "ABCAB"
+"(ABC){2}AB" "<0>ABC<1>ABC</1>AB</0>"
+"(ABC){2}AB" "<0>ABC<1>ABC</1>AB</0>CAB"
+"(ABC){2}AB" "<0>ABC<1>ABC</1>AB</0>CABCAB"
+
+"(ABC){2,}AB" "ABCAB"
+"(ABC){2,}AB" "<0>ABC<1>ABC</1>AB</0>"
+"(ABC){2,}AB" "<0>ABCABC<1>ABC</1>AB</0>"
+"(ABC){2,}AB" "<0>ABCABCABC<1>ABC</1>AB</0>"
+
+"X{0,0}ABC" "<0>ABC</0>"
+"X{0,1}ABC" "<0>ABC</0>"
+
+"(?:Hello(!{1,3}) there){1}" "Hello there"
+"(?:Hello(!{1,3}) there){1}" "<0>Hello<1>!</1> there</0>"
+"(?:Hello(!{1,3}) there){1}" "<0>Hello<1>!!</1> there</0>"
+"(?:Hello(!{1,3}) there){1}" "<0>Hello<1>!!!</1> there</0>"
+"(?:Hello(!{1,3}) there){1}" "Hello!!!! there"
+
+# Nongreedy {min,max}? intervals
+"(ABC){2,3}?AB" "no matchAB"
+"(ABC){2,3}?AB" "ABCAB"
+"(ABC){2,3}?AB" "<0>ABC<1>ABC</1>AB</0>"
+"(ABC){2,3}?AB" "<0>ABC<1>ABC</1>AB</0>CAB"
+"(ABC){2,3}?AB" "<0>ABC<1>ABC</1>AB</0>CABCAB"
+"(ABC){2,3}?AX" "<0>ABCABC<1>ABC</1>AX</0>"
+"(ABC){2,3}?AX" "ABC<0>ABCABC<1>ABC</1>AX</0>"
+
+# Possessive {min,max}+ intervals
+"(ABC){2,3}+ABC" "ABCABCABC"
+"(ABC){1,2}+ABC" "<0>ABC<1>ABC</1>ABC</0>"
+"(?:(.)\1){2,5}+." "<0>aabbcc<1>d</1>de</0>x"
+
+
+# Atomic Grouping
+"(?>.*)abc" "abcabcabc" # no match. .* consumed entire string.
+"(?>(abc{2,4}?))(c*)" "<0><1>abcc</1><2>ccc</2></0>ddd"
+"(\.\d\d(?>[1-9]?))\d+" "1.625"
+"(\.\d\d(?>[1-9]?))\d+" "1<0><1>.625</1>0</0>"
+
+# Possessive *+
+"(abc)*+a" "abcabcabc"
+"(abc)*+a" "<0>abc<1>abc</1>a</0>b"
+"(a*b)*+a" "<0><1>aaaab</1>a</0>aaa"
+
+# Possessive ?+
+"c?+ddd" "<0>cddd</0>"
+"c?+cddd" "cddd"
+"c?cddd" "<0>cddd</0>"
+
+# Back Reference
+"(?:ab(..)cd\1)*" "<0>ab23cd23ab<1>ww</1>cdww</0>abxxcdyy"
+"ab(?:c|(d?))(\1)" "<0>ab<1><2></2></1></0>c"
+"ab(?:c|(d?))(\1)" "<0>ab<1>d</1><2>d</2></0>"
+"ab(?:c|(d?))(\1)" "<0>ab<1></1><2></2></0>e"
+"ab(?:c|(d?))(\1)" "<0>ab<1></1><2></2></0>"
+
+# Case Insensitive
+"aBc" i "<0>ABC</0>"
+"a[^bc]d" i "ABD"
+'((((((((((a))))))))))\10' i "<0><1><2><3><4><5><6><7><8><9><10>A</10></9></8></7></6></5></4></3></2></1>A</0>"
+
+"(?:(?i)a)b" "<0>Ab</0>"
+"ab(?i)cd" "<0>abCd</0>"
+"ab$cd" "abcd"
+
+# White space handling
+"a b" "ab"
+"abc " "abc"
+"abc " "<0>abc </0>"
+"ab[cd e]z" "<0>ab z</0>"
+"ab\ c" "<0>ab c</0> "
+"ab c" "<0>ab c</0> "
+"ab c" x "ab c "
+"ab\ c" x "<0>ab c</0> "
+
+
+#Multi-line mode
+'b\s^' m "a\nb\n"
+
+# Free-spacing mode
+"a b c # this is a comment" x "<0>abc</0> "
+'^a (?#xxx) (?#yyy) {3}c' x "<0>aaac</0>"
+"a b c [x y z]" x "abc "
+"a b c [x y z]" x "a b c "
+"a b c [x y z]" x "<0>abcx</0>yz"
+"a b c [x y z]" x "<0>abcy</0>yz"
+
+#
+# Look Behind
+#
+"(?<=a)b" "a<0>b</0>"
+"(.*)(?<=[bc])" "<0><1>abc</1></0>d"
+"(?<=(abc))def" "<1>abc</1><0>def</0>" # lookbehind precedes main match.
+"(?<=ab|abc)xyz" "abwxyz" # ab matches, but not far enough.
+"(?<=abc)cde" "abcde"
+"(?<=abc|ab)cde" "ab<0>cde</0>"
+"(?<=abc|ab)cde" "abc<0>cde</0>"
+
+"(?<=bc?c?c?)cd" "ab<0>cd</0>"
+"(?<=bc?c?c?)cd" "abc<0>cd</0>"
+"(?<=bc?c?c?)cd" "abcc<0>cd</0>"
+"(?<=bc?c?c?)cd" "abccc<0>cd</0>"
+"(?<=bc?c?c?)cd" "abcccccd"
+"(?<=bc?c?c?)c+d" "ab<0>cccccd</0>"
+
+".*(?<=: ?)(\w*)" "<0>1:one 2: two 3:<1>three</1></0> "
+
+#
+# Named Characters
+#
+"a\N{LATIN SMALL LETTER B}c" "<0>abc</0>"
+"a\N{LATIN SMALL LETTER B}c" i "<0>abc</0>"
+"a\N{LATIN SMALL LETTER B}c" i "<0>aBc</0>"
+"a\N{LATIN SMALL LETTER B}c" "aBc"
+
+"\N{FULL STOP}*" "<0>...</0>abc"
+
+"$" "abc<0></0>"
+
+#
+# Optimizations of .* at end of patterns
+#
+"abc.*" "<0>abcdef</0>"
+"abc.*$" "<0>abcdef</0>"
+"abc(.*)" "<0>abc<1>def</1></0>"
+"abc(.*)" "<0>abc<1></1></0>"
+"abc.*" "<0>abc</0>\ndef"
+"abc.*" s "<0>abc\ndef</0>"
+"abc.*$" s "<0>abc\ndef</0>"
+"abc.*$" "abc\ndef"
+"abc.*$" m "<0>abc</0>\ndef"
+"abc.*\Z" m "abc\ndef"
+"abc.*\Z" sm "<0>abc\ndef</0>"
+
+"abc*" "<0>abccc</0>d"
+"abc*$" "<0>abccc</0>"
+"ab(?:ab[xyz]\s)*" "<0>ababy abx </0>abc"
+
+"(?:(abc)|a)(?:bc)+" "<0>abc</0>"
+"(?:(abc)|a)(?:bc)*" "<0><1>abc</1></0>"
+"^[+\-]?[0-9]*\.?[0-9]*" "<0>123.456</0>"
+
+"ab.+yz" "<0>abc12345xyz</0>ttt"
+"ab.+yz" s "<0>abc12345xyz</0>ttt"
+
+"ab.+yz" "abc123\n45xyzttt"
+"ab.+yz" s "<0>abc12\n345xyz</0>ttt"
+
+"ab[0-9]+yz" "---abyz+++"
+"ab[0-9]+yz" "---<0>ab1yz</0>+++"
+"ab[0-9]+yz" "---<0>ab12yz</0>+++"
+"ab[0-9]+yz" "---<0>ab123456yz</0>+++"
+
+"ab([0-9]+|[A-Z]+)yz" "---abyz+++"
+"ab([0-9]+|[A-Z]+)yz" "---<0>ab<1>1</1>yz</0>+++"
+"ab([0-9]+|[A-Z]+)yz" "---<0>ab<1>12</1>yz</0>+++"
+"ab([0-9]+|[A-Z]+)yz" "---<0>ab<1>A</1>yz</0>+++"
+"ab([0-9]+|[A-Z]+)yz" "---<0>ab<1>AB</1>yz</0>+++"
+"ab([0-9]+|[A-Z]+)yz" "---<0>ab<1>ABCDE</1>yz</0>+++"
+
+#
+# Hex format \x escaping
+#
+"ab\x63" "<0>abc</0>"
+"ab\x09w" "<0>ab\u0009w</0>"
+"ab\xabcdc" "<0>ab\u00abcdc</0>"
+"ab\x{abcd}c" "<0>ab\uabcdc</0>"
+"ab\x{101234}c" "<0>ab\U00101234c</0>"
+"abα" "<0>abα</0>"
+
+
+#
+# \u Surrogate Pairs
+#
+"\ud800\udc00" "<0>\U00010000</0>"
+"\ud800\udc00*" "<0>\U00010000\U00010000\U00010000</0>\U00010001"
+"\ud800\ud800\udc00" "<0>\ud800\U00010000</0>\U00010000\U00010000\U00010001"
+"(\ud800)(\udc00)" "\U00010000"
+
+
+#
+# Bug 3225
+
+"1|9" "<0>1</0>"
+"1|9" "<0>9</0>"
+"1*|9" "<0>1</0>"
+"1*|9" "<0></0>9"
+
+"(?:a|ac)d" "<0>acd</0>"
+"a|ac" "<0>a</0>c"
+
+#
+# Bug 3320
+#
+"(a([^ ]+)){0,} (c)" "<0><1>a<2>b</2></1> <3>c</3></0> "
+"(a([^ ]+))* (c)" "<0><1>a<2>b</2></1> <3>c</3></0> "
+
+#
+# Bug 3436
+#
+"(.*?) *$" "<0><1>test</1> </0>"
+
+#
+# Bug 4034
+#
+"\D" "<0>A</0>BC\u00ffDEF"
+"\d" "ABC\u00ffDEF"
+"\D" "<0>\u00ff</0>DEF"
+"\d" "\u00ffDEF"
+"\D" "123<0>\u00ff</0>DEF"
+"\D" "<0>\u0100</0>DEF"
+"\D" "123<0>\u0100</0>DEF"
+
+#
+#bug 4024, new line sequence handling
+#
+"(?m)^" "<0></0>AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+"(?m)^" 2 "AA\u000d\u000a<0></0>BB\u000d\u000aCC\u000d\u000a"
+"(?m)^" 3 "AA\u000d\u000aBB\u000d\u000a<0></0>CC\u000d\u000a"
+"(?m)^" 4 "AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+
+"(?m)$" "AA<0></0>\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+"(?m)$" 2 "AA\u000d\u000aBB<0></0>\u000d\u000aCC\u000d\u000a"
+"(?m)$" 3 "AA\u000d\u000aBB\u000d\u000aCC<0></0>\u000d\u000a"
+"(?m)$" 4 "AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a<0></0>"
+"(?m)$" 5 "AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+
+"$" "AA\u000d\u000aBB\u000d\u000aCC<0></0>\u000d\u000a"
+"$" 2 "AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a<0></0>"
+"$" 3 "AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+
+"$" "\u000a\u0000a<0></0>\u000a"
+"$" 2 "\u000a\u0000a\u000a<0></0>"
+"$" 3 "\u000a\u0000a\u000a"
+
+"$" "<0></0>"
+"$" 2 ""
+
+"$" "<0></0>\u000a"
+"$" 2 "\u000a<0></0>"
+"$" 3 "\u000a"
+
+"^" "<0></0>"
+"^" 2 ""
+
+"\Z" "<0></0>"
+"\Z" 2 ""
+"\Z" 2 "\u000a<0></0>"
+"\Z" "<0></0>\u000d\u000a"
+"\Z" 2 "\u000d\u000a<0></0>"
+
+
+# No matching ^ at interior new-lines if not in multi-line mode.
+"^" "<0></0>AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+"^" 2 "AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+
+#
+# Dot-matches-any mode, and stopping at new-lines if off.
+#
+"." "<0>1</0>23\u000aXYZ"
+"." 2 "1<0>2</0>3\u000aXYZ"
+"." 3 "12<0>3</0>\u000aXYZ"
+"." 4 "123\u000a<0>X</0>YZ" # . doesn't match newlines
+"." 4 "123\u000b<0>X</0>YZ"
+"." 4 "123\u000c<0>X</0>YZ"
+"." 4 "123\u000d<0>X</0>YZ"
+"." 4 "123\u000d\u000a<0>X</0>YZ"
+"." 4 "123\u0085<0>X</0>YZ"
+"." 4 "123\u2028<0>X</0>YZ"
+"." 4 "123\u2029<0>X</0>YZ"
+"." 4s "123<0>\u000a</0>XYZ" # . matches any
+"." 4s "123<0>\u000b</0>XYZ"
+"." 4s "123<0>\u000c</0>XYZ"
+"." 4s "123<0>\u000d</0>XYZ"
+"." 4s "123<0>\u000d\u000a</0>XYZ"
+"." 4s "123<0>\u0085</0>XYZ"
+"." 4s "123<0>\u2028</0>XYZ"
+"." 4s "123<0>\u2029</0>XYZ"
+".{6}" "123\u000a\u000dXYZ"
+".{6}" s "<0>123\u000a\u000dX</0>Y"
+
+#
+# Bug 4045
+#
+"A*" "<0>AAAA</0>"
+"A*" 2 "AAAA<0></0>"
+"A*" 3 "AAAA"
+"A*" 4 "AAAA"
+"A*" 5 "AAAA"
+"A*" 6 "AAAA"
+"A*" "<0></0>"
+"A*" 2 ""
+"A*" 3 ""
+"A*" 4 ""
+"A*" 5 ""
+
+#
+# Bug 4046
+#
+"(?m)^" "<0></0>AA\u000dBB\u000dCC\u000d"
+"(?m)^" 2 "AA\u000d<0></0>BB\u000dCC\u000d"
+"(?m)^" 3 "AA\u000dBB\u000d<0></0>CC\u000d"
+"(?m)^" 4 "AA\u000dBB\u000dCC\u000d"
+"(?m)^" 5 "AA\u000dBB\u000dCC\u000d"
+"(?m)^" 6 "AA\u000dBB\u000dCC\u000d"
+
+"(?m)^" "<0></0>AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+"(?m)^" 2 "AA\u000d\u000a<0></0>BB\u000d\u000aCC\u000d\u000a"
+"(?m)^" 3 "AA\u000d\u000aBB\u000d\u000a<0></0>CC\u000d\u000a"
+"(?m)^" 4 "AA\u000d\u000aBB\u000d\u000aCC\u000d\u000a"
+
+#
+# Bug 4059
+#
+"\w+" "<0>イãƒãƒ­ãƒ¼</0>"
+"\b....\b." "<0>イãƒãƒ­ãƒ¼?</0>"
+
+
+#
+# Bug 4058 ICU Unicode Set patterns have an odd feature -
+# A $ as the last character before the close bracket means match
+# a \uffff, which means off the end of the string in transliterators.
+# Doesn't make much sense for regex, but works that way anyhow.
+#
+"[\$](P|C|D);" "<0>$<1>P</1>;</0>"
+"[$](P|C|D);" "<0>\uffff<1>P</1>;</0>"
+"[$](P|C|D);" "$P;"
+"[$$](P|C|D);" "<0>$<1>P</1>;</0>"
+
+#
+# bug 4888 Flag settings lost in some cases.
+#
+"((a){2})|(#)" is "no"
+"((a){2})|(#)" is "<0><1>a<2>a</2></1></0>#"
+"((a){2})|(#)" is "a<0><3>#</3></0>"
+
+"((a|b){2})|c" is "<0>c</0>"
+"((a|b){2})|c" is "<0>C</0>"
+"((a|b){2})|c" s "C"
+
+#
+# bug 5617 ZWJ \u200d shoudn't cause word boundaries
+#
+".+?\b" "<0> </0>\u0935\u0915\u094D\u200D\u0924\u0947 "
+".+?\b" 2 " <0>\u0935\u0915\u094D\u200D\u0924\u0947</0> "
+".+?\b" 3 " \u0935\u0915\u094D\u200D\u0924\u0947 "
+
+#
+# Random debugging, Temporary
+#
+#"^(?:a?b?)*$" "a--"
+"^(?:a?b?)*$" "a--"
+
+"This is a string with (?:one |two |three )endings" "<0>This is a string with two endings</0>"
+"((?:a|b|c)whoop-dee-do) | [jkl]|zed" "x"
+"astring|another[bcd]|alpha|a|[a]" "x"
+
+
+#
+# Regexps from http://www.regexlib.com
+#
+"^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" G "<0>G1 1AA</0>"
+"^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" G "<0>EH10 2QQ</0>"
+"^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" G "<0>SW1 1ZZ</0>"
+"^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" "G111 1AA"
+"^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" "X10 WW"
+"^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" "DDD 5WW"
+#"^[\w\-]+(?:\.[\w\-]+)*@(?:[\w\-]+\.)+[a-zA-Z]{2,7}$" dG "<0>joe.tillis@unit.army.mil</0>" # TODO: \w in pattern
+#"^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$" G "<0>jack_rabbit@slims.com</0>" # TODO: \w in pattern
+#"^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$" G "<0>foo99@foo.co.uk</0>" # TODO: \w in pattern
+#"^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$" "find_the_mistake.@foo.org" # TODO: \w in pattern
+#"^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$" ".prefix.@some.net"
+"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" G "<0>asmith@mactec.com</0>"
+"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" G "<0>foo12@foo.edu</0>"
+"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" G "<0>bob.smith@foo.tv</0>"
+"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" "joe"
+"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" "@foo.com"
+"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" "a@a"
+"^\d{1,2}\/\d{1,2}\/\d{4}$" G "<0>4/1/2001</0>"
+"^\d{1,2}\/\d{1,2}\/\d{4}$" G "<0>12/12/2001</0>"
+"^\d{1,2}\/\d{1,2}\/\d{4}$" G "<0>55/5/3434</0>"
+"^\d{1,2}\/\d{1,2}\/\d{4}$" "1/1/01"
+"^\d{1,2}\/\d{1,2}\/\d{4}$" "12 Jan 01"
+"^\d{1,2}\/\d{1,2}\/\d{4}$" "1-1-2001"
+"^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" G "<0>01.1.02</0>"
+"^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" G "<0>11-30-2001</0>"
+"^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" G "<0>2/29/2000</0>"
+"^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" "02/29/01"
+"^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" "13/01/2002"
+"^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" "11/00/02"
+"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$" G "<0>127.0.0.1</0>"
+"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$" G "<0>255.255.255.0</0>"
+"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$" G "<0>192.168.0.1</0>"
+"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$" "1200.5.4.3"
+"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$" "abc.def.ghi.jkl"
+"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$" "255.foo.bar.1"
+"(AUX|PRN|NUL|COM\d|LPT\d)+\s*$" G "<0>COM1</0>"
+"(AUX|PRN|NUL|COM\d|LPT\d)+\s*$" G "<0>AUX</0>"
+"(AUX|PRN|NUL|COM\d|LPT\d)+\s*$" G "<0>LPT1</0>"
+"(AUX|PRN|NUL|COM\d|LPT\d)+\s*$" "image.jpg"
+"(AUX|PRN|NUL|COM\d|LPT\d)+\s*$" "index.html"
+"(AUX|PRN|NUL|COM\d|LPT\d)+\s*$" "readme.txt"
+"^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" G "<0>29/02/1972</0>"
+"^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" G "<0>5-9-98</0>"
+"^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" G "<0>10-11-2002</0>"
+"^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" "29/02/2003"
+"^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" "12/13/2002"
+"^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" "1-1-1500"
+"^(user=([a-z0-9]+,)*(([a-z0-9]+){1});)?(group=([a-z0-9]+,)*(([a-z0-9]+){1});)?(level=[0-9]+;)?$" G "<0>user=foo,bar,quux;group=manager,admin;level=100;</0>"
+"^(user=([a-z0-9]+,)*(([a-z0-9]+){1});)?(group=([a-z0-9]+,)*(([a-z0-9]+){1});)?(level=[0-9]+;)?$" G "<0>group=nobody;level=24;</0>"
+"^(user=([a-z0-9]+,)*(([a-z0-9]+){1});)?(group=([a-z0-9]+,)*(([a-z0-9]+){1});)?(level=[0-9]+;)?$" "user=foo"
+"^(user=([a-z0-9]+,)*(([a-z0-9]+){1});)?(group=([a-z0-9]+,)*(([a-z0-9]+){1});)?(level=[0-9]+;)?$" "blahh"
+"^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$" G "<0>(+44)(0)20-12341234</0>"
+"^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$" G "<0>02012341234</0>"
+"^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$" G "<0>+44 (0) 1234-1234</0>"
+"^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$" "(44+)020-12341234"
+"^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$" "12341234(+020)"
+"\b(\w+)\s+\1\b" G "<0>Tell the the preacher</0>"
+"\b(\w+)\s+\1\b" G "<0>some some</0>"
+"\b(\w+)\s+\1\b" G "<0>hubba hubba</0>"
+"\b(\w+)\s+\1\b" "once an annual report"
+"\b(\w+)\s+\1\b" "mandate dated submissions"
+"\b(\w+)\s+\1\b" "Hubba hubba"
+"(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" G "<0>+31235256677</0>"
+"(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" G "<0>+31(0)235256677</0>"
+"(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" G "<0>023-5256677</0>"
+"(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" "+3123525667788999"
+"(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" "3123525667788"
+"(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" "232-2566778"
+"^[-+]?\d*\.?\d*$" G "<0>123</0>"
+"^[-+]?\d*\.?\d*$" G "<0>+3.14159</0>"
+"^[-+]?\d*\.?\d*$" G "<0>-3.14159</0>"
+"^[-+]?\d*\.?\d*$" "abc"
+"^[-+]?\d*\.?\d*$" "3.4.5"
+"^[-+]?\d*\.?\d*$" "$99.95"
+"^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$" G "<0>$1,234.50</0>"
+"^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$" G "<0>$0.70</0>"
+"^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$" G "<0>.7</0>"
+"^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$" "$0,123.50"
+"^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$" "$00.5"
+"^[A-Z]{2}[0-9]{6}[A-DFM]{1}$" G "<0>AB123456D</0>"
+"^[A-Z]{2}[0-9]{6}[A-DFM]{1}$" G "<0>AB123456F</0>"
+"^[A-Z]{2}[0-9]{6}[A-DFM]{1}$" G "<0>AB123456M</0>"
+"^[A-Z]{2}[0-9]{6}[A-DFM]{1}$" "AB123456E"
+"^[A-Z]{2}[0-9]{6}[A-DFM]{1}$" "ab123456d"
+#"(http|ftp|https):\/\/[\w]+(.[\w]+)([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?" G "<0>http://regxlib.com/Default.aspx</0>" # TODO: \w in pattern
+#"(http|ftp|https):\/\/[\w]+(.[\w]+)([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?" G "<0>http://electronics.cnet.com/electronics/0-6342366-8-8994967-1.html</0>" # TODO: \w in pattern
+#"(http|ftp|https):\/\/[\w]+(.[\w]+)([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?" "www.yahoo.com" # TODO: \w in pattern
+"^[0-9]{4}\s{0,1}[a-zA-Z]{2}$" G "<0>2034AK</0>"
+"^[0-9]{4}\s{0,1}[a-zA-Z]{2}$" G "<0>2034 AK</0>"
+"^[0-9]{4}\s{0,1}[a-zA-Z]{2}$" G "<0>2034 ak</0>"
+"^[0-9]{4}\s{0,1}[a-zA-Z]{2}$" "2034 AK"
+"^[0-9]{4}\s{0,1}[a-zA-Z]{2}$" "321321 AKSSAA"
+"((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2}))" G "<0>4/5/91</0>"
+"((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2}))" G "<0>04/5/1991</0>"
+"((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2}))" G "<0>4/05/89</0>"
+"((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2}))" "4/5/1"
+#"(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1}" G "<0>01/01/2001 </0>" #TODO - \s in pattern.
+"(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1}" G "<0>01-01-2001:</0>"
+"(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1}" G "<0>(1-1-01)</0>"
+"(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1}" "13/1/2001"
+"(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1}" "1-32-2001"
+"(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1}" "1-1-1801"
+"^\d{3}\s?\d{3}$" G "<0>400 099</0>"
+"^\d{3}\s?\d{3}$" G "<0>400099</0>"
+"^\d{3}\s?\d{3}$" G "<0>400050</0>"
+"^\d{3}\s?\d{3}$" "2345678"
+"^\d{3}\s?\d{3}$" "12345"
+"^\d{3}\s?\d{3}$" "asdf"
+"^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$" G "<0>(111) 222-3333</0>"
+"^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$" G "<0>1112223333</0>"
+"^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$" G "<0>111-222-3333</0>"
+"^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$" "11122223333"
+"^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$" "11112223333"
+"^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$" "11122233333"
+"^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$" G "<0>#00ccff</0>"
+"^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$" G "<0>#039</0>"
+"^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$" G "<0>ffffcc</0>"
+"^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$" "blue"
+"^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$" "0x000000"
+"^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$" "#ff000"
+"^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$" G "<0>01:23:45:67:89:ab</0>"
+"^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$" G "<0>01:23:45:67:89:AB</0>"
+"^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$" G "<0>fE:dC:bA:98:76:54</0>"
+"^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$" "01:23:45:67:89:ab:cd"
+"^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$" "01:23:45:67:89:Az"
+"^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$" "01:23:45:56:"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*$" G "<0>http://www.blah.com/~joe</0>"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*$" G "<0>ftp://ftp.blah.co.uk:2828/blah%20blah.gif</0>"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*$" G "<0>https://blah.gov/blah-blah.as</0>"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*$" "www.blah.com"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*$" "http://www.blah.com/I have spaces!"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*$" "ftp://blah_underscore/[nope]"
+"^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" G "<0>12/01/2002</0>"
+"^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" G "<0>12/01/2002 12:32:10</0>"
+"^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" "32/12/2002"
+"^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" "12/13/2001"
+"^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" "12/02/06"
+"^[0-9](\.[0-9]+)?$" G "<0>1.2345</0>"
+"^[0-9](\.[0-9]+)?$" G "<0>0.00001</0>"
+"^[0-9](\.[0-9]+)?$" G "<0>7</0>"
+"^[0-9](\.[0-9]+)?$" "12.2"
+"^[0-9](\.[0-9]+)?$" "1.10.1"
+"^[0-9](\.[0-9]+)?$" "15.98"
+"^(?:[mM]{1,3})?(?:(?:[cC][dDmM])|(?:[dD]?(?:[cC]{1,3})?))?[lL]?(([xX])(?:\2{1,2}|[lL]|[cC])?)?((([iI])((\5{1,2})|[vV]|[xX]|[lL])?)|([vV]?([iI]{1,3})?))?$" G "<0>III</0>"
+"^(?:[mM]{1,3})?(?:(?:[cC][dDmM])|(?:[dD]?(?:[cC]{1,3})?))?[lL]?(([xX])(?:\2{1,2}|[lL]|[cC])?)?((([iI])((\5{1,2})|[vV]|[xX]|[lL])?)|([vV]?([iI]{1,3})?))?$" G "<0>xiv</0>"
+"^(?:[mM]{1,3})?(?:(?:[cC][dDmM])|(?:[dD]?(?:[cC]{1,3})?))?[lL]?(([xX])(?:\2{1,2}|[lL]|[cC])?)?((([iI])((\5{1,2})|[vV]|[xX]|[lL])?)|([vV]?([iI]{1,3})?))?$" G "<0>MCMLXLIX</0>"
+"^(?:[mM]{1,3})?(?:(?:[cC][dDmM])|(?:[dD]?(?:[cC]{1,3})?))?[lL]?(([xX])(?:\2{1,2}|[lL]|[cC])?)?((([iI])((\5{1,2})|[vV]|[xX]|[lL])?)|([vV]?([iI]{1,3})?))?$" "iiV"
+"^(?:[mM]{1,3})?(?:(?:[cC][dDmM])|(?:[dD]?(?:[cC]{1,3})?))?[lL]?(([xX])(?:\2{1,2}|[lL]|[cC])?)?((([iI])((\5{1,2})|[vV]|[xX]|[lL])?)|([vV]?([iI]{1,3})?))?$" "MCCM"
+"^(?:[mM]{1,3})?(?:(?:[cC][dDmM])|(?:[dD]?(?:[cC]{1,3})?))?[lL]?(([xX])(?:\2{1,2}|[lL]|[cC])?)?((([iI])((\5{1,2})|[vV]|[xX]|[lL])?)|([vV]?([iI]{1,3})?))?$" "XXXX"
+"^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$" G "<0>123</0>"
+"^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$" G "<0>-123.35</0>"
+"^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$" G "<0>-123.35e-2</0>"
+"^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$" "abc"
+"^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$" "123.32e"
+"^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$" "123.32.3"
+"^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$" G "<0>T.F. Johnson</0>"
+"^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$" G "<0>John O'Neil</0>"
+"^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$" G "<0>Mary-Kate Johnson</0>"
+"^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$" "sam_johnson"
+"^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$" "Joe--Bob Jones"
+"^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$" "dfjsd0rd"
+"^(20|21|22|23|[0-1]\d)[0-5]\d$" G "<0>1200</0>"
+"^(20|21|22|23|[0-1]\d)[0-5]\d$" G "<0>1645</0>"
+"^(20|21|22|23|[0-1]\d)[0-5]\d$" G "<0>2359</0>"
+"^(20|21|22|23|[0-1]\d)[0-5]\d$" "2400"
+"^(20|21|22|23|[0-1]\d)[0-5]\d$" "asbc"
+"^(20|21|22|23|[0-1]\d)[0-5]\d$" "12:45"
+/<[^>]*\n?.*=("|')?(.*\.jpg)("|')?.*\n?[^<]*>/ G '<0><td background="../img/img.jpg" ></0>'
+/<[^>]*\n?.*=("|')?(.*\.jpg)("|')?.*\n?[^<]*>/ G "<0><img src=img.jpg ></0>"
+/<[^>]*\n?.*=("|')?(.*\.jpg)("|')?.*\n?[^<]*>/ G "<0><img src='img.jpg'></0>"
+/<[^>]*\n?.*=("|')?(.*\.jpg)("|')?.*\n?[^<]*>/ "= img.jpg"
+/<[^>]*\n?.*=("|')?(.*\.jpg)("|')?.*\n?[^<]*>/ "img.jpg"
+"^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$" G "<0>78754</0>"
+"^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$" G "<0>78754-1234</0>"
+"^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$" G "<0>G3H 6A3</0>"
+"^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$" "78754-12aA"
+"^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$" "7875A"
+"^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$" "g3h6a3"
+#"^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$" G "<0>bob@somewhere.com</0>" # TODO: \w in pattern
+#"^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$" G "<0>bob.jones@[1.1.1.1]</0 # TODO: \w in pattern>"
+#"^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$" G "<0>bob@a.b.c.d.info</0>" # TODO: \w in pattern
+#"^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$" "bob@com" # TODO: \w in pattern
+#"^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$" "bob.jones@some.where" # TODO: \w in pattern
+#"^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$" "bob@1.1.1.123" # TODO: \w in pattern
+#"^(([-\w \.]+)|(""[-\w \.]+"") )?<([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$" G "<0><ab@cd.ef></0>" # TODO: \w in pattern
+#"^(([-\w \.]+)|(""[-\w \.]+"") )?<([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$" G "<0>bob A. jones <ab@cd.ef></0>" # TODO: \w in pattern
+#"^(([-\w \.]+)|(""[-\w \.]+"") )?<([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$" G "<0>bob A. jones <ab@[1.1.1.111]></0>" # TODO: \w in pattern
+#"^(([-\w \.]+)|(""[-\w \.]+"") )?<([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$" "ab@cd.ef" # TODO: \w in pattern
+#"^(([-\w \.]+)|(""[-\w \.]+"") )?<([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$" ""bob A. jones <ab@cd.ef>" # TODO: \w in pattern
+#"^(([-\w \.]+)|(""[-\w \.]+"") )?<([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$" "bob A. jones <ab@1.1.1.111>" # TODO: \w in pattern
+"^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$" G "<0>SW112LE</0>"
+"^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$" G "<0>SW11 2LE</0>"
+"^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$" G "<0>CR05LE</0>"
+"^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$" "12CR0LE"
+"^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$" "12CR 0LE"
+"^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$" "SWLE05"
+"20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])" G "<0>2099-12-31T23:59:59</0>"
+"20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])" G "<0>2002/02/09 16:30:00</0>"
+"20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])" G "<0>2000-01-01T00:00:00</0>"
+"20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])" "2000-13-31T00:00:00"
+"20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])" "2002/02/33 24:00:00"
+"20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])" "2000-01-01 60:00:00"
+"^((?:4\d{3})|(?:5[1-5]\d{2})|(?:6011)|(?:3[68]\d{2})|(?:30[012345]\d))[ -]?(\d{4})[ -]?(\d{4})[ -]?(\d{4}|3[4,7]\d{13})$" G "<0>6011567812345678</0>"
+"^((?:4\d{3})|(?:5[1-5]\d{2})|(?:6011)|(?:3[68]\d{2})|(?:30[012345]\d))[ -]?(\d{4})[ -]?(\d{4})[ -]?(\d{4}|3[4,7]\d{13})$" G "<0>6011 5678 1234 5678</0>"
+"^((?:4\d{3})|(?:5[1-5]\d{2})|(?:6011)|(?:3[68]\d{2})|(?:30[012345]\d))[ -]?(\d{4})[ -]?(\d{4})[ -]?(\d{4}|3[4,7]\d{13})$" G "<0>6011-5678-1234-5678</0>"
+"^((?:4\d{3})|(?:5[1-5]\d{2})|(?:6011)|(?:3[68]\d{2})|(?:30[012345]\d))[ -]?(\d{4})[ -]?(\d{4})[ -]?(\d{4}|3[4,7]\d{13})$" "1234567890123456"
+"^((((0[13578])|(1[02]))[\/]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\/]?(([0-2][0-9])|(30)))|(02[\/]?[0-2][0-9]))[\/]?\d{4}$" G "<0>01/01/2001</0>"
+"^((((0[13578])|(1[02]))[\/]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\/]?(([0-2][0-9])|(30)))|(02[\/]?[0-2][0-9]))[\/]?\d{4}$" G "<0>02/29/2002</0>"
+"^((((0[13578])|(1[02]))[\/]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\/]?(([0-2][0-9])|(30)))|(02[\/]?[0-2][0-9]))[\/]?\d{4}$" G "<0>12/31/2002</0>"
+"^((((0[13578])|(1[02]))[\/]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\/]?(([0-2][0-9])|(30)))|(02[\/]?[0-2][0-9]))[\/]?\d{4}$" "1/1/02"
+"^((((0[13578])|(1[02]))[\/]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\/]?(([0-2][0-9])|(30)))|(02[\/]?[0-2][0-9]))[\/]?\d{4}$" "02/30/2002"
+"^((((0[13578])|(1[02]))[\/]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\/]?(([0-2][0-9])|(30)))|(02[\/]?[0-2][0-9]))[\/]?\d{4}$" "1/25/2002"
+#"^(?=[^\&])(?:(?<scheme>[^:/?#]+):)?(?://(?<authority>[^/?#]*))?(?<path>[^?#]*)(?:\?(?<query>[^#]*))?(?:#(?<fragment>.*))?" G "<0>http://regexlib.com/REDetails.aspx?regexp_id=x#Details</0>" # out of context, can't work stand-alone
+#"^(?=[^\&])(?:(?<scheme>[^:/?#]+):)?(?://(?<authority>[^/?#]*))?(?<path>[^?#]*)(?:\?(?<query>[^#]*))?(?:#(?<fragment>.*))?" "&" # out of context, can't work stand-alone
+"^[-+]?\d+(\.\d+)?$" G "<0>123</0>"
+"^[-+]?\d+(\.\d+)?$" G "<0>-123.45</0>"
+"^[-+]?\d+(\.\d+)?$" G "<0>+123.56</0>"
+"^[-+]?\d+(\.\d+)?$" "123x"
+"^[-+]?\d+(\.\d+)?$" ".123"
+"^[-+]?\d+(\.\d+)?$" "-123."
+"^(\d{4}[- ]){3}\d{4}|\d{16}$" G "<0>1234-1234-1234-1234</0>"
+"^(\d{4}[- ]){3}\d{4}|\d{16}$" G "<0>1234 1234 1234 1234</0>"
+"^(\d{4}[- ]){3}\d{4}|\d{16}$" G "<0>1234123412341234</0>"
+"^(\d{4}[- ]){3}\d{4}|\d{16}$" "Visa"
+"^(\d{4}[- ]){3}\d{4}|\d{16}$" "1234"
+"^(\d{4}[- ]){3}\d{4}|\d{16}$" "123-1234-12345"
+"^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$" G "<0>6011-1111-1111-1111</0>"
+"^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$" G "<0>5423-1111-1111-1111</0>"
+"^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$" G "<0>341111111111111</0>"
+"^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$" "4111-111-111-111"
+"^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$" "3411-1111-1111-111"
+"^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$" "Visa"
+"^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$" G "<0>4D28C5AD-6482-41CD-B84E-4573F384BB5C</0>"
+"^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$" G "<0>B1E1282C-A35C-4D5A-BF8B-7A3A51D9E388</0>"
+"^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$" G "91036A4A-A0F4-43F0-8CD"
+"^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$" "{B1E1282C-A35C-4D3A-BF8B-7A3A51D9E388}"
+"^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$" "AAAAAAAAAAAAAAAAA"
+"^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$" "B;E1282C-A35C-4D3A-BF8B-7A3A51D9E38"
+"(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14})))" G "<0>4111-1234-1234-1234</0>"
+"(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14})))" G "<0>6011123412341234</0>"
+"(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14})))" G "<0>3711-123456-12345</0>"
+"(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14})))" "1234567890123456"
+"(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14})))" "4111-123-1234-1234"
+"(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14})))" "412-1234-1234-1234"
+#'\[link="(?<link>((.|\n)*?))"\](?<text>((.|\n)*?))\[\/link\]' G '<0>[link="http://www.yahoo.com"]Yahoo[/link]</0>' #named capture
+#'\[link="(?<link>((.|\n)*?))"\](?<text>((.|\n)*?))\[\/link\]' "[link]http://www.yahoo.com[/link]" #named capture
+#'\[link="(?<link>((.|\n)*?))"\](?<text>((.|\n)*?))\[\/link\]' "[link=http://www.yahoo.com]Yahoo[/link]" #named capture
+"^[a-zA-Z0-9]+$" G "<0>10a</0>"
+"^[a-zA-Z0-9]+$" G "<0>ABC</0>"
+"^[a-zA-Z0-9]+$" G "<0>A3fg</0>"
+"^[a-zA-Z0-9]+$" "45.3"
+"^[a-zA-Z0-9]+$" "this or that"
+"^[a-zA-Z0-9]+$" "$23"
+"((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" G "<0>(123) 456-7890</0>"
+"((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" G "<0>123-456-7890</0>"
+"((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" "1234567890"
+"^[a-zA-Z]\w{3,14}$" G "<0>abcd</0>"
+"^[a-zA-Z]\w{3,14}$" G "<0>aBc45DSD_sdf</0>"
+"^[a-zA-Z]\w{3,14}$" G "<0>password</0>"
+"^[a-zA-Z]\w{3,14}$" "afv"
+"^[a-zA-Z]\w{3,14}$" "1234"
+"^[a-zA-Z]\w{3,14}$" "reallylongpassword"
+"^[A-Z]{1,2}[1-9][0-9]?[A-Z]? [0-9][A-Z]{2,}|GIR 0AA$" G "<0>G1 1AA </0>"
+"^[A-Z]{1,2}[1-9][0-9]?[A-Z]? [0-9][A-Z]{2,}|GIR 0AA$" G "<0>GIR 0AA</0>"
+"^[A-Z]{1,2}[1-9][0-9]?[A-Z]? [0-9][A-Z]{2,}|GIR 0AA$" G "<0>SW1 1ZZ</0>"
+"^[A-Z]{1,2}[1-9][0-9]?[A-Z]? [0-9][A-Z]{2,}|GIR 0AA$" "BT01 3RT"
+"^[A-Z]{1,2}[1-9][0-9]?[A-Z]? [0-9][A-Z]{2,}|GIR 0AA$" "G111 1AA"
+"^0[23489]{1}(\-)?[^0\D]{1}\d{6}$" G "<0>03-6106666</0>"
+"^0[23489]{1}(\-)?[^0\D]{1}\d{6}$" G "<0>036106666</0>"
+"^0[23489]{1}(\-)?[^0\D]{1}\d{6}$" G "<0>02-5523344</0>"
+"^0[23489]{1}(\-)?[^0\D]{1}\d{6}$" "00-6106666"
+"^0[23489]{1}(\-)?[^0\D]{1}\d{6}$" "03-0106666"
+"^0[23489]{1}(\-)?[^0\D]{1}\d{6}$" "02-55812346"
+"^0(5[012345678]|6[47]){1}(\-)?[^0\D]{1}\d{5}$" G "<0>050-346634</0>"
+"^0(5[012345678]|6[47]){1}(\-)?[^0\D]{1}\d{5}$" G "<0>058633633</0>"
+"^0(5[012345678]|6[47]){1}(\-)?[^0\D]{1}\d{5}$" G "<0>064-228226</0>"
+"^0(5[012345678]|6[47]){1}(\-)?[^0\D]{1}\d{5}$" "059-336622"
+"^0(5[012345678]|6[47]){1}(\-)?[^0\D]{1}\d{5}$" "064-022663"
+"^0(5[012345678]|6[47]){1}(\-)?[^0\D]{1}\d{5}$" "0545454545"
+"^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}" G "<0>AA11 1AA</0>"
+"^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}" G "<0>AA1A 1AA</0>"
+"^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}" G "<0>A11-1AA</0>"
+"^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}" "111 AAA"
+"^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}" "1AAA 1AA"
+"^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}" "A1AA 1AA"
+"@{2}((\S)+)@{2}" G "<0>@@test@@</0>"
+"@{2}((\S)+)@{2}" G "<0>@@name@@</0>"
+"@{2}((\S)+)@{2}" G "<0>@@2342@@</0>"
+"@{2}((\S)+)@{2}" "@test@"
+"@{2}((\S)+)@{2}" "@@na me@@"
+"@{2}((\S)+)@{2}" "@@ name@@"
+"([0-1][0-9]|2[0-3]):[0-5][0-9]" G "<0>00:00</0>"
+"([0-1][0-9]|2[0-3]):[0-5][0-9]" G "<0>13:59</0>"
+"([0-1][0-9]|2[0-3]):[0-5][0-9]" G "<0>23:59</0>"
+"([0-1][0-9]|2[0-3]):[0-5][0-9]" "24:00"
+"([0-1][0-9]|2[0-3]):[0-5][0-9]" "23:60"
+"^[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?$" G "<0>23</0>"
+"^[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?$" G "<0>-17.e23</0>"
+"^[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?$" G "<0>+.23e+2</0>"
+"^[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?$" "+.e2"
+"^[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?$" "23.17.5"
+"^[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?$" "10e2.0"
+"^([1-zA-Z0-1@.\s ]{1,255})$" G "<0>email@email.com</0>"
+"^([1-zA-Z0-1@.\s ]{1,255})$" G "<0>My Name</0>"
+"^([1-zA-Z0-1@.\s ]{1,255})$" G "<0>asdf12df</0>"
+"^([1-zA-Z0-1@.\s ]{1,255})$" "‘,\*&$<>"
+"^([1-zA-Z0-1@.\s ]{1,255})$" "1001' string"
+"^((0[1-9])|(1[0-2]))\/(\d{4})$" G "<0>12/2002</0>"
+"^((0[1-9])|(1[0-2]))\/(\d{4})$" G "<0>11/1900</0>"
+"^((0[1-9])|(1[0-2]))\/(\d{4})$" G "<0>02/1977</0>"
+"^((0[1-9])|(1[0-2]))\/(\d{4})$" "1/1977"
+"^((0[1-9])|(1[0-2]))\/(\d{4})$" "00/000"
+"^((0[1-9])|(1[0-2]))\/(\d{4})$" "15/2002"
+"^\(\d{1,2}(\s\d{1,2}){1,2}\)\s(\d{1,2}(\s\d{1,2}){1,2})((-(\d{1,4})){0,1})$" G "<0>(0 34 56) 34 56 67</0>"
+"^\(\d{1,2}(\s\d{1,2}){1,2}\)\s(\d{1,2}(\s\d{1,2}){1,2})((-(\d{1,4})){0,1})$" G "<0>(03 45) 5 67 67</0>"
+"^\(\d{1,2}(\s\d{1,2}){1,2}\)\s(\d{1,2}(\s\d{1,2}){1,2})((-(\d{1,4})){0,1})$" G "<0>(0 45) 2 33 45-45</0>"
+"^\(\d{1,2}(\s\d{1,2}){1,2}\)\s(\d{1,2}(\s\d{1,2}){1,2})((-(\d{1,4})){0,1})$" "(2345) 34 34"
+"^\(\d{1,2}(\s\d{1,2}){1,2}\)\s(\d{1,2}(\s\d{1,2}){1,2})((-(\d{1,4})){0,1})$" "(0 56) 456 456"
+"^\(\d{1,2}(\s\d{1,2}){1,2}\)\s(\d{1,2}(\s\d{1,2}){1,2})((-(\d{1,4})){0,1})$" "(3 45) 2 34-45678"
+"(?:\d|I{1,3})?\s?\w{2,}\.?\s*\d{1,}\:\d{1,}-?,?\d{0,2}(?:,\d{0,2}){0,2}" G "<0>Genesis 3:3-4,6</0>"
+"(?:\d|I{1,3})?\s?\w{2,}\.?\s*\d{1,}\:\d{1,}-?,?\d{0,2}(?:,\d{0,2}){0,2}" G "<0>II Sam 2:11,2</0>"
+"(?:\d|I{1,3})?\s?\w{2,}\.?\s*\d{1,}\:\d{1,}-?,?\d{0,2}(?:,\d{0,2}){0,2}" G "<0>2 Tim 3:16</0>"
+"(?:\d|I{1,3})?\s?\w{2,}\.?\s*\d{1,}\:\d{1,}-?,?\d{0,2}(?:,\d{0,2}){0,2}" "Genesis chap 3, verse 3"
+"(?:\d|I{1,3})?\s?\w{2,}\.?\s*\d{1,}\:\d{1,}-?,?\d{0,2}(?:,\d{0,2}){0,2}" "2nd Samuel 2"
+"(\[[Ii][Mm][Gg]\])(\S+?)(\[\/[Ii][Mm][Gg]\])" G "<0>[IMG]http://bleh.jpg[/IMG]</0>"
+"(\[[Ii][Mm][Gg]\])(\S+?)(\[\/[Ii][Mm][Gg]\])" G "<0>[ImG]bleh[/imG]</0>"
+"(\[[Ii][Mm][Gg]\])(\S+?)(\[\/[Ii][Mm][Gg]\])" G "<0>[img]ftp://login:pass@bleh.gif[/img]</0>"
+"(\[[Ii][Mm][Gg]\])(\S+?)(\[\/[Ii][Mm][Gg]\])" '<img src="bleh.jpg">'
+"^([0-9]{1,2})[./-]+([0-9]{1,2})[./-]+([0-9]{2}|[0-9]{4})$" G "<0>10/03/1979</0>"
+"^([0-9]{1,2})[./-]+([0-9]{1,2})[./-]+([0-9]{2}|[0-9]{4})$" G "<0>1-1-02</0>"
+"^([0-9]{1,2})[./-]+([0-9]{1,2})[./-]+([0-9]{2}|[0-9]{4})$" G "<0>01.1.2003</0>"
+"^([0-9]{1,2})[./-]+([0-9]{1,2})[./-]+([0-9]{2}|[0-9]{4})$" "10/03/197"
+"^([0-9]{1,2})[./-]+([0-9]{1,2})[./-]+([0-9]{2}|[0-9]{4})$" "01-02-003"
+"^([0-9]{1,2})[./-]+([0-9]{1,2})[./-]+([0-9]{2}|[0-9]{4})$" "01 02 03"
+#"^(?(^00000(|-0000))|(\d{5}(|-\d{4})))$" G "<0>12345</0>" # No Conditionals?
+#"^(?(^00000(|-0000))|(\d{5}(|-\d{4})))$" G "<0>12345-6789</0>" # No Conditionals?
+#"^(?(^00000(|-0000))|(\d{5}(|-\d{4})))$" "00000" # No Conditionals?
+#"^(?(^00000(|-0000))|(\d{5}(|-\d{4})))$" "00000-0000" # No Conditionals?
+#"^(?(^00000(|-0000))|(\d{5}(|-\d{4})))$" "a4650-465s" # No Conditionals?
+"^((0?[1-9])|((1|2)[0-9])|30|31)$" G "<0>01</0>"
+"^((0?[1-9])|((1|2)[0-9])|30|31)$" G "<0>12</0>"
+"^((0?[1-9])|((1|2)[0-9])|30|31)$" G "<0>31</0>"
+"^((0?[1-9])|((1|2)[0-9])|30|31)$" "123"
+"^((0?[1-9])|((1|2)[0-9])|30|31)$" "32"
+"^((0?[1-9])|((1|2)[0-9])|30|31)$" "abc"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?(\d{3}([\s\-./\\])?\d{4}|[a-zA-Z0-9]{7})$" G "<0>1.222.333.1234</0>"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?(\d{3}([\s\-./\\])?\d{4}|[a-zA-Z0-9]{7})$" G "<0>1-223-123-1232</0>"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?(\d{3}([\s\-./\\])?\d{4}|[a-zA-Z0-9]{7})$" G "<0>12223334444</0>"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?(\d{3}([\s\-./\\])?\d{4}|[a-zA-Z0-9]{7})$" "1.1.123123.123"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?(\d{3}([\s\-./\\])?\d{4}|[a-zA-Z0-9]{7})$" "12-1322-112-31"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?(\d{3}([\s\-./\\])?\d{4}|[a-zA-Z0-9]{7})$" "11231321131"
+"^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$" G "<0>DN3 6GB</0>"
+"^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$" G "<0>SW42 4RG</0>"
+"^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$" G "<0>GIR 0AA</0>"
+"^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$" "SEW4 5TY"
+"^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$" "AA2C 4FG"
+"^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$" "AA2 4CV"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$" G "<0>asD1</0>"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$" G "<0>asDF1234</0>"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$" G "<0>ASPgo123</0>"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$" "asdf"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$" "1234"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$" "ASDF12345"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?([0-9]{3}([\s\-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))" G "<0>1.222.333.1234</0>"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?([0-9]{3}([\s\-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))" G "<0>1-223-123-1232</0>"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?([0-9]{3}([\s\-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))" G "<0>1-888-425-DELL</0>"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?([0-9]{3}([\s\-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))" "1.1.123123.123"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?([0-9]{3}([\s\-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))" "12-1322-112-31"
+"^([0-1]([\s\-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s\-./\\])?([0-9]{3}([\s\-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))" "1-800-CALL-DEL"
+"^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$" G "<0>09:00</0>"
+"^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$" G "<0>9:00</0>"
+"^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$" G "<0>11:35</0>"
+"^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$" "13:00"
+"^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$" "9.00"
+"^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$" "6:60"
+"^([1-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$" G "<0>1</0>"
+"^([1-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$" G "<0>108</0>"
+"^([1-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$" G "<0>255</0>"
+"^([1-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$" "01"
+"^([1-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$" "256"
+"^((((0[13578])|([13578])|(1[02]))[\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\/](([1-9])|([0-2][0-9]))))[\/]\d{4}$|^\d{4}$" G "<0>01/01/2001</0>"
+"^((((0[13578])|([13578])|(1[02]))[\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\/](([1-9])|([0-2][0-9]))))[\/]\d{4}$|^\d{4}$" G "<0>1/01/2001</0>"
+"^((((0[13578])|([13578])|(1[02]))[\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\/](([1-9])|([0-2][0-9]))))[\/]\d{4}$|^\d{4}$" G "<0>2002</0>"
+"^((((0[13578])|([13578])|(1[02]))[\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\/](([1-9])|([0-2][0-9]))))[\/]\d{4}$|^\d{4}$" "2/30/2002"
+"^((((0[13578])|([13578])|(1[02]))[\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\/](([1-9])|([0-2][0-9]))))[\/]\d{4}$|^\d{4}$" "13/23/2002"
+"^((((0[13578])|([13578])|(1[02]))[\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\/](([1-9])|([0-2][0-9]))))[\/]\d{4}$|^\d{4}$" "12345"
+"^[A-Za-z]{2}[0-9]{6}[A-Za-z]{1}$" G "<0>SP939393H</0>"
+"^[A-Za-z]{2}[0-9]{6}[A-Za-z]{1}$" G "<0>PX123456D</0>"
+"^[A-Za-z]{2}[0-9]{6}[A-Za-z]{1}$" G "<0>SW355667G</0>"
+"^[A-Za-z]{2}[0-9]{6}[A-Za-z]{1}$" "12SP9393H"
+"^[A-Za-z]{2}[0-9]{6}[A-Za-z]{1}$" "S3P93930D"
+"^[A-Za-z]{2}[0-9]{6}[A-Za-z]{1}$" "11223344SP00ddSS"
+"(^0[78][2347][0-9]{7})" G "<0>0834128458</0>"
+"(^0[78][2347][0-9]{7})" G "<0>0749526308</0>"
+"(^0[78][2347][0-9]{7})" "0861212308"
+"(^0[78][2347][0-9]{7})" "0892549851"
+"^([A-HJ-TP-Z]{1}\d{4}[A-Z]{3}|[a-z]{1}\d{4}[a-hj-tp-z]{3})$" G "<0>C1406HHA</0>"
+"^([A-HJ-TP-Z]{1}\d{4}[A-Z]{3}|[a-z]{1}\d{4}[a-hj-tp-z]{3})$" G "<0>A4126AAB</0>"
+"^([A-HJ-TP-Z]{1}\d{4}[A-Z]{3}|[a-z]{1}\d{4}[a-hj-tp-z]{3})$" G "<0>c1406hha</0>"
+"^([A-HJ-TP-Z]{1}\d{4}[A-Z]{3}|[a-z]{1}\d{4}[a-hj-tp-z]{3})$" "c1406HHA"
+"^([A-HJ-TP-Z]{1}\d{4}[A-Z]{3}|[a-z]{1}\d{4}[a-hj-tp-z]{3})$" "4126"
+"^([A-HJ-TP-Z]{1}\d{4}[A-Z]{3}|[a-z]{1}\d{4}[a-hj-tp-z]{3})$" "C1406hha"
+"^(((25[0-5]|2[0-4][0-9]|19[0-1]|19[3-9]|18[0-9]|17[0-1]|17[3-9]|1[0-6][0-9]|1[1-9]|[2-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))|(192\.(25[0-5]|2[0-4][0-9]|16[0-7]|169|1[0-5][0-9]|1[7-9][0-9]|[1-9][0-9]|[0-9]))|(172\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|1[0-5]|3[2-9]|[4-9][0-9]|[0-9])))\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" G "<0>66.129.71.120</0>"
+"^(((25[0-5]|2[0-4][0-9]|19[0-1]|19[3-9]|18[0-9]|17[0-1]|17[3-9]|1[0-6][0-9]|1[1-9]|[2-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))|(192\.(25[0-5]|2[0-4][0-9]|16[0-7]|169|1[0-5][0-9]|1[7-9][0-9]|[1-9][0-9]|[0-9]))|(172\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|1[0-5]|3[2-9]|[4-9][0-9]|[0-9])))\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" G "<0>207.46.230.218</0>"
+"^(((25[0-5]|2[0-4][0-9]|19[0-1]|19[3-9]|18[0-9]|17[0-1]|17[3-9]|1[0-6][0-9]|1[1-9]|[2-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))|(192\.(25[0-5]|2[0-4][0-9]|16[0-7]|169|1[0-5][0-9]|1[7-9][0-9]|[1-9][0-9]|[0-9]))|(172\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|1[0-5]|3[2-9]|[4-9][0-9]|[0-9])))\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" G "<0>64.58.76.225</0>"
+"^(((25[0-5]|2[0-4][0-9]|19[0-1]|19[3-9]|18[0-9]|17[0-1]|17[3-9]|1[0-6][0-9]|1[1-9]|[2-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))|(192\.(25[0-5]|2[0-4][0-9]|16[0-7]|169|1[0-5][0-9]|1[7-9][0-9]|[1-9][0-9]|[0-9]))|(172\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|1[0-5]|3[2-9]|[4-9][0-9]|[0-9])))\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" "10.0.5.4"
+"^(((25[0-5]|2[0-4][0-9]|19[0-1]|19[3-9]|18[0-9]|17[0-1]|17[3-9]|1[0-6][0-9]|1[1-9]|[2-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))|(192\.(25[0-5]|2[0-4][0-9]|16[0-7]|169|1[0-5][0-9]|1[7-9][0-9]|[1-9][0-9]|[0-9]))|(172\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|1[0-5]|3[2-9]|[4-9][0-9]|[0-9])))\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" "192.168.0.1"
+"^(((25[0-5]|2[0-4][0-9]|19[0-1]|19[3-9]|18[0-9]|17[0-1]|17[3-9]|1[0-6][0-9]|1[1-9]|[2-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))|(192\.(25[0-5]|2[0-4][0-9]|16[0-7]|169|1[0-5][0-9]|1[7-9][0-9]|[1-9][0-9]|[0-9]))|(172\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|1[0-5]|3[2-9]|[4-9][0-9]|[0-9])))\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" "my ip address"
+#"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$" G "<0>foo@foo.com</0>" # TODO: \w in pattern
+#"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$" G "<0>foo@foo-foo.com.au</0>" # TODO: \w in pattern
+#"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$" G "<0>foo@foo.foo.info</0>" # TODO: \w in pattern
+#"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$" "foo@.com" # TODO: \w in pattern
+#"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$" "foo@foo..com" # TODO: \w in pattern
+#"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$" "foo@me@.com" # TODO: \w in pattern
+#"/\*[\d\D]*?\*/" G "<0>/* my comment */</0>"
+#"/\*[\d\D]*?\*/" G "<0>/* my multiline comment */</0>"
+#"/\*[\d\D]*?\*/" G "<0>/* my nested comment */</0>"
+#"/\*[\d\D]*?\*/" "*/ anything here /*"
+#"/\*[\d\D]*?\*/" "anything between 2 seperate comments"
+#"/\*[\d\D]*?\*/" "\* *\"
+"/\*[\p{N}\P{N}]*?\*/" G "<0>/* my comment */</0>"
+"/\*[\p{N}\P{N}]*?\*/" G "<0>/* my multiline comment */</0>"
+"/\*[\p{N}\P{N}]*?\*/" G "<0>/* my nested comment */</0>"
+"/\*[\p{N}\P{N}]*?\*/" "*/ anything here /*"
+"/\*[\p{N}\P{N}]*?\*/" "anything between 2 seperate comments"
+"/\*[\p{N}\P{N}]*?\*/" "\* *\"
+"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" G "<0>1/31/2002</0>"
+"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" G "<0>04-30-02</0>"
+"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" G "<0>12-01/2002</0>"
+"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" "2/31/2002"
+"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" "13/0/02"
+"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" "Jan 1, 2001"
+'^(([^<>;()\[\]\\.,;:@"]+(\.[^<>()\[\]\\.,;:@"]+)*)|(".+"))@((([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))\.)*(([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))$' G "<0>blah@[10.0.0.1]</0>"
+'^(([^<>;()\[\]\\.,;:@"]+(\.[^<>()\[\]\\.,;:@"]+)*)|(".+"))@((([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))\.)*(([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))$' G "<0>a@b.c</0>"
+'^(([^<>;()\[\]\\.,;:@"]+(\.[^<>()\[\]\\.,;:@"]+)*)|(".+"))@((([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))\.)*(([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))$' "non@match@."
+#"^\d{9}[\d|X]$" G "<0>1234123412</0>"
+#"^\d{9}[\d|X]$" G "<0>123412341X</0>"
+#"^\d{9}[\d|X]$" "not an isbn"
+"^\d{9}(\d|X)$" G "<0>1234123412</0>"
+"^\d{9}(\d|X)$" G "<0>123412341X</0>"
+"^\d{9}(\d|X)$" "not an isbn"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$" G "<0>01/01/2001</0>"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$" G "<0>1/1/1999</0>"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$" G "<0>10/20/2080</0>"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$" "13/01/2001"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$" "1/1/1800"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$" "10/32/2080"
+"^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$" G "<0>0.25</0>"
+"^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$" G "<0>.75</0>"
+"^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$" G "<0>123.50</0>"
+"^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$" ".77"
+"^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$" "1.435"
+"^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$" G "<0>12345</0>"
+"^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$" G "<0>932 68</0>"
+"^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$" G "<0>S-621 46</0>"
+"^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$" "5367"
+"^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$" "425611"
+"^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$" "31 545"
+"^\d{5}(-\d{4})?$" G "<0>48222</0>"
+"^\d{5}(-\d{4})?$" G "<0>48222-1746</0>"
+"^\d{5}(-\d{4})?$" "4632"
+"^\d{5}(-\d{4})?$" "Blake"
+"^\d{5}(-\d{4})?$" "37333-32"
+'^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$' G "<0>test.txt</0>"
+'^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$' G "<0>test.jpg.txt</0>"
+'^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$' G "<0>a&b c.bmp</0>"
+'^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$' "CON"
+'^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$' ".pdf"
+'^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$' "test:2.pdf"
+"^(\d{1,3}'(\d{3}')*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" G "<0>1'235.140</0>"
+"^(\d{1,3}'(\d{3}')*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" G "<0>1'222'333.120</0>"
+"^(\d{1,3}'(\d{3}')*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" G "<0>456</0>"
+"^(\d{1,3}'(\d{3}')*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" "1234.500"
+"^(\d{1,3}'(\d{3}')*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" "78'45.123"
+"^(\d{1,3}'(\d{3}')*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" "123,0012"
+"^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$" G "<0>T2p 3c7</0>"
+"^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$" G "<0>T3P3c7</0>"
+"^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$" G "<0>T2P 3C7</0>"
+"^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$" "123456"
+"^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$" "3C7T2P"
+"^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$" "11T21RWW"
+"^\$[0-9]+(\.[0-9][0-9])?$" G "<0>$1.50</0>"
+"^\$[0-9]+(\.[0-9][0-9])?$" G "<0>$49</0>"
+"^\$[0-9]+(\.[0-9][0-9])?$" G "<0>$0.50</0>"
+"^\$[0-9]+(\.[0-9][0-9])?$" "1.5"
+"^\$[0-9]+(\.[0-9][0-9])?$" "$1.333"
+"^\$[0-9]+(\.[0-9][0-9])?$" "this $5.12 fails"
+"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b" G "<0>217.6.9.89</0>"
+"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b" G "<0>0.0.0.0</0>"
+"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b" G "<0>255.255.255.255</0>"
+"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b" "256.0.0.0"
+"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b" "0978.3.3.3"
+"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b" "65.4t.54.3"
+"((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)" G "<0>http://www.aspemporium.com</0>"
+"((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)" G "<0>mailto:dominionx@hotmail.com</0>"
+"((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)" G "<0>ftp://ftp.test.com</0>"
+"((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)" "www.aspemporium.com"
+"((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)" "dominionx@hotmail.com"
+"((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)" "bloggs"
+"\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\)\s*[0-9]{3,4}[- ]*[0-9]{4}" G "<0>(12) 123 1234</0>"
+"\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\)\s*[0-9]{3,4}[- ]*[0-9]{4}" G "<0>(01512) 123 1234</0>"
+"\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\)\s*[0-9]{3,4}[- ]*[0-9]{4}" G "<0>(0xx12) 1234 1234</0>"
+"\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\)\s*[0-9]{3,4}[- ]*[0-9]{4}" "12 123 1234"
+"\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\)\s*[0-9]{3,4}[- ]*[0-9]{4}" "(012) 123/1234"
+"\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\)\s*[0-9]{3,4}[- ]*[0-9]{4}" "(012) 123 12345"
+#"^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$" G "<0>bob-smith@foo.com</0>" # TODO: \w in pattern
+#"^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$" G "<0>bob.smith@foo.com</0>" # TODO: \w in pattern
+#"^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$" G "<0>bob_smith@foo.com</0>" # TODO: \w in pattern
+#"^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$" "-smith@foo.com" # TODO: \w in pattern
+#"^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$" ".smith@foo.com" # TODO: \w in pattern
+#"^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$" "smith@foo_com" # TODO: \w in pattern
+"^(?=.*\d).{4,8}$" G "<0>1234</0>"
+"^(?=.*\d).{4,8}$" G "<0>asdf1234</0>"
+"^(?=.*\d).{4,8}$" G "<0>asp123</0>"
+"^(?=.*\d).{4,8}$" "asdf"
+"^(?=.*\d).{4,8}$" "asdf12345"
+"^(?=.*\d).{4,8}$" "password"
+"[^A-Za-z0-9_@\.]|@{2,}|\.{5,}" G "<0>user name</0>"
+"[^A-Za-z0-9_@\.]|@{2,}|\.{5,}" G "<0>user#name</0>"
+"[^A-Za-z0-9_@\.]|@{2,}|\.{5,}" G "<0>.....</0>"
+"[^A-Za-z0-9_@\.]|@{2,}|\.{5,}" "User_Name1"
+"[^A-Za-z0-9_@\.]|@{2,}|\.{5,}" "username@foo.com"
+"[^A-Za-z0-9_@\.]|@{2,}|\.{5,}" "user.name@mail.foo.com"
+"^100$|^[0-9]{1,2}$|^[0-9]{1,2}\,[0-9]{1,3}$" G "<0>12,654</0>"
+"^100$|^[0-9]{1,2}$|^[0-9]{1,2}\,[0-9]{1,3}$" G "<0>1,987</0>"
+"^100$|^[0-9]{1,2}$|^[0-9]{1,2}\,[0-9]{1,3}$" "128,2"
+"^100$|^[0-9]{1,2}$|^[0-9]{1,2}\,[0-9]{1,3}$" "12,"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*[^\.\,\)\(\s]$" G "<0>https://www.restrictd.com/~myhome/</0>"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*[^\.\,\)\(\s]$" "http://www.krumedia.com."
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*[^\.\,\)\(\s]$" "(http://www.krumedia.com)"
+"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+\&%\$#\=~])*[^\.\,\)\(\s]$" "http://www.krumedia.com,"
+"(\d{1,3},(\d{3},)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" G "<0>2&651.50</0>"
+"(\d{1,3},(\d{3},)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" G "<0>987.895</0>"
+"(\d{1,3},(\d{3},)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$" "25$%787*"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9]?)?$" G "<0>$1,456,983.00</0>"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9]?)?$" G "<0>$1,700.07</0>"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9]?)?$" G "<0>$68,944.23</0>"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9]?)?$" "$20,86.93"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9]?)?$" "$1098.84"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9]?)?$" "$150."
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9])?$" G "<0>$28,009,987.88</0>"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9])?$" G "<0>$23,099.05</0>"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9])?$" G "<0>$.88</0>"
+"\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9])?$" "$234,5.99"
+"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" G "<0>29/02/2004 20:15:27</0>"
+"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" G "<0>29/2/04 8:9:5</0>"
+"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" G "<0>31/3/2004 9:20:17</0>"
+"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" "29/02/2003 20:15:15"
+"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" "2/29/04 20:15:15"
+"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" "31/3/4 9:20:17"
+"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" G "<0>somthing@someserver.com</0>"
+"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" G "<0>firstname.lastname@mailserver.domain.com</0>"
+"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" G "<0>username-something@some-server.nl</0>"
+"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" "username@someserver.domain.c"
+"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" "somename@server.domain-com"
+"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" "someone@something.se_eo"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)" G "<0>8am</0>"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)" G "<0>8 am</0>"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)" G "<0>8:00 am</0>"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)" "8a"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)" "8 a"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)" "8:00 a"
+"^([0-9]{2})?(\([0-9]{2})\)([0-9]{3}|[0-9]{4})-[0-9]{4}$" G "<0>55(21)123-4567</0>"
+"^([0-9]{2})?(\([0-9]{2})\)([0-9]{3}|[0-9]{4})-[0-9]{4}$" G "<0>(11)1234-5678</0>"
+"^([0-9]{2})?(\([0-9]{2})\)([0-9]{3}|[0-9]{4})-[0-9]{4}$" G "<0>55(71)4562-2234</0>"
+"^([0-9]{2})?(\([0-9]{2})\)([0-9]{3}|[0-9]{4})-[0-9]{4}$" "3434-3432"
+"^([0-9]{2})?(\([0-9]{2})\)([0-9]{3}|[0-9]{4})-[0-9]{4}$" "4(23)232-3232"
+"^([0-9]{2})?(\([0-9]{2})\)([0-9]{3}|[0-9]{4})-[0-9]{4}$" "55(2)232-232"
+"^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$" G "<0>1:01 AM</0>"
+"^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$" G "<0>23:52:01</0>"
+"^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$" G "<0>03.24.36 AM</0>"
+"^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$" "19:31 AM"
+"^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$" "9:9 PM"
+"^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$" "25:60:61"
+"^\d{0,2}(\.\d{1,2})?$" G "<0>99.99</0>"
+"^\d{0,2}(\.\d{1,2})?$" G "<0>99</0>"
+"^\d{0,2}(\.\d{1,2})?$" G "<0>.99</0>"
+"^\d{0,2}(\.\d{1,2})?$" "999.999"
+"^\d{0,2}(\.\d{1,2})?$" "999"
+"^\d{0,2}(\.\d{1,2})?$" ".999"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{4,8}$" G "<0>1agdA*$#</0>"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{4,8}$" G "<0>1agdA*$#</0>"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{4,8}$" G "<0>1agdA*$#</0>"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{4,8}$" "wyrn%@*&$# f"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{4,8}$" "mbndkfh782"
+"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{4,8}$" "BNfhjdhfjd&*)%#$)"
+"^([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+([a-zA-Z0-9]{3,5})$" G "<0>freshmeat.net</0>"
+"^([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+([a-zA-Z0-9]{3,5})$" G "<0>123.com</0>"
+"^([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+([a-zA-Z0-9]{3,5})$" G "<0>TempLate-toolkKt.orG</0>"
+"^([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+([a-zA-Z0-9]{3,5})$" "-dog.com"
+"^([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+([a-zA-Z0-9]{3,5})$" "?boy.net"
+"^([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+([a-zA-Z0-9]{3,5})$" "this.domain"
+"^[^']*$" G "<0>asljas</0>"
+"^[^']*$" G "<0>%/&89uhuhadjkh</0>"
+"^[^']*$" G '<0>"hi there!"</0>'
+"^[^']*$" "'hi there!'"
+"^[^']*$" "It's 9 o'clock"
+"^[^']*$" "'''''"
+"(^\(\)$|^\(((\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\),)*(\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\)){1}\)))$" G "<0>((24,((1,2,3),(3,4,5))))</0>"
+"(^\(\)$|^\(((\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\),)*(\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\)){1}\)))$" G "<0>((1,((2,3,4),(4,5,6),(96,34,26))),(12,((1,3,4),(4,5,6),(7,8,9))))</0>"
+"(^\(\)$|^\(((\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\),)*(\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\)){1}\)))$" G "<0>()</0>"
+"(^\(\)$|^\(((\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\),)*(\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\)){1}\)))$" "(24,((1,2,3),(3,4,5)))"
+"(^\(\)$|^\(((\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\),)*(\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\)){1}\)))$" "( )"
+"(^\(\)$|^\(((\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\),)*(\([0-9]+,(\((\([0-9]+,[0-9]+,[0-9]+\),)*(\([0-9]+,[0-9]+,[0-9]+\)){1}\))+\)){1}\)))$" "((23,(12,3,4),(4,5,6)))"
+"^[a-zA-Z0-9\s .\-_']+$" G "<0>dony d'gsa</0>"
+"^[a-zA-Z0-9\s .\-_']+$" "^[a-zA-Z0-9\s.\-_']+$"
+"^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$" G "<0>example@example.com</0>"
+"^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$" G "<0>foo@bar.info</0>"
+"^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$" G "<0>blah@127.0.0.1</0>"
+"^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$" "broken@@example.com"
+"^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$" "foo@bar.infp"
+"^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$" "blah@.nospam.biz"
+"^\d{5}(-\d{3})?$" G "<0>13165-000</0>"
+"^\d{5}(-\d{3})?$" G "<0>38175-000</0>"
+"^\d{5}(-\d{3})?$" G "<0>81470-276</0>"
+"^\d{5}(-\d{3})?$" "13165-00"
+"^\d{5}(-\d{3})?$" "38175-abc"
+"^\d{5}(-\d{3})?$" "81470-2763"
+"^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$" G "<0>$0.84</0>"
+"^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$" G "<0>$123458</0>"
+"^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$" G "<0>$1,234,567.89</0>"
+"^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$" "$12,3456.01"
+"^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$" "12345"
+"^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$" "$1.234"
+"([A-Z]:\\[^/:\*\?<>\|]+\.\w{2,6})|(\\{2}[^/:\*\?<>\|]+\.\w{2,6})" G "<0>C:\\temp\\this allows spaces\\web.config</0>"
+"([A-Z]:\\[^/:\*\?<>\|]+\.\w{2,6})|(\\{2}[^/:\*\?<>\|]+\.\w{2,6})" G "<0>\\\\Andromeda\\share\\file name.123</0>"
+"([A-Z]:\\[^/:\*\?<>\|]+\.\w{2,6})|(\\{2}[^/:\*\?<>\|]+\.\w{2,6})" "tz:\temp\ fi*le?na:m<e>.doc"
+"([A-Z]:\\[^/:\*\?<>\|]+\.\w{2,6})|(\\{2}[^/:\*\?<>\|]+\.\w{2,6})" "\\Andromeda\share\filename.a"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)" G "<0>10:35</0>"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)" G "<0>9:20</0>"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)" G "<0>23</0>"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)" "24:00"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)" "20 PM"
+"(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)" "20:15 PM"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?$" G "<0>$3,023,123.34</0>"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?$" G "<0>9,876,453</0>"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?$" G "<0>123456.78</0>"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?$" "4,33,234.34"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?$" "$1.234"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?$" "abc"
+"^\$?\d+(\.(\d{2}))?$" G "<0>$2.43</0>"
+"^\$?\d+(\.(\d{2}))?$" G "<0>2.02</0>"
+"^\$?\d+(\.(\d{2}))?$" G "<0>$2112</0>"
+"^\$?\d+(\.(\d{2}))?$" "2.1"
+"^\$?\d+(\.(\d{2}))?$" "$.14"
+"^\$?\d+(\.(\d{2}))?$" "$2,222.12"
+/("[^"]*")|('[^\r]*)(\r\n)?/ G '<0>"my string"</0>'
+/("[^"]*")|('[^\r]*)(\r\n)?/ G '<0>"a string with \u0027 in it"</0>'
+/("[^"]*")|('[^\r]*)(\r\n)?/ G "<0>' comment</0>"
+/("[^"]*")|('[^\r]*)(\r\n)?/ /asd "/
+"^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$" G "<0>BFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA</0>"
+"^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$" G "<0>BFDB4d31-3e35-4dab-afca-5e6e5c8f61ea</0>"
+"^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$" "qqqBFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA"
+"^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$" "BFDB4D31-3E-4DAB-AFCA-5E6E5C8F61EA"
+"^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$" "BFDB4D31-3E35-4DAB-AF"
+#"^\d{2}(\x2e)(\d{3})(-\d{3})?$" G "<0>12.345-678</0>" # TODO: \x not implemented.
+#"^\d{2}(\x2e)(\d{3})(-\d{3})?$" G "<0>23.345-123</0>"
+#"^\d{2}(\x2e)(\d{3})(-\d{3})?$" G "<0>99.999</0>"
+#"^\d{2}(\x2e)(\d{3})(-\d{3})?$" "41222-222"
+#"^\d{2}(\x2e)(\d{3})(-\d{3})?$" "3.444-233"
+#"^\d{2}(\x2e)(\d{3})(-\d{3})?$" "43.324444"
+"^\d{2}(\u002e)(\d{3})(-\d{3})?$" G "<0>12.345-678</0>"
+"^\d{2}(\u002e)(\d{3})(-\d{3})?$" G "<0>23.345-123</0>"
+"^\d{2}(\u002e)(\d{3})(-\d{3})?$" G "<0>99.999</0>"
+"^\d{2}(\u002e)(\d{3})(-\d{3})?$" "41222-222"
+"^\d{2}(\u002e)(\d{3})(-\d{3})?$" "3.444-233"
+"^\d{2}(\u002e)(\d{3})(-\d{3})?$" "43.324444"
+#"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$" G "<0>c:\file.txt</0>"
+#"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$" G "<0>c:\folder\sub folder\file.txt</0>"
+#"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$" G "<0>\\network\folder\file.txt</0>" # TODO: \w in pattern
+#"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$" "C:" # TODO: \w in pattern
+#"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$" "C:\file.xls" # TODO: \w in pattern
+#"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$" "folder.txt" # TODO: \w in pattern
+"^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>my.domain.com</0>"
+"^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>regexlib.com</0>"
+"^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>big-reg.com</0>"
+"^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" ".mydomain.com"
+"^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "regexlib.comm"
+"^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "-bigreg.com"
+"^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$" G "<0>0001-12-31</0>"
+"^\d{4}[\-\/\s ]?((((0[13578])|(1[02]))[\-\/\s ]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s ]?(([0-2][0-9])|(30)))|(02[\-\/\s ]?[0-2][0-9]))$" G "<0>9999 09 30</0>"
+"^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$" G "<0>2002/03/03</0>"
+"^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$" "0001\02\30"
+"^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$" "9999.15.01"
+"^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$" "2002/3/3"
+"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$" G "<0>http://psychopop.org</0>"
+"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$" G "<0>http://www.edsroom.com/newUser.asp</0>"
+"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$" G "<0>http://unpleasant.jarrin.net/markov/inde</0>"
+"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$" "ftp://psychopop.org"
+"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$" "http://www.edsroom/"
+"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$" "http://un/pleasant.jarrin.net/markov/index.asp"
+"^( [1-9]|[1-9]|0[1-9]|10|11|12)[0-5]\d$" G "<0>1145</0>"
+"^( [1-9]|[1-9]|0[1-9]|10|11|12)[0-5]\d$" G "<0>933</0>"
+"^( [1-9]|[1-9]|0[1-9]|10|11|12)[0-5]\d$" G "<0> 801</0>"
+"^( [1-9]|[1-9]|0[1-9]|10|11|12)[0-5]\d$" "0000"
+"^( [1-9]|[1-9]|0[1-9]|10|11|12)[0-5]\d$" "1330"
+"^( [1-9]|[1-9]|0[1-9]|10|11|12)[0-5]\d$" "8:30"
+"^\d{1,2}\/\d{2,4}$" G "<0>9/02</0>"
+"^\d{1,2}\/\d{2,4}$" G "<0>09/2002</0>"
+"^\d{1,2}\/\d{2,4}$" G "<0>09/02</0>"
+"^\d{1,2}\/\d{2,4}$" "Fall 2002"
+"^\d{1,2}\/\d{2,4}$" "Sept 2002"
+"^(|(0[1-9])|(1[0-2]))\/((0[1-9])|(1\d)|(2\d)|(3[0-1]))\/((\d{4}))$" G "<0>01/01/2001</0>"
+"^(|(0[1-9])|(1[0-2]))\/((0[1-9])|(1\d)|(2\d)|(3[0-1]))\/((\d{4}))$" G "<0>02/30/2001</0>"
+"^(|(0[1-9])|(1[0-2]))\/((0[1-9])|(1\d)|(2\d)|(3[0-1]))\/((\d{4}))$" G "<0>12/31/2002</0>"
+"^(|(0[1-9])|(1[0-2]))\/((0[1-9])|(1\d)|(2\d)|(3[0-1]))\/((\d{4}))$" "1/1/02"
+"^(|(0[1-9])|(1[0-2]))\/((0[1-9])|(1\d)|(2\d)|(3[0-1]))\/((\d{4}))$" "1/1/2002"
+"^(|(0[1-9])|(1[0-2]))\/((0[1-9])|(1\d)|(2\d)|(3[0-1]))\/((\d{4}))$" "1/25/2002"
+"^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$" G "<0>15615552323</0>"
+"^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$" G "<0>1-561-555-1212</0>"
+"^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$" G "<0>5613333</0>"
+"^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$" "1-555-5555"
+"^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$" "15553333"
+"^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$" "0-561-555-1212"
+#"<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>" G "<0><input type = text name = "bob"></0>" # TODO: \w in pattern
+#"<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>" G "<0><select name = "fred"></0>" # TODO: \w in pattern
+#"<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>" G "<0><form</0>" # TODO: \w in pattern
+#"<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>" "<input type = submit>" # TODO: \w in pattern
+#"<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>" "<font face = "arial">" # TODO: \w in pattern
+#"<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>" "The drity brown fox stank like" # TODO: \w in pattern
+"^(1|01|2|02|3|03|4|04|5|05|6|06|7|07|8|08|9|09|10|11|12{1,2}):(([0-5]{1}[0-9]{1}\s{0,1})([AM|PM|am|pm]{2,2}))\W{0}$" G "<0>1:00 AM</0>"
+"^(1|01|2|02|3|03|4|04|5|05|6|06|7|07|8|08|9|09|10|11|12{1,2}):(([0-5]{1}[0-9]{1}\s{0,1})([AM|PM|am|pm]{2,2}))\W{0}$" G "<0>12:00 PM</0>"
+"^(1|01|2|02|3|03|4|04|5|05|6|06|7|07|8|08|9|09|10|11|12{1,2}):(([0-5]{1}[0-9]{1}\s{0,1})([AM|PM|am|pm]{2,2}))\W{0}$" G "<0>1:00am</0>"
+"^(1|01|2|02|3|03|4|04|5|05|6|06|7|07|8|08|9|09|10|11|12{1,2}):(([0-5]{1}[0-9]{1}\s{0,1})([AM|PM|am|pm]{2,2}))\W{0}$" "24:00"
+"^\d*$" G "<0>123</0>"
+"^\d*$" G "<0>000</0>"
+"^\d*$" G "<0>43</0>"
+"^\d*$" "asbc"
+"^\d*$" "-34"
+"^\d*$" "3.1415"
+"^[-+]?\d*$" G "<0>123</0>"
+"^[-+]?\d*$" G "<0>-123</0>"
+"^[-+]?\d*$" G "<0>+123</0>"
+"^[-+]?\d*$" "abc"
+"^[-+]?\d*$" "3.14159"
+"^[-+]?\d*$" "-3.14159"
+"^\d*\.?\d*$" G "<0>123</0>"
+"^\d*\.?\d*$" G "<0>3.14159</0>"
+"^\d*\.?\d*$" G "<0>.234</0>"
+"^\d*\.?\d*$" "abc"
+"^\d*\.?\d*$" "-3.14159"
+"^\d*\.?\d*$" "3.4.2"
+"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$" G "<0>44240</0>"
+"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$" G "<0>44240-5555</0>"
+"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$" G "<0>T2P 3C7</0>"
+"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$" "44240ddd"
+"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$" "t44240-55"
+"^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$" "t2p3c7"
+"^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$" G "<0>(910)456-7890</0>"
+"^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$" G "<0>(910)456-8970 x12</0>"
+"^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$" G "<0>(910)456-8970 1211</0>"
+"^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$" "(910) 156-7890"
+"^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$" "(910) 056-7890"
+"^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$" "(910) 556-7890 x"
+"^((0?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$" G "<0>31.01.2002</0>"
+"^((0?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$" G "<0>29.2.2004</0>"
+"^((0?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$" G "<0>09.02.2005</0>"
+"^((0?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$" "31.11.2002"
+"^((0?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$" "29.2.2002"
+"^((0?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$" "33.06.2000"
+"^(0[1-9]|1[0-2])\/((0[1-9]|2\d)|3[0-1])\/(19\d\d|200[0-3])$" G "<0>12/31/2003</0>"
+"^(0[1-9]|1[0-2])\/((0[1-9]|2\d)|3[0-1])\/(19\d\d|200[0-3])$" G "<0>01/01/1900</0>"
+"^(0[1-9]|1[0-2])\/((0[1-9]|2\d)|3[0-1])\/(19\d\d|200[0-3])$" G "<0>11/31/2002</0>"
+"^(0[1-9]|1[0-2])\/((0[1-9]|2\d)|3[0-1])\/(19\d\d|200[0-3])$" "1/1/2002"
+"^(0[1-9]|1[0-2])\/((0[1-9]|2\d)|3[0-1])\/(19\d\d|200[0-3])$" "01/01/02"
+"^(0[1-9]|1[0-2])\/((0[1-9]|2\d)|3[0-1])\/(19\d\d|200[0-3])$" "01/01/2004"
+"^((((([13578])|(1[0-2]))[\-\/\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\-\/\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\-\/\s]?(([1-9])|([1-2][0-9]))))[\-\/\s]?\d{4})(\s((([1-9])|(1[02]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$" G "<0>3/3/2003</0>"
+"^((((([13578])|(1[0-2]))[\-\/\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\-\/\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\-\/\s]?(([1-9])|([1-2][0-9]))))[\-\/\s]?\d{4})(\s((([1-9])|(1[02]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$" G "<0>3/3/2002 3:33 pm</0>"
+"^((((([13578])|(1[0-2]))[\-\/\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\-\/\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\-\/\s]?(([1-9])|([1-2][0-9]))))[\-\/\s]?\d{4})(\s((([1-9])|(1[02]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$" G "<0>3/3/2003 3:33:33 am</0>"
+"^((((([13578])|(1[0-2]))[\-\/\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\-\/\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\-\/\s]?(([1-9])|([1-2][0-9]))))[\-\/\s]?\d{4})(\s((([1-9])|(1[02]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$" "13/1/2002"
+"^((((([13578])|(1[0-2]))[\-\/\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\-\/\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\-\/\s]?(([1-9])|([1-2][0-9]))))[\-\/\s]?\d{4})(\s((([1-9])|(1[02]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$" "3/3/2002 3:33"
+"^((((([13578])|(1[0-2]))[\-\/\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\-\/\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\-\/\s]?(([1-9])|([1-2][0-9]))))[\-\/\s]?\d{4})(\s((([1-9])|(1[02]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$" "31/3/2002"
+"([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xls" G "<0>E:\DyAGT\SD01A_specV2.xls</0>"
+"([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xls" "E:\DyAGT\SD01A_specV2.txt"
+"(((0[13578]|10|12)([-./])(0[1-9]|[12][0-9]|3[01])([-./])(\d{4}))|((0[469]|11)([-./])([0][1-9]|[12][0-9]|30)([-./])(\d{4}))|((2)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\d{4}))|((2)(\.|-|\/)(29)([-./])([02468][048]00))|((2)([-./])(29)([-./])([13579][26]00))|((2)([-./])(29)([-./])([0-9][0-9][0][48]))|((2)([-./])(29)([-./])([0-9][0-9][2468][048]))|((2)([-./])(29)([-./])([0-9][0-9][13579][26])))" G "<0>02/29/2084</0>"
+"(((0[13578]|10|12)([-./])(0[1-9]|[12][0-9]|3[01])([-./])(\d{4}))|((0[469]|11)([-./])([0][1-9]|[12][0-9]|30)([-./])(\d{4}))|((2)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\d{4}))|((2)(\.|-|\/)(29)([-./])([02468][048]00))|((2)([-./])(29)([-./])([13579][26]00))|((2)([-./])(29)([-./])([0-9][0-9][0][48]))|((2)([-./])(29)([-./])([0-9][0-9][2468][048]))|((2)([-./])(29)([-./])([0-9][0-9][13579][26])))" G "<0>01/31/2000</0>"
+"(((0[13578]|10|12)([-./])(0[1-9]|[12][0-9]|3[01])([-./])(\d{4}))|((0[469]|11)([-./])([0][1-9]|[12][0-9]|30)([-./])(\d{4}))|((2)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\d{4}))|((2)(\.|-|\/)(29)([-./])([02468][048]00))|((2)([-./])(29)([-./])([13579][26]00))|((2)([-./])(29)([-./])([0-9][0-9][0][48]))|((2)([-./])(29)([-./])([0-9][0-9][2468][048]))|((2)([-./])(29)([-./])([0-9][0-9][13579][26])))" G "<0>11/30/2000</0>"
+"(((0[13578]|10|12)([-./])(0[1-9]|[12][0-9]|3[01])([-./])(\d{4}))|((0[469]|11)([-./])([0][1-9]|[12][0-9]|30)([-./])(\d{4}))|((2)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\d{4}))|((2)(\.|-|\/)(29)([-./])([02468][048]00))|((2)([-./])(29)([-./])([13579][26]00))|((2)([-./])(29)([-./])([0-9][0-9][0][48]))|((2)([-./])(29)([-./])([0-9][0-9][2468][048]))|((2)([-./])(29)([-./])([0-9][0-9][13579][26])))" "02/29/2083"
+"(((0[13578]|10|12)([-./])(0[1-9]|[12][0-9]|3[01])([-./])(\d{4}))|((0[469]|11)([-./])([0][1-9]|[12][0-9]|30)([-./])(\d{4}))|((2)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\d{4}))|((2)(\.|-|\/)(29)([-./])([02468][048]00))|((2)([-./])(29)([-./])([13579][26]00))|((2)([-./])(29)([-./])([0-9][0-9][0][48]))|((2)([-./])(29)([-./])([0-9][0-9][2468][048]))|((2)([-./])(29)([-./])([0-9][0-9][13579][26])))" "11/31/2000"
+"(((0[13578]|10|12)([-./])(0[1-9]|[12][0-9]|3[01])([-./])(\d{4}))|((0[469]|11)([-./])([0][1-9]|[12][0-9]|30)([-./])(\d{4}))|((2)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\d{4}))|((2)(\.|-|\/)(29)([-./])([02468][048]00))|((2)([-./])(29)([-./])([13579][26]00))|((2)([-./])(29)([-./])([0-9][0-9][0][48]))|((2)([-./])(29)([-./])([0-9][0-9][2468][048]))|((2)([-./])(29)([-./])([0-9][0-9][13579][26])))" "01/32/2000"
+"^[a-zA-Z0-9\s .\-]+$" G "<0>2222 Mock St.</0>" # TODO: \s in patterns not implemented
+"^[a-zA-Z0-9\s .\-]+$" G "<0>1 A St.</0>"
+"^[a-zA-Z0-9\s .\-]+$" G "<0>555-1212</0>"
+"^[a-zA-Z0-9\s.\-]+$" "[A Street]"
+"^[a-zA-Z0-9\s.\-]+$" "(3 A St.)"
+"^[a-zA-Z0-9\s.\-]+$" "{34 C Ave.}"
+"^[a-zA-Z0-9\s.\-]+$" "Last.*?(\d+.?\d*)"
+"^[a-zA-Z0-9\s .\-]+$" G "<TR><TD ALIGN=RIGHT> </TD><TD>Last</TD><TD ALIGN=RIGHT NOW"
+"^[a-zA-Z0-9\s.\-]+$" "[AADDSS]"
+"^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$" G "<0>1-(123)-123-1234</0>"
+"^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$" G "<0>123 123 1234</0>"
+"^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$" G "<0>1-800-ALPHNUM</0>"
+"^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$" "1.123.123.1234"
+"^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$" "(123)-1234-123"
+"^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$" "123-1234"
+"^([0-1][0-9]|[2][0-3]):([0-5][0-9])$" G "<0>02:04</0>"
+"^([0-1][0-9]|[2][0-3]):([0-5][0-9])$" G "<0>16:56</0>"
+"^([0-1][0-9]|[2][0-3]):([0-5][0-9])$" G "<0>23:59</0>"
+"^([0-1][0-9]|[2][0-3]):([0-5][0-9])$" "02:00 PM"
+"^([0-1][0-9]|[2][0-3]):([0-5][0-9])$" "PM2:00"
+"^([0-1][0-9]|[2][0-3]):([0-5][0-9])$" "24:00"
+"^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$" G "<0>01/01/1990</0>"
+"^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$" G "<0>12/12/9999</0>"
+"^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$" G "<0>3/28/2001</0>"
+"^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$" "3-8-01"
+"^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$" "13/32/1001"
+"^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$" "03/32/1989"
+"((\(\d{3}\)?)|(\d{3}))([\s \-./]?)(\d{3})([\s \-./]?)(\d{4})" G "<0>1.2123644567</0>"
+"((\(\d{3}\)?)|(\d{3}))([\s \-./]?)(\d{3})([\s \-./]?)(\d{4})" G "<0>0-234.567/8912</0>"
+"((\(\d{3}\)?)|(\d{3}))([\s \-./]?)(\d{3})([\s \-./]?)(\d{4})" G "<0>1-(212)-123 4567</0>"
+"((\(\d{3}\)?)|(\d{3}))([\s \-./]?)(\d{3})([\s \-./]?)(\d{4})" "0-212364345"
+"((\(\d{3}\)?)|(\d{3}))([\s \-./]?)(\d{3})([\s \-./]?)(\d{4})" "1212-364,4321"
+"((\(\d{3}\)?)|(\d{3}))([\s \-./]?)(\d{3})([\s \-./]?)(\d{4})" "0212\345/6789"
+"^([0-9]{6}[\s \-]{1}[0-9]{12}|[0-9]{18})$" G "<0>000000 000000000000</0>"
+"^([0-9]{6}[\s \-]{1}[0-9]{12}|[0-9]{18})$" G "<0>000000-000000000000</0>"
+"^([0-9]{6}[\s \-]{1}[0-9]{12}|[0-9]{18})$" G "<0>000000000000000000</0>"
+"^([0-9]{6}[\s \-]{1}[0-9]{12}|[0-9]{18})$" "000000_000000000000"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$" G "<0>01/01/2001</0>"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$" G "<0>1/1/2001</0>"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$" G "<0>01/1/01</0>"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$" "13/01/2001"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$" "1/2/100"
+"^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$" "09/32/2001"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$" G "<0>$3,023,123.34</0>"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$" G "<0>9,876,453</0>"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$" G "<0>123456.78</0>"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$" "4,33,234.34"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$" "$1.234"
+"^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$" "abc"
+"^\d{5}$|^\d{5}-\d{4}$" G "<0>55555-5555</0>"
+"^\d{5}$|^\d{5}-\d{4}$" G "<0>34564-3342</0>"
+"^\d{5}$|^\d{5}-\d{4}$" G "<0>90210</0>"
+"^\d{5}$|^\d{5}-\d{4}$" "434454444"
+"^\d{5}$|^\d{5}-\d{4}$" "645-32-2345"
+"^\d{5}$|^\d{5}-\d{4}$" "abc"
+"^\d{3}-\d{2}-\d{4}$" G "<0>333-22-4444</0>"
+"^\d{3}-\d{2}-\d{4}$" G "<0>123-45-6789</0>"
+"^\d{3}-\d{2}-\d{4}$" "123456789"
+"^\d{3}-\d{2}-\d{4}$" "SSN"
+"^[2-9]\d{2}-\d{3}-\d{4}$" G "<0>800-555-5555</0>"
+"^[2-9]\d{2}-\d{3}-\d{4}$" G "<0>333-444-5555</0>"
+"^[2-9]\d{2}-\d{3}-\d{4}$" G "<0>212-666-1234</0>"
+"^[2-9]\d{2}-\d{3}-\d{4}$" "000-000-0000"
+"^[2-9]\d{2}-\d{3}-\d{4}$" "123-456-7890"
+"^[2-9]\d{2}-\d{3}-\d{4}$" "2126661234"
+"^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$" G "<0>44240</0>"
+"^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$" G "<0>44240-5555</0>"
+"^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$" G "<0>G3H 6A3</0>"
+"^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$" "Ohio"
+"^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$" "abc"
+"^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$" "g3h6a3"
+"[0-9]{4}\s*[a-zA-Z]{2}" G "<0>1054 WD</0>"
+"[0-9]{4}\s*[a-zA-Z]{2}" G "<0>1054WD</0>"
+"[0-9]{4}\s*[a-zA-Z]{2}" G "<0>1054 wd</0>"
+"[0-9]{4}\s*[a-zA-Z]{2}" "10543"
+"(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$)" G "<0>0732105432</0>"
+"(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$)" G "<0>1300333444</0>"
+"(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$)" G "<0>131313</0>"
+"(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$)" "32105432"
+"(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$)" "13000456"
+"^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([\-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[\-a-zA-Z0-9._?,'+\&%$#=~\\]+)*/?)$" G "<0>http://207.68.172.254/home.ashx</0>"
+"^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([\-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[\-a-zA-Z0-9._?,'+\&%$#=~\\]+)*/?)$" G "<0>ftp://ftp.netscape.com/</0>"
+"^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([\-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[\-a-zA-Z0-9._?,'+\&%$#=~\\]+)*/?)$" G "<0>https://www.brinkster.com/login.asp</0>"
+"^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([\-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[\-a-zA-Z0-9._?,'+\&%$#=~\\]+)*/?)$" "htp://mistake.com/"
+"^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([\-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[\-a-zA-Z0-9._?,'+\&%$#=~\\]+)*/?)$" "http://www_address.com/"
+"^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([\-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[\-a-zA-Z0-9._?,'+\&%$#=~\\]+)*/?)$" "ftp://www.files.com/file with spaces.txt"
+"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})" G "<0>2002-11-03</0>"
+"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})" G "<0>2007-17-08</0>"
+"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})" G "<0>9999-99-99</0>"
+"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})" "2002/17/18"
+"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})" "2002.18.45"
+"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})" "18.45.2002"
+"^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{0,2})?$" G "<0>$0,234.50</0>"
+"^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{0,2})?$" G "<0>0234.5</0>"
+"^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{0,2})?$" G "<0>0,234.</0>"
+"^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{0,2})?$" "$1,23,50"
+"^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{0,2})?$" "$123.123"
+"(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8})" G "<0>12.345-678</0>"
+"(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8})" G "<0>12345-678</0>"
+"(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8})" G "<0>12345678</0>"
+"(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8})" "12.345678"
+"(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8})" "12345-1"
+"(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8})" "123"
+'^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?"<>|]+\.htm(l)?$' G "<0>x:\\test\\testing.htm</0>"
+'^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?"<>|]+\.htm(l)?$' G "<0>x:\\test\\test#$ ing.html</0>"
+'^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?"<>|]+\.htm(l)?$' G "<0>\\\\test\testing.html</0>"
+'^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?"<>|]+\.htm(l)?$' "x:\test\test/ing.htm"
+'^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?"<>|]+\.htm(l)?$' "x:\test\test*.htm"
+'^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?"<>|]+\.htm(l)?$' "\\test?<.htm"
+"^[1-9]{1}[0-9]{3}$" G "<0>1234</0>"
+"^[1-9]{1}[0-9]{3}$" "123"
+"^[1-9]{1}[0-9]{3}$" "123A"
+"^[A-Z]{1}( |-)?[1-9]{1}[0-9]{3}$" G "<0>A-1234</0>"
+"^[A-Z]{1}( |-)?[1-9]{1}[0-9]{3}$" G "<0>A 1234</0>"
+"^[A-Z]{1}( |-)?[1-9]{1}[0-9]{3}$" G "<0>A1234</0>"
+"^[A-Z]{1}( |-)?[1-9]{1}[0-9]{3}$" "AA-1234"
+"^[A-Z]{1}( |-)?[1-9]{1}[0-9]{3}$" "A12345"
+"^(F-)?[0-9]{5}$" G "<0>12345</0>"
+"^(F-)?[0-9]{5}$" G "<0>F-12345</0>"
+"^(F-)?[0-9]{5}$" "F12345"
+"^(F-)?[0-9]{5}$" "F-123456"
+"^(F-)?[0-9]{5}$" "123456"
+"^(V-|I-)?[0-9]{4}$" G "<0>1234</0>"
+"^(V-|I-)?[0-9]{4}$" G "<0>V-1234</0>"
+"^(V-|I-)?[0-9]{4}$" "12345"
+"^[1-9]{1}[0-9]{3} ?[A-Z]{2}$" G "<0>1234 AB</0>"
+"^[1-9]{1}[0-9]{3} ?[A-Z]{2}$" G "<0>1234AB</0>"
+"^[1-9]{1}[0-9]{3} ?[A-Z]{2}$" "123AB"
+"^[1-9]{1}[0-9]{3} ?[A-Z]{2}$" "1234AAA"
+"^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$" G "<0>12345</0>"
+"^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$" G "<0>10234</0>"
+"^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$" G "<0>01234</0>"
+"^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$" "00123"
+"^(/w|/W|[^<>+?$%\{}\&])+$" G "<0>John Doe Sr.</0>"
+"^(/w|/W|[^<>+?$%\{}\&])+$" G "<0>100 Elm St., Suite 25</0>"
+"^(/w|/W|[^<>+?$%\{}\&])+$" G "<0>Valerie's Gift Shop</0>"
+"^(/w|/W|[^<>+?$%\{}\&])+$" "<h1>Hey</h1>"
+/<[a-zA-Z][^>]*\son\w+=(\w+|'[^']*'|"[^"]*")[^>]*>/ G '<0><IMG onmouseover="window.close()"></0>'
+/<[a-zA-Z][^>]*\son\w+=(\w+|'[^']*'|"[^"]*")[^>]*>/ '<IMG src="star.gif">'
+"(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$" G "<0>1</0>"
+"(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$" G "<0>12345.123</0>"
+"(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$" G "<0>0.5</0>"
+"(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$" "0"
+"(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$" "0.0"
+"(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$" "123456.1234"
+"^.+@[^\.].*\.[a-z]{2,}$" G "<0>whatever@somewhere.museum</0>"
+"^.+@[^\.].*\.[a-z]{2,}$" G "<0>foreignchars@myforeigncharsdomain.nu</0>"
+"^.+@[^\.].*\.[a-z]{2,}$" G "<0>me+mysomething@mydomain.com</0>"
+"^.+@[^\.].*\.[a-z]{2,}$" "a@b.c"
+"^.+@[^\.].*\.[a-z]{2,}$" "me@.my.com"
+"^.+@[^\.].*\.[a-z]{2,}$" "a@b.comFOREIGNCHAR"
+"^(\d{5}-\d{4}|\d{5})$" G "<0>12345</0>"
+"^(\d{5}-\d{4}|\d{5})$" G "<0>12345-1234</0>"
+"^(\d{5}-\d{4}|\d{5})$" "12345-12345"
+"^(\d{5}-\d{4}|\d{5})$" "123"
+"^(\d{5}-\d{4}|\d{5})$" "12345-abcd"
+"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" G "<0>0.0.0.0</0>"
+"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" G "<0>255.255.255.02</0>"
+"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" G "<0>192.168.0.136</0>"
+"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" "256.1.3.4"
+"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" "023.44.33.22"
+"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" "10.57.98.23."
+"<img([^>]*[^/])>" G '<0><img src="bob"></0>'
+"<img([^>]*[^/])>" '<img src="bob" />'
+#"<!--[\s\S]*?-->" G "<0><!-- comments --></0>"
+#"<!--[\s\S]*?-->" G "<0><!-- x = a > b - 3 --></0>"
+#"<!--[\s\S]*?-->" "<COMMENTS>this is a comment</COMMENTS>"
+"<!--[\p{Zs}\P{Zs}]*?-->" G "<0><!-- comments --></0>"
+"<!--[\p{Zs}\P{Zs}]*?-->" G "<0><!-- x = a > b - 3 --></0>"
+"<!--[\p{Zs}\P{Zs}]*?-->" "<COMMENTS>this is a comment</COMMENTS>"
+/<\u002f?(\w+)(\s+\w+=(\w+|"[^"]*"|'[^']*'))*>/ G "<0><TD></0>"
+/<\u002f?(\w+)(\s+\w+=(\w+|"[^"]*"|'[^']*'))*>/ G '<0><TD bgColor="FFFFFF"></0>'
+/<\u002f?(\w+)(\s+\w+=(\w+|"[^"]*"|'[^']*'))*>/ G "<0></TD></0>"
+/<\u002f?(\w+)(\s+\w+=(\w+|"[^"]*"|'[^']*'))*>/ "No Tag Here ..."
+"(\{\\f\d*)\\([^;]+;)" G "<0>{\\f0\\Some Font names here;</0>"
+"(\{\\f\d*)\\([^;]+;)" G "<0>{\\f1\\fswiss\\fcharset0\\fprq2{\\*\\panose 020b0604020202020204}Arial;</0>"
+"(\{\\f\d*)\\([^;]+;)" G "{\\f"
+"(\{\\f\d*)\\([^;]+;)" "{f0fs20 some text}"
+#"</?([a-zA-Z][-A-Za-z\d\.]{0,71})(\s+(\S+)(\s*=\s*([-\w\.]{1,1024}|"[^"]{0,1024}"|'[^']{0,1024}'))?)*\s*>" G "<0><IMG src='stars.gif' alt="space" height=1></0>" # TODO: \w in pattern
+#"</?([a-zA-Z][-A-Za-z\d\.]{0,71})(\s+(\S+)(\s*=\s*([-\w\.]{1,1024}|"[^"]{0,1024}"|'[^']{0,1024}'))?)*\s*>" "this is not a tag" # TODO: \w in pattern
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$" G "<0>12/30/2002</0>"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$" G "<0>01/12/1998 13:30</0>"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$" G "<0>01/28/2002 22:35:00</0>"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$" "13/30/2002"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$" "01/12/1998 24:30"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$" "01/28/2002 22:35:64"
+#"((?<strElement>(^[A-Z0-9-;=]*:))(?<strValue>(.*)))" G "<0>BEGIN:</0>" #named capture
+#"((?<strElement>(^[A-Z0-9-;=]*:))(?<strValue>(.*)))" G "<0>TEL;WORK;VOICE:</0>" #named capture
+#"((?<strElement>(^[A-Z0-9-;=]*:))(?<strValue>(.*)))" G "<0>TEL:</0>" #named capture
+#"((?<strElement>(^[A-Z0-9-;=]*:))(?<strValue>(.*)))" "begin:" #named capture
+#"((?<strElement>(^[A-Z0-9-;=]*:))(?<strValue>(.*)))" "TEL;PREF;" #named capture
+'^<a\s+href\s*=\s*"http:\/\/([^"]*)"([^>]*)>(.*?(?=<\/a>))<\/a>$' G '<0><a href="http://www.mysite.com">my external link</a></0>'
+'^<a\s+href\s*=\s*"http:\/\/([^"]*)"([^>]*)>(.*?(?=<\/a>))<\/a>$' G '<a href="http:/'
+'^<a\s+href\s*=\s*"http:\/\/([^"]*)"([^>]*)>(.*?(?=<\/a>))<\/a>$' '<a href="myinternalpage.html">my internal link</a>'
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0]\d|[1][0-2])(\:[0-5]\d){1,2})*\s*([aApP][mM]{0,2})?$" G "<0>12/31/2002</0>"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0]\d|[1][0-2])(\:[0-5]\d){1,2})*\s*([aApP][mM]{0,2})?$" G "<0>12/31/2002 08:00</0>"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0]\d|[1][0-2])(\:[0-5]\d){1,2})*\s*([aApP][mM]{0,2})?$" G "<0>12/31/2002 08:00 AM</0>"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0]\d|[1][0-2])(\:[0-5]\d){1,2})*\s*([aApP][mM]{0,2})?$" "12/31/02"
+"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0]\d|[1][0-2])(\:[0-5]\d){1,2})*\s*([aApP][mM]{0,2})?$" "12/31/2002 14:00"
+"<blockquote>(?:\s*([^<]+)<br>\s*)+</blockquote>" G "<0><blockquote>string1<br>string2<br>string3<br></blockquote></0>"
+"<blockquote>(?:\s*([^<]+)<br>\s*)+</blockquote>" ".."
+"^((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1})))$" G "<0>1/2/03</0>"
+"^((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1})))$" G "<0>2/30/1999</0>"
+"^((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1})))$" G "<0>03/04/19</0>"
+"^((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1})))$" "3/4/2020"
+"^((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((19)([2-9])(\d{1})|(20)([01])(\d{1})|([8901])(\d{1})))$" "3/4/1919"
+'</?(\w+)(\s*\w*\s*=\s*("[^"]*"|\u0027[^\u0027]\u0027|[^>]*))*|/?>' G '<0><font color="blue"></0>'
+'</?(\w+)(\s*\w*\s*=\s*("[^"]*"|\u0027[^\u0027]\u0027|[^>]*))*|/?>' G "<0></font></0>"
+'</?(\w+)(\s*\w*\s*=\s*("[^"]*"|\u0027[^\u0027]\u0027|[^>]*))*|/?>' G "<0><br /></0>"
+'</?(\w+)(\s*\w*\s*=\s*("[^"]*"|\u0027[^\u0027]\u0027|[^>]*))*|/?>' "this is a test..."
+"^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$" G "<0>12:00am</0>"
+"^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$" G "<0>1:00 PM</0>"
+"^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$" G "<0> 12:59 pm</0>"
+"^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$" "0:00"
+"^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$" "0:01 am"
+"^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$" "13:00 pm"
+"\({1}[0-9]{3}\){1}\-{1}[0-9]{3}\-{1}[0-9]{4}" G "<0>(111)-111-1111</0>"
+"\({1}[0-9]{3}\){1}\-{1}[0-9]{3}\-{1}[0-9]{4}" "11111111111"
+"[^abc]" G "<0>def</0>"
+"[^abc]" "abc"
+"^(([0]?[1-9]|[1][0-2])[\/|\-|\.]([0-2]\d|[3][0-1]|[1-9])[\/|\-|\.]([2][0])?\d{2}\s+((([0][0-9]|[1][0-2]|[0-9])[\:|\-|\.]([0-5]\d)\s*([aApP][mM])?)|(([0-1][0-9]|[2][0-3]|[0-9])[\:|\-|\.]([0-5]\d))))$" G "<0>01/01/2002 04:42</0>"
+"^(([0]?[1-9]|[1][0-2])[\/|\-|\.]([0-2]\d|[3][0-1]|[1-9])[\/|\-|\.]([2][0])?\d{2}\s+((([0][0-9]|[1][0-2]|[0-9])[\:|\-|\.]([0-5]\d)\s*([aApP][mM])?)|(([0-1][0-9]|[2][0-3]|[0-9])[\:|\-|\.]([0-5]\d))))$" G "<0>5-12-02 04:42 AM</0>"
+"^(([0]?[1-9]|[1][0-2])[\/|\-|\.]([0-2]\d|[3][0-1]|[1-9])[\/|\-|\.]([2][0])?\d{2}\s+((([0][0-9]|[1][0-2]|[0-9])[\:|\-|\.]([0-5]\d)\s*([aApP][mM])?)|(([0-1][0-9]|[2][0-3]|[0-9])[\:|\-|\.]([0-5]\d))))$" G "<0>01.01/02 04-42aM</0>"
+"^(([0]?[1-9]|[1][0-2])[\/|\-|\.]([0-2]\d|[3][0-1]|[1-9])[\/|\-|\.]([2][0])?\d{2}\s+((([0][0-9]|[1][0-2]|[0-9])[\:|\-|\.]([0-5]\d)\s*([aApP][mM])?)|(([0-1][0-9]|[2][0-3]|[0-9])[\:|\-|\.]([0-5]\d))))$" "01-12-1999 4:50PM"
+"^(([0]?[1-9]|[1][0-2])[\/|\-|\.]([0-2]\d|[3][0-1]|[1-9])[\/|\-|\.]([2][0])?\d{2}\s+((([0][0-9]|[1][0-2]|[0-9])[\:|\-|\.]([0-5]\d)\s*([aApP][mM])?)|(([0-1][0-9]|[2][0-3]|[0-9])[\:|\-|\.]([0-5]\d))))$" "01-12-2002 15:10PM"
+"^(([0]?[1-9]|[1][0-2])[\/|\-|\.]([0-2]\d|[3][0-1]|[1-9])[\/|\-|\.]([2][0])?\d{2}\s+((([0][0-9]|[1][0-2]|[0-9])[\:|\-|\.]([0-5]\d)\s*([aApP][mM])?)|(([0-1][0-9]|[2][0-3]|[0-9])[\:|\-|\.]([0-5]\d))))$" "01-12-002 8:20PM"
+"^([1][12]|[0]?[1-9])[\/-]([3][01]|[12]\d|[0]?[1-9])[\/-](\d{4}|\d{2})$" G "<0>11-02-02</0>"
+"^([1][12]|[0]?[1-9])[\/-]([3][01]|[12]\d|[0]?[1-9])[\/-](\d{4}|\d{2})$" G "<0>1-25-2002</0>"
+"^([1][12]|[0]?[1-9])[\/-]([3][01]|[12]\d|[0]?[1-9])[\/-](\d{4}|\d{2})$" G "<0>01/25/2002</0>"
+"^([1][12]|[0]?[1-9])[\/-]([3][01]|[12]\d|[0]?[1-9])[\/-](\d{4}|\d{2})$" "13-02-02"
+"^([1][12]|[0]?[1-9])[\/-]([3][01]|[12]\d|[0]?[1-9])[\/-](\d{4}|\d{2})$" "11.02.02"
+"^([1][12]|[0]?[1-9])[\/-]([3][01]|[12]\d|[0]?[1-9])[\/-](\d{4}|\d{2})$" "11/32/2002"
+"(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])" G "<0>09:30:00</0>"
+"(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])" G "<0>17:45:20</0>"
+"(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])" G "<0>23:59:59</0>"
+"(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])" "24:00:00"
+"(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(\d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(\d{4}))|((29)(\.|-|\/)(02)([-./])([02468][048]00))|((29)([-./])(02)([-./])([13579][26]00))|((29)([-./])(02)([-./])([0-9][0-9][0][48]))|((29)([-./])(02)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02)([-./])([0-9][0-9][13579][26])))" G "<0>29/02/2000</0>"
+"(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(\d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(\d{4}))|((29)(\.|-|\/)(02)([-./])([02468][048]00))|((29)([-./])(02)([-./])([13579][26]00))|((29)([-./])(02)([-./])([0-9][0-9][0][48]))|((29)([-./])(02)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02)([-./])([0-9][0-9][13579][26])))" G "<0>31/01/2000</0>"
+"(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(\d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(\d{4}))|((29)(\.|-|\/)(02)([-./])([02468][048]00))|((29)([-./])(02)([-./])([13579][26]00))|((29)([-./])(02)([-./])([0-9][0-9][0][48]))|((29)([-./])(02)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02)([-./])([0-9][0-9][13579][26])))" G "<0>30-01-2000</0>"
+"(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(\d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(\d{4}))|((29)(\.|-|\/)(02)([-./])([02468][048]00))|((29)([-./])(02)([-./])([13579][26]00))|((29)([-./])(02)([-./])([0-9][0-9][0][48]))|((29)([-./])(02)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02)([-./])([0-9][0-9][13579][26])))" "29/02/2002"
+"(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(\d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(\d{4}))|((29)(\.|-|\/)(02)([-./])([02468][048]00))|((29)([-./])(02)([-./])([13579][26]00))|((29)([-./])(02)([-./])([0-9][0-9][0][48]))|((29)([-./])(02)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02)([-./])([0-9][0-9][13579][26])))" "32/01/2002"
+"(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(\d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(\d{4}))|((29)(\.|-|\/)(02)([-./])([02468][048]00))|((29)([-./])(02)([-./])([13579][26]00))|((29)([-./])(02)([-./])([0-9][0-9][0][48]))|((29)([-./])(02)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02)([-./])([0-9][0-9][13579][26])))" "10/2/2002"
+"^0[1-6]{1}(([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4})$" G "<0>01 46 70 89 12</0>"
+"^0[1-6]{1}(([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4})$" G "<0>01-46-70-89-12</0>"
+"^0[1-6]{1}(([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4})$" G "<0>0146708912</0>"
+"^0[1-6]{1}(([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4})$" "01-46708912"
+"^0[1-6]{1}(([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4})$" "01 46708912"
+"^0[1-6]{1}(([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4})$" "+33235256677"
+"^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$" G "<0>good.gif</0>"
+"^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$" G "<0>go d.GIf</0>"
+"^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$" G "<0>goo_d.jPg</0>"
+"^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$" "junk"
+"^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$" "bad.bad.gif"
+"^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$" "slash\gif."
+"<[^>\s]*\bauthor\b[^>]*>" G '<0><author name="Daniel"></0>'
+#"<[^>\s]*\bauthor\b[^>]*>" G "<0></sch:author></0>"
+#"<[^>\s]*\bauthor\b[^>]*>" G '<0><pp:author name="Daniel"</0>'
+"<[^> ]*\bauthor\b[^>]*>" G "<0></sch:author></0>"
+"<[^> ]*\bauthor\b[^>]*>" G '<0><pp:author name="Daniel"></0>'
+"<[^>\s]*\bauthor\b[^>]*>" "<other>"
+"<[^>\s]*\bauthor\b[^>]*>" "</authors>"
+"<[^>\s]*\bauthor\b[^>]*>" "<work>author</work>"
+"^(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29))$)|(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))$" G "<0>04/2/29</0>"
+"^(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29))$)|(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))$" G "<0>2002-4-30</0>"
+"^(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29))$)|(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))$" G "<0>02.10.31</0>"
+"^(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29))$)|(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))$" "2003/2/29"
+"^(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29))$)|(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))$" "02.4.31"
+"^(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29))$)|(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))$" "00/00/00"
+'(\d*)\u0027*-*(\d*)/*(\d*)"' G '<0>5\u0027-3/16"</0>'
+'(\d*)\u0027*-*(\d*)/*(\d*)"' G '<0>1\u0027-2"</0>'
+'(\d*)\u0027*-*(\d*)/*(\d*)"' G '<0>5/16"</0>'
+'(\d*)\u0027*-*(\d*)/*(\d*)"' '1 3/16'
+"^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$" G "<0>1</0>"
+"^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$" G "<0>23</0>"
+"^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$" G "<0>50</0>"
+"^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$" "0"
+"^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$" "111"
+"^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$" "xyz"
+"^([ \u00c0-\u01ffa-zA-Z'])+$" G "<0>Jon Doe</0>"
+"^([ \u00c0-\u01ffa-zA-Z'])+$" G "<0>J\u00f8rn</0>"
+"^([ \u00c0-\u01ffa-zA-Z'])+$" G "<0>Mc'Neelan</0>"
+"^([ \u00c0-\u01ffa-zA-Z'])+$" "Henry); hacking attempt"
+"^((([0]?[1-9]|1[0-2])(:|\.)(00|15|30|45)?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)(00|15|30|45)?))$" G "<0>1:00 PM</0>"
+"^((([0]?[1-9]|1[0-2])(:|\.)(00|15|30|45)?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)(00|15|30|45)?))$" G "<0>6:45 am</0>"
+"^((([0]?[1-9]|1[0-2])(:|\.)(00|15|30|45)?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)(00|15|30|45)?))$" G "<0>17:30</0>"
+"^((([0]?[1-9]|1[0-2])(:|\.)(00|15|30|45)?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)(00|15|30|45)?))$" "4:32 am"
+"^((([0]?[1-9]|1[0-2])(:|\.)(00|15|30|45)?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)(00|15|30|45)?))$" "5:30:00 am"
+"^((([0]?[1-9]|1[0-2])(:|\.)(00|15|30|45)?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)(00|15|30|45)?))$" "17:01"
+"(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)" G "<0>0.050</0>"
+"(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)" G "<0>5.0000</0>"
+"(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)" G "<0>5000</0>"
+"(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)" "0"
+"(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)" "0.0"
+"(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)" ".0"
+#"^([A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^$" G "<0>Sacramento</0>" #TODO: Octal
+#"^([A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^$" G "<0>San Francisco</0>"
+#"^([A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^$" G "<0>San Luis Obispo</0>"
+#"^([A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^$" "SanFrancisco"
+#"^([A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^$" "SanLuisObispo"
+#"^([A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^$" "San francisco"
+#"^\{?[a-fA-F\d]{8}-([a-fA-F\d]{4}-){3}[a-fA-F\d]{12}\}?$" G "<0>{e02ff0e4-00ad-090A-c030-0d00a0008ba0}</0>"
+#"^\{?[a-fA-F\d]{8}-([a-fA-F\d]{4}-){3}[a-fA-F\d]{12}\}?$" G "<0>e02ff0e4-00ad-090A-c030-0d00a0008ba0</0>"
+#"^\{?[a-fA-F\d]{8}-([a-fA-F\d]{4}-){3}[a-fA-F\d]{12}\}?$" "0xe02ff0e400ad090Ac0300d00a0008ba0"
+"^\{?[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}\}?$" G "<0>{e02ff0e4-00ad-090A-c030-0d00a0008ba0}</0>"
+"^\{?[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}\}?$" G "<0>e02ff0e4-00ad-090A-c030-0d00a0008ba0</0>"
+"^\{?[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}\}?$" "0xe02ff0e400ad090Ac0300d00a0008ba0"
+"^([a-zA-Z0-9@*#]{8,15})$" G "<0>@12X*567</0>"
+"^([a-zA-Z0-9@*#]{8,15})$" G "<0>1#Zv96g@*Yfasd4</0>"
+"^([a-zA-Z0-9@*#]{8,15})$" G "<0>#67jhgt@erd</0>"
+"^([a-zA-Z0-9@*#]{8,15})$" "$12X*567"
+"^([a-zA-Z0-9@*#]{8,15})$" "1#Zv_96"
+"^([a-zA-Z0-9@*#]{8,15})$" "+678jhgt@erd"
+'(("|\u0027)[a-z0-9\/\.\?\=\&]*(\.htm|\.asp|\.php|\.jsp)[a-z0-9\/\.\?\=\&]*("|\u0027))|(href=*?[a-z0-9\/\.\?\=\&"\u0027]*)' G '<0>href="produktsida.asp?kategori2=218"</0>'
+'(("|\u0027)[a-z0-9\/\.\?\=\&]*(\.htm|\.asp|\.php|\.jsp)[a-z0-9\/\.\?\=\&]*("|\u0027))|(href=*?[a-z0-9\/\.\?\=\&"\u0027]*)' G '<0>href="NuclearTesting.htm"</0>'
+'(("|\u0027)[a-z0-9\/\.\?\=\&]*(\.htm|\.asp|\.php|\.jsp)[a-z0-9\/\.\?\=\&]*("|\u0027))|(href=*?[a-z0-9\/\.\?\=\&"\u0027]*)' 'U Suck'
+"^(((((0[1-9])|(1\d)|(2[0-8]))-((0[1-9])|(1[0-2])))|((31-((0[13578])|(1[02])))|((29|30)-((0[1,3-9])|(1[0-2])))))-((20[0-9][0-9]))|(29-02-20(([02468][048])|([13579][26]))))$" G "<0>05-01-2002</0>"
+"^(((((0[1-9])|(1\d)|(2[0-8]))-((0[1-9])|(1[0-2])))|((31-((0[13578])|(1[02])))|((29|30)-((0[1,3-9])|(1[0-2])))))-((20[0-9][0-9]))|(29-02-20(([02468][048])|([13579][26]))))$" G "<0>29-02-2004</0>"
+"^(((((0[1-9])|(1\d)|(2[0-8]))-((0[1-9])|(1[0-2])))|((31-((0[13578])|(1[02])))|((29|30)-((0[1,3-9])|(1[0-2])))))-((20[0-9][0-9]))|(29-02-20(([02468][048])|([13579][26]))))$" G "<0>31-12-2002</0>"
+"^(((((0[1-9])|(1\d)|(2[0-8]))-((0[1-9])|(1[0-2])))|((31-((0[13578])|(1[02])))|((29|30)-((0[1,3-9])|(1[0-2])))))-((20[0-9][0-9]))|(29-02-20(([02468][048])|([13579][26]))))$" "1-1-02"
+"^(((((0[1-9])|(1\d)|(2[0-8]))-((0[1-9])|(1[0-2])))|((31-((0[13578])|(1[02])))|((29|30)-((0[1,3-9])|(1[0-2])))))-((20[0-9][0-9]))|(29-02-20(([02468][048])|([13579][26]))))$" "29-02-2002"
+"^(((((0[1-9])|(1\d)|(2[0-8]))-((0[1-9])|(1[0-2])))|((31-((0[13578])|(1[02])))|((29|30)-((0[1,3-9])|(1[0-2])))))-((20[0-9][0-9]))|(29-02-20(([02468][048])|([13579][26]))))$" "31-11-2002"
+"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$" G "<0>123456.123456</0>"
+"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$" G "<0>123456,123456</0>"
+"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$" G "<0>123456</0>"
+"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$" "123a.123"
+"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$" "123a,123"
+"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$" "a"
+"^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$" G "<0>AC</0>"
+"^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$" G "<0>RJ</0>"
+"^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$" G "<0>SP</0>"
+"^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$" "XX"
+"^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$" "AB"
+"^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$" "HJ"
+"^[+]?\d*$" G "<0>0123456789</0>"
+"^[+]?\d*$" G "<0>1234</0>"
+"^[+]?\d*$" G "<0>1</0>"
+"^[+]?\d*$" "1.0?&"
+"^[+]?\d*$" "a1"
+"^[+]?\d*$" "2a-"
+#/<[aA][ ]{0,}([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,}>((<(([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,})>([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,})|(([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,})){1,}/ G "<0><a href='javascript:functionA();'><i>this text is italicized</i></a></0>" #TODO: Need infinite loop breaking
+#/<[aA][ ]{0,}([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,}>((<(([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,})>([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,})|(([a-zA-Z0-9"'_,.:;!?@$\&()%=\u002f ]|[\-]|[ \f]){0,})){1,}/ "<A href='#'><P</A></P>" #TODO: need infinite loop breaking.
+"^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$" G "<0>0:00</0>"
+"^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$" G "<0>23:00</0>"
+"^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$" G "<0>00:59</0>"
+"^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$" "0:0"
+"^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$" "24:00"
+"^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$" "00:60"
+"^((0[1-9])|(1[0-2]))\/(\d{2})$" G "<0>11/03</0>"
+"^((0[1-9])|(1[0-2]))\/(\d{2})$" G "<0>01/04</0>"
+"^((0[1-9])|(1[0-2]))\/(\d{2})$" "13/03"
+"^((0[1-9])|(1[0-2]))\/(\d{2})$" "10/2003"
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" G "<0><script language=javascript>document.write("one");</script></0>" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" "--" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" "A-Z][a-z]+" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" G "<0>strFirstName</0>" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" G "<0>intAgeInYears</0>" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" G "<0>Where the Wild Things Are</0>" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" "123" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" "abc" # TODO: \w in pattern
+#"<script[^>]*>[\w|\t|\r|\W]*</script>" "this has no caps in it" # TODO: \w in pattern
+"(^-\d*\.?\d*[1-9]+\d*$)|(^-[1-9]+\d*\.\d*$)" G "<0>-0.050</0>"
+"(^-\d*\.?\d*[1-9]+\d*$)|(^-[1-9]+\d*\.\d*$)" G "<0>-5.000</0>"
+"(^-\d*\.?\d*[1-9]+\d*$)|(^-[1-9]+\d*\.\d*$)" G "<0>-5</0>"
+"(^-\d*\.?\d*[1-9]+\d*$)|(^-[1-9]+\d*\.\d*$)" "0"
+"(^-\d*\.?\d*[1-9]+\d*$)|(^-[1-9]+\d*\.\d*$)" "0.0"
+"(^-\d*\.?\d*[1-9]+\d*$)|(^-[1-9]+\d*\.\d*$)" ".0"
+"^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1]))$|^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" G "<0>2002/02/03</0>"
+"^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1]))$|^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" G "<0>2002/02/03 12:12:18</0>"
+"^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1]))$|^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" "2002/02/36"
+"^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1]))$|^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$" "02/03/2002"
+"^(\d|,)*\.?\d*$" G "<0>1,000</0>"
+"^(\d|,)*\.?\d*$" G "<0>3,000.05</0>"
+"^(\d|,)*\.?\d*$" G "<0>5,000,000</0>"
+"^(\d|,)*\.?\d*$" "abc"
+"^(\d|,)*\.?\d*$" "$100,000"
+"^(\d|,)*\.?\d*$" "Forty"
+"^\d$" G "<0>1</0>"
+"^\d$" G "<0>2</0>"
+"^\d$" G "<0>3</0>"
+"^\d$" "a"
+"^\d$" "324"
+"^\d$" "num"
+"^[0-9]+$" G "<0>1234567890</0>"
+"^[0-9]+$" G "<0>1234567890</0>"
+"^[0-9]+$" G "<0>1234567890</0>"
+"^[0-9]+$" "http://none"
+"^[0-9]+$" "http://none"
+"^[0-9]+$" "http://none"
+"^.{4,8}$" G "<0>asdf</0>"
+"^.{4,8}$" G "<0>1234</0>"
+"^.{4,8}$" G "<0>asdf1234</0>"
+"^.{4,8}$" "asd"
+"^.{4,8}$" "123"
+"^.{4,8}$" "asdfe12345"
+#"^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$" G "<0>a@a.com</0>" # TODO: \w in pattern
+#"^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$" G "<0>a@a.com.au</ # TODO: \w in pattern0>"
+#"^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$" G "<0>a@a.au</0>" # TODO: \w in pattern
+#"^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$" "word" # TODO: \w in pattern
+#"^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$" "word@" # TODO: \w in pattern
+#"^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$" "@word" # TODO: \w in pattern
+"^\d{5}-\d{4}$" G "<0>22222-3333</0>"
+"^\d{5}-\d{4}$" G "<0>34545-2367</0>"
+"^\d{5}-\d{4}$" G "<0>56334-2343</0>"
+"^\d{5}-\d{4}$" "123456789"
+"^\d{5}-\d{4}$" "A3B 4C5"
+"^\d{5}-\d{4}$" "55335"
+"(a|b|c).(a.b)*.b+.c" G "<0>autbfc</0>"
+"(a|b|c).(a.b)*.b+.c" "attc"
+'"((\\")|[^"(\\")])+"' G '<0>"test"</0>'
+'"((\\")|[^"(\\")])+"' G '<0>"escape\"quote"</0>'
+'"((\\")|[^"(\\")])+"' G '<0>"\\""</0>'
+'"((\\")|[^"(\\")])+"' "test"
+'"((\\")|[^"(\\")])+"' '"test'
+'"((\\")|[^"(\\")])+"' '""test\\"'
+"((0[1-9])|(1[02]))/\d{2}" G "<0>01/00</0>"
+"((0[1-9])|(1[02]))/\d{2}" G "<0>12/99</0>"
+"((0[1-9])|(1[02]))/\d{2}" "13/00"
+"((0[1-9])|(1[02]))/\d{2}" "12/AS"
+"^[a-zA-Z]$" G "<0>a</0>"
+"^[a-zA-Z]$" G "<0>B</0>"
+"^[a-zA-Z]$" G "<0>c</0>"
+"^[a-zA-Z]$" "0"
+"^[a-zA-Z]$" "&"
+"^[a-zA-Z]$" "AbC"
+"^[a-zA-Z]+$" G "<0>abc</0>"
+"^[a-zA-Z]+$" G "<0>ABC</0>"
+"^[a-zA-Z]+$" G "<0>aBcDeF</0>"
+"^[a-zA-Z]+$" "abc123"
+"^[a-zA-Z]+$" "mr."
+"^[a-zA-Z]+$" "a word"
+"^\s*[a-zA-Z,\p{Zs}]+\s*$" G "<0>Smith, Ed</0>"
+"^\s*[a-zA-Z,\p{Zs}]+\s*$" G "<0>Ed Smith</0>"
+"^\s*[a-zA-Z,\p{Zs}]+\s*$" G "<0>aBcDeFgH</0>"
+"^\s*[a-zA-Z,\p{Zs}]+\s*$" "a123"
+"^\s*[a-zA-Z,\p{Zs}]+\s*$" "AB5"
+"^\s*[a-zA-Z,\p{Zs}]+\s*$" "Mr. Ed"
+"(\w+?@\w+?\u002E.+)" G "<0>bob@vsnl.com</0>"
+"(\w+?@\w+?\u002E.+)" "[AABB]"
+"^\d+$" G "<0>123</0>"
+"^\d+$" G "<0>10</0>"
+"^\d+$" G "<0>54</0>"
+"^\d+$" "-54"
+"^\d+$" "54.234"
+"^\d+$" "abc"
+"^(\+|-)?\d+$" G "<0>-34</0>"
+"^(\+|-)?\d+$" G "<0>34</0>"
+"^(\+|-)?\d+$" G "<0>+5</0>"
+"^(\+|-)?\d+$" "abc"
+"^(\+|-)?\d+$" "3.1415"
+"^(\+|-)?\d+$" "-5.3"
+"foo" G "<0>foo</0>"
+"foo" "bar"
+"^[1-5]$" G "<0>1</0>"
+"^[1-5]$" G "<0>3</0>"
+"^[1-5]$" G "<0>4</0>"
+"^[1-5]$" "6"
+"^[1-5]$" "23"
+"^[1-5]$" "a"
+"^[12345]$" G "<0>1</0>"
+"^[12345]$" G "<0>2</0>"
+"^[12345]$" G "<0>4</0>"
+"^[12345]$" "6"
+"^[12345]$" "-1"
+"^[12345]$" "abc"
+#"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$" G "<0>joe@aol.com</0>" # TODO: \w in pattern
+#"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$" G "<0>joe@wrox.co.uk</0>" # TODO: \w in pattern
+#"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$" G "<0>joe@domain.info</0>" # TODO: \w in pattern
+#"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$" "a@b" # TODO: \w in pattern
+#"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$" "notanemail" # TODO: \w in pattern
+#"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$" "joe@@." # TODO: \w in pattern
+"^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" G "<0>joe@aol.com</0>"
+"^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" G "<0>ssmith@aspalliance.com</0>"
+"^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" G "<0>a@b.cc</0>"
+"^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" "joe@123aspx.com"
+"^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" "joe@web.info"
+"^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" "joe@company.co.uk"
+#"[\w-]+@([\w-]+\.)+[\w-]+" G "<0>joe@aol.com</0>" # TODO: \w in pattern
+#"[\w-]+@([\w-]+\.)+[\w-]+" G "<0>a@b.c</0>" # TODO: \w in pattern
+#"[\w-]+@([\w-]+\.)+[\w-]+" "asdf" # TODO: \w in pattern
+#"[\w-]+@([\w-]+\.)+[\w-]+" "1234" # TODO: \w in pattern
+"\d{4}-?\d{4}-?\d{4}-?\d{4}" G "<0>1234-1234-1234-1234</0>"
+"\d{4}-?\d{4}-?\d{4}-?\d{4}" G "<0>1234123412341234</0>"
+"\d{4}-?\d{4}-?\d{4}-?\d{4}" "1234123412345"
+"^\d{5}$" G "<0>33333</0>"
+"^\d{5}$" G "<0>55555</0>"
+"^\d{5}$" G "<0>23445</0>"
+"^\d{5}$" "abcd"
+"^\d{5}$" "1324"
+"^\d{5}$" "as;lkjdf"
+"(\w+)\s+\1" G "<0>hubba hubba</0>"
+"(\w+)\s+\1" G "<0>mandate dated</0>"
+"(\w+)\s+\1" G "<0>an annual</0>"
+"(\w+)\s+\1" "may day"
+"(\w+)\s+\1" "gogo"
+"(\w+)\s+\1" "1212"
+"^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>3SquareBand.com</0>"
+"^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>asp.net</0>"
+"^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>army.mil</0>"
+"^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "$SquareBand.com"
+"^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "asp/dot.net"
+"^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "army.military"
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/riwords.txt b/Build/source/libs/icu/icu-xetex/test/testdata/riwords.txt
new file mode 100644
index 00000000000..67dab277590
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/riwords.txt
@@ -0,0 +1,32943 @@
+#*******************************************************************************
+#*
+#* Copyright (C) 2003, National Electronics and Computer Technology Center
+#* and others. All Rights Reserved.
+#*
+#*******************************************************************************
+# Sorted Thai word list used for testing the ThaiCollator class.
+# This list was taken from the Web: <http://www.links.nectec.or.th/itech/download.html>
+#
+# Lines starting with '#' are ignored; others are treated as single words
+# in the UTF-8 encoding.
+#
+#
+# License information:
+# RIWord License
+#
+# COPYRIGHT AND PERMISSION NOTICE
+#
+# Copyright (c) 2003 National Electronics and Computer Technology Center and others
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# --------------------------------------------------------------------------------
+# All trademarks and registered trademarks mentioned herein are the property of their respective owners.
+à¸
+à¸à¹‡
+à¸à¸
+à¸à¹Šà¸
+à¸à¸à¸‚นาà¸
+à¸à¸à¸Šà¹‰à¸²à¸‡
+à¸à¸à¸˜à¸¹à¸›
+à¸à¸à¸«à¸¹
+ภà¸à¸²
+à¸à¸à¸¸à¸˜à¸ à¸±à¸“ฑ์
+ภข
+ภข ไม่à¸à¸£à¸°à¸”ิà¸à¸«à¸¹
+à¸à¸‡
+à¸à¹ˆà¸‡
+à¸à¹‰à¸‡
+à¸à¹Šà¸‡
+à¸à¸‡à¸à¸­à¸™
+à¸à¸‡à¸à¸²à¸£
+à¸à¸‡à¹€à¸à¸§à¸µà¸¢à¸™
+à¸à¸‡à¹€à¸à¸§à¸µà¸¢à¸™à¸à¸³à¹€à¸à¸§à¸µà¸¢à¸™
+à¸à¸‡à¹‚à¸à¹‰
+à¸à¸‡à¸„้าง
+à¸à¹‰à¸‡à¹‚ค้ง
+à¸à¹‰à¸‡à¸‡
+à¸à¸‡à¸ˆà¸±à¸à¸£
+à¸à¸‡à¸‰à¸²à¸
+à¸à¸‡à¹„ฉ่
+à¸à¸‡à¹€à¸•à¹Šà¸
+à¸à¸‡à¸žà¸±à¸”
+à¸à¸‡à¸§à¸²à¸™
+à¸à¸‡à¸ªà¸µ
+à¸à¸‡à¸ªà¸¸à¸¥
+à¸à¸Š
+à¸à¸Š-
+à¸à¸Šà¸à¸£
+à¸à¸Ž
+à¸à¸Žà¸à¸£à¸°à¸—รวง
+à¸à¸Žà¹€à¸à¸“ฑ์
+à¸à¸Žà¸‚้อบังคับ
+à¸à¸Žà¸—บวง
+à¸à¸Žà¸˜à¸£à¸£à¸¡à¸Šà¸²à¸•à¸´
+à¸à¸Žà¸˜à¸£à¸£à¸¡à¸”า
+à¸à¸Žà¸šà¸±à¸•à¸£
+à¸à¸Žà¸šà¸±à¸•à¸£à¸à¸Žà¸«à¸¡à¸²à¸¢
+à¸à¸Žà¸šà¸±à¸•à¸£à¸ªà¸«à¸›à¸£à¸°à¸Šà¸²à¸Šà¸²à¸•à¸´
+à¸à¸Žà¸¡à¸™à¹€à¸—ียรบาล
+à¸à¸Žà¸¢à¸¸à¸—ธวินัย
+à¸à¸Žà¸¨à¸µà¸¥à¸˜à¸£à¸£à¸¡
+à¸à¸Žà¹€à¸ªà¸™à¸²à¸šà¸”ี
+à¸à¸Žà¸«à¸¡à¸²à¸¢
+à¸à¸Žà¸«à¸¡à¸²à¸¢à¸™à¸²à¸™à¸²à¸›à¸£à¸°à¹€à¸—ศ
+à¸à¸Žà¸«à¸¡à¸²à¸¢à¸›à¸´à¸”ปาà¸
+à¸à¸Žà¸«à¸¡à¸²à¸¢à¸žà¸²à¸“ิชย์
+à¸à¸Žà¸«à¸¡à¸²à¸¢à¹à¸žà¹ˆà¸‡
+à¸à¸Žà¸«à¸¡à¸²à¸¢à¸£à¸°à¸«à¸§à¹ˆà¸²à¸‡à¸›à¸£à¸°à¹€à¸—ศ
+à¸à¸Žà¸«à¸¡à¸²à¸¢à¹€à¸«à¸•à¸¸
+à¸à¸Žà¸«à¸¡à¸²à¸¢à¸­à¸²à¸à¸²
+à¸à¸Žà¸«à¸¡à¸¹à¹ˆ
+à¸à¸Žà¹à¸«à¹ˆà¸‡à¸à¸£à¸£à¸¡
+à¸à¸Žà¸­à¸±à¸¢à¸à¸²à¸£à¸¨à¸¶à¸
+à¸à¸à¸´
+à¸à¸à¸¸à¸
+à¸à¸à¸¸à¸-
+à¸à¸à¸¸à¸à¸œà¸¥
+à¸à¸à¸´à¸™
+à¸à¸à¸´à¸™-
+à¸à¸à¸´à¸™à¸—าน
+à¸à¸à¸´à¸™à¸±à¸•à¸–ารà¸à¸£à¸£à¸¡
+à¸à¸“ิà¸à¸™à¸±à¸™à¸•à¹Œ
+à¸à¸“ิà¸à¸²à¸£à¹Œ
+à¸à¸”
+à¸à¸”ขี่
+à¸à¸”คอ
+à¸à¸”ชา
+à¸à¸”ดัน
+à¸à¸”น้ำ
+à¸à¸”ราคา
+à¸à¸”หัว
+à¸à¸”เหลือง
+à¸à¹‡à¸”ี
+à¸à¹‡à¹„ด้
+à¸à¸•à¹€à¸§à¸—ิตา
+à¸à¸•à¹€à¸§à¸—ี
+à¸à¸•à¸±à¸à¸Šà¸¥à¸µ
+à¸à¸•à¸±à¸à¸à¸¸à¸•à¸²
+à¸à¸•à¸±à¸à¸à¸¹
+à¸à¸•à¸²à¸˜à¸´à¸à¸²à¸£
+à¸à¸•à¸²à¸ à¸´à¸™à¸´à¸«à¸²à¸£
+à¸à¹‡à¸•à¸²à¸¡
+à¸à¸•à¸´à¸à¸²
+à¸à¸•à¸´à¸à¸²à¸ªà¸±à¸à¸à¸²
+à¸à¸–า
+à¸à¸–ามรรค
+à¸à¸–ามรรคเทศนา
+à¸à¸–ามุข
+à¸à¸–ิà¸à¸²à¸ˆà¸²à¸£à¸¢à¹Œ
+à¸à¸—รรป
+à¸à¸—ลี
+à¸à¸™
+à¸à¹ˆà¸™
+à¸à¹‰à¸™
+à¸à¸™à¸
+à¸à¹‰à¸™à¸à¸š
+à¸à¹‰à¸™à¸à¸£à¸°à¸”à¸
+à¸à¹‰à¸™à¸à¸¸à¸à¸´
+à¸à¹‰à¸™à¸‚บ
+à¸à¹‰à¸™à¸„รัว
+à¸à¹ˆà¸™à¹‚คตร
+à¸à¹‰à¸™à¸•à¸°à¸à¸£à¸™
+à¸à¹ˆà¸™à¹à¸•à¹ˆ
+à¸à¸™à¸™
+à¸à¸™à¸™à¹€à¸Šà¸­
+à¸à¹ˆà¸™à¸™à¹‚ถง
+à¸à¸™à¸™à¹€à¸«à¸´à¸¡
+à¸à¹‰à¸™à¸šà¸¶à¹‰à¸‡
+à¸à¹‰à¸™à¸›à¸¥à¹ˆà¸­à¸‡
+à¸à¹‰à¸™à¸›à¸­à¸”
+à¸à¹‰à¸™à¸›à¸´à¸”
+à¸à¹‰à¸™à¸›à¸¹à¸”
+à¸à¹‰à¸™à¹à¸¡à¸¥à¸‡à¸ªà¸²à¸š
+à¸à¹‰à¸™à¸¢à¹‰à¸­à¸¢
+à¸à¹ˆà¸™à¸ªà¸£à¹‰à¸²à¸‡
+à¸à¹‰à¸™à¸«à¸™à¸±à¸
+à¸à¹‰à¸™à¸«à¸¢à¹ˆà¸­à¸™
+à¸à¹‰à¸™à¸«à¸­à¸¢
+à¸à¹‰à¸™à¸­à¹‰à¸­à¸¢
+à¸à¸™à¸´à¸©à¸-
+à¸à¸™à¸´à¸©à¸à¹Œ
+à¸à¸™à¸´à¸©à¸à¸ à¸„ินี
+à¸à¸™à¸´à¸©à¸à¸ à¸²à¸”า
+à¸à¸™à¸´à¸©à¸à¸²
+à¸à¸š
+à¸à¸šà¸
+à¸à¸šà¸”าน
+à¸à¸šà¹€à¸•à¹‰à¸™
+à¸à¸šà¸—ู
+à¸à¸šà¸—ูด
+à¸à¸šà¸šà¸±à¸§
+à¸à¸šà¹€à¸¥à¸·à¸­à¸à¸™à¸²à¸¢
+à¸à¸šà¸²à¸¥
+à¸à¸šà¸´à¸™à¸—ร์
+à¸à¸šà¸´à¸¥
+à¸à¸šà¸µà¹ˆ
+à¸à¸šà¸µà¹ˆà¸˜à¸¸à¸Š
+à¸à¸šà¸¹à¸£
+à¸à¹€à¸šà¸™à¸—ร์
+à¸à¹‚บร
+à¸à¹‚บล
+à¸à¸›à¸“
+à¸à¸›à¸“à¸
+à¸à¸›à¸“า
+à¸à¸›à¸´
+à¸à¸›à¸´à¸•à¸±à¸™
+à¸à¸¡
+à¸à¹‰à¸¡
+à¸à¸¡à¸“ฑลาภิเษà¸
+à¸à¸¡à¸“ฑโลทà¸
+à¸à¸¡à¸¥
+à¸à¸¡à¸¥à¸²
+à¸à¸¡à¸¥à¸²à¸¨
+à¸à¸¡à¸¥à¸²à¸ªà¸™à¹Œ
+à¸à¸¡à¹€à¸¥à¸¨
+à¸à¹‰à¸¡à¸«à¸™à¹‰à¸²
+à¸à¹‰à¸¡à¸«à¸™à¹‰à¸²à¸à¹‰à¸¡à¸•à¸²
+à¸à¹‰à¸¡à¸«à¸¥à¸±à¸‡
+à¸à¹‰à¸¡à¸«à¸±à¸§
+à¸à¸¡à¸±à¸“ฑลุ
+à¸à¸¡à¸¸à¸—
+à¸à¸£
+à¸à¸£à¸
+à¸à¸£à¸à¸Š
+à¸à¸£à¸à¸Ž
+à¸à¸£à¸à¸Žà¸²à¸„ม
+à¸à¸£à¸à¸
+à¸à¸£à¸‡
+à¸à¸£à¸‡à¸—อง
+à¸à¸£à¸‡à¹€à¸¥à¹‡à¸š
+à¸à¸£à¸Šà¸à¸²à¸¢
+à¸à¸£à¸“ฑ์
+à¸à¸£à¸“ิà¸à¸²à¸£à¹Œ
+à¸à¸£à¸“ี
+à¸à¸£à¸“ีย-
+à¸à¸£à¸“ีย์
+à¸à¸£à¸“ียะ
+à¸à¸£à¸”
+à¸à¸£à¸™
+à¸à¸£à¸™à¸—า
+à¸à¸£à¸™à¸™à¹€à¸Šà¹‰à¸²
+à¸à¸£à¸š
+à¸à¸£à¸šà¸¹à¸£
+à¸à¸£à¸žà¸´à¸™à¸˜à¸¸à¹Œ
+à¸à¸£à¸ à¸¸à¸¡
+à¸à¸£à¸¡
+à¸à¸£à¸¡à¸à¸£à¸­à¸¡
+à¸à¸£à¸¡à¸à¸²à¸£
+à¸à¸£à¸¡à¸à¸²à¸£à¸žà¸´à¹€à¸¨à¸©
+à¸à¸£à¸¡à¹€à¸à¸£à¸µà¸¢à¸¡
+à¸à¸£à¸¡à¸—่า
+à¸à¸£à¸¡à¸—่าขวา
+à¸à¸£à¸¡à¸—่าซ้าย
+à¸à¸£à¸¡à¸˜à¸£à¸£à¸¡à¹Œ
+à¸à¸£à¸¡à¸˜à¸£à¸£à¸¡à¹Œà¸›à¸£à¸°à¸à¸±à¸™à¸ à¸±à¸¢
+à¸à¸£à¸¡à¸™à¸²
+à¸à¸£à¸¡à¸§à¸±à¸‡
+à¸à¸£à¸¡à¸¨à¸±à¸à¸”ิ์
+à¸à¸£à¸£
+à¸à¸£à¸£à¸à¸‡
+à¸à¸£à¸£à¸à¸Ž
+à¸à¸£à¸£à¸à¸¨
+à¸à¸£à¸£à¹€à¸à¸”
+à¸à¸£à¸£à¹„à¸à¸£
+à¸à¸£à¸£à¹€à¸ˆà¸µà¸¢à¸
+à¸à¸£à¸£à¸Šà¸´à¸‡
+à¸à¸£à¸£à¸Šà¸´à¸”
+à¸à¸£à¸£à¹€à¸Šà¸­
+à¸à¸£à¸£à¹€à¸Šà¹‰à¸²
+à¸à¸£à¸£à¹€à¸Šà¸µà¸¢à¸‡
+à¸à¸£à¸£à¹‚ชà¸
+à¸à¸£à¸£à¸‹à¹‰à¸™à¸™
+à¸à¸£à¸£à¹à¸‹à¸‡
+à¸à¸£à¸£à¸à¹Œ
+à¸à¸£à¸£à¸à¸²
+à¸à¸£à¸£à¸“
+à¸à¸£à¸£à¸“ยุคล
+à¸à¸£à¸£à¸“า
+à¸à¸£à¸£à¸“ิà¸à¸²
+à¸à¸£à¸£à¸“ิà¸à¸²à¸£à¹Œ
+à¸à¸£à¸£à¸”ิ
+à¸à¸£à¸£à¸”ิà¸
+à¸à¸£à¸£à¸”ึà¸
+à¸à¸£à¸£à¸•à¸¸
+à¸à¸£à¸£à¸•à¸¸-
+à¸à¸£à¸£à¸•à¸¸à¸à¸²à¸£à¸
+à¸à¸£à¸£à¸•à¸¸à¸§à¸²à¸ˆà¸
+à¸à¸£à¸£à¸•à¸¸à¸ªà¸±à¸à¸à¸²
+à¸à¸£à¸£à¹„ตร
+à¸à¸£à¸£à¸—บ
+à¸à¸£à¸£à¹à¸—à¸
+à¸à¸£à¸£à¹à¸—รà¸
+à¸à¸£à¸£à¸šà¸²à¸ªà¸´à¸
+à¸à¸£à¸£à¸šà¸²à¸ªà¸´à¸à¸žà¸±à¸ªà¸•à¸£à¹Œ
+à¸à¸£à¸£à¸šà¸´à¸”
+à¸à¸£à¸£à¸šà¸¹à¸£
+à¸à¸£à¸£à¸›à¸²à¸ªà¸´à¸
+à¸à¸£à¸£à¸›à¸¸à¸£
+à¸à¸£à¸£à¸žà¸¸à¸¡
+à¸à¸£à¸£à¸žà¸¸à¹ˆà¸¡
+à¸à¸£à¸£à¸ à¸´à¸£à¸¡à¸¢à¹Œ
+à¸à¸£à¸£à¸¡
+à¸à¸£à¸£à¸¡-
+à¸à¸£à¸£à¸¡à¹Œ
+à¸à¸£à¸£à¸¡à¸à¸£
+à¸à¸£à¸£à¸¡à¸à¸£à¸“์
+à¸à¸£à¸£à¸¡à¸à¸²à¸£
+à¸à¸£à¸£à¸¡à¸à¸²à¸£à¸
+à¸à¸£à¸£à¸¡à¸à¸²à¸£à¸´à¸“ี
+à¸à¸£à¸£à¸¡à¸‚ัย
+à¸à¸£à¸£à¸¡à¸„ติ
+à¸à¸£à¸£à¸¡à¸Šà¸£à¸¹à¸›
+à¸à¸£à¸£à¸¡à¸Šà¸§à¸²à¸•
+à¸à¸£à¸£à¸¡à¸à¸²à¸™
+à¸à¸£à¸£à¸¡à¸šà¸–
+à¸à¸£à¸£à¸¡à¸žà¸±à¸™à¸˜à¸¸à¹Œ
+à¸à¸£à¸£à¸¡à¹Œà¸ à¸´à¸£à¸¡à¸¢à¹Œ
+à¸à¸£à¸£à¸¡à¸§à¸²à¸ˆà¸
+à¸à¸£à¸£à¸¡à¸§à¸²à¸ˆà¸²
+à¸à¸£à¸£à¸¡à¸§à¸²à¸ˆà¸²à¸ˆà¸²à¸£à¸¢à¹Œ
+à¸à¸£à¸£à¸¡à¸§à¸´à¸˜à¸µ
+à¸à¸£à¸£à¸¡à¸§à¸´à¸šà¸²à¸
+à¸à¸£à¸£à¸¡à¹€à¸§à¸£
+à¸à¸£à¸£à¸¡à¸¨à¸²à¸¥à¸²
+à¸à¸£à¸£à¸¡à¸ªà¸±à¸¡à¸›à¸²à¸—ิà¸
+à¸à¸£à¸£à¸¡à¸ªà¸´à¸—ธิ์
+à¸à¸£à¸£à¸¡à¸ªà¸´à¸—ธิ์เครื่องหมายà¹à¸¥à¸°à¸¢à¸µà¹ˆà¸«à¹‰à¸­à¸à¸²à¸£à¸„้าขาย
+à¸à¸£à¸£à¸¡à¸ªà¸´à¸—ธิ์ผู้à¹à¸•à¹ˆà¸‡à¸«à¸™à¸±à¸‡à¸ªà¸·à¸­
+à¸à¸£à¸£à¸¡à¸ªà¸´à¸—ธิ์รวม
+à¸à¸£à¸£à¸¡à¸±à¸Šà¸§à¸²à¸•
+à¸à¸£à¸£à¸¡à¸²à¸Šà¸µà¸ž
+à¸à¸£à¸£à¸¡à¸²à¸˜à¸´à¸à¸²à¸£
+à¸à¸£à¸£à¸¡à¸²à¸£
+à¸à¸£à¸£à¸¥à¸µ
+à¸à¸£à¸£à¸¥à¸¶à¸‡
+à¸à¸£à¸£à¸©à¸
+à¸à¸£à¸£à¸ªà¸°
+à¸à¸£à¸£à¹à¸ªà¸‡
+à¸à¸£à¸£à¸«à¸²à¸¢
+à¸à¸£à¸£à¹€à¸«à¸´à¸¡
+à¸à¸£à¸£à¹‚หย
+à¸à¸£à¸£à¹€à¸­à¸²
+à¸à¸£à¸£à¸¸à¸“า
+à¸à¸£à¸§à¸”
+à¸à¸£à¸§à¸”น้ำ
+à¸à¸£à¸§à¸™
+à¸à¸£à¸§à¸š
+à¸à¸£à¸§à¸¡
+à¸à¸£à¹‰à¸§à¸¡
+à¸à¸£à¸§à¸¢
+à¸à¸£à¸§à¸¢à¹€à¸Šà¸´à¸‡
+à¸à¸£à¸§à¸¢à¸šà¹‰à¸²à¸™
+à¸à¸£à¸§à¸¢à¸›à¹ˆà¸²
+à¸à¸£à¸§à¸´à¸
+à¸à¸£à¸ªà¸²à¸›à¸™à¹Œ
+à¸à¸£à¸ªà¸¸à¸—ธิ์
+à¸à¸£à¸­
+à¸à¸£à¹‰à¸­
+à¸à¸£à¸­à¸
+à¸à¸£à¹‡à¸­à¸à¸à¸£à¹‹à¸­à¸¢
+à¸à¸£à¸­à¸à¹à¸à¸£à¸
+à¸à¸£à¸­à¸à¸£à¸¸à¸¢
+à¸à¸£à¸­à¸‡
+à¸à¸£à¸­à¸‡à¸à¸£à¸­à¸¢
+à¸à¸£à¸­à¸‡à¸—อง
+à¸à¸£à¸­à¸”
+à¸à¸£à¹ˆà¸­à¸™
+à¸à¸£à¸­à¸š
+à¸à¸£à¸­à¸šà¹€à¸à¸£à¸µà¸¢à¸š
+à¸à¸£à¸­à¸šà¹à¸à¸£à¸š
+à¸à¸£à¸­à¸šà¹€à¸Šà¹‡à¸”หน้า
+à¸à¸£à¸­à¸šà¸«à¸™à¹‰à¸²
+à¸à¸£à¸­à¸¡
+à¸à¸£à¹ˆà¸­à¸¡
+à¸à¸£à¹ˆà¸­à¸¡à¹†
+à¸à¸£à¹ˆà¸­à¸¢
+à¸à¸£à¸°
+à¸à¸£à¸°à¸à¸£
+à¸à¸£à¸°à¸à¸£à¸±à¸šà¸à¸£à¸°à¹€à¸à¸£à¸µà¸¢à¸š
+à¸à¸£à¸°à¸à¸£à¸µà¹Šà¸”
+à¸à¸£à¸°à¸à¸£à¸¸à¹ˆà¸™
+à¸à¸£à¸°à¸à¸¥à¸±à¸šà¸à¸¥à¸­à¸
+à¸à¸£à¸°à¸à¸§à¸”
+à¸à¸£à¸°à¸à¸­à¸‡
+à¸à¸£à¸°à¸à¸±à¸”
+à¸à¸£à¸°à¸à¸µà¹‰
+à¸à¸£à¸°à¸à¸¹à¸¥
+à¸à¸£à¸°à¹€à¸à¸£à¸­à¸
+à¸à¸£à¸°à¹€à¸à¸£à¸´à¸
+à¸à¸£à¸°à¹€à¸à¸£à¸´à¹ˆà¸™
+-à¸à¸£à¸°à¹€à¸à¸£à¸µà¸¢à¸š
+à¸à¸£à¸°à¹€à¸à¸£à¸µà¸¢à¸¡
+à¸à¸£à¸°à¹€à¸à¸£à¸µà¸¢à¸§
+à¸à¸£à¸°à¹€à¸à¸£à¸µà¹‰à¸¢à¸§
+à¸à¸£à¸°à¹€à¸à¸¥à¸·à¸­à¸
+à¸à¸£à¸°à¸„น
+à¸à¸£à¸°à¸„าย
+à¸à¸£à¸°à¸„ุà¸
+à¸à¸£à¸°à¸‡à¸à¸à¸£à¸°à¸‡à¸±à¸™
+à¸à¸£à¸°à¸‡à¸à¸à¸£à¸°à¹€à¸‡à¸´à¹ˆà¸™
+à¸à¸£à¸°à¸‡à¹ˆà¸­à¸‡à¸à¸£à¸°à¹à¸‡à¹ˆà¸‡
+-à¸à¸£à¸°à¸‡à¸­à¸”
+à¸à¸£à¸°à¸‡à¹ˆà¸­à¸™à¸à¸£à¸°à¹à¸‡à¹ˆà¸™
+à¸à¸£à¸°à¹€à¸‡à¹‰à¸²à¸à¸£à¸°à¸‡à¸­à¸”
+à¸à¸£à¸°à¹‚งà¸
+à¸à¸£à¸°à¸ˆà¸
+à¸à¸£à¸°à¸ˆà¸à¹€à¸‡à¸²
+à¸à¸£à¸°à¸ˆà¸à¸•à¸²
+à¸à¸£à¸°à¸ˆà¸à¸™à¸¹à¸™
+à¸à¸£à¸°à¸ˆà¸à¸à¹‰à¸²
+à¸à¸£à¸°à¸ˆà¸à¹€à¸§à¹‰à¸²
+à¸à¸£à¸°à¸ˆà¸à¸«à¸¸à¸‡
+à¸à¸£à¸°à¸ˆà¸‡
+à¸à¸£à¸°à¸ˆà¸£
+à¸à¸£à¸°à¸ˆà¸­à¸
+à¸à¸£à¸°à¸ˆà¸­à¸à¸‡à¸­à¸à¸‡à¹ˆà¸­à¸¢
+à¸à¸£à¸°à¸ˆà¸­à¸à¸Šà¸§à¸²
+à¸à¸£à¸°à¸ˆà¸­à¸à¹€à¸—ศ
+à¸à¸£à¸°à¸ˆà¸­à¸‡à¸«à¸‡à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸ˆà¹‹à¸­à¸‡à¸«à¸‡à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸ˆà¸­à¸‡à¸­à¹à¸‡
+à¸à¸£à¸°à¸ˆà¹‰à¸­à¸™
+à¸à¸£à¸°à¸ˆà¸­à¸™à¸«à¸¹
+à¸à¸£à¸°à¸ˆà¹‰à¸­à¸¢
+à¸à¸£à¸°à¸ˆà¹‰à¸­à¸¢à¸£à¹ˆà¸­à¸¢
+à¸à¸£à¸°à¸ˆà¹‹à¸­à¸«à¸§à¸­
+à¸à¸£à¸°à¸ˆà¸°
+à¸à¸£à¸°à¸ˆà¸±à¸
+à¸à¸£à¸°à¸ˆà¸±à¸‡
+à¸à¸£à¸°à¸ˆà¸±à¸‡à¸«à¸¥à¸±à¸‡à¹€à¸šà¸µà¹‰à¸¢
+à¸à¸£à¸°à¸ˆà¸±à¸”
+à¸à¸£à¸°à¸ˆà¸±à¸”à¸à¸£à¸°à¸ˆà¸²à¸¢
+à¸à¸£à¸°à¸ˆà¸±à¸”พลัดพราย
+à¸à¸£à¸°à¸ˆà¸±à¸š
+à¸à¸£à¸°à¸ˆà¸±à¸šà¸šà¸
+à¸à¸£à¸°à¸ˆà¸±à¸šà¸›à¸´à¹‰à¸‡
+à¸à¸£à¸°à¸ˆà¸±à¸šà¸›à¸µà¹ˆ
+à¸à¸£à¸°à¸ˆà¹ˆà¸²
+à¸à¸£à¸°à¸ˆà¹ˆà¸²à¸‡
+à¸à¸£à¸°à¸ˆà¸²à¸”
+à¸à¸£à¸°à¸ˆà¸²à¸™
+à¸à¸£à¸°à¸ˆà¸²à¸š
+-à¸à¸£à¸°à¸ˆà¸²à¸¡
+à¸à¸£à¸°à¸ˆà¸²à¸¢
+à¸à¸£à¸°à¸ˆà¸²à¸¢à¸™à¸°à¸¡à¸“ฑล
+à¸à¸£à¸°à¸ˆà¸²à¸¢à¹€à¸ªà¸µà¸¢à¸‡
+à¸à¸£à¸°à¸ˆà¸²à¸¢à¸«à¸²à¸‡à¸”อà¸
+à¸à¸£à¸°à¸ˆà¸²à¸§
+-à¸à¸£à¸°à¸ˆà¸´à¸
+-à¸à¸£à¸°à¸ˆà¸´à¹‹à¸‡
+à¸à¸£à¸°à¸ˆà¸´à¸”
+à¸à¸£à¸°à¸ˆà¸´à¸š
+-à¸à¸£à¸°à¸ˆà¸´à¸š
+-à¸à¸£à¸°à¸ˆà¸´à¹‹à¸¡
+à¸à¸£à¸°à¸ˆà¸´à¸£à¸´à¸”
+à¸à¸£à¸°à¸ˆà¸´à¹‹à¸§
+à¸à¸£à¸°à¸ˆà¸´à¹‹à¸§à¸«à¸¥à¸´à¸§
+à¸à¸£à¸°à¸ˆà¸µà¹‰
+-à¸à¸£à¸°à¸ˆà¸µà¹‹
+à¸à¸£à¸°à¸ˆà¸¸à¸
+à¸à¸£à¸°à¸ˆà¸¸à¸à¸à¸£à¸°à¸ˆà¸´à¸
+à¸à¸£à¸°à¸ˆà¸¸à¸à¸à¸£à¸°à¸ˆà¸¸à¸¢
+à¸à¸£à¸°à¸ˆà¸¸à¹‹à¸‡à¸à¸£à¸°à¸ˆà¸´à¹‹à¸‡
+à¸à¸£à¸°à¸ˆà¸¸à¸š
+à¸à¸£à¸°à¸ˆà¸¸à¹Šà¸š
+à¸à¸£à¸°à¸ˆà¸¸à¸šà¸à¸£à¸°à¸ˆà¸´à¸š
+à¸à¸£à¸°à¸ˆà¸¸à¹‹à¸¡à¸à¸£à¸°à¸ˆà¸´à¹‹à¸¡
+à¸à¸£à¸°à¸ˆà¸¸à¸¢
+à¸à¸£à¸°à¸ˆà¸¸à¸¢à¸à¸£à¸°à¸ˆà¸²à¸¢
+à¸à¸£à¸°à¸ˆà¸¹à¹‰
+à¸à¸£à¸°à¸ˆà¸¹à¹‹à¸à¸£à¸°à¸ˆà¸µà¹‹
+à¸à¸£à¸°à¸ˆà¸¹à¸”
+à¸à¸£à¸°à¹€à¸ˆà¸­à¸°à¸à¸£à¸°à¹€à¸ˆà¸´à¸‡
+à¸à¸£à¸°à¹€à¸ˆà¸²
+à¸à¸£à¸°à¹€à¸ˆà¹ˆà¸²
+à¸à¸£à¸°à¹€à¸ˆà¹‰à¸²
+à¸à¸£à¸°à¹€à¸ˆà¸²à¸°
+à¸à¸£à¸°à¹€à¸ˆà¸´à¸‡
+à¸à¸£à¸°à¹€à¸ˆà¸´à¸”à¸à¸£à¸°à¹€à¸ˆà¸´à¸‡
+à¸à¸£à¸°à¹€à¸ˆà¸µà¹‰à¸¢à¸‡
+à¸à¸£à¸°à¹€à¸ˆà¸µà¹Šà¸¢à¸š
+à¸à¸£à¸°à¹€à¸ˆà¸µà¹Šà¸¢à¸šà¹€à¸›à¸£à¸µà¹‰à¸¢à¸§
+à¸à¸£à¸°à¹€à¸ˆà¸µà¸¢à¸§
+à¸à¸£à¸°à¹€à¸ˆà¸µà¹Šà¸¢à¸§
+à¸à¸£à¸°à¹à¸ˆà¸°
+à¸à¸£à¸°à¹‚จน
+à¸à¸£à¸°à¹‚จม
+à¸à¸£à¸°à¹‚จมà¸à¸£à¸°à¸ˆà¸²à¸¡
+à¸à¸£à¸°à¹‚จมทอง
+à¸à¸£à¸°à¹‚จมไฟ
+à¸à¸£à¸°à¹‚จมอà¸
+à¸à¸£à¸°à¸‰à¸‡
+à¸à¸£à¸°à¸‰à¸­à¸
+à¸à¸£à¸°à¸‰à¸­à¸à¸à¸£à¸°à¹à¸‰à¸
+à¸à¸£à¸°à¸‰à¹ˆà¸­à¸™
+à¸à¸£à¸°à¸‰à¸±à¸šà¸à¸£à¸°à¹€à¸‰à¸‡
+à¸à¸£à¸°à¸‰à¸´à¹ˆà¸‡
+à¸à¸£à¸°à¸‰à¸µà¸
+à¸à¸£à¸°à¸‰à¸¹à¸”
+à¸à¸£à¸°à¹€à¸‰à¸
+-à¸à¸£à¸°à¹€à¸‰à¸‡
+à¸à¸£à¸°à¹€à¸‰à¸”
+-à¸à¸£à¸°à¹à¸‰à¸
+à¸à¸£à¸°à¹à¸‰à¹ˆà¸™
+à¸à¸£à¸°à¹‚ฉà¸à¸à¸£à¸°à¹€à¸‰à¸
+à¸à¸£à¸°à¹‚ฉม
+à¸à¸£à¸°à¸Šà¸‡
+à¸à¸£à¸°à¸Šà¸”à¸à¸£à¸°à¸Šà¹‰à¸­à¸¢
+-à¸à¸£à¸°à¸Šà¸§à¸¢
+à¸à¸£à¸°à¸Šà¸­à¸
+à¸à¸£à¸°à¸Šà¸­à¸™
+à¸à¸£à¸°à¸Šà¸­à¸¡
+à¸à¸£à¸°à¸Šà¸­à¸¡à¸”อà¸
+à¸à¸£à¸°à¸Šà¹‰à¸­à¸¢
+à¸à¸£à¸°à¸Šà¹‰à¸­à¸¢à¸™à¸²à¸‡à¸£à¸³
+à¸à¸£à¸°à¸Šà¸±à¸‡
+à¸à¸£à¸°à¸Šà¸±à¸‡à¸«à¸™à¹‰à¸²à¹ƒà¸«à¸à¹ˆ
+à¸à¸£à¸°à¸Šà¸±à¹‰à¸™
+à¸à¸£à¸°à¸Šà¸±à¸š
+à¸à¸£à¸°à¸Šà¸²à¸
+à¸à¸£à¸°à¸Šà¹ˆà¸²à¸‡
+à¸à¸£à¸°à¸Šà¸²à¹€à¸”ิม
+à¸à¸£à¸°à¸Šà¸²à¸¢
+à¸à¸£à¸°à¸Šà¸´à¸‡
+à¸à¸£à¸°à¸Šà¸´à¸”
+à¸à¸£à¸°à¸Šà¸¸
+à¸à¸£à¸°à¸Šà¸¸à¸
+à¸à¸£à¸°à¸Šà¸¸à¹ˆà¸¡à¸à¸£à¸°à¸Šà¸§à¸¢
+à¸à¸£à¸°à¹€à¸Šà¸­
+à¸à¸£à¸°à¹€à¸Šà¸­à¸à¹‰à¸™à¸£à¸±à¹ˆà¸§
+à¸à¸£à¸°à¹€à¸Šà¸²
+à¸à¸£à¸°à¹€à¸Šà¹‰à¸²
+à¸à¸£à¸°à¹€à¸Šà¹‰à¸²à¸œà¸µà¸¡à¸”
+à¸à¸£à¸°à¹€à¸Šà¹‰à¸²à¸ªà¸§à¸£à¸£à¸„์
+à¸à¸£à¸°à¹€à¸Šà¹‰à¸²à¸ªà¸µà¸”า
+à¸à¸£à¸°à¹€à¸Šà¸µà¸¢à¸‡
+à¸à¸£à¸°à¹à¸Šà¸‡
+à¸à¸£à¸°à¹à¸Šà¸°
+à¸à¸£à¸°à¹‚ชà¸
+à¸à¸£à¸°à¹‚ชà¸à¸à¸£à¸°à¸Šà¸±à¹‰à¸™
+à¸à¸£à¸°à¹‚ชà¸à¸à¸£à¸°à¸Šà¸²à¸
+à¸à¸£à¸°à¹‚ชà¸à¹‚ฮà¸à¸®à¸²à¸
+à¸à¸£à¸°à¸‹à¸§à¸¢
+-à¸à¸£à¸°à¸‹à¸§à¸¢
+-à¸à¸£à¸°à¸‹à¹‰à¸­
+à¸à¸£à¸°à¸‹à¹ˆà¸­à¸‡à¸à¸£à¸°à¹à¸‹à¹ˆà¸‡
+à¸à¸£à¸°à¸‹à¸±à¸š
+à¸à¸£à¸°à¸‹à¹ˆà¸²à¸‡
+à¸à¸£à¸°à¸‹à¸²à¸š
+à¸à¸£à¸°à¸‹à¸´à¸
+à¸à¸£à¸°à¸‹à¸´à¸à¹†
+à¸à¸£à¸°à¸‹à¸´à¸à¸à¸£à¸°à¸‹à¸§à¸¢
+à¸à¸£à¸°à¸‹à¸´à¸à¸à¸£à¸°à¸‹à¸µà¹‰
+à¸à¸£à¸°à¸‹à¸´à¸š
+à¸à¸£à¸°à¸‹à¸´à¸šà¸à¸£à¸°à¸‹à¸²à¸š
+-à¸à¸£à¸°à¸‹à¸µà¹‰
+à¸à¸£à¸°à¸‹à¸µà¹‰à¸à¸£à¸°à¸‹à¹‰à¸­
+à¸à¸£à¸°à¸‹à¸¸à¸‡
+à¸à¸£à¸°à¸‹à¸¸à¸šà¸à¸£à¸°à¸‹à¸´à¸š
+à¸à¸£à¸°à¸‹à¸¸à¹‰à¸¡
+à¸à¸£à¸°à¸‹à¸¹à¹ˆ
+-à¸à¸£à¸°à¹€à¸‹
+à¸à¸£à¸°à¹€à¸‹à¹‡à¸™
+à¸à¸£à¸°à¹€à¸‹à¸­
+à¸à¸£à¸°à¹€à¸‹à¸­à¸°à¸à¸£à¸°à¹€à¸‹à¸­
+à¸à¸£à¸°à¹€à¸‹à¸­à¸°à¸à¸£à¸°à¹€à¸‹à¸´à¸‡
+à¸à¸£à¸°à¹€à¸‹à¹‰à¸²
+à¸à¸£à¸°à¹€à¸‹à¹‰à¸²à¸à¸£à¸°à¸‹à¸µà¹‰
+à¸à¸£à¸°à¹€à¸‹à¸´à¸‡
+-à¸à¸£à¸°à¹€à¸‹à¸´à¸‡
+à¸à¸£à¸°à¹à¸‹
+à¸à¸£à¸°à¹à¸‹à¸°
+à¸à¸£à¸°à¹‚ซà¸à¸£à¸°à¹€à¸‹
+à¸à¸£à¸°à¸Žà¸µ
+à¸à¸£à¸°à¸Žà¸¸à¸¡à¸žà¸µ
+à¸à¸£à¸°à¸”à¸
+à¸à¸£à¸°à¸”à¸à¸à¸£à¸°à¸”นโด่
+à¸à¸£à¸°à¸”้ง
+-à¸à¸£à¸°à¸”นโด่
+à¸à¸£à¸°à¸”วง
+à¸à¸£à¸°à¸”วน
+à¸à¸£à¸°à¸”้วมà¸à¸£à¸°à¹€à¸”ี้ยม
+à¸à¸£à¸°à¸”อ
+à¸à¸£à¸°à¸”อง
+à¸à¸£à¸°à¸”องหาย
+à¸à¸£à¸°à¸”อน
+à¸à¸£à¸°à¸”อม
+à¸à¸£à¸°à¸”ัà¸à¸à¸£à¸°à¹€à¸”ี้ย
+à¸à¸£à¸°à¸”ังงัว
+à¸à¸£à¸°à¸”ังงา
+à¸à¸£à¸°à¸”ังงาจีน
+à¸à¸£à¸°à¸”ังงาเถา
+à¸à¸£à¸°à¸”ังงาลนไฟ
+à¸à¸£à¸°à¸”าà¸
+à¸à¸£à¸°à¸”าà¸à¸à¸£à¸°à¹€à¸”ื่อง
+à¸à¸£à¸°à¸”้าง
+à¸à¸£à¸°à¸”้างà¸à¸£à¸°à¹€à¸”ื่อง
+à¸à¸£à¸°à¸”างลาง
+à¸à¸£à¸°à¸”าด
+à¸à¸£à¸°à¸”าดขาว
+à¸à¸£à¸°à¸”าดดำ
+à¸à¸£à¸°à¸”าดà¹à¸”ง
+à¸à¸£à¸°à¸”าน
+à¸à¸£à¸°à¸”านชนวน
+à¸à¸£à¸°à¸”านชัย
+à¸à¸£à¸°à¸”านดำ
+à¸à¸£à¸°à¸”านโต้คลื่น
+à¸à¸£à¸°à¸”านถีบ
+à¸à¸£à¸°à¸”านพน
+à¸à¸£à¸°à¸”านพิง
+à¸à¸£à¸°à¸”านไฟ
+à¸à¸£à¸°à¸”านลื่น
+à¸à¸£à¸°à¸”านเลียบ
+à¸à¸£à¸°à¸”านหà¸
+à¸à¸£à¸°à¸”าษ
+à¸à¸£à¸°à¸”าษà¹à¸à¹‰à¸§
+à¸à¸£à¸°à¸”าษข่อย
+à¸à¸£à¸°à¸”าษไข
+à¸à¸£à¸°à¸”าษเงินà¸à¸£à¸°à¸”าษทอง
+à¸à¸£à¸°à¸”าษซับ
+à¸à¸£à¸°à¸”าษทราย
+à¸à¸£à¸°à¸”าษเทศ
+à¸à¸£à¸°à¸”าษฟาง
+à¸à¸£à¸°à¸”าษว่าว
+à¸à¸£à¸°à¸”าษสา
+à¸à¸£à¸°à¸”ำà¸à¸£à¸°à¸”่าง
+à¸à¸£à¸°à¸”ิà¸
+à¸à¸£à¸°à¸”ิà¸à¸à¸£à¸°à¹€à¸”ี้ย
+à¸à¸£à¸°à¸”ิ่ง
+-à¸à¸£à¸°à¸”ิ้ง
+à¸à¸£à¸°à¸”ิ่งทอง
+à¸à¸£à¸°à¸”ิบ
+à¸à¸£à¸°à¸”ิบๆ
+à¸à¸£à¸°à¸”ี่
+à¸à¸£à¸°à¸”ี้à¸à¸£à¸°à¹€à¸”ียม
+à¸à¸£à¸°à¸”ี่ได้น้ำ
+à¸à¸£à¸°à¸”ึง
+à¸à¸£à¸°à¸”ึงช้างเผือà¸
+à¸à¸£à¸°à¸”ึงพระราม
+à¸à¸£à¸°à¸”ืบ
+à¸à¸£à¸°à¸”ุ
+à¸à¸£à¸°à¸”ุà¸à¸à¸£à¸°à¸”ิà¸
+à¸à¸£à¸°à¸”ุ้งà¸à¸£à¸°à¸”ิ้ง
+à¸à¸£à¸°à¸”ุบๆ
+à¸à¸£à¸°à¸”ุบà¸à¸£à¸°à¸”ิบ
+à¸à¸£à¸°à¸”ุม
+à¸à¸£à¸°à¸”ูà¸
+à¸à¸£à¸°à¸”ูà¸à¸à¸š
+à¸à¸£à¸°à¸”ูà¸à¹„à¸à¹ˆà¸”ำ
+à¸à¸£à¸°à¸”ูà¸à¸‚ัดมัน
+à¸à¸£à¸°à¸”ูà¸à¹€à¸‚ียด
+à¸à¸£à¸°à¸”ูà¸à¹à¸‚็ง
+à¸à¸£à¸°à¸”ูà¸à¸„่าง
+à¸à¸£à¸°à¸”ูà¸à¸‡à¸¹
+à¸à¸£à¸°à¸”ูà¸à¸”ำ
+à¸à¸£à¸°à¸”ูà¸à¸£à¹‰à¸­à¸‡à¹„ด้
+à¸à¸£à¸°à¸”ูà¸à¸ªà¸±à¸™à¸«à¸¥à¸±à¸‡
+à¸à¸£à¸°à¸”ูà¸à¸­à¸¶à¹ˆà¸‡
+-à¸à¸£à¸°à¹€à¸”à¸
+à¸à¸£à¸°à¹€à¸”้ง
+à¸à¸£à¸°à¹€à¸”็น
+à¸à¸£à¸°à¹€à¸”้า
+à¸à¸£à¸°à¹€à¸”้าดิน
+à¸à¸£à¸°à¹€à¸”้าลม
+à¸à¸£à¸°à¹€à¸”าะ
+à¸à¸£à¸°à¹€à¸”าะปาà¸
+à¸à¸£à¸°à¹€à¸”ิด
+-à¸à¸£à¸°à¹€à¸”ี้ย
+à¸à¸£à¸°à¹€à¸”ียด
+-à¸à¸£à¸°à¹€à¸”ียม
+-à¸à¸£à¸°à¹€à¸”ี้ยม
+à¸à¸£à¸°à¹€à¸”ือà¸
+à¸à¸£à¸°à¹€à¸”ื่อง
+à¸à¸£à¸°à¹à¸”็à¸à¹†
+à¸à¸£à¸°à¹à¸”้ง
+à¸à¸£à¸°à¹à¸”้à¹à¸£à¹ˆ
+à¸à¸£à¸°à¹à¸”่วๆ
+à¸à¸£à¸°à¹à¸”ะ
+à¸à¸£à¸°à¹à¸”ะà¸à¸£à¸°à¹à¸”๋
+à¸à¸£à¸°à¹‚ดà¸
+à¸à¸£à¸°à¹‚ดà¸à¸à¸£à¸°à¹€à¸”à¸
+à¸à¸£à¸°à¹‚ดง
+à¸à¸£à¸°à¹‚ดงคาง
+à¸à¸£à¸°à¹‚ดงà¹à¸”ง
+à¸à¸£à¸°à¹‚ดด
+à¸à¸£à¸°à¹‚ดดร่ม
+à¸à¸£à¸°à¹‚ดน
+à¸à¸£à¸°à¹‚ดนดิน
+à¸à¸£à¸°à¹ƒà¸”
+à¸à¸£à¸°à¹„ด
+à¸à¸£à¸°à¹„ดà¹à¸à¹‰à¸§
+à¸à¸£à¸°à¹„ดลิง
+à¸à¸£à¸°à¸•à¸£à¸à¸à¸£à¸°à¸•à¸£à¸³
+à¸à¸£à¸°à¸•à¸£à¹‰à¸­
+à¸à¸£à¸°à¸•à¸£à¸±à¸š
+à¸à¸£à¸°à¸•à¸£à¸²à¸
+-à¸à¸£à¸°à¸•à¸£à¸³
+à¸à¸£à¸°à¸•à¸£à¸¸à¸”
+à¸à¸£à¸°à¸•à¸£à¸¸à¸¡
+à¸à¸£à¸°à¸•à¹‰à¸§à¸¡à¸à¸£à¸°à¹€à¸•à¸µà¹‰à¸¢à¸¡
+à¸à¸£à¸°à¸•à¹‰à¸­
+à¸à¸£à¸°à¸•à¹ˆà¸­à¸‡à¸à¸£à¸°à¹à¸•à¹ˆà¸‡
+à¸à¸£à¸°à¸•à¹Šà¸­à¸š
+à¸à¸£à¸°à¸•à¹‰à¸­à¸¢à¸•à¸µà¸§à¸´à¸”
+à¸à¸£à¸°à¸•à¸±à¸
+à¸à¸£à¸°à¸•à¸±à¹‰à¸§
+-à¸à¸£à¸°à¸•à¸²à¸
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸‚ูด
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸ˆà¸±à¸™à¸—ร์
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸ˆà¸²à¸¡
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸ˆà¸µà¸™
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸Šà¸¡à¸ˆà¸±à¸™à¸—ร์
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸•à¹‰à¸­à¸‡à¹à¸£à¹‰à¸§
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸•à¸·à¹ˆà¸™à¸•à¸¹à¸¡
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¹€à¸•à¹‰à¸™
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸ªà¸²à¸¡à¸‚า
+à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸«à¸¡à¸²à¸¢à¸ˆà¸±à¸™à¸—ร์
+à¸à¸£à¸°à¸•à¸´à¸
+-à¸à¸£à¸°à¸•à¸´à¸
+-à¸à¸£à¸°à¸•à¸´à¹‰à¸‡
+à¸à¸£à¸°à¸•à¸´à¹Šà¸”
+à¸à¸£à¸°à¸•à¸´à¹Šà¸”ขี้หมู
+à¸à¸£à¸°à¸•à¸´à¸š
+à¸à¸£à¸°à¸•à¸·à¸­à¸£à¸·à¸­à¸£à¹‰à¸™
+à¸à¸£à¸°à¸•à¸¸à¸
+à¸à¸£à¸°à¸•à¸¸à¸à¸à¸£à¸°à¸•à¸´à¸
+à¸à¸£à¸°à¸•à¸¸à¹‰à¸‡à¸à¸£à¸°à¸•à¸´à¹‰à¸‡
+à¸à¸£à¸°à¸•à¸¸à¹ˆà¸™
+à¸à¸£à¸°à¸•à¸¸à¹‰à¸™
+à¸à¸£à¸°à¸•à¸¹à¸š
+à¸à¸£à¸°à¹€à¸•à¸‡
+à¸à¸£à¸°à¹€à¸•à¹‡à¸™
+à¸à¸£à¸°à¹€à¸•à¸­à¸°
+à¸à¸£à¸°à¹€à¸•à¸²à¸°
+à¸à¸£à¸°à¹€à¸•à¸²à¸°à¸à¸£à¸°à¹à¸•à¸°
+-à¸à¸£à¸°à¹€à¸•à¸µà¹‰à¸¢à¸¡
+à¸à¸£à¸°à¹€à¸•à¸·à¹‰à¸­à¸‡
+à¸à¸£à¸°à¹à¸•
+-à¸à¸£à¸°à¹à¸•à¹ˆà¸‡
+à¸à¸£à¸°à¹à¸•à¹à¸•à¹‰à¹à¸§à¹‰à¸”
+à¸à¸£à¸°à¹à¸•à¹„ต่ไม้
+à¸à¸£à¸°à¹à¸•à¸§à¸±à¸š
+-à¸à¸£à¸°à¹à¸•à¸°
+à¸à¸£à¸°à¹‚ตà¸à¸à¸£à¸°à¸•à¸²à¸
+à¸à¸£à¸°à¹‚ตน
+à¸à¸£à¸°à¹„ตร
+à¸à¸£à¸°à¸–ด
+à¸à¸£à¸°à¸–อบ
+à¸à¸£à¸°à¸–ั่ว
+à¸à¸£à¸°à¸–าง
+à¸à¸£à¸°à¸–ิà¸
+à¸à¸£à¸°à¸–ิน
+à¸à¸£à¸°à¸–ินหอม
+à¸à¸£à¸°à¸–ึà¸
+à¸à¸£à¸°à¹€à¸–ิบ
+à¸à¸£à¸°à¹‚ถน
+à¸à¸£à¸°à¹‚ถนท้องพระโรง
+à¸à¸£à¸°à¹‚ถนปาà¸à¹à¸•à¸£
+à¸à¸£à¸°à¹‚ถนฤๅษี
+à¸à¸£à¸°à¸—à¸
+à¸à¸£à¸°à¸—ง
+à¸à¸£à¸°à¸—งà¹à¸–ลง
+à¸à¸£à¸°à¸—งน้อย
+à¸à¸£à¸°à¸—งป่า
+à¸à¸£à¸°à¸—งเพชร
+à¸à¸£à¸°à¸—งลอย
+à¸à¸£à¸°à¸—งลาย
+à¸à¸£à¸°à¸—งเหิน
+à¸à¸£à¸°à¸—ด
+à¸à¸£à¸°à¸—ดà¸à¸£à¸°à¸—ัน
+à¸à¸£à¸°à¸—บ
+à¸à¸£à¸°à¸—บà¸à¸£à¸°à¸—ั่ง
+à¸à¸£à¸°à¸—บà¸à¸£à¸°à¹€à¸—ียบ
+à¸à¸£à¸°à¸—บà¸à¸£à¸°à¹€à¸—ือน
+à¸à¸£à¸°à¸—บà¸à¸£à¸°à¹à¸—à¸
+à¸à¸£à¸°à¸—รวง
+à¸à¸£à¸°à¸—วย
+à¸à¸£à¸°à¸—อà¸
+à¸à¸£à¸°à¸—้อน
+à¸à¸£à¸°à¸—่อนà¸à¸£à¸°à¹à¸—่น
+à¸à¸£à¸°à¸—่อม
+à¸à¸£à¸°à¸—้อมà¸à¸£à¸°à¹à¸—้ม
+à¸à¸£à¸°à¸—่อมขี้หมู
+à¸à¸£à¸°à¸—่อมเลือด
+à¸à¸£à¸°à¸—ะ
+à¸à¸£à¸°à¸—ะใบบัว
+à¸à¸£à¸°à¸—ั่ง
+à¸à¸£à¸°à¸—ั่งติด
+-à¸à¸£à¸°à¸—ัน
+-à¸à¸£à¸°à¸—ั้น
+à¸à¸£à¸°à¸—า
+à¸à¸£à¸°à¸—าชาย
+à¸à¸£à¸°à¸—าย
+à¸à¸£à¸°à¸—ายเหิน
+à¸à¸£à¸°à¸—าสี
+à¸à¸£à¸°à¸—าหอง
+à¸à¸£à¸°à¸—ำ
+à¸à¸£à¸°à¸—ำความผิด
+à¸à¸£à¸°à¸—ิà¸à¸à¸£à¸°à¸—วย
+à¸à¸£à¸°à¸—ิง
+à¸à¸£à¸°à¸—ิงโทน
+à¸à¸£à¸°à¸—ึง
+à¸à¸£à¸°à¸—ืบ
+à¸à¸£à¸°à¸—ืบธรณี
+à¸à¸£à¸°à¸—ืบยอบ
+à¸à¸£à¸°à¸—ุ
+à¸à¸£à¸°à¸—ุง
+à¸à¸£à¸°à¸—ุ้ง
+à¸à¸£à¸°à¸—ุงลาย
+à¸à¸£à¸°à¸—ุ้งเส้า
+à¸à¸£à¸°à¸—ุงหมาบ้า
+à¸à¸£à¸°à¸—ุงเหว
+à¸à¸£à¸°à¸—ุ่ม
+à¸à¸£à¸°à¸—ุ่มขี้หมู
+à¸à¸£à¸°à¸—ุ่มนา
+à¸à¸£à¸°à¸—ุ่มหมู
+à¸à¸£à¸°à¸—ู้
+à¸à¸£à¸°à¸—ู้ถาม
+à¸à¸£à¸°à¹€à¸—่
+à¸à¸£à¸°à¹€à¸—่เร่
+-à¸à¸£à¸°à¹€à¸—ียบ
+à¸à¸£à¸°à¹€à¸—ียม
+à¸à¸£à¸°à¹€à¸—ียมหอม
+à¸à¸£à¸°à¹€à¸—ือน
+à¸à¸£à¸°à¹€à¸—ือนใจ
+à¸à¸£à¸°à¹€à¸—ื้อม
+à¸à¸£à¸°à¹à¸—à¸
+à¸à¸£à¸°à¹à¸—à¸à¸à¸£à¸°à¸—ั้น
+à¸à¸£à¸°à¹à¸—่น
+-à¸à¸£à¸°à¹à¸—้ม
+à¸à¸£à¸°à¹à¸—ะ
+à¸à¸£à¸°à¹„ทชาย
+à¸à¸£à¸°à¸™à¸
+à¸à¸£à¸°à¸™à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸™à¸±à¹‰à¸™
+à¸à¸£à¸°à¸™à¸µà¹‰
+à¸à¸£à¸°à¹‚น้น
+à¸à¸£à¸°à¹„น
+à¸à¸£à¸°à¸šà¸
+à¸à¸£à¸°à¸šà¸à¸„าย
+à¸à¸£à¸°à¸šà¸–
+à¸à¸£à¸°à¸šà¸¡
+à¸à¸£à¸°à¸šà¸§à¸™
+à¸à¸£à¸°à¸šà¸§à¸™à¸à¸£à¸°à¸šà¸´à¸”
+à¸à¸£à¸°à¸šà¸§à¸™à¸à¸²à¸£
+à¸à¸£à¸°à¸šà¸§à¸™à¸à¸²à¸£à¸¢à¸¸à¸•à¸´à¸˜à¸£à¸£à¸¡
+à¸à¸£à¸°à¸šà¸§à¸™à¸„วาม
+à¸à¸£à¸°à¸šà¸§à¸™à¸ˆà¸µà¸™
+à¸à¸£à¸°à¸šà¸§à¸¢
+à¸à¸£à¸°à¸šà¸§à¸£
+à¸à¸£à¸°à¸šà¸­à¸
+à¸à¸£à¸°à¸šà¸­à¸à¹€à¸žà¸¥à¸²
+à¸à¸£à¸°à¸šà¸­à¸à¸ªà¸¹à¸š
+à¸à¸£à¸°à¸šà¸­à¸à¹€à¸ªà¸µà¸¢à¸‡
+à¸à¸£à¸°à¸šà¸­à¸à¸«à¸±à¸§
+à¸à¸£à¸°à¸šà¸­à¸‡
+à¸à¸£à¸°à¸šà¸­à¸‡à¸à¸¥à¸¶à¸‡
+à¸à¸£à¸°à¸šà¸­à¸‡à¸à¸±à¸™
+à¸à¸£à¸°à¸šà¸­à¸‡à¹€à¸žà¸Šà¸£
+à¸à¸£à¸°à¸šà¸­à¸‡à¸£à¸²à¸«à¸¹
+à¸à¸£à¸°à¸šà¸°
+à¸à¸£à¸°à¸šà¸±à¸”
+à¸à¸£à¸°à¸šà¸±à¹‰à¸§à¸à¸£à¸°à¹€à¸šà¸µà¹‰à¸¢
+à¸à¸£à¸°à¸šà¹ˆà¸²
+à¸à¸£à¸°à¸šà¹‰à¸²
+à¸à¸£à¸°à¸šà¸²à¸
+à¸à¸£à¸°à¸šà¸²à¸¢
+à¸à¸£à¸°à¸šà¸²à¸¥
+à¸à¸£à¸°à¸šà¸´
+à¸à¸£à¸°à¸šà¸´à¹‰à¸‡
+à¸à¸£à¸°à¸šà¸´à¸”
+à¸à¸£à¸°à¸šà¸´à¸”à¸à¸£à¸°à¸šà¸§à¸™
+à¸à¸£à¸°à¸šà¸´à¸¥
+à¸à¸£à¸°à¸šà¸µà¹ˆ
+à¸à¸£à¸°à¸šà¸µà¹ˆà¸à¸£à¸°à¸šà¸­à¸‡
+à¸à¸£à¸°à¸šà¸µà¹ˆà¸˜à¸¸à¸Š
+à¸à¸£à¸°à¸šà¸µà¹ˆà¸¥à¸µà¸¥à¸²
+à¸à¸£à¸°à¸šà¸·à¸­
+à¸à¸£à¸°à¸šà¸·à¸­à¹€à¸ˆà¹‡à¸”ตัว
+à¸à¸£à¸°à¸šà¸¸à¸‡
+à¸à¸£à¸°à¸šà¸¸à¹ˆà¸¡à¸à¸£à¸°à¸šà¹ˆà¸²à¸¡
+à¸à¸£à¸°à¸šà¸¹à¹‰à¸à¸£à¸°à¸šà¸µà¹‰
+à¸à¸£à¸°à¸šà¸¹à¸™
+à¸à¸£à¸°à¸šà¸¹à¸™à¹€à¸¥à¸·à¸­à¸”
+à¸à¸£à¸°à¸šà¸¹à¸£
+à¸à¸£à¸°à¹€à¸šà¸‡
+à¸à¸£à¸°à¹€à¸šà¸
+à¸à¸£à¸°à¹€à¸šà¹‡à¸”à¸à¸£à¸°à¸šà¸§à¸™
+à¸à¸£à¸°à¹€à¸šà¸™
+à¸à¸£à¸°à¹€à¸šà¸™à¹€à¸«à¸™à¹‡à¸š
+à¸à¸£à¸°à¹€à¸šà¸²
+à¸à¸£à¸°à¹€à¸šà¸´à¸
+-à¸à¸£à¸°à¹€à¸šà¸µà¹‰à¸¢
+à¸à¸£à¸°à¹€à¸šà¸µà¸¢à¸”
+à¸à¸£à¸°à¹€à¸šà¸µà¸¢à¸”à¸à¸£à¸°à¸•à¸±à¸
+à¸à¸£à¸°à¹€à¸šà¸µà¸¢à¸”à¸à¸£à¸°à¹€à¸ªà¸µà¸¢à¸£
+à¸à¸£à¸°à¹€à¸šà¸µà¸¢à¸™
+à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡
+à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡à¹€à¸à¸¥à¹‡à¸”เต่า
+à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡à¸–้วย
+à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡à¸–้วยà¸à¸°à¸¥à¸²à¹à¸•à¸
+à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡à¸›à¸£à¸¸
+à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡à¸£à¸¹
+à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡à¸«à¸™à¹‰à¸²à¸§à¸±à¸§
+à¸à¸£à¸°à¹à¸šà¹ˆ
+à¸à¸£à¸°à¹à¸šà¸
+à¸à¸£à¸°à¹à¸šà¸à¸‡à¸²
+à¸à¸£à¸°à¹à¸šà¸°
+à¸à¸£à¸°à¹à¸šà¸°à¸¡à¸·à¸­
+à¸à¸£à¸°à¹‚บม
+à¸à¸£à¸°à¸›à¸¡à¸à¸£à¸°à¸›à¸³
+à¸à¸£à¸°à¸›à¸¡à¸à¸£à¸°à¹€à¸›à¸²
+à¸à¸£à¸°à¸›à¸£à¸­à¸
+à¸à¸£à¸°à¸›à¸£à¸­à¸à¸§à¹ˆà¸²à¸§
+à¸à¸£à¸°à¸›à¸£à¸µà¹‰à¸à¸£à¸°à¹€à¸›à¸£à¹ˆà¸²
+à¸à¸£à¸°à¸›à¸­à¸
+à¸à¸£à¸°à¸›à¹‰à¸­à¸à¸£à¸°à¹à¸›à¹‰
+à¸à¸£à¸°à¸›à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸›à¹‹à¸­à¸‡
+à¸à¸£à¸°à¸›à¸­à¸”à¸à¸£à¸°à¹à¸›à¸”
+à¸à¸£à¸°à¸›à¹‹à¸­à¸«à¸¥à¸­
+à¸à¸£à¸°à¸›à¸±à¹‰à¸§à¸à¸£à¸°à¹€à¸›à¸µà¹‰à¸¢
+-à¸à¸£à¸°à¸›à¸³
+à¸à¸£à¸°à¸›à¹ˆà¸³
+-à¸à¸£à¸°à¸›à¸´à¹ˆà¸¡
+à¸à¸£à¸°à¸›à¸¸à¸
+à¸à¸£à¸°à¸›à¸¸à¸à¸«à¸¥à¸¸à¸
+à¸à¸£à¸°à¸›à¸¸à¹ˆà¸¡
+à¸à¸£à¸°à¸›à¸¸à¹ˆà¸¡à¸à¸£à¸°à¸›à¹ˆà¸³
+à¸à¸£à¸°à¸›à¸¸à¹ˆà¸¡à¸à¸£à¸°à¸›à¸´à¹ˆà¸¡
+-à¸à¸£à¸°à¹€à¸›à¸²
+à¸à¸£à¸°à¹€à¸›à¹‹à¸²
+à¸à¸£à¸°à¹€à¸›à¹‹à¸²à¸«à¸™à¸±à¸
+à¸à¸£à¸°à¹€à¸›à¸²à¸°
+à¸à¸£à¸°à¹€à¸›à¸²à¸°à¹€à¸«à¸¥à¸²à¸°
+-à¸à¸£à¸°à¹€à¸›à¸µà¹‰à¸¢
+-à¸à¸£à¸°à¹à¸›à¹‰
+-à¸à¸£à¸°à¹à¸›à¸”
+à¸à¸£à¸°à¹‚ปà¸
+à¸à¸£à¸°à¹‚ปรง
+à¸à¸£à¸°à¹‚ปรงทอง
+à¸à¸£à¸°à¸œà¸¡
+-à¸à¸£à¸°à¸œà¸¥à¸²à¸¡
+à¸à¸£à¸°à¸œà¸¥à¸µà¸à¸£à¸°à¸œà¸¥à¸²à¸¡
+à¸à¸£à¸°à¸œà¸²à¸™
+à¸à¸£à¸°à¸œà¸µà¸
+à¸à¸£à¸°à¸œà¸µà¸à¸£à¸´à¹‰à¸™
+à¸à¸£à¸°à¸žà¸£à¸§à¸™
+à¸à¸£à¸°à¸žà¸£à¸´à¹‰à¸¡
+à¸à¸£à¸°à¸žà¸­à¸
+à¸à¸£à¸°à¸žà¸­à¸à¸§à¸±à¸§
+à¸à¸£à¸°à¸žà¸­à¸‡
+à¸à¸£à¸°à¸žà¹‰à¸­à¸¡
+à¸à¸£à¸°à¸žà¸±à¸
+à¸à¸£à¸°à¸žà¸±à¸‡
+à¸à¸£à¸°à¸žà¸±à¸‡à¹€à¸«à¸´à¸£
+à¸à¸£à¸°à¸žà¸±à¸‡à¹‚หม
+à¸à¸£à¸°à¸žà¸±à¸”
+à¸à¸£à¸°à¸žà¸±à¸”à¹à¸¡à¹ˆà¸¡à¹ˆà¸²à¸¢
+à¸à¸£à¸°à¸žà¸±à¸•à¸£
+à¸à¸£à¸°à¸žà¸±à¸™
+à¸à¸£à¸°à¸žà¸±à¹ˆà¸™
+à¸à¸£à¸°à¸žà¸²
+à¸à¸£à¸°à¸žà¸²à¸
+à¸à¸£à¸°à¸žà¸µà¹‰
+à¸à¸£à¸°à¸žà¸µà¹‰à¹€à¸‚าควาย
+à¸à¸£à¸°à¸žà¸·à¸­
+à¸à¸£à¸°à¸žà¸·à¸­à¸‚่าว
+à¸à¸£à¸°à¸žà¸·à¸­à¸›à¸µà¸
+à¸à¸£à¸°à¸žà¸¸à¹‰à¸‡
+à¸à¸£à¸°à¸žà¸¸à¹ˆà¸¡
+à¸à¸£à¸°à¸žà¸¸à¹ˆà¸¡à¸¡à¸·à¸­
+à¸à¸£à¸°à¹€à¸žà¸¥à¸´à¸¨
+à¸à¸£à¸°à¹€à¸žà¸²à¸°
+à¸à¸£à¸°à¹€à¸žà¸²à¸°à¸›à¸¥à¸²
+à¸à¸£à¸°à¹€à¸žà¸´à¸‡
+à¸à¸£à¸°à¹€à¸žà¸·à¹ˆà¸­à¸¡
+à¸à¸£à¸°à¹à¸žà¸‡
+à¸à¸£à¸°à¹à¸žà¹‰à¸‡
+à¸à¸£à¸°à¸Ÿà¸±à¸”à¸à¸£à¸°à¹€à¸Ÿà¸µà¸¢à¸”
+-à¸à¸£à¸°à¸Ÿà¸²à¸¢
+à¸à¸£à¸°à¸Ÿà¸¹à¸¡à¸à¸£à¸°à¸Ÿà¸²à¸¢
+-à¸à¸£à¸°à¹€à¸Ÿà¸µà¸¢à¸”
+à¸à¸£à¸°à¸¡à¸¥
+à¸à¸£à¸°à¸¡à¸­à¸š
+à¸à¸£à¸°à¸¡à¸­à¸¡à¸à¸£à¸°à¹à¸¡à¸¡
+à¸à¸£à¸°à¸¡à¸±à¸‡
+à¸à¸£à¸°à¸¡à¸±à¸™
+à¸à¸£à¸°à¸¡à¸´à¸”à¸à¸£à¸°à¹€à¸¡à¸µà¹‰à¸¢à¸™
+à¸à¸£à¸°à¸¡à¸¶à¸™
+à¸à¸£à¸°à¸¡à¸¸à¸—
+à¸à¸£à¸°à¹€à¸¡à¸²à¸°
+-à¸à¸£à¸°à¹€à¸¡à¸µà¹‰à¸¢à¸™
+-à¸à¸£à¸°à¹à¸¡à¸¡
+à¸à¸£à¸°à¸¢à¹ˆà¸­à¸‡
+-à¸à¸£à¸°à¸¢à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸¢à¹ˆà¸­à¸‡à¸à¸£à¸°à¹à¸¢à¹ˆà¸‡
+à¸à¸£à¸°à¸¢à¹ˆà¸­à¸™
+à¸à¸£à¸°à¸¢à¹ˆà¸­à¸¡
+à¸à¸£à¸°à¸¢à¸²
+à¸à¸£à¸°à¸¢à¸²à¸„ชวาง
+à¸à¸£à¸°à¸¢à¸²à¸‡
+à¸à¸£à¸°à¸¢à¸²à¸ˆà¸
+-à¸à¸£à¸°à¸¢à¸²à¸”
+à¸à¸£à¸°à¸¢à¸²à¸”อà¸
+à¸à¸£à¸°à¸¢à¸²à¸”อà¸à¹€à¸šà¸µà¹‰à¸¢
+à¸à¸£à¸°à¸¢à¸²à¸—าน
+à¸à¸£à¸°à¸¢à¸²à¸—ิพย์
+à¸à¸£à¸°à¸¢à¸²à¸šà¸§à¸Š
+à¸à¸£à¸°à¸¢à¸²à¹€à¸šà¸µà¹‰à¸¢
+à¸à¸£à¸°à¸¢à¸²à¸£à¸‡à¸„์
+à¸à¸£à¸°à¸¢à¸²à¹€à¸¥à¸¢
+à¸à¸£à¸°à¸¢à¸²à¸ªà¸™à¸²à¸™
+à¸à¸£à¸°à¸¢à¸²à¸ªà¸±à¸‡à¹€à¸§à¸¢
+à¸à¸£à¸°à¸¢à¸²à¸ªà¸±à¸‡à¹à¸§à¸‡
+à¸à¸£à¸°à¸¢à¸²à¸ªà¸²à¸£à¸—
+à¸à¸£à¸°à¸¢à¸²à¹€à¸ªà¸§à¸¢
+à¸à¸£à¸°à¸¢à¸²à¸«à¸‡à¸±à¸™
+à¸à¸£à¸°à¸¢à¸²à¸«à¸²à¸£
+à¸à¸£à¸°à¸¢à¸´à¸
+à¸à¸£à¸°à¸¢à¸´à¹‰à¸¡à¸à¸£à¸°à¸¢à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸¢à¸¶à¸à¸à¸£à¸°à¸¢à¸·à¸­
+à¸à¸£à¸°à¸¢à¸·à¸”à¸à¸£à¸°à¸¢à¸²à¸”
+à¸à¸£à¸°à¹€à¸¢à¹‰à¸­à¸à¸£à¸°à¹à¸«à¸¢à¹ˆà¸‡
+-à¸à¸£à¸°à¹à¸¢à¹ˆà¸‡
+à¸à¸£à¸°à¸£à¸­à¸
+à¸à¸£à¸°à¸£à¸­à¸à¸™à¹‰à¸³à¸‚้าว
+à¸à¸£à¸°à¹€à¸£à¸µà¸¢à¸™
+à¸à¸£à¸°à¹‚รà¸à¸™à¹‰à¸³à¸‚้าว
+à¸à¸£à¸°à¹‚รà¸à¹ƒà¸«à¸à¹ˆ
+à¸à¸£à¸°à¹„ร
+à¸à¸£à¸°à¸¥à¸”
+à¸à¸£à¸°à¸¥à¸š
+à¸à¸£à¸°à¸¥à¸­à¸
+à¸à¸£à¸°à¸¥à¸­à¸¡
+à¸à¸£à¸°à¸¥à¸°à¸«à¸¥à¹ˆà¸³
+à¸à¸£à¸°à¸¥à¸±à¸”
+à¸à¸£à¸°à¸¥à¸±à¸š
+à¸à¸£à¸°à¸¥à¸±à¸šà¸à¸£à¸°à¹€à¸¥à¸·à¸­à¸
+à¸à¸£à¸°à¸¥à¸±à¸¡à¸žà¸£
+à¸à¸£à¸°à¸¥à¸²
+à¸à¸£à¸°à¸¥à¸²à¸à¸²à¸£
+à¸à¸£à¸°à¸¥à¸²à¸žà¸´à¸™
+à¸à¸£à¸°à¸¥à¸²à¸¢à¸à¸£à¸°à¸¥à¸­à¸
+à¸à¸£à¸°à¸¥à¸²à¸¨à¸£à¸µ
+à¸à¸£à¸°à¸¥à¸³
+à¸à¸£à¸°à¸¥à¸³à¸žà¸£
+à¸à¸£à¸°à¸¥à¸³à¸žà¸±à¸
+à¸à¸£à¸°à¸¥à¸³à¸žà¸¸à¸
+à¸à¸£à¸°à¸¥à¸´à¸‡
+à¸à¸£à¸°à¸¥à¸µ
+à¸à¸£à¸°à¸¥à¸¶à¸‡
+à¸à¸£à¸°à¸¥à¸¸à¸¡à¸žà¸²à¸‡
+à¸à¸£à¸°à¸¥à¸¸à¸¡à¸žà¸¸à¸
+à¸à¸£à¸°à¸¥à¸¸à¸¡à¸žà¸¹
+à¸à¸£à¸°à¸¥à¸¹à¸™
+à¸à¸£à¸°à¸¥à¸¹à¹ˆà¸™à¹Œ
+à¸à¸£à¸°à¹€à¸¥à¹‡à¸™
+à¸à¸£à¸°à¹€à¸¥à¸µà¸¢à¸”
+à¸à¸£à¸°à¹€à¸¥à¸·à¸­à¸
+à¸à¸£à¸°à¹‚ลง
+à¸à¸£à¸°à¸§à¸™
+à¸à¸£à¸°à¸§à¸™à¸à¸£à¸°à¸§à¸²à¸¢
+à¸à¸£à¸°à¸§à¸±à¸”
+à¸à¸£à¸°à¸§à¹ˆà¸²
+-à¸à¸£à¸°à¸§à¸²à¸”
+à¸à¸£à¸°à¸§à¸²à¸™
+à¸à¸£à¸°à¸§à¸²à¸¢
+à¸à¸£à¸°à¸§à¸²à¸¢à¸à¸£à¸°à¸§à¸™
+à¸à¸£à¸°à¸§à¸´à¸™
+à¸à¸£à¸°à¸§à¸µ
+à¸à¸£à¸°à¸§à¸µà¸à¸£à¸°à¸§à¸²à¸”
+à¸à¸£à¸°à¸§à¸¹à¸”à¸à¸£à¸°à¸§à¸²à¸”
+à¸à¸£à¸°à¹€à¸§à¸™
+à¸à¸£à¸°à¹€à¸§à¸™à¸à¸£à¸°à¸§à¸™
+à¸à¸£à¸°à¹€à¸§à¸¢à¸à¸£à¸°à¸§à¸²à¸¢
+à¸à¸£à¸°à¹à¸§à¸™
+à¸à¸£à¸°à¹‚วยà¸à¸£à¸°à¸§à¸²à¸¢
+à¸à¸£à¸°à¸¨à¸
+à¸à¸£à¸°à¸¨à¸±à¸¢
+à¸à¸£à¸°à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ
+à¸à¸£à¸°à¸©à¸±à¸•à¸£à¸µ
+à¸à¸£à¸°à¸©à¸±à¸¢
+à¸à¸£à¸°à¸©à¸±à¸¢à¸à¸¥à¹ˆà¸­à¸™
+à¸à¸£à¸°à¸©à¸²à¸›à¸“์
+à¸à¸£à¸°à¸©à¸´à¸£
+à¸à¸£à¸°à¹€à¸©à¸¡
+à¸à¸£à¸°à¹€à¸©à¸¡à¸ªà¸²à¸™à¸•à¹Œ
+à¸à¸£à¸°à¹€à¸©à¸µà¸¢à¸£
+à¸à¸£à¸°à¸ªà¸‡
+-à¸à¸£à¸°à¸ªà¸™
+à¸à¸£à¸°à¸ªà¸š
+à¸à¸£à¸°à¸ªà¸¡
+à¸à¸£à¸°à¸ªà¸£à¸§à¸¥
+à¸à¸£à¸°à¸ªà¸£à¹‰à¸­à¸¢
+à¸à¸£à¸°à¸ªà¸§à¸™
+à¸à¸£à¸°à¸ªà¸§à¸¢
+à¸à¸£à¸°à¸ªà¸­à¸š
+à¸à¸£à¸°à¸ªà¸°
+à¸à¸£à¸°à¸ªà¸±à¸‡
+à¸à¸£à¸°à¸ªà¸±à¸™
+à¸à¸£à¸°à¸ªà¸±à¸šà¸à¸£à¸°à¸ªà¹ˆà¸²à¸¢
+à¸à¸£à¸°à¸ªà¸²
+à¸à¸£à¸°à¸ªà¸²à¸™à¸•à¸´à¹Œ
+à¸à¸£à¸°à¸ªà¸²à¸š
+à¸à¸£à¸°à¸ªà¸²à¸¢
+-à¸à¸£à¸°à¸ªà¹ˆà¸²à¸¢
+à¸à¸£à¸°à¸ªà¸´à¸™à¸˜à¸¸
+à¸à¸£à¸°à¸ªà¸·à¸­
+à¸à¸£à¸°à¸ªà¸·à¸­à¸”ูด
+à¸à¸£à¸°à¸ªà¸¸à¸‡à¸à¸£à¸°à¸ªà¸´à¸‡
+à¸à¸£à¸°à¸ªà¸¸à¸™
+à¸à¸£à¸°à¸ªà¸¸à¸™à¸›à¸·à¸™
+à¸à¸£à¸°à¸ªà¸¸à¸™à¸§à¸´à¸–ี
+à¸à¸£à¸°à¸ªà¸¹à¸—ธิ์
+à¸à¸£à¸°à¸ªà¸¹à¸š
+à¸à¸£à¸°à¹€à¸ªà¸”
+à¸à¸£à¸°à¹€à¸ªà¹‡à¸™à¸à¸£à¸°à¸ªà¸²à¸¢
+à¸à¸£à¸°à¹€à¸ªà¹ˆà¸²
+à¸à¸£à¸°à¹€à¸ªà¸²à¸°à¸à¸£à¸°à¹à¸ªà¸°
+à¸à¸£à¸°à¹€à¸ªà¸µà¸¢à¸™
+à¸à¸£à¸°à¹€à¸ªà¸µà¸¢à¸£
+à¸à¸£à¸°à¹€à¸ªà¸·à¸­à¸à¸à¸£à¸°à¸ªà¸™
+à¸à¸£à¸°à¹à¸ª
+à¸à¸£à¸°à¹à¸ªà¸à¸²à¸£à¹€à¸‡à¸´à¸™
+à¸à¸£à¸°à¹à¸ªà¸„วาม
+à¸à¸£à¸°à¹à¸ªà¸‡
+à¸à¸£à¸°à¹à¸ªà¸ˆà¸´à¸•
+à¸à¸£à¸°à¹à¸ªà¸•à¸£à¸‡
+à¸à¸£à¸°à¹à¸ªà¸™à¹‰à¸³
+à¸à¸£à¸°à¹à¸ªà¸žà¸£à¸°à¸£à¸²à¸Šà¸”ำรัส
+à¸à¸£à¸°à¹à¸ªà¸£à¸±à¸šà¸ªà¸±à¹ˆà¸‡
+à¸à¸£à¸°à¹à¸ªà¸¥à¸¡
+à¸à¸£à¸°à¹à¸ªà¸ªà¸¥à¸±à¸š
+à¸à¸£à¸°à¹à¸ªà¹€à¸ªà¸µà¸¢à¸‡
+à¸à¸£à¸°à¹à¸ªà¸°
+à¸à¸£à¸°à¹‚สง
+à¸à¸£à¸°à¹„ส
+à¸à¸£à¸°à¸«à¸‡à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸«à¸™
+à¸à¸£à¸°à¸«à¸™à¸
+à¸à¸£à¸°à¸«à¸™à¸à¸à¸´à¸™à¸£à¸µ
+à¸à¸£à¸°à¸«à¸™à¸à¸™à¸¤à¸¡à¸´à¸•
+à¸à¸£à¸°à¸«à¸™à¸à¸™à¸²à¸£à¸µ
+à¸à¸£à¸°à¸«à¸™à¹ˆà¸­à¸‡
+à¸à¸£à¸°à¸«à¸™à¸²à¸
+à¸à¸£à¸°à¸«à¸™à¸²à¸š
+à¸à¸£à¸°à¸«à¸™à¸²à¸šà¸„าบเà¸à¸µà¹ˆà¸¢à¸§
+à¸à¸£à¸°à¸«à¸™à¹ˆà¸³
+à¸à¸£à¸°à¸«à¸¡à¸§à¸”
+à¸à¸£à¸°à¸«à¸¡à¸­à¸š
+à¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡
+à¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡à¸šà¸²à¸‡
+à¸à¸£à¸°à¸«à¸¡à¸±à¹ˆà¸‡
+à¸à¸£à¸°à¸«à¸¡à¹ˆà¸²
+-à¸à¸£à¸°à¸«à¸¡à¸´à¸”
+à¸à¸£à¸°à¸«à¸¡à¸´à¸š
+à¸à¸£à¸°à¸«à¸¡à¸¸à¸”à¸à¸£à¸°à¸«à¸¡à¸´à¸”
+à¸à¸£à¸°à¸«à¸¡à¸¸à¹ˆà¸™
+à¸à¸£à¸°à¸«à¸¡à¸¸à¸š
+à¸à¸£à¸°à¸«à¸¡à¸¸à¸šà¸à¸£à¸°à¸«à¸¡à¸´à¸š
+à¸à¸£à¸°à¸«à¸¢à¹ˆà¸‡
+à¸à¸£à¸°à¸«à¸¢à¸”
+à¸à¸£à¸°à¸«à¸¢à¸š
+à¸à¸£à¸°à¸«à¸¢à¹ˆà¸­à¸™
+à¸à¸£à¸°à¸«à¸¢à¹ˆà¸­à¸¡
+à¸à¸£à¸°à¸«à¸¢à¸°
+à¸à¸£à¸°à¸«à¸¢à¸±à¸‡
+à¸à¸£à¸°à¸«à¸¢à¸±à¸š
+à¸à¸£à¸°à¸«à¸¢à¸´à¹ˆà¸¡
+à¸à¸£à¸°à¸«à¸£à¸­à¸”
+à¸à¸£à¸°à¸«à¸£à¸´à¹ˆà¸‡
+à¸à¸£à¸°à¸«à¸§à¸™
+à¸à¸£à¸°à¸«à¸§à¸±à¸”
+à¸à¸£à¸°à¸«à¸§à¸±à¸”เà¸à¸¥à¹‰à¸²
+à¸à¸£à¸°à¸«à¸§à¹ˆà¸²
+à¸à¸£à¸°à¸«à¸­à¸‡
+à¸à¸£à¸°à¸«à¸±à¸‡
+à¸à¸£à¸°à¸«à¸±à¸”
+à¸à¸£à¸°à¸«à¸²à¸‡
+à¸à¸£à¸°à¸«à¸²à¸¢
+à¸à¸£à¸°à¸«à¸¶à¸¡
+à¸à¸£à¸°à¸«à¸¶à¹ˆà¸¡
+à¸à¸£à¸°à¸«à¸·à¸”à¸à¸£à¸°à¸«à¸­à¸š
+à¸à¸£à¸°à¹€à¸«à¹‡à¸™
+à¸à¸£à¸°à¹€à¸«à¸™à¹‡à¸ˆ
+à¸à¸£à¸°à¹€à¸«à¸™à¹‡à¸ˆà¸à¸£à¸°à¹à¸«à¸™à¹ˆ
+à¸à¸£à¸°à¹€à¸«à¸™à¸µà¸¢à¸”
+à¸à¸£à¸°à¹€à¸«à¸¡à¹‡à¸”à¸à¸£à¸°à¹€à¸«à¸¡à¸µà¸¢à¸”
+à¸à¸£à¸°à¹€à¸«à¸¡à¹‡à¸”à¸à¸£à¸°à¹à¸«à¸¡à¹ˆ
+à¸à¸£à¸°à¹€à¸«à¸¡à¹ˆà¸™
+à¸à¸£à¸°à¹€à¸«à¸¡à¹ˆà¸²
+à¸à¸£à¸°à¹€à¸«à¸¥à¸µà¸¢à¸
+à¸à¸£à¸°à¹€à¸«à¸§à¹ˆà¸²
+à¸à¸£à¸°à¹€à¸«à¹ˆà¸­
+à¸à¸£à¸°à¹€à¸«à¸´à¸¡
+à¸à¸£à¸°à¹€à¸«à¸µà¹‰à¸¢à¸™à¸à¸£à¸°à¸«à¸·à¸­à¸£à¸·à¸­
+à¸à¸£à¸°à¹à¸«
+à¸à¸£à¸°à¹à¸«à¸—อง
+-à¸à¸£à¸°à¹à¸«à¸™
+à¸à¸£à¸°à¹à¸«à¸™à¹ˆ
+à¸à¸£à¸°à¹à¸«à¸™à¸š
+à¸à¸£à¸°à¹à¸«à¸™à¸°
+à¸à¸£à¸°à¹à¸«à¸™à¸°à¸à¸£à¸°à¹à¸«à¸™
+à¸à¸£à¸°à¹à¸«à¸¡à¸š
+à¸à¸£à¸°à¹à¸«à¸¡à¹ˆà¸§
+à¸à¸£à¸°à¹à¸«à¸¢à¹ˆà¸‡
+à¸à¸£à¸°à¹à¸«à¸£à¹ˆà¸¡
+à¸à¸£à¸°à¹à¸«à¸¥à¹ˆà¸‡
+à¸à¸£à¸°à¹‚ห้
+à¸à¸£à¸°à¹‚หนด
+à¸à¸£à¸°à¹‚หม
+à¸à¸£à¸°à¹‚หย
+à¸à¸£à¸°à¹‚หย่ง
+-à¸à¸£à¸°à¸­à¹ˆà¸§à¸™
+à¸à¸£à¸°à¸­à¸§à¸¥
+à¸à¸£à¸°à¸­à¹‰à¸­à¸à¸£à¸°à¹à¸­à¹‰
+à¸à¸£à¸°à¸­à¸­à¸”à¸à¸£à¸°à¹à¸­à¸”
+à¸à¸£à¸°à¸­à¸­à¸š
+à¸à¸£à¸°à¸­à¸­à¸¡
+à¸à¸£à¸°à¸­à¹‰à¸­à¸¡à¸à¸£à¸°à¹à¸­à¹‰à¸¡
+à¸à¸£à¸°à¸­à¸­à¸¡à¸™à¹‰à¸³
+à¸à¸£à¸°à¸­à¸±à¸
+à¸à¸£à¸°à¸­à¸±à¸à¸à¸£à¸°à¸­à¹ˆà¸§à¸™
+à¸à¸£à¸°à¸­à¸±à¸à¸à¸£à¸°à¹„อ
+à¸à¸£à¸°à¸­à¸±à¹‰à¸§à¹à¸—งควาย
+à¸à¸£à¸°à¸­à¹‰à¸²
+à¸à¸£à¸°à¸­à¸²à¸™
+à¸à¸£à¸°à¸­à¸´à¸”
+à¸à¸£à¸°à¸­à¸´à¸”à¸à¸£à¸°à¹€à¸­à¸·à¹‰à¸­à¸™
+à¸à¸£à¸°à¸­à¸¶à¸
+à¸à¸£à¸°à¸­à¸¶à¸à¸à¸£à¸°à¸­à¸±à¸
+à¸à¸£à¸°à¸­à¸¶à¸”
+à¸à¸£à¸°à¸­à¸·à¸”
+à¸à¸£à¸°à¸­à¸¸
+à¸à¸£à¸°à¸­à¸¸à¸
+à¸à¸£à¸°à¹€à¸­à¸š
+à¸à¸£à¸°à¹€à¸­à¸²
+à¸à¸£à¸°à¹€à¸­à¸´à¸
+à¸à¸£à¸°à¹€à¸­à¸´à¸š
+-à¸à¸£à¸°à¹à¸­à¹‰
+à¸à¸£à¸°à¹à¸­à¸
+-à¸à¸£à¸°à¹à¸­à¸”
+à¸à¸£à¸°à¹à¸­à¸š
+à¸à¸£à¸°à¹à¸­à¸¡
+-à¸à¸£à¸°à¹à¸­à¹‰à¸¡
+à¸à¸£à¸°à¹„อ
+à¸à¸£à¸°à¹„อà¸à¸£à¸°à¹à¸­à¸¡
+à¸à¸£à¸±à¸
+à¸à¸£à¸±à¸à¸‚ี
+à¸à¸£à¸±à¸‡
+à¸à¸£à¸±à¸Šà¸à¸²à¸¢
+à¸à¸£à¸±à¸“ฑ-
+à¸à¸£à¸±à¸“ฑ์
+à¸à¸£à¸±à¸“ย์
+à¸à¸£à¸±à¸™
+à¸à¸£à¸±à¸š
+à¸à¸£à¸±à¸¡
+à¸à¸£à¸²à¸
+à¸à¸£à¸²à¸‡
+à¸à¸£à¹ˆà¸²à¸‡
+à¸à¸£à¸²à¸‡à¹€à¸à¸£à¸µà¸¢à¸‡
+à¸à¸£à¸²à¸”
+-à¸à¸£à¸²à¸”
+à¸à¸£à¸²à¸”เà¸à¸£à¸µà¹‰à¸¢à¸§
+à¸à¸£à¸²à¸”วง
+à¸à¸£à¸²à¸™
+à¸à¸£à¹‰à¸²à¸™
+à¸à¸£à¸²à¸™à¸à¸à¸´à¸™
+à¸à¸£à¸²à¸š
+à¸à¸£à¸²à¸šà¸žà¸£à¸°
+à¸à¸£à¸²à¸Ÿ
+à¸à¸£à¸²à¸¡
+à¸à¸£à¸²à¸¡à¸Šà¹‰à¸²à¸‡
+à¸à¸£à¸²à¸¡à¸žà¸¥à¸¹
+à¸à¸£à¸²à¸¢
+à¸à¸£à¹ˆà¸²à¸¢
+à¸à¸£à¸²à¸¥
+à¸à¸£à¸²à¸§
+à¸à¸£à¹‰à¸²à¸§
+à¸à¸£à¸²à¸§à¸”่าง
+à¸à¸£à¸²à¸§à¸£à¸¹à¸”
+à¸à¸£à¸²à¸ªà¸´à¸
+à¸à¸£à¸³
+à¸à¸£à¹ˆà¸³
+à¸à¸£à¹ˆà¸³à¸à¸£à¸¸à¹ˆà¸™
+à¸à¸£à¸´à¸
+à¸à¸£à¸´à¹Šà¸
+à¸à¸£à¸´à¸à¸à¸£à¸´à¸§
+à¸à¸£à¸´à¸à¸à¸£à¸µ
+à¸à¸£à¸´à¹ˆà¸‡
+à¸à¸£à¸´à¹Šà¸‡
+à¸à¸£à¸´à¸‡à¸à¸£à¸´à¸§
+à¸à¸£à¸´à¹‰à¸‡à¸à¸£à¸´à¹‰à¸§
+à¸à¸£à¸´à¹ˆà¸‡à¹€à¸à¸£à¸‡
+à¸à¸£à¸´à¹ˆà¸‡à¹ƒà¸ˆ
+à¸à¸£à¸´à¸Š
+à¸à¸£à¸´à¸“ี
+à¸à¸£à¸´à¸•à¸¢-
+à¸à¸£à¸´à¸™
+à¸à¸£à¸´à¸™à¸—ร์
+à¸à¸£à¸´à¸™à¸µ
+à¸à¸£à¸´à¸š
+à¸à¸£à¸´à¸¡
+à¸à¸£à¸´à¹ˆà¸¡
+à¸à¸£à¸´à¸¢à¸²
+à¸à¸£à¸´à¸¢à¸²à¸™à¸¸à¹€à¸„ราะห์
+à¸à¸£à¸´à¸¢à¸²à¸§à¸´à¹€à¸¨à¸©à¸“์
+à¸à¸£à¸´à¸¢à¸²à¸§à¸´à¹€à¸¨à¸©à¸“์วลี
+à¸à¸£à¸´à¸¢à¸²à¸§à¸´à¹€à¸¨à¸©à¸“านุประโยค
+à¸à¸£à¸´à¸§
+à¸à¸£à¸´à¹‰à¸§
+à¸à¸£à¸´à¸§à¸à¸£à¸²à¸§
+à¸à¸£à¸´à¸§à¸¥à¸²à¸¢
+à¸à¸£à¸µ
+à¸à¸£à¸µà¸‘า
+à¸à¸£à¸µà¸‘าà¸à¸£
+à¸à¸£à¸µà¸‘าภิรมย์
+à¸à¸£à¸µà¸‘ารมย์
+à¸à¸£à¸µà¸‘าสถาน
+à¸à¸£à¸µà¸”
+à¸à¸£à¸µà¹Šà¸”
+à¸à¸£à¸µà¸”à¸à¸£à¸²à¸”
+à¸à¸£à¸µà¸”à¸à¸£à¸²à¸¢
+à¸à¸£à¸µà¸”นิ้ว
+à¸à¸£à¸µà¸˜à¸²
+à¸à¸£à¸µà¸˜à¸²à¸—ัพ
+à¸à¸£à¸µà¸˜à¸²à¸žà¸¥
+à¸à¸£à¸µà¸©
+à¸à¸£à¸µà¸ª
+à¸à¸£à¸¶à¸‡
+à¸à¸£à¸¸
+à¸à¸£à¸¸à¸
+à¸à¸£à¸¸à¸à¸à¸£à¸±à¸
+à¸à¸£à¸¸à¸à¸à¸£à¸¹à¹Š
+à¸à¸£à¸¸à¸‡
+à¸à¸£à¸¸à¹‰à¸‡à¸à¸£à¸´à¹ˆà¸‡
+à¸à¸£à¸¸à¸‡à¹€à¸‚มา
+à¸à¸£à¸¸à¸‡à¸žà¸²à¸¥à¸µ
+à¸à¸£à¸¸à¸“
+à¸à¸£à¸¸à¸“า
+à¸à¸£à¸¸à¸“าทฤคุณ
+à¸à¸£à¸¸à¸™
+à¸à¸£à¸¸à¹ˆà¸™
+à¸à¸£à¸¸à¸š
+à¸à¸£à¸¸à¸šà¸à¸£à¸´à¸š
+à¸à¸£à¸¸à¹ˆà¸¡
+à¸à¸£à¸¸à¹‰à¸¡à¸à¸£à¸´à¹ˆà¸¡
+à¸à¸£à¸¸à¸¢
+à¸à¸£à¸¸à¸¢à¸à¸£à¸²à¸¢
+à¸à¸£à¸¸à¸¢à¹€à¸à¸£à¸µà¸¢à¸§
+à¸à¸£à¸¹
+à¸à¸£à¸¹à¸”
+à¸à¸£à¸¹à¸¡
+à¸à¹€à¸£à¸“ุ
+à¸à¹€à¸£à¸“ุà¸à¸²
+à¸à¹€à¸£à¸™à¸—ร
+à¸à¹€à¸£à¸™à¸—ร์
+à¸à¸¤à¸Š
+à¸à¸¤à¸”-
+à¸à¸¤à¸”ยาเà¸à¸µà¸¢à¸£à¸“
+à¸à¸¤à¸”า
+à¸à¸¤à¸”าà¸à¸²à¸£
+à¸à¸¤à¸”าà¸à¸Šà¸¥à¸µ
+à¸à¸¤à¸”าธิà¸à¸²à¸£
+à¸à¸¤à¸”าภินิหาร
+à¸à¸¤à¸”าอัà¸à¸Šà¸¥à¸µ
+à¸à¸¤à¸”ิ
+à¸à¸¤à¸”ีà¸à¸²
+à¸à¸¤à¸•à¸•à¸´à¸à¸²
+à¸à¸¤à¸•à¸¢-
+à¸à¸¤à¸•à¸¢à¸Žà¸µà¸à¸²
+à¸à¸¤à¸•à¸¢à¸²
+à¸à¸¤à¸•à¸´à¸à¸²
+à¸à¸¤à¸•à¸´à¸¢à¸²
+à¸à¸¤à¸©à¸Žà¸²
+à¸à¸¤à¸©à¸Žà¸²à¸
+à¸à¸¤à¸©à¸Žà¸²à¸à¸Šà¸¥à¸´à¸•
+à¸à¸¤à¸©à¸Žà¸²à¸à¸Šà¸¥à¸µ
+à¸à¸¤à¸©à¸Žà¸²à¸à¸Šà¸§à¸¥à¸´à¸•à¸§à¸²
+à¸à¸¤à¸©à¸Žà¸²à¸à¸Šà¸§à¸¥à¸´à¸¨
+à¸à¸¤à¸©à¸Žà¸²à¸à¸Šà¸§à¹€à¸¥à¸¨
+à¸à¸¤à¸©à¸Žà¸²à¸à¸Šà¸¸à¸¥à¸µ
+à¸à¸¤à¸©à¸Žà¸²à¸˜à¸²à¸£
+à¸à¸¤à¸©à¸Žà¸²à¸ à¸´à¸™à¸´à¸«à¸²à¸£
+à¸à¸¤à¸©à¸Žà¸µ
+à¸à¸¤à¸©à¸Žà¸µà¸à¸²
+à¸à¸¤à¸©à¸“า
+à¸à¸¥
+à¸à¸¥-
+à¸à¸¥à¹„à¸
+à¸à¸¥à¸‰à¹‰à¸­à¸‰à¸¥
+à¸à¸¥à¸”
+à¸à¸¥à¸”à¸à¸³à¸¡à¸°à¸¥à¸­
+à¸à¸¥à¸”พระสุเมรุ
+à¸à¸¥à¹ˆà¸™
+à¸à¸¥à¸š
+à¸à¸¥à¸šà¹€à¸à¸¥à¸µà¹ˆà¸¢
+à¸à¸¥à¸šà¹€à¸à¸¥à¸·à¹ˆà¸­à¸™
+à¸à¸¥à¸šà¸—
+à¸à¸¥à¸šà¸šà¸±à¸•à¸£à¸ªà¸¸à¸¡à¹€à¸žà¸¥à¸´à¸‡
+à¸à¸¥à¸žà¸¢à¸²à¸™
+à¸à¸¥à¹„ฟ
+à¸à¸¥à¸¡
+à¸à¸¥à¸¡à¸à¸¥à¹ˆà¸­à¸¡
+à¸à¸¥à¸¡à¸à¸¥à¸·à¸™
+à¸à¸¥à¸¡à¸à¸¥à¸·à¸™à¸à¸¥à¸­à¸™
+à¸à¸¥à¸¡à¹€à¸à¸¥à¸µà¸¢à¸§
+à¸à¸¥à¸¡à¸”ิà¸
+à¸à¸¥à¸¡à¹€à¸›à¹‡à¸™à¸¥à¸¹à¸à¸¡à¸°à¸™à¸²à¸§
+à¸à¸¥à¸¡à¸ 
+à¸à¸¥à¹€à¸¡à¹‡à¸”
+à¸à¸¥à¸¢à¸¸à¸—ธ์
+à¸à¸¥à¸¥à¸°
+à¸à¸¥à¸§à¸‡
+à¸à¸¥à¸§à¸¡
+à¸à¸¥à¹‰à¸§à¸¢
+à¸à¸¥à¹‰à¸§à¸¢à¸à¸¥à¹‰à¸²à¸¢
+à¸à¸¥à¹‰à¸§à¸¢à¹à¸‚à¸
+à¸à¸¥à¹‰à¸§à¸¢à¸‡à¸§à¸‡à¸Šà¹‰à¸²à¸‡
+à¸à¸¥à¹‰à¸§à¸¢à¹€à¸•à¹ˆà¸²
+à¸à¸¥à¹‰à¸§à¸¢à¹ƒà¸•à¹‰
+à¸à¸¥à¹‰à¸§à¸¢à¸™à¹‰à¸­à¸¢
+à¸à¸¥à¹‰à¸§à¸¢à¹„ม้
+à¸à¸¥à¹‰à¸§à¸¢à¸ªà¸±à¹‰à¸™
+à¸à¸¥à¹‰à¸§à¸¢à¸«à¸¡à¸¹à¸ªà¸±à¸‡
+à¸à¸¥à¸§à¸´à¸˜à¸µ
+à¸à¸¥à¸¨
+à¸à¸¥à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+à¸à¸¥à¸«à¸²à¸¢
+à¸à¸¥à¹€à¸«à¸¢
+à¸à¸¥à¹‰à¸­
+à¸à¸¥à¸­à¸
+à¸à¸¥à¸­à¸à¸à¸¥à¸±à¸š
+à¸à¸¥à¸­à¸à¹à¸à¸¥à¸
+à¸à¸¥à¸­à¸‡
+à¸à¸¥à¹ˆà¸­à¸‡
+à¸à¸¥à¹‰à¸­à¸‡
+à¸à¸¥à¹‰à¸­à¸‡à¹à¸à¸¥à¹‰à¸‡
+à¸à¸¥à¹‰à¸­à¸‡à¸ˆà¸¸à¸¥à¸—รรศน์
+à¸à¸¥à¹‰à¸­à¸‡à¸•à¸¸à¸”
+à¸à¸¥à¹‰à¸­à¸‡à¹‚ทรทรรศน์
+à¸à¸¥à¸­à¸‡à¹€à¸žà¸¥
+à¸à¸¥à¹‰à¸­à¸‡à¸£à¸°à¸”ับ
+à¸à¸¥à¹‰à¸­à¸‡à¸§à¸±à¸”มุม
+à¸à¸¥à¹‰à¸­à¸‡à¸ªà¸™à¸²à¸¡
+à¸à¸¥à¹‰à¸­à¸‡à¸ªà¸¥à¸±à¸”
+à¸à¸¥à¹‰à¸­à¸‡à¸ªà¹ˆà¸­à¸‡à¸—างไà¸à¸¥
+à¸à¸¥à¹‰à¸­à¸‡à¸ªà¸³à¸£à¸§à¸ˆ
+à¸à¸¥à¸­à¸™
+à¸à¸¥à¹ˆà¸­à¸™
+à¸à¸¥à¹‰à¸­à¸™
+à¸à¸¥à¸­à¸™à¸”้น
+à¸à¸¥à¸­à¸™à¸•à¸¥à¸²à¸”
+à¸à¸¥à¸­à¸™à¸¥à¸´à¸¥à¸´à¸•
+à¸à¸¥à¸­à¸™à¸ªà¸”
+à¸à¸¥à¸­à¸™à¸ªà¸§à¸”
+à¸à¸¥à¸­à¸™à¸ªà¸¸à¸ à¸²à¸ž
+à¸à¸¥à¹ˆà¸­à¸¡
+à¸à¸¥à¹ˆà¸­à¸¡à¹€à¸à¸¥à¸²
+à¸à¸¥à¹ˆà¸­à¸¡à¹€à¸à¸¥à¸µà¹‰à¸¢à¸‡
+à¸à¸¥à¹‰à¸­à¸¡à¹à¸à¸¥à¹‰à¸¡
+à¸à¸¥à¹ˆà¸­à¸¡à¸—้อง
+à¸à¸¥à¹ˆà¸­à¸¡à¸¡à¸”ลูà¸
+à¸à¸¥à¹ˆà¸­à¸¡à¸«à¸­
+à¸à¸¥à¸­à¸¢
+à¸à¸¥à¸­à¸±à¸à¸©à¸£
+à¸à¸¥à¸­à¸¸à¸›à¸à¸£à¸“์
+à¸à¸¥à¸±à¸
+à¸à¸¥à¸±à¸‡
+à¸à¸¥à¸±à¸”
+à¸à¸¥à¸±à¸”à¸à¸¥à¸¸à¹‰à¸¡
+à¸à¸¥à¸±à¸”มัน
+à¸à¸¥à¸±à¹ˆà¸™
+à¸à¸¥à¸±à¹‰à¸™
+à¸à¸¥à¸±à¹ˆà¸™à¸à¸£à¸­à¸‡
+à¸à¸¥à¸±à¹ˆà¸™à¹à¸à¸¥à¹‰à¸‡
+à¸à¸¥à¸±à¹‰à¸™à¹ƒà¸ˆ
+à¸à¸¥à¸±à¸™à¸—
+à¸à¸¥à¸±à¸™à¸—à¸à¹Œ
+à¸à¸¥à¸±à¸š
+à¸à¸¥à¸±à¸šà¸à¸¥à¸­à¸
+à¸à¸¥à¸±à¸šà¸à¸¥à¸²à¸¢
+à¸à¸¥à¸±à¸šà¹€à¸à¸¥à¸·à¸­à¸
+à¸à¸¥à¸±à¸šà¸„ำ
+à¸à¸¥à¸±à¸šà¸„ืน
+à¸à¸¥à¸±à¸šà¸•à¸²à¸¥à¸›à¸±à¸•à¸£
+à¸à¸¥à¸±à¸šà¹€à¸™à¸·à¹‰à¸­à¸à¸¥à¸±à¸šà¸•à¸±à¸§
+à¸à¸¥à¸±à¸šà¹„ปà¸à¸¥à¸±à¸šà¸¡à¸²
+à¸à¸¥à¸±à¸šà¸«à¸™à¹‰à¸²à¸¡à¸·à¸­à¹€à¸›à¹‡à¸™à¸«à¸¥à¸±à¸‡à¸¡à¸·à¸­
+à¸à¸¥à¸±à¸¡à¸žà¸
+à¸à¸¥à¸±à¸¡à¸žà¸£
+à¸à¸¥à¸±à¸¡à¸žà¸±à¸
+à¸à¸¥à¸±à¸§
+à¸à¸¥à¸±à¹‰à¸§
+à¸à¸¥à¸±à¹‰à¸§à¹€à¸à¸¥à¸µà¹‰à¸¢
+à¸à¸¥à¸±à¹‰à¸§à¸„อ
+à¸à¸¥à¸±à¸§à¸™à¹‰à¸³
+à¸à¸¥à¸±à¸§à¸¥à¸²à¸™
+à¸à¸¥à¸²
+à¸à¸¥à¹ˆà¸²
+à¸à¸¥à¹‰à¸²
+à¸à¸¥à¸²à¸
+à¸à¸¥à¸²à¸à¸¥à¸²à¸”
+à¸à¸¥à¸²à¸‡
+à¸à¸¥à¸²à¸‡à¹€à¸à¹ˆà¸²à¸à¸¥à¸²à¸‡à¹ƒà¸«à¸¡à¹ˆ
+à¸à¸¥à¸²à¸‡à¸„น
+à¸à¸¥à¸²à¸‡à¸„ัน
+à¸à¸¥à¸²à¸‡à¸„่ำ
+à¸à¸¥à¸²à¸‡à¸„ืน
+à¸à¸¥à¸²à¸‡à¹à¸ˆà¹‰à¸‡
+à¸à¸¥à¸²à¸‡à¹ƒà¸ˆà¸¡à¸·à¸­
+à¸à¸¥à¸²à¸‡à¸Šà¹‰à¸²à¸‡
+à¸à¸¥à¸²à¸‡à¸”ิน
+à¸à¸¥à¸²à¸‡à¸”ึà¸
+à¸à¸¥à¸²à¸‡à¹€à¸”ือน
+à¸à¸¥à¸²à¸‡à¸—าสี
+à¸à¸¥à¸²à¸‡à¸™à¸­à¸
+à¸à¸¥à¸²à¸‡à¸šà¹‰à¸²à¸™
+à¸à¸¥à¸²à¸‡à¹à¸›à¸¥à¸‡
+à¸à¸¥à¸²à¸‡à¹€à¸¡à¸·à¸­à¸‡
+à¸à¸¥à¸²à¸‡à¸§à¸±à¸™
+à¸à¸¥à¸²à¸‡à¸«à¸²à¸§
+à¸à¸¥à¸²à¸”
+à¸à¸¥à¸²à¸”เà¸à¸¥à¸·à¹ˆà¸­à¸™
+à¸à¸¥à¹‰à¸²à¹„ด้à¸à¸¥à¹‰à¸²à¹€à¸ªà¸µà¸¢
+à¸à¸¥à¹‰à¸²à¸™à¸±à¸à¸¡à¸±à¸à¸šà¸´à¹ˆà¸™
+à¸à¸¥à¸²à¸šà¸²à¸•
+à¸à¸¥à¸²à¸›
+à¸à¸¥à¹‰à¸²à¸¡
+à¸à¸¥à¸²à¸¢
+à¸à¸¥à¹‰à¸²à¸¢
+à¸à¸¥à¸²à¸¢à¸à¸¥à¸­à¸
+à¸à¸¥à¹ˆà¸²à¸§
+à¸à¸¥à¹ˆà¸²à¸§à¹€à¸à¸¥à¸µà¹‰à¸¢à¸‡
+à¸à¸¥à¹ˆà¸²à¸§à¸‚วัà¸
+à¸à¸¥à¹ˆà¸²à¸§à¹‚ทษ
+à¸à¸¥à¹ˆà¸²à¸§à¸«à¸²
+à¸à¸¥à¹ˆà¸²à¸§à¹‚อม
+à¸à¸¥à¸²à¹‚หม
+à¸à¸¥à¹ˆà¸³
+à¸à¸¥à¹‰à¸³
+à¸à¸¥à¹‰à¸³à¸à¸£à¸²à¸¢
+à¸à¸¥à¹‰à¸³à¸à¸¥à¸·à¸™
+à¸à¸¥à¸´à¹ˆà¸‡
+à¸à¸¥à¸´à¹‰à¸‡
+à¸à¸¥à¸´à¹‰à¸‡à¸à¸¥à¸­à¸
+à¸à¸¥à¸´à¹‰à¸‡à¸à¸¥à¸²à¸‡à¸”ง
+à¸à¸¥à¸´à¹‰à¸‡à¹€à¸à¸¥à¸·à¸­à¸
+à¸à¸¥à¸´à¸‡à¸„์
+à¸à¸¥à¸´à¹‰à¸‡à¸„รà¸à¸‚ึ้นเขา
+à¸à¸¥à¸´à¹‰à¸‡à¹€à¸›à¹‡à¸™à¸¥à¸¹à¸à¸¡à¸°à¸™à¸²à¸§
+à¸à¸¥à¸´à¹ˆà¸™
+à¸à¸¥à¸´à¹ˆà¸™à¸­à¸²à¸¢
+à¸à¸¥à¸´à¹‰à¸¡
+à¸à¸¥à¸µ
+à¸à¸¥à¸µà¹ˆ
+à¸à¸¥à¸µà¸š
+à¸à¸¥à¸µà¸šà¸•à¸²
+à¸à¸¥à¸µà¸šà¸šà¸±à¸§
+à¸à¸¥à¸µà¸šà¸«à¸´à¸™
+à¸à¸¥à¸¶à¸‡
+à¸à¸¥à¸¶à¹‰à¸‡
+à¸à¸¥à¸¶à¸‡à¸à¸¥à¹ˆà¸­à¸¡
+à¸à¸¥à¸¶à¸‡à¸„์
+à¸à¸¥à¸·à¸™
+à¸à¸¥à¸·à¸™à¹„ม่เข้าคายไม่ออà¸
+à¸à¸¥à¸¸à¹ˆà¸¡
+à¸à¸¥à¸¸à¹‰à¸¡
+à¸à¸¥à¸¸à¹‰à¸¡à¹ƒà¸ˆ
+à¸à¸¥à¸¸à¹‰à¸¡à¸£à¸¸à¸¡
+à¸à¸¥à¸¸à¹‰à¸¡à¸­à¸à¸à¸¥à¸¸à¹‰à¸¡à¹ƒà¸ˆ
+à¸à¸¥à¸¹à¹ˆ
+à¸à¸¥à¸¹à¹‚คส
+à¸à¸¥à¸¹à¸™
+à¸à¸¥à¸¹à¸™à¹Œ
+à¸à¹€à¸¥à¸§à¸£à¸°
+à¸à¸§à¸”
+à¸à¸§à¸”ขัน
+à¸à¸§à¸™
+à¸à¸§à¸™à¸™à¹‰à¸³à¹ƒà¸«à¹‰à¸‚ุ่น
+à¸à¸§à¸¡
+à¸à¸§à¸¢
+à¸à¸§à¸¢à¸ˆà¸±à¹Šà¸š
+à¸à¸§à¸¢à¸ˆà¸µà¹Š
+à¸à¹‹à¸§à¸¢à¹€à¸•à¸µà¹‹à¸¢à¸§
+à¸à¸§à¸°
+à¸à¸§à¸°à¸à¸§à¸±à¸
+à¸à¸§à¸°à¹à¸à¸§à¹ˆà¸‡
+à¸à¸§à¸±à¸
+à¸à¸§à¸±à¸”
+à¸à¸§à¸±à¸”à¹à¸à¸§à¹ˆà¸‡
+à¸à¸§à¸±à¸”ไà¸à¸§
+à¸à¸§à¸±à¸”ไà¸à¸§à¹„สส่ง
+à¸à¸§à¸²
+à¸à¸§à¹ˆà¸²
+à¸à¸§à¹‰à¸²
+à¸à¸§à¸²à¸‡
+à¸à¸§à¹ˆà¸²à¸‡
+à¸à¸§à¹‰à¸²à¸‡
+à¸à¸§à¹‰à¸²à¸‡à¸‚วาง
+à¸à¸§à¸²à¸‡à¹€à¸‚น
+à¸à¸§à¸²à¸‡à¹à¸‚ม
+à¸à¸§à¸²à¸‡à¸ˆà¸¸à¸
+à¸à¸§à¸²à¸‡à¹‚จน
+à¸à¸§à¹ˆà¸²à¸‡à¸Šà¸™
+à¸à¸§à¸²à¸‡à¸Šà¸°à¸¡à¸”
+à¸à¸§à¹ˆà¸²à¸‡à¹‚ซ้ง
+à¸à¸§à¸²à¸‡à¹€à¸”ินดง
+à¸à¸§à¸²à¸‡à¸•à¸¸à¹‰à¸‡
+à¸à¸§à¸²à¸‡à¸—ราย
+à¸à¸§à¸²à¸‡à¸—อง
+à¸à¸§à¸²à¸‡à¸›à¹ˆà¸²
+à¸à¸§à¸²à¸‡à¸¡à¹‰à¸²
+à¸à¸§à¹‰à¸²à¸‡à¹ƒà¸«à¸à¹ˆ
+à¸à¸§à¹ˆà¸²à¸Šà¸·à¹ˆà¸™
+à¸à¸§à¸²à¸”
+à¸à¸§à¸²à¸”ต้อน
+à¸à¸§à¸²à¸”ตา
+à¸à¸§à¸²à¸”ล้าง
+à¸à¸§à¸²à¸™
+à¸à¸§à¹ˆà¸²à¸™
+à¸à¸§à¹‰à¸²à¸™
+à¸à¸§à¹Šà¸²à¸™
+à¸à¸§à¹ˆà¸²à¹€à¸žà¸·à¹ˆà¸­à¸™
+à¸à¸§à¹‰à¸²à¸§
+à¸à¸§à¸²à¸§à¹€à¸„รือ
+à¸à¸§à¸´à¸™
+à¸à¸§à¸µ
+à¸à¸§à¸µà¸™à¸´à¸žà¸™à¸˜à¹Œ
+à¸à¸©à¸“ะ
+à¸à¸©à¸¡à¸²
+à¸à¸©à¸±à¸•à¸£
+à¸à¸©à¸±à¸•à¸£à¸²
+à¸à¸©à¸±à¸•à¸£à¸²à¸˜à¸´à¸£à¸²à¸Š
+à¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ
+à¸à¸©à¸±à¸•à¸£à¸´à¸¢à¸Šà¸²à¸•à¸´
+à¸à¸©à¸±à¸•à¸£à¸µ
+à¸à¸©à¸±à¸•à¸£à¸µà¸¢à¹Œ
+à¸à¸©à¸±à¸•à¸£à¸µà¸¨à¸¹à¸£
+à¸à¸©à¸±à¸¢
+à¸à¸©à¸±à¸¢-
+à¸à¸©à¸±à¸¢à¸à¸¥à¹ˆà¸­à¸™
+à¸à¸©à¸±à¸¢à¸à¸²à¸£
+à¸à¸©à¸±à¸¢à¸™à¹‰à¸³
+à¸à¸©à¸±à¸¢à¹€à¸¥à¸·à¸­à¸”
+à¸à¸©à¸²à¸›à¸“์
+à¸à¸©à¸´à¸”ิ
+à¸à¸©à¸µà¸“าศรพ
+à¸à¸©à¸µà¸”ิ
+à¸à¸©à¸µà¸£
+à¸à¸©à¸µà¸£-
+à¸à¸©à¸µà¸£à¸˜à¸²à¸£à¸²
+à¸à¸©à¸µà¸£à¸£à¸ª
+à¸à¸©à¸µà¸£à¸²à¸¡à¸žà¸¸
+à¸à¸©à¸µà¸£à¸²à¸£à¸“พ
+à¸à¸ªà¸²à¸™à¸•à¸´à¹Œ
+à¸à¸ªà¸´
+à¸à¸ªà¸´à¸à¸£
+à¸à¸ªà¸´à¸à¸£à¸£à¸¡
+à¸à¸ªà¸´à¸“
+à¸à¸«à¸±à¸‡à¸›à¸²à¸¢à¸²
+ภหัน
+à¸à¸«à¸²à¸›à¸“ะ
+à¸à¹‡à¹à¸«à¸¥à¸°
+à¸à¹€à¸¬à¸§à¸£à¸²à¸
+à¸à¸­
+à¸à¹ˆà¸­
+à¸à¹‰à¸­
+à¸à¹Šà¸­
+à¸à¸­à¸
+à¸à¹Šà¸­à¸
+à¸à¹ˆà¸­à¸à¸£à¸£à¸¡à¸—ำเข็à¸
+à¸à¹ˆà¸­à¸à¸§à¸™
+à¸à¹ˆà¸­à¸à¸²à¸£
+à¸à¸­à¹à¸
+à¸à¸­à¸‡
+à¸à¹ˆà¸­à¸‡
+à¸à¹‰à¸­à¸‡
+à¸à¸­à¸‡à¸à¸¥à¸²à¸‡
+à¸à¸­à¸‡à¸à¸­à¸¢
+à¸à¸­à¸‡à¸à¸¹à¸“ฑ์
+à¸à¸­à¸‡à¹€à¸à¸´à¸™
+à¸à¸­à¸‡à¹€à¸à¸µà¸¢à¸£à¸•à¸´à¸¢à¸¨
+à¸à¸­à¸‡à¸‚้าว
+à¸à¸­à¸‡à¹‚จร
+à¸à¸­à¸‡à¸—ัพ
+à¸à¸­à¸‡à¸—ัพน้อย
+à¸à¸­à¸‡à¸—ุน
+à¸à¸­à¸‡à¸žà¸¥
+à¸à¸­à¸‡à¸žà¸±à¸™
+à¸à¸­à¸‡à¸Ÿà¸­à¸™
+à¸à¸­à¸‡à¸¡à¸£à¸”à¸
+à¸à¸­à¸‡à¸£à¹‰à¸­à¸¢
+à¸à¸­à¸‡à¸«à¸™à¸¸à¸™
+à¸à¸­à¸‹
+à¸à¸­à¸”
+à¸à¸­à¸”à¹à¸‚้งà¸à¸­à¸”ขา
+à¸à¸­à¸”มือà¸à¸­à¸”ตีน
+à¸à¸­à¸”อà¸
+à¸à¹ˆà¸­à¸•à¸±à¹‰à¸‡
+à¸à¹ˆà¸­à¸™
+à¸à¹‰à¸­à¸™
+à¸à¹‰à¸­à¸™à¸‚ี้หมา
+à¸à¹‰à¸­à¸™à¹€à¸ªà¹‰à¸²
+à¸à¸­à¸š
+à¸à¸­à¸šà¹‚à¸à¸¢
+à¸à¸­à¸šà¸”้วย
+à¸à¸­à¸šà¸™à¸²à¸‡
+à¸à¹Šà¸­à¸šà¸›à¸µà¹‰
+à¸à¸­à¸›à¸£
+à¸à¹‰à¸­à¸¡
+à¸à¸­à¸¡à¸à¹‰à¸­
+à¸à¹ˆà¸­à¸¡à¸à¹‰à¸­
+à¸à¸­à¸¢
+à¸à¹‰à¸­à¸¢
+à¸à¹‹à¸­à¸¢
+à¸à¹‰à¸­à¸£à¹ˆà¸­
+à¸à¹‰à¸­à¸£à¹ˆà¸­à¸à¹‰à¸­à¸•à¸´à¸
+à¸à¹ˆà¸­à¸£à¹ˆà¸²à¸‡à¸ªà¸£à¹‰à¸²à¸‡à¸•à¸±à¸§
+à¸à¸­à¸£à¸´à¸¥à¸¥à¸²
+à¸à¹ˆà¸­à¸¤à¸à¸©à¹Œ
+à¸à¸­à¸¥à¹Œà¸Ÿ
+à¸à¹ˆà¸­à¹à¸¥à¹‰à¸§à¸•à¹‰à¸­à¸‡à¸ªà¸²à¸™
+à¸à¸­à¹à¸¥à¸°
+à¸à¹ˆà¸­à¸ªà¸£à¹‰à¸²à¸‡
+à¸à¹ˆà¸­à¸«à¸§à¸­à¸”
+à¸à¸­à¹€à¸­à¸µà¹Šà¸¢à¸°
+à¸à¸°
+à¸à¸°à¸à¸£à¹ˆà¸­à¸¡
+à¸à¸°à¸à¸£à¹‰à¸²à¸§
+à¸à¸°à¸à¸¥à¸´à¹‰à¸‡
+à¸à¸°à¸à¹ˆà¸­à¸‡
+à¸à¸°à¸à¸±à¸‡
+à¸à¸°à¸à¸¶à¸
+à¸à¸°à¹€à¸à¸“ฑ์
+à¸à¸°à¹€à¸à¸²à¸°
+à¸à¸°à¹‚à¸à¸£à¸°
+à¸à¸°à¸‡à¹‰à¸­à¸™à¸à¸°à¹à¸‡à¹‰à¸™
+à¸à¸°à¸ˆà¸±à¸‡
+à¸à¸°à¹à¸ˆà¸°
+à¸à¸°à¸Šà¸°
+à¸à¸°à¸Šà¸±à¸‡
+à¸à¸°à¸Šà¸²à¸¡à¸²à¸¨
+à¸à¸°à¸Šà¸´à¸‡
+à¸à¸°à¸Šà¸¶à¹ˆà¸à¸à¸°à¸Šà¸±à¹ˆà¸
+à¸à¸°à¹à¸Šà¹ˆ
+à¸à¸°à¸‹à¸§à¸
+à¸à¸°à¸‹à¹‰à¸²à¸«à¸­à¸¢
+à¸à¸°à¸‹à¸µà¹ˆ
+à¸à¸°à¹‚ซ่
+à¸à¸°à¹‚ซ้
+à¸à¸°à¸”à¸
+à¸à¸°à¸”ง
+à¸à¸°à¸”วน
+à¸à¸°à¸”อà¸à¹†
+à¸à¸°à¸”ะ
+à¸à¸°à¸”ังบาย
+à¸à¸°à¸”ัด
+à¸à¸°à¸”้าง
+à¸à¸°à¸”ำà¸à¸°à¸”่าง
+à¸à¸°à¸”ี
+à¸à¸°à¸”ี่
+à¸à¸°à¸”ุ้ง
+à¸à¸°à¹€à¸”้
+à¸à¸°à¹€à¸”à¸
+à¸à¸°à¹€à¸”ี๋ยว
+à¸à¸°à¹„ด
+à¸à¸°à¸•à¸£à¸¸à¸”
+à¸à¸°à¸•à¸­à¸
+à¸à¸°à¸•à¹ˆà¸­à¸¢
+à¸à¸°à¸•à¸±à¸
+à¸à¸°à¸•à¸±à¸‡
+à¸à¸°à¸•à¸±à¸‡à¸à¸°à¸•à¸´à¹‰à¸§
+à¸à¸°à¸•à¸±à¸‡à¹ƒà¸š
+à¸à¸°à¸•à¸±à¸‡à¸¡à¸¹à¸•à¸£
+à¸à¸°à¸•à¹ˆà¸²
+à¸à¸°à¸•à¹Šà¸²à¸
+à¸à¸°à¸•à¹‰à¸³
+à¸à¸°à¸•à¸´à¹Šà¸à¸£à¸´à¸
+à¸à¸°à¸•à¸´à¸‡à¸à¸°à¹à¸•à¸‡
+à¸à¸°à¸•à¸µà¸š
+à¸à¸°à¸•à¸¶à¸‡à¸à¸°à¹à¸•à¸‡
+à¸à¸°à¸•à¸¸à¹Šà¸
+à¸à¸°à¸•à¸¸à¸”
+à¸à¸°à¸•à¸¸à¸¡à¸¹
+à¸à¸°à¸•à¸¹à¸
+à¸à¸°à¹€à¸•à¸
+à¸à¸°à¹€à¸•à¸‡à¹†
+à¸à¸°à¹€à¸•à¸‡à¹€à¸£à¸‡
+à¸à¸°à¹à¸•à¸§
+à¸à¸°à¹à¸•à¹ˆà¸§
+à¸à¸°à¹‚ต๊à¸
+à¸à¸°à¹‚ตงà¸à¸°à¹€à¸•à¸‡
+à¸à¸°à¹‚ต้งโห่ง
+à¸à¸°à¸–ัว
+à¸à¸°à¸—à¸à¸£à¸
+à¸à¸°à¸—อ
+à¸à¸°à¸—ัง
+à¸à¸°à¸—ังหัน
+à¸à¸°à¸—ัดรัด
+à¸à¸°à¸—ัน
+à¸à¸°à¸—ันหัน
+à¸à¸°à¸—ับ
+à¸à¸°à¸—ำ
+à¸à¸°à¸—ิ
+à¸à¸°à¸—ิขูด
+à¸à¸°à¸—ือ
+à¸à¸°à¸—ุน
+à¸à¸°à¹€à¸—ย
+à¸à¸°à¹€à¸—ยนางหมั่น
+à¸à¸°à¹€à¸—าะ
+à¸à¸°à¹à¸—้
+à¸à¸°à¹à¸—่ง
+à¸à¸°à¹à¸—น
+à¸à¸°à¸™à¸§à¸¥
+à¸à¸°à¸™à¸±à¸”
+à¸à¸°à¸šà¸­à¸™à¸à¸°à¸šà¸¶à¸‡
+à¸à¸°à¸šà¹ˆà¸­à¸™à¸à¸°à¹à¸šà¹ˆà¸™
+à¸à¸°à¸šà¸±à¸‡
+à¸à¸°à¸šà¸±à¹‰à¸‡
+à¸à¸°à¸šà¸±à¸‡à¸£à¸±à¸‡à¹€à¸à¸·à¸­à¸
+à¸à¸°à¸šà¸±à¸‡à¸¥à¸¡
+à¸à¸°à¸šà¸±à¸‡à¸«à¸™à¹‰à¸²
+à¸à¸°à¸šà¸´à¹‰à¸‡
+à¸à¸°à¸šà¸´à¸¥
+à¸à¸°à¸šà¸¶à¸‡à¸à¸°à¸šà¸­à¸™
+à¸à¸°à¸šà¸¸à¸”
+à¸à¸°à¹€à¸šà¹‰à¸­
+à¸à¸°à¹€à¸šà¸µà¸¢à¸™
+à¸à¸°à¹€à¸šà¸·à¸­
+à¸à¸°à¸›à¸£à¸´à¸”à¸à¸°à¸›à¸£à¸­à¸¢
+à¸à¸°à¸›à¸£à¸´à¸š
+à¸à¸°à¸›à¸£à¸´à¸šà¸à¸°à¸›à¸£à¸­à¸¢
+à¸à¸°à¸›à¸¥à¸à¸à¸°à¹€à¸›à¸¥à¸µà¹‰à¸¢
+à¸à¸°à¸›à¸§à¸à¸à¸°à¹€à¸›à¸µà¸¢à¸
+à¸à¸°à¸›à¸­à¸¡
+à¸à¸°à¸›à¸­à¸¡à¸‚าง
+à¸à¸°à¸›à¸°
+à¸à¸°à¸›à¸±à¹ˆà¸™
+à¸à¸°à¸›à¹‰à¸³à¸à¸°à¹€à¸›à¹‹à¸­
+à¸à¸°à¸›à¸´
+à¸à¸°à¸›à¸¹
+à¸à¸°à¸›à¸¹à¸”
+à¸à¸°à¸›à¸¹à¸”หลูด
+à¸à¸°à¹€à¸›à¸°
+à¸à¸°à¹€à¸›à¸´à¹Šà¸šà¸à¸°à¸›à¹Šà¸²à¸š
+à¸à¸°à¹€à¸›à¸µà¸¢à¸”
+à¸à¸°à¹à¸›à¹‰à¸™
+à¸à¸°à¹à¸›à¸°
+à¸à¸°à¹‚ปรง
+à¸à¸°à¹‚ปโล
+à¸à¸°à¸œà¸¥à¸¸à¸šà¸à¸°à¹‚ผล่
+à¸à¸°à¹€à¸œà¹ˆà¸™
+à¸à¸°à¹€à¸œà¸¥à¸
+à¸à¸°à¹‚ผลà¸à¸à¸°à¹€à¸œà¸¥à¸
+à¸à¸°à¸žà¸‡
+à¸à¸°à¸žà¸£à¸§à¸”à¸à¸°à¸žà¸£à¸²à¸”
+à¸à¸°à¸žà¸£à¹ˆà¸­à¸‡à¸à¸°à¹à¸žà¸£à¹ˆà¸‡
+à¸à¸°à¸žà¸£à¸´à¸š
+à¸à¸°à¸žà¸£à¸¸à¸™
+à¸à¸°à¸žà¸£à¸¹à¸”à¸à¸°à¸žà¸£à¸²à¸”
+à¸à¸°à¸žà¸¥à¹‰à¸­
+à¸à¸°à¸žà¸¥à¹ˆà¸­à¸‡à¸à¸°à¹à¸žà¸¥à¹ˆà¸‡
+à¸à¸°à¸žà¹‰à¸­
+à¸à¸°à¹€à¸žà¸£à¸²
+à¸à¸°à¹€à¸žà¸µà¸¢à¸”
+à¸à¸°à¹€à¸žà¸µà¸¢à¸”ช้าง
+à¸à¸°à¹€à¸žà¸µà¸¢à¸”หนู
+à¸à¸°à¸¡à¸‡
+à¸à¸°à¸¡à¹ˆà¸‡
+à¸à¸°à¹€à¸¡à¹‡à¸‡
+à¸à¸°à¹€à¸¡à¹‡à¸‡à¸•à¸±à¸§à¸œà¸¹à¹‰
+à¸à¸°à¹€à¸¡à¸µà¸¢
+à¸à¸°à¸¢à¸¸
+à¸à¸°à¸£à¹ˆà¸­à¸‡à¸à¸°à¹à¸£à¹ˆà¸‡
+à¸à¸°à¸£à¸°à¸•à¸°
+à¸à¸°à¸£à¸°à¸«à¸™à¸°
+à¸à¸°à¸£à¸±à¸‡
+à¸à¸°à¸£à¸±à¸•
+à¸à¸°à¸£à¸±à¸•à¸«à¸¥à¸§à¸‡
+à¸à¸°à¸£à¸²à¸‡
+à¸à¸°à¸£à¸²à¸‡à¸«à¸±à¸§à¸‚วาน
+à¸à¸°à¸£à¸´à¸‡
+à¸à¸°à¸£à¸´à¸‡à¸à¸°à¹€à¸£à¸µà¸¢à¸”
+à¸à¸°à¸£à¸¸à¸‡à¸à¸°à¸£à¸±à¸‡
+à¸à¸°à¸£à¸¸à¹ˆà¸‡à¸à¸°à¸£à¸´à¹ˆà¸‡
+à¸à¸°à¸£à¸¸à¸™
+à¸à¸°à¹€à¸£
+à¸à¸°à¹€à¸£à¸à¸°à¸£à¹ˆà¸­à¸™
+à¸à¸°à¹€à¸£à¹ˆà¸à¸°à¸£à¹ˆà¸­à¸™
+à¸à¸°à¹€à¸£à¹ˆà¸­
+à¸à¸°à¹€à¸£à¹ˆà¸­à¸à¸°à¸£à¹ˆà¸²
+à¸à¸°à¹€à¸£à¸µà¹ˆà¸¢à¸à¸°à¸£à¸²à¸”
+à¸à¸°à¹‚รà¸à¸°à¹€à¸£
+à¸à¸°à¸¥à¸§à¸¢
+à¸à¸°à¸¥à¸­
+à¸à¸°à¸¥à¹ˆà¸­à¸à¸°à¹à¸¥à¹ˆ
+à¸à¸°à¸¥à¸­à¸ˆà¸µà¹Š
+à¸à¸°à¸¥à¹ˆà¸­à¸™
+à¸à¸°à¸¥à¹ˆà¸­à¸¡à¸à¸°à¹à¸¥à¹ˆà¸¡
+à¸à¸°à¸¥à¹ˆà¸­à¸¢à¸à¸°à¸«à¸¥à¸´à¸š
+à¸à¸°à¸¥à¸°à¸›à¸±à¸‡à¸«à¸²
+à¸à¸°à¸¥à¸°à¸¡à¸±à¸‡
+à¸à¸°à¸¥à¸°à¹à¸¡
+à¸à¸°à¸¥à¸°à¸­à¸­à¸¡
+à¸à¸°à¸¥à¸±à¸‡à¸•à¸±à¸‡à¹„à¸à¹ˆ
+à¸à¸°à¸¥à¸±à¸™
+à¸à¸°à¸¥à¸±à¸™à¸—า
+à¸à¸°à¸¥à¸²
+à¸à¸°à¸¥à¸²à¸‡
+à¸à¸°à¸¥à¸²à¸‹à¸­
+à¸à¸°à¸¥à¸²à¸ªà¸µ
+à¸à¸°à¸¥à¸³à¸žà¸­
+à¸à¸°à¸¥à¸´à¸‡
+à¸à¸°à¸¥à¸´à¸‡à¸›à¸¥à¸´à¸‡
+à¸à¸°à¸¥à¸´à¹‰à¸¡à¸à¸°à¹€à¸«à¸¥à¸µà¹ˆà¸¢
+à¸à¸°à¸¥à¸´à¸­à¹ˆà¸­à¸‡
+à¸à¸°à¸¥à¸¸à¸¡à¸žà¸µ
+à¸à¸°à¹€à¸¥à¹‡à¸‡
+à¸à¸°à¹€à¸¥à¹ˆà¸­à¸à¸°à¸¥à¹ˆà¸²
+à¸à¸°à¹€à¸¥à¸´à¸”
+à¸à¸°à¹€à¸¥à¸µà¸¢à¸§
+à¸à¸°à¹à¸¥
+à¸à¸°à¹‚ล่
+à¸à¸°à¹‚ลง
+à¸à¸°à¸§à¸­à¸à¸à¸°à¹à¸§à¸
+à¸à¸°à¸§à¸°
+à¸à¸°à¸ªà¹‰à¸¡à¸Šà¸·à¹ˆà¸™
+à¸à¸°à¸ªà¹‰à¸²à¸«à¸­à¸¢
+à¸à¸°à¸«à¸™à¸­à¸à¸°à¹à¸«à¸™
+à¸à¸°à¸«à¸™à¹‡à¸­à¸‡à¸à¸°à¹à¸«à¸™à¹‡à¸‡
+à¸à¸°à¸«à¸™à¸°
+à¸à¸°à¸«à¸™à¸¸à¸‡à¸à¸°à¸«à¸™à¸´à¸‡
+à¸à¸°à¸«à¸¡à¸­à¸
+à¸à¸°à¸«à¸£à¹ˆà¸­à¸‡
+à¸à¸°à¸«à¸£à¸­à¸”
+à¸à¸°à¸«à¸£à¹‡à¸­à¸¡à¸à¸°à¹à¸«à¸£à¹‡à¸¡
+à¸à¸°à¸«à¸£à¸²à¸™
+à¸à¸°à¸«à¸£à¸µà¹ˆ
+à¸à¸°à¸«à¸£à¸µà¹ˆà¸›à¸±à¹Šà¸š
+à¸à¸°à¸«à¸¥à¸²à¸›à¹‹à¸²
+à¸à¸°à¸«à¸¥à¹ˆà¸³
+à¸à¸°à¸«à¸¥à¸µà¹ˆ
+à¸à¸°à¸«à¸¥à¸µà¸à¸°à¸«à¸¥à¸­
+à¸à¸°à¸«à¸¥à¸¸à¸à¸à¸°à¸«à¸¥à¸´à¸
+à¸à¸°à¸«à¸³
+à¸à¸°à¸«à¸³à¹à¸žà¸°
+à¸à¸°à¸«à¸·à¸­
+à¸à¸°à¸«à¸¹à¸”
+à¸à¸°à¹€à¸«à¸£à¸µà¹ˆà¸¢à¸‡
+à¸à¸°à¹€à¸«à¸¥à¸²à¸°à¹€à¸›à¸²à¸°
+à¸à¸°à¹à¸«à¸¢à¸
+à¸à¸°à¹à¸«à¸°
+à¸à¸°à¹‚หลà¸
+à¸à¸°à¹‚หล้ง
+à¸à¸°à¹„หล่
+à¸à¸°à¸­à¸§à¸¡
+à¸à¸°à¸­à¸­à¸¡
+à¸à¸°à¸­à¸²à¸™
+à¸à¸°à¸­à¸²à¸¡
+à¸à¸°à¸­à¸´à¸”
+à¸à¸°à¸­à¸¸à¸š
+à¸à¸°à¹€à¸­à¸§
+à¸à¸°à¹à¸­
+à¸à¸°à¹à¸­à¸™
+à¸à¸±à¸
+à¸à¸±à¹Šà¸
+à¸à¸±à¸à¸à¸£à¸²
+à¸à¸±à¸à¸à¸±à¸™
+à¸à¸±à¸à¸à¸²à¸£à¸¸
+à¸à¸±à¸à¸‚ฬะ
+à¸à¸±à¸à¸‚ัง
+à¸à¸±à¸à¸„ุม
+à¸à¸±à¸à¸”่าน
+à¸à¸±à¸à¸•à¸±à¸§
+à¸à¸±à¸à¸•à¸¸à¸™
+à¸à¸±à¸à¸šà¸£à¸´à¹€à¸§à¸“
+à¸à¸±à¸‡
+à¸à¸±à¹‰à¸‡
+à¸à¸±à¸‡à¸
+à¸à¸±à¹‰à¸‡à¸à¸£à¸°à¸”าน
+à¸à¸±à¸‡à¸à¹‰à¸²
+à¸à¸±à¸‡à¹€à¸à¸µà¸¢à¸‡
+à¸à¸±à¸‡à¸‚า
+à¸à¸±à¸‡à¸‰à¸´à¸™
+à¸à¸±à¸‡à¸Ÿà¸¹
+à¸à¸±à¸‡à¸§à¸¥
+à¸à¸±à¸‡à¸§à¸²à¸™
+à¸à¸±à¸‡à¹€à¸§à¸µà¸¢à¸™
+à¸à¸±à¸‡à¸ª
+à¸à¸±à¸‡à¸ªà¸”าล
+à¸à¸±à¸‡à¹„ส
+à¸à¸±à¸‡à¸«à¸±à¸™
+à¸à¸±à¸‡à¸«à¸±à¸™à¹ƒà¸šà¸žà¸±à¸”
+à¸à¸±à¸‡à¸«à¸±à¸™à¹„อพ่น
+à¸à¸±à¸ˆà¸‰à¸›à¸°
+à¸à¸±à¸ˆà¸‰à¸°
+à¸à¸±à¸ˆà¸‰à¸²
+à¸à¸±à¸
+à¸à¸±à¸à¸ˆà¸¸à¸
+à¸à¸±à¸à¸ˆà¸¸à¸à¸²à¸£à¸²
+à¸à¸±à¸à¸Šà¸²
+à¸à¸±à¸à¸à¸²
+à¸à¸±à¸
+à¸à¸±à¸“à¸à¸à¸°
+à¸à¸±à¸“à¸-
+à¸à¸±à¸“à¸à¸
+à¸à¸±à¸“à¸à¸à¸°
+à¸à¸±à¸“à¸à¸Šà¸°
+à¸à¸±à¸“à¸à¸±à¸¨
+à¸à¸±à¸“à¸à¸±à¸¨à¸§à¹Œ
+à¸à¸±à¸“à¸à¸²
+à¸à¸±à¸“à¸à¸µ
+à¸à¸±à¸“ฑ์
+à¸à¸±à¸“ฑ์เทศน์
+à¸à¸±à¸“ณ์
+à¸à¸±à¸“ห-
+à¸à¸±à¸“หธรรม
+à¸à¸±à¸“หปัà¸à¸©à¹Œ
+à¸à¸±à¸”
+à¸à¸±à¸”ป่า
+à¸à¸±à¸”ฟัน
+à¸à¸±à¸”ลาà¸
+à¸à¸±à¸”วาง
+à¸à¸±à¸”หางตัวเอง
+à¸à¸±à¸•à¸•à¸´à¸à¸¡à¸²à¸ª
+à¸à¸±à¸•à¸•à¸´à¸à¸²
+à¸à¸±à¸•à¸•à¸´à¹€à¸à¸¢à¸²
+à¸à¸±à¸•à¸£à¸—ัณฑ์
+à¸à¸±à¸•à¸£à¸²
+à¸à¸±à¸—ลี
+à¸à¸±à¸™
+à¸à¸±à¹ˆà¸™
+à¸à¸±à¹‰à¸™
+à¸à¸±à¸™à¸à¸‡
+à¸à¸±à¹‰à¸™à¸à¸²à¸‡
+à¸à¸±à¸™à¹€à¸à¸£à¸²
+à¸à¸±à¸™à¹„à¸à¸£
+à¸à¸±à¸™à¹€à¸‚าà¸à¸±à¸™à¹€à¸£à¸²
+à¸à¸±à¸™à¸Šà¸™
+à¸à¸±à¸™à¸Šà¸´à¸‡
+à¸à¸±à¸™à¸Šà¸µà¸ž
+à¸à¸±à¸™à¹€à¸Šà¸­
+à¸à¸±à¹‰à¸™à¸‹à¸¹à¹ˆ
+à¸à¸±à¸™à¹à¸‹à¸‡
+à¸à¸±à¸™à¸”อง
+à¸à¸±à¸™à¸”าร
+à¸à¸±à¸™à¸”าล
+à¸à¸±à¸™à¹à¸”ด
+à¸à¸±à¸™à¹„ด
+à¸à¸±à¸™à¸•à¹Œ
+à¸à¸±à¸™à¸•à¸±à¸‡
+à¸à¸±à¸™à¸•à¸±à¸§
+à¸à¸±à¸™à¹„ตร
+à¸à¸±à¸™à¸—ร
+à¸à¸±à¸™à¸—ราà¸à¸£
+à¸à¸±à¸™à¸—ะ
+à¸à¸±à¸™à¸—่า
+à¸à¸±à¸™à¹à¸—รà¸
+à¸à¸±à¹‰à¸™à¸šà¸±à¸‡
+à¸à¸±à¸™à¸žà¸´à¸£à¸¸à¸“
+à¸à¸±à¸™à¸ à¸±à¸¢
+à¸à¸±à¸™à¸ à¸´à¸£à¸¡à¸¢à¹Œ
+à¸à¸±à¸™à¹€à¸¡à¸µà¸¢à¸‡
+à¸à¸±à¸™à¸¢à¹Œ
+à¸à¸±à¸™à¸¢à¸²
+à¸à¸±à¸™à¸¢à¸²à¸¢à¸™
+à¸à¸±à¸™à¸¥à¸‡
+à¸à¸±à¸™à¸¥à¸­à¸‡
+à¸à¸±à¸™à¸¥à¸¶à¸‡
+à¸à¸±à¸™à¹à¸¥à¸°à¸à¸±à¸™
+à¸à¸±à¸™à¸ªà¸²à¸”
+à¸à¸±à¸™à¹à¸ªà¸‡
+à¸à¸±à¹‰à¸™à¸«à¸¢à¸±à¹ˆà¸™
+à¸à¸±à¸™à¹€à¸­à¸‡
+à¸à¸±à¸™à¹€à¸­à¸²
+à¸à¸±à¸š
+à¸à¸±à¸šà¹à¸à¹‰
+à¸à¸±à¸šà¹à¸à¸¥à¹‰à¸¡
+à¸à¸±à¸šà¸‚้าว
+à¸à¸±à¸šà¸šà¸¸à¹€à¸£à¸¨
+à¸à¸±à¸šà¸£à¸°à¹€à¸šà¸´à¸”
+à¸à¸±à¸›
+à¸à¸±à¸›à¸•à¸±à¸™
+à¸à¸±à¸›à¸™à¸
+à¸à¸±à¸›à¸šà¸²à¸ªà¸´à¸
+à¸à¸±à¸›à¸›à¸²à¸ªà¸´à¸
+à¸à¸±à¸›à¸›à¸´à¸¢-
+à¸à¸±à¸›à¸›à¸´à¸¢à¸à¸²à¸£à¸
+à¸à¸±à¸›à¸›à¸´à¸¢à¸ à¸±à¸“ฑ์
+à¸à¸±à¸›à¸›à¸´à¸¢à¹‚วหาร
+à¸à¸±à¸›à¸›à¸´à¸¢à¸°
+à¸à¸±à¸›à¸›à¸µà¸¢à¹Œ
+à¸à¸±à¸¡à¸šà¸™
+à¸à¸±à¸¡à¸›-
+à¸à¸±à¸¡à¸›à¸™-
+à¸à¸±à¸¡à¸›à¸™à¸²à¸à¸²à¸£
+à¸à¸±à¸¡à¸›à¸™à¸²à¸—
+à¸à¸±à¸¡à¸›à¸£à¸°à¹‚ด
+à¸à¸±à¸¡à¸›à¸µ
+à¸à¸±à¸¡à¸žà¸¥
+à¸à¸±à¸¡à¸žà¸¸à¸Š
+à¸à¸±à¸¡à¸žà¸¸à¸Š-
+à¸à¸±à¸¡à¸žà¸¸à¸Šà¸žà¸²à¸à¸¢à¹Œ
+à¸à¸±à¸¡à¸žà¸¹
+à¸à¸±à¸¡à¸žà¸¹à¸Šà¸²
+à¸à¸±à¸¡à¹‚พช
+à¸à¸±à¸¡à¸¡à¸±à¸Šà¸§à¸²à¸•
+à¸à¸±à¸¡à¸¡à¸±à¸à¸à¸²à¸™
+à¸à¸±à¸¡à¸¡à¸±à¸™à¸•à¸ à¸²à¸žà¸£à¸±à¸‡à¸ªà¸µ
+à¸à¸±à¸¡à¸¡à¸±à¸™à¸•à¸£à¸±à¸‡à¸ªà¸µ
+à¸à¸±à¸¡à¸¡à¸²à¸£
+à¸à¸±à¸¡à¸¥à¸²à¸¨
+à¸à¸±à¸¢à¸§à¸´à¸à¸±à¸¢
+à¸à¸±à¸¥à¸Šà¸²à¸
+à¸à¸±à¸¥à¸šà¸
+à¸à¸±à¸¥à¸›-
+à¸à¸±à¸¥à¸›à¹Œ
+à¸à¸±à¸¥à¸›à¸™à¸²
+à¸à¸±à¸¥à¸›à¸žà¸¤à¸à¸©à¹Œ
+à¸à¸±à¸¥à¸›à¸±à¸‡à¸«à¸²
+à¸à¸±à¸¥à¸›à¸²à¸§à¸ªà¸²à¸™
+à¸à¸±à¸¥à¸›à¸´à¸•
+à¸à¸±à¸¥à¸žà¸¸à¸¡
+à¸à¸±à¸¥à¹€à¸¡à¹‡à¸”
+à¸à¸±à¸¥à¸¢à¸²
+à¸à¸±à¸¥à¸¢à¸²à¸“-
+à¸à¸±à¸¥à¸¢à¸²à¸“มิตร
+à¸à¸±à¸¥à¸¢à¸²à¸“ี
+à¸à¸±à¸¥à¸¢à¸²à¹€à¸¢à¸µà¹ˆà¸¢à¸¡à¸«à¹‰à¸­à¸‡
+à¸à¸±à¸¥à¹€à¸§à¹‰à¸²
+à¸à¸±à¸¥à¸«à¸²à¸¢
+à¸à¸±à¸¥à¹‚หย
+à¸à¸±à¸¥à¸­à¸­à¸¡
+à¸à¸±à¸¥à¹€à¸­à¸²
+à¸à¸±à¸¨à¸¡à¸¥
+à¸à¸±à¸¨à¸¢à¸›
+à¸à¸±à¸©à¸“
+à¸à¸²
+à¸à¹‹à¸²
+à¸à¸²à¸
+à¸à¸²à¸-
+à¸à¸²à¸à¸à¸°à¸£à¸¸à¸™
+à¸à¸²à¸à¸‚ยาà¸
+à¸à¸²à¸à¸‚้าว
+à¸à¸²à¸à¸„ติ
+à¸à¸²à¸à¸“ึà¸
+à¸à¸²à¸à¸šà¸²à¸—
+à¸à¸²à¸à¹€à¸žà¸Šà¸£
+à¸à¸²à¸à¸ à¸²à¸©à¸²
+à¸à¸²à¸à¸£à¸¸à¸™
+à¸à¸²à¸à¸«à¸¡à¸¹
+à¸à¸²à¸à¸°à¸—ิง
+à¸à¸²à¸à¸°à¹€à¸¢à¸µà¸¢
+à¸à¹‹à¸²à¸à¸±à¹ˆà¸™
+à¸à¸²à¸à¸µ
+à¸à¸²à¸à¸µà¹à¸à¸¡à¹€à¸‚ียว
+à¸à¸²à¸„าบพริà¸
+à¸à¸²à¸‡
+à¸à¹‰à¸²à¸‡
+à¸à¸²à¸‡à¹€à¸à¸‡
+à¸à¸²à¸‡à¹€à¸à¸µà¸¢à¸‡
+à¸à¹‰à¸²à¸‡à¸‚วางคอ
+à¸à¸²à¸‡à¸‚อง
+à¸à¸²à¸‡à¸‚ี้มอด
+à¸à¸²à¸‡à¹€à¸‚น
+à¸à¹‰à¸²à¸‡à¸›à¸¥à¸²
+à¸à¸²à¸‡à¹€à¸§à¸µà¸¢à¸™
+à¸à¸²à¸ˆà¸±à¸šà¸«à¸¥à¸±à¸
+à¸à¸²à¸Šà¸²à¸”
+à¸à¹Šà¸²à¸‹
+à¸à¹Šà¸²à¸‹à¹„ข่เน่า
+à¸à¹Šà¸²à¸‹à¹€à¸‰à¸·à¹ˆà¸­à¸¢
+à¸à¹Šà¸²à¸‹à¸™à¹‰à¸³à¸•à¸²
+à¸à¸²à¸‹à¸°à¸¥à¸­à¸‡
+à¸à¸²à¸‹à¸°à¸¥à¸­à¸‡à¸„ำ
+à¸à¸²à¸à¸ˆà¸™-
+à¸à¸²à¸à¸ˆà¸™à¸²
+à¸à¸²à¸
+à¸à¸²à¸”
+à¸à¹Šà¸²à¸”
+à¸à¸²à¸™
+à¸à¹ˆà¸²à¸™
+à¸à¹‰à¸²à¸™
+à¸à¹Šà¸²à¸™
+à¸à¹‰à¸²à¸™à¸‚ด
+à¸à¹‰à¸²à¸™à¹à¸‚็ง
+à¸à¹‰à¸²à¸™à¸„อ
+à¸à¸²à¸™à¸”า
+à¸à¸²à¸™à¸•à¹Œ
+à¸à¹‰à¸²à¸™à¸•à¸­à¸‡
+à¸à¹‰à¸²à¸™à¸•à¹ˆà¸­à¸”อà¸
+à¸à¸²à¸™à¸—์
+à¸à¸²à¸™à¸™
+à¸à¹‰à¸²à¸™à¸šà¸±à¸§
+à¸à¹‰à¸²à¸™à¸žà¸£à¹‰à¸²à¸§
+à¸à¸²à¸™à¸žà¸¥à¸¹
+à¸à¹‰à¸²à¸™à¸¡à¸°à¸žà¸£à¹‰à¸²à¸§
+à¸à¹‰à¸²à¸™à¸¢à¸²à¸§
+à¸à¹‰à¸²à¸™à¹à¸¢à¹ˆà¸‡
+à¸à¹‰à¸²à¸™à¹€à¸«à¸¥à¸·à¸­à¸‡
+à¸à¸²à¸™à¹‰à¸²
+à¸à¸²à¸™à¹‰à¸³
+à¸à¸²à¸š
+à¸à¹‰à¸²à¸šà¹†
+à¸à¸²à¸šà¸à¸µà¹‰
+à¸à¸²à¸šà¹€à¸‚ียง
+à¸à¸²à¸šà¸„ู่
+à¸à¸²à¸šà¹€à¸”ียว
+à¸à¸²à¸šà¹€à¸”ี่ยว
+à¸à¸²à¸šà¸™à¹‰à¸³à¸ˆà¸·à¸”
+à¸à¸²à¸šà¸šà¸±à¸§
+à¸à¸²à¸šà¸›à¸¹à¹€à¸¥
+à¸à¸²à¸šà¸žà¸£à¸«à¸¡à¸¨à¸£
+à¸à¸²à¸šà¸«à¸­à¸¢
+à¸à¸²à¸šà¸¸à¸£à¸¸à¸©
+à¸à¸²à¸šà¸¹
+à¸à¸²à¹€à¸›à¸µà¹‰à¸¢à¸”
+à¸à¸²à¸à¸²à¸
+à¸à¸²à¸žà¸¢à¹Œ
+à¸à¸²à¸žà¸¢à¹Œà¸à¸¥à¸­à¸™
+à¸à¸²à¸Ÿà¸±à¸à¹„ข่
+à¸à¸²à¹€à¸Ÿà¸­à¸µà¸™
+à¸à¸²à¹à¸Ÿ
+à¸à¸²à¸¡
+à¸à¸²à¸¡-
+à¸à¹‰à¸²à¸¡
+à¸à¹‰à¸²à¸¡à¸à¸£à¸²à¸¡
+à¸à¸²à¸¡à¸à¸£à¸µà¸‘า
+à¸à¸²à¸¡à¸à¸´à¸ˆ
+à¸à¹‰à¸²à¸¡à¸à¸¸à¹‰à¸‡
+à¸à¹‰à¸²à¸¡à¹€à¸à¸¥à¸µà¹‰à¸¢à¸‡
+à¸à¸²à¸¡à¸„ุณ
+à¸à¸²à¸¡à¸‰à¸±à¸™à¸—์
+à¸à¹‰à¸²à¸¡à¸”าบ
+à¸à¸²à¸¡à¸•à¸±à¸“หา
+à¸à¸²à¸¡à¸—-
+à¸à¸²à¸¡à¹€à¸—พ
+à¸à¸²à¸¡à¸™
+à¸à¹‰à¸²à¸¡à¸›à¸¹
+à¸à¹‰à¸²à¸¡à¸›à¸¹à¸«à¸¥à¸¸à¸”
+à¸à¸²à¸¡à¸ à¸ž
+à¸à¸²à¸¡à¸£à¸²à¸„
+à¸à¸²à¸¡à¹‚รค
+à¸à¸²à¸¡à¸§à¸´à¸•à¸
+à¸à¸²à¸¡à¸§à¸´à¸•à¸–าร
+à¸à¸²à¸¡à¸ªà¸¡à¸±à¸‡à¸„ี
+à¸à¸²à¸¡à¸±à¸Š
+à¸à¸²à¸¡à¸²
+à¸à¸²à¸¡à¸²à¸—ีนพ
+à¸à¸²à¸¡à¸²à¸žà¸ˆà¸£
+à¸à¸²à¸¡à¸²à¸¡à¸´à¸¨
+à¸à¸²à¸¡à¸²à¸£à¸¡à¸“์
+à¸à¸²à¸¡à¸²à¸§à¸ˆà¸£
+à¸à¸²à¸¡à¸´à¸™à¸µ
+à¸à¸²à¸¡à¸´à¸¨
+à¸à¸²à¹€à¸¡à¸¨
+à¸à¸²à¹€à¸¡à¸ªà¸¸à¸¡à¸´à¸ˆà¸‰à¸²à¸ˆà¸²à¸£
+à¸à¸²à¹‚มทย
+à¸à¸²à¸¢
+à¸à¸²à¸¢-
+à¸à¹ˆà¸²à¸¢
+à¸à¸²à¸¢à¸à¸£à¸£à¸¡
+à¸à¹ˆà¸²à¸¢à¸à¸­à¸‡
+à¸à¸²à¸¢à¸—วาร
+à¸à¸²à¸¢à¸šà¸£à¸´à¸«à¸²à¸£
+à¸à¸²à¸¢à¸žà¸±à¸™à¸˜à¸™à¹Œ
+à¸à¸²à¸¢à¸ à¸²à¸ž
+à¸à¸²à¸¢à¸ à¸²à¸žà¸šà¸³à¸šà¸±à¸”
+à¸à¸²à¸¢à¸§à¸´à¸ à¸²à¸„ศาสตร์
+à¸à¸²à¸¢à¸ªà¸´à¸—ธิ์
+à¸à¸²à¸¢à¸²à¸žà¸¢à¸ž
+à¸à¸²à¸¢à¸´à¸™à¸—รีย์
+à¸à¸²à¹€à¸¢à¸™
+à¸à¸²à¹€à¸¢à¸™à¸—รีย์
+à¸à¸²à¸£
+à¸à¸²à¸£à¸
+à¸à¸²à¸£à¸à¸¥à¸±à¹ˆà¸™à¸—ำลาย
+à¸à¸²à¸£à¸‚นส่งมวลชน
+à¸à¸²à¸£à¸„รัว
+à¸à¸²à¸£à¸„ลัง
+à¸à¸²à¸£à¹€à¸‡à¸´à¸™
+à¸à¸²à¸£à¸ˆà¸£
+à¸à¸²à¸£à¸“์
+à¸à¸²à¸£à¸•à¹ˆà¸²à¸‡à¸›à¸£à¸°à¹€à¸—ศ
+à¸à¸²à¸£à¹Œà¸•à¸¹à¸™
+à¸à¸²à¸£à¹€à¸•
+à¸à¸²à¸£à¸™à¸³
+à¸à¸²à¸£à¸šà¹‰à¸²à¸™
+à¸à¸²à¸£à¸šà¹‰à¸²à¸™à¸à¸²à¸£à¹€à¸¡à¸·à¸­à¸‡
+à¸à¸²à¸£à¸šà¸¸à¹€à¸£à¸µà¸¢à¸™
+à¸à¸²à¸£à¸šà¸¹à¸£
+à¸à¸²à¸£à¸šà¸¹à¸£à¸›à¹ˆà¸²
+à¸à¸²à¸£à¹€à¸›à¸£à¸µà¸¢à¸
+à¸à¸²à¸£à¹à¸œà¹ˆà¸£à¸±à¸‡à¸ªà¸µ
+à¸à¸²à¸£à¸žà¸²
+à¸à¸²à¸£à¹€à¸¡à¸·à¸­à¸‡
+à¸à¸²à¸£à¸¢à¹Œ
+à¸à¸²à¸£à¹€à¸£à¸·à¸­à¸™
+à¸à¸²à¸£à¸¥à¸°à¹€à¸¥à¹ˆà¸™
+à¸à¸²à¸£à¸§à¸´à¸
+à¸à¸²à¸£à¹€à¸§à¸
+à¸à¸²à¸£à¸°à¹€à¸à¸”
+à¸à¸²à¸£à¸°à¸šà¸¸à¸«à¸™à¸´à¸‡
+à¸à¸²à¸£à¸±à¸“ย์
+à¸à¸²à¸£à¸±à¸™à¸•à¹Œ
+à¸à¸²à¸£à¸²à¸‡à¸«à¸±à¸§à¸‚วาน
+à¸à¸²à¸£à¸´à¸•à¸à¸²à¸£à¸
+à¸à¸²à¸£à¸´à¸•à¸§à¸²à¸ˆà¸
+à¸à¸²à¸£à¸¸à¸
+à¸à¸²à¸£à¸¸à¸“ย์
+à¸à¸²à¹€à¸£à¸à¸²à¸£à¹ˆà¸­à¸™
+à¸à¸²à¹€à¸£à¸µà¸¢à¸™
+à¸à¸²à¹€à¸£à¸µà¸¢à¸™à¸—อง
+à¸à¸²à¸¥
+à¸à¸²à¸¥-
+à¸à¸²à¸¥à¸à¸£à¸£à¸“ี
+à¸à¸²à¸¥à¸à¸´à¸“ี
+à¸à¸²à¸¥à¸à¸´à¸£à¸´à¸¢à¸²
+à¸à¸²à¸¥à¸ˆà¸±à¸à¸£
+à¸à¸²à¸¥à¹€à¸—ศะ
+à¸à¸²à¸¥à¹‚ยค
+à¸à¸²à¸¥à¸ªà¸¡à¸¸à¸•à¸–าน
+à¸à¸²à¸¥à¸±à¸à¸™à¹‰à¸³
+à¸à¸²à¸¥à¸±à¸à¸à¸¸à¸•à¸²
+à¸à¸²à¸¥à¸±à¸à¸à¸¹
+à¸à¸²à¸¥à¸±à¸”
+à¸à¸²à¸¥à¸²à¸™à¸¸à¸à¸²à¸¥
+à¸à¸²à¸¥à¸´à¸
+à¸à¸²à¸¥à¸µ
+à¸à¸²à¹à¸¥à¹‡à¸à¸‹à¸µ
+à¸à¸²à¹à¸¥à¹‡à¸à¹‚ทส
+à¸à¸²à¸§
+à¸à¹‰à¸²à¸§
+à¸à¹‰à¸²à¸§à¸à¹ˆà¸²à¸¢
+à¸à¹‰à¸²à¸§à¹€à¸‰à¸µà¸¢à¸‡
+à¸à¹‰à¸²à¸§à¸£à¹‰à¸²à¸§
+à¸à¹‰à¸²à¸§à¸¥à¹ˆà¸§à¸‡
+à¸à¸²à¸§à¸§à¸²à¸§
+à¸à¹‰à¸²à¸§à¸«à¸™à¹‰à¸²
+à¸à¸²à¸§à¸²à¸‡
+à¸à¸²à¹€à¸§à¸µà¸¢à¸™
+à¸à¸²à¹à¸§à¸™
+à¸à¸²à¸¨à¸´à¸
+à¸à¸²à¸¨à¸´à¸-
+à¸à¸²à¸¨à¸´à¸à¸žà¸±à¸ªà¸•à¸£à¹Œ
+à¸à¸²à¸©à¸à¸°
+à¸à¸²à¸©à¸²
+à¸à¸²à¸ªà¸£
+à¸à¸²à¸ªà¸°
+à¸à¸²à¸ªà¸±à¸
+à¸à¸²à¸ªà¸²
+à¸à¸²à¸ªà¸²à¸¡à¸›à¸µà¸
+à¸à¸²à¸ªà¸²à¸£
+à¸à¸²à¸ªà¸²à¸§-
+à¸à¸²à¸ªà¸²à¸§à¸žà¸±à¸ªà¸•à¸£à¹Œ
+à¸à¸²à¸ªà¸²à¸§à¸°
+à¸à¸²à¸ªà¸´à¹‚น
+à¸à¸²à¸«à¸¥
+à¸à¸²à¸«à¸¥à¸‡
+à¸à¸²à¸«à¸¥à¸‡à¸£à¸±à¸‡
+à¸à¸²à¸«à¸¥à¸²
+à¸à¸²à¸«à¸±à¸
+à¸à¸²à¹€à¸«à¸§à¹ˆà¸²
+à¸à¸²à¹„หล่
+à¸à¸²à¸¬
+à¸à¸²à¸¬-
+à¸à¸²à¸¬à¸ˆà¸±à¸à¸£
+à¸à¸²à¸¬à¸›à¸±à¸à¸©à¹Œ
+à¸à¸²à¸¬à¸›à¸±à¸à¸©à¸µ
+à¸à¸²à¸¬à¸žà¸¤à¸à¸©à¹Œ
+à¸à¸²à¸¬à¹‚รค
+à¸à¸²à¸¬à¸§à¸²à¸•
+à¸à¸²à¸¬à¸²à¸§à¸
+à¸à¸²à¸®à¸±à¸‡
+à¸à¸³
+à¸à¹ˆà¸³
+à¸à¹‰à¸³
+à¸à¸³à¸à¸§à¸¡
+à¸à¸³à¸à¸±à¸”
+à¸à¸³à¸à¸±à¸š
+à¸à¹‰à¸³à¸à¸¶à¹ˆà¸‡
+à¸à¸³à¸à¸¹à¸™
+à¸à¸³à¹€à¸à¸£à¸µà¸¢à¸
+à¸à¹‰à¸³à¹€à¸à¸´à¸™
+à¸à¸³à¹€à¸à¸µà¸¢à¸‡
+à¸à¸³à¸‚ี้ดีà¸à¸§à¹ˆà¸²à¸à¸³à¸•à¸”
+à¸à¸³à¸„ูน
+à¸à¹ˆà¸³à¹€à¸„ือ
+à¸à¸³à¸ˆà¸£
+à¸à¸³à¸ˆà¸±à¸”
+à¸à¸³à¸ˆà¸²à¸¢
+à¸à¸³à¸Šà¸±à¸š
+à¸à¸³à¸Šà¸±à¸šà¸à¸³à¸Šà¸²
+à¸à¸³à¸Šà¸³
+à¸à¸³à¹‚ชà¸
+à¸à¸³à¸‹à¸²à¸š
+à¸à¸³à¸‹à¸³
+à¸à¸³à¸”้น
+à¸à¸³à¸”ัด
+à¸à¸³à¸”าล
+à¸à¸³à¹€à¸”า
+à¸à¸³à¹€à¸”าะ
+à¸à¹ˆà¸³à¸•à¹‰à¸™
+à¸à¸³à¸•à¸±à¸”
+à¸à¸³à¸•à¸²à¸
+à¸à¸³à¸–ั่ว
+à¸à¸³à¸—วน
+à¸à¸³à¸˜à¸£
+à¸à¸³à¸™à¸¥
+à¸à¸³à¸™à¸±à¸”
+à¸à¸³à¸™à¸±à¸™
+à¸à¸³à¸™à¸±à¸¥
+à¸à¸³à¹€à¸™à¸´à¸”
+à¸à¸³à¹€à¸™à¸µà¸¢à¸ˆ
+à¸à¸³à¸šà¸”
+à¸à¸³à¸šà¸™
+à¸à¸³à¸šà¸±à¸‡
+à¸à¸³à¸šà¸±à¸”
+à¸à¸³à¸šà¸´à¸”
+à¸à¹ˆà¸³à¸šà¸¶à¹‰à¸‡
+à¸à¸³à¹€à¸šà¹‰à¸­
+à¸à¸³à¹‚บล
+à¸à¸³à¸›à¸­
+à¸à¸³à¸›à¸±à¹ˆà¸™
+à¸à¸³à¸›à¸±à¹‰à¸™
+à¸à¸³à¸œà¸¥à¸²
+à¸à¸³à¸žà¸‡
+à¸à¸³à¸žà¸”
+à¸à¸³à¸žà¸•
+à¸à¸³à¸žà¸£à¹‰à¸²
+à¸à¸³à¸žà¸£à¸²à¸
+à¸à¸³à¸žà¸§à¸”
+à¸à¸³à¸žà¸­à¸‡
+à¸à¸³à¸žà¸·à¸”
+à¸à¸³à¸žà¸¸à¸”
+à¸à¸³à¸žà¸¹
+à¸à¸³à¹€à¸žà¸¥à¸´à¸‡
+à¸à¸³à¹à¸žà¸‡
+à¸à¸³à¹à¸žà¹‰à¸‡
+à¸à¸³à¹à¸žà¸‡à¹à¸à¹‰à¸§
+à¸à¸³à¹à¸žà¸‡à¸‚าว
+à¸à¸³à¹à¸žà¸‡à¹€à¸‚ย่ง
+à¸à¸³à¹à¸žà¸‡à¹€à¸ˆà¹‡à¸”ชั้น
+à¸à¸³à¹à¸žà¸‡à¸¡à¸µà¸«à¸¹à¸›à¸£à¸°à¸•à¸¹à¸¡à¸µà¸Šà¹ˆà¸­à¸‡
+à¸à¸³à¹à¸žà¸‡à¸¡à¸µà¸«à¸¹à¸›à¸£à¸°à¸•à¸¹à¸¡à¸µà¸•à¸²
+à¸à¸³à¹à¸žà¸‡à¹€à¸¨à¸µà¸¢à¸£
+à¸à¸³à¸ à¸¹
+à¸à¸³à¸¡
+à¸à¸³à¸¡à¸žà¸¤à¸à¸©à¹Œ
+à¸à¸³à¸¡à¸¥à¸²à¸¨à¸™à¹Œ
+à¸à¸³à¸¡à¹€à¸¥à¸¨
+à¸à¸³à¸¡à¸°à¸–ัน
+à¸à¸³à¸¡à¸°à¸¥à¸­
+à¸à¸³à¸¡à¸°à¸«à¸¢à¸µà¹ˆ
+à¸à¸³à¸¡à¸°à¸«à¸£à¸´à¸”
+à¸à¸³à¸¡à¸±à¸‡à¸¥à¸°à¸à¸²à¸£
+à¸à¸³à¸¡à¸±à¸‡à¸§à¸´à¸¥à¸´à¸•
+à¸à¸³à¸¡à¸±à¸Šà¸žà¸¥
+à¸à¸³à¸¡à¸²
+à¸à¸³à¸¡à¸·à¸­
+à¸à¸³à¸¢à¸²à¸™
+à¸à¸³à¸¢à¸³
+à¸à¸³à¸£à¸­
+à¸à¸³à¸£à¸²à¸
+à¸à¸³à¸£à¸²à¸š
+à¸à¸³à¸£à¸²à¸¥
+à¸à¸³à¸£à¸¹
+à¸à¸³à¹€à¸£à¸´à¸š
+à¸à¸³à¹€à¸£à¸´à¸šà¹€à¸ªà¸´à¸šà¸ªà¸²à¸™
+à¸à¸³à¹„ร
+à¸à¸³à¸¥à¸­à¸‡
+à¸à¸³à¸¥à¸±à¸‡
+à¸à¸³à¸¥à¸±à¸‡à¸à¸´à¸™
+à¸à¸³à¸¥à¸±à¸‡à¸à¸´à¸™à¸à¸³à¸¥à¸±à¸‡à¸™à¸­à¸™
+à¸à¸³à¸¥à¸±à¸‡à¹ƒà¸ˆ
+à¸à¸³à¸¥à¸±à¸‡à¸Šà¹‰à¸²à¸‡à¹€à¸œà¸·à¸­à¸
+à¸à¸³à¸¥à¸±à¸‡à¸Šà¹‰à¸²à¸‡à¸ªà¸²à¸£
+à¸à¸³à¸¥à¸±à¸‡à¸”ี
+à¸à¸³à¸¥à¸±à¸‡à¹€à¸—ียน
+à¸à¸³à¸¥à¸±à¸‡à¸ à¸²à¸¢à¹ƒà¸™
+à¸à¸³à¸¥à¸±à¸‡à¸¡à¹‰à¸²
+à¸à¸³à¸¥à¸±à¸‡à¸§à¸±à¸‡à¸Šà¸²
+à¸à¸³à¸¥à¸±à¸‡à¸§à¸±à¸§à¹€à¸–ลิง
+à¸à¸³à¸¥à¸¸à¸‡
+à¸à¸³à¸¥à¸¹à¸™
+à¸à¸³à¹€à¸¥à¸²
+à¸à¸³à¹€à¸¥à¸²à¸°
+à¸à¸³à¹„ล
+à¸à¸³à¹„ลคู่ผี
+à¸à¸³à¸ªà¸£à¸”
+à¸à¸³à¸ªà¸£à¸§à¸¥
+à¸à¸³à¹€à¸ªà¸²à¸°
+à¸à¸³à¹à¸ªà¸‡
+à¸à¸³à¸«à¸™à¸”
+à¸à¸³à¸«à¸™à¸”à¸à¸²à¸£
+à¸à¸³à¸«à¸™à¸±à¸”
+à¸à¸³à¸«à¸¡à¸±à¸”
+à¸à¸³à¸«à¸£à¸²à¸
+à¸à¸³à¹€à¸«à¸™à¹‡à¸ˆ
+à¸à¸³à¹à¸«à¸‡
+à¸à¸´à¸
+à¸à¸´à¹Šà¸
+à¸à¸´à¹ˆà¸‡
+à¸à¸´à¹ˆà¸‡à¸à¹‰à¸­à¸¢
+à¸à¸´à¹‰à¸‡à¸à¹ˆà¸²
+à¸à¸´à¹‰à¸‡à¸à¸·à¸­
+à¸à¸´à¹‰à¸‡à¸à¸·à¸­à¹€à¸«à¸¥à¹‡à¸
+à¸à¸´à¹‰à¸‡à¹‚ครง
+à¸à¸´à¹ˆà¸‡à¸—องใบหยà¸
+à¸à¸´à¸‡à¸šà¸¸à¸£à¸¸à¸©
+à¸à¸´à¹ˆà¸‡à¸«à¸²à¸¢
+à¸à¸´à¸ˆ
+à¸à¸´à¸ˆ-
+à¸à¸´à¸ˆà¸à¸£à¸£à¸¡
+à¸à¸´à¸ˆà¸à¸²à¸£
+à¸à¸´à¸ˆà¸ˆà¸°
+à¸à¸´à¸ˆà¸ˆà¸°à¸¥à¸±à¸à¸©à¸“ะ
+à¸à¸´à¸ˆà¸ˆà¸²
+à¸à¸´à¸ˆà¸ˆà¸²à¸™à¸¸à¸à¸´à¸ˆ
+à¸à¸´à¸ˆà¸§à¸±à¸•à¸£
+à¸à¸´à¸”าà¸à¸²à¸£
+à¸à¸´à¸”าหยัน
+à¸à¸´à¸•à¸•à¸´
+à¸à¸´à¸•à¸•à¸´à¸à¸£à¸£à¸¡à¸›à¸£à¸°à¸à¸²à¸¨
+à¸à¸´à¸•à¸•à¸´à¸„ุณ
+à¸à¸´à¸•à¸•à¸´à¸¡à¸¨à¸±à¸à¸”ิ์
+à¸à¸´à¸•à¸•à¸´à¸¨à¸±à¸žà¸—์
+à¸à¸´à¸™
+à¸à¸´à¸™à¸à¸£à¸´à¸š
+à¸à¸´à¸™à¸à¸±à¸™
+à¸à¸´à¸™à¸à¸³à¹„ร
+à¸à¸´à¸™à¹€à¸à¸¥à¸µà¸¢à¸§
+à¸à¸´à¸™à¹€à¸à¸¥à¸·à¸­à¸à¸´à¸™à¸à¸°à¸›à¸´
+à¸à¸´à¸™à¹à¸à¸¥à¸šà¸à¸´à¸™à¸£à¸³
+à¸à¸´à¸™à¸‚วา
+à¸à¸´à¸™à¸‚าด
+à¸à¸´à¸™à¹à¸‚à¸
+à¸à¸´à¸™à¸„วาม
+à¸à¸´à¸™à¹€à¸„รา
+à¸à¸´à¸™à¹€à¸ˆ
+à¸à¸´à¸™à¹à¸ˆ
+à¸à¸´à¸™à¹ƒà¸ˆ
+à¸à¸´à¸™à¸Šà¹‰à¸­à¸™
+à¸à¸´à¸™à¸Šà¸±à¸™
+à¸à¸´à¸™à¸‹à¹‰à¸²à¸¢
+à¸à¸´à¸™à¸”อà¸
+à¸à¸´à¸™à¸”อà¸à¹€à¸šà¸µà¹‰à¸¢
+à¸à¸´à¸™à¸”อง
+à¸à¸´à¸™à¸”่าง
+à¸à¸´à¸™à¸”าย
+à¸à¸´à¸™à¸”ิบ
+à¸à¸´à¸™à¸•à¸°à¹€à¸à¸µà¸¢à¸š
+à¸à¸´à¸™à¸•à¸±à¸§
+à¸à¸´à¸™à¸•à¸²
+à¸à¸´à¸™à¸•à¸³à¹à¸«à¸™à¹ˆà¸‡
+à¸à¸´à¸™à¹‚ต๊ะ
+à¸à¸´à¸™à¹à¸–ว
+à¸à¸´à¸™à¸—าง
+à¸à¸´à¸™à¸—ี่
+à¸à¸´à¸™à¸—ี่ลับไขที่à¹à¸ˆà¹‰à¸‡
+à¸à¸´à¸™à¸™à¸£
+à¸à¸´à¸™à¸™à¸£à¹€à¸à¹‡à¸šà¸šà¸±à¸§
+à¸à¸´à¸™à¸™à¸£à¸Ÿà¹‰à¸­à¸™à¹‚อ่
+à¸à¸´à¸™à¸™à¸£à¸£à¸³
+à¸à¸´à¸™à¸™à¸£à¹€à¸¥à¸µà¸¢à¸šà¸–้ำ
+à¸à¸´à¸™à¸™à¸­à¸à¸à¸´à¸™à¹ƒà¸™
+à¸à¸´à¸™à¸™à¸­à¸™
+à¸à¸´à¸™à¸™à¹‰à¸³
+à¸à¸´à¸™à¸™à¹‰à¸³à¸•à¸²
+à¸à¸´à¸™à¸™à¹‰à¸³à¹ƒà¸•à¹‰à¸¨à¸­à¸
+à¸à¸´à¸™à¸™à¹‰à¸³à¸žà¸£à¸´à¸à¸–้วยเดียว
+à¸à¸´à¸™à¸™à¹‰à¸³à¹„ม่เผื่อà¹à¸¥à¹‰à¸‡
+à¸à¸´à¸™à¸™à¹‰à¸³à¹€à¸«à¹‡à¸™à¸›à¸¥à¸´à¸‡
+à¸à¸´à¸™à¹ƒà¸™
+à¸à¸´à¸™à¸šà¸™à¹€à¸£à¸·à¸­à¸™à¸‚ี้บนหลังคา
+à¸à¸´à¸™à¸šà¸§à¸Š
+à¸à¸´à¸™à¸šà¹‰à¸²à¸™à¸à¸´à¸™à¹€à¸¡à¸·à¸­à¸‡
+à¸à¸´à¸™à¸šà¸¸à¸
+à¸à¸´à¸™à¸šà¸¸à¸à¹€à¸à¹ˆà¸²
+à¸à¸´à¸™à¹à¸šà¹ˆà¸‡
+à¸à¸´à¸™à¸›à¸¥à¸´à¸‡
+à¸à¸´à¸™à¸›à¸¥à¸µ
+à¸à¸´à¸™à¸›à¸¹à¸™à¸£à¹‰à¸­à¸™à¸—้อง
+à¸à¸´à¸™à¹€à¸›à¸¥à¹ˆà¸²
+à¸à¸´à¸™à¹€à¸›à¸µà¹‰à¸¢à¸§
+à¸à¸´à¸™à¸œà¸±à¸§
+à¸à¸´à¸™à¹€à¸žà¸£à¸²
+à¸à¸´à¸™à¸¡à¸·à¸­
+à¸à¸´à¸™à¹€à¸¡à¸µà¸¢
+à¸à¸´à¸™à¹€à¸¡à¸·à¸­à¸‡
+à¸à¸´à¸™à¹„ม่ลง
+à¸à¸´à¸™à¸£à¸±à¸‡à¹à¸•à¸™
+à¸à¸´à¸™à¸£à¸´à¸™
+à¸à¸´à¸™à¸£à¸µ
+à¸à¸´à¸™à¸£à¸¹à¸›
+à¸à¸´à¸™à¹à¸£à¸‡
+à¸à¸´à¸™à¸¥à¸¡
+à¸à¸´à¸™à¸¥à¸¡à¸à¸´à¸™à¹à¸¥à¹‰à¸‡
+à¸à¸´à¸™à¸¥à¹‰à¸²à¸‡à¸à¸´à¸™à¸œà¸¥à¸²à¸
+à¸à¸´à¸™à¸¥à¸¶à¸
+à¸à¸´à¸™à¹€à¸§à¸¥à¸²
+à¸à¸´à¸™à¹€à¸¨à¸©à¸à¸´à¸™à¹€à¸¥à¸¢
+à¸à¸´à¸™à¸ªà¹‰à¸­à¸¡
+à¸à¸´à¸™à¸ªà¸±à¹ˆà¸‡
+à¸à¸´à¸™à¸ªà¸³à¸£à¸±à¸š
+à¸à¸´à¸™à¸ªà¸µà¹ˆà¸–้วย
+à¸à¸´à¸™à¹€à¸ªà¹‰à¸™
+à¸à¸´à¸™à¸«à¸™à¹‰à¸²
+à¸à¸´à¸™à¸«à¸¥à¸±à¸‡
+à¸à¸´à¸™à¸«à¸²à¸‡
+à¸à¸´à¸™à¸«à¸¹à¹‰
+à¸à¸´à¸™à¹€à¸«à¸¡à¸·à¸­à¸™à¸«à¸¡à¸¹ อยู่เหมือนหมา
+à¸à¸´à¸™à¹€à¸«à¸¥à¹‡à¸à¸à¸´à¸™à¹„หล
+à¸à¸´à¸™à¹à¸«à¸™à¸‡
+à¸à¸´à¸™à¸­à¸¢à¸¹à¹ˆà¸à¸±à¸šà¸›à¸²à¸ อยาà¸à¸­à¸¢à¸¹à¹ˆà¸à¸±à¸šà¸—้อง
+à¸à¸´à¸™à¸­à¸¢à¸¹à¹ˆà¸žà¸¹à¸§à¸²à¸¢
+à¸à¸´à¹Šà¸š
+à¸à¸´à¸¡à¸•à¸¶à¹‹à¸‡
+à¸à¸´à¸¡à¸´à¸Šà¸²à¸•à¸´
+à¸à¸´à¸¡à¸´à¸§à¸´à¸—ยา
+à¸à¸´à¹‚มโน
+à¸à¸´à¹‚ยตีน
+à¸à¸´à¸£à¸°
+à¸à¸´à¸£à¸´à¸“ี
+à¸à¸´à¸£à¸´à¸™à¸—
+à¸à¸´à¸£à¸´à¹€à¸™à¸¨à¸§à¸£
+à¸à¸´à¸£à¸´à¸¢à¸²
+à¸à¸´à¸£à¸´à¸¢à¸²à¸ªà¸°à¸—้อน
+à¸à¸´à¹€à¸¥à¸™
+à¸à¸´à¹€à¸¥à¸ª
+à¸à¸´à¹€à¸¥à¸ª-
+à¸à¸´à¹€à¸¥à¸ªà¸¡à¸²à¸£
+à¸à¸´à¹‚ล
+à¸à¸´à¹‚ล-
+à¸à¸´à¹‚ลà¸à¸£à¸±à¸¡
+à¸à¸´à¹‚ลไซเà¸à¸´à¸¥
+à¸à¸´à¹‚ลมà¸à¸°
+à¸à¸´à¹‚ลเมตร
+à¸à¸´à¹‚ลลิตร
+à¸à¸´à¹‚ลเฮิรตซ์
+à¸à¸´à¹ˆà¸§
+à¸à¸´à¹‹à¸§
+à¸à¸´à¹‹à¸§à¹†
+à¸à¸µ
+à¸à¸µà¹ˆ
+à¸à¸µà¹‰
+à¸à¸µà¹‹
+à¸à¸µà¹ˆà¸à¸£à¸°à¸•à¸¸à¸
+à¸à¸µà¸-
+à¸à¸µà¸à¸§à¸´à¸—ยา
+à¸à¸µà¸”
+à¸à¸µà¸”à¸à¸±à¸™
+à¸à¸µà¸”à¸à¸±à¹‰à¸™
+à¸à¸µà¸”ขวาง
+à¸à¸µà¸”หน้าขวางตา
+à¸à¸µà¸•à¸²à¸£à¹Œ
+à¸à¸µà¸š
+à¸à¸µà¸šà¹à¸£à¸”
+à¸à¸µà¹ˆà¸¡à¸²à¸à¸™à¹‰à¸­à¸¢
+à¸à¸µà¸£à¸•à¸´
+à¸à¸µà¸¬à¸²
+à¸à¸¶à¸
+à¸à¸¶à¸à¸à¹‰à¸­à¸‡
+à¸à¸¶à¸à¸à¸±à¸
+à¸à¸¶à¸à¸à¸·à¸­
+à¸à¸¶à¸à¸–อง
+à¸à¸¶à¸‡
+à¸à¸¶à¹ˆà¸‡
+à¸à¸¶à¹ˆà¸‡à¸à¸¥à¸²à¸‡
+à¸à¸¶à¸‡à¸à¸±à¸‡
+à¸à¸¶à¹ˆà¸‡à¸£à¸²à¸Šà¸à¸²à¸£
+à¸à¸¶à¹‹à¸™
+à¸à¸¸
+à¸à¸¸à¸
+à¸à¸¸à¹Šà¸
+à¸à¸¸à¸à¸à¸±à¸
+à¸à¸¸à¸à¹† à¸à¸±à¸à¹†
+à¸à¸¸à¹Šà¸à¸à¸´à¹Šà¸
+à¸à¸¸à¹Šà¸à¹† à¸à¸´à¹Šà¸à¹†
+à¸à¸¸à¸à¸à¸¸à¸-
+à¸à¸¸à¸à¸à¸¸à¸£-
+à¸à¸¸à¸à¸‚ี้หมู
+à¸à¸¸à¸à¸£à¸£à¸¡
+à¸à¸¸à¸à¹ˆà¸­à¸‡
+à¸à¸¸à¸à¸°
+à¸à¸¸à¸à¸°à¸¡à¸°à¹€à¸—ิ่ง
+à¸à¸¸à¸à¸¸à¸˜à¸ à¸±à¸“ฑ์
+à¸à¸¸à¹‰à¸‡
+à¸à¸¸à¹‰à¸‡à¸”ีด
+à¸à¸¸à¹‰à¸‡à¸”ีดขัน
+à¸à¸¸à¹‰à¸‡à¹€à¸•à¹‰à¸™
+à¸à¸¸à¹‰à¸‡à¸™à¸²à¸‡
+à¸à¸¸à¹‰à¸‡à¸à¸­à¸¢
+à¸à¸¸à¹‰à¸‡à¸Ÿà¸±à¸”
+à¸à¸¸à¹‰à¸‡à¸¡à¸±à¸‡à¸à¸£
+à¸à¸¸à¹‰à¸‡à¹„ม้
+à¸à¸¸à¹‰à¸‡à¸¢à¸´à¸‡
+à¸à¸¸à¹‰à¸‡à¸ªà¹‰à¸¡
+à¸à¸¸à¹‰à¸‡à¸«à¸™à¸²à¸¡à¹ƒà¸«à¸à¹ˆ
+à¸à¸¸à¹‰à¸‡à¸«à¸¥à¸§à¸‡
+à¸à¸¸à¹‰à¸‡à¹€à¸«à¸¥à¸·à¸­à¸‡
+à¸à¸¸à¹‰à¸‡à¹à¸«
+à¸à¸¸à¹‰à¸‡à¹à¸«à¹‰à¸‡
+à¸à¸¸à¸‡à¸­à¸™
+à¸à¸¸à¸‡à¸²à¸™
+à¸à¸¸à¹‚งà¸
+à¸à¸¸à¸ˆà¸µ
+à¸à¸¸à¸à¹à¸ˆ
+à¸à¸¸à¸à¹à¸ˆà¸à¸¥
+à¸à¸¸à¸à¹à¸ˆà¸›à¸£à¸°à¸ˆà¸³à¸«à¸¥à¸±à¸
+à¸à¸¸à¸à¹à¸ˆà¸›à¸²à¸à¸•à¸²à¸¢
+à¸à¸¸à¸à¹à¸ˆà¸œà¸µ
+à¸à¸¸à¸à¹à¸ˆà¸¡à¸·à¸­
+à¸à¸¸à¸à¹à¸ˆà¸£à¸«à¸±à¸ª
+à¸à¸¸à¸à¹à¸ˆà¹€à¸¥à¸·à¹ˆà¸­à¸™
+à¸à¸¸à¸à¹à¸ˆà¹€à¸ªà¸µà¸¢à¸‡
+à¸à¸¸à¸à¹à¸ˆà¹à¸«à¸§à¸™
+à¸à¸¸à¸à¸Šà¸£
+à¸à¸¸à¸Ž
+à¸à¸¸à¸Žà¸²
+à¸à¸¸à¸Žà¸²à¸„าร
+à¸à¸¸à¸Žà¸²à¸˜à¸²à¸£
+à¸à¸¸à¸Žà¸µ
+à¸à¸¸à¸Žà¸¸à¸¡à¸žà¸µ
+à¸à¸¸à¸à¸à¸±à¸‡
+à¸à¸¸à¸à¹„ต
+à¸à¸¸à¸à¸´
+à¸à¸¸à¸“ฑ์
+à¸à¸¸à¸“ฑล
+à¸à¸¸à¸“ฑี
+à¸à¸¸à¸“โฑ
+à¸à¸¸à¸“าล
+à¸à¸¸à¸“ิ
+à¸à¸¸à¸“ี
+à¸à¸¸à¸”
+à¸à¸¸à¸”ัง
+à¸à¸¸à¸”ั่น
+à¸à¸¸à¸”า
+à¸à¸¸à¸—ัณฑ์
+à¸à¸¸à¸™
+à¸à¸¸à¹Šà¸™
+à¸à¸¸à¸™à¹€à¸Šà¸µà¸¢à¸‡
+à¸à¸¸à¸™à¸—ี
+à¸à¸¸à¹‚นà¸à¸²à¸¡à¸­
+à¸à¸¸à¸š
+à¸à¸¸à¸šà¸à¸±à¸š
+à¸à¸¸à¸¡
+à¸à¸¸à¹ˆà¸¡
+à¸à¸¸à¸¡à¸à¸­à¸¢
+à¸à¸¸à¸¡à¸ -
+à¸à¸¸à¸¡à¸ à¹Œ
+à¸à¸¸à¸¡à¸ à¸à¸²à¸£
+à¸à¸¸à¸¡à¸ à¸™à¸´à¸¢à¸²
+à¸à¸¸à¸¡à¸ à¸±à¸“ฑ-
+à¸à¸¸à¸¡à¸ à¸±à¸“ฑ์
+à¸à¸¸à¸¡à¸ à¸±à¸“ฑยัà¸à¸©à¹Œ
+à¸à¸¸à¸¡à¸ à¸²
+à¸à¸¸à¸¡à¸ à¸²à¸žà¸±à¸™à¸˜à¹Œ
+à¸à¸¸à¸¡à¸ à¸´à¸¥
+à¸à¸¸à¸¡à¸ à¸µà¸¥à¹Œ
+à¸à¸¸à¸¡à¸¥à¸±à¸„น์
+à¸à¸¸à¸¡à¹€à¸«à¸‡
+à¸à¸¸à¸¡à¸²à¸£
+à¸à¸¸à¸¡à¸²à¸£à¸¥à¸¬à¸´à¸•à¸²
+à¸à¸¸à¸¡à¸²à¸£à¸²
+à¸à¸¸à¸¡à¸²à¸£à¸µ
+à¸à¸¸à¸¡à¸¸à¸—
+à¸à¸¸à¸¢
+à¸à¸¸à¹Šà¸¢
+à¸à¸¸à¹‹à¸¢
+à¸à¸¸à¹‹à¸¢à¹†
+à¸à¸¸à¸¢à¸Šà¹ˆà¸²à¸¢
+à¸à¸¸à¸¢à¹€à¸®à¸‡
+à¸à¸¸à¸£à¸£
+à¸à¸¸à¸£à¸°
+à¸à¸¸à¸£à¸¸à¸‡
+à¸à¸¸à¸£à¸¸à¸žà¸´à¸™à¸—์
+à¸à¸¸à¸£à¸¸à¸£
+à¸à¸¸à¹€à¸£à¸²
+à¸à¸¸à¸¥
+à¸à¸¸à¸¥-
+à¸à¸¸à¸¥à¸—ูสà¸
+à¸à¸¸à¸¥à¸˜à¸´à¸”า
+à¸à¸¸à¸¥à¸šà¸”ี
+à¸à¸¸à¸¥à¸šà¸¸à¸•à¸£
+à¸à¸¸à¸¥à¸ªà¸•à¸£à¸µ
+à¸à¸¸à¸¥à¸ªà¸±à¸¡à¸žà¸±à¸™à¸˜à¹Œ
+à¸à¸¸à¸¥à¸²
+à¸à¸¸à¸¥à¸²à¸‹à¹ˆà¸­à¸™à¸œà¹‰à¸²
+à¸à¸¸à¸¥à¸²à¸”ำ
+à¸à¸¸à¸¥à¸²à¸•à¸µà¹„ม้
+à¸à¸¸à¸¥à¸²à¸•à¸µà¸­à¸
+à¸à¸¸à¸¥à¸²à¸¥à¸²à¸¢
+à¸à¸¸à¸¥à¸²à¸«à¸¥
+à¸à¸¸à¸¥à¸µ
+à¸à¸¸à¸¥à¸µà¸à¸¸à¸ˆà¸­
+à¸à¸¸à¹€à¸¥à¸²
+à¸à¸¸à¹à¸¥
+à¸à¸¸à¹€à¸§à¸£
+à¸à¸¸à¸¨à¸£à¸²à¸Š
+à¸à¸¸à¸¨à¸¥
+à¸à¸¸à¸¨à¸¥à¸à¸£à¸£à¸¡à¸šà¸–
+à¸à¸¸à¸¨à¹‚ลบาย
+à¸à¸¸à¸ªà¸¥
+à¸à¸¸à¸ªà¸¸à¸¡
+à¸à¸¸à¸ªà¸¸à¸¡-
+à¸à¸¸à¸ªà¸¸à¸¡à¸ à¹Œ
+à¸à¸¸à¸ªà¸¸à¸¡à¸§à¸´à¸ˆà¸´à¸•à¸£
+à¸à¸¸à¸ªà¸¸à¸¡à¸²
+à¸à¸¸à¸ªà¸¸à¸¡à¸²à¸¥à¸¢à¹Œ
+à¸à¸¸à¸ªà¸¸à¸¡à¸´à¸•à¸¥à¸”าเวลลิตา
+à¸à¸¸à¸«à¸™à¸µ
+à¸à¸¸à¸«à¸™à¸¸à¸‡
+à¸à¸¸à¸«à¸£à¹ˆà¸²
+à¸à¸¸à¸«à¸¥à¹ˆà¸²
+à¸à¸¸à¸«à¸¥à¸²à¸š
+à¸à¸¸à¹à¸«à¸¥à¸°
+à¸à¸¹
+à¸à¸¹à¹ˆ
+à¸à¸¹à¹‰
+à¸à¸¹à¹Šà¸
+à¸à¸¹à¸
+à¸à¸¹à¸à¸²
+à¸à¸¹à¸à¸²à¸„าร
+à¸à¸¹à¸“ฑ์
+à¸à¸¹à¸”
+à¸à¸¹à¸™
+à¸à¸¹à¸š
+à¸à¸¹à¸›à¸£à¸µ
+à¸à¸¹à¹‰à¸ à¸±à¸¢
+à¸à¸¹à¹ˆà¹„ม่à¸à¸¥à¸±à¸š
+à¸à¸¹à¹‰à¸¢à¸·à¸¡
+à¸à¸¹à¸£à¸¡-
+à¸à¸¹à¸£à¸¡à¸°
+à¸à¸¹à¸£à¸¡à¸²à¸§à¸•à¸²à¸£
+à¸à¸¹à¸£à¸³
+à¸à¸¹à¹‰à¸«à¸™à¹‰à¸²
+เà¸
+เà¸à¹ˆ
+เà¸à¹Š
+เà¸à¹‹
+เà¸à¸
+เà¸à¹Šà¸
+เà¸à¸à¸¡à¸°à¹€à¸«à¸£à¸
+เà¸à¹Šà¸à¸«à¸™à¹‰à¸²
+เà¸à¹Šà¸à¸®à¸§à¸¢
+เà¸à¹‰à¸à¸±à¸‡
+เà¸à¹‰à¹† à¸à¸±à¸‡à¹†
+เà¸à¹‡à¸‡
+เà¸à¹ˆà¸‡
+เà¸à¹‰à¸‡
+เà¸à¹‹à¸‡
+-เà¸à¸‡à¸à¸­à¸¢
+เà¸à¹‰à¸‡à¸à¹‰à¸²à¸‡
+เà¸à¹ˆà¸‡à¸à¸²à¸ˆ
+เà¸à¹‡à¸‡à¸à¸³à¹„ร
+เà¸à¸‡à¹€à¸‚ง
+เà¸à¹‹à¸‡à¹€à¸„ง
+เà¸à¹ˆà¸‡à¹à¸•à¹ˆà¸›à¸²à¸
+เà¸à¹‹à¸‡à¸žà¸±à¹‰à¸‡
+เà¸à¹‡à¸ˆ
+เà¸à¸ˆà¸´à¸­à¸²à¸ˆà¸²à¸£à¸¢à¹Œ
+เà¸à¸Šà¸²
+เà¸à¸“ฑ์
+เà¸à¸“ฑ์ตะพัด
+เà¸à¸“ฑ์เมืองรั้ง
+เà¸à¸“ฑ์หัด
+เà¸à¸”
+เà¸à¹‡à¸”
+เà¸à¸•à¸¸
+เà¸à¸•à¸¸-
+เà¸à¸•à¸¸à¸¡à¸²à¸¥à¸²
+เà¸à¸™
+เà¸à¸™à¹†
+เà¸à¹ˆà¸™
+เà¸à¹‡à¸š
+เà¸à¹‡à¸šà¹€à¸à¸µà¹ˆà¸¢à¸§
+เà¸à¹‡à¸šà¸‚้าว
+เà¸à¹‡à¸šà¸‚้าวตà¸
+เà¸à¹‡à¸šà¸„วาม
+เà¸à¹‡à¸šà¸‡à¸³
+เà¸à¹‡à¸šà¸•à¸
+เà¸à¹‡à¸šà¸•à¸±à¸§
+เà¸à¹‡à¸šà¹€à¸™à¸·à¹‰à¸­à¹€à¸à¹‡à¸šà¸•à¸±à¸§
+เà¸à¹‡à¸šà¹€à¸šà¸µà¹‰à¸¢à¹ƒà¸•à¹‰à¸–ุนร้าน
+เà¸à¹‡à¸šà¸œà¸¡
+เà¸à¹‡à¸šà¹„ร
+เà¸à¹‡à¸šà¹€à¸¥à¹‡à¸à¸œà¸ªà¸¡à¸™à¹‰à¸­à¸¢
+เà¸à¹‡à¸šà¹€à¸¥à¹‡à¸¡
+เà¸à¹‡à¸šà¹€à¸¥à¹ˆà¸¡
+เà¸à¹‡à¸šà¸ªà¸µ
+เà¸à¹‡à¸šà¸«à¸™à¹‰à¸²à¸œà¹‰à¸²
+เà¸à¹‡à¸šà¸«à¸­à¸¡à¸£à¸­à¸¡à¸£à¸´à¸š
+เà¸à¸¡
+เà¸à¸¢
+เà¸à¸¢à¸¥à¸²
+เà¸à¸¢à¹à¸«à¹‰à¸‡
+เà¸à¸¢à¸¹à¸£
+เà¸à¸£à¸‡
+เà¸à¸£à¹‡à¸‡
+เà¸à¸£à¸‡à¸‚าม
+เà¸à¸£à¸‡à¹ƒà¸ˆ
+เà¸à¸£à¸‡à¸­à¸à¹€à¸à¸£à¸‡à¹ƒà¸ˆ
+เà¸à¸£à¹‡à¸”
+เà¸à¸£à¸™
+เà¸à¸£à¹ˆà¸­
+เà¸à¸£à¸­à¸°
+เà¸à¸£à¸­à¸°à¸à¸£à¸±à¸‡
+เà¸à¸£à¸²à¸°
+เà¸à¸£à¸´à¸
+เà¸à¸£à¸´à¸™
+เà¸à¸£à¸´à¹ˆà¸™
+เà¸à¸£à¸µà¸¢à¸
+เà¸à¸£à¸µà¸¢à¸‡
+เà¸à¸£à¸µà¸¢à¸‡à¹„à¸à¸£
+เà¸à¸£à¸µà¸¢à¸”
+เà¸à¸£à¸µà¸¢à¸™
+เà¸à¸£à¸µà¸¢à¸š
+เà¸à¸£à¸µà¸¢à¸¡
+เà¸à¸£à¸µà¸¢à¸¡à¸à¸£à¸¡
+เà¸à¸£à¸µà¸¢à¸§
+เà¸à¸£à¸µà¹‰à¸¢à¸§
+เà¸à¸£à¸µà¹‰à¸¢à¸§à¹†
+เà¸à¸£à¸µà¹‰à¸¢à¸§à¸à¸£à¸²à¸”
+เà¸à¸£à¸µà¸¢à¸§à¸à¸£à¸²à¸§
+เà¸à¹€à¸£
+เà¸à¹€à¸£à¹€à¸à¸•à¸¸à¸‡
+เà¸à¹€à¸£à¹€à¸à¹€à¸ª
+เà¸à¸¥à¹‡à¸”
+เà¸à¸¥à¹‡à¸”à¸à¸£à¸°à¸”ี่
+เà¸à¸¥à¹‡à¸”à¸à¸£à¸°à¹‚ห้
+เà¸à¸¥à¹‡à¸”ข้าวเม่า
+เà¸à¸¥à¹‡à¸”ถี่
+เà¸à¸¥à¹‡à¸”นาค
+เà¸à¸¥à¹‡à¸”ปลาช่อน
+เà¸à¸¥à¹‡à¸”หอย
+เà¸à¸¥à¸¨
+เà¸à¸¥à¸­
+เà¸à¸¥à¸²
+เà¸à¸¥à¹‰à¸²
+เà¸à¸¥à¹‰à¸²à¸à¸£à¸°à¸œà¸¡
+เà¸à¸¥à¹‰à¸²à¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡
+เà¸à¸¥à¸²à¸°
+เà¸à¸¥à¸µà¹ˆà¸¢
+เà¸à¸¥à¸µà¹‰à¸¢
+เà¸à¸¥à¸µà¹‰à¸¢à¸à¸¥à¹ˆà¸­à¸¡
+เà¸à¸¥à¸µà¹ˆà¸¢à¹„à¸à¸¥à¹ˆ
+เà¸à¸¥à¸µà¸¢à¸‡
+เà¸à¸¥à¸µà¹‰à¸¢à¸‡
+เà¸à¸¥à¸µà¹‰à¸¢à¸‡à¹€à¸à¸¥à¸²
+เà¸à¸¥à¸µà¸¢à¸”
+เà¸à¸¥à¸µà¸¢à¸”ตัวà¸à¸´à¸™à¹„ข่
+เà¸à¸¥à¸µà¸¢à¸”ปลาไหลà¸à¸´à¸™à¸™à¹‰à¸³à¹à¸à¸‡
+เà¸à¸¥à¸µà¸¢à¸§
+เà¸à¸¥à¸µà¸¢à¸§à¸à¸¥à¸¡
+เà¸à¸¥à¸µà¸¢à¸§à¸‚้าง
+เà¸à¸¥à¸µà¸¢à¸§à¸„อ
+เà¸à¸¥à¸µà¹ˆà¸¢à¸§à¸”ำ
+เà¸à¸¥à¸µà¸¢à¸§à¸«à¸§à¸²à¸™
+เà¸à¸¥à¸·à¸­
+เà¸à¸¥à¸·à¹‰à¸­
+เà¸à¸¥à¸·à¸­à¸
+เà¸à¸¥à¸·à¸­à¸à¸à¸¥à¸±à¹‰à¸§
+เà¸à¸¥à¸·à¸­à¸à¸à¸¥à¸´à¹‰à¸‡
+เà¸à¸¥à¸·à¸­à¸à¸£à¸”
+เà¸à¸¥à¸·à¸­à¹à¸à¸‡
+เà¸à¸¥à¸·à¸­à¹€à¸‡à¸´à¸™
+เà¸à¸¥à¸·à¸­à¸ˆà¸´à¹‰à¸¡à¹€à¸à¸¥à¸·à¸­
+เà¸à¸¥à¸·à¸­à¸ˆà¸·à¸”
+เà¸à¸¥à¸·à¸­à¸”่าง
+เà¸à¸¥à¸·à¸­à¸”่างคลี
+เà¸à¸¥à¸·à¹ˆà¸­à¸™
+เà¸à¸¥à¸·à¹‰à¸­à¸™
+เà¸à¸¥à¸·à¹ˆà¸­à¸™à¸à¸¥à¹ˆà¸™
+เà¸à¸¥à¸·à¹ˆà¸­à¸™à¸à¸¥à¸²à¸”
+เà¸à¸¥à¸·à¹ˆà¸­à¸™à¸„วาม
+เà¸à¸¥à¸·à¸­à¹€à¸šà¸ªà¸´à¸
+เà¸à¸¥à¸·à¸­à¸›à¸£à¸à¸•à¸´
+เà¸à¸¥à¸·à¸­à¹€à¸›à¹‡à¸™à¸«à¸™à¸­à¸™
+เà¸à¸¥à¸·à¸­à¸Ÿà¸­à¸‡
+เà¸à¸¥à¸·à¸­à¸¢à¸¹à¹€à¸£à¸•
+เà¸à¸¥à¸·à¸­à¸ªà¸¡à¸¸à¸—ร
+เà¸à¸¥à¸·à¸­à¸ªà¸´à¸™à¹€à¸˜à¸²à¸§à¹Œ
+เà¸à¹„ล
+เà¸à¸§à¸±à¸
+เà¸à¸§à¸µà¸¢à¸™
+เà¸à¸§à¸µà¸¢à¸™à¸«à¸¥à¸§à¸‡
+เà¸à¸¨
+เà¸à¸¨-
+เà¸à¸¨à¸˜à¸²à¸•à¸¸
+เà¸à¸¨à¸ž
+เà¸à¸¨à¸§
+เà¸à¸¨à¸²
+เà¸à¸¨à¸²à¸à¸±à¸™à¸•à¹Œ
+เà¸à¸¨à¸´à¸™à¸µ
+เà¸à¸¨à¸µ
+เà¸à¸©à¸•à¸£
+เà¸à¸©à¸•à¸£à¸à¸£
+เà¸à¸©à¸•à¸£à¸à¸£à¸£à¸¡
+เà¸à¸©à¸•à¸£à¹à¸¥à¸°à¸ªà¸«à¸à¸£à¸“์
+เà¸à¸©à¸•à¸£à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+เà¸à¸©à¸¡
+เà¸à¸©à¸¡à¸¨à¸²à¸™à¸•à¹Œ
+เà¸à¸©à¸¡à¸ªà¸±à¸™à¸•à¹Œ
+เà¸à¸©à¸µà¸¢à¸“
+เà¸à¸©à¸µà¸¢à¸“อายุ
+เà¸à¸©à¸µà¸¢à¸™
+เà¸à¸©à¸µà¸¢à¸£
+เà¸à¸©à¸µà¸¢à¸£à¸ªà¸¡à¸¸à¸—ร
+เà¸à¸ª
+เà¸à¸ªà¸£
+เà¸à¸ªà¸£à¸—ั้งห้า
+เà¸à¸ªà¸£à¸µ
+เà¸à¸ªà¸²
+เà¸à¸ªà¸µ
+เà¸à¹‰à¸­
+เà¸à¸­à¸´à¸Šà¸²
+เà¸à¸°
+เà¸à¸°à¸à¸°
+เà¸à¸²
+เà¸à¹ˆà¸²
+เà¸à¹‰à¸²
+เà¸à¹‹à¸²
+เà¸à¸²à¸•à¹Œ
+เà¸à¸²à¸—ัณฑ์
+เà¸à¸²à¸—ุมพร
+เà¸à¸²à¸šà¸´à¸™
+เà¸à¸²à¸šà¸´à¸¥
+เà¸à¸²à¸¡à¸²à¸£
+เà¸à¸²à¸¥à¸±à¸”
+เà¸à¸²à¸¥à¸±à¸”จีน
+เà¸à¸²à¸¥à¸´à¸™
+เà¸à¸²à¹„ศย
+เà¸à¸²à¸«à¸¥à¸µ
+เà¸à¸²à¹€à¸«à¸¥à¸²
+เà¸à¸²à¹€à¸«à¸¥à¸µà¸¢à¸‡
+เà¸à¹‰à¸²à¸­à¸µà¹‰
+เà¸à¸²à¸°
+เà¸à¸²à¸°à¸à¸´à¸™
+เà¸à¸²à¸°à¹à¸à¸°
+เà¸à¸´à¸‡
+เà¸à¸´à¹‰à¸‡
+เà¸à¸´à¸”
+เà¸à¸´à¸”สูรย์
+เà¸à¸´à¸™
+เà¸à¸´à¸™à¸à¸²à¸£
+เà¸à¸´à¸™à¸à¸´à¸™
+เà¸à¸´à¸™à¸„น
+เà¸à¸´à¸™à¸‡à¸²à¸¡
+เà¸à¸´à¸™à¸”ี
+เà¸à¸´à¸™à¸•à¸±à¸§
+เà¸à¸´à¸™à¹„ป
+เà¸à¸´à¸™à¹€à¸¥à¸¢
+เà¸à¸´à¸™à¸«à¸™à¹‰à¸²
+เà¸à¸´à¸š
+เà¸à¸µà¸¢
+เà¸à¸µà¸¢à¸à¸à¸²à¸¢
+เà¸à¸µà¸¢à¸‡
+เà¸à¸µà¹ˆà¸¢à¸‡
+เà¸à¸µà¹‹à¸¢à¸‡
+เà¸à¸µà¹ˆà¸¢à¸‡à¸‡à¸­à¸™
+เà¸à¸µà¹ˆà¸¢à¸‡à¸•à¸²à¸¢
+เà¸à¸µà¸¢à¸ˆ
+เà¸à¸µà¸¢à¸ˆà¸à¸¥
+เà¸à¸µà¸¢à¸ˆà¸„ร้าน
+เà¸à¸µà¸¢à¸”
+เà¸à¸µà¸¢à¸”à¸à¸±à¸™
+เà¸à¸µà¸¢à¸™
+เà¸à¸µà¹‰à¸¢à¸¡à¹„ฉ่
+เà¸à¸µà¹‰à¸¢à¸¡à¸­à¸µà¹‹
+เà¸à¸µà¸¢à¸£à¹Œ
+เà¸à¸µà¸¢à¸£à¸•à¸´
+เà¸à¸µà¸¢à¸£à¸•à¸´-
+เà¸à¸µà¸¢à¸£à¸•à¸´à¹Œ
+เà¸à¸µà¸¢à¸£à¸•à¸´à¸„ุณ
+เà¸à¸µà¸¢à¸£à¸•à¸´à¸™à¸´à¸¢à¸¡
+เà¸à¸µà¸¢à¸£à¸•à¸´à¸›à¸£à¸°à¸§à¸±à¸•à¸´
+เà¸à¸µà¸¢à¸£à¸•à¸´à¸ à¸¹à¸¡à¸´
+เà¸à¸µà¸¢à¸£à¸•à¸´à¸¢à¸¨
+เà¸à¸µà¸¢à¸£à¸•à¸´à¸¨à¸±à¸à¸”ิ์
+เà¸à¸µà¹ˆà¸¢à¸§
+เà¸à¸µà¹‰à¸¢à¸§
+เà¸à¸µà¹Šà¸¢à¸§
+เà¸à¸µà¹ˆà¸¢à¸§à¸à¹‰à¸­à¸¢
+เà¸à¸µà¹‰à¸¢à¸§à¹€à¸à¹„ล
+เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง
+เà¸à¸µà¹ˆà¸¢à¸§à¸‚้าว
+เà¸à¸µà¹‰à¸¢à¸§à¸„อไà¸à¹ˆ
+เà¸à¸µà¹ˆà¸¢à¸§à¸”อง
+เà¸à¸µà¹ˆà¸¢à¸§à¸”องหนองยุ่ง
+เà¸à¸µà¹‰à¸¢à¸§à¸™à¸§à¸¡
+เà¸à¸µà¹ˆà¸¢à¸§à¹€à¸šà¹‡à¸”
+เà¸à¸µà¹‰à¸¢à¸§à¸›à¸£à¸°à¸—ีป
+เà¸à¸µà¹ˆà¸¢à¸§à¹à¸à¸à¸¡à¸¸à¸‡à¸›à¹ˆà¸²
+เà¸à¸µà¹ˆà¸¢à¸§à¸žà¸±à¸™
+เà¸à¸µà¹‰à¸¢à¸§à¸žà¸²à¸™
+เà¸à¸µà¹‰à¸¢à¸§à¸žà¸²à¸£à¸²à¸ªà¸µ
+เà¸à¸µà¹ˆà¸¢à¸§à¹‚ยง
+เà¸à¸µà¹Šà¸¢à¸°
+เà¸à¸·à¹‰à¸­
+เà¸à¸·à¸­à¸
+เà¸à¸·à¸­à¸à¸¡à¹‰à¸²
+เà¸à¸·à¹‰à¸­à¸à¸¹à¸¥
+เà¸à¸·à¸­à¸š
+เà¸à¸·à¸­à¸šà¹„ป
+à¹à¸
+à¹à¸à¹ˆ
+à¹à¸à¹‰
+à¹à¸à¹ˆà¸à¸¥à¹‰à¸²
+à¹à¸à¹‰à¹€à¸à¸µà¹‰à¸¢à¸§
+à¹à¸à¹‰à¸‚ัด
+à¹à¸à¹‰à¹„ข
+à¹à¸à¹‰à¹à¸„้น
+à¹à¸à¸‡
+à¹à¸à¹ˆà¸‡
+à¹à¸à¹‰à¸‡
+à¹à¸à¹Šà¸‡
+à¹à¸à¹‰à¸‡à¸à¹‰à¸™
+à¹à¸à¸‡à¸‚ม
+à¹à¸à¸‡à¸ˆà¸·à¸”
+à¹à¸à¸‡à¹„ด
+à¹à¸à¸‡à¹à¸™à¸‡
+à¹à¸à¸‡à¸šà¸§à¸”
+à¹à¸à¸‡à¹€à¸œà¹‡à¸”
+à¹à¸à¹ˆà¸‡à¹à¸¢à¹ˆà¸‡
+à¹à¸à¸‡à¸£à¹‰à¸­à¸™
+à¹à¸à¸‡à¸ªà¹‰à¸¡
+à¹à¸à¹ˆà¸”ีà¸à¸£à¸µ
+à¹à¸à¹ˆà¹à¸”ด
+à¹à¸à¹‚ดลิเนียม
+à¹à¸à¹‰à¸•à¸
+à¹à¸à¹ˆà¸•à¸±à¸§
+à¹à¸à¹‰à¸•à¸±à¸§
+à¹à¸à¹‰à¸•à¹ˆà¸²à¸‡
+à¹à¸à¹‰à¸—ี
+à¹à¸à¹‰à¹‚ทษ
+à¹à¸à¸™
+à¹à¸à¹ˆà¸™
+à¹à¸à¹ˆà¸™à¹à¸à¹‰à¸§
+à¹à¸à¹ˆà¸™à¸ªà¸²à¸£
+à¹à¸à¸™à¸°
+à¹à¸à¹à¸™
+à¹à¸à¹‰à¸šà¸™
+à¹à¸à¹ˆà¸šà¹‰à¸²à¸™
+à¹à¸à¹‰à¸šà¸²à¸›
+à¹à¸à¹Šà¸›
+à¹à¸à¹‰à¹€à¸œà¹‡à¸”
+à¹à¸à¹‰à¸à¸±à¸™
+à¹à¸à¹ˆà¹„ฟ
+à¹à¸à¸¡
+à¹à¸à¹‰à¸¡
+à¹à¸à¹‰à¸¡à¸Šà¹‰à¸³
+à¹à¸à¹‰à¸¡à¹à¸”ง
+à¹à¸à¸¡à¸¡à¸²
+à¹à¸à¹‰à¸¡à¹à¸«à¸¡à¹ˆà¸¡
+à¹à¸à¹‰à¸¡à¸·à¸­
+à¹à¸à¸£à¸
+à¹à¸à¸£à¹ˆà¸‡
+à¹à¸à¸£à¹‡à¸™
+à¹à¸à¸£à¸™à¸´à¸•
+à¹à¸à¸£à¹„ฟต์
+à¹à¸à¸£à¹ˆà¸§
+à¹à¸à¸£à¸°
+à¹à¸à¹ˆà¹à¸£à¸”
+à¹à¸à¸¥
+à¹à¸à¸¥à¹ˆ
+à¹à¸à¸¥à¹‰à¸‡
+à¹à¸à¸¥à¹‰à¸‡à¹€à¸à¸¥à¸²
+à¹à¸à¸¥à¸™
+à¹à¸à¸¥à¸š
+à¹à¸à¸¥à¸šà¸«à¸™à¸¹
+à¹à¸à¸¥à¸šà¸«à¸¹à¸«à¸™à¸¹
+à¹à¸à¸¥à¹‰à¸¡
+à¹à¸à¸¥à¸¥à¸­à¸™
+à¹à¸à¸¥à¹€à¸¥à¸µà¸¢à¸¡
+à¹à¸à¸¥à¹‰à¸§
+à¹à¸à¸¥à¸°
+à¹à¸à¹‰à¸¥à¸³
+à¹à¸à¹à¸¥
+à¹à¸à¸§
+à¹à¸à¹‰à¸§
+à¹à¸à¹‰à¸§à¸à¹Šà¸­
+à¹à¸à¹‰à¸§à¸à¸¸à¹‰à¸‡
+à¹à¸à¹‰à¸§à¹à¸à¸¥à¸š
+à¹à¸à¸§à¹ˆà¸‡
+à¹à¸à¸§à¹ˆà¸‡à¹„à¸à¸§
+à¹à¸à¸§à¹ˆà¸‡à¸•à¸µà¸™à¸«à¸²à¹€à¸ªà¸µà¹‰à¸¢à¸™
+à¹à¸à¹‰à¸§à¸Šà¸´à¸‡à¸”วง
+à¹à¸à¹‰à¸§à¸•à¸²
+à¹à¸à¸§à¹ˆà¸™
+à¹à¸à¹‰à¸§à¸œà¸¥à¸¶à¸
+à¹à¸à¹‰à¸§à¸¡à¸£à¸à¸•
+à¹à¸à¹‰à¸§à¸§à¸´à¹€à¸Šà¸µà¸¢à¸£
+à¹à¸à¹‰à¸§à¸ªà¸²à¸£à¸žà¸±à¸”นึà¸
+à¹à¸à¹‰à¸§à¸ªà¸µà¹„ม้ไผ่
+à¹à¸à¹‰à¸§à¸«à¸´à¸™
+à¹à¸à¹‰à¸§à¸«à¸¹
+à¹à¸à¹ˆà¸§à¸±à¸”
+à¹à¸à¹Šà¸ª
+à¹à¸à¹Šà¸ªà¹„ข่เน่า
+à¹à¸à¹Šà¸ªà¹€à¸‰à¸·à¹ˆà¸­à¸¢
+à¹à¸à¹Šà¸ªà¸™à¹‰à¸³à¸•à¸²
+à¹à¸à¹‰à¸«à¸™à¹‰à¸²
+à¹à¸à¸°
+à¹à¸à¸°à¸”ำ
+à¹à¸à¸°à¸£à¸­à¸¢
+à¹à¸à¸°à¸ªà¸°à¹€à¸à¹‡à¸”
+โà¸à¹ˆ
+โà¸à¹‰
+โà¸à¹‹
+โà¸à¸
+โà¸à¸à¹€à¸à¸
+โà¸à¸à¸™à¸¸à¸—
+โà¸à¸à¸´à¸¥-
+โà¸à¸à¸´à¸¥à¸²
+โà¸à¹‚à¸à¹‰
+โà¸à¸‡
+โà¸à¹ˆà¸‡
+โà¸à¸‡à¸à¸²à¸‡
+โà¸à¹‰à¸‡à¹€à¸à¹‰à¸‡
+โà¸à¸‡à¹‚à¸à¹‰
+โà¸à¹‰à¸‡à¹‚ค้ง
+โà¸à¹€à¸Šà¸²à¸§à¹Œ
+โà¸à¸à¸ˆ-
+โà¸à¸à¸ˆà¸™
+โà¸à¸à¸ˆà¸™à¸²à¸—
+โà¸à¸à¸ˆà¸²
+โà¸à¸à¸´
+โà¸à¸
+โà¸à¸à¸à¸£à¸°à¸”ูà¸
+โà¸à¸à¸à¸°à¸à¸¥à¸´à¹‰à¸‡
+โà¸à¸à¸à¸±à¸à¸à¸£à¸²
+โà¸à¸à¸à¹‰à¸²à¸™à¸žà¸£à¹‰à¸²à¸§
+โà¸à¸à¹€à¸‚มา
+โà¸à¸à¸ˆà¸¸à¸¬à¸²à¸¥à¸±à¸¡à¸žà¸²
+โà¸à¸à¸ˆà¸¸à¸¬à¸²à¸¥à¸³à¸žà¸²
+โà¸à¸à¸Šà¸Žà¸²à¸¡à¸±à¸‡à¸©à¸µ
+โà¸à¸à¸Šà¸Žà¸²à¸¡à¸±à¸‡à¸ªà¸µ
+โà¸à¸à¹€à¸Šà¸µà¸¢à¸‡
+โà¸à¸à¸™à¹‰à¸³à¹€à¸•à¹‰à¸²
+โà¸à¸à¸žà¸¸à¸‡à¸›à¸¥à¸²
+โà¸à¸à¸ªà¸­
+โà¸à¸à¸«à¸­à¸¡
+โà¸à¸à¸«à¸±à¸§à¸šà¸±à¸§
+โà¸à¸à¸²à¸ª
+โà¸à¸“
+โà¸à¸“à¸
+โà¸à¸”ัง
+โà¸à¸•à¹„ต
+โà¸à¸—ัณฑ์
+โà¸à¸™
+โà¸à¹ˆà¸™
+โà¸à¹‹à¸™
+โà¸à¸›à¸´à¸™à¸³
+โà¸à¸¡à¸¥
+โà¸à¸¡à¸¸à¸—
+โà¸à¹€à¸¡à¸™
+โà¸à¹€à¸¡à¸¨
+โà¸à¸¢
+โà¸à¸¢à¸—้อง
+โà¸à¸£à¹‰
+โà¸à¸£à¸
+โà¸à¸£à¸à¸à¸£à¸²à¸
+โà¸à¸£à¸à¹„à¸à¸£
+โà¸à¸£à¸à¸˜à¸²à¸£
+โà¸à¸£à¸à¸«à¸§à¸±à¸”
+โà¸à¸£à¸‡
+โà¸à¸£à¹ˆà¸‡
+โà¸à¸£à¹ˆà¸‡à¸à¸£à¹ˆà¸²à¸‡
+โà¸à¸£à¸‡à¹€à¸à¸£à¸‡
+โà¸à¸£à¹‹à¸‡à¹€à¸à¸£à¹‹à¸‡
+โà¸à¸£à¸à¸ˆ
+โà¸à¸£à¸”
+โà¸à¸£à¸•à¹‹à¸™
+โà¸à¸£à¸˜
+โà¸à¸£à¸˜à¸‚ึ้ง
+โà¸à¸£à¸˜à¸²
+โà¸à¸£à¹‹à¸™
+โà¸à¸£à¹‹à¸™à¹€à¸à¸£à¹‹à¸™
+โà¸à¸£à¸¡
+โà¸à¸£à¸¡à¸˜à¸²à¸•à¸¸
+โà¸à¸£à¸¢
+โà¸à¸£à¸¨
+โà¸à¹‚รโà¸à¹€à¸•
+โà¸à¹‚รโà¸à¹‚รà¸
+โà¸à¹‚รโà¸à¹‚ส
+โà¸à¸¥à¸‡
+โà¸à¸¥à¸™
+โà¸à¸¥à¸²à¸«à¸¥
+โà¸à¹„ล
+โà¸à¸§à¸´à¸—
+โà¸à¸§à¸´à¸¬à¸²à¸£
+โà¸à¸¨
+โà¸à¸¨à¸¥
+โà¸à¸©
+โà¸à¸©à¸¡
+โà¸à¸©à¸¢
+โà¸à¸©à¸µà¸¢à¹Œ
+โà¸à¸ª
+โà¸à¸ªà¸™
+โà¸à¸ªà¸±à¸Š
+โà¸à¸ªà¸´à¸™à¸—ร์
+โà¸à¸ªà¸µà¸¢à¹Œ
+โà¸à¸ªà¸¸à¸¡
+โà¸à¹„สย
+โà¸à¸«à¸
+โà¸à¸«à¸§à¸²
+ใà¸à¸¥à¹‰
+ใà¸à¸¥à¹‰à¹€à¸à¸¥à¸·à¸­à¸à¸´à¸™à¸”่าง
+ไà¸
+ไà¸à¹ˆ
+ไà¸à¹‰
+ไà¸à¹Š
+ไà¸à¹‹
+ไà¸à¹ˆà¸à¸­à¸¡
+ไà¸à¹ˆà¹à¸à¹ˆà¹à¸¡à¹ˆà¸›à¸¥à¸²à¸Šà¹ˆà¸­à¸™
+ไà¸à¹ˆà¹à¸à¹‰à¸§
+ไà¸à¹ˆà¹€à¸‚ี่ย
+ไà¸à¹ˆà¸Šà¸™
+ไà¸à¹‹à¹à¸”ง
+ไà¸à¹ˆà¹€à¸•à¸µà¹‰à¸¢
+ไà¸à¹ˆà¸™à¸²
+ไà¸à¹ˆà¸›à¹ˆà¸²
+ไà¸à¸žà¸±à¸¥
+ไà¸à¹ˆà¸Ÿà¹‰à¸²
+ไà¸à¹ˆà¸Ÿà¹‰à¸²à¸žà¸à¸²à¸¥à¸­
+ไà¸à¸£
+ไà¸à¸£à¸ž
+ไà¸à¸£à¸¥à¸²à¸ª
+ไà¸à¸£à¸¨à¸£
+ไà¸à¸£à¸¨à¸£à¸µ
+ไà¸à¸£à¸ªà¸£
+ไà¸à¸£à¸ªà¸£à¸µ
+ไà¸à¸£à¸ªà¸´à¸—ธิ
+ไà¸à¹ˆà¸£à¸­à¸‡à¸šà¹ˆà¸­à¸™
+ไà¸à¸¥
+ไà¸à¸¥à¹ˆ
+ไà¸à¸¥à¹ˆà¹€à¸à¸¥à¸µà¹ˆà¸¢
+ไà¸à¸¥à¸›à¸·à¸™à¹€à¸—ี่ยง
+ไà¸à¸¥à¸²à¸ª
+ไà¸à¸§
+ไà¸à¸§à¸±à¸¥
+ไà¸à¹ˆà¸ªà¸²à¸¡à¸­à¸¢à¹ˆà¸²à¸‡
+ไà¸à¹ˆà¹€à¸«à¹‡à¸™à¸•à¸µà¸™à¸‡à¸¹ งูเห็นนมไà¸à¹ˆ
+ไà¸à¹ˆà¹‚ห่
+ไà¸à¹ˆà¹„ห้
+ไà¸à¹ˆà¸­à¹ˆà¸­à¸™
+ข
+ขง
+ขงจื๊อ
+ขจร
+ขจรจบ
+ขจอà¸
+ขจัด
+ขจัดขจาย
+ขจ่าง
+ขจาย
+ขจาว
+ขจิต
+ขจิริด
+ขจี
+ขจุย
+ขเจา
+ขณะ
+ขด
+ขดถวาย
+ขดาน
+ขตอย
+ขทิง
+ขทึง
+ขน
+ข้น
+ข้นà¹à¸„้น
+ขนง
+ขนงเนื้อ
+ขนด
+ขนทรายเข้าวัด
+ขนน
+ขนบ
+ขนบธรรมเนียม
+ขนบประเพณี
+ขนพอง
+ขนเพชร
+ขนม
+ขนมครà¸
+ขนมจีน
+ขนมทราย
+ขนมผสมน้ำยา
+ขนมผัà¸à¸à¸²à¸”
+ขนมเส้น
+ขนมหัวผัà¸à¸à¸²à¸”
+ขนà¹à¸¡à¸§
+ขนลุà¸
+ขนลุà¸à¸‚นพอง
+ขนส่ง
+ขนสัตว์
+ขนหน้าà¹à¸‚้งไม่ร่วง
+ขนหนู
+ขนหยอง
+ขนอง
+ขนอน
+ขนอบ
+ขนอุย
+ขนัด
+ขนัน
+ขนาà¸
+ขนาง
+ขนาด
+ขนาน
+ขนานน้ำ
+ขนานลี่
+ขนาบ
+ขนาย
+ขนำ
+ขนิษà¸
+ขนิษà¸à¸²
+ขนุน
+ขนุนนà¸
+ขนุนป่า
+ขนุนสำปะลอ
+ขบ
+ขบขัน
+ขบเขี้ยวเคี้ยวฟัน
+ขบคิด
+ขบฉัน
+ขบถ
+ขบปัà¸à¸«à¸²
+ขบเผาะ
+ขบไม่à¹à¸•à¸
+ขบวน
+ขบวนà¸à¸²à¸£
+ขบวร
+ขบูร
+ขม
+ข่ม
+ข่มขวัà¸
+ข่มขี่
+ขมขื่น
+ข่มขืน
+ข่มขืนà¸à¸£à¸°à¸—ำชำเรา
+ข่มขืนใจ
+ข่มขู่
+ข่มเขาโคขืนให้à¸à¸´à¸™à¸«à¸à¹‰à¸²
+ขมงโà¸à¸£à¸¢
+ข่มท้อง
+ข่มนาม
+ขมเป็นยา
+ขมม
+ขมวด
+ขมวดยา
+ขมวน
+ข่มหมู
+ขมหิน
+ข่มเหง
+ข่มเหงคะเนงร้าย
+ขมอง
+ขม่อม
+ขม่อมบาง
+ขมอย
+ขมัง
+ขมับ
+ขมา
+ขม้ำ
+ขมิ้น
+ขมิ้นà¸à¸±à¸šà¸›à¸¹à¸™
+ขมิ้นขาว
+ขมิ้นขึ้น
+ขมิ้นเครือ
+ขมิ้นชัน
+ขมิ้นนาง
+ขมิ้นลิง
+ขมิ้นหัวขึ้น
+ขมิ้นอ้อย
+ขมิบ
+ขมีขมัน
+ขมึง
+ขมึงทึง
+ขมุ
+ขมุà¸à¸‚มัว
+ขมุดขมิด
+ขมุบ
+ขมุบขมิบ
+ขมุม
+ขโมย
+ขย-
+ขยด
+ขยม
+ขย่ม
+ขยล
+ขยอà¸
+ขยอง
+ขย่อน
+ขย้อน
+ขยะ
+ขยะà¹à¸‚ยง
+ขยัà¸
+ขยัà¸à¸‚ย่อน
+ขยัà¸à¸‚ย้อน
+ขยัน
+ขยั้น
+ขยับ
+ขยับขยาย
+ขยับเขยื้อน
+ขยาด
+ขยาบ
+ขยาย
+ขยายขี้เท่อ
+ขยำ
+ขย้ำ
+ขยิà¸
+ขยิบ
+ขยิ่ม
+ขยี้
+ขยี่ขยัน
+ขยุà¸à¸‚ยิà¸
+ขยุà¸à¸‚ยุย
+ขยุบ
+ขยุบขยิบ
+ขยุม
+ขยุ้ม
+ขยุ้มตีนหมา
+ขยุย
+ขรม
+ขรรค-
+ขรรค์
+ขรัว
+ขรัวยาย
+ขริบ
+ขรี
+ขรึม
+ขรุขระ
+ขล้ง
+ขลบ
+ขลม
+ขลวน
+ขล้อเงาะ
+ขล้อเทียน
+ขลัง
+ขลับ
+ขลา
+ขลาด
+ขลาย
+ขลิบ
+ขลึง
+ขลุà¸
+ขลุà¸à¸‚ลัà¸
+ขลุà¸à¸‚ลิà¸
+ขลุà¸à¸‚ลุ่ย
+ขลุบ
+ขลุม
+ขลุมประเจียด
+ขลุ่ย
+ขลู
+ขลู่
+ขวง
+ข่วง
+ขวด
+ขวดตีนช้าง
+ขวดโหล
+ขวน
+ข่วน
+ขวนขวาย
+ขวบ
+ขวย
+ขวยเขิน
+ขวยใจ
+ขวะไขว่เขวี่ย
+ขวัà¸à¹„ขว่
+ขวัà¸
+ขวัà¸à¹€à¸à¸µà¹ˆà¸¢à¸‡
+ขวัà¸à¸‚้าว
+ขวัà¸à¹à¸‚วน
+ขวัà¸à¹ƒà¸ˆ
+ขวัà¸à¸”ี
+ขวัà¸à¸•à¸²
+ขวัà¸à¸šà¹ˆà¸²
+ขวัà¸à¸šà¸´à¸™
+ขวัà¸à¹€à¸¡à¸·à¸­à¸‡
+ขวัà¸à¸«à¸™à¸µ
+ขวัà¸à¸«à¸™à¸µà¸”ีà¸à¹ˆà¸­
+ขวัà¸à¸«à¸²à¸¢
+ขวัà¸à¸­à¹ˆà¸­à¸™
+ขวัด
+ขวัดขวิด
+ขวัดà¹à¸„ว้ง
+ขวั้น
+ขวับ
+ขวับเขวียว
+ขวา
+ขวาà¸
+ขวาà¸à¸«à¸™à¸²à¸¡
+ขวาง
+ขว้าง
+ขว้างà¸à¸²
+ขว้างข้าวเม่า
+ขว้างค้อน
+ขว้างงูไม่พ้นคอ
+ขว้างจัà¸à¸£
+ขวางเชิง
+ขวางๆ รีๆ
+ขวางโลà¸
+ขวาด
+ขวาน
+ขวานผ่าซาà¸
+ขวานฟ้า
+ขวายขวน
+ขวาว
+ขว้าว
+ขวิด
+ขษณะ
+ขษัย
+ขษีณาศรพ
+ขษีร
+ขอ
+ข่อ
+ข้อ
+ขอà¸
+ข้อà¸à¸Žà¸«à¸¡à¸²à¸¢
+ข้อà¸à¸•à¸´à¸à¸²
+ข้อà¸à¸³à¸«à¸™à¸”
+ขอà¹à¸à¸§
+ข้อเขียน
+ข้อไข
+ข้อความ
+ข้อคัดย่อ
+ขอคำน้อย
+ข้อคิด
+ข้อคิดเห็น
+ของ
+ข้อง
+ของà¸à¸¥à¸²à¸‡
+ของà¸à¸­à¸‡
+ของà¸à¸³à¸™à¸±à¸¥
+ของà¸à¸´à¸™
+ของเà¸à¹ˆà¸²
+ของขบเคี้ยว
+ของขลัง
+ของขวัà¸
+ข้องขัด
+ของà¹à¸‚็ง
+ของค้าง
+ของคาว
+ของเค็ม
+ของเคียง
+ของโจร
+ข้องใจ
+ของชำ
+ของใช้
+ของดี
+ของเถื่อน
+ของนอà¸
+ของร้อน
+ของลับ
+ของเล่น
+ของเลื่อน
+ของเลื่อนเตือนขันหมาà¸
+ของวัด
+ของว่าง
+ข้องà¹à¸§à¸°
+ของสงฆ์
+ของสงวน
+ของสด
+ของสดของคาว
+ของสดคาว
+ของหลวง
+ของหวาน
+ของหายตะพายบาป
+ของเหลว
+ของà¹à¸«à¹‰à¸‡
+ของไหล
+ของไหว้
+ของ้อ
+ของ้าว
+ขอฉาย
+ขอช้าง
+ขอด
+ขอดค่อน
+ขอเดชะ
+ขอตัว
+ขอทอง
+ขอทาน
+ขอที
+ข้อเท็จจริง
+ขอโทษ
+ขอน
+ข่อน
+ข้อน
+ขอนดอà¸
+ขอนสัà¸
+ขอนิสัย
+ขอบ
+ขอบข่าย
+ขอบเขต
+ขอบคุณ
+ขอบใจ
+ขอบทาง
+ขอบพระคุณ
+ขอบไร
+ขอบเหล็à¸
+ข้อบังคับ
+ข้อบัà¸à¸à¸±à¸•à¸´
+ขอประทาน
+ขอประทานโทษ
+ข้อปลีà¸à¸¢à¹ˆà¸­à¸¢
+ขอไปที
+ขอเà¸à¹‰à¸²
+ขอพระราชทาน
+ข้อพับ
+ขอม
+ข้อมือขาว
+ข้อมูล
+ข้อà¹à¸¡à¹‰
+ข่อย
+ข้อย
+ข่อยน้ำ
+ข่อยหนาม
+ข่อยหยอง
+ขอยืม
+ขอร้อง
+ขอรับ
+ขอรับà¸à¸£à¸°à¸œà¸¡
+ขอรับผม
+ข้อราชà¸à¸²à¸£
+ขอà¹à¸£à¸‡
+ข้อศอà¸
+ข้อสอบ
+ขอสับ
+ข้อเสือ
+ข้อหา
+ข้อใหà¸à¹ˆà¹ƒà¸ˆà¸„วาม
+ขออภัย
+ข้ออ้อย
+ข้ออ้าง
+ขะข่ำ
+ขะà¹à¸‚่น
+ขะà¹à¸‚้น
+ขะà¹à¸ˆà¸°
+ขะà¹à¸–à¸
+ขะนาน
+ขะเน็ด
+ขะมอมขะà¹à¸¡à¸¡
+ขะมัà¸à¹€à¸‚ม้น
+ขะมุà¸à¸‚ะมอม
+ขะà¹à¸¡à¸‹à¸­
+ขะà¹à¸¡à¸˜à¸¡
+ขะยิà¸
+ขะยุà¸
+ขะเย้อà¹à¸‚ย่ง
+ขะà¹à¸¢à¸°
+ขัค
+ขัง
+ขังข้อ
+ขังขอà¸
+ขังปล้อง
+ขังหน่วย
+ขัช
+ขัชà¸
+ขัณฑ-
+ขัณฑสà¸à¸£
+ขัณฑสีมา
+ขัด
+ขัดเà¸à¸¥à¸²
+ขัดขวาง
+ขัดข้อง
+ขัดขืน
+ขัดเขมร
+ขัดเขิน
+ขัดà¹à¸‚็ง
+ขัดคอ
+ขัดเคือง
+ขัดà¹à¸„้น
+ขัดจังหวะ
+ขัดใจ
+ขัดดอà¸
+ขัดตา
+ขัดตาทัพ
+ขัดตำนาน
+ขัดà¹à¸•à¸°
+ขัดบท
+ขัดเบา
+ขัดมอน
+ขัดมอนตัวผู้
+ขัดมอนหลวง
+ขัดยอà¸
+ขัดà¹à¸¢à¹‰à¸‡
+ขัดลาภ
+ขัดสน
+ขัดสมาธิ
+ขัดหนัà¸
+ขัดห้าง
+ขัดหู
+ขัตติย-
+ขัตติยมานะ
+ขัน
+ขั้น
+ขันà¸à¸§à¹‰à¸²à¸™
+ขันà¹à¸‚็ง
+ขันชะเนาะ
+ขันเชิง
+ขันต่อ
+ขันติ
+ขันตี
+ขันโตà¸
+ขันทองพยาบาท
+ขันที
+ขันธ์
+ขันธาวาร
+ขันน้ำพานรอง
+ขันลงหิน
+ขันสมอ
+ขันสาคร
+ขันสู้
+ขันหมาà¸
+ขันเหม
+ขันอาสา
+ขับ
+ขับขัน
+ขับขี่
+ขับเคลื่อน
+ขับเคี่ยว
+ขับซอ
+ขับถ่าย
+ขับพล
+ขับไม้
+ขับไม้บัณเฑาะว์
+ขับร้อง
+ขัย
+ขัว
+ขั้ว
+ขั้วà¸à¸£à¸°à¸ˆà¸
+ขั้วบวà¸
+ขั้วà¹à¸¡à¹ˆà¹€à¸«à¸¥à¹‡à¸
+ขั้วà¹à¸¡à¹ˆà¹€à¸«à¸¥à¹‡à¸à¹‚ลà¸
+ขั้วลบ
+ขั้วโลà¸
+ขา
+ข่า
+ข้า
+ขาà¸
+ขาà¸à¸š
+ขาà¸à¸£à¸£à¹„ตร
+ขาà¸à¹Šà¸§à¸¢
+ขาà¸à¸­à¸¡
+ขาเà¸à¸§à¸µà¸¢à¸™
+ข้าเà¸à¹ˆà¸²à¹€à¸•à¹ˆà¸²à¹€à¸¥à¸µà¹‰à¸¢à¸‡
+ขาไà¸à¹ˆ
+ขาเขียด
+ขาง
+ข่าง
+ข้าง
+ข้างๆ
+ข้างà¸à¸š
+ข้างà¸à¸£à¸°à¸”าน
+ข้างขึ้น
+ข้างควาย
+ข้างๆ คูๆ
+ข้างเงิน
+ข้างจัน
+ขางดัง
+ขางà¹à¸”ง
+ข้างตà¸
+ข้างตะเภา
+ข้างตีน
+ข้างà¹à¸£à¸¡
+ข้างลาย
+ข้างหัวนอน
+ข้างออà¸
+ขาจร
+ข้าเจ้า
+ขาณุ
+ขาด
+ขาดà¸à¸±à¸™
+ขาดคราว
+ขาดคอช้าง
+ขาดค่า
+ขาดคำ
+ขาดà¹à¸„ลน
+ขาดใจ
+ขาดตà¸à¸šà¸à¸žà¸£à¹ˆà¸­à¸‡
+ขาดตลาด
+ขาดตอน
+ขาดตัว
+ขาดทุน
+ขาดปาà¸
+ขาดมือ
+ขาดเม็ด
+ขาดลอย
+ขาดหัวช้าง
+ขาดเหลือ
+ขาดอายุ
+ข่าà¹à¸”ง
+ข่าต้น
+ขาทนียะ
+ขาทราย
+ข้าไท
+ขาน
+ขานà¸à¸¢à¸²à¸‡
+ขานไข
+ขานนาค
+ขานรหัส
+ข้านอà¸à¹€à¸ˆà¹‰à¸² ข้าวนอà¸à¸«à¸¡à¹‰à¸­
+ข้าน้อย
+ขานาง
+ขาบ
+ขาประจำ
+ข้าà¹à¸œà¹ˆà¸™à¸”ิน
+ข้าเà¸à¹‰à¸²
+ข้าพเจ้า
+ข้าพระ
+ข้าพระพุทธเจ้า
+ขาพับ
+ขาม
+ข่าม
+ข้าม
+ข้ามๆ
+ข้ามน้ำข้ามทะเล
+ข้ามน้ำข้ามท่า
+ข้ามสมุทร
+ข้ามหน้า
+ข้ามหน้าข้ามตา
+ข้ามหัว
+ขาม้า
+ขาย
+ข่าย
+ขายขาด
+ข่ายงาน
+ขายชาติ
+ขายชื่อ
+ขายตัว
+ขายตามคำพรรณนา
+ขายตามตัวอย่าง
+ขายทอดตลาด
+ขายบ้านขายเมือง
+ขายปลีà¸
+ขายผ้าเอาหน้ารอด
+ขายเผื่อชอบ
+ขายà¸à¸²à¸
+ขายส่ง
+ขายหน้า
+ขายหน้าขายตา
+ขายหน้าวันละห้าเบี้ย
+ขายหู
+ขายเหมา
+ข้าราชà¸à¸²à¸£
+ขาล
+ขาว
+ข่าว
+ข้าว
+ข่าวà¸à¸£à¸­à¸‡
+ข้าวà¸à¸£à¸¹
+ข้าวà¸à¸¥à¹‰à¸­à¸‡
+ข้าวà¸à¸¥à¹‰à¸²
+ข้าวเà¸à¸£à¸µà¸¢à¸š
+ข้าวเà¸à¸£à¸µà¸¢à¸šà¸›à¸²à¸à¸«à¸¡à¹‰à¸­
+ข้าวเà¸à¸£à¸µà¸¢à¸šà¸­à¹ˆà¸­à¸™
+ข้าวเà¸à¹ˆà¸²
+ข้าวà¹à¸à¸‡
+ข้าวโà¸à¸š
+ข้าวขวัà¸
+ข้าวของ
+ข้าวข้า
+ข้าวà¹à¸‚à¸
+ข่าวคราว
+ข้าวควบ
+ข้าวคำ
+ข้าวà¹à¸„บ
+ข้าวงัน
+ข้าวจี่
+ขาวจีบ
+ข้าวเจ้า
+ข้าวà¹à¸ˆà¸
+ข้าวà¹à¸Šà¹ˆ
+ข้าวซ้อม
+ข้าวซอย
+ข้าวà¹à¸”à¸à¸‡à¸²
+ข้าวà¹à¸”งà¹à¸à¸‡à¸£à¹‰à¸­à¸™
+ข้าวต้ม
+ข้าวต้มน้ำวุ้น
+ข้าวต้มปัด
+ข้าวตอà¸
+ข้าวตอà¸à¸•à¸±à¹‰à¸‡
+ข้าวตอà¸à¹à¸•à¸
+ข้าวตัง
+ข้าวตาà¸
+ข้าวตู
+ข้าวà¹à¸•à¸
+ข้าวà¹à¸•à¸™
+ข้าวทิพย์
+ข้าวนà¸
+ข้าวนึ่ง
+ข้าวบาตร
+ข้าวบิณฑ์
+ข้าวบุหรี่
+ข้าวเบา
+ข้าวเบือ
+ข้าวประดับดิน
+ข้าวปลูà¸
+ข้าวปัด
+ข้าวป่า
+ข้าวปาด
+ข้าวปุ้น
+ข้าวเปรต
+ข้าวเปลือà¸
+ข้าวเปียà¸
+ข้าวผอà¸
+ข้าวผอà¸à¸à¸£à¸°à¸šà¸­à¸à¸™à¹‰à¸³
+ข้าวพระ
+ขาวพวง
+ข้าวพอง
+ข่าวพาดหัว
+ข้าวโพด
+ข้าวฟ่าง
+ข้าวเภา
+ข้าวมัน
+ขาวม้า
+ข้าวมิ่น
+ข้าวเม่า
+ข้าวเม่าทอด
+ข่าวยà¸à¹€à¸¡à¸†
+ข้าวยาà¸à¸«à¸¡à¸²à¸à¹à¸žà¸‡
+ข้าวยาคู
+ข้าวยำ
+ข้าวเย็นใต้
+ข้าวเย็นเหนือ
+ข้าวละมาน
+ข่าวล่า
+ข่าวสด
+ข้าวสวย
+ข้าวสาà¸
+ข่าวสาร
+ข้าวสาร
+ข้าวสุà¸
+ข้าวเส้น
+ข้าวหนัà¸
+ข้าวหมà¸
+ข้าวหมาà¸
+ข้าวหลาม
+ข้าวหลามตัด
+ข้าวหัวโขน
+ข้าวหางช้าง
+ข้าวเหนียว
+ข้าวเหนียวดำ
+ข้าวเหลือเà¸à¸¥à¸·à¸­à¸­à¸´à¹ˆà¸¡
+ขาวใหà¸à¹ˆ
+ข้าวใหม่
+ข้าวใหม่น้อย
+ข้าวใหม่ปลามัน
+ข้าวใหม่ใหà¸à¹ˆ
+ข้าวอังà¸à¸¸à¸¥à¸µ
+ข้าวฮาง
+ข้าศึà¸
+ขาหมา
+ขาหยั่ง
+ข้าหลวง
+ข้าหลวงเดิม
+ข้าหลวงน้อย
+ข้าหลวงหลังลาย
+ขาอ่อน
+ขำ
+ข่ำเขียว
+ขิà¸
+ขิà¸à¹†
+ขิง
+ขิ่ง
+ขิงà¸à¹‡à¸£à¸² ข่าà¸à¹‡à¹à¸£à¸‡
+ขิงà¹à¸à¸¥à¸‡
+ขิงà¹à¸„รง
+ขิงà¹à¸«à¹‰à¸‡
+ขิด
+ขิปสัทโท
+ขิม
+ขี่
+ขี้
+ขี้à¸à¸š
+ขี้à¸à¸£à¸°à¸—าเà¸à¸¥à¸·à¸­
+ขี้à¸à¹‰à¸­à¸™à¹ƒà¸«à¸à¹ˆà¹ƒà¸«à¹‰à¹€à¸”็à¸à¹€à¸«à¹‡à¸™
+ขี้à¸à¸°à¹‚ล้โท้
+ขี้à¸à¸²
+ขี้à¸à¹‰à¸²à¸‡
+ขี้à¸à¸²à¸”ง
+ขี้à¸à¸²à¹à¸”ง
+ขี้à¸à¸²à¹€à¸«à¸¥à¸µà¹ˆà¸¢à¸¡
+ขี้เà¸à¸¥à¸·à¸­
+ขี้ขม
+ขี้ขวง
+ขี้ข้า
+ขี้ขุย
+ขี้เข็บ
+ขี้ครอà¸
+ขี้ครั่ง
+ขี้ควาย
+ขี้คุà¸
+ขี้เค้า
+ขี้โครง
+ขี้จาบ
+ขี่ช้างจับตั๊à¸à¹à¸•à¸™
+ขี้ซ้าย
+ขี้เซา
+ขี้ไซ้
+ขีณะ
+ขีณาสพ
+ขีด
+ขีดขั้น
+ขีดคร่อม
+ขีดคั่น
+ขีดเส้นตาย
+ขี้เดือด
+ขี้à¹à¸”ด
+ขี้ตด
+ขี้ตังนี
+ขี้ติ้ว
+ขี้ตืด
+ขี้เต่า
+ขี้à¹à¸•à¹‰
+ขี้ไต้
+ขี้ถัง
+ขี้เถ้า
+ขี้ไถ
+ขี้ทา
+ขี้ทูด
+ขี้เท่อ
+ขี้เทา
+ขี้เทือà¸
+ขี้นà¸
+ขีปนาวุธ
+ขีปนาวุธนำวิถี
+ขี้ปะติ๋ว
+ขี้ปาà¸
+ขี้เป้
+ขี้เป็ด
+ขี้ผง
+ขี้ผึ้ง
+ขี้à¸à¸´à¹ˆà¸™
+ขี้à¹à¸žà¹‰à¸Šà¸§à¸™à¸•à¸µ
+ขี้มอด
+ขี้ม้า
+ขี่ม้าตีคลี
+ขี่ม้าเลียบค่าย
+ขี่ม้าส่งเมือง
+ขี้มิ่น
+ขี้มูà¸
+ขี้เมฆ
+ขี้à¹à¸¡à¸¥à¸‡à¸§à¸±à¸™
+ขี้à¹à¸¡à¸§
+ขี้ไม่ให้หมาà¸à¸´à¸™
+ขี้ยอà¸
+ขี้ยา
+ขี้à¹à¸¢
+ขีร
+ขี้รังà¹à¸„
+ขี้ราดโทษล่อง
+ขี้ริ้ว
+ขี้เรื้อน
+ขี้เรื้อนà¸à¸§à¸²à¸‡
+ขี้à¹à¸£à¸”
+ขี้à¹à¸£à¸”ล้อมปรวด
+ขี้ลม
+ขี้ลอà¸
+ขี้ลีบ
+ขี้เล็บ
+ขี้โล้
+ขี้สูด
+ขี้หดตดหาย
+ขี้หนอน
+ขี้หน้า
+ขี้หนู
+ขี้หมา
+ขี้เหร่
+ขี้เหล็à¸
+ขี้ใหม่หมาหอม
+ขี้อ้น
+ขี้อ้าย
+ขึง
+ขึ้ง
+ขึ้งโà¸à¸£à¸˜
+ขึงขัง
+ขึ้งเคียด
+ขึงตา
+ขึงพืด
+ขึงอูด
+ขึ้น
+ขึ้นเขียง
+ขึ้นครู
+ขึ้นคาน
+ขึ้นใจ
+ขึ้นฉ่าย
+ขึ้นชื่อ
+ขึ้นชื่อว่า
+ขึ้นซัง
+ขึ้นต้นไม้สุดยอด
+ขึ้นปาà¸
+ขึ้นพลับพลา
+ขึ้นไม้ขึ้นมือ
+ขึ้นระวาง
+ขึ้นร้าน
+ขึ้นสาย
+ขึ้นเสียง
+ขึ้นหน้าขึ้นตา
+ขึ้นหม้อ
+ขึ้นหา
+ขึ้นเหนือล่องใต้
+ขืน
+ขื่น
+ขื่นขม
+ขืนใจ
+ขื่อ
+ขื่อà¸à¸°à¸¥à¸°à¸›à¸±à¸‡à¸«à¸²
+ขื่อขวาง
+ขื่อคัด
+ขื่อจมูà¸
+ขื่อเท่าต่อ
+ขื่อผี
+ขื่อมุà¸
+ขื่อหมู่
+ขุà¸
+ขุด
+ขุดคุ้ย
+ขุดด้วยปาà¸à¸–าà¸à¸”้วยตา
+ขุดดินà¸à¸´à¸™à¸«à¸à¹‰à¸²
+ขุดบ่อล่อปลา
+ขุน
+ขุ่น
+ขุ่นข้องหมองใจ
+ขุ่นเคือง
+ขุ่นà¹à¸„้น
+ขุ่นใจ
+ขุนทอง
+ขุนนาง
+ขุนนางใช่พ่อà¹à¸¡à¹ˆ หินà¹à¸‡à¹ˆà¹ƒà¸Šà¹ˆà¸•à¸²à¸¢à¸²à¸¢
+ขุนน้ำ
+ขุนบาล
+ขุนà¹à¸œà¸™
+ขุนพล
+ขุนพัฒน์
+ขุนเพ็ด
+ขุ่นมัว
+ขุนไม่ขึ้น
+ขุนศาล
+ขุนศึà¸
+ขุ่นหมอง
+ขุนหมื่น
+ขุนหลวง
+ขุม
+ขุย
+ขุยไผ่
+ขุยอินทรีย์
+ขู
+ขู่
+ขู่à¸à¸£à¸£à¹‚ชà¸
+ขู่ขวัà¸
+ขู่เข็à¸
+ขูด
+ขูดรีด
+ขูดเลือด
+ขูดเลือดขูดเนื้อ
+เข
+เข้
+เขà¸
+เข็ง
+เข่ง
+เขจร
+เข็à¸
+เข็à¸à¹ƒà¸ˆ
+เข็ด
+เข็ดข้อ
+เข็ดข้อเข็ดลำ
+เข็ดเขี้ยว
+เข็ดฟัน
+เขดา
+เขต
+เขตà¹à¸”น
+เขตเลือà¸à¸•à¸±à¹‰à¸‡
+เขตอำนาจศาล
+เขน
+เข็น
+เข่น
+เข่นเขี้ยว
+เข็นครà¸à¸‚ึ้นภูเขา
+เข่นฆ่า
+เขนง
+เขนงนายพราน
+เขน็ด
+เขนย
+เขบ็จขบวน
+เขบ็ต
+เขม-
+เข็ม
+เข้ม
+เข็มà¸à¸¥à¸±à¸”
+เข้มข้น
+เข็มขัด
+เข้มขาบ
+เข้มขาบไหม
+เข้มà¹à¸‚็ง
+เข็มควัà¸
+เขม็ง
+เข้มงวด
+เข็มซ่อนปลาย
+เขม็ดà¹à¸‚ม่
+เข็มทิศ
+เขม่น
+เขม้น
+เขม้นขะมัà¸
+เขมร
+เขมรไทรโยค
+เขมรพวง
+เขมรราชบุรี
+เขมรเหลือง
+เขมรใหà¸à¹ˆ
+เขมา
+เขม่า
+เขมาโà¸à¸£à¸¢
+เขม่าซาง
+เขมือบ
+เขย
+เขยà¸
+เขย่ง
+เขย่งเà¸à¹‡à¸‡à¸à¸­à¸¢
+เขยตาย
+เขย้อà¹à¸‚ย่ง
+เขยอะขยะ
+เขย่า
+เขยิน
+เขยิบ
+เขยิบขยาบ
+เขยิบà¸à¸²à¸™à¸°
+เขยียวขยอน
+เขยื้อน
+เขรอะ
+เขลง
+เขลอะ
+เขละ
+เขลา
+เขลาะ
+เขว
+เขษตร
+เขษม
+เขษียร
+เขฬะ
+เขะขะ
+เขา
+เข่า
+เข้า
+เข้าà¸à¸£à¸°à¹‚จม
+เข้าà¸à¸£à¸°à¸”ูà¸à¸”ำ
+เขาà¸à¸§à¸²à¸‡
+เข้าเà¸à¸“ฑ์
+เข้าเà¸à¸µà¸¢
+เขาà¹à¸à¸°
+เข้าข้อ
+เข้าขา
+เข้าข้าง
+เข้าคอ
+เข้าคิว
+เข้าคู่
+เข้าเครื่อง
+เข้าเค้า
+เข้าไคล
+เข้าเงียบ
+เข้าà¹à¸‡à¹ˆ
+เข้าเจ้า
+เข้าเจ้าเข้านาย
+เข้าใจ
+เข้าชื่อ
+เข้าฌาน
+เข้าด้ายเข้าเข็ม
+เข้าเดือย
+เข้าตรีทูต
+เข้าตอง
+เข้าตัว
+เข้าตาจน
+เข้าตามตรอà¸à¸­à¸­à¸à¸•à¸²à¸¡à¸›à¸£à¸°à¸•à¸¹
+เข้าตาร้าย
+เข้าตำรา
+เข้าตู้
+เข้าไต้เข้าไฟ
+เข้าถ้ำ
+เข้าถึง
+เข้าเถื่อนอย่าลืมพร้า
+เข้าทรง
+เข้าท่า
+เข้าที
+เข้าที่
+เข้าทุน
+เข้านอà¸à¸­à¸­à¸à¹ƒà¸™
+เข้าเนื้อ
+เข้าà¹à¸šà¸š
+เข้าà¹à¸šà¸šà¹€à¸‚้าà¹à¸œà¸™
+เข้าปà¸
+เข้าปาà¸à¹„ม้
+เข้าปิ้ง
+เข้าปีà¸
+เขาเปล้า
+เข้าไป
+เข้าผี
+เข้าผู้เข้าคน
+เข้าà¸à¸±à¸
+เข้าà¸à¸±à¸™
+เข้าเà¸à¹‰à¸²
+เข้าเà¸à¸·à¸­à¸
+เข้าพà¸à¹€à¸‚้าห่อ
+เข้าพรรษา
+เข้าพระเข้านาง
+เข้าพุง
+เขามอ
+เข้าม่าน
+เข้าเมืองตาหลิ่วต้องหลิ่วตาตาม
+เข้าไม้
+เข้ายา
+เข้ารà¸à¹€à¸‚้าพง
+เข้ารหัส
+เข้าร่องเข้ารอย
+เข้ารอบ
+เข้ารอย
+เข้าร้าย
+เข้ารีต
+เข้ารูป
+เข้ารูปเข้ารอย
+เข่าลา
+เข้าลิ้น
+เข้าเล่ม
+เข้าเลือด
+เข้าเลือดเข้าเนื้อ
+เข้าโลง
+เข้าวัดเข้าวา
+เข้าว่า
+เข้าเวร
+เข้าà¹à¸§à¹ˆà¸™
+เข้าเศียร
+เข้าสมาธิ
+เข้าสุหนัต
+เข้าใส่
+เข้าไส้
+เข้าหน้า
+เข้าหม้อ
+เข้าหมิ้น
+เข้าหลัà¸
+เข้าหา
+เข้าหุ้น
+เข้าหู
+เข้าหูซ้ายทะลุหูขวา
+เข้าให้
+เข้าไหนเข้าได้
+เขาอ่อน
+เข่าอ่อน
+เขิง
+เขิน
+เขิบ
+เขี่ย
+เขียง
+เขียงเท้า
+เขียงพระนางอี่
+เขียงพร้า
+เขียด
+เขียดตะปาด
+เขียน
+เขี่ยน
+เขียนด้วยมือลบด้วยตีน
+เขียนทอง
+เขียนไทย
+เขียนเสือให้วัวà¸à¸¥à¸±à¸§
+เขียม
+เขียว
+เขี้ยว
+เขี้ยวà¸à¸£à¸°à¹à¸•
+เขี้ยวà¹à¸à¹‰à¸§
+เขียวไข่à¸à¸²
+เขี้ยวงู
+เขี้ยวตะขาบ
+เขี้ยวเนื้อ
+เขียวพระอินทร์
+เขี้ยวเล็บ
+เขียวเสวย
+เขี้ยวหนุมาน
+เขี้ยวหมา
+เขียวหวาน
+เขียวหางไหม้
+เขียะ
+เขือ
+เขือง
+เขื่อง
+เขื่อน
+เขื่อนเพชร
+เขือม
+à¹à¸‚
+à¹à¸‚้
+à¹à¸‚à¸
+à¹à¸‚à¸à¹€à¸•à¹‰à¸²
+à¹à¸‚à¸à¹€à¸•à¹‰à¸²à¹€à¸‚้ารัง
+à¹à¸‚à¸à¹€à¸¡à¸·à¸­à¸‡
+à¹à¸‚็ง
+à¹à¸‚่ง
+à¹à¸‚้ง
+à¹à¸‚็งà¸à¸£à¹‰à¸²à¸§
+à¹à¸‚็งà¸à¸¥à¹‰à¸²
+à¹à¸‚็งà¹à¸à¸£à¹ˆà¸‡
+à¹à¸‚้งไà¸à¹ˆ
+à¹à¸‚็งข้อ
+à¹à¸‚็งขัน
+à¹à¸‚่งขัน
+à¹à¸‚็งใจ
+à¹à¸‚็งตัว
+à¹à¸‚็งมือ
+à¹à¸‚็งเมือง
+à¹à¸‚็งà¹à¸£à¸‡
+à¹à¸‚้งสิงห์
+à¹à¸‚น
+à¹à¸‚่น
+à¹à¸‚้น
+à¹à¸‚นขวา
+à¹à¸‚นคู้
+à¹à¸‚นง
+à¹à¸‚นซ้ายà¹à¸‚นขวา
+à¹à¸‚นทุà¸à¸‚์
+à¹à¸‚นนาง
+à¹à¸‚นพับ
+à¹à¸‚นะ
+à¹à¸‚ม
+à¹à¸‚ม็บ
+à¹à¸‚ม่ว
+à¹à¸‚ย็à¸à¹†
+à¹à¸‚ยง
+à¹à¸‚ย่ง
+à¹à¸‚ยงà¹à¸‚งขน
+à¹à¸‚ยงหนู
+à¹à¸‚ละ
+à¹à¸‚วà¸
+à¹à¸‚วง
+à¹à¸‚วน
+à¹à¸‚วนคอ
+à¹à¸‚วนนวม
+à¹à¸‚วนลอย
+à¹à¸‚วะ
+à¹à¸‚สร์
+โข
+โขà¸
+โขà¸à¸ªà¸±à¸š
+โขง
+โข่ง
+โข่งทะเล
+โขด
+โขดง
+โขน
+โขนง
+โขม
+โขม-
+โขมง
+โขมด
+โขมดยา
+โขยà¸
+โขยà¸à¹€à¸‚ยà¸
+โขยง
+โขย่ง
+โขยด
+โขยม
+โขลà¸
+โขลà¸à¹†
+โขลง
+โขลน
+โขลนทวาร
+โขษม
+ไข
+ไข่
+ไข้
+ไขà¸à¸£à¸°à¸”ูà¸
+ไข้à¸à¸²à¸¬
+ไข้à¸à¸²à¸¬à¸™à¸à¸™à¸²à¸‡à¹à¸­à¹ˆà¸™
+ไข้à¸à¸²à¸¬à¸«à¸¥à¸±à¸‡à¹à¸­à¹ˆà¸™
+ไข้à¸à¸³à¹€à¸”า
+ไข่ไà¸à¹ˆ
+ไข่ขวัà¸
+ไขข้อ
+ไข่ขาง
+ไข่ขาว
+ไข่ข้าว
+ไขควง
+ไข้ความร้อน
+ไข่เค็ม
+ไข่จระเข้
+ไข้จับสั่น
+ไข่จิ้งจà¸
+ไข่จิ้งหรีด
+ไข่เจียว
+ไข้ใจ
+ไข่à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™
+ไข่ดัน
+ไข่ดันหมู
+ไข่ดาว
+ไข่à¹à¸”ง
+ไข้à¹à¸”ด
+ไข่ตายโคม
+ไข่ตุ๋น
+ไข่เต่า
+ไข้ทรพิษ
+ไข้ทับระดู
+ไข่นà¸à¸à¸£à¸°à¸ªà¸²
+ไขน้ำ
+ไข่น้ำ
+ไข่น้ำค้าง
+ไข่เน่า
+ไข่ในหิน
+ไข่ปลา
+ไข้ปอดบวม
+ไข้ป่า
+ไขพระวิสูตร
+ไข่พอà¸
+ไข้พิษ
+ไขมัน
+ไข้มาลาเรีย
+ไข่มุà¸
+ไขย่น
+ไข่เยี่ยวม้า
+ไขรา
+ไข่ลม
+ไขลาน
+ไข่ลูà¸à¹€à¸‚ย
+ไข่ลูà¸à¸¢à¸­à¸”
+ไข้เลือดออà¸
+ไขว่
+ไขว้
+ไขว้เขว
+ไขว่คว้า
+ไขว้โรง
+ไขว่ห้าง
+ไขษย
+ไข้สันนิบาต
+ไขสันหลัง
+ไขสันหลังอัà¸à¹€à¸ªà¸š
+ไข่สำเภา
+ไขสือ
+ไขเสนียด
+ไข่หงส์
+ไข้หวัด
+ไข้หวัดใหà¸à¹ˆ
+ไข่หวาน
+ไข้หัว
+ไข้หัวลม
+ไข่หำ
+ไข่หิน
+ไขหู
+ไข้เหลือง
+ไข่เหา
+ไข่เหี้ย
+ไข่à¹à¸«à¸™
+ฃ
+ค
+คคน-
+คคนะ
+คคนัมพร
+คคนางค์
+คคนานต์
+คง
+คงà¸à¸£à¸°à¸žà¸±à¸™
+คงà¸à¸£à¸°à¸žà¸±à¸™à¸Šà¸²à¸•à¸£à¸µ
+คงà¹à¸à¹ˆà¹€à¸£à¸µà¸¢à¸™
+คงขาด
+คงคลัง
+คงคา
+คงคาเดือด
+คงคาลัย
+คงไคย
+คงตัว
+คงทน
+คงที่
+คงเส้นคงวา
+คงเหลือ
+คช-
+คชà¸à¸£à¸£à¸¡
+คชนาม
+คชราช
+คชลัà¸à¸©à¸“์
+คชศาสตร์
+คชส่าน
+คชสาร
+คชสีห์
+คชาชาติ
+คชาชีพ
+คชาธาร
+คชาภรณ์
+คชินทร์
+คเชนทร์
+คณ-
+คณน
+คณนา
+คณบดี
+คณะ
+คณะรัà¸à¸¡à¸™à¸•à¸£à¸µ
+คณาจารย์
+คณาธิà¸à¸²à¸£
+คณาธิปไตย
+คณิà¸à¸²
+คณิต
+คณิต-
+คณิตศาสตร์
+คเณศ
+คด
+คดà¸à¸£à¸´à¸Š
+คดโà¸à¸‡
+คดเคี้ยว
+คดงอ
+คดซ่าง
+คดในข้องอในà¸à¸£à¸°à¸”ูà¸
+คดสร้าง
+คดี
+คดีดำ
+คดีà¹à¸”ง
+คดีà¹à¸žà¹ˆà¸‡
+คดีมโนสาเร่
+คดีอนาถา
+คดีอาà¸à¸²
+-คต
+คติ
+คติชาวบ้าน
+คติธรรม
+คตินิยม
+คติพจน์
+คทา
+คน
+ค้น
+คนà¸à¸¥à¸²à¸‡
+คนไข้
+คนไข้นอà¸
+คนไข้ใน
+ค้นคว้า
+คนจร
+คนจริง
+คนใช้
+คนดีผีคุ้ม
+คนต้องขัง
+คนทรง
+คนทา
+คนทิสอ
+คนทิสอทะเล
+คนที
+คนทีเขมา
+คนทีสอ
+คนโท
+คนธ์
+คนธรรพ-
+คนธรรพ์
+คนธรรพวิวาห์
+คนธรรพศาสตร์
+คนนอà¸
+คนใน
+คนเมือง
+คนรัà¸à¹€à¸—่าผืนหนัง คนชังเท่าผืนเสื่อ
+คนร้าย
+คนไร้ความสามารถ
+คนละ
+คนละไม้คนละมือ
+คนสวน
+คนสาบสูà¸
+คนเสมือนไร้ความสามารถ
+ค้นหูà¸
+คนใหà¸à¹ˆà¸„นโต
+คเนจร
+คบ
+คบคนให้ดูหน้า ซื้อผ้าให้ดูเนื้อ
+คบค้า
+คบคิด
+คบชู้
+คบเพลิง
+คบไฟ
+คบหา
+คม
+คมà¸à¸£à¸´à¸š
+คมขำ
+คมคาย
+คมน-
+คมน์
+คมนาà¸à¸²à¸£
+คมนาคม
+คมในà¸à¸±à¸
+คมบาง
+คมสัน
+คมิà¸à¸ à¸±à¸•
+ครà¸
+ครà¸à¸à¸°à¹€à¸šà¸·à¸­
+คร่ง
+ครบ
+ครบครัน
+ครบถ้วน
+ครบมือ
+ครรชิต
+ครรภ
+ครรภ-
+ครรภ์
+ครรภธาตุ
+ครรภธาตุมณฑล
+ครรภมณฑล
+ครรภมล
+ครรโภทร
+ครรลอง
+ครรโลง
+ครรไล
+ครรหิต
+ครวà¸
+ครวà¸à¸„ราง
+ครวà¸à¸«à¸²
+ครวัà¸
+ครวี
+ครหา
+ครอà¸
+ครอง
+ครองà¹à¸„รง
+ครองราชสมบัติ
+คร่อเงาะ
+คร่อเทียน
+ครอบ
+ครอบครอง
+ครอบครองปรปัà¸à¸©à¹Œ
+ครอบครัว
+ครอบงำ
+ครอบจัà¸à¸£à¸§à¸²à¸¥
+ครอบตลับ
+คร่อม
+คระ
+คระเมิม
+คระà¹à¸¥à¸‡
+คระไล
+คระà¹à¸§à¸‡
+คระหน
+คระหวน
+คระหาย
+คระหิว
+คระโหย
+ครั่ง
+ครั้ง
+ครัดเคร่ง
+ครัน
+ครั่น
+ครั้น
+ครั่นคร้าม
+ครั่นตัว
+ครั่นเนื้อครั่นตัว
+ครับ
+ครัว
+ครัวทาน
+ครัวไฟ
+ครัวเรือน
+ครา
+คร่า
+คราà¸
+คราง
+คราà¸
+คราด
+คร้าน
+คราบ
+คราบหมู
+คราม
+คร้าม
+ครามครัน
+คราว
+คร่าว
+คร่าวๆ
+คราส
+ครำ
+คร่ำ
+คร่ำครวà¸
+คร่ำคร่า
+คร่ำครึ
+คร่ำเคร่ง
+คร่ำเครอะ
+คร่ำเงิน
+คร่ำทอง
+คร่ำหวอด
+คริปทอน
+คริสต์
+คริสต์มาส
+คริสต์ศัà¸à¸£à¸²à¸Š
+คริสตัง
+คริสเตียน
+ครี้
+ครีครอ
+ครีบ
+ครีบสิงห์
+ครีม
+ครีษมายัน
+ครึ
+ครึà¸à¸„รื้น
+ครึà¸à¹‚ครม
+ครึ่ง
+ครึ่งๆ à¸à¸¥à¸²à¸‡à¹†
+ครึ่งชาติ
+ครึ่งต่อครึ่ง
+ครึน
+ครึม
+ครึ้ม
+ครึมครุ
+ครืด
+ครืน
+ครื้น
+ครืนครั่น
+ครื้นครั่น
+ครื้นครึà¸
+ครื้นเครง
+ครือ
+ครุ
+ครุà¸-
+ครุคระ
+ครุฑ
+ครุฑà¸à¸£à¸°à¸—ง
+ครุฑพ่าห์
+ครุ่น
+ครุ่นคิด
+ครุภัณฑ์
+ครุมเครือ
+ครุย
+ครุวนา
+ครุวาร
+ครุศาสตร์
+ครู
+ครู่
+ครูด
+คฤโฆษ
+คฤนถ์
+คฤห
+คฤห-
+คฤหบดี
+คฤหปัตนี
+คฤหัสถ์
+คฤหา
+คฤหาสน์
+คล
+คลวง
+คลอ
+คล้อ
+คลอà¸
+คลอเคลีย
+คลอà¹à¸„ล
+คล้อà¹à¸„ล้
+คลอง
+คล่อง
+คล้อง
+คล่องà¹à¸„ล่ว
+คล้องจอง
+คล่องตัว
+คลองเลื่อย
+คลองส่งน้ำ
+คลอด
+คลอน
+คลอนà¹à¸„ลน
+คล้อย
+คล้อยคล้อย
+คลอรีน
+คลอโรฟอร์ม
+คลอโรฟีลล์
+คละ
+คละคล่ำ
+คละคลุ้ง
+คละปน
+คลัà¸
+คลั่à¸
+คลั่à¸à¹†
+คลัง
+คลั่ง
+คลังพิมานอาà¸à¸²à¸¨
+คลังเลือด
+คลังสินค้า
+คลังสินค้าทัณฑ์บน
+คลัตช์
+คลับคล้าย
+คลับคล้ายคลับคลา
+คลา
+คล้า
+คลาคล่ำ
+คลาไคล
+คลางà¹à¸„ลง
+คลาด
+คลาดเคลื่อน
+คลาดà¹à¸„ล้ว
+คลาน
+คลาย
+คล้าย
+คลายคล้าย
+คล้ายคล้าย
+คล้ายคลึง
+คลายเคล่ง
+คล่าว
+คลาศ
+คลำ
+คล่ำ
+คล้ำ
+คลิง
+คลิ้งโคลง
+คลิด
+คลินิà¸
+คลี
+คลี่
+คลี่คลาย
+คลึง
+คลึงเคล้น
+คลึงเคล้า
+คลื่น
+คลื่นà¸à¸£à¸°à¸—บà¸à¸±à¹ˆà¸‡
+คลื่นใต้น้ำ
+คลื่นปานà¸à¸¥à¸²à¸‡
+คลื่นà¹à¸¡à¹ˆà¹€à¸«à¸¥à¹‡à¸à¹„ฟฟ้า
+คลื่นยาว
+คลื่นวิทยุ
+คลื่นสั้น
+คลื่นไส้
+คลื่นเหียน
+คลุà¸
+คลุà¸à¸„ลาน
+คลุà¸à¸„ลี
+คลุà¸à¸„ลีตีโมง
+คลุ้ง
+คลุบ
+คลุม
+คลุ่ม
+คลุ้ม
+คลุ้มคลั่ง
+คลุมเครือ
+คลุมถุงชน
+คลุมประทม
+คลุมโปง
+คลุมผทม
+ควง
+ควงà¹à¸‚น
+ควงสว่าน
+ควณ
+ควน
+ควบ
+ควบคุม
+ควบà¹à¸™à¹ˆà¸™
+ควย
+ควร
+ควัà¸
+ควัà¸à¸„้อน
+ควัà¸à¸¥à¸‡à¸«à¸¥à¸¸à¸¡
+ควั่งคว้าง
+ควัน
+ควั่น
+ควั่นจุà¸
+ควันหลง
+คว้า
+ควาà¸
+คว้าไขว่
+คว้าง
+คว้างๆ
+คว้างเคว้ง
+ควาà¸
+ควาน
+คว้าน
+คว้านท้อง
+คว้าน้ำเหลว
+ความ
+ความคลาด
+ความเค้น
+ความเครียด
+ความเฉื่อย
+ความชอบ
+ความชื้น
+ความชื้นสัมบูรณ์
+ความชื้นสัมพัทธ์
+ความถ่วง
+ความถ่วงจำเพาะ
+ความถี่
+ความถี่วิทยุ
+ความโน้มถ่วง
+ความยาวคลื่น
+ความรู้ท่วมหัวเอาตัวไม่รอด
+ความรู้สึà¸à¹€à¸‚ื่อง
+ความรู้สึà¸à¸”้อย
+ความรู้สึà¸à¹€à¸”่น
+ความเร่ง
+ความเร็ว
+ความหน่วง
+ความหลัง
+ควาย
+ควายปละ
+ควายพระอินทร์
+คว่าว
+คว่ำ
+คว่ำบาตร
+คว่ำหลัง
+ควินิน
+ควิวๆ
+ควิวควัง
+ควิวคว่าง
+ควิวคว้าง
+ควีนสิริà¸à¸´à¸•à¸´à¹Œ
+คห-
+คหà¸à¸£à¸£à¸¡à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+คหบดี
+คหปตานี
+คหัà¸
+คอ
+ค้อ
+คอà¸
+ค็อà¸à¸„ัส
+คอà¸à¸Šà¹‰à¸²à¸‡
+ค็อà¸à¹€à¸—ล
+คอà¸à¸£à¸°à¹€à¸Šà¹‰à¸²
+คอà¸à¸¥à¸¡
+คอà¸à¸°à¸¥à¸²à¸ªà¸µ
+คอขาดบาดตาย
+คอà¹à¸‚็ง
+คอคอด
+คอเคซอยด์
+ค่องอ้อย
+คอเชิ้ต
+คอซอง
+คอด
+คอà¹à¸”ง
+คอตà¸
+คอต่อ
+คอตั้ง
+คอตั้งบ่า
+คอตีบ
+คอถ่วง
+คอทองà¹à¸”ง
+คอน
+ค่อน
+ค้อน
+คอนà¸à¸£à¸µà¸•
+คอนà¸à¸£à¸µà¸•à¹€à¸ªà¸£à¸´à¸¡à¹€à¸«à¸¥à¹‡à¸
+คอนà¸à¸£à¸µà¸•à¸­à¸±à¸”à¹à¸£à¸‡
+ค้อนà¸à¸¥à¸­à¸‡
+ค่อนขอด
+ค่อนข้าง
+ค้อนควัà¸
+ค่อนà¹à¸„ะ
+คอนเดนเซอร์
+ค้อนติง
+ค้อนตีหมา
+ค้อนทอง
+คอนà¹à¸§à¸™à¸•à¹Œ
+คอนเสิร์ต
+ค้อนหอย
+คอนาค
+คอบ
+คอบัว
+คอà¹à¸šà¸°
+คอปาด
+คอเป็นเอ็น
+คอพอà¸
+คอพับ
+คอไฟ
+คอม
+ค่อม
+ค้อม
+คอมพิวเตอร์
+คอมมานโด
+คอมมิวนิสต์
+คอม้า
+คอย
+ค่อย
+ค่อยๆ
+ค้อย
+ค่อยดีขึ้น
+คอยท่า
+ค่อยเป็นค่อยไป
+ค่อยยังชั่ว
+คอยล์
+คอยเหตุ
+คอร์ด
+คอรวง
+คอระฆัง
+คอà¹à¸£à¹‰à¸‡
+คอà¹à¸¥à¸™
+คอวี
+คอสติà¸à¹‚ซดา
+คอสอง
+คอสะพาน
+คอสูง
+คอเสื้อ
+คอหอย
+คอหอยà¸à¸±à¸šà¸¥à¸¹à¸à¸à¸£à¸°à¹€à¸”ือà¸
+คอหอยตีบ
+คอหอยพอà¸
+คอห่าน
+คอà¹à¸«à¹‰à¸‡
+คอà¹à¸«à¸¥à¸¡
+คออ่อน
+คอฮาวาย
+คะ
+ค่ะ
+คะไขว่
+คะค้อย
+คะคาน
+คะคึง
+คะนน
+คะนอง
+คะน้า
+คะนึง
+คะเน
+คะเนงร้าย
+คะเน็ด
+คะà¹à¸™à¸™
+คะà¹à¸™à¸™à¸™à¸´à¸¢à¸¡
+คะà¹à¸™à¸™à¹€à¸ªà¸µà¸¢à¸‡
+คะใน
+คะมำ
+คะมึà¸
+คะยั้นคะยอ
+คะเยอ
+คัà¸
+คั่à¸
+คัคน-
+คัคนะ
+คัคนัมพร
+คัคนางค์
+คัคนานต์
+คั่ง
+คั่งค้าง
+คั่งà¹à¸„้น
+คังไคย
+คัจฉ
+คัณฑมาลา
+คัณฑสูตร
+คัด
+คัดค้าน
+คัดเค้า
+คัดง้าง
+คัดฉาà¸
+คัดช้อน
+คัดชุน
+คัดท้าย
+คัดมอน
+คัดเม็ง
+คัดเลือà¸
+คัดเลือด
+คัทลียา
+คัน
+คั่น
+คั้น
+คันขา
+คันจาม
+คันฉ่อง
+คันฉัตร
+คันฉาย
+คันชัà¸
+คันชั่ง
+คันชีพ
+คันดาลฉัตร
+คันโดง
+คันถ-
+คันถธุระ
+คันถรจนาจารย์
+คันทรง
+คันธ
+คันธ-
+คันธ์
+คันธà¸à¸¸à¸Žà¸µ
+คันธมาทน์
+คันธารราษฎร์
+คันนา
+คันบวย
+คันโพง
+คันเร่ง
+คันหามเสือ
+คับ
+คับขัน
+คับค้อน
+คับคั่ง
+คับคา
+คับà¹à¸„
+คับà¹à¸„้น
+คับà¹à¸„บ
+คับใจ
+คับอà¸à¸„ับใจ
+คัพภ-
+คัพภ์
+คัพภสาลี
+คัพโภทร
+คัมภีร-
+คัมภีร์
+คัมภีรภาพ
+คัล
+คัว
+คั่ว
+คา
+ค่า
+ค้า
+คาà¸à¸£à¸­à¸‡
+ค้าขาย
+ค่าขึ้นศาล
+ค่าคบ
+ค่าครองชีพ
+ค้าความ
+ค้าค้า
+คาง
+ค่าง
+ค้าง
+คางคà¸
+คางคà¸à¸‚ึ้นวอ
+คางคà¸à¹„ฟ
+ค้างคาว
+ค้างคืน
+ค้างเดือนค้างปี
+ค้างเติ่ง
+คางทูม
+คางโทน
+คางเบือน
+ค้างปี
+คางหมู
+คางเหลือง
+คาด
+คาดคั้น
+คาดค่า
+คาดไม่ถึง
+คาดหน้า
+คาดหมัด
+ค่าตัว
+คาถา
+คาถาพัน
+คาถาอาคม
+คาทอลิà¸
+ค่าที่
+คาธ
+ค่าธรรมเนียม
+ค่าธรรมเนียมศาล
+คาน
+ค้าน
+คานคอดิน
+คานหาม
+คาน้า
+ค่าน้ำ
+คาบ
+คาบเà¸à¸µà¹ˆà¸¢à¸§
+คาบชุด
+คาบลูà¸à¸„าบดอà¸
+คาบศิลา
+คาบสมุทร
+คาบเส้น
+ค้าประเวณี
+ค่าป่วยà¸à¸²à¸£
+ค่าปาà¸à¹€à¸£à¸·à¸­
+ค่าเผา
+คาพยุต
+ค่าภาคหลวง
+คาม
+คาม-
+คามณี
+คามณีย์
+คามภีร์
+คามโภชà¸
+คามวาสี
+คามี
+คาย
+ค่าย
+คายà¸
+คายà¸-
+คายà¸à¸„ณะ
+ค่ายà¸à¸±à¸à¸à¸±à¸™
+ค่ายเยาวชน
+ค่ายอาสาพัฒนา
+คายัน
+คาร์บอน
+คาร์บอนไดออà¸à¹„ซด์
+คาร์บอนมอนอà¸à¹„ซด์
+คาร์บอเนต
+คาร์บอลิà¸
+คาร์บูเรเตอร์
+คาร์โบรันดัม
+คาร์โบไฮเดรต
+คารพ
+คารม
+คารวะ
+คาราคาà¸à¹ˆà¸²
+คาราคาซัง
+คาราเต้
+คาราวาน
+ค่าฤชาธรรมเนียม
+คาว
+ค่าว
+ค้าว
+คาวตอง
+คาวปลา
+คาวี
+คาวุต
+คาส
+ค่าสัมบูรณ์
+ค่าสินไหมทดà¹à¸—น
+ค่าเสมอภาค
+ค่าเสียหาย
+ค่าหด
+คาหนังคาเขา
+ค่าหน้าดิน
+ค่าหัว
+คำ
+ค่ำ
+ค้ำ
+คำขวัà¸
+คำขอ
+คำขาด
+คำคม
+ค้ำคอ
+ค่ำคืน
+คำคู่ความ
+ค้ำเงิน
+ค้ำจุน
+ค้ำชู
+คำดีควาย
+คำโดด
+คำตั้ง
+คำตาย
+คำติดต่อ
+คำเติม
+คำใต้
+คำà¹à¸–ลง
+คำà¹à¸–ลงà¸à¸²à¸£à¸“์
+คำทาย
+คำเทียบ
+คำนวณ
+คำนวร
+คำนับ
+คำนัล
+คำนำ
+คำนึง
+คำนูณ
+คำบังคับ
+คำโบล
+ค้ำประà¸à¸±à¸™
+คำประสม
+คำปรารภ
+คำเป็น
+คำà¸à¸­à¸¢
+คำพิพาà¸à¸©à¸²
+คำเพลิง
+คำฟ้อง
+คำฟ้องà¹à¸¢à¹‰à¸‡
+ค้ำฟ้า
+คำมั่น
+คำมั่นว่าจะให้รางวัล
+คำมาà¸à¸žà¸¢à¸²à¸‡à¸„์
+คำมูล
+คำเมือง
+คำรน
+คำรบ
+คำร้อง
+คำร้องขอ
+คำร้องทุà¸à¸‚์
+คำราม
+คำสุภาพ
+คำà¹à¸ªà¸”
+คำหลวง
+ค้ำหัว
+คำà¹à¸«à¸‡
+คำโอง
+คิà¸à¹†
+คิง
+คิด
+คิดà¸à¸²à¸£à¹ƒà¸«à¸à¹ˆ
+คิดคด
+คิดค้น
+คิดตà¸
+คิดถึง
+คิดมาà¸
+คิดเล็à¸à¸„ิดน้อย
+คิดสมบัติบ้า
+คิดสั้น
+คิดหน้าคิดหลัง
+คิดเห็น
+คิดอ่าน
+คิมห
+คิมหันต์
+คิมหานะ
+คิริ
+คิรี
+คิลาน-
+คิลานปัจจัย
+คิลานเภสัช
+คิลานะ
+คิว
+คิ้ว
+คิ้วนาง
+คี่
+คีต
+คีตà¸à¸°
+คีบ
+คีม
+คีรี
+คีรีบูน
+คึà¸
+คึ่à¸
+คึ่à¸à¹†
+คึà¸à¸„ัà¸
+คึà¸à¸„าม
+คืน
+คืนคำ
+คืนชีพ
+คืนดี
+คืนตัว
+คืนยังรุ่ง
+คืนให้
+คืบ
+คืบà¸à¹‡à¸—ะเล ศอà¸à¸à¹‡à¸—ะเล
+คือ
+คุ
+คุà¸
+คุà¸à¸à¸µà¹‰
+คุà¸à¹€à¸‚่า
+คุà¸à¸„ลาน
+คุà¸à¸„าม
+คุà¸à¸žà¸²à¸—ย์
+คุคะ
+คุง
+คุ้ง
+คุณ
+คุณ-
+คุณชาย
+คุณธรรม
+คุณนาม
+คุณนาย
+คุณบท
+คุณพิเศษ
+คุณภาพ
+คุณลัà¸à¸©à¸“ะ
+คุณลุงคุณป้า
+คุณวิเศษ
+คุณวุฒิ
+คุณศัพท์
+คุณสมบัติ
+คุณหà¸à¸´à¸‡
+คุณาà¸à¸£
+คุณูปà¸à¸²à¸£
+คุโณปà¸à¸²à¸£
+คุด
+คุดคู้
+คุดทะราด
+คุดทะราดเหยียบà¸à¸£à¸§à¸”
+คุต
+คุตติ
+คุ่น
+คุ้น
+คุ้นเคย
+คุป
+คุปต์
+คุปติ
+คุม
+คุ่ม
+คุ้ม
+คุ้มà¸à¸±à¸™
+คุมà¸à¸³à¹€à¸™à¸´à¸”
+คุ้มเà¸à¸£à¸‡
+คุ้มครอง
+คุมà¹à¸„้น
+คุมเชิง
+คุ้มดีคุ้มร้าย
+คุ้มเท้า
+คุ้มโทษ
+คุมธาตุ
+คุมนุม
+คุมà¸à¸­à¸¢
+คุ้มห้าม
+คุย
+คุ้ย
+คุ้ยเขี่ย
+คุยช้าง
+คุยห-
+คุยหà¸à¸²à¸™
+คุยหประเทศ
+คุยหรหัสย์
+คุรุ
+คุรุà¸à¸£à¸£à¸¡
+คุรุวาร
+คุรุศึà¸à¸©à¸²
+คุลา
+คุลาซ่อนลูà¸
+คุลิà¸à¹ˆà¸²
+คุลีà¸à¸²à¸£
+คุหา
+คู
+คู่
+คู้
+คู่à¸à¸£à¸“ี
+คู่ขา
+คู่à¹à¸‚่ง
+คู่ครอง
+คู่ควร
+คู่ความ
+คู่ความร่วม
+คู่คิด
+คู่คี่
+คู่เคียง
+คู่โค
+คู่ใจ
+คู่ฉบับ
+คู่ฉีà¸
+คู่ชัà¸
+คู่ชีพ
+คู่ชีวิต
+คูณ
+คูณร่วมน้อย
+คูถ
+คู่ทุà¸à¸‚์คู่ยาà¸
+คูน
+คู้บัลลังà¸à¹Œ
+คู่บ้านคู่เมือง
+คู่บารมี
+คู่บุà¸
+คู่ปรปัà¸à¸©à¹Œ
+คู่ปรับ
+คูปอง
+คู่ผสม
+คู่ผัวตัวเมีย
+คู่พระคู่นาง
+คู่พิพาท
+คู่ม้า
+คู่มิตร
+คู่มือ
+คู่ยาà¸
+คู่รัà¸
+คูเรียงคูราย
+คู่เรียงเคียงหมอน
+คูเรียม
+คู่ลำดับ
+คู่ศัตรู
+คู่สร้าง
+คู่สวด
+คู่สัà¸à¸à¸²
+คู่สายโทรศัพท์
+คู่หมั้น
+คูหา
+คู่หู
+คู่à¹à¸«à¹ˆ
+คู่อริ
+คู่อาฆาต
+คู่อาศัย
+เค้à¸
+เค้เà¸à¹‰
+เค้ง
+เคจฉ
+เคณฑะ
+เคด
+เคน
+เค้น
+เคเบิล
+เค็ม
+เคมี
+เคมีภัณฑ์
+เคมีอนินทรีย์
+เคมีอินทรีย์
+เคย
+เคยตัว
+เคยปาà¸
+เคยมือ
+เครง
+เคร่ง
+เคร่งขรึม
+เคร่งครัด
+เครงครา
+เครงครำ
+เครงคร่ำ
+เครงครื้น
+เคร่งเครียด
+เครงเครียว
+เครดิต
+เครดิตฟองซิเอร์
+เครน
+เครา
+เคร่า
+เคราà¹à¸žà¸°
+เคราหณี
+เคราะห์
+เคราะห์หามยามร้าย
+เครียด
+เครียว
+เครือ
+เครือเขา
+เครือเขาน้ำ
+เครือเขามวà¸
+เครื่อง
+เครื่องà¸à¸¥
+เครื่องà¸à¸±à¸“ฑ์
+เครื่องà¸à¸´à¸™
+เครื่องà¹à¸à¸‡
+เครื่องเขิน
+เครื่องครัว
+เครื่องควบà¹à¸™à¹ˆà¸™
+เครื่องคู่
+เครื่องเครา
+เครื่องเงิน
+เครื่องจัà¸à¸£
+เครื่องช่วงล่าง
+เครื่องเซ่น
+เครื่องดนตรี
+เครื่องต้น
+เครื่องตั้ง
+เครื่องทอง
+เครื่องทองทิศ
+เครื่องทองน้อย
+เครื่องเทศ
+เครื่องใน
+เครื่องบน
+เครื่องบันทึà¸à¹€à¸ªà¸µà¸¢à¸‡
+เครื่องบิน
+เครื่องบูชา
+เครื่องà¹à¸šà¸š
+เครื่องประดับ
+เครื่องปรุง
+เครื่องปั้นดินเผา
+เครื่องผูà¸
+เครื่องมั่น
+เครื่องมือ
+เครื่องยนต์
+เครื่องยนต์ไอพ่น
+เครื่องร่อน
+เครื่องราง
+เครื่องราชอิสริยาภรณ์
+เครื่องร่ำ
+เครื่องเรือน
+เครื่องล่าง
+เครื่องเล่น
+เครื่องว่าง
+เครื่องสด
+เครื่องสะดุ้ง
+เครื่องสับ
+เครื่องสาย
+เครื่องสำอาง
+เครื่องสุà¸à¸³à¸¨à¸ž
+เครื่องสูง
+เครื่องหมาย
+เครื่องหมายà¸à¸²à¸£à¸„้า
+เครื่องหยวà¸
+เครื่องหลัง
+เครื่องห้า
+เครื่องเหล็à¸
+เครื่องใหà¸à¹ˆ
+เครื่องอังทราย
+เครื่องอังน้ำ
+เครือจัà¸à¸£à¸ à¸ž
+เครือดิน
+เครือà¹à¸¢à¹ˆà¸‡
+เครือรัà¸
+เครือวัลย์พันไม้
+เคล้ง
+เคล็ด
+เคล้น
+เคล้า
+เคล่าคล่อง
+เคล้าคลึง
+เคล้าเคลีย
+เคลิบเคลิ้ม
+เคลิ้ม
+เคลีย
+เคลียคลอ
+เคลี้ยคลิง
+เคลียเคล้า
+เคลื่อน
+เคลื่อนคลาด
+เคลื่อนที่
+เคลื่อนไหว
+เคลือบ
+เคลือบคลุม
+เคลือบà¹à¸„ลง
+เคลือบà¹à¸à¸‡
+เคลือบฟัน
+เคว้ง
+เคว้งคว้าง
+เคห-
+เคหศาสตร์
+เคหเศรษà¸à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+เคหสถาน
+เคหะ
+เคหา
+เคอย
+เคอะ
+เคา
+เค้า
+เค้าโครง
+เค้าเงื่อน
+เคาน์เตอร์
+เค้ามูล
+เคารพ
+เค้าสนามหลวง
+เคาะ
+เคาะà¹à¸„ะ
+เคี้ย
+เคียง
+เคียงบ่าเคียงไหล่
+เคียด
+เคียดà¹à¸„้น
+เคียน
+เคียม
+เคี่ยม
+เคี่ยมคะนอง
+เคียร
+เคียว
+เคี่ยว
+เคี้ยว
+เคี่ยวขัน
+เคี่ยวขับ
+เคี่ยวเข็à¸
+เคี้ยวฟัน
+เคี้ยวเอื้อง
+เคื้อ
+เคือง
+à¹à¸„
+à¹à¸„่
+à¹à¸„้
+à¹à¸„à¹à¸à¸¥
+à¹à¸„ดเมียม
+à¹à¸„็ตตาล็อà¸
+à¹à¸„à¹à¸•à¸£
+à¹à¸„โทด
+à¹à¸„น
+à¹à¸„่น
+à¹à¸„้น
+à¹à¸„้นคอ
+à¹à¸„่นà¹à¸„ะ
+à¹à¸„่นไค้
+à¹à¸„บ
+à¹à¸„บหมู
+à¹à¸„ปซูล
+à¹à¸„à¸à¸£à¸±à¹ˆà¸‡
+à¹à¸„à¸à¸­à¸¢
+à¹à¸„ม
+à¹à¸„ร่
+à¹à¸„รà¸
+à¹à¸„รครั่ง
+à¹à¸„รง
+à¹à¸„รงเครียว
+à¹à¸„ระ
+à¹à¸„ลคูลัส
+à¹à¸„ลง
+à¹à¸„ลงใจ
+à¹à¸„ลเซียม
+à¹à¸„ลเซียมคาร์ไบด์
+à¹à¸„ลเซียมไซคลาเมต
+à¹à¸„ลน
+à¹à¸„ล้ว
+à¹à¸„ล่วคล่อง
+à¹à¸„ล้วคลาด
+à¹à¸„ลอรี
+à¹à¸„ลิฟอร์เนียม
+à¹à¸„à¹à¸¥
+à¹à¸„ว
+à¹à¸„วà¸
+à¹à¸„ว้ง
+à¹à¸„ว้น
+à¹à¸„à¹à¸ªà¸”
+à¹à¸„ะ
+à¹à¸„ะไค้
+โค
+โคà¸
+โคà¸à¸à¸£à¸°à¸ªà¸¸à¸™
+โคà¸à¸à¸£à¸°à¸­à¸­à¸¡
+โคà¸à¸¡à¹‰à¸²
+โคà¹à¸à¹ˆà¸Šà¸­à¸šà¸à¸´à¸™à¸«à¸à¹‰à¸²à¸­à¹ˆà¸­à¸™
+โคคลาน
+โคเคน
+โค่ง
+โค้ง
+โคจร
+โคจร-
+โคจรคาม
+โคเซà¹à¸„นต์
+โคไซน์
+โคตร
+โคตร-
+โคตรภู
+โคตรภูà¸à¸²à¸“
+โคเถลิง
+โคà¹à¸—นเจนต์
+โคธา
+โคน
+โค่น
+โคนดินสอ
+โคนตายปลายเป็น
+โคนม
+โคนสมอ
+โคบอลต์
+โคบาล
+โคบุตร
+โคปผà¸à¸°
+โคเพลาะ
+โคไพร
+โคม
+โคมดอà¸à¹„ม้
+โคมตาวัว
+โคมลอย
+โคมเวียน
+โคมัย
+โคม่า
+โคมูตร
+โครà¸
+โครà¸à¸„รอà¸
+โครà¸à¸„ราà¸
+โครง
+โคร่ง
+โครงà¸à¸²à¸£
+โคร่งคร่าง
+โครงà¹à¸„ร
+โครงจมูà¸
+โครงเรื่อง
+โครงสร้าง
+โครม
+โครมคราม
+โครเมียม
+โครโมโซม
+โครส
+โคราช
+โครำ
+โคโรค
+โคล
+โคลง
+โคลงเคลง
+โคลน
+โควตา
+โควิถี
+โคศัพท์
+โคออร์ดิเนต
+ใคร
+ใคร่
+ใคร่ครวà¸
+ไค
+ไค้
+ไคร้
+ไคร้เครือ
+ไคล
+ไคล้
+ฅ
+ฆ
+ฆน
+ฆราวาส
+ฆ้อง
+ฆ้องà¸à¸£à¸°à¹à¸•
+ฆ้องชัย
+ฆ้องปาà¸à¹à¸•à¸
+ฆ้องวง
+ฆ้องสามย่าน
+ฆ้องหุ่ย
+ฆ้องเหม่ง
+ฆ้องโหม่ง
+ฆ่า
+ฆ่าควายอย่าเสียดายพริà¸
+ฆาà¸
+ฆาต
+ฆาต-
+ฆาตà¸à¸£
+ฆาตà¸à¸£à¸£à¸¡
+ฆาน
+ฆาน-
+ฆานประสาท
+ฆ่าไม่ตายขายไม่ขาด
+เฆี่ยน
+โฆรวิส
+โฆษà¸
+โฆษณา
+โฆษณาà¸à¸²à¸£
+โฆษณาชวนเชื่อ
+โฆษะ
+โฆษิต
+ง
+งà¸
+งà¸à¹€à¸‡à¸´à¹ˆà¸™
+งà¸à¹† เงิ่นๆ
+งง
+งงงวย
+งงงัน
+งงิด
+งด
+งดงาม
+งบ
+งบดุล
+งบประมาณ
+งม
+งมเข็มในมหาสมุทร
+งมโข่ง
+งมงาย
+งวง
+ง่วง
+ง่วงงุน
+งวงช้าง
+ง่วงเหงา
+ง่วงเหงาหาวนอน
+งวด
+ง่วน
+ง้วน
+งวยงง
+งอ
+ง้อ
+งอà¸
+งอà¸à¸‡à¸²à¸¡
+งอà¸à¹€à¸‡à¸¢
+งอà¸à¹à¸‡à¸
+งอà¸à¹ˆà¸­à¸‡à¸­à¸‚ิง
+ง่อง
+ง่องà¹à¸‡à¹ˆà¸‡
+ง้องอน
+งอà¹à¸‡
+งอด
+งอดà¹à¸‡à¸”
+งอน
+ง่อน
+งอนง้อ
+ง่อนà¹à¸‡à¹ˆà¸™
+งอนไถ
+งอนหง่อ
+ง้อนหมู
+งอบ
+งอม
+ง้อม
+งอมà¹à¸‡à¸¡
+งอมพระราม
+งอมืองอตีน
+งอย
+ง่อย
+ง่อยเปลี้ยเสียขา
+งอหาย
+งะ
+งัà¸à¹†
+งั่à¸à¹†
+งังๆ
+งั่ง
+งัด
+งัดข้อ
+งัน
+งันงà¸
+งับ
+งับà¹à¸‡
+งัว
+งั่ว
+งัวเงีย
+งัวซัง
+งัวเลีย
+งา
+ง่า
+งาà¸à¸³à¸ˆà¸²à¸¢
+งาเครือ
+ง้าง
+ง่าเงย
+งาช้าง
+งาà¹à¸‹à¸‡
+งาไซ
+งาตัด
+งาน
+ง่าน
+งานà¸à¸²à¸£
+งานหลวงไม่ให้ขาด งานราษฎร์ไม่ให้เสีย
+งาบๆ
+งาม
+ง่าม
+งามงอน
+งามà¹à¸‡à¸°
+ง่ามถ่อ
+งามหน้า
+งาย
+ง่าย
+ง่ายๆ
+ง่ายดาย
+ง่าย้อย
+งาลั่ว
+ง้าว
+งาสาน
+งำ
+ง่ำ
+ง่ำๆ
+ง้ำ
+งิ้ว
+งีบ
+งึà¸à¹†
+งึน
+งึม
+งึมงำ
+งุด
+งุดๆ
+งุนงง
+งุ่นง่าน
+งุบ
+งุบๆ
+งุบงิบ
+งุ้ม
+งุ่มง่าม
+งุย
+งู
+งูà¸à¸¥à¸·à¸™à¸«à¸²à¸‡
+งูà¸à¸´à¸™à¸«à¸²à¸‡
+งูบ
+งูๆ ปลาๆ
+งูผู้
+งูเมีย
+งูสวัด
+งู่หนี
+งูเหลือม
+งูเห่า
+เง้
+เงà¸
+เง็น
+เงย
+เงยหน้าอ้าปาà¸
+เงอะ
+เงอะงะ
+เงา
+เงาๆ
+เง่า
+เง้า
+เง้างอด
+เง้าๆ งอดๆ
+เงาตามตัว
+เงามัว
+เงามืด
+เงาะ
+เงาะป่า
+เงิน
+เงินà¸à¹‰à¸™à¸–ุง
+เงินà¸à¹‰à¸­à¸™
+เงินà¸à¸¹à¹‰
+เงินเชื่อ
+เงินดาวน์
+เงินเดือน
+เงินà¹à¸”ง
+เงินได้à¸à¸³à¸šà¸±à¸‡
+เงินต้น
+เงินตรา
+เงินตาย
+เงินทองตรา
+เงินทอน
+เงินนอน
+เงินน้ำห้าน้ำหà¸
+เงินปลีà¸
+เงินปันผล
+เงินปาà¸à¸–ุง
+เงินปาà¸à¸œà¸µ
+เงินปี
+เงินà¹à¸›
+เงินผ่อน
+เงินà¸à¸·à¸”
+เงินเฟ้อ
+เงินมุ่น
+เงินยวง
+เงินเยอรมัน
+เงินร้อน
+เงินรายปี
+เงินสด
+เงินสเตอร์ลิง
+เงินหลวง
+เงินà¹à¸«à¹‰à¸‡
+เงี่ยง
+เงี่ยน
+เงียบ
+เงียบà¸à¸£à¸´à¸š
+เงียบเชียบ
+เงียบเป็นเป่าสาà¸
+เงียบเหงา
+เงี้ยว
+เงี้ยวระเริง
+เงี้ยวรำลึà¸
+เงี่ยหู
+เงื้อ
+เงือà¸
+เงื่อง
+เงื่องๆ
+เงื่องหงอย
+เงื้อง่าราคาà¹à¸žà¸‡
+เงือด
+เงือดงด
+เงือดเงื้อ
+เงือน
+เงื่อน
+เงื่อนไข
+เงื่อนไขบังคับà¸à¹ˆà¸­à¸™
+เงื่อนไขบังคับหลัง
+เงื่อนงำ
+เงื่อนเวลา
+เงื่อนเวลาเริ่มต้น
+เงื่อนเวลาสิ้นสุด
+เงือบ
+เงื้อม
+เงื้อมมือ
+à¹à¸‡
+à¹à¸‡à¹†
+à¹à¸‡à¹ˆ
+à¹à¸‡à¹ˆà¸‡
+à¹à¸‡à¹ˆà¸‡à¹†
+à¹à¸‡à¹ˆà¸‡à¸‚ิง
+à¹à¸‡à¹ˆà¸‡à¸­à¸™
+à¹à¸‡à¹ˆà¸™
+à¹à¸‡à¹ˆà¸™à¹†
+à¹à¸‡à¹‰à¸¡
+à¹à¸‡à¸°
+โง
+โง่
+โงà¸
+โงà¸à¹€à¸‡à¸
+โง่à¹à¸à¸¡à¸«à¸¢à¸´à¹ˆà¸‡
+โงง
+โง่งๆ
+โง้ง
+โงงเงง
+โง่งเง่ง
+โงเง
+โง่เง่า
+โง่เง่าเต่าตุ่น
+โงน
+โงนเงน
+โง่à¹à¸¥à¹‰à¸§à¸­à¸¢à¸²à¸à¸™à¸­à¸™à¹€à¸•à¸µà¸¢à¸‡
+ไง้
+จ
+จà¸
+จง
+จ่ง
+จ๋ง
+จงà¸à¸£à¸¡
+จงà¸à¸£à¸¡à¹à¸à¹‰à¸§
+จงà¸à¸¥
+จงà¸à¸¥à¸™à¸µ
+จงเà¸à¸¥à¸µà¸¢à¸”จงชัง
+จงโคร่ง
+จงใจ
+จงดี
+จงรัà¸
+จงรัà¸à¸ à¸±à¸à¸”ี
+จงอร
+จงอาง
+จà¹à¸ˆà¹‰à¸™
+จà¸
+จด
+จดจ่อ
+จดจ้อง
+จดๆ จ้องๆ
+จดจำ
+จดทะเบียน
+จดหมัด
+จดหมาย
+จดหมายเวียน
+จดหมายเหตุ
+จดุร
+จดุรงค์
+จดูร-
+จตุ-
+จตุà¸à¸²à¸¥à¸˜à¸²à¸•à¸¸
+จตุตถ-
+จตุตถี
+จตุทิพยคันธา
+จตุบท
+จตุบริษัท
+จตุปัจจัย
+จตุปาริสุทธิศีล
+จตุร-
+จตุรคูณ
+จตุรงค์
+จตุรงคนายà¸
+จตุรงคประดับ
+จตุรงคยมà¸
+จตุรถ-
+จตุรพัà¸à¸•à¸£à¹Œ
+จตุรพิธ
+จตุรพิธพร
+จตุรภุช
+จตุรภูมิ
+จตุรยุค
+จตุราริยสัจ
+จตุลังคบาท
+จตุโลà¸à¸šà¸²à¸¥
+จตุสดมภ์
+จทึง
+จน
+จ้น
+จนà¸à¸£à¸°à¸—ั่ง
+จนà¸à¸§à¹ˆà¸²
+จนชั้น
+จนด้วยเà¸à¸¥à¹‰à¸²
+จนถึง
+จนà¹à¸¥à¹‰à¸§à¸ˆà¸™à¸£à¸­à¸”
+จบ
+จบเห่
+จม
+จ่ม
+จมเบ้า
+จมปลัà¸
+จมไม่ลง
+จมร
+จมรี
+จมูà¸
+จมูà¸à¸›à¸¥à¸²à¸«à¸¥à¸”
+จมูà¸à¸›à¸¥à¸²à¹„หล
+จมูà¸à¸¡à¸”
+จมูà¸à¸§à¸±à¸§
+จมูà¸à¸«à¸¥à¸­à¸”
+จยุติ
+จร
+จร-
+จรà¸
+จรà¸à¸¥à¸¹à¹ˆ
+จรà¹à¸à¸§à¹ˆà¸‡
+จรคั่ง
+จรจรัล
+จรจัด
+จรณะ
+จรด
+จรดพระà¸à¸£à¸£à¹„ตรà¸à¸£à¸£à¸šà¸´à¸”
+จรดพระนังคัล
+จรดล
+จรบน
+จรบัน
+จรบาท
+จรมัน
+จรมูà¸
+จรรจา
+จรรโจษ
+จรรม
+จรรม-
+จรรมà¸à¸²à¸£
+จรรมขัณฑ์
+จรรยา
+จรรยาบรรณ
+จรรโลง
+จรลวง
+จรล่วง
+จรลาด
+จรลาย
+จรล่ำ
+จรลิ่ว
+จรลี
+จรลู่
+จรวจ
+จรวจไจร
+จรวด
+จรวดจรี
+จรวดนำวิถี
+จรวัà¸
+จรส
+จรอà¸
+จระà¸à¸¥à¹‰à¸²à¸¢
+จระขาบ
+จระเข้
+จระเข้ปาà¸à¸à¸£à¸°à¸—ุงเหว
+จระเข้หางยาว
+จระคลับ
+จระคล้าย
+จระคลุ่ม
+จระà¹à¸„ง
+จระจุ่ม
+จระทà¸
+จระเทิน
+จระนำ
+จระบาน
+จระบี
+จระลิ่ง
+จระลึง
+จระลุง
+จรัล
+จรัส
+จราà¸
+จราง
+จราจร
+จราà¸
+จราย
+จราว
+จราส
+จริà¸
+จริง
+จริงๆ
+จริงจัง
+จริงใจ
+จริงอยู่
+จริต
+จริม-
+จริย-
+จริยธรรม
+จริยวัตร
+จริยศาสตร์
+จริยศึà¸à¸©à¸²
+จริยา
+จริยาปิฎà¸
+จริยาวัตร
+จริว
+จรี
+จรึง
+จรุà¸
+จรุง
+จรูง
+จรูà¸
+จรูส
+จเร
+จล
+จลนพลศาสตร์
+จลนศาสตร์
+จลนี
+จลา
+จลาจล
+จวà¸
+จ๊วà¸
+จวง
+จ้วง
+จ๋วง
+จ๋วงเครือ
+จวงจันทน์
+จ้วงจาบ
+จวงหอม
+จวด
+จวดลาà¸
+จวน
+จวนเจียน
+จวนà¹à¸ˆ
+จวนตัว
+จวบ
+จวบจวน
+จวัà¸
+จอ
+จ่อ
+จ้อ
+จ๋อ
+จอà¸
+จ้อà¸
+จ้อà¸à¹†
+จ๊อà¸
+จ๊อà¸à¹†
+จ้อà¸à¹à¸ˆà¹‰à¸
+จ้อà¸à¸§à¸­à¸
+จอà¸à¸«à¸¹à¸«à¸™à¸¹
+จอง
+จ่อง
+จ้อง
+จ๋อง
+จองคช
+จองจำ
+จ้องเต
+จองถนน
+จองเปรียง
+จองเวรจองà¸à¸£à¸£à¸¡
+จองหง่อง
+จ้องหน่อง
+จองหอง
+จองหองพองขน
+จอà¹à¸ˆ
+จ๋อà¹à¸ˆà¹‹
+จอด
+จอน
+จ้อน
+จอนจ่อ
+จอนหู
+จอบ
+จอม
+จ่อม
+จอมขวัà¸
+จ่อมจ่าย
+จอมใจ
+จอมไตร
+จอมทอง
+จอมทัพ
+จอมปลวà¸
+จอมปลอม
+จ้อมป้อม
+จอมเปาะ
+จอมพล
+จอมมารดา
+จอมสุรางค์
+จ่อย
+จ้อย
+จ๋อย
+จ๋อยๆ
+จอà¹à¸ª
+จะ
+จ้ะ
+จ๊ะ
+จ๋ะ
+จะà¸à¸£à¸±à¸ˆà¸ˆà¸°à¸à¸£à¸²à¸ˆ
+จะà¸à¸£à¸¸à¸™
+จะà¸à¸£à¸¸à¸¡à¸ˆà¸°à¸à¸£à¸²à¸¡
+จะà¸à¸£à¸¹à¸™
+จะà¸à¸¥à¸°
+จะà¸à¸¥à¸²à¸¡
+จะà¸à¸§à¸”
+จะà¸à¸¹à¸”
+จะเà¸à¸£à¹‡à¸‡
+จะขาบ
+จะเข้
+จะเข็บ
+จะงอย
+จะจะ
+จะจ้า
+จะà¹à¸ˆà¹‰à¸‡
+จะà¹à¸ˆà¹ˆà¸¡
+จะไจ้
+จะบัน
+จะปิ้ง
+จะปิ้งเรือ
+จะเพลิง
+จะละเม็ด
+จะละหวั่น
+จะลุง
+จ๊ะเอ๋
+จัà¸
+จั้à¸à¹†
+จัà¸à¸à¸²à¸¢
+จั๊à¸à¸à¸´à¹‰à¸¡
+จัà¸à¸‚ุ
+จัà¸à¸‚ุทวาร
+จัà¸à¸‚ุประสาท
+จัà¸à¸‚ุวิà¸à¸à¸²à¸“
+จัà¸à¸‚ุสัมผัส
+จัà¸à¸ˆà¸±à¹ˆà¸™
+จัà¸à¸ˆà¸µà¹‰
+จั๊à¸à¸ˆà¸µà¹‰
+จั๊à¸à¹€à¸”ียม
+จัà¸à¸£
+จัà¸à¸£-
+จัà¸à¸£à¸›à¸²à¸“ิ
+จัà¸à¸£à¸›à¸²à¸“ี
+จัà¸à¸£à¸žà¸£à¸£à¸”ิ
+จัà¸à¸£à¸žà¸²à¸
+จัà¸à¸£à¸žà¸²à¸¥
+จัà¸à¸£à¸ à¸ž
+จัà¸à¸£à¸¢à¸²à¸™
+จัà¸à¸£à¸¢à¸²à¸™à¸¢à¸™à¸•à¹Œ
+จัà¸à¸£à¸£à¸²à¸¨à¸µ
+จัà¸à¸£à¸§à¸£à¸£à¸”ิ
+จัà¸à¸£à¸§à¸£à¸£à¸”ินิยม
+จัà¸à¸£à¸§à¸²à¸
+จัà¸à¸£à¸§à¸²à¸•
+จัà¸à¸£à¸§à¸²à¸¥
+จัà¸à¸£à¸´à¸™
+จัà¸à¸£à¸µ
+จั๊à¸à¹€à¸¥à¹‰à¸­
+จัà¸à¸©à¸¸
+จัà¸à¸ªà¸²à¸™
+จัà¸à¹à¸«à¸¥à¹ˆà¸™
+จัง
+จั้ง
+จั๋ง๑
+จังà¸à¸§à¸”
+จังà¸à¸­à¸š
+จังà¸à¸²
+จังà¸à¹‰à¸²
+จังà¸à¸¹à¸”
+จังเà¸
+จังโà¸à¸à¸à¹Œ
+จังงัง
+จังมัง
+จั้งมั่ง
+จังไร
+จังลอน
+จังเว็จ
+จังหนับ
+จังหน้า
+จังหรีด
+จังหล่อ
+จังหวะ
+จังหวัด
+จังหัน
+จังออน
+จัà¸à¹„ร
+จัณฑ-
+จัณฑ์
+จัณฑวาตา
+จัณฑาล
+จัด
+จัดà¸à¸²à¸£
+จัดจอง
+จัดจ้า
+จัดจ้าน
+จัดเจน
+จัดà¹à¸ˆà¸‡
+จัดตั้ง
+จัดประà¸à¸±à¸™
+จัดมั่น
+จัดสรร
+จัดหา
+จัตตาฬีส
+จัตวา
+จัตวาทัณฑี
+จัตวาศà¸
+จัตุ
+จัตุร-
+จัตุรงค์
+จัตุรพัà¸à¸•à¸£à¹Œ
+จัตุรภุช
+จัตุรมุข
+จัตุรัส
+จัตุโลà¸à¸šà¸²à¸¥
+จัตุสดมภ์
+จัน
+จั่น
+จันโจษ
+จั่นดิน
+จันท์
+จันทน์
+จันทน์à¸à¸°à¸žà¹‰à¸­
+จันทน์ขาว
+จันทน์ชะมด
+จันทน์à¹à¸”ง
+จันทน์เทศ
+จันทน์ผา
+จันทน์หอม
+จันทนา
+จันทร-
+จันทร์
+จันทรà¸à¸¥à¸²
+จันทรà¸à¸²à¸™à¸•à¹Œ
+จันทรคติ
+จันทรคราส
+จันทรพิมพ์
+จันทรมณฑล
+จันทรเม็ด
+จันทรวงศ์
+จันทรเศขร
+จันทรุปราคา
+จันทัน
+จันทันพราง
+จันลอง
+จันเลา
+จันเลาะ
+จั้นหล่อ
+จั่นหับ
+จั่นห้าว
+จันอับ
+จับ
+จับà¸à¸¥à¸¸à¹ˆà¸¡
+จับà¸à¸±à¸‡
+จับà¸à¸¸à¸¡
+จับเขม่า
+จับไข้
+จับความ
+จับงูข้างหาง
+จับจด
+จับจอง
+จับจ่าย
+จับจิต
+จับเจ่า
+จับเจี๋ยว
+จับใจ
+จับฉ่าย
+จับเชิง
+จับดำถลำà¹à¸”ง
+จับเดิม
+จับตัววางตาย
+จับตา
+จับตาดู
+จับตาย
+จับปิ้ง
+จับเป็น
+จับโปง
+จับผิด
+จับพลัดจับผลู
+จับà¹à¸žà¸°à¸Šà¸™à¹à¸à¸°
+จับยาม
+จับยี่à¸à¸µ
+จับระบำ
+จับเวลา
+จับสั่น
+จับสายสิà¸à¸ˆà¸™à¹Œ
+จับเสือมือเปล่า
+จับหลัà¸
+จับหวัด
+จับหัวเข่าพูด
+จัมบà¸
+จัมปà¸
+จัมมะ
+จัว
+จั่ว
+จั๊วะ
+จา
+จ่า
+จ้า
+จ๋า
+จาà¸
+จาà¸à¸žà¸£à¸²à¸
+จาà¸à¸žà¸²à¸
+จ่าà¸à¸¥à¸­à¸‡
+จาค-
+จาคี
+จาง
+จ่าง
+จ้าง
+จางวาง
+จาด
+จาดตะà¸à¸±à¹ˆà¸§
+จาตุ-
+จาตุà¸à¸£à¸“ีย์
+จาตุทสี
+จาตุมหาราช
+จาตุร-
+จาตุรงค-
+จาตุรงค์
+จาตุรงคสันนิบาต
+จาตุรนต์
+จาตุรนต์รัศมี
+จาตุรราชà¸à¸²à¸£
+จาตุรันต์
+จาน
+จ้าน
+จานจ่าย
+จานเจือ
+จานเชิง
+จานบิน
+จานผี
+จานเสียง
+จาบ
+จาบจ้วง
+จาบัล
+จาบัลย์
+จาป
+จ่าปี่
+จาม
+จ่ามงà¸à¸¸à¸Ž
+จามจุรี
+จามร
+จามรี
+จามีà¸à¸£
+จ่าย
+จ่ายตลาด
+จาร
+จ่ารง
+จารวาà¸
+จาระไน
+จาระบี
+จาริà¸
+จารี
+จารีต
+จารีตนครบาล
+จารีตประเพณี
+จารึà¸
+จารุ
+จ้าละหวั่น
+จาว
+จาวๆ
+จ่าว
+จ้าว
+จาวมะพร้าว
+จ่าหน้า
+จ่าหวัà¸
+จำ
+จ้ำ
+จำà¸à¸§à¹ˆà¸²
+จำà¸à¸±à¸”
+จำà¸à¸±à¸”ความ
+จำà¸à¸±à¸”จำเขี่ย
+จำà¸à¸±à¸”สินใช้
+จำครบ
+จำงาย
+จำจอง
+จ้ำจี้
+จ้ำจี้จ้ำไช
+จำเจ
+จำเดิม
+จำทวย
+จำทับ
+จำทาบ
+จำเทิด
+จำà¹à¸—ง
+จำนง
+จำนน
+จำนรรจ์
+จำนรรจา
+จำนวน
+จำนวนจริง
+จำนวนจินตภาพ
+จำนวนเชิงซ้อน
+จำนวนตรรà¸à¸¢à¸°
+จำนวนเต็ม
+จำนวนนับ
+จำนวนอตรรà¸à¸¢à¸°
+จำนอง
+จำนับ
+จำนัล
+จำนำ
+จำนำพรรษา
+จำเนียน
+จำเนียม
+จำเนียร
+จำà¹à¸™à¸
+จำโนทย์
+จำบ่ม
+จำบัง
+จำบับ
+จำเบศ
+จ้ำเบ้า
+จำà¹à¸š
+จำปา
+จำปาขอม
+จำปาà¹à¸‚à¸
+จำปาดะ
+จำปาทองเทศ
+จำปาลาว
+จำปาหอม
+จำปี
+จำปีà¹à¸‚à¸
+จำปูน
+จำเป็น
+จำพรรษา
+จำพวà¸
+จำเพาะ
+จำà¹à¸žà¸£à¸
+จ้ำม่ำ
+จำรด
+จำรัส
+จำราà¸
+จำราย
+จำรูà¸
+จำเริà¸
+จำเรียง
+จำลอง
+จำลองทอง
+จำลาย
+จำเลย
+จำเลาะ
+จำเลาะตา
+จำà¹à¸¥à¸‡
+จำà¹à¸¥à¹ˆà¸™
+จำวัด
+จำศีล
+จำหนับ
+จ๋ำหนับ
+จำหน่าย
+จำหระ
+จำหล่อ
+จำหลอà¸
+จำหลัà¸
+จำหัน
+จำห้าประà¸à¸²à¸£
+จำหาย
+จำหุด
+จำเหียง
+จำอวด
+จำอื่น
+จิ
+จิà¸
+จิà¸à¸›à¸µà¸
+จิà¸à¸«à¸±à¸§
+จิ่ง
+จิ้งจà¸
+จิงจ้อ
+จิ้งจอà¸
+จิงจัง
+จิ้งจัง
+จิงโจ้
+จิงโจ้น้ำ
+จิ้งหรีด
+จิ้งหรีดผี
+จิ้งเหลน
+จิ้งเหลนด้วง
+จิต
+จิต-
+จิตà¸à¸²à¸˜à¸²à¸™
+จิตà¸à¸¶à¹ˆà¸‡à¸ªà¸³à¸™à¸¶à¸
+จิตใจ
+จิตต-
+จิตต์
+จิตตภาวนา
+จิตตวิสุทธิ
+จิตตานุปัสสนา
+จิตใต้สำนึà¸
+จิตนิยม
+จิตบำบัด
+จิตà¹à¸žà¸—ย์
+จิตภาพ
+จิตร
+จิตร-
+จิตรà¸à¸£
+จิตรà¸à¸£à¸£à¸¡
+จิตรจุล
+จิตรปทา
+จิตรลดา
+จิตรเลขา
+จิตระ
+จิตรา
+จิตไร้สำนึà¸
+จิตวิทยา
+จิตวิสัย
+จิตเวชศาสตร์
+จิตสำนึà¸
+จินเจา
+จินดา
+จินดามณี
+จินดามัย
+จินดาหนา
+จินดาหรา
+จินต-
+จินต์
+จินตà¸à¸§à¸µ
+จินต์จล
+จินตนาà¸à¸²à¸£
+จินตภาพ
+จิบ
+จิปาถะ
+จิ่ม
+จิ้ม
+จิ้มà¸à¹‰à¸­à¸‡
+จิ้มฟันจระเข้
+จิ้มลิ้ม
+จิร-
+จิรà¸à¸²à¸¥
+จิรัà¸à¸´à¸•à¸´à¸à¸²à¸¥
+จิ๋ว
+จี
+จี่
+จี้
+จี๋
+จี๋จ้อ
+จี่จู้
+จีà¹à¸ˆà¹Šà¸š
+จี๊ด
+จีน
+จีนเต็ง
+จีนà¹à¸ª
+จีนà¹à¸ªà¹‚สà¸à¸²
+จีบ
+จีบปาà¸à¸ˆà¸µà¸šà¸„อ
+จีบพลู
+จีโบ
+จีพร
+จีม
+จีวร
+จีวร-
+จีวรà¸à¸£à¸£à¸¡
+จีวรà¸à¸²à¸£à¸ªà¸¡à¸±à¸¢
+จีวรà¸à¸²à¸¥à¸ªà¸¡à¸±à¸¢
+จีวรทานสมัย
+จีวรภาชà¸
+จี้เส้น
+จึง
+จึ่ง
+จึ้ง
+จืด
+จืดจาง
+จืดชืด
+จืดตา
+จื้นเจือà¸
+จุ
+จุๆ
+จุà¸
+จุ๊à¸à¸à¸£à¸¹à¹Š
+จุà¸à¸ˆà¸´à¸
+จุà¸à¹€à¸ˆà¹ˆà¸²
+จุà¸à¸Šà¹ˆà¸­à¸‡à¸¥à¹‰à¸­à¸¡à¸§à¸‡
+จุà¸à¸Šà¸µ
+จุà¸à¸œà¸²à¸¡
+จุà¸à¸œà¸²à¸¡à¸¡à¹‰à¸²à¸¡à¸¢à¹‰à¸­à¸¢
+จุà¸à¸žà¸£à¸²à¸«à¸¡à¸“์
+จุà¸à¸¢à¸²
+จุà¸à¹‚รหินี
+จุ่ง
+จุ้งจัง
+จุ๋งจิ๋ง
+จุใจ
+จุฑา
+จุฑาธิปไตย
+จุฑามณี
+จุฑามาศ
+จุฑารัตน์
+จุณ
+จุณณียบท
+จุด
+จุดจบ
+จุดเด่น
+จุดเดือด
+จุดไต้ตำตอ
+จุดทศนิยม
+จุดน้ำค้าง
+จุดบอด
+จุดยืน
+จุดยุทธศาสตร์
+จุดเยือà¸à¹à¸‚็ง
+จุดรวม
+จุดลูà¸à¸™à¹‰à¸³
+จุดศูนย์à¸à¸¥à¸²à¸‡
+จุดศูนย์ถ่วง
+จุดสัมผัส
+จุดหมาย
+จุดหมายปลายทาง
+จุดหลอมเหลว
+จุดหลัง
+จุดเหี่ยวเฉา
+จุดอ่อน
+จุดอิ่มตัว
+จุติ
+จุตูปปาตà¸à¸²à¸“
+จุทส
+จุทสมสุรทิน
+จุน
+จุ่น
+จุ้น
+จุ้นจ้าน
+จุนจู๋
+จุ้นจู๊
+จุนเจือ
+จุนทà¸à¸²à¸£
+จุนสี
+จุบ
+จุ๊บ
+จุบจิบ
+จุ๊บà¹à¸ˆà¸‡
+จุปาà¸
+จุ่ม
+จุ้ม
+จุ๋มจิ๋ม
+จุมพà¸
+จุมพรวด
+จุมพล
+จุมพิต
+จุมโพล่
+จุ้ย
+จุรณ
+จุรี
+จุไร
+จุล-
+จุลà¸à¸à¸´à¸™
+จุลจอมเà¸à¸¥à¹‰à¸²
+จุลชีพ
+จุลชีวัน
+จุลชีวิน
+จุลทรรศน์
+จุลภาค
+จุลวงศ์
+จุลวรรค
+จุลศัà¸à¸£à¸²à¸Š
+จุลสาร
+จุลินทรีย์
+จุฬา
+จุฬามณี
+จุฬาราชมนตรี
+จุฬาลัà¸à¸©à¸“์
+จุฬาลัมพา
+จู
+จู่
+จู่ๆ
+จู้
+จู๋
+จูง
+จูงจมูà¸
+จูงใจ
+จูงนางเข้าห้อง
+จูงนางลีลา
+จูงมือ
+จู้จี้
+จู๋จี๋
+จู่โจม
+จู๊ด
+จูบ
+จูบà¸à¸¸à¹ˆà¸™
+จูรณ
+จู่ลู่
+เจ
+เจ๊à¸
+เจ๊à¸à¸•à¸·à¹ˆà¸™à¹„ฟ
+เจ่ง
+เจ้ง
+เจ๊ง
+เจ็ด
+เจ็ดชั่วโคตร
+เจ็ดตะคลี
+เจดีย-
+เจดีย์
+เจดียถาน
+เจดีย์ทิศ
+เจดียสถาน
+เจต
+เจต-
+เจตคติ
+เจตจำนง
+เจตนา
+เจตนารมณ์
+เจตพังคี
+เจตภูต
+เจตมูลเพลิง
+เจตมูลเพลิงà¸à¸£à¸±à¹ˆà¸‡
+เจตสิà¸
+เจติย-
+เจโตวิมุติ
+เจน
+เจนจบ
+เจนจัด
+เจนใจ
+เจ็บ
+เจ็บไข้
+เจ็บà¹à¸„้น
+เจ็บใจ
+เจ็บช้ำน้ำใจ
+เจ็บท้อง
+เจ็บปวด
+เจ็บป่วย
+เจ็บร้อน
+เจ็บà¹à¸ªà¸š
+เจรจา
+เจริà¸
+เจริà¸à¸•à¸²à¹€à¸ˆà¸£à¸´à¸à¹ƒà¸ˆ
+เจริà¸à¸žà¸£
+เจริà¸à¸žà¸±à¸™à¸˜à¸¸à¹Œ
+เจริà¸à¸£à¸­à¸¢
+เจริà¸à¸ªà¸¡à¸“ธรรม
+เจริà¸à¸­à¸²à¸«à¸²à¸£
+เจริด
+เจรียง
+เจลียง
+เจว็ด
+เจษฎา
+เจ๊สัว
+เจอ
+เจ่อ
+เจ๋อ
+เจ๋อเจ๊อะ
+เจอร์เมเนียม
+เจอะ
+เจา
+เจ่า
+เจ้า
+เจ๊า
+เจ้าà¸à¸£à¸¡
+เจ้าà¸à¸£à¸£à¸¡
+เจ้าà¸à¸£à¸£à¸¡à¸™à¸²à¸¢à¹€à¸§à¸£
+เจ้าà¸à¸£à¸°à¸—รวง
+เจ้าà¸à¸µà¹‰à¹€à¸ˆà¹‰à¸²à¸à¸²à¸£
+เจ้าà¸à¸¹
+เจ้าขรัว
+เจ้าของ
+เจ้าขา
+เจ้าข้า
+เจ้าข้าวà¹à¸”งà¹à¸à¸‡à¸£à¹‰à¸­à¸™
+เจ้าขุนมุลนาย
+เจ้าขุนมูลนาย
+เจ้าไข้
+เจ้าคณะ
+เจ้าครอà¸
+เจ้าคารม
+เจ้าคุณ
+เจ้าคุณจอม
+เจ้าà¹à¸‡à¹ˆà¹€à¸ˆà¹‰à¸²à¸‡à¸­à¸™
+เจ้าà¹à¸‡à¹ˆà¹à¸ªà¸™à¸‡à¸­à¸™
+เจ้าจอม
+เจ้าจอมมารดา
+เจ้าจำนวน
+เจ้าจำนำ
+เจ่าจุà¸
+เจ้าชีวิต
+เจ้าชู้
+เจ้าเซ็น
+เจ้าเซ็นเต้นต้ำบุด
+เจ้าตัว
+เจ้าถ้อยหมอความ
+เจ้าท่า
+เจ้าที่
+เจ้าทุà¸à¸‚์
+เจ้าไทย
+เจ้านาย
+เจ้าเนื้อ
+เจ้าบ้าน
+เจ้าบ่าว
+เจ้าบุà¸à¸™à¸²à¸¢à¸„ุณ
+เจ้าเบี้ย
+เจ้าประคุณ
+เจ้าประคู้น
+เจ้าปู่
+เจ้าพนัà¸à¸‡à¸²à¸™
+เจ้าพนัà¸à¸‡à¸²à¸™à¸šà¸±à¸‡à¸„ับคดี
+เจ้าพนัà¸à¸‡à¸²à¸™à¸žà¸´à¸—ัà¸à¸©à¹Œà¸—รัพย์
+เจ้าพนัà¸à¸‡à¸²à¸™à¸ à¸¹à¸©à¸²à¸¡à¸²à¸¥à¸²
+เจ้าพนัà¸à¸‡à¸²à¸™à¸ªà¸™à¸¡à¸žà¸¥à¹€à¸£à¸·à¸­à¸™
+เจ้าพระเดชนายพระคุณ
+เจ้าพระยา
+เจ้าพ่อ
+เจ้าพายุ
+เจ้าฟ้า
+เจ้าฟ้าหà¸à¸´à¸‡à¸ªà¸´à¸£à¸´à¸™à¸˜à¸£
+เจ้าภาพ
+เจ้าภาษี
+เจ้ามรดà¸
+เจ้ามือ
+เจ้าà¹à¸¡à¹ˆ
+เจ้าไม่มีศาล สมภารไม่มีวัด
+เจ้ายศ
+เจ้าเรือน
+เจ้าเล่ห์
+เจ้าสัว
+เจ้าสาว
+เจ้าสำนวน
+เจ้าสำบัดสำนวน
+เจ้าสำราà¸
+เจ้าหน้า
+เจ้าหน้าเจ้าตา
+เจ้าหน้าที่
+เจ้าหนี้
+เจ้าหลวง
+เจ้าหล่อน
+เจ้าหัว
+เจ้าอธิà¸à¸²à¸£
+เจ้าอารมณ์
+เจ้าอาวาส
+เจาะ
+เจาะจง
+เจาะจมูà¸
+เจิ่ง
+เจิด
+เจิดจ้า
+เจิ่น
+เจิม
+เจีย
+เจียง
+เจียด
+เจียดยา
+เจียน
+เจี๋ยน
+เจี๊ยบ
+เจียม
+เจี๋ยมเจี้ยม
+เจียมสังขาร
+เจียร
+เจียระไน
+เจียระบาด
+เจียว
+เจี๊ยวจ๊าว
+เจือ
+เจือจาง
+เจือจาน
+เจื่อน
+เจือปน
+เจื้อย
+เจื้อยà¹à¸ˆà¹‰à¸§
+เจือสม
+à¹à¸ˆ
+à¹à¸ˆà¹‰
+à¹à¸ˆà¹‹
+à¹à¸ˆà¸
+à¹à¸ˆà¸à¸ˆà¹ˆà¸²à¸¢
+à¹à¸ˆà¸à¹à¸ˆà¸‡
+à¹à¸ˆà¸à¹„พ่
+à¹à¸ˆà¸à¸±à¸™
+à¹à¸ˆà¸‡
+à¹à¸ˆà¹ˆà¸‡
+à¹à¸ˆà¹‰à¸‡
+à¹à¸ˆà¹‰à¸‡à¸„วาม
+à¹à¸ˆà¸‡à¸£à¸¹à¸›
+à¹à¸ˆà¸‡à¸¥à¸­à¸™
+à¹à¸ˆà¸‡à¸ªà¸µà¹ˆà¹€à¸šà¸µà¹‰à¸¢
+à¹à¸ˆà¸ˆà¸™
+à¹à¸ˆà¸ˆà¸±à¸™
+à¹à¸ˆà¹Šà¸”
+à¹à¸ˆà¸”à¹à¸ˆà¹‰
+à¹à¸ˆà¹Šà¸”à¹à¸ˆà¹‹
+à¹à¸ˆà¸•à¸£
+à¹à¸ˆà¹‰à¸™
+à¹à¸ˆà¸š
+à¹à¸ˆà¹ˆà¸¡
+à¹à¸ˆà¹ˆà¸¡à¹à¸ˆà¹‰à¸‡
+à¹à¸ˆà¹ˆà¸¡à¹ƒà¸ª
+à¹à¸ˆà¸£
+à¹à¸ˆà¸£à¸
+à¹à¸ˆà¸£à¸‡
+à¹à¸ˆà¸§
+à¹à¸ˆà¹ˆà¸§
+à¹à¸ˆà¹‰à¸§
+à¹à¸ˆà¹‰à¸§à¹†
+à¹à¸ˆà¹‹à¸§
+à¹à¸ˆà¹‹à¸§à¹à¸«à¸§à¸§
+à¹à¸ˆà¸°
+โจà¸
+โจ๊à¸
+โจง
+โจงà¸à¸£à¸°à¹€à¸šà¸™
+โจงà¸à¸£à¸°à¹€à¸šà¸™à¸•à¸µà¹€à¸«à¸¥à¹‡à¸
+โจ่งครึ่ม
+โจ๋งครึ่ม
+โจ่งครุ่ม
+โจงโคร่ง
+โจ๋งเจ๋ง
+โจ่งà¹à¸ˆà¹‰à¸‡
+โจท
+โจทà¸à¹Œ
+โจทเจ้า
+โจทนา
+โจทย์
+โจน
+โจนร่ม
+โจม
+โจมตี
+โจมทัพ
+โจร
+โจร-
+โจรà¸à¸£à¸£à¸¡
+โจรสลัด
+โจล
+โจษ
+โจษจน
+โจษจัน
+โจษà¹à¸ˆ
+ใจ
+ใจà¸à¸¥à¸²à¸‡
+ใจà¸à¸§à¹‰à¸²à¸‡
+ใจขุ่น
+ใจà¹à¸‚็ง
+ใจความ
+ใจคอ
+ใจà¹à¸„บ
+ใจง่าย
+ใจจดใจจ่อ
+ใจจืด
+ใจเฉื่อย
+ใจชื้น
+ใจดำ
+ใจดี
+ใจเด็ด
+ใจเดียว
+ใจเดียวà¸à¸±à¸™
+ใจต่ำ
+ใจเติบ
+ใจà¹à¸•à¸
+ใจโต
+ใจถึง
+ใจน้อย
+ใจบาน
+ใจบุà¸
+ใจเบา
+ใจปลาซิว
+ใจป้ำ
+ใจà¹à¸›à¹‰à¸§
+ใจà¸à¹ˆà¸­
+ใจเพชร
+ใจมา
+ใจมือ
+ใจไม่ดี
+ใจไม้ไส้ระà¸à¸³
+ใจยัà¸à¸©à¹Œ
+ใจเย็น
+ใจร้อน
+ใจร้าย
+ใจเร็ว
+ใจลอย
+ใจสูง
+ใจเสาะ
+ใจเสีย
+ใจหนัà¸à¹à¸™à¹ˆà¸™
+ใจหาย
+ใจเหี่ยวà¹à¸«à¹‰à¸‡
+ใจใหà¸à¹ˆà¹ƒà¸ˆà¹‚ต
+ใจอ่อน
+ไจ
+ไจ้
+ไจ้ๆ
+ไจร
+ฉ
+ฉà¸
+ฉà¸à¸ˆà¸§à¸±à¸
+ฉà¸à¸‰à¸§à¸¢
+ฉà¸à¸Šà¸´à¸‡
+ฉà¸à¸£à¸£à¸ˆà¹Œ
+ฉà¸à¸£à¸£à¸ˆà¹Œà¸¥à¸³à¹€à¸„รื่อง
+ฉà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ
+ฉà¸à¸²à¸ˆ
+ฉà¸à¸²à¸ˆà¸‰à¸à¸£à¸£à¸ˆà¹Œ
+ฉà¸à¸²à¸¡à¸²à¸žà¸ˆà¸£
+ฉà¸à¸²à¸¡à¸²à¸§à¸ˆà¸£
+ฉง
+ฉงน
+ฉงาย
+ฉทวาร
+ฉทานศาลา
+ฉทึง
+ฉนวน
+ฉนัง
+ฉนาà¸
+ฉนำ
+ฉบบ
+ฉบัง
+ฉบัด
+ฉบับ
+ฉบำ
+ฉพีสติม-
+ฉม
+ฉมบ
+ฉมวà¸
+ฉมวย
+ฉม่อง
+ฉมัง
+ฉมัน
+ฉมา
+ฉมำ
+ฉล
+ฉลวย
+ฉลวยฉลาด
+ฉลอง
+ฉลองได
+ฉลองพระà¸à¸£à¸™à¹‰à¸­à¸¢
+ฉลองพระเนตร
+ฉลองพระบาท
+ฉลองพระศอ
+ฉลองพระหัตถ์
+ฉลองพระองค์
+ฉลององค์
+ฉลอม
+ฉลอมท้ายà¸à¸§à¸™
+ฉลัà¸
+ฉลับ
+ฉลาà¸
+ฉลาà¸à¸šà¸²à¸‡
+ฉลาง
+ฉลาด
+ฉลาม
+ฉลามเสือ
+ฉลาย
+ฉลิว
+ฉลีà¸
+ฉลุ
+ฉลุà¸à¸‰à¸¥à¸§à¸¢
+ฉลุลาย
+ฉลู
+ฉวย
+ฉวยฉาบ
+ฉวะ
+ฉวัดเฉวียน
+ฉวาง
+ฉวี
+ฉศà¸
+ฉ้อ
+ฉอà¸
+ฉ้อโà¸à¸‡
+ฉ่อง
+ฉ้อฉล
+ฉอดๆ
+ฉ่อย
+ฉ้อราษฎร์บังหลวง
+ฉอเลาะ
+ฉะ
+ฉะà¸à¸°
+ฉะฉาด
+ฉะฉาน
+ฉะฉ่ำ
+ฉะฉี่
+ฉะเฉื่อย
+ฉะต้า
+ฉะนั้น
+ฉะนี้
+ฉะหน้าโรง
+ฉะอ้อน
+ฉัà¸à¸à¸°
+ฉัà¸
+ฉัด
+ฉัตร
+ฉัตร-
+ฉัตรบรรณ
+ฉัตรมงคล
+ฉัตรสามชั้น
+ฉัททันต์
+ฉัน
+ฉันใด
+ฉันท-
+ฉันท์
+ฉันทลัà¸à¸©à¸“์
+ฉันทวิลาส
+ฉันทศาสตร์
+ฉันทะ
+ฉันทา
+ฉันทาคติ
+ฉันทานุมัติ
+ฉันนั้น
+ฉันวุติ
+ฉับ
+ฉับๆ
+ฉับพลัน
+ฉับไว
+ฉัพพรรณรังสี
+ฉัยยา
+ฉ่า
+ฉาà¸
+ฉาà¸à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™
+ฉาà¸à¸•à¸±à¹‰à¸‡
+ฉาà¸à¸—ิ้ง
+ฉาà¸à¸™à¹‰à¸­à¸¢
+ฉาà¸à¸šà¸±à¸‡à¹€à¸žà¸¥à¸´à¸‡
+ฉาà¸à¹ƒà¸«à¸à¹ˆ
+ฉาง
+ฉ่าง
+ฉ่าฉาว
+ฉาด
+ฉาดฉาน
+ฉาตà¸à¸ à¸±à¸¢
+ฉาทน
+ฉาน
+ฉาบ
+ฉาบฉวย
+ฉาป
+ฉาย
+ฉายเฉิด
+ฉายา
+ฉายาลัà¸à¸©à¸“์
+ฉาว
+ฉาวโฉ่
+ฉ่ำ
+ฉำฉา
+ฉำเฉง
+ฉำà¹à¸‰à¸°
+ฉิ่ง
+ฉิ่งตรัง
+ฉิน
+ฉินท-
+ฉินท์
+ฉินทฤà¸à¸©à¹Œ
+ฉิบ
+ฉิบหาย
+ฉิมพลี
+ฉิว
+ฉี่
+ฉีà¸
+ฉีà¸à¸«à¸™à¹‰à¸²
+ฉีด
+ฉีดยา
+ฉุ
+ฉุà¸
+ฉุà¸à¸„ิด
+ฉุà¸à¹ƒà¸ˆ
+ฉุà¸à¹€à¸‰à¸´à¸™
+ฉุà¸à¸¥à¸°à¸«à¸¸à¸
+ฉุด
+ฉุน
+ฉุนเฉียว
+ฉุป
+ฉุป-
+ฉุปศาสตร์
+ฉุย
+ฉุยฉาย
+ฉุยฉายเข้าวัง
+ฉู่
+ฉู่ฉี่
+ฉูด
+ฉูดฉาด
+เฉ
+เฉà¸
+เฉโà¸
+เฉ่ง
+เฉไฉ
+เฉด
+เฉท
+เฉนียน
+เฉพาะ
+เฉพาะà¸à¸²à¸¥
+เฉพาะà¸à¸´à¸ˆ
+เฉพาะตัว
+เฉพาะพระพัà¸à¸•à¸£à¹Œ
+เฉพาะหน้า
+เฉย
+เฉยๆ
+เฉยเมย
+เฉลย
+เฉลว
+เฉลา
+เฉลิม
+เฉลิมพระชนมพรรษา
+เฉลี่ย
+เฉลียง
+เฉลี่ยง
+เฉลียบ
+เฉลียว
+เฉลียวใจ
+เฉลียวฉลาด
+เฉวียง
+เฉวียงบ่า
+เฉวียน
+เฉอะà¹à¸‰à¸°
+เฉา
+เฉาà¸à¹Šà¸§à¸¢
+เฉาโฉด
+เฉาฮื้อ
+เฉาะ
+เฉาะๆ
+เฉาะปล่อง
+เฉิด
+เฉิดฉัน
+เฉิดฉาย
+เฉิดฉิน
+เฉิบ
+เฉิบๆ
+เฉียง
+เฉียงพร้าดำ
+เฉียงพร้านางà¹à¸­
+เฉียงพร้ามอà¸
+เฉียด
+เฉียบ
+เฉียบขาด
+เฉียบพลัน
+เฉียบà¹à¸«à¸¥à¸¡
+เฉียว
+เฉี่ยว
+เฉียวฉุน
+เฉือน
+เฉื่อย
+เฉื่อยๆ
+เฉื่อยชา
+à¹à¸‰
+à¹à¸‰à¹ˆ
+à¹à¸‰à¸
+à¹à¸‰à¸à¹†
+à¹à¸‰à¸‡
+à¹à¸‰à¹ˆà¸‡
+à¹à¸‰à¹‚พย
+à¹à¸‰à¸¥à¸š
+à¹à¸‰à¸¥à¹‰à¸¡
+à¹à¸‰à¸¥à¸°
+à¹à¸‰à¸§
+à¹à¸‰à¸°
+à¹à¸‰à¸°à¹à¸šà¸°
+โฉ
+โฉ่
+โฉเà¸
+โฉ่งฉ่าง
+โฉงเฉง
+โฉ่ฉาว
+โฉด
+โฉดเฉา
+โฉนด
+โฉบ
+โฉเบ๊
+โฉม
+โฉมงาม
+โฉมฉาย
+โฉมเฉลา
+โฉมตรู
+โฉมยง
+โฉมศรี
+โฉมหน้า
+โฉลà¸
+ไฉน
+ไฉไล
+ช
+ชà¸
+ชà¸à¸¡à¸§à¸¢
+ชà¸à¸²
+ชค-
+ชคดี
+ชคัตตรัย
+ชง
+ชงคา
+ชงโค
+ชงฆ-
+ชงฆ์
+ชงฆา
+ชงโลง
+ชฎา
+ชฎาà¸à¸¥à¸µà¸š
+ชฎาเดินหน
+ชฎาธาร
+ชฎาà¹à¸›à¸¥à¸‡
+ชฎาพอà¸
+ชฎามหาà¸à¸à¸´à¸™
+ชฎามังษี
+ชฎามังสี
+ชฎิล
+ชด
+ชดช้อย
+ชดเชย
+ชดใช้
+ชทึง
+ชน
+ชน-
+ชนà¸
+ชนà¸-
+ชนà¸à¸à¸£à¸£à¸¡
+ชนช้าง
+ชนนี
+ชนบท
+ชนม-
+ชนม์
+ชนมพรรษา
+ชนมาพิธี
+ชนมายุพิธี
+ชนวน
+ชนหมู่น้อย
+ชนะ
+ชนัà¸
+ชนัà¸à¸•à¸´à¸”หลัง
+ชนา
+ชนาง
+ชนิด
+ชนินทร์
+ชเนตตี
+ชบา
+ชบาหนู
+ชปโยค
+ชม
+ชมชัว
+ชมชาà¸
+ชมเชย
+ชมไช
+ชมดชม้อย
+ชมนาด
+ชมบ
+ชมเปาะ
+ชมพู
+ชมพู่
+ชมพูทวีป
+ชมพูนท
+ชมพูนุท
+ชมพูพาดบ่า
+ชมรม
+ชมเลาะ
+ชมสวนสวรรค์
+ชม้อย
+ชมัน
+ชมา
+ชม้าย
+ชไม
+ชย
+ชย-
+ชยา
+ชโย
+ชร
+ชรทึง
+ชรโมล
+ชรไม
+ชรราง
+ชรริน
+ชรเรือด
+ชรà¹à¸£à¸‡
+ชรà¹à¸£à¹ˆà¸‡
+ชรโลง
+ชรอà¸à¸Šà¸£à¸±à¸‡
+ชรออบ
+ชรอัด
+ชรอ่ำ
+ชรอื้อ
+ชรอุ่ม
+ชระ
+ชระงม
+ชระง่อน
+ชระงำ
+ชระดัด
+ชระดื่น
+ชระเดียด
+ชระเดียดชระดัด
+ชระบอบ
+ชระบาบ
+ชระมด
+ชระมัว
+ชระมื่น
+ชระมุà¸à¸Šà¸£à¸°à¸¡à¸­à¸¡
+ชระมุ่น
+ชระเมียง
+ชระเมียน
+ชระลอ
+ชระลอง
+ชระล่อง
+ชระลั่ง
+ชระลัด
+ชระล้ำ
+ชระลุ
+ชระà¹à¸¥à¸‡
+ชระอับ
+ชระอาบ
+ชระเอม
+ชรัด
+ชรัว
+ชรา
+ชราà¸à¸²à¸à¸µ
+ชราธรรม
+ชราบ
+ชราบชรับ
+ชราภาพ
+ชรายุ
+ชริน
+ชรุà¸
+ชรูบ
+ชล
+ชล-
+ชลจร
+ชลจัณฑ์
+ชลชาติ
+ชลธาร
+ชลธารà¸
+ชลธิศ
+ชลธี
+ชลนัยน์
+ชลนา
+ชลเนตร
+ชลประทาน
+ชลมารค
+ชลสถาน
+ชลัมพุ
+ชลาธาร
+ชลาพุช
+ชลามพุช
+ชลาลัย
+ชลาศัย
+ชลี
+ชลูà¸à¸²
+ชเล
+ชโลง
+ชโลทร
+ชโลม
+ชว-
+ช่วง
+ช่วงชัย
+ช่วงชิง
+ช่วงโชติ
+ช่วงใช้
+ช่วงทรัพย์
+ช่วงบาท
+ช่วงเมือง
+ช่วงสิทธิ์
+ชวด
+ชวน
+ชวนชม
+ชวนหัว
+ชวย
+ช่วย
+ช่วยเหลือ
+ชวร
+ชวลิต
+ชวัà¸
+ชวา
+ชวาล
+ชวาลา
+ช่อ
+ชอà¸
+ช็อà¸à¹‚à¸à¹€à¸¥à¸•
+ช็อà¸à¹‚à¸à¹à¸¥à¸•
+ชอà¸à¸Šà¹‰à¸³
+ชอง
+ช่อง
+ช้อง
+ช่องà¸à¸¸à¸”
+ช่องเขา
+ช่องà¹à¸„บ
+ช่องดาล
+ช่องตีนà¸à¸²
+ช้องนาง
+ช้องนางคลี่
+ช่องไฟ
+ช้องà¹à¸¡à¸§
+ชองระอา
+ชอน
+ช่อน
+ช้อน
+ช้อนนาง
+ช้อนหอย
+ชอบ
+ชอบà¸à¸¥
+ชอบใจ
+ชอบธรรม
+ชอบพอ
+ชอบมาพาà¸à¸¥
+ช่อฟ้า
+ชอม
+ช่อม่วง
+ช่อย
+ช้อย
+ช้อยชด
+ช้อยช่างรำ
+ช้อยนางรำ
+ชอล์à¸
+ช่ออินทนิล
+ชอ่ำ
+ชอื้อ
+ชอุ่ม
+ชะ
+ชะคราม
+ชะงอà¸
+ชะง่อน
+ชะงัà¸
+ชะงัด
+ชะงาบ
+ชะง้ำ
+ชะงุ้ม
+ชะเง้อ
+ชะเงื้อม
+ชะà¹à¸‡à¹‰
+ชะโงà¸
+ชะโงà¸à¸œà¸²
+ชะฉ่า
+ชะช่อง
+ชะชะ
+ชะช้า
+ชะชิด
+ชะดีชะร้าย
+ชะโด
+ชะตา
+ชะต้า
+ชะนี
+ชะนีร่ายไม้
+ชะนุง
+ชะเนาะ
+ชะเนียง
+ชะพลู
+ชะเพลิง
+ชะมด
+ชะมดเชียง
+ชะมดต้น
+ชะมบ
+ชะมวง
+ชะมัง
+ชะมัด
+ชะà¹à¸¡à¹ˆ
+ชะรอย
+ชะลอ
+ชะลอม
+ชะล่า
+ชะลาน
+ชะลิน
+ชะลูด
+ชะเลง
+ชะเลย
+ชะà¹à¸¥à¹‡à¸
+ชะà¹à¸¥à¸‡
+ชะวัง
+ชะวาà¸
+ชะวาà¸à¸—ะเล
+ชะวาด
+ชะวุ้ง
+ชะเวิà¸à¸Šà¸°à¸§à¸²à¸
+ชะà¹à¸§à¸‡
+ชะอม
+ชะอ้อน
+ชะเอม
+ชะโอน
+ชัà¸
+ชัà¸à¸à¸£à¸°à¸šà¸µà¹ˆà¸ªà¸µà¹ˆà¸—่า
+ชัà¸à¸„ราม
+ชัà¸à¹‚ครà¸
+ชัà¸à¹€à¸‡à¸²
+ชัà¸à¸ˆà¸¹à¸‡
+ชัà¸à¸Šà¸§à¸™
+ชัà¸à¸Šà¹‰à¸²
+ชัà¸à¸‹à¸­à¸ªà¸²à¸¡à¸ªà¸²à¸¢
+ชัà¸à¸‹à¸¸à¸‡à¸•à¸²à¸¡à¸‚วาง
+ชัà¸à¸•à¸°à¸žà¸²à¸™à¹à¸«à¸‡à¸™à¹€à¸–่อ
+ชัà¸à¸™à¸³
+ชัà¸à¸™à¹‰à¸³à¹€à¸‚้าลึภชัà¸à¸¨à¸¶à¸à¹€à¸‚้าบ้าน
+ชัà¸à¹€à¸™à¸·à¹‰à¸­
+ชัà¸à¹ƒà¸šà¹ƒà¸«à¹‰à¹€à¸£à¸·à¸­à¹€à¸ªà¸µà¸¢
+ชัà¸à¹à¸›à¹‰à¸‡à¸œà¸±à¸”หน้า
+ชัà¸à¸žà¸£à¸°
+ชัà¸à¹à¸¡à¹ˆà¸™à¹‰à¸³à¸—ั้งห้า
+ชัà¸à¸¢à¸±à¸™à¸•à¹Œ
+ชัà¸à¹€à¸¢à¹ˆà¸­
+ชัà¸à¹ƒà¸¢
+ชัà¸à¸£à¸¹à¸›
+ชัà¸à¸¨à¸ž
+ชัà¸à¸ªà¸­à¸‡à¹à¸–ว
+ชัà¸à¸ªà¸·à¹ˆà¸­
+ชัà¸à¸«à¸™à¹‰à¸²
+ชัà¸à¸«à¸™à¹‰à¸²à¹„ม่ถึงหลัง
+ชัค-
+ชัง
+ชั่ง
+ชังคา
+ชังฆ-
+ชังฆวิหาร
+ชั่งใจ
+ชั่งหลวง
+ชัชวาล
+ชัà¸
+ชัด
+ชัดเจน
+ชัดช้า
+ชัน
+ชั้น
+ชันà¸à¸²à¸”
+ชันคอ
+ชั้นฉาย
+ชั้นชั่ว
+ชันชี
+ชั้นเชิง
+ชันตาฆร
+ชันตุ
+ชันนะตุ
+ชันนุ
+ชันนุà¸à¸°
+ชันพอน
+ชันโรง
+ชันษา
+ชันสน
+ชันสูตร
+ชันสูตรพลิà¸à¸¨à¸ž
+ชัปน
+ชัพ
+ชัมพูนท
+ชัย
+ชัย-
+ชัยบาน
+ชัยพฤà¸à¸©à¹Œ
+ชัยภูมิ
+ชัยเภรี
+ชัยศรี
+ชัลลุà¸à¸²
+ชั่ว
+ชั้ว
+ชั่วคน
+ชั่วคราว
+ชัวชม
+ชั่วช้า
+ชั่วช่างชี ดีช่างสงฆ์
+ชั่วà¹à¸•à¹ˆà¸§à¹ˆà¸²
+ชั่วนาตาปี
+ชั่วโมง
+ชั่วà¹à¸¥à¹ˆà¸™
+ชา
+ช้า
+ช้าà¸à¹ˆà¸­à¸™
+ชาคร
+ชาคริต
+ชาคริยานุโยค
+ช่าง
+ช้าง
+ช่างà¸à¸£à¸°à¹„ร
+ช่างเครื่อง
+ช้างงวง
+ช้างชำนิ
+ช้างชูงวง
+ช้างต่อ
+ช้างตายทั้งตัวเอาใบบัวมาปิด
+ช่างทอง
+ช้างทำลายโรง
+ช้างน้อย
+ช้างน้าว
+ช้างน้ำ
+ช้างประสานงา
+ช่างปะไร
+ช้างผะชด
+ช้างเผือà¸
+ช้างพลาย
+ช้างพัง
+ช่างฟิต
+ช่างไฟ
+ช้างร้อง
+ช้างสะบัดหà¸à¹‰à¸²
+ช้างเหยียบ
+ช่างเหล็à¸
+ช้างใหà¸à¹ˆ
+ช้าช่อน
+ชาà¸
+ชาด
+ชาดà¸
+ชาดหรคุณ
+ช้าๆ ได้พร้าสองเล่มงาม
+ชาต-
+ชาตบุษย์
+ชาตรี
+ชาตรูป
+ชาตสระ
+ชาตะ
+ชาตา
+ชาติ
+ชาติ-
+ชาติธรรม
+ชาตินิยม
+ชาติพันธุ์
+ชาติพันธุ์วรรณนา
+ชาติพันธุ์วิทยา
+ชาติภูมิ
+ชาติมาลา
+ชาติรส
+ชาน
+ชานชาลา
+ชานวาทิà¸
+ช้านางนอน
+ช้านาน
+ชานุ
+ชานุà¸à¸°
+ชานุมณฑล
+ช้าปี่
+ชาปีไหน
+ช้าเป็นà¸à¸²à¸£ นานเป็นคุณ
+ช้าà¹à¸›à¹‰à¸™
+ช้าพลู
+ชาม
+ชามพูนท
+ชามาดร
+ชามาดา
+ชามาตุ
+ชาย
+ชายà¸à¸£à¸°à¹€à¸šà¸™
+ชายà¸à¸£à¸°à¹€à¸šà¸™à¹€à¸«à¸™à¹‡à¸š
+ชายคา
+ชายà¹à¸„รง
+ชายชาตรี
+ชายตา
+ชายทะเล
+ชายธง
+ชายผ้าสีดา
+ชายà¸à¸±à¹ˆà¸‡
+ชายเฟือย
+ชายสามโบสถ์
+ชายไหว
+ชายา
+ชายาชีพ
+ชายานุชีพ
+ชาเยนทร์
+ชาเยศ
+ชาร
+ชารี
+ชาล
+ชาล-
+ชาลà¸à¸£à¸£à¸¡
+ชาลา
+ชาลินี
+ช้าลูà¸à¸«à¸¥à¸§à¸‡
+ช้าเลือด
+ชาว
+ชาวนอà¸
+ชาวน้ำ
+ชาวม่าน
+ชาวเล
+ชาววัง
+ชาวี
+ช้าหมอง
+ชำ
+ช่ำ
+ช้ำ
+ชำงัด
+ชำงาย
+ชำงือ
+ช่ำใจ
+ช้ำใจ
+ช้ำชอà¸
+ช่ำชอง
+ช่ำช่า
+ชำนน
+ชำนรร
+ชำนะ
+ชำนัà¸
+ชำนัà¸à¸žà¸´à¹€à¸¨à¸©
+ชำนัน
+ชำนาà¸
+ชำนาà¸à¹€à¸à¸¥à¸²à¸à¸¥à¸­à¸™
+ชำนิ
+ชำนิชำนาà¸
+ชำเนียน
+ชำเนียร
+ช่ำปอด
+ชำมะนาด
+ชำมะเลียง
+ชำร่วย
+ชำระ
+ช้ำรั่ว
+ชำรุด
+ชำเรา
+ชำเราะ
+ชำà¹à¸£à¸
+ชำà¹à¸£à¸°
+ชำลา
+ชำเลือง
+ช้ำเลือดช้ำหนอง
+ชำà¹à¸«à¸¥à¸°
+ชิ
+ชิง
+ชิ่ง
+ชิงคม
+ชิงช่วง
+ชิงชัง
+ชิงชัน
+ชิงชัย
+ชิงช้า
+ชิงช้าชาลี
+ชิงช้าสวรรค์
+ชิงชี่
+ชิงเชิง
+ชิงดวง
+ชิงดีชิงเด่น
+ชิงทรัพย์
+ชิงเปรต
+ชิงพลบ
+ชิงสุà¸à¸à¹ˆà¸­à¸™à¸«à¹ˆà¸²à¸¡
+ชิงไหวชิงพริบ
+ชิงฮื้อ
+ชิชะ
+ชิชิ
+ชิณณะ
+ชิด
+ชิเดนทรีย์
+ชิต
+ชิต-
+ชิตินทรีย์
+ชิน
+ชิ่น
+ชิ้น
+ชินโต
+ชินบุตร
+ชิ้นเอà¸
+ชิโนรส
+ชิม
+ชิมà¹à¸›à¸™à¸‹à¸µ
+ชิมลาง
+ชิยา
+ชิรณ-
+ชิรณะ
+ชิรณัคคิ
+ชิระ
+ชิวหา
+ชิวหาสดมภ์
+ชิสา
+ชี
+ชี่
+ชี้
+ชี้ขาด
+ชี้à¹à¸ˆà¸‡
+ชี้ช่อง
+ชีต้น
+ชี้ตัว
+ชี้นà¸à¸šà¸™à¸›à¸¥à¸²à¸¢à¹„ม้
+ชี้นà¸à¹€à¸›à¹‡à¸™à¸™à¸ ชี้ไม้เป็นไม้
+ชี้นำ
+ชี้นิ้ว
+ชี้à¹à¸™à¸°
+ชีปะขาว
+ชีเปลือย
+ชีผะขาว
+ชีผ้าขาว
+ชีà¸à¸£à¸±à¹ˆà¸‡
+ชีพ
+ชีพ-
+ชีพจร
+ชีพิต
+ชีพิตัà¸à¸©à¸±à¸¢
+ชีพุà¸
+ชีฟอง
+ชี้ฟ้า
+ชีมืด
+ชีรณ-
+ชีรณัคคิ
+ชีระ
+ชีล้อม
+ชีลา
+ชีลาว
+ชีว-
+ชีวเคมี
+ชีวงคต
+ชีวประวัติ
+ชีวโลà¸
+ชีววิทยา
+ชีวะ
+ชีวัน
+ชีวันตราย
+ชีวา
+ชีวาตม์
+ชีวาลัย
+ชีวิต
+ชีวิตชีวา
+ชีวิตัà¸à¸©à¸±à¸¢
+ชีวิตินทรีย์
+ชีวิน
+ชีวี
+ชี้สองสถาน
+ชืด
+ชื่น
+ชื้น
+ชื่นชม
+ชื่นชมยินดี
+ชื่นบาน
+ชื่นมื่น
+ชื่อ
+ชื้อ
+ชื่อตัว
+ชื่อย่อ
+ชื่อเล่น
+ชื่อว่า
+ชื่อสà¸à¸¸à¸¥
+ชื่อเสียง
+ชุ
+ชุà¸
+ชุà¸à¸Šà¸µ
+ชุà¸à¸Šà¸¸à¸¡
+ชุ่ง
+ชุ้ง
+ชุณห-
+ชุณหปัà¸à¸©à¹Œ
+ชุด
+ชุติ
+ชุติมา
+ชุน
+ชุบ
+ชุบชีวิต
+ชุบชู
+ชุบตัว
+ชุบมือเปิบ
+ชุบย้อม
+ชุบเลี้ยง
+ชุบสรง
+ชุบอาบ
+ชุม
+ชุ่ม
+ชุ่มใจ
+ชุมชน
+ชุ่มชื่น
+ชุ่มชื้น
+ชุมทางรถไฟ
+ชุมนุม
+ชุมนุมชน
+ชุมพร
+ชุมพา
+ชุมเพ็ด
+ชุมà¹à¸žà¸£à¸
+ชุมรุม
+ชุมสาย
+ชุมสายโทรศัพท์
+ชุมà¹à¸ªà¸‡
+ชุมเห็ด
+ชุ่ย
+ชุ่ยๆ
+ชุลมุน
+ชุลี
+ชุษณ-
+ชุษณปัà¸à¸©à¹Œ
+ชุษณะ
+ชู
+ชู้
+ชูà¸à¸¥à¸´à¹ˆà¸™
+ชูคอ
+ชูใจ
+ชูชีพ
+ชูรส
+ชูโรง
+ชู้สาว
+ชูหน้าชูตา
+ชู้เหนือขันหมาà¸
+ชู้เหนือผัว
+ชู้เหนือผี
+เช็ค
+เช็คขีดคร่อม
+เช็คไปรษณีย์
+เช้ง
+เชงเลง
+เช้งวับ
+เช็ด
+เช็ดน้ำ
+เช็ดหน้า
+เช็ดหม้อ
+เชน
+เช่น
+เชย
+เชยชม
+เชรา
+เชราะ
+เชริด
+เชลง
+เชลย
+เชลยศัà¸à¸”ิ์
+เชลยศึà¸
+เชลà¹à¸¥à¹‡à¸
+เชลียง
+เชวง
+เชษà¸-
+เชษà¸à¸°
+เชษà¸à¸²
+เชอ
+เช่า
+เช้า
+เช่าช่วง
+เช่าซื้อ
+เช้าตรู่
+เช่าถือสวน
+เช่าทรัพย์
+เช่าพระ
+เช้ามืด
+เชาว์
+เชาวน์
+เชิง
+เชิงà¸à¸£à¸§à¸¢
+เชิงà¸à¸£à¸²à¸™
+เชิงà¸à¸¥
+เชิงà¸à¸¥à¸­à¸™
+เชิงชั้น
+เชิงชาย
+เชิงซ้อน
+เชิงเดิน
+เชิงเดียว
+เชิงเดี่ยว
+เชิงตะà¸à¸­à¸™
+เชิงทรง
+เชิงเทิน
+เชิงมุม
+เชิงเวียน
+เชิงอรรถ
+เชิà¸
+เชิด
+เชิดจีน
+เชิดฉิ่ง
+เชิดชู
+เชิดหนัง
+เชิดหน้าชูตา
+เชิดหุ่น
+เชิ้ต
+เชีย
+เชี้ย
+เชียง
+เชี่ยน
+เชี่ยนหมาà¸
+เชียบ
+เชี่ยม
+เชียร
+เชียร์
+เชียรณ์
+เชียว
+เชี่ยว
+เชี่ยวชาà¸
+เชื่อ
+เชื้อ
+เชือà¸
+เชือà¸à¹€à¸‚า
+เชือà¸à¸šà¸²à¸¨
+เชื่อง
+เชื่องช้า
+เชื่อใจ
+เชื้อชาติ
+เชื้อเชิà¸
+เชือด
+เชื่อถือ
+เชือน
+เชือนà¹à¸Š
+เชื้อเพลิง
+เชื่อฟัง
+เชื้อไฟ
+เชื่อม
+เชื่อมือ
+เชื้อไม่ทิ้งà¹à¸–ว
+เชื้อรา
+เชื้อโรค
+เชื่อวัน
+เชื้อสาย
+เชื้อหมัà¸
+à¹à¸Š
+à¹à¸Šà¹ˆ
+à¹à¸Šà¹ˆà¸‡
+à¹à¸Šà¹ˆà¸‡à¸Šà¸±à¸à¸«à¸±à¸à¸à¸£à¸°à¸”ูà¸
+à¹à¸Šà¹ˆà¸‡à¸™à¹‰à¸³
+à¹à¸Šà¸‡à¸¡à¸²
+à¹à¸Šà¸šà¹Šà¸§à¸¢
+à¹à¸Šà¹ˆà¹€à¸šà¹‰à¸²
+à¹à¸Šà¹ˆà¸¡
+à¹à¸Šà¹ˆà¸¡à¸Šà¹‰à¸­à¸¢
+à¹à¸Šà¹ˆà¸¡à¸Šà¸·à¹ˆà¸™
+à¹à¸Šà¹ˆà¹€à¸¢à¹‡à¸™
+à¹à¸Šà¸£à¹Œ
+à¹à¸Šà¸£à¸‡
+à¹à¸Šà¸¥à¹ˆà¸¡
+à¹à¸Šà¹ˆà¸­à¸´à¹ˆà¸¡
+à¹à¸Šà¸°
+โชà¸
+โชà¸à¹†
+โชà¸à¹‚ชน
+โชค
+โชงโลง
+โชดà¸
+โชดึà¸
+โชต
+โชตà¸
+โชติ
+โชติ-
+โชติà¸-
+โชติช่วง
+โชติรส
+โชน
+โชมโรม
+โชย
+โชยงà¸à¸²à¸£
+โชยชาย
+โชยติส
+โชรม
+โชว์
+โชโหว
+ใช่
+ใช้
+ใช้à¸à¸£à¸£à¸¡
+ใช้ได้
+ใช้เนื้อ
+ใช้บน
+ใช้ใบ
+ใช้เรือ
+ใช้สอย
+ไช
+ไชนะ
+ไชย
+ไชย-
+ไชยเภท
+ไชโย
+ซ
+ซà¸
+ซ่à¸
+ซงดำ
+ซ่งฮื้อ
+ซง้า
+ซด
+ซน
+ซ่น
+ซ้น
+ซบ
+ซบเซา
+ซม
+ซมซาน
+ซรอà¸à¸‹à¸£à¸±à¸‡
+ซวด
+ซวดเซ
+ซวดทรง
+ซวน
+ซวนเซ
+ซวย
+ซอ
+ซอà¸
+ซอà¸à¸‹à¸­à¸™
+ซอà¸à¸‹à¸±à¸‡
+ซอà¸à¹à¸‹à¸
+ซอง
+ซ่อง
+ซ่องๆ
+ซ้อง
+ซ่องà¹à¸‹à¹ˆà¸‡
+ซองพลู
+ซองมือ
+ซองà¹à¸¡à¸§
+ซ้องà¹à¸¡à¸§
+ซ่องสุม
+ซ่องเสพ
+ซองหาง
+ซอà¹à¸‹
+ซ้อà¹à¸‹à¹‰
+ซอน
+ซ่อน
+ซ้อน
+ซ้อนà¸à¸¥
+ซ่อนà¸à¸¥à¸´à¹ˆà¸™
+ซ่อนเงื่อน
+ซ้อนซับ
+ซ่อนทราย
+ซ่อนรูป
+ซ่อนหา
+ซอม
+ซ่อม
+ซ้อม
+ซ้อมค้าง
+ซอมซ่อ
+ซ้อมซัà¸
+ซ่อมà¹à¸‹à¸¡
+ซ่อมà¹à¸›à¸¥à¸‡
+ซ้อมพยาน
+ซ้อมพวน
+ซ้อมใหà¸à¹ˆ
+ซอย
+ซอยผม
+ซอส
+ซะซร้าว
+ซะซ่อง
+ซะซอเซีย
+ซะซิà¸à¸‹à¸°à¹à¸‹
+ซะซิบ
+ซะเซาะ
+ซะเซียบ
+ซัà¸
+ซัà¸à¸‹à¹‰à¸­à¸¡
+ซัà¸à¹„ซ้
+ซัà¸à¸Ÿà¸­à¸
+ซัà¸à¸ªà¹‰à¸²à¸§
+ซัà¸à¹à¸«à¹‰à¸‡
+ซัง
+ซั้ง
+ซังà¸à¸°à¸•à¸²à¸¢
+ซังà¹à¸‹à¸§
+ซังตาย
+ซัด
+ซัดข้าวสาร
+ซัดเซ
+ซัดทอด
+ซัดน้ำ
+ซัดยา
+ซั้น
+ซับ
+ซับขนุน
+ซับซ้อน
+ซับซาบ
+ซับซี่
+ซับใน
+ซับพระพัà¸à¸•à¸£à¹Œ
+ซับมัน
+ซัม
+ซัลฟา
+ซั้ว
+ซา
+ซ่า
+ซาà¸
+ซาà¸à¸”ึà¸à¸”ำบรรพ์
+ซาà¸à¸¨à¸ž
+ซาง
+ซ่าง
+ซาด
+ซาน
+ซ่าน
+ซ่านเซ็น
+ซาบซ่าน
+ซาบซึ้ง
+ซ่าโบะ
+ซาà¹à¸¡à¹€à¸£à¸µà¸¢à¸¡
+ซ้าย
+ซาลาเปา
+ซาว
+ซาวน้ำ
+ซาวเสียง
+ซ่าหริ่ม
+ซ้ำ
+ซ้ำซ้อน
+ซ้ำซาà¸
+ซ้ำเติม
+ซ้ำร้าย
+ซ้ำสาม
+ซิ
+ซิà¸
+ซิà¸à¹†
+ซิà¸à¸‹à¸µà¹‰
+ซิà¸à¹à¸‹à¹‡à¸
+ซิà¸à¸²à¸£à¹Œ
+ซิงโคนา
+ซิ่น
+ซินนามิà¸
+ซินà¹à¸ª
+ซิบ
+ซิบๆ
+ซิบซับ
+ซิป
+ซิฟิลิส
+ซิลิคอน
+ซิว
+ซี
+ซี่
+ซีà¸
+ซี่โครง
+ซี้ซอน
+ซีเซียม
+ซีด
+ซีดเซียว
+ซีนอน
+ซีป่าย
+ซีเมนต์
+ซีเรียม
+ซีลีเนียม
+ซึà¸
+ซึง
+ซึ่ง
+ซึ้ง
+ซึ่งหน้า
+ซึม
+ซึมà¸à¸°à¸—ือ
+ซึมซาบ
+ซึมทราบ
+ซื่อ
+ซื่อๆ
+ซื้อ
+ซื้อขาย
+ซื้อควายหน้านา ซื้อผ้าหน้าตรุษ
+ซื้องัวหน้านา ซื้อผ้าหน้าหนาว
+ซื่อตรง
+ซื้อรำคาà¸
+ซื้อรู้
+ซื่อสัตย์
+ซื้อหน้า
+ซื่อเหมือนà¹à¸¡à¸§à¸™à¸­à¸™à¸«à¸§à¸”
+ซุà¸
+ซุà¸à¸‹à¸™
+ซุà¸à¸‹à¹ˆà¸­à¸™
+ซุà¸à¸‹à¸´à¸
+ซุง
+ซุน
+ซุบ
+ซุบซิบ
+ซุบซู่
+ซุป
+ซุ่ม
+ซุ้ม
+ซุ้มà¸à¸£à¸°à¸•à¹ˆà¸²à¸¢
+ซุ่มคม
+ซุ่มซ่าม
+ซุมà¹à¸‹à¸§
+ซุ่มเสียง
+ซุย
+ซู่
+ซู่ๆ
+ซู่à¸à¸±à¹‰à¸™à¸£à¸±à¹‰à¸§à¹„ซมาน
+ซูโครส
+ซู่ซ่า
+ซูด
+ซู้ด
+ซูดซาด
+ซูบ
+เซ
+เซ็à¸
+เซà¹à¸„นต์
+เซ็ง
+เซ่ง
+เซ้ง
+เซ็งà¹à¸‹à¹ˆ
+เซซัง
+เซต
+เซน
+เซ็น
+เซ่น
+เซนติà¸à¸£à¸±à¸¡
+เซนติเà¸à¸£à¸”
+เซนติเมตร
+เซนติลิตร
+เซ่นเหล้า
+เซปัà¸à¸•à¸°à¸à¸£à¹‰à¸­
+เซรา
+เซราะ
+เซรุ่ม
+เซลเซียส
+เซลล์
+เซลล์ทุติยภูมิ
+เซลล์ปà¸à¸¡à¸ à¸¹à¸¡à¸´
+เซลลูลอยด์
+เซลลูโลส
+เซ่อ
+เซ่อซ่า
+เซอร์โคเนียม
+เซอะ
+เซา
+เซ้าซี้
+เซาะ
+เซาะลาย
+เซิง
+เซิ้ง
+เซียน
+เซียบ
+เซียมซี
+เซียว
+เซี่ยว
+เซี่ยวà¸à¸²à¸‡
+เซื่อง
+à¹à¸‹
+à¹à¸‹à¹ˆ
+à¹à¸‹à¹‡à¸à¸„าริน
+à¹à¸‹à¹‡à¸à¸„ารินโซเดียม
+à¹à¸‹à¸‡
+à¹à¸‹à¸‡à¹à¸‹à¸§
+à¹à¸‹à¹ˆà¸‹à¹‰à¸­à¸‡
+à¹à¸‹à¸”
+à¹à¸‹à¸”ๆ
+à¹à¸‹à¸š
+à¹à¸‹à¸¡
+à¹à¸‹à¸¢à¸´à¸”
+à¹à¸‹à¹ˆà¸§
+à¹à¸‹à¸°
+โซ
+โซ่
+โซà¸
+โซ่ง
+โซงโขดง
+โซซัดโซเซ
+โซเซ
+โซดา
+โซดาà¹à¸œà¸”เผา
+โซดาไฟ
+โซเดียม
+โซเดียมคาร์บอเนต
+โซเดียมซัลเฟต
+โซเดียมไซคลาเมต
+โซเดียมไฮโดรเจนà¸à¸¥à¸¹à¸—าเมต
+โซเดียมไฮโดรเจนคาร์บอเนต
+โซเดียมไฮโดรเจนซัลเฟต
+โซม
+โซรม
+โซรมประทยด
+โซรมโรม
+โซรมศัสตราวุธ
+โซลา
+ไซ
+ไซ้
+ไซเà¸à¸´à¸¥
+ไซโคลน
+ไซน์
+ไซยาไนด์
+ไซร้
+ไซเรน
+ไซโล
+ฌ
+ฌาน
+ฌาปน-
+ฌาปนà¸à¸´à¸ˆ
+ฌาปนสถาน
+เฌอ
+เฌอเอม
+à¸
+à¸à¸à¹ˆà¸²à¸¢
+à¸à¸§à¸™
+à¸à¸±à¸•à¸•à¸´
+à¸à¸²à¸“
+à¸à¸²à¸“-
+à¸à¸²à¸“ทัสนะ
+à¸à¸²à¸“วิทยา
+à¸à¸²à¸“ศาสตร์
+à¸à¸²à¸•à¸´
+à¸à¸²à¸•à¸´-
+à¸à¸²à¸•à¸´à¸à¸²
+à¸à¸²à¸•à¸´à¸”ีà¸à¸±à¸™
+à¸à¸²à¸•à¸´à¹€à¸ à¸—
+à¸à¸´à¸š
+à¸à¸µà¹ˆ
+à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™
+เà¸à¸¢à¸˜à¸£à¸£à¸¡
+ไà¸à¸¢à¸˜à¸£à¸£à¸¡
+ฎ
+ฎีà¸à¸²
+à¸
+à¸
+à¸à¸à¸±à¸”
+à¸à¸²à¸à¸¹à¸£
+à¸à¸²à¸™
+à¸à¸²à¸™-
+à¸à¸²à¸™à¸à¸£à¸“์
+à¸à¸²à¸™à¹€à¸‚ียง
+à¸à¸²à¸™à¹€à¸Šà¸´à¸‡à¸šà¸²à¸•à¸£
+à¸à¸²à¸™à¹€à¸—้าสิงห์
+à¸à¸²à¸™à¸šà¸±à¸—ม์
+à¸à¸²à¸™à¸£à¸²à¸
+à¸à¸²à¸™à¸ªà¸´à¸‡à¸«à¹Œ
+à¸à¸²à¸™à¸°
+à¸à¸²à¸™à¸±à¸™à¸”ร
+à¸à¸²à¸™à¸²à¸™à¸¸à¸à¸£à¸¡
+à¸à¸²à¸™à¸²à¸™à¸¸à¸£à¸¹à¸›
+à¸à¸²à¸™à¸²à¸™à¸¸à¸¨à¸±à¸à¸”ิ์
+à¸à¸²à¸™à¸µà¸¢à¸°
+à¸à¸²à¸›à¸™-
+à¸à¸²à¸›à¸™à¸²
+à¸à¸²à¸¢à¸µ
+à¸à¸´à¸•
+à¸à¸´à¸•à¸´
+ฑ
+ฑังส-
+ฑาà¸-
+ฑาหà¸
+ฑาหะ
+ฒ
+เฒ่า
+เฒ่าà¹à¸à¹ˆ
+เฒ่าหัวงู
+ณ
+ณรงค์
+เณร
+เณรหน้าไฟ
+เณรหางนาค
+ด
+ดà¸
+ดà¸à¸”ื่น
+ดง
+ด้ง
+ดงดาน
+ดงดิบ
+ดงดึà¸
+ดงวาย
+ด้น
+ด้นดั้น
+ดนโด่
+ดนตรี
+ด้นถอยหลัง
+ดนย
+ดนัย
+ดนุ
+ดนุช
+ดนู
+ดบัสวิน
+ดบัสวี
+ดม
+ดมไร
+ดร
+ดรงค์
+ดรณี
+ดรธาน
+ดรรชนี
+ดรรชนีหัà¸à¹€à¸«
+ดราฟต์
+ดรุ
+ดรุณ
+ดรุณาณัติ
+ดรุณี
+ดฤถี
+ดล
+ดล-
+ดลใจ
+ดลบันดาล
+ดลภาค
+ดวง
+ด้วง
+ดวงà¹à¸à¹‰à¸§
+ดวงใจ
+ดวงเดือนประดับดาว
+ดวงตา
+ดวงสมร
+ด้วงโสน
+ดวจ
+ดวด
+ด่วน
+ด้วน
+ด้วมเดี้ยม
+ด้วย
+ด้วยว่า
+ดอà¸
+ดอà¸à¸à¸£à¸°à¸šà¸­à¸
+ดอà¸à¸à¸°à¸—ือ
+ดอà¸à¸à¹‰à¸²à¸™
+ดอà¸à¸‚้าวใหม่
+ดอà¸à¸ˆà¸­à¸
+ดอà¸à¸ˆà¸±à¸™
+ดอà¸à¸ˆà¸±à¸™à¸—น์
+ดอà¸à¸ˆà¸´à¸
+ดอà¸à¸Šà¸™à¸•à¹‰à¸™
+ดอà¸à¸”ั้ว
+ดอà¸à¸”้าย
+ดอà¸à¸”ิน
+ดอà¸à¸–วายพระ
+ดอà¸à¸—อง
+ดอà¸à¸™à¹‰à¸³à¸œà¸¶à¹‰à¸‡
+ดอà¸à¸šà¸±à¸§
+ดอà¸à¸šà¸¸à¸
+ดอà¸à¹€à¸šà¸µà¹‰à¸¢
+ดอà¸à¹€à¸šà¸µà¹‰à¸¢à¸—บต้น
+ดอà¸à¸žà¸´à¸à¸¸à¸¥à¸£à¹ˆà¸§à¸‡
+ดอà¸à¸Ÿà¹‰à¸­à¸™
+ดอà¸à¸Ÿà¹‰à¸²
+ดอà¸à¸¡à¸°à¸‚าม
+ดอà¸à¸¡à¸°à¸•à¸²à¸”
+ดอà¸à¹„ม้
+ดอà¸à¹„ม้จันทน์
+ดอà¸à¹„ม้จีน
+ดอà¸à¹„ม้จีบ
+ดอà¸à¹„ม้เจ้า
+ดอà¸à¹„ม้ตาด
+ดอà¸à¹„ม้ทะเล
+ดอà¸à¹„ม้เทียน
+ดอà¸à¹„ม้ไทร
+ดอà¸à¹„ม้น้ำ
+ดอà¸à¹„ม้พวง
+ดอà¸à¹„ม้พุ่ม
+ดอà¸à¹„ม้เพลิง
+ดอà¸à¹„ม้ไฟ
+ดอà¸à¹„ม้ร่วง
+ดอà¸à¹„ม้รุ่ง
+ดอà¸à¹„ม้ไหว
+ดอà¸à¸£à¸±à¸
+ดอà¸à¸¥à¸³à¸”วน
+ดอà¸à¸¥à¸³à¹‚พง
+ดอà¸à¹€à¸¥à¹‡à¸š
+ดอà¸à¸ªà¸£à¹‰à¸­à¸¢
+ดอà¸à¸«à¸¡à¸²à¸
+ดอà¸à¸«à¸´à¸™
+ดอà¸à¸­à¸²à¸§
+ดอà¸à¸­à¸²à¸§à¹à¸”ง
+ดอง
+ด่องๆ
+ด้อง
+ด้องๆ
+ดองฉาย
+ดองดึง
+ดองยา
+ดองหาย
+ดอด
+ดอน
+ด่อน
+ดอม
+ด่อม
+ด้อม
+ดอย
+ด้อย
+ดอลลาร์
+ดะ
+ดะโต๊ะยุติธรรม
+ดะหมัง
+ดัà¸
+ดัà¸à¸„อ
+ดัà¸à¸”น
+ดัà¸à¸”าน
+ดัà¸à¹€à¸”ี้ย
+ดัà¸à¹à¸”้
+ดัà¸à¸Ÿà¸±à¸‡
+ดัà¸à¸©à¸
+ดัà¸à¸©à¸“
+ดัà¸à¸©à¸“ี
+ดัà¸à¸©à¸±à¸™
+ดัง
+ดั่ง
+ดั้ง
+ดังจริง
+ดั้งเดิม
+ดังนั้น
+ดังนี้
+ดังรือ
+ดังฤๅ
+ดังหนึ่ง
+ดัชนี
+ดัด
+ดัดจริต
+ดัดดั้น
+ดัดตน
+ดัดปลัà¸
+ดัดà¹à¸›à¸¥à¸‡
+ดัดสันดาน
+ดัตช์
+ดัน
+ดั้น
+ดันทุรัง
+ดั้นเมฆ
+ดันเหิม
+ดับ
+ดับขันธ์
+ดับเครื่อง
+ดับจิต
+ดับชีพ
+ดับลม
+ดัมพ์
+ดั้วเดี้ย
+ดัสà¸à¸£
+ดัสà¸à¸£à¸µ
+ดา
+ด่า
+ดาà¸
+ด่าง
+ด้าง
+ด่างทับทิม
+ด่างพร้อย
+ดาด
+ดาดๆ
+ดาดตะà¸à¸±à¹ˆà¸§
+ดาดฟ้า
+ดาดาษ
+ดาดำ
+ด่าทอ
+ดาน
+ด่าน
+ด้าน
+ด้านไม้
+ด้านหน้า
+ดาบ
+ดาบเงิน
+ดาบปลายปืน
+ดาบลาว
+ดาบส
+ดาบสองคม
+ดาม
+ด้าม
+ด้ามจิ้ว
+ดามพ-
+ดามพ์
+ดามพวรรณ
+ดามร
+ดาย
+ด้าย
+ด้ายซัง
+ด้ายดิบ
+ดาร
+ดารà¸
+ดารณี
+ดารดาษ
+ดารา
+ดาราบถ
+ดาราศาสตร์
+ดาล
+ดาลฉัตร
+ดาลเดือด
+ดาลโทสะ
+ดาลัด
+ดาลุ
+ดาลุช
+ดาว
+ด่าว
+ด้าว
+ดาวà¸à¸£à¸°à¸ˆà¸²à¸¢
+ดาวเคราะห์
+ดาวดึงส์
+ดาวตà¸
+ดาวเทียม
+ดาวบส
+ดาวรุ่ง
+ดาวเรือง
+ดาวฤà¸à¸©à¹Œ
+ดาวล้อมเดือน
+ดาวหาง
+ดาวเหนือ
+ดาษ
+ดาษดา
+ดาษดื่น
+ดาษเดียร
+ดาหงัน
+ดาฬ
+ดำ
+ด่ำ
+ด้ำ
+ดำà¸à¸¥
+ดำเà¸à¸´à¸‡
+ดำà¹à¸„ง
+ดำดง
+ดำดิน
+ดำà¹à¸”ง
+ดำๆ à¹à¸”งๆ
+ดำนา
+ดำนาณ
+ดำนาน
+ดำนู
+ดำเนิน
+ดำเนินคดี
+ดำเนียน
+ดำเนียร
+ดำบล
+ดำปืน
+ดำพอง
+ดำโพง
+ดำรง
+ดำรวจ
+ดำรัส
+ดำริ
+ดำรี
+ดำรู
+ดำไร
+ดำฤษณา
+ดำเลิง
+ดำà¹à¸¥à¸‡
+ดำหนัà¸
+ดำหนิ
+ดำหัว
+ดำอวด
+ดิà¸
+ดิà¸à¹†
+ดิง
+ดิ่ง
+ดิ่งพสุธา
+ดิฉัน
+ดิà¸
+ดิตถ์
+ดิถี
+ดิน
+ดิ้น
+ดินà¸à¸£à¸”
+ดินขาว
+ดินเค็ม
+ดินดอนสามเหลี่ยม
+ดินดำ
+ดินà¹à¸”ง
+ดินนวล
+ดินประสิว
+ดินปืน
+ดินเปรี้ยว
+ดินพอà¸à¸«à¸²à¸‡à¸«à¸¡à¸¹
+ดิ้นรน
+ดินร่วน
+ดินระเบิด
+ดินส้ม
+ดินสอ
+ดินสอพอง
+ดินสำลี
+ดินหู
+ดินอีหรอบ
+ดิบ
+ดิบดี
+ดิรัจฉาน
+ดิลà¸
+ดิ่ว
+ดิ้ว
+ดิ้วเดี้ยว
+ดิษà¸à¹Œ
+ดิสโพรเซียม
+ดี
+ดีๆ
+ดีเà¸à¸¥à¸·à¸­
+ดีเà¸à¸¥à¸·à¸­à¸à¸£à¸±à¹ˆà¸‡
+ดีงู
+ดีใจ
+ดีฉัน
+ดีฉาน
+ดีซ่าน
+ดีเซล
+ดีด
+ดีดขัน
+ดีดดิ้น
+ดีดà¸à¹‰à¸²à¸¢
+ดีดพิมพ์
+ดีดลูà¸à¸„ิด
+ดีดลูà¸à¸„ิดรางà¹à¸à¹‰à¸§
+-ดีดัà¸
+ดีดีที
+ดีเดือด
+ดีà¹à¸•à¸
+ดีนาคราช
+ดีเนื้อดีใจ
+ดีบัว
+ดีบุà¸
+ดีปลี
+ดีเปรสชัน
+ดีผา
+ดีà¸à¹ˆà¸­
+ดีพร
+ดีไม่ดี
+ดียา
+ดีร้าย
+ดีละ
+ดีà¹à¸¥à¹‰à¸§
+ดีหมี
+ดีหลี
+ดีหิน
+ดีอà¸à¸”ีใจ
+ดึà¸
+ดึà¸à¸”ำบรรพ์
+ดึà¸à¸”ื่น
+ดึง
+ดึ่ง
+ดึงดัน
+ดึงดื้อ
+ดึงดูด
+ดึงสะ
+ดึ่ม
+ดื่น
+ดื่นดาษ
+ดื่นดึà¸
+ดื่ม
+ดื่มด่ำ
+ดือ
+ดื้อ
+ดื้อดัน
+ดื้อด้าน
+ดื้อดึง
+ดื้อà¹à¸žà¹ˆà¸‡
+ดื้อยา
+ดุ
+ดุà¸
+ดุà¸à¸”ิà¸
+ดุà¸à¸—ะเล
+ดุà¸à¸¥à¸³à¸žà¸±à¸™
+ดุ้ง
+ดุ้งดิ้ง
+ดุจ
+ดุจดัง
+ดุจหนึ่ง
+ดุด
+ดุดัน
+ดุเดือด
+ดุน
+ดุ้น
+ดุบๆ
+ดุม
+ดุ่ม
+ดุ่มๆ
+ดุ่ย
+ดุรค
+ดุรงค์
+ดุรงคี
+ดุร้าย
+ดุริย-
+ดุริยะ
+ดุริยางค-
+ดุริยางค์
+ดุริยางค์จำเรียง
+ดุริยางคศาสตร์
+ดุริยางคศิลป์
+ดุล
+ดุล-
+ดุลà¸à¸²à¸£à¸„้า
+ดุลà¸à¸²à¸£à¸Šà¸³à¸£à¸°à¹€à¸‡à¸´à¸™
+ดุลชำระหนี้
+ดุลพินิจ
+ดุลภาค
+ดุลย-
+ดุลยพินิจ
+ดุลยภาพ
+ดุลอำนาจ
+ดุษฎี
+ดุษฎีนิพนธ์
+ดุษฎีบัณฑิต
+ดุษฎีมาลา
+ดุษฎีสังเวย
+ดุษณี
+ดุษณีภาพ
+ดุษิต
+ดุสิต
+ดุเหว่า
+ดู
+ดูà¸à¹„à¸à¹ˆà¸”ำ
+ดูà¸à¸„่าง
+ดูà¸à¸£
+ดูà¸à¹ˆà¸­à¸™
+ดูà¹à¸„ลน
+ดูใจ
+ดูช้างให้ดูหาง ดูนางให้ดูà¹à¸¡à¹ˆ
+ดูซิ
+ดูด
+ดูดดึง
+ดูดดื่ม
+ดูดอมดูดาย
+ดูดาย
+ดูดู๋
+ดูตาม้าตาเรือ
+ดูถูà¸
+ดูถูà¸à¸”ูà¹à¸„ลน
+ดูเถอะ
+ดูเถิด
+ดูà¹à¸™à¹ˆà¸°
+ดูเบา
+ดูไปà¸à¹ˆà¸­à¸™
+ดูรา
+ดูร้าย
+ดูรึ
+ดูà¹à¸¥
+ดูหมิ่น
+ดูหมิ่นถิ่นà¹à¸„ลน
+ดูหรือ
+ดูหรู
+ดูเหมือน
+เด
+เด่
+เดà¸
+เด็à¸
+เด็à¸à¸Šà¸²
+เด็à¸à¸Šà¸²à¸¢
+เดà¸à¸‹à¹Œà¹‚ทรส
+เด็à¸à¹à¸”ง
+เด็à¸à¹€à¸¡à¸·à¹ˆà¸­à¸§à¸²à¸™à¸‹à¸·à¸™
+เด็à¸à¸«à¸à¸´à¸‡
+เด็à¸à¸­à¸¡à¸¡à¸·à¸­
+เดคาà¸à¸£à¸±à¸¡
+เดคาเมตร
+เดคาลิตร
+เด้ง
+เด็จ
+เดช
+เดชน์
+เดชนะ
+เดชะ
+เดโช
+เดโชชัย
+เดโชพล
+เดซิà¸à¸£à¸±à¸¡
+เดซิเมตร
+เดซิลิตร
+เด็ด
+เด็ดขาด
+เด็ดดวง
+เด็ดดอà¸à¹„ม้ร่วมต้น
+เด็ดดอà¸à¹„ม่ไว้ขั้ว
+เด็ดเดี่ยว
+เด็ดบัวไม่ไว้ใย
+เด็ดปลีไม่มีใย
+เดน
+เด่น
+เดนตาย
+เดนมาร์à¸
+เดรัจฉาน
+เด๋อ
+เด๋อด๋า
+เดา
+เด่า
+เด่าๆ
+เด้า
+เด้าดิน
+เด้าลม
+เดาสวด
+เดาสุ่ม
+เดาะ
+เดิน
+เดิ่น
+เดินขบวน
+เดินคาถา
+เดินจัà¸à¸£
+เดินตลาด
+เดินตามหลังผู้ใหà¸à¹ˆà¸«à¸¡à¸²à¹„ม่à¸à¸±à¸”
+เดินà¹à¸•à¹‰à¸¡
+เดินโต๊ะ
+เดินทอง
+เดินทัพ
+เดินทาง
+เดินทุ่ง
+เดินเทียน
+เดินธุระให้
+เดินนา
+เดินป้าย
+เดินรถ
+เดินเรือ
+เดินเรื่อง
+เดินสวน
+เดินสะพัด
+เดินสาย
+เดินเส้น
+เดินหน
+เดินเหิน
+เดินไหม
+เดินอาà¸à¸²à¸¨
+เดิม
+เดิมที
+เดิมพัน
+เดี้ย
+เดียง
+เดียงสา
+เดียด
+เดียดฉันท์
+เดียร
+เดียรดาษ
+เดียรถ์
+เดียรถีย์
+เดียรัจฉาน
+เดียว
+เดี่ยว
+เดี๋ยว
+เดี๋ยวà¸à¹ˆà¸­à¸™
+เดียวà¸à¸±à¸™
+เดียวดาย
+เดี๋ยวเดียว
+เดี๋ยวนี้
+เดียะ
+เดื่อ
+เดือà¸
+เดื่อง
+เดือด
+เดือดดาล
+เดือดร้อน
+เดือน
+เดือนขาด
+เดือนค้างฟ้า
+เดือนคี่
+เดือนคู่
+เดือนเต็ม
+เดือนมืด
+เดือนเย็น
+เดือนร้อน
+เดือนหงาย
+เดือย
+เดือยไà¸à¹ˆ
+à¹à¸”
+à¹à¸”่
+à¹à¸”à¸
+à¹à¸”็à¸à¹†
+à¹à¸”à¸à¸‡à¸²
+à¹à¸”à¸à¸”ัน
+à¹à¸”à¸à¹à¸”้
+à¹à¸”็à¸à¹à¸”้
+à¹à¸”à¸à¸«à¹ˆà¸²
+à¹à¸”ง
+à¹à¸”งน้ำ
+à¹à¸”ด
+à¹à¸”ดาล
+à¹à¸”ดิ้น
+à¹à¸”น
+à¹à¸”่น
+à¹à¸”นไตร
+à¹à¸”ยัน
+à¹à¸”่วๆ
+à¹à¸”ะ
+à¹à¸”ะà¹à¸”๋
+โด
+โด่
+โดà¸à¹€à¸”à¸
+โด่ง
+โด่งดัง
+โดด
+โดดๆ
+โดดเดี่ยว
+โดดร่ม
+โด่เด่
+โดน
+โดนดี
+โดม
+โดมไพร
+โดมร
+โด่ไม่รู้ล้ม
+โดย
+โดยจริง
+โดยที่
+โดยพยัà¸à¸Šà¸™à¸°
+โดยสาร
+โดยเสด็จ
+โดยอรรถ
+โดร
+โดรณ
+ใด
+...ใด...หนึ่ง
+ได
+ได้
+ได้à¸à¸±à¸™
+ได้à¸à¸²à¸£
+ได้à¹à¸à¹ˆ
+ได้à¹à¸à¸‡à¹€à¸—น้ำพริà¸
+ได้ความ
+ได้คิด
+ได้ใจ
+ได้ช่อง
+ได้ชื่อ
+ไดà¹à¸‹à¹‡à¸à¸„าไรด์
+ได้ท่า
+ได้ท้าย
+ได้ที
+ได้ที่
+ได้ทีขี่à¹à¸žà¸°à¹„ล่
+ไดนาโม
+ไดนาไมต์
+ไดโนเสาร์
+ได้ยิน
+ไดเรà¸à¸•à¸£à¸´à¸à¸‹à¹Œ
+ได้ฤà¸à¸©à¹Œ
+ได้สติ
+ได้ส่วน
+ได้ส่วนสัด
+ได้เสีย
+ได้เสียà¸à¸±à¸™
+ได้หน้า
+ได้หน้าลืมหลัง
+ต
+ตà¸
+ตà¸à¸à¸£à¸°
+ตà¸à¸à¸£à¸°à¹„ดพลอยโจน
+ตà¸à¸‚อบ
+ตà¸à¸‚าว
+ตà¸à¸‚้าว
+ตà¸à¸‚ุย
+ตà¸à¸„ลัà¸
+ตà¸à¸„้าง
+ตà¸à¹€à¸„รือ
+ตà¸à¸‡à¸²à¸™
+ตà¸à¸ˆà¸±à¹ˆà¸™
+ตà¸à¹ƒà¸ˆ
+ตà¸à¸”ิน
+ตà¸à¸•à¸°à¸à¸­à¸™
+ตà¸à¸•à¸°à¸¥à¸¶à¸‡
+ตà¸à¸•à¹ˆà¸³
+ตà¸à¹à¸•à¹ˆà¸‡
+ต๊à¸à¹‚ต
+ตà¸à¹ƒà¸•à¹‰à¹€à¸–รเทวทัต
+ตà¸à¸—้องช้าง
+ตà¸à¸—อด
+ตà¸à¸—ี่นั่ง
+ตà¸à¸™à¸£à¸à¸—ั้งเป็น
+ตà¸à¸™à¹‰à¸³à¸¡à¸±à¸™
+ตà¸à¸™à¹‰à¸³à¹„ม่ว่าย
+ตà¸à¸™à¹‰à¸³à¹„ม่ไหล ตà¸à¹„ฟไม่ไหม้
+ตà¸à¹ƒà¸™
+ตà¸à¹€à¸šà¹‡à¸”
+ตà¸à¹€à¸šà¸´à¸
+ตà¸à¸›à¸£à¸°à¸«à¸¡à¹ˆà¸²
+ตà¸à¸›à¸¥à¸­à¸
+ตà¸à¸›à¸¥à¸±à¸
+ตà¸à¸›à¸²à¸à¸•à¸à¸„ำ
+ตà¸à¹€à¸›à¹‡à¸™
+ตà¸à¹€à¸›à¹‡à¸™à¹€à¸šà¸µà¹‰à¸¢à¸¥à¹ˆà¸²à¸‡
+ตà¸à¸œà¸¥à¸¶à¸
+ตà¸à¸žà¸¸à¹ˆà¸¡à¸¡à¹ˆà¸²à¸¢
+ตà¸à¸Ÿà¸­à¸‡
+ตà¸à¸Ÿà¸²à¸
+ตà¸à¸¡à¸±à¸™
+ตà¸à¸¡à¸¹à¸
+ตà¸à¸¢à¸²à¸
+ตà¸à¸£à¸²à¸‡à¸§à¸±à¸¥
+ตà¸à¸¥à¸‡
+ตà¸à¸¥à¹ˆà¸­à¸‡à¸›à¸¥à¹ˆà¸­à¸‡à¸Šà¸´à¹‰à¸™
+ตà¸à¸¥à¸¹à¸
+ตà¸à¹€à¸¥à¸·à¸­à¸”
+ตà¸à¸§à¹ˆà¸²
+ตà¸à¸ªà¸™à¸±à¸š
+ตà¸à¸ªà¸°à¹€à¸à¹‡à¸”
+ตà¸à¹à¸ªà¸
+ตà¸à¸«à¸™à¸±à¸
+ตà¸à¸«à¸¡à¸
+ตà¸à¸«à¸¥à¹ˆà¸™
+ตà¸à¸«à¸¥à¸¸à¸¡
+ตà¸à¸«à¸¥à¸¸à¸¡à¸žà¸£à¸²à¸‡
+ตà¸à¸­à¸±à¸š
+ตง
+ต๋ง
+ตงฉิน
+ตงิด
+ตงุ่น
+ตจ-
+ตจปัà¸à¸ˆà¸à¸à¸£à¸£à¸¡à¸à¸²à¸™
+ตจสาร
+ตด
+ตดหมูตดหมา
+ตติย-
+ตถาคต
+ตน
+ต้น
+ต้นà¸à¸¥
+ต้นขั้ว
+ต้นคอ
+ต้นคิด
+ต้นเงิน
+ต้นฉบับ
+ต้นชนดอà¸
+ต้นเชือà¸
+ต้นตระà¸à¸¹à¸¥
+ต้นตอ
+ต้นตายใบเป็น
+ต้นตำรับ
+ต้นทาง
+ต้นทุน
+ต้นเทียม
+ต้นน้ำ
+ต้นบท
+ต้นà¹à¸šà¸š
+ต้นเพลิง
+ต้นมือ
+ต้นไม้
+ต้นร่าง
+ต้นร้ายปลายดี
+ต้นเรือ
+ต้นเรื่อง
+ต้นวายปลายดà¸
+ต้นสังà¸à¸±à¸”
+ต้นสายปลายเหตุ
+ต้นเสียง
+ต้นหน
+ต้นเหตุ
+ตนัย
+ตนุ
+ตนุมัธยมา
+ตนุมัธยา
+ตบ
+ตบตา
+ตบà¹à¸•à¹ˆà¸‡
+ตบเท้า
+ตบà¹à¸œà¸¥à¸°
+ตบมือ
+ตบมือข้างเดียวไม่ดัง
+ตบยุง
+ตบหัวà¸à¸¥à¸²à¸‡à¸¨à¸²à¸¥à¸² ขอขมาที่บ้าน
+ตบหัวลูบหลัง
+ตบะ
+ตปนียะ
+ตม-
+ต้ม
+ต้มà¸à¸°à¸—ิ
+ต้มà¸à¸°à¸›à¸´
+ต้มข่า
+ต้มเค็ม
+ต้มโคล้ง
+ต้มปลาร้า
+ต้มเปรต
+ต้มเปอะ
+ต้มยำ
+ต้มยำà¸à¸°à¸—ิ
+ต้มส้ม
+ต้มสุà¸
+ตมูà¸
+ตโม-
+ตโมนุท
+ตโมไพรี
+ตโมหร
+ตยาค
+ตยาคี
+ตยุติ
+ตรง
+ตรงๆ
+ตรงà¸à¸±à¸™
+ตรงà¸à¸±à¸™à¸‚้าม
+ตรณี
+ตรม
+ตรมตรอม
+ตรมเตรียม
+ตรมวล
+ตรรà¸-
+ตรรà¸à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+ตรรà¸à¸°
+ตรลบ
+ตรลอด
+ตรละ
+ตรลา
+ตรลาด
+ตรเลิด
+ตรวจ
+ตรวจà¸à¸²à¸£à¸“์
+ตรวจข่าว
+ตรวจตรา
+ตรวจเลือด
+ตรวด
+ตรวน
+ตรวย
+ตรอà¸
+ตรอง
+ตรอมใจ
+ตรอมตรม
+ตระ
+ตระà¸à¸¥
+ตระà¸à¸§à¸™
+ตระà¸à¸­à¸‡
+ตระà¸à¸±à¸”
+ตระà¸à¸²à¸£
+ตระà¸à¸¹à¸¥
+ตระà¸à¸¹à¸¥à¸¡à¸¹à¸¥à¸Šà¸²à¸•à¸´
+ตระคัร
+ตระง่อง
+ตระจัà¸
+ตระชัà¸
+ตระเชิà¸
+ตระดà¸
+ตระดาษ
+ตระเตรียม
+ตระà¹à¸•à¸£à¹‰à¸™
+ตระทรวง
+ตระนาว
+ตระไน
+ตระบà¸
+ตระบอà¸
+ตระบอง
+ตระบัด
+ตระบัดสัตย์
+ตระบัน
+ตระเบ็ง
+ตระà¹à¸šà¹ˆ
+ตระà¹à¸šà¸
+ตระà¹à¸šà¸‡
+ตระà¹à¸šà¸™
+ตระà¹à¸šà¹ˆà¸™
+ตระโบม
+ตระพอง
+ตระพัง
+ตระมื่น
+ตระโมจ
+ตระลาà¸à¸²à¸£
+ตระวัน
+ตระเว็ด
+ตระเวน
+ตระเวนไพร
+ตระเวนวัน
+ตระเวนเวหา
+ตระสัà¸
+ตระหง่อง
+ตระหง่าน
+ตระหนà¸
+ตระหนัà¸
+ตระหน่ำ
+ตระหนี่
+ตระหนี่ตัว
+ตระอร
+ตระอาล
+ตระโอม
+ตรัง
+ตรังค-
+ตรังค์
+ตรังคนที
+ตรังควชิราวดี
+ตรับ
+ตรับฟัง
+ตรัย
+ตรัยตรึงศ์
+ตรัส
+ตรัสรู้
+ตรัสสา
+ตรา
+ตราà¸à¸•à¸£à¸³
+ตราขุนพล
+ตราจอง
+ตราชู
+ตราà¹à¸”ง
+ตราตั้ง
+ตราบ
+ตราบเท่า
+ตราบาป
+ตราไปรษณียาà¸à¸£
+ตราภูมิ
+ตรายาง
+ตราสัง
+ตราสาร
+ตราสิน
+ตราหน้า
+ตรำ
+ตร่ำ
+ตริ
+ตริตรอง
+ตริว
+ตรี
+ตรีà¸à¸à¸¸à¸
+ตรีà¸à¸±à¸™à¸ªà¸§à¸²à¸•
+ตรีà¸à¸²à¸¥
+ตรีà¸à¸²à¸¬à¸žà¸´à¸©
+ตรีà¸à¸¹à¸
+ตรีเà¸à¸ªà¸£à¸¡à¸²à¸¨
+ตรีโà¸à¸“
+ตรีโà¸à¸“มิติ
+ตรีคูณ
+ตรีจีวร
+ตรีฉินทลามà¸à¸²
+ตรีชาต
+ตรีà¸à¸²à¸“รส
+ตรีทศ
+ตรีทิพ
+ตรีทิพยรส
+ตรีทุรวสา
+ตรีทูต
+ตรีเทวตรีคันธา
+ตรีโทษ
+ตรีธารทิพย์
+ตรีนิศà¸
+ตรีเนตร
+ตรีบถ
+ตรีบูร
+ตรีประดับ
+ตรีปวาย
+ตรีปิฎà¸
+ตรีปิตผล
+ตรีผลธาตุ
+ตรีผลสมุตถาน
+ตรีผลา
+ตรีพิธพรรณ
+ตรีพิษจัà¸à¸£
+ตรีเพชรทัณฑี
+ตรีเพชรพวง
+ตรีเพชรสมคุณ
+ตรีภพ
+ตรีภพนาถ
+ตรีภูมิ
+ตรีภูว
+ตรีมธุร
+ตรีมูรติ
+ตรียมà¸
+ตรียัมปวาย
+ตรีรัตน์
+ตรีโลà¸
+ตรีโลà¸à¸™à¸²à¸–
+ตรีโลเà¸à¸¨
+ตรีโลจน์
+ตรีโลหà¸
+ตรีโลหะ
+ตรีวาตผล
+ตรีศà¸
+ตรีศูล
+ตรีสมอ
+ตรีสมุตถาน
+ตรีสัตà¸à¸¸à¸¥à¸²
+ตรีสันนิบาตผล
+ตรีสาร
+ตรีสินธุรส
+ตรีสุคนธ์
+ตรีสุรผล
+ตรีเสมหผล
+ตรีอมฤต
+ตรีอาà¸à¸²à¸¨à¸œà¸¥
+ตรีเอà¸à¸ à¸²à¸ž
+ตรีเอà¸à¸²à¸™à¸¸à¸ à¸²à¸ž
+ตรึà¸
+ตรึà¸à¸•à¸£à¸­à¸‡
+ตรึà¸à¸–อง
+ตรึง
+ตรึงตรา
+ตรึงศ-
+ตรุ
+ตรุณ
+ตรุย
+ตรุษ
+ตรุษจีน
+ตรู
+ตรู่
+ตฤณ
+ตฤณ-
+ตฤณชาติ
+ตฤณมัย
+ตฤตีย-
+ตฤตียะ
+ตฤท
+ตฤป
+ตฤษณา
+ตฤๅ
+ตล
+ตลà¸
+ตลà¸à¸„ะนอง
+ตลà¸à¸šà¸²à¸•à¸£
+ตลà¸à¹‚ปà¸à¸®à¸²
+ตลà¸à¸«à¸±à¸§à¹€à¸£à¸²à¸°
+ตลบ
+ตลบตะà¹à¸¥à¸‡
+ตลบนà¸
+ตลบหลัง
+ตลอด
+ตลอดรอดà¸à¸±à¹ˆà¸‡
+ตละ
+ตลับ
+ตลับนาà¸
+ตลาด
+ตลาดเงิน
+ตลาดท้องน้ำ
+ตลาดนัด
+ตลาดน้ำ
+ตลาดมืด
+ตลาดยี่สาน
+ตลาดสด
+ตลาดหน้าคุà¸
+ตลาดหลัà¸à¸—รัพย์
+ตลาดหุ้น
+ตลิ่ง
+ตลึง
+ตวง
+ตวงพระธาตุ
+ต่วน
+ต้วมเตี้ยม
+ตวัà¸
+ตวัด
+ตวาด
+ตอ
+ต่อ
+ต้อ
+ตอà¸
+ต๊อà¸
+ต๊อà¸à¹†
+ต๊อà¸à¸•à¹‹à¸­à¸¢
+ต่อà¸à¸£
+ต้อà¸à¸£à¸°à¸ˆà¸
+ตอà¸à¸«à¸™à¹‰à¸²
+ต่อà¸à¸´à¹ˆà¸‡
+ต่อความยาวสาวความยืด
+ตอง
+ต้อง
+ตองà¸à¸£à¸²à¸¢
+ต้องà¸à¸±à¸™
+ต้องà¸à¸²à¸£
+ต้องคดี
+ต้องใจ
+ตองตอย
+ต้องตา
+ต้องเต
+ตองà¹à¸•à¸
+ต่องà¹à¸•à¹ˆà¸‡
+ต้องโทษ
+ต้องธรณีสาร
+ตองเปรียง
+ต้องสู้
+ต้องหา
+ตองเหลือง
+ตอด
+ตอดต่อ
+ต่อตา
+ต่อต้าน
+ต่อตาม
+ต่อตี
+ต่อà¹à¸•à¹‰à¸¡
+ตอน
+ต้อน
+ต้อนรับ
+ต้อนรับขับสู้
+ต้อนหมูเข้าเล้า
+ต่อนัดต่อà¹à¸™à¸‡
+ต้อเนื้อ
+ตอบ
+ตอบโต้
+ตอบà¹à¸—น
+ตอเบา
+ต่อปาà¸
+ต่อปาà¸à¸•à¹ˆà¸­à¸„ำ
+ต่อปาà¸à¸«à¸¥à¸²à¸à¸„ำ
+ตอม
+ต่อม
+ต๋อม
+ต่อมน้ำ
+ต่อมโลหิต
+ตอม่อ
+ต่อย
+ต้อย
+ต้อยๆ
+ต้อยตริ่ง
+ต้อยติ่ง
+ต้อยตีวิด
+ต่อยหอย
+ตอà¹à¸¢
+ต่อà¹à¸¢à¹‰à¸‡
+ตอร์ปิโด
+ต่อล้อต่อเถียง
+ต้อลำไย
+ต้อลิ้นหมา
+ต่อว่า
+ต่อสู้
+ต่อไส้
+ต่อหน้า
+ต่อหน้ามะพลับ ลับหลังตะโà¸
+ต้อหิน
+ตอà¹à¸«à¸¥
+ต่ออายุ
+ตะ
+ตะà¸à¸£à¸™
+ตะà¸à¸£à¸§à¸¢
+ตะà¸à¸£à¹‰à¸­
+ตะà¸à¸£à¹ˆà¸­à¸¡
+ตะà¸à¸£à¸±à¸™
+ตะà¸à¸£à¸±à¸š
+ตะà¸à¸£à¹‰à¸²
+ตะà¸à¸£à¸²à¸¡
+ตะà¸à¸£à¸¸à¸”
+ตะà¸à¸£à¸¸à¸¡
+ตะà¸à¸£à¸¸à¸¡à¸•à¸°à¸à¸£à¸²à¸¡
+ตะà¸à¸¥à¸°
+ตะà¸à¸¥à¸²à¸¡
+ตะà¸à¸§à¸”
+ตะà¸à¸­
+ตะà¸à¸­à¸™
+ตะà¸à¸±à¸‡
+ตะà¸à¸±à¹ˆà¸§
+ตะà¸à¸±à¹ˆà¸§à¹€à¸à¸£à¸µà¸¢à¸š
+ตะà¸à¸±à¹ˆà¸§à¹à¸”ง
+ตะà¸à¸±à¹ˆà¸§à¸•à¸±à¸”
+ตะà¸à¸²à¸‡
+ตะà¸à¸²à¸”
+ตะà¸à¸²à¸¢
+ตะà¸à¸²à¸§
+ตะà¸à¸¸à¸à¸•à¸°à¸à¸±à¸
+ตะà¸à¸¸à¸¢
+ตะà¸à¸¸à¸¢à¸•à¸°à¸à¸²à¸¢
+ตะà¸à¸¹
+ตะà¸à¸¹à¸”
+ตะเà¸à¸µà¸¢à¸à¸•à¸°à¸à¸²à¸¢
+ตะเà¸à¸µà¸¢à¸‡
+ตะเà¸à¸µà¸¢à¸‡à¹à¸à¹Šà¸ª
+ตะเà¸à¸µà¸¢à¸‡à¸£à¸±à¹‰à¸§
+ตะเà¸à¸µà¸¢à¸‡à¸¥à¸²à¸™
+ตะเà¸à¸µà¸¢à¸š
+ตะà¹à¸
+ตะà¹à¸à¹ˆ
+ตะà¹à¸à¸£à¸‡
+ตะโà¸
+ตะโà¸à¹‰
+ตะโà¸à¸
+ตะโà¸à¸‚าว
+ตะโà¸à¸”ำ
+ตะโà¸à¸™
+ตะโà¸à¸£à¸‡
+ตะโà¸à¸£à¸¡
+ตะโà¸à¸ªà¹‰à¸¡
+ตะไà¸à¸£
+ตะขบ
+ตะขบà¸à¸£à¸±à¹ˆà¸‡
+ตะขอ
+ตะขาบ
+ตะขิดตะขวง
+ตะเข้
+ตะเข้ขบฟัน
+ตะเข็บ
+ตะเข็บไต่ขอน
+ตะเขิง
+ตะโขง
+ตะคร้อ
+ตะครอง
+ตะครั่นตะครอ
+ตะคร้ำ
+ตะคริว
+ตะครุบ
+ตะครุบà¸à¸š
+ตะคลับตะคล้าย
+ตะคอà¸
+ตะคัน
+ตะค้า
+ตะคาà¸
+ตะคาง
+ตะค้าทอง
+ตะค้าน
+ตะคิว
+ตะคุ่ม
+ตะคุ่มๆ
+ตะเครียว
+ตะเคียน
+ตะเคียนทอง
+ตะเคียนเผือà¸
+ตะเคียว
+ตะà¹à¸„ง
+ตะไคร่
+ตะไคร้
+ตะไคร้à¹à¸”ง
+ตะไคร้น้ำ
+ตะไคร้บà¸
+ตะไคร้หอม
+ตะไคร้หางนาค
+ตะเฆ่
+ตะà¹à¸‡à¹‰
+ตะติน
+ตะà¹à¸•à¸£à¹‰à¸™
+ตะนอย
+ตะนาว
+ตะบม
+ตะบอง
+ตะบองà¸à¸±à¸™
+ตะบองà¹à¸”ง
+ตะบองเพชร
+ตะบอย
+ตะบัน
+ตะบันไฟ
+ตะบิ้ง
+ตะบิด
+ตะบิดตะบอย
+ตะบี้ตะบัน
+ตะบึง
+ตะบุ้ย
+ตะบุ้ยๆ
+ตะบูน
+ตะเบ็ง
+ตะเบ็งมาน
+ตะà¹à¸šà¸
+ตะà¹à¸šà¸‡
+ตะà¹à¸šà¸‡à¸¡à¸²à¸™
+ตะโบม
+ตะไบ
+ตะปบ
+ตะปลิง
+ตะปัดตะป่อง
+ตะปิ้ง
+ตะปุ่มตะป่ำ
+ตะปู
+ตะปูเข็ม
+ตะปูควง
+ตะปูหัวเห็ด
+ตะพง
+ตะพด
+ตะพอง
+ตะพัà¸
+ตะพัง
+ตะพัด
+ตะพั้น
+ตะพาà¸
+ตะพาน
+ตะพานช้าง
+ตะพานหนู
+ตะพาบ
+ตะพาบน้ำ
+ตะพาย
+ตะพายà¹à¸¥à¹ˆà¸‡
+ตะพึด
+ตะพึดตะพือ
+ตะพุ่น
+ตะพุ่นหà¸à¹‰à¸²à¸Šà¹‰à¸²à¸‡
+ตะเพรา
+ตะเพิง
+ตะเพิด
+ตะเพิ่น
+ตะเพียน
+ตะเพียนทอง
+ตะเพียนน้ำเค็ม
+ตะโพà¸
+ตะโพง
+ตะโพน
+ตะเภา
+ตะเภาเดียวà¸à¸±à¸™
+ตะใภ้
+ตะม่อ
+ตะมอย
+ตะยองสะลา
+ตะรัง
+ตะรังà¸à¸°à¸™à¸¹
+ตะรังตังà¸à¸§à¸²à¸‡
+ตะรังตังช้าง
+ตะราง
+ตะลอง
+ตะลอน
+ตะล่อม
+ตะล่อมข้าว
+ตะล่อมป้อม
+ตะละ
+ตะลาน
+ตะลิงปลิง
+ตะลิบ
+ตะลีตะลาน
+ตะลึง
+ตะลึงพรึงเพริด
+ตะลุง
+ตะลุ่ม
+ตะลุ่มนà¸
+ตะลุมบอน
+ตะลุ่มโปง
+ตะลุมพอ
+ตะลุมพุà¸
+ตะลุ่มอิด
+ตะลุย
+ตะเลง
+ตะà¹à¸¥à¸‡à¹à¸à¸‡
+ตะไล
+ตะวัน
+ตะวันขึ้น
+ตะวันตà¸
+ตะวันยอà¹à¸ªà¸‡
+ตะวันออà¸
+ตะวันออà¸à¸à¸¥à¸²à¸‡
+ตะวันออà¸à¹ƒà¸à¸¥à¹‰
+ตะวันออà¸à¹„à¸à¸¥
+ตะวันอ้อมข้าว
+ตะวาง
+ตะเวน
+ตะหนึ่งรัด
+ตะหลิว
+ตะหลุà¸
+ตะหลุง
+ตะเหลนเป๋น
+ตะเหลาะเปาะ
+ตะà¹à¸«à¸‡à¹ˆà¸§à¹†
+ตะà¹à¸«à¸¡à¸°à¹à¸‚ะ
+ตะà¹à¸«à¸¥à¸™à¹à¸›à¹‹à¸™
+ตะโหงà¸
+ตัà¸
+ตัà¸à¸à¸°
+ตัà¸à¸•à¸§à¸‡
+ตัà¸à¹€à¸•à¸·à¸­à¸™
+ตั๊à¸à¹à¸•à¸™
+ตัà¸à¸™à¹‰à¸³à¸£à¸”หัวตอ
+ตัà¸à¸™à¹‰à¸³à¸£à¸”หัวสาà¸
+ตัà¸à¸™à¹‰à¸³à¹ƒà¸ªà¹ˆà¸à¸°à¹‚หลภชะโงà¸à¸”ูเงา
+ตัà¸à¸šà¸²à¸•à¸£
+ตัà¸à¸šà¸²à¸•à¸£à¸­à¸¢à¹ˆà¸²à¸–ามพระ
+ตัà¸à¸©à¸“
+ตัà¸à¸©à¸“ี
+ตัà¸à¸©à¸±à¸¢
+ตัง
+ตั่ง
+ตั้ง
+ตั้งà¸à¸£à¸¡
+ตังเà¸
+ตั้งเข็ม
+ตั้งไข่
+ตั้งเค้า
+ตั้งà¹à¸‡à¹ˆ
+ตั้งใจ
+ตังฉ่าย
+ตั้งต้น
+ตั้งตัว
+ตั้งตาคอย
+ตังติด
+ตั้งà¹à¸•à¹ˆ
+ตั้งà¹à¸•à¹ˆà¸‡
+ตั้งโต๊ะ
+ตั้งท่า
+ตั้งธาตุ
+ตั้งนาฬิà¸à¸²
+ตั้งนาฬิà¸à¸²à¸›à¸¥à¸¸à¸
+ตั้งเป้าหมาย
+ตังเม
+ตังวาย
+ตั้งหน้า
+ตั้งหน้าตั้งตา
+ตั้งหัวเรือ
+ตั้งอà¸à¸•à¸±à¹‰à¸‡à¹ƒà¸ˆ
+ตังโอ๋
+ตัจฉà¸
+ตัจฉนี
+ตัณฑุล
+ตัณหัà¸à¸©à¸±à¸¢
+ตัณหา
+ตัด
+ตัดà¸à¸±à¸™
+ตัดขาด
+ตัดใจ
+ตัดช่องน้อยà¹à¸•à¹ˆà¸žà¸­à¸•à¸±à¸§
+ตัดช่องย่องเบา
+ตัดเชือà¸
+ตัดà¸à¸²à¸•à¸´à¸‚าดมิตร
+ตัดต้นไฟ
+ตัดตอน
+ตัดถนน
+ตัดทาง
+ตัดบท
+ตัดประเด็น
+ตัดเป็นตัดตาย
+ตัดพ้อ
+ตัดไพ่
+ตัดไฟต้นลม
+ตัดไฟหัวลม
+ตัดไม้ข่มนาม
+ตัดรอน
+ตัดราคา
+ตัดสิน
+ตัดสินใจ
+ตัดเส้น
+ตัดหนทาง
+ตัดหน้า
+ตัดหน้าฉาน
+ตัดหนามอย่าไว้หน่อ
+ตัดหางปล่อยวัด
+ตัตว-
+ตัตวศาสตร์
+ตัถย์
+ตัน
+ตันคอหอย
+ตันตระ
+ตันติ
+ตันติภาษา
+ตันปัà¸à¸à¸²
+ตันหยง
+ตันเหิม
+ตันอà¸à¸•à¸±à¸™à¹ƒà¸ˆ
+ตับ
+ตับà¹à¸‚็ง
+ตับเต่า
+ตับเต่าขาว
+ตับปิ้ง
+ตับเป็ด
+ตับเพลง
+ตับเรื่อง
+ตับเหล็à¸
+ตับอ่อน
+ตัว
+ตั๋ว
+ตัวà¸à¸¥à¸±à¹ˆà¸™
+ตัวà¸à¸¥à¸²à¸‡
+ตัวà¸à¸²à¸£
+ตัวเà¸à¹‡à¸‡
+ตัวคูณร่วมน้อย
+ตัวโค
+ตัวใครตัวมัน
+ตัวเงิน
+ตั๋วเงิน
+ตั๋วเงินคลัง
+ตั๋วเงินจ่าย
+ตั๋วเงินรับ
+ตัวจัà¸à¸£à¹ƒà¸«à¸à¹ˆ
+ตัวจำนำ
+ตัวจี๊ด
+ตัวเชิด
+ตัวดี
+ตัวต่อตัว
+ตัวตั้ง
+ตัวตั้งตัวตี
+ตัวตายตัวà¹à¸—น
+ตัวตืด
+ตัวเต็ง
+ตัวà¹à¸—น
+ตัวà¹à¸—นค้าต่าง
+ตัวà¹à¸—นช่วง
+ตัวà¹à¸—นเชิด
+ตัวนาง
+ตัวนำ
+ตัวประà¸à¸­à¸š
+ตัวประà¸à¸±à¸™
+ตัวเป็นเà¸à¸¥à¸µà¸¢à¸§
+ตัวเปล่า
+ตัวà¹à¸›à¸£
+ตัวผู้
+ตั้วโผ
+ตัวพระ
+ตัวพิมพ์
+ตัวเมีย
+ตัวเมือง
+ตัวไม้
+ตัวยืน
+ตัวเลข
+ตั๋วà¹à¸¥à¸à¹€à¸‡à¸´à¸™
+ตัวสะà¸à¸”
+ตั๋วสัà¸à¸à¸²à¹ƒà¸Šà¹‰à¹€à¸‡à¸´à¸™
+ตั้วสิว
+ตัวหนังสือ
+ตัวหารร่วมมาà¸
+ตั้วเหี่ย
+ตัวอย่าง
+ตัวเอà¸
+ตา
+ตาà¸
+ตาà¸à¸•à¸™
+ตาà¸à¸š
+ตาà¸à¸šà¸•à¸²à¹€à¸‚ียด
+ตาà¸à¸¥à¹‰à¸­à¸‡
+ตาà¸à¸¥à¸±à¸š
+ตาà¸à¸¥à¹‰à¸²
+ตาà¸à¸§à¸²à¸‡
+ตาà¸à¸ªà¸¡à¸­à¸‡
+ตาà¸à¸«à¸™à¹‰à¸²
+ตาà¸à¸­à¸²à¸à¸²à¸¨
+ตาà¸à¸¸à¹‰à¸‡
+ตาโà¸à¹‰à¸‡
+ตาไà¸à¹ˆ
+ตาขวาง
+ตาขอ
+ตาข่าย
+ตาขาว
+ตาขุ่นตาเขียว
+ตาเข
+ตาà¹à¸‚็ง
+ตาคม
+ตาค้าง
+ตาง
+ต่าง
+ต่างๆ
+ต่างด้าว
+ต่างว่า
+ต่างหาà¸
+ตางัว
+ตาจระเข้
+ตาชั่ง
+ตาช้าง
+ตาด
+ตาเดียว
+ตาà¹à¸”ง
+ตาตà¸à¸à¸¥à¹‰à¸²
+ตาตั๊à¸à¹à¸•à¸™
+ตาตั้ง
+ตาตาราง
+ตาตี่
+ตาตุ่ม
+ตาเต็ง
+ตาโต
+ตาถั่ว
+ตาทวด
+ตาทัพ
+ตาน
+ต่าน
+ต้าน
+ตานà¸à¹à¸à¹‰à¸§
+ตานขโมย
+ต้านทาน
+ตานนà¸à¸à¸”
+ตานเสี้ยน
+ตานหà¸
+ตานหม่อน
+ตานเหลือง
+ตาน้ำ
+ตานี
+ตาบ
+ตาบทับ
+ตาบทิศ
+ตาบอด
+ตาบอดคลำช้าง
+ตาบอดได้à¹à¸§à¹ˆà¸™
+ตาบอดตาใส
+ตาบอดสอดตาเห็น
+ตาบอดสี
+ตาปลา
+ตาปลาดุà¸
+ตาปี
+ตาปีตาชาติ
+ตาปู
+ตาเป็นมัน
+ตาเป็นสับปะรด
+ตาโป่ง
+ตาà¸à¸±à¹ˆà¸‡
+ตาà¸à¸²à¸”
+ตาพร่า
+ตาพอง
+ตาฟาง
+ตาฟางไà¸à¹ˆ
+ตาเฟื้องตาสลึง
+ตาม
+ตามà¸à¸§à¸²à¸‡
+ตามควาย
+ตามใจ
+ตามใจปาà¸à¸¡à¸²à¸à¸«à¸™à¸µà¹‰
+ตามใจปาà¸à¸¥à¸³à¸šà¸²à¸à¸—้อง
+ตามด
+ตามที
+ตามเนื้อผ้า
+ตามบุà¸à¸•à¸²à¸¡à¸à¸£à¸£à¸¡
+ตามพ-
+ตามพหัตถี
+ตามพะ
+ตามเพลง
+ตามมี
+ตามมีตามเà¸à¸´à¸”
+ตามยถาà¸à¸£à¸£à¸¡
+ตามเรื่องตามราว
+ตามลมตามà¹à¸¥à¹‰à¸‡
+ตามลำพัง
+ตามอำเภอใจ
+ตามะà¹à¸™
+ตามิน
+ตามีตามา
+ตาà¹à¸¡à¸§
+ตาย
+ต้าย
+ตายขาน
+ตายขุย
+ตายคาที่
+ตายโคม
+ตายใจ
+ตายซาà¸
+ตายด้าน
+ตายดาบหน้า
+ตายตัว
+ตายทั้งà¸à¸¥à¸¡
+ตายน้อย
+ตายนึ่ง
+ตายประชดป่าช้า
+ตายเป็นเบือ
+ตายà¸à¸­à¸¢
+ตายà¸à¸±à¸‡à¸¢à¸±à¸‡à¹€à¸¥à¸µà¹‰à¸¢à¸‡
+ตายพราย
+ตายราบ
+ตายลาภ
+ตายห่า
+ตายโหง
+ตายอดตายอยาà¸
+ตาราง
+ตารางสอน
+ตารางเหลี่ยม
+ตาราไต
+ตาร้าย
+ตาริ้ว
+ตาเรือ
+ตาเรือชัย
+ตาล
+ตาลปัตร
+ตาลปัตรบังเพลิง
+ตาลปัตรฤๅษี
+ตาลม
+ตาลยอดด้วน
+ตาลอ
+ตาลอย
+ตาลาน
+ตาลาย
+ตาลีตาเหลือà¸
+ตาลุ
+ตาลุà¸
+ตาลุà¸à¸•à¸²à¸Šà¸±à¸™
+ตาลุชะ
+ตาเล็à¸à¸•à¸²à¸™à¹‰à¸­à¸¢
+ตาว
+ต๋าว
+ตาโศà¸
+ตาส่อน
+ตาสำเภา
+ตาสีตาสา
+ตาเสือ
+ตาหนู
+ตาหมาà¸à¸£à¸¸à¸
+ตาหยี
+ตาหลิ่ง
+ตาหวาน
+ตาเหล่
+ตาเหลว
+ตาเหลือà¸
+ตาเหลือà¸à¸•à¸²à¸žà¸­à¸‡
+ตาà¹à¸«à¸§à¸™
+ตาฬ
+ตาอ้อย
+ตาเอà¸
+ตำ
+ต่ำ
+ตำข้าวสารà¸à¸£à¸­à¸à¸«à¸¡à¹‰à¸­
+ต่ำใจ
+ต่ำช้า
+ต่ำตน
+ต่ำต้อย
+ตำตา
+ตำนาน
+ตำน้ำพริà¸à¸¥à¸°à¸¥à¸²à¸¢à¹à¸¡à¹ˆà¸™à¹‰à¸³
+ตำเนิน
+ตำเนียน
+ตำบล
+ตำà¹à¸š
+ต้ำปุà¸
+ต้ำผาง
+ต้ำพรวด
+ตำà¹à¸¢
+ตำà¹à¸¢à¹à¸¡à¸§
+ตำรวจ
+ตำรวจนครบาล
+ตำรวจภูธร
+ตำรวจวัง
+ตำรวจหลวง
+ตำรับ
+ตำรา
+ตำรุ
+ตำลึง
+ตำส้ม
+ตำเสา
+ตำหนัà¸
+ตำหนัà¸à¸™à¹‰à¸³
+ตำหนัà¸à¹à¸ž
+ตำหนิ
+ตำหระ
+ตำà¹à¸«à¸™à¹ˆà¸‡
+ตำà¹à¸«à¸™à¹ˆà¸‡à¸—ี่ตั้ง
+ติ
+ติà¸-
+ติà¸à¸°
+ติà¸à¸²à¸«à¸£à¸±à¸‡
+ติง
+ติ่ง
+ติ๋ง
+ติ๋งๆ
+ติ่งตั่ง
+ติงทุเลา
+ติงส-
+ติงสติ
+ติงสติม-
+ติ่งหาย
+ติณ
+ติณ-
+ติณชาติ
+ติด
+ติดๆ
+ติดà¸à¸£à¸°à¸”ุม
+ติดà¸à¸±à¸“ฑ์เทศน์
+ติดเà¸à¹‰à¸‡
+ติดขัด
+ติดเครื่อง
+ติดจะ
+ติดจัà¸à¸£à¸¢à¸²à¸™
+ติดใจ
+ติดตลà¸
+ติดตลาด
+ติดต่อ
+ติดต้อยห้อยตาม
+ติดตะà¸à¸£à¹‰à¸­
+ติดตัว
+ติดตา
+ติดตาม
+ติดตื้น
+ติดบวà¸
+ติดบ่อน
+ติดปาà¸
+ติดพัน
+ติดไฟ
+ติดมือ
+ติดไม้ติดมือ
+ติดร่างà¹à¸«
+ติดลบ
+ติดลม
+ติดศัพท์
+ติดสอยห้อยตาม
+ติดสัด
+ติดสำนวน
+ติดสินบน
+ติดหน้าตามหลัง
+ติดหมัด
+ติดหลังà¹à¸«
+ติดà¹à¸«à¹‰à¸‡
+ติดอันดับ
+ติดอ่าง
+ติตติà¸
+ติตติร
+ติตถ
+ติเตียน
+ติถี
+ติปา
+ติปาถะ
+ติมิ
+ติมิงคละ
+ติร
+ติรัจฉาน
+ติเรือทั้งโà¸à¸¥à¸™
+ติล
+ติลà¸
+ติ้ว
+ติ้วใบเลื่อม
+ตี
+ตี่
+ตีà¸à¸£à¸£à¹€à¸Šà¸µà¸¢à¸‡
+ตีà¸à¸²à¸
+ตีà¸à¸´à¸™
+ตีเà¸à¸¥à¹‡à¸”
+ตีเà¸à¸¥à¸µà¸¢à¸§
+ตีไà¸à¹ˆ
+ตีขนาบ
+ตีขลุม
+ตีความ
+ตีคอ
+ตีคู่
+ตีงูให้à¸à¸²à¸à¸´à¸™
+ตีงูให้หลังหัà¸
+ตีจาà¸
+ตีชิง
+ตีตนà¸à¹ˆà¸­à¸™à¹„ข้
+ตีตนตายà¸à¹ˆà¸­à¸™à¹„ข้
+ตีตรวน
+ตีตั๋ว
+ตีต่าง
+ตีตื้น
+ตีà¹à¸•à¸°
+ตีโต้
+ตีทอง
+ตีทะเบียน
+ตีท้ายครัว
+ตีท้ายน้ำ
+ตีน
+ตีนà¸à¸²
+ตีนครุ
+ตีนคู้
+ตีนจà¸
+ตีนจ้ำ
+ตีนตะขาบ
+ตีนตุ๊à¸à¹à¸
+ตีนเต่า
+ตีนถีบปาà¸à¸à¸±à¸”
+ตีนเท่าà¸à¸²à¸«à¸­à¸¢
+ตีนเทียน
+ตีนนà¸
+ตีนเป็ด
+ตีนผี
+ตีนà¹à¸£à¸”
+ตีนโรงตีนศาล
+ตีนเหยียด
+ตีบ
+ตีบรรทัด
+ตีบังà¸à¸±à¹‰à¸™
+ตี่ใบ้
+ตีปลาหน้าไซ
+ตีป่า
+ตี่ป้าบ
+ตีป่าให้เสือà¸à¸¥à¸±à¸§
+ตีปีà¸
+ตีà¹à¸›à¸¥à¸‡
+ตีผี
+ตีผึ้ง
+ตีà¹à¸œà¹ˆ
+ตีà¸à¸µà¸›à¸²à¸
+ตีโพยตีพาย
+ตีมอง
+ตีรถะ
+ตีระ
+ตีรั้ง
+ตีลังà¸à¸²
+ตีวง
+ตีวัวà¸à¸£à¸°à¸—บคราด
+ตีสนิท
+ตีสองหน้า
+ตีสำนวน
+ตีเส้น
+ตีเสมอ
+ตีเสียง
+ตีเสียว่า
+ตีหน้า
+ตีหน้าตาย
+ตีหน้ายัà¸à¸©à¹Œ
+ตีหลายหน้า
+ตีห่าง
+ตีอวน
+ตีอีตื้อ
+ตึ
+ตึๆ
+ตึà¸
+ตึà¸à¹†
+ตึ้à¸à¹†
+ตึ้à¸à¸•à¸±à¹‰à¸
+ตึà¸à¹à¸–ว
+ตึà¸à¸£à¸°à¸Ÿà¹‰à¸²
+ตึง
+ตึงๆ
+ตึงเครียด
+ตึงตัง
+ตึงตัว
+ตึงเปรี๊ยะ
+ตึดตื๋อ
+ตึ๊ดตื๋อ
+ตึตัง
+ตืด
+ตื่น
+ตื้น
+ตื่นข่าว
+ตื้นตัน
+ตื้นตันใจ
+ตื่นตัว
+ตื่นตาตื่นใจ
+ตื่นตาย
+ตื่นตูม
+ตื่นเต้น
+ตื่นà¹à¸•à¹ˆà¸”ึภสึà¸à¹à¸•à¹ˆà¸«à¸™à¸¸à¹ˆà¸¡
+ตื่นฟ้า
+ตื้อ
+ตื๊อ
+ตื๋อ
+ตุ
+ตุๆ
+ตุ๊
+ตุ๊à¸à¹à¸
+ตุ๊à¸à¹à¸à¹ƒà¸šà¸à¸¥à¸¡
+ตุ๊à¸à¸•à¸²
+ตุ๊à¸à¸•à¸²à¸¥à¹‰à¸¡à¸¥à¸¸à¸
+ตุ๊à¸à¸•à¸²à¹€à¸ªà¸µà¸¢à¸à¸šà¸²à¸¥
+ตุ๊à¸à¸•à¹ˆà¸³
+ตุ๊à¸à¸•à¹ˆà¸³à¸™à¹‰à¸³à¸—อง
+ตุà¸à¸•à¸´à¸
+ตุ๊à¸à¸•à¸´à¹Šà¸
+ตุ๊à¸à¸•à¸¸à¹ˆà¸™
+ตุ๊à¸à¸•à¸¸à¹‹à¸¢
+ตุง
+ตุ้งà¸à¹ˆà¸²
+ตุ้งติ้ง
+ตุ๊ดตู่
+ตุ๊ต๊ะ
+ตุตัง
+ตุน
+ตุ่น
+ตุ่นๆ
+ตุ๋น
+ตุ่นต่าน
+ตุนาหงัน
+ตุบๆ
+ตุ้บ
+ตุ้บๆ
+ตุ้บตั้บ
+ตุ๊บป่อง
+ตุปัดตุป่อง
+ตุปัดตุเป๋
+ตุ่ม
+ตุ้ม
+ตุ๋ม
+ตุ้มà¸à¸§à¹‰à¸²à¸§
+ตุมà¸à¸²
+ตุ้มà¹à¸‹à¸°
+ตุมตัง
+ตุ้มเต๋น
+ตุ้มปี่
+ตุมพ
+ตุมพรวด
+ตุ้มมะพร้าว
+ตุ้มหู
+ตุ่ย
+ตุ่ยๆ
+ตุ้ย
+ตุ้ยๆ
+ตุ๊ย
+ตุ๋ยตุ่ย
+ตุรค
+ตุรงค-
+ตุรงค์
+ตุรงคราวี
+ตุริยางค์
+ตุล
+ตุลสิ
+ตุลา
+ตุลาà¸à¸²à¸£
+ตุลาคม
+ตุหรัดตุเหร่
+ตู
+ตู่
+ตู้
+ตูà¸
+ตูข้า
+ตูด
+ตูดงอน
+ตู่ตัว
+ตู้นิรภัย
+ตูบ
+ตู้พระมาลัย
+ตู่พุทธพจน์
+ตูม
+ตูมๆ
+ตูมตาม
+ตูลิ่นฮื้อ
+ตูหนา
+เต
+เตà¸
+เต๊à¸
+เต็ง
+เต่ง
+เตช
+เตโช
+เตโชธาตุ
+เต้น
+เต้นà¸à¸´à¸™à¸£à¸³à¸à¸´à¸™
+เต้นเขน
+เต็นท์
+เต้นรำ
+เต้นà¹à¸£à¹‰à¸‡à¹€à¸•à¹‰à¸™à¸à¸²
+เต้นà¹à¸£à¹‰à¸‡à¹€à¸•à¹‰à¸™à¹à¸‰à¹ˆà¸‡
+เต็ม
+เต็มà¹à¸à¸™
+เต็มคราบ
+เต็มใจ
+เต็มตัว
+เต็มตา
+เต็มตื้น
+เต็มเต็ง
+เต็มที
+เต็มที่
+เต็มบาท
+เต็มประดา
+เต็มประตู
+เต็มปาà¸
+เต็มเปา
+เต็มมือ
+เต็มเม็ดเต็มหน่วย
+เต็มไม้เต็มมือ
+เต็มยศ
+เต็มรัà¸
+เต็มหู
+เต็มเหนี่ยว
+เต็มเหยียด
+เต็มอà¸
+เต็มอà¸à¹€à¸•à¹‡à¸¡à¹ƒà¸ˆ
+เต็มอัตรา
+เตย
+เตยเลื้อย
+เตร่
+เตร็ด
+เตร็ดเตร่
+เตร็ดเตรน
+เตรน
+เตริง
+เตรียด
+เตรียบ
+เตรียม
+เตรียมตรม
+เตรียมตัว
+เตรียมพร้อม
+เตละ
+เตลิด
+เตว็ด
+เต่อ
+เตอะ
+เตะ
+เตะจมูà¸
+เตะฉาà¸
+เตะโด่ง
+เตะตา
+เตะà¸à¸¸à¹ˆà¸™
+เตา
+เต่า
+เต้า
+เต๋า
+เต่าà¸à¸£à¸°à¸ªà¸¸à¸™
+เต่าà¸à¸´à¸™à¸œà¸±à¸à¸šà¸¸à¹‰à¸‡
+เต่าเà¸à¸µà¸¢à¸”
+เตาà¹à¸à¹Šà¸ª
+เต๋าเขย่า
+เต้าà¹à¸„น
+เต้าเจี้ยว
+เต่าดำ
+เต่าทอง
+เต่าทอเสื่อ
+เต้าทึง
+เตาทุเรียง
+เต่านา
+เต่าบ้า
+เต้าปืน
+เตาผิง
+เตาฟู่
+เตาไฟ
+เต่ารั้ง
+เต้ารับ
+เต่าร้าง
+เตารีด
+เต่าเลือน
+เต้าส่วน
+เตาสูบ
+เต้าเสียบ
+เต่าหà¸
+เต่าหวาย
+เต่าหับ
+เต้าหู้
+เต้าหู้ยี้
+เต่าเหลี่ยม
+เต่าเหลือง
+เต้าฮวย
+เต๊าะ
+เตาะà¹à¸•à¸°
+เติ่ง
+เตินเต่อ
+เติบ
+เติบโต
+เติม
+เตี้ย
+เตียง
+เตียงลา
+เตี้ยตน
+เตียน
+เตียบ
+เตี๋ยม
+เตียรถ์
+เตียว
+เตี่ยว
+เตี้ยอุ้มค่อม
+เตื้อ
+เตือน
+เตือนใจ
+เตือนตา
+เตือนสติ
+à¹à¸•à¹ˆ
+à¹à¸•à¹ˆà¹†
+à¹à¸•à¹‰
+à¹à¸•à¸
+à¹à¸•à¸à¸„อ
+à¹à¸•à¸à¹€à¸‡à¸´à¸™
+à¹à¸•à¸à¸‰à¸²à¸™
+à¹à¸•à¸à¸‰à¸²à¸™à¸‹à¹ˆà¸²à¸™à¹€à¸‹à¹‡à¸™
+à¹à¸•à¸à¸”ับ
+à¹à¸•à¸à¸•à¸·à¹ˆà¸™
+à¹à¸•à¸à¹à¸•à¸™
+à¹à¸•à¸à¸—ัพ
+à¹à¸•à¸à¹€à¸™à¸·à¹‰à¸­à¸ªà¸²à¸§
+à¹à¸•à¸à¹€à¸™à¸·à¹‰à¸­à¸«à¸™à¸¸à¹ˆà¸¡
+à¹à¸•à¸à¸à¸¹à¸‡
+à¹à¸•à¸à¸žà¸²à¸™
+à¹à¸•à¸à¸¡à¸±à¸™
+à¹à¸•à¸à¹à¸¢à¸
+à¹à¸•à¸à¸£à¸°à¹à¸«à¸‡
+à¹à¸•à¸à¸£à¹‰à¸²à¸§
+à¹à¸•à¸à¸«à¸±à¸
+à¹à¸•à¹ˆà¸à¹ˆà¸­à¸™à¹à¸•à¹ˆà¸à¸µà¹‰
+à¹à¸•à¹ˆà¸à¸µà¹‰à¹à¸•à¹ˆà¸à¹ˆà¸­à¸™
+à¹à¸•à¸‡
+à¹à¸•à¹ˆà¸‡
+à¹à¸•à¹ˆà¸‡à¸à¸§à¹‰à¸²à¸™
+à¹à¸•à¹ˆà¸‡à¸à¸²à¸£
+à¹à¸•à¹ˆà¸‡à¸‡à¸²à¸™
+à¹à¸•à¹ˆà¸‡à¸•à¸±à¹‰à¸‡
+à¹à¸•à¹ˆà¸‡à¸•à¸±à¸§
+à¹à¸•à¸‡à¹€à¸–าตาย
+à¹à¸•à¸‡à¹€à¸¡
+à¹à¸•à¸‡à¸£à¹ˆà¸¡à¹ƒà¸š
+à¹à¸•à¹ˆà¸‡à¸«à¸™à¹‰à¸²
+à¹à¸•à¹ˆà¸‡à¸«à¸™à¹‰à¸²à¸‚นม
+à¹à¸•à¹‰à¸ˆà¸´à¹‹à¸§
+à¹à¸•à¸”
+à¹à¸•à¹Šà¸”à¹à¸•à¹‹
+à¹à¸•à¹ˆà¸—ว่า
+à¹à¸•à¸™
+à¹à¸•à¹‰à¸¡
+à¹à¸•à¹‰à¸¡à¸„ู
+à¹à¸•à¹‰à¸¡à¸•à¹ˆà¸­
+à¹à¸•à¸£
+à¹à¸•à¸£à¸‡à¸­à¸™
+à¹à¸•à¸£à¹€à¸”ี่ยว
+à¹à¸•à¸£à¸à¸£à¸±à¹ˆà¸‡
+à¹à¸•à¸£à¸Ÿà¸±à¸™à¸Ÿà¸²à¸£à¹Œ
+à¹à¸•à¸£à¸£à¸–ยนต์
+à¹à¸•à¸£à¸¥à¸³à¹‚พง
+à¹à¸•à¸£à¸§à¸‡
+à¹à¸•à¸£à¸§à¸‡à¹‚ยธวาทิต
+à¹à¸•à¸£à¸°
+à¹à¸•à¹ˆà¸¥à¸°
+à¹à¸•à¹‰à¸§
+à¹à¸•à¹‰à¸§à¹à¸£à¹‰à¸§
+à¹à¸•à¹‰à¸§à¹à¸¥à¹‰à¸§
+à¹à¸•à¹ˆà¸§à¹ˆà¸²
+à¹à¸•à¹‰à¹à¸§à¹‰à¸”
+à¹à¸•à¸°
+à¹à¸•à¸°à¸•à¹‰à¸­à¸‡
+โต
+โต้
+โตà¸
+โต้คารม
+โต่ง
+โต้ง
+โต้งๆ
+โตงเตง
+โตงๆ เตงๆ
+โตฎà¸
+โต๊ด
+โต้ตอบ
+โต้เถียง
+โตน
+โตนด
+โต้โผ
+โตมร
+โตมร-
+โตมรธร
+โตย
+โต้à¹à¸¢à¹‰à¸‡
+โตรà¸
+โตรà¸à¹„ตร
+โตรด
+โต้รุ่ง
+โตเล่นหาง
+โต้วาที
+โต้หลง
+โต๊ะ
+โต๊ะà¸à¸¥à¸¡
+โต๊ะโขà¸
+โต๊ะเท้าช้าง
+โต๊ะหมู่
+โต๊ะหมู่บูชา
+โต๊ะอิหม่าม
+ใต้
+ใต้ดิน
+ใต้ถุน
+ใต้เท้า
+ใต้เท้าà¸à¸£à¸¸à¸“า
+ใต้เท้าà¸à¸£à¸¸à¸“าเจ้า
+ใต้à¸à¹ˆà¸²à¸žà¸£à¸°à¸šà¸²à¸—
+ใต้à¸à¹ˆà¸²à¸¥à¸°à¸­à¸­à¸‡à¸˜à¸¸à¸¥à¸µà¸žà¸£à¸°à¸šà¸²à¸—
+ใต้à¸à¹ˆà¸²à¸¥à¸°à¸­à¸­à¸‡à¸žà¸£à¸°à¸šà¸²à¸—
+ไต
+ไต่
+ไต้
+ไต๋
+ไต้à¸à¹‹à¸‡
+ไต่คู้
+ไต่เต้า
+ไต่ถาม
+ไตปลา
+ไต้à¸à¸¸à¹ˆà¸™
+ไต้ไฟ
+ไต่ไม้
+ไต่ไม้ลำเดียว
+ไตร
+ไตรà¸à¸´à¸¨à¸¢à¸²
+ไตรจัà¸à¸£
+ไตรจีวร
+ไตรดายุค
+ไตร่ตรอง
+ไตรตรา
+ไตรตรึงษ์
+ไตรทวาร
+ไตรทศ
+ไตรทิพ
+ไตรทิพย์
+ไตรปิฎà¸
+ไตรเพท
+ไตรภพ
+ไตรภาคี
+ไตรภูมิ
+ไตรย
+ไตรยางศ์
+ไตรรงค์
+ไตรรัตน์
+ไตรลัà¸à¸©à¸“์
+ไตรโลà¸
+ไตรโลà¸à¸¢à¹Œ
+ไตรวัà¸
+ไตรวิชชา
+ไตรสรณคมน์
+ไตรสรณาคมน์
+ไตรสิà¸à¸‚า
+ไต่ลวด
+ไต่สวน
+ไต้หวัน
+ถ
+ถà¸
+ถà¸à¹€à¸‚มร
+ถà¸à¹€à¸–ียง
+ถà¸à¸¥
+ถงัน
+ถงาด
+ถด
+ถดถอย
+ถน
+ถนน
+ถนนลาดยาง
+ถนป
+ถนอม
+ถนอมอาหาร
+ถนัด
+ถนัดขวา
+ถนัดใจ
+ถนัดซ้าย
+ถนัดถนี่
+ถนัดปาà¸
+ถนัดมือ
+ถนัน
+ถนำ
+ถนำทึà¸
+ถนิม
+ถนิมà¸à¸²à¸¡
+ถนิมสร้อย
+ถบ
+ถบดี
+ถม
+ถ่ม
+ถมเงิน
+ถมตะทอง
+ถมถืด
+ถมเถ
+ถมทอง
+ถ่มน้ำลายรดฟ้า
+ถมปรัà¸à¸¡à¸²à¸¨
+ถมปัด
+ถมไป
+ถ่มร้าย
+ถมอ
+ถมึงทึง
+ถล
+ถลà¸
+ถลà¸à¸šà¸²à¸•à¸£
+ถลน
+ถลม
+ถล่ม
+ถลอà¸
+ถลัน
+ถลา
+ถลาà¸
+ถลาà¸à¸–ลำ
+ถลาà¸à¹„ถล
+ถลาย
+ถลำ
+ถลำใจ
+ถลำตัว
+ถลำถลาà¸
+ถลีถลำ
+ถลึงตา
+ถลุง
+ถลุน
+ถ่วง
+ถ่วงดุล
+ถ่วงล้อ
+ถ้วน
+ถ้วนถี่
+ถ้วย
+ถ้วยตวง
+ถ้วยโถง
+ถ้วยรางวัล
+ถวัด
+ถวัดถวัน
+ถวัล
+ถวัลย์
+ถวาย
+ถวายà¸à¸£
+ถวายตัว
+ถวายเนตร
+ถวายพระพร
+ถวายหัว
+ถวิน
+ถวิล
+ถ่อ
+ถ้อ
+ถอà¸
+ถอง
+ถ่อง
+ถ้อง
+ถ่องà¹à¸–ว
+ถ่องà¹à¸—้
+ถอด
+ถอดเขี้ยวถอดเล็บ
+ถอดความ
+ถอดถอน
+ถอดไพ่
+ถอดรหัส
+ถอดรูป
+ถอดสี
+ถอดหัวโขน
+ถ้อถอย
+ถ้อถ้อย
+ถอน
+ถอนเงิน
+ถอนใจใหà¸à¹ˆ
+ถอนต้นà¸à¹ˆà¸™à¸£à¸²à¸
+ถอนทุน
+ถอนพิษ
+ถอนยวง
+ถอนราà¸à¸–อนโคน
+ถอนสมอ
+ถอนสายบัว
+ถอนหงอà¸
+ถอบ
+ถอบà¹à¸–บ
+ถ่อม
+ถ่อมตัว
+ถอย
+ถ่อย
+ถ้อย
+ถอยà¸à¸£à¸¹à¸”
+ถ้อยความ
+ถ้อยคำ
+ถอยใจใหà¸à¹ˆ
+ถอยฉะ
+ถอยฉาà¸
+ถอยถด
+ถ้อยà¹à¸–ลง
+ถอยทด
+ถอยทัพ
+ถ้อยทีถ้อยปà¸à¸´à¸šà¸±à¸•à¸´à¸•à¹ˆà¸­à¸à¸±à¸™
+ถ้อยทีถ้อยอาศัยà¸à¸±à¸™
+ถอยหลัง
+ถอยหลังเข้าคลอง
+ถะ
+ถะà¸à¸±à¸”
+ถะเà¸à¸´à¸™
+ถะโà¸à¸™
+ถะถั่น
+ถะถับ
+ถะถุนถะถัน
+ถะมัดถะà¹à¸¡à¸‡
+ถัà¸
+ถัง
+ถั่ง
+ถั่งถ้อย
+ถัณฑิล
+ถัณฑิล-
+ถัณฑิลสายี
+ถัด
+ถัทธ
+ถัน
+ถั่น
+ถั่นๆ
+ถับ
+ถับๆ
+ถัมภ์
+ถัว
+ถั่ว
+ถั่วขาว
+ถั่วคร้า
+ถั่วค้าง
+ถั่วงอà¸
+ถั่วดำ
+ถั่วนา
+ถั่วà¹à¸›à¸š
+ถั่วà¹à¸›à¸šà¸Šà¹‰à¸²à¸‡
+ถั่วà¸à¸±à¸à¸¢à¸²à¸§
+ถั่วพร้า
+ถั่วพู
+ถั่วเพาะ
+ถั่วà¹à¸¡à¹ˆà¸•à¸²à¸¢
+ถั่วà¹à¸£à¸°
+ถั่วเหลือง
+ถา
+ถ้า
+ถาà¸
+ถาà¸à¸–าง
+ถาง
+ถ่าง
+ถ่างตา
+ถาด
+ถาโถม
+ถาน
+ถ่าน
+ถ่านโค้à¸
+ถ่านไฟเà¸à¹ˆà¸²
+ถ่านไฟฉาย
+ถ่านไฟà¹à¸Šà¹‡à¸
+ถ่านหิน
+ถาบ
+ถาม
+ถามค้าน
+ถามติง
+ถามไถ่
+ถามนำ
+ถามปาà¸à¸„ำ
+ถามะ
+ถ่าย
+ถ่ายเดียว
+ถ่ายทอด
+ถ่ายทุà¸à¸‚์
+ถ่ายเท
+ถ่ายà¹à¸šà¸š
+ถ่ายปัสสาวะ
+ถ่ายภาพยนตร์
+ถ่ายยา
+ถ่ายรูป
+ถ่ายอุจจาระ
+ถ่าว
+ถาวร
+ถาวร-
+ถาวรธิรา
+ถาวรวัตถุ
+ถ้าว่า
+ถ้าหาà¸à¸§à¹ˆà¸²
+ถ้ำ
+ถ้ำชา
+ถ้ำมอง
+ถ้ำยาดม
+ถิ่น
+ถิร-
+ถี
+ถี่
+ถี่ๆ
+ถี่ถ้วน
+ถี่เท้า
+ถีน-
+ถีบ
+ถีบà¸à¸£à¸°à¸”าน
+ถีบจัà¸à¸£
+ถีบจัà¸à¸£à¸¢à¸²à¸™
+ถีบฉัด
+ถีบตัว
+ถีบทาง
+ถีบรถ
+ถีบหัวส่ง
+ถี่ยิบ
+ถี่ลอดตาช้าง ห่างลอดตาเล็น
+ถึà¸
+ถึง
+ถึงà¸à¸±à¸™
+ถึงà¹à¸à¹ˆà¸à¸£à¸£à¸¡
+ถึงà¹à¸à¹ˆà¸™
+ถึงà¹à¸à¹ˆà¸žà¸´à¸£à¸²à¸¥à¸±à¸¢
+ถึงà¹à¸à¹ˆà¸¡à¸£à¸“ภาพ
+ถึงà¹à¸à¹ˆà¸­à¸™à¸´à¸ˆà¸à¸£à¸£à¸¡
+ถึงà¹à¸à¹ˆà¸­à¸ªà¸±à¸à¸à¸£à¸£à¸¡
+ถึงขนาด
+ถึงคราว
+ถึงฆาต
+ถึงเงิน
+ถึงใจ
+ถึงชีพิตัà¸à¸©à¸±à¸¢
+ถึงชีวิตันตราย
+ถึงที่
+ถึงเป็นถึงตาย
+ถึงผ้า
+ถึงพริà¸à¸–ึงขิง
+ถึงลูà¸à¸–ึงคน
+ถึงว่า
+ถึงไหนถึงà¸à¸±à¸™
+ถือ
+ถือà¸à¸³à¹€à¸™à¸´à¸”
+ถือโà¸à¸£à¸˜
+ถือเขาถือเรา
+ถือใจ
+ถือดี
+ถือตัว
+ถือท้าย
+ถือน้ำพระพิพัฒน์สัตยา
+ถือบวช
+ถือบังเหียน
+ถือปูน
+ถือผิว
+ถือพล
+ถือยศ
+ถือยศถือศัà¸à¸”ิ์
+ถือเราถือเขา
+ถือว่า
+ถือศัà¸à¸”ินา
+ถือศีล
+ถือสา
+ถือสิทธิ์
+ถือหาง
+ถือโอà¸à¸²à¸ª
+ถุง
+ถุงเค้า
+ถุงตะเครียว
+ถุงตะเคียว
+ถุงย่าม
+ถุงสำเร็จ
+ถุน
+ถุย
+ถุล-
+ถุลละ
+ถู
+ถูà¸
+ถูà¸à¸à¸£à¸°à¸—ำ
+ถูà¸à¸à¸±à¸™
+ถูà¸à¸‚า
+ถูà¸à¸„อ
+ถูà¸à¸„ู่
+ถูà¸à¹ƒà¸ˆ
+ถูà¸à¹‚ฉลà¸
+ถูà¸à¸Šà¸°à¸•à¸²
+ถูà¸à¸•à¸²
+ถูà¸à¸™à¹‰à¸­à¸¢
+ถูà¸à¸›à¸²à¸
+ถูà¸à¸ªà¹ˆà¸§à¸™
+ถูà¸à¹€à¸ªà¹‰à¸™
+ถูà¸à¹ƒà¸«à¸à¹ˆ
+ถูà¸à¸­à¸à¸–ูà¸à¹ƒà¸ˆ
+ถูไถ
+ถูป-
+ถูปารหบุคคล
+ถูล-
+ถูลู่ถูà¸à¸±à¸‡
+เถà¸à¸´à¸‡
+เถน
+เถมิน
+เถมินเชิง
+เถมินไพร
+เถย-
+เถยจิต
+เถยเจตนา
+เถยสังวาส
+เถร
+เถร-
+เถรตรง
+เถรภูมิ
+เถรวาท
+เถรส่องบาตร
+เถระ
+เถรานุเถระ
+เถรี
+เถลไถล
+เถลิà¸
+เถลิง
+เถลิงศà¸
+เถลือà¸à¸–ลน
+เถ่อ
+เถอะ
+เถอะน่า
+เถะๆ
+เถา
+เถ้า
+เถ้าà¹à¸à¹ˆ
+เถาคัน
+เถาคันเหล็à¸
+เถาเงาะ
+เถาดาน
+เถามวà¸
+เถ้ารึง
+เถาวัลย์
+เถาวัลย์à¸à¸£à¸”
+เถาวัลย์เขียว
+เถาวัลย์ปูน
+เถาวัลย์เปรียง
+เถาวัลย์ยอดด้วน
+เถาวัลย์เหล็à¸
+เถาสิงโต
+เถาหัวด้วน
+เถาะ
+เถิà¸
+เถิง
+เถิด
+เถิดเทิง
+เถิดน่า
+เถิน
+เถียง
+เถียร
+เถือ
+เถือà¸
+เถื่อน
+à¹à¸–
+à¹à¸–à¸
+à¹à¸–ง
+à¹à¸–น
+à¹à¸–บ
+à¹à¸–บบันทึà¸à¸ à¸²à¸ž
+à¹à¸–บบันทึà¸à¹€à¸ªà¸µà¸¢à¸‡
+à¹à¸–บเหล็à¸à¸žà¸·à¸”
+à¹à¸–ม
+à¹à¸–มพà¸
+à¹à¸–ลง
+à¹à¸–ลงà¸à¸²à¸£à¸“์
+à¹à¸–ลงà¸à¸²à¸£à¸“์ร่วม
+à¹à¸–ลงข่าว
+à¹à¸–ลบ
+à¹à¸–ว
+โถ
+โถเครื่องà¹à¸›à¹‰à¸‡
+โถง
+โถงเถง
+โถบ
+โถปริà¸
+โถม
+โถมนาà¸à¸²à¸£
+โถส้วม
+ไถ
+ไถ่
+ไถ้
+ไถà¸à¸¥à¸š
+ไถง
+ไถดะ
+ไถ่ถอน
+ไถ่ถาม
+ไถนา
+ไถ่บาป
+ไถà¹à¸›à¸£
+ไถย-
+ไถล
+ท
+ทà¸
+ทà¸à¸¥à¹‰à¸²
+ทà¹à¸à¸¥à¹‰à¸§
+ท่ง
+ทงัน
+ทชี
+ทด
+ทดถอย
+ทดà¹à¸—น
+ทดโทร่ห
+ทดรอง
+ทดลอง
+ทดเลข
+ทดสอบ
+ทท
+ทธิ
+ทน
+ท้น
+ทนดี
+ทนต-
+ทนต์
+ทนตà¸à¸²à¸©à¸à¹Œ
+ทนทาน
+ทนโท่
+ทนม
+ทนาย
+ทนายความ
+ทนายเรือน
+ทนายเลือà¸
+ทนายหน้าหอ
+ทบ
+ทบทวน
+ทบวง
+ทบวงà¸à¸²à¸£
+ทบวงà¸à¸²à¸£à¹€à¸¡à¸·à¸­à¸‡
+ทม
+ทมà¸
+ทมน
+ทมบ
+ทมอ
+ทมิฬ
+ทเมิน
+ทโมน
+ทยอย
+ทยา
+ทยาลุ
+ทยาลุà¸
+ทà¹à¸¢à¸‡
+ทà¹à¸¢à¸‡à¸¡à¸¸à¸¡
+ทร-
+ทรà¸à¸£à¸£à¸¡
+ทรง
+ทรงà¸à¸£à¸°à¹€à¸—ียม
+ทรงà¸à¸¥à¸”
+ทรงข้าวบิณฑ์
+ทรงเครื่อง
+ทรงเครื่องใหà¸à¹ˆ
+ทรงเจ้า
+ทรงเจ้าเข้าผี
+ทรงตัà¸
+ทรงบาดาล
+ทรงประพาส
+ทรงพระเครื่องใหà¸à¹ˆ
+ทรงมัณฑ์
+ทรงลังà¸à¸²
+ทรงหม้อตาล
+ทรชน
+ทรชาติ
+ทรทึง
+ทรธึà¸
+ทรพล
+ทรพิษ
+ทรพี
+ทรภิà¸à¸©à¹Œ
+ทรมาทรà¸à¸£à¸£à¸¡
+ทรมาน
+ทรมุà¸
+ทรยศ
+ทรยุค
+ทรรทึง
+ทรรป
+ทรรปณ์
+ทรรปณะ
+ทรรศนะ
+ทรรศนาà¸à¸²à¸£
+ทรรศนีย์
+ทรราช
+ทรลัà¸à¸©à¸“์
+ทรเล่ห์
+ทรวง
+ทรวด
+ทรวดทรง
+ทรวาร
+ทรสองทรสุม
+ทรสาย
+ทรสุม
+ทรหด
+ทรหน
+ทรหวล
+ทรหึง
+ทรหึงทรหวล
+ทรหู
+ทรเหล
+ทรอ
+ทรอมโบน
+ทรอึง
+ทรอุ้ม
+ทระนง
+ทระนาว
+ทรัพย-
+ทรัพย์
+ทรัพย์นอà¸à¸žà¸²à¸“ิชย์
+ทรัพย์ในดิน สินในน้ำ
+ทรัพย์สมบัติ
+ทรัพยสิทธิ
+ทรัพย์สิน
+ทรัพย์สินส่วนพระมหาà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ
+ทรัพย์สินส่วนพระองค์
+ทรัพย์สินส่วนสาธารณสมบัติของà¹à¸œà¹ˆà¸™à¸”ิน
+ทรัพยาà¸à¸£
+ทรัพยาà¸à¸£à¸˜à¸£à¸“ี
+ทรัพยาà¸à¸£à¸˜à¸£à¸£à¸¡à¸Šà¸²à¸•à¸´
+ทรัมเป็ต
+ทรานซิสเตอร์
+ทราบ
+ทราบเà¸à¸¥à¹‰à¸²à¸—ราบà¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡
+ทราบà¸à¹ˆà¸²à¸žà¸£à¸°à¸šà¸²à¸—
+ทราบà¸à¹ˆà¸²à¸¥à¸°à¸­à¸­à¸‡à¸˜à¸¸à¸¥à¸µà¸žà¸£à¸°à¸šà¸²à¸—
+ทราบà¸à¹ˆà¸²à¸¥à¸°à¸­à¸­à¸‡à¸žà¸£à¸°à¸šà¸²à¸—
+ทราม
+ทรามชม
+ทรามเชย
+ทรามวัย
+ทรามสงวน
+ทรามสวาท
+ทราย
+ทรายà¹à¸à¹‰à¸§
+ทรายขาว
+ทรายà¹à¸›à¹‰à¸‡
+ทริทร
+ทรุด
+ทรุดโทรม
+ทรุดนั่ง
+ทรุม
+ทรู่
+ทฤฆ-
+ทฤษฎี
+ทฤษฎีบท
+ทล
+ทลบม
+ทลอึง
+ทลาย
+ทลิท
+ทลิททà¸
+ทวง
+ท้วง
+ท้วงติง
+ทวงถาม
+ท่วงท่า
+ท่วงทำนอง
+ท่วงที
+ทวด
+ทวดน้อย
+ทวดึงส์
+ทวน
+ท้วน
+ทวนทบ
+ทวนสบถ
+ทวนสาบาน
+ท่วม
+ท้วม
+ท้วมๆ
+ท่วมท้น
+ทวย
+ท่วย
+ท้วย
+ทวยโถง
+ท่วยโถง
+ทวยะ
+ทวอย
+ทวัตดึงส์
+ทวัตดึงสาà¸à¸²à¸£
+ทวัย
+ทวา
+ทว่า
+ทวาตรึงประดับ
+ทวาทศ
+ทวาทศม-
+ทวาทศมณฑล
+ทวาทศี
+ทวาบร
+ทวาบรยุค
+ทวาย
+ทวาร
+ทวารทั้งเà¸à¹‰à¸²
+ทวารบถ
+ทวารบาล
+ทวารประดับ
+ทวิ
+ทวิช
+ทวิช-
+ทวิชงค์
+ทวิชาà¸à¸£
+ทวิชาติ
+ทวิตีย
+ทวิตียา
+ทวิบถ
+ทวิบท
+ทวิบาท
+ทวิป
+ทวิภาค
+ทวิภาคี
+ทวิร
+ทวี
+ทวีคูณ
+ทวีธาภิเษà¸
+ทวีป
+ทวีปี
+ทศ
+ทศ-
+ทศชาติ
+ทศทิศ
+ทศนิยม
+ทศเบà¸à¸ˆà¸à¸¹à¸¥
+ทศพร
+ทศพล
+ทศพิธราชธรรม
+ทศม-
+ทศมาส
+ทศมี
+ทศวรรษ
+ทศา
+ทศางค์
+ทสา
+ทหระ
+ทหาร
+ทหารà¸à¸­à¸‡à¸›à¸£à¸°à¸ˆà¸³à¸à¸²à¸£
+ทหารผ่านศึà¸
+ทหารเลว
+ทอ
+ท่อ
+ท้อ
+ทอà¸
+ทอง
+ท่อง
+ท้อง
+ทองà¸à¸£
+ทองà¸à¸§à¸²à¸§
+ท้องà¸à¸²à¸‡
+ท้องà¹à¸à¹ˆ
+ทองขาว
+ท้องขาว
+ท้องขึ้น
+ท้องขึ้นท้องพอง
+ท้องà¹à¸‚น
+ท้องà¹à¸‚วน
+ท้องคัดท้องà¹à¸‚็ง
+ทองคำ
+ทองคำขาว
+ทองคำเปลว
+ท้องคุ้ง
+ทองเค
+ทองเครือ
+ท่องจำ
+ท้องฉนวน
+ทองชมพูนุท
+ทองชุบ
+ทองดอà¸à¸šà¸§à¸š
+ทองดำ
+ท้องเดิน
+ทองà¹à¸”ง
+ทองต้นà¹à¸‚น
+ท้องตรา
+ท้องตลาด
+ทองตาà¸à¸¹
+ท้องถิ่น
+ทองทราย
+ทองทศ
+ท้องที่
+ทองทึบ
+ท่องเที่ยว
+ทองธรรมชาติ
+ทองนพคุณ
+ท้องน่อง
+ท้องน้อย
+ทองบรอนซ์
+ท้องà¹à¸šà¸™
+ทองใบ
+ทองปราย
+ทองปลายà¹à¸‚น
+ท้องปลิง
+ทองà¹à¸›
+ท้องผุท้องพัง
+ท้องผูà¸
+ทองเผือà¸
+ทองà¹à¸œà¹ˆà¸™à¹€à¸”ียวà¸à¸±à¸™
+ทองพระà¸à¸£
+ทองพระขุน
+ท้องพระคลัง
+ท้องพระโรง
+ทองพลุ
+ท้องพลุ
+ท้องพอง
+ทองพัดดึงส์
+ทองพันชั่ง
+ทองพันดุล
+ทองพิศ
+ท้องเฟ้อ
+ทองภู
+ทองม้วน
+ท้องมาน
+ท้องไม้
+ทองไม่รู้ร้อน
+ทองย้อย
+ท้องยุ้งพุงà¸à¸£à¸°à¸ªà¸­à¸š
+ท้องร่วง
+ท้องร่อง
+ทองรูปพรรณ
+ท้องเรื่อง
+ท้องลาน
+ทองลิน
+ท้องเลว
+ทองà¹à¸¥à¹ˆà¸‡
+ทองวิทยาศาสตร์
+ทองสัà¸à¹‚à¸
+ทองสัมฤทธิ์
+ท้องสาว
+ท้องสำนวน
+ท่องสื่อ
+ท้องเสีย
+ทองหมั้น
+ท้องหมา
+ท้องหมู
+ทองหยอง
+ทองหยอด
+ทองหยิบ
+ทองหลาง
+ทองเหลือง
+ท้องà¹à¸«à¹‰à¸‡
+ทองโหลง
+ทองอังà¸à¸¤à¸©
+ท้องอัสดงคต
+ท้องอืด
+ทองอุไร
+ทองเอà¸
+ทอด
+ทอดà¸à¸à¸´à¸™
+ทอดโà¸à¸¥à¸™
+ทอดตัว
+ทอดตา
+ทอดทฤษฎี
+ทอดทิ้ง
+ทอดที่
+ทอดน่อง
+ทอดน้ำ
+ทอดผ้าป่า
+ทอดพระที่
+ทอดพระเนตร
+ทอดมัน
+ทอดยอด
+ทอดรวง
+ทอดสà¸à¸²
+ทอดสมอ
+ทอดสะพาน
+ทอดสายตา
+ทอดเสียง
+ทอดหà¸à¹‰à¸²
+ทอดหุ่ย
+ทอดà¹à¸«
+ทอดอาลัย
+ท่อถ้อย
+ท้อถอย
+ท้อถ้อย
+ท้อà¹à¸—้
+ทอน
+ท่อน
+ทอนซิล
+ทอฟฟี่
+ท่อมๆ
+ทอย
+ทอยà¸à¸­à¸‡
+ทอเรียม
+ทอà¹à¸ªà¸‡
+ทอหูà¸
+ท่อไอเสีย
+ทะ
+ทะงัน
+ทะทัด
+ทะทา
+ทะทาย
+ทะท่าว
+ทะท้าว
+ทะทึà¸
+ทะเทียด
+ทะนง
+ทะนงตัว
+ทะนงศัà¸à¸”ิ์
+ทะนน
+ทะนะ
+ทะนา
+ทะนาน
+ทะนานหลวง
+ทะนุ
+ทะนุà¸
+ทะนุà¸à¸–นอม
+ทะนุถนอม
+ทะนุบำรุง
+ทะบู
+ทะเบียน
+ทะเบียนบ้าน
+ทะเบียนราษฎร
+ทะเบียนสำมะโนครัว
+ทะมัดทะà¹à¸¡à¸‡
+ทะมึน
+ทะมื่น
+ทะà¹à¸¡à¹ˆà¸‡
+ทะà¹à¸¡à¹ˆà¸‡à¹†
+ทะยาทะà¹à¸¢à¹à¸ª
+ทะยาน
+ทะยานใจ
+ทะยานอยาà¸
+ทะเยอทะยาน
+ทะà¹à¸¢
+ทะà¹à¸¢à¸ªà¸²à¸¡à¸Šà¸±à¹‰à¸™
+ทะร่อทะà¹à¸£à¹ˆ
+ทะลวง
+ทะลอà¸
+ทะลัà¸
+ทะลัà¸à¸—ะà¹à¸¥à¸‡
+ทะลาย
+ทะลิ่น
+ทะลิ่นชระลั่ง
+ทะลึ่ง
+ทะลึ่งทะลั่ง
+ทะลุ
+ทะลุà¸à¸¥à¸²à¸‡à¸›à¸¥à¹‰à¸­à¸‡
+ทะลุดทะลาด
+ทะลุปรุโปร่ง
+ทะเล
+ทะเลทราย
+ทะเล้น
+ทะเลใน
+ทะเลบ้า
+ทะเลภายใน
+ทะเลสาบ
+ทะเลหน้าใน
+ทะเลหลวง
+ทะเลไหล่ทวีป
+ทะเล่อทะล่า
+ทะเลอาณาเขต
+ทะเลาะ
+ทะเลาะเบาะà¹à¸§à¹‰à¸‡
+ทะวาย
+ทะเวน
+ทัà¸
+ทัà¸à¸‚์
+ทัà¸à¸‚ิà¸
+ทัà¸à¸‚ิณ
+ทัà¸à¸‚ิณา
+ทัà¸à¸‚ิณาบถ
+ทัà¸à¸‚ิณาวัà¸
+ทัà¸à¸‚ิโณทà¸
+ทัà¸à¸‚ิไณยบุคคล
+ทัà¸à¸—้วง
+ทัà¸à¸—าย
+ทัà¸à¸—ิน
+ทัà¸à¸™à¸´à¸¡à¸´à¸•
+ทัà¸à¸©-
+ทัà¸à¸©à¸°
+ทัà¸à¸©à¸²
+ทัà¸à¸©à¸´à¸“
+ทัà¸à¸©à¸´à¸“นิà¸à¸²à¸¢
+ทัà¸à¸©à¸´à¸“า
+ทัà¸à¸©à¸´à¸“าจาร
+ทัà¸à¸©à¸´à¸“าทาน
+ทัà¸à¸©à¸´à¸“านุประทาน
+ทัà¸à¸©à¸´à¸“ายัน
+ทัà¸à¸©à¸´à¸“าวรรต
+ทัà¸à¸©à¸´à¹‚ณทà¸
+ทัคธ์
+ทัง
+ทั่ง
+ทั้ง
+ทั้ง...à¸à¸±à¸š
+ทั้งขึ้นทั้งล่อง
+ทั้งคน
+ทั้งดุ้น
+ทั้ง...ทั้ง
+ทั้งที
+ทั้งที่
+ทั้งๆ ที่
+ทั้งนั้น
+ทั้งนี้
+ทั้งนี้ทั้งนั้น
+ทั้งเนื้อทั้งตัว
+ทั้งปวง
+ทั้งผอง
+ทั้งเพ
+ทั้งมวล
+ทั้ง...à¹à¸¥à¸°
+ทังวล
+ทังวี้ทังวล
+ทังสเตน
+ทั้งสิ้น
+ทั้งหมด
+ทั้งหลาย
+ทั้งอย่างนั้น
+ทัณฑ-
+ทัณฑ์
+ทัณฑà¸à¸£à¸£à¸¡
+ทัณฑฆาต
+ทัณฑนิคม
+ทัณฑ์บน
+ทัณฑวิทยา
+ทัณฑสถาน
+ทัณฑะ
+ทัณฑิà¸à¸²
+ทัณฑิมา
+ทัณฑีบท
+ทัด
+ทัดดอà¸à¹„ม้
+ทัดทา
+ทัดทาน
+ทัดเทียม
+-ทัต
+ทัน
+ทันà¸à¸´à¸™
+ทันควัน
+ทันใจ
+ทันใด
+ทันต-
+ทันต์
+ทันตชะ
+ทันตà¹à¸žà¸—ย์
+ทันตา
+ทันติน
+ทันตี
+ทันท่วงที
+ทันที
+ทันธ์
+ทันน้ำ
+ทันน้ำทันà¸à¸™
+ทันสมัย
+ทับ
+ทับเà¸à¸©à¸•à¸£
+ทับถม
+ทับทรวง
+ทับทาง
+ทับทางขาว
+ทับทิม
+ทับที่
+ทับà¹à¸ž
+ทับลัคน์
+ทับเล็à¸
+ทับศัพท์
+ทับสมิงคลา
+ทับสิทธิ์
+ทับหลัง
+ทับหลังลัคน์
+ทัป
+ทัปน
+ทัพ
+ทัพพะ
+ทัพพี
+ทัพสัมภาระ
+ทั่ว
+ทั่วถึง
+ทั่วทุà¸à¸ªà¸²à¸£à¸—ิศ
+ทั่วทุà¸à¸«à¸±à¸§à¸£à¸°à¹à¸«à¸‡
+ทั่วไป
+ทั่วๆ ไป
+ทัศ
+ทัศน-
+ทัศน์
+ทัศนคติ
+ทัศนวิสัย
+ทัศนศาสตร์
+ทัศนศึà¸à¸©à¸²
+ทัศนะ
+ทัศนา
+ทัศนาà¸à¸²à¸£
+ทัศนาจร
+ทัศนีย-
+ทัศนีย์
+ทัศนียภาพ
+ทัศนูปà¸à¸£à¸“์
+ทัศไนย
+ทัสนานุตริยะ
+ทัฬห
+ทัฬหิ
+ทัฬหิà¸à¸£à¸“์
+ทัฬหี
+ทัฬหีà¸à¸£à¸£à¸¡
+ทา
+ท่า
+ท้า
+ทาà¸
+ทาง
+ท้าง
+ทางà¸à¸²à¸£
+ทางเà¸à¹‡à¸š
+ทางข้าม
+ทางช้างเผือà¸
+ทางด่วน
+ทางเท้า
+ทางโท
+ทางใน
+ทางผ่าน
+ทางพิเศษ
+ทางมะพร้าว
+ทางม้าลาย
+ทางสาธารณะ
+ทางหลวง
+ทางออà¸
+ทางเอà¸
+ทาà¸à¸°
+ทาà¸à¸´à¸à¸°
+ทาฒะ
+ทาฒิà¸à¸°
+ท่าดีทีเหลว
+ท่าเดียว
+ท่าทาง
+ท้าทาย
+ท่าที
+ทาน
+ทาน-
+ท่าน
+ทานà¸à¸±à¸“ฑ์
+ท่านชาย
+ทานต์
+ทานตะวัน
+ทานบดี
+ทานบารมี
+ท่านผู้หà¸à¸´à¸‡
+ทานพ
+ทานมัย
+ทานศีล
+ท่านหà¸à¸´à¸‡
+ท่านั้นท่านี้
+ทานาธิบดี
+ทาบ
+ทาบทาม
+ทาม
+ท่ามà¸à¸¥à¸²à¸‡
+ทาย
+ท้าย
+ทายà¸
+ท้ายเขื่อน
+ท้ายครัว
+ท้ายโต่ง
+ท้ายทอย
+ท้ายน้ำ
+ท้ายà¸à¸™
+ทายัช
+ทายา
+ทายาด
+ทายาท
+ทายาทโดยธรรม
+ทาร-
+ทารà¸
+ทารพี
+ทาริà¸à¸²
+ทารุ
+ทารุณ
+ทารุณ-
+ทารุณà¸à¸£à¸£à¸¡
+ท่าเรือ
+ทาว
+ท่าว
+ท้าว
+ท่าวà¸à¸³à¸¥à¸±à¸‡
+ท่าวทบระนับ
+ท้าวนาง
+ท้าวพà¸à¸²
+ท้าวพระยา
+ทาษ
+ทาส
+ทาส-
+ทาสทาน
+ทาสปัà¸à¸à¸²
+ทาสี
+ท่าอาà¸à¸²à¸¨à¸¢à¸²à¸™
+ทำ
+ทำà¸à¸£à¸£à¸¡
+ทำà¸à¸²à¸£à¸šà¹‰à¸²à¸™
+ทำขวัà¸
+ทำครัว
+ทำคลอด
+ทำความ
+ทำคุณ
+ทำคุณบูชาโทษ
+ทำงน
+ทำเจ็บ
+ทำใจ
+ทำได้
+ทำได้ลงคอ
+ทำตัว
+ทำตา
+ทำท่า
+ทำที
+ทำà¹à¸—้ง
+ทำโทษ
+ทำนบ
+ทำนวย
+ทำนอง
+ทำนองเสนาะ
+ทำนาบนหลังคน
+ทำนาย
+ทำนาออมà¸à¸¥à¹‰à¸² ทำปลาออมเà¸à¸¥à¸·à¸­
+ทำนุ
+ทำนุบำรุง
+ทำนูล
+ทำเนา
+ทำเนียบ
+ทำเนียบท่าเรือ
+ทำเนียบนาม
+ทำเนียม
+ทำบาป
+ทำบุà¸
+ทำบุà¸à¹€à¸­à¸²à¸«à¸™à¹‰à¸²
+ทำปลา
+ทำปาà¸à¸—ำคอ
+ทำเป็น
+ทำไปทำมา
+ทำพิษ
+ทำไพ่
+ทำฟัน
+ทำไฟ
+ทำมัง
+ทำไม
+ทำร้าย
+ทำฤทธิ์
+ทำลาย
+ทำลายขวัà¸
+ทำลายสถิติ
+ทำลิง
+ทำเล
+ทำวน
+ทำวัตร
+ทำวัตรค่ำ
+ทำวัตรเช้า
+ทำเวร
+ทำเวลา
+ทำสาว
+ทำเสน่ห์
+ทำเสียเจ็บ
+ทำหน้าทำตา
+ทำหมัน
+ทำหูทวนลม
+ทำเหตุ
+ทำให้
+ทำเอา
+ทำเอาเจ็บ
+ทิคัมพร
+ทิฆัมพร
+ทิ้ง
+ทิ้งà¸à¸£à¸°à¸ˆà¸²à¸”
+ทิ้งขว้าง
+ทิ้งๆ ขว้างๆ
+ทิ้งจดหมาย
+ทิงเจอร์
+ทิ้งถ่อน
+ทิ้งทวน
+ทิ้งทาน
+ทิ้งท้าย
+ทิ้งทูด
+ทิ้งไพ่
+ทิ้งฟ้อง
+ทิ้งมะพร้าวห้าว
+ทิ้งย่อ
+ทิช
+ทิช-
+ทิชาà¸à¸£
+ทิà¸à¸à¸°
+ทิà¸à¸à¸²à¸™à¸¸à¸„ติ
+ทิà¸à¸à¸¸à¸Šà¸¸à¸à¸£à¸£à¸¡
+ทิà¸-
+ทิà¸à¸˜à¸£à¸£à¸¡
+ทิà¸à¸´
+ทิด
+ทิต
+ทิน
+ทิน-
+ทินà¸à¸£
+ทินศูนย์
+ทินาท
+ทิพ
+ทิพ-
+ทิพย-
+ทิพย์
+ทิพยจัà¸à¸©à¸¸
+ทิพยจัà¸à¸©à¸¸à¸à¸²à¸“
+ทิพยà¸à¸²à¸“
+ทิพยเนตร
+ทิพยพยาน
+ทิพยมานุษ
+ทิพยรส
+ทิพยโศรตร
+ทิพโสต
+ทิพา
+ทิพาà¸à¸£
+ทิม
+ทิ่ม
+ทิมดาบ
+ทิ่มตำ
+ทิมทอง
+ทิ่มà¹à¸—ง
+ทิว
+ทิว-
+ทิวà¸à¸²à¸¥
+ทิวงคต
+ทิวทัศน์
+ทิวส-
+ทิวสภาค
+ทิวสะ
+ทิวา
+ทิวาà¸à¸£
+ทิวาà¸à¸²à¸¥
+ทิศ
+ทิศทาง
+ทิศา
+ทิศาดร
+ทิศานุทิศ
+ทิศาปาโมà¸à¸‚์
+ที
+ที่
+ที่à¸à¸±à¸¥à¸›à¸™à¸²
+ทีใครทีมัน
+ทีฆ-
+ทีฆชาติ
+ทีฆนิà¸à¸²à¸¢
+ทีฆสระ
+ทีฆายุ
+ที่จริง
+ที่ดิน
+ที่ดินมือเปล่า
+ทีเด็ด
+ทีเดียว
+ทีท่า
+ที่ทาง
+ที่ทำà¸à¸²à¸£
+ที่เท่าà¹à¸¡à¸§à¸”ิ้นตาย
+ที่à¹à¸—้
+ที่ธรณีสงฆ์
+ที่นอน
+ที่นั่ง
+ทีนี้
+ทีป
+ที่พึ่ง
+ทีม
+ที่มั่น
+ที่มา
+ทีรฆ-
+ที่รัà¸
+ที่ราบ
+ที่ราบสูง
+ทีเล่นทีจริง
+ที่วัด
+ที่ว่าà¸à¸²à¸£
+ที่สุด
+ที่หมาย
+ทีหลัง
+ที่ไหน
+ที่ไหนได้
+ทีเอ็นที
+ทึà¸
+ทึà¸à¸—ัà¸
+ทึ่ง
+ทึ้ง
+ทึดทือ
+ทึนทึà¸
+ทึบ
+ทึม
+ทึมๆ
+ทึ่ม
+ทื่อ
+ทุ
+ทุà¸
+ทุà¸à¹†
+ทุà¸à¸‚-
+ทุà¸à¸‚์
+ทุà¸à¸‚นิโรธ
+ทุà¸à¸‚ลาภ
+ทุà¸à¸‚เวทนา
+ทุà¸à¸‚สมุทัย
+ทุà¸à¸‚์สุข
+ทุà¸à¸‚ัà¸à¸©à¸±à¸¢
+ทุà¸à¸‚ารมณ์
+ทุà¸à¸
+ทุà¸à¸—ี
+ทุà¸à¸™à¸´à¸šà¸²à¸•
+ทุà¸à¸žà¸²à¸¢
+ทุà¸à¹€à¸¡à¸·à¹ˆà¸­
+ทุà¸à¹€à¸¡à¸·à¹ˆà¸­à¹€à¸Šà¸·à¹ˆà¸­à¸§à¸±à¸™
+ทุà¸à¸£-
+ทุà¸à¸£à¸à¸´à¸£à¸´à¸¢à¸²
+ทุà¸à¸§à¸±à¸™à¸™à¸µà¹‰
+ทุà¸à¸©à¸”ร
+ทุà¸à¸ªà¸´à¹ˆà¸‡à¸—ุà¸à¸­à¸¢à¹ˆà¸²à¸‡
+ทุà¸à¸«à¸™
+ทุà¸à¸«à¸™à¸—ุà¸à¹à¸«à¹ˆà¸‡
+ทุà¸à¸«à¸¢à¹ˆà¸­à¸¡à¸«à¸à¹‰à¸²
+ทุà¸à¸«à¸±à¸§à¸£à¸°à¹à¸«à¸‡
+ทุà¸à¹à¸«à¹ˆà¸‡
+ทุà¸à¸°
+ทุà¸à¸±à¸‡
+ทุà¸à¸¹à¸¥
+ทุคตะ
+ทุคติ
+ทุ่ง
+ทุ้ง
+ทุงงะ
+ทุงเทง
+ทุจจิณณะ
+ทุจริต
+ทุด
+ทุตวิลัมพิตมาลา
+ทุติย-
+ทุติยาสาฬห
+ทุทรรศนนิยม
+ทุน
+ทุ่น
+ทุนจดทะเบียน
+ทุนทรัพย์
+ทุนนอน
+ทุนนิมิต
+ทุนนิยม
+ทุ่นเบ็ด
+ทุนรอน
+ทุ่นระเบิด
+ทุนเรือนหุ้น
+ทุนสำรอง
+ทุนสำรองเงินตรา
+ทุนหมุนเวียน
+ทุ่นอวน
+ทุนิยม
+ทุบ
+ทุบตี
+ทุบทู
+ทุบหม้อข้าว
+ทุปปัà¸à¸à¸²
+ทุพพรรณ
+ทุพพล
+ทุพพลภาพ
+ทุพภิà¸à¸‚ภัย
+ทุพภิà¸à¸‚ันดรà¸à¸±à¸›
+ทุม
+ทุม-
+ทุ่ม
+ทุ้ม
+ทุ่มตลาด
+ทุ่มเถียง
+ทุ่มเท
+ทุมโน
+ทุมราชา
+ทุย
+ทุ้ย
+ทุร-
+ทุรà¸à¸±à¸™à¸”าร
+ทุรคม
+ทุรชน
+ทุรชาติ
+ทุรน
+ทุรนทุราย
+ทุรพล
+ทุรภิà¸à¸©à¹Œ
+ทุรลัà¸à¸©à¸“์
+ทุรัถยา
+ทุรัศ
+ทุราคม
+ทุราจาร
+ทุราธวา
+ทุเรศ
+ทุเรียน
+ทุเรียนà¹à¸‚à¸
+ทุเรียนเทศ
+ทุลัà¸à¸—ุเล
+ทุเลา
+ทุวิธ
+ทุศีล
+ทุษà¸-
+ทุส-
+ทุสสะ
+ทุสสีล
+ทู
+ทู่
+ทู้
+ทูà¸à¸±à¸‡
+ทู่ซี้
+ทูต
+ทูตานุทูต
+ทูน
+ทูน้ำจืด
+ทูบ
+ทูม
+ทูมทาม
+ทูโม่ง
+ทูร-
+ทูล
+ทูลà¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡
+ทูลเà¸à¸¥à¹‰à¸²à¸—ูลà¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡à¸–วาย
+ทูเลียม
+ทูษà¸
+เท
+เท่
+เทà¸à¸£à¸°à¸ˆà¸²à¸”
+เทà¸à¸£à¸°à¹€à¸›à¹‹à¸²
+เทคนิค
+เทคนีเชียม
+เทคโนโลยี
+เทครัว
+เทคอนà¸à¸£à¸µà¸•
+เทง
+เท้ง
+เท้งเต้ง
+เท้งทูด
+เท็จ
+เท็จจริง
+เท็จเทียม
+เทนนิส
+เทน้ำเทท่า
+เทปูน
+เทพ
+เทพ-
+เทพà¸à¸¸à¸ªà¸¸à¸¡
+เทพเจ้า
+เทพชุมนุม
+เทพดา
+เทพดำรู
+เทพทัณฑ์
+เทพทารู
+เทพทาโร
+เทพธิดา
+เทพนม
+เทพนารี
+เทพนิยม
+เทพนิยาย
+เทพนิยายวิทยา
+เทพนิรมิต
+เทพบดี
+เทพบริษัท
+เทพบุตร
+เทพประติมา
+เทพพยาà¸à¸£à¸“์
+เทพย-
+เทพยเจ้า
+เทพยดา
+เทพยุดา
+เทพสังหรณ์
+เทพา
+เทพาดิเทพ
+เทพาธิบดี
+เทพารัà¸à¸©à¹Œ
+เทพิน
+เทพินทร์
+เทพี
+เทพีปัà¸à¸©à¸µ
+เทเพนทร์
+เทโพ
+เทริด
+เทลลูเรียม
+เทว-
+เทวดา
+เทวทัณฑ์
+เทวทูต
+เทวธรรม
+เทวธิดา
+เทวนะ
+เทวนาครี
+เทวนิยม
+เทวภาวะ
+เทวระ
+เทวรูป
+เทวโลà¸
+เทววาจิà¸à¸°
+เทววิทยา
+เทวศ
+เทวษ
+เทวสถาน
+เทวสุคนธ์
+เทวอ
+เทวัà¸
+เทวัน
+เทวาคาร
+เทวารัณย์
+เทวาลัย
+เทวาวาส
+เทวินทร์
+เทวี
+เทเวนทร์
+เทเวศ
+เทเวศร์
+เทเวศวร์
+เทศ
+เทศ-
+เทศà¸
+เทศà¸à¸²à¸¥
+เทศน์
+เทศน์à¹à¸ˆà¸‡
+เทศนา
+เทศบัà¸à¸à¸±à¸•à¸´
+เทศบาล
+เทศมนตรี
+เทศะ
+เทศาจาร
+เทศาภิบาล
+เทห-
+เทห์
+เท่ห์
+เทห์ฟาà¸à¸Ÿà¹‰à¸²
+เทหวัตถุ
+เท่อ
+เท้อ
+เทอà¸
+เทอม
+เทอร์เบียม
+เทอร์โมมิเตอร์
+เทอะทะ
+เทา
+เท่า
+เท้า
+เท่าà¸à¸±à¸š
+เท้าà¹à¸‚น
+เท้าคู้
+เท้าช้าง
+เท่าใด
+เท่าตัว
+เท่าทัน
+เท่าทุน
+เท่าเทียม
+เท่านั้น
+เท่าเผ้า
+เท้ายายม่อม
+เท่ารึง
+เท่าไร
+เท้าสาน
+เท้าสิงห์
+เทาะห์
+เทิà¸
+เทิ่ง
+เทิงบอง
+เทิด
+เทิดทูน
+เทิน
+เทิบ
+เทิบๆ
+เทิบทาบ
+เทิ้ม
+เทียง
+เที่ยง
+เที่ยงๆ
+เที่ยงตรง
+เที่ยงà¹à¸—้
+เที่ยงธรรม
+เทียน
+เที้ยน
+เทียนà¸à¸´à¹ˆà¸‡
+เทียนเà¸à¸¥à¹‡à¸”หอย
+เทียนà¹à¸à¸¥à¸š
+เทียนขม
+เทียนขาว
+เทียนข้าวเปลือà¸
+เทียนดำ
+เทียนà¹à¸”ง
+เทียนตาà¸à¸š
+เทียนตาตั๊à¸à¹à¸•à¸™
+เทียนบ้าน
+เทียนพรรษา
+เทียนเยาวพาณี
+เทียนรุ่ง
+เทียนลวด
+เทียนสัตตบุษย์
+เทียนอบ
+เทียบ
+เทียบเคียง
+เทียบเท่า
+เทียม
+เทียร
+เที้ยร
+เทียรฆ-
+เทียรฆชาติ
+เทียรฆราตร
+เทียว
+เที่ยว
+เทือ
+เทื่อ
+เทื้อ
+เทือà¸
+เทือà¸à¹€à¸‚า
+เทือà¸à¹€à¸–าเหล่าà¸à¸­
+เทือน
+à¹à¸—่
+à¹à¸—้
+à¹à¸—้ๆ
+à¹à¸—็à¸à¸‹à¸µà¹ˆ
+à¹à¸—็à¸à¸‹à¸µà¹ˆà¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ
+à¹à¸—ง
+à¹à¸—่ง
+à¹à¸—้ง
+à¹à¸—็งà¸à¹Œà¸™à¹‰à¸³
+à¹à¸—งใจ
+à¹à¸—งใจดำ
+à¹à¸—งตะไบ
+à¹à¸—งทวย
+à¹à¸—งวิสัย
+à¹à¸—งหยวà¸
+à¹à¸—้จริง
+à¹à¸—ตย์
+à¹à¸—้ที่จริง
+à¹à¸—น
+à¹à¸—่น
+à¹à¸—นเจนต์
+à¹à¸—นทาลัม
+à¹à¸—นที่จะ
+à¹à¸—่นพิมพ์
+à¹à¸—่นมณฑล
+à¹à¸—่นลา
+à¹à¸—่นหมึà¸
+à¹à¸—บ
+à¹à¸—รà¸
+à¹à¸—รà¸à¸‹à¸­à¸™
+à¹à¸—รà¸à¸‹à¹‰à¸­à¸™
+à¹à¸—รà¸à¸‹à¸¶à¸¡
+à¹à¸—รà¸à¹à¸‹à¸‡
+à¹à¸—รà¸à¹€à¸•à¸­à¸£à¹Œ
+à¹à¸—รà¸à¹à¸œà¹ˆà¸™à¸”ิน
+à¹à¸—รà¸à¹‚พน
+à¹à¸—ลเลียม
+à¹à¸—ะ
+à¹à¸—ะโลม
+โท
+โท่
+โทà¸à¹€à¸—à¸
+โทงๆ
+โทงเทง
+โทณะ
+โทโทษ
+โทธà¸
+โทน
+โทนโท่
+โทมนัส
+โทร-
+โทรคมนาคม
+โทรทรรศน์
+โทรทัศน์
+โทรพิมพ์
+โทรภาพ
+โทรม
+โทรมศัสตราวุธ
+โทรมหà¸à¸´à¸‡
+โทรเลข
+โทรศัพท์
+โทรสาร
+โทลา
+โทศà¸
+โทษ
+โทษ-
+โทษà¸à¸£à¸“์
+โทษตรัย
+โทษทางวินัย
+โทษโพย
+โทษา
+โทษาà¸à¸£
+โทษาดิลà¸
+โทษานุโทษ
+โทษารมณ์
+โทส-
+โทสะ
+โทสาคติ
+โทโส
+โทหฬะ
+โทหฬินี
+ไท
+ไท้
+ไทเทเนียม
+ไทเทรต
+ไทย
+ไทยดำ
+ไทยทาน
+ไทยธรรม
+ไทยน้อย
+ไทยนับสาม
+ไทยนับห้า
+ไทยหลง
+ไทยหลวง
+ไทยใหà¸à¹ˆ
+ไทร
+ไทรทอง
+ไทรเลียบ
+ไทวะ
+ธ
+ธง
+ธงà¸à¹Œ
+ธงà¸à¸£à¸°à¸šà¸µà¹ˆà¸˜à¸¸à¸Š
+ธงจระเข้
+ธงฉาน
+ธงชัย
+ธงชัยเฉลิมพลของทหารบà¸
+ธงชัยเฉลิมพลของทหารเรือ
+ธงชัยเฉลิมพลของทหารอาà¸à¸²à¸¨
+ธงชาติ
+ธงชาย
+ธงตะขาบ
+ธงนำริ้ว
+ธงบรมราชวงศ์น้อย
+ธงบรมราชวงศ์ใหà¸à¹ˆ
+ธงประจำà¸à¸­à¸‡à¸—ัพบà¸
+ธงประจำà¸à¸­à¸‡à¸—ัพเรือ
+ธงประจำà¸à¸­à¸‡à¸—ัพอาà¸à¸²à¸¨
+ธงพระครุฑพ่าห์
+ธงพิทัà¸à¸©à¹Œà¸ªà¸±à¸™à¸•à¸´à¸£à¸²à¸©à¸Žà¸£à¹Œ
+ธงมหาราชน้อย
+ธงมหาราชใหà¸à¹ˆ
+ธงเยาวราชน้อย
+ธงเยาวราชใหà¸à¹ˆ
+ธงราชนาวี
+ธงราชินีน้อย
+ธงราชินีใหà¸à¹ˆ
+ธงสามเหลี่ยม
+ธช
+ธชี
+ธตรà¸
+ธน
+ธน-
+ธนธานี
+ธนบดี
+ธนบัตร
+ธนสมบัติ
+ธนสาร
+ธนัง
+ธนาคม
+ธนาคาร
+ธนาคารพาณิชย์
+ธนาคารโลà¸
+ธนาคารออมสิน
+ธนาณัติ
+ธนิต
+ธนิษà¸à¸°
+ธนิษà¸à¸²
+ธนุ
+ธนุร-
+ธนุรมารค
+ธนุรวิทยา
+ธนุรเวท
+ธนู
+ธนูศิลป์
+ธเนศ
+ธเนศวร
+ธโนปจัย
+ธไนศวรรย์
+ธม
+ธมà¸à¸£à¸
+ธร
+ธรง
+ธรณ
+ธรณิน
+ธรณินทร์
+ธรณิศ
+ธรณิศร
+ธรณิศวร์
+ธรณี
+ธรณีà¸à¸±à¸™à¹à¸ªà¸‡
+ธรณีประตู
+ธรณีมณฑล
+ธรณีร้องไห้
+ธรณีวิทยา
+ธรณีศวร
+ธรณีสงฆ์
+ธรณีสาร
+ธรณีสูบ
+ธรมาน
+ธรรม
+ธรรม-
+ธรรมà¸à¸–า
+ธรรมà¸à¸–ึà¸
+ธรรมà¸à¸²à¸¡
+ธรรมà¸à¸²à¸¢
+ธรรมà¸à¸²à¸£
+ธรรมà¸à¸²à¸£à¸¢à¹Œ
+ธรรมเà¸à¸©à¸•à¸£
+ธรรมขันธ์
+ธรรมคุณ
+ธรรมจรณะ
+ธรรมจรรยา
+ธรรมจริยา
+ธรรมจัà¸à¸£
+ธรรมจัà¸à¸©à¸¸
+ธรรมจาคะ
+ธรรมจารี
+ธรรมจินดา
+ธรรมเจดีย์
+ธรรมชาติ
+ธรรมà¸à¸´à¸•à¸´
+ธรรมดา
+ธรรมทรรศนะ
+ธรรมธาดา
+ธรรมธาตุ
+ธรรมนาถ
+ธรรมนิตย์
+ธรรมนิยม
+ธรรมนิยาม
+ธรรมนิเวศ
+ธรรมนูà¸
+ธรรมนูà¸à¸à¸²à¸£à¸›à¸à¸„รองราชอาณาจัà¸à¸£
+ธรรมเนียม
+ธรรมเนียมประเพณี
+ธรรมบท
+ธรรมบาล
+ธรรมบิà¸
+ธรรมปà¸à¸´à¸£à¸¹à¸›
+ธรรมปà¸à¸´à¸ªà¸±à¸¡à¸ à¸´à¸—า
+ธรรมประติรูป
+ธรรมยุต
+ธรรมยุทธ์
+ธรรมรัตน์
+ธรรมราชา
+ธรรมวัตร
+ธรรมศาสตร์
+ธรรมสถิติ
+ธรรมสภา
+ธรรมสรีระ
+ธรรมสังคีติ
+ธรรมสังเวช
+ธรรมสาà¸à¸±à¸ˆà¸‰à¸²
+ธรรมสามิสร
+ธรรมสามี
+ธรรมสาร
+ธรรมะ
+ธรรมะธัมโม
+ธรรมันเตวาสิà¸
+ธรรมาทิตย์
+ธรรมาธรรม
+ธรรมาธิปไตย
+ธรรมาธิษà¸à¸²à¸™
+ธรรมานุธรรมปà¸à¸´à¸šà¸±à¸•à¸´
+ธรรมานุสาร
+ธรรมาภิมุข
+ธรรมาภิสมัย
+ธรรมายตนะ
+ธรรมารมณ์
+ธรรมาสน์
+ธรรมิà¸
+ธรรมิà¸-
+ธรา
+ธราดล
+ธราธร
+ธราธาร
+ธราธิบดี
+ธราธิป
+ธริษตรี
+ธเรศ
+ธเรษตรี
+ธเรษตรีศวร
+ธวัช
+ธังà¸
+ธัช
+ธัà¸
+ธัà¸-
+ธัà¸à¹‚à¸à¸¨
+ธัà¸à¹€à¸‚ต
+ธัà¸à¸Šà¸²à¸•à¸´
+ธัà¸à¸à¸²à¸«à¸²à¸£
+ธัà¸à¸”ัจ
+ธัà¸à¹€à¸šà¸à¸ˆà¸
+ธัà¸à¸žà¸·à¸Š
+ธัà¸à¸¡à¸²à¸ª
+ธันยา
+ธันยาวาท
+ธันวาคม
+ธัมมะ
+ธาดา
+ธาตรี
+ธาตวาà¸à¸£
+ธาตุ
+ธาตุ-
+ธาตุโขภ
+ธาตุครรภ
+ธาตุเจดีย์
+ธาตุเบา
+ธาตุมมิสสา
+ธาตุสถูป
+ธาตุหนัà¸
+ธานิน
+ธานินทร์
+ธานี
+ธาร
+ธารà¸à¸³à¸™à¸±à¸¥
+ธารคำนัล
+ธารณ
+ธารณะ
+ธารณา
+ธารณามัย
+ธารพระà¸à¸£
+ธารยัà¸à¸©à¹Œ
+ธารา
+ธาราเคหะ
+ธาราธิคุณ
+ธารายนต์
+ธาษตรี
+ธำมรงค์
+ธำรง
+ธิดา
+ธิติ
+ธีร-
+ธีรภาพ
+ธีรราช
+ธุช
+ธุดงค-
+ธุดงค์
+ธุดงควัตร
+ธุดงคสมาทาน
+ธุต
+ธุตตะ
+ธุม-
+ธุมเà¸à¸•à¸¸
+ธุมชาล
+ธุมเพลิง
+ธุมา
+ธุร-
+ธุรà¸à¸²à¸£
+ธุรà¸à¸´à¸ˆ
+ธุระ
+ธุรำ
+ธุลี
+ธุว-
+ธุวดารา
+ธุวภาค
+ธุวมณฑล
+ธุวยัษฎี
+ธูป
+ธูป-
+ธูปบาตร
+ธูปà¹à¸žà¹€à¸—ียนà¹à¸ž
+ธูปไม้ระà¸à¸³
+ธูปฤๅษี
+เธนุ
+เธอ
+เธียร
+โธ่
+โธวน
+น
+นà¸
+นà¸à¸à¸£à¸°à¸ˆà¸­à¸
+นà¸à¸à¸£à¸°à¸ˆà¸­à¸à¸—อง
+นà¸à¸à¸£à¸°à¸—ุง
+นà¸à¸à¸°à¸›à¸¹à¸”
+นà¸à¸à¸²à¸‡à¸›à¸µà¸
+นà¸à¹€à¸‚า
+นà¸à¸„ุ่ม
+นà¸à¸ˆà¸²à¸
+นà¸à¸•à¹ˆà¸­
+นà¸à¸¢à¸¹à¸‡
+นà¸à¸£à¸¹à¹‰
+นà¸à¸ªà¸­à¸‡à¸«à¸±à¸§
+นà¸à¸«à¸
+นà¸à¸«à¸§à¸µà¸”
+นà¸à¸­à¸¢à¸¹à¹ˆà¹ƒà¸™à¸›à¸¥à¹ˆà¸­à¸‡
+นà¸à¸¸à¸¥
+นข
+นข-
+นขทารณ์
+นขลิขิต
+นขเลขา
+นขา
+นค
+นคร
+นคร-
+นครบาล
+นครบาลจังหวัด
+นครรัà¸
+นครวาสี
+นครโสภิณี
+นครโสเภณี
+นคราทร
+นครินทร์
+นคเรศ
+นคินทร
+นคินทร์
+นเคนทร์
+นเคศวร
+นโคทร
+นง
+นงคราà¸
+นงคุà¸
+นงนุช
+นงพะงา
+นงพาล
+นงพุธ
+นงโพธ
+นงเยาว์
+นงราม
+นงลัà¸à¸©à¸“์
+นท
+นที
+นทีรัย
+นนตรา
+นนท์
+นนทรี
+นนทลี
+นนทิ
+นบ
+นบนอบ
+นปุงสà¸à¸¥à¸´à¸‡à¸„์
+นปุงสà¸à¸¥à¸¶à¸‡à¸„์
+นพ
+นพ-
+นพà¸à¸°
+นพเà¸à¹‰à¸²
+นพคุณ
+นพเคราะห์
+นพนิต
+นพปฎล
+นพพล
+นพพวง
+นพพัน
+นพรัตน์
+นพศà¸
+นพศูล
+นภ-
+นภจร
+นภดล
+นภมณฑล
+นภวิถี
+นภศูล
+นภสินธุ์
+นภา
+นภาลัย
+นม
+นมà¸à¸£à¸°à¹à¸Šà¸‡
+นมข้น
+นมควาย
+นมชะนี
+นมช้าง
+นมตาบอด
+นมตาสะà¹à¸
+นมตำเรีย
+นมตำเลีย
+นมนาง
+นมนาน
+นมบà¸à¸­à¸à¸žà¸£à¹ˆà¸­à¸‡
+นมบอด
+นมผง
+นมผา
+นมพวง
+นมพิจิตร
+นมà¹à¸¡à¸§
+นมไม้
+นมวัว
+นมสวรรค์
+นมสาว
+นมหนู
+นมะ
+นมัà¸à¸à¸²à¸£
+นมัสà¸à¸²à¸£
+นมาซ
+นย-
+นยนะ
+นยนา
+นยะ
+นยัà¸à¸©à¹Œ
+นโยบาย
+นร-
+นรà¸
+นรà¸à¸²à¸™à¸•à¹Œ
+นรà¸à¸²à¸£
+นรเทพ
+นรนาถ
+นรนายà¸
+นรบดี
+นรบาล
+นรพยัคฆ์
+นรราช
+นรเศรษà¸à¹Œ
+นรสิงห์
+นรสีห์
+นรา
+นราธิป
+นรินทร์
+นริศ
+นริศร
+นริศวร
+นรี
+นรีเวชวิทยา
+นเรนทรสูร
+นเรศ
+นเรศวร
+นเรศวร์ชนช้าง
+นเรศูร
+นโรดม
+นฤ-
+นฤคหิต
+นฤโฆษ
+นฤดม
+นฤตย-
+นฤตย์
+นฤตยศาลา
+นฤตยศาสตร์
+นฤตยสถาน
+นฤเทพ
+นฤนาท
+นฤบดี
+นฤบาล
+นฤเบศ
+นฤป
+นฤปนีติ
+นฤปเวศม์
+นฤปัตนี
+นฤพาน
+นฤมล
+นฤมาณ
+นฤมิต
+นลาà¸
+นลิน
+นลินี
+นว-
+นวà¸-
+นวà¸à¸ à¸¹à¸¡à¸´
+นวà¸à¸£à¸£à¸¡
+นวà¸à¸£à¸£à¸¡à¸´à¸
+นวà¸à¸°
+นวà¸à¸²à¸£
+นวà¸à¸´à¸ˆ
+นวโà¸à¸§à¸²à¸—
+นวครหะ
+นวคุณ
+นวเคราะห์
+นวชาต
+นวด
+นวดข้าว
+นวดà¹à¸›à¹‰à¸‡
+นวดฟั้น
+นวทวาร
+นวนิต
+นวนิยาย
+นวปฎล
+นวพธู
+นวม
+น่วม
+นวมี
+นวมุข
+นวย
+นวยนาด
+นวรัตน์
+นวล
+นวลจันทร์
+นวลจันทร์ทะเล
+นวลน้อย
+นวลระหง
+นวลลออ
+นวลละออง
+นวลหง
+นวโลหะ
+นววิธ
+นวอรหาทิคุณ
+นวังคสัตถุศาสน์
+นวารหาทิคุณ
+นวาระ
+นหาดà¸
+นหาน
+นหารุ
+นหุต
+นฬ
+นฬ-
+นฬà¸à¸²à¸£
+นฬป
+นอ
+นอà¸
+นอà¸à¸à¸Žà¸«à¸¡à¸²à¸¢
+นอà¸à¸„รู
+นอà¸à¸„อà¸
+นอà¸à¸ˆà¸²à¸
+นอà¸à¹ƒà¸ˆ
+นอà¸à¸Šà¸²à¸™
+นอà¸à¸•à¸³à¸£à¸²
+นอà¸à¸–นน
+นอà¸à¸šà¸²à¸¥à¸µ
+นอà¸à¸£à¸µà¸•
+นอà¸à¸£à¸µà¸•à¸™à¸­à¸à¸£à¸­à¸¢
+นอà¸à¸¥à¸¹à¹ˆà¸™à¸­à¸à¸—าง
+นอà¸à¹€à¸«à¸™à¸·à¸­
+นอง
+น่อง
+น้อง
+น้องๆ
+นองเนือง
+น่องà¹à¸™à¹ˆà¸‡
+น้องเพล
+นองเลือด
+น่องสิงห์
+นองหน้า
+นอต
+นอน
+นอนà¸à¹‰à¸™
+นอนà¸à¸´à¸™
+นอนใจ
+นอนตาไม่หลับ
+นอนตีพุง
+นอนนà¸
+นอนà¹à¸šà¹‡à¸š
+นอนโรง
+นอนเล่น
+นอนวัน
+นอนเวร
+นอนหลับทับสิทธิ์
+นอนหลับไม่รู้ นอนคู้ไม่เห็น
+นอบ
+นอบนบ
+นอบน้อม
+น้อม
+น้อมเà¸à¸¥à¹‰à¸²à¸™à¹‰à¸­à¸¡à¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡à¸–วาย
+น้อมนำ
+น้อย
+น้อยà¹à¸‡à¹ˆ
+น้อยใจ
+น้อยเนื้อต่ำใจ
+น้อยหน่า
+น้อยหน้า
+น้อยหรือ
+น้อยโหน่ง
+นะ
+นะà¹à¸™à¹ˆà¸‡
+นัà¸
+นัà¸à¸à¸°
+นัà¸à¸à¸²à¸£
+นัà¸à¸à¸²à¸£à¹€à¸¡à¸·à¸­à¸‡
+นัà¸à¸à¸µà¸¬à¸²
+นัà¸à¸‚ัต
+นัà¸à¸‚ัต-
+นัà¸à¸‚ัตฤà¸à¸©à¹Œ
+นัà¸à¸‚่าว
+นัà¸à¸‡à¸²à¸™
+นัà¸à¸•à¸°
+นัà¸à¸—่องเที่ยว
+นัà¸à¹€à¸—ศ
+นัà¸à¹€à¸—ศน์
+นัà¸à¹‚ทษ
+นัà¸à¹‚ทษเด็ดขาด
+นัà¸à¹‚ทษพิเศษ
+นัà¸à¸˜à¸£à¸£à¸¡
+นัà¸à¸šà¸§à¸Š
+นัà¸à¸šà¸´à¸™
+นัà¸à¸šà¸¸à¸
+นัà¸à¸›à¸£à¸²à¸Šà¸à¹Œ
+นัà¸à¸žà¸£à¸•
+นัà¸à¸£
+นัà¸à¸£à¸š
+นัà¸à¹€à¸£à¸µà¸¢à¸™
+นัà¸à¹€à¸¥à¸‡
+นัà¸à¸¨à¸¶à¸à¸©à¸²
+นัà¸à¸©à¸±à¸•à¸£
+นัà¸à¸©à¸±à¸•à¸£-
+นัà¸à¸©à¸±à¸•à¸£à¸ˆà¸±à¸à¸£
+นัà¸à¸©à¸±à¸•à¸£à¹€à¸™à¸¡à¸µ
+นัà¸à¸©à¸±à¸•à¸£à¸šà¸”ี
+นัà¸à¸©à¸±à¸•à¸£à¸šà¸–
+นัà¸à¸©à¸±à¸•à¸£à¸›à¸²à¸à¸
+นัà¸à¸©à¸±à¸•à¸£à¸¡à¸“ฑล
+นัà¸à¸©à¸±à¸•à¸£à¸¡à¸²à¸¥à¸²
+นัà¸à¸©à¸±à¸•à¸£à¹‚ยค
+นัà¸à¸©à¸±à¸•à¸£à¸§à¸´à¸—ยา
+นัà¸à¸ªà¸™à¸¡
+นัà¸à¸ªà¸£à¸²à¸Š
+นัà¸à¸ªà¸§à¸”
+นัà¸à¸ªà¸´à¸—ธิ์
+นัà¸à¸ªà¸·à¸š
+นัà¸à¸«à¸™à¸²
+นัข
+นัค
+นัคคะ
+นั่ง
+นั่งà¸à¸´à¸™à¸™à¸­à¸™à¸à¸´à¸™
+นั่งขัดสมาธิ
+นังคัล
+นั่งคุà¸à¹€à¸‚่า
+นั่งซัง
+นั่งทาง
+นั่งทางใน
+นั่งเทียน
+นั่งในหัวใจ
+นั่งปรà¸
+นั่งโป่ง
+นั่งพับเพียบ
+นั่งเมือง
+นั่งยองๆ
+นั่งร้าน
+นั่งราว
+นั่งเล่น
+นั่งห้าง
+นัจ
+นัà¸
+นัà¸à¸
+นัฑ
+นัด
+นัดดา
+นัดà¹à¸™à¸°
+นัดหมาย
+นัตถุ์
+นั่น
+นั้น
+นั่นซี
+นันท-
+นันททายี
+นันทน์
+นันทนาà¸à¸²à¸£
+นันทปัà¸à¸©à¸µ
+นันทิ
+นั่นà¹à¸™à¹ˆ
+นั่นปะไร
+นั้นà¹à¸¥
+นั่นà¹à¸«à¸¥à¸°
+นั่นเอง
+นับ
+นับถือ
+นับประสา
+นับหน้าถือตา
+นัย
+นัยน์
+นัยน์ตา
+นัยน์เนตร
+นัยนา
+นัยนามพุ
+นัยว่า
+นัว
+นัวเนีย
+นา
+น่า
+น้า
+นาà¸
+นาà¸à¸šà¸¸à¸”
+นาà¸à¸ªà¸§à¸²à¸”
+นาà¸à¸²à¸ªà¸²à¸«à¸£à¸µ
+น่าเà¸à¸¥à¸µà¸¢à¸”น่าชัง
+นาขอบเหล็à¸
+นาค
+นาค-
+นาคเà¸à¸µà¹ˆà¸¢à¸§
+นาคเà¸à¸µà¹‰à¸¢à¸§
+นาคเà¸à¸µà¹‰à¸¢à¸§à¸à¸£à¸°à¸«à¸§à¸±à¸”
+นาคเà¸à¸µà¹ˆà¸¢à¸§à¸žà¸£à¸°à¸ªà¸¸à¹€à¸¡à¸£à¸¸
+นาคทนต์
+นาคบริพันธ์
+นาคบาศ
+นาคปรà¸
+นาคปัà¸
+นาคพันธ์
+นาคร
+นาครวย
+นาคราช
+นาคราชà¹à¸œà¸¥à¸‡à¸¤à¸—ธิ์
+นาคลดา
+นาคเล่นน้ำ
+นาควิถี
+นาคสะดุ้ง
+นาคสังวัจฉร
+นาคา
+นาคาวโลà¸
+นาคินทร์
+นาคี
+นาคู่โค
+นาเคนทร์
+นาเคศ
+นาเคศวร
+นาโครคินทร
+นาง
+นางà¸à¸£à¸²à¸¢
+นางà¸à¸§à¸±à¸
+นางเà¸à¸¥à¹‡à¸”
+นางงาม
+นางจรัล
+นางจุม
+นางชม
+นางดำ
+นางท้าว
+นางนวล
+นางนูน
+นางà¹à¸™à¸š
+นางใน
+นางบำเรอ
+นางพà¸à¸²
+นางพระà¸à¸³à¸™à¸±à¸¥
+นางฟ้า
+นางเมือง
+นางไม้
+นางà¹à¸¢à¹‰à¸¡
+นางรม
+นางรมใหà¸à¹ˆ
+นางรอง
+นางร้องไห้
+นางรำ
+นางเรียง
+นางล้อม
+นางเล็ด
+นางเลิ้ง
+นางสนองพระโอษà¸à¹Œ
+นางสาว
+นางหงส์
+นางห้าม
+นางอ้อม
+นางอาย
+นางเอà¸
+นางà¹à¸­à¹ˆà¸™
+นาเชิงทรง
+นาà¸
+นาà¸-
+นาà¸à¸
+นาà¸à¸à¸£à¸£à¸¡
+นาà¸à¸”นตรี
+นาà¸à¸¢-
+นาà¸à¸¨à¸´à¸¥à¸›à¹Œ
+นาด
+นาดำ
+นาถ
+นาท
+นาที
+นาน
+น่าน
+นานนม
+น่านน้ำ
+น่านน้ำอาณาเขต
+น่านฟ้า
+นานสองนาน
+นานà¹à¸ªà¸™à¸™à¸²à¸™
+นานัครส
+นานัตว
+นานัปà¸à¸²à¸£
+นานา
+นานาเนà¸
+นานาประà¸à¸²à¸£
+นาเนà¸
+นาบ
+นาบข้าว
+นาปรัง
+นาปี
+นาฟางลอย
+นาภิ
+นาภี
+นาม
+นาม-
+นามà¸à¸£
+นามธรรม
+นามไธย
+นามบัตร
+นามปาà¸à¸à¸²
+นามà¹à¸à¸‡
+นามสà¸à¸¸à¸¥
+นามสงเคราะห์
+นามสมà¸à¸²
+นามานุà¸à¸£à¸¡
+นามานุศาสตร์
+นามาภิไธย
+นาเมือง
+นาย
+น่าย
+นายà¸
+นายà¸à¹€à¸—ศมนตรี
+นายà¸à¸£à¸±à¸à¸¡à¸™à¸•à¸£à¸µ
+นายงาน
+นายเงิน
+นายจ้าง
+นายตรวจ
+นายท่า
+นายท้าย
+นายทุน
+นายธง
+นายประà¸à¸±à¸™
+นายประเพณี
+นายโรง
+นายว่าขี้ข้าพลอย
+นายเวร
+นายหน้า
+นายอาà¸à¸£
+นายอำเภอ
+นายิà¸à¸²
+นารา
+นารายณ์
+นารายณ์ทรงเครื่อง
+นารายณ์ประลองศิลป์
+นารายณ์หัตถ์
+นารี
+นารีบูร
+นารีผล
+นารีสูร
+นาเรศ
+นาลิวัน
+นาลี
+นาว
+น้าว
+นาวา
+นาวิà¸
+นาวิà¸-
+นาวิà¸à¹‚ยธิน
+นาวิน
+นาวี
+นาเวศ
+นาศ
+นาสวน
+นาสา
+นาสิà¸
+นาหว่าน
+นาฬิà¸à¸²
+นาฬิà¸à¸²à¹à¸”ด
+นาฬิà¸à¸²à¸—ราย
+นาฬิà¸à¸²à¸™à¹‰à¸³
+นาฬิเà¸
+นาฬี
+นำ
+น้ำ
+น้ำà¸à¸£à¸”
+น้ำà¸à¸£à¸°à¸”้าง
+น้ำà¸à¸£à¸°à¸ªà¸²à¸¢
+น้ำà¸à¸°à¸—ิ
+น้ำà¸à¸²à¸¡
+น้ำเà¸à¸¥à¸·à¸­
+น้ำเà¸à¸´à¸”
+น้ำขาว
+น้ำข้าว
+น้ำขึ้น
+น้ำขึ้นให้รีบตัà¸
+น้ำขุ่นไว้ใน น้ำใสไว้นอà¸
+น้ำà¹à¸‚็ง
+น้ำà¹à¸‚็งà¹à¸«à¹‰à¸‡
+น้ำครำ
+น้ำคร่ำ
+น้ำคัน
+น้ำค้าง
+น้ำค้างà¹à¸‚็ง
+น้ำคาวปลา
+น้ำคำ
+น้ำเค็ม
+น้ำเคย
+น้ำเงิน
+น้ำจัณฑ์
+นำจับ
+น้ำจิ้ม
+น้ำใจ
+น้ำใจใคร่
+น้ำชน
+น้ำชุบ
+น้ำเชี่ยวอย่าขวางเรือ
+น้ำเชื้อ
+น้ำเชื่อม
+น้ำซับ
+น้ำซาวข้าว
+น้ำซึม
+น้ำซึมบ่อทราย
+น้ำดอà¸à¹„ม้
+น้ำดอà¸à¹„ม้เทศ
+น้ำดอà¸à¹„ม้สด
+น้ำดับไฟ
+น้ำดิบ
+น้ำดี
+น้ำตà¸
+น้ำต้อย
+น้ำตะà¸à¸¹
+น้ำตะโà¸
+น้ำตะไคร้
+น้ำตับ
+น้ำตา
+น้ำตาเช็ดหัวเข่า
+น้ำตาตà¸à¹ƒà¸™
+น้ำตาเทียน
+น้ำตาย
+น้ำตาล
+น้ำตาลใà¸à¸¥à¹‰à¸¡à¸” ใครจะอดได้
+น้ำตาลจีน
+น้ำเต้า
+น้ำใต้ดิน
+น้ำทรง
+น้ำท่วมทุ่ง ผัà¸à¸šà¸¸à¹‰à¸‡à¹‚หรงเหรง
+น้ำท่วมปาà¸
+น้ำท่า
+นำทาง
+น้ำทูนหัว
+นำเที่ยว
+น้ำไทย
+น้ำนม
+น้ำนมà¹à¸¡à¸§
+น้ำนมราชสีห์
+น้ำนวล
+น้ำนอง
+น้ำนอนคลอง
+น้ำน้อยà¹à¸žà¹‰à¹„ฟ
+น้ำนิ่งไหลลึà¸
+น้ำบ่อน้อย
+น้ำโบย
+น้ำประสานทอง
+น้ำปลา
+น้ำป่า
+น้ำผลึà¸
+น้ำผึ้ง
+น้ำพระพิพัฒน์สัตยา
+น้ำพริà¸
+น้ำพริà¸à¹€à¸œà¸²
+น้ำพัà¸à¸™à¹‰à¸³à¹à¸£à¸‡
+นำพา
+น้ำพึ่งเรือเสือพึ่งป่า
+น้ำพุ
+น้ำมนต์
+น้ำมนตร์
+น้ำมัน
+น้ำมันà¸à¹Šà¸²à¸”
+น้ำมันเขียว
+น้ำมันเครื่อง
+น้ำมันจันทน์
+น้ำมันโซลา
+น้ำมันดิน
+น้ำมันดิบ
+น้ำมันดีเซล
+น้ำมันตานี
+น้ำมันเตา
+น้ำมันเบนซิน
+น้ำมันพราย
+น้ำมันมนตร์
+น้ำมันยาง
+น้ำมันระà¸à¸³
+น้ำมันสน
+น้ำมันสลัด
+น้ำมันหม่อง
+น้ำมันหล่อลื่น
+น้ำมาปลาà¸à¸´à¸™à¸¡à¸” น้ำลดมดà¸à¸´à¸™à¸›à¸¥à¸²
+น้ำมือ
+น้ำมูà¸
+น้ำเมา
+น้ำย่อย
+น้ำยา
+น้ำยาเคมี
+น้ำเย็นปลาตาย
+นำร่อง
+น้ำร้อนปลาเป็น
+น้ำรัà¸
+น้ำà¹à¸£à¹ˆ
+น้ำลง
+น้ำลดตอผุด
+น้ำละว้า
+น้ำลาย
+น้ำลายสอ
+น้ำลายหà¸
+น้ำลายไหล
+น้ำเลี้ยง
+น้ำวน
+น้ำว้า
+น้ำไว
+น้ำส้ม
+น้ำส้มสายชู
+นำสมัย
+น้ำสังข์
+น้ำสั่งฟ้า ปลาสั่งà¸à¸™
+นำสืบ
+น้ำสุà¸
+น้ำเสียง
+นำà¹à¸ªà¸”ง
+น้ำหนวà¸
+น้ำหนัà¸
+น้ำหน้า
+น้ำหนึ่ง
+น้ำหนึ่งใจเดียวà¸à¸±à¸™
+น้ำหมาà¸
+น้ำหอม
+น้ำเหลือง
+น้ำเหลืองน้ำตาล
+น้ำไหลไฟดับ
+น้ำอดน้ำทน
+น้ำอบ
+น้ำอบà¸à¸£à¸±à¹ˆà¸‡
+น้ำอ่อน
+น้ำอ้อย
+น้ำอัดลม
+น้ำอาบงัว
+นิ
+นิà¸à¹€à¸à¸´à¸¥
+นิà¸à¸‚ะ
+นิà¸à¸‚ันต์
+นิà¸à¸£
+นิà¸à¸£à¸­à¸¢à¸”์
+นิà¸à¸²à¸¢
+นิคม
+นิคมที่ดิน
+นิคมสร้างตนเอง
+นิคมสหà¸à¸£à¸“์
+นิคมอุตสาหà¸à¸£à¸£à¸¡
+นิครนถ์
+นิคห-
+นิคหà¸à¸£à¸£à¸¡
+นิคหะ
+นิคหิต
+นิคาลัย
+นิคาหà¸
+นิคาหà¸-
+นิเคราะห์
+นิโคติน
+นิโครธ
+นิโครม
+นิง
+นิ่ง
+นิ่งเงียบ
+นิ่งเฉย
+นิ่งà¹à¸™à¹ˆ
+นิจ
+นิจ-
+นิจศีล
+นิด
+นิดเดียว
+นิดหน่อย
+นิดหนึ่ง
+นิตย-
+นิตย์
+นิตยทาน
+นิตยภัต
+นิตยสาร
+นิติ
+นิติà¸à¸£
+นิติà¸à¸£à¸“์
+นิติà¸à¸£à¸£à¸¡
+นิติà¸à¸²à¸£
+นิติà¸à¸²à¸£à¸“์
+นิติธรรม
+นิตินัย
+นิติบัà¸à¸à¸±à¸•à¸´
+นิติบุคคล
+นิติภาวะ
+นิติวิทยาศาสตร์
+นิติเวชศาสตร์
+นิติศาสตร์
+นิติสมมติ
+นิติสัมพันธ์
+นิติเหตุ
+นิทร
+นิทรรศà¸à¸²à¸£
+นิทรา
+นิทรารมณ์
+นิทัศน์
+นิทาฆ
+นิทาน
+นิทานวจนะ
+นิเทศ
+นิเทศศาสตร์
+นิธาน
+นิธิ
+นินทา
+นินนะ
+นินนาท
+นินหุต
+นินาท
+นิบาต
+นิปริยาย
+นิปัจà¸à¸²à¸£
+นิพจน์
+นิพนธ์
+นิพพาน
+นิพพิทา
+นิพพิทาà¸à¸²à¸“
+นิพัทธ-
+นิพัทธ์
+นิพัทธà¸à¸¸à¸¨à¸¥
+นิพันธ์
+นิพิท
+นิเพท
+นิภา
+นิ่ม
+นิ้ม
+นิมนต์
+นิ่มนวล
+นิมมาน
+นิมมานรดี
+นิมิต
+นิยต
+นิยต-
+นิยม
+นิยมนิยาย
+นิยยาน
+นิยยานิà¸-
+นิยัตินิยม
+นิยาม
+นิยาย
+นิยุต
+นิร
+นิรคุณ
+นิรโฆษ
+นิรชร
+นิรชรา
+นิรทุà¸à¸‚์
+นิรเทศ
+นิรโทษ
+นิรโทษà¸à¸£à¸£à¸¡
+นิรนัย
+นิรนาม
+นิรพัตร
+นิรภัย
+นิรมล
+นิรมาณ
+นิรมาณà¸à¸²à¸¢
+นิรมาน
+นิรมิต
+นิรย-
+นิรยบาล
+นิรัติศัย
+นิรันดร
+นิรันตร-
+นิรันตราย
+นิรัพพุท
+นิรา
+นิราพาธ
+นิรามัย
+นิรามิษ
+นิราลัย
+นิราศ
+นิราศรพ
+นิราศรัย
+นิรินธน์
+นิรินธนพินาศ
+นิรุà¸à¸•à¸´
+นิรุà¸à¸•à¸´à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+นิรุตติ
+นิรุตติปà¸à¸´à¸ªà¸±à¸¡à¸ à¸´à¸—า
+นิรุทà¸
+นิรุทธ์
+นิโรช
+นิโรธ
+นิโรธ-
+นิโรธสมาบัติ
+นิล
+นิล-
+นิลบัตร
+นิลปัทม์
+นิลรัตน์
+นิลุบล
+นิโลตบล
+นิโลบล
+นิ่ว
+นิ้ว
+นิวคลิอิà¸
+นิวเคลียร์
+นิวเคลียส
+นิวตรอน
+นิวรณ์
+นิ้วไหนร้ายà¸à¹‡à¸•à¸±à¸”นิ้วนั้น
+นิวัต
+นิวัตน์
+นิวาต
+นิวาส
+นิเวศ
+นิเวศ-
+นิเวศน์
+นิเวศวิทยา
+นิศา
+นิศาà¸à¸£
+นิศาà¸à¸²à¸¥
+นิศาคม
+นิศาชล
+นิศาทิ
+นิศานาถ
+นิศาบดี
+นิศามณี
+นิศารัตน์
+นิษà¸à¸£à¸¡
+นิษาท
+นิสภ-
+นิสัช
+นิสัชชาà¸à¸²à¸£
+นิสัย
+นิสัยใจคอ
+นิสาท
+นิสิต
+นิสีทน-
+นิสีทนะ
+นิสีทนาà¸à¸²à¸£
+นิเสธ
+นี่
+นี้
+นีติ
+นีติธรรม
+นีติศาสตร์
+นี่นัน
+นี่à¹à¸™à¹ˆà¸°
+นีร-
+นีรจร
+นีรช
+นีรนาท
+นี่à¹à¸«à¸¥à¸°
+นีออน
+นี่เอง
+นีโอดิเมียม
+นึà¸
+นึà¸à¸„ิด
+นึà¸à¸”ู
+นึà¸à¸–ึง
+นึà¸à¹€à¸«à¹‡à¸™
+นึà¸à¸­à¸­à¸
+นึ่ง
+นึ่งหม้อเà¸à¸¥à¸·à¸­
+นุ
+นุง
+นุ่ง
+นุ่งà¸à¸£à¸°à¹‚จมอà¸
+นุ่งเจียมห่มเจียม
+นุงถุง
+นุงนัง
+นุ่งห่ม
+นุช
+นุด
+นุต
+นุ่น
+นุ่ม
+นุ่มนวล
+นุ่มนิ่ม
+นุ่มเนื้อ
+นุ้ย
+นูน
+นู่น
+นู้น
+เนà¸à¸‚ะ
+เนà¸à¸‚ัม
+เน่ง
+เนตบอล
+เนตร
+เนติ
+เนติบัณฑิต
+เน้น
+เนบิวลา
+เนปจูน
+เนปทูเนียม
+เนมิ
+เนมิตà¸-
+เนมิตà¸à¸™à¸²à¸¡
+เนมิตà¸à¸°
+เนย
+เนยเทียม
+เนยใส
+เนรà¸à¸±à¸“à¸à¸µ
+เนรคุณ
+เนรเทศ
+เนรนาด
+เนรนาถ
+เนรมิต
+เนระพูสี
+เนษาท
+เนอ
+เน้อ
+เนา
+เน่า
+เน่าไฟ
+เนาว-
+เนาวนิต
+เนาวรัตน์
+เนิน
+เนิ่น
+เนิ่นๆ
+เนิ่นนาน
+เนิบ
+เนิบๆ
+เนิบนาบ
+เนียง
+เนียน
+เนียม
+เนียร
+เนียรทุà¸à¸‚์
+เนียรเทศ
+เนียรนาท
+เนื้อ
+เนื้อà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ
+เนื้อความ
+เนื้อคู่
+เนื้อเค็ม
+เนือง
+เนืองๆ
+เนื่อง
+เนื่องจาà¸
+เนื่องด้วย
+เนื่องà¹à¸•à¹ˆ
+เนืองนอง
+เนืองนิตย์
+เนืองà¹à¸™à¹ˆà¸™
+เนื้องอà¸
+เนื้อตัว
+เนื้อตาย
+เนื้อเต่ายำเต่า
+เนื้อถ้อยà¸à¸£à¸°à¸—งความ
+เนื้อทราย
+เนื้อที่
+เนื้อà¹à¸—้
+เนื้อเปื่อย
+เนื้อเพลง
+เนื้อไม้
+เนือย
+เนือยๆ
+เนื้อเยื่อ
+เนื้อเยื่อà¸à¸¥à¹‰à¸²à¸¡à¹€à¸™à¸·à¹‰à¸­
+เนื้อเยื่อบุผิว
+เนื้อเยื่อประสาท
+เนื้อเยื่อยึดต่อ
+เนื้อร้อง
+เนื้อร้าย
+เนื้อเรื่อง
+เนื้อสมัน
+เนื้อหา
+เนื้ออ่อน
+à¹à¸™à¹ˆ
+à¹à¸™à¹ˆà¸‡
+à¹à¸™à¹ˆà¸‡à¸™à¹‰à¸­à¸¢
+à¹à¸™à¹ˆà¹ƒà¸ˆ
+à¹à¸™à¹ˆà¸Šà¸±à¸”
+à¹à¸™à¹ˆà¹à¸—้
+à¹à¸™à¹ˆà¸™
+à¹à¸™à¹ˆà¸™à¸‚นัด
+à¹à¸™à¹ˆà¸™à¸—้อง
+à¹à¸™à¹ˆà¸™à¸™à¸±à¸™à¸•à¹Œ
+à¹à¸™à¹ˆà¸™à¹à¸Ÿà¹‰à¸™
+à¹à¸™à¹ˆà¸™à¸«à¸™à¸²
+à¹à¸™à¹ˆà¸™à¸«à¸™à¹‰à¸²à¸­à¸
+à¹à¸™à¹ˆà¸™à¸­à¸™
+à¹à¸™à¹ˆà¸™à¸´à¹ˆà¸‡
+à¹à¸™à¹ˆà¹à¸™à¹ˆà¸§
+à¹à¸™à¸š
+à¹à¸™à¸šà¹€à¸™à¸µà¸¢à¸™
+à¹à¸™à¸šà¹à¸™à¹ˆà¸™
+à¹à¸™à¸¡
+à¹à¸™à¸§
+à¹à¸™à¹ˆà¸§
+à¹à¸™à¸§à¸—าง
+à¹à¸™à¸§à¸—ี่ห้า
+à¹à¸™à¹ˆà¸§à¹à¸™à¹ˆ
+à¹à¸™à¸§à¹‚น้ม
+à¹à¸™à¸§à¸›à¹ˆà¸²
+à¹à¸™à¸§à¸£à¸š
+à¹à¸™à¸§à¸£à¹ˆà¸§à¸¡
+à¹à¸™à¸§à¹€à¸£à¸·à¸­
+à¹à¸™à¸§à¸«à¸™à¹‰à¸²
+à¹à¸™à¸§à¸«à¸¥à¸±à¸‡
+à¹à¸™à¸°
+à¹à¸™à¹ˆà¸°
+à¹à¸™à¸°à¸™à¸±à¸”
+à¹à¸™à¸°à¸™à¸³
+à¹à¸™à¸°à¹à¸™à¸§
+à¹à¸™à¸°à¹à¸«à¸™
+โน
+โน้ต
+โน้ตเพลง
+โนน
+โน่น
+โน้น
+โนเน
+โนเบเลียม
+โน้ม
+โน้มน้าว
+โนมพรรณ
+โนรา
+โนรี
+ใน
+ในà¸à¸£à¸¡
+ในไส้
+ในหลวง
+ไน
+ไนต์คลับ
+ไนโตรเจน
+ไนลอน
+ไนโอเบียม
+บ
+บ่
+บà¸
+บà¸à¸žà¸£à¹ˆà¸­à¸‡
+บง
+บ่ง
+บงà¸-
+บงà¸à¹Œ
+บงà¸à¸Š
+บงà¸à¸Šà¸à¸£
+บงà¸à¸²à¸£
+บ๊งเบ๊ง
+บงสุ-
+บงสุ์
+บงสุà¸à¸¸à¸¥
+บงสุà¸à¸¹à¸¥à¸´à¸
+บงอับบงรา
+บ่งอับบ่งรา
+บà¸
+บด
+บดขยี้
+บดบัง
+บดเอื้อง
+บดินทร์
+บดี
+บดีธรรม
+บดีพรต
+บดีวรดา
+บดีศร
+บถ
+บท
+บท-
+บทà¸à¸¥à¸­à¸™
+บทà¸à¸§à¸µà¸™à¸´à¸žà¸™à¸˜à¹Œ
+บทà¸à¸³à¸«à¸™à¸”โทษ
+บทความ
+บทคัดย่อ
+บทจร
+บทเจรจา
+บทเฉพาะà¸à¸²à¸¥
+บทดอà¸à¸ªà¸£à¹‰à¸­à¸¢
+บทนำ
+บทบงà¸à¸Š
+บทบงสุ์
+บทบรรณาธิà¸à¸²à¸£
+บทบัà¸à¸à¸±à¸•à¸´
+บทบาท
+บทบาทมาà¸
+บทบูรณ์
+บทประพันธ์
+บทพาà¸à¸¢à¹Œ
+บทเพลง
+บทภาชน์
+บทภาชนีย์
+บทมาลย์
+บทร้อง
+บทรัช
+บทเรศ
+บทเรียน
+บทวเรศ
+บทวลัà¸à¸Šà¹Œ
+บทวาร
+บทศรี
+บทสนทนา
+บทสังขยา
+บทามพุช
+บโทน
+บน
+บ่น
+บนข้าวผี ตีข้าวพระ
+บ่นถึง
+บนบาน
+บนบานศาลà¸à¸¥à¹ˆà¸²à¸§
+บพิตร
+บพิตรพระราชสมภาร
+บพิธ
+บ่ม
+บ่มผิว
+บ่มมัน
+บ่มหนอง
+บมิ
+บร-
+บรทาร
+บรทารà¸à¸£à¸£à¸¡
+บรม
+บรม-
+บรมธาตุ
+บรมบพิตร
+บรมวงศานุวงศ์
+บรมอัà¸à¸´
+บรมัตถ์
+บรรà¸à¸§à¸”
+บรรจง
+บรรจถรณ์
+บรรจบ
+บรรจวบ
+บรรจุ
+บรรเจิด
+บรรณ
+บรรณ-
+บรรณà¸à¸¸à¸Žà¸µ
+บรรณพิภพ
+บรรณโลà¸
+บรรณศาลา
+บรรณสาร
+บรรณาà¸à¸²à¸£
+บรรณาคม
+บรรณาธิà¸à¸£
+บรรณาธิà¸à¸²à¸£
+บรรณานุà¸à¸£à¸¡
+บรรณารัà¸à¸©à¹Œ
+บรรณารัà¸à¸©à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+บรรดา
+บรรดาà¸
+บรรดามี
+บรรดาศัà¸à¸”ิ์
+บรรตานึà¸
+บรรถร
+บรรทม
+บรรทัด
+บรรทัดà¸à¸²à¸™
+บรรทับ
+บรรทาน
+บรรทุà¸
+บรรเทา
+บรรเทือง
+บรรพ
+บรรพ-
+บรรพ์
+บรรพชา
+บรรพชิต
+บรรพต
+บรรพต-
+บรรพตà¸à¸µà¸¥à¸²
+บรรพตชาล
+บรรพตธาตุ
+บรรพตมาลา
+บรรพตราช
+บรรพตวาสี
+บรรพตศิขร
+บรรพบุรุษ
+บรรพภาค
+บรรพเภท
+บรรพมูล
+บรรพสตรี
+บรรยง
+บรรยงà¸à¹Œ
+บรรยเวà¸à¸©à¸à¹Œ
+บรรยาà¸à¸²à¸¨
+บรรยาย
+บรรลัย
+บรรลัยà¸à¸±à¸¥à¸›à¹Œ
+บรรลัยจัà¸à¸£
+บรรลาย
+บรรลุ
+บรรลุนิติภาวะ
+บรรเลง
+บรรโลม
+บรรษัท
+บรรสบ
+บรรสพ
+บรรสม
+บรรสาน
+บรรสาร
+บรรหาน
+บรรหาร
+บรอนซ์
+บรัด
+บรั่นดี
+บรัศว์
+บราà¸à¸£à¸¡
+บราง
+บราทุà¸à¸£à¸²
+บราลี
+บริà¸à¸£à¸¡
+บริà¸à¸£à¸£à¸¡
+บริà¸à¸±à¸›
+บริà¸à¸²à¸£
+บริขา
+บริขาร
+บริขารโจล
+บริคณห์
+บริคณห์สนธิ
+บริจาค
+บริจารà¸
+บริจาริà¸à¸²
+บริเฉท
+บริเฉท-
+บริเฉทà¸à¸²à¸¥
+บริชน
+บริณายà¸
+บริณายà¸à¸£à¸±à¸•à¸™à¹Œ
+บริดจ์
+บริบท
+บริบวรณ์
+บริบาล
+บริบูรณ์
+บริพนธ์
+บริพัตร
+บริพันธ์
+บริพาชà¸
+บริพาชิà¸à¸²
+บริพาชี
+บริพาร
+บริภัณฑ์
+บริภาษ
+บริโภค
+บริโภคเจดีย์
+บริมาส
+บริยาย
+บริรม
+บริรัà¸à¸©à¹Œ
+บริราช
+บริวรรต
+บริวาร
+บริวาส
+บริเวณ
+บริษà¸à¸²à¸£
+บริษัท
+บริษัทเครดิตฟองซิเอร์
+บริษัทจำà¸à¸±à¸”
+บริษัทบริวาร
+บริษัทมหาชนจำà¸à¸±à¸”
+บริสชน
+บริสุทธิ์
+บริสุทธิ์ใจ
+บริหาร
+บริหาส
+บà¹à¸£à¸‡
+บà¹à¸£à¸‡à¸ à¸±à¸à¸©à¹Œ
+บฤงคพ
+บล็อà¸
+บวà¸
+บวง
+บ่วง
+บ่วงบาศ
+บวงสรวง
+บวช
+บวชชี
+บวน
+บ้วน
+บ้วนปาà¸
+บ้วนพระโอษà¸à¹Œ
+บวบ
+บวบขม
+บวม
+บวมน้ำ
+บ๊วย
+บวร
+บวร-
+บวรโตฎà¸
+บหลิ่ม
+บอ
+บ่อ
+บอà¸
+บอà¸à¸à¸¥à¹ˆà¸²à¸§
+บอà¸à¹à¸‚à¸
+บอà¸à¸„ำบอà¸
+บอà¸à¸šà¸—
+บอà¸à¸šà¸±à¸à¸Šà¸µ
+บอà¸à¸šà¸¸à¸
+บอà¸à¹ƒà¸šà¹‰
+บอà¸à¸›à¸±à¸”
+บอà¸à¹€à¸›à¸´à¸”
+บอà¸à¸¢à¸µà¹ˆà¸«à¹‰à¸­
+บอà¸à¹€à¸¥à¹ˆà¸²à¹€à¸à¹‰à¸²à¸ªà¸´à¸š
+บอà¸à¸§à¸±à¸•à¸£
+บอà¸à¸¨à¸²à¸¥à¸²
+บอà¸à¸«à¸™à¸—าง
+บอà¸à¸«à¸™à¸±à¸‡à¸ªà¸·à¸­à¸ªà¸±à¸‡à¸†à¸£à¸²à¸Š
+บ่อเà¸à¸´à¸”
+บอง
+บ่อง
+บ้อง
+บ๊อง
+บ๊องๆ
+บ้องà¸à¸±à¸à¸Šà¸²
+บ้องตะลา
+บ้องตัน
+บ้องตื้น
+บ้องà¹à¸šà¹Šà¸§
+บ้องไฟ
+บ้องยาà¹à¸”ง
+บองหลา
+บ้องหู
+บอด
+บอดสี
+บอน
+บ่อน
+บ่อนà¹à¸•à¸
+บ่อนทำลาย
+บอนลายà¸à¸£à¸°à¸«à¸™à¸
+บ่อน้ำร้อน
+บอบ
+บอบช้ำ
+บอบบาง
+บอบà¹à¸šà¸š
+บ้อม
+บ๋อม
+บ่อย
+บ่อยๆ
+บอระเพ็ด
+บอระมาน
+บอล
+บอลลูน
+บ้อหุ้น
+บเอ
+บ๊ะ
+บะหมี่
+บัà¸
+บัà¸à¹‚à¸à¸£à¸
+บัà¸à¸­à¸²à¸™
+บัคเตรี
+บัง
+บั้ง
+บังà¸à¸°à¹‚ล
+บังà¸à¸±à¸”
+บังเà¸à¸´à¸”
+บังโà¸à¸£à¸¢à¸•à¸±à¸§à¸œà¸¹à¹‰
+บังโà¸à¸£à¸¢à¸•à¸±à¸§à¹€à¸¡à¸µà¸¢
+บังโà¸à¸¥à¸™
+บังคน
+บังคนเบา
+บังคนหนัà¸
+บังคม
+บังคล
+บังควร
+บังความ
+บังคับ
+บังคับà¸à¸²à¸£
+บังคับครุ
+บังคับใจ
+บังคับโท
+บังคับบัà¸à¸Šà¸²
+บังคับลหุ
+บังคับสัมผัส
+บังคับเอà¸
+บังคัล
+บังโคลน
+บังเงา
+บังตะวัน
+บังตา
+บังà¹à¸—รà¸
+บังใบ
+บังเพลิง
+บังไพร
+บังฟัน
+บั้งไฟ
+บังมืด
+บังวาย
+บังเวียน
+บังสาด
+บังสุà¸à¸¸à¸¥
+บังสุà¸à¸¹à¸¥à¸´à¸
+บังสูรย์
+บังหน้า
+บังหวนควัน
+บังเหตุ
+บังเหิน
+บังเหียน
+บังอร
+บังอวจ
+บังอาจ
+บังอิง
+บังอูร
+บังเอิà¸
+บัà¸à¸ˆà¸
+บัà¸à¸ˆà¸£à¸‡à¸„์
+บัà¸à¸Šà¸£
+บัà¸à¸Šà¸²
+บัà¸à¸Šà¸²à¸à¸²à¸£
+บัà¸à¸Šà¸µ
+บัà¸à¸Šà¸µà¸à¸£à¸°à¹à¸ªà¸£à¸²à¸¢à¸§à¸±à¸™
+บัà¸à¸Šà¸µà¹€à¸”ินสะพัด
+บัà¸à¸à¸±à¸•à¸´
+บัà¸à¸à¸±à¸•à¸´à¹„ตรยางศ์
+บัà¸à¸«à¸²
+บัà¸
+บัà¸à¸¢à¸²à¸žà¸¤à¸•
+บัณฑร
+บัณฑร-
+บัณฑรนาค
+บัณฑิต
+บัณฑิตย์
+บัณฑุ
+บัณฑุà¸à¸±à¸¡à¸žà¸¥
+บัณฑุà¸à¸±à¸¡à¸žà¸¥à¸¨à¸´à¸¥à¸²à¸­à¸²à¸ªà¸™à¹Œ
+บัณฑุนาค
+บัณฑุโรค
+บัณฑูร
+บัณเฑาะà¸à¹Œ
+บัณเฑาะว์
+บัณณาส
+บัณรส
+บัณรสี
+บัด
+บัดà¸à¸£à¸µ
+บัดซบ
+บัดดล
+บัดเดี๋ยว
+บัดนั้น
+บัดนี้
+บัดบง
+บัดà¹à¸šà¹ˆà¸‡
+บัดà¹à¸¡à¸¥à¹ˆà¸‡
+บัดสี
+บัดสีบัดเถลิง
+บัตร
+บัตรเทวดา
+บัตรธนาคาร
+บัตรพลี
+บัตรสนเท่ห์
+บัตรหมาย
+บัทม์
+บัน
+บั่น
+บั้น
+บันà¸à¸§à¸”
+บันจวบ
+บันจอย
+บันดล
+บันดาล
+บันเดิน
+บันโดย
+บันได
+บันไดà¹à¸à¹‰à¸§
+บันไดลิง
+บันไดเลื่อน
+บันà¹à¸–ลง
+บั่นทอน
+บั้นท้าย
+บันทึà¸
+บันทึง
+บันเทิง
+บันเทิงคดี
+บันเบา
+บั้นปลาย
+บั้นพระองค์
+บันยะบันยัง
+บันลือ
+บั้นหลวง
+บันเหิน
+บั้นเอว
+บัปผาสะ
+บัพ
+บัพชา
+บัพชิต
+บัพพาช
+บัพพาชน์
+บัพพาชนียà¸à¸£à¸£à¸¡
+บัล
+บัลลพ
+บัลลังà¸à¹Œ
+บัลลูน
+บัลวะ
+บัว
+บัวà¸à¸¥à¸¸à¹ˆà¸¡
+บัวขาบ
+บัวคอเสื้อ
+บัวตะà¸à¸±à¹ˆà¸§
+บัวตูม
+บัวถลา
+บัวนาง
+บัวบà¸
+บัวบังใบ
+บัวบาท
+บัวผุด
+บัวไม่ช้ำ น้ำไม่ขุ่น
+บัวโรย
+บัวลอย
+บัวสวรรค์
+บัวสายติ่ง
+บัวสายทิ้ง
+บัวฮาดำ
+บา
+บ่า
+บ้า
+บ้าๆ
+บาà¸
+บาà¸à¸—่า
+บาà¸à¸šà¸±à¹ˆà¸™
+บาà¸à¸«à¸™à¹‰à¸²
+บาง
+บ่าง
+บ้าง
+บางขุนนนท์
+บ่างช่างยุ
+บางตา
+บางที
+บางเบา
+บางสุ
+บาจà¸
+บาจรีย์
+บาจิà¸à¸²
+บ้าจี้
+บาซิลลัส
+บาด
+บาดคอ
+บาดเจ็บ
+บาดใจ
+บาดตา
+บาดทะจิต
+บาดทะพิษ
+บาดทะยัà¸
+บาดà¹à¸œà¸¥
+บาดเสี้ยนบาดหนาม
+บาดหมาง
+บาดหมาย
+บาดหู
+บาดไหม
+บาดาล
+บ้าดีเดือด
+บาà¹à¸”ง
+บาต
+บาตร
+บาตรà¹à¸à¹‰à¸§
+บาตรใหà¸à¹ˆ
+บาท
+บาท-
+บาทนิเà¸à¸•
+บาทบ
+บาทบงà¸à¸Š
+บาทบงสุ์
+บาทบริจาริà¸à¸²
+บาทบูรณ์
+บาทภัà¸
+บาทภาค
+บาทมุทรา
+บาทมูล
+บาทมูลิà¸à¸²à¸à¸£
+บาทยุคล
+บาทรช
+บาทรัช
+บาทสà¸à¸¸à¸“ี
+บาทหลวง
+บาทาธึà¸
+บาทุà¸à¸²
+บาธรรม
+บาน
+บาน-
+บ้าน
+บานà¸à¸š
+บานเà¸à¸¥à¹‡à¸”
+บ้านเà¸à¸´à¸”เมืองนอน
+บ้านเคยอยู่ อู่เคยนอน
+บ้านจัดสรร
+บ้านช่อง
+บานชื่น
+บานเช้า
+บานตะเà¸à¸µà¸¢à¸‡
+บานตะโà¸à¹‰
+บานตะไท
+บ้านà¹à¸•à¸à¸ªà¸²à¹à¸«à¸£à¸à¸‚าด
+บานทะโรค
+บ้านนอà¸
+บ้านนอà¸à¸‚อà¸à¸™à¸²
+บานบาตร
+บานบุรี
+บานบุรีม่วง
+บานเบอะ
+บานเบิà¸
+บานเบียง
+บานà¹à¸šà¸°
+บานปลาย
+บานà¹à¸œà¸™à¸
+บานà¹à¸œà¸¥à¸°
+บ้านพัà¸
+บานพับ
+บานà¹à¸žà¸™à¸
+บานโภชน์
+บานมงคล
+บ้านเมือง
+บ้านเมืองมีขื่อมีà¹à¸›
+บานไม่รู้โรย
+บานเย็น
+บ้านรับรอง
+บ้านเรือน
+บ้าน้ำลาย
+บ่านี่
+บานียะ
+บานีโยทà¸
+บ้าบ่น
+บ้าบ๋า
+บ้าบิ่น
+บาบี
+บาป
+บาป-
+บาปà¸à¸£à¸£à¸¡
+บาปเคราะห์
+บาปมิตร
+บาปหนา
+บาพà¸
+บาย
+บ่าย
+บ้าย
+บ่ายควาย
+บ่ายเบี่ยง
+บายศรี
+บายศรีปาà¸à¸Šà¸²à¸¡
+บายสุหรี
+บ่ายหน้า
+บาร์
+บารนี
+บารมี
+บาร์เรล
+บาร์เลย์
+บารอมิเตอร์
+บ้าระบุ่น
+บ้าระห่ำ
+บ้าร่าท่า
+บาเรียน
+บาเรียม
+บาล
+บ้าลำโพง
+บาลี
+บ้าเลือด
+บ่าว
+บ่าวขุน
+บ่าวไพร่
+บาศ
+บาศà¸à¹Œ
+บาสเà¸à¸•à¸šà¸­à¸¥
+บ้าสมบัติ
+บ้าหมู
+บาหลี
+บ้าหว่า
+บ้าหอบฟาง
+บ้าห้าร้อยจำพวà¸
+บ๋ำ
+บำเทิง
+บำนาà¸
+บำบวง
+บำบัด
+บำโบ
+บำโบย
+บำโบล
+บำเพ็à¸
+บำราบ
+บำราศ
+บำรุง
+บำรุงขวัà¸
+บำรู
+บำเรอ
+บำเรอเชอภัà¸à¸”ิ์
+บำหยัด
+บำเหน็จ
+บิ
+บิà¸à¸¹
+บิà¸à¸¹à¸›à¸°à¸£à¸°à¸¡à¸²à¸«à¸™à¸²
+บิà¸à¸¹à¸›à¸°à¸£à¸°à¸«à¸¡à¸±à¹ˆà¸™à¸«à¸™à¸²
+บิà¸
+บิณฑ-
+บิณฑบาต
+บิด
+บิดขวา
+บิดขี้เà¸à¸µà¸¢à¸ˆ
+บิดจะà¸à¸¹à¸”
+บิดซ้าย
+บิดตะà¸à¸¹à¸”
+บิดเบี้ยว
+บิดเบือน
+บิดพลิ้ว
+บิดร
+บิดไส้
+บิดหล่า
+บิดหัวลูà¸
+บิดา
+บิตุ
+บิตุจฉา
+บิตุรงค์
+บิตุเรศ
+บิตุล
+บิตุลา
+บิตุลานี
+บิน
+บิ่น
+บินยา
+บิลเลียด
+บิวเรตต์
+บิศาจ
+บิสมัท
+บี้
+บีà¸à¸¹
+บีฑา
+บีตา
+บีบ
+บีบขนมจีน
+บีบขมับ
+บีบคั้น
+บีบน้ำตา
+บีบบังคับ
+บีบรัด
+บี้à¹à¸šà¸™
+บีเยศ
+บึà¸
+บึà¸à¸šà¸¶à¸™
+บึง
+บึ่ง
+บึ้ง
+บึ้งตึง
+บึงบาง
+บึ้งบูด
+บุ
+บุà¸
+บุà¸à¸šà¸±à¸™
+บุà¸à¸šà¸±à¹ˆà¸™
+บุà¸à¹€à¸šà¸´à¸
+บุà¸à¸›à¹ˆà¸²à¸à¹ˆà¸²à¸”ง
+บุà¸à¸£à¸¸à¸
+บุคคล
+บุคคล-
+บุคคลธรรมดา
+บุคคลนิติสมมติ
+บุคคลผู้ไร้ความสามารถ
+บุคคลสิทธิ
+บุคลาà¸à¸£
+บุคลาธิษà¸à¸²à¸™
+บุคลิà¸
+บุคลิà¸-
+บุคลิà¸à¸—าน
+บุคลิà¸à¸ à¸²à¸ž
+บุคลิà¸à¸¥à¸±à¸à¸©à¸“ะ
+บุง
+บุ่ง
+บุ้ง
+บุ้งขัน
+บุ้งจีน
+บุ้งทะเล
+บุ้งà¸à¸£à¸±à¹ˆà¸‡
+บุ้งร้วม
+บุà¸
+บุà¸-
+บุà¸à¹€à¸‚ต
+บุà¸à¸à¸²à¸™à¸¸à¸ à¸²à¸ž
+บุà¸à¸à¸²à¸ à¸´à¸™à¸´à¸«à¸²à¸£
+บุà¸à¸à¸²à¸ à¸´à¸ªà¸±à¸‡à¸‚าร
+บุà¸à¸—าย
+บุà¸à¸—ำà¸à¸£à¸£à¸¡à¹à¸•à¹ˆà¸‡
+บุà¸à¸˜à¸£à¸£à¸¡
+บุà¸à¸™à¸´à¸˜à¸´
+บุà¸à¸¡à¸²à¸§à¸²à¸ªà¸™à¸²à¸ªà¹ˆà¸‡
+บุà¸à¸£à¸²à¸¨à¸µ
+บุà¸à¸¤à¸—ธิ์
+บุà¸à¸«à¸™à¸±à¸à¸¨à¸±à¸à¸”ิ์ใหà¸à¹ˆ
+บุณฑริà¸
+บุณมี
+บุณย์
+บุตร
+บุตร-
+บุตรธรรม
+บุตรบุà¸à¸˜à¸£à¸£à¸¡
+บุตรา
+บุตรี
+บุตรีตระสุม
+บุถุชน
+บุทคล
+บุนนะบุนนัง
+บุนนาค
+บุบ
+บุบบิบ
+บุบสลาย
+บุปผ-
+บุปผชาติ
+บุปผวิà¸à¸±à¸•à¸´
+บุพ-
+บุพà¸à¸£à¸£à¸¡
+บุพà¸à¸²à¸£à¸µ
+บุพà¸à¸´à¸ˆ
+บุพชาติ
+บุพทัà¸à¸©à¸´à¸“
+บุพนิมิต
+บุพบท
+บุพเปตพลี
+บุพพ-
+บุพพัณชาติ
+บุพพัณหสมัย
+บุพพาจารย์
+บุพพาษาฒ
+บุพพาสาฬหะ
+บุพเพนิวาสานุสติà¸à¸²à¸“
+บุพเพสันนิวาส
+บุพโพ
+บุพภาค
+บุพวิเทห์
+บุ๋ม
+บุ่มบ่าม
+บุ้ย
+บุ้ยใบ้
+บุ้ยปาà¸
+บุรณะ
+บุรพ-
+บุรพทิศ
+บุรพบท
+บุรพผลคุนี
+บุรพภัทรบท
+บุรพอาษาฒ
+บุรพาจารย์
+บุระ
+บุรัตถิมทิศ
+บุราณ
+บุราณทุติยิà¸à¸²
+บุรินทร์
+บุริมทิศ
+บุริมพรรษา
+บุริมสิทธิ
+บุรี
+บุรุษ
+บุรุษ-
+บุรุษโทษ
+บุรุษธรรม
+บุโรทั่ง
+บุษà¸à¸£
+บุษบ-
+บุษบà¸
+บุษบง
+บุษบราค
+บุษบวรรษ
+บุษบัน
+บุษบา
+บุษบาà¸à¸£
+บุษบาคม
+บุษบาบัณ
+บุษบามินตรา
+บุษบารัà¸à¸£à¹‰à¸­à¸¢
+บุษป-
+บุษปราค
+บุษปะ
+บุษย-
+บุษย์
+บุษย์น้ำทอง
+บุษยมาส
+บุษยสนาน
+บุษยะ
+บุษยาภิเษà¸
+บุษราคัม
+บุหงง
+บุหงัน
+บุหงา
+บุหงาประหงัน
+บุหงามลาซอ
+บุหงารำไป
+บุหงาลำเจียà¸
+บุหรง
+บุหรี่
+บุหรี่พระราม
+บุหลัน
+บู่
+บู้
+บูชนีย-
+บูชนียสถาน
+บูชา
+บูชาà¸à¸±à¸“ฑ์เทศน์
+บูชายัà¸
+บูชิต
+บูด
+บูดบึ้ง
+บูดเบี้ยว
+บู่ทะเล
+บู้บี้
+บูร
+บูรณ-
+บูรณ์
+บูรณภาพ
+บูรณมี
+บูรณะ
+บูรณาà¸à¸²à¸£à¸£à¸§à¸¡à¸«à¸™à¹ˆà¸§à¸¢
+บูรพ
+บูรพา
+บูรพาจารย์
+บูรพาษาฒ
+บูรี
+เบ้
+เบ่ง
+เบ๊จี๋
+เบà¸à¸à¸²à¸™à¸µ
+เบà¸à¸ˆ
+เบà¸à¸ˆ-
+เบà¸à¸ˆà¸
+เบà¸à¸ˆà¸à¸±à¸¥à¸¢à¸²à¸“ี
+เบà¸à¸ˆà¸à¸²à¸¡à¸„ุณ
+เบà¸à¸ˆà¸à¸¹à¸¥
+เบà¸à¸ˆà¸‚ันธ์
+เบà¸à¸ˆà¸„ัพย์
+เบà¸à¸ˆà¸„ีรีนคร
+เบà¸à¸ˆà¹‚ครส
+เบà¸à¸ˆà¸”ุริยางค์
+เบà¸à¸ˆà¸˜à¸£à¸£à¸¡
+เบà¸à¸ˆà¸šà¸£à¸£à¸žà¸•
+เบà¸à¸ˆà¸žà¸£à¸£à¸“
+เบà¸à¸ˆà¸žà¸¥
+เบà¸à¸ˆà¹€à¸žà¸ª
+เบà¸à¸ˆà¸ à¸¹à¸•
+เบà¸à¸ˆà¸¡-
+เบà¸à¸ˆà¸¡à¸ªà¸¸à¸£à¸—ิน
+เบà¸à¸ˆà¸¡à¸²à¸¨
+เบà¸à¸ˆà¸¡à¸²à¸¨à¸ªà¸§à¸™
+เบà¸à¸ˆà¸¡à¸²à¸¨à¸«à¸™à¸¹
+เบà¸à¸ˆà¸£à¸‡à¸„์
+เบà¸à¸ˆà¹‚ลหà¸à¸°
+เบà¸à¸ˆà¸§à¸£à¸£à¸„
+เบà¸à¸ˆà¸§à¸£à¸£à¸“
+เบà¸à¸ˆà¸§à¸£à¸£à¸“ห้าสี
+เบà¸à¸ˆà¸¨à¸
+เบà¸à¸ˆà¸¨à¸µà¸¥
+เบà¸à¸ˆà¸²
+เบà¸à¸ˆà¸²à¸‡à¸„-
+เบà¸à¸ˆà¸²à¸‡à¸„์
+เบà¸à¸ˆà¸²à¸‡à¸„ประดิษà¸à¹Œ
+เบà¸à¸à¸²
+เบà¸à¸žà¸²à¸”
+เบ็ด
+เบ็ดเตล็ด
+เบ็ดเสร็จ
+เบน
+เบนซิน
+เบรà¸
+เบริลเลียม
+เบรียน
+เบส
+เบ้อ
+เบอร์
+เบอร์คีเลียม
+เบ้อเร่อ
+เบ้อเร่อเท่อ
+เบ้อเริ่ม
+เบ้อเริ่มเทิ่ม
+เบอะ
+เบอะบะ
+เบะ
+เบา
+เบ้า
+เบ้าขลุบ
+เบาความ
+เบาใจ
+เบาตัว
+เบ้าตา
+เบาเต็ง
+เบาเนื้อเบาตัว
+เบาบาง
+เบาปัà¸à¸à¸²
+เบามือ
+เบาไม้
+เบาไม้เบามือ
+เบาราณ
+เบาà¹à¸£à¸‡
+เบาสมอง
+เบ้าหลุด
+เบาหวาน
+เบาเหวง
+เบาโหวง
+เบาะ
+เบาะๆ
+เบาะลม
+เบาะà¹à¸ª
+เบิà¸
+เบิà¸à¸„วาม
+เบิà¸à¸—าง
+เบิà¸à¸—ูต
+เบิà¸à¸šà¸²à¸™
+เบิà¸à¸žà¸¢à¸²à¸™
+เบิà¸à¸žà¸£à¸°à¹€à¸™à¸•à¸£
+เบิà¸à¸žà¸£à¸°à¹‚อษà¸à¹Œ
+เบิà¸à¹„พร
+เบิà¸à¹„ม้
+เบิà¸à¹€à¸£à¸·à¸­
+เบิà¸à¹‚รง
+เบิà¸à¹‚ลง
+เบิà¸à¹à¸§à¹ˆà¸™à¹€à¸§à¸µà¸¢à¸™à¹€à¸—ียน
+เบิà¸à¸­à¸£à¸¸à¸“
+เบิ่ง
+เบี้ย
+เบียà¸
+เบียà¸à¸šà¹‰à¸²à¸¢
+เบี้ยà¸à¸±à¸™à¸”าร
+เบี้ยà¹à¸à¹‰
+เบี่ยง
+เบี่ยงบ่าย
+เบียด
+เบียดà¸à¸£à¸­
+เบียดบัง
+เบียดเบียน
+เบียดà¹à¸§à¹‰à¸‡
+เบียดเสียด
+เบี้ยต่อไส้
+เบี้ยทำขวัà¸
+เบียน
+เบียนธาตุ
+เบี้ยน้อยหอยน้อย
+เบี้ยบน
+เบี้ยบ้ายรายทาง
+เบี้ยบำนาà¸
+เบี้ยโบà¸
+เบี้ยประà¸à¸±à¸™à¸ à¸±à¸¢
+เบี้ยประชุม
+เบี้ยปรับ
+เบียร์
+เบี้ยล่าง
+เบี้ยเลี้ยง
+เบี้ยว
+เบี้ยวๆ บูดๆ
+เบี้ยหวัด
+เบี้ยหัวà¹à¸•à¸
+เบี้ยหัวà¹à¸«à¸¥à¸
+เบือ
+เบื่อ
+เบื้อ
+เบื้อง
+เบื้องà¸à¸§à¸™
+เบื้องต้น
+เบื้องบน
+เบื้องว่า
+เบื้องหน้า
+เบื้องหลัง
+เบือน
+à¹à¸š
+à¹à¸šà¹‰
+à¹à¸šà¸
+à¹à¸šà¸à¸«à¸™à¹‰à¸²
+à¹à¸šà¸à¸°à¸”ิน
+à¹à¸šà¸„ทีเรีย
+à¹à¸šà¹ˆà¸‡
+à¹à¸šà¸‡à¸à¹Œ
+à¹à¸šà¹ˆà¸‡à¸„้าง
+à¹à¸šà¹ˆà¸‡à¹€à¸šà¸²
+à¹à¸šà¹ˆà¸‡à¸›à¸±à¸™
+à¹à¸šà¹ˆà¸‡à¸ à¸²à¸„
+à¹à¸šà¹ˆà¸‡à¹à¸¢à¸
+à¹à¸šà¹ˆà¸‡à¸£à¸±à¸šà¹à¸šà¹ˆà¸‡à¸ªà¸¹à¹‰
+à¹à¸šà¹ˆà¸‡à¸ªà¸±à¸™à¸›à¸±à¸™à¸ªà¹ˆà¸§à¸™
+à¹à¸šà¸”มินตัน
+à¹à¸šà¸•à¹€à¸•à¸­à¸£à¸µà¹ˆ
+à¹à¸šà¹„ต๋
+à¹à¸šà¸™
+à¹à¸šà¸™à¹‚จ
+à¹à¸šà¸š
+à¹à¸šà¹‡à¸š
+à¹à¸šà¸šà¸‚้อคำถาม
+à¹à¸šà¸šà¸‰à¸šà¸±à¸š
+à¹à¸šà¸šà¸šà¸²à¸‡
+à¹à¸šà¸šà¹à¸œà¸™
+à¹à¸šà¸šà¸à¸¶à¸à¸«à¸±à¸”
+à¹à¸šà¸šà¸žà¸´à¸˜à¸µ
+à¹à¸šà¸šà¸žà¸´à¸¡à¸žà¹Œ
+à¹à¸šà¸šà¸ªà¸­à¸šà¸–าม
+à¹à¸šà¸šà¸­à¸¢à¹ˆà¸²à¸‡
+à¹à¸šà¹€à¸šà¸²à¸°
+à¹à¸šà¸¡à¸·à¸­
+à¹à¸šà¸£à¸
+à¹à¸šà¹€à¸£à¸µà¸¢à¸¡
+à¹à¸šà¸«à¸¥à¸²
+à¹à¸šà¸°
+à¹à¸šà¸°à¹à¸‰à¸°
+à¹à¸šà¸°à¸—่า
+à¹à¸šà¸°à¸›à¸²à¸
+à¹à¸šà¸°à¸­à¸
+โบ
+โบ้
+โบ๋
+โบà¸
+โบà¸à¸‚ร-
+โบà¸à¸‚รณี
+โบà¸à¸‚รพรรษ
+โบà¸à¸¡à¸·à¸­
+โบชุà¸
+โบดà¸
+โบà¹à¸”ง
+โบต
+โบนัส
+โบ๊เบ๊
+โบย
+โบยบิน
+โบรมีน
+โบรอน
+โบราณ
+โบราณ-
+โบราณคดี
+โบราณวัตถุ
+โบราณสถาน
+โบสถ์
+ใบ
+ใบ้
+ใบà¸à¹‰à¸™à¸›à¸´à¸”
+ใบà¸à¸­à¸‡à¹€à¸à¸´à¸™
+ใบà¸à¸­à¸‡à¸«à¸™à¸¸à¸™
+ใบขนสินค้า
+ใบขนุน
+ใบขับขี่
+ใบà¹à¸‚็ง
+ใบ้คลั่ง
+ใบเงิน
+ใบจอง
+ใบฎีà¸à¸²
+ใบดาล
+ใบดำ
+ใบà¹à¸”ง
+ใบà¹à¸”งà¹à¸ˆà¹‰à¸‡à¹‚ทษ
+ใบตราส่ง
+ใบตอง
+ใบตาล
+ใบทอง
+ใบท้องà¹à¸”ง
+ใบà¹à¸—รà¸
+ใบนาà¸
+ใบบอà¸
+ใบบุà¸
+ใบเบิà¸
+ใบเบิà¸à¸—าง
+ใบเบิà¸à¸£à¹ˆà¸­à¸‡
+ใบปà¸
+ใบปรือ
+ใบปลิว
+ใบพัด
+ใบพัทธสีมา
+ใบโพ
+ใบเมี่ยง
+ใบไม้
+ใบระà¸à¸²
+ใบรับ
+ใบรับรอง
+ใบลา
+ใบเลี้ยง
+ใบสอ
+ใบสั่ง
+ใบสั่งจ่าย
+ใบสัจ
+ใบสำคัà¸
+ใบสำคัà¸à¸„ู่จ่าย
+ใบสีมา
+ใบสุทธิ
+ใบเสมา
+ใบเสร็จ
+ใบหน้า
+ใบหุ้น
+ใบหูช้าง
+ใบเหยียบย่ำ
+ใบอนุà¸à¸²à¸•à¸‚ับขี่
+ไบ่ๆ
+ป
+ปà¸
+ปà¸à¸à¸£à¸°à¸žà¸­à¸‡
+ปà¸à¹€à¸à¸¨
+ปà¸à¸„รอง
+ปà¸à¸„ลุม
+ปà¸à¸•à¸´
+ปà¸à¸›à¹‰à¸­à¸‡
+ปà¸à¸›à¸±à¸à¸£à¸±à¸à¸©à¸²
+ปà¸à¸›à¸´à¸”
+ปà¸à¸£à¸“์
+ปà¸à¸£à¸“ัม
+ปà¸à¸²à¸£
+ปà¸à¸´à¸“à¸à¸°
+ปà¸à¸µà¸£à¸“ัม
+ปโà¸à¸à¸´
+ปง
+ป่ง
+ปงช้าง
+ปงปัง
+ปฎล
+ปà¸à¸±à¸
+ปà¸à¸´-
+ปà¸à¸´à¸à¸£à¸“์
+ปà¸à¸´à¸à¸£à¸£à¸¡à¸ªà¸‡à¸„ราม
+ปà¸à¸´à¸à¸²à¸£-
+ปà¸à¸´à¸à¸²à¸£à¸°
+ปà¸à¸´à¸à¸´à¸£à¸´à¸¢à¸²
+ปà¸à¸´à¸à¸¹à¸¥
+ปà¸à¸´à¸„คหิต
+ปà¸à¸´à¸„ม
+ปà¸à¸´à¸„หิต-
+ปà¸à¸´à¸„าหà¸
+ปà¸à¸´à¸†à¸°
+ปà¸à¸´à¸Šà¸µà¸§à¸™à¸°
+ปà¸à¸´à¸à¸à¸²
+ปà¸à¸´à¸à¸à¸²à¸ªà¸²à¸à¸¥à¸§à¹ˆà¸²à¸”้วยสิทธิมนุษยชน
+ปà¸à¸´à¸à¸²à¸“
+ปà¸à¸´à¸—ิน
+ปà¸à¸´à¸šà¸–
+ปà¸à¸´à¸šà¸±à¸•à¸´
+ปà¸à¸´à¸šà¸±à¸•à¸´à¸à¸²à¸£
+ปà¸à¸´à¸šà¸±à¸•à¸´à¸˜à¸£à¸£à¸¡
+ปà¸à¸´à¸›à¸—า
+ปà¸à¸´à¸›à¸±à¸à¸©à¹Œ
+ปà¸à¸´à¸›à¸±à¸™
+ปà¸à¸´à¸›à¸¸à¸ˆà¸‰à¸²à¸žà¸¢à¸²à¸à¸£à¸“์
+ปà¸à¸´à¸›à¸¸à¸ˆà¸‰à¸²à¸§à¸²à¸—ี
+ปà¸à¸´à¸žà¸±à¸—ธ์
+ปà¸à¸´à¸žà¸²à¸à¸¢à¹Œ
+ปà¸à¸´à¸ à¸²à¸„
+ปà¸à¸´à¸ à¸²à¸„-
+ปà¸à¸´à¸ à¸²à¸„นิมิต
+ปà¸à¸´à¸ à¸²à¸“
+ปà¸à¸´à¸ à¸²à¸“-
+ปà¸à¸´à¸ à¸²à¸“à¸à¸§à¸µ
+ปà¸à¸´à¸ à¸²à¸“ปà¸à¸´à¸ªà¸±à¸¡à¸ à¸´à¸—า
+ปà¸à¸´à¸ à¸²à¸“โวหาร
+ปà¸à¸´à¸¡à¸²
+ปà¸à¸´à¸¡à¸²à¸à¸£
+ปà¸à¸´à¸¢à¸¸à¸—ธ์
+ปà¸à¸´à¸£à¸ž
+ปà¸à¸´à¸£à¸¹à¸›
+ปà¸à¸´à¸£à¸¹à¸›-
+ปà¸à¸´à¹‚ลม
+ปà¸à¸´à¸§à¸±à¸•à¸´
+ปà¸à¸´à¸§à¸²à¸•
+ปà¸à¸´à¸§à¸²à¸—
+ปà¸à¸´à¹€à¸§à¸˜
+ปà¸à¸´à¸ªà¸™à¸˜à¸´
+ปà¸à¸´à¸ªà¸§à¸°
+ปà¸à¸´à¸ªà¸±à¸‡à¸‚รณ์
+ปà¸à¸´à¸ªà¸±à¸™à¸–าร
+ปà¸à¸´à¸ªà¸±à¸¡à¸ à¸´à¸—า
+ปà¸à¸´à¹€à¸ªà¸˜
+ปà¸à¸´à¹€à¸ªà¸˜à¸‚่าว
+ปà¸à¸žà¸µ
+ปà¸à¸žà¸µà¸§à¸´à¸—ยา
+ปà¸à¸¡
+ปà¸à¸¡-
+ปà¸à¸¡à¸à¸£à¸£à¸¡
+ปà¸à¸¡à¸Œà¸²à¸™
+ปà¸à¸¡à¸”ุสิต
+ปà¸à¸¡à¸—ัศน์
+ปà¸à¸¡à¹€à¸—ศนา
+ปà¸à¸¡à¸™à¸´à¹€à¸—ศ
+ปà¸à¸¡à¸šà¸¸à¸£à¸¸à¸©
+ปà¸à¸¡à¸žà¸¢à¸²à¸šà¸²à¸¥
+ปà¸à¸¡à¹‚พธิà¸à¸²à¸¥
+ปà¸à¸¡à¸¢à¸²à¸¡
+ปà¸à¸¡à¸¤à¸à¸©à¹Œ
+ปà¸à¸¡à¸§à¸±à¸¢
+ปà¸à¸¡à¸ªà¸¡à¹‚พธิ
+ปà¸à¸¡à¸ªà¸¸à¸£à¸—ิน
+ปà¸à¸¡à¸²à¸©à¸²à¸’
+ปà¸à¸§à¸µ
+ปณต
+ปณาม
+ปณิธาน
+ปณิธิ
+ปณีต
+ปด
+ปดโป้
+ปดิวรัดา
+ปติ
+ปติยัต
+ปติวัตร
+ปถพี
+ปถมัง
+ปถวี
+ปทัà¸à¸à¸²à¸™
+ปทัสถาน
+ปทานุà¸à¸£à¸¡
+ปทีป
+ปทุม
+ปน
+ป่น
+ป่นปี้
+ปนเป
+ปนัดดา
+ปบ
+ปปัà¸à¸ˆ-
+ปปัà¸à¸ˆà¸˜à¸£à¸£à¸¡
+ปปัà¸à¸ˆà¸°
+ปม
+ปมเขื่อง
+ปมจิต
+ปมด้อย
+ปมเด่น
+ปมประสาท
+ปมเปา
+ปโย-
+ปโยชนม์
+ปโยธร
+ปโยธรา
+ปโยนิธิ
+ปโยราศิ
+ปร-
+ปรà¸
+ปรà¸à¸•à¸´
+ปรง
+ปรด
+ปรตยัà¸à¸©à¹Œ
+ปรตยาค
+ปรตเยà¸
+ปรน
+ปรนนิบัติ
+ปรนปรือ
+ปรนเปรอ
+ปรนัย
+ปรบ
+ปรบไà¸à¹ˆ
+ปรบมือให้
+ปรปัà¸à¸©à¹Œ
+ปรม-
+ปรมัตถ์
+ปรมาจารย์
+ปรมาณู
+ปรมาตมัน
+ปรมาภิไธย
+ปรมาภิเษà¸
+ปรมินทร์
+ปรเมนทร์
+ปรเมศวร์
+ปรเมษà¸à¹Œ
+ปรเมหะ
+ปรโลà¸
+ปรวด
+ปรวนà¹à¸›à¸£
+ปรวาที
+ปรศุ
+ปรสิต
+ปรสิต-
+ปรสิตวิทยา
+ปร๋อ
+ปรองดอง
+ปรอด
+ปรอดๆ
+ปรอท
+ปรอย
+ปรอยๆ
+ประ-
+ประà¸à¸š
+ประà¸à¸šà¸•à¸±à¸§
+ประà¸à¸¤à¸•
+ประà¸à¸¤à¸•à¸´
+ประà¸à¸¥
+ประà¸à¸§à¸”
+ประà¸à¸§à¸”ประขัน
+ประà¸à¸§à¸”ราคา
+ประà¸à¸­à¸š
+ประà¸à¸­à¸šà¸”้วย
+ประà¸à¸­à¸šà¸­à¸²à¸«à¸²à¸£
+ประà¸à¸±à¸™
+ประà¸à¸±à¸™à¸Šà¸µà¸§à¸´à¸•
+ประà¸à¸±à¸™à¹€à¸Šà¸´à¸‡à¸¥à¸²
+ประà¸à¸±à¸™à¸•à¸±à¸§à¸œà¸¹à¹‰à¸•à¹‰à¸­à¸‡à¸«à¸²à¸«à¸£à¸·à¸­à¸ˆà¸³à¹€à¸¥à¸¢
+ประà¸à¸±à¸™à¸ à¸±à¸¢
+ประà¸à¸±à¸™à¸ à¸±à¸¢à¸„้ำจุน
+ประà¸à¸±à¸™à¸§à¸´à¸™à¸²à¸¨à¸ à¸±à¸¢
+ประà¸à¸±à¸š
+ประà¸à¸²à¸¢
+ประà¸à¸²à¸¢à¸žà¸£à¸¶à¸
+ประà¸à¸²à¸£
+ประà¸à¸²à¸¨
+ประà¸à¸²à¸¨à¸
+ประà¸à¸²à¸¨à¸™à¸µà¸¢à¸šà¸±à¸•à¸£
+ประà¸à¸²à¸¨à¸´à¸•
+ประà¸à¸³
+ประà¸à¸´à¸”
+ประà¸à¸´à¸•
+ประà¸à¸µà¸£à¸“à¸
+ประเà¸à¸µà¸¢à¸£à¸“à¸
+ประà¹à¸à¸
+ประคด
+ประคนธรรพ
+ประคนธรรพ์
+ประคบ
+ประคบประหงม
+ประคอง
+ประคับประคอง
+ประคัลภ์
+ประคารม
+ประคำ
+ประคำไà¸à¹ˆ
+ประคำดีควาย
+ประคำร้อย
+ประคิ่น
+ประคิ่นวินชา
+ประคุณ
+ประเคน
+ประเคราะห์
+ประโคน
+ประโคนธรรพ
+ประโคนธรรพ์
+ประโคม
+ประโคมข่าว
+ประจง
+ประจà¸
+ประจบ
+ประจบประà¹à¸ˆà¸‡
+ประจวบ
+ประจ๋อประà¹à¸ˆà¹‹
+ประจัà¸à¸©-
+ประจัà¸à¸©à¹Œ
+ประจัà¸à¸©à¸™à¸´à¸¢à¸¡
+ประจัà¸à¸©à¹Œà¸žà¸¢à¸²à¸™
+ประจัà¸
+ประจัà¸à¸šà¸²à¸™
+ประจัน
+ประจันหน้า
+ประจาà¸
+ประจาค
+ประจาน
+ประจำ
+ประจำà¸à¸²à¸£
+ประจำครั่ง
+ประจำฉัตร
+ประจำซอง
+ประจำเดือน
+ประจำตรา
+ประจำเมือง
+ประจำยาม
+ประจิม
+ประจิ้มประจ่อง
+ประจิ้มประเจ๋อ
+ประจุ
+ประจุขาด
+ประจุคมน์
+ประจุบัน
+ประจุไฟฟ้า
+ประจุโลหิต
+ประเจà¸
+ประเจิด
+ประเจิดประเจ้อ
+ประเจียด
+ประà¹à¸ˆ
+ประà¹à¸ˆà¸ˆà¸µà¸™
+ประชด
+ประชดประชัน
+ประชน
+ประชวม
+ประชวร
+ประชัน
+ประชา
+ประชาà¸à¸£
+ประชาà¸à¸£à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+ประชาคม
+ประชาชน
+ประชาชาติ
+ประชาทัณฑ์
+ประชาธิปไตย
+ประชานาถ
+ประชาบดี
+ประชาบาล
+ประชาภิบาล
+ประชามติ
+ประชาราษฎร์
+ประชาสงเคราะห์
+ประชาสัมพันธ์
+ประชิด
+ประชี
+ประชุม
+ประชุมเพลิง
+ประชุมสุดยอด
+ประเชิà¸
+ประณต
+ประณม
+ประณาม
+ประณิธาน
+ประณิธิ
+ประณีต
+ประณุท
+ประดง
+ประดงà¹à¸”ง
+ประดน
+ประดนธรรม
+ประดวน
+ประดอน
+ประดอย
+ประดัà¸à¹†
+ประดัà¸à¸›à¸£à¸°à¹€à¸”ิด
+ประดัง
+ประดับ
+ประดับประดา
+ประดา
+ประดาà¸
+ประดาตาย
+ประดาทัพ
+ประดาน้ำ
+ประดาป
+ประดาพล
+ประดามี
+ประดาษ
+ประดาเสีย
+ประดิ-
+ประดิชà¸à¸²
+ประดิดประดอย
+ประดิทิน
+ประดิรพ
+ประดิษà¸-
+ประดิษà¸à¹Œ
+ประดิษà¸à¸à¸£à¸£à¸¡
+ประดิษà¸à¸²à¸™
+ประดุง
+ประดุจ
+ประดู่
+ประดู่à¹à¸‚à¸
+ประดู่ชิงชัน
+ประดู่à¹à¸”ง
+ประดู่ลาย
+ประเด
+ประเด็น
+ประเดยà¸
+ประเดิม
+ประเดียง
+ประเดี๋ยว
+ประเดี๋ยวà¸à¹ˆà¸­à¸™
+ประเดี๋ยวเดียว
+ประเดี๋ยวนี้
+ประเดี๋ยวประด๋าว
+ประà¹à¸”ง
+ประà¹à¸”ะ
+ประโดย
+ประตง
+ประตยาค
+ประตัà¸
+ประตาปะ
+ประติ-
+ประติชà¸à¸²
+ประติà¸à¸²à¸“
+ประติทิน
+ประติมาà¸à¸£à¸£à¸¡
+ประติรพ
+ประติศรัพ
+ประตู
+ประตูชัย
+ประตูน้ำ
+ประตูป่า
+ประตูผี
+ประตูฟุตบอล
+ประตูระบาย
+ประตูรับน้ำ
+ประตูลม
+ประถม
+ประถมจินดา
+ประทม
+ประทยด
+ประท้วง
+ประทวน
+ประทวนสินค้า
+ประทัà¸à¸©à¹Œ
+ประทัà¸à¸©à¸´à¸“
+ประทัง
+ประทัด
+ประทัดจีน
+ประทัดทอง
+ประทัดà¸à¸£à¸±à¹ˆà¸‡
+ประทัดลม
+ประทัดเล็à¸
+ประทัดใหà¸à¹ˆ
+ประทับ
+ประทับใจ
+ประทับตรา
+ประทับฟ้อง
+ประทับà¹à¸£à¸¡
+ประท่า
+ประทาà¸à¸¥à¹‰à¸­à¸‡
+ประทาน
+ประทานบัตร
+ประทาย
+ประทาศี
+ประทิน
+ประทิ่น
+ประทีป
+ประทุà¸
+ประทุà¸
+ประทุà¸à¸ˆà¸´à¸•
+ประทุน
+ประทุมราค
+ประทุษ
+ประทุษà¸à¹Œ
+ประทุษà¸à¸ˆà¸´à¸•
+ประทุษà¸à¹Œ
+ประทุษà¸à¸ˆà¸´à¸•
+ประทุษร้าย
+ประเทศ
+ประเทศà¸à¸±à¸™à¸Šà¸™
+ประเทศชาติ
+ประเทศราช
+ประเทา
+ประเท้า
+ประเทียด
+ประเทียบ
+ประเทือง
+ประธาน
+ประธานาธิบดี
+ประนม
+ประนมมือ
+ประนอ
+ประนอม
+ประนอมหนี้
+ประนัง
+ประนัปดา
+ประนี้
+ประนีประนอม
+ประนีประนอมยอมความ
+ประบัด
+ประบาต
+ประปราน
+ประปราย
+ประปา
+ประเปรี้ยง
+ประเปรียว
+ประà¹à¸›à¹‰à¸‡
+ประà¹à¸›à¸£à¹‰à¸™
+ประพจน์
+ประพนธ์
+ประพรม
+ประพฤติ
+ประพฤทธิ์
+ประพัด
+ประพัทธ์
+ประพันธ์
+ประพาต
+ประพาส
+ประพาสต้น
+ประพาสมหรณพ
+ประพาฬ
+ประพิณ
+ประพิมพ์ประพาย
+ประพุทธ์
+ประเพณี
+ประเพณีนิยม
+ประเพ้อ
+ประà¹à¸žà¸£à¹ˆà¸‡à¸›à¸£à¸°à¹à¸žà¸£à¸§
+ประโพธ
+ประไพ
+ประไพร
+ประภพ
+ประภัสสร
+ประภา
+ประภาà¸à¸£
+ประภาคาร
+ประภาพ
+ประภามณฑล
+ประภาษ
+ประภาส
+ประเภท
+ประมง
+ประมวà¸
+ประมวล
+ประมวลà¸à¸Žà¸«à¸¡à¸²à¸¢
+ประมวลà¸à¸²à¸£à¸ªà¸­à¸™
+ประมวลรัษฎาà¸à¸£
+ประมัตตะ
+ประมาณ
+ประมาณà¸à¸²à¸£
+ประมาณตน
+ประมาณตัว
+ประมาท
+ประมาทหน้า
+ประมุข
+ประมุท
+ประมูล
+ประเมิน
+ประเมินภาษี
+ประโมง
+ประโมทย์
+ประยงค์
+ประยุà¸à¸•à¹Œ
+ประยุทธ์
+ประยุร
+ประยูร
+ประโยค
+ประโยคประธาน
+ประโยคสัมปทา
+ประโยชน์
+ประโรหิต
+ประลมพ์
+ประลอง
+ประลองยุทธ์
+ประลัย
+ประลัยà¸à¸±à¸¥à¸›à¹Œ
+ประลัยวาต
+ประลาต
+ประลาย
+ประลึง
+ประลุ
+ประลุง
+ประเล่ห์
+ประเล้าประโลม
+ประโลประเล
+ประโลม
+ประโลมโลà¸
+ประวรรต
+ประวรรตน์
+ประวัติ
+ประวัติ-
+ประวัติà¸à¸²à¸£
+ประวัติà¸à¸²à¸£à¸“์
+ประวัติà¸à¸²à¸¥
+ประวัติศาสตร์
+ประวาต
+ประวาล
+ประวาลปัทม์
+ประวาลผล
+ประวาลวรรณ
+ประวาส
+ประวิง
+ประวิช
+ประวิตร
+ประวิสรรชนีย์
+ประวีณ
+ประเวณี
+ประเวประวิง
+ประเวศ
+ประเวศน์
+ประศม
+ประศาสน์
+ประศุ
+ประสà¸
+ประสงค์
+ประสงค์ร้าย
+ประสบ
+ประสบà¸à¸²à¸£à¸“์
+ประสบà¸à¸²à¸£à¸“์นิยม
+ประสพ
+ประสม
+ประสมประสาน
+ประสมประเส
+ประสมพันธุ์
+ประสมโรง
+ประสะ
+ประสัà¸
+ประสันนาà¸à¸²à¸£
+ประสัยห-
+ประสัยห์
+ประสัยหาà¸à¸²à¸£
+ประสัยหาวหาร
+ประสา
+ประสาท
+ประสาท-
+ประสาทà¸à¸²à¸£
+ประสาทรูป
+ประสาทหลอน
+ประสาธน์
+ประสาน
+ประสานงา
+ประสานเนรมิต
+ประสานเสียง
+ประสาร
+ประสิทธิ-
+ประสิทธิ์
+ประสิทธิ์ประสาท
+ประสิทธิผล
+ประสิทธิภาพ
+ประสิทธิเม
+ประสีประสา
+ประสูต
+ประสูติ
+ประเสบันอาà¸à¸‡
+ประเสริà¸
+ประà¹à¸ªà¸šà¸±à¸™
+ประหนึ่ง
+ประหม่า
+ประหยัด
+ประหรณ์
+ประหลาด
+ประหล่ำ
+ประหลิ่ม
+ประหวัด
+ประหวั่น
+ประหว่า
+ประหัต
+ประหัตประหาร
+ประหาณ
+ประหาร
+ประหารชีวิต
+ประหาส
+ประเหล
+ประเหส
+ประเหียล
+ประอบ
+ประอร
+ประอรประเอียง
+ประอึง
+ประอุà¸
+ประเอียง
+ประà¹à¸­à¸
+ประฮาม
+ปรัà¸
+ปรัà¸à¸›à¸£à¸³
+ปรัà¸à¸¡à¸°
+ปรัà¸à¸«à¸±à¸à¸žà¸±à¸‡
+ปรัง
+ปรัชà¸à¸²
+ปรัด
+ปรัตถจริยา
+ปรัตยนต์
+ปรัตยัà¸à¸©à¹Œ
+ปรัตยันต์
+ปรัตยัย
+ปรัตยุตบัน
+ปรัตยุบัน
+ปรัตยูษ
+ปรัตยูห์
+ปรัตเยà¸
+ปรัน
+ปรั่น
+ปรั้น
+ปรับ
+ปรับทุà¸à¸‚์
+ปรับโทษ
+ปรับปรุง
+ปรับไหม
+ปรับอาà¸à¸²à¸¨
+ปรับอาบัติ
+ปรัมปรา
+ปรัศจิม
+ปรัศนา
+ปรัศนี
+ปรัศว์
+ปร่า
+ปราà¸à¸
+ปราà¸à¸à¸à¸²à¸£à¸“์
+ปราà¸à¸£à¸¡
+ปราà¸à¸¤à¸•
+ปราà¸à¸²à¸£
+ปราคภาร
+ปราคาร
+ปราง
+ปรางค์
+ปรางคณะ
+ปรางค์ปรา
+ปราจีน
+ปราชà¸à¹Œ
+ปราชà¸à¸²
+ปราชัย
+ปราชาปัตยวิวาหะ
+ปราชิต
+ปราณ
+ปราณี
+ปราด
+ปราดเปรียว
+ปราดเปรื่อง
+ปราติหารย์
+ปราทุà¸à¸£à¸²
+ปราน
+ปรานี
+ปรานีตีเอาเรือ
+ปรานีปราศรัย
+ปราบ
+ปราบดาภิเษà¸
+ปราบปราม
+ปราปต์
+ปราภพ
+ปราม
+ปรามาส
+ปราโมช
+ปราโมทย์
+ปราย
+ปรารถนา
+ปรารภ
+ปรารมภ์
+ปราศ
+ปราศจาà¸
+ปราศรัย
+ปราษณี
+ปราษาณ
+ปราสัย
+ปราสาท
+ปรำ
+ปริ-
+ปริà¸
+ปริà¸à¸‚าร
+ปริà¸à¸£à¸£à¸¡
+ปริà¸à¸±à¸›
+ปริà¸à¸±à¸¥à¸›-
+ปริà¸à¸±à¸¥à¸›à¸¡à¸²à¸¥à¸²-
+ปริขา
+ปริคณห์
+ปริจาค
+ปริจาริà¸à¸²
+ปริเฉท
+ปริชน
+ปริซึม
+ปริà¸à¸à¸²
+ปริà¸à¸à¸²à¸šà¸±à¸•à¸£
+ปริณาม
+ปริณามัคคิ
+ปริณายà¸
+ปริต
+ปริต-
+ปริตตะ
+ปริตโตทà¸
+ปริตทวีป
+ปริตยาค
+ปริตร
+ปริทรรศน์
+ปริทัยหัคคี
+ปริทัศน์
+ปริเทพ
+ปริเทพน์
+ปริเทวนะ
+ปริเทวะ
+ปรินิพพาน
+ปริบ
+ปริปันถ์
+ปริปาà¸
+ปริพนธ์
+ปริพัตร
+ปริพันธ์
+ปริพาชà¸
+ปริภัณฑ์
+ปริภาษ
+ปริภาษณ์
+ปริภุà¸à¸Šà¹Œ
+ปริภูมิ
+ปริโภค
+ปริ่ม
+ปริมณฑล
+ปริมัท
+ปริมาณ
+ปริมาตร
+ปริย-
+ปริยรณ
+ปริยวาท
+ปริยวาที
+ปริยัติ
+ปริยัติธรรม
+ปริยานุช
+ปริยาย
+ปริเยศ
+ปริโยสาน
+ปริวรรต
+ปริวรรต-
+ปริวรรตà¸à¸£à¸£à¸¡
+ปริวัตร
+ปริวาร
+ปริวาส
+ปริวิตà¸
+ปริเวณ
+ปริศนา
+ปริศนาธรรม
+ปริศนาลายà¹à¸—ง
+ปริศนาอัà¸à¸©à¸£à¹„ขว้
+ปริษà¸à¸²à¸£
+ปริษัท
+ปริสัà¸à¸à¸¹
+ปริสุทธิ
+ปริหาน
+ปริหาร
+ปริหาส
+ปรี่
+ปรีชà¸à¸²
+ปรีชา
+ปรี๊ด
+ปรีดา
+ปรีดิ
+ปรีดิ์
+ปรีดี
+ปรีติ
+ปรีย
+ปรียา
+ปรึà¸
+ปรึà¸à¸©à¸²
+ปรึง
+ปรือ
+ปรื๋อ
+ปรุ
+ปรุง
+ปรุโปร่ง
+ปรู
+ปรู๋
+ปรูด
+ปรูดปราด
+ปรู๊ดปร๊าด
+ปรู๊ฟ
+ปฤงคพ
+ปฤจฉา
+ปฤจฉาคุณศัพท์
+ปฤจฉาสรรพนาม
+ปฤษฎ์
+ปฤษฎางค์
+ปฤษà¸
+ปลà¸
+ปลà¸à¹€à¸›à¸¥à¸µà¹‰à¸¢
+ปลง
+ปล่ง
+ปลงà¸à¸£à¸£à¸¡à¸à¸²à¸™
+ปลงใจ
+ปลงช้าง
+ปลงชีวิต
+ปลงตà¸
+ปลงธรรมสังเวช
+ปลงธุระ
+ปลงบริขาร
+ปลงผม
+ปลงศพ
+ปลงสังขาร
+ปลงสังเวช
+ปลงอนิจจัง
+ปลงอาบัติ
+ปลงอายุสังขาร
+ปลด
+ปลดเà¸à¸©à¸µà¸¢à¸“
+ปลดเà¸à¸©à¸µà¸¢à¸“อายุ
+ปลดทุà¸à¸‚์
+ปลดปลง
+ปลดปล่อย
+ปลดเปลื้อง
+ปลดระวาง
+ปลดหนี้
+ปลดออà¸
+ปลดอาวุธ
+ปลดà¹à¸­à¸
+ปล้น
+ปล้นทรัพย์
+ปลวà¸
+ปลวังค-
+ปลอà¸
+ปลอà¸à¸à¸£à¸°à¸ªà¸¸à¸™
+ปลอà¸à¸„อ
+ปลอà¸à¸¡à¸µà¸”
+ปลอà¸à¸¡à¸·à¸­
+ปล่อง
+ปล้อง
+ปล้องขน
+ปล้องฉนวน
+ปล้องไฉน
+ปล้องทอง
+ปล้องอ้อย
+ปลอด
+ปลอดทหาร
+ปลอดโปร่ง
+ปลอดภัย
+ปล้อน
+ปลอบ
+ปลอบขวัà¸
+ปลอบโยน
+ปลอม
+ปลอมปน
+ปลอมà¹à¸›à¸¥à¸‡
+ปล่อย
+ปล่อยเà¸à¸²à¸°
+ปล่อยà¹à¸à¹ˆ
+ปล่อยไà¸à¹ˆ
+ปล่อยของ
+ปล่อยใจ
+ปล่อยตัว
+ปล่อยตัวปล่อยใจ
+ปล่อยนà¸à¸›à¸¥à¹ˆà¸­à¸¢à¸à¸²
+ปล่อยเนื้อปล่อยตัว
+ปล่อยปละละเลย
+ปล่อยปลาลงน้ำ
+ปล่อยปลิง
+ปล่อยมือ
+ปล่อยเสือเข้าป่า
+ปละ
+ปลัà¸
+ปลั๊à¸
+ปลั๊à¸à¹„ฟ
+ปลัง
+ปลั่ง
+ปลัด
+ปลัดขิà¸
+ปลา
+ปลาà¸
+ปลาà¸à¸£à¸´à¸¡
+ปลาเà¸à¸¥à¸·à¸­
+ปลาข้องเดียวà¸à¸±à¸™
+ปลาเค็ม
+ปลาเงินปลาทอง
+ปลาจ่อม
+ปลาจีน
+ปลาเจ่า
+ปลาชา
+ปลาดาว
+ปลาà¹à¸”à¸
+ปลาà¹à¸”ง
+ปลาต
+ปลาตà¸à¸™à¹‰à¸³à¸•à¸±à¸§à¹‚ต
+ปลาตะเพียน
+ปลาติดหลังà¹à¸«
+ปลาตู้
+ปลาทอง
+ปลาà¹à¸™à¸¡
+ปลาบ
+ปลาบปลื้ม
+ปลาบิน
+ปลาà¸à¸²
+ปลาม้ำ
+ปลาย
+ปลายข้าว
+ปลายตีน
+ปลายทาง
+ปลายนาà¸à¸²à¸£
+ปลายน้ำ
+ปลายมือ
+ปลายอ้อปลายà¹à¸‚ม
+ปลาร้า
+ปลาโลมา
+ปลาวาฬ
+ปลาสเตอร์
+ปลาสนาà¸à¸²à¸£
+ปลาส้ม
+ปลาหน้าดิน
+ปลาหมอตายเพราะปาà¸
+ปลาหมึà¸
+ปลาเห็ด
+ปลาใหà¸à¹ˆà¸à¸´à¸™à¸›à¸¥à¸²à¹€à¸¥à¹‡à¸
+ปลาไหลเผือà¸
+ปล้ำ
+ปล้ำปลุà¸
+ปล้ำผีลุà¸à¸›à¸¥à¸¸à¸à¸œà¸µà¸™à¸±à¹ˆà¸‡
+ปลิง
+ปลิงทะเล
+ปลิด
+ปลิ้น
+ปลิ้นปลอà¸
+ปลิ้นปล้อน
+ปลิโพธ
+ปลิม
+ปลิ่ม
+ปลิว
+ปลี
+ปลีà¸
+ปลีà¸à¸•à¸±à¸§
+ปลีà¸à¸¢à¹ˆà¸­à¸¢
+ปลีà¸à¹€à¸§à¸¥à¸²
+ปลีà¹à¸‚้ง
+ปลื้ม
+ปลุà¸
+ปลุà¸à¹ƒà¸ˆ
+ปลุà¸à¸•à¸±à¸§
+ปลุà¸à¸›à¸¥à¹‰à¸³
+ปลุà¸à¸›à¸±à¹ˆà¸™
+ปลุà¸à¸œà¸µ
+ปลุà¸à¸žà¸£à¸°
+ปลุà¸à¸£à¸°à¸”ม
+ปลุà¸à¹€à¸ªà¸
+ปลูà¸
+ปลูà¸à¸à¸±à¸‡
+ปลูà¸à¸à¸µ
+ปลูà¸à¹€à¸£à¸·à¸­à¸™à¸„ร่อมตอ
+ปลูà¸à¹€à¸£à¸·à¸­à¸™à¸•à¸²à¸¡à¹ƒà¸ˆà¸œà¸¹à¹‰à¸­à¸¢à¸¹à¹ˆ
+ปลูà¸à¹€à¸£à¸·à¸­à¸™à¸žà¸­à¸•à¸±à¸§ หวีหัวพอเà¸à¸¥à¹‰à¸²
+ปวà¸à¹€à¸›à¸µà¸¢à¸
+ปวง
+ป่วง
+ปวด
+ปวดถ่วง
+ปวดท้องทุ่ง
+ปวดท้องเบา
+ปวดท้องเยี่ยว
+ปวดมวน
+ปวดร้าว
+ปวดเศียรเวียนเà¸à¸¥à¹‰à¸²
+ปวดà¹à¸ªà¸šà¸›à¸§à¸”ร้อน
+ป่วน
+ป้วน
+ป่วนปั่น
+ป้วนเปี้ยน
+ป่วย
+ป่วยà¸à¸¥à¹ˆà¸²à¸§
+ป่วยà¸à¸²à¸£
+ปวัตน-
+ปวัตน์
+ปวัตนาà¸à¸²à¸£
+ปวารณา
+ปวาล
+ปวาส
+ปวาฬ
+ปวิช
+ปวิตร
+ปวิธ
+ปวิเวà¸
+ปวีณ
+ปวุติ
+ปเวณี
+ปเวส
+ปเวสน์
+ปศุ
+ปสพ
+ปสันน-
+ปสันนะ
+ปสันนาà¸à¸²à¸£
+ปสัยห-
+ปสัยหะ
+ปสัยหาà¸à¸²à¸£
+ปสัยหาวหาร
+ปสาท
+ปสาน
+ปสาสน์
+ปสุ
+ปสุต
+ปสูติ
+ปหังส
+ปหังสน
+ปหาน
+ปหาร
+ปหาส
+ปอ
+ป้อ
+ป๋อ
+ปอà¸
+ปอà¸à¸à¸¥à¹‰à¸§à¸¢à¹€à¸‚้าปาà¸
+ปอà¸à¸¥à¸­à¸
+ปอง
+ป่อง
+ป่องๆ
+ป้อง
+ป้องà¸à¸±à¸™
+ป่องร่า
+ปอด
+ปอดชื้น
+ปอดบวม
+ปอดà¹à¸›à¸”
+ปอดลอย
+ปอดเหล็à¸
+ปอน
+ปอนๆ
+ป้อน
+ปอนด์
+ปอเนาะ
+ปอบ
+ป้อà¹à¸›à¹‰
+ปอม
+ป้อม
+ป้อมๆ
+ป๋อม
+ปอมขาง
+ปอมข่าง
+ป้อมบังคับà¸à¸²à¸£
+ปอย
+ป้อย
+ป้อยอ
+ปอเลียงà¸à¹‰à¸²à¸¢
+ปะ
+ปะà¸à¸™
+ปะà¸à¸±à¸‡
+ปะà¸à¸²à¸›à¸°à¸à¸±à¸‡
+ปะà¸à¸²à¸£à¸±à¸‡
+ปะà¸à¸³
+ปะขาว
+ปะงับปะง่อน
+ปะตาปา
+ปะตาระà¸à¸²à¸«à¸¥à¸²
+ปะติดปะต่อ
+ปะติยาน
+ปะเตะ
+ปะทะ
+ปะทะปะทัง
+ปะทุ
+ปะทุน
+ปะบุà¸
+ปะปน
+ปะมง
+ปะราลี
+ปะรำ
+ปะลอม
+ปะเลง
+ปะà¹à¸¥à¹ˆà¸¡
+ปะà¹à¸¥à¹ˆà¸¡à¹†
+ปะโลง
+ปะวะหล่ำ
+ปะวะหลิ่ม
+ปะว่า
+ปะเสหรันอาà¸à¸‡
+ปะหงับ
+ปะหงับๆ
+ปะหงับปะง่อน
+ปะหนัน
+ปะหมันอาหยี
+ปะหลิ่ม
+ปะหัง
+ปะเหลาะ
+ปะเหลาะปะà¹à¸«à¸¥à¸°
+ปัà¸
+ปัà¸à¸‚-
+ปัà¸à¸‚์
+ปัà¸à¸‚คณนา
+ปัà¸à¸‚พิฬาร
+ปัà¸à¸‚ันดร
+ปัà¸à¹ƒà¸ˆ
+ปัà¸à¹€à¸›à¹‰à¸²
+ปัà¸à¸©-
+ปัà¸à¸©à¹Œ
+ปัà¸à¸©à¸à¸©à¸±à¸¢
+ปัà¸à¸©à¸„ณนา
+ปัà¸à¸©à¸„ม
+ปัà¸à¸©à¸˜à¸£
+ปัà¸à¸©à¹€à¸ à¸—
+ปัà¸à¸©à¸§à¸²à¸«à¸™
+ปัà¸à¸©à¸²
+ปัà¸à¸©à¸²à¸™à¸”ร
+ปัà¸à¸©à¸²à¸§à¸ªà¸²à¸™
+ปัà¸à¸©à¸²à¸ªà¸§à¸£à¸£à¸„์
+ปัà¸à¸©à¸´à¸™
+ปัà¸à¸©à¸µ
+ปัà¸à¸«à¸¥à¸±à¸
+ปัคหะ
+ปัง
+ปั๋ง
+ปังสุ์
+ปังสุà¸à¸¸à¸¥
+ปัจจัตตะ
+ปัจจัตถรณ์
+ปัจจันต-
+ปัจจันต์
+ปัจจันตคาม
+ปัจจันตชนบท
+ปัจจันตประเทศ
+ปัจจัย
+ปัจจามิตร
+ปัจจุคมน์
+ปัจจุทธรณ์
+ปัจจุบัน
+ปัจจุบันทันด่วน
+ปัจจุส-
+ปัจจุสà¸à¸²à¸¥
+ปัจจุสมัย
+ปัจจูส
+ปัจจูหะ
+ปัจเจà¸
+ปัจเจà¸-
+ปัจเจà¸à¸šà¸¸à¸„คล
+ปัจเจà¸à¸žà¸¸à¸—ธะ
+ปัจเจà¸à¹‚พธิ
+ปัจเจà¸à¸ªà¸¡à¸²à¸—าน
+ปัจโจปà¸à¸²à¸£à¸à¸´à¸ˆ
+ปัจโจสà¸à¸²à¸¥
+ปัจฉา
+ปัจฉาภัต
+ปัจฉาสมณะ
+ปัจฉิม
+ปัจฉิม-
+ปัจฉิมชน
+ปัจฉิมภาค
+ปัจฉิมยาม
+ปัจฉิมลิขิต
+ปัจฉิมวัย
+ปัจฉิมวาจา
+ปัจถรณ์
+ปัจนึà¸
+ปัจยาà¸à¸²à¸£
+ปัจเวà¸à¸‚ณ์
+ปัชชร
+ปัชชุน
+ปัà¸à¸ˆ-
+ปัà¸à¸ˆà¸
+ปัà¸à¸ˆà¸™à¸—ี
+ปัà¸à¸ˆà¸¡-
+ปัà¸à¸ˆà¸¡à¸µ
+ปัà¸à¸ˆà¸¡à¸µà¸”ิถี
+ปัà¸à¸ˆà¸§à¸±à¸„คีย์
+ปัà¸à¸ˆà¸§à¸µà¸ªà¸•à¸´
+ปัà¸à¸ˆà¸ªà¸²à¸‚า
+ปัà¸à¸à¸±à¸•à¸´
+ปัà¸à¸à¸²
+ปัà¸à¸à¸²à¹à¸„่หางอึ่ง
+ปัà¸à¸à¸²à¸Šà¸™
+ปัà¸à¸à¸²à¸ª-
+ปัà¸à¸à¸²à¸­à¹ˆà¸­à¸™
+ปัà¸à¸«à¸²
+ปัà¸à¸«à¸²à¹‚ลà¸à¹à¸•à¸
+ปัà¸
+ปัà¸à¸™à¸°
+ปัà¸à¸¢à¸²à¸§à¸±à¸•
+ปัณฑรหัตถี
+ปัณณะ
+ปัณณาส
+ปัณณาสà¸à¹Œ
+ปัณรส-
+ปัณรสม-
+ปัณรสมสุรทิน
+ปัณรสี
+ปัณรสีดิถี
+ปัณหิ
+ปัด
+ปัดๆ
+ปัดเà¸à¸¥à¹‰à¸²
+ปัดขา
+ปัดà¹à¸‚้งปัดขา
+ปัดตลอด
+ปัดไถม
+ปัดเป่า
+ปัดรังควาน
+ปัดเศษ
+ปัดสวะ
+ปัตคาด
+ปัตตะ
+ปัตตานีà¸à¸°
+ปัตตานึà¸
+ปัตตานุโมทนา
+ปัตตาเวีย
+ปัตติ
+ปัตติà¸
+ปัตติทาน
+ปัตถร
+ปัตถะ
+ปัตนิ
+ปัตนี
+ปัตยัย
+ปัตหล่า
+ปัถพี
+ปัถวี
+ปัทม-
+ปัทม์
+ปัทมปาณี
+ปัทมราค
+ปัทมราช
+ปัทมะ
+ปัทมาสน์
+ปัน
+ปั่น
+ปั้น
+ปั้นจั่น
+ปั้นจิ้มปั้นเจ๋อ
+ปันจุเหร็จ
+ปั้นเจ๋อ
+ปั่นป่วน
+ปั้นปึ่ง
+ปั่นà¹à¸›à¸°
+ปั่นà¸à¹‰à¸²à¸¢
+ปั่นไฟ
+ปั้นยศ
+ปั้นลม
+ปั้นล่ำ
+ปันส่วน
+ปั้นสิบ
+ปั้นสีหน้า
+ปั้นหยา
+ปั่นหัว
+ปั้นเหน่ง
+ปับ
+ปั๊บ
+ปัปผาสะ
+ปัพพาชนะ
+ปัพพาชนียà¸à¸£à¸£à¸¡
+ปัพภาระ
+ปั๊มน้ำมัน
+ปัยà¸à¸°
+ปัยà¸à¸²
+ปัยยิà¸à¸²
+ปั่ว
+ปัวเปีย
+ปั้วเปี้ย
+ปัศจิม
+ปัศตัน
+ปัศตู
+ปัสสาวะ
+ปัสสาสะ
+ปา
+ป่า
+ป้า
+ปาà¸
+ปาà¸à¸à¸š
+ปาà¸à¸à¸£à¸°à¸ˆà¸±à¸š
+ปาà¸à¸à¸£à¸°à¸šà¸°
+ปาà¸à¸à¸£à¸´à¸§
+ปาà¸à¸à¸¥à¹‰à¸²
+ปาà¸à¸à¸§à¹‰à¸²à¸‡
+ปาà¸à¸à¸²
+ปาà¸à¸à¸²à¸¥à¸¹à¸à¸¥à¸·à¹ˆà¸™
+ปาà¸à¸à¸²à¸«à¸¡à¸¶à¸à¸‹à¸¶à¸¡
+ปาà¸à¸à¸²à¸«à¸¡à¸¶à¸à¹à¸«à¹‰à¸‡
+ปาà¸à¹„à¸à¹ˆ
+ปาà¸à¸‚ม
+ปาà¸à¸‚อ
+ปาà¸à¹à¸‚็ง
+ปาà¸à¸„ม
+ปาà¸à¸„อà¸
+ปาà¸à¸„อเราะราย
+ปาà¸à¸„ัน
+ปาà¸à¸„ำ
+ปาà¸à¸„ีบ
+ปาà¸à¸ˆà¸­à¸š
+ปาà¸à¸ˆà¸°à¸‚าบ
+ปาà¸à¸ˆà¸±à¸”
+ปาà¸à¸ˆà¸´à¹‰à¸‡à¸ˆà¸
+ปาà¸à¸‰à¸¥à¸²à¸¡
+ปาà¸à¸Šà¹‰à¸²à¸‡
+ปาà¸à¸‹à¹ˆà¸­à¸¡
+ปาà¸à¸•à¸¥à¸²à¸”
+ปาà¸à¸•à¹ˆà¸­à¸›à¸²à¸
+ปาà¸à¸•à¸°à¸à¸£à¹‰à¸­
+ปาà¸à¸•à¸°à¹„à¸à¸£
+ปาà¸à¸•à¸°à¸‚าบ
+ปาà¸à¸•à¸³à¹à¸¢
+ปาà¸à¹à¸•à¸£
+ปาà¸à¹ƒà¸•à¹‰
+ปาà¸à¸™à¸
+ปาà¸à¸™à¸à¸à¸£à¸°à¸ˆà¸­à¸
+ปาà¸à¸™à¸à¹à¸à¹‰à¸§
+ปาà¸à¸™à¹‰à¸³
+ปาà¸à¸šà¸­à¸™
+ปาà¸à¸šà¸²à¸•à¸£
+ปาà¸à¹€à¸šà¸²
+ปาà¸à¹à¸šà¸°
+ปาà¸à¸›à¸£à¸²à¸¨à¸£à¸±à¸¢à¹ƒà¸ˆà¹€à¸Šà¸·à¸­à¸”คอ
+ปาà¸à¸›à¸¥à¸²
+ปาà¸à¸›à¸¥à¸²à¸£à¹‰à¸²
+ปาà¸à¸›à¸¥à¸´à¸‡
+ปาà¸à¹€à¸›à¹‡à¸”
+ปาà¸à¹€à¸›à¹‡à¸™à¸Šà¸±à¸à¸¢à¸™à¸•à¹Œ
+ปาà¸à¹€à¸›à¸£à¸²à¸°
+ปาà¸à¹€à¸›à¸£à¸²à¸°à¹€à¸£à¸²à¸°à¸£à¸²à¸¢
+ปาà¸à¹€à¸›à¸¥à¹ˆà¸²
+ปาà¸à¹€à¸›à¸µà¸¢à¸
+ปาà¸à¹€à¸›à¸µà¸¢à¸à¸›à¸²à¸à¹à¸‰à¸°
+ปาà¸à¹‚ป้ง
+ปาà¸à¹„ปล่
+ปาà¸à¸¡à¸²à¸
+ปาà¸à¹„ม้
+ปาà¸à¹„ม่สิ้นà¸à¸¥à¸´à¹ˆà¸™à¸™à¹‰à¸³à¸™à¸¡
+ปาà¸à¸£à¸²à¸
+ปาà¸à¸£à¹‰à¸²à¸¢
+ปาà¸à¹€à¸£à¸·à¸­
+ปาà¸à¸§à¹ˆà¸²à¸•à¸²à¸‚ยิบ
+ปาà¸à¸§à¹ˆà¸²à¸¡à¸·à¸­à¸–ึง
+ปาà¸à¸ªà¸§à¹ˆà¸²à¸‡
+ปาà¸à¸«à¸™à¸±à¸
+ปาà¸à¸«à¸§à¸²à¸™
+ปาà¸à¸«à¸§à¸²à¸™à¸à¹‰à¸™à¹€à¸›à¸£à¸µà¹‰à¸¢à¸§
+ปาà¸à¸«à¸­à¸¢à¸›à¸²à¸à¸›à¸¹
+ปาà¸à¸«à¹ˆà¸²à¸‡
+ปาà¸à¹€à¸«à¸¢à¸µà¹ˆà¸¢à¸§à¸›à¸²à¸à¸à¸²
+ปาà¸à¸­à¹ˆà¸²à¸§
+ป่าà¹à¸„ระ
+ปาง
+ป่าง
+ป้าง
+ป้างป่า
+ปาจนะ
+ปาจรีย์
+ปาจารย์
+ปาจิตตีย์
+ปาจีน
+ป่าช้า
+ป่าชายเลน
+ปาà¸à¸¥à¸´
+ปาà¸à¸´à¸šà¸—
+ปาà¸à¸´à¸šà¸¸à¸„ลิà¸
+ปาà¸à¸´à¹‚ภค
+ปาà¸à¸´à¸«à¸²à¸£à¸´à¸¢à¹Œ
+ปาà¸-
+ปาà¸à¸
+ปาà¸à¸à¸–า
+ปาà¸à¸°
+ปาณ-
+ปาณà¸-
+ปาณà¸à¸Šà¸²à¸•à¸´
+ปาณทัณฑ์
+ปาณนาศ
+ปาณภูต
+ปาณวินาศ
+ปาณสาร
+ปาณะ
+ปาณาติบาต
+ปาณิ
+ปาณิเคราะห์
+ปาณิดล
+ปาณิธรรม
+ปาณิมุà¸à¸•à¹Œ
+ปาณิมูล
+ปาณี
+ปาด
+ป่าดงดิบ
+ปาดหาว
+ป่าดิบ
+ป่าà¹à¸”ง
+ปาติโมà¸à¸‚์
+ปาตี
+ปาเต๊ะ
+ป่าเถื่อน
+ปาท
+ปาทป
+ปาท่องโà¸à¹‹
+ปาทังà¸à¸²
+ปาทาน
+ป่าทึบ
+ปาทุà¸à¸²
+ปาน
+ป่าน
+ป้าน
+ปานà¸à¸¥à¸²à¸‡
+ป่านคม
+ปานฉะนี้
+ปานดง
+ปานนี้
+ป่านนี้
+ป้านลม
+ปานะ
+ปานิเยน
+ปานีย-
+ปานียะ
+ปานีโยทà¸
+ป้าบ
+ป๊าบ
+ป่าเบà¸à¸ˆà¸žà¸£à¸£à¸“
+ปาป-
+ปาปมุต
+ปาปอหยีสังฆาตา
+ป่าโปร่ง
+ป่าผลัดใบ
+ปาพจน์
+ป่าà¹à¸žà¸°
+ปาม
+ปามปึงมา
+ปาโมà¸à¸‚์
+ป่าไม้พุ่ม
+ป่าย
+ป้าย
+ป้ายสี
+ปายาส
+ปาร-
+ปาร์เà¸à¸•à¹Œ
+ปารคู
+ปารมี
+ปารเมศ
+ปารษณี
+ป่าระนาม
+ปาราชิà¸
+ปาริฉัตร
+ปาริชาต
+ปารุปนะ
+ปาล
+ปาล์ม
+ป่าละเมาะ
+ปาลิไลยà¸à¹Œ
+ปาลี
+ป่าเลน
+ปาวๆ
+ป่าว
+ป๊าว
+ปาวà¸
+ปาวจนะ
+ป่าวประà¸à¸²à¸¨
+ป่าวร้อง
+ปาวาร
+ปาษาณ
+ปาส
+ปาสาณ
+ปาสาทิà¸à¸°
+ป่าสูง
+ป่าเส็งเคร็ง
+ป่าใส
+ปาหนัน
+ปาหี่
+ปาหุณ
+ปาหุไณย-
+ปาหุไณยบุคคล
+ปำ
+ป้ำ
+ป้ำเป้อ
+ป้ำเป๋อ
+ป้ำๆ เป๋อๆ
+ปิà¸à¸™à¸´à¸
+ปิ้ง
+ปิงคล-
+ปิงคลหัตถี
+ปิงคละ
+ปิ้งปลาประชดà¹à¸¡à¸§
+ปิงปอง
+ปิฎà¸
+ปิà¸à¸à¸°
+ปิà¸à¸´
+ปิณฑะ
+ปิด
+ปิดà¸à¸¥à¹‰à¸­à¸‡
+ปิดคดี
+ปิดควันไฟไม่มิด
+ปิดฉาà¸
+ปิดตาย
+ปิดเต๊าะ
+ปิดทองหลังพระ
+ปิดบัง
+ปิดบัà¸à¸Šà¸µ
+ปิดเบา
+ปิดประตูค้า
+ปิดประตูตีà¹à¸¡à¸§
+ปิดปาà¸
+ปิดสำนวน
+ปิดหนัà¸
+ปิดหีบไม่ลง
+ปิตตะ
+ปิตา
+ปิตามหะ
+ปิตามหัยà¸à¸²
+ปิตามหัยยิà¸à¸²
+ปิตุ
+ปิตุฆาต
+ปิตุจฉา
+ปิตุภูมิ
+ปิตุล
+ปิตุลา
+ปิตุลานี
+ปิโตรเลียม
+ปิ่น
+ปิ่นà¹à¸à¹‰à¸§
+ปิ่นซ่น
+ปิ่นตอ
+ปิ่นโต
+ปิปผลี
+ปิ่ม
+ปิ้ม
+ปิย-
+ปิยังคุ
+ปิลันธน์
+ปิ๋ว
+ปิศาจ
+ปิศาจบดี
+ปิสัง
+ปิไส
+ปิหà¸
+ปิหลั่น
+ปี
+ปี่
+ปี้
+ปี๋
+ปีà¸
+ปีà¸à¸à¸¥à¹‰à¸²à¸‚าà¹à¸‚็ง
+ปีà¸à¸à¸²
+ปีà¸à¸„้างคาว
+ปีà¸à¸™à¸
+ปีà¸à¹„ม้
+ปีà¸à¸¥à¸²à¸¢
+ปีà¸à¸«à¸±à¸
+ปีà¸à¸²à¸£à¸¨à¸¶à¸à¸©à¸²
+ปี่à¹à¸à¹‰à¸§
+ปีงบประมาณ
+ปีà¸à¸à¸°
+ปีà¸à¸°
+ปี๊ด
+ปีติ
+ปีน
+ปีนเà¸à¸¥à¸µà¸¢à¸§
+ปีบ
+ปี๊บ
+ปีปà¸à¸´à¸—ิน
+ปี่พาทย์
+ปีมะโว้
+ปีศาจ
+ปีà¹à¸ªà¸‡
+ปีหน้าฟ้าใหม่
+ปีฬ
+ปีฬà¸
+ปีฬา
+ปึà¸
+ปึà¸à¹à¸œà¹ˆà¸™
+ปึง
+ปึ่ง
+ปึ๋ง
+ปึ่งชา
+ปึงปัง
+ปึ้ด
+ปึมปื้อ
+ปืดปึง
+ปืน
+ปื้น
+ปืนยา
+ปือ
+ปื้อ
+ปื๋อ
+ปุ
+ปุ๊
+ปุà¸
+ปุà¸à¸›à¸¸à¸¢
+ปุคละ
+ปุ้งà¸à¸µà¹‹
+ปุงคพ
+ปุงควะ
+ปุงลิงค์
+ปุงลึงค์
+ปุจฉา
+ปุà¸
+ปุณฑริà¸
+ปุด
+ปุดà¸à¸°à¸¥à¸²
+ปุตตะ
+ปุถุชน
+ปุนนาค
+ปุนภพ
+ปุนัพพสู
+ปุนัพสุ
+ปุบ
+ปุ๊บ
+ปุบปับ
+ปุ๊บปั๊บ
+ปุปผะ
+ปุปะ
+ปุพพ-
+ปุพพผลคุนี
+ปุพพผลคุนี-
+ปุพพะ
+ปุพพะภัททะ
+ปุม-
+ปุ่ม
+ปุ้ม
+ปุ๋ม
+ปุ่มปลา
+ปุ่มป่ำ
+ปุ้มเป้ง
+ปุ่มเปือà¸
+ปุ้มเปือà¸
+ปุมา
+ปุย
+ปุ้ย
+ปุ๋ย
+ปุยà¸à¸£à¸°à¹‚ดน
+ปุยขาว
+ปุ๋ยคอà¸
+ปุยà¸à¹‰à¸²à¸¢
+ปุร
+ปุรณะ
+ปุรพ-
+ปุรพผลคุนี
+ปุรพษาฒ
+ปุราณ
+ปุราณะ
+ปุเรจาริà¸
+ปุโรหิต
+ปุลลิงค์
+ปุลลึงค์
+ปุลินท์
+ปุลู
+ปุโลปุเล
+ปุษยะ
+ปุสสะ
+ปุฬวะ
+ปู
+ปู่
+ปู่ครู
+ปูจ๋า
+ปู่เจ้า
+ปูชà¸à¸°
+ปูชนีย-
+ปูชนียะ
+ปูชา
+ปูชิต
+ปูด
+ปูดà¸à¸à¸ªà¹‰à¸¡à¸¡à¸­
+ปูติ
+ปูติลดา
+ปู่ทวด
+ปูน
+ปูนขาว
+ปูนซีเมนต์
+ปูนดิบ
+ปูนà¹à¸”ง
+ปูนปลาสเตอร์
+ปูนปั้น
+ปูนเปียà¸
+ปูนผิว
+ปูนเพชร
+ปูนไฟ
+ปูนสอ
+ปูนสุà¸
+ปู่น้อย
+ปูม
+ปู่ย่า
+ปู้ยี่ปู้ยำ
+ปูระ
+ปูลู
+ปูเล
+ปูวา
+ปูเสฉวน
+เป้
+เป๋
+เปà¸
+เป๊à¸
+-เปà¸à¸‚์
+เป่ง
+เป้ง
+เป๋ง
+เป็ด
+เป็ดà¸à¹ˆà¸²
+เป็ดà¹à¸à¹‰à¸§
+เป็ดขันประชันไà¸à¹ˆ
+เป็ดถบ
+เป็ดเทศ
+เป็ดน้ำ
+เป็ดผี
+เป็ดไฟà¹à¸”ง
+เป็ดหงส์
+เปต-
+เปตพลี
+เปตวิสัย
+เปตอง
+เปตา
+เป็น
+เป็นà¸à¸¥à¸²à¸‡
+เป็นà¸à¸­à¸‡
+เป็นà¸à¸­à¸šà¹€à¸›à¹‡à¸™à¸à¸³
+เป็นà¸à¸²à¸£
+เป็นควัน
+เป็นความ
+เป็นคุ้งเป็นà¹à¸„ว
+เป็นงานเป็นà¸à¸²à¸£
+เป็นเงาตามตัว
+เป็นเงินเป็นทอง
+เป็นจริงเป็นจัง
+เป็นใจ
+เป็นชิ้นเป็นอัน
+เป็นชู้
+เป็นดั้งหน้า
+เป็นà¹à¸”น
+เป็นใด
+เป็นได้
+เป็นต้น
+เป็นต่อ
+เป็นตัวเป็นตน
+เป็นตุเป็นตะ
+เป็นน้ำ
+เป็นน้ำเป็นนวล
+เป็นน้ำยาเย็น
+เป็นนิตย์
+เป็นเนื้อเป็นตัว
+เป็นเนื้อเป็นหนัง
+เป็นบ้า
+เป็นบ้าเป็นหลัง
+เป็นปาà¸à¹€à¸ªà¸µà¸¢à¸‡
+เป็นปี่เป็นขลุ่ย
+เป็นผู้เป็นคน
+เป็นà¸à¸±à¹ˆà¸‡à¹€à¸›à¹‡à¸™à¸à¸²
+เป็นฟืนเป็นไฟ
+เป็นไฟ
+เป็นมั่นเป็นเหมาะ
+เป็นรอง
+เป็นไร
+เป็นลมๆ
+เป็นล่ำเป็นสัน
+เป็นโล้เป็นพาย
+เป็นวรรคเป็นเวร
+เป็นหน้าเป็นตา
+เป็นหุ่นให้เชิด
+เป็นหูเป็นตา
+เป็นอัน
+เป็นอันขาด
+เป็นอันมาà¸
+เป็นเอง
+เปยยาล
+เปร
+เปร็ง
+เปรต
+เปรต-
+เปรตวิษัย
+เปรตวิสัย
+เปรม
+เปรมปรา
+เปรย
+เปรยๆ
+เปรยปราย
+เปรอ
+เปรอะ
+เปรา
+เปราะ
+เปราะà¹à¸›à¸£à¸°
+เปราะหอม
+เปรียง
+เปรี้ยง
+เปรียà¸
+เปรียบ
+เปรียบเทียบ
+เปรียบปราย
+เปรียบเปรย
+เปรี่ยม
+เปรียว
+เปรี้ยว
+เปรี้ยวปาà¸
+เปรี้ยวหวาน
+เปรียะ
+เปรี๊ยะ
+เปรื่อง
+เปรื่องปราด
+เปรื้อย
+เปล
+เปล่ง
+เปลà¸à¸§à¸™
+เปลว
+เปลา
+เปล่า
+เปล้า
+เปล้าขลิบทอง
+เปล่าดาย
+เปลาะ
+เปลี้ย
+เปลี่ยน
+เปลี่ยนใจ
+เปลี่ยนตัว
+เปลี่ยนà¹à¸›à¸¥à¸‡
+เปลี่ยนà¹à¸œà¹ˆà¸™à¸”ิน
+เปลี่ยนมือ
+เปลี่ยนมือไม่ได้
+เปลี่ยนหน้า
+เปลี่ยม
+เปลี่ยว
+เปลี่ยวดำ
+เปลือà¸
+เปลือà¸à¸à¸£à¸°à¹€à¸—ียม
+เปลือà¸à¸•à¸²
+เปลือà¸à¹‚ลà¸
+เปลือง
+เปลื้อง
+เปลื้องเครื่องสุà¸à¸³à¸¨à¸ž
+เปลืองใจ
+เปลือย
+เปลือยà¸à¸²à¸¢
+เปศ
+เปศล
+เปศลมัธย์
+เปศัส
+เปศัส-
+เปศัสà¸à¸²à¸£à¸´à¸™
+เปศัสà¸à¸²à¸£à¸µ
+เปสà¸à¸²à¸£
+เปสล
+เปสุà¸
+เปสุà¸-
+เปสุà¸à¸§à¸²à¸—
+เปสุไณย
+เป๋อ
+เป้อเย้อ
+เปอร์เซ็นต์
+เป๋อเหลอ
+เปะ
+เปะปะ
+เปา
+เป่า
+เป้า
+เป๊า
+เป๋า
+เป่าà¸à¸š
+เป่าà¹à¸•à¸£
+เป้าประสงค์
+เป่าปี่
+เป่าà¸à¸¸à¹ˆà¸™
+เป่าà¹à¸¥à¹ˆà¸™
+เป้าหมาย
+เป่าหลอด
+เป่าหู
+เป๋าฮื้อ
+เปาะ
+เปาะเปี๊ยะ
+เปาะà¹à¸›à¸°
+เปาะเหลาะ
+เปิà¸
+เปิง
+เปิงๆ
+เปิงมาง
+เปิด
+เปิดà¸à¸¥à¹‰à¸­à¸‡
+เปิดคดี
+เปิดฉาà¸
+เปิดบัà¸à¸Šà¸µ
+เปิดเปิง
+เปิดโปง
+เปิดเผย
+เปิดโลà¸
+เปิดหมวà¸à¸¥à¸²
+เปิดหมวà¸à¹ƒà¸«à¹‰
+เปิดหูเปิดตา
+เปิดอà¸
+เปิ่น
+เปิบ
+เปิ๊บ
+เปิบข้าว
+เปีย
+เปียà¸
+เปี๊ยà¸
+เปี่ยม
+เปียว
+เปี้ยว
+เปียะ
+เปี๊ยะ
+เปือà¸
+เปือà¸à¸•à¸¡
+เปื้อน
+เปื่อย
+à¹à¸›
+à¹à¸›à¹‰à¸‡
+à¹à¸›à¹‹à¸‡
+à¹à¸›à¹‰à¸‡à¸‚้าวสาลี
+à¹à¸›à¹‰à¸‡à¸‚้าวหมาà¸
+à¹à¸›à¹‰à¸‡à¹à¸‚็ง
+à¹à¸›à¹‰à¸‡à¸ˆà¸µà¹ˆ
+à¹à¸›à¹‰à¸‡à¹à¸Šà¹ˆ
+à¹à¸›à¹‰à¸‡à¸à¸§à¸™
+à¹à¸›à¹‰à¸‡à¸™à¸§à¸¥
+à¹à¸›à¹‰à¸‡à¸à¸¸à¹ˆà¸™
+à¹à¸›à¹‰à¸‡à¸¡à¸±à¸™
+à¹à¸›à¹‰à¸‡à¸¡à¸µà¹ˆ
+à¹à¸›à¹‰à¸‡à¸£à¹ˆà¸³
+à¹à¸›à¹‰à¸‡à¸ªà¸”
+à¹à¸›à¹‰à¸‡à¸ªà¸²à¸£à¸ à¸µ
+à¹à¸›à¹‰à¸‡à¸ªà¸²à¸¥à¸µ
+à¹à¸›à¹‰à¸‡à¸ªà¸´à¸‡à¸„โปร์
+à¹à¸›à¹‰à¸‡à¸«à¸¡à¸µà¹ˆ
+à¹à¸›à¹‰à¸‡à¹€à¸«à¸¥à¹‰à¸²
+à¹à¸›à¸”
+à¹à¸›à¹Šà¸”
+à¹à¸›à¸”บท
+à¹à¸›à¸”ปน
+à¹à¸›à¸”เปื้อน
+à¹à¸›à¸”สาà¹à¸«à¸£à¸
+à¹à¸›à¸”เหลี่ยมà¹à¸›à¸”คม
+à¹à¸›à¸”เหลี่ยมสิบสองคม
+à¹à¸›à¸—ู
+à¹à¸›à¹‰à¸™
+à¹à¸›à¸š
+à¹à¸›à¹Šà¸š
+à¹à¸›à¸¡
+à¹à¸›à¸£
+à¹à¸›à¸£à¹‹
+à¹à¸›à¸£à¸
+à¹à¸›à¸£à¸‚บวน
+à¹à¸›à¸£à¹„ข้
+à¹à¸›à¸£à¸‡
+à¹à¸›à¸£à¹ˆà¸‡
+à¹à¸›à¸£à¸‡à¸¥à¹‰à¸²à¸‡à¸‚วด
+à¹à¸›à¸£à¸‡à¸«à¸¹à¸«à¸™à¸¹
+à¹à¸›à¸£à¸à¸±à¸•à¸•à¸´
+à¹à¸›à¸£à¹Šà¸”
+à¹à¸›à¸£à¸˜à¸²à¸•à¸¸
+à¹à¸›à¸£à¹‰à¸™
+à¹à¸›à¸£à¹‰à¸™à¹à¸›à¸£à¹‹
+à¹à¸›à¸£à¸›à¸£à¸§à¸™
+à¹à¸›à¸£à¸›à¸²à¸à¸«à¸¥à¸²à¸à¸„ำ
+à¹à¸›à¸£à¹‹à¹à¸›à¸£à¹‰à¸™
+à¹à¸›à¸£à¸œà¸±à¸™
+à¹à¸›à¸£à¸œà¸±à¸™à¹‚ดยตรง
+à¹à¸›à¸£à¸œà¸±à¸™à¹à¸šà¸šà¸œà¸à¸œà¸±à¸™
+à¹à¸›à¸£à¸žà¸±à¸à¸•à¸£à¹Œ
+à¹à¸›à¸£à¸£à¸¹à¸›
+à¹à¸›à¸£à¸­à¸±à¸à¸©à¸£
+à¹à¸›à¸£à¸°
+à¹à¸›à¸¥
+à¹à¸›à¸¥à¹‰
+à¹à¸›à¸¥à¸
+à¹à¸›à¸¥à¸à¸›à¸¥à¸­à¸¡
+à¹à¸›à¸¥à¸‡
+à¹à¸›à¸¥à¸‡à¸Šà¸²à¸•à¸´
+à¹à¸›à¸¥à¸‡à¸œà¸µ
+à¹à¸›à¸¥à¸‡à¸ªà¸±à¸à¸Šà¸²à¸•à¸´
+à¹à¸›à¸¥à¸•à¸²à¸¡à¹€à¸™à¸·à¹‰à¸­à¸„วาม
+à¹à¸›à¸¥à¸•à¸²à¸¡à¸žà¸¢à¸±à¸à¸Šà¸™à¸°
+à¹à¸›à¸¥à¸•à¸²à¸¡à¸­à¸£à¸£à¸–
+à¹à¸›à¸¥à¸™
+à¹à¸›à¸¥à¸š
+à¹à¸›à¸¥à¸¢à¸à¸¨à¸±à¸žà¸—์
+à¹à¸›à¸¥à¸£à¹‰à¸­à¸¢
+à¹à¸›à¹‰à¸§
+à¹à¸›à¹Šà¸§
+à¹à¸›à¸°
+à¹à¸›à¹Šà¸°
+à¹à¸›à¹Šà¸°à¸‹à¸°
+โป
+โป่
+โป้
+โป๊
+โปà¸
+โป๊à¸
+โป๊à¸à¹€à¸à¸­à¸£à¹Œ
+โปà¸à¸‚ร-
+โปà¸à¸‚รณี
+โปà¸à¸‚รพรรษ
+โปà¸à¸³
+โปเà¸
+โปง
+โป่ง
+โป้ง
+โป่งข่าม
+โป่งดิน
+โป่งน้ำ
+โป้งเป้ง
+โป้งโย้ง
+โปงลาง
+โป้งโล้ง
+โป่งวิด
+โป้งโหยง
+โปà¸à¸šà¸—
+โปà¸à¸›à¸—มาส
+โปดà¸
+โปตถà¸à¸°
+โปน
+โป้ปด
+โป๊ยเซียน
+โปรง
+โปร่ง
+โปร่งเปร่ง
+โปร่งฟ้า
+โปร่งà¹à¸ªà¸‡
+โปร่งใส
+โปรด
+โปรดปราน
+โปรดสัตว์
+โปรดสัตว์ได้บาป
+โปรตอน
+โปรตีน
+โปรเตสà¹à¸•à¸™à¸•à¹Œ
+โปรย
+โปรยปราย
+โปรีสภา
+โปล่ง
+โปลิโอ
+โปส
+โปสà¸
+โปสาวนิà¸à¸¡à¸¹à¸¥
+โปะ
+โป๊ะ
+โป๊ะจ้าย
+ไป
+ไป่
+ไป๋
+ไปค้าถ่าน
+ไปตายเอาดาบหน้า
+ไปทุ่ง
+ไปๆ มาๆ
+ไปย-
+ไปยาล
+ไปรษณีย-
+ไปรษณีย์
+ไปรษณียนิเทศ
+ไปรษณียบรรณ
+ไปรษณียบัตร
+ไปรษณียภัณฑ์
+ไปรษณีย์รับรอง
+ไปรษณียวัตถุ
+ไปรษณียาà¸à¸£
+ไปล่
+ไปล่ปลิว
+ไปลาด
+ไปวัดไปวาได้
+ไปศาจ
+ไปไหนมาสามวาสองศอà¸
+ไปอย่างน้ำขุ่นๆ
+ผ
+ผà¸
+ผà¸à¸œà¸‡à¸
+ผà¸à¸œà¸±à¸™
+ผà¸à¹€à¸£à¸·à¸­à¸
+ผà¸à¸²
+ผà¸à¸²à¸à¸£à¸­à¸‡
+ผà¸à¸²à¸¢
+ผà¸à¸²à¸£à¸²à¸¢
+ผคม
+ผง
+ผงà¸
+ผงขาว
+ผงเข้าตาตัวเอง
+ผงคลี
+ผงชูรส
+ผงซัà¸à¸Ÿà¸­à¸
+ผงฟู
+ผงม
+ผงร
+ผงอน
+ผงอบ
+ผงะ
+ผงาด
+ผง่าน
+ผจง
+ผจà¸
+ผจัà¸
+ผจาน
+ผชุม
+ผณิน
+ผณินทร
+ผณินทรสมพัตสร
+ผณิศวร
+ผด
+ผดุง
+ผดุงครรภ์
+ผเดิน
+ผทม
+ผทมเพลิง
+ผนวà¸
+ผนวช
+ผนัง
+ผนิด
+ผนึà¸
+ผม
+ผมชิงเà¸à¸´à¸¥
+ผมทรงมหาดไทย
+ผมทัด
+ผมนาง
+ผมบ๊อบ
+ผมปีà¸
+ผมเป๋
+ผมเปีย
+ผมโป่ง
+ผมไฟ
+ผมมหาดไทย
+ผมม้า
+ผมหลัà¸à¹à¸ˆà¸§
+ผยอง
+ผย่ำเผยอ
+ผรณ-
+ผรณาปีติ
+ผรสุ
+ผริต
+ผริต-
+ผรุพà¸
+ผรุส-
+ผรุสวาท
+ผล
+ผลà¸
+ผลคุน
+ผลคุนี
+ผลคุนีบูรพมาส
+ผลง
+ผลพลอยได้
+ผลลัพธ์
+ผลอ
+ผล็อง
+ผล็อย
+ผละ
+ผลัà¸
+ผลัด
+ผลัดเปลี่ยน
+ผลัดà¹à¸œà¹ˆà¸™à¸”ิน
+ผลับ
+ผลัวะ
+ผลา
+ผลาà¸
+ผลานิสงส์
+ผลาผล
+ผลาหาร
+ผลิ
+ผลิà¸-
+ผลิà¸à¸¨à¸´à¸‚รี
+ผลิà¸à¸¨à¸´à¸¥à¸²
+ผลิà¸à¸°
+ผลิต
+ผลิต-
+ผลิตà¸à¸£à¸£à¸¡
+ผลิตผล
+ผลิตภัณฑ์
+ผลิน
+ผลี
+ผลีผลาม
+ผลึà¸
+ผลึ่ง
+ผลือ
+ผลุ
+ผลุง
+ผลุด
+ผลุน
+ผลุนผลัน
+ผลุบ
+ผลุบผลับ
+ผลุบโผล่
+ผลุบๆ โผล่ๆ
+ผลุย
+ผลู
+ผลูบด
+ผลูà¹à¸šà¸
+ผวน
+ผวย
+ผวา
+ผสม
+ผสมเทียม
+ผสมผสาน
+ผสมผเส
+ผสมพันธุ์
+ผสมโรง
+ผสมเสร็จ
+ผสาน
+ผสาย
+ผสาร
+ผอà¸
+ผอง
+ผ่อง
+ผ่องà¹à¸œà¹‰à¸§
+ผ่องใส
+ผอด
+ผ่อน
+ผ่อนคลาย
+ผ่อนชำระ
+ผ่อนปรน
+ผ่อนผัน
+ผ่อนส่ง
+ผ่อนสั้นผ่อนยาว
+ผ่อนหนัà¸à¹€à¸›à¹‡à¸™à¹€à¸šà¸²
+ผอบ
+ผอม
+ผอมเà¸à¸£à¹‡à¸‡
+ผอมโซ
+ผอมà¹à¸«à¹‰à¸‡
+ผ็อย
+ผ่อย
+ผอวด
+ผอูน
+ผะ
+ผะà¹à¸„ง
+ผะดา
+ผะสา
+ผะออบ
+ผัà¸
+ผัà¸à¹„à¸
+ผัà¸à¸‚วง
+ผัà¸à¸‚ี้ขวง
+ผัà¸à¹‚ฉม
+ผัà¸à¸Šà¸µ
+ผัà¸à¸Šà¸µà¹‚รยหน้า
+ผัà¸à¸•à¸šà¸Šà¸§à¸²
+ผัà¸à¸•à¹‰à¸¡à¸‚นมยำ
+ผัà¸à¸—อดยอด
+ผัà¸à¸šà¸¸à¹‰à¸‡
+ผัà¸à¸šà¸¸à¹‰à¸‡à¸‚ัน
+ผัà¸à¸šà¸¸à¹‰à¸‡à¸ˆà¸µà¸™
+ผัà¸à¸šà¸¸à¹‰à¸‡à¸—ะเล
+ผัà¸à¸šà¸¸à¹‰à¸‡à¸à¸£à¸±à¹ˆà¸‡
+ผัà¸à¸šà¸¸à¹‰à¸‡à¸£à¹‰à¸§à¸¡
+ผัà¸à¸šà¸¸à¹‰à¸‡à¸£à¸±à¹‰à¸§
+ผัà¸à¹€à¸šà¸µà¹‰à¸¢
+ผัà¸à¹€à¸šà¸µà¹‰à¸¢à¹ƒà¸«à¸à¹ˆ
+ผัà¸à¸›à¸¥à¸±à¸‡
+ผัà¸à¸›à¸¸à¹ˆà¸¡à¸›à¸¥à¸²
+ผัà¸à¹€à¸œà¹‡à¸”
+ผัà¸à¹„ผ่
+ผัà¸à¸£à¸¹à¹‰à¸™à¸­à¸™
+ผัà¸à¹à¸§à¹ˆà¸™
+ผัà¸à¸ªà¸²à¸š
+ผัà¸à¸ªà¸²à¸¡à¸«à¸²à¸§
+ผัà¸à¹€à¸ªà¸µà¹‰à¸¢à¸™
+ผัà¸à¸«à¸™à¸­à¸
+ผัà¸à¸«à¸™à¸­à¸‡
+ผัà¸à¸«à¸™à¸²à¸¡
+ผัà¸à¸«à¸§à¸²à¸™
+ผัà¸à¸«à¸§à¸²à¸™à¸šà¹‰à¸²à¸™
+ผัà¸à¸«à¸§à¸²à¸™à¸›à¹ˆà¸²
+ผัà¸à¹„หม
+ผัà¸à¸­à¸µà¹à¸›à¸°
+ผัคคุณ
+ผัคคุณ-
+ผัคคุณมาส
+ผัคคุณี
+ผัง
+ผังเมือง
+ผัด
+ผัดเจ้าล่อ
+ผัดช้าง
+ผัดผ่อน
+ผัดผัน
+ผัดเพี้ยน
+ผัดวันประà¸à¸±à¸™à¸žà¸£à¸¸à¹ˆà¸‡
+ผัน
+ผันà¹à¸›à¸£
+ผันผยอง
+ผันผวน
+ผันผ่อน
+ผันผาด
+ผันผาย
+ผันหม้อ
+ผันอัà¸à¸©à¸£
+ผับ
+ผับๆ
+ผัลคุนี
+ผัว
+ผัวหาบเมียคอน
+ผัวะ
+ผัสส-
+ผัสสะ
+ผัสสาหาร
+ผา
+ผ่า
+ผ้า
+ผาà¸
+ผาà¸à¹à¸œà¹‰à¸‡
+ผ้าà¸à¸£à¸²à¸š
+ผ้าเà¸à¸µà¹‰à¸¢à¸§
+ผ้าขาวม้า
+ผ้าขี้ริ้ว
+ผ้าขี้ริ้วห่อทอง
+ผาง
+ผ้าเช็ดตัว
+ผ้าเช็ดหน้า
+ผาณิต
+ผาด
+ผาดผัง
+ผาดà¹à¸œà¸¥à¸‡
+ผาดโผน
+ผาดเพ่ง
+ผาดำ
+ผ้าดำ
+ผ้าดิบ
+ผ้าà¹à¸”ง
+ผ้าตา
+ผาติ
+ผาติà¸à¸£à¸£à¸¡
+ผ้าถุง
+ผ้าà¹à¸–บ
+ผ้าทิพย์
+ผ้าเทศ
+ผ่าน
+ผ้านุ่ง
+ผ้าใบ
+ผ้าใบà¸à¸¥à¸­à¸¢
+ผ้าใบเมี่ยง
+ผ้าป่า
+ผ้าผ่อน
+ผ่าเผย
+ผาเผือà¸
+ผ้าà¹à¸à¸‡
+ผ้าพันคอ
+ผ้าพันà¹à¸œà¸¥
+ผ้าพื้น
+ผาม
+ผ้ามัดหมี่
+ผาย
+ผ่าย
+ผ้าย
+ผายปอด
+ผ่ายผอม
+ผายผัง
+ผายผัน
+ผายลม
+ผ้ายาง
+ผาล
+ผาลคุน
+ผาลา
+ผาลาเพียงไหล่
+ผ้าลาย
+ผ้าลูà¸à¹„ม้
+ผ่าว
+ผาสามเส้า
+ผ้าสำลี
+ผาสุà¸
+ผ่าหมาà¸
+ผาหอม
+ผ้าห้อยหอ
+ผ่าเหล่า
+ผ้าเหลือง
+ผ้าเหลืองร้อน
+ผ้าไหว้
+ผ้าอนามัย
+ผ้าอ้อม
+ผ้าอาบ
+ผ้าฮาด
+ผำ
+ผ้ำๆ
+ผิ
+ผิง
+ผิด
+ผิดà¸
+ผิดใจ
+ผิดตา
+ผิดท่า
+ผิดนัà¸
+ผิดนัด
+ผิดน้ำ
+ผิดประหลาด
+ผิดผี
+ผิดผู้ผิดคน
+ผิดà¹à¸œà¸
+ผิดà¸à¸²à¸œà¸´à¸”ตัว
+ผิดพ้องหมองใจ
+ผิดเพี้ยน
+ผิดเมีย
+ผิดรูปผิดร่าง
+ผิดสังเà¸à¸•
+ผิดสำà¹à¸¥à¸‡
+ผิดเส้น
+ผิดหวัง
+ผิดหู
+ผิดหูผิดตา
+ผิต
+ผิน
+ผินหลังให้
+ผิว
+ผิวน้ำ
+ผิวบาง
+ผิวปาà¸
+ผิวเผิน
+ผิวพรรณ
+ผิวหนัง
+ผิว่า
+ผี
+ผีเข้าผีออà¸
+ผีซ้ำด้ำพลอย
+ผีดิบ
+ผีต
+ผีตองเหลือง
+ผีตาà¸à¸œà¹‰à¸²à¸­à¹‰à¸­à¸¡
+ผีถ้วยà¹à¸à¹‰à¸§
+ผีถึงป่าช้า
+ผีบ้านไม่ดี ผีป่าà¸à¹‡à¸žà¸¥à¸­à¸¢
+ผีบุà¸
+ผีพุ่งไต้
+ผีเพลีย
+ผีฟ้า
+ผีไม่มีศาล
+ผีเรือน
+ผีเรือนไม่ดี ผีป่าà¸à¹‡à¸žà¸¥à¸­à¸¢
+ผี้ว์
+ผีเสื้อ
+ผีเสื้อเงิน
+ผีเสื้อน้อย
+ผีเสื้อน้ำ
+ผีเสื้อยัà¸à¸©à¹Œ
+ผีหลอà¸
+ผีอำ
+ผึง
+ผึ่ง
+ผึ้ง
+ผึ่งผาย
+ผึ้งรวง
+ผืน
+ผื่น
+ผุ
+ผุด
+ผุดผ่อง
+ผุดผาด
+ผุดผาย
+ผุดผ้าย
+ผุดลุà¸à¸œà¸¸à¸”นั่ง
+ผุยผง
+ผุสราคา
+ผู้
+ผูà¸
+ผูà¸à¸à¸£à¸°à¹„ด
+ผูà¸à¸‚วัà¸
+ผูà¸à¸‚าด
+ผูà¸à¸”วง
+ผูà¸à¸”อà¸
+ผูà¸à¸žà¸±à¸—ธสีมา
+ผูà¸à¸žà¸±à¸™
+ผูà¸à¸ à¸²à¸©à¸µ
+ผูà¸à¸¡à¸±à¸”
+ผู้à¸à¸§à¹‰à¸²à¸‡à¸‚วาง
+ผูà¸à¸«à¸¹
+ผู้à¸à¹ˆà¸­à¸à¸²à¸£à¸£à¹‰à¸²à¸¢
+ผู้คน
+ผู้จัดà¸à¸²à¸£
+ผู้ชาย
+ผู้ชายพายเรือ
+ผู้ชำนาà¸à¸à¸²à¸£à¸žà¸´à¹€à¸¨à¸©
+ผู้เชี่ยวชาà¸
+ผู้à¸à¸²à¸“
+ผู้ดี
+ผู้ดีà¹à¸›à¸”สาà¹à¸«à¸£à¸
+ผู้โดยสาร
+ผู้ต้องขัง
+ผู้ต้องหา
+ผู้ทรง
+ผู้à¹à¸—นเฉพาะคดี
+ผู้à¹à¸—นโดยชอบธรรม
+ผู้à¹à¸—นราษฎร
+ผู้ไทย
+ผู้น้อย
+ผู้เป็นหุ้นส่วน
+ผู้พิทัà¸à¸©à¹Œà¸ªà¸±à¸™à¸•à¸´à¸£à¸²à¸©à¸Žà¸£à¹Œ
+ผู้เยาว์
+ผู้รั้ง
+ผู้รับประà¸à¸±à¸™à¸ à¸±à¸¢
+ผู้รับประโยชน์
+ผู้รับเรือน
+ผู้รับเหมาà¸à¹ˆà¸­à¸ªà¸£à¹‰à¸²à¸‡
+ผู้ร้าย
+ผู้ลาà¸à¸¡à¸²à¸à¸”ี
+ผู้วิเศษ
+ผู้สำเร็จ
+ผู้สืบตระà¸à¸¹à¸¥
+ผู้สืบสันดาน
+ผู้สื่อข่าว
+ผู้เสียหาย
+ผู้หà¸à¸´à¸‡
+ผู้หà¸à¸´à¸‡à¸¢à¸´à¸‡à¹€à¸£à¸·à¸­
+ผู้ใหà¸à¹ˆ
+ผู้ใหà¸à¹ˆà¸šà¹‰à¸²à¸™
+ผู้อนุบาล
+ผู้เอาประà¸à¸±à¸™à¸ à¸±à¸¢
+เผ
+เผง
+เผชิà¸
+เผชิà¸à¸ à¸±à¸¢
+เผชิà¸à¸«à¸™à¹‰à¸²
+เผ็ด
+เผด็จ
+เผด็จà¸à¸²à¸£
+เผ็ดร้อน
+เผดิม
+เผดียง
+เผน-
+เผ่น
+เผนธรรม
+เผนิà¸
+เผย
+เผยà¹à¸œà¹ˆ
+เผยà¹à¸žà¸£à¹ˆ
+เผยอ
+เผยิบ
+เผยิบผยาบ
+เผล
+เผล่
+เผล้
+เผล็ด
+เผลอ
+เผลอไผล
+เผละ
+เผลาะ
+เผลาะà¹à¸œà¸¥à¸°
+เผลียง
+เผอเรอ
+เผอเรอà¸à¸£à¸°à¹€à¸Šà¸­à¸à¹‰à¸™à¸£à¸±à¹ˆà¸§
+เผอิà¸
+เผอิล
+เผะ
+เผา
+เผ่า
+เผ้า
+เผาขน
+เผาจริง
+เผ้าผง
+เผ่าพันธุ์
+เผาหลอà¸
+เผาหัว
+เผาะ
+เผิ้ง
+เผิน
+เผินๆ
+เผียน
+เผือ
+เผื่อ
+เผือà¸
+เผือà¸à¸à¸°à¸¥à¸²
+เผือà¸à¹‚ทป้าด
+เผื่อขาดเผื่อเหลือ
+เผือด
+เผือน
+เผื่อน
+เผื่อà¹à¸œà¹ˆ
+เผื่อว่า
+เผื่อเหนียว
+เผื่อเหลือเผื่อขาด
+à¹à¸œà¹ˆ
+à¹à¸œà¸
+à¹à¸œà¹ˆà¸à¸£à¸°à¸ˆà¸²à¸”
+à¹à¸œà¸‡
+à¹à¸œà¸‡à¸„อ
+à¹à¸œà¸‡à¸¥à¸­à¸¢
+à¹à¸œà¹ˆà¹à¸‡à¹ˆ
+à¹à¸œà¹ˆà¸‹à¹ˆà¸²à¸™
+à¹à¸œà¸”
+à¹à¸œà¹ˆà¸•à¸™
+à¹à¸œà¸™
+à¹à¸œà¹ˆà¸™
+à¹à¸œà¸™à¸
+à¹à¸œà¸™à¸à¸²à¸£
+à¹à¸œà¸™à¸‡à¸²à¸™
+à¹à¸œà¹ˆà¸™à¸”ิน
+à¹à¸œà¹ˆà¸™à¸”ินà¸à¸¥à¸šà¸«à¸™à¹‰à¸²
+à¹à¸œà¹ˆà¸™à¸”ินไหว
+à¹à¸œà¸™à¸—ี่
+à¹à¸œà¹ˆà¸™à¸œà¸‡à¸­à¸™
+à¹à¸œà¸™à¸œà¸±à¸‡
+à¹à¸œà¹ˆà¸™à¸žà¸
+à¹à¸œà¹ˆà¸™à¸ à¸ž
+à¹à¸œà¸™à¸ à¸²à¸ž
+à¹à¸œà¸™à¸ à¸¹à¸¡à¸´
+à¹à¸œà¹ˆà¸™à¹€à¸ªà¸µà¸¢à¸‡
+à¹à¸œà¹ˆà¹€à¸œà¸·à¹ˆà¸­
+à¹à¸œà¹ˆà¹€à¸¡à¸•à¸•à¸²
+à¹à¸œà¸¥
+à¹à¸œà¸¥à¹€à¸à¹ˆà¸²
+à¹à¸œà¸¥à¸‡
+à¹à¸œà¸¥à¸‡à¸¤à¸—ธิ์
+à¹à¸œà¸¥à¹‡à¸š
+à¹à¸œà¸¥à¹‡à¸šà¹†
+à¹à¸œà¸¥à¹€à¸›à¹‡à¸™
+à¹à¸œà¸¥à¸£à¸´à¸¡à¹à¸‚็ง
+à¹à¸œà¸¥à¸£à¸´à¸¡à¸­à¹ˆà¸­à¸™
+à¹à¸œà¸¥à¹‡à¸§
+à¹à¸œà¸¥à¸°
+à¹à¸œà¹ˆà¸§
+à¹à¸œà¹ˆà¸§à¹†
+à¹à¸œà¹‰à¸§
+à¹à¸œà¹‰à¸§à¸žà¸²à¸™
+à¹à¸œà¹ˆà¸ªà¸­à¸‡à¸ªà¸¥à¸¶à¸‡
+à¹à¸œà¹ˆà¸«à¸¥à¸²
+à¹à¸œà¹ˆà¸­à¸³à¸™à¸²à¸ˆ
+โผ
+โผง
+โผงผาง
+โผงเผง
+โผà¸à¸à¸±à¸ž-
+โผà¸à¸à¸±à¸žà¸˜à¸£à¸£à¸¡
+โผà¸à¸à¸±à¸žà¸žà¸°
+โผน
+โผเผ
+โผย
+โผล่
+โผลà¸à¹€à¸œà¸¥à¸
+โผละ
+โผอน
+โผะ
+ไผ
+ไผ่
+ไผท
+ไผทโà¸à¸£à¸¡
+ไผ่ผัง
+à¸
+à¸à¸™
+à¸à¸™à¸Šà¸°à¸Šà¹ˆà¸­à¸¡à¸°à¸¡à¹ˆà¸§à¸‡
+à¸à¸™à¸Šà¸°à¸¥à¸²à¸™
+à¸à¸™à¸‹à¸¹à¹ˆ
+à¸à¸™à¸•à¸à¸à¹‡à¹à¸Šà¹ˆà¸‡ à¸à¸™à¹à¸¥à¹‰à¸‡à¸à¹‡à¸”่า
+à¸à¸™à¸•à¸à¸‚ี้หมูไหล
+à¸à¸™à¸•à¸à¹„ม่ทั่วฟ้า
+à¸à¸™à¸•à¸à¹„ม่มีเค้า
+à¸à¸™à¸•à¸à¸­à¸¢à¹ˆà¸²à¹€à¸Šà¸·à¹ˆà¸­à¸”าว
+à¸à¸™à¸—อง
+à¸à¸™à¸—ั่งให้เป็นเข็ม
+à¸à¸™à¹€à¸—ียม
+à¸à¸™à¹„ล่ช้าง
+à¸à¸™à¸ªà¸±à¹ˆà¸‡à¸Ÿà¹‰à¸²
+à¸à¸™à¸ªà¸±à¹ˆà¸‡à¸Ÿà¹‰à¸² ปลาสั่งหนอง
+à¸à¸™à¹à¸ªà¸™à¸«à¹ˆà¸²
+à¸à¸™à¸«à¹ˆà¸²à¹à¸à¹‰à¸§
+à¸à¸£à¸±à¹ˆà¸‡
+à¸à¸£à¸±à¹ˆà¸‡à¸à¸±à¸‡à¹„ส
+à¸à¸£à¸±à¹ˆà¸‡à¸‚ี้นà¸
+à¸à¸£à¸±à¹ˆà¸‡à¸¡à¸±à¸‡à¸„่า
+à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª
+à¸à¹ˆà¸­
+à¸à¸­à¸¢
+à¸à¸­à¸¢à¸—อง
+à¸à¸±à¸
+à¸à¸±à¸à¹à¸„
+à¸à¸±à¸à¸–ั่ว
+à¸à¸±à¸à¸šà¸±à¸§
+à¸à¸±à¸à¸à¹ˆà¸²à¸¢
+à¸à¸±à¸à¹ƒà¸à¹ˆ
+à¸à¸±à¸à¸žà¸£à¹‰à¸²
+à¸à¸±à¸à¹€à¸žà¸à¸²
+à¸à¸±à¸à¸¡à¸°à¸‚าม
+à¸à¸±à¸à¸¢à¸²à¸§
+à¸à¸±à¸‡
+à¸à¸±à¹ˆà¸‡
+à¸à¸±à¸‡à¹€à¸‚็ม
+à¸à¸±à¸‡à¹ƒà¸ˆ
+à¸à¸±à¹ˆà¸‡à¸à¸²
+à¸à¸±à¸‡à¸£à¸à¸à¸±à¸‡à¸£à¸²à¸
+à¸à¸±à¸‡à¸£à¸­à¸¢
+à¸à¸±à¸‡à¸£à¸¹à¸›
+à¸à¸±à¸‡à¸«à¸±à¸§
+à¸à¸±à¸”
+à¸à¸±à¸™
+à¸à¸±à¸™à¸à¸¥à¸²à¸‡à¸§à¸±à¸™
+à¸à¸±à¸™à¹€à¸›à¸µà¸¢à¸
+à¸à¸±à¸™à¹€à¸Ÿà¸·à¹ˆà¸­à¸‡
+à¸à¸²
+à¸à¹ˆà¸²
+à¸à¹‰à¸²
+à¸à¸²à¸
+à¸à¸²à¸à¸à¸­à¸‡
+à¸à¸²à¸à¸à¸²à¸¢
+à¸à¸²à¸à¹„ข้
+à¸à¸²à¸à¸„รรภ์
+à¸à¸²à¸à¸•à¸±à¸§
+à¸à¸²à¸à¸—้อง
+à¸à¸²à¸à¹€à¸™à¸·à¹‰à¸­à¸à¸²à¸à¸•à¸±à¸§
+à¸à¸²à¸à¹€à¸™à¸·à¹‰à¸­à¹„ว้à¸à¸±à¸šà¹€à¸ªà¸·à¸­
+à¸à¸²à¸à¸šà¸³à¹€à¸£à¸­
+à¸à¸²à¸à¸›à¸£à¸°à¸ˆà¸³
+à¸à¸²à¸à¸›à¸¥à¸²à¹„ว้à¸à¸±à¸šà¹à¸¡à¸§
+à¸à¸²à¸à¸œà¸µ
+à¸à¸²à¸à¸œà¸µà¸à¸²à¸à¹„ข้
+à¸à¸²à¸à¹€à¸œà¸·à¹ˆà¸­à¹€à¸£à¸µà¸¢à¸
+à¸à¸²à¸à¸à¸±à¸‡
+à¸à¸²à¸à¸£à¸°à¸”าน
+à¸à¸²à¸à¹‚รงเรียน
+à¸à¸²à¸à¹„ว้à¸à¹ˆà¸­à¸™
+à¸à¸²à¸à¸ªà¸¹à¹ˆ
+à¸à¹ˆà¸²à¸„มหอà¸à¸„มดาบ
+à¸à¸²à¸‡
+à¸à¸²à¸Šà¸µ
+à¸à¸²à¸”
+à¸à¸²à¸™
+à¸à¹ˆà¸²à¸à¸·à¸™
+à¸à¸²à¹à¸à¸”
+à¸à¹ˆà¸²à¸žà¸£à¸°à¸šà¸²à¸—
+à¸à¹ˆà¸²à¸Ÿà¸±à¸™
+à¸à¹ˆà¸²à¸¡à¸£à¸ªà¸¸à¸¡
+à¸à¸²à¸¢
+à¸à¹ˆà¸²à¸¢
+à¸à¹‰à¸²à¸¢
+à¸à¹ˆà¸²à¸¢à¸‚วา
+à¸à¹ˆà¸²à¸¢à¸„้าน
+à¸à¹‰à¸²à¸¢à¸„ำ
+à¸à¹ˆà¸²à¸¢à¸‹à¹‰à¸²à¸¢
+à¸à¹ˆà¸²à¸¢à¹ƒà¸™
+à¸à¹ˆà¸²à¸¢à¹€à¸›à¹‡à¸™à¸à¸¥à¸²à¸‡
+à¸à¹‰à¸²à¸¢à¸œà¸µ
+à¸à¹ˆà¸²à¸¢à¹€à¸ªà¸™à¸­
+à¸à¹ˆà¸²à¸¢à¸«à¸™à¹‰à¸²
+à¸à¸²à¸¥à¸°à¸¡à¸µ
+à¸à¸²à¸ªà¸²à¸¢à¸šà¸±à¸§
+à¸à¸²à¸ªà¸³à¸«à¸£à¸§à¸”
+à¸à¸²à¹€à¸ªà¸µà¹‰à¸¢à¸§
+à¸à¸²à¸«à¸­à¸¢à¹‚ข่ง
+à¸à¸²à¸«à¸¸à¹‰à¸¡à¸à¸¥à¸­à¸‡
+à¸à¸²à¹„หล
+à¸à¸´à¹ˆà¸™
+à¸à¸´à¹ˆà¸™à¸•à¹‰à¸™
+à¸à¸µ
+à¸à¸µà¹ˆ
+à¸à¸µà¸
+à¸à¸µà¸à¸²à¸¬
+à¸à¸µà¸ˆà¸±à¸
+à¸à¸µà¸ˆà¸±à¸à¸£
+à¸à¸µà¸”าษ
+à¸à¸µà¸”ิบ
+à¸à¸µà¹€à¸—้า
+à¸à¸µà¹ƒà¸™à¸—้อง
+à¸à¸µà¸›à¸²à¸
+à¸à¸µà¸žà¸²à¸¢
+à¸à¸µà¸¡à¸°à¸¡à¹ˆà¸§à¸‡
+à¸à¸µà¸¡à¸·à¸­
+à¸à¸µà¹„ม้ลายมือ
+à¸à¸µà¹€à¸¢à¹‡à¸š
+à¸à¸µà¸«à¸¡à¸­à¸š
+à¸à¸¶à¸
+à¸à¸¶à¸à¸‡à¸²à¸™
+à¸à¸¶à¸à¸›à¸£à¸·à¸­
+à¸à¸¶à¸à¸à¸™
+à¸à¸¶à¸à¸ªà¸­à¸™
+à¸à¸¶à¸à¸«à¸±à¸”
+à¸à¸·à¸”
+à¸à¸·à¸”เคือง
+à¸à¸·à¸™
+à¸à¸·à¸™à¸—้อง
+à¸à¸¸à¹ˆà¸™
+à¸à¸¸à¹ˆà¸™à¹€à¸¡à¸·à¸­à¸‡
+à¸à¸¹à¸‡
+à¸à¸¹à¸‡à¸šà¸´à¸™
+เà¸à¹‰à¸²
+เà¸à¹‰à¸²à¹„ข้
+เà¸à¹‰à¸²à¸„อย
+เà¸à¹‰à¸²à¹à¸«à¸™
+เà¸à¸·à¸­
+เà¸à¸·à¸­à¸
+เà¸à¸·à¸­à¸‡
+เà¸à¸·à¹ˆà¸­à¸™
+à¹à¸à¸
+à¹à¸à¸à¸«à¸­à¸¡
+à¹à¸à¸‡
+à¹à¸à¸”
+à¹à¸à¸”น้ำ
+à¹à¸à¸”เลือด
+ใà¸à¹ˆ
+ใà¸à¹ˆà¹ƒà¸ˆ
+ใà¸à¹ˆà¸•à¹ˆà¸³
+ใà¸à¹ˆà¸à¸±à¸™
+ใà¸à¹ˆà¸£à¹‰à¸­à¸™à¸ˆà¸°à¸™à¸­à¸™à¹€à¸¢à¹‡à¸™ ใà¸à¹ˆà¹€à¸¢à¹‡à¸™à¸ˆà¸°à¸”ิ้นตาย
+ใà¸à¹ˆà¸ªà¸¹à¸‡
+ใà¸à¹ˆà¸ªà¸¹à¸‡à¸ˆà¸™à¹€à¸à¸´à¸™à¸¨à¸±à¸à¸”ิ์
+ใà¸à¹ˆà¸ªà¸¹à¸‡à¹ƒà¸«à¹‰à¹€à¸à¸´à¸™à¸¨à¸±à¸à¸”ิ์
+ไà¸
+พ
+พà¸
+พà¸à¸ˆà¸£
+พà¸à¸™à¸¸à¹ˆà¸™
+พà¸à¸žà¹ˆà¸²à¸¢
+พà¸à¸¥à¸¡
+พà¸à¸«à¸´à¸™
+พà¸à¸²
+พà¸à¸¸à¸£à¸°
+พà¸à¸¸à¸¥
+พง
+พงพี
+พงศ-
+พงศ์
+พงศà¸à¸£
+พงศธร
+พงศ์พันธุ์
+พงศา
+พงศาวดาร
+พงศาวลี
+พจน-
+พจน์
+พจนา
+พจนานุà¸à¸£à¸¡
+พจนารถ
+พจนีย์
+พจมาน
+พจี
+พชระ
+พà¸à¸²
+พà¸à¸²à¸à¸²à¸ªà¸±à¸
+พà¸à¸²à¸‚ามป้อม
+พà¸à¸²à¸‰à¸±à¸—ทันต์
+พà¸à¸²à¸Šà¹‰à¸²à¸‡à¹€à¸œà¸·à¸­à¸
+พà¸à¸²à¸“
+พà¸à¸²à¸”าบหัà¸
+พà¸à¸²à¹€à¸”ิน
+พà¸à¸²à¹„ทย
+พà¸à¸²à¸›à¸²à¸à¸à¸§à¹‰à¸²à¸‡
+พà¸à¸²à¹à¸›à¹à¸¥
+พà¸à¸²à¸žà¸¢à¸²à¸•
+พà¸à¸²à¹„ฟ
+พà¸à¸²à¸¡à¸°à¸‚ามป้อม
+พà¸à¸²à¸¡à¸·à¸­à¹€à¸«à¸¥à¹‡à¸
+พà¸à¸²à¸¡à¸¸à¸•à¸•à¸´
+พà¸à¸²à¸¡à¸¹à¸¡à¸´à¸™
+พà¸à¸²à¹„ม้
+พà¸à¸²à¸¢à¸²
+พà¸à¸²à¸£à¸²à¸à¸”ำ
+พà¸à¸²à¸£à¸²à¸à¹€à¸”ียว
+พà¸à¸²à¹„ร้ใบ
+พà¸à¸²à¸¥à¸­
+พà¸à¸²à¹‚ศà¸
+พà¸à¸²à¸ªà¸±à¸•à¸šà¸£à¸£à¸“
+ฯพณฯ
+พณิช
+พณิชย์
+พด
+พดà¸à¸£à¸´à¸Š
+พดด้วง
+พธู
+พน
+พน-
+พ่น
+พ้น
+พนขัณฑ์
+พนโคจร
+พนจร
+พนจรà¸
+พนชีวี
+พนธารา
+พนม
+พนมเพลิง
+พนมศà¸
+พนมศพ
+พนมสวรรค์
+พนวาสี
+พ้นวิสัย
+พนสณฑ์
+พนอง
+พนอม
+พนัà¸
+พนัà¸à¸‡à¸²à¸™
+พนัà¸à¸‡à¸²à¸™à¹€à¸ˆà¹‰à¸²à¸«à¸™à¹‰à¸²à¸—ี่
+พนัà¸à¸‡à¸²à¸™à¸ªà¸­à¸šà¸ªà¸§à¸™
+พนัà¸à¸‡à¸²à¸™à¸­à¸±à¸¢à¸à¸²à¸£
+พนัง
+พนัน
+พนันดร
+พนัส
+พนัส-
+พนัสดม
+พนัสบดี
+พนา
+พนาด
+พนาดร
+พนาดอน
+พนาธวา
+พนานดร
+พนาย
+พนาราม
+พนาลัย
+พนาลี
+พนาวา
+พนาวาส
+พนาเวศ
+พนาศรม
+พนาศรัย
+พนาสณฑ์
+พนาสัณฑ์
+พนิดา
+พนิต
+พนียà¸
+พเนà¸
+พเนจร
+พบ
+พบปะ
+พบพาน
+พบไม้งามเมื่อขวานบิ่น
+พบู
+พม่า
+พม่าà¹à¸—งà¸à¸š
+พม่ารำขวาน
+พยช
+พยชน์
+พยติเรà¸
+พยนต์
+พยศ
+พยัà¸
+พยัà¸à¸žà¹€à¸¢à¸´à¸”
+พยัà¸à¸¢à¸´à¹‰à¸¡
+พยัคฆ-
+พยัคฆ์
+พยัคฆา
+พยัคฆิน
+พยัคฆินทร์
+พยัคฆี
+พยัคเฆนทร์
+พยัชน์
+พยัà¸à¸Šà¸™à¸°
+พยัต
+พยับ
+พยับà¹à¸”ด
+พยับà¸à¸™
+พยับเมฆ
+พยับหมอà¸
+พยาà¸à¸£à¸“์
+พยาฆร์
+พยางค์
+พยาธิ
+พยาน
+พยาบาท
+พยาบาล
+พยาม
+พยายาม
+พยาล
+พยาล-
+พยาลมฤค
+พยุ
+พยุง
+พยุงปีà¸
+พยุห-
+พยุหบาตร
+พยุหบาตรา
+พยุหยาตรา
+พยุหโยธา
+พยุหร
+พยุหเสนา
+พยุหà¹à¸ªà¸™à¸¢à¸²
+พยุหà¹à¸ªà¸™à¸¢à¸²à¸à¸£
+พยุหะ
+พยู่ห์
+พเยีย
+พร
+พรต
+พรม
+พรมคด
+พรมคดตีนเต่า
+พรมà¹à¸”น
+พรมน้ำมัน
+พรมนิ้ว
+พรมมิ
+พรรค
+พรรค-
+พรรค์
+พรรคà¸à¸¥à¸´à¸™
+พรรคà¸à¸²à¸£à¹€à¸¡à¸·à¸­à¸‡
+พรรคนาวิà¸à¹‚ยธิน
+พรรคนาวิน
+พรรคพวà¸
+พรรคานต์
+พรรณ
+พรรณนา
+พรรณราย
+พรรดึà¸
+พรรลาย
+พรรษ
+พรรษ-
+พรรษประเวศ
+พรรษฤดู
+พรรษวุฒิ
+พรรษา
+พรรษาà¸à¸²à¸¥
+พรรษาคม
+พรรษายุต
+พรรโษทà¸
+พรรโษบล
+พรรเหา
+พรรเอิà¸
+พรวงเพรียง
+พรวด
+พรวดพราด
+พรวน
+พรสวรรค์
+พรหม
+พรหม-
+พรหมà¸à¸²à¸¢
+พรหมโคล
+พรหมจรรย์
+พรหมจัà¸à¸£
+พรหมจาริณี
+พรหมจารี
+พรหมชาติ
+พรหมทัณฑ์
+พรหมไทย
+พรหมธาดา
+พรหมบถ
+พรหมบท
+พรหมบริษัท
+พรหมบุตร
+พรหมปุโรหิต
+พรหมพัà¸à¸•à¸£à¹Œ
+พรหมพันธุ์
+พรหมภูติ
+พรหมยาน
+พรหมเรขา
+พรหมฤษี
+พรหมลิขิต
+พรหมวิหาร
+พรหมศร
+พรหมสี่หน้า
+พรหมสูตร
+พรหมหัวเหม็น
+พรหมโองà¸à¸²à¸£
+พรหมัà¸à¸•à¸²
+พรหมา
+พรหมาณฑ์
+พรหมาสตร์
+พรหมินทร์
+พรหเมนทร์
+พรหเมศวร
+พรอà¸
+พร่อง
+พร้อง
+พร้องเพรียà¸
+พรอด
+พร้อม
+พร่อมพร้อ
+พร้อมพรัà¸
+พร้อมพรั่ง
+พร้อมเพรียง
+พร้อมมูล
+พร้อมหน้า
+พร้อมหน้าพร้อมตา
+พร่อย
+พร้อย
+พระ
+พระà¸à¸£à¸™à¹‰à¸­à¸¢
+พระครู
+พระคุณเจ้า
+พระเคราะห์
+พระเครื่อง
+พระจันทร์ครึ่งซีà¸
+พระเจ้า
+พระเจ้าลอยถาด
+พระเจ้าหลวง
+พระเจ้าห้าพระองค์
+พระเจ้าอยู่หัว
+พระเดชพระคุณ
+พระทอง
+พระทัย
+พระธรรมศาสตร์
+พระนม
+พระนอม
+พระนาง
+พระนางเจ้า
+พระนางเธอ
+พระนาด
+พระนาย
+พระบà¸
+พระบท
+พระประธาน
+พระเป็นเจ้า
+พระผู้เป็นเจ้า
+พระà¹à¸œà¸‡
+พระพิมพ์
+พระพุทธเจ้า
+พระพุทธเจ้าข้า
+พระพุทธเจ้าข้าขอรับ
+พระพุทธเจ้าข้าขอรับใส่เà¸à¸¥à¹‰à¸²à¹ƒà¸ªà¹ˆà¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡
+พระพุทธเจ้าหลวง
+พระพุทธเจ้าอยู่หัว
+พระพุทธองค์
+พระภูมิ
+พระมาลัยมาโปรด
+พระยา
+พระยาเทครัว
+พระยาเล็บครุฑ
+พระยาวัน
+พระรอง
+พระราชà¸à¸¤à¸©à¸Žà¸µà¸à¸²
+พระราชà¸à¸³à¸«à¸™à¸”
+พระราชบัà¸à¸à¸±à¸•à¸´
+พระรูป
+พระรูปชี
+พระฤๅษี
+พระลบ
+พระลือ
+พระà¹à¸§à¸§
+พระศุà¸à¸£à¹Œà¹€à¸‚้าพระเสาร์à¹à¸—รà¸
+พระหา
+พระหาม
+พระหารณย์
+พระหารัณย์
+พระหิด
+พระองค์
+พระองค์เจ้า
+พระอันดับ
+พระอิà¸à¸žà¸£à¸°à¸›à¸¹à¸™
+พระเอà¸
+พระฮาม
+พรัà¸à¸žà¸£à¹‰à¸­à¸¡
+พรั่ง
+พรั่งพร้อม
+พรั่งพรู
+พรัด
+พรั่น
+พรั่นพรึง
+พรับ
+พร่า
+พร้า
+พราà¸
+พราà¸à¹€à¸”็à¸
+พราà¸à¸œà¸¹à¹‰à¹€à¸¢à¸²à¸§à¹Œ
+พราà¸à¸¥à¸¹à¸à¸™à¸à¸¥à¸¹à¸à¸à¸²
+พราง
+พร่าง
+พรางพรอà¸
+พร้างัดปาà¸à¹„ม่ออà¸
+พราด
+พราน
+พราย
+พรายทะเล
+พรายน้ำ
+พรายà¹à¸žà¸£à¸§
+พรายย้ำ
+พราว
+พราวà¹à¸žà¸£à¸§
+พราหมณ์
+พราหมณ์เà¸à¹‡à¸šà¸«à¸±à¸§à¹à¸«à¸§à¸™
+พราหมณ์ขายเมีย
+พราหมณ์ดีดน้ำเต้า
+พราหมณัศบดี
+พราหมณี
+พราหมี
+พรำ
+พรำๆ
+พร่ำ
+พร้ำ
+พร่ำพลอด
+พร่ำเพรื่อ
+พร่ำเพ้อ
+พริà¸
+พริà¸à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢
+พริà¸à¸à¸°à¹€à¸à¸¥à¸·à¸­
+พริà¸à¹à¸à¸§
+พริà¸à¸‚ิง
+พริà¸à¸”อง
+พริà¸à¹€à¸—ศ
+พริà¸à¹„ทย
+พริà¸à¸™à¹‰à¸³à¸ªà¹‰à¸¡
+พริà¸à¸«à¸­à¸¡
+พริà¸à¹€à¸«à¸¥à¸·à¸­à¸‡
+พริ้ง
+พริ้งพราย
+พริ้งเพริศ
+พริบ
+พริบตาเดียว
+พริบไหว
+พริ้ม
+พริ้มพราย
+พริ้มเพรา
+พรึง
+พรึน
+พรึบ
+พรืด
+พรุ
+พรุà¸
+พรุ่ง
+พรุ่งนี้
+พรุน
+พรู
+พรูด
+พฤà¸à¸©-
+พฤà¸à¸©à¹Œ
+พฤà¸à¸©à¸Šà¸²à¸•à¸´
+พฤà¸à¸©à¸—ล
+พฤà¸à¸©à¹€à¸—วดา
+พฤà¸à¸©à¸£à¸²à¸Š
+พฤà¸à¸©à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+พฤà¸à¸©à¸²
+พฤฒ
+พฤฒา
+พฤฒาจารย์
+พฤฒิ
+พฤฒิ-
+พฤฒิบาศ
+พฤต
+พฤติ
+พฤติ-
+พฤติà¸à¸£à¸£à¸¡
+พฤติà¸à¸²à¸£à¸“์
+พฤตินัย
+พฤทธ์
+พฤทธิ์
+พฤนต์
+พฤนท์
+พฤภูษณ
+พฤภูษิต
+พฤศจิà¸
+พฤศจิà¸à¸²à¸¢à¸™
+พฤษภ
+พฤษภาคม
+พฤหัสบดี
+พฤหัสบดีจัà¸à¸£
+พล
+พล-
+พลà¸à¸²à¸¢
+พลà¸à¸²à¸£
+พลขันธ์
+พลความ
+พลตระเวน
+พลเทพ
+พลบ
+พลเมือง
+พลเรือน
+พลโลà¸
+พลว-
+พลวà¸
+พลวง
+พลวดà¸à¸´à¸™à¸¥à¸¹à¸
+พลวดใหà¸à¹ˆ
+พลวัต
+พลศาสตร์
+พลศึà¸à¸©à¸²
+พลสิงห์
+พลอ
+พล้อ
+พลอง
+พลอด
+พลอดรัà¸
+พลอน
+พลอมà¹à¸žà¸¥à¸¡
+พลอย
+พล่อย
+พลอยฟ้าพลอยà¸à¸™
+พละ
+พละพลา
+พลั่à¸
+พลัง
+พลั่ง
+พลั้ง
+พลังงาน
+พลังงานจลน์
+พลังงานศัà¸à¸¢à¹Œ
+พลังจิต
+พลั้งปาà¸
+พลั้งปาà¸à¹€à¸ªà¸µà¸¢à¸¨à¸µà¸¥ พลั้งตีนตà¸à¸•à¹‰à¸™à¹„ม้
+พลั้งเผลอ
+พลัด
+พลัดถิ่น
+พลัดที่นาคาที่อยู่
+พลัดพราà¸
+พลัน
+พลับ
+พลับเขา
+พลับพลา
+พลับพลึง
+พลั่ว
+พล่า
+พลาà¸à¸£
+พลาง
+พลาà¸
+พลาด
+พลาดท่า
+พลาดิศัย
+พลาธิà¸à¸²à¸£
+พล่าน
+พลานามัย
+พลานึà¸
+พลาม
+พล่าม
+พลาย
+พลายม้า
+พลาสติà¸
+พลาสมา
+พลาหà¸
+พลำ
+พล้ำ
+พลำภัง
+พลิ
+พลิà¸
+พลิà¸à¸à¸£à¸°à¹€à¸›à¹‹à¸²
+พลิà¸à¹à¸œà¹ˆà¸™à¸”ิน
+พลิà¸à¹à¸žà¸¥à¸‡
+พลิà¸à¸¨à¸ž
+พลิà¸à¸«à¸™à¹‰à¸²à¸¡à¸·à¸­à¹€à¸›à¹‡à¸™à¸«à¸¥à¸±à¸‡à¸¡à¸·à¸­
+พลิพัท
+พลิ้ว
+พลี
+พลีà¸à¸£à¸£à¸¡
+พลีมุข
+พลุ
+พลุà¸
+พลุ่à¸
+พลุà¸à¸žà¸¥à¹ˆà¸²à¸™
+พลุ่ง
+พลุ้น
+พลุ่มพล่าม
+พลุ่ย
+พลุ้ย
+พลู
+พลูà¹à¸
+พลูคาว
+พลูต้น
+พลูโต
+พลูโทเนียม
+พวà¸
+พวà¸à¸žà¹‰à¸­à¸‡
+พวง
+พ่วง
+พวงโà¸à¹€à¸¡à¸™
+พวงคราม
+พวงชมพู
+พวงดอà¸à¹„ม้
+พ่วงพี
+พวงมาลัย
+พวงมาลา
+พวงà¹à¸ªà¸”
+พวงหยà¸
+พวงหรีด
+พวงอุไร
+พวน
+พวย
+พวยน้ำ
+พวยพุ่ง
+พสà¸
+พสà¸-
+พสà¸à¸™à¸´à¸à¸£
+พสน
+พสุ
+พสุธา
+พสุธาดล
+พสุนธรา
+พสุมดี
+พสุสงà¸à¸£à¸²à¸™à¸•à¹Œ
+พหล
+พหุ
+พหุคูณ
+พหุพจน์
+พหุภาคี
+พหุล
+พหู
+พหูพจน์
+พหูสูต
+พอ
+พ่อ
+พ้อ
+พอà¸
+พอà¸à¸žà¸¹à¸™
+พอà¸à¸±à¸™
+พอà¸à¸±à¸™à¸—ี
+พอà¸à¸²à¸£
+พอà¸à¹‰à¸²à¸§à¸‚าà¸à¹‡à¸¥à¸²à¹‚รง
+พ่อเà¸à¸¥à¸­
+พ่อขุน
+พ่อครัว
+พอควร
+พ่อค้าตีเมีย
+พ่อคุณ
+พอง
+พ้อง
+พ้องพาน
+พ่อเจ้า
+พ่อà¹à¸ˆà¹‰à¹à¸¡à¹ˆà¸­à¸¹
+พอใจ
+พอใช้
+พอใช้ได้
+พอดี
+พอดีพอร้าย
+พอดู
+พอดูได้
+พอได้
+พอตัว
+พ่อตา
+พอทำเนา
+พอทำพอà¸à¸´à¸™
+พอที
+พอที่
+พอน
+พอนเรือ
+พ่อบ้าน
+พอประมาณ
+พอไปได้
+พ่อพวงมาลัย
+พอฟัด
+พอฟัดพอเหวี่ยง
+พ้อม
+พ่อม่าย
+พอมีพอà¸à¸´à¸™
+พอมีอันจะà¸à¸´à¸™
+พ่อเมือง
+พอยà¸à¸‚าà¸à¹‡à¸¥à¸²à¹‚รง
+พอà¹à¸¢à¹‰à¸¡à¸›à¸²à¸à¸à¹‡à¹€à¸«à¹‡à¸™à¹„รฟัน
+พ่อร้าง
+พ่อเรือน
+พอà¹à¸£à¸‡
+พ่อลิ้นทอง
+พ่อเลี้ยง
+พอเลี้ยงปาà¸à¹€à¸¥à¸µà¹‰à¸¢à¸‡à¸—้อง
+พอโลเนียม
+พอสถานประมาณ
+พ่อสื่อ
+พอหอมปาà¸à¸«à¸­à¸¡à¸„อ
+พอเหมาะ
+พออ้าปาà¸à¸à¹‡à¹€à¸«à¹‡à¸™à¸¥à¸´à¹‰à¸™à¹„à¸à¹ˆ
+พะ
+พ่ะ
+พะงา
+พะงาบ
+พะงาบๆ
+พะจง
+พะทำมะรง
+พะนอ
+พะเน้าพะนอ
+พะเน้าพะนึง
+พะเนิน
+พะเนินเทินทึà¸
+พะเนียง
+พะà¹à¸™à¸‡
+พะพาน
+พะพิง
+พะเพิง
+พะยอม
+พ่ะย่ะค่ะ
+พะยุพยุง
+พะยูง
+พะยูน
+พะเยิบ
+พะเยิบๆ
+พะเยิบพะยาบ
+พะรุงพะรัง
+พะเลย
+พะโล้
+พะไล
+พะวง
+พะวัà¸à¸žà¸°à¸§à¸™
+พะวา
+พะว้าพะวัง
+พะอง
+พะอาà¸à¸žà¸°à¸­à¸³
+พะอืดพะอม
+พัà¸
+พัà¸à¸•à¸£-
+พัà¸à¸•à¸£à¹Œ
+พัà¸à¸•à¸£à¸²
+พัà¸à¸•à¸£à¸²à¸à¸¤à¸•à¸´
+พัà¸à¸•à¸²
+พัà¸à¸œà¹ˆà¸­à¸™
+พัà¸à¸žà¸´à¸‡
+พัà¸à¹à¸žà¸§
+พัà¸à¸Ÿà¸·à¹‰à¸™
+พัà¸à¸£
+พัà¸à¸ªà¸¡à¸­à¸‡
+พัง
+พังà¸à¸²
+พังคา
+พังงา
+พังผืด
+พังพวย
+พังพอน
+พังพาน
+พังพาบ
+พังเพย
+พัช
+พัชนี
+พัชร
+พัà¸à¸ˆà¸
+พัà¸à¸ˆà¸™à¹Œ
+พัฒà¸à¸µ
+พัฒน-
+พัฒนะ
+พัฒนา
+พัฒนาà¸à¸£
+พัฒนาà¸à¸²à¸£
+พัด
+พัดชัà¸
+พัดชา
+พัดดึงส์
+พัดโบà¸
+พัดà¹à¸žà¸§
+พัดยศ
+พัดลม
+พัดหลวง
+พัตติงสะ
+พัตร
+พัทธ-
+พัทธ์
+พัทธยา
+พัทธยาà¸à¸£
+พัทธสีมา
+พัทร
+พัน
+พันงู
+พันจ่า
+พันจำ
+พันไฉน
+พันซาด
+พันตัน
+พันตา
+พันตู
+พันทาง
+พันธ-
+พันธ์
+พันธà¸à¸£à¸“ี
+พันธน-
+พันธนะ
+พันธนาà¸à¸²à¸£
+พันธนาคาร
+พันธนำ
+พันธบัตร
+พันธมิตร
+พันธะ
+พันธุ
+พันธุ์
+พันเนตร
+พันปี
+พันพัว
+พันลอà¸
+พันลาย
+พันลำ
+พันลึà¸
+-พันลือ
+พันเลิศ
+พันวรรษา
+พันà¹à¸ªà¸‡
+พันเอิà¸
+พับ
+พับเขียง
+พับà¸à¸²à¸™
+พับผ้า
+พับเพียบ
+พับà¹à¸žà¸™à¸‡à¹€à¸Šà¸´à¸‡
+พัลลภ
+พัลวัน
+พัว
+พัวพัน
+พัวะ
+พัศดี
+พัสดุ
+พัสดุไปรษณีย์
+พัสดุภัณฑ์
+พัสเดา
+พัสตร์
+พัสถาน
+พา
+พาà¸
+พาà¸à¹€à¸žà¸µà¸¢à¸£
+พาà¸à¸¢à¹Œ
+พาà¸à¸¢à¹Œà¸«à¸™à¸±à¸‡
+พาง
+พ่าง
+พาชี
+พาซื่อ
+พาณ
+พาณ-
+พาณโยชน์
+พาณวาร
+พาณาสน์
+พาณิช
+พาณิชย์
+พาณินี
+พาณี
+พาด
+พาดควาย
+พาดไฉน
+พาดพิง
+พาดหัวข่าว
+พาต
+พาท
+พาทย์
+พาธ
+พาธา
+พาน
+พ่าน
+พานà¸à¸¥à¸µà¸šà¸šà¸±à¸§
+พานปาà¸à¸à¸£à¸°à¸ˆà¸±à¸š
+พานร
+พานรินทร์
+พานเรศ
+พานà¹à¸§à¹ˆà¸™à¸Ÿà¹‰à¸²
+พาม
+พาย
+พ่าย
+พายม้า
+พายเรือคนละที
+พายเรือทวนน้ำ
+พายเรือในหนอง
+พายเรือในอ่าง
+พายัพ
+พายุ
+พาร์เซà¸
+พารณ
+พารณะ
+พารา
+พาราฟิน
+พาล
+พาลà¸à¸£à¸°à¹à¸Šà¸‡
+พาลรีพาลขวาง
+พาลา
+พาลี
+พาลีหลายหน้า
+พาลุà¸
+พาโล
+พาไล
+พาส
+พาสน์
+พาสนา
+พาสุà¸à¸£à¸µ
+พาห
+พ่าห์
+พาหนะ
+พาหะ
+พาหา
+พาหิรà¸à¸°
+พาหิระ
+พาหุ
+พาหุยุทธ์
+พาหุรัด
+พาเหียร
+พาฬ
+พาฬ-
+พาฬมฤค
+พาฬหะ
+พำ
+พำนัà¸
+พำพวà¸
+พำพึม
+พำๆ พึมๆ
+พำลา
+พิà¸à¸¥
+พิà¸à¹€à¸¥à¸™à¸—รีย์
+พิà¸à¸ªà¸´à¸•
+พิà¸à¸±à¸”
+พิà¸à¸±à¸”อัตราศุลà¸à¸²à¸à¸£
+พิà¸à¸±à¸•à¸´
+พิà¸à¸±à¸™
+พิà¸à¸²à¸£
+พิà¸à¸¸à¸¥
+พิà¸à¸¸à¸¥à¸›à¹ˆà¸²
+พิเคราะห์
+พิฆน์
+พิฆเนศ
+พิฆเนศวร
+พิฆาต
+พิง
+พิจย
+พิจล
+พิจัย
+พิจาร
+พิจารณ์
+พิจารณา
+พิจิà¸
+พิจิต
+พิจิตร
+พิชà¸à¹Œ
+พิชย
+พิชัย
+พิชัยสงคราม
+พิชาน
+พิชิต
+พิชิต-
+พิชิตมาร
+พิเชà¸
+พิเชียร
+พิฑูรย์
+พิณ
+พิณพาทย์
+พิดทูล
+พิดรà¸
+พิดาน
+พิโดร
+พิตร
+พิถย-
+พิถยันดร
+พิถี
+พิถีพิถัน
+พิทย-
+พิทย์
+พิทยา
+พิทยาคม
+พิทยาคาร
+พิทยาธร
+พิทยาพล
+พิทยาลัย
+พิทัà¸à¸©à¹Œ
+พิทัà¸à¸©à¹Œà¸ªà¸±à¸™à¸•à¸´
+พิทูร
+พิเทศ
+พิธาน
+พิธี
+พิธีà¸à¸£
+พิธีà¸à¸£à¸£à¸¡
+พิธีà¸à¸²à¸£
+พิธีจุ่ม
+พิธีà¹à¸•à¸
+พิธีธรรม
+พิธีมณฑล
+พิธีรีตอง
+พิธีสาร
+พิธุ
+พิธุร
+พินทุ
+พินทุà¸à¸±à¸›
+พินทุสร
+พินพง
+พิ่นพั่ง
+พินอบพิเทา
+พินัย
+พินัยà¸à¸£à¸£à¸¡
+พินาศ
+พินิจ
+พินิต
+พินิศ
+พินิศจัย
+พิเนต
+พิบัติ
+พิบาà¸
+พิบุล
+พิบูล
+พิปริต
+พิปลาส
+พิปัสสนา
+พิพรรธ
+พิพรรธน์
+พิพัà¸à¸žà¸´à¸žà¹ˆà¸§à¸™
+พิพัฒ
+พิพัฒน์
+พิพาà¸à¸©à¹Œ
+พิพาà¸à¸©à¸²
+พิพาท
+พิพิธ
+พิพิธ-
+พิพิธภัณฑ์
+พิพิธภัณฑสถาน
+พิภพ
+พิภัช
+พิภาค
+พิภูษณะ
+พิเภà¸
+พิมปะà¸à¸²à¸£à¸±à¸‡
+พิมพ-
+พิมพ์
+พิมพà¸à¸²à¸£à¸±à¸‡
+พิมพ์เขียว
+พิมพ์ใจ
+พิมพ์ดีด
+พิมพ์ทอง
+พิมพ์ลายมือ
+พิมพ์สัมผัส
+พิมพา
+พิมพาภรณ์
+พิมโพหนะ
+พิมล
+พิมเสน
+พิมาน
+พิมุข
+พิโมà¸à¸‚์
+พิโมà¸à¸©à¹Œ
+พิโยà¸à¸žà¸´à¹€à¸à¸™
+พิโยค
+พิร
+พิรอด
+พิราà¸à¸¥
+พิราบ
+พิราม
+พิราลัย
+พิริย-
+พิริยพฤนท์
+พิริยโยธา
+พิริยะ
+พิรี้พิไร
+พิรุณ
+พิรุธ
+พิรุฬห์
+พิเราะ
+พิโรธ
+พิโรธนะ
+พิไร
+พิลังà¸à¸²à¸ªà¸²
+พิลาป
+พิลาลส
+พิลาส
+พิลิปดา
+พิลึà¸
+พิลึà¸à¸à¸¶à¸à¸à¸·à¸­
+พิลึà¸à¸žà¸´à¸¥à¸±à¹ˆà¸™
+พิโลน
+พิโลล
+พิไล
+พิศ
+พิศวง
+พิศวาส
+พิศาล
+พิศุทธ์
+พิศุทธิ์
+พิเศษ
+พิษ
+พิษ-
+พิษà¸à¸²à¸™
+พิษนาศน์
+พิษสง
+พิษสมโยค
+พิษสุนัขบ้า
+พิษสุราเรื้อรัง
+พิสดาร
+พิสมร
+พิสมัย
+พิสมัยเรียงหมอน
+พิสัง
+พิสัช
+พิสัà¸à¸à¸µ
+พิสัย
+พิสิà¸
+พิสุทธิ์
+พิสูจน์
+พิหค
+พิหเคนทร์
+พิหาร
+พิฬาร
+พี
+พี่
+พี้
+พีชคณิต
+พี่น้อง
+พี่เบิ้ม
+พี้โพ้
+พีร-
+พีระมิด
+พี่เลี้ยง
+พึง
+พึ่ง
+พึ่งจมูà¸à¸„นอื่นหายใจ
+พึงใจ
+พึงตา
+พึ่งลำà¹à¸‚้งตัวเอง
+พึ่บ
+พึม
+พึมพำ
+พืช
+พืชคาม
+พืชชั้นต่ำ
+พืชชั้นสูง
+พืชพันธุ์
+พืด
+พื้น
+พื้นๆ
+พื้นความรู้
+พื้นà¸à¸²à¸™
+พื้นดี
+พื้นเดิม
+พื้นที่
+พื้นบ้าน
+พื้นเพ
+พื้นเมือง
+พื้นเสีย
+พุ
+พุà¸
+พุà¸à¸²à¸¡
+พุง
+พุ่ง
+พุงà¹à¸
+พุงจง
+พุงดอ
+พุงทะลาย
+พุงปลา
+พุงปลาช่อน
+พุงพวง
+พุงพ่วง
+พุ่งหลาว
+พุ่งหอà¸à¹€à¸‚้ารà¸
+พุ่งà¹à¸«à¸¥à¸™
+พุฒ
+พุฒิ
+พุด
+พุดตาน
+พุทธ
+พุทธ-
+พุทธà¸à¸²à¸¥
+พุทธคุณ
+พุทธจัà¸à¸£
+พุทธเจดีย์
+พุทธชาด
+พุทธฎีà¸à¸²
+พุทธตันตระ
+พุทธปà¸à¸´à¸¡à¸²
+พุทธปà¸à¸´à¸¡à¸²à¸à¸£
+พุทธมามà¸à¸°
+พุทธรัà¸à¸©à¸²
+พุทธศัà¸à¸£à¸²à¸Š
+พุทธศาสนิà¸à¸Šà¸™
+พุทธสมัย
+พุทธะ
+พุทธังà¸à¸¹à¸£
+พุทธันดร
+พุทธางà¸à¸¹à¸£
+พุทธาวาส
+พุทธิ
+พุทธุปบาทà¸à¸²à¸¥
+พุทโธ่
+พุทรา
+พุธ
+พุพอง
+พุ่ม
+พุ่มข้าวบิณฑ์
+พุ่มพวง
+พุ่มม่าย
+พุมเรียง
+พุ้ย
+พู
+พู่
+พู่à¸à¸¥à¸´à¹ˆà¸™
+พู่à¸à¸±à¸™
+พูà¸à¸²à¸¡
+พูด
+พูดคล่องเหมือนล่องน้ำ
+พูดจนลิงหลับ
+พูดจริงทำจริง
+พูดเป็นต่อยหอย
+พูดเป็นนัย
+พูดเป็นน้ำไหลไฟดับ
+พูดเป็นไฟ
+พูดไปสองไพเบี้ย นิ่งเสียตำลึงทอง
+พูดอย่างมะนาวไม่มีน้ำ
+พูน
+พู้น
+พูพอน
+พู่ระหง
+เพ
+เพ็à¸
+เพà¸à¸²
+เพคะ
+เพ็ง
+เพ่ง
+เพ่งเล็ง
+เพ็จ
+เพ็จไม้
+เพชฉลูà¸à¸£à¸£à¸¡
+เพชฌฆาต
+เพชร
+เพชร-
+เพชรà¸à¸¥à¸±à¸š
+เพชรซีà¸
+เพชรดา
+เพชรตัดเพชร
+เพชรตาà¹à¸¡à¸§
+เพชรน้ำค้าง
+เพชรน้ำหนึ่ง
+เพชรนิลจินดา
+เพชรปาณี
+เพชรร่วง
+เพชรร้าว
+เพชรฤà¸à¸©à¹Œ
+เพชรลูà¸
+เพชรสังฆาต
+เพชรหลีà¸
+เพชรหึง
+เพชรายุธ
+เพ็à¸
+เพฑูริย์
+เพณี
+เพ็ดทูล
+เพดาน
+เพดานบิน
+เพตร
+เพท
+เพทนา
+เพทาย
+เพทุบาย
+เพโท
+เพโทบาย
+เพ่นพ่าน
+เพนียด
+เพไนย
+เพ้ย
+เพรง
+เพรซีโอดิเมียม
+เพรา
+เพรางาย
+เพราพริ้ง
+เพราเพริศ
+เพราะ
+เพราะฉะนั้น
+เพราะว่า
+เพริด
+เพริศ
+เพริศพราย
+เพริศพริ้ง
+เพริศà¹à¸žà¸£à¹‰à¸§
+เพรียà¸
+เพรียà¸à¸žà¸£à¹‰à¸­à¸‡
+เพรียง
+เพรียงคอห่าน
+เพรียงเมือง
+เพรียบ
+เพรี้ยม
+เพรี้ยมพราย
+เพรียว
+เพรียวลม
+เพรื่อ
+เพรือง
+เพล
+เพลง
+เพลงเชิด
+เพลงตระเชิà¸
+เพลงยาว
+เพลงสาธุà¸à¸²à¸£
+เพลงเสมอ
+เพลงหน้าพาทย์
+เพล็ด
+เพล้โพล้
+เพลา
+เพลาะ
+เพลาะà¹à¸žà¸¥à¸°
+เพลิง
+เพลิงà¸à¸±à¸¥à¸›à¹Œ
+เพลิงฟ้า
+เพลิดเพลิน
+เพลิน
+เพลีย
+เพลี้ย
+เพลี่ยง
+เพลี่ยงพล้ำ
+เพลียใจ
+เพศ
+เพศยันดร
+เพส
+เพสลาด
+เพ่อ
+เพ้อ
+เพ้อเจ้อ
+เพอิà¸
+เพะ
+เพา
+เพาพะงา
+เพาพาล
+เพาะ
+เพิà¸
+เพิà¸à¹€à¸‰à¸¢
+เพิà¸à¸–อน
+เพิง
+เพิ่ง
+เพิดเพ้ย
+เพิ่ม
+เพิ่มเติม
+เพิ่มพูน
+เพี้ย
+เพี้ยà¸à¸§à¸²à¸™
+เพี้ยà¸à¸§à¹‰à¸²à¸™
+เพียง
+เพี้ยง
+เพียงดัง
+เพียงนั้น
+เพียงนี้
+เพียงพอ
+เพียงออ
+เพียชน์
+เพียน
+เพี้ยน
+เพี้ยนผัด
+เพียบ
+เพียบพร้อม
+เพียร
+เพื่อ
+เพื่อน
+เพื่อนเà¸à¸¥à¸­
+เพื่อนเจ้าบ่าว
+เพื่อนเจ้าสาว
+เพื่อนบ้าน
+เพื่อนà¸à¸¹à¸‡
+à¹à¸ž
+à¹à¸žà¹‰
+à¹à¸žà¸‚นานยนต์
+à¹à¸žà¸‡
+à¹à¸žà¹ˆà¸‡
+à¹à¸žà¸‡à¸žà¸§à¸¢
+à¹à¸žà¸‡à¸žà¸§à¸¢à¸à¸£à¸±à¹ˆà¸‡
+à¹à¸žà¹‡à¸‡à¹à¸žà¸§
+à¹à¸žà¹à¸•à¸
+à¹à¸žà¸—ย-
+à¹à¸žà¸—ย์
+à¹à¸žà¸—ยศาสตร์
+à¹à¸žà¸—ยา
+à¹à¸žà¹‰à¸—้อง
+à¹à¸žà¸™
+à¹à¸žà¹ˆà¸™
+à¹à¸žà¸™à¸
+à¹à¸žà¸™à¸‡à¹€à¸Šà¸´à¸‡
+à¹à¸žà¹‰à¹€à¸›à¹‡à¸™à¸žà¸£à¸° ชนะเป็นมาร
+à¹à¸žà¹‰à¹€à¸›à¸£à¸µà¸¢à¸š
+à¹à¸žà¹‰à¸œà¸¡
+à¹à¸žà¹‰à¸œà¸±à¸§
+à¹à¸žà¹‰à¸Ÿà¸±à¸™
+à¹à¸žà¹‰à¸ à¸±à¸¢à¸•à¸±à¸§
+à¹à¸žà¹‰à¹€à¸¡à¸µà¸¢
+à¹à¸žà¸£
+à¹à¸žà¸£à¹ˆ
+à¹à¸žà¸£à¸
+à¹à¸žà¸£à¹ˆà¸‚่าว
+à¹à¸žà¸£à¹ˆà¸‡
+à¹à¸žà¸£à¹ˆà¸‡à¸žà¸£à¸²à¸¢
+à¹à¸žà¸£à¸§
+à¹à¸žà¸£à¹‰à¸§
+à¹à¸žà¸£à¸§à¸žà¸£à¸²à¸¢
+à¹à¸žà¸£à¸§à¸žà¸£à¸²à¸§
+à¹à¸žà¸£à¹ˆà¸«à¸¥à¸²à¸¢
+à¹à¸žà¹‰à¸£à¸¹à¹‰
+à¹à¸žà¹‰à¹à¸£à¸‡
+à¹à¸žà¸¥à¸‡
+à¹à¸žà¸¥à¸—ินัม
+à¹à¸žà¸¥à¸¡
+à¹à¸žà¸¥à¹€à¸¥à¹€à¸”ียม
+à¹à¸žà¸¥à¸°
+à¹à¸žà¸¥à¸°à¹‚ลม
+à¹à¸žà¸¥à¸¹à¸à¸šà¸§à¸š
+à¹à¸žà¸§
+à¹à¸žà¹‰à¸§
+à¹à¸žà¸¨à¸¢à¹Œ
+à¹à¸žà¸¨à¸¢à¸²
+à¹à¸žà¸°
+à¹à¸žà¸°à¸£à¸±à¸šà¸šà¸²à¸›
+à¹à¸žà¸°à¹‚ลม
+โพ
+โพà¸
+โพà¸à¸žà¸²à¸¢
+โพง
+โพงพาง
+โพชฌงค์
+โพซิตรอน
+โพด
+โพทะเล
+โพà¹à¸—สเซียม
+โพธ
+โพธิ-
+โพธิ์
+โพธิà¸à¸²à¸“
+โพธิบัลลังà¸à¹Œ
+โพธิปัà¸à¸‚ิยธรรม
+โพธิสมภาร
+โพธิสัตว์
+โพน
+โพ้น
+โพนทะนา
+โพ้นทะเล
+โพนเพน
+โพบาย
+โพผัน
+โพย
+โพยà¸à¹Šà¸§à¸™
+โพยม
+โพยมยาน
+โพยมัน
+โพยมาน
+โพรà¸
+โพรง
+โพรงà¹à¸ªà¸¡
+โพรโทà¹à¸­à¸à¸—ิเนียม
+โพรมีเทียม
+โพระดà¸
+โพล่
+โพลง
+โพล่ง
+โพล้ง
+โพลน
+โพล้เพล้
+โพละ
+โพสพ
+ไพ
+ไพ่
+ไพจิตร
+ไพชน
+ไพชยนต์
+ไพฑูรย์
+ไพโดร
+ไพที
+ไพบูลย์
+ไพ่ป๊อà¸
+ไพพรรณ
+ไพเพิด
+ไพ่ไฟ
+ไพมอà¸
+ไพม้า
+ไพร
+ไพร่
+ไพรคิ้ว
+ไพรจิตร
+ไพรชน
+ไพรชยนต์
+ไพรฑูรย์
+ไพรที
+ไพรบูลย์
+ไพรปาà¸
+ไพร่พล
+ไพร่ฟ้า
+ไพรระหง
+ไพรเราะ
+ไพรวัน
+ไพรสณฑ์
+ไพร่สม
+ไพร่ส่วย
+ไพรสัณฑ์
+ไพรสาณฑ์
+ไพรสามà¸à¸­
+ไพร่หลวง
+ไพรัช
+ไพรัช-
+ไพรำ
+ไพริน
+ไพรินทร์
+ไพรี
+ไพรู
+ไพเราะ
+ไพโรจน์
+ไพล
+ไพล่
+ไพล่หลัง
+ไพศาข
+ไพศาข-
+ไพศาขบุรณมี
+ไพศาขมาส
+ไพศาล
+ไพเศษ
+ไพสพ
+ไพสิà¸
+ไพหาร
+ฟ
+ฟà¸
+ฟà¸à¸Šà¹‰à¸³à¸”ำเขียว
+ฟ้ง
+ฟรัà¸à¹‚ทส
+ฟรี
+ฟรีบาร์
+ฟลูออรีน
+ฟ่อ
+ฟ้อ
+ฟอà¸
+ฟอà¸à¸‹à¸±à¸
+ฟอà¸à¸œà¹‰à¸²
+ฟอà¸à¸žà¸¢à¸²à¸™
+ฟอà¸à¹‚ลหิต
+ฟอà¸à¸«à¸™à¸±à¸‡
+ฟอง
+ฟ่อง
+ฟ้อง
+ฟ้องà¸à¸¥à¸±à¸š
+ฟองà¸à¸²à¸¡
+ฟ้องตัวเอง
+ฟองเต้าหู้
+ฟองทะเล
+ฟองน้ำ
+ฟ่องฟู
+ฟองมัน
+ฟ้องà¹à¸¢à¹‰à¸‡
+ฟ้องร้อง
+ฟอด
+ฟอดà¹à¸Ÿà¸”
+ฟอน
+ฟ่อน
+ฟ้อน
+ฟ้อà¹à¸Ÿà¹‰
+ฟอร์มาลดีไฮด์
+ฟอร์มาลิน
+ฟอสฟอรัส
+ฟอสเฟต
+ฟะฟัด
+ฟะฟั่น
+ฟะฟ่าย
+ฟัà¸
+ฟัà¸à¸‚้าว
+ฟัà¸à¸•à¸±à¸§
+ฟัà¸à¸—อง
+ฟัà¸à¸Ÿà¸¸à¹‰à¸™
+ฟัà¸à¸Ÿà¸¹à¸¡
+ฟัà¸à¹€à¸«à¸¥à¸·à¸­à¸‡
+ฟัง
+ฟังà¸à¹Œà¸Šà¸±à¸™
+ฟังขึ้น
+ฟังได้
+ฟังไม่ได้ศัพท์ จับไปà¸à¸£à¸°à¹€à¸”ียด
+ฟังหูไว้หู
+ฟังออà¸
+ฟัด
+ฟัดเฟียด
+ฟัน
+ฟั่น
+ฟั้น
+ฟันคลื่น
+ฟันช้าง
+ฟันดาบ
+ฟันถาวร
+ฟันà¹à¸—้
+ฟันน้ำนม
+ฟันปลา
+ฟันà¸à¹ˆà¸²
+ฟั่นเà¸à¸·à¸­
+ฟันเฟือง
+ฟั่นเฟือน
+ฟันม้า
+ฟันเลื่อย
+ฟันหนู
+ฟันหลอ
+ฟ้า
+ฟาà¸
+ฟ้าคะนอง
+ฟ้าเคืองสันหลัง
+ฟาง
+ฟ่าง
+ฟางลอย
+ฟาด
+ฟาดเคราะห์
+ฟาดหัว
+ฟาทอม
+ฟาน
+ฟ้าผ่า
+ฟ้าà¸à¹ˆà¸­
+ฟ่าม
+ฟ้ามุ่ย
+ฟ้าไม่à¸à¸£à¸°à¹€à¸—ือนสันหลัง
+ฟาย
+ฟายน้ำตา
+ฟายมือ
+ฟาร์ม
+ฟ้าร้อง
+ฟ้าà¹à¸¥à¸š
+ฟาสซิสต์
+ฟ้าหลัว
+ฟิà¸
+ฟิด
+ฟิบ
+ฟิล์ม
+ฟิวส์
+ฟิสิà¸à¸ªà¹Œ
+ฟี่
+ฟี้
+ฟืน
+ฟื้น
+ฟื้นตัว
+ฟื้นà¸à¸­à¸¢
+ฟื้นฟู
+ฟื้นองค์
+ฟืม
+ฟุ
+ฟุ้ง
+ฟุ้งซ่าน
+ฟุ้งเฟ้อ
+ฟุ้งเฟื่อง
+ฟุต
+ฟุตบอล
+ฟุน
+ฟุบ
+ฟุ่บ
+ฟุฟะ
+ฟุ่มเฟือย
+ฟุลสà¹à¸à¹Šà¸›
+ฟู
+ฟู่
+ฟูà¸
+ฟูด
+ฟูดฟาด
+ฟูฟ่อง
+ฟูม
+ฟูมน้ำ
+ฟูมฟัà¸
+ฟูมฟาย
+ฟูมเลี้ยง
+เฟ็ด
+เฟ็ดหาว
+เฟ้น
+เฟลด์สปาร์
+เฟ้อ
+เฟอร์เมียม
+เฟอะ
+เฟอะฟะ
+เฟะ
+เฟะฟะ
+เฟิน
+เฟี้ยม
+เฟี้ยมเà¸à¹‰à¸²
+เฟี้ยว
+เฟือ
+เฟื่อ
+เฟื้อ
+เฟือง
+เฟื่อง
+เฟื้อง
+เฟื่องฟ้า
+เฟื่องฟุ้ง
+เฟื่องฟู
+เฟือน
+เฟือย
+เฟื้อย
+à¹à¸Ÿà¹ˆ
+à¹à¸Ÿà¸‡
+à¹à¸Ÿà¸Šà¸±à¹ˆà¸™
+à¹à¸Ÿà¸š
+à¹à¸Ÿà¹‰à¸¡
+à¹à¸Ÿà¸£à¸™à¹€à¸‹à¸µà¸¢à¸¡
+à¹à¸Ÿà¸¥à¸à¸‹à¹Œ
+à¹à¸Ÿà¸¥à¸•
+à¹à¸Ÿà¸°
+โฟà¸à¸±à¸ª
+ไฟ
+ไฟà¸à¸±à¸¥à¸›à¹Œ
+ไฟจุà¸à¸•à¸¹à¸”
+ไฟฉาย
+ไฟà¹à¸Šà¹‡à¸
+ไฟธาตุ
+ไฟฟ้า
+ไฟฟ้าà¸à¸£à¸°à¹à¸ª
+ไฟฟ้าสถิต
+ไฟลามทุ่ง
+ไฟสุมขอน
+ภ
+ภค
+ภควดี
+ภควัต
+ภควันต์
+ภควัม
+ภควา
+ภควาน
+ภคันทลา
+ภคินี
+ภณ
+ภณิดา
+ภพ
+ภมà¸à¸²à¸£
+ภมร
+ภมริน
+ภมรี
+ภมุ
+ภมุà¸à¸°
+ภมุà¸à¸²
+ภย-
+ภยันตราย
+ภยาคติ
+ภร
+ภรณี
+ภรณีภู
+ภรต
+ภรต-
+ภรตวรรษ
+ภรตศาสตร์
+ภรรดร
+ภรรดา
+ภรรยา
+ภระมร
+ภระมรี
+ภรัสดาษ
+ภราดร
+ภราดรภาพ
+ภราดา
+ภราตร-
+ภราตรภาพ
+ภราตฤ-
+ภราตฤภาพ
+ภริยา
+ภรู
+ภรูมณฑล
+ภฤงคาร
+ภฤดà¸
+ภฤดี
+ภฤตย์
+ภฤศ
+ภฤษà¸à¹Œ
+ภว
+ภว-
+ภวà¸à¸©à¸±à¸¢
+ภวตัณหา
+ภวนะ
+ภวปาระ
+ภวัคร
+ภวังค-
+ภวังค์
+ภวังคจิต
+ภวันดร
+ภวาภพ
+ภัà¸à¸‚ะ
+ภัà¸à¸”ี
+ภัà¸à¸•-
+ภัà¸à¸•à¸à¸¤à¸•à¸¢à¹Œ
+ภัà¸à¸•à¸°
+ภัà¸à¸•à¸´
+ภัà¸à¸©-
+ภัà¸à¸©à¹Œ
+ภัà¸à¸©à¸à¸²à¸£
+ภัà¸à¸©à¸²
+ภัà¸à¸©à¸²à¸«à¸²à¸£
+ภัค
+ภัคน์
+ภังค-
+ภังคะ
+ภังคี
+ภัจ
+ภัà¸à¸Šà¸°
+ภัณฑ-
+ภัณฑ์
+ภัณฑครรภ
+ภัณฑนะ
+ภัณฑาคาร
+ภัณฑาคาริà¸
+ภัณฑารัà¸à¸©à¹Œ
+ภัณฑู
+ภัณฑูà¸à¸£à¸£à¸¡
+ภัต
+ภัต-
+ภัตà¸à¸´à¸ˆ
+ภัตตาคาร
+ภัตตาหาร
+ภัตร
+ภัทร
+ภัทร-
+ภัทรà¸à¸±à¸›
+ภัทรà¸à¸¸à¸¡à¸ à¹Œ
+ภัทรบทมาส
+ภัทรบิà¸
+ภัพ
+ภัย
+ภัสดา
+ภัสตรา
+ภัสมะ
+ภัสสร
+ภา
+ภาà¸à¸£
+ภาค
+ภาค-
+ภาคตัดà¸à¸£à¸§à¸¢
+ภาคทฤษฎี
+ภาคทัณฑ์
+ภาคนิพนธ์
+ภาคปà¸à¸´à¸šà¸±à¸•à¸´
+ภาคพื้น
+ภาคภูมิ
+ภาคย์
+ภาคยานุวัติ
+ภาคเรียน
+ภาคเสธ
+ภาคินี
+ภาคิไนย
+ภาคี
+ภาคียะ
+ภาชนะ
+ภาชนีย-
+ภาชี
+ภาณ
+ภาณ-
+ภาณà¸
+ภาณวาร
+ภาณี
+ภาณุ
+ภาณุมาศ
+ภาดร
+ภาดา
+ภาตร
+ภาตา
+ภาติà¸à¸°
+ภาติยะ
+ภาตุ
+ภาพ
+ภาพ-
+ภาพà¸à¸²à¸
+ภาพจริง
+ภาพถ่าย
+ภาพนิ่ง
+ภาพประà¸à¸­à¸š
+ภาพปูนเปียà¸
+ภาพพจน์
+ภาพย์
+ภาพยนตร์
+ภาพลวงตา
+ภาพลัà¸à¸©à¸“์
+ภาพเสมือน
+ภาพหุ่นนิ่ง
+ภาม
+ภาย
+ภายนอà¸
+ภายใน
+ภายหน้า
+ภายหลัง
+ภาร
+ภาร-
+ภารà¸à¸´à¸ˆ
+ภารดี
+ภารต
+ภารต-
+ภารตวิทยา
+ภารตี
+ภารธุระ
+ภารยทรัพย์
+ภารยา
+ภารโรง
+ภาระ
+ภาระจำยอม
+ภาระติดพัน
+ภาระติดพันในอสังหาริมทรัพย์
+ภารา
+ภาว-
+ภาวนา
+ภาวนามัย
+ภาวศุทธิ
+ภาวะ
+ภาวะฉุà¸à¹€à¸‰à¸´à¸™
+ภาษ
+ภาษà¸
+ภาษณ์
+ภาษา
+ภาษาศาสตร์
+ภาษิต
+ภาษี
+ภาษีเงินได้
+ภาษีบำรุงท้องที่
+ภาษีมูลค่าเพิ่ม
+ภาษีโรงเรือนà¹à¸¥à¸°à¸—ี่ดิน
+ภาษีสรรพสามิต
+ภาส
+ภาส-
+ภาสà¸à¸£
+ภาสน์
+ภาสวร
+ภาสา
+ภาสุร
+ภิà¸à¸‚า
+ภิà¸à¸‚าจาร
+ภิà¸à¸‚าหาร
+ภิà¸à¸‚ุ
+ภิà¸à¸‚ุนี
+ภิà¸à¸©à¸²
+ภิà¸à¸©à¸²à¸ˆà¸²à¸£
+ภิà¸à¸©à¸²à¸«à¸²à¸£
+ภิà¸à¸©à¸¸
+ภิà¸à¸©à¸¸à¸“ี
+ภิงคาร
+ภิงส
+ภิงสนะ
+ภิงสร
+ภิà¸à¹‚à¸
+ภิà¸à¹‚à¸à¸ à¸²à¸ž
+ภิตติ
+ภิท
+ภิน-
+ภินชาติ
+ภินท-
+ภินท์
+ภินทน-
+ภินทนาà¸à¸²à¸£
+ภินวรรณ
+ภิยโย
+ภิยโยภาพ
+ภิรมย์
+ภิรมย์สุรางค์
+ภิษัช
+ภิส
+ภิสัà¸
+ภีตะ
+ภีม
+ภีรุ
+ภีรุà¸-
+ภีรุà¸à¸Šà¸²à¸•à¸´
+ภุà¸à¸•-
+ภุà¸à¸•à¹Œ
+ภุà¸à¸•à¹€à¸¨à¸©
+ภุà¸à¸•à¸²à¸«à¸²à¸£
+ภุขัน
+ภุช
+ภุช-
+ภุชค
+ภุชงค์
+ภุชงคประยาต
+ภุชงคม
+ภุชสมโภค
+ภุชา
+ภุà¸à¸Š
+ภุต
+ภุม
+ภุม-
+ภุมเทวดา
+ภุมระ
+ภุมรัตน์
+ภุมรา
+ภุมริน
+ภุมรี
+ภุมเรศ
+ภุมวาร
+ภุส
+ภู
+ภู่
+ภูเขา
+ภูเขาน้ำà¹à¸‚็ง
+ภูเขาไฟ
+ภูโช
+ภูดล
+ภูดาด
+ภูต
+ภูต-
+ภูตคาม
+ภูตบดี
+ภูตรูป
+ภูติ
+ภูตี
+ภูเตศวร
+ภูธร
+ภูธเรศ
+ภูธเรศวร
+ภูนาถ
+ภูนายà¸
+ภูเนตุ
+ภูบดินทร์
+ภูบดี
+ภูบาล
+ภูเบนทร์
+ภูเบศ
+ภูเบศวร์
+ภูป
+ภูผา
+ภูภุช
+ภูม
+ภูมิ
+ภูมิ-
+ภูมิคุ้มà¸à¸±à¸™
+ภูมิใจ
+ภูมิà¸à¸²à¸™
+ภูมิธร
+ภูมิธรรม
+ภูมินทร์
+ภูมินาถ
+ภูมิบดี
+ภูมิบริมาณ
+ภูมิบาล
+ภูมิประเทศ
+ภูมิปัà¸à¸à¸²
+ภูมิà¹à¸žà¹‰
+ภูมิภาค
+ภูมิภุช
+ภูมิรัà¸à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+ภูมิรู้
+ภูมิลำเนา
+ภูมิศาสตร์
+ภูมิศาสตร์à¸à¸²à¸¢à¸ à¸²à¸ž
+ภูมิศาสตร์à¸à¸²à¸£à¹€à¸à¸©à¸•à¸£
+ภูมิศาสตร์à¸à¸²à¸£à¹€à¸¡à¸·à¸­à¸‡
+ภูมิศาสตร์ประชาà¸à¸£
+ภูมิศาสตร์ประวัติ
+ภูมิศาสตร์เศรษà¸à¸à¸´à¸ˆ
+ภูมี
+ภูมีศวร
+ภูรโลà¸
+ภูริ
+ภูรี
+ภูว-
+ภูวดล
+ภูวน-
+ภูวนตรัย
+ภูวนัตตรัย
+ภูวนาถ
+ภูวเนตร
+ภูวไนย
+ภูษณ-
+ภูษณพาส
+ภูษา
+ภูษามาลา
+ภูษาโยง
+ภูษิต
+เภà¸à¸°
+เภคะ
+เภตรา
+เภท
+เภทภัย
+เภทุบาย
+เภรว
+เภริ
+เภรี
+เภสัช
+เภสัช-
+เภสัชà¸à¸£
+เภสัชà¸à¸£à¸£à¸¡
+เภสัชเคมี
+เภสัชพฤà¸à¸©à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+เภสัชเพลา
+เภสัชวิทยา
+เภสัชเวท
+เภสัชศาสตร์
+เภสัชอุตสาหà¸à¸£à¸£à¸¡
+โภค
+โภค-
+โภคทรัพย์
+โภคภัณฑ์
+โภคยทรัพย์
+โภคะ
+โภคิน
+โภคี
+โภไคย
+โภไคศวรรย์
+โภช
+โภชà¸
+โภชน-
+โภชนะ
+โภชนะห้า
+โภชนาà¸à¸£
+โภชนาà¸à¸²à¸£
+โภชนาหาร
+โภชย์
+ไภริน
+ไภรี
+ไภษัชคุรุ
+ไภษัชย์
+ม
+มà¸
+มà¸à¸£
+มà¸à¸£-
+มà¸à¸£à¸à¸¸à¸“ฑล
+มà¸à¸£à¸²à¸„ม
+มà¸à¸ª
+มà¸à¸¸à¸Ž
+มà¸à¸¸à¸Žà¸£à¸²à¸Šà¸à¸¸à¸¡à¸²à¸£
+มà¸à¸¸à¸¥
+มคธ
+มฆ
+มฆวัน
+มฆา
+ม่ง
+มงà¸à¸¸à¸Ž
+มงà¸à¸¸à¸Žà¹„ทย
+มงโà¸à¸£à¸¢
+มงคล
+มงคล-
+มงคลจัà¸à¸£
+มงคลà¹à¸à¸”
+มงคลวาท
+มงคลวาร
+มงคลสูตร
+มงคลหัตถี
+มณฑ์
+มณฑà¸
+มณฑนะ
+มณฑป
+มณฑล
+มณฑา
+มณฑารพ
+มณฑิร
+มณเฑียร
+มณเฑียรบาล
+มณี
+มณีà¸à¸²à¸£
+มณีพืช
+มณีรัตน์
+มณีราค
+มณีศิลา
+มด
+มดดำ
+มดà¹à¸”ง
+มดà¹à¸”งเà¸à¹‰à¸²à¸¡à¸°à¸¡à¹ˆà¸§à¸‡
+มดเท็จ
+มดยอบ
+มดลูà¸
+มดส้ม
+มดาย
+มดี
+มต-
+มตà¸
+มตà¸à¸ à¸±à¸•
+มตะ
+มติ
+มติมหาชน
+มท
+มทนะ
+มทนียะ
+มธุ
+มธุà¸à¸£
+มธุà¸à¸£à¸µ
+มธุà¸à¸²à¸£à¸µ
+มธุโà¸à¸¨
+มธุตฤณ
+มธุป
+มธุปฎล
+มธุปายาส
+มธุพรต
+มธุมัà¸à¸‚ิà¸à¸²
+มธุมิศร
+มธุร-
+มธุรตรัย
+มธุรพจน์
+มธุรส
+มธุระ
+มธุลีห์
+มธุเศษ
+มธุสร
+มน
+ม่น
+มนต์
+มนตร์
+มนตรี
+มนท-
+มนท์
+มนทà¸à¸²à¸™à¸•à¸´
+มนทาทร
+มนทิร
+มนทิราลัย
+มนเทียร
+มนเทียรบาล
+มนสิà¸à¸²à¸£
+มนัส
+มนัส-
+มนัสดาป
+มนัสวี
+มนิมนา
+มนิลา
+มนีมนา
+มนุ
+มนุช
+มนุชาธิป
+มนุà¸
+มนุษย-
+มนุษย์
+มนุษย์à¸à¸š
+มนุษยชาติ
+มนุษยเทพ
+มนุษยธรรม
+มนุษยโลà¸
+มนุษยศาสตร์
+มนุษยสัมพันธ์
+มนุษย์อวà¸à¸²à¸¨
+มนุสาร
+มนู
+มนูสาร
+มโน
+มโนà¸à¸£à¸£à¸¡
+มโนคติ
+มโนช
+มโนชà¸à¹Œ
+มโนธรรม
+มโนนุà¸à¸¹à¸¥
+มโนภาพ
+มโนภินิเวศ
+มโนมัย
+มโนรถ
+มโนรม
+มโนรมย์
+มโนราห์
+มโนศิลา
+มโนสาร
+มโนสาเร่
+มโนหร
+มมังà¸à¸²à¸£
+มมาà¸
+มยุร-
+มยุรคติ
+มยุรฉัตร
+มยุรอาสน์
+มยุระ
+มยุรา
+มยุรี
+มยุเรศ
+มยูข
+มยูร
+มร
+มรà¸à¸•
+มรคา
+มรฑป
+มรณ-
+มรณ์
+มรณà¸à¸£à¸£à¸¡
+มรณธรรม
+มรณบัตร
+มรณภัย
+มรณภาพ
+มรณะ
+มรณันติà¸-
+มรณานต์
+มรดà¸
+มรรค
+มรรคนายà¸
+มรรคา
+มรรตย
+มรรตัย
+มรรทน
+มรรยาท
+มรรษ
+มรสุม
+มรัมเทศ
+มรานควาน
+มริจ
+มริยาท
+มรีจิ
+มรุ
+มรุต
+มฤค
+มฤค-
+มฤคทายวัน
+มฤคย์
+มฤคราช
+มฤคศิร
+มฤคศิรมาส
+มฤคศิรัส
+มฤคเศียร
+มฤคินทร์
+มฤเคนทร์
+มฤจฉา
+มฤจฉาชีพ
+มฤจฉาทิà¸à¸´
+มฤดà¸
+มฤต
+มฤตà¸
+มฤตยู
+มฤตยูราช
+มฤทิงค์
+มฤทุ
+มฤทุà¸à¸°
+มฤธุ
+มฤษา
+มฤษาวาท
+มล
+มล-
+มลโค
+มลทิน
+มลน
+มล่น
+มลนมลาน
+มลพิษ
+มลวà¸
+มล่อน
+มล่อย
+มละ
+มลัà¸
+มลังเมลือง
+มล้า
+มลาà¸
+มล้าง
+มลาน
+มล่าน
+มลาย
+มลายู
+มลาว
+มล่าวเมลา
+มลิน
+มลิ้น
+มลื่น
+มวà¸
+มวà¸à¸œà¸²
+มวà¸à¹€à¸«à¸¥à¹‡à¸
+มวà¸à¹ƒà¸«à¸à¹ˆ
+ม่วง
+มวน
+ม่วน
+ม้วน
+ม้วนต้วน
+ม้วนเสื่อ
+ม้วนหน้า
+มวย
+ม้วย
+มวยไทย
+มวยปล้ำ
+มวยล้ม
+มวยวัด
+มวยสาà¸à¸¥
+มวยหมู่
+มวล
+มวลสาร
+มวลอาà¸à¸²à¸¨
+มสาร
+มสารà¸
+มสารคัล
+มสิ
+มหà¸à¸£à¸£à¸¡
+มหรณพ
+มหรรฆ
+มหรรณพ
+มหรสพ
+มหัคฆ
+มหัจฉริย-
+มหัจฉริยะ
+มหัณณพ
+มหัต
+มหัทธนะ
+มหันต-
+มหันต์
+มหันตโทษ
+มหัพภาค
+มหัล
+มหัลà¸à¸°
+มหัศจรรย์
+มหา
+มหาà¸à¸à¸´à¸™
+มหาà¸à¸²à¸¬
+มหาขันธà¸
+มหาจัà¸à¸£
+มหาชน
+มหาชัย
+มหาชาติ
+มหาโชตรัต
+มหาดไทย
+มหาดเล็à¸
+มหาดเล็à¸à¸£à¸²à¸¢à¸‡à¸²à¸™
+มหาตมะ
+มหาไถ่
+มหาเทพ
+มหาเทพี
+มหาเทวี
+มหาธาตุ
+มหานสะ
+มหานิà¸à¸²à¸¢
+มหานิล
+มหาบพิตร
+มหาบัณฑิต
+มหาพน
+มหาพรหม
+มหาภารต
+มหาภิเนษà¸à¸£à¸¡à¸“์
+มหาภูต
+มหาเมฆ
+มหายาน
+มหายุค
+มหารณพ
+มหาราช
+มหาราชลีลา
+มหาฤà¸à¸©à¹Œ
+มหาละลวย
+มหาละลาย
+มหาวงศ์
+มหาวรรค
+มหาวิทยาลัย
+มหาศาล
+มหาสงà¸à¸£à¸²à¸™à¸•à¹Œ
+มหาสดมภ์
+มหาสดำ
+มหาสมุทร
+มหาสาวà¸
+มหาหงส์
+มหาหิงคุ์
+มหาอำนาจ
+มหาอุจ
+มหาอุด
+มหาอุปราà¸à¸£
+มหิ
+มหิงส์
+มหิดล
+มหิทธิ
+มหิธร
+มหินท์
+มหิบดี
+มหิบาล
+มหิป
+มหิมา
+มหิศร
+มหิศวร
+มหิษ
+มหิษี
+มหึมา
+มหุดิฤà¸à¸©à¹Œ
+มหุรดี
+มหู
+มเหนทร์
+มเหยงค์
+มเหศ
+มเหศวร
+มเหศัà¸à¸”ิ์
+มเหสัà¸à¸‚์
+มเหสิ
+มเหสี
+มเหาษธ
+มเหาฬาร
+มโหฆ
+มโหรสพ
+มโหระทึà¸
+มโหรี
+มโหษธ
+มโหฬาร
+มไหศวรรย์
+มอ
+มอคราม
+มอง
+มองโà¸à¸¥à¸­à¸¢à¸”์
+มองคร่อ
+มองเสี้ยว
+มอซอ
+มอà¸
+มอà¸à¸‹à¹ˆà¸­à¸™à¸œà¹‰à¸²
+มอà¸à¸•à¸µà¸”ั้ง
+มอด
+ม่อต้อ
+มอเตอร์
+มอน
+ม่อน
+มอนไข่
+มอบ
+มอบฉันทะ
+มอบหมาย
+มอบอำนาจ
+มอม
+มอมเมา
+มอมà¹à¸¡à¸¡
+มอมเหล้า
+ม่อย
+มอร์ฟีน
+มอระà¸à¸¹à¹ˆ
+มอลโทส
+ม่อลอà¸à¸¡à¹ˆà¸­à¹à¸¥à¸
+มอหมึà¸
+ม่อห้อม
+ม่อฮ่อม
+มะ
+มะà¸à¸£à¸¹à¸”
+มะà¸à¸¥à¹ˆà¸³
+มะà¸à¸­à¸
+มะà¸à¸­à¸à¸™à¹‰à¸³
+มะà¸à¸­à¸à¸šà¹‰à¸²à¸™
+มะà¸à¸­à¸à¸›à¹ˆà¸²
+มะà¸à¸­à¸à¸à¸£à¸±à¹ˆà¸‡
+มะà¸à¸­à¸à¸žà¸£à¸²à¸™
+มะà¸à¸­à¸à¸ªà¸²à¸¡à¸•à¸°à¸à¸£à¹‰à¸²à¸›à¸²à¹„ม่ถูà¸
+มะà¸à¹ˆà¸­à¸‡
+มะà¸à¸°à¹‚รนี
+มะà¸à¸²
+มะเà¸à¸¥à¸·à¸­
+มะเà¸à¸µà¹‹à¸¢à¸‡
+มะข่วง
+มะขวิด
+มะขาม
+มะขามคราบหมู
+มะขามเทศ
+มะขามป้อม
+มะขามเปียà¸
+มะเขือ
+มะเขือทวาย
+มะเขือเทศ
+มะเขือพวง
+มะเขือมอà¸
+มะà¹à¸‚่น
+มะคะ
+มะคังà¹à¸”ง
+มะค่า
+มะค่าà¹à¸•à¹‰
+มะค่าโมง
+มะค่าหนาม
+มะค่าใหà¸à¹ˆ
+มะคำไà¸à¹ˆ
+มะคำดีควาย
+มะงัน
+มะงั่ว
+มะงุมมะงาหรา
+มะซัà¸
+มะซาง
+มะซ่าน
+มะดะขี้นà¸
+มะดัน
+มะดา
+มะดูà¸
+มะเดหวี
+มะเดื่อ
+มะเดื่อดิน
+มะต้อง
+มะตะบะ
+มะตาด
+มะตาหะรี
+มะตี
+มะตึ่ง
+มะตื๋น
+มะตูม
+มะà¹à¸•à¸
+มะนาว
+มะนาวเทศ
+มะปราง
+มะปริง
+มะป่อง
+มะป่องต้น
+มะà¸à¹ˆà¸­
+มะพร้าว
+มะพร้าวà¹à¸à¹‰à¸§
+มะพร้าวตื่นดà¸
+มะพร้าวทุย
+มะพร้าวห้าว
+มะพลับ
+มะพูด
+มะà¹à¸žà¸™
+มะà¹à¸žà¸£à¹‰à¸§
+มะเฟือง
+มะà¹à¸Ÿà¸™
+มะไฟ
+มะไฟเดือนห้า
+มะม่วง
+มะม่วงหิมพานต์
+มะม่าว
+มะมี่
+มะมื่น
+มะมุด
+มะเมอ
+มะเมีย
+มะเมื่อย
+มะà¹à¸¡
+มะยง
+มะยงชิด
+มะยม
+มะระ
+มะริด
+มะรืน
+มะรุม
+มะรุมมะตุ้ม
+มะเร็ง
+มะเรื่อง
+มะโรง
+มะละà¸à¸­
+มะลารอà¸à¸±à¸™
+มะลำ
+มะลิ
+มะลิซ่อม
+มะลิน
+มะลิ่ม
+มะลิเลื้อย
+มะลิอ่อง
+มะลื่น
+มะลืมดำ
+มะลุลี
+มะวาร
+มะà¹à¸§à¹‰à¸‡
+มะสัง
+มะเส็ง
+มะหลิ่ม
+มะหวด
+มะหะหมัด
+มะหัล
+มะหาด
+มะหิ่ง
+มะเหงà¸
+มะเหมื่อย
+มะอึà¸
+มะฮอà¸à¸à¸²à¸™à¸µ
+มัà¸
+มัà¸à¸à¸°à¸¥à¸µà¸œà¸¥
+มัà¸à¸à¸°à¸ªà¸±à¸™
+มัà¸à¸‚ะ
+มั่à¸à¸‚ั้à¸
+มัà¸à¸‚ิà¸à¸²
+มัà¸à¸‚ิà¸à¸²à¸Šà¸²à¸•à¸´
+มัà¸à¸„ุ้น
+มัà¸à¸‡à¹ˆà¸²à¸¢
+มัà¸à¸à¸à¸°
+มัà¸à¸à¸°
+มัà¸à¹„ด้
+มัà¸à¸™à¹‰à¸­à¸¢
+มัà¸à¸¡à¸²à¸
+มัà¸à¹ƒà¸«à¸à¹ˆ
+มัค-
+มัคคะ
+มัคคุเทศà¸à¹Œ
+มัคนายà¸
+มัคสิระ
+มัฆวา
+มัฆวาน
+มั่ง
+มังà¸à¸‡
+มังà¸à¸£
+มังà¸à¸¸
+มังคละ
+มั่งคั่ง
+มังค่า
+มังคุด
+มังตาน
+มั่งมี
+มั่งมีในใจ à¹à¸¥à¹ˆà¸™à¹ƒà¸šà¸šà¸™à¸šà¸
+มังส-
+มังสวิรัติ
+มังสะ
+มังสี
+มังหงัน
+มัจจะ
+มัจจุ
+มัจจุราช
+มัจฉระ
+มัจฉริยะ
+มัจฉรี
+มัจฉะ
+มัจฉา
+มัจฉาชาติ
+มัช-
+มัชชะ
+มัชชาร
+มัชฌ-
+มัชฌันติà¸-
+มัชฌันติà¸à¸ªà¸¡à¸±à¸¢
+มัชฌิม-
+มัชฌิมนิà¸à¸²à¸¢
+มัชฌิมบุรุษ
+มัชฌิมประเทศ
+มัชฌิมภูมิ
+มัชฌิมยาม
+มัชฌิมวัย
+มัชฌิมา
+มัชฌิมาปà¸à¸´à¸›à¸—า
+มัชวิรัติ
+มัà¸à¸ˆà¸
+มัà¸à¸ˆà¸²
+มัà¸à¸Šà¸´à¸©à¸
+มัà¸à¸Šà¸´à¸©à¸à¸²
+มัà¸à¸Šà¸µà¸£
+มัà¸à¸Šà¸¸
+มัà¸à¸Šà¸¸à¸ªà¸²
+มัà¸à¸Šà¸¹à¸ªà¸²
+มัà¸à¹€à¸Šà¸à¸à¸°
+มัà¸à¹€à¸Šà¸à¸à¸´à¸à¸²
+มัà¸à¹€à¸Šà¸à¸à¸´à¸à¸²à¸à¸£
+มัà¸à¹€à¸Šà¸µà¸¢à¸£
+มัà¸à¸à¸°
+มัณฑ-
+มัณฑน-
+มัณฑนศิลป์
+มัณฑนา
+มัณฑุà¸
+มัด
+มัดจำ
+มัดเชื้อเพลิง
+มัดมือชà¸
+มัดหมี่
+มัดหมู
+มัดหวาย
+มัตตะ
+มัตตัà¸à¸à¸¹
+มัตตัย
+มัตตา
+มัตติà¸à¸²
+มัตถà¸
+มัตถลุงค์
+มัตย
+มัตสยะ
+มัตสยา
+มัตสร
+มัตสรรย์
+มัตสริน
+มัทนะ
+มัทนียะ
+มัทยะ
+มัธย-
+มัธยà¸à¸²à¸™
+มัธยม
+มัธยม-
+มัธยมà¸à¸²à¸¥
+มัธยมศึà¸à¸©à¸²
+มัธยมา
+มัธยันห์
+มัธยัสถ์
+มัน
+มั่น
+มันà¹à¸à¸§
+มั่นคง
+มั่นใจ
+มันดี
+มันตา
+มันถะ
+มันทิร
+มันทิราลัย
+มันเทศ
+มันนà¸
+มันปลา
+มันปู
+มันà¸à¸£à¸±à¹ˆà¸‡
+มันย่อง
+มันสมอง
+มันเสา
+มันไส้
+มั่นหมาย
+มั่นเหมาะ
+มับ
+มับๆ
+มั้ม
+มัมมี่
+มัย
+มัลà¸
+มัลละ
+มัลลิà¸à¸²
+มัว
+มั่ว
+มัวซัว
+มัวมอม
+มั่วมูล
+มัวเมา
+มัวเมีย
+มั่วสุม
+มัวหมอง
+มัศยา
+มัสดà¸
+มัสดุ
+มัสตาร์ด
+มัสตุ
+มัสมั่น
+มัสยิด
+มัสรู่
+มัสลิน
+มัสสุ
+มา
+ม้า
+มาà¸
+มาà¸à¸‚ี้ควายหลายขี้ช้าง
+มาà¸à¸¡à¸²à¸¢
+มาà¸à¸¡à¸²à¸¢à¸à¹ˆà¸²à¸¢à¸à¸­à¸‡
+มาà¸à¸«à¸™à¹‰à¸²à¸«à¸¥à¸²à¸¢à¸•à¸²
+มาà¸à¸«à¸¡à¸­à¸¡à¸²à¸à¸„วาม
+มาà¹à¸‚à¸
+มาคสิร-
+มาคสิระ
+มาฆ-
+มาฆบูชา
+มาฆะ
+ม้าง
+มางสะ
+ม้าใช้
+มาณพ
+มาณวิà¸à¸²
+มาด
+มาดา
+ม้าดีดà¸à¸°à¹‚หลà¸
+มาตงค์
+ม้าต้น
+มาตร
+มาตร-
+มาตรà¸à¸²à¸£
+มาตรà¸à¸²à¸™
+มาตรà¹à¸¡à¹‰à¸™
+มาตรว่า
+มาตรา
+มาตราพฤติ
+มาตราส่วน
+มาตฤ
+มาตฤà¸à¸°
+มาตสรรย์
+มาตังค
+มาตา
+มาตามหะ
+มาตามหัยà¸à¸°
+มาตามหัยà¸à¸²
+มาตามหัยยิà¸à¸²
+มาตามหา
+มาติà¸
+มาติà¸à¸²
+มาตี
+มาตุ
+มาตุคาม
+มาตุฆาต
+มาตุจฉา
+มาตุภูมิ
+มาตุรงค์
+มาตุเรศ
+มาตุละ
+มาตุลา
+มาตุลานี
+มาตุลุงค์
+มาท
+มาทน
+ม้าทลายโรง
+ม้าเทศ
+มาธยมิà¸à¸°
+มาธุร
+มาธุสร
+มาธูร
+มาน
+ม่าน
+ม้าน
+ม่านตา
+มานทะลุน
+ม่านบังเพลิง
+มานพ
+ม่านเมรุ
+ม่านลาย
+ม่านสองไข
+ม่านอินทนิล
+มานะ
+มานัต
+มานัส
+ม้าน้ำ
+มานิต
+มานี
+มานุษ
+มานุษย-
+มานุษยวิทยา
+มาโนชà¸à¹Œ
+มาบ
+มาปà¸
+มาภา
+ม้าม
+ม้ามืด
+มาย
+ม่าย
+ม่ายเมียง
+ม้าย่อง
+มายัง
+มายา
+มายาà¸à¸£
+มายาà¸à¸¥
+มายาà¸à¸²à¸£
+มายาประสาน
+มายาวี
+มาร
+มาร-
+มารค
+มารคอหอย
+มารชิ
+มารชิต
+มารดร
+มารดา
+มารผจà¸
+มารยา
+มารยาท
+มารวิชัย
+มารวิชิต
+มารศรี
+มารษา
+มารสังคม
+มารหัวขน
+มาระ
+มาราธิราช
+ม้ารำ
+มาริ
+มาริต
+มารุต
+มารุมมาตุ้ม
+ม้าเร็ว
+มาลย์
+ม้าล่อ
+มาลัย
+มาลา
+มาลาà¸à¸£à¸£à¸¡
+มาลาà¸à¸²à¸£
+มาลาตี
+ม้าลาย
+มาลาเรีย
+มาลำ
+มาลินี
+มาลี
+มาลุต
+มาวาร
+มาศ
+มาส
+มาสà¸
+ม้าสะบัดà¸à¸µà¸š
+มาห์
+ม่าห์
+มาหิส
+มาเหนือเมฆ
+ม่าเหมี่ยว
+มาฬà¸
+ม้าอ้วน
+มำเลือง
+มิ
+มิค
+มิค-
+มิคลุท
+มิคลุทà¸
+มิคเศียร
+มิคสัà¸à¸à¸µ
+มิคสิร-
+มิคสิระ
+มิคี
+มิ่ง
+มิ่งขวัà¸
+มิงโค
+มิ่งมิตร
+มิจฉา
+มิจฉาà¸à¸±à¸¡à¸¡à¸±à¸™à¸•à¸°
+มิจฉาจริยา
+มิจฉาจาร
+มิจฉาชีพ
+มิจฉาทิà¸à¸´
+มิจฉาบถ
+มิจฉาวาจา
+มิจฉาวายามะ
+มิจฉาสติ
+มิจฉาสมาธิ
+มิจฉาสังà¸à¸±à¸›à¸›à¸°
+มิจฉาอาชีวะ
+มิà¸à¸Š-
+มิด
+มิดชิด
+มิดเม้น
+มิดเมี้ยน
+มิดหมี
+มิดีมิร้าย
+มิได้
+มิต-
+มิตภาณี
+มิตร
+มิตร-
+มิตรจิต
+มิตรจิตมิตรใจ
+มิตรภาพ
+มิตรสหาย
+มิติ
+มิถยา
+มิถุน
+มิถุนายน
+มิทธะ
+มิทธี
+มินตรา
+มินตา
+มินหม้อ
+มิน่า
+มิน่าล่ะ
+มิน่าเล่า
+มิ่ม
+มิ้ม
+มิยา
+มิไย
+มิรันตี
+มิลลิà¸à¸£à¸±à¸¡
+มิลลิบาร์
+มิลลิเมตร
+มิลลิลิตร
+มิลัà¸à¸‚ะ
+มิลัà¸à¸‚ู
+มิลาต
+มิศร-
+มิศรà¸-
+มิส-
+มิสà¸-
+มิสà¸à¸£à¸µ
+มิสà¸à¸§à¸±à¸™
+มิสซา
+มิอย่ารา
+มิอย่าเลย
+มี
+มี่
+มีà¹à¸à¹ˆà¹ƒà¸ˆ
+มี่ฉาว
+มีชื่อ
+มีชู้
+มีด
+มีดโà¸à¸™
+มีดตอà¸
+มีดยับ
+มีดหมอ
+มีตาà¹à¸•à¹ˆà¸«à¸²à¸¡à¸µà¹à¸§à¸§à¹„ม่
+มีทองเท่าหนวดà¸à¸¸à¹‰à¸‡ นอนสะดุ้งจนเรือนไหว
+มีเทน
+มีน
+มีนาคม
+มีเฟื้องมีสลึง
+มีภาษีà¸à¸§à¹ˆà¸²
+มีเรือน
+มี่สั้ว
+มีเสียง
+มีหน้า
+มีหน้ามีตา
+มีฬห-
+มีอันจะà¸à¸´à¸™
+มีอันเป็น
+มีอายุ
+มึà¸
+มึà¸à¸¡à¸§à¸¢
+มึง
+มึงวาพาโวย
+มึน
+มึนงง
+มึนชา
+มึนซึม
+มึนตึง
+มึนเมา
+มืด
+มืดค่ำ
+มืดà¹à¸›à¸”ด้าน
+มืดฟ้ามัวดิน
+มืดมน
+มืดมัว
+มืดหน้า
+มืน
+มื่น
+มือ
+มื้อ
+มือà¸à¸²à¸§
+มือเà¸à¹ˆà¸²
+มือขวา
+มือขึ้น
+มือà¹à¸‚็ง
+มือดี
+มือตà¸
+มือเติบ
+มือถือสาภปาà¸à¸–ือศีล
+มือที่สาม
+มือบอน
+มือเบา
+มือปืน
+มือผี
+มือมืด
+มือไม่ถึง
+มือไม่พาย เอาตีนราน้ำ
+มือเย็น
+มือร้อน
+มือลิง
+มือไว
+มือสะอาด
+มือสั้นตีนสั้น
+มือสี
+มือเสือ
+มือหนัà¸
+มือหนึ่ง
+มือห่างตีนห่าง
+มือใหม่
+มืออ่อน
+มืออ่อนตีนอ่อน
+มุ
+มุà¸
+มุà¸à¸”า
+มุà¸à¸”าหาร
+มุà¸à¸¸à¸£
+มุà¸à¸¸à¸¥
+มุข
+มุข-
+มุขà¸à¸£à¸°à¸ªà¸±à¸™
+มุขเด็จ
+มุขบาà¸
+มุขมนตรี
+มุขย-
+มุขยประโยค
+มุขลด
+มุโขโลà¸à¸™à¸°
+มุคคะ
+มุคธ์
+มุคร
+มุง
+มุ่ง
+มุ้ง
+มุ้งà¸à¸£à¸°à¸•à¹ˆà¸²à¸¢
+มุ้งประทุน
+มุ่งมาด
+มุ่งร้ายหมายขวัà¸
+มุ้งลวด
+มุ้งสายบัว
+มุ่งหมาย
+มุจฉา
+มุจน
+มุจลินท์
+มุà¸à¸ˆà¸™à¸°
+มุà¸à¸Š
+มุà¸à¸´
+มุณฑ
+มุณฑà¸
+มุด
+มุดหัว
+มุต
+มุต-
+มุตà¸à¸´à¸”
+มุตฆาต
+มุตตะ
+มุตตา
+มุตติ
+มุติ
+มุติงค์
+มุทค
+มุทคร
+มุททา
+มุทธชะ
+มุทธา
+มุทธาภิเษà¸
+มุทรา
+มุทริà¸à¸²
+มุทะลุ
+มุทา
+มุทิà¸à¸²
+มุทิงค์
+มุทิตา
+มุทิน
+มุทุ
+มุทุตา
+มุ่น
+มุ่นใจ
+มุ่นหมà¸
+มุนิ
+มุนิà¸à¸¸à¸à¸Šà¸£
+มุนินทร์
+มุนี
+มุบ
+มุบๆ
+มุบมิบ
+มุม
+มุ่ม
+มุ้ม
+มุมà¸à¸”ลง
+มุมà¸à¹‰à¸¡
+มุมà¸à¸¥à¸±à¸š
+มุมเงย
+มุมฉาà¸
+มุมตà¸à¸à¸£à¸°à¸—บ
+มุมตรง
+มุมเท
+มุมบ่ายเบน
+มุมประชิด
+มุมป้าน
+มุมมืด
+มุมยà¸à¸‚ึ้น
+มุมà¹à¸¢à¹‰à¸‡
+มุมสะท้อน
+มุมหัà¸à¹€à¸«
+มุมเห
+มุมà¹à¸«à¸¥à¸¡
+มุ่ย
+มุรช
+มุรธา
+มุรธาภิเษà¸
+มุลุต
+มุลู
+มุสละ
+มุสลิม
+มุสะ
+มุสา
+มุสาวาท
+มุสิà¸
+มุหงิด
+มุหน่าย
+มุหุต
+มุฮัมมัด
+มูà¸
+มูà¸à¸¡à¸±à¸™
+มูà¸à¹€à¸¥à¸·à¸­à¸”
+มูà¸à¸«à¸¥à¸§à¸‡
+มูค-
+มูเซอ
+มูตร
+มู่ทู่
+มูน
+มูนมอง
+มูมมาม
+มูรดี
+มูรติ
+มูรธ-
+มูรธา
+มูรธาภิเษà¸
+มูล
+มูล-
+มูลค่า
+มูลโค
+มูลจิต
+มูลà¸à¸²à¸™
+มูลไถ
+มูลนà¸à¸à¸²à¸£à¹€à¸§à¸
+มูลนาย
+มูลนิธิ
+มูลà¸à¸­à¸¢
+มูลภัณฑ์à¸à¸±à¸™à¸Šà¸™
+มูละ
+มูลา
+มูลิà¸à¸²à¸à¸£
+มู่ลี่
+มู่เล่
+มูสัง
+มูสิà¸
+มูสิà¸-
+มูสิà¸à¸—ันต์
+มูฬห-
+เม
+เม็à¸
+เมà¸à¸°à¹€à¸®à¸´à¸£à¸•à¸‹à¹Œ
+เมขลา
+เมฆ
+เมฆคลุ้ม
+เมฆฉาย
+เมฆพัด
+เมฆมาà¸
+เมฆา
+เมฆินทร์
+เมฆี
+เม็ง
+เมงอะปา
+เม็ด
+เม็ดดี
+เม็ดพระศà¸
+เม็ดพราย
+เม็ดมะยม
+เม็ดละมุด
+เม็ดเลือด
+เม็ดโลหิต
+เมตตา
+เมตไตรย
+เมตร
+เมตริà¸
+เมตริà¸à¸•à¸±à¸™
+เมถุน
+เมท
+เมทนี
+เมทนีดล
+เมทินี
+เมทิลà¹à¸­à¸¥à¸à¸­à¸®à¸­à¸¥à¹Œ
+เมโท
+เมธ
+เมธา
+เมธาวี
+เมธี
+เมน
+เม่น
+เม้น
+เมนเดลีเวียม
+เมนทอล
+เม่นทะเล
+เม้ม
+เม้มปาà¸
+เมรย-
+เมรัย
+เมรุ
+เมรุ-
+เมรุมาศ
+เมรุราช
+เมล์
+เมลà¸
+เมล็ด
+เมลือง
+เมลื่อย
+เมลื้อย
+เมลื่อยมล้า
+เมษ
+เมษายน
+เมห
+เมห์
+เมหน
+เมะ
+เมา
+เม่า
+เม้า
+เม้าเค้า
+เมาดิบ
+เมามัน
+เมามัว
+เมามาย
+เมายศ
+เมารี
+เมาลี
+เมาห์
+เมาอำนาจ
+เมาะ
+เมาะตาโยà¸à¸±à¸
+เมาะว่า
+เมิง
+เมิน
+เมิล
+เมีย
+เมียง
+เมี่ยง
+เมียงม่าย
+เมี้ยน
+เมียน้อย
+เมียหลวง
+เมือ
+เมื่อ
+เมื้อ
+เมือà¸
+เมื่อà¸à¸µà¹‰
+เมือง
+เมืองขึ้น
+เมืองท่า
+เมืองท่าปลอดภาษี
+เมืองนอà¸
+เมืองหลวง
+เมืองออà¸
+เมื่อตะà¸à¸µà¹‰
+เมื่อนั้น
+เมือบ
+เมื่อพีเนื้อหอม เมื่อผอมเนื้อเหม็น
+เมื่อย
+เมื่อยปาà¸
+เมื่อเอยà¸à¹‡à¹€à¸¡à¸·à¹ˆà¸­à¸™à¸±à¹‰à¸™
+เมื่อเอยเมื่อนั้น
+à¹à¸¡à¹ˆ
+à¹à¸¡à¹‰
+à¹à¸¡à¸
+à¹à¸¡à¸à¸™à¸µà¹€à¸‹à¸µà¸¢à¸¡
+à¹à¸¡à¹ˆà¸à¸£à¸°à¸Šà¸±à¸‡à¸«à¸™à¹‰à¸²à¹ƒà¸«à¸à¹ˆ
+à¹à¸¡à¹ˆà¸à¸£à¸°à¹à¸Šà¸‡
+à¹à¸¡à¹ˆà¸à¸­à¸‡
+à¹à¸¡à¹ˆà¸à¸¸à¸à¹à¸ˆ
+à¹à¸¡à¹ˆà¸„ุณ
+à¹à¸¡à¹ˆà¸„ู่
+à¹à¸¡à¸‡
+à¹à¸¡à¸‡à¸à¸§à¸²à¸‡
+à¹à¸¡à¸‡à¸à¸°à¸žà¸£à¸¸à¸™
+à¹à¸¡à¸‡à¸à¸²à¸™à¸´à¸™
+à¹à¸¡à¸‡à¸à¸²à¸™à¸µà¸ª
+à¹à¸¡à¸‡à¸„าเรือง
+à¹à¸¡à¸‡à¸Šà¹‰à¸²à¸‡
+à¹à¸¡à¸‡à¸”า
+à¹à¸¡à¸‡à¸”าทะเล
+à¹à¸¡à¸‡à¸›à¸²à¸à¸ˆà¸­à¸š
+à¹à¸¡à¸‡à¹„ฟเดือนห้า
+à¹à¸¡à¹ˆà¸‡à¸¡à¹‰à¸²à¸‡
+à¹à¸¡à¸‡à¸¡à¸¸à¸¡
+à¹à¸¡à¸‡à¸¥à¸±à¸
+à¹à¸¡à¹ˆà¸‡à¸²à¸™
+à¹à¸¡à¹ˆà¹€à¸ˆà¹‰à¸²
+à¹à¸¡à¹ˆà¹€à¸ˆà¹‰à¸²à¹‚ว้ย
+à¹à¸¡à¹ˆà¸‹à¸·à¹‰à¸­
+à¹à¸¡à¹ˆà¸•à¸°à¸‡à¸²à¸§
+à¹à¸¡à¹ˆà¸•à¸²à¸¢
+à¹à¸¡à¹ˆà¹€à¸•à¸²à¹„ฟ
+à¹à¸¡à¹‰à¹à¸•à¹ˆ
+à¹à¸¡à¹ˆà¸—ัพ
+à¹à¸¡à¹ˆà¸—่า
+à¹à¸¡à¸™
+à¹à¸¡à¹ˆà¸™
+à¹à¸¡à¹‰à¸™
+à¹à¸¡à¹‰à¸™à¹€à¸‚ียน
+à¹à¸¡à¹ˆà¸™à¸¡
+à¹à¸¡à¹ˆà¸™à¸¢à¸³
+à¹à¸¡à¹ˆà¸™à¹‰à¸³
+à¹à¸¡à¹ˆà¸šà¸—
+à¹à¸¡à¹ˆà¸šà¹‰à¸²à¸™
+à¹à¸¡à¹ˆà¹€à¸šà¸µà¹‰à¸¢
+à¹à¸¡à¹ˆà¸›à¸°
+à¹à¸¡à¹ˆà¹à¸›à¸£à¸
+à¹à¸¡à¹ˆà¸žà¸´à¸¡à¸žà¹Œ
+à¹à¸¡à¹ˆà¸¡à¸”
+à¹à¸¡à¹ˆà¸¡à¹ˆà¸²à¸¢
+à¹à¸¡à¹ˆà¸¡à¹ˆà¸²à¸¢à¸—รงเครื่อง
+à¹à¸¡à¹ˆà¸¡à¹ˆà¸²à¸¢à¸¥à¸­à¸‡à¹„น
+à¹à¸¡à¹ˆà¸¢à¸±à¹ˆà¸§à¹€à¸¡à¸·à¸­à¸‡
+à¹à¸¡à¹ˆà¸¢à¹ˆà¸²à¸™à¸²à¸‡
+à¹à¸¡à¹ˆà¸¢à¸²à¸¢
+à¹à¸¡à¹ˆà¸¢à¹‰à¸²à¸§
+à¹à¸¡à¸£
+à¹à¸¡à¹ˆà¸£à¹‰à¸²
+à¹à¸¡à¹ˆà¸£à¹‰à¸²à¸‡
+à¹à¸¡à¹ˆà¸£à¸µà¹à¸¡à¹ˆà¹à¸£à¸”
+à¹à¸¡à¹ˆà¹€à¸£à¸·à¸­à¸™
+à¹à¸¡à¹ˆà¹à¸£à¸‡
+à¹à¸¡à¸¥à¸‡
+à¹à¸¡à¸¥à¸‡à¸Šà¹‰à¸²à¸‡
+à¹à¸¡à¸¥à¸‡à¸”า
+à¹à¸¡à¸¥à¸‡à¸”ำ
+à¹à¸¡à¸¥à¸‡à¸”ำหนาม
+à¹à¸¡à¸¥à¸‡à¸—ับเล็à¸
+à¹à¸¡à¸¥à¸‡à¸›à¸­
+à¹à¸¡à¸¥à¸‡à¸ à¸¹à¹ˆ
+à¹à¸¡à¸¥à¸‡à¸§à¸±à¸™
+à¹à¸¡à¸¥à¸‡à¸§à¸±à¸™à¸—อง
+à¹à¸¡à¸¥à¸‡à¸§à¸±à¸™à¸ªà¹€à¸›à¸™
+à¹à¸¡à¸¥à¸‡à¸§à¸±à¸™à¸«à¸±à¸§à¹€à¸‚ียว
+à¹à¸¡à¸¥à¸š
+à¹à¸¡à¹ˆà¸¥à¸²à¸¢
+à¹à¸¡à¹ˆà¹€à¸¥à¹‰à¸²
+à¹à¸¡à¹ˆà¹€à¸¥à¸µà¹‰à¸¢à¸‡
+à¹à¸¡à¸§
+à¹à¸¡à¹‰à¸§
+à¹à¸¡à¸§à¹€à¸‹à¸²
+à¹à¸¡à¸§à¸”าว
+à¹à¸¡à¸§à¸™à¹‰à¸³
+à¹à¸¡à¸§à¸›à¹ˆà¸²
+à¹à¸¡à¸§à¸¡à¸­à¸‡
+à¹à¸¡à¹ˆà¸§à¸µ
+à¹à¸¡à¹ˆà¸ªà¸²à¸¢à¸šà¸±à¸§à¹à¸•à¹ˆà¸‡à¸•à¸±à¸§à¸„้าง
+à¹à¸¡à¹ˆà¸ªà¸µ
+à¹à¸¡à¹ˆà¸ªà¸·à¹ˆà¸­
+à¹à¸¡à¹ˆà¸«à¸™à¸±à¸
+à¹à¸¡à¹ˆà¸«à¸¢à¸±à¹ˆà¸§à¹€à¸¡à¸·à¸­à¸‡
+à¹à¸¡à¹ˆà¹€à¸«à¸¢à¹‰à¸²à¹à¸¡à¹ˆà¹€à¸£à¸·à¸­à¸™
+à¹à¸¡à¹ˆà¹€à¸«à¸¥à¹‡à¸
+à¹à¸¡à¹ˆà¸­à¸¢à¸¹à¹ˆà¸«à¸±à¸§
+à¹à¸¡à¸°
+โม
+โม่
+โม้
+โมà¸
+โมà¸à¸‚-
+โมà¸à¸‚์
+โมà¸à¸‚บริสุทธิ์
+โมà¸à¹‚คà¸
+โมà¸à¸¡à¸±à¸™
+โมà¸à¸©-
+โมà¸à¸©à¸°
+โมà¸à¸©à¸°à¸žà¸¢à¸²à¸™
+โมà¸à¹ƒà¸«à¸à¹ˆ
+โมฆ-
+โมฆà¸à¸£à¸£à¸¡
+โมฆะ
+โมฆีย-
+โมฆียà¸à¸£à¸£à¸¡
+โมฆียะ
+โมง
+โม่ง
+โมงครุ่ม
+โม่งโค่ง
+โมจน-
+โมทนา
+โมน
+โมโนà¹à¸‹à¹‡à¸à¸„าไรด์
+โมไนย
+โมมูห์
+โมมูหะ
+โมเม
+โมเมนต์
+โมร-
+โมรà¸à¸¥à¸²à¸›
+โมรา
+โมรี
+โมเรส
+โมลิบดีนัม
+โมลี
+โมเลà¸à¸¸à¸¥
+โมษ
+โมษà¸
+โมษณ
+โมเสà¸
+โมเสส
+โมห-
+โม่ห์
+โมหะ
+โมหันธ์
+โมหาคติ
+โมโห
+ไม่
+ไม้
+ไม้à¸à¸‡
+ไมà¸à¸²
+ไม้à¸à¸²à¸à¸šà¸²à¸—
+ไม้à¸à¸²à¸‡à¹€à¸‚น
+ไม่à¸à¸µà¹ˆà¸™à¹‰à¸³
+ไม่à¸à¸µà¹ˆà¸­à¸±à¸
+ไม่à¸à¸µà¹ˆà¸­à¸±à¸à¸¬à¸ª
+ไม้ใà¸à¸¥à¹‰à¸à¸±à¹ˆà¸‡
+ไม้ขี้ฉ้อ
+ไม้ขีดไฟ
+ไม่เข้าใครออà¸à¹ƒà¸„ร
+ไม่เข้ายา
+ไม้à¹à¸‚็ง
+ไม้คมà¹à¸à¸
+ไมครอน
+ไม่ค่อย
+ไมโครà¸à¸£à¸±à¸¡
+ไมโครฟิล์ม
+ไมโครโฟน
+ไมโครมิเตอร์
+ไมโครเมตร
+ไมโครลิตร
+ไมโครเวฟ
+ไม่ใคร่
+ไม้งามà¸à¸£à¸°à¸£à¸­à¸à¹€à¸ˆà¸²à¸°
+ไม้จริง
+ไม้จัตวา
+ไม้จำปา
+ไม่ชอบมาพาà¸à¸¥
+ไม่เชิง
+ไม่ใช่ขี้ไà¸à¹ˆ
+ไม้ดัด
+ไม้ดำ
+ไม่ดูดำดูดี
+ไม่ดูดำดูà¹à¸”ง
+ไม่ดูตาม้าตาเรือ
+ไม้เด็ด
+ไม้à¹à¸”ง
+ไม่ได้เบี้ยออà¸à¸‚้าว
+ไม่ได้เบี้ยเอาข้าว
+ไม่ได้ศัพท์
+ไม่ได้สิบ
+ไมตรี
+ไม้ตรี
+ไม้ตาย
+ไม้ตายขาน
+ไม้ตีพริà¸
+ไม่เต็มเต็ง
+ไม่เต็มบาท
+ไม่เต็มหุน
+ไม้ไต่คู้
+ไม่ถูà¸à¹‚รคà¸à¸±à¸™
+ไม้ทัณฑฆาต
+ไม่ทัน
+ไม้เท้า
+ไม้เท้ายายม่อม
+ไม้โท
+ไม้นวม
+ไม้นอà¸à¸à¸­
+ไม้นิ้ว
+ไม้บรรทัด
+ไม้เบื่อไม้เมา
+ไม้ป่าเดียวà¸à¸±à¸™
+ไม้เป็น
+ไม้ผัด
+ไม่พูดพร่ำทำเพลง
+ไม้โพ
+ไม่ฟังเสียง
+ไม้มลาย
+ไม้ม้วน
+ไม่มีปี่มีà¸à¸¥à¸­à¸‡
+ไม่มีมูลà¸à¸­à¸¢à¸«à¸¡à¸²à¹„ม่ขี้
+ไม่มีวันเสียละ
+ไม้มืด
+ไม้มือ
+ไม้เมตร
+ไม้ยมà¸
+ไมยราบ
+ไม้ยามัà¸à¸à¸²à¸£
+ไม้ยาว
+ไม้ร่มนà¸à¸ˆà¸±à¸š
+ไม่รู้จัà¸à¹€à¸ªà¸·à¸­à¹€à¸­à¸²à¹€à¸£à¸·à¸­à¹€à¸‚้ามาจอด ไม่รู้จัà¸à¸¡à¸­à¸”เอาไม้เข้ามาวาง
+ไม่รู้จัà¸à¸«à¸±à¸§à¸™à¸­à¸™à¸›à¸¥à¸²à¸¢à¸•à¸µà¸™
+ไม่รู้อีโหน่อีเหน่
+ไม้เรียว
+ไมล์
+ไม่ลงโบสถ์à¸à¸±à¸™
+ไม้ล้มเงาหาย
+ไม้ล้มลุà¸
+ไม้ลอย
+ไม้เลี้ยง
+ไม้ไล่
+ไม้วา
+ไม้สอย
+ไม้สั้น
+ไม้สั้นไม้ยาว
+ไม้สามอัน
+ไม่สู้
+ไม้สูง
+ไม้หน้า
+ไม้หมอน
+ไม้หมุน
+ไม้หลัà¸à¸›à¸±à¸à¹€à¸¥à¸™
+ไม้หันอาà¸à¸²à¸¨
+ไม้หึ่ง
+ไม่เห็นน้ำตัดà¸à¸£à¸°à¸šà¸­à¸ ไม่เห็นà¸à¸£à¸°à¸£à¸­à¸à¸à¹ˆà¸‡à¸«à¸™à¹‰à¸²à¹„ม้
+ไม่เหลือบ่าà¸à¸§à¹ˆà¸²à¹à¸£à¸‡
+ไม้อ่อนดัดง่าย ไม้à¹à¸à¹ˆà¸”ัดยาà¸
+ไม้อัด
+ไม้เอà¸
+ไม่เออออห่อหมà¸
+ไม้โอ
+ย
+ยà¸
+ยà¸à¸à¸£à¸°à¸šà¸±à¸•à¸£
+ยà¸à¸„รู
+ยà¸à¹€à¸„รื่อง
+ยà¸à¹€à¸„้า
+ยà¸à¸•à¸™à¸‚่มท่าน
+ยà¸à¸•à¸±à¸§à¸‚ึ้นเหนือลม
+ยà¸à¸—รง
+ยà¸à¸˜à¸‡à¸‚าว
+ยà¸à¸™
+ยà¸à¸™à¸´à¹‰à¸§
+ยà¸à¸žà¸·à¹‰à¸™
+ยà¸à¸Ÿà¹‰à¸­à¸‡
+ยà¸à¸ à¸¹à¹€à¸‚าออà¸à¸ˆà¸²à¸à¸­à¸
+ยà¸à¸¡à¸·à¸­
+ยà¸à¹€à¸¡à¸†
+ยà¸à¸¢à¸­
+ยà¸à¸¢à¹ˆà¸­à¸‡
+ยà¸à¸¢à¸­à¸”
+ยà¸à¸¢à¸­à¸›à¸­à¸›à¸±à¹‰à¸™
+ยà¸à¹€à¸¥à¸´à¸
+ยà¸à¹€à¸§à¹‰à¸™
+ยà¸à¹„ว้
+ยà¸à¸«à¸²à¸‡à¸•à¸±à¸§à¹€à¸­à¸‡
+ยà¸à¹ƒà¸«à¸à¹ˆ
+ยง
+ยงโย่
+ยชุรเวท
+ยติ
+ยติภังค์
+ยถาà¸à¸£à¸£à¸¡
+ยถาภูตà¸à¸²à¸“
+ย่น
+ยนต์
+ยนตร์
+ย่นย่อ
+ยม
+ยม-
+ยมà¸
+ยมà¸à¸›à¸²à¸à¸´à¸«à¸²à¸£à¸´à¸¢à¹Œ
+ยมขันธ์
+ยมโดย
+ยมทัณฑ์
+ยมทูต
+ยมนา
+ยมบาล
+ยมราช
+ยมล
+ยมโลà¸
+ยรรยง
+ยล
+ยว
+ยวà¸à¸ªà¸²
+ยวง
+ยวด
+ยวดยง
+ยวดยาน
+ยวดยิ่ง
+ยวน
+ยวนยี
+ยวบ
+ยวบๆ
+ยวบยาบ
+ย้วย
+ยวรยาตร
+ยวา
+ยวาคุ
+ยศ
+ยศอย่าง
+ยโส
+ยอ
+ย่อ
+ยอà¸
+ยอà¸à¸¢à¹‰à¸­à¸™
+ย็อà¸à¹à¸¢à¹‡à¸
+ย็อà¸à¹à¸¢à¹‡à¸à¹†
+ยอง
+ยองๆ
+ย่อง
+ย้อง
+ย่องà¸à¸£à¸´à¸š
+ย่องเบา
+ย่องà¹à¸¢à¹ˆà¸‡
+ยองใย
+ยองไย่
+ย่องเหง็ด
+ยอด
+ยอดจาà¸
+ยอดด้วน
+ยอดดี
+ยอดน้ำ
+ยอดสร้อย
+ย่อท้อ
+ยอน
+ย้อน
+ย้อนเนื้อ
+ย้อนยอà¸
+ยอบ
+ยอบà¹à¸¢à¸š
+ย่อพล
+ยอม
+ย่อม
+ย้อม
+ยอมความ
+ย้อมใจ
+ย้อมà¹à¸¡à¸§à¸‚าย
+ย่อมเยา
+ย่อมุม
+ย่อย
+ย้อย
+ย่อย่น
+ย่อยยับ
+ย่อà¹à¸¢à¹ˆ
+ย้อà¹à¸¢à¹‰
+ยอà¹à¸ªà¸‡
+ย่อหน้า
+ย่อหย่อน
+ย่อà¹à¸«à¸¢à¸‡
+ยะ
+ย่ะ
+ยะงันจะคับ
+ยะยอบ
+ยะยัน
+ยะยับ
+ยะยาน
+ยะย้าย
+ยะย้าว
+ยะà¹à¸¢à¹‰à¸‡
+ยะหิทา
+ยัà¸
+ยัà¸à¸à¸£à¸°à¸ªà¸²à¸¢
+ยัà¸à¸‚์
+ยัà¸à¸‚ินี
+ยัà¸à¸—่า
+ยัà¸à¹€à¸žà¸£à¸µà¸¢
+ยัà¸à¸¢à¸­à¸
+ยัà¸à¸¢à¹‰à¸²à¸¢
+ยัà¸à¸¢à¸´à¹‰à¸¡
+ยัà¸à¸¢à¸µà¹ˆà¸¢à¸±à¸à¸¢à¸±à¸™
+ยัà¸à¸¢à¸µà¹ˆà¸¢à¸±à¸à¹€à¸«à¸¢à¸²
+ยัà¸à¹€à¸¢à¸·à¹‰à¸­à¸‡
+ยัà¸à¹à¸¢à¹ˆà¸¢à¸±à¸à¸¢à¸±à¸™
+ยัà¸à¸©à¹Œ
+ยัà¸à¸©à¹Œà¸›à¸±à¸à¸«à¸¥à¸±à¹ˆà¸™
+ยัà¸à¸©à¹Œà¸¡à¸±à¸à¸à¸°à¸ªà¸±à¸™
+ยัà¸à¸©à¸´à¸“ี
+ยัà¸à¸©à¸µ
+ยัà¸à¸«à¸¢à¸²à¸§
+ยัà¸à¸«à¸¥à¹ˆà¸¡
+ยัง
+ยั้ง
+ยังà¸à¸²à¸«à¸¥à¸²
+ยังชั่ว
+ยั่งยืน
+ยังà¹à¸¥à¹‰à¸§
+ยังหยัง
+ยัชโà¸à¸›à¸§à¸µà¸•
+ยัชน
+ยัชมาน
+ยัà¸
+ยัà¸-
+ยัà¸à¸à¸£à¸£à¸¡
+ยัà¸à¸à¸°
+ยัà¸à¸à¸±à¸‡à¸„์
+ยัà¸à¸žà¸´à¸˜à¸µ
+ยัà¸à¸´
+ยัà¸à¸´à¸¡à¸˜à¸¸à¸à¸²
+ยัด
+ยัดเยียด
+ยัติภังค์
+ยัน
+ยั่น
+ยันต์
+ยันตร-
+ยันตร์
+ยันตรà¸à¸£à¸£à¸¡
+ยั่นตะนี
+ยันเย้า
+ยับ
+ยับๆ
+ยับยง
+ยับย่อย
+ยับยั้ง
+ยับยั้งชั่งใจ
+ยับยาน
+ยับยาบ
+ยับเยิน
+ยั่ว
+ยั้ว
+ยั่วยวน
+ยั่วเย้า
+ยั้วเยี้ย
+ยัวรยาตร
+ยัษà¸à¸´
+ยา
+ย่า
+ยาà¸
+ยาà¸à¹à¸„้น
+ยาà¸à¸ˆà¸™
+ยาà¸à¸™à¸²à¸™
+ยาà¸à¹€à¸¢à¹‡à¸™
+ยาà¸à¹„ร้
+ยาเขียว
+ยาค
+ยาคุ
+ยาคู
+ยาง
+ย่าง
+ยางà¸à¸£à¸²à¸”
+ย่างตีน
+ย่างทราย
+ย่างเท้า
+ยางน่อง
+ยางบอน
+ยางพารา
+ยางมะตอย
+ย่างเยื้อง
+ยางลบ
+ยางสน
+ย่างสามขุม
+ยางอาย
+ยาจà¸
+ยาจน
+ยาจนà¸
+ยาจนา
+ยาจืด
+ยาใจ
+ยาฉุน
+ยาไฉน
+ยาชà¸
+ยาด
+ยาดา
+ยาดำ
+ยาà¹à¸”ง
+ยาตนา
+ยาตร
+ยาตรา
+ยาตั้ง
+ย่าทวด
+ยาธาตุ
+ยาน
+ย่าน
+ยานà¸
+ย่านà¸à¸­à¸šà¸™à¸²à¸‡
+ยานคาง
+ย่านซื่อ
+ย่านทราย
+ย่านนมควาย
+ย่านพาโหม
+ยานมาศ
+ย่านยาว
+ย่านลิเภา
+ยานัตถุ์
+ย่านาง
+ย่านางช้าง
+ยานี
+ยานุมาศ
+ยาบ
+ยาบๆ
+ยาปน-
+ยาปนมัต
+ยาà¸à¸­à¸¢
+ยาà¹à¸à¸”
+ยาม
+ยาม-
+ย่าม
+ยามà¸à¸²à¸¥à¸´à¸
+ยามเà¸à¸²
+ยามตูดชาย
+ยามพาด
+ยามโยค
+ยามสามตา
+ยามัà¸à¸à¸²à¸£
+ยามิà¸
+ยาย
+ย้าย
+ยายทวด
+ยายี
+ยาเยีย
+ยาว
+ย้าว
+ยาวà¸à¸²à¸¥à¸´à¸
+ยาวชีวิà¸
+ยาวบั่น สั้นต่อ
+ยาวรี
+ยาวัส
+ยาสลบ
+ยาสั่ง
+ยาสูบ
+ยาเส้น
+ยาเสพย์ติด
+ยาเสพย์ติดให้โทษ
+ยาไส้
+ยาหม้อใหà¸à¹ˆ
+ยาหมู่
+ยาหยัง
+ย่าหยา
+ยาหยี
+ยาหัด
+ยาอัด
+ยำ
+ย่ำ
+ย้ำ
+ยำเà¸à¸£à¸‡
+ย่ำเทือà¸
+ยำยาม
+ย่ำยี
+ยำเยง
+ยำเยีย
+ย่ำà¹à¸¢à¹ˆ
+ย้ำเหยอ
+ยิà¸
+ยิà¸à¹†
+ยิง
+ยิ่ง
+ยิงปืนนัดเดียว ได้นà¸à¸ªà¸­à¸‡à¸•à¸±à¸§
+ยิงฟัน
+ยิ่งยวด
+ยิà¸à¸à¸°
+ยิà¸
+ยิน
+ยินà¹à¸„ลน
+ยินใจ
+ยินดี
+ยินมลาà¸
+ยินยอม
+ยินร้าย
+ยินลาà¸à¸‚าà¸à¸”ี
+ยิบ
+ยิบๆ
+ยิปซัม
+ยิปซี
+ยิ้ม
+ยิ้มà¸à¸£à¸´à¹ˆà¸¡
+ยิ้มà¹à¸‰à¹ˆà¸‡
+ยิ้มด้วยปาภถาà¸à¸”้วยตา
+ยิมนาสติà¸
+ยิ้มà¹à¸›à¹‰à¸™
+ยิ้มย่อง
+ยิ้มเยาะ
+ยิ้มà¹à¸¢à¹‰à¸¡
+ยิ้มละไม
+ยิ้มหัว
+ยิ้มเหย
+ยิ้มà¹à¸«à¹‰à¸‡
+ยิ้มà¹à¸«à¸¢
+ยิหวา
+ยี
+ยี่
+ยี้
+ยี่à¸à¹ˆà¸²
+ยี่เà¸
+ยี่เข่ง
+ยี่โถ
+ยี่โถà¸à¸£à¸±à¹ˆà¸‡
+ยีน
+ยี่โป้
+ยี่ภู่
+ยียวน
+ยีราฟ
+ยี่สà¸
+ยี่สง
+ยี่สน
+ยี่สาน
+ยี่ส่าน
+ยี่สิบ
+ยี่สุ่น
+ยี่หระ
+ยี่หร่า
+ยี่หร่าหวาน
+ยี่ห้อ
+ยี่หุบ
+ยึà¸à¸¢à¸·à¸­
+ยึด
+ยึดครอง
+ยึดถือ
+ยึดทรัพย์
+ยึดเหนี่ยว
+ยืด
+ยืดยาด
+ยืดเยื้อ
+ยืดหยุ่น
+ยืน
+ยื่น
+ยืนà¸à¸£à¸°à¸•à¹ˆà¸²à¸¢à¸ªà¸²à¸¡à¸‚า
+ยืนà¸à¸£à¸²à¸™
+ยื่นà¹à¸à¹‰à¸§à¹ƒà¸«à¹‰à¸§à¸²à¸™à¸£
+ยืนค้ำหัว
+ยืนเครื่อง
+ยื่นจมูà¸
+ยืนชิงช้า
+ยืนต้น
+ยืนพื้น
+ยื่นมือ
+ยืนยง
+ยืนยัน
+ยืนยาม
+ยืนโรง
+ยื่นหมูยื่นà¹à¸¡à¸§
+ยืนหยัด
+ยืม
+ยืมจมูà¸à¸„นอื่นหายใจ
+ยืมใช้คงรูป
+ยืมใช้สิ้นเปลือง
+ยื้อ
+ยื้อยุด
+ยุ
+ยุà¸à¸à¸£à¸°à¸šà¸±à¸•à¸£
+ยุà¸à¸”ิ
+ยุà¸à¸•à¹Œ
+ยุà¸à¸•à¸´
+ยุà¸à¸•à¸´à¸˜à¸£à¸£à¸¡
+ยุค
+ยุคเข็à¸
+ยุคนธร
+ยุคล
+ยุคลบาท
+ยุคันต-
+ยุคันต์
+ยุคันตวาต
+ยุคันธร
+ยุคุนธร
+ยุง
+ยุ่ง
+ยุ้ง
+ยุงà¸à¸§à¸²à¸”
+ยุ่งขิง
+ยุ่งใจ
+ยุงปัด
+ยุงปัดà¹à¸¡à¹ˆà¸¡à¹ˆà¸²à¸¢
+ยุ่งยาà¸
+ยุ่งยิ่ง
+ยุ่งเหมือนยุงตีà¸à¸±à¸™
+ยุ่งเหยิง
+ยุด
+ยุต
+ยุติ-
+ยุติธรรม
+ยุทธ-
+ยุทธ์
+ยุทธà¸à¸²à¸£
+ยุทธนา
+ยุทธนาà¸à¸²à¸£
+ยุทธนาธิà¸à¸²à¸£
+ยุทธภัณฑ์
+ยุทธภูมิ
+ยุทธโยธา
+ยุทธวิธี
+ยุทธวินัย
+ยุทธศาสตร์
+ยุทธหัตถี
+ยุทโธปà¸à¸£à¸“์
+ยุบ
+ยุบยอบ
+ยุบยับ
+ยุบยิบ
+ยุบล
+ยุพ-
+ยุพดี
+ยุพยง
+ยุพเยาว์
+ยุพราช
+ยุพราชา
+ยุพเรศ
+ยุพา
+ยุพาน
+ยุพาพาล
+ยุพาพิน
+ยุ่มย่าม
+ยุ่ย
+ยุ้ย
+ยุยง
+ยุà¹à¸¢à¸‡
+ยุà¹à¸¢à¸‡à¸•à¸°à¹à¸„งà¹à¸‹à¸°
+ยุà¹à¸¢à¸‡à¸•à¸°à¹à¸„งรั่ว
+ยุรบาตร
+ยุรยาตร
+ยุว-
+ยุวชน
+ยุวดี
+ยุวราช
+ยุวราชา
+ยุวา
+ยุวาน
+ยุหบาตร
+ยุà¹à¸«à¸¢à¹ˆ
+ยุให้รำตำให้รั่ว
+ยู
+ยู่
+ยูง
+ยูโด
+ยูถะ
+ยูถิà¸à¸²
+ยูปะ
+ยู่ยี่
+ยูรยาตร
+ยูริà¸
+ยูเรนัส
+ยูเรเนียม
+ยูโรเพียม
+ยูษะ
+เยๆ
+เย้
+เยง
+เยซู
+เย็ด
+เย็น
+เย็นใจ
+เย็นชืด
+เย็นตา
+เย็นตาโฟ
+เย็นเตาโฟ
+เย็นเยียบ
+เย็นเยือà¸
+เย็นหู
+เย็บ
+เย็บà¸à¸µà¹ˆ
+เย็บด้าย
+เย็บลวด
+เย็บเล่ม
+เย็บอà¸
+เยภุย-
+เยภุยนัย
+เยภุยยะ
+เยภุยสิà¸à¸²
+เย้ย
+เยอ
+เย่อ
+เยอรมัน
+เยอว
+เย่อหยิ่ง
+เยอะ
+เยอะà¹à¸¢à¸°
+เยา
+เย้า
+เยาว-
+เยาว์
+เยาวชน
+เยาวน-
+เยาวนะ
+เยาวพา
+เยาวพาณี
+เยาวพาน
+เยาวมาลย์
+เยาวยอด
+เยาวราช
+เยาวเรศ
+เยาวลัà¸à¸©à¸“์
+เยาะ
+เยิง
+เยิน
+เยิ่น
+เยินยอ
+เยิ่นเย้อ
+เยิบๆ
+เยิบยาบ
+เยิ้ม
+เยีย
+เยี่ยง
+เยียงผา
+เยี่ยงอย่าง
+เยียดยัด
+เยียใด
+เยียน
+เยียบ
+เยี่ยม
+เยี่ยมๆ มองๆ
+เยี่ยมยอด
+เยี่ยมเยียน
+เยี่ยมเยือน
+เยี่ยมวิมาน
+เยียมั่ง
+เยียรบับ
+เยียรยง
+เยียว
+เยี่ยว
+เยี่ยวงัว
+เยียวยง
+เยียวยา
+เยี่ยวอูà¸
+เยียใหà¸à¹ˆ
+เยือ
+เยื่อ
+เยื้อ
+เยือà¸
+เยือà¸à¹€à¸¢à¹‡à¸™
+เยื่อเคย
+เยือง
+เยื่อง
+เยื้อง
+เยื้องà¸à¸£à¸²à¸¢
+เยื้องยัà¸
+เยือน
+เยื้อน
+เยื่อใย
+à¹à¸¢à¹ˆ
+à¹à¸¢à¹‰
+à¹à¸¢à¸
+à¹à¸¢à¸à¹€à¸‚ี้ยว
+à¹à¸¢à¸à¸¢à¹‰à¸²à¸¢
+à¹à¸¢à¸à¹à¸¢à¹‰à¸‡
+à¹à¸¢à¸à¹à¸¢à¸°
+à¹à¸¢à¸‡
+à¹à¸¢à¹ˆà¸‡
+à¹à¸¢à¹‰à¸‡
+à¹à¸¢à¸‡à¸¢à¸¥
+à¹à¸¢à¸‡à¹à¸¢à¹ˆ
+à¹à¸¢à¸‡à¹à¸¢à¹‰
+à¹à¸¢à¹ˆà¹à¸•à¹‰
+à¹à¸¢à¸š
+à¹à¸¢à¹‡à¸š
+à¹à¸¢à¸šà¸„าย
+à¹à¸¢à¸šà¸¢à¸¥
+à¹à¸¢à¸¡
+à¹à¸¢à¹‰à¸¡
+à¹à¸¢à¹‰à¸¡à¸žà¸£à¸²à¸¢
+à¹à¸¢à¹à¸ª
+à¹à¸¢à¸°
+โย
+โย้
+โยà¸
+โยà¸à¸•à¸£à¹Œ
+โยà¸à¸¢à¹‰à¸²à¸¢
+โยà¸à¹€à¸¢à¸
+โยà¸à¹‚ย้
+โยค-
+โยคเà¸à¸“ฑ์
+โยคจัà¸à¸©à¸¸
+โยคนิทรา
+โยคยะ
+โยคะ
+โยคาพจร
+โยคาวจร
+โยคิน
+โยคี
+โยง
+โย่ง
+โย่งๆ
+โย่งเย่ง
+โยงโย่
+โยชà¸
+โยชน์
+โยชนา
+โยด
+โยต
+โยถิà¸à¸°
+โยทะà¸à¸²
+โยธ-
+โยธวาทิต
+โยธา
+โยธิน
+โยน
+โยนà¸
+โยนà¸à¸¥à¸­à¸‡
+โยนà¸à¸¥à¸­à¸™
+โยนยาว
+โยนหลุม
+โยนห่วง
+โยนหัวโยนà¸à¹‰à¸­à¸¢
+โยนิโส
+โยนิโสมนสิà¸à¸²à¸£
+โยนี
+โยพนมัท
+โยพนะ
+โยม
+โยเย
+โย้เย้
+โยโส
+ใย
+ใยฟ้า
+ใยยอง
+ใยหิน
+ไย
+ไย่
+ไยดี
+ไยไพ
+ไยไย
+ไย่ไย่
+ร
+รà¸
+รà¸à¸Šà¸±à¸
+รà¸à¸Šà¹‰à¸²à¸‡
+รà¸à¸šà¸´à¸™
+รà¸à¸Ÿà¹‰à¸²
+รà¸à¸£à¸²à¸
+รà¸à¸£à¹‰à¸²à¸‡
+รà¸à¹€à¸£à¸µà¹‰à¸¢à¸§
+รง
+รงà¸à¸¸à¹Œ
+รงค-
+รงค์
+รงควัตถุ
+รงรอง
+รจนา
+รจเรข
+รจเลข
+รจิต
+รชà¸à¸°
+รชตะ
+รชนิ
+รชนี
+รชนีà¸à¸£
+รชนีจร
+รชะ
+รณ
+รณ-
+รณเà¸à¸©à¸•à¸£
+รณภู
+รณภูมิ
+รณรงค์
+รณสถาน
+รด
+รดน้ำ
+รดี
+รตนะ
+รตะ
+รติ
+รถ
+รถ-
+รถจัà¸à¸£à¸¢à¸²à¸™
+รถจัà¸à¸£à¸¢à¸²à¸™à¸¢à¸™à¸•à¹Œ
+รถฉุà¸à¹€à¸‰à¸´à¸™
+รถโดยสารประจำทาง
+รถปุงคพ
+รถปุงควะ
+รถไฟ
+รถไฟฟ้า
+รถยนต์
+รถยา
+รถานึà¸
+รเถสภะ
+รท
+รทนะ
+รน
+ร่น
+ร้น
+รนด
+รนหาที่
+รบ
+รบà¸à¸§à¸™
+รบรา
+รบเร้า
+รบส
+รบาà¸
+รพ
+รพา
+รพิ
+รพี
+รม
+ร่ม
+ร่มเà¸à¸¥à¹‰à¸²
+ร่มเà¸à¸¨
+ร่มชูชีพ
+รมณี
+รมณีย-
+รมณีย์
+ร่มธง
+ร่มผ้า
+ร่มโพธิ์ร่มไทร
+ร่มไม้ชายคา
+รมย์
+ร่มเย็น
+รมเยศ
+รยะ
+รยางค์
+รวà¸
+รวง
+ร่วง
+รวงผึ้ง
+ร่วงรุ้ง
+ร่วงโรย
+รวด
+รวดเดียว
+รวดเร็ว
+รวน
+ร่วน
+รวนเร
+รวบ
+รวบรวม
+รวบรัด
+รวบหัวรวบหาง
+รวม
+ร่วม
+ร่วมใจ
+ร่วมท้อง
+ร่วมประเวณี
+ร่วมเพศ
+ร่วมมือ
+ร่วมรัà¸
+ร่วมเรียงเคียงหมอน
+ร่วมหอลงโรง
+รวมหัว
+ร่วมหัวงาน
+ร่วมอุทร
+รวย
+รวยๆ
+รวยริน
+รวยรื่น
+รวะ
+รวิ
+รวิวาร
+รวี
+รศนา
+รส
+รสà¸
+รสชาติ
+รสนา
+รสนิยม
+รสสุคนธ์
+รสายนเวท
+รสิà¸
+รหัท
+รหัส
+รหิต
+รโห
+รโหคต
+รโหà¸à¸²à¸™
+รอ
+ร่อ
+รอà¸
+รอง
+ร่อง
+ร้อง
+ร้องขอ
+รองคอ
+รองเง็ง
+รองจ่าย
+รองช้ำ
+ร้องฎีà¸à¸²
+รองทรง
+รองท้อง
+ร้องทุà¸à¸‚์
+รองทุน
+รองเท้า
+ร่องน้ำ
+รองบ่อน
+รองพื้น
+ร้องเพลง
+ร่องมด
+ร้องโยนยาว
+ร่องรอย
+รองรัง
+ร้องเรียà¸à¸£à¹‰à¸­à¸‡à¸«à¸²
+ร้องเรียน
+ร้องเรือ
+ร้องà¹à¸£à¸
+ร่องà¹à¸£à¹ˆà¸‡
+ร้องส่ง
+ร้องห่ม
+ร้องห่มร้องไห้
+ร้องไห้
+รอด
+รอดชีวิต
+รอดตัว
+รอดหูรอดตา
+รอน
+รอนๆ
+ร่อน
+ร้อน
+ร้อนตัว
+ร่อนทอง
+ร้อนผ้าเหลือง
+ร้อนรน
+ร่อนร่อน
+ร่อนรับร่อนเร่
+ร่อนเร่
+รอนà¹à¸£à¸¡
+ร้อนวิชา
+รอนสิทธิ์
+ร้อนอาสน์
+รอบ
+รอบคอบ
+รอบรู้
+รอม
+รอมชอม
+รอมร่อ
+รอย
+ร่อย
+ร้อย
+ร้อยà¸à¸£à¸­à¸‡
+ร้อยà¹à¸à¹‰à¸§
+ร้อยชั่ง
+ร้อยทั้งร้อย
+ร้อยà¹à¸›à¸”
+รอยร้าว
+ร้อยลิ้น
+ร้อยลิ้นà¸à¸°à¸¥à¸²à¸§à¸™
+ร้อยสีร้อยอย่าง
+ร่อยหรอ
+ร้อยหวาย
+ร้อยหวี
+ร้อยเอ็ด
+ร้อยเอ็ดเจ็ดหัวเมือง
+ร่อà¹à¸£à¹ˆ
+ระ
+ระà¸à¸°
+ระà¸à¸²
+ระà¸à¸³
+ระà¸à¸³à¸™à¸²
+ระà¸à¸³à¸›à¹ˆà¸²
+ระเà¸à¸°à¸£à¸°à¸à¸°
+ระคน
+ระคาง
+ระคาย
+ระเค็ดระคาย
+ระà¹à¸„ะ
+ระà¹à¸„ะระคาย
+ระฆัง
+ระงม
+ระงมไพร
+ระงับ
+ระงับพิษ
+ระงี่
+ระà¹à¸‡à¹‰
+ระโงà¸à¸«à¸´à¸™
+ระชวย
+ระดม
+ระดะ
+ระดับ
+ระดับทะเล
+ระดับทะเลปานà¸à¸¥à¸²à¸‡
+ระดา
+ระด่าว
+ระดู
+ระดูขาว
+ระเด่น
+ระเดียง
+ระà¹à¸”
+ระตู
+ระทà¸
+ระทด
+ระทม
+ระทวย
+ระทอด
+ระทา
+ระทึà¸
+ระทึง
+ระà¹à¸—ะ
+ระนัม
+ระนาด
+ระนาดà¹à¸à¹‰à¸§
+ระนาดทุ้ม
+ระนาดเอà¸
+ระนาบ
+ระนาบเอียง
+ระนาม
+ระนาว
+ระเนน
+ระเนระนาด
+ระเนียด
+ระà¹à¸™à¸‡
+ระà¹à¸™à¸°
+ระบบ
+ระบบสุริยะ
+ระบม
+ระบอบ
+ระบัด
+ระบับ
+ระบาà¸
+ระบาด
+ระบานี
+ระบานี้
+ระบาย
+ระบายสี
+ระบำ
+ระบิ
+ระบิล
+ระบิลเมือง
+ระบือ
+ระบุ
+ระเบง
+ระเบ็ง
+ระเบิด
+ระเบิดขวด
+ระเบิดทำลาย
+ระเบิดน้ำตา
+ระเบิดปรมาณู
+ระเบิดเพลิง
+ระเบิดมือ
+ระเบิดเวลา
+ระเบิดไฮโดรเจน
+ระเบียง
+ระเบียน
+ระเบียบ
+ระเบียบà¸à¸²à¸£
+ระเบียบวาระ
+ระà¹à¸šà¸š
+ระใบ
+ระฟ้า
+ระมัดระวัง
+ระมา
+ระมาด
+ระเมียร
+ระย่อ
+ระย่อม
+ระยะ
+ระยัง
+ระยั้ง
+ระยัด
+ระยับ
+ระย้า
+ระยาน
+ระยาบ
+ระยำ
+ระยำตำบอน
+ระยิบระยับ
+ระโยง
+ระโยงระยาง
+ระรวย
+ระรอง
+ระร่อน
+ระรัว
+ระราน
+ระร่าย
+ระราว
+ระริà¸
+ระรี่
+ระรึง
+ระรื่น
+ระรื้น
+ระเร
+ระเร่
+ระเร้ง
+ระเร็ว
+ระเริง
+ระเรียง
+ระเรียม
+ระเรื่อย
+ระà¹à¸£à¹ˆ
+ระà¹à¸£à¸‡
+ระลง
+ระลวง
+ระลอà¸
+ระลอง
+ระลัด
+ระลัดได
+ระลึà¸
+ระลุà¸
+ระลุง
+ระเลิง
+ระเลียด
+ระวัง
+ระวังไพร
+ระวังวัน
+ระวาง
+ระวาดระไว
+ระวาม
+ระวาย
+ระวิง
+ระà¹à¸§à¸‡
+ระà¹à¸§à¸”ระวัง
+ระไว
+ระสะเà¸à¹‡à¸”
+ระสาย
+ระส่ำระสาย
+ระสี
+ระเสิดระสัง
+ระหà¸à¸£à¸°à¹€à¸«à¸´à¸™
+ระหง
+ระหวย
+ระหว่าง
+ระหองระà¹à¸«à¸‡
+ระหอบ
+ระหัด
+ระหาย
+ระหุย
+ระเห็จ
+ระเหย
+ระเหระหน
+ระเหหน
+ระเหหัน
+ระเหิด
+ระเหินระหà¸
+ระà¹à¸«à¸
+ระà¹à¸«à¸‡
+ระโหย
+ระอมระอา
+ระอา
+ระอิดระอา
+ระอุ
+รัà¸
+รัà¸à¸‚์
+รัà¸à¸‚สะ
+รัà¸à¸‚า
+รัà¸à¸‚ิต
+รัà¸à¸”ป
+รัà¸à¸”ะ
+รัà¸à¸”ีหามจั่ว รัà¸à¸Šà¸±à¹ˆà¸§à¸«à¸²à¸¡à¹€à¸ªà¸²
+รัà¸à¸•à¸°
+รัà¸à¸šà¸µà¹‰
+รัà¸à¸žà¸µà¹ˆà¹€à¸ªà¸µà¸¢à¸”ายน้อง
+รัà¸à¸¢à¸¡
+รัà¸à¸¢à¸²à¸§à¹ƒà¸«à¹‰à¸šà¸±à¹ˆà¸™ รัà¸à¸ªà¸±à¹‰à¸™à¹ƒà¸«à¹‰à¸•à¹ˆà¸­
+รัà¸à¸£à¹‰à¸­à¸¢
+รัà¸à¹€à¸£à¹ˆ
+รัà¸à¹à¸£à¹‰
+รัà¸à¸©à¹Œ
+รัà¸à¸©à¸²
+รัà¸à¸©à¸²à¸à¸²à¸£
+รัà¸à¸©à¸²à¸à¸²à¸£à¸“์
+รัà¸à¸«à¸¡à¸¹
+รัง
+รั้ง
+รังà¸à¸²
+รังเà¸à¸µà¸¢à¸ˆ
+รังà¹à¸
+รังไข่
+รังค์
+รังควาน
+รังà¹à¸„
+รังดุม
+รังà¹à¸•à¸™
+รังนà¸
+รังนาน
+รังบวบ
+รังผึ้ง
+รังเพลิง
+รังมด
+รังรอง
+รังรัà¸à¸©à¹Œ
+รังเรข
+รังà¹à¸£à¸
+รังวัด
+รังสรรค์
+รังสรัง
+รังสฤษà¸à¹Œ
+รังสิ
+รังสิมันตุ์
+รังสิมา
+รังสี
+รังสีความร้อน
+รังสีคอสมิà¸
+รังสีà¹à¸žà¸—ย์
+รังสีวิทยา
+รังสีเหนือม่วง
+รังหยาว
+รัจฉา
+รัช
+รัช-
+รัชà¸à¸°
+รัชà¸à¸²à¸¥
+รัชชุ
+รัชชูปà¸à¸²à¸£
+รัชฎาภิเษà¸
+รัชด-
+รัชดาภิเษà¸
+รัชต-
+รัชทายาท
+รัชนะ
+รัชนี
+รัชนีà¸à¸£
+รัà¸à¸ˆà¸§à¸™
+รัà¸à¸à¸²à¸ à¸´à¸›à¸²à¸¥à¹‚นบาย
+รัà¸
+รัà¸-
+รัà¸à¸—ูต
+รัà¸à¸˜à¸£à¸£à¸¡à¸™à¸¹à¸
+รัà¸à¸šà¸²à¸¥
+รัà¸à¸šà¸¸à¸£à¸¸à¸©
+รัà¸à¸›à¸£à¸°à¸¨à¸²à¸ªà¸™à¹Œ
+รัà¸à¸›à¸£à¸°à¸¨à¸²à¸ªà¸™à¸™à¸±à¸¢
+รัà¸à¸›à¸£à¸°à¸¨à¸²à¸ªà¸™à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+รัà¸à¸›à¸£à¸°à¸¨à¸²à¸ªà¹‚นบาย
+รัà¸à¸›à¸£à¸°à¸«à¸²à¸£
+รัà¸à¸¡à¸™à¸•à¸£à¸µ
+รัà¸à¸§à¸´à¸ªà¸²à¸«à¸à¸´à¸ˆ
+รัà¸à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+รัà¸à¸ªà¸ à¸²
+รัด
+รัดà¸à¸¸à¸¡
+รัดเà¸à¸¥à¹‰à¸²
+รัดเข็มขัด
+รัดช้อง
+รัดตัว
+รัดทึบ
+รัดประคด
+รัดประคน
+รัดพัสตร์
+รัดรึง
+รัดรูป
+รัต
+รัต-
+รัตà¸à¸±à¸¡à¸žà¸¥
+รัตคน
+รัตจันทน์
+รัตตัà¸à¸à¸¹
+รัตติ
+รัตติà¸à¸²à¸¥
+รัตน-
+รัตน์
+รัตนโà¸à¸ªà¸´à¸™à¸—ร์
+รัตนตรัย
+รัตนบัลลังà¸à¹Œ
+รัตนสิงหาสน์
+รัตนะ
+รัตนา
+รัตนาà¸à¸£
+รัตนาวลี
+รัตมณี
+รัตมา
+รัถ
+รัถยา
+รัทเทอร์ฟอร์เดียม
+รัน
+รั้น
+รันชนรันà¹à¸Šà¸‡
+รันทด
+รันทวย
+รันทำ
+รันà¹à¸—ะ
+รันธะ
+รับ
+รับขวัà¸
+รับà¹à¸‚à¸
+รับคำ
+รับจ้าง
+รับท้อง
+รับประà¸à¸±à¸™
+รับประทาน
+รับปาà¸
+รับผิด
+รับผิดชอบ
+รับมือ
+รับรอง
+รับเรือน
+รับสั่ง
+รับหน้า
+รับไหว้
+รัมà¸-
+รัมณีย-
+รัมภา
+รัมมี่
+รัมย์
+รัย
+รัว
+รั่ว
+รั้ว
+รั้วไà¸à¹ˆ
+รัศมิมัต
+รัศมิมาน
+รัศมี
+รัษฎาà¸à¸£
+รัส-
+รัสสระ
+รัสสะ
+รา
+ร่า
+ร้า
+ราà¸
+ราà¸à¹à¸à¹‰à¸§
+ราà¸à¸‚วัà¸
+ราà¸à¸à¸²à¸™
+ราà¸à¸”ิน
+ราà¸à¸à¸­à¸¢
+ราà¸à¸Ÿà¸±à¸™
+ราà¸à¸¨à¸±à¸žà¸—์
+ราà¸à¸©à¸ª
+ราà¸à¹‚ษส
+ราà¸à¸ªà¸²à¸”
+ราà¸à¸ªà¸²à¸”น้อย
+ราà¸à¸ªà¸²à¸”ใหà¸à¹ˆ
+ราà¸à¸ªà¸²à¸¡à¸ªà¸´à¸š
+ราà¸à¹€à¸«à¸‡à¹‰à¸²
+ราข้อ
+ราคะ
+ราคา
+ราคาตลาด
+ราคิน
+ราคี
+ราง
+ร่าง
+ร้าง
+ร่างà¸à¸²à¸¢
+รางจืด
+รางชาง
+รางดำ
+รางà¹à¸”ง
+รางนาน
+รางบรรทัด
+ร่างร้าน
+รางวัล
+ร่างà¹à¸«
+ราช
+ราช-
+ราชà¸à¸²à¸£
+ราชà¸à¸´à¸ˆà¸ˆà¸²à¸™à¸¸à¹€à¸šà¸à¸©à¸²
+ราชครู
+ราชà¸à¸µ
+ราชดัด
+ราชทัณฑ์
+ราชทินนาม
+ราชทูต
+ราชโทรหะ
+ราชธรรม
+ราชธานี
+ราชนิà¸à¸¸à¸¥
+ราชนีติ
+ราชบัณฑิต
+ราชบาตร
+ราชบุตร
+ราชบุรุษ
+ราชปะà¹à¸•à¸™
+ราชพฤà¸à¸©à¹Œ
+ราชภัà¸
+ราชมัล
+ราชมาณพ
+ราชมาษ
+ราชมาส
+ราชย์
+ราชยาน
+ราชโยค
+ราชโยงà¸à¸²à¸£
+ราชรถมาเà¸à¸¢
+ราชวงศ์
+ราชวรมหาวิหาร
+ราชวรวิหาร
+ราชวโรงà¸à¸²à¸£
+ราชวัติ
+ราชศาสตร์
+ราชสà¸à¸¸à¸¥
+ราชสันตติวงศ์
+ราชสาสน์
+ราชสีห์
+ราชสีห์ตัวผู้
+ราชสีห์ตัวเมีย
+ราชสีห์สองตัวอยู่ถ้ำเดียวà¸à¸±à¸™à¹„ม่ได้
+ราชสูยะ
+ราชหัตถเลขา
+ราชองครัà¸à¸©à¹Œ
+ราชโองà¸à¸²à¸£
+ราชะ
+ราชัน
+ราชันย์
+ราชัย
+ราชา
+ราชาคณะ
+ราชาโชค
+ราชาธิราช
+ราชาภิเษà¸
+ราชายตนะ
+ราชาฤà¸à¸©à¹Œ
+ราชาวดี
+ราชาวลี
+ราชาศัพท์
+ราชิ
+ราชินิà¸à¸¸à¸¥
+ราชินี
+ราชินีà¸à¸¸à¸¥
+ราชินีนาถ
+ราชินูปถัมภ์
+ราชี
+ราชูปถัมภ์
+ราชูปโภค
+ราเชน
+ราเชนทร์
+ราเชนทรยาน
+ราโชงà¸à¸²à¸£
+ราโชปถัมภ์
+ราโชปโภค
+ราโชวาท
+ราไชศวรรย์
+ราà¸
+ราà¸à¸£à¸­à¸™
+ราด
+ราต
+ราตร
+ราตรี
+ราตรีประดับดาว
+ราโท
+ราน
+ร่าน
+ร้าน
+ร้านม้า
+ราบ
+ราบคาบ
+ราบเป็นหน้าà¸à¸¥à¸­à¸‡
+ราบรื่น
+ราบเรียบ
+ราปีà¸
+ราพณ์
+ราพณาสูร
+ราม
+รามเà¸à¸µà¸¢à¸£à¸•à¸´à¹Œ
+รามสูร
+รามัà¸
+รามา
+ราย
+ร่าย
+ร้าย
+ร้ายà¸à¸²à¸ˆ
+รายà¸à¸²à¸£
+รายงาน
+รายงานà¸à¸²à¸£à¸›à¸£à¸°à¸Šà¸¸à¸¡
+รายจ่าย
+รายทาง
+ร่ายไม้
+ร่ายรัง
+รายรับ
+ร้ายà¹à¸£à¸‡
+รายวิชา
+ร่าเริง
+ราเริด
+ราà¹à¸£à¸¡
+ราว
+ร้าว
+ราวà¸à¸°
+ราวà¸à¸±à¸š
+ราวข่าว
+ร้าวฉาน
+ราวป่า
+ร้าวราน
+ราวี
+ราศี
+ราษฎร
+ราษฎร์
+ราษตรี
+ราษราตริน
+ราษราตรี
+ราสี
+ราหุ
+ร่าหุ์
+ราหู
+รำ
+ร่ำ
+รำเขนง
+รำคาà¸
+รำโคม
+รำงับ
+รำจวน
+รำชั่วโทษพาà¸à¸¢à¹Œ
+รำซุย
+รำเท้า
+รำบาà¸
+ร่ำไป
+รำผี
+รำพัด
+รำพัดชา
+รำพัน
+รำพาย
+รำพึง
+รำเพย
+รำà¹à¸žà¸™
+รำไพ
+รำมะà¹à¸‚
+รำมะนา
+รำมะนาด
+รำมะร่อ
+รำไม่ดีโทษปี่โทษà¸à¸¥à¸­à¸‡
+รำยวน
+รำย้อย
+รำà¹à¸¢à¹‰
+รำรงค์
+ร่ำรวย
+รำราà¸
+รำรำ
+ร่ำรี้ร่ำไร
+รำเร
+ร่ำเรียน
+รำไร
+ร่ำไร
+รำลึà¸
+รำวง
+รำหัด
+รำหัส
+ร่ำไห้
+ริ
+ริà¸
+ริà¸à¹†
+ริดสีดวง
+ริน
+รินๆ
+ริ้น
+ริบ
+ริบทรัพย์สิน
+ริบบิ้น
+ริบราชบาตร
+ริบรี่
+ริบหรี่
+ริปอง
+ริปุ
+ริปู
+ริม
+ริมà¸à¸µà¸›à¸²à¸
+ริเริ่ม
+ริ้ว
+ริษยา
+ริอ่าน
+รี
+รี่
+รี้
+รีๆ ขวางๆ
+รีด
+รีดนาทาเน้น
+รีดนาทาเร้น
+รีดลูà¸
+รีดัà¸à¸Šà¸±à¸™
+รีต
+รีเนียม
+รีบ
+รีบรุด
+รี้พล
+รีม
+รีรอ
+รีๆ รอๆ
+รี้ริà¸
+รึà¸à¸•à¹Œ
+รึง
+รึ้ง
+รื่น
+รื้น
+รื่นรมย์
+รื่นเริง
+รื้อ
+รื้อà¹à¸•à¹ˆà¸«à¸¥à¸±à¸‡à¸„าเขา หลังคาเราไม่รื้อ
+รื้อฟื้น
+รุ
+รุà¸
+รุà¸à¸‚-
+รุà¸à¸‚์
+รุà¸à¸‚à¸à¸°
+รุà¸à¸‚ชาติ
+รุà¸à¸‚มูล
+รุà¸à¸‚มูลิà¸à¸˜à¸¸à¸”งค์
+รุà¸à¸‚า
+รุà¸à¸†à¸²à¸•
+รุà¸à¸£à¹‰à¸™
+รุà¸à¸£à¸²à¸™
+รุà¸à¸£à¸¸à¸¢
+รุà¸à¸©à¸°
+รุข้าว
+รุ่ง
+รุ้ง
+รุ่งเช้า
+รุ้งพราย
+รุ้งร่วง
+รุงรัง
+รุ่งเรือง
+รุ่งโรจน์
+รุจ
+รุจน
+รุจา
+รุจิ
+รุจิระ
+รุจิรา
+รุจิเรข
+รุจี
+รุชา
+รุด
+รุดหน้า
+รุต
+รุทธ์
+รุทร
+รุธิร
+รุเธียร
+รุน
+รุ่น
+รุ่นà¸à¸£à¸°à¸—ง
+รุ่นตะà¸à¸­
+รุ่นราวคราวเดียวà¸à¸±à¸™
+รุนà¹à¸£à¸‡
+รุบรู่
+รุบาà¸à¸²à¸£
+รุม
+รุ่ม
+รุมไข้
+รุมไฟ
+รุ่มรวย
+รุ่มร่าม
+รุย
+รุ่ย
+รุ่ยร่าย
+รุรุ
+รุษà¸à¹Œ
+รุหะ
+รุหาà¸
+รู
+รู่
+รู้
+รู้à¹à¸à¸§
+รู้ความ
+รู้คิด
+รู้คิดรู้อ่าน
+รู้คุณ
+รู้งูๆ ปลาๆ
+รู้จัà¸
+รู้จัà¸à¹€à¸à¹‡à¸šà¸£à¸¹à¹‰à¸ˆà¸±à¸à¹€à¸‚ี่ย
+รู้จัà¸à¹€à¸à¹‡à¸šà¸£à¸¹à¹‰à¸ˆà¸±à¸à¸‡à¸³
+รู้จัà¸à¸¡à¸±à¸à¸„ุ้น
+รู้จัà¸à¸¡à¸±à¸à¸ˆà¸µà¹ˆ
+รูจี
+รู้ฉลาด
+รู้เช่นเห็นชาติ
+รูด
+รู้ตัว
+รู้ตื้นลึà¸à¸«à¸™à¸²à¸šà¸²à¸‡
+รู้ทัน
+รู้ที
+รูทีเนียม
+รู้เท่า
+รู้เท่าไม่ถึงà¸à¸²à¸£à¸“์
+รู้น้อยพลอยรำคาà¸
+รูบิเดียม
+รูป
+รูป-
+รูปชี
+รูปธรรม
+รูปพยัà¸à¸Šà¸™à¸°
+รูปพรรณ
+รูปภาพ
+รูปร่าง
+รูปลอà¸
+รูปสมบัติ
+รูปสระ
+รูปิยะ
+รูปี
+รู้มลัà¸
+รู้มลาà¸
+รู้มาà¸
+รู้มาà¸à¸¢à¸²à¸à¸™à¸²à¸™
+รู้ยาวรู้สั้น
+รูเล็ตต์
+รู้ไว้ใช่ว่า ใส่บ่าà¹à¸šà¸à¸«à¸²à¸¡
+รู้สึà¸
+รู้ไส้
+รู้หลบเป็นปีภรู้หลีà¸à¹€à¸›à¹‡à¸™à¸«à¸²à¸‡
+รูหะ
+รู้หาà¸à¸£à¸¹à¹‰à¸‚ลาด
+รู้เห็น
+รู้เห็นเป็นใจ
+รู้อย่างเป็ด
+รู้อยู่
+รู้เองเป็นเอง
+เร่
+เรข
+เรขา
+เรขาคณิต
+เรขาคณิตบริสุทธิ์
+เรขาคณิตวิเคราะห์
+เร็ง
+เร่ง
+เร้ง
+เร่งมือ
+เร่งรัด
+เร่งร่าย
+เร่งรีบ
+เร่งเร้า
+เรณุ
+เรณุà¸
+เรณู
+เรดอน
+เรดาร์
+เรเดียม
+เร้น
+เร้นลับ
+เรรวน
+เร่ร่อน
+เร่ร่าย
+เรไร
+เร็ว
+เร่ว
+เรวดี
+เรอ
+เร่อ
+เร่อร่า
+เรา
+เร่า
+เร่าๆ
+เร้า
+เร่าร้อน
+เราะ
+เราะราย
+เราะร้าย
+เริง
+เริด
+เริม
+เริ่ม
+เริ้ม
+เริศร้าง
+เรี่ย
+เรี้ยๆ
+เรียà¸
+เรียà¸à¹€à¸™à¸·à¹‰à¸­
+เรียง
+เรียงๆ
+เรียงความ
+เรียงพิมพ์
+เรียงพี่เรียงน้อง
+เรียงรัน
+เรียงราย
+เรียงหน้าà¸à¸£à¸°à¸”าน
+เรียงหมอน
+เรียด
+เรียน
+เรียนปà¸à¸´à¸šà¸±à¸•à¸´
+เรียนผูà¸à¸•à¹‰à¸­à¸‡à¹€à¸£à¸µà¸¢à¸™à¹à¸à¹‰
+เรียบ
+เรียบๆ
+เรียบร้อย
+เรียบเรียง
+เรียบวุธ
+เรียม
+เรี่ยม
+เรี่ยราด
+เรี่ยราย
+เรี่ยไร
+เรียว
+เรี่ยว
+เรี้ยวรà¸
+เรี่ยวà¹à¸£à¸‡
+เรียวหนาม
+เรือ
+เรื่อ
+เรื้อ
+เรือà¸
+เรือà¸à¸ªà¸§à¸™
+เรือขนาน
+เรือขาดหางเสือ
+เรือง
+เรื่อง
+เรื้อง
+เรืองนาม
+เรืองรอง
+เรื่องราว
+เรืองไร
+เรื่องสั้น
+เรืองอำนาจ
+เรือด
+เรือดไม้
+เรือน
+เรื้อน
+เรือนà¹à¸à¹‰à¸§
+เรือนเครื่องผูà¸
+เรือนเครื่องสับ
+เรือนจำ
+เรือนตะเà¸à¸µà¸¢à¸‡
+เรือนธาตุ
+เรือนเบี้ย
+เรือนà¸à¸²à¸à¸£à¸°à¸”าน
+เรือนà¹à¸à¸”
+เรือนà¹à¸ž
+เรือนไฟ
+เรือนยอด
+เรือนหอ
+เรือบิน
+เรือพ่วง
+เรือไฟ
+เรื่อย
+เรื้อย
+เรื่อยเจื้อย
+เรื่อยเปื่อย
+เรือโยง
+เรือรบ
+เรื้อรัง
+เรือล่มในหนอง ทองจะไปไหน
+เรือล่มเมื่อจอด ตาบอดเมื่อà¹à¸à¹ˆ
+เรือà¹à¸«à¸§à¸”
+เรือใหà¸à¹ˆà¸„ับคลอง
+à¹à¸£
+à¹à¸£à¹ˆ
+à¹à¸£à¸
+à¹à¸£à¹‡à¸à¹€à¸à¸•
+à¹à¸£à¸à¸™à¸²
+à¹à¸£à¸à¸™à¸²à¸‚วัà¸
+à¹à¸£à¸‡
+à¹à¸£à¹ˆà¸‡
+à¹à¸£à¹‰à¸‡
+à¹à¸£à¸‡à¸‡à¸²à¸™
+à¹à¸£à¸‡à¸‡à¸²à¸™à¹à¸¥à¸°à¸ªà¸§à¸±à¸ªà¸”ิà¸à¸²à¸£à¸ªà¸±à¸‡à¸„ม
+à¹à¸£à¸‡à¸‡à¸²à¸™à¸ªà¸±à¸¡à¸žà¸±à¸™à¸˜à¹Œ
+à¹à¸£à¸‡à¸”ึงดูด
+à¹à¸£à¸‡à¹€à¸—ียน
+à¹à¸£à¸‡à¸¡à¹‰à¸²
+à¹à¸£à¹ˆà¸‡à¸£à¸´à¹‰à¸§
+à¹à¸£à¸‡à¸ªà¸¹à¹ˆà¸¨à¸¹à¸™à¸¢à¹Œà¸à¸¥à¸²à¸‡
+à¹à¸£à¸‡à¸«à¸™à¸µà¸¨à¸¹à¸™à¸¢à¹Œà¸à¸¥à¸²à¸‡
+à¹à¸£à¸‡à¹€à¸«à¸§à¸µà¹ˆà¸¢à¸‡
+à¹à¸£à¹ˆà¸‡à¹„หม
+à¹à¸£à¹€à¸‡à¸²
+à¹à¸£à¸”
+à¹à¸£à¸”ตัวผู้
+à¹à¸£à¸”ตัวเมีย
+à¹à¸£à¹‰à¸™à¹à¸„้น
+à¹à¸£à¸¡
+à¹à¸£à¸¡à¸£à¸­à¸™
+à¹à¸£à¸¡à¸£à¸²
+à¹à¸£à¸¡à¹‚รย
+à¹à¸£à¹‰à¸§
+à¹à¸£à¹€à¸ªà¹‰à¸™
+à¹à¸£à¸°
+โร
+โร่
+โรค
+โรค-
+โรคจิต
+โรคจิตเภท
+โรคนิทาน
+โรคประจำตัว
+โรคประสาท
+โรคระบบประสาท
+โรคศิลปะ
+โรคสมอง
+โรคา
+โรคาพยาธิ
+โรคาพาธ
+โรง
+โรงคัล
+โรงงาน
+โรงธาร
+โรงธารคำนัล
+โรงนา
+โรงรับจำนำ
+โรงเรียน
+โรงเรียนประจำ
+โรงเรียนสาธิต
+โรงเรือน
+โรงà¹à¸£à¸¡
+โรงà¹à¸ªà¸‡
+โรจ
+โรจน์
+โรเดียม
+โรตี
+โรตีสายไหม
+โรท
+โรทนะ
+โรธ
+โรธร
+โรปนะ
+โรม
+โรมมัย
+โรมรัน
+โรมัà¸à¸ˆ
+โรมัน
+โรมันคาทอลิà¸
+โรเมอร์
+โรย
+โรยขนมจีน
+โรยรา
+โรยหน้า
+โรเร
+โรษ
+โรษณะ
+โรหิณี
+โรหิต
+ไร
+ไร่
+ไร้
+ไรฟัน
+ไรย์
+ไรเรือง
+ฤ
+ฤà¸à¸©à¹Œ
+ฤà¸à¸©à¸“ะ
+ฤà¸à¸©à¹Œà¸šà¸™
+ฤà¸à¸©à¹Œà¸žà¸²à¸™à¸²à¸—ี
+ฤà¸à¸©à¹Œà¸¥à¹ˆà¸²à¸‡
+ฤคเวท
+ฤชา
+ฤชาà¸à¸£
+ฤชุ
+ฤณ
+ฤดี
+ฤดียา
+ฤดู
+ฤดูà¸à¸²à¸¥
+ฤต
+ฤติยา
+ฤตุ
+ฤตุสนาน
+ฤทธา
+ฤทธิ์
+ฤทัย
+ฤษภ
+ฤษยา
+ฤษี
+ฤๅ
+ฤๅชุ
+ฤๅชุตา
+ฤๅดี
+ฤๅทัย
+ฤๅเยา
+ฤๅษี
+ฤๅษีà¹à¸›à¸¥à¸‡à¸ªà¸²à¸£
+ฤๅษีผสมà¹à¸¥à¹‰à¸§
+ฤๅษีเลี้ยงลิง
+ฤๅสาย
+ล
+ลà¸
+ลà¸à¸²à¸£
+ลà¸à¸¸à¸ˆ
+ลคุฑ
+ลคุฬ
+ลฆุ
+ลฆุจิต
+ลฆุภาพ
+ลฆุโภชน์
+ลง
+ล่ง
+ลงà¸à¸¥à¸­à¸™
+ลงà¸à¸²
+ลงขัน
+ลงข่าว
+ลงà¹à¸‚à¸
+ลงคอ
+ลงเงิน
+ลงชื่อ
+ลงà¹à¸”ง
+ลงตัว
+ลงทอง
+ลงท้อง
+ลงท่า
+ลงท้าย
+ลงทุน
+ลงโทษ
+ลงนา
+ลงเนื้อเห็นด้วย
+ลงโบสถ์
+ลงà¹à¸›à¹‰à¸‡
+ลงผี
+ลงà¸à¸±à¸
+ลงพระบังคน
+ลงพื้น
+ลงพุง
+ลงมีด
+ลงมือ
+ลงยา
+ลงรอยà¸à¸±à¸™
+ลงรัà¸
+ลงราà¸
+ลงà¹à¸£à¸‡
+ลงโรง
+ล้งเล้ง
+ลงสรง
+ลงหà¸à¹‰à¸²à¸Šà¹‰à¸²à¸‡
+ลงหิน
+ลงอาชà¸à¸²
+ลงอาà¸à¸²
+ลงอุโบสถ
+ลงเอย
+ลด
+ลดเขื่อน
+ลดราวาศอà¸
+ลดละ
+ลดเลี้ยว
+ลดเลี้ยวเà¸à¸µà¹‰à¸¢à¸§à¸žà¸²
+ลดหย่อน
+ลดหลั่น
+ลดา
+ลดาวัลย์
+ลน
+ล่น
+ล้น
+ล้นเà¸à¸¥à¹‰à¸²à¸¥à¹‰à¸™à¸à¸£à¸°à¸«à¸¡à¹ˆà¸­à¸¡
+ลนควัน
+ล้นพ้น
+ลนลาน
+ล้นหลาม
+ลบ
+ลบม
+ลบรอย
+ลบล้าง
+ลบเลือน
+ลบโลà¸
+ลบศัà¸à¸£à¸²à¸Š
+ลบหลู่
+ลบเหลี่ยม
+ลบอง
+ลปà¸
+ลปน
+ลพ
+ลพุช
+ลม
+ลมๆ
+ล่ม
+ล้ม
+ลมà¸à¸£à¸”
+ลมขึ้น
+ล้มคว่ำ
+ลมค้า
+ลมงวง
+ล่มจม
+ลมจับ
+ลมà¹à¸”ง
+ลมทวนลมค้า
+ลมทะเล
+ล้มทั้งยืน
+ลมบà¸
+ลมบ้าหมู
+ลมปราณ
+ลมปาà¸
+ลมพัดชายเขา
+ลมพัดหลวง
+ลมพิษ
+ลมเพลมพัด
+ล่มฟ้า
+ลมไม่ดี
+ลมล่อง
+ล้มละลาย
+ล้มลุà¸
+ล้มลุà¸à¸„ลุà¸à¸„ลาน
+ล้มเลิà¸
+ลมà¹à¸¥à¹‰à¸‡
+ลมๆ à¹à¸¥à¹‰à¸‡à¹†
+ลมว่าว
+ลมเสีย
+ล้มหมอนนอนเสื่อ
+ลมาด
+ลรรลุง
+ลลนา
+ลลาà¸
+ลลิต
+ลวà¸
+ลวง
+ล่วง
+ล้วง
+ล้วงà¸à¸£à¸°à¹€à¸›à¹‹à¸²
+ล่วงเà¸à¸´à¸™
+ล่วงขื่อ
+ลวงค์
+ล้วงคองูเห่า
+ล่วงคำ
+ล้วงตับ
+ลวงตา
+ล่วงประเวณี
+ล่วงà¹à¸›
+ล่วงพ้น
+ล้วงมือ
+ล่วงรู้
+ล่วงลับ
+ล่วงล้ำ
+ล่วงเลย
+ลวงเล้า
+ล่วงว่า
+ล่วงเวลา
+ล้วงไส้
+ล่วงหน้า
+ลวณะ
+ลวด
+ลวดลาย
+ลวดสปริง
+ลวดหนัง
+ลวดหนาม
+ล้วน
+ล้วนๆ
+ลวนลาม
+ลวนะ
+ล่วม
+ลวะ
+ลวิตร
+ลหุ
+ลหุà¸-
+ลหุà¸à¸°
+ลหุà¸à¸²à¸šà¸±à¸•à¸´
+ลหุโทษ
+ล่อ
+ล้อ
+ลอà¸
+ล็อà¸à¹€à¸à¸•
+ลอà¸à¸„ราบ
+ลอà¸à¸—้องร่อง
+ลอà¸à¹€à¸¥à¸™
+ลอà¸à¹à¸¥à¸
+ลอà¸à¸²à¸£à¸´à¸—ึม
+ลอง
+ล่อง
+ลองà¸à¸­à¸‡
+ล่องà¹à¸à¹ˆà¸‡
+ล่องจวน
+ลองจิจูด
+ลองใจ
+ล่องชาด
+ลองเชิง
+ลองดี
+ล่องถุน
+ลองธรรม์
+ลองใน
+ลองไน
+ลองภูมิ
+ล่องà¹à¸¡à¸§
+ล่องหน
+ลอด
+ลอดช่อง
+ลอน
+ล่อน
+ล่อนà¹à¸à¹ˆà¸™
+ล่อนจ้อน
+ลอนทอง
+ลอบ
+ลอบà¸à¸±à¸”
+ลอม
+ล้อม
+ลอมชอม
+ล้อมปรวด
+ลอมพอà¸
+ล้อมวง
+ลอย
+ลอยๆ
+ล่อยๆ
+ลอยà¸à¸£à¸°à¸—ง
+ลอยà¹à¸à¹‰à¸§
+ลอยคอ
+ลอยช้อน
+ลอยชาย
+ลอยดอà¸
+ลอยตัว
+ลอยนวล
+ลอยบาป
+ลอยà¹à¸ž
+ลอยฟ้า
+ลอยเมฆ
+ลอยลำ
+ลอยหน้า
+ล่อลวง
+ล้อเลียน
+ล้อเลื่อน
+ล่อà¹à¸¥à¹ˆ
+ลอว์เรนเซียม
+ล่อหลอà¸
+ล้อหลอà¸
+ล่อà¹à¸«à¸¥à¸¡
+ลออ
+ละ
+ล่ะ
+ละà¸à¸¥
+ละà¸à¸¹à¸¡à¸°à¸™à¸´à¸ª
+ละขัดละขืน
+ละคร
+ละครยà¸
+ละคิ
+ละคึà¸
+ละงาด
+ละงิด
+ละติจูด
+ละทิ้ง
+ละบม
+ละบอง
+ละบองไฟ
+ละบองราหู
+ละบัด
+ละบือ
+ละเบ็ง
+ละโบม
+ละม่อม
+ละมั่ง
+ละมา
+ละมาน
+ละม้าย
+ละมุ
+ละมุด
+ละมุน
+ละมุนละไม
+ละเม็ด
+ละเมอ
+ละเมาะ
+ละเมิด
+ละเมิดลิขสิทธิ์
+ละเมิน
+ละเมียด
+ละเมียบ
+ละà¹à¸¡à¸°
+ละโมà¸
+ละโมบ
+ละไม
+ละรี
+ละลด
+ละลนละลาน
+ละลมละลาย
+ละลวย
+ละลอà¸
+ละลอบละเล้า
+ละลัง
+ละลัด
+ละล้า
+ละลาน
+ละลาบละล้วง
+ละลาย
+ละล้าละลัง
+ละล้าว
+ละล่ำละลัà¸
+ละลิบ
+ละลุง
+ละลุม
+ละเลง
+ละเลงขนมเบื้องด้วยปาà¸
+ละเลย
+ละเล้า
+ละเลาะ
+ละเลาะละลอง
+ละเลิง
+ละเลียด
+ละเลียบ
+ละเลือà¸
+ละไล้
+ละวล
+ละว้อ
+ละว้า
+ละวาง
+ละวาด
+ละเวง
+ละเว้น
+ละà¹à¸§à¸
+ละโว้
+ละหมาด
+ละหมาดà¸à¸²à¸™à¸²à¸‹à¸°à¸®à¹Œ
+ละหลัด
+ละห้อย
+ละหาน
+ละหุ่ง
+ละเหย
+ละเหี่ย
+ละองละมั่ง
+ละออง
+ละอาย
+ละเอียด
+ละเอียดลออ
+ละà¹à¸­à¸™
+ลัà¸
+ลัà¸à¹„à¸à¹ˆ
+ลัà¸à¸‚ณะ
+ลัà¸à¸‚ณา
+ลัà¸à¸‚ะ
+ลัà¸à¸‚ี
+ลัà¸à¹€à¸„้า
+ลัà¸à¸ˆà¸±à¹ˆà¸™
+ลัà¸à¸›à¸´à¸”ลัà¸à¹€à¸›à¸´à¸”
+ลัà¸à¸žà¸²
+ลัà¸à¹€à¸žà¸¨
+ลัà¸à¸¢à¸´à¹‰à¸¡
+ลัà¸à¸¥à¸­à¸š
+ลัà¸à¸¥à¸±à¹ˆà¸™
+ลัà¸à¸¥à¸²à¸¢
+ลัà¸à¹€à¸¥à¸µà¸¢à¸¡
+ลัà¸à¸¨à¸ž
+ลัà¸à¸©à¸“-
+ลัà¸à¸©à¸“นาม
+ลัà¸à¸©à¸“ะ
+ลัà¸à¸©à¸“าà¸à¸²à¸£
+ลัà¸à¸©à¸¡à¸“์
+ลัà¸à¸©à¸¡à¸²à¸“า
+ลัà¸à¸©à¸¡à¸µ
+ลัà¸à¸©à¸°
+ลัà¸à¸ªà¸£à¹‰à¸­à¸¢
+ลัà¸à¸ªà¸µ
+ลัà¸à¸«à¸¥à¸±à¸š
+ลัคคะ
+ลัคน-
+ลัคน์
+ลัคนา
+ลัง
+ลั่ง
+ลังà¸à¸²
+ลังคิ
+ลังคี
+ลังถึง
+ลังลอง
+ลังเล
+ลังสาด
+ลัชชา
+ลัชชี
+ลัà¸à¸ˆà¹Œ
+ลัà¸à¸ˆà¸à¸£
+ลัà¸à¸‰
+ลัà¸à¸‰à¸à¸£
+ลัà¸à¸‰à¸™à¹Œ
+ลัà¸à¸´
+ลัà¸à¸´à¸à¸²
+ลัด
+ลัดนิ้วมือ
+ลัดเนื้อ
+ลัดเลาะ
+ลัดà¹à¸¥à¸‡
+ลัดวงจร
+ลัดา
+ลัทธ์
+ลัทธิ
+ลัน
+ลั่น
+ลั่นà¸à¸¸à¸à¹à¸ˆ
+ลั่นไà¸
+ลั่นฆ้อง
+ลั่นดาล
+ลันเต
+ลันเตา
+ลันไต
+ลั่นถัน
+ลั่นทม
+ลันทวย
+ลันโทม
+ลั่นนà¸
+ลั่นปาà¸
+ลั่นวาจา
+ลับ
+ลับตา
+ลับปาà¸
+ลับà¸à¸µà¸›à¸²à¸
+ลับลมคมใน
+ลับล่อ
+ลับๆ ล่อๆ
+ลับลี้
+ลับà¹à¸¥
+ลับสมอง
+ลับหลัง
+ลับหู
+ลัพธ์
+ลัพธิ
+ลัภ
+ลัภนะ
+ลัภย์
+ลัมพ์
+ลัย
+ลัย-
+ลัยà¸à¸²à¸¥
+ลัยคต
+ลา
+ล่า
+ล้า
+ลาà¸
+ลาà¸à¸‚้าง
+ลาà¸à¸©à¸²
+ลาà¸à¹€à¸ªà¹‰à¸™
+ลาà¸à¸«à¸™à¸²à¸¡à¸ˆà¸¸à¸à¸Šà¹ˆà¸­à¸‡
+ลาขา
+ลาข้าวพระ
+ลาง
+ล่าง
+ล้าง
+ลางคัล
+ล้างà¹à¸„้น
+ลางงิด
+ล้างท้อง
+ลางที
+ลางเนื้อชอบลางยา
+ล้างปาà¸
+ล้างป่าช้า
+ล้างผลาà¸
+ล้างไพ่
+ล้างมือ
+ลางลิง
+ล้างโลà¸
+ล้างสมอง
+ลางสาด
+ล้างอาย
+ลางาด
+ล้างาด
+ลาเง็ด
+ลาช
+ลาชา
+ลาà¸
+ลาà¸à¸—ัà¸
+ลาด
+ลาดเขา
+ลาดตระเวน
+ลาดทวีป
+ลาดเท
+ลาดพระบาท
+ลาดยาง
+ลาดเลา
+ล้าต้า
+ลาตาย
+ล่าเตียง
+ล้าเตียง
+ลาน
+ล่าน
+ล้าน
+ลาบ
+ลาป
+ลาพรรษา
+ลาพอน
+ลาพุ
+ลาพุช
+ลาเพ
+ลาเพา
+ลาภ
+ลาภมิควรได้
+ลาม
+ล่าม
+ลามà¸
+ลามปาม
+ลามลวน
+ลาย
+ล้าย
+ลายขัด
+ลายคราม
+ลายตา
+ลายเทศ
+ลายà¹à¸—ง
+ลายน้ำ
+ลายน้ำทอง
+ลายพระหัตถ์
+ลายพาดà¸à¸¥à¸­à¸™
+ลายมือ
+ลายมือชื่อ
+ลายไม้
+ลายลัà¸à¸©à¸“์
+ลายสอ
+ลายสอง
+ลายสาบ
+ลายสือ
+ลายอย่าง
+ลายฮ่อ
+ลาโรง
+ลาลนะ
+ลาลส
+ลาลา
+ลาโลà¸
+ลาว
+ลาวà¸
+ลาวัณย์
+ลาวา
+ลาสนะ
+ล้าสมัย
+ลาสิà¸à¸‚า
+ล้าหลัง
+ลำ
+ล่ำ
+ล้ำ
+ลำà¸à¸£à¸°à¹‚ดง
+ลำà¸à¸¥à¹‰à¸­à¸‡
+ลำเข็à¸
+ลำà¹à¸‚
+ลำà¹à¸‚้ง
+ลำเค็à¸
+ลำเคือง
+ลำงาด
+ลำเจียà¸
+ลำเจียà¸à¸«à¸™à¸¹
+ลำดวน
+ลำดับ
+ลำตัด
+ลำธาร
+ลำนัà¸
+ลำนำ
+ลำเนา
+ลำบอง
+ลำบาà¸
+ลำบุ
+ลำปำ
+ลำพวน
+ลำพอง
+ลำพัง
+ลำพู
+ลำพู่à¸à¸±à¸™
+ลำเพ็à¸
+ลำเพา
+ลำà¹à¸žà¸‡
+ลำà¹à¸žà¸™
+ลำโพง
+ลำไพ่
+ลำภุขัน
+ลำมะลอà¸
+ลำมาด
+ลำมาบ
+ลำเมาะ
+ลำเมียบ
+ลำยอง
+ลำยา
+ลำไย
+ลำลอง
+ล่ำลา
+ลำลาบ
+ลำลำ
+ลำลึà¸
+ลำเลาะ
+ลำเลิà¸
+ล้ำเลิศ
+ลำเลียง
+ลำเลียบ
+ลำเวียง
+ลำเวียน
+ล่ำสัน
+ลำเสา
+ลำไส้
+ลำหนัà¸
+ล้ำหน้า
+ลำห้วย
+ลำหัà¸à¸¥à¸³à¹‚ค่น
+ลำอุด
+ลำเอียà¸
+ลำเอียง
+ลำโอง
+ลิ
+ลิà¸à¸‚า
+ลิà¸à¹„นต์
+ลิà¸à¸©à¸²
+ลิà¸à¸¸à¸ˆ
+ลิเà¸
+ลิขนะ
+ลิขสิทธิ์
+ลิขิต
+ลิง
+ลิงค์
+ลิงจุ่น
+ลิงชิงหลัà¸
+ลิงตà¸à¸•à¹‰à¸™à¹„ม้
+ลิงลม
+ลิงโลด
+ลิงหลอà¸à¹€à¸ˆà¹‰à¸²
+ลิด
+ลิดตีนปู
+ลิดรอน
+ลิต
+ลิตมัส
+ลิตร
+ลิเทียม
+ลิ่น
+ลิ้น
+ลิ้นà¸à¸£à¸°à¸”้างคางà¹à¸‚็ง
+ลิ้นà¸à¸£à¸°à¸šà¸·à¸­
+ลินโà¸à¸£à¸¢
+ลิ้นไà¸à¹ˆ
+ลิ้นควาย
+ลิ้นงูเห่า
+ลินจง
+ลิ้นจะà¸à¸§à¸”
+ลิ้นจี่
+ลิ้นชัà¸
+ลิ่นต้น
+ลิ้นตวัดถึงหู
+ลิ้นตะà¸à¸§à¸”
+ลิ้นทอง
+ลิ่นทะเล
+ลิ้นทะเล
+ลิ้นปี่
+ลิ้นมังà¸à¸£
+ลิ้นไม่มีà¸à¸£à¸°à¸”ูà¸
+ลิ้นลม
+ลิ้นลังà¸à¸²
+ลินลา
+ลินลาà¸à¸£à¸°à¸—ุ่ม
+ลินลาà¸à¸£à¸°à¸šà¸µà¹ˆ
+ลิ้นลาย
+ลินสีด
+ลิ้นเสือ
+ลิ้นหมา
+ลิ่นฮื้อ
+ลินิน
+ลิบ
+ลิบลับ
+ลิบลิ่ว
+ลิปดา
+ลิปต์
+ลิปสติà¸
+ลิปิ
+ลิปิà¸à¸£
+ลิปิà¸à¸²à¸£
+ลิฟต์
+ลิเภา
+ลิ่ม
+ลิ้ม
+ลิมป์
+ลิมปนะ
+ลิลิต
+ลิว
+ลิ่ว
+ลิสง
+ลี
+ลี่
+ลี้
+ลีซอ
+ลีบ
+ลี้ลับ
+ลีลา
+ลีลาà¸à¸£à¸°à¸—ุ่ม
+ลีลาศ
+ลีฬหา
+ลึà¸
+ลึà¸à¸‹à¸¶à¹‰à¸‡
+ลึà¸à¸¥à¸±à¸š
+ลึà¸à¸¥à¹‰à¸³
+ลึงค์
+ลึงค์นายพราน
+ลืด
+ลื่น
+ลื้น
+ลืบ
+ลืม
+ลืมตน
+ลืมต้น
+ลืมตัว
+ลืมตา
+ลือ
+ลื่อ
+ลื้อ
+ลือชา
+ลือชาปราà¸à¸
+ลื่อชื่อ
+ลือสาย
+ลุ
+ลุà¸
+ลุà¸à¸¥à¸™
+ลุà¸à¸¥à¸²à¸¡
+ลุà¸à¸¥à¸µà¹‰à¸¥à¸¸à¸à¸¥à¸™
+ลุà¸à¸®à¸·à¸­
+ลุà¹à¸à¹ˆà¹‚ทษ
+ลุà¹à¸à¹ˆà¸­à¸³à¸™à¸²à¸ˆ
+ลุง
+ลุ้ง
+ลุต
+ลุท
+ลุทà¸à¸°
+ลุทธ์
+ลุ่น
+ลุ่นๆ
+ลุ่นตุ้น
+ลุ่นโตง
+ลุปต์
+ลุพธ์
+ลุพธà¸à¸°
+ลุ่ม
+ลุ่มๆ ดอนๆ
+ลุ่มน้ำ
+ลุ่มเนื้อ
+ลุมป์
+ลุมพี
+ลุมพู
+ลุ่มเล้า
+ลุ่มหลง
+ลุย
+ลุ่ย
+ลุ้ย
+ลุ่ยหู
+ลุล่วง
+ลุลาย
+ลุสา
+ลุอำนาจ
+ลู่
+ลูà¸
+ลูà¸à¸à¸
+ลูà¸à¸à¸£à¸‡
+ลูà¸à¸à¸£à¸­à¸
+ลูà¸à¸à¸£à¸°à¹€à¸”ือà¸
+ลูà¸à¸à¸£à¸°à¸žà¸£à¸§à¸™
+ลูà¸à¸à¸£à¸°à¹à¸­à¸¡
+ลูà¸à¸à¸¥à¸­à¸™
+ลูà¸à¸à¸¥à¸´à¹‰à¸‡
+ลูà¸à¸à¸§à¸²à¸”
+ลูà¸à¸à¸°à¹‚ล่
+ลูà¸à¸à¸°à¹à¸­
+ลูà¸à¸à¸±à¸¥à¸›à¸žà¸¤à¸à¸©à¹Œ
+ลูà¸à¹à¸à¹‰à¸§
+ลูà¸à¹‚à¸à¸¥à¸™
+ลูà¸à¹„à¸à¹ˆ
+ลูà¸à¹„à¸à¹ˆà¸­à¸¢à¸¹à¹ˆà¹ƒà¸™à¸à¸³à¸¡à¸·à¸­
+ลูà¸à¸‚วัà¸
+ลูà¸à¸‚ัด
+ลูà¸à¸‚่าง
+ลูà¸à¸‚้าว
+ลูà¸à¸‚ุน
+ลูà¸à¸‚ุน ณ ศาลหลวง
+ลูà¸à¸‚ุน ณ ศาลา
+ลูà¸à¸‚ุนพลอยพยัà¸
+ลูà¸à¹€à¸‚ย
+ลูà¸à¹€à¸‚ยตายà¹à¸¡à¹ˆà¸¢à¸²à¸¢à¸Šà¸±à¸à¸›à¸£à¸
+ลูà¸à¹€à¸‚ยตายà¹à¸¡à¹ˆà¸¢à¸²à¸¢à¸—ำศพ
+ลูà¸à¸„รอà¸
+ลูà¸à¸„รึ่ง
+ลูà¸à¸„ลัà¸
+ลูà¸à¸„วาม
+ลูà¸à¸„อ
+ลูà¸à¸„อà¸
+ลูà¸à¸„ัน
+ลูà¸à¸„้า
+ลูà¸à¸„ำ
+ลูà¸à¸„ิด
+ลูà¸à¹€à¸„ล้า
+ลูà¸à¸†à¹‰à¸­à¸‡
+ลูà¸à¸ˆà¹Šà¸­à¸
+ลูà¸à¸ˆà¹‰à¸²à¸‡
+ลูà¸à¹€à¸ˆà¸µà¹Šà¸¢à¸š
+ลูà¸à¸Šà¹ˆà¸§à¸‡
+ลูà¸à¸Šà¹‰à¸²à¸‡
+ลูà¸à¸Šà¸´à¸”
+ลูà¸à¸Šà¸´à¹‰à¸™
+ลูà¸à¹‚ซ่
+ลูà¸à¸”อà¸
+ลูà¸à¸”ิ่ง
+ลูà¸à¹‚ดด
+ลูà¸à¸•à¸±à¹‰à¸‡
+ลูà¸à¸•à¸¸à¹‰à¸¡
+ลูà¸à¹€à¸•à¹‰à¸²
+ลูà¸à¹€à¸•à¹‹à¸²
+ลูà¸à¹à¸•à¸
+ลูà¸à¸–้วย
+ลูà¸à¹€à¸–ื่อน
+ลูà¸à¹à¸–ว
+ลูà¸à¸—อย
+ลูà¸à¸—่านหลานเธอ
+ลูà¸à¸—ุ่ง
+ลูà¸à¹€à¸˜à¸­
+ลูà¸à¸™à¹‰à¸­à¸‡
+ลูà¸à¸™à¸²
+ลูà¸à¸™à¹‰à¸³
+ลูà¸à¸™à¸´à¸¡à¸´à¸•
+ลูà¸à¸šà¸—
+ลูà¸à¸šà¸§à¸š
+ลูà¸à¸šà¹‰à¸²à¸™
+ลูà¸à¸šà¸²à¸¨à¸à¹Œ
+ลูà¸à¸šà¸´à¸”
+ลูà¸à¸šà¸¸à¸à¸˜à¸£à¸£à¸¡
+ลูà¸à¹€à¸šà¸µà¹‰à¸¢à¸§
+ลูà¸à¸›à¸£à¸°à¸„บ
+ลูà¸à¸›à¸£à¸°à¸„ำ
+ลูà¸à¸›à¸£à¸°à¸„ำผี
+ลูà¸à¸›à¸£à¸°à¸ªà¸¡
+ลูà¸à¸›à¸£à¸°à¸ªà¸±à¸
+ลูà¸à¸›à¸£à¸°à¸«à¸¥à¹ˆà¸³
+ลูà¸à¸›à¸£à¸²à¸¢
+ลูà¸à¸›à¸¥à¸°
+ลูà¸à¸›à¸¥à¸²
+ลูà¸à¸›à¸°à¸à¸™
+ลูà¸à¸›à¸±à¸”
+ลูà¸à¸›à¸²
+ลูà¸à¸›à¹ˆà¸²
+ลูà¸à¸›à¸·à¸™
+ลูà¸à¸›à¸·à¸™à¹ƒà¸«à¸à¹ˆ
+ลูà¸à¹à¸›
+ลูà¸à¹‚ป่ง
+ลูà¸à¹‚ป่งสวรรค์
+ลูà¸à¸œà¸ªà¸¡
+ลูà¸à¸œà¸±à¸à¸Šà¸µ
+ลูà¸à¸œà¸µà¸¥à¸¹à¸à¸„น
+ลูà¸à¸œà¸¹à¹‰à¸Šà¸²à¸¢
+ลูà¸à¸œà¸¹à¹‰à¸™à¹‰à¸­à¸‡
+ลูà¸à¸œà¸¹à¹‰à¸žà¸µà¹ˆ
+ลูà¸à¸œà¸¹à¹‰à¸«à¸à¸´à¸‡
+ลูà¸à¹„ผ่
+ลูà¸à¸à¸²à¹à¸à¸”
+ลูà¸à¹à¸à¸”
+ลูà¸à¸žà¸£à¸§à¸™
+ลูà¸à¸žà¸£à¸´à¸
+ลูà¸à¸žà¸¥à¸¹
+ลูà¸à¸žà¸µà¹ˆ
+ลูà¸à¸žà¸µà¹ˆà¸¥à¸¹à¸à¸™à¹‰à¸­à¸‡
+ลูà¸à¸Ÿà¸±à¸
+ลูà¸à¸Ÿà¸¹à¸
+ลูà¸à¹„ฟ
+ลูà¸à¸¡à¹‚หตร
+ลูà¸à¸¡à¸°à¸«à¸§à¸”
+ลูà¸à¸¡à¸²à¸”
+ลูà¸à¸¡à¸·à¸­
+ลูà¸à¹‚ม่
+ลูà¸à¹„ม้
+ลูà¸à¹„ม้หล่นไม่ไà¸à¸¥à¸•à¹‰à¸™
+ลูà¸à¸¢à¸­
+ลูà¸à¸¢à¹ˆà¸²à¸‡
+ลูà¸à¸¢à¸²à¹€à¸˜à¸­
+ลูà¸à¹‚ยน
+ลูà¸à¸£à¸­à¸
+ลูà¸à¸£à¸°à¸¡à¸²à¸¨
+ลูà¸à¸£à¸±à¸‡
+ลูà¸à¸£à¸¸à¹ˆà¸¢
+ลูà¸à¹€à¸£à¸·à¸­
+ลูà¸à¸¥à¸¡
+ลูà¸à¸¥à¹‰à¸­
+ลูà¸à¸¥à¹ˆà¸²
+ลูà¸à¹€à¸¥à¹ˆà¸™
+ลูà¸à¹€à¸¥à¸µà¹‰à¸¢à¸‡
+ลูà¸à¹à¸¥à¹ˆà¸‡
+ลูà¸à¹‚ลà¸
+ลูà¸à¹„ล่
+ลูà¸à¸§à¸±à¸”
+ลูà¸à¸¨à¸´à¸©à¸¢à¹Œ
+ลูà¸à¸ªà¸¡à¸ à¸²à¸£à¸«à¸¥à¸²à¸™à¹€à¸ˆà¹‰à¸²à¸§à¸±à¸”
+ลูà¸à¸ªà¸¡à¸¸à¸™
+ลูà¸à¸ªà¸§à¸£à¸£à¸„์
+ลูà¸à¸ªà¸§à¸²à¸—
+ลูà¸à¸ªà¸°à¸šà¹‰à¸²
+ลูà¸à¸ªà¸°à¹ƒà¸ à¹‰
+ลูà¸à¸ªà¸±à¸‡à¸à¸°à¸ªà¸µ
+ลูà¸à¸ªà¸¹à¸š
+ลูà¸à¹€à¸ªà¸·à¸­
+ลูà¸à¸«à¸™à¸µà¹‰
+ลูà¸à¸«à¸™à¸¹
+ลูà¸à¸«à¸¡à¸”
+ลูà¸à¸«à¸¡à¹‰à¸­
+ลูà¸à¸«à¸¡à¸²à¸
+ลูà¸à¸«à¸¡à¸¹à¹ˆ
+ลูà¸à¸«à¸¥à¸‡
+ลูà¸à¸«à¸¥à¸§à¸‡
+ลูà¸à¸«à¸²à¸š
+ลูà¸à¸«à¸´à¸™
+ลูà¸à¸«à¸´à¸™à¸šà¸”
+ลูà¸à¸«à¸µà¸š
+ลูà¸à¹€à¸«à¹‡à¸š
+ลูà¸à¹à¸«
+ลูà¸à¹à¸«à¸‡à¹ˆ
+ลูà¸à¸­à¸¡
+ลูà¸à¹€à¸­à¹‡à¸™
+ลูà¸à¹€à¸­à¹‡à¸¥
+ลูขะ
+ลูตา
+ลูติà¸à¸²
+ลู่ทาง
+ลูทีเชียม
+ลูนะ
+ลูบ
+ลูบคม
+ลูบคลำ
+ลูบตัว
+ลูบไล้
+ลูบหน้าปะจมูà¸
+ลู่หลี่
+เลà¸
+เล็à¸
+เล็à¸à¸”า
+เล็à¸à¸™à¹‰à¸­à¸¢
+เล็à¸à¸žà¸£à¸´à¸à¸‚ี้หนู
+เลà¸à¸§à¸±à¸”
+เลข
+เลขà¸à¸°
+เลขคณิต
+เลขจำนวน
+เลขชี้à¸à¸³à¸¥à¸±à¸‡
+เลขโดด
+เลขนะ
+เลขผา
+เลขยะ
+เลขยันต์
+เลขลำดับ
+เลขหมาย
+เลขา
+เลขาธิà¸à¸²à¸£
+เลขานุà¸à¸²à¸£
+เล็ง
+เล้ง
+เล็งลัคน์
+เล่งฮื้อ
+เลเซอร์
+เลฑฑุ
+เลณ
+เลณฑุ
+เล็ด
+เล็ดลอด
+เลต
+เลน
+เล็น
+เล่น
+เล่นà¸à¸¥
+เล่นà¸à¸±à¸šà¹„ฟ
+เล่นขายของ
+เล่นคำ
+เล่นงาน
+เลนจง
+เล่นชู้
+เล่นตลà¸
+เล่นตัว
+เล่นเบี้ย
+เล่นพวà¸
+เล่นพิเรนทร์
+เล่นเพลงยาว
+เล่นเพื่อน
+เล่นà¹à¸£à¹ˆà¹à¸›à¸£à¸˜à¸²à¸•à¸¸
+เล่นลิ้น
+เลนส์
+เลนส์ตีบà¹à¸ªà¸‡
+เลนส์ถ่างà¹à¸ªà¸‡
+เลนส์นูน
+เล่นสวาท
+เลนส์เว้า
+เลนส์สัมผัส
+เล่นสำนวน
+เลนหะรี
+เล่นหัว
+เล่นหาง
+เล่นหูเล่นตา
+เล่นเอาเถิดเจ้าล่อ
+เล็บ
+เล็บครุฑ
+เล็บควาย
+เลบง
+เล็บนาง
+เล็บมือนาง
+เล็บเหยี่ยว
+เลป-
+เลปà¸à¸£
+เลปน์
+เลเป
+เลเพ
+เลเพลาดพาด
+เล็ม
+เล่ม
+เล็มล่า
+เลย
+เลยตามเลย
+เลยเถิด
+เลว
+เลวง
+เลวูโลส
+เลศ
+เลษà¸à¸¸
+เลห
+เล่ห์
+เล่ห์à¸à¸£à¸°à¹€à¸—่ห์
+เลหยะ
+เลหลัง
+เลหลา
+เล่ห์เหลี่ยม
+เลหะ
+เลอ
+เล่อ
+เลอมาน
+เล่อล่า
+เลอะ
+เลอะเทอะ
+เละ
+เละเทะ
+เลา
+เลาๆ
+เล่า
+เล้า
+เลาà¸à¸±à¸¢
+เล่าเรียน
+เล่าลือ
+เล้าโลม
+เลาะ
+เลิà¸
+เลิà¸à¸¥à¹‰à¸¡
+เลิ่à¸à¸¥à¸±à¹ˆà¸
+เลิ้ง
+เลินเล่อ
+เลิศ
+เลีย
+เลียง
+เลี่ยง
+เลี้ยง
+เลียงขาว
+เลี้ยงà¹à¸‚à¸
+เลี้ยงช้างà¸à¸´à¸™à¸‚ี้ช้าง
+เลี้ยงดู
+เลี้ยงต้อย
+เลี้ยงโต๊ะ
+เลี้ยงปาà¸à¹€à¸¥à¸µà¹‰à¸¢à¸‡à¸—้อง
+เลียงผา
+เลียงà¸à¹‰à¸²à¸¢
+เลียงมัน
+เลี้ยงรับ
+เลี้ยงลา
+เลี้ยงลูà¸à¹€à¸ªà¸·à¸­à¸¥à¸¹à¸à¸ˆà¸£à¸°à¹€à¸‚้
+เลี้ยงส่ง
+เลียน
+เลี่ยน
+เลียนไฟ
+เลียบ
+เลียบค่าย
+เลียบเคียง
+เลียบเมือง
+เลียม
+เลี่ยม
+เลียว
+เลี้ยว
+เลี้ยวลด
+เลือà¸
+เลือà¸à¸•à¸±à¹‰à¸‡
+เลือà¸à¸—ี่รัà¸à¸¡à¸±à¸à¸—ี่ชัง
+เลือà¸à¸™à¸±à¸à¸¡à¸±à¸à¹„ด้à¹à¸£à¹ˆ
+เลือà¸à¸ªà¸£à¸£
+เลือง
+เลื่อง
+เลื่องลือ
+เลือด
+เลือดขึ้นหน้า
+เลือดเข้าตา
+เลือดเนื้อ
+เลือดเนื้อเชื้อไข
+เลือดในอà¸
+เลือดà¸à¸²à¸”
+เลือดไม้
+เลือดเย็น
+เลือดร้อน
+เลือดล้างหน้า
+เลือดอุ่น
+เลือน
+เลื่อน
+เลื่อนที่
+เลื่อนเปื้อน
+เลื่อนลอย
+เลื่อม
+เลื่อมใส
+เลื่อย
+เลื้อย
+เลื้อยคลาน
+เลื้อยเจื้อย
+เลื่อยล้า
+à¹à¸¥
+à¹à¸¥à¹ˆ
+à¹à¸¥à¹‰
+à¹à¸¥à¸
+à¹à¸¥à¹‡à¸à¹‚ทส
+à¹à¸¥à¸à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™
+à¹à¸¥à¸‡
+à¹à¸¥à¹ˆà¸‡
+à¹à¸¥à¹‰à¸‡
+à¹à¸¥à¸‡à¸à¸´à¸™à¸Ÿà¸±à¸™
+à¹à¸¥à¹ˆà¸‡à¸žà¸£à¸°à¸£à¸²à¸¡
+à¹à¸¥à¸™
+à¹à¸¥à¹ˆà¸™
+à¹à¸¥à¸™à¸—านัม
+à¹à¸¥à¸š
+à¹à¸¥à¹‰à¸§
+à¹à¸¥à¹‰à¸§à¸à¸±à¸™
+à¹à¸¥à¹‰à¸§à¸”้วย
+à¹à¸¥à¹‰à¸§à¹à¸•à¹ˆ
+à¹à¸¥à¹‰à¸§à¹„ป
+à¹à¸¥à¹‰à¸§...เล่า
+à¹à¸¥à¹‰à¸§à¹† เล่าๆ
+à¹à¸¥à¸°
+à¹à¸¥à¸°à¹€à¸¥à¹‡à¸¡
+à¹à¸¥à¸°à¹€à¸¥à¸µà¸¢à¸¡
+โล่
+โล้
+โลà¸
+โลà¸-
+โลà¸à¹€à¸Šà¸©à¸à¹Œ
+โลà¸à¸˜à¸£à¸£à¸¡
+โลà¸à¸˜à¸²à¸”า
+โลà¸à¸˜à¸²à¸•à¸¸
+โลà¸à¸™à¸²à¸–
+โลà¸à¸šà¸²à¸¥
+โลà¸à¸¢à¹Œ
+โลà¸à¸¢à¸°
+โลà¸à¸§à¸±à¸Šà¸Šà¸°
+โลà¸à¸§à¸´à¸—ู
+โลà¸à¸ªà¸–ิติ
+โลà¸à¸­à¸¸à¸”ร
+โลà¸à¸±à¸•à¸–จริยา
+โลà¸à¸±à¸™à¸•à¸£à¹Œ
+โลà¸à¸±à¸¢
+โลà¸à¸²
+โลà¸à¸²à¸˜à¸´à¸šà¸”ี
+โลà¸à¸²à¸˜à¸´à¸›à¹„ตย
+โลà¸à¸²à¸™à¸¸à¸§à¸±à¸•à¸£
+โลà¸à¸²à¸ à¸´à¸§à¸±à¸•à¸™à¹Œ
+โลà¸à¸²à¸¡à¸´à¸ª
+โลà¸à¸²à¸¢à¸±à¸•
+โลà¸à¸²à¸§à¸´à¸™à¸²à¸¨
+โลà¸à¸´à¸¢à¸°
+โลà¸à¸µà¸¢à¹Œ
+โลà¸à¸µà¸¢à¸§à¸±à¸•à¸£
+โลà¸à¸¸à¸•à¸£à¸˜à¸£à¸£à¸¡
+โลà¸à¸¸à¸•à¸£à¸°
+โลเà¸à¸¨
+โลง
+โล่ง
+โล้ง
+โล้งโต้ง
+โล่งโถง
+โลจนะ
+โลณะ
+โลด
+โลดเต้น
+โลดทะนง
+โลดโผน
+โลดà¹à¸¥à¹ˆà¸™
+โล่ติ๊น
+โลโต
+โลท
+โลน
+โล้น
+โลปะ
+โลภ
+โลภโมโทสัน
+โลม
+โลมชาติ
+โลมเล้า
+โลมะ
+โลมา
+โลล
+โลลุป
+โลเล
+โล้เล้
+โลโล
+โลโล้
+โลห-
+โลหà¸à¸¸à¸¡à¸ à¸µ
+โลหะ
+โลหะเจือ
+โลหัช
+โลหิต
+ไล่
+ไล้
+ไล่ช้าง
+ไล่ที่ทำวัง
+ไล่น้ำ
+ไล่เบี้ย
+ไลย
+ไลลา
+ไล่ลูà¸à¸†à¹‰à¸­à¸‡
+ไลเลย
+ไล่เลี่ย
+ไล่เลียง
+ไลไล้
+ไล่ออà¸
+ฦ
+ฦๅ
+ฦๅชา
+ฦๅสาย
+ว
+วà¸
+วà¸à¸°
+วà¸à¸¸à¸¥
+วง
+วงà¸à¹Œ
+วงà¸à¸•
+วงà¸à¸š
+วงà¸à¸¥à¸¡
+วงà¸à¸²à¸£
+วงเงิน
+วงจร
+วงจรปิด
+วงจรเปิด
+วงเดือน
+วงนอà¸
+วงใน
+วงพาด
+วงรี
+วงเล็บ
+วงวัง
+วงเวียน
+วงศ-
+วงศ์
+วงศà¸à¸£
+วงศ์วาน
+วงศา
+วงศาคณาà¸à¸²à¸•à¸´
+วงษ์
+วงà¹à¸«à¸§à¸™
+วจนะ
+วจะ
+วจา
+วจี
+วจีà¸à¸£à¸£à¸¡
+วจีเภท
+วชะ
+วชิร-
+วชิรปาณี
+วชิรหัตถ์
+วชิระ
+วชิราวุธ
+วà¸à¸°
+วà¸à¸²à¸à¸²à¸£
+วà¸à¸¸à¸¡à¸°
+วณ-
+วณบัตร
+วณพันธน์
+วณะ
+วณิช
+วณิชชา
+วณิชชาà¸à¸£
+วณิชย์
+วณิชยา
+วณิพà¸
+วดี
+วต-
+วตะ
+วทนะ
+วทะ
+วทัà¸à¸à¸¸à¸•à¸²
+วทัà¸à¸à¸¹
+วทานิย-
+วธ-
+วธà¸-
+วธุà¸à¸²
+วธู
+วน
+วนจร
+วนจรà¸
+วนภู
+วนภูมิ
+วนเวียน
+วนศาสตร์
+วนสณฑ์
+วนสัณฑ์
+วนอุทยาน
+วนัปติ
+วนัส
+วนัส-
+วนัสบดี
+วนา
+วนาดอน
+วนานต์
+วนาลัย
+วนาลี
+วนาวาส
+วนาศรม
+วนาสณฑ์
+วนาสัณฑ์
+วนิดา
+วนิพà¸
+วเนจร
+วโนทยาน
+วปนะ
+วปุ
+วยัคฆ์
+วยัà¸à¸Šà¸™à¸°
+วยัมหะ
+วยัสย์
+วยาà¸à¸£à¸“์
+วยาฆร์
+วยาธิ
+วยาม
+วยายาม
+วร-
+วรงค์
+วรณะ
+วรดนู
+วรท
+วรทาน
+วรมหาวิหาร
+วรรค
+วรรคย์
+วรรช
+วรรชย์
+วรรณ-
+วรรณà¸à¸£à¸£à¸¡
+วรรณคดี
+วรรณนา
+วรรณพฤติ
+วรรณยุà¸à¸•à¹Œ
+วรรณยุต
+วรรณศิลป์
+วรรณะ
+วรรณึà¸
+วรรธà¸
+วรรธนะ
+วรรษ
+วรรษา
+วรวิหาร
+วรัà¸à¸à¸¹
+วราà¸à¸°
+วรางคณา
+วราห์
+วราหะ
+วรุณ
+วรุตดม
+วรุตมะ
+วรูถ
+วโรดม
+วโรตมะ
+วฤà¸
+วฤษภ
+วฤษล
+วลัช
+วลัà¸à¸Šà¹Œ
+วลัà¸à¸Šà¸™à¹Œ
+วลัย
+วลาหà¸
+วลี
+วศค
+วศะ
+วศิน
+วสนะ
+วสภะ
+วสละ
+วสลี
+วสวัดดี
+วสวัตตี
+วสะ
+วสันต-
+วสันต์
+วสันตดิลà¸
+วสันตวิษุวัต
+วสา
+วสี
+วสุ
+วสุธา
+วสุนธรา
+วสุมดี
+วหะ
+วหา
+วอ
+วอà¸
+วอà¸à¹à¸§à¸
+ว่อง
+ว่องไว
+วอด
+วอดวาย
+วอน
+ว่อน
+วอลเลย์บอล
+วอà¹à¸§
+วะ
+วัà¸
+วัà¸à¸à¸°
+วัค
+วัคคิย
+วัคคีย์
+วัคคุ
+วัคคุวัท
+วัคซีน
+วัง
+วังà¸à¹Œ
+วังชา
+วังช้าง
+วังวน
+วังเวง
+วังศะ
+วังสะ
+วังหน้า
+วังหลวง
+วังหลัง
+วัจ-
+วัจà¸à¸¸à¸Žà¸µ
+วัจจะ
+วัจฉ์
+วัจฉà¸
+วัจฉละ
+วัจน์
+วัจมรรค
+วัช
+วัช-
+วัชชะ
+วัชฌ์
+วัชพืช
+วัชร-
+วัชรธาตุมณฑล
+วัชรปาณี
+วัชรยาน
+วัชรอาสน์
+วัชระ
+วัชราสน์
+วัชรินทร์
+วัชรี
+วัชเรนทร์
+วัà¸à¸ˆà¸
+วัà¸à¸ˆà¸™à¸°
+วัà¸à¸Œà¹Œ
+วัà¸-
+วัà¸à¸à¸°
+วัà¸à¸ˆà¸±à¸à¸£
+วัà¸à¸à¸°
+วัà¸à¸à¸´
+วัà¸à¸—ุà¸à¸‚์
+วัà¸à¸ªà¸‡à¸ªà¸²à¸£
+วัฒà¸à¸°
+วัฒà¸à¸µ
+วัฒน-
+วัฒนธรรม
+วัฒนะ
+วัฒนา
+วัณ
+วัณ-
+วัณà¸à¹Œ
+วัณณะ
+วัณนา
+วัณโรค
+วัด
+วัดà¹à¸”ด
+วัดผล
+วัดพื้น
+วัดรอยตีน
+วัดรอยเท้า
+วัดราษฎร์
+วัดวา
+วัดวาอาราม
+วัดหลวง
+วัดเหวี่ยง
+วัต
+วัตต์
+วัตตา
+วัตถ์
+วัตถาภรณ์
+วัตถาลังà¸à¸²à¸£
+วัตถุ
+วัตถุดิบ
+วัตถุนิยม
+วัตถุวิสัย
+วัตนะ
+วัตร
+วัตร-
+วัตรปà¸à¸´à¸šà¸±à¸•à¸´
+วัตสดร
+วัตสะ
+วัติ
+วัทน์
+วัน
+วันโà¸à¸™
+วันà¹à¸‚็ง
+วันครู
+วันจม
+วันดับ
+วันดีคืนดี
+วันต์
+วันตัว
+วันเถลิงศà¸
+วันทน-
+วันทนา
+วันทนาà¸à¸²à¸£
+วันทนีย์
+วันทย-
+วันทยหัตถ์
+วันทยาวุธ
+วันทา
+วันทิ
+วันนิพà¸
+วันเนา
+วันพระ
+วันพระไม่มีหนเดียว
+วันเพ็à¸
+วันฟู
+วันยังค่ำ
+วันลอย
+วันà¹à¸¥à¹‰à¸§à¸§à¸±à¸™à¹€à¸¥à¹ˆà¸²
+วันสุà¸à¸”ิบ
+วันอุโบสถ
+วับ
+วับๆ
+วับวาบ
+วับวาม
+วับà¹à¸§à¸š
+วับà¹à¸§à¸¡
+วับๆ หวำๆ
+วัปปะ
+วัมมิà¸
+วัย
+วัย-
+วัยรุ่น
+วัยวุฒิ
+วัลà¸à¹Œ
+วัลคุ
+วัลย์
+วัลลภ
+วัลลี
+วัว
+วัวใครเข้าคอà¸à¸„นนั้น
+วัวตัวผู้
+วัวตัวเมีย
+วัวทะเล
+วัวพันหลัà¸
+วัวลืมตีน
+วัวสันหลังหวะ
+วัวหายล้อมคอà¸
+วัส-
+วัสคณนา
+วัสดุ
+วัสตร์
+วัสน์
+วัสนะ
+วัสสะ
+วัสสานะ
+วัสโสทà¸
+วา
+ว่า
+ว้า
+วาà¸
+ว้าà¸
+วาà¸à¸ˆà¸´à¸£à¸žà¸±à¸ªà¸•à¸£à¹Œ
+วาà¸à¸¢-
+วาà¸à¸¢à¸ªà¸±à¸¡à¸žà¸±à¸™à¸˜à¹Œ
+วาà¸à¸¢à¸°
+วาà¸à¸£à¸²
+ว่าà¸à¸¥à¹ˆà¸²à¸§
+วาà¸à¸°
+ว่าà¸à¸²à¸£
+ว่าขาน
+ว่าความ
+วาง
+ว่าง
+ว้าง
+วางà¸à¹‰à¸²à¸¡
+วางข้อ
+วางไข่
+ว่างงาน
+วางเงิน
+วางใจ
+วางตลาด
+วางตัว
+วางตา
+วางโต
+วางท่า
+วางปุ่ม
+วางเพลิง
+วางมวย
+วางมาด
+วางมือ
+วางยา
+วางวาย
+ว่างเว้น
+ว้างเวิ้ง
+วางอำนาจ
+ว่าง่าย
+วาจà¸
+วาจา
+ว่าจ้าง
+วาจาไปยะ
+วาจาล
+วาชเปยะ
+วาà¸à¸à¸°
+วาณิช
+วาณิชà¸à¸°
+วาณิชย์
+วาณี
+วาด
+วาดเขียน
+วาต-
+วาตปานะ
+วาตภัย
+วาตะ
+ว่าต่าง
+วาตารางเหลี่ยม
+ว่าà¹à¸•à¹ˆà¹€à¸‚าอิเหนาเป็นเอง
+วาท
+วาท-
+วาทà¸
+วาทน
+วาทย-
+วาทย์
+วาทยà¸à¸£
+วาทศาสตร์
+วาทศิลป์
+วาทิต
+วาทิน
+วาที
+ว่าที่
+วาน
+ว่าน
+ว่านà¸à¸µà¸šà¸¡à¹‰à¸²
+ว่านà¸à¸µà¸šà¹à¸£à¸”
+ว่านเครือ
+วานซืน
+ว่านธรณีสาร
+ว่านนางà¸à¸§à¸±à¸
+ว่านนางล้อม
+ว่านน้ำ
+ว่านเพชรหึง
+ว่านมหาเมฆ
+ว่านมีดยับ
+วานร
+วานรินทร์
+ว่านเสน่ห์จันทร์ขาว
+ว่านเสน่ห์จันทร์à¹à¸”ง
+ว่านหางช้าง
+ว่านอนสอนง่าย
+วาเนเดียม
+วาบ
+วาบหวาม
+วาปะ
+วาปิตะ
+วาปี
+วาม
+วามน-
+วามนาวตาร
+วามà¹à¸§à¸¡
+วามะ
+วามาจาร
+วาโมร
+ว่าไม่ได้
+วาย
+ว่าย
+ว้าย
+วายชนม์
+วายชีวิต
+ว่ายตา
+ว่ายน้ำหาจระเข้
+วายปราณ
+วายร้าย
+วายวอด
+วายสะ
+วายสังขาร
+วายะ
+ว่ายาà¸
+วายามะ
+วายุ
+วายุà¸à¸¹à¸¥
+วายุบุตรยาตรา
+วายุภัà¸à¸©à¹Œ
+วาโย
+วาโยธาตุ
+วาร
+วารณ-
+วารณà¸à¸£
+วารวาริ
+วารสาร
+วารสารศาสตร์
+วาระ
+วาริ
+วาริจร
+วาริช
+วาริท
+วาริธร
+วาริพินทุ
+วารี
+วารีช
+วารุณ
+วารุณี
+วาล
+วาล-
+วาลà¸à¸±à¸¡à¸žà¸¥
+วาลธิ
+วาล์ว
+วาลวีชนี
+วาลิà¸à¸²
+วาลุà¸à¸²
+วาว
+ว่าว
+ว่าวติดลม
+วาววับ
+วาววาม
+วาวà¹à¸§à¸§
+ว่าวเหลิง
+ว่าวอน
+ว้าว่อน
+ว้าวุ่น
+วาสนะ
+วาสนา
+วาสพ
+วาสะ
+ว่าสาดเสียเทเสีย
+วาสิน
+วาสี
+วาสุà¸à¸£à¸µ
+วาสุà¸à¸µ
+วาสุเทพ
+วาหนะ
+วาหะ
+วาหินี
+ว้าเหว่
+วาฬ
+วาฬ-
+วาฬมิค
+วิ
+วิà¸à¸‚ัมภ์
+วิà¸à¸‚ัมภนะ
+วิà¸à¹€à¸‚ป
+วิà¸à¸ˆà¸°
+วิà¸à¸£à¸¡
+วิà¸à¸£à¸±à¸¢
+วิà¸à¸£à¸²à¸™à¸•à¹Œ
+วิà¸à¸¤à¸•
+วิà¸à¸¤à¸•-
+วิà¸à¸¤à¸•à¸à¸²à¸£à¸“์
+วิà¸à¸¤à¸•à¸à¸²à¸¥
+วิà¸à¸¤à¸•à¸´
+วิà¸à¸¤à¸•à¸´-
+วิà¸à¸¤à¸•à¸´à¸à¸²à¸£à¸“์
+วิà¸à¸¤à¸•à¸´à¸à¸²à¸¥
+วิà¸à¸¥
+วิà¸à¸¥à¸ˆà¸£à¸´à¸•
+วิà¸à¸ªà¸´à¸•
+วิà¸à¸±à¸•
+วิà¸à¸±à¸•à¸´
+วิà¸à¸±à¸•à¸´à¸à¸²à¸£à¸
+วิà¸à¸±à¸›
+วิà¸à¸±à¸¢
+วิà¸à¸²à¸£
+วิà¸à¸²à¸¥
+วิà¸à¸²à¸¥-
+วิà¸à¸²à¸¥à¹‚ภชน์
+วิคหะ
+วิเคราะห์
+วิฆนะ
+วิฆเนศ
+วิฆเนศวร
+วิฆาต
+วิฆาส
+วิง
+วิ่ง
+วิ่งà¸à¸£à¸°à¹‚ดดข้ามรั้ว
+วิ่งข้ามรั้ว
+วิ่งงัว
+วิ่งเต้น
+วิ่งเปี้ยว
+วิ่งผลัด
+วิ่งม้า
+วิ่งรอà¸
+วิ่งระà¹à¸šà¸‡
+วิ่งราว
+วิงวอน
+วิ่งวัว
+วิ่งว่าว
+วิ่งวิบาà¸
+วิงเวียน
+วิ่งสามขา
+วิจฉิà¸à¸°
+วิจยุต
+วิจรณะ
+วิจล
+วิจัà¸à¸‚ณ์
+วิจัà¸à¸©à¸“์
+วิจัย
+วิจาร
+วิจารณ-
+วิจารณ์
+วิจารณà¸à¸²à¸“
+วิจิ
+วิจิà¸à¸´à¸ˆà¸‰à¸²
+วิจิต
+วิจิตร
+วิจิตรพิสดาร
+วิจิน
+วิจุณ
+วิจุรณ
+วิชชา
+วิชชุ
+วิชชุดา
+วิชชุตา
+วิชชุลดา
+วิชà¸à¸°
+วิชน
+วิชนี
+วิชย-
+วิชัย
+วิชา
+วิชาà¸à¸²à¸£
+วิชาชีพ
+วิชาโท
+วิชาธร
+วิชานนะ
+วิชาเอà¸
+วิชิต
+วิเชียร
+วิà¸à¸à¸±à¸•à¸•à¸´
+วิà¸à¸à¸²à¸“
+วิà¸à¸à¸²à¸“à¸à¸—รัพย์
+วิà¸à¸à¸¹
+วิà¸à¸à¸¹à¸Šà¸™
+วิà¸à¸à¸¹à¸ à¸²à¸ž
+วิฑูรย์
+วิณหุ
+วิด
+วิดพื้น
+วิดัสดี
+วิตà¸
+วิตà¸-
+วิตà¸à¸ˆà¸£à¸´à¸•
+วิตถาร
+วิตามิน
+วิถี
+วิทธะ
+วิทย-
+วิทยà¸à¸²à¸™à¸°
+วิทยา
+วิทยาà¸à¸£
+วิทยาà¸à¸¥
+วิทยาเขต
+วิทยาคม
+วิทยาคาร
+วิทยาทาน
+วิทยาธร
+วิทยานิพนธ์
+วิทยาลัย
+วิทยาศาสตร์
+วิทยาศาสตร์à¸à¸²à¸¢à¸ à¸²à¸ž
+วิทยาศาสตร์ชีวภาพ
+วิทยาศาสตร์เทคโนโลยีà¹à¸¥à¸°à¸ªà¸´à¹ˆà¸‡à¹à¸§à¸”ล้อม
+วิทยาศาสตร์ประยุà¸à¸•à¹Œ
+วิทยุ
+วิทยุต
+วิทรุมะ
+วิทวัส
+วิทัตถิ
+วิทารณ์
+วิทาลน์
+วิทิต
+วิทู
+วิทูร
+วิเทวษ
+วิเทศ
+วิเทศสัมพันธ์
+วิเทโศบาย
+วิธ
+วิธวา
+วิธา
+วิธาน
+วิธี
+วิธุระ
+วิธู
+วิธูปนะ
+วิ่น
+วินย-
+วินันตู
+วินัย
+วินัยธร
+วินาที
+วินายà¸
+วินาศ
+วินาศ-
+วินาศà¸à¸£à¸£à¸¡
+วินาศภัย
+วินิจ
+วินิจฉัย
+วินิต
+วินิบาต
+วินิปาติà¸
+วิเนต
+วิโนทà¸
+วิบัติ
+วิบาà¸
+วิบุล
+วิบุลย์
+วิบูล
+วิบูลย์
+วิปà¸à¸²à¸£
+วิปà¸à¸´à¸ªà¸²à¸£
+วิปโยค
+วิประà¸à¸²à¸£
+วิประติสาร
+วิประโยค
+วิประลาป
+วิประวาส
+วิปริต
+วิปลาป
+วิปลาส
+วิปวาส
+วิปัà¸à¸©à¹Œ
+วิปัสสà¸
+วิปัสสนา
+วิพาà¸à¸©à¹Œ
+วิพาà¸à¸©à¹Œà¸§à¸´à¸ˆà¸²à¸£à¸“์
+วิพิธทัศนา
+วิพุธ
+วิภว-
+วิภวตัณหา
+วิภังค์
+วิภัช
+วิภัช-
+วิภัชพยาà¸à¸£à¸“์
+วิภัชวาที
+วิภัตติ
+วิภา
+วิภาค
+วิภาช
+วิภาดา
+วิภาวี
+วิภาษ
+วิภาส
+วิภู
+วิภูษณะ
+วิภูษา
+วิภูษิต
+วิเภตà¸à¹Œ
+วิเภทà¸à¹Œ
+วิมน
+วิมล
+วิมลัà¸
+วิมลาà¸
+วิมังสา
+วิมัติ
+วิมาน
+วิมุข
+วิมุต
+วิมุตติ
+วิเมลือง
+วิโมà¸à¸‚์
+วิเยน
+วิโยค
+วิร-
+วิรงรอง
+วิรตะ
+วิรมณะ
+วิรวะ
+วิระ
+วิรังรอง
+วิรัช
+วิรัต
+วิรัติ
+วิราคะ
+วิราม
+วิราวะ
+วิริยภาพ
+วิริยะ
+วิรุธ
+วิรุฬห์
+วิรุฬหà¸
+วิรูป
+วิรูปัà¸à¸©à¹Œ
+วิเรนทร์
+วิโรค
+วิโรจ
+วิโรจน์
+วิโรฒ
+วิโรธ
+วิโรธน์
+วิลย-
+วิลันดา
+วิลัย
+วิลาด
+วิลาป
+วิลาวัณย์
+วิลาศ
+วิลาส
+วิลาสินี
+วิลิปดา
+วิเลป
+วิเลป-
+วิเลปนะ
+วิโลà¸
+วิโลà¸à¸™à¸°
+วิโลจนะ
+วิโลม
+วิไล
+วิไลวรรณ
+วิวรณ์
+วิวรรธน์
+วิวระ
+วิวัà¸
+วิวัฒน-
+วิวัฒน์
+วิวัฒนาà¸à¸²à¸£
+วิวัน
+วิวาท
+วิวาห-
+วิวาห์
+วิวาหะ
+วิวิจ
+วิวิต
+วิวิธ
+วิเวà¸
+วิศรุต
+วิศว-
+วิศวà¸à¸£
+วิศวà¸à¸£à¸£à¸¡
+วิศวà¸à¸£à¸£à¸¡à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+วิศัลย์
+วิศาข-
+วิศาขบูชา
+วิศาขะ
+วิศาขา
+วิศางค์
+วิศาล
+วิศิษà¸à¹Œ
+วิศุทธ์
+วิศุทธิ์
+วิเศษ
+วิเศษณ-
+วิเศษณ์
+วิเศษณà¸à¸²à¸£à¸
+วิษณุ
+วิษณุà¸à¸£à¸£à¸¡
+วิษณุโลà¸
+วิษณุเวท
+วิษธร
+วิษัà¸à¸•à¹Œ
+วิษัย
+วิษาณ
+วิษุวัต
+วิสà¸à¸µà¹‰
+วิสม-
+วิสย-
+วิสรรชนีย์
+วิสฤต
+วิสสุà¸à¸£à¸£à¸¡
+วิสัชนา
+วิสัà¸à¸à¸µ
+วิสัà¸à¸à¸µà¹à¸žà¸—ย์
+วิสัà¸à¸à¸µà¸§à¸´à¸—ยา
+วิสัย
+วิสาข-
+วิสาขบูชา
+วิสาขะ
+วิสาขา
+วิสามัà¸
+วิสามัà¸à¸†à¸²à¸•à¸à¸£à¸£à¸¡
+วิสามานยนาม
+วิสาร
+วิสารท
+วิสาล
+วิสาสะ
+วิสาหà¸à¸´à¸ˆ
+วิสิà¸
+วิสุงคามสีมา
+วิสุทธ์
+วิสุทธิ์
+วิสูตร
+วิเสท
+วิหค
+วิหงค์
+วิหลั่น
+วิหายสะ
+วิหาร
+วิหาร-
+วิหารà¹à¸à¸¥à¸š
+วิหารคด
+วิหารทิศ
+วิหารธรรม
+วิหารยอด
+วิหารหลวง
+วิหิงสะ
+วิหิงสา
+วิเหสา
+วิฬังค์
+วิฬาร
+วิฬาร์
+วี
+วีจิ
+วีชนี
+วีณา
+วี้ด
+วีต-
+วีร-
+วีรà¸à¸£à¸£à¸¡
+วีรชน
+วีรบุรุษ
+วีรสตรี
+วี่วัน
+วี่à¹à¸§à¸§
+วีสะ
+วุ้ง
+วุà¸à¸´
+วุฒ
+วุฒิ
+วุฒิ-
+วุฒิบัตร
+วุฒิสภา
+วุฒิสมาชิà¸
+วุด
+วุ่น
+วุ้น
+วุ้นชา
+วุ่นเป็นจุลà¸à¸à¸´à¸™
+วุ่นวาย
+วุ้นเส้น
+วุบ
+วุ้ย
+วุลà¹à¸Ÿà¸£à¸¡
+วู้
+วูดวาด
+วูบ
+วูบวาบ
+วู่วาม
+เว้
+เวค
+เวคิน
+เวคี
+เวจ
+เวจ-
+เวจà¸à¸¸à¸Žà¸µ
+เวจมรรค
+เวช
+เวช-
+เวชà¸à¸£à¸£à¸¡
+เวชภัณฑ์
+เวชยันต์
+เวชศาสตร์
+เวà¸à¸™à¹Œ
+เวณะ
+เวณิ
+เวณิà¸
+เวณุ
+เวณุวัน
+เวตน์
+เวตร
+เวตาล
+เวท
+เวท-
+เวทคู
+เวทนา
+เวทมนตร์
+เวทย์
+เวทางค์
+เวทางคศาสตร์
+เวทานต์
+เวทานตะ
+เวทิ
+เวที
+เวธะ
+เวน
+เว้น
+เวนคืนอสังหาริมทรัพย์
+เว้นà¹à¸•à¹ˆ
+เวนไตย
+เวไนย
+เวมะ
+เวมัต
+เวมัติà¸-
+เวมาติà¸
+เว้ย
+เวร
+เวรมณี
+เวรี
+เวโรจน์
+เวลา
+เวเลนซี
+เววัณ
+เววัณณิยะ
+เวศม์
+เวศย์
+เวศยา
+เวสน์
+เวสภู
+เวสม์
+เวสมะ
+เวสวัณ
+เวสสะ
+เวสสันดร
+เวสสุà¸à¸£à¸£à¸¡
+เวสสุวัณ
+เวสารัช
+เวสิ
+เวสิยา
+เวหน
+เวหะ
+เวหังค์
+เวหัปติ
+เวหา
+เวหายส
+เวหาส
+เวฬุ
+เวฬุà¸à¸²à¸£
+เวฬุริย
+เวฬุวัน
+เว่อ
+เว้า
+เว้าวอน
+เวิà¸
+เวิ้ง
+เวิ้งว้าง
+เวี่ย
+เวียง
+เวียน
+เวียนเทียน
+เวียนหัว
+เวียร
+เวี่ยว
+à¹à¸§à¹‰
+à¹à¸§à¸‡
+à¹à¸§à¹‰à¸‡
+à¹à¸§à¹‰à¸‡à¸à¸±à¸”
+à¹à¸§à¸”
+à¹à¸§à¸”ล้อม
+à¹à¸§à¸”วง
+à¹à¸§à¸•à¸£
+à¹à¸§à¸™
+à¹à¸§à¹ˆà¸™
+à¹à¸§à¹ˆà¸™à¸‚ยาย
+à¹à¸§à¸™à¸”า
+à¹à¸§à¹ˆà¸™à¸•à¸²
+à¹à¸§à¹ˆà¸™à¸Ÿà¹‰à¸²
+à¹à¸§à¹ˆà¸™à¹„ว
+à¹à¸§à¸š
+à¹à¸§à¸šà¹†
+à¹à¸§à¸šà¸§à¸±à¸š
+à¹à¸§à¸¡
+à¹à¸§à¸§
+à¹à¸§à¹ˆà¸§
+à¹à¸§à¸§à¸§à¸²à¸¡
+à¹à¸§à¸§à¸§à¸²à¸§
+à¹à¸§à¸§à¸§à¸´à¹€à¸Šà¸µà¸¢à¸£
+à¹à¸§à¸°
+โว
+โว่
+โวà¸à¸²à¸£
+โว่ง
+โวทาน
+โว้ย
+โวยวาย
+โว้เว้
+โวสาน
+โวหาร
+ไว
+ไว้
+ไวà¸à¸¹à¸“à¸à¹Œ
+ไว้ใจ
+ไวฑูรย์
+ไว้ตัว
+ไวทย์
+ไว้ทุà¸à¸‚์
+ไว้ธุระ
+ไว้เนื้อเชื่อใจ
+ไวพจน์
+ไวไฟ
+ไว้ยศ
+ไวยาà¸à¸£à¸“์
+ไวยาวัจà¸à¸£
+ไวยาวัจมัย
+ไว้ลาย
+ไววรรณ
+ไวษณพ
+ไว้หน้า
+ไว้อาลัย
+ไวโอลิน
+ศ
+ศà¸
+ศà¸à¸
+ศà¸à¸¥
+ศà¸à¸¸à¸™
+ศà¸à¸¸à¸™à¸•à¹Œ
+ศà¸à¸¸à¸™à¸´
+ศà¸à¸¸à¸™à¸µ
+ศงà¸à¸²
+ศจี
+ศà¸
+ศดà¸
+ศต
+ศต-
+ศตà¸
+ศตบาท
+ศตปที
+ศตพรรษ
+ศตภิษัช
+ศตวรรษ
+ศตสังวัตสร์
+ศตัฆนี
+ศนิ
+ศนิวาร
+ศพ
+ศพล
+ศม
+ศมน
+ศย
+ศยนะ
+ศยาม
+ศยามล
+ศร
+ศรนารายณ์
+ศรภ
+ศรมณะ
+ศรรà¸à¸£à¸²
+ศรวณะ
+ศรวณีย์
+ศรวิษà¸à¸²
+ศรศิลป์ไม่à¸à¸´à¸™à¸à¸±à¸™
+ศระวณ
+ศรัณย์
+ศรัณยู
+ศรัถนะ
+ศรัท
+ศรัทธา
+ศรัย
+ศราทธ-
+ศราทธ์
+ศราทธพรต
+ศราพ
+ศราพà¸
+ศรายุธ
+ศราวà¸
+ศราวณะ
+ศราวรณ์
+ศราสน์
+ศรี
+ศรีตรัง
+ศรีสังคีต
+ศรุต
+ศรุติ
+ศฤคาล
+ศฤงค์
+ศฤงคาร
+ศฤงคาริน
+ศฤงคารี
+ศลภ
+ศลัถ
+ศลิษà¸à¹Œ
+ศลิษา
+ศว
+ศวศุร
+ศวัส
+ศวัสน
+ศวา
+ศวาน
+ศวาส
+ศศ-
+ศศธร
+ศศพินทุ์
+ศศลัà¸à¸©à¸“์
+ศศะ
+ศศิ
+ศศิà¸à¸©à¸±à¸¢
+ศศิขัณฑ์
+ศศิเคราะห์
+ศศิธร
+ศศิน
+ศศิมณฑล
+ศศิวิมล
+ศศี
+ศสา
+ศอ
+ศอà¸
+ศอà¸à¸à¸¥à¸±à¸š
+ศอà¸à¸à¸³
+ศอà¸à¸à¸³à¸¡à¸²
+ศอà¸à¸„ู้
+ศอà¸à¸•à¸¹à¸¡
+ศัà¸à¸”า
+ศัà¸à¸”ิ
+ศัà¸à¸”ิ์
+ศัà¸à¸”ินา
+ศัà¸à¸”ิ์ศรี
+ศัà¸à¸”ิ์สิทธิ์
+ศัà¸à¸•à¸´
+ศัà¸à¸¢-
+ศัà¸à¸¢à¹Œ
+ศัà¸à¸¢à¸ à¸²à¸ž
+ศัà¸à¸¢à¸°
+ศัà¸à¸£-
+ศัà¸à¸£à¸ à¸žà¸™à¹Œ
+ศัà¸à¸£à¸²à¸Š
+ศัà¸à¸£à¸´à¸™à¸—ร์
+ศัà¸à¹€à¸£à¸™à¸—ร์
+ศังà¸à¸£
+ศังà¸à¸²
+ศังà¸à¸¸
+ศัตรู
+ศัทธนะ
+ศันสนะ
+ศันสนีย์
+ศัพท-
+ศัพท์
+ศัพทมูลวิทยา
+ศัยยา
+ศัล
+ศัลà¸
+ศัลà¸à¸µ
+ศัลย-
+ศัลยà¸à¸£à¸£à¸¡
+ศัลยà¹à¸žà¸—ย์
+ศัลยศาสตร์
+ศัสดร
+ศัสตร-
+ศัสตรà¸à¸£à¸£à¸¡
+ศัสตรà¸à¸²à¸£
+ศัสตรศาสตร์
+ศัสตรา
+ศัสย
+ศาà¸
+ศาà¸-
+ศาà¸à¸•à¸°
+ศาà¸à¸ à¸±à¸à¸©à¹Œ
+ศาà¸à¸¢-
+ศาà¸à¸¢à¹€à¸à¸•à¸¸
+ศาà¸à¸¢à¸žà¸¸à¸—ธ
+ศาà¸à¸¢à¸¡à¸¸à¸™à¸µ
+ศาà¸à¸¢à¸°
+ศาฎà¸
+ศาà¸à¸¢à¸°
+ศาณ
+ศาต
+ศานต-
+ศานต์
+ศานตรส
+ศานติ
+ศานติà¸-
+ศานติโหม
+ศาป
+ศาป-
+ศาปมุà¸à¸•à¸´à¹Œ
+ศาปานต์
+ศาพร
+ศารท
+ศารทวิษุวัต
+ศารทูล
+ศาริà¸à¸²
+ศาล
+ศาลà¸à¸‡à¸ªà¸¸à¸¥
+ศาลà¹à¸‚วง
+ศาลคดีเด็à¸à¹à¸¥à¸°à¹€à¸¢à¸²à¸§à¸Šà¸™
+ศาลจังหวัด
+ศาลชั้นต้น
+ศาลฎีà¸à¸²
+ศาลเตี้ย
+ศาลทหาร
+ศาลปà¸à¸„รอง
+ศาลโปริสภา
+ศาลเพียงตา
+ศาลà¹à¸žà¹ˆà¸‡
+ศาลยุติธรรม
+ศาลเยาวชนà¹à¸¥à¸°à¸„รอบครัว
+ศาลโลà¸
+ศาลสถิตยุติธรรม
+ศาลสูง
+ศาลสูงสุด
+ศาลอาà¸à¸²
+ศาลอุทธรณ์
+ศาลอุทธรณ์ภาค
+ศาลา
+ศาลาประชาคม
+ศาลาราย
+ศาลาสรง
+ศาศวัต
+ศาสà¸
+ศาสดา
+ศาสตร-
+ศาสตร์
+ศาสตรา
+ศาสตราจารย์
+ศาสน-
+ศาสน์
+ศาสนจัà¸à¸£
+ศาสนา
+ศาสนีย-
+ศาสนีย์
+ศาสนูปถัมภà¸
+ศิà¸à¸©à¸
+ศิà¸à¸²à¸£
+ศิขร
+ศิขริน
+ศิขรี
+ศิขัณฑ์
+ศิขา
+ศิคาล
+ศิงขร
+ศิงขริน
+ศิต
+ศิถี
+ศิพิระ
+ศิร-
+ศิรประภา
+ศิระ
+ศิรา
+ศิรามพุช
+ศิโรรัตน์
+ศิโรราบ
+ศิโรเวà¸à¸™à¹Œ
+ศิลป-
+ศิลป์
+ศิลปà¸à¸£
+ศิลปà¸à¸£à¸£à¸¡
+ศิลปà¸à¸²à¸£
+ศิลปà¸à¸´à¸ˆ
+ศิลปวิทยา
+ศิลปศาสตร์
+ศิลปะ
+ศิลปิน
+ศิลปี
+ศิลา
+ศิลาฤà¸à¸©à¹Œ
+ศิลาà¹à¸¥à¸‡
+ศิว-
+ศิวโมà¸à¸‚์
+ศิวลึงค์
+ศิวเวท
+ศิวะ
+ศิศีระ
+ศิศุ
+ศิษฎิ
+ศิษà¸à¹Œ
+ศิษย์
+ศิษย์มีครู
+ศีขร
+ศีขริน
+ศีขรี
+ศีต-
+ศีตà¸à¸²à¸¥
+ศีตล
+ศีรษะ
+ศีรษะà¸à¸£à¸°à¸šà¸·à¸­
+ศีรษะโค
+ศีรษะช้าง
+ศีรษะเนื้อ
+ศีล
+ศีลจุ่ม
+ศีลธรรม
+ศีลมหาสนิท
+ศีลล้างบาป
+ศีลวัต
+ศีลอด
+ศึà¸
+ศึà¸à¸©à¸²
+ศึà¸à¸©à¸²à¸˜à¸´à¸à¸²à¸£
+ศึà¸à¸©à¸²à¸™à¸´à¹€à¸—ศà¸à¹Œ
+ศึà¸à¸«à¸™à¹‰à¸²à¸™à¸²à¸‡
+ศุà¸à¸£-
+ศุà¸à¸£à¹Œ
+ศุà¸à¸£à¸§à¸£à¸£à¸“
+ศุà¸à¸¥-
+ศุà¸à¸¥à¸›à¸±à¸à¸©à¹Œ
+ศุà¸à¸¥à¸±à¸¡
+ศุà¸à¸°
+ศุจิ
+ศุจิà¸à¸£à¸£à¸¡
+ศุทธ
+ศุทธิ
+ศุน
+ศุนัà¸
+ศุนิ
+ศุภ-
+ศุภà¸à¸£
+ศุภเคราะห์
+ศุภนิมิต
+ศุภมัสดุ
+ศุภมาตรา
+ศุภมาส
+ศุภร-
+ศุภอัà¸à¸©à¸£
+ศุภางค์
+ศุลà¸-
+ศุลà¸à¸²à¸à¸£
+ศุลà¸à¸²à¸£à¸±à¸à¸©à¹Œ
+ศุลี
+ศุษิร
+ศูà¸à¸£
+ศูทร
+ศูนย-
+ศูนย์
+ศูนย์à¸à¸²à¸£à¸„้า
+ศูนย์ชุมชน
+ศูนย์พ่าห์
+ศูนยภาพ
+ศูนย์เยาวชน
+ศูนยวาท
+ศูนย์สัมบูรณ์
+ศูนย์สูตร
+ศูล
+ศูลิน
+เศรณี
+เศรษà¸-
+เศรษà¸à¹Œ
+เศรษà¸à¸à¸´à¸ˆ
+เศรษà¸à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+เศรษà¸à¸µ
+เศร้า
+เศร้าหมอง
+เศลษ
+เศวดงค์
+เศวดีภ
+เศวต
+เศวต-
+เศวตงค์
+เศวตฉัตร
+เศวตร
+เศวตัมพร
+เศวติภ
+เศวตีภ
+เศวเตภ
+เศวาล
+เศษ
+เศษเà¸à¸´à¸™
+เศษซ้อน
+เศษส่วน
+เศษสิบ
+เศาจ-
+เศาไจย
+เศาร์
+เศารยะ
+เศิà¸
+เศียร
+โศà¸
+โศà¸-
+โศà¸à¸™à¸²à¸à¸à¸£à¸£à¸¡
+โศà¸à¸¨à¸±à¸¥à¸¢à¹Œ
+โศà¸à¸²
+โศà¸à¸²à¸”ูร
+โศà¸à¸²à¸¥à¸±à¸¢
+โศà¸à¸µ
+โศจนะ
+โศจนียะ
+โศจิ
+โศถะ
+โศธนะ
+โศผะ
+โศภ
+โศภน
+โศภา
+โศภิต
+โศภิน
+โศภิษà¸à¹Œ
+โศภี
+โศรณิ
+โศรณี
+โศรดา
+โศรตร
+โศลà¸
+ไศล
+ไศล-
+ไศวะ
+ษ
+ษมา
+ษมายุมà¹à¸›à¸¥à¸‡
+ษัà¸
+ษัà¸à¸à¸°
+ษัฑ
+ษัณ
+ษัษ
+ษัษà¸à¸µ
+ษัษà¸
+ษัษà¸à¸µ
+โษฑศ
+โษฑศัน
+ส
+สà¸-
+สà¸à¸-
+สà¸à¸à¸ à¸²à¸£
+สà¸à¸à¸°
+สà¸à¸—าคามิผล
+สà¸à¸—าคามิมรรค
+สà¸à¸—าคามี
+สà¸à¸™à¸˜à¹Œ
+สà¸à¸›à¸£à¸
+สà¸à¸£à¸“ีย์
+สà¸à¸£à¸£à¸ˆà¹Œ
+สà¸à¸£à¸£à¸¡à¸à¸£à¸´à¸¢à¸²
+สà¸à¸¥
+สà¸à¸¥-
+สà¸à¸¥à¸¡à¸«à¸²à¸ªà¸±à¸‡à¸†à¸›à¸£à¸´à¸“ายà¸
+สà¸à¸¥à¹‚ลà¸
+สà¸à¸§à¸²à¸—ี
+สà¸à¸±à¸”
+สà¸à¸±à¸”à¹à¸„ร่
+สà¸à¸²
+สà¸à¸²à¸§
+สà¸à¸´à¸—าคามี
+สà¸à¸µ
+สà¸à¸µà¸™à¹‰à¸³
+สà¸à¸¸à¸“
+สà¸à¸¸à¸“า
+สà¸à¸¸à¸“ี
+สà¸à¸¸à¸™
+สà¸à¸¸à¸™à¸•à¹Œ
+สà¸à¸¸à¸¥
+สà¸à¸¸à¸¥à¸£à¸¸à¸™à¸Šà¸²à¸•à¸´
+สเà¸à¸•
+สเà¸à¸•à¸™à¹‰à¸³à¹à¸‚็ง
+สà¹à¸à¸™à¹€à¸”ียม
+สขะ
+สขา
+สขิ
+สง
+ส่ง
+สงà¸à¸£
+สงà¸à¸£à¸²à¸™à¸•à¹Œ
+ส่งà¸à¸¥à¸´à¹ˆà¸™
+สงà¸à¸²
+สงโà¸à¸ˆ
+ส่งข่าว
+สงค์
+สงคร
+สงคราม
+สงครามà¸à¸¥à¸²à¸‡à¹€à¸¡à¸·à¸­à¸‡
+สงครามเย็น
+สงครามโลà¸
+สงเคราะห์
+สงฆ์
+ส่งดอà¸
+ส่งเดช
+ส่งตัว
+ส่งท้าย
+สงบ
+สงบเสงี่ยม
+ส่งภาษา
+ส่งลำ
+สงวน
+สงเษป
+ส่งสà¸à¸²à¸£
+สงสัย
+สงสาร
+สงสาร-
+สงสารทุà¸à¸‚์
+สงสารวัà¸
+ส่งเสริม
+ส่งเสีย
+ส่งเสียง
+สงัด
+สง่า
+สà¸
+สณฑ์
+สด
+สดà¸
+สดคาว
+สดชื่น
+สดน
+สดมภ์
+สดๆ ร้อนๆ
+สดใส
+สดัน
+สดับ
+สดับตรับฟัง
+สดับปà¸à¸£à¸“์
+สดำ
+สดี
+สดุดี
+สดูป
+สต
+สตà¸
+สตน
+สตภิสชะ
+สตมาหะ
+สตรอนเชียม
+สตริà¸à¸™à¸´à¸™
+สตรี
+สตรีลิงค์
+สตรีลึงค์
+สตัน
+สตันย์
+สตัพธ์
+สตัฟฟ์
+สตัมภ์
+สตางค์
+สติ
+สติปัà¸à¸à¸²
+สติปัà¸à¸à¸²à¸™
+สติวินัย
+สติสัมปชัà¸à¸à¸°
+สตี
+สตู
+สตูป
+สถน
+สถบดี
+สถล
+สถล-
+สถลทิน
+สถลบถ
+สถลมารค
+สถวิร-
+สถวีร-
+สถวีระ
+สถาน
+สถานà¸à¸²à¸£à¸“์
+สถานภาพ
+สถานะ
+สถานี
+สถาบà¸
+สถาบัน
+สถาปนา
+สถาปนิà¸
+สถาปนียพยาà¸à¸£à¸“์
+สถาปนียวาที
+สถาปัตยà¸à¸£à¸£à¸¡
+สถาปัตยà¸à¸£à¸£à¸¡à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+สถาพร
+สถาล
+สถาวร
+สถิต
+สถิตยศาสตร์
+สถิติ
+สถิติศาสตร์
+สถิร-
+สถุล
+สถูป
+สทึง
+สทุม
+สธน
+สธุสะ
+สน
+ส้น
+สนใจ
+สนเดà¸
+สนตะพาย
+ส้นตีน
+สนทนา
+สนทรรศ
+สนทรรศน์
+สนทิศ
+สนเทศ
+สนเท่ห์
+สนธยา
+สนธิ
+สนธิสัà¸à¸à¸²
+สนธิอลงà¸à¸•
+สนนราคา
+สนà¹à¸œà¸‡
+สนม
+สนมเอà¸
+สนวน
+สนหางสิงห์
+สนอง
+สนองไข
+สนองได
+สนองโอษà¸à¹Œ
+สนอบ
+สนอม
+สนะ
+สนัด
+สนัดใจ
+สนั่น
+สนับ
+สนับà¹à¸‚้ง
+สนับงา
+สนับทึบ
+สนับนิ้วมือ
+สนับเพลา
+สนับมือ
+สนับสนุน
+สนาดà¸
+สนาน
+สนาบà¸
+สนาบัน
+สนาม
+สนามเพลาะ
+สนามหลวง
+สนายุ
+สนิà¸
+สนิท
+สนิทสนม
+สนิธ
+สนิม
+สนิมสร้อย
+สนุà¸
+สนุà¸à¹€à¸à¸­à¸£à¹Œ
+สนุà¸à¸ªà¸™à¸²à¸™
+สนุข
+สนุต
+สนุ่น
+สบ
+สบง
+สบจ
+สบถ
+สบประมาท
+สบสังวาส
+สบเสีย
+สบัน
+สบาย
+สบู่
+สบู่เลือด
+สไบ
+สไบเฉียง
+สไบนาง
+สปริง
+สปาเà¸à¸•à¸•à¸µ
+สเปà¸à¸•à¸£à¸±à¸¡
+สเปà¸à¹‚ทรสโคป
+สไปริลลัม
+สพั้น
+สพาบ
+สภา
+สภาà¸à¸²à¸Šà¸²à¸”
+สภาค
+สภาจาร
+สภานายà¸
+สภาบดี
+สภาพ
+สภาพธรรม
+สภาว-
+สภาวà¸à¸²à¸£à¸“์
+สภาวะ
+สม
+ส้ม
+สมà¸à¸²à¸£
+สมà¸à¸²à¸£à¹€à¸„มี
+ส้มà¸à¸¸à¹‰à¸‡
+สมคบ
+สมควร
+สมคะเน
+สมจร
+สมจริง
+สมจารี
+ส้มชื่น
+ส้มเช้า
+สมà¸à¸²
+สมเà¸à¸¨
+สมณ-
+สมณบริขาร
+สมณโวหาร
+สมณศัà¸à¸”ิ์
+สมณสารูป
+สมณสาสน์
+สมณะ
+สมดุล
+สมเด็จ
+สมเด็จพระสังฆราช
+ส้มตำ
+สมถ-
+สมถยานิà¸
+สมถวิปัสสนา
+สมถะ
+สมทบ
+ส้มทับ
+สมนอà¸
+สมนัย
+สมนาคุณ
+สมน้ำสมเนื้อ
+สมน้ำหน้า
+สมใน
+สมบัติ
+สมบัตินัà¸à¹€à¸¥à¸‡
+สมบัติผู้ดี
+สมบุà¸à¸ªà¸¡à¸šà¸±à¸™
+สมบุà¸
+สมบูรณ์
+สมบูรณาà¸à¸²à¸ªà¸´à¸—ธิราชย์
+สมประà¸à¸­à¸š
+สมประดี
+สมปฤดี
+สมปฤๅดี
+ส้มป่อย
+สมปัà¸
+สมผุส
+ส้มà¹à¸œà¹ˆà¸™
+สมพง
+สมพงศ์
+สมพรปาà¸
+สมพล
+สมพัตสร
+สมพาส
+สมเพช
+สมโพธน์
+สมโพธิ
+ส้มฟัà¸
+สมภพ
+สมภาร
+สมโภค
+สมโภช
+สมมต
+สมมติ
+สมมติ-
+สมมติà¸à¸²à¸™
+ส้มมะขาม
+สมมาตร
+ส้มมือ
+สมมุติ
+สมมุติ-
+สมมุติà¸à¸²à¸™
+สมมูล
+สมมูลเคมี
+สมโมท
+สมยอม
+สมโยค
+สมร
+สมร-
+สมรด
+สมรภูมิ
+สมรรถ
+สมรรถ-
+สมรรถนะ
+สมรรถภาพ
+สมรส
+สมรู้
+สมฤดี
+สมฤติ
+สมฤๅดี
+ส้มลิ้ม
+สมวัย
+สมวายะ
+สมสัà¸
+ส้มสันดาน
+สมสู่
+สมเสร็จ
+ส้มเสี้ยว
+สมหน้าสมตา
+สมเหตุสมผล
+สมอ
+สมอà¸à¸²à¸™à¸™
+สมอง
+สมองตาย
+สมองà¸à¹ˆà¸­
+สมอจีน
+สมอทะเล
+สมอสำเภา
+สมอ้าง
+สมัค
+สมัคร
+สมัครพรรคพวà¸
+สมัครสมา
+สมัครสมาน
+สมังคี
+สมัช
+สมัชชา
+สมัà¸à¸à¸²
+สมัต
+สมัน
+สมันต์
+สมัย
+สมัยเà¸à¹ˆà¸²
+สมัยใหม่
+สมา
+สมาคม
+สมาจาร
+สมาชิà¸
+สมาทาน
+สมาธิ
+สมาน-
+สมานคติ
+สมานฉันท์
+สมานสังวาส
+สมาบัติ
+สมาพันธรัà¸
+สมาส
+สม่ำเสมอ
+สมิง
+สมิงทอง
+สมิงพราย
+สมิงมิ่งชาย
+สมิต
+สมิติ
+สมิทธ์
+สมิทธิ
+สมี
+สมีป
+สมีร
+สมุà¸
+สมุจจัย
+สมุจเฉท
+สมุจเฉท-
+สมุจเฉทปหาน
+สมุà¸à¸à¸²à¸™
+สมุด
+สมุดไทย
+สมุดปูมเดินทาง
+สมุตถาน
+สมุทร
+สมุทร-
+สมุทรโคดม
+สมุทรโจร
+สมุทรศาสตร์
+สมุทรเสนา
+สมุทัย
+สมุน
+สมุนไพร
+สมุลà¹à¸§à¹‰à¸‡
+สมุห-
+สมุห์
+สมุหà¸à¸¥à¸²à¹‚หม
+สมุหเทศาภิบาล
+สมุหนาม
+สมุหนายà¸
+สมุหประธาน
+สมุหพระà¸à¸¥à¸²à¹‚หม
+สโมธาน
+สโมสร
+สโมสรสันนิบาต
+สยด
+สยดสยอง
+สยดà¹à¸ªà¸¢à¸‡
+สยนะ
+สยบ
+สยมพร
+สยมภู
+สยอง
+สยอน
+สยัมพร
+สยัมวรา
+สยาม
+สยาม-
+สยามรัà¸
+สยาย
+สยิว
+สยิ้ว
+สยุ่น
+สยุมพร
+สยุมภู
+สร
+สรà¸
+สรง
+สร่ง
+สรà¸à¸°
+สรณ-
+สรณคมน์
+สรณตรัย
+สรณะ
+สรณาคมน์
+สรดัà¸
+สรดึ่น
+สรดื่น
+สรตะ
+สรตัà¸
+สรทะ
+สรทึง
+สรà¹à¸—บ
+สรนุà¸
+สรเนาะ
+สรไน
+สรบ
+สรบบ
+สรบับ
+สรพ
+สรเพชà¸
+สรภะ
+สรภัà¸à¸à¸°
+สรภู
+สรม
+สรร
+สรรค์
+สรรพ
+สรรพ-
+สรรพคราส
+สรรพคุณ
+สรรพนาม
+สรรพสามิต
+สรรพัชà¸
+สรรพาà¸à¸£
+สรรพางค์
+สรรเพชà¸
+สรรเพชุดา
+สรรเพชุดาà¸à¸²à¸“
+สรรวง
+สรรเสริà¸
+สรรà¹à¸ªà¸£à¹‰à¸‡
+สรลน
+สรลม
+สรลมสลวน
+สรลอด
+สรลอน
+สรละ
+สรล้าย
+สรลิด
+สรเลข
+สรวง
+สรวงเส
+สรวป
+สรวม
+สรวมชีพ
+สรวล
+สรวลเส
+สรวลเสเฮฮา
+สรเสริà¸
+สร้อย
+สร้อยทอง
+สร้อยทะà¹à¸¢
+สร้อยนà¸à¹€à¸‚า
+สร้อยน้ำผึ้ง
+สร้อยระย้า
+สร้อยเศร้า
+สร้อยสน
+สร้อยอ่อน
+สร้อยอินทนิล
+สระ
+สระà¸à¸­
+สระคราà¸
+สระดะ
+สระท้อน
+สระพรั่ง
+สระอาด
+สระอื้น
+สรั่ง
+สรัสวดี
+สร่าง
+สร้าง
+สร้างวิมานในอาà¸à¸²à¸¨
+สร้างสรรค์
+สราà¸
+สร้าวเสียว
+สริต
+สรี้
+สรีร-
+สรีรà¸à¸´à¸ˆ
+สรีรธาตุ
+สรีรวิทยา
+สรีรศาสตร์
+สรีระ
+สรีรังคาร
+สรีรางคาร
+สรีสฤบ
+สรุà¸
+สรุà¸à¹€à¸à¸£à¸²
+สรุง
+สรุโนà¸
+สรุป
+สรุสระ
+สรูป
+สโรช
+สฤà¸
+สฤคาล
+สฤต
+สฤษฎี
+สฤษà¸à¹Œ
+สล
+สลด
+สลบ
+สลบไสล
+สลบเหมือด
+สลวน
+สลวย
+สลอด
+สลอน
+สลอย
+สละ
+สละสลวย
+สลัà¸
+สลัà¸à¹€à¸à¸¥à¸µà¸¢à¸§
+สลัà¸à¹€à¸•à¹‰
+สลัà¸à¹€à¸žà¸Šà¸£
+สลัà¸à¸ªà¸³à¸„ัà¸
+สลัà¸à¹€à¸ªà¸¥à¸²
+สลัà¸à¸«à¸¥à¸±à¸‡
+สลัด
+สลัดได
+สลับ
+สลับฉาà¸
+สลัว
+สลา
+สลาà¸
+สลาà¸à¸à¸´à¸™à¹à¸šà¹ˆà¸‡
+สลาà¸à¸à¸´à¸™à¸£à¸§à¸š
+สลาà¸à¸ à¸±à¸•
+สลาง
+สล้าง
+สลาด
+สลาตัน
+สลาบ
+สลาย
+สลาเหิน
+สลิด
+สลิล
+สลึà¸
+สลึง
+สลุต
+สลุบ
+สลุมพร
+สà¹à¸¥à¸‡
+สว-
+สวà¸
+สวà¸à¸£à¸£à¸¡
+สวà¸à¸²à¸£à¸¢à¹Œ
+ส้วง
+สวด
+สวน
+ส่วน
+ส่วนà¸à¸¥à¸²à¸‡
+สวนควัน
+สวนความ
+ส่วนได้ส่วนเสีย
+ส่วนตัว
+ส่วนท้องถิ่น
+สวนà¹à¸—ง
+ส่วนประà¸à¸­à¸š
+สวนปาà¸à¸ªà¸§à¸™à¸„ำ
+ส่วนผสม
+ส่วนภูมิภาค
+ส่วนรวม
+ส่วนลด
+สวนสนาม
+ส่วนสัด
+ส่วนหน้า
+ส่วนหลัง
+สวนะ
+สวนาà¸à¸²à¸£
+สวนิต
+สวนีย-
+สวบ
+สวภาพ
+สวม
+ส้วม
+สวมà¸à¸­à¸”
+สวมรอย
+สวมหัวโขน
+สวย
+ส่วย
+ส้วย
+สวยà¹à¸•à¹ˆà¸£à¸¹à¸› จูบไม่หอม
+สวยม
+สวยมพร
+สวยมภู
+ส้วยเสี้ยว
+สวร
+สวรรค-
+สวรรค์
+สวรรคต
+สวรรคบดี
+สวรรค์อยู่ในอภนรà¸à¸­à¸¢à¸¹à¹ˆà¹ƒà¸™à¹ƒà¸ˆ
+สวรรคาลัย
+สวรรยา
+สวราชย์
+สวะ
+สวัสดิ์
+สวัสดิà¸à¸²à¸£
+สวัสดี
+สวัสติ
+สวัสติà¸à¸°
+สวา
+สวาคต
+สวาง
+สว่าง
+สว่างไสว
+สวาด
+สวาดิ
+สวาตี
+สวาท
+สว่าน
+สว้าน
+สวาบ
+สวาปาม
+สวามิ
+สวามินี
+สวามิภัà¸à¸”ิ์
+สวามี
+สวาย
+สวายสอ
+สวาสดิ์
+สวาหะ
+สวิง
+สวิงสวาย
+สวิà¸à¸à¸²à¸“à¸à¸—รัพย์
+สวิตช์
+สสาร
+สสาร-
+สสารนิยม
+สสุระ
+สสุรี
+สห-
+สหà¸à¸£à¸“์
+สหà¸à¸²à¸£
+สหจร
+สหชาต
+สหชาติ
+สหธรรม
+สหธรรมิà¸
+สหบาน
+สหประชาชาติ
+สหพันธ์
+สหพันธรัà¸
+สหภาพ
+สหภาพà¹à¸£à¸‡à¸‡à¸²à¸™
+สหศึà¸à¸©à¸²
+สหัช
+สหัมบดี
+สหัส-
+สหัสธารา
+สหัสนัยน์
+สหัสเนตร
+สหัสรังสี
+สหัสสะ
+สหัสา
+สหาย
+สอ
+ส่อ
+สอง
+ส่อง
+ส้อง
+สองเà¸à¸¥à¸­
+สองจิตสองใจ
+สองใจ
+สองต่อสอง
+สองผม
+สองà¸à¸±à¸à¸ªà¸­à¸‡à¸à¹ˆà¸²à¸¢
+สองไม้
+สองฤดู
+สองสลึงเฟื้อง
+สองหน้า
+สอด
+สอดคล้อง
+สอดà¹à¸„ล้ว
+สอดà¹à¸™à¸¡
+สอดรู้
+สอดรู้สอดเห็น
+สอดส่อง
+สอดใส่
+สอดไส้
+สอน
+ส่อน
+สอนจระเข้ให้ว่ายน้ำ
+สอนหนังสือสังฆราช
+สอบ
+สอบซ้อม
+สอบปาà¸à¸„ำ
+สอบพยาน
+สอบไล่
+สอบสวน
+สอบสวนทวนพยาน
+สอปูน
+สอพลอ
+ส้อม
+สอย
+สอยดอà¸à¸Ÿà¹‰à¸²
+สอยดาว
+สอยผม
+สอยไร
+ส่อเสียด
+สะ
+สะà¸à¸”
+สะà¸à¸­
+สะà¸à¸²à¸‡
+สะà¸à¸²à¸£à¸°
+สะà¸à¸²à¸£à¸°à¸•à¸²à¸«à¸£à¸²
+สะà¸à¸´à¸”
+สะเà¸à¹‡à¸”
+สะà¹à¸
+สะà¹à¸à¸§à¸±à¸¥à¸¢à¹Œ
+สะà¹à¸à¹à¸ªà¸‡
+สะคร้อ
+สะคราà¸
+สะค้าน
+สะเงาะสะà¹à¸‡à¸°
+สะใจ
+สะดม
+สะดวà¸
+สะดัà¸
+สะดิ้ง
+สะดึง
+สะดือ
+สะดุ้ง
+สะดุ้งมาร
+สะดุด
+สะดุดใจ
+สะดุดตา
+สะดุดหู
+สะเด็ด
+สะเดา
+สะเดาดิน
+สะเดาอินเดีย
+สะเดาะ
+สะตอ
+สะตอเบา
+สะตาหมัน
+สะตึ
+สะตือ
+สะตุ
+สะเต๊ะ
+สะโตà¸
+สะทà¸
+สะทน
+สะท้อน
+สะท้อนใจ
+สะท้าน
+สะทึà¸
+สะทึน
+สะทึ่น
+สะเทิน
+สะเทิ้น
+สะเทินน้ำสะเทินบà¸
+สะเทือน
+สะเทื้อน
+สะเทือนใจ
+สะบะ
+สะบัà¸
+สะบัà¸à¸ˆà¸¡
+สะบัà¸à¸ªà¸°à¸šà¸­à¸¡
+สะบัด
+สะบัดà¸à¹‰à¸™
+สะบัดมือ
+สะบัดร้อนสะบัดหนาว
+สะบัดลุà¸à¸ªà¸°à¸šà¸±à¸”นั่ง
+สะบัดสะบิ้ง
+สะบัดหน้า
+สะบั้น
+สะบันงา
+สะบันงาจีน
+สะบันงาต้น
+สะบ้า
+สะบ้าหัวเข่า
+สะบู
+สะà¹à¸šà¸‡
+สะเปะสะปะ
+สะพรัà¸
+สะพรั่ง
+สะพรึงà¸à¸¥à¸±à¸§
+สะพรึบ
+สะพัà¸
+สะพัง
+สะพัด
+สะพั้น
+สะพาน
+สะพานà¹à¸‚วน
+สะพานชัà¸
+สะพานเชือà¸
+สะพานเดินเรือ
+สะพานทุ่น
+สะพานเบี่ยง
+สะพานปลา
+สะพานไฟ
+สะพานลอย
+สะพานเสี้ยว
+สะพานหà¸
+สะพานหัน
+สะพาย
+สะพายà¹à¸¥à¹ˆà¸‡
+สะเพร่า
+สะโพà¸
+สะเภา
+สะใภ้
+สะโมง
+สะระตะ
+สะระà¹à¸«à¸™à¹ˆ
+สะละปะตุ่น
+สะลาง
+สะลึมสะลือ
+สะวี้ดสะว้าด
+สะสม
+สะสวย
+สะสาง
+สะอาง
+สะอาด
+สะอ้าน
+สะอิ้ง
+สะอิดสะเอียน
+สะอึà¸
+สะอึà¸à¹€à¸‚้าใส่
+สะอึà¸à¸ªà¸°à¸­à¸·à¹‰à¸™
+สะอื้น
+สะเอ้ง
+สะเอว
+สะเออะ
+สะโอดสะอง
+สะไอ
+สัà¸
+สัà¸à¸à¸°
+สัà¸à¸à¸±à¸ˆà¸ˆà¸°
+สัà¸à¸à¸²à¸¢-
+สัà¸à¸à¸²à¸¢à¸—ิà¸à¸´
+สัà¸à¸à¸²à¸£-
+สัà¸à¸à¸²à¸£à¸°
+สัà¸à¸‚รา
+สัà¸à¸‚ี
+สัà¸à¸‚ี้ไà¸à¹ˆ
+สัà¸à¸à¸°
+สัà¸à¸•à¸°
+สัà¸à¹à¸•à¹ˆà¸§à¹ˆà¸²
+สัà¸à¸¢à¸°
+สัà¸à¸§à¸²
+สัà¸à¸§à¹ˆà¸²
+สัà¸à¸«à¸¥à¸²à¸”
+สัขยะ
+สัค
+สัคคะ
+สั่ง
+สังà¸à¸¡à¸—รัพย์
+สังà¸à¸£
+สังà¸à¸£à¸“ี
+สังà¸à¸°à¸•à¸±à¸‡
+สังà¸à¸°à¸§à¸±à¸‡
+สังà¸à¸°à¸§à¸²à¸”
+สังà¸à¸°à¸ªà¸µ
+สังà¸à¸±à¸”
+สังà¸à¸±à¸›à¸›à¸°
+สังà¸à¸²
+สังà¸à¸²à¸£
+สังà¸à¸²à¸¨
+สังà¸à¸´à¹€à¸¥à¸ª
+สังเà¸à¸•
+สังเà¸à¸•à¸à¸²à¸£à¸“์
+สังข-
+สังข์
+สังขà¸à¸£
+สังขต-
+สังขตธรรม
+สังขตะ
+สังขยา
+สังขลิà¸
+สังขลิà¸à¸²
+สังขาร
+สังขาร-
+สังขารธรรม
+สังขารโลà¸
+สังเขป
+สังโขภ
+สังค-
+สังค์
+สังคà¸à¸²à¸•à¸´
+สังคม
+สังคม-
+สังคมนิยม
+สังคมวิทยา
+สังคมศาสตร์
+สังคมศึà¸à¸©à¸²
+สังคมสงเคราะห์
+สังคหะ
+สังคัง
+สังคาตา
+สังคายนา
+สังคายนาย
+สังคีต
+สังคีติ
+สังเค็ด
+สังเคราะห์
+สังฆ-
+สังฆà¸à¸£à¸£à¸¡
+สังฆà¸à¸²à¸£à¸µ
+สังฆเถระ
+สังฆทาน
+สังฆนายà¸
+สังฆปาโมà¸à¸‚์
+สังฆภัต
+สังฆเภท
+สังฆมณฑล
+สังฆมนตรี
+สังฆราช
+สังฆสภา
+สังฆาà¸à¸´
+สังฆาณัติ
+สังฆาทิเสส
+สังฆาธิà¸à¸²à¸£
+สังฆานุสติ
+สังฆาวาส
+สังดัà¸
+สังปะติà¹à¸«à¸‡à¸°
+สังปะลิเหงะ
+สังโยค
+สังโยชน์
+สังวร
+สังวัจฉระ
+สังวัธยาย
+สังวาล
+สังวาลพราหมณ์
+สังวาส
+สังเวคะ
+สังเวช
+สังเวย
+สังเวียน
+สังสà¸à¸¤à¸•
+สังสà¸à¸²à¸£
+สังสดมภ์
+สังสนทนา
+สั่งสนทนา
+สั่งสม
+สังสรรค์
+สั่งสอน
+สังสารวัà¸
+สังสิทธิ
+สังสุทธ์
+สังสุทธิ
+สั่งเสีย
+สังหร
+สังหรณ์
+สังหรรษ
+สังหาร
+สังหาริมทรัพย์
+สังหาริมะ
+สังหิต
+สัจ
+สัจ-
+สัจà¸à¸´à¸£à¸´à¸¢à¸²
+สัจจะ
+สัจà¸à¸²à¸“
+สัจนิยม
+สัจพจน์
+สัชฌ-
+สัชฌà¸à¸£
+สัชฌà¸à¸²à¸£
+สัชฌะ
+สัชฌายะ
+สัชฌุ
+สัชฌุà¸à¸£
+สัชฌุà¸à¸²à¸£
+สัà¸à¸ˆà¸£
+สัà¸à¸ˆà¸£à¹‚รค
+สัà¸à¸ˆà¸²à¸£
+สัà¸à¹€à¸ˆà¸•à¸™à¸²
+สัà¸à¸Šà¸²à¸•-
+สัà¸à¸Šà¸²à¸•à¸à¸²à¸“
+สัà¸à¸Šà¸²à¸•à¸´
+สัà¸à¸Œà¸²
+สัà¸à¸à¸²
+สัà¸à¸à¸²à¸“
+สัà¸à¸à¸²à¸šà¸±à¸•à¸£
+สัà¸à¸à¸²à¸›à¸£à¸°à¸à¸±à¸™à¸Šà¸µà¸§à¸´à¸•
+สัà¸à¸à¸²à¸›à¸£à¸°à¸à¸±à¸™à¸ à¸±à¸¢
+สัà¸à¸à¸²à¸§à¸´à¸›à¸¥à¸²à¸ª
+สัà¸à¸à¸µ
+สัà¸à¹‚à¸à¸Šà¸™à¹Œ
+สัà¸à¸›à¸£à¸°à¸à¸²à¸¨
+สัà¸à¹‚ยค
+สัà¸à¸¥à¸±à¸à¸©à¸“์
+สัà¸à¸´
+สัณà¸à¸²à¸™
+สัณà¸à¸´à¸•à¸´
+สัณฑ์
+สัณห์
+สัด
+สัดจอง
+สัดส่วน
+สัต
+สัต-
+สัตà¸à¸²à¸£
+สัตตบงà¸à¸Š
+สัตตบรรณ
+สัตตบุษย์
+สัตตะ
+สัตตาห-
+สัตตาหà¸à¸²à¸¥à¸´à¸
+สัตตู
+สัตถ-
+สัตถันดร
+สัตถา
+สัตถิ
+สัตถุ
+สัตถุศาสนา
+สัตบถ
+สัตบรรณ
+สัตบริภัณฑ์
+สัตบุรุษ
+สัตภัณฑ์
+สัตม-
+สัตมวาร
+สัตย-
+สัตย์
+สัตยพรต
+สัตยวาที
+สัตยาเคราะห์
+สัตยาธิษà¸à¸²à¸™
+สัตยาบัน
+สัตว-
+สัตว์
+สัตวบาล
+สัตวà¹à¸žà¸—ย์
+สัตวโลà¸
+สัตววิทยา
+สัตวา
+สัตวาร
+สัตสดà¸
+สัทธรรม
+สัทธา
+สัทธาจริต
+สัทธาธิà¸
+สัทธิงวิหาริà¸
+สัทธินทรีย์
+สัทธิวิหาริà¸
+สัทศาสตร์
+สัน
+สั่น
+สั้น
+สันเขา
+สันดอน
+สันดาน
+สันดาป
+สันเดà¸
+สันโดษ
+สันต์
+สันตติ
+สันตะปาปา
+สันตะวา
+สันติ
+สันติà¸à¸°
+สันติภาพ
+สันตุà¸à¸à¸µ
+สันถระ
+สันถว-
+สันถวไมตรี
+สันถวะ
+สันถัต
+สันถาร
+สันทนะ
+สันทะ
+สันทัด
+สันทัดà¸à¸£à¸“ี
+สันทัสนะ
+สันทาน
+สันทิà¸à¸´à¸-
+สันทิส
+สันเทส
+สันเทห
+สันธาน
+สันนิธิ
+สันนิบาต
+สันนิวาส
+สันนิเวส
+สันนิษà¸à¸²à¸™
+สันปันน้ำ
+สันพร้านางà¹à¸­
+สันพร้ามอà¸
+สันพร้าหอม
+สันรวง
+สันลึà¸
+สันสà¸à¸¤à¸•
+สันหลัง
+สันหลังยาว
+สับ
+สับเà¸à¸¥à¸µà¸¢à¸§
+สับเงา
+สับเชือà¸
+สับนà¸
+สับปลับ
+สับปลี้
+สับปะขาว
+สับปะรด
+สับเปลี่ยน
+สับสน
+สับหลีà¸
+สัปคับ
+สัปคับช้าง
+สัปด-
+สัปดน
+สัปดปà¸à¸£à¸“์
+สัปดประà¸à¸£à¸“์
+สัปดสดà¸
+สัปดาห์
+สัปดาหะ
+สัปต-
+สัปตศà¸
+สัปทน
+สัปปะ
+สัปปิ
+สัปปุริส-
+สัปปุรุษ
+สัประยุทธ์
+สัปหงà¸
+สัปเหร่อ
+สัพ
+สัพพะ
+สัพพัà¸à¸à¸¹
+สัพเพเหระ
+สัพยอà¸
+สัมบูรณ์
+สัมปชัà¸à¸à¸°
+สัมปทา
+สัมปทาน
+สัมปยุต
+สัมปโยค
+สัมประสิทธิ์
+สัมประหาร
+สัมปรายภพ
+สัมปรายิà¸à¸ à¸ž
+สัมปัตติ
+สัมผัปลาป
+สัมผัส
+สัมผัสนอà¸
+สัมผัสใน
+สัมผัสสระ
+สัมผัสอัà¸à¸©à¸£
+สัมพล
+สัมพหุลา
+สัมพัจฉร-
+สัมพัจฉรฉินท์
+สัมพัตสร
+สัมพัทธ์
+สัมพันธ-
+สัมพันธ์
+สัมพันธน์
+สัมพันธภาพ
+สัมพันธมิตร
+สัมพันธไมตรี
+สัมพาธะ
+สัมพาหน์
+สัมพาหะ
+สัมพุทธ-
+สัมพุทธะ
+สัมโพธิ
+สัมภวะ
+สัมภเวสี
+สัมภัต
+สัมภัตตะ
+สัมภาระ
+สัมภาษณ์
+สัมเภทะ
+สัมโภคà¸à¸²à¸¢
+สัมมนา
+สัมมัปธาน
+สัมมา
+สัมมาà¸à¸±à¸¡à¸¡à¸±à¸™à¸•à¸°
+สัมมาจริยา
+สัมมาชีพ
+สัมมาทิà¸à¸´
+สัมมาวาจา
+สัมมาวายามะ
+สัมมาสติ
+สัมมาสมาธิ
+สัมมาสังà¸à¸±à¸›à¸›à¸°
+สัมมาอาชีวะ
+สัมโมทนียà¸à¸–า
+สัมฤทธิ-
+สัมฤทธิ์
+สัมฤทธิศà¸
+สัยน์
+สัลลาป-
+สัลเลข-
+สัสดี
+สัสต-
+สัสตทิà¸à¸´
+สัสสะ
+สัสสุ
+สัสสู
+สัสุรี
+สา
+ส่า
+สาà¸
+สาà¸à¸à¸°à¹€à¸šà¸·à¸­
+สาà¸à¸£à¸£à¸ˆà¹Œ
+สาà¸à¸¥
+สาà¸à¸©à¸´à¸™
+สาà¸à¸©à¸µ
+สาà¸à¸«à¸¢à¸²à¸
+สาà¸à¸±à¸ˆà¸‰à¸²
+สาà¸à¸±à¸¥à¸¢à¹Œ
+สาà¸à¸´à¸¢-
+สาà¸à¸´à¸¢à¸šà¸¸à¸•à¸£
+สาà¸à¸´à¸¢à¸¡à¸¸à¸™à¸µ
+สาà¸à¸´à¸¢à¸°
+สาเà¸
+ส่าขนุน
+สาขา
+ส่าไข้
+สาคร
+สาคเรศ
+สาคู
+สาคูลาน
+สาคูวิลาด
+สาง
+ส้าง
+สางคลื่น
+สางห่า
+สาฎà¸
+สาà¸à¸´à¸-
+สาณ-
+สาณี
+สาด
+สาดโคลน
+สาดน้ำรดà¸à¸±à¸™
+สาดเสียเทเสีย
+สาต
+สาตรา
+สาไถย
+สาทร
+สาทิส
+สาทิส-
+สาทิสลัà¸à¸©à¸“์
+สาทุ
+สาโท
+สาธà¸
+สาธย-
+สาธยะ
+สาธยาย
+สาธารณ-
+สาธารณ์
+สาธารณภัย
+สาธารณรัà¸
+สาธารณสถาน
+สาธารณสมบัติ
+สาธารณสมบัติของà¹à¸œà¹ˆà¸™à¸”ิน
+สาธารณสุข
+สาธารณะ
+สาธารณูปà¸à¸²à¸£
+สาธารณูปโภค
+สาธิต
+สาธุ
+สาธุà¸à¸²à¸£
+สาธุชน
+สาธุสะ
+สาน
+ส่าน
+สานตวะ
+สานุ
+สานุศิษย์
+สานู
+สาบ
+สาบขนุน
+สาบà¹à¸£à¹‰à¸‡
+สาบà¹à¸£à¹‰à¸‡à¸ªà¸²à¸šà¸à¸²
+สาบสูà¸
+สาบเสือ
+สาบาน
+สาบานธง
+สาป
+สาปไตย
+สาปสรร
+สาม
+สามà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ
+สามเà¸à¸¥à¸­
+สามà¹à¸à¹‰à¸§
+สามขา
+สามขุม
+สามเขี้ยว
+สามคาน
+สามง่าม
+สามชุà¸
+สามà¹à¸‹à¹ˆ
+สามเณร
+สามเณรี
+สามตา
+สามนต-
+สามนต์
+สามนตราช
+สามใบเถา
+สามเพลงตà¸à¸¡à¹‰à¸²à¸•à¸²à¸¢
+สามเมา
+สามยทรัพย์
+สามรส
+สามล
+สามล้อ
+สามลำคาน
+สามวันดีสี่วันไข้
+สามเวท
+สามเศียร
+สามสลึงเฟื้อง
+สามสิบà¸à¸¥à¸µà¸š
+สามเส้า
+สามหมุด
+สามหาบ
+สามหาว
+สามเหลี่ยม
+สามเหลี่ยมด้านเท่า
+สามเหลี่ยมมุมฉาà¸
+สามเหลี่ยมมุมป้าน
+สามเหลี่ยมมุมà¹à¸«à¸¥à¸¡
+สามเหลี่ยมหน้าจั่ว
+สามัคคี
+สามัà¸-
+สามัà¸à¸ªà¸³à¸™à¸¶à¸
+สามัตถิยะ
+สามานย-
+สามานย์
+สามานยนาม
+สามารถ
+สามิà¸
+สามิต
+สามินี
+สามิภัà¸à¸”ิ์
+สามี
+สามีจิà¸à¸£à¸£à¸¡
+สาย
+ส่าย
+ส้าย
+สายà¸à¸£à¸°à¹„ด
+สายใจ
+สายชู
+สายซุง
+สายดิน
+สายตะพาย
+สายตัว
+สายตา
+สายตาพิà¸à¸²à¸£
+สายติ่ง
+สายน้ำ
+สายน้ำผึ้ง
+สายบัว
+สายพาน
+สายฟ้า
+สายมงคล
+สายม่าน
+สายยู
+สายโยà¸
+สายใย
+สายระเดียง
+สายระยาง
+สายระโยง
+สายรัดทึบ
+สายรุ้ง
+สายล่อฟ้า
+สายลับ
+สายเลือด
+สายโลหิต
+ส่ายศึà¸
+ส่ายเศิà¸
+สายสนà¸à¸¥à¹ƒà¸™
+สายสมร
+สายสร้อย
+สายสวาท
+สายสะพาย
+สายสิà¸à¸ˆà¸™à¹Œ
+สายสูตร
+สายหยุด
+สายเหา
+สายอาà¸à¸²à¸¨
+สายเอà¸
+สายัณห์
+สายาห์
+สาร
+สาร-
+สารà¸à¸£à¸¡à¸˜à¸£à¸£à¸¡à¹Œ
+สารคดี
+สารตรา
+สารถี
+สารถีชัà¸à¸£à¸–
+สารท
+สารทา
+สารทุà¸à¸‚์สุà¸à¸”ิบ
+สารธรรม
+สารนิเทศ
+สารบบ
+สารบรรณ
+สารบัà¸
+สารบับ
+ส้ารบับ
+สารบาà¸
+สารบาà¸à¸Šà¸µ
+สารประà¸à¸­à¸š
+สารประโยชน์
+สารพัด
+สารพัน
+สารพางค์
+สารภาพ
+สารภี
+สารภีทะเล
+สารภีป่า
+สารไมย
+สารละลาย
+สารวัด
+สารวัตร
+สารสนเทศ
+สารส้ม
+สารหนู
+สารหนูขาว
+สาระ
+สาระโà¸à¸
+สาระà¹à¸™
+สาระพา
+สาระพาเฮโล
+สาระวอน
+สาระวารี
+สาระสะมา
+สารัตถ-
+สารัตถะ
+สารัตถะประโยชน์
+สารัทธ์
+สารัมภ์
+สาราณีย-
+สาราณียà¸à¸£
+สาราณียธรรม
+สาราณียะ
+สารานุà¸à¸£à¸¡
+สารีริà¸à¸˜à¸²à¸•à¸¸
+สารูป
+สาโรช
+สาละ
+สาละวน
+สาลิ
+สาลิà¸à¸²
+สาลินี
+สาลี
+สาลี่
+สาลู
+ส่าเลือด
+สาโลหิต
+สาว
+สาวà¸
+สาวà¸à¸£à¸°à¸—ืบหอ
+สาวà¸à¹‰à¸²à¸§
+สาวà¹à¸à¹ˆ
+สาวเท้า
+สาวน้อยเล่นน้ำ
+สาวนะ
+สาวà¹à¸ªà¹‰
+สาวไส้
+สาวไส้ให้à¸à¸²à¸à¸´à¸™
+สาวิà¸à¸²
+สาวิตร
+สาวิตรี
+สาสน
+สาสน-
+สาสน์
+สาสนธรรม
+สาสนา
+สาหร่าย
+สาหรี
+ส่าหรี
+สาหัตถ-
+สาหัตถิà¸-
+สาหัส
+สาหัสสาà¸à¸£à¸£à¸ˆà¹Œ
+ส่าเห็ด
+สาเหตุ
+ส่าเหล้า
+สาà¹à¸«à¸£à¸
+สาฬุระ
+สำ
+ส่ำ
+สำคัà¸
+สำซ่าง
+สำà¹à¸”ง
+สำทับ
+สำนวด
+สำนวน
+สำนวนความ
+สำนอง
+สำนัà¸
+สำนัà¸à¸ªà¸‡à¸†à¹Œ
+สำนาน
+สำนึà¸
+สำนึง
+สำเนา
+สำเนียง
+สำบอà¸
+สำบัดสำนวน
+สำปะลอ
+สำปะหลัง
+สำปั้น
+สำปันนี
+สำเภา
+สำเภาทอง
+สำมะงา
+สำมะโน
+สำมะโนครัว
+สำมะโนประชาà¸à¸£
+สำมะลอ
+สำมะเลเทเมา
+สำมะหา
+สำรด
+สำรวจ
+สำรวม
+สำรวมใจ
+สำรวย
+สำรวล
+สำรอà¸
+สำรอง
+สำรับ
+สำราà¸
+สำราà¸
+สำริด
+สำเร็จ
+สำเร็จโทษ
+สำเร็จรูป
+สำเรา
+สำเริง
+สำโรง
+สำลัà¸
+สำลาน
+สำลี
+สำà¹à¸¥à¸‡
+สำสร้าง
+สำส่อน
+สำสา
+สำเส็ด
+ส่ำเสีย
+สำหรวด
+สำหรับ
+สำหา
+สำเหนียà¸
+สำเหร่
+สำออย
+สำอาง
+สิ
+สิà¸à¸‚์
+สิà¸à¸‚มานา
+สิà¸à¸‚า
+สิà¸à¸‚าà¸à¸²à¸¡-
+สิà¸à¸‚าบท
+สิขร
+สิขรี
+สิขเรศ
+สิขา
+สิขานล
+สิขี
+สิคาล
+สิง
+สิ่ง
+สิงขร
+สิ่งของ
+สิงค์
+สิงคลิ้ง
+สิงคลี
+สิงคาร
+สิงคาล
+สิงคี
+สิงโต
+สิงโตทะเล
+สิ่งพิมพ์
+สิ่งละอันพันละน้อย
+สิ่งà¹à¸§à¸”ล้อม
+สิงสถิต
+สิงสาราสัตว์
+สิงสู่
+สิงห-
+สิงห์
+สิงหนาท
+สิงหบัà¸à¸Šà¸£
+สิงหรา
+สิงหราช
+สิงหล
+สิงหลà¸-
+สิงหาคม
+สิงหาสน์
+สิà¸à¸ˆ-
+สิà¸à¸ˆà¸™à¹Œ
+สิต-
+สิตางศุ์
+สิถิล
+สิทธ-
+สิทธ์
+สิทธา
+สิทธาจารย์
+สิทธานต์
+สิทธารถ
+สิทธิ
+สิทธิ์
+สิทธิà¸à¸£
+สิทธิà¸à¸²à¸£à¸´à¸¢à¸°
+สิทธิ์ขาด
+สิทธิครอบครอง
+สิทธิชัย
+สิทธิโชค
+สิทธิบัตร
+สิทธิยึดหน่วง
+สิทธิสภาพนอà¸à¸­à¸²à¸“าเขต
+สิธยะ
+สิน
+สิ้น
+สินค้า
+สินค้าเข้า
+สินค้าออà¸
+สิ้นคิด
+สินจ้าง
+สิ้นใจ
+สิ้นชีพ
+สิ้นชีพตัà¸à¸©à¸±à¸¢
+สิ้นชีวิต
+สิ้นเชิง
+สินเชื่อ
+สินใช้
+สินเดิม
+สิ้นตำรา
+สิ้นà¹à¸•à¹‰à¸¡
+สินไถ่
+สินทรัพย์
+สิ้นท่า
+สินทูระ
+สินเทา
+สินธพ
+สินธุ
+สินธุระ
+สินเธาว์
+สินน้ำใจ
+สิ้นเนื้อประดาตัว
+สินบน
+สินบริคณห์
+สิ้นบุà¸
+สิ้นประตู
+สิ้นพระชนม์
+สินระบาด
+สินà¹à¸£à¹ˆ
+สิ้นไร้ไม้ตอà¸
+สิ้นฤทธิ์
+สิ้นลม
+สินสมรส
+สินส่วนตัว
+สินสอด
+สิ้นสุด
+สินหัวบัวนาง
+สินไหม
+สินไหมทดà¹à¸—น
+สินะ
+สินาด
+สินิทธ์
+สินี
+สิเนรุ
+สิเนหà¸
+สิเนหนียะ
+สิเนหะ
+สิเนหา
+สิเน่หา
+สิบ
+สิบเบี้ยใà¸à¸¥à¹‰à¸¡à¸·à¸­
+สิบà¹à¸›à¸”มงà¸à¸¸à¸Ž
+สิปปะ
+สิพนะ
+สิมพลี
+สิร-
+สิระ
+สิริ
+สิรี
+สิโรดม
+สิโรตม์
+สิลา
+สิโลà¸
+สิว
+สิ่ว
+สิ่วน่อง
+สิวเสี้ยน
+สิวะ
+สิวาลัย
+สิวิà¸à¸²
+สิหนา
+สี
+สี่
+สี้
+สีà¸à¸£à¸¸à¸”
+สีà¸à¸²
+สีà¸à¸¸à¸™
+สีข้าง
+สีฆ-
+สีจัà¸
+สีชมพูดง
+สีชมพูสวน
+สีซอให้ควายฟัง
+สีด
+สีดอ
+สีต-
+สีต้น
+สีตล-
+สีตลรัศมี
+สีตลหฤทัย
+สีตโลทà¸
+สีโตทà¸
+สีทันดร
+สี่บท
+สีผึ้ง
+สีà¸à¸±à¸”
+สีฟันคนทา
+สีฟันนางà¹à¸­
+สีไฟ
+สีมันต์
+สีมา
+สีลม
+สีละมัน
+สีวิà¸à¸²
+สีสวรรค์
+สีสอ
+สีสะ
+สีสา
+สีสุà¸
+สีเสียด
+สีเสียดà¹à¸à¹ˆà¸™
+สีเสียดเปลือà¸
+สีเสียดเหนือ
+สีเสื้อน้อย
+สีห-
+สีห์
+สีหน้า
+สีหนาท
+สีหบัà¸à¸Šà¸£
+สีหราช
+สีหะ
+สี่เหลี่ยม
+สี่เหลี่ยมขนมเปียà¸à¸›à¸¹à¸™
+สี่เหลี่ยมคางหมู
+สี่เหลี่ยมจัตุรัส
+สี่เหลี่ยมด้านขนาน
+สี่เหลี่ยมด้านไม่เท่า
+สี่เหลี่ยมผืนผ้า
+สึà¸
+สึà¸à¸«à¸£à¸­
+สึง
+สืบ
+สืบไป
+สืบพยาน
+สืบพันธุ์
+สืบพันธุ์à¹à¸šà¸šà¹„ม่อาศัยเพศ
+สืบพันธุ์à¹à¸šà¸šà¸­à¸²à¸¨à¸±à¸¢à¹€à¸žà¸¨
+สืบราชสมบัติ
+สืบราชสันตติวงศ์
+สืบศาสนา
+สืบสวน
+สืบสันดาน
+สืบสาย
+สืบสาวราวเรื่อง
+สืบเสาะ
+สืบหูà¸
+สื่อ
+สื่อà¸à¸²à¸£à¸¨à¸¶à¸à¸©à¸²
+สื่อมวลชน
+สื่อสาร
+สื่อสารมวลชน
+สุ
+สุà¸
+สุà¸à¸à¹ˆà¸­à¸™à¸«à¹ˆà¸²à¸¡
+สุà¸à¸‚์
+สุà¸à¸”ิบ
+สุà¸à¹† ดิบๆ
+สุà¸à¹à¸”ด
+สุà¸à¸£
+สุà¸à¸£à¸¡
+สุà¸à¹ƒà¸ª
+สุà¸à¹€à¸­à¸²à¹€à¸œà¸²à¸à¸´à¸™
+สุà¸à¸³à¸¨à¸ž
+สุà¸à¸µà¸¢à¸²à¸à¸µà¹‰
+สุข
+สุข-
+สุขนาà¸à¸à¸£à¸£à¸¡
+สุขภัณฑ์
+สุขภาพ
+สุขลัà¸à¸©à¸“ะ
+สุขวิทยา
+สุขศาลา
+สุขศึà¸à¸©à¸²
+สุขา
+สุขาภิบาล
+สุขารมณ์
+สุขาวดี
+สุขิน
+สุขี
+สุขุม
+สุขุมาล
+สุคต
+สุคติ
+สุคนธ-
+สุคนธ์
+สุคนธรส
+สุคันธ์
+สุงà¸-
+สุงà¸à¸°
+สุงà¸à¸²à¸à¸£
+สุงสิง
+สุงสุมาร
+สุงสุมารี
+สุจริต
+สุจหนี่
+สุจะ
+สุจิ
+สุจิต
+สุจิตร
+สุชน
+สุชัมบดี
+สุชา
+สุชาดา
+สุà¸
+สุà¸-
+สุà¸à¸-
+สุà¸à¸à¸²à¸à¸²à¸¨
+สุà¸à¸•à¸²
+สุà¸à¸™à¸´à¸¢à¸¡
+สุณ
+สุณหา
+สุณิสา
+สุด
+สุดà¸à¸³à¸¥à¸±à¸‡
+สุดà¸à¸¹à¹ˆ
+สุดขีด
+สุดคน
+สุดคิด
+สุดจิต
+สุดใจ
+สุดด้าม
+สุดà¹à¸•à¹ˆ
+สุดโต่ง
+สุดท้อง
+สุดท้าย
+สุดท้ายปลายโต่ง
+สุดà¹à¸£à¸‡à¹€à¸à¸´à¸”
+สุดลิ่ม
+สุดวิสัย
+สุดสงวน
+สุดสวาทขาดใจ
+สุดสายป่าน
+สุดเสียง
+สุดเสียงสังข์
+สุดหล้าฟ้าเขียว
+สุดเหวี่ยง
+สุดา
+สุต
+สุตà¸à¸§à¸µ
+สุตตะ
+สุตตันตปิฎà¸
+สุตตันตะ
+สุติ
+สุทธ-
+สุทธ์
+สุทธาวาส
+สุทธิ
+สุทรรศน์
+สุทัศน์
+สุธา
+สุธาà¸à¸²à¸£
+สุธาโภชน์
+สุธารส
+สุธารสชา
+สุธาสินี
+สุธาสี
+สุธี
+สุนทร
+สุนทร-
+สุนทรพจน์
+สุนทรี
+สุนทรีย-
+สุนทรียภาพ
+สุนทรียศาสตร์
+สุนทรียะ
+สุนัข
+สุนันท์
+สุโนà¸
+สุบดี
+สุบรรณ
+สุบิน
+สุปรีดิ์
+สุปรีย์
+สุปาณี
+สุพพัต
+สุพรรณ
+สุพรรณ-
+สุพรรณถัน
+สุพรรณบัà¸
+สุพรรณภาชน์
+สุพรรณราช
+สุพรรณศรี
+สุพรรณิà¸à¸²à¸£à¹Œ
+สุภ-
+สุภร
+สุภัค
+สุภา
+สุภาพ
+สุภาพชน
+สุภาพบุรุษ
+สุภาพสตรี
+สุภาษิต
+สุม
+สุ่ม
+สุมขอน
+สุมควัน
+สุ่มตัวอย่าง
+สุมทุม
+สุมน
+สุมนะ
+สุมนัส
+สุมนา
+สุมยุง
+สุ่มสี่สุ่มห้า
+สุ้มเสียง
+สุมหัว
+สุมะ
+สุมาลี
+สุเมธ
+สุเมรุ
+สุร-
+สุรคต
+สุรงค์
+สุรเชษà¸à¹Œ
+สุรบดี
+สุรบถ
+สุรภาพ
+สุรภี
+สุรโลà¸
+สุรสีหนาท
+สุรเสียง
+สุรังค์
+สุรัติ
+สุรัสวดี
+สุรา
+สุรางค์จำเรียง
+สุรางคนา
+สุรางคนางค์
+สุราบาน
+สุรารัà¸à¸©à¹Œ
+สุราลัย
+สุรินทร์
+สุรินทราหู
+สุริย-
+สุริยà¸à¸±à¸™à¸•à¹Œ
+สุริยà¸à¸²à¸™à¸•à¹Œ
+สุริยà¸à¸²à¸£
+สุริยà¸à¸²à¸¥
+สุริยคติ
+สุริยคราส
+สุริยเคราะห์
+สุริยง
+สุริยน
+สุริยมณฑล
+สุริยะ
+สุริยัน
+สุริยา
+สุริยุปราคา
+สุริเยนทร์
+สุริเยศ
+สุริโย
+สุรีย์
+สุรุ่ยสุร่าย
+สุเรนทร์
+สุลต่าน
+สุว
+สุวภาพ
+สุวรรณ
+สุวรรณ-
+สุวรรณภูมิ
+สุวาน
+สุวินัย
+สุวิมล
+สุษิร
+สุสาน
+สุหนัต
+สุหร่ง
+สุหร่าย
+สุหฤท
+สุหัท
+สุเหร่า
+สู
+สู่
+สู้
+สูà¸à¸©à¸¡
+สู่ขวัà¸
+สู่ขอ
+สูง
+สูงเท่านà¸à¹€à¸‚าเหิน
+สูงเทียมเมฆ
+สูงส่ง
+สูงสุดสอย
+สูงอายุ
+สูจà¸à¸°
+สูจนะ
+สูจิ
+สูจิบัตร
+สูเจ้า
+สูà¸
+สูด
+สูต
+สูตร
+สูตรเคมี
+สูติ-
+สูติà¸à¸£à¸£à¸¡
+สูติบัตร
+สูติà¹à¸žà¸—ย์
+สูติศาสตร์
+สูท
+สูท-
+สูทà¸à¸£à¸£à¸¡
+สูทศาสตร์
+สูน
+สูนุ
+สูบ
+สูบเลือด
+สูบเลือดสูบเนื้อ
+สูป-
+สูปà¸à¸²à¸£
+สูปะ
+สู้ยิบตา
+สู้เย็บตา
+สูร
+สู้รบตบมือ
+สูรย-
+สูรย์
+สูรยà¸à¸²à¸™à¸•à¹Œ
+สูรยคราส
+สูริ
+สู่รู้
+สู่สม
+สูสี
+สู้หน้า
+สู่หา
+สู้เหมือนหมาจนตรอà¸
+เส
+เสà¸
+เสà¸à¸‚-
+เสà¸à¸‚บุคคล
+เสà¸à¸‚ะ
+เสà¸à¸ªà¸£à¸£
+เสข-
+เสขบุคคล
+เสขะ
+เสความ
+เส็ง
+เส้ง
+เส็งเคร็ง
+เสงี่ยม
+เสà¸à¸à¸µ
+เสณี
+เสด
+เสด็จ
+เสด็จในà¸à¸£à¸¡
+เสด็จพระราชดำเนิน
+เสต-
+เสตุ
+เสถียร
+เสถียร-
+เสถียรภาพ
+เสท
+เสโท
+เสน
+เส้น
+เส้นà¹à¸à¸‡à¸£à¹‰à¸­à¸™
+เส้นขนาน
+เส้นà¹à¸‚็ง
+เสนง
+เสน่ง
+เส้นด้าย
+เส้นตาย
+เส้นตื้น
+เส้นทาง
+เส้นบังคับ
+เส้นผมบังภูเขา
+เส้นผ่านศูนย์à¸à¸¥à¸²à¸‡
+เส้นผ่าศูนย์à¸à¸¥à¸²à¸‡
+เส้นà¹à¸œà¸¥à¸‡
+เส้นยาà¹à¸”งผ่าà¹à¸›à¸”
+เส้นใย
+เส้นใยà¹à¸à¹‰à¸§
+เส้นรอบวง
+เส้นรัศมี
+เส้นà¹à¸£
+เส้นลายมือ
+เส้นลึà¸
+เส้นเลือด
+เส้นวันที่
+เส้นศูนย์สูตร
+เส้นสมมาตร
+เส้นสัมผัส
+เส้นสาย
+เสนห-
+เสน่ห์
+เสน่ห์จันทร์ขาว
+เสน่ห์จันทร์à¹à¸”ง
+เสน่ห์ปลายจวัà¸
+เส้นหมี่
+เสนหา
+เสน่หา
+เสนอ
+เส้นฮ่อ
+เสนะ
+เสนา
+เสน่า
+เสนาà¸à¸¸à¸Ž
+เสนางค์
+เสนางคนิà¸à¸£
+เสนาธิà¸à¸²à¸£
+เสนาธิปัต
+เสนานี
+เสนาบดี
+เสนาพยุห์
+เสนาพยูห์
+เสนาสนะ
+เสนาะ
+เสนี
+เสนีย์
+เสนียด
+เสนียะ
+เสบย
+เสบียง
+เสบียงà¸à¸£à¸±à¸‡
+เสพ
+เสพย์ติด
+เสเพล
+เสภา
+เสม็ด
+เสมหะ
+เสมอ
+เสมอใจ
+เสมอต้นเสมอปลาย
+เสมอตัว
+เสมอนอà¸
+เสมอบ่าเสมอไหล่
+เสมอภาค
+เสมอหน้า
+เสมา
+เสมียน
+เสมือน
+เสย
+เสร็จ
+เสริด
+เสริม
+เสริมสวย
+เสรี
+เสรีไทย
+เสรีธรรม
+เสรีนิยม
+เสรีภาพ
+เสล-
+เสลด
+เสลดพังพอน
+เสลดหางวัว
+เสลบรรพต
+เสลา
+เสลี่ยง
+เสลือà¸à¸ªà¸¥à¸™
+เสโล
+เสวà¸
+เสวà¸à¸²à¸¡à¸²à¸•à¸¢à¹Œ
+เสวนะ
+เสวนา
+เสวย
+เสวยพระชาติ
+เสวียน
+เสสรวง
+เสสรวล
+เสà¹à¸ªà¸£à¹‰à¸‡
+เสา
+เส้า
+เสาà¸à¸£à¸°à¹‚ดง
+เสาเข็ม
+เสาชี้
+เสาดั้ง
+เสาตะลุง
+เสานางเรียง
+เสาร์
+เสารภย์
+เสารี
+เสาว-
+เสาวคนธ์
+เสาวคันธ์
+เสาวณิต
+เสาวธาร
+เสาวนะ
+เสาวนา
+เสาวนาà¸à¸²à¸£
+เสาวนีย์
+เสาวภา
+เสาวภาคย์
+เสาวภาพ
+เสาวรภย์
+เสาวรส
+เสาวลัà¸à¸©à¸“์
+เสาหมอ
+เสาหฤท
+เสาหาน
+เสาเอà¸
+เสาะ
+เสาะด้าย
+เสาะป่าน
+เสาะà¹à¸ªà¸°
+เสิร์จ
+เสิร์ฟ
+เสีย
+เสียà¸à¸šà¸²à¸¥
+เสียà¸à¸£à¸°à¸šà¸§à¸™
+เสียà¸à¸¥
+เสียà¸à¸²à¸£
+เสียà¸à¸³à¸‹à¹‰à¸³à¸à¸­à¸š
+เสียà¸à¸³à¹„ด้à¸à¸­à¸š
+เสียà¸à¸³à¸¥à¸±à¸‡à¹ƒà¸ˆ
+เสียà¸à¸´à¸£à¸´à¸¢à¸²
+เสียขวง
+เสียขวัà¸
+เสียคน
+เสียคำพูด
+เสียง
+เสี่ยง
+เสียงเขียว
+เสียงà¹à¸‚็ง
+เสี่ยงชีวิต
+เสียงà¹à¸•à¸
+เสียงทอง
+เสี่ยงทาย
+เสี่ยงบุà¸à¹€à¸ªà¸µà¹ˆà¸¢à¸‡à¸à¸£à¸£à¸¡
+เสียงพยัà¸à¸Šà¸™à¸°
+เสี่ยงภัย
+เสียงสระ
+เสียงหลง
+เสียงอ่อน
+เสียจริต
+เสียใจ
+เสียโฉม
+เสียชาติเà¸à¸´à¸”
+เสียชื่อ
+เสียเชิง
+เสียด
+เสียดใบ
+เสียดสี
+เสียดาย
+เสียเด็à¸
+เสียตัว
+เสียà¹à¸•à¹‰à¸¡
+เสียเถอะ
+เสียเถิด
+เสียท่า
+เสียที
+เสี้ยน
+เสี้ยนศึà¸
+เสี้ยนหนาม
+เสียน้ำใจ
+เสียน้ำตา
+เสียเนื้อเสียตัว
+เสียบ
+เสียบน
+เสียบหนู
+เสียปาà¸
+เสียเปรียบ
+เสียผี
+เสียผู้ใหà¸à¹ˆ
+เสียภูมิ
+เสียม
+เสี่ยม
+เสี้ยม
+เสี้ยมเขาควายให้ชนà¸à¸±à¸™
+เสี้ยมสอน
+เสี่ยมสาร
+เสียรอย
+เสียรังวัด
+เสียราศี
+เสียรู้
+เสียรูป
+เสียรูปคดี
+เสียà¹à¸£à¸‡
+เสียว
+เสี่ยว
+เสี้ยว
+เสียวซ่าน
+เสียวไส้
+เสียเศวตฉัตร
+เสียสละ
+เสียสาว
+เสียเส้น
+เสียหน่อย
+เสียหน้า
+เสียหลัà¸
+เสียหลาย
+เสียหัว
+เสียหาย
+เสียเหลี่ยม
+เสือ
+เสื่อ
+เสื้อ
+เสือà¸
+เสือà¸à¸à¸°à¹‚หลà¸
+เสือà¸à¸„ลาน
+เสือà¸à¸£à¸°à¸”าษ
+เสือà¸à¸£à¸°à¸•à¹ˆà¸²à¸¢
+เสื้อà¸à¸¥à¹‰à¸²à¸¡
+เสือà¸à¸ªà¸™
+เสือà¸à¹„ส
+เสื้อà¸à¸±à¹Šà¸
+เสือà¸à¸´à¸™à¸§à¸±à¸§
+เสือเà¸à¹ˆà¸²
+เสือข้ามห้วย
+เสือจนท่า ข้าจนทาง
+เสือซ่อนเล็บ
+เสือเฒ่าจำศีล
+เสือดาว
+เสือดำ
+เสือตà¸à¸–ัง
+เสือตบà¸à¹‰à¸™
+เสือทลายห้าง ช้างทลายโรง
+เสือทะเล
+เสือนอนà¸à¸´à¸™
+เสือนั่งร่ม
+เสื้อน้ำ
+เสื่อน้ำมัน
+เสือในร่างสมัน
+เสือบอง
+เสือปลา
+เสือป่า
+เสือป่าà¹à¸¡à¸§à¹€à¸‹à¸²
+เสือป่าà¹à¸¡à¸§à¸¡à¸­à¸‡
+เสือไฟ
+เสื่อม
+เสื่อมทราม
+เสื่อมโทรม
+เสื่อมสิทธิ์
+เสื่อมเสีย
+เสือà¹à¸¡à¸¥à¸‡à¸§à¸±à¸™
+เสือรู้
+เสื่อลวด
+เสือลาà¸à¸«à¸²à¸‡
+เสื่อลำà¹à¸žà¸™
+เสือสมิง
+เสือสิ้นตวัà¸
+เสือสุมาตรา
+เสื้อà¹à¸ªà¸‡
+เสือหมอบ
+เสือหิว
+à¹à¸ª
+à¹à¸ªà¹ˆ
+à¹à¸ªà¹‰
+à¹à¸ªà¸
+à¹à¸ªà¸à¹†
+à¹à¸ªà¸à¸«à¸™à¹‰à¸²
+à¹à¸ªà¸‡
+à¹à¸ªà¸‡à¹€à¸‡à¸´à¸™à¹à¸ªà¸‡à¸—อง
+à¹à¸ªà¸‡à¸ˆà¸±à¸™à¸—ร์
+à¹à¸ªà¸‡à¸ªà¸§à¹ˆà¸²à¸‡
+à¹à¸ªà¸‡à¸­à¸²à¸—ิตย์
+à¹à¸ªà¸”
+à¹à¸ªà¸”ง
+à¹à¸ªà¸”งออà¸
+à¹à¸ªà¸•à¸¡à¸›à¹Œ
+à¹à¸ªà¹€à¸–า
+à¹à¸ªà¸™
+à¹à¸ªà¸™à¸à¸¥
+à¹à¸ªà¸™à¸‡
+à¹à¸ªà¸™à¸‡à¸­à¸™
+à¹à¸ªà¸™à¸¢-
+à¹à¸ªà¸™à¸¢à¹Œ
+à¹à¸ªà¸™à¸¢à¸²à¸à¸£
+à¹à¸ªà¸™à¸¢à¸²à¸™à¸¸à¸ à¸²à¸ž
+à¹à¸ªà¸™à¸£à¸¹à¹‰
+à¹à¸ªà¸™à¹€à¸ªà¸™à¸²à¸°
+à¹à¸ªà¸™à¸²
+à¹à¸ªà¸š
+à¹à¸ªà¸šà¸
+à¹à¸ªà¸¡
+à¹à¸ªà¸¡à¸ªà¸²à¸£
+à¹à¸ªà¹‰à¸¡à¹‰à¸²
+à¹à¸ªà¹‰à¸¡à¹‰à¸²à¸—ะลาย
+à¹à¸ªà¸¢à¸
+à¹à¸ªà¸¢à¸‡
+à¹à¸ªà¸¢à¸‡à¸‚น
+à¹à¸ªà¸¢à¸°
+à¹à¸ªà¸£à¸
+à¹à¸ªà¸£à¹‰à¸‡
+à¹à¸ªà¸£à¹‰à¸‡à¸§à¹ˆà¸²
+à¹à¸ªà¸¥à¸‡
+à¹à¸ªà¸¥à¸‡à¹ƒà¸ˆ
+à¹à¸ªà¸¥à¸‡à¹€à¸šà¸·à¹ˆà¸­
+à¹à¸ªà¸§à¸‡
+à¹à¸ªà¸­à¸
+à¹à¸ªà¸°
+โสà¸
+โสà¸à¹‚ดà¸
+โสà¸à¸±à¸™à¸•à¹Œ
+โสà¸à¸²à¸”านา
+โสโครà¸
+โสณ
+โสณฑ์
+โสณิ
+โสณี
+โสด
+โสดà¸
+โสดม
+โสดา
+โสดาบัน
+โสดาปัตติผล
+โสดาปัตติมรรค
+โสต
+โสต-
+โสตถิ
+โสตทัศนวัสดุ
+โสตทัศนอุปà¸à¸£à¸“์
+โสทà¸
+โสทร
+โสธà¸
+โสธนะ
+โสน
+โสนà¸à¸´à¸™à¸”อà¸
+โสนคางคà¸
+โสนหางไà¸à¹ˆ
+โสนหิน
+โสภ-
+โสภณ
+โสภา
+โสภิณี
+โสภี
+โสเภณี
+โสม
+โสมนัส
+โสมม
+โสมย์
+โสมส่องà¹à¸ªà¸‡
+โสร่ง
+โสรจ
+โสรจสรง
+โสวรรณ
+โสหุ้ย
+โสฬส
+ใส
+ใส่
+ใส่ความ
+ใส่คะà¹à¸™à¸™à¹„ม่ทัน
+ใส่ไคล้
+ใส่ใจ
+ใส่ตะà¸à¸£à¹‰à¸²à¸¥à¹‰à¸²à¸‡à¸™à¹‰à¸³
+ใส่ถ้อยร้อยความ
+ใส่ไฟ
+ใส่ยา
+ใส่ร้าย
+ใส่สาà¹à¸«à¸£à¸à¹à¸‚วนไว้
+ใส่สีสัน
+ใส่ไส้
+ใส่หน้าà¸à¸²à¸
+ใส่หน้ายัà¸à¸©à¹Œ
+ไส
+ไส้
+ไส้à¸à¸£à¸­à¸
+ไส้ไà¸à¹ˆ
+ไส้à¹à¸‚วน
+ไส้เดือน
+ไส้ตัน
+ไส้ติ่ง
+ไส้เป็นน้ำเหลือง
+ไส้เป็นหนอน
+ไสย
+ไสย-
+ไสยเวท
+ไสยศาสตร์
+ไสยา
+ไสยาสน์
+ไสร้
+ไส้ละมาน
+ไส้เลื่อน
+ไสว
+ไส้ศึà¸
+ไสหัว
+ไส้à¹à¸«à¹‰à¸‡
+ไส้อั่ว
+ห
+หà¸
+หà¸à¸„ว่ำ
+หà¸à¸„ะเมน
+หà¸à¸šà¸—
+หà¸à¸¥à¹‰à¸¡
+หà¸à¹‚ล่
+หà¸à¸«à¸±à¸™
+หง
+หงà¸à¹†
+หงส-
+หงส์
+หงสคติ
+หงส์ทอง
+หงสบาท
+หงสรถ
+หงส์ร่อนมังà¸à¸£à¸£à¸³
+หงสราช
+หงส์ลีลา
+หงส์หยà¸
+หงอ
+หงอà¸
+หง่องๆ
+หงองà¹à¸«à¸‡à¸‡
+หงอด
+หงอดๆ
+หงอน
+หงอนไà¸à¹ˆ
+หงอนไà¸à¹ˆà¸›à¹ˆà¸²
+หง่อม
+หงอย
+หง่อย
+หงอยà¸à¹‹à¸­à¸¢
+หงอยเหงา
+หงัà¸à¹†
+หงับๆ
+หง่าง
+หงาย
+หงายท้อง
+หงายหลัง
+หง่าว
+หงำ
+หงำเหงอะ
+หงิà¸
+หงิงๆ
+หงิม
+หงิมๆ
+หงึà¸à¹†
+หงุงหงิง
+หงุดหงิด
+หงุบ
+หงุบหงับ
+หงุ่ย
+หà¸à¹‰à¸²
+หà¸à¹‰à¸²à¸à¸£à¸°à¸ˆà¸²à¸¡
+หà¸à¹‰à¸²à¹€à¸à¸¥à¹‡à¸”หอย
+หà¸à¹‰à¸²à¸‚ัด
+หà¸à¹‰à¸²à¸‚ัดใบยาว
+หà¸à¹‰à¸²à¸‚ัดหลวง
+หà¸à¹‰à¸²à¸‡à¸§à¸‡à¸Šà¹‰à¸²à¸‡
+หà¸à¹‰à¸²à¸ˆà¸²à¸¡
+หà¸à¹‰à¸²à¹ƒà¸•à¹‰à¹ƒà¸š
+หà¸à¹‰à¸²à¸–อดปล้อง
+หà¸à¹‰à¸²à¸™à¹‰à¸³à¸”ับไฟ
+หà¸à¹‰à¸²à¸šà¸±à¸§
+หà¸à¹‰à¸²à¸›à¸²à¸à¸„อà¸
+หà¸à¹‰à¸²à¸›à¸µà¸™à¸•à¸­
+หà¸à¹‰à¸²à¸à¸£à¸±à¹ˆà¸™
+หà¸à¹‰à¸²à¸žà¸±à¸™à¸‡à¸¹
+หà¸à¹‰à¸²à¹€à¸žà¹‡à¸
+หà¸à¹‰à¸²à¹à¸žà¸£à¸
+หà¸à¹‰à¸²à¸¢à¸­à¸‡à¹„ฟ
+หà¸à¹‰à¸²à¸¢à¸²à¸¢à¹€à¸ à¸²
+หà¸à¹‰à¸²à¸£à¸à¸Šà¹‰à¸²à¸‡
+หà¸à¹‰à¸²à¸£à¸²à¸à¸‚าว
+หà¸à¹‰à¸²à¸¥à¸´à¹€à¸ à¸²
+หà¸à¹‰à¸²à¸«à¸™à¸§à¸”à¹à¸¡à¸§
+หà¸à¹‰à¸²à¹à¸«à¹‰à¸§à¸«à¸¡à¸¹
+หà¸à¸´à¸‡
+หà¸à¸´à¸š
+หด
+หดหาย
+หดหู่
+หตะ
+หทย-
+หทัย
+หน
+หนทาง
+หนนะ
+หนวà¸
+หนวà¸à¸«à¸¹
+หน่วง
+หน่วงเหนี่ยว
+หนวด
+หนวดนาคราช
+หนวดพราหมณ์
+หนวดà¹à¸¡à¸§
+หน่วย
+หน่วยà¸à¹‰à¸²à¸™
+หน่วยà¸à¸´à¸•
+หน่วยดาราศาสตร์
+หนอ
+หน่อ
+หนอà¸
+หนอà¸à¸Šà¹‰à¸²à¸‡
+หนอง
+หนองà¹à¸‹à¸‡
+หนองใน
+หน็องà¹à¸«à¸™à¹‡à¸‡
+หนอน
+หนอนà¸à¸£à¸°à¸—ู้
+หนอนà¸à¸£à¸°à¸ªà¸·à¸­
+หนอนà¸à¸­
+หนอนด้น
+หนอนตายหยาà¸
+หนอนบ่อนไส้
+หนอนพยาธิ
+หนอนม้วนใบข้าว
+หนอนหนังสือ
+หน่อเนื้อเชื้อไข
+หน่อไม้
+หน่อไม้น้ำ
+หน่อไม้à¸à¸£à¸±à¹ˆà¸‡
+หน่อย
+หน็อยà¹à¸™à¹ˆ
+หนัà¸
+หนัà¸à¸‚้อ
+หนัà¸à¹ƒà¸ˆ
+หนัà¸à¹à¸™à¹ˆà¸™
+หนัà¸à¸›à¸²à¸
+หนัà¸à¹à¸œà¹ˆà¸™à¸”ิน
+หนัà¸à¸¡à¸·à¸­
+หนัà¸à¹„ม่เอา เบาไม่สู้
+หนัà¸à¸«à¸™à¹ˆà¸§à¸‡
+หนัà¸à¸«à¸™à¸²
+หนัà¸à¸«à¸™à¹‰à¸²
+หนัà¸à¸­à¸
+หนัง
+หนังà¸à¸¥à¸²à¸‡à¸§à¸±à¸™
+หนังà¸à¸³à¸žà¸£à¹‰à¸²
+หนังไà¸à¹ˆ
+หนังตะลุง
+หนังเรียด
+หนังสติ๊à¸
+หนังสือ
+หนังสือเดินทาง
+หนังสือบริคณห์สนธิ
+หนังสือพิมพ์
+หนังสือรับรองà¸à¸²à¸£à¸—ำประโยชน์
+หนังสือเวียน
+หนังสือสัà¸à¸à¸²
+หนังหน้าไฟ
+หนังใหà¸à¹ˆ
+หนั่น
+หนับ
+หนา
+หน้า
+หน้าà¸à¸£à¸°à¸‰à¸µà¸
+หน้าà¸à¸£à¸°à¸”าน
+หน้าà¸à¸²à¸
+หนาà¸à¸²à¸ªà¸£à¸µ
+หน้าเà¸à¹‰à¸­
+หน้าขา
+หน้าข้าวตัง
+หน้าà¹à¸‚้ง
+หน้าคว่ำ
+หน่าง
+หน้างอ
+หน้างอà¸
+หน้าเง้า
+หน้าà¹à¸‡
+หน้าจ๋อย
+หน้าจั่ว
+หน้าจืด
+หน้าฉาà¸
+หน้าฉาน
+หน้าโฉนด
+หน้าซีด
+หน้าซื่อใจคด
+หน้าเซียว
+หนาด
+หน้าด้าน
+หน้าตัà¸
+หน้าตั้ง
+หนาตา
+หน้าตา
+หน้าต่าง
+หน้าตาย
+หน้าตึง
+หน้าตื่น
+หน้าตูม
+หน้าเตา
+หน้าถัง
+หน้าทับ
+หน้าที่
+หน้าที่นั่ง
+หนาน
+หน้านวล
+หน้าเนื้อใจเสือ
+หนาà¹à¸™à¹ˆà¸™
+หน้าบัน
+หน้าบาง
+หน้าบาน
+หน้าบูด
+หน้าปัด
+หน้าเป็น
+หน้าผา
+หน้าผาà¸
+หน้าพาทย์
+หน้าไฟ
+หนาม
+หนามขี้à¹à¸£à¸”
+หนามเขียะ
+หนามควายนอน
+หนามจี้
+หนามà¹à¸”ง
+หนามเตย
+หนามพรม
+หนามพุงดอ
+หนามยอà¸à¸­à¸
+หนามยอà¸à¹€à¸­à¸²à¸«à¸™à¸²à¸¡à¸šà¹ˆà¸‡
+หนามรอบตัว
+หนามหลัง
+หนามเหม็น
+หนามà¹à¸«à¸¥à¸¡à¹„ม่มีใครเสี้ยม
+หนามใหà¸à¹ˆ
+หน้ามอด
+หน้าม่อย
+หน้าม้า
+หน้ามืด
+หน้ามุข
+หน้าไม้
+หน่าย
+หน่ายหนี
+หน่ายà¹à¸«à¸™à¸‡
+หน้าร่าหุ์
+หน้าราหู
+หน้าเลือด
+หนาว
+หนาวใจ
+หน้าวัว
+หน้าà¹à¸§à¹ˆà¸™
+หน้าสิ่วหน้าขวาน
+หน้าเสีย
+หน้าเสี้ยว
+หน้าหนา
+หน้าหัà¸
+หนาหู
+หนาหูหนาตา
+หน้าใหà¸à¹ˆà¹ƒà¸ˆà¹‚ต
+หน้าไหว้หลังหลอà¸
+หน้าอà¸
+หน้าอัด
+หนำ
+หนำใจ
+หนำเลี้ยบ
+หนี
+หนี้
+หนี้เà¸à¸¥à¸·à¹ˆà¸­à¸™à¸à¸¥à¸·à¸™à¸à¸±à¸™
+หนีบ
+หนี้สิน
+หนี้สูà¸
+หนีเสือ
+หนีเสือปะจระเข้
+หนึà¸
+หนึ่ง
+หนึบ
+หนืด
+หนุ
+หนุน
+หนุนเนื่อง
+หนุนหลัง
+หนุบ
+หนุบๆ
+หนุบหนับ
+หนุ่ม
+หนุ่มทั้งà¹à¸—่ง
+หนุ่มà¹à¸™à¹ˆà¸™
+หนุ่มเหน้า
+หนุ่ย
+หนู
+หนูตà¸à¸–ังข้าวสาร
+หนูติดจั่น
+หนูผี
+ห่ม
+หมà¸
+หมà¸à¸¡à¸¸à¹ˆà¸™
+หมà¸à¹„หม้
+หมด
+หมดà¸à¸£à¸°à¹€à¸›à¹‹à¸²
+หมดà¸à¸±à¸™
+หมดเขต
+หมดเขี้ยวหมดงา
+หมดจด
+หมดตัว
+หมดตำรา
+หมดตูด
+หมดเนื้อหมดตัว
+หมดบุà¸
+หมดประตู
+หมดเปลือà¸
+หมดพà¸
+หมดพุง
+หมดรูป
+หมดไส้หมดพุง
+ห่มดอง
+หมดอายุ
+หมดอาลัย
+หมดอาลัยตายอยาà¸
+หมดอาลัยไยดี
+หม่น
+หม่นหมอง
+หม่นไหม้
+หมวà¸
+หมวà¸à¸à¸°à¹‚ล่
+หมวà¸à¹à¸à¹Šà¸›
+หมวà¸à¹à¸ˆà¸§
+หมวà¸à¸—รงหม้อตาล
+หมวà¸à¸™à¸´à¸£à¸ à¸±à¸¢
+หมวà¸à¸«à¸¹à¸à¸£à¸°à¸•à¹ˆà¸²à¸¢
+หมวด
+หมอ
+หม่อ
+หม้อ
+หมอà¸
+หม้อà¹à¸à¸‡
+หม้อà¹à¸à¸‡à¸„่าง
+หม้อà¹à¸à¸‡à¸¥à¸´à¸‡
+หมอขวัà¸
+หม้อข้าวหม้อà¹à¸à¸‡à¸¥à¸´à¸‡
+หมอความ
+หมอง
+หม่อง
+หมองใจ
+หมองมัว
+หมองหมาง
+หมอช้างเหยียบ
+หมอเฒ่า
+หมอดู
+หมอตาล
+หม้อตาล
+หมอตำà¹à¸¢
+หม้อทะนน
+หมอไทย
+หมอน
+หม่อน
+หมอนขวาน
+หมอนข้าง
+หมอนทอง
+หมอน้อย
+หม้อน้ำ
+หมอน้ำมัน
+หมอบ
+หมอบà¸à¸£à¸°à¹à¸•
+หมอบราบคาบà¹à¸à¹‰à¸§
+หม้อà¹à¸›à¸¥à¸‡
+หม้อà¹à¸›à¸¥à¸‡à¹„ฟ
+หมอผี
+หมอพัดโตนด
+หม่อม
+หม่อมเจ้า
+หม่อมฉัน
+หม่อมราชวงศ์
+หม่อมหลวง
+หม่อมห้าม
+หมอย
+หมอลำ
+หม้อหนู
+หม้อห้อม
+หมัà¸
+หมัà¸à¸«à¸¡à¸¡
+หมัด
+หมัน
+หมั่น
+หมั้น
+หมั่นไส้
+หมับ
+หมับๆ
+หมา
+หม่า
+หม้า
+หมาà¸
+หมาà¸à¹€à¸à¹‡à¸š
+หมาà¸à¸‚่วง
+หมาà¸à¹€à¸‚ียว
+หมาà¸à¹à¸‚้ง
+หมาà¸à¸„ัน
+หมาà¸à¸”ิบ
+หมาà¸à¹à¸”ง
+หมาà¸à¸—ัน
+หมาà¸à¸œà¸²à¸‡
+หมาà¸à¸œà¸¹à¹‰à¸«à¸¡à¸²à¸à¹€à¸¡à¸µà¸¢
+หมาà¸à¸à¸£à¸±à¹ˆà¸‡
+หมาà¸à¸¡à¹ˆà¸§à¸™
+หมาà¸à¸¡à¸²à¸¨
+หมาà¸à¹€à¸¡à¹ˆà¸²
+หมาà¸à¹€à¸¡à¹ˆà¸²à¸„วาย
+หมาà¸à¸¢à¸±à¸š
+หมาà¸à¹à¸¢à¸
+หมาà¸à¸£à¸¸à¸
+หมาà¸à¸¥à¸´à¸‡
+หมาà¸à¸ªà¸‡
+หมาà¸à¸«à¸™à¸²à¸¡
+หมาà¸à¸«à¸­à¸¡à¸„วาย
+หมาà¸à¹€à¸«à¸¥à¸·à¸­à¸‡
+หมาà¸à¸­à¸µà¹à¸›à¸°
+หมาà¸à¸®à¸­à¸ª
+หมาขี้ไม่มีใครยà¸à¸«à¸²à¸‡
+หมาง
+หมางใจ
+หมางเมิน
+หมาจิ้งจอà¸
+หมาด
+หมาใน
+หมาป่า
+หมามุ่ย
+หมามุ้ย
+หมาไม้
+หมาย
+หม้าย
+หมายà¸à¸³à¸«à¸™à¸”à¸à¸²à¸£
+หมายเà¸à¸“ฑ์
+หมายขัง
+หมายค้น
+หมายความ
+หมายจับ
+หมายจำคุà¸
+หมายใจ
+หมายตัว
+หมายตา
+หมายน้ำบ่อหน้า
+หมายปล่อย
+หมายมั่น
+หมายมั่นปั้นมือ
+หมายยา
+หมายเรียà¸
+หมายเลข
+หมายหัว
+หมายเหตุ
+หมายอาà¸à¸²
+หมาร่า
+หมาสองราง
+หมาหมู่
+หมาหยอà¸à¹„à¸à¹ˆ
+หมาหวงà¸à¹‰à¸²à¸‡
+หมาหัวเน่า
+หมาหางด้วน
+หมาเห่าใบตองà¹à¸«à¹‰à¸‡
+หม่ำ
+หม้ำ
+หม้ำตับ
+หมิ่น
+หมิ่นประมาท
+หมิ่นพระบรมเดชานุภาพ
+หมิ่นเหม่
+หมี
+หมี่
+หมีเหม็น
+หมึà¸
+หมืน
+หมื่น
+หมุด
+หมุน
+หมุนเงิน
+หมุนเวียน
+หมุบ
+หมุบหมับ
+หมุบหมิบ
+หมุ่ย
+หมุยขาว
+หมู
+หมู่
+หมูเขาจะหามเอาคานเข้าไปสอด
+หมูà¹à¸”ง
+หมูตั้ง
+หมูเทโพ
+หมูน้ำ
+หมูà¹à¸™à¸¡
+หมูในเล้า
+หมูในอวย
+หมูป่า
+หมูไปไà¸à¹ˆà¸¡à¸²
+หมูà¹à¸œà¹ˆà¸™
+หมูยอ
+หมูสนาม
+หมูสามชั้น
+หมูสี
+หมูหย็อง
+หมูหริ่ง
+หมูหรึ่ง
+หมูหัน
+หมูà¹à¸®à¸¡
+หย-
+หยà¸
+หยà¸à¹†
+หย่ง
+หย่งๆ
+หยด
+หยดย้อย
+หยวà¸
+หยวบ
+หยวบๆ
+หยอà¸
+หยอà¸à¹€à¸¢à¹‰à¸²
+หย็อà¸à¸«à¸¢à¹‡à¸­à¸¢
+หยอà¸à¹€à¸­à¸´à¸™
+หย็อง
+หย่อง
+หย่องๆ
+หย็องà¸à¸£à¸­à¸”
+หย็องà¹à¸«à¸¢à¹‡à¸‡
+หยอด
+หยอดหลุม
+หยอน
+หย่อน
+หย่อนใจ
+หย่อนอารมณ์
+หย่อม
+หย็อมà¹à¸«à¸¢à¹‡à¸¡
+หย็อย
+หย่อย
+หยัà¸
+หยัà¸à¹„ย่
+หยัà¸à¸£à¸±à¹‰à¸‡
+หยัà¸à¸¨à¸
+หยัà¸à¹€à¸«à¸¢à¸²
+หยัง
+หยั่ง
+หยั่งทราบ
+หยั่งรู้
+หยั่งเสียง
+หยังหยัง
+หยัด
+หยัน
+หยับ
+หยับๆ
+หยั่วเมือง
+หย่า
+หยาà¸à¹€à¸¢à¸·à¹ˆà¸­
+หยาà¸à¹„ย่
+หย่าà¸à¸±à¸™
+หยาด
+หยาดน้ำค้าง
+หยาดน้ำฟ้า
+หย่านม
+หยาบ
+หยาบคาย
+หยาบช้า
+หยาบหยาม
+หยาม
+หยามน้ำหน้า
+หยาว
+หย้าว
+หยำเป
+หยำเหยอะ
+หยำà¹à¸«à¸¢à¸°
+หยิà¸
+หยิà¸à¹à¸à¸¡à¸«à¸¢à¸­à¸
+หยิà¸à¸«à¸¢à¹‡à¸­à¸‡
+หยิ่ง
+หยิบ
+หยิบผิด
+หยิบยà¸
+หยิบยืม
+หยิบหย่ง
+หยิมๆ
+หยี
+หยี่
+หยุ
+หยุà¸à¸«à¸¢à¸´à¸
+หยุด
+หยุดหย่อน
+หยุ่น
+หยุบๆ
+หยุมหยิม
+หยูà¸à¸¢à¸²
+หโยดม
+หร
+หรคุณ
+หรณ
+หรดาล
+หรดาลà¸à¸¥à¸µà¸šà¸—อง
+หรดาลà¹à¸”ง
+หรดี
+หรบๆ
+หรรษ-
+หรรษา
+หรอ
+หรอà¸
+หร็อมà¹à¸«à¸£à¹‡à¸¡
+หรอยๆ
+หระ
+หรับๆ
+หรัสว-
+หรัสวมูรดี
+หรัสวางค์
+หรา
+หริ
+หริคันธ์
+หริ่ง
+หริ่งๆ
+หริจันทน์
+หริณะ
+หริต
+หริตà¸à¸µ
+หริรัà¸à¸©à¹Œ
+หริวงศ์
+หรี่
+หรีด
+หรีตà¸à¸µ
+หรือ
+หรุบๆ
+หรุบรู่
+หรุบหรู่
+หรุ่ม
+หรู
+หรูหรา
+หฤทย
+หฤทย์
+หฤทัย
+หฤทัย-
+หฤทัยà¸à¸¥à¸¡
+หฤทัยà¸à¸±à¸›à¸™à¹Œ
+หฤทัยà¸à¸±à¸¡à¸›à¹Œ
+หฤทัยปรีย์
+หฤทัยพันธน์
+หฤษฎ์
+หฤษฎี
+หฤหรรษ์
+หฤโหด
+หล
+หลง
+หลงà¸à¸¥
+หลงตา
+หลงลม
+หลงลืม
+หลงหูหลงตา
+หลงเหลือ
+หลงใหล
+หลด
+หลน
+หล่น
+หลบ
+หลบตา
+หลบà¸à¸²à¸
+หลบมุม
+หลบหน้า
+หลบหน้าหลบตา
+หลบหลังคา
+หล่ม
+หลวง
+หลวงจีน
+หลวม
+หลวมตัว
+หลอ
+หล่อ
+หลอà¸
+หลอà¸à¹†
+หลอà¸à¸¥à¸§à¸‡
+หลอà¸à¸¥à¹ˆà¸­
+หลอà¸à¸«à¸¥à¸­à¸™
+หลอด
+หลอดลม
+หลอดลมคอ
+หลอดลมà¸à¸­à¸¢
+หลอดเลือด
+หลอดอาหาร
+หลอน
+หล็อน
+หล็อนๆ
+หล่อน
+หลอม
+หลอมตัว
+หลอมละลาย
+หลอมเหลว
+หล่อลื่น
+หล่อเลี้ยง
+หล่อเหลา
+หละ
+หละหลวม
+หลัà¸
+หลัà¸à¸à¸²à¸£
+หลัà¸à¹€à¸à¸“ฑ์
+หลัà¸à¹à¸ˆà¸§
+หลัà¸à¸Šà¸±à¸¢
+หลัà¸à¸à¸²à¸™
+หลัà¸à¸•à¸­
+หลัà¸à¸—รัพย์
+หลัà¸à¸›à¸£à¸°à¸à¸±à¸™
+หลัà¸à¸žà¸¢à¸²à¸™
+หลัà¸à¸¥à¸­à¸¢
+หลัà¸à¸ªà¸¹à¸•à¸£
+หลัà¸à¹à¸«à¸¥à¹ˆà¸‡
+หลัà¸à¹à¸«à¸¥à¸¡
+หลัง
+หลั่ง
+หลังเขียว
+หลังคา
+หลังคาเรือน
+หลังจาà¸
+หลังฉาà¸
+หลังเต่า
+หลังยาว
+หลั่งไหล
+หลัดๆ
+หลั่น
+หลับ
+หลับตา
+หลับนà¸
+หลับใน
+หลัว
+หลา
+หล้า
+หลาà¸
+หลาà¸à¹ƒà¸ˆ
+หลาà¸à¸«à¸¥à¸²à¸¢
+หลาท
+หลาน
+หลาบ
+หลาบจำ
+หลาม
+หลาย
+หลายเติบ
+หลายหลาà¸
+หลายà¹à¸«à¸¥à¹ˆ
+หลาว
+หลาวเหล็à¸
+หลาหล
+หลิà¸
+หลิ่ง
+หลิท
+หลิน
+หลิม
+หลิว
+หลิ่ว
+หลิ่วตา
+หลี
+หลีà¸
+หลีโà¸
+หลีบ
+หลีฮื้อ
+หลืบ
+หลุà¸à¸«à¸¥à¸´à¸
+หลุด
+หลุดปาà¸
+หลุดพ้น
+หลุดมือ
+หลุดลอย
+หลุดลุ่ย
+หลุนๆ
+หลุบ
+หลุบลู่
+หลุม
+หลุมโจน
+หลุมพราง
+หลุมพอ
+หลุมพี
+หลุมหลบภัย
+หลุมอาà¸à¸²à¸¨
+หลู่
+หลู่หลี่
+หวง
+ห่วง
+ห้วง
+หวงà¸à¹‰à¸²à¸‡
+ห่วงใย
+หวงห้าม
+หวงà¹à¸«à¸™
+หวด
+หวน
+ห้วน
+ห้วนๆ
+หวนคำนึง
+หวย
+ห้วย
+หวอ
+หวอด
+หว็อยๆ
+หวะ
+หวัง
+หวัด
+หวัดๆ
+หวั่น
+หวันยิหวา
+หวั่นหวาด
+หวั่นไหว
+หวัว
+หวัวร่อ
+หวัวเราะ
+หวา
+หว่า
+หว้า
+หวาà¸
+หว่าง
+หวาด
+หวาดระà¹à¸§à¸‡
+หวาดเสียว
+หวาดหวั่น
+หวาดไหว
+หวาน
+หว่าน
+หวานคอà¹à¸£à¹‰à¸‡
+หว่านล้อม
+หวาม
+หวาย
+หวายดิน
+หวายตะมอย
+หวำ
+หวิด
+หวิว
+หวี
+หวี่
+หวีด
+หวือ
+หวุดหวิด
+หวุม
+หวูด
+หสน-
+หอ
+ห่อ
+ห้อ
+หอà¸
+หอà¸à¸‚้างà¹à¸„ร่
+หอà¸à¸‹à¸±à¸”
+หอà¸à¸²à¸£à¸„้า
+หอคอย
+หอคำ
+หอง
+ห้อง
+ห้องเครื่อง
+ห้องชุด
+ห้องà¹à¸–ว
+ห้องน้ำ
+ห้องสมุด
+หอจดหมายเหตุ
+ห่อตัว
+หอไตร
+หอน
+ห่อน
+หอบ
+หอบหิ้ว
+หอบหืด
+หอบังคับà¸à¸²à¸£
+หอประชุม
+หอพัà¸
+หอม
+ห้อม
+หอมà¸à¸£à¸²à¸¢
+หอมขาว
+หอมจันทร์
+หอมà¹à¸”ง
+หอมเตียม
+หอมป้อม
+หอมà¹à¸›à¹‰à¸™
+ห้อมเมือง
+หอมยับ
+ห้อมล้อม
+หอมหวน
+หอย
+ห้อย
+หอยโข่ง
+ห้อยท้าย
+หอยปาà¸à¹€à¸›à¹‡à¸”
+หอยà¹à¸›à¸”เà¸à¸¥à¹‡à¸”
+หอยเม่น
+ห้อยโหน
+หอสมุด
+ห่อหมà¸
+ห่อเหี่ยว
+ห่อà¹à¸«à¹ˆ
+ห้อà¹à¸«à¹‰
+หะ
+หะยี
+หะà¹à¸£à¸
+หะหาย
+หะห้าย
+หะà¹à¸«à¹‰à¸™
+หัà¸
+หัà¸à¸à¸¥à¸šà¸¥à¸šà¸«à¸™à¸µà¹‰
+หัà¸à¸„อ
+หัà¸à¹ƒà¸ˆ
+หัà¸à¸”้ามพร้าด้วยเข่า
+หัà¸à¸—องขวาง
+หัà¸à¸šà¸±à¸à¸Šà¸µ
+หัà¸à¸¡à¸¸à¸
+หัà¸à¸£à¸²à¸„า
+หัà¸à¸£à¹‰à¸²à¸‡
+หัà¸à¹à¸£à¸‡
+หัà¸à¸¥à¹‰à¸²à¸‡
+หัà¸à¸¥à¸³
+หัà¸à¸«à¸™à¹‰à¸²
+หัà¸à¸«à¸¥à¸±à¸‡
+หัà¸à¸«à¸²à¸
+หัà¸à¸«à¹‰à¸²à¸¡
+หัà¸à¹€à¸«
+หัà¸à¹‚หม
+หัà¸à¸­à¸
+หัà¸à¸­à¸à¸«à¸±à¸à¹ƒà¸ˆ
+หังส-
+หัจà¸à¹Œ
+หัจà¸à¸µ
+หัช
+หัà¸à¸à¸°
+หัด
+หัดเยอรมัน
+หัต
+หัตถ-
+หัตถ์
+หัตถà¸à¸£à¸£à¸¡
+หัตถà¸à¸²à¸£
+หัตถà¸à¸´à¸ˆ
+หัตถบาส
+หัตถพันธ์
+หัตถศิลป์
+หัตถศึà¸à¸©à¸²
+หัตถาจารย์
+หัตถานึà¸
+หัตถาภรณ์
+หัตถาโรหะ
+หัตถาลังà¸à¸²à¸£
+หัตถินี
+หัตถี
+หัน
+หั่น
+หั้น
+หันตรา
+หันตา
+หันรีหันขวาง
+หันหน้าเข้าหาà¸à¸±à¸™
+หันหลังให้à¸à¸±à¸™
+หันเห
+หั่นà¹à¸«à¸¥à¸
+หันอาà¸à¸²à¸¨
+หับ
+หับเผย
+หัมมียะ
+หัย
+หัว
+หัวà¸à¸£à¸°à¹€à¸”็น
+หัวà¸à¸£à¸°à¹„ดไม่à¹à¸«à¹‰à¸‡
+หัวà¸à¸£à¸°à¸ªà¸¸à¸™
+หัวà¸à¹Šà¸­à¸
+หัวà¸à¸°à¸—ิ
+หัวà¸à¹ˆà¸²à¸¢à¸—้ายเà¸à¸¢
+หัวà¸à¸¸à¸à¹à¸ˆ
+หัวเà¸à¹ˆà¸²
+หัวà¹à¸à¹‰à¸§à¸«à¸±à¸§à¹à¸«à¸§à¸™
+หัวขโมย
+หัวขวาน
+หัวข้อ
+หัวขั้ว
+หัวขาด
+หัวขี้à¹à¸•à¹‰
+หัวขี้หมา
+หัวเข้า
+หัวà¹à¸‚็ง
+หัวโขน
+หัวคว่ำ
+หัวคะà¹à¸™à¸™
+หัวค่ำ
+หัวคิด
+หัวใคร่
+หัวงอน
+หัวงาน
+หัวเงิน
+หัวเงื่อน
+หัวโจà¸
+หัวใจ
+หัวชนà¸à¸³à¹à¸žà¸‡
+หัวชนà¸à¸²
+หัวซุà¸à¸«à¸±à¸§à¸‹à¸¸à¸™
+หัวซุน
+หัวด้วน
+หัวดาวหัวเดือน
+หัวดื้อ
+หัวเด็ดตีนขาด
+หัวเดียวà¸à¸£à¸°à¹€à¸—ียมลีบ
+หัวต่อ
+หัวตะà¸à¸±à¹ˆà¸§
+หัวตะคาà¸
+หัวตะโหงà¸
+หัวเต่า
+หัวเตาไฟ
+หัวถอà¸
+หัวเถิà¸
+หัวที
+หัวเทียน
+หัวเทียม
+หัวนà¸à¸à¸£à¸°à¸ˆà¸­à¸
+หัวนม
+หัวนอà¸
+หัวนอน
+หัวนอนปลายตีน
+หัวน้ำ
+หัวน้ำขึ้น
+หัวน้ำลง
+หัวเนื้อ
+หัวเนื้อทราย
+หัวบัว
+หัวเบี้ย
+หัวโบราณ
+หัวปลวà¸
+หัวปลี
+หัวปัà¸à¸«à¸±à¸§à¸›à¸³
+หัวปั่น
+หัวป่า
+หัวปาà¸
+หัวปี
+หัวพัน
+หัวพุงหัวมัน
+หัวฟืนหัวไฟ
+หัวมังà¸à¸¸à¸—้ายมังà¸à¸£
+หัวมัน
+หัวเม็ด
+หัวเมือง
+หัวà¹à¸¡à¹ˆà¸•à¸µà¸™
+หัวà¹à¸¡à¹ˆà¹€à¸—้า
+หัวà¹à¸¡à¹ˆà¸¡à¸·à¸­
+หัวà¹à¸¡à¸¥à¸‡à¸§à¸±à¸™
+หัวไม้
+หัวไม่วางหางไม่เว้น
+หัวรอ
+หัวร่อ
+หัวร้อยรู
+หัวระà¹à¸«à¸‡
+หัวรัà¸à¸«à¸±à¸§à¹ƒà¸„ร่
+หัวรั้น
+หัวราน้ำ
+หัวรุนà¹à¸£à¸‡
+หัวเราะ
+หัวเรี่ยวหัวà¹à¸£à¸‡
+หัวเรื่อง
+หัวเรือใหà¸à¹ˆ
+หัวà¹à¸£à¸‡
+หัวà¹à¸£à¹‰à¸‡
+หัวลม
+หัวล้าน
+หัวลิง
+หัวเลี้ยว
+หัวเลี้ยวหัวต่อ
+หัวโล้น
+หัวว่าว
+หัวสำเภา
+หัวสูง
+หัวเสีย
+หัวไส้
+หัวหà¸à¸à¹‰à¸™à¸‚วิด
+หัวหงอà¸
+หัวหด
+หัวหน้า
+หัวหน่าว
+หัวหมอ
+หัวหมื่น
+หัวหมุน
+หัวหมู
+หัวหลัà¸à¸«à¸±à¸§à¸•à¸­
+หัวหาด
+หัวหายตะพายขาด
+หัวเห็ด
+หัวà¹à¸«à¸¥à¸¡
+หัวà¹à¸«à¸§à¸™
+หัวใหม่
+หัวไหล่
+หัวอà¸
+หัวออà¸
+หัวอ่อน
+หัส
+หัสดิน
+หัสดี
+หัสต
+หัสต์
+หัสตะ
+หา
+ห่า
+ห้า
+หาà¸
+หาà¸à¸§à¹ˆà¸²
+หาà¸à¸´à¸™
+ห่าà¸à¸´à¸™
+หาความ
+หาค่ามิได้
+หาง
+ห่าง
+ห้าง
+หางà¸à¸£à¸°à¹€à¸šà¸™
+หางà¸à¸£à¸°à¸£à¸­à¸
+หางà¸à¸£à¸°à¸«à¸¡à¸§à¸”
+หางà¸à¸£à¸²à¸¢
+หางà¸à¸°à¸¥à¸§à¸¢
+หางà¸à¸°à¸¥à¸§à¸¢à¹„à¸à¹ˆ
+หางà¸à¸±à¸‡à¸«à¸±à¸™
+หางà¸à¸´à¹ˆà¸§
+หางà¹à¸à¸¥à¸°
+หางไà¸à¹ˆ
+หางขมวด
+หางขอด
+หางข้าว
+หางà¹à¸‚็ง
+หางค้อ
+หางเครื่อง
+หางจระเข้
+หางจิ้งเหลน
+หางช้าง
+หางเต่า
+หางà¹à¸–ว
+หางนà¸à¸à¸°à¸¥à¸´à¸‡
+หางนà¸à¸¢à¸¹à¸‡
+หางนà¸à¸¢à¸¹à¸‡à¸à¸£à¸±à¹ˆà¸‡
+หางนาค
+หางปลา
+หางเปีย
+หางà¹à¸žà¸™
+หางà¹à¸¡à¸‡à¸›à¹ˆà¸­à¸‡
+หางยาม
+หางยาว
+หางเลข
+หางว่าว
+หางสิงห์
+หางเสียง
+หางเสือ
+หางหงส์
+หางหนู
+ห้างหุ้นส่วน
+ห้างหุ้นส่วนจำà¸à¸±à¸”
+ห้างหุ้นส่วนสามัà¸
+ห่างเห
+ห่างเหิน
+หางไหล
+หางไหลà¹à¸”ง
+หางไหลเผือà¸
+หาเงิน
+หาเช้าà¸à¸´à¸™à¸„่ำ
+หาà¸
+หาด
+หาดà¸
+หาตà¸
+หาตัวจับยาà¸
+ห้าà¹à¸•à¹‰à¸¡
+หาน
+ห่าน
+หาบ
+หาบมิได้
+หาบเร่
+หาบหลวง
+หาม
+ห่าม
+ห้าม
+ห้ามà¸à¸²à¸•à¸´
+ห้ามทัพ
+ห้ามปราม
+ห้ามเปลี่ยนมือ
+ห้ามพระà¹à¸à¹ˆà¸™à¸ˆà¸±à¸™à¸—น์
+หามรอà¸
+หามรุ่งหามค่ำ
+ห้ามล้อ
+ห้ามเลือด
+หามà¹à¸¥à¹ˆà¸™
+ห้ามสมุทร
+หามิได้
+หาไม่
+หาไม่à¸à¹‡
+หาย
+หายà¸à¸±à¸™
+หายขาด
+หายเข้าà¸à¸¥à¸µà¸šà¹€à¸¡à¸†
+หายใจ
+หายใจไม่ทั่วท้อง
+หายตัว
+หายนะ
+หายหà¸à¸•à¸à¸«à¸¥à¹ˆà¸™
+หายหน้า
+หายห่วง
+หายหัว
+หาร
+หารร่วมมาà¸
+หาริ
+หาริน
+หารี
+หารือ
+หาเรื่อง
+ห่าลง
+หาลิท
+หาเลือดà¸à¸±à¸šà¸›à¸¹
+หาว
+ห้าว
+หาวนอน
+ห้าวหาà¸
+หาเศษหาเลย
+หาส
+หาสà¸
+หาสยะ
+หาสู่
+หาเสียง
+หาห่วงมาคล้องคอ
+หาเหตุ
+หำ
+ห้ำ
+ห้ำหัà¸
+ห้ำหั่น
+หิ้ง
+หิงคุ
+หิงสา
+หิงห้อย
+หิ่งห้อย
+หิ่งหาย
+หิด
+หิต
+หิต-
+หิตà¸à¸£
+หิตประโยชน์
+หิตพจน์
+หิตวจนะ
+หิตานุหิตประโยชน์
+หิน
+หิน-
+หินงอà¸
+หินชนวน
+หินชั้น
+หินชาติ
+หินดินดาน
+หินดินสอพอง
+หินตะà¸à¸­à¸™
+หินตับเป็ด
+หินทราย
+หินน้ำมัน
+หินปูน
+หินà¹à¸›à¸£
+หินà¸à¸™à¸—อง
+หินย้อย
+หินยาน
+หินà¹à¸¥à¸‡
+หินสบู่
+หินโสโครà¸
+หินหนืด
+หินอ่อน
+หินอัคนี
+หิม-
+หิมพาน
+หิมพานต์
+หิมวัต
+หิมวันต์
+หิมวา
+หิมวาต
+หิมวาน
+หิมวาส
+หิมเวศ
+หิมะ
+หิมาลัย
+หิรัà¸
+หิรัà¸-
+หิรัà¸à¸à¸´à¸à¸²à¸£à¹Œ
+หิรัà¸à¸šà¸±à¸
+หิรัณย-
+หิรัณย์
+หิรัณยà¸à¸²à¸£
+หิรัณยเà¸à¸¨
+หิรัณยรัศมี
+หิริ
+หิริโอตตัปปะ
+หิว
+หิ้ว
+หิ้วท้อง
+หิ้วปีà¸
+หี
+หีด
+หีตา
+หีเต่า
+หีน-
+หีนยาน
+หีบ
+หีบชัà¸
+หีบเชิงชาย
+หีบà¸à¹‰à¸²à¸¢
+หีบพระมาลัย
+หีบเพลง
+หีบเพลงชัà¸
+หีบเพลงปาà¸
+หีบสไบ
+หีบเสียง
+หีบห่อ
+หึๆ
+หึง
+หึ่ง
+หึ่งๆ
+หึงส-
+หึงสา
+หืด
+หืน
+หื่น
+หื่นหรรษ์
+หือ
+หื้อ
+หือไม่ขึ้น
+หือรือโหด
+หุง
+หุงข้าวประชดหมา
+หุต-
+หุตโà¸à¸§à¸´à¸—
+หุตาจารย์
+หุน
+หุ่น
+หุ้น
+หุ้นà¸à¸¹à¹‰
+หุ่นนิ่ง
+หุ้นบุริมสิทธิ
+หุ่นพยนต์
+หุ้นลม
+หุ่นไล่à¸à¸²
+หุ้นส่วน
+หุนหัน
+หุนหันพลันà¹à¸¥à¹ˆà¸™
+หุบ
+หุบเขา
+หุบปาà¸
+หุบผา
+หุบเหว
+หุ้ม
+หุ้มà¸à¸¥à¸­à¸‡
+หุ้มà¹à¸œà¸¥à¸‡
+หุ้มà¹à¸žà¸£
+หุ้ยหุย
+หุยฮา
+หุรัม
+หุหนิงหงัน
+หู
+หู่
+หูà¸
+หูà¸à¸£à¸°à¸•à¹ˆà¸²à¸¢
+หูà¸à¸§à¸²à¸‡
+หูà¹à¸ˆà¸§
+หูฉลาม
+หูฉี่
+หูชอง
+หูช้าง
+หูด
+หูดับตับไหม้
+หูตาสว่าง
+หูติ
+หูตึง
+หูตูบ
+หูทวนลม
+หูเบา
+หูปลาช่อน
+หูป่าตาเถื่อน
+หูผีจมูà¸à¸¡à¸”
+หูผึ่ง
+หูรูด
+หูไว
+หูไวตาไว
+หูเสือ
+หูหนาตาโต
+หูหนาตาเล่อ
+หูหนู
+หู่หี่
+หูไห
+เห
+เห่
+เหง
+เหง่ง
+เหงา
+เหง้า
+เหงาหงอย
+เหงื่อ
+เหงือà¸
+เหงือà¸à¸›à¸¥à¸²à¸«à¸¡à¸­
+เหงื่อà¸à¸²à¸¬
+เห็จ
+เห็ด
+เห็ดโคน
+เห็ดหลุบ
+เหติ
+เหตุ
+เหตุà¸à¸²à¸£à¸“์
+เหตุผล
+เหตุสุดวิสัย
+เห็น
+เห็นà¸à¸‡à¸ˆà¸±à¸à¸£à¹€à¸›à¹‡à¸™à¸”อà¸à¸šà¸±à¸§
+เห็นà¹à¸à¹ˆ
+เห็นà¹à¸à¹ˆà¸«à¸™à¹‰à¸²
+เห็นขี้ดีà¸à¸§à¹ˆà¸²à¹„ส้
+เห็นเขาขึ้นคานหาม เอามือประสานà¸à¹‰à¸™
+เหน่ง
+เหนงนายพราน
+เห็นจะ
+เห็นใจ
+เห็นช้างขี้ ขี้ตามช้าง
+เหน็ด
+เหน็ดเหนื่อย
+เห็นดำเห็นà¹à¸”ง
+เห็นดี
+เหน็บ
+เหน็บชา
+เหน็บà¹à¸™à¸¡
+เห็นหน้าเห็นหลัง
+เหน่อ
+เห็นอ้ม
+เหนอะ
+เหนอะหนะ
+เหน้า
+เหนาะๆ
+เหนียง
+เหนี่ยง
+เหนียงนà¸à¸à¸£à¸°à¸—ุง
+เหนี่ยน
+เหนียม
+เหนียว
+เหนี่ยว
+เหนี่ยวนำà¹à¸¡à¹ˆà¹€à¸«à¸¥à¹‡à¸à¹„ฟฟ้า
+เหนียวà¹à¸™à¹ˆà¸™
+เหนี่ยวรั้ง
+เหนียวหนืด
+เหนียวหมา
+เหนือ
+เหนื่อย
+เหนื่อยหน่าย
+เห็บ
+เห็บน้ำ
+เหม
+เหม-
+เหม่
+เหม่ง
+เหม็น
+เหม็นเขียว
+เหม็นเบื่อ
+เหม็นเปรี้ยว
+เหมวดี
+เหม่อ
+เหมันต-
+เหมันต์
+เหมา
+เหมายัน
+เหมาะ
+เหมาะเจาะ
+เหมาะสม
+เหมาะเหม็ง
+เหมียว
+เหมี่ยว
+เหมือง
+เหมืองà¸à¸²à¸¢
+เหมือด
+เหมือดคน
+เหมือดโลด
+เหมือน
+เหมือนà¸à¸±à¸š
+เหมือนว่า
+เหมือนหนึ่งว่า
+เหมื่อย
+เหมื่อยๆ
+เหย
+เหยเà¸
+เหยง
+เหย่อย
+เหยา
+เหย่า
+เหย่าๆ
+เหย้า
+เหยาะ
+เหยาะๆ
+เหยาะà¹à¸«à¸¢à¸°
+เหยิง
+เหยิบๆ
+เหยียด
+เหยียดผิว
+เหยียดหยาม
+เหยียบ
+เหยียบขี้ไà¸à¹ˆà¹„ม่à¸à¹ˆà¸­
+เหยียบจมูà¸
+เหยียบย่ำ
+เหยียบเรือสองà¹à¸„ม
+เหยี่ยว
+เหยี่ยวข่าว
+เหยื่อ
+เหยือà¸
+เหรัà¸à¸à¸´à¸
+เหรา
+เหราเล่นน้ำ
+เหราะๆ
+เหรียà¸
+เหรียà¸à¸à¸£à¸°à¸©à¸²à¸›à¸“์
+เห่เรือ
+เหล่
+เหล็à¸
+เหล็à¸à¸à¸¥à¹‰à¸²
+เหล็à¸à¸à¸¥à¹‰à¸²à¹„ม่เป็นสนิม
+เหล็à¸à¹ƒà¸™
+เหล็à¸à¸žà¸·à¸”
+เหล็à¸à¸§à¸´à¸¥à¸²à¸”
+เหล็à¸à¸ªà¹ˆà¸‡
+เหล็à¸à¹€à¸ªà¹‰à¸™
+เหล็à¸à¸«à¸¡à¸²à¸”
+เหล็à¸à¸«à¸¥à¹ˆà¸­
+เหล็à¸à¹€à¸«à¸™à¸µà¸¢à¸§
+เหล็à¸à¹„หล
+เหลน
+เหลว
+เหลวà¹à¸«à¸¥à¸
+เหลวไหล
+เหลอ
+เหลา
+เหล่า
+เหล้า
+เหล่าà¸à¸­
+เหลาชะโอน
+เหลาหลà¸
+เหล้าà¹à¸«à¹‰à¸‡
+เหลาะà¹à¸«à¸¥à¸°
+เหลิง
+เหลิงเจิ้ง
+เหลียน
+เหลี่ยม
+เหลี่ยมคู
+เหลี่ยมลูà¸à¸šà¸²à¸¨à¸à¹Œ
+เหลียว
+เหลียวà¹à¸¥
+เหลียวหลัง
+เหลือ
+เหลือà¸
+เหลือà¸à¸³à¸¥à¸±à¸‡
+เหลือเà¸à¸´à¸™
+เหลือขอ
+เหลือเข็à¸
+เหลือเข็น
+เหลือง
+เหลืองหางฟ้า
+เหลืองหิน
+เหลือใจ
+เหลือเชื่อ
+เหลือใช้
+เหลือทน
+เหลือบ
+เหลือบ่าà¸à¸§à¹ˆà¸²à¹à¸£à¸‡
+เหลือเฟือ
+เหลือม
+เหลื่อม
+เหลื่อมล้ำต่ำสูง
+เหลือมือ
+เหลือรับ
+เหลือร้าย
+เหลือล้น
+เหลือวิสัย
+เหลือสติà¸à¸³à¸¥à¸±à¸‡
+เหลือà¹à¸ªà¸™
+เหลือหลอ
+เหลือหลาย
+เหลือà¹à¸«à¸¥à¹ˆ
+เหลืออด
+เหลืออดเหลือทน
+เหว
+เหว่
+เหวง
+เหวทะเล
+เหวย
+เหวอะ
+เหวอะหวะ
+เหวี่ยง
+เหวี่ยงà¹à¸«
+เห่อ
+เห่อเหิม
+เหอะ
+เหอะน่า
+เหะ
+เหะหะ
+เหา
+เห่า
+เหาฉลาม
+เหาทะเล
+เหาน้ำ
+เหาไม้
+เหาะ
+เหิน
+เหินห่าง
+เหินเห่อ
+เหิม
+เหิมหาà¸
+เหิมห้าว
+เหิมฮึà¸
+เหี้ย
+เหียง
+เหียงà¸à¸£à¸²à¸”
+เหียน
+เหี้ยน
+เหียนราà¸
+เหี้ยม
+เหี้ยมเà¸à¸£à¸µà¸¢à¸¡
+เหี้ยมหาà¸
+เหี้ยมโหด
+เหี่ยว
+เหี่ยวà¹à¸«à¹‰à¸‡
+เหื่อ
+เหือด
+เหือดหาย
+เหือดà¹à¸«à¹‰à¸‡
+à¹à¸«
+à¹à¸«à¹ˆ
+à¹à¸«à¹‰
+à¹à¸«à¸
+à¹à¸«à¸à¸„อà¸
+à¹à¸«à¸à¸›à¸²à¸
+à¹à¸«à¸‡
+à¹à¸«à¸‡à¹ˆ
+à¹à¸«à¹ˆà¸‡
+à¹à¸«à¹‰à¸‡
+à¹à¸«à¸‡à¹à¸à¹‹
+à¹à¸«à¸‡à¹ˆà¸‡
+à¹à¸«à¸‡à¸™
+à¹à¸«à¸‡à¸™à¹€à¸•à¹ˆà¸­
+à¹à¸«à¸‡à¸™à¹€à¸–่อ
+à¹à¸«à¹‰à¸‡à¸œà¸²à¸
+à¹à¸«à¹‰à¸‡à¹à¸¥à¹‰à¸‡
+à¹à¸«à¹‰à¸‡à¹€à¸«à¸µà¹ˆà¸¢à¸§
+à¹à¸«à¹‰à¸‡à¹€à¸«à¸·à¸­à¸”
+à¹à¸«à¸™
+à¹à¸«à¹‰à¸™
+à¹à¸«à¸™à¸‡
+à¹à¸«à¸™à¸‡à¹ƒà¸ˆ
+à¹à¸«à¸™à¸‡à¸«à¸™à¹ˆà¸²à¸¢
+à¹à¸«à¸™à¸š
+à¹à¸«à¸™à¸¡
+à¹à¸«à¸š
+à¹à¸«à¸¡
+à¹à¸«à¸¡à¹ˆ
+à¹à¸«à¸¡à¹ˆà¸¡
+à¹à¸«à¸¡à¸°
+à¹à¸«à¸¢
+à¹à¸«à¸¢à¹ˆ
+à¹à¸«à¸¢à¸‡
+à¹à¸«à¸¢à¹ˆà¸‡
+à¹à¸«à¸¢à¸¡
+à¹à¸«à¸¢à¹‡à¸¡
+à¹à¸«à¸¢à¸°
+à¹à¸«à¸¢à¸°à¹†
+à¹à¸«à¸¥
+à¹à¸«à¸¥à¹ˆ
+à¹à¸«à¸¥à¸
+à¹à¸«à¸¥à¸à¸¥à¸²à¸
+à¹à¸«à¸¥à¸à¹€à¸«à¸¥à¸§
+à¹à¸«à¸¥à¹ˆà¸‡
+à¹à¸«à¸¥à¹ˆà¸‡à¹€à¸ªà¸·à¹ˆà¸­à¸¡à¹‚ทรม
+à¹à¸«à¸¥à¹ˆà¸‡à¸«à¸¥à¹‰à¸²
+à¹à¸«à¸¥à¸™
+à¹à¸«à¸¥à¹ˆà¸™à¸­à¸
+à¹à¸«à¸¥à¹ˆà¹ƒà¸™
+à¹à¸«à¸¥à¸¡
+à¹à¸«à¸¥à¸¡à¸«à¸¥à¸±à¸
+à¹à¸«à¸¥à¸°
+à¹à¸«à¸§
+à¹à¸«à¹‰à¸§
+à¹à¸«à¸§à¸
+à¹à¸«à¸§à¸à¹à¸™à¸§
+à¹à¸«à¸§à¹ˆà¸‡
+à¹à¸«à¸§à¸”
+à¹à¸«à¸§à¸™
+à¹à¸«à¸§à¸™à¸«à¸±à¸§
+à¹à¸«à¹‰à¸§à¸«à¸¡à¸¹
+à¹à¸«à¸§à¸°
+à¹à¸«à¹ˆà¸«à¹‰à¸­à¸¡
+à¹à¸«à¹ˆà¹à¸«à¸™
+à¹à¸«à¸°
+à¹à¸«à¸°à¹†
+โห่
+โหà¸
+โหง
+โหงพราย
+โหด
+โหดร้าย
+โหดเหี้ยม
+โหน
+โหนà¸
+โหนà¸à¹à¸à¹‰à¸¡
+โหน่ง
+โหม
+โหม-
+โหม่
+โหมà¸à¸£à¸£à¸¡
+โหมà¸à¸¹à¸“ฑ์
+โหม่ง
+โหมด
+โหมดเทศ
+โหมโรง
+โหมหัà¸
+โหมฮึà¸
+โหย
+โหยà¸à¹€à¸«à¸¢à¸
+โหยง
+โหย่ง
+โหย่งๆ
+โหยหวน
+โหยไห้
+โหร
+โหรง
+โหรงเหรง
+โหรดาจารย์
+โหระพา
+โหรา
+โหราà¸à¸£à¸°à¸šà¸·à¸­
+โหราเขาเนื้อ
+โหราจารย์
+โหราเดือยไà¸à¹ˆ
+โหราตีนหมา
+โหราเท้าสุนัข
+โหราบอน
+โหราศาสตร์
+โหล
+โหล่
+โหลงโจ้ง
+โหว
+โหว่
+โหว้
+โหวà¸à¹€à¸«à¸§à¸
+โหวง
+โหวงเหวง
+โหวด
+โหวต
+ให้
+ให้à¸à¸²à¸£
+ใหà¸à¹ˆ
+ให้โดยเสน่หา
+ให้ท่า
+ให้ท้าย
+ใหม่
+ใหม่ถอดด้าม
+ใหม่เอี่ยม
+ให้ร้าย
+ให้ร้ายป้ายสี
+ให้สัตยาบัน
+ให้หา
+ให้อภัย
+ให้ออà¸
+ไห
+ไห่
+ไห้
+ไหซอง
+ไหน
+ไหปลาร้า
+ไหม
+ไหม้
+ไหมทอง
+ไหมสับปะรด
+ไหรณย์
+ไหล
+ไหล่
+ไหล่เขา
+ไหล่ถนน
+ไหล่ทวีป
+ไหล่ทาง
+ไหลน้ำ
+ไหล่รวบ
+ไหว
+ไหวๆ
+ไหว้
+ไหว้ครู
+ไหว้เจ้า
+ไหวตัว
+ไหวติง
+ไหวทัน
+ไหว้ผี
+ไหวพริบ
+ไหว้วาน
+ไหหลำ
+ฬ
+อ
+อà¸
+อà¸à¹„à¸à¹ˆ
+อà¸à¸„ราà¸
+อà¸à¸•à¸±à¹‰à¸‡
+อà¸à¸•à¸±à¸à¸à¸¸à¸•à¸²
+อà¸à¸•à¸±à¸à¸à¸¹
+อà¸à¹€à¸•à¹ˆà¸²
+อà¸à¹à¸•à¸
+อà¸à¸—ะเล
+อà¸à¸™à¸´à¸©à¸à¹Œ
+อà¸à¹€à¸¡à¸·à¸­à¸‡
+อà¸à¸£à¸“ีย์
+อà¸à¸£à¸£à¸¡à¸à¸£à¸´à¸¢à¸²
+อà¸à¸£à¸§à¸š
+อà¸à¸£à¹ˆà¸­à¸‡
+อà¸à¹‚รย
+อà¸à¹€à¸¥à¸²
+อà¸à¸«à¸±à¸
+อà¸à¸±à¸›à¸›à¸´à¸¢-
+อà¸à¸±à¸›à¸›à¸´à¸¢à¸§à¸±à¸•à¸–ุ
+อà¸à¸±à¸›à¸›à¸´à¸¢à¹‚วหาร
+อà¸à¸±à¸›à¸›à¸´à¸¢à¸°
+อà¸à¸¸à¸¨à¸¥
+อà¸à¸¸à¸¨à¸¥-
+อà¸à¸¸à¸¨à¸¥à¸à¸£à¸£à¸¡
+อà¸à¸¸à¸¨à¸¥à¸à¸£à¸£à¸¡à¸šà¸–
+อà¸à¸¸à¸¨à¸¥à¹€à¸ˆà¸•à¸™à¸²
+อà¸à¸¸à¸¨à¸¥à¸¡à¸¹à¸¥
+อคติ
+อคเนสัน
+อคาธ
+อคาร-
+อฆ
+อโฆษะ
+อง
+องà¸à¹Œ
+องค-
+องค์
+องค์à¸à¸à¸´à¸™
+องค์à¸à¸£
+องค์à¸à¸²à¸£
+องค์à¸à¸²à¸£à¸ªà¸«à¸›à¸£à¸°à¸Šà¸²à¸Šà¸²à¸•à¸´
+องคชาต
+องค์ประà¸à¸­à¸š
+องค์ประชุม
+องคมนตรี
+องคมรรษ
+องครัà¸à¸©à¹Œ
+องควิà¸à¸²à¸£
+องควิเà¸à¸©à¸›
+องควิทยา
+องคาพยพ
+องคุล
+องคุลี
+องศ์
+องศา
+องอาจ
+องุ่น
+อจร
+อจล-
+อจลา
+อจิตติ
+อจินตา
+อจินไตย
+อจิร-
+อจิระ
+อเจลà¸
+อเจละ
+อช
+อชา
+อชิน
+อชินี
+อชิร
+อà¸à¸§à¸µ
+อณิ
+อณุ
+อณู
+อโณทัย
+อด
+อดà¸à¸¥à¸±à¹‰à¸™
+อดใจ
+อดตาหลับขับตานอน
+อดทน
+อดนม
+อดเปรี้ยวไว้à¸à¸´à¸™à¸«à¸§à¸²à¸™
+อดสู
+อดà¹à¸«à¹‰à¸‡à¸­à¸”à¹à¸¥à¹‰à¸‡
+อดอยาà¸
+อดออม
+อดิ
+อดิถี
+อดิเทพ
+อดิเรà¸
+อดิเรà¸-
+อดิเรà¸à¸¥à¸²à¸ 
+อดิศร
+อดิศวร
+อดิศัย
+อดีต
+อดีต-
+อดีตà¸à¸²à¸¥
+อดีตชาติ
+อดีตภพ
+อดีตสมัย
+อดุล
+อดุลย-
+อดุลย์
+อติ
+อติชาต
+อติชาต-
+อติชาตบุตร
+อติมานะ
+อติราช
+อติเรà¸
+อติเรà¸-
+อติเรà¸à¸ˆà¸µà¸§à¸£
+อติเรà¸à¸¥à¸²à¸ 
+อติสาร
+อถรรพเวท
+อทระ
+อทินนาทาน
+อทินนาทายี
+อธรรม
+อธิ
+อธิà¸-
+อธิà¸à¸¡à¸²à¸ª
+อธิà¸à¸£à¸“์
+อธิà¸à¸§à¸²à¸£
+อธิà¸à¸ªà¸¸à¸£à¸—ิน
+อธิà¸à¸²à¸£
+อธิà¸à¸²à¸£à¸šà¸”ี
+อธิคม
+อธิà¸à¸à¸²à¸™
+อธิบดี
+อธิบาย
+อธิป
+อธิป-
+อธิปไตย
+อธิมาตร
+อธิมุตติ
+อธิโมà¸à¸‚์
+อธิราช
+อธิวาส
+อธิวาสนะ
+อธิศีล
+อธิษà¸à¸²à¸™
+อธึà¸
+อน-
+อ้น
+อนงค-
+อนงค์
+อนงคณะ
+อนงคเลข
+อนงคเลขา
+อนธ-
+อนธà¸à¸²à¸£
+อนนต์
+อนยะ
+อนรรฆ
+อนรรถ
+อนล
+อนวัช
+อนวัช-
+อ้นอ้อ
+อนัà¸
+อนัà¸-
+อนัà¸à¸„ติ
+อนัà¸à¸ªà¸²à¸˜à¸²à¸£à¸“์
+อนัตตา
+อนัตถ-
+อนันต-
+อนันต์
+อนันตร-
+อนันตริยà¸à¸£à¸£à¸¡
+อนัม
+อนาà¸à¸¹à¸¥
+อนาคต
+อนาคต-
+อนาคตà¸à¸²à¸¥
+อนาคามิผล
+อนาคามิมรรค
+อนาคามี
+อนาจาร
+อนาถ
+อนาถา
+อนาทร
+อนาธิปไตย
+อนามัย
+อนารย-
+อนารยชน
+อนารยธรรม
+อนารยะ
+อนาลัย
+อนำ
+อนิจ
+อนิจ-
+อนิจà¸à¸£à¸£à¸¡
+อนิจจัง
+อนิจจา
+อนิà¸à¸à¸²à¸£à¸¡à¸“์
+อนิยต
+อนิยม
+อนิยม-
+อนิล
+อนิล-
+อนิลบถ
+อนิวรรต
+อนิวรรตน์
+อนิษà¸à¹Œ
+อนีà¸-
+อนีà¸à¸—รรศนะ
+อนีà¸à¸—ัศนะ
+อนีà¸à¸°
+อนีà¸à¸±à¸
+อนีจ
+อนึà¸
+อนึ่ง
+อนุ
+อนุà¸à¸£
+อนุà¸à¸£à¸¡
+อนุà¸à¸£à¸£à¸¡à¸à¸²à¸£
+อนุà¸à¸£à¸°à¹€à¸šà¸µà¸¢à¸”
+อนุà¸à¸²à¸Šà¸²à¸”
+อนุà¸à¸²à¸£
+อนุà¸à¸¹à¸¥
+อนุคามิà¸
+อนุคามี
+อนุเคราะห์
+อนุจร
+อนุช
+อนุชน
+อนุชา
+อนุชาต
+อนุชาต-
+อนุชาตบุตร
+อนุชิต
+อนุà¸à¸²à¸•
+อนุà¸à¸²à¹‚ตตุลาà¸à¸²à¸£
+อนุตร-
+อนุเถระ
+อนุทิน
+อนุบท
+อนุบาล
+อนุปริà¸à¸à¸²
+อนุปสัมบัน
+อนุปัสนา
+อนุพงศ์
+อนุพัทธ์
+อนุพันธ์
+อนุโพธ
+อนุภรรยา
+อนุภริยา
+อนุภาค
+อนุภาษ
+อนุมัติ
+อนุมาตรา
+อนุมาน
+อนุมูล
+อนุมูลà¸à¸£à¸”
+อนุโมทนา
+อนุโมทนาบัตร
+อนุโยค
+อนุรัà¸à¸©-
+อนุรัà¸à¸©à¹Œ
+อนุรัà¸à¸©à¸™à¸´à¸¢à¸¡
+อนุราช
+อนุราธ
+อนุราธะ
+อนุราธา
+อนุรูป
+อนุโลม
+อนุวงศ์
+อนุวัต
+อนุวาต
+อนุศาสà¸
+อนุศาสน์
+อนุศาสนาจารย์
+อนุศิษà¸à¹Œ
+อนุสติ
+อนุสนธิ
+อนุสภาà¸à¸²à¸Šà¸²à¸”
+อนุสร
+อนุสรณ์
+อนุสัà¸à¸à¸²
+อนุสัย
+อนุสาวรีย์
+อนุสาสนี
+อเนà¸
+อเนà¸-
+อเนà¸à¸„ุณ
+อเนà¸à¸›à¸£à¸°à¸ªà¸‡à¸„์
+อเนà¸à¸§à¸´à¸˜
+อเนà¸à¸­à¸™à¸±à¸™à¸•à¹Œ
+อเนà¸à¸­à¸™à¸±à¸™à¸•à¸±à¸‡
+อเนจอนาถ
+อโนชา
+อโนดาต
+อบ
+อบเชย
+อบรม
+อบอวล
+อบอ้าว
+อบอุ่น
+อบาย
+อบาย-
+อบายภูมิ
+อบายมุข
+อป
+อปà¸à¸²à¸£
+อปจายน-
+อปจายนธรรม
+อปจายนมัย
+อปภาคย์
+อปมงคล
+อปมาน
+อปยศ
+อปร-
+อปรภาค
+อประมาณ
+อประมาท
+อประไมย
+อปรัณณชาติ
+อปรา
+อปราชัย
+อปราชิต
+อปราธ
+อปริมาณ
+อปลัà¸à¸©à¸“์
+อปโลà¸à¸™à¹Œ
+อปวาท
+อปหาร
+อปาจี
+อปาจีน
+อปาน
+อเปหิ
+อพพะ
+อพยพ
+อภว
+อภัพ
+อภัพ-
+อภัพบุคคล
+อภัพผล
+อภัย
+อภัย-
+อภัยทาน
+อภัยโทษ
+อภิ
+อภิฆาต
+อภิจฉา
+อภิชฌา
+อภิชน
+อภิชน-
+อภิชนาธิปไตย
+อภิชัย
+อภิชาต
+อภิชาต-
+อภิชาตบุตร
+อภิชิต
+อภิà¸à¸à¸²
+อภิà¸à¸à¸²à¸“
+อภิณห-
+อภิธรรม
+อภิธาน
+อภิไธย
+อภินันท์
+อภินันทนาà¸à¸²à¸£
+อภินัย
+อภินิหาร
+อภิเนษà¸à¸£à¸¡à¸“์
+อภิบาล
+อภิปรัชà¸à¸²
+อภิปราย
+อภิมหาอำนาจ
+อภิมานะ
+อภิมุข
+อภิรดี
+อภิรติ
+อภิรมย์
+อภิรัà¸à¸©à¹Œ
+อภิรัà¸à¸¡à¸™à¸•à¸£à¸µ
+อภิราม
+อภิรุต
+อภิรุม
+อภิรูป
+อภิลัà¸à¸‚ิต
+อภิลัà¸à¸‚ิต-
+อภิลัà¸à¸‚ิตà¸à¸²à¸¥
+อภิลัà¸à¸‚ิตสมัย
+อภิเลปน์
+อภิวันท์
+อภิวาท
+อภิวาทน์
+อภิเษà¸
+อภิเษà¸à¸ªà¸¡à¸£à¸ª
+อภิสมโพธิ
+อภิสมัย
+อภิสมาจาร
+อภิสัมโพธิ
+อภิสัมโพธิà¸à¸²à¸“
+อภิสิต
+อภิสิทธิ์
+อภูต
+อม
+อ้ม
+อมความ
+อมต-
+อมตบท
+อมตะ
+อมนุษย์
+อมปาà¸
+อมพะนำ
+อมเพลิง
+อมภูมิ
+อมมือ
+อมยิ้ม
+อมร
+อมร-
+อมรบดี
+อมรรัตน์
+อมรราช
+อมรสตรี
+อมรา
+อมราวดี
+อมรินทร์
+อมเรนทร์
+อมเรศ
+อมเรศวร
+อมโรค
+อมฤต
+อมฤต-
+อมฤตบท
+อมฤตยู
+อมฤตรส
+อมเลือดอมà¸à¸²à¸”
+อมเลือดอมหนอง
+อมหนอง
+อมัจจะ
+อมัตร
+อมาตย์
+อมาวสี
+อมาวสุ
+อมาวาสี
+อมิตร
+อเมริà¸à¸±à¸™
+อย
+อยน
+อยัส
+อย่า
+อยาà¸
+อย่าง
+อย่างไร
+อย่างไรà¸à¹‡à¸”ี
+อย่างไรà¸à¹‡à¸•à¸²à¸¡
+อยุทธ์
+อยู่
+อยู่à¸à¸£à¸£à¸¡
+อยู่à¸à¸´à¸™
+อยู่คง
+อยู่งาน
+อยู่จริง
+อยู่ดีà¸à¸´à¸™à¸”ี
+อยู่ตัว
+อยู่ท้อง
+อยู่ไฟ
+อยู่มือ
+อยู่ไม่สุข
+อยู่ยงคงà¸à¸£à¸°à¸žà¸±à¸™
+อยู่ยาม
+อยู่โยง
+อยู่เวร
+อยู่หมัด
+อร
+อรช
+อรชร
+อรชุน
+อรณ
+อรดี
+อรติ
+อรทัย
+อรไท
+อรธาน
+อรนุช
+อรพินท์
+อรพิม
+อรรค
+อรรฆ
+อรรฆย์
+อรรจน์
+อรรณพ
+อรรถ
+อรรถ-
+อรรถà¸à¸–า
+อรรถà¸à¸–าจารย์
+อรรถà¸à¸£
+อรรถà¸à¸§à¸µ
+อรรถคดี
+อรรถบท
+อรรถปà¸à¸´à¸ªà¸±à¸¡à¸ à¸´à¸—า
+อรรถประโยชน์
+อรรถรส
+อรรถาธิบาย
+อรรธ
+อรรธ-
+อรรธà¸à¸£à¸£à¸“
+อรรธคราส
+อรรธจัà¸à¸£
+อรรธจันทร์
+อรรธนิศา
+อรรธบท
+อรรธภาค
+อรรธสระ
+อรสุม
+อรสุมพล
+อรหะ
+อรหัง
+อรหัต
+อรหัต-
+อรหัตผล
+อรหัตมรรค
+อรหัตวิโมà¸à¸‚์
+อรหัน
+อรหันต-
+อรหันต์
+อรหันตฆาต
+อร่อย
+อรัà¸
+อรัà¸-
+อรัà¸à¸à¸´à¸
+อรัà¸à¸§à¸²à¸ª
+อรัà¸à¸§à¸²à¸ªà¸µ
+อรัณย์
+อราดี
+อราติ
+อร่าม
+อริ
+อริน
+อรินทร์
+อริย-
+อริยà¸à¸°
+อริยทรัพย์
+อริยบุคคล
+อริยผล
+อริยมรรค
+อริยสัจ
+อริยะ
+อรุ
+อรุณ
+อรุโณทัย
+อรุ่ม
+อรูป
+อลงà¸à¸•
+อลงà¸à¸£à¸“์
+อลงà¸à¸²à¸£
+อลวน
+อลเวง
+อลหม่าน
+อล่องฉ่อง
+อลัà¸à¹€à¸­à¸¥à¸·à¹ˆà¸­
+อลังà¸à¸²à¸£
+อลัชชี
+อล่างฉ่าง
+อลิงค์
+อลึงค์
+อลึ่งฉึ่ง
+อโลหะ
+อวà¸
+อ้วà¸
+อวà¸à¸²à¸¨
+อวเคราะห์
+อวจร
+อวชัย
+อวชาต
+อวชาต-
+อวชาตบุตร
+อวด
+อวดดี
+อวดรู้
+อวดอ้าง
+อวตาร
+อวน
+อ้วน
+อ้วนท้วน
+อวนลอย
+อวนลาà¸
+อวบ
+อวบน้ำ
+อวมงคล
+อวมอำ
+อวย
+อวยวะ
+อวรุทธ์
+อวรุทธà¸
+อวล
+อวสาน
+อวหาร
+อวัยวะ
+อวัสดา
+อวาจี
+อวิจี
+อวิชชา
+อวิà¸à¸à¸²à¸“à¸-
+อวิà¸à¸à¸²à¸“à¸à¸—รัพย์
+อวิà¸à¸à¸¹
+อวิรุทธ์
+อวิโรธน์
+อวีจิ
+อเวจี
+อโศà¸
+อสงไขย
+อสนี
+อสนีบาต
+อสภ
+อสมà¸à¸²à¸£
+อสมมาตร
+อสรพิษ
+อสังà¸à¸¡à¸—รัพย์
+อสังหาริม-
+อสังหาริมทรัพย์
+อสังหาริมะ
+อสัà¸-
+อสัà¸à¸à¸£à¸£à¸¡
+อสัà¸à¸à¸µ
+อสัà¸à¸à¸µà¸ à¸²à¸ž
+อสัà¸à¸à¸µà¸ à¸²à¸§à¸°
+อสัà¸à¸à¸µà¸ªà¸±à¸•à¸§à¹Œ
+อสัà¸à¹à¸”หวา
+อสัตถพฤà¸à¸©à¹Œ
+อสัตย์
+อสัมภิน-
+อสัมภินพงศ์
+อสัมภินวงศ์
+อสาธร
+อสาธุ
+อสิ
+อสิจรรยาà¸à¸²à¸£
+อสิต
+อสิธารา
+อสิเลสะ
+อสีตยานุพยัà¸à¸Šà¸™à¸°
+อสีติ
+อสีติมหาสาวà¸
+อสุ
+อสุจิ
+อสุนีบาต
+อสุภ
+อสุภ-
+อสุภà¸à¸£à¸£à¸¡à¸à¸²à¸™
+อสุภสัà¸à¸à¸²
+อสุร-
+อสุรà¸à¸²à¸¢
+อสุรี
+อสุเรศ
+อสูร
+อเส
+อเสà¸à¸‚-
+อเสà¸à¸‚บุคคล
+อเสà¸à¸‚ะ
+อเสข-
+อเสขะ
+อห
+อหังà¸à¸²à¸£
+อหิ
+อหิงสา
+อหิวาตà¸à¹‚รค
+อหึงสา
+อเหตุà¸à¸—ิà¸à¸´
+อโหสิà¸à¸£à¸£à¸¡
+ออ
+อ้อ
+อ๋อ
+ออà¸
+ออà¸à¸à¸³à¸¥à¸±à¸‡
+ออà¸à¸‚ุนนาง
+ออà¸à¹à¸‚à¸
+ออà¸à¹‚ขน
+ออà¸à¹„ข้หัว
+ออà¸à¸‡à¸²à¸™
+ออà¸à¸‡à¸´à¹‰à¸§
+ออà¸à¸Šà¸·à¹ˆà¸­
+ออà¸à¸‹à¸´à¹€à¸ˆà¸™
+ออà¸à¸‹à¸´à¹€à¸”ชัน
+ออà¸à¹„ซด์
+ออà¸à¸à¸²
+ออà¸à¸”อà¸
+ออà¸à¸”อà¸à¸­à¸­à¸à¸œà¸¥
+ออà¸à¸•à¸±à¸§
+ออà¸à¸—่า
+ออà¸à¸—่าออà¸à¸—าง
+ออà¸à¸—ุà¸à¸‚์
+ออà¸à¸—ุน
+ออà¸à¸™à¸­à¸à¸«à¸™à¹‰à¸²
+ออà¸à¸šà¸§à¸Š
+ออà¸à¸›à¸²à¸
+ออà¸à¸œà¸·à¹ˆà¸™
+ออà¸à¸à¸µ
+ออà¸à¸à¸µà¸”าษ
+ออà¸à¸žà¸£à¸£à¸©à¸²
+ออà¸à¹„ฟ
+ออà¸à¸ à¸²à¸©à¸²
+ออà¸à¸¡à¸«à¸²à¸ªà¸¡à¸²à¸„ม
+ออà¸à¸¢à¸±à¸à¸©à¹Œà¸­à¸­à¸à¹‚ขน
+ออà¸à¸£à¸ª
+ออà¸à¸£à¸±à¸š
+ออà¸à¸£à¹‰à¸²à¸™
+ออà¸à¹€à¸£à¸·à¸­à¸™
+ออà¸à¹à¸£à¸‡
+ออà¸à¹‚รง
+ออà¸à¸¤à¸—ธิ์
+ออà¸à¸¥à¸²à¸¢
+ออà¸à¸¥à¸´à¸‡à¸­à¸­à¸à¸„่าง
+ออà¸à¸¥à¸¹à¸
+ออà¸à¸§à¸±à¸‡
+ออà¸à¹€à¸ªà¸µà¸¢à¸‡
+ออà¸à¸«à¸™à¹‰à¸²à¸­à¸­à¸à¸•à¸²
+ออà¸à¸«à¸±à¸”
+ออà¸à¸«à¸²à¸
+ออà¸à¸­à¸²à¸à¸²à¸¨
+อ่อง
+อ๋อง
+อ้องà¹à¸­à¹‰à¸‡
+ออเจ้า
+ออเซาะ
+ออด
+ออดๆ
+ออดอ้อน
+ออดà¹à¸­à¸”
+ออดๆ à¹à¸­à¸”ๆ
+อ๊อดà¹à¸­à¹Šà¸”
+อ๊อดๆ à¹à¸­à¹Šà¸”ๆ
+อ้อดิบ
+อ่อน
+อ้อน
+อ่อนข้อ
+อ่อนความ
+อ่อนจิตอ่อนใจ
+อ่อนใจ
+อ่อนช้อย
+ออนซ์
+ออนซอน
+อ่อนซอน
+อ่อนไท้
+อ่อนน้อม
+อ่อนปวà¸à¹€à¸›à¸µà¸¢à¸
+อ่อนเปลี้ย
+อ่อนเปียà¸
+อ่อนเพลีย
+อ่อนโยน
+อ้อนวอน
+อ่อนหวาน
+อ่อนหัด
+อ่อนหู
+อ่อนไหว
+อ่อนอà¸à¸­à¹ˆà¸­à¸™à¹ƒà¸ˆ
+อ้อนออด
+อ่อนà¹à¸­
+อ้อนà¹à¸­à¹‰à¸™
+ออฟฟิศ
+ออม
+อ่อม
+อ้อม
+ออมครอม
+อ้อมค้อม
+ออมชอม
+ออมซอม
+ออมสิน
+อ้อมอà¸
+ออมอด
+อ้อมà¹à¸­à¹‰à¸¡
+อ่อย
+อ้อย
+อ๋อย
+อ้อยเข้าปาà¸à¸Šà¹‰à¸²à¸‡
+อ้อยช้าง
+อ้อยà¹à¸”ง
+อ้อยเลา
+อ้อยส้อย
+อ้อยอิ่ง
+ออสเมียม
+อ้อà¹à¸­à¹‰
+อ๊ะ
+อะคร้าว
+อะเคื้อ
+อะจีน
+อะà¹à¸ˆ
+อะเซทิลีน
+อะดรีนาลีน
+อะดัà¸
+อะดัà¸à¸­à¸°à¹€à¸”ี้ย
+อะดัà¸à¸­à¸°à¹€à¸”ื่อ
+อะดัà¸à¸­à¸°à¹à¸”้
+อะดุง
+อะตอม
+อะนะ
+อะนั้น
+อะนี้
+อะมีบา
+อะเมริเซียม
+อะร้าอร่าม
+อะไร
+อะลุ่มอล่วย
+อะลุ้มอล่วย
+อะลูมิเนียม
+อะหม
+อะไหล่
+อะอื้อ
+อะเอื้อย
+อัà¸
+อั้à¸
+อั้à¸à¹†
+อั๊à¸
+อั๊à¸à¹†
+อัà¸à¸à¸°
+อัà¸à¹‚à¸à¸˜à¸°
+อัà¸à¸‚
+อัà¸à¸‚ร-
+อัà¸à¸‚รวิธี
+อัà¸à¸‚รวิบัติ
+อัà¸à¸‚รสมัย
+อัà¸à¸‚ระ
+อัà¸à¸‚รานุà¸à¸£à¸¡
+อัà¸à¸‚รานุà¸à¸£à¸¡à¸ à¸¹à¸¡à¸´à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+อัà¸à¹‚ข
+อัà¸à¹‚ขภิณี
+อัà¸à¹‚ขเภณี
+อัà¸à¸©à¸£
+อัà¸à¸©à¸£-
+อัà¸à¸©à¸£à¸à¸¥à¸²à¸‡
+อัà¸à¸©à¸£à¸•à¹ˆà¸³
+อัà¸à¸©à¸£à¸šà¸
+อัà¸à¸©à¸£à¸¥à¸±à¸à¸©à¸“์
+อัà¸à¸©à¸£à¹€à¸¥à¸‚
+อัà¸à¸©à¸£à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+อัà¸à¸©à¸£à¸ªà¸¡à¸±à¸¢
+อัà¸à¸©à¸£à¸ªà¸²à¸ªà¸™à¹Œ
+อัà¸à¸©à¸£à¸ªà¸¹à¸‡
+อัà¸à¸©à¸°
+อัà¸à¹€à¸©à¸²à¸«à¸´à¸“ี
+อัà¸à¹€à¸ªà¸š
+อัà¸à¸­à¹ˆà¸§à¸™
+อัคคะ
+อัคคิ
+อัคคี
+อัคคีภัย
+อัคนิ
+อัคนิคณะ
+อัคนิพ่าห์
+อัคนิรุทร
+อัคนิวาหะ
+อัคนิโหตร
+อัคนี
+อัคร-
+อัครชายา
+อัครมหาเสนาบดี
+อัครมเหสี
+อัครราชทูต
+อัครสมณทูต
+อัง
+อังà¸à¹Œ
+อังà¸à¸™à¸°
+อังà¸à¸¤à¸©
+อังà¸à¸§à¸”
+อังà¸à¸°à¸¥à¸¸à¸‡
+อังà¸à¸²
+อังà¸à¸²à¸š
+อังà¸à¸²à¸šà¸à¸£à¸±à¹ˆà¸‡
+อังà¸à¸²à¸šà¸«à¸™à¸¹
+อังà¸à¸¸à¸£
+อังà¸à¸¸à¸¨
+อังà¸à¸¹à¸£
+อังคณะ
+อังคณา
+อังคาร
+อังคาส
+อังคีรส
+อังคุà¸
+อังฆาต
+อั้งยี่
+อั้งโล่
+อังศุ
+อังศุà¸
+อังศุธร
+อังศุมาลี
+อังส-
+อังสà¸à¸¸à¸
+อังสตรอม
+อังสนา
+อังสภาระ
+อังสะ
+อังสา
+อัจà¸à¸¥à¸±à¸š
+อัจจันต์
+อัจจัย
+อัจจิ
+อัจจิมา
+อัจจุต
+อัจเจà¸à¸°
+อัจฉรา
+อัจฉริย-
+อัจฉริยบุคคล
+อัจฉริยภาพ
+อัจฉริยลัà¸à¸©à¸“์
+อัจฉริยลัà¸à¸©à¸“ะ
+อัจฉริยะ
+อัจนา
+อัชฌัตติà¸-
+อัชฌา
+อัชฌาจาร
+อัชฌาศัย
+อัชฌาสัย
+อัà¸-
+อัà¸à¸‚ยม
+อัà¸à¸Šà¸™à¸°
+อัà¸à¸Šà¸¥à¸µ
+อัà¸à¸Šà¸±à¸™
+อัà¸à¸Šà¸±à¸™à¸›à¹ˆà¸²
+อัà¸à¹€à¸Šà¸´à¸
+อัà¸à¸à¸°
+อัà¸à¸”ิตถีย์
+อัà¸à¹€à¸”ียรถีย์
+อัà¸à¸›à¸£à¸°à¸à¸²à¸¨
+อัà¸à¸›à¸£à¸°à¸à¸²à¸¨à¹€à¸”ี่ยว
+อัà¸à¸¡à¸“ี
+อัà¸à¸¡à¸±à¸-
+อัà¸à¸£à¸¹à¸›
+อัà¸
+อัà¸à¸-
+อัà¸à¸à¸°
+อัà¸à¸à¸±à¸‡à¸„์
+อัà¸à¸à¸±à¸‡à¸„ิà¸à¸¡à¸£à¸£à¸„
+อัà¸à¸à¸±à¸‡à¸ªà¸°
+อัà¸à¸™à¸²
+อัà¸
+อัà¸à¹€à¸„ราะห์
+อัà¸à¸—ิศ
+อัà¸à¸šà¸£à¸´à¸‚าร
+อัà¸à¸šà¸²à¸™
+อัà¸à¸¡-
+อัà¸à¸¡à¸°
+อัà¸à¸¢à¸²à¸¢à¸‹à¸·à¹‰à¸­à¸‚นมยาย
+อัà¸à¸¨à¸
+อัà¸à¸¬à¸ª
+อัà¸à¸´
+อัà¸à¸´à¸¡à¸´à¸à¸Šà¸°
+อัà¸à¸´à¸ªà¸±à¸“à¸à¸²à¸™
+อัฒ-
+อัฒจันทร์
+อัฒภาค
+อัฒมณฑล
+อัฒมาส
+อัฒรัตติ
+อัณฑ-
+อัณฑโà¸à¸ª
+อัณฑชะ
+อัณฑะ
+อัณฑาà¸à¸²à¸£
+อัณณพ
+อัด
+อัดà¸à¹Šà¸­à¸šà¸›à¸µà¹‰
+อัดà¹à¸ˆ
+อัดฉีด
+อัดà¹à¸šà¸•à¹€à¸•à¸­à¸£à¸µà¹ˆ
+อัดà¹à¸œà¹ˆà¸™à¹€à¸ªà¸µà¸¢à¸‡
+อัดรูป
+อัดลม
+อัดสำเนา
+อัดเสียง
+อัดอั้น
+อัดอั้นตันใจ
+อัดà¹à¸­
+อัต-
+อัตคัด
+อัตชีวประวัติ
+อัตตะ
+อัตตา
+อัตตาธิปไตย
+อัตถ์
+อัตถะ
+อัตนัย
+อัตโนมัติ
+อัตภาพ
+อัตรชะ
+อัตรา
+อัตราเร็ว
+อัตราส่วน
+อัตลัด
+อัตวินิบาตà¸à¸£à¸£à¸¡
+อัตหิต-
+อัตเหตุ
+อัททา
+อัทธ-
+อัทธ์
+อัทธคต
+อัทธคู
+อัทธา
+อัทธาน
+อัทธายุ
+อัธยาตมวิทยา
+อัธยาย
+อัธยาศัย
+อัน
+อั้น
+อั๋น
+อันดà¸
+อันดร
+อันดับ
+อันด๊าà¸
+อันโด๊à¸
+อันต-
+อันตà¸
+อันตà¸à¸²à¸¥
+อันตà¸à¸´à¸£à¸´à¸¢à¸²
+อันตคุณ
+อันตคู
+อันตชาติ
+อันตร
+อันตร-
+อันตรà¸à¸²à¸£à¸“์
+อันตรธาน
+อันตรภาค
+อันตรวาสà¸
+อันตรา
+อันตราย
+อันตรายิà¸à¸˜à¸£à¸£à¸¡
+อันตลิà¸à¸‚ะ
+อันตะ
+อั้นตั้น
+อันติà¸
+อันติม-
+อันติมสัจ
+อันติมะ
+อั้นตู้
+อันเต
+อันเตบุระ
+อันเตบุริà¸
+อันเตบุริà¸à¸²
+อันเตปุระ
+อันเตปุริà¸
+อันเตปุริà¸à¸²
+อันเตวาสิà¸
+อันโต
+อันโตชน
+อันโตนาที
+อันà¹à¸–้ง
+อันทุ
+อันโทล
+อันธ-
+อันธà¸à¸²à¸£
+อันธพาล
+อันธิà¸à¸²
+อันนะ
+อันนา
+อันเป็น
+อันเป็นไป
+อันโยนย-
+อันโยนยะ
+อันวย-
+อันวัย
+อันว่า
+อันเวส
+อั้นอ้น
+อับ
+อับจน
+อับเฉา
+อับปาง
+อับอาย
+อัป-
+อัปà¸à¸°
+อัปà¸à¸²à¸£
+อัปà¸à¸´à¸†à¸°
+อัปà¸à¸´à¸ à¸²à¸„
+อัปปะ
+อัปเปหิ
+อัปภาคย์
+อัปมงคล
+อัปยศ
+อัประมาณ
+อัประมาท
+อัประไมย
+อัปราชัย
+อัปรีย์
+อัปลัà¸à¸©à¸“์
+อัปสร
+อัพพุท
+อัพโพหาริà¸
+อัพภันดร
+อัพภันตร-
+อัพภาน
+อัพภาส
+อัม
+อัมพ-
+อัมพร
+อัมพฤà¸à¸©à¹Œ
+อัมพวัน
+อัมพวา
+อัมพา
+อัมพาต
+อัมพิล
+อัมพุ
+อัมพุช
+อัมพุชินี
+อัมพุท
+อัยà¸à¸°
+อัยà¸à¸²
+อัยà¸à¸²à¸£
+อัยà¸à¸µ
+อัยยะ
+อัยยิà¸à¸²
+อัลà¸à¸¸à¸£à¸­à¸²à¸™
+อัลตราไวโอเลต
+อั่ว
+อัศจรรย์
+อัศเจรีย์
+อัศว-
+อัศวโà¸à¸§à¸´à¸—
+อัศวมุข
+อัศวมุขี
+อัศวเมธ
+อัศวยุช
+อัศวานึà¸
+อัศวิน
+อัศวินี
+อัษฎ-
+อัษฎà¸à¸‰à¸±à¸™à¸—์
+อัษฎมงคล
+อัษฎมะ
+อัษฎางคิà¸à¸¡à¸£à¸£à¸„
+อัษฎายุธ
+อัษฎาวุธ
+อัษà¸à¸¡à¸‡à¸„ล
+อัส-
+อัสดง
+อัสดงคต
+อัสดม
+อัสดร
+อัสนี
+อัสมิมานะ
+อัสมุขี
+อัสสนี
+อัสสะ
+อัสสัตถพฤà¸à¸©à¹Œ
+อัสสานิà¸
+อัสสานีà¸
+อัสสานึà¸
+อัสสาสะ
+อัสสุ
+อัสสุชล
+อัสสุธารา
+อา
+อ่า
+อ้า
+อาà¸à¸£
+อาà¸à¸£à¹à¸ªà¸•à¸¡à¸›à¹Œ
+อาà¸à¸±à¸‡à¸‚า
+อาà¸à¸±à¸›
+อาà¸à¸±à¸›à¸à¸´à¸£à¸´à¸¢à¸²
+อาà¸à¸±à¸¡à¸›à¸™à¸°
+อาà¸à¸±à¸¡à¸›à¸°
+อาà¸à¸²à¸£
+อาà¸à¸²à¸£-
+อาà¸à¸²à¸£à¸™à¸²à¸¡
+อาà¸à¸²à¸¨
+อาà¸à¸²à¸¨-
+อาà¸à¸²à¸¨à¸˜à¸²à¸•à¸¸
+อาà¸à¸²à¸¨à¸¢à¸²à¸™
+อาà¸à¸¹à¸¥
+อาเà¸à¸µà¸¢à¸£à¸“์
+อาขยาต
+อาขยาน
+อาคเนย์
+อาคม
+อาครหายณี
+อาคันตุà¸-
+อาคันตุà¸à¸ à¸±à¸•
+อาคันตุà¸à¸§à¸±à¸•à¸£
+อาคันตุà¸à¸°
+อาคาร
+อาคารชุด
+อาฆาต
+อาฆาตนะ
+อาฆาตมาดร้าย
+อ่าง
+อ้าง
+อ่างเà¸à¹‡à¸šà¸™à¹‰à¸³
+อางขนาง
+อ้างว้าง
+อ้างอิง
+อาจ
+อาจม
+อาจมน
+อาจริย-
+อาจริยวัตร
+อาจริยวาท
+อาจหาà¸
+อาจอง
+อาจเอื้อม
+อาจาด
+อาจาร
+อาจาร-
+อาจารย์
+อาจารี
+อาจิณ
+อาจิณ-
+อาจิณสมาจาร
+อาเจียน
+อาชà¸à¸±à¸›à¸•à¸´
+อาชà¸à¸±à¸›à¸•à¸´à¹Œ
+อาชà¸à¸²
+อาชà¸à¸²à¸à¸£
+อาชà¸à¸²à¸à¸£à¸£à¸¡
+อาชà¸à¸²à¸à¸£à¸ªà¸‡à¸„ราม
+อาชà¸à¸²à¸šà¸—
+อาชà¸à¸²à¸šà¸±à¸•à¸£
+อาชà¸à¸²à¸¨à¸¶à¸
+อาชà¸à¸²à¸ªà¸´à¸—ธิ์
+อาชวะ
+อาชา
+อาชาน
+อาชานิ
+อาชาไนย
+อาชีพ
+อาชีว-
+อาชีวà¸
+อาชีวศึà¸à¸©à¸²
+อาชีวะ
+อ้าซ่า
+อาà¸à¸²
+อาà¸à¸²à¸ªà¸´à¸—ธิ์
+อาà¸à¸²à¸™à¸²
+อาณัติ
+อาณัติสัà¸à¸à¸²à¸“
+อาณา
+อาณาเà¸à¸©à¸•à¸£
+อาณาเขต
+อาณาจัà¸à¸£
+อาณานิคม
+อาณาประชาราษฎร์
+อาณาประโยชน์
+อาด
+อาดๆ
+อาดุร
+อาดุลย์
+อาดูร
+อาดูลย์
+อาเด๊ะ
+อาตม-
+อาตมทาน
+อาตมภาพ
+อาตมัน
+อาตมา
+อาตุร
+อาถรรพ์
+อาถรรพณ์
+อาถรรพณะ
+อาทร
+อาทาตา
+อาทาน
+อาทิ
+อาทิตย-
+อาทิตย์
+อาทิตยมณฑล
+อาทิตยวาร
+อาทีนพ
+อาทีนว
+อาทึà¸
+อาเทศ
+อาธรรม
+อาธรรม์
+อาธรรมิà¸
+อาธรรมึà¸
+อาธาน
+อาธาร
+อาน
+อ่าน
+อานà¸
+อานน
+อานนท์
+อานม้า
+อ่านเล่น
+อานะ
+อานันท์
+อานันทนะ
+อานัม
+อานาปาน
+อานาปาน-
+อานาปานัสสติ
+อานำ
+อานิà¸
+อานิสงส์
+อานุภาพ
+อานุภาวะ
+อาบ
+อาบà¹à¸”ด
+อาบน้ำร้อนมาà¸à¹ˆà¸­à¸™
+อาบเหงื่อต่างน้ำ
+อาบเอิบ
+อาบัติ
+อาบัน
+อาปณà¸à¸°
+อาปณะ
+อาปะ
+อาปาน-
+อาปานภูมิ
+อาปานศาลา
+อาปานะ
+อาโป
+อาโปà¸à¸ªà¸´à¸“
+อาโปธาตุ
+อาพัด
+อาพัทธ์
+อาพันธ์
+อาพันธนะ
+อาพาธ
+อาพาธิà¸
+อาพาธึà¸
+อาพิล
+อาเพศ
+อาภรณ์
+อาภัพ
+อาภัสระ
+อาภา
+อาภาà¸à¸£
+อาภาส
+อาม
+อ่าม
+อามลà¸
+อามัย
+อามิษ
+อามิส
+อาย
+อ้าย
+อ้ายขิà¸
+อ้ายเข้
+อ้ายงั่ว
+อ้ายเจี๊ยว
+อ้ายชื่น
+อายต
+อายตนะ
+อายน
+อ้ายบ้า
+อ้ายเบี้ยว
+อ้ายป๊อà¸
+อายเหนียม
+อ้ายอ้าว
+อายัด
+อายัต
+อายัน
+อายาจนะ
+อายาน
+อายุ
+อายุà¸à¸•à¸à¸°
+อายุà¸à¸©à¸±à¸¢
+อายุขัย
+อายุความ
+อายุตà¸à¸°
+อายุธ
+อายุร-
+อายุรà¹à¸žà¸—ย์
+อายุรเวช
+อายุรเวท
+อายุรศาสตร์
+อายุวัฒนะ
+อายุษ
+อาร์à¸à¸­à¸™
+อารดี
+อาร์ต
+อารติ
+อารทรา
+อาร์ม
+อารมณ์
+อารมณ์ขัน
+อารย-
+อารยชน
+อารยชาติ
+อารยธรรม
+อารยประเทศ
+อารยะ
+อารยัน
+อาระ
+อารัà¸à¸‚า
+อารัà¸à¸©à¹Œ
+อารัà¸
+อารัà¸à¸à¸´à¸
+อารัณย์
+อารัณยà¸à¸°
+อารัติ
+อารัมภ-
+อารัมภ์
+อารัมภà¸à¸–า
+อารัมภบท
+อาราธน์
+อาราธนา
+อาราธนาธรรม
+อาราธนาพระปริตร
+อาราธนาศีล
+อาราม
+อารามิà¸
+อารี
+อารีอารอบ
+อารุม
+อาลปน์
+อาลปนะ
+อาละวาด
+อาลัà¸à¸©à¸“์
+อาลัย
+อาลัยอาวรณ์
+อาลัว
+อาลิ
+อาลี
+อาโลà¸
+อาโลà¸-
+อาโลà¸à¸à¸ªà¸´à¸“
+อาโลà¸à¸™à¸°
+อาว
+อ่าว
+อ้าว
+อาวรณ์
+อาวัชนาà¸à¸²à¸£
+อาวัล
+อาวาส
+อาวาสิà¸
+อาวาห-
+อาวาหะ
+อาวิล
+อาวุต
+อาวุธ
+อาวุโส
+อาเวค
+อาเวศ
+อาศรม
+อาศรมบท
+อาศเลษา
+อาศัย
+อาศัยที่
+อาศัยลำà¹à¸‚้งตัวเอง
+อาศิร-
+อาศิรพจน์
+อาศิรพาท
+อาศิรพิษ
+อาศิรวจนะ
+อาศิรวาท
+อาศิรวิษ
+อาศีรพิษ
+อาศีรวิษ
+อาศุ
+อาเศียร-
+อาเศียรพจน์
+อาเศียรพาท
+อาเศียรวจนะ
+อาเศียรวาท
+อาษาฒ
+อาสน
+อาสน์
+อาสน์สงฆ์
+อาสนะ
+อาสัà¸
+อาสัตย์
+อาสันนะ
+อาสา
+อาสาฬห-
+อาสาฬห์
+อาสาฬหบูชา
+อาสิà¸à¸ˆà¹Œ
+อาสิน
+อาสูร
+อาà¹à¸ªà¸°
+อาหต
+อาหนี
+อาหนู
+อาหม
+อาหร
+อาหรัดà¸à¸±à¸”ติà¸à¸²
+อาหรับ
+อาหลัà¸à¸­à¸²à¹€à¸«à¸¥à¸·à¹ˆà¸­
+อาหาร
+อาหารว่าง
+อาหุดี
+อาฬหà¸
+อาฬาริà¸
+อ่าองค์
+อำ
+อ่ำ
+อำà¹à¸”ง
+อำนด
+อำนนต์
+อำนรรฆ
+อำนวย
+อำนาจ
+อำนาจบาตรใหà¸à¹ˆ
+อำนาถ
+อำนิà¸
+อำนิษà¸à¹Œ
+อำปลัง
+อำพน
+อำพราง
+อำพะนำ
+อำพัน
+อำพันขี้ปลา
+อำพันทอง
+อำไพ
+อำเภอ
+อำเภอใจ
+อำมร
+อำมฤคโชค
+อำมฤต
+อำมหิต
+อำมาตย์
+อำยวน
+อำรุง
+อำลา
+อำอวม
+อ้ำอึ้ง
+อิà¸
+อิง
+อิงค์
+อิงอร
+อิงà¹à¸­à¸š
+อิจฉา
+อิฉัน
+อิชยา
+อิà¸à¸-
+อิà¸à¸à¸²à¸£à¸¡à¸“์
+อิà¸-
+อิà¸à¸œà¸¥
+อิณ
+อิด
+อิดโรย
+อิดหนาระอาใจ
+อิดออด
+อิดๆ ออดๆ
+อิดเอื้อน
+อิดๆ เอื้อนๆ
+อิตถี
+อิตถีลิงค์
+อิตเทรียม
+อิตเทอร์เบียม
+อิทธิ
+อิทธิ-
+อิทธิปาà¸à¸´à¸«à¸²à¸£à¸´à¸¢à¹Œ
+อิทธิพล
+อิทธิฤทธิ์
+อิน
+อินซูลิน
+อินเดีย
+อินเดียนà¹à¸”ง
+อินเดียม
+อินท์
+อินทขีล
+อินทนิล
+อินทนิลน้ำ
+อินทผลัม
+อินทร-
+อินทร์
+อินทรธนู
+อินทรวงศ์
+อินทรวิเชียร
+อินทรศัà¸à¸”ิ์
+อินทราณี
+อินทราภิเษà¸
+อินทรายุธ
+อินทรี
+อินทรีย-
+อินทรีย์
+อินทรียโคจร
+อินทรียà¸à¸²à¸“
+อินทรียสังวร
+อินทีวร
+อินทุ
+อินธน์
+อินฟราเรด
+อินัง
+อินังขังขอบ
+อิ่ม
+อิ่มใจ
+อิ่มตัว
+อิ่มหนำ
+อิ่มหมีพีมัน
+อิ่มอà¸à¸­à¸´à¹ˆà¸¡à¹ƒà¸ˆ
+อิ่มเอิบ
+อิมัลชัน
+อิริเดียม
+อิริยา
+อิริยาบถ
+อิรุพเพท
+อิลู
+อิเล็à¸à¸•à¸£à¸­à¸™
+อิเล็à¸à¸—รอนิà¸à¸ªà¹Œ
+อิเล็à¸à¹‚ทน
+อิศร
+อิศวร
+อิษà¸à¹Œ
+อิษà¸à¸µ
+อิส
+อิสตรี
+อิสร-
+อิสรภาพ
+อิสระ
+อิสริย-
+อิสริยยศ
+อิสริยะ
+อิสริยาภรณ์
+อิสลาม
+อิสสา
+อิสัตรี
+อิสิ
+อิสี
+อิหม่าม
+อิหลัà¸à¸­à¸´à¹€à¸«à¸¥à¸·à¹ˆà¸­
+อี
+อี่
+อี้
+อี๊
+อี๋
+อีà¸
+อีà¸à¹‰à¸­
+อีà¸à¹‹à¸­à¸¢
+อีà¸à¸²
+อีà¸à¹‹à¸²
+อีเà¸à¹‰à¸‡
+อีเà¸à¸£à¹‡à¸‡
+อีเà¸à¹‰à¸­à¸µà¸à¸±à¸‡
+อีà¹à¸
+อีà¹à¸à¹ˆ
+อีà¹à¸à¹‰
+อีโà¸à¹‰à¸‡
+อีโà¸à¹Šà¸°
+อีคว่ำอีหงาย
+อีจู้
+อีฉัน
+อีฉุยอีà¹à¸‰à¸
+อีชุà¸
+อี๊ด
+อีดำอีà¹à¸”ง
+อีตาล
+อีเต้อ
+อีโต้
+อีถ่าง
+อีทุà¸
+อีทุบ
+อีเทอร์
+อีนุงตุงนัง
+อีนูน
+อีโน
+อีโนงโตงเนง
+อีบึ้ง
+อีเป็ด
+อีเป้า
+อีà¹à¸›à¸°
+อีโปง
+อีโปงครอบ
+อีเพา
+อีมู
+อีรม
+อีรุ้ง
+อีลอง
+อีล่อยป่อยà¹à¸­
+อีลุ้ม
+อีลุ่ยฉุยà¹à¸‰à¸
+อีเลิ้ง
+อีà¹à¸¥à¹ˆà¸‡
+อีโลง
+อีศ
+อีศวร
+อีส
+อีสา
+อีสาน
+อีสุà¸à¸­à¸µà¹ƒà¸ª
+อีหน็องอีà¹à¸«à¸™à¹‡à¸‡
+อีหรอบ
+อีหรอบเดียวà¸à¸±à¸™
+อีหลัà¸à¸­à¸µà¹€à¸«à¸¥à¸·à¹ˆà¸­
+อีหลัดถัดทา
+อีหลี
+อีหลุà¸à¸‚ลุà¸à¸‚ลัà¸
+อีหลุà¸à¸‚ลุà¸à¸‚ลุ่ย
+อีหลุยฉุยà¹à¸‰à¸
+อีเห็น
+อีเหน็บ
+อีเหนียว
+อีเหละเขละขละ
+อีเหละเขะขะ
+อีโหน่อีเหน่
+อีโหลà¸à¹‚ขลà¸à¹€à¸‚ลà¸
+อี๋อ๋อ
+อีà¹à¸­à¹ˆà¸™
+อึ
+อึà¸
+อึ๊à¸
+อึà¸à¸—ึà¸
+อึà¸à¸­à¸±à¸
+อึง
+อึ่ง
+อึ้ง
+อึงคะนึง
+อึงมี่
+อึ่งยาง
+อึ่งใหà¸à¹ˆ
+อึงอล
+อึ่งอ่าง
+อึด
+อึดใจ
+อึดตะปือ
+อึ้ดทึ่ด
+อึดอัด
+อึน
+อืด
+อืดอาด
+อื่น
+อื้น
+อือ
+อื้อ
+อื้อฉาว
+อื้ออึง
+อุ
+อุà¸
+อุà¸à¸à¸²
+อุà¸à¸à¸²à¸šà¸²à¸•
+อุà¸à¸‰à¸à¸£à¸£à¸ˆà¹Œ
+อุà¸à¸¤à¸©à¸à¹Œ
+อุà¸à¸¥à¸²
+อุà¸à¸¥à¸²à¸šà¸²à¸•
+อุà¸à¸­à¸²à¸ˆ
+อุค
+อุคร
+อุคห-
+อุคหนิมิต
+อุคหะ
+อุโฆษ
+อุ้ง
+อุจ
+อุจจาร-
+อุจจารมรรค
+อุจจาระ
+อุจฉุ
+อุจเฉท
+อุจเฉท-
+อุจเฉททิà¸à¸´
+อุจาด
+อุชุ
+อุà¸à¸à¸²à¸à¸²à¸£
+อุณห-
+อุณหภูมิ
+อุณหะ
+อุณหาà¸à¸²à¸£
+อุณหิส
+อุณา
+อุณานาภี
+อุณาโลม
+อุด
+อุดเตา
+อุดม
+อุดม-
+อุดมà¸à¸²à¸£à¸“์
+อุดมคติ
+อุดมศึà¸à¸©à¸²
+อุดร
+อุดหนุน
+อุดอู้
+อุดาà¸à¸±à¸™
+อุตดม
+อุตดร
+อุตตมะ
+อุตตรผลคุนี
+อุตตรภัทรบท
+อุตตรอาษาฒ
+อุตตราสาฬหะ
+อุตตะภัททะ
+อุตบล
+อุตพิด
+อุตพิดผี
+อุตม-
+อุตมภาพ
+อุตมัตถ์
+อุตมางค์
+อุตร-
+อุตรà¸à¸¸à¸£à¸¸
+อุตรà¸à¸¸à¸£à¸¹
+อุตรนิà¸à¸²à¸¢
+อุตรผลคุนี
+อุตรภัทรบท
+อุตรา
+อุตราภิมุข
+อุตราวัà¸
+อุตราษาฒ
+อุตราสงค์
+อุตริ
+อุตริมนุสธรรม
+อุตลุด
+อุตสาห-
+อุตส่าห์
+อุตสาหà¸à¸£à¸£à¸¡
+อุตสาหà¸à¸£à¸£à¸¡à¸¨à¸´à¸¥à¸›à¹Œ
+อุตสาหะ
+อุตุ
+อุตุนิยมวิทยา
+อุท-
+อุทà¸
+อุทà¸-
+อุทà¸à¸˜à¸²à¸£
+อุทà¸à¸˜à¸²à¸£à¸²
+อุทà¸à¸ à¸±à¸¢
+อุทà¸à¸§à¸´à¸—ยา
+อุทà¸à¸¨à¸²à¸ªà¸•à¸£à¹Œ
+อุททาม
+อุทธรณ์
+อุทธัจ
+อุทบาตร
+อุทบาน
+อุทพินทุ์
+อุทยาน
+อุทยานà¹à¸«à¹ˆà¸‡à¸Šà¸²à¸•à¸´
+อุทร
+อุทริยะ
+อุทลุม
+อุทัช
+อุทัย
+อุทาน
+อุทาร
+อุทาหรณ์
+อุทิศ
+อุทุมพร
+อุเทศ
+อุธัจ
+อุ่น
+อุ่นเครื่อง
+อุ่นใจ
+อุ่นหนาà¸à¸²à¸„ั่ง
+อุนาà¸à¸±à¸™
+อุบ
+อุบล
+อุบอิบ
+อุบะ
+อุบ๊ะ
+อุบัติ
+อุบัติ-
+อุบัติภัย
+อุบัติเหตุ
+อุบาท
+อุบาทว์
+อุบาย
+อุบาสà¸
+อุบาสิà¸à¸²
+อุเบà¸à¸‚า
+อุโบสถ
+อุโบสถà¸à¸£à¸£à¸¡
+อุโบสถหัตถี
+อุป
+อุปà¸à¸£à¸“์
+อุปà¸à¸£à¸¡
+อุปà¸à¸²à¸£-
+อุปà¸à¸²à¸£à¸°
+อุปà¸à¸²à¸£à¸µ
+อุปà¸à¸´à¸“ณะ
+อุปà¸à¸´à¹€à¸¥à¸ª
+อุปจาร
+อุปถัมภ์
+อุปถัมภà¸
+อุปทม
+อุปทูต
+อุปเทศ
+อุปเท่ห์
+อุปธิ
+อุปนัย
+อุปนิà¸à¸‚ิต
+อุปนิà¸à¸©à¸´à¸•
+อุปนิษัท
+อุปนิสัย
+อุปบล
+อุปบัติ
+อุปบาท
+อุปปาติà¸-
+อุปพัทธ์
+อุปพันธ์
+อุปโภค
+อุปมา
+อุปมาน
+อุปมาโวหาร
+อุปมาอุปไมย
+อุปไมย
+อุปยุวราช
+อุปโยค
+อุปโยคบุรพบท
+อุปราà¸à¸£
+อุปราคา
+อุปราช
+อุปริ
+อุปริจร
+อุปริพุทธิ
+อุปริภาค
+อุปริภาพ
+อุปริม-
+อุปริมปริยาย
+อุปริวัสน์
+อุปริสัจ
+อุปโลà¸à¸™à¹Œ
+อุปสมบท
+อุปสมบทà¸à¸£à¸£à¸¡
+อุปสมบัน
+อุปสรรค
+อุปสัมบัน
+อุปสัมปทา
+อุปสัมปทาเปà¸à¸‚์
+อุปสัมปทาเปà¸à¸©à¹Œ
+อุปฮาด
+อุปัชฌาย-
+อุปัชฌาย์
+อุปัชฌายวัตร
+อุปัชฌายะ
+อุปัà¸à¸à¸²à¸
+อุปัà¸à¸à¸²à¸™à¸°
+อุปัทรพ
+อุปัทว-
+อุปัทวะ
+อุปัทวันตราย
+อุปาณ-
+อุปาทาน
+อุปาธยาย
+อุปาหนา
+อุภัย
+อุ้ม
+อุมงค์
+อุ้มชู
+อุ้มท้อง
+อุ้มน้ำ
+อุ้มสม
+อุโมงค์
+อุย
+อุ่ย
+อุ้ย
+อุ๊ย
+อุยยาน
+อุยยาม
+อุ้ยยุ้ย
+อุยโยค
+อุยหน่า
+อุ่ยหน่า
+อุ้ยอ้าย
+อุร-
+อุรค
+อุรเคนทร์
+อุรณ
+อุรพี
+อุรส
+อุระ
+อุรังอุตัง
+อุรัจฉทะ
+อุรัจฉัท
+อุรา
+อุรุ
+อุไร
+อุลปนะ
+อุลโลจ
+อุลโลละ
+อุลามà¸
+อุลิด
+อุลูà¸
+อุโลà¸
+อุà¹à¸§à¹‰
+อุษณ-
+อุษณà¸à¸£
+อุษณà¸à¸²à¸¥
+อุษณรัศมี
+อุษณรูจี
+อุษณาà¸à¸²à¸£
+อุษณีษ์
+อุษม
+อุษมัน
+อุษา
+อุษาโยค
+อุสภ
+อุสวะ
+อุสส่าห์
+อุสสาหะ
+อุสา
+อุสุ
+อุสุà¸à¸²à¸£
+อุสุภ
+อุสุม
+อุหรับ
+อุหลบ
+อุเหม่
+อุฬาร
+อู
+อู่
+อู้
+อูà¸
+อูด
+อู่น้ำ
+อูม
+อูย
+อูรุ
+อู่ลอย
+อู่à¹à¸«à¹‰à¸‡
+อู้อี้
+อู๋อี๋
+เอ
+เอ้
+เอà¸
+เอà¸-
+เอ๊à¸
+เอà¸à¹€à¸‚นà¸
+เอà¸à¸ˆà¸´à¸•
+เอà¸à¸‰à¸±à¸™à¸—์
+เอà¸à¸Šà¸™
+เอà¸à¸‹à¹€à¸£à¸¢à¹Œ
+เอà¸à¹€à¸—ศ
+เอà¸à¹‚ทษ
+เอà¸à¸™à¸±à¸¢
+เอà¸à¸šà¸¸à¸„คล
+เอà¸à¸šà¸¸à¸£à¸¸à¸©
+เอà¸à¸žà¸ˆà¸™à¹Œ
+เอà¸à¸ à¸ž
+เอà¸à¸ à¸£à¸´à¸¢à¸²
+เอà¸à¸ à¸±à¸à¸”ิ์
+เอà¸à¸ à¸²à¸„ี
+เอà¸à¸ à¸²à¸ž
+เอà¸à¸¡
+เอà¸à¸¡à¸±à¸¢
+เอà¸à¸£à¸£à¸–ประโยค
+เอà¸à¸£à¸ª
+เอà¸à¸£à¸°
+เอà¸à¸£à¸²à¸Š
+เอà¸à¸£à¸¹à¸›
+เอà¸à¸¥à¸±à¸à¸©à¸“์
+เอà¸à¸¨à¸
+เอà¸à¸ª
+เอà¸à¸ªà¸²à¸£
+เอà¸à¸ªà¸²à¸£à¸£à¸²à¸Šà¸à¸²à¸£
+เอà¸à¸ªà¸²à¸£à¸ªà¸´à¸—ธิ
+เอà¸à¸ªà¸´à¸—ธิ์
+เอà¸à¸­à¸±à¸„รราชทูต
+เอà¸à¸­à¸±à¸„รสมณทูต
+เอà¸à¸­à¸¸
+เอà¸à¸±à¸„ตา
+เอà¸à¸±à¸‡à¸ªà¸žà¸¢à¸²à¸à¸£à¸“์
+เอà¸à¸±à¸‡à¸ªà¸§à¸²à¸—ี
+เอà¸à¸²
+เอ้à¸à¸²
+เอà¸à¸²à¸˜à¸´à¸›à¹„ตย
+เอเคอร์
+เอง
+เอ็ง
+เอ๋ง
+เอ็ด
+เอ็ดตะโร
+เอ็ดอึง
+เอตทัคคะ
+เอ้เต
+เอทิลà¹à¸­à¸¥à¸à¸­à¸®à¸­à¸¥à¹Œ
+เอน
+เอ็น
+เอนà¸à¸²à¸¢
+เอนไซม์
+เอ็นดู
+เอนตัว
+เอนหลัง
+เอ็นอ่อน
+เอนเอียง
+เอม
+เอ็มบริโอ
+เอมอร
+เอมโอช
+เอย
+เอ่ย
+เอ๊ย
+เอ๋ย
+เอร็ดอร่อย
+เอราวัณ
+เอลา
+เอลาฬุà¸
+เอว
+เอ๊ว
+เอวัง
+เอฬà¸
+เอฬา
+เออ
+เอ่อ
+เออๆ คะๆ
+เออน่ะ
+เออà¹à¸™à¹ˆà¸°
+เออร์เบียม
+เอ้อระเหย
+เอ้อเร้อ
+เอ้อเร้อเอ้อเต่อ
+เอออวย
+เออออ
+เออออห่อหมà¸
+เอ้อเฮอ
+เอ้à¹à¸­à¹ˆà¸™
+เอ้ๆ à¹à¸­à¹ˆà¸™à¹†
+เอ๊ะ
+เอะใจ
+เอะอะ
+เอะอะมะเทิ่ง
+เอา
+เอาà¸à¸²à¸£
+เอาà¸à¸²à¸£à¹€à¸­à¸²à¸‡à¸²à¸™
+เอาà¸à¸¸à¹‰à¸‡à¸à¸­à¸¢à¹„ปตà¸à¸›à¸¥à¸²à¸à¸°à¸žà¸‡
+เอาข้างเข้าถู
+เอางาน
+เอาจมูà¸à¸œà¸¹à¹‰à¸­à¸·à¹ˆà¸™à¸¡à¸²à¸«à¸²à¸¢à¹ƒà¸ˆ
+เอาจริง
+เอาจริงเอาจัง
+เอาใจ
+เอาใจช่วย
+เอาใจใส่
+เอาชนะ
+เอาชั้นเอาเชิง
+เอาชัย
+เอาชีวิต
+เอาชื่อ
+เอาเชิง
+เอาใช้
+เอาดีเอาเด่น
+เอาตาย
+เอาà¹à¸•à¹ˆ
+เอาà¹à¸•à¹ˆà¹ƒà¸ˆ
+เอาถ่าน
+เอาเถิด
+เอาเถิดเจ้าล่อ
+เอาทองไปรู่à¸à¸£à¸°à¹€à¸šà¸·à¹‰à¸­à¸‡
+เอาทาร
+เอาทารย์
+เอาน้ำเย็นเข้าลูบ
+เอาน้ำลูบท้อง
+เอาเนื้อหนูไปปะเนื้อช้าง
+เอาบุà¸à¹€à¸­à¸²à¸„ุณ
+เอาปูนหมายหัว
+เอาเป็นธุระ
+เอาเป็นว่า
+เอาเป็นเอาตาย
+เอาเปรียบ
+เอาผิด
+เอาพิมเสนไปà¹à¸¥à¸à¹€à¸à¸¥à¸·à¸­
+เอามะพร้าวห้าวไปขายสวน
+เอามือซุà¸à¸«à¸µà¸š
+เอาไม้ซีà¸à¹„ปงัดไม้ซุง
+เอาไม้สั้นไปรันขี้
+เอารส
+เอารัดเอาเปรียบ
+เอาเรื่อง
+เอาฤà¸à¸©à¹Œ
+เอาละ
+เอาเลย
+เอาเลือดà¸à¸±à¸šà¸›à¸¹
+เอาหน้า
+เอาหูไปนา เอาตาไปไร่
+เอาใหà¸à¹ˆ
+เอาฬาร
+เอาฬาริà¸
+เอาฬารึà¸
+เอาอà¸à¹€à¸­à¸²à¹ƒà¸ˆ
+เอาอย่าง
+เอาอยู่
+เอาะลาย
+เอิà¸
+เอิà¸à¹€à¸à¸£à¸´à¸
+เอิ้น
+เอิบ
+เอิบอาบ
+เอียง
+เอี้ยง
+เอี้ยงคำ
+เอียงอาย
+เอียงเอน
+เอียด
+เอี๊ยด
+เอียน
+เอี่ยน
+เอี่ยม
+เอี๊ยม
+เอี้ยมจุ๊น
+เอี้ยมเฟี้ยม
+เอี่ยมอ่อง
+เอี่ยว
+เอี้ยว
+เอี่ยวลม
+เอื้อ
+เอื้อง
+เอื้องครั่ง
+เอื้องน้ำครั่ง
+เอื้องศรีเที่ยง
+เอื้องหนวดพราหมณ์
+เอือด
+เอือน
+เอื้อน
+เอือนà¸à¸´à¸™
+เอื้อเฟื้อ
+เอือม
+เอื้อม
+เอื้อมอาจ
+เอื่อย
+เอื่อยๆ
+เอื้อย
+เอื้ออำนวย
+à¹à¸­
+à¹à¸­à¹‰
+à¹à¸­à¹‹
+à¹à¸­à¸
+à¹à¸­à¸à¸—ิเนียม
+à¹à¸­à¸à¸™à¹‰à¸­à¸¢
+à¹à¸­à¹ˆà¸‡
+à¹à¸­à¹‰à¸‡à¹à¸¡à¹‰à¸‡
+à¹à¸­à¸”
+à¹à¸­à¸”ๆ
+à¹à¸­à¹‰à¸”
+à¹à¸­à¹‰à¸”ๆ
+à¹à¸­à¹Šà¸”
+à¹à¸­à¹Šà¸”ๆ
+à¹à¸­à¹ˆà¸™
+à¹à¸­à¸™à¸•à¸´à¹€à¸ˆà¸™
+à¹à¸­à¸™à¸•à¸´à¸šà¸­à¸”ี
+à¹à¸­à¸™à¸•à¸´à¸­à¸´à¹€à¸¥à¹‡à¸à¸•à¸£à¸­à¸™
+à¹à¸­à¹ˆà¸™à¸¥à¸¡
+à¹à¸­à¹‚นด
+à¹à¸­à¸š
+à¹à¸­à¸šà¹à¸à¸‡
+à¹à¸­à¸šà¸­à¹‰à¸²à¸‡
+à¹à¸­à¸šà¸­à¸´à¸‡
+à¹à¸­à¹‰à¸¡
+à¹à¸­à¸¡à¹à¸›à¸£à¹Œ
+à¹à¸­à¸¡à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ
+à¹à¸­à¸¡à¹‚มเนีย
+à¹à¸­à¸£à¹ˆà¸¡
+à¹à¸­à¸¥à¸à¸­à¸®à¸­à¸¥à¹Œ
+à¹à¸­à¸¥à¸Ÿà¸²
+à¹à¸­à¸§
+à¹à¸­à¹ˆà¸§
+à¹à¸­à¹‰à¸§à¹à¸‹à¹ˆà¸§
+à¹à¸­à¸ªà¸—าทีน
+à¹à¸­à¸ªà¹„พริน
+à¹à¸­à¸ªà¸Ÿà¸±à¸¥à¸•à¹Œ
+à¹à¸­à¸«à¸™à¸±à¸‡
+à¹à¸­à¸­à¸§à¸¢
+à¹à¸­à¸­à¸±à¸”
+โอ
+โอ่
+โอ้
+โอ๋
+โอà¸
+โอ้à¸
+โอ๊à¸
+โอà¸à¸²à¸ª
+โอฆ-
+โอฆชล
+โอฆสงสาร
+โอฆะ
+โอ่ง
+โองà¸à¸²à¸£
+โองโขดง
+โอ่งมังà¸à¸£
+โอชะ
+โอชา
+โอโซน
+โอà¸
+โอด
+โอดà¸à¸²à¹€à¸«à¸§à¹ˆà¸²
+โอดครวà¸
+โอดโอย
+โอ๊ต
+โอตตัปปะ
+โอ่โถง
+โอ้โถง
+โอทน-
+โอทนะ
+โอน
+โอนà¸à¸£à¸£à¸¡à¸ªà¸´à¸—ธิ์
+โอนชาติ
+โอนอ่อน
+โอนเอน
+โอบ
+โอบอ้อมอารี
+โอบอุ้ม
+โอบเอื้อ
+โอปปาติà¸à¸°
+โอภา
+โอภาปราศรัย
+โอภาส
+โอม
+โอย
+โอ๊ย
+โอร-
+โอรส
+โอละพ่อ
+โอลิมปิà¸
+โอ้โลม
+โอ้โลมปà¸à¸´à¹‚ลม
+โอ้ว่า
+โอวาท
+โอษà¸-
+โอษà¸à¹Œ
+โอษà¸à¸Šà¸°
+โอษà¸à¸ à¸±à¸¢
+โอสถ
+โอสถ-
+โอสถà¸à¸£à¸£à¸¡
+โอสาน
+โอหนอ
+โอห์ม
+โอห์มมิเตอร์
+โอหัง
+โอฬาร
+โอฬาริà¸
+โอฬารึà¸
+โอ่อวด
+โอ้อวด
+โอ่อ่า
+โอ้เอ้
+โอเอซิส
+โอ้โฮ
+ไอ
+ไอ้
+ไอà¸à¸£à¸™
+ไอโซโทป
+ไอà¹à¸”ด
+ไอตัว
+ไอน์สไตเนียม
+ไอพ่น
+ไอพิษ
+ไอยรา
+ไอยเรศ
+ไอราพต
+ไอราวัณ
+ไอศà¸à¸£à¸µà¸¡
+ไอศวรรย์
+ไอศุริย-
+ไอศุริยสมบัติ
+ไอศูรย์
+ไอเสีย
+ไอออน
+ไอโอดีน
+ฮ
+ฮà¸à¹€à¸à¸µà¹‰à¸¢à¸™
+ฮด
+ฮวงซุ้ย
+ฮวน
+ฮ้วนหมู
+ฮวบ
+ฮวบฮาบ
+ฮ่อ
+ฮ้อ
+ฮอà¸à¸à¸µà¹‰
+ฮอด
+ฮ่อม
+ฮ่อมดง
+ฮ่อมเมือง
+ฮอร์โมน
+ฮอลà¹à¸¥à¸™à¸”์
+ฮอลันดา
+ฮะ
+ฮะฮ้าย
+ฮะไฮ้
+ฮัà¸
+ฮัà¸à¹†
+ฮังเล
+ฮัจà¸à¹Œ
+ฮัจà¸à¸°à¸®à¹Œ
+ฮัจà¸à¸µ
+ฮั่น
+ฮา
+ฮ้า
+ฮ่างหลวง
+ฮาป่า
+ฮาม
+ฮาเร็ม
+ฮาห์เนียม
+ฮ้าไฮ้
+ฮิจเราะห์
+ฮินดู
+ฮิปโปโปเตมัส
+ฮิสทีเรีย
+ฮีเลียม
+ฮึ
+ฮึà¸
+ฮึà¸à¸«à¸²à¸
+ฮึà¸à¸«à¹‰à¸²à¸§
+ฮึà¸à¹€à¸«à¸´à¸¡
+ฮึà¸à¹‚หม
+ฮึà¸à¸®à¸±à¸
+ฮึด
+ฮึดฮัด
+ฮึ่ม
+ฮึย
+ฮึยๆ
+ฮึ่ย
+ฮืดฮาด
+ฮือ
+ฮือๆ
+ฮื่อ
+ฮื้อ
+ฮุด
+ฮุบ
+ฮุยเลฮุย
+ฮู้
+ฮูà¸
+ฮูม
+เฮ
+เฮà¸à¸•à¸²à¸£à¹Œ
+เฮà¸à¹‚ตà¸à¸£à¸±à¸¡
+เฮà¸à¹‚ตเมตร
+เฮà¸à¹‚ตลิตร
+เฮง
+เฮงซวย
+เฮ็ด
+เฮโมโà¸à¸¥à¸šà¸´à¸™
+เฮย
+เฮ้ย
+เฮโรอีน
+เฮลิคอปเตอร์
+เฮโลสาระพา
+เฮ้ว
+เฮอ
+เฮ้อ
+เฮฮา
+เฮิรตซ์
+เฮี้ยน
+เฮี้ยบ
+เฮี้ยว
+เฮือà¸
+เฮือà¸à¹†
+เฮือà¸à¸ªà¸¸à¸”ท้าย
+เฮือน
+à¹à¸®
+à¹à¸®à¹ˆ
+à¹à¸®à¸
+à¹à¸®à¸à¹†
+à¹à¸®à¹ˆà¸à¸¶à¹Šà¸™
+à¹à¸®à¸™à¸”์บอล
+à¹à¸®à¸Ÿà¹€à¸™à¸µà¸¢à¸¡
+à¹à¸®à¸¡
+à¹à¸®à¸°
+โฮ
+โฮà¸
+โฮà¸à¸­à¸·à¸­
+โฮà¸à¸®à¸²à¸
+โฮเต็ล
+โฮลเมียม
+โฮะ
+ไฮ้
+ไฮโà¸à¸£à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ
+ไฮดรา
+ไฮโดรคาร์บอน
+ไฮโดรเจน
+ไฮโดรเจนซัลไฟด์
+ไฮโดรเจนเพอร์ออà¸à¹„ซด์
+ไฮโดรมิเตอร์
+ไฮไฟ
+ไฮโล
+ไฮฮี
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/root.txt b/Build/source/libs/icu/icu-xetex/test/testdata/root.txt
new file mode 100644
index 00000000000..dc5d7982ffe
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/root.txt
@@ -0,0 +1,109 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 1998-2005, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+
+// This is a test default locale file
+
+root
+{
+ Version { 44.0 }
+
+ ShortLanguage { xxx }
+
+ string_only_in_Root { ROOT }
+
+ array_only_in_Root { ROOT0, ROOT1, ROOT2, ROOT3 }
+
+ array_2d_only_in_Root
+ {
+ { ROOT00, ROOT01 }
+ { ROOT10, ROOT11 }
+ }
+
+ tagged_array_only_in_Root
+ {
+ tag2 { ROOT2 }
+ tag1 { ROOT1 }
+ tag3 { ROOT3 }
+ tag6 { ROOT6 }
+ tag12 { ROOT12 }
+ tag7 { ROOT7 }
+ tag14 { ROOT14 }
+ tag9 { ROOT9 }
+ }
+
+ string_in_Root_te_te_IN { ROOT }
+
+ array_in_Root_te_te_IN { ROOT0, ROOT1, ROOT2, ROOT3, ROOT4 }
+
+ array_2d_in_Root_te_te_IN
+ {
+ { ROOT00, ROOT01, ROOT02 }
+ { ROOT10, ROOT11, ROOT12 }
+ { ROOT20, ROOT21, ROOT22 }
+ { ROOT30, ROOT31, ROOT32 }
+ }
+
+ tagged_array_in_Root_te_te_IN
+ {
+ tag4 { ROOT4 }
+ tag9 { ROOT9 }
+ tag12 { ROOT12 }
+ tag1 { ROOT1 }
+ }
+
+ string_in_Root_te { ROOT }
+
+ array_in_Root_te { ROOT0, ROOT1, ROOT2, ROOT3, ROOT4 }
+
+ array_2d_in_Root_te
+ {
+ { ROOT00, ROOT01, ROOT02 }
+ { ROOT10, ROOT11, ROOT12 }
+ { ROOT20, ROOT21, ROOT22 }
+ { ROOT30, ROOT31, ROOT32 }
+ }
+
+ tagged_array_in_Root_te
+ {
+ tag12 { ROOT12 }
+ tag1 { ROOT1 }
+ tag7 { ROOT7 }
+ tag3 { ROOT3 }
+ }
+
+ string_in_Root_te_IN { ROOT }
+
+ array_in_Root_te_IN { ROOT0, ROOT1, ROOT2 }
+
+ array_2d_in_Root_te_IN
+ {
+ { ROOT00, ROOT01, ROOT02, ROOT03 }
+ { ROOT10, ROOT11, ROOT12, ROOT13 }
+ { ROOT20, ROOT21, ROOT22, ROOT23 }
+ }
+
+ tagged_array_in_Root_te_IN
+ {
+ tag13 { ROOT13 }
+ tag8 { ROOT8 }
+ }
+ rootAliasClient:alias {"/LOCALE/rootAliasDestination"}
+ rootAliasDestination {"wrong"}
+ nestedRootAliasClient:alias {"/LOCALE/rootAliasTable/destination"}
+ rootAliasTable {
+ destination { "correct" }
+ }
+ a {
+ a1{"ar1"}
+ a2{"ar2"}
+ a3{"ar3"}
+ a4{"ar4"}
+ }
+}
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/sh.txt b/Build/source/libs/icu/icu-xetex/test/testdata/sh.txt
new file mode 100644
index 00000000000..0519dadac21
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/sh.txt
@@ -0,0 +1,14 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 2005, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+sh{
+ a{
+ a1{"a01"}
+ a2{"a02"}
+ a3{"a03"}
+ }
+ } \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/sh_YU.txt b/Build/source/libs/icu/icu-xetex/test/testdata/sh_YU.txt
new file mode 100644
index 00000000000..bdd009d8b02
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/sh_YU.txt
@@ -0,0 +1,12 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 2005, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+sh_YU{
+ a{
+ a2{"a12"}
+ }
+ } \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/structLocale.txt b/Build/source/libs/icu/icu-xetex/test/testdata/structLocale.txt
new file mode 100644
index 00000000000..9a540119db4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/structLocale.txt
@@ -0,0 +1,10966 @@
+// ***************************************************************************
+// *
+// * Copyright (C) 2004-2007 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// *
+// ***************************************************************************
+// This is a pristine locale structure.
+// This is used to validate all keys and general structure is correct.
+// Since ICU doesn't follow the traditional fallback model where all keys fallback to root,
+// root can't be used to validate the structure.
+// This file was generated from en.txt, and all ".*" were replaced with "".
+structLocale:table(nofallback){
+ BreakDictionaryData:bin {00}
+ Countries{
+ 001{""}
+ 002{""}
+ 003{""}
+ 005{""}
+ 009{""}
+ 011{""}
+ 013{""}
+ 014{""}
+ 015{""}
+ 017{""}
+ 018{""}
+ 019{""}
+ 021{""}
+ 029{""}
+ 030{""}
+ 034{""}
+ 035{""}
+ 039{""}
+ 053{""}
+ 054{""}
+ 057{""}
+ 061{""}
+ 062{""}
+ 142{""}
+ 143{""}
+ 145{""}
+ 150{""}
+ 151{""}
+ 154{""}
+ 155{""}
+ 172{""}
+ 200{""}
+ 419{""}
+ 830{""}
+ AD{""}
+ AE{""}
+ AF{""}
+ AG{""}
+ AI{""}
+ AL{""}
+ AM{""}
+ AN{""}
+ AO{""}
+ AQ{""}
+ AR{""}
+ AS{""}
+ AT{""}
+ AU{""}
+ AW{""}
+ AX{""}
+ AZ{""}
+ BA{""}
+ BB{""}
+ BD{""}
+ BE{""}
+ BF{""}
+ BG{""}
+ BH{""}
+ BI{""}
+ BJ{""}
+ BL{""}
+ BM{""}
+ BN{""}
+ BO{""}
+ BR{""}
+ BS{""}
+ BT{""}
+ BV{""}
+ BW{""}
+ BY{""}
+ BZ{""}
+ CA{""}
+ CC{""}
+ CD{""}
+ CF{""}
+ CG{""}
+ CH{""}
+ CI{""}
+ CK{""}
+ CL{""}
+ CM{""}
+ CN{""}
+ CO{""}
+ CR{""}
+ CS{""}
+ CU{""}
+ CV{""}
+ CX{""}
+ CY{""}
+ CZ{""}
+ DE{""}
+ DJ{""}
+ DK{""}
+ DM{""}
+ DO{""}
+ DZ{""}
+ EC{""}
+ EE{""}
+ EG{""}
+ EH{""}
+ ER{""}
+ ES{""}
+ ET{""}
+ FI{""}
+ FJ{""}
+ FK{""}
+ FM{""}
+ FO{""}
+ FR{""}
+ GA{""}
+ GB{""}
+ GD{""}
+ GE{""}
+ GF{""}
+ GG{""}
+ GH{""}
+ GI{""}
+ GL{""}
+ GM{""}
+ GN{""}
+ GP{""}
+ GQ{""}
+ GR{""}
+ GS{""}
+ GT{""}
+ GU{""}
+ GW{""}
+ GY{""}
+ HK{""}
+ HM{""}
+ HN{""}
+ HR{""}
+ HT{""}
+ HU{""}
+ ID{""}
+ IE{""}
+ IL{""}
+ IM{""}
+ IN{""}
+ IO{""}
+ IQ{""}
+ IR{""}
+ IS{""}
+ IT{""}
+ JE{""}
+ JM{""}
+ JO{""}
+ JP{""}
+ KE{""}
+ KG{""}
+ KH{""}
+ KI{""}
+ KM{""}
+ KN{""}
+ KP{""}
+ KR{""}
+ KW{""}
+ KY{""}
+ KZ{""}
+ LA{""}
+ LB{""}
+ LC{""}
+ LI{""}
+ LK{""}
+ LR{""}
+ LS{""}
+ LT{""}
+ LU{""}
+ LV{""}
+ LY{""}
+ MA{""}
+ MC{""}
+ MD{""}
+ ME{""}
+ MF{""}
+ MG{""}
+ MH{""}
+ MK{""}
+ ML{""}
+ MM{""}
+ MN{""}
+ MO{""}
+ MP{""}
+ MQ{""}
+ MR{""}
+ MS{""}
+ MT{""}
+ MU{""}
+ MV{""}
+ MW{""}
+ MX{""}
+ MY{""}
+ MZ{""}
+ NA{""}
+ NC{""}
+ NE{""}
+ NF{""}
+ NG{""}
+ NI{""}
+ NL{""}
+ NO{""}
+ NP{""}
+ NR{""}
+ NU{""}
+ NZ{""}
+ OM{""}
+ PA{""}
+ PE{""}
+ PF{""}
+ PG{""}
+ PH{""}
+ PK{""}
+ PL{""}
+ PM{""}
+ PN{""}
+ PR{""}
+ PS{""}
+ PT{""}
+ PW{""}
+ PY{""}
+ QA{""}
+ QO{""}
+ QU{""}
+ RE{""}
+ RO{""}
+ RS{""}
+ RU{""}
+ RW{""}
+ SA{""}
+ SB{""}
+ SC{""}
+ SD{""}
+ SE{""}
+ SG{""}
+ SH{""}
+ SI{""}
+ SJ{""}
+ SK{""}
+ SL{""}
+ SM{""}
+ SN{""}
+ SO{""}
+ SR{""}
+ ST{""}
+ SV{""}
+ SY{""}
+ SZ{""}
+ TC{""}
+ TD{""}
+ TF{""}
+ TG{""}
+ TH{""}
+ TJ{""}
+ TK{""}
+ TL{""}
+ TM{""}
+ TN{""}
+ TO{""}
+ TR{""}
+ TT{""}
+ TV{""}
+ TW{""}
+ TZ{""}
+ UA{""}
+ UG{""}
+ UM{""}
+ US{""}
+ UY{""}
+ UZ{""}
+ VA{""}
+ VC{""}
+ VE{""}
+ VG{""}
+ VI{""}
+ VN{""}
+ VU{""}
+ WF{""}
+ WS{""}
+ YE{""}
+ YT{""}
+ ZA{""}
+ ZM{""}
+ ZW{""}
+ ZZ{""}
+ }
+ Currencies{
+ ADP{
+ "",
+ "",
+ }
+ AED{
+ "",
+ "",
+ }
+ AFA{
+ "",
+ "",
+ }
+ AFN{
+ "",
+ "",
+ }
+ ALL{
+ "",
+ "",
+ }
+ AMD{
+ "",
+ "",
+ }
+ ANG{
+ "",
+ "",
+ }
+ AOA{
+ "",
+ "",
+ }
+ AOK{
+ "",
+ "",
+ }
+ AON{
+ "",
+ "",
+ }
+ AOR{
+ "",
+ "",
+ }
+ ARA{
+ "",
+ "",
+ }
+ ARP{
+ "",
+ "",
+ }
+ ARS{
+ "",
+ "",
+ }
+ ATS{
+ "",
+ "",
+ }
+ AUD{
+ "",
+ "",
+ }
+ AWG{
+ "",
+ "",
+ }
+ AZM{
+ "",
+ "",
+ }
+ AZN{
+ "",
+ "",
+ }
+ BAD{
+ "",
+ "",
+ }
+ BAM{
+ "",
+ "",
+ }
+ BBD{
+ "",
+ "",
+ }
+ BDT{
+ "",
+ "",
+ }
+ BEC{
+ "",
+ "",
+ }
+ BEF{
+ "",
+ "",
+ }
+ BEL{
+ "",
+ "",
+ }
+ BGL{
+ "",
+ "",
+ }
+ BGN{
+ "",
+ "",
+ }
+ BHD{
+ "",
+ "",
+ }
+ BIF{
+ "",
+ "",
+ }
+ BMD{
+ "",
+ "",
+ }
+ BND{
+ "",
+ "",
+ }
+ BOB{
+ "",
+ "",
+ }
+ BOP{
+ "",
+ "",
+ }
+ BOV{
+ "",
+ "",
+ }
+ BRB{
+ "",
+ "",
+ }
+ BRC{
+ "",
+ "",
+ }
+ BRE{
+ "",
+ "",
+ }
+ BRL{
+ "",
+ "",
+ }
+ BRN{
+ "",
+ "",
+ }
+ BRR{
+ "",
+ "",
+ }
+ BSD{
+ "",
+ "",
+ }
+ BTN{
+ "",
+ "",
+ }
+ BUK{
+ "",
+ "",
+ }
+ BWP{
+ "",
+ "",
+ }
+ BYB{
+ "",
+ "",
+ }
+ BYR{
+ "",
+ "",
+ }
+ BZD{
+ "",
+ "",
+ }
+ CAD{
+ "",
+ "",
+ }
+ CDF{
+ "",
+ "",
+ }
+ CHE{
+ "",
+ "",
+ }
+ CHF{
+ "",
+ "",
+ }
+ CHW{
+ "",
+ "",
+ }
+ CLF{
+ "",
+ "",
+ }
+ CLP{
+ "",
+ "",
+ }
+ CNY{
+ "",
+ "",
+ }
+ CNX{
+ "",
+ "",
+ }
+ COP{
+ "",
+ "",
+ }
+ COU{
+ "",
+ "",
+ }
+ CRC{
+ "",
+ "",
+ }
+ CSD{
+ "",
+ "",
+ }
+ CSK{
+ "",
+ "",
+ }
+ CUP{
+ "",
+ "",
+ }
+ CVE{
+ "",
+ "",
+ }
+ CYP{
+ "",
+ "",
+ }
+ CZK{
+ "",
+ "",
+ }
+ DDM{
+ "",
+ "",
+ }
+ DEM{
+ "",
+ "",
+ }
+ DJF{
+ "",
+ "",
+ }
+ DKK{
+ "",
+ "",
+ }
+ DOP{
+ "",
+ "",
+ }
+ DZD{
+ "",
+ "",
+ }
+ ECS{
+ "",
+ "",
+ }
+ ECV{
+ "",
+ "",
+ }
+ EEK{
+ "",
+ "",
+ }
+ EGP{
+ "",
+ "",
+ }
+ EQE{
+ "",
+ "",
+ }
+ ERN{
+ "",
+ "",
+ }
+ ESA{
+ "",
+ "",
+ }
+ ESB{
+ "",
+ "",
+ }
+ ESP{
+ "",
+ "",
+ }
+ ETB{
+ "",
+ "",
+ }
+ EUR{
+ "",
+ "",
+ }
+ FIM{
+ "",
+ "",
+ }
+ FJD{
+ "",
+ "",
+ }
+ FKP{
+ "",
+ "",
+ }
+ FRF{
+ "",
+ "",
+ }
+ GBP{
+ "",
+ "",
+ }
+ GEK{
+ "",
+ "",
+ }
+ GEL{
+ "",
+ "",
+ }
+ GHC{
+ "",
+ "",
+ }
+ GHS{
+ "",
+ "",
+ }
+ GIP{
+ "",
+ "",
+ }
+ GMD{
+ "",
+ "",
+ }
+ GNF{
+ "",
+ "",
+ }
+ GNS{
+ "",
+ "",
+ }
+ GQE{
+ "",
+ "",
+ }
+ GRD{
+ "",
+ "",
+ }
+ GTQ{
+ "",
+ "",
+ }
+ GWE{
+ "",
+ "",
+ }
+ GWP{
+ "",
+ "",
+ }
+ GYD{
+ "",
+ "",
+ }
+ HKD{
+ "",
+ "",
+ }
+ HNL{
+ "",
+ "",
+ }
+ HRD{
+ "",
+ "",
+ }
+ HRK{
+ "",
+ "",
+ }
+ HTG{
+ "",
+ "",
+ }
+ HUF{
+ "",
+ "",
+ }
+ IDR{
+ "",
+ "",
+ }
+ IEP{
+ "",
+ "",
+ }
+ ILP{
+ "",
+ "",
+ }
+ ILS{
+ "",
+ "",
+ }
+ INR{
+ "",
+ "",
+ }
+ IQD{
+ "",
+ "",
+ }
+ IRR{
+ "",
+ "",
+ }
+ ISK{
+ "",
+ "",
+ }
+ ITL{
+ "",
+ "",
+ }
+ JMD{
+ "",
+ "",
+ }
+ JOD{
+ "",
+ "",
+ }
+ JPY{
+ "",
+ "",
+ }
+ KES{
+ "",
+ "",
+ }
+ KGS{
+ "",
+ "",
+ }
+ KHR{
+ "",
+ "",
+ }
+ KMF{
+ "",
+ "",
+ }
+ KPW{
+ "",
+ "",
+ }
+ KRW{
+ "",
+ "",
+ }
+ KWD{
+ "",
+ "",
+ }
+ KYD{
+ "",
+ "",
+ }
+ KZT{
+ "",
+ "",
+ }
+ LAK{
+ "",
+ "",
+ }
+ LBP{
+ "",
+ "",
+ }
+ LKR{
+ "",
+ "",
+ }
+ LRD{
+ "",
+ "",
+ }
+ LSL{
+ "",
+ "",
+ }
+ LSM{
+ "",
+ "",
+ }
+ LTL{
+ "",
+ "",
+ }
+ LTT{
+ "",
+ "",
+ }
+ LUC{
+ "",
+ "",
+ }
+ LUF{
+ "",
+ "",
+ }
+ LUL{
+ "",
+ "",
+ }
+ LVL{
+ "",
+ "",
+ }
+ LVR{
+ "",
+ "",
+ }
+ LYD{
+ "",
+ "",
+ }
+ MAD{
+ "",
+ "",
+ }
+ MAF{
+ "",
+ "",
+ }
+ MDL{
+ "",
+ "",
+ }
+ MGA{
+ "",
+ "",
+ }
+ MGF{
+ "",
+ "",
+ }
+ MKD{
+ "",
+ "",
+ }
+ MLF{
+ "",
+ "",
+ }
+ MMK{
+ "",
+ "",
+ }
+ MNT{
+ "",
+ "",
+ }
+ MOP{
+ "",
+ "",
+ }
+ MRO{
+ "",
+ "",
+ }
+ MTL{
+ "",
+ "",
+ }
+ MTP{
+ "",
+ "",
+ }
+ MUR{
+ "",
+ "",
+ }
+ MVR{
+ "",
+ "",
+ }
+ MWK{
+ "",
+ "",
+ }
+ MXN{
+ "",
+ "",
+ }
+ MXP{
+ "",
+ "",
+ }
+ MXV{
+ "",
+ "",
+ }
+ MYR{
+ "",
+ "",
+ }
+ MZE{
+ "",
+ "",
+ }
+ MZM{
+ "",
+ "",
+ }
+ MZN{
+ "",
+ "",
+ }
+ NAD{
+ "",
+ "",
+ }
+ NGN{
+ "",
+ "",
+ }
+ NIC{
+ "",
+ "",
+ }
+ NIO{
+ "",
+ "",
+ }
+ NLG{
+ "",
+ "",
+ }
+ NOK{
+ "",
+ "",
+ }
+ NPR{
+ "",
+ "",
+ }
+ NZD{
+ "",
+ "",
+ }
+ OMR{
+ "",
+ "",
+ }
+ PAB{
+ "",
+ "",
+ }
+ PEI{
+ "",
+ "",
+ }
+ PEN{
+ "",
+ "",
+ }
+ PES{
+ "",
+ "",
+ }
+ PGK{
+ "",
+ "",
+ }
+ PHP{
+ "",
+ "",
+ }
+ PKR{
+ "",
+ "",
+ }
+ PLN{
+ "",
+ "",
+ }
+ PLZ{
+ "",
+ "",
+ }
+ PTE{
+ "",
+ "",
+ }
+ PYG{
+ "",
+ "",
+ }
+ QAR{
+ "",
+ "",
+ }
+ RHD{
+ "",
+ "",
+ }
+ ROL{
+ "",
+ "",
+ }
+ RON{
+ "",
+ "",
+ }
+ RSD{
+ "",
+ "",
+ }
+ RUB{
+ "",
+ "",
+ }
+ RUR{
+ "",
+ "",
+ }
+ RWF{
+ "",
+ "",
+ }
+ SAR{
+ "",
+ "",
+ }
+ SBD{
+ "",
+ "",
+ }
+ SCR{
+ "",
+ "",
+ }
+ SDD{
+ "",
+ "",
+ }
+ SDG{
+ "",
+ "",
+ }
+ SDP{
+ "",
+ "",
+ }
+ SEK{
+ "",
+ "",
+ }
+ SGD{
+ "",
+ "",
+ }
+ SHP{
+ "",
+ "",
+ }
+ SIT{
+ "",
+ "",
+ }
+ SKK{
+ "",
+ "",
+ }
+ SLL{
+ "",
+ "",
+ }
+ SOS{
+ "",
+ "",
+ }
+ SRD{
+ "",
+ "",
+ }
+ SRG{
+ "",
+ "",
+ }
+ STD{
+ "",
+ "",
+ }
+ SUR{
+ "",
+ "",
+ }
+ SVC{
+ "",
+ "",
+ }
+ SYP{
+ "",
+ "",
+ }
+ SZL{
+ "",
+ "",
+ }
+ THB{
+ "",
+ "",
+ }
+ TJR{
+ "",
+ "",
+ }
+ TJS{
+ "",
+ "",
+ }
+ TMM{
+ "",
+ "",
+ }
+ TND{
+ "",
+ "",
+ }
+ TOP{
+ "",
+ "",
+ }
+ TPE{
+ "",
+ "",
+ }
+ TRL{
+ "",
+ "",
+ }
+ TRY{
+ "",
+ "",
+ }
+ TTD{
+ "",
+ "",
+ }
+ TWD{
+ "",
+ "",
+ }
+ TZS{
+ "",
+ "",
+ }
+ UAH{
+ "",
+ "",
+ }
+ UAK{
+ "",
+ "",
+ }
+ UGS{
+ "",
+ "",
+ }
+ UGX{
+ "",
+ "",
+ }
+ USD{
+ "",
+ "",
+ }
+ USN{
+ "",
+ "",
+ }
+ USS{
+ "",
+ "",
+ }
+ UYI{
+ "",
+ "",
+ }
+ UYP{
+ "",
+ "",
+ }
+ UYU{
+ "",
+ "",
+ }
+ UZS{
+ "",
+ "",
+ }
+ VEB{
+ "",
+ "",
+ }
+ VEF{
+ "",
+ "",
+ }
+ VND{
+ "",
+ "",
+ }
+ VUV{
+ "",
+ "",
+ }
+ WST{
+ "",
+ "",
+ }
+ XAF{
+ "",
+ "",
+ }
+ XAG{
+ "",
+ "",
+ }
+ XAU{
+ "",
+ "",
+ }
+ XBA{
+ "",
+ "",
+ }
+ XBB{
+ "",
+ "",
+ }
+ XBC{
+ "",
+ "",
+ }
+ XBD{
+ "",
+ "",
+ }
+ XCD{
+ "",
+ "",
+ }
+ XDR{
+ "",
+ "",
+ }
+ XEU{
+ "",
+ "",
+ }
+ XFO{
+ "",
+ "",
+ }
+ XFU{
+ "",
+ "",
+ }
+ XOF{
+ "",
+ "",
+ }
+ XPD{
+ "",
+ "",
+ }
+ XPF{
+ "",
+ "",
+ }
+ XPT{
+ "",
+ "",
+ }
+ XRE{
+ "",
+ "",
+ }
+ XTS{
+ "",
+ "",
+ }
+ XXX{
+ "",
+ "",
+ }
+ YDD{
+ "",
+ "",
+ }
+ YER{
+ "",
+ "",
+ }
+ YUD{
+ "",
+ "",
+ }
+ YUM{
+ "",
+ "",
+ }
+ YUN{
+ "",
+ "",
+ }
+ ZAL{
+ "",
+ "",
+ }
+ ZAR{
+ "",
+ "",
+ }
+ ZMK{
+ "",
+ "",
+ }
+ ZRN{
+ "",
+ "",
+ }
+ ZRZ{
+ "",
+ "",
+ }
+ ZWD{
+ "",
+ "",
+ }
+ }
+ delimiters{
+ quotationStart{""}
+ quotationEnd{""}
+ alternateQuotationEnd{""}
+ alternateQuotationStart{""}
+ }
+ ExemplarCharacters{""}
+ AuxExemplarCharacters{""}
+ Keys{
+ calendar{""}
+ collation{""}
+ currency{""}
+ }
+ Languages{
+ aa{""}
+ ab{""}
+ ace{""}
+ ach{""}
+ ada{""}
+ ady{""}
+ ae{""}
+ af{""}
+ afa{""}
+ afh{""}
+ ain{""}
+ ak{""}
+ akk{""}
+ ale{""}
+ alg{""}
+ alt{""}
+ am{""}
+ an{""}
+ ang{""}
+ anp{""}
+ apa{""}
+ ar{""}
+ arc{""}
+ arn{""}
+ arp{""}
+ art{""}
+ arw{""}
+ as{""}
+ ast{""}
+ ath{""}
+ aus{""}
+ av{""}
+ awa{""}
+ ay{""}
+ az{""}
+ ba{""}
+ bad{""}
+ bai{""}
+ bal{""}
+ ban{""}
+ bas{""}
+ bat{""}
+ be{""}
+ bej{""}
+ bem{""}
+ ber{""}
+ bg{""}
+ bh{""}
+ bho{""}
+ bi{""}
+ bik{""}
+ bin{""}
+ bla{""}
+ bm{""}
+ bn{""}
+ bnt{""}
+ bo{""}
+ br{""}
+ bra{""}
+ bs{""}
+ btk{""}
+ bua{""}
+ bug{""}
+ byn{""}
+ ca{""}
+ cad{""}
+ cai{""}
+ car{""}
+ cau{""}
+ cch{""}
+ ce{""}
+ ceb{""}
+ cel{""}
+ ch{""}
+ chb{""}
+ chg{""}
+ chk{""}
+ chm{""}
+ chn{""}
+ cho{""}
+ chp{""}
+ chr{""}
+ chy{""}
+ cmc{""}
+ co{""}
+ cop{""}
+ cpe{""}
+ cpf{""}
+ cpp{""}
+ cr{""}
+ crh{""}
+ crp{""}
+ cs{""}
+ csb{""}
+ cu{""}
+ cus{""}
+ cv{""}
+ cy{""}
+ da{""}
+ dak{""}
+ dar{""}
+ day{""}
+ de{""}
+ de_AT{""}
+ de_CH{""}
+ del{""}
+ den{""}
+ dgr{""}
+ din{""}
+ doi{""}
+ dra{""}
+ dsb{""}
+ dua{""}
+ dum{""}
+ dv{""}
+ dyu{""}
+ dz{""}
+ ee{""}
+ efi{""}
+ egy{""}
+ eka{""}
+ el{""}
+ elx{""}
+ en{""}
+ en_AU{""}
+ en_CA{""}
+ en_GB{""}
+ en_US{""}
+ enm{""}
+ eo{""}
+ es{""}
+ es_419{""}
+ es_ES{""}
+ et{""}
+ eu{""}
+ ewo{""}
+ fa{""}
+ fan{""}
+ fat{""}
+ ff{""}
+ fi{""}
+ fil{""}
+ fiu{""}
+ fj{""}
+ fo{""}
+ fon{""}
+ fr{""}
+ fr_CA{""}
+ fr_CH{""}
+ frm{""}
+ fro{""}
+ frr{""}
+ frs{""}
+ fur{""}
+ fy{""}
+ ga{""}
+ gaa{""}
+ gay{""}
+ gba{""}
+ gd{""}
+ gem{""}
+ gez{""}
+ gil{""}
+ gl{""}
+ gmh{""}
+ gn{""}
+ goh{""}
+ gon{""}
+ gor{""}
+ got{""}
+ grb{""}
+ grc{""}
+ gsw{""}
+ gu{""}
+ gv{""}
+ gwi{""}
+ ha{""}
+ hai{""}
+ haw{""}
+ he{""}
+ hi{""}
+ hil{""}
+ him{""}
+ hit{""}
+ hmn{""}
+ ho{""}
+ hr{""}
+ hsb{""}
+ ht{""}
+ hu{""}
+ hup{""}
+ hy{""}
+ hz{""}
+ ia{""}
+ iba{""}
+ id{""}
+ ie{""}
+ ig{""}
+ ii{""}
+ ijo{""}
+ ik{""}
+ ilo{""}
+ inc{""}
+ ine{""}
+ inh{""}
+ io{""}
+ ira{""}
+ iro{""}
+ is{""}
+ it{""}
+ iu{""}
+ ja{""}
+ jbo{""}
+ jpr{""}
+ jrb{""}
+ jv{""}
+ ka{""}
+ kaa{""}
+ kab{""}
+ kac{""}
+ kaj{""}
+ kam{""}
+ kar{""}
+ kaw{""}
+ kbd{""}
+ kcg{""}
+ kfo{""}
+ kg{""}
+ kha{""}
+ khi{""}
+ kho{""}
+ ki{""}
+ kj{""}
+ kk{""}
+ kl{""}
+ km{""}
+ kmb{""}
+ kn{""}
+ ko{""}
+ kok{""}
+ kos{""}
+ kpe{""}
+ kr{""}
+ krc{""}
+ krl{""}
+ kro{""}
+ kru{""}
+ ks{""}
+ ku{""}
+ kum{""}
+ kut{""}
+ kv{""}
+ kw{""}
+ ky{""}
+ la{""}
+ lad{""}
+ lah{""}
+ lam{""}
+ lb{""}
+ lez{""}
+ lg{""}
+ li{""}
+ ln{""}
+ lo{""}
+ lol{""}
+ loz{""}
+ lt{""}
+ lu{""}
+ lua{""}
+ lui{""}
+ lun{""}
+ luo{""}
+ lus{""}
+ lv{""}
+ mad{""}
+ mag{""}
+ mai{""}
+ mak{""}
+ man{""}
+ map{""}
+ mas{""}
+ mdf{""}
+ mdr{""}
+ men{""}
+ mg{""}
+ mga{""}
+ mh{""}
+ mi{""}
+ mic{""}
+ min{""}
+ mis{""}
+ mk{""}
+ mkh{""}
+ ml{""}
+ mn{""}
+ mnc{""}
+ mni{""}
+ mno{""}
+ mo{""}
+ moh{""}
+ mos{""}
+ mr{""}
+ ms{""}
+ mt{""}
+ mul{""}
+ mun{""}
+ mus{""}
+ mwl{""}
+ mwr{""}
+ my{""}
+ myn{""}
+ myv{""}
+ na{""}
+ nah{""}
+ nai{""}
+ nap{""}
+ nb{""}
+ nd{""}
+ nds{""}
+ ne{""}
+ new{""}
+ ng{""}
+ nia{""}
+ nic{""}
+ niu{""}
+ nl{""}
+ nl_BE{""}
+ nn{""}
+ no{""}
+ nog{""}
+ non{""}
+ nr{""}
+ nso{""}
+ nqo{""}
+ nub{""}
+ nv{""}
+ nwc{""}
+ ny{""}
+ nym{""}
+ nyn{""}
+ nyo{""}
+ nzi{""}
+ oc{""}
+ oj{""}
+ om{""}
+ or{""}
+ os{""}
+ osa{""}
+ ota{""}
+ oto{""}
+ pa{""}
+ paa{""}
+ pag{""}
+ pal{""}
+ pam{""}
+ pap{""}
+ pau{""}
+ peo{""}
+ phi{""}
+ phn{""}
+ pi{""}
+ pl{""}
+ pon{""}
+ pra{""}
+ pro{""}
+ ps{""}
+ pt{""}
+ pt_BR{""}
+ pt_PT{""}
+ qu{""}
+ raj{""}
+ rap{""}
+ rar{""}
+ rm{""}
+ rn{""}
+ ro{""}
+ roa{""}
+ rom{""}
+ root{""}
+ ru{""}
+ rup{""}
+ rw{""}
+ sa{""}
+ sad{""}
+ sah{""}
+ sai{""}
+ sal{""}
+ sam{""}
+ sas{""}
+ sat{""}
+ sc{""}
+ scn{""}
+ sco{""}
+ sd{""}
+ se{""}
+ sel{""}
+ sem{""}
+ sg{""}
+ sga{""}
+ sgn{""}
+ sh{""}
+ shn{""}
+ si{""}
+ sid{""}
+ sio{""}
+ sit{""}
+ sk{""}
+ sl{""}
+ sla{""}
+ sm{""}
+ sma{""}
+ smi{""}
+ smj{""}
+ smn{""}
+ sms{""}
+ sn{""}
+ snk{""}
+ so{""}
+ sog{""}
+ son{""}
+ sq{""}
+ sr{""}
+ srn{""}
+ srr{""}
+ ss{""}
+ ssa{""}
+ st{""}
+ su{""}
+ suk{""}
+ sus{""}
+ sux{""}
+ sv{""}
+ sw{""}
+ syc{""}
+ syr{""}
+ ta{""}
+ tai{""}
+ te{""}
+ tem{""}
+ ter{""}
+ tet{""}
+ tg{""}
+ th{""}
+ ti{""}
+ tig{""}
+ tiv{""}
+ tk{""}
+ tkl{""}
+ tl{""}
+ tlh{""}
+ tli{""}
+ tmh{""}
+ tn{""}
+ to{""}
+ tog{""}
+ tpi{""}
+ tr{""}
+ ts{""}
+ tsi{""}
+ tt{""}
+ tum{""}
+ tup{""}
+ tut{""}
+ tvl{""}
+ tw{""}
+ ty{""}
+ tyv{""}
+ udm{""}
+ ug{""}
+ uga{""}
+ uk{""}
+ umb{""}
+ und{""}
+ ur{""}
+ uz{""}
+ vai{""}
+ ve{""}
+ vi{""}
+ vo{""}
+ vot{""}
+ wa{""}
+ wak{""}
+ wal{""}
+ war{""}
+ was{""}
+ wen{""}
+ wo{""}
+ xal{""}
+ xh{""}
+ yao{""}
+ yap{""}
+ yi{""}
+ yo{""}
+ ypk{""}
+ za{""}
+ zap{""}
+ zbl{""}
+ zen{""}
+ zh{""}
+ zh_Hans{""}
+ zh_Hant{""}
+ znd{""}
+ zu{""}
+ zun{""}
+ zxx{""}
+ zza{""}
+ }
+ LocaleScript{
+ "",
+ }
+ MeasurementSystem:int{0}
+ NumberElements{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ NumberPatterns{
+ "",
+ "",
+ "",
+ "",
+ }
+ PaperSize:intvector{
+ 297,
+ 210,
+ }
+ Scripts{
+ Arab{""}
+ Armn{""}
+ Avst{""}
+ Bali{""}
+ Batk{""}
+ Beng{""}
+ Blis{""}
+ Bopo{""}
+ Brah{""}
+ Brai{""}
+ Bugi{""}
+ Buhd{""}
+ Cans{""}
+ Cari{""}
+ Cham{""}
+ Cher{""}
+ Cirt{""}
+ Copt{""}
+ Cprt{""}
+ Cyrl{""}
+ Cyrs{""}
+ Deva{""}
+ Dsrt{""}
+ Egyd{""}
+ Egyh{""}
+ Egyp{""}
+ Ethi{""}
+ Geok{""}
+ Geor{""}
+ Glag{""}
+ Goth{""}
+ Grek{""}
+ Gujr{""}
+ Guru{""}
+ Hang{""}
+ Hani{""}
+ Hano{""}
+ Hans{""}
+ Hant{""}
+ Hebr{""}
+ Hira{""}
+ Hmng{""}
+ Hrkt{""}
+ Hung{""}
+ Inds{""}
+ Ital{""}
+ Java{""}
+ Jpan{""}
+ Kali{""}
+ Kana{""}
+ Khar{""}
+ Khmr{""}
+ Knda{""}
+ Kore{""}
+ Lana{""}
+ Laoo{""}
+ Latf{""}
+ Latg{""}
+ Latn{""}
+ Lepc{""}
+ Limb{""}
+ Lina{""}
+ Linb{""}
+ Lyci{""}
+ Lydi{""}
+ Mand{""}
+ Mani{""}
+ Maya{""}
+ Mero{""}
+ Mlym{""}
+ Mong{""}
+ Moon{""}
+ Mtei{""}
+ Mymr{""}
+ Nkoo{""}
+ Ogam{""}
+ Olck{""}
+ Orkh{""}
+ Orya{""}
+ Osma{""}
+ Perm{""}
+ Phag{""}
+ Phlv{""}
+ Phnx{""}
+ Plrd{""}
+ Qaai{""}
+ Rjng{""}
+ Roro{""}
+ Runr{""}
+ Samr{""}
+ Sara{""}
+ Saur{""}
+ Sgnw{""}
+ Shaw{""}
+ Sinh{""}
+ Sund{""}
+ Sylo{""}
+ Syrc{""}
+ Syre{""}
+ Syrj{""}
+ Syrn{""}
+ Tagb{""}
+ Tale{""}
+ Talu{""}
+ Taml{""}
+ Telu{""}
+ Teng{""}
+ Tfng{""}
+ Tglg{""}
+ Thaa{""}
+ Thai{""}
+ Tibt{""}
+ Ugar{""}
+ Vaii{""}
+ Visp{""}
+ Xpeo{""}
+ Xsux{""}
+ Yiii{""}
+ Zxxx{""}
+ Zyyy{""}
+ Zzzz{""}
+ }
+ Types{
+ calendar{
+ buddhist{""}
+ chinese{""}
+ gregorian{""}
+ hebrew{""}
+ persian{""}
+ islamic{""}
+ islamic-civil{""}
+ japanese{""}
+ taiwan{""}
+ }
+ collation{
+ big5han{""}
+ direct{""}
+ gb2312han{""}
+ phonebook{""}
+ pinyin{""}
+ stroke{""}
+ traditional{""}
+ }
+ }
+ Variants{
+ 1606NICT{""}
+ 1694ACAD{""}
+ 1901{""}
+ 1994{""}
+ 1996{""}
+ AREVELA{""}
+ AREVMDA{""}
+ BAKU1926{""}
+ BISKE{""}
+ BOONT{""}
+ FONIPA{""}
+ FONUPA{""}
+ GAULISH{""}
+ GUOYU{""}
+ HAKKA{""}
+ LIPAW{""}
+ LOJBAN{""}
+ MONOTON{""}
+ NEDIS{""}
+ NJIVA{""}
+ OSOJS{""}
+ POSIX{""}
+ POLYTON{""}
+ POLYTONI{""}
+ REVISED{""}
+ ROZAJ{""}
+ SAAHO{""}
+ SCOTLAND{""}
+ SCOUSE{""}
+ SOLBA{""}
+ TARASK{""}
+ VALENCIA{""}
+ XIANG{""}
+ }
+ Version{""}
+ boundaries{
+ grapheme{"char"}
+ line{"line"}
+ sentence{"sentence"}
+ title{"title"}
+ word{"word"}
+ }
+ calendar{
+ buddhist{
+ DateTimePatterns{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ eras{
+ abbreviated{
+ "",
+ }
+ wide{
+ "",
+ }
+ }
+ }
+ chinese{
+ DateTimePatterns{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ monthNames{
+ default{""}
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ stand-alone{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ }
+ coptic{
+ monthNames{
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ }
+ default{""}
+ ethiopic{
+ monthNames{
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ }
+ gregorian{
+ AmPmMarkers{
+ "",
+ "",
+ }
+ DateTimeElements:intvector{
+ 2,
+ 1,
+ }
+ DateTimePatterns{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ appendItems{
+ Day{"{0} ({2}: {1})"}
+ Day-Of-Week{"{0} {1}"}
+ Era{"{0} {1}"}
+ Hour{"{0} ({2}: {1})"}
+ Minute{"{0} ({2}: {1})"}
+ Month{"{0} ({2}: {1})"}
+ Quarter{"{0} ({2}: {1})"}
+ Second{"{0} ({2}: {1})"}
+ Timezone{"{0} {1}"}
+ Week{"{0} ({2}: {1})"}
+ Year{"{0} {1}"}
+ }
+ availableFormats{
+ HHmm{""}
+ HHmmss{""}
+ KKmm{"KK:mm a"}
+ KKmmss{"KK:mm:ss a"}
+ MMMM{""}
+ MMMdd{""}
+ mmssSS{""}
+ ww{""}
+ yyMM{""}
+ yyMMMEEEd{""}
+ yyMMMd{""}
+ yyMd{""}
+ yyQQQQ{""}
+ }
+ dayNames{
+ default{""}
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ stand-alone{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ eras{
+ abbreviated{
+ "",
+ "",
+ }
+ narrow{
+ "",
+ ""
+ }
+ wide{
+ "",
+ ""
+ }
+ }
+ fields{
+ day{
+ dn{"Day"}
+ relative{
+ "-3"{""}
+ "-2"{""}
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ "2"{""}
+ "3"{""}
+ }
+ }
+ dayperiod{
+ dn{"Dayperiod"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ era{
+ dn{"Era"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ hour{
+ dn{"Hour"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ minute{
+ dn{"Minute"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ month{
+ dn{"Month"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ second{
+ dn{"Second"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ week{
+ dn{"Week"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ weekday{
+ dn{"Day of the Week"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ year{
+ dn{"Year"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ zone{
+ dn{"Zone"}
+ relative{
+ "-1"{""}
+ "0"{""}
+ "1"{""}
+ }
+ }
+ }
+ monthNames{
+ default{""}
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ stand-alone{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ quarters{
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ }
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ stand-alone{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ }
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ weekend:intvector{
+ 7,
+ 0,
+ 2,
+ 0,
+ }
+ }
+ hebrew{
+ eras{
+ abbreviated{
+ "",
+ }
+ wide{
+ "",
+ ""
+ }
+ }
+ monthNames{
+ default{""}
+ format{
+ abbreviated:alias{"structLocale/calendar/hebrew/monthNames/format/wide"}
+ default{""}
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ }
+ islamic{
+ DateTimeElements:intvector{
+ 1,
+ 1,
+ }
+ DateTimePatterns{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ eras{
+ abbreviated{
+ "",
+ }
+ wide{
+ "",
+ }
+ }
+ monthNames{
+ default{""}
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ stand-alone{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ }
+ persian{
+ DateTimeElements:intvector{
+ 1,
+ 1,
+ }
+ DateTimePatterns{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ eras{
+ abbreviated{
+ "",
+ }
+ wide{
+ "",
+ }
+ }
+ monthNames{
+ default{""}
+ format{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ stand-alone{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ default{""}
+ narrow{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ }
+ }
+ }
+ islamic-civil:alias{"structLocale/calendar/islamic"}
+ japanese{
+ DateTimePatterns{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ eras{
+ abbreviated{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ wide{
+ "",
+ ""
+ }
+ }
+ }
+ taiwan{
+ DateTimePatterns{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ }
+ eras{
+ abbreviated{
+ "",
+ "",
+ }
+ wide{
+ "",
+ ""
+ }
+ }
+ }
+ }
+ layout{
+ casing{""}
+ characters{""}
+ lines{""}
+ }
+ localPatternChars{""}
+ measurementSystemNames{
+ US{"US"}
+ metric{"Metric"}
+ }
+ messages{
+ nostr{""}
+ yesstr{""}
+ yesexpr{""}
+ noexpr{""}
+ }
+ zoneStrings{
+ hoursFormat{""}
+ hourFormat{""}
+ gmtFormat{""}
+ regionFormat{""}
+ fallbackFormat{""}
+ abbreviationFallback{""}
+ preferenceOrdering:array{""}
+ singleCountries:array{""}
+ "ACT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "AET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "AGT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "ART"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "AST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Abidjan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Accra"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Addis_Ababa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Algiers"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Asmera"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Bamako"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Bangui"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Banjul"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Bissau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Blantyre"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Brazzaville"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Bujumbura"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Cairo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Casablanca"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Ceuta"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Conakry"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Dakar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Dar_es_Salaam"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Djibouti"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Douala"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:El_Aaiun"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Freetown"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Gaborone"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Harare"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Johannesburg"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Kampala"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Khartoum"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Kigali"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Kinshasa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Lagos"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Libreville"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Lome"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Luanda"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Lubumbashi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Lusaka"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Malabo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Maputo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Maseru"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Mbabane"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Mogadishu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Monrovia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Nairobi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Ndjamena"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Niamey"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Nouakchott"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Ouagadougou"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Porto-Novo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Sao_Tome"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Timbuktu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Tripoli"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Tunis"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Africa:Windhoek"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Adak"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Anchorage"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Anguilla"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Antigua"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Araguaina"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Buenos_Aires"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Catamarca"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:ComodRivadavia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Cordoba"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Jujuy"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:La_Rioja"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Mendoza"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Rio_Gallegos"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:San_Juan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Tucuman"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Argentina:Ushuaia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Aruba"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Asuncion"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Atka"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Bahia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Barbados"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Belem"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Belize"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Blanc-Sablon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Boa_Vista"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Bogota"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Boise"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Buenos_Aires"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Cambridge_Bay"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Campo_Grande"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Cancun"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Caracas"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Catamarca"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Cayenne"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Cayman"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Chicago"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Chihuahua"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Coral_Harbour"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Cordoba"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Costa_Rica"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Cuiaba"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Curacao"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Danmarkshavn"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Dawson"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Dawson_Creek"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Denver"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Detroit"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Dominica"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Edmonton"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Eirunepe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:El_Salvador"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Ensenada"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Fort_Wayne"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Fortaleza"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Glace_Bay"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Godthab"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Goose_Bay"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Grand_Turk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Grenada"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Guadeloupe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Guatemala"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Guayaquil"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Guyana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Halifax"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Havana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Hermosillo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indiana:Indianapolis"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indiana:Knox"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indiana:Marengo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indiana:Petersburg"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indiana:Vevay"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indiana:Vincennes"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indiana:Winamac"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Indianapolis"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Inuvik"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Iqaluit"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Jamaica"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Jujuy"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Juneau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Kentucky:Louisville"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Kentucky:Monticello"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Knox_IN"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:La_Paz"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Lima"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Los_Angeles"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Louisville"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Maceio"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Managua"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Manaus"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Martinique"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Mazatlan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Mendoza"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Menominee"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Merida"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Mexico_City"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Miquelon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Moncton"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Monterrey"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Montevideo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Montreal"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Montserrat"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Nassau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:New_York"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Nipigon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Nome"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Noronha"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:North_Dakota:Center"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:North_Dakota:New_Salem"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Panama"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Pangnirtung"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Paramaribo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Phoenix"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Port-au-Prince"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Port_of_Spain"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Porto_Acre"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Porto_Velho"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Puerto_Rico"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Rainy_River"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Rankin_Inlet"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Recife"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Regina"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Rio_Branco"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Rosario"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Santiago"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Santo_Domingo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Sao_Paulo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Scoresbysund"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Shiprock"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:St_Johns"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:St_Kitts"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:St_Lucia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:St_Thomas"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:St_Vincent"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Swift_Current"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Tegucigalpa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Thule"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Thunder_Bay"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Tijuana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Toronto"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Tortola"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Vancouver"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Virgin"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Whitehorse"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Winnipeg"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Yakutat"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "America:Yellowknife"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:Casey"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:Davis"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:DumontDUrville"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:Mawson"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:McMurdo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:Palmer"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:Rothera"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:South_Pole"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:Syowa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Antarctica:Vostok"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Arctic:Longyearbyen"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Aden"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Almaty"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Amman"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Anadyr"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Aqtau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Aqtobe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Ashgabat"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Ashkhabad"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Baghdad"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Bahrain"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Baku"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Bangkok"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Beirut"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Bishkek"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Brunei"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Calcutta"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Choibalsan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Chongqing"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Chungking"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Colombo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Dacca"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Damascus"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Dhaka"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Dili"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Dubai"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Dushanbe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Gaza"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Harbin"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Hong_Kong"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Hovd"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Irkutsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Istanbul"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Jakarta"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Jayapura"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Jerusalem"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Kabul"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Kamchatka"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Karachi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Kashgar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Katmandu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Krasnoyarsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Kuala_Lumpur"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Kuching"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Kuwait"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Macao"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Macau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Magadan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Makassar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Manila"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Muscat"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Nicosia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Novosibirsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Omsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Oral"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Phnom_Penh"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Pontianak"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Pyongyang"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Qatar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Qyzylorda"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Rangoon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Riyadh"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Riyadh87"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Riyadh88"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Riyadh89"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Saigon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Sakhalin"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Samarkand"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Seoul"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Shanghai"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Singapore"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Taipei"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Tashkent"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Tbilisi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Tehran"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Tel_Aviv"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Thimbu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Thimphu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Tokyo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Ujung_Pandang"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Ulaanbaatar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Ulan_Bator"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Urumqi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Vientiane"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Vladivostok"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Yakutsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Yekaterinburg"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Asia:Yerevan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Azores"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Bermuda"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Canary"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Cape_Verde"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Faeroe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Jan_Mayen"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Madeira"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Reykjavik"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:South_Georgia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:St_Helena"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Atlantic:Stanley"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:ACT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Adelaide"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Brisbane"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Broken_Hill"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Canberra"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Currie"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Darwin"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Eucla"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Hobart"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:LHI"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Lindeman"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Lord_Howe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Melbourne"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:NSW"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:North"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Perth"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Queensland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:South"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Sydney"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Tasmania"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Victoria"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:West"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Australia:Yancowinna"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "BET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "BST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Brazil:Acre"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Brazil:DeNoronha"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Brazil:East"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Brazil:West"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "CAT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "CET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "CNT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "CST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "CST6CDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "CTT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Atlantic"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:East-Saskatchewan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Mountain"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Newfoundland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Pacific"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Saskatchewan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Canada:Yukon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Chile:Continental"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Chile:EasterIsland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Cuba"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "EAT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "ECT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "EET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "EST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "EST5EDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Egypt"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Eire"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+0"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+1"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+10"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+11"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+12"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+2"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+3"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+4"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+5"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+6"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+7"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+8"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT+9"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-0"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-1"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-10"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-11"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-12"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-13"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-14"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-2"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-3"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-4"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-5"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-6"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-7"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-8"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT-9"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:GMT0"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:Greenwich"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:UCT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:UTC"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:Universal"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:Unknown"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Etc:Zulu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Amsterdam"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Andorra"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Athens"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Belfast"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Belgrade"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Berlin"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Bratislava"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Brussels"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Bucharest"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Budapest"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Chisinau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Copenhagen"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Dublin"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Gibraltar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Helsinki"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ }
+ "Europe:Istanbul"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Kaliningrad"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Kiev"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Lisbon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Ljubljana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:London"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Luxembourg"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Madrid"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Malta"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Mariehamn"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Minsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Monaco"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Moscow"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Nicosia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Oslo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Paris"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Podgorica"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Prague"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Riga"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Rome"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Samara"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:San_Marino"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Sarajevo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Simferopol"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Skopje"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Sofia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Stockholm"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Tallinn"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Tirane"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Tiraspol"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Uzhgorod"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Vaduz"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Vatican"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Vienna"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Vilnius"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Volgograd"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Warsaw"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Zagreb"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Zaporozhye"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Europe:Zurich"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Factory"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "GB"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "GB-Eire"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "GMT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "GMT+0"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "GMT-0"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "GMT0"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Greenwich"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "HST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Hongkong"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "IET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "IST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Iceland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Antananarivo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Chagos"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Christmas"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Cocos"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Comoro"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Kerguelen"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Mahe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Maldives"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Mauritius"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Mayotte"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Indian:Reunion"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Iran"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Israel"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "JST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Jamaica"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Japan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Kwajalein"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Libya"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "MET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "MIT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "MST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "MST7MDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Mexico:BajaNorte"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Mexico:BajaSur"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Mexico:General"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Mideast:Riyadh87"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Mideast:Riyadh88"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Mideast:Riyadh89"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "NET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "NST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "NZ"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "NZ-CHAT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Navajo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "PLT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "PNT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "PRC"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "PRT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "PST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "PST8PDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Apia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Auckland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Chatham"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Easter"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Efate"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Enderbury"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Fakaofo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Fiji"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Funafuti"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Galapagos"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Gambier"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Guadalcanal"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Guam"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Honolulu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Johnston"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Kiritimati"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Kosrae"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Kwajalein"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Majuro"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Marquesas"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Midway"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Nauru"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Niue"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Norfolk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Noumea"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Pago_Pago"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Palau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Pitcairn"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Ponape"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Port_Moresby"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Rarotonga"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Saipan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Samoa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Tahiti"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Tarawa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Tongatapu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Truk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Wake"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Wallis"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Pacific:Yap"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Poland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Portugal"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "ROC"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "ROK"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Singapore"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:AST4"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:AST4ADT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:CST6"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:CST6CDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:EST5"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:EST5EDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:HST10"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:MST7"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:MST7MDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:PST8"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:PST8PDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:YST9"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "SystemV:YST9YDT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Turkey"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "UCT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Alaska"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Aleutian"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Arizona"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:East-Indiana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Hawaii"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Indiana-Starke"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Michigan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Mountain"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Pacific"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Pacific-New"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "US:Samoa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "UTC"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Universal"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "VST"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "W-SU"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "WET"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "Zulu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ ec{""}
+ cu:int{0}
+ }
+ "meta:Acre"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Afghanistan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Africa_Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Africa_Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Africa_FarWestern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Africa_Southern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Africa_Western"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Aktyubinsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Alaska"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Alaska_Hawaii"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Almaty"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Amazon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:America_Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:America_Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:America_Mountain"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:America_Pacific"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Anadyr"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Aqtau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Aqtobe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Arabian"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Argentina"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Argentina_Western"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Armenia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Ashkhabad"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Atlantic"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Australia_Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Australia_CentralWestern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Australia_Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Australia_Western"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Azerbaijan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Azores"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Baku"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Bangladesh"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Bering"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Bhutan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Bolivia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Borneo"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Brasilia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Brunei"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Cape_Verde"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Chamorro"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Changbai"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Chatham"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Chile"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:China"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Choibalsan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Christmas"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Cocos"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Colombia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Cook"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Cuba"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Dacca"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Davis"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:DumontDUrville"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Dushanbe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Dutch_Guiana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Easter"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:East_Timor"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Ecuador"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Europe_Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Europe_Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Europe_Western"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Falkland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Fiji"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:French_Guiana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:French_Southern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Frunze"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:GMT"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Galapagos"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Gambier"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Georgia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Greenland_Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Greenland_Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Greenland_Western"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Gilbert_Islands"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Guam"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Gulf"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Guyana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Hawaii"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Hawaii_Aleutian"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Hong_Kong"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Hovd"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:India"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Indian_Ocean"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Indochina"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Indonesia_Central"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Indonesia_Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Indonesia_Western"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Iran"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Irkutsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Israel"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Japan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kamchatka"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Karachi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kashgar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kazakhstan_Eastern"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kazakhstan_Western"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kizilorda"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Korea"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kosrae"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Krasnoyarsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kuybyshev"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kwajalein"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Kyrgystan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Lanka"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Line_Islands"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Long_Shu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Lord_Howe"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Macau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Magadan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Malaya"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Maldives"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Malaysia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Marquesas"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Marshall_Islands"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Mauritius"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Mongolia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Moscow"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Mawson"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Myanmar"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Nauru"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:New_Caledonia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:New_Zealand"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Newfoundland"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Nepal"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Niue"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Norfolk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Noronha"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:North_Mariana"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Novosibirsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Omsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Palau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Pakistan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Papua_New_Guinea"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Paraguay"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Peru"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Philippines"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Phoenix_Islands"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Pierre_Miquelon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Pitcairn"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Ponape"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Qyzylorda"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Reunion"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Rothera"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Sakhalin"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Samara"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Samarkand"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Samoa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Seychelles"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Shevchenko"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Singapore"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Solomon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:South_Georgia"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Suriname"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Sverdlovsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Syowa"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Tahiti"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Tajikistan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Tashkent"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Tbilisi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Tokelau"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Tonga"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Truk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Turkey"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Turkmenistan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Tuvalu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Uralsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Uruguay"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Urumqi"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Uzbekistan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Vanuatu"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Venezuela"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Vladivostok"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Volgograd"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Vostok"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Wake"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Wallis"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Yakutsk"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Yekaterinburg"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Yerevan"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ "meta:Yukon"{
+ ld{""}
+ lg{""}
+ ls{""}
+ sd{""}
+ sg{""}
+ ss{""}
+ //ec{""} // Metazones have no exemplar city
+ cu:int{0}
+ }
+ }
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/te.txt b/Build/source/libs/icu/icu-xetex/test/testdata/te.txt
new file mode 100644
index 00000000000..3a83c82cf4e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/te.txt
@@ -0,0 +1,165 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 1998-2005, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+
+// This is a test locale file for the fake locale 'te'
+
+te
+{
+ string_only_in_te { TE }
+
+ array_only_in_te { TE0, TE1, TE2, TE3 }
+
+ array_2d_only_in_te
+ {
+ { TE00, TE01 }
+ { TE10, TE11 }
+ }
+
+ tagged_array_only_in_te
+ {
+ tag9 { TE9 }
+ tag11 { TE11 }
+ tag3 { TE3 }
+ tag4 { TE4 }
+ }
+
+ string_in_Root_te_te_IN { TE }
+
+ array_in_Root_te_te_IN { TE0, TE1, TE2, TE3, TE4 }
+
+ array_2d_in_Root_te_te_IN
+ {
+ { TE00, TE01, TE02 }
+ { TE10, TE11, TE12 }
+ { TE20, TE21, TE22 }
+ { TE30, TE31, TE32 }
+ }
+
+ tagged_array_in_Root_te_te_IN
+ {
+ tag7 { TE7 }
+ tag8 { TE8 }
+ tag14 { TE14 }
+ tag0 { TE0 }
+ tag4 { TE4 }
+ tag10 { TE10 }
+ }
+
+ string_in_Root_te { TE }
+
+ array_in_Root_te { TE0, TE1, TE2, TE3, TE4 }
+
+ array_2d_in_Root_te
+ {
+ { TE00, TE01, TE02 }
+ { TE10, TE11, TE12 }
+ { TE20, TE21, TE22 }
+ { TE30, TE31, TE32 }
+ }
+
+ tagged_array_in_Root_te
+ {
+ tag2 { TE2 }
+ tag1 { TE1 }
+ tag0 { TE0 }
+ tag3 { TE3 }
+ tag4 { TE4 }
+ tag5 { TE5 }
+ tag6 { TE6 }
+ }
+
+ string_in_te_te_IN { TE }
+
+ array_in_te_te_IN { TE0, TE1, TE2 }
+
+ array_2d_in_te_te_IN
+ {
+ { TE00, TE01, TE02 }
+ { TE10, TE11, TE12 }
+ { TE20, TE21, TE22 }
+ }
+
+ tagged_array_in_te_te_IN
+ {
+ tag0 { TE0 }
+ }
+
+ collations {
+ standard {
+ Version { "1.0" }
+ Override { "FALSE" }
+ Sequence {"& A < a\u0308 , A\u0308 & C < c\u0327 , C\u0327 & G < g"
+ "\u0306 , G\u0306 & H < \u0131 , I , i , \u0130 < \u0132 , \u0133 & O < o\u0308 "
+ ", O\u0308 & S < s\u0327 , S\u0327 & U < u\u0308 , U\u0308 " }
+ }
+ }
+ aliasClient:alias {"/LOCALE/aliasDestination"}
+ aliasDestination {"tedest"}
+ rootAliasDestination {"correct"}
+ a {
+ a1{"a21"}
+ a2{"a22"}
+ a3{"a23"}
+ a4{"a24"}
+ }
+ zoneStrings{
+ {
+ "Pacific/Honolulu",
+ "Hawaii Standard Time",
+ "HST",
+ "Hawaii Daylight Time",
+ "HDT",
+ "Honolulu",
+ "Hawaii Time",
+ "HT",
+ }
+ {
+ "America/Anchorage",
+ "Alaska Standard Time",
+ "AKST",
+ "Alaska Daylight Time",
+ "AKDT",
+ "Anchorage",
+ "Alaska Time",
+ "AKT",
+ }
+ {
+ "America/Los_Angeles",
+ "Pacific Standard Time",
+ "PST",
+ "Pacific Daylight Time",
+ "PDT",
+ "Los Angeles",
+ "Pacific Time",
+ "PT",
+ }
+ {
+ "America/Phoenix",
+ "Mountain Standard Time",
+ "MST",
+ "Mountain Daylight Time",
+ "MDT",
+ "Phoenix",
+ "Mountain Time",
+ "MT",
+ }
+ {
+ "America/Denver",
+ "Mountain Standard Time",
+ "MST",
+ "Mountain Daylight Time",
+ "MDT",
+ "Denver",
+ "Mountain Time",
+ "MT",
+ }
+ }
+
+}
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/te_IN.txt b/Build/source/libs/icu/icu-xetex/test/testdata/te_IN.txt
new file mode 100644
index 00000000000..6d2aa73b058
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/te_IN.txt
@@ -0,0 +1,96 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 1998-2005, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+
+// This is a test file which inherits from te, te_IN.
+
+te_IN
+{
+ Version { 55.0 }
+
+ string_only_in_te_IN { TE_IN }
+
+ array_only_in_te_IN { TE_IN0, TE_IN1, TE_IN2, TE_IN3 }
+
+ array_2d_only_in_te_IN
+ {
+ { TE_IN00, TE_IN01 }
+ { TE_IN10, TE_IN11 }
+ }
+
+ tagged_array_only_in_te_IN
+ {
+ tag10 { TE_IN10 }
+ tag11 { TE_IN11 }
+ tag3 { TE_IN3 }
+ }
+
+ string_in_Root_te_te_IN { TE_IN }
+
+ array_in_Root_te_te_IN { TE_IN0, TE_IN1, TE_IN2, TE_IN3, TE_IN4 }
+
+ array_2d_in_Root_te_te_IN
+ {
+ { TE_IN00, TE_IN01, TE_IN02 }
+ { TE_IN10, TE_IN11, TE_IN12 }
+ { TE_IN20, TE_IN21, TE_IN22 }
+ { TE_IN30, TE_IN31, TE_IN32 }
+ }
+
+ tagged_array_in_Root_te_te_IN
+ {
+ tag2 { TE_IN2 }
+ tag9 { TE_IN9 }
+ tag0 { TE_IN0 }
+ tag12 { TE_IN12 }
+ tag10 { TE_IN10 }
+ }
+
+ string_in_te_te_IN { TE_IN }
+
+ array_in_te_te_IN { TE_IN0, TE_IN1, TE_IN2 }
+
+ array_2d_in_te_te_IN
+ {
+ { TE_IN00, TE_IN01, TE_IN02 }
+ { TE_IN10, TE_IN11, TE_IN12 }
+ { TE_IN20, TE_IN21, TE_IN22 }
+ }
+
+ tagged_array_in_te_te_IN
+ {
+ tag0 { TE_IN0 }
+ tag5 { TE_IN5 }
+ tag17 { TE_IN17 }
+ }
+
+ string_in_Root_te_IN { TE_IN }
+
+ array_in_Root_te_IN { TE_IN0, TE_IN1, TE_IN2 }
+
+ array_2d_in_Root_te_IN
+ {
+ { TE_IN00, TE_IN01, TE_IN02, TE_IN03 }
+ { TE_IN10, TE_IN11, TE_IN12, TE_IN13 }
+ { TE_IN20, TE_IN21, TE_IN22, TE_IN23 }
+ }
+
+ tagged_array_in_Root_te_IN
+ {
+ tag1 { TE_IN1 }
+ tag5 { TE_IN5 }
+ tag11 { TE_IN11 }
+ tag12 { TE_IN12 }
+ tag3 { TE_IN3 }
+ tag7 { TE_IN7 }
+ }
+ aliasDestination {"correct" }
+
+ a:alias{ "sh_YU"}
+}
+
+//eof
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/te_IN_REVISED.txt b/Build/source/libs/icu/icu-xetex/test/testdata/te_IN_REVISED.txt
new file mode 100644
index 00000000000..18efd30b7b4
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/te_IN_REVISED.txt
@@ -0,0 +1,13 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 2005, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+te_IN_REVISED
+{
+ a {
+ a1 { "a41" }
+ }
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/test1.ucm b/Build/source/libs/icu/icu-xetex/test/testdata/test1.ucm
new file mode 100644
index 00000000000..b4da4768a58
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/test1.ucm
@@ -0,0 +1,35 @@
+# *******************************************************************************
+# * Copyright (C) 2001-2003, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# *******************************************************************************
+#
+# test1.ucm
+#
+# Test file for MBCS conversion with single-byte codepage data.
+
+<code_set_name> "test1"
+<mb_cur_max> 1
+<mb_cur_min> 1
+<uconv_class> "MBCS"
+<subchar> \xff
+<icu:state> 0, 5-9, ff
+
+CHARMAP
+
+# fromUnicode result is zero byte from other than U+0000
+<U20ac> \x00 |0
+<U20ad> \x00 |1
+
+# nothing special
+<U0005> \x05 |0
+
+# toUnicode result is fallback direct
+<U0006> \x06 |3
+
+# toUnicode result is direct non-BMP code point
+<U101234> \x07 |0
+<Ufebcd> \x08 |1
+
+#unassigned \x09
+
+END CHARMAP
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/test3.ucm b/Build/source/libs/icu/icu-xetex/test/testdata/test3.ucm
new file mode 100644
index 00000000000..aee69c28982
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/test3.ucm
@@ -0,0 +1,60 @@
+# *******************************************************************************
+# * Copyright (C) 2001-2003, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# *******************************************************************************
+#
+# test3.ucm
+#
+# Test file for MBCS conversion with three-byte codepage data.
+# Also contains extension mappings (m:n).
+
+<code_set_name> "test3"
+<mb_cur_max> 3
+<mb_cur_min> 1
+<uconv_class> "MBCS"
+<subchar> \xff
+<icu:state> 0, 1:1, 5-9, ff
+<icu:state> 2:2
+<icu:state> a-f.p
+
+CHARMAP
+
+# fromUnicode result is zero byte from other than U+0000
+<U20ac> \x00 |0
+
+# nothing special
+<U0005> \x05 |0
+
+# extensions
+<U00c0> \x05+\x01\x02\x0d |0
+<U00c0> \x05+\x01\x02\x0e |3
+<U00c0> \x05+\xff |3
+
+# toUnicode result is fallback direct
+<U0006> \x06 |3
+
+# toUnicode result is direct non-BMP code point
+<U101234> \x07 |0
+<Ufebcd> \x08 |3
+
+# extensions
+<U101234>+<U50005>+<U60006> \x07+\x00+\x01\x02\x0f+\x09 |0
+<U101234>+<U50005> \x07+\x00+\x01\x02\x0e+\x05 |0
+<U101234>+<U60006> \x07+\x00+\x01\x02\x0f+\x06 |0
+<U101234>+<U70007> \x07+\x00+\x01\x02\x0f |1
+
+#unassigned \x09
+
+# extensions where the first code point is unassigned, for replay testing
+#<U00c4><U0300> \x09+\x09 |0
+<U00c4><U00c4><U101234><U0005> \x05+\x01\x02\x0c |0
+
+# toUnicode result is surrogate pair: test real pair, single unit, unassigned
+<U23456> \x01\x02\x0a |0
+<U000b> \x01\x02\x0b |0
+#unassigned \x01\x02\x0c
+<U34567> \x01\x02\x0d |3
+<U000e> \x01\x02\x0e |3
+#unassigned \x01\x02\x0f
+
+END CHARMAP
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/test4.ucm b/Build/source/libs/icu/icu-xetex/test/testdata/test4.ucm
new file mode 100644
index 00000000000..3b0aad0f0a8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/test4.ucm
@@ -0,0 +1,64 @@
+# *******************************************************************************
+# * Copyright (C) 2001-2003, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# *******************************************************************************
+#
+# test4.ucm
+#
+# Test file for MBCS conversion with four-byte codepage data.
+
+<code_set_name> "test4"
+<mb_cur_max> 4
+<mb_cur_min> 1
+<uconv_class> "MBCS"
+
+# both subchars are single-byters, which does not make sense
+# but works - adding subchar1 for tests but don't want to
+# change old tests for a new subchar -- markus 20031028
+<subchar> \xff
+<subchar1> \xe1
+<icu:state> 0, 1:1, 5-9, e1, ff
+<icu:state> 2:2
+<icu:state> 3:3
+<icu:state> a-f.p, ff
+
+CHARMAP
+
+# fromUnicode result is zero byte from other than U+0000
+<U20ac> \x00 |0
+
+# fallback from non-zero to zero possible with extension table
+<U20ad> \x00 |1
+
+# nothing special
+<U0005> \x05 |0
+
+# toUnicode result is fallback direct
+<U0006> \x06 |3
+
+# toUnicode result is direct non-BMP code point
+<U101234> \x07 |0
+<Ufebcd> \x08 |3
+
+#unassigned \x09
+
+# toUnicode result is surrogate pair: test real pair, single unit, unassigned
+<U23456> \x01\x02\x03\x0a |0
+<U000b> \x01\x02\x03\x0b |0
+#unassigned \x01\x02\x03\x0c
+<U34567> \x01\x02\x03\x0d |3
+<U000e> \x01\x02\x03\x0e |3
+#unassigned \x01\x02\x03\x0f
+
+# <subchar1> non-mapping
+<U50005> \xe1 |2
+# add a mapping that turns the above's Unicode side into a prefix
+<U50005><U60006> \x06 |1
+
+# many bytes, and bytes per UChar
+<U30ab><U309a> \x01\x02\x03\x0a\x01\x02\x03\x0b\x01\x02\x03\x0c\x01\x02\x03\x0d\x01\x02\x03\x0e\x01\x02\x03\x0f\x01\x02\x03\x0a\x05\x06\x07 |0
+
+# many UChars, and UChars per byte
+<U304b><U309a><U304d><U309a><U304f><U309a><U3051><U309a><U3053><U309a><U30ab><U309a><U30ad><U309a><U30af><U309a><U30b1><U309a><U0300> \x08\x09 |0
+
+END CHARMAP
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/test4x.ucm b/Build/source/libs/icu/icu-xetex/test/testdata/test4x.ucm
new file mode 100644
index 00000000000..c7692aaece8
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/test4x.ucm
@@ -0,0 +1,20 @@
+# *******************************************************************************
+# * Copyright (C) 2003, International Business Machines
+# * Corporation and others. All Rights Reserved.
+# *******************************************************************************
+#
+# test4x.ucm
+#
+# Test file for MBCS conversion extension with four-byte codepage data.
+
+<code_set_name> "test4x"
+<mb_cur_max> 4
+<mb_cur_min> 1
+<uconv_class> "MBCS"
+
+# test loading an extension table from the testdata package
+<icu:base> "test4"
+
+CHARMAP
+<U0009> \x09 |0
+END CHARMAP
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/testaliases.txt b/Build/source/libs/icu/icu-xetex/test/testdata/testaliases.txt
new file mode 100644
index 00000000000..1ae48be88cf
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/testaliases.txt
@@ -0,0 +1,65 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 2002-2006, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+
+// This is a test resource to check whether the aliasing mechanism works
+// as advertised
+
+testaliases:table(nofallback)
+{
+ // This should produce an error - circular alias
+ aaa:alias { "testaliases/aab" } // Test circular dependency protection
+ aab:alias { "testaliases/aaa" }
+
+ // aliasing nonexist position
+ nonexisting:alias { "/ICUDATA/ja" }
+
+ // aliasing to another resource
+ simplealias:alias { "testtypes/menu/file/open" } // simple referencing
+
+ // alias that uses another alias and references parts of the end structure
+ referencingalias:alias { "testaliases/anotheralias/2" } // Referencing through another alias
+ anotheralias:alias { "/ICUDATA/ja_JP/LocaleScript" } // Provoke a fallback too
+
+ LocaleScript:alias { "/ICUDATA/ja/LocaleScript" }
+
+ // aliasing using position
+ boundaries:alias { "/ICUDATA-brkitr/ja" } // Referencing corresponding resource in another bundle
+
+ // aliasing arrays
+ zoneTests {
+ zoneAlias:alias { "/ICUDATA/en/zoneStrings" } // Referencing by index
+ zoneAlias1:alias { "/ICUDATA/en/zoneStrings/3" } // Referencing by index
+ zoneAlias2:alias { "/ICUDATA/en/zoneStrings/3/0" } // Referencing by index
+ }
+
+ // Test aliasing parts of an array using position
+ zoneStrings {
+ :alias { "/ICUDATA/en" }
+ :alias { "/ICUDATA/en" }
+ }
+ // WARNING: this test assumes that on all platforms digits sort normally
+ // if not, the test may fail
+ testGetStringByKeyAliasing {
+ KeyAlias0PST:alias { "te/zoneStrings/2/0" } //"America/Los_Angeles",
+ KeyAlias1PacificStandardTime:alias { "te/zoneStrings/2/1" } //"Pacific Standard Time",
+ KeyAlias2PDT:alias { "te/zoneStrings/2/4" } //"PDT",
+ KeyAlias3LosAngeles:alias { "te/zoneStrings/2/5" } //"Los Angeles",
+ }
+ testGetStringByIndexAliasing {
+ :alias { "te/zoneStrings/2/0" } //"America/Los_Angeles",
+ :alias { "te/zoneStrings/2/1" } //"Pacific Standard Time",
+ :alias { "te/zoneStrings/2/4" } //"PDT",
+ :alias { "te/zoneStrings/2/5" } //"Los Angeles",
+ }
+ testAliasToTree:alias{"/ICUDATA-coll/en/collations"}
+
+}
+
+//eof
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/testdata.mak b/Build/source/libs/icu/icu-xetex/test/testdata/testdata.mak
new file mode 100644
index 00000000000..3bd1585d87d
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/testdata.mak
@@ -0,0 +1,144 @@
+#**********************************************************************
+#* Copyright (C) 1999-2007, International Business Machines Corporation
+#* and others. All Rights Reserved.
+#**********************************************************************
+#
+# 03/19/2001 weiv, schererm Created
+
+.SUFFIXES : .res .txt
+
+TESTPKG=testdata
+TESTDT=$(TESTPKG)
+
+
+ALL : "$(TESTDATAOUT)\testdata.dat"
+ @echo Test data is built.
+
+# icu26_testtypes.res is there for cintltst/udatatst.c/TestSwapData()
+# I generated it with an ICU 2.6.1 build on Windows after removing
+# testincludeUTF (which made it large, unnecessarily for this test)
+# and CollationElements (which will not work with a newer swapper)
+# markus 2003nov19
+
+# icu26e_testtypes.res is the same, but icuswapped to big-endian EBCDIC
+# markus 2003nov21
+
+# the following file has $(TEST_RES_SOURCE)
+!INCLUDE "$(TESTDATA)\tstfiles.mk"
+
+TEST_RES_FILES = $(TEST_RES_SOURCE:.txt=.res)
+
+"$(TESTDATAOUT)\testdata.dat" : $(TEST_RES_FILES) "$(TESTDATABLD)\casing.res" "$(TESTDATABLD)\conversion.res" "$(TESTDATABLD)\icuio.res" "$(TESTDATABLD)\mc.res" "$(TESTDATABLD)\structLocale.res" "$(TESTDATABLD)\root.res" "$(TESTDATABLD)\sh.res" "$(TESTDATABLD)\sh_YU.res" "$(TESTDATABLD)\te.res" "$(TESTDATABLD)\te_IN.res" "$(TESTDATABLD)\te_IN_REVISED.res" "$(TESTDATABLD)\testaliases.res" "$(TESTDATABLD)\testtypes.res" "$(TESTDATABLD)\testempty.res" "$(TESTDATABLD)\iscii.res" "$(TESTDATABLD)\idna_rules.res" "$(TESTDATABLD)\DataDrivenCollationTest.res" "$(TESTDATABLD)\test.icu" "$(TESTDATABLD)\testtable32.res" "$(TESTDATABLD)\test1.cnv" "$(TESTDATABLD)\test3.cnv" "$(TESTDATABLD)\test4.cnv" "$(TESTDATABLD)\test4x.cnv" "$(TESTDATABLD)\ibm9027.cnv" "$(TESTDATABLD)\nfscsi.spp" "$(TESTDATABLD)\nfscss.spp" "$(TESTDATABLD)\nfscis.spp" "$(TESTDATABLD)\nfsmxs.spp" "$(TESTDATABLD)\nfsmxp.spp"
+ @echo Building test data
+ @copy "$(TESTDATABLD)\te.res" "$(TESTDATAOUT)\$(TESTDT)\nam.typ"
+ @copy "$(TESTDATA)\icu26_testtypes.res" "$(TESTDATABLD)"
+ @copy "$(TESTDATA)\icu26e_testtypes.res" "$(TESTDATABLD)"
+ "$(ICUP)\bin\pkgdata" -f -v -m common -c -p"$(TESTPKG)" -d "$(TESTDATAOUT)" -T "$(TESTDATABLD)" -s "$(TESTDATABLD)" <<
+casing.res
+conversion.res
+mc.res
+root.res
+testtable32.res
+sh.res
+sh_YU.res
+te.res
+te_IN.res
+te_IN_REVISED.res
+testtypes.res
+icu26_testtypes.res
+icu26e_testtypes.res
+testempty.res
+testaliases.res
+structLocale.res
+icuio.res
+iscii.res
+test.icu
+test1.cnv
+test3.cnv
+test4.cnv
+test4x.cnv
+ibm9027.cnv
+idna_rules.res
+nfscsi.spp
+nfscss.spp
+nfscis.spp
+nfsmxs.spp
+nfsmxp.spp
+$(TEST_RES_FILES:.res =.res
+)
+<<
+
+
+# Inference rule for creating resource bundles
+# Some test data resource bundles are known to have warnings and bad data.
+# The -q option is there on purpose, so we don't see it normally.
+{$(TESTDATA)}.txt.res::
+ @echo Making Test Resource Bundle files $<
+ @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -q -s"$(TESTDATA)" -d"$(TESTDATABLD)" $<
+
+"$(TESTDATABLD)\iscii.res": "$(TESTDATA)\iscii.bin"
+ @echo Making Test Resource Bundle file with encoding ISCII,version=0
+ @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATA)" -eISCII,version=0 -d"$(TESTDATABLD)" iscii.bin
+
+"$(TESTDATABLD)\idna_rules.res": "$(TESTDATA)\idna_rules.txt"
+ @echo Making Test Resource Bundle file for IDNA reference implementation
+ @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATA)" -d"$(TESTDATABLD)" idna_rules.txt
+
+
+"$(TESTDATABLD)\test.icu" : {"$(ICUTOOLS)\gentest\$(CFG)"}gentest.exe
+ "$(ICUTOOLS)\gentest\$(CFG)\gentest" -d"$(TESTDATABLD)"
+
+# testtable32 resource file
+"$(TESTDATABLD)\testtable32.txt" : {"$(ICUTOOLS)\gentest\$(CFG)"}gentest.exe
+ "$(ICUTOOLS)\gentest\$(CFG)\gentest" -r -d"$(TESTDATABLD)"
+
+"$(TESTDATABLD)\testtable32.res": "$(TESTDATABLD)\testtable32.txt"
+ "$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATABLD)" -d"$(TESTDATABLD)" testtable32.txt
+
+# Targets for nfscsi.spp
+"$(TESTDATABLD)\nfscsi.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cs_prep_ci.txt"
+ @echo Building $@
+ @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscsi -u 3.2.0 nfs4_cs_prep_ci.txt
+
+# Targets for nfscss.spp
+"$(TESTDATABLD)\nfscss.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cs_prep_cs.txt"
+ @echo Building $@
+ @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscss -u 3.2.0 nfs4_cs_prep_cs.txt
+
+# Targets for nfscis.spp
+"$(TESTDATABLD)\nfscis.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cis_prep.txt"
+ @echo Building $@
+ @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscis -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_cis_prep.txt
+
+# Targets for nfsmxs.spp
+"$(TESTDATABLD)\nfsmxs.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_mixed_prep_s.txt"
+ @echo Building $@
+ @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfsmxs -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_mixed_prep_s.txt
+
+# Targets for nfsmxp.spp
+"$(TESTDATABLD)\nfsmxp.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_mixed_prep_p.txt"
+ @echo Building $@
+ @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfsmxp -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_mixed_prep_p.txt
+
+
+# Targets for test converter data
+"$(TESTDATABLD)\test1.cnv": "$(TESTDATA)\test1.ucm"
+ @echo Building $@
+ @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $**
+
+"$(TESTDATABLD)\test3.cnv": "$(TESTDATA)\test3.ucm"
+ @echo Building $@
+ @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $**
+
+"$(TESTDATABLD)\test4.cnv": "$(TESTDATA)\test4.ucm"
+ @echo Building $@
+ @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $**
+
+"$(TESTDATABLD)\test4x.cnv": "$(TESTDATA)\test4x.ucm"
+ @echo Building $@
+ @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $**
+
+"$(TESTDATABLD)\ibm9027.cnv": "$(TESTDATA)\ibm9027.ucm"
+ @echo Building $@
+ @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $**
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/testempty.txt b/Build/source/libs/icu/icu-xetex/test/testdata/testempty.txt
new file mode 100644
index 00000000000..98cf164788f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/testempty.txt
@@ -0,0 +1,10 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 1998-2000, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+// empty resource bundle test
+testempty{
+
+} \ No newline at end of file
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/testtypes.txt b/Build/source/libs/icu/icu-xetex/test/testdata/testtypes.txt
new file mode 100644
index 00000000000..df5b4627efc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/testtypes.txt
@@ -0,0 +1,81 @@
+//*******************************************************************************
+//*
+//* Copyright (C) 1998-2003, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+
+// This is a test resource to check new types of resources
+
+testtypes
+{
+ zerotest { "abc\u0000def" } // The length of this string should be 7, not 3
+ binarytest:bin { 000102030405060708090a0b0c0d0e } // Binary 15 bytes long
+ onehundredtwentythree:int {123 } //
+ one:int { 1 } // number one
+ importtest:import { "importtest.bin" }
+ integerarray:intvector { 1, 2, 3, -3, 4, 5, 6, 7 } // an array of 32-bit integers
+ minusone:int {-1} // number -1
+ plusone:int {1} // number 1
+
+ // Empties
+ emptyexplicitstring:string { "" }
+ emptystring { "" }
+ emptyintv:intvector { }
+ emptybin:bin { "" }
+ emptyint:int { "" }
+ emptytable:table { }
+ emptyarray:array
+ {
+ }
+ testescape{ "tab:\t cr:\r ff:\f newline:\n backslash:\\\\ quote=\\\' doubleQuote=\\\" singlequoutes=''" }
+
+ // genrb just includes the test as a string after converting to UTF-16
+
+ testincludeUTF:include{ "riwords.txt" }
+ // No unescaping is done.
+ testinclude:include{ "translit_rules.txt" }
+
+ // Genrb failed parsing \u0075 sequence this tests it
+ collations {
+ standard {
+ Version{"x01"}
+ Sequence{
+ "&'\u0075' = '\uFF55'" // LATIN SMALL LETTER U
+ }
+ }
+ }
+
+ string{ }
+ stringTable{{}}
+ //nested table
+ menu {
+ file {
+ open { "Open" }
+ save { "Save" }
+ exit { "Exit" }
+ }
+ }
+ test_underscores{
+ "test message ...."
+ }
+ test_unescaping{"[ \\u0020 \\u00A0 \\u1680 \\u2000 \\u2001 \\u2002 \\u2003 \\u2004 \\u2005 \\u2006 \\u2007 "
+ "\\u2008 \\u2009 \\u200A \u200B \\u202F \u205F \\u3000 \u0000-\u001F \u007F \u0080-\u009F "
+ "\\u06DD \\u070F \\u180E \\u200C \\u200D \\u2028 \\u2029 \\u2060 \\u2061 \\u2062 \\u2063 "
+ "\\u206A-\\u206F \\uFEFF \\uFFF9-\uFFFC \U0001D173-\U0001D17A \U000F0000-\U000FFFFD "
+ "\U00100000-\U0010FFFD \uFDD0-\uFDEF \uFFFE-\uFFFF \U0001FFFE-\U0001FFFF \U0002FFFE-\U0002FFFF "
+ "\U0003FFFE-\U0003FFFF \U0004FFFE-\U0004FFFF \U0005FFFE-\U0005FFFF \U0006FFFE-\U0006FFFF "
+ "\U0007FFFE-\U0007FFFF \U0008FFFE-\U0008FFFF \U0009FFFE-\U0009FFFF \U000AFFFE-\U000AFFFF "
+ "\U000BFFFE-\U000BFFFF \U000CFFFE-\U000CFFFF \U000DFFFE-\U000DFFFF \U000EFFFE-\U000EFFFF "
+ "\U000FFFFE-\U000FFFFF \U0010FFFE-\U0010FFFF \uD800-\uDFFF \\uFFF9 \\uFFFA \\uFFFB "
+ "\uFFFC \uFFFD \u2FF0-\u2FFB \u0340 \u0341 \\u200E \\u200F \\u202A \\u202B \\u202C "
+ "\\u202D \\u202E \\u206A \\u206B \\u206C \\u206D \\u206E \\u206F \U000E0001 \U000E0020-\U000E007F "
+ "]"
+ }
+
+}
+
+//eof
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/translit_rules.txt b/Build/source/libs/icu/icu-xetex/test/testdata/translit_rules.txt
new file mode 100644
index 00000000000..b45837d691f
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/translit_rules.txt
@@ -0,0 +1,146 @@
+#--------------------------------------------------------------------
+# Copyright (c) 1999-2004, International Business Machines
+# Corporation and others. All Rights Reserved.
+#--------------------------------------------------------------------
+
+# InterIndic-Bengali
+#:: NFD (NFC) ;
+\uE001>\u0981; # SIGN CANDRABINDU
+\uE002>\u0982; # SIGN ANUSVARA
+\uE003>\u0983; # SIGN VISARGA
+\uE005>\u0985; # LETTER A
+\uE006>\u0986; # LETTER AA
+\uE007>\u0987; # LETTER I
+\uE008>\u0988; # LETTER II
+\uE009>\u0989; # LETTER U
+\uE00A>\u098A; # LETTER UU
+\uE00B>\u098B; # LETTER VOCALIC R
+\uE00C>\u098C; # LETTER VOCALIC L
+\uE00D>\u098F; # FALLBACK
+\uE00E>\u098F; # FALLBACK
+\uE00F>\u098F; # LETTER E
+\uE010>\u0990; # LETTER AI
+\uE011>\u0993; # FALLBACK
+\uE012>\u0993; # FALLBACK
+\uE013>\u0993; # LETTER O
+\uE014>\u0994; # LETTER AU
+\uE015>\u0995; # LETTER KA
+\uE016>\u0996; # LETTER KHA
+\uE017>\u0997; # LETTER GA
+\uE018>\u0998; # LETTER GHA
+\uE019>\u0999; # LETTER NGA
+\uE01A>\u099A; # LETTER CA
+\uE01B>\u099B; # LETTER CHA
+\uE01C>\u099C; # LETTER JA
+\uE01D>\u099D; # LETTER JHA
+\uE01E>\u099E; # LETTER NYA
+\uE01F>\u099F; # LETTER TTA
+\uE020>\u09A0; # LETTER TTHA
+\uE021>\u09A1; # LETTER DDA
+\uE022>\u09A2; # LETTER DDHA
+\uE023>\u09A3; # LETTER NNA
+\uE024>\u09A4; # LETTER TA
+\uE025>\u09A5; # LETTER THA
+\uE026>\u09A6; # LETTER DA
+\uE027>\u09A7; # LETTER DHA
+\uE028>\u09A8; # LETTER NA
+\uE029>\u09A8\u09BC; # REMAP (indicExceptions.txt): \u09a9>\u09a8 = LETTER NNNA>LETTER NA
+\uE02A>\u09AA; # LETTER PA
+\uE02B>\u09AB; # LETTER PHA
+\uE02C>\u09AC; # LETTER BA
+\uE02D>\u09AD; # LETTER BHA
+\uE02E>\u09AE; # LETTER MA
+\uE02F>\u09AF; # LETTER YA
+\uE030>\u09B0; # LETTER RA
+\uE031>\u09B0\u09BC; # FALLBACK to RA
+\uE032>\u09B2; # LETTER LA
+\uE033>\u09B2; # REMAP (indicExceptions.txt): \u09b3>\u09b2 = LETTER LLA>LETTER LA
+\uE034>\u09B2; # REMAP (indicExceptions.txt): \u09b4>\u09b2 = LETTER LLLA>LETTER LA
+\uE035>\u09AC; # REMAP (indicExceptions.txt): \u09b5>\u09ac = LETTER VA>LETTER BA
+\uE036>\u09B6; # LETTER SHA
+\uE037>\u09B7; # LETTER SSA
+\uE038>\u09B8; # LETTER SA
+\uE039>\u09B9; # LETTER HA
+\uE03C>\u09BC; # SIGN NUKTA
+\uE03D>; # FALLBACK BLOW AWAY AVAGRAHA
+\uE03E>\u09BE; # VOWEL SIGN AA
+\uE03F>\u09BF; # VOWEL SIGN I
+\uE040>\u09C0; # VOWEL SIGN II
+\uE041>\u09C1; # VOWEL SIGN U
+\uE042>\u09C2; # VOWEL SIGN UU
+\uE043>\u09C3; # VOWEL SIGN VOCALIC R
+\uE044>\u09C4; # VOWEL SIGN VOCALIC RR
+\uE045>\u09C7; # REMAP (indicExceptions.txt): \u09c5>\u09c7 = VOWEL SIGN CANDRA E>VOWEL SIGN E
+\uE046>\u09C7; # FALLBACK
+\uE047>\u09C7; # VOWEL SIGN E
+\uE048>\u09C8; # VOWEL SIGN AI
+\uE049>\u09C7\u09BE; # REMAP (indicExceptions.txt): \u09c9>\u09cb = VOWEL SIGN CANDRA O>VOWEL SIGN O
+\uE04A>\u09C7\u09BE; # FALLBACK
+\uE04B>\u09C7\u09BE; # VOWEL SIGN O
+\uE04C>\u09C7\u09D7; # VOWEL SIGN AU
+\uE04D>\u09CD; # SIGN VIRAMA
+\uE050>\u0993\u0982; # InterIndic-Bengali: OM
+\ue051>;
+\ue052>;
+\ue053>;
+\ue054>;
+\uE055>; # LENGTH MARK
+\uE056>\u09C8; # REMAP (indicExceptions.txt): \u09d6>\u09c8 = AI LENGTH MARK>VOWEL SIGN AI
+\uE057>\u09D7; # AU LENGTH MARK
+\uE058>\u0995\u09BC; # FALLBACK
+\uE059>\u0996\u09BC; # REMAP (indicExceptions.txt): \u09d9>\u0996 = LETTER KHHA>LETTER KHA
+\uE05A>\u0997\u09BC; # REMAP (indicExceptions.txt): \u09da>\u0997 = LETTER GHHA>LETTER GA
+\uE05B>\u099C\u09BC; # REMAP (indicExceptions.txt): \u09db>\u099c = LETTER ZA>LETTER JA
+\uE05C>\u09A1\u09BC; # FALLBACK
+\uE05D>\u09A2\u09BC; # LETTER RHA
+\uE05E>\u09AB\u09BC; # REMAP (indicExceptions.txt): \u09de>\u09ab = LETTER FA>LETTER PHA
+\uE05F>\u09AF\u09BC; # LETTER YYA
+\uE060>\u09E0; # LETTER VOCALIC RR
+\uE061>\u09E1; # LETTER VOCALIC LL
+\uE062>\u09E2; # VOWEL SIGN VOCALIC L
+\uE063>\u09E3; # VOWEL SIGN VOCALIC LL
+\uE064>\u0964; # DANDA
+\uE065>\u0965; # DOUBLE DANDA
+\uE066>\u09E6; # DIGIT ZERO
+\uE067>\u09E7; # DIGIT ONE
+\uE068>\u09E8; # DIGIT TWO
+\uE069>\u09E9; # DIGIT THREE
+\uE06A>\u09EA; # DIGIT FOUR
+\uE06B>\u09EB; # DIGIT FIVE
+\uE06C>\u09EC; # DIGIT SIX
+\uE06D>\u09ED; # DIGIT SEVEN
+\uE06E>\u09EE; # DIGIT EIGHT
+\uE06F>\u09EF; # DIGIT NINE
+\ue070>; # ABBREVIATION SIGN
+\ue071>\u09F0; # LETTER RA WITH MIDDLE DIAGONAL
+\ue072>\u09F1; # LETTER RA WITH LOWER DIAGONAL
+\ue073>\u09F2; # RUPEE MARK
+\ue074>\u09F3; # RUPEE SIGN
+\ue075>\u09F4; # CURRENCY NUMERATOR ONE
+\ue076>\u09F5; # CURRENCY NUMERATOR TWO
+\ue077>\u09F6; # CURRENCY NUMERATOR THREE
+\ue078>\u09F7; # CURRENCY NUMERATOR FOUR
+\ue079>\u09F8; # CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR
+\ue07A>\u09F9; # CURRENCY DENOMINATOR SIXTEEN
+\ue07B>\u09FA; # ISSHAR
+\uE07C>; # TIPPI
+\uE07D>; # ADDAK
+\uE07E>; # IRI
+\uE07F>; # URA
+\uE080>; # EK ONKAR
+
+0 > \u09E6; # FALLBACK FOR TAMIL
+1 > \u09E7;
+
+
+
+
+
+
+
+
+
+
+
+# :: NFC (NFD) ;
+# eof
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/tstfiles.mk b/Build/source/libs/icu/icu-xetex/test/testdata/tstfiles.mk
new file mode 100644
index 00000000000..8ba8d45593c
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/tstfiles.mk
@@ -0,0 +1,10 @@
+# Copyright (C) 2007, International Business Machines Corporation and others. All Rights Reserved.
+#
+# TEST_RES_SOURCE defines data driven tests and other resource files to be included with
+# the testdata package. For ordinary resource bundles, they only need to be referenced here.
+#
+# Not everything has been moved to this file yet, as this is a new facility.
+#
+
+TEST_RES_SOURCE=DataDrivenCollationTest.txt calendar.txt format.txt
+
diff --git a/Build/source/libs/icu/icu-xetex/test/testdata/uni-text.bin b/Build/source/libs/icu/icu-xetex/test/testdata/uni-text.bin
new file mode 100644
index 00000000000..08adec348a5
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testdata/uni-text.bin
Binary files differ
diff --git a/Build/source/libs/icu/icu-xetex/test/testmap/Makefile.in b/Build/source/libs/icu/icu-xetex/test/testmap/Makefile.in
new file mode 100644
index 00000000000..9499b2c942e
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testmap/Makefile.in
@@ -0,0 +1,80 @@
+## Makefile.in for ICU - test/testmap
+## Copyright (c) 2003-2006, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/testmap
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = testmap$(EXEEXT)
+
+#DEFS = @DEFS@
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n
+#CFLAGS += @CFLAGS@
+#CXXFLAGS = @CXXFLAGS@
+
+LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = testmap.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+Xall: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+ $(INVOKE) ./$(TARGET)
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
diff --git a/Build/source/libs/icu/icu-xetex/test/testmap/testmap.c b/Build/source/libs/icu/icu-xetex/test/testmap/testmap.c
new file mode 100644
index 00000000000..793faa18f47
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testmap/testmap.c
@@ -0,0 +1,76 @@
+/*
+**********************************************************************
+* Copyright (C) 1998-2003, International Business Machines Corporation
+* and others. All Rights Reserved.
+**********************************************************************
+*
+* File date.c
+*
+* Modification History:
+*
+* Date Name Description
+* 4/26/2000 srl created
+*******************************************************************************
+*/
+
+#include "unicode/utypes.h"
+#include <stdio.h>
+#include <string.h>
+#include "unicode/udata.h"
+#include "unicode/ucnv.h"
+
+extern const char U_IMPORT U_ICUDATA_ENTRY_POINT [];
+
+int
+main(int argc,
+ char **argv)
+{
+ UConverter *c;
+
+ int32_t month = -1, year = -1;
+ UErrorCode status = U_ZERO_ERROR;
+ status = U_ZERO_ERROR;
+
+
+ udata_setCommonData(NULL, &status);
+ printf("setCommonData(NULL) -> %s [should fail]\n", u_errorName(status));
+ if(status != U_ILLEGAL_ARGUMENT_ERROR)
+ {
+ printf("*** FAIL: should have returned U_ILLEGAL_ARGUMENT_ERROR\n");
+ return 1;
+ }
+
+ status = U_ZERO_ERROR;
+ udata_setCommonData(U_ICUDATA_ENTRY_POINT, &status);
+ printf("setCommonData(%p) -> %s\n", U_ICUDATA_ENTRY_POINT, u_errorName(status));
+ if(U_FAILURE(status))
+ {
+ printf("*** FAIL: should have returned U_ZERO_ERROR\n");
+ return 1;
+ }
+
+ status = U_ZERO_ERROR;
+ c = ucnv_open("iso-8859-7", &status);
+ printf("ucnv_open(iso-8859-7)-> %p, err = %s, name=%s\n", c, u_errorName(status), (!c)?"?":ucnv_getName(c,&status) );
+ if(status != U_ZERO_ERROR)
+ {
+ printf("\n*** FAIL: should have returned U_ZERO_ERROR;\n");
+ return 1;
+ }
+ else
+ {
+ ucnv_close(c);
+ }
+
+ status = U_ZERO_ERROR;
+ udata_setCommonData(U_ICUDATA_ENTRY_POINT, &status);
+ printf("setCommonData(%p) -> %s [should fail]\n", U_ICUDATA_ENTRY_POINT, u_errorName(status));
+ if ( status != U_USING_DEFAULT_WARNING )
+ {
+ printf("\n*** FAIL: should have returned U_USING_DEFAULT_ERROR\n");
+ return 1;
+ }
+
+ printf("\n*** PASS PASS PASS, test PASSED!!!!!!!!\n");
+ return 0;
+}
diff --git a/Build/source/libs/icu/icu-xetex/test/testmap/testmap.dsp b/Build/source/libs/icu/icu-xetex/test/testmap/testmap.dsp
new file mode 100644
index 00000000000..c2b49ad8ea0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/testmap/testmap.dsp
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="testmap" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=testmap - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "testmap.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "testmap.mak" CFG="testmap - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "testmap - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "testmap - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "testmap - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\include" /D "UDATA_MAP_DLL" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 icudata.lib icuuc.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../lib" /libpath:"../../data" /libpath:"../../../data"
+
+!ELSEIF "$(CFG)" == "testmap - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "UDATA_MAP_DLL" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 icudata.lib icuucd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../lib" /libpath:"../../data" /libpath:"../../../data"
+
+!ENDIF
+
+# Begin Target
+
+# Name "testmap - Win32 Release"
+# Name "testmap - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\testmap.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Build/source/libs/icu/icu-xetex/test/thaitest/Makefile.in b/Build/source/libs/icu/icu-xetex/test/thaitest/Makefile.in
new file mode 100644
index 00000000000..63cc7b7f632
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/thaitest/Makefile.in
@@ -0,0 +1,80 @@
+## Makefile.in for ICU - test/thaitest
+## Copyright (c) 2003, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = test/thaitest
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = thaitest$(EXEEXT)
+
+DEFS = @DEFS@
+CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n
+#CFLAGS += @CFLAGS@
+#CXXFLAGS = @CXXFLAGS@
+
+LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
+
+OBJECTS = thaitest.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+ $(INVOKE) ./$(TARGET)
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
diff --git a/Build/source/libs/icu/icu-xetex/test/thaitest/space.txt b/Build/source/libs/icu/icu-xetex/test/thaitest/space.txt
new file mode 100644
index 00000000000..f89194260ed
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/thaitest/space.txt
@@ -0,0 +1,322 @@
+บท ที่๑พายุ ไซโคลน
+โด โรธี อาศัย อยู่ ท่ามà¸à¸¥à¸²à¸‡ ทุ่งใหà¸à¹ˆ ใน à¹à¸„นซัส à¸à¸±à¸š ลุง เฮ นรี ชาวไร่ à¹à¸¥à¸° ป้า เอ็ม ภรรยา ชาวไร่
+
+บ้าน ของ พวภเขา หลัง เล็ภเพราะ ไม้ สร้าง บ้าน ต้อง ขน มา ด้วย เà¸à¸§à¸µà¸¢à¸™ เป็น
+
+ระยะ ทาง หลาย ไมล์
+
+บ้าน มี สี่ à¸à¸² มี พื้น à¸à¸±à¸š หลังคา รวม ทำ เป็น ห้อง เดียว
+
+ใน ห้อง มี ทั้ง เตา หุง ต้ม ที่ สนิม ดู ขึ้น เลอะ
+
+มี ตู้ ใส่ ถ้วย
+
+ชาม
+
+โต๊ะ
+
+เà¸à¹‰à¸²à¸­à¸µà¹‰ สาม หรือ สี่ ตัว
+
+à¹à¸¥à¹‰à¸§ à¸à¹‡ มี เตียง นอน
+
+ลุง เฮ นรี à¸à¸±à¸š ป้า เอ็ม มี เตียง นอน ใหà¸à¹ˆ อยู่ ที่ มุม หนึ่ง
+
+ส่วน โด โร ธีมี เตียง เล็ภอีภที่ มุม หนึ่ง
+
+ไม่มี ห้อง ใต้ เพดาน เลย ห้อง ใต้ถุน à¸à¹‡ ไม่มี
+
+เว้น à¹à¸•à¹ˆ มี โพ รง เล็à¸à¹†
+
+ที่ ขุด ไป ใต้
+
+พื้น เรียภว่า
+
+"โพรง ไซโคลน"
+
+เป็น ที่ ครอบครัว นี้ จะ มุด เข้าไป เมื่อ เà¸à¸´à¸” ลม มหา ภัย
+
+ซึ่ง à¸à¸£à¸°à¹‚ชภà¹à¸£à¸‡ จน บดขยี้ สิ่ง à¸à¹ˆà¸­ สร้าง ใดๆ
+
+ที่ ขวาง ทาง มัน ได้ ตรง à¸à¸¥à¸²à¸‡ พื้น มี à¸à¸² เปิด เข้าไป
+
+จาภนั้น มี บันได ลง ไป ถึง โพรง มืด เล็à¸à¹†
+
+
+เมื่อ โด โรธี ยืน ที่ ปาภประตู à¹à¸¥à¸° มอง ไป รอบๆ
+
+เธอ ไม่ เห็น อะไร นอà¸à¸ˆà¸²à¸ ท้อง ทุ่ง à¸à¸§à¹‰à¸²à¸‡ สี เทา หม่น ทั่ว ทุภด้าน
+
+ไม่มี à¹à¸¡à¹‰ ต้นไม้ สัภต้น หรือ บ้าน สัภหลัง ที่ โผล่ พ้น ภูมิประเทศ อัน ราบ เรียบ
+
+à¹à¸œà¹ˆ ไป ไà¸à¸¥ จน จด ขอบ ฟ้า ทั่ว ทุภทิศ
+
+ดวงตะวัน เผา ผืน ดิน ที่ ไถ à¹à¸¥à¹‰à¸§ จน à¸à¸¥à¸²à¸¢ เป็น à¹à¸œà¹ˆà¸™ มหึมา สี ดำ
+
+มี รอย à¹à¸•à¸ ระà¹à¸«à¸‡ อยู่ ตลอด
+
+à¹à¸¡à¹‰à¹à¸•à¹ˆ หà¸à¹‰à¸² à¸à¹‡ ไม่ เขียว
+
+เพราะ ดวงตะวัน เผา ยอด ใบ ยาว เสีย จน เป็น สี เทา หม่น มอง เห็น อยู่ ทั่วไป
+
+ครั้ง หนึ่ง เคย ทาสี บ้าน เอา ไว้
+
+à¹à¸•à¹ˆ à¸à¹‡ ถูภดวงตะวัน เผา เสีย จน สี พอง
+
+à¹à¸¥à¹‰à¸§ à¸à¸™ à¸à¹‡ ชะ มัน หลุด ไป จน หมด
+
+à¹à¸¥à¸° ตอน นี้ บ้าน จึง ดู หม่นหมอง เป็น สี เทา เหมือน สิ่ง อื่นๆ
+
+ด้วย
+
+
+ตอน ที่ ป้า เอ็ม ย้าย มา อยู่ ที่ นี่
+
+เธอ ยัง สาว
+
+เป็น ภรรยา ที่ งดงาม
+
+à¹à¸¥à¹‰à¸§ à¹à¸”ด à¹à¸¥à¸° ลม à¸à¹‡à¹„ด้ เปลี่ยน เธอ ไป
+
+เอา ประà¸à¸²à¸¢ ไป จาภดวงตา เธอ ปล่อย ไว้ à¹à¸•à¹ˆ ความ สุขุม อย่าง หม่นหมอง
+
+เอา สี à¹à¸”ง จาภà¹à¸à¹‰à¸¡ à¹à¸¥à¸° ริม à¸à¸µà¸›à¸²à¸ เธอ ไป
+
+à¸à¸¥à¸²à¸¢ เป็น สี หม่นๆ
+
+เหมือน à¸à¸±à¸™
+
+เธอ ผอม à¹à¸¥à¸° หลัง โค้ง
+
+à¹à¸¥à¸° เดี๋ยว นี้ ไม่ เคย ยิ้ม เลย
+
+เมื่อ โด โรธี ซึ่ง เป็น เด็ภà¸à¸³à¸žà¸£à¹‰à¸² มา อยู่ à¸à¸±à¸š เธอ ตอน à¹à¸£à¸
+
+ป้า เอ็ม ตื่น เต้น à¸à¸±à¸š เสียง หัวเราะ ของ เด็ภน้อย มาà¸
+
+เธอ จะ ส่ง เสียง ร้อง à¹à¸¥à¹‰à¸§ เอา มือ ทาบ อภทุภครั้ง ที่ เสียง อัน ร่าเริง ของ โด โรธี เข้าหู เธอ
+
+à¹à¸¥à¸° เธอ เà¸à¹‰à¸² มอง เด็ภหà¸à¸´à¸‡ น้อยๆ
+
+ด้วย ความ ประหลาด ใจ
+
+ด้วย ยัง หา อะไร มา เป็น เรื่อง หัวเราะ ได้
+
+
+ลุง เฮ นรี ไม่ เคย หัวเราะ
+
+ลุง ทำงาน หนัภจาภเช้า ยัน ค่ำ
+
+à¹à¸¥à¸° ไม่ เคย รู้จัภว่า ความ ร่าเริง คือ อะไร
+
+ลุง ดู หม่นหมอง ไป หมด ตั้งà¹à¸•à¹ˆ เครา ยาว จน จด รองเท้า บูต อัน หยาบ
+
+à¹à¸¥à¹‰à¸§ ลุง à¸à¹‡ ดู เคร่งขรึม น่า เà¸à¸£à¸‡ ขาม ไม่ ค่อย จะ พูด
+
+
+มี โต โต้ ที่ ทำให้ โด โรธี หัวเราะ ได้
+
+à¹à¸¥à¸° ช่วย เธอ ให้ พ้น จาภà¸à¸²à¸£à¸ ลาย เป็น สี เทา หม่น เหมือน à¸à¸±à¸š สิ่ง รอบ ตัว อื่นๆ
+
+โต โต้ สี ไม่ เทา หม่น
+
+à¹à¸•à¹ˆ มัน เป็น หมา สี ดำ ตัว น้อยๆ
+
+ขน ยาว ปุย ราวà¸à¸±à¸š ไหม
+
+มี ตา ดำ เล็ภเป็น ประà¸à¸²à¸¢ รื่นเริง อยู่ สอง ข้าง จมูภเล็ภอัน น่า ขัน ของ มัน
+
+โต โต้ เล่น ทั้ง วัน
+
+à¹à¸¥à¸° โด โรธี à¸à¹‡ เล่น à¸à¸±à¸š มัน
+
+à¹à¸¥à¸° รัภมัน เหลือ เà¸à¸´à¸™
+
+
+อย่างไร à¸à¹‡à¸•à¸²à¸¡
+
+วัน นี้ ทั้ง คู่ ไม่ ได้ เล่น
+
+ลุง เฮ นรี นั่ง อยู่ ที่ บันได ประตู à¹à¸¥à¸° เà¸à¹‰à¸² à¸à¸±à¸‡à¸§à¸¥ จ้อง ดู ท้องฟ้า สี เทา หม่น ผิด ปà¸à¸•à¸´
+
+โด โรธี ยืน ที่ ประตู
+
+à¸à¸­à¸” โต โต้ ไว้ ใน อ้อม à¹à¸‚น
+
+à¹à¸¥à¸° à¸à¹‡ มอง ดู ท้องฟ้า อยู่ เหมือน à¸à¸±à¸™
+
+ป้า เอ็ มà¸à¸³ ลัง ล้าง ชาม อยู่
+
+
+
+จาภด้าน เหนือ ไà¸à¸¥ ออภไป
+
+มี เสียง ลม คราง à¹à¸œà¹ˆà¸§ เบา ได้ยิน มา
+
+ลุง เฮ นรี à¹à¸¥à¸° โด โรธี เห็น ต้น หà¸à¹‰à¸² สูง เอน เป็น คลื่น à¸à¹ˆà¸­à¸™ ที่ พายุ จะ มา ถึง
+
+à¹à¸¥à¹‰à¸§ à¸à¹‡ มี เสียง หวีด หวิว ชัดเจน มา จาภบรรยาà¸à¸²à¸¨ ทาง ใต้
+
+à¹à¸¥à¸° เมื่อ เหลือบ ตา ไป ทาง ด้าน นั้น à¸à¹‡ เห็น คลื่น หà¸à¹‰à¸² มา ทาง ด้าน นั้น ด้วย
+
+
+
+ลุง เฮ นรี ผุด ลุภขึ้น ทันใด
+
+
+
+"ลม ไซโคลน มา
+
+เอ็ม"
+
+ลุง ร้อง บอภภรรยา
+
+"ข้า จะ ไป ดู สัตว์ เลี้ยง หน่อย"
+
+à¹à¸¥à¹‰à¸§ ลุง à¸à¹‡ วิ่ง ไป ยัง เพิง ที่ วัว à¹à¸¥à¸° ม้า อาศัย อยู่
+
+
+
+ป้า เอ็ม หยุด ทำงาน à¹à¸¥à¸° มา ที่ ประตู
+
+เพียง ชายตา มอง
+
+ป้า à¸à¹‡ บอภได้ ว่า อันตราย มา ถึง à¹à¸¥à¹‰à¸§
+
+
+
+"เร็ว โด โรธี!"
+
+ป้า ตะโà¸à¸™
+
+
+
+"วิ่ง ไป ห้อง ใต้ถุน"
+
+
+
+โต โต้ ผลุน à¸à¸£à¸°à¹‚ดด ลง จาภอ้อม à¹à¸‚น โด โรธี
+
+à¹à¸¥à¹‰à¸§ เข้าไป ซ่อน อยู่ ใต้ เตียง
+
+เด็ภหà¸à¸´à¸‡ น้อย เข้าไป ดึง มัน ออภมา
+
+ป้า เอ็ มภระ ชาภà¸à¸² ที่ พื้น ออภอย่าง อภสั่น ขวัภหาย
+
+ปีน บันได ไม้ ลง ไป ใน โพรง เล็ภอัน มืด ทึบ
+
+โด โรธี จับ โต โต้ ได้ ใน ที่สุด
+
+à¹à¸¥à¸° วิ่ง ตาม ป้า เธอ ไป
+
+เมื่อ เธอ มา ได้ ครึ่ง ห้อง à¸à¹‡ มี เสียง หวีด หวือ
+
+ส่วน บ้าน à¸à¹‡ สั่น อย่าง à¹à¸£à¸‡ จน เธอ หภคะมำ นั่ง จ้ำเบ้า อยู่ à¸à¸±à¸š พื้น
+
+
+
+à¹à¸¥à¹‰à¸§ สิ่ง ประหลาด à¸à¹‡ เà¸à¸´à¸” ขึ้น
+
+
+
+บ้าน หมุน ไป หมุน มาส อง สาม รอบ
+
+à¹à¸¥à¹‰à¸§ à¸à¹‡ ลอย ขึ้น สู่ อาà¸à¸²à¸¨ อย่าง ช้าๆ
+
+โด โร ธีรู้ สึภราวà¸à¸±à¸š ว่า เธอ ได้ ขึ้น ไป à¸à¸±à¸š ลูภบอลลูน
+
+
+
+พายุ เหนือ à¸à¸±à¸š พายุ ใต้ มา พบ à¸à¸±à¸™ ตรง ที่ บ้าน พอดี
+
+à¹à¸¥à¸° ทำให้ ตรง นั้น เป็น จุดศูนย์à¸à¸¥à¸²à¸‡ ของ พายุ ไซโคลน
+
+ตาม ปà¸à¸•à¸´ ตรง à¸à¸¥à¸²à¸‡ พายุ ไซโคลน อาà¸à¸²à¸¨ จะ นิ่ง
+
+à¹à¸•à¹ˆ ความ à¸à¸”ดัน อย่าง หนัภของ ลม ทุภด้าน รอบ บ้าน
+
+ทำให้ บ้าน ลอย สูง ขึ้นๆ
+
+จน à¸à¸£à¸°à¸—ั่ง ขึ้น ไป อยู่ สุด ยอด ของ พายุ ไซโคลน
+
+à¹à¸¥à¸° จาภตรง นั้น à¸à¹‡ ถูภหอบ ไป หลาย ไมล์
+
+ง่ายดาย ราวà¸à¸±à¸š หอบ ขน นà¸
+
+
+
+มืด มาภà¹à¸¥à¹‰à¸§
+
+ลม ยัง ส่ง เสียง หวีด หวือ น่า à¸à¸¥à¸±à¸§ อยู่ รอบ ตัว เธอ
+
+à¹à¸•à¹ˆ โด โรธี เห็น ว่า เธอ สามารถ นั่ง ไป ได้ อย่าง ง่ายดาย นัà¸
+
+ครั้ง หนึ่ง หลัง จาภที่ บ้าน สะดุด อย่าง à¹à¸£à¸‡ à¹à¸¥à¸° หมุน ไป รอบๆ
+
+สอง สาม ครั้ง ใน ตอน à¹à¸£à¸
+
+เธอ à¸à¹‡ รู้สึภว่า ตัว เอง ถูภà¹à¸à¸§à¹ˆà¸‡ อย่าง à¹à¸œà¹ˆà¸§ เบา ราว ทารภใน เปล
+
+
+
+โต โต้ ไม่ ชอบใจ เลย
+
+มัน วิ่ง ไป วิ่ง มาร อบ ห้อง
+
+ทาง โน้น ที ทาง นี้ ที ส่ง เสียง เห่า ดัง à¸à¹‰à¸­à¸‡
+
+à¹à¸•à¹ˆ โด โรธี นั่ง นิ่ง อยู่ บน พื้น เà¸à¹‰à¸² คอย ดู ว่า จะ เà¸à¸´à¸” อะไร ขึ้น
+
+
+
+ครั้ง หนึ่ง โต โต้ เข้าไป ใà¸à¸¥à¹‰ à¸à¸² ที่ พื้น มาภไป
+
+เลย พลัด ตà¸à¸¥à¸‡ ไป
+
+ที à¹à¸£à¸ เด็ภหà¸à¸´à¸‡ คิด ว่า เธอ จะ สูภเสีย มัน ไป เสีย à¹à¸¥à¹‰à¸§
+
+à¹à¸•à¹ˆ ชั่ว ครู่ เธอ à¸à¹‡ เห็น หู ของ มัน โผล่ ขึ้น มา จาภช่อง นั้น
+
+ทั้งนี้ เพราะ à¹à¸£à¸‡ à¸à¸” อย่าง หนัภของ อาà¸à¸²à¸¨ ทำให้ โต โต้ ไม่ ตà¸à¸¥à¸‡ ไป ข้าง ล่าง
+
+โด โรธี คลาน ไป ที่ ช่อง นั้น จับ หู โต โต้ ไว้ ได้
+
+à¹à¸¥à¸° ลาภมัน มา ที่ ห้อง อีà¸
+
+หลัง จาภนั้น à¸à¹‡ ปิด à¸à¸² พื้น เพื่อ จะ ได้ ไม่ เà¸à¸´à¸” อุบัติเหตุ อีà¸
+
+
+
+ชั่วโมง à¹à¸¥à¹‰à¸§ ชั่วโมง เล่า ผ่าน ไป
+
+โด โรธี ค่อยๆ
+
+หาย à¸à¸¥à¸±à¸§
+
+à¹à¸•à¹ˆ เธอ รู้สึภเหงา เหลือ เà¸à¸´à¸™
+
+à¹à¸¥à¸° ลม à¸à¹‡ ส่ง เสียง หวีด หวือ ดัง เสีย จน เธอ à¹à¸—บ จะ หู หนวà¸
+
+ที à¹à¸£à¸ เธอ สงสัย ว่า คงจะ ถูภฉีภà¸à¸£à¸°à¸Šà¸²à¸ ออภเป็น ชิ้น เล็ภชิ้น น้อย เมื่อ บ้าน เอน ล้ม ลง อีภครั้ง
+
+à¹à¸•à¹ˆ หลาย ชั่วโมง ผ่าน ไป à¸à¹‡ ไม่มี อะไร เà¸à¸´à¸” ขึ้น เธอ เลย เลิภวิตภà¹à¸¥à¸° ตัดสิน ใจ คอย ดู อย่าง สงบ
+
+à¹à¸¥à¸° รอ ว่า อนาคต จะ เป็น อย่างไร
+
+ใน ที่สุด เธอ คลาน จาภพื้น ห้อง ที่ โยภไป มา ขึ้น ไป บน เตียง
+
+à¹à¸¥à¹‰à¸§ à¸à¹‡ นอน ลง
+
+โต โต้ ตาม ติด มา นอน ลง ใà¸à¸¥à¹‰à¹†
+
+เธอ
+
+
+
+ไม่ ช้า โด โรธี à¸à¹‡ ปิด ตา ลง หลับ ผล็อย ไป อย่าง สนิท ทั้งๆ
+
+ที่ บ้าน โยภไป มา à¹à¸¥à¸° ลม à¸à¹‡ คราง หวีด หวือ
+
+
+
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.cpp b/Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.cpp
new file mode 100644
index 00000000000..657fab433c0
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.cpp
@@ -0,0 +1,571 @@
+/*
+ ******************************************************************************
+ * Copyright (C) 1998-2003, 2006, International Business Machines Corporation *
+ * and others. All Rights Reserved. *
+ ******************************************************************************
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/uchriter.h"
+#include "unicode/brkiter.h"
+#include "unicode/locid.h"
+#include "unicode/unistr.h"
+#include "unicode/uniset.h"
+#include "unicode/ustring.h"
+
+/*
+ * This program takes a Unicode text file containing Thai text with
+ * spaces inserted where the word breaks are. It computes a copy of
+ * the text without spaces and uses a word instance of a Thai BreakIterator
+ * to compute the word breaks. The program reports any differences in the
+ * breaks.
+ *
+ * NOTE: by it's very nature, Thai word breaking is not exact, so it is
+ * exptected that this program will always report some differences.
+ */
+
+/*
+ * This class is a break iterator that counts words and spaces.
+ */
+class SpaceBreakIterator
+{
+public:
+ // The constructor:
+ // text - pointer to an array of UChars to iterate over
+ // count - the number of UChars in text
+ SpaceBreakIterator(const UChar *text, int32_t count);
+
+ // the destructor
+ ~SpaceBreakIterator();
+
+ // return next break position
+ int32_t next();
+
+ // return current word count
+ int32_t getWordCount();
+
+ // return current space count
+ int32_t getSpaceCount();
+
+private:
+ // No arg constructor: private so clients can't call it.
+ SpaceBreakIterator();
+
+ // The underlying BreakIterator
+ BreakIterator *fBreakIter;
+
+ // address of the UChar array
+ const UChar *fText;
+
+ // number of UChars in fText
+ int32_t fTextCount;
+
+ // current word count
+ int32_t fWordCount;
+
+ // current space count
+ int32_t fSpaceCount;
+
+ // UnicodeSet of SA characters
+ UnicodeSet fComplexContext;
+
+ // true when fBreakIter has returned DONE
+ UBool fDone;
+};
+
+/*
+ * This is the main class. It compares word breaks and reports the differences.
+ */
+class ThaiWordbreakTest
+{
+public:
+ // The main constructor:
+ // spaces - pointer to a UChar array for the text with spaces
+ // spaceCount - the number of characters in the spaces array
+ // noSpaces - pointer to a UChar array for the text without spaces
+ // noSpaceCount - the number of characters in the noSpaces array
+ // verbose - report all breaks if true, otherwise just report differences
+ ThaiWordbreakTest(const UChar *spaces, int32_t spaceCount, const UChar *noSpaces, int32_t noSpaceCount, UBool verbose);
+ ~ThaiWordbreakTest();
+
+ // returns the number of breaks that are in the spaces array
+ // but aren't found in the noSpaces array
+ int32_t getBreaksNotFound();
+
+ // returns the number of breaks which are found in the noSpaces
+ // array but aren't in the spaces array
+ int32_t getInvalidBreaks();
+
+ // returns the number of words found in the spaces array
+ int32_t getWordCount();
+
+ // reads the input Unicode text file:
+ // fileName - the path name of the file
+ // charCount - set to the number of UChars read from the file
+ // returns - the address of the UChar array containing the characters
+ static const UChar *readFile(char *fileName, int32_t &charCount);
+
+ // removes spaces form the input UChar array:
+ // spaces - pointer to the input UChar array
+ // count - number of UChars in the spaces array
+ // nonSpaceCount - the number of UChars in the result array
+ // returns - the address of the UChar array with spaces removed
+ static const UChar *crunchSpaces(const UChar *spaces, int32_t count, int32_t &nonSpaceCount);
+
+private:
+ // The no arg constructor - private so clients can't call it
+ ThaiWordbreakTest();
+
+ // This does the actual comparison:
+ // spaces - the address of the UChar array for the text with spaces
+ // spaceCount - the number of UChars in the spaces array
+ // noSpaces - the address of the UChar array for the text without spaces
+ // noSpaceCount - the number of UChars in the noSpaces array
+ // returns - true if all breaks match, FALSE otherwise
+ UBool compareWordBreaks(const UChar *spaces, int32_t spaceCount,
+ const UChar *noSpaces, int32_t noSpaceCount);
+
+ // helper method to report a break in the spaces
+ // array that's not found in the noSpaces array
+ void breakNotFound(int32_t br);
+
+ // helper method to report a break that's found in
+ // the noSpaces array that's not in the spaces array
+ void foundInvalidBreak(int32_t br);
+
+ // count of breaks in the spaces array that
+ // aren't found in the noSpaces array
+ int32_t fBreaksNotFound;
+
+ // count of breaks found in the noSpaces array
+ // that aren't in the spaces array
+ int32_t fInvalidBreaks;
+
+ // number of words found in the spaces array
+ int32_t fWordCount;
+
+ // report all breaks if true, otherwise just report differences
+ UBool fVerbose;
+};
+
+/*
+ * The main constructor: it calls compareWordBreaks and reports any differences
+ */
+ThaiWordbreakTest::ThaiWordbreakTest(const UChar *spaces, int32_t spaceCount,
+ const UChar *noSpaces, int32_t noSpaceCount, UBool verbose)
+: fBreaksNotFound(0), fInvalidBreaks(0), fWordCount(0), fVerbose(verbose)
+{
+ compareWordBreaks(spaces, spaceCount, noSpaces, noSpaceCount);
+}
+
+/*
+ * The no arg constructor
+ */
+ThaiWordbreakTest::ThaiWordbreakTest()
+{
+ // nothing
+}
+
+/*
+ * The destructor
+ */
+ThaiWordbreakTest::~ThaiWordbreakTest()
+{
+ // nothing?
+}
+
+/*
+ * returns the number of breaks in the spaces array
+ * that aren't found in the noSpaces array
+ */
+inline int32_t ThaiWordbreakTest::getBreaksNotFound()
+{
+ return fBreaksNotFound;
+}
+
+/*
+ * Returns the number of breaks found in the noSpaces
+ * array that aren't in the spaces array
+ */
+inline int32_t ThaiWordbreakTest::getInvalidBreaks()
+{
+ return fInvalidBreaks;
+}
+
+/*
+ * Returns the number of words found in the spaces array
+ */
+inline int32_t ThaiWordbreakTest::getWordCount()
+{
+ return fWordCount;
+}
+
+/*
+ * This method does the acutal break comparison and reports the results.
+ * It uses a SpaceBreakIterator to iterate over the text with spaces,
+ * and a word instance of a Thai BreakIterator to iterate over the text
+ * without spaces.
+ */
+UBool ThaiWordbreakTest::compareWordBreaks(const UChar *spaces, int32_t spaceCount,
+ const UChar *noSpaces, int32_t noSpaceCount)
+{
+ UBool result = TRUE;
+ Locale thai("th");
+ UCharCharacterIterator *noSpaceIter = new UCharCharacterIterator(noSpaces, noSpaceCount);
+ UErrorCode status = U_ZERO_ERROR;
+
+ BreakIterator *breakIter = BreakIterator::createWordInstance(thai, status);
+ breakIter->adoptText(noSpaceIter);
+
+ SpaceBreakIterator spaceIter(spaces, spaceCount);
+
+ int32_t nextBreak = 0;
+ int32_t nextSpaceBreak = 0;
+ int32_t iterCount = 0;
+
+ while (TRUE) {
+ nextSpaceBreak = spaceIter.next();
+ nextBreak = breakIter->next();
+
+ if (nextSpaceBreak == BreakIterator::DONE || nextBreak == BreakIterator::DONE) {
+ if (nextBreak != BreakIterator::DONE) {
+ fprintf(stderr, "break iterator didn't end.\n");
+ } else if (nextSpaceBreak != BreakIterator::DONE) {
+ fprintf(stderr, "premature break iterator end.\n");
+ }
+
+ break;
+ }
+
+ while (nextSpaceBreak != nextBreak &&
+ nextSpaceBreak != BreakIterator::DONE && nextBreak != BreakIterator::DONE) {
+ if (nextSpaceBreak < nextBreak) {
+ breakNotFound(nextSpaceBreak);
+ result = FALSE;
+ nextSpaceBreak = spaceIter.next();
+ } else if (nextSpaceBreak > nextBreak) {
+ foundInvalidBreak(nextBreak);
+ result = FALSE;
+ nextBreak = breakIter->next();
+ }
+ }
+
+ if (fVerbose) {
+ printf("%d %d\n", nextSpaceBreak, nextBreak);
+ }
+ }
+
+
+ fWordCount = spaceIter.getWordCount();
+
+ delete breakIter;
+
+ return result;
+}
+
+/*
+ * Report a break that's in the text with spaces but
+ * not found in the text without spaces.
+ */
+void ThaiWordbreakTest::breakNotFound(int32_t br)
+{
+ if (fVerbose) {
+ printf("%d ****\n", br);
+ } else {
+ fprintf(stderr, "break not found: %d\n", br);
+ }
+
+ fBreaksNotFound += 1;
+}
+
+/*
+ * Report a break that's found in the text without spaces
+ * that isn't in the text with spaces.
+ */
+void ThaiWordbreakTest::foundInvalidBreak(int32_t br)
+{
+ if (fVerbose) {
+ printf("**** %d\n", br);
+ } else {
+ fprintf(stderr, "found invalid break: %d\n", br);
+ }
+
+ fInvalidBreaks += 1;
+}
+
+/*
+ * Read the text from a file. The text must start with a Unicode Byte
+ * Order Mark (BOM) so that we know what order to read the bytes in.
+ */
+const UChar *ThaiWordbreakTest::readFile(char *fileName, int32_t &charCount)
+{
+ FILE *f;
+ int32_t fileSize;
+
+ UChar *buffer;
+ char *bufferChars;
+
+ f = fopen(fileName, "rb");
+
+ if( f == NULL ) {
+ fprintf(stderr,"Couldn't open %s reason: %s \n", fileName, strerror(errno));
+ return 0;
+ }
+
+ fseek(f, 0, SEEK_END);
+ fileSize = ftell(f);
+
+ fseek(f, 0, SEEK_SET);
+ bufferChars = new char[fileSize];
+
+ if(bufferChars == 0) {
+ fprintf(stderr,"Couldn't get memory for reading %s reason: %s \n", fileName, strerror(errno));
+ fclose(f);
+ return 0;
+ }
+
+ fread(bufferChars, sizeof(char), fileSize, f);
+ if( ferror(f) ) {
+ fprintf(stderr,"Couldn't read %s reason: %s \n", fileName, strerror(errno));
+ fclose(f);
+ delete[] bufferChars;
+ return 0;
+ }
+ fclose(f);
+
+ UnicodeString myText(bufferChars, fileSize, "UTF-8");
+
+ delete[] bufferChars;
+
+ charCount = myText.length();
+ buffer = new UChar[charCount];
+ if(buffer == 0) {
+ fprintf(stderr,"Couldn't get memory for reading %s reason: %s \n", fileName, strerror(errno));
+ return 0;
+ }
+
+ myText.extract(1, myText.length(), buffer);
+ charCount--; // skip the BOM
+ buffer[charCount] = 0; // NULL terminate for easier reading in the debugger
+
+ return buffer;
+}
+
+/*
+ * Remove spaces from the input UChar array.
+ *
+ * We check explicitly for a Unicode code value of 0x0020
+ * because Unicode::isSpaceChar returns true for CR, LF, etc.
+ *
+ */
+const UChar *ThaiWordbreakTest::crunchSpaces(const UChar *spaces, int32_t count, int32_t &nonSpaceCount)
+{
+ int32_t i, out, spaceCount;
+
+ spaceCount = 0;
+ for (i = 0; i < count; i += 1) {
+ if (spaces[i] == 0x0020 /*Unicode::isSpaceChar(spaces[i])*/) {
+ spaceCount += 1;
+ }
+ }
+
+ nonSpaceCount = count - spaceCount;
+ UChar *noSpaces = new UChar[nonSpaceCount];
+
+ if (noSpaces == 0) {
+ fprintf(stderr, "Couldn't allocate memory for the space stripped text.\n");
+ return 0;
+ }
+
+ for (out = 0, i = 0; i < count; i += 1) {
+ if (spaces[i] != 0x0020 /*! Unicode::isSpaceChar(spaces[i])*/) {
+ noSpaces[out++] = spaces[i];
+ }
+ }
+
+ return noSpaces;
+}
+
+/*
+ * Generate a text file with spaces in it from a file without.
+ */
+int generateFile(const UChar *chars, int32_t length) {
+ Locale root("");
+ UCharCharacterIterator *noSpaceIter = new UCharCharacterIterator(chars, length);
+ UErrorCode status = U_ZERO_ERROR;
+
+ UnicodeSet complexContext(UNICODE_STRING_SIMPLE("[:LineBreak=SA:]"), status);
+ BreakIterator *breakIter = BreakIterator::createWordInstance(root, status);
+ breakIter->adoptText(noSpaceIter);
+ char outbuf[1024];
+ int32_t strlength;
+ UChar bom = 0xFEFF;
+
+ printf("%s", u_strToUTF8(outbuf, sizeof(outbuf), &strlength, &bom, 1, &status));
+ int32_t prevbreak = 0;
+ while (U_SUCCESS(status)) {
+ int32_t nextbreak = breakIter->next();
+ if (nextbreak == BreakIterator::DONE) {
+ break;
+ }
+ printf("%s", u_strToUTF8(outbuf, sizeof(outbuf), &strlength, &chars[prevbreak],
+ nextbreak-prevbreak, &status));
+ if (nextbreak > 0 && complexContext.contains(chars[nextbreak-1])
+ && complexContext.contains(chars[nextbreak])) {
+ printf(" ");
+ }
+ prevbreak = nextbreak;
+ }
+
+ if (U_FAILURE(status)) {
+ fprintf(stderr, "generate failed: %s\n", u_errorName(status));
+ return status;
+ }
+ else {
+ return 0;
+ }
+}
+
+/*
+ * The main routine. Read the command line arguments, read the text file,
+ * remove the spaces, do the comparison and report the final results
+ */
+int main(int argc, char **argv)
+{
+ char *fileName = "space.txt";
+ int arg = 1;
+ UBool verbose = FALSE;
+ UBool generate = FALSE;
+
+ if (argc >= 2 && strcmp(argv[1], "-generate") == 0) {
+ generate = TRUE;
+ arg += 1;
+ }
+
+ if (argc >= 2 && strcmp(argv[1], "-verbose") == 0) {
+ verbose = TRUE;
+ arg += 1;
+ }
+
+ if (arg == argc - 1) {
+ fileName = argv[arg++];
+ }
+
+ if (arg != argc) {
+ fprintf(stderr, "Usage: %s [-verbose] [<file>]\n", argv[0]);
+ return 1;
+ }
+
+ int32_t spaceCount, nonSpaceCount;
+ const UChar *spaces, *noSpaces;
+
+ spaces = ThaiWordbreakTest::readFile(fileName, spaceCount);
+
+ if (spaces == 0) {
+ return 1;
+ }
+
+ if (generate) {
+ return generateFile(spaces, spaceCount);
+ }
+
+ noSpaces = ThaiWordbreakTest::crunchSpaces(spaces, spaceCount, nonSpaceCount);
+
+ if (noSpaces == 0) {
+ return 1;
+ }
+
+ ThaiWordbreakTest test(spaces, spaceCount, noSpaces, nonSpaceCount, verbose);
+
+ printf("word count: %d\n", test.getWordCount());
+ printf("breaks not found: %d\n", test.getBreaksNotFound());
+ printf("invalid breaks found: %d\n", test.getInvalidBreaks());
+
+ return 0;
+}
+
+/*
+ * The main constructor. Clear all the counts and construct a default
+ * word instance of a BreakIterator.
+ */
+SpaceBreakIterator::SpaceBreakIterator(const UChar *text, int32_t count)
+ : fBreakIter(0), fText(text), fTextCount(count), fWordCount(0), fSpaceCount(0), fDone(FALSE)
+{
+ UCharCharacterIterator *iter = new UCharCharacterIterator(text, count);
+ UErrorCode status = U_ZERO_ERROR;
+ fComplexContext.applyPattern(UNICODE_STRING_SIMPLE("[:LineBreak=SA:]"), status);
+ Locale root("");
+
+ fBreakIter = BreakIterator::createWordInstance(root, status);
+ fBreakIter->adoptText(iter);
+}
+
+SpaceBreakIterator::SpaceBreakIterator()
+{
+ // nothing
+}
+
+/*
+ * The destructor. delete the underlying BreakIterator
+ */
+SpaceBreakIterator::~SpaceBreakIterator()
+{
+ delete fBreakIter;
+}
+
+/*
+ * Return the next break, counting words and spaces.
+ */
+int32_t SpaceBreakIterator::next()
+{
+ if (fDone) {
+ return BreakIterator::DONE;
+ }
+
+ int32_t nextBreak;
+ do {
+ nextBreak = fBreakIter->next();
+
+ if (nextBreak == BreakIterator::DONE) {
+ fDone = TRUE;
+ return BreakIterator::DONE;
+ }
+ }
+ while(nextBreak > 0 && fComplexContext.contains(fText[nextBreak-1])
+ && fComplexContext.contains(fText[nextBreak]));
+
+ int32_t result = nextBreak - fSpaceCount;
+
+ if (nextBreak < fTextCount) {
+ if (fText[nextBreak] == 0x0020 /*Unicode::isSpaceChar(fText[nextBreak])*/) {
+ fSpaceCount += fBreakIter->next() - nextBreak;
+ }
+ }
+
+ fWordCount += 1;
+
+ return result;
+}
+
+/*
+ * Returns the current space count
+ */
+int32_t SpaceBreakIterator::getSpaceCount()
+{
+ return fSpaceCount;
+}
+
+/*
+ * Returns the current word count
+ */
+int32_t SpaceBreakIterator::getWordCount()
+{
+ return fWordCount;
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.dsp b/Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.dsp
new file mode 100644
index 00000000000..3aecea249fa
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/thaitest/thaitest.dsp
@@ -0,0 +1,101 @@
+# Microsoft Developer Studio Project File - Name="thaitest" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=thaitest - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "thaitest.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "thaitest.mak" CFG="thaitest - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "thaitest - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "thaitest - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "thaitest - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ..\..\..\lib\icuuc.lib ..\..\..\lib\icuin.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "thaitest - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ..\..\..\lib\icuucd.lib ..\..\..\lib\icuind.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "thaitest - Win32 Release"
+# Name "thaitest - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\thaitest.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Build/source/libs/icu/icu-xetex/test/threadtest/Makefile.in b/Build/source/libs/icu/icu-xetex/test/threadtest/Makefile.in
new file mode 100644
index 00000000000..8d268925fbc
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/threadtest/Makefile.in
@@ -0,0 +1,90 @@
+## Makefile.in for ICU - test/threadtest
+## Copyright (c) 2001, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+include $(top_builddir)/icudefs.mk
+
+## Platform-specific setup
+include @platform_make_fragment@
+
+## Build directory information
+subdir = test/threadtest
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = threadtest
+
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
+ENABLE_RPATH = @ENABLE_RPATH@
+ifeq ($(ENABLE_RPATH),YES)
+RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
+endif
+LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
+LIBS = $(LIBICUI18N) $(LIBICUUC) @LIBS@ @LIB_M@
+
+OBJECTS = threadtest.o stringtest.o converttest.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+endif
+
diff --git a/Build/source/libs/icu/icu-xetex/test/threadtest/converttest.cpp b/Build/source/libs/icu/icu-xetex/test/threadtest/converttest.cpp
new file mode 100644
index 00000000000..8de22efa786
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/threadtest/converttest.cpp
@@ -0,0 +1,88 @@
+//
+//********************************************************************
+// Copyright (C) 2002-2003, International Business Machines
+// Corporation and others. All Rights Reserved.
+//********************************************************************
+//
+// File converttest.cpp
+//
+
+#include "threadtest.h"
+#include "unicode/utypes.h"
+#include "unicode/ucnv.h"
+#include "unicode/uclean.h"
+#include "stdio.h"
+
+U_CAPI UBool U_EXPORT2 ucnv_cleanup();
+
+class ConvertThreadTest: public AbstractThreadTest {
+public:
+ ConvertThreadTest();
+ virtual ~ConvertThreadTest();
+ virtual void check();
+ virtual void runOnce();
+
+private:
+ UConverter *fCnv;
+};
+
+
+ConvertThreadTest::ConvertThreadTest() {
+ UErrorCode err = U_ZERO_ERROR;
+
+ fCnv = ucnv_open("gb18030", &err);
+ if (U_FAILURE(err)) {
+ fprintf(stderr, "ConvertTest - could not ucnv_open(\"gb18030\")\n");
+ fCnv = NULL;
+ }
+};
+
+
+ConvertThreadTest::~ConvertThreadTest() {
+ ucnv_close(fCnv);
+ fCnv = 0;
+}
+
+void ConvertThreadTest::runOnce() {
+ UErrorCode err = U_ZERO_ERROR;
+ UConverter *cnv1;
+ UConverter *cnv2;
+ char buf[U_CNV_SAFECLONE_BUFFERSIZE];
+ int32_t bufSize = U_CNV_SAFECLONE_BUFFERSIZE;
+
+ cnv1 = ucnv_open("shift_jis", &err);
+ if (U_FAILURE(err)) {
+ fprintf(stderr, "ucnv_open(\"shift_jis\") failed.\n");
+ }
+
+ cnv2 = ucnv_safeClone(fCnv, // The source converter, common to all threads.
+ buf,
+ &bufSize,
+ &err);
+ if (U_FAILURE(err)) {
+ fprintf(stderr, "ucnv_safeClone() failed.\n");
+ }
+ ucnv_close(cnv1);
+ ucnv_close(cnv2);
+ ucnv_flushCache();
+}
+
+void ConvertThreadTest::check() {
+ UErrorCode err = U_ZERO_ERROR;
+
+ if (fCnv) {ucnv_close(fCnv);}
+ //if (ucnv_cleanup () == FALSE) {
+ // fprintf(stderr, "ucnv_cleanup() failed - cache was not empty.\n");
+ //}
+ fCnv = ucnv_open("gb18030", &err);
+ if (U_FAILURE(err)) {
+ fprintf(stderr, "ConvertTest::check() - could not redo ucnv_open(\"gb18030\")\n");
+ fCnv = NULL;
+ }
+}
+
+
+AbstractThreadTest *createConvertTest() {
+ return new ConvertThreadTest();
+}
+
diff --git a/Build/source/libs/icu/icu-xetex/test/threadtest/stringtest.cpp b/Build/source/libs/icu/icu-xetex/test/threadtest/stringtest.cpp
new file mode 100644
index 00000000000..2380a3c7713
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/threadtest/stringtest.cpp
@@ -0,0 +1,143 @@
+//
+//********************************************************************
+// Copyright (C) 2002, International Business Machines
+// Corporation and others. All Rights Reserved.
+//********************************************************************
+//
+// File stringtest.cpp
+//
+
+#include "threadtest.h"
+#include "unicode/unistr.h"
+#include "stdio.h"
+
+class StringThreadTest: public AbstractThreadTest {
+public:
+ StringThreadTest();
+ virtual ~StringThreadTest();
+ virtual void check();
+ virtual void runOnce();
+ void makeStringCopies(int recursionCount);
+
+private:
+ UnicodeString *fCleanStrings;
+ UnicodeString *fSourceStrings;
+};
+
+StringThreadTest::StringThreadTest() {
+ // cleanStrings and sourceStrings are separately initialized to the same values.
+ // cleanStrings are never touched after in any remotely unsafe way.
+ // sourceStrings are copied during the test, which will run their buffer's reference
+ // counts all over the place.
+ fCleanStrings = new UnicodeString[5];
+ fSourceStrings = new UnicodeString[5];
+
+ fCleanStrings[0] = "When sorrows come, they come not single spies, but in batallions.";
+ fSourceStrings[0] = "When sorrows come, they come not single spies, but in batallions.";
+ fCleanStrings[1] = "Away, you scullion! You rampallion! You fustilarion! I'll tickle your catastrophe!";
+ fSourceStrings[1] = "Away, you scullion! You rampallion! You fustilarion! I'll tickle your catastrophe!";
+ fCleanStrings[2] = "hot";
+ fSourceStrings[2] = "hot";
+ fCleanStrings[3] = "";
+ fSourceStrings[3] = "";
+ fCleanStrings[4] = "Tomorrow, and tomorrow, and tomorrow,\n"
+ "Creeps in this petty pace from day to day\n"
+ "To the last syllable of recorded time;\n"
+ "And all our yesterdays have lighted fools \n"
+ "The way to dusty death. Out, out brief candle!\n"
+ "Life's but a walking shadow, a poor player\n"
+ "That struts and frets his hour upon the stage\n"
+ "And then is heard no more. It is a tale\n"
+ "Told by and idiot, full of sound and fury,\n"
+ "Signifying nothing.\n";
+ fSourceStrings[4] = "Tomorrow, and tomorrow, and tomorrow,\n"
+ "Creeps in this petty pace from day to day\n"
+ "To the last syllable of recorded time;\n"
+ "And all our yesterdays have lighted fools \n"
+ "The way to dusty death. Out, out brief candle!\n"
+ "Life's but a walking shadow, a poor player\n"
+ "That struts and frets his hour upon the stage\n"
+ "And then is heard no more. It is a tale\n"
+ "Told by and idiot, full of sound and fury,\n"
+ "Signifying nothing.\n";
+};
+
+
+StringThreadTest::~StringThreadTest() {
+ delete [] fCleanStrings;
+ delete [] fSourceStrings;
+}
+
+
+void StringThreadTest::runOnce() {
+ makeStringCopies(25);
+}
+
+void StringThreadTest::makeStringCopies(int recursionCount) {
+ UnicodeString firstGeneration[5];
+ UnicodeString secondGeneration[5];
+ UnicodeString thirdGeneration[5];
+ UnicodeString fourthGeneration[5];
+
+ // Make four generations of copies of the source strings, in slightly variant ways.
+ //
+ int i;
+ for (i=0; i<5; i++) {
+ firstGeneration[i] = fSourceStrings[i];
+ secondGeneration[i] = firstGeneration[i];
+ thirdGeneration[i] = UnicodeString(secondGeneration[i]);
+ // fourthGeneration[i] = UnicodeString("Lay on, MacDuff, And damn'd be him that first cries, \"Hold, enough!\"");
+ fourthGeneration[i] = UnicodeString();
+ fourthGeneration[i] = thirdGeneration[i];
+ }
+
+
+ // Recurse to make even more copies of the strings/
+ //
+ if (recursionCount > 0) {
+ makeStringCopies(recursionCount-1);
+ }
+
+
+ // Verify that all four generations are equal.
+ for (i=0; i<5; i++) {
+ if (firstGeneration[i] != fSourceStrings[i] ||
+ firstGeneration[i] != secondGeneration[i] ||
+ firstGeneration[i] != thirdGeneration[i] ||
+ firstGeneration[i] != fourthGeneration[i])
+ {
+ fprintf(stderr, "Error, strings don't compare equal.\n");
+ }
+ }
+
+};
+
+
+void StringThreadTest::check() {
+ //
+ // Check that the reference counts on the buffers for all of the source strings
+ // are one. The ref counts will have run way up while the test threads
+ // make numerous copies of the strings, but at the top of the loop all
+ // of the copies should be gone.
+ //
+ int i;
+
+ for (i=0; i<5; i++) {
+ if (fSourceStrings[i].fFlags & UnicodeString::kRefCounted) {
+ const UChar *buf = fSourceStrings[i].getBuffer();
+ uint32_t refCount = fSourceStrings[i].refCount();
+ if (refCount != 1) {
+ fprintf(stderr, "\nFailure. SourceString Ref Count was %d, should be 1.\n", refCount);
+ }
+ }
+ }
+};
+
+
+//
+// Factory functoin for StringThreadTest.
+// C function lets ThreadTest create StringTests without needing StringThreadTest header.
+//
+AbstractThreadTest *createStringTest() {
+ return new StringThreadTest();
+};
diff --git a/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.cpp b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.cpp
new file mode 100644
index 00000000000..7891a888f19
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.cpp
@@ -0,0 +1,536 @@
+//
+//********************************************************************
+// Copyright (C) 2002-2005, International Business Machines
+// Corporation and others. All Rights Reserved.
+//********************************************************************
+//
+// File threadtest.cpp
+//
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "unicode/utypes.h"
+#include "unicode/uclean.h"
+#include "umutex.h"
+#include "threadtest.h"
+
+
+//------------------------------------------------------------------------------
+//
+// Factory functions for creating different test types.
+//
+//------------------------------------------------------------------------------
+extern AbstractThreadTest *createStringTest();
+extern AbstractThreadTest *createConvertTest();
+
+
+
+//------------------------------------------------------------------------------
+//
+// Windows specific code for starting threads
+//
+//------------------------------------------------------------------------------
+#ifdef U_WINDOWS
+
+#include "Windows.h"
+#include "process.h"
+
+
+
+typedef void (*ThreadFunc)(void *);
+
+class ThreadFuncs // This class isolates OS dependent threading
+{ // functions from the rest of ThreadTest program.
+public:
+ static void Sleep(int millis) {::Sleep(millis);};
+ static void startThread(ThreadFunc, void *param);
+ static unsigned long getCurrentMillis();
+ static void yield() {::Sleep(0);};
+};
+
+void ThreadFuncs::startThread(ThreadFunc func, void *param)
+{
+ unsigned long x;
+ x = _beginthread(func, 0x10000, param);
+ if (x == -1)
+ {
+ fprintf(stderr, "Error starting thread. Errno = %d\n", errno);
+ exit(-1);
+ }
+}
+
+unsigned long ThreadFuncs::getCurrentMillis()
+{
+ return (unsigned long)::GetTickCount();
+}
+
+
+
+
+// #elif defined (POSIX)
+#else
+
+//------------------------------------------------------------------------------
+//
+// UNIX specific code for starting threads
+//
+//------------------------------------------------------------------------------
+#include <pthread.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sched.h>
+#include <sys/timeb.h>
+
+
+extern "C" {
+
+
+typedef void (*ThreadFunc)(void *);
+typedef void *(*pthreadfunc)(void *);
+
+class ThreadFuncs // This class isolates OS dependent threading
+{ // functions from the rest of ThreadTest program.
+public:
+ static void Sleep(int millis);
+ static void startThread(ThreadFunc, void *param);
+ static unsigned long getCurrentMillis();
+ static void yield() {sched_yield();};
+};
+
+void ThreadFuncs::Sleep(int millis)
+{
+ int seconds = millis/1000;
+ if (seconds <= 0) seconds = 1;
+ ::sleep(seconds);
+}
+
+
+void ThreadFuncs::startThread(ThreadFunc func, void *param)
+{
+ unsigned long x;
+
+ pthread_t tId;
+ //thread_t tId;
+#if defined(_HP_UX) && defined(XML_USE_DCE)
+ x = pthread_create( &tId, pthread_attr_default, (pthreadfunc)func, param);
+#else
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+ x = pthread_create( &tId, &attr, (pthreadfunc)func, param);
+#endif
+ if (x == -1)
+ {
+ fprintf(stderr, "Error starting thread. Errno = %d\n", errno);
+ exit(-1);
+ }
+}
+
+unsigned long ThreadFuncs::getCurrentMillis() {
+ timeb aTime;
+ ftime(&aTime);
+ return (unsigned long)(aTime.time*1000 + aTime.millitm);
+}
+}
+
+
+// #else
+// #error This platform is not supported
+#endif
+
+
+
+//------------------------------------------------------------------------------
+//
+// struct runInfo Holds the info extracted from the command line and data
+// that is shared by all threads.
+// There is only one of these, and it is static.
+// During the test, the threads will access this info without
+// any synchronization.
+//
+//------------------------------------------------------------------------------
+const int MAXINFILES = 25;
+struct RunInfo
+{
+ bool quiet;
+ bool verbose;
+ int numThreads;
+ int totalTime;
+ int checkTime;
+ AbstractThreadTest *fTest;
+ bool stopFlag;
+ bool exitFlag;
+ int32_t runningThreads;
+};
+
+
+//------------------------------------------------------------------------------
+//
+// struct threadInfo Holds information specific to an individual thread.
+// One of these is set up for each thread in the test.
+// The main program monitors the threads by looking
+// at the status stored in these structs.
+//
+//------------------------------------------------------------------------------
+struct ThreadInfo
+{
+ bool fHeartBeat; // Set true by the thread each time it finishes
+ // a test.
+ unsigned int fCycles; // Number of cycles completed.
+ int fThreadNum; // Identifying number for this thread.
+ ThreadInfo() {
+ fHeartBeat = false;
+ fCycles = 0;
+ fThreadNum = -1;
+ }
+};
+
+
+//
+//------------------------------------------------------------------------------
+//
+// Global Data
+//
+//------------------------------------------------------------------------------
+RunInfo gRunInfo;
+ThreadInfo *gThreadInfo;
+UMTX gStopMutex; // Lets main thread suspend test threads.
+UMTX gInfoMutex; // Synchronize access to data passed between
+ // worker threads and the main thread
+
+
+//----------------------------------------------------------------------
+//
+// parseCommandLine Read through the command line, and save all
+// of the options in the gRunInfo struct.
+//
+// Display the usage message if the command line
+// is no good.
+//
+// Probably ought to be a member function of RunInfo.
+//
+//----------------------------------------------------------------------
+
+void parseCommandLine(int argc, char **argv)
+{
+ gRunInfo.quiet = false; // Set up defaults for run.
+ gRunInfo.verbose = false;
+ gRunInfo.numThreads = 2;
+ gRunInfo.totalTime = 0;
+ gRunInfo.checkTime = 10;
+
+ try // Use exceptions for command line syntax errors.
+ {
+ int argnum = 1;
+ while (argnum < argc)
+ {
+ if (strcmp(argv[argnum], "-quiet") == 0)
+ gRunInfo.quiet = true;
+ else if (strcmp(argv[argnum], "-verbose") == 0)
+ gRunInfo.verbose = true;
+ else if (strcmp(argv[argnum], "--help") == 0 ||
+ (strcmp(argv[argnum], "?") == 0)) {throw 1; }
+
+ else if (strcmp(argv[argnum], "-threads") == 0)
+ {
+ ++argnum;
+ if (argnum >= argc)
+ throw 1;
+ gRunInfo.numThreads = atoi(argv[argnum]);
+ if (gRunInfo.numThreads < 0)
+ throw 1;
+ }
+ else if (strcmp(argv[argnum], "-time") == 0)
+ {
+ ++argnum;
+ if (argnum >= argc)
+ throw 1;
+ gRunInfo.totalTime = atoi(argv[argnum]);
+ if (gRunInfo.totalTime < 1)
+ throw 1;
+ }
+ else if (strcmp(argv[argnum], "-ctime") == 0)
+ {
+ ++argnum;
+ if (argnum >= argc)
+ throw 1;
+ gRunInfo.checkTime = atoi(argv[argnum]);
+ if (gRunInfo.checkTime < 1)
+ throw 1;
+ }
+ else if (strcmp(argv[argnum], "string") == 0)
+ {
+ gRunInfo.fTest = createStringTest();
+ }
+ else if (strcmp(argv[argnum], "convert") == 0)
+ {
+ gRunInfo.fTest = createConvertTest();
+ }
+ else
+ {
+ fprintf(stderr, "Unrecognized command line option. Scanning \"%s\"\n",
+ argv[argnum]);
+ throw 1;
+ }
+ argnum++;
+ }
+ // We've reached the end of the command line parameters.
+ // Fail if no test name was specified.
+ if (gRunInfo.fTest == NULL) {
+ fprintf(stderr, "No test specified.\n");
+ throw 1;
+ }
+
+ }
+ catch (int)
+ {
+ fprintf(stderr, "usage: threadtest [-threads nnn] [-time nnn] [-quiet] [-verbose] test-name\n"
+ " -quiet Suppress periodic status display. \n"
+ " -verbose Display extra messages. \n"
+ " -threads nnn Number of threads. Default is 2. \n"
+ " -time nnn Total time to run, in seconds. Default is forever.\n"
+ " -ctime nnn Time between extra consistency checks, in seconds. Default 10\n"
+ " testname string | convert\n"
+ );
+ exit(1);
+ }
+}
+
+
+
+
+
+//----------------------------------------------------------------------
+//
+// threadMain The main function for each of the swarm of test threads.
+// Run in a loop, executing the runOnce() test function each time.
+//
+//
+//----------------------------------------------------------------------
+
+extern "C" {
+
+void threadMain (void *param)
+{
+ ThreadInfo *thInfo = (ThreadInfo *)param;
+
+ if (gRunInfo.verbose)
+ printf("Thread #%d: starting\n", thInfo->fThreadNum);
+ umtx_atomic_inc(&gRunInfo.runningThreads);
+
+ //
+ //
+ while (true)
+ {
+ if (gRunInfo.verbose )
+ printf("Thread #%d: starting loop\n", thInfo->fThreadNum);
+
+ //
+ // If the main thread is asking us to wait, do so by locking gStopMutex
+ // which will block us, since the main thread will be holding it already.
+ //
+ umtx_lock(&gInfoMutex);
+ UBool stop = gRunInfo.stopFlag; // Need mutex for processors with flakey memory models.
+ umtx_unlock(&gInfoMutex);
+
+ if (stop) {
+ if (gRunInfo.verbose) {
+ fprintf(stderr, "Thread #%d: suspending\n", thInfo->fThreadNum);
+ }
+ umtx_atomic_dec(&gRunInfo.runningThreads);
+ while (gRunInfo.stopFlag) {
+ umtx_lock(&gStopMutex);
+ umtx_unlock(&gStopMutex);
+ }
+ umtx_atomic_inc(&gRunInfo.runningThreads);
+ if (gRunInfo.verbose) {
+ fprintf(stderr, "Thread #%d: restarting\n", thInfo->fThreadNum);
+ }
+ }
+
+ //
+ // The real work of the test happens here.
+ //
+ gRunInfo.fTest->runOnce();
+
+ umtx_lock(&gInfoMutex);
+ thInfo->fHeartBeat = true;
+ thInfo->fCycles++;
+ UBool exitNow = gRunInfo.exitFlag;
+ umtx_unlock(&gInfoMutex);
+
+ //
+ // If main thread says it's time to exit, break out of the loop.
+ //
+ if (exitNow) {
+ break;
+ }
+ }
+
+ umtx_atomic_dec(&gRunInfo.runningThreads);
+
+ // Returning will kill the thread.
+ return;
+}
+
+}
+
+
+
+
+//----------------------------------------------------------------------
+//
+// main
+//
+//----------------------------------------------------------------------
+
+int main (int argc, char **argv)
+{
+ //
+ // Parse the command line options, and create the specified kind of test.
+ //
+ parseCommandLine(argc, argv);
+
+
+ //
+ // Fire off the requested number of parallel threads
+ //
+
+ if (gRunInfo.numThreads == 0)
+ exit(0);
+
+ gRunInfo.exitFlag = FALSE;
+ gRunInfo.stopFlag = TRUE; // Will cause the new threads to block
+ umtx_lock(&gStopMutex);
+
+ gThreadInfo = new ThreadInfo[gRunInfo.numThreads];
+ int threadNum;
+ for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++)
+ {
+ gThreadInfo[threadNum].fThreadNum = threadNum;
+ ThreadFuncs::startThread(threadMain, &gThreadInfo[threadNum]);
+ }
+
+
+ unsigned long startTime = ThreadFuncs::getCurrentMillis();
+ int elapsedSeconds = 0;
+ int timeSinceCheck = 0;
+
+ //
+ // Unblock the threads.
+ //
+ gRunInfo.stopFlag = FALSE; // Unblocks the worker threads.
+ umtx_unlock(&gStopMutex);
+
+ //
+ // Loop, watching the heartbeat of the worker threads.
+ // Each second,
+ // display "+" if all threads have completed at least one loop
+ // display "." if some thread hasn't since previous "+"
+ // Each "ctime" seconds,
+ // Stop all the worker threads at the top of their loop, then
+ // call the test's check function.
+ //
+ while (gRunInfo.totalTime == 0 || gRunInfo.totalTime > elapsedSeconds)
+ {
+ ThreadFuncs::Sleep(1000); // We sleep while threads do their work ...
+
+ if (gRunInfo.quiet == false && gRunInfo.verbose == false)
+ {
+ char c = '+';
+ int threadNum;
+ umtx_lock(&gInfoMutex);
+ for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++)
+ {
+ if (gThreadInfo[threadNum].fHeartBeat == false)
+ {
+ c = '.';
+ break;
+ };
+ }
+ umtx_unlock(&gInfoMutex);
+ fputc(c, stdout);
+ fflush(stdout);
+ if (c == '+')
+ for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++)
+ gThreadInfo[threadNum].fHeartBeat = false;
+ }
+
+ //
+ // Update running times.
+ //
+ timeSinceCheck -= elapsedSeconds;
+ elapsedSeconds = (ThreadFuncs::getCurrentMillis() - startTime) / 1000;
+ timeSinceCheck += elapsedSeconds;
+
+ //
+ // Call back to the test to let it check its internal validity
+ //
+ if (timeSinceCheck >= gRunInfo.checkTime) {
+ if (gRunInfo.verbose) {
+ fprintf(stderr, "Main: suspending all threads\n");
+ }
+ umtx_lock(&gStopMutex); // Block the worker threads at the top of their loop
+ gRunInfo.stopFlag = TRUE;
+ for (;;) {
+ umtx_lock(&gInfoMutex);
+ UBool done = gRunInfo.runningThreads == 0;
+ umtx_unlock(&gInfoMutex);
+ if (done) { break;}
+ ThreadFuncs::yield();
+ }
+
+
+
+ gRunInfo.fTest->check();
+ if (gRunInfo.quiet == false && gRunInfo.verbose == false) {
+ fputc('C', stdout);
+ }
+
+ if (gRunInfo.verbose) {
+ fprintf(stderr, "Main: starting all threads.\n");
+ }
+ gRunInfo.stopFlag = FALSE; // Unblock the worker threads.
+ umtx_unlock(&gStopMutex);
+ timeSinceCheck = 0;
+ }
+ };
+
+ //
+ // Time's up, we are done. (We only get here if this was a timed run)
+ // Tell the threads to exit.
+ //
+ gRunInfo.exitFlag = true;
+ for (;;) {
+ umtx_lock(&gInfoMutex);
+ UBool done = gRunInfo.runningThreads == 0;
+ umtx_unlock(&gInfoMutex);
+ if (done) { break;}
+ ThreadFuncs::yield();
+ }
+
+ //
+ // Tally up the total number of cycles completed by each of the threads.
+ //
+ double totalCyclesCompleted = 0;
+ for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++) {
+ totalCyclesCompleted += gThreadInfo[threadNum].fCycles;
+ }
+
+ double cyclesPerMinute = totalCyclesCompleted / (double(gRunInfo.totalTime) / double(60));
+ printf("\n%8.1f cycles per minute.", cyclesPerMinute);
+
+ //
+ // Memory should be clean coming out
+ //
+ delete gRunInfo.fTest;
+ delete [] gThreadInfo;
+ umtx_destroy(&gInfoMutex);
+ umtx_destroy(&gStopMutex);
+ u_cleanup();
+
+ return 0;
+}
+
+
diff --git a/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsp b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsp
new file mode 100644
index 00000000000..385111507d9
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsp
@@ -0,0 +1,166 @@
+# Microsoft Developer Studio Project File - Name="threadtest" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=threadtest - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "threadtest.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "threadtest.mak" CFG="threadtest - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "threadtest - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "threadtest - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "threadtest - Win64 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "threadtest - Win64 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "threadtest - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "..\..\..\include" /I "..\..\..\source\common" /I "..\..\..\source\i18n" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib shell32.lib icuuc.lib icuin.lib icutu.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib\\"
+
+!ELSEIF "$(CFG)" == "threadtest - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\common" /I "..\..\..\source\i18n" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib shell32.lib icuucd.lib icuind.lib icutud.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\\"
+
+!ELSEIF "$(CFG)" == "threadtest - Win64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /I "..\..\..\include" /I "..\..\..\source\common" /I "..\..\..\source\i18n" /D"WIN64" /D"NDEBUG" /D"_CONSOLE" /D"_MBCS" /FD /c /O2 /GX /Op /D"_IA64_" /Zi /D"WIN64" /D"WIN32" /D"_AFX_NO_DAO_SUPPORT" /Zm600
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IA64
+# ADD LINK32 kernel32.lib user32.lib shell32.lib icuuc.lib icuin.lib icutu.lib /nologo /subsystem:console /machine:IA64 /libpath:"..\..\..\lib\\" /incremental:no
+
+!ELSEIF "$(CFG)" == "threadtest - Win64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /I "..\..\..\include" /I "..\..\..\source\common" /I "..\..\..\source\i18n" /D"WIN64" /D"_DEBUG" /D"_CONSOLE" /D"_MBCS" /FR /FD /GZ /c /Od /GX /Op /D"_IA64_" /Zi /D"WIN64" /D"WIN32" /D"_AFX_NO_DAO_SUPPORT" /Zm600
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:IA64 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib shell32.lib icuucd.lib icuind.lib icutud.lib /nologo /subsystem:console /debug /machine:IA64 /pdbtype:sept /libpath:"..\..\..\lib\\" /incremental:no
+
+!ENDIF
+
+# Begin Target
+
+# Name "threadtest - Win32 Release"
+# Name "threadtest - Win32 Debug"
+# Name "threadtest - Win64 Release"
+# Name "threadtest - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\converttest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\stringtest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\threadtest.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\threadtest.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsw b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsw
new file mode 100644
index 00000000000..485fcb290e2
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "threadtest"=.\threadtest.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.h b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.h
new file mode 100644
index 00000000000..1cb38803969
--- /dev/null
+++ b/Build/source/libs/icu/icu-xetex/test/threadtest/threadtest.h
@@ -0,0 +1,46 @@
+//
+//********************************************************************
+// Copyright (C) 2002, International Business Machines
+// Corporation and others. All Rights Reserved.
+//********************************************************************
+//
+// File threadtest.h
+//
+#ifndef ABSTRACTTHREADTEST_H
+#define ABSTRACTTHREADTEST_H
+//------------------------------------------------------------------------------
+//
+// class AbstractThreadTest Base class for threading tests.
+// Use of this abstract base isolates the part of the
+// program that nows how to spin up and control threads
+// from the specific stuff being tested, and (hopefully)
+// simplifies adding new threading tests for different parts
+// of ICU.
+//
+// Derived classes: A running test will have exactly one instance of a
+// derived class, which will persist for the duration of the
+// test and be shared among all of the threads involved in
+// the test.
+//
+// The constructor will be called in a single-threaded environment,
+// and should set up any data that will need to persist for the
+// duration.
+//
+// runOnce() will be called repeatedly by the working threads of
+// the test in the full multi-threaded environment.
+//
+// check() will be called periodically in a single threaded
+// environment, with the worker threads temporarily suspended between
+// between calls to runOnce(). Do consistency checks here.
+//
+//------------------------------------------------------------------------------
+class AbstractThreadTest {
+public:
+ AbstractThreadTest() {};
+ virtual ~AbstractThreadTest() {};
+ virtual void check() = 0;
+ virtual void runOnce() = 0;
+};
+
+#endif // ABSTRACTTHREADTEST_H
+